From e6164b615a9710c676a386cf15096f08427e25f8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 13 Apr 2006 22:20:15 +0000 Subject: [PATCH 001/757] remove lots of non-essential packages SVN-Revision: 3641 --- openwrt/package/6tunnel/Config.in | 12 - openwrt/package/6tunnel/Makefile | 60 - openwrt/package/6tunnel/ipkg/6tunnel.control | 5 - openwrt/package/aiccu/Config.in | 11 - openwrt/package/aiccu/Makefile | 36 - openwrt/package/aiccu/files/aiccu.init | 21 - openwrt/package/aiccu/ipkg/aiccu.conffiles | 1 - openwrt/package/aiccu/ipkg/aiccu.control | 5 - openwrt/package/aircrack/Config.in | 15 - openwrt/package/aircrack/Makefile | 45 - .../package/aircrack/ipkg/aircrack.control | 5 - openwrt/package/amwall/Config.in | 10 - openwrt/package/amwall/Makefile | 48 - openwrt/package/amwall/ipkg/amwall.control | 5 - openwrt/package/arpd/Config.in | 11 - openwrt/package/arpd/Makefile | 64 - openwrt/package/arpd/ipkg/arpd.control | 5 - .../arpd/patches/configure-no-bpf.patch | 12 - .../arpd/patches/function-string.patch | 42 - .../package/arpd/patches/pcap-and-arg.patch | 75 - openwrt/package/arptables/Config.in | 9 - openwrt/package/arptables/Makefile | 32 - .../package/arptables/ipkg/arptables.control | 4 - openwrt/package/arpwatch/Config.in | 7 - openwrt/package/arpwatch/Makefile | 63 - .../package/arpwatch/ipkg/arpwatch.conffiles | 1 - .../package/arpwatch/ipkg/arpwatch.control | 5 - openwrt/package/asterisk/Config.in | 159 - openwrt/package/asterisk/Makefile | 281 - .../package/asterisk/files/asterisk.default | 4 - openwrt/package/asterisk/files/asterisk.init | 23 - openwrt/package/asterisk/files/modules.conf | 138 - .../ipkg/asterisk-chan-bluetooth.conffiles | 1 - .../ipkg/asterisk-chan-bluetooth.control | 5 - .../ipkg/asterisk-chan-h323.conffiles | 1 - .../asterisk/ipkg/asterisk-chan-h323.control | 5 - .../ipkg/asterisk-chan-mgcp.conffiles | 1 - .../asterisk/ipkg/asterisk-chan-mgcp.control | 5 - .../ipkg/asterisk-chan-skinny.conffiles | 1 - .../ipkg/asterisk-chan-skinny.control | 5 - .../asterisk/ipkg/asterisk-codec-ilbc.control | 5 - .../ipkg/asterisk-codec-lpc10.control | 5 - .../ipkg/asterisk-codec-speex.control | 5 - .../asterisk/ipkg/asterisk-mini.conffiles | 13 - .../asterisk/ipkg/asterisk-mini.control | 5 - .../asterisk/ipkg/asterisk-mysql.conffiles | 1 - .../asterisk/ipkg/asterisk-mysql.control | 5 - .../ipkg/asterisk-pbx-dundi.conffiles | 1 - .../asterisk/ipkg/asterisk-pbx-dundi.control | 5 - .../asterisk/ipkg/asterisk-pgsql.conffiles | 1 - .../asterisk/ipkg/asterisk-pgsql.control | 5 - .../asterisk/ipkg/asterisk-res-agi.control | 5 - .../asterisk/ipkg/asterisk-sounds.control | 5 - .../asterisk/ipkg/asterisk-sqlite.control | 5 - .../ipkg/asterisk-voicemail.conffiles | 1 - .../asterisk/ipkg/asterisk-voicemail.control | 5 - .../package/asterisk/ipkg/asterisk.conffiles | 21 - .../package/asterisk/ipkg/asterisk.control | 5 - .../asterisk-1.0.7-Makefile-astdb.patch | 14 - ...asterisk-1.0.7-Makefile-codecs-lpc10.patch | 28 - .../asterisk-1.0.7-Makefile-stdtime.patch | 14 - .../asterisk-1.0.7-chan_iax2-tmp_path.patch | 12 - .../asterisk/patches/asterisk-1.0.7-dns.patch | 18 - .../asterisk-1.0.9-chan_bluetooth.patch | 3678 --- .../asterisk-1.2.0-Makefile-apps.patch | 34 - .../patches/asterisk-1.2.0-Makefile-cdr.patch | 37 - .../asterisk-1.2.0-Makefile-channels.patch | 22 - .../asterisk-1.2.0-Makefile-codecs-gsm.patch | 39 - .../asterisk-1.2.0-Makefile-codecs.patch | 13 - .../patches/asterisk-1.2.0-Makefile-pbx.patch | 22 - .../patches/asterisk-1.2.0-Makefile-res.patch | 26 - .../patches/asterisk-1.2.0-Makefile.patch | 54 - .../patches/asterisk-1.2.0-app_mysql.patch | 449 - .../patches/asterisk-1.2.0-cdr_mysql.patch | 522 - .../asterisk-1.2.0-chan_bluetooth.patch | 11 - .../asterisk-1.2.0-compat-getloadavg.patch | 13 - .../patches/asterisk-1.2.0-res_mysql.patch | 698 - .../asterisk-1.2.1-Makefile-codecs-ilbc.patch | 21 - .../asterisk-1.2.1-Makefile-versionnum.patch | 11 - openwrt/package/atftp/Config.in | 25 - openwrt/package/atftp/Makefile | 71 - openwrt/package/atftp/ipkg/atftp.control | 5 - openwrt/package/atftp/ipkg/atftpd.control | 5 - openwrt/package/atftp/ipkg/files/postinst | 8 - .../package/atftp/patches/100-mconfig.patch | 20 - .../package/atftp/patches/110-services.patch | 77 - .../atftp/patches/120-retry_setting.patch | 117 - openwrt/package/autossh/Config.in | 9 - openwrt/package/autossh/Makefile | 39 - openwrt/package/autossh/ipkg/autossh.control | 5 - openwrt/package/avahi/Config.in | 64 - openwrt/package/avahi/Makefile | 154 - openwrt/package/avahi/files/avahi-daemon.conf | 29 - openwrt/package/avahi/files/avahi-daemon.init | 25 - openwrt/package/avahi/files/service-http | 10 - openwrt/package/avahi/files/service-ssh | 9 - .../package/avahi/ipkg/avahi-daemon.conffiles | 3 - .../package/avahi/ipkg/avahi-daemon.control | 5 - .../package/avahi/ipkg/avahi-dnsconfd.control | 5 - openwrt/package/avahi/ipkg/libavahi.control | 4 - openwrt/package/bc/Config.in | 22 - openwrt/package/bc/Makefile | 69 - openwrt/package/bc/ipkg/bc.control | 4 - openwrt/package/bc/ipkg/dc.control | 4 - openwrt/package/bind/Config.in | 113 - openwrt/package/bind/Makefile | 138 - openwrt/package/bind/files/bind/db.0 | 12 - openwrt/package/bind/files/bind/db.127 | 13 - openwrt/package/bind/files/bind/db.255 | 12 - openwrt/package/bind/files/bind/db.local | 13 - openwrt/package/bind/files/bind/db.root | 45 - .../bind/files/bind/named.conf.example | 45 - openwrt/package/bind/files/named.init | 5 - openwrt/package/bind/ipkg/bind-check.control | 5 - openwrt/package/bind/ipkg/bind-client.control | 5 - openwrt/package/bind/ipkg/bind-dig.control | 5 - openwrt/package/bind/ipkg/bind-dnssec.control | 5 - openwrt/package/bind/ipkg/bind-host.control | 5 - openwrt/package/bind/ipkg/bind-rndc.control | 5 - .../package/bind/ipkg/bind-server.conffiles | 6 - openwrt/package/bind/ipkg/bind-server.control | 6 - openwrt/package/bind/ipkg/bind-tools.control | 5 - .../package/bind/patches/cross-compile.patch | 178 - openwrt/package/bitchx/Config.in | 10 - openwrt/package/bitchx/Makefile | 90 - openwrt/package/bitchx/files/S98bitchxrc | 7 - openwrt/package/bitchx/files/bitchxrc | 2 - openwrt/package/bitchx/ipkg/bitchx.control | 7 - .../patches/BitchX-fix_declarations.patch | 24 - .../package/bitchx/patches/BitchX-tparm.patch | 10 - openwrt/package/bitlbee/Config.in | 16 - openwrt/package/bitlbee/Makefile | 67 - openwrt/package/bitlbee/files/S55bitlbee | 3 - .../package/bitlbee/ipkg/bitlbee.conffiles | 3 - openwrt/package/bitlbee/ipkg/bitlbee.control | 5 - .../patches/100-cross_compile_configure_fix | 98 - openwrt/package/bluez-libs/Config.in | 9 - openwrt/package/bluez-libs/Makefile | 84 - .../bluez-libs/ipkg/bluez-libs.control | 5 - openwrt/package/bluez-utils/Config.in | 13 - openwrt/package/bluez-utils/Makefile | 91 - openwrt/package/bluez-utils/files/givepin | 14 - .../bluez-utils/ipkg/bluez-utils.conffiles | 3 - .../bluez-utils/ipkg/bluez-utils.control | 5 - .../patches/001-include_limits.patch | 22 - .../patches/002-hcid_pin_helper.patch | 21 - openwrt/package/bwm/Config.in | 8 - openwrt/package/bwm/Makefile | 30 - openwrt/package/bwm/ipkg/bwm.control | 4 - openwrt/package/cbtt/Config.in | 16 - openwrt/package/cbtt/Makefile | 47 - openwrt/package/cbtt/ipkg/cbtt-mysql.control | 7 - openwrt/package/cbtt/ipkg/cbtt.control | 7 - .../package/cbtt/patches/100-compile.patch | 41 - openwrt/package/cgilib/Config.in | 12 - openwrt/package/cgilib/Makefile | 50 - openwrt/package/cgilib/ipkg/cgilib.control | 7 - .../cgilib/patches/100-shared_lib.patch | 41 - .../cgilib/patches/200-cgitest_bugfix.patch | 11 - openwrt/package/chillispot/Config.in | 16 - openwrt/package/chillispot/Makefile | 73 - .../package/chillispot/files/chillispot.init | 20 - .../chillispot/ipkg/chillispot.conffiles | 1 - .../chillispot/ipkg/chillispot.control | 5 - openwrt/package/cifsmount/Config.in | 7 - openwrt/package/cifsmount/Makefile | 30 - .../package/cifsmount/ipkg/cifsmount.control | 4 - openwrt/package/cifsmount/mount.cifs.c | 972 - openwrt/package/click/Config.in | 18 - openwrt/package/click/Makefile | 79 - openwrt/package/click/files/S50roofnet | 7 - openwrt/package/click/ipkg/click.control | 6 - openwrt/package/click/ipkg/roofnet.control | 6 - openwrt/package/clinkc/Config.in | 10 - openwrt/package/clinkc/Makefile | 63 - openwrt/package/clinkc/ipkg/clinkc.control | 5 - openwrt/package/collectd/Config.in | 43 - openwrt/package/collectd/Makefile | 101 - openwrt/package/collectd/files/S80collectd | 17 - .../package/collectd/ipkg/collectd.control | 6 - openwrt/package/ctorrent/Config.in | 10 - openwrt/package/ctorrent/Makefile | 52 - .../package/ctorrent/ipkg/ctorrent.control | 4 - openwrt/package/cups/Config.in | 9 - openwrt/package/cups/Makefile | 119 - openwrt/package/cups/files/cupsd.init | 4 - .../package/cups/files/etc/cups/classes.conf | 7 - .../package/cups/files/etc/cups/client.conf | 9 - .../package/cups/files/etc/cups/cupsd.conf | 50 - .../package/cups/files/etc/cups/printers.conf | 23 - openwrt/package/cups/ipkg/cups.conffiles | 4 - openwrt/package/cups/ipkg/cups.control | 5 - .../cups/patches/100-makefile-targets.patch | 11 - .../patches/110-no-strip-on-install.patch | 12 - .../cups/patches/120-documentation-url.patch | 20 - openwrt/package/curl/Config.in | 27 - openwrt/package/curl/Makefile | 131 - openwrt/package/curl/ipkg/curl.control | 5 - openwrt/package/curl/ipkg/libcurl.control | 5 - .../curl/patches/500-configure_cross.patch | 64 - openwrt/package/cutter/Config.in | 11 - openwrt/package/cutter/Makefile | 32 - openwrt/package/cutter/ipkg/cutter.control | 5 - openwrt/package/cyrus-sasl/Config.in | 15 - openwrt/package/cyrus-sasl/Makefile | 127 - .../package/cyrus-sasl/ipkg/libsasl2.control | 4 - .../patches/cyrus-sasl-2.1.20-gcc4.patch | 11 - openwrt/package/deco/Config.in | 11 - openwrt/package/deco/Makefile | 61 - openwrt/package/deco/ipkg/deco.control | 5 - openwrt/package/deco/patches/100-tty.c.patch | 11 - openwrt/package/dhcp-forwarder/Config.in | 9 - openwrt/package/dhcp-forwarder/Makefile | 67 - .../dhcp-forwarder/files/dhcp-fwd.init | 21 - .../ipkg/dhcp-forwarder.conffiles | 1 - .../ipkg/dhcp-forwarder.control | 4 - .../patches/00-big_endian.patch | 11 - .../patches/01-getpwnmam_getgrnam.patch | 35 - openwrt/package/dhcp/Config.in | 30 - openwrt/package/dhcp/Makefile | 49 - openwrt/package/dhcp/ipkg/dhcp-relay.control | 4 - openwrt/package/dhcp/ipkg/dhcp-server.control | 4 - openwrt/package/dhcp6/Config.in | 7 - openwrt/package/dhcp6/Makefile | 37 - openwrt/package/dhcp6/ipkg/dhcp6.control | 5 - openwrt/package/dhcp6/ipkg/files/conffiles | 4 - .../dhcp6/patches/01-remove_debug.patch | 118 - openwrt/package/dosfstools/Config.in | 9 - openwrt/package/dosfstools/Makefile | 42 - .../dosfstools/ipkg/dosfstools.control | 4 - openwrt/package/dsniff/Config.in | 14 - openwrt/package/dsniff/Makefile | 76 - openwrt/package/dsniff/ipkg/dsniff.control | 5 - .../package/dsniff/patches/arpspoof-fix.patch | 53 - openwrt/package/dsniff/patches/dns.patch | 704 - openwrt/package/dsniff/patches/gdbm.patch | 204 - openwrt/package/dsniff/patches/noyp.patch | 42 - .../package/dsniff/patches/openssl-fix.patch | 11 - .../package/dsniff/patches/pcap-header.patch | 12 - openwrt/package/dsniff/patches/time_h.patch | 22 - openwrt/package/e2fsprogs/Config.in | 11 - openwrt/package/e2fsprogs/Makefile | 79 - .../package/e2fsprogs/ipkg/e2fsprogs.control | 4 - openwrt/package/elhttp/Config.in | 8 - openwrt/package/elhttp/Makefile | 38 - openwrt/package/elhttp/ipkg/elhttp.control | 4 - .../elhttp/patches/01-cross-compile.patch | 21 - openwrt/package/elinks/Config.in | 9 - openwrt/package/elinks/Makefile | 83 - openwrt/package/elinks/ipkg/elinks.control | 4 - .../patches/01-missing_decl_for_off_t.patch | 11 - openwrt/package/ether-wake/Config.in | 10 - openwrt/package/ether-wake/Makefile | 32 - openwrt/package/ether-wake/files/ether-wake.c | 392 - .../ether-wake/ipkg/ether-wake.control | 5 - .../patches/no_ether_hostton_in_uclibc.patch | 29 - openwrt/package/ethtool/Config.in | 9 - openwrt/package/ethtool/Makefile | 63 - openwrt/package/ethtool/ipkg/ethtool.control | 4 - openwrt/package/expat/Config.in | 15 - openwrt/package/expat/Makefile | 89 - openwrt/package/expat/ipkg/libexpat.control | 4 - .../package/expat/patches/001-destdir.patch | 44 - openwrt/package/ez-ipupdate/Config.in | 9 - openwrt/package/ez-ipupdate/Makefile | 57 - .../ez-ipupdate/files/ez-ipupdate.conf | 8 - .../ez-ipupdate/files/ez-ipupdate.hotplug | 10 - .../ez-ipupdate/files/ez-ipupdate.init | 22 - .../ez-ipupdate/ipkg/ez-ipupdate.conffiles | 1 - .../ez-ipupdate/ipkg/ez-ipupdate.control | 4 - .../ez-ipupdate/patches/debian-subset.patch | 568 - openwrt/package/fakeidentd/Config.in | 8 - openwrt/package/fakeidentd/Makefile | 37 - .../package/fakeidentd/files/fakeidentd.init | 18 - .../fakeidentd/ipkg/fakeidentd.control | 4 - openwrt/package/fetchmail/Config.in | 8 - openwrt/package/fetchmail/Makefile | 68 - .../package/fetchmail/ipkg/fetchmail.control | 5 - .../patches/01-amd64_detection.patch | 43 - .../package/fetchmail/patches/02-no_rej.patch | 21 - openwrt/package/flac/Config.in | 15 - openwrt/package/flac/Makefile | 61 - openwrt/package/flac/ipkg/libflac.control | 4 - openwrt/package/flac/patches/no_encoder.patch | 280 - openwrt/package/fping/Config.in | 16 - openwrt/package/fping/Makefile | 55 - openwrt/package/fping/ipkg/fping.control | 4 - openwrt/package/fping/patches/debian-10.patch | 165 - openwrt/package/fprobe-ulog/Config.in | 11 - openwrt/package/fprobe-ulog/Makefile | 52 - .../fprobe-ulog/ipkg/fprobe-ulog.control | 8 - openwrt/package/fprobe/Config.in | 11 - openwrt/package/fprobe/Makefile | 54 - openwrt/package/fprobe/ipkg/fprobe.control | 7 - openwrt/package/freeradius/Config.in | 152 - openwrt/package/freeradius/Makefile | 227 - openwrt/package/freeradius/files/radiusd.init | 23 - .../ipkg/freeradius-democerts.control | 5 - .../ipkg/freeradius-mod-chap.control | 5 - .../ipkg/freeradius-mod-detail.control | 5 - .../ipkg/freeradius-mod-eap-gtc.control | 5 - .../ipkg/freeradius-mod-eap-md5.control | 5 - .../ipkg/freeradius-mod-eap-mschapv2.control | 5 - .../ipkg/freeradius-mod-eap-peap.control | 5 - .../ipkg/freeradius-mod-eap-tls.control | 5 - .../ipkg/freeradius-mod-eap-ttls.control | 5 - .../ipkg/freeradius-mod-eap.conffiles | 1 - .../ipkg/freeradius-mod-eap.control | 5 - .../ipkg/freeradius-mod-files.conffiles | 3 - .../ipkg/freeradius-mod-files.control | 5 - .../ipkg/freeradius-mod-ldap.conffiles | 1 - .../ipkg/freeradius-mod-ldap.control | 5 - .../ipkg/freeradius-mod-mschap.control | 5 - .../ipkg/freeradius-mod-pap.control | 5 - .../ipkg/freeradius-mod-preprocess.conffiles | 2 - .../ipkg/freeradius-mod-preprocess.control | 5 - .../ipkg/freeradius-mod-realm.conffiles | 1 - .../ipkg/freeradius-mod-realm.control | 5 - .../ipkg/freeradius-mod-sql-mysql.control | 5 - .../ipkg/freeradius-mod-sql-pgsql.control | 5 - .../ipkg/freeradius-mod-sql.conffiles | 1 - .../ipkg/freeradius-mod-sql.control | 5 - .../ipkg/freeradius-mod-sqlcounter.control | 5 - .../freeradius/ipkg/freeradius-utils.control | 5 - .../freeradius/ipkg/freeradius.conffiles | 3 - .../freeradius/ipkg/freeradius.control | 5 - .../patches/01-freeradius-1.0.3-dict.patch | 100 - .../patches/02-freeradius-1.0.4-config.patch | 311 - .../03-freeradius-1.0.5-modules_ldflags.patch | 42 - .../04-freeradius-1.0.5-autoconf.patch | 1845 -- .../05-freeradius-1.0.2-mysql-autoconf.patch | 88 - .../patches/06-autoconf-rlm_ldap.patch | 576 - openwrt/package/freetype/Config.in | 26 - openwrt/package/freetype/Makefile | 88 - .../package/freetype/ipkg/libfreetype.control | 16 - openwrt/package/frickin/Config.in | 11 - openwrt/package/frickin/Makefile | 39 - openwrt/package/frickin/files/frickin.default | 16 - openwrt/package/frickin/files/frickin.init | 16 - .../package/frickin/ipkg/frickin.conffiles | 1 - openwrt/package/frickin/ipkg/frickin.control | 4 - openwrt/package/fuse/Config.in | 56 - openwrt/package/fuse/Makefile | 108 - openwrt/package/fuse/ipkg/fuse-utils.control | 5 - openwrt/package/fuse/ipkg/libfuse.control | 5 - .../fuse/patches/111-uclibc_changes.patch | 16 - .../fuse/patches/112-no_break_on_mknod.patch | 12 - openwrt/package/glib/Config.in | 18 - openwrt/package/glib/Makefile | 113 - openwrt/package/glib/ipkg/glib1.control | 5 - openwrt/package/glib/patches/01-debian-9 | 18988 ----------- .../glib/patches/02-cross-compile-fix.patch | 210 - .../glib/patches/03-use-glibconfig-sysdefs | 31 - openwrt/package/glib/patches/04-gcc3.4-fix | 22 - openwrt/package/gmediaserver/Config.in | 13 - openwrt/package/gmediaserver/Makefile | 75 - .../gmediaserver/files/gmediaserver.default | 1 - .../gmediaserver/files/gmediaserver.init | 21 - .../gmediaserver/ipkg/gmediaserver.conffiles | 1 - .../gmediaserver/ipkg/gmediaserver.control | 5 - .../gmediaserver/patches/no_iconv.patch | 107 - openwrt/package/gmp/Config.in | 15 - openwrt/package/gmp/Makefile | 79 - openwrt/package/gmp/ipkg/libgmp.control | 4 - openwrt/package/gnutls/Config.in | 99 - openwrt/package/gnutls/Makefile | 128 - .../package/gnutls/ipkg/gnutls-utils.control | 5 - .../gnutls/ipkg/libgnutls-openssl.control | 5 - openwrt/package/gnutls/ipkg/libgnutls.control | 5 - .../gnutls/patches/500-cross-compile.patch | 68 - .../gnutls/patches/501-certtool-libs.patch | 24 - openwrt/package/gpg/Config.in | 9 - openwrt/package/gpg/Makefile | 70 - openwrt/package/gpg/ipkg/gpg.control | 4 - openwrt/package/gpsd/Config.in | 18 - openwrt/package/gpsd/Makefile | 90 - openwrt/package/gpsd/ipkg/gpsd.control | 5 - openwrt/package/gsm/Config.in | 30 - openwrt/package/gsm/Makefile | 70 - openwrt/package/gsm/ipkg/gsm-utils.control | 4 - openwrt/package/gsm/ipkg/libgsm.control | 4 - .../patches/01-debian-libsgm-1.0.10-13.patch | 434 - openwrt/package/hdparm/Config.in | 12 - openwrt/package/hdparm/Makefile | 36 - openwrt/package/hdparm/ipkg/hdparm.control | 4 - openwrt/package/heyu/Config.in | 8 - openwrt/package/heyu/Makefile | 33 - openwrt/package/heyu/files/x10.conf | 24 - .../package/heyu/ipkg/files/heyu.conffiles | 1 - openwrt/package/heyu/ipkg/heyu.control | 7 - .../heyu/patches/01-avoid_configure.patch | 194 - openwrt/package/hostap-utils/Config.in | 9 - openwrt/package/hostap-utils/Makefile | 45 - .../hostap-utils/ipkg/hostap-utils.control | 5 - openwrt/package/hostapd/Config.in | 61 - openwrt/package/hostapd/Makefile | 77 - .../package/hostapd/files/hostapd-mini.config | 69 - openwrt/package/hostapd/files/hostapd.config | 69 - .../hostapd/ipkg/hostapd-mini.conffiles | 1 - .../package/hostapd/ipkg/hostapd-mini.control | 5 - .../hostapd/ipkg/hostapd-utils.control | 5 - .../package/hostapd/ipkg/hostapd.conffiles | 1 - openwrt/package/hostapd/ipkg/hostapd.control | 6 - .../patches/001-cross_compile_fix.patch | 35 - openwrt/package/howl/Config.in | 62 - openwrt/package/howl/Makefile | 120 - openwrt/package/howl/files/autoipd.init | 20 - openwrt/package/howl/files/mDNSResponder.conf | 2 - openwrt/package/howl/files/mDNSResponder.init | 20 - openwrt/package/howl/files/nifd.init | 21 - openwrt/package/howl/ipkg/autoipd.control | 5 - openwrt/package/howl/ipkg/howl-utils.control | 5 - openwrt/package/howl/ipkg/libhowl.control | 4 - .../package/howl/ipkg/mdnsresponder.conffiles | 1 - .../package/howl/ipkg/mdnsresponder.control | 5 - openwrt/package/howl/ipkg/nifd.control | 5 - .../package/howl/patches/config-path.patch | 14 - openwrt/package/howl/patches/debug-log.patch | 10 - openwrt/package/howl/patches/proto-fix.patch | 11 - openwrt/package/htpdate/Config.in | 9 - openwrt/package/htpdate/Makefile | 40 - openwrt/package/htpdate/files/htpdate.default | 1 - openwrt/package/htpdate/files/htpdate.init | 22 - .../package/htpdate/ipkg/htpdate.conffiles | 1 - openwrt/package/htpdate/ipkg/htpdate.control | 4 - openwrt/package/httping/Config.in | 21 - openwrt/package/httping/Makefile | 43 - openwrt/package/httping/ipkg/httping.control | 4 - .../patches/01-honor_includes_lib-paths.patch | 26 - openwrt/package/icecast/Config.in | 24 - openwrt/package/icecast/Makefile | 80 - .../package/icecast/ipkg/icecast.conffiles | 1 - openwrt/package/icecast/ipkg/icecast.control | 5 - .../patches/01-icecast-2.3.0-tremor.patch | 153 - .../patches/icecast-2.3.0-curl_config.patch | 27127 ---------------- openwrt/package/id3lib/Config.in | 13 - openwrt/package/id3lib/Makefile | 90 - openwrt/package/id3lib/ipkg/id3lib.control | 5 - openwrt/package/iftop/Config.in | 14 - openwrt/package/iftop/Makefile | 65 - openwrt/package/iftop/ipkg/iftop.control | 5 - openwrt/package/igmpproxy/Config.in | 9 - openwrt/package/igmpproxy/Makefile | 31 - .../package/igmpproxy/ipkg/igmpproxy.control | 4 - openwrt/package/ipcad/Config.in | 12 - openwrt/package/ipcad/Makefile | 70 - openwrt/package/ipcad/ipkg/ipcad.conffiles | 1 - openwrt/package/ipcad/ipkg/ipcad.control | 6 - .../ipcad/patches/01-honor_cppflags.patch | 11 - openwrt/package/iperf/Config.in | 11 - openwrt/package/iperf/Makefile | 72 - openwrt/package/iperf/ipkg/iperf.control | 5 - openwrt/package/iptraf/Config.in | 12 - openwrt/package/iptraf/Makefile | 46 - openwrt/package/iptraf/ipkg/iptraf.control | 5 - .../patches/iptraf-2.7.0-cross_compile.patch | 29 - .../iptraf/patches/iptraf-2.7.0-ifaces.patch | 549 - openwrt/package/irssi/Config.in | 11 - openwrt/package/irssi/Makefile | 70 - openwrt/package/irssi/ipkg/irssi.control | 5 - .../patches/100-cross_compiling_fix.patch | 54 - openwrt/package/jamvm/Config.in | 17 - openwrt/package/jamvm/Makefile | 71 - openwrt/package/jamvm/ipkg/jamvm.control | 5 - .../jamvm/patches/100-jamvm-mips.patch | 593 - openwrt/package/jpeg/Config.in | 15 - openwrt/package/jpeg/Makefile | 87 - openwrt/package/jpeg/ipkg/libjpeg.control | 6 - .../jpeg/patches/jpeg-6b-config_guess.patch | 1536 - openwrt/package/kismet/Config.in | 66 - openwrt/package/kismet/Makefile | 101 - openwrt/package/kismet/files/ap_manuf | 79 - openwrt/package/kismet/files/client_manuf | 249 - openwrt/package/kismet/files/kismet.conf | 281 - .../package/kismet/files/kismet_drone.conf | 121 - openwrt/package/kismet/files/kismet_ui.conf | 61 - .../kismet/ipkg/kismet-client.conffiles | 4 - .../package/kismet/ipkg/kismet-client.control | 9 - .../kismet/ipkg/kismet-drone.conffiles | 1 - .../package/kismet/ipkg/kismet-drone.control | 9 - .../kismet/ipkg/kismet-server.conffiles | 3 - .../package/kismet/ipkg/kismet-server.control | 9 - openwrt/package/kismet/ipkg/kismet.control | 9 - .../kismet/patches/100-wrt54g_source.patch | 189 - .../kismet/patches/110-uclibc++_fixes.patch | 29 - .../package/kismet/patches/120-cleanup.patch | 3113 -- openwrt/package/knock/Config.in | 41 - openwrt/package/knock/Makefile | 75 - openwrt/package/knock/ipkg/knock.control | 5 - openwrt/package/knock/ipkg/knockd.conffiles | 1 - openwrt/package/knock/ipkg/knockd.control | 5 - openwrt/package/l2tpd/Config.in | 13 - openwrt/package/l2tpd/Makefile | 43 - openwrt/package/l2tpd/files/l2tpd.conf | 29 - openwrt/package/l2tpd/files/l2tpd.init | 21 - openwrt/package/l2tpd/files/options.l2tpd | 17 - openwrt/package/l2tpd/ipkg/l2tpd.conffiles | 2 - openwrt/package/l2tpd/ipkg/l2tpd.control | 8 - .../package/l2tpd/patches/01-debian-2.patch | 3394 -- .../l2tpd/patches/02-debian-2-pty-rev.patch | 21 - .../package/l2tpd/patches/03-jacco-pty.patch | 1194 - openwrt/package/l2tpd/patches/04-gcc4.patch | 12 - .../package/l2tpd/patches/04-nonblock.patch | 26 - .../package/l2tpd/patches/05-df-disable.patch | 25 - openwrt/package/l2tpns/Config.in | 12 - openwrt/package/l2tpns/Makefile | 42 - openwrt/package/l2tpns/ipkg/l2tpns.conffiles | 3 - openwrt/package/l2tpns/ipkg/l2tpns.control | 4 - .../01-honor_includes_remove_backtrace.patch | 128 - openwrt/package/lcd4linux/Config.in | 10 - openwrt/package/lcd4linux/Makefile | 64 - .../package/lcd4linux/ipkg/lcd4linux.control | 5 - .../patches/100-drv_RouterBoard.patch | 11 - .../lcd4linux/patches/110-ucdelay.patch | 12 - .../patches/120-remove_parport_outb.patch | 15 - openwrt/package/less/Config.in | 10 - openwrt/package/less/Makefile | 61 - openwrt/package/less/ipkg/less.control | 5 - openwrt/package/libamsel/Config.in | 9 - openwrt/package/libamsel/Makefile | 60 - .../package/libamsel/ipkg/libamsel.control | 4 - openwrt/package/libao/Config.in | 10 - openwrt/package/libao/Makefile | 100 - openwrt/package/libao/ipkg/libao.control | 4 - openwrt/package/libart/Config.in | 14 - openwrt/package/libart/Makefile | 87 - openwrt/package/libart/ipkg/libart.control | 9 - .../patches/100-cross_compile_fix.patch | 15 - openwrt/package/libaudiofile/Config.in | 7 - openwrt/package/libaudiofile/Makefile | 102 - .../libaudiofile/ipkg/libaudiofile.control | 4 - .../001-audiofile-config-libdirs.patch | 13 - openwrt/package/libcli/Config.in | 11 - openwrt/package/libcli/Makefile | 53 - openwrt/package/libcli/ipkg/libcli.control | 5 - .../01-remove_debug_honor_prefix.patch | 19 - openwrt/package/libdaemon/Config.in | 19 - openwrt/package/libdaemon/Makefile | 97 - .../package/libdaemon/ipkg/libdaemon.control | 4 - openwrt/package/libdb/Config.in | 15 - openwrt/package/libdb/Makefile | 91 - openwrt/package/libdb/ipkg/libdb.control | 4 - openwrt/package/libdnet/Config.in | 9 - openwrt/package/libdnet/Makefile | 95 - openwrt/package/libdnet/ipkg/libdnet.control | 4 - .../patches/libdnet-1.10-dnet_config.patch | 23 - openwrt/package/libelf/Config.in | 10 - openwrt/package/libelf/Makefile | 87 - openwrt/package/libelf/ipkg/libelf.control | 4 - openwrt/package/libevent/Config.in | 17 - openwrt/package/libevent/Makefile | 83 - .../package/libevent/ipkg/libevent.control | 4 - openwrt/package/libffi-sable/Config.in | 12 - openwrt/package/libffi-sable/Makefile | 84 - .../libffi-sable/ipkg/libffi-sable.control | 4 - openwrt/package/libgcrypt/Config.in | 15 - openwrt/package/libgcrypt/Makefile | 94 - .../package/libgcrypt/ipkg/libgcrypt.control | 6 - .../libgcrypt/patches/500-cross-compile.patch | 24 - openwrt/package/libgd/Config.in | 11 - openwrt/package/libgd/Makefile | 95 - openwrt/package/libgd/ipkg/libgd.control | 5 - .../libgd/patches/100-configure_fix.patch | 40 - openwrt/package/libgdbm/Config.in | 9 - openwrt/package/libgdbm/Makefile | 83 - openwrt/package/libgdbm/ipkg/libgdbm.control | 4 - openwrt/package/libgpg-error/Config.in | 12 - openwrt/package/libgpg-error/Makefile | 95 - .../libgpg-error/ipkg/libgpg-error.control | 4 - openwrt/package/libiconv/Config.in | 13 - openwrt/package/libiconv/Makefile | 83 - .../package/libiconv/ipkg/libiconv.control | 4 - .../libiconv/patches/100-strip_charsets.patch | 2962 -- openwrt/package/libid3tag/Config.in | 13 - openwrt/package/libid3tag/Makefile | 87 - .../package/libid3tag/ipkg/libid3tag.control | 5 - openwrt/package/liblzo/Config.in | 9 - openwrt/package/liblzo/Makefile | 82 - openwrt/package/liblzo/ipkg/liblzo.control | 4 - .../liblzo/patches/lzo-cross-compile.patch | 43 - openwrt/package/libmad/Config.in | 12 - openwrt/package/libmad/Makefile | 103 - openwrt/package/libmad/ipkg/libmad.control | 4 - openwrt/package/libnet/Config.in | 12 - openwrt/package/libnet/Makefile | 100 - openwrt/package/libnet/ipkg/libnet.control | 5 - .../libnet/patches/500-debian-subset.patch.gz | Bin 208420 -> 0 bytes openwrt/package/libnids/Config.in | 11 - openwrt/package/libnids/Makefile | 83 - openwrt/package/libnids/ipkg/libnids.control | 5 - .../package/libnids/patches/configure.patch | 62 - .../libnids/patches/no_asm_for_i386.patch | 12 - openwrt/package/libogg/Config.in | 9 - openwrt/package/libogg/Makefile | 96 - openwrt/package/libogg/ipkg/libogg.control | 4 - openwrt/package/libol/Config.in | 8 - openwrt/package/libol/Makefile | 87 - openwrt/package/libol/ipkg/libol.control | 4 - openwrt/package/libosip2/Config.in | 9 - openwrt/package/libosip2/Makefile | 90 - .../package/libosip2/ipkg/libosip2.control | 5 - openwrt/package/libpcap/Config.in | 9 - openwrt/package/libpcap/Makefile | 86 - openwrt/package/libpcap/ipkg/libpcap.control | 4 - .../libpcap/patches/100-shared-lib.patch | 120 - .../patches/101-cross-compile-fix.patch | 12 - .../libpcap/patches/102-alt-ether.patch | 40 - openwrt/package/libpng/Config.in | 10 - openwrt/package/libpng/Makefile | 92 - openwrt/package/libpng/ipkg/libpng.control | 5 - .../libpng/patches/100-config_fix.patch | 19 - .../patches/101-pkgconfig-install.patch | 21 - openwrt/package/libpthread/Config.in | 7 - openwrt/package/libpthread/Makefile | 32 - .../libpthread/ipkg/libpthread.control | 4 - openwrt/package/libtasn1/Config.in | 11 - openwrt/package/libtasn1/Makefile | 102 - .../package/libtasn1/ipkg/libtasn1.control | 4 - .../libtasn1/patches/500-cross-compile.patch | 28 - openwrt/package/libtool/Config.in | 14 - openwrt/package/libtool/Makefile | 79 - openwrt/package/libtool/ipkg/libltdl.control | 4 - openwrt/package/libupnp/Config.in | 13 - openwrt/package/libupnp/Makefile | 58 - openwrt/package/libupnp/ipkg/libupnp.control | 5 - .../libupnp/patches/libupnp-1.2.1a-gcc4.patch | 17 - .../package/libupnp/patches/opt-flags.patch | 315 - openwrt/package/libusb/Config.in | 9 - openwrt/package/libusb/Makefile | 86 - openwrt/package/libusb/ipkg/libusb.control | 4 - .../package/libusb/patches/no-libusbpp.patch | 105 - openwrt/package/libvorbis/Config.in | 10 - openwrt/package/libvorbis/Makefile | 104 - .../package/libvorbis/ipkg/libvorbis.control | 4 - .../libvorbis/patches/100-no_examples.patch | 12 - openwrt/package/libvorbisidec/Config.in | 12 - openwrt/package/libvorbisidec/Makefile | 91 - .../libvorbisidec/ipkg/libvorbisidec.control | 4 - openwrt/package/libxml2/Config.in | 11 - openwrt/package/libxml2/Makefile | 127 - openwrt/package/libxml2/ipkg/libxml2.control | 5 - openwrt/package/libxslt/Config.in | 10 - openwrt/package/libxslt/Makefile | 107 - openwrt/package/libxslt/ipkg/libxslt.control | 5 - openwrt/package/lighttpd/Config.in | 106 - openwrt/package/lighttpd/Makefile | 131 - openwrt/package/lighttpd/files/lighttpd.conf | 217 - .../package/lighttpd/files/lighttpd.default | 1 - openwrt/package/lighttpd/files/lighttpd.init | 24 - .../ipkg/lighttpd-mod-accesslog.control | 5 - .../lighttpd/ipkg/lighttpd-mod-alias.control | 5 - .../lighttpd/ipkg/lighttpd-mod-auth.control | 5 - .../lighttpd/ipkg/lighttpd-mod-cgi.control | 5 - .../ipkg/lighttpd-mod-evasive.control | 5 - .../lighttpd/ipkg/lighttpd-mod-expire.control | 5 - .../ipkg/lighttpd-mod-fastcgi.control | 5 - .../lighttpd/ipkg/lighttpd-mod-proxy.control | 5 - .../ipkg/lighttpd-mod-redirect.control | 5 - .../ipkg/lighttpd-mod-rewrite.control | 5 - .../lighttpd/ipkg/lighttpd-mod-setenv.control | 5 - .../ipkg/lighttpd-mod-simple-vhost.control | 5 - .../lighttpd/ipkg/lighttpd-mod-ssi.control | 5 - .../lighttpd/ipkg/lighttpd-mod-status.control | 5 - .../ipkg/lighttpd-mod-usertrack.control | 5 - .../package/lighttpd/ipkg/lighttpd.conffiles | 3 - .../package/lighttpd/ipkg/lighttpd.control | 6 - .../patches/500-configure_cross.patch | 24 - openwrt/package/logrotate/Config.in | 10 - openwrt/package/logrotate/Makefile | 40 - .../package/logrotate/files/logrotate.conf | 30 - .../package/logrotate/ipkg/logrotate.control | 6 - .../logrotate-3.7.1-dateext-maxage.patch | 433 - .../patches/logrotate-3.7.1-datehack.patch | 12 - .../logrotate-3.7.1-ignore-hidden.patch | 14 - .../patches/logrotate-3.7.1-no-tmpdir.patch | 54 - .../logrotate-3.7.1-taboo-to-debug.patch | 12 - .../patches/logrotate-3.7.1-weekly.patch | 22 - openwrt/package/lrzsz/Config.in | 11 - openwrt/package/lrzsz/Makefile | 76 - openwrt/package/lrzsz/ipkg/lrzsz.control | 5 - openwrt/package/lua/Config.in | 111 - openwrt/package/lua/Makefile | 100 - openwrt/package/lua/ipkg/liblua.control | 4 - openwrt/package/lua/ipkg/lua-examples.control | 5 - openwrt/package/lua/ipkg/lua.control | 5 - openwrt/package/lua/ipkg/luac.control | 5 - .../lua/patches/lua-5.0.2-config.patch | 31 - .../lua/patches/lua-5.0.2-soname.patch | 14 - openwrt/package/macchanger/Config.in | 8 - openwrt/package/macchanger/Makefile | 52 - .../macchanger/ipkg/macchanger.control | 6 - openwrt/package/madplay/Config.in | 12 - openwrt/package/madplay/Makefile | 78 - openwrt/package/madplay/ipkg/madplay.control | 6 - openwrt/package/maradns/Config.in | 9 - openwrt/package/maradns/Makefile | 73 - openwrt/package/maradns/files/maradns.init | 3 - openwrt/package/maradns/files/mararc | 9 - .../package/maradns/ipkg/maradns.conffiles | 1 - openwrt/package/maradns/ipkg/maradns.control | 8 - .../maradns/patches/cross-compile-fix.patch | 12 - openwrt/package/matrixssl/Config.in | 17 - openwrt/package/matrixssl/Makefile | 51 - .../matrixssl/ipkg/libmatrixssl.control | 5 - .../matrixssl/patches/matrixssl-1.2.4.diff | 1971 -- .../matrixssl/patches/matrixssl-typefix.patch | 12 - openwrt/package/mgetty/Config.in | 7 - openwrt/package/mgetty/Makefile | 118 - openwrt/package/mgetty/ipkg/mgetty.control | 4 - openwrt/package/mgetty/patches/mgetty.patch | 98 - openwrt/package/miau/Config.in | 12 - openwrt/package/miau/Makefile | 76 - openwrt/package/miau/files/S50miau | 32 - openwrt/package/miau/files/miau | 2 - openwrt/package/miau/files/miaurc | 587 - openwrt/package/miau/ipkg/miau.conffiles | 3 - openwrt/package/miau/ipkg/miau.control | 7 - openwrt/package/miax/Config.in | 12 - openwrt/package/miax/Makefile | 36 - openwrt/package/miax/ipkg/miax.control | 5 - openwrt/package/miax/patches/01-cross.patch | 24 - openwrt/package/microcom/Config.in | 10 - openwrt/package/microcom/Makefile | 42 - .../package/microcom/ipkg/microcom.control | 4 - openwrt/package/microperl/Config.in | 7 - openwrt/package/microperl/Makefile | 35 - .../package/microperl/ipkg/microperl.control | 4 - openwrt/package/mini_httpd/Config.in | 96 - openwrt/package/mini_httpd/Makefile | 105 - .../mini_httpd/files/matrixssl_helper.c | 455 - .../mini_httpd/files/matrixssl_helper.h | 39 - .../mini_httpd/files/mini_httpd-ssl.conf | 7 - .../package/mini_httpd/files/mini_httpd.conf | 5 - .../mini_httpd/files/mini_httpd.default | 1 - .../package/mini_httpd/files/mini_httpd.init | 26 - .../package/mini_httpd/files/mini_httpd.pem | 29 - .../ipkg/mini-httpd-htpasswd.control | 4 - .../ipkg/mini-httpd-matrixssl.conffiles | 3 - .../ipkg/mini-httpd-matrixssl.control | 5 - .../ipkg/mini-httpd-openssl.conffiles | 3 - .../ipkg/mini-httpd-openssl.control | 5 - .../mini_httpd/ipkg/mini-httpd.conffiles | 2 - .../mini_httpd/ipkg/mini-httpd.control | 5 - .../mini_httpd/patches/001-cgi_path.patch | 16 - .../mini_httpd/patches/500-matrixssl.patch | 161 - openwrt/package/mini_sendmail/Config.in | 12 - openwrt/package/mini_sendmail/Makefile | 36 - .../mini_sendmail/ipkg/mini-sendmail.control | 4 - .../mini_sendmail/patches/500-flags.patch | 15 - openwrt/package/miredo/Config.in | 44 - openwrt/package/miredo/Makefile | 94 - .../package/miredo/files/miredo-server.init | 28 - openwrt/package/miredo/files/miredo.init | 28 - .../miredo/ipkg/miredo-server.conffiles | 1 - .../package/miredo/ipkg/miredo-server.control | 5 - openwrt/package/miredo/ipkg/miredo.conffiles | 1 - openwrt/package/miredo/ipkg/miredo.control | 5 - openwrt/package/monit/Config.in | 35 - openwrt/package/monit/Makefile | 105 - openwrt/package/monit/files/monit.init | 25 - .../package/monit/ipkg/monit-nossl.conffiles | 1 - .../package/monit/ipkg/monit-nossl.control | 5 - openwrt/package/monit/ipkg/monit.conffiles | 1 - openwrt/package/monit/ipkg/monit.control | 5 - openwrt/package/motion/Config.in | 9 - openwrt/package/motion/Makefile | 70 - openwrt/package/motion/ipkg/motion.control | 5 - .../package/motion/patches/01-ffmpeg.patch | 38 - .../motion/patches/02-honor_cppflags.patch | 20 - openwrt/package/mpd/Config.in | 42 - openwrt/package/mpd/Makefile | 113 - openwrt/package/mpd/ipkg/mpd.conffiles | 1 - openwrt/package/mpd/ipkg/mpd.control | 4 - openwrt/package/mrd6/Config.in | 14 - openwrt/package/mrd6/Makefile | 45 - openwrt/package/mrd6/files/mrd6.conf | 14 - openwrt/package/mrd6/files/mrd6.init | 29 - openwrt/package/mrd6/ipkg/mrd6.control | 6 - .../mrd6/patches/01-ceilf_replacement.patch | 21 - openwrt/package/mt-daapd/Config.in | 31 - openwrt/package/mt-daapd/Makefile | 81 - openwrt/package/mt-daapd/files/mt-daapd.init | 22 - .../package/mt-daapd/ipkg/mt-daapd.conffiles | 2 - .../package/mt-daapd/ipkg/mt-daapd.control | 5 - openwrt/package/mtr/Config.in | 18 - openwrt/package/mtr/Makefile | 77 - openwrt/package/mtr/ipkg/mtr.control | 15 - openwrt/package/mtr/patches/501-dns.patch | 511 - openwrt/package/mutt/Config.in | 11 - openwrt/package/mutt/Makefile | 63 - openwrt/package/mutt/ipkg/mutt.control | 5 - openwrt/package/mysql/Config.in | 15 - openwrt/package/mysql/Makefile | 133 - .../package/mysql/ipkg/libmysqlclient.control | 5 - .../mysql/patches/500-cross_compile.patch | 3301 -- openwrt/package/nano/Config.in | 10 - openwrt/package/nano/Makefile | 76 - openwrt/package/nano/ipkg/nano.control | 5 - openwrt/package/ncurses/Config.in | 14 - openwrt/package/ncurses/Makefile | 156 - .../package/ncurses/ipkg/libncurses.control | 4 - .../package/ncurses/patches/500-cross.patch | 24 - .../ncurses/patches/501-cross-no_libdir.patch | 65 - openwrt/package/ndisc/Config.in | 41 - openwrt/package/ndisc/Makefile | 48 - openwrt/package/ndisc/ipkg/ndisc6.control | 4 - openwrt/package/ndisc/ipkg/rdisc6.control | 4 - .../package/ndisc/ipkg/tcptraceroute6.control | 4 - .../package/ndisc/patches/100-license.patch | 22 - openwrt/package/net-snmp/Config.in | 75 - openwrt/package/net-snmp/Makefile | 205 - openwrt/package/net-snmp/files/snmpd.conf | 14 - openwrt/package/net-snmp/files/snmpd.default | 1 - openwrt/package/net-snmp/files/snmpd.init | 25 - .../package/net-snmp/ipkg/libnetsnmp.control | 4 - .../package/net-snmp/ipkg/snmp-utils.control | 5 - .../net-snmp/ipkg/snmpd-static.conffiles | 2 - .../net-snmp/ipkg/snmpd-static.control | 5 - openwrt/package/net-snmp/ipkg/snmpd.conffiles | 2 - openwrt/package/net-snmp/ipkg/snmpd.control | 5 - .../patches/500-debian-subset-5.1.2-6.1.patch | 7282 ----- .../net-snmp/patches/750-ieee802dot11.patch | 6156 ---- .../patches/901-ipsec-interfaces.patch | 44 - openwrt/package/netperf/Config.in | 6 - openwrt/package/netperf/Makefile | 40 - openwrt/package/netperf/files/netserver.init | 3 - openwrt/package/netperf/ipkg/netperf.control | 9 - .../patches/01-netperf-2.3pl1-openwrt.patch | 39 - openwrt/package/netstat-nat/Config.in | 13 - openwrt/package/netstat-nat/Makefile | 67 - .../netstat-nat/ipkg/netstat-nat.control | 7 - openwrt/package/nfs-server/Config.in | 8 - openwrt/package/nfs-server/Makefile | 62 - openwrt/package/nfs-server/files/nfsd.exports | 1 - openwrt/package/nfs-server/files/nfsd.init | 4 - .../nfs-server/ipkg/nfs-server.control | 14 - .../nfs-server/patches/build-config.patch | 67 - .../patches/cross-compile-fix.patch | 149 - .../nfs-server/patches/debian-subset.patch | 698 - .../nfs-server/patches/gcc-3.4-fix.patch | 24 - .../nfs-server/patches/remove-warning.patch | 30 - openwrt/package/nmap/Config.in | 13 - openwrt/package/nmap/Makefile | 80 - openwrt/package/nmap/ipkg/nmap.control | 5 - .../package/nmap/patches/cross-compile.patch | 44 - openwrt/package/nmap/patches/no_strip.patch | 12 - openwrt/package/nocatsplash/Config.in | 12 - openwrt/package/nocatsplash/Makefile | 64 - .../nocatsplash/ipkg/nocatsplash.conffiles | 1 - .../nocatsplash/ipkg/nocatsplash.control | 10 - .../patches/openwrt-firewall.patch | 19 - openwrt/package/ntpclient/Config.in | 9 - openwrt/package/ntpclient/Makefile | 35 - .../package/ntpclient/files/ntpclient.init | 10 - .../package/ntpclient/ipkg/ntpclient.control | 4 - openwrt/package/olsrd/Config.in | 54 - openwrt/package/olsrd/Makefile | 76 - openwrt/package/olsrd/files/olsrd.init | 15 - openwrt/package/olsrd/files/olsrd_secure_key | 1 - .../olsrd/ipkg/olsrd-mod-dot-draw.control | 5 - .../olsrd/ipkg/olsrd-mod-dyn-gw.control | 5 - .../olsrd/ipkg/olsrd-mod-httpinfo.control | 5 - .../olsrd/ipkg/olsrd-mod-nameservice.control | 5 - .../olsrd/ipkg/olsrd-mod-power.control | 5 - .../olsrd/ipkg/olsrd-mod-secure.conffiles | 1 - .../olsrd/ipkg/olsrd-mod-secure.control | 5 - .../package/olsrd/ipkg/olsrd-mod-tas.control | 5 - openwrt/package/olsrd/ipkg/olsrd.conffiles | 1 - openwrt/package/olsrd/ipkg/olsrd.control | 8 - .../olsrd/patches/olsrd-0.4.10-opt-flags.diff | 12 - .../patches/olsrd-0.4.9-secure-key-path.path | 12 - openwrt/package/opencdk/Config.in | 21 - openwrt/package/opencdk/Makefile | 99 - .../package/opencdk/ipkg/libopencdk.control | 5 - .../opencdk/patches/500-cross-compile.patch | 28 - openwrt/package/openh323/Config.in | 6 - openwrt/package/openh323/Makefile | 56 - .../package/openh323/ipkg/openh323.control | 7 - .../openh323/patches/001-configure.patch | 122 - openwrt/package/openldap/Config.in | 33 - openwrt/package/openldap/Makefile | 140 - .../openldap/ipkg/libopenldap.conffiles | 1 - .../package/openldap/ipkg/libopenldap.control | 5 - .../openldap/ipkg/openldap-utils.control | 5 - .../openldap/patches/500-cross-compile.patch | 12 - .../openldap/patches/750-no-strip.patch | 36 - openwrt/package/openntpd/Config.in | 9 - openwrt/package/openntpd/Makefile | 67 - openwrt/package/openntpd/files/ntpd.conf | 3 - openwrt/package/openntpd/files/ntpd.init | 3 - .../package/openntpd/ipkg/openntpd.conffiles | 1 - .../package/openntpd/ipkg/openntpd.control | 7 - .../package/openntpd/ipkg/openntpd.postinst | 35 - .../openntpd/patches/01-adjtimex_linux.patch | 177 - openwrt/package/openser/Config.in | 239 - openwrt/package/openser/Makefile | 127 - .../openser/ipkg/openser-mod-acc.control | 5 - .../openser/ipkg/openser-mod-auth-db.control | 5 - .../ipkg/openser-mod-auth-radius.control | 5 - .../openser/ipkg/openser-mod-auth.control | 5 - .../ipkg/openser-mod-avp-radius.control | 5 - .../ipkg/openser-mod-avp_radius.control | 5 - .../openser/ipkg/openser-mod-avpops.control | 5 - .../ipkg/openser-mod-dispatcher.control | 5 - .../ipkg/openser-mod-diversion.control | 5 - .../ipkg/openser-mod-flatstore.control | 5 - .../openser/ipkg/openser-mod-gflags.control | 5 - .../ipkg/openser-mod-group-radius.control | 5 - .../openser/ipkg/openser-mod-group.control | 5 - .../ipkg/openser-mod-group_radius.control | 5 - .../openser/ipkg/openser-mod-lcr.control | 5 - .../ipkg/openser-mod-mediaproxy.control | 5 - .../openser/ipkg/openser-mod-msilo.control | 5 - .../openser/ipkg/openser-mod-mysql.control | 5 - .../ipkg/openser-mod-nathelper.control | 5 - .../openser/ipkg/openser-mod-options.control | 5 - .../openser/ipkg/openser-mod-pdt.control | 5 - .../ipkg/openser-mod-permissions.control | 5 - .../openser/ipkg/openser-mod-pike.control | 5 - .../openser/ipkg/openser-mod-sms.control | 5 - .../ipkg/openser-mod-speeddial.control | 5 - .../ipkg/openser-mod-uac-redirect.control | 5 - .../openser/ipkg/openser-mod-uac.control | 5 - .../ipkg/openser-mod-uac_redirect.control | 5 - .../openser/ipkg/openser-mod-uri-db.control | 5 - .../ipkg/openser-mod-uri-radius.control | 5 - .../openser/ipkg/openser-mod-uri.control | 5 - .../openser/ipkg/openser-mod-uri_db.control | 5 - .../ipkg/openser-mod-uri_radius.control | 5 - .../openser/ipkg/openser-mod-xlog.control | 5 - .../package/openser/ipkg/openser.conffiles | 1 - openwrt/package/openser/ipkg/openser.control | 4 - .../openser/patches/Makefile.defs.patch | 71 - openwrt/package/openser/patches/cfg.lex.patch | 13 - .../package/openser/patches/config.h.patch | 33 - .../openser/patches/modules-build.patch | 57 - .../package/openser/patches/openser.cfg.patch | 33 - .../package/openser/patches/sc.dbtext.patch | 22 - openwrt/package/openser/patches/sc.patch | 41 - openwrt/package/openssh/Config.in | 117 - openwrt/package/openssh/Makefile | 126 - openwrt/package/openssh/files/S50sshd | 15 - .../openssh/ipkg/openssh-client-utils.control | 5 - .../openssh/ipkg/openssh-client.conffiles | 1 - .../openssh/ipkg/openssh-client.control | 5 - .../openssh/ipkg/openssh-server.conffiles | 1 - .../openssh/ipkg/openssh-server.control | 5 - .../openssh/ipkg/openssh-server.postinst | 32 - .../openssh/ipkg/openssh-sftp-client.control | 5 - .../openssh/ipkg/openssh-sftp-server.control | 5 - .../openssh/patches/100-openssl-cipher.patch | 11 - .../openssh/patches/cross-compile.patch | 103 - openwrt/package/openssl/Config.in | 35 - openwrt/package/openssl/Makefile | 99 - .../package/openssl/ipkg/libopenssl.control | 4 - .../openssl/ipkg/openssl-util.conffiles | 1 - .../package/openssl/ipkg/openssl-util.control | 5 - .../patches/110-optimize-for-size.patch | 12 - .../openssl/patches/120-makedepend.patch | 28 - .../openssl/patches/130-perl-path.patch | 72 - .../openssl/patches/140-makefile-dirs.patch | 11 - .../openssl/patches/150-no_engines.patch | 83 - .../patches/160-disable_doc_tests.patch | 153 - openwrt/package/openswan/Config.in | 12 - openwrt/package/openswan/Makefile | 57 - .../package/openswan/ipkg/openswan.conffiles | 1 - .../package/openswan/ipkg/openswan.control | 5 - .../openswan/patches/pluto-includes.patch | 12 - .../package/openswan/patches/scripts.patch | 612 - .../openswan/patches/use-dev-urandom.patch | 36 - openwrt/package/openvpn/Config.in | 53 - openwrt/package/openvpn/Makefile | 104 - openwrt/package/openvpn/ipkg/openvpn.control | 4 - openwrt/package/osiris/Config.in | 18 - openwrt/package/osiris/Makefile | 73 - openwrt/package/osiris/files/osirisd.init | 23 - openwrt/package/osiris/ipkg/osirisd.control | 5 - .../osiris/patches/01-configure-cross.patch | 22 - .../osiris/patches/02-osirisd-pidfile.patch | 68 - .../osiris/patches/03-openssl-0.9.8+.patch | 16 - openwrt/package/osiris/patches/mod_if.patch | 392 - .../package/osiris/patches/mod_nvram.patch | 213 - .../package/osiris/patches/mod_uptime.patch | 243 - openwrt/package/p910nd/Config.in | 15 - openwrt/package/p910nd/Makefile | 42 - openwrt/package/p910nd/files/p910nd.default | 9 - openwrt/package/p910nd/files/p910nd.init | 47 - openwrt/package/p910nd/ipkg/p910nd.conffiles | 1 - openwrt/package/p910nd/ipkg/p910nd.control | 4 - .../package/p910nd/patches/100-Makefile.patch | 15 - .../p910nd/patches/200-p910nd-0.7.patch | 309 - openwrt/package/palantir/Config.in | 12 - openwrt/package/palantir/Makefile | 46 - .../package/palantir/ipkg/palantir.conffiles | 1 - .../package/palantir/ipkg/palantir.control | 5 - openwrt/package/parprouted/Config.in | 13 - openwrt/package/parprouted/Makefile | 42 - .../parprouted/files/parprouted.default | 1 - .../package/parprouted/files/parprouted.init | 16 - .../parprouted/ipkg/parprouted.conffiles | 1 - .../parprouted/ipkg/parprouted.control | 5 - .../parprouted/patches/parprouted.patch | 33 - openwrt/package/pciutils/Config.in | 7 - openwrt/package/pciutils/Makefile | 36 - .../package/pciutils/ipkg/pciutils.control | 4 - openwrt/package/pcre/Config.in | 15 - openwrt/package/pcre/Makefile | 92 - openwrt/package/pcre/ipkg/libpcre.control | 4 - .../patches/100-honor_cppflags_ldflags.patch | 24 - .../pcre/patches/750-pcre_config_cross.patch | 27 - openwrt/package/peercast/Config.in | 14 - openwrt/package/peercast/Makefile | 76 - openwrt/package/peercast/files/peercast.ini | 81 - openwrt/package/peercast/files/peercast.init | 18 - .../package/peercast/ipkg/peercast.conffiles | 1 - .../package/peercast/ipkg/peercast.control | 6 - openwrt/package/peerguardian/Config.in | 10 - openwrt/package/peerguardian/Makefile | 54 - .../peerguardian/files/peerguardian.init | 21 - .../peerguardian/ipkg/peerguardian.control | 6 - .../patches/01-honor-libipq.patch | 16 - openwrt/package/php4/Config.in | 140 - openwrt/package/php4/Makefile | 287 - openwrt/package/php4/files/php.ini | 561 - openwrt/package/php4/files/php.init | 19 - openwrt/package/php4/ipkg/php4-cgi.conffiles | 1 - openwrt/package/php4/ipkg/php4-cgi.control | 6 - openwrt/package/php4/ipkg/php4-cli.conffiles | 1 - openwrt/package/php4/ipkg/php4-cli.control | 6 - .../package/php4/ipkg/php4-fastcgi.conffiles | 2 - .../package/php4/ipkg/php4-fastcgi.control | 6 - .../package/php4/ipkg/php4-mod-curl.control | 5 - .../package/php4/ipkg/php4-mod-ftp.control | 5 - openwrt/package/php4/ipkg/php4-mod-gd.control | 5 - .../package/php4/ipkg/php4-mod-gmp.control | 5 - .../package/php4/ipkg/php4-mod-ldap.control | 5 - .../package/php4/ipkg/php4-mod-mysql.control | 5 - .../php4/ipkg/php4-mod-openssl.control | 5 - .../package/php4/ipkg/php4-mod-pcre.control | 5 - .../package/php4/ipkg/php4-mod-pgsql.control | 5 - .../php4/ipkg/php4-mod-session.control | 5 - .../php4/ipkg/php4-mod-sockets.control | 5 - .../package/php4/ipkg/php4-mod-sqlite.control | 5 - .../package/php4/ipkg/php4-mod-xml.control | 5 - .../php4/patches/php-4.3.11-sqlite-1.0.patch | 17705 ---------- .../package/php4/patches/php4_configure.patch | 83 - .../php4/patches/php4_dns_skipname.patch | 23 - openwrt/package/php5/Config.in | 140 - openwrt/package/php5/Makefile | 291 - openwrt/package/php5/files/php.ini | 561 - openwrt/package/php5/files/php.init | 19 - openwrt/package/php5/ipkg/php5-cgi.conffiles | 1 - openwrt/package/php5/ipkg/php5-cgi.control | 6 - openwrt/package/php5/ipkg/php5-cli.conffiles | 1 - openwrt/package/php5/ipkg/php5-cli.control | 6 - .../package/php5/ipkg/php5-fastcgi.conffiles | 2 - .../package/php5/ipkg/php5-fastcgi.control | 6 - .../package/php5/ipkg/php5-mod-curl.control | 5 - .../package/php5/ipkg/php5-mod-ftp.control | 5 - openwrt/package/php5/ipkg/php5-mod-gd.control | 5 - .../package/php5/ipkg/php5-mod-gmp.control | 5 - .../package/php5/ipkg/php5-mod-ldap.control | 5 - .../package/php5/ipkg/php5-mod-mysql.control | 5 - .../php5/ipkg/php5-mod-openssl.control | 5 - .../package/php5/ipkg/php5-mod-pcre.control | 5 - .../package/php5/ipkg/php5-mod-pgsql.control | 5 - .../php5/ipkg/php5-mod-session.control | 5 - .../php5/ipkg/php5-mod-sockets.control | 5 - .../package/php5/ipkg/php5-mod-sqlite.control | 5 - .../package/php5/ipkg/php5-mod-xml.control | 5 - .../patches/php-5.0.4-configure-cross.patch | 83 - openwrt/package/picocom/Config.in | 15 - openwrt/package/picocom/Makefile | 36 - openwrt/package/picocom/ipkg/picocom.control | 4 - openwrt/package/pipacs/Config.in | 7 - openwrt/package/pipacs/Makefile | 33 - openwrt/package/pipacs/ipkg/pipacs.control | 5 - openwrt/package/pipacs/src/Makefile | 15 - openwrt/package/pipacs/src/parser.c | 907 - openwrt/package/pipacs/src/parser.h | 60 - openwrt/package/pipacs/src/pipacs.c | 589 - openwrt/package/pmacct/Config.in | 215 - openwrt/package/pmacct/Makefile | 184 - openwrt/package/pmacct/files/nfacctd.conf | 28 - openwrt/package/pmacct/files/nfacctd.default | 1 - openwrt/package/pmacct/files/nfacctd.init | 22 - openwrt/package/pmacct/files/pmacctd.conf | 26 - openwrt/package/pmacct/files/pmacctd.default | 1 - openwrt/package/pmacct/files/pmacctd.init | 22 - .../pmacct/ipkg/nfacctd-custom.control | 6 - .../package/pmacct/ipkg/nfacctd-mysql.control | 6 - .../package/pmacct/ipkg/nfacctd-pgsql.control | 6 - .../pmacct/ipkg/nfacctd-sqlite.control | 6 - openwrt/package/pmacct/ipkg/nfacctd.conffiles | 2 - openwrt/package/pmacct/ipkg/nfacctd.control | 6 - .../package/pmacct/ipkg/pmacct-client.control | 5 - .../pmacct/ipkg/pmacctd-custom.control | 6 - .../package/pmacct/ipkg/pmacctd-mysql.control | 6 - .../package/pmacct/ipkg/pmacctd-pgsql.control | 6 - .../pmacct/ipkg/pmacctd-sqlite.control | 6 - openwrt/package/pmacct/ipkg/pmacctd.conffiles | 2 - openwrt/package/pmacct/ipkg/pmacctd.control | 6 - openwrt/package/popt/Config.in | 14 - openwrt/package/popt/Makefile | 81 - openwrt/package/popt/ipkg/libpopt.control | 4 - openwrt/package/portmap/Config.in | 7 - openwrt/package/portmap/Makefile | 40 - openwrt/package/portmap/files/portmap.init | 16 - openwrt/package/portmap/ipkg/portmap.control | 9 - .../portmap/patches/debian-subset.patch | 531 - openwrt/package/portsentry/Config.in | 9 - openwrt/package/portsentry/Makefile | 37 - .../portsentry/ipkg/portsentry.conffiles | 1 - .../portsentry/ipkg/portsentry.control | 4 - .../patches/100-conf_location.patch | 11 - .../portsentry/patches/101-postsentry_c.patch | 12 - openwrt/package/postgresql/Config.in | 61 - openwrt/package/postgresql/Makefile | 127 - openwrt/package/postgresql/ipkg/libpq.control | 4 - .../package/postgresql/ipkg/pgsql-cli.control | 5 - .../patches/100-debian-12asmconstraints | 21 - .../patches/101-debian-27dbf2pg-textfield | 14 - .../postgresql/patches/102-debian-30libpq | 33 - .../750-configure-honor-cppflags.patch | 10 - openwrt/package/pptpd/Config.in | 11 - openwrt/package/pptpd/Makefile | 69 - openwrt/package/pptpd/files/options.pptpd | 23 - openwrt/package/pptpd/files/pptpd.conf | 5 - openwrt/package/pptpd/files/pptpd.init | 25 - openwrt/package/pptpd/ipkg/pptpd.conffiles | 2 - openwrt/package/pptpd/ipkg/pptpd.control | 5 - openwrt/package/privoxy/Config.in | 14 - openwrt/package/privoxy/Makefile | 64 - openwrt/package/privoxy/ipkg/privoxy.control | 5 - .../privoxy/patches/100-crosscompile.patch | 13 - .../package/privoxy/patches/101-destdir.patch | 32 - openwrt/package/procmail/Config.in | 11 - openwrt/package/procmail/Makefile | 31 - .../package/procmail/ipkg/procmail.control | 4 - .../procmail/patches/promail_openwrt.patch | 51 - openwrt/package/psybnc/Config.in | 13 - openwrt/package/psybnc/Makefile | 44 - openwrt/package/psybnc/ipkg/psybnc.control | 4 - openwrt/package/psybnc/patches/Makefile.patch | 59 - .../package/psybnc/patches/psybnc.conf.patch | 14 - openwrt/package/psybnc/patches/psybnc.patch | 105 - .../package/psybnc/patches/startscript.patch | 16 - openwrt/package/ptunnel/Config.in | 14 - openwrt/package/ptunnel/Makefile | 69 - openwrt/package/ptunnel/ipkg/ptunnel.control | 5 - openwrt/package/pwlib/Config.in | 7 - openwrt/package/pwlib/Makefile | 59 - openwrt/package/pwlib/ipkg/pwlib.control | 11 - .../package/pwlib/patches/002-lib_mak.patch | 11 - openwrt/package/quagga/Config.in | 66 - openwrt/package/quagga/Makefile | 125 - openwrt/package/quagga/files/quagga.init | 333 - .../package/quagga/ipkg/quagga-bgpd.control | 6 - .../package/quagga/ipkg/quagga-ospf6d.control | 6 - .../package/quagga/ipkg/quagga-ospfd.control | 6 - .../package/quagga/ipkg/quagga-ripd.control | 6 - .../package/quagga/ipkg/quagga-ripngd.control | 6 - .../package/quagga/ipkg/quagga-vtysh.control | 6 - openwrt/package/quagga/ipkg/quagga.control | 6 - openwrt/package/quagga/ipkg/quagga.postinst | 48 - .../package/quagga/patches/quagga-cross.patch | 84 - .../quagga/patches/quagga-readline.patch | 58 - openwrt/package/raddump/Config.in | 11 - openwrt/package/raddump/Makefile | 55 - openwrt/package/raddump/ipkg/raddump.control | 6 - openwrt/package/radiusclient-ng/Config.in | 27 - openwrt/package/radiusclient-ng/Makefile | 80 - .../ipkg/libradiusclient-ng.control | 4 - .../ipkg/radiusclient-ng.control | 5 - .../patches/01-cross_compile.patch | 29 - openwrt/package/radvd/Config.in | 10 - openwrt/package/radvd/Makefile | 70 - openwrt/package/radvd/files/radvd.conf | 22 - openwrt/package/radvd/files/radvd.init | 24 - openwrt/package/radvd/ipkg/radvd.conffiles | 1 - openwrt/package/radvd/ipkg/radvd.control | 5 - openwrt/package/radvd/patches/no-libfl.patch | 12 - openwrt/package/rarpd/Config.in | 14 - openwrt/package/rarpd/Makefile | 79 - openwrt/package/rarpd/files/rarpd.default | 4 - openwrt/package/rarpd/files/rarpd.init | 7 - openwrt/package/rarpd/ipkg/rarpd.conffiles | 1 - openwrt/package/rarpd/ipkg/rarpd.control | 5 - openwrt/package/readline/Config.in | 20 - openwrt/package/readline/Makefile | 82 - .../package/readline/ipkg/libreadline.control | 4 - openwrt/package/reaim/Config.in | 9 - openwrt/package/reaim/Makefile | 42 - openwrt/package/reaim/files/reaim.init | 62 - openwrt/package/reaim/ipkg/reaim.control | 5 - .../patches/501-cross_compile-install.patch | 16 - openwrt/package/rp-pppoe/Config.in | 50 - openwrt/package/rp-pppoe/Makefile | 101 - .../package/rp-pppoe/files/pppoe-client.init | 12 - .../rp-pppoe/files/pppoe-relay.default | 1 - .../package/rp-pppoe/files/pppoe-relay.init | 15 - .../rp-pppoe/files/pppoe-server.default | 1 - .../package/rp-pppoe/files/pppoe-server.init | 15 - .../rp-pppoe/ipkg/pppoe-client.conffiles | 1 - .../rp-pppoe/ipkg/pppoe-client.control | 5 - .../rp-pppoe/ipkg/pppoe-relay.conffiles | 1 - .../package/rp-pppoe/ipkg/pppoe-relay.control | 4 - .../rp-pppoe/ipkg/pppoe-server.conffiles | 2 - .../rp-pppoe/ipkg/pppoe-server.control | 5 - .../package/rp-pppoe/ipkg/pppoe-sniff.control | 4 - openwrt/package/rp-pppoe/ipkg/rules | 170 - openwrt/package/rp-pppoe/ipkg/version | 1 - .../patches/rp-pppoe-3.5-Makefile.patch | 217 - .../patches/rp-pppoe-3.5-configure.patch | 241 - .../patches/rp-pppoe-3.5-scripts-fixes.patch | 227 - openwrt/package/rrdcollect/Config.in | 33 - openwrt/package/rrdcollect/Makefile | 92 - openwrt/package/rrdcollect/files/rrd.conf | 381 - openwrt/package/rrdcollect/files/rrd.sh | 288 - .../package/rrdcollect/files/rrdcollect.conf | 33 - .../package/rrdcollect/files/rrdcollect.init | 31 - .../ipkg/rrdcollect-example.conffiles | 2 - .../ipkg/rrdcollect-example.control | 10 - .../rrdcollect/ipkg/rrdcollect.control | 10 - .../rrdcollect/patches/rrdcollect-scan.patch | 66 - openwrt/package/rrdtool/Config.in | 67 - openwrt/package/rrdtool/Makefile | 111 - openwrt/package/rrdtool/ipkg/librrd.control | 14 - openwrt/package/rrdtool/ipkg/rrdcgi.control | 15 - openwrt/package/rrdtool/ipkg/rrdtool.control | 14 - openwrt/package/rrdtool1/Config.in | 75 - openwrt/package/rrdtool1/Makefile | 105 - openwrt/package/rrdtool1/ipkg/librrd1.control | 18 - openwrt/package/rrdtool1/ipkg/rrdcgi1.control | 19 - .../package/rrdtool1/ipkg/rrdtool1.control | 18 - openwrt/package/rrs/Config.in | 31 - openwrt/package/rrs/Makefile | 60 - openwrt/package/rrs/ipkg/rrs-nossl.control | 6 - openwrt/package/rrs/ipkg/rrs.control | 6 - .../package/rrs/patches/rrs-1.70-shell.patch | 12 - openwrt/package/rsync/Config.in | 10 - openwrt/package/rsync/Makefile | 63 - openwrt/package/rsync/ipkg/rsync.control | 5 - openwrt/package/sablevm-classpath/Config.in | 59 - openwrt/package/sablevm-classpath/Makefile | 89 - .../sablevm-classpath/files/mini.classlist | 180 - .../ipkg/libsablevm-classpath.control | 5 - .../ipkg/sablevm-classpath-full.control | 5 - .../ipkg/sablevm-classpath-mini.control | 5 - openwrt/package/sablevm/Config.in | 17 - openwrt/package/sablevm/Makefile | 68 - openwrt/package/sablevm/ipkg/sablevm.control | 5 - openwrt/package/samba/Config.in | 40 - openwrt/package/samba/Makefile | 177 - openwrt/package/samba/files/samba.init | 24 - openwrt/package/samba/files/smb.conf | 18 - .../package/samba/ipkg/samba-client.control | 5 - openwrt/package/samba/ipkg/samba.conffiles | 1 - openwrt/package/samba/ipkg/samba.control | 5 - openwrt/package/samba/patches/100-samba.patch | 489 - .../package/samba/patches/200-security.patch | 606 - .../package/samba/patches/250-writex.patch | 152 - .../patches/300-shared_lib_ldflags_fix.patch | 25 - .../samba/patches/301-config_files_path.patch | 25 - openwrt/package/sane-backends/Config.in | 8 - openwrt/package/sane-backends/Makefile | 70 - .../ipkg/sane-backends.conffiles | 1 - .../sane-backends/ipkg/sane-backends.control | 4 - .../patches/001-remove-unneeded.patch | 12 - openwrt/package/scanlogd/Config.in | 14 - openwrt/package/scanlogd/Makefile | 45 - openwrt/package/scanlogd/files/scanlogd.init | 3 - .../package/scanlogd/ipkg/scanlogd.control | 9 - .../package/scanlogd/ipkg/scanlogd.postinst | 33 - openwrt/package/scdp/Config.in | 12 - openwrt/package/scdp/Makefile | 65 - openwrt/package/scdp/ipkg/scdp.control | 5 - openwrt/package/screen/Config.in | 10 - openwrt/package/screen/Makefile | 61 - openwrt/package/screen/ipkg/screen.control | 5 - .../patches/100-cross_compile_fix.patch | 509 - openwrt/package/ser2net/Config.in | 10 - openwrt/package/ser2net/Makefile | 49 - .../package/ser2net/ipkg/ser2net.conffiles | 1 - openwrt/package/ser2net/ipkg/ser2net.control | 5 - openwrt/package/serdisplib/Config.in | 10 - openwrt/package/serdisplib/Makefile | 82 - .../serdisplib/ipkg/serdisplib.control | 4 - .../package/serdisplib/patches/100-io.patch | 19 - .../serdisplib/patches/101-test_shared.patch | 14 - openwrt/package/setpwc/Config.in | 9 - openwrt/package/setpwc/Makefile | 32 - openwrt/package/setpwc/ipkg/setpwc.control | 4 - openwrt/package/setserial/Config.in | 13 - openwrt/package/setserial/Makefile | 64 - openwrt/package/setserial/files/serial.init | 2 - .../package/setserial/ipkg/setserial.control | 4 - openwrt/package/shat/Config.in | 10 - openwrt/package/shat/Makefile | 35 - openwrt/package/shat/ipkg/shat.control | 4 - openwrt/package/shfs/Config.in | 32 - openwrt/package/shfs/Makefile | 42 - openwrt/package/shfs/ipkg/shfs-utils.control | 5 - .../package/shfs/patches/101-kmod-build.patch | 103 - .../shfs/patches/102-utils-build-fixes.patch | 40 - openwrt/package/sipp/Config.in | 13 - openwrt/package/sipp/Makefile | 45 - openwrt/package/sipp/ipkg/sipp.control | 5 - openwrt/package/siproxd/Config.in | 12 - openwrt/package/siproxd/Makefile | 68 - openwrt/package/siproxd/files/siproxd.init | 21 - .../package/siproxd/ipkg/siproxd.conffiles | 2 - openwrt/package/siproxd/ipkg/siproxd.control | 5 - openwrt/package/sipsak/Config.in | 12 - openwrt/package/sipsak/Makefile | 66 - openwrt/package/sipsak/ipkg/sipsak.control | 5 - openwrt/package/slurm/Config.in | 15 - openwrt/package/slurm/Makefile | 73 - openwrt/package/slurm/ipkg/slurm.control | 6 - .../slurm/patches/no_host_ncurses.patch | 67 - openwrt/package/snort-wireless/Config.in | 89 - openwrt/package/snort-wireless/Makefile | 155 - .../files/snort-wireless.default | 2 - .../snort-wireless/files/snort-wireless.init | 23 - .../ipkg/snort-wireless-custom.control | 6 - .../ipkg/snort-wireless-mysql.control | 6 - .../ipkg/snort-wireless-pgsql.control | 6 - .../ipkg/snort-wireless.conffiles | 3 - .../ipkg/snort-wireless.control | 6 - .../patches/500-no-config-search.patch | 35 - .../patches/750-lightweight-config.patch | 178 - openwrt/package/snort/Config.in | 88 - openwrt/package/snort/Makefile | 155 - openwrt/package/snort/files/snort.default | 2 - openwrt/package/snort/files/snort.init | 23 - .../package/snort/ipkg/snort-custom.control | 6 - .../package/snort/ipkg/snort-mysql.control | 6 - .../package/snort/ipkg/snort-pgsql.control | 6 - openwrt/package/snort/ipkg/snort.conffiles | 3 - openwrt/package/snort/ipkg/snort.control | 6 - .../snort/patches/500-no-config-search.patch | 35 - .../patches/750-lightweight-config.patch | 178 - openwrt/package/socat/Config.in | 18 - openwrt/package/socat/Makefile | 66 - openwrt/package/socat/ipkg/socat.control | 11 - .../socat/patches/501-honor_ldflags.patch | 13 - openwrt/package/speex/Config.in | 23 - openwrt/package/speex/Makefile | 86 - openwrt/package/speex/ipkg/libspeex.control | 4 - openwrt/package/sqlite/Config.in | 75 - openwrt/package/sqlite/Makefile | 102 - openwrt/package/sqlite/ipkg/libsqlite.control | 4 - .../package/sqlite/ipkg/sqlite-cli.control | 5 - openwrt/package/sqlite2/Config.in | 74 - openwrt/package/sqlite2/Makefile | 101 - .../package/sqlite2/ipkg/libsqlite2.control | 4 - .../package/sqlite2/ipkg/sqlite2-cli.control | 5 - openwrt/package/srelay/Config.in | 9 - openwrt/package/srelay/Makefile | 67 - openwrt/package/srelay/files/srelay.conf | 2 - openwrt/package/srelay/files/srelay.init | 5 - openwrt/package/srelay/ipkg/srelay.conffiles | 1 - openwrt/package/srelay/ipkg/srelay.control | 4 - .../srelay/patches/01-cross_compile.patch | 12 - openwrt/package/ssltunnel/Config.in | 11 - openwrt/package/ssltunnel/Makefile | 70 - .../package/ssltunnel/ipkg/ssltunnel.control | 5 - openwrt/package/ssmtp/Config.in | 13 - openwrt/package/ssmtp/Makefile | 66 - openwrt/package/ssmtp/ipkg/ssmtp.conffiles | 2 - openwrt/package/ssmtp/ipkg/ssmtp.control | 4 - .../patches/500-debian-subset-2.61-2.patch | 248 - .../patches/901-strftime_space_padding.patch | 12 - openwrt/package/strace/Config.in | 11 - openwrt/package/strace/Makefile | 62 - openwrt/package/strace/ipkg/strace.control | 4 - openwrt/package/syslog-ng/Config.in | 31 - openwrt/package/syslog-ng/Makefile | 73 - .../package/syslog-ng/files/syslog-ng.conf | 16 - .../package/syslog-ng/files/syslog-ng.init | 34 - .../syslog-ng/ipkg/syslog-ng.conffiles | 1 - .../package/syslog-ng/ipkg/syslog-ng.control | 4 - .../package/syslog-ng/patches/01-no_lfl.patch | 50 - openwrt/package/tcp_wrappers/Config.in | 15 - openwrt/package/tcp_wrappers/Makefile | 64 - .../tcp_wrappers/patches/debian-subset.patch | 936 - .../tcp_wrappers/patches/opt_cflags.patch | 12 - openwrt/package/tcpdump/Config.in | 10 - openwrt/package/tcpdump/Makefile | 73 - openwrt/package/tcpdump/ipkg/tcpdump.control | 5 - .../tcpdump/patches/remove-pcap-debug.patch | 24 - openwrt/package/tinc/Config.in | 13 - openwrt/package/tinc/Makefile | 69 - openwrt/package/tinc/ipkg/tinc.control | 5 - openwrt/package/tinyproxy/Config.in | 30 - openwrt/package/tinyproxy/Makefile | 83 - .../package/tinyproxy/files/tinyproxy.init | 50 - .../package/tinyproxy/ipkg/tinyproxy.control | 5 - openwrt/package/tmsnc/Config.in | 7 - openwrt/package/tmsnc/Makefile | 60 - openwrt/package/tmsnc/ipkg/tmsnc.control | 9 - openwrt/package/tor/Config.in | 18 - openwrt/package/tor/Makefile | 76 - openwrt/package/tor/files/tor.init | 24 - openwrt/package/tor/files/torrc | 136 - openwrt/package/tor/ipkg/tor.conffiles | 1 - openwrt/package/tor/ipkg/tor.control | 5 - openwrt/package/tor/ipkg/tor.postinst | 33 - openwrt/package/ttcp/Config.in | 7 - openwrt/package/ttcp/Makefile | 30 - openwrt/package/ttcp/ipkg/ttcp.control | 4 - openwrt/package/ttcp/ttcp.c | 2374 -- openwrt/package/uclibc++/Config.in | 7 - openwrt/package/uclibc++/Makefile | 62 - openwrt/package/uclibc++/files/config.i386 | 76 - openwrt/package/uclibc++/files/config.mips | 69 - .../package/uclibc++/ipkg/uclibc++.control | 4 - .../uclibc++/patches/cross-compile.patch | 14 - openwrt/package/udp-broadcast-relay/Config.in | 12 - openwrt/package/udp-broadcast-relay/Makefile | 35 - .../ipkg/udp-broadcast-relay.control | 4 - openwrt/package/ulogd/Config.in | 33 - openwrt/package/ulogd/Makefile | 106 - openwrt/package/ulogd/files/ulogd.default | 1 - openwrt/package/ulogd/files/ulogd.init | 17 - .../ulogd/ipkg/ulogd-mod-extra.control | 5 - .../ulogd/ipkg/ulogd-mod-mysql.control | 5 - .../ulogd/ipkg/ulogd-mod-pgsql.control | 5 - openwrt/package/ulogd/ipkg/ulogd.conffiles | 2 - openwrt/package/ulogd/ipkg/ulogd.control | 4 - .../ulogd/patches/ulogd-1.23-gcc4.patch | 24 - .../ulogd/patches/ulogd-1.23-inc-patch.patch | 24 - .../ulogd/patches/ulogd-1.23-no-rej.patch | 20 - openwrt/package/updatedd/Config.in | 73 - openwrt/package/updatedd/Makefile | 80 - openwrt/package/updatedd/files/S55ddns | 10 - .../ipkg/updatedd-mod-changeip.control | 4 - .../updatedd/ipkg/updatedd-mod-dyndns.control | 4 - .../ipkg/updatedd-mod-eurodyndns.control | 4 - .../updatedd/ipkg/updatedd-mod-hn.control | 4 - .../updatedd/ipkg/updatedd-mod-noip.control | 4 - .../updatedd/ipkg/updatedd-mod-ods.control | 4 - .../updatedd/ipkg/updatedd-mod-ovh.control | 4 - .../ipkg/updatedd-mod-regfish.control | 4 - .../updatedd/ipkg/updatedd-mod-tzo.control | 4 - .../package/updatedd/ipkg/updatedd.control | 4 - openwrt/package/usbutils/Config.in | 15 - openwrt/package/usbutils/Makefile | 67 - openwrt/package/usbutils/ipkg/lsusb.control | 5 - openwrt/package/ustl/Config.in | 12 - openwrt/package/ustl/Makefile | 65 - openwrt/package/ustl/files/Common.mk | 74 - openwrt/package/ustl/files/config.h | 286 - openwrt/package/ustl/ipkg/ustl.control | 4 - .../ustl/patches/01-install-DESTDIR.patch | 56 - .../ustl/patches/02-install_path.patch | 12 - openwrt/package/util-linux/Config.in | 42 - openwrt/package/util-linux/Makefile | 66 - openwrt/package/util-linux/ipkg/fdisk.control | 5 - .../package/util-linux/ipkg/losetup.control | 5 - .../util-linux/ipkg/swap-utils.control | 5 - .../util-linux/patches/501-mconfig.patch | 68 - openwrt/package/vgp/Config.in | 12 - openwrt/package/vgp/Makefile | 50 - openwrt/package/vgp/ipkg/vgp.control | 5 - openwrt/package/vim/Config.in | 10 - openwrt/package/vim/Makefile | 65 - openwrt/package/vim/files/vimrc | 13 - openwrt/package/vim/ipkg/vim.control | 5 - .../package/vim/patches/vim_configure.patch | 248 - openwrt/package/vnc-reflector/Config.in | 14 - openwrt/package/vnc-reflector/Makefile | 35 - .../vnc-reflector/ipkg/vnc-reflector.control | 6 - .../patches/01-honor_include_lib_path.patch | 25 - openwrt/package/vncrepeater/Config.in | 17 - openwrt/package/vncrepeater/Makefile | 40 - .../vncrepeater/ipkg/vncrepeater.control | 5 - .../patches/01-uclibcxx_linking.patch | 32 - openwrt/package/vrrpd/Config.in | 13 - openwrt/package/vrrpd/Makefile | 39 - openwrt/package/vrrpd/files/vrrpd.default | 4 - openwrt/package/vrrpd/files/vrrpd.init | 21 - openwrt/package/vrrpd/ipkg/vrrpd.conffiles | 1 - openwrt/package/vrrpd/ipkg/vrrpd.control | 4 - openwrt/package/vsftpd/Config.in | 9 - openwrt/package/vsftpd/Makefile | 42 - openwrt/package/vsftpd/files/vsftpd.conf | 17 - openwrt/package/vsftpd/files/vsftpd.init | 15 - openwrt/package/vsftpd/ipkg/vsftpd.conffiles | 1 - openwrt/package/vsftpd/ipkg/vsftpd.control | 4 - openwrt/package/vsftpd/patches/chroot.patch | 11 - openwrt/package/vsftpd/patches/destdir.patch | 47 - .../package/vsftpd/patches/find-libs.patch | 14 - openwrt/package/vtun/Config.in | 12 - openwrt/package/vtun/Makefile | 63 - openwrt/package/vtun/ipkg/vtun.conffiles | 1 - openwrt/package/vtun/ipkg/vtun.control | 5 - openwrt/package/watchdog/Config.in | 7 - openwrt/package/watchdog/Makefile | 71 - openwrt/package/watchdog/files/watchdog.init | 18 - .../package/watchdog/ipkg/watchdog.conffiles | 1 - .../package/watchdog/ipkg/watchdog.control | 4 - .../patches/01-fstab-sys_siglist.patch | 11 - openwrt/package/wccpd/Config.in | 11 - openwrt/package/wccpd/Makefile | 65 - openwrt/package/wccpd/ipkg/wccpd.control | 4 - openwrt/package/weechat/Config.in | 25 - openwrt/package/weechat/Makefile | 76 - openwrt/package/weechat/ipkg/weechat.control | 4 - openwrt/package/wifidog/Config.in | 14 - openwrt/package/wifidog/Makefile | 74 - openwrt/package/wifidog/files/wifidog.conf | 177 - openwrt/package/wifidog/files/wifidog.init | 3 - .../package/wifidog/ipkg/wifidog.conffiles | 1 - openwrt/package/wifidog/ipkg/wifidog.control | 8 - openwrt/package/wiviz/Config.in | 9 - openwrt/package/wiviz/Makefile | 42 - .../wiviz/files/www/cgi-bin/wiviz/get.cgi | 15 - .../wiviz/files/www/cgi-bin/wiviz/set.cgi | 3 - .../wiviz/files/www/wiviz/adhoc-idle.gif | Bin 332 -> 0 bytes .../wiviz/files/www/wiviz/adhoc-idle.png | Bin 730 -> 0 bytes .../package/wiviz/files/www/wiviz/adhoc.gif | Bin 451 -> 0 bytes .../package/wiviz/files/www/wiviz/adhoc.png | Bin 714 -> 0 bytes .../package/wiviz/files/www/wiviz/ap-idle.gif | Bin 812 -> 0 bytes .../package/wiviz/files/www/wiviz/ap-idle.png | Bin 814 -> 0 bytes .../wiviz/files/www/wiviz/ap-wep-idle.gif | Bin 812 -> 0 bytes .../wiviz/files/www/wiviz/ap-wep-idle.png | Bin 814 -> 0 bytes .../package/wiviz/files/www/wiviz/ap-wep.gif | Bin 1455 -> 0 bytes .../package/wiviz/files/www/wiviz/ap-wep.png | Bin 1997 -> 0 bytes openwrt/package/wiviz/files/www/wiviz/ap.gif | Bin 1468 -> 0 bytes openwrt/package/wiviz/files/www/wiviz/ap.png | Bin 1825 -> 0 bytes .../wiviz/files/www/wiviz/pip-idle.gif | Bin 190 -> 0 bytes .../wiviz/files/www/wiviz/pip-idle.png | Bin 331 -> 0 bytes openwrt/package/wiviz/files/www/wiviz/pip.gif | Bin 190 -> 0 bytes openwrt/package/wiviz/files/www/wiviz/pip.png | Bin 323 -> 0 bytes .../wiviz/files/www/wiviz/station-idle.gif | Bin 754 -> 0 bytes .../wiviz/files/www/wiviz/station-idle.png | Bin 1778 -> 0 bytes .../package/wiviz/files/www/wiviz/station.gif | Bin 929 -> 0 bytes .../package/wiviz/files/www/wiviz/station.png | Bin 2476 -> 0 bytes .../package/wiviz/files/www/wiviz/wiviz.css | 76 - .../package/wiviz/files/www/wiviz/wiviz.html | 81 - .../package/wiviz/files/www/wiviz/wiviz.js | 291 - openwrt/package/wiviz/ipkg/wiviz.control | 5 - openwrt/package/wiviz/src/Makefile | 25 - openwrt/package/wiviz/src/channelhopper.c | 48 - openwrt/package/wiviz/src/channelhopper.h | 19 - openwrt/package/wiviz/src/structs.h | 169 - openwrt/package/wiviz/src/wiviz.c | 572 - openwrt/package/wiviz/src/wl_access.c | 73 - openwrt/package/wiviz/src/wl_access.h | 77 - openwrt/package/wknock/Config.in | 10 - openwrt/package/wknock/Makefile | 36 - openwrt/package/wknock/ipkg/wknock.control | 5 - openwrt/package/wol/Config.in | 10 - openwrt/package/wol/Makefile | 66 - openwrt/package/wol/ipkg/wol.control | 4 - openwrt/package/wondershaper/Config.in | 10 - openwrt/package/wondershaper/Makefile | 35 - .../wondershaper/ipkg/wondershaper.conffiles | 1 - .../wondershaper/ipkg/wondershaper.control | 5 - .../patches/wondershaper-OpenWrt.patch | 217 - openwrt/package/wpa_supplicant/Config.in | 15 - openwrt/package/wpa_supplicant/Makefile | 40 - openwrt/package/wpa_supplicant/files/config | 17 - .../ipkg/wpa-supplicant.control | 5 - .../wpa_supplicant/patches/101-ldflags.patch | 24 - .../patches/102-opt_cflags.patch | 12 - openwrt/package/wput/Config.in | 9 - openwrt/package/wput/Makefile | 60 - openwrt/package/wput/ipkg/wput.control | 4 - openwrt/package/wrt-radauth/Config.in | 12 - openwrt/package/wrt-radauth/Makefile | 38 - .../wrt-radauth/ipkg/wrt-radauth.control | 4 - openwrt/package/wx200d/Config.in | 11 - openwrt/package/wx200d/Makefile | 70 - openwrt/package/wx200d/ipkg/wx200d.control | 7 - openwrt/package/xinetd/Config.in | 9 - openwrt/package/xinetd/Makefile | 71 - openwrt/package/xinetd/files/xinetd.conf | 6 - openwrt/package/xinetd/files/xinetd.init | 21 - openwrt/package/xinetd/ipkg/xinetd.conffiles | 1 - openwrt/package/xinetd/ipkg/xinetd.control | 4 - openwrt/package/xinetd/patches/ar.patch | 72 - openwrt/package/xinetd/patches/destdir.patch | 28 - .../xinetd/patches/xinetd-2.3.13-gcc4-1.patch | 33 - openwrt/package/xsupplicant/Config.in | 12 - openwrt/package/xsupplicant/Makefile | 74 - .../xsupplicant/ipkg/xsupplicant.conffiles | 1 - .../xsupplicant/ipkg/xsupplicant.control | 6 - .../xsupplicant/patches/001-no-lfl.patch | 24 - .../patches/002-cardif_madwifi_driver_h.patch | 11 - .../xsupplicant/patches/004-madwifi-ng.patch | 28 - .../patches/005-disable-procfs-check.patch | 23 - 1593 files changed, 167325 deletions(-) delete mode 100644 openwrt/package/6tunnel/Config.in delete mode 100644 openwrt/package/6tunnel/Makefile delete mode 100644 openwrt/package/6tunnel/ipkg/6tunnel.control delete mode 100644 openwrt/package/aiccu/Config.in delete mode 100644 openwrt/package/aiccu/Makefile delete mode 100644 openwrt/package/aiccu/files/aiccu.init delete mode 100644 openwrt/package/aiccu/ipkg/aiccu.conffiles delete mode 100644 openwrt/package/aiccu/ipkg/aiccu.control delete mode 100644 openwrt/package/aircrack/Config.in delete mode 100644 openwrt/package/aircrack/Makefile delete mode 100644 openwrt/package/aircrack/ipkg/aircrack.control delete mode 100644 openwrt/package/amwall/Config.in delete mode 100644 openwrt/package/amwall/Makefile delete mode 100644 openwrt/package/amwall/ipkg/amwall.control delete mode 100644 openwrt/package/arpd/Config.in delete mode 100644 openwrt/package/arpd/Makefile delete mode 100644 openwrt/package/arpd/ipkg/arpd.control delete mode 100644 openwrt/package/arpd/patches/configure-no-bpf.patch delete mode 100644 openwrt/package/arpd/patches/function-string.patch delete mode 100644 openwrt/package/arpd/patches/pcap-and-arg.patch delete mode 100644 openwrt/package/arptables/Config.in delete mode 100644 openwrt/package/arptables/Makefile delete mode 100644 openwrt/package/arptables/ipkg/arptables.control delete mode 100644 openwrt/package/arpwatch/Config.in delete mode 100644 openwrt/package/arpwatch/Makefile delete mode 100644 openwrt/package/arpwatch/ipkg/arpwatch.conffiles delete mode 100644 openwrt/package/arpwatch/ipkg/arpwatch.control delete mode 100644 openwrt/package/asterisk/Config.in delete mode 100644 openwrt/package/asterisk/Makefile delete mode 100644 openwrt/package/asterisk/files/asterisk.default delete mode 100644 openwrt/package/asterisk/files/asterisk.init delete mode 100644 openwrt/package/asterisk/files/modules.conf delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-chan-bluetooth.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-chan-bluetooth.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-chan-h323.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-chan-h323.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-chan-mgcp.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-chan-mgcp.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-chan-skinny.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-chan-skinny.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-codec-ilbc.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-codec-lpc10.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-codec-speex.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-mini.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-mini.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-mysql.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-mysql.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-pbx-dundi.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-pbx-dundi.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-pgsql.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-pgsql.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-res-agi.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-sounds.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-sqlite.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-voicemail.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk-voicemail.control delete mode 100644 openwrt/package/asterisk/ipkg/asterisk.conffiles delete mode 100644 openwrt/package/asterisk/ipkg/asterisk.control delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-astdb.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-codecs-lpc10.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-stdtime.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.0.7-chan_iax2-tmp_path.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.0.7-dns.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.0.9-chan_bluetooth.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-apps.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-cdr.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-channels.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-codecs-gsm.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-codecs.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-pbx.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-res.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-app_mysql.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-cdr_mysql.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-chan_bluetooth.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-compat-getloadavg.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.0-res_mysql.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.1-Makefile-codecs-ilbc.patch delete mode 100644 openwrt/package/asterisk/patches/asterisk-1.2.1-Makefile-versionnum.patch delete mode 100644 openwrt/package/atftp/Config.in delete mode 100644 openwrt/package/atftp/Makefile delete mode 100644 openwrt/package/atftp/ipkg/atftp.control delete mode 100644 openwrt/package/atftp/ipkg/atftpd.control delete mode 100755 openwrt/package/atftp/ipkg/files/postinst delete mode 100644 openwrt/package/atftp/patches/100-mconfig.patch delete mode 100644 openwrt/package/atftp/patches/110-services.patch delete mode 100644 openwrt/package/atftp/patches/120-retry_setting.patch delete mode 100644 openwrt/package/autossh/Config.in delete mode 100644 openwrt/package/autossh/Makefile delete mode 100644 openwrt/package/autossh/ipkg/autossh.control delete mode 100644 openwrt/package/avahi/Config.in delete mode 100644 openwrt/package/avahi/Makefile delete mode 100644 openwrt/package/avahi/files/avahi-daemon.conf delete mode 100644 openwrt/package/avahi/files/avahi-daemon.init delete mode 100644 openwrt/package/avahi/files/service-http delete mode 100644 openwrt/package/avahi/files/service-ssh delete mode 100644 openwrt/package/avahi/ipkg/avahi-daemon.conffiles delete mode 100644 openwrt/package/avahi/ipkg/avahi-daemon.control delete mode 100644 openwrt/package/avahi/ipkg/avahi-dnsconfd.control delete mode 100644 openwrt/package/avahi/ipkg/libavahi.control delete mode 100644 openwrt/package/bc/Config.in delete mode 100644 openwrt/package/bc/Makefile delete mode 100644 openwrt/package/bc/ipkg/bc.control delete mode 100644 openwrt/package/bc/ipkg/dc.control delete mode 100644 openwrt/package/bind/Config.in delete mode 100644 openwrt/package/bind/Makefile delete mode 100644 openwrt/package/bind/files/bind/db.0 delete mode 100644 openwrt/package/bind/files/bind/db.127 delete mode 100644 openwrt/package/bind/files/bind/db.255 delete mode 100644 openwrt/package/bind/files/bind/db.local delete mode 100644 openwrt/package/bind/files/bind/db.root delete mode 100644 openwrt/package/bind/files/bind/named.conf.example delete mode 100755 openwrt/package/bind/files/named.init delete mode 100644 openwrt/package/bind/ipkg/bind-check.control delete mode 100644 openwrt/package/bind/ipkg/bind-client.control delete mode 100644 openwrt/package/bind/ipkg/bind-dig.control delete mode 100644 openwrt/package/bind/ipkg/bind-dnssec.control delete mode 100644 openwrt/package/bind/ipkg/bind-host.control delete mode 100644 openwrt/package/bind/ipkg/bind-rndc.control delete mode 100644 openwrt/package/bind/ipkg/bind-server.conffiles delete mode 100644 openwrt/package/bind/ipkg/bind-server.control delete mode 100644 openwrt/package/bind/ipkg/bind-tools.control delete mode 100644 openwrt/package/bind/patches/cross-compile.patch delete mode 100644 openwrt/package/bitchx/Config.in delete mode 100644 openwrt/package/bitchx/Makefile delete mode 100755 openwrt/package/bitchx/files/S98bitchxrc delete mode 100644 openwrt/package/bitchx/files/bitchxrc delete mode 100644 openwrt/package/bitchx/ipkg/bitchx.control delete mode 100644 openwrt/package/bitchx/patches/BitchX-fix_declarations.patch delete mode 100644 openwrt/package/bitchx/patches/BitchX-tparm.patch delete mode 100644 openwrt/package/bitlbee/Config.in delete mode 100644 openwrt/package/bitlbee/Makefile delete mode 100755 openwrt/package/bitlbee/files/S55bitlbee delete mode 100644 openwrt/package/bitlbee/ipkg/bitlbee.conffiles delete mode 100644 openwrt/package/bitlbee/ipkg/bitlbee.control delete mode 100644 openwrt/package/bitlbee/patches/100-cross_compile_configure_fix delete mode 100644 openwrt/package/bluez-libs/Config.in delete mode 100644 openwrt/package/bluez-libs/Makefile delete mode 100644 openwrt/package/bluez-libs/ipkg/bluez-libs.control delete mode 100644 openwrt/package/bluez-utils/Config.in delete mode 100644 openwrt/package/bluez-utils/Makefile delete mode 100644 openwrt/package/bluez-utils/files/givepin delete mode 100644 openwrt/package/bluez-utils/ipkg/bluez-utils.conffiles delete mode 100644 openwrt/package/bluez-utils/ipkg/bluez-utils.control delete mode 100644 openwrt/package/bluez-utils/patches/001-include_limits.patch delete mode 100644 openwrt/package/bluez-utils/patches/002-hcid_pin_helper.patch delete mode 100644 openwrt/package/bwm/Config.in delete mode 100644 openwrt/package/bwm/Makefile delete mode 100644 openwrt/package/bwm/ipkg/bwm.control delete mode 100644 openwrt/package/cbtt/Config.in delete mode 100644 openwrt/package/cbtt/Makefile delete mode 100644 openwrt/package/cbtt/ipkg/cbtt-mysql.control delete mode 100644 openwrt/package/cbtt/ipkg/cbtt.control delete mode 100644 openwrt/package/cbtt/patches/100-compile.patch delete mode 100644 openwrt/package/cgilib/Config.in delete mode 100644 openwrt/package/cgilib/Makefile delete mode 100644 openwrt/package/cgilib/ipkg/cgilib.control delete mode 100644 openwrt/package/cgilib/patches/100-shared_lib.patch delete mode 100644 openwrt/package/cgilib/patches/200-cgitest_bugfix.patch delete mode 100644 openwrt/package/chillispot/Config.in delete mode 100644 openwrt/package/chillispot/Makefile delete mode 100644 openwrt/package/chillispot/files/chillispot.init delete mode 100644 openwrt/package/chillispot/ipkg/chillispot.conffiles delete mode 100644 openwrt/package/chillispot/ipkg/chillispot.control delete mode 100644 openwrt/package/cifsmount/Config.in delete mode 100644 openwrt/package/cifsmount/Makefile delete mode 100644 openwrt/package/cifsmount/ipkg/cifsmount.control delete mode 100644 openwrt/package/cifsmount/mount.cifs.c delete mode 100644 openwrt/package/click/Config.in delete mode 100644 openwrt/package/click/Makefile delete mode 100755 openwrt/package/click/files/S50roofnet delete mode 100644 openwrt/package/click/ipkg/click.control delete mode 100644 openwrt/package/click/ipkg/roofnet.control delete mode 100644 openwrt/package/clinkc/Config.in delete mode 100644 openwrt/package/clinkc/Makefile delete mode 100644 openwrt/package/clinkc/ipkg/clinkc.control delete mode 100644 openwrt/package/collectd/Config.in delete mode 100644 openwrt/package/collectd/Makefile delete mode 100755 openwrt/package/collectd/files/S80collectd delete mode 100644 openwrt/package/collectd/ipkg/collectd.control delete mode 100644 openwrt/package/ctorrent/Config.in delete mode 100755 openwrt/package/ctorrent/Makefile delete mode 100644 openwrt/package/ctorrent/ipkg/ctorrent.control delete mode 100644 openwrt/package/cups/Config.in delete mode 100644 openwrt/package/cups/Makefile delete mode 100644 openwrt/package/cups/files/cupsd.init delete mode 100644 openwrt/package/cups/files/etc/cups/classes.conf delete mode 100644 openwrt/package/cups/files/etc/cups/client.conf delete mode 100644 openwrt/package/cups/files/etc/cups/cupsd.conf delete mode 100644 openwrt/package/cups/files/etc/cups/printers.conf delete mode 100644 openwrt/package/cups/ipkg/cups.conffiles delete mode 100644 openwrt/package/cups/ipkg/cups.control delete mode 100644 openwrt/package/cups/patches/100-makefile-targets.patch delete mode 100644 openwrt/package/cups/patches/110-no-strip-on-install.patch delete mode 100644 openwrt/package/cups/patches/120-documentation-url.patch delete mode 100644 openwrt/package/curl/Config.in delete mode 100644 openwrt/package/curl/Makefile delete mode 100644 openwrt/package/curl/ipkg/curl.control delete mode 100644 openwrt/package/curl/ipkg/libcurl.control delete mode 100644 openwrt/package/curl/patches/500-configure_cross.patch delete mode 100644 openwrt/package/cutter/Config.in delete mode 100755 openwrt/package/cutter/Makefile delete mode 100644 openwrt/package/cutter/ipkg/cutter.control delete mode 100644 openwrt/package/cyrus-sasl/Config.in delete mode 100644 openwrt/package/cyrus-sasl/Makefile delete mode 100644 openwrt/package/cyrus-sasl/ipkg/libsasl2.control delete mode 100644 openwrt/package/cyrus-sasl/patches/cyrus-sasl-2.1.20-gcc4.patch delete mode 100644 openwrt/package/deco/Config.in delete mode 100644 openwrt/package/deco/Makefile delete mode 100644 openwrt/package/deco/ipkg/deco.control delete mode 100644 openwrt/package/deco/patches/100-tty.c.patch delete mode 100644 openwrt/package/dhcp-forwarder/Config.in delete mode 100644 openwrt/package/dhcp-forwarder/Makefile delete mode 100644 openwrt/package/dhcp-forwarder/files/dhcp-fwd.init delete mode 100644 openwrt/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles delete mode 100644 openwrt/package/dhcp-forwarder/ipkg/dhcp-forwarder.control delete mode 100644 openwrt/package/dhcp-forwarder/patches/00-big_endian.patch delete mode 100644 openwrt/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch delete mode 100644 openwrt/package/dhcp/Config.in delete mode 100644 openwrt/package/dhcp/Makefile delete mode 100644 openwrt/package/dhcp/ipkg/dhcp-relay.control delete mode 100644 openwrt/package/dhcp/ipkg/dhcp-server.control delete mode 100644 openwrt/package/dhcp6/Config.in delete mode 100755 openwrt/package/dhcp6/Makefile delete mode 100755 openwrt/package/dhcp6/ipkg/dhcp6.control delete mode 100644 openwrt/package/dhcp6/ipkg/files/conffiles delete mode 100644 openwrt/package/dhcp6/patches/01-remove_debug.patch delete mode 100644 openwrt/package/dosfstools/Config.in delete mode 100644 openwrt/package/dosfstools/Makefile delete mode 100644 openwrt/package/dosfstools/ipkg/dosfstools.control delete mode 100644 openwrt/package/dsniff/Config.in delete mode 100644 openwrt/package/dsniff/Makefile delete mode 100644 openwrt/package/dsniff/ipkg/dsniff.control delete mode 100644 openwrt/package/dsniff/patches/arpspoof-fix.patch delete mode 100644 openwrt/package/dsniff/patches/dns.patch delete mode 100644 openwrt/package/dsniff/patches/gdbm.patch delete mode 100644 openwrt/package/dsniff/patches/noyp.patch delete mode 100644 openwrt/package/dsniff/patches/openssl-fix.patch delete mode 100644 openwrt/package/dsniff/patches/pcap-header.patch delete mode 100644 openwrt/package/dsniff/patches/time_h.patch delete mode 100644 openwrt/package/e2fsprogs/Config.in delete mode 100644 openwrt/package/e2fsprogs/Makefile delete mode 100644 openwrt/package/e2fsprogs/ipkg/e2fsprogs.control delete mode 100644 openwrt/package/elhttp/Config.in delete mode 100644 openwrt/package/elhttp/Makefile delete mode 100644 openwrt/package/elhttp/ipkg/elhttp.control delete mode 100644 openwrt/package/elhttp/patches/01-cross-compile.patch delete mode 100644 openwrt/package/elinks/Config.in delete mode 100644 openwrt/package/elinks/Makefile delete mode 100644 openwrt/package/elinks/ipkg/elinks.control delete mode 100644 openwrt/package/elinks/patches/01-missing_decl_for_off_t.patch delete mode 100644 openwrt/package/ether-wake/Config.in delete mode 100644 openwrt/package/ether-wake/Makefile delete mode 100644 openwrt/package/ether-wake/files/ether-wake.c delete mode 100644 openwrt/package/ether-wake/ipkg/ether-wake.control delete mode 100644 openwrt/package/ether-wake/patches/no_ether_hostton_in_uclibc.patch delete mode 100644 openwrt/package/ethtool/Config.in delete mode 100644 openwrt/package/ethtool/Makefile delete mode 100644 openwrt/package/ethtool/ipkg/ethtool.control delete mode 100644 openwrt/package/expat/Config.in delete mode 100644 openwrt/package/expat/Makefile delete mode 100644 openwrt/package/expat/ipkg/libexpat.control delete mode 100644 openwrt/package/expat/patches/001-destdir.patch delete mode 100644 openwrt/package/ez-ipupdate/Config.in delete mode 100644 openwrt/package/ez-ipupdate/Makefile delete mode 100644 openwrt/package/ez-ipupdate/files/ez-ipupdate.conf delete mode 100644 openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug delete mode 100644 openwrt/package/ez-ipupdate/files/ez-ipupdate.init delete mode 100644 openwrt/package/ez-ipupdate/ipkg/ez-ipupdate.conffiles delete mode 100644 openwrt/package/ez-ipupdate/ipkg/ez-ipupdate.control delete mode 100644 openwrt/package/ez-ipupdate/patches/debian-subset.patch delete mode 100644 openwrt/package/fakeidentd/Config.in delete mode 100644 openwrt/package/fakeidentd/Makefile delete mode 100644 openwrt/package/fakeidentd/files/fakeidentd.init delete mode 100644 openwrt/package/fakeidentd/ipkg/fakeidentd.control delete mode 100644 openwrt/package/fetchmail/Config.in delete mode 100644 openwrt/package/fetchmail/Makefile delete mode 100644 openwrt/package/fetchmail/ipkg/fetchmail.control delete mode 100644 openwrt/package/fetchmail/patches/01-amd64_detection.patch delete mode 100644 openwrt/package/fetchmail/patches/02-no_rej.patch delete mode 100644 openwrt/package/flac/Config.in delete mode 100644 openwrt/package/flac/Makefile delete mode 100644 openwrt/package/flac/ipkg/libflac.control delete mode 100644 openwrt/package/flac/patches/no_encoder.patch delete mode 100644 openwrt/package/fping/Config.in delete mode 100644 openwrt/package/fping/Makefile delete mode 100644 openwrt/package/fping/ipkg/fping.control delete mode 100644 openwrt/package/fping/patches/debian-10.patch delete mode 100644 openwrt/package/fprobe-ulog/Config.in delete mode 100644 openwrt/package/fprobe-ulog/Makefile delete mode 100644 openwrt/package/fprobe-ulog/ipkg/fprobe-ulog.control delete mode 100644 openwrt/package/fprobe/Config.in delete mode 100644 openwrt/package/fprobe/Makefile delete mode 100644 openwrt/package/fprobe/ipkg/fprobe.control delete mode 100644 openwrt/package/freeradius/Config.in delete mode 100644 openwrt/package/freeradius/Makefile delete mode 100644 openwrt/package/freeradius/files/radiusd.init delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-democerts.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-chap.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-detail.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-eap-gtc.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-eap-md5.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-eap-mschapv2.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-eap-peap.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-eap-tls.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-eap-ttls.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-eap.conffiles delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-eap.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-files.conffiles delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-files.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-ldap.conffiles delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-ldap.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-mschap.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-pap.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-preprocess.conffiles delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-preprocess.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-realm.conffiles delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-realm.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-sql-mysql.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-sql-pgsql.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-sql.conffiles delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-sql.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-mod-sqlcounter.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius-utils.control delete mode 100644 openwrt/package/freeradius/ipkg/freeradius.conffiles delete mode 100644 openwrt/package/freeradius/ipkg/freeradius.control delete mode 100644 openwrt/package/freeradius/patches/01-freeradius-1.0.3-dict.patch delete mode 100644 openwrt/package/freeradius/patches/02-freeradius-1.0.4-config.patch delete mode 100644 openwrt/package/freeradius/patches/03-freeradius-1.0.5-modules_ldflags.patch delete mode 100644 openwrt/package/freeradius/patches/04-freeradius-1.0.5-autoconf.patch delete mode 100644 openwrt/package/freeradius/patches/05-freeradius-1.0.2-mysql-autoconf.patch delete mode 100644 openwrt/package/freeradius/patches/06-autoconf-rlm_ldap.patch delete mode 100644 openwrt/package/freetype/Config.in delete mode 100644 openwrt/package/freetype/Makefile delete mode 100644 openwrt/package/freetype/ipkg/libfreetype.control delete mode 100644 openwrt/package/frickin/Config.in delete mode 100644 openwrt/package/frickin/Makefile delete mode 100644 openwrt/package/frickin/files/frickin.default delete mode 100644 openwrt/package/frickin/files/frickin.init delete mode 100644 openwrt/package/frickin/ipkg/frickin.conffiles delete mode 100644 openwrt/package/frickin/ipkg/frickin.control delete mode 100644 openwrt/package/fuse/Config.in delete mode 100644 openwrt/package/fuse/Makefile delete mode 100644 openwrt/package/fuse/ipkg/fuse-utils.control delete mode 100644 openwrt/package/fuse/ipkg/libfuse.control delete mode 100644 openwrt/package/fuse/patches/111-uclibc_changes.patch delete mode 100644 openwrt/package/fuse/patches/112-no_break_on_mknod.patch delete mode 100644 openwrt/package/glib/Config.in delete mode 100644 openwrt/package/glib/Makefile delete mode 100644 openwrt/package/glib/ipkg/glib1.control delete mode 100644 openwrt/package/glib/patches/01-debian-9 delete mode 100644 openwrt/package/glib/patches/02-cross-compile-fix.patch delete mode 100644 openwrt/package/glib/patches/03-use-glibconfig-sysdefs delete mode 100644 openwrt/package/glib/patches/04-gcc3.4-fix delete mode 100644 openwrt/package/gmediaserver/Config.in delete mode 100644 openwrt/package/gmediaserver/Makefile delete mode 100644 openwrt/package/gmediaserver/files/gmediaserver.default delete mode 100644 openwrt/package/gmediaserver/files/gmediaserver.init delete mode 100644 openwrt/package/gmediaserver/ipkg/gmediaserver.conffiles delete mode 100644 openwrt/package/gmediaserver/ipkg/gmediaserver.control delete mode 100644 openwrt/package/gmediaserver/patches/no_iconv.patch delete mode 100644 openwrt/package/gmp/Config.in delete mode 100644 openwrt/package/gmp/Makefile delete mode 100644 openwrt/package/gmp/ipkg/libgmp.control delete mode 100644 openwrt/package/gnutls/Config.in delete mode 100644 openwrt/package/gnutls/Makefile delete mode 100644 openwrt/package/gnutls/ipkg/gnutls-utils.control delete mode 100644 openwrt/package/gnutls/ipkg/libgnutls-openssl.control delete mode 100644 openwrt/package/gnutls/ipkg/libgnutls.control delete mode 100644 openwrt/package/gnutls/patches/500-cross-compile.patch delete mode 100644 openwrt/package/gnutls/patches/501-certtool-libs.patch delete mode 100644 openwrt/package/gpg/Config.in delete mode 100644 openwrt/package/gpg/Makefile delete mode 100644 openwrt/package/gpg/ipkg/gpg.control delete mode 100644 openwrt/package/gpsd/Config.in delete mode 100644 openwrt/package/gpsd/Makefile delete mode 100644 openwrt/package/gpsd/ipkg/gpsd.control delete mode 100644 openwrt/package/gsm/Config.in delete mode 100644 openwrt/package/gsm/Makefile delete mode 100644 openwrt/package/gsm/ipkg/gsm-utils.control delete mode 100644 openwrt/package/gsm/ipkg/libgsm.control delete mode 100644 openwrt/package/gsm/patches/01-debian-libsgm-1.0.10-13.patch delete mode 100644 openwrt/package/hdparm/Config.in delete mode 100644 openwrt/package/hdparm/Makefile delete mode 100644 openwrt/package/hdparm/ipkg/hdparm.control delete mode 100644 openwrt/package/heyu/Config.in delete mode 100644 openwrt/package/heyu/Makefile delete mode 100644 openwrt/package/heyu/files/x10.conf delete mode 100644 openwrt/package/heyu/ipkg/files/heyu.conffiles delete mode 100644 openwrt/package/heyu/ipkg/heyu.control delete mode 100644 openwrt/package/heyu/patches/01-avoid_configure.patch delete mode 100644 openwrt/package/hostap-utils/Config.in delete mode 100644 openwrt/package/hostap-utils/Makefile delete mode 100644 openwrt/package/hostap-utils/ipkg/hostap-utils.control delete mode 100644 openwrt/package/hostapd/Config.in delete mode 100644 openwrt/package/hostapd/Makefile delete mode 100644 openwrt/package/hostapd/files/hostapd-mini.config delete mode 100644 openwrt/package/hostapd/files/hostapd.config delete mode 100644 openwrt/package/hostapd/ipkg/hostapd-mini.conffiles delete mode 100644 openwrt/package/hostapd/ipkg/hostapd-mini.control delete mode 100644 openwrt/package/hostapd/ipkg/hostapd-utils.control delete mode 100644 openwrt/package/hostapd/ipkg/hostapd.conffiles delete mode 100644 openwrt/package/hostapd/ipkg/hostapd.control delete mode 100644 openwrt/package/hostapd/patches/001-cross_compile_fix.patch delete mode 100644 openwrt/package/howl/Config.in delete mode 100644 openwrt/package/howl/Makefile delete mode 100644 openwrt/package/howl/files/autoipd.init delete mode 100644 openwrt/package/howl/files/mDNSResponder.conf delete mode 100644 openwrt/package/howl/files/mDNSResponder.init delete mode 100644 openwrt/package/howl/files/nifd.init delete mode 100644 openwrt/package/howl/ipkg/autoipd.control delete mode 100644 openwrt/package/howl/ipkg/howl-utils.control delete mode 100644 openwrt/package/howl/ipkg/libhowl.control delete mode 100644 openwrt/package/howl/ipkg/mdnsresponder.conffiles delete mode 100644 openwrt/package/howl/ipkg/mdnsresponder.control delete mode 100644 openwrt/package/howl/ipkg/nifd.control delete mode 100644 openwrt/package/howl/patches/config-path.patch delete mode 100644 openwrt/package/howl/patches/debug-log.patch delete mode 100644 openwrt/package/howl/patches/proto-fix.patch delete mode 100644 openwrt/package/htpdate/Config.in delete mode 100644 openwrt/package/htpdate/Makefile delete mode 100644 openwrt/package/htpdate/files/htpdate.default delete mode 100644 openwrt/package/htpdate/files/htpdate.init delete mode 100644 openwrt/package/htpdate/ipkg/htpdate.conffiles delete mode 100644 openwrt/package/htpdate/ipkg/htpdate.control delete mode 100644 openwrt/package/httping/Config.in delete mode 100644 openwrt/package/httping/Makefile delete mode 100644 openwrt/package/httping/ipkg/httping.control delete mode 100644 openwrt/package/httping/patches/01-honor_includes_lib-paths.patch delete mode 100644 openwrt/package/icecast/Config.in delete mode 100644 openwrt/package/icecast/Makefile delete mode 100644 openwrt/package/icecast/ipkg/icecast.conffiles delete mode 100644 openwrt/package/icecast/ipkg/icecast.control delete mode 100644 openwrt/package/icecast/patches/01-icecast-2.3.0-tremor.patch delete mode 100644 openwrt/package/icecast/patches/icecast-2.3.0-curl_config.patch delete mode 100644 openwrt/package/id3lib/Config.in delete mode 100644 openwrt/package/id3lib/Makefile delete mode 100644 openwrt/package/id3lib/ipkg/id3lib.control delete mode 100644 openwrt/package/iftop/Config.in delete mode 100644 openwrt/package/iftop/Makefile delete mode 100644 openwrt/package/iftop/ipkg/iftop.control delete mode 100644 openwrt/package/igmpproxy/Config.in delete mode 100644 openwrt/package/igmpproxy/Makefile delete mode 100644 openwrt/package/igmpproxy/ipkg/igmpproxy.control delete mode 100644 openwrt/package/ipcad/Config.in delete mode 100644 openwrt/package/ipcad/Makefile delete mode 100644 openwrt/package/ipcad/ipkg/ipcad.conffiles delete mode 100644 openwrt/package/ipcad/ipkg/ipcad.control delete mode 100644 openwrt/package/ipcad/patches/01-honor_cppflags.patch delete mode 100644 openwrt/package/iperf/Config.in delete mode 100644 openwrt/package/iperf/Makefile delete mode 100644 openwrt/package/iperf/ipkg/iperf.control delete mode 100644 openwrt/package/iptraf/Config.in delete mode 100644 openwrt/package/iptraf/Makefile delete mode 100644 openwrt/package/iptraf/ipkg/iptraf.control delete mode 100644 openwrt/package/iptraf/patches/iptraf-2.7.0-cross_compile.patch delete mode 100644 openwrt/package/iptraf/patches/iptraf-2.7.0-ifaces.patch delete mode 100644 openwrt/package/irssi/Config.in delete mode 100644 openwrt/package/irssi/Makefile delete mode 100644 openwrt/package/irssi/ipkg/irssi.control delete mode 100644 openwrt/package/irssi/patches/100-cross_compiling_fix.patch delete mode 100644 openwrt/package/jamvm/Config.in delete mode 100644 openwrt/package/jamvm/Makefile delete mode 100644 openwrt/package/jamvm/ipkg/jamvm.control delete mode 100644 openwrt/package/jamvm/patches/100-jamvm-mips.patch delete mode 100644 openwrt/package/jpeg/Config.in delete mode 100644 openwrt/package/jpeg/Makefile delete mode 100644 openwrt/package/jpeg/ipkg/libjpeg.control delete mode 100644 openwrt/package/jpeg/patches/jpeg-6b-config_guess.patch delete mode 100644 openwrt/package/kismet/Config.in delete mode 100644 openwrt/package/kismet/Makefile delete mode 100644 openwrt/package/kismet/files/ap_manuf delete mode 100644 openwrt/package/kismet/files/client_manuf delete mode 100644 openwrt/package/kismet/files/kismet.conf delete mode 100644 openwrt/package/kismet/files/kismet_drone.conf delete mode 100644 openwrt/package/kismet/files/kismet_ui.conf delete mode 100644 openwrt/package/kismet/ipkg/kismet-client.conffiles delete mode 100644 openwrt/package/kismet/ipkg/kismet-client.control delete mode 100644 openwrt/package/kismet/ipkg/kismet-drone.conffiles delete mode 100644 openwrt/package/kismet/ipkg/kismet-drone.control delete mode 100644 openwrt/package/kismet/ipkg/kismet-server.conffiles delete mode 100644 openwrt/package/kismet/ipkg/kismet-server.control delete mode 100644 openwrt/package/kismet/ipkg/kismet.control delete mode 100644 openwrt/package/kismet/patches/100-wrt54g_source.patch delete mode 100644 openwrt/package/kismet/patches/110-uclibc++_fixes.patch delete mode 100644 openwrt/package/kismet/patches/120-cleanup.patch delete mode 100644 openwrt/package/knock/Config.in delete mode 100644 openwrt/package/knock/Makefile delete mode 100644 openwrt/package/knock/ipkg/knock.control delete mode 100644 openwrt/package/knock/ipkg/knockd.conffiles delete mode 100644 openwrt/package/knock/ipkg/knockd.control delete mode 100644 openwrt/package/l2tpd/Config.in delete mode 100644 openwrt/package/l2tpd/Makefile delete mode 100644 openwrt/package/l2tpd/files/l2tpd.conf delete mode 100644 openwrt/package/l2tpd/files/l2tpd.init delete mode 100644 openwrt/package/l2tpd/files/options.l2tpd delete mode 100644 openwrt/package/l2tpd/ipkg/l2tpd.conffiles delete mode 100644 openwrt/package/l2tpd/ipkg/l2tpd.control delete mode 100644 openwrt/package/l2tpd/patches/01-debian-2.patch delete mode 100644 openwrt/package/l2tpd/patches/02-debian-2-pty-rev.patch delete mode 100644 openwrt/package/l2tpd/patches/03-jacco-pty.patch delete mode 100644 openwrt/package/l2tpd/patches/04-gcc4.patch delete mode 100644 openwrt/package/l2tpd/patches/04-nonblock.patch delete mode 100644 openwrt/package/l2tpd/patches/05-df-disable.patch delete mode 100644 openwrt/package/l2tpns/Config.in delete mode 100644 openwrt/package/l2tpns/Makefile delete mode 100644 openwrt/package/l2tpns/ipkg/l2tpns.conffiles delete mode 100644 openwrt/package/l2tpns/ipkg/l2tpns.control delete mode 100644 openwrt/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch delete mode 100644 openwrt/package/lcd4linux/Config.in delete mode 100644 openwrt/package/lcd4linux/Makefile delete mode 100644 openwrt/package/lcd4linux/ipkg/lcd4linux.control delete mode 100644 openwrt/package/lcd4linux/patches/100-drv_RouterBoard.patch delete mode 100644 openwrt/package/lcd4linux/patches/110-ucdelay.patch delete mode 100644 openwrt/package/lcd4linux/patches/120-remove_parport_outb.patch delete mode 100644 openwrt/package/less/Config.in delete mode 100644 openwrt/package/less/Makefile delete mode 100644 openwrt/package/less/ipkg/less.control delete mode 100644 openwrt/package/libamsel/Config.in delete mode 100644 openwrt/package/libamsel/Makefile delete mode 100644 openwrt/package/libamsel/ipkg/libamsel.control delete mode 100644 openwrt/package/libao/Config.in delete mode 100644 openwrt/package/libao/Makefile delete mode 100644 openwrt/package/libao/ipkg/libao.control delete mode 100644 openwrt/package/libart/Config.in delete mode 100644 openwrt/package/libart/Makefile delete mode 100644 openwrt/package/libart/ipkg/libart.control delete mode 100644 openwrt/package/libart/patches/100-cross_compile_fix.patch delete mode 100644 openwrt/package/libaudiofile/Config.in delete mode 100644 openwrt/package/libaudiofile/Makefile delete mode 100644 openwrt/package/libaudiofile/ipkg/libaudiofile.control delete mode 100644 openwrt/package/libaudiofile/patches/001-audiofile-config-libdirs.patch delete mode 100644 openwrt/package/libcli/Config.in delete mode 100755 openwrt/package/libcli/Makefile delete mode 100755 openwrt/package/libcli/ipkg/libcli.control delete mode 100644 openwrt/package/libcli/patches/01-remove_debug_honor_prefix.patch delete mode 100644 openwrt/package/libdaemon/Config.in delete mode 100644 openwrt/package/libdaemon/Makefile delete mode 100644 openwrt/package/libdaemon/ipkg/libdaemon.control delete mode 100644 openwrt/package/libdb/Config.in delete mode 100644 openwrt/package/libdb/Makefile delete mode 100644 openwrt/package/libdb/ipkg/libdb.control delete mode 100644 openwrt/package/libdnet/Config.in delete mode 100644 openwrt/package/libdnet/Makefile delete mode 100644 openwrt/package/libdnet/ipkg/libdnet.control delete mode 100644 openwrt/package/libdnet/patches/libdnet-1.10-dnet_config.patch delete mode 100644 openwrt/package/libelf/Config.in delete mode 100644 openwrt/package/libelf/Makefile delete mode 100644 openwrt/package/libelf/ipkg/libelf.control delete mode 100644 openwrt/package/libevent/Config.in delete mode 100644 openwrt/package/libevent/Makefile delete mode 100644 openwrt/package/libevent/ipkg/libevent.control delete mode 100644 openwrt/package/libffi-sable/Config.in delete mode 100644 openwrt/package/libffi-sable/Makefile delete mode 100644 openwrt/package/libffi-sable/ipkg/libffi-sable.control delete mode 100644 openwrt/package/libgcrypt/Config.in delete mode 100644 openwrt/package/libgcrypt/Makefile delete mode 100644 openwrt/package/libgcrypt/ipkg/libgcrypt.control delete mode 100644 openwrt/package/libgcrypt/patches/500-cross-compile.patch delete mode 100644 openwrt/package/libgd/Config.in delete mode 100644 openwrt/package/libgd/Makefile delete mode 100644 openwrt/package/libgd/ipkg/libgd.control delete mode 100644 openwrt/package/libgd/patches/100-configure_fix.patch delete mode 100644 openwrt/package/libgdbm/Config.in delete mode 100644 openwrt/package/libgdbm/Makefile delete mode 100644 openwrt/package/libgdbm/ipkg/libgdbm.control delete mode 100644 openwrt/package/libgpg-error/Config.in delete mode 100644 openwrt/package/libgpg-error/Makefile delete mode 100644 openwrt/package/libgpg-error/ipkg/libgpg-error.control delete mode 100644 openwrt/package/libiconv/Config.in delete mode 100644 openwrt/package/libiconv/Makefile delete mode 100644 openwrt/package/libiconv/ipkg/libiconv.control delete mode 100644 openwrt/package/libiconv/patches/100-strip_charsets.patch delete mode 100644 openwrt/package/libid3tag/Config.in delete mode 100644 openwrt/package/libid3tag/Makefile delete mode 100644 openwrt/package/libid3tag/ipkg/libid3tag.control delete mode 100644 openwrt/package/liblzo/Config.in delete mode 100644 openwrt/package/liblzo/Makefile delete mode 100644 openwrt/package/liblzo/ipkg/liblzo.control delete mode 100644 openwrt/package/liblzo/patches/lzo-cross-compile.patch delete mode 100644 openwrt/package/libmad/Config.in delete mode 100644 openwrt/package/libmad/Makefile delete mode 100644 openwrt/package/libmad/ipkg/libmad.control delete mode 100644 openwrt/package/libnet/Config.in delete mode 100644 openwrt/package/libnet/Makefile delete mode 100644 openwrt/package/libnet/ipkg/libnet.control delete mode 100644 openwrt/package/libnet/patches/500-debian-subset.patch.gz delete mode 100644 openwrt/package/libnids/Config.in delete mode 100644 openwrt/package/libnids/Makefile delete mode 100644 openwrt/package/libnids/ipkg/libnids.control delete mode 100644 openwrt/package/libnids/patches/configure.patch delete mode 100644 openwrt/package/libnids/patches/no_asm_for_i386.patch delete mode 100644 openwrt/package/libogg/Config.in delete mode 100644 openwrt/package/libogg/Makefile delete mode 100644 openwrt/package/libogg/ipkg/libogg.control delete mode 100644 openwrt/package/libol/Config.in delete mode 100644 openwrt/package/libol/Makefile delete mode 100644 openwrt/package/libol/ipkg/libol.control delete mode 100644 openwrt/package/libosip2/Config.in delete mode 100644 openwrt/package/libosip2/Makefile delete mode 100644 openwrt/package/libosip2/ipkg/libosip2.control delete mode 100644 openwrt/package/libpcap/Config.in delete mode 100644 openwrt/package/libpcap/Makefile delete mode 100644 openwrt/package/libpcap/ipkg/libpcap.control delete mode 100644 openwrt/package/libpcap/patches/100-shared-lib.patch delete mode 100644 openwrt/package/libpcap/patches/101-cross-compile-fix.patch delete mode 100644 openwrt/package/libpcap/patches/102-alt-ether.patch delete mode 100644 openwrt/package/libpng/Config.in delete mode 100644 openwrt/package/libpng/Makefile delete mode 100644 openwrt/package/libpng/ipkg/libpng.control delete mode 100644 openwrt/package/libpng/patches/100-config_fix.patch delete mode 100644 openwrt/package/libpng/patches/101-pkgconfig-install.patch delete mode 100644 openwrt/package/libpthread/Config.in delete mode 100644 openwrt/package/libpthread/Makefile delete mode 100644 openwrt/package/libpthread/ipkg/libpthread.control delete mode 100644 openwrt/package/libtasn1/Config.in delete mode 100644 openwrt/package/libtasn1/Makefile delete mode 100644 openwrt/package/libtasn1/ipkg/libtasn1.control delete mode 100644 openwrt/package/libtasn1/patches/500-cross-compile.patch delete mode 100644 openwrt/package/libtool/Config.in delete mode 100644 openwrt/package/libtool/Makefile delete mode 100644 openwrt/package/libtool/ipkg/libltdl.control delete mode 100644 openwrt/package/libupnp/Config.in delete mode 100644 openwrt/package/libupnp/Makefile delete mode 100644 openwrt/package/libupnp/ipkg/libupnp.control delete mode 100644 openwrt/package/libupnp/patches/libupnp-1.2.1a-gcc4.patch delete mode 100644 openwrt/package/libupnp/patches/opt-flags.patch delete mode 100644 openwrt/package/libusb/Config.in delete mode 100644 openwrt/package/libusb/Makefile delete mode 100644 openwrt/package/libusb/ipkg/libusb.control delete mode 100644 openwrt/package/libusb/patches/no-libusbpp.patch delete mode 100644 openwrt/package/libvorbis/Config.in delete mode 100644 openwrt/package/libvorbis/Makefile delete mode 100644 openwrt/package/libvorbis/ipkg/libvorbis.control delete mode 100644 openwrt/package/libvorbis/patches/100-no_examples.patch delete mode 100644 openwrt/package/libvorbisidec/Config.in delete mode 100644 openwrt/package/libvorbisidec/Makefile delete mode 100644 openwrt/package/libvorbisidec/ipkg/libvorbisidec.control delete mode 100644 openwrt/package/libxml2/Config.in delete mode 100644 openwrt/package/libxml2/Makefile delete mode 100644 openwrt/package/libxml2/ipkg/libxml2.control delete mode 100644 openwrt/package/libxslt/Config.in delete mode 100644 openwrt/package/libxslt/Makefile delete mode 100644 openwrt/package/libxslt/ipkg/libxslt.control delete mode 100644 openwrt/package/lighttpd/Config.in delete mode 100644 openwrt/package/lighttpd/Makefile delete mode 100644 openwrt/package/lighttpd/files/lighttpd.conf delete mode 100644 openwrt/package/lighttpd/files/lighttpd.default delete mode 100644 openwrt/package/lighttpd/files/lighttpd.init delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-accesslog.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-alias.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-auth.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-cgi.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-evasive.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-expire.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-fastcgi.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-proxy.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-redirect.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-rewrite.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-setenv.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-simple-vhost.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-ssi.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-status.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd-mod-usertrack.control delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd.conffiles delete mode 100644 openwrt/package/lighttpd/ipkg/lighttpd.control delete mode 100644 openwrt/package/lighttpd/patches/500-configure_cross.patch delete mode 100644 openwrt/package/logrotate/Config.in delete mode 100644 openwrt/package/logrotate/Makefile delete mode 100644 openwrt/package/logrotate/files/logrotate.conf delete mode 100644 openwrt/package/logrotate/ipkg/logrotate.control delete mode 100644 openwrt/package/logrotate/patches/logrotate-3.7.1-dateext-maxage.patch delete mode 100644 openwrt/package/logrotate/patches/logrotate-3.7.1-datehack.patch delete mode 100644 openwrt/package/logrotate/patches/logrotate-3.7.1-ignore-hidden.patch delete mode 100644 openwrt/package/logrotate/patches/logrotate-3.7.1-no-tmpdir.patch delete mode 100644 openwrt/package/logrotate/patches/logrotate-3.7.1-taboo-to-debug.patch delete mode 100644 openwrt/package/logrotate/patches/logrotate-3.7.1-weekly.patch delete mode 100644 openwrt/package/lrzsz/Config.in delete mode 100644 openwrt/package/lrzsz/Makefile delete mode 100644 openwrt/package/lrzsz/ipkg/lrzsz.control delete mode 100644 openwrt/package/lua/Config.in delete mode 100644 openwrt/package/lua/Makefile delete mode 100644 openwrt/package/lua/ipkg/liblua.control delete mode 100644 openwrt/package/lua/ipkg/lua-examples.control delete mode 100644 openwrt/package/lua/ipkg/lua.control delete mode 100644 openwrt/package/lua/ipkg/luac.control delete mode 100644 openwrt/package/lua/patches/lua-5.0.2-config.patch delete mode 100644 openwrt/package/lua/patches/lua-5.0.2-soname.patch delete mode 100755 openwrt/package/macchanger/Config.in delete mode 100755 openwrt/package/macchanger/Makefile delete mode 100755 openwrt/package/macchanger/ipkg/macchanger.control delete mode 100644 openwrt/package/madplay/Config.in delete mode 100644 openwrt/package/madplay/Makefile delete mode 100644 openwrt/package/madplay/ipkg/madplay.control delete mode 100644 openwrt/package/maradns/Config.in delete mode 100644 openwrt/package/maradns/Makefile delete mode 100644 openwrt/package/maradns/files/maradns.init delete mode 100644 openwrt/package/maradns/files/mararc delete mode 100644 openwrt/package/maradns/ipkg/maradns.conffiles delete mode 100644 openwrt/package/maradns/ipkg/maradns.control delete mode 100644 openwrt/package/maradns/patches/cross-compile-fix.patch delete mode 100644 openwrt/package/matrixssl/Config.in delete mode 100644 openwrt/package/matrixssl/Makefile delete mode 100644 openwrt/package/matrixssl/ipkg/libmatrixssl.control delete mode 100644 openwrt/package/matrixssl/patches/matrixssl-1.2.4.diff delete mode 100644 openwrt/package/matrixssl/patches/matrixssl-typefix.patch delete mode 100644 openwrt/package/mgetty/Config.in delete mode 100644 openwrt/package/mgetty/Makefile delete mode 100644 openwrt/package/mgetty/ipkg/mgetty.control delete mode 100644 openwrt/package/mgetty/patches/mgetty.patch delete mode 100644 openwrt/package/miau/Config.in delete mode 100644 openwrt/package/miau/Makefile delete mode 100755 openwrt/package/miau/files/S50miau delete mode 100644 openwrt/package/miau/files/miau delete mode 100644 openwrt/package/miau/files/miaurc delete mode 100644 openwrt/package/miau/ipkg/miau.conffiles delete mode 100644 openwrt/package/miau/ipkg/miau.control delete mode 100644 openwrt/package/miax/Config.in delete mode 100644 openwrt/package/miax/Makefile delete mode 100644 openwrt/package/miax/ipkg/miax.control delete mode 100644 openwrt/package/miax/patches/01-cross.patch delete mode 100644 openwrt/package/microcom/Config.in delete mode 100644 openwrt/package/microcom/Makefile delete mode 100644 openwrt/package/microcom/ipkg/microcom.control delete mode 100644 openwrt/package/microperl/Config.in delete mode 100644 openwrt/package/microperl/Makefile delete mode 100644 openwrt/package/microperl/ipkg/microperl.control delete mode 100644 openwrt/package/mini_httpd/Config.in delete mode 100644 openwrt/package/mini_httpd/Makefile delete mode 100644 openwrt/package/mini_httpd/files/matrixssl_helper.c delete mode 100644 openwrt/package/mini_httpd/files/matrixssl_helper.h delete mode 100644 openwrt/package/mini_httpd/files/mini_httpd-ssl.conf delete mode 100644 openwrt/package/mini_httpd/files/mini_httpd.conf delete mode 100644 openwrt/package/mini_httpd/files/mini_httpd.default delete mode 100644 openwrt/package/mini_httpd/files/mini_httpd.init delete mode 100644 openwrt/package/mini_httpd/files/mini_httpd.pem delete mode 100644 openwrt/package/mini_httpd/ipkg/mini-httpd-htpasswd.control delete mode 100644 openwrt/package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles delete mode 100644 openwrt/package/mini_httpd/ipkg/mini-httpd-matrixssl.control delete mode 100644 openwrt/package/mini_httpd/ipkg/mini-httpd-openssl.conffiles delete mode 100644 openwrt/package/mini_httpd/ipkg/mini-httpd-openssl.control delete mode 100644 openwrt/package/mini_httpd/ipkg/mini-httpd.conffiles delete mode 100644 openwrt/package/mini_httpd/ipkg/mini-httpd.control delete mode 100644 openwrt/package/mini_httpd/patches/001-cgi_path.patch delete mode 100644 openwrt/package/mini_httpd/patches/500-matrixssl.patch delete mode 100644 openwrt/package/mini_sendmail/Config.in delete mode 100644 openwrt/package/mini_sendmail/Makefile delete mode 100644 openwrt/package/mini_sendmail/ipkg/mini-sendmail.control delete mode 100644 openwrt/package/mini_sendmail/patches/500-flags.patch delete mode 100644 openwrt/package/miredo/Config.in delete mode 100644 openwrt/package/miredo/Makefile delete mode 100644 openwrt/package/miredo/files/miredo-server.init delete mode 100644 openwrt/package/miredo/files/miredo.init delete mode 100644 openwrt/package/miredo/ipkg/miredo-server.conffiles delete mode 100644 openwrt/package/miredo/ipkg/miredo-server.control delete mode 100644 openwrt/package/miredo/ipkg/miredo.conffiles delete mode 100644 openwrt/package/miredo/ipkg/miredo.control delete mode 100644 openwrt/package/monit/Config.in delete mode 100644 openwrt/package/monit/Makefile delete mode 100644 openwrt/package/monit/files/monit.init delete mode 100644 openwrt/package/monit/ipkg/monit-nossl.conffiles delete mode 100644 openwrt/package/monit/ipkg/monit-nossl.control delete mode 100644 openwrt/package/monit/ipkg/monit.conffiles delete mode 100644 openwrt/package/monit/ipkg/monit.control delete mode 100644 openwrt/package/motion/Config.in delete mode 100644 openwrt/package/motion/Makefile delete mode 100644 openwrt/package/motion/ipkg/motion.control delete mode 100644 openwrt/package/motion/patches/01-ffmpeg.patch delete mode 100644 openwrt/package/motion/patches/02-honor_cppflags.patch delete mode 100644 openwrt/package/mpd/Config.in delete mode 100644 openwrt/package/mpd/Makefile delete mode 100644 openwrt/package/mpd/ipkg/mpd.conffiles delete mode 100644 openwrt/package/mpd/ipkg/mpd.control delete mode 100644 openwrt/package/mrd6/Config.in delete mode 100644 openwrt/package/mrd6/Makefile delete mode 100644 openwrt/package/mrd6/files/mrd6.conf delete mode 100755 openwrt/package/mrd6/files/mrd6.init delete mode 100644 openwrt/package/mrd6/ipkg/mrd6.control delete mode 100644 openwrt/package/mrd6/patches/01-ceilf_replacement.patch delete mode 100644 openwrt/package/mt-daapd/Config.in delete mode 100644 openwrt/package/mt-daapd/Makefile delete mode 100644 openwrt/package/mt-daapd/files/mt-daapd.init delete mode 100644 openwrt/package/mt-daapd/ipkg/mt-daapd.conffiles delete mode 100644 openwrt/package/mt-daapd/ipkg/mt-daapd.control delete mode 100644 openwrt/package/mtr/Config.in delete mode 100644 openwrt/package/mtr/Makefile delete mode 100644 openwrt/package/mtr/ipkg/mtr.control delete mode 100644 openwrt/package/mtr/patches/501-dns.patch delete mode 100644 openwrt/package/mutt/Config.in delete mode 100644 openwrt/package/mutt/Makefile delete mode 100644 openwrt/package/mutt/ipkg/mutt.control delete mode 100644 openwrt/package/mysql/Config.in delete mode 100644 openwrt/package/mysql/Makefile delete mode 100644 openwrt/package/mysql/ipkg/libmysqlclient.control delete mode 100644 openwrt/package/mysql/patches/500-cross_compile.patch delete mode 100644 openwrt/package/nano/Config.in delete mode 100644 openwrt/package/nano/Makefile delete mode 100644 openwrt/package/nano/ipkg/nano.control delete mode 100644 openwrt/package/ncurses/Config.in delete mode 100644 openwrt/package/ncurses/Makefile delete mode 100644 openwrt/package/ncurses/ipkg/libncurses.control delete mode 100644 openwrt/package/ncurses/patches/500-cross.patch delete mode 100644 openwrt/package/ncurses/patches/501-cross-no_libdir.patch delete mode 100644 openwrt/package/ndisc/Config.in delete mode 100644 openwrt/package/ndisc/Makefile delete mode 100644 openwrt/package/ndisc/ipkg/ndisc6.control delete mode 100644 openwrt/package/ndisc/ipkg/rdisc6.control delete mode 100644 openwrt/package/ndisc/ipkg/tcptraceroute6.control delete mode 100644 openwrt/package/ndisc/patches/100-license.patch delete mode 100644 openwrt/package/net-snmp/Config.in delete mode 100644 openwrt/package/net-snmp/Makefile delete mode 100644 openwrt/package/net-snmp/files/snmpd.conf delete mode 100644 openwrt/package/net-snmp/files/snmpd.default delete mode 100644 openwrt/package/net-snmp/files/snmpd.init delete mode 100644 openwrt/package/net-snmp/ipkg/libnetsnmp.control delete mode 100644 openwrt/package/net-snmp/ipkg/snmp-utils.control delete mode 100644 openwrt/package/net-snmp/ipkg/snmpd-static.conffiles delete mode 100644 openwrt/package/net-snmp/ipkg/snmpd-static.control delete mode 100644 openwrt/package/net-snmp/ipkg/snmpd.conffiles delete mode 100644 openwrt/package/net-snmp/ipkg/snmpd.control delete mode 100644 openwrt/package/net-snmp/patches/500-debian-subset-5.1.2-6.1.patch delete mode 100644 openwrt/package/net-snmp/patches/750-ieee802dot11.patch delete mode 100644 openwrt/package/net-snmp/patches/901-ipsec-interfaces.patch delete mode 100644 openwrt/package/netperf/Config.in delete mode 100644 openwrt/package/netperf/Makefile delete mode 100644 openwrt/package/netperf/files/netserver.init delete mode 100644 openwrt/package/netperf/ipkg/netperf.control delete mode 100644 openwrt/package/netperf/patches/01-netperf-2.3pl1-openwrt.patch delete mode 100644 openwrt/package/netstat-nat/Config.in delete mode 100644 openwrt/package/netstat-nat/Makefile delete mode 100644 openwrt/package/netstat-nat/ipkg/netstat-nat.control delete mode 100644 openwrt/package/nfs-server/Config.in delete mode 100644 openwrt/package/nfs-server/Makefile delete mode 100644 openwrt/package/nfs-server/files/nfsd.exports delete mode 100644 openwrt/package/nfs-server/files/nfsd.init delete mode 100644 openwrt/package/nfs-server/ipkg/nfs-server.control delete mode 100644 openwrt/package/nfs-server/patches/build-config.patch delete mode 100644 openwrt/package/nfs-server/patches/cross-compile-fix.patch delete mode 100644 openwrt/package/nfs-server/patches/debian-subset.patch delete mode 100644 openwrt/package/nfs-server/patches/gcc-3.4-fix.patch delete mode 100644 openwrt/package/nfs-server/patches/remove-warning.patch delete mode 100644 openwrt/package/nmap/Config.in delete mode 100644 openwrt/package/nmap/Makefile delete mode 100644 openwrt/package/nmap/ipkg/nmap.control delete mode 100644 openwrt/package/nmap/patches/cross-compile.patch delete mode 100644 openwrt/package/nmap/patches/no_strip.patch delete mode 100644 openwrt/package/nocatsplash/Config.in delete mode 100644 openwrt/package/nocatsplash/Makefile delete mode 100644 openwrt/package/nocatsplash/ipkg/nocatsplash.conffiles delete mode 100644 openwrt/package/nocatsplash/ipkg/nocatsplash.control delete mode 100644 openwrt/package/nocatsplash/patches/openwrt-firewall.patch delete mode 100644 openwrt/package/ntpclient/Config.in delete mode 100644 openwrt/package/ntpclient/Makefile delete mode 100644 openwrt/package/ntpclient/files/ntpclient.init delete mode 100644 openwrt/package/ntpclient/ipkg/ntpclient.control delete mode 100644 openwrt/package/olsrd/Config.in delete mode 100644 openwrt/package/olsrd/Makefile delete mode 100644 openwrt/package/olsrd/files/olsrd.init delete mode 100644 openwrt/package/olsrd/files/olsrd_secure_key delete mode 100644 openwrt/package/olsrd/ipkg/olsrd-mod-dot-draw.control delete mode 100644 openwrt/package/olsrd/ipkg/olsrd-mod-dyn-gw.control delete mode 100644 openwrt/package/olsrd/ipkg/olsrd-mod-httpinfo.control delete mode 100644 openwrt/package/olsrd/ipkg/olsrd-mod-nameservice.control delete mode 100644 openwrt/package/olsrd/ipkg/olsrd-mod-power.control delete mode 100644 openwrt/package/olsrd/ipkg/olsrd-mod-secure.conffiles delete mode 100644 openwrt/package/olsrd/ipkg/olsrd-mod-secure.control delete mode 100644 openwrt/package/olsrd/ipkg/olsrd-mod-tas.control delete mode 100644 openwrt/package/olsrd/ipkg/olsrd.conffiles delete mode 100644 openwrt/package/olsrd/ipkg/olsrd.control delete mode 100644 openwrt/package/olsrd/patches/olsrd-0.4.10-opt-flags.diff delete mode 100644 openwrt/package/olsrd/patches/olsrd-0.4.9-secure-key-path.path delete mode 100644 openwrt/package/opencdk/Config.in delete mode 100644 openwrt/package/opencdk/Makefile delete mode 100644 openwrt/package/opencdk/ipkg/libopencdk.control delete mode 100644 openwrt/package/opencdk/patches/500-cross-compile.patch delete mode 100644 openwrt/package/openh323/Config.in delete mode 100644 openwrt/package/openh323/Makefile delete mode 100644 openwrt/package/openh323/ipkg/openh323.control delete mode 100644 openwrt/package/openh323/patches/001-configure.patch delete mode 100644 openwrt/package/openldap/Config.in delete mode 100644 openwrt/package/openldap/Makefile delete mode 100644 openwrt/package/openldap/ipkg/libopenldap.conffiles delete mode 100644 openwrt/package/openldap/ipkg/libopenldap.control delete mode 100644 openwrt/package/openldap/ipkg/openldap-utils.control delete mode 100644 openwrt/package/openldap/patches/500-cross-compile.patch delete mode 100644 openwrt/package/openldap/patches/750-no-strip.patch delete mode 100644 openwrt/package/openntpd/Config.in delete mode 100644 openwrt/package/openntpd/Makefile delete mode 100644 openwrt/package/openntpd/files/ntpd.conf delete mode 100644 openwrt/package/openntpd/files/ntpd.init delete mode 100644 openwrt/package/openntpd/ipkg/openntpd.conffiles delete mode 100644 openwrt/package/openntpd/ipkg/openntpd.control delete mode 100644 openwrt/package/openntpd/ipkg/openntpd.postinst delete mode 100644 openwrt/package/openntpd/patches/01-adjtimex_linux.patch delete mode 100644 openwrt/package/openser/Config.in delete mode 100644 openwrt/package/openser/Makefile delete mode 100644 openwrt/package/openser/ipkg/openser-mod-acc.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-auth-db.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-auth-radius.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-auth.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-avp-radius.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-avp_radius.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-avpops.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-dispatcher.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-diversion.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-flatstore.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-gflags.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-group-radius.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-group.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-group_radius.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-lcr.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-mediaproxy.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-msilo.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-mysql.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-nathelper.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-options.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-pdt.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-permissions.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-pike.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-sms.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-speeddial.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-uac-redirect.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-uac.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-uac_redirect.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-uri-db.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-uri-radius.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-uri.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-uri_db.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-uri_radius.control delete mode 100644 openwrt/package/openser/ipkg/openser-mod-xlog.control delete mode 100644 openwrt/package/openser/ipkg/openser.conffiles delete mode 100644 openwrt/package/openser/ipkg/openser.control delete mode 100644 openwrt/package/openser/patches/Makefile.defs.patch delete mode 100644 openwrt/package/openser/patches/cfg.lex.patch delete mode 100644 openwrt/package/openser/patches/config.h.patch delete mode 100644 openwrt/package/openser/patches/modules-build.patch delete mode 100644 openwrt/package/openser/patches/openser.cfg.patch delete mode 100644 openwrt/package/openser/patches/sc.dbtext.patch delete mode 100644 openwrt/package/openser/patches/sc.patch delete mode 100644 openwrt/package/openssh/Config.in delete mode 100644 openwrt/package/openssh/Makefile delete mode 100755 openwrt/package/openssh/files/S50sshd delete mode 100644 openwrt/package/openssh/ipkg/openssh-client-utils.control delete mode 100644 openwrt/package/openssh/ipkg/openssh-client.conffiles delete mode 100644 openwrt/package/openssh/ipkg/openssh-client.control delete mode 100644 openwrt/package/openssh/ipkg/openssh-server.conffiles delete mode 100644 openwrt/package/openssh/ipkg/openssh-server.control delete mode 100644 openwrt/package/openssh/ipkg/openssh-server.postinst delete mode 100644 openwrt/package/openssh/ipkg/openssh-sftp-client.control delete mode 100644 openwrt/package/openssh/ipkg/openssh-sftp-server.control delete mode 100644 openwrt/package/openssh/patches/100-openssl-cipher.patch delete mode 100644 openwrt/package/openssh/patches/cross-compile.patch delete mode 100644 openwrt/package/openssl/Config.in delete mode 100644 openwrt/package/openssl/Makefile delete mode 100644 openwrt/package/openssl/ipkg/libopenssl.control delete mode 100644 openwrt/package/openssl/ipkg/openssl-util.conffiles delete mode 100644 openwrt/package/openssl/ipkg/openssl-util.control delete mode 100644 openwrt/package/openssl/patches/110-optimize-for-size.patch delete mode 100644 openwrt/package/openssl/patches/120-makedepend.patch delete mode 100644 openwrt/package/openssl/patches/130-perl-path.patch delete mode 100644 openwrt/package/openssl/patches/140-makefile-dirs.patch delete mode 100644 openwrt/package/openssl/patches/150-no_engines.patch delete mode 100644 openwrt/package/openssl/patches/160-disable_doc_tests.patch delete mode 100644 openwrt/package/openswan/Config.in delete mode 100644 openwrt/package/openswan/Makefile delete mode 100644 openwrt/package/openswan/ipkg/openswan.conffiles delete mode 100644 openwrt/package/openswan/ipkg/openswan.control delete mode 100644 openwrt/package/openswan/patches/pluto-includes.patch delete mode 100644 openwrt/package/openswan/patches/scripts.patch delete mode 100644 openwrt/package/openswan/patches/use-dev-urandom.patch delete mode 100644 openwrt/package/openvpn/Config.in delete mode 100644 openwrt/package/openvpn/Makefile delete mode 100644 openwrt/package/openvpn/ipkg/openvpn.control delete mode 100644 openwrt/package/osiris/Config.in delete mode 100644 openwrt/package/osiris/Makefile delete mode 100644 openwrt/package/osiris/files/osirisd.init delete mode 100644 openwrt/package/osiris/ipkg/osirisd.control delete mode 100644 openwrt/package/osiris/patches/01-configure-cross.patch delete mode 100644 openwrt/package/osiris/patches/02-osirisd-pidfile.patch delete mode 100644 openwrt/package/osiris/patches/03-openssl-0.9.8+.patch delete mode 100644 openwrt/package/osiris/patches/mod_if.patch delete mode 100644 openwrt/package/osiris/patches/mod_nvram.patch delete mode 100644 openwrt/package/osiris/patches/mod_uptime.patch delete mode 100644 openwrt/package/p910nd/Config.in delete mode 100644 openwrt/package/p910nd/Makefile delete mode 100644 openwrt/package/p910nd/files/p910nd.default delete mode 100644 openwrt/package/p910nd/files/p910nd.init delete mode 100644 openwrt/package/p910nd/ipkg/p910nd.conffiles delete mode 100644 openwrt/package/p910nd/ipkg/p910nd.control delete mode 100644 openwrt/package/p910nd/patches/100-Makefile.patch delete mode 100644 openwrt/package/p910nd/patches/200-p910nd-0.7.patch delete mode 100644 openwrt/package/palantir/Config.in delete mode 100644 openwrt/package/palantir/Makefile delete mode 100644 openwrt/package/palantir/ipkg/palantir.conffiles delete mode 100644 openwrt/package/palantir/ipkg/palantir.control delete mode 100644 openwrt/package/parprouted/Config.in delete mode 100644 openwrt/package/parprouted/Makefile delete mode 100755 openwrt/package/parprouted/files/parprouted.default delete mode 100755 openwrt/package/parprouted/files/parprouted.init delete mode 100644 openwrt/package/parprouted/ipkg/parprouted.conffiles delete mode 100644 openwrt/package/parprouted/ipkg/parprouted.control delete mode 100644 openwrt/package/parprouted/patches/parprouted.patch delete mode 100644 openwrt/package/pciutils/Config.in delete mode 100644 openwrt/package/pciutils/Makefile delete mode 100644 openwrt/package/pciutils/ipkg/pciutils.control delete mode 100644 openwrt/package/pcre/Config.in delete mode 100644 openwrt/package/pcre/Makefile delete mode 100644 openwrt/package/pcre/ipkg/libpcre.control delete mode 100644 openwrt/package/pcre/patches/100-honor_cppflags_ldflags.patch delete mode 100644 openwrt/package/pcre/patches/750-pcre_config_cross.patch delete mode 100644 openwrt/package/peercast/Config.in delete mode 100644 openwrt/package/peercast/Makefile delete mode 100644 openwrt/package/peercast/files/peercast.ini delete mode 100644 openwrt/package/peercast/files/peercast.init delete mode 100644 openwrt/package/peercast/ipkg/peercast.conffiles delete mode 100644 openwrt/package/peercast/ipkg/peercast.control delete mode 100755 openwrt/package/peerguardian/Config.in delete mode 100755 openwrt/package/peerguardian/Makefile delete mode 100644 openwrt/package/peerguardian/files/peerguardian.init delete mode 100644 openwrt/package/peerguardian/ipkg/peerguardian.control delete mode 100755 openwrt/package/peerguardian/patches/01-honor-libipq.patch delete mode 100644 openwrt/package/php4/Config.in delete mode 100644 openwrt/package/php4/Makefile delete mode 100644 openwrt/package/php4/files/php.ini delete mode 100644 openwrt/package/php4/files/php.init delete mode 100644 openwrt/package/php4/ipkg/php4-cgi.conffiles delete mode 100644 openwrt/package/php4/ipkg/php4-cgi.control delete mode 100644 openwrt/package/php4/ipkg/php4-cli.conffiles delete mode 100644 openwrt/package/php4/ipkg/php4-cli.control delete mode 100644 openwrt/package/php4/ipkg/php4-fastcgi.conffiles delete mode 100644 openwrt/package/php4/ipkg/php4-fastcgi.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-curl.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-ftp.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-gd.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-gmp.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-ldap.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-mysql.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-openssl.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-pcre.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-pgsql.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-session.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-sockets.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-sqlite.control delete mode 100644 openwrt/package/php4/ipkg/php4-mod-xml.control delete mode 100644 openwrt/package/php4/patches/php-4.3.11-sqlite-1.0.patch delete mode 100644 openwrt/package/php4/patches/php4_configure.patch delete mode 100644 openwrt/package/php4/patches/php4_dns_skipname.patch delete mode 100644 openwrt/package/php5/Config.in delete mode 100644 openwrt/package/php5/Makefile delete mode 100644 openwrt/package/php5/files/php.ini delete mode 100644 openwrt/package/php5/files/php.init delete mode 100644 openwrt/package/php5/ipkg/php5-cgi.conffiles delete mode 100644 openwrt/package/php5/ipkg/php5-cgi.control delete mode 100644 openwrt/package/php5/ipkg/php5-cli.conffiles delete mode 100644 openwrt/package/php5/ipkg/php5-cli.control delete mode 100644 openwrt/package/php5/ipkg/php5-fastcgi.conffiles delete mode 100644 openwrt/package/php5/ipkg/php5-fastcgi.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-curl.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-ftp.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-gd.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-gmp.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-ldap.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-mysql.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-openssl.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-pcre.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-pgsql.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-session.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-sockets.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-sqlite.control delete mode 100644 openwrt/package/php5/ipkg/php5-mod-xml.control delete mode 100644 openwrt/package/php5/patches/php-5.0.4-configure-cross.patch delete mode 100644 openwrt/package/picocom/Config.in delete mode 100644 openwrt/package/picocom/Makefile delete mode 100644 openwrt/package/picocom/ipkg/picocom.control delete mode 100644 openwrt/package/pipacs/Config.in delete mode 100644 openwrt/package/pipacs/Makefile delete mode 100644 openwrt/package/pipacs/ipkg/pipacs.control delete mode 100644 openwrt/package/pipacs/src/Makefile delete mode 100644 openwrt/package/pipacs/src/parser.c delete mode 100644 openwrt/package/pipacs/src/parser.h delete mode 100644 openwrt/package/pipacs/src/pipacs.c delete mode 100644 openwrt/package/pmacct/Config.in delete mode 100644 openwrt/package/pmacct/Makefile delete mode 100644 openwrt/package/pmacct/files/nfacctd.conf delete mode 100644 openwrt/package/pmacct/files/nfacctd.default delete mode 100644 openwrt/package/pmacct/files/nfacctd.init delete mode 100644 openwrt/package/pmacct/files/pmacctd.conf delete mode 100644 openwrt/package/pmacct/files/pmacctd.default delete mode 100644 openwrt/package/pmacct/files/pmacctd.init delete mode 100644 openwrt/package/pmacct/ipkg/nfacctd-custom.control delete mode 100644 openwrt/package/pmacct/ipkg/nfacctd-mysql.control delete mode 100644 openwrt/package/pmacct/ipkg/nfacctd-pgsql.control delete mode 100644 openwrt/package/pmacct/ipkg/nfacctd-sqlite.control delete mode 100644 openwrt/package/pmacct/ipkg/nfacctd.conffiles delete mode 100644 openwrt/package/pmacct/ipkg/nfacctd.control delete mode 100644 openwrt/package/pmacct/ipkg/pmacct-client.control delete mode 100644 openwrt/package/pmacct/ipkg/pmacctd-custom.control delete mode 100644 openwrt/package/pmacct/ipkg/pmacctd-mysql.control delete mode 100644 openwrt/package/pmacct/ipkg/pmacctd-pgsql.control delete mode 100644 openwrt/package/pmacct/ipkg/pmacctd-sqlite.control delete mode 100644 openwrt/package/pmacct/ipkg/pmacctd.conffiles delete mode 100644 openwrt/package/pmacct/ipkg/pmacctd.control delete mode 100644 openwrt/package/popt/Config.in delete mode 100644 openwrt/package/popt/Makefile delete mode 100644 openwrt/package/popt/ipkg/libpopt.control delete mode 100644 openwrt/package/portmap/Config.in delete mode 100644 openwrt/package/portmap/Makefile delete mode 100644 openwrt/package/portmap/files/portmap.init delete mode 100644 openwrt/package/portmap/ipkg/portmap.control delete mode 100644 openwrt/package/portmap/patches/debian-subset.patch delete mode 100644 openwrt/package/portsentry/Config.in delete mode 100644 openwrt/package/portsentry/Makefile delete mode 100644 openwrt/package/portsentry/ipkg/portsentry.conffiles delete mode 100644 openwrt/package/portsentry/ipkg/portsentry.control delete mode 100644 openwrt/package/portsentry/patches/100-conf_location.patch delete mode 100644 openwrt/package/portsentry/patches/101-postsentry_c.patch delete mode 100644 openwrt/package/postgresql/Config.in delete mode 100644 openwrt/package/postgresql/Makefile delete mode 100644 openwrt/package/postgresql/ipkg/libpq.control delete mode 100644 openwrt/package/postgresql/ipkg/pgsql-cli.control delete mode 100644 openwrt/package/postgresql/patches/100-debian-12asmconstraints delete mode 100644 openwrt/package/postgresql/patches/101-debian-27dbf2pg-textfield delete mode 100644 openwrt/package/postgresql/patches/102-debian-30libpq delete mode 100644 openwrt/package/postgresql/patches/750-configure-honor-cppflags.patch delete mode 100644 openwrt/package/pptpd/Config.in delete mode 100644 openwrt/package/pptpd/Makefile delete mode 100644 openwrt/package/pptpd/files/options.pptpd delete mode 100644 openwrt/package/pptpd/files/pptpd.conf delete mode 100644 openwrt/package/pptpd/files/pptpd.init delete mode 100644 openwrt/package/pptpd/ipkg/pptpd.conffiles delete mode 100644 openwrt/package/pptpd/ipkg/pptpd.control delete mode 100644 openwrt/package/privoxy/Config.in delete mode 100644 openwrt/package/privoxy/Makefile delete mode 100644 openwrt/package/privoxy/ipkg/privoxy.control delete mode 100644 openwrt/package/privoxy/patches/100-crosscompile.patch delete mode 100644 openwrt/package/privoxy/patches/101-destdir.patch delete mode 100644 openwrt/package/procmail/Config.in delete mode 100644 openwrt/package/procmail/Makefile delete mode 100644 openwrt/package/procmail/ipkg/procmail.control delete mode 100644 openwrt/package/procmail/patches/promail_openwrt.patch delete mode 100644 openwrt/package/psybnc/Config.in delete mode 100644 openwrt/package/psybnc/Makefile delete mode 100644 openwrt/package/psybnc/ipkg/psybnc.control delete mode 100644 openwrt/package/psybnc/patches/Makefile.patch delete mode 100644 openwrt/package/psybnc/patches/psybnc.conf.patch delete mode 100644 openwrt/package/psybnc/patches/psybnc.patch delete mode 100644 openwrt/package/psybnc/patches/startscript.patch delete mode 100644 openwrt/package/ptunnel/Config.in delete mode 100644 openwrt/package/ptunnel/Makefile delete mode 100644 openwrt/package/ptunnel/ipkg/ptunnel.control delete mode 100644 openwrt/package/pwlib/Config.in delete mode 100644 openwrt/package/pwlib/Makefile delete mode 100644 openwrt/package/pwlib/ipkg/pwlib.control delete mode 100644 openwrt/package/pwlib/patches/002-lib_mak.patch delete mode 100644 openwrt/package/quagga/Config.in delete mode 100644 openwrt/package/quagga/Makefile delete mode 100644 openwrt/package/quagga/files/quagga.init delete mode 100644 openwrt/package/quagga/ipkg/quagga-bgpd.control delete mode 100644 openwrt/package/quagga/ipkg/quagga-ospf6d.control delete mode 100644 openwrt/package/quagga/ipkg/quagga-ospfd.control delete mode 100644 openwrt/package/quagga/ipkg/quagga-ripd.control delete mode 100644 openwrt/package/quagga/ipkg/quagga-ripngd.control delete mode 100644 openwrt/package/quagga/ipkg/quagga-vtysh.control delete mode 100644 openwrt/package/quagga/ipkg/quagga.control delete mode 100644 openwrt/package/quagga/ipkg/quagga.postinst delete mode 100644 openwrt/package/quagga/patches/quagga-cross.patch delete mode 100644 openwrt/package/quagga/patches/quagga-readline.patch delete mode 100755 openwrt/package/raddump/Config.in delete mode 100755 openwrt/package/raddump/Makefile delete mode 100755 openwrt/package/raddump/ipkg/raddump.control delete mode 100644 openwrt/package/radiusclient-ng/Config.in delete mode 100644 openwrt/package/radiusclient-ng/Makefile delete mode 100644 openwrt/package/radiusclient-ng/ipkg/libradiusclient-ng.control delete mode 100644 openwrt/package/radiusclient-ng/ipkg/radiusclient-ng.control delete mode 100644 openwrt/package/radiusclient-ng/patches/01-cross_compile.patch delete mode 100644 openwrt/package/radvd/Config.in delete mode 100644 openwrt/package/radvd/Makefile delete mode 100644 openwrt/package/radvd/files/radvd.conf delete mode 100644 openwrt/package/radvd/files/radvd.init delete mode 100644 openwrt/package/radvd/ipkg/radvd.conffiles delete mode 100644 openwrt/package/radvd/ipkg/radvd.control delete mode 100644 openwrt/package/radvd/patches/no-libfl.patch delete mode 100644 openwrt/package/rarpd/Config.in delete mode 100644 openwrt/package/rarpd/Makefile delete mode 100644 openwrt/package/rarpd/files/rarpd.default delete mode 100644 openwrt/package/rarpd/files/rarpd.init delete mode 100644 openwrt/package/rarpd/ipkg/rarpd.conffiles delete mode 100644 openwrt/package/rarpd/ipkg/rarpd.control delete mode 100644 openwrt/package/readline/Config.in delete mode 100644 openwrt/package/readline/Makefile delete mode 100644 openwrt/package/readline/ipkg/libreadline.control delete mode 100644 openwrt/package/reaim/Config.in delete mode 100644 openwrt/package/reaim/Makefile delete mode 100644 openwrt/package/reaim/files/reaim.init delete mode 100644 openwrt/package/reaim/ipkg/reaim.control delete mode 100644 openwrt/package/reaim/patches/501-cross_compile-install.patch delete mode 100644 openwrt/package/rp-pppoe/Config.in delete mode 100644 openwrt/package/rp-pppoe/Makefile delete mode 100644 openwrt/package/rp-pppoe/files/pppoe-client.init delete mode 100644 openwrt/package/rp-pppoe/files/pppoe-relay.default delete mode 100644 openwrt/package/rp-pppoe/files/pppoe-relay.init delete mode 100644 openwrt/package/rp-pppoe/files/pppoe-server.default delete mode 100644 openwrt/package/rp-pppoe/files/pppoe-server.init delete mode 100644 openwrt/package/rp-pppoe/ipkg/pppoe-client.conffiles delete mode 100644 openwrt/package/rp-pppoe/ipkg/pppoe-client.control delete mode 100644 openwrt/package/rp-pppoe/ipkg/pppoe-relay.conffiles delete mode 100644 openwrt/package/rp-pppoe/ipkg/pppoe-relay.control delete mode 100644 openwrt/package/rp-pppoe/ipkg/pppoe-server.conffiles delete mode 100644 openwrt/package/rp-pppoe/ipkg/pppoe-server.control delete mode 100644 openwrt/package/rp-pppoe/ipkg/pppoe-sniff.control delete mode 100644 openwrt/package/rp-pppoe/ipkg/rules delete mode 100644 openwrt/package/rp-pppoe/ipkg/version delete mode 100644 openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-Makefile.patch delete mode 100644 openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-configure.patch delete mode 100644 openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-scripts-fixes.patch delete mode 100644 openwrt/package/rrdcollect/Config.in delete mode 100644 openwrt/package/rrdcollect/Makefile delete mode 100644 openwrt/package/rrdcollect/files/rrd.conf delete mode 100644 openwrt/package/rrdcollect/files/rrd.sh delete mode 100644 openwrt/package/rrdcollect/files/rrdcollect.conf delete mode 100644 openwrt/package/rrdcollect/files/rrdcollect.init delete mode 100644 openwrt/package/rrdcollect/ipkg/rrdcollect-example.conffiles delete mode 100644 openwrt/package/rrdcollect/ipkg/rrdcollect-example.control delete mode 100644 openwrt/package/rrdcollect/ipkg/rrdcollect.control delete mode 100644 openwrt/package/rrdcollect/patches/rrdcollect-scan.patch delete mode 100644 openwrt/package/rrdtool/Config.in delete mode 100644 openwrt/package/rrdtool/Makefile delete mode 100644 openwrt/package/rrdtool/ipkg/librrd.control delete mode 100644 openwrt/package/rrdtool/ipkg/rrdcgi.control delete mode 100644 openwrt/package/rrdtool/ipkg/rrdtool.control delete mode 100644 openwrt/package/rrdtool1/Config.in delete mode 100644 openwrt/package/rrdtool1/Makefile delete mode 100644 openwrt/package/rrdtool1/ipkg/librrd1.control delete mode 100644 openwrt/package/rrdtool1/ipkg/rrdcgi1.control delete mode 100644 openwrt/package/rrdtool1/ipkg/rrdtool1.control delete mode 100644 openwrt/package/rrs/Config.in delete mode 100644 openwrt/package/rrs/Makefile delete mode 100644 openwrt/package/rrs/ipkg/rrs-nossl.control delete mode 100644 openwrt/package/rrs/ipkg/rrs.control delete mode 100644 openwrt/package/rrs/patches/rrs-1.70-shell.patch delete mode 100644 openwrt/package/rsync/Config.in delete mode 100644 openwrt/package/rsync/Makefile delete mode 100644 openwrt/package/rsync/ipkg/rsync.control delete mode 100644 openwrt/package/sablevm-classpath/Config.in delete mode 100644 openwrt/package/sablevm-classpath/Makefile delete mode 100644 openwrt/package/sablevm-classpath/files/mini.classlist delete mode 100644 openwrt/package/sablevm-classpath/ipkg/libsablevm-classpath.control delete mode 100644 openwrt/package/sablevm-classpath/ipkg/sablevm-classpath-full.control delete mode 100644 openwrt/package/sablevm-classpath/ipkg/sablevm-classpath-mini.control delete mode 100644 openwrt/package/sablevm/Config.in delete mode 100644 openwrt/package/sablevm/Makefile delete mode 100644 openwrt/package/sablevm/ipkg/sablevm.control delete mode 100644 openwrt/package/samba/Config.in delete mode 100644 openwrt/package/samba/Makefile delete mode 100644 openwrt/package/samba/files/samba.init delete mode 100644 openwrt/package/samba/files/smb.conf delete mode 100644 openwrt/package/samba/ipkg/samba-client.control delete mode 100644 openwrt/package/samba/ipkg/samba.conffiles delete mode 100644 openwrt/package/samba/ipkg/samba.control delete mode 100644 openwrt/package/samba/patches/100-samba.patch delete mode 100644 openwrt/package/samba/patches/200-security.patch delete mode 100644 openwrt/package/samba/patches/250-writex.patch delete mode 100644 openwrt/package/samba/patches/300-shared_lib_ldflags_fix.patch delete mode 100644 openwrt/package/samba/patches/301-config_files_path.patch delete mode 100644 openwrt/package/sane-backends/Config.in delete mode 100644 openwrt/package/sane-backends/Makefile delete mode 100644 openwrt/package/sane-backends/ipkg/sane-backends.conffiles delete mode 100644 openwrt/package/sane-backends/ipkg/sane-backends.control delete mode 100644 openwrt/package/sane-backends/patches/001-remove-unneeded.patch delete mode 100644 openwrt/package/scanlogd/Config.in delete mode 100644 openwrt/package/scanlogd/Makefile delete mode 100755 openwrt/package/scanlogd/files/scanlogd.init delete mode 100644 openwrt/package/scanlogd/ipkg/scanlogd.control delete mode 100644 openwrt/package/scanlogd/ipkg/scanlogd.postinst delete mode 100644 openwrt/package/scdp/Config.in delete mode 100644 openwrt/package/scdp/Makefile delete mode 100644 openwrt/package/scdp/ipkg/scdp.control delete mode 100644 openwrt/package/screen/Config.in delete mode 100644 openwrt/package/screen/Makefile delete mode 100644 openwrt/package/screen/ipkg/screen.control delete mode 100644 openwrt/package/screen/patches/100-cross_compile_fix.patch delete mode 100644 openwrt/package/ser2net/Config.in delete mode 100644 openwrt/package/ser2net/Makefile delete mode 100644 openwrt/package/ser2net/ipkg/ser2net.conffiles delete mode 100644 openwrt/package/ser2net/ipkg/ser2net.control delete mode 100644 openwrt/package/serdisplib/Config.in delete mode 100644 openwrt/package/serdisplib/Makefile delete mode 100644 openwrt/package/serdisplib/ipkg/serdisplib.control delete mode 100644 openwrt/package/serdisplib/patches/100-io.patch delete mode 100644 openwrt/package/serdisplib/patches/101-test_shared.patch delete mode 100644 openwrt/package/setpwc/Config.in delete mode 100644 openwrt/package/setpwc/Makefile delete mode 100644 openwrt/package/setpwc/ipkg/setpwc.control delete mode 100644 openwrt/package/setserial/Config.in delete mode 100644 openwrt/package/setserial/Makefile delete mode 100644 openwrt/package/setserial/files/serial.init delete mode 100644 openwrt/package/setserial/ipkg/setserial.control delete mode 100644 openwrt/package/shat/Config.in delete mode 100644 openwrt/package/shat/Makefile delete mode 100644 openwrt/package/shat/ipkg/shat.control delete mode 100644 openwrt/package/shfs/Config.in delete mode 100644 openwrt/package/shfs/Makefile delete mode 100644 openwrt/package/shfs/ipkg/shfs-utils.control delete mode 100644 openwrt/package/shfs/patches/101-kmod-build.patch delete mode 100644 openwrt/package/shfs/patches/102-utils-build-fixes.patch delete mode 100644 openwrt/package/sipp/Config.in delete mode 100644 openwrt/package/sipp/Makefile delete mode 100644 openwrt/package/sipp/ipkg/sipp.control delete mode 100644 openwrt/package/siproxd/Config.in delete mode 100644 openwrt/package/siproxd/Makefile delete mode 100644 openwrt/package/siproxd/files/siproxd.init delete mode 100644 openwrt/package/siproxd/ipkg/siproxd.conffiles delete mode 100644 openwrt/package/siproxd/ipkg/siproxd.control delete mode 100644 openwrt/package/sipsak/Config.in delete mode 100644 openwrt/package/sipsak/Makefile delete mode 100644 openwrt/package/sipsak/ipkg/sipsak.control delete mode 100644 openwrt/package/slurm/Config.in delete mode 100644 openwrt/package/slurm/Makefile delete mode 100644 openwrt/package/slurm/ipkg/slurm.control delete mode 100644 openwrt/package/slurm/patches/no_host_ncurses.patch delete mode 100644 openwrt/package/snort-wireless/Config.in delete mode 100644 openwrt/package/snort-wireless/Makefile delete mode 100644 openwrt/package/snort-wireless/files/snort-wireless.default delete mode 100644 openwrt/package/snort-wireless/files/snort-wireless.init delete mode 100644 openwrt/package/snort-wireless/ipkg/snort-wireless-custom.control delete mode 100644 openwrt/package/snort-wireless/ipkg/snort-wireless-mysql.control delete mode 100644 openwrt/package/snort-wireless/ipkg/snort-wireless-pgsql.control delete mode 100644 openwrt/package/snort-wireless/ipkg/snort-wireless.conffiles delete mode 100644 openwrt/package/snort-wireless/ipkg/snort-wireless.control delete mode 100644 openwrt/package/snort-wireless/patches/500-no-config-search.patch delete mode 100644 openwrt/package/snort-wireless/patches/750-lightweight-config.patch delete mode 100644 openwrt/package/snort/Config.in delete mode 100644 openwrt/package/snort/Makefile delete mode 100644 openwrt/package/snort/files/snort.default delete mode 100644 openwrt/package/snort/files/snort.init delete mode 100644 openwrt/package/snort/ipkg/snort-custom.control delete mode 100644 openwrt/package/snort/ipkg/snort-mysql.control delete mode 100644 openwrt/package/snort/ipkg/snort-pgsql.control delete mode 100644 openwrt/package/snort/ipkg/snort.conffiles delete mode 100644 openwrt/package/snort/ipkg/snort.control delete mode 100644 openwrt/package/snort/patches/500-no-config-search.patch delete mode 100644 openwrt/package/snort/patches/750-lightweight-config.patch delete mode 100644 openwrt/package/socat/Config.in delete mode 100644 openwrt/package/socat/Makefile delete mode 100644 openwrt/package/socat/ipkg/socat.control delete mode 100644 openwrt/package/socat/patches/501-honor_ldflags.patch delete mode 100644 openwrt/package/speex/Config.in delete mode 100644 openwrt/package/speex/Makefile delete mode 100644 openwrt/package/speex/ipkg/libspeex.control delete mode 100644 openwrt/package/sqlite/Config.in delete mode 100644 openwrt/package/sqlite/Makefile delete mode 100644 openwrt/package/sqlite/ipkg/libsqlite.control delete mode 100644 openwrt/package/sqlite/ipkg/sqlite-cli.control delete mode 100644 openwrt/package/sqlite2/Config.in delete mode 100644 openwrt/package/sqlite2/Makefile delete mode 100644 openwrt/package/sqlite2/ipkg/libsqlite2.control delete mode 100644 openwrt/package/sqlite2/ipkg/sqlite2-cli.control delete mode 100644 openwrt/package/srelay/Config.in delete mode 100644 openwrt/package/srelay/Makefile delete mode 100644 openwrt/package/srelay/files/srelay.conf delete mode 100755 openwrt/package/srelay/files/srelay.init delete mode 100644 openwrt/package/srelay/ipkg/srelay.conffiles delete mode 100644 openwrt/package/srelay/ipkg/srelay.control delete mode 100644 openwrt/package/srelay/patches/01-cross_compile.patch delete mode 100644 openwrt/package/ssltunnel/Config.in delete mode 100644 openwrt/package/ssltunnel/Makefile delete mode 100644 openwrt/package/ssltunnel/ipkg/ssltunnel.control delete mode 100644 openwrt/package/ssmtp/Config.in delete mode 100644 openwrt/package/ssmtp/Makefile delete mode 100644 openwrt/package/ssmtp/ipkg/ssmtp.conffiles delete mode 100644 openwrt/package/ssmtp/ipkg/ssmtp.control delete mode 100644 openwrt/package/ssmtp/patches/500-debian-subset-2.61-2.patch delete mode 100644 openwrt/package/ssmtp/patches/901-strftime_space_padding.patch delete mode 100644 openwrt/package/strace/Config.in delete mode 100644 openwrt/package/strace/Makefile delete mode 100644 openwrt/package/strace/ipkg/strace.control delete mode 100644 openwrt/package/syslog-ng/Config.in delete mode 100644 openwrt/package/syslog-ng/Makefile delete mode 100644 openwrt/package/syslog-ng/files/syslog-ng.conf delete mode 100755 openwrt/package/syslog-ng/files/syslog-ng.init delete mode 100644 openwrt/package/syslog-ng/ipkg/syslog-ng.conffiles delete mode 100644 openwrt/package/syslog-ng/ipkg/syslog-ng.control delete mode 100644 openwrt/package/syslog-ng/patches/01-no_lfl.patch delete mode 100644 openwrt/package/tcp_wrappers/Config.in delete mode 100644 openwrt/package/tcp_wrappers/Makefile delete mode 100644 openwrt/package/tcp_wrappers/patches/debian-subset.patch delete mode 100644 openwrt/package/tcp_wrappers/patches/opt_cflags.patch delete mode 100644 openwrt/package/tcpdump/Config.in delete mode 100644 openwrt/package/tcpdump/Makefile delete mode 100644 openwrt/package/tcpdump/ipkg/tcpdump.control delete mode 100644 openwrt/package/tcpdump/patches/remove-pcap-debug.patch delete mode 100644 openwrt/package/tinc/Config.in delete mode 100644 openwrt/package/tinc/Makefile delete mode 100644 openwrt/package/tinc/ipkg/tinc.control delete mode 100644 openwrt/package/tinyproxy/Config.in delete mode 100644 openwrt/package/tinyproxy/Makefile delete mode 100755 openwrt/package/tinyproxy/files/tinyproxy.init delete mode 100644 openwrt/package/tinyproxy/ipkg/tinyproxy.control delete mode 100644 openwrt/package/tmsnc/Config.in delete mode 100644 openwrt/package/tmsnc/Makefile delete mode 100644 openwrt/package/tmsnc/ipkg/tmsnc.control delete mode 100644 openwrt/package/tor/Config.in delete mode 100644 openwrt/package/tor/Makefile delete mode 100644 openwrt/package/tor/files/tor.init delete mode 100644 openwrt/package/tor/files/torrc delete mode 100644 openwrt/package/tor/ipkg/tor.conffiles delete mode 100644 openwrt/package/tor/ipkg/tor.control delete mode 100644 openwrt/package/tor/ipkg/tor.postinst delete mode 100644 openwrt/package/ttcp/Config.in delete mode 100644 openwrt/package/ttcp/Makefile delete mode 100644 openwrt/package/ttcp/ipkg/ttcp.control delete mode 100644 openwrt/package/ttcp/ttcp.c delete mode 100644 openwrt/package/uclibc++/Config.in delete mode 100644 openwrt/package/uclibc++/Makefile delete mode 100644 openwrt/package/uclibc++/files/config.i386 delete mode 100644 openwrt/package/uclibc++/files/config.mips delete mode 100644 openwrt/package/uclibc++/ipkg/uclibc++.control delete mode 100644 openwrt/package/uclibc++/patches/cross-compile.patch delete mode 100644 openwrt/package/udp-broadcast-relay/Config.in delete mode 100644 openwrt/package/udp-broadcast-relay/Makefile delete mode 100644 openwrt/package/udp-broadcast-relay/ipkg/udp-broadcast-relay.control delete mode 100644 openwrt/package/ulogd/Config.in delete mode 100644 openwrt/package/ulogd/Makefile delete mode 100644 openwrt/package/ulogd/files/ulogd.default delete mode 100644 openwrt/package/ulogd/files/ulogd.init delete mode 100644 openwrt/package/ulogd/ipkg/ulogd-mod-extra.control delete mode 100644 openwrt/package/ulogd/ipkg/ulogd-mod-mysql.control delete mode 100644 openwrt/package/ulogd/ipkg/ulogd-mod-pgsql.control delete mode 100644 openwrt/package/ulogd/ipkg/ulogd.conffiles delete mode 100644 openwrt/package/ulogd/ipkg/ulogd.control delete mode 100644 openwrt/package/ulogd/patches/ulogd-1.23-gcc4.patch delete mode 100644 openwrt/package/ulogd/patches/ulogd-1.23-inc-patch.patch delete mode 100644 openwrt/package/ulogd/patches/ulogd-1.23-no-rej.patch delete mode 100644 openwrt/package/updatedd/Config.in delete mode 100644 openwrt/package/updatedd/Makefile delete mode 100644 openwrt/package/updatedd/files/S55ddns delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-changeip.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-dyndns.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-eurodyndns.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-hn.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-noip.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-ods.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-ovh.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-regfish.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd-mod-tzo.control delete mode 100644 openwrt/package/updatedd/ipkg/updatedd.control delete mode 100644 openwrt/package/usbutils/Config.in delete mode 100644 openwrt/package/usbutils/Makefile delete mode 100644 openwrt/package/usbutils/ipkg/lsusb.control delete mode 100644 openwrt/package/ustl/Config.in delete mode 100644 openwrt/package/ustl/Makefile delete mode 100644 openwrt/package/ustl/files/Common.mk delete mode 100644 openwrt/package/ustl/files/config.h delete mode 100644 openwrt/package/ustl/ipkg/ustl.control delete mode 100644 openwrt/package/ustl/patches/01-install-DESTDIR.patch delete mode 100644 openwrt/package/ustl/patches/02-install_path.patch delete mode 100644 openwrt/package/util-linux/Config.in delete mode 100644 openwrt/package/util-linux/Makefile delete mode 100644 openwrt/package/util-linux/ipkg/fdisk.control delete mode 100644 openwrt/package/util-linux/ipkg/losetup.control delete mode 100644 openwrt/package/util-linux/ipkg/swap-utils.control delete mode 100644 openwrt/package/util-linux/patches/501-mconfig.patch delete mode 100755 openwrt/package/vgp/Config.in delete mode 100755 openwrt/package/vgp/Makefile delete mode 100755 openwrt/package/vgp/ipkg/vgp.control delete mode 100644 openwrt/package/vim/Config.in delete mode 100644 openwrt/package/vim/Makefile delete mode 100644 openwrt/package/vim/files/vimrc delete mode 100644 openwrt/package/vim/ipkg/vim.control delete mode 100644 openwrt/package/vim/patches/vim_configure.patch delete mode 100755 openwrt/package/vnc-reflector/Config.in delete mode 100644 openwrt/package/vnc-reflector/Makefile delete mode 100755 openwrt/package/vnc-reflector/ipkg/vnc-reflector.control delete mode 100644 openwrt/package/vnc-reflector/patches/01-honor_include_lib_path.patch delete mode 100644 openwrt/package/vncrepeater/Config.in delete mode 100644 openwrt/package/vncrepeater/Makefile delete mode 100644 openwrt/package/vncrepeater/ipkg/vncrepeater.control delete mode 100644 openwrt/package/vncrepeater/patches/01-uclibcxx_linking.patch delete mode 100644 openwrt/package/vrrpd/Config.in delete mode 100644 openwrt/package/vrrpd/Makefile delete mode 100644 openwrt/package/vrrpd/files/vrrpd.default delete mode 100644 openwrt/package/vrrpd/files/vrrpd.init delete mode 100644 openwrt/package/vrrpd/ipkg/vrrpd.conffiles delete mode 100644 openwrt/package/vrrpd/ipkg/vrrpd.control delete mode 100644 openwrt/package/vsftpd/Config.in delete mode 100644 openwrt/package/vsftpd/Makefile delete mode 100644 openwrt/package/vsftpd/files/vsftpd.conf delete mode 100644 openwrt/package/vsftpd/files/vsftpd.init delete mode 100644 openwrt/package/vsftpd/ipkg/vsftpd.conffiles delete mode 100644 openwrt/package/vsftpd/ipkg/vsftpd.control delete mode 100644 openwrt/package/vsftpd/patches/chroot.patch delete mode 100644 openwrt/package/vsftpd/patches/destdir.patch delete mode 100644 openwrt/package/vsftpd/patches/find-libs.patch delete mode 100644 openwrt/package/vtun/Config.in delete mode 100644 openwrt/package/vtun/Makefile delete mode 100644 openwrt/package/vtun/ipkg/vtun.conffiles delete mode 100644 openwrt/package/vtun/ipkg/vtun.control delete mode 100644 openwrt/package/watchdog/Config.in delete mode 100644 openwrt/package/watchdog/Makefile delete mode 100644 openwrt/package/watchdog/files/watchdog.init delete mode 100644 openwrt/package/watchdog/ipkg/watchdog.conffiles delete mode 100644 openwrt/package/watchdog/ipkg/watchdog.control delete mode 100644 openwrt/package/watchdog/patches/01-fstab-sys_siglist.patch delete mode 100644 openwrt/package/wccpd/Config.in delete mode 100644 openwrt/package/wccpd/Makefile delete mode 100644 openwrt/package/wccpd/ipkg/wccpd.control delete mode 100644 openwrt/package/weechat/Config.in delete mode 100644 openwrt/package/weechat/Makefile delete mode 100644 openwrt/package/weechat/ipkg/weechat.control delete mode 100644 openwrt/package/wifidog/Config.in delete mode 100644 openwrt/package/wifidog/Makefile delete mode 100644 openwrt/package/wifidog/files/wifidog.conf delete mode 100644 openwrt/package/wifidog/files/wifidog.init delete mode 100644 openwrt/package/wifidog/ipkg/wifidog.conffiles delete mode 100644 openwrt/package/wifidog/ipkg/wifidog.control delete mode 100644 openwrt/package/wiviz/Config.in delete mode 100644 openwrt/package/wiviz/Makefile delete mode 100755 openwrt/package/wiviz/files/www/cgi-bin/wiviz/get.cgi delete mode 100755 openwrt/package/wiviz/files/www/cgi-bin/wiviz/set.cgi delete mode 100755 openwrt/package/wiviz/files/www/wiviz/adhoc-idle.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/adhoc-idle.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/adhoc.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/adhoc.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/ap-idle.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/ap-idle.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/ap-wep-idle.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/ap-wep-idle.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/ap-wep.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/ap-wep.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/ap.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/ap.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/pip-idle.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/pip-idle.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/pip.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/pip.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/station-idle.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/station-idle.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/station.gif delete mode 100755 openwrt/package/wiviz/files/www/wiviz/station.png delete mode 100755 openwrt/package/wiviz/files/www/wiviz/wiviz.css delete mode 100755 openwrt/package/wiviz/files/www/wiviz/wiviz.html delete mode 100755 openwrt/package/wiviz/files/www/wiviz/wiviz.js delete mode 100644 openwrt/package/wiviz/ipkg/wiviz.control delete mode 100644 openwrt/package/wiviz/src/Makefile delete mode 100644 openwrt/package/wiviz/src/channelhopper.c delete mode 100644 openwrt/package/wiviz/src/channelhopper.h delete mode 100644 openwrt/package/wiviz/src/structs.h delete mode 100644 openwrt/package/wiviz/src/wiviz.c delete mode 100644 openwrt/package/wiviz/src/wl_access.c delete mode 100644 openwrt/package/wiviz/src/wl_access.h delete mode 100644 openwrt/package/wknock/Config.in delete mode 100644 openwrt/package/wknock/Makefile delete mode 100644 openwrt/package/wknock/ipkg/wknock.control delete mode 100644 openwrt/package/wol/Config.in delete mode 100644 openwrt/package/wol/Makefile delete mode 100644 openwrt/package/wol/ipkg/wol.control delete mode 100644 openwrt/package/wondershaper/Config.in delete mode 100644 openwrt/package/wondershaper/Makefile delete mode 100644 openwrt/package/wondershaper/ipkg/wondershaper.conffiles delete mode 100644 openwrt/package/wondershaper/ipkg/wondershaper.control delete mode 100644 openwrt/package/wondershaper/patches/wondershaper-OpenWrt.patch delete mode 100644 openwrt/package/wpa_supplicant/Config.in delete mode 100644 openwrt/package/wpa_supplicant/Makefile delete mode 100644 openwrt/package/wpa_supplicant/files/config delete mode 100644 openwrt/package/wpa_supplicant/ipkg/wpa-supplicant.control delete mode 100644 openwrt/package/wpa_supplicant/patches/101-ldflags.patch delete mode 100644 openwrt/package/wpa_supplicant/patches/102-opt_cflags.patch delete mode 100644 openwrt/package/wput/Config.in delete mode 100644 openwrt/package/wput/Makefile delete mode 100644 openwrt/package/wput/ipkg/wput.control delete mode 100644 openwrt/package/wrt-radauth/Config.in delete mode 100644 openwrt/package/wrt-radauth/Makefile delete mode 100644 openwrt/package/wrt-radauth/ipkg/wrt-radauth.control delete mode 100644 openwrt/package/wx200d/Config.in delete mode 100644 openwrt/package/wx200d/Makefile delete mode 100644 openwrt/package/wx200d/ipkg/wx200d.control delete mode 100644 openwrt/package/xinetd/Config.in delete mode 100644 openwrt/package/xinetd/Makefile delete mode 100644 openwrt/package/xinetd/files/xinetd.conf delete mode 100644 openwrt/package/xinetd/files/xinetd.init delete mode 100644 openwrt/package/xinetd/ipkg/xinetd.conffiles delete mode 100644 openwrt/package/xinetd/ipkg/xinetd.control delete mode 100644 openwrt/package/xinetd/patches/ar.patch delete mode 100644 openwrt/package/xinetd/patches/destdir.patch delete mode 100644 openwrt/package/xinetd/patches/xinetd-2.3.13-gcc4-1.patch delete mode 100644 openwrt/package/xsupplicant/Config.in delete mode 100644 openwrt/package/xsupplicant/Makefile delete mode 100644 openwrt/package/xsupplicant/ipkg/xsupplicant.conffiles delete mode 100644 openwrt/package/xsupplicant/ipkg/xsupplicant.control delete mode 100644 openwrt/package/xsupplicant/patches/001-no-lfl.patch delete mode 100644 openwrt/package/xsupplicant/patches/002-cardif_madwifi_driver_h.patch delete mode 100644 openwrt/package/xsupplicant/patches/004-madwifi-ng.patch delete mode 100644 openwrt/package/xsupplicant/patches/005-disable-procfs-check.patch diff --git a/openwrt/package/6tunnel/Config.in b/openwrt/package/6tunnel/Config.in deleted file mode 100644 index 614498b646a..00000000000 --- a/openwrt/package/6tunnel/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_6TUNNEL - prompt "6tunnel........................... IPv4 / IPv6 tunnel proxy" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_IPV6 - help - 6tunnel allows you to use services provided by IPv6 hosts with IPv4-only - applications and vice-versa. It can bind to any of your IPv4 (default) - or IPv6 addresses and forward all data to IPv4 or IPv6 (default) host. - - http://toxygen.net/6tunnel/ - diff --git a/openwrt/package/6tunnel/Makefile b/openwrt/package/6tunnel/Makefile deleted file mode 100644 index 8b24d7baa57..00000000000 --- a/openwrt/package/6tunnel/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=6tunnel -PKG_VERSION:=0.11rc1 -PKG_RELEASE:=1 -PKG_MD5SUM:=b325fa9d238e32195fbb3fc3646b0d28 - -PKG_SOURCE_URL:=http://toxygen.net/6tunnel/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-0.11 -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,6TUNNEL,6tunnel,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ac_cv_path_STRIP=$(STRIP) \ - ac_cv_func_vsnprintf=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/sbin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - default - touch $@ - -$(IPKG_6TUNNEL): - install -d -m0755 $(IDIR_6TUNNEL)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/6tunnel $(IDIR_6TUNNEL)/usr/sbin/ - $(RSTRIP) $(IDIR_6TUNNEL)/ - $(IPKG_BUILD) $(IDIR_6TUNNEL) $(PACKAGE_DIR) - diff --git a/openwrt/package/6tunnel/ipkg/6tunnel.control b/openwrt/package/6tunnel/ipkg/6tunnel.control deleted file mode 100644 index ce63bd8f287..00000000000 --- a/openwrt/package/6tunnel/ipkg/6tunnel.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: 6tunnel -Priority: optional -Section: net -Depends: -Description: An IPv4/IPv6 tunnel proxy diff --git a/openwrt/package/aiccu/Config.in b/openwrt/package/aiccu/Config.in deleted file mode 100644 index b8ba014c109..00000000000 --- a/openwrt/package/aiccu/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_AICCU - prompt "aiccu............................. SixXS Automatic IPv6 Connectivity Client Utility" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_IPV6 - select BR2_PACKAGE_LIBPTHREAD - help - SixXS Automatic IPv6 Connectivity Client Utility - - For more information about SixXS check http://www.sixxs.net/ - diff --git a/openwrt/package/aiccu/Makefile b/openwrt/package/aiccu/Makefile deleted file mode 100644 index 5019b656222..00000000000 --- a/openwrt/package/aiccu/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=aiccu -PKG_VERSION:=2005.01.31 -PKG_RELEASE:=1 -PKG_MD5SUM:=7c3da5feab3d59fb5a99a45203e0ca56 - -PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,AICCU,aiccu,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - $(SED) "s,strip,$(STRIP)," $(PKG_BUILD_DIR)/unix-console/Makefile - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" DEBUG=0 - touch $@ - -$(IPKG_AICCU): - mkdir -p $(IDIR_AICCU)/usr/sbin $(IDIR_AICCU)/etc/init.d - install -m 755 $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(IDIR_AICCU)/usr/sbin/ - install -m 755 ./files/aiccu.init $(IDIR_AICCU)/etc/init.d/S51aiccu - install -m 644 $(PKG_BUILD_DIR)/doc/aiccu.conf $(IDIR_AICCU)/etc/aiccu.conf - $(STRIP) $(IDIR_AICCU)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_AICCU) $(PACKAGE_DIR) - diff --git a/openwrt/package/aiccu/files/aiccu.init b/openwrt/package/aiccu/files/aiccu.init deleted file mode 100644 index dabafcf3f0b..00000000000 --- a/openwrt/package/aiccu/files/aiccu.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -case "$1" in - start) - aiccu start - ;; - - stop) - aiccu stop - aiccu stop - ;; - - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 - ;; -esac diff --git a/openwrt/package/aiccu/ipkg/aiccu.conffiles b/openwrt/package/aiccu/ipkg/aiccu.conffiles deleted file mode 100644 index 79c42f99845..00000000000 --- a/openwrt/package/aiccu/ipkg/aiccu.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/aiccu.conf diff --git a/openwrt/package/aiccu/ipkg/aiccu.control b/openwrt/package/aiccu/ipkg/aiccu.control deleted file mode 100644 index cb9dbba93ba..00000000000 --- a/openwrt/package/aiccu/ipkg/aiccu.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: aiccu -Priority: optional -Section: net -Depends: kmod-ipv6, ip, libpthread -Description: SixXS Automatic IPv6 Connectivity Client Utility diff --git a/openwrt/package/aircrack/Config.in b/openwrt/package/aircrack/Config.in deleted file mode 100644 index 2e9b98e301f..00000000000 --- a/openwrt/package/aircrack/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_PACKAGE_AIRCRACK - prompt "aircrack.......................... A set of tools for auditing wireless networks" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPTHREAD - help - aircrack is a set of tools for auditing wireless networks: - - * aircrack: static WEP and WPA-PSK key cracker - * airdecap: decrypts WEP/WPA capture files - * aireplay: 802.11 packet injection program - * airodump: 802.11 packet capture program - - http://www.cr0.net:8040/code/network/aircrack/ - diff --git a/openwrt/package/aircrack/Makefile b/openwrt/package/aircrack/Makefile deleted file mode 100644 index feb43044d33..00000000000 --- a/openwrt/package/aircrack/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=aircrack -PKG_VERSION:=2.41 -PKG_RELEASE:=1 -PKG_MD5SUM:=05a37c8a165efb11ea226829c809deb3 - -PKG_SOURCE_URL:=http://www.cr0.net:8040/code/network/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,AIRCRACK,aircrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -Wall" \ - CROSS="$(TARGET_CROSS)" \ - prefix="/usr" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_AIRCRACK): - install -d -m0755 $(IDIR_AIRCRACK)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/aircrack $(IDIR_AIRCRACK)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/airdecap $(IDIR_AIRCRACK)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/aireplay $(IDIR_AIRCRACK)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/airodump $(IDIR_AIRCRACK)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/arpforge $(IDIR_AIRCRACK)/usr/bin/ - $(RSTRIP) $(IDIR_AIRCRACK) - $(IPKG_BUILD) $(IDIR_AIRCRACK) $(PACKAGE_DIR) - diff --git a/openwrt/package/aircrack/ipkg/aircrack.control b/openwrt/package/aircrack/ipkg/aircrack.control deleted file mode 100644 index 182c56e5293..00000000000 --- a/openwrt/package/aircrack/ipkg/aircrack.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: aircrack -Priority: optional -Section: net -Depends: libpthread -Description: A set of tools for auditing wireless networks diff --git a/openwrt/package/amwall/Config.in b/openwrt/package/amwall/Config.in deleted file mode 100644 index af5efe9b016..00000000000 --- a/openwrt/package/amwall/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_AMWALL - prompt "amwall............................ PF to iptables" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBAMSEL - help - PF for iptables - - http://amselinux.de/ - diff --git a/openwrt/package/amwall/Makefile b/openwrt/package/amwall/Makefile deleted file mode 100644 index a2e3c391b2a..00000000000 --- a/openwrt/package/amwall/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=amwall -PKG_VERSION:=0.1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=a8b6438e7fd9ccadc9f68824ae62349c - -PKG_SOURCE_URL:=ftp://ftp.amselinux.net/source/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,AMWALL,amwall,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - V= \ - LDIR=$(PKG_BUILD_DIR) \ - AMSEL_INCLUDE="$(STAGING_DIR)/usr/include" \ - OPT_LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - PREFIX="/usr" \ - CONFIG="$(PKG_BUILD_DIR)/etc/amsel" \ - DESTDIR=$(PKG_INSTALL_DIR) \ - all install - touch $@ - -$(IPKG_AMWALL): - install -d -m0755 $(IDIR_AMWALL)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_AMWALL)/usr/bin - install -d -m0755 $(IDIR_AMWALL)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_AMWALL)/usr/sbin - install -d -m0755 $(IDIR_AMWALL)/etc/amsel - $(CP) $(PKG_INSTALL_DIR)/etc/amsel* $(IDIR_AMWALL)/etc - $(RSTRIP) $(IDIR_AMWALL) - $(IPKG_BUILD) $(IDIR_AMWALL) $(PACKAGE_DIR) - diff --git a/openwrt/package/amwall/ipkg/amwall.control b/openwrt/package/amwall/ipkg/amwall.control deleted file mode 100644 index 0a3f65a65f0..00000000000 --- a/openwrt/package/amwall/ipkg/amwall.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: amwall -Priority: optional -Section: net -Depends: libamsel -Description: pf to iptables and more diff --git a/openwrt/package/arpd/Config.in b/openwrt/package/arpd/Config.in deleted file mode 100644 index 11607baf4f9..00000000000 --- a/openwrt/package/arpd/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_ARPD - prompt "arpd.............................. A daemon to fake ARP replies" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBDNET - select BR2_PACKAGE_LIBEVENT - help - Generates ARP responses for (locally unused) IP addresses - - http://www.honeyd.org/tools.php diff --git a/openwrt/package/arpd/Makefile b/openwrt/package/arpd/Makefile deleted file mode 100644 index 6707eff30b5..00000000000 --- a/openwrt/package/arpd/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=arpd -PKG_VERSION:=0.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=e2911fa9de1b92ef50deda1489ae944d - -PKG_SOURCE_URL:=http://niels.xtdnet.nl/honeyd -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ARPD,arpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --disable-static \ - --with-libdnet=$(STAGING_DIR)/usr \ - --with-libevent=$(STAGING_DIR)/usr \ - --with-libpcap=$(STAGING_DIR)/usr \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CCOPT="$(TARGET_CFLAGS)" \ - INCLS="-I. -I$(STAGING_DIR)/usr/include" \ - LIBS="-L$(STAGING_DIR)/usr/lib -lpcap -ldnet -levent" - touch $@ - -$(IPKG_ARPD): - mkdir -p $(IDIR_ARPD)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/arpd $(IDIR_ARPD)/usr/sbin/ - $(STRIP) $(IDIR_ARPD)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_ARPD) $(PACKAGE_DIR) diff --git a/openwrt/package/arpd/ipkg/arpd.control b/openwrt/package/arpd/ipkg/arpd.control deleted file mode 100644 index 47c5db75481..00000000000 --- a/openwrt/package/arpd/ipkg/arpd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: arpd -Priority: optional -Section: net -Description: Generates ARP responses for IP address ranges -Depends: libpcap, libdnet, libevent diff --git a/openwrt/package/arpd/patches/configure-no-bpf.patch b/openwrt/package/arpd/patches/configure-no-bpf.patch deleted file mode 100644 index fb8037807a1..00000000000 --- a/openwrt/package/arpd/patches/configure-no-bpf.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- arpd/configure.orig Sun Feb 9 19:31:28 2003 -+++ arpd/configure Thu Jul 21 16:05:16 2005 -@@ -2258,8 +2258,7 @@ - if cd $withval; then withval=`pwd`; cd $owd; fi - PCAPINC="-I$withval -I$withval/bpf" - PCAPLIB="-L$withval -lpcap" -- elif test -f $withval/include/pcap.h -a \ -- -f $withval/include/net/bpf.h; then -+ elif test -f $withval/include/pcap.h; then - owd=`pwd` - if cd $withval; then withval=`pwd`; cd $owd; fi - PCAPINC="-I$withval/include" diff --git a/openwrt/package/arpd/patches/function-string.patch b/openwrt/package/arpd/patches/function-string.patch deleted file mode 100644 index 452b810e91f..00000000000 --- a/openwrt/package/arpd/patches/function-string.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- arpd/arpd.c.orig Sun Feb 9 05:20:40 2003 -+++ arpd/arpd.c Thu Jul 21 17:05:40 2005 -@@ -265,7 +265,7 @@ - spa->addr_ip, tha->addr_eth, tpa->addr_ip); - - if (op == ARP_OP_REQUEST) { -- syslog(LOG_DEBUG, __FUNCTION__ ": who-has %s tell %s", -+ syslog(LOG_DEBUG, "%s: who-has %s tell %s", __FUNCTION__, - addr_ntoa(tpa), addr_ntoa(spa)); - } else if (op == ARP_OP_REPLY) { - syslog(LOG_INFO, "arp reply %s is-at %s", -@@ -282,7 +282,7 @@ - int error; - - if (addr_cmp(addr, &arpd_ifent.intf_addr) == 0) { -- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", -+ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, - addr_ntoa(addr), addr_ntoa(&arpd_ifent.intf_link_addr)); - return (0); - } -@@ -291,10 +291,10 @@ - error = arp_get(arpd_arp, &arpent); - - if (error == -1) { -- syslog(LOG_DEBUG, __FUNCTION__ ": no entry for %s", -+ syslog(LOG_DEBUG, "%s: no entry for %s", __FUNCTION__, - addr_ntoa(addr)); - } else { -- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", -+ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, - addr_ntoa(addr), addr_ntoa(&arpent.arp_ha)); - } - return (error); -@@ -423,7 +423,7 @@ - if ((req = SPLAY_FIND(tree, &arpd_reqs, &tmp)) != NULL) { - addr_pack(&src.arp_ha, ADDR_TYPE_ETH, ETH_ADDR_BITS, - ethip->ar_sha, ETH_ADDR_LEN); -- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", -+ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, - addr_ntoa(&req->pa), addr_ntoa(&src.arp_ha)); - - /* This address is claimed */ diff --git a/openwrt/package/arpd/patches/pcap-and-arg.patch b/openwrt/package/arpd/patches/pcap-and-arg.patch deleted file mode 100644 index 7750e2928c5..00000000000 --- a/openwrt/package/arpd/patches/pcap-and-arg.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- arpd/arpd.c Sun Feb 9 05:20:40 2003 -+++ arpd/arpd.c.new Mon Aug 1 00:50:40 2005 -@@ -70,7 +70,7 @@ - static void - usage(void) - { -- fprintf(stderr, "Usage: arpd [-d] [-i interface] [net]\n"); -+ fprintf(stderr, "Usage: arpd [-d] [-i interface] [-a 'pcap_expr'] [{host|net|range} ...]\n"); - exit(1); - } - -@@ -182,7 +182,7 @@ - } - - static void --arpd_init(char *dev, int naddresses, char **addresses) -+arpd_init(char *dev, char *and_pcap_exp, int naddresses, char **addresses) - { - struct bpf_program fcode; - char filter[1024], ebuf[PCAP_ERRBUF_SIZE], *dst; -@@ -214,9 +214,13 @@ - errx(1, "bad interface configuration: not IP or Ethernet"); - arpd_ifent.intf_addr.addr_bits = IP_ADDR_BITS; - -- snprintf(filter, sizeof(filter), "arp %s%s%s and not ether src %s", -+ snprintf(filter, sizeof(filter), "arp %s%s%s and not ether src %s%s%s%s", - dst ? "and (" : "", dst ? dst : "", dst ? ")" : "", -- addr_ntoa(&arpd_ifent.intf_link_addr)); -+ addr_ntoa(&arpd_ifent.intf_link_addr), -+ and_pcap_exp ? " and (" : "", -+ and_pcap_exp ? and_pcap_exp : "", -+ and_pcap_exp ? ")" : "" -+ ); - - if ((arpd_pcap = pcap_open_live(dev, 128, 0, 500, ebuf)) == NULL) - errx(1, "pcap_open_live: %s", ebuf); -@@ -465,14 +469,14 @@ - { - struct event recv_ev; - extern int (*event_sigcb)(void); -- char *dev; -+ char *dev, *and_pcap_exp; - int c, debug; - FILE *fp; - - dev = NULL; - debug = 0; - -- while ((c = getopt(argc, argv, "di:h?")) != -1) { -+ while ((c = getopt(argc, argv, "a:di:h?")) != -1) { - switch (c) { - case 'd': - debug = 1; -@@ -480,6 +484,9 @@ - case 'i': - dev = optarg; - break; -+ case 'a': -+ and_pcap_exp = optarg; -+ break; - default: - usage(); - break; -@@ -489,9 +496,9 @@ - argv += optind; - - if (argc == 0) -- arpd_init(dev, 0, NULL); -+ arpd_init(dev, and_pcap_exp, 0, NULL); - else -- arpd_init(dev, argc, argv); -+ arpd_init(dev, and_pcap_exp, argc, argv); - - if ((fp = fopen(PIDFILE, "w")) == NULL) - err(1, "fopen"); diff --git a/openwrt/package/arptables/Config.in b/openwrt/package/arptables/Config.in deleted file mode 100644 index 6583d32fa06..00000000000 --- a/openwrt/package/arptables/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_ARPTABLES - prompt "arptables......................... ARP firewall administration utility" - tristate - default m if CONFIG_DEVEL - help - ARP Firewalling (arptables) - - http://ebtables.sourceforge.net/ - diff --git a/openwrt/package/arptables/Makefile b/openwrt/package/arptables/Makefile deleted file mode 100644 index f024e7db153..00000000000 --- a/openwrt/package/arptables/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=arptables -PKG_VERSION:=0.0.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=1672244603c8979577aa4738be35a759 -PKG_SOURCE_URL:=@SF/ebtables -PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) -PKG_CAT:=zcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ARPTABLES,arptables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ - COPT_FLAGS="$(TARGET_CFLAGS)" \ - KERNEL_DIR="./include/linux" - touch $@ - -$(IPKG_ARPTABLES): - install -d -m0755 $(IDIR_ARPTABLES)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/arptables $(IDIR_ARPTABLES)/usr/sbin/ - $(RSTRIP) $(IDIR_ARPTABLES) - $(IPKG_BUILD) $(IDIR_ARPTABLES) $(PACKAGE_DIR) diff --git a/openwrt/package/arptables/ipkg/arptables.control b/openwrt/package/arptables/ipkg/arptables.control deleted file mode 100644 index 3fec57baba1..00000000000 --- a/openwrt/package/arptables/ipkg/arptables.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: arptables -Priority: optional -Section: net -Description: ARP firewalling software diff --git a/openwrt/package/arpwatch/Config.in b/openwrt/package/arpwatch/Config.in deleted file mode 100644 index b69ec7a259f..00000000000 --- a/openwrt/package/arpwatch/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_ARPWATCH - prompt "arpwatch.......................... Ethernet station activity monitor" - tristate - default m if CONFIG_DEVEL - help - Ethernet monitor program for keeping track of ethernet/ip address pairings - diff --git a/openwrt/package/arpwatch/Makefile b/openwrt/package/arpwatch/Makefile deleted file mode 100644 index a20c58f52ed..00000000000 --- a/openwrt/package/arpwatch/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=arpwatch -PKG_VERSION:=2.1a11 -PKG_RELEASE:=1 -PKG_MD5SUM:=9ecd00db892737431b0e524f3e52e19e - -PKG_SOURCE_URL:=http://nbd.vd-s.ath.cx/openwrt -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ARPWATCH,arpwatch,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - ARPDIR=/etc/arpwatch \ - CCOPT="$(TARGET_CFLAGS)" \ - INCLS="-I. -I$(STAGING_DIR)/usr/include" \ - LIBS="-L$(STAGING_DIR)/usr/lib -lpcap" - touch $@ - -$(IPKG_ARPWATCH): - mkdir -p $(IDIR_ARPWATCH)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/arpwatch $(IDIR_ARPWATCH)/usr/sbin/ - $(CP) $(PKG_BUILD_DIR)/arpsnmp $(IDIR_ARPWATCH)/usr/sbin/ - $(STRIP) $(IDIR_ARPWATCH)/usr/sbin/* - mkdir -p $(IDIR_ARPWATCH)/etc/arpwatch - $(CP) $(PKG_BUILD_DIR)/arp.dat $(IDIR_ARPWATCH)/etc/arpwatch/ - $(IPKG_BUILD) $(IDIR_ARPWATCH) $(PACKAGE_DIR) diff --git a/openwrt/package/arpwatch/ipkg/arpwatch.conffiles b/openwrt/package/arpwatch/ipkg/arpwatch.conffiles deleted file mode 100644 index 9b9d8b3f6a8..00000000000 --- a/openwrt/package/arpwatch/ipkg/arpwatch.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/arpwatch/arp.dat diff --git a/openwrt/package/arpwatch/ipkg/arpwatch.control b/openwrt/package/arpwatch/ipkg/arpwatch.control deleted file mode 100644 index a72088153fd..00000000000 --- a/openwrt/package/arpwatch/ipkg/arpwatch.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: arpwatch -Priority: optional -Section: net -Description: Ethernet monitor program for keeping track of ethernet/ip address pairings -Depends: libpcap diff --git a/openwrt/package/asterisk/Config.in b/openwrt/package/asterisk/Config.in deleted file mode 100644 index 7efaee57715..00000000000 --- a/openwrt/package/asterisk/Config.in +++ /dev/null @@ -1,159 +0,0 @@ -menu "asterisk.......................... Complete open source PBX" - -config BR2_PACKAGE_ASTERISK - prompt "asterisk.......................... Complete open source PBX" - tristate - default m if CONFIG_DEVEL - help - Asterisk is a complete PBX in software. It provides all of the features - you would expect from a PBX and more. Asterisk does voice over IP in three - protocols, and can interoperate with almost all standards-based telephony - equipment using relatively inexpensive hardware. - - http://www.asterisk.org/ - -config BR2_PACKAGE_ASTERISK_CHAN_BLUETOOTH - prompt "asterisk-chan-bluetooth......... Bluetooth HandsFreeProfile support for Asterisk" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - select BR2_PACKAGE_BLUEZ_LIBS - help - The Bluetooth HandsFreeProfile support for Asterisk - -config BR2_PACKAGE_ASTERISK_CHAN_H323 - prompt "asterisk-chan-h323.............. H.323 support for Asterisk" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - select BR2_PACKAGE_OPENH323 - help - H.323 support for Asterisk - -config BR2_PACKAGE_ASTERISK_CHAN_MGCP - prompt "asterisk-chan-mgcp.............. Media Gateway Control Protocol implementation" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - help - Media Gateway Control Protocol implementation for Asterisk - -config BR2_PACKAGE_ASTERISK_CHAN_SKINNY - prompt "asterisk-chan-skinny............ Skinny Client Control Protocol implementation" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - help - Skinny Client Control Protocol implementation for Asterisk - -config BR2_PACKAGE_ASTERISK_CODEC_ILBC - prompt "asterisk-codec-ilbc............. Internet Low Bitrate Codec (ILBC) Translator" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - help - The Internet Low Bitrate Codec (ILBC) Translator for Asterisk - -config BR2_PACKAGE_ASTERISK_CODEC_LPC10 - prompt "asterisk-codec-lpc10............ LPC10 (Linear Predictor Code) 2.4kbps Voice Coder" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - help - The LPC10 (Linear Predictor Code) 2.4kbps Voice Coder for Asterisk - -config BR2_PACKAGE_ASTERISK_CODEC_SPEEX - prompt "asterisk-codec-speex............ Speex/PCM16 Codec Translator" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - select BR2_PACKAGE_LIBSPEEX - help - The Speex speech compression codec for Asterisk - -config BR2_PACKAGE_ASTERISK_PBX_DUNDI - prompt "asterisk-pbx-dundi.............. Distributed Universal Number Discovery (DUNDi) support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - help - Distributed Universal Number Discovery (DUNDi) support for Asterisk - -config BR2_PACKAGE_ASTERISK_RES_AGI - prompt "asterisk-res-agi................ Asterisk Gateway Interface module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - help - Asterisk Gateway Interface module - -config BR2_PACKAGE_ASTERISK_MYSQL - prompt "asterisk-mysql.................. MySQL modules" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - select BR2_PACKAGE_LIBMYSQLCLIENT - help - MySQL modules for Asterisk - -config BR2_PACKAGE_ASTERISK_PGSQL - prompt "asterisk-pgsql.................. PostgreSQL modules" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - select BR2_PACKAGE_LIBPQ - help - PostgreSQL modules for Asterisk - -config BR2_PACKAGE_ASTERISK_SQLITE - prompt "asterisk-sqlite................. SQLite modules" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - select BR2_PACKAGE_LIBSQLITE - help - SQLite modules for Asterisk - -config BR2_PACKAGE_ASTERISK_SOUNDS - prompt "asterisk-sounds................. Sound files" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - help - Sound files for Asterisk - -config BR2_PACKAGE_ASTERISK_VOICEMAIL - prompt "asterisk-voicemail.............. Voicemail support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ASTERISK - help - Voicemail related modules for Asterisk - -config BR2_PACKAGE_ASTERISK_MINI - prompt "asterisk-mini..................... Minimal open source PBX" - tristate - default m if CONFIG_DEVEL - help - Asterisk is a complete PBX in software. It provides all of the features - you would expect from a PBX and more. Asterisk does voice over IP in three - protocols, and can interoperate with almost all standards-based telephony - equipment using relatively inexpensive hardware. - - http://www.asterisk.org/ - - This package contains only the following modules: - - chan_iax2 - - chan_local - - chan_sip - - codec_gsm - - codec_ulaw - - format_gsm - - format_pcm - - format_wav - - format_wav_gsm - - pbx_config - - res_features - - res_musiconhold - -endmenu diff --git a/openwrt/package/asterisk/Makefile b/openwrt/package/asterisk/Makefile deleted file mode 100644 index 015f0cc2195..00000000000 --- a/openwrt/package/asterisk/Makefile +++ /dev/null @@ -1,281 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=asterisk -PKG_VERSION:=1.2.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=04657086791e80f319c0d728af705001 - -PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/old-releases/ ftp://ftp.digium.com/pub/asterisk/old-releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,ASTERISK,asterisk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_MINI,asterisk-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_MYSQL,asterisk-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_PGSQL,asterisk-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_SQLITE,asterisk-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_VOICEMAIL,asterisk-voicemail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_SOUNDS,asterisk-sounds,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_CHAN_BLUETOOTH,asterisk-chan-bluetooth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_CHAN_H323,asterisk-chan-h323,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_CHAN_MGCP,asterisk-chan-mgcp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_CHAN_SKINNY,asterisk-chan-skinny,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_CODEC_ILBC,asterisk-codec-ilbc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_CODEC_LPC10,asterisk-codec-lpc10,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_CODEC_SPEEX,asterisk-codec-speex,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_PBX_DUNDI,asterisk-pbx-dundi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ASTERISK_RES_AGI,asterisk-res-agi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -EXTRA_CFLAGS := -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -EXTRA_LDFLAGS := -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib - -ifneq ($(BR2_PACKAGE_ASTERISK_MYSQL),) -EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/mysql -EXTRA_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -EXTRA_APP_MODULES += app_sql_mysql.so -EXTRA_CDR_MODULES += cdr_mysql.so -EXTRA_RES_MODULES += res_config_mysql.so -endif -ifneq ($(BR2_PACKAGE_ASTERISK_PGSQL),) -EXTRA_APP_MODULES += app_sql_postgres.so -EXTRA_CDR_MODULES += cdr_pgsql.so -endif -ifneq ($(BR2_PACKAGE_ASTERISK_SQLITE),) -EXTRA_CDR_MODULES += cdr_sqlite.so -endif -ifneq ($(BR2_PACKAGE_ASTERISK_CODEC_SPEEX),) -EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/speex -EXTRA_CODEC_MODULES += codec_speex.so -endif - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - (cd $(PKG_BUILD_DIR)/channels/h323/ ; \ - $(MAKE) \ - CROSS_ARCH="Linux" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - CROSS_COMPILE_BIN="/void/" \ - CROSS_COMPILE_TARGET="/void/" \ - $(TARGET_CONFIGURE_OPTS) \ - HOST_CC="$(HOSTCC)" \ - OPTIMIZE="$(TARGET_CFLAGS)" \ - PROC="$(ARCH)" \ - DEBUG="" \ - OPTIONS="-DLOW_MEMORY -Dlinux" \ - OPENH323DIR=$(BUILD_DIR)/openh323-cvs-20051230 \ - opt ; \ - ); - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - CROSS_ARCH="Linux" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - CROSS_COMPILE_BIN="/void/" \ - CROSS_COMPILE_TARGET="/void/" \ - $(TARGET_CONFIGURE_OPTS) \ - HOST_CC="$(HOSTCC)" \ - OPTIMIZE="$(TARGET_CFLAGS)" \ - PROC="$(ARCH)" \ - DEBUG="" \ - OPTIONS="-DLOW_MEMORY -Dlinux" \ - NOCRYPTO="yes" \ - EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ - EXTRA_LDFLAGS="$(EXTRA_LDFLAGS)" \ - EXTRA_APP_MODULES="$(EXTRA_APP_MODULES)" \ - EXTRA_CDR_MODULES="$(EXTRA_CDR_MODULES)" \ - EXTRA_CODEC_MODULES="$(EXTRA_CODEC_MODULES)" \ - EXTRA_RES_MODULES="$(EXTRA_RES_MODULES)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - ASTVARLIBDIR="/usr/lib/asterisk" \ - OPENH323DIR=$(BUILD_DIR)/openh323-cvs-20051230 \ - PWLIBDIR=$(BUILD_DIR)/pwlib \ - all install samples - rm -f $(PKG_INSTALL_DIR)/etc/asterisk/*.old - touch $@ - -$(IPKG_ASTERISK): - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_ASTERISK) - rm -rf $(IDIR_ASTERISK)/usr/sbin/astgenkey - rm -rf $(IDIR_ASTERISK)/usr/bin - rm -rf $(IDIR_ASTERISK)/usr/share - rm -rf $(IDIR_ASTERISK)/usr/include - rm -rf $(IDIR_ASTERISK)/var - (cd $(IDIR_ASTERISK)/usr/lib/asterisk; \ - rm -rf agi-bin; \ - rm -rf images; \ - rm -rf keys/*; \ - rm -rf mohmp3/*.mp3; \ - rm -rf sounds/*; \ - cd modules; \ - rm -rf *adsi* *festival* *modem* *meetme* *oss* *phone* *intercom* \ - *mp3* *nbscat* *mysql* *postgres* *pgsql* *voicemail* *speex* \ - *zapateller* *jpeg*; \ - rm -f chan_bluetooth.so ; \ - rm -f chan_mgcp.so ; \ - rm -f chan_skinny.so ; \ - rm -f {codec,format}_ilbc.so ; \ - rm -f codec_lpc10.so ; \ - rm -f pbx_dundi.so ; \ - rm -f res_agi.so ; \ - ) - (cd $(IDIR_ASTERISK)/etc/asterisk; \ - rm -f *odbc* *mysql* *postgres* *pgsql* *voicemail* *adsi* *oss* *alsa* \ - *festival* *modem* *meetme* *phone* *tds* *vofr* *rpt* *vpb* \ - *zapata*; \ - rm -f bluetooth.conf ; \ - rm -f mgcp.conf ; \ - rm -f skinny.conf ; \ - rm -f dundi.conf ; \ - ) - install -m0644 ./files/modules.conf $(IDIR_ASTERISK)/etc/asterisk/ - $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf - install -d -m0755 $(IDIR_ASTERISK)/etc/default - install -m0644 ./files/asterisk.default $(IDIR_ASTERISK)/etc/default/asterisk - install -d -m0755 $(IDIR_ASTERISK)/etc/init.d - install -m0755 ./files/asterisk.init $(IDIR_ASTERISK)/etc/init.d/asterisk - ln -sf asterisk $(IDIR_ASTERISK)/etc/init.d/S60asterisk - $(RSTRIP) $(IDIR_ASTERISK) - $(IPKG_BUILD) $(IDIR_ASTERISK) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_MINI): - install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/asterisk - for f in asterisk enum extconfig extensions features iax iaxprov logger manager modules musiconhold rtp sip; do \ - $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$f.conf $(IDIR_ASTERISK_MINI)/etc/asterisk/ ; \ - done - install -m0644 ./files/modules.conf $(IDIR_ASTERISK)/etc/asterisk/ - $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf - install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk - $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/ - install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/keys - install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules - for f in chan_iax2 chan_local chan_sip codec_gsm codec_ulaw format_gsm format_pcm format_wav \ - format_wav_gsm pbx_config res_features res_musiconhold; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$f.so $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules/ ; \ - done - install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/mohmp3 - install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/sounds - install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/ - install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/default - install -m0644 ./files/asterisk.default $(IDIR_ASTERISK_MINI)/etc/default/asterisk - install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/init.d - install -m0755 ./files/asterisk.init $(IDIR_ASTERISK_MINI)/etc/init.d/asterisk - ln -sf asterisk $(IDIR_ASTERISK_MINI)/etc/init.d/S60asterisk - $(RSTRIP) $(IDIR_ASTERISK_MINI) - $(IPKG_BUILD) $(IDIR_ASTERISK_MINI) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_MYSQL): - install -d -m0755 $(IDIR_ASTERISK_MYSQL)/etc/asterisk - install -m0600 $(PKG_BUILD_DIR)/configs/cdr_mysql.conf.sample $(IDIR_ASTERISK_MYSQL)/etc/asterisk/cdr_mysql.conf - install -d -m0755 $(IDIR_ASTERISK_MYSQL)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/apps/app_sql_mysql.so $(IDIR_ASTERISK_MYSQL)/usr/lib/asterisk/modules/ - install -m0755 $(PKG_BUILD_DIR)/cdr/cdr_mysql.so $(IDIR_ASTERISK_MYSQL)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_MYSQL) - $(IPKG_BUILD) $(IDIR_ASTERISK_MYSQL) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_PGSQL): - install -d -m0755 $(IDIR_ASTERISK_PGSQL)/etc/asterisk - install -m0600 $(PKG_BUILD_DIR)/configs/cdr_pgsql.conf.sample $(IDIR_ASTERISK_PGSQL)/etc/asterisk/cdr_pgsql.conf - install -d -m0755 $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/apps/app_sql_postgres.so $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules/ - install -m0755 $(PKG_BUILD_DIR)/cdr/cdr_pgsql.so $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_PGSQL) - $(IPKG_BUILD) $(IDIR_ASTERISK_PGSQL) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_SQLITE): - install -d -m0755 $(IDIR_ASTERISK_SQLITE)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/cdr/cdr_sqlite.so $(IDIR_ASTERISK_SQLITE)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_SQLITE) - $(IPKG_BUILD) $(IDIR_ASTERISK_SQLITE) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_SOUNDS): - install -d -m0755 $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds - $(CP) $(PKG_BUILD_DIR)/sounds/* $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/ - rm -f $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/*.mp3 - rm -f $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/vm-* - $(IPKG_BUILD) $(IDIR_ASTERISK_SOUNDS) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_VOICEMAIL): - install -d -m0755 $(IDIR_ASTERISK_VOICEMAIL)/etc/asterisk - install -m0644 $(PKG_BUILD_DIR)/configs/voicemail.conf.sample $(IDIR_ASTERISK_VOICEMAIL)/etc/asterisk/voicemail.conf - install -d -m0755 $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/apps/*voicemail.so $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/ - install -m0755 $(PKG_BUILD_DIR)/res/res_adsi.so $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/ - install -d -m0755 $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds - $(CP) $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds/ - $(RSTRIP) $(IDIR_ASTERISK_VOICEMAIL) - $(IPKG_BUILD) $(IDIR_ASTERISK_VOICEMAIL) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_CHAN_BLUETOOTH): - install -d -m0755 $(IDIR_ASTERISK_CHAN_BLUETOOTH)/etc/asterisk - install -m0644 $(PKG_BUILD_DIR)/configs/bluetooth.conf $(IDIR_ASTERISK_CHAN_BLUETOOTH)/etc/asterisk/bluetooth.conf - install -d -m0755 $(IDIR_ASTERISK_CHAN_BLUETOOTH)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/channels/chan_bluetooth.so $(IDIR_ASTERISK_CHAN_BLUETOOTH)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_CHAN_BLUETOOTH) - $(IPKG_BUILD) $(IDIR_ASTERISK_CHAN_BLUETOOTH) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_CHAN_H323): - install -d -m0755 $(IDIR_ASTERISK_CHAN_H323)/etc/asterisk - install -m0644 $(PKG_BUILD_DIR)/channels/h323/h323.conf.sample $(IDIR_ASTERISK_CHAN_H323)/etc/asterisk/h323.conf - install -d -m0755 $(IDIR_ASTERISK_CHAN_H323)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/channels/chan_h323.so $(IDIR_ASTERISK_CHAN_H323)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_CHAN_H323) - $(IPKG_BUILD) $(IDIR_ASTERISK_CHAN_H323) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_CHAN_MGCP): - install -d -m0755 $(IDIR_ASTERISK_CHAN_MGCP)/etc/asterisk - install -m0644 $(PKG_BUILD_DIR)/configs/mgcp.conf.sample $(IDIR_ASTERISK_CHAN_MGCP)/etc/asterisk/mgcp.conf - install -d -m0755 $(IDIR_ASTERISK_CHAN_MGCP)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/channels/chan_mgcp.so $(IDIR_ASTERISK_CHAN_MGCP)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_CHAN_MGCP) - $(IPKG_BUILD) $(IDIR_ASTERISK_CHAN_MGCP) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_CHAN_SKINNY): - install -d -m0755 $(IDIR_ASTERISK_CHAN_SKINNY)/etc/asterisk - install -m0644 $(PKG_BUILD_DIR)/configs/skinny.conf.sample $(IDIR_ASTERISK_CHAN_SKINNY)/etc/asterisk/skinny.conf - install -d -m0755 $(IDIR_ASTERISK_CHAN_SKINNY)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/channels/chan_skinny.so $(IDIR_ASTERISK_CHAN_SKINNY)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_CHAN_SKINNY) - $(IPKG_BUILD) $(IDIR_ASTERISK_CHAN_SKINNY) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_CODEC_ILBC): - install -d -m0755 $(IDIR_ASTERISK_CODEC_ILBC)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/codecs/codec_ilbc.so $(IDIR_ASTERISK_CODEC_ILBC)/usr/lib/asterisk/modules/ - install -m0755 $(PKG_BUILD_DIR)/formats/format_ilbc.so $(IDIR_ASTERISK_CODEC_ILBC)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_CODEC_ILBC) - $(IPKG_BUILD) $(IDIR_ASTERISK_CODEC_ILBC) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_CODEC_LPC10): - install -d -m0755 $(IDIR_ASTERISK_CODEC_LPC10)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/codecs/codec_lpc10.so $(IDIR_ASTERISK_CODEC_LPC10)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_CODEC_LPC10) - $(IPKG_BUILD) $(IDIR_ASTERISK_CODEC_LPC10) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_CODEC_SPEEX): - install -d -m0755 $(IDIR_ASTERISK_CODEC_SPEEX)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/codecs/codec_speex.so $(IDIR_ASTERISK_CODEC_SPEEX)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_CODEC_SPEEX) - $(IPKG_BUILD) $(IDIR_ASTERISK_CODEC_SPEEX) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_PBX_DUNDI): - install -d -m0755 $(IDIR_ASTERISK_PBX_DUNDI)/etc/asterisk - install -m0644 $(PKG_BUILD_DIR)/configs/dundi.conf.sample $(IDIR_ASTERISK_PBX_DUNDI)/etc/asterisk/dundi.conf - install -d -m0755 $(IDIR_ASTERISK_PBX_DUNDI)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/pbx/pbx_dundi.so $(IDIR_ASTERISK_PBX_DUNDI)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_PBX_DUNDI) - $(IPKG_BUILD) $(IDIR_ASTERISK_PBX_DUNDI) $(PACKAGE_DIR) - -$(IPKG_ASTERISK_RES_AGI): - install -d -m0755 $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/agi-bin - install -d -m0755 $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules - install -m0755 $(PKG_BUILD_DIR)/res/res_agi.so $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules/ - $(RSTRIP) $(IDIR_ASTERISK_RES_AGI) - $(IPKG_BUILD) $(IDIR_ASTERISK_RES_AGI) $(PACKAGE_DIR) - diff --git a/openwrt/package/asterisk/files/asterisk.default b/openwrt/package/asterisk/files/asterisk.default deleted file mode 100644 index bbcb3cc86a7..00000000000 --- a/openwrt/package/asterisk/files/asterisk.default +++ /dev/null @@ -1,4 +0,0 @@ -## startup options for /etc/init.d/asterisk - -ENABLE_ASTERISK="no" -OPTIONS="" diff --git a/openwrt/package/asterisk/files/asterisk.init b/openwrt/package/asterisk/files/asterisk.init deleted file mode 100644 index 698c3dfa825..00000000000 --- a/openwrt/package/asterisk/files/asterisk.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/asterisk -OPTIONS="" -[ -f $DEFAULT ] && . $DEFAULT -[ "$ENABLE_ASTERISK" = "yes" ] || exit 0 - -case $1 in - start) - [ -d /var/run ] || mkdir -p /var/run - [ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk - [ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk - /usr/sbin/asterisk $OPTIONS - ;; - stop) - [ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1 - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/asterisk/files/modules.conf b/openwrt/package/asterisk/files/modules.conf deleted file mode 100644 index 1d6f35400a9..00000000000 --- a/openwrt/package/asterisk/files/modules.conf +++ /dev/null @@ -1,138 +0,0 @@ -; -; Asterisk configuration file -; -; Module Loader configuration file -; - -[modules] -autoload=yes -; -; Any modules that need to be loaded before the Asterisk core has been -; initialized (just after the logger has been initialized) can be loaded -; using 'preload'. This will frequently be needed if you wish to map all -; module configuration files into Realtime storage, since the Realtime -; driver will need to be loaded before the modules using those configuration -; files are initialized. -; -; An example of loading ODBC support would be: -;preload => res_odbc.so -;preload => res_config_odbc.so -; -noload => res_config_mysql.so ; -; -; load => res_features.so ; Call Parking Resource -noload => res_indications.so ; Indications Configuration -noload => res_monitor.so ; Call Monitoring Resource -; load => res_musiconhold.so ; Music On Hold Resource -noload => cdr_csv.so ; Comma Separated Values CDR Backend -noload => cdr_custom.so ; Customizable Comma Separated Values CDR Backend -noload => cdr_manager.so ; Asterisk Call Manager CDR Backend -noload => cdr_mysql.so ; MySQL CDR Backend -noload => cdr_pgsql.so ; PostgreSQL CDR Backend -noload => cdr_sqlite.so ; SQLite CDR Backend -noload => chan_agent.so ; Agent Proxy Channel -; load => chan_iax2.so ; Inter Asterisk eXchange (Ver 2) -; load => chan_local.so ; Local Proxy Channel -; load => chan_sip.so ; Session Initiation Protocol (SIP) -noload => codec_a_mu.so ; A-law and Mulaw direct Coder/Decoder -noload => codec_adpcm.so ; Adaptive Differential PCM Coder/Decoder -noload => codec_alaw.so ; A-law Coder/Decoder -noload => codec_g726.so ; ITU G.726-32kbps G726 Transcoder -; load => codec_gsm.so ; GSM/PCM16 (signed linear) Codec Translation -; load => codec_ulaw.so ; Mu-law Coder/Decoder -noload => codec_speex.so ; Speex/PCM16 (signed linear) Codec Translator -noload => format_au.so ; Sun Microsystems AU format (signed linear) -noload => format_g723.so ; G.723.1 Simple Timestamp File Format -noload => format_g726.so ; Raw G.726 (16/24/32/40kbps) data -noload => format_g729.so ; Raw G729 data -; load => format_gsm.so ; Raw GSM data -noload => format_h263.so ; Raw h263 data -noload => format_jpeg.so ; JPEG (Joint Picture Experts Group) Image -; load => format_pcm.so ; Raw uLaw 8khz Audio support (PCM) -noload => format_pcm_alaw.so ; Raw aLaw 8khz PCM Audio support -noload => format_sln.so ; Raw Signed Linear Audio support (SLN) -noload => format_vox.so ; Dialogic VOX (ADPCM) File Format -; load => format_wav.so ; Microsoft WAV format (8000hz Signed Line -; load => format_wav_gsm.so ; Microsoft WAV format (Proprietary GSM) -noload => app_alarmreceiver.so ; Alarm Receiver Application -noload => app_authenticate.so ; Authentication Application -noload => app_cdr.so ; Make sure asterisk doesn't save CDR -noload => app_chanisavail.so ; Check if channel is available -noload => app_chanspy.so ; Listen in on any channel -noload => app_controlplayback.so ; Control Playback Application -noload => app_cut.so ; Cuts up variables -noload => app_db.so ; Database access functions -; load => app_dial.so ; Dialing Application -noload => app_dictate.so ; Virtual Dictation Machine Application -noload => app_directory.so ; Extension Directory -noload => app_directed_pickup.so ; Directed Call Pickup Support -noload => app_disa.so ; DISA (Direct Inward System Access) Application -noload => app_dumpchan.so ; Dump channel variables Application -; load => app_echo.so ; Simple Echo Application -noload => app_enumlookup.so ; ENUM Lookup -noload => app_eval.so ; Reevaluates strings -noload => app_exec.so ; Executes applications -noload => app_externalivr.so ; External IVR application interface -noload => app_forkcdr.so ; Fork The CDR into 2 seperate entities -noload => app_getcpeid.so ; Get ADSI CPE ID -noload => app_groupcount.so ; Group Management Routines -noload => app_ices.so ; Encode and Stream via icecast and ices -noload => app_image.so ; Image Transmission Application -noload => app_lookupblacklist.so ; Look up Caller*ID name/number from black -noload => app_lookupcidname.so ; Look up CallerID Name from local databas -; load => app_macro.so ; Extension Macros -noload => app_math.so ; A simple math Application -noload => app_md5.so ; MD5 checksum Application -; load => app_milliwatt.so ; Digital Milliwatt (mu-law) Test Application -noload => app_mixmonitor.so ; Record a call and mix the audio during the recording -noload => app_parkandannounce.so ; Call Parking and Announce Application -; load => app_playback.so ; Trivial Playback Application -noload => app_privacy.so ; Require phone number to be entered, if n -noload => app_queue.so ; True Call Queueing -noload => app_random.so ; Random goto -noload => app_read.so ; Read Variable Application -noload => app_readfile.so ; Read in a file -noload => app_realtime.so ; Realtime Data Lookup/Rewrite -noload => app_record.so ; Trivial Record Application -; load => app_sayunixtime.so ; Say time -noload => app_senddtmf.so ; Send DTMF digits Application -noload => app_sendtext.so ; Send Text Applications -noload => app_setcallerid.so ; Set CallerID Application -noload => app_setcdruserfield.so ; CDR user field apps -noload => app_setcidname.so ; Set CallerID Name -noload => app_setcidnum.so ; Set CallerID Number -noload => app_setrndis.so ; Set RDNIS Number -noload => app_settransfercapability.so ; Set ISDN Transfer Capability -noload => app_sms.so ; SMS/PSTN handler -noload => app_softhangup.so ; Hangs up the requested channel -noload => app_sql_mysql.so ; Simple MySQL Interface -noload => app_sql_postgres.so ; Simple PostgreSQL Interface -noload => app_stack.so ; Stack Routines -noload => app_system.so ; Generic System() application -noload => app_talkdetect.so ; Playback with Talk Detection -noload => app_test.so ; Interface Test Application -noload => app_transfer.so ; Transfer -noload => app_txtcidname.so ; TXTCIDName -noload => app_url.so ; Send URL Applications -noload => app_userevent.so ; Custom User Event Application -; load => app_verbose.so ; Send verbose output -noload => app_waitforring.so ; Waits until first ring after time -noload => app_waitforsilence.so ; Wait For Silence Application -noload => app_while.so ; While Loops and Conditional Execution -noload => pbx_ael.so ; Asterisk Extension Language Compiler -; load => pbx_config.so ; Text Extension Configuration -noload => pbx_functions.so ; Builtin dialplan functions -noload => pbx_loopback.so ; Loopback Switch -noload => pbx_realtime.so ; Realtime Switch -noload => pbx_spool.so ; Outgoing Spool Support -noload => pbx_wilcalu.so ; Wil Cal U (Auto Dialer) -noload => func_callerid.so ; Caller ID related dialplan functions -noload => func_enum.so ; ENUM Functions -noload => func_uri.so ; URI encoding / decoding functions - -; -; Module names listed in "global" section will have symbols globally -; exported to modules loaded after them. -; -[global] -chan_modem.so=no diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-bluetooth.conffiles b/openwrt/package/asterisk/ipkg/asterisk-chan-bluetooth.conffiles deleted file mode 100644 index 40a085235ed..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-bluetooth.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/asterisk/bluetooth.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-bluetooth.control b/openwrt/package/asterisk/ipkg/asterisk-chan-bluetooth.control deleted file mode 100644 index c79d038bbb0..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-bluetooth.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-chan-bluetooth -Priority: optional -Section: net -Description: Bluetooth HandsFreeProfile support for Asterisk -Depends: asterisk, bluez-libs diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-h323.conffiles b/openwrt/package/asterisk/ipkg/asterisk-chan-h323.conffiles deleted file mode 100644 index fc0858a6124..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-h323.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/asterisk/h323.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-h323.control b/openwrt/package/asterisk/ipkg/asterisk-chan-h323.control deleted file mode 100644 index 55af6f1421f..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-h323.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-chan-h323 -Priority: optional -Section: net -Description: H.323 support for Asterisk -Depends: asterisk, openh323 diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-mgcp.conffiles b/openwrt/package/asterisk/ipkg/asterisk-chan-mgcp.conffiles deleted file mode 100644 index 40a81df8e9c..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-mgcp.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/asterisk/mgcp.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-mgcp.control b/openwrt/package/asterisk/ipkg/asterisk-chan-mgcp.control deleted file mode 100644 index 78ea3b649d3..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-mgcp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-chan-mgcp -Priority: optional -Section: net -Description: a Media Gateway Control Protocol implementation for Asterisk -Depends: asterisk diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-skinny.conffiles b/openwrt/package/asterisk/ipkg/asterisk-chan-skinny.conffiles deleted file mode 100644 index eaf9b6defb3..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-skinny.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/asterisk/skinny.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-skinny.control b/openwrt/package/asterisk/ipkg/asterisk-chan-skinny.control deleted file mode 100644 index 3933e33dbbe..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-skinny.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-chan-skinny -Priority: optional -Section: net -Description: a Skinny Client Control Protocol implementation for Asterisk -Depends: asterisk diff --git a/openwrt/package/asterisk/ipkg/asterisk-codec-ilbc.control b/openwrt/package/asterisk/ipkg/asterisk-codec-ilbc.control deleted file mode 100644 index 347943fb20b..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-codec-ilbc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-codec-ilbc -Priority: optional -Section: net -Description: an Internet Low Bitrate Codec (ILBC) Translator for Asterisk -Depends: asterisk diff --git a/openwrt/package/asterisk/ipkg/asterisk-codec-lpc10.control b/openwrt/package/asterisk/ipkg/asterisk-codec-lpc10.control deleted file mode 100644 index 21e75ebef10..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-codec-lpc10.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-codec-lpc10 -Priority: optional -Section: net -Description: an LPC10 (Linear Predictor Code) 2.4kbps Voice Coder for Asterisk -Depends: asterisk diff --git a/openwrt/package/asterisk/ipkg/asterisk-codec-speex.control b/openwrt/package/asterisk/ipkg/asterisk-codec-speex.control deleted file mode 100644 index 61eb088f72d..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-codec-speex.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-codec-speex -Priority: optional -Section: net -Description: a Speex/PCM16 Codec Translator for Asterisk -Depends: asterisk, libspeex diff --git a/openwrt/package/asterisk/ipkg/asterisk-mini.conffiles b/openwrt/package/asterisk/ipkg/asterisk-mini.conffiles deleted file mode 100644 index f95c338f681..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-mini.conffiles +++ /dev/null @@ -1,13 +0,0 @@ -/etc/asterisk/asterisk.conf -/etc/asterisk/enum.conf -/etc/asterisk/extconfig.conf -/etc/asterisk/extensions.conf -/etc/asterisk/features.conf -/etc/asterisk/iax.conf -/etc/asterisk/iaxprov.conf -/etc/asterisk/logger.conf -/etc/asterisk/manager.conf -/etc/asterisk/modules.conf -/etc/asterisk/musiconhold.conf -/etc/asterisk/rtp.conf -/etc/asterisk/sip.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-mini.control b/openwrt/package/asterisk/ipkg/asterisk-mini.control deleted file mode 100644 index b609fab9be0..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-mini.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-mini -Priority: optional -Section: net -Depends: libncurses, libpthread -Description: A minimal open source PBX diff --git a/openwrt/package/asterisk/ipkg/asterisk-mysql.conffiles b/openwrt/package/asterisk/ipkg/asterisk-mysql.conffiles deleted file mode 100644 index 2ff349142d5..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-mysql.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/asterisk/cdr_mysql.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-mysql.control b/openwrt/package/asterisk/ipkg/asterisk-mysql.control deleted file mode 100644 index b766d6bdeca..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-mysql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-mysql -Priority: optional -Section: net -Description: MySQL modules for Asterisk -Depends: asterisk, libmysqlclient, zlib diff --git a/openwrt/package/asterisk/ipkg/asterisk-pbx-dundi.conffiles b/openwrt/package/asterisk/ipkg/asterisk-pbx-dundi.conffiles deleted file mode 100644 index ab116b5d18d..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-pbx-dundi.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/asterisk/dundi.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-pbx-dundi.control b/openwrt/package/asterisk/ipkg/asterisk-pbx-dundi.control deleted file mode 100644 index 6579e2594b1..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-pbx-dundi.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-pbx-dundi -Priority: optional -Section: net -Description: Distributed Universal Number Discovery (DUNDi) support for Asterisk -Depends: asterisk diff --git a/openwrt/package/asterisk/ipkg/asterisk-pgsql.conffiles b/openwrt/package/asterisk/ipkg/asterisk-pgsql.conffiles deleted file mode 100644 index 8b5cffe40ff..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-pgsql.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/asterisk/cdr_pgsql.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-pgsql.control b/openwrt/package/asterisk/ipkg/asterisk-pgsql.control deleted file mode 100644 index beece08a50a..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-pgsql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-pgsql -Priority: optional -Section: net -Description: PostgreSQL modules for Asterisk -Depends: asterisk, libpq, zlib diff --git a/openwrt/package/asterisk/ipkg/asterisk-res-agi.control b/openwrt/package/asterisk/ipkg/asterisk-res-agi.control deleted file mode 100644 index 44f7170aa0b..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-res-agi.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-res-agi -Priority: optional -Section: net -Description: Asterisk Gateway Interface module -Depends: asterisk diff --git a/openwrt/package/asterisk/ipkg/asterisk-sounds.control b/openwrt/package/asterisk/ipkg/asterisk-sounds.control deleted file mode 100644 index a63bbef10f2..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-sounds.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-sounds -Priority: optional -Section: net -Description: a sounds collection for Asterisk -Depends: asterisk diff --git a/openwrt/package/asterisk/ipkg/asterisk-sqlite.control b/openwrt/package/asterisk/ipkg/asterisk-sqlite.control deleted file mode 100644 index e43651d1f46..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-sqlite.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-sqlite -Priority: optional -Section: net -Description: SQLite modules for Asterisk -Depends: asterisk, libsqlite2 diff --git a/openwrt/package/asterisk/ipkg/asterisk-voicemail.conffiles b/openwrt/package/asterisk/ipkg/asterisk-voicemail.conffiles deleted file mode 100644 index 1c80f057a02..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-voicemail.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/asterisk/voicemail.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk-voicemail.control b/openwrt/package/asterisk/ipkg/asterisk-voicemail.control deleted file mode 100644 index c7b51311cf0..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk-voicemail.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk-voicemail -Priority: optional -Section: net -Description: VoiceMail related modules for Asterisk -Depends: asterisk diff --git a/openwrt/package/asterisk/ipkg/asterisk.conffiles b/openwrt/package/asterisk/ipkg/asterisk.conffiles deleted file mode 100644 index 5f805dedbfd..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk.conffiles +++ /dev/null @@ -1,21 +0,0 @@ -/etc/asterisk/asterisk.conf -/etc/asterisk/agents.conf -/etc/asterisk/alarmreceiver.conf -/etc/asterisk/cdr_manager.conf -/etc/asterisk/codecs.conf -/etc/asterisk/enum.conf -/etc/asterisk/extconfig.conf -/etc/asterisk/extensions.conf -/etc/asterisk/features.conf -/etc/asterisk/iax.conf -/etc/asterisk/iaxprov.conf -/etc/asterisk/indications.conf -/etc/asterisk/logger.conf -/etc/asterisk/manager.conf -/etc/asterisk/modules.conf -/etc/asterisk/musiconhold.conf -/etc/asterisk/osp.conf -/etc/asterisk/privacy.conf -/etc/asterisk/queues.conf -/etc/asterisk/rtp.conf -/etc/asterisk/sip.conf diff --git a/openwrt/package/asterisk/ipkg/asterisk.control b/openwrt/package/asterisk/ipkg/asterisk.control deleted file mode 100644 index 13075d791f7..00000000000 --- a/openwrt/package/asterisk/ipkg/asterisk.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: asterisk -Priority: optional -Section: net -Depends: libncurses, libpthread -Description: An open source PBX diff --git a/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-astdb.patch b/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-astdb.patch deleted file mode 100644 index bd2c4ab9a30..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-astdb.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ruN asterisk-1.0.7-old/db1-ast/Makefile asterisk-1.0.7-new/db1-ast/Makefile ---- asterisk-1.0.7-old/db1-ast/Makefile 2004-08-31 18:33:00.000000000 +0200 -+++ asterisk-1.0.7-new/db1-ast/Makefile 2005-03-19 17:38:06.000000000 +0100 -@@ -32,8 +32,8 @@ - - $(LIBDB): $(OBJS) - rm -f $@ -- ar cq $@ $(OBJS) -- ranlib $@ -+ $(AR) cq $@ $(OBJS) -+ $(RANLIB) $@ - - $(LIBDBSO): $(SHOBJS) - $(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^ diff --git a/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-codecs-lpc10.patch b/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-codecs-lpc10.patch deleted file mode 100644 index 7d422500ebb..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-codecs-lpc10.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ruN asterisk-1.0.7-old/codecs/lpc10/Makefile asterisk-1.0.7-new/codecs/lpc10/Makefile ---- asterisk-1.0.7-old/codecs/lpc10/Makefile 2004-08-31 18:33:00.000000000 +0200 -+++ asterisk-1.0.7-new/codecs/lpc10/Makefile 2005-03-19 17:38:06.000000000 +0100 -@@ -31,6 +31,7 @@ - ifneq ($(PROC),ppc) - ifneq ($(PROC),x86_64) - ifneq ($(PROC),alpha) -+ifneq ($(PROC),mipsel) - #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. - #This works for even old (2.96) versions of gcc and provides a small boost either way. - #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it. -@@ -46,6 +47,7 @@ - endif - endif - endif -+endif - - LIB = $(LIB_TARGET_DIR)/liblpc10.a - -@@ -62,7 +64,7 @@ - - $(LIB): $(OBJ) - $(AR) cr $@ $(OBJ) -- ranlib $@ -+ $(RANLIB) $@ - - clean: - -rm -f *.o $(LIB) diff --git a/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-stdtime.patch b/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-stdtime.patch deleted file mode 100644 index c454b3e4185..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.0.7-Makefile-stdtime.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ruN asterisk-1.0.7-old/stdtime/Makefile asterisk-1.0.7-new/stdtime/Makefile ---- asterisk-1.0.7-old/stdtime/Makefile 2003-11-05 07:19:41.000000000 +0100 -+++ asterisk-1.0.7-new/stdtime/Makefile 2005-03-19 17:38:06.000000000 +0100 -@@ -3,8 +3,8 @@ - all: libtime.a - - libtime.a: $(OBJS) -- ar rv $@ $(OBJS) -- ranlib $@ -+ $(AR) rv $@ $(OBJS) -+ $(RANLIB) $@ - - install: - diff --git a/openwrt/package/asterisk/patches/asterisk-1.0.7-chan_iax2-tmp_path.patch b/openwrt/package/asterisk/patches/asterisk-1.0.7-chan_iax2-tmp_path.patch deleted file mode 100644 index 916496ea86d..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.0.7-chan_iax2-tmp_path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN asterisk-1.0.7-old/channels/chan_iax2.c asterisk-1.0.7-new/channels/chan_iax2.c ---- asterisk-1.0.7-old/channels/chan_iax2.c 2005-10-25 02:06:35.000000000 +0200 -+++ asterisk-1.0.7-new/channels/chan_iax2.c 2005-10-25 04:35:11.000000000 +0200 -@@ -960,7 +960,7 @@ - last++; - else - last = s; -- snprintf(s2, strlen(s) + 100, "/var/tmp/%s-%ld", last, (unsigned long)rand()); -+ snprintf(s2, strlen(s) + 100, "/tmp/%s-%ld", last, (unsigned long)rand()); - res = stat(s, &stbuf); - if (res < 0) { - ast_log(LOG_WARNING, "Failed to stat '%s': %s\n", s, strerror(errno)); diff --git a/openwrt/package/asterisk/patches/asterisk-1.0.7-dns.patch b/openwrt/package/asterisk/patches/asterisk-1.0.7-dns.patch deleted file mode 100644 index 23657bcc76b..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.0.7-dns.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ruN asterisk-1.0.7-old/dns.c asterisk-1.0.7-new/dns.c ---- asterisk-1.0.7-old/dns.c 2004-06-22 22:11:15.000000000 +0200 -+++ asterisk-1.0.7-new/dns.c 2005-03-19 17:38:06.000000000 +0100 -@@ -153,7 +153,13 @@ - - #if defined(res_ninit) - #define HAS_RES_NINIT --#else -+#endif -+ -+#ifdef __UCLIBC__ -+#undef HAS_RES_NINIT -+#endif -+ -+#ifndef HAS_RES_NINIT - AST_MUTEX_DEFINE_STATIC(res_lock); - #if 0 - #warning "Warning, res_ninit is missing... Could have reentrancy issues" diff --git a/openwrt/package/asterisk/patches/asterisk-1.0.9-chan_bluetooth.patch b/openwrt/package/asterisk/patches/asterisk-1.0.9-chan_bluetooth.patch deleted file mode 100644 index 7c278a71b41..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.0.9-chan_bluetooth.patch +++ /dev/null @@ -1,3678 +0,0 @@ -diff -ruN asterisk-1.0.9-old/channels/Makefile asterisk-1.0.9-new/channels/Makefile ---- asterisk-1.0.9-old/channels/Makefile 2005-08-22 20:42:22.000000000 +0200 -+++ asterisk-1.0.9-new/channels/Makefile 2005-08-22 21:12:14.000000000 +0200 -@@ -37,6 +37,12 @@ - # - #CHANNEL_LIBS+=chan_vofr - -+# -+# Asterisk Bluetooth Support -+# http://www.crazygreek.co.uk/content/chan_bluetooth -+# -+CHANNEL_LIBS += chan_bluetooth.so -+ - ifeq (${OSARCH},OpenBSD) - MYSQLLIB=-L/usr/local/lib/mysql -lmysqlclient - CFLAGS+=-I/usr/local/include -@@ -202,6 +208,9 @@ - chan_h323.so: chan_h323.o h323/libchanh323.a - $(CC) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat - -+chan_bluetooth.so: chan_bluetooth.o -+ $(CC) $(SOLINK) -o $@ $< $(EXTRA_LDFLAGS) -lbluetooth -+ - - #chan_modem.so : chan_modem.o - # $(CC) -rdynamic -shared -Xlinker -x -o $@ $< -diff -ruN asterisk-1.0.9-old/channels/chan_bluetooth.c asterisk-1.0.9-new/channels/chan_bluetooth.c ---- asterisk-1.0.9-old/channels/chan_bluetooth.c 1970-01-01 01:00:00.000000000 +0100 -+++ asterisk-1.0.9-new/channels/chan_bluetooth.c 2005-09-06 22:51:30.000000000 +0200 -@@ -0,0 +1,3598 @@ -+/* -+ * Asterisk -- A telephony toolkit for Linux. -+ * -+ * Asterisk Bluetooth Channel -+ * -+ * Author: Theo Zourzouvillys -+ * -+ * Adaptive Linux Solutions -+ * -+ * Copyright (C) 2004 Adaptive Linux Solutions -+ * -+ * This program is free software, distributed under the terms of -+ * the GNU General Public License -+ * -+ * ******************* NOTE NOTE NOTE NOTE NOTE ********************* -+ * -+ * This code is not at all tested, and only been developed with a -+ * HBH-200 headset and a Nokia 6310i right now. -+ * -+ * Expect it to crash, dial random numbers, and steal all your money. -+ * -+ * PLEASE try any headsets and phones, and let me know the results, -+ * working or not, along with all debug output! -+ * -+ * ------------------------------------------------------------------ -+ * -+ * Asterisk Bluetooth Support -+ * -+ * Well, here we go - Attempt to provide Handsfree profile support in -+ * both AG and HF modes, AG (AudioGateway) mode support for using -+ * headsets, and HF (Handsfree) mode for utilising mobile/cell phones -+ * -+ * It would be nice to also provide Headset support at some time in -+ * the future, however, a working Handsfree profile is nice for now, -+ * and as far as I can see, almost all new HS devices also support HF -+ * -+ * ------------------------------------------------------------------ -+ * INSTRUCTIONS -+ * -+ * You need to have bluez's bluetooth stack, along with user space -+ * tools (>=v2.10), and running hcid and sdsp. -+ * -+ * See bluetooth.conf for configuration details. -+ * -+ * - Ensure bluetooth subsystem is up and running. 'hciconfig' -+ * should show interface as UP. -+ * -+ * - If you're trying to use a headset/HS, start up asterisk, and try -+ * to pair it as you normally would. -+ * -+ * - If you're trying to use a Phone/AG, just make sure bluetooth is -+ * enabled on your phone, and start up asterisk. -+ * -+ * - 'bluetooth show peers' will show all bluetooth devices states. -+ * -+ * - Send a call out by using Dial(BLT/DevName/0123456). Call a HS -+ * with Dial(BLT/DevName) -+ * -+ * ------------------------------------------------------------------ -+ * BUGS -+ * -+ * - What should happen when an AG is paired with asterisk and -+ * someone uses the AG dalling a number manually? My test phone -+ * seems to try to open an SCO link. Perhaps an extension to -+ * route the call to, or maybe drop the RFCOM link all together? -+ * -+ * ------------------------------------------------------------------ -+ * COMPATIBILITY -+ * -+ * PLEASE email with the results of ANY -+ * device not listed in here (working or not), or if the device is -+ * listed and it doesn't work! Please also email full debug output -+ * for any device not working correctly or generating errors in log. -+ * -+ * HandsFree Profile: -+ * -+ * HS (HeadSet): -+ * - Ericsson HBH-200 -+ * -+ * AG (AudioGateway): -+ * - Nokia 6310i -+ * -+ * ------------------------------------------------------------------ -+ * -+ * Questions, bugs, or (preferably) patches to: -+ * -+ * -+ * -+ * ------------------------------------------------------------------ -+ */ -+ -+/* ---------------------------------- */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+/* --- Data types and definitions --- */ -+ -+#ifndef HANDSFREE_AUDIO_GW_SVCLASS_ID -+# define HANDSFREE_AUDIO_GW_SVCLASS_ID 0x111f -+#endif -+#define BLUETOOTH_FORMAT AST_FORMAT_SLINEAR -+#define BLT_CHAN_NAME "BLT" -+#define BLT_CONFIG_FILE "bluetooth.conf" -+#define BLT_RDBUFF_MAX 1024 -+#define BLT_DEFAULT_HCI_DEV 0 -+#define BLT_SVN_REVISION "$Rev$" -+ -+/* ---------------------------------- */ -+ -+typedef enum { -+ BLT_ROLE_NONE = 0, // Unknown Device -+ BLT_ROLE_HS = 1, // Device is a Headset -+ BLT_ROLE_AG = 2, // Device is an Audio Gateway -+ BLT_ROLE_GUI = 3 // Device is used as an GUI -+} blt_role_t; -+ -+/* State when we're in HS mode */ -+ -+typedef enum { -+ BLT_STATE_WANT_R = 0, -+ BLT_STATE_WANT_N = 1, -+ BLT_STATE_WANT_CMD = 2, -+ BLT_STATE_WANT_N2 = 3, -+} blt_state_t; -+ -+typedef enum { -+ BLT_STATUS_DOWN, -+ BLT_STATUS_CONNECTING, -+ BLT_STATUS_NEGOTIATING, -+ BLT_STATUS_READY, -+ BLT_STATUS_RINGING, -+ BLT_STATUS_IN_CALL, -+} blt_status_t; -+ -+/* ---------------------------------- */ -+ -+/* Default config settings */ -+ -+#define BLT_DEFAULT_CHANNEL_AG 5 -+#define BLT_DEFAULT_CHANNEL_HS 6 -+#define BLT_DEFAULT_CHANNEL_GUI 1 -+#define BLT_DEFAULT_ROLE BLT_ROLE_HS -+#define BLT_OBUF_LEN (48 * 25) -+ -+#define BUFLEN (4800) -+ -+/* ---------------------------------- */ -+ -+typedef struct blt_dev blt_dev_t; -+ -+void ag_cgmi_response(blt_dev_t * dev, char * cmd); -+void ag_unknown_response(blt_dev_t * dev, char * cmd); -+void ag_cgmi_valid_response(blt_dev_t * dev, char * cmd); -+void ag_clip_response(blt_dev_t * dev, char * cmd); -+void ag_cmer_response(blt_dev_t * dev, char * cmd); -+void ag_cind_status_response(blt_dev_t * dev, char * cmd); -+void ag_cind_response(blt_dev_t * dev, char * cmd); -+void ag_brsf_response(blt_dev_t * dev, char * cmd); -+void remove_sdp_records(void); -+ -+void gui_easm_response(blt_dev_t * dev, char * cmd); -+ -+int sock_err(int fd); -+int parse_clip(const char * str, char *number, int number_len, char * name, int name_len, int *type); -+int set_buffer(char * ring, char * data, int circular_len, int * pos, int data_len); -+int get_buffer(char * dst, char * ring, int ring_size, int * head, int to_copy); -+void gui_eaid_response(blt_dev_t * dev, char * cmd); -+ -+ -+ -+struct blt_ring { -+ unsigned char buf[BUFLEN]; -+}; -+// XXX:T: Tidy this lot up. -+struct blt_dev { -+ -+ blt_status_t status; /* Device Status */ -+ -+ struct ast_channel * owner; /* Channel we belong to, possibly NULL */ -+ blt_dev_t * dev; /* The bluetooth device channel is for */ -+ struct ast_frame fr; /* Recieved frame */ -+ -+ /* SCO Handler */ -+ int sco_pipe[2]; /* SCO alert pipe */ -+ int sco; /* SCO fd */ -+ int sco_handle; /* SCO Handle */ -+ int sco_mtu; /* SCO MTU */ -+ int sco_running; /* 1 when sCO thread should be running */ -+ pthread_t sco_thread; /* SCO thread */ -+ ast_mutex_t sco_lock; /* SCO lock */ -+ int sco_pos_in; /* Reader in position (drain)*/ -+ int sco_pos_inrcv; /* Reader in position (fill) */ -+ int wakeread; /* blt_read() needs to be woken */ -+ int sco_pos_out; /* Reader out position */ -+ int sco_sending; /* Sending SCO packets */ -+ char buf[1200]; /* Incoming data buffer */ -+ int bufpos; -+ char sco_buf_out[BUFLEN]; /* 24 chunks of 48 */ -+ char sco_buf_in[BUFLEN]; /* 24 chunks of 48 */ -+ -+ char dnid[1024]; /* Outgoi gncall dialed number */ -+ unsigned char * obuf[BLT_OBUF_LEN]; /* Outgoing data buffer */ -+ int obuf_len; /* Output Buffer Position */ -+ int obuf_wpos; /* Buffer Reader */ -+ -+ // device -+ int autoconnect; /* 1 for autoconnect */ -+ int outgoing_id; /* Outgoing connection scheduler id */ -+ char * name; /* Devices friendly name */ -+ blt_role_t role; /* Device role (HS or AG) */ -+ bdaddr_t bdaddr; /* remote address */ -+ int channel; /* remote channel */ -+ int rd; /* RFCOMM fd */ -+ int tmp_rd; /* RFCOMM fd */ -+ int call_cnt; /* Number of attempted calls */ -+ ast_mutex_t lock; /* RFCOMM socket lock */ -+ char rd_buff[BLT_RDBUFF_MAX]; /* RFCOMM input buffer */ -+ int rd_buff_pos; /* RFCOMM input buffer position */ -+ int ready; /* 1 When ready */ -+ char *context; -+ -+ /* AG mode */ -+ char last_ok_cmd[BLT_RDBUFF_MAX]; /* Runtime[AG]: Last AT command that was OK */ -+ int cind; /* Runtime[AG]: Recieved +CIND */ -+ int call_pos, service_pos, callsetup_pos; /* Runtime[AG]: Positions in CIND/CMER */ -+ int call, service, callsetup; /* Runtime[AG]: Values */ -+ char cid_num[AST_MAX_EXTENSION]; -+ char cid_name[AST_MAX_EXTENSION]; -+ -+ /* HS mode */ -+ blt_state_t state; /* Runtime: Device state (AG mode only) */ -+ int ring_timer; /* Runtime:Ring Timer */ -+ char last_err_cmd[BLT_RDBUFF_MAX]; /* Runtime: Last AT command that was OK */ -+ void (*cb)(blt_dev_t * dev, char * str); /* Runtime: Callback when in HS mode */ -+ -+ int brsf; /* Runtime: Bluetooth Retrieve Supported Features */ -+ int bvra; /* Runtime: Bluetooth Voice Recognised Activation */ -+ int gain_speaker; /* Runtime: Gain Of Speaker */ -+ int clip; /* Runtime: Supports CLID */ -+ int colp; /* Runtime: Connected Line ID */ -+ int elip; /* Runtime: (Ericsson) Supports CLID */ -+ int eolp; /* Runtime: (Ericsson) Connected Line ID */ -+ int ringing; /* Runtime: Device is ringing */ -+ -+ blt_dev_t * next; /* Next in linked list */ -+ -+}; -+ -+typedef struct blt_atcb { -+ -+ /* The command */ -+ char * str; -+ -+ /* DTE callbacks: */ -+ int (*set)(blt_dev_t * dev, const char * arg, int len); -+ int (*read)(blt_dev_t * dev); -+ int (*execute)(blt_dev_t * dev, const char * data); -+ int (*test)(blt_dev_t * dev); -+ -+ /* DCE callbacks: */ -+ int (*unsolicited)(blt_dev_t * dev, const char * value); -+ -+} blt_atcb_t; -+ -+/* ---------------------------------- */ -+ -+static void rd_close(blt_dev_t * dev, int reconnect, int err); -+static int send_atcmd(blt_dev_t * device, const char * fmt, ...); -+static int sco_connect(blt_dev_t * dev); -+static int sco_start(blt_dev_t * dev, int fd); -+ -+/* ---------------------------------- */ -+ -+/* RFCOMM channel we listen on*/ -+static int rfcomm_channel_ag = BLT_DEFAULT_CHANNEL_AG; -+static int rfcomm_channel_hs = BLT_DEFAULT_CHANNEL_HS; -+static int rfcomm_channel_gui = BLT_DEFAULT_CHANNEL_GUI; -+ -+static char* gui_default_sip_number = ""; -+static char* gui_default_sip_address = ""; -+ -+/* Address of local bluetooth interface */ -+static int hcidev_id; -+static bdaddr_t local_bdaddr; -+ -+/* All the current sockets */ -+AST_MUTEX_DEFINE_STATIC(iface_lock); -+static blt_dev_t * iface_head; -+static int ifcount = 0; -+ -+static int sdp_record_hs = -1; -+static int sdp_record_ag = -1; -+static int sdp_record_gui = -1; -+ -+/* RFCOMM listen socket */ -+static int rfcomm_sock_ag = -1; -+static int rfcomm_sock_hs = -1; -+static int rfcomm_sock_gui = -1; -+ -+static int sco_socket = -1; -+ -+static int monitor_pid = -1; -+ -+/* The socket monitoring thread */ -+static pthread_t monitor_thread = AST_PTHREADT_NULL; -+AST_MUTEX_DEFINE_STATIC(monitor_lock); -+ -+/* Count how many times this module is currently in use */ -+static int usecnt = 0; -+AST_MUTEX_DEFINE_STATIC(usecnt_lock); -+ -+static struct sched_context * sched = NULL; -+ -+/* ---------------------------------- */ -+ -+#if ASTERISK_VERSION_NUM <= 010107 -+#include -+#define tech_pvt pvt->pvt -+#else /* CVS. FIXME: Version number */ -+static struct ast_channel *blt_request(const char *type, int format, void *data, int *cause); -+static int blt_hangup(struct ast_channel *c); -+static int blt_answer(struct ast_channel *c); -+static struct ast_frame *blt_read(struct ast_channel *chan); -+static int blt_call(struct ast_channel *c, char *dest, int timeout); -+static int blt_write(struct ast_channel *chan, struct ast_frame *f); -+static int blt_indicate(struct ast_channel *chan, int cond); -+ -+static const struct ast_channel_tech blt_tech = { -+ .type = BLT_CHAN_NAME, -+ .description = "Bluetooth Channel Driver", -+ .capabilities = BLUETOOTH_FORMAT, -+ .requester = blt_request, -+ .hangup = blt_hangup, -+ .answer = blt_answer, -+ .read = blt_read, -+ .call = blt_call, -+ .write = blt_write, -+ .indicate = blt_indicate, -+}; -+#endif -+/* ---------------------------------- */ -+ -+static const char * -+role2str(blt_role_t role) -+{ -+ switch (role) { -+ case BLT_ROLE_HS: -+ return "HS"; -+ case BLT_ROLE_AG: -+ return "AG"; -+ case BLT_ROLE_GUI: -+ return "GUI"; -+ case BLT_ROLE_NONE: -+ default: -+ return "??"; -+ } -+} -+ -+static const char * -+status2str(blt_status_t status) -+{ -+ switch (status) { -+ case BLT_STATUS_DOWN: -+ return "Down"; -+ case BLT_STATUS_CONNECTING: -+ return "Connecting"; -+ case BLT_STATUS_NEGOTIATING: -+ return "Negotiating"; -+ case BLT_STATUS_READY: -+ return "Ready"; -+ case BLT_STATUS_RINGING: -+ return "Ringing"; -+ case BLT_STATUS_IN_CALL: -+ return "InCall"; -+ }; -+ return "Unknown"; -+} -+ -+int sock_err(int fd) -+{ -+ int ret; -+ int len = sizeof(ret); -+ getsockopt(fd, SOL_SOCKET, SO_ERROR, &ret, &len); -+ return ret; -+} -+ -+/* ---------------------------------- */ -+int parse_clip(const char * str, char *number, int number_len, char * name, int name_len, int *type) -+{ -+ const char *c = str; -+ const char *start; -+ int length; -+ char typestr[256]; -+ -+ memset(number, 0, number_len); -+ memset(name, 0, name_len); -+ *type = 0; -+ -+ number[0] = '\0'; -+ name[0] = '\0'; -+ while(*c && *c != '"') -+ c++; -+ c++; -+ start = c; -+ while(*c && *c != '"') -+ c++; -+ length = c - start < number_len ? c - start : number_len; -+ strncpy(number, start, length); -+ number[length] = '\0'; -+ c++; -+ while(*c && *c != ',') -+ c++; -+ c++; -+ start = c; -+ while(*c && *c != ',') -+ c++; -+ length = c - start < number_len ? c - start : number_len; -+ strncpy(typestr, start, length); -+ typestr[length] = '\0'; -+ *type = atoi(typestr); -+ c++; -+ while(*c && *c != ',') -+ c++; -+ c++; -+ while(*c && *c != ',') -+ c++; -+ c++; -+ while(*c && *c != '"') -+ c++; -+ c++; -+ start = c; -+ while(*c && *c != '"') -+ c++; -+ length = c - start < number_len ? c - start : number_len; -+ strncpy(name, start, length); -+ name[length] = '\0'; -+ -+ return(1); -+} -+ -+ -+static const char * -+parse_cind(const char * str, char * name, int name_len) -+{ -+ int c = 0; -+ -+ memset(name, 0, name_len); -+ -+ while (*str) { -+ if (*str == '(') { -+ if (++c == 1 && *(str+1) == '"') { -+ const char * start = str + 2; -+ int len = 0; -+ str += 2; -+ while (*str && *str != '"') { -+ len++; -+ str++; -+ } -+ if (len == 0) -+ return NULL; -+ strncpy(name, start, (len > name_len) ? name_len : len); -+ } -+ } else if (*str == ')') -+ c--; -+ else if (c == 0 && *str == ',') -+ return str + 1; -+ str++; -+ } -+ return NULL; -+} -+ -+static void -+set_cind(blt_dev_t * dev, int indicator, int val) -+{ -+ -+ ast_log(LOG_DEBUG, "CIND %d set to %d\n", indicator, val); -+ -+ if (indicator == dev->callsetup_pos) { -+ -+ // call progress -+ -+ dev->callsetup = val; -+ -+ switch (val) { -+ case 3: -+ // Outgoing ringing -+ if ((dev->owner && dev->role == BLT_ROLE_AG) || -+ (dev->owner && dev->role == BLT_ROLE_GUI)) -+ ast_queue_control(dev->owner, AST_CONTROL_RINGING); -+ break; -+ case 2: -+ break; -+ case 1: -+ break; -+ case 0: -+ if ((dev->owner && dev->role == BLT_ROLE_AG && dev->call == 0) || -+ (dev->owner && dev->role == BLT_ROLE_AG && dev->call == 0)) -+ ast_queue_control(dev->owner, AST_CONTROL_CONGESTION); -+ break; -+ } -+ -+ } else if (indicator == dev->service_pos) { -+ -+ // Signal -+ -+ if (val == 0) -+ ast_log(LOG_NOTICE, "Audio Gateway %s lost signal\n", dev->name); -+ else if (dev->service == 0 && val > 0) -+ ast_log(LOG_NOTICE, "Audio Gateway %s got signal\n", dev->name); -+ -+ dev->service = val; -+ -+ } else if (indicator == dev->call_pos) { -+ -+ // Call -+ -+ dev->call = val; -+ -+ if (dev->owner) { -+ if (val == 1) { -+ sco_start(dev, -1); -+ ast_queue_control(dev->owner, AST_CONTROL_ANSWER); -+ } else if (val == 0) -+ ast_queue_control(dev->owner, AST_CONTROL_HANGUP); -+ } -+ -+ } -+ -+ -+} -+ -+/* ---------------------------------- */ -+ -+int -+set_buffer(char * ring, char * data, int circular_len, int * pos, int data_len) -+{ -+ int start_pos = *(pos); -+ int done = 0; -+ int copy; -+ -+ while (data_len) { -+ // Set can_do to the most we can do in this copy. -+ -+ copy = MIN(circular_len - start_pos, data_len); -+ memcpy(ring + start_pos, data + done, copy); -+ done += copy; -+ start_pos += copy; -+ data_len -= copy; -+ -+ if (start_pos == circular_len) { -+ start_pos = 0; -+ } -+ } -+ *(pos) = start_pos; -+ return 0; -+} -+ -+int -+get_buffer(char * dst, char * ring, int ring_size, int * head, int to_copy) -+{ -+ int copy; -+ -+ // |1|2|3|4|5|6|7|8|9| -+ // |-----| -+ -+ while (to_copy) { -+ -+ // Set can_do to the most we can do in this copy. -+ copy = MIN(ring_size - *head, to_copy); -+ -+ // ast_log(LOG_DEBUG, "Getting: %d bytes, From pos %d\n", copy, *head); -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+ memcpy(dst, ring + *head, copy); -+#else -+ // memcpy(dst, ring + *head, copy); -+ ast_swapcopy_samples(dst, ring+*head, copy/2); -+#endif -+ memset(ring+*head, 0, copy); -+ dst += copy; -+ *head += copy; -+ to_copy -= copy; -+ -+ if (*head == ring_size ) { -+ *head = 0; -+ } -+ -+ } -+ -+ return 0; -+} -+ -+/* Handle SCO audio sync. -+ * -+ * If we are the MASTER, then we control the timing, -+ * in 48 byte chunks. If we're the SLAVE, we send -+ * as and when we recieve a packet. -+ * -+ * Because of packet/timing nessecity, we -+ * start up a thread when we're passing audio, so -+ * that things are timed exactly right. -+ * -+ * sco_thread() is the function that handles it. -+ * -+ */ -+ -+static void * -+sco_thread(void * data) -+{ -+ blt_dev_t * dev = (blt_dev_t*)data; -+ int res; -+ struct pollfd pfd[2]; -+ int in_pos = 0; -+ int out_pos = 0; -+ char c = 1; -+ int sending; -+ char buf[1024]; -+ int len; -+ -+ // Avoid deadlock in odd circumstances -+ -+ ast_log(LOG_WARNING, "SCO thread started on fd %d, pid %d\n", dev->sco, getpid()); -+ -+ if (fcntl(dev->sco_pipe[1], F_SETFL, O_RDWR|O_NONBLOCK)) { -+ ast_log(LOG_WARNING, "fcntl failed on sco_pipe\n"); -+ } -+ -+ // dev->status = BLT_STATUS_IN_CALL; -+ // ast_queue_control(dev->owner, AST_CONTROL_ANSWER); -+ // Set buffer to silence, just incase. -+ -+ ast_mutex_lock(&(dev->sco_lock)); -+ -+ memset(dev->sco_buf_in, 0, BUFLEN); -+ memset(dev->sco_buf_out, 0, BUFLEN); -+ -+ dev->sco_pos_in = 0; -+ dev->sco_pos_out = 0; -+ dev->sco_pos_inrcv = 0; -+ dev->wakeread = 1; -+ -+ ast_mutex_unlock(&(dev->sco_lock)); -+ -+ while (1) { -+ -+ ast_mutex_lock(&(dev->sco_lock)); -+ -+ if (dev->sco_running != 1) { -+ ast_log(LOG_DEBUG, "SCO stopped.\n"); -+ break; -+ } -+ -+ pfd[0].fd = dev->sco; -+ pfd[0].events = POLLIN; -+ -+ pfd[1].fd = dev->sco_pipe[1]; -+ pfd[1].events = POLLIN; -+ -+ ast_mutex_unlock(&(dev->sco_lock)); -+ -+ res = poll(pfd, 2, 50); -+ -+ if (res == -1 && errno != EINTR) { -+ ast_log(LOG_DEBUG, "SCO poll() error\n"); -+ break; -+ } -+ -+ if (res == 0) -+ continue; -+ -+ -+ if (pfd[0].revents & POLLIN) { -+ -+ len = read(dev->sco, buf, 48); -+ -+ if (len) { -+ ast_mutex_lock(&(dev->lock)); -+ -+ if (dev->owner && dev->owner->_state == AST_STATE_UP) { -+ ast_mutex_lock(&(dev->sco_lock)); -+ set_buffer(dev->sco_buf_in, buf, BUFLEN, &in_pos, len); -+ dev->sco_pos_inrcv = in_pos; -+ -+ get_buffer(buf, dev->sco_buf_out, BUFLEN, &out_pos, len); -+ if (write(dev->sco, buf, len) != len) -+ ast_log(LOG_WARNING, "Wrote <48 to sco\n"); -+ -+ if (dev->wakeread) { -+ /* blt_read has caught up. Kick it */ -+ dev->wakeread = 0; -+ if(write(dev->sco_pipe[1], &c, 1) != 1) -+ ast_log(LOG_WARNING, "write to kick sco_pipe failed\n"); -+ } -+ ast_mutex_unlock(&(dev->sco_lock)); -+ } -+ ast_mutex_unlock(&(dev->lock)); -+ } -+ -+ } else if (pfd[0].revents) { -+ -+ int e = sock_err(pfd[0].fd); -+ ast_log(LOG_ERROR, "SCO connection error: %s (errno %d)\n", strerror(e), e); -+ break; -+ -+ } else if (pfd[1].revents & POLLIN) { -+ -+ int len; -+ -+ len = read(pfd[1].fd, &c, 1); -+ sending = (sending) ? 0 : 1; -+ -+ ast_mutex_unlock(&(dev->sco_lock)); -+ -+ } else if (pfd[1].revents) { -+ -+ int e = sock_err(pfd[1].fd); -+ ast_log(LOG_ERROR, "SCO pipe connection event %d on pipe[1]=%d: %s (errno %d)\n", pfd[1].revents, pfd[1].fd, strerror(e), e); -+ break; -+ -+ } else { -+ ast_log(LOG_NOTICE, "Unhandled poll output\n"); -+ ast_mutex_unlock(&(dev->sco_lock)); -+ } -+ -+ } -+ -+ ast_mutex_lock(&(dev->lock)); -+ close(dev->sco); -+ dev->sco = -1; -+ dev->sco_running = -1; -+ -+ memset(dev->sco_buf_in, 0, BUFLEN); -+ memset(dev->sco_buf_out, 0, BUFLEN); -+ -+ dev->sco_pos_in = 0; -+ dev->sco_pos_out = 0; -+ dev->sco_pos_inrcv = 0; -+ -+ ast_mutex_unlock(&(dev->sco_lock)); -+ if (dev->owner) -+ ast_queue_control(dev->owner, AST_CONTROL_HANGUP); -+ ast_mutex_unlock(&(dev->lock)); -+ ast_log(LOG_DEBUG, "SCO thread stopped\n"); -+ return NULL; -+} -+ -+/* Start SCO thread. Must be called with dev->lock */ -+ -+static int -+sco_start(blt_dev_t * dev, int fd) -+{ -+ -+ if (dev->sco_pipe[1] <= 0) { -+ ast_log(LOG_ERROR, "SCO pipe[1] == %d\n", dev->sco_pipe[1]); -+ return -1; -+ } -+ -+ ast_mutex_lock(&(dev->sco_lock)); -+ -+ if (dev->sco_running != -1) { -+ ast_log(LOG_ERROR, "Tried to start SCO thread while already running\n"); -+ ast_mutex_unlock(&(dev->sco_lock)); -+ return -1; -+ } -+ -+ if (dev->sco == -1) { -+ if (fd > 0) { -+ dev->sco = fd; -+ } else if (sco_connect(dev) != 0) { -+ ast_log(LOG_ERROR, "SCO fd invalid\n"); -+ ast_mutex_unlock(&(dev->sco_lock)); -+ return -1; -+ } -+ } -+ -+ dev->sco_running = 1; -+ -+ if (ast_pthread_create(&(dev->sco_thread), NULL, sco_thread, dev) < 0) { -+ ast_log(LOG_ERROR, "Unable to start SCO thread.\n"); -+ dev->sco_running = -1; -+ ast_mutex_unlock(&(dev->sco_lock)); -+ return -1; -+ } -+ -+ ast_mutex_unlock(&(dev->sco_lock)); -+ -+ return 0; -+} -+ -+/* Stop SCO thread. Must be called with dev->lock */ -+ -+static int -+sco_stop(blt_dev_t * dev) -+{ -+ ast_mutex_lock(&(dev->sco_lock)); -+ if (dev->sco_running == 1) -+ dev->sco_running = 0; -+ else -+ dev->sco_running = -1; -+ dev->sco_sending = 0; -+ ast_mutex_unlock(&(dev->sco_lock)); -+ return 0; -+} -+ -+/* ---------------------------------- */ -+ -+/* Answer the call. Call with lock held on device */ -+ -+static int -+answer(blt_dev_t * dev) -+{ -+ -+ if ( (!dev->owner) || (dev->ready != 1) || (dev->status != BLT_STATUS_READY && dev->status != BLT_STATUS_RINGING)) { -+ ast_log(LOG_ERROR, "Attempt to answer() in invalid state (owner=%p, ready=%d, status=%s)\n", -+ dev->owner, dev->ready, status2str(dev->status)); -+ return -1; -+ } -+ -+ // dev->sd = sco_connect(&local_bdaddr, &(dev->bdaddr), NULL, NULL, 0); -+ // dev->status = BLT_STATUS_IN_CALL; -+ // dev->owner->fds[0] = dev->sd; -+ // if we are answering (hitting button): -+ ast_queue_control(dev->owner, AST_CONTROL_ANSWER); -+ // if asterisk signals us to answer: -+ // ast_setstate(ast, AST_STATE_UP); -+ -+ /* Start SCO link */ -+ sco_start(dev, -1); -+ return 0; -+} -+ -+/* ---------------------------------- */ -+ -+static int -+blt_write(struct ast_channel * ast, struct ast_frame * frame) -+{ -+ blt_dev_t * dev = ast->tech_pvt; -+ -+ /* Write a frame of (presumably voice) data */ -+ -+ if (frame->frametype != AST_FRAME_VOICE) { -+ ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype); -+ return 0; -+ } -+ -+ if (!(frame->subclass & BLUETOOTH_FORMAT)) { -+ static int fish = 5; -+ if (fish) { -+ ast_log(LOG_WARNING, "Cannot handle frames in format %d\n", frame->subclass); -+ fish--; -+ } -+ return 0; -+ } -+ -+ if (ast->_state != AST_STATE_UP) { -+ return 0; -+ } -+ -+ ast_mutex_lock(&(dev->sco_lock)); -+ set_buffer(dev->sco_buf_out, frame->data, BUFLEN, &(dev->sco_pos_out), MIN(frame->datalen, BUFLEN)); -+ ast_mutex_unlock(&(dev->sco_lock)); -+ -+ return 0; -+ -+} -+ -+static struct ast_frame * -+blt_read(struct ast_channel * ast) -+{ -+ blt_dev_t * dev = ast->tech_pvt; -+ char c = 1; -+ int len; -+ static int fish = 0; -+ /* Some nice norms */ -+ -+ dev->fr.datalen = 0; -+ dev->fr.samples = 0; -+ dev->fr.data = NULL; -+ dev->fr.src = BLT_CHAN_NAME; -+ dev->fr.offset = 0; -+ dev->fr.mallocd = AST_MALLOCD_DATA; -+ dev->fr.delivery.tv_sec = 0; -+ dev->fr.delivery.tv_usec = 0; -+ read(dev->sco_pipe[0], &c, 1); -+ ast_mutex_lock(&(dev->sco_lock)); -+ dev->sco_sending = 1; -+ -+ if (dev->sco_pos_inrcv < dev->sco_pos_in) { -+ /* Buffer wrapped. Read only till the end */ -+ len = BUFLEN - dev->sco_pos_in + dev->sco_pos_inrcv; -+ } else { -+ len = dev->sco_pos_inrcv - dev->sco_pos_in; -+ } -+ dev->fr.data = malloc(AST_FRIENDLY_OFFSET+len) + AST_FRIENDLY_OFFSET; -+ -+ get_buffer(dev->fr.data, dev->sco_buf_in, BUFLEN, &(dev->sco_pos_in), len); -+ dev->wakeread = 1; -+ ast_mutex_unlock(&(dev->sco_lock)); -+ if (fish) { -+ unsigned char *x = dev->fr.data; -+ ast_log(LOG_WARNING, "blt_read %d: %02x %02x %02x %02x %02x %02x\n", -+ dev->fr.datalen, x[0], x[1], x[2], x[3], x[4], x[5]); -+ fish--; -+ } -+ -+ dev->fr.samples = len / 2; -+ dev->fr.datalen = len; -+ dev->fr.frametype = AST_FRAME_VOICE; -+ dev->fr.subclass = BLUETOOTH_FORMAT; -+ dev->fr.offset = AST_FRIENDLY_OFFSET; -+ return &dev->fr; -+} -+ -+/* Escape Any '"' in str. Return malloc()ed string */ -+static char * -+escape_str(char * str) -+{ -+ char * ptr = str; -+ char * pret; -+ char * ret; -+ int len = 0; -+ -+ while (*ptr) { -+ if (*ptr == '"') -+ len++; -+ len++; -+ ptr++; -+ } -+ -+ ret = malloc(len + 1); -+ pret = memset(ret, 0, len + 1); -+ -+ ptr = str; -+ -+ while (*ptr) { -+ if (*ptr == '"') -+ *pret++ = '\\'; -+ *pret++ = *ptr++; -+ } -+ -+ return ret; -+} -+ -+static int -+ring_hs(blt_dev_t * dev) -+{ -+#if (ASTERISK_VERSION_NUM < 010100) -+ char tmp[AST_MAX_EXTENSION]; -+ char *name, *num; -+#endif -+ -+ ast_mutex_lock(&(dev->lock)); -+ -+ if (dev->owner == NULL) { -+ ast_mutex_unlock(&(dev->lock)); -+ return 0; -+ } -+ -+ dev->ringing = 1; -+ dev->status = BLT_STATUS_RINGING; -+ -+ send_atcmd(dev, "RING"); -+ -+ dev->owner->rings++; -+ -+ // XXX:T: '"' needs to be escaped in ELIP. -+ -+#if (ASTERISK_VERSION_NUM < 010100) -+ -+ if (dev->owner->callerid) { -+ -+ memset(tmp, 0, sizeof(tmp)); -+ strncpy(tmp, dev->owner->callerid, sizeof(tmp)-1); -+ -+ if (!ast_callerid_parse(tmp, &name, &num)) { -+ -+ if (dev->clip && num) -+ send_atcmd(dev, "+CLIP: \"%s\",129", num); -+ -+ if (dev->elip && name) { -+ char * esc = escape_str(name); -+ send_atcmd(dev, "*ELIP: \"%s\"", esc); -+ free(esc); -+ } -+ } -+ } -+ -+ -+#else -+ -+ if (dev->clip && dev->owner->cid.cid_num) -+ send_atcmd(dev, "+CLIP: \"%s\",129", dev->owner->cid.cid_num); -+ -+ if (dev->elip && dev->owner->cid.cid_name) { -+ char * esc = escape_str(dev->owner->cid.cid_name); -+ send_atcmd(dev, "*ELIP: \"%s\"", esc); -+ free(esc); -+ } -+ -+#endif -+ -+ ast_mutex_unlock(&(dev->lock)); -+ -+ return 1; -+} -+ -+/* -+ * If the HS is already connected, then just send RING, otherwise, things get a -+ * little more sticky. We first have to find the channel for HS using SDP, -+ * then initiate the connection. Once we've done that, we can start the call. -+ */ -+ -+static int -+blt_call(struct ast_channel * ast, char * dest, int timeout) -+{ -+ blt_dev_t * dev = ast->tech_pvt; -+ -+ if ((ast->_state != AST_STATE_DOWN) && (ast->_state != AST_STATE_RESERVED)) { -+ ast_log(LOG_WARNING, "blt_call called on %s, neither down nor reserved\n", ast->name); -+ return -1; -+ } -+ -+ ast_log(LOG_DEBUG, "Calling %s on %s [t: %d]\n", dest, ast->name, timeout); -+ -+ if (ast_mutex_lock(&iface_lock)) { -+ ast_log(LOG_ERROR, "Failed to get iface_lock.\n"); -+ return -1; -+ } -+ -+// ast_mutex_lock(&(dev->lock)); -+ -+ if (dev->ready == 0) { -+ ast_log(LOG_WARNING, "Tried to call a device not ready/connected.\n"); -+ ast_setstate(ast, AST_CONTROL_CONGESTION); -+// ast_mutex_unlock(&(dev->lock)); -+ ast_mutex_unlock(&iface_lock); -+ return 0; -+ } -+ -+ if (dev->role == BLT_ROLE_HS) { -+ -+ send_atcmd(dev, "+CIEV: 3,1"); -+ -+ dev->ring_timer = ast_sched_add(sched, 5000, AST_SCHED_CB(ring_hs), dev); -+ -+ ring_hs(dev); -+ -+ ast_setstate(ast, AST_STATE_RINGING); -+ ast_queue_control(ast, AST_CONTROL_RINGING); -+ -+ } else if (dev->role == BLT_ROLE_AG) { -+ -+ send_atcmd(dev, "ATD%s;", dev->dnid); -+// it does not seem like we should start the audio until the call is connected -+// sco_start(dev, -1); -+ } else if (dev->role == BLT_ROLE_GUI) { -+ -+ send_atcmd(dev, "ATD%s;", dev->dnid); -+ -+ } else { -+ -+ ast_setstate(ast, AST_CONTROL_CONGESTION); -+ ast_log(LOG_ERROR, "Unknown device role\n"); -+ -+ } -+ -+// ast_mutex_unlock(&(dev->lock)); -+ ast_mutex_unlock(&iface_lock); -+ -+ return 0; -+} -+ -+static int -+blt_hangup(struct ast_channel * ast) -+{ -+ blt_dev_t * dev = ast->tech_pvt; -+ -+ ast_log(LOG_DEBUG, "blt_hangup(%s)\n", ast->name); -+ -+ if (!ast->tech_pvt) { -+ ast_log(LOG_WARNING, "Asked to hangup channel not connected\n"); -+ return 0; -+ } -+ -+ if (ast_mutex_lock(&iface_lock)) { -+ ast_log(LOG_ERROR, "Failed to get iface_lock\n"); -+ return 0; -+ } -+ -+ ast_mutex_lock(&(dev->lock)); -+ -+ sco_stop(dev); -+ dev->sco_sending = 0; -+ -+ if (dev->role == BLT_ROLE_HS) { -+ -+ if (dev->ringing == 0) { -+ // Actual call in progress -+ send_atcmd(dev, "+CIEV: 2,0"); -+ } else { -+ -+ // Just ringing still -+ -+ if (dev->role == BLT_ROLE_HS) -+ send_atcmd(dev, "+CIEV: 3,0"); -+ -+ if (dev->ring_timer >= 0) -+ ast_sched_del(sched, dev->ring_timer); -+ -+ dev->ring_timer = -1; -+ dev->ringing = 0; -+ -+ } -+ -+ } else if (dev->role == BLT_ROLE_AG) { -+ -+ // Cancel call. -+ send_atcmd(dev, "ATH"); -+ send_atcmd(dev, "AT+CHUP"); -+ -+ } -+ -+ if (dev->status == BLT_STATUS_IN_CALL || dev->status == BLT_STATUS_RINGING) -+ dev->status = BLT_STATUS_READY; -+ -+ ast->tech_pvt = NULL; -+ dev->owner = NULL; -+ ast_mutex_unlock(&(dev->lock)); -+ ast_setstate(ast, AST_STATE_DOWN); -+ ast_mutex_unlock(&(iface_lock)); -+ -+ return 0; -+} -+ -+static int -+blt_indicate(struct ast_channel * c, int condition) -+{ -+ ast_log(LOG_DEBUG, "blt_indicate (%d)\n", condition); -+ -+ switch(condition) { -+ case AST_CONTROL_RINGING: -+ return -1; -+ default: -+ ast_log(LOG_WARNING, "Don't know how to condition %d\n", condition); -+ break; -+ } -+ return -1; -+} -+ -+static int -+blt_answer(struct ast_channel * ast) -+{ -+ blt_dev_t * dev = ast->tech_pvt; -+ -+ ast_mutex_lock(&dev->lock); -+ -+ // if (dev->ring_timer >= 0) -+ // ast_sched_del(sched, dev->ring_timer); -+ // dev->ring_timer = -1; -+ -+ ast_log(LOG_DEBUG, "Answering interface\n"); -+ -+ if (ast->_state != AST_STATE_UP) { -+ send_atcmd(dev, "+CIEV: 2,1"); -+ send_atcmd(dev, "+CIEV: 3,0"); -+ sco_start(dev, -1); -+ ast_setstate(ast, AST_STATE_UP); -+ } -+ -+ ast_mutex_unlock(&dev->lock); -+ -+ return 0; -+} -+ -+static struct ast_channel * -+blt_new(blt_dev_t * dev, int state, const char * context, const char * number) -+{ -+ struct ast_channel * ast; -+ char c = 0; -+ -+ if ((ast = ast_channel_alloc(1)) == NULL) { -+ ast_log(LOG_WARNING, "Unable to allocate channel structure\n"); -+ return NULL; -+ } -+ -+ snprintf(ast->name, sizeof(ast->name), "BLT/%s", dev->name); -+ -+ // ast->fds[0] = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO); -+ -+ ast->nativeformats = BLUETOOTH_FORMAT; -+ //ast->rawreadformat = BLUETOOTH_FORMAT; -+ //ast->rawwriteformat = BLUETOOTH_FORMAT; -+ ast->writeformat = BLUETOOTH_FORMAT; -+ ast->readformat = BLUETOOTH_FORMAT; -+ -+ ast_setstate(ast, state); -+ -+ ast->type = BLT_CHAN_NAME; -+ -+ ast->tech_pvt = dev; -+#if ASTERISK_VERSION_NUM > 010107 -+ ast->tech = &blt_tech; -+#else -+ ast->pvt->call = blt_call; -+ ast->pvt->indicate = blt_indicate; -+ ast->pvt->hangup = blt_hangup; -+ ast->pvt->read = blt_read; -+ ast->pvt->write = blt_write; -+ ast->pvt->answer = blt_answer; -+#endif -+ strncpy(ast->context, context, sizeof(ast->context)-1); -+ strncpy(ast->exten, number, sizeof(ast->exten) - 1); -+ if(0 == strcmp(number, "s")) -+ { -+ //ast_set_callerid(ast, dev->cid_num, dev->cid_name, dev->cid_num); -+ } -+ -+ ast->language[0] = '\0'; -+ -+ ast->fds[0] = dev->sco_pipe[0]; -+ write(dev->sco_pipe[1], &c, 1); -+ -+ dev->owner = ast; -+ -+ ast_mutex_lock(&usecnt_lock); -+ usecnt++; -+ ast_mutex_unlock(&usecnt_lock); -+ -+ ast_update_use_count(); -+ -+ if (state != AST_STATE_DOWN) { -+ if (ast_pbx_start(ast)) { -+ ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ast->name); -+ ast_hangup(ast); -+ } -+ } -+ -+ return ast; -+} -+ -+static struct ast_channel * -+#if (ASTERISK_VERSION_NUM < 010100) -+blt_request(char * type, int format, void * local_data) -+#elif (ASTERISK_VERSION_NUM <= 010107) -+blt_request(const char * type, int format, void * local_data) -+#else -+blt_request(const char * type, int format, void * local_data, int *cause) -+#endif -+{ -+ char * data = (char*)local_data; -+ int oldformat; -+ blt_dev_t * dev = NULL; -+ struct ast_channel * ast = NULL; -+ char * number = data, * dname; -+ -+ dname = strsep(&number, "/"); -+ -+ oldformat = format; -+ -+ format &= BLUETOOTH_FORMAT; -+ -+ if (!format) { -+ ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", oldformat); -+ return NULL; -+ } -+ -+ ast_log(LOG_DEBUG, "Dialing '%s' via '%s'\n", number, dname); -+ -+ if (ast_mutex_lock(&iface_lock)) { -+ ast_log(LOG_ERROR, "Unable to lock iface_list\n"); -+ return NULL; -+ } -+ -+ dev = iface_head; -+ -+ while (dev) { -+ if (strcmp(dev->name, dname) == 0) { -+ ast_mutex_lock(&(dev->lock)); -+ if (!dev->ready) { -+ ast_log(LOG_ERROR, "Device %s is not connected\n", dev->name); -+ ast_mutex_unlock(&(dev->lock)); -+ ast_mutex_unlock(&iface_lock); -+ return NULL; -+ } -+ break; -+ } -+ dev = dev->next; -+ } -+ -+ ast_mutex_unlock(&iface_lock); -+ -+ if (!dev) { -+ ast_log(LOG_WARNING, "Failed to find device named '%s'\n", dname); -+ return NULL; -+ } -+ -+ if (number && dev->role != BLT_ROLE_AG) { -+ ast_log(LOG_WARNING, "Tried to send a call out on non AG\n"); -+ ast_mutex_unlock(&(dev->lock)); -+ return NULL; -+ } -+ -+ if (dev->role == BLT_ROLE_AG) -+ strncpy(dev->dnid, number, sizeof(dev->dnid) - 1); -+ -+ ast = blt_new(dev, AST_STATE_DOWN, dev->context, "s"); -+ -+ ast_mutex_unlock(&(dev->lock)); -+ -+ return ast; -+} -+ -+/* ---------------------------------- */ -+ -+ -+/* ---- AT COMMAND SOCKET STUFF ---- */ -+ -+static int -+send_atcmd(blt_dev_t * dev, const char * fmt, ...) -+{ -+ char buf[1024]; -+ va_list ap; -+ int len; -+ -+ va_start(ap, fmt); -+ len = vsnprintf(buf, 1023, fmt, ap); -+ va_end(ap); -+ -+ if (option_verbose) -+ ast_verbose(VERBOSE_PREFIX_1 "[%s] %*s < %s\n", role2str(dev->role), 10, dev->name, buf); -+ -+ write(dev->rd, "\r\n", 2); -+ len = write(dev->rd, buf, len); -+ write(dev->rd, "\r\n", 2); -+ return (len) ? 0 : -1; -+} -+ -+ -+static int -+send_atcmd_ok(blt_dev_t * dev, const char * cmd) -+{ -+ int len; -+ strncpy(dev->last_ok_cmd, cmd, BLT_RDBUFF_MAX - 1); -+ if (option_verbose) -+ ast_verbose(VERBOSE_PREFIX_1 "[%s] %*s < OK\n", role2str(dev->role), 10, dev->name); -+ len = write(dev->rd, "\r\nOK\r\n", 6); -+ return (len) ? 0 : -1; -+} -+ -+static int -+send_atcmd_error(blt_dev_t * dev) -+{ -+ int len; -+ -+ if (option_verbose) -+ ast_verbose(VERBOSE_PREFIX_1 "[%s] %*s < ERROR\n", role2str(dev->role), 10, dev->name); -+ -+// write(dev->rd, "\r\n", 2); -+// len = write(dev->rd, dev->last_ok_cmd, 5); -+ write(dev->rd, "\r\n", 2); -+ len = write(dev->rd, "ERROR", 5); -+ write(dev->rd, "\r\n", 2); -+ -+ return (len) ? 0 : -1; -+} -+ -+ -+/* ---------------------------------- */ -+ -+/* -- Handle negotiation when we're an AG -- */ -+ -+/* Bluetooth Support */ -+ -+static int -+atcmd_brsf_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ ast_log(LOG_DEBUG, "Device Supports: %s\n", arg); -+ dev->brsf = atoi(arg); -+ send_atcmd(dev, "+BRSF: %d", 23); -+ return 0; -+} -+ -+/* Bluetooth Voice Recognition */ -+ -+static int -+atcmd_bvra_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ ast_log(LOG_WARNING, "+BVRA Not Yet Supported\n"); -+ return -1; -+#if 0 -+ // XXX:T: Fix voice recognition somehow! -+ int action = atoi(arg); -+ ast_log(LOG_DEBUG, "Voice Recognition: %s\n", (a) ? "ACTIVATED" : "DEACTIVATED"); -+ if ((action == 0) & (dev->bvra == 1)) { -+ /* Disable it */ -+ dev->bvra = 0; -+ // XXX:T: Shutdown any active bvra channel -+ ast_log(LOG_DEBUG, "Voice Recognition: DISABLED\n"); -+ } else if ((action == 1) && (dev->bvra == 0)) { -+ /* Enable it */ -+ dev->bvra = 1; -+ // XXX:T: Schedule connection to voice recognition extension/application -+ ast_log(LOG_DEBUG, "Voice Recognition: ENABLED\n"); -+ } else { -+ ast_log(LOG_ERROR, "+BVRA out of sync (we think %d, but HS wants %d)\n", dev->bvra, action); -+ return -1; -+ } -+ return 0; -+#endif -+} -+ -+/* Clock */ -+ -+static int -+atcmd_cclk_read(blt_dev_t * dev) -+{ -+ struct tm t, *tp; -+ const time_t ti = time(0); -+ tp = localtime_r(&ti, &t); -+ send_atcmd(dev, "+CCLK: \"%02d/%02d/%02d,%02d:%02d:%02d+%02d\"", -+ (tp->tm_year % 100), (tp->tm_mon + 1), (tp->tm_mday), -+ tp->tm_hour, tp->tm_min, tp->tm_sec, ((tp->tm_gmtoff / 60) / 15)); -+ return 0; -+} -+ -+/* CHUP - Hangup Call */ -+ -+static int -+atcmd_chup_execute(blt_dev_t * dev, const char * data) -+{ -+ if (!dev->owner) { -+ ast_log(LOG_ERROR, "Request to hangup call when none in progress\n"); -+ return -1; -+ } -+ ast_log(LOG_DEBUG, "Hangup Call\n"); -+ ast_queue_control(dev->owner, AST_CONTROL_HANGUP); -+ return 0; -+} -+ -+/* CIND - Call Indicator */ -+ -+static int -+atcmd_cind_read(blt_dev_t * dev) -+{ -+ send_atcmd(dev, "+CIND: 1,0,0"); -+ return 0; -+} -+ -+static int -+atcmd_cind_test(blt_dev_t * dev) -+{ -+ send_atcmd(dev, "+CIND: (\"service\",(0,1)),(\"call\",(0,1)),(\"callsetup\",(0-4))"); -+ return 0; -+} -+ -+/* Set Language */ -+ -+static int -+atcmd_clan_read(blt_dev_t * dev) -+{ -+ send_atcmd(dev, "+CLAN: \"en\""); -+ return 0; -+} -+ -+/* Caller Id Presentation */ -+ -+static int -+atcmd_clip_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ dev->clip = atoi(arg); -+ return 0; -+} -+ -+/* Connected Line Identification Presentation */ -+ -+static int -+atcmd_colp_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ dev->colp = atoi(arg); -+ return 0; -+} -+ -+/* CMER - Mobile Equipment Event Reporting */ -+ -+static int -+atcmd_cmer_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ dev->ready = 1; -+ dev->status = BLT_STATUS_READY; -+ return 0; -+} -+ -+/* PhoneBook Types: -+ * -+ * - FD - SIM Fixed Dialing Phone Book -+ * - ME - ME Phone book -+ * - SM - SIM Phone Book -+ * - DC - ME dialled-calls list -+ * - RC - ME recieved-calls lisr -+ * - MC - ME missed-calls list -+ * - MV - ME Voice Activated Dialing List -+ * - HP - Hierachial Phone Book -+ * - BC - Own Business Card (PIN2 required) -+ * -+ */ -+ -+/* Read Phone Book Entry */ -+ -+static int -+atcmd_cpbr_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ // XXX:T: Fix the phone book! -+ // * Maybe add res_phonebook or something? */ -+ send_atcmd(dev, "+CPBR: %d,\"%s\",128,\"%s\"", atoi(arg), arg, arg); -+ return 0; -+} -+ -+/* Select Phone Book */ -+ -+static int -+atcmd_cpbs_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ // XXX:T: I guess we'll just accept any? -+ return 0; -+} -+ -+static int -+atcmd_cscs_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ // XXX:T: Language -+ return 0; -+} -+ -+static int -+atcmd_eips_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ ast_log(LOG_DEBUG, "Identify Presentation Set: %s=%s\n", -+ (*(arg) == 49) ? "ELIP" : "EOLP", -+ (*(arg+2) == 49) ? "ON" : "OFF"); -+ -+ if (*(arg) == 49) -+ dev->eolp = (*(arg+2) == 49) ? 1 : 0; -+ else -+ dev->elip = (*(arg+2) == 49) ? 1 : 0; -+ -+ return 0; -+} -+ -+/* VGS - Speaker Volume Gain */ -+ -+static int -+atcmd_vgs_set(blt_dev_t * dev, const char * arg, int len) -+{ -+ dev->gain_speaker = atoi(arg); -+ return 0; -+} -+ -+void -+gui_eaid_response(blt_dev_t * dev, char * cmd) -+{ -+ ast_log(LOG_NOTICE, "Submenu displayed.\n"); -+} -+ -+static int -+atcmd_eami_execute(blt_dev_t * dev, const char * data) -+{ -+ char * number = NULL; -+ -+ number = strndup(data, strlen(data)); -+ int menuitem = atoi(number); -+ -+ ast_log(LOG_NOTICE, "Menu Item '%d'.\n", menuitem); -+ -+ dev->cb = gui_eaid_response; -+ -+ if (menuitem == 1) { -+ char command[1024] = ""; -+ const char* c1 = "AT*EAID=8,1,\"Make a SIP call\",\"Number\",\""; -+ const char* c2 = "\""; -+ -+ (void)strncat(command, c1, sizeof(command) - strlen(command) - 1); -+ (void)strncat(command, gui_default_sip_number, sizeof(command) - strlen(command) - 1); -+ (void)strncat(command, c2, sizeof(command) - strlen(command) - 1); -+ -+ //strcat(command, "AT*EAID=8,1,\"Make a SIP call\",\"Number\",\""); -+ //strcat(command, gui_default_sip_number); -+ //strcat(command, "\""); -+ send_atcmd(dev, command); -+ } else if (menuitem == 2) { -+ char command[1024] = ""; -+ const char* c1 = "AT*EAID=11,1,\"Make a SIP call\",\"SIP Address\",100,\""; -+ const char* c2 = "\""; -+ -+ (void)strncat(command, c1, sizeof(command) - strlen(command) - 1); -+ (void)strncat(command, gui_default_sip_address, sizeof(command) - strlen(command) - 1); -+ (void)strncat(command, c2, sizeof(command) - strlen(command) - 1); -+ -+ //strcat(command, "AT*EAID=11,1,\"Make a SIP call\",\"SIP Address\",100,\""); -+ //strcat(command, gui_default_sip_address); -+ //strcat(command, "\""); -+ send_atcmd(dev, command); -+ } else if (menuitem == 0) { -+ dev->cb = gui_easm_response; -+// send_atcmd(dev,"AT*EASM=\"SIP Menu\",1,1,3,\"Call Number\",\"Call Address\",\"More Options\",1"); -+ send_atcmd(dev,"AT*EASM=\"SIP Menu\",1,1,2,\"Call Number\",\"Call Address\",1"); -+ } else { -+ ast_log(LOG_ERROR, "Menu item not implementented.\n"); -+ } -+ return 0; -+} -+ -+static int -+atcmd_eaii_execute(blt_dev_t * dev, const char * data) -+{ -+ int pos = 1, len = 0; -+ char type[128]; -+ char val[128]; -+ const char * start = data; -+ struct sockaddr_in addr; -+ -+ while (*data) { -+ if (*data == ',') { -+ memset(type, 0, 128); -+ strncpy(type, start, len); -+ -+ ast_log(LOG_NOTICE, "Number(8)/Address(11): '%s'.\n", type); -+ -+ pos++; -+ len = 0; -+ data++; -+ start = data; -+ continue; -+ } -+ len++; -+ data++; -+ } -+ -+ memset(val, 0, 128); -+ strncpy(val, start, len); -+ -+ char del[]= "\""; -+ char* address; -+ address = strtok(val, del); -+ int type_int = atoi(type); -+ -+ if (strcmp(address, " 0") == 0) { -+ ast_log(LOG_NOTICE, "Spurious EAII:\n"); -+ ast_log(LOG_NOTICE, data); -+ return 0; -+ } -+ -+ if (type_int == 8) { -+ (void)strncat(address, "@sipgate.de", sizeof(address) - strlen(address) - 1); -+ } -+ -+ ast_log(LOG_NOTICE, "SIP number/address: '%i','%s'.\n", type_int, address); -+ -+ if (type_int == 8 || type_int == 11) { -+ -+ char messagebox[1024] = ""; -+ const char* mb1 = "AT*EAID=1,1,\"Setting up SIP call to "; -+ const char* mb2 = "\",30"; -+ -+ (void)strncat(messagebox, mb1, sizeof(messagebox) - strlen(messagebox) - 1); -+ (void)strncat(messagebox, address, sizeof(messagebox) - strlen(messagebox) - 1); -+ (void)strncat(messagebox, mb2, sizeof(messagebox) - strlen(messagebox) - 1); -+ -+ //strcat(messagebox, "AT*EAID=1,1,\"Setting up SIP call to "); -+ //strcat(messagebox, address); -+ //strcat(messagebox, "\",30"); -+ send_atcmd(dev, messagebox); -+ -+ send_atcmd(dev, "AT*ESKS=2"); -+ send_atcmd(dev, "AT*EKSP"); -+ send_atcmd(dev, "AT*ESKS=0"); -+ -+ //Create manager connection to create call -+ int s = socket(AF_INET,SOCK_STREAM,0); -+ if (s < 0) { -+ ast_log(LOG_ERROR, "Manager connection failed."); -+ -+ dev->cb = ag_cgmi_response; -+ send_atcmd(dev, "AT*EAID=1,1,\"Call failed\""); -+ return -1; -+ } -+ addr.sin_family = AF_INET; -+ addr.sin_port = htons(5038); -+ addr.sin_addr.s_addr = inet_addr("127.0.0.1"); -+ memset(&(addr.sin_zero), '\0', 8); -+ -+ if (connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { -+ ast_log(LOG_ERROR, "Manager connection failed. (2)"); -+ dev->cb = ag_cgmi_response; -+ send_atcmd(dev, "AT*EAID=1,1,\"Call failed\""); -+ return -1; -+ } -+ char* command = "Action: login\r\nUsername: markus\r\nSecret: supAEr\r\n\r\n"; -+ if (write(s,command,strlen(command)) < 0) { -+ ast_log(LOG_ERROR, "Manager connection failed. (3)"); -+ dev->cb = ag_cgmi_response; -+ send_atcmd(dev, "AT*EAID=1,1,\"Call failed\""); -+ return -1; -+ } -+ -+ char command3[1024] = ""; -+ const char* action = "Action: Originate\r\nChannel: SIP/"; -+ const char* action2 = "\r\nExten: 1235\r\nPriority: 1\r\nContext: sipgate.de\r\n\r\nAction: logoff\r\n\r\n"; -+ -+ (void)strncat(command3, action, sizeof(command3) - strlen(command3) - 1); -+ (void)strncat(command3, address, sizeof(command3) - strlen(command3) - 1); -+ (void)strncat(command3, action2, sizeof(command3) - strlen(command3) - 1); -+ -+ //strcat(command3, "Action: Originate\r\nChannel: SIP/"); -+ //strcat(command3, address); -+ //strcat(command3, "\r\nExten: 1235\r\nPriority: 1\r\nContext: sipgate.de\r\n\r\n"); -+ ast_log(LOG_NOTICE, command3); -+ -+ if (write(s,command3,strlen(command3)) < 0) { -+ ast_log(LOG_ERROR, "Manager connection failed. (5)"); -+ return -1; -+ } -+ } -+ //dev->cb = ag_cgmi_response; -+ return 0; -+} -+ -+/* Dial */ -+static int -+atcmd_dial_execute(blt_dev_t * dev, const char * data) -+{ -+ char * number = NULL; -+ -+ /* Make sure there is a ';' at the end of the line */ -+ if (*(data + (strlen(data) - 1)) != ';') { -+ ast_log(LOG_WARNING, "Can't dial non-voice right now: %s\n", data); -+ return -1; -+ } -+ -+ number = strndup(data, strlen(data) - 1); -+ ast_log(LOG_NOTICE, "Dial: [%s]\n", number); -+ -+ send_atcmd(dev, "+CIEV: 2,1"); -+ send_atcmd(dev, "+CIEV: 3,0"); -+ -+ sco_start(dev, -1); -+ -+ if (blt_new(dev, AST_STATE_UP, dev->context, number) == NULL) { -+ sco_stop(dev); -+ } -+ -+ free(number); -+ -+ return 0; -+} -+ -+static int atcmd_bldn_execute(blt_dev_t * dev, const char *data) -+{ -+ return atcmd_dial_execute(dev, "bldn;"); -+} -+ -+/* Answer */ -+ -+static int -+atcmd_answer_execute(blt_dev_t * dev, const char * data) -+{ -+ -+ if (!dev->ringing || !dev->owner) { -+ ast_log(LOG_WARNING, "Can't answer non existant call\n"); -+ return -1; -+ } -+ -+ dev->ringing = 0; -+ -+ if (dev->ring_timer >= 0) -+ ast_sched_del(sched, dev->ring_timer); -+ -+ dev->ring_timer = -1; -+ -+ send_atcmd(dev, "+CIEV: 2,1"); -+ send_atcmd(dev, "+CIEV: 3,0"); -+ -+ return answer(dev); -+} -+ -+static int -+ag_unsol_ciev(blt_dev_t * dev, const char * data) -+{ -+ const char * orig = data; -+ int indicator; -+ int status; -+ -+ while (*(data) && *(data) == ' ') -+ data++; -+ -+ if (*(data) == 0) { -+ ast_log(LOG_WARNING, "Invalid value[1] for '+CIEV:%s'\n", orig); -+ return -1; -+ } -+ -+ indicator = *(data++) - 48; -+ -+ if (*(data++) != ',') { -+ ast_log(LOG_WARNING, "Invalid value[2] for '+CIEV:%s'\n", orig); -+ return -1; -+ } -+ -+ if (*(data) == 0) { -+ ast_log(LOG_WARNING, "Invalid value[3] for '+CIEV:%s'\n", orig); -+ return -1; -+ } -+ -+ status = *(data) - 48; -+ -+ set_cind(dev, indicator, status); -+ -+ return 0; -+} -+ -+static int -+ag_unsol_cind(blt_dev_t * dev, const char * data) -+{ -+ -+ while (*(data) && *(data) == ' ') -+ data++; -+ -+ -+ if (dev->cind == 0) -+ { -+ int pos = 1; -+ char name[1024]; -+ -+ while ((data = parse_cind(data, name, 1023)) != NULL) { -+ ast_log(LOG_DEBUG, "CIND: %d=%s\n", pos, name); -+ if (strcmp(name, "call") == 0) -+ dev->call_pos = pos; -+ else if (strcmp(name, "service") == 0) -+ dev->service_pos = pos; -+ else if (strcmp(name, "call_setup") == 0 || strcmp(name, "callsetup") == 0) -+ dev->callsetup_pos = pos; -+ pos++; -+ } -+ -+ ast_log(LOG_DEBUG, "CIND: %d=%s\n", pos, name); -+ -+ } else { -+ -+ int pos = 1, len = 0; -+ char val[128]; -+ const char * start = data; -+ -+ while (*data) { -+ if (*data == ',') { -+ memset(val, 0, 128); -+ strncpy(val, start, len); -+ set_cind(dev, pos, atoi(val)); -+ pos++; -+ len = 0; -+ data++; -+ start = data; -+ continue; -+ } -+ len++; -+ data++; -+ } -+ -+ memset(val, 0, 128); -+ strncpy(val, start, len); -+ ast_log(LOG_DEBUG, "CIND IND %d set to %d [%s]\n", pos, atoi(val), val); -+ -+ -+ } -+ -+ return 0; -+} -+ -+/* -+ * handle an incoming call -+ */ -+static int -+ag_unsol_clip(blt_dev_t * dev, const char * data) -+{ -+ const char * orig = data; -+ char name[256]; -+ char number[64]; -+ int type; -+ -+ while (*(data) && *(data) == ' ') -+ data++; -+ -+ if (*(data) == 0) { -+ ast_log(LOG_WARNING, "Invalid value[1] for '+CLIP:%s'\n", orig); -+ return -1; -+ } -+ -+ parse_clip(data, number, sizeof(number)-1, name, sizeof(name)-1, &type); -+ ast_log(LOG_NOTICE, "Parsed '+CLIP: %s' number='%s' type='%d' name='%s'\n", data, number, type, name); -+ -+ blt_new(dev, AST_STATE_RING, dev->context, "s"); -+ -+ return 0; -+} -+ -+ -+ -+static blt_atcb_t -+atcmd_list[] = -+{ -+ { "A", NULL, NULL, atcmd_answer_execute, NULL, NULL }, -+ { "D", NULL, NULL, atcmd_dial_execute, NULL, NULL }, -+ { "+BRSF", atcmd_brsf_set, NULL, NULL, NULL, NULL }, -+ { "+BVRA", atcmd_bvra_set, NULL, NULL, NULL, NULL }, -+ { "+CCLK", NULL, atcmd_cclk_read, NULL, NULL, NULL }, -+ { "+CHUP", NULL, NULL, atcmd_chup_execute, NULL, NULL }, -+ { "+CIEV", NULL, NULL, NULL, NULL, ag_unsol_ciev }, -+ { "+CIND", NULL, atcmd_cind_read, NULL, atcmd_cind_test, ag_unsol_cind }, -+ { "*EAMI", NULL, NULL, atcmd_eami_execute, NULL, NULL}, -+ { "*EAII", NULL, NULL, atcmd_eaii_execute, NULL, NULL}, -+ -+ { "+CLAN", NULL, atcmd_clan_read, NULL, NULL, NULL }, -+ { "+CLIP", atcmd_clip_set, NULL, NULL, NULL, ag_unsol_clip }, -+ { "+COLP", atcmd_colp_set, NULL, NULL, NULL, NULL }, -+ { "+CMER", atcmd_cmer_set, NULL, NULL, NULL, NULL }, -+ { "+CPBR", atcmd_cpbr_set, NULL, NULL, NULL, NULL }, -+ { "+CPBS", atcmd_cpbs_set, NULL, NULL, NULL, NULL }, -+ { "+CSCS", atcmd_cscs_set, NULL, NULL, NULL, NULL }, -+ { "*EIPS", atcmd_eips_set, NULL, NULL, NULL, NULL }, -+ { "+VGS", atcmd_vgs_set, NULL, NULL, NULL, NULL }, -+ { "+BLDN", NULL, NULL, atcmd_bldn_execute, NULL, NULL }, -+}; -+ -+#define ATCMD_LIST_LEN (sizeof(atcmd_list) / sizeof(blt_atcb_t)) -+ -+/* ---------------------------------- */ -+ -+/* -- Handle negotiation when we're a HS -- */ -+ -+void -+ag_unknown_response(blt_dev_t * dev, char * cmd) -+{ -+ ast_log(LOG_DEBUG, "Got UNKN response: %s\n", cmd); -+ -+ // DELAYED -+ // NO CARRIER -+ -+} -+ -+void -+gui_easm_response(blt_dev_t * dev, char * cmd) -+{ -+ ast_log(LOG_NOTICE, "Menu displayed.\n"); -+} -+ -+void -+ag_cgmi_response(blt_dev_t * dev, char * cmd) -+{ -+ // CGMM - Phone Model -+ // CGMR - Phone Revision -+ // CGSN - IMEI -+ // AT* -+ // VTS - send tone -+ // CREG -+ // CBC - BATTERY -+ // CSQ - SIGANL -+ // CSMS - SMS STUFFS -+ // CMGL -+ // CMGR -+ // CMGS -+ // CSCA - sms CENTER NUMBER -+ // CNMI - SMS INDICATION -+ // ast_log(LOG_DEBUG, "Manufacturer: %s\n", cmd); -+ -+ if (dev->role == BLT_ROLE_GUI) { -+ ast_log(LOG_NOTICE, "Displaying Menu.\n"); -+ dev->cb = gui_easm_response; -+// send_atcmd(dev,"AT*EASM=\"SIP Menu\",1,1,3,\"Call Number\",\"Call Address\",\"More Options\",1"); -+ send_atcmd(dev,"AT*EASM=\"SIP Menu\",1,1,2,\"Call Number\",\"Call Address\",1"); -+ } else { -+ dev->cb = ag_unknown_response; -+ } -+} -+ -+void -+ag_cgmi_valid_response(blt_dev_t * dev, char * cmd) -+{ -+ // send_atcmd(dev, "AT+WS46?"); -+ // send_atcmd(dev, "AT+CRC=1"); -+ // send_atcmd(dev, "AT+CNUM"); -+ -+ if (strcmp(cmd, "OK") == 0) { -+ send_atcmd(dev, "AT+CGMI"); -+ dev->cb = ag_cgmi_response; -+ } else { -+ dev->cb = ag_unknown_response; -+ } -+} -+ -+void -+ag_clip_response(blt_dev_t * dev, char * cmd) -+{ -+ send_atcmd(dev, "AT+CGMI=?"); -+ dev->cb = ag_cgmi_valid_response; -+} -+ -+void -+ag_cmer_response(blt_dev_t * dev, char * cmd) -+{ -+ dev->cb = ag_clip_response; -+ dev->ready = 1; -+ dev->status = BLT_STATUS_READY; -+ send_atcmd(dev, "AT+CLIP=1"); -+} -+ -+void -+ag_cind_status_response(blt_dev_t * dev, char * cmd) -+{ -+ // XXX:T: Handle response. -+ dev->cb = ag_cmer_response; -+ send_atcmd(dev, "AT+CMER=3,0,0,1"); -+ // Initiliase SCO link! -+} -+ -+void -+ag_cind_response(blt_dev_t * dev, char * cmd) -+{ -+ dev->cb = ag_cind_status_response; -+ dev->cind = 1; -+ send_atcmd(dev, "AT+CIND?"); -+} -+ -+void -+ag_brsf_response(blt_dev_t * dev, char * cmd) -+{ -+ dev->cb = ag_cind_response; -+ ast_log(LOG_DEBUG, "Bluetooth features: %s\n", cmd); -+ dev->cind = 0; -+ send_atcmd(dev, "AT+CIND=?"); -+} -+ -+/* ---------------------------------- */ -+ -+static int -+sdp_register(sdp_session_t * session) -+{ -+ // XXX:T: Fix this horrible function so it makes some sense and is extensible! -+ sdp_list_t *svclass_id, *pfseq, *apseq, *root; -+ uuid_t root_uuid, svclass_uuid, ga_svclass_uuid, l2cap_uuid, rfcomm_uuid; -+ sdp_profile_desc_t profile; -+ sdp_list_t *aproto, *proto[2]; -+ sdp_record_t record; -+ uint8_t u8 = rfcomm_channel_ag; -+ uint8_t u8_hs = rfcomm_channel_hs; -+ sdp_data_t *channel; -+ int ret = 0; -+ -+ memset((void *)&record, 0, sizeof(sdp_record_t)); -+ record.handle = 0xffffffff; -+ sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP); -+ root = sdp_list_append(0, &root_uuid); -+ sdp_set_browse_groups(&record, root); -+ -+ // Register as an AG -+ -+ sdp_uuid16_create(&svclass_uuid, HANDSFREE_AUDIO_GW_SVCLASS_ID); -+ svclass_id = sdp_list_append(0, &svclass_uuid); -+ sdp_uuid16_create(&ga_svclass_uuid, GENERIC_AUDIO_SVCLASS_ID); -+ svclass_id = sdp_list_append(svclass_id, &ga_svclass_uuid); -+ sdp_set_service_classes(&record, svclass_id); -+ sdp_uuid16_create(&profile.uuid, 0x111f); -+ profile.version = 0x0100; -+ pfseq = sdp_list_append(0, &profile); -+ -+ sdp_set_profile_descs(&record, pfseq); -+ -+ sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID); -+ proto[0] = sdp_list_append(0, &l2cap_uuid); -+ apseq = sdp_list_append(0, proto[0]); -+ -+ sdp_uuid16_create(&rfcomm_uuid, RFCOMM_UUID); -+ proto[1] = sdp_list_append(0, &rfcomm_uuid); -+ channel = sdp_data_alloc(SDP_UINT8, &u8); -+ proto[1] = sdp_list_append(proto[1], channel); -+ apseq = sdp_list_append(apseq, proto[1]); -+ -+ aproto = sdp_list_append(0, apseq); -+ sdp_set_access_protos(&record, aproto); -+ -+ sdp_set_info_attr(&record, "Voice Gateway", 0, 0); -+ -+ if (sdp_record_register(session, &record, SDP_RECORD_PERSIST) < 0) { -+ ast_log(LOG_ERROR, "Service Record registration failed\n"); -+ ret = -1; -+ goto end; -+ } -+ -+ sdp_record_ag = record.handle; -+ sdp_record_gui = record.handle; -+ -+ ast_log(LOG_NOTICE, "HeadsetAudioGateway service registered\n"); -+ -+ sdp_data_free(channel); -+ sdp_list_free(proto[0], 0); -+ sdp_list_free(proto[1], 0); -+ sdp_list_free(apseq, 0); -+ sdp_list_free(aproto, 0); -+ -+ // ------------- -+ -+ memset((void *)&record, 0, sizeof(sdp_record_t)); -+ record.handle = 0xffffffff; -+ sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP); -+ root = sdp_list_append(0, &root_uuid); -+ sdp_set_browse_groups(&record, root); -+ -+ // Register as an HS -+ -+ sdp_uuid16_create(&svclass_uuid, HANDSFREE_AUDIO_GW_SVCLASS_ID); -+ svclass_id = sdp_list_append(0, &svclass_uuid); -+ sdp_uuid16_create(&ga_svclass_uuid, GENERIC_AUDIO_SVCLASS_ID); -+ svclass_id = sdp_list_append(svclass_id, &ga_svclass_uuid); -+ sdp_set_service_classes(&record, svclass_id); -+ sdp_uuid16_create(&profile.uuid, 0x111e); -+ profile.version = 0x0100; -+ pfseq = sdp_list_append(0, &profile); -+ sdp_set_profile_descs(&record, pfseq); -+ -+ sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID); -+ proto[0] = sdp_list_append(0, &l2cap_uuid); -+ apseq = sdp_list_append(0, proto[0]); -+ -+ sdp_uuid16_create(&rfcomm_uuid, RFCOMM_UUID); -+ proto[1] = sdp_list_append(0, &rfcomm_uuid); -+ channel = sdp_data_alloc(SDP_UINT8, &u8_hs); -+ proto[1] = sdp_list_append(proto[1], channel); -+ apseq = sdp_list_append(apseq, proto[1]); -+ -+ aproto = sdp_list_append(0, apseq); -+ sdp_set_access_protos(&record, aproto); -+ sdp_set_info_attr(&record, "Voice Gateway", 0, 0); -+ -+ if (sdp_record_register(session, &record, SDP_RECORD_PERSIST) < 0) { -+ ast_log(LOG_ERROR, "Service Record registration failed\n"); -+ ret = -1; -+ goto end; -+ } -+ -+ sdp_record_hs = record.handle; -+ -+ ast_log(LOG_NOTICE, "HeadsetAudioGateway service registered\n"); -+ -+end: -+ sdp_data_free(channel); -+ sdp_list_free(proto[0], 0); -+ sdp_list_free(proto[1], 0); -+ sdp_list_free(apseq, 0); -+ sdp_list_free(aproto, 0); -+ -+ return ret; -+} -+ -+static int -+rfcomm_listen(bdaddr_t * bdaddr, int channel) -+{ -+ -+ int sock = -1; -+ struct sockaddr_rc loc_addr; -+ int on = 1; -+ -+ if ((sock = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)) < 0) { -+ ast_log(LOG_ERROR, "Can't create socket: %s (errno: %d)\n", strerror(errno), errno); -+ return -1; -+ } -+ -+ loc_addr.rc_family = AF_BLUETOOTH; -+ -+ /* Local Interface Address */ -+ bacpy(&loc_addr.rc_bdaddr, bdaddr); -+ -+ /* Channel */ -+ loc_addr.rc_channel = channel; -+ -+ if (bind(sock, (struct sockaddr *)&loc_addr, sizeof(loc_addr)) < 0) { -+ ast_log(LOG_ERROR, "Can't bind socket: %s (errno: %d)\n", strerror(errno), errno); -+ close(sock); -+ return -1; -+ } -+ -+ if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) { -+ ast_log(LOG_ERROR, "Set socket SO_REUSEADDR option on failed: errno %d, %s", errno, strerror(errno)); -+ close(sock); -+ return -1; -+ } -+ -+ if (fcntl(sock, F_SETFL, O_RDWR|O_NONBLOCK) != 0) -+ ast_log(LOG_ERROR, "Can't set RFCOMM socket to NBIO\n"); -+ -+ if (listen(sock, 10) < 0) { -+ ast_log(LOG_ERROR,"Can not listen on the socket. %s(%d)\n", strerror(errno), errno); -+ close(sock); -+ return -1; -+ } -+ -+ ast_log(LOG_NOTICE, "Listening for RFCOMM channel %d connections on FD %d\n", channel, sock); -+ -+ return sock; -+} -+ -+ -+static int -+sco_listen(bdaddr_t * bdaddr) -+{ -+ int sock = -1; -+ int on = 1; -+ struct sockaddr_sco loc_addr; -+ -+ memset(&loc_addr, 0, sizeof(loc_addr)); -+ -+ if ((sock = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO)) < 0) { -+ ast_log(LOG_ERROR, "Can't create SCO socket: %s (errno: %d)\n", strerror(errno), errno); -+ return -1; -+ } -+ -+ loc_addr.sco_family = AF_BLUETOOTH; -+ bacpy(&loc_addr.sco_bdaddr, BDADDR_ANY); -+ -+ if (bind(sock, (struct sockaddr *)&loc_addr, sizeof(loc_addr)) < 0) { -+ ast_log(LOG_ERROR, "Can't bind SCO socket: %s (errno: %d)\n", strerror(errno), errno); -+ close(sock); -+ return -1; -+ } -+ -+ if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) { -+ ast_log(LOG_ERROR, "Set SCO socket SO_REUSEADDR option on failed: errno %d, %s", errno, strerror(errno)); -+ close(sock); -+ return -1; -+ } -+ -+ if (fcntl(sock, F_SETFL, O_RDWR|O_NONBLOCK) != 0) -+ ast_log(LOG_ERROR, "Can't set SCO socket to NBIO\n"); -+ -+ if (listen(sock, 10) < 0) { -+ ast_log(LOG_ERROR,"Can not listen on SCO socket: %s(%d)\n", strerror(errno), errno); -+ close(sock); -+ return -1; -+ } -+ -+ ast_log(LOG_NOTICE, "Listening for SCO connections on FD %d\n", sock); -+ -+ return sock; -+} -+ -+static int -+rfcomm_connect(bdaddr_t * src, bdaddr_t * dst, int channel, int nbio) -+{ -+ struct sockaddr_rc addr; -+ int s; -+ -+ if ((s = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)) < 0) { -+ return -1; -+ } -+ -+ memset(&addr, 0, sizeof(addr)); -+ addr.rc_family = AF_BLUETOOTH; -+ bacpy(&addr.rc_bdaddr, src); -+ addr.rc_channel = 0; -+ -+ if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { -+ close(s); -+ return -1; -+ } -+ -+ memset(&addr, 0, sizeof(addr)); -+ addr.rc_family = AF_BLUETOOTH; -+ bacpy(&addr.rc_bdaddr, dst); -+ addr.rc_channel = channel; -+ -+ if (nbio) { -+ if (fcntl(s, F_SETFL, O_RDWR|O_NONBLOCK) != 0) -+ ast_log(LOG_ERROR, "Can't set RFCOMM socket to NBIO\n"); -+ } -+ -+ if (connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0 && (nbio != 1 || (errno != EAGAIN))) { -+ close(s); -+ return -1; -+ } -+ -+ return s; -+} -+ -+/* Must be called with dev->lock held */ -+ -+static int -+sco_connect(blt_dev_t * dev) -+{ -+ struct sockaddr_sco addr; -+ // struct sco_conninfo conn; -+ // struct sco_options opts; -+ // int size; -+ // bdaddr_t * src = &local_bdaddr; -+ -+ int s; -+ bdaddr_t * dst = &(dev->bdaddr); -+ -+ if (dev->sco != -1) { -+ ast_log(LOG_ERROR, "SCO fd already open.\n"); -+ return -1; -+ } -+ -+ if ((s = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO)) < 0) { -+ ast_log(LOG_ERROR, "Can't create SCO socket(): %s\n", strerror(errno)); -+ return -1; -+ } -+ -+ memset(&addr, 0, sizeof(addr)); -+ -+ addr.sco_family = AF_BLUETOOTH; -+ bacpy(&addr.sco_bdaddr, BDADDR_ANY); -+ -+ if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { -+ ast_log(LOG_ERROR, "Can't bind() SCO socket: %s\n", strerror(errno)); -+ close(s); -+ return -1; -+ } -+ -+ memset(&addr, 0, sizeof(addr)); -+ addr.sco_family = AF_BLUETOOTH; -+ bacpy(&addr.sco_bdaddr, dst); -+ -+ if (fcntl(s, F_SETFL, O_RDWR|O_NONBLOCK) != 0) -+ ast_log(LOG_ERROR, "Can't set SCO socket to NBIO\n"); -+ -+ if ((connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) && (errno != EAGAIN)) { -+ ast_log(LOG_ERROR, "Can't connect() SCO socket: %s (errno %d)\n", strerror(errno), errno); -+ close(s); -+ return -1; -+ } -+ -+ //size = sizeof(conn); -+ -+ -+/* XXX:T: HERE, fix getting SCO conninfo. -+ -+ if (getsockopt(s, SOL_SCO, SCO_CONNINFO, &conn, &size) < 0) { -+ ast_log(LOG_ERROR, "Can't getsockopt SCO_CONNINFO on SCO socket: %s\n", strerror(errno)); -+ close(s); -+ return -1; -+ } -+ -+ size = sizeof(opts); -+ -+ if (getsockopt(s, SOL_SCO, SCO_OPTIONS, &opts, &size) < 0) { -+ ast_log(LOG_ERROR, "Can't getsockopt SCO_OPTIONS on SCO socket: %s\n", strerror(errno)); -+ close(s); -+ return -1; -+ } -+ -+ dev->sco_handle = conn.hci_handle; -+ dev->sco_mtu = opts.mtu; -+ -+*/ -+ -+ ast_log(LOG_DEBUG, "SCO: %d\n", s); -+ -+ dev->sco = s; -+ -+ return 0; -+} -+ -+ -+/* ---------------------------------- */ -+ -+/* Non blocking (async) outgoing bluetooth connection */ -+ -+static int -+try_connect(blt_dev_t * dev) -+{ -+ int fd; -+ ast_mutex_lock(&(dev->lock)); -+ -+ if (dev->status != BLT_STATUS_CONNECTING && dev->status != BLT_STATUS_DOWN) { -+ ast_mutex_unlock(&(dev->lock)); -+ return 0; -+ } -+ -+ if (dev->rd != -1) { -+ -+ int ret; -+ struct pollfd pfd; -+ -+ if (dev->status != BLT_STATUS_CONNECTING) { -+ ast_mutex_unlock(&(dev->lock)); -+ dev->outgoing_id = -1; -+ return 0; -+ } -+ -+ // ret = connect(dev->rd, (struct sockaddr *)&(dev->addr), sizeof(struct sockaddr_rc)); // -+ -+ pfd.fd = dev->rd; -+ pfd.events = POLLIN | POLLOUT; -+ -+ ret = poll(&pfd, 1, 0); -+ -+ if (ret == -1) { -+ close(dev->rd); -+ dev->rd = -1; -+ dev->status = BLT_STATUS_DOWN; -+ dev->outgoing_id = ast_sched_add(sched, 10000, AST_SCHED_CB(try_connect), dev); -+ ast_mutex_unlock(&(dev->lock)); -+ return 0; -+ } -+ -+ if (ret > 0) { -+ -+ int len = sizeof(ret); -+ getsockopt(dev->rd, SOL_SOCKET, SO_ERROR, &ret, &len); -+ -+ if (ret == 0) { -+ -+ ast_log(LOG_NOTICE, "Initialised bluetooth link to device %s\n", dev->name); -+ -+#if 0 -+ { -+ struct hci_conn_info_req * cr; -+ int dd; -+ char name[248]; -+ -+ cr = malloc(sizeof(*cr) + sizeof(struct hci_conn_info)); -+ dd = hci_open_dev(hcidev_id); -+ cr->type = ACL_LINK; -+ bacpy(&cr->bdaddr, &(dev->bdaddr)); -+ -+ if (ioctl(dd, HCIGETCONNINFO, (unsigned long)cr) < 0) { -+ ast_log(LOG_ERROR, "Failed to get connection info: %s\n", strerror(errno)); -+ } else { -+ ast_log(LOG_DEBUG, "HCI Handle: %d\n", cr->conn_info->handle); -+ } -+ -+ if (hci_read_remote_name(dd, &(dev->bdaddr), sizeof(name), name, 25000) == 0) -+ ast_log(LOG_DEBUG, "Remote Name: %s\n", name); -+ free(cr); -+ } -+#endif -+ -+ dev->status = BLT_STATUS_NEGOTIATING; -+ -+ /* If this device is an AG/GUI, we initiate the negotiation. */ -+ -+ if (dev->role == BLT_ROLE_AG || -+ dev->role == BLT_ROLE_GUI) { -+ dev->cb = ag_brsf_response; -+ send_atcmd(dev, "AT+BRSF=23"); -+ } -+ -+ dev->outgoing_id = -1; -+ ast_mutex_unlock(&(dev->lock)); -+ return 0; -+ -+ } else { -+ -+ if (ret != EHOSTDOWN) -+ ast_log(LOG_NOTICE, "Connect to device %s failed: %s (errno %d)\n", dev->name, strerror(ret), ret); -+ -+ close(dev->rd); -+ dev->rd = -1; -+ dev->status = BLT_STATUS_DOWN; -+ dev->outgoing_id = ast_sched_add(sched, (ret == EHOSTDOWN) ? 10000 : 2500, AST_SCHED_CB(try_connect), dev); -+ ast_mutex_unlock(&(dev->lock)); -+ return 0; -+ -+ } -+ -+ } -+ -+ dev->outgoing_id = ast_sched_add(sched, 100, AST_SCHED_CB(try_connect), dev); -+ ast_mutex_unlock(&(dev->lock)); -+ return 0; -+ } -+ -+ ast_log(LOG_NOTICE, "RFCOMM connect start.\n"); -+ fd = rfcomm_connect(&local_bdaddr, &(dev->bdaddr), dev->channel, 1); -+ ast_log(LOG_NOTICE, "RFCOMM connect done.\n"); -+ -+ if (fd == -1) { -+ ast_log(LOG_WARNING, "NBIO connect() to %s returned %d: %s\n", dev->name, errno, strerror(errno)); -+ dev->outgoing_id = ast_sched_add(sched, 5000, AST_SCHED_CB(try_connect), dev); -+ ast_mutex_unlock(&(dev->lock)); -+ return 0; -+ } -+ -+ dev->rd = fd; -+ dev->status = BLT_STATUS_CONNECTING; -+ dev->outgoing_id = ast_sched_add(sched, 100, AST_SCHED_CB(try_connect), dev); -+ ast_mutex_unlock(&(dev->lock)); -+ return 0; -+} -+ -+ -+/* Called whenever a new command is received while we're the AG */ -+ -+ -+static int -+process_rfcomm_cmd(blt_dev_t * dev, char * cmd) -+{ -+ int i; -+ char * fullcmd = cmd; -+ -+ if (option_verbose) -+ ast_verbose(VERBOSE_PREFIX_1 "[%s] %*s > %s\n", role2str(dev->role), 10, dev->name, cmd); -+ -+ /* Read the 'AT' from the start of the string */ -+ if (strncmp(cmd, "AT", 2)) { -+ ast_log(LOG_WARNING, "Unknown command without 'AT': %s\n", cmd); -+ send_atcmd_error(dev); -+ return 0; -+ } -+ -+ cmd += 2; -+ -+ // Don't forget 'AT' on its own is OK. -+ -+ if (strlen(cmd) == 0) { -+ send_atcmd_ok(dev, fullcmd); -+ return 0; -+ } -+ -+ for (i = 0 ; i < ATCMD_LIST_LEN ; i++) { -+ if (strncmp(atcmd_list[i].str, cmd, strlen(atcmd_list[i].str)) == 0) { -+ char * pos = (cmd + strlen(atcmd_list[i].str)); -+ if ((strncmp(pos, "=?", 2) == 0) && (strlen(pos) == 2)) { -+ /* TEST command */ -+ if (atcmd_list[i].test) { -+ if (atcmd_list[i].test(dev) == 0) -+ send_atcmd_ok(dev, fullcmd); -+ else -+ send_atcmd_error(dev); -+ } else { -+ send_atcmd_ok(dev, fullcmd); -+ } -+ } else if ((strncmp(pos, "?", 1) == 0) && (strlen(pos) == 1)) { -+ /* READ command */ -+ if (atcmd_list[i].read) { -+ if (atcmd_list[i].read(dev) == 0) -+ send_atcmd_ok(dev, fullcmd); -+ else -+ send_atcmd_error(dev); -+ } else { -+ ast_log(LOG_WARNING, "AT Command: '%s' missing READ function\n", fullcmd); -+ send_atcmd_error(dev); -+ } -+ } else if (strncmp(pos, "=", 1) == 0) { -+ /* SET command */ -+ if (atcmd_list[i].set) { -+ if (atcmd_list[i].set(dev, (pos + 1), (*(pos + 1)) ? strlen(pos + 1) : 0) == 0) -+ send_atcmd_ok(dev, fullcmd); -+ else -+ send_atcmd_error(dev); -+ } else { -+ ast_log(LOG_WARNING, "AT Command: '%s' missing SET function\n", fullcmd); -+ send_atcmd_error(dev); -+ } -+ } else { -+ /* EXECUTE command */ -+ if (atcmd_list[i].execute) { -+ if (atcmd_list[i].execute(dev, cmd + strlen(atcmd_list[i].str)) == 0) -+ send_atcmd_ok(dev, fullcmd); -+ else -+ send_atcmd_error(dev); -+ } else { -+ ast_log(LOG_WARNING, "AT Command: '%s' missing EXECUTE function\n", fullcmd); -+ send_atcmd_error(dev); -+ } -+ } -+ return 0; -+ } -+ } -+ -+ ast_log(LOG_NOTICE, "Unknown AT Command: '%s' (%s)\n", fullcmd, cmd); -+ send_atcmd_error(dev); -+ -+ return 0; -+} -+ -+/* Called when a socket is incoming */ -+ -+static void -+handle_incoming(int fd, blt_role_t role) -+{ -+ blt_dev_t * dev; -+ struct sockaddr_rc addr; -+ int len = sizeof(addr); -+ -+ // Got a new incoming socket. -+ ast_log(LOG_DEBUG, "Incoming RFCOMM socket\n"); -+ -+ ast_mutex_lock(&iface_lock); -+ -+ fd = accept(fd, (struct sockaddr*)&addr, &len); -+ -+ dev = iface_head; -+ while (dev) { -+ if (bacmp(&(dev->bdaddr), &addr.rc_bdaddr) == 0) { -+ ast_log(LOG_DEBUG, "Connect from %s\n", dev->name); -+ ast_mutex_lock(&(dev->lock)); -+ /* Kill any outstanding connect attempt. */ -+ if (dev->outgoing_id > -1) { -+ ast_sched_del(sched, dev->outgoing_id); -+ dev->outgoing_id = -1; -+ } -+ -+ rd_close(dev, 0, 0); -+ -+ dev->status = BLT_STATUS_NEGOTIATING; -+ dev->rd = fd; -+ -+ if (dev->role == BLT_ROLE_AG || -+ dev->role == BLT_ROLE_GUI) { -+ dev->cb = ag_brsf_response; -+ send_atcmd(dev, "AT+BRSF=23"); -+ } -+ ast_mutex_unlock(&(dev->lock)); -+ break; -+ } -+ dev = dev->next; -+ } -+ -+ if (dev == NULL) { -+ ast_log(LOG_WARNING, "Connect from unknown device\n"); -+ close(fd); -+ } -+ ast_mutex_unlock(&iface_lock); -+ -+ return; -+} -+ -+static void -+handle_incoming_sco(int master) -+{ -+ -+ blt_dev_t * dev; -+ struct sockaddr_sco addr; -+ struct sco_conninfo conn; -+ struct sco_options opts; -+ int len = sizeof(addr); -+ int fd; -+ -+ ast_log(LOG_DEBUG, "Incoming SCO socket\n"); -+ -+ fd = accept(master, (struct sockaddr*)&addr, &len); -+ -+ if (fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK) != 0) { -+ ast_log(LOG_ERROR, "Can't set SCO socket to NBIO\n"); -+ close(fd); -+ return; -+ } -+ -+ len = sizeof(conn); -+ -+ if (getsockopt(fd, SOL_SCO, SCO_CONNINFO, &conn, &len) < 0) { -+ ast_log(LOG_ERROR, "Can't getsockopt SCO_CONNINFO on SCO socket: %s\n", strerror(errno)); -+ close(fd); -+ return; -+ } -+ -+ len = sizeof(opts); -+ -+ if (getsockopt(fd, SOL_SCO, SCO_OPTIONS, &opts, &len) < 0) { -+ ast_log(LOG_ERROR, "Can't getsockopt SCO_OPTIONS on SCO socket: %s\n", strerror(errno)); -+ close(fd); -+ return; -+ } -+ -+ ast_mutex_lock(&iface_lock); -+ dev = iface_head; -+ while (dev) { -+ if (bacmp(&(dev->bdaddr), &addr.sco_bdaddr) == 0) { -+ ast_log(LOG_DEBUG, "SCO Connect from %s\n", dev->name); -+ ast_mutex_lock(&(dev->lock)); -+ if (dev->sco_running != -1) { -+ ast_log(LOG_ERROR, "Incoming SCO socket, but SCO thread already running.\n"); -+ } else { -+ sco_start(dev, fd); -+ } -+ ast_mutex_unlock(&(dev->lock)); -+ break; -+ } -+ dev = dev->next; -+ } -+ -+ ast_mutex_unlock(&iface_lock); -+ -+ if (dev == NULL) { -+ ast_log(LOG_WARNING, "SCO Connect from unknown device\n"); -+ close(fd); -+ } else { -+ // XXX:T: We need to handle the fact we might have an outgoing connection attempt in progress. -+ ast_log(LOG_DEBUG, "SCO: %d, HCIHandle=%d, MUT=%d\n", fd, conn.hci_handle, opts.mtu); -+ } -+ -+ -+ -+ return; -+} -+ -+/* Called when there is data waiting on a socket */ -+ -+static int -+handle_rd_data(blt_dev_t * dev) -+{ -+ char c; -+ int ret; -+ -+ while ((ret = read(dev->rd, &c, 1)) == 1) { -+ -+ // log_buf[i++] = c; -+ -+ if (dev->role == BLT_ROLE_HS) { -+ -+ if (c == '\r') { -+ ret = process_rfcomm_cmd(dev, dev->rd_buff); -+ dev->rd_buff_pos = 0; -+ memset(dev->rd_buff, 0, BLT_RDBUFF_MAX); -+ return ret; -+ } -+ -+ if (dev->rd_buff_pos >= BLT_RDBUFF_MAX) -+ return 0; -+ -+ dev->rd_buff[dev->rd_buff_pos++] = c; -+ -+ } else if (dev->role == BLT_ROLE_AG || -+ dev->role == BLT_ROLE_GUI) { -+ -+ //ast_log(LOG_ERROR, "%s: %c\n", dev->name, c); -+ -+ switch (dev->state) { -+ case BLT_STATE_WANT_R: -+ if (c == '\r' || c == 10) { -+ dev->state = BLT_STATE_WANT_N; -+ } else if (c == '+') { -+ dev->state = BLT_STATE_WANT_CMD; -+ dev->rd_buff[dev->rd_buff_pos++] = '+'; -+ } else { -+ ast_log(LOG_ERROR, "Device %s: Expected '\\r', got %d. state=BLT_STATE_WANT_R\n", dev->name, c); -+ return -1; -+ } -+ break; -+ -+ case BLT_STATE_WANT_N: -+ if (c == '\n' || c == 13) -+ dev->state = BLT_STATE_WANT_CMD; -+ else { -+ ast_log(LOG_ERROR, "Device %s: Expected '\\n', got %d. state=BLT_STATE_WANT_N\n", dev->name, c); -+ return -1; -+ } -+ break; -+ -+ case BLT_STATE_WANT_CMD: -+ if (c == '\r' || c == 10) -+ dev->state = BLT_STATE_WANT_N2; -+ else { -+ if (dev->rd_buff_pos >= BLT_RDBUFF_MAX) { -+ ast_log(LOG_ERROR, "Device %s: Buffer exceeded\n", dev->name); -+ return -1; -+ } -+ dev->rd_buff[dev->rd_buff_pos++] = c; -+ } -+ break; -+ -+ case BLT_STATE_WANT_N2: -+ if (c == '\n' || c == 13) { -+ -+ dev->state = BLT_STATE_WANT_R; -+ -+ if (dev->rd_buff[0] == '+') { -+ int i; -+ // find unsolicited -+ for (i = 0 ; i < ATCMD_LIST_LEN ; i++) { -+ if (strncmp(atcmd_list[i].str, dev->rd_buff, strlen(atcmd_list[i].str)) == 0) { -+ if (atcmd_list[i].unsolicited) -+ atcmd_list[i].unsolicited(dev, dev->rd_buff + strlen(atcmd_list[i].str) + 1); -+ else -+ ast_log(LOG_WARNING, "Device %s: Unhandled Unsolicited: %s\n", dev->name, dev->rd_buff); -+ break; -+ } -+ } -+ -+ if (option_verbose) -+ ast_verbose(VERBOSE_PREFIX_1 "[%s] %*s > %s\n", role2str(dev->role), 10, dev->name, dev->rd_buff); -+ -+ if (i == ATCMD_LIST_LEN) -+ ast_log(LOG_NOTICE, "Device %s: Got unsolicited message: %s\n", dev->name, dev->rd_buff); -+ -+ } else if (dev->rd_buff[0] == '*') { -+ if (option_verbose) -+ ast_verbose(VERBOSE_PREFIX_1 "[%s]* %*s > %s\n", role2str(dev->role), 9, dev->name, dev->rd_buff); -+ -+ int i; -+ // find execute -+ for (i = 0 ; i < ATCMD_LIST_LEN ; i++) { -+ if (strncmp(atcmd_list[i].str, dev->rd_buff, strlen(atcmd_list[i].str)) == 0) { -+ if (atcmd_list[i].execute) -+ atcmd_list[i].execute(dev, dev->rd_buff + strlen(atcmd_list[i].str) + 1); -+ else -+ ast_log(LOG_ERROR, "Device %s: Unhandled Execute: %s\n", dev->name, dev->rd_buff); -+ break; -+ } -+ } -+ -+ -+ } else { -+ -+ if ( -+ strcmp(dev->rd_buff, "OK") != 0 && -+ strcmp(dev->rd_buff, "CONNECT") != 0 && -+ strcmp(dev->rd_buff, "RING") != 0 && -+ strcmp(dev->rd_buff, "NO CARRIER") != 0 && -+ strcmp(dev->rd_buff, "ERROR") != 0 && -+ strcmp(dev->rd_buff, "NO DIALTONE") != 0 && -+ strcmp(dev->rd_buff, "BUSY") != 0 && -+ strcmp(dev->rd_buff, "NO ANSWER") != 0 && -+ strcmp(dev->rd_buff, "DELAYED") != 0 -+ ){ -+ // It must be a multiline error -+ strncpy(dev->last_err_cmd, dev->rd_buff, 1023); -+ if (option_verbose) -+ ast_verbose(VERBOSE_PREFIX_1 "[%s] %*s > %s\n", role2str(dev->role), 10, dev->name, dev->rd_buff); -+ } else if (dev->cb) { -+ if (option_verbose) -+ ast_verbose(VERBOSE_PREFIX_1 "[%s] %*s > %s\n", role2str(dev->role), 10, dev->name, dev->rd_buff); -+ dev->cb(dev, dev->rd_buff); -+ } else { -+ ast_log(LOG_ERROR, "Device %s: Data on socket in HS mode, but no callback\n", dev->name); -+ } -+ -+ } -+ -+ dev->rd_buff_pos = 0; -+ memset(dev->rd_buff, 0, BLT_RDBUFF_MAX); -+ } else { -+ -+ ast_log(LOG_ERROR, "Device %s: Expected '\\n' got %d. state = BLT_STATE_WANT_N2:\n", dev->name, c); -+ return -1; -+ -+ } -+ -+ break; -+ -+ default: -+ ast_log(LOG_ERROR, "Device %s: Unknown device state %d\n", dev->name, dev->state); -+ return -1; -+ -+ } -+ -+ } -+ -+ } -+ -+ return 0; -+} -+ -+/* Close the devices RFCOMM socket, and SCO if it exists. Must hold dev->lock */ -+ -+static void -+rd_close(blt_dev_t * dev, int reconnect, int e) -+{ -+ dev->ready = 0; -+ -+ if (dev->rd) -+ close(dev->rd); -+ -+ dev->rd = -1; -+ -+ dev->status = BLT_STATUS_DOWN; -+ -+ sco_stop(dev); -+ -+ if (dev->owner) { -+ ast_setstate(dev->owner, AST_STATE_DOWN); -+ ast_queue_control(dev->owner, AST_CONTROL_HANGUP); -+ } -+ -+ /* Schedule a reconnect */ -+ if (reconnect && dev->autoconnect) { -+ dev->outgoing_id = ast_sched_add(sched, 5000, AST_SCHED_CB(try_connect), dev); -+ -+ if (monitor_thread == pthread_self()) { -+ // Because we're not the monitor thread, we needd to inturrupt poll(). -+ pthread_kill(monitor_thread, SIGURG); -+ } -+ -+ if (e) -+ ast_log(LOG_NOTICE, "Device %s disconnected, scheduled reconnect in 5 seconds: %s (errno %d)\n", dev->name, strerror(e), e); -+ } else if (e) { -+ ast_log(LOG_NOTICE, "Device %s disconnected: %s (errno %d)\n", dev->name, strerror(e), e); -+ } -+ -+ return; -+} -+ -+/* -+ * Remember that we can only add to the scheduler from -+ * the do_monitor thread, as it calculates time to next one from -+ * this loop. -+ */ -+ -+static void * -+do_monitor(void * data) -+{ -+#define SRV_SOCK_CNT 4 -+ -+ int res = 0; -+ blt_dev_t * dev; -+ struct pollfd * pfds = malloc(sizeof(struct pollfd) * (ifcount + SRV_SOCK_CNT)); -+ -+ /* -- We start off by trying to connect all of our devices (non blocking) -- */ -+ -+ monitor_pid = getpid(); -+ -+ if (ast_mutex_lock(&iface_lock)) { -+ ast_log(LOG_ERROR, "Failed to get iface_lock.\n"); -+ return NULL; -+ } -+ -+ dev = iface_head; -+ while (dev) { -+ -+ if (socketpair(PF_UNIX, SOCK_STREAM, 0, dev->sco_pipe) != 0) { -+ ast_log(LOG_ERROR, "Failed to create socket pair: %s (errno %d)\n", strerror(errno), errno); -+ ast_mutex_unlock(&iface_lock); -+ return NULL; -+ } -+ -+ if (dev->autoconnect && dev->status == BLT_STATUS_DOWN) -+ dev->outgoing_id = ast_sched_add(sched, 1500, AST_SCHED_CB(try_connect), dev); -+ dev = dev->next; -+ } -+ ast_mutex_unlock(&iface_lock); -+ -+ /* -- Now, Scan all sockets, and service scheduler -- */ -+ -+ pfds[0].fd = rfcomm_sock_ag; -+ pfds[0].events = POLLIN; -+ -+ pfds[1].fd = rfcomm_sock_hs; -+ pfds[1].events = POLLIN; -+ -+ pfds[2].fd = rfcomm_sock_gui; -+ pfds[2].events = POLLIN; -+ -+ pfds[3].fd = sco_socket; -+ pfds[3].events = POLLIN; -+ -+ while (1) { -+ int cnt = SRV_SOCK_CNT; -+ int i; -+ -+ /* -- Build pfds -- */ -+ -+ if (ast_mutex_lock(&iface_lock)) { -+ ast_log(LOG_ERROR, "Failed to get iface_lock.\n"); -+ return NULL; -+ } -+ dev = iface_head; -+ while (dev) { -+ ast_mutex_lock(&(dev->lock)); -+ if (dev->rd > 0 && ((dev->status != BLT_STATUS_DOWN) && (dev->status != BLT_STATUS_CONNECTING))) { -+ pfds[cnt].fd = dev->rd; -+ pfds[cnt].events = POLLIN; -+ cnt++; -+ } -+ ast_mutex_unlock(&(dev->lock)); -+ dev = dev->next; -+ } -+ ast_mutex_unlock(&iface_lock); -+ -+ /* -- End Build pfds -- */ -+ -+ res = ast_sched_wait(sched); -+ res = poll(pfds, cnt, MAX(100, MIN(100, res))); -+ -+ if (res == 0) -+ ast_sched_runq(sched); -+ -+ if (pfds[0].revents) { -+ handle_incoming(rfcomm_sock_ag, BLT_ROLE_AG); -+ res--; -+ } -+ -+ if (pfds[1].revents) { -+ handle_incoming(rfcomm_sock_hs, BLT_ROLE_HS); -+ res--; -+ } -+ -+ if (pfds[2].revents) { -+ handle_incoming(rfcomm_sock_gui, BLT_ROLE_GUI); -+ res--; -+ } -+ -+ if (pfds[3].revents) { -+ handle_incoming_sco(sco_socket); -+ res--; -+ } -+ -+ if (res == 0) -+ continue; -+ -+ for (i = SRV_SOCK_CNT ; i < cnt ; i++) { -+ -+ /* Optimise a little bit */ -+ if (res == 0) -+ break; -+ else if (pfds[i].revents == 0) -+ continue; -+ -+ /* -- Find the socket that has activity -- */ -+ -+ if (ast_mutex_lock(&iface_lock)) { -+ ast_log(LOG_ERROR, "Failed to get iface_lock.\n"); -+ return NULL; -+ } -+ -+ dev = iface_head; -+ -+ while (dev) { -+ if (pfds[i].fd == dev->rd) { -+ ast_mutex_lock(&(dev->lock)); -+ if (pfds[i].revents & POLLIN) { -+ if (handle_rd_data(dev) == -1) { -+ rd_close(dev, 0, 0); -+ } -+ } else { -+ rd_close(dev, 1, sock_err(dev->rd)); -+ } -+ ast_mutex_unlock(&(dev->lock)); -+ res--; -+ break; -+ } -+ dev = dev->next; -+ } -+ -+ if (dev == NULL) { -+ ast_log(LOG_ERROR, "Unhandled fd from poll()\n"); -+ close(pfds[i].fd); -+ } -+ -+ ast_mutex_unlock(&iface_lock); -+ -+ /* -- End find socket with activity -- */ -+ -+ } -+ -+ } -+ -+ return NULL; -+} -+ -+static int -+restart_monitor(void) -+{ -+ -+ if (monitor_thread == AST_PTHREADT_STOP) -+ return 0; -+ -+ if (ast_mutex_lock(&monitor_lock)) { -+ ast_log(LOG_WARNING, "Unable to lock monitor\n"); -+ return -1; -+ } -+ -+ if (monitor_thread == pthread_self()) { -+ ast_mutex_unlock(&monitor_lock); -+ ast_log(LOG_WARNING, "Cannot kill myself\n"); -+ return -1; -+ } -+ -+ if (monitor_thread != AST_PTHREADT_NULL) { -+ -+ /* Just signal it to be sure it wakes up */ -+ pthread_cancel(monitor_thread); -+ pthread_kill(monitor_thread, SIGURG); -+ ast_log(LOG_DEBUG, "Waiting for monitor thread to join...\n"); -+ pthread_join(monitor_thread, NULL); -+ ast_log(LOG_DEBUG, "joined\n"); -+ -+ } else { -+ -+ /* Start a new monitor */ -+ if (ast_pthread_create(&monitor_thread, NULL, do_monitor, NULL) < 0) { -+ ast_mutex_unlock(&monitor_lock); -+ ast_log(LOG_ERROR, "Unable to start monitor thread.\n"); -+ return -1; -+ } -+ -+ } -+ -+ ast_mutex_unlock(&monitor_lock); -+ return 0; -+} -+ -+static int -+blt_parse_config(void) -+{ -+ struct ast_config * cfg; -+ struct ast_variable * v; -+ char * cat; -+ -+ cfg = ast_load(BLT_CONFIG_FILE); -+ -+ if (!cfg) { -+ ast_log(LOG_NOTICE, "Unable to load Bluetooth config: %s. Bluetooth disabled\n", BLT_CONFIG_FILE); -+ return -1; -+ } -+ -+ v = ast_variable_browse(cfg, "general"); -+ -+ while (v) { -+ if (!strcasecmp(v->name, "rfchannel_ag")) { -+ rfcomm_channel_ag = atoi(v->value); -+ } else if (!strcasecmp(v->name, "rfchannel_hs")) { -+ rfcomm_channel_hs = atoi(v->value); -+ } else if (!strcasecmp(v->name, "rfchannel_gui")) { -+ rfcomm_channel_gui = atoi(v->value); -+ } else if (!strcasecmp(v->name, "interface")) { -+ hcidev_id = atoi(v->value); -+ } else if (!strcasecmp(v->name, "gui_default_sip_number")) { -+ gui_default_sip_number = v->value; -+ } else if (!strcasecmp(v->name, "gui_default_sip_address")) { -+ gui_default_sip_address = v->value; -+ } else { -+ ast_log(LOG_WARNING, "Unknown config key '%s' in section [general]\n", v->name); -+ } -+ v = v->next; -+ } -+ cat = ast_category_browse(cfg, NULL); -+ -+ while(cat) { -+ -+ char * str; -+ -+ if (strcasecmp(cat, "general")) { -+ blt_dev_t * device = malloc(sizeof(blt_dev_t)); -+ memset(device, 0, sizeof(blt_dev_t)); -+ device->sco_running = -1; -+ device->sco = -1; -+ device->rd = -1; -+ device->outgoing_id = -1; -+ device->status = BLT_STATUS_DOWN; -+ str2ba(cat, &(device->bdaddr)); -+ device->name = ast_variable_retrieve(cfg, cat, "name"); -+ -+ str = ast_variable_retrieve(cfg, cat, "type"); -+ -+ if (str == NULL) { -+ ast_log(LOG_ERROR, "Device [%s] has no role. Specify type=\n", cat); -+ return -1; -+ } else if (strcasecmp(str, "HS") == 0) { -+ device->role = BLT_ROLE_HS; -+ } else if (strcasecmp(str, "AG") == 0) { -+ device->role = BLT_ROLE_AG; -+ } else if (strcasecmp(str, "GUI") == 0) { -+ device->role = BLT_ROLE_GUI; -+ } else { -+ ast_log(LOG_ERROR, "Device [%s] has invalid role '%s'\n", cat, str); -+ return -1; -+ } -+ -+ /* XXX:T: Find channel to use using SDP. -+ * However, this needs to be non blocking, and I can't see -+ * anything in sdp_lib.h that will allow non blocking calls. -+ */ -+ -+ device->channel = 1; -+ -+ if ((str = ast_variable_retrieve(cfg, cat, "channel")) != NULL) -+ device->channel = atoi(str); -+ -+ if ((str = ast_variable_retrieve(cfg, cat, "autoconnect")) != NULL) -+ device->autoconnect = (strcasecmp(str, "yes") == 0 || strcmp(str, "1") == 0) ? 1 : 0; -+ -+ if ((str = ast_variable_retrieve(cfg, cat, "context")) != NULL) -+ device->context = str; -+ else -+ device->context = "bluetooth"; -+ -+ device->next = iface_head; -+ iface_head = device; -+ ifcount++; -+ } -+ -+ cat = ast_category_browse(cfg, cat); -+ } -+ return 0; -+} -+ -+ -+static int -+blt_show_peers(int fd, int argc, char *argv[]) -+{ -+ blt_dev_t * dev; -+ -+ if (ast_mutex_lock(&iface_lock)) { -+ ast_log(LOG_ERROR, "Failed to get Iface lock\n"); -+ ast_cli(fd, "Failed to get iface lock\n"); -+ return RESULT_FAILURE; -+ } -+ -+ dev = iface_head; -+ -+ ast_cli(fd, "BDAddr Name Role Status A/C SCOCon/Fd/Th Sig\n"); -+ ast_cli(fd, "----------------- ---------- ---- ----------- --- ------------ ---\n"); -+ -+ while (dev) { -+ char b1[18]; -+ ba2str(&(dev->bdaddr), b1); -+ ast_cli(fd, "%s %-10s %-4s %-11s %-3s %2d/%02d/%-6ld %s\n", -+ b1, dev->name, -+// (dev->role == BLT_ROLE_HS) ? "HS" : "AG", -+ (dev->role == BLT_ROLE_HS) ? "HS" : (dev->role == BLT_ROLE_AG) ? "AG" : "GUI", -+ status2str(dev->status), -+ (dev->autoconnect) ? "Yes" : "No", -+ dev->sco_running, -+ dev->sco, -+ dev->sco_thread, -+ (dev->role == BLT_ROLE_AG) ? (dev->service) ? "Yes" : "No" : "N/A" -+ ); -+ dev = dev->next; -+ } -+ -+ ast_mutex_unlock(&iface_lock); -+ return RESULT_SUCCESS; -+} -+ -+static int -+blt_show_information(int fd, int argc, char *argv[]) -+{ -+ char b1[18]; -+ ba2str(&local_bdaddr, b1); -+ ast_cli(fd, "-------------------------------------------\n"); -+ ast_cli(fd, " Version : %s\n", BLT_SVN_REVISION); -+ ast_cli(fd, " Monitor PID : %d\n", monitor_pid); -+ ast_cli(fd, " RFCOMM AG : Channel %d, FD %d\n", rfcomm_channel_ag, rfcomm_sock_ag); -+ ast_cli(fd, " RFCOMM HS : Channel %d, FD %d\n", rfcomm_channel_hs, rfcomm_sock_hs); -+ ast_cli(fd, " RFCOMM GUI : Channel %d, FD %d\n", rfcomm_channel_gui, rfcomm_sock_gui); -+ ast_cli(fd, " Device : hci%d, MAC Address %s\n", hcidev_id, b1); -+ ast_cli(fd, "-------------------------------------------\n"); -+ return RESULT_SUCCESS; -+} -+ -+static int -+blt_ag_sendcmd(int fd, int argc, char *argv[]) -+{ -+ blt_dev_t * dev; -+ -+ if (argc != 4) -+ return RESULT_SHOWUSAGE; -+ -+ ast_mutex_lock(&iface_lock); -+ dev = iface_head; -+ while (dev) { -+ if (!strcasecmp(argv[2], dev->name)) -+ break; -+ dev = dev->next; -+ } -+ ast_mutex_unlock(&iface_lock); -+ -+ if (!dev) { -+ ast_cli(fd, "Device '%s' does not exist\n", argv[2]); -+ return RESULT_FAILURE; -+ } -+ -+ if ((dev->role != BLT_ROLE_AG) && (dev->role != BLT_ROLE_GUI)) { -+ ast_cli(fd, "Device '%s' is not an AG or GUI\n", argv[2]); -+ return RESULT_FAILURE; -+ } -+ -+ if (dev->status == BLT_STATUS_DOWN || dev->status == BLT_STATUS_NEGOTIATING) { -+ ast_cli(fd, "Device '%s' is not connected\n", argv[2]); -+ return RESULT_FAILURE; -+ } -+ -+ if (*(argv[3] + strlen(argv[3]) - 1) == '.') -+ *(argv[3] + strlen(argv[3]) - 1) = '?'; -+ -+ ast_cli(fd, "Sending AT command to %s: %s\n", dev->name, argv[3]); -+ -+ ast_mutex_lock(&(dev->lock)); -+ send_atcmd(dev, argv[3]); -+ ast_mutex_unlock(&(dev->lock)); -+ -+ return RESULT_SUCCESS; -+} -+ -+static char * -+complete_device(char * line, char * word, int pos, int state, int rpos, blt_role_t role) -+{ -+ blt_dev_t * dev; -+ int which = 0; -+ char *ret; -+ -+ if (pos != rpos) -+ return NULL; -+ -+ ast_mutex_lock(&iface_lock); -+ -+ dev = iface_head; -+ -+ while (dev) { -+ -+ if ((dev->role == role) && (!strncasecmp(word, dev->name, strlen(word)))) { -+ if (++which > state) -+ break; -+ } -+ -+ dev = dev->next; -+ } -+ -+ if (dev) -+ ret = strdup(dev->name); -+ else -+ ret = NULL; -+ -+ ast_mutex_unlock(&iface_lock); -+ -+ return ret; -+} -+ -+static char * -+complete_device_2_ag_gui(char * line, char * word, int pos, int state) -+{ -+ return complete_device(line, word, pos, state, 2, BLT_ROLE_AG); -+} -+ -+static char show_peers_usage[] = -+"Usage: bluetooth show peers\n" -+" List all bluetooth peers and their status\n"; -+ -+static struct ast_cli_entry -+cli_show_peers = -+ { { "bluetooth", "show", "peers", NULL }, blt_show_peers, "List Bluetooth Peers", show_peers_usage }; -+ -+ -+static char ag_sendcmd[] = -+"Usage: bluetooth sendcmd \n" -+" Sends a AT cmd over the RFCOMM link, and print result (AG only)\n"; -+ -+static struct ast_cli_entry -+cli_ag_sendcmd = -+ { { "bluetooth", "sendcmd", NULL }, blt_ag_sendcmd, "Send AG/GUI an AT command", ag_sendcmd, complete_device_2_ag_gui }; -+ -+static char show_information[] = -+"Usage: bluetooth show information\n" -+" Lists information about the bluetooth subsystem\n"; -+ -+static struct ast_cli_entry -+cli_show_information = -+ { { "bluetooth", "show", "information", NULL }, blt_show_information, "List Bluetooth Info", show_information }; -+ -+void -+remove_sdp_records(void) -+{ -+ -+ sdp_session_t * sdp; -+ sdp_list_t * attr; -+ sdp_record_t * rec; -+ int res = -1; -+ uint32_t range = 0x0000ffff; -+ -+ if (sdp_record_ag == -1 || sdp_record_gui == -1 || sdp_record_hs == -1) -+ return; -+ -+ ast_log(LOG_DEBUG, "Removing SDP records\n"); -+ -+ sdp = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY); -+ -+ if (!sdp) -+ return; -+ -+ attr = sdp_list_append(0, &range); -+ rec = sdp_service_attr_req(sdp, sdp_record_ag, SDP_ATTR_REQ_RANGE, attr); -+ sdp_list_free(attr, 0); -+ -+ if (rec) -+ if (sdp_record_unregister(sdp, rec) == 0) -+ res = 0; -+ -+ rec = sdp_service_attr_req(sdp, sdp_record_gui, SDP_ATTR_REQ_RANGE, attr); -+ sdp_list_free(attr, 0); -+ -+ if (rec) -+ if (sdp_record_unregister(sdp, rec) == 0) -+ res = 0; -+ -+ attr = sdp_list_append(0, &range); -+ rec = sdp_service_attr_req(sdp, sdp_record_hs, SDP_ATTR_REQ_RANGE, attr); -+ sdp_list_free(attr, 0); -+ -+ if (rec) -+ if (sdp_record_unregister(sdp, rec) == 0) -+ res = 0; -+ -+ sdp_close(sdp); -+ -+ if (res == 0) -+ ast_log(LOG_NOTICE, "Removed SDP records\n"); -+ else -+ ast_log(LOG_ERROR, "Failed to remove SDP records\n"); -+ -+} -+ -+static int -+__unload_module(void) -+{ -+ -+#if ASTERISK_VERSION_NUM <= 010107 -+ ast_channel_unregister(BLT_CHAN_NAME); -+#else -+ ast_channel_unregister(&blt_tech); -+#endif -+ -+ if (monitor_thread != AST_PTHREADT_NULL) { -+ -+ if (ast_mutex_lock(&monitor_lock)) { -+ -+ if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP) && (monitor_thread != AST_PTHREADT_NULL)) { -+ pthread_cancel(monitor_thread); -+ pthread_kill(monitor_thread, SIGURG); -+ fprintf(stderr, "Waiting for monitor thread to join...\n"); -+ pthread_join(monitor_thread, NULL); -+ fprintf(stderr, "joined\n"); -+ } -+ monitor_thread = AST_PTHREADT_STOP; -+ ast_mutex_unlock(&monitor_lock); -+ -+ } else { -+ -+ ast_log(LOG_WARNING, "Unable to lock the monitor\n"); -+ return -1; -+ -+ } -+ -+ } -+ -+ ast_unregister_atexit(remove_sdp_records); -+ remove_sdp_records(); -+ return 0; -+} -+ -+int -+load_module() -+{ -+ sdp_session_t * sess; -+ int dd; -+ uint16_t vs; -+ -+ hcidev_id = BLT_DEFAULT_HCI_DEV; -+ -+ if (blt_parse_config() != 0) { -+ ast_log(LOG_ERROR, "Bluetooth configuration error. Bluetooth Disabled\n"); -+ return unload_module(); -+ } -+ -+ dd = hci_open_dev(hcidev_id); -+ if (dd == -1) { -+ ast_log(LOG_ERROR, "Unable to open interface hci%d: %s.\n", hcidev_id, strerror(errno)); -+ return -1; -+ } -+ -+ hci_read_voice_setting(dd, &vs, 1000); -+ vs = htobs(vs); -+ close(dd); -+ -+ if (vs != 0x0060) { -+ ast_log(LOG_ERROR, "Bluetooth voice setting must be 0x0060, not 0x%04x\n", vs); -+ unload_module(); -+ return 0; -+ } -+ -+ if ((sched = sched_context_create()) == NULL) { -+ ast_log(LOG_WARNING, "Unable to create schedule context\n"); -+ return -1; -+ } -+ -+ memset(&local_bdaddr, 0, sizeof(local_bdaddr)); -+ -+ hci_devba(hcidev_id, &local_bdaddr); -+ -+ /* --- Add SDP record --- */ -+ -+ sess = sdp_connect(&local_bdaddr, BDADDR_LOCAL, SDP_RETRY_IF_BUSY); -+ -+ if ((rfcomm_sock_ag = rfcomm_listen(&local_bdaddr, rfcomm_channel_ag)) < 0) { -+ return -1; -+ } -+ -+ if ((rfcomm_sock_hs = rfcomm_listen(&local_bdaddr, rfcomm_channel_hs)) < 0) -+ return -1; -+ -+ if ((rfcomm_sock_gui = rfcomm_listen(&local_bdaddr, rfcomm_channel_gui)) < 0) -+ return -1; -+ -+ if ((sco_socket = sco_listen(&local_bdaddr)) < 0) -+ return -1; -+ -+ if (!sess) { -+ ast_log(LOG_ERROR, "Failed to connect to SDP server: %s\n", strerror(errno)); -+ return -1; -+ } -+ -+ if (sdp_register(sess) != 0) { -+ ast_log(LOG_ERROR, "Failed to register HeadsetAudioGateway in SDP\n"); -+ return -1; -+ } -+ -+ sdp_close(sess); -+ -+ if (restart_monitor() != 0) -+ return -1; -+ -+#if ASTERISK_VERSION_NUM <= 010107 -+ if (ast_channel_register(BLT_CHAN_NAME, "Bluetooth Driver", BLUETOOTH_FORMAT, blt_request)) { -+#else -+ if (ast_channel_register(&blt_tech)) { -+#endif -+ ast_log(LOG_ERROR, "Unable to register channel class BTL\n"); -+ __unload_module(); -+ return -1; -+ } -+ -+ ast_cli_register(&cli_show_information); -+ ast_cli_register(&cli_show_peers); -+ ast_cli_register(&cli_ag_sendcmd); -+ -+ ast_register_atexit(remove_sdp_records); -+ -+ ast_log(LOG_NOTICE, "Loaded Bluetooth support, %s\n", BLT_SVN_REVISION + 1); -+ -+ return 0; -+} -+ -+int -+unload_module(void) -+{ -+ ast_cli_unregister(&cli_ag_sendcmd); -+ ast_cli_unregister(&cli_show_peers); -+ ast_cli_unregister(&cli_show_information); -+ return __unload_module(); -+} -+ -+int -+usecount() -+{ -+ int res; -+ ast_mutex_lock(&usecnt_lock); -+ res = usecnt; -+ ast_mutex_unlock(&usecnt_lock); -+ return res; -+} -+ -+char *description() -+{ -+ return "Bluetooth Channel Driver"; -+} -+ -+char * -+key() -+{ -+ return ASTERISK_GPL_KEY; -+} -+ -+ -diff -ruN asterisk-1.0.9-old/configs/bluetooth.conf asterisk-1.0.9-new/configs/bluetooth.conf ---- asterisk-1.0.9-old/configs/bluetooth.conf 1970-01-01 01:00:00.000000000 +0100 -+++ asterisk-1.0.9-new/configs/bluetooth.conf 2005-09-06 22:51:38.000000000 +0200 -@@ -0,0 +1,46 @@ -+[general] -+; Channel we listen on as a HS (Headset) -+rfchannel_hs = 2 -+; Channel we listen on as an AG (AudioGateway) -+rfchannel_ag = 3 -+; Channel we listen on as GUI -+rfchannel_gui = 4 -+; hci interface to use (number - e.g '0') -+interface = 0 -+ -+; RFCOMM channel to connect to. For a HandsSet: -+; sdptool search --bdaddr xx:xx:xx:xx:xx:xx 0x111E -+; or,for an AudioGateway (Phone): -+; sdptool search --bdaddr xx:xx:xx:xx:xx:xx 0x111F -+; -+; Find the 'channel' value under RFCOMM. -+; -+;channel = 6 -+; Automatically connect? -+;autoconnect = yes -+ -+;example for a SonyEricsson mobile as a GUI device -+[00:0F:DE:6E:77:6B] -+name = T610 -+type = GUI -+channel = 6 -+;channel = 1 -+autoconnect = yes -+ -+;[00:0E:6D:1A:3D:86] -+;name = Nokia -+;type = AG -+;channel = 13 -+;autoconnect = yes -+ -+[00:0E:A1:01:49:AE] -+name = AutoBlue -+type = HS -+channel = 2 -+autoconnect = yes -+ -+;[00:0A:D9:EB:FD:D8] -+;name = P900 -+;type = AG -+;channel = 8 -+;autoconnect = no diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-apps.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-apps.patch deleted file mode 100644 index 7df38f76492..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-apps.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -ruN asterisk-1.2.0-old/apps/Makefile asterisk-1.2.0-new/apps/Makefile ---- asterisk-1.2.0-old/apps/Makefile 2005-11-11 01:32:45.000000000 +0100 -+++ asterisk-1.2.0-new/apps/Makefile 2005-12-04 19:26:20.000000000 +0100 -@@ -83,6 +83,9 @@ - #CFLAGS+=-DEXTENDED_ODBC_STORAGE - # See doc/README.odbcstorage for more information - -+CFLAGS += $(EXTRA_CFLAGS) -+APPS += $(EXTRA_APP_MODULES) -+ - all: $(APPS) - - clean: -@@ -102,14 +105,17 @@ - app_curl.so: app_curl.o - $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS) - -+app_sql_mysql.so: app_sql_mysql.o -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lmysqlclient -+ - app_sql_postgres.o: app_sql_postgres.c -- $(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c -+ $(CC) -pipe $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c - - app_sql_postgres.so: app_sql_postgres.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lpq - - app_sql_odbc.so: app_sql_odbc.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lodbc - - look: look.c - $(CC) -pipe -O6 -g look.c -o look -lncurses diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-cdr.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-cdr.patch deleted file mode 100644 index 7fc623ece9e..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-cdr.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -ruN asterisk-1.2.0-old/cdr/Makefile asterisk-1.2.0-new/cdr/Makefile ---- asterisk-1.2.0-old/cdr/Makefile 2005-11-14 01:45:07.000000000 +0100 -+++ asterisk-1.2.0-new/cdr/Makefile 2005-12-04 22:22:43.000000000 +0100 -@@ -107,6 +107,9 @@ - MODS+=cdr_sqlite.so - endif - -+CFLAGS += $(EXTRA_CFLAGS) -+MODS += $(EXTRA_CDR_MODULES) -+ - all: depend $(MODS) - - install: all -@@ -123,16 +126,19 @@ - endif - - cdr_odbc.so: cdr_odbc.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc $(MLFLAGS) -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lodbc $(MLFLAGS) - - cdr_tds.so: cdr_tds.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltds $(MLFLAGS) -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -ltds $(MLFLAGS) -+ -+cdr_mysql.so: cdr_pgsql.o -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lmysqlclient -lz $(MLFLAGS) - - cdr_pgsql.so: cdr_pgsql.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lpq -lz $(MLFLAGS) -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lpq -lz $(MLFLAGS) - - cdr_sqlite.so: cdr_sqlite.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lsqlite $(MLFLAGS) -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lsqlite $(MLFLAGS) - - depend: .depend - diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-channels.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-channels.patch deleted file mode 100644 index d5ac6ad7a8d..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-channels.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -ruN asterisk-1.2.0-old/channels/Makefile asterisk-1.2.0-new/channels/Makefile ---- asterisk-1.2.0-old/channels/Makefile 2005-12-04 04:48:40.000000000 +0100 -+++ asterisk-1.2.0-new/channels/Makefile 2005-12-04 23:30:19.000000000 +0100 -@@ -155,6 +155,9 @@ - - #CFLAGS+=$(shell [ -f $(ZAPDIR)/libzap.a ] && echo "-I$(ZAPDIR)") - -+CFLAGS += $(EXTRA_CFLAGS) -+CHANNEL_LIBS += $(EXTRA_CHAN_MODULES) -+ - all: depend $(CHANNEL_LIBS) - - clean: -@@ -162,7 +165,7 @@ - rm -f busy.h ringtone.h gentone gentone-ulaw - - %.so : %.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${LIBS} -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} - - ifneq ($(wildcard .depend),) - include .depend diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-codecs-gsm.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-codecs-gsm.patch deleted file mode 100644 index 372d6970e15..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-codecs-gsm.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -ruN asterisk-1.2.0-old/codecs/gsm/Makefile asterisk-1.2.0-new/codecs/gsm/Makefile ---- asterisk-1.2.0-old/codecs/gsm/Makefile 2005-11-08 04:31:45.000000000 +0100 -+++ asterisk-1.2.0-new/codecs/gsm/Makefile 2005-12-04 13:31:50.000000000 +0100 -@@ -236,6 +236,8 @@ - ifneq ($(shell uname -m),armv4l) - ifneq ($(shell uname -m),sparc64) - ifneq (${PROC},arm) -+ifneq (${PROC},mipsel) -+ifneq (${PROC},mips) - GSM_SOURCES+= $(SRC)/k6opt.s - endif - endif -@@ -246,6 +247,8 @@ - endif - endif - endif -+endif -+endif - - TOAST_SOURCES = $(SRC)/toast.c \ - $(SRC)/toast_lin.c \ -@@ -299,6 +301,8 @@ - ifneq ($(shell uname -m), alpha) - ifneq ($(shell uname -m), sparc64) - ifneq ($(shell uname -m), armv4l) -+ifneq (${PROC}, mipsel) -+ifneq (${PROC}, mips) - GSM_OBJECTS+= $(SRC)/k6opt.o - endif - endif -@@ -308,6 +311,8 @@ - endif - endif - endif -+endif -+endif - - TOAST_OBJECTS = $(SRC)/toast.o \ - $(SRC)/toast_lin.o \ diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-codecs.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-codecs.patch deleted file mode 100644 index f59c24c5d89..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-codecs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ruN asterisk-1.2.0-old/codecs/Makefile asterisk-1.2.0-new/codecs/Makefile ---- asterisk-1.2.0-old/codecs/Makefile 2005-11-08 05:13:18.000000000 +0100 -+++ asterisk-1.2.0-new/codecs/Makefile 2005-12-04 19:24:53.000000000 +0100 -@@ -72,6 +72,9 @@ - codec_adpcm.so codec_ulaw.so codec_alaw.so codec_a_mu.so \ - codec_g726.so - -+CFLAGS += $(EXTRA_CFLAGS) -+CODECS += $(EXTRA_CODEC_MODULES) -+ - all: depend $(CODECS) - - clean: diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-pbx.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-pbx.patch deleted file mode 100644 index f1d2a633173..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-pbx.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -ruN asterisk-1.2.0-old/pbx/Makefile asterisk-1.2.0-new/pbx/Makefile ---- asterisk-1.2.0-old/pbx/Makefile 2005-11-01 22:53:30.000000000 +0100 -+++ asterisk-1.2.0-new/pbx/Makefile 2005-12-04 19:23:48.000000000 +0100 -@@ -38,6 +38,9 @@ - - KDE_CONSOLE_OBJS=pbx_kdeconsole_main.o pbx_kdeconsole.o - -+CFLAGS += $(EXTRA_CFLAGS) -+PBX_LIBS += $(EXTRA_PBX_MODULES) -+ - all: depend $(PBX_LIBS) - - clean: -@@ -59,7 +62,7 @@ - $(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS) - - pbx_dundi.so: dundi-parser.o pbx_dundi.o -- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o $(EXTRA_LDFLAGS) -lz ${CYGSOLIB} - - %.moc : %.h - $(MOC) $< -o $@ diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-res.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-res.patch deleted file mode 100644 index 2f782cb1d34..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile-res.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ruN asterisk-1.2.0-old/res/Makefile asterisk-1.2.0-new/res/Makefile ---- asterisk-1.2.0-old/res/Makefile 2005-11-16 21:49:44.000000000 +0100 -+++ asterisk-1.2.0-new/res/Makefile 2005-12-04 19:18:15.000000000 +0100 -@@ -69,6 +69,9 @@ - CFLAGS+=-DOPENSSL_NO_KRB5 -fPIC - endif - -+CFLAGS += $(EXTRA_CFLAGS) -+MODS += $(EXTRA_RES_MODULES) -+ - all: depend $(MODS) - - install: all -@@ -112,6 +112,12 @@ - res_config_odbc.so: res_config_odbc.o - $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${CYG_RES_CONFIG_ODBC_LIB} - -+res_config_mysql.so: res_config_mysql.o -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lmysqlclient -lz -+ -+res_sqlite.so: res_sqlite.o -+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lsqlite -+ - ifneq ($(wildcard .depend),) - include .depend - endif diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile.patch deleted file mode 100644 index 2b4afa26e5e..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-Makefile.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -ruN asterisk-1.2.0-old/Makefile asterisk-1.2.0-new/Makefile ---- asterisk-1.2.0-old/Makefile 2005-11-16 21:23:53.000000000 +0100 -+++ asterisk-1.2.0-new/Makefile 2005-12-04 23:01:16.000000000 +0100 -@@ -341,16 +339,6 @@ - netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \ - cryptostub.o - --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),) -- OBJS+= poll.o -- ASTCFLAGS+=-DPOLLCOMPAT --endif -- --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) -- OBJS+= dlfcn.o -- ASTCFLAGS+=-DDLFCNCOMPAT --endif -- - ifeq ($(OSARCH),Linux) - LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd - else -@@ -401,7 +389,9 @@ - HAVEDOT=no - endif - -+ifneq ($(NOCRYPTO),yes) - LIBS+=-lssl -+endif - - INSTALL=install - -@@ -430,12 +420,12 @@ - cd editline && unset CFLAGS LIBS && ./configure ; \ - - editline/libedit.a: FORCE -- cd editline && unset CFLAGS LIBS && test -f config.h || ./configure -+ cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE) $(EXTRA_CFLAGS)" LDFLAGS="$(EXTRA_LDFLAGS)" ./configure - $(MAKE) -C editline libedit.a - - db1-ast/libdb1.a: FORCE - @if [ -d db1-ast ]; then \ -- $(MAKE) -C db1-ast libdb1.a ; \ -+ $(MAKE) OORG="$(OPTIMIZE)" -C db1-ast libdb1.a ; \ - else \ - echo "You need to do a cvs update -d not just cvs update"; \ - exit 1; \ -@@ -513,7 +503,7 @@ - fi - rm -f include/asterisk/build.h.tmp - $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c -- $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) -+ $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(EXTRA_LDFLAGS) $(LIBS) - - muted: muted.o - $(CC) $(AUDIO_LIBS) -o muted muted.o diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-app_mysql.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-app_mysql.patch deleted file mode 100644 index 6f02e75a5f0..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-app_mysql.patch +++ /dev/null @@ -1,449 +0,0 @@ -diff -ruN asterisk-1.2.0-old/apps/app_sql_mysql.c asterisk-1.2.0-new/apps/app_sql_mysql.c ---- asterisk-1.2.0-old/apps/app_sql_mysql.c 1970-01-01 01:00:00.000000000 +0100 -+++ asterisk-1.2.0-new/apps/app_sql_mysql.c 2005-06-07 18:36:28.000000000 +0200 -@@ -0,0 +1,445 @@ -+/* -+ * Asterisk -- A telephony toolkit for Linux. -+ * -+ * Connect to MySQL -+ * -+ * Copyright (C) 2004, Constantine Filin and Christos Ricudis -+ * -+ * Christos Ricudis -+ * Constantine Filin -+ * -+ * This program is free software, distributed under the terms of -+ * the GNU General Public License -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define EXTRA_LOG 0 -+ -+static char *tdesc = "Simple Mysql Interface"; -+ -+static char *app = "MYSQL"; -+ -+static char *synopsis = "Do several mySQLy things"; -+ -+static char *descrip = -+"MYSQL(): Do several mySQLy things\n" -+"Syntax:\n" -+" MYSQL(Connect connid dhhost dbuser dbpass dbname)\n" -+" Connects to a database. Arguments contain standard MySQL parameters\n" -+" passed to function mysql_real_connect. Connection identifer returned\n" -+" in ${var}\n" -+" MYSQL(Query resultid ${connid} query-string)\n" -+" Executes standard MySQL query contained in query-string using established\n" -+" connection identified by ${connection_identifier}. Result of query is\n" -+" is stored in ${var}.\n" -+" MYSQL(Fetch fetchid ${resultid} var1 var2 ... varN)\n" -+" Fetches a single row from a result set contained in ${result_identifier}.\n" -+" Assigns returned fields to ${var1} ... ${varn}. ${fetchid} is set TRUE\n" -+" if additional rows exist in result set.\n" -+" MYSQL(Clear ${resultid})\n" -+" Frees memory and datastructures associated with result set.\n" -+" MYSQL(Disconnect ${connid})\n" -+" Disconnects from named connection to MySQL.\n" -+" On exit, always returns 0. Sets MYSQL_STATUS to 0 on success and -1 on error.\n"; -+ -+/* -+EXAMPLES OF USE : -+ -+exten => s,2,MYSQL(Connect connid localhost asterisk mypass credit) -+exten => s,3,MYSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM}) -+exten => s,4,MYSQL(Fetch fetchid ${resultid} datavar1 datavar2) -+exten => s,5,GotoIf(${fetchid}?6:8) -+exten => s,6,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.") -+exten => s,7,Goto(s,4) -+exten => s,8,MYSQL(Clear ${resultid}) -+exten => s,9,MYSQL(Disconnect ${connid}) -+*/ -+ -+STANDARD_LOCAL_USER; -+LOCAL_USER_DECL; -+ -+AST_MUTEX_DEFINE_STATIC(_mysql_mutex); -+ -+#define AST_MYSQL_ID_DUMMY 0 -+#define AST_MYSQL_ID_CONNID 1 -+#define AST_MYSQL_ID_RESID 2 -+#define AST_MYSQL_ID_FETCHID 3 -+ -+struct ast_MYSQL_id { -+ int identifier_type; /* 0=dummy, 1=connid, 2=resultid */ -+ int identifier; -+ void *data; -+ AST_LIST_ENTRY(ast_MYSQL_id) entries; -+} *ast_MYSQL_id; -+ -+AST_LIST_HEAD(MYSQLidshead,ast_MYSQL_id) _mysql_ids_head; -+ -+/* helpful procs */ -+static void *find_identifier(int identifier,int identifier_type) { -+ struct MYSQLidshead *headp; -+ struct ast_MYSQL_id *i; -+ void *res=NULL; -+ int found=0; -+ -+ headp=&_mysql_ids_head; -+ -+ if (AST_LIST_LOCK(headp)) { -+ ast_log(LOG_WARNING,"Unable to lock identifiers list\n"); -+ } else { -+ AST_LIST_TRAVERSE(headp,i,entries) { -+ if ((i->identifier==identifier) && (i->identifier_type==identifier_type)) { -+ found=1; -+ res=i->data; -+ break; -+ } -+ } -+ if (!found) { -+ ast_log(LOG_WARNING,"Identifier %d, identifier_type %d not found in identifier list\n",identifier,identifier_type); -+ } -+ AST_LIST_UNLOCK(headp); -+ } -+ -+ return res; -+} -+ -+static int add_identifier(int identifier_type,void *data) { -+ struct ast_MYSQL_id *i,*j; -+ struct MYSQLidshead *headp; -+ int maxidentifier=0; -+ -+ headp=&_mysql_ids_head; -+ i=NULL; -+ j=NULL; -+ -+ if (AST_LIST_LOCK(headp)) { -+ ast_log(LOG_WARNING,"Unable to lock identifiers list\n"); -+ return(-1); -+ } else { -+ i=malloc(sizeof(struct ast_MYSQL_id)); -+ AST_LIST_TRAVERSE(headp,j,entries) { -+ if (j->identifier>maxidentifier) { -+ maxidentifier=j->identifier; -+ } -+ } -+ i->identifier=maxidentifier+1; -+ i->identifier_type=identifier_type; -+ i->data=data; -+ AST_LIST_INSERT_HEAD(headp,i,entries); -+ AST_LIST_UNLOCK(headp); -+ } -+ return i->identifier; -+} -+ -+static int del_identifier(int identifier,int identifier_type) { -+ struct ast_MYSQL_id *i; -+ struct MYSQLidshead *headp; -+ int found=0; -+ -+ headp=&_mysql_ids_head; -+ -+ if (AST_LIST_LOCK(headp)) { -+ ast_log(LOG_WARNING,"Unable to lock identifiers list\n"); -+ } else { -+ AST_LIST_TRAVERSE(headp,i,entries) { -+ if ((i->identifier==identifier) && -+ (i->identifier_type==identifier_type)) { -+ AST_LIST_REMOVE(headp,i,entries); -+ free(i); -+ found=1; -+ break; -+ } -+ } -+ AST_LIST_UNLOCK(headp); -+ } -+ -+ if (found==0) { -+ ast_log(LOG_WARNING,"Could not find identifier %d, identifier_type %d in list to delete\n",identifier,identifier_type); -+ return(-1); -+ } else { -+ return(0); -+ } -+} -+ -+static int set_asterisk_int(struct ast_channel *chan, char *varname, int id) { -+ if( id>=0 ) { -+ char s[100] = ""; -+ snprintf(s, sizeof(s)-1, "%d", id); -+#if EXTRA_LOG -+ ast_log(LOG_WARNING,"MYSQL: setting var '%s' to value '%s'\n",varname,s); -+#endif -+ pbx_builtin_setvar_helper(chan,varname,s); -+ } -+ return id; -+} -+ -+static int add_identifier_and_set_asterisk_int(struct ast_channel *chan, char *varname, int identifier_type, void *data) { -+ return set_asterisk_int(chan,varname,add_identifier(identifier_type,data)); -+} -+ -+static int safe_scan_int( char** data, char* delim, int def ) { -+ char* end; -+ int res = def; -+ char* s = strsep(data,delim); -+ if( s ) { -+ res = strtol(s,&end,10); -+ if (*end) res = def; /* not an integer */ -+ } -+ return res; -+} -+ -+/* MYSQL operations */ -+static int aMYSQL_connect(struct ast_channel *chan, char *data) { -+ -+ MYSQL *mysql; -+ -+ char *connid_var; -+ char *dbhost; -+ char *dbuser; -+ char *dbpass; -+ char *dbname; -+ -+ strsep(&data," "); // eat the first token, we already know it :P -+ -+ connid_var=strsep(&data," "); -+ dbhost=strsep(&data," "); -+ dbuser=strsep(&data," "); -+ dbpass=strsep(&data," "); -+ dbname=strsep(&data,"\n"); -+ -+ if( connid_var && dbhost && dbuser && dbpass && dbname ) { -+ mysql = mysql_init(NULL); -+ if (mysql) { -+ if (mysql_real_connect(mysql,dbhost,dbuser,dbpass,dbname,0,NULL,0)) { -+ add_identifier_and_set_asterisk_int(chan,connid_var,AST_MYSQL_ID_CONNID,mysql); -+ return 0; -+ } -+ else { -+ ast_log(LOG_WARNING,"mysql_real_connect(mysql,%s,%s,dbpass,%s,...) failed\n",dbhost,dbuser,dbname); -+ } -+ } -+ else { -+ ast_log(LOG_WARNING,"myslq_init returned NULL\n"); -+ } -+ } -+ else { -+ ast_log(LOG_WARNING,"MYSQL(connect is missing some arguments\n"); -+ } -+ -+ return -1; -+} -+ -+static int aMYSQL_query(struct ast_channel *chan, char *data) { -+ -+ MYSQL *mysql; -+ MYSQL_RES *mysqlres; -+ -+ char *resultid_var; -+ int connid; -+ char *querystring; -+ -+ strsep(&data," "); // eat the first token, we already know it :P -+ -+ resultid_var = strsep(&data," "); -+ connid = safe_scan_int(&data," ",-1); -+ querystring = strsep(&data,"\n"); -+ -+ if (resultid_var && (connid>=0) && querystring) { -+ if ((mysql=find_identifier(connid,AST_MYSQL_ID_CONNID))!=NULL) { -+ mysql_query(mysql,querystring); -+ if ((mysqlres=mysql_use_result(mysql))!=NULL) { -+ add_identifier_and_set_asterisk_int(chan,resultid_var,AST_MYSQL_ID_RESID,mysqlres); -+ return 0; -+ } -+ else if( mysql_field_count(mysql)==0 ) { -+ return 0; // See http://dev.mysql.com/doc/mysql/en/mysql_field_count.html -+ } -+ else { -+ ast_log(LOG_WARNING,"aMYSQL_query: mysql_store_result() failed on query %s\n",querystring); -+ } -+ } -+ else { -+ ast_log(LOG_WARNING,"aMYSQL_query: Invalid connection identifier %d passed in aMYSQL_query\n",connid); -+ } -+ } -+ else { -+ ast_log(LOG_WARNING,"aMYSQL_query: missing some arguments\n"); -+ } -+ -+ return -1; -+} -+ -+ -+static int aMYSQL_fetch(struct ast_channel *chan, char *data) { -+ -+ MYSQL_RES *mysqlres; -+ MYSQL_ROW mysqlrow; -+ -+ char *fetchid_var,*s5,*s6; -+ int resultid,numFields,j; -+ -+ strsep(&data," "); // eat the first token, we already know it :P -+ -+ fetchid_var = strsep(&data," "); -+ resultid = safe_scan_int(&data," ",-1); -+ -+ if (fetchid_var && (resultid>=0) ) { -+ if ((mysqlres=find_identifier(resultid,AST_MYSQL_ID_RESID))!=NULL) { -+ /* Grab the next row */ -+ if ((mysqlrow=mysql_fetch_row(mysqlres))!=NULL) { -+ numFields=mysql_num_fields(mysqlres); -+ for (j=0;j -+ * -+ * Modified August 2003 -+ * Tilghman Lesher -+ * -+ * Modified August 6, 2005 -+ * Joseph Benden -+ * Added mysql connection timeout parameter -+ * Added an automatic reconnect as to not lose a cdr record -+ * Cleaned up the original code to match the coding guidelines -+ * -+ * This program is free software, distributed under the terms of -+ * the GNU General Public License. -+ * -+ */ -+ -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define DATE_FORMAT "%Y-%m-%d %T" -+ -+static char *desc = "MySQL CDR Backend"; -+static char *name = "mysql"; -+static char *config = "cdr_mysql.conf"; -+static char *hostname = NULL, *dbname = NULL, *dbuser = NULL, *password = NULL, *dbsock = NULL, *dbtable = NULL; -+static int hostname_alloc = 0, dbname_alloc = 0, dbuser_alloc = 0, password_alloc = 0, dbsock_alloc = 0, dbtable_alloc = 0; -+static int dbport = 0; -+static int connected = 0; -+static time_t connect_time = 0; -+static int records = 0; -+static int totalrecords = 0; -+static int userfield = 0; -+static unsigned int timeout = 0; -+ -+AST_MUTEX_DEFINE_STATIC(mysql_lock); -+ -+static MYSQL mysql; -+ -+static char cdr_mysql_status_help[] = -+"Usage: cdr mysql status\n" -+" Shows current connection status for cdr_mysql\n"; -+ -+static int handle_cdr_mysql_status(int fd, int argc, char *argv[]) -+{ -+ if (connected) { -+ char status[256], status2[100] = ""; -+ int ctime = time(NULL) - connect_time; -+ if (dbport) -+ snprintf(status, 255, "Connected to %s@%s, port %d", dbname, hostname, dbport); -+ else if (dbsock) -+ snprintf(status, 255, "Connected to %s on socket file %s", dbname, dbsock); -+ else -+ snprintf(status, 255, "Connected to %s@%s", dbname, hostname); -+ -+ if (dbuser && *dbuser) -+ snprintf(status2, 99, " with username %s", dbuser); -+ if (dbtable && *dbtable) -+ snprintf(status2, 99, " using table %s", dbtable); -+ if (ctime > 31536000) { -+ ast_cli(fd, "%s%s for %d years, %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 31536000, (ctime % 31536000) / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60); -+ } else if (ctime > 86400) { -+ ast_cli(fd, "%s%s for %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60); -+ } else if (ctime > 3600) { -+ ast_cli(fd, "%s%s for %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 3600, (ctime % 3600) / 60, ctime % 60); -+ } else if (ctime > 60) { -+ ast_cli(fd, "%s%s for %d minutes, %d seconds.\n", status, status2, ctime / 60, ctime % 60); -+ } else { -+ ast_cli(fd, "%s%s for %d seconds.\n", status, status2, ctime); -+ } -+ if (records == totalrecords) -+ ast_cli(fd, " Wrote %d records since last restart.\n", totalrecords); -+ else -+ ast_cli(fd, " Wrote %d records since last restart and %d records since last reconnect.\n", totalrecords, records); -+ return RESULT_SUCCESS; -+ } else { -+ ast_cli(fd, "Not currently connected to a MySQL server.\n"); -+ return RESULT_FAILURE; -+ } -+} -+ -+static struct ast_cli_entry cdr_mysql_status_cli = -+ { { "cdr", "mysql", "status", NULL }, -+ handle_cdr_mysql_status, "Show connection status of cdr_mysql", -+ cdr_mysql_status_help, NULL }; -+ -+static int mysql_log(struct ast_cdr *cdr) -+{ -+ struct tm tm; -+ struct timeval tv; -+ struct localuser *u; -+ char *userfielddata = NULL; -+ char sqlcmd[2048], timestr[128]; -+ char *clid=NULL, *dcontext=NULL, *channel=NULL, *dstchannel=NULL, *lastapp=NULL, *lastdata=NULL; -+ int retries = 5; -+#ifdef MYSQL_LOGUNIQUEID -+ char *uniqueid = NULL; -+#endif -+ -+ ast_mutex_lock(&mysql_lock); -+ -+ memset(sqlcmd, 0, 2048); -+ -+ localtime_r(&cdr->start.tv_sec, &tm); -+ strftime(timestr, 128, DATE_FORMAT, &tm); -+ -+db_reconnect: -+ if ((!connected) && (hostname || dbsock) && dbuser && password && dbname && dbtable ) { -+ /* Attempt to connect */ -+ mysql_init(&mysql); -+ /* Add option to quickly timeout the connection */ -+ if (timeout && mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *)&timeout)!=0) { -+ ast_log(LOG_ERROR, "cdr_mysql: mysql_options returned (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql)); -+ } -+ if (mysql_real_connect(&mysql, hostname, dbuser, password, dbname, dbport, dbsock, 0)) { -+ connected = 1; -+ connect_time = time(NULL); -+ records = 0; -+ } else { -+ ast_log(LOG_ERROR, "cdr_mysql: cannot connect to database server %s.\n", hostname); -+ connected = 0; -+ } -+ } else { -+ /* Long connection - ping the server */ -+ int error; -+ if ((error = mysql_ping(&mysql))) { -+ connected = 0; -+ records = 0; -+ switch (error) { -+ case CR_SERVER_GONE_ERROR: -+ case CR_SERVER_LOST: -+ ast_log(LOG_ERROR, "cdr_mysql: Server has gone away. Attempting to reconnect.\n"); -+ break; -+ default: -+ ast_log(LOG_ERROR, "cdr_mysql: Unknown connection error: (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql)); -+ } -+ retries--; -+ if (retries) -+ goto db_reconnect; -+ else -+ ast_log(LOG_ERROR, "cdr_mysql: Retried to connect fives times, giving up.\n"); -+ } -+ } -+ -+ /* Maximum space needed would be if all characters needed to be escaped, plus a trailing NULL */ -+ /* WARNING: This code previously used mysql_real_escape_string, but the use of said function -+ requires an active connection to a database. If we are not connected, then this function -+ cannot be used. This is a problem since we need to store off the SQL statement into our -+ spool file for later restoration. -+ So the question is, what's the best way to handle this? This works for now. -+ */ -+ if ((clid = alloca(strlen(cdr->clid) * 2 + 1)) != NULL) -+ mysql_escape_string(clid, cdr->clid, strlen(cdr->clid)); -+ if ((dcontext = alloca(strlen(cdr->dcontext) * 2 + 1)) != NULL) -+ mysql_escape_string(dcontext, cdr->dcontext, strlen(cdr->dcontext)); -+ if ((channel = alloca(strlen(cdr->channel) * 2 + 1)) != NULL) -+ mysql_escape_string(channel, cdr->channel, strlen(cdr->channel)); -+ if ((dstchannel = alloca(strlen(cdr->dstchannel) * 2 + 1)) != NULL) -+ mysql_escape_string(dstchannel, cdr->dstchannel, strlen(cdr->dstchannel)); -+ if ((lastapp = alloca(strlen(cdr->lastapp) * 2 + 1)) != NULL) -+ mysql_escape_string(lastapp, cdr->lastapp, strlen(cdr->lastapp)); -+ if ((lastdata = alloca(strlen(cdr->lastdata) * 2 + 1)) != NULL) -+ mysql_escape_string(lastdata, cdr->lastdata, strlen(cdr->lastdata)); -+#ifdef MYSQL_LOGUNIQUEID -+ if ((uniqueid = alloca(strlen(cdr->uniqueid) * 2 + 1)) != NULL) -+ mysql_escape_string(uniqueid, cdr->uniqueid, strlen(cdr->uniqueid)); -+#endif -+ if (userfield && ((userfielddata = alloca(strlen(cdr->userfield) * 2 + 1)) != NULL)) -+ mysql_escape_string(userfielddata, cdr->userfield, strlen(cdr->userfield)); -+ -+ /* Check for all alloca failures above at once */ -+#ifdef MYSQL_LOGUNIQUEID -+ if ((!clid) || (!dcontext) || (!channel) || (!dstchannel) || (!lastapp) || (!lastdata) || (!uniqueid)) { -+#else -+ if ((!clid) || (!dcontext) || (!channel) || (!dstchannel) || (!lastapp) || (!lastdata)) { -+#endif -+ ast_log(LOG_ERROR, "cdr_mysql: Out of memory error (insert fails)\n"); -+ ast_mutex_unlock(&mysql_lock); -+ return -1; -+ } -+ -+ ast_log(LOG_DEBUG, "cdr_mysql: inserting a CDR record.\n"); -+ -+ if (userfield && userfielddata) { -+#ifdef MYSQL_LOGUNIQUEID -+ sprintf(sqlcmd, "INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s','%s','%s')", dbtable, timestr, clid, cdr->src, cdr->dst, dcontext, channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), cdr->amaflags, cdr->accountcode, uniqueid, userfielddata); -+#else -+ sprintf(sqlcmd, "INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,userfield) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s','%s')", dbtable, timestr, clid, cdr->src, cdr->dst, dcontext,channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), cdr->amaflags, cdr->accountcode, userfielddata); -+#endif -+ } else { -+#ifdef MYSQL_LOGUNIQUEID -+ sprintf(sqlcmd, "INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s','%s')", dbtable, timestr, clid, cdr->src, cdr->dst, dcontext,channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), cdr->amaflags, cdr->accountcode, uniqueid); -+#else -+ sprintf(sqlcmd, "INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s')", dbtable, timestr, clid, cdr->src, cdr->dst, dcontext, channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), cdr->amaflags, cdr->accountcode); -+#endif -+ } -+ -+ ast_log(LOG_DEBUG, "cdr_mysql: SQL command as follows: %s\n", sqlcmd); -+ -+ if (connected) { -+ if (mysql_real_query(&mysql, sqlcmd, strlen(sqlcmd))) { -+ ast_log(LOG_ERROR, "mysql_cdr: Failed to insert into database: (%d) %s", mysql_errno(&mysql), mysql_error(&mysql)); -+ connected = 0; -+ } else { -+ records++; -+ totalrecords++; -+ } -+ } -+ ast_mutex_unlock(&mysql_lock); -+ return 0; -+} -+ -+char *description(void) -+{ -+ return desc; -+} -+ -+static int my_unload_module(void) -+{ -+ ast_cli_unregister(&cdr_mysql_status_cli); -+ if (connected) { -+ mysql_close(&mysql); -+ connected = 0; -+ records = 0; -+ } -+ if (hostname && hostname_alloc) { -+ free(hostname); -+ hostname = NULL; -+ hostname_alloc = 0; -+ } -+ if (dbname && dbname_alloc) { -+ free(dbname); -+ dbname = NULL; -+ dbname_alloc = 0; -+ } -+ if (dbuser && dbuser_alloc) { -+ free(dbuser); -+ dbuser = NULL; -+ dbuser_alloc = 0; -+ } -+ if (dbsock && dbsock_alloc) { -+ free(dbsock); -+ dbsock = NULL; -+ dbsock_alloc = 0; -+ } -+ if (dbtable && dbtable_alloc) { -+ free(dbtable); -+ dbtable = NULL; -+ dbtable_alloc = 0; -+ } -+ if (password && password_alloc) { -+ free(password); -+ password = NULL; -+ password_alloc = 0; -+ } -+ dbport = 0; -+ ast_cdr_unregister(name); -+ return 0; -+} -+ -+static int my_load_module(void) -+{ -+ int res; -+ struct ast_config *cfg; -+ struct ast_variable *var; -+ char *tmp; -+ -+ cfg = ast_config_load(config); -+ if (!cfg) { -+ ast_log(LOG_WARNING, "Unable to load config for mysql CDR's: %s\n", config); -+ return 0; -+ } -+ -+ var = ast_variable_browse(cfg, "global"); -+ if (!var) { -+ /* nothing configured */ -+ return 0; -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "hostname"); -+ if (tmp) { -+ hostname = malloc(strlen(tmp) + 1); -+ if (hostname != NULL) { -+ hostname_alloc = 1; -+ strcpy(hostname, tmp); -+ } else { -+ ast_log(LOG_ERROR, "Out of memory error.\n"); -+ return -1; -+ } -+ } else { -+ ast_log(LOG_WARNING, "MySQL server hostname not specified. Assuming localhost\n"); -+ hostname = "localhost"; -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "dbname"); -+ if (tmp) { -+ dbname = malloc(strlen(tmp) + 1); -+ if (dbname != NULL) { -+ dbname_alloc = 1; -+ strcpy(dbname, tmp); -+ } else { -+ ast_log(LOG_ERROR, "Out of memory error.\n"); -+ return -1; -+ } -+ } else { -+ ast_log(LOG_WARNING, "MySQL database not specified. Assuming asteriskcdrdb\n"); -+ dbname = "asteriskcdrdb"; -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "user"); -+ if (tmp) { -+ dbuser = malloc(strlen(tmp) + 1); -+ if (dbuser != NULL) { -+ dbuser_alloc = 1; -+ strcpy(dbuser, tmp); -+ } else { -+ ast_log(LOG_ERROR, "Out of memory error.\n"); -+ return -1; -+ } -+ } else { -+ ast_log(LOG_WARNING, "MySQL database user not specified. Assuming root\n"); -+ dbuser = "root"; -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "sock"); -+ if (tmp) { -+ dbsock = malloc(strlen(tmp) + 1); -+ if (dbsock != NULL) { -+ dbsock_alloc = 1; -+ strcpy(dbsock, tmp); -+ } else { -+ ast_log(LOG_ERROR, "Out of memory error.\n"); -+ return -1; -+ } -+ } else { -+ ast_log(LOG_WARNING, "MySQL database sock file not specified. Using default\n"); -+ dbsock = NULL; -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "table"); -+ if (tmp) { -+ dbtable = malloc(strlen(tmp) + 1); -+ if (dbtable != NULL) { -+ dbtable_alloc = 1; -+ strcpy(dbtable, tmp); -+ } else { -+ ast_log(LOG_ERROR, "Out of memory error.\n"); -+ return -1; -+ } -+ } else { -+ ast_log(LOG_NOTICE, "MySQL database table not specified. Assuming \"cdr\"\n"); -+ dbtable = "cdr"; -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "password"); -+ if (tmp) { -+ password = malloc(strlen(tmp) + 1); -+ if (password != NULL) { -+ password_alloc = 1; -+ strcpy(password, tmp); -+ } else { -+ ast_log(LOG_ERROR, "Out of memory error.\n"); -+ return -1; -+ } -+ } else { -+ ast_log(LOG_WARNING, "MySQL database password not specified. Assuming blank\n"); -+ password = ""; -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "port"); -+ if (tmp) { -+ if (sscanf(tmp, "%d", &dbport) < 1) { -+ ast_log(LOG_WARNING, "Invalid MySQL port number. Using default\n"); -+ dbport = 0; -+ } -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "timeout"); -+ if (tmp) { -+ if (sscanf(tmp,"%d", &timeout) < 1) { -+ ast_log(LOG_WARNING, "Invalid MySQL timeout number. Using default\n"); -+ timeout = 0; -+ } -+ } -+ -+ tmp = ast_variable_retrieve(cfg, "global", "userfield"); -+ if (tmp) { -+ if (sscanf(tmp, "%d", &userfield) < 1) { -+ ast_log(LOG_WARNING, "Invalid MySQL configurtation file\n"); -+ userfield = 0; -+ } -+ } -+ -+ ast_config_destroy(cfg); -+ -+ ast_log(LOG_DEBUG, "cdr_mysql: got hostname of %s\n", hostname); -+ ast_log(LOG_DEBUG, "cdr_mysql: got port of %d\n", dbport); -+ ast_log(LOG_DEBUG, "cdr_mysql: got a timeout of %d\n", timeout); -+ if (dbsock) -+ ast_log(LOG_DEBUG, "cdr_mysql: got sock file of %s\n", dbsock); -+ ast_log(LOG_DEBUG, "cdr_mysql: got user of %s\n", dbuser); -+ ast_log(LOG_DEBUG, "cdr_mysql: got dbname of %s\n", dbname); -+ ast_log(LOG_DEBUG, "cdr_mysql: got password of %s\n", password); -+ -+ mysql_init(&mysql); -+ -+ if (timeout && mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *)&timeout)!=0) { -+ ast_log(LOG_ERROR, "cdr_mysql: mysql_options returned (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql)); -+ } -+ -+ if (!mysql_real_connect(&mysql, hostname, dbuser, password, dbname, dbport, dbsock, 0)) { -+ ast_log(LOG_ERROR, "Failed to connect to mysql database %s on %s.\n", dbname, hostname); -+ connected = 0; -+ records = 0; -+ } else { -+ ast_log(LOG_DEBUG, "Successfully connected to MySQL database.\n"); -+ connected = 1; -+ records = 0; -+ connect_time = time(NULL); -+ } -+ -+ res = ast_cdr_register(name, desc, mysql_log); -+ if (res) { -+ ast_log(LOG_ERROR, "Unable to register MySQL CDR handling\n"); -+ } else { -+ res = ast_cli_register(&cdr_mysql_status_cli); -+ } -+ -+ return res; -+} -+ -+int load_module(void) -+{ -+ return my_load_module(); -+} -+ -+int unload_module(void) -+{ -+ return my_unload_module(); -+} -+ -+int reload(void) -+{ -+ int ret; -+ -+ ast_mutex_lock(&mysql_lock); -+ my_unload_module(); -+ ret = my_load_module(); -+ ast_mutex_unlock(&mysql_lock); -+ -+ return ret; -+} -+ -+int usecount(void) -+{ -+ /* Simplistic use count */ -+ if (ast_mutex_trylock(&mysql_lock)) { -+ return 1; -+ } else { -+ ast_mutex_unlock(&mysql_lock); -+ return 0; -+ } -+} -+ -+char *key() -+{ -+ return ASTERISK_GPL_KEY; -+} diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-chan_bluetooth.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-chan_bluetooth.patch deleted file mode 100644 index 6b9da791522..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-chan_bluetooth.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ruN asterisk-1.2.0-old/channels/chan_bluetooth.c asterisk-1.2.0-new/channels/chan_bluetooth.c ---- asterisk-1.2.0-old/channels/chan_bluetooth.c 2005-12-04 04:48:40.000000000 +0100 -+++ asterisk-1.2.0-new/channels/chan_bluetooth.c 2005-12-04 23:07:19.000000000 +0100 -@@ -104,6 +104,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-compat-getloadavg.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-compat-getloadavg.patch deleted file mode 100644 index a909513b1c8..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-compat-getloadavg.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ruN asterisk-1.2.0-old/include/asterisk/compat.h asterisk-1.2.0-new/include/asterisk/compat.h ---- asterisk-1.2.0-old/include/asterisk/compat.h 2005-11-08 05:13:19.000000000 +0100 -+++ asterisk-1.2.0-new/include/asterisk/compat.h 2005-12-04 05:32:31.000000000 +0100 -@@ -75,7 +75,9 @@ - #define HAVE_STRTOQ - - #ifdef _BSD_SOURCE -+#ifndef __UCLIBC__ - #define HAVE_GETLOADAVG -+#endif /* __UCLIBC__ */ - #endif - - #ifdef __linux__ diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.0-res_mysql.patch b/openwrt/package/asterisk/patches/asterisk-1.2.0-res_mysql.patch deleted file mode 100644 index 5de8107410a..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.0-res_mysql.patch +++ /dev/null @@ -1,698 +0,0 @@ -diff -ruN asterisk-1.2.0-old/configs/res_mysql.conf.sample asterisk-1.2.0-new/configs/res_mysql.conf.sample ---- asterisk-1.2.0-old/configs/res_mysql.conf.sample 1970-01-01 01:00:00.000000000 +0100 -+++ asterisk-1.2.0-new/configs/res_mysql.conf.sample 2004-12-03 15:33:44.000000000 +0100 -@@ -0,0 +1,15 @@ -+; -+; Sample configuration for res_config_mysql.c -+; -+; The value of dbhost may be either a hostname or an IP address. -+; If dbhost is commented out or the string "localhost", a connection -+; to the local host is assumed and dbsock is used instead of TCP/IP -+; to connect to the server. -+; -+[general] -+;dbhost = 127.0.0.1 -+;dbname = asterisk -+;dbuser = myuser -+;dbpass = mypass -+;dbport = 3306 -+;dbsock = /tmp/mysql.sock -diff -ruN asterisk-1.2.0-old/res/res_config_mysql.c asterisk-1.2.0-new/res/res_config_mysql.c ---- asterisk-1.2.0-old/res/res_config_mysql.c 1970-01-01 01:00:00.000000000 +0100 -+++ asterisk-1.2.0-new/res/res_config_mysql.c 2005-10-13 21:43:54.000000000 +0200 -@@ -0,0 +1,675 @@ -+/* -+ * Asterisk -- A telephony toolkit for Linux. -+ * -+ * Copyright (C) 1999-2005, Digium, Inc. -+ * -+ * Mark Spencer - Asterisk Author -+ * Matthew Boehm - MySQL RealTime Driver Author -+ * -+ * res_config_mysql.c -+ * -+ * v2.0 - (10-07-05) - mutex_lock fixes (bug #4973, comment #0034602) -+ * -+ * v1.9 - (08-19-05) - Added support to correctly honor the family database specified -+ * in extconfig.conf (bug #4973) -+ * -+ * v1.8 - (04-21-05) - Modified return values of update_mysql to better indicate -+ * what really happened. -+ * -+ * v1.7 - (01-28-05) - Fixed non-initialization of ast_category struct -+ * in realtime_multi_mysql function which caused segfault. -+ * -+ * v1.6 - (00-00-00) - Skipped to bring comments into sync with version number in CVS. -+ * -+ * v1.5.1 - (01-26-05) - Added better(?) locking stuff -+ * -+ * v1.5 - (01-26-05) - Brought up to date with new config.h changes (bug #3406) -+ * - Added in extra locking provided by georg (bug #3248) -+ * -+ * v1.4 - (12-02-04) - Added realtime_multi_mysql function -+ * This function will return an ast_config with categories, -+ * unlike standard realtime_mysql which only returns -+ * a linked list of ast_variables -+ * -+ * v1.3 - (12-01-04) - Added support other operators -+ * Ex: =, !=, LIKE, NOT LIKE, RLIKE, etc... -+ * -+ * v1.2 - (11-DD-04) - Added reload. Updated load and unload. -+ * Code beautification (doc/CODING-GUIDELINES) -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static char *res_config_mysql_desc = "MySQL RealTime Configuration Driver"; -+ -+AST_MUTEX_DEFINE_STATIC(mysql_lock); -+#define RES_CONFIG_MYSQL_CONF "res_mysql.conf" -+MYSQL mysql; -+static char dbhost[50]; -+static char dbuser[50]; -+static char dbpass[50]; -+static char dbname[50]; -+static char dbsock[50]; -+static int dbport; -+static int connected; -+static time_t connect_time; -+ -+static int parse_config(void); -+static int mysql_reconnect(const char *database); -+static int realtime_mysql_status(int fd, int argc, char **argv); -+ -+STANDARD_LOCAL_USER; -+ -+LOCAL_USER_DECL; -+ -+static char cli_realtime_mysql_status_usage[] = -+"Usage: realtime mysql status\n" -+" Shows connection information for the MySQL RealTime driver\n"; -+ -+static struct ast_cli_entry cli_realtime_mysql_status = { -+ { "realtime", "mysql", "status", NULL }, realtime_mysql_status, -+ "Shows connection information for the MySQL RealTime driver", cli_realtime_mysql_status_usage, NULL }; -+ -+static struct ast_variable *realtime_mysql(const char *database, const char *table, va_list ap) -+{ -+ MYSQL_RES *result; -+ MYSQL_ROW row; -+ MYSQL_FIELD *fields; -+ int numFields, i; -+ char sql[256]; -+ char *stringp; -+ char *chunk; -+ char *op; -+ const char *newparam, *newval; -+ struct ast_variable *var=NULL, *prev=NULL; -+ -+ if(!table) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No table specified.\n"); -+ return NULL; -+ } -+ -+ /* Get the first parameter and first value in our list of passed paramater/value pairs */ -+ newparam = va_arg(ap, const char *); -+ newval = va_arg(ap, const char *); -+ if(!newparam || !newval) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n"); -+ mysql_close(&mysql); -+ return NULL; -+ } -+ -+ /* Create the first part of the query using the first parameter/value pairs we just extracted -+ If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */ -+ -+ if(!strchr(newparam, ' ')) op = " ="; else op = ""; -+ -+ snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE %s%s '%s'", table, newparam, op, newval); -+ while((newparam = va_arg(ap, const char *))) { -+ newval = va_arg(ap, const char *); -+ if(!strchr(newparam, ' ')) op = " ="; else op = ""; -+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " AND %s%s '%s'", newparam, op, newval); -+ } -+ va_end(ap); -+ -+ ast_log(LOG_DEBUG, "MySQL RealTime: Retrieve SQL: %s\n", sql); -+ -+ /* We now have our complete statement; Lets connect to the server and execute it. */ -+ ast_mutex_lock(&mysql_lock); -+ if(!mysql_reconnect(database)) { -+ ast_mutex_unlock(&mysql_lock); -+ return NULL; -+ } -+ -+ if(mysql_real_query(&mysql, sql, strlen(sql))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Failed to query database. Check debug for more info.\n"); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql)); -+ ast_mutex_unlock(&mysql_lock); -+ return NULL; -+ } -+ -+ if((result = mysql_store_result(&mysql))) { -+ numFields = mysql_num_fields(result); -+ fields = mysql_fetch_fields(result); -+ -+ while((row = mysql_fetch_row(result))) { -+ for(i = 0; i < numFields; i++) { -+ stringp = row[i]; -+ while(stringp) { -+ chunk = strsep(&stringp, ";"); -+ if(chunk && !ast_strlen_zero(ast_strip(chunk))) { -+ if(prev) { -+ prev->next = ast_variable_new(fields[i].name, chunk); -+ if (prev->next) { -+ prev = prev->next; -+ } -+ } else { -+ prev = var = ast_variable_new(fields[i].name, chunk); -+ } -+ } -+ } -+ } -+ } -+ } else { -+ ast_log(LOG_WARNING, "MySQL RealTime: Could not find any rows in table %s.\n", table); -+ } -+ -+ ast_mutex_unlock(&mysql_lock); -+ mysql_free_result(result); -+ -+ return var; -+} -+ -+static struct ast_config *realtime_multi_mysql(const char *database, const char *table, va_list ap) -+{ -+ MYSQL_RES *result; -+ MYSQL_ROW row; -+ MYSQL_FIELD *fields; -+ int numFields, i; -+ char sql[256]; -+ const char *initfield = NULL; -+ char *stringp; -+ char *chunk; -+ char *op; -+ const char *newparam, *newval; -+ struct ast_realloca ra; -+ struct ast_variable *var=NULL; -+ struct ast_config *cfg = NULL; -+ struct ast_category *cat = NULL; -+ -+ if(!table) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No table specified.\n"); -+ return NULL; -+ } -+ -+ memset(&ra, 0, sizeof(ra)); -+ -+ cfg = ast_config_new(); -+ if (!cfg) { -+ /* If I can't alloc memory at this point, why bother doing anything else? */ -+ ast_log(LOG_WARNING, "Out of memory!\n"); -+ return NULL; -+ } -+ -+ /* Get the first parameter and first value in our list of passed paramater/value pairs */ -+ newparam = va_arg(ap, const char *); -+ newval = va_arg(ap, const char *); -+ if(!newparam || !newval) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n"); -+ mysql_close(&mysql); -+ return NULL; -+ } -+ -+ initfield = ast_strdupa(newparam); -+ if(initfield && (op = strchr(initfield, ' '))) { -+ *op = '\0'; -+ } -+ -+ /* Create the first part of the query using the first parameter/value pairs we just extracted -+ If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */ -+ -+ if(!strchr(newparam, ' ')) op = " ="; else op = ""; -+ -+ snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE %s%s '%s'", table, newparam, op, newval); -+ while((newparam = va_arg(ap, const char *))) { -+ newval = va_arg(ap, const char *); -+ if(!strchr(newparam, ' ')) op = " ="; else op = ""; -+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " AND %s%s '%s'", newparam, op, newval); -+ } -+ -+ if(initfield) { -+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ORDER BY %s", initfield); -+ } -+ -+ va_end(ap); -+ -+ ast_log(LOG_DEBUG, "MySQL RealTime: Retrieve SQL: %s\n", sql); -+ -+ /* We now have our complete statement; Lets connect to the server and execute it. */ -+ ast_mutex_lock(&mysql_lock); -+ if(!mysql_reconnect(database)) { -+ ast_mutex_unlock(&mysql_lock); -+ return NULL; -+ } -+ -+ if(mysql_real_query(&mysql, sql, strlen(sql))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Failed to query database. Check debug for more info.\n"); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql)); -+ ast_mutex_unlock(&mysql_lock); -+ return NULL; -+ } -+ -+ if((result = mysql_store_result(&mysql))) { -+ numFields = mysql_num_fields(result); -+ fields = mysql_fetch_fields(result); -+ -+ while((row = mysql_fetch_row(result))) { -+ var = NULL; -+ cat = ast_category_new(""); -+ if(!cat) { -+ ast_log(LOG_WARNING, "Out of memory!\n"); -+ continue; -+ } -+ for(i = 0; i < numFields; i++) { -+ stringp = row[i]; -+ while(stringp) { -+ chunk = strsep(&stringp, ";"); -+ if(chunk && !ast_strlen_zero(ast_strip(chunk))) { -+ if(initfield && !strcmp(initfield, fields[i].name)) { -+ ast_category_rename(cat, chunk); -+ } -+ var = ast_variable_new(fields[i].name, chunk); -+ ast_variable_append(cat, var); -+ } -+ } -+ } -+ ast_category_append(cfg, cat); -+ } -+ } else { -+ ast_log(LOG_WARNING, "MySQL RealTime: Could not find any rows in table %s.\n", table); -+ } -+ -+ ast_mutex_unlock(&mysql_lock); -+ mysql_free_result(result); -+ -+ return cfg; -+} -+ -+static int update_mysql(const char *database, const char *table, const char *keyfield, const char *lookup, va_list ap) -+{ -+ my_ulonglong numrows; -+ char sql[256]; -+ const char *newparam, *newval; -+ -+ if(!table) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No table specified.\n"); -+ return -1; -+ } -+ -+ /* Get the first parameter and first value in our list of passed paramater/value pairs */ -+ newparam = va_arg(ap, const char *); -+ newval = va_arg(ap, const char *); -+ if(!newparam || !newval) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n"); -+ mysql_close(&mysql); -+ return -1; -+ } -+ -+ /* Create the first part of the query using the first parameter/value pairs we just extracted -+ If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */ -+ -+ snprintf(sql, sizeof(sql), "UPDATE %s SET %s = '%s'", table, newparam, newval); -+ while((newparam = va_arg(ap, const char *))) { -+ newval = va_arg(ap, const char *); -+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), ", %s = '%s'", newparam, newval); -+ } -+ va_end(ap); -+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " WHERE %s = '%s'", keyfield, lookup); -+ -+ ast_log(LOG_DEBUG,"MySQL RealTime: Update SQL: %s\n", sql); -+ -+ /* We now have our complete statement; Lets connect to the server and execute it. */ -+ ast_mutex_lock(&mysql_lock); -+ if(!mysql_reconnect(database)) { -+ ast_mutex_unlock(&mysql_lock); -+ return -1; -+ } -+ -+ if(mysql_real_query(&mysql, sql, strlen(sql))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Failed to query database. Check debug for more info.\n"); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql)); -+ ast_mutex_unlock(&mysql_lock); -+ return -1; -+ } -+ -+ numrows = mysql_affected_rows(&mysql); -+ ast_mutex_unlock(&mysql_lock); -+ -+ ast_log(LOG_DEBUG,"MySQL RealTime: Updated %llu rows on table: %s\n", numrows, table); -+ -+ /* From http://dev.mysql.com/doc/mysql/en/mysql-affected-rows.html -+ * An integer greater than zero indicates the number of rows affected -+ * Zero indicates that no records were updated -+ * -1 indicates that the query returned an error (although, if the query failed, it should have been caught above.) -+ */ -+ -+ if(numrows >= 0) -+ return (int)numrows; -+ -+ return -1; -+} -+ -+static struct ast_config *config_mysql(const char *database, const char *table, const char *file, struct ast_config *cfg) -+{ -+ MYSQL_RES *result; -+ MYSQL_ROW row; -+ my_ulonglong num_rows; -+ struct ast_config *new; -+ struct ast_variable *cur_v, *new_v; -+ struct ast_category *cur_cat, *new_cat; -+ char sql[250] = ""; -+ char last[80] = ""; -+ int cat_started = 0; -+ int var_started = 0; -+ int last_cat_metric = 0; -+ -+ last[0] = '\0'; -+ -+ if(!file || !strcmp(file, RES_CONFIG_MYSQL_CONF)) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Cannot configure myself.\n"); -+ return NULL; -+ } -+ -+ snprintf(sql, sizeof(sql), "SELECT category, var_name, var_val, cat_metric FROM %s WHERE filename='%s' and commented=0 ORDER BY filename, cat_metric desc, var_metric asc, category, var_name, var_val, id", table, file); -+ -+ ast_log(LOG_DEBUG, "MySQL RealTime: Static SQL: %s\n", sql); -+ -+ /* We now have our complete statement; Lets connect to the server and execute it. */ -+ ast_mutex_lock(&mysql_lock); -+ if(!mysql_reconnect(database)) { -+ ast_mutex_unlock(&mysql_lock); -+ return NULL; -+ } -+ -+ if(mysql_real_query(&mysql, sql, strlen(sql))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Failed to query database. Check debug for more info.\n"); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql)); -+ ast_mutex_unlock(&mysql_lock); -+ return NULL; -+ } -+ -+ if((result = mysql_store_result(&mysql))) { -+ num_rows = mysql_num_rows(result); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Found %llu rows.\n", num_rows); -+ -+ /* There might exist a better way to access the column names other than counting, -+ but I believe that would require another loop that we don't need. */ -+ -+ while((row = mysql_fetch_row(result))) { -+ if(!strcmp(row[1], "#include")) { -+ if (!ast_config_internal_load(row[2], cfg)) { -+ mysql_free_result(result); -+ ast_mutex_unlock(&mysql_lock); -+ return NULL; -+ } -+ continue; -+ } -+ -+ if(strcmp(last, row[0]) || last_cat_metric != atoi(row[3])) { -+ cur_cat = ast_category_new(row[0]); -+ if (!cur_cat) { -+ ast_log(LOG_WARNING, "Out of memory!\n"); -+ break; -+ } -+ strcpy(last, row[0]); -+ last_cat_metric = atoi(row[3]); -+ ast_category_append(cfg, cur_cat); -+ } -+ new_v = ast_variable_new(row[1], row[2]); -+ ast_variable_append(cur_cat, new_v); -+ } -+ } else { -+ ast_log(LOG_WARNING, "MySQL RealTime: Could not find config '%s' in database.\n", file); -+ } -+ -+ mysql_free_result(result); -+ ast_mutex_unlock(&mysql_lock); -+ -+ return cfg; -+} -+ -+static struct ast_config_engine mysql_engine = { -+ .name = "mysql", -+ .load_func = config_mysql, -+ .realtime_func = realtime_mysql, -+ .realtime_multi_func = realtime_multi_mysql, -+ .update_func = update_mysql -+}; -+ -+int load_module (void) -+{ -+ parse_config(); -+ -+ ast_mutex_lock(&mysql_lock); -+ -+ if(!mysql_reconnect(NULL)) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Couldn't establish connection. Check debug.\n"); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Cannot Connect: %s\n", mysql_error(&mysql)); -+ } -+ -+ ast_config_engine_register(&mysql_engine); -+ if(option_verbose) { -+ ast_verbose("MySQL RealTime driver loaded.\n"); -+ } -+ ast_cli_register(&cli_realtime_mysql_status); -+ -+ ast_mutex_unlock(&mysql_lock); -+ -+ return 0; -+} -+ -+int unload_module (void) -+{ -+ /* Aquire control before doing anything to the module itself. */ -+ ast_mutex_lock(&mysql_lock); -+ -+ mysql_close(&mysql); -+ ast_cli_unregister(&cli_realtime_mysql_status); -+ ast_config_engine_deregister(&mysql_engine); -+ if(option_verbose) { -+ ast_verbose("MySQL RealTime unloaded.\n"); -+ } -+ -+ STANDARD_HANGUP_LOCALUSERS; -+ -+ /* Unlock so something else can destroy the lock. */ -+ ast_mutex_unlock(&mysql_lock); -+ -+ return 0; -+} -+ -+int reload (void) -+{ -+ /* Aquire control before doing anything to the module itself. */ -+ ast_mutex_lock(&mysql_lock); -+ -+ mysql_close(&mysql); -+ connected = 0; -+ parse_config(); -+ -+ if(!mysql_reconnect(NULL)) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Couldn't establish connection. Check debug.\n"); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Cannot Connect: %s\n", mysql_error(&mysql)); -+ } -+ -+ ast_verbose(VERBOSE_PREFIX_2 "MySQL RealTime reloaded.\n"); -+ -+ /* Done reloading. Release lock so others can now use driver. */ -+ ast_mutex_unlock(&mysql_lock); -+ -+ return 0; -+} -+ -+int parse_config (void) -+{ -+ struct ast_config *config; -+ char *s; -+ -+ config = ast_config_load(RES_CONFIG_MYSQL_CONF); -+ -+ if(config) { -+ if(!(s=ast_variable_retrieve(config, "general", "dbuser"))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No database user found, using 'asterisk' as default.\n"); -+ strncpy(dbuser, "asterisk", sizeof(dbuser) - 1); -+ } else { -+ strncpy(dbuser, s, sizeof(dbuser) - 1); -+ } -+ -+ if(!(s=ast_variable_retrieve(config, "general", "dbpass"))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No database password found, using 'asterisk' as default.\n"); -+ strncpy(dbpass, "asterisk", sizeof(dbpass) - 1); -+ } else { -+ strncpy(dbpass, s, sizeof(dbpass) - 1); -+ } -+ -+ if(!(s=ast_variable_retrieve(config, "general", "dbhost"))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No database host found, using localhost via socket.\n"); -+ dbhost[0] = '\0'; -+ } else { -+ strncpy(dbhost, s, sizeof(dbhost) - 1); -+ } -+ -+ if(!(s=ast_variable_retrieve(config, "general", "dbname"))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No database name found, using 'asterisk' as default.\n"); -+ strncpy(dbname, "asterisk", sizeof(dbname) - 1); -+ } else { -+ strncpy(dbname, s, sizeof(dbname) - 1); -+ } -+ -+ if(!(s=ast_variable_retrieve(config, "general", "dbport"))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No database port found, using 3306 as default.\n"); -+ dbport = 3306; -+ } else { -+ dbport = atoi(s); -+ } -+ -+ if(dbhost && !(s=ast_variable_retrieve(config, "general", "dbsock"))) { -+ ast_log(LOG_WARNING, "MySQL RealTime: No database socket found, using '/tmp/mysql.sock' as default.\n"); -+ strncpy(dbsock, "/tmp/mysql.sock", sizeof(dbsock) - 1); -+ } else { -+ strncpy(dbsock, s, sizeof(dbsock) - 1); -+ } -+ } -+ ast_config_destroy(config); -+ -+ if(dbhost) { -+ ast_log(LOG_DEBUG, "MySQL RealTime Host: %s\n", dbhost); -+ ast_log(LOG_DEBUG, "MySQL RealTime Port: %i\n", dbport); -+ } else { -+ ast_log(LOG_DEBUG, "MySQL RealTime Socket: %s\n", dbsock); -+ } -+ ast_log(LOG_DEBUG, "MySQL RealTime User: %s\n", dbuser); -+ ast_log(LOG_DEBUG, "MySQL RealTime Password: %s\n", dbpass); -+ -+ return 1; -+} -+ -+char *description (void) -+{ -+ return res_config_mysql_desc; -+} -+ -+int usecount (void) -+{ -+ /* Try and get a lock. If unsuccessful, than that means another thread is using the mysql object. */ -+ if(ast_mutex_trylock(&mysql_lock)) { -+ ast_log(LOG_DEBUG, "MySQL RealTime: Module usage count is 1.\n"); -+ return 1; -+ } -+ ast_mutex_unlock(&mysql_lock); -+ return 0; -+} -+ -+char *key () -+{ -+ return ASTERISK_GPL_KEY; -+} -+ -+static int mysql_reconnect(const char *database) -+{ -+ char my_database[50]; -+ -+ if(!database || ast_strlen_zero(database)) -+ ast_copy_string(my_database, dbname, sizeof(my_database)); -+ else -+ ast_copy_string(my_database, database, sizeof(my_database)); -+ -+ /* mutex lock should have been locked before calling this function. */ -+ -+ if((!connected) && (dbhost || dbsock) && dbuser && dbpass && my_database) { -+ if(!mysql_init(&mysql)) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Insufficient memory to allocate MySQL resource.\n"); -+ connected = 0; -+ return 0; -+ } -+ if(mysql_real_connect(&mysql, dbhost, dbuser, dbpass, my_database, dbport, dbsock, 0)) { -+ ast_log(LOG_DEBUG, "MySQL RealTime: Successfully connected to database.\n"); -+ connected = 1; -+ connect_time = time(NULL); -+ return 1; -+ } else { -+ ast_log(LOG_ERROR, "MySQL RealTime: Failed to connect database server %s on %s. Check debug for more info.\n", dbname, dbhost); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Cannot Connect: %s\n", mysql_error(&mysql)); -+ connected = 0; -+ return 0; -+ } -+ } else { -+ if(mysql_ping(&mysql) != 0) { -+ connected = 0; -+ ast_log(LOG_ERROR, "MySQL RealTime: Failed to reconnect. Check debug for more info.\n"); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Server Error: %s\n", mysql_error(&mysql)); -+ return 0; -+ } -+ -+ connected = 1; -+ -+ if(mysql_select_db(&mysql, my_database) != 0) { -+ ast_log(LOG_WARNING, "MySQL RealTime: Unable to select database: %s. Still Connected.\n", my_database); -+ ast_log(LOG_DEBUG, "MySQL RealTime: Database Select Failed: %s\n", mysql_error(&mysql)); -+ return 0; -+ } -+ -+ ast_log(LOG_DEBUG, "MySQL RealTime: Everything is fine.\n"); -+ return 1; -+ } -+} -+ -+static int realtime_mysql_status(int fd, int argc, char **argv) -+{ -+ char status[256], status2[100] = ""; -+ int ctime = time(NULL) - connect_time; -+ -+ if(mysql_reconnect(NULL)) { -+ if(dbhost) { -+ snprintf(status, 255, "Connected to %s@%s, port %d", dbname, dbhost, dbport); -+ } else if(dbsock) { -+ snprintf(status, 255, "Connected to %s on socket file %s", dbname, dbsock); -+ } else { -+ snprintf(status, 255, "Connected to %s@%s", dbname, dbhost); -+ } -+ -+ if(dbuser && *dbuser) { -+ snprintf(status2, 99, " with username %s", dbuser); -+ } -+ -+ if (ctime > 31536000) { -+ ast_cli(fd, "%s%s for %d years, %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 31536000, (ctime % 31536000) / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60); -+ } else if (ctime > 86400) { -+ ast_cli(fd, "%s%s for %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60); -+ } else if (ctime > 3600) { -+ ast_cli(fd, "%s%s for %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 3600, (ctime % 3600) / 60, ctime % 60); -+ } else if (ctime > 60) { -+ ast_cli(fd, "%s%s for %d minutes, %d seconds.\n", status, status2, ctime / 60, ctime % 60); -+ } else { -+ ast_cli(fd, "%s%s for %d seconds.\n", status, status2, ctime); -+ } -+ -+ return RESULT_SUCCESS; -+ } else { -+ return RESULT_FAILURE; -+ } -+} diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.1-Makefile-codecs-ilbc.patch b/openwrt/package/asterisk/patches/asterisk-1.2.1-Makefile-codecs-ilbc.patch deleted file mode 100644 index 875f26fa047..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.1-Makefile-codecs-ilbc.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ruN asterisk-1.2.1-old/codecs/ilbc/Makefile asterisk-1.2.1-new/codecs/ilbc/Makefile ---- asterisk-1.2.1-old/codecs/ilbc/Makefile 2005-11-29 19:24:39.000000000 +0100 -+++ asterisk-1.2.1-new/codecs/ilbc/Makefile 2005-12-16 19:24:36.000000000 +0100 -@@ -1,5 +1,5 @@ - ARCH=$(PROC) --CFLAGS+=-Wall -O3 -funroll-loops -+CFLAGS+=-Wall $(OPTIMIZE) -funroll-loops - ifneq (${OSARCH},CYGWIN) - CFLAGS += -fPIC - endif -@@ -15,8 +15,8 @@ - - - $(LIB): $(OBJS) -- ar cr $(LIB) $(OBJS) -- ranlib $(LIB) -+ $(AR) cr $(LIB) $(OBJS) -+ $(RANLIB) $(LIB) - - clean: - rm -f $(LIB) *.o diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.1-Makefile-versionnum.patch b/openwrt/package/asterisk/patches/asterisk-1.2.1-Makefile-versionnum.patch deleted file mode 100644 index 23076420506..00000000000 --- a/openwrt/package/asterisk/patches/asterisk-1.2.1-Makefile-versionnum.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- asterisk-1.2.1/Makefile.orig 2005-12-09 10:22:06.000000000 +0100 -+++ asterisk-1.2.1/Makefile 2005-12-09 10:28:46.000000000 +0100 -@@ -322,8 +322,6 @@ - ifneq ($(wildcard .svn),) - ASTERISKVERSIONNUM=999999 - ASTERISKVERSION=SVN-$(shell build_tools/make_svn_branch_name) -- else -- ASTERISKVERSIONNUM=000000 - endif - endif - diff --git a/openwrt/package/atftp/Config.in b/openwrt/package/atftp/Config.in deleted file mode 100644 index 296faec8427..00000000000 --- a/openwrt/package/atftp/Config.in +++ /dev/null @@ -1,25 +0,0 @@ -#menu "atftp............................. TFTP implementation" - -config BR2_COMPILE_ATFTP - tristate - default n - depends BR2_PACKAGE_ATFTP || BR2_PACKAGE_ATFTPD - select BR2_PACKAGE_LIBREADLINE - -config BR2_PACKAGE_ATFTP - prompt "atftp............................. TFTP client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_ATFTP - help - TFTP client - -config BR2_PACKAGE_ATFTPD - prompt "atftpd............................ TFTP server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_ATFTP - help - TFTP server - -#endmenu diff --git a/openwrt/package/atftp/Makefile b/openwrt/package/atftp/Makefile deleted file mode 100644 index f49aab67019..00000000000 --- a/openwrt/package/atftp/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=atftp -PKG_VERSION:=0.7 -PKG_RELEASE:=1 -PKG_MD5SUM:=3b27365772d918050b2251d98a9c7c82 - -PKG_SOURCE_URL:=ftp://ftp.mamalinux.com/pub/atftp/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ATFTP,atftp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ATFTPD,atftpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -Wall -D_REENTRANT" \ - DESTDIR=$(PKG_INSTALL_DIR) \ - all install - touch $@ - -$(IPKG_ATFTP): - install -d -m0755 $(IDIR_ATFTP)/usr/bin - $(CP) $(PKG_BUILD_DIR)/atftp $(IDIR_ATFTP)/usr/bin - $(RSTRIP) $(IDIR_ATFTP) - $(IPKG_BUILD) $(IDIR_ATFTP) $(PACKAGE_DIR) - -$(IPKG_ATFTPD): - install -d -m0755 $(IDIR_ATFTPD)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/atftpd $(IDIR_ATFTPD)/usr/sbin - $(RSTRIP) $(IDIR_ATFTPD) - $(IPKG_BUILD) $(IDIR_ATFTPD) $(PACKAGE_DIR) diff --git a/openwrt/package/atftp/ipkg/atftp.control b/openwrt/package/atftp/ipkg/atftp.control deleted file mode 100644 index 83b1858c476..00000000000 --- a/openwrt/package/atftp/ipkg/atftp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: atftp -Priority: optional -Section: net -Description: tftp client -Depends: libreadline, libncurses diff --git a/openwrt/package/atftp/ipkg/atftpd.control b/openwrt/package/atftp/ipkg/atftpd.control deleted file mode 100644 index 94f49f3f7c0..00000000000 --- a/openwrt/package/atftp/ipkg/atftpd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: atftpd -Priority: optional -Section: net -Description: tftp server -Depends: libreadline, libpcre diff --git a/openwrt/package/atftp/ipkg/files/postinst b/openwrt/package/atftp/ipkg/files/postinst deleted file mode 100755 index a29644996e3..00000000000 --- a/openwrt/package/atftp/ipkg/files/postinst +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -grep -q '^tftp[[:space:]]*69/tcp' ${IPKG_INSTROOT}/etc/services 2>/dev/null -if [ $? -ne 0 ]; then - echo "tftp 69/tcp" >>${IPKG_INSTROOT}/etc/services - echo "tftp 69/udp" >>${IPKG_INSTROOT}/etc/services - echo "tftp-mcast 1758/tcp" >>${IPKG_INSTROOT}/etc/services - echo "tftp-mcast 1758/udp" >>${IPKG_INSTROOT}/etc/services -fi diff --git a/openwrt/package/atftp/patches/100-mconfig.patch b/openwrt/package/atftp/patches/100-mconfig.patch deleted file mode 100644 index 552204ee230..00000000000 --- a/openwrt/package/atftp/patches/100-mconfig.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Nur netkit-tftp-0.17/MCONFIG netkit-tftp-0.17.patched/MCONFIG ---- netkit-tftp-0.17/MCONFIG 1970-01-01 01:00:00.000000000 +0100 -+++ netkit-tftp-0.17.patched/MCONFIG 2005-06-19 21:16:52.422687029 +0200 -@@ -0,0 +1,16 @@ -+# Generated by configure (confgen version 2) on Sun Jun 19 21:13:24 CEST 2005 -+# -+ -+BINDIR=/usr/bin -+SBINDIR=/usr/sbin -+MANDIR=/usr/man -+BINMODE=755 -+DAEMONMODE=755 -+MANMODE=644 -+PREFIX=/usr -+EXECPREFIX=/usr -+INSTALLROOT= -+CC= -+CFLAGS= -+LDFLAGS= -+LIBS= diff --git a/openwrt/package/atftp/patches/110-services.patch b/openwrt/package/atftp/patches/110-services.patch deleted file mode 100644 index 0a5972fcf45..00000000000 --- a/openwrt/package/atftp/patches/110-services.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff -urN atftp.old/tftp.c atftp.dev/tftp.c ---- atftp.old/tftp.c 2004-03-16 00:55:56.000000000 +0100 -+++ atftp.dev/tftp.c 2006-03-22 10:18:54.000000000 +0100 -@@ -409,7 +409,7 @@ - int set_peer(int argc, char **argv) - { - struct hostent *host; /* for host name lookup */ -- struct servent *sp; /* server entry for tftp service */ -+ int port = htons(69); - - /* sanity check */ - if ((argc < 2) || (argc > 3)) -@@ -418,13 +418,6 @@ - return ERR; - } - -- /* get the server entry */ -- sp = getservbyname("tftp", "udp"); -- if (sp == 0) { -- fprintf(stderr, "tftp: udp/tftp, unknown service.\n"); -- return ERR; -- } -- - /* look up the host */ - host = gethostbyname(argv[1]); - /* if valid, update s_inn structure */ -@@ -437,7 +430,7 @@ - Strncpy(data.hostname, host->h_name, - sizeof(data.hostname)); - data.hostname[sizeof(data.hostname)-1] = 0; -- data.sa_peer.sin_port = sp->s_port; -+ data.sa_peer.sin_port = port; - } - else - { -@@ -448,17 +441,17 @@ - /* get the server port */ - if (argc == 3) - { -- sp->s_port = htons(atoi(argv[2])); -- if (sp->s_port < 0) -+ port = htons(atoi(argv[2])); -+ if (port < 0) - { - fprintf(stderr, "%s: bad port number.\n", argv[2]); - data.connected = 0; - return ERR; - } -- data.sa_peer.sin_port = sp->s_port; -+ data.sa_peer.sin_port = port; - } - /* copy port number to data structure */ -- data.port = ntohs(sp->s_port); -+ data.port = ntohs(port); - - data.connected = 1; - return OK; -diff -urN atftp.old/tftpd.c atftp.dev/tftpd.c ---- atftp.old/tftpd.c 2004-02-27 03:05:26.000000000 +0100 -+++ atftp.dev/tftpd.c 2006-03-22 10:23:20.000000000 +0100 -@@ -230,14 +230,8 @@ - - /* find the port */ - if (tftpd_port == 0) -- { -- if ((serv = getservbyname("tftp", "udp")) == NULL) -- { -- logger(LOG_ERR, "atftpd: udp/tftp, unknown service"); -- exit(1); -- } -- tftpd_port = ntohs(serv->s_port); -- } -+ tftpd_port = htons(69); -+ - /* initialise sockaddr_in structure */ - memset(&sa, 0, sizeof(sa)); - sa.sin_family = AF_INET; diff --git a/openwrt/package/atftp/patches/120-retry_setting.patch b/openwrt/package/atftp/patches/120-retry_setting.patch deleted file mode 100644 index b77ed30d23e..00000000000 --- a/openwrt/package/atftp/patches/120-retry_setting.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff -urN atftp.old/tftp.c atftp.dev/tftp.c ---- atftp.old/tftp.c 2006-03-25 16:41:49.000000000 +0100 -+++ atftp.dev/tftp.c 2006-03-25 18:10:04.000000000 +0100 -@@ -967,6 +967,7 @@ - { "tftp-timeout", 1, NULL, 'T'}, - { "mode", 1, NULL, 'M'}, - { "option", 1, NULL, 'O'}, -+ { "retry", 1, NULL, 'R'}, - #if 1 - { "timeout", 1, NULL, 't'}, - { "blksize", 1, NULL, 'b'}, -@@ -986,11 +987,16 @@ - }; - - /* Support old argument until 0.8 */ -- while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:sm", -+ while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:smR:", - options, &option_index)) != EOF) - { - switch (c) - { -+ case 'R': -+ snprintf(string, sizeof(string), "option retry %s", optarg); -+ make_arg(string, &ac, &av); -+ process_cmd(ac, av); -+ break; - case 'g': - interactive = 0; - if ((action == PUT) || (action == MGET)) -diff -urN atftp.old/tftp_def.c atftp.dev/tftp_def.c ---- atftp.old/tftp_def.c 2004-02-13 04:16:09.000000000 +0100 -+++ atftp.dev/tftp_def.c 2006-03-25 18:10:04.000000000 +0100 -@@ -37,6 +37,7 @@ - { "timeout", "5", 0, 1 }, /* 2348, 2349, 2090. */ - { "blksize", "512", 0, 1 }, /* This is the default option */ - { "multicast", "", 0, 1 }, /* structure */ -+ { "retry", "5", 0, 1 }, - { "", "", 0, 0} - }; - -diff -urN atftp.old/tftp_def.h atftp.dev/tftp_def.h ---- atftp.old/tftp_def.h 2004-02-13 04:16:09.000000000 +0100 -+++ atftp.dev/tftp_def.h 2006-03-25 17:19:15.000000000 +0100 -@@ -40,7 +40,8 @@ - #define OPT_TIMEOUT 3 - #define OPT_BLKSIZE 4 - #define OPT_MULTICAST 5 --#define OPT_NUMBER 7 -+#define OPT_RETRY 6 -+#define OPT_NUMBER 8 - - #define OPT_SIZE 12 - #define VAL_SIZE MAXLEN -diff -urN atftp.old/tftp_file.c atftp.dev/tftp_file.c ---- atftp.old/tftp_file.c 2004-02-13 04:16:09.000000000 +0100 -+++ atftp.dev/tftp_file.c 2006-03-25 18:10:04.000000000 +0100 -@@ -123,6 +123,7 @@ - struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer; - FILE *fp = NULL; /* the local file pointer */ - int number_of_timeout = 0; -+ int num_retry = atoi(data->tftp_options[OPT_RETRY].value); - int convert = 0; /* if true, do netascii convertion */ - - int oacks = 0; /* count OACK for improved error checking */ -@@ -141,7 +142,7 @@ - - int prev_block_number = 0; /* needed to support netascii convertion */ - int temp = 0; -- -+ - data->file_size = 0; - tftp_cancel = 0; - from.sin_addr.s_addr = 0; -@@ -288,7 +289,7 @@ - case GET_TIMEOUT: - number_of_timeout++; - fprintf(stderr, "timeout: retrying...\n"); -- if (number_of_timeout > NB_OF_RETRY) -+ if ((num_retry > 0) && (number_of_timeout > num_retry)) - state = S_ABORT; - else - state = timeout_state; -@@ -325,7 +326,7 @@ - number_of_timeout++; - fprintf(stderr, "tftp: packet discard <%s:%d>.\n", - inet_ntoa(from.sin_addr), ntohs(from.sin_port)); -- if (number_of_timeout > NB_OF_RETRY) -+ if ((num_retry > 0) && (number_of_timeout > num_retry)) - state = S_ABORT; - break; - case ERR: -@@ -614,6 +615,7 @@ - struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer; - FILE *fp; /* the local file pointer */ - int number_of_timeout = 0; -+ int num_retry = atoi(data->tftp_options[OPT_RETRY].value); - struct stat file_stat; - int convert = 0; /* if true, do netascii convertion */ - char string[MAXLEN]; -@@ -751,7 +753,7 @@ - case GET_TIMEOUT: - number_of_timeout++; - fprintf(stderr, "timeout: retrying...\n"); -- if (number_of_timeout > NB_OF_RETRY) -+ if ((num_retry > 0) && (number_of_timeout > num_retry)) - state = S_ABORT; - else - state = timeout_state; -@@ -797,7 +799,7 @@ - number_of_timeout++; - fprintf(stderr, "tftp: packet discard <%s:%d>.\n", - inet_ntoa(from.sin_addr), ntohs(from.sin_port)); -- if (number_of_timeout > NB_OF_RETRY) -+ if ((num_retry > 0) && (number_of_timeout > num_retry)) - state = S_ABORT; - break; - case ERR: diff --git a/openwrt/package/autossh/Config.in b/openwrt/package/autossh/Config.in deleted file mode 100644 index 492547f5253..00000000000 --- a/openwrt/package/autossh/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_AUTOSSH - prompt "autossh........................... Auto handle ssh tunnels" - tristate - default m if CONFIG_DEVEL - help - autossh is a program to start a copy of ssh and monitor it, - restarting it as necessary should it die or stop passing traffic. - - http://www.harding.motd.ca/autossh/ diff --git a/openwrt/package/autossh/Makefile b/openwrt/package/autossh/Makefile deleted file mode 100644 index 2d6e539017b..00000000000 --- a/openwrt/package/autossh/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# $Id$ -# -# Adjust SSH below to suit. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=autossh -PKG_VERSION:=1.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=0e7ec62eeca5d1b197f3ef2d0f0d417f -PKG_SOURCE_URL:=http://www.harding.motd.ca/autossh -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -VER=1.3 -SSH=/usr/bin/ssh - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,AUTOSSH,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - cp $(PKG_BUILD_DIR)/Makefile.linux $(PKG_BUILD_DIR)/Makefile - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -Wall -D\"SSH_PATH=\\\"$(SSH)\\\"\" -D\"VER=\\\"$(PKG_VERSION)\\\"\"" \ - BINDIR=/usr/bin MANDIR=/usr/man - touch $@ - -$(IPKG_AUTOSSH): - mkdir -p $(IDIR_AUTOSSH)/usr/bin - cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_AUTOSSH)/usr/bin/ - $(RSTRIP) $(IDIR_AUTOSSH) - $(IPKG_BUILD) $(IDIR_AUTOSSH) $(PACKAGE_DIR) diff --git a/openwrt/package/autossh/ipkg/autossh.control b/openwrt/package/autossh/ipkg/autossh.control deleted file mode 100644 index 2916e3851e7..00000000000 --- a/openwrt/package/autossh/ipkg/autossh.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: autossh -Priority: optional -Section: net -Depends: openssh-client -Description: Autossh client diff --git a/openwrt/package/avahi/Config.in b/openwrt/package/avahi/Config.in deleted file mode 100644 index 69461a58ea7..00000000000 --- a/openwrt/package/avahi/Config.in +++ /dev/null @@ -1,64 +0,0 @@ -menu "avahi............................. An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation" - -config BR2_COMPILE_AVAHI - tristate - default n - depends BR2_PACKAGE_AVAHI_DAEMON || BR2_PACKAGE_AVAHI_DNSCONFD || BR2_PACKAGE_LIBAVAHI - -config BR2_PACKAGE_AVAHI_DAEMON - prompt "avahi-daemon.................... An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (daemon)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_AVAHI - select BR2_PACKAGE_LIBAVAHI - select BR2_PACKAGE_LIBDAEMON - help - Avahi is a system which facilitates service discovery on a local network -- - this means that you can plug your laptop or computer into a network and - instantly be able to view other people who you can chat with, find printers - to print to or find files being shared. This kind of technology is already - found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') - and is very convenient. - - http://www.freedesktop.org/Software/Avahi - - This package contains an mDNS/DNS-SD daemon. - -config BR2_PACKAGE_AVAHI_DNSCONFD - prompt "avahi-dnsconfd................ An Unicast DNS server from mDNS/DNS-SD configuration daemon" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_AVAHI - depends BR2_PACKAGE_AVAHI_DAEMON - help - Avahi is a system which facilitates service discovery on a local network -- - this means that you can plug your laptop or computer into a network and - instantly be able to view other people who you can chat with, find printers - to print to or find files being shared. This kind of technology is already - found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') - and is very convenient. - - http://www.freedesktop.org/Software/Avahi - - This package contains an Unicast DNS server from mDNS/DNS-SD configuration - daemon, which may be used to configure conventional DNS servers using mDNS - in a DHCP-like fashion. Especially useful on IPv6. - -config BR2_PACKAGE_LIBAVAHI - prompt "libavahi........................ An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_AVAHI - help - Avahi is a system which facilitates service discovery on a local network -- - this means that you can plug your laptop or computer into a network and - instantly be able to view other people who you can chat with, find printers - to print to or find files being shared. This kind of technology is already - found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') - and is very convenient. - - http://www.freedesktop.org/Software/Avahi - - This package contains the mDNS/DNS-SD shared libraries, used by other programs. - -endmenu diff --git a/openwrt/package/avahi/Makefile b/openwrt/package/avahi/Makefile deleted file mode 100644 index 16fb2038519..00000000000 --- a/openwrt/package/avahi/Makefile +++ /dev/null @@ -1,154 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=avahi -PKG_VERSION:=0.6.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=330613902c59bd597f140a8254e9f4ec - -PKG_SOURCE_URL:=http://www.freedesktop.org/~lennart/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,AVAHI_DAEMON,avahi-daemon,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,AVAHI_DNSCONFD,avahi-dnsconfd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIBAVAHI,libavahi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -DNDEBUG" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ac_cv_func_malloc_0_nonnull=yes \ - ac_cv_func_realloc_0_nonnull=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --disable-glib \ - --disable-qt3 \ - --disable-qt4 \ - --disable-gtk \ - --disable-dbus \ - --enable-expat \ - --enable-libdaemon \ - --disable-python \ - --disable-pygtk \ - --disable-python-dbus \ - --disable-mono \ - --disable-monodoc \ - --disable-doxygen-doc \ - --disable-doxygen-dot \ - --disable-doxygen-man \ - --disable-doxygen-rtf \ - --disable-doxygen-xml \ - --disable-doxygen-chm \ - --disable-doxygen-chi \ - --disable-doxygen-html \ - --disable-doxygen-ps \ - --disable-doxygen-pdf \ - --disable-xmltoman \ - --with-distro=none \ - --with-avahi-user=nobody \ - --with-avahi-group=nogroup \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_AVAHI_DAEMON): - install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/avahi - install -m0644 ./files/avahi-daemon.conf $(IDIR_AVAHI_DAEMON)/etc/avahi/ - install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/avahi/services - install -m0644 ./files/service-http $(IDIR_AVAHI_DAEMON)/etc/avahi/services/http.service - install -m0644 ./files/service-ssh $(IDIR_AVAHI_DAEMON)/etc/avahi/services/ssh.service - install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/init.d - install -m0755 ./files/avahi-daemon.init $(IDIR_AVAHI_DAEMON)/etc/init.d/avahi-daemon - install -d -m0755 $(IDIR_AVAHI_DAEMON)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(IDIR_AVAHI_DAEMON)/usr/sbin/ - $(RSTRIP) $(IDIR_AVAHI_DAEMON) - $(IPKG_BUILD) $(IDIR_AVAHI_DAEMON) $(PACKAGE_DIR) - -$(IPKG_AVAHI_DNSCONFD): - install -d -m0755 $(IDIR_AVAHI_DNSCONFD)/etc/avahi - $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(IDIR_AVAHI_DNSCONFD)/etc/avahi/ - install -d -m0755 $(IDIR_AVAHI_DNSCONFD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(IDIR_AVAHI_DNSCONFD)/usr/sbin/ - $(RSTRIP) $(IDIR_AVAHI_DNSCONFD) - $(IPKG_BUILD) $(IDIR_AVAHI_DNSCONFD) $(PACKAGE_DIR) - -$(IPKG_LIBAVAHI): - install -d -m0755 $(IDIR_LIBAVAHI)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so.* $(IDIR_LIBAVAHI)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so.* $(IDIR_LIBAVAHI)/usr/lib/ - $(RSTRIP) $(IDIR_LIBAVAHI) - $(IPKG_BUILD) $(IDIR_LIBAVAHI) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/avahi.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-common $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-core $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so* $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so* $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/avahi.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/avahi-common \ - $(STAGING_DIR)/usr/include/avahi-core \ - $(STAGING_DIR)/usr/lib/libavahi-common.a \ - $(STAGING_DIR)/usr/lib/libavahi-common.so* \ - $(STAGING_DIR)/usr/lib/libavahi-core.a \ - $(STAGING_DIR)/usr/lib/libavahi-core.so* \ - $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/avahi/files/avahi-daemon.conf b/openwrt/package/avahi/files/avahi-daemon.conf deleted file mode 100644 index a5ff8861954..00000000000 --- a/openwrt/package/avahi/files/avahi-daemon.conf +++ /dev/null @@ -1,29 +0,0 @@ -[server] -#host-name=foo -#domain-name=local -use-ipv4=yes -use-ipv6=no -check-response-ttl=no -use-iff-running=no -enable-dbus=no - -[publish] -publish-addresses=yes -publish-hinfo=yes -publish-workstation=no -publish-domain=yes -#publish-dns-servers=192.168.1.1 -#publish-resolv-conf-dns-servers=yes - -[reflector] -enable-reflector=no -reflect-ipv=no - -[rlimits] -#rlimit-as= -rlimit-core=0 -rlimit-data=4194304 -rlimit-fsize=0 -rlimit-nofile=30 -rlimit-stack=4194304 -rlimit-nproc=1 diff --git a/openwrt/package/avahi/files/avahi-daemon.init b/openwrt/package/avahi/files/avahi-daemon.init deleted file mode 100644 index 20f0a2e0648..00000000000 --- a/openwrt/package/avahi/files/avahi-daemon.init +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -BIN=avahi-daemon -DEFAULT=/etc/default/$BIN -OPTIONS="-D" -RUN_D=/var/run/$BIN -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - $BIN -k - ;; - reload) - $BIN -r - ;; - *) - echo "usage: $0 (start|stop|reload)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/avahi/files/service-http b/openwrt/package/avahi/files/service-http deleted file mode 100644 index 8e0d3a5136b..00000000000 --- a/openwrt/package/avahi/files/service-http +++ /dev/null @@ -1,10 +0,0 @@ - - - - Web Server on %h - - _http._tcp - 80 - path=/index.html - - diff --git a/openwrt/package/avahi/files/service-ssh b/openwrt/package/avahi/files/service-ssh deleted file mode 100644 index b415803784d..00000000000 --- a/openwrt/package/avahi/files/service-ssh +++ /dev/null @@ -1,9 +0,0 @@ - - - - Secure Shell on %h - - _ssh._tcp - 22 - - diff --git a/openwrt/package/avahi/ipkg/avahi-daemon.conffiles b/openwrt/package/avahi/ipkg/avahi-daemon.conffiles deleted file mode 100644 index 46379ed96f4..00000000000 --- a/openwrt/package/avahi/ipkg/avahi-daemon.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/avahi/avahi-daemon.conf -/etc/avahi/services/http.service -/etc/avahi/services/ssh.service diff --git a/openwrt/package/avahi/ipkg/avahi-daemon.control b/openwrt/package/avahi/ipkg/avahi-daemon.control deleted file mode 100644 index f68a690fe66..00000000000 --- a/openwrt/package/avahi/ipkg/avahi-daemon.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: avahi-daemon -Priority: optional -Section: net -Depends: libavahi, libdaemon, libexpat -Description: an mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (daemon) diff --git a/openwrt/package/avahi/ipkg/avahi-dnsconfd.control b/openwrt/package/avahi/ipkg/avahi-dnsconfd.control deleted file mode 100644 index 1213a0e7bbf..00000000000 --- a/openwrt/package/avahi/ipkg/avahi-dnsconfd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: avahi-dnsconfd -Priority: optional -Section: net -Depends: libavahi, libdaemon, avahi-daemon -Description: an Unicast DNS server from mDNS/DNS-SD configuration daemon diff --git a/openwrt/package/avahi/ipkg/libavahi.control b/openwrt/package/avahi/ipkg/libavahi.control deleted file mode 100644 index 4912296bc76..00000000000 --- a/openwrt/package/avahi/ipkg/libavahi.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libavahi -Priority: optional -Section: libs -Description: an DNS-SD over mDNS (aka RendezVous/Bonjour/ZeroConf) implementation (library) diff --git a/openwrt/package/bc/Config.in b/openwrt/package/bc/Config.in deleted file mode 100644 index bee06cdd309..00000000000 --- a/openwrt/package/bc/Config.in +++ /dev/null @@ -1,22 +0,0 @@ -config BR2_COMPILE_BC - tristate - depends BR2_PACKAGE_BC || BR2_PACKAGE_DC - default n - -config BR2_PACKAGE_BC - prompt "bc................................ Arbitrary precision calculator language" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BC - help - bc is a language that supports arbitrary precision numbers with - interactive execution of statements. - -config BR2_PACKAGE_DC - prompt "dc................................ Arbitrary precision calculator" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BC - help - dc is a reverse-polish desk calculator which supports unlimited - precision arithmetic. diff --git a/openwrt/package/bc/Makefile b/openwrt/package/bc/Makefile deleted file mode 100644 index ed7e54faea8..00000000000 --- a/openwrt/package/bc/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bc -PKG_VERSION:=1.06 -PKG_RELEASE:=1 -PKG_MD5SUM:=d44b5dddebd8a7a7309aea6c36fda117 - -PKG_SOURCE_URL:=http://ftp.gnu.org/pub/gnu/bc -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,BC,bc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,DC,dc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) - touch $@ - -$(IPKG_BC): - mkdir -p $(IDIR_BC)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/bc/bc $(IDIR_BC)/usr/bin/bc - $(STRIP) $(IDIR_BC)/usr/bin/* - $(IPKG_BUILD) $(IDIR_BC) $(PACKAGE_DIR) - -$(IPKG_DC): - mkdir -p $(IDIR_DC)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/dc/dc $(IDIR_DC)/usr/bin/dc - $(STRIP) $(IDIR_DC)/usr/bin/* - $(IPKG_BUILD) $(IDIR_DC) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/bc/ipkg/bc.control b/openwrt/package/bc/ipkg/bc.control deleted file mode 100644 index e22ed5b7cbc..00000000000 --- a/openwrt/package/bc/ipkg/bc.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: bc -Priority: optional -Section: util -Description: An arbitrary precision calculator language diff --git a/openwrt/package/bc/ipkg/dc.control b/openwrt/package/bc/ipkg/dc.control deleted file mode 100644 index 1ef85250046..00000000000 --- a/openwrt/package/bc/ipkg/dc.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: dc -Priority: optional -Section: util -Description: An arbitrary precision calculator diff --git a/openwrt/package/bind/Config.in b/openwrt/package/bind/Config.in deleted file mode 100644 index 34a33c45038..00000000000 --- a/openwrt/package/bind/Config.in +++ /dev/null @@ -1,113 +0,0 @@ -menu "bind.............................. A DNS server implementation" - -config BR2_COMPILE_BIND - tristate - default n - depends BR2_PACKAGE_BIND_CLIENT || BR2_PACKAGE_BIND_SERVER || BR2_PACKAGE_BIND_TOOLS || BR2_PACKAGE_BIND_RNDC || BR2_PACKAGE_BIND_CHECK || BR2_PACKAGE_BIND_DNSSEC || BR2_PACKAGE_BIND_HOST || BR2_PACKAGE_BIND_DIG - -config BR2_PACKAGE_BIND_TOOLS - prompt "bind-tools........................ Bind administration tools" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BIND - select BR2_PACKAGE_LIBOPENSSL - help - dig, host, nsupdate, dnssec-keygen, dnssec-signzone, named-checkconf, named-checkzone, rndc, rndc-confgen - - http://www.isc.org/sw/bind/ - - Depends: openssl - -config BR2_PACKAGE_BIND_RNDC - prompt "bind-rndc......................... Bind administration tools (rndc & rndc-confgen only)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BIND - select BR2_PACKAGE_LIBOPENSSL - help - rndc, rndc-confgen - - http://www.isc.org/sw/bind/ - - Depends: openssl - -config BR2_PACKAGE_BIND_CHECK - prompt "bind-check........................ Bind administration tools (named-checkconf & named-checkzone only)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BIND - select BR2_PACKAGE_LIBOPENSSL - help - named-checkconf, named-checkzone - - http://www.isc.org/sw/bind/ - - Depends: openssl - -config BR2_PACKAGE_BIND_DNSSEC - prompt "bind-dnssec....................... Bind administration tools (dnssec-keygen & dnssec-signzone only)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BIND - select BR2_PACKAGE_LIBOPENSSL - help - dnssec-keygen, dnssec-signzone - - http://www.isc.org/sw/bind/ - - Depends: openssl - -config BR2_PACKAGE_BIND_HOST - prompt "bind-host......................... A simple DNS client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BIND - select BR2_PACKAGE_LIBOPENSSL - help - host - - http://www.isc.org/sw/bind/ - - Depends: openssl - -config BR2_PACKAGE_BIND_DIG - prompt "bind-dig.......................... A DNS client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BIND - select BR2_PACKAGE_LIBOPENSSL - help - dig - - http://www.isc.org/sw/bind/ - - Depends: openssl - - -config BR2_PACKAGE_BIND_CLIENT - prompt "bind-client....................... A dynamic DNS client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BIND - select BR2_PACKAGE_LIBOPENSSL - help - A DNS dynamic client (nsupdate) - - http://www.isc.org/sw/bind/ - - Depends: openssl - -config BR2_PACKAGE_BIND_SERVER - prompt "bind-server....................... A DNS server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_BIND - select BR2_PACKAGE_LIBOPENSSL - help - A DNS server (named) - - http://www.isc.org/sw/bind/ - - Depends: libopenssl - -endmenu diff --git a/openwrt/package/bind/Makefile b/openwrt/package/bind/Makefile deleted file mode 100644 index f635ef4ea15..00000000000 --- a/openwrt/package/bind/Makefile +++ /dev/null @@ -1,138 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bind -PKG_VERSION:=9.3.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=9ff3204eea27184ea0722f37e43fc95d - -PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/bind9/9.3.1/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -PKG_INIT_LEVEL:=60 - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,BIND_SERVER,bind-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,BIND_CLIENT,bind-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,BIND_TOOLS,bind-tools,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,BIND_RNDC,bind-rndc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,BIND_CHECK,bind-check,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,BIND_DNSSEC,bind-dnssec,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,BIND_HOST,bind-host,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,BIND_DIG,bind-dig,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --enable-ipv6 \ - --with-randomdev=/dev/urandom \ - --disable-threads \ - --with-openssl=$(STAGING_DIR)/usr/ \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \ - CC="$(HOSTCC)" \ - CFLAGS="-O2" \ - gen - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_BIND_SERVER): - install -d -m0755 $(IDIR_BIND_SERVER)/usr/sbin - install -d -m0755 $(IDIR_BIND_SERVER)/etc/init.d - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(IDIR_BIND_SERVER)/usr/sbin/ - $(CP) files/bind $(IDIR_BIND_SERVER)/etc - $(CP) files/named.init $(IDIR_BIND_SERVER)/etc/init.d/S$(PKG_INIT_LEVEL)named - find $(IDIR_BIND_SERVER)/etc/bind -name ".svn" | xargs rm -rf - $(RSTRIP) $(IDIR_BIND_SERVER) - $(IPKG_BUILD) $(IDIR_BIND_SERVER) $(PACKAGE_DIR) - -$(IPKG_BIND_CLIENT): - install -d -m0755 $(IDIR_BIND_CLIENT)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(IDIR_BIND_CLIENT)/usr/bin/ - $(RSTRIP) $(IDIR_BIND_CLIENT) - $(IPKG_BUILD) $(IDIR_BIND_CLIENT) $(PACKAGE_DIR) - -$(IPKG_BIND_TOOLS): - install -d -m0755 $(IDIR_BIND_TOOLS)/usr/bin - install -d -m0755 $(IDIR_BIND_TOOLS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(IDIR_BIND_TOOLS)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(IDIR_BIND_TOOLS)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(IDIR_BIND_TOOLS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(IDIR_BIND_TOOLS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(IDIR_BIND_TOOLS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(IDIR_BIND_TOOLS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(IDIR_BIND_TOOLS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(IDIR_BIND_TOOLS)/usr/sbin/ - $(RSTRIP) $(IDIR_BIND_TOOLS) - $(IPKG_BUILD) $(IDIR_BIND_TOOLS) $(PACKAGE_DIR) - -$(IPKG_BIND_RNDC): - install -d -m0755 $(IDIR_BIND_RNDC)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(IDIR_BIND_RNDC)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(IDIR_BIND_RNDC)/usr/sbin/ - $(RSTRIP) $(IDIR_BIND_RNDC) - $(IPKG_BUILD) $(IDIR_BIND_RNDC) $(PACKAGE_DIR) - -$(IPKG_BIND_CHECK): - install -d -m0755 $(IDIR_BIND_CHECK)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(IDIR_BIND_CHECK)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(IDIR_BIND_CHECK)/usr/sbin/ - $(RSTRIP) $(IDIR_BIND_CHECK) - $(IPKG_BUILD) $(IDIR_BIND_CHECK) $(PACKAGE_DIR) - -$(IPKG_BIND_DNSSEC): - install -d -m0755 $(IDIR_BIND_DNSSEC)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(IDIR_BIND_DNSSEC)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(IDIR_BIND_DNSSEC)/usr/sbin/ - $(RSTRIP) $(IDIR_BIND_DNSSEC) - $(IPKG_BUILD) $(IDIR_BIND_DNSSEC) $(PACKAGE_DIR) - -$(IPKG_BIND_HOST): - install -d -m0755 $(IDIR_BIND_HOST)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(IDIR_BIND_HOST)/usr/bin/ - $(RSTRIP) $(IDIR_BIND_HOST) - $(IPKG_BUILD) $(IDIR_BIND_HOST) $(PACKAGE_DIR) - -$(IPKG_BIND_DIG): - install -d -m0755 $(IDIR_BIND_DIG)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(IDIR_BIND_DIG)/usr/bin/ - $(RSTRIP) $(IDIR_BIND_DIG) - $(IPKG_BUILD) $(IDIR_BIND_DIG) $(PACKAGE_DIR) diff --git a/openwrt/package/bind/files/bind/db.0 b/openwrt/package/bind/files/bind/db.0 deleted file mode 100644 index e3aabdbeed1..00000000000 --- a/openwrt/package/bind/files/bind/db.0 +++ /dev/null @@ -1,12 +0,0 @@ -; -; BIND reverse data file for broadcast zone -; -$TTL 604800 -@ IN SOA localhost. root.localhost. ( - 1 ; Serial - 604800 ; Refresh - 86400 ; Retry - 2419200 ; Expire - 604800 ) ; Negative Cache TTL -; -@ IN NS localhost. diff --git a/openwrt/package/bind/files/bind/db.127 b/openwrt/package/bind/files/bind/db.127 deleted file mode 100644 index cd05bef14a5..00000000000 --- a/openwrt/package/bind/files/bind/db.127 +++ /dev/null @@ -1,13 +0,0 @@ -; -; BIND reverse data file for local loopback interface -; -$TTL 604800 -@ IN SOA localhost. root.localhost. ( - 1 ; Serial - 604800 ; Refresh - 86400 ; Retry - 2419200 ; Expire - 604800 ) ; Negative Cache TTL -; -@ IN NS localhost. -1.0.0 IN PTR localhost. diff --git a/openwrt/package/bind/files/bind/db.255 b/openwrt/package/bind/files/bind/db.255 deleted file mode 100644 index e3aabdbeed1..00000000000 --- a/openwrt/package/bind/files/bind/db.255 +++ /dev/null @@ -1,12 +0,0 @@ -; -; BIND reverse data file for broadcast zone -; -$TTL 604800 -@ IN SOA localhost. root.localhost. ( - 1 ; Serial - 604800 ; Refresh - 86400 ; Retry - 2419200 ; Expire - 604800 ) ; Negative Cache TTL -; -@ IN NS localhost. diff --git a/openwrt/package/bind/files/bind/db.local b/openwrt/package/bind/files/bind/db.local deleted file mode 100644 index 66b48923510..00000000000 --- a/openwrt/package/bind/files/bind/db.local +++ /dev/null @@ -1,13 +0,0 @@ -; -; BIND data file for local loopback interface -; -$TTL 604800 -@ IN SOA localhost. root.localhost. ( - 1 ; Serial - 604800 ; Refresh - 86400 ; Retry - 2419200 ; Expire - 604800 ) ; Negative Cache TTL -; -@ IN NS localhost. -@ IN A 127.0.0.1 diff --git a/openwrt/package/bind/files/bind/db.root b/openwrt/package/bind/files/bind/db.root deleted file mode 100644 index 01c20f04796..00000000000 --- a/openwrt/package/bind/files/bind/db.root +++ /dev/null @@ -1,45 +0,0 @@ - -; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net. -;; global options: printcmd -;; Got answer: -;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944 -;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13 - -;; QUESTION SECTION: -;. IN NS - -;; ANSWER SECTION: -. 518400 IN NS A.ROOT-SERVERS.NET. -. 518400 IN NS B.ROOT-SERVERS.NET. -. 518400 IN NS C.ROOT-SERVERS.NET. -. 518400 IN NS D.ROOT-SERVERS.NET. -. 518400 IN NS E.ROOT-SERVERS.NET. -. 518400 IN NS F.ROOT-SERVERS.NET. -. 518400 IN NS G.ROOT-SERVERS.NET. -. 518400 IN NS H.ROOT-SERVERS.NET. -. 518400 IN NS I.ROOT-SERVERS.NET. -. 518400 IN NS J.ROOT-SERVERS.NET. -. 518400 IN NS K.ROOT-SERVERS.NET. -. 518400 IN NS L.ROOT-SERVERS.NET. -. 518400 IN NS M.ROOT-SERVERS.NET. - -;; ADDITIONAL SECTION: -A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4 -B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201 -C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12 -D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90 -E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10 -F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241 -G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4 -H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53 -I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17 -J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30 -K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129 -L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12 -M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33 - -;; Query time: 81 msec -;; SERVER: 198.41.0.4#53(a.root-servers.net.) -;; WHEN: Sun Feb 1 11:27:14 2004 -;; MSG SIZE rcvd: 436 - diff --git a/openwrt/package/bind/files/bind/named.conf.example b/openwrt/package/bind/files/bind/named.conf.example deleted file mode 100644 index 16245495524..00000000000 --- a/openwrt/package/bind/files/bind/named.conf.example +++ /dev/null @@ -1,45 +0,0 @@ -// This is the primary configuration file for the BIND DNS server named. - -options { - directory "/tmp"; - - // If your ISP provided one or more IP addresses for stable - // nameservers, you probably want to use them as forwarders. - // Uncomment the following block, and insert the addresses replacing - // the all-0's placeholder. - - // forwarders { - // 0.0.0.0; - // }; - - auth-nxdomain no; # conform to RFC1035 -}; - -// prime the server with knowledge of the root servers -zone "." { - type hint; - file "/etc/bind/db.root"; -}; - -// be authoritative for the localhost forward and reverse zones, and for -// broadcast zones as per RFC 1912 - -zone "localhost" { - type master; - file "/etc/bind/db.local"; -}; - -zone "127.in-addr.arpa" { - type master; - file "/etc/bind/db.127"; -}; - -zone "0.in-addr.arpa" { - type master; - file "/etc/bind/db.0"; -}; - -zone "255.in-addr.arpa" { - type master; - file "/etc/bind/db.255"; -}; diff --git a/openwrt/package/bind/files/named.init b/openwrt/package/bind/files/named.init deleted file mode 100755 index 97860b3b25f..00000000000 --- a/openwrt/package/bind/files/named.init +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ -f /etc/bind/named.conf ]; then - named -c /etc/bind/named.conf -fi diff --git a/openwrt/package/bind/ipkg/bind-check.control b/openwrt/package/bind/ipkg/bind-check.control deleted file mode 100644 index b2ccae4af99..00000000000 --- a/openwrt/package/bind/ipkg/bind-check.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bind-check -Priority: optional -Section: net -Description: named-checkconf & named-checkzone utilities -Depends: libopenssl diff --git a/openwrt/package/bind/ipkg/bind-client.control b/openwrt/package/bind/ipkg/bind-client.control deleted file mode 100644 index 711da628374..00000000000 --- a/openwrt/package/bind/ipkg/bind-client.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bind-client -Priority: optional -Section: net -Description: dynamic dns client -Depends: libopenssl diff --git a/openwrt/package/bind/ipkg/bind-dig.control b/openwrt/package/bind/ipkg/bind-dig.control deleted file mode 100644 index 22a0ca88d72..00000000000 --- a/openwrt/package/bind/ipkg/bind-dig.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bind-dig -Priority: optional -Section: net -Description: dig utility -Depends: libopenssl diff --git a/openwrt/package/bind/ipkg/bind-dnssec.control b/openwrt/package/bind/ipkg/bind-dnssec.control deleted file mode 100644 index c8086387581..00000000000 --- a/openwrt/package/bind/ipkg/bind-dnssec.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bind-dnssec -Priority: optional -Section: net -Description: dnssec-keygen & dnssec-signzone utilities -Depends: libopenssl diff --git a/openwrt/package/bind/ipkg/bind-host.control b/openwrt/package/bind/ipkg/bind-host.control deleted file mode 100644 index 02173621d3f..00000000000 --- a/openwrt/package/bind/ipkg/bind-host.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bind-host -Priority: optional -Section: net -Description: host utility -Depends: libopenssl diff --git a/openwrt/package/bind/ipkg/bind-rndc.control b/openwrt/package/bind/ipkg/bind-rndc.control deleted file mode 100644 index ed3ed5efe75..00000000000 --- a/openwrt/package/bind/ipkg/bind-rndc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bind-rndc -Priority: optional -Section: net -Description: rndc & rndc-confgen utilities -Depends: libopenssl diff --git a/openwrt/package/bind/ipkg/bind-server.conffiles b/openwrt/package/bind/ipkg/bind-server.conffiles deleted file mode 100644 index c4cfe37d57d..00000000000 --- a/openwrt/package/bind/ipkg/bind-server.conffiles +++ /dev/null @@ -1,6 +0,0 @@ -/etc/bind/named.conf.example -/etc/bind/db.0 -/etc/bind/db.127 -/etc/bind/db.255 -/etc/bind/db.local -/etc/bind/db.root diff --git a/openwrt/package/bind/ipkg/bind-server.control b/openwrt/package/bind/ipkg/bind-server.control deleted file mode 100644 index 7a0f5441407..00000000000 --- a/openwrt/package/bind/ipkg/bind-server.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: bind-server -Priority: optional -Section: net -Description: popular dns server -Depends: libopenssl -Conflicts: dnsmasq diff --git a/openwrt/package/bind/ipkg/bind-tools.control b/openwrt/package/bind/ipkg/bind-tools.control deleted file mode 100644 index 50a0b58e2a5..00000000000 --- a/openwrt/package/bind/ipkg/bind-tools.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bind-tools -Priority: optional -Section: net -Description: dig, host, nslookup, nsupdate, dnssec-keygen, dnssec-signzone, named-checkconf, named-checkzone, rndc, rndc-confgen -Depends: libopenssl diff --git a/openwrt/package/bind/patches/cross-compile.patch b/openwrt/package/bind/patches/cross-compile.patch deleted file mode 100644 index 1fab97f8180..00000000000 --- a/openwrt/package/bind/patches/cross-compile.patch +++ /dev/null @@ -1,178 +0,0 @@ ---- bind-9.3.1/configure 2004-12-09 05:09:03.000000000 +0100 -+++ bind-9.3.1.patched/configure 2005-05-23 13:17:58.919886003 +0200 -@@ -23675,175 +23675,6 @@ - # which provides some (all?) of the desired functions. - # - --echo "$as_me:$LINENO: checking for inet_ntop with IPv6 support" >&5 --echo $ECHO_N "checking for inet_ntop with IPv6 support... $ECHO_C" >&6 --if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#include --#include --#include --#include --main() { --char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);} --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O" -- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c" -- ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1" --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- -- --# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts --# addresses with less than four octets, like "1.2.3". Also leading --# zeros should also be rejected. -- --echo "$as_me:$LINENO: checking for working inet_pton with IPv6 support" >&5 --echo $ECHO_N "checking for working inet_pton with IPv6 support... $ECHO_C" >&6 --if test "$cross_compiling" = yes; then -- echo "$as_me:$LINENO: result: assuming target platform has working inet_pton" >&5 --echo "${ECHO_T}assuming target platform has working inet_pton" >&6 -- ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#include --#include --#include --#include --main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : -- inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : -- (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); } --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O" -- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c" -- ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1" --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- --echo "$as_me:$LINENO: checking for inet_aton" >&5 --echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#include --#include --#include --int --main () --{ --struct in_addr in; inet_aton(0, &in); return (0); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O" -- ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c" -- ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1" --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- -- -- -- - - # - # Look for a 4.4BSD-style sa_len member in struct sockaddr. diff --git a/openwrt/package/bitchx/Config.in b/openwrt/package/bitchx/Config.in deleted file mode 100644 index 91b95a93da5..00000000000 --- a/openwrt/package/bitchx/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_BITCHX - prompt "bitchx............................ popular IRC client" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - A popular IRC client - - http://www.bitchx.org/ - diff --git a/openwrt/package/bitchx/Makefile b/openwrt/package/bitchx/Makefile deleted file mode 100644 index 0bcc26ee6f3..00000000000 --- a/openwrt/package/bitchx/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bitchx -PKG_VERSION:=1.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=611d2dda222f00c10140236f4c331572 - -PKG_SOURCE_URL:=http://bitchx.org/files/source/ -PKG_SOURCE:=ircii-pana-$(PKG_VERSION)-final.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/BitchX -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,BITCHX,bitchx,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_HOST_NAME) \ - --host=mipsel-linux-uclibc-gcc \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all - mkdir -p $(PKG_INSTALL_DIR)/tmp - mkdir -p $(PKG_INSTALL_DIR)/etc/init.d - mkdir -p $(PKG_INSTALL_DIR)/usr/bin - mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx - mkdir -p $(PKG_INSTALL_DIR)/usr/share/man/man1 - mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/translation - mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/plugins - mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/help - install -c $(PKG_BUILD_DIR)/source/BitchX $(PKG_INSTALL_DIR)/usr/bin/BitchX-1.1-final - rm -f $(PKG_INSTALL_DIR)/usr/bin/BitchX - ln -s /usr/bin/BitchX-1.1-final $(PKG_INSTALL_DIR)/usr/bin/BitchX - install -c $(PKG_BUILD_DIR)/BitchX.help $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.help - install -c $(PKG_BUILD_DIR)/BitchX.ircnames $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.ircnames - install -c $(PKG_BUILD_DIR)/BitchX.quit $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.quit - install -c $(PKG_BUILD_DIR)/BitchX.reasons $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.kick - install -c $(PKG_BUILD_DIR)/source/wserv $(PKG_INSTALL_DIR)/usr/lib/bx/wserv - install -c $(PKG_BUILD_DIR)/source/scr-bx $(PKG_INSTALL_DIR)/usr/bin/scr-bx - cp -fpR $(PKG_BUILD_DIR)/script $(PKG_INSTALL_DIR)/usr/lib/bx/ - cp -fpR $(PKG_BUILD_DIR)/translation $(PKG_INSTALL_DIR)/usr/lib/bx/ - bzip2 $(PKG_INSTALL_DIR)/usr/lib/bx/translation/* - cp -f ./files/bitchxrc $(PKG_INSTALL_DIR)/tmp/.bitchxrc - cp -pf ./files/S98bitchxrc $(PKG_INSTALL_DIR)/etc/init.d/S98bitchxrc - touch $@ - -$(IPKG_BITCHX): - install -d -m0755 $(IDIR_BITCHX)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_BITCHX)/usr/bin - install -d -m0755 $(IDIR_BITCHX)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/* $(IDIR_BITCHX)/usr/lib - install -d $(IDIR_BITCHX)/etc/init.d - cp -fp $(PKG_INSTALL_DIR)/etc/init.d/S98bitchxrc $(IDIR_BITCHX)/etc/init.d - install -d -m0755 $(IDIR_BITCHX)/tmp - cp -fp $(PKG_INSTALL_DIR)/tmp/.bitchxrc $(IDIR_BITCHX)/tmp - $(RSTRIP) $(IDIR_BITCHX) - $(IPKG_BUILD) $(IDIR_BITCHX) $(PACKAGE_DIR) diff --git a/openwrt/package/bitchx/files/S98bitchxrc b/openwrt/package/bitchx/files/S98bitchxrc deleted file mode 100755 index 4578696ae22..00000000000 --- a/openwrt/package/bitchx/files/S98bitchxrc +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# make /tmp/.bitchxrc as many servers ban root -if [ ! -e /tmp/.bitchxrc ] -then - echo "IRCUSER OpenWrt" >/tmp/.bitchxrc - echo "IRCNAME OpenWrt User!" >>/tmp/.bitchxrc -fi diff --git a/openwrt/package/bitchx/files/bitchxrc b/openwrt/package/bitchx/files/bitchxrc deleted file mode 100644 index 6e2b271eec4..00000000000 --- a/openwrt/package/bitchx/files/bitchxrc +++ /dev/null @@ -1,2 +0,0 @@ -IRCUSER OpenWrt -IRCNAME OpenWrt User! diff --git a/openwrt/package/bitchx/ipkg/bitchx.control b/openwrt/package/bitchx/ipkg/bitchx.control deleted file mode 100644 index b95b9ad1cd0..00000000000 --- a/openwrt/package/bitchx/ipkg/bitchx.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: bitchx -Priority: optional -Section: net -Maintainer: Duncan Lindley -Source: http://www.bitchx.org -Depends: libncurses -Description: A popular IRC client diff --git a/openwrt/package/bitchx/patches/BitchX-fix_declarations.patch b/openwrt/package/bitchx/patches/BitchX-fix_declarations.patch deleted file mode 100644 index b6766da596e..00000000000 --- a/openwrt/package/bitchx/patches/BitchX-fix_declarations.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urN BitchX/include/ctcp.h BitchX.new/include/ctcp.h ---- BitchX/include/ctcp.h 2003-04-11 03:09:07.000000000 +0200 -+++ BitchX.new/include/ctcp.h 2006-03-29 13:19:21.170693168 +0200 -@@ -56,7 +56,7 @@ - extern CtcpEntryDll *dll_ctcp; - - --extern char *ctcp_type[]; -+//extern char *ctcp_type[]; /* already declared in ctcp.c - extern int sed; - extern int in_ctcp_flag; - -diff -urN BitchX/include/struct.h BitchX.new/include/struct.h ---- BitchX/include/struct.h 2003-04-11 03:09:07.000000000 +0200 -+++ BitchX.new/include/struct.h 2006-03-29 13:19:26.653859600 +0200 -@@ -1064,7 +1064,7 @@ - int delete; - } TimerList; - --extern TimerList *PendingTimers; -+//extern TimerList *PendingTimers; - typedef struct nicktab_stru - { - struct nicktab_stru *next; diff --git a/openwrt/package/bitchx/patches/BitchX-tparm.patch b/openwrt/package/bitchx/patches/BitchX-tparm.patch deleted file mode 100644 index 18bd7bfd0c9..00000000000 --- a/openwrt/package/bitchx/patches/BitchX-tparm.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- BitchX/source/term.c.orig 2006-03-05 15:01:46.000000000 +1000 -+++ BitchX/source/term.c 2006-03-05 15:01:53.000000000 +1000 -@@ -92,7 +92,6 @@ - #endif - - extern char *getenv(); --extern char *tparm(); - - /* - * The old code assumed termcap. termcap is almost always present, but on diff --git a/openwrt/package/bitlbee/Config.in b/openwrt/package/bitlbee/Config.in deleted file mode 100644 index e2db4321bd8..00000000000 --- a/openwrt/package/bitlbee/Config.in +++ /dev/null @@ -1,16 +0,0 @@ -config BR2_PACKAGE_BITLBEE - prompt "bitlbee........................... IRC gateway to IM chat networks" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_GLIB1 - select BR2_PACKAGE_LIBICONV - help - - BitlBee is an IRC daemon that can talk to instant messaging - networks and acts as a gateway. Users can connect to the - server with any normal IRC client and see their 'buddy list' - in #bitlbee. - - http://www.bitlbee.org/ - diff --git a/openwrt/package/bitlbee/Makefile b/openwrt/package/bitlbee/Makefile deleted file mode 100644 index b51370e8c6a..00000000000 --- a/openwrt/package/bitlbee/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bitlbee -PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=a4d7daa9b64898dd41a3a6d104692d9a - -PKG_SOURCE_URL:=http://get.bitlbee.org/src \ - http://get.bitlbee.be/src \ - http://get.us.bitlbee.org/src \ - http://ftp.snt.utwente.nl/pub/software/bitlbee/src -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,BITLBEE,bitlbee,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - STAGING_DIR="$(STAGING_DIR)" \ - STRIP="$(STRIP)" \ - ./configure \ - --prefix=/usr/ \ - --bindir=/usr/sbin/ \ - --etcdir=/etc/bitlbee/ \ - --datadir=/usr/share/bitlbee/ \ - --config=/var/lib/bitlbee/ \ - --arch=OpenWrt \ - --cpu="$(ARCH)" \ - --debug=0 \ - --strip=1 \ - --sizeopt=1 \ - --ipv6=1 \ - --ssl=openssl \ - --glib1=1 \ - --glib1prefix="$(STAGING_DIR)/usr" \ - ); - @echo 'CFLAGS+="-I$(STAGING_DIR)/usr/include/iconv"' >> \ - $(PKG_BUILD_DIR)/Makefile.settings - @echo 'LFLAGS+="-L$(STAGING_DIR)/usr/lib/iconv"' >> \ - $(PKG_BUILD_DIR)/Makefile.settings - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_BITLBEE): - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(IDIR_BITLBEE)" install-etc install-bin - $(MAKE) -C $(PKG_BUILD_DIR)/doc/user-guide \ - DESTDIR="$(IDIR_BITLBEE)" install - install -d -m0755 $(IDIR_BITLBEE)/etc/init.d - install -m0755 ./files/S55bitlbee $(IDIR_BITLBEE)/etc/init.d/S55bitlbee - $(RSTRIP) $(IDIR_BITLBEE) - $(IPKG_BUILD) $(IDIR_BITLBEE) $(PACKAGE_DIR) - touch $@ diff --git a/openwrt/package/bitlbee/files/S55bitlbee b/openwrt/package/bitlbee/files/S55bitlbee deleted file mode 100755 index d7f691d24b4..00000000000 --- a/openwrt/package/bitlbee/files/S55bitlbee +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -mkdir -p /var/lib/bitlbee -bitlbee -D diff --git a/openwrt/package/bitlbee/ipkg/bitlbee.conffiles b/openwrt/package/bitlbee/ipkg/bitlbee.conffiles deleted file mode 100644 index cd954892501..00000000000 --- a/openwrt/package/bitlbee/ipkg/bitlbee.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/bitlbee/motd.txt -/etc/bitlbee/bitlbee.conf -/etc/init.d/S55bitlbee diff --git a/openwrt/package/bitlbee/ipkg/bitlbee.control b/openwrt/package/bitlbee/ipkg/bitlbee.control deleted file mode 100644 index 997cdd66c54..00000000000 --- a/openwrt/package/bitlbee/ipkg/bitlbee.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bitlbee -Priority: optional -Section: net -Depends: glib1, libopenssl, libiconv -Description: IRC gateway to IM chat networks diff --git a/openwrt/package/bitlbee/patches/100-cross_compile_configure_fix b/openwrt/package/bitlbee/patches/100-cross_compile_configure_fix deleted file mode 100644 index 3ba17d2c66e..00000000000 --- a/openwrt/package/bitlbee/patches/100-cross_compile_configure_fix +++ /dev/null @@ -1,98 +0,0 @@ -diff -Nur bitlbee-1.0.1-orig/configure bitlbee-1.0.1/configure ---- bitlbee-1.0.1-orig/configure 2006-01-14 16:14:05.000000000 +0100 -+++ bitlbee-1.0.1/configure 2006-03-06 18:30:19.000000000 +0100 -@@ -21,9 +21,12 @@ - - debug=0 - strip=1 -+sizeopt=0 - ipv6=1 - ssl=auto - -+glib1=0 -+ - arch=`uname -s` - cpu=`uname -m` - -@@ -52,11 +55,18 @@ - - --debug=0/1 Disable/enable debugging $debug - --strip=0/1 Disable/enable binary stripping $strip -+--sizeopt=0/1 Disable/enable size optimization $sizeopt -+ -+--arch=... Describe Operating System ?! $arch -+--cpu=... Describe CPU $cpu - - --ipv6=0/1 IPv6 socket support $ipv6 - - --ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto) - $ssl -+--glib1=0/1 Force usage of glib1 even if glib2 is present -+--glib1prefix=... -+ - EOF - exit; - fi -@@ -110,8 +120,13 @@ - echo 'CFLAGS=-g' >> Makefile.settings - echo 'DEBUG=1' >> Makefile.settings - echo '#define DEBUG' >> config.h -+ if [ "$sizeopt" = "1" ]; then -+ echo "Warning: won't optimize for size since debug is on." -+ fi -+elif [ "$sizeopt" = "1" ]; then -+ echo 'CFLAGS=-Os' >> Makefile.settings - else -- echo 'CFLAGS=-O3' >> Makefile.settings -+ echo 'CFLAGS=-O2' >> Makefile.settings - fi - - echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings -@@ -138,24 +153,33 @@ - exit 1; - fi - --if type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then -+if [ "$glib1" != "1" ] && \ -+ type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then - cat<>Makefile.settings - EFLAGS+=`pkg-config --libs glib-2.0` - CFLAGS+=`pkg-config --cflags glib-2.0` - EOF - echo '#define GLIB2' >> config.h --elif type glib-config > /dev/null 2> /dev/null; then -+elif [ "x$glib1prefix" = "x" ] && \ -+ type glib-config > /dev/null 2> /dev/null; then - cat<>Makefile.settings - EFLAGS+=`glib-config --libs` - CFLAGS+=`glib-config --cflags` - EOF - echo '#define GLIB1' >> config.h -+elif [ "x$glib1prefix" != "x" ] && \ -+ type "$glib1prefix/bin/glib-config" > /dev/null 2> /dev/null; then -+ cat<>Makefile.settings -+EFLAGS+=`$glib1prefix/bin/glib-config --prefix=$glib1prefix --libs` -+CFLAGS+=`$glib1prefix/bin/glib-config --prefix=$glib1prefix --cflags` -+EOF -+ echo '#define GLIB1' >> config.h - else - echo 'Cannot find glib development libraries, aborting. (Install libglib-dev?)' - exit 1; - fi - --if [ -r /usr/include/iconv.h ]; then -+if [ -r "$STAGING_DIR/usr/include/iconv.h" ]; then - :; - elif [ -r /usr/local/include/iconv.h ]; then - echo CFLAGS+=-I/usr/local/include >> Makefile.settings; -@@ -360,6 +384,10 @@ - CYGWIN* ) - echo 'Cygwin is not officially supported.' - ;; -+OpenWrt ) -+ echo 'EFLAGS+=-liconv' >> Makefile.settings; -+ echo "CFLAGS+=\"-I$STAGING_DIR/usr/include\"" >> Makefile.settings; -+;; - * ) - echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.' - echo 'Please report any problems at http://bugs.bitlbee.org/.' diff --git a/openwrt/package/bluez-libs/Config.in b/openwrt/package/bluez-libs/Config.in deleted file mode 100644 index 490771426af..00000000000 --- a/openwrt/package/bluez-libs/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_BLUEZ_LIBS - prompt "bluez-libs........................ Bluetooth library" - tristate - default m if CONFIG_DEVEL - help - Bluez libs. - - http://bluez.org - diff --git a/openwrt/package/bluez-libs/Makefile b/openwrt/package/bluez-libs/Makefile deleted file mode 100644 index b02d61836f0..00000000000 --- a/openwrt/package/bluez-libs/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bluez-libs -PKG_VERSION:=2.24 -PKG_RELEASE:=1 -PKG_MD5SUM:=d0ba50e251ae1e7f2c09024facde8e40 - -PKG_SOURCE_URL:=http://bluez.sourceforge.net/download -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,BLUEZ_LIBS,bluez-libs,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.source: $(DL_DIR)/$(PKG_SOURCE) - zcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - touch $(BLUEZLIBS_DIR)/.source - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_BLUEZ_LIBS): - install -d -m0755 $(IDIR_BLUEZ_LIBS)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(IDIR_BLUEZ_LIBS)/usr/lib/ - $(RSTRIP) $(IDIR_BLUEZ_LIBS) - $(IPKG_BUILD) $(IDIR_BLUEZ_LIBS) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libbluetooth.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/bluetooth - $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth/*.h $(STAGING_DIR)/usr/include/bluetooth - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(STAGING_DIR)/usr/lib/ - -install-dev: $(STAGING_DIR)/usr/lib/libbluetooth.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/bluetooth - rm -rf $(STAGING_DIR)/usr/lib/libbluetooth.{a,so*} - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/bluez-libs/ipkg/bluez-libs.control b/openwrt/package/bluez-libs/ipkg/bluez-libs.control deleted file mode 100644 index d4e8f962a34..00000000000 --- a/openwrt/package/bluez-libs/ipkg/bluez-libs.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bluez-libs -Priority: optional -Section: net -Description: Bluez libs -Depends: kmod-bluetooth diff --git a/openwrt/package/bluez-utils/Config.in b/openwrt/package/bluez-utils/Config.in deleted file mode 100644 index 7875742e7c6..00000000000 --- a/openwrt/package/bluez-utils/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_BLUEZ_UTILS - prompt "bluez-utils....................... Bluetooth utilities" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_GLIB1 - select BR2_PACKAGE_BLUEZ_LIBS - help - Bluez utils. - - http://bluez.org - - Depends: libpthread, bluez-libs - diff --git a/openwrt/package/bluez-utils/Makefile b/openwrt/package/bluez-utils/Makefile deleted file mode 100644 index 1ac7d345d64..00000000000 --- a/openwrt/package/bluez-utils/Makefile +++ /dev/null @@ -1,91 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bluez-utils -PKG_VERSION:=2.24 -PKG_RELEASE:=1 -PKG_MD5SUM:= - -PKG_SOURCE_URL:=http://bluez.sourceforge.net/download -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,BLUEZ_UTILS,bluez-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.source: $(DL_DIR)/$(PKG_SOURCE) - zcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - touch $(BLUEZLIBS_DIR)/.source - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --disable-dbus \ - --disable-fuse \ - --disable-obex \ - --disable-alsa \ - --disable-cups \ - --disable-pcmcia \ - --disable-initscripts \ - --disable-bccmd \ - --disable-avctrl \ - --disable-hid2hci \ - --disable-dfutool \ - --disable-bcm203x \ - --disable-bluepin \ - --with-bluez=$(STAGING_DIR)/usr/include \ - --with-usb=$(STAGING_DIR)/usr/include \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_BLUEZ_UTILS): - install -d -m0755 $(IDIR_BLUEZ_UTILS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_BLUEZ_UTILS)/usr/bin/ - install -d -m0755 $(IDIR_BLUEZ_UTILS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_BLUEZ_UTILS)/usr/sbin/ - install -d -m0755 $(IDIR_BLUEZ_UTILS)/etc/bluetooth - $(CP) $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(IDIR_BLUEZ_UTILS)/etc/bluetooth/ - $(CP) $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(IDIR_BLUEZ_UTILS)/etc/bluetooth/ - install -m0700 ./files/givepin $(IDIR_BLUEZ_UTILS)/etc/bluetooth/ - $(RSTRIP) $(IDIR_BLUEZ_UTILS) - $(IPKG_BUILD) $(IDIR_BLUEZ_UTILS) $(PACKAGE_DIR) - diff --git a/openwrt/package/bluez-utils/files/givepin b/openwrt/package/bluez-utils/files/givepin deleted file mode 100644 index e52a3384af9..00000000000 --- a/openwrt/package/bluez-utils/files/givepin +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# Write bluetooth PIN number here: -pin= - -if [ -z "$pin" ]; then - msg="Set bluetooth PIN in file $0" - logger -p user.err "$msg" - for i in /dev/pts/* ; do - [ -w $i ] && echo "$msg" > $i - done -else - echo "PIN:$pin" -fi diff --git a/openwrt/package/bluez-utils/ipkg/bluez-utils.conffiles b/openwrt/package/bluez-utils/ipkg/bluez-utils.conffiles deleted file mode 100644 index ba07831a926..00000000000 --- a/openwrt/package/bluez-utils/ipkg/bluez-utils.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/bluetooth/givepin -/etc/bluetooth/hcid.conf -/etc/bluetooth/rfcomm.conf diff --git a/openwrt/package/bluez-utils/ipkg/bluez-utils.control b/openwrt/package/bluez-utils/ipkg/bluez-utils.control deleted file mode 100644 index f577660b19b..00000000000 --- a/openwrt/package/bluez-utils/ipkg/bluez-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: bluez-utils -Priority: optional -Section: net -Description: Bluez utils -Depends: kmod-bluetooth, bluez-libs diff --git a/openwrt/package/bluez-utils/patches/001-include_limits.patch b/openwrt/package/bluez-utils/patches/001-include_limits.patch deleted file mode 100644 index 6f6cb824b4e..00000000000 --- a/openwrt/package/bluez-utils/patches/001-include_limits.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -ur bluez-utils-2.17.orig/hidd/sdp.c bluez-utils-2.17/hidd/sdp.c ---- bluez-utils-2.17.orig/hidd/sdp.c 2005-05-09 20:33:24.000000000 +0200 -+++ bluez-utils-2.17/hidd/sdp.c 2005-07-26 14:38:13.000000000 +0200 -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - - #include - #include -diff -ur bluez-utils-2.17.orig/tools/hciconfig.c bluez-utils-2.17/tools/hciconfig.c ---- bluez-utils-2.17.orig/tools/hciconfig.c 2005-05-09 20:33:24.000000000 +0200 -+++ bluez-utils-2.17/tools/hciconfig.c 2005-07-26 14:34:29.000000000 +0200 -@@ -40,6 +40,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/openwrt/package/bluez-utils/patches/002-hcid_pin_helper.patch b/openwrt/package/bluez-utils/patches/002-hcid_pin_helper.patch deleted file mode 100644 index 17a7f364038..00000000000 --- a/openwrt/package/bluez-utils/patches/002-hcid_pin_helper.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur bluez-utils-2.17.orig/hcid/hcid.conf bluez-utils-2.17/hcid/hcid.conf ---- bluez-utils-2.17.orig/hcid/hcid.conf 2004-12-25 19:06:00.000000000 +0100 -+++ bluez-utils-2.17/hcid/hcid.conf 2005-07-26 14:44:23.000000000 +0200 -@@ -23,7 +23,7 @@ - pairing multi; - - # PIN helper -- pin_helper /usr/bin/bluepin; -+ pin_helper /etc/bluetooth/givepin; - - # D-Bus PIN helper - #dbus_pin_helper; -@@ -34,7 +34,7 @@ - # Local device name - # %d - device id - # %h - host name -- name "BlueZ (%d)"; -+ name "OpenWRT"; - - # Local device class - class 0x3e0100; diff --git a/openwrt/package/bwm/Config.in b/openwrt/package/bwm/Config.in deleted file mode 100644 index 932a71ddbf3..00000000000 --- a/openwrt/package/bwm/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_BWM - prompt "bwm............................... A very tiny BandWidth Monitor" - tristate - default m if CONFIG_DEVEL - help - Continually displays data transfer rates (received, transmitted, and - total) for each interface, measured in KiB/sec. Works by sampling - values from /proc/net/dev and calculating deltas. diff --git a/openwrt/package/bwm/Makefile b/openwrt/package/bwm/Makefile deleted file mode 100644 index 6acdd0be6ec..00000000000 --- a/openwrt/package/bwm/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bwm -PKG_VERSION:=1.1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=51021a036acb92d2bda0c0c0483f9552 - -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/b/bwm -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig -PKG_CAT:=zcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,BWM,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/bwm.c -o $(PKG_BUILD_DIR)/bwm - touch $@ - -$(IPKG_BWM): - mkdir -p $(IDIR_BWM)/usr/bin - install -m 755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_BWM)/usr/bin/ - $(STRIP) $(IDIR_BWM)/usr/bin/* - $(IPKG_BUILD) $(IDIR_BWM) $(PACKAGE_DIR) diff --git a/openwrt/package/bwm/ipkg/bwm.control b/openwrt/package/bwm/ipkg/bwm.control deleted file mode 100644 index 4851a2debdf..00000000000 --- a/openwrt/package/bwm/ipkg/bwm.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: bwm -Priority: optional -Section: net -Description: A very tiny bandwidth monitor diff --git a/openwrt/package/cbtt/Config.in b/openwrt/package/cbtt/Config.in deleted file mode 100644 index 00ad32de569..00000000000 --- a/openwrt/package/cbtt/Config.in +++ /dev/null @@ -1,16 +0,0 @@ -config BR2_PACKAGE_CBTT - prompt "cbtt.............................. a C BitTorrent Tracker" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_ZLIB - help - A C BitTorrent Tracker - -config BR2_PACKAGE_CBTT_MYSQL - prompt "cbtt-mysql........................ a C BitTorrent Tracker (mysql)" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_ZLIB - select BR2_PACKAGE_LIBMYSQLCLIENT - help - A C BitTorrent Tracker diff --git a/openwrt/package/cbtt/Makefile b/openwrt/package/cbtt/Makefile deleted file mode 100644 index ebe1243dac0..00000000000 --- a/openwrt/package/cbtt/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cbtt -PKG_VERSION:=20060211 -PKG_RELEASE:=1 -PKG_MD5SUM:=19abea2817c49ccc9438e9671c402984 - -PKG_SOURCE_URL:=@SF/bnbtusermods -PKG_SOURCE:=$(PKG_NAME)80-$(PKG_VERSION)-src.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)80-$(PKG_VERSION)-src -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CBTT,cbtt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,CBTT_MYSQL,cbtt-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - LFLAGS="-L$(STAGING_DIR)/usr/lib -L $(STAGING_DIR)/usr/lib/mysql -L. -lz -lmysqlclient" \ - CFLAGS="-I$(STAGING_DIR)/usr/include" - mkdir -p $(PKG_INSTALL_DIR)/usr/bin - $(CP) $(PKG_BUILD_DIR)/bnbt $(PKG_INSTALL_DIR)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/bnbtmysql $(PKG_INSTALL_DIR)/usr/bin/ - touch $@ - -$(IPKG_CBTT): - install -d -m0755 $(IDIR_CBTT)/usr/bin - install -m0755 $(PKG_INSTALL_DIR)/usr/bin/bnbt $(IDIR_CBTT)/usr/bin/ - $(RSTRIP) $(IDIR_CBTT) - $(IPKG_BUILD) $(IDIR_CBTT) $(PACKAGE_DIR) - -$(IPKG_CBTT_MYSQL): - install -d -m0755 $(IDIR_CBTT_MYSQL)/usr/bin - install -m0755 $(PKG_INSTALL_DIR)/usr/bin/bnbtmysql $(IDIR_CBTT_MYSQL)/usr/bin/ - $(RSTRIP) $(IDIR_CBTT_MYSQL) - $(IPKG_BUILD) $(IDIR_CBTT_MYSQL) $(PACKAGE_DIR) diff --git a/openwrt/package/cbtt/ipkg/cbtt-mysql.control b/openwrt/package/cbtt/ipkg/cbtt-mysql.control deleted file mode 100644 index 4786eaa238a..00000000000 --- a/openwrt/package/cbtt/ipkg/cbtt-mysql.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: cbtt-mysql -Priority: optional -Section: net -Maintainer: Duncan Lindley -Source: http://bnbtusermods.sourceforge.net/ -Depends: zlib, libmysqlclient -Description: Bittorrent tracker with mysql support diff --git a/openwrt/package/cbtt/ipkg/cbtt.control b/openwrt/package/cbtt/ipkg/cbtt.control deleted file mode 100644 index d5e6d92891b..00000000000 --- a/openwrt/package/cbtt/ipkg/cbtt.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: cbtt -Priority: optional -Section: net -Maintainer: Duncan Lindley -Source: http://bnbtusermods.sourceforge.net/ -Depends: zlib -Description: Bittorrent tracker diff --git a/openwrt/package/cbtt/patches/100-compile.patch b/openwrt/package/cbtt/patches/100-compile.patch deleted file mode 100644 index b767dfb3f91..00000000000 --- a/openwrt/package/cbtt/patches/100-compile.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -Nur cbtt80-20060211-src/Makefile cbtt80-20060211-src.patched/Makefile ---- cbtt80-20060211-src/Makefile 2006-02-07 18:44:58.000000000 +0100 -+++ cbtt80-20060211-src.patched/Makefile 2006-03-15 09:01:35.000000000 +0100 -@@ -1,6 +1,5 @@ - SHELL = /bin/sh - SYSTEM = $(shell uname) --C++ = g++ - DFLAGS = - OFLAGS = -O2 -w - LFLAGS = -L. -lz -@@ -40,19 +39,19 @@ - all: $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS) - - ./bnbt: $(OBJS) $(OBJS_BNBT) -- $(C++) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LFLAGS) -+ $(CXX) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LFLAGS) - - ./bnbtmysql: $(OBJS) $(OBJS_BNBTMYSQL) -- $(C++) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LFLAGS) -L/usr/lib/mysql -lmysqlclient -+ $(CXX) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LFLAGS) - - clean: - rm -f $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS) - - %.o: %.cpp -- $(C++) -o $@ $(CFLAGS) -c $< -+ $(CXX) -o $@ $(CFLAGS) -c $< - - %.mysql.o: %.cpp -- $(C++) -o $@ $(CFLAGS) -DBNBT_MYSQL -c $< -+ $(CXX) -o $@ $(CFLAGS) -DBNBT_MYSQL -c $< - - ./bnbt: $(OBJS) $(OBJS_BNBT) - -@@ -91,4 +90,4 @@ - bnbt_mysql.mysql.o: bnbt.h bnbt_mysql.h util.h - tracker.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h config.h md5.h server.h sort.h tracker.h util.h - tracker_announce.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h link.h tracker.h util.h --tracker_scrape.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h tracker.h util.h -\ No newline at end of file -+tracker_scrape.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h tracker.h util.h diff --git a/openwrt/package/cgilib/Config.in b/openwrt/package/cgilib/Config.in deleted file mode 100644 index 23364d1b74a..00000000000 --- a/openwrt/package/cgilib/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_CGILIB - prompt "cgilib............................ Simple CGI Library" - tristate -# default m if CONFIG_DEVEL - default n - help - This library provides a simple programming API to the Common Gateway - Interface (CGI). It features HTTP Redirect, provides read access to - FORM variables, sets HTTP Cookies and reads them. - - http://www.infodrom.org/projects/cgilib/ - diff --git a/openwrt/package/cgilib/Makefile b/openwrt/package/cgilib/Makefile deleted file mode 100644 index b81effdb045..00000000000 --- a/openwrt/package/cgilib/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cgilib -PKG_VERSION:=0.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=5187ba11b2ec165b6c5b6629087733b0 - -PKG_SOURCE_URL:=http://www.infodrom.org/projects/cgilib/download -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CGILIB,cgilib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - OFLAGS="$(TARGET_CFLAGS)" \ - all - touch $@ - -$(IPKG_CGILIB): - install -d -m0755 $(IDIR_CGILIB)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libcgi.so.* $(IDIR_CGILIB)/usr/lib/ - $(RSTRIP) $(IDIR_CGILIB) - $(IPKG_BUILD) $(IDIR_CGILIB) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libcgi.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_BUILD_DIR)/cgi.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libcgi.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libcgi.so -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/cgi.h \ - $(STAGING_DIR)/usr/lib/libcgi.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/cgilib/ipkg/cgilib.control b/openwrt/package/cgilib/ipkg/cgilib.control deleted file mode 100644 index eeed8be3aac..00000000000 --- a/openwrt/package/cgilib/ipkg/cgilib.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: cgilib -Priority: optional -Section: libs -Description: Simple CGI Library. - This library provides a simple programming API to the Common Gateway - Interface (CGI). It features HTTP Redirect, provides read access to - FORM variables, sets HTTP Cookies and reads them. diff --git a/openwrt/package/cgilib/patches/100-shared_lib.patch b/openwrt/package/cgilib/patches/100-shared_lib.patch deleted file mode 100644 index 5603340f9de..00000000000 --- a/openwrt/package/cgilib/patches/100-shared_lib.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -ruN cgilib-0.5-orig/Makefile cgilib-0.5-1/Makefile ---- cgilib-0.5-orig/Makefile 1999-08-20 23:14:07.000000000 +0200 -+++ cgilib-0.5-1/Makefile 2005-08-10 20:28:17.000000000 +0200 -@@ -14,14 +14,26 @@ - # along with this program; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. - --CFLAGS = -I. -Wall -O2 -g -+OFLAGS = -O2 -g -+CFLAGS = -I. -Wall $(OFLAGS) - LDFLAGS = -L. - LIBS = -lcgi - -+SOVER_MAJ := 0 -+SOVER_MIN := 0 -+SOVER_REV := 0 -+SONAME := libcgi.so.$(SOVER_MAJ) -+SOREAL := libcgi.so.$(SOVER_MAJ).$(SOVER_MIN).$(SOVER_REV) -+ - OBJS = cgi.o cookies.o - - libcgi.a: $(OBJS) -- ar rc $@ $^ -+ $(AR) rc $@ $^ -+ -+libcgi.so: $(OBJS) -+ $(CC) -shared -o $(SOREAL) $(LDFLAGS) -Wl,-soname,$(SONAME) $^ -+ ln -sf $(SOREAL) $(SONAME) -+ ln -sf $(SONAME) libcgi.so - - cgitest: cgitest.o libcgi.a - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -@@ -29,7 +41,7 @@ - jumpto: jumpto.o libcgi.a - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) - --all: libcgi.a cgitest jumpto -+all: libcgi.a libcgi.so cgitest jumpto - - install: cgitest - install -m 755 cgitest /usr/lib/cgi-bin diff --git a/openwrt/package/cgilib/patches/200-cgitest_bugfix.patch b/openwrt/package/cgilib/patches/200-cgitest_bugfix.patch deleted file mode 100644 index 62a68e7391c..00000000000 --- a/openwrt/package/cgilib/patches/200-cgitest_bugfix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- cgilib-0.5/cgitest.c.orig 1999-08-17 15:21:20.000000000 +0200 -+++ cgilib-0.5/cgitest.c 2005-08-10 20:49:01.000000000 +0200 -@@ -113,7 +113,7 @@ - cgiHeader(); - printf ("\ncgilib\n\n\n"); - printf ("

cgilib

\n", URL); -- printf ("

Cookie "Library" set

\n"); -+ printf ("

Cookie \"Library\" set

\n"); - printf ("



Test

\n"); - printf ("



Redirect

\n"); - printf ("



List Everything

\n"); diff --git a/openwrt/package/chillispot/Config.in b/openwrt/package/chillispot/Config.in deleted file mode 100644 index 34ffc6e07b7..00000000000 --- a/openwrt/package/chillispot/Config.in +++ /dev/null @@ -1,16 +0,0 @@ -config BR2_PACKAGE_CHILLISPOT - prompt "chillispot........................ Wireless LAN access point controller" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_TUN - help - ChilliSpot is an open source captive portal or wireless LAN - access point controller. It is used for authenticating users - of a wireless LAN. It supports web based login which is today's - standard for public HotSpots and it supports Wireless Protected - Access (WPA) which is the standard of the future. Authentication, - authorization and accounting (AAA) is handled by your favorite - radius server. - - http://www.chillispot.org/ - diff --git a/openwrt/package/chillispot/Makefile b/openwrt/package/chillispot/Makefile deleted file mode 100644 index 1d6323686c2..00000000000 --- a/openwrt/package/chillispot/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=chillispot -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=997827a9302a85920cfbc1334092ac0c - -PKG_SOURCE_URL:=http://www.chillispot.org/download -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CHILLISPOT,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_func_malloc_0_nonnull=yes \ - ac_cv_func_memcmp_working=yes \ - ac_cv_func_setvbuf_reversed=no \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_CHILLISPOT): - install -m0755 -d $(IDIR_CHILLISPOT)/etc/init.d - install -m0755 ./files/$(PKG_NAME).init $(IDIR_CHILLISPOT)/etc/init.d/chilli - install -m0755 -d $(IDIR_CHILLISPOT)/etc - install -m0644 $(PKG_BUILD_DIR)/doc/chilli.conf $(IDIR_CHILLISPOT)/etc/ - install -m0755 -d $(IDIR_CHILLISPOT)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/chilli $(IDIR_CHILLISPOT)/usr/sbin/ - $(RSTRIP) $(IDIR_CHILLISPOT) - $(IPKG_BUILD) $(IDIR_CHILLISPOT) $(PACKAGE_DIR) diff --git a/openwrt/package/chillispot/files/chillispot.init b/openwrt/package/chillispot/files/chillispot.init deleted file mode 100644 index 289b1fe8a55..00000000000 --- a/openwrt/package/chillispot/files/chillispot.init +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -RUN_D=/var/run -PID_F=$RUN_D/chilli.pid - -case $1 in - start) - /sbin/insmod tun >/dev/null 2>&1 - [ -d $RUN_D ] || mkdir -p $RUN_D - /usr/sbin/chilli - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/chillispot/ipkg/chillispot.conffiles b/openwrt/package/chillispot/ipkg/chillispot.conffiles deleted file mode 100644 index 08485167ddd..00000000000 --- a/openwrt/package/chillispot/ipkg/chillispot.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/chilli.conf diff --git a/openwrt/package/chillispot/ipkg/chillispot.control b/openwrt/package/chillispot/ipkg/chillispot.control deleted file mode 100644 index 0bb2badb8df..00000000000 --- a/openwrt/package/chillispot/ipkg/chillispot.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: chillispot -Priority: optional -Section: net -Depends: kmod-tun -Description: ChilliSpot is a Wireless LAN Access Point Controller. diff --git a/openwrt/package/cifsmount/Config.in b/openwrt/package/cifsmount/Config.in deleted file mode 100644 index cc82a84d82f..00000000000 --- a/openwrt/package/cifsmount/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_CIFSMOUNT - prompt "cifsmount......................... Helper utility for mounting remote CIFS shares" - tristate - default m if CONFIG_DEVEL - help - An user space helper for mounting remote CIFS shares - diff --git a/openwrt/package/cifsmount/Makefile b/openwrt/package/cifsmount/Makefile deleted file mode 100644 index e435423fe34..00000000000 --- a/openwrt/package/cifsmount/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cifsmount -PKG_VERSION:=1.5 -PKG_RELEASE:=2 - -PKG_BUILD_DIR:=$(BUILD_DIR)/cifsmount - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CIFSMOUNT,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/mount.cifs mount.cifs.c - touch $@ - -$(IPKG_CIFSMOUNT): - install -d -m0755 $(IDIR_CIFSMOUNT)/sbin - install -m0755 $(PKG_BUILD_DIR)/mount.cifs $(IDIR_CIFSMOUNT)/sbin/ - $(RSTRIP) $(IDIR_CIFSMOUNT) - $(IPKG_BUILD) $(IDIR_CIFSMOUNT) $(PACKAGE_DIR) diff --git a/openwrt/package/cifsmount/ipkg/cifsmount.control b/openwrt/package/cifsmount/ipkg/cifsmount.control deleted file mode 100644 index a556f7c6c21..00000000000 --- a/openwrt/package/cifsmount/ipkg/cifsmount.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: cifsmount -Priority: optional -Section: net -Description: mount.cifs helper application for mounting remote CIFS shares diff --git a/openwrt/package/cifsmount/mount.cifs.c b/openwrt/package/cifsmount/mount.cifs.c deleted file mode 100644 index 6a7d1e65a12..00000000000 --- a/openwrt/package/cifsmount/mount.cifs.c +++ /dev/null @@ -1,972 +0,0 @@ -/* - Mount helper utility for Linux CIFS VFS (virtual filesystem) client - Copyright (C) 2003 Steve French (sfrench@us.ibm.com) - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MOUNT_CIFS_VERSION_MAJOR "1" -#define MOUNT_CIFS_VERSION_MINOR "5" - -#ifndef MOUNT_CIFS_VENDOR_SUFFIX -#define MOUNT_CIFS_VENDOR_SUFFIX "" -#endif - -#ifndef MS_MOVE -#define MS_MOVE 8192 -#endif - -char * thisprogram; -int verboseflag = 0; -static int got_password = 0; -static int got_user = 0; -static int got_domain = 0; -static int got_ip = 0; -static int got_unc = 0; -static int got_uid = 0; -static int got_gid = 0; -static int free_share_name = 0; -static char * user_name = NULL; -char * mountpassword = NULL; - - -/* BB finish BB - - cifs_umount - open nofollow - avoid symlink exposure? - get owner of dir see if matches self or if root - call system(umount argv) etc. - -BB end finish BB */ - -static void mount_cifs_usage(void) -{ - printf("\nUsage: %s

-o \n", thisprogram); - printf("\nMount the remote target, specified as a UNC name,"); - printf(" to a local directory.\n\nOptions:\n"); - printf("\tuser=\n\tpass=\n\tdom=\n"); - printf("\nLess commonly used options:"); - printf("\n\tcredentials=,guest,perm,noperm,setuids,nosetuids,\n\trw,ro,sep=,iocharset=,suid,nosuid,exec,noexec"); - printf("\n\nOptions not needed for servers supporting CIFS Unix extensions (e.g. most Samba versions):"); - printf("\n\tuid=,gid=,dir_mode=,file_mode="); - printf("\n\nRarely used options:"); - printf("\n\tport=,rsize=,wsize=,unc=,ip=,dev,nodev"); - printf("\n\nOptions are described in more detail in the manual page"); - printf("\n\tman 8 mount.cifs\n"); - printf("\nTo display the version number of the mount helper:"); - printf("\n\t%s -V\n",thisprogram); - - if(mountpassword) { - memset(mountpassword,0,64); - free(mountpassword); - } - exit(1); -} - -/* caller frees username if necessary */ -static char * getusername(void) { - char *username = NULL; - struct passwd *password = getpwuid(getuid()); - - if (password) { - username = password->pw_name; - } - return username; -} - -char * parse_cifs_url(char * unc_name) -{ - printf("\nMounting cifs URL not implemented yet. Attempt to mount %s\n",unc_name); - return NULL; -} - -static int open_cred_file(char * file_name) -{ - char * line_buf; - char * temp_val; - FILE * fs; - int i, length; - fs = fopen(file_name,"r"); - if(fs == NULL) - return errno; - line_buf = malloc(4096); - if(line_buf == NULL) - return -ENOMEM; - - while(fgets(line_buf,4096,fs)) { - /* parse line from credential file */ - - /* eat leading white space */ - for(i=0;i<4086;i++) { - if((line_buf[i] != ' ') && (line_buf[i] != '\t')) - break; - /* if whitespace - skip past it */ - } - if (strncasecmp("username",line_buf+i,8) == 0) { - temp_val = strchr(line_buf + i,'='); - if(temp_val) { - /* go past equals sign */ - temp_val++; - for(length = 0;length<4087;length++) { - if(temp_val[length] == '\n') - break; - } - if(length > 4086) { - printf("mount.cifs failed due to malformed username in credentials file"); - memset(line_buf,0,4096); - if(mountpassword) { - memset(mountpassword,0,64); - } - exit(1); - } else { - got_user = 1; - user_name = calloc(1 + length,1); - /* BB adding free of user_name string before exit, - not really necessary but would be cleaner */ - strncpy(user_name,temp_val, length); - } - } - } else if (strncasecmp("password",line_buf+i,8) == 0) { - temp_val = strchr(line_buf+i,'='); - if(temp_val) { - /* go past equals sign */ - temp_val++; - for(length = 0;length<65;length++) { - if(temp_val[length] == '\n') - break; - } - if(length > 64) { - printf("mount.cifs failed: password in credentials file too long\n"); - memset(line_buf,0, 4096); - if(mountpassword) { - memset(mountpassword,0,64); - } - exit(1); - } else { - if(mountpassword == NULL) { - mountpassword = calloc(65,1); - } else - memset(mountpassword,0,64); - if(mountpassword) { - /* BB add handling for commas in password here */ - strncpy(mountpassword,temp_val,length); - got_password = 1; - } - } - } - } - } - fclose(fs); - if(line_buf) { - memset(line_buf,0,4096); - free(line_buf); - } - return 0; -} - -static int get_password_from_file(int file_descript, char * filename) -{ - int rc = 0; - int i; - char c; - - if(mountpassword == NULL) - mountpassword = calloc(65,1); - else - memset(mountpassword, 0, 64); - - if(filename != NULL) { - file_descript = open(filename, O_RDONLY); - if(file_descript < 0) { - printf("mount.cifs failed. %s attempting to open password file %s\n", - strerror(errno),filename); - exit(1); - } - } - /* else file already open and fd provided */ - - for(i=0;i<64;i++) { - rc = read(file_descript,&c,1); - if(rc < 0) { - printf("mount.cifs failed. Error %s reading password file\n",strerror(errno)); - memset(mountpassword,0,64); - if(filename != NULL) - close(file_descript); - exit(1); - } else if(rc == 0) { - if(mountpassword[0] == 0) { - if(verboseflag) - printf("\nWarning: null password used since cifs password file empty"); - } - break; - } else /* read valid character */ { - if((c == 0) || (c == '\n')) { - break; - } else - mountpassword[i] = c; - } - } - if((i == 64) && (verboseflag)) { - printf("\nWarning: password longer than 64 characters specified in cifs password file"); - } - got_password = 1; - if(filename != NULL) { - close(file_descript); - } - - return rc; -} - -static int parse_options(char * options, int * filesys_flags) -{ - char * data; - char * percent_char = NULL; - char * value = NULL; - char * next_keyword = NULL; - int rc = 0; - - if (!options) - return 1; - else - data = options; - - if(verboseflag) - printf("\n parsing options: %s", options); - -/* while ((data = strsep(&options, ",")) != NULL) { */ - while(data != NULL) { - /* check if ends with trailing comma */ - if(*data == 0) - break; - - /* format is keyword=value,keyword2=value2,keyword3=value3 etc.) */ - /* data = next keyword */ - /* value = next value ie stuff after equal sign */ - - next_keyword = strchr(data,','); - - /* temporarily null terminate end of keyword=value pair */ - if(next_keyword) - *next_keyword = 0; - - /* if (!*data) - continue; */ - - /* temporarily null terminate keyword to make keyword and value distinct */ - if ((value = strchr(data, '=')) != NULL) { - *value = '\0'; - value++; - } - - if (strncmp(data, "user", 4) == 0) { - if (!value || !*value) { - if(data[4] == '\0') { - if(verboseflag) - printf("\nskipping empty user mount parameter\n"); - /* remove the parm since it would otherwise be confusing - to the kernel code which would think it was a real username */ - data[0] = ','; - data[1] = ','; - data[2] = ','; - data[3] = ','; - /* BB remove it from mount line so as not to confuse kernel code */ - } else { - printf("username specified with no parameter\n"); - return 1; /* needs_arg; */ - } - } else { - if (strnlen(value, 260) < 260) { - got_user=1; - percent_char = strchr(value,'%'); - if(percent_char) { - *percent_char = ','; - if(mountpassword == NULL) - mountpassword = calloc(65,1); - if(mountpassword) { - if(got_password) - printf("\nmount.cifs warning - password specified twice\n"); - got_password = 1; - percent_char++; - strncpy(mountpassword, percent_char,64); - /* remove password from username */ - while(*percent_char != 0) { - *percent_char = ','; - percent_char++; - } - } - } - } else { - printf("username too long\n"); - return 1; - } - } - } else if (strncmp(data, "pass", 4) == 0) { - if (!value || !*value) { - if(got_password) { - printf("\npassword specified twice, ignoring second\n"); - } else - got_password = 1; - } else if (strnlen(value, 17) < 17) { - if(got_password) - printf("\nmount.cifs warning - password specified twice\n"); - got_password = 1; - } else { - printf("password too long\n"); - return 1; - } - } else if (strncmp(data, "ip", 2) == 0) { - if (!value || !*value) { - printf("target ip address argument missing"); - } else if (strnlen(value, 35) < 35) { - if(verboseflag) - printf("ip address %s override specified\n",value); - got_ip = 1; - } else { - printf("ip address too long\n"); - return 1; - } - } else if ((strncmp(data, "unc", 3) == 0) - || (strncmp(data, "target", 6) == 0) - || (strncmp(data, "path", 4) == 0)) { - if (!value || !*value) { - printf("invalid path to network resource\n"); - return 1; /* needs_arg; */ - } else if(strnlen(value,5) < 5) { - printf("UNC name too short"); - } - - if (strnlen(value, 300) < 300) { - got_unc = 1; - if (strncmp(value, "//", 2) == 0) { - if(got_unc) - printf("unc name specified twice, ignoring second\n"); - else - got_unc = 1; - } else if (strncmp(value, "\\\\", 2) != 0) { - printf("UNC Path does not begin with // or \\\\ \n"); - return 1; - } else { - if(got_unc) - printf("unc name specified twice, ignoring second\n"); - else - got_unc = 1; - } - } else { - printf("CIFS: UNC name too long\n"); - return 1; - } - } else if ((strncmp(data, "domain", 3) == 0) - || (strncmp(data, "workgroup", 5) == 0)) { - if (!value || !*value) { - printf("CIFS: invalid domain name\n"); - return 1; /* needs_arg; */ - } - if (strnlen(value, 65) < 65) { - got_domain = 1; - } else { - printf("domain name too long\n"); - return 1; - } - } else if (strncmp(data, "cred", 4) == 0) { - if (value && *value) { - rc = open_cred_file(value); - if(rc) { - printf("error %d opening credential file %s\n",rc, value); - return 1; - } - } else { - printf("invalid credential file name specified\n"); - return 1; - } - } else if (strncmp(data, "uid", 3) == 0) { - if (value && *value) { - got_uid = 1; - } - } else if (strncmp(data, "gid", 3) == 0) { - if (value && *value) { - got_gid = 1; - } - /* fmask and dmask synonyms for people used to smbfs syntax */ - } else if (strcmp(data, "file_mode") == 0 || strcmp(data, "fmask")==0) { - if (!value || !*value) { - printf ("Option '%s' requires a numerical argument\n", data); - return 1; - } - - if (value[0] != '0') { - printf ("WARNING: '%s' not expressed in octal.\n", data); - } - - if (strcmp (data, "fmask") == 0) { - printf ("WARNING: CIFS mount option 'fmask' is deprecated. Use 'file_mode' instead.\n"); - data = "file_mode"; /* BB fix this */ - } - } else if (strcmp(data, "dir_mode") == 0 || strcmp(data, "dmask")==0) { - if (!value || !*value) { - printf ("Option '%s' requires a numerical argument\n", data); - return 1; - } - - if (value[0] != '0') { - printf ("WARNING: '%s' not expressed in octal.\n", data); - } - - if (strcmp (data, "dmask") == 0) { - printf ("WARNING: CIFS mount option 'dmask' is deprecated. Use 'dir_mode' instead.\n"); - data = "dir_mode"; - } - /* the following eight mount options should be - stripped out from what is passed into the kernel - since these eight options are best passed as the - mount flags rather than redundantly to the kernel - and could generate spurious warnings depending on the - level of the corresponding cifs vfs kernel code */ - } else if (strncmp(data, "nosuid", 6) == 0) { - *filesys_flags |= MS_NOSUID; - } else if (strncmp(data, "suid", 4) == 0) { - *filesys_flags &= ~MS_NOSUID; - } else if (strncmp(data, "nodev", 5) == 0) { - *filesys_flags |= MS_NODEV; - } else if (strncmp(data, "dev", 3) == 0) { - *filesys_flags &= ~MS_NODEV; - } else if (strncmp(data, "noexec", 6) == 0) { - *filesys_flags |= MS_NOEXEC; - } else if (strncmp(data, "exec", 4) == 0) { - *filesys_flags &= ~MS_NOEXEC; - } else if (strncmp(data, "guest", 5) == 0) { - got_password=1; - } else if (strncmp(data, "ro", 2) == 0) { - *filesys_flags |= MS_RDONLY; - } else if (strncmp(data, "rw", 2) == 0) { - *filesys_flags &= ~MS_RDONLY; - } /* else if (strnicmp(data, "port", 4) == 0) { - if (value && *value) { - vol->port = - simple_strtoul(value, &value, 0); - } - } else if (strnicmp(data, "rsize", 5) == 0) { - if (value && *value) { - vol->rsize = - simple_strtoul(value, &value, 0); - } - } else if (strnicmp(data, "wsize", 5) == 0) { - if (value && *value) { - vol->wsize = - simple_strtoul(value, &value, 0); - } - } else if (strnicmp(data, "version", 3) == 0) { - } else { - printf("CIFS: Unknown mount option %s\n",data); - } */ /* nothing to do on those four mount options above. - Just pass to kernel and ignore them here */ - - /* move to next option */ - data = next_keyword+1; - - /* put overwritten equals sign back */ - if(value) { - value--; - *value = '='; - } - - /* put previous overwritten comma back */ - if(next_keyword) - *next_keyword = ','; - else - data = NULL; - } - return 0; -} - -/* Note that caller frees the returned buffer if necessary */ -char * parse_server(char ** punc_name) -{ - char * unc_name = *punc_name; - int length = strnlen(unc_name,1024); - char * share; - char * ipaddress_string = NULL; - struct hostent * host_entry; - struct in_addr server_ipaddr; - int rc; - - if(length > 1023) { - printf("mount error: UNC name too long"); - return NULL; - } - if (strncasecmp("cifs://",unc_name,7) == 0) - return parse_cifs_url(unc_name+7); - if (strncasecmp("smb://",unc_name,6) == 0) { - return parse_cifs_url(unc_name+6); - } - - if(length < 3) { - /* BB add code to find DFS root here */ - printf("\nMounting the DFS root for domain not implemented yet"); - return NULL; - } else { - if(strncmp(unc_name,"//",2) && strncmp(unc_name,"\\\\",2)) { - /* check for nfs syntax ie server:share */ - share = strchr(unc_name,':'); - if(share) { - free_share_name = 1; - *punc_name = malloc(length+3); - *share = '/'; - strncpy((*punc_name)+2,unc_name,length); - unc_name = *punc_name; - unc_name[length+2] = 0; - goto continue_unc_parsing; - } else { - printf("mount error: improperly formatted UNC name."); - printf(" %s does not begin with \\\\ or //\n",unc_name); - return NULL; - } - } else { -continue_unc_parsing: - unc_name[0] = '/'; - unc_name[1] = '/'; - unc_name += 2; - if ((share = strchr(unc_name, '/')) || - (share = strchr(unc_name,'\\'))) { - *share = 0; /* temporarily terminate the string */ - share += 1; - if(got_ip == 0) { - host_entry = gethostbyname(unc_name); - } - *(share - 1) = '/'; /* put the slash back */ - if(got_ip) { - if(verboseflag) - printf("ip address specified explicitly\n"); - return NULL; - } - if(host_entry == NULL) { - printf("mount error: could not find target server. TCP name %s not found ", unc_name); - printf(" rc = %d\n",rc); - return NULL; - } else { - /* BB should we pass an alternate version of the share name as Unicode */ - /* BB what about ipv6? BB */ - /* BB add retries with alternate servers in list */ - - memcpy(&server_ipaddr.s_addr, host_entry->h_addr, 4); - - ipaddress_string = inet_ntoa(server_ipaddr); - if(ipaddress_string == NULL) { - printf("mount error: could not get valid ip address for target server\n"); - return NULL; - } - return ipaddress_string; - } - } else { - /* BB add code to find DFS root (send null path on get DFS Referral to specified server here */ - printf("Mounting the DFS root for a particular server not implemented yet\n"); - return NULL; - } - } - } -} - -static struct option longopts[] = { - { "all", 0, NULL, 'a' }, - { "help",0, NULL, 'h' }, - { "move",0, NULL, 'm' }, - { "bind",0, NULL, 'b' }, - { "read-only", 0, NULL, 'r' }, - { "ro", 0, NULL, 'r' }, - { "verbose", 0, NULL, 'v' }, - { "version", 0, NULL, 'V' }, - { "read-write", 0, NULL, 'w' }, - { "rw", 0, NULL, 'w' }, - { "options", 1, NULL, 'o' }, - { "type", 1, NULL, 't' }, - { "rsize",1, NULL, 'R' }, - { "wsize",1, NULL, 'W' }, - { "uid", 1, NULL, '1'}, - { "gid", 1, NULL, '2'}, - { "user",1,NULL,'u'}, - { "username",1,NULL,'u'}, - { "dom",1,NULL,'d'}, - { "domain",1,NULL,'d'}, - { "password",1,NULL,'p'}, - { "pass",1,NULL,'p'}, - { "credentials",1,NULL,'c'}, - { "port",1,NULL,'P'}, - /* { "uuid",1,NULL,'U'}, */ /* BB unimplemented */ - { NULL, 0, NULL, 0 } -}; - -int main(int argc, char ** argv) -{ - int c; - int flags = MS_MANDLOCK; /* no need to set legacy MS_MGC_VAL */ - char * orgoptions = NULL; - char * share_name = NULL; - char * domain_name = NULL; - char * ipaddr = NULL; - char * uuid = NULL; - char * mountpoint; - char * options; - char * resolved_path; - char * temp; - int rc; - int rsize = 0; - int wsize = 0; - int nomtab = 0; - int uid = 0; - int gid = 0; - int optlen = 0; - int orgoptlen = 0; - struct stat statbuf; - struct utsname sysinfo; - struct mntent mountent; - FILE * pmntfile; - - /* setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); */ - - if(argc && argv) { - thisprogram = argv[0]; - } - if(thisprogram == NULL) - thisprogram = "mount.cifs"; - - uname(&sysinfo); - /* BB add workstation name and domain and pass down */ - -/* #ifdef _GNU_SOURCE - printf(" node: %s machine: %s sysname %s domain %s\n", sysinfo.nodename,sysinfo.machine,sysinfo.sysname,sysinfo.domainname); -#endif */ - - share_name = argv[1]; - mountpoint = argv[2]; - - /* add sharename in opts string as unc= parm */ - - while ((c = getopt_long (argc, argv, "afFhilL:no:O:rsSU:vVwt:", - longopts, NULL)) != -1) { - switch (c) { -/* No code to do the following options yet */ -/* case 'l': - list_with_volumelabel = 1; - break; - case 'L': - volumelabel = optarg; - break; */ -/* case 'a': - ++mount_all; - break; */ - - case '?': - case 'h': /* help */ - mount_cifs_usage (); - exit(1); - case 'n': - ++nomtab; - break; - case 'b': - flags |= MS_BIND; - break; - case 'm': - flags |= MS_MOVE; - break; - case 'o': - orgoptions = strdup(optarg); - break; - case 'r': /* mount readonly */ - flags |= MS_RDONLY; - break; - case 'U': - uuid = optarg; - break; - case 'v': - ++verboseflag; - break; - case 'V': - printf ("mount.cifs version: %s.%s%s\n", - MOUNT_CIFS_VERSION_MAJOR, - MOUNT_CIFS_VERSION_MINOR, - MOUNT_CIFS_VENDOR_SUFFIX); - if(mountpassword) { - memset(mountpassword,0,64); - } - exit (0); - case 'w': - flags &= ~MS_RDONLY; - break; - case 'R': - rsize = atoi(optarg) ; - break; - case 'W': - wsize = atoi(optarg); - break; - case '1': - uid = atoi(optarg); - break; - case '2': - gid = atoi(optarg); - break; - case 'u': - got_user = 1; - user_name = optarg; - break; - case 'd': - domain_name = optarg; - break; - case 'p': - if(mountpassword == NULL) - mountpassword = calloc(65,1); - if(mountpassword) { - got_password = 1; - strncpy(mountpassword,optarg,64); - } - break; - case 'S': - get_password_from_file(0 /* stdin */,NULL); - break; - case 't': - break; - default: - printf("unknown mount option %c\n",c); - mount_cifs_usage(); - exit(1); - } - } - - if(argc < 3) - mount_cifs_usage(); - - if (getenv("PASSWD")) { - if(mountpassword == NULL) - mountpassword = calloc(65,1); - if(mountpassword) { - strncpy(mountpassword,getenv("PASSWD"),64); - got_password = 1; - } - } else if (getenv("PASSWD_FD")) { - get_password_from_file(atoi(getenv("PASSWD_FD")),NULL); - } else if (getenv("PASSWD_FILE")) { - get_password_from_file(0, getenv("PASSWD_FILE")); - } - - if (orgoptions && parse_options(orgoptions, &flags)) - return -1; - - ipaddr = parse_server(&share_name); - if((ipaddr == NULL) && (got_ip == 0)) { - printf("No ip address specified and hostname not found\n"); - return -1; - } - - - /* BB save off path and pop after mount returns? */ - resolved_path = malloc(PATH_MAX+1); - if(resolved_path) { - /* Note that if we can not canonicalize the name, we get - another chance to see if it is valid when we chdir to it */ - if (realpath(mountpoint, resolved_path)) { - mountpoint = resolved_path; - } - } - if(chdir(mountpoint)) { - printf("mount error: can not change directory into mount target %s\n",mountpoint); - return -1; - } - - if(stat (".", &statbuf)) { - printf("mount error: mount point %s does not exist\n",mountpoint); - return -1; - } - - if (S_ISDIR(statbuf.st_mode) == 0) { - printf("mount error: mount point %s is not a directory\n",mountpoint); - return -1; - } - - if((getuid() != 0) && (geteuid() == 0)) { - if((statbuf.st_uid == getuid()) && (S_IRWXU == (statbuf.st_mode & S_IRWXU))) { -#ifndef CIFS_ALLOW_USR_SUID - /* Do not allow user mounts to control suid flag - for mount unless explicitly built that way */ - flags |= MS_NOSUID | MS_NODEV; -#endif - } else { - printf("mount error: permission denied or not superuser and mount.cifs not installed SUID\n"); - return -1; - } - } - - if(got_user == 0) - user_name = getusername(); - - if(got_password == 0) { - mountpassword = getpass("Password: "); /* BB obsolete */ - got_password = 1; - } - /* FIXME launch daemon (handles dfs name resolution and credential change) - remember to clear parms and overwrite password field before launching */ - if(orgoptions) { - optlen = strlen(orgoptions); - orgoptlen = optlen; - } else - optlen = 0; - if(share_name) - optlen += strlen(share_name) + 4; - if(user_name) - optlen += strlen(user_name) + 6; - if(ipaddr) - optlen += strlen(ipaddr) + 4; - if(mountpassword) - optlen += strlen(mountpassword) + 6; - options = malloc(optlen + 10); - - if(options == NULL) { - printf("Could not allocate memory for mount options\n"); - return -1; - } - - - options[0] = 0; - strncat(options,"unc=",4); - strcat(options,share_name); - /* scan backwards and reverse direction of slash */ - temp = strrchr(options, '/'); - if(temp > options + 6) - *temp = '\\'; - if(ipaddr) { - strncat(options,",ip=",4); - strcat(options,ipaddr); - } - if(user_name) { - strncat(options,",user=",6); - strcat(options,user_name); - } - if(mountpassword) { - strncat(options,",pass=",6); - strcat(options,mountpassword); - } - strncat(options,",ver=",5); - strcat(options,MOUNT_CIFS_VERSION_MAJOR); - - if(orgoptions) { - strcat(options,","); - strcat(options,orgoptions); - } - if(verboseflag) - printf("\nmount.cifs kernel mount options %s \n",options); - if(mount(share_name, mountpoint, "cifs", flags, options)) { - /* remember to kill daemon on error */ - switch (errno) { - case 0: - printf("mount failed but no error number set\n"); - break; - case ENODEV: - printf("mount error: cifs filesystem not supported by the system\n"); - break; - default: - printf("mount error %d = %s\n",errno,strerror(errno)); - } - printf("Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)\n"); - if(mountpassword) { - memset(mountpassword,0,64); - } - return -1; - } else { - pmntfile = setmntent(MOUNTED, "a+"); - if(pmntfile) { - mountent.mnt_fsname = share_name; - mountent.mnt_dir = mountpoint; - mountent.mnt_type = "cifs"; - mountent.mnt_opts = malloc(220); - if(mountent.mnt_opts) { - char * mount_user = getusername(); - memset(mountent.mnt_opts,0,200); - if(flags & MS_RDONLY) - strcat(mountent.mnt_opts,"ro"); - else - strcat(mountent.mnt_opts,"rw"); - if(flags & MS_MANDLOCK) - strcat(mountent.mnt_opts,",mand"); - else - strcat(mountent.mnt_opts,",nomand"); - if(flags & MS_NOEXEC) - strcat(mountent.mnt_opts,",noexec"); - if(flags & MS_NOSUID) - strcat(mountent.mnt_opts,",nosuid"); - if(flags & MS_NODEV) - strcat(mountent.mnt_opts,",nodev"); - if(flags & MS_SYNCHRONOUS) - strcat(mountent.mnt_opts,",synch"); - if(mount_user) { - if(getuid() != 0) { - strcat(mountent.mnt_opts,",user="); - strcat(mountent.mnt_opts,mount_user); - } - free(mount_user); - } - } - mountent.mnt_freq = 0; - mountent.mnt_passno = 0; - rc = addmntent(pmntfile,&mountent); - endmntent(pmntfile); - if(mountent.mnt_opts) - free(mountent.mnt_opts); - } else { - printf("could not update mount table\n"); - } - } - if(mountpassword) { - memset(mountpassword,0,64); - free(mountpassword); - } - - if(options) { - memset(options,0,optlen); - free(options); - } - - if(orgoptions) { - memset(orgoptions,0,orgoptlen); - free(orgoptions); - } - if(resolved_path) { - free(resolved_path); - } - - if(free_share_name) { - free(share_name); - } - return 0; -} - diff --git a/openwrt/package/click/Config.in b/openwrt/package/click/Config.in deleted file mode 100644 index eca8d7006a5..00000000000 --- a/openwrt/package/click/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -config BR2_PACKAGE_CLICK - prompt "click............................. The Click Modular Router" - tristate - select BR2_PACKAGE_KMOD_TUN - default m if CONFIG_DEVEL - help - http://pdos.csail.mit.edu/click/ - -config BR2_PACKAGE_ROOFNET - prompt "roofnet......................... roofnet mesh networking scripts" - tristate - depends BR2_PACKAGE_CLICK - select BR2_PACKAGE_KMOD_MADWIFI - default m if CONFIG_DEVEL - help - http://pdos.csail.mit.edu/roofnet/ - - diff --git a/openwrt/package/click/Makefile b/openwrt/package/click/Makefile deleted file mode 100644 index 06d7b4ab084..00000000000 --- a/openwrt/package/click/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=click -PKG_VERSION:=cvs.2006.03.02 -PKG_RELEASE:=1 -PKG_MD5SUM:=7aed4ba94926010d76febb797b288e98 - -ROOFNET_VERSION:=0.0.1 - -PKG_SOURCE_URL:=http://pdos.csail.mit.edu/~jbicket/click_snapshots/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CLICK,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ROOFNET,roofnet,$(ROOFNET_VERSION),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - ./configure; \ - cp include/click/config.h include/click/config-host.h; \ - rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CXXFLAGS="-static -O2 -MD" \ - CFLAGS="-static -MD" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --prefix=/usr \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --enable-wifi \ - --disable-linuxmodule \ - --enable-tools=mixed \ - --disable-dynamic-linking \ - ) - touch $@ - - -# don't build the full click (it's huge), but only include -# the elements needed for roofnet -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - BUILD_CXX="g++ -include $(PKG_BUILD_DIR)/include/click/config-host.h" \ - tools elementmap.xml - (cd $(PKG_BUILD_DIR)/userlevel; \ - ../tools/click-mkmindriver/click-mkmindriver -p roofnet -C .. \ - -f $(PKG_BUILD_DIR)/conf/wifi/sample.click \ - -A --all -E IPNameInfo -E FromHost -E ToHost -E Discard; \ - $(MAKE) -f Makefile.roofnet; \ - ) - touch $@ - -$(IPKG_CLICK): - install -d -m0755 $(IDIR_CLICK)/usr/bin - $(CP) $(PKG_BUILD_DIR)/userlevel/roofnetclick $(IDIR_CLICK)/usr/bin/click - $(CP) $(PKG_BUILD_DIR)/tools/click-align/click-align $(IDIR_CLICK)/usr/bin/click-align - $(RSTRIP) $(IDIR_CLICK) - $(IPKG_BUILD) $(IDIR_CLICK) $(PACKAGE_DIR) - - -$(IPKG_ROOFNET): - install -d -m0755 $(IDIR_ROOFNET)/usr/bin - $(CP) $(PKG_BUILD_DIR)/conf/wifi/gen_config_roofnet.sh $(IDIR_ROOFNET)/usr/bin - $(CP) $(PKG_BUILD_DIR)/conf/wifi/srcr.click $(IDIR_ROOFNET)/usr/bin - $(CP) $(PKG_BUILD_DIR)/conf/wifi/read_handler $(IDIR_ROOFNET)/usr/bin - $(CP) $(PKG_BUILD_DIR)/conf/wifi/write_handler $(IDIR_ROOFNET)/usr/bin - mkdir -p $(IDIR_ROOFNET)/etc/init.d - install -m 755 ./files/S50roofnet $(IDIR_ROOFNET)/etc/init.d/ - $(IPKG_BUILD) $(IDIR_ROOFNET) $(PACKAGE_DIR) diff --git a/openwrt/package/click/files/S50roofnet b/openwrt/package/click/files/S50roofnet deleted file mode 100755 index f4341637551..00000000000 --- a/openwrt/package/click/files/S50roofnet +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -killall -q click -cp /usr/bin/srcr.click /tmp -sh /usr/bin/gen_config_roofnet.sh > /tmp/unaligned.click -click-align /tmp/unaligned.click > /tmp/roofnet.click -/usr/bin/click /tmp/roofnet.click > /tmp/roofnet.log 2>&1 & diff --git a/openwrt/package/click/ipkg/click.control b/openwrt/package/click/ipkg/click.control deleted file mode 100644 index 4fb2b2e3b7c..00000000000 --- a/openwrt/package/click/ipkg/click.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: click -Priority: optional -Section: net -Maintainer: John Bicket -Description: A modular router software - diff --git a/openwrt/package/click/ipkg/roofnet.control b/openwrt/package/click/ipkg/roofnet.control deleted file mode 100644 index 8e26f235d08..00000000000 --- a/openwrt/package/click/ipkg/roofnet.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: roofnet -Priority: optional -Section: net -Maintainer: John Bicket -Description: The Roofnet mesh networking scripts for Click -Depends: click, kmod-tun diff --git a/openwrt/package/clinkc/Config.in b/openwrt/package/clinkc/Config.in deleted file mode 100644 index 6805564295e..00000000000 --- a/openwrt/package/clinkc/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_CLINKC - prompt "clinkc............................ Embedded UPnP library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBEXPAT - help - CyberLink for C is a UPnP library using C for small and embedded platforms. - - http://sourceforge.net/projects/clinkc - diff --git a/openwrt/package/clinkc/Makefile b/openwrt/package/clinkc/Makefile deleted file mode 100644 index caa624ce653..00000000000 --- a/openwrt/package/clinkc/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=clinkc -PKG_VERSION:=101 -PKG_RELEASE:=1 -PKG_MD5SUM:=4c8ac54a15da47203a86daf77fbc2664 - -PKG_SOURCE_URL:=@SF/clinkc/ -PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/CyberLinkC -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CLINKC,clinkc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --with-gnu-ld \ - ); - chmod +x $(PKG_BUILD_DIR)/config/install-sh - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_CLINKC): - $(CP) $(PKG_INSTALL_DIR) $(IDIR_CLINKC) - $(RSTRIP) $(IDIR_CLINKC) - $(IPKG_BUILD) $(IDIR_CLINKC) $(PACKAGE_DIR) - diff --git a/openwrt/package/clinkc/ipkg/clinkc.control b/openwrt/package/clinkc/ipkg/clinkc.control deleted file mode 100644 index cf835874ccd..00000000000 --- a/openwrt/package/clinkc/ipkg/clinkc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: clinkc -Priority: optional -Section: net -Description: CyberLink for C is a UPnP library using C for small and embedded platforms. -Priority: optional diff --git a/openwrt/package/collectd/Config.in b/openwrt/package/collectd/Config.in deleted file mode 100644 index c5bdb4c9fc4..00000000000 --- a/openwrt/package/collectd/Config.in +++ /dev/null @@ -1,43 +0,0 @@ -menu "collectd.......................... Lightweight system statistics collection daemon" - -config BR2_PACKAGE_COLLECTD - prompt "collectd........................... Lightweight system statistics collection daemon" - tristate - default m if CONFIG_DEVEL - help - collectd is a small daemon which collects system information - every 10 seconds. The values are then sent to a multicast group - to be stored in RRD files by a server process. - - http://verplant.org/collectd/ - -config BR2_PACKAGE_COLLECTD_CPU - prompt "Enable cpu support" - bool - default y - depends BR2_PACKAGE_COLLECTD - -config BR2_PACKAGE_COLLECTD_LOAD - prompt "Enable load support" - bool - default y - depends BR2_PACKAGE_COLLECTD - -config BR2_PACKAGE_COLLECTD_MEMORY - prompt "Enable memory support" - bool - default y - depends BR2_PACKAGE_COLLECTD - -config BR2_PACKAGE_COLLECTD_PING - prompt "Enable ping support" - bool - default y - depends BR2_PACKAGE_COLLECTD - -config BR2_PACKAGE_COLLECTD_TRAFFIC - prompt "Enable traffic support" - bool - default y - depends BR2_PACKAGE_COLLECTD -endmenu diff --git a/openwrt/package/collectd/Makefile b/openwrt/package/collectd/Makefile deleted file mode 100644 index e757f965a5f..00000000000 --- a/openwrt/package/collectd/Makefile +++ /dev/null @@ -1,101 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=collectd -PKG_VERSION:=3.5.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=46a4b81e46d3bb58faab1d603649d737 - -PKG_SOURCE_URL:=http://verplant.org/collectd/files -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,COLLECTD,collectd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -ifneq ($(BR2_PACKAGE_COLLECTD_CPU),y) -DISABLE_CPU:=--disable-cpu -endif -ifneq ($(BR2_PACKAGE_COLLECTD_LOAD),y) -DISABLE_LOAD:=--disable-load -endif -ifneq ($(BR2_PACKAGE_COLLECTD_MEMORY),y) -DISABLE_MEMORY:=--disable-memory -endif -ifneq ($(BR2_PACKAGE_COLLECTD_PING),y) -DISABLE_PING:=--disable-ping -endif -ifneq ($(BR2_PACKAGE_COLLECTD_TRAFFIC),y) -DISABLE_TRAFFIC:=--disable-traffic -endif - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --enable-shared \ - --disable-static \ - --disable-debug \ - $(DISABLE_CPU) \ - $(DISABLE_LOAD) \ - $(DISABLE_MEMORY) \ - $(DISABLE_PING) \ - $(DISABLE_TRAFFIC) \ - --disable-cpufreq \ - --disable-disk \ - --disable-hddtemp \ - --disable-nfs \ - --disable-processes \ - --disable-sensors \ - --disable-serial \ - --disable-swap \ - --disable-tape \ - --disable-users \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $(PKG_BUILD_DIR)/.built - -$(IPKG_COLLECTD): - install -d -m0755 $(IDIR_COLLECTD)/etc/init.d - install -d -m0755 $(IDIR_COLLECTD)/usr/sbin - install -d -m0755 $(IDIR_COLLECTD)/usr/lib/collectd - install -d -m0755 $(IDIR_COLLECTD)/var/lib/collectd - install -d -m0755 $(IDIR_COLLECTD)/var/run - $(CP) ./files/S80collectd $(IDIR_COLLECTD)/etc/init.d/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(IDIR_COLLECTD)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(IDIR_COLLECTD)/usr/lib/collectd/ - $(RSTRIP) $(IDIR_COLLECTD) - $(IPKG_BUILD) $(IDIR_COLLECTD) $(PACKAGE_DIR) - diff --git a/openwrt/package/collectd/files/S80collectd b/openwrt/package/collectd/files/S80collectd deleted file mode 100755 index aa767fbc484..00000000000 --- a/openwrt/package/collectd/files/S80collectd +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -BINARY="/usr/sbin/collectd" -PIDFILE="/var/run/collectd.pid" -DATADIR="/var/lib/collectd" - -[ -x "$BINARY" ] || exit 1; - -if [ -e "$PIDFILE" ] -then - kill $(cat "$PIDFILE") 2>/dev/null - sleep 1 -fi - -[ -d "$DATADIR" ] || mkdir -p "$DATADIR"; - -$BINARY diff --git a/openwrt/package/collectd/ipkg/collectd.control b/openwrt/package/collectd/ipkg/collectd.control deleted file mode 100644 index f8febfbb3dd..00000000000 --- a/openwrt/package/collectd/ipkg/collectd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: collectd -Priority: optional -Section: console -Maintainer: Florian Forster -Source: http://verplant.org/collectd/ -Description: System statistics collection daemon diff --git a/openwrt/package/ctorrent/Config.in b/openwrt/package/ctorrent/Config.in deleted file mode 100644 index 7295ace04f0..00000000000 --- a/openwrt/package/ctorrent/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_CTORRENT - prompt "ctorrent.......................... console-based BitTorrent client" - tristate - default m if CONFIG_DEVEL - help - CTorrent is a BitTorrent client written in the C programming language, known to - be a very robust and mature programming language, which produces fast and - optimized application. - - http://www.rahul.net/dholmes/ctorrent/ diff --git a/openwrt/package/ctorrent/Makefile b/openwrt/package/ctorrent/Makefile deleted file mode 100755 index 3429b83af42..00000000000 --- a/openwrt/package/ctorrent/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ctorrent -PKG_VERSION:=1.3.4-dnh2 -PKG_RELEASE:=1 -PKG_MD5SUM:=6635e2d0d0ee21faeb85d95cd93c137b - -PKG_SOURCE_URL:=http://www.rahul.net/dholmes/ctorrent/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-dnh2 -PKG_CAT:=zcat -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CTORRENT,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/openssl" \ - LDFLAGS="-static -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) STAGING_DIR=$(STAGING_DIR) DESTDIR=$(PKG_INSTALL_DIR) -C $(PKG_BUILD_DIR) install - -$(IPKG_CTORRENT): - mkdir -p $(IDIR_CTORRENT) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_CTORRENT)/ - $(RSTRIP) $(IDIR_CTORRENT)/ - $(IPKG_BUILD) $(IDIR_CTORRENT) $(PACKAGE_DIR) diff --git a/openwrt/package/ctorrent/ipkg/ctorrent.control b/openwrt/package/ctorrent/ipkg/ctorrent.control deleted file mode 100644 index 0b7d1d59ed1..00000000000 --- a/openwrt/package/ctorrent/ipkg/ctorrent.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ctorrent -Priority: optional -Section: net -Description: console-based BitTorrent client diff --git a/openwrt/package/cups/Config.in b/openwrt/package/cups/Config.in deleted file mode 100644 index 5358754b840..00000000000 --- a/openwrt/package/cups/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_CUPS - prompt "cups.............................. Common UNIX Printing System" - tristate - default m if CONFIG_DEVEL - help - A printer spooling system for devices with USB or LP support - - http://www.cups.org/ - diff --git a/openwrt/package/cups/Makefile b/openwrt/package/cups/Makefile deleted file mode 100644 index bb3e9d33d7f..00000000000 --- a/openwrt/package/cups/Makefile +++ /dev/null @@ -1,119 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cups -PKG_VERSION:=1.1.23 -PKG_RELEASE:=1 -PKG_MD5SUM:=4ce09b1dce09b6b9398af0daae9adf63 - -PKG_SOURCE_URL:=http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/ftp.easysw.com/pub/cups/$(PKG_VERSION) \ - http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION) \ - ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CUPS,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --with-gnu-ld \ - --with-cups-user=root \ - --with-cups-group=root \ - --without-perl \ - --without-python \ - --without-php \ - --disable-slp \ - --disable-gnutls \ - --disable-openssl \ - --disable-cdsassl \ - --disable-ssl \ - --disable-slp \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DSTROOT="$(PKG_INSTALL_DIR)" \ - STRIP="/bin/true" \ - all install - touch $@ - -$(IPKG_CUPS): - rm -rf $(IDIR_CUPS)/etc/cups - install -d -m0755 $(IDIR_CUPS)/etc/cups - $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(IDIR_CUPS)/etc/cups/ - rm -rf $(IDIR_CUPS)/etc/cups/certs - ln -sf /tmp $(IDIR_CUPS)/etc/cups/certs - install -d -m0755 $(IDIR_CUPS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_CUPS)/usr/bin/ - rm -f $(IDIR_CUPS)/usr/bin/cups-config - install -d -m0755 $(IDIR_CUPS)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(IDIR_CUPS)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(IDIR_CUPS)/usr/lib/ - install -d -m0755 $(IDIR_CUPS)/usr/share/cups/templates - $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(IDIR_CUPS)/usr/share/cups/templates/ - install -d -m0755 $(IDIR_CUPS)/usr/share/doc/cups - $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(IDIR_CUPS)/usr/share/doc/cups/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(IDIR_CUPS)/usr/share/doc/cups/ - install -d -m0755 $(IDIR_CUPS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_CUPS)/usr/sbin/ - # overwrite default config with our own - $(CP) ./files/etc/cups/* $(IDIR_CUPS)/etc/cups/ - # install initscript with priority 60 - install -d -m0755 $(IDIR_CUPS)/etc/init.d - install -m0755 ./files/cupsd.init $(IDIR_CUPS)/etc/init.d/S60cupsd - find $(IDIR_CUPS) -name CVS | xargs rm -rf - $(RSTRIP) $(IDIR_CUPS) - $(IPKG_BUILD) $(IDIR_CUPS) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libcups.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/ - -install-dev: $(STAGING_DIR)/usr/lib/libcups.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/cups-config \ - $(STAGING_DIR)/usr/include/cups \ - $(STAGING_DIR)/usr/lib/libcups.{a,so*} - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/cups/files/cupsd.init b/openwrt/package/cups/files/cupsd.init deleted file mode 100644 index 8e5fd63c482..00000000000 --- a/openwrt/package/cups/files/cupsd.init +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -mkdir -p /tmp/cups -mkdir -p /tmp/spool/cups/tmp -exec /usr/sbin/cupsd diff --git a/openwrt/package/cups/files/etc/cups/classes.conf b/openwrt/package/cups/files/etc/cups/classes.conf deleted file mode 100644 index 15afda75a23..00000000000 --- a/openwrt/package/cups/files/etc/cups/classes.conf +++ /dev/null @@ -1,7 +0,0 @@ -######################################################################## -# # -# This is a sample class configuration file. This file is included # -# from the main configuration file (cups.conf) and lists all of the # -# printer classes known to the system. # -# # -######################################################################## diff --git a/openwrt/package/cups/files/etc/cups/client.conf b/openwrt/package/cups/files/etc/cups/client.conf deleted file mode 100644 index c8d9f910ed2..00000000000 --- a/openwrt/package/cups/files/etc/cups/client.conf +++ /dev/null @@ -1,9 +0,0 @@ -######################################################################## -# # -# This is the CUPS client configuration file. This file is used to # -# define client-specific parameters, such as the default server or # -# default encryption settings. # -# # -######################################################################## - -Encryption Never diff --git a/openwrt/package/cups/files/etc/cups/cupsd.conf b/openwrt/package/cups/files/etc/cups/cupsd.conf deleted file mode 100644 index e84de453b3c..00000000000 --- a/openwrt/package/cups/files/etc/cups/cupsd.conf +++ /dev/null @@ -1,50 +0,0 @@ -######################################################################## -# # -# This is the CUPS configuration file. If you are familiar with # -# Apache or any of the other popular web servers, we've followed the # -# same format. Any configuration variable used here has the same # -# semantics as the corresponding variable in Apache. If we need # -# different functionality then a different name is used to avoid # -# confusion... # -# # -######################################################################## - - -AccessLog syslog -ErrorLog syslog -LogLevel info -PageLog syslog -PreserveJobHistory No -PreserveJobFiles No -AutoPurgeJobs Yes -MaxJobs 25 -MaxPrinterHistory 10 -#Printcap /etc/printcap -#PrintcapFormat BSD -RequestRoot /tmp/cups -#RemoteRoot remroot -User root -Group root -RIPCache 512k -TempDir /tmp/cups -Port 631 -HostNameLookups Off -KeepAlive On -Browsing On -BrowseProtocols cups - - -AuthType Basic -AuthClass System -Order Allow,Deny -Allow From All - - - -AuthType Basic -AuthClass System - -Order Allow,Deny -Allow From All - - diff --git a/openwrt/package/cups/files/etc/cups/printers.conf b/openwrt/package/cups/files/etc/cups/printers.conf deleted file mode 100644 index 88bba1b1336..00000000000 --- a/openwrt/package/cups/files/etc/cups/printers.conf +++ /dev/null @@ -1,23 +0,0 @@ - -Info USB Printer -Location -DeviceURI usb:/dev/usb/lp0 -State Idle -Accepting Yes -JobSheets none none -QuotaPeriod 0 -PageLimit 0 -KLimit 0 - - - -Info Parallel Port Printer -Location -DeviceURI parallel:/dev/printers/0 -State Idle -Accepting Yes -JobSheets none none -QuotaPeriod 0 -PageLimit 0 -KLimit 0 - diff --git a/openwrt/package/cups/ipkg/cups.conffiles b/openwrt/package/cups/ipkg/cups.conffiles deleted file mode 100644 index bed6faa3f24..00000000000 --- a/openwrt/package/cups/ipkg/cups.conffiles +++ /dev/null @@ -1,4 +0,0 @@ -/etc/cups/classes.conf -/etc/cups/client.conf -/etc/cups/cupsd.conf -/etc/cups/printers.conf diff --git a/openwrt/package/cups/ipkg/cups.control b/openwrt/package/cups/ipkg/cups.control deleted file mode 100644 index b31f929e88b..00000000000 --- a/openwrt/package/cups/ipkg/cups.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: cups -Priority: optional -Section: net -Depends: zlib -Description: Common Unix Printing System diff --git a/openwrt/package/cups/patches/100-makefile-targets.patch b/openwrt/package/cups/patches/100-makefile-targets.patch deleted file mode 100644 index 590a304b12e..00000000000 --- a/openwrt/package/cups/patches/100-makefile-targets.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- cups-1.1.23.old/Makefile 2005-01-03 20:29:44.000000000 +0100 -+++ cups-1.1.23/Makefile 2005-03-23 20:15:24.000000000 +0100 -@@ -28,7 +28,7 @@ - # Directories to make... - # - --DIRS = cups backend berkeley cgi-bin filter man pdftops \ -+DIRS = cups backend berkeley cgi-bin \ - scheduler systemv - - # diff --git a/openwrt/package/cups/patches/110-no-strip-on-install.patch b/openwrt/package/cups/patches/110-no-strip-on-install.patch deleted file mode 100644 index 1addc7593cf..00000000000 --- a/openwrt/package/cups/patches/110-no-strip-on-install.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN cups-1.1.23.old/Makedefs.in cups-1.1.23/Makedefs.in ---- cups-1.1.23.old/Makedefs.in 2005-01-03 20:29:44.000000000 +0100 -+++ cups-1.1.23/Makedefs.in 2005-03-23 20:28:06.000000000 +0100 -@@ -47,7 +47,7 @@ - # Installation programs... - # - --INSTALL_BIN = $(LIBTOOL) $(INSTALL) -m 755 -s -+INSTALL_BIN = $(LIBTOOL) $(INSTALL) -m 755 - INSTALL_DATA = $(INSTALL) -m 644 - INSTALL_DIR = $(INSTALL) -d - INSTALL_LIB = $(LIBTOOL) $(INSTALL) -m 755 diff --git a/openwrt/package/cups/patches/120-documentation-url.patch b/openwrt/package/cups/patches/120-documentation-url.patch deleted file mode 100644 index 07d090c2a2a..00000000000 --- a/openwrt/package/cups/patches/120-documentation-url.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- cups-1.1.23/doc/index.html.orig 2005-01-03 21:13:59.000000000 +0100 -+++ cups-1.1.23/doc/index.html 2005-03-23 22:18:15.000000000 +0100 -@@ -6,7 +6,7 @@ - Easy Software Products Home Page - Do Administration Tasks - Manage Printer Classes Status -- On-Line Help -+ On-Line Help - Manage Jobs - Manage Printers - Download the Current CUPS Software -@@ -20,7 +20,7 @@ - -

Do Administration Tasks

-

Manage Printer Classes

--

On-Line Help

-+

On-Line Help

-

Manage Jobs

-

Manage Printers

-

Download the Current CUPS Software

diff --git a/openwrt/package/curl/Config.in b/openwrt/package/curl/Config.in deleted file mode 100644 index 9f8768c3bd0..00000000000 --- a/openwrt/package/curl/Config.in +++ /dev/null @@ -1,27 +0,0 @@ -config BR2_COMPILE_CURL - tristate - default n - depends BR2_PACKAGE_LIBCURL - -config BR2_PACKAGE_LIBCURL - prompt "libcurl........................... A client-side URL transfer library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_CURL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - A client-side URL transfer library. - - http://curl.haxx.se/ - -config BR2_PACKAGE_CURL - prompt "curl............................ A client-side URL transfer tool" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBCURL - help - A client-side URL transfer tool. - - http://curl.haxx.se/ - diff --git a/openwrt/package/curl/Makefile b/openwrt/package/curl/Makefile deleted file mode 100644 index 1a4ee867712..00000000000 --- a/openwrt/package/curl/Makefile +++ /dev/null @@ -1,131 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=curl -PKG_VERSION:=7.14.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=46ce665e47d37fce1a0bad935cce58a9 - -PKG_SOURCE_URL:=http://curl.haxx.se/download/ \ - http://www.mirrorspace.org/curl/ \ - http://curl.mirror.internet.tp/download/ \ - ftp://ftp.sunet.se/pub/www/utilities/curl/ \ - ftp://ftp.planetmirror.com/pub/curl/ \ - http://www.mirrormonster.com/curl/download/ \ - http://curl.mirrors.cyberservers.net/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CURL,curl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIBCURL,libcurl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --disable-thread \ - --enable-cookies \ - --enable-crypto-auth \ - --enable-nonblocking \ - --enable-file \ - --enable-ftp \ - --enable-http \ - --enable-ipv6 \ - --disable-ares \ - --disable-debug \ - --disable-dict \ - --disable-gopher \ - --disable-ldap \ - --disable-manual \ - --disable-sspi \ - --disable-telnet \ - --disable-verbose \ - --with-random="/dev/urandom" \ - --with-ssl="$(STAGING_DIR)/usr" \ - --without-ca-bundle \ - --without-gnutls \ - --without-libidn \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_CURL): - install -m0755 -d $(IDIR_CURL)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/curl $(IDIR_CURL)/usr/bin/ - $(RSTRIP) $(IDIR_CURL) - $(IPKG_BUILD) $(IDIR_CURL) $(PACKAGE_DIR) - -$(IPKG_LIBCURL): - install -m0755 -d $(IDIR_LIBCURL)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(IDIR_LIBCURL)/usr/lib/ - $(RSTRIP) $(IDIR_LIBCURL) - $(IPKG_BUILD) $(IDIR_LIBCURL) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libcurl.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so* $(STAGING_DIR)/usr/lib/ - $(SED) 's,-I/usr/include,,g' $(STAGING_DIR)/usr/bin/curl-config - $(SED) 's,-L/usr/lib,,g' $(STAGING_DIR)/usr/bin/curl-config - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libcurl.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/curl-config \ - $(STAGING_DIR)/usr/include/curl \ - $(STAGING_DIR)/usr/lib/libcurl.a \ - $(STAGING_DIR)/usr/lib/libcurl.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/curl/ipkg/curl.control b/openwrt/package/curl/ipkg/curl.control deleted file mode 100644 index 17ebb4169b4..00000000000 --- a/openwrt/package/curl/ipkg/curl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: curl -Priority: optional -Section: net -Depends: libcurl -Description: a client-side URL transfer tool diff --git a/openwrt/package/curl/ipkg/libcurl.control b/openwrt/package/curl/ipkg/libcurl.control deleted file mode 100644 index fa73b46c113..00000000000 --- a/openwrt/package/curl/ipkg/libcurl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libcurl -Priority: optional -Section: libs -Depends: libopenssl, zlib -Description: a client-side URL transfer library diff --git a/openwrt/package/curl/patches/500-configure_cross.patch b/openwrt/package/curl/patches/500-configure_cross.patch deleted file mode 100644 index 7fa921c988f..00000000000 --- a/openwrt/package/curl/patches/500-configure_cross.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -ruN curl-7.14.0-old/configure curl-7.14.0-new/configure ---- curl-7.14.0-old/configure 2005-05-14 00:23:47.000000000 +0200 -+++ curl-7.14.0-new/configure 2005-09-02 02:03:38.000000000 +0200 -@@ -26132,10 +26132,10 @@ - - fi - -- if test "$OPENSSL_ENABLED" = "1"; then -- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXTRA_SSL/lib$libsuff" -- export LD_LIBRARY_PATH -- fi -+# if test "$OPENSSL_ENABLED" = "1"; then -+# LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXTRA_SSL/lib$libsuff" -+# export LD_LIBRARY_PATH -+# fi - - fi - -@@ -26325,8 +26325,8 @@ - echo "$as_me: detected GnuTLS version $version" >&6;} - - -- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff" -- export LD_LIBRARY_PATH -+# LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff" -+# export LD_LIBRARY_PATH - fi - - fi -diff -ruN curl-7.14.0-old/configure.ac curl-7.14.0-new/configure.ac ---- curl-7.14.0-old/configure.ac 2005-05-13 23:19:21.000000000 +0200 -+++ curl-7.14.0-new/configure.ac 2005-09-02 02:03:45.000000000 +0200 -@@ -917,13 +917,13 @@ - - fi - -- if test "$OPENSSL_ENABLED" = "1"; then -- dnl when the ssl shared libs were found in a path that the run-time linker -- dnl doesn't search through, we need to add it to LD_LIBRARY_PATH to -- dnl prevent further configure tests to fail due to this -- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXTRA_SSL/lib$libsuff" -- export LD_LIBRARY_PATH -- fi -+# if test "$OPENSSL_ENABLED" = "1"; then -+# dnl when the ssl shared libs were found in a path that the run-time linker -+# dnl doesn't search through, we need to add it to LD_LIBRARY_PATH to -+# dnl prevent further configure tests to fail due to this -+# LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXTRA_SSL/lib$libsuff" -+# export LD_LIBRARY_PATH -+# fi - - fi - -@@ -1021,8 +1021,8 @@ - dnl LD_LIBRARY_PATH to prevent further configure tests to fail - dnl due to this - -- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff" -- export LD_LIBRARY_PATH -+# LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff" -+# export LD_LIBRARY_PATH - fi - - fi diff --git a/openwrt/package/cutter/Config.in b/openwrt/package/cutter/Config.in deleted file mode 100644 index 2466df69e43..00000000000 --- a/openwrt/package/cutter/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_CUTTER - prompt "cutter............................ allows an user to abort TCP/IP connections" - tristate - default m if CONFIG_DEVEL - help - "Cutter" is an open source program that allows Linux firewall - administrators to abort TCP/IP connections routed over the - firewall or router on which it is run. - - http://www.lowth.com/cutter/ - diff --git a/openwrt/package/cutter/Makefile b/openwrt/package/cutter/Makefile deleted file mode 100755 index 418718f1a5c..00000000000 --- a/openwrt/package/cutter/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cutter -PKG_VERSION:=1.03 -PKG_RELEASE:=1 -PKG_MD5SUM:=50093db9b64277643969ee75b83ebbd1 - -PKG_SOURCE_URL:=http://www.lowth.com/cutter/software/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,CUTTER,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) $(PKG_BUILD_DIR)/cutter.c -o $(PKG_BUILD_DIR)/cutter - install -d -m0755 $(PKG_INSTALL_DIR)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/cutter $(PKG_INSTALL_DIR)/usr/sbin/ - -$(IPKG_CUTTER): - mkdir -p $(IDIR_CUTTER) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_CUTTER)/ - $(RSTRIP) $(IDIR_CUTTER)/ - $(IPKG_BUILD) $(IDIR_CUTTER) $(PACKAGE_DIR) diff --git a/openwrt/package/cutter/ipkg/cutter.control b/openwrt/package/cutter/ipkg/cutter.control deleted file mode 100644 index 6c9169222d2..00000000000 --- a/openwrt/package/cutter/ipkg/cutter.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: cutter -Architecture: mipsel -Section: net -Description: "Cutter" is an open source program that allows Linux firewall administrators to abort TCP/IP connections routed over the firewall or router on which it is run. -Priority: optional diff --git a/openwrt/package/cyrus-sasl/Config.in b/openwrt/package/cyrus-sasl/Config.in deleted file mode 100644 index 599a87c5dbc..00000000000 --- a/openwrt/package/cyrus-sasl/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_CYRUS_SASL - tristate - default n - depends BR2_PACKAGE_LIBSASL2 - -config BR2_PACKAGE_LIBSASL2 - prompt "libsasl2.......................... General purpose authentication library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_CYRUS_SASL - help - A general purpose authentication library. - - http://asg.web.cmu.edu/sasl/ - diff --git a/openwrt/package/cyrus-sasl/Makefile b/openwrt/package/cyrus-sasl/Makefile deleted file mode 100644 index e89bee18944..00000000000 --- a/openwrt/package/cyrus-sasl/Makefile +++ /dev/null @@ -1,127 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cyrus-sasl -PKG_VERSION:=2.1.20 -PKG_RELEASE:=1 -PKG_MD5SUM:=268ead27f4ac39bcfe17d9e38e0f2977 - -PKG_SOURCE_URL:=http://ftp.andrew.cmu.edu/pub/cyrus-mail/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBSASL2,libsasl2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-sample \ - --enable-staticdlopen \ - --disable-java \ - --disable-alwaystrue \ - --disable-checkapop \ - --enable-cram \ - --enable-digest \ - --disable-otp \ - --disable-srp \ - --disable-srp-setpass \ - --disable-krb4 \ - --disable-gssapi \ - --disable-gss_mutexes \ - --enable-plain \ - --enable-anon \ - --disable-login \ - --disable-ntlm \ - --disable-sql \ - --with-dblib="none" \ - --without-gdbm \ - --with-devrandom="/dev/urandom" \ - --without-pam \ - --without-saslauthd \ - --without-authdaemond \ - --without-pwcheck \ - --with-ipctype=unix \ - --with-openssl="$(STAGING_DIR)/usr" \ - --without-des \ - --without-opie \ - --without-ldap \ - --without-mysql \ - --without-pgsql \ - --without-sqlite \ - --without-rc4 \ - --without-dmalloc \ - --without-sfio \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR)/include \ - CC="$(HOSTCC)" \ - LINK="$(HOSTCC) -o makemd5 -lc" \ - CFLAGS="" \ - makemd5 - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBSASL2): - install -m0755 -d $(IDIR_LIBSASL2)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(IDIR_LIBSASL2)/usr/lib/ - install -m0755 -d $(IDIR_LIBSASL2)/usr/lib/sasl2 - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(IDIR_LIBSASL2)/usr/lib/sasl2/ - $(RSTRIP) $(IDIR_LIBSASL2) - $(IPKG_BUILD) $(IDIR_LIBSASL2) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libsasl2.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(STAGING_DIR)/usr/lib/ - ln -sf libsasl2.a $(STAGING_DIR)/usr/lib/libsasl.a - ln -sf libsasl2.so $(STAGING_DIR)/usr/lib/libsasl.so - mkdir -p $(STAGING_DIR)/usr/lib/sasl2 - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(STAGING_DIR)/usr/lib/sasl2/ - -install-dev: $(STAGING_DIR)/usr/lib/libsasl2.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/sasl - rm -rf $(STAGING_DIR)/usr/lib/libsasl{2,}.{a,so*} - rm -rf $(STAGING_DIR)/usr/lib/sasl2 - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/cyrus-sasl/ipkg/libsasl2.control b/openwrt/package/cyrus-sasl/ipkg/libsasl2.control deleted file mode 100644 index 82e0f0a485c..00000000000 --- a/openwrt/package/cyrus-sasl/ipkg/libsasl2.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libsasl2 -Priority: optional -Section: libs -Description: a general purpose authentication library diff --git a/openwrt/package/cyrus-sasl/patches/cyrus-sasl-2.1.20-gcc4.patch b/openwrt/package/cyrus-sasl/patches/cyrus-sasl-2.1.20-gcc4.patch deleted file mode 100644 index 118b5a4e4fb..00000000000 --- a/openwrt/package/cyrus-sasl/patches/cyrus-sasl-2.1.20-gcc4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- cyrus-sasl-2.1.20/lib/client.c~ 2003-11-11 11:26:06.000000000 -0500 -+++ cyrus-sasl-2.1.20/lib/client.c 2005-05-31 22:34:14.000000000 -0400 -@@ -61,7 +61,7 @@ - - static cmech_list_t *cmechlist; /* global var which holds the list */ - --static sasl_global_callbacks_t global_callbacks; -+sasl_global_callbacks_t global_callbacks; - - static int _sasl_client_active = 0; - diff --git a/openwrt/package/deco/Config.in b/openwrt/package/deco/Config.in deleted file mode 100644 index 3b0682d533b..00000000000 --- a/openwrt/package/deco/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_DECO - prompt "deco.............................. Text-based full featured file manager" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - A clone of Norton Commander for Unix. Text-based, full featured - file manager. - - http://deco.sourceforge.net/ - diff --git a/openwrt/package/deco/Makefile b/openwrt/package/deco/Makefile deleted file mode 100644 index 081de39cd33..00000000000 --- a/openwrt/package/deco/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=deco -PKG_VERSION:=39 -PKG_RELEASE:=1 -PKG_MD5SUM:=f77f60e8be0cae1f814cba1ef61bf4d0 - -PKG_SOURCE_URL:=@SF/deco -PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tgz - -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,DECO,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_DECO): - install -m0755 -d $(IDIR_DECO)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/deco $(IDIR_DECO)/usr/bin/deco - install -m0755 -d $(IDIR_DECO)/usr/lib/deco - install -m0644 $(PKG_BUILD_DIR)/profile $(IDIR_DECO)/usr/lib/deco/profile - install -m0644 $(PKG_BUILD_DIR)/menu $(IDIR_DECO)/usr/lib/deco/menu - $(RSTRIP) $(IDIR_DECO) - $(IPKG_BUILD) $(IDIR_DECO) $(PACKAGE_DIR) - diff --git a/openwrt/package/deco/ipkg/deco.control b/openwrt/package/deco/ipkg/deco.control deleted file mode 100644 index f7e8c4348b5..00000000000 --- a/openwrt/package/deco/ipkg/deco.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: deco -Priority: optional -Section: misc -Depends: libncurses -Description: Text-based, full featured file manager diff --git a/openwrt/package/deco/patches/100-tty.c.patch b/openwrt/package/deco/patches/100-tty.c.patch deleted file mode 100644 index f37e4e2a6c5..00000000000 --- a/openwrt/package/deco/patches/100-tty.c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/tty.c 2005-09-25 00:23:41.671022039 -0700 -+++ str_new/tty.c 2005-09-25 01:09:37.189119615 -0700 -@@ -14,7 +14,7 @@ - #if HAVE_TERMIOS_H - # include - # if HAVE_SYS_IOCTL_H --# include -+/*# include */ - # endif - # define HAVE_TERMIO_H 1 - # define termio termios diff --git a/openwrt/package/dhcp-forwarder/Config.in b/openwrt/package/dhcp-forwarder/Config.in deleted file mode 100644 index 2c99809efb1..00000000000 --- a/openwrt/package/dhcp-forwarder/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_DHCP_FORWARDER - prompt "dhcp-forwarder.................... DHCP relay agent" - tristate - default m if CONFIG_DEVEL - help - A DHCP relay agent - - http://www.nongnu.org/dhcp-fwd/ - diff --git a/openwrt/package/dhcp-forwarder/Makefile b/openwrt/package/dhcp-forwarder/Makefile deleted file mode 100644 index a7cb9098aa7..00000000000 --- a/openwrt/package/dhcp-forwarder/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dhcp-forwarder -PKG_VERSION:=0.7 -PKG_RELEASE:=4 -PKG_MD5SUM:=e7f876e615ebc3f96418f6477b4451e2 - -PKG_SOURCE_URL:=http://savannah.nongnu.org/download/dhcp-fwd -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,DHCP_FORWARDER,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ac_cv_func_malloc_0_nonnull="yes" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --disable-dietlibc \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - cfg_filename="/etc/dhcp-fwd.conf" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_DHCP_FORWARDER): - install -m0755 -d $(IDIR_DHCP_FORWARDER)/etc - install -m0644 $(PKG_BUILD_DIR)/contrib/dhcp-fwd.conf $(IDIR_DHCP_FORWARDER)/etc/ - install -m0755 -d $(IDIR_DHCP_FORWARDER)/etc/init.d - install -m0755 ./files/dhcp-fwd.init $(IDIR_DHCP_FORWARDER)/etc/init.d/dhcp-fwd - install -m0755 -d $(IDIR_DHCP_FORWARDER)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(IDIR_DHCP_FORWARDER)/usr/bin/ - $(RSTRIP) $(IDIR_DHCP_FORWARDER) - $(IPKG_BUILD) $(IDIR_DHCP_FORWARDER) $(PACKAGE_DIR) diff --git a/openwrt/package/dhcp-forwarder/files/dhcp-fwd.init b/openwrt/package/dhcp-forwarder/files/dhcp-fwd.init deleted file mode 100644 index 6ad3858e890..00000000000 --- a/openwrt/package/dhcp-forwarder/files/dhcp-fwd.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -LOG_D=/var/log -RUN_D=/var/run -PID_F=$RUN_D/dhcpd-fwd.pid - -case $1 in - start) - [ -d $LOG_D ] || mkdir -p $LOG_D - [ -d $RUN_D ] || mkdir -p $RUN_D - dhcp-fwd - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles b/openwrt/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles deleted file mode 100644 index 70be85a8a4d..00000000000 --- a/openwrt/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/dhcp-fwd.conf diff --git a/openwrt/package/dhcp-forwarder/ipkg/dhcp-forwarder.control b/openwrt/package/dhcp-forwarder/ipkg/dhcp-forwarder.control deleted file mode 100644 index 9958ddb3975..00000000000 --- a/openwrt/package/dhcp-forwarder/ipkg/dhcp-forwarder.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: dhcp-forwarder -Priority: optional -Section: net -Description: a DHCP relay agent diff --git a/openwrt/package/dhcp-forwarder/patches/00-big_endian.patch b/openwrt/package/dhcp-forwarder/patches/00-big_endian.patch deleted file mode 100644 index add157d3f47..00000000000 --- a/openwrt/package/dhcp-forwarder/patches/00-big_endian.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- dhcp-forwarder-0.7/src/dhcp.h 2004-06-22 03:46:56.000000000 -0700 -+++ dhcp-forwarder-0.7-x/src/dhcp.h 2005-10-06 17:04:14.000000000 -0700 -@@ -89,7 +89,7 @@ - optDHCP_COOKIE = 0x63538263u, - flgDHCP_BCAST = 0x0080u - #else -- DHCP_COOKIE = 0x63825363u, -+ optDHCP_COOKIE = 0x63825363u, - flgDHCP_BCAST = 0x8000u - #endif - }; diff --git a/openwrt/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch b/openwrt/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch deleted file mode 100644 index ef849133022..00000000000 --- a/openwrt/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -pur dhcp-forwarder-0.7-orig/src/wrappers.h dhcp-forwarder-0.7-patched/src/wrappers.h ---- dhcp-forwarder-0.7-orig/src/wrappers.h 2004-06-22 12:46:56.000000000 +0200 -+++ dhcp-forwarder-0.7-patched/src/wrappers.h 2005-12-27 12:28:10.464289435 +0100 -@@ -65,7 +65,14 @@ Egetgrnam(char const *name) - /*@*/ - { - /*@observer@*/struct group const *res = getgrnam(name); -- FatalErrnoError(res==0, 1, "getgrnam()"); -+ -+ FatalErrnoError((res == NULL) && (errno != 0), 1, "getgrnam()"); -+ -+ if (res == NULL) -+ { -+ fprintf (stderr, "No such group: `%s'\n", name); -+ exit (1); -+ } - - /*@-freshtrans@*/ - /*@-mustfreefresh@*/ -@@ -80,7 +87,14 @@ Egetpwnam(char const *name) - /*@*/ - { - struct passwd const *res = getpwnam(name); -- FatalErrnoError(res==0, 1, "getpwnam()"); -+ -+ FatalErrnoError((res == NULL) && (errno != 0), 1, "getpwnam()"); -+ -+ if (res == NULL) -+ { -+ fprintf (stderr, "No such user: `%s'\n", name); -+ exit (1); -+ } - - return res; - } diff --git a/openwrt/package/dhcp/Config.in b/openwrt/package/dhcp/Config.in deleted file mode 100644 index f29beeeda05..00000000000 --- a/openwrt/package/dhcp/Config.in +++ /dev/null @@ -1,30 +0,0 @@ -#menu "dhcp.............................. ISC DHCP (Dynamic Host Configuration Protocol) implementation" - -config BR2_COMPILE_DHCP - tristate - default n - depends BR2_PACKAGE_DHCP_RELAY || BR2_PACKAGE_DHCP_SERVER - -config BR2_PACKAGE_DHCP_RELAY - prompt "dhcp-relay........................ ISC DHCP relay" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_DHCP - help - ISC (Internet Software Consortium) DHCP (Dynamic Host Configuration - Protocol) relay daemon. - - http://www.isc.org/ - -config BR2_PACKAGE_DHCP_SERVER - prompt "dhcp-server....................... ISC DHCP server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_DHCP - help - ISC (Internet Software Consortium) DHCP (Dynamic Host Configuration - Protocol) server daemon. - - http://www.isc.org/ - -#endmenu diff --git a/openwrt/package/dhcp/Makefile b/openwrt/package/dhcp/Makefile deleted file mode 100644 index 8ee56ff4a6f..00000000000 --- a/openwrt/package/dhcp/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dhcp -PKG_VERSION:=3.0.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=f91416a0b8ed3fd0601688cf0b7df58f - -PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,DHCP_RELAY,dhcp-relay,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,DHCP_SERVER,dhcp-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR) ; \ - ./configure \ - --copts "$(TARGET_CFLAGS)" \ - linux-2.2 \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_DHCP_RELAY): - install -d -m0755 $(IDIR_DHCP_RELAY)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(IDIR_DHCP_RELAY)/usr/sbin/ - $(RSTRIP) $(IDIR_DHCP_RELAY) - $(IPKG_BUILD) $(IDIR_DHCP_RELAY) $(PACKAGE_DIR) - -$(IPKG_DHCP_SERVER): - install -d -m0755 $(IDIR_DHCP_SERVER)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(IDIR_DHCP_SERVER)/usr/sbin/ - $(RSTRIP) $(IDIR_DHCP_SERVER) - $(IPKG_BUILD) $(IDIR_DHCP_SERVER) $(PACKAGE_DIR) diff --git a/openwrt/package/dhcp/ipkg/dhcp-relay.control b/openwrt/package/dhcp/ipkg/dhcp-relay.control deleted file mode 100644 index fbd3d20b85e..00000000000 --- a/openwrt/package/dhcp/ipkg/dhcp-relay.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: dhcp-relay -Priority: optional -Section: net -Description: ISC DHCP relay diff --git a/openwrt/package/dhcp/ipkg/dhcp-server.control b/openwrt/package/dhcp/ipkg/dhcp-server.control deleted file mode 100644 index a9b86a18350..00000000000 --- a/openwrt/package/dhcp/ipkg/dhcp-server.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: dhcp-server -Priority: optional -Section: net -Description: ISC DHCP server diff --git a/openwrt/package/dhcp6/Config.in b/openwrt/package/dhcp6/Config.in deleted file mode 100644 index f00e281e4d3..00000000000 --- a/openwrt/package/dhcp6/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_DHCP6 - prompt "dhcp6............................. IPv6 DHCP server and client" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - This is the first ever open source implementation of Dynamic Host Configuration Protocol for IPv6 (DHCPv6) server and client on Linux Operating System. The server provides leases (durations or lifetimes) on IPv6 addresses to the clients who request for it diff --git a/openwrt/package/dhcp6/Makefile b/openwrt/package/dhcp6/Makefile deleted file mode 100755 index e007abad295..00000000000 --- a/openwrt/package/dhcp6/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dhcp6 -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=86193dfa62137db3ea459543db4f1102 -PKG_SOURCE_URL:=@SF/dhcpv6-linux -PKG_SOURCE:=dhcpv6-linux-$(PKG_VERSION).zip -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=unzip - -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,DHCP6,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) CC=$(TARGET_CC) STAGING_DIR=$(STAGING_DIR) -C $(PKG_BUILD_DIR)/server - $(MAKE) CC=$(TARGET_CC) STAGING_DIR=$(STAGING_DIR) -C $(PKG_BUILD_DIR)/client - install -d $(PKG_INSTALL_DIR)/usr/sbin $(PKG_INSTALL_DIR)/etc/dhcp{d6,6} - install -m0755 $(PKG_BUILD_DIR)/client/cli $(PKG_INSTALL_DIR)/usr/sbin/dhcp6client - install -m0755 $(PKG_BUILD_DIR)/server/serv $(PKG_INSTALL_DIR)/usr/sbin/dhcpd6 - install -m0755 $(PKG_BUILD_DIR)/server/*.conf $(PKG_INSTALL_DIR)/etc/dhcpd6/ - install -m0755 $(PKG_BUILD_DIR)/client/*.conf $(PKG_INSTALL_DIR)/etc/dhcp6/ - touch $@ - -$(IPKG_DHCP6): - mkdir -p $(IDIR_DHCP6) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_DHCP6)/ - $(RSTRIP) $(IDIR_DHCP6) - $(IPKG_BUILD) $(IDIR_DHCP6) $(PACKAGE_DIR) diff --git a/openwrt/package/dhcp6/ipkg/dhcp6.control b/openwrt/package/dhcp6/ipkg/dhcp6.control deleted file mode 100755 index cc030a0e2b0..00000000000 --- a/openwrt/package/dhcp6/ipkg/dhcp6.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: dhcp6 -Section: net -Architecture: mipsel -Priority: optional -Description: This is the first ever open source implementation of Dynamic Host Configuration Protocol for IPv6 (DHCPv6) server and client on Linux Operating System. The server provides leases (durations or lifetimes) on IPv6 addresses to the clients who request for it. diff --git a/openwrt/package/dhcp6/ipkg/files/conffiles b/openwrt/package/dhcp6/ipkg/files/conffiles deleted file mode 100644 index 267baa94d92..00000000000 --- a/openwrt/package/dhcp6/ipkg/files/conffiles +++ /dev/null @@ -1,4 +0,0 @@ -/etc/dhcpd6/dhcpd6.conf -/etc/dhcpd6/leases6.conf -/etc/dhcpd6/partial_leases6.conf -/etc/dhcp6/sollicit.conf diff --git a/openwrt/package/dhcp6/patches/01-remove_debug.patch b/openwrt/package/dhcp6/patches/01-remove_debug.patch deleted file mode 100644 index d39eeb12619..00000000000 --- a/openwrt/package/dhcp6/patches/01-remove_debug.patch +++ /dev/null @@ -1,118 +0,0 @@ -diff -urN orig/dhcp6-1.0/client/Makefile dhcp6-1.0/client/Makefile ---- orig/dhcp6-1.0/client/Makefile 2025-06-28 23:21:40.000000000 +0200 -+++ dhcp6-1.0/client/Makefile 2005-12-13 13:43:11.000000000 +0100 -@@ -1,42 +1,40 @@ -- --CC = gcc - STD_HEADERS = stdhead.h head.h struct.h options_type.h message_type.h states.h timer_val.h constants.h macros.h status_codes.h - OBJECT_FILES = client.o solicit.o clilib.o parse.o request.o decline.o renew.o rebind.o release.o - HEADER_FILES = solicit.h clilib.h parse.h request.h decline.h renew.h rebind.h release.h -- -+IFLAGS = -I$(STAGING_DIR)/usr/include - - dhcpv6_client : dhcpv6_client.c cli -- $(CC) -g3 dhcpv6_client.c -o dhcpv6_client -+ $(CC) $(IFLAGS) dhcpv6_client.c -o dhcpv6_client - - cli : $(OBJECT_FILES) -- $(CC) -g3 $(OBJECT_FILES) -o cli -lncurses -+ $(CC) $(IFLAGS) $(OBJECT_FILES) -o cli -L$(STAGING_DIR)/usr/lib -lncurses - - client.o : client.c $(STD_HEADERS) $(HEADER_FILES) -- $(CC) -g3 -c client.c -o client.o -+ $(CC) $(IFLAGS) -c client.c -o client.o - - release.o : release.c release.h clilib.h -- $(CC) -g3 -c release.c -o release.o -+ $(CC) $(IFLAGS) -c release.c -o release.o - - rebind.o : rebind.c rebind.h clilib.h -- $(CC) -g3 -c rebind.c -o rebind.o -+ $(CC) $(IFLAGS) -c rebind.c -o rebind.o - - renew.o : renew.c renew.h clilib.h -- $(CC) -g3 -c renew.c -o renew.o -+ $(CC) $(IFLAGS) -c renew.c -o renew.o - - request.o : request.c request.h clilib.h -- $(CC) -g3 -c request.c -o request.o -+ $(CC) $(IFLAGS) -c request.c -o request.o - - decline.o : decline.c decline.h clilib.h parse.h solicit.h -- $(CC) -g3 -c decline.c -o decline.o -+ $(CC) $(IFLAGS) -c decline.c -o decline.o - - solicit.o : solicit.c solicit.h clilib.h parse.h -- $(CC) -g3 -c solicit.c -o solicit.o -+ $(CC) $(IFLAGS) -c solicit.c -o solicit.o - - clilib.o : clilib.c clilib.h parse.h -- $(CC) -g3 -c clilib.c -o clilib.o -+ $(CC) $(IFLAGS) -c clilib.c -o clilib.o - - parse.o : parse.c parse.h clilib.h -- $(CC) -g3 -c parse.c -o parse.o -+ $(CC) $(IFLAGS) -c parse.c -o parse.o - - clean : - rm -f *.o cli dhcpv6_client -diff -urN orig/dhcp6-1.0/client/clilib.c dhcp6-1.0/client/clilib.c ---- orig/dhcp6-1.0/client/clilib.c 2025-06-28 23:21:40.000000000 +0200 -+++ dhcp6-1.0/client/clilib.c 2005-12-13 13:42:43.000000000 +0100 -@@ -554,7 +554,7 @@ - - void generate_trans_id (u_int32_t *trans_id) - { -- extern u_int32_t g_trans_id; -+ extern int g_trans_id; - time_t t; - srand (time (&t)); - *trans_id = 0; -@@ -890,9 +890,7 @@ - break; - - default : --#if DEBUG == 3 - printf ("Unrecognized DUID type\n"); --#endif - } - - next_opt = (struct OPTIONS *) malloc (sizeof (struct OPTIONS)); -diff -urN orig/dhcp6-1.0/server/Makefile dhcp6-1.0/server/Makefile ---- orig/dhcp6-1.0/server/Makefile 2002-06-28 14:50:04.000000000 +0200 -+++ dhcp6-1.0/server/Makefile 2005-12-13 11:35:53.000000000 +0100 -@@ -1,27 +1,26 @@ --CC = gcc - STD_HEADERS = stdhead.h head.h struct.h options_type.h message_type.h macros.h status_codes.h constants.h - OBJECT_FILES = server.o lib.o advertise.o parse.o leases.o reply.o - - serv: $(OBJECT_FILES) -- $(CC) -g3 $(OBJECT_FILES) -o serv -+ $(CC) $(OBJECT_FILES) -o serv - - lib.o: lib.c lib.h $(STD_HEADERS) -- $(CC) -g3 -c lib.c -o lib.o -+ $(CC) -c lib.c -o lib.o - - parse.o: parse.c parse.h $(STD_HEADERS) -- $(CC) -g3 -c parse.c -o parse.o -+ $(CC) -c parse.c -o parse.o - - leases.o: leases.c leases.h $(STD_HEADERS) -- $(CC) -g3 -c leases.c -o leases.o -+ $(CC) -c leases.c -o leases.o - - advertise.o: advertise.c advertise.h $(STD_HEADERS) -- $(CC) -g3 -c advertise.c -o advertise.o -+ $(CC) -c advertise.c -o advertise.o - - reply.o: reply.c reply.h $(STD_HEADERS) -- $(CC) -g3 -c reply.c -o reply.o -+ $(CC) -c reply.c -o reply.o - - server.o: server.c lib.h advertise.h reply.h leases.h parse.h $(STD_HEADERS) -- $(CC) -g3 -c server.c -o server.o -+ $(CC) -c server.c -o server.o - - clean: - rm -f *.o serv diff --git a/openwrt/package/dosfstools/Config.in b/openwrt/package/dosfstools/Config.in deleted file mode 100644 index 0e700347e12..00000000000 --- a/openwrt/package/dosfstools/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_DOSFSTOOLS - prompt "dosfstools........................ Utilities to create and check MS-DOS FAT filesystems" - tristate - default m if CONFIG_DEVEL - help - Utilities to create and check MS-DOS FAT filesystems. - - ftp://ftp.uni-erlangen.de:/pub/Linux/LOCAL/dosfstools/ - diff --git a/openwrt/package/dosfstools/Makefile b/openwrt/package/dosfstools/Makefile deleted file mode 100644 index 91b455e9db0..00000000000 --- a/openwrt/package/dosfstools/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dosfstools -PKG_VERSION:=2.11 -PKG_RELEASE:=1 -PKG_MD5SUM:=407d405ade410f7597d364ab5dc8c9f6 - -PKG_SOURCE_URL:=ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,DOSFSTOOLS,dosfstools,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - OPTFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \ - PREFIX="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_DOSFSTOOLS): - install -d -m0755 $(IDIR_DOSFSTOOLS)/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/dosfsck $(IDIR_DOSFSTOOLS)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/fsck.{msdos,vfat} $(IDIR_DOSFSTOOLS)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/mkdosfs $(IDIR_DOSFSTOOLS)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.{msdos,vfat} $(IDIR_DOSFSTOOLS)/sbin/ - $(RSTRIP) $(IDIR_DOSFSTOOLS) - $(IPKG_BUILD) $(IDIR_DOSFSTOOLS) $(PACKAGE_DIR) - diff --git a/openwrt/package/dosfstools/ipkg/dosfstools.control b/openwrt/package/dosfstools/ipkg/dosfstools.control deleted file mode 100644 index 4ec52a01fb9..00000000000 --- a/openwrt/package/dosfstools/ipkg/dosfstools.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: dosfstools -Priority: optional -Section: admin -Description: Utilities to create and check MS-DOS FAT filesystems diff --git a/openwrt/package/dsniff/Config.in b/openwrt/package/dsniff/Config.in deleted file mode 100644 index 372274e48a7..00000000000 --- a/openwrt/package/dsniff/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_DSNIFF - prompt "dsniff............................ A collection of tools for betwork auditing and penetration testing" - tristate - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBNIDS - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_LIBGDBM - default m if CONFIG_DEVEL - help - A collection of tools for network auditing and penetration testing - - http://www.monkey.org/~dugsong/dsniff/ - diff --git a/openwrt/package/dsniff/Makefile b/openwrt/package/dsniff/Makefile deleted file mode 100644 index bad122210bd..00000000000 --- a/openwrt/package/dsniff/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dsniff -PKG_VERSION:=2.4b1 -PKG_RELEASE:=2 -PKG_MD5SUM:=2f761fa3475682a7512b0b43568ee7d6 - -PKG_SOURCE_URL:=http://www.monkey.org/~dugsong/dsniff/beta -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2.4 -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,DSNIFF,dsniff,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --without-db \ - --without-x \ - --with-gdbm="$(STAGING_DIR)/usr" \ - --with-libnids="$(STAGING_DIR)/usr" \ - --with-libpcap="$(STAGING_DIR)/usr" \ - --with-libnet="$(STAGING_DIR)/usr" \ - --with-openssl="$(STAGING_DIR)/usr" \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - install_prefix="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_DSNIFF): - install -d -m0755 $(IDIR_DSNIFF)/usr/lib - install -d -m0755 $(IDIR_DSNIFF)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_DSNIFF)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(IDIR_DSNIFF)/usr/lib - $(RSTRIP) $(IDIR_DSNIFF) - $(IPKG_BUILD) $(IDIR_DSNIFF) $(PACKAGE_DIR) - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/dsniff/ipkg/dsniff.control b/openwrt/package/dsniff/ipkg/dsniff.control deleted file mode 100644 index 5f1591a1f4a..00000000000 --- a/openwrt/package/dsniff/ipkg/dsniff.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: dsniff -Priority: optional -Section: admin -Depends: libnet, libpcap, libnids, libopenssl, libgdbm -Description: collection of tools for network auditing and penetration testing diff --git a/openwrt/package/dsniff/patches/arpspoof-fix.patch b/openwrt/package/dsniff/patches/arpspoof-fix.patch deleted file mode 100644 index fd292270001..00000000000 --- a/openwrt/package/dsniff/patches/arpspoof-fix.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -urN dsniff.old/arp.c dsniff.dev/arp.c ---- dsniff.old/arp.c 2001-03-15 09:32:58.000000000 +0100 -+++ dsniff.dev/arp.c 2006-03-03 01:41:10.000000000 +0100 -@@ -39,7 +39,7 @@ - - #ifdef BSD - int --arp_cache_lookup(in_addr_t ip, struct ether_addr *ether) -+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif) - { - int mib[6]; - size_t len; -@@ -91,7 +91,7 @@ - #endif - - int --arp_cache_lookup(in_addr_t ip, struct ether_addr *ether) -+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif) - { - int sock; - struct arpreq ar; -@@ -99,7 +99,7 @@ - - memset((char *)&ar, 0, sizeof(ar)); - #ifdef __linux__ -- strncpy(ar.arp_dev, "eth0", sizeof(ar.arp_dev)); /* XXX - *sigh* */ -+ strncpy(ar.arp_dev, lif, strlen(lif)); - #endif - sin = (struct sockaddr_in *)&ar.arp_pa; - sin->sin_family = AF_INET; -diff -urN dsniff.old/arp.h dsniff.dev/arp.h ---- dsniff.old/arp.h 2001-03-15 09:27:08.000000000 +0100 -+++ dsniff.dev/arp.h 2006-03-03 01:42:23.000000000 +0100 -@@ -11,6 +11,6 @@ - #ifndef _ARP_H_ - #define _ARP_H_ - --int arp_cache_lookup(in_addr_t ip, struct ether_addr *ether); -+int arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif); - - #endif /* _ARP_H_ */ -diff -urN dsniff.old/arpspoof.c dsniff.dev/arpspoof.c ---- dsniff.old/arpspoof.c 2001-03-15 09:32:58.000000000 +0100 -+++ dsniff.dev/arpspoof.c 2006-03-03 01:42:00.000000000 +0100 -@@ -113,7 +113,7 @@ - int i = 0; - - do { -- if (arp_cache_lookup(ip, mac) == 0) -+ if (arp_cache_lookup(ip, mac, intf) == 0) - return (1); - #ifdef __linux__ - /* XXX - force the kernel to arp. feh. */ diff --git a/openwrt/package/dsniff/patches/dns.patch b/openwrt/package/dsniff/patches/dns.patch deleted file mode 100644 index e5cf8b2afa0..00000000000 --- a/openwrt/package/dsniff/patches/dns.patch +++ /dev/null @@ -1,704 +0,0 @@ -diff -Nur dsniff-2.3/dns.c dsniff-2.3.patched/dns.c ---- dsniff-2.3/dns.c 1970-01-01 01:00:00.000000000 +0100 -+++ dsniff-2.3.patched/dns.c 2005-06-09 14:06:36.000000000 +0200 -@@ -0,0 +1,677 @@ -+/* -+ * Copyright (c) 1985, 1993 -+ * The Regents of the University of California. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 4. Neither the name of the University nor the names of its contributors -+ * may be used to endorse or promote products derived from this software -+ * without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ */ -+ -+/* -+ * Portions Copyright (c) 1993 by Digital Equipment Corporation. -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies, and that -+ * the name of Digital Equipment Corporation not be used in advertising or -+ * publicity pertaining to distribution of the document or software without -+ * specific, written prior permission. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -+ * SOFTWARE. -+ */ -+ -+/* -+ * Portions Copyright (c) 1996-1999 by Internet Software Consortium. -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS -+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE -+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -+ * SOFTWARE. -+ */ -+ -+/* -+ * Copyright (c) 1996,1999 by Internet Software Consortium. -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS -+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE -+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -+ * SOFTWARE. -+ */ -+ -+/* -+ * -+ * DNS helper functions not implemented in uclibc -+ * -+ */ -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static const char digits[] = "0123456789"; -+ -+/* Forward. */ -+ -+static int special(int); -+static int printable(int); -+static int dn_find(const u_char *, const u_char *, -+ const u_char * const *, -+ const u_char * const *); -+ -+ -+/* -+ * ns_name_ntop(src, dst, dstsiz) -+ * Convert an encoded domain name to printable ascii as per RFC1035. -+ * return: -+ * Number of bytes written to buffer, or -1 (with errno set) -+ * notes: -+ * The root is returned as "." -+ * All other domains are returned in non absolute form -+ */ -+int -+ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) { -+ const u_char *cp; -+ char *dn, *eom; -+ u_char c; -+ u_int n; -+ -+ cp = src; -+ dn = dst; -+ eom = dst + dstsiz; -+ -+ while ((n = *cp++) != 0) { -+ if ((n & NS_CMPRSFLGS) != 0) { -+ /* Some kind of compression pointer. */ -+ return (-1); -+ } -+ if (dn != dst) { -+ if (dn >= eom) { -+ return (-1); -+ } -+ *dn++ = '.'; -+ } -+ if (dn + n >= eom) { -+ return (-1); -+ } -+ for ((void)NULL; n > 0; n--) { -+ c = *cp++; -+ if (special(c)) { -+ if (dn + 1 >= eom) { -+ return (-1); -+ } -+ *dn++ = '\\'; -+ *dn++ = (char)c; -+ } else if (!printable(c)) { -+ if (dn + 3 >= eom) { -+ return (-1); -+ } -+ *dn++ = '\\'; -+ *dn++ = digits[c / 100]; -+ *dn++ = digits[(c % 100) / 10]; -+ *dn++ = digits[c % 10]; -+ } else { -+ if (dn >= eom) { -+ return (-1); -+ } -+ *dn++ = (char)c; -+ } -+ } -+ } -+ if (dn == dst) { -+ if (dn >= eom) { -+ return (-1); -+ } -+ *dn++ = '.'; -+ } -+ if (dn >= eom) { -+ return (-1); -+ } -+ *dn++ = '\0'; -+ return (dn - dst); -+} -+ -+/* -+ * ns_name_pton(src, dst, dstsiz) -+ * Convert a ascii string into an encoded domain name as per RFC1035. -+ * return: -+ * -1 if it fails -+ * 1 if string was fully qualified -+ * 0 is string was not fully qualified -+ * notes: -+ * Enforces label and domain length limits. -+ */ -+ -+int -+ns_name_pton(const char *src, u_char *dst, size_t dstsiz) { -+ u_char *label, *bp, *eom; -+ int c, n, escaped; -+ char *cp; -+ -+ escaped = 0; -+ bp = dst; -+ eom = dst + dstsiz; -+ label = bp++; -+ -+ while ((c = *src++) != 0) { -+ if (escaped) { -+ if ((cp = strchr(digits, c)) != NULL) { -+ n = (cp - digits) * 100; -+ if ((c = *src++) == 0 || -+ (cp = strchr(digits, c)) == NULL) { -+ return (-1); -+ } -+ n += (cp - digits) * 10; -+ if ((c = *src++) == 0 || -+ (cp = strchr(digits, c)) == NULL) { -+ return (-1); -+ } -+ n += (cp - digits); -+ if (n > 255) { -+ return (-1); -+ } -+ c = n; -+ } -+ escaped = 0; -+ } else if (c == '\\') { -+ escaped = 1; -+ continue; -+ } else if (c == '.') { -+ c = (bp - label - 1); -+ if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */ -+ return (-1); -+ } -+ if (label >= eom) { -+ return (-1); -+ } -+ *label = c; -+ /* Fully qualified ? */ -+ if (*src == '\0') { -+ if (c != 0) { -+ if (bp >= eom) { -+ return (-1); -+ } -+ *bp++ = '\0'; -+ } -+ if ((bp - dst) > MAXCDNAME) { -+ return (-1); -+ } -+ return (1); -+ } -+ if (c == 0 || *src == '.') { -+ return (-1); -+ } -+ label = bp++; -+ continue; -+ } -+ if (bp >= eom) { -+ return (-1); -+ } -+ *bp++ = (u_char)c; -+ } -+ c = (bp - label - 1); -+ if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */ -+ return (-1); -+ } -+ if (label >= eom) { -+ return (-1); -+ } -+ *label = c; -+ if (c != 0) { -+ if (bp >= eom) { -+ return (-1); -+ } -+ *bp++ = 0; -+ } -+ if ((bp - dst) > MAXCDNAME) { /* src too big */ -+ return (-1); -+ } -+ return (0); -+} -+ -+/* -+ * ns_name_ntol(src, dst, dstsiz) -+ * Convert a network strings labels into all lowercase. -+ * return: -+ * Number of bytes written to buffer, or -1 (with errno set) -+ * notes: -+ * Enforces label and domain length limits. -+ */ -+ -+int -+ns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz) { -+ const u_char *cp; -+ u_char *dn, *eom; -+ u_char c; -+ u_int n; -+ -+ cp = src; -+ dn = dst; -+ eom = dst + dstsiz; -+ -+ while ((n = *cp++) != 0) { -+ if ((n & NS_CMPRSFLGS) != 0) { -+ /* Some kind of compression pointer. */ -+ return (-1); -+ } -+ *dn++ = n; -+ if (dn + n >= eom) { -+ return (-1); -+ } -+ for ((void)NULL; n > 0; n--) { -+ c = *cp++; -+ if (isupper(c)) -+ *dn++ = tolower(c); -+ else -+ *dn++ = c; -+ } -+ } -+ *dn++ = '\0'; -+ return (dn - dst); -+} -+ -+/* -+ * ns_name_unpack(msg, eom, src, dst, dstsiz) -+ * Unpack a domain name from a message, source may be compressed. -+ * return: -+ * -1 if it fails, or consumed octets if it succeeds. -+ */ -+int -+ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src, -+ u_char *dst, size_t dstsiz) -+{ -+ const u_char *srcp, *dstlim; -+ u_char *dstp; -+ int n, len, checked; -+ -+ len = -1; -+ checked = 0; -+ dstp = dst; -+ srcp = src; -+ dstlim = dst + dstsiz; -+ if (srcp < msg || srcp >= eom) { -+ return (-1); -+ } -+ /* Fetch next label in domain name. */ -+ while ((n = *srcp++) != 0) { -+ /* Check for indirection. */ -+ switch (n & NS_CMPRSFLGS) { -+ case 0: -+ /* Limit checks. */ -+ if (dstp + n + 1 >= dstlim || srcp + n >= eom) { -+ return (-1); -+ } -+ checked += n + 1; -+ *dstp++ = n; -+ memcpy(dstp, srcp, n); -+ dstp += n; -+ srcp += n; -+ break; -+ -+ case NS_CMPRSFLGS: -+ if (srcp >= eom) { -+ return (-1); -+ } -+ if (len < 0) -+ len = srcp - src + 1; -+ srcp = msg + (((n & 0x3f) << 8) | (*srcp & 0xff)); -+ if (srcp < msg || srcp >= eom) { /* Out of range. */ -+ return (-1); -+ } -+ checked += 2; -+ /* -+ * Check for loops in the compressed name; -+ * if we've looked at the whole message, -+ * there must be a loop. -+ */ -+ if (checked >= eom - msg) { -+ return (-1); -+ } -+ break; -+ -+ default: -+ return (-1); /* flag error */ -+ } -+ } -+ *dstp = '\0'; -+ if (len < 0) -+ len = srcp - src; -+ return (len); -+} -+ -+/* -+ * ns_name_pack(src, dst, dstsiz, dnptrs, lastdnptr) -+ * Pack domain name 'domain' into 'comp_dn'. -+ * return: -+ * Size of the compressed name, or -1. -+ * notes: -+ * 'dnptrs' is an array of pointers to previous compressed names. -+ * dnptrs[0] is a pointer to the beginning of the message. The array -+ * ends with NULL. -+ * 'lastdnptr' is a pointer to the end of the array pointed to -+ * by 'dnptrs'. -+ * Side effects: -+ * The list of pointers in dnptrs is updated for labels inserted into -+ * the message as we compress the name. If 'dnptr' is NULL, we don't -+ * try to compress names. If 'lastdnptr' is NULL, we don't update the -+ * list. -+ */ -+int -+ns_name_pack(const u_char *src, u_char *dst, int dstsiz, -+ const u_char **dnptrs, const u_char **lastdnptr) -+{ -+ u_char *dstp; -+ const u_char **cpp, **lpp, *eob, *msg; -+ const u_char *srcp; -+ int n, l, first = 1; -+ -+ srcp = src; -+ dstp = dst; -+ eob = dstp + dstsiz; -+ lpp = cpp = NULL; -+ if (dnptrs != NULL) { -+ if ((msg = *dnptrs++) != NULL) { -+ for (cpp = dnptrs; *cpp != NULL; cpp++) -+ (void)NULL; -+ lpp = cpp; /* end of list to search */ -+ } -+ } else -+ msg = NULL; -+ -+ /* make sure the domain we are about to add is legal */ -+ l = 0; -+ do { -+ n = *srcp; -+ if ((n & NS_CMPRSFLGS) != 0) { -+ return (-1); -+ } -+ l += n + 1; -+ if (l > MAXCDNAME) { -+ return (-1); -+ } -+ srcp += n + 1; -+ } while (n != 0); -+ -+ /* from here on we need to reset compression pointer array on error */ -+ srcp = src; -+ do { -+ /* Look to see if we can use pointers. */ -+ n = *srcp; -+ if (n != 0 && msg != NULL) { -+ l = dn_find(srcp, msg, (const u_char * const *)dnptrs, -+ (const u_char * const *)lpp); -+ if (l >= 0) { -+ if (dstp + 1 >= eob) { -+ goto cleanup; -+ } -+ *dstp++ = (l >> 8) | NS_CMPRSFLGS; -+ *dstp++ = l % 256; -+ return (dstp - dst); -+ } -+ /* Not found, save it. */ -+ if (lastdnptr != NULL && cpp < lastdnptr - 1 && -+ (dstp - msg) < 0x4000 && first) { -+ *cpp++ = dstp; -+ *cpp = NULL; -+ first = 0; -+ } -+ } -+ /* copy label to buffer */ -+ if (n & NS_CMPRSFLGS) { /* Should not happen. */ -+ goto cleanup; -+ } -+ if (dstp + 1 + n >= eob) { -+ goto cleanup; -+ } -+ memcpy(dstp, srcp, n + 1); -+ srcp += n + 1; -+ dstp += n + 1; -+ } while (n != 0); -+ -+ if (dstp > eob) { -+cleanup: -+ if (msg != NULL) -+ *lpp = NULL; -+ return (-1); -+ } -+ return (dstp - dst); -+} -+ -+/* -+ * ns_name_uncompress(msg, eom, src, dst, dstsiz) -+ * Expand compressed domain name to presentation format. -+ * return: -+ * Number of bytes read out of `src', or -1 (with errno set). -+ * note: -+ * Root domain returns as "." not "". -+ */ -+int -+ns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src, -+ char *dst, size_t dstsiz) -+{ -+ u_char tmp[NS_MAXCDNAME]; -+ int n; -+ -+ if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1) -+ return (-1); -+ if (ns_name_ntop(tmp, dst, dstsiz) == -1) -+ return (-1); -+ return (n); -+} -+ -+/* -+ * ns_name_compress(src, dst, dstsiz, dnptrs, lastdnptr) -+ * Compress a domain name into wire format, using compression pointers. -+ * return: -+ * Number of bytes consumed in `dst' or -1 (with errno set). -+ * notes: -+ * 'dnptrs' is an array of pointers to previous compressed names. -+ * dnptrs[0] is a pointer to the beginning of the message. -+ * The list ends with NULL. 'lastdnptr' is a pointer to the end of the -+ * array pointed to by 'dnptrs'. Side effect is to update the list of -+ * pointers for labels inserted into the message as we compress the name. -+ * If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr' -+ * is NULL, we don't update the list. -+ */ -+int -+ns_name_compress(const char *src, u_char *dst, size_t dstsiz, -+ const u_char **dnptrs, const u_char **lastdnptr) -+{ -+ u_char tmp[NS_MAXCDNAME]; -+ -+ if (ns_name_pton(src, tmp, sizeof tmp) == -1) -+ return (-1); -+ return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr)); -+} -+ -+/* -+ * special(ch) -+ * Thinking in noninternationalized USASCII (per the DNS spec), -+ * is this characted special ("in need of quoting") ? -+ * return: -+ * boolean. -+ */ -+static int -+special(int ch) { -+ switch (ch) { -+ case 0x22: /* '"' */ -+ case 0x2E: /* '.' */ -+ case 0x3B: /* ';' */ -+ case 0x5C: /* '\\' */ -+ /* Special modifiers in zone files. */ -+ case 0x40: /* '@' */ -+ case 0x24: /* '$' */ -+ return (1); -+ default: -+ return (0); -+ } -+} -+ -+/* -+ * printable(ch) -+ * Thinking in noninternationalized USASCII (per the DNS spec), -+ * is this character visible and not a space when printed ? -+ * return: -+ * boolean. -+ */ -+static int -+printable(int ch) { -+ return (ch > 0x20 && ch < 0x7f); -+} -+ -+/* -+ * Thinking in noninternationalized USASCII (per the DNS spec), -+ * convert this character to lower case if it's upper case. -+ */ -+static int -+mklower(int ch) { -+ if (ch >= 0x41 && ch <= 0x5A) -+ return (ch + 0x20); -+ return (ch); -+} -+ -+/* -+ * dn_find(domain, msg, dnptrs, lastdnptr) -+ * Search for the counted-label name in an array of compressed names. -+ * return: -+ * offset from msg if found, or -1. -+ * notes: -+ * dnptrs is the pointer to the first name on the list, -+ * not the pointer to the start of the message. -+ */ -+static int -+dn_find(const u_char *domain, const u_char *msg, -+ const u_char * const *dnptrs, -+ const u_char * const *lastdnptr) -+{ -+ const u_char *dn, *cp, *sp; -+ const u_char * const *cpp; -+ u_int n; -+ -+ for (cpp = dnptrs; cpp < lastdnptr; cpp++) { -+ sp = *cpp; -+ /* -+ * terminate search on: -+ * root label -+ * compression pointer -+ * unusable offset -+ */ -+ while (*sp != 0 && (*sp & NS_CMPRSFLGS) == 0 && -+ (sp - msg) < 0x4000) { -+ dn = domain; -+ cp = sp; -+ while ((n = *cp++) != 0) { -+ /* -+ * check for indirection -+ */ -+ switch (n & NS_CMPRSFLGS) { -+ case 0: /* normal case, n == len */ -+ if (n != *dn++) -+ goto next; -+ for ((void)NULL; n > 0; n--) -+ if (mklower(*dn++) != -+ mklower(*cp++)) -+ goto next; -+ /* Is next root for both ? */ -+ if (*dn == '\0' && *cp == '\0') -+ return (sp - msg); -+ if (*dn) -+ continue; -+ goto next; -+ -+ case NS_CMPRSFLGS: /* indirection */ -+ cp = msg + (((n & 0x3f) << 8) | *cp); -+ break; -+ -+ default: /* illegal type */ -+ return (-1); -+ } -+ } -+ next: -+ sp += *sp + 1; -+ } -+ } -+ return (-1); -+} -+ -+/* -+ * Expand compressed domain name 'comp_dn' to full domain name. -+ * 'msg' is a pointer to the begining of the message, -+ * 'eomorig' points to the first location after the message, -+ * 'exp_dn' is a pointer to a buffer of size 'length' for the result. -+ * Return size of compressed name or -1 if there was an error. -+ */ -+int -+dn_expand(const u_char *msg, const u_char *eom, const u_char *src, -+ char *dst, int dstsiz) -+{ -+ int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz); -+ -+ if (n > 0 && dst[0] == '.') -+ dst[0] = '\0'; -+ return (n); -+} -+ -+/* -+ * Pack domain name 'exp_dn' in presentation form into 'comp_dn'. -+ * Return the size of the compressed name or -1. -+ * 'length' is the size of the array pointed to by 'comp_dn'. -+ */ -+int -+dn_comp(const char *src, u_char *dst, int dstsiz, -+ u_char **dnptrs, u_char **lastdnptr) -+{ -+ return (ns_name_compress(src, dst, (size_t)dstsiz, -+ (const u_char **)dnptrs, -+ (const u_char **)lastdnptr)); -+} -+ -diff -Nur dsniff-2.3/Makefile.in dsniff-2.3.patched/Makefile.in ---- dsniff-2.3/Makefile.in 2000-12-15 21:03:26.000000000 +0100 -+++ dsniff-2.3.patched/Makefile.in 2005-06-09 14:03:18.000000000 +0200 -@@ -51,7 +51,7 @@ - pathnames.h pcaputil.h record.h rpc.h tcp_raw.h trigger.h \ - version.h vroot.h - --SRCS = asn1.c base64.c buf.c hex.c magic.c mount.c pcaputil.c rpc.c \ -+SRCS = asn1.c base64.c buf.c dns.c hex.c magic.c mount.c pcaputil.c rpc.c \ - tcp_raw.c trigger.c record.c dsniff.c decode.c decode_aim.c \ - decode_citrix.c decode_cvs.c decode_ftp.c decode_hex.c \ - decode_http.c decode_icq.c decode_imap.c decode_irc.c \ -@@ -99,8 +99,8 @@ - arpspoof: arpspoof.o arp.o - $(CC) $(LDFLAGS) -o $@ arpspoof.o arp.o $(LIBS) $(PCAPLIB) $(LNETLIB) - --dnsspoof: dnsspoof.o pcaputil.o -- $(CC) $(LDFLAGS) -o $@ dnsspoof.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB) -+dnsspoof: dnsspoof.o pcaputil.o dns.o -+ $(CC) $(LDFLAGS) -o $@ dnsspoof.o pcaputil.o dns.o $(LIBS) $(PCAPLIB) $(LNETLIB) - - filesnarf: nfs_prot.o filesnarf.o pcaputil.o rpc.o - $(CC) $(LDFLAGS) -o $@ filesnarf.o nfs_prot.o pcaputil.o rpc.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) diff --git a/openwrt/package/dsniff/patches/gdbm.patch b/openwrt/package/dsniff/patches/gdbm.patch deleted file mode 100644 index 30190abc9ed..00000000000 --- a/openwrt/package/dsniff/patches/gdbm.patch +++ /dev/null @@ -1,204 +0,0 @@ -diff -Nur dsniff-2.3/configure dsniff-2.3.patched/configure ---- dsniff-2.3/configure 2005-06-11 18:13:59.000000000 +0200 -+++ dsniff-2.3.patched/configure 2005-06-11 18:14:37.000000000 +0200 -@@ -16,6 +16,8 @@ - ac_help="$ac_help - --with-db=DIR use Berkeley DB (with --enable-compat185) in DIR" - ac_help="$ac_help -+ --with-gdbm=DIR use GNU DBM in DIR" -+ac_help="$ac_help - --with-libpcap=DIR use libpcap in DIR" - ac_help="$ac_help - --with-libnet=DIR use libnet in DIR" -@@ -3051,7 +3053,40 @@ - - fi - -+echo $ac_n "checking for libgdbm""... $ac_c" 1>&6 -+echo "configure:3059: checking for libgdbm" >&5 -+# Check whether --with-gdbm or --without-gdbm was given. -+if test "${with_gdbm+set}" = set; then -+ withval="$with_gdbm" -+ case "$withval" in -+ yes|no) -+ echo "$ac_t""no" 1>&6 -+ ;; -+ *) -+ echo "$ac_t""$withval" 1>&6 -+ if test -f $withval/include/gdbm.h -a -f $withval/lib/libgdbm.a; then -+ owd=`pwd` -+ if cd $withval; then withval=`pwd`; cd $owd; fi -+ DBINC="-I$withval/include" -+ DBLIB="-L$withval/lib -lgdbm" -+ else -+ { echo "configure: error: gdbm.h or libgdbm.a not found in $withval" 1>&2; exit 1; } -+ fi -+ ;; -+ esac -+else -+ if test -f ${prefix}/include/gdbm.h; then -+ LNETINC="-I${prefix}/include" -+ LNETLIB="-L${prefix}/lib -lgdbm" -+ elif test -f /usr/include/gdbm.h; then -+ LNETLIB="-lgdbm" -+ else -+ echo "$ac_t""no" 1>&6 -+ { echo "configure: error: libgdbm not found" 1>&2; exit 1; } -+ fi -+ echo "$ac_t""yes" 1>&6 - -+fi - - - echo $ac_n "checking for libnet""... $ac_c" 1>&6 -diff -Nur dsniff-2.3/record.c dsniff-2.3.patched/record.c ---- dsniff-2.3/record.c 2000-11-14 16:51:02.000000000 +0100 -+++ dsniff-2.3.patched/record.c 2005-06-11 18:14:56.000000000 +0200 -@@ -13,12 +13,7 @@ - #include - #include - #include --#ifdef HAVE_DB_185_H --#define DB_LIBRARY_COMPATIBILITY_API --#include --#elif HAVE_DB_H --#include --#endif -+#include - #include - #include "options.h" - #include "record.h" -@@ -34,7 +29,7 @@ - struct netobj data; - }; - --static DB *db; -+GDBM_FILE dbf; - - static int - xdr_rec(XDR *xdrs, struct rec *rec) -@@ -61,7 +56,6 @@ - - tm = localtime(&rec->time); - strftime(tstr, sizeof(tstr), "%x %X", tm); -- - srcp = libnet_host_lookup(rec->src, Opt_dns); - dstp = libnet_host_lookup(rec->dst, Opt_dns); - -@@ -86,10 +80,10 @@ - fflush(stdout); - } - --static DBT * -+static datum - record_hash(struct rec *rec) - { -- static DBT key; -+ static datum key; - static u_char hash[16]; - MD5_CTX ctx; - -@@ -102,16 +96,16 @@ - MD5Update(&ctx, rec->data.n_bytes, rec->data.n_len); - MD5Final(hash, &ctx); - -- key.data = hash; -- key.size = sizeof(hash); -+ key.dptr = hash; -+ key.dsize = sizeof(hash); - -- return (&key); -+ return (key); - } - - static int - record_save(struct rec *rec) - { -- DBT *key, data; -+ datum key, data; - XDR xdrs; - u_char buf[2048]; - -@@ -120,15 +114,15 @@ - if (!xdr_rec(&xdrs, rec)) - return (0); - -- data.data = buf; -- data.size = xdr_getpos(&xdrs); -+ data.dptr = buf; -+ data.dsize = xdr_getpos(&xdrs); - - xdr_destroy(&xdrs); - - key = record_hash(rec); - -- if (db->put(db, key, &data, R_NOOVERWRITE) == 0) -- db->sync(db, 0); -+ if (gdbm_store(dbf, key, data, GDBM_INSERT) == 0) -+ gdbm_sync(dbf); - - return (1); - } -@@ -136,18 +130,22 @@ - void - record_dump(void) - { -- DBT key, data; -+ datum nextkey, key, content; - XDR xdrs; - struct rec rec; - -- while (db->seq(db, &key, &data, R_NEXT) == 0) { -+ key = gdbm_firstkey(dbf); -+ while (key.dptr) { -+ nextkey = gdbm_nextkey(dbf, key); -+ content = gdbm_fetch(dbf, key); - memset(&rec, 0, sizeof(rec)); -- xdrmem_create(&xdrs, data.data, data.size, XDR_DECODE); -- -+ xdrmem_create(&xdrs, content.dptr, content.dsize, XDR_DECODE); - if (xdr_rec(&xdrs, &rec)) { - record_print(&rec); - } - xdr_destroy(&xdrs); -+ free(key.dptr); -+ key = nextkey; - } - } - -@@ -155,16 +153,23 @@ - record_init(char *file) - { - int flags, mode; -- -+ // needed for gdbm_open, which does not have the option to create -+ // a database in memory -+ if(file == NULL) { -+ char *record_file = "/tmp/.dsniff.db"; -+ file = record_file; -+ } -+ - if (Opt_read) { -- flags = O_RDONLY; -+ flags = GDBM_READER; - mode = 0; - } - else { -- flags = O_RDWR|O_CREAT; -+ flags = GDBM_WRCREAT; - mode = S_IRUSR|S_IWUSR; - } -- if ((db = dbopen(file, flags, mode, DB_BTREE, NULL)) == NULL) -+ -+ if ((dbf = gdbm_open(file, 1024, flags, mode, NULL)) == NULL) - return (0); - - return (1); -@@ -203,6 +208,6 @@ - void - record_close(void) - { -- db->close(db); -+ gdbm_close(dbf); - } - diff --git a/openwrt/package/dsniff/patches/noyp.patch b/openwrt/package/dsniff/patches/noyp.patch deleted file mode 100644 index 48393e20a28..00000000000 --- a/openwrt/package/dsniff/patches/noyp.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Nur dsniff-2.3/decode.c dsniff-2.3.patched/decode.c ---- dsniff-2.3/decode.c 2000-12-15 21:03:26.000000000 +0100 -+++ dsniff-2.3.patched/decode.c 2005-06-11 18:17:48.000000000 +0200 -@@ -49,8 +49,6 @@ - extern int decode_portmap(u_char *, int, u_char *, int); - extern int decode_mountd(u_char *, int, u_char *, int); - extern int decode_vrrp(u_char *, int, u_char *, int); --extern int decode_ypserv(u_char *, int, u_char *, int); --extern int decode_yppasswd(u_char *, int, u_char *, int); - - static struct decode decodes[] = { - { "hex", decode_hex }, -@@ -86,8 +84,6 @@ - { "irc", decode_irc }, - { "portmap", decode_portmap }, - { "mountd", decode_mountd }, -- { "ypserv", decode_ypserv }, -- { "yppasswd", decode_yppasswd }, - { NULL } - }; - -diff -Nur dsniff-2.3/dsniff.services dsniff-2.3.patched/dsniff.services ---- dsniff-2.3/dsniff.services 2000-12-15 21:10:58.000000000 +0100 -+++ dsniff-2.3.patched/dsniff.services 2005-06-11 18:19:27.000000000 +0200 -@@ -66,5 +66,3 @@ - aim 9898/tcp - pcanywhere 65301/tcp - mountd 100005/rpc --ypserv 100004/rpc --yppasswd 100009/rpc -diff -Nur dsniff-2.3/Makefile.in dsniff-2.3.patched/Makefile.in ---- dsniff-2.3/Makefile.in 2005-06-11 18:17:20.000000000 +0200 -+++ dsniff-2.3.patched/Makefile.in 2005-06-11 18:17:48.000000000 +0200 -@@ -60,7 +60,7 @@ - decode_pop.c decode_portmap.c decode_postgresql.c decode_pptp.c \ - decode_rip.c decode_rlogin.c decode_smb.c decode_smtp.c \ - decode_sniffer.c decode_snmp.c decode_socks.c decode_tds.c \ -- decode_telnet.c decode_vrrp.c decode_yp.c decode_x11.c -+ decode_telnet.c decode_vrrp.c decode_x11.c - - GEN = mount.h mount.c nfs_prot.h nfs_prot.c - diff --git a/openwrt/package/dsniff/patches/openssl-fix.patch b/openwrt/package/dsniff/patches/openssl-fix.patch deleted file mode 100644 index 1b2f9e7bedb..00000000000 --- a/openwrt/package/dsniff/patches/openssl-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- dsniff-2.4b1.orig/sshcrypto.c -+++ dsniff-2.4b1/sshcrypto.c -@@ -14,6 +14,8 @@ - - #include - #include -+#include -+#include - - #include - #include diff --git a/openwrt/package/dsniff/patches/pcap-header.patch b/openwrt/package/dsniff/patches/pcap-header.patch deleted file mode 100644 index 6be3bf2d66d..00000000000 --- a/openwrt/package/dsniff/patches/pcap-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur dsniff-2.3/configure dsniff-2.3.patched/configure ---- dsniff-2.3/configure 2000-12-03 05:35:46.000000000 +0100 -+++ dsniff-2.3.patched/configure 2005-06-09 11:44:33.000000000 +0200 -@@ -3023,7 +3023,7 @@ - PCAPINC="-I$withval -I$withval/bpf" - PCAPLIB="-L$withval -lpcap" - elif test -f $withval/include/pcap.h -a \ -- -f $withval/include/net/bpf.h -a \ -+ -f $withval/include/pcap-bpf.h -a \ - -f $withval/lib/libpcap.a; then - owd=`pwd` - if cd $withval; then withval=`pwd`; cd $owd; fi diff --git a/openwrt/package/dsniff/patches/time_h.patch b/openwrt/package/dsniff/patches/time_h.patch deleted file mode 100644 index 280b8c1e89e..00000000000 --- a/openwrt/package/dsniff/patches/time_h.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -urNad --exclude=CVS --exclude=.svn dsniff-2.4b1/msgsnarf.c dsniff-2.4b1/msgsnarf.c ---- dsniff-2.4b1/msgsnarf.c 2001-03-15 08:33:04.000000000 +0000 -+++ dsniff-2.4b1/msgsnarf.c 2005-07-11 20:15:50.000000000 +0000 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - #include "buf.h" - #include "decode.h" -diff -urNad --exclude=CVS --exclude=.svn dsniff-2.4b1/sshow.c dsniff-2.4b1/sshow.c ---- dsniff-2.4b1/sshow.c 2005-07-11 20:14:19.000000000 +0000 -+++ dsniff-2.4b1/sshow.c 2005-07-11 20:15:26.000000000 +0000 -@@ -15,6 +15,7 @@ - - #include - #include -+#include - - #include - #include diff --git a/openwrt/package/e2fsprogs/Config.in b/openwrt/package/e2fsprogs/Config.in deleted file mode 100644 index 3f8b3da8d6c..00000000000 --- a/openwrt/package/e2fsprogs/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_E2FSPROGS - prompt "e2fsprogs......................... Ext2/3 filesystem utilities" - tristate - default m if CONFIG_DEVEL - help - This package contains essential ext2 filesystem utilities which consists of - e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2 - filesystem utilities. - - http://e2fsprogs.sourceforge.net/ - diff --git a/openwrt/package/e2fsprogs/Makefile b/openwrt/package/e2fsprogs/Makefile deleted file mode 100644 index b4393e2ebb3..00000000000 --- a/openwrt/package/e2fsprogs/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=e2fsprogs -PKG_VERSION:=1.38 -PKG_RELEASE:=1 -PKG_MD5SUM:=d774d4412bfb80d12cf3a4fdfd59de5a - -PKG_SOURCE_URL:=@SF/e2fsprogs -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,E2FSPROGS,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --enable-elf-shlibs \ - --enable-dynamic-e2fsck \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR)/util \ - BUILDCC="$(HOSTCC)" \ - CFLAGS="" \ - subst - $(MAKE) -C $(PKG_BUILD_DIR) \ - BUILDCC="$(HOSTCC)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - touch $@ - -$(IPKG_E2FSPROGS): - mkdir -p $(IDIR_E2FSPROGS)/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/e2fsck $(IDIR_E2FSPROGS)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/mke2fs $(IDIR_E2FSPROGS)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.ext{2,3} $(IDIR_E2FSPROGS)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/tune2fs $(IDIR_E2FSPROGS)/sbin/ - mkdir -p $(IDIR_E2FSPROGS)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{blkid,com_err,e2p,ext2fs,uuid}.so.* $(IDIR_E2FSPROGS)/usr/lib/ - $(RSTRIP) $(IDIR_E2FSPROGS) - $(IPKG_BUILD) $(IDIR_E2FSPROGS) $(PACKAGE_DIR) diff --git a/openwrt/package/e2fsprogs/ipkg/e2fsprogs.control b/openwrt/package/e2fsprogs/ipkg/e2fsprogs.control deleted file mode 100644 index 73e023d456e..00000000000 --- a/openwrt/package/e2fsprogs/ipkg/e2fsprogs.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: e2fsprogs -Priority: optional -Section: admin -Description: Ext2/3 filesystem utilities diff --git a/openwrt/package/elhttp/Config.in b/openwrt/package/elhttp/Config.in deleted file mode 100644 index 979a2679cbd..00000000000 --- a/openwrt/package/elhttp/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_ELHTTP - prompt "elhttp............................ The extra-light http proxy server." - tristate - default m if CONFIG_DEVEL - help - The extra-light http proxy server. Features: keep-alive - connections, http connect method, SSL/TLS support, ACLs - and client requests logging. diff --git a/openwrt/package/elhttp/Makefile b/openwrt/package/elhttp/Makefile deleted file mode 100644 index 175f1dbea7c..00000000000 --- a/openwrt/package/elhttp/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=elhttp -PKG_VERSION:=0.22 -PKG_RELEASE:=1 -PKG_MD5SUM:=b52f68c47f709e9fc9429250eb8f954c - -PKG_SOURCE_URL:=http://phadej.daug.net/files/ \ - http://www.cr0.net:8040/code/network/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ELHTTP,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - mkdir -p $(PKG_INSTALL_DIR)/usr/sbin - $(MAKE) CC=$(TARGET_CC) CROSS=$(TARGET_CROSS) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - $(RSTRIP) $(PKG_INSTALL_DIR)/usr/sbin/ - touch $@ - -$(IPKG_ELHTTP): - mkdir -p $(IDIR_ELHTTP) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_ELHTTP)/ - $(RSTRIP) $(IDIR_ELHTTP)/ - $(IPKG_BUILD) $(IDIR_ELHTTP) $(PACKAGE_DIR) - diff --git a/openwrt/package/elhttp/ipkg/elhttp.control b/openwrt/package/elhttp/ipkg/elhttp.control deleted file mode 100644 index 4492e43f1c6..00000000000 --- a/openwrt/package/elhttp/ipkg/elhttp.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: elhttp -Priority: optional -Section: net -Description: The extra-light http proxy server. diff --git a/openwrt/package/elhttp/patches/01-cross-compile.patch b/openwrt/package/elhttp/patches/01-cross-compile.patch deleted file mode 100644 index f1aba594d3c..00000000000 --- a/openwrt/package/elhttp/patches/01-cross-compile.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- elhttp-0.22.orig/Makefile 2004-06-18 15:32:17.000000000 +0200 -+++ elhttp-0.22/Makefile 2006-02-13 23:11:35.000000000 +0100 -@@ -1,13 +1,7 @@ -- -+all: linux - linux: -- gcc -O -W -Wall -o elhttp elhttp.c -- strip elhttp -- --sunos: -- gcc -O -W -Wall -o elhttp elhttp.c -lsocket -lnsl -- strip elhttp -- --unix: -- cc -O -o elhttp elhttp.c -- strip elhttp -+ $(CC) -O -W -Wall -o elhttp elhttp.c - -+install: -+ install -d -m0755 $(DESTDIR)/usr/sbin -+ install -m0755 elhttp $(DESTDIR)/usr/sbin/ diff --git a/openwrt/package/elinks/Config.in b/openwrt/package/elinks/Config.in deleted file mode 100644 index 3e0b28cf10e..00000000000 --- a/openwrt/package/elinks/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_ELINKS - prompt "elinks............................ A text based web browser" - tristate - default m if CONFIG_DEVEL - help - An advanced text based web browser - - http://elinks.or.cz/ - diff --git a/openwrt/package/elinks/Makefile b/openwrt/package/elinks/Makefile deleted file mode 100644 index d06b3ebb3a9..00000000000 --- a/openwrt/package/elinks/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=elinks -PKG_VERSION:=0.11.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=c09d726075e4b5810fa07f8654088755 - -PKG_SOURCE_URL:=http://elinks.or.cz/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=c09d726075e4b5810fa07f8654088755 -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ELINKS,elinks,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - x=`echo ac_cv_file_./features.conf | tr [:blank:]-/. _` && export $${x}=yes && \ - x=`echo ac_cv_file_$(PKG_BUILD_DIR)/features.conf | tr [:blank:]-/. _` && export $${x}=yes && \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-small\ - --enable-256-colors\ - --disable-backtrace\ - --disable-data\ - --disable-formhist\ - --disable-leds \ - --disable-mailcap\ - --disable-mouse \ - --disable-smb \ - --disable-uri-rewrite\ - --disable-xbel \ - --without-bzlib \ - --without-gpm \ - --without-idn \ - --without-gnutls \ - --without-libiconv \ - --without-lua \ - --with-openssl="$(STAGING_DIR)/usr" \ - --without-spidermonkey\ - --without-x\ - --without-zlib \ - --disable-ipv6 \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR)\ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld - touch $@ - -$(IPKG_ELINKS): - mkdir -p $(IDIR_ELINKS)/usr/bin - $(CP) $(PKG_BUILD_DIR)/src/elinks $(IDIR_ELINKS)/usr/bin/ - $(RSTRIP) $(IDIR_ELINKS) - $(IPKG_BUILD) $(IDIR_ELINKS) $(PACKAGE_DIR) diff --git a/openwrt/package/elinks/ipkg/elinks.control b/openwrt/package/elinks/ipkg/elinks.control deleted file mode 100644 index f3de4e564d9..00000000000 --- a/openwrt/package/elinks/ipkg/elinks.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: elinks -Priority: optional -Section: text -Description: An advanced text web browser diff --git a/openwrt/package/elinks/patches/01-missing_decl_for_off_t.patch b/openwrt/package/elinks/patches/01-missing_decl_for_off_t.patch deleted file mode 100644 index 4393e31466d..00000000000 --- a/openwrt/package/elinks/patches/01-missing_decl_for_off_t.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ruN elinks-0.11.1-old/src/util/time.h elinks-0.11.1-new/src/util/time.h ---- elinks-0.11.1-old/src/util/time.h 2006-01-29 14:10:39.000000000 +0100 -+++ elinks-0.11.1-new/src/util/time.h 2006-03-27 23:09:08.000000000 +0200 -@@ -1,6 +1,7 @@ - #ifndef EL__UTIL_TIME_H - #define EL__UTIL_TIME_H - -+#include - #ifdef HAVE_SYS_TIME_H - #include - #endif diff --git a/openwrt/package/ether-wake/Config.in b/openwrt/package/ether-wake/Config.in deleted file mode 100644 index df3a5fb65d0..00000000000 --- a/openwrt/package/ether-wake/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_ETHER_WAKE - prompt "ether-wake........................ A Wake-On-LAN (WOL) client" - tristate - default m if CONFIG_DEVEL - help - A Wake-On-LAN (WOL) client, - This program sends a magic packet to wake up sleeping networked machines. - - http://www.scyld.com/wakeonlan.html - diff --git a/openwrt/package/ether-wake/Makefile b/openwrt/package/ether-wake/Makefile deleted file mode 100644 index 9618b3e3e16..00000000000 --- a/openwrt/package/ether-wake/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ether-wake -PKG_VERSION:=1.09 -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ETHER_WAKE,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./files/$(PKG_NAME).c $(PKG_BUILD_DIR)/ - $(PATCH) $(PKG_BUILD_DIR) ./patches - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME).c - touch $@ - -$(IPKG_ETHER_WAKE): - install -d -m0755 $(IDIR_ETHER_WAKE)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_ETHER_WAKE)/usr/sbin/ - $(RSTRIP) $(IDIR_ETHER_WAKE) - $(IPKG_BUILD) $(IDIR_ETHER_WAKE) $(PACKAGE_DIR) diff --git a/openwrt/package/ether-wake/files/ether-wake.c b/openwrt/package/ether-wake/files/ether-wake.c deleted file mode 100644 index eef22a7ab2a..00000000000 --- a/openwrt/package/ether-wake/files/ether-wake.c +++ /dev/null @@ -1,392 +0,0 @@ -/* ether-wake.c: Send a magic packet to wake up sleeping machines. */ - -static char version_msg[] = -"ether-wake.c: v1.09 11/12/2003 Donald Becker, http://www.scyld.com/"; -static char brief_usage_msg[] = -"usage: ether-wake [-i ] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n" -" Use '-u' to see the complete set of options.\n"; -static char usage_msg[] = -"usage: ether-wake [-i ] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n" -"\n" -" This program generates and transmits a Wake-On-LAN (WOL)\n" -" \"Magic Packet\", used for restarting machines that have been\n" -" soft-powered-down (ACPI D3-warm state).\n" -" It currently generates the standard AMD Magic Packet format, with\n" -" an optional password appended.\n" -"\n" -" The single required parameter is the Ethernet MAC (station) address\n" -" of the machine to wake or a host ID with known NSS 'ethers' entry.\n" -" The MAC address may be found with the 'arp' program while the target\n" -" machine is awake.\n" -"\n" -" Options:\n" -" -b Send wake-up packet to the broadcast address.\n" -" -D Increase the debug level.\n" -" -i ifname Use interface IFNAME instead of the default 'eth0'.\n" -" -p Append the four or six byte password PW to the packet.\n" -" A password is only required for a few adapter types.\n" -" The password may be specified in ethernet hex format\n" -" or dotted decimal (Internet address)\n" -" -p 00:22:44:66:88:aa\n" -" -p 192.168.1.1\n"; - -/* - This program generates and transmits a Wake-On-LAN (WOL) "Magic Packet", - used for restarting machines that have been soft-powered-down - (ACPI D3-warm state). It currently generates the standard AMD Magic Packet - format, with an optional password appended. - - This software may be used and distributed according to the terms - of the GNU Public License, incorporated herein by reference. - Contact the author for use under other terms. - - This source file was originally part of the network tricks package, and - is now distributed to support the Scyld Beowulf system. - Copyright 1999-2003 Donald Becker and Scyld Computing Corporation. - - The author may be reached as becker@scyld, or C/O - Scyld Computing Corporation - 914 Bay Ridge Road, Suite 220 - Annapolis MD 21403 - - Notes: - On some systems dropping root capability allows the process to be - dumped, traced or debugged. - If someone traces this program, they get control of a raw socket. - Linux handles this safely, but beware when porting this program. - - An alternative to needing 'root' is using a UDP broadcast socket, however - doing so only works with adapters configured for unicast+broadcast Rx - filter. That configuration consumes more power. -*/ - -#include -#include -#include -#include -#include -#include - -#if 0 /* Only exists on some versions. */ -#include -#endif - -#include - -#include -#include -#include - -#include -#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1 -#include -#include -#else -#include -#include -#include -#endif -#include -#include - -/* Grrr, no consistency between include versions. - Enable this if setsockopt() isn't declared with your library. */ -#if 0 -extern int setsockopt __P ((int __fd, int __level, int __optname, - __ptr_t __optval, int __optlen)); -#else /* New, correct head files. */ -#include -#endif - -u_char outpack[1000]; -int outpack_sz = 0; -int debug = 0; -u_char wol_passwd[6]; -int wol_passwd_sz = 0; - -static int opt_no_src_addr = 0, opt_broadcast = 0; - -static int get_dest_addr(const char *arg, struct ether_addr *eaddr); -static int get_fill(unsigned char *pkt, struct ether_addr *eaddr); -static int get_wol_pw(const char *optarg); - -int main(int argc, char *argv[]) -{ - char *ifname = "eth0"; - int one = 1; /* True, for socket options. */ - int s; /* Raw socket */ - int errflag = 0, verbose = 0, do_version = 0; - int perm_failure = 0; - int i, c, pktsize; -#if defined(PF_PACKET) - struct sockaddr_ll whereto; -#else - struct sockaddr whereto; /* who to wake up */ -#endif - struct ether_addr eaddr; - - while ((c = getopt(argc, argv, "bDi:p:uvV")) != -1) - switch (c) { - case 'b': opt_broadcast++; break; - case 'D': debug++; break; - case 'i': ifname = optarg; break; - case 'p': get_wol_pw(optarg); break; - case 'u': printf(usage_msg); return 0; - case 'v': verbose++; break; - case 'V': do_version++; break; - case '?': - errflag++; - } - if (verbose || do_version) - printf("%s\n", version_msg); - if (errflag) { - fprintf(stderr, brief_usage_msg); - return 3; - } - - if (optind == argc) { - fprintf(stderr, "Specify the Ethernet address as 00:11:22:33:44:55.\n"); - return 3; - } - - /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to - work as non-root, but we need SOCK_PACKET to specify the Ethernet - destination address. */ -#if defined(PF_PACKET) - s = socket(PF_PACKET, SOCK_RAW, 0); -#else - s = socket(AF_INET, SOCK_PACKET, SOCK_PACKET); -#endif - if (s < 0) { - if (errno == EPERM) - fprintf(stderr, "ether-wake: This program must be run as root.\n"); - else - perror("ether-wake: socket"); - perm_failure++; - } - /* Don't revert if debugging allows a normal user to get the raw socket. */ - setuid(getuid()); - - /* We look up the station address before reporting failure so that - errors may be reported even when run as a normal user. - */ - if (get_dest_addr(argv[optind], &eaddr) != 0) - return 3; - if (perm_failure && ! debug) - return 2; - - pktsize = get_fill(outpack, &eaddr); - - /* Fill in the source address, if possible. - The code to retrieve the local station address is Linux specific. */ - if (! opt_no_src_addr) { - struct ifreq if_hwaddr; - unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data; - - strcpy(if_hwaddr.ifr_name, ifname); - if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) { - fprintf(stderr, "SIOCGIFHWADDR on %s failed: %s\n", ifname, - strerror(errno)); - /* Magic packets still work if our source address is bogus, but - we fail just to be anal. */ - return 1; - } - memcpy(outpack+6, if_hwaddr.ifr_hwaddr.sa_data, 6); - - if (verbose) { - printf("The hardware address (SIOCGIFHWADDR) of %s is type %d " - "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", ifname, - if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], - hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); - } - } - - if (wol_passwd_sz > 0) { - memcpy(outpack+pktsize, wol_passwd, wol_passwd_sz); - pktsize += wol_passwd_sz; - } - - if (verbose > 1) { - printf("The final packet is: "); - for (i = 0; i < pktsize; i++) - printf(" %2.2x", outpack[i]); - printf(".\n"); - } - - /* This is necessary for broadcasts to work */ - if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&one, sizeof(one)) < 0) - perror("setsockopt: SO_BROADCAST"); - -#if defined(PF_PACKET) - { - struct ifreq ifr; - strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); - if (ioctl(s, SIOCGIFINDEX, &ifr) == -1) { - fprintf(stderr, "SIOCGIFINDEX on %s failed: %s\n", ifname, - strerror(errno)); - return 1; - } - memset(&whereto, 0, sizeof(whereto)); - whereto.sll_family = AF_PACKET; - whereto.sll_ifindex = ifr.ifr_ifindex; - /* The manual page incorrectly claims the address must be filled. - We do so because the code may change to match the docs. */ - whereto.sll_halen = ETH_ALEN; - memcpy(whereto.sll_addr, outpack, ETH_ALEN); - - } -#else - whereto.sa_family = 0; - strcpy(whereto.sa_data, ifname); -#endif - - if ((i = sendto(s, outpack, pktsize, 0, (struct sockaddr *)&whereto, - sizeof(whereto))) < 0) - perror("sendto"); - else if (debug) - printf("Sendto worked ! %d.\n", i); - -#ifdef USE_SEND - if (bind(s, (struct sockaddr *)&whereto, sizeof(whereto)) < 0) - perror("bind"); - else if (send(s, outpack, 100, 0) < 0) - perror("send"); -#endif -#ifdef USE_SENDMSG - { - struct msghdr msghdr = { 0,}; - struct iovec iovector[1]; - msghdr.msg_name = &whereto; - msghdr.msg_namelen = sizeof(whereto); - msghdr.msg_iov = iovector; - msghdr.msg_iovlen = 1; - iovector[0].iov_base = outpack; - iovector[0].iov_len = pktsize; - if ((i = sendmsg(s, &msghdr, 0)) < 0) - perror("sendmsg"); - else if (debug) - printf("sendmsg worked, %d (%d).\n", i, errno); - } -#endif - - return 0; -} - -/* Convert the host ID string to a MAC address. - The string may be a - Host name - IP address string - MAC address string -*/ - -static int get_dest_addr(const char *hostid, struct ether_addr *eaddr) -{ - struct ether_addr *eap; - - eap = ether_aton(hostid); - if (eap) { - *eaddr = *eap; - if (debug) - fprintf(stderr, "The target station address is %s.\n", - ether_ntoa(eaddr)); - } else if (ether_hostton(hostid, eaddr) == 0) { - if (debug) - fprintf(stderr, "Station address for hostname %s is %s.\n", - hostid, ether_ntoa(eaddr)); - } else { - (void)fprintf(stderr, - "ether-wake: The Magic Packet host address must be " - "specified as\n" - " - a station address, 00:11:22:33:44:55, or\n" - " - a hostname with a known 'ethers' entry.\n"); - return -1; - } - return 0; -} - - -static int get_fill(unsigned char *pkt, struct ether_addr *eaddr) -{ - int offset, i; - unsigned char *station_addr = eaddr->ether_addr_octet; - - if (opt_broadcast) - memset(pkt+0, 0xff, 6); - else - memcpy(pkt, station_addr, 6); - memcpy(pkt+6, station_addr, 6); - pkt[12] = 0x08; /* Or 0x0806 for ARP, 0x8035 for RARP */ - pkt[13] = 0x42; - offset = 14; - - memset(pkt+offset, 0xff, 6); - offset += 6; - - for (i = 0; i < 16; i++) { - memcpy(pkt+offset, station_addr, 6); - offset += 6; - } - if (debug) { - fprintf(stderr, "Packet is "); - for (i = 0; i < offset; i++) - fprintf(stderr, " %2.2x", pkt[i]); - fprintf(stderr, ".\n"); - } - return offset; -} - -static int get_wol_pw(const char *optarg) -{ - int passwd[6]; - int byte_cnt; - int i; - - byte_cnt = sscanf(optarg, "%2x:%2x:%2x:%2x:%2x:%2x", - &passwd[0], &passwd[1], &passwd[2], - &passwd[3], &passwd[4], &passwd[5]); - if (byte_cnt < 4) - byte_cnt = sscanf(optarg, "%d.%d.%d.%d", - &passwd[0], &passwd[1], &passwd[2], &passwd[3]); - if (byte_cnt < 4) { - fprintf(stderr, "Unable to read the Wake-On-LAN password.\n"); - return 0; - } - printf(" The Magic packet password is %2.2x %2.2x %2.2x %2.2x (%d).\n", - passwd[0], passwd[1], passwd[2], passwd[3], byte_cnt); - for (i = 0; i < byte_cnt; i++) - wol_passwd[i] = passwd[i]; - return wol_passwd_sz = byte_cnt; -} - -#if 0 -{ - to = (struct sockaddr_in *)&whereto; - to->sin_family = AF_INET; - if (inet_aton(target, &to->sin_addr)) { - hostname = target; - } - memset (&sa, 0, sizeof sa); - sa.sa_family = AF_INET; - strncpy (sa.sa_data, interface, sizeof sa.sa_data); - sendto (sock, buf, bufix + len, 0, &sa, sizeof sa); - strncpy (sa.sa_data, interface, sizeof sa.sa_data); -#if 1 - sendto (sock, buf, bufix + len, 0, &sa, sizeof sa); -#else - bind (sock, &sa, sizeof sa); - connect(); - send (sock, buf, bufix + len, 0); -#endif -} -#endif - - -/* - * Local variables: - * compile-command: "gcc -O -Wall -o ether-wake ether-wake.c" - * c-indent-level: 4 - * c-basic-offset: 4 - * c-indent-level: 4 - * tab-width: 4 - * End: - */ diff --git a/openwrt/package/ether-wake/ipkg/ether-wake.control b/openwrt/package/ether-wake/ipkg/ether-wake.control deleted file mode 100644 index 2c736f15040..00000000000 --- a/openwrt/package/ether-wake/ipkg/ether-wake.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ether-wake -Priority: optional -Section: net -Description: A Wake-On-LAN (WOL) client, - send a magic packet to wake up sleeping networked machines. diff --git a/openwrt/package/ether-wake/patches/no_ether_hostton_in_uclibc.patch b/openwrt/package/ether-wake/patches/no_ether_hostton_in_uclibc.patch deleted file mode 100644 index 91e93866d17..00000000000 --- a/openwrt/package/ether-wake/patches/no_ether_hostton_in_uclibc.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- ether-wake-1.09-orig/ether-wake.c 2005-08-10 17:19:16.000000000 +0200 -+++ ether-wake-1.09-1/ether-wake.c 2005-08-10 17:18:55.000000000 +0200 -@@ -15,7 +15,7 @@ - " an optional password appended.\n" - "\n" - " The single required parameter is the Ethernet MAC (station) address\n" --" of the machine to wake or a host ID with known NSS 'ethers' entry.\n" -+" of the machine to wake.\n" - " The MAC address may be found with the 'arp' program while the target\n" - " machine is awake.\n" - "\n" -@@ -289,16 +289,10 @@ - if (debug) - fprintf(stderr, "The target station address is %s.\n", - ether_ntoa(eaddr)); -- } else if (ether_hostton(hostid, eaddr) == 0) { -- if (debug) -- fprintf(stderr, "Station address for hostname %s is %s.\n", -- hostid, ether_ntoa(eaddr)); - } else { - (void)fprintf(stderr, - "ether-wake: The Magic Packet host address must be " -- "specified as\n" -- " - a station address, 00:11:22:33:44:55, or\n" -- " - a hostname with a known 'ethers' entry.\n"); -+ "specified as a station address, 00:11:22:33:44:55.\n"); - return -1; - } - return 0; diff --git a/openwrt/package/ethtool/Config.in b/openwrt/package/ethtool/Config.in deleted file mode 100644 index bd718cd98fa..00000000000 --- a/openwrt/package/ethtool/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_ETHTOOL - prompt "ethtool........................... Display or change ethernet card settings" - tristate - default m if CONFIG_DEVEL - help - ethtool is used for querying settings of an ethernet device and changing them - - http://sourceforge.net/projects/gkernel/ - diff --git a/openwrt/package/ethtool/Makefile b/openwrt/package/ethtool/Makefile deleted file mode 100644 index 4378c005ba9..00000000000 --- a/openwrt/package/ethtool/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ethtool -PKG_VERSION:=3 -PKG_RELEASE:=0 -PKG_MD5SUM:=b4e71f7fa2629250677eefcb338442c5 - -PKG_SOURCE_URL:=@SF/gkernel -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ETHTOOL,ethtool,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_ETHTOOL): - install -d -m0755 $(IDIR_ETHTOOL)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_ETHTOOL)/usr/sbin - $(RSTRIP) $(IDIR_ETHTOOL) - $(IPKG_BUILD) $(IDIR_ETHTOOL) $(PACKAGE_DIR) diff --git a/openwrt/package/ethtool/ipkg/ethtool.control b/openwrt/package/ethtool/ipkg/ethtool.control deleted file mode 100644 index 2cc3f065c56..00000000000 --- a/openwrt/package/ethtool/ipkg/ethtool.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ethtool -Priority: optional -Section: net -Description: Display or change ethernet card settings diff --git a/openwrt/package/expat/Config.in b/openwrt/package/expat/Config.in deleted file mode 100644 index 9b34c52c897..00000000000 --- a/openwrt/package/expat/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_EXPAT - tristate - default n - depends BR2_PACKAGE_LIBEXPAT - -config BR2_PACKAGE_LIBEXPAT - prompt "libexpat.......................... A fast, non-validating, stream-oriented XML parsing library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_EXPAT - help - A fast, non-validating, stream-oriented XML parsing library - - http://expat.sourceforge.net/ - diff --git a/openwrt/package/expat/Makefile b/openwrt/package/expat/Makefile deleted file mode 100644 index 47c8e81b188..00000000000 --- a/openwrt/package/expat/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=expat -PKG_VERSION:=1.95.8 -PKG_RELEASE:=1 -PKG_MD5SUM:=aff487543845a82fe262e6e2922b4c8e - -PKG_SOURCE_URL:=@SF/expat -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBEXPAT,libexpat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR) ; rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBEXPAT): - install -m0755 -d $(IDIR_LIBEXPAT)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(IDIR_LIBEXPAT)/usr/lib/ - $(RSTRIP) $(IDIR_LIBEXPAT) - $(IPKG_BUILD) $(IDIR_LIBEXPAT) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libexpat.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlwf $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/expat*.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libexpat.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/xmlwf \ - $(STAGING_DIR)/usr/include/expat*.h \ - $(STAGING_DIR)/usr/lib/libexpat.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/expat/ipkg/libexpat.control b/openwrt/package/expat/ipkg/libexpat.control deleted file mode 100644 index 9fe78fa63df..00000000000 --- a/openwrt/package/expat/ipkg/libexpat.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libexpat -Priority: optional -Section: net -Description: a fast, non-validating, stream-oriented XML parsing library diff --git a/openwrt/package/expat/patches/001-destdir.patch b/openwrt/package/expat/patches/001-destdir.patch deleted file mode 100644 index dc1f36a1693..00000000000 --- a/openwrt/package/expat/patches/001-destdir.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -ruN expat-1.95.8-orig/Makefile.in expat-1.95.8-1/Makefile.in ---- expat-1.95.8-orig/Makefile.in 2004-05-07 22:00:48.000000000 +0200 -+++ expat-1.95.8-1/Makefile.in 2005-04-04 22:53:09.000000000 +0200 -@@ -34,6 +34,8 @@ - - top_builddir = . - -+DESTDIR = -+ - - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ -@@ -73,22 +75,22 @@ - tests/runtests - - install: xmlwf/xmlwf installlib -- $(mkinstalldirs) $(bindir) $(man1dir) -- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf -- $(INSTALL_DATA) $(MANFILE) $(man1dir) -+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) -+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf -+ $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir) - - installlib: $(LIBRARY) $(APIHEADER) -- $(mkinstalldirs) $(libdir) $(includedir) -- $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY) -- $(INSTALL_DATA) $(APIHEADER) $(includedir) -+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) -+ $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY) -+ $(INSTALL_DATA) $(APIHEADER) $(DESTDIR)$(includedir) - - uninstall: uninstalllib -- $(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf -+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf - rm -f $(man1dir)/xmlwf.1 - - uninstalllib: -- $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY) -- rm -f $(includedir)/$(APIHEADER) -+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY) -+ rm -f $(DESTDIR)$(includedir)/$(APIHEADER) - - # for VPATH builds (invoked by configure) - mkdir-init: diff --git a/openwrt/package/ez-ipupdate/Config.in b/openwrt/package/ez-ipupdate/Config.in deleted file mode 100644 index ff385f86c06..00000000000 --- a/openwrt/package/ez-ipupdate/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_EZIPUPDATE - prompt "ez-ipupdate....................... Client for most dynamic DNS services" - tristate - default m if CONFIG_DEVEL - help - A client for many Dynamic DNS services. - - http://ez-ipupdate.com/ - diff --git a/openwrt/package/ez-ipupdate/Makefile b/openwrt/package/ez-ipupdate/Makefile deleted file mode 100644 index 92d75276435..00000000000 --- a/openwrt/package/ez-ipupdate/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ez-ipupdate -PKG_VERSION:=3.0.11b8 -PKG_RELEASE:=2 -PKG_MD5SUM:=000211add4c4845ffa4211841bff4fb0 - -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/e/ez-ipupdate \ - http://ftp.de.debian.org/debian/pool/main/e/ez-ipupdate -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,EZIPUPDATE,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib/locate \ - --localstatedir=/var/lib \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_EZIPUPDATE): - install -d -m0755 $(IDIR_EZIPUPDATE)/etc - install -m0600 ./files/$(PKG_NAME).conf $(IDIR_EZIPUPDATE)/etc/ - install -d -m0755 $(IDIR_EZIPUPDATE)/etc/hotplug.d/iface - install -m0755 ./files/$(PKG_NAME).hotplug $(IDIR_EZIPUPDATE)/etc/hotplug.d/iface/10-$(PKG_NAME) - install -d -m0755 $(IDIR_EZIPUPDATE)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_EZIPUPDATE)/usr/sbin/ - $(RSTRIP) $(IDIR_EZIPUPDATE) - $(IPKG_BUILD) $(IDIR_EZIPUPDATE) $(PACKAGE_DIR) - diff --git a/openwrt/package/ez-ipupdate/files/ez-ipupdate.conf b/openwrt/package/ez-ipupdate/files/ez-ipupdate.conf deleted file mode 100644 index cb98275fd38..00000000000 --- a/openwrt/package/ez-ipupdate/files/ez-ipupdate.conf +++ /dev/null @@ -1,8 +0,0 @@ -service-type=zoneedit -user=myname:mypassword -host=mydomain.com -quiet - -# Do not change the lines below -cache-file=/tmp/ez-ipupdate.cache -pid-file=/var/run/ez-ipupdate.pid diff --git a/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug b/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug deleted file mode 100644 index c305458b1a6..00000000000 --- a/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug +++ /dev/null @@ -1,10 +0,0 @@ -NAME=ez-ipupdate -CONFIG=/etc/$NAME.conf -COMMAND=/usr/sbin/$NAME - -[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && { - [ -x $COMMAND ] && [ -r $CONFIG ] && { - eval "ifname=\"\${${INTERFACE}_ifname}\"" - $COMMAND -c $CONFIG -i $ifname 2>&1 | logger -t $NAME - } & -} diff --git a/openwrt/package/ez-ipupdate/files/ez-ipupdate.init b/openwrt/package/ez-ipupdate/files/ez-ipupdate.init deleted file mode 100644 index 15721756153..00000000000 --- a/openwrt/package/ez-ipupdate/files/ez-ipupdate.init +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -BIN=ez-ipupdate -CONF=/etc/$BIN.conf -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $CONF ] || exit - -case $1 in - start) - mkdir -p $RUN_D - $BIN -c $CONF - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/ez-ipupdate/ipkg/ez-ipupdate.conffiles b/openwrt/package/ez-ipupdate/ipkg/ez-ipupdate.conffiles deleted file mode 100644 index 3a9041e34eb..00000000000 --- a/openwrt/package/ez-ipupdate/ipkg/ez-ipupdate.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ez-ipupdate.conf diff --git a/openwrt/package/ez-ipupdate/ipkg/ez-ipupdate.control b/openwrt/package/ez-ipupdate/ipkg/ez-ipupdate.control deleted file mode 100644 index 1b7dff825e6..00000000000 --- a/openwrt/package/ez-ipupdate/ipkg/ez-ipupdate.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ez-ipupdate -Priority: optional -Section: net -Description: a client for dynamic DNS services diff --git a/openwrt/package/ez-ipupdate/patches/debian-subset.patch b/openwrt/package/ez-ipupdate/patches/debian-subset.patch deleted file mode 100644 index c24b3ea378f..00000000000 --- a/openwrt/package/ez-ipupdate/patches/debian-subset.patch +++ /dev/null @@ -1,568 +0,0 @@ ---- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c -+++ ez-ipupdate-3.0.11b8/ez-ipupdate.c -@@ -139,6 +139,9 @@ - #if HAVE_SIGNAL_H - # include - #endif -+#if HAVE_TIME_H -+# include -+#endif - #if HAVE_SYS_TIME_H - # include - #endif -@@ -165,7 +168,7 @@ - #endif - - --#if __linux__ || __SVR4 || __OpenBSD__ || __FreeBSD__ || __NetBSD__ -+#if __GLIBC__ || __SVR4 || __OpenBSD__ || __FreeBSD__ || __NetBSD__ - # define IF_LOOKUP 1 - # include - # include -@@ -640,7 +643,7 @@ - fprintf(stdout, " -q, --quiet \t\t\tbe quiet\n"); - fprintf(stdout, " -r, --retrys \t\tnumber of trys (default: 1)\n"); - fprintf(stdout, " -R, --run-as-user \tchange to for running, be ware\n\t\t\t\tthat this can cause problems with handeling\n\t\t\t\tSIGHUP properly if that user can't read the\n\t\t\t\tconfig file. also it can't write it's pid file \n\t\t\t\tto a root directory\n"); -- fprintf(stdout, " -Q, --run-as-euser \tchange to effective for running, \n\t\t\t\tthis is NOT secure but it does solve the \n\t\t\t\tproblems with run-as-user and config files and \n\t\t\t\tpid files.\n"); -+ fprintf(stdout, " -Q, --run-as-euser \tchange to effective for running, \n\t\t\t\tthis is NOT secure but it does solve the \n\t\t\t\tproblems with run-as-user and config files and \n\t\t\t\tpid files\n"); - fprintf(stdout, " -s, --server \tthe server to connect to\n"); - fprintf(stdout, " -S, --service-type \tthe type of service that you are using\n"); - width = fprintf(stdout, "\t\t\t\ttry one of: ") + 4*7; -@@ -682,7 +685,7 @@ - - void print_signalhelp( void ) - { -- fprintf(stdout, "\nsignals are only really used when in daemon mode.\n\n"); -+ fprintf(stdout, "\nsignals are only really used when in daemon mode\n\n"); - fprintf(stdout, "signals: \n"); - fprintf(stdout, " HUP\t\tcauses it to re-read its config file\n"); - fprintf(stdout, " TERM\t\twake up and possibly perform an update\n"); -@@ -693,7 +696,7 @@ - #if HAVE_SIGNAL_H - RETSIGTYPE sigint_handler(int sig) - { -- char message[] = "interupted.\n"; -+ char message[] = "interrupted\n"; - close(client_sockfd); - write(2, message, sizeof(message)-1); - -@@ -704,6 +707,10 @@ - } - #endif - -+#if HAVE_SYSLOG_H -+ closelog(); -+#endif -+ - exit(1); - } - RETSIGTYPE generic_sig_handler(int sig) -@@ -798,7 +805,7 @@ - sprintf(buf, "message incomplete because your OS sucks: %s\n", fmt); - #endif - -- syslog(LOG_NOTICE, buf); -+ syslog(LOG_NOTICE, "%s", buf); - } - else - { -@@ -1439,7 +1446,7 @@ - if(!(options & OPT_QUIET)) - { - fprintf(stderr, -- "connected to %s (%s) on port %d.\n", -+ "connected to %s (%s) on port %d\n", - host, - inet_ntoa(address.sin_addr), - ntohs(address.sin_port)); -@@ -1683,7 +1690,7 @@ - close(client_sockfd); - return(-1); - } -- if(strstr(buf, "\r\n") > 0) -+ if(strstr(buf, "\n") != NULL) - { - break; - } -@@ -1702,8 +1709,8 @@ - - if(options & OPT_DAEMON) - { -- fprintf(stderr, "no compile time default service was set therefor you must " -- "specify a service type.\n"); -+ fprintf(stderr, "no compile time default service was set, you must " -+ "specify a service type\n"); - - return(-1); - } -@@ -2039,7 +2046,7 @@ - } - else if(strstr(buf, "\nnumhost") != NULL) - { -- show_message("Too many or too few hosts found\n"); -+ show_message("too many or too few hosts found\n"); - retval = UPDATERES_SHUTDOWN; - } - else if(strstr(buf, "\ndnserr") != NULL) -@@ -2051,17 +2058,17 @@ - } - else if(strstr(buf, "\n911") != NULL) - { -- show_message("Ahhhh! call 911!\n"); -+ show_message("ahhhh! call 911!\n"); - retval = UPDATERES_SHUTDOWN; - } - else if(strstr(buf, "\n999") != NULL) - { -- show_message("Ahhhh! call 999!\n"); -+ show_message("ahhhh! call 999!\n"); - retval = UPDATERES_SHUTDOWN; - } - else if(strstr(buf, "\n!donator") != NULL) - { -- show_message("a feature requested is only available to donators, please donate.\n", host); -+ show_message("a feature requested is only available to donators, please donate\n", host); - retval = UPDATERES_OK; - } - // this one should be last as it is a stupid string to signify waits -@@ -2095,9 +2102,9 @@ - sprintf(reason, "problem parsing reason for wait response"); - } - -- show_message("Wait response received, waiting for %s before next update.\n", -+ show_message("wait response received, waiting for %s before next update\n", - format_time(howlong)); -- show_message("Wait response reason: %d\n", N_STR(reason)); -+ show_message("wait response reason: %d\n", N_STR(reason)); - sleep(howlong); - retval = UPDATERES_ERROR; - } -@@ -3370,7 +3377,7 @@ - { - if(!(options & OPT_QUIET)) - { -- fprintf(stderr, "warning: for GNUDIP the \"address\" parpameter is only used if set to \"0.0.0.0\" thus making an offline request.\n"); -+ fprintf(stderr, "warning: for GNUDIP the \"address\" parameter is only used if set to \"0.0.0.0\" thus making an offline request\n"); - } - } - -@@ -3392,7 +3399,7 @@ - - // send an offline request if address 0.0.0.0 is used - // otherwise, we ignore the address and send an update request -- gnudip_request[0] = strcmp(address, "0.0.0.0") == 0 ? '1' : '0'; -+ gnudip_request[0] = address && strcmp(address, "0.0.0.0") == 0 ? '1' : '0'; - gnudip_request[1] = '\0'; - - // find domainname -@@ -3943,22 +3950,22 @@ - break; - - case 201: -- show_message("Last update was less than %d seconds ago.\n", 300); -+ show_message("last update was less than %d seconds ago\n", 300); - return(UPDATERES_ERROR); - break; - - case 202: -- show_message("Server error.\n"); -+ show_message("server error\n"); - return(UPDATERES_ERROR); - break; - - case 203: -- show_message("Failure because account is frozen (by admin).\n"); -+ show_message("failure because account is frozen (by admin)\n"); - return(UPDATERES_SHUTDOWN); - break; - - case 204: -- show_message("Failure because account is locked (by user).\n"); -+ show_message("failure because account is locked (by user)\n"); - return(UPDATERES_SHUTDOWN); - break; - -@@ -4215,8 +4222,6 @@ - - switch(ret) - { -- char *p; -- - case -1: - if(!(options & OPT_QUIET)) - { -@@ -4349,7 +4354,7 @@ - case SIGHUP: - if(config_file) - { -- show_message("SIGHUP recieved, re-reading config file\n"); -+ show_message("SIGHUP received, re-reading config file\n"); - if(parse_conf_file(config_file, conf_commands) != 0) - { - show_message("error parsing config file \"%s\"\n", config_file); -@@ -4384,6 +4389,7 @@ - - int main(int argc, char **argv) - { -+ char *tmp; - int ifresolve_warned = 0; - int i; - int retval = 1; -@@ -4395,9 +4401,10 @@ - mcheck(NULL); - #endif - -- dprintf((stderr, "staring...\n")); -+ dprintf((stderr, "starting...\n")); - -- program_name = argv[0]; -+ tmp = strrchr(argv[0], '/'); -+ program_name = tmp ? tmp + 1 : argv[0]; - options = 0; - *user = '\0'; - timeout.tv_sec = DEFAULT_TIMEOUT; -@@ -4417,7 +4424,7 @@ - - if(!(options & OPT_QUIET) && !(options & OPT_DAEMON)) - { -- fprintf(stderr, "ez-ipupdate Version %s\nCopyright (C) 1998-2001 Angus Mackay.\n", VERSION); -+ fprintf(stderr, "%s Version %s\nCopyright (C) 1998-2001 Angus Mackay\n", program_name, VERSION); - } - - dprintf((stderr, "options: 0x%04X\n", options)); -@@ -4434,7 +4441,7 @@ - { - if(service->check_info() != 0) - { -- fprintf(stderr, "invalid data to perform requested action.\n"); -+ fprintf(stderr, "invalid data to perform requested action\n"); - exit(1); - } - } -@@ -4456,13 +4463,13 @@ - dprintf((stderr, "user_name: %s\n", user_name)); - dprintf((stderr, "password: %s\n", password)); - } -- if(*user_name == '\0') -+ if(*user_name == '\0' && !(options & OPT_DAEMON)) - { - printf("user name: "); - fgets(user_name, sizeof(user_name), stdin); - chomp(user_name); - } -- if(*password == '\0') -+ if(*password == '\0' && !(options & OPT_DAEMON)) - { - strncpy(password, getpass("password: "), sizeof(password)); - } -@@ -4480,7 +4487,7 @@ - - if(service->check_info() != 0) - { -- fprintf(stderr, "invalid data to perform requested action.\n"); -+ fprintf(stderr, "invalid data to perform requested action\n"); - exit(1); - } - -@@ -4503,7 +4510,7 @@ - - if(interface == NULL) - { -- fprintf(stderr, "invalid data to perform requested action.\n"); -+ fprintf(stderr, "invalid data to perform requested action\n"); - fprintf(stderr, "you must provide an interface for daemon mode"); - exit(1); - } -@@ -4519,23 +4526,25 @@ - if(fork() > 0) { exit(0); } /* parent */ - } - -+# if HAVE_SYSLOG_H -+ openlog(program_name, LOG_PID, LOG_DAEMON ); -+ //options |= OPT_QUIET; -+# endif -+ show_message("version %s, interface %s, host %s, server %s, service %s\n", -+ VERSION, N_STR(interface), N_STR(host), server, service->title); -+ - #if HAVE_GETPID - if(pid_file && pid_file_create(pid_file) != 0) - { -- fprintf(stderr, "exiting...\n"); -+ show_message("could not create pid file %s (%s), exiting\n", -+ pid_file, strerror(errno)); -+#if HAVE_SYSLOG_H -+ closelog(); -+#endif - exit(1); - } - #endif - --# if HAVE_SYSLOG_H -- openlog(program_name, LOG_PID, LOG_USER ); -- options |= OPT_QUIET; --# endif -- show_message("ez-ipupdate Version %s, Copyright (C) 1998-2001 Angus Mackay.\n", -- VERSION); -- show_message("%s started for interface %s host %s using server %s and service %s\n", -- program_name, N_STR(interface), N_STR(host), server, service->title); -- - memset(&sin, 0, sizeof(sin)); - - if(cache_file) -@@ -4560,7 +4569,7 @@ - strftime(timebuf, sizeof(timebuf), "%Y/%m/%d %H:%M", ts); - show_message("got last update %s on %s from cache file\n", ipstr, timebuf); - } -- else -+ else if(ipstr||ipdate) - { - show_message("malformed cache file: %s\n", cache_file); - } -@@ -4647,7 +4656,7 @@ - } - else - { -- show_message("failure to update %s->%s (%s)\n", -+ show_message("failed to update %s->%s (%s)\n", - interface, inet_ntoa(sin.sin_addr), N_STR(host)); - memset(&sin, 0, sizeof(sin)); - -@@ -4671,7 +4680,7 @@ - dprintf((stderr, "updateres: %d\n", updateres)); - if(updateres == UPDATERES_SHUTDOWN) - { -- show_message("shuting down updater for %s due to fatal error\n", -+ show_message("shutting down updater for %s due to fatal error\n", - N_STR(host)); - - if(notify_email && *notify_email != '\0') -@@ -4711,7 +4720,7 @@ - #endif - - #else -- fprintf(stderr, "sorry, this mode is only available on platforms that the "); -+ fprintf(stderr, "sorry, this mode is only available on platforms where the "); - fprintf(stderr, "IP address \ncan be determined. feel free to hack the code"); - fprintf(stderr, " though.\n"); - exit(1); -@@ -4799,7 +4808,7 @@ - } - else - { -- show_message("could not resolve ip address for %s.\n", interface); -+ show_message("could not resolve ip address for %s\n", interface); - exit(1); - } - close(sock); ---- ez-ipupdate-3.0.11b8.orig/example.conf -+++ ez-ipupdate-3.0.11b8/example.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # ---- ez-ipupdate-3.0.11b8.orig/example-pgpow.conf -+++ ez-ipupdate-3.0.11b8/example-pgpow.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -10,8 +10,8 @@ - host=mydomain.penguinpowered.com - interface=eth1 - --# if you use run-as ensure the user has permission to write this file --cache-file=/tmp/ez-ipupdate.cache -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-dhs.conf -+++ ez-ipupdate-3.0.11b8/example-dhs.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -10,8 +10,8 @@ - host=mydomain.whatever.com - interface=eth1 - --# if you use run-as ensure the user has permission to write this file --cache-file=/tmp/ez-ipupdate.cache -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-dyndns.conf -+++ ez-ipupdate-3.0.11b8/example-dyndns.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -12,14 +12,9 @@ - interface=eth1 - max-interval=2073600 - --# please create this file and ensure that the user that ez-ipupdate is running --# as has write permissions to it then uncomment this line, if you don't your --# dyndns account will probably get banned. if you run ez-ipupdate as root (bad --# idea, use "run-as-user") then you can just uncomment this line. --#cache-file=/etc/ez-ipupdate.cache.eth1 -- --# for the mean time we'll just use a cache file in the temp directory --cache-file=/tmp/ez-ipupdate.cache -+# if you don't use a cache file your dyndns account will probably get banned. -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-ods.conf -+++ ez-ipupdate-3.0.11b8/example-ods.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -10,8 +10,8 @@ - host=mydomain.ods.org - interface=eth1 - --# if you use run-as ensure the user has permission to write this file --cache-file=/tmp/ez-ipupdate.cache -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-tzo.conf -+++ ez-ipupdate-3.0.11b8/example-tzo.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -14,8 +14,8 @@ - max-interval=2073600 - interface=eth1 - --# if you use run-as ensure the user has permission to write this file --cache-file=/tmp/ez-ipupdate.cache -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-gnudip.conf -+++ ez-ipupdate-3.0.11b8/example-gnudip.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -14,8 +14,8 @@ - # any other value is ignored - #address=0.0.0.0 - --# if you use run-as ensure the user has permission to write this file --cache-file=/tmp/ez-ipupdate.cache -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-easydns.conf -+++ ez-ipupdate-3.0.11b8/example-easydns.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -10,8 +10,8 @@ - host=mydomain.whatever.com - interface=eth1 - --# if you use run-as ensure the user has permission to write this file --cache-file=/tmp/ez-ipupdate.cache -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-justlinux.conf -+++ ez-ipupdate-3.0.11b8/example-justlinux.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -10,8 +10,8 @@ - host=mydomain.penguinpowered.com - interface=eth1 - --# if you use run-as ensure the user has permission to write this file --cache-file=/tmp/ez-ipupdate.cache -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-dyns.conf -+++ ez-ipupdate-3.0.11b8/example-dyns.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -10,8 +10,8 @@ - host=myhost - #interface=eth1 - --# if you use run-as ensure the user has permission to write this file --#cache-file=/tmp/ez-ipupdate.cache -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it ---- ez-ipupdate-3.0.11b8.orig/example-heipv6tb.conf -+++ ez-ipupdate-3.0.11b8/example-heipv6tb.conf -@@ -1,4 +1,4 @@ --#!/usr/local/bin/ez-ipupdate -c -+#!/usr/sbin/ez-ipupdate -c - # - # example config file for ez-ipupdate - # -@@ -11,14 +11,9 @@ - interface=eth1 - max-interval=2073600 - --# please create this file and ensure that the user that ez-ipupdate is running --# as has write permissions to it then uncomment this line, if you don't your --# dyndns account will probably get banned. if you run ez-ipupdate as root (bad --# idea, use "run-as-user") then you can just uncomment this line. --#cache-file=/etc/ez-ipupdate.cache.eth1 -- --# for the mean time we'll just use a cache file in the temp directory --cache-file=/tmp/ez-ipupdate.cache -+# if you don't use a cache file your account will probably get banned. -+run-as-user=ez-ipupd -+cache-file=/var/cache/ez-ipupdate/default-cache - - # uncomment this once you have everything working how you want and you are - # ready to have ez-ipupdate running in the background all the time. to stop it diff --git a/openwrt/package/fakeidentd/Config.in b/openwrt/package/fakeidentd/Config.in deleted file mode 100644 index ddfa3a99924..00000000000 --- a/openwrt/package/fakeidentd/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_FAKEIDENTD - prompt "fakeidentd........................ A static, secure identd." - tristate - default m if CONFIG_DEVEL - help - A static secure identd, only one source file. - - http://www.guru-group.fi/~too/sw/releases/ diff --git a/openwrt/package/fakeidentd/Makefile b/openwrt/package/fakeidentd/Makefile deleted file mode 100644 index fa61f353660..00000000000 --- a/openwrt/package/fakeidentd/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# $Id: $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fakeidentd -PKG_VERSION:=2.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=aa4133981c94c59868344cd3b02e8e19 - -PKG_SOURCE_URL:=http://distfiles.gentoo.org/distfiles/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,FAKEIDENTD,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) -o $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/identd.c - touch $@ - -$(IPKG_FAKEIDENTD): - install -d -m0755 $(IDIR_FAKEIDENTD)/usr/sbin \ - $(IDIR_FAKEIDENTD)/etc/init.d \ - $(IDIR_FAKEIDENTD)/etc/default/ - echo $(whoami) > $(IDIR_FAKEIDENTD)/etc/default/$(PKG_NAME) - $(CP) $(PKG_BUILD_DIR)/fakeidentd $(IDIR_FAKEIDENTD)/usr/sbin/ - $(CP) ./files/$(PKG_NAME).init $(IDIR_FAKEIDENTD)/etc/init.d/$(PKG_NAME) - $(RSTRIP) $(IDIR_FAKEIDENTD) - $(IPKG_BUILD) $(IDIR_FAKEIDENTD) $(PACKAGE_DIR) - diff --git a/openwrt/package/fakeidentd/files/fakeidentd.init b/openwrt/package/fakeidentd/files/fakeidentd.init deleted file mode 100644 index 954ad8c24c3..00000000000 --- a/openwrt/package/fakeidentd/files/fakeidentd.init +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -NAME=fakeidentd -case "$1" in - start) - [ -e $DEFAULT ] && $NAME $DEFAULT - ;; - stop) - killall $NAME - ;; - restart) - killall $NAME - $NAME - ;; - *) - echo "Usage: $NAME (start|stop|restart)" > 2& - exit 1 - ;; -esac diff --git a/openwrt/package/fakeidentd/ipkg/fakeidentd.control b/openwrt/package/fakeidentd/ipkg/fakeidentd.control deleted file mode 100644 index 6c528b27521..00000000000 --- a/openwrt/package/fakeidentd/ipkg/fakeidentd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: fakeidentd -Description: A static, secure identd. -Section: net -Priority: optional diff --git a/openwrt/package/fetchmail/Config.in b/openwrt/package/fetchmail/Config.in deleted file mode 100644 index bc6cdfe8aa4..00000000000 --- a/openwrt/package/fetchmail/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_FETCHMAIL - prompt "fetchmail......................... Remote mail retriever" - tristate - default m if CONFIG_DEVEL - help - Retrieves remote mail via POP/IMAP - - Very useful in conjunction with mutt. diff --git a/openwrt/package/fetchmail/Makefile b/openwrt/package/fetchmail/Makefile deleted file mode 100644 index 049c6aecf6f..00000000000 --- a/openwrt/package/fetchmail/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fetchmail -PKG_VERSION:=6.2.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=9956b30139edaa4f5f77c4d0dbd80225 - -PKG_SOURCE_URL:=http://www.catb.org/~esr/fetchmail/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,FETCHMAIL,fetchmail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_c_bigendian=no \ - ac_cv_sizeof_off_t=8 \ - ac_cv_sizeof_int=4 \ - ac_cv_sizeof_long=4 \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-fallback=procmail \ - --without-hesiod \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_FETCHMAIL): - mkdir -p $(IDIR_FETCHMAIL)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(IDIR_FETCHMAIL)/usr/bin/ - $(RSTRIP) $(IDIR_FETCHMAIL) - $(IPKG_BUILD) $(IDIR_FETCHMAIL) $(PACKAGE_DIR) diff --git a/openwrt/package/fetchmail/ipkg/fetchmail.control b/openwrt/package/fetchmail/ipkg/fetchmail.control deleted file mode 100644 index ea664fa6e62..00000000000 --- a/openwrt/package/fetchmail/ipkg/fetchmail.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: fetchmail -Priority: optional -Section: text -Depends: -Description: Mail text client diff --git a/openwrt/package/fetchmail/patches/01-amd64_detection.patch b/openwrt/package/fetchmail/patches/01-amd64_detection.patch deleted file mode 100644 index 2db43d1110e..00000000000 --- a/openwrt/package/fetchmail/patches/01-amd64_detection.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -urN fetchmail-6.2.5/config.sub fetchmail-6.2.5.new/config.sub ---- fetchmail-6.2.5/config.sub 2003-07-17 03:03:20.000000000 +0200 -+++ fetchmail-6.2.5.new/config.sub 2006-03-30 00:36:11.000000000 +0200 -@@ -176,7 +176,7 @@ - | 580 | i960 | h8300 \ - | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ -- | hppa64 \ -+ | hppa64 | x86_64 \ - | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ - | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ -@@ -194,7 +194,7 @@ - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. -- i[34567]86) -+ i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. -@@ -209,7 +209,7 @@ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ - | xmp-* | ymp-* \ -- | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ -+ | x86-* | x86_64-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ - | hppa2.0n-* | hppa64-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ -@@ -256,6 +256,12 @@ - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv diff --git a/openwrt/package/fetchmail/patches/02-no_rej.patch b/openwrt/package/fetchmail/patches/02-no_rej.patch deleted file mode 100644 index 64cc7cb7d9f..00000000000 --- a/openwrt/package/fetchmail/patches/02-no_rej.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ruN fetchmail-6.2.5-old/po/fr.po.rej fetchmail-6.2.5-new/po/fr.po.rej ---- fetchmail-6.2.5-old/po/fr.po.rej 2003-07-17 03:23:26.000000000 +0200 -+++ fetchmail-6.2.5-new/po/fr.po.rej 1970-01-01 01:00:00.000000000 +0100 -@@ -1,17 +0,0 @@ --*************** --*** 2166,2172 **** -- #: rcfile_y.y:433 -- #, fuzzy, c-format -- msgid "File %s must be a regular file.\n" --- msgstr "Le fichier %s doit etre un lien symbolique.\n" -- -- #: rcfile_y.y:440 -- #, c-format ----- 2166,2172 ---- -- #: rcfile_y.y:433 -- #, fuzzy, c-format -- msgid "File %s must be a regular file.\n" --+ msgstr "Le fichier %s doit être un fichier normal.\n" -- -- #: rcfile_y.y:440 -- #, c-format diff --git a/openwrt/package/flac/Config.in b/openwrt/package/flac/Config.in deleted file mode 100644 index 87f88a38344..00000000000 --- a/openwrt/package/flac/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_FLAC - tristate - default n - depends BR2_PACKAGE_LIBFLAC - -config BR2_PACKAGE_LIBFLAC - prompt "libflac........................... Free Lossless Audio Codec library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_FLAC - help - Free Lossless Audio Codec library - - http://flac.sourceforge.net/ - diff --git a/openwrt/package/flac/Makefile b/openwrt/package/flac/Makefile deleted file mode 100644 index b06cf0ec4d2..00000000000 --- a/openwrt/package/flac/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=flac -PKG_VERSION:=1.1.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=2bfc127cdda02834d0491ab531a20960 - -PKG_SOURCE_URL:=@SF/flac -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBFLAC,libflac,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.lite \ - $(TARGET_CONFIGURE_OPTS) \ - RELEASE_CFLAGS="$(TARGET_CFLAGS)" \ - libFLAC - touch $@ - -$(IPKG_LIBFLAC): - install -m0755 -d $(IDIR_LIBFLAC)/usr/lib - $(CP) $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(IDIR_LIBFLAC)/usr/lib/ - $(RSTRIP) $(IDIR_LIBFLAC) - $(IPKG_BUILD) $(IDIR_LIBFLAC) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libFLAC.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_BUILD_DIR)/include/FLAC $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libFLAC.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/FLAC \ - $(STAGING_DIR)/usr/lib/libFLAC.a \ - $(STAGING_DIR)/usr/lib/libFLAC.so \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/flac/ipkg/libflac.control b/openwrt/package/flac/ipkg/libflac.control deleted file mode 100644 index ea507952596..00000000000 --- a/openwrt/package/flac/ipkg/libflac.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libflac -Priority: optional -Section: libs -Description: Free Lossless Audio Codec library diff --git a/openwrt/package/flac/patches/no_encoder.patch b/openwrt/package/flac/patches/no_encoder.patch deleted file mode 100644 index f1d6fe277a6..00000000000 --- a/openwrt/package/flac/patches/no_encoder.patch +++ /dev/null @@ -1,280 +0,0 @@ -diff -ru flac-1.1.2.OLD/build/lib.mk flac-1.1.2.NEW/build/lib.mk ---- flac-1.1.2.OLD/build/lib.mk 2005-01-25 15:10:47.000000000 +1100 -+++ flac-1.1.2.NEW/build/lib.mk 2005-10-16 10:10:43.000000000 +1000 -@@ -58,7 +58,7 @@ - - debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) - valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) --release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) -+release : CFLAGS = -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) - - LFLAGS = -L$(LIBPATH) - -diff -ru flac-1.1.2.OLD/src/libFLAC/lpc.c flac-1.1.2.NEW/src/libFLAC/lpc.c ---- flac-1.1.2.OLD/src/libFLAC/lpc.c 2005-01-26 15:31:36.000000000 +1100 -+++ flac-1.1.2.NEW/src/libFLAC/lpc.c 2005-10-16 10:44:58.000000000 +1000 -@@ -293,6 +293,209 @@ - - void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) - { -+ register const FLAC__int32 *qlp0 = &qlp_coeff[(order-1)]; -+ register FLAC__int32 sum; -+ register const FLAC__int32 *history, *qlp; -+ -+ history = &data[(-order)]; -+ -+ switch (order) { -+ case 12: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ + (qlp0[-8] * history[8]) -+ + (qlp0[-9] * history[9]) -+ + (qlp0[-10] * history[10]) -+ + (qlp0[-11] * history[11]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 11: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ + (qlp0[-8] * history[8]) -+ + (qlp0[-9] * history[9]) -+ + (qlp0[-10] * history[10]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 10: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ + (qlp0[-8] * history[8]) -+ + (qlp0[-9] * history[9]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 9: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ + (qlp0[-8] * history[8]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 8: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 7: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 6: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 5: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 4: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 3: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 2: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 1: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * (*(history++))); -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ default: -+ { -+ /* handle everything else: (order > 12) -+ * with Duff's Device to reduce jumps */ -+ const unsigned n0 = (order + 7)/8; -+ const int tmp = 0 - order - 1; -+ register const FLAC__int32 *qlpd = &qlp_coeff[order]; -+ for( ; data_len != 0; --data_len) { -+ register unsigned n = n0; -+ sum = 0; -+ qlp = qlpd; -+ history = &data[tmp]; -+ -+ switch(order%8) { -+ case 0: do { -+ sum += (*(--qlp)) * (*(++history)); -+ case 7: sum += (*(--qlp)) * (*(++history)); -+ case 6: sum += (*(--qlp)) * (*(++history)); -+ case 5: sum += (*(--qlp)) * (*(++history)); -+ case 4: sum += (*(--qlp)) * (*(++history)); -+ case 3: sum += (*(--qlp)) * (*(++history)); -+ case 2: sum += (*(--qlp)) * (*(++history)); -+ case 1: sum += (*(--qlp)) * (*(++history)); -+ } while (--n); -+ } -+ -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ } -+ } -+} -+ -+#if 0 -+void FLAC__lpc_restore_signal_orig(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) -+{ - #ifdef FLAC__OVERFLOW_DETECT - FLAC__int64 sumo; - #endif -@@ -339,6 +542,7 @@ - } - */ - } -+#endif /* 0 */ - - void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) - { -diff -ru flac-1.1.2.OLD/src/libFLAC/Makefile.lite flac-1.1.2.NEW/src/libFLAC/Makefile.lite ---- flac-1.1.2.OLD/src/libFLAC/Makefile.lite 2005-01-27 11:08:35.000000000 +1100 -+++ flac-1.1.2.NEW/src/libFLAC/Makefile.lite 2005-10-16 10:13:29.000000000 +1000 -@@ -41,7 +41,7 @@ - ifeq ($(SOLARIS_BUILD),yes) - DEFINES = -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA - else --DEFINES = -DFLAC__CPU_IA32 -DFLAC__USE_3DNOW -DFLAC__HAS_NASM -DFLAC__ALIGN_MALLOC_DATA -+DEFINES = -DFLAC__CPU_UNKNOWN -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA -DFLAC__INTEGER_ONLY_LIBRARY - endif - endif - INCLUDES = -I./include -I$(topdir)/include -@@ -50,14 +50,6 @@ - ifeq ($(DARWIN_BUILD),yes) - SRCS_S = \ - ppc/as/lpc_asm.s --else --ifeq ($(SOLARIS_BUILD),yes) --else --SRCS_NASM = \ -- ia32/cpu_asm.nasm \ -- ia32/fixed_asm.nasm \ -- ia32/lpc_asm.nasm --endif - endif - - SRCS_C = \ -@@ -66,7 +58,6 @@ - cpu.c \ - crc.c \ - file_decoder.c \ -- file_encoder.c \ - fixed.c \ - float.c \ - format.c \ -@@ -76,10 +67,7 @@ - metadata_iterators.c \ - metadata_object.c \ - seekable_stream_decoder.c \ -- seekable_stream_encoder.c \ -- stream_decoder.c \ -- stream_encoder.c \ -- stream_encoder_framing.c -+ stream_decoder.c - - include $(topdir)/build/lib.mk - diff --git a/openwrt/package/fping/Config.in b/openwrt/package/fping/Config.in deleted file mode 100644 index c9fbc6adeb4..00000000000 --- a/openwrt/package/fping/Config.in +++ /dev/null @@ -1,16 +0,0 @@ -config BR2_PACKAGE_FPING - prompt "fping............................. A program to ping multiple hosts in parallel" - tristate - default m if CONFIG_DEVEL - help - fping is a ping(1) like program which uses the Internet Control Message Protocol - (ICMP) echo request to determine if a host is up. fping is different from ping in - that you can specify any number of hosts on the command line, or specify a file - containing the lists of hosts to ping. Instead of trying one host until it timeouts - or replies, fping will send out a ping packet and move on to the next host in a - round-robin fashion. If a host replies, it is noted and removed from the list of - hosts to check. If a host does not respond within a certain time limit and/or retry - limit it will be considered unreachable. - - http://www.fping.com/ - diff --git a/openwrt/package/fping/Makefile b/openwrt/package/fping/Makefile deleted file mode 100644 index 998d3485fcf..00000000000 --- a/openwrt/package/fping/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fping -PKG_VERSION:=2.4b2_to-ipv6 -PKG_RELEASE:=1 -PKG_MD5SUM:=3ad516765514249a40d3c5b6caab812a - -PKG_SOURCE_URL:=http://www.fping.com/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,FPING,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -j1 CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) clean $(PKG_NAME) - mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)4 - $(MAKE) -j1 CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -DIPV6=1" -C $(PKG_BUILD_DIR) clean $(PKG_NAME) - mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)6 - touch $@ - -$(IPKG_FPING): - mkdir -p $(IDIR_FPING)/usr/bin - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)4 $(IDIR_FPING)/usr/bin/$(PKG_NAME) - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)6 $(IDIR_FPING)/usr/bin/ - $(STRIP) $(IDIR_FPING)/usr/bin/* - $(IPKG_BUILD) $(IDIR_FPING) $(PACKAGE_DIR) - diff --git a/openwrt/package/fping/ipkg/fping.control b/openwrt/package/fping/ipkg/fping.control deleted file mode 100644 index 964c8dbf292..00000000000 --- a/openwrt/package/fping/ipkg/fping.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: fping -Priority: optional -Section: net -Description: A program to ping hosts in parallel diff --git a/openwrt/package/fping/patches/debian-10.patch b/openwrt/package/fping/patches/debian-10.patch deleted file mode 100644 index fbf7d8ba062..00000000000 --- a/openwrt/package/fping/patches/debian-10.patch +++ /dev/null @@ -1,165 +0,0 @@ ---- fping-2.4b2-to-ipv6.orig/fping.8 -+++ fping-2.4b2-to-ipv6/fping.8 -@@ -1,4 +1,4 @@ --.TH fping l -+.TH fping 8 - .SH NAME - fping \- send ICMP ECHO_REQUEST packets to network hosts - .SH SYNOPSIS -@@ -152,7 +152,7 @@ - example none the less. - .nf - --#!/usr/local/bin/perl -+#!/usr/bin/perl - require 'open2.pl'; - - $MAILTO = "root"; -@@ -178,7 +178,7 @@ - that are currently reachable. - .nf - --#!/usr/local/bin/perl -+#!/usr/bin/perl - - $hosts_to_backup = `cat /etc/hosts.backup | fping -a`; - ---- fping-2.4b2-to-ipv6.orig/fping.c -+++ fping-2.4b2-to-ipv6/fping.c -@@ -42,7 +42,6 @@ - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ --#define IPV6 1 /* This should be a compiler option, or even better be done from the Makefile... ;) */ - - #ifndef _NO_PROTO - #if !__STDC__ && !defined( __cplusplus ) && !defined( FUNCPROTO ) \ -@@ -101,13 +100,8 @@ - #endif - #include - --/* Linux has bizarre ip.h and ip_icmp.h */ --#if defined( __linux__ ) --#include "linux.h" --#else - #include - #include --#endif /* defined(__linux__) */ - - #include - #include -@@ -150,7 +144,11 @@ - #define MIN_PING_DATA sizeof( PING_DATA ) - #define MAX_IP_PACKET 65536 /* (theoretical) max IP packet size */ - #define SIZE_IP_HDR 20 -+#ifndef IPV6 - #define SIZE_ICMP_HDR ICMP_MINLEN /* from ip_icmp.h */ -+#else -+#define SIZE_ICMP_HDR sizeof(FPING_ICMPHDR) -+#endif - #define MAX_PING_DATA ( MAX_IP_PACKET - SIZE_IP_HDR - SIZE_ICMP_HDR ) - - /* sized so as to be like traditional ping */ -@@ -474,6 +472,35 @@ - sizeof(opton))) - err(1, "setsockopt(IPV6_RTHDR)"); - #endif -+#ifndef USE_SIN6_SCOPE_ID -+#ifdef IPV6_RECVPKTINFO -+ if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &opton, -+ sizeof(opton))) -+ err(1, "setsockopt(IPV6_RECVPKTINFO)"); -+#else /* old adv. API */ -+ if (setsockopt(s, IPPROTO_IPV6, IPV6_PKTINFO, &opton, -+ sizeof(opton))) -+ err(1, "setsockopt(IPV6_PKTINFO)"); -+#endif -+#endif /* USE_SIN6_SCOPE_ID */ -+#ifdef IPV6_RECVHOPLIMIT -+ if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &opton, -+ sizeof(opton))) -+ err(1, "setsockopt(IPV6_RECVHOPLIMIT)"); -+#else /* old adv. API */ -+ if (setsockopt(s, IPPROTO_IPV6, IPV6_HOPLIMIT, &opton, -+ sizeof(opton))) -+ err(1, "setsockopt(IPV6_HOPLIMIT)"); -+#endif -+#ifdef IPV6_CHECKSUM -+#ifndef SOL_RAW -+#define SOL_RAW IPPROTO_IPV6 -+#endif -+ opton = 2; -+ if (setsockopt(s, SOL_RAW, IPV6_CHECKSUM, &opton, -+ sizeof(opton))) -+ err(1, "setsockopt(SOL_RAW,IPV6_CHECKSUM)"); -+#endif - #endif - - if( ( uid = getuid() ) ) -@@ -1112,7 +1139,7 @@ - /* but allow time for the last one to come in */ - if( count_flag ) - { -- if( ( cursor->num_sent >= count ) && ( ht > cursor->timeout ) ) -+ if( ( cursor->num_sent >= count ) && ( cursor->num_recv >= count || ht > cursor->timeout ) ) - { - remove_job( cursor ); - continue; -@@ -1382,15 +1409,15 @@ - if( h->num_recv_i <= h->num_sent_i ) - { - fprintf( stderr, " xmt/rcv/%%loss = %d/%d/%d%%", -- h->num_sent_i, h->num_recv_i, -- ( ( h->num_sent_i - h->num_recv_i ) * 100 ) / h->num_sent_i ); -+ h->num_sent_i, h->num_recv_i, h->num_sent_i > 0 ? -+ ( ( h->num_sent_i - h->num_recv_i ) * 100 ) / h->num_sent_i : 0 ); - - }/* IF */ - else - { - fprintf( stderr, " xmt/rcv/%%return = %d/%d/%d%%", -- h->num_sent_i, h->num_recv_i, -- ( ( h->num_recv_i * 100 ) / h->num_sent_i ) ); -+ h->num_sent_i, h->num_recv_i, h->num_sent_i > 0 ? -+ ( ( h->num_recv_i * 100 ) / h->num_sent_i ) : 0 ); - - }/* ELSE */ - -@@ -2165,20 +2192,33 @@ - struct addrinfo *res, hints; - int ret_ga; - char *hostname; -+ size_t len; - - /* getaddrinfo */ - bzero(&hints, sizeof(struct addrinfo)); -- hints.ai_flags = AI_CANONNAME; -+ hints.ai_flags = name_flag ? AI_CANONNAME : 0; - hints.ai_family = AF_INET6; - hints.ai_socktype = SOCK_RAW; - hints.ai_protocol = IPPROTO_ICMPV6; - - ret_ga = getaddrinfo(name, NULL, &hints, &res); -- if (ret_ga) errx(1, "%s", gai_strerror(ret_ga)); -+ if (ret_ga) { -+ if(!quiet_flag) -+ warnx("%s", gai_strerror(ret_ga)); -+ num_noaddress++; -+ return; -+ } - if (res->ai_canonname) hostname = res->ai_canonname; - else hostname = name; -- if (!res->ai_addr) errx(1, "getaddrinfo failed"); -- (void)memcpy(&dst, res->ai_addr, sizeof(FPING_SOCKADDR)); /*res->ai_addrlen);*/ -+ if (!res->ai_addr) { -+ if(!quiet_flag) -+ warnx("getaddrinfo failed"); -+ num_noaddress++; -+ return; -+ } -+ len = res->ai_addrlen; -+ if (len > sizeof(FPING_SOCKADDR)) len = sizeof(FPING_SOCKADDR); -+ (void)memcpy(&dst, res->ai_addr, len); - add_addr(name, name, &dst); - #endif - } /* add_name() */ diff --git a/openwrt/package/fprobe-ulog/Config.in b/openwrt/package/fprobe-ulog/Config.in deleted file mode 100644 index 356b4541df1..00000000000 --- a/openwrt/package/fprobe-ulog/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_FPROBE_ULOG - prompt "fprobe-ulog....................... NetFlow probe (ulog-based)" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPTHREAD - help - A NetFlow probe obtaining packets through linux netfilter code - (iptables ULOG target). - - http://fprobe.sourceforge.net/ - diff --git a/openwrt/package/fprobe-ulog/Makefile b/openwrt/package/fprobe-ulog/Makefile deleted file mode 100644 index 6ea24930908..00000000000 --- a/openwrt/package/fprobe-ulog/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fprobe-ulog -PKG_VERSION:=1.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=cdb2e4edc47e8a3d5479eeabfb979ebc - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/fprobe -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=bzcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,FPROBE_ULOG,fprobe-ulog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR) ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --datadir=/usr/share \ - --infodir=/usr/share/info \ - --mandir=/usr/share/man \ - --localstatedir=/var \ - --sysconfdir=/etc \ - --with-piddir=/var \ - --with-membulk=index8 \ - --with-hash=xor8 \ - $(DISABLE_NLS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_FPROBE_ULOG): - mkdir -p $(IDIR_FPROBE_ULOG)/usr/bin - $(CP) $(PKG_BUILD_DIR)/src/fprobe-ulog $(IDIR_FPROBE_ULOG)/usr/bin/ - $(RSTRIP) $(IDIR_FPROBE_ULOG) - $(IPKG_BUILD) $(IDIR_FPROBE_ULOG) $(PACKAGE_DIR) diff --git a/openwrt/package/fprobe-ulog/ipkg/fprobe-ulog.control b/openwrt/package/fprobe-ulog/ipkg/fprobe-ulog.control deleted file mode 100644 index ac1b35ed8dc..00000000000 --- a/openwrt/package/fprobe-ulog/ipkg/fprobe-ulog.control +++ /dev/null @@ -1,8 +0,0 @@ -Package: fprobe-ulog -Priority: optional -Section: net -Depends: libpthread -Description: NetFlow probe - networking tool obtaining packets through linux netfilter code - (iptables ULOG target) and emit it as NetFlow flows towards the - specified collector diff --git a/openwrt/package/fprobe/Config.in b/openwrt/package/fprobe/Config.in deleted file mode 100644 index 794c7e985a9..00000000000 --- a/openwrt/package/fprobe/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_FPROBE - prompt "fprobe............................ NetFlow probe (libpcap-based)" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPTHREAD - help - A NetFlow probe using libpcap - - http://fprobe.sourceforge.net/ - diff --git a/openwrt/package/fprobe/Makefile b/openwrt/package/fprobe/Makefile deleted file mode 100644 index fed7e3b540b..00000000000 --- a/openwrt/package/fprobe/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME := fprobe -PKG_VERSION := 1.1 -PKG_RELEASE := 1 -PKG_MD5SUM := 65850d0470078269b33eee58cba77ac2 - -PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL := @SF/fprobe -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT := bzcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,FPROBE,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR) ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --datadir=/usr/share \ - --infodir=/usr/share/info \ - --mandir=/usr/share/man \ - --localstatedir=/var \ - --sysconfdir=/etc \ - --with-piddir=/var \ - --with-pcap=$(STAGING_DIR)/usr/include \ - --with-libpcap=$(STAGING_DIR)/usr/lib \ - --with-membulk=index8 \ - --with-hash=xor8 \ - $(DISABLE_NLS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_FPROBE): - mkdir -p $(IDIR_FPROBE)/usr/bin - $(CP) $(PKG_BUILD_DIR)/src/fprobe $(IDIR_FPROBE)/usr/bin/ - $(STRIP) $(IDIR_FPROBE)/usr/bin/* - $(IPKG_BUILD) $(IDIR_FPROBE) $(PACKAGE_DIR) diff --git a/openwrt/package/fprobe/ipkg/fprobe.control b/openwrt/package/fprobe/ipkg/fprobe.control deleted file mode 100644 index 97763667c93..00000000000 --- a/openwrt/package/fprobe/ipkg/fprobe.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: fprobe -Priority: optional -Section: net -Depends: libpcap, libpthread -Description: NetFlow probe - libpcap-based tool that collect network traffic data - and emit it as NetFlow flows towards the specified collector diff --git a/openwrt/package/freeradius/Config.in b/openwrt/package/freeradius/Config.in deleted file mode 100644 index 6756652d0ee..00000000000 --- a/openwrt/package/freeradius/Config.in +++ /dev/null @@ -1,152 +0,0 @@ -menu "freeradius........................ A Flexible RADIUS server implementation" - -config BR2_PACKAGE_FREERADIUS - prompt "freeradius........................ Flexible RADIUS server" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBLTDL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_LIBPTHREAD - help - A flexible RADIUS server - - http://www.freeradius.org/ - - Depends: - - libltdl - - libopenssl - - libpthread - - libmysqlclient (for MySQL support) - - libopenldap (for LDAP support) - - libpq (for PostgreSQL support) - -config BR2_PACKAGE_FREERADIUS_DEMOCERTS - prompt "freeradius-democerts............ Demo certificates to test the server" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_CHAP - prompt "freeradius-mod-chap............. CHAP module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_DETAIL - prompt "freeradius-mod-detail........... Detailed accounting module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_EAP - prompt "freeradius-mod-eap.............. Base EAP module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_EAP_GTC - prompt "freeradius-mod-eap-gtc........ EAP/GTC module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_EAP - -config BR2_PACKAGE_FREERADIUS_MOD_EAP_MD5 - prompt "freeradius-mod-eap-md5........ EAP/MD5 module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_EAP - -config BR2_PACKAGE_FREERADIUS_MOD_EAP_MSCHAPV2 - prompt "freeradius-mod-eap-mschapv2... EAP/MS-CHAPv2 module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_EAP - -config BR2_PACKAGE_FREERADIUS_MOD_EAP_PEAP - prompt "freeradius-mod-eap-peap....... EAP/PEAP module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_EAP - -config BR2_PACKAGE_FREERADIUS_MOD_EAP_TLS - prompt "freeradius-mod-eap-tls........ EAP/TLS module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_EAP - -config BR2_PACKAGE_FREERADIUS_MOD_EAP_TTLS - prompt "freeradius-mod-eap-ttls..... EAP/TTLS module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_EAP_TLS - -config BR2_PACKAGE_FREERADIUS_MOD_FILES - prompt "freeradius-mod-files............ Module using local files for authorization" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_LDAP - prompt "freeradius-mod-ldap............. LDAP module" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENLDAP - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_MSCHAP - prompt "freeradius-mod-mschap........... MS-CHAP and MS-CHAPv2 module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_PAP - prompt "freeradius-mod-pap.............. PAP module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_PREPROCESS - prompt "freeradius-mod-preprocess....... Request pre-processing module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_REALM - prompt "freeradius-mod-realm............ Realms handling module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_SQL - prompt "freeradius-mod-sql.............. Base SQL module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -config BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL - prompt "freeradius-mod-sql-mysql...... MySQL module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_SQL - select BR2_PACKAGE_LIBMYSQLCLIENT - -config BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL - prompt "freeradius-mod-sql-pgsql...... PostgreSQL module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_SQL - select BR2_PACKAGE_LIBPQ - -config BR2_PACKAGE_FREERADIUS_MOD_SQLCOUNTER - prompt "freeradius-mod-sqlcounter..... Generic SQL Counter module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS_MOD_SQL - -config BR2_PACKAGE_FREERADIUS_UTILS - prompt "freeradius-utils................ Misc. client utilities" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_FREERADIUS - -endmenu diff --git a/openwrt/package/freeradius/Makefile b/openwrt/package/freeradius/Makefile deleted file mode 100644 index 0ae21bbb763..00000000000 --- a/openwrt/package/freeradius/Makefile +++ /dev/null @@ -1,227 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=freeradius -PKG_VERSION:=1.0.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=00d06fc31e3b8279f6456d25401c81cb - -PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/radius/ \ - http://freeradius.portal-to-web.de/ \ - ftp://ftp.uk.freeradius.org/pub/radius/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -PKG_CONFIGURE_OPTIONS := \ - --enable-shared \ - --disable-static \ - --disable-ltdl-install \ - --with-ltdl-include="$(STAGING_DIR)/usr/include" \ - --with-ltdl-lib="$(STAGING_DIR)/usr/lib" \ - --with-openssl-includes="$(STAGING_DIR)/usr/include" \ - --with-openssl-libraries="$(STAGING_DIR)/usr/lib" \ - --enable-strict-dependencies \ - --with-raddbdir=/etc/freeradius \ - --without-edir \ - --without-snmp \ - --with-experimental-modules \ - --without-rlm_attr-rewrite \ - --without-rlm_checkval \ - --without-rlm_counter \ - --without-rlm_dbm \ - --with-rlm_eap \ - --without-rlm_eap_sim \ - --without-rlm_example \ - --without-rlm_ippool \ - --without-rlm_krb5 \ - --without-rlm_pam \ - --without-rlm_perl \ - --without-rlm_python \ - --without-rlm_radutmp \ - --without-rlm_smb \ - --with-rlm_sql \ - --with-rlm_sqlcounter \ - --without-rlm_sql_db2 \ - --without-rlm_sql_freetds \ - --without-rlm_sql_iodbc \ - --without-rlm_sql_oracle \ - --without-rlm_sql_sybase \ - --without-rlm_sql_unixodbc \ - --without-rlm_unix \ - --without-rlm_x99-token \ - -ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_LDAP),) -PKG_CONFIGURE_OPTIONS += \ - --with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \ - --with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib" -else -PKG_CONFIGURE_OPTIONS += --without-rlm_ldap -endif -ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL),) -PKG_CONFIGURE_OPTIONS += \ - --with-mysql-include-dir="$(STAGING_DIR)/usr/include/mysql" \ - --with-mysql-lib-dir="$(STAGING_DIR)/usr/lib/mysql" -else -PKG_CONFIGURE_OPTIONS += --without-rlm_sql_mysql -endif -ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL),) -PKG_CONFIGURE_OPTIONS += \ - --with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \ - --with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib" -else -PKG_CONFIGURE_OPTIONS += --without-rlm_sql_postgresql -endif - -include $(TOPDIR)/package/rules.mk - -define PKG_mod_template - -$$(IPKG_$(1)): - [ -z "$(2)" ] || install -d -m0755 $$(IDIR_$(1))/usr/lib/freeradius - for m in $(2); do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius/$$$${m}{,-*}.so \ - $$(IDIR_$(1))/usr/lib/freeradius/ ; \ - done - [ -z "$(3)" ] || install -d -m0755 $$(IDIR_$(1))/etc/freeradius - for f in $(3); do \ - $(CP) $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} \ - $$(IDIR_$(1))/etc/freeradius/ ; \ - done - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,FREERADIUS,freeradius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_DEMOCERTS,freeradius-democerts,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_CHAP,freeradius-mod-chap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_DETAIL,freeradius-mod-detail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_EAP,freeradius-mod-eap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_EAP_GTC,freeradius-mod-eap-gtc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_EAP_MD5,freeradius-mod-eap-md5,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_EAP_MSCHAPV2,freeradius-mod-eap-mschapv2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_EAP_PEAP,freeradius-mod-eap-peap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_EAP_TLS,freeradius-mod-eap-tls,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_EAP_TTLS,freeradius-mod-eap-ttls,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_FILES,freeradius-mod-files,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_LDAP,freeradius-mod-ldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_MSCHAP,freeradius-mod-mschap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_PAP,freeradius-mod-pap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_PREPROCESS,freeradius-mod-preprocess,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_REALM,freeradius-mod-realm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_SQL,freeradius-mod-sql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_SQL_MYSQL,freeradius-mod-sql-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_SQL_PGSQL,freeradius-mod-sql-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_MOD_SQLCOUNTER,freeradius-mod-sqlcounter,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FREERADIUS_UTILS,freeradius-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_mod_template,FREERADIUS_MOD_CHAP,rlm_chap,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_DETAIL,rlm_detail,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP,libeap rlm_eap,eap.conf)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_GTC,rlm_eap_gtc,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_MD5,rlm_eap_md5,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_MSCHAPV2,rlm_eap_mschapv2,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_PEAP,rlm_eap_peap,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_TLS,rlm_eap_tls,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_TTLS,rlm_eap_ttls,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_FILES,rlm_files,acct_users preproxy_users users)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_LDAP,rlm_ldap,ldap.attrmap)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_MSCHAP,rlm_mschap,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_PAP,rlm_pap,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_PREPROCESS,rlm_preprocess,hints huntgroups)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_REALM,rlm_realm,proxy.conf)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL,rlm_sql,sql.conf)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_MYSQL,rlm_sql_mysql,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_PGSQL,rlm_sql_postgresql,)) -$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQLCOUNTER,rlm_sqlcounter,)) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - sys_lib_dlsearch_path_spec="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \ - sys_lib_search_path_spec="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \ - MYSQL_CONFIG="no" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib/freeradius \ - --libexecdir=/usr/lib/freeradius \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - $(PKG_CONFIGURE_OPTIONS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - R="$(PKG_INSTALL_DIR)" \ - INSTALLSTRIP="" \ - all install - touch $@ - -$(IPKG_FREERADIUS): - install -m0755 -d $(IDIR_FREERADIUS)/etc/init.d - install -m0755 ./files/radiusd.init $(IDIR_FREERADIUS)/etc/init.d/radiusd - install -m0755 -d $(IDIR_FREERADIUS)/etc/freeradius - for f in clients.conf dictionary radiusd.conf; do \ - $(CP) $(PKG_INSTALL_DIR)/etc/freeradius/$${f} \ - $(IDIR_FREERADIUS)/etc/freeradius/ ; \ - done - install -m0755 -d $(IDIR_FREERADIUS)/usr/share/freeradius - $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary \ - $(IDIR_FREERADIUS)/usr/share/freeradius/ - for f in cisco freeradius microsoft tunnel wispr; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$${f} \ - $(IDIR_FREERADIUS)/usr/share/freeradius/ ; \ - done - install -m0755 -d $(IDIR_FREERADIUS)/usr/lib/freeradius - $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius/libradius{,-*}.so \ - $(IDIR_FREERADIUS)/usr/lib/freeradius/ - install -m0755 -d $(IDIR_FREERADIUS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/radiusd \ - $(IDIR_FREERADIUS)/usr/sbin/ - $(RSTRIP) $(IDIR_FREERADIUS) - $(IPKG_BUILD) $(IDIR_FREERADIUS) $(PACKAGE_DIR) - -$(IPKG_FREERADIUS_DEMOCERTS): - install -m0755 -d $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius - $(CP) $(PKG_INSTALL_DIR)/etc/freeradius/certs \ - $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/ - rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/README - rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/new* - rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/demoCA/index* - rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/demoCA/serial* - $(RSTRIP) $(IDIR_FREERADIUS_DEMOCERTS) - $(IPKG_BUILD) $(IDIR_FREERADIUS_DEMOCERTS) $(PACKAGE_DIR) - -$(IPKG_FREERADIUS_UTILS): - install -m0755 -d $(IDIR_FREERADIUS_UTILS)/usr/bin - for f in radclient radeapclient; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/$${f} \ - $(IDIR_FREERADIUS_UTILS)/usr/bin/ ; \ - done - $(RSTRIP) $(IDIR_FREERADIUS_UTILS) - $(IPKG_BUILD) $(IDIR_FREERADIUS_UTILS) $(PACKAGE_DIR) - diff --git a/openwrt/package/freeradius/files/radiusd.init b/openwrt/package/freeradius/files/radiusd.init deleted file mode 100644 index 3ec16896acd..00000000000 --- a/openwrt/package/freeradius/files/radiusd.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/radiusd -LOG_D=/var/log/radius -RUN_D=/var/run -PID_F=$RUN_D/radiusd.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $LOG_D ] || mkdir -p $LOG_D - [ -d $RUN_D ] || mkdir -p $RUN_D - radiusd $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/freeradius/ipkg/freeradius-democerts.control b/openwrt/package/freeradius/ipkg/freeradius-democerts.control deleted file mode 100644 index c77c62a7a99..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-democerts.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-democerts -Priority: optional -Section: net -Description: a set of certificates to test FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-chap.control b/openwrt/package/freeradius/ipkg/freeradius-mod-chap.control deleted file mode 100644 index 36f94534577..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-chap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-chap -Priority: optional -Section: net -Description: a CHAP module for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-detail.control b/openwrt/package/freeradius/ipkg/freeradius-mod-detail.control deleted file mode 100644 index 8254c0076a8..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-detail.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-detail -Priority: optional -Section: net -Description: a detailed accounting module for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-gtc.control b/openwrt/package/freeradius/ipkg/freeradius-mod-eap-gtc.control deleted file mode 100644 index 16fd01a4bff..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-gtc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-eap-gtc -Priority: optional -Section: net -Description: an EAP/GTC module for FreeRADIUS -Depends: freeradius, freeradius-mod-eap diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-md5.control b/openwrt/package/freeradius/ipkg/freeradius-mod-eap-md5.control deleted file mode 100644 index 7c060b4655a..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-md5.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-eap-md5 -Priority: optional -Section: net -Description: an EAP/MD5 module for FreeRADIUS -Depends: freeradius, freeradius-mod-eap diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-mschapv2.control b/openwrt/package/freeradius/ipkg/freeradius-mod-eap-mschapv2.control deleted file mode 100644 index b4e23f4836a..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-mschapv2.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-eap-mschapv2 -Priority: optional -Section: net -Description: an EAP/MS-CHAPv2 module for FreeRADIUS -Depends: freeradius, freeradius-mod-eap diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-peap.control b/openwrt/package/freeradius/ipkg/freeradius-mod-eap-peap.control deleted file mode 100644 index cfd8aec7e86..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-peap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-eap-peap -Priority: optional -Section: net -Description: an EAP/PEAP module for FreeRADIUS -Depends: freeradius, freeradius-mod-eap, freeradius-mod-eap-tls diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-tls.control b/openwrt/package/freeradius/ipkg/freeradius-mod-eap-tls.control deleted file mode 100644 index 3f09ceb9072..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-tls.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-eap-tls -Priority: optional -Section: net -Description: an EAP/TLS module for FreeRADIUS -Depends: freeradius, freeradius-mod-eap diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-ttls.control b/openwrt/package/freeradius/ipkg/freeradius-mod-eap-ttls.control deleted file mode 100644 index 84be74c4ed3..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-eap-ttls.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-eap-ttls -Priority: optional -Section: net -Description: an EAP/TTLS module for FreeRADIUS -Depends: freeradius, freeradius-mod-eap, freeradius-mod-eap-tls diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-eap.conffiles b/openwrt/package/freeradius/ipkg/freeradius-mod-eap.conffiles deleted file mode 100644 index 7e0e30e7386..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-eap.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/freeradius/eap.conf diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-eap.control b/openwrt/package/freeradius/ipkg/freeradius-mod-eap.control deleted file mode 100644 index f01a045e7dc..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-eap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-eap -Priority: optional -Section: net -Description: an EAP module for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-files.conffiles b/openwrt/package/freeradius/ipkg/freeradius-mod-files.conffiles deleted file mode 100644 index 4fcd92bffa9..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-files.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/freeradius/acct_users -/etc/freeradius/preproxy_users -/etc/freeradius/users diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-files.control b/openwrt/package/freeradius/ipkg/freeradius-mod-files.control deleted file mode 100644 index 5126aa13c8a..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-files.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-files -Priority: optional -Section: net -Description: a module for FreeRADIUS, using local files for authorization -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-ldap.conffiles b/openwrt/package/freeradius/ipkg/freeradius-mod-ldap.conffiles deleted file mode 100644 index ada9fafc1ba..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-ldap.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/freeradius/ldap.attrmap diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-ldap.control b/openwrt/package/freeradius/ipkg/freeradius-mod-ldap.control deleted file mode 100644 index 7649e6ec96d..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-ldap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-ldap -Priority: optional -Section: net -Description: an LDAP module for FreeRADIUS -Depends: freeradius, libopenldap, libopenssl, libsasl2 diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-mschap.control b/openwrt/package/freeradius/ipkg/freeradius-mod-mschap.control deleted file mode 100644 index 69edfd6f2f1..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-mschap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-mschap -Priority: optional -Section: net -Description: an MS-CHAP and MS-CHAPv2 module for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-pap.control b/openwrt/package/freeradius/ipkg/freeradius-mod-pap.control deleted file mode 100644 index e094b6a7c33..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-pap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-pap -Priority: optional -Section: net -Description: a PAP module for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-preprocess.conffiles b/openwrt/package/freeradius/ipkg/freeradius-mod-preprocess.conffiles deleted file mode 100644 index b29cca816b8..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-preprocess.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/freeradius/hints -/etc/freeradius/huntgroups diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-preprocess.control b/openwrt/package/freeradius/ipkg/freeradius-mod-preprocess.control deleted file mode 100644 index 7adc171a4a5..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-preprocess.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-preprocess -Priority: optional -Section: net -Description: a request preprocessing module for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-realm.conffiles b/openwrt/package/freeradius/ipkg/freeradius-mod-realm.conffiles deleted file mode 100644 index a4d41261223..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-realm.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/freeradius/proxy.conf diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-realm.control b/openwrt/package/freeradius/ipkg/freeradius-mod-realm.control deleted file mode 100644 index 3f84e3621aa..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-realm.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-realm -Priority: optional -Section: net -Description: a realm module for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-sql-mysql.control b/openwrt/package/freeradius/ipkg/freeradius-mod-sql-mysql.control deleted file mode 100644 index 532cbd0e6c1..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-sql-mysql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-sql-mysql -Priority: optional -Section: net -Description: a MySQL module for FreeRADIUS -Depends: freeradius, freeradius-mod-sql, libmysqlclient diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-sql-pgsql.control b/openwrt/package/freeradius/ipkg/freeradius-mod-sql-pgsql.control deleted file mode 100644 index 31e3080453f..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-sql-pgsql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-sql-pgsql -Priority: optional -Section: net -Description: a PostgreSQL module for FreeRADIUS -Depends: freeradius, freeradius-mod-sql, libpq diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-sql.conffiles b/openwrt/package/freeradius/ipkg/freeradius-mod-sql.conffiles deleted file mode 100644 index 8ab119d0750..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-sql.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/freeradius/sql.conf diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-sql.control b/openwrt/package/freeradius/ipkg/freeradius-mod-sql.control deleted file mode 100644 index e4040acb870..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-sql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-sql -Priority: optional -Section: net -Description: an SQL module for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius-mod-sqlcounter.control b/openwrt/package/freeradius/ipkg/freeradius-mod-sqlcounter.control deleted file mode 100644 index 456de034592..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-mod-sqlcounter.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-mod-sqlcounter -Priority: optional -Section: net -Description: a Generic SQL Counter module for FreeRADIUS -Depends: freeradius, freeradius-mod-sql diff --git a/openwrt/package/freeradius/ipkg/freeradius-utils.control b/openwrt/package/freeradius/ipkg/freeradius-utils.control deleted file mode 100644 index b29c94dd3f5..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius-utils -Priority: optional -Section: net -Description: some client utilities for FreeRADIUS -Depends: freeradius diff --git a/openwrt/package/freeradius/ipkg/freeradius.conffiles b/openwrt/package/freeradius/ipkg/freeradius.conffiles deleted file mode 100644 index fac31e76ca4..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/freeradius/clients.conf -/etc/freeradius/radiusd.conf - diff --git a/openwrt/package/freeradius/ipkg/freeradius.control b/openwrt/package/freeradius/ipkg/freeradius.control deleted file mode 100644 index 329d329b144..00000000000 --- a/openwrt/package/freeradius/ipkg/freeradius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: freeradius -Priority: optional -Section: net -Description: a flexible RADIUS server -Depends: libltdl, libopenssl, libpthread diff --git a/openwrt/package/freeradius/patches/01-freeradius-1.0.3-dict.patch b/openwrt/package/freeradius/patches/01-freeradius-1.0.3-dict.patch deleted file mode 100644 index 43ff995ab54..00000000000 --- a/openwrt/package/freeradius/patches/01-freeradius-1.0.3-dict.patch +++ /dev/null @@ -1,100 +0,0 @@ ---- freeradius-1.0.3/share/dictionary.orig 2005-06-07 09:36:04.000000000 +0200 -+++ freeradius-1.0.3/share/dictionary 2005-06-07 09:42:58.000000000 +0200 -@@ -50,56 +50,56 @@ - # directive to the end of the file if you want to see the old names - # in the logfiles, INSTEAD OF the new names. - # --$INCLUDE dictionary.compat # compability issues --$INCLUDE dictionary.3com --$INCLUDE dictionary.3gpp --$INCLUDE dictionary.3gpp2 --$INCLUDE dictionary.acc --$INCLUDE dictionary.alcatel --$INCLUDE dictionary.alteon --$INCLUDE dictionary.ascend --$INCLUDE dictionary.bay --$INCLUDE dictionary.bintec --$INCLUDE dictionary.cabletron -+#$INCLUDE dictionary.compat # compability issues -+#$INCLUDE dictionary.3com -+#$INCLUDE dictionary.3gpp -+#$INCLUDE dictionary.3gpp2 -+#$INCLUDE dictionary.acc -+#$INCLUDE dictionary.alcatel -+#$INCLUDE dictionary.alteon -+#$INCLUDE dictionary.ascend -+#$INCLUDE dictionary.bay -+#$INCLUDE dictionary.bintec -+#$INCLUDE dictionary.cabletron - $INCLUDE dictionary.cisco - # - # This is the same as the altiga dictionary. - # - #$INCLUDE dictionary.cisco.vpn3000 --$INCLUDE dictionary.cisco.vpn5000 --$INCLUDE dictionary.cisco.bbsm --$INCLUDE dictionary.colubris --$INCLUDE dictionary.erx --$INCLUDE dictionary.extreme -+#$INCLUDE dictionary.cisco.vpn5000 -+#$INCLUDE dictionary.cisco.bbsm -+#$INCLUDE dictionary.colubris -+#$INCLUDE dictionary.erx -+#$INCLUDE dictionary.extreme - $INCLUDE dictionary.freeradius --$INCLUDE dictionary.foundry --$INCLUDE dictionary.gandalf --$INCLUDE dictionary.garderos --$INCLUDE dictionary.gemtek --$INCLUDE dictionary.itk --$INCLUDE dictionary.juniper --$INCLUDE dictionary.karlnet --$INCLUDE dictionary.livingston --$INCLUDE dictionary.localweb -+#$INCLUDE dictionary.foundry -+#$INCLUDE dictionary.gandalf -+#$INCLUDE dictionary.garderos -+#$INCLUDE dictionary.gemtek -+#$INCLUDE dictionary.itk -+#$INCLUDE dictionary.juniper -+#$INCLUDE dictionary.karlnet -+#$INCLUDE dictionary.livingston -+#$INCLUDE dictionary.localweb - $INCLUDE dictionary.microsoft --$INCLUDE dictionary.navini --$INCLUDE dictionary.nomadix --$INCLUDE dictionary.propel --$INCLUDE dictionary.quintum --$INCLUDE dictionary.redback --$INCLUDE dictionary.redcreek --$INCLUDE dictionary.shasta --$INCLUDE dictionary.shiva --$INCLUDE dictionary.sonicwall --$INCLUDE dictionary.springtide --$INCLUDE dictionary.telebit --$INCLUDE dictionary.trapeze -+#$INCLUDE dictionary.navini -+#$INCLUDE dictionary.nomadix -+#$INCLUDE dictionary.propel -+#$INCLUDE dictionary.quintum -+#$INCLUDE dictionary.redback -+#$INCLUDE dictionary.redcreek -+#$INCLUDE dictionary.shasta -+#$INCLUDE dictionary.shiva -+#$INCLUDE dictionary.sonicwall -+#$INCLUDE dictionary.springtide -+#$INCLUDE dictionary.telebit -+#$INCLUDE dictionary.trapeze - $INCLUDE dictionary.tunnel --$INCLUDE dictionary.usr --$INCLUDE dictionary.valemount --$INCLUDE dictionary.versanet -+#$INCLUDE dictionary.usr -+#$INCLUDE dictionary.valemount -+#$INCLUDE dictionary.versanet - $INCLUDE dictionary.wispr --$INCLUDE dictionary.xedia -+#$INCLUDE dictionary.xedia - - # - # The following are the proper new names. Use these. diff --git a/openwrt/package/freeradius/patches/02-freeradius-1.0.4-config.patch b/openwrt/package/freeradius/patches/02-freeradius-1.0.4-config.patch deleted file mode 100644 index a1c9c519817..00000000000 --- a/openwrt/package/freeradius/patches/02-freeradius-1.0.4-config.patch +++ /dev/null @@ -1,311 +0,0 @@ -diff -ruN freeradius-1.0.4-old/raddb/eap.conf freeradius-1.0.4-new/raddb/eap.conf ---- freeradius-1.0.4-old/raddb/eap.conf 2004-04-15 20:34:41.000000000 +0200 -+++ freeradius-1.0.4-new/raddb/eap.conf 2005-06-18 18:53:06.000000000 +0200 -@@ -72,8 +72,8 @@ - # User-Password, or the NT-Password attributes. - # 'System' authentication is impossible with LEAP. - # -- leap { -- } -+# leap { -+# } - - # Generic Token Card. - # -@@ -86,7 +86,7 @@ - # the users password will go over the wire in plain-text, - # for anyone to see. - # -- gtc { -+# gtc { - # The default challenge, which many clients - # ignore.. - #challenge = "Password: " -@@ -103,8 +103,8 @@ - # configured for the request, and do the - # authentication itself. - # -- auth_type = PAP -- } -+# auth_type = PAP -+# } - - ## EAP-TLS - # -@@ -272,7 +272,7 @@ - # of MS-CHAPv2 in EAP by Cisco, which FreeRADIUS does not - # currently support. - # -- mschapv2 { -- } -+# mschapv2 { -+# } - } - -diff -ruN freeradius-1.0.4-old/raddb/radiusd.conf.in freeradius-1.0.4-new/raddb/radiusd.conf.in ---- freeradius-1.0.4-old/raddb/radiusd.conf.in 2005-06-12 00:20:40.000000000 +0200 -+++ freeradius-1.0.4-new/raddb/radiusd.conf.in 2005-06-18 18:53:32.000000000 +0200 -@@ -31,13 +31,13 @@ - - # Location of config and logfiles. - confdir = ${raddbdir} --run_dir = ${localstatedir}/run/radiusd -+run_dir = ${localstatedir}/run - - # - # The logging messages for the server are appended to the - # tail of this file. - # --log_file = ${logdir}/radius.log -+log_file = ${localstatedir}/log/radiusd.log - - # - # libdir: Where to find the rlm_* modules. -@@ -353,7 +353,7 @@ - nospace_pass = no - - # The program to execute to do concurrency checks. --checkrad = ${sbindir}/checkrad -+#checkrad = ${sbindir}/checkrad - - # SECURITY CONFIGURATION - # -@@ -425,8 +425,8 @@ - # - # allowed values: {no, yes} - # --proxy_requests = yes --$INCLUDE ${confdir}/proxy.conf -+proxy_requests = no -+#$INCLUDE ${confdir}/proxy.conf - - - # CLIENTS CONFIGURATION -@@ -454,7 +454,7 @@ - # 'snmp' attribute to 'yes' - # - snmp = no --$INCLUDE ${confdir}/snmp.conf -+#$INCLUDE ${confdir}/snmp.conf - - - # THREAD POOL CONFIGURATION -@@ -657,7 +657,7 @@ - # For all EAP related authentications. - # Now in another file, because it is very large. - # --$INCLUDE ${confdir}/eap.conf -+# $INCLUDE ${confdir}/eap.conf - - # Microsoft CHAP authentication - # -@@ -1034,8 +1034,8 @@ - # - files { - usersfile = ${confdir}/users -- acctusersfile = ${confdir}/acct_users -- preproxy_usersfile = ${confdir}/preproxy_users -+# acctusersfile = ${confdir}/acct_users -+# preproxy_usersfile = ${confdir}/preproxy_users - - # If you want to use the old Cistron 'users' file - # with FreeRADIUS, you should change the next line -@@ -1168,7 +1168,7 @@ - # For MS-SQL, use: ${confdir}/mssql.conf - # For Oracle, use: ${confdir}/oraclesql.conf - # -- $INCLUDE ${confdir}/sql.conf -+# $INCLUDE ${confdir}/sql.conf - - - # For Cisco VoIP specific accounting with Postgresql, -@@ -1536,7 +1536,7 @@ - # The entire command line (and output) must fit into 253 bytes. - # - # e.g. Framed-Pool = `%{exec:/bin/echo foo}` -- exec -+# exec - - # - # The expression module doesn't do authorization, -@@ -1549,7 +1549,7 @@ - # listed in any other section. See 'doc/rlm_expr' for - # more information. - # -- expr -+# expr - - # - # We add the counter module here so that it registers -@@ -1576,7 +1576,7 @@ - # 'raddb/huntgroups' files. - # - # It also adds the %{Client-IP-Address} attribute to the request. -- preprocess -+# preprocess - - # - # If you want to have a log of authentication requests, -@@ -1589,7 +1589,7 @@ - # - # The chap module will set 'Auth-Type := CHAP' if we are - # handling a CHAP request and Auth-Type has not already been set -- chap -+# chap - - # - # If the users are logging in with an MS-CHAP-Challenge -@@ -1597,7 +1597,7 @@ - # the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP' - # to the request, which will cause the server to then use - # the mschap module for authentication. -- mschap -+# mschap - - # - # If you have a Cisco SIP server authenticating against -@@ -1617,7 +1617,7 @@ - # Otherwise, when the first style of realm doesn't match, - # the other styles won't be checked. - # -- suffix -+# suffix - # ntdomain - - # -@@ -1626,11 +1626,11 @@ - # - # It also sets the EAP-Type attribute in the request - # attribute list to the EAP type from the packet. -- eap -+# eap - - # - # Read the 'users' file -- files -+# files - - # - # Look in an SQL database. The schema of the database -@@ -1684,24 +1684,24 @@ - # PAP authentication, when a back-end database listed - # in the 'authorize' section supplies a password. The - # password can be clear-text, or encrypted. -- Auth-Type PAP { -- pap -- } -+# Auth-Type PAP { -+# pap -+# } - - # - # Most people want CHAP authentication - # A back-end database listed in the 'authorize' section - # MUST supply a CLEAR TEXT password. Encrypted passwords - # won't work. -- Auth-Type CHAP { -- chap -- } -+# Auth-Type CHAP { -+# chap -+# } - - # - # MSCHAP authentication. -- Auth-Type MS-CHAP { -- mschap -- } -+# Auth-Type MS-CHAP { -+# mschap -+# } - - # - # If you have a Cisco SIP server authenticating against -@@ -1719,7 +1719,7 @@ - # containing CHAP-Password attributes CANNOT be authenticated - # against /etc/passwd! See the FAQ for details. - # -- unix -+# unix - - # Uncomment it if you want to use ldap for authentication - # -@@ -1732,7 +1732,7 @@ - - # - # Allow EAP authentication. -- eap -+# eap - } - - -@@ -1740,12 +1740,12 @@ - # Pre-accounting. Decide which accounting type to use. - # - preacct { -- preprocess -+# preprocess - - # - # Ensure that we have a semi-unique identifier for every - # request, and many NAS boxes are broken. -- acct_unique -+# acct_unique - - # - # Look for IPASS-style 'realm/', and if not found, look for -@@ -1755,12 +1755,12 @@ - # Accounting requests are generally proxied to the same - # home server as authentication requests. - # IPASS -- suffix -+# suffix - # ntdomain - - # - # Read the 'acct_users' file -- files -+# files - } - - # -@@ -1771,20 +1771,20 @@ - # Create a 'detail'ed log of the packets. - # Note that accounting requests which are proxied - # are also logged in the detail file. -- detail -+# detail - # daily - - # Update the wtmp file - # - # If you don't use "radlast", you can delete this line. -- unix -+# unix - - # - # For Simultaneous-Use tracking. - # - # Due to packet losses in the network, the data here - # may be incorrect. There is little we can do about it. -- radutmp -+# radutmp - # sradutmp - - # Return an address to the IP Pool when we see a stop record. -@@ -1807,7 +1807,7 @@ - # or rlm_sql module can handle this. - # The rlm_sql module is *much* faster - session { -- radutmp -+# radutmp - - # - # See "Simultaneous Use Checking Querie" in sql.conf -@@ -1904,5 +1904,5 @@ - # hidden inside of the EAP packet, and the end server will - # reject the EAP request. - # -- eap -+# eap - } diff --git a/openwrt/package/freeradius/patches/03-freeradius-1.0.5-modules_ldflags.patch b/openwrt/package/freeradius/patches/03-freeradius-1.0.5-modules_ldflags.patch deleted file mode 100644 index 4d269682b3a..00000000000 --- a/openwrt/package/freeradius/patches/03-freeradius-1.0.5-modules_ldflags.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -ruN freeradius-1.0.5-old/src/modules/rlm_sql/drivers/rules.mak freeradius-1.0.5-new/src/modules/rlm_sql/drivers/rules.mak ---- freeradius-1.0.5-old/src/modules/rlm_sql/drivers/rules.mak 2003-06-05 22:16:54.000000000 +0200 -+++ freeradius-1.0.5-new/src/modules/rlm_sql/drivers/rules.mak 2005-10-03 05:33:39.000000000 +0200 -@@ -67,7 +67,7 @@ - # - ####################################################################### - $(TARGET).a: $(STATIC_OBJS) -- $(LIBTOOL) --mode=link $(LD) -module -static $(CFLAGS) $(RLM_SQL_CFLAGS) $^ -o $@ -+ $(LIBTOOL) --mode=link $(LD) -module -static $(CFLAGS) $(RLM_SQL_CFLAGS) $(LDFLAGS) $^ -o $@ - - # - # If the module is in the list of static modules, then the "dynamic" -@@ -93,7 +93,7 @@ - $(TARGET).la: $(DYNAMIC_OBJS) - $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \ - -module $(LINK_MODE) $(CFLAGS) \ -- $(RLM_SQL_CFLAGS) -o $@ -rpath $(libdir) $^ $(RLM_SQL_LIBS) -+ $(RLM_SQL_CFLAGS) $(LDFLAGS) -o $@ -rpath $(libdir) $^ $(RLM_SQL_LIBS) - - ####################################################################### - # -diff -ruN freeradius-1.0.5-old/src/modules/rules.mak freeradius-1.0.5-new/src/modules/rules.mak ---- freeradius-1.0.5-old/src/modules/rules.mak 2005-07-31 14:48:01.000000000 +0200 -+++ freeradius-1.0.5-new/src/modules/rules.mak 2005-10-03 05:35:05.000000000 +0200 -@@ -71,7 +71,7 @@ - ####################################################################### - $(TARGET).a: $(STATIC_OBJS) - $(LIBTOOL) --mode=link $(LD) \ -- -module -static $(CFLAGS) $(RLM_CFLAGS) $^ -o $@ -+ -module -static $(CFLAGS) $(RLM_CFLAGS) $(LDFLAGS) $(RLM_LDFLAGS) $^ -o $@ - - # - # If the module is in the list of static modules, then the "dynamic" -@@ -96,7 +96,7 @@ - - $(TARGET).la: $(DYNAMIC_OBJS) - $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \ -- -module $(LINK_MODE) $(LDFLAGS) $(RLM_LDFLAGS) \ -+ -module $(LINK_MODE) $(CFLAGS) $(RLM_CFLAGS) $(LDFLAGS) $(RLM_LDFLAGS) \ - -o $@ -rpath $(libdir) $^ $(RLM_LIBS) $(LIBS) - - ####################################################################### diff --git a/openwrt/package/freeradius/patches/04-freeradius-1.0.5-autoconf.patch b/openwrt/package/freeradius/patches/04-freeradius-1.0.5-autoconf.patch deleted file mode 100644 index 2ed42b44a94..00000000000 --- a/openwrt/package/freeradius/patches/04-freeradius-1.0.5-autoconf.patch +++ /dev/null @@ -1,1845 +0,0 @@ -diff -ruN freeradius-1.0.5-old/aclocal.m4 freeradius-1.0.5-new/aclocal.m4 ---- freeradius-1.0.5-old/aclocal.m4 2005-08-19 19:29:04.000000000 +0200 -+++ freeradius-1.0.5-new/aclocal.m4 2005-10-03 05:19:15.000000000 +0200 -@@ -1931,7 +1931,23 @@ - version_type=none - dynamic_linker="$host_os ld.so" - sys_lib_dlsearch_path_spec="/lib /usr/lib" --sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+if test "$cross_compiling" = yes; then -+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries: *=*//"` -+ if echo "$sys_lib_search_path_spec" | egrep ';' >/dev/null ; then -+ # if the path contains ";" then we assume it to be the separator -+ # otherwise default to the standard path separator (i.e. ":") - it is -+ # assumed that no part of a normal pathname contains ";" but that should -+ # okay in the real world where ";" in dirpaths is itself problematic. -+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+else -+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+fi -+if test "x$lt_sys_lib_search_path_spec" != "x"; then -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_sys_lib_search_path_spec" -+fi - - case $host_os in - aix3*) -@@ -3374,7 +3390,7 @@ - lt_cv_deplibs_check_method=pass_all ;; - *) - # glibc up to 2.1.1 does not perform some relocations on ARM -- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB.*(shared object|dynamic lib )' ;; - esac - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; -diff -ruN freeradius-1.0.5-old/configure freeradius-1.0.5-new/configure ---- freeradius-1.0.5-old/configure 2005-08-19 21:00:02.000000000 +0200 -+++ freeradius-1.0.5-new/configure 2005-10-03 05:20:47.000000000 +0200 -@@ -1988,7 +1988,7 @@ - lt_cv_deplibs_check_method=pass_all ;; - *) - # glibc up to 2.1.1 does not perform some relocations on ARM -- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB.*(shared object|dynamic lib )' ;; - esac - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; -@@ -4024,7 +4024,23 @@ - version_type=none - dynamic_linker="$host_os ld.so" - sys_lib_dlsearch_path_spec="/lib /usr/lib" --sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+if test "$cross_compiling" = yes; then -+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries: *=*//"` -+ if echo "$sys_lib_search_path_spec" | egrep ';' >/dev/null ; then -+ # if the path contains ";" then we assume it to be the separator -+ # otherwise default to the standard path separator (i.e. ":") - it is -+ # assumed that no part of a normal pathname contains ";" but that should -+ # okay in the real world where ";" in dirpaths is itself problematic. -+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+else -+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+fi -+if test "x$lt_sys_lib_search_path_spec" != "x"; then -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_sys_lib_search_path_spec" -+fi - - case $host_os in - aix3*) -@@ -4412,7 +4428,7 @@ - ## - # Report the final consequences. - echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 --echo "configure:4416: checking if libtool supports shared libraries" >&5 -+echo "configure:4432: checking if libtool supports shared libraries" >&5 - echo "$ac_t""$can_build_shared" 1>&6 - ## - ## END FIXME -@@ -4420,7 +4436,7 @@ - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 --echo "configure:4424: checking whether to build shared libraries" >&5 -+echo "configure:4440: checking whether to build shared libraries" >&5 - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and -@@ -4447,7 +4463,7 @@ - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 --echo "configure:4451: checking whether to build static libraries" >&5 -+echo "configure:4467: checking whether to build static libraries" >&5 - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - echo "$ac_t""$enable_static" 1>&6 -@@ -4490,12 +4506,12 @@ - - *) - echo $ac_n "checking for shl_load""... $ac_c" 1>&6 --echo "configure:4494: checking for shl_load" >&5 -+echo "configure:4510: checking for shl_load" >&5 - if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shl_load=yes" - else -@@ -4536,7 +4552,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 --echo "configure:4540: checking for shl_load in -ldld" >&5 -+echo "configure:4556: checking for shl_load in -ldld" >&5 - ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4544,7 +4560,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4574,12 +4590,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen""... $ac_c" 1>&6 --echo "configure:4578: checking for dlopen" >&5 -+echo "configure:4594: checking for dlopen" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" - else -@@ -4620,7 +4636,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 --echo "configure:4624: checking for dlopen in -ldl" >&5 -+echo "configure:4640: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4628,7 +4644,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4658,7 +4674,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 --echo "configure:4662: checking for dlopen in -lsvld" >&5 -+echo "configure:4678: checking for dlopen in -lsvld" >&5 - ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4666,7 +4682,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsvld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4696,7 +4712,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 --echo "configure:4700: checking for dld_link in -ldld" >&5 -+echo "configure:4716: checking for dld_link in -ldld" >&5 - ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4704,7 +4720,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4771,7 +4787,7 @@ - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 --echo "configure:4775: checking whether a program can dlopen itself" >&5 -+echo "configure:4791: checking whether a program can dlopen itself" >&5 - if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -4781,7 +4797,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ if { (eval echo configure:4862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in -@@ -4865,7 +4881,7 @@ - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 --echo "configure:4869: checking whether a statically linked program can dlopen itself" >&5 -+echo "configure:4885: checking whether a statically linked program can dlopen itself" >&5 - if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -4875,7 +4891,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in -@@ -4987,14 +5003,14 @@ - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 --echo "configure:4991: checking whether -lc should be explicitly linked in" >&5 -+echo "configure:5007: checking whether -lc should be explicitly linked in" >&5 - if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - $rm conftest* - echo 'static int dummy;' > conftest.$ac_ext - -- if { (eval echo configure:4998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ if { (eval echo configure:5014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext -@@ -5007,7 +5023,7 @@ - libname=conftest - save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= -- if { (eval echo configure:5011: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } -+ if { (eval echo configure:5027: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } - then - lt_cv_archive_cmds_need_lc=no - else -@@ -5590,7 +5606,7 @@ - # Extract the first word of "libtool", so it can be a program name with args. - set dummy libtool; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:5594: checking for $ac_word" >&5 -+echo "configure:5610: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_LIBTOOL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -5650,7 +5666,7 @@ - - logdir='${localstatedir}/log/radius' - echo $ac_n "checking logdir""... $ac_c" 1>&6 --echo "configure:5654: checking logdir" >&5 -+echo "configure:5670: checking logdir" >&5 - # Check whether --with-logdir or --without-logdir was given. - if test "${with_logdir+set}" = set; then - withval="$with_logdir" -@@ -5672,7 +5688,7 @@ - - radacctdir='${logdir}/radacct' - echo $ac_n "checking radacctdir""... $ac_c" 1>&6 --echo "configure:5676: checking radacctdir" >&5 -+echo "configure:5692: checking radacctdir" >&5 - # Check whether --with-radacctdir or --without-radacctdir was given. - if test "${with_radacctdir+set}" = set; then - withval="$with_radacctdir" -@@ -5694,7 +5710,7 @@ - - raddbdir='${sysconfdir}/raddb' - echo $ac_n "checking raddbdir""... $ac_c" 1>&6 --echo "configure:5698: checking raddbdir" >&5 -+echo "configure:5714: checking raddbdir" >&5 - # Check whether --with-raddbdir or --without-raddbdir was given. - if test "${with_raddbdir+set}" = set; then - withval="$with_raddbdir" -@@ -5906,7 +5922,7 @@ - # Extract the first word of "perl", so it can be a program name with args. - set dummy perl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:5910: checking for $ac_word" >&5 -+echo "configure:5926: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -5945,7 +5961,7 @@ - # Extract the first word of "snmpget", so it can be a program name with args. - set dummy snmpget; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:5949: checking for $ac_word" >&5 -+echo "configure:5965: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_SNMPGET'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -5984,7 +6000,7 @@ - # Extract the first word of "snmpwalk", so it can be a program name with args. - set dummy snmpwalk; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:5988: checking for $ac_word" >&5 -+echo "configure:6004: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_SNMPWALK'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -6023,7 +6039,7 @@ - # Extract the first word of "rusers", so it can be a program name with args. - set dummy rusers; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:6027: checking for $ac_word" >&5 -+echo "configure:6043: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_RUSERS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -6059,7 +6075,7 @@ - - missing_dir=`cd $ac_aux_dir && pwd` - echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 --echo "configure:6063: checking for working aclocal" >&5 -+echo "configure:6079: checking for working aclocal" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. -@@ -6072,7 +6088,7 @@ - fi - - echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 --echo "configure:6076: checking for working autoconf" >&5 -+echo "configure:6092: checking for working autoconf" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. -@@ -6085,7 +6101,7 @@ - fi - - echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 --echo "configure:6089: checking for working autoheader" >&5 -+echo "configure:6105: checking for working autoheader" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. -@@ -6101,7 +6117,7 @@ - # Extract the first word of "locate", so it can be a program name with args. - set dummy locate; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:6105: checking for $ac_word" >&5 -+echo "configure:6121: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_LOCATE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -6136,7 +6152,7 @@ - # Extract the first word of "dirname", so it can be a program name with args. - set dummy dirname; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:6140: checking for $ac_word" >&5 -+echo "configure:6156: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_DIRNAME'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -6171,7 +6187,7 @@ - # Extract the first word of "grep", so it can be a program name with args. - set dummy grep; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:6175: checking for $ac_word" >&5 -+echo "configure:6191: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_GREP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -6215,17 +6231,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:6219: checking for $ac_hdr" >&5 -+echo "configure:6235: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:6229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:6245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -6254,7 +6270,7 @@ - - - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 --echo "configure:6258: checking for pthread_create in -lpthread" >&5 -+echo "configure:6274: checking for pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -6262,7 +6278,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -6293,7 +6309,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 --echo "configure:6297: checking for pthread_create in -lc_r" >&5 -+echo "configure:6313: checking for pthread_create in -lc_r" >&5 - ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -6301,7 +6317,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lc_r $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -6347,14 +6363,14 @@ - - - echo $ac_n "checking for library containing sem_init""... $ac_c" 1>&6 --echo "configure:6351: checking for library containing sem_init" >&5 -+echo "configure:6367: checking for library containing sem_init" >&5 - if eval "test \"`echo '$''{'ac_cv_search_sem_init'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_func_search_save_LIBS="$LIBS" - ac_cv_search_sem_init="no" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_sem_init="none required" - else -@@ -6376,7 +6392,7 @@ - test "$ac_cv_search_sem_init" = "no" && for i in pthread sem posix4 rt; do - LIBS="-l$i $ac_func_search_save_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_sem_init="-l$i" - break -@@ -6411,7 +6427,7 @@ - fi - - echo $ac_n "checking for getsockname in -lsocket""... $ac_c" 1>&6 --echo "configure:6415: checking for getsockname in -lsocket" >&5 -+echo "configure:6431: checking for getsockname in -lsocket" >&5 - ac_lib_var=`echo socket'_'getsockname | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -6419,7 +6435,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -6459,7 +6475,7 @@ - - - echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 --echo "configure:6463: checking for inet_aton in -lresolv" >&5 -+echo "configure:6479: checking for inet_aton in -lresolv" >&5 - ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -6467,7 +6483,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lresolv $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -6507,7 +6523,7 @@ - - - echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 --echo "configure:6511: checking for inet_ntoa in -lnsl" >&5 -+echo "configure:6527: checking for inet_ntoa in -lnsl" >&5 - ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -6515,7 +6531,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -6569,12 +6585,12 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 --echo "configure:6573: checking for $ac_hdr that defines DIR" >&5 -+echo "configure:6589: checking for $ac_hdr that defines DIR" >&5 - if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include <$ac_hdr> -@@ -6582,7 +6598,7 @@ - DIR *dirp = 0; - ; return 0; } - EOF --if { (eval echo configure:6586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:6602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" - else -@@ -6607,7 +6623,7 @@ - # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. - if test $ac_header_dirent = dirent.h; then - echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 --echo "configure:6611: checking for opendir in -ldir" >&5 -+echo "configure:6627: checking for opendir in -ldir" >&5 - ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -6615,7 +6631,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldir $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -6648,7 +6664,7 @@ - - else - echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 --echo "configure:6652: checking for opendir in -lx" >&5 -+echo "configure:6668: checking for opendir in -lx" >&5 - ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -6656,7 +6672,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lx $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -6690,12 +6706,12 @@ - fi - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 --echo "configure:6694: checking for ANSI C header files" >&5 -+echo "configure:6710: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -6703,7 +6719,7 @@ - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:6707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:6723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -6720,7 +6736,7 @@ - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -6738,7 +6754,7 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -6759,7 +6775,7 @@ - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -@@ -6770,7 +6786,7 @@ - exit (0); } - - EOF --if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else -@@ -6794,12 +6810,12 @@ - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 --echo "configure:6798: checking whether time.h and sys/time.h may both be included" >&5 -+echo "configure:6814: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -6808,7 +6824,7 @@ - struct tm *tp; - ; return 0; } - EOF --if { (eval echo configure:6812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:6828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else -@@ -6829,12 +6845,12 @@ - fi - - echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 --echo "configure:6833: checking for sys/wait.h that is POSIX.1 compatible" >&5 -+echo "configure:6849: checking for sys/wait.h that is POSIX.1 compatible" >&5 - if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -6850,7 +6866,7 @@ - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; return 0; } - EOF --if { (eval echo configure:6854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:6870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_sys_wait_h=yes - else -@@ -6904,17 +6920,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:6908: checking for $ac_hdr" >&5 -+echo "configure:6924: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:6918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:6934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -6944,17 +6960,17 @@ - REGEX=no - ac_safe=`echo "regex.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for regex.h""... $ac_c" 1>&6 --echo "configure:6948: checking for regex.h" >&5 -+echo "configure:6964: checking for regex.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:6958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:6974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -6982,7 +6998,7 @@ - REGEX_EXTENDED=no - REGEX=yes - cat > conftest.$ac_ext < - #ifdef REG_EXTENDED -@@ -7026,7 +7042,7 @@ - - ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'` - echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6 --echo "configure:7030: checking for openssl/ssl.h" >&5 -+echo "configure:7046: checking for openssl/ssl.h" >&5 - - old_CFLAGS="$CFLAGS" - smart_include= -@@ -7036,7 +7052,7 @@ - for try in $smart_try_dir; do - CFLAGS="$old_CFLAGS -I$try" - cat > conftest.$ac_ext < -@@ -7044,7 +7060,7 @@ - int a = 1; - ; return 0; } - EOF --if { (eval echo configure:7048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - smart_include="-I$try" - else -@@ -7063,7 +7079,7 @@ - - if test "x$smart_include" = "x"; then - cat > conftest.$ac_ext < -@@ -7071,7 +7087,7 @@ - int a = 1; - ; return 0; } - EOF --if { (eval echo configure:7075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - smart_include=" " - else -@@ -7115,7 +7131,7 @@ - for try in $smart_include_dir /usr/local/include /opt/include; do - CFLAGS="$old_CFLAGS -I$try" - cat > conftest.$ac_ext < -@@ -7123,7 +7139,7 @@ - int a = 1; - ; return 0; } - EOF --if { (eval echo configure:7127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - smart_include="-I$try" - else -@@ -7167,17 +7183,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:7171: checking for $ac_hdr" >&5 -+echo "configure:7187: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:7181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -7206,13 +7222,13 @@ - CPPFLAGS="$old_CPPFLAGS" - - echo $ac_n "checking for OpenSSL version >= 0.9.7""... $ac_c" 1>&6 --echo "configure:7210: checking for OpenSSL version >= 0.9.7" >&5 -+echo "configure:7226: checking for OpenSSL version >= 0.9.7" >&5 - old_CPPFLAGS=$CPPFLAGS - if test "x$OPENSSL_INCLUDE" != "x"; then - CPPFLAGS="-I$OPENSSL_INCLUDE" - fi - cat > conftest.$ac_ext < - #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) -@@ -7241,7 +7257,7 @@ - sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'` - sm_func_safe=`echo "DH_new" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for DH_new in -lcrypto""... $ac_c" 1>&6 --echo "configure:7245: checking for DH_new in -lcrypto" >&5 -+echo "configure:7261: checking for DH_new in -lcrypto" >&5 - - old_LIBS="$LIBS" - smart_lib= -@@ -7251,14 +7267,14 @@ - for try in $smart_try_dir; do - LIBS="-L$try -lcrypto $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-L$try -lcrypto" - else -@@ -7276,14 +7292,14 @@ - if test "x$smart_lib" = "x"; then - LIBS="-lcrypto $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-lcrypto" - else -@@ -7353,14 +7369,14 @@ - for try in $smart_lib_dir /usr/local/lib /opt/lib; do - LIBS="-L$try -lcrypto $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-L$try -lcrypto" - else -@@ -7390,7 +7406,7 @@ - sm_lib_safe=`echo "ssl" | sed 'y%./+-%__p_%'` - sm_func_safe=`echo "SSL_new" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6 --echo "configure:7394: checking for SSL_new in -lssl" >&5 -+echo "configure:7410: checking for SSL_new in -lssl" >&5 - - old_LIBS="$LIBS" - smart_lib= -@@ -7400,14 +7416,14 @@ - for try in $smart_try_dir; do - LIBS="-L$try -lssl $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-L$try -lssl" - else -@@ -7425,14 +7441,14 @@ - if test "x$smart_lib" = "x"; then - LIBS="-lssl $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-lssl" - else -@@ -7502,14 +7518,14 @@ - for try in $smart_lib_dir /usr/local/lib /opt/lib; do - LIBS="-L$try -lssl $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-L$try -lssl" - else -@@ -7545,12 +7561,12 @@ - - - echo $ac_n "checking for off_t""... $ac_c" 1>&6 --echo "configure:7549: checking for off_t" >&5 -+echo "configure:7565: checking for off_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -7578,12 +7594,12 @@ - fi - - echo $ac_n "checking for pid_t""... $ac_c" 1>&6 --echo "configure:7582: checking for pid_t" >&5 -+echo "configure:7598: checking for pid_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -7611,12 +7627,12 @@ - fi - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 --echo "configure:7615: checking for size_t" >&5 -+echo "configure:7631: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -7644,12 +7660,12 @@ - fi - - echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 --echo "configure:7648: checking for uid_t in sys/types.h" >&5 -+echo "configure:7664: checking for uid_t in sys/types.h" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF -@@ -7680,13 +7696,13 @@ - - - echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 --echo "configure:7684: checking for socklen_t" >&5 -+echo "configure:7700: checking for socklen_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_type_socklen_t=no - cat > conftest.$ac_ext < -@@ -7699,7 +7715,7 @@ - socklen_t foo - ; return 0; } - EOF --if { (eval echo configure:7703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_socklen_t=yes - else -@@ -7723,13 +7739,13 @@ - - - echo $ac_n "checking for uint8_t""... $ac_c" 1>&6 --echo "configure:7727: checking for uint8_t" >&5 -+echo "configure:7743: checking for uint8_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_type_uint8_t=no - cat > conftest.$ac_ext < -@@ -7742,7 +7758,7 @@ - uint8_t foo - ; return 0; } - EOF --if { (eval echo configure:7746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_uint8_t=yes - else -@@ -7766,13 +7782,13 @@ - - - echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 --echo "configure:7770: checking for uint16_t" >&5 -+echo "configure:7786: checking for uint16_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_type_uint16_t=no - cat > conftest.$ac_ext < -@@ -7785,7 +7801,7 @@ - uint16_t foo - ; return 0; } - EOF --if { (eval echo configure:7789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_uint16_t=yes - else -@@ -7809,13 +7825,13 @@ - - - echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 --echo "configure:7813: checking for uint32_t" >&5 -+echo "configure:7829: checking for uint32_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_type_uint32_t=no - cat > conftest.$ac_ext < -@@ -7828,7 +7844,7 @@ - uint32_t foo - ; return 0; } - EOF --if { (eval echo configure:7832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_uint32_t=yes - else -@@ -7877,12 +7893,12 @@ - - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:7881: checking for $ac_func" >&5 -+echo "configure:7897: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -7941,12 +7957,12 @@ - - do - echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 --echo "configure:7945: checking whether $ac_func must be declared" >&5 -+echo "configure:7961: checking whether $ac_func must be declared" >&5 - if eval "test \"`echo '$''{'radius_cv_decl_needed_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < -@@ -8001,7 +8017,7 @@ - char *(*pfn) = (char *(*)) $ac_func - ; return 0; } - EOF --if { (eval echo configure:8005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "radius_cv_decl_needed_$ac_func=no" - else -@@ -8028,12 +8044,12 @@ - - - echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 --echo "configure:8032: checking return type of signal handlers" >&5 -+echo "configure:8048: checking return type of signal handlers" >&5 - if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -8050,7 +8066,7 @@ - int i; - ; return 0; } - EOF --if { (eval echo configure:8054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void - else -@@ -8073,11 +8089,11 @@ - then - - echo $ac_n "checking for ut_xtime in struct utmpx""... $ac_c" 1>&6 --echo "configure:8077: checking for ut_xtime in struct utmpx" >&5 -+echo "configure:8093: checking for ut_xtime in struct utmpx" >&5 - - - cat > conftest.$ac_ext < -@@ -8089,7 +8105,7 @@ - int foo = offsetof(struct utmpx, ut_xtime) - ; return 0; } - EOF --if { (eval echo configure:8093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - has_element=" " - else -@@ -8120,11 +8136,11 @@ - - - echo $ac_n "checking for ipi_addr in struct in_pktinfo""... $ac_c" 1>&6 --echo "configure:8124: checking for ipi_addr in struct in_pktinfo" >&5 -+echo "configure:8140: checking for ipi_addr in struct in_pktinfo" >&5 - - - cat > conftest.$ac_ext < -@@ -8136,7 +8152,7 @@ - int foo = offsetof(struct in_pktinfo, ipi_addr) - ; return 0; } - EOF --if { (eval echo configure:8140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - has_element=" " - else -@@ -8166,12 +8182,12 @@ - - - echo $ac_n "checking for working const""... $ac_c" 1>&6 --echo "configure:8170: checking for working const" >&5 -+echo "configure:8186: checking for working const" >&5 - if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else -@@ -8242,7 +8258,7 @@ - - - echo $ac_n "checking type of OS""... $ac_c" 1>&6 --echo "configure:8246: checking type of OS" >&5 -+echo "configure:8262: checking type of OS" >&5 - OS=`uname -s` - echo "$ac_t""$OS" 1>&6 - if test "$OS" = "OS/2"; then -@@ -8257,7 +8273,7 @@ - fi - - echo $ac_n "checking for developer gcc flags""... $ac_c" 1>&6 --echo "configure:8261: checking for developer gcc flags" >&5 -+echo "configure:8277: checking for developer gcc flags" >&5 - if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then - devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef" - CFLAGS="$CFLAGS $devflags" -@@ -8272,7 +8288,7 @@ - - - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 --echo "configure:8276: checking for crypt in -lcrypt" >&5 -+echo "configure:8292: checking for crypt in -lcrypt" >&5 - ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -8280,7 +8296,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcrypt $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -8319,12 +8335,12 @@ - - else - echo $ac_n "checking for crypt""... $ac_c" 1>&6 --echo "configure:8323: checking for crypt" >&5 -+echo "configure:8339: checking for crypt" >&5 - if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_crypt=yes" - else -@@ -8372,7 +8388,7 @@ - fi - - echo $ac_n "checking for setkey in -lcipher""... $ac_c" 1>&6 --echo "configure:8376: checking for setkey in -lcipher" >&5 -+echo "configure:8392: checking for setkey in -lcipher" >&5 - ac_lib_var=`echo cipher'_'setkey | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -8380,7 +8396,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcipher $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -8420,10 +8436,10 @@ - - - echo $ac_n "checking for asn1.h,snmp.h,snmp_impl.h""... $ac_c" 1>&6 --echo "configure:8424: checking for asn1.h,snmp.h,snmp_impl.h" >&5 -+echo "configure:8440: checking for asn1.h,snmp.h,snmp_impl.h" >&5 - - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - SNMP_INCLUDE="";ucdsnmp=yes - else -@@ -8464,7 +8480,7 @@ - for try in /usr/include /usr/local/include $with_snmp_include_dir; do - CFLAGS="$old_CFLAGS -I$try" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - SNMP_INCLUDE="-I$try";ucdsnmp=yes - else -@@ -8511,7 +8527,7 @@ - for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $with_snmp_include_dir; do - CFLAGS="$old_CFLAGS -I$try" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - SNMP_INCLUDE="";ucdsnmp=no - else -@@ -8558,7 +8574,7 @@ - for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $with_snmp_include_dir; do - CFLAGS="$old_CFLAGS -I$try" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:8603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - SNMP_INCLUDE="-I$try";ucdsnmp=no - else -@@ -8617,19 +8633,19 @@ - - fi - echo $ac_n "checking for snmp_build_var_op in -lsnmp""... $ac_c" 1>&6 --echo "configure:8621: checking for snmp_build_var_op in -lsnmp" >&5 -+echo "configure:8637: checking for snmp_build_var_op in -lsnmp" >&5 - - old_LIBS="$LIBS" - LIBS="$old_LIBS -lsnmp" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - SNMP_LIBS="-lsnmp" - else -@@ -8644,14 +8660,14 @@ - for try in /usr/lib /usr/local/lib /usr/local/snmp/lib $with_snmp_lib_dir; do - LIBS="$old_LIBS -L$try -lsnmp" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - SNMP_LIBS="-L$try -lsnmp" - else -@@ -8666,14 +8682,14 @@ - fi - LIBS="$old_LIBS -L$try -lsnmp -lcrypto" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - SNMP_LIBS="-L$try -lsnmp -lcrypto" - else -@@ -8688,14 +8704,14 @@ - fi - LIBS="$old_LIBS -L$try -lsnmp -lcrypto -lkstat" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - SNMP_LIBS="-L$try -lsnmp -lcrypto -lkstat" - else -@@ -8733,7 +8749,7 @@ - - gethostbyaddrrstyle="" - echo $ac_n "checking gethostbyaddr_r() syntax""... $ac_c" 1>&6 --echo "configure:8737: checking gethostbyaddr_r() syntax" >&5 -+echo "configure:8753: checking gethostbyaddr_r() syntax" >&5 - case "$host" in - *-freebsd*) - cat >> confdefs.h <<\EOF -@@ -8746,7 +8762,7 @@ - esac - if test "x$gethostbyaddrrstyle" = "x"; then - cat > conftest.$ac_ext < -@@ -8756,7 +8772,7 @@ - gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) - ; return 0; } - EOF --if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -8773,7 +8789,7 @@ - fi - if test "x$gethostbyaddrrstyle" = "x"; then - cat > conftest.$ac_ext < -@@ -8783,7 +8799,7 @@ - gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL) - ; return 0; } - EOF --if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -8800,7 +8816,7 @@ - fi - if test "x$gethostbyaddrrstyle" = "x"; then - cat > conftest.$ac_ext < -@@ -8810,7 +8826,7 @@ - gethostbyaddr(NULL, 0, 0) - ; return 0; } - EOF --if { (eval echo configure:8814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -8838,9 +8854,9 @@ - - gethostbynamerstyle="" - echo $ac_n "checking gethostbyname_r() syntax""... $ac_c" 1>&6 --echo "configure:8842: checking gethostbyname_r() syntax" >&5 -+echo "configure:8858: checking gethostbyname_r() syntax" >&5 - cat > conftest.$ac_ext < -@@ -8850,7 +8866,7 @@ - gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL) - ; return 0; } - EOF --if { (eval echo configure:8854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -8866,7 +8882,7 @@ - rm -f conftest* - if test "x$gethostbynamerstyle" = "x"; then - cat > conftest.$ac_ext < -@@ -8876,7 +8892,7 @@ - gethostbyname_r(NULL, NULL, NULL, 0, NULL) - ; return 0; } - EOF --if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -8893,7 +8909,7 @@ - fi - if test "x$gethostbynamerstyle" = "x"; then - cat > conftest.$ac_ext < -@@ -8903,7 +8919,7 @@ - gethostbyname(NULL) - ; return 0; } - EOF --if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -8931,9 +8947,9 @@ - - ctimerstyle="" - echo $ac_n "checking ctime_r() syntax""... $ac_c" 1>&6 --echo "configure:8935: checking ctime_r() syntax" >&5 -+echo "configure:8951: checking ctime_r() syntax" >&5 - cat > conftest.$ac_ext < -@@ -8942,7 +8958,7 @@ - ctime_r(NULL, NULL, 0) - ; return 0; } - EOF --if { (eval echo configure:8946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -8958,7 +8974,7 @@ - rm -f conftest* - if test "x$ctimerstyle" = "x"; then - cat > conftest.$ac_ext < -@@ -8967,7 +8983,7 @@ - ctime_r(NULL, NULL) - ; return 0; } - EOF --if { (eval echo configure:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -8992,7 +9008,7 @@ - - if test x"$rad_enable_largefiles" = xyes ; then - echo $ac_n "checking for largefile linkage""... $ac_c" 1>&6 --echo "configure:8996: checking for largefile linkage" >&5 -+echo "configure:9012: checking for largefile linkage" >&5 - case "$host" in - *-aix4.01*) - echo "$ac_t""no" 1>&6 -@@ -9029,7 +9045,7 @@ - # Extract the first word of "getconf", so it can be a program name with args. - set dummy getconf; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:9033: checking for $ac_word" >&5 -+echo "configure:9049: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_GETCONF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else diff --git a/openwrt/package/freeradius/patches/05-freeradius-1.0.2-mysql-autoconf.patch b/openwrt/package/freeradius/patches/05-freeradius-1.0.2-mysql-autoconf.patch deleted file mode 100644 index 9803a5fb68e..00000000000 --- a/openwrt/package/freeradius/patches/05-freeradius-1.0.2-mysql-autoconf.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff -ruN freeradius-1.0.2-orig/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure freeradius-1.0.2-2/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure ---- freeradius-1.0.2-orig/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure 2004-05-31 16:20:40.000000000 +0200 -+++ freeradius-1.0.2-2/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure 2005-03-13 23:05:13.000000000 +0100 -@@ -947,26 +947,6 @@ - echo $ac_n "checking for mysql/mysql.h""... $ac_c" 1>&6 - echo "configure:949: checking for mysql/mysql.h" >&5 - -- cat > conftest.$ac_ext < --int main() { --int a = 1; --; return 0; } --EOF --if { (eval echo configure:959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- rm -rf conftest* -- MYSQL_INCLUDE=" " --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- MYSQL_INCLUDE= -- --fi --rm -f conftest* -- - if test "x$MYSQL_INCLUDE" = "x"; then - old_CFLAGS="$CFLAGS" - -@@ -974,14 +954,14 @@ - for try in $mysql_include_dir /usr/local/include /usr/local/mysql/include ; do - CFLAGS="$old_CFLAGS -I$try" - cat > conftest.$ac_ext < - int main() { - int a = 1; - ; return 0; } - EOF --if { (eval echo configure:985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - MYSQL_INCLUDE="-I$try" - else -@@ -1016,7 +996,7 @@ - - - echo $ac_n "checking for mysql_init in -lmysqlclient""... $ac_c" 1>&6 --echo "configure:1020: checking for mysql_init in -lmysqlclient" >&5 -+echo "configure:1000: checking for mysql_init in -lmysqlclient" >&5 - - old_LIBS="$LIBS" - -@@ -1024,14 +1004,14 @@ - for try in $mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql; do - LIBS="$old_LIBS -L$try -lmysqlclient" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - MYSQL_LIBS="-L$try -lmysqlclient $old_LIBS" - else -diff -ruN freeradius-1.0.2-orig/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in freeradius-1.0.2-2/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in ---- freeradius-1.0.2-orig/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in 2004-01-22 19:23:19.000000000 +0100 -+++ freeradius-1.0.2-2/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in 2005-03-13 23:05:13.000000000 +0100 -@@ -38,11 +38,6 @@ - - AC_MSG_CHECKING([for mysql/mysql.h]) - -- AC_TRY_COMPILE([#include ], [int a = 1;], -- MYSQL_INCLUDE=" ", -- MYSQL_INCLUDE= -- ) -- - if test "x$MYSQL_INCLUDE" = "x"; then - old_CFLAGS="$CFLAGS" - diff --git a/openwrt/package/freeradius/patches/06-autoconf-rlm_ldap.patch b/openwrt/package/freeradius/patches/06-autoconf-rlm_ldap.patch deleted file mode 100644 index 05728b2e17a..00000000000 --- a/openwrt/package/freeradius/patches/06-autoconf-rlm_ldap.patch +++ /dev/null @@ -1,576 +0,0 @@ -diff -ruN freeradius-1.0.5-old/src/modules/rlm_ldap/configure.in freeradius-1.0.5-new/src/modules/rlm_ldap/configure.in ---- freeradius-1.0.5-old/src/modules/rlm_ldap/configure.in 2005-08-22 16:50:46.000000000 +0200 -+++ freeradius-1.0.5-new/src/modules/rlm_ldap/configure.in 2005-12-07 08:20:15.000000000 +0100 -@@ -90,6 +90,10 @@ - dnl Static linking will probably not work, but nobody ever - dnl complained about it. - smart_try_dir=$rlm_ldap_lib_dir -+ -+ AC_SMART_CHECK_LIB(sasl, sasl_encode) -+ AC_SMART_CHECK_LIB(lber, ber_init) -+ - if test "x$rlm_ldap_with_threads" = "xyes"; then - AC_SMART_CHECK_LIB(ldap_r, ldap_init) - if test "x$ac_cv_lib_ldap_r_ldap_init" != "xyes"; then -diff -ruN freeradius-1.0.5-old/src/modules/rlm_ldap/configure freeradius-1.0.5-new/src/modules/rlm_ldap/configure ---- freeradius-1.0.5-old/src/modules/rlm_ldap/configure 2005-08-22 16:53:52.000000000 +0200 -+++ freeradius-1.0.5-new/src/modules/rlm_ldap/configure 2005-12-07 08:20:41.000000000 +0100 -@@ -929,13 +929,311 @@ - fi - - smart_try_dir=$rlm_ldap_lib_dir -+ -+ -+ -+sm_lib_safe=`echo "sasl" | sed 'y%./+-%__p_%'` -+sm_func_safe=`echo "sasl_encode" | sed 'y%./+-%__p_%'` -+echo $ac_n "checking for sasl_encode in -lsasl""... $ac_c" 1>&6 -+echo "configure:939: checking for sasl_encode in -lsasl" >&5 -+ -+old_LIBS="$LIBS" -+smart_lib= -+smart_lib_dir= -+ -+if test "x$smart_try_dir" != "x"; then -+ for try in $smart_try_dir; do -+ LIBS="-L$try -lsasl $old_LIBS" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ smart_lib="-L$try -lsasl" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ if test "x$smart_lib" != "x"; then -+ break; -+ fi -+ LIBS="$old_LIBS" -+ done -+fi -+ -+if test "x$smart_lib" = "x"; then -+ LIBS="-lsasl $old_LIBS" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ smart_lib="-lsasl" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ LIBS="$old_LIBS" -+fi -+ -+if test "x$smart_lib" = "x"; then -+ -+ -+if test "x$LOCATE" != "x"; then -+ DIRS= -+ file=libsasl${libltdl_cv_shlibext} -+ -+ for x in `${LOCATE} $file 2>/dev/null`; do -+ base=`echo $x | sed "s%/${file}%%"` -+ if test "x$x" = "x$base"; then -+ continue; -+ fi -+ -+ dir=`${DIRNAME} $x 2>/dev/null` -+ exclude=`echo ${dir} | ${GREP} /home` -+ if test "x$exclude" != "x"; then -+ continue -+ fi -+ -+ already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}` -+ if test "x$already" = "x"; then -+ DIRS="$DIRS $dir" -+ fi -+ done -+fi -+ -+eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\"" -+ -+ -+ -+if test "x$LOCATE" != "x"; then -+ DIRS= -+ file=libsasl.a -+ -+ for x in `${LOCATE} $file 2>/dev/null`; do -+ base=`echo $x | sed "s%/${file}%%"` -+ if test "x$x" = "x$base"; then -+ continue; -+ fi -+ -+ dir=`${DIRNAME} $x 2>/dev/null` -+ exclude=`echo ${dir} | ${GREP} /home` -+ if test "x$exclude" != "x"; then -+ continue -+ fi -+ -+ already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}` -+ if test "x$already" = "x"; then -+ DIRS="$DIRS $dir" -+ fi -+ done -+fi -+ -+eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\"" -+ -+ -+ for try in $smart_lib_dir /usr/local/lib /opt/lib; do -+ LIBS="-L$try -lsasl $old_LIBS" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ smart_lib="-L$try -lsasl" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ if test "x$smart_lib" != "x"; then -+ break; -+ fi -+ LIBS="$old_LIBS" -+ done -+fi -+ -+if test "x$smart_lib" != "x"; then -+ echo "$ac_t""yes" 1>&6 -+ eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes" -+ LIBS="$smart_lib $old_LIBS" -+ SMART_LIBS="$smart_lib $SMART_LIBS" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ -+ -+sm_lib_safe=`echo "lber" | sed 'y%./+-%__p_%'` -+sm_func_safe=`echo "ber_init" | sed 'y%./+-%__p_%'` -+echo $ac_n "checking for ber_init in -llber""... $ac_c" 1>&6 -+echo "configure:1087: checking for ber_init in -llber" >&5 -+ -+old_LIBS="$LIBS" -+smart_lib= -+smart_lib_dir= -+ -+if test "x$smart_try_dir" != "x"; then -+ for try in $smart_try_dir; do -+ LIBS="-L$try -llber $old_LIBS" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ smart_lib="-L$try -llber" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ if test "x$smart_lib" != "x"; then -+ break; -+ fi -+ LIBS="$old_LIBS" -+ done -+fi -+ -+if test "x$smart_lib" = "x"; then -+ LIBS="-llber $old_LIBS" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ smart_lib="-llber" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ LIBS="$old_LIBS" -+fi -+ -+if test "x$smart_lib" = "x"; then -+ -+ -+if test "x$LOCATE" != "x"; then -+ DIRS= -+ file=liblber${libltdl_cv_shlibext} -+ -+ for x in `${LOCATE} $file 2>/dev/null`; do -+ base=`echo $x | sed "s%/${file}%%"` -+ if test "x$x" = "x$base"; then -+ continue; -+ fi -+ -+ dir=`${DIRNAME} $x 2>/dev/null` -+ exclude=`echo ${dir} | ${GREP} /home` -+ if test "x$exclude" != "x"; then -+ continue -+ fi -+ -+ already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}` -+ if test "x$already" = "x"; then -+ DIRS="$DIRS $dir" -+ fi -+ done -+fi -+ -+eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\"" -+ -+ -+ -+if test "x$LOCATE" != "x"; then -+ DIRS= -+ file=liblber.a -+ -+ for x in `${LOCATE} $file 2>/dev/null`; do -+ base=`echo $x | sed "s%/${file}%%"` -+ if test "x$x" = "x$base"; then -+ continue; -+ fi -+ -+ dir=`${DIRNAME} $x 2>/dev/null` -+ exclude=`echo ${dir} | ${GREP} /home` -+ if test "x$exclude" != "x"; then -+ continue -+ fi -+ -+ already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}` -+ if test "x$already" = "x"; then -+ DIRS="$DIRS $dir" -+ fi -+ done -+fi -+ -+eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\"" -+ -+ -+ for try in $smart_lib_dir /usr/local/lib /opt/lib; do -+ LIBS="-L$try -llber $old_LIBS" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ smart_lib="-L$try -llber" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ if test "x$smart_lib" != "x"; then -+ break; -+ fi -+ LIBS="$old_LIBS" -+ done -+fi -+ -+if test "x$smart_lib" != "x"; then -+ echo "$ac_t""yes" 1>&6 -+ eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes" -+ LIBS="$smart_lib $old_LIBS" -+ SMART_LIBS="$smart_lib $SMART_LIBS" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ - if test "x$rlm_ldap_with_threads" = "xyes"; then - - - sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'` - sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ldap_init in -lldap_r""... $ac_c" 1>&6 --echo "configure:939: checking for ldap_init in -lldap_r" >&5 -+echo "configure:1237: checking for ldap_init in -lldap_r" >&5 - - old_LIBS="$LIBS" - smart_lib= -@@ -945,14 +1243,14 @@ - for try in $smart_try_dir; do - LIBS="-L$try -lldap_r $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-L$try -lldap_r" - else -@@ -970,14 +1268,14 @@ - if test "x$smart_lib" = "x"; then - LIBS="-lldap_r $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-lldap_r" - else -@@ -1047,14 +1345,14 @@ - for try in $smart_lib_dir /usr/local/lib /opt/lib; do - LIBS="-L$try -lldap_r $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-L$try -lldap_r" - else -@@ -1087,7 +1385,7 @@ - sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'` - sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for ldap_init in -lldap""... $ac_c" 1>&6 --echo "configure:1091: checking for ldap_init in -lldap" >&5 -+echo "configure:1389: checking for ldap_init in -lldap" >&5 - - old_LIBS="$LIBS" - smart_lib= -@@ -1097,14 +1395,14 @@ - for try in $smart_try_dir; do - LIBS="-L$try -lldap $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-L$try -lldap" - else -@@ -1122,14 +1420,14 @@ - if test "x$smart_lib" = "x"; then - LIBS="-lldap $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-lldap" - else -@@ -1199,14 +1497,14 @@ - for try in $smart_lib_dir /usr/local/lib /opt/lib; do - LIBS="-L$try -lldap $old_LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - smart_lib="-L$try -lldap" - else -@@ -1241,7 +1539,7 @@ - - ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'` - echo $ac_n "checking for ldap.h""... $ac_c" 1>&6 --echo "configure:1245: checking for ldap.h" >&5 -+echo "configure:1543: checking for ldap.h" >&5 - - old_CFLAGS="$CFLAGS" - smart_include= -@@ -1251,7 +1549,7 @@ - for try in $smart_try_dir; do - CFLAGS="$old_CFLAGS -I$try" - cat > conftest.$ac_ext < -@@ -1259,7 +1557,7 @@ - int a = 1; - ; return 0; } - EOF --if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - smart_include="-I$try" - else -@@ -1278,7 +1576,7 @@ - - if test "x$smart_include" = "x"; then - cat > conftest.$ac_ext < -@@ -1286,7 +1584,7 @@ - int a = 1; - ; return 0; } - EOF --if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - smart_include=" " - else -@@ -1330,7 +1628,7 @@ - for try in $smart_include_dir /usr/local/include /opt/include; do - CFLAGS="$old_CFLAGS -I$try" - cat > conftest.$ac_ext < -@@ -1338,7 +1636,7 @@ - int a = 1; - ; return 0; } - EOF --if { (eval echo configure:1342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - smart_include="-I$try" - else -@@ -1371,12 +1669,12 @@ - - if test "x$fail" = "x"; then - echo $ac_n "checking for ldap_start_tls_s""... $ac_c" 1>&6 --echo "configure:1375: checking for ldap_start_tls_s" >&5 -+echo "configure:1673: checking for ldap_start_tls_s" >&5 - if eval "test \"`echo '$''{'ac_cv_func_ldap_start_tls_s'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_ldap_start_tls_s=yes" - else -@@ -1419,12 +1717,12 @@ - fi - - echo $ac_n "checking for ldap_initialize""... $ac_c" 1>&6 --echo "configure:1423: checking for ldap_initialize" >&5 -+echo "configure:1721: checking for ldap_initialize" >&5 - if eval "test \"`echo '$''{'ac_cv_func_ldap_initialize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_ldap_initialize=yes" - else -@@ -1467,12 +1765,12 @@ - fi - - echo $ac_n "checking for ldap_int_tls_config""... $ac_c" 1>&6 --echo "configure:1471: checking for ldap_int_tls_config" >&5 -+echo "configure:1769: checking for ldap_int_tls_config" >&5 - if eval "test \"`echo '$''{'ac_cv_func_ldap_int_tls_config'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_ldap_int_tls_config=yes" - else diff --git a/openwrt/package/freetype/Config.in b/openwrt/package/freetype/Config.in deleted file mode 100644 index 38531cc1de3..00000000000 --- a/openwrt/package/freetype/Config.in +++ /dev/null @@ -1,26 +0,0 @@ -config BR2_COMPILE_FREETYPE - tristate - default n - depends BR2_PACKAGE_LIBFREETYPE - -config BR2_PACKAGE_LIBFREETYPE - tristate "libfreetype....................... A free, high-quality and portable font engine" -# default m if CONFIG_DEVEL - default n - select BR2_COMPILE_FREETYPE - select BR2_PACKAGE_ZLIB - help - The FreeType project is a team of volunteers who develop free, - portable and high-quality software solutions for digital typography. - They specifically target embedded systems and focus on bringing small, - efficient and ubiquitous products. - - The FreeType 2 library is their new software font engine. It has been - designed to provide the following important features: - * A universal and simple API to manage font files - * Support for several font formats through loadable modules - * High-quality anti-aliasing - * High portability & performance - - http://www.freetype.org/ - diff --git a/openwrt/package/freetype/Makefile b/openwrt/package/freetype/Makefile deleted file mode 100644 index 429df1d09e0..00000000000 --- a/openwrt/package/freetype/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libfreetype -PKG_VERSION:=2.1.9 -PKG_RELEASE:=1 -PKG_MD5SUM:=ec1b903e4be5f073caa72458ea58c29c - -PKG_SOURCE_URL:=@SF/freetype -PKG_SOURCE:=freetype-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/freetype-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBFREETYPE,libfreetype,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - $(TARGET_CONFIGURE_OPTS) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared=yes \ - --enable-static=yes \ - --disable-rpath \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBFREETYPE): - install -d -m0755 $(IDIR_LIBFREETYPE)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(IDIR_LIBFREETYPE)/usr/lib/ - $(RSTRIP) $(IDIR_LIBFREETYPE) - $(IPKG_BUILD) $(IDIR_LIBFREETYPE) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libfreetype.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libfreetype.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/freetype-config \ - $(STAGING_DIR)/usr/include/freetype2 \ - $(STAGING_DIR)/usr/include/ft2build.h \ - $(STAGING_DIR)/usr/lib/libfreetype.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/freetype/ipkg/libfreetype.control b/openwrt/package/freetype/ipkg/libfreetype.control deleted file mode 100644 index c1e0ec54c3b..00000000000 --- a/openwrt/package/freetype/ipkg/libfreetype.control +++ /dev/null @@ -1,16 +0,0 @@ -Package: libfreetype -Priority: optional -Section: libs -Depends: zlib -Description: A free, high-quality and portable font engine. - The FreeType project is a team of volunteers who develop free, - portable and high-quality software solutions for digital typography. - They specifically target embedded systems and focus on bringing small, - efficient and ubiquitous products. - . - The FreeType 2 library is their new software font engine. It has been - designed to provide the following important features: - * A universal and simple API to manage font files - * Support for several font formats through loadable modules - * High-quality anti-aliasing - * High portability & performance diff --git a/openwrt/package/frickin/Config.in b/openwrt/package/frickin/Config.in deleted file mode 100644 index b118a111a49..00000000000 --- a/openwrt/package/frickin/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_FRICKIN - prompt "frickin........................... PPTP (Point-to-Point Tunneling Protocol) proxy" - tristate - default m if CONFIG_DEVEL - help - Frickin PPTP Proxy allows a Point-to-Point Tunneling Protocol (PPTP) - client to connect to a PPTP server through Network Address - Translation (NAT). - - http://frickin.sourceforge.net/ - diff --git a/openwrt/package/frickin/Makefile b/openwrt/package/frickin/Makefile deleted file mode 100644 index a5272091936..00000000000 --- a/openwrt/package/frickin/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=frickin -PKG_VERSION:=1.3 -PKG_RELEASE:=1 -PKG_MD5SUM:= 5b2e98da2310c71c703d4617b88a173f - -PKG_SOURCE_URL:=@SF/frickin -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,FRICKIN,frickin,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - all - touch $@ - -$(IPKG_FRICKIN): - install -d -m0755 $(IDIR_FRICKIN)/etc/default - install -m0644 ./files/frickin.default $(IDIR_FRICKIN)/etc/default/frickin - install -d -m0755 $(IDIR_FRICKIN)/etc/init.d - install -m0755 ./files/frickin.init $(IDIR_FRICKIN)/etc/init.d/frickin - install -d -m0755 $(IDIR_FRICKIN)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/frickin $(IDIR_FRICKIN)/usr/sbin/ - $(RSTRIP) $(IDIR_FRICKIN) - $(IPKG_BUILD) $(IDIR_FRICKIN) $(PACKAGE_DIR) diff --git a/openwrt/package/frickin/files/frickin.default b/openwrt/package/frickin/files/frickin.default deleted file mode 100644 index 9f55d5bad2f..00000000000 --- a/openwrt/package/frickin/files/frickin.default +++ /dev/null @@ -1,16 +0,0 @@ -# ip address of the server the proxy should connect to -TARGET_IP=192.168.1.2 - -# ip address the proxy should listen to for incoming connections -#LISTEN_IP=192.168.1.1 - -# maximum number of simultaneous connections -#PROXY_CONN_MAX=20 - -# user the proxy should run as -#PROXY_USER=root - -[ -n "$TARGET_IP" ] && OPTIONS="$OPTIONS -s $TARGET_IP" -[ -n "$LISTEN_IP" ] && OPTIONS="$OPTIONS -l $LISTEN_IP" -[ -n "$PROXY_CONN_MAX" ] && OPTIONS="$OPTIONS -c $PROXY_CONN_MAX" -[ -n "$PROXY_USER" ] && OPTIONS="$OPTIONS -u $PROXY_USER" diff --git a/openwrt/package/frickin/files/frickin.init b/openwrt/package/frickin/files/frickin.init deleted file mode 100644 index e07a0945b68..00000000000 --- a/openwrt/package/frickin/files/frickin.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -BIN=frickin -DEFAULT=/etc/default/$BIN -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - $BIN $OPTIONS & - ;; - *) - echo "usage: $0 (start)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/frickin/ipkg/frickin.conffiles b/openwrt/package/frickin/ipkg/frickin.conffiles deleted file mode 100644 index f374430c3ba..00000000000 --- a/openwrt/package/frickin/ipkg/frickin.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/frickin diff --git a/openwrt/package/frickin/ipkg/frickin.control b/openwrt/package/frickin/ipkg/frickin.control deleted file mode 100644 index a8b3fb4f0e5..00000000000 --- a/openwrt/package/frickin/ipkg/frickin.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: frickin -Priority: optional -Section: net -Description: PPTP (Point-to-Point Tunneling Protocol) proxy diff --git a/openwrt/package/fuse/Config.in b/openwrt/package/fuse/Config.in deleted file mode 100644 index 2d8b1775a02..00000000000 --- a/openwrt/package/fuse/Config.in +++ /dev/null @@ -1,56 +0,0 @@ -config BR2_COMPILE_FUSE - tristate - default n - depends BR2_PACKAGE_LIBFUSE - -config BR2_PACKAGE_LIBFUSE - prompt "libfuse........................... FUSE library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_FUSE - select BR2_PACKAGE_KMOD_FUSE - select BR2_PACKAGE_LIBPTHREAD - help - With FUSE it is possible to implement a fully functional - filesystem in a userspace program. - - Features include: - - * Simple library API - * Simple installation (no need to patch or recompile the kernel) - * Secure implementation - * Userspace - kernel interface is very efficient - * Usable by non privileged users - * Runs on Linux kernels 2.4.X and 2.6.X - * Has proven very stable over time - - http://fuse.sourceforge.net/ - - This package contains the fuse shared library, needed by other programs. - - Depends: libpthread - -config BR2_PACKAGE_FUSE_UTILS - prompt "fuse-utils...................... FUSE utilities" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBFUSE - select BR2_PACKAGE_LIBPTHREAD - help - With FUSE it is possible to implement a fully functional - filesystem in a userspace program. - - Features include: - - * Simple library API - * Simple installation (no need to patch or recompile the kernel) - * Secure implementation - * Userspace - kernel interface is very efficient - * Usable by non privileged users - * Runs on Linux kernels 2.4.X and 2.6.X - * Has proven very stable over time - - http://fuse.sourceforge.net/ - - This package contains the fusermount userland utility. - diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile deleted file mode 100644 index 646b9d22ec6..00000000000 --- a/openwrt/package/fuse/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fuse -PKG_VERSION:=2.5.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=ea565debe6c7486963bef05c45c50361 - -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBFUSE,libfuse,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,FUSE_UTILS,fuse-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - rm -rf config.{cache,status} ; \ - touch configure.in ; \ - touch aclocal.m4 ; \ - touch Makefile.in ; \ - touch include/config.h.in ; \ - touch configure ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --disable-kernel-module \ - --enable-lib \ - --enable-util \ - --disable-example \ - --disable-auto-modprobe \ - --with-kernel=$(LINUX_DIR) \ - --disable-mtab \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBFUSE): - mkdir -p $(IDIR_LIBFUSE)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(IDIR_LIBFUSE)/usr/lib/ - $(RSTRIP) $(IDIR_LIBFUSE) - $(IPKG_BUILD) $(IDIR_LIBFUSE) $(PACKAGE_DIR) - -$(IPKG_FUSE_UTILS): - mkdir -p $(IDIR_FUSE_UTILS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(IDIR_FUSE_UTILS)/usr/bin/ - $(RSTRIP) $(IDIR_FUSE_UTILS) - $(IPKG_BUILD) $(IDIR_FUSE_UTILS) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libfuse.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so* $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc - -install-dev: $(STAGING_DIR)/usr/lib/libfuse.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/fuse \ - $(STAGING_DIR)/usr/include/fuse.h \ - $(STAGING_DIR)/usr/lib/libfuse.a \ - $(STAGING_DIR)/usr/lib/libfuse.so* \ - $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/fuse/ipkg/fuse-utils.control b/openwrt/package/fuse/ipkg/fuse-utils.control deleted file mode 100644 index c8b66b759d7..00000000000 --- a/openwrt/package/fuse/ipkg/fuse-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: fuse-utils -Priority: optional -Section: admin -Depends: kmod-fuse -Description: Filesystem in Userspace (utilities) diff --git a/openwrt/package/fuse/ipkg/libfuse.control b/openwrt/package/fuse/ipkg/libfuse.control deleted file mode 100644 index 9c3bcb504da..00000000000 --- a/openwrt/package/fuse/ipkg/libfuse.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libfuse -Priority: optional -Section: libs -Depends: libpthread -Description: Filesystem in Userspace (library) diff --git a/openwrt/package/fuse/patches/111-uclibc_changes.patch b/openwrt/package/fuse/patches/111-uclibc_changes.patch deleted file mode 100644 index 69730758e67..00000000000 --- a/openwrt/package/fuse/patches/111-uclibc_changes.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ruw fuse-2.4.0/util/fusermount.c.org fuse-2.4.0/util/fusermount.c ---- fuse-2.4.0/util/fusermount.c.org 2005-10-14 11:34:06.000000000 +0200 -+++ fuse-2.4.0/util/fusermount.c 2005-10-14 11:56:26.000000000 +0200 -@@ -42,7 +42,12 @@ - #define FUSE_COMMFD_ENV "_FUSE_COMMFD" - - #define FUSE_DEV_OLD "/proc/fs/fuse/dev" -+#ifdef __UCLIBC__ -+/* /dev is mounted as devfs in OpenWRT, and device is created here */ -+#define FUSE_DEV_NEW "/dev/misc/fuse" -+#else - #define FUSE_DEV_NEW "/dev/fuse" -+#endif - #define FUSE_VERSION_FILE_OLD "/proc/fs/fuse/version" - #define FUSE_CONF "/etc/fuse.conf" - diff --git a/openwrt/package/fuse/patches/112-no_break_on_mknod.patch b/openwrt/package/fuse/patches/112-no_break_on_mknod.patch deleted file mode 100644 index 96ed70f2917..00000000000 --- a/openwrt/package/fuse/patches/112-no_break_on_mknod.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN fuse-2.4.1-old/util/Makefile.in fuse-2.4.1-new/util/Makefile.in ---- fuse-2.4.1-old/util/Makefile.in 2005-10-17 12:29:20.000000000 +0200 -+++ fuse-2.4.1-new/util/Makefile.in 2005-10-19 17:11:13.000000000 +0200 -@@ -445,7 +445,7 @@ - install-exec-hook: - -chown root $(DESTDIR)$(bindir)/fusermount - -chmod u+s $(DESTDIR)$(bindir)/fusermount -- @if test ! -e $(DESTDIR)/dev/fuse; then \ -+ -@if test ! -e $(DESTDIR)/dev/fuse; then \ - $(mkdir_p) $(DESTDIR)/dev; \ - echo "mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229"; \ - mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229; \ diff --git a/openwrt/package/glib/Config.in b/openwrt/package/glib/Config.in deleted file mode 100644 index f11c06370f3..00000000000 --- a/openwrt/package/glib/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -config BR2_COMPILE_GLIB - tristate - depends BR2_PACKAGE_GLIB1 - -config BR2_PACKAGE_GLIB1 - prompt "glib1............................. The GLib library of C routines (v1.2)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_GLIB - select BR2_PACKAGE_LIBPTHREAD - help - GLib is a library containing many useful C routines for things such - as trees, hashes, and lists. - - http://www.gtk.org/ - - Depends: libpthread - diff --git a/openwrt/package/glib/Makefile b/openwrt/package/glib/Makefile deleted file mode 100644 index cb697995dbb..00000000000 --- a/openwrt/package/glib/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME := glib -PKG_VERSION := 1.2.10 -PKG_RELEASE := 1 -PKG_MD5SUM := 6fe30dad87c77b91b632def29dd69ef9 - -PKG_SOURCE_URL := ftp://ftp.gtk.org/pub/gtk/v1.2 \ - http://ftp.gwdg.de/pub/misc/grafik/gimp/gtk/v1.2/ \ - http://ftp.esat.net/mirrors/ftp.gimp.org/pub/gtk/v1.2/ \ - http://www.mirrorservice.org/sites/ftp.gimp.org/pub/gtk/v1.2/ -PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT := zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,GLIB1,glib1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - glib_cv_sizeof_gmutex=24 \ - ac_cv_sizeof_char=1 \ - ac_cv_sizeof_short=2 \ - ac_cv_sizeof_int=4 \ - ac_cv_sizeof_long=4 \ - ac_cv_sizeof_long_long=8 \ - ac_cv_sizeof_void_p=4 \ - glib_cv_prog_cc_ansi_proto="no" \ - glib_cv_has__inline="yes" \ - glib_cv_has__inline__="yes" \ - glib_cv_hasinline="yes" \ - glib_cv_sane_realloc="yes" \ - glib_cv_va_copy="no" \ - glib_cv___va_copy="yes" \ - glib_cv_va_val_copy="yes" \ - glib_cv_rtldglobal_broken="no" \ - glib_cv_uscore="no" \ - ac_cv_func_getpwuid_r="yes" \ - glib_cv_func_pthread_mutex_trylock_posix="yes" \ - glib_cv_func_pthread_cond_timedwait_posix="yes" \ - glib_cv_sizeof_gmutex="24" \ - glib_cv_byte_contents_gmutex="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared=yes \ - --enable-static=yes \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $@ - -$(IPKG_GLIB1): - install -m0755 -d $(IDIR_GLIB1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(IDIR_GLIB1)/usr/lib/ - $(RSTRIP) $(IDIR_GLIB1) - $(IPKG_BUILD) $(IDIR_GLIB1) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libglib.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/glib-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/glib-1.2 $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}.{a,so} $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-*.so.* $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/glib $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - touch $(STAGING_DIR)/usr/lib/libglib.so - -install-dev: $(STAGING_DIR)/usr/lib/libglib.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/bin/glib-config - rm -rf $(STAGING_DIR)/usr/include/glib-1.2 - rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}.{a,so} - rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}-*.so.* - rm -rf $(STAGING_DIR)/usr/lib/glib - rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/glib/ipkg/glib1.control b/openwrt/package/glib/ipkg/glib1.control deleted file mode 100644 index def028d4937..00000000000 --- a/openwrt/package/glib/ipkg/glib1.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: glib1 -Priority: optional -Section: libs -Description: The GLib library of C routines -Depends: libpthread diff --git a/openwrt/package/glib/patches/01-debian-9 b/openwrt/package/glib/patches/01-debian-9 deleted file mode 100644 index 20608c0e8cd..00000000000 --- a/openwrt/package/glib/patches/01-debian-9 +++ /dev/null @@ -1,18988 +0,0 @@ ---- glib1.2-1.2.10.orig/Makefile.in -+++ glib1.2-1.2.10/Makefile.in -@@ -1,6 +1,6 @@ --# Makefile.in generated automatically by automake 1.4 from Makefile.am -+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am - --# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -64,8 +64,10 @@ - AS = @AS@ - CC = @CC@ - DLLTOOL = @DLLTOOL@ -+ECHO = @ECHO@ - ENABLE_MEM_CHECK = @ENABLE_MEM_CHECK@ - ENABLE_MEM_PROFILE = @ENABLE_MEM_PROFILE@ -+EXEEXT = @EXEEXT@ - GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ - GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ - GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -@@ -90,8 +92,10 @@ - MAINT = @MAINT@ - MAKEINFO = @MAKEINFO@ - OBJDUMP = @OBJDUMP@ -+OBJEXT = @OBJEXT@ - PACKAGE = @PACKAGE@ - RANLIB = @RANLIB@ -+STRIP = @STRIP@ - VERSION = @VERSION@ - - AUTOMAKE_OPTIONS = 1.4 -@@ -154,18 +158,20 @@ - gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprimes.lo grel.lo \ - gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo \ - gutils.lo -+noinst_PROGRAMS = testglib$(EXEEXT) testgdate$(EXEEXT) \ -+testgdateparser$(EXEEXT) - PROGRAMS = $(noinst_PROGRAMS) - - testglib_SOURCES = testglib.c --testglib_OBJECTS = testglib.o -+testglib_OBJECTS = testglib.$(OBJEXT) - testglib_DEPENDENCIES = libglib.la - testglib_LDFLAGS = - testgdate_SOURCES = testgdate.c --testgdate_OBJECTS = testgdate.o -+testgdate_OBJECTS = testgdate.$(OBJEXT) - testgdate_DEPENDENCIES = libglib.la - testgdate_LDFLAGS = - testgdateparser_SOURCES = testgdateparser.c --testgdateparser_OBJECTS = testgdateparser.o -+testgdateparser_OBJECTS = testgdateparser.$(OBJEXT) - testgdateparser_DEPENDENCIES = libglib.la - testgdateparser_LDFLAGS = - SCRIPTS = $(bin_SCRIPTS) -@@ -180,22 +186,22 @@ - HEADERS = $(glibinclude_HEADERS) - - DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ --Makefile.am Makefile.in NEWS acconfig.h acinclude.m4 aclocal.m4 \ --config.guess config.h.in config.sub configure configure.in \ --glib-config.in glib.pc.in glib.spec.in gmodule.pc.in gthread.pc.in \ --install-sh ltconfig ltmain.sh missing mkinstalldirs -+Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 config.guess \ -+config.h.in config.sub configure configure.in glib-config.in glib.pc.in \ -+glib.spec.in gmodule.pc.in gthread.pc.in install-sh ltmain.sh missing \ -+mkinstalldirs - - - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - --TAR = gtar -+TAR = tar - GZIP_ENV = --best - SOURCES = $(libglib_la_SOURCES) testglib.c testgdate.c testgdateparser.c --OBJECTS = $(libglib_la_OBJECTS) testglib.o testgdate.o testgdateparser.o -+OBJECTS = $(libglib_la_OBJECTS) testglib.$(OBJEXT) testgdate.$(OBJEXT) testgdateparser.$(OBJEXT) - - all: all-redirect - .SUFFIXES: --.SUFFIXES: .S .c .lo .o .s -+.SUFFIXES: .S .c .lo .o .obj .s - $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile - -@@ -203,7 +209,7 @@ - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - --$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 -+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in - cd $(srcdir) && $(ACLOCAL) - - config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -277,6 +283,11 @@ - .c.o: - $(COMPILE) -c $< - -+# FIXME: We should only use cygpath when building on Windows, -+# and only if it is available. -+.c.obj: -+ $(COMPILE) -c `cygpath -w $<` -+ - .s.o: - $(COMPILE) -c $< - -@@ -285,6 +296,7 @@ - - mostlyclean-compile: - -rm -f *.o core *.core -+ -rm -f *.$(OBJEXT) - - clean-compile: - -@@ -324,16 +336,16 @@ - - maintainer-clean-noinstPROGRAMS: - --testglib: $(testglib_OBJECTS) $(testglib_DEPENDENCIES) -- @rm -f testglib -+testglib$(EXEEXT): $(testglib_OBJECTS) $(testglib_DEPENDENCIES) -+ @rm -f testglib$(EXEEXT) - $(LINK) $(testglib_LDFLAGS) $(testglib_OBJECTS) $(testglib_LDADD) $(LIBS) - --testgdate: $(testgdate_OBJECTS) $(testgdate_DEPENDENCIES) -- @rm -f testgdate -+testgdate$(EXEEXT): $(testgdate_OBJECTS) $(testgdate_DEPENDENCIES) -+ @rm -f testgdate$(EXEEXT) - $(LINK) $(testgdate_LDFLAGS) $(testgdate_OBJECTS) $(testgdate_LDADD) $(LIBS) - --testgdateparser: $(testgdateparser_OBJECTS) $(testgdateparser_DEPENDENCIES) -- @rm -f testgdateparser -+testgdateparser$(EXEEXT): $(testgdateparser_OBJECTS) $(testgdateparser_DEPENDENCIES) -+ @rm -f testgdateparser$(EXEEXT) - $(LINK) $(testgdateparser_LDFLAGS) $(testgdateparser_OBJECTS) $(testgdateparser_LDADD) $(LIBS) - - install-binSCRIPTS: $(bin_SCRIPTS) -@@ -463,7 +475,7 @@ - dot_seen=no; \ - rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ - rev="$$subdir $$rev"; \ -- test "$$subdir" = "." && dot_seen=yes; \ -+ test "$$subdir" != "." || dot_seen=yes; \ - done; \ - test "$$dot_seen" = "no" && rev=". $$rev"; \ - target=`echo $@ | sed s/-recursive//`; \ -@@ -505,7 +517,7 @@ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ -- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) -+ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)) - - mostlyclean-tags: - -@@ -575,35 +587,6 @@ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook --garray.lo garray.o : garray.c glib.h glibconfig.h --gcache.lo gcache.o : gcache.c glib.h glibconfig.h --gcompletion.lo gcompletion.o : gcompletion.c glib.h glibconfig.h --gdataset.lo gdataset.o : gdataset.c glib.h glibconfig.h --gdate.lo gdate.o : gdate.c config.h glib.h glibconfig.h --gerror.lo gerror.o : gerror.c config.h glib.h glibconfig.h --ghash.lo ghash.o : ghash.c glib.h glibconfig.h --ghook.lo ghook.o : ghook.c glib.h glibconfig.h --giochannel.lo giochannel.o : giochannel.c config.h glib.h glibconfig.h --giounix.lo giounix.o : giounix.c glib.h glibconfig.h --glist.lo glist.o : glist.c glib.h glibconfig.h --gmain.lo gmain.o : gmain.c config.h glib.h glibconfig.h --gmem.lo gmem.o : gmem.c config.h glib.h glibconfig.h --gmessages.lo gmessages.o : gmessages.c config.h glib.h glibconfig.h --gmutex.lo gmutex.o : gmutex.c glib.h glibconfig.h --gnode.lo gnode.o : gnode.c glib.h glibconfig.h --gprimes.lo gprimes.o : gprimes.c glib.h glibconfig.h --grel.lo grel.o : grel.c glib.h glibconfig.h --gscanner.lo gscanner.o : gscanner.c config.h glib.h glibconfig.h --gslist.lo gslist.o : gslist.c glib.h glibconfig.h --gstrfuncs.lo gstrfuncs.o : gstrfuncs.c config.h glib.h glibconfig.h --gstring.lo gstring.o : gstring.c glib.h glibconfig.h --gtimer.lo gtimer.o : gtimer.c config.h glib.h glibconfig.h --gtree.lo gtree.o : gtree.c glib.h glibconfig.h --gutils.lo gutils.o : gutils.c config.h glibconfig.h glib.h --testgdate.o: testgdate.c glib.h glibconfig.h --testgdateparser.o: testgdateparser.c glib.h glibconfig.h --testglib.o: testglib.c glib.h glibconfig.h -- - info-am: - info: info-recursive - dvi-am: ---- glib1.2-1.2.10.orig/aclocal.m4 -+++ glib1.2-1.2.10/aclocal.m4 -@@ -1,6 +1,6 @@ --dnl aclocal.m4 generated automatically by aclocal 1.4 -+dnl aclocal.m4 generated automatically by aclocal 1.4-p6 - --dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -10,135 +10,3114 @@ - dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A - dnl PARTICULAR PURPOSE. - -+# Do all the work for Automake. This macro actually does too much -- -+# some checks are only needed if your package does certain things. -+# But this isn't really a big deal. - --# serial 40 AC_PROG_LIBTOOL --AC_DEFUN(AC_PROG_LIBTOOL, --[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -+# serial 1 -+ -+dnl Usage: -+dnl AM_INIT_AUTOMAKE(package,version, [no-define]) -+ -+AC_DEFUN([AM_INIT_AUTOMAKE], -+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -+AC_REQUIRE([AC_PROG_INSTALL]) -+PACKAGE=[$1] -+AC_SUBST(PACKAGE) -+VERSION=[$2] -+AC_SUBST(VERSION) -+dnl test to see if srcdir already configured -+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then -+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -+fi -+ifelse([$3],, -+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) -+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) -+AC_REQUIRE([AM_SANITY_CHECK]) -+AC_REQUIRE([AC_ARG_PROGRAM]) -+dnl FIXME This is truly gross. -+missing_dir=`cd $ac_aux_dir && pwd` -+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) -+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) -+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -+AC_REQUIRE([AC_PROG_MAKE_SET])]) -+ -+# Copyright 2002 Free Software Foundation, Inc. -+ -+# 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, 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 -+ -+# AM_AUTOMAKE_VERSION(VERSION) -+# ---------------------------- -+# Automake X.Y traces this macro to ensure aclocal.m4 has been -+# generated from the m4 files accompanying Automake X.Y. -+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) -+ -+# AM_SET_CURRENT_AUTOMAKE_VERSION -+# ------------------------------- -+# Call AM_AUTOMAKE_VERSION so it can be traced. -+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -+ [AM_AUTOMAKE_VERSION([1.4-p6])]) -+ -+# -+# Check to make sure that the build environment is sane. -+# -+ -+AC_DEFUN([AM_SANITY_CHECK], -+[AC_MSG_CHECKING([whether build environment is sane]) -+# Just in case -+sleep 1 -+echo timestamp > conftestfile -+# Do `set' in a subshell so we don't clobber the current shell's -+# arguments. Must try -L first in case configure is actually a -+# symlink; some systems play weird games with the mod time of symlinks -+# (eg FreeBSD returns the mod time of the symlink's containing -+# directory). -+if ( -+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` -+ if test "[$]*" = "X"; then -+ # -L didn't work. -+ set X `ls -t $srcdir/configure conftestfile` -+ fi -+ if test "[$]*" != "X $srcdir/configure conftestfile" \ -+ && test "[$]*" != "X conftestfile $srcdir/configure"; then -+ -+ # If neither matched, then we have a broken ls. This can happen -+ # if, for instance, CONFIG_SHELL is bash and it inherits a -+ # broken ls alias from the environment. This has actually -+ # happened. Such a system could not be considered "sane". -+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -+alias in your environment]) -+ fi -+ -+ test "[$]2" = conftestfile -+ ) -+then -+ # Ok. -+ : -+else -+ AC_MSG_ERROR([newly created file is older than distributed files! -+Check your system clock]) -+fi -+rm -f conftest* -+AC_MSG_RESULT(yes)]) -+ -+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) -+dnl The program must properly implement --version. -+AC_DEFUN([AM_MISSING_PROG], -+[AC_MSG_CHECKING(for working $2) -+# Run test in a subshell; some versions of sh will print an error if -+# an executable is not found, even if stderr is redirected. -+# Redirect stdin to placate older versions of autoconf. Sigh. -+if ($2 --version) < /dev/null > /dev/null 2>&1; then -+ $1=$2 -+ AC_MSG_RESULT(found) -+else -+ $1="$3/missing $2" -+ AC_MSG_RESULT(missing) -+fi -+AC_SUBST($1)]) -+ -+# Like AC_CONFIG_HEADER, but automatically create stamp file. -+ -+AC_DEFUN([AM_CONFIG_HEADER], -+[AC_PREREQ([2.12]) -+AC_CONFIG_HEADER([$1]) -+dnl When config.status generates a header, we must update the stamp-h file. -+dnl This file resides in the same directory as the config header -+dnl that is generated. We must strip everything past the first ":", -+dnl and everything past the last "/". -+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl -+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, -+<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, -+<>; do -+ case " <<$>>CONFIG_HEADERS " in -+ *" <<$>>am_file "*<<)>> -+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx -+ ;; -+ esac -+ am_indx=`expr "<<$>>am_indx" + 1` -+done<<>>dnl>>) -+changequote([,]))]) - --# Save cache, so that ltconfig can load it --AC_CACHE_SAVE -+# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- - --# Actually configure libtool. ac_aux_dir is where install-sh is found. --CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ --LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ --LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ --DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ --${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ --$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ --|| AC_MSG_ERROR([libtool configure failed]) -+# serial 46 AC_PROG_LIBTOOL - --# Reload cache, that may have been modified by ltconfig --AC_CACHE_LOAD -+AC_DEFUN([AC_PROG_LIBTOOL], -+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - - # This can be used to rebuild libtool when needed --LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" -+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - - # Always use our own libtool. - LIBTOOL='$(SHELL) $(top_builddir)/libtool' - AC_SUBST(LIBTOOL)dnl - --# Redirect the config.log output again, so that the ltconfig log is not --# clobbered by the next message. --exec 5>>./config.log -+# Prevent multiple expansion -+define([AC_PROG_LIBTOOL], []) - ]) - --AC_DEFUN(AC_LIBTOOL_SETUP, -+AC_DEFUN([AC_LIBTOOL_SETUP], - [AC_PREREQ(2.13)dnl - AC_REQUIRE([AC_ENABLE_SHARED])dnl - AC_REQUIRE([AC_ENABLE_STATIC])dnl - AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([AC_CANONICAL_BUILD])dnl --AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_LD])dnl -+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl - AC_REQUIRE([AC_PROG_NM])dnl -+AC_REQUIRE([LT_AC_PROG_SED])dnl -+ - AC_REQUIRE([AC_PROG_LN_S])dnl -+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -+AC_REQUIRE([AC_OBJEXT])dnl -+AC_REQUIRE([AC_EXEEXT])dnl - dnl - --case "$target" in --NONE) lt_target="$host" ;; --*) lt_target="$target" ;; -+_LT_AC_PROG_ECHO_BACKSLASH -+# Only perform the check for file, if the check method requires it -+case $deplibs_check_method in -+file_magic*) -+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then -+ AC_PATH_MAGIC -+ fi -+ ;; - esac - --# Check for any special flags to pass to ltconfig. --libtool_flags="--cache-file=$cache_file" --test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" --test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" --test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" --test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" --test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" --ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], --[libtool_flags="$libtool_flags --enable-dlopen"]) -+AC_CHECK_TOOL(RANLIB, ranlib, :) -+AC_CHECK_TOOL(STRIP, strip, :) -+ -+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) - ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], --[libtool_flags="$libtool_flags --enable-win32-dll"]) -+enable_win32_dll=yes, enable_win32_dll=no) -+ - AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) --test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" --test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" -+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -+ -+# Some flags need to be propagated to the compiler or linker for good -+# libtool support. -+case $host in -+*-*-irix6*) -+ # Find out which ABI we are using. -+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext -+ if AC_TRY_EVAL(ac_compile); then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *32-bit*) -+ LD="${LD-ld} -32" -+ ;; -+ *N32*) -+ LD="${LD-ld} -n32" -+ ;; -+ *64-bit*) -+ LD="${LD-ld} -64" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ -+*-*-sco3.2v5*) -+ # On SCO OpenServer 5, we need -belf to get full-featured binaries. -+ SAVE_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -belf" -+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, -+ [AC_LANG_SAVE -+ AC_LANG_C -+ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) -+ AC_LANG_RESTORE]) -+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then -+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -+ CFLAGS="$SAVE_CFLAGS" -+ fi -+ ;; -+ -+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -+[*-*-cygwin* | *-*-mingw* | *-*-pw32*) -+ AC_CHECK_TOOL(DLLTOOL, dlltool, false) -+ AC_CHECK_TOOL(AS, as, false) -+ AC_CHECK_TOOL(OBJDUMP, objdump, false) -+ -+ # recent cygwin and mingw systems supply a stub DllMain which the user -+ # can override, but on older systems we have to supply one -+ AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, -+ [AC_TRY_LINK([], -+ [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); -+ DllMain (0, 0, 0);], -+ [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) -+ -+ case $host/$CC in -+ *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) -+ # old mingw systems require "-dll" to link a DLL, while more recent ones -+ # require "-mdll" -+ SAVE_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -mdll" -+ AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, -+ [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) -+ CFLAGS="$SAVE_CFLAGS" ;; -+ *-*-cygwin* | *-*-pw32*) -+ # cygwin systems need to pass --dll to the linker, and not link -+ # crt.o which will require a WinMain@16 definition. -+ lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; -+ esac -+ ;; -+ ]) -+esac -+ -+_LT_AC_LTCONFIG_HACK -+ -+]) -+ -+# AC_LIBTOOL_HEADER_ASSERT -+# ------------------------ -+AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], -+[AC_CACHE_CHECK([whether $CC supports assert without backlinking], -+ [lt_cv_func_assert_works], -+ [case $host in -+ *-*-solaris*) -+ if test "$GCC" = yes && test "$with_gnu_ld" != yes; then -+ case `$CC --version 2>/dev/null` in -+ [[12]].*) lt_cv_func_assert_works=no ;; -+ *) lt_cv_func_assert_works=yes ;; -+ esac -+ fi -+ ;; -+ esac]) -+ -+if test "x$lt_cv_func_assert_works" = xyes; then -+ AC_CHECK_HEADERS(assert.h) -+fi -+])# AC_LIBTOOL_HEADER_ASSERT -+ -+# _LT_AC_CHECK_DLFCN -+# -------------------- -+AC_DEFUN([_LT_AC_CHECK_DLFCN], -+[AC_CHECK_HEADERS(dlfcn.h) -+])# _LT_AC_CHECK_DLFCN -+ -+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -+# --------------------------------- -+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -+[AC_REQUIRE([AC_CANONICAL_HOST]) -+AC_REQUIRE([AC_PROG_NM]) -+AC_REQUIRE([AC_OBJEXT]) -+# Check for command to grab the raw symbol name followed by C symbol from nm. -+AC_MSG_CHECKING([command to parse $NM output]) -+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl -+ -+# These are sane defaults that work on at least a few old systems. -+# [They come from Ultrix. What could be older than Ultrix?!! ;)] -+ -+# Character class describing NM global symbol codes. -+symcode='[[BCDEGRST]]' -+ -+# Regexp to match symbols that can be accessed directly from C. -+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -+ -+# Transform the above into a raw symbol and a C symbol. -+symxfrm='\1 \2\3 \3' -+ -+# Transform an extracted symbol line into a proper C declaration -+lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" -+ -+# Transform an extracted symbol line into symbol name and symbol address -+lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ -+# Define system-specific variables. -+case $host_os in -+aix*) -+ symcode='[[BCDT]]' -+ ;; -+cygwin* | mingw* | pw32*) -+ symcode='[[ABCDGISTW]]' -+ ;; -+hpux*) # Its linker distinguishes data from code symbols -+ lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -+ lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ ;; -+irix* | nonstopux*) -+ symcode='[[BCDEGRST]]' -+ ;; -+osf*) -+ symcode='[[BCDEGQRST]]' -+ ;; -+solaris* | sysv5*) -+ symcode='[[BDT]]' -+ ;; -+sysv4) -+ symcode='[[DFNSTU]]' -+ ;; -+esac -+ -+# Handle CRLF in mingw tool chain -+opt_cr= -+case $host_os in -+mingw*) -+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp -+ ;; -+esac -+ -+# If we're using GNU nm, then use its standard symbol codes. -+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then -+ symcode='[[ABCDGISTW]]' -+fi -+ -+# Try without a prefix undercore, then with it. -+for ac_symprfx in "" "_"; do -+ -+ # Write the raw and C identifiers. -+lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" -+ -+ # Check to see that the pipe works correctly. -+ pipe_works=no -+ rm -f conftest* -+ cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then -+ # Try sorting and uniquifying the output. -+ if sort "$nlist" | uniq > "$nlist"T; then -+ mv -f "$nlist"T "$nlist" -+ else -+ rm -f "$nlist"T -+ fi -+ -+ # Make sure that we snagged all the symbols we need. -+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then -+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then -+ cat < conftest.$ac_ext -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+EOF -+ # Now generate the symbol file. -+ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' -+ -+ cat <> conftest.$ac_ext -+#if defined (__STDC__) && __STDC__ -+# define lt_ptr void * -+#else -+# define lt_ptr char * -+# define const -+#endif -+ -+/* The mapping between symbol names and symbols. */ -+const struct { -+ const char *name; -+ lt_ptr address; -+} -+lt_preloaded_symbols[[]] = -+{ -+EOF -+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext -+ cat <<\EOF >> conftest.$ac_ext -+ {0, (lt_ptr) 0} -+}; -+ -+#ifdef __cplusplus -+} -+#endif -+EOF -+ # Now try linking the two files. -+ mv conftest.$ac_objext conftstm.$ac_objext -+ save_LIBS="$LIBS" -+ save_CFLAGS="$CFLAGS" -+ LIBS="conftstm.$ac_objext" -+ CFLAGS="$CFLAGS$no_builtin_flag" -+ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then -+ pipe_works=yes -+ fi -+ LIBS="$save_LIBS" -+ CFLAGS="$save_CFLAGS" -+ else -+ echo "cannot find nm_test_func in $nlist" >&AC_FD_CC -+ fi -+ else -+ echo "cannot find nm_test_var in $nlist" >&AC_FD_CC -+ fi -+ else -+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC -+ fi -+ else -+ echo "$progname: failed program was:" >&AC_FD_CC -+ cat conftest.$ac_ext >&5 -+ fi -+ rm -f conftest* conftst* -+ -+ # Do not use the global_symbol_pipe unless it works. -+ if test "$pipe_works" = yes; then -+ break -+ else -+ lt_cv_sys_global_symbol_pipe= -+ fi -+done -+]) -+global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" -+if test -z "$lt_cv_sys_global_symbol_pipe"; then -+ global_symbol_to_cdecl= -+ global_symbol_to_c_name_address= -+else -+ global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" -+ global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" -+fi -+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; -+then -+ AC_MSG_RESULT(failed) -+else -+ AC_MSG_RESULT(ok) -+fi -+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -+ -+# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR -+# --------------------------------- -+AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], -+[# Find the correct PATH separator. Usually this is `:', but -+# DJGPP uses `;' like DOS. -+if test "X${PATH_SEPARATOR+set}" != Xset; then -+ UNAME=${UNAME-`uname 2>/dev/null`} -+ case X$UNAME in -+ *-DOS) lt_cv_sys_path_separator=';' ;; -+ *) lt_cv_sys_path_separator=':' ;; -+ esac -+ PATH_SEPARATOR=$lt_cv_sys_path_separator -+fi -+])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR -+ -+# _LT_AC_PROG_ECHO_BACKSLASH -+# -------------------------- -+# Add some code to the start of the generated configure script which -+# will find an echo command which doesn't interpret backslashes. -+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -+[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], -+ [AC_DIVERT_PUSH(NOTICE)]) -+_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR -+ -+# Check that we are running under the correct shell. -+SHELL=${CONFIG_SHELL-/bin/sh} -+ -+case X$ECHO in -+X*--fallback-echo) -+ # Remove one level of quotation (which was required for Make). -+ ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` -+ ;; -+esac -+ -+echo=${ECHO-echo} -+if test "X[$]1" = X--no-reexec; then -+ # Discard the --no-reexec flag, and continue. -+ shift -+elif test "X[$]1" = X--fallback-echo; then -+ # Avoid inline document here, it may be left over -+ : -+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then -+ # Yippee, $echo works! -+ : -+else -+ # Restart under the correct shell. -+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -+fi -+ -+if test "X[$]1" = X--fallback-echo; then -+ # used as fallback echo -+ shift -+ cat </dev/null && -+ echo_test_string="`eval $cmd`" && -+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null -+ then -+ break -+ fi -+ done -+fi -+ -+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ : -+else -+ # The Solaris, AIX, and Digital Unix default echo programs unquote -+ # backslashes. This makes it impossible to quote backslashes using -+ # echo "$something" | sed 's/\\/\\\\/g' -+ # -+ # So, first we look for a working echo in the user's PATH. -+ -+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for dir in $PATH /usr/ucb; do -+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && -+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ echo="$dir/echo" -+ break -+ fi -+ done -+ IFS="$save_ifs" -+ -+ if test "X$echo" = Xecho; then -+ # We didn't find a better echo, so look for alternatives. -+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ # This shell has a builtin print -r that does the trick. -+ echo='print -r' -+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && -+ test "X$CONFIG_SHELL" != X/bin/ksh; then -+ # If we have ksh, try running configure again with it. -+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -+ export ORIGINAL_CONFIG_SHELL -+ CONFIG_SHELL=/bin/ksh -+ export CONFIG_SHELL -+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} -+ else -+ # Try using printf. -+ echo='printf %s\n' -+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ # Cool, printf works -+ : -+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && -+ test "X$echo_testing_string" = 'X\t' && -+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL -+ export CONFIG_SHELL -+ SHELL="$CONFIG_SHELL" -+ export SHELL -+ echo="$CONFIG_SHELL [$]0 --fallback-echo" -+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && -+ test "X$echo_testing_string" = 'X\t' && -+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ echo="$CONFIG_SHELL [$]0 --fallback-echo" -+ else -+ # maybe with a smaller string... -+ prev=: -+ -+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do -+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null -+ then -+ break -+ fi -+ prev="$cmd" -+ done -+ -+ if test "$prev" != 'sed 50q "[$]0"'; then -+ echo_test_string=`eval $prev` -+ export echo_test_string -+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} -+ else -+ # Oops. We lost completely, so just stick with echo. -+ echo=echo -+ fi -+ fi -+ fi -+ fi -+fi -+fi -+ -+# Copy echo and quote the copy suitably for passing to libtool from -+# the Makefile, instead of quoting the original, which is used later. -+ECHO=$echo -+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then -+ ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -+fi -+ -+AC_SUBST(ECHO) -+AC_DIVERT_POP -+])# _LT_AC_PROG_ECHO_BACKSLASH -+ -+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -+# ------------------------------------------------------------------ -+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -+[if test "$cross_compiling" = yes; then : -+ [$4] -+else -+ AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -+ lt_status=$lt_dlunknown -+ cat > conftest.$ac_ext < -+#endif -+ -+#include -+ -+#ifdef RTLD_GLOBAL -+# define LT_DLGLOBAL RTLD_GLOBAL -+#else -+# ifdef DL_GLOBAL -+# define LT_DLGLOBAL DL_GLOBAL -+# else -+# define LT_DLGLOBAL 0 -+# endif -+#endif -+ -+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -+ find out it does not work in some platform. */ -+#ifndef LT_DLLAZY_OR_NOW -+# ifdef RTLD_LAZY -+# define LT_DLLAZY_OR_NOW RTLD_LAZY -+# else -+# ifdef DL_LAZY -+# define LT_DLLAZY_OR_NOW DL_LAZY -+# else -+# ifdef RTLD_NOW -+# define LT_DLLAZY_OR_NOW RTLD_NOW -+# else -+# ifdef DL_NOW -+# define LT_DLLAZY_OR_NOW DL_NOW -+# else -+# define LT_DLLAZY_OR_NOW 0 -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+#ifdef __cplusplus -+extern "C" void exit (int); -+#endif -+ -+void fnord() { int i=42;} -+int main () -+{ -+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -+ int status = $lt_dlunknown; -+ -+ if (self) -+ { -+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -+ /* dlclose (self); */ -+ } -+ -+ exit (status); -+}] -+EOF -+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then -+ (./conftest; exit; ) 2>/dev/null -+ lt_status=$? -+ case x$lt_status in -+ x$lt_dlno_uscore) $1 ;; -+ x$lt_dlneed_uscore) $2 ;; -+ x$lt_unknown|x*) $3 ;; -+ esac -+ else : -+ # compilation failed -+ $3 -+ fi -+fi -+rm -fr conftest* -+])# _LT_AC_TRY_DLOPEN_SELF -+ -+# AC_LIBTOOL_DLOPEN_SELF -+# ------------------- -+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -+[if test "x$enable_dlopen" != xyes; then -+ enable_dlopen=unknown -+ enable_dlopen_self=unknown -+ enable_dlopen_self_static=unknown -+else -+ lt_cv_dlopen=no -+ lt_cv_dlopen_libs= -+ -+ case $host_os in -+ beos*) -+ lt_cv_dlopen="load_add_on" -+ lt_cv_dlopen_libs= -+ lt_cv_dlopen_self=yes -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ lt_cv_dlopen="LoadLibrary" -+ lt_cv_dlopen_libs= -+ ;; -+ -+ *) -+ AC_CHECK_FUNC([shl_load], -+ [lt_cv_dlopen="shl_load"], -+ [AC_CHECK_LIB([dld], [shl_load], -+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], -+ [AC_CHECK_FUNC([dlopen], -+ [lt_cv_dlopen="dlopen"], -+ [AC_CHECK_LIB([dl], [dlopen], -+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], -+ [AC_CHECK_LIB([svld], [dlopen], -+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], -+ [AC_CHECK_LIB([dld], [dld_link], -+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) -+ ]) -+ ]) -+ ]) -+ ]) -+ ]) -+ ;; -+ esac -+ -+ if test "x$lt_cv_dlopen" != xno; then -+ enable_dlopen=yes -+ else -+ enable_dlopen=no -+ fi -+ -+ case $lt_cv_dlopen in -+ dlopen) -+ save_CPPFLAGS="$CPPFLAGS" -+ AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -+ -+ save_LDFLAGS="$LDFLAGS" -+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -+ -+ save_LIBS="$LIBS" -+ LIBS="$lt_cv_dlopen_libs $LIBS" -+ -+ AC_CACHE_CHECK([whether a program can dlopen itself], -+ lt_cv_dlopen_self, [dnl -+ _LT_AC_TRY_DLOPEN_SELF( -+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, -+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) -+ ]) -+ -+ if test "x$lt_cv_dlopen_self" = xyes; then -+ LDFLAGS="$LDFLAGS $link_static_flag" -+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself], -+ lt_cv_dlopen_self_static, [dnl -+ _LT_AC_TRY_DLOPEN_SELF( -+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, -+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) -+ ]) -+ fi -+ -+ CPPFLAGS="$save_CPPFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+ LIBS="$save_LIBS" -+ ;; -+ esac -+ -+ case $lt_cv_dlopen_self in -+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; -+ *) enable_dlopen_self=unknown ;; -+ esac -+ -+ case $lt_cv_dlopen_self_static in -+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; -+ *) enable_dlopen_self_static=unknown ;; -+ esac -+fi -+])# AC_LIBTOOL_DLOPEN_SELF -+ -+AC_DEFUN([_LT_AC_LTCONFIG_HACK], -+[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl -+# Sed substitution that helps us do robust quoting. It backslashifies -+# metacharacters that are still active within double-quoted strings. -+Xsed='sed -e s/^X//' -+sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' -+ -+# Same as above, but do not quote variable references. -+double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' -+ -+# Sed substitution to delay expansion of an escaped shell variable in a -+# double_quote_subst'ed string. -+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -+ -+# Constants: -+rm="rm -f" -+ -+# Global variables: -+default_ofile=libtool -+can_build_shared=yes -+ -+# All known linkers require a `.a' archive for static linking (except M$VC, -+# which needs '.lib'). -+libext=a -+ltmain="$ac_aux_dir/ltmain.sh" -+ofile="$default_ofile" -+with_gnu_ld="$lt_cv_prog_gnu_ld" -+need_locks="$enable_libtool_lock" -+ -+old_CC="$CC" -+old_CFLAGS="$CFLAGS" -+ -+# Set sane defaults for various variables -+test -z "$AR" && AR=ar -+test -z "$AR_FLAGS" && AR_FLAGS=cru -+test -z "$AS" && AS=as -+test -z "$CC" && CC=cc -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+test -z "$LD" && LD=ld -+test -z "$LN_S" && LN_S="ln -s" -+test -z "$MAGIC_CMD" && MAGIC_CMD=file -+test -z "$NM" && NM=nm -+test -z "$OBJDUMP" && OBJDUMP=objdump -+test -z "$RANLIB" && RANLIB=: -+test -z "$STRIP" && STRIP=: -+test -z "$ac_objext" && ac_objext=o -+ -+if test x"$host" != x"$build"; then -+ ac_tool_prefix=${host_alias}- -+else -+ ac_tool_prefix= -+fi -+ -+# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -+case $host_os in -+linux-gnu*) ;; -+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -+esac -+ -+case $host_os in -+aix3*) -+ # AIX sometimes has problems with the GCC collect2 program. For some -+ # reason, if we set the COLLECT_NAMES environment variable, the problems -+ # vanish in a puff of smoke. -+ if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+ fi -+ ;; -+esac -+ -+# Determine commands to create old-style static archives. -+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -+old_postinstall_cmds='chmod 644 $oldlib' -+old_postuninstall_cmds= -+ -+if test -n "$RANLIB"; then -+ case $host_os in -+ openbsd*) -+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" -+ ;; -+ *) -+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -+ ;; -+ esac -+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -+fi -+ -+# Allow CC to be a program name with arguments. -+set dummy $CC -+compiler="[$]2" -+ -+AC_MSG_CHECKING([for objdir]) -+rm -f .libs 2>/dev/null -+mkdir .libs 2>/dev/null -+if test -d .libs; then -+ objdir=.libs -+else -+ # MS-DOS does not allow filenames that begin with a dot. -+ objdir=_libs -+fi -+rmdir .libs 2>/dev/null -+AC_MSG_RESULT($objdir) -+ -+ -+AC_ARG_WITH(pic, -+[ --with-pic try to use only PIC/non-PIC objects [default=use both]], -+pic_mode="$withval", pic_mode=default) -+test -z "$pic_mode" && pic_mode=default -+ -+# We assume here that the value for lt_cv_prog_cc_pic will not be cached -+# in isolation, and that seeing it set (from the cache) indicates that -+# the associated values are set (in the cache) correctly too. -+AC_MSG_CHECKING([for $compiler option to produce PIC]) -+AC_CACHE_VAL(lt_cv_prog_cc_pic, -+[ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_shlib= -+ lt_cv_prog_cc_wl= -+ lt_cv_prog_cc_static= -+ lt_cv_prog_cc_no_builtin= -+ lt_cv_prog_cc_can_build_shared=$can_build_shared -+ -+ if test "$GCC" = yes; then -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-static' -+ -+ case $host_os in -+ aix*) -+ # Below there is a dirty hack to force normal static linking with -ldl -+ # The problem is because libdl dynamically linked with both libc and -+ # libC (AIX C++ library), which obviously doesn't included in libraries -+ # list by gcc. This cause undefined symbols with -static flags. -+ # This hack allows C programs to be linked with "-static -ldl", but -+ # not sure about C++ programs. -+ lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" -+ ;; -+ amigaos*) -+ # FIXME: we need at least 68020 code to build shared libraries, but -+ # adding the `-m68020' flag to GCC prevents building anything better, -+ # like `-m68040'. -+ lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' -+ ;; -+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -+ # PIC is the default for these OSes. -+ ;; -+ darwin* | rhapsody*) -+ # PIC is the default on this platform -+ # Common symbols not allowed in MH_DYLIB files -+ lt_cv_prog_cc_pic='-fno-common' -+ ;; -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' -+ ;; -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ lt_cv_prog_cc_pic=-Kconform_pic -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic='-fPIC' -+ ;; -+ esac -+ else -+ # PORTME Check for PIC flags for the system compiler. -+ case $host_os in -+ aix3* | aix4* | aix5*) -+ lt_cv_prog_cc_wl='-Wl,' -+ # All AIX code is PIC. -+ if test "$host_cpu" = ia64; then -+ # AIX 5 now supports IA64 processor -+ lt_cv_prog_cc_static='-Bstatic' -+ else -+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' -+ fi -+ ;; -+ -+ hpux9* | hpux10* | hpux11*) -+ # Is there a better lt_cv_prog_cc_static that works with the bundled CC? -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" -+ lt_cv_prog_cc_pic='+Z' -+ ;; -+ -+ irix5* | irix6* | nonstopux*) -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' -+ # PIC (with -KPIC) is the default. -+ ;; -+ -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' -+ ;; -+ -+ newsos6) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ ;; -+ -+ osf3* | osf4* | osf5*) -+ # All OSF/1 code is PIC. -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' -+ ;; -+ -+ sco3.2v5*) -+ lt_cv_prog_cc_pic='-Kpic' -+ lt_cv_prog_cc_static='-dn' -+ lt_cv_prog_cc_shlib='-belf' -+ ;; -+ -+ solaris*) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ sunos4*) -+ lt_cv_prog_cc_pic='-PIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Qoption ld ' -+ ;; -+ -+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ uts4*) -+ lt_cv_prog_cc_pic='-pic' -+ lt_cv_prog_cc_static='-Bstatic' -+ ;; -+ -+ sysv4*MP*) -+ if test -d /usr/nec ;then -+ lt_cv_prog_cc_pic='-Kconform_pic' -+ lt_cv_prog_cc_static='-Bstatic' -+ fi -+ ;; -+ -+ *) -+ lt_cv_prog_cc_can_build_shared=no -+ ;; -+ esac -+ fi -+]) -+if test -z "$lt_cv_prog_cc_pic"; then -+ AC_MSG_RESULT([none]) -+else -+ AC_MSG_RESULT([$lt_cv_prog_cc_pic]) -+ -+ # Check to make sure the pic_flag actually works. -+ AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) -+ AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" -+ AC_TRY_COMPILE([], [], [dnl -+ case $host_os in -+ hpux9* | hpux10* | hpux11*) -+ # On HP-UX, both CC and GCC only warn that PIC is supported... then -+ # they create non-PIC objects. So, if there were any warnings, we -+ # assume that PIC is not supported. -+ if test -s conftest.err; then -+ lt_cv_prog_cc_pic_works=no -+ else -+ lt_cv_prog_cc_pic_works=yes -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic_works=yes -+ ;; -+ esac -+ ], [dnl -+ lt_cv_prog_cc_pic_works=no -+ ]) -+ CFLAGS="$save_CFLAGS" -+ ]) -+ -+ if test "X$lt_cv_prog_cc_pic_works" = Xno; then -+ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_can_build_shared=no -+ else -+ lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" -+ fi -+ -+ AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) -+fi -+ -+# Check for any special shared library compilation flags. -+if test -n "$lt_cv_prog_cc_shlib"; then -+ AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) -+ if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : -+ else -+ AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) -+ lt_cv_prog_cc_can_build_shared=no -+ fi -+fi -+ -+AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) -+AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl -+ lt_cv_prog_cc_static_works=no -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" -+ AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) -+ LDFLAGS="$save_LDFLAGS" -+]) -+ -+# Belt *and* braces to stop my trousers falling down: -+test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= -+AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) -+ -+pic_flag="$lt_cv_prog_cc_pic" -+special_shlib_compile_flags="$lt_cv_prog_cc_shlib" -+wl="$lt_cv_prog_cc_wl" -+link_static_flag="$lt_cv_prog_cc_static" -+no_builtin_flag="$lt_cv_prog_cc_no_builtin" -+can_build_shared="$lt_cv_prog_cc_can_build_shared" -+ -+ -+# Check to see if options -o and -c are simultaneously supported by compiler -+AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) -+AC_CACHE_VAL([lt_cv_compiler_c_o], [ -+$rm -r conftest 2>/dev/null -+mkdir conftest -+cd conftest -+echo "int some_variable = 0;" > conftest.$ac_ext -+mkdir out -+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -+# that will create temporary files in the current directory regardless of -+# the output directory. Thus, making CWD read-only will cause this test -+# to fail, enabling locking or at least warning the user not to do parallel -+# builds. -+chmod -w . -+save_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" -+compiler_c_o=no -+if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s out/conftest.err; then -+ lt_cv_compiler_c_o=no -+ else -+ lt_cv_compiler_c_o=yes -+ fi -+else -+ # Append any errors to the config.log. -+ cat out/conftest.err 1>&AC_FD_CC -+ lt_cv_compiler_c_o=no -+fi -+CFLAGS="$save_CFLAGS" -+chmod u+w . -+$rm conftest* out/* -+rmdir out -+cd .. -+rmdir conftest -+$rm -r conftest 2>/dev/null -+]) -+compiler_c_o=$lt_cv_compiler_c_o -+AC_MSG_RESULT([$compiler_c_o]) -+ -+if test x"$compiler_c_o" = x"yes"; then -+ # Check to see if we can write to a .lo -+ AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) -+ AC_CACHE_VAL([lt_cv_compiler_o_lo], [ -+ lt_cv_compiler_o_lo=no -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -c -o conftest.lo" -+ save_objext="$ac_objext" -+ ac_objext=lo -+ AC_TRY_COMPILE([], [int some_variable = 0;], [dnl -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ lt_cv_compiler_o_lo=no -+ else -+ lt_cv_compiler_o_lo=yes -+ fi -+ ]) -+ ac_objext="$save_objext" -+ CFLAGS="$save_CFLAGS" -+ ]) -+ compiler_o_lo=$lt_cv_compiler_o_lo -+ AC_MSG_RESULT([$compiler_o_lo]) -+else -+ compiler_o_lo=no -+fi -+ -+# Check to see if we can do hard links to lock some files if needed -+hard_links="nottested" -+if test "$compiler_c_o" = no && test "$need_locks" != no; then -+ # do not overwrite the value of need_locks provided by the user -+ AC_MSG_CHECKING([if we can lock with hard links]) -+ hard_links=yes -+ $rm conftest* -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ touch conftest.a -+ ln conftest.a conftest.b 2>&5 || hard_links=no -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ AC_MSG_RESULT([$hard_links]) -+ if test "$hard_links" = no; then -+ AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) -+ need_locks=warn -+ fi -+else -+ need_locks=no -+fi -+ -+if test "$GCC" = yes; then -+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler -+ AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) -+ echo "int some_variable = 0;" > conftest.$ac_ext -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" -+ compiler_rtti_exceptions=no -+ AC_TRY_COMPILE([], [int some_variable = 0;], [dnl -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ compiler_rtti_exceptions=no -+ else -+ compiler_rtti_exceptions=yes -+ fi -+ ]) -+ CFLAGS="$save_CFLAGS" -+ AC_MSG_RESULT([$compiler_rtti_exceptions]) -+ -+ if test "$compiler_rtti_exceptions" = "yes"; then -+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' -+ else -+ no_builtin_flag=' -fno-builtin' -+ fi -+fi -+ -+# See if the linker supports building shared libraries. -+AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) -+ -+allow_undefined_flag= -+no_undefined_flag= -+need_lib_prefix=unknown -+need_version=unknown -+# when you set need_version to no, make sure it does not cause -set_version -+# flags to be left without arguments -+archive_cmds= -+archive_expsym_cmds= -+old_archive_from_new_cmds= -+old_archive_from_expsyms_cmds= -+export_dynamic_flag_spec= -+whole_archive_flag_spec= -+thread_safe_flag_spec= -+hardcode_into_libs=no -+hardcode_libdir_flag_spec= -+hardcode_libdir_separator= -+hardcode_direct=no -+hardcode_minus_L=no -+hardcode_shlibpath_var=unsupported -+runpath_var= -+link_all_deplibs=unknown -+always_export_symbols=no -+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -+# include_expsyms should be a list of space-separated symbols to be *always* -+# included in the symbol list -+include_expsyms= -+# exclude_expsyms can be an egrep regular expression of symbols to exclude -+# it will be wrapped by ` (' and `)$', so one must not match beginning or -+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -+# as well as any symbol that contains `d'. -+exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -+# platforms (ab)use it in PIC code, but their linkers get confused if -+# the symbol is explicitly referenced. Since portable code cannot -+# rely on this symbol name, it's probably fine to never include it in -+# preloaded symbol tables. -+extract_expsyms_cmds= -+ -+case $host_os in -+cygwin* | mingw* | pw32*) -+ # FIXME: the MSVC++ port hasn't been tested in a loooong time -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ if test "$GCC" != yes; then -+ with_gnu_ld=no -+ fi -+ ;; -+openbsd*) -+ with_gnu_ld=no -+ ;; -+esac -+ -+ld_shlibs=yes -+if test "$with_gnu_ld" = yes; then -+ # If archive_cmds runs LD, not CC, wlarc should be empty -+ wlarc='${wl}' -+ -+ # See if GNU ld supports shared libraries. -+ case $host_os in -+ aix3* | aix4* | aix5*) -+ # On AIX, the GNU linker is very broken -+ # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. -+ ld_shlibs=no -+ cat <&2 -+ -+*** Warning: the GNU linker, at least up to release 2.9.1, is reported -+*** to be unable to reliably create shared libraries on AIX. -+*** Therefore, libtool is disabling shared libraries support. If you -+*** really care for shared libraries, you may want to modify your PATH -+*** so that a non-GNU linker is found, and then restart. -+ -+EOF -+ ;; -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ -+ # Samuel A. Falvo II reports -+ # that the semantics of dynamic libraries on AmigaOS, at least up -+ # to version 4, is to share data among multiple programs linked -+ # with the same dynamic library. Since this doesn't match the -+ # behavior of shared libraries on other platforms, we can use -+ # them. -+ ld_shlibs=no -+ ;; -+ -+ beos*) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ allow_undefined_flag=unsupported -+ # Joseph Beckenbach says some releases of gcc -+ # support --undefined. This deserves some investigation. FIXME -+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec='-L$libdir' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ -+ extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ -+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ -+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ -+ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ -+ else $CC -o impgen impgen.c ; fi)~ -+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' -+ -+ old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' -+ -+ # cygwin and mingw dlls have different entry points and sets of symbols -+ # to exclude. -+ # FIXME: what about values for MSVC? -+ dll_entry=__cygwin_dll_entry@12 -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ -+ case $host_os in -+ mingw*) -+ # mingw values -+ dll_entry=_DllMainCRTStartup@12 -+ dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ -+ ;; -+ esac -+ -+ # mingw and cygwin differ, and it's simplest to just exclude the union -+ # of the two symbol sets. -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 -+ -+ # recent cygwin and mingw systems supply a stub DllMain which the user -+ # can override, but on older systems we have to supply one (in ltdll.c) -+ if test "x$lt_cv_need_dllmain" = "xyes"; then -+ ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " -+ ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ -+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' -+ else -+ ltdll_obj= -+ ltdll_cmds= -+ fi -+ -+ # Extract the symbol export list from an `--export-all' def file, -+ # then regenerate the def file from the symbol export list, so that -+ # the compiled dll only exports the symbol export list. -+ # Be careful not to strip the DATA tag left be newer dlltools. -+ export_symbols_cmds="$ltdll_cmds"' -+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ -+ sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' -+ -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is. -+ # If DATA tags from a recent dlltool are present, honour them! -+ archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname-def; -+ else -+ echo EXPORTS > $output_objdir/$soname-def; -+ _lt_hint=1; -+ cat $export_symbols | while read symbol; do -+ set dummy \$symbol; -+ case \[$]# in -+ 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; -+ 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; -+ *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; -+ esac; -+ _lt_hint=`expr 1 + \$_lt_hint`; -+ done; -+ fi~ -+ '"$ltdll_cmds"' -+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ -+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ -+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' -+ ;; -+ -+ netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -+ wlarc= -+ else -+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ fi -+ ;; -+ -+ solaris* | sysv5*) -+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then -+ ld_shlibs=no -+ cat <&2 -+ -+*** Warning: The releases 2.8.* of the GNU linker cannot reliably -+*** create shared libraries on Solaris systems. Therefore, libtool -+*** is disabling shared libraries support. We urge you to upgrade GNU -+*** binutils to release 2.9.1 or newer. Another option is to modify -+*** your PATH or compiler configuration so that the native linker is -+*** used, and then restart. -+ -+EOF -+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ -+ sunos4*) -+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ wlarc= -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ *) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ esac -+ -+ if test "$ld_shlibs" = yes; then -+ runpath_var=LD_RUN_PATH -+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' -+ export_dynamic_flag_spec='${wl}--export-dynamic' -+ case $host_os in -+ cygwin* | mingw* | pw32*) -+ # dlltool doesn't understand --whole-archive et. al. -+ whole_archive_flag_spec= -+ ;; -+ *) -+ # ancient GNU ld didn't support --whole-archive et. al. -+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then -+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ else -+ whole_archive_flag_spec= -+ fi -+ ;; -+ esac -+ fi -+else -+ # PORTME fill in a description of your system's linker (not GNU ld) -+ case $host_os in -+ aix3*) -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -+ # Note: this linker hardcodes the directories in LIBPATH if there -+ # are no directories specified by -L. -+ hardcode_minus_L=yes -+ if test "$GCC" = yes && test -z "$link_static_flag"; then -+ # Neither direct hardcoding nor static linking is supported with a -+ # broken collect2. -+ hardcode_direct=unsupported -+ fi -+ ;; -+ -+ aix4* | aix5*) -+ if test "$host_cpu" = ia64; then -+ # On IA64, the linker does run time linking by default, so we don't -+ # have to do anything special. -+ aix_use_runtimelinking=no -+ exp_sym_flag='-Bexport' -+ no_entry_flag="" -+ else -+ aix_use_runtimelinking=no -+ -+ # Test if we are trying to use run time linking or normal -+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we -+ # need to do runtime linking. -+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) -+ for ld_flag in $LDFLAGS; do -+ case $ld_flag in -+ *-brtl*) -+ aix_use_runtimelinking=yes -+ break -+ ;; -+ esac -+ done -+ esac -+ -+ exp_sym_flag='-bexport' -+ no_entry_flag='-bnoentry' -+ fi -+ -+ # When large executables or shared objects are built, AIX ld can -+ # have problems creating the table of contents. If linking a library -+ # or program results in "error TOC overflow" add -mminimal-toc to -+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -+ -+ hardcode_direct=yes -+ archive_cmds='' -+ hardcode_libdir_separator=':' -+ if test "$GCC" = yes; then -+ case $host_os in aix4.[[012]]|aix4.[[012]].*) -+ collect2name=`${CC} -print-prog-name=collect2` -+ if test -f "$collect2name" && \ -+ strings "$collect2name" | grep resolve_lib_name >/dev/null -+ then -+ # We have reworked collect2 -+ hardcode_direct=yes -+ else -+ # We have old collect2 -+ hardcode_direct=unsupported -+ # It fails to find uninstalled libraries when the uninstalled -+ # path is not listed in the libpath. Setting hardcode_minus_L -+ # to unsupported forces relinking -+ hardcode_minus_L=yes -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_libdir_separator= -+ fi -+ esac -+ -+ shared_flag='-shared' -+ else -+ # not using gcc -+ if test "$host_cpu" = ia64; then -+ shared_flag='${wl}-G' -+ else -+ if test "$aix_use_runtimelinking" = yes; then -+ shared_flag='${wl}-G' -+ else -+ shared_flag='${wl}-bM:SRE' -+ fi -+ fi -+ fi -+ -+ # It seems that -bexpall can do strange things, so it is better to -+ # generate a list of symbols to export. -+ always_export_symbols=yes -+ if test "$aix_use_runtimelinking" = yes; then -+ # Warning - without using the other runtime loading flags (-brtl), -+ # -berok will link without error, but may produce a broken library. -+ allow_undefined_flag='-berok' -+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' -+ archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -+ else -+ if test "$host_cpu" = ia64; then -+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' -+ allow_undefined_flag="-z nodefs" -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -+ else -+ hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' -+ # Warning - without using the other run time loading flags, -+ # -berok will link without error, but may produce a broken library. -+ allow_undefined_flag='${wl}-berok' -+ # This is a bit strange, but is similar to how AIX traditionally builds -+ # it's shared libraries. -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname' -+ fi -+ fi -+ ;; -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ # see comment about different semantics on the GNU ld section -+ ld_shlibs=no -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' -+ fix_srcfile_path='`cygpath -w "$srcfile"`' -+ ;; -+ -+ darwin* | rhapsody*) -+ case "$host_os" in -+ rhapsody* | darwin1.[[012]]) -+ allow_undefined_flag='-undefined suppress' -+ ;; -+ *) # Darwin 1.3 on -+ allow_undefined_flag='-flat_namespace -undefined suppress' -+ ;; -+ esac -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles -+ # `"' quotes if we put them in here... so don't! -+ archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' -+ # We need to add '_' to the symbols in $export_symbols first -+ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ whole_archive_flag_spec='-all_load $convenience' -+ ;; -+ -+ freebsd1*) -+ ld_shlibs=no -+ ;; -+ -+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -+ # support. Future versions do this automatically, but an explicit c++rt0.o -+ # does not break anything, and helps significantly (at the cost of a little -+ # extra space). -+ freebsd2.2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ # Unfortunately, older versions of FreeBSD 2 do not have this feature. -+ freebsd2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -+ freebsd*) -+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ hpux9* | hpux10* | hpux11*) -+ case $host_os in -+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; -+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; -+ esac -+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_direct=yes -+ hardcode_minus_L=yes # Not in the search PATH, but as the default -+ # location of the library. -+ export_dynamic_flag_spec='${wl}-E' -+ ;; -+ -+ irix5* | irix6* | nonstopux*) -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ link_all_deplibs=yes -+ ;; -+ -+ netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -+ else -+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -+ fi -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ newsos6) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_shlibpath_var=no -+ ;; -+ -+ openbsd*) -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ export_dynamic_flag_spec='${wl}-E' -+ else -+ case "$host_os" in -+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ ;; -+ *) -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ ;; -+ esac -+ fi -+ ;; -+ -+ os2*) -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ allow_undefined_flag=unsupported -+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -+ ;; -+ -+ osf3*) -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ fi -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ ;; -+ -+ osf4* | osf5*) # as osf3* with the addition of -msym flag -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' -+ -+ #Both c and cxx compiler support -rpath directly -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ ;; -+ -+ sco3.2v5*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ export_dynamic_flag_spec='${wl}-Bexport' -+ ;; -+ -+ solaris*) -+ # gcc --version < 3.0 without binutils cannot create self contained -+ # shared libraries reliably, requiring libgcc.a to resolve some of -+ # the object symbols generated in some cases. Libraries that use -+ # assert need libgcc.a to resolve __eprintf, for example. Linking -+ # a copy of libgcc.a into every shared library to guarantee resolving -+ # such symbols causes other problems: According to Tim Van Holder -+ # , C++ libraries end up with a separate -+ # (to the application) exception stack for one thing. -+ no_undefined_flag=' -z defs' -+ if test "$GCC" = yes; then -+ case `$CC --version 2>/dev/null` in -+ [[12]].*) -+ cat <&2 -+ -+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably -+*** create self contained shared libraries on Solaris systems, without -+*** introducing a dependency on libgcc.a. Therefore, libtool is disabling -+*** -no-undefined support, which will at least allow you to build shared -+*** libraries. However, you may find that when you link such libraries -+*** into an application without using GCC, you have to manually add -+*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to -+*** upgrade to a newer version of GCC. Another option is to rebuild your -+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. -+ -+EOF -+ no_undefined_flag= -+ ;; -+ esac -+ fi -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_shlibpath_var=no -+ case $host_os in -+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; -+ *) # Supported since Solaris 2.6 (maybe 2.5.1?) -+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; -+ esac -+ link_all_deplibs=yes -+ ;; -+ -+ sunos4*) -+ if test "x$host_vendor" = xsequent; then -+ # Use $CC to link under sequent, because it throws in some extra .o -+ # files that make .init and .fini sections work. -+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -+ fi -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4) -+ case $host_vendor in -+ sni) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes # is this really true??? -+ ;; -+ siemens) -+ ## LD is ld it makes a PLAMLIB -+ ## CC just makes a GrossModule. -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ reload_cmds='$CC -r -o $output$reload_objs' -+ hardcode_direct=no -+ ;; -+ motorola) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie -+ ;; -+ esac -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4.3*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ export_dynamic_flag_spec='-Bexport' -+ ;; -+ -+ sysv5*) -+ no_undefined_flag=' -z text' -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec= -+ hardcode_shlibpath_var=no -+ runpath_var='LD_RUN_PATH' -+ ;; -+ -+ uts4*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ dgux*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ ld_shlibs=yes -+ fi -+ ;; -+ -+ sysv4.2uw2*) -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=no -+ hardcode_shlibpath_var=no -+ hardcode_runpath_var=yes -+ runpath_var=LD_RUN_PATH -+ ;; -+ -+ sysv5uw7* | unixware7*) -+ no_undefined_flag='${wl}-z ${wl}text' -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ fi -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ *) -+ ld_shlibs=no -+ ;; -+ esac -+fi -+AC_MSG_RESULT([$ld_shlibs]) -+test "$ld_shlibs" = no && can_build_shared=no -+ -+# Check hardcoding attributes. -+AC_MSG_CHECKING([how to hardcode library paths into programs]) -+hardcode_action= -+if test -n "$hardcode_libdir_flag_spec" || \ -+ test -n "$runpath_var"; then -+ -+ # We can hardcode non-existant directories. -+ if test "$hardcode_direct" != no && -+ # If the only mechanism to avoid hardcoding is shlibpath_var, we -+ # have to relink, otherwise we might link with an installed library -+ # when we should be linking with a yet-to-be-installed one -+ ## test "$hardcode_shlibpath_var" != no && -+ test "$hardcode_minus_L" != no; then -+ # Linking always hardcodes the temporary library directory. -+ hardcode_action=relink -+ else -+ # We can link without hardcoding, and we can hardcode nonexisting dirs. -+ hardcode_action=immediate -+ fi -+else -+ # We cannot hardcode anything, or else we can only hardcode existing -+ # directories. -+ hardcode_action=unsupported -+fi -+AC_MSG_RESULT([$hardcode_action]) -+ -+striplib= -+old_striplib= -+AC_MSG_CHECKING([whether stripping libraries is possible]) -+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -+ test -z "$striplib" && striplib="$STRIP --strip-unneeded" -+ AC_MSG_RESULT([yes]) -+else -+ AC_MSG_RESULT([no]) -+fi -+ -+reload_cmds='$LD$reload_flag -o $output$reload_objs' -+test -z "$deplibs_check_method" && deplibs_check_method=unknown -+ -+# PORTME Fill in your ld.so characteristics -+AC_MSG_CHECKING([dynamic linker characteristics]) -+library_names_spec= -+libname_spec='lib$name' -+soname_spec= -+postinstall_cmds= -+postuninstall_cmds= -+finish_cmds= -+finish_eval= -+shlibpath_var= -+shlibpath_overrides_runpath=unknown -+version_type=none -+dynamic_linker="$host_os ld.so" -+sys_lib_dlsearch_path_spec="/lib /usr/lib" -+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+ -+case $host_os in -+aix3*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix $libname.a' -+ shlibpath_var=LIBPATH -+ -+ # AIX has no versioning support, so we append a major version to the name. -+ soname_spec='${libname}${release}.so$major' -+ ;; -+ -+aix4* | aix5*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ hardcode_into_libs=yes -+ if test "$host_cpu" = ia64; then -+ # AIX 5 supports IA64 -+ library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ else -+ # With GCC up to 2.95.x, collect2 would create an import file -+ # for dependence libraries. The import file would start with -+ # the line `#! .'. This would cause the generated library to -+ # depend on `.', always an invalid library. This was fixed in -+ # development snapshots of GCC prior to 3.0. -+ case $host_os in -+ aix4 | aix4.[[01]] | aix4.[[01]].*) -+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -+ echo ' yes ' -+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -+ : -+ else -+ can_build_shared=no -+ fi -+ ;; -+ esac -+ # AIX (on Power*) has no versioning support, so currently we can -+ # not hardcode correct soname into executable. Probably we can -+ # add versioning support to collect2, so additional links can -+ # be useful in future. -+ if test "$aix_use_runtimelinking" = yes; then -+ # If using run time linking (on AIX 4.2 or later) use lib.so -+ # instead of lib.a to let people know that these are not -+ # typical AIX shared libraries. -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ else -+ # We preserve .a as extension for shared libraries through AIX4.2 -+ # and later when we are not doing run time linking. -+ library_names_spec='${libname}${release}.a $libname.a' -+ soname_spec='${libname}${release}.so$major' -+ fi -+ shlibpath_var=LIBPATH -+ fi -+ hardcode_into_libs=yes -+ ;; -+ -+amigaos*) -+ library_names_spec='$libname.ixlibrary $libname.a' -+ # Create ${libname}_ixlibrary.a entries in /sys/libs. -+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' -+ ;; -+ -+beos*) -+ library_names_spec='${libname}.so' -+ dynamic_linker="$host_os ld.so" -+ shlibpath_var=LIBRARY_PATH -+ ;; -+ -+bsdi4*) -+ version_type=linux -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -+ export_dynamic_flag_spec=-rdynamic -+ # the default ld.so.conf also contains /usr/contrib/lib and -+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -+ # libtool to hard-code these into programs -+ ;; -+ -+cygwin* | mingw* | pw32*) -+ version_type=windows -+ need_version=no -+ need_lib_prefix=no -+ case $GCC,$host_os in -+ yes,cygwin*) -+ library_names_spec='$libname.dll.a' -+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' -+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog .libs/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $rm \$dlpath' -+ ;; -+ yes,mingw*) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' -+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` -+ ;; -+ yes,pw32*) -+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' -+ ;; -+ *) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' -+ ;; -+ esac -+ dynamic_linker='Win32 ld.exe' -+ # FIXME: first we should search . and the directory the executable is in -+ shlibpath_var=PATH -+ ;; -+ -+darwin* | rhapsody*) -+ dynamic_linker="$host_os dyld" -+ version_type=darwin -+ need_lib_prefix=no -+ need_version=no -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. -+ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' -+ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' -+ shlibpath_overrides_runpath=yes -+ shlibpath_var=DYLD_LIBRARY_PATH -+ ;; -+ -+freebsd1*) -+ dynamic_linker=no -+ ;; -+ -+freebsd*-gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ dynamic_linker='GNU/FreeBSD ld.so' -+ ;; -+ -+freebsd*) -+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` -+ version_type=freebsd-$objformat -+ case $version_type in -+ freebsd-elf*) -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' -+ need_version=no -+ need_lib_prefix=no -+ ;; -+ freebsd-*) -+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' -+ need_version=yes -+ ;; -+ esac -+ shlibpath_var=LD_LIBRARY_PATH -+ case $host_os in -+ freebsd2*) -+ shlibpath_overrides_runpath=yes -+ ;; -+ *) -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ ;; -+ esac -+ ;; -+ -+gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ hardcode_into_libs=yes -+ ;; -+ -+hpux9* | hpux10* | hpux11*) -+ # Give a soname corresponding to the major version so that dld.sl refuses to -+ # link against other versions. -+ dynamic_linker="$host_os dld.sl" -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_var=SHLIB_PATH -+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' -+ soname_spec='${libname}${release}.sl$major' -+ # HP-UX runs *really* slowly unless shared libraries are mode 555. -+ postinstall_cmds='chmod 555 $lib' -+ ;; -+ -+irix5* | irix6* | nonstopux*) -+ case $host_os in -+ nonstopux*) version_type=nonstopux ;; -+ *) version_type=irix ;; -+ esac -+ need_lib_prefix=no -+ need_version=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' -+ case $host_os in -+ irix5* | nonstopux*) -+ libsuff= shlibsuff= -+ ;; -+ *) -+ case $LD in # libtool.m4 will add one of these switches to LD -+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; -+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; -+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; -+ *) libsuff= shlibsuff= libmagic=never-match;; -+ esac -+ ;; -+ esac -+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -+ shlibpath_overrides_runpath=no -+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -+ ;; -+ -+# No shared lib support for Linux oldld, aout, or coff. -+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) -+ dynamic_linker=no -+ ;; -+ -+# This must be Linux ELF. -+linux-gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ -+ # We used to test for /lib/ld.so.1 and disable shared libraries on -+ # powerpc, because MkLinux only supported shared libraries with the -+ # GNU dynamic linker. Since this was broken with cross compilers, -+ # most powerpc-linux boxes support dynamic linking these days and -+ # people can always --disable-shared, the test was removed, and we -+ # assume the GNU/Linux dynamic linker is in use. -+ dynamic_linker='GNU/Linux ld.so' -+ ;; -+ -+netbsd*) -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ dynamic_linker='NetBSD (a.out) ld.so' -+ else -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' -+ soname_spec='${libname}${release}.so$major' -+ dynamic_linker='NetBSD ld.elf_so' -+ fi -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ hardcode_into_libs=yes -+ ;; -+ -+newsos6) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ ;; -+ -+openbsd*) -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ case "$host_os" in -+ openbsd2.[[89]] | openbsd2.[[89]].*) -+ shlibpath_overrides_runpath=no -+ ;; -+ *) -+ shlibpath_overrides_runpath=yes -+ ;; -+ esac -+ else -+ shlibpath_overrides_runpath=yes -+ fi -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+os2*) -+ libname_spec='$name' -+ need_lib_prefix=no -+ library_names_spec='$libname.dll $libname.a' -+ dynamic_linker='OS/2 ld.exe' -+ shlibpath_var=LIBPATH -+ ;; -+ -+osf3* | osf4* | osf5*) -+ version_type=osf -+ need_version=no -+ need_lib_prefix=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -+ hardcode_into_libs=yes -+ ;; -+ -+sco3.2v5*) -+ version_type=osf -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+solaris*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ hardcode_into_libs=yes -+ # ldd complains unless libraries are executable -+ postinstall_cmds='chmod +x $lib' -+ ;; -+ -+sunos4*) -+ version_type=sunos -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ if test "$with_gnu_ld" = yes; then -+ need_lib_prefix=no -+ fi -+ need_version=yes -+ ;; -+ -+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ case $host_vendor in -+ sni) -+ shlibpath_overrides_runpath=no -+ need_lib_prefix=no -+ export_dynamic_flag_spec='${wl}-Blargedynsym' -+ runpath_var=LD_RUN_PATH -+ ;; -+ siemens) -+ need_lib_prefix=no -+ ;; -+ motorola) -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_overrides_runpath=no -+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -+ ;; -+ esac -+ ;; -+ -+uts4*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+dgux*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+sysv4*MP*) -+ if test -d /usr/nec ;then -+ version_type=linux -+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' -+ soname_spec='$libname.so.$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ fi -+ ;; -+ -+*) -+ dynamic_linker=no -+ ;; -+esac -+AC_MSG_RESULT([$dynamic_linker]) -+test "$dynamic_linker" = no && can_build_shared=no -+ -+# Report the final consequences. -+AC_MSG_CHECKING([if libtool supports shared libraries]) -+AC_MSG_RESULT([$can_build_shared]) -+ -+AC_MSG_CHECKING([whether to build shared libraries]) -+test "$can_build_shared" = "no" && enable_shared=no -+ -+# On AIX, shared libraries and static libraries use the same namespace, and -+# are all built from PIC. -+case "$host_os" in -+aix3*) -+ test "$enable_shared" = yes && enable_static=no -+ if test -n "$RANLIB"; then -+ archive_cmds="$archive_cmds~\$RANLIB \$lib" -+ postinstall_cmds='$RANLIB $lib' -+ fi -+ ;; -+ -+aix4*) -+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -+ test "$enable_shared" = yes && enable_static=no -+ fi -+ ;; -+esac -+AC_MSG_RESULT([$enable_shared]) -+ -+AC_MSG_CHECKING([whether to build static libraries]) -+# Make sure either enable_shared or enable_static is yes. -+test "$enable_shared" = yes || enable_static=yes -+AC_MSG_RESULT([$enable_static]) -+ -+if test "$hardcode_action" = relink; then -+ # Fast installation is not supported -+ enable_fast_install=no -+elif test "$shlibpath_overrides_runpath" = yes || -+ test "$enable_shared" = no; then -+ # Fast installation is not necessary -+ enable_fast_install=needless -+fi -+ -+variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -+if test "$GCC" = yes; then -+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -+fi -+ -+AC_LIBTOOL_DLOPEN_SELF -+ -+if test "$enable_shared" = yes && test "$GCC" = yes; then -+ case $archive_cmds in -+ *'~'*) -+ # FIXME: we may have to deal with multi-command sequences. -+ ;; -+ '$CC '*) -+ # Test whether the compiler implicitly links with -lc since on some -+ # systems, -lgcc has to come before -lc. If gcc already passes -lc -+ # to ld, don't add -lc before -lgcc. -+ AC_MSG_CHECKING([whether -lc should be explicitly linked in]) -+ AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], -+ [$rm conftest* -+ echo 'static int dummy;' > conftest.$ac_ext -+ -+ if AC_TRY_EVAL(ac_compile); then -+ soname=conftest -+ lib=conftest -+ libobjs=conftest.$ac_objext -+ deplibs= -+ wl=$lt_cv_prog_cc_wl -+ compiler_flags=-v -+ linker_flags=-v -+ verstring= -+ output_objdir=. -+ libname=conftest -+ save_allow_undefined_flag=$allow_undefined_flag -+ allow_undefined_flag= -+ if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) -+ then -+ lt_cv_archive_cmds_need_lc=no -+ else -+ lt_cv_archive_cmds_need_lc=yes -+ fi -+ allow_undefined_flag=$save_allow_undefined_flag -+ else -+ cat conftest.err 1>&5 -+ fi]) -+ AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) -+ ;; -+ esac -+fi -+need_lc=${lt_cv_archive_cmds_need_lc-yes} -+ -+# The second clause should only fire when bootstrapping the -+# libtool distribution, otherwise you forgot to ship ltmain.sh -+# with your package, and you will get complaints that there are -+# no rules to generate ltmain.sh. -+if test -f "$ltmain"; then -+ : -+else -+ # If there is no Makefile yet, we rely on a make rule to execute -+ # `config.status --recheck' to rerun these tests and create the -+ # libtool script then. -+ test -f Makefile && make "$ltmain" -+fi -+ -+if test -f "$ltmain"; then -+ trap "$rm \"${ofile}T\"; exit 1" 1 2 15 -+ $rm -f "${ofile}T" -+ -+ echo creating $ofile -+ -+ # Now quote all the things that may contain metacharacters while being -+ # careful not to overquote the AC_SUBSTed values. We take copies of the -+ # variables and quote the copies for generation of the libtool script. -+ for var in echo old_CC old_CFLAGS SED \ -+ AR AR_FLAGS CC LD LN_S NM SHELL \ -+ reload_flag reload_cmds wl \ -+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ -+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ -+ library_names_spec soname_spec \ -+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ -+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ -+ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ -+ old_striplib striplib file_magic_cmd export_symbols_cmds \ -+ deplibs_check_method allow_undefined_flag no_undefined_flag \ -+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ -+ global_symbol_to_c_name_address \ -+ hardcode_libdir_flag_spec hardcode_libdir_separator \ -+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do -+ -+ case $var in -+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ -+ old_postinstall_cmds | old_postuninstall_cmds | \ -+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ -+ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ -+ postinstall_cmds | postuninstall_cmds | \ -+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -+ # Double-quote double-evaled strings. -+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" -+ ;; -+ *) -+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" -+ ;; -+ esac -+ done -+ -+ cat <<__EOF__ > "${ofile}T" -+#! $SHELL -+ -+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -+# NOTE: Changes made to this file will be lost: look at ltmain.sh. -+# -+# Copyright (C) 1996-2000 Free Software Foundation, Inc. -+# Originally by Gordon Matzigkeit , 1996 -+# -+# 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. -+# -+# As a special exception to the GNU General Public License, if you -+# distribute this file as part of a program that contains a -+# configuration script generated by Autoconf, you may include it under -+# the same distribution terms that you use for the rest of that program. -+ -+# A sed that does not truncate output. -+SED=$lt_SED -+ -+# Sed that helps us avoid accidentally triggering echo(1) options like -n. -+Xsed="${SED} -e s/^X//" -+ -+# The HP-UX ksh and POSIX shell print the target directory to stdout -+# if CDPATH is set. -+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi -+ -+# ### BEGIN LIBTOOL CONFIG -+ -+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -+ -+# Shell to use when invoking shell scripts. -+SHELL=$lt_SHELL -+ -+# Whether or not to build shared libraries. -+build_libtool_libs=$enable_shared -+ -+# Whether or not to build static libraries. -+build_old_libs=$enable_static -+ -+# Whether or not to add -lc for building shared libraries. -+build_libtool_need_lc=$need_lc -+ -+# Whether or not to optimize for fast installation. -+fast_install=$enable_fast_install -+ -+# The host system. -+host_alias=$host_alias -+host=$host -+ -+# An echo program that does not interpret backslashes. -+echo=$lt_echo -+ -+# The archiver. -+AR=$lt_AR -+AR_FLAGS=$lt_AR_FLAGS -+ -+# The default C compiler. -+CC=$lt_CC -+ -+# Is the compiler the GNU C compiler? -+with_gcc=$GCC -+ -+# The linker used to build libraries. -+LD=$lt_LD -+ -+# Whether we need hard or soft links. -+LN_S=$lt_LN_S -+ -+# A BSD-compatible nm program. -+NM=$lt_NM -+ -+# A symbol stripping program -+STRIP=$STRIP -+ -+# Used to examine libraries when file_magic_cmd begins "file" -+MAGIC_CMD=$MAGIC_CMD -+ -+# Used on cygwin: DLL creation program. -+DLLTOOL="$DLLTOOL" -+ -+# Used on cygwin: object dumper. -+OBJDUMP="$OBJDUMP" -+ -+# Used on cygwin: assembler. -+AS="$AS" -+ -+# The name of the directory that contains temporary libtool files. -+objdir=$objdir -+ -+# How to create reloadable object files. -+reload_flag=$lt_reload_flag -+reload_cmds=$lt_reload_cmds -+ -+# How to pass a linker flag through the compiler. -+wl=$lt_wl -+ -+# Object file suffix (normally "o"). -+objext="$ac_objext" -+ -+# Old archive suffix (normally "a"). -+libext="$libext" -+ -+# Executable file suffix (normally ""). -+exeext="$exeext" -+ -+# Additional compiler flags for building library objects. -+pic_flag=$lt_pic_flag -+pic_mode=$pic_mode -+ -+# Does compiler simultaneously support -c and -o options? -+compiler_c_o=$lt_compiler_c_o -+ -+# Can we write directly to a .lo ? -+compiler_o_lo=$lt_compiler_o_lo -+ -+# Must we lock files when doing compilation ? -+need_locks=$lt_need_locks -+ -+# Do we need the lib prefix for modules? -+need_lib_prefix=$need_lib_prefix -+ -+# Do we need a version for libraries? -+need_version=$need_version -+ -+# Whether dlopen is supported. -+dlopen_support=$enable_dlopen -+ -+# Whether dlopen of programs is supported. -+dlopen_self=$enable_dlopen_self -+ -+# Whether dlopen of statically linked programs is supported. -+dlopen_self_static=$enable_dlopen_self_static -+ -+# Compiler flag to prevent dynamic linking. -+link_static_flag=$lt_link_static_flag -+ -+# Compiler flag to turn off builtin functions. -+no_builtin_flag=$lt_no_builtin_flag -+ -+# Compiler flag to allow reflexive dlopens. -+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec -+ -+# Compiler flag to generate shared objects directly from archives. -+whole_archive_flag_spec=$lt_whole_archive_flag_spec -+ -+# Compiler flag to generate thread-safe objects. -+thread_safe_flag_spec=$lt_thread_safe_flag_spec -+ -+# Library versioning type. -+version_type=$version_type -+ -+# Format of library name prefix. -+libname_spec=$lt_libname_spec -+ -+# List of archive names. First name is the real one, the rest are links. -+# The last name is the one that the linker finds with -lNAME. -+library_names_spec=$lt_library_names_spec -+ -+# The coded name of the library, if different from the real name. -+soname_spec=$lt_soname_spec -+ -+# Commands used to build and install an old-style archive. -+RANLIB=$lt_RANLIB -+old_archive_cmds=$lt_old_archive_cmds -+old_postinstall_cmds=$lt_old_postinstall_cmds -+old_postuninstall_cmds=$lt_old_postuninstall_cmds -+ -+# Create an old-style archive from a shared archive. -+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds -+ -+# Create a temporary old-style archive to link instead of a shared archive. -+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds -+ -+# Commands used to build and install a shared archive. -+archive_cmds=$lt_archive_cmds -+archive_expsym_cmds=$lt_archive_expsym_cmds -+postinstall_cmds=$lt_postinstall_cmds -+postuninstall_cmds=$lt_postuninstall_cmds -+ -+# Commands to strip libraries. -+old_striplib=$lt_old_striplib -+striplib=$lt_striplib -+ -+# Method to check whether dependent libraries are shared objects. -+deplibs_check_method=$lt_deplibs_check_method -+ -+# Command to use when deplibs_check_method == file_magic. -+file_magic_cmd=$lt_file_magic_cmd -+ -+# Flag that allows shared libraries with undefined symbols to be built. -+allow_undefined_flag=$lt_allow_undefined_flag -+ -+# Flag that forces no undefined symbols. -+no_undefined_flag=$lt_no_undefined_flag -+ -+# Commands used to finish a libtool library installation in a directory. -+finish_cmds=$lt_finish_cmds -+ -+# Same as above, but a single script fragment to be evaled but not shown. -+finish_eval=$lt_finish_eval -+ -+# Take the output of nm and produce a listing of raw symbols and C names. -+global_symbol_pipe=$lt_global_symbol_pipe -+ -+# Transform the output of nm in a proper C declaration -+global_symbol_to_cdecl=$lt_global_symbol_to_cdecl -+ -+# Transform the output of nm in a C name address pair -+global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address -+ -+# This is the shared library runtime path variable. -+runpath_var=$runpath_var -+ -+# This is the shared library path variable. -+shlibpath_var=$shlibpath_var -+ -+# Is shlibpath searched before the hard-coded library search path? -+shlibpath_overrides_runpath=$shlibpath_overrides_runpath -+ -+# How to hardcode a shared library path into an executable. -+hardcode_action=$hardcode_action -+ -+# Whether we should hardcode library paths into libraries. -+hardcode_into_libs=$hardcode_into_libs -+ -+# Flag to hardcode \$libdir into a binary during linking. -+# This must work even if \$libdir does not exist. -+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -+ -+# Whether we need a single -rpath flag with a separated argument. -+hardcode_libdir_separator=$lt_hardcode_libdir_separator -+ -+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -+# resulting binary. -+hardcode_direct=$hardcode_direct -+ -+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -+# resulting binary. -+hardcode_minus_L=$hardcode_minus_L -+ -+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -+# the resulting binary. -+hardcode_shlibpath_var=$hardcode_shlibpath_var -+ -+# Variables whose values should be saved in libtool wrapper scripts and -+# restored at relink time. -+variables_saved_for_relink="$variables_saved_for_relink" -+ -+# Whether libtool must link a program against all its dependency libraries. -+link_all_deplibs=$link_all_deplibs -+ -+# Compile-time system search path for libraries -+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -+ -+# Run-time system search path for libraries -+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -+ -+# Fix the shell variable \$srcfile for the compiler. -+fix_srcfile_path="$fix_srcfile_path" -+ -+# Set to yes if exported symbols are required. -+always_export_symbols=$always_export_symbols -+ -+# The commands to list exported symbols. -+export_symbols_cmds=$lt_export_symbols_cmds -+ -+# The commands to extract the exported symbol list from a shared archive. -+extract_expsyms_cmds=$lt_extract_expsyms_cmds -+ -+# Symbols that should not be listed in the preloaded symbols. -+exclude_expsyms=$lt_exclude_expsyms -+ -+# Symbols that must always be exported. -+include_expsyms=$lt_include_expsyms -+ -+# ### END LIBTOOL CONFIG -+ -+__EOF__ -+ -+ case $host_os in -+ aix3*) -+ cat <<\EOF >> "${ofile}T" -+ -+# AIX sometimes has problems with the GCC collect2 program. For some -+# reason, if we set the COLLECT_NAMES environment variable, the problems -+# vanish in a puff of smoke. -+if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+fi -+EOF -+ ;; -+ esac -+ -+ case $host_os in -+ cygwin* | mingw* | pw32* | os2*) -+ cat <<'EOF' >> "${ofile}T" -+ # This is a source program that is used to create dlls on Windows -+ # Don't remove nor modify the starting and closing comments -+# /* ltdll.c starts here */ -+# #define WIN32_LEAN_AND_MEAN -+# #include -+# #undef WIN32_LEAN_AND_MEAN -+# #include -+# -+# #ifndef __CYGWIN__ -+# # ifdef __CYGWIN32__ -+# # define __CYGWIN__ __CYGWIN32__ -+# # endif -+# #endif -+# -+# #ifdef __cplusplus -+# extern "C" { -+# #endif -+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -+# #ifdef __cplusplus -+# } -+# #endif -+# -+# #ifdef __CYGWIN__ -+# #include -+# DECLARE_CYGWIN_DLL( DllMain ); -+# #endif -+# HINSTANCE __hDllInstance_base; -+# -+# BOOL APIENTRY -+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -+# { -+# __hDllInstance_base = hInst; -+# return TRUE; -+# } -+# /* ltdll.c ends here */ -+ # This is a source program that is used to create import libraries -+ # on Windows for dlls which lack them. Don't remove nor modify the -+ # starting and closing comments -+# /* impgen.c starts here */ -+# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. -+# -+# This file is part of GNU libtool. -+# -+# 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 /* for printf() */ -+# #include /* for open(), lseek(), read() */ -+# #include /* for O_RDONLY, O_BINARY */ -+# #include /* for strdup() */ -+# -+# /* O_BINARY isn't required (or even defined sometimes) under Unix */ -+# #ifndef O_BINARY -+# #define O_BINARY 0 -+# #endif -+# -+# static unsigned int -+# pe_get16 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[2]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 2); -+# return b[0] + (b[1]<<8); -+# } -+# -+# static unsigned int -+# pe_get32 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[4]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 4); -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# static unsigned int -+# pe_as32 (ptr) -+# void *ptr; -+# { -+# unsigned char *b = ptr; -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# int -+# main (argc, argv) -+# int argc; -+# char *argv[]; -+# { -+# int dll; -+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -+# unsigned long export_rva, export_size, nsections, secptr, expptr; -+# unsigned long name_rvas, nexp; -+# unsigned char *expdata, *erva; -+# char *filename, *dll_name; -+# -+# filename = argv[1]; -+# -+# dll = open(filename, O_RDONLY|O_BINARY); -+# if (dll < 1) -+# return 1; -+# -+# dll_name = filename; -+# -+# for (i=0; filename[i]; i++) -+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -+# dll_name = filename + i +1; -+# -+# pe_header_offset = pe_get32 (dll, 0x3c); -+# opthdr_ofs = pe_header_offset + 4 + 20; -+# num_entries = pe_get32 (dll, opthdr_ofs + 92); -+# -+# if (num_entries < 1) /* no exports */ -+# return 1; -+# -+# export_rva = pe_get32 (dll, opthdr_ofs + 96); -+# export_size = pe_get32 (dll, opthdr_ofs + 100); -+# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -+# secptr = (pe_header_offset + 4 + 20 + -+# pe_get16 (dll, pe_header_offset + 4 + 16)); -+# -+# expptr = 0; -+# for (i = 0; i < nsections; i++) -+# { -+# char sname[8]; -+# unsigned long secptr1 = secptr + 40 * i; -+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -+# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -+# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -+# lseek(dll, secptr1, SEEK_SET); -+# read(dll, sname, 8); -+# if (vaddr <= export_rva && vaddr+vsize > export_rva) -+# { -+# expptr = fptr + (export_rva - vaddr); -+# if (export_rva + export_size > vaddr + vsize) -+# export_size = vsize - (export_rva - vaddr); -+# break; -+# } -+# } -+# -+# expdata = (unsigned char*)malloc(export_size); -+# lseek (dll, expptr, SEEK_SET); -+# read (dll, expdata, export_size); -+# erva = expdata - export_rva; -+# -+# nexp = pe_as32 (expdata+24); -+# name_rvas = pe_as32 (expdata+32); -+# -+# printf ("EXPORTS\n"); -+# for (i = 0; i conftest.$ac_ext -- if AC_TRY_EVAL(ac_compile); then -- case "`/usr/bin/file conftest.o`" in -- *32-bit*) -- LD="${LD-ld} -32" -- ;; -- *N32*) -- LD="${LD-ld} -n32" -- ;; -- *64-bit*) -- LD="${LD-ld} -64" -- ;; -- esac -- fi -- rm -rf conftest* -- ;; -+EOF -+ ;; -+ esac - --*-*-sco3.2v5*) -- # On SCO OpenServer 5, we need -belf to get full-featured binaries. -- SAVE_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS -belf" -- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, -- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) -- if test x"$lt_cv_cc_needs_belf" != x"yes"; then -- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -- CFLAGS="$SAVE_CFLAGS" -- fi -- ;; -+ # We use sed instead of cat because bash on DJGPP gets confused if -+ # if finds mixed CR/LF and LF-only lines. Since sed operates in -+ # text mode, it properly converts lines to CR/LF. This bash problem -+ # is reportedly fixed, but why not run on old versions too? -+ sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) -+ -+ mv -f "${ofile}T" "$ofile" || \ -+ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") -+ chmod +x "$ofile" -+fi - --ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], --[*-*-cygwin* | *-*-mingw*) -- AC_CHECK_TOOL(DLLTOOL, dlltool, false) -- AC_CHECK_TOOL(AS, as, false) -- AC_CHECK_TOOL(OBJDUMP, objdump, false) -- ;; --]) --esac --]) -+])# _LT_AC_LTCONFIG_HACK - - # AC_LIBTOOL_DLOPEN - enable checks for dlopen support --AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) -+AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - - # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's --AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) -+AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - - # AC_ENABLE_SHARED - implement the --enable-shared flag - # Usage: AC_ENABLE_SHARED[(DEFAULT)] - # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to - # `yes'. --AC_DEFUN(AC_ENABLE_SHARED, [dnl --define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -+AC_DEFUN([AC_ENABLE_SHARED], -+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl - AC_ARG_ENABLE(shared, - changequote(<<, >>)dnl - << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], - changequote([, ])dnl - [p=${PACKAGE-default} --case "$enableval" in -+case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) -@@ -157,21 +3136,22 @@ - ]) - - # AC_DISABLE_SHARED - set the default shared flag to --disable-shared --AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+AC_DEFUN([AC_DISABLE_SHARED], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_ENABLE_SHARED(no)]) - - # AC_ENABLE_STATIC - implement the --enable-static flag - # Usage: AC_ENABLE_STATIC[(DEFAULT)] - # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to - # `yes'. --AC_DEFUN(AC_ENABLE_STATIC, [dnl --define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -+AC_DEFUN([AC_ENABLE_STATIC], -+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl - AC_ARG_ENABLE(static, - changequote(<<, >>)dnl - << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], - changequote([, ])dnl - [p=${PACKAGE-default} --case "$enableval" in -+case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) -@@ -190,7 +3170,8 @@ - ]) - - # AC_DISABLE_STATIC - set the default static flag to --disable-static --AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+AC_DEFUN([AC_DISABLE_STATIC], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_ENABLE_STATIC(no)]) - - -@@ -198,14 +3179,14 @@ - # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] - # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to - # `yes'. --AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl --define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -+AC_DEFUN([AC_ENABLE_FAST_INSTALL], -+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl - AC_ARG_ENABLE(fast-install, - changequote(<<, >>)dnl - << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], - changequote([, ])dnl - [p=${PACKAGE-default} --case "$enableval" in -+case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) -@@ -223,29 +3204,120 @@ - enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl - ]) - --# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install --AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install -+AC_DEFUN([AC_DISABLE_FAST_INSTALL], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_ENABLE_FAST_INSTALL(no)]) - -+# AC_LIBTOOL_PICMODE - implement the --with-pic flag -+# Usage: AC_LIBTOOL_PICMODE[(MODE)] -+# Where MODE is either `yes' or `no'. If omitted, it defaults to -+# `both'. -+AC_DEFUN([AC_LIBTOOL_PICMODE], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+pic_mode=ifelse($#,1,$1,default)]) -+ -+ -+# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library -+AC_DEFUN([AC_PATH_TOOL_PREFIX], -+[AC_MSG_CHECKING([for $1]) -+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -+[case $MAGIC_CMD in -+ /*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. -+ ;; -+ *) -+ ac_save_MAGIC_CMD="$MAGIC_CMD" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+dnl $ac_dummy forces splitting on constant user-supplied paths. -+dnl POSIX.2 word splitting is done only on the output of word expansions, -+dnl not every word. This closes a longstanding sh security hole. -+ ac_dummy="ifelse([$2], , $PATH, [$2])" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/$1; then -+ lt_cv_path_MAGIC_CMD="$ac_dir/$1" -+ if test -n "$file_magic_test_file"; then -+ case $deplibs_check_method in -+ "file_magic "*) -+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" -+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -+ egrep "$file_magic_regex" > /dev/null; then -+ : -+ else -+ cat <&2 -+ -+*** Warning: the command libtool uses to detect shared libraries, -+*** $file_magic_cmd, produces output that libtool cannot recognize. -+*** The result is that libtool may fail to recognize shared libraries -+*** as such. This will affect the creation of libtool libraries that -+*** depend on shared libraries, but programs linked with such libtool -+*** libraries will work regardless of this problem. Nevertheless, you -+*** may want to report the problem to your system manager and/or to -+*** bug-libtool@gnu.org -+ -+EOF -+ fi ;; -+ esac -+ fi -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ MAGIC_CMD="$ac_save_MAGIC_CMD" -+ ;; -+esac]) -+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+if test -n "$MAGIC_CMD"; then -+ AC_MSG_RESULT($MAGIC_CMD) -+else -+ AC_MSG_RESULT(no) -+fi -+]) -+ -+ -+# AC_PATH_MAGIC - find a file program which can recognise a shared library -+AC_DEFUN([AC_PATH_MAGIC], -+[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl -+AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) -+if test -z "$lt_cv_path_MAGIC_CMD"; then -+ if test -n "$ac_tool_prefix"; then -+ AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) -+ else -+ MAGIC_CMD=: -+ fi -+fi -+]) -+ -+ - # AC_PROG_LD - find the path to the GNU or non-GNU linker --AC_DEFUN(AC_PROG_LD, -+AC_DEFUN([AC_PROG_LD], - [AC_ARG_WITH(gnu-ld, - [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], - test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([AC_CANONICAL_BUILD])dnl -+AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl - ac_prog=ld --if test "$ac_cv_prog_gcc" = yes; then -+if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) -- ac_prog=`($CC -print-prog-name=ld) 2>&5` -- case "$ac_prog" in -+ case $host in -+ *-*-mingw*) -+ # gcc leaves a trailing carriage return which upsets mingw -+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -+ *) -+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -+ esac -+ case $ac_prog in - # Accept absolute paths. --changequote(,)dnl -- [\\/]* | [A-Za-z]:[\\/]*) -- re_direlt='/[^/][^/]*/\.\./' --changequote([,])dnl -+ [[\\/]]* | [[A-Za-z]]:[[\\/]]*) -+ re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do -@@ -267,17 +3339,17 @@ - else - AC_MSG_CHECKING([for non-GNU ld]) - fi --AC_CACHE_VAL(ac_cv_path_LD, -+AC_CACHE_VAL(lt_cv_path_LD, - [if test -z "$LD"; then -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- ac_cv_path_LD="$ac_dir/$ac_prog" -+ lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. -- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then -+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break -@@ -286,9 +3358,9 @@ - done - IFS="$ac_save_ifs" - else -- ac_cv_path_LD="$LD" # Let the user override the test with a path. -+ lt_cv_path_LD="$LD" # Let the user override the test with a path. - fi]) --LD="$ac_cv_path_LD" -+LD="$lt_cv_path_LD" - if test -n "$LD"; then - AC_MSG_RESULT($LD) - else -@@ -298,56 +3370,255 @@ - AC_PROG_LD_GNU - ]) - --AC_DEFUN(AC_PROG_LD_GNU, --[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -+# AC_PROG_LD_GNU - -+AC_DEFUN([AC_PROG_LD_GNU], -+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, - [# I'd rather use --version here, but apparently some GNU ld's only accept -v. - if $LD -v 2>&1 &5; then -- ac_cv_prog_gnu_ld=yes -+ lt_cv_prog_gnu_ld=yes - else -- ac_cv_prog_gnu_ld=no -+ lt_cv_prog_gnu_ld=no - fi]) -+with_gnu_ld=$lt_cv_prog_gnu_ld -+]) -+ -+# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker -+# -- PORTME Some linkers may need a different reload flag. -+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], -+[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, -+[lt_cv_ld_reload_flag='-r']) -+reload_flag=$lt_cv_ld_reload_flag -+test -n "$reload_flag" && reload_flag=" $reload_flag" -+]) -+ -+# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies -+# -- PORTME fill in with the dynamic library characteristics -+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -+[AC_CACHE_CHECK([how to recognise dependent libraries], -+lt_cv_deplibs_check_method, -+[lt_cv_file_magic_cmd='$MAGIC_CMD' -+lt_cv_file_magic_test_file= -+lt_cv_deplibs_check_method='unknown' -+# Need to set the preceding variable on all platforms that support -+# interlibrary dependencies. -+# 'none' -- dependencies not supported. -+# `unknown' -- same as none, but documents that we really don't know. -+# 'pass_all' -- all dependencies passed with no checks. -+# 'test_compile' -- check by making test program. -+# 'file_magic [[regex]]' -- check by looking for files in library path -+# which responds to the $file_magic_cmd with a given egrep regex. -+# If you have `file' or equivalent on your system and you're not sure -+# whether `pass_all' will *always* work, you probably want this one. -+ -+case $host_os in -+aix4* | aix5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+beos*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+bsdi4*) -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ lt_cv_file_magic_test_file=/shlib/libc.so -+ ;; -+ -+cygwin* | mingw* | pw32*) -+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ lt_cv_file_magic_cmd='$OBJDUMP -f' -+ ;; -+ -+darwin* | rhapsody*) -+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ case "$host_os" in -+ rhapsody* | darwin1.[[012]]) -+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` -+ ;; -+ *) # Darwin 1.3 on -+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' -+ ;; -+ esac -+ ;; -+ -+freebsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -+ case $host_cpu in -+ i*86 ) -+ # Not sure whether the presence of OpenBSD here was a mistake. -+ # Let's accept both of them until this is cleared up. -+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -+ ;; -+ esac -+ else -+ lt_cv_deplibs_check_method=pass_all -+ fi -+ ;; -+ -+gnu*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+hpux10.20*|hpux11*) -+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=/usr/lib/libc.sl -+ ;; -+ -+irix5* | irix6* | nonstopux*) -+ case $host_os in -+ irix5* | nonstopux*) -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" -+ ;; -+ *) -+ case $LD in -+ *-32|*"-32 ") libmagic=32-bit;; -+ *-n32|*"-n32 ") libmagic=N32;; -+ *-64|*"-64 ") libmagic=64-bit;; -+ *) libmagic=never-match;; -+ esac -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" -+ ;; -+ esac -+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+# This must be Linux ELF. -+linux-gnu*) -+ case $host_cpu in -+ alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) -+ lt_cv_deplibs_check_method=pass_all ;; -+ *) -+ # glibc up to 2.1.1 does not perform some relocations on ARM -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; -+ esac -+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` -+ ;; -+ -+netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -+ lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' -+ else -+ lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' -+ fi -+ ;; -+ -+newos6*) -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=/usr/lib/libnls.so -+ ;; -+ -+openbsd*) -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' -+ else -+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' -+ fi -+ ;; -+ -+osf3* | osf4* | osf5*) -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' -+ lt_cv_file_magic_test_file=/shlib/libc.so -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+sco3.2v5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+solaris*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=/lib/libc.so -+ ;; -+ -+sysv5uw[[78]]* | sysv4*uw2*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ case $host_vendor in -+ motorola) -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` -+ ;; -+ ncr) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ sequent) -+ lt_cv_file_magic_cmd='/bin/file' -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' -+ ;; -+ sni) -+ lt_cv_file_magic_cmd='/bin/file' -+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" -+ lt_cv_file_magic_test_file=/lib/libc.so -+ ;; -+ siemens) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ esac -+ ;; -+esac - ]) -+file_magic_cmd=$lt_cv_file_magic_cmd -+deplibs_check_method=$lt_cv_deplibs_check_method -+]) -+ - - # AC_PROG_NM - find the path to a BSD-compatible name lister --AC_DEFUN(AC_PROG_NM, --[AC_MSG_CHECKING([for BSD-compatible nm]) --AC_CACHE_VAL(ac_cv_path_NM, -+AC_DEFUN([AC_PROG_NM], -+[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl -+AC_MSG_CHECKING([for BSD-compatible nm]) -+AC_CACHE_VAL(lt_cv_path_NM, - [if test -n "$NM"; then - # Let the user override the test. -- ac_cv_path_NM="$NM" -+ lt_cv_path_NM="$NM" - else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then -+ tmp_nm=$ac_dir/${ac_tool_prefix}nm -+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored -- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -- ac_cv_path_NM="$ac_dir/nm -B" -+ # Tru64's nm complains that /dev/null is an invalid object file -+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -B" - break -- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -- ac_cv_path_NM="$ac_dir/nm -p" -+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -p" - break - else -- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but -+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" -- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm - fi]) --NM="$ac_cv_path_NM" -+NM="$lt_cv_path_NM" - AC_MSG_RESULT([$NM]) - ]) - - # AC_CHECK_LIBM - check for math library --AC_DEFUN(AC_CHECK_LIBM, -+AC_DEFUN([AC_CHECK_LIBM], - [AC_REQUIRE([AC_CANONICAL_HOST])dnl - LIBM= --case "$lt_target" in --*-*-beos* | *-*-cygwin*) -+case $host in -+*-*-beos* | *-*-cygwin* | *-*-pw32*) - # These system don't have libm - ;; - *-ncr-sysv4.3*) -@@ -361,33 +3632,41 @@ - ]) - - # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for --# the libltdl convenience library, adds --enable-ltdl-convenience to --# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor --# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed --# to be `${top_builddir}/libltdl'. Make sure you start DIR with --# '${top_builddir}/' (note the single quotes!) if your package is not --# flat, and, if you're not using automake, define top_builddir as --# appropriate in the Makefiles. --AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -- case "$enable_ltdl_convenience" in -+# the libltdl convenience library and LTDLINCL to the include flags for -+# the libltdl header and adds --enable-ltdl-convenience to the -+# configure arguments. Note that LIBLTDL and LTDLINCL are not -+# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not -+# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed -+# with '${top_builddir}/' and LTDLINCL will be prefixed with -+# '${top_srcdir}/' (note the single quotes!). If your package is not -+# flat and you're not using automake, define top_builddir and -+# top_srcdir appropriately in the Makefiles. -+AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+ case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac -- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la -- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la -+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) -+ # For backwards non-gettext consistent compatibility... -+ INCLTDL="$LTDLINCL" - ]) - - # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for --# the libltdl installable library, and adds --enable-ltdl-install to --# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor --# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed --# to be `${top_builddir}/libltdl'. Make sure you start DIR with --# '${top_builddir}/' (note the single quotes!) if your package is not --# flat, and, if you're not using automake, define top_builddir as --# appropriate in the Makefiles. -+# the libltdl installable library and LTDLINCL to the include flags for -+# the libltdl header and adds --enable-ltdl-install to the configure -+# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is -+# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed -+# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will -+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed -+# with '${top_srcdir}/' (note the single quotes!). If your package is -+# not flat and you're not using automake, define top_builddir and -+# top_srcdir appropriately in the Makefiles. - # In the future, this macro may have to be called after AC_PROG_LIBTOOL. --AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then -@@ -398,148 +3677,124 @@ - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" -- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la -- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la -+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" -- INCLTDL= -+ LTDLINCL= - fi -+ # For backwards non-gettext consistent compatibility... -+ INCLTDL="$LTDLINCL" - ]) - --dnl old names --AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl --AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl --AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl --AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl --AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl --AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl --AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl -- --dnl This is just to silence aclocal about the macro not being used --ifelse([AC_DISABLE_FAST_INSTALL])dnl -- --# Do all the work for Automake. This macro actually does too much -- --# some checks are only needed if your package does certain things. --# But this isn't really a big deal. -- --# serial 1 -- --dnl Usage: --dnl AM_INIT_AUTOMAKE(package,version, [no-define]) -- --AC_DEFUN(AM_INIT_AUTOMAKE, --[AC_REQUIRE([AC_PROG_INSTALL]) --PACKAGE=[$1] --AC_SUBST(PACKAGE) --VERSION=[$2] --AC_SUBST(VERSION) --dnl test to see if srcdir already configured --if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then -- AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) --fi --ifelse([$3],, --AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) --AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) --AC_REQUIRE([AM_SANITY_CHECK]) --AC_REQUIRE([AC_ARG_PROGRAM]) --dnl FIXME This is truly gross. --missing_dir=`cd $ac_aux_dir && pwd` --AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) --AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) --AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) --AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) --AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) --AC_REQUIRE([AC_PROG_MAKE_SET])]) -- --# --# Check to make sure that the build environment is sane. --# -- --AC_DEFUN(AM_SANITY_CHECK, --[AC_MSG_CHECKING([whether build environment is sane]) --# Just in case --sleep 1 --echo timestamp > conftestfile --# Do `set' in a subshell so we don't clobber the current shell's --# arguments. Must try -L first in case configure is actually a --# symlink; some systems play weird games with the mod time of symlinks --# (eg FreeBSD returns the mod time of the symlink's containing --# directory). --if ( -- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` -- if test "[$]*" = "X"; then -- # -L didn't work. -- set X `ls -t $srcdir/configure conftestfile` -- fi -- if test "[$]*" != "X $srcdir/configure conftestfile" \ -- && test "[$]*" != "X conftestfile $srcdir/configure"; then -- -- # If neither matched, then we have a broken ls. This can happen -- # if, for instance, CONFIG_SHELL is bash and it inherits a -- # broken ls alias from the environment. This has actually -- # happened. Such a system could not be considered "sane". -- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken --alias in your environment]) -- fi -+# old names -+AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -+AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -+AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -+AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -+AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) -+ -+# This is just to silence aclocal about the macro not being used -+ifelse([AC_DISABLE_FAST_INSTALL]) -+ -+# NOTE: This macro has been submitted for inclusion into # -+# GNU Autoconf as AC_PROG_SED. When it is available in # -+# a released version of Autoconf we should remove this # -+# macro and use it instead. # -+# LT_AC_PROG_SED -+# -------------- -+# Check for a fully-functional sed program, that truncates -+# as few characters as possible. Prefer GNU sed if found. -+AC_DEFUN([LT_AC_PROG_SED], -+[AC_MSG_CHECKING([for a sed that does not truncate output]) -+AC_CACHE_VAL(lt_cv_path_SED, -+[# Loop through the user's path and test for sed and gsed. -+# Then use that list of sed's as ones to test for truncation. -+as_executable_p="test -f" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_prog in sed gsed; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then -+ _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" -+ fi -+ done -+ done -+done - -- test "[$]2" = conftestfile -- ) --then -- # Ok. -- : --else -- AC_MSG_ERROR([newly created file is older than distributed files! --Check your system clock]) --fi --rm -f conftest* --AC_MSG_RESULT(yes)]) -+ # Create a temporary directory, and hook for its removal unless debugging. -+$debug || -+{ -+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 -+ trap '{ (exit 1); exit 1; }' 1 2 13 15 -+} - --dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) --dnl The program must properly implement --version. --AC_DEFUN(AM_MISSING_PROG, --[AC_MSG_CHECKING(for working $2) --# Run test in a subshell; some versions of sh will print an error if --# an executable is not found, even if stderr is redirected. --# Redirect stdin to placate older versions of autoconf. Sigh. --if ($2 --version) < /dev/null > /dev/null 2>&1; then -- $1=$2 -- AC_MSG_RESULT(found) -+# Create a (secure) tmp directory for tmp files. -+: ${TMPDIR=/tmp} -+{ -+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && -+ test -n "$tmp" && test -d "$tmp" -+} || -+{ -+ tmp=$TMPDIR/sed$$-$RANDOM -+ (umask 077 && mkdir $tmp) -+} || -+{ -+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 -+ { (exit 1); exit 1; } -+} -+ _max=0 -+ _count=0 -+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris -+ # along with /bin/sed that truncates output. -+ for _sed in $_sed_list /usr/xpg4/bin/sed; do -+ test ! -f ${_sed} && break -+ cat /dev/null > "$tmp/sed.in" -+ _count=0 -+ echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" -+ # Check for GNU sed and select it if it is found. -+ if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then -+ lt_cv_path_SED=${_sed} -+ break -+ fi -+ while true; do -+ cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" -+ mv "$tmp/sed.tmp" "$tmp/sed.in" -+ cp "$tmp/sed.in" "$tmp/sed.nl" -+ echo >>"$tmp/sed.nl" -+ ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break -+ cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break -+ # 40000 chars as input seems more than enough -+ test $_count -gt 10 && break -+ _count=`expr $_count + 1` -+ if test $_count -gt $_max; then -+ _max=$_count -+ lt_cv_path_SED=$_sed -+ fi -+ done -+ done -+ rm -rf "$tmp" -+]) -+if test "X$SED" != "X"; then -+ lt_cv_path_SED=$SED - else -- $1="$3/missing $2" -- AC_MSG_RESULT(missing) -+ SED=$lt_cv_path_SED - fi --AC_SUBST($1)]) -- --# Like AC_CONFIG_HEADER, but automatically create stamp file. -- --AC_DEFUN(AM_CONFIG_HEADER, --[AC_PREREQ([2.12]) --AC_CONFIG_HEADER([$1]) --dnl When config.status generates a header, we must update the stamp-h file. --dnl This file resides in the same directory as the config header --dnl that is generated. We must strip everything past the first ":", --dnl and everything past the last "/". --AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl --ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, --<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, --<>; do -- case " <<$>>CONFIG_HEADERS " in -- *" <<$>>am_file "*<<)>> -- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx -- ;; -- esac -- am_indx=`expr "<<$>>am_indx" + 1` --done<<>>dnl>>) --changequote([,]))]) -+AC_MSG_RESULT([$SED]) -+]) - - # Add --enable-maintainer-mode option to configure. - # From Jim Meyering - - # serial 1 - --AC_DEFUN(AM_MAINTAINER_MODE, -+AC_DEFUN([AM_MAINTAINER_MODE], - [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -@@ -556,7 +3811,7 @@ - - # Define a conditional. - --AC_DEFUN(AM_CONDITIONAL, -+AC_DEFUN([AM_CONDITIONAL], - [AC_SUBST($1_TRUE) - AC_SUBST($1_FALSE) - if $2; then -@@ -585,7 +3840,7 @@ - # program @code{ansi2knr}, which comes with Ghostscript. - # @end defmac - --AC_DEFUN(AM_PROG_CC_STDC, -+AC_DEFUN([AM_PROG_CC_STDC], - [AC_REQUIRE([AC_PROG_CC]) - AC_BEFORE([$0], [AC_C_INLINE]) - AC_BEFORE([$0], [AC_C_CONST]) ---- glib1.2-1.2.10.orig/config.guess -+++ glib1.2-1.2.10/config.guess -@@ -1,8 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. --# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 --# Free Software Foundation, Inc. --# -+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+ -+timestamp='2003-05-09' -+ - # This file 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 -@@ -22,99 +24,262 @@ - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --# Written by Per Bothner . --# The master version of this file is at the FSF in /home/gd/gnu/lib. --# Please send patches to . -+# Originally written by Per Bothner . -+# Please send patches to . Submit a context -+# diff and a properly formatted ChangeLog entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # - # The plan is that this can be called by configure scripts if you --# don't specify an explicit system type (host/target name). --# --# Only a few systems have been added to this list; please add others --# (but try to keep the structure clean). --# -+# don't specify an explicit build system type. - --# Use $HOST_CC if defined. $CC may point to a cross-compiler --if test x"$CC_FOR_BUILD" = x; then -- if test x"$HOST_CC" != x; then -- CC_FOR_BUILD="$HOST_CC" -- else -- if test x"$CC" != x; then -- CC_FOR_BUILD="$CC" -- else -- CC_FOR_BUILD=cc -- fi -- fi -+me=`echo "$0" | sed -e 's,.*/,,'` -+ -+usage="\ -+Usage: $0 [OPTION] -+ -+Output the configuration name of the system \`$me' is run on. -+ -+Operation modes: -+ -h, --help print this help, then exit -+ -t, --time-stamp print date of last modification, then exit -+ -v, --version print version number, then exit -+ -+Report bugs and patches to ." -+ -+version="\ -+GNU config.guess ($timestamp) -+ -+Originally written by Per Bothner. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -+Free Software Foundation, Inc. -+ -+This is free software; see the source for copying conditions. There is NO -+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -+ -+help=" -+Try \`$me --help' for more information." -+ -+# Parse command line -+while test $# -gt 0 ; do -+ case $1 in -+ --time-stamp | --time* | -t ) -+ echo "$timestamp" ; exit 0 ;; -+ --version | -v ) -+ echo "$version" ; exit 0 ;; -+ --help | --h* | -h ) -+ echo "$usage"; exit 0 ;; -+ -- ) # Stop option processing -+ shift; break ;; -+ - ) # Use stdin as input. -+ break ;; -+ -* ) -+ echo "$me: invalid option $1$help" >&2 -+ exit 1 ;; -+ * ) -+ break ;; -+ esac -+done -+ -+if test $# != 0; then -+ echo "$me: too many arguments$help" >&2 -+ exit 1 - fi - -+trap 'exit 1' 1 2 15 -+ -+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -+# compiler to aid in system detection is discouraged as it requires -+# temporary files to be created and, as you can see below, it is a -+# headache to deal with in a portable fashion. -+ -+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -+# use `HOST_CC' if defined, but it is deprecated. -+ -+# Portable tmp directory creation inspired by the Autoconf team. -+ -+set_cc_for_build=' -+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -+: ${TMPDIR=/tmp} ; -+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -+dummy=$tmp/dummy ; -+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -+case $CC_FOR_BUILD,$HOST_CC,$CC in -+ ,,) echo "int x;" > $dummy.c ; -+ for c in cc gcc c89 c99 ; do -+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then -+ CC_FOR_BUILD="$c"; break ; -+ fi ; -+ done ; -+ if test x"$CC_FOR_BUILD" = x ; then -+ CC_FOR_BUILD=no_compiler_found ; -+ fi -+ ;; -+ ,,*) CC_FOR_BUILD=$CC ;; -+ ,*,*) CC_FOR_BUILD=$HOST_CC ;; -+esac ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. --# (ghazi@noc.rutgers.edu 8/24/94.) -+# (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH - fi - - UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown - UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown --UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - --dummy=dummy-$$ --trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 -- - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in -+ *:NetBSD:*:*) -+ # NetBSD (nbsd) targets should (where applicable) match one or -+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, -+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently -+ # switched to ELF, *-*-netbsd* would select the old -+ # object file format. This provides both forward -+ # compatibility and a consistent mechanism for selecting the -+ # object file format. -+ # -+ # Note: NetBSD doesn't particularly care about the vendor -+ # portion of the name. We always set it to "unknown". -+ sysctl="sysctl -n hw.machine_arch" -+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ -+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` -+ case "${UNAME_MACHINE_ARCH}" in -+ armeb) machine=armeb-unknown ;; -+ arm*) machine=arm-unknown ;; -+ sh3el) machine=shl-unknown ;; -+ sh3eb) machine=sh-unknown ;; -+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;; -+ esac -+ # The Operating System including object format, if it has switched -+ # to ELF recently, or will in the future. -+ case "${UNAME_MACHINE_ARCH}" in -+ arm*|i386|m68k|ns32k|sh3*|sparc|vax) -+ eval $set_cc_for_build -+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep __ELF__ >/dev/null -+ then -+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). -+ # Return netbsd for either. FIX? -+ os=netbsd -+ else -+ os=netbsdelf -+ fi -+ ;; -+ *) -+ os=netbsd -+ ;; -+ esac -+ # The OS release -+ # Debian GNU/NetBSD machines have a different userland, and -+ # thus, need a distinct triplet. However, they do not need -+ # kernel version information, so it can be replaced with a -+ # suitable tag, in the style of linux-gnu. -+ case "${UNAME_VERSION}" in -+ Debian*) -+ release='-gnu' -+ ;; -+ *) -+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ ;; -+ esac -+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: -+ # contains redundant information, the shorter form: -+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. -+ echo "${machine}-${os}${release}" -+ exit 0 ;; -+ amiga:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ arc:OpenBSD:*:*) -+ echo mipsel-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ hp300:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ mac68k:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ macppc:OpenBSD:*:*) -+ echo powerpc-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ mvme68k:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ mvme88k:OpenBSD:*:*) -+ echo m88k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ mvmeppc:OpenBSD:*:*) -+ echo powerpc-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ pmax:OpenBSD:*:*) -+ echo mipsel-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ sgi:OpenBSD:*:*) -+ echo mipseb-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ sun3:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ wgrisc:OpenBSD:*:*) -+ echo mipsel-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ *:OpenBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi -+ # According to Compaq, /usr/sbin/psrinfo has been available on -+ # OSF/1 and Tru64 systems produced since 1995. I hope that -+ # covers most systems running today. This code pipes the CPU -+ # types through head -n 1, so we only detect the type of CPU 0. -+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` -+ case "$ALPHA_CPU_TYPE" in -+ "EV4 (21064)") -+ UNAME_MACHINE="alpha" ;; -+ "EV4.5 (21064)") -+ UNAME_MACHINE="alpha" ;; -+ "LCA4 (21066/21068)") -+ UNAME_MACHINE="alpha" ;; -+ "EV5 (21164)") -+ UNAME_MACHINE="alphaev5" ;; -+ "EV5.6 (21164A)") -+ UNAME_MACHINE="alphaev56" ;; -+ "EV5.6 (21164PC)") -+ UNAME_MACHINE="alphapca56" ;; -+ "EV5.7 (21164PC)") -+ UNAME_MACHINE="alphapca57" ;; -+ "EV6 (21264)") -+ UNAME_MACHINE="alphaev6" ;; -+ "EV6.7 (21264A)") -+ UNAME_MACHINE="alphaev67" ;; -+ "EV6.8CB (21264C)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.8AL (21264B)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.8CX (21264D)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.9A (21264/EV69A)") -+ UNAME_MACHINE="alphaev69" ;; -+ "EV7 (21364)") -+ UNAME_MACHINE="alphaev7" ;; -+ "EV7.9 (21364A)") -+ UNAME_MACHINE="alphaev79" ;; -+ esac - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- cat <$dummy.s -- .globl main -- .ent main --main: -- .frame \$30,0,\$26,0 -- .prologue 0 -- .long 0x47e03d80 # implver $0 -- lda \$2,259 -- .long 0x47e20c21 # amask $2,$1 -- srl \$1,8,\$2 -- sll \$2,2,\$2 -- sll \$0,3,\$0 -- addl \$1,\$0,\$0 -- addl \$2,\$0,\$0 -- ret \$31,(\$26),1 -- .end main --EOF -- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null -- if test "$?" = 0 ; then -- ./$dummy -- case "$?" in -- 7) -- UNAME_MACHINE="alpha" -- ;; -- 15) -- UNAME_MACHINE="alphaev5" -- ;; -- 14) -- UNAME_MACHINE="alphaev56" -- ;; -- 10) -- UNAME_MACHINE="alphapca56" -- ;; -- 16) -- UNAME_MACHINE="alphaev6" -- ;; -- esac -- fi -- rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha\ *:Windows_NT*:*) -@@ -127,34 +292,13 @@ - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) -- echo m68k-cbm-sysv4 -+ echo m68k-unknown-sysv4 - exit 0;; -- amiga:NetBSD:*:*) -- echo m68k-cbm-netbsd${UNAME_RELEASE} -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; -- arc64:OpenBSD:*:*) -- echo mips64el-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hkmips:OpenBSD:*:*) -- echo mips-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mips-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -+ *:[Mm]orph[Oo][Ss]:*:*) -+ echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; - *:OS/390:*:*) - echo i370-ibm-openedition -@@ -162,10 +306,7 @@ - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; -- arm32:NetBSD:*:*) -- echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -- exit 0 ;; -- SR2?01:HI-UX/MPP:*:*) -+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) -@@ -179,6 +320,10 @@ - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; -+ DRS?6000:UNIX_SV:4.2*:7*) -+ case `/usr/bin/uname -p` in -+ sparc) echo sparc-icl-nx7 && exit 0 ;; -+ esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; -@@ -207,7 +352,7 @@ - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) -- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` -+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) -@@ -221,15 +366,9 @@ - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; -- atari*:NetBSD:*:*) -- echo m68k-atari-netbsd${UNAME_RELEASE} -- exit 0 ;; -- atari*:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not -- # "atarist" or "atariste" at least should have a processor -+ # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not -@@ -253,30 +392,9 @@ - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; -- sun3*:NetBSD:*:*) -- echo m68k-sun-netbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3*:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:NetBSD:*:*) -- echo m68k-apple-netbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; -- macppc:NetBSD:*:*) -- echo powerpc-apple-netbsd${UNAME_RELEASE} -- exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; -@@ -290,8 +408,10 @@ - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) -+ eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __cplusplus -+#include /* for printf() prototype */ - int main (int argc, char *argv[]) { - #else - int main (argc, argv) int argc; char *argv[]; { -@@ -310,12 +430,20 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD $dummy.c -o $dummy \ -- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && rm $dummy.c $dummy && exit 0 -- rm -f $dummy.c $dummy -+ $CC_FOR_BUILD -o $dummy $dummy.c \ -+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -+ && exit 0 - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; -+ Motorola:PowerMAX_OS:*:*) -+ echo powerpc-motorola-powermax -+ exit 0 ;; -+ Motorola:*:4.3:PL8-*) -+ echo powerpc-harris-powermax -+ exit 0 ;; -+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) -+ echo powerpc-harris-powermax -+ exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; -@@ -331,7 +459,7 @@ - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110] -+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] -@@ -363,11 +491,20 @@ - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -- i?86:AIX:*:*) -+ i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; -+ ia64:AIX:*:*) -+ if [ -x /usr/bin/oslevel ] ; then -+ IBM_REV=`/usr/bin/oslevel` -+ else -+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} -+ fi -+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -+ exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then -+ eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - -@@ -379,8 +516,7 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 -- rm -f $dummy.c $dummy -+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 -@@ -388,9 +524,9 @@ - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; -- *:AIX:*:4) -- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` -- if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then -+ *:AIX:*:[45]) -+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` -+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc -@@ -398,7 +534,7 @@ - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else -- IBM_REV=4.${UNAME_RELEASE} -+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; -@@ -408,7 +544,7 @@ - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; -- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and -+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) -@@ -424,11 +560,30 @@ - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) -+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) -- sed 's/^ //' << EOF >$dummy.c -+ if [ -x /usr/bin/getconf ]; then -+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -+ case "${sc_cpu_version}" in -+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -+ 532) # CPU_PA_RISC2_0 -+ case "${sc_kernel_bits}" in -+ 32) HP_ARCH="hppa2.0n" ;; -+ 64) HP_ARCH="hppa2.0w" ;; -+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 -+ esac ;; -+ esac -+ fi -+ if [ "${HP_ARCH}" = "" ]; then -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ -+ #define _HPUX_SOURCE - #include - #include - -@@ -459,13 +614,29 @@ - exit (0); - } - EOF -- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` -- rm -f $dummy.c $dummy -+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` -+ test -z "$HP_ARCH" && HP_ARCH=hppa -+ fi ;; - esac -- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` -+ if [ ${HP_ARCH} = "hppa2.0w" ] -+ then -+ # avoid double evaluation of $set_cc_for_build -+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ then -+ HP_ARCH="hppa2.0w" -+ else -+ HP_ARCH="hppa64" -+ fi -+ fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; -+ ia64:HP-UX:*:*) -+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` -+ echo ia64-hp-hpux${HPUX_REV} -+ exit 0 ;; - 3050*:HI-UX:*:*) -+ eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int -@@ -491,8 +662,7 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 -- rm -f $dummy.c $dummy -+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) -@@ -501,7 +671,7 @@ - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; -- *9??*:MPE/iX:*:*) -+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) -@@ -510,7 +680,7 @@ - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; -- i?86:OSF1:*:*) -+ i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else -@@ -520,9 +690,6 @@ - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; -- hppa*:OpenBSD:*:*) -- echo hppa-unknown-openbsd -- exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; -@@ -541,41 +708,34 @@ - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; -- CRAY*X-MP:*:*:*) -- echo xmp-cray-unicos -- exit 0 ;; - CRAY*Y-MP:*:*:*) -- echo ymp-cray-unicos${UNAME_RELEASE} -+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ -+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -+ -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*TS:*:*:*) -- echo t90-cray-unicos${UNAME_RELEASE} -+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3E:*:*:*) -- echo alpha-cray-unicosmk${UNAME_RELEASE} -+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; -- CRAY-2:*:*:*) -- echo cray2-cray-unicos -- exit 0 ;; -- F300:UNIX_System_V:*:*) -+ CRAY*SV1:*:*:*) -+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit 0 ;; -+ *:UNICOS/mp:*:*) -+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit 0 ;; -+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) -+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; -- F301:UNIX_System_V:*:*) -- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` -- exit 0 ;; -- hp3[0-9][05]:NetBSD:*:*) -- echo m68k-hp-netbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- i?86:BSD/386:*:* | i?86:BSD/OS:*:*) -+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) -@@ -584,20 +744,19 @@ - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; -- *:FreeBSD:*:*) -- if test -x /usr/bin/objformat; then -- if test "elf" = "`/usr/bin/objformat`"; then -- echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` -- exit 0 -- fi -- fi -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -- *:NetBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` -- exit 0 ;; -- *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) -+ # Determine whether the default compiler uses glibc. -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #include -+ #if __GLIBC__ >= 2 -+ LIBC=gnu -+ #else -+ LIBC= -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -@@ -605,11 +764,20 @@ - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; -+ i*:PW*:*) -+ echo ${UNAME_MACHINE}-pc-pw32 -+ exit 0 ;; -+ x86:Interix*:3*) -+ echo i586-pc-interix3 -+ exit 0 ;; -+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) -+ echo i${UNAME_MACHINE}-pc-mks -+ exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? -- echo i386-pc-interix -+ echo i586-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -@@ -623,201 +791,159 @@ - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; -- *:Linux:*:*) -- -+ i*86:Minix:*:*) -+ echo ${UNAME_MACHINE}-pc-minix -+ exit 0 ;; -+ arm*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ ia64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ m68*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ mips:Linux:*:*) -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #undef CPU -+ #undef mips -+ #undef mipsel -+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -+ CPU=mipsel -+ #else -+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -+ CPU=mips -+ #else -+ CPU= -+ #endif -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ ;; -+ mips64:Linux:*:*) -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #undef CPU -+ #undef mips64 -+ #undef mips64el -+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -+ CPU=mips64el -+ #else -+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -+ CPU=mips64 -+ #else -+ CPU= -+ #endif -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu -+ exit 0 ;; -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit 0 ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit 0 ;; -+ parisc:Linux:*:* | hppa:Linux:*:*) -+ # Look for CPU level -+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -+ PA7*) echo hppa1.1-unknown-linux-gnu ;; -+ PA8*) echo hppa2.0-unknown-linux-gnu ;; -+ *) echo hppa-unknown-linux-gnu ;; -+ esac -+ exit 0 ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu -+ exit 0 ;; -+ s390:Linux:*:* | s390x:Linux:*:*) -+ echo ${UNAME_MACHINE}-ibm-linux -+ exit 0 ;; -+ sh*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ sparc:Linux:*:* | sparc64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ x86_64:Linux:*:*) -+ echo x86_64-unknown-linux-gnu -+ exit 0 ;; -+ i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. -- ld_help_string=`cd /; ld --help 2>&1` -- ld_supported_emulations=`echo $ld_help_string \ -- | sed -ne '/supported emulations:/!d -+ # Set LC_ALL=C to ensure ld outputs messages in English. -+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -+ | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g -- s/.*supported emulations: *// -+ s/.*supported targets: *// - s/ .*// - p'` -- case "$ld_supported_emulations" in -- *ia64) -- echo "${UNAME_MACHINE}-unknown-linux" -- exit 0 -+ case "$ld_supported_targets" in -+ elf32-i386) -+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; -- i?86linux) -+ a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 -- ;; -- i?86coff) -+ exit 0 ;; -+ coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 -- ;; -- sparclinux) -- echo "${UNAME_MACHINE}-unknown-linux-gnuaout" -- exit 0 -- ;; -- armlinux) -- echo "${UNAME_MACHINE}-unknown-linux-gnuaout" -- exit 0 -- ;; -- elf32arm*) -- echo "${UNAME_MACHINE}-unknown-linux-gnu" -- exit 0 -- ;; -- armelf_linux*) -- echo "${UNAME_MACHINE}-unknown-linux-gnu" -- exit 0 -- ;; -- m68klinux) -- echo "${UNAME_MACHINE}-unknown-linux-gnuaout" -- exit 0 -- ;; -- elf32ppc) -- # Determine Lib Version -- cat >$dummy.c < --#if defined(__GLIBC__) --extern char __libc_version[]; --extern char __libc_release[]; --#endif --main(argc, argv) -- int argc; -- char *argv[]; --{ --#if defined(__GLIBC__) -- printf("%s %s\n", __libc_version, __libc_release); --#else -- printf("unkown\n"); --#endif -- return 0; --} --EOF -- LIBC="" -- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null -- if test "$?" = 0 ; then -- ./$dummy | grep 1\.99 > /dev/null -- if test "$?" = 0 ; then -- LIBC="libc1" -- fi -- fi -- rm -f $dummy.c $dummy -- echo powerpc-unknown-linux-gnu${LIBC} -- exit 0 -- ;; -+ exit 0 ;; -+ "") -+ # Either a pre-BFD a.out linker (linux-gnuoldld) or -+ # one that does not give us useful --help. -+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -+ exit 0 ;; - esac -- -- if test "${UNAME_MACHINE}" = "alpha" ; then -- sed 's/^ //' <$dummy.s -- .globl main -- .ent main -- main: -- .frame \$30,0,\$26,0 -- .prologue 0 -- .long 0x47e03d80 # implver $0 -- lda \$2,259 -- .long 0x47e20c21 # amask $2,$1 -- srl \$1,8,\$2 -- sll \$2,2,\$2 -- sll \$0,3,\$0 -- addl \$1,\$0,\$0 -- addl \$2,\$0,\$0 -- ret \$31,(\$26),1 -- .end main --EOF -- LIBC="" -- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null -- if test "$?" = 0 ; then -- ./$dummy -- case "$?" in -- 7) -- UNAME_MACHINE="alpha" -- ;; -- 15) -- UNAME_MACHINE="alphaev5" -- ;; -- 14) -- UNAME_MACHINE="alphaev56" -- ;; -- 10) -- UNAME_MACHINE="alphapca56" -- ;; -- 16) -- UNAME_MACHINE="alphaev6" -- ;; -- esac -- -- objdump --private-headers $dummy | \ -- grep ld.so.1 > /dev/null -- if test "$?" = 0 ; then -- LIBC="libc1" -- fi -- fi -- rm -f $dummy.s $dummy -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 -- elif test "${UNAME_MACHINE}" = "mips" ; then -- cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 -- rm -f $dummy.c $dummy -- else -- # Either a pre-BFD a.out linker (linux-gnuoldld) -- # or one that does not give us useful --help. -- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. -- # If ld does not provide *any* "supported emulations:" -- # that means it is gnuoldld. -- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" -- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 -- -- case "${UNAME_MACHINE}" in -- i?86) -- VENDOR=pc; -- ;; -- *) -- VENDOR=unknown; -- ;; -- esac -- # Determine whether the default compiler is a.out or elf -- cat >$dummy.c < --#ifdef __cplusplus -- int main (int argc, char *argv[]) { --#else -- int main (argc, argv) int argc; char *argv[]; { --#endif --#ifdef __ELF__ --# ifdef __GLIBC__ --# if __GLIBC__ >= 2 -- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); --# else -- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); --# endif --# else -- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); --# endif --#else -- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); --#endif -- return 0; --} -+ # Determine whether the default compiler is a.out or elf -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #include -+ #ifdef __ELF__ -+ # ifdef __GLIBC__ -+ # if __GLIBC__ >= 2 -+ LIBC=gnu -+ # else -+ LIBC=gnulibc1 -+ # endif -+ # else -+ LIBC=gnulibc1 -+ # endif -+ #else -+ #ifdef __INTEL_COMPILER -+ LIBC=gnu -+ #else -+ LIBC=gnuaout -+ #endif -+ #endif - EOF -- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 -- rm -f $dummy.c $dummy -- fi ;; --# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions --# are messed up and put the nodename in both sysname and nodename. -- i?86:DYNIX/ptx:4*:*) -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ ;; -+ i*86:DYNIX/ptx:4*:*) -+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. -+ # earlier versions are messed up and put the nodename in both -+ # sysname and nodename. - echo i386-sequent-sysv4 - exit 0 ;; -- i?86:UNIX_SV:4.2MP:2.*) -+ i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, -@@ -825,7 +951,24 @@ - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; -- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) -+ i*86:OS/2:*:*) -+ # If we were able to find `uname', then EMX Unix compatibility -+ # is probably installed. -+ echo ${UNAME_MACHINE}-pc-os2-emx -+ exit 0 ;; -+ i*86:XTS-300:*:STOP) -+ echo ${UNAME_MACHINE}-unknown-stop -+ exit 0 ;; -+ i*86:atheos:*:*) -+ echo ${UNAME_MACHINE}-unknown-atheos -+ exit 0 ;; -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ echo i386-unknown-lynxos${UNAME_RELEASE} -+ exit 0 ;; -+ i*86:*DOS:*:*) -+ echo ${UNAME_MACHINE}-pc-msdosdjgpp -+ exit 0 ;; -+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} -@@ -833,27 +976,26 @@ - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; -- i?86:*:5:7*) -- # Fixed at (any) Pentium or better -- UNAME_MACHINE=i586 -- if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then -- echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} -- else -- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} -- fi -+ i*86:*:5:[78]*) -+ case `/bin/uname -X | grep "^Machine"` in -+ *486*) UNAME_MACHINE=i486 ;; -+ *Pentium) UNAME_MACHINE=i586 ;; -+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;; -+ esac -+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; -- i?86:*:3.2:*) -+ i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then -- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` -- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 -- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ -+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` -+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 -+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 -- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ -+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 -- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ -+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else -@@ -861,6 +1003,7 @@ - fi - exit 0 ;; - pc:*:*:*) -+ # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp -@@ -882,9 +1025,15 @@ - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; -+ mc68k:UNIX:SYSTEM5:3.51m) -+ echo m68k-convergent-sysv -+ exit 0 ;; -+ M680?0:D-NIX:5.3:*) -+ echo m68k-diab-dnix -+ exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) -+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -@@ -895,21 +1044,21 @@ - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; -- m68*:LynxOS:2.*:*) -+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; -- i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) -- echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; -- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) -+ rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ echo powerpc-unknown-lynxos${UNAME_RELEASE} -+ exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; -@@ -927,8 +1076,8 @@ - echo ns32k-sni-sysv - fi - exit 0 ;; -- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -- # says -+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -+ # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) -@@ -940,10 +1089,14 @@ - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; -+ *:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo hppa1.1-stratus-vos -+ exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; -- news*:NEWS-OS:*:6*) -+ news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) -@@ -968,20 +1121,80 @@ - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; -+ SX-6:SUPER-UX:*:*) -+ echo sx6-nec-superux${UNAME_RELEASE} -+ exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; -+ *:Darwin:*:*) -+ case `uname -p` in -+ *86) UNAME_PROCESSOR=i686 ;; -+ powerpc) UNAME_PROCESSOR=powerpc ;; -+ esac -+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -+ exit 0 ;; -+ *:procnto*:*:* | *:QNX:[0123456789]*:*) -+ UNAME_PROCESSOR=`uname -p` -+ if test "$UNAME_PROCESSOR" = "x86"; then -+ UNAME_PROCESSOR=i386 -+ UNAME_MACHINE=pc -+ fi -+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -+ exit 0 ;; - *:QNX:*:4*) -- echo i386-qnx-qnx${UNAME_VERSION} -+ echo i386-pc-qnx -+ exit 0 ;; -+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ echo nsr-tandem-nsk${UNAME_RELEASE} -+ exit 0 ;; -+ *:NonStop-UX:*:*) -+ echo mips-compaq-nonstopux -+ exit 0 ;; -+ BS2000:POSIX*:*:*) -+ echo bs2000-siemens-sysv -+ exit 0 ;; -+ DS/*:UNIX_System_V:*:*) -+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -+ exit 0 ;; -+ *:Plan9:*:*) -+ # "uname -m" is not consistent, so use $cputype instead. 386 -+ # is converted to i386 for consistency with other x86 -+ # operating systems. -+ if test "$cputype" = "386"; then -+ UNAME_MACHINE=i386 -+ else -+ UNAME_MACHINE="$cputype" -+ fi -+ echo ${UNAME_MACHINE}-unknown-plan9 -+ exit 0 ;; -+ *:TOPS-10:*:*) -+ echo pdp10-unknown-tops10 -+ exit 0 ;; -+ *:TENEX:*:*) -+ echo pdp10-unknown-tenex -+ exit 0 ;; -+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) -+ echo pdp10-dec-tops20 -+ exit 0 ;; -+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) -+ echo pdp10-xkl-tops20 -+ exit 0 ;; -+ *:TOPS-20:*:*) -+ echo pdp10-unknown-tops20 -+ exit 0 ;; -+ *:ITS:*:*) -+ echo pdp10-unknown-its - exit 0 ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 - #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -+eval $set_cc_for_build - cat >$dummy.c < -@@ -1068,11 +1281,24 @@ - #endif - - #if defined (vax) --#if !defined (ultrix) -- printf ("vax-dec-bsd\n"); exit (0); --#else -- printf ("vax-dec-ultrix\n"); exit (0); --#endif -+# if !defined (ultrix) -+# include -+# if defined (BSD) -+# if BSD == 43 -+ printf ("vax-dec-bsd4.3\n"); exit (0); -+# else -+# if BSD == 199006 -+ printf ("vax-dec-bsd4.3reno\n"); exit (0); -+# else -+ printf ("vax-dec-bsd\n"); exit (0); -+# endif -+# endif -+# else -+ printf ("vax-dec-bsd\n"); exit (0); -+# endif -+# else -+ printf ("vax-dec-ultrix\n"); exit (0); -+# endif - #endif - - #if defined (alliant) && defined (i860) -@@ -1083,8 +1309,7 @@ - } - EOF - --$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 --rm -f $dummy.c $dummy -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 - - # Apollos put the system type in the environment. - -@@ -1116,6 +1341,48 @@ - esac - fi - --#echo '(Unable to guess system type)' 1>&2 -+cat >&2 < in order to provide the needed -+information to handle your system. -+ -+config.guess timestamp = $timestamp -+ -+uname -m = `(uname -m) 2>/dev/null || echo unknown` -+uname -r = `(uname -r) 2>/dev/null || echo unknown` -+uname -s = `(uname -s) 2>/dev/null || echo unknown` -+uname -v = `(uname -v) 2>/dev/null || echo unknown` -+ -+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -+/bin/uname -X = `(/bin/uname -X) 2>/dev/null` -+ -+hostinfo = `(hostinfo) 2>/dev/null` -+/bin/universe = `(/bin/universe) 2>/dev/null` -+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -+/bin/arch = `(/bin/arch) 2>/dev/null` -+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -+ -+UNAME_MACHINE = ${UNAME_MACHINE} -+UNAME_RELEASE = ${UNAME_RELEASE} -+UNAME_SYSTEM = ${UNAME_SYSTEM} -+UNAME_VERSION = ${UNAME_VERSION} -+EOF - - exit 1 -+ -+# Local variables: -+# eval: (add-hook 'write-file-hooks 'time-stamp) -+# time-stamp-start: "timestamp='" -+# time-stamp-format: "%:y-%02m-%02d" -+# time-stamp-end: "'" -+# End: ---- glib1.2-1.2.10.orig/config.sub -+++ glib1.2-1.2.10/config.sub -@@ -1,6 +1,10 @@ - #! /bin/sh --# Configuration validation subroutine script, version 1.1. --# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. -+# Configuration validation subroutine script. -+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+ -+timestamp='2003-05-09' -+ - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software - # can handle that machine. It does not imply ALL GNU software can. -@@ -25,6 +29,9 @@ - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+# Please send patches to . Submit a context -+# diff and a properly formatted ChangeLog entry. -+# - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. -@@ -45,30 +52,73 @@ - # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM - # It is wrong to echo any other type of specification. - --if [ x$1 = x ] --then -- echo Configuration name missing. 1>&2 -- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 -- echo "or $0 ALIAS" 1>&2 -- echo where ALIAS is a recognized configuration type. 1>&2 -- exit 1 --fi -+me=`echo "$0" | sed -e 's,.*/,,'` - --# First pass through any local machine types. --case $1 in -- *local*) -- echo $1 -- exit 0 -- ;; -- *) -- ;; -+usage="\ -+Usage: $0 [OPTION] CPU-MFR-OPSYS -+ $0 [OPTION] ALIAS -+ -+Canonicalize a configuration name. -+ -+Operation modes: -+ -h, --help print this help, then exit -+ -t, --time-stamp print date of last modification, then exit -+ -v, --version print version number, then exit -+ -+Report bugs and patches to ." -+ -+version="\ -+GNU config.sub ($timestamp) -+ -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -+Free Software Foundation, Inc. -+ -+This is free software; see the source for copying conditions. There is NO -+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -+ -+help=" -+Try \`$me --help' for more information." -+ -+# Parse command line -+while test $# -gt 0 ; do -+ case $1 in -+ --time-stamp | --time* | -t ) -+ echo "$timestamp" ; exit 0 ;; -+ --version | -v ) -+ echo "$version" ; exit 0 ;; -+ --help | --h* | -h ) -+ echo "$usage"; exit 0 ;; -+ -- ) # Stop option processing -+ shift; break ;; -+ - ) # Use stdin as input. -+ break ;; -+ -* ) -+ echo "$me: invalid option $1$help" -+ exit 1 ;; -+ -+ *local*) -+ # First pass through any local machine types. -+ echo $1 -+ exit 0;; -+ -+ * ) -+ break ;; -+ esac -+done -+ -+case $# in -+ 0) echo "$me: missing argument$help" >&2 -+ exit 1;; -+ 1) ;; -+ *) echo "$me: too many arguments$help" >&2 -+ exit 1;; - esac - - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- linux-gnu*) -+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -94,7 +144,7 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple) -+ -apple | -axis) - os= - basic_machine=$1 - ;; -@@ -108,6 +158,14 @@ - os=-vxworks - basic_machine=$1 - ;; -+ -chorusos*) -+ os=-chorusos -+ basic_machine=$1 -+ ;; -+ -chorusrdb) -+ os=-chorusrdb -+ basic_machine=$1 -+ ;; - -hiux*) - os=-hiuxwe2 - ;; -@@ -166,27 +224,62 @@ - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. -- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ -- | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ -- | 580 | i960 | h8300 \ -- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ -- | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ -- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ -- | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ -- | mips64orion | mips64orionel | mipstx39 | mipstx39el \ -- | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ -- | mips64vr5000 | miprs64vr5000el | mcore \ -- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ -- | thumb | d10v | fr30) -+ 1750a | 580 \ -+ | a29k \ -+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ -+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | clipper \ -+ | d10v | d30v | dlx | dsp16xx \ -+ | fr30 | frv \ -+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ -+ | i370 | i860 | i960 | ia64 \ -+ | ip2k \ -+ | m32r | m68000 | m68k | m88k | mcore \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ -+ | mips16 \ -+ | mips64 | mips64el \ -+ | mips64vr | mips64vrel \ -+ | mips64orion | mips64orionel \ -+ | mips64vr4100 | mips64vr4100el \ -+ | mips64vr4300 | mips64vr4300el \ -+ | mips64vr5000 | mips64vr5000el \ -+ | mipsisa32 | mipsisa32el \ -+ | mipsisa32r2 | mipsisa32r2el \ -+ | mipsisa64 | mipsisa64el \ -+ | mipsisa64sb1 | mipsisa64sb1el \ -+ | mipsisa64sr71k | mipsisa64sr71kel \ -+ | mipstx39 | mipstx39el \ -+ | mn10200 | mn10300 \ -+ | msp430 \ -+ | ns16k | ns32k \ -+ | openrisc | or32 \ -+ | pdp10 | pdp11 | pj | pjl \ -+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ -+ | pyramid \ -+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh64 | sh64le \ -+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -+ | strongarm \ -+ | tahoe | thumb | tic80 | tron \ -+ | v850 | v850e \ -+ | we32k \ -+ | x86 | xscale | xstormy16 | xtensa \ -+ | z8k) -+ basic_machine=$basic_machine-unknown -+ ;; -+ m6811 | m68hc11 | m6812 | m68hc12) -+ # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown -+ os=-none - ;; -- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) -+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. -- i[34567]86) -+ i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. -@@ -195,24 +288,60 @@ - exit 1 - ;; - # Recognize the basic CPU types with company name. -- # FIXME: clean up the formatting here. -- vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ -- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ -- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ -- | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ -- | xmp-* | ymp-* \ -- | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ -- | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ -- | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ -- | clipper-* | orion-* \ -- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ -- | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ -- | mips64el-* | mips64orion-* | mips64orionel-* \ -- | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ -- | mipstx39-* | mipstx39el-* | mcore-* \ -- | f301-* | armv*-* | t3e-* \ -- | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ -- | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* ) -+ 580-* \ -+ | a29k-* \ -+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ -+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ -+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ -+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -+ | avr-* \ -+ | bs2000-* \ -+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -+ | clipper-* | cydra-* \ -+ | d10v-* | d30v-* | dlx-* \ -+ | elxsi-* \ -+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | h8300-* | h8500-* \ -+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ -+ | i*86-* | i860-* | i960-* | ia64-* \ -+ | ip2k-* \ -+ | m32r-* \ -+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -+ | m88110-* | m88k-* | mcore-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ -+ | mips16-* \ -+ | mips64-* | mips64el-* \ -+ | mips64vr-* | mips64vrel-* \ -+ | mips64orion-* | mips64orionel-* \ -+ | mips64vr4100-* | mips64vr4100el-* \ -+ | mips64vr4300-* | mips64vr4300el-* \ -+ | mips64vr5000-* | mips64vr5000el-* \ -+ | mipsisa32-* | mipsisa32el-* \ -+ | mipsisa32r2-* | mipsisa32r2el-* \ -+ | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64sb1-* | mipsisa64sb1el-* \ -+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ -+ | mipstx39-* | mipstx39el-* \ -+ | msp430-* \ -+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | orion-* \ -+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ -+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ -+ | pyramid-* \ -+ | romp-* | rs6000-* \ -+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | tahoe-* | thumb-* \ -+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tron-* \ -+ | v850-* | v850e-* | vax-* \ -+ | we32k-* \ -+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -+ | xtensa-* \ -+ | ymp-* \ -+ | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -244,19 +373,22 @@ - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) -- basic_machine=m68k-cbm -+ basic_machine=m68k-unknown - ;; - amigaos | amigados) -- basic_machine=m68k-cbm -+ basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) -- basic_machine=m68k-cbm -+ basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) -@@ -275,6 +407,10 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ c90) -+ basic_machine=c90-cray -+ os=-unicos -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -295,27 +431,30 @@ - basic_machine=c38-convex - os=-bsd - ;; -- cray | ymp) -- basic_machine=ymp-cray -- os=-unicos -- ;; -- cray2) -- basic_machine=cray2-cray -- os=-unicos -- ;; -- [ctj]90-cray) -- basic_machine=c90-cray -+ cray | j90) -+ basic_machine=j90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ cris | cris-* | etrax*) -+ basic_machine=cris-axis -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; -+ decsystem10* | dec10*) -+ basic_machine=pdp10-dec -+ os=-tops10 -+ ;; -+ decsystem20* | dec20*) -+ basic_machine=pdp10-dec -+ os=-tops20 -+ ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola -@@ -357,6 +496,10 @@ - basic_machine=tron-gmicro - os=-sysv - ;; -+ go32) -+ basic_machine=i386-pc -+ os=-go32 -+ ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 -@@ -432,19 +575,19 @@ - basic_machine=i370-ibm - ;; - # I'm not sure what "Sysv32" means. Should this be sysv3.2? -- i[34567]86v32) -+ i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; -- i[34567]86v4*) -+ i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; -- i[34567]86v) -+ i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; -- i[34567]86sol2) -+ i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; -@@ -456,17 +599,6 @@ - basic_machine=i386-unknown - os=-vsta - ;; -- i386-go32 | go32) -- basic_machine=i386-unknown -- os=-go32 -- ;; -- i386-mingw32 | mingw32) -- basic_machine=i386-unknown -- os=-mingw32 -- ;; -- i386-qnx | qnx) -- basic_machine=i386-qnx -- ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in -@@ -492,6 +624,10 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ mingw32) -+ basic_machine=i386-pc -+ os=-mingw32 -+ ;; - miniframe) - basic_machine=m68000-convergent - ;; -@@ -499,26 +635,26 @@ - basic_machine=m68k-atari - os=-mint - ;; -- mipsel*-linux*) -- basic_machine=mipsel-unknown -- os=-linux-gnu -- ;; -- mips*-linux*) -- basic_machine=mips-unknown -- os=-linux-gnu -- ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -+ mmix*) -+ basic_machine=mmix-knuth -+ os=-mmixware -+ ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; -+ morphos) -+ basic_machine=powerpc-unknown -+ os=-morphos -+ ;; - msdos) -- basic_machine=i386-unknown -+ basic_machine=i386-pc - os=-msdos - ;; - mvs) -@@ -582,13 +718,28 @@ - basic_machine=i960-intel - os=-mon960 - ;; -+ nonstopux) -+ basic_machine=mips-compaq -+ os=-nonstopux -+ ;; - np1) - basic_machine=np1-gould - ;; -+ nv1) -+ basic_machine=nv1-cray -+ os=-unicosmp -+ ;; -+ nsr-tandem) -+ basic_machine=nsr-tandem -+ ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; -+ or32 | or32-*) -+ basic_machine=or32-unknown -+ os=-coff -+ ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose -@@ -611,45 +762,59 @@ - pbb) - basic_machine=m68k-tti - ;; -- pc532 | pc532-*) -+ pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -- pentium | p5 | k5 | k6 | nexen) -+ pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -- pentiumpro | p6 | 6x86) -+ pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2) -- basic_machine=i786-pc -+ basic_machine=i686-pc - ;; -- pentium-* | p5-* | k5-* | k6-* | nexen-*) -+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumpro-* | p6-* | 6x86-*) -+ pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) -- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; -- power) basic_machine=rs6000-ibm -+ power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown -- ;; -+ ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown -- ;; -+ ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ ppc64) basic_machine=powerpc64-unknown -+ ;; -+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; -+ ppc64le | powerpc64little | ppc64-le | powerpc64-little) -+ basic_machine=powerpc64le-unknown -+ ;; -+ ppc64le-* | powerpc64little-*) -+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - ps2) - basic_machine=i386-ibm - ;; -+ pw32) -+ basic_machine=i586-unknown -+ os=-pw32 -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -660,10 +825,22 @@ - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; -+ s390 | s390-*) -+ basic_machine=s390-ibm -+ ;; -+ s390x | s390x-*) -+ basic_machine=s390x-ibm -+ ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; -+ sb1) -+ basic_machine=mipsisa64sb1-unknown -+ ;; -+ sb1el) -+ basic_machine=mipsisa64sb1el-unknown -+ ;; - sequent) - basic_machine=i386-sequent - ;; -@@ -671,7 +848,7 @@ - basic_machine=sh-hitachi - os=-hms - ;; -- sparclite-wrs) -+ sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; -@@ -729,20 +906,48 @@ - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; -+ sv1) -+ basic_machine=sv1-cray -+ os=-unicos -+ ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) -- basic_machine=t3e-cray -+ basic_machine=alphaev5-cray - os=-unicos - ;; -+ t90) -+ basic_machine=t90-cray -+ os=-unicos -+ ;; -+ tic4x | c4x*) -+ basic_machine=tic4x-unknown -+ os=-coff -+ ;; -+ tic54x | c54x*) -+ basic_machine=tic54x-unknown -+ os=-coff -+ ;; -+ tic55x | c55x*) -+ basic_machine=tic55x-unknown -+ os=-coff -+ ;; -+ tic6x | c6x*) -+ basic_machine=tic6x-unknown -+ os=-coff -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; -+ toad1) -+ basic_machine=pdp10-xkl -+ os=-tops20 -+ ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; -@@ -767,8 +972,8 @@ - os=-vms - ;; - vpp*|vx|vx-*) -- basic_machine=f301-fujitsu -- ;; -+ basic_machine=f301-fujitsu -+ ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks -@@ -789,13 +994,13 @@ - basic_machine=hppa1.1-winbond - os=-proelf - ;; -- xmp) -- basic_machine=xmp-cray -- os=-unicos -- ;; -- xps | xps100) -+ xps | xps100) - basic_machine=xps100-honeywell - ;; -+ ymp) -+ basic_machine=ymp-cray -+ os=-unicos -+ ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim -@@ -816,13 +1021,6 @@ - op60c) - basic_machine=hppa1.1-oki - ;; -- mips) -- if [ x$os = x-linux-gnu ]; then -- basic_machine=mips-unknown -- else -- basic_machine=mips-mips -- fi -- ;; - romp) - basic_machine=romp-ibm - ;; -@@ -832,16 +1030,26 @@ - vax) - basic_machine=vax-dec - ;; -+ pdp10) -+ # there are many clones, so DEC is not a safe bet -+ basic_machine=pdp10-unknown -+ ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; -- sparc | sparcv9) -+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ basic_machine=sh-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; -+ sparc | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; -- cydra) -+ cydra) - basic_machine=cydra-cydrome - ;; - orion) -@@ -856,9 +1064,8 @@ - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; -- c4x*) -- basic_machine=c4x-none -- os=-coff -+ *-unknown) -+ # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 -@@ -916,14 +1123,34 @@ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -+ | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -- | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*) -+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ -+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ -+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ -+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -+ | -powermax* | -dnix*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; -+ -qnx*) -+ case $basic_machine in -+ x86-* | i*86-*) -+ ;; -+ *) -+ os=-nto$os -+ ;; -+ esac -+ ;; -+ -nto-qnx*) -+ ;; -+ -nto*) -+ os=`echo $os | sed -e 's|nto|nto-qnx|'` -+ ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -- | -macos* | -mpw* | -magic* | -mon960* | -lnews*) -+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` -@@ -940,6 +1167,9 @@ - -opened*) - os=-openedition - ;; -+ -wince*) -+ os=-wince -+ ;; - -osfrose*) - os=-osfrose - ;; -@@ -955,14 +1185,23 @@ - -acis*) - os=-aos - ;; -+ -atheos*) -+ os=-atheos -+ ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; -+ -nova*) -+ os=-rtmk-nova -+ ;; - -ns2 ) -- os=-nextstep2 -+ os=-nextstep2 -+ ;; -+ -nsk*) -+ os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) -@@ -977,9 +1216,6 @@ - -oss*) - os=-sysv3 - ;; -- -qnx) -- os=-qnx4 -- ;; - -svr4) - os=-sysv4 - ;; -@@ -1001,8 +1237,14 @@ - -xenix) - os=-xenix - ;; -- -*mint | -*MiNT) -- os=-mint -+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) -+ os=-mint -+ ;; -+ -aros*) -+ os=-aros -+ ;; -+ -kaos*) -+ os=-kaos - ;; - -none) - ;; -@@ -1035,7 +1277,11 @@ - arm*-semi) - os=-aout - ;; -- pdp11-*) -+ # This must come before the *-dec entry. -+ pdp10-*) -+ os=-tops20 -+ ;; -+ pdp11-*) - os=-none - ;; - *-dec | vax-*) -@@ -1062,6 +1308,9 @@ - mips*-*) - os=-elf - ;; -+ or32-*) -+ os=-coff -+ ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; -@@ -1125,25 +1374,25 @@ - *-next) - os=-nextstep3 - ;; -- *-gould) -+ *-gould) - os=-sysv - ;; -- *-highlevel) -+ *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; -- *-sgi) -+ *-sgi) - os=-irix - ;; -- *-siemens) -+ *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; -- f301-fujitsu) -+ f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) -@@ -1209,7 +1458,7 @@ - -ptx*) - vendor=sequent - ;; -- -vxsim* | -vxworks*) -+ -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) -@@ -1221,12 +1470,23 @@ - -mpw* | -macos*) - vendor=apple - ;; -- -*mint | -*MiNT) -+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; -+ -vos*) -+ vendor=stratus -+ ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; - esac - - echo $basic_machine$os -+exit 0 -+ -+# Local variables: -+# eval: (add-hook 'write-file-hooks 'time-stamp) -+# time-stamp-start: "timestamp='" -+# time-stamp-format: "%:y-%02m-%02d" -+# time-stamp-end: "'" -+# End: ---- glib1.2-1.2.10.orig/configure -+++ glib1.2-1.2.10/configure -@@ -38,9 +38,170 @@ - --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" - ac_help="$ac_help - --with-gnu-ld assume the C compiler uses GNU ld [default=no]" -+ -+# Find the correct PATH separator. Usually this is `:', but -+# DJGPP uses `;' like DOS. -+if test "X${PATH_SEPARATOR+set}" != Xset; then -+ UNAME=${UNAME-`uname 2>/dev/null`} -+ case X$UNAME in -+ *-DOS) lt_cv_sys_path_separator=';' ;; -+ *) lt_cv_sys_path_separator=':' ;; -+ esac -+ PATH_SEPARATOR=$lt_cv_sys_path_separator -+fi -+ -+ -+# Check that we are running under the correct shell. -+SHELL=${CONFIG_SHELL-/bin/sh} -+ -+case X$ECHO in -+X*--fallback-echo) -+ # Remove one level of quotation (which was required for Make). -+ ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` -+ ;; -+esac -+ -+echo=${ECHO-echo} -+if test "X$1" = X--no-reexec; then -+ # Discard the --no-reexec flag, and continue. -+ shift -+elif test "X$1" = X--fallback-echo; then -+ # Avoid inline document here, it may be left over -+ : -+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then -+ # Yippee, $echo works! -+ : -+else -+ # Restart under the correct shell. -+ exec $SHELL "$0" --no-reexec ${1+"$@"} -+fi -+ -+if test "X$1" = X--fallback-echo; then -+ # used as fallback echo -+ shift -+ cat </dev/null && -+ echo_test_string="`eval $cmd`" && -+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null -+ then -+ break -+ fi -+ done -+fi -+ -+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ : -+else -+ # The Solaris, AIX, and Digital Unix default echo programs unquote -+ # backslashes. This makes it impossible to quote backslashes using -+ # echo "$something" | sed 's/\\/\\\\/g' -+ # -+ # So, first we look for a working echo in the user's PATH. -+ -+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for dir in $PATH /usr/ucb; do -+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && -+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ echo="$dir/echo" -+ break -+ fi -+ done -+ IFS="$save_ifs" -+ -+ if test "X$echo" = Xecho; then -+ # We didn't find a better echo, so look for alternatives. -+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ # This shell has a builtin print -r that does the trick. -+ echo='print -r' -+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && -+ test "X$CONFIG_SHELL" != X/bin/ksh; then -+ # If we have ksh, try running configure again with it. -+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -+ export ORIGINAL_CONFIG_SHELL -+ CONFIG_SHELL=/bin/ksh -+ export CONFIG_SHELL -+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} -+ else -+ # Try using printf. -+ echo='printf %s\n' -+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ # Cool, printf works -+ : -+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && -+ test "X$echo_testing_string" = 'X\t' && -+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL -+ export CONFIG_SHELL -+ SHELL="$CONFIG_SHELL" -+ export SHELL -+ echo="$CONFIG_SHELL $0 --fallback-echo" -+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && -+ test "X$echo_testing_string" = 'X\t' && -+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ echo="$CONFIG_SHELL $0 --fallback-echo" -+ else -+ # maybe with a smaller string... -+ prev=: -+ -+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do -+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null -+ then -+ break -+ fi -+ prev="$cmd" -+ done -+ -+ if test "$prev" != 'sed 50q "$0"'; then -+ echo_test_string=`eval $prev` -+ export echo_test_string -+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} -+ else -+ # Oops. We lost completely, so just stick with echo. -+ echo=echo -+ fi -+ fi -+ fi -+ fi -+fi -+fi -+ -+# Copy echo and quote the copy suitably for passing to libtool from -+# the Makefile, instead of quoting the original, which is used later. -+ECHO=$echo -+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then -+ ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -+fi -+ -+ - ac_help="$ac_help - --disable-libtool-lock avoid locking (might break parallel builds)" - ac_help="$ac_help -+ --with-pic try to use only PIC/non-PIC objects [default=use both]" -+ac_help="$ac_help - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer" - if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then -@@ -618,6 +779,7 @@ - ac_config_sub=$ac_aux_dir/config.sub - ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -+am__api_version="1.4" - # Find a good install program. We prefer a C program (faster), - # so one script is as good as another. But avoid the broken or - # incompatible versions: -@@ -630,7 +792,7 @@ - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # ./install, which can be erroneously created by make from ./install.sh. - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 --echo "configure:634: checking for a BSD compatible install" >&5 -+echo "configure:796: checking for a BSD compatible install" >&5 - if test -z "$INSTALL"; then - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -683,7 +845,7 @@ - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 --echo "configure:687: checking whether build environment is sane" >&5 -+echo "configure:849: checking whether build environment is sane" >&5 - # Just in case - sleep 1 - echo timestamp > conftestfile -@@ -740,7 +902,7 @@ - test "$program_transform_name" = "" && program_transform_name="s,x,x," - - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 --echo "configure:744: checking whether ${MAKE-make} sets \${MAKE}" >&5 -+echo "configure:906: checking whether ${MAKE-make} sets \${MAKE}" >&5 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -778,21 +940,21 @@ - - - missing_dir=`cd $ac_aux_dir && pwd` --echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 --echo "configure:783: checking for working aclocal" >&5 -+echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6 -+echo "configure:945: checking for working aclocal-${am__api_version}" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. --if (aclocal --version) < /dev/null > /dev/null 2>&1; then -- ACLOCAL=aclocal -+if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then -+ ACLOCAL=aclocal-${am__api_version} - echo "$ac_t""found" 1>&6 - else -- ACLOCAL="$missing_dir/missing aclocal" -+ ACLOCAL="$missing_dir/missing aclocal-${am__api_version}" - echo "$ac_t""missing" 1>&6 - fi - - echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 --echo "configure:796: checking for working autoconf" >&5 -+echo "configure:958: checking for working autoconf" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. -@@ -804,21 +966,21 @@ - echo "$ac_t""missing" 1>&6 - fi - --echo $ac_n "checking for working automake""... $ac_c" 1>&6 --echo "configure:809: checking for working automake" >&5 -+echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 -+echo "configure:971: checking for working automake-${am__api_version}" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. --if (automake --version) < /dev/null > /dev/null 2>&1; then -- AUTOMAKE=automake -+if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then -+ AUTOMAKE=automake-${am__api_version} - echo "$ac_t""found" 1>&6 - else -- AUTOMAKE="$missing_dir/missing automake" -+ AUTOMAKE="$missing_dir/missing automake-${am__api_version}" - echo "$ac_t""missing" 1>&6 - fi - - echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 --echo "configure:822: checking for working autoheader" >&5 -+echo "configure:984: checking for working autoheader" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. -@@ -831,7 +993,7 @@ - fi - - echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 --echo "configure:835: checking for working makeinfo" >&5 -+echo "configure:997: checking for working makeinfo" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. -@@ -871,11 +1033,164 @@ - EOF - - -+# Find the correct PATH separator. Usually this is `:', but -+# DJGPP uses `;' like DOS. -+if test "X${PATH_SEPARATOR+set}" != Xset; then -+ UNAME=${UNAME-`uname 2>/dev/null`} -+ case X$UNAME in -+ *-DOS) lt_cv_sys_path_separator=';' ;; -+ *) lt_cv_sys_path_separator=':' ;; -+ esac -+ PATH_SEPARATOR=$lt_cv_sys_path_separator -+fi -+ -+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -+echo "configure:1049: checking for Cygwin environment" >&5 -+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_cygwin=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_cygwin=no -+fi -+rm -f conftest* -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_cygwin" 1>&6 -+CYGWIN= -+test "$ac_cv_cygwin" = yes && CYGWIN=yes -+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -+echo "configure:1082: checking for mingw32 environment" >&5 -+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_mingw32=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_mingw32=no -+fi -+rm -f conftest* -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_mingw32" 1>&6 -+MINGW32= -+test "$ac_cv_mingw32" = yes && MINGW32=yes -+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -+echo "configure:1111: checking how to run the C preprocessor" >&5 -+# On Suns, sometimes $CPP names a directory. -+if test -n "$CPP" && test -d "$CPP"; then -+ CPP= -+fi -+if test -z "$CPP"; then -+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ # This must be in double quotes, not single quotes, because CPP may get -+ # substituted into the Makefile and "${CC-cc}" will confuse make. -+ CPP="${CC-cc} -E" -+ # On the NeXT, cc -E runs the code through the compiler's parser, -+ # not just through cpp. -+ cat > conftest.$ac_ext < -+Syntax Error -+EOF -+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+{ (eval echo configure:1132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -+if test -z "$ac_err"; then -+ : -+else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ CPP="${CC-cc} -E -traditional-cpp" -+ cat > conftest.$ac_ext < -+Syntax Error -+EOF -+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+{ (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -+if test -z "$ac_err"; then -+ : -+else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ CPP="${CC-cc} -nologo -E" -+ cat > conftest.$ac_ext < -+Syntax Error -+EOF -+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+{ (eval echo configure:1166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -+if test -z "$ac_err"; then -+ : -+else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ CPP=/lib/cpp -+fi -+rm -f conftest* -+fi -+rm -f conftest* -+fi -+rm -f conftest* -+ ac_cv_prog_CPP="$CPP" -+fi -+ CPP="$ac_cv_prog_CPP" -+else -+ ac_cv_prog_CPP="$CPP" -+fi -+echo "$ac_t""$CPP" 1>&6 -+ - # Check whether --enable-shared or --disable-shared was given. - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} --case "$enableval" in -+case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) -@@ -898,7 +1213,7 @@ - if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} --case "$enableval" in -+case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) -@@ -921,7 +1236,7 @@ - if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} --case "$enableval" in -+case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) -@@ -947,7 +1262,7 @@ - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 --echo "configure:951: checking host system type" >&5 -+echo "configure:1266: checking host system type" >&5 - - host_alias=$host - case "$host_alias" in -@@ -968,7 +1283,7 @@ - echo "$ac_t""$host" 1>&6 - - echo $ac_n "checking build system type""... $ac_c" 1>&6 --echo "configure:972: checking build system type" >&5 -+echo "configure:1287: checking build system type" >&5 - - build_alias=$build - case "$build_alias" in -@@ -985,40 +1300,10 @@ - build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - echo "$ac_t""$build" 1>&6 - --# Extract the first word of "ranlib", so it can be a program name with args. --set dummy ranlib; ac_word=$2 --echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:992: checking for $ac_word" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- if test -n "$RANLIB"; then -- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. --else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -- ac_dummy="$PATH" -- for ac_dir in $ac_dummy; do -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$ac_word; then -- ac_cv_prog_RANLIB="ranlib" -- break -- fi -- done -- IFS="$ac_save_ifs" -- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" --fi --fi --RANLIB="$ac_cv_prog_RANLIB" --if test -n "$RANLIB"; then -- echo "$ac_t""$RANLIB" 1>&6 --else -- echo "$ac_t""no" 1>&6 --fi -- - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1022: checking for $ac_word" >&5 -+echo "configure:1307: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1048,7 +1333,7 @@ - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1052: checking for $ac_word" >&5 -+echo "configure:1337: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1099,7 +1384,7 @@ - # Extract the first word of "cl", so it can be a program name with args. - set dummy cl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1103: checking for $ac_word" >&5 -+echo "configure:1388: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1131,7 +1416,7 @@ - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 --echo "configure:1135: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 -+echo "configure:1420: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -@@ -1142,12 +1427,12 @@ - - cat > conftest.$ac_ext << EOF - --#line 1146 "configure" -+#line 1431 "configure" - #include "confdefs.h" - - main(){return(0);} - EOF --if { (eval echo configure:1151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then -@@ -1173,12 +1458,12 @@ - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 --echo "configure:1177: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -+echo "configure:1462: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 --echo "configure:1182: checking whether we are using GNU C" >&5 -+echo "configure:1467: checking whether we are using GNU C" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1187,7 +1472,7 @@ - yes; - #endif - EOF --if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then -+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no -@@ -1206,7 +1491,7 @@ - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 --echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5 -+echo "configure:1495: checking whether ${CC-cc} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1246,12 +1531,18 @@ - fi - - ac_prog=ld --if test "$ac_cv_prog_gcc" = yes; then -+if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 --echo "configure:1253: checking for ld used by GCC" >&5 -- ac_prog=`($CC -print-prog-name=ld) 2>&5` -- case "$ac_prog" in -+echo "configure:1538: checking for ld used by GCC" >&5 -+ case $host in -+ *-*-mingw*) -+ # gcc leaves a trailing carriage return which upsets mingw -+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -+ *) -+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -+ esac -+ case $ac_prog in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -@@ -1273,24 +1564,24 @@ - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 --echo "configure:1277: checking for GNU ld" >&5 -+echo "configure:1568: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 --echo "configure:1280: checking for non-GNU ld" >&5 -+echo "configure:1571: checking for non-GNU ld" >&5 - fi --if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then -+if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -z "$LD"; then -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- ac_cv_path_LD="$ac_dir/$ac_prog" -+ lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. -- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then -+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break -@@ -1299,11 +1590,11 @@ - done - IFS="$ac_save_ifs" - else -- ac_cv_path_LD="$LD" # Let the user override the test with a path. -+ lt_cv_path_LD="$LD" # Let the user override the test with a path. - fi - fi - --LD="$ac_cv_path_LD" -+LD="$lt_cv_path_LD" - if test -n "$LD"; then - echo "$ac_t""$LD" 1>&6 - else -@@ -1311,245 +1602,3880 @@ - fi - test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 --echo "configure:1315: checking if the linker ($LD) is GNU ld" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then -+echo "configure:1606: checking if the linker ($LD) is GNU ld" >&5 -+if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. - if $LD -v 2>&1 &5; then -- ac_cv_prog_gnu_ld=yes -+ lt_cv_prog_gnu_ld=yes - else -- ac_cv_prog_gnu_ld=no -+ lt_cv_prog_gnu_ld=no - fi - fi - --echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 -+echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6 -+with_gnu_ld=$lt_cv_prog_gnu_ld -+ -+ -+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -+echo "configure:1623: checking for $LD option to reload object files" >&5 -+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ lt_cv_ld_reload_flag='-r' -+fi - -+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 -+reload_flag=$lt_cv_ld_reload_flag -+test -n "$reload_flag" && reload_flag=" $reload_flag" - - echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 --echo "configure:1331: checking for BSD-compatible nm" >&5 --if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then -+echo "configure:1635: checking for BSD-compatible nm" >&5 -+if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -n "$NM"; then - # Let the user override the test. -- ac_cv_path_NM="$NM" -+ lt_cv_path_NM="$NM" - else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then -+ tmp_nm=$ac_dir/${ac_tool_prefix}nm -+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored -- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -- ac_cv_path_NM="$ac_dir/nm -B" -+ # Tru64's nm complains that /dev/null is an invalid object file -+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -B" - break -- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -- ac_cv_path_NM="$ac_dir/nm -p" -+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -p" - break - else -- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but -+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" -- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -+fi -+fi -+ -+NM="$lt_cv_path_NM" -+echo "$ac_t""$NM" 1>&6 -+ -+echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6 -+echo "configure:1673: checking for a sed that does not truncate output" >&5 -+if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ # Loop through the user's path and test for sed and gsed. -+# Then use that list of sed's as ones to test for truncation. -+as_executable_p="test -f" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_prog in sed gsed; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then -+ _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" -+ fi -+ done -+ done -+done -+ -+ # Create a temporary directory, and hook for its removal unless debugging. -+$debug || -+{ -+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 -+ trap '{ (exit 1); exit 1; }' 1 2 13 15 -+} -+ -+# Create a (secure) tmp directory for tmp files. -+: ${TMPDIR=/tmp} -+{ -+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && -+ test -n "$tmp" && test -d "$tmp" -+} || -+{ -+ tmp=$TMPDIR/sed$$-$RANDOM -+ (umask 077 && mkdir $tmp) -+} || -+{ -+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 -+ { (exit 1); exit 1; } -+} -+ _max=0 -+ _count=0 -+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris -+ # along with /bin/sed that truncates output. -+ for _sed in $_sed_list /usr/xpg4/bin/sed; do -+ test ! -f ${_sed} && break -+ cat /dev/null > "$tmp/sed.in" -+ _count=0 -+ echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" -+ # Check for GNU sed and select it if it is found. -+ if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then -+ lt_cv_path_SED=${_sed} -+ break -+ fi -+ while true; do -+ cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" -+ mv "$tmp/sed.tmp" "$tmp/sed.in" -+ cp "$tmp/sed.in" "$tmp/sed.nl" -+ echo >>"$tmp/sed.nl" -+ ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break -+ cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break -+ # 40000 chars as input seems more than enough -+ test $_count -gt 10 && break -+ _count=`expr $_count + 1` -+ if test $_count -gt $_max; then -+ _max=$_count -+ lt_cv_path_SED=$_sed -+ fi -+ done -+ done -+ rm -rf "$tmp" -+ -+fi -+ -+if test "X$SED" != "X"; then -+ lt_cv_path_SED=$SED -+else -+ SED=$lt_cv_path_SED -+fi -+echo "$ac_t""$SED" 1>&6 -+ -+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -+echo "configure:1757: checking whether ln -s works" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ rm -f conftestdata -+if ln -s X conftestdata 2>/dev/null -+then -+ rm -f conftestdata -+ ac_cv_prog_LN_S="ln -s" -+else -+ ac_cv_prog_LN_S=ln - fi - fi -+LN_S="$ac_cv_prog_LN_S" -+if test "$ac_cv_prog_LN_S" = "ln -s"; then -+ echo "$ac_t""yes" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6 -+echo "configure:1778: checking how to recognise dependent libraries" >&5 -+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ lt_cv_file_magic_cmd='$MAGIC_CMD' -+lt_cv_file_magic_test_file= -+lt_cv_deplibs_check_method='unknown' -+# Need to set the preceding variable on all platforms that support -+# interlibrary dependencies. -+# 'none' -- dependencies not supported. -+# `unknown' -- same as none, but documents that we really don't know. -+# 'pass_all' -- all dependencies passed with no checks. -+# 'test_compile' -- check by making test program. -+# 'file_magic [[regex]]' -- check by looking for files in library path -+# which responds to the $file_magic_cmd with a given egrep regex. -+# If you have `file' or equivalent on your system and you're not sure -+# whether `pass_all' will *always* work, you probably want this one. -+ -+case $host_os in -+aix4* | aix5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+beos*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+bsdi4*) -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ lt_cv_file_magic_test_file=/shlib/libc.so -+ ;; -+ -+cygwin* | mingw* | pw32*) -+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ lt_cv_file_magic_cmd='$OBJDUMP -f' -+ ;; -+ -+darwin* | rhapsody*) -+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ case "$host_os" in -+ rhapsody* | darwin1.[012]) -+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` -+ ;; -+ *) # Darwin 1.3 on -+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' -+ ;; -+ esac -+ ;; -+ -+freebsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -+ case $host_cpu in -+ i*86 ) -+ # Not sure whether the presence of OpenBSD here was a mistake. -+ # Let's accept both of them until this is cleared up. -+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -+ ;; -+ esac -+ else -+ lt_cv_deplibs_check_method=pass_all -+ fi -+ ;; -+ -+gnu*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+hpux10.20*|hpux11*) -+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=/usr/lib/libc.sl -+ ;; -+ -+irix5* | irix6* | nonstopux*) -+ case $host_os in -+ irix5* | nonstopux*) -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" -+ ;; -+ *) -+ case $LD in -+ *-32|*"-32 ") libmagic=32-bit;; -+ *-n32|*"-n32 ") libmagic=N32;; -+ *-64|*"-64 ") libmagic=64-bit;; -+ *) libmagic=never-match;; -+ esac -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" -+ ;; -+ esac -+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+# This must be Linux ELF. -+linux-gnu*) -+ case $host_cpu in -+ alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) -+ lt_cv_deplibs_check_method=pass_all ;; -+ *) -+ # glibc up to 2.1.1 does not perform some relocations on ARM -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; -+ esac -+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` -+ ;; -+ -+netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -+ else -+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' -+ fi -+ ;; -+ -+newos6*) -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=/usr/lib/libnls.so -+ ;; -+ -+openbsd*) -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' -+ else -+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' -+ fi -+ ;; -+ -+osf3* | osf4* | osf5*) -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' -+ lt_cv_file_magic_test_file=/shlib/libc.so -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+sco3.2v5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+solaris*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=/lib/libc.so -+ ;; -+ -+sysv5uw[78]* | sysv4*uw2*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ case $host_vendor in -+ motorola) -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` -+ ;; -+ ncr) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ sequent) -+ lt_cv_file_magic_cmd='/bin/file' -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' -+ ;; -+ sni) -+ lt_cv_file_magic_cmd='/bin/file' -+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" -+ lt_cv_file_magic_test_file=/lib/libc.so -+ ;; -+ siemens) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+ -+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 -+file_magic_cmd=$lt_cv_file_magic_cmd -+deplibs_check_method=$lt_cv_deplibs_check_method -+ -+echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -+echo "configure:1964: checking for object suffix" >&5 -+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ rm -f conftest* -+echo 'int i = 1;' > conftest.$ac_ext -+if { (eval echo configure:1970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ for ac_file in conftest.*; do -+ case $ac_file in -+ *.c) ;; -+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; -+ esac -+ done -+else -+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_objext" 1>&6 -+OBJEXT=$ac_cv_objext -+ac_objext=$ac_cv_objext -+ -+ -+ -+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -+echo "configure:1990: checking for executable suffix" >&5 -+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then -+ ac_cv_exeext=.exe -+else -+ rm -f conftest* -+ echo 'int main () { return 0; }' > conftest.$ac_ext -+ ac_cv_exeext= -+ if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then -+ for file in conftest.*; do -+ case $file in -+ *.$ac_ext | *.c | *.o | *.obj) ;; -+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; -+ esac -+ done -+ else -+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } -+ fi -+ rm -f conftest* -+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no -+fi -+fi -+ -+EXEEXT="" -+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -+echo "$ac_t""${ac_cv_exeext}" 1>&6 -+ac_exeext=$EXEEXT -+ -+if test $host != $build; then -+ ac_tool_prefix=${host_alias}- -+else -+ ac_tool_prefix= -+fi -+ -+ -+ -+ -+# Check for command to grab the raw symbol name followed by C symbol from nm. -+echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -+echo "configure:2031: checking command to parse $NM output" >&5 -+if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+# These are sane defaults that work on at least a few old systems. -+# [They come from Ultrix. What could be older than Ultrix?!! ;)] -+ -+# Character class describing NM global symbol codes. -+symcode='[BCDEGRST]' -+ -+# Regexp to match symbols that can be accessed directly from C. -+sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -+ -+# Transform the above into a raw symbol and a C symbol. -+symxfrm='\1 \2\3 \3' -+ -+# Transform an extracted symbol line into a proper C declaration -+lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" -+ -+# Transform an extracted symbol line into symbol name and symbol address -+lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ -+# Define system-specific variables. -+case $host_os in -+aix*) -+ symcode='[BCDT]' -+ ;; -+cygwin* | mingw* | pw32*) -+ symcode='[ABCDGISTW]' -+ ;; -+hpux*) # Its linker distinguishes data from code symbols -+ lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -+ lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ ;; -+irix* | nonstopux*) -+ symcode='[BCDEGRST]' -+ ;; -+osf*) -+ symcode='[BCDEGQRST]' -+ ;; -+solaris* | sysv5*) -+ symcode='[BDT]' -+ ;; -+sysv4) -+ symcode='[DFNSTU]' -+ ;; -+esac -+ -+# Handle CRLF in mingw tool chain -+opt_cr= -+case $host_os in -+mingw*) -+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp -+ ;; -+esac -+ -+# If we're using GNU nm, then use its standard symbol codes. -+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then -+ symcode='[ABCDGISTW]' -+fi -+ -+# Try without a prefix undercore, then with it. -+for ac_symprfx in "" "_"; do -+ -+ # Write the raw and C identifiers. -+lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" -+ -+ # Check to see that the pipe works correctly. -+ pipe_works=no -+ rm -f conftest* -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ # Now try to grab the symbols. -+ nlist=conftest.nm -+ if { (eval echo configure:2117: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then -+ # Try sorting and uniquifying the output. -+ if sort "$nlist" | uniq > "$nlist"T; then -+ mv -f "$nlist"T "$nlist" -+ else -+ rm -f "$nlist"T -+ fi -+ -+ # Make sure that we snagged all the symbols we need. -+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then -+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then -+ cat < conftest.$ac_ext -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+EOF -+ # Now generate the symbol file. -+ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' -+ -+ cat <> conftest.$ac_ext -+#if defined (__STDC__) && __STDC__ -+# define lt_ptr void * -+#else -+# define lt_ptr char * -+# define const -+#endif -+ -+/* The mapping between symbol names and symbols. */ -+const struct { -+ const char *name; -+ lt_ptr address; -+} -+lt_preloaded_symbols[] = -+{ -+EOF -+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext -+ cat <<\EOF >> conftest.$ac_ext -+ {0, (lt_ptr) 0} -+}; -+ -+#ifdef __cplusplus -+} -+#endif -+EOF -+ # Now try linking the two files. -+ mv conftest.$ac_objext conftstm.$ac_objext -+ save_LIBS="$LIBS" -+ save_CFLAGS="$CFLAGS" -+ LIBS="conftstm.$ac_objext" -+ CFLAGS="$CFLAGS$no_builtin_flag" -+ if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then -+ pipe_works=yes -+ fi -+ LIBS="$save_LIBS" -+ CFLAGS="$save_CFLAGS" -+ else -+ echo "cannot find nm_test_func in $nlist" >&5 -+ fi -+ else -+ echo "cannot find nm_test_var in $nlist" >&5 -+ fi -+ else -+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 -+ fi -+ else -+ echo "$progname: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ fi -+ rm -f conftest* conftst* -+ -+ # Do not use the global_symbol_pipe unless it works. -+ if test "$pipe_works" = yes; then -+ break -+ else -+ lt_cv_sys_global_symbol_pipe= -+ fi -+done -+ -+fi -+ -+global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" -+if test -z "$lt_cv_sys_global_symbol_pipe"; then -+ global_symbol_to_cdecl= -+ global_symbol_to_c_name_address= -+else -+ global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" -+ global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" -+fi -+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; -+then -+ echo "$ac_t""failed" 1>&6 -+else -+ echo "$ac_t""ok" 1>&6 -+fi -+ -+for ac_hdr in dlfcn.h -+do -+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -+echo "configure:2217: checking for $ac_hdr" >&5 -+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+EOF -+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+{ (eval echo configure:2227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -+if test -z "$ac_err"; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" -+else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=no" -+fi -+rm -f conftest* -+fi -+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -+ cat >> confdefs.h <&6 -+fi -+done -+ -+ -+ -+ -+ -+ -+# Only perform the check for file, if the check method requires it -+case $deplibs_check_method in -+file_magic*) -+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then -+ echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -+echo "configure:2263: checking for ${ac_tool_prefix}file" >&5 -+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ case $MAGIC_CMD in -+ /*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. -+ ;; -+ *) -+ ac_save_MAGIC_CMD="$MAGIC_CMD" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="/usr/bin:$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/${ac_tool_prefix}file; then -+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" -+ if test -n "$file_magic_test_file"; then -+ case $deplibs_check_method in -+ "file_magic "*) -+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" -+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -+ egrep "$file_magic_regex" > /dev/null; then -+ : -+ else -+ cat <&2 -+ -+*** Warning: the command libtool uses to detect shared libraries, -+*** $file_magic_cmd, produces output that libtool cannot recognize. -+*** The result is that libtool may fail to recognize shared libraries -+*** as such. This will affect the creation of libtool libraries that -+*** depend on shared libraries, but programs linked with such libtool -+*** libraries will work regardless of this problem. Nevertheless, you -+*** may want to report the problem to your system manager and/or to -+*** bug-libtool@gnu.org -+ -+EOF -+ fi ;; -+ esac -+ fi -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ MAGIC_CMD="$ac_save_MAGIC_CMD" -+ ;; -+esac -+fi -+ -+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+if test -n "$MAGIC_CMD"; then -+ echo "$ac_t""$MAGIC_CMD" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+if test -z "$lt_cv_path_MAGIC_CMD"; then -+ if test -n "$ac_tool_prefix"; then -+ echo $ac_n "checking for file""... $ac_c" 1>&6 -+echo "configure:2325: checking for file" >&5 -+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ case $MAGIC_CMD in -+ /*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. -+ ;; -+ *) -+ ac_save_MAGIC_CMD="$MAGIC_CMD" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="/usr/bin:$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/file; then -+ lt_cv_path_MAGIC_CMD="$ac_dir/file" -+ if test -n "$file_magic_test_file"; then -+ case $deplibs_check_method in -+ "file_magic "*) -+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" -+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -+ egrep "$file_magic_regex" > /dev/null; then -+ : -+ else -+ cat <&2 -+ -+*** Warning: the command libtool uses to detect shared libraries, -+*** $file_magic_cmd, produces output that libtool cannot recognize. -+*** The result is that libtool may fail to recognize shared libraries -+*** as such. This will affect the creation of libtool libraries that -+*** depend on shared libraries, but programs linked with such libtool -+*** libraries will work regardless of this problem. Nevertheless, you -+*** may want to report the problem to your system manager and/or to -+*** bug-libtool@gnu.org -+ -+EOF -+ fi ;; -+ esac -+ fi -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ MAGIC_CMD="$ac_save_MAGIC_CMD" -+ ;; -+esac -+fi -+ -+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+if test -n "$MAGIC_CMD"; then -+ echo "$ac_t""$MAGIC_CMD" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ else -+ MAGIC_CMD=: -+ fi -+fi -+ -+ fi -+ ;; -+esac -+ -+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -+set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:2396: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$RANLIB"; then -+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -+else -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/$ac_word; then -+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+fi -+fi -+RANLIB="$ac_cv_prog_RANLIB" -+if test -n "$RANLIB"; then -+ echo "$ac_t""$RANLIB" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ -+if test -z "$ac_cv_prog_RANLIB"; then -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "ranlib", so it can be a program name with args. -+set dummy ranlib; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:2428: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$RANLIB"; then -+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -+else -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/$ac_word; then -+ ac_cv_prog_RANLIB="ranlib" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -+fi -+fi -+RANLIB="$ac_cv_prog_RANLIB" -+if test -n "$RANLIB"; then -+ echo "$ac_t""$RANLIB" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+else -+ RANLIB=":" -+fi -+fi -+ -+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -+set dummy ${ac_tool_prefix}strip; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:2463: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$STRIP"; then -+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -+else -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/$ac_word; then -+ ac_cv_prog_STRIP="${ac_tool_prefix}strip" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+fi -+fi -+STRIP="$ac_cv_prog_STRIP" -+if test -n "$STRIP"; then -+ echo "$ac_t""$STRIP" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ -+if test -z "$ac_cv_prog_STRIP"; then -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "strip", so it can be a program name with args. -+set dummy strip; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:2495: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$STRIP"; then -+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -+else -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/$ac_word; then -+ ac_cv_prog_STRIP="strip" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" -+fi -+fi -+STRIP="$ac_cv_prog_STRIP" -+if test -n "$STRIP"; then -+ echo "$ac_t""$STRIP" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+else -+ STRIP=":" -+fi -+fi -+ -+ -+enable_dlopen=no -+enable_win32_dll=no -+ -+# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -+if test "${enable_libtool_lock+set}" = set; then -+ enableval="$enable_libtool_lock" -+ : -+fi -+ -+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -+ -+# Some flags need to be propagated to the compiler or linker for good -+# libtool support. -+case $host in -+*-*-irix6*) -+ # Find out which ABI we are using. -+ echo '#line 2544 "configure"' > conftest.$ac_ext -+ if { (eval echo configure:2545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *32-bit*) -+ LD="${LD-ld} -32" -+ ;; -+ *N32*) -+ LD="${LD-ld} -n32" -+ ;; -+ *64-bit*) -+ LD="${LD-ld} -64" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ -+*-*-sco3.2v5*) -+ # On SCO OpenServer 5, we need -belf to get full-featured binaries. -+ SAVE_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -belf" -+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -+echo "configure:2566: checking whether the C compiler needs -belf" >&5 -+if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+ ac_ext=c -+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -+cross_compiling=$ac_cv_prog_cc_cross -+ -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ lt_cv_cc_needs_belf=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ lt_cv_cc_needs_belf=no -+fi -+rm -f conftest* -+ ac_ext=c -+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -+cross_compiling=$ac_cv_prog_cc_cross -+ -+fi -+ -+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 -+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then -+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -+ CFLAGS="$SAVE_CFLAGS" -+ fi -+ ;; -+ -+ -+esac -+ -+# Sed substitution that helps us do robust quoting. It backslashifies -+# metacharacters that are still active within double-quoted strings. -+Xsed='sed -e s/^X//' -+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' -+ -+# Same as above, but do not quote variable references. -+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' -+ -+# Sed substitution to delay expansion of an escaped shell variable in a -+# double_quote_subst'ed string. -+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -+ -+# Constants: -+rm="rm -f" -+ -+# Global variables: -+default_ofile=libtool -+can_build_shared=yes -+ -+# All known linkers require a `.a' archive for static linking (except M$VC, -+# which needs '.lib'). -+libext=a -+ltmain="$ac_aux_dir/ltmain.sh" -+ofile="$default_ofile" -+with_gnu_ld="$lt_cv_prog_gnu_ld" -+need_locks="$enable_libtool_lock" -+ -+old_CC="$CC" -+old_CFLAGS="$CFLAGS" -+ -+# Set sane defaults for various variables -+test -z "$AR" && AR=ar -+test -z "$AR_FLAGS" && AR_FLAGS=cru -+test -z "$AS" && AS=as -+test -z "$CC" && CC=cc -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+test -z "$LD" && LD=ld -+test -z "$LN_S" && LN_S="ln -s" -+test -z "$MAGIC_CMD" && MAGIC_CMD=file -+test -z "$NM" && NM=nm -+test -z "$OBJDUMP" && OBJDUMP=objdump -+test -z "$RANLIB" && RANLIB=: -+test -z "$STRIP" && STRIP=: -+test -z "$ac_objext" && ac_objext=o -+ -+if test x"$host" != x"$build"; then -+ ac_tool_prefix=${host_alias}- -+else -+ ac_tool_prefix= -+fi -+ -+# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -+case $host_os in -+linux-gnu*) ;; -+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -+esac -+ -+case $host_os in -+aix3*) -+ # AIX sometimes has problems with the GCC collect2 program. For some -+ # reason, if we set the COLLECT_NAMES environment variable, the problems -+ # vanish in a puff of smoke. -+ if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+ fi -+ ;; -+esac -+ -+# Determine commands to create old-style static archives. -+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -+old_postinstall_cmds='chmod 644 $oldlib' -+old_postuninstall_cmds= -+ -+if test -n "$RANLIB"; then -+ case $host_os in -+ openbsd*) -+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" -+ ;; -+ *) -+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -+ ;; -+ esac -+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -+fi -+ -+# Allow CC to be a program name with arguments. -+set dummy $CC -+compiler="$2" -+ -+echo $ac_n "checking for objdir""... $ac_c" 1>&6 -+echo "configure:2706: checking for objdir" >&5 -+rm -f .libs 2>/dev/null -+mkdir .libs 2>/dev/null -+if test -d .libs; then -+ objdir=.libs -+else -+ # MS-DOS does not allow filenames that begin with a dot. -+ objdir=_libs -+fi -+rmdir .libs 2>/dev/null -+echo "$ac_t""$objdir" 1>&6 -+ -+ -+# Check whether --with-pic or --without-pic was given. -+if test "${with_pic+set}" = set; then -+ withval="$with_pic" -+ pic_mode="$withval" -+else -+ pic_mode=default -+fi -+ -+test -z "$pic_mode" && pic_mode=default -+ -+# We assume here that the value for lt_cv_prog_cc_pic will not be cached -+# in isolation, and that seeing it set (from the cache) indicates that -+# the associated values are set (in the cache) correctly too. -+echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 -+echo "configure:2733: checking for $compiler option to produce PIC" >&5 -+if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_shlib= -+ lt_cv_prog_cc_wl= -+ lt_cv_prog_cc_static= -+ lt_cv_prog_cc_no_builtin= -+ lt_cv_prog_cc_can_build_shared=$can_build_shared -+ -+ if test "$GCC" = yes; then -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-static' -+ -+ case $host_os in -+ aix*) -+ # Below there is a dirty hack to force normal static linking with -ldl -+ # The problem is because libdl dynamically linked with both libc and -+ # libC (AIX C++ library), which obviously doesn't included in libraries -+ # list by gcc. This cause undefined symbols with -static flags. -+ # This hack allows C programs to be linked with "-static -ldl", but -+ # not sure about C++ programs. -+ lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" -+ ;; -+ amigaos*) -+ # FIXME: we need at least 68020 code to build shared libraries, but -+ # adding the `-m68020' flag to GCC prevents building anything better, -+ # like `-m68040'. -+ lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' -+ ;; -+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -+ # PIC is the default for these OSes. -+ ;; -+ darwin* | rhapsody*) -+ # PIC is the default on this platform -+ # Common symbols not allowed in MH_DYLIB files -+ lt_cv_prog_cc_pic='-fno-common' -+ ;; -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' -+ ;; -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ lt_cv_prog_cc_pic=-Kconform_pic -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic='-fPIC' -+ ;; -+ esac -+ else -+ # PORTME Check for PIC flags for the system compiler. -+ case $host_os in -+ aix3* | aix4* | aix5*) -+ lt_cv_prog_cc_wl='-Wl,' -+ # All AIX code is PIC. -+ if test "$host_cpu" = ia64; then -+ # AIX 5 now supports IA64 processor -+ lt_cv_prog_cc_static='-Bstatic' -+ else -+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' -+ fi -+ ;; -+ -+ hpux9* | hpux10* | hpux11*) -+ # Is there a better lt_cv_prog_cc_static that works with the bundled CC? -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" -+ lt_cv_prog_cc_pic='+Z' -+ ;; -+ -+ irix5* | irix6* | nonstopux*) -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' -+ # PIC (with -KPIC) is the default. -+ ;; -+ -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' -+ ;; -+ -+ newsos6) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ ;; -+ -+ osf3* | osf4* | osf5*) -+ # All OSF/1 code is PIC. -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' -+ ;; -+ -+ sco3.2v5*) -+ lt_cv_prog_cc_pic='-Kpic' -+ lt_cv_prog_cc_static='-dn' -+ lt_cv_prog_cc_shlib='-belf' -+ ;; -+ -+ solaris*) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ sunos4*) -+ lt_cv_prog_cc_pic='-PIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Qoption ld ' -+ ;; -+ -+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ uts4*) -+ lt_cv_prog_cc_pic='-pic' -+ lt_cv_prog_cc_static='-Bstatic' -+ ;; -+ -+ sysv4*MP*) -+ if test -d /usr/nec ;then -+ lt_cv_prog_cc_pic='-Kconform_pic' -+ lt_cv_prog_cc_static='-Bstatic' -+ fi -+ ;; -+ -+ *) -+ lt_cv_prog_cc_can_build_shared=no -+ ;; -+ esac -+ fi -+ -+fi -+ -+if test -z "$lt_cv_prog_cc_pic"; then -+ echo "$ac_t""none" 1>&6 -+else -+ echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6 -+ -+ # Check to make sure the pic_flag actually works. -+ echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 -+echo "configure:2881: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 -+ if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ case $host_os in -+ hpux9* | hpux10* | hpux11*) -+ # On HP-UX, both CC and GCC only warn that PIC is supported... then -+ # they create non-PIC objects. So, if there were any warnings, we -+ # assume that PIC is not supported. -+ if test -s conftest.err; then -+ lt_cv_prog_cc_pic_works=no -+ else -+ lt_cv_prog_cc_pic_works=yes -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic_works=yes -+ ;; -+ esac -+ -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ lt_cv_prog_cc_pic_works=no -+ -+fi -+rm -f conftest* -+ CFLAGS="$save_CFLAGS" -+ -+fi -+ -+ -+ if test "X$lt_cv_prog_cc_pic_works" = Xno; then -+ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_can_build_shared=no -+ else -+ lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" -+ fi -+ -+ echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6 -+fi -+ -+# Check for any special shared library compilation flags. -+if test -n "$lt_cv_prog_cc_shlib"; then -+ echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2 -+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : -+ else -+ echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2 -+ lt_cv_prog_cc_can_build_shared=no -+ fi -+fi -+ -+echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 -+echo "configure:2947: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 -+if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ lt_cv_prog_cc_static_works=no -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ lt_cv_prog_cc_static_works=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ LDFLAGS="$save_LDFLAGS" -+ -+fi -+ -+ -+# Belt *and* braces to stop my trousers falling down: -+test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= -+echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6 -+ -+pic_flag="$lt_cv_prog_cc_pic" -+special_shlib_compile_flags="$lt_cv_prog_cc_shlib" -+wl="$lt_cv_prog_cc_wl" -+link_static_flag="$lt_cv_prog_cc_static" -+no_builtin_flag="$lt_cv_prog_cc_no_builtin" -+can_build_shared="$lt_cv_prog_cc_can_build_shared" -+ -+ -+# Check to see if options -o and -c are simultaneously supported by compiler -+echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 -+echo "configure:2989: checking if $compiler supports -c -o file.$ac_objext" >&5 -+if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+$rm -r conftest 2>/dev/null -+mkdir conftest -+cd conftest -+echo "int some_variable = 0;" > conftest.$ac_ext -+mkdir out -+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -+# that will create temporary files in the current directory regardless of -+# the output directory. Thus, making CWD read-only will cause this test -+# to fail, enabling locking or at least warning the user not to do parallel -+# builds. -+chmod -w . -+save_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" -+compiler_c_o=no -+if { (eval echo configure:3008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s out/conftest.err; then -+ lt_cv_compiler_c_o=no -+ else -+ lt_cv_compiler_c_o=yes -+ fi -+else -+ # Append any errors to the config.log. -+ cat out/conftest.err 1>&5 -+ lt_cv_compiler_c_o=no -+fi -+CFLAGS="$save_CFLAGS" -+chmod u+w . -+$rm conftest* out/* -+rmdir out -+cd .. -+rmdir conftest -+$rm -r conftest 2>/dev/null -+ -+fi -+ -+compiler_c_o=$lt_cv_compiler_c_o -+echo "$ac_t""$compiler_c_o" 1>&6 -+ -+if test x"$compiler_c_o" = x"yes"; then -+ # Check to see if we can write to a .lo -+ echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 -+echo "configure:3037: checking if $compiler supports -c -o file.lo" >&5 -+ if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+ lt_cv_compiler_o_lo=no -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -c -o conftest.lo" -+ save_objext="$ac_objext" -+ ac_objext=lo -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ lt_cv_compiler_o_lo=no -+ else -+ lt_cv_compiler_o_lo=yes -+ fi -+ -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ ac_objext="$save_objext" -+ CFLAGS="$save_CFLAGS" -+ -+fi -+ -+ compiler_o_lo=$lt_cv_compiler_o_lo -+ echo "$ac_t""$compiler_o_lo" 1>&6 -+else -+ compiler_o_lo=no -+fi -+ -+# Check to see if we can do hard links to lock some files if needed -+hard_links="nottested" -+if test "$compiler_c_o" = no && test "$need_locks" != no; then -+ # do not overwrite the value of need_locks provided by the user -+ echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 -+echo "configure:3086: checking if we can lock with hard links" >&5 -+ hard_links=yes -+ $rm conftest* -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ touch conftest.a -+ ln conftest.a conftest.b 2>&5 || hard_links=no -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ echo "$ac_t""$hard_links" 1>&6 -+ if test "$hard_links" = no; then -+ echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2 -+ need_locks=warn -+ fi -+else -+ need_locks=no -+fi -+ -+if test "$GCC" = yes; then -+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler -+ echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 -+echo "configure:3105: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -+ echo "int some_variable = 0;" > conftest.$ac_ext -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" -+ compiler_rtti_exceptions=no -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ compiler_rtti_exceptions=no -+ else -+ compiler_rtti_exceptions=yes -+ fi -+ -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+ CFLAGS="$save_CFLAGS" -+ echo "$ac_t""$compiler_rtti_exceptions" 1>&6 -+ -+ if test "$compiler_rtti_exceptions" = "yes"; then -+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' -+ else -+ no_builtin_flag=' -fno-builtin' -+ fi -+fi -+ -+# See if the linker supports building shared libraries. -+echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 -+echo "configure:3145: checking whether the linker ($LD) supports shared libraries" >&5 -+ -+allow_undefined_flag= -+no_undefined_flag= -+need_lib_prefix=unknown -+need_version=unknown -+# when you set need_version to no, make sure it does not cause -set_version -+# flags to be left without arguments -+archive_cmds= -+archive_expsym_cmds= -+old_archive_from_new_cmds= -+old_archive_from_expsyms_cmds= -+export_dynamic_flag_spec= -+whole_archive_flag_spec= -+thread_safe_flag_spec= -+hardcode_into_libs=no -+hardcode_libdir_flag_spec= -+hardcode_libdir_separator= -+hardcode_direct=no -+hardcode_minus_L=no -+hardcode_shlibpath_var=unsupported -+runpath_var= -+link_all_deplibs=unknown -+always_export_symbols=no -+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -+# include_expsyms should be a list of space-separated symbols to be *always* -+# included in the symbol list -+include_expsyms= -+# exclude_expsyms can be an egrep regular expression of symbols to exclude -+# it will be wrapped by ` (' and `)$', so one must not match beginning or -+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -+# as well as any symbol that contains `d'. -+exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -+# platforms (ab)use it in PIC code, but their linkers get confused if -+# the symbol is explicitly referenced. Since portable code cannot -+# rely on this symbol name, it's probably fine to never include it in -+# preloaded symbol tables. -+extract_expsyms_cmds= -+ -+case $host_os in -+cygwin* | mingw* | pw32*) -+ # FIXME: the MSVC++ port hasn't been tested in a loooong time -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ if test "$GCC" != yes; then -+ with_gnu_ld=no -+ fi -+ ;; -+openbsd*) -+ with_gnu_ld=no -+ ;; -+esac -+ -+ld_shlibs=yes -+if test "$with_gnu_ld" = yes; then -+ # If archive_cmds runs LD, not CC, wlarc should be empty -+ wlarc='${wl}' -+ -+ # See if GNU ld supports shared libraries. -+ case $host_os in -+ aix3* | aix4* | aix5*) -+ # On AIX, the GNU linker is very broken -+ # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. -+ ld_shlibs=no -+ cat <&2 -+ -+*** Warning: the GNU linker, at least up to release 2.9.1, is reported -+*** to be unable to reliably create shared libraries on AIX. -+*** Therefore, libtool is disabling shared libraries support. If you -+*** really care for shared libraries, you may want to modify your PATH -+*** so that a non-GNU linker is found, and then restart. -+ -+EOF -+ ;; -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ -+ # Samuel A. Falvo II reports -+ # that the semantics of dynamic libraries on AmigaOS, at least up -+ # to version 4, is to share data among multiple programs linked -+ # with the same dynamic library. Since this doesn't match the -+ # behavior of shared libraries on other platforms, we can use -+ # them. -+ ld_shlibs=no -+ ;; -+ -+ beos*) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ allow_undefined_flag=unsupported -+ # Joseph Beckenbach says some releases of gcc -+ # support --undefined. This deserves some investigation. FIXME -+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec='-L$libdir' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ -+ extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ -+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ -+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ -+ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ -+ else $CC -o impgen impgen.c ; fi)~ -+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' -+ -+ old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' -+ -+ # cygwin and mingw dlls have different entry points and sets of symbols -+ # to exclude. -+ # FIXME: what about values for MSVC? -+ dll_entry=__cygwin_dll_entry@12 -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ -+ case $host_os in -+ mingw*) -+ # mingw values -+ dll_entry=_DllMainCRTStartup@12 -+ dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ -+ ;; -+ esac -+ -+ # mingw and cygwin differ, and it's simplest to just exclude the union -+ # of the two symbol sets. -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 -+ -+ # recent cygwin and mingw systems supply a stub DllMain which the user -+ # can override, but on older systems we have to supply one (in ltdll.c) -+ if test "x$lt_cv_need_dllmain" = "xyes"; then -+ ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " -+ ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ -+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' -+ else -+ ltdll_obj= -+ ltdll_cmds= -+ fi -+ -+ # Extract the symbol export list from an `--export-all' def file, -+ # then regenerate the def file from the symbol export list, so that -+ # the compiled dll only exports the symbol export list. -+ # Be careful not to strip the DATA tag left be newer dlltools. -+ export_symbols_cmds="$ltdll_cmds"' -+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ -+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' -+ -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is. -+ # If DATA tags from a recent dlltool are present, honour them! -+ archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname-def; -+ else -+ echo EXPORTS > $output_objdir/$soname-def; -+ _lt_hint=1; -+ cat $export_symbols | while read symbol; do -+ set dummy \$symbol; -+ case \$# in -+ 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; -+ 4) echo " \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; -+ *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; -+ esac; -+ _lt_hint=`expr 1 + \$_lt_hint`; -+ done; -+ fi~ -+ '"$ltdll_cmds"' -+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ -+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ -+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' -+ ;; -+ -+ netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -+ wlarc= -+ else -+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ fi -+ ;; -+ -+ solaris* | sysv5*) -+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then -+ ld_shlibs=no -+ cat <&2 -+ -+*** Warning: The releases 2.8.* of the GNU linker cannot reliably -+*** create shared libraries on Solaris systems. Therefore, libtool -+*** is disabling shared libraries support. We urge you to upgrade GNU -+*** binutils to release 2.9.1 or newer. Another option is to modify -+*** your PATH or compiler configuration so that the native linker is -+*** used, and then restart. -+ -+EOF -+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ -+ sunos4*) -+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ wlarc= -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ *) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ esac -+ -+ if test "$ld_shlibs" = yes; then -+ runpath_var=LD_RUN_PATH -+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' -+ export_dynamic_flag_spec='${wl}--export-dynamic' -+ case $host_os in -+ cygwin* | mingw* | pw32*) -+ # dlltool doesn't understand --whole-archive et. al. -+ whole_archive_flag_spec= -+ ;; -+ *) -+ # ancient GNU ld didn't support --whole-archive et. al. -+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then -+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ else -+ whole_archive_flag_spec= -+ fi -+ ;; -+ esac -+ fi -+else -+ # PORTME fill in a description of your system's linker (not GNU ld) -+ case $host_os in -+ aix3*) -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -+ # Note: this linker hardcodes the directories in LIBPATH if there -+ # are no directories specified by -L. -+ hardcode_minus_L=yes -+ if test "$GCC" = yes && test -z "$link_static_flag"; then -+ # Neither direct hardcoding nor static linking is supported with a -+ # broken collect2. -+ hardcode_direct=unsupported -+ fi -+ ;; -+ -+ aix4* | aix5*) -+ if test "$host_cpu" = ia64; then -+ # On IA64, the linker does run time linking by default, so we don't -+ # have to do anything special. -+ aix_use_runtimelinking=no -+ exp_sym_flag='-Bexport' -+ no_entry_flag="" -+ else -+ aix_use_runtimelinking=no -+ -+ # Test if we are trying to use run time linking or normal -+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we -+ # need to do runtime linking. -+ case $host_os in aix4.[23]|aix4.[23].*|aix5*) -+ for ld_flag in $LDFLAGS; do -+ case $ld_flag in -+ *-brtl*) -+ aix_use_runtimelinking=yes -+ break -+ ;; -+ esac -+ done -+ esac -+ -+ exp_sym_flag='-bexport' -+ no_entry_flag='-bnoentry' -+ fi -+ -+ # When large executables or shared objects are built, AIX ld can -+ # have problems creating the table of contents. If linking a library -+ # or program results in "error TOC overflow" add -mminimal-toc to -+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -+ -+ hardcode_direct=yes -+ archive_cmds='' -+ hardcode_libdir_separator=':' -+ if test "$GCC" = yes; then -+ case $host_os in aix4.[012]|aix4.[012].*) -+ collect2name=`${CC} -print-prog-name=collect2` -+ if test -f "$collect2name" && \ -+ strings "$collect2name" | grep resolve_lib_name >/dev/null -+ then -+ # We have reworked collect2 -+ hardcode_direct=yes -+ else -+ # We have old collect2 -+ hardcode_direct=unsupported -+ # It fails to find uninstalled libraries when the uninstalled -+ # path is not listed in the libpath. Setting hardcode_minus_L -+ # to unsupported forces relinking -+ hardcode_minus_L=yes -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_libdir_separator= -+ fi -+ esac -+ -+ shared_flag='-shared' -+ else -+ # not using gcc -+ if test "$host_cpu" = ia64; then -+ shared_flag='${wl}-G' -+ else -+ if test "$aix_use_runtimelinking" = yes; then -+ shared_flag='${wl}-G' -+ else -+ shared_flag='${wl}-bM:SRE' -+ fi -+ fi -+ fi -+ -+ # It seems that -bexpall can do strange things, so it is better to -+ # generate a list of symbols to export. -+ always_export_symbols=yes -+ if test "$aix_use_runtimelinking" = yes; then -+ # Warning - without using the other runtime loading flags (-brtl), -+ # -berok will link without error, but may produce a broken library. -+ allow_undefined_flag='-berok' -+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' -+ archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -+ else -+ if test "$host_cpu" = ia64; then -+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' -+ allow_undefined_flag="-z nodefs" -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -+ else -+ hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' -+ # Warning - without using the other run time loading flags, -+ # -berok will link without error, but may produce a broken library. -+ allow_undefined_flag='${wl}-berok' -+ # This is a bit strange, but is similar to how AIX traditionally builds -+ # it's shared libraries. -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname' -+ fi -+ fi -+ ;; -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ # see comment about different semantics on the GNU ld section -+ ld_shlibs=no -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' -+ fix_srcfile_path='`cygpath -w "$srcfile"`' -+ ;; -+ -+ darwin* | rhapsody*) -+ case "$host_os" in -+ rhapsody* | darwin1.[012]) -+ allow_undefined_flag='-undefined suppress' -+ ;; -+ *) # Darwin 1.3 on -+ allow_undefined_flag='-flat_namespace -undefined suppress' -+ ;; -+ esac -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles -+ # `"' quotes if we put them in here... so don't! -+ archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' -+ # We need to add '_' to the symbols in $export_symbols first -+ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ whole_archive_flag_spec='-all_load $convenience' -+ ;; -+ -+ freebsd1*) -+ ld_shlibs=no -+ ;; -+ -+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -+ # support. Future versions do this automatically, but an explicit c++rt0.o -+ # does not break anything, and helps significantly (at the cost of a little -+ # extra space). -+ freebsd2.2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ # Unfortunately, older versions of FreeBSD 2 do not have this feature. -+ freebsd2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -+ freebsd*) -+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ hpux9* | hpux10* | hpux11*) -+ case $host_os in -+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; -+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; -+ esac -+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_direct=yes -+ hardcode_minus_L=yes # Not in the search PATH, but as the default -+ # location of the library. -+ export_dynamic_flag_spec='${wl}-E' -+ ;; -+ -+ irix5* | irix6* | nonstopux*) -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ link_all_deplibs=yes -+ ;; -+ -+ netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -+ else -+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -+ fi -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ newsos6) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_shlibpath_var=no -+ ;; -+ -+ openbsd*) -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ export_dynamic_flag_spec='${wl}-E' -+ else -+ case "$host_os" in -+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ ;; -+ *) -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ ;; -+ esac -+ fi -+ ;; -+ -+ os2*) -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ allow_undefined_flag=unsupported -+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -+ ;; -+ -+ osf3*) -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ fi -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ ;; -+ -+ osf4* | osf5*) # as osf3* with the addition of -msym flag -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' -+ -+ #Both c and cxx compiler support -rpath directly -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ ;; -+ -+ sco3.2v5*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ export_dynamic_flag_spec='${wl}-Bexport' -+ ;; -+ -+ solaris*) -+ # gcc --version < 3.0 without binutils cannot create self contained -+ # shared libraries reliably, requiring libgcc.a to resolve some of -+ # the object symbols generated in some cases. Libraries that use -+ # assert need libgcc.a to resolve __eprintf, for example. Linking -+ # a copy of libgcc.a into every shared library to guarantee resolving -+ # such symbols causes other problems: According to Tim Van Holder -+ # , C++ libraries end up with a separate -+ # (to the application) exception stack for one thing. -+ no_undefined_flag=' -z defs' -+ if test "$GCC" = yes; then -+ case `$CC --version 2>/dev/null` in -+ [12].*) -+ cat <&2 -+ -+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably -+*** create self contained shared libraries on Solaris systems, without -+*** introducing a dependency on libgcc.a. Therefore, libtool is disabling -+*** -no-undefined support, which will at least allow you to build shared -+*** libraries. However, you may find that when you link such libraries -+*** into an application without using GCC, you have to manually add -+*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to -+*** upgrade to a newer version of GCC. Another option is to rebuild your -+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. -+ -+EOF -+ no_undefined_flag= -+ ;; -+ esac -+ fi -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_shlibpath_var=no -+ case $host_os in -+ solaris2.[0-5] | solaris2.[0-5].*) ;; -+ *) # Supported since Solaris 2.6 (maybe 2.5.1?) -+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; -+ esac -+ link_all_deplibs=yes -+ ;; -+ -+ sunos4*) -+ if test "x$host_vendor" = xsequent; then -+ # Use $CC to link under sequent, because it throws in some extra .o -+ # files that make .init and .fini sections work. -+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -+ fi -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4) -+ case $host_vendor in -+ sni) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes # is this really true??? -+ ;; -+ siemens) -+ ## LD is ld it makes a PLAMLIB -+ ## CC just makes a GrossModule. -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ reload_cmds='$CC -r -o $output$reload_objs' -+ hardcode_direct=no -+ ;; -+ motorola) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie -+ ;; -+ esac -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4.3*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ export_dynamic_flag_spec='-Bexport' -+ ;; -+ -+ sysv5*) -+ no_undefined_flag=' -z text' -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec= -+ hardcode_shlibpath_var=no -+ runpath_var='LD_RUN_PATH' -+ ;; -+ -+ uts4*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ dgux*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ ld_shlibs=yes -+ fi -+ ;; -+ -+ sysv4.2uw2*) -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=no -+ hardcode_shlibpath_var=no -+ hardcode_runpath_var=yes -+ runpath_var=LD_RUN_PATH -+ ;; -+ -+ sysv5uw7* | unixware7*) -+ no_undefined_flag='${wl}-z ${wl}text' -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ fi -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ *) -+ ld_shlibs=no -+ ;; -+ esac -+fi -+echo "$ac_t""$ld_shlibs" 1>&6 -+test "$ld_shlibs" = no && can_build_shared=no -+ -+# Check hardcoding attributes. -+echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 -+echo "configure:3844: checking how to hardcode library paths into programs" >&5 -+hardcode_action= -+if test -n "$hardcode_libdir_flag_spec" || \ -+ test -n "$runpath_var"; then -+ -+ # We can hardcode non-existant directories. -+ if test "$hardcode_direct" != no && -+ # If the only mechanism to avoid hardcoding is shlibpath_var, we -+ # have to relink, otherwise we might link with an installed library -+ # when we should be linking with a yet-to-be-installed one -+ ## test "$hardcode_shlibpath_var" != no && -+ test "$hardcode_minus_L" != no; then -+ # Linking always hardcodes the temporary library directory. -+ hardcode_action=relink -+ else -+ # We can link without hardcoding, and we can hardcode nonexisting dirs. -+ hardcode_action=immediate -+ fi -+else -+ # We cannot hardcode anything, or else we can only hardcode existing -+ # directories. -+ hardcode_action=unsupported -+fi -+echo "$ac_t""$hardcode_action" 1>&6 -+ -+striplib= -+old_striplib= -+echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 -+echo "configure:3872: checking whether stripping libraries is possible" >&5 -+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -+ test -z "$striplib" && striplib="$STRIP --strip-unneeded" -+ echo "$ac_t""yes" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+reload_cmds='$LD$reload_flag -o $output$reload_objs' -+test -z "$deplibs_check_method" && deplibs_check_method=unknown -+ -+# PORTME Fill in your ld.so characteristics -+echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 -+echo "configure:3886: checking dynamic linker characteristics" >&5 -+library_names_spec= -+libname_spec='lib$name' -+soname_spec= -+postinstall_cmds= -+postuninstall_cmds= -+finish_cmds= -+finish_eval= -+shlibpath_var= -+shlibpath_overrides_runpath=unknown -+version_type=none -+dynamic_linker="$host_os ld.so" -+sys_lib_dlsearch_path_spec="/lib /usr/lib" -+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+ -+case $host_os in -+aix3*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix $libname.a' -+ shlibpath_var=LIBPATH -+ -+ # AIX has no versioning support, so we append a major version to the name. -+ soname_spec='${libname}${release}.so$major' -+ ;; -+ -+aix4* | aix5*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ hardcode_into_libs=yes -+ if test "$host_cpu" = ia64; then -+ # AIX 5 supports IA64 -+ library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ else -+ # With GCC up to 2.95.x, collect2 would create an import file -+ # for dependence libraries. The import file would start with -+ # the line `#! .'. This would cause the generated library to -+ # depend on `.', always an invalid library. This was fixed in -+ # development snapshots of GCC prior to 3.0. -+ case $host_os in -+ aix4 | aix4.[01] | aix4.[01].*) -+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -+ echo ' yes ' -+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -+ : -+ else -+ can_build_shared=no -+ fi -+ ;; -+ esac -+ # AIX (on Power*) has no versioning support, so currently we can -+ # not hardcode correct soname into executable. Probably we can -+ # add versioning support to collect2, so additional links can -+ # be useful in future. -+ if test "$aix_use_runtimelinking" = yes; then -+ # If using run time linking (on AIX 4.2 or later) use lib.so -+ # instead of lib.a to let people know that these are not -+ # typical AIX shared libraries. -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ else -+ # We preserve .a as extension for shared libraries through AIX4.2 -+ # and later when we are not doing run time linking. -+ library_names_spec='${libname}${release}.a $libname.a' -+ soname_spec='${libname}${release}.so$major' -+ fi -+ shlibpath_var=LIBPATH -+ fi -+ hardcode_into_libs=yes -+ ;; -+ -+amigaos*) -+ library_names_spec='$libname.ixlibrary $libname.a' -+ # Create ${libname}_ixlibrary.a entries in /sys/libs. -+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' -+ ;; -+ -+beos*) -+ library_names_spec='${libname}.so' -+ dynamic_linker="$host_os ld.so" -+ shlibpath_var=LIBRARY_PATH -+ ;; -+ -+bsdi4*) -+ version_type=linux -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -+ export_dynamic_flag_spec=-rdynamic -+ # the default ld.so.conf also contains /usr/contrib/lib and -+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -+ # libtool to hard-code these into programs -+ ;; -+ -+cygwin* | mingw* | pw32*) -+ version_type=windows -+ need_version=no -+ need_lib_prefix=no -+ case $GCC,$host_os in -+ yes,cygwin*) -+ library_names_spec='$libname.dll.a' -+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' -+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog .libs/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $rm \$dlpath' -+ ;; -+ yes,mingw*) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' -+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` -+ ;; -+ yes,pw32*) -+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' -+ ;; -+ *) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' -+ ;; -+ esac -+ dynamic_linker='Win32 ld.exe' -+ # FIXME: first we should search . and the directory the executable is in -+ shlibpath_var=PATH -+ ;; -+ -+darwin* | rhapsody*) -+ dynamic_linker="$host_os dyld" -+ version_type=darwin -+ need_lib_prefix=no -+ need_version=no -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. -+ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' -+ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' -+ shlibpath_overrides_runpath=yes -+ shlibpath_var=DYLD_LIBRARY_PATH -+ ;; -+ -+freebsd1*) -+ dynamic_linker=no -+ ;; -+ -+freebsd*-gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ dynamic_linker='GNU/FreeBSD ld.so' -+ ;; -+ -+freebsd*) -+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` -+ version_type=freebsd-$objformat -+ case $version_type in -+ freebsd-elf*) -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' -+ need_version=no -+ need_lib_prefix=no -+ ;; -+ freebsd-*) -+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' -+ need_version=yes -+ ;; -+ esac -+ shlibpath_var=LD_LIBRARY_PATH -+ case $host_os in -+ freebsd2*) -+ shlibpath_overrides_runpath=yes -+ ;; -+ *) -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ ;; -+ esac -+ ;; -+ -+gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ hardcode_into_libs=yes -+ ;; -+ -+hpux9* | hpux10* | hpux11*) -+ # Give a soname corresponding to the major version so that dld.sl refuses to -+ # link against other versions. -+ dynamic_linker="$host_os dld.sl" -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_var=SHLIB_PATH -+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' -+ soname_spec='${libname}${release}.sl$major' -+ # HP-UX runs *really* slowly unless shared libraries are mode 555. -+ postinstall_cmds='chmod 555 $lib' -+ ;; -+ -+irix5* | irix6* | nonstopux*) -+ case $host_os in -+ nonstopux*) version_type=nonstopux ;; -+ *) version_type=irix ;; -+ esac -+ need_lib_prefix=no -+ need_version=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' -+ case $host_os in -+ irix5* | nonstopux*) -+ libsuff= shlibsuff= -+ ;; -+ *) -+ case $LD in # libtool.m4 will add one of these switches to LD -+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; -+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; -+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; -+ *) libsuff= shlibsuff= libmagic=never-match;; -+ esac -+ ;; -+ esac -+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -+ shlibpath_overrides_runpath=no -+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -+ ;; -+ -+# No shared lib support for Linux oldld, aout, or coff. -+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) -+ dynamic_linker=no -+ ;; -+ -+# This must be Linux ELF. -+linux-gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ -+ # We used to test for /lib/ld.so.1 and disable shared libraries on -+ # powerpc, because MkLinux only supported shared libraries with the -+ # GNU dynamic linker. Since this was broken with cross compilers, -+ # most powerpc-linux boxes support dynamic linking these days and -+ # people can always --disable-shared, the test was removed, and we -+ # assume the GNU/Linux dynamic linker is in use. -+ dynamic_linker='GNU/Linux ld.so' -+ ;; -+ -+netbsd*) -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ dynamic_linker='NetBSD (a.out) ld.so' -+ else -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' -+ soname_spec='${libname}${release}.so$major' -+ dynamic_linker='NetBSD ld.elf_so' -+ fi -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ hardcode_into_libs=yes -+ ;; -+ -+newsos6) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ ;; -+ -+openbsd*) -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ case "$host_os" in -+ openbsd2.[89] | openbsd2.[89].*) -+ shlibpath_overrides_runpath=no -+ ;; -+ *) -+ shlibpath_overrides_runpath=yes -+ ;; -+ esac -+ else -+ shlibpath_overrides_runpath=yes -+ fi -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+os2*) -+ libname_spec='$name' -+ need_lib_prefix=no -+ library_names_spec='$libname.dll $libname.a' -+ dynamic_linker='OS/2 ld.exe' -+ shlibpath_var=LIBPATH -+ ;; -+ -+osf3* | osf4* | osf5*) -+ version_type=osf -+ need_version=no -+ need_lib_prefix=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -+ hardcode_into_libs=yes -+ ;; -+ -+sco3.2v5*) -+ version_type=osf -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+solaris*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ hardcode_into_libs=yes -+ # ldd complains unless libraries are executable -+ postinstall_cmds='chmod +x $lib' -+ ;; -+ -+sunos4*) -+ version_type=sunos -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ if test "$with_gnu_ld" = yes; then -+ need_lib_prefix=no -+ fi -+ need_version=yes -+ ;; -+ -+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ case $host_vendor in -+ sni) -+ shlibpath_overrides_runpath=no -+ need_lib_prefix=no -+ export_dynamic_flag_spec='${wl}-Blargedynsym' -+ runpath_var=LD_RUN_PATH -+ ;; -+ siemens) -+ need_lib_prefix=no -+ ;; -+ motorola) -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_overrides_runpath=no -+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -+ ;; -+ esac -+ ;; -+ -+uts4*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+dgux*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+sysv4*MP*) -+ if test -d /usr/nec ;then -+ version_type=linux -+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' -+ soname_spec='$libname.so.$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ fi -+ ;; -+ -+*) -+ dynamic_linker=no -+ ;; -+esac -+echo "$ac_t""$dynamic_linker" 1>&6 -+test "$dynamic_linker" = no && can_build_shared=no -+ -+# Report the final consequences. -+echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 -+echo "configure:4310: checking if libtool supports shared libraries" >&5 -+echo "$ac_t""$can_build_shared" 1>&6 -+ -+echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 -+echo "configure:4314: checking whether to build shared libraries" >&5 -+test "$can_build_shared" = "no" && enable_shared=no -+ -+# On AIX, shared libraries and static libraries use the same namespace, and -+# are all built from PIC. -+case "$host_os" in -+aix3*) -+ test "$enable_shared" = yes && enable_static=no -+ if test -n "$RANLIB"; then -+ archive_cmds="$archive_cmds~\$RANLIB \$lib" -+ postinstall_cmds='$RANLIB $lib' -+ fi -+ ;; -+ -+aix4*) -+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -+ test "$enable_shared" = yes && enable_static=no -+ fi -+ ;; -+esac -+echo "$ac_t""$enable_shared" 1>&6 -+ -+echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 -+echo "configure:4337: checking whether to build static libraries" >&5 -+# Make sure either enable_shared or enable_static is yes. -+test "$enable_shared" = yes || enable_static=yes -+echo "$ac_t""$enable_static" 1>&6 -+ -+if test "$hardcode_action" = relink; then -+ # Fast installation is not supported -+ enable_fast_install=no -+elif test "$shlibpath_overrides_runpath" = yes || -+ test "$enable_shared" = no; then -+ # Fast installation is not necessary -+ enable_fast_install=needless -+fi -+ -+variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -+if test "$GCC" = yes; then -+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -+fi -+ -+if test "x$enable_dlopen" != xyes; then -+ enable_dlopen=unknown -+ enable_dlopen_self=unknown -+ enable_dlopen_self_static=unknown -+else -+ lt_cv_dlopen=no -+ lt_cv_dlopen_libs= -+ -+ case $host_os in -+ beos*) -+ lt_cv_dlopen="load_add_on" -+ lt_cv_dlopen_libs= -+ lt_cv_dlopen_self=yes -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ lt_cv_dlopen="LoadLibrary" -+ lt_cv_dlopen_libs= -+ ;; -+ -+ *) -+ echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -+echo "configure:4378: checking for shl_load" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+/* Override any gcc2 internal prototype to avoid an error. */ -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char shl_load(); -+ -+int main() { -+ -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub_shl_load) || defined (__stub___shl_load) -+choke me -+#else -+shl_load(); -+#endif -+ -+; return 0; } -+EOF -+if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_shl_load=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_shl_load=no" -+fi -+rm -f conftest* -+fi -+ -+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ lt_cv_dlopen="shl_load" -+else -+ echo "$ac_t""no" 1>&6 -+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -+echo "configure:4424: checking for shl_load in -ldld" >&5 -+ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` -+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ ac_save_LIBS="$LIBS" -+LIBS="-ldld $LIBS" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=no" -+fi -+rm -f conftest* -+LIBS="$ac_save_LIBS" -+ -+fi -+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -+else -+ echo "$ac_t""no" 1>&6 -+echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -+echo "configure:4462: checking for dlopen" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+/* Override any gcc2 internal prototype to avoid an error. */ -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char dlopen(); -+ -+int main() { -+ -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub_dlopen) || defined (__stub___dlopen) -+choke me -+#else -+dlopen(); -+#endif -+ -+; return 0; } -+EOF -+if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_dlopen=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_dlopen=no" -+fi -+rm -f conftest* -+fi -+ -+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ lt_cv_dlopen="dlopen" -+else -+ echo "$ac_t""no" 1>&6 -+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -+echo "configure:4508: checking for dlopen in -ldl" >&5 -+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ ac_save_LIBS="$LIBS" -+LIBS="-ldl $LIBS" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=no" -+fi -+rm -f conftest* -+LIBS="$ac_save_LIBS" -+ -+fi -+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -+else -+ echo "$ac_t""no" 1>&6 -+echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 -+echo "configure:4546: checking for dlopen in -lsvld" >&5 -+ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` -+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ ac_save_LIBS="$LIBS" -+LIBS="-lsvld $LIBS" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=no" -+fi -+rm -f conftest* -+LIBS="$ac_save_LIBS" -+ -+fi -+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -+else -+ echo "$ac_t""no" 1>&6 -+echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -+echo "configure:4584: checking for dld_link in -ldld" >&5 -+ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` -+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ ac_save_LIBS="$LIBS" -+LIBS="-ldld $LIBS" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=no" -+fi -+rm -f conftest* -+LIBS="$ac_save_LIBS" -+ -+fi -+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ -+fi -+ -+ -+fi -+ -+ -+fi -+ -+ -+fi -+ -+ -+fi -+ -+ ;; -+ esac -+ -+ if test "x$lt_cv_dlopen" != xno; then -+ enable_dlopen=yes -+ else -+ enable_dlopen=no -+ fi -+ -+ case $lt_cv_dlopen in -+ dlopen) -+ save_CPPFLAGS="$CPPFLAGS" -+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -+ -+ save_LDFLAGS="$LDFLAGS" -+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -+ -+ save_LIBS="$LIBS" -+ LIBS="$lt_cv_dlopen_libs $LIBS" -+ -+ echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -+echo "configure:4659: checking whether a program can dlopen itself" >&5 -+if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$cross_compiling" = yes; then : -+ lt_cv_dlopen_self=cross -+else -+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -+ lt_status=$lt_dlunknown -+ cat > conftest.$ac_ext < -+#endif -+ -+#include -+ -+#ifdef RTLD_GLOBAL -+# define LT_DLGLOBAL RTLD_GLOBAL -+#else -+# ifdef DL_GLOBAL -+# define LT_DLGLOBAL DL_GLOBAL -+# else -+# define LT_DLGLOBAL 0 -+# endif -+#endif -+ -+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -+ find out it does not work in some platform. */ -+#ifndef LT_DLLAZY_OR_NOW -+# ifdef RTLD_LAZY -+# define LT_DLLAZY_OR_NOW RTLD_LAZY -+# else -+# ifdef DL_LAZY -+# define LT_DLLAZY_OR_NOW DL_LAZY -+# else -+# ifdef RTLD_NOW -+# define LT_DLLAZY_OR_NOW RTLD_NOW -+# else -+# ifdef DL_NOW -+# define LT_DLLAZY_OR_NOW DL_NOW -+# else -+# define LT_DLLAZY_OR_NOW 0 -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+#ifdef __cplusplus -+extern "C" void exit (int); -+#endif -+ -+void fnord() { int i=42;} -+int main () -+{ -+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -+ int status = $lt_dlunknown; -+ -+ if (self) -+ { -+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -+ /* dlclose (self); */ -+ } -+ -+ exit (status); -+} -+EOF -+ if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ (./conftest; exit; ) 2>/dev/null -+ lt_status=$? -+ case x$lt_status in -+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; -+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; -+ x$lt_unknown|x*) lt_cv_dlopen_self=no ;; -+ esac -+ else : -+ # compilation failed -+ lt_cv_dlopen_self=no -+ fi -+fi -+rm -fr conftest* -+ -+ -+fi -+ -+echo "$ac_t""$lt_cv_dlopen_self" 1>&6 -+ -+ if test "x$lt_cv_dlopen_self" = xyes; then -+ LDFLAGS="$LDFLAGS $link_static_flag" -+ echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -+echo "configure:4753: checking whether a statically linked program can dlopen itself" >&5 -+if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$cross_compiling" = yes; then : -+ lt_cv_dlopen_self_static=cross -+else -+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -+ lt_status=$lt_dlunknown -+ cat > conftest.$ac_ext < -+#endif -+ -+#include -+ -+#ifdef RTLD_GLOBAL -+# define LT_DLGLOBAL RTLD_GLOBAL -+#else -+# ifdef DL_GLOBAL -+# define LT_DLGLOBAL DL_GLOBAL -+# else -+# define LT_DLGLOBAL 0 -+# endif -+#endif -+ -+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -+ find out it does not work in some platform. */ -+#ifndef LT_DLLAZY_OR_NOW -+# ifdef RTLD_LAZY -+# define LT_DLLAZY_OR_NOW RTLD_LAZY -+# else -+# ifdef DL_LAZY -+# define LT_DLLAZY_OR_NOW DL_LAZY -+# else -+# ifdef RTLD_NOW -+# define LT_DLLAZY_OR_NOW RTLD_NOW -+# else -+# ifdef DL_NOW -+# define LT_DLLAZY_OR_NOW DL_NOW -+# else -+# define LT_DLLAZY_OR_NOW 0 -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+#ifdef __cplusplus -+extern "C" void exit (int); -+#endif -+ -+void fnord() { int i=42;} -+int main () -+{ -+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -+ int status = $lt_dlunknown; -+ -+ if (self) -+ { -+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -+ /* dlclose (self); */ -+ } -+ -+ exit (status); -+} -+EOF -+ if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ (./conftest; exit; ) 2>/dev/null -+ lt_status=$? -+ case x$lt_status in -+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; -+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; -+ x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; -+ esac -+ else : -+ # compilation failed -+ lt_cv_dlopen_self_static=no -+ fi -+fi -+rm -fr conftest* -+ -+ -+fi -+ -+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 -+ fi -+ -+ CPPFLAGS="$save_CPPFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+ LIBS="$save_LIBS" -+ ;; -+ esac -+ -+ case $lt_cv_dlopen_self in -+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; -+ *) enable_dlopen_self=unknown ;; -+ esac -+ -+ case $lt_cv_dlopen_self_static in -+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; -+ *) enable_dlopen_self_static=unknown ;; -+ esac -+fi -+ -+ -+if test "$enable_shared" = yes && test "$GCC" = yes; then -+ case $archive_cmds in -+ *'~'*) -+ # FIXME: we may have to deal with multi-command sequences. -+ ;; -+ '$CC '*) -+ # Test whether the compiler implicitly links with -lc since on some -+ # systems, -lgcc has to come before -lc. If gcc already passes -lc -+ # to ld, don't add -lc before -lgcc. -+ echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 -+echo "configure:4873: checking whether -lc should be explicitly linked in" >&5 -+ if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ $rm conftest* -+ echo 'static int dummy;' > conftest.$ac_ext -+ -+ if { (eval echo configure:4880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ soname=conftest -+ lib=conftest -+ libobjs=conftest.$ac_objext -+ deplibs= -+ wl=$lt_cv_prog_cc_wl -+ compiler_flags=-v -+ linker_flags=-v -+ verstring= -+ output_objdir=. -+ libname=conftest -+ save_allow_undefined_flag=$allow_undefined_flag -+ allow_undefined_flag= -+ if { (eval echo configure:4893: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } -+ then -+ lt_cv_archive_cmds_need_lc=no -+ else -+ lt_cv_archive_cmds_need_lc=yes -+ fi -+ allow_undefined_flag=$save_allow_undefined_flag -+ else -+ cat conftest.err 1>&5 -+ fi -+fi -+ -+ echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6 -+ ;; -+ esac -+fi -+need_lc=${lt_cv_archive_cmds_need_lc-yes} -+ -+# The second clause should only fire when bootstrapping the -+# libtool distribution, otherwise you forgot to ship ltmain.sh -+# with your package, and you will get complaints that there are -+# no rules to generate ltmain.sh. -+if test -f "$ltmain"; then -+ : -+else -+ # If there is no Makefile yet, we rely on a make rule to execute -+ # `config.status --recheck' to rerun these tests and create the -+ # libtool script then. -+ test -f Makefile && make "$ltmain" -+fi -+ -+if test -f "$ltmain"; then -+ trap "$rm \"${ofile}T\"; exit 1" 1 2 15 -+ $rm -f "${ofile}T" -+ -+ echo creating $ofile -+ -+ # Now quote all the things that may contain metacharacters while being -+ # careful not to overquote the AC_SUBSTed values. We take copies of the -+ # variables and quote the copies for generation of the libtool script. -+ for var in echo old_CC old_CFLAGS SED \ -+ AR AR_FLAGS CC LD LN_S NM SHELL \ -+ reload_flag reload_cmds wl \ -+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ -+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ -+ library_names_spec soname_spec \ -+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ -+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ -+ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ -+ old_striplib striplib file_magic_cmd export_symbols_cmds \ -+ deplibs_check_method allow_undefined_flag no_undefined_flag \ -+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ -+ global_symbol_to_c_name_address \ -+ hardcode_libdir_flag_spec hardcode_libdir_separator \ -+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do -+ -+ case $var in -+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ -+ old_postinstall_cmds | old_postuninstall_cmds | \ -+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ -+ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ -+ postinstall_cmds | postuninstall_cmds | \ -+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -+ # Double-quote double-evaled strings. -+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" -+ ;; -+ *) -+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" -+ ;; -+ esac -+ done -+ -+ cat <<__EOF__ > "${ofile}T" -+#! $SHELL -+ -+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -+# NOTE: Changes made to this file will be lost: look at ltmain.sh. -+# -+# Copyright (C) 1996-2000 Free Software Foundation, Inc. -+# Originally by Gordon Matzigkeit , 1996 -+# -+# 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. -+# -+# As a special exception to the GNU General Public License, if you -+# distribute this file as part of a program that contains a -+# configuration script generated by Autoconf, you may include it under -+# the same distribution terms that you use for the rest of that program. -+ -+# A sed that does not truncate output. -+SED=$lt_SED -+ -+# Sed that helps us avoid accidentally triggering echo(1) options like -n. -+Xsed="${SED} -e s/^X//" -+ -+# The HP-UX ksh and POSIX shell print the target directory to stdout -+# if CDPATH is set. -+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi -+ -+# ### BEGIN LIBTOOL CONFIG -+ -+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -+ -+# Shell to use when invoking shell scripts. -+SHELL=$lt_SHELL -+ -+# Whether or not to build shared libraries. -+build_libtool_libs=$enable_shared -+ -+# Whether or not to build static libraries. -+build_old_libs=$enable_static -+ -+# Whether or not to add -lc for building shared libraries. -+build_libtool_need_lc=$need_lc -+ -+# Whether or not to optimize for fast installation. -+fast_install=$enable_fast_install -+ -+# The host system. -+host_alias=$host_alias -+host=$host -+ -+# An echo program that does not interpret backslashes. -+echo=$lt_echo -+ -+# The archiver. -+AR=$lt_AR -+AR_FLAGS=$lt_AR_FLAGS -+ -+# The default C compiler. -+CC=$lt_CC -+ -+# Is the compiler the GNU C compiler? -+with_gcc=$GCC -+ -+# The linker used to build libraries. -+LD=$lt_LD -+ -+# Whether we need hard or soft links. -+LN_S=$lt_LN_S -+ -+# A BSD-compatible nm program. -+NM=$lt_NM -+ -+# A symbol stripping program -+STRIP=$STRIP -+ -+# Used to examine libraries when file_magic_cmd begins "file" -+MAGIC_CMD=$MAGIC_CMD -+ -+# Used on cygwin: DLL creation program. -+DLLTOOL="$DLLTOOL" -+ -+# Used on cygwin: object dumper. -+OBJDUMP="$OBJDUMP" -+ -+# Used on cygwin: assembler. -+AS="$AS" -+ -+# The name of the directory that contains temporary libtool files. -+objdir=$objdir -+ -+# How to create reloadable object files. -+reload_flag=$lt_reload_flag -+reload_cmds=$lt_reload_cmds -+ -+# How to pass a linker flag through the compiler. -+wl=$lt_wl -+ -+# Object file suffix (normally "o"). -+objext="$ac_objext" -+ -+# Old archive suffix (normally "a"). -+libext="$libext" -+ -+# Executable file suffix (normally ""). -+exeext="$exeext" -+ -+# Additional compiler flags for building library objects. -+pic_flag=$lt_pic_flag -+pic_mode=$pic_mode -+ -+# Does compiler simultaneously support -c and -o options? -+compiler_c_o=$lt_compiler_c_o -+ -+# Can we write directly to a .lo ? -+compiler_o_lo=$lt_compiler_o_lo -+ -+# Must we lock files when doing compilation ? -+need_locks=$lt_need_locks -+ -+# Do we need the lib prefix for modules? -+need_lib_prefix=$need_lib_prefix -+ -+# Do we need a version for libraries? -+need_version=$need_version -+ -+# Whether dlopen is supported. -+dlopen_support=$enable_dlopen -+ -+# Whether dlopen of programs is supported. -+dlopen_self=$enable_dlopen_self -+ -+# Whether dlopen of statically linked programs is supported. -+dlopen_self_static=$enable_dlopen_self_static -+ -+# Compiler flag to prevent dynamic linking. -+link_static_flag=$lt_link_static_flag -+ -+# Compiler flag to turn off builtin functions. -+no_builtin_flag=$lt_no_builtin_flag -+ -+# Compiler flag to allow reflexive dlopens. -+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec -+ -+# Compiler flag to generate shared objects directly from archives. -+whole_archive_flag_spec=$lt_whole_archive_flag_spec -+ -+# Compiler flag to generate thread-safe objects. -+thread_safe_flag_spec=$lt_thread_safe_flag_spec -+ -+# Library versioning type. -+version_type=$version_type -+ -+# Format of library name prefix. -+libname_spec=$lt_libname_spec -+ -+# List of archive names. First name is the real one, the rest are links. -+# The last name is the one that the linker finds with -lNAME. -+library_names_spec=$lt_library_names_spec -+ -+# The coded name of the library, if different from the real name. -+soname_spec=$lt_soname_spec -+ -+# Commands used to build and install an old-style archive. -+RANLIB=$lt_RANLIB -+old_archive_cmds=$lt_old_archive_cmds -+old_postinstall_cmds=$lt_old_postinstall_cmds -+old_postuninstall_cmds=$lt_old_postuninstall_cmds -+ -+# Create an old-style archive from a shared archive. -+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - --NM="$ac_cv_path_NM" --echo "$ac_t""$NM" 1>&6 -+# Create a temporary old-style archive to link instead of a shared archive. -+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - --echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 --echo "configure:1367: checking whether ln -s works" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- rm -f conftestdata --if ln -s X conftestdata 2>/dev/null --then -- rm -f conftestdata -- ac_cv_prog_LN_S="ln -s" --else -- ac_cv_prog_LN_S=ln --fi --fi --LN_S="$ac_cv_prog_LN_S" --if test "$ac_cv_prog_LN_S" = "ln -s"; then -- echo "$ac_t""yes" 1>&6 --else -- echo "$ac_t""no" 1>&6 --fi -+# Commands used to build and install a shared archive. -+archive_cmds=$lt_archive_cmds -+archive_expsym_cmds=$lt_archive_expsym_cmds -+postinstall_cmds=$lt_postinstall_cmds -+postuninstall_cmds=$lt_postuninstall_cmds - -+# Commands to strip libraries. -+old_striplib=$lt_old_striplib -+striplib=$lt_striplib - --case "$target" in --NONE) lt_target="$host" ;; --*) lt_target="$target" ;; --esac -+# Method to check whether dependent libraries are shared objects. -+deplibs_check_method=$lt_deplibs_check_method - --# Check for any special flags to pass to ltconfig. --libtool_flags="--cache-file=$cache_file" --test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" --test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" --test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" --test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" --test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -+# Command to use when deplibs_check_method == file_magic. -+file_magic_cmd=$lt_file_magic_cmd - -+# Flag that allows shared libraries with undefined symbols to be built. -+allow_undefined_flag=$lt_allow_undefined_flag - --# Check whether --enable-libtool-lock or --disable-libtool-lock was given. --if test "${enable_libtool_lock+set}" = set; then -- enableval="$enable_libtool_lock" -- : --fi -+# Flag that forces no undefined symbols. -+no_undefined_flag=$lt_no_undefined_flag - --test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" --test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" -+# Commands used to finish a libtool library installation in a directory. -+finish_cmds=$lt_finish_cmds - --# Some flags need to be propagated to the compiler or linker for good --# libtool support. --case "$lt_target" in --*-*-irix6*) -- # Find out which ABI we are using. -- echo '#line 1416 "configure"' > conftest.$ac_ext -- if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- case "`/usr/bin/file conftest.o`" in -- *32-bit*) -- LD="${LD-ld} -32" -- ;; -- *N32*) -- LD="${LD-ld} -n32" -- ;; -- *64-bit*) -- LD="${LD-ld} -64" -- ;; -- esac -- fi -- rm -rf conftest* -- ;; -+# Same as above, but a single script fragment to be evaled but not shown. -+finish_eval=$lt_finish_eval - --*-*-sco3.2v5*) -- # On SCO OpenServer 5, we need -belf to get full-featured binaries. -- SAVE_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS -belf" -- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 --echo "configure:1438: checking whether the C compiler needs -belf" >&5 --if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- lt_cv_cc_needs_belf=yes --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- lt_cv_cc_needs_belf=no --fi --rm -f conftest* --fi -+# Transform the output of nm in a C name address pair -+global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address - --echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 -- if test x"$lt_cv_cc_needs_belf" != x"yes"; then -- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -- CFLAGS="$SAVE_CFLAGS" -- fi -- ;; -+# This is the shared library runtime path variable. -+runpath_var=$runpath_var - -+# This is the shared library path variable. -+shlibpath_var=$shlibpath_var - --esac -+# Is shlibpath searched before the hard-coded library search path? -+shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -+# How to hardcode a shared library path into an executable. -+hardcode_action=$hardcode_action - --# Save cache, so that ltconfig can load it --cat > confcache <<\EOF --# This file is a shell script that caches the results of configure --# tests run on this system so they can be shared between configure --# scripts and configure runs. It is not useful on other systems. --# If it contains results you don't want to keep, you may remove or edit it. -+# Whether we should hardcode library paths into libraries. -+hardcode_into_libs=$hardcode_into_libs -+ -+# Flag to hardcode \$libdir into a binary during linking. -+# This must work even if \$libdir does not exist. -+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -+ -+# Whether we need a single -rpath flag with a separated argument. -+hardcode_libdir_separator=$lt_hardcode_libdir_separator -+ -+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -+# resulting binary. -+hardcode_direct=$hardcode_direct -+ -+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -+# resulting binary. -+hardcode_minus_L=$hardcode_minus_L -+ -+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -+# the resulting binary. -+hardcode_shlibpath_var=$hardcode_shlibpath_var -+ -+# Variables whose values should be saved in libtool wrapper scripts and -+# restored at relink time. -+variables_saved_for_relink="$variables_saved_for_relink" -+ -+# Whether libtool must link a program against all its dependency libraries. -+link_all_deplibs=$link_all_deplibs -+ -+# Compile-time system search path for libraries -+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -+ -+# Run-time system search path for libraries -+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -+ -+# Fix the shell variable \$srcfile for the compiler. -+fix_srcfile_path="$fix_srcfile_path" -+ -+# Set to yes if exported symbols are required. -+always_export_symbols=$always_export_symbols -+ -+# The commands to list exported symbols. -+export_symbols_cmds=$lt_export_symbols_cmds -+ -+# The commands to extract the exported symbol list from a shared archive. -+extract_expsyms_cmds=$lt_extract_expsyms_cmds -+ -+# Symbols that should not be listed in the preloaded symbols. -+exclude_expsyms=$lt_exclude_expsyms -+ -+# Symbols that must always be exported. -+include_expsyms=$lt_include_expsyms -+ -+# ### END LIBTOOL CONFIG -+ -+__EOF__ -+ -+ case $host_os in -+ aix3*) -+ cat <<\EOF >> "${ofile}T" -+ -+# AIX sometimes has problems with the GCC collect2 program. For some -+# reason, if we set the COLLECT_NAMES environment variable, the problems -+# vanish in a puff of smoke. -+if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+fi -+EOF -+ ;; -+ esac -+ -+ case $host_os in -+ cygwin* | mingw* | pw32* | os2*) -+ cat <<'EOF' >> "${ofile}T" -+ # This is a source program that is used to create dlls on Windows -+ # Don't remove nor modify the starting and closing comments -+# /* ltdll.c starts here */ -+# #define WIN32_LEAN_AND_MEAN -+# #include -+# #undef WIN32_LEAN_AND_MEAN -+# #include - # --# By default, configure uses ./config.cache as the cache file, --# creating it if it does not exist already. You can give configure --# the --cache-file=FILE option to use a different cache file; that is --# what configure does when it calls configure scripts in --# subdirectories, so they share the cache. --# Giving --cache-file=/dev/null disables caching, for debugging configure. --# config.status only pays attention to the cache file if you give it the --# --recheck option to rerun configure. -+# #ifndef __CYGWIN__ -+# # ifdef __CYGWIN32__ -+# # define __CYGWIN__ __CYGWIN32__ -+# # endif -+# #endif -+# -+# #ifdef __cplusplus -+# extern "C" { -+# #endif -+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -+# #ifdef __cplusplus -+# } -+# #endif -+# -+# #ifdef __CYGWIN__ -+# #include -+# DECLARE_CYGWIN_DLL( DllMain ); -+# #endif -+# HINSTANCE __hDllInstance_base; -+# -+# BOOL APIENTRY -+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -+# { -+# __hDllInstance_base = hInst; -+# return TRUE; -+# } -+# /* ltdll.c ends here */ -+ # This is a source program that is used to create import libraries -+ # on Windows for dlls which lack them. Don't remove nor modify the -+ # starting and closing comments -+# /* impgen.c starts here */ -+# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. -+# -+# This file is part of GNU libtool. -+# -+# 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 /* for printf() */ -+# #include /* for open(), lseek(), read() */ -+# #include /* for O_RDONLY, O_BINARY */ -+# #include /* for strdup() */ -+# -+# /* O_BINARY isn't required (or even defined sometimes) under Unix */ -+# #ifndef O_BINARY -+# #define O_BINARY 0 -+# #endif -+# -+# static unsigned int -+# pe_get16 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[2]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 2); -+# return b[0] + (b[1]<<8); -+# } -+# -+# static unsigned int -+# pe_get32 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[4]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 4); -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# static unsigned int -+# pe_as32 (ptr) -+# void *ptr; -+# { -+# unsigned char *b = ptr; -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# int -+# main (argc, argv) -+# int argc; -+# char *argv[]; -+# { -+# int dll; -+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -+# unsigned long export_rva, export_size, nsections, secptr, expptr; -+# unsigned long name_rvas, nexp; -+# unsigned char *expdata, *erva; -+# char *filename, *dll_name; -+# -+# filename = argv[1]; -+# -+# dll = open(filename, O_RDONLY|O_BINARY); -+# if (dll < 1) -+# return 1; -+# -+# dll_name = filename; -+# -+# for (i=0; filename[i]; i++) -+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -+# dll_name = filename + i +1; -+# -+# pe_header_offset = pe_get32 (dll, 0x3c); -+# opthdr_ofs = pe_header_offset + 4 + 20; -+# num_entries = pe_get32 (dll, opthdr_ofs + 92); - # -+# if (num_entries < 1) /* no exports */ -+# return 1; -+# -+# export_rva = pe_get32 (dll, opthdr_ofs + 96); -+# export_size = pe_get32 (dll, opthdr_ofs + 100); -+# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -+# secptr = (pe_header_offset + 4 + 20 + -+# pe_get16 (dll, pe_header_offset + 4 + 16)); -+# -+# expptr = 0; -+# for (i = 0; i < nsections; i++) -+# { -+# char sname[8]; -+# unsigned long secptr1 = secptr + 40 * i; -+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -+# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -+# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -+# lseek(dll, secptr1, SEEK_SET); -+# read(dll, sname, 8); -+# if (vaddr <= export_rva && vaddr+vsize > export_rva) -+# { -+# expptr = fptr + (export_rva - vaddr); -+# if (export_rva + export_size > vaddr + vsize) -+# export_size = vsize - (export_rva - vaddr); -+# break; -+# } -+# } -+# -+# expdata = (unsigned char*)malloc(export_size); -+# lseek (dll, expptr, SEEK_SET); -+# read (dll, expdata, export_size); -+# erva = expdata - export_rva; -+# -+# nexp = pe_as32 (expdata+24); -+# name_rvas = pe_as32 (expdata+32); -+# -+# printf ("EXPORTS\n"); -+# for (i = 0; i&1 | -- case `(ac_space=' '; set | grep ac_space) 2>&1` in -- *ac_space=\ *) -- # `set' does not quote correctly, so add quotes (double-quote substitution -- # turns \\\\ into \\, and sed turns \\ into \). -- sed -n \ -- -e "s/'/'\\\\''/g" \ -- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" -- ;; -- *) -- # `set' quotes correctly as required by POSIX, so do not add quotes. -- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; -- esac >> confcache --if cmp -s $cache_file confcache; then -- : --else -- if test -w $cache_file; then -- echo "updating cache $cache_file" -- cat confcache > $cache_file -- else -- echo "not updating unwritable cache $cache_file" -- fi -+ esac -+ -+ # We use sed instead of cat because bash on DJGPP gets confused if -+ # if finds mixed CR/LF and LF-only lines. Since sed operates in -+ # text mode, it properly converts lines to CR/LF. This bash problem -+ # is reportedly fixed, but why not run on old versions too? -+ sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) -+ -+ mv -f "${ofile}T" "$ofile" || \ -+ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") -+ chmod +x "$ofile" - fi --rm -f confcache - - --# Actually configure libtool. ac_aux_dir is where install-sh is found. --CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ --LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ --LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ --DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ --${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ --$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ --|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } - --# Reload cache, that may have been modified by ltconfig --if test -r "$cache_file"; then -- echo "loading cache $cache_file" -- . $cache_file --else -- echo "creating cache $cache_file" -- > $cache_file --fi - - - # This can be used to rebuild libtool when needed --LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" -+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - - # Always use our own libtool. - LIBTOOL='$(SHELL) $(top_builddir)/libtool' - --# Redirect the config.log output again, so that the ltconfig log is not --# clobbered by the next message. --exec 5>>./config.log -+# Prevent multiple expansion -+ - - - echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 --echo "configure:1553: checking whether to enable maintainer-specific portions of Makefiles" >&5 -+echo "configure:5479: checking whether to enable maintainer-specific portions of Makefiles" >&5 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. - if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" -@@ -1579,7 +5505,7 @@ - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 --echo "configure:1583: checking host system type" >&5 -+echo "configure:5509: checking host system type" >&5 - - host_alias=$host - case "$host_alias" in -@@ -1649,7 +5575,7 @@ - mem_warn=false - - echo $ac_n "checking whether to enable memory checking""... $ac_c" 1>&6 --echo "configure:1653: checking whether to enable memory checking" >&5 -+echo "configure:5579: checking whether to enable memory checking" >&5 - if test "x$enable_mem_check" = "xyes"; then - cat >> confdefs.h <<\EOF - #define ENABLE_MEM_CHECK 1 -@@ -1663,7 +5589,7 @@ - fi - - echo $ac_n "checking whether to enable memory profiling""... $ac_c" 1>&6 --echo "configure:1667: checking whether to enable memory profiling" >&5 -+echo "configure:5593: checking whether to enable memory profiling" >&5 - if test "x$enable_mem_profile" = "xyes"; then - cat >> confdefs.h <<\EOF - #define ENABLE_MEM_PROFILE 1 -@@ -1711,7 +5637,7 @@ - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1715: checking for $ac_word" >&5 -+echo "configure:5641: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1741,7 +5667,7 @@ - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1745: checking for $ac_word" >&5 -+echo "configure:5671: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1792,7 +5718,7 @@ - # Extract the first word of "cl", so it can be a program name with args. - set dummy cl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1796: checking for $ac_word" >&5 -+echo "configure:5722: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1824,7 +5750,7 @@ - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 --echo "configure:1828: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 -+echo "configure:5754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -@@ -1835,12 +5761,12 @@ - - cat > conftest.$ac_ext << EOF - --#line 1839 "configure" -+#line 5765 "configure" - #include "confdefs.h" - - main(){return(0);} - EOF --if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:5770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then -@@ -1866,12 +5792,12 @@ - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 --echo "configure:1870: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -+echo "configure:5796: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 --echo "configure:1875: checking whether we are using GNU C" >&5 -+echo "configure:5801: checking whether we are using GNU C" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1880,7 +5806,7 @@ - yes; - #endif - EOF --if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then -+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:5810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no -@@ -1899,7 +5825,7 @@ - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 --echo "configure:1903: checking whether ${CC-cc} accepts -g" >&5 -+echo "configure:5829: checking whether ${CC-cc} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1934,7 +5860,7 @@ - - - echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 --echo "configure:1938: checking for ${CC-cc} option to accept ANSI C" >&5 -+echo "configure:5864: checking for ${CC-cc} option to accept ANSI C" >&5 - if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1950,7 +5876,7 @@ - do - CC="$ac_save_CC $ac_arg" - cat > conftest.$ac_ext < - #include -@@ -1987,7 +5913,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:1991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:5917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - am_cv_prog_cc_stdc="$ac_arg"; break - else -@@ -2022,7 +5948,7 @@ - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # ./install, which can be erroneously created by make from ./install.sh. - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 --echo "configure:2026: checking for a BSD compatible install" >&5 -+echo "configure:5952: checking for a BSD compatible install" >&5 - if test -z "$INSTALL"; then - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -2095,19 +6021,19 @@ - fi - - echo $ac_n "checking for extra flags to get ANSI library prototypes""... $ac_c" 1>&6 --echo "configure:2099: checking for extra flags to get ANSI library prototypes" >&5 -+echo "configure:6025: checking for extra flags to get ANSI library prototypes" >&5 - glib_save_LIBS=$LIBS - LIBS="$LIBS -lm" - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < - int main (void) { return (log(1) != log(1.)); } - EOF --if { (eval echo configure:2111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""none needed" 1>&6 - else -@@ -2120,12 +6046,12 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < - int main (void) { return (log(1) != log(1.)); } - EOF --if { (eval echo configure:2129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""-std1" 1>&6 - else -@@ -2148,16 +6074,16 @@ - LIBS=$glib_save_LIBS - - echo $ac_n "checking for extra flags for POSIX compliance""... $ac_c" 1>&6 --echo "configure:2152: checking for extra flags for POSIX compliance" >&5 -+echo "configure:6078: checking for extra flags for POSIX compliance" >&5 - cat > conftest.$ac_ext < - int main() { - DIR *dir; - ; return 0; } - EOF --if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:6087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""none needed" 1>&6 - else -@@ -2167,14 +6093,14 @@ - glib_save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -posix" - cat > conftest.$ac_ext < - int main() { - DIR *dir; - ; return 0; } - EOF --if { (eval echo configure:2178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:6104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""-posix" 1>&6 - else -@@ -2190,93 +6116,13 @@ - rm -f conftest* - - # Checks for header files. --echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 --echo "configure:2195: checking how to run the C preprocessor" >&5 --# On Suns, sometimes $CPP names a directory. --if test -n "$CPP" && test -d "$CPP"; then -- CPP= --fi --if test -z "$CPP"; then --if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- # This must be in double quotes, not single quotes, because CPP may get -- # substituted into the Makefile and "${CC-cc}" will confuse make. -- CPP="${CC-cc} -E" -- # On the NeXT, cc -E runs the code through the compiler's parser, -- # not just through cpp. -- cat > conftest.$ac_ext < --Syntax Error --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` --if test -z "$ac_err"; then -- : --else -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- CPP="${CC-cc} -E -traditional-cpp" -- cat > conftest.$ac_ext < --Syntax Error --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` --if test -z "$ac_err"; then -- : --else -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- CPP="${CC-cc} -nologo -E" -- cat > conftest.$ac_ext < --Syntax Error --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` --if test -z "$ac_err"; then -- : --else -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- CPP=/lib/cpp --fi --rm -f conftest* --fi --rm -f conftest* --fi --rm -f conftest* -- ac_cv_prog_CPP="$CPP" --fi -- CPP="$ac_cv_prog_CPP" --else -- ac_cv_prog_CPP="$CPP" --fi --echo "$ac_t""$CPP" 1>&6 -- - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 --echo "configure:2275: checking for ANSI C header files" >&5 -+echo "configure:6121: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -2284,7 +6130,7 @@ - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:6134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -2301,7 +6147,7 @@ - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -2319,7 +6165,7 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -2340,7 +6186,7 @@ - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -@@ -2351,7 +6197,7 @@ - exit (0); } - - EOF --if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else -@@ -2377,12 +6223,12 @@ - - # Checks for library functions. - echo $ac_n "checking for vprintf""... $ac_c" 1>&6 --echo "configure:2381: checking for vprintf" >&5 -+echo "configure:6227: checking for vprintf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vprintf=yes" - else -@@ -2429,12 +6275,12 @@ - - if test "$ac_cv_func_vprintf" != yes; then - echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 --echo "configure:2433: checking for _doprnt" >&5 -+echo "configure:6279: checking for _doprnt" >&5 - if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func__doprnt=yes" - else -@@ -2485,12 +6331,12 @@ - for ac_func in atexit on_exit - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:2489: checking for $ac_func" >&5 -+echo "configure:6335: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:6363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -2539,7 +6385,7 @@ - - - echo $ac_n "checking size of char""... $ac_c" 1>&6 --echo "configure:2543: checking size of char" >&5 -+echo "configure:6389: checking size of char" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2547,9 +6393,10 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -2558,7 +6405,7 @@ - exit(0); - } - EOF --if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_char=`cat conftestval` - else -@@ -2578,7 +6425,7 @@ - - - echo $ac_n "checking size of short""... $ac_c" 1>&6 --echo "configure:2582: checking size of short" >&5 -+echo "configure:6429: checking size of short" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2586,9 +6433,10 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -2597,7 +6445,7 @@ - exit(0); - } - EOF --if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_short=`cat conftestval` - else -@@ -2617,7 +6465,7 @@ - - - echo $ac_n "checking size of long""... $ac_c" 1>&6 --echo "configure:2621: checking size of long" >&5 -+echo "configure:6469: checking size of long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2625,9 +6473,10 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -2636,7 +6485,7 @@ - exit(0); - } - EOF --if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long=`cat conftestval` - else -@@ -2656,7 +6505,7 @@ - - - echo $ac_n "checking size of int""... $ac_c" 1>&6 --echo "configure:2660: checking size of int" >&5 -+echo "configure:6509: checking size of int" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2664,9 +6513,10 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -2675,7 +6525,7 @@ - exit(0); - } - EOF --if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_int=`cat conftestval` - else -@@ -2695,7 +6545,7 @@ - - - echo $ac_n "checking size of void *""... $ac_c" 1>&6 --echo "configure:2699: checking size of void *" >&5 -+echo "configure:6549: checking size of void *" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2703,9 +6553,10 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -2714,7 +6565,7 @@ - exit(0); - } - EOF --if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_void_p=`cat conftestval` - else -@@ -2734,7 +6585,7 @@ - - - echo $ac_n "checking size of long long""... $ac_c" 1>&6 --echo "configure:2738: checking size of long long" >&5 -+echo "configure:6589: checking size of long long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2742,9 +6593,10 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -2753,7 +6605,7 @@ - exit(0); - } - EOF --if { (eval echo configure:2757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long_long=`cat conftestval` - else -@@ -2774,12 +6626,12 @@ - - - echo $ac_n "checking for working const""... $ac_c" 1>&6 --echo "configure:2778: checking for working const" >&5 -+echo "configure:6630: checking for working const" >&5 - if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:6684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else -@@ -2850,7 +6702,7 @@ - - - echo $ac_n "checking for __inline""... $ac_c" 1>&6 --echo "configure:2854: checking for __inline" >&5 -+echo "configure:6706: checking for __inline" >&5 - if eval "test \"`echo '$''{'glib_cv_has__inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2859,14 +6711,14 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_has__inline=yes - -@@ -2891,7 +6743,7 @@ - - esac - echo $ac_n "checking for __inline__""... $ac_c" 1>&6 --echo "configure:2895: checking for __inline__" >&5 -+echo "configure:6747: checking for __inline__" >&5 - if eval "test \"`echo '$''{'glib_cv_has__inline__'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2900,14 +6752,14 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_has__inline__=yes - -@@ -2932,7 +6784,7 @@ - - esac - echo $ac_n "checking for inline""... $ac_c" 1>&6 --echo "configure:2936: checking for inline" >&5 -+echo "configure:6788: checking for inline" >&5 - if eval "test \"`echo '$''{'glib_cv_hasinline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2941,14 +6793,14 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_hasinline=yes - -@@ -2974,14 +6826,14 @@ - esac - - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 --echo "configure:2978: checking whether byte ordering is bigendian" >&5 -+echo "configure:6830: checking whether byte ordering is bigendian" >&5 - if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_bigendian=unknown - # See if sys/param.h defines the BYTE_ORDER macro. - cat > conftest.$ac_ext < - #include -@@ -2992,11 +6844,11 @@ - #endif - ; return 0; } - EOF --if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:6848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. - cat > conftest.$ac_ext < - #include -@@ -3007,7 +6859,7 @@ - #endif - ; return 0; } - EOF --if { (eval echo configure:3011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:6863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes - else -@@ -3027,7 +6879,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_bigendian=no - else -@@ -3068,17 +6920,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3072: checking for $ac_hdr" >&5 -+echo "configure:6924: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:6934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3111,17 +6963,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3115: checking for $ac_hdr" >&5 -+echo "configure:6967: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:6977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3154,17 +7006,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3158: checking for $ac_hdr" >&5 -+echo "configure:7010: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3197,17 +7049,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3201: checking for $ac_hdr" >&5 -+echo "configure:7053: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3240,17 +7092,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3244: checking for $ac_hdr" >&5 -+echo "configure:7096: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3283,17 +7135,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3287: checking for $ac_hdr" >&5 -+echo "configure:7139: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3326,17 +7178,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3330: checking for $ac_hdr" >&5 -+echo "configure:7182: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3369,17 +7221,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3373: checking for $ac_hdr" >&5 -+echo "configure:7225: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3412,17 +7264,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3416: checking for $ac_hdr" >&5 -+echo "configure:7268: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3455,17 +7307,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3459: checking for $ac_hdr" >&5 -+echo "configure:7311: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3499,12 +7351,12 @@ - for ac_func in lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp poll - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:3503: checking for $ac_func" >&5 -+echo "configure:7355: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -3554,9 +7406,9 @@ - - # Check for sys_errlist - echo $ac_n "checking for sys_errlist""... $ac_c" 1>&6 --echo "configure:3558: checking for sys_errlist" >&5 -+echo "configure:7410: checking for sys_errlist" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - glib_ok=yes - else -@@ -3587,9 +7439,9 @@ - - # Check for sys_siglist - echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6 --echo "configure:3591: checking for sys_siglist" >&5 -+echo "configure:7443: checking for sys_siglist" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - glib_ok=yes - else -@@ -3619,9 +7471,9 @@ - - # Check for sys_siglist decl (see Tue Jan 19 00:44:24 1999 in changelog) - echo $ac_n "checking for sys_siglist declaration""... $ac_c" 1>&6 --echo "configure:3623: checking for sys_siglist declaration" >&5 -+echo "configure:7475: checking for sys_siglist declaration" >&5 - cat > conftest.$ac_ext < - int main() { -@@ -3630,7 +7482,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - glib_ok=yes - else -@@ -3650,16 +7502,16 @@ - - # Check if needs to be included for fd_set - echo $ac_n "checking for fd_set""... $ac_c" 1>&6 --echo "configure:3654: checking for fd_set" >&5 -+echo "configure:7506: checking for fd_set" >&5 - cat > conftest.$ac_ext < - int main() { - fd_set readMask, writeMask; - ; return 0; } - EOF --if { (eval echo configure:3663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:7515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - gtk_ok=yes - else -@@ -3673,7 +7525,7 @@ - echo "$ac_t""yes, found in sys/types.h" 1>&6 - else - cat > conftest.$ac_ext < - EOF -@@ -3707,14 +7559,14 @@ - # Check for wchar.h - - echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 --echo "configure:3711: checking for wchar.h" >&5 -+echo "configure:7563: checking for wchar.h" >&5 - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3738,14 +7590,14 @@ - # Check for wctype.h (for iswalnum) - - echo $ac_n "checking for wctype.h""... $ac_c" 1>&6 --echo "configure:3742: checking for wctype.h" >&5 -+echo "configure:7594: checking for wctype.h" >&5 - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:3749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -3769,12 +7621,12 @@ - oLIBS="$LIBS" - # in Solaris 2.5, `iswalnum' is in -lw - echo $ac_n "checking for iswalnum""... $ac_c" 1>&6 --echo "configure:3773: checking for iswalnum" >&5 -+echo "configure:7625: checking for iswalnum" >&5 - if eval "test \"`echo '$''{'ac_cv_func_iswalnum'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_iswalnum=yes" - else -@@ -3815,7 +7667,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for iswalnum in -lw""... $ac_c" 1>&6 --echo "configure:3819: checking for iswalnum in -lw" >&5 -+echo "configure:7671: checking for iswalnum in -lw" >&5 - ac_lib_var=`echo w'_'iswalnum | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -3823,7 +7675,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lw $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -3866,9 +7718,9 @@ - - # The following is necessary for Linux libc-5.4.38 - echo $ac_n "checking if iswalnum() and friends are properly defined""... $ac_c" 1>&6 --echo "configure:3870: checking if iswalnum() and friends are properly defined" >&5 -+echo "configure:7722: checking if iswalnum() and friends are properly defined" >&5 - cat > conftest.$ac_ext < - int main() { -@@ -3888,7 +7740,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - glib_working_wctype=yes - else -@@ -3909,7 +7761,7 @@ - echo "$ac_t""$glib_working_wctype" 1>&6 - - echo $ac_n "checking whether realloc (NULL,) will work""... $ac_c" 1>&6 --echo "configure:3913: checking whether realloc (NULL,) will work" >&5 -+echo "configure:7765: checking whether realloc (NULL,) will work" >&5 - if eval "test \"`echo '$''{'glib_cv_sane_realloc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -3918,7 +7770,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -3926,7 +7778,7 @@ - return realloc (0, sizeof (int)) == 0; - } - EOF --if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:7782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_sane_realloc=yes - cat >> confdefs.h <<\EOF -@@ -3951,7 +7803,7 @@ - - - echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 --echo "configure:3955: checking for an implementation of va_copy()" >&5 -+echo "configure:7807: checking for an implementation of va_copy()" >&5 - if eval "test \"`echo '$''{'glib_cv_va_copy'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -3960,7 +7812,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -3977,7 +7829,7 @@ - return 0; - } - EOF --if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:7833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_va_copy=yes - -@@ -3996,7 +7848,7 @@ - - echo "$ac_t""$glib_cv_va_copy" 1>&6 - echo $ac_n "checking for an implementation of __va_copy()""... $ac_c" 1>&6 --echo "configure:4000: checking for an implementation of __va_copy()" >&5 -+echo "configure:7852: checking for an implementation of __va_copy()" >&5 - if eval "test \"`echo '$''{'glib_cv___va_copy'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -4005,7 +7857,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -4022,7 +7874,7 @@ - return 0; - } - EOF --if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:7878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv___va_copy=yes - -@@ -4041,7 +7893,7 @@ - - echo "$ac_t""$glib_cv___va_copy" 1>&6 - echo $ac_n "checking whether va_lists can be copied by value""... $ac_c" 1>&6 --echo "configure:4045: checking whether va_lists can be copied by value" >&5 -+echo "configure:7897: checking whether va_lists can be copied by value" >&5 - if eval "test \"`echo '$''{'glib_cv_va_val_copy'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -4050,7 +7902,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -4067,7 +7919,7 @@ - return 0; - } - EOF --if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_va_val_copy=yes - -@@ -4112,12 +7964,12 @@ - G_MODULE_HAVE_DLERROR=0 - if test -z "$G_MODULE_IMPL"; then - echo $ac_n "checking for dlopen""... $ac_c" 1>&6 --echo "configure:4116: checking for dlopen" >&5 -+echo "configure:7968: checking for dlopen" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:7996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" - else -@@ -4155,12 +8007,12 @@ - if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for dlsym""... $ac_c" 1>&6 --echo "configure:4159: checking for dlsym" >&5 -+echo "configure:8011: checking for dlsym" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlsym'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlsym=yes" - else -@@ -4211,7 +8063,7 @@ - fi - if test -z "$G_MODULE_IMPL"; then - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 --echo "configure:4215: checking for dlopen in -ldl" >&5 -+echo "configure:8067: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4219,7 +8071,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4246,7 +8098,7 @@ - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6 --echo "configure:4250: checking for dlsym in -ldl" >&5 -+echo "configure:8102: checking for dlsym in -ldl" >&5 - ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4254,7 +8106,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4295,18 +8147,18 @@ - fi - if test -z "$G_MODULE_IMPL"; then - echo $ac_n "checking how to export all symbols""... $ac_c" 1>&6 --echo "configure:4299: checking how to export all symbols" >&5 -+echo "configure:8151: checking how to export all symbols" >&5 - SAVED_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-E" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - G_MODULE_LDFLAGS="-Wl,-E" - else -@@ -4316,14 +8168,14 @@ - - LDFLAGS="$SAVED_LDFLAGS -bexpall" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - G_MODULE_LDFLAGS="-bexpall" - else -@@ -4343,7 +8195,7 @@ - G_MODULE_LDFLAGS= - fi - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 --echo "configure:4347: checking for shl_load in -ldld" >&5 -+echo "configure:8199: checking for shl_load in -ldld" >&5 - ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4351,7 +8203,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4396,7 +8248,7 @@ - LIBS="$LIBS $G_MODULE_LIBS" - LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" - echo $ac_n "checking for RTLD_GLOBAL brokenness""... $ac_c" 1>&6 --echo "configure:4400: checking for RTLD_GLOBAL brokenness" >&5 -+echo "configure:8252: checking for RTLD_GLOBAL brokenness" >&5 - if eval "test \"`echo '$''{'glib_cv_rtldglobal_broken'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -4405,7 +8257,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -4425,7 +8277,7 @@ - return global == local; - } - EOF --if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:8281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_rtldglobal_broken=no - else -@@ -4448,7 +8300,7 @@ - G_MODULE_BROKEN_RTLD_GLOBAL=0 - fi - echo $ac_n "checking for preceeding underscore in symbols""... $ac_c" 1>&6 --echo "configure:4452: checking for preceeding underscore in symbols" >&5 -+echo "configure:8304: checking for preceeding underscore in symbols" >&5 - if eval "test \"`echo '$''{'glib_cv_uscore'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -4457,7 +8309,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -4471,7 +8323,7 @@ - } return (!f2 || f1); - } - EOF --if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_uscore=yes - else -@@ -4496,12 +8348,12 @@ - - LDFLAGS="$LDFLAGS_orig" - echo $ac_n "checking for dlerror""... $ac_c" 1>&6 --echo "configure:4500: checking for dlerror" >&5 -+echo "configure:8352: checking for dlerror" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlerror=yes" - else -@@ -4608,7 +8460,7 @@ - case $host in - *-*-solaris*) - echo $ac_n "checking for cond_init in -lthread""... $ac_c" 1>&6 --echo "configure:4612: checking for cond_init in -lthread" >&5 -+echo "configure:8464: checking for cond_init in -lthread" >&5 - ac_lib_var=`echo thread'_'cond_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4616,7 +8468,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lthread $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4654,17 +8506,17 @@ - if test "x$have_threads" = xnone; then - ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 --echo "configure:4658: checking for pthread.h" >&5 -+echo "configure:8510: checking for pthread.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:4668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:8520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -4690,7 +8542,7 @@ - if test "x$want_threads" = xyes || test "x$want_threads" = xnspr; then - if test "x$have_threads" = xnone; then - echo $ac_n "checking for PRP_NewNakedCondVar in -lnspr21""... $ac_c" 1>&6 --echo "configure:4694: checking for PRP_NewNakedCondVar in -lnspr21" >&5 -+echo "configure:8546: checking for PRP_NewNakedCondVar in -lnspr21" >&5 - ac_lib_var=`echo nspr21'_'PRP_NewNakedCondVar | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4698,7 +8550,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnspr21 $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4733,7 +8585,7 @@ - fi - - echo $ac_n "checking for thread implementation""... $ac_c" 1>&6 --echo "configure:4737: checking for thread implementation" >&5 -+echo "configure:8589: checking for thread implementation" >&5 - - if test "x$have_threads" = xnone && test "x$want_threads" != xno; then - echo "$ac_t""none available" 1>&6 -@@ -4752,7 +8604,7 @@ - posix) - G_THREAD_LIBS=error - echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6 --echo "configure:4756: checking for pthread_attr_init in -lpthread" >&5 -+echo "configure:8608: checking for pthread_attr_init in -lpthread" >&5 - ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4760,7 +8612,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4793,7 +8645,7 @@ - - if test "x$G_THREAD_LIBS" = xerror; then - echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6 --echo "configure:4797: checking for pthread_attr_init in -lpthreads" >&5 -+echo "configure:8649: checking for pthread_attr_init in -lpthreads" >&5 - ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4801,7 +8653,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpthreads $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4835,7 +8687,7 @@ - fi - if test "x$G_THREAD_LIBS" = xerror; then - echo $ac_n "checking for pthread_attr_init in -lthread""... $ac_c" 1>&6 --echo "configure:4839: checking for pthread_attr_init in -lthread" >&5 -+echo "configure:8691: checking for pthread_attr_init in -lthread" >&5 - ac_lib_var=`echo thread'_'pthread_attr_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4843,7 +8695,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lthread $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4877,7 +8729,7 @@ - fi - if test "x$G_THREAD_LIBS" = xerror; then - echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6 --echo "configure:4881: checking for pthread_attr_init in -lc_r" >&5 -+echo "configure:8733: checking for pthread_attr_init in -lc_r" >&5 - ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4885,7 +8737,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lc_r $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -4919,12 +8771,12 @@ - fi - if test "x$G_THREAD_LIBS" = xerror; then - echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6 --echo "configure:4923: checking for pthread_attr_init" >&5 -+echo "configure:8775: checking for pthread_attr_init" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_attr_init=yes" - else -@@ -4969,7 +8821,7 @@ - fi - if test "x$G_THREAD_LIBS" = xerror; then - echo $ac_n "checking for __d10_pthread_attr_init in -lthread""... $ac_c" 1>&6 --echo "configure:4973: checking for __d10_pthread_attr_init in -lthread" >&5 -+echo "configure:8825: checking for __d10_pthread_attr_init in -lthread" >&5 - ac_lib_var=`echo thread'_'__d10_pthread_attr_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -4977,7 +8829,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lthread $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -5012,7 +8864,7 @@ - fi - if test "x$G_THREAD_LIBS" = xerror; then - echo $ac_n "checking for __pthread_attr_init_system in -lpthread""... $ac_c" 1>&6 --echo "configure:5016: checking for __pthread_attr_init_system in -lpthread" >&5 -+echo "configure:8868: checking for __pthread_attr_init_system in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_attr_init_system | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -5020,7 +8872,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -5061,7 +8913,7 @@ - solaris) - G_THREAD_LIBS=error - echo $ac_n "checking for cond_init in -lthread""... $ac_c" 1>&6 --echo "configure:5065: checking for cond_init in -lthread" >&5 -+echo "configure:8917: checking for cond_init in -lthread" >&5 - ac_lib_var=`echo thread'_'cond_init | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -5069,7 +8921,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lthread $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -5108,7 +8960,7 @@ - ;; - nspr) - echo $ac_n "checking for PRP_NewNakedCondVar in -lnspr21""... $ac_c" 1>&6 --echo "configure:5112: checking for PRP_NewNakedCondVar in -lnspr21" >&5 -+echo "configure:8964: checking for PRP_NewNakedCondVar in -lnspr21" >&5 - ac_lib_var=`echo nspr21'_'PRP_NewNakedCondVar | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -5116,7 +8968,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnspr21 $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:8983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -5163,7 +9015,7 @@ - fi - - echo $ac_n "checking necessary linker options""... $ac_c" 1>&6 --echo "configure:5167: checking necessary linker options" >&5 -+echo "configure:9019: checking necessary linker options" >&5 - echo "$ac_t""$G_THREAD_LIBS" 1>&6 - - -@@ -5191,7 +9043,7 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" - cat > conftest.$ac_ext < - EOF -@@ -5208,7 +9060,7 @@ - CPPFLAGS=$old_CPPFLAGS - - echo $ac_n "checking necessary compiler options""... $ac_c" 1>&6 --echo "configure:5212: checking necessary compiler options" >&5 -+echo "configure:9064: checking necessary compiler options" >&5 - - echo "$ac_t""$G_THREAD_CFLAGS" 1>&6 - else -@@ -5226,12 +9078,12 @@ - for ac_func in localtime_r rand_r - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:5230: checking for $ac_func" >&5 -+echo "configure:9082: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:9110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -5280,7 +9132,7 @@ - - if test "$ac_cv_header_pwd_h" = "yes"; then - echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6 --echo "configure:5284: checking for getpwuid_r" >&5 -+echo "configure:9136: checking for getpwuid_r" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getpwuid_r'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -5288,7 +9140,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < - int main () { char buffer[10000], *pointer; -@@ -5300,7 +9152,7 @@ - sizeof (buffer), &pointer); - return errno == ENOSYS || error == ENOSYS;} - EOF --if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:9156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_func_getpwuid_r=yes - else -@@ -5325,11 +9177,11 @@ - fi - if test "$ac_cv_func_getpwuid_r" = "yes"; then - echo $ac_n "checking whether getpwuid_r is posix like""... $ac_c" 1>&6 --echo "configure:5329: checking whether getpwuid_r is posix like" >&5 -+echo "configure:9181: checking whether getpwuid_r is posix like" >&5 - # The signature for the POSIX version is: - # int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **) - cat > conftest.$ac_ext < - #include -@@ -5338,7 +9190,7 @@ - getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL); - ; return 0; } - EOF --if { (eval echo configure:5342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:9194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - cat >> confdefs.h <<\EOF - #define HAVE_GETPWUID_R_POSIX 1 -@@ -5357,17 +9209,17 @@ - if test x"$have_threads" = xposix; then - LIBS="$LIBS $G_THREAD_LIBS" - echo $ac_n "checking whether pthread_getspecific is posix like""... $ac_c" 1>&6 --echo "configure:5361: checking whether pthread_getspecific is posix like" >&5 -+echo "configure:9213: checking whether pthread_getspecific is posix like" >&5 - # PCThreads has pthread_getspecific(pthread_key_t, void **); - cat > conftest.$ac_ext < - int main() { - pthread_getspecific(0,NULL); - ; return 0; } - EOF --if { (eval echo configure:5371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:9223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 - else -@@ -5382,20 +9234,20 @@ - fi - rm -f conftest* - echo $ac_n "checking whether pthread_mutex_trylock is posix like""... $ac_c" 1>&6 --echo "configure:5386: checking whether pthread_mutex_trylock is posix like" >&5 -+echo "configure:9238: checking whether pthread_mutex_trylock is posix like" >&5 - # DCE Threads return 1 as success, posix 0. what a mess. - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int main () { - return !pthread_mutex_trylock (&mutex); } - EOF --if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:9251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""no" 1>&6 - else -@@ -5412,13 +9264,13 @@ - fi - - echo $ac_n "checking whether pthread_cond_timedwait is posix like""... $ac_c" 1>&6 --echo "configure:5416: checking whether pthread_cond_timedwait is posix like" >&5 -+echo "configure:9268: checking whether pthread_cond_timedwait is posix like" >&5 - # DCE Threads return -1 as failure, posix ETIMEDOUT. - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < - int main () { -@@ -5432,7 +9284,7 @@ - return pthread_cond_timedwait (&cond,&mutex,&tspec) - != -1;} - EOF --if { (eval echo configure:5436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:9288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""no" 1>&6 - else -@@ -5475,7 +9327,7 @@ - case "$mutex_has_default" in - "yes") - echo $ac_n "checking size of $mutex_default_type""... $ac_c" 1>&6 --echo "configure:5479: checking size of $mutex_default_type" >&5 -+echo "configure:9331: checking size of $mutex_default_type" >&5 - if eval "test \"`echo '$''{'glib_cv_sizeof_gmutex'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -5483,7 +9335,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < - #include <$mutex_header_file> -@@ -5495,7 +9347,7 @@ - exit(0); - } - EOF --if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:9351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_sizeof_gmutex=`cat conftestval` - else -@@ -5515,7 +9367,7 @@ - - - echo $ac_n "checking byte contents of $mutex_default_type""... $ac_c" 1>&6 --echo "configure:5519: checking byte contents of $mutex_default_type" >&5 -+echo "configure:9371: checking byte contents of $mutex_default_type" >&5 - if eval "test \"`echo '$''{'glib_cv_byte_contents_gmutex'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -5523,7 +9375,7 @@ - glib_cv_byte_contents_gmutex=0 - else - cat > conftest.$ac_ext < - #include <$mutex_header_file> -@@ -5540,7 +9392,7 @@ - exit(0); - } - EOF --if { (eval echo configure:5544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:9396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - glib_cv_byte_contents_gmutex=`cat conftestval` - else -@@ -5576,7 +9428,7 @@ - glib_nl='\n' - fi - echo $ac_n "checking system definitions for $glib_sysdef_msg""... $ac_c" 1>&6 --echo "configure:5580: checking system definitions for $glib_sysdef_msg" >&5 -+echo "configure:9432: checking system definitions for $glib_sysdef_msg" >&5 - cat >confrun.c <<_______EOF - #include - #include -@@ -5603,11 +9455,11 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""done" 1>&6 - else -@@ -5813,16 +9665,20 @@ - s%@build_cpu@%$build_cpu%g - s%@build_vendor@%$build_vendor%g - s%@build_os@%$build_os%g --s%@RANLIB@%$RANLIB%g - s%@CC@%$CC%g - s%@LN_S@%$LN_S%g -+s%@OBJEXT@%$OBJEXT%g -+s%@EXEEXT@%$EXEEXT%g -+s%@ECHO@%$ECHO%g -+s%@RANLIB@%$RANLIB%g -+s%@STRIP@%$STRIP%g -+s%@CPP@%$CPP%g - s%@LIBTOOL@%$LIBTOOL%g - s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g - s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g - s%@MAINT@%$MAINT%g - s%@ENABLE_MEM_CHECK@%$ENABLE_MEM_CHECK%g - s%@ENABLE_MEM_PROFILE@%$ENABLE_MEM_PROFILE%g --s%@CPP@%$CPP%g - s%@G_MODULE_IMPL@%$G_MODULE_IMPL%g - s%@G_MODULE_LIBS@%$G_MODULE_LIBS%g - s%@G_MODULE_LDFLAGS@%$G_MODULE_LDFLAGS%g ---- glib1.2-1.2.10.orig/ltmain.sh -+++ glib1.2-1.2.10/ltmain.sh -@@ -1,7 +1,8 @@ - # ltmain.sh - Provide generalized library-building support services. --# NOTE: Changing this file will not affect anything until you rerun ltconfig. -+# NOTE: Changing this file will not affect anything until you rerun configure. - # --# Copyright (C) 1996-1999 Free Software Foundation, Inc. -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -+# Free Software Foundation, Inc. - # Originally by Gordon Matzigkeit , 1996 - # - # This program is free software; you can redistribute it and/or modify -@@ -48,14 +49,14 @@ - fi - - # The name of this program. --progname=`$echo "$0" | sed 's%^.*/%%'` -+progname=`$echo "$0" | ${SED} 's%^.*/%%'` - modename="$progname" - - # Constants. - PROGRAM=ltmain.sh - PACKAGE=libtool --VERSION=1.3.4 --TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)" -+VERSION=1.4.3 -+TIMESTAMP=" (1.922.2.111 2002/10/23 02:54:36)" - - default_mode= - help="Try \`$progname --help' for more information." -@@ -66,10 +67,19 @@ - - # Sed substitution that helps us do robust quoting. It backslashifies - # metacharacters that are still active within double-quoted strings. --Xsed='sed -e 1s/^X//' -+Xsed="${SED}"' -e 1s/^X//' - sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' --SP2NL='tr \040 \012' --NL2SP='tr \015\012 \040\040' -+# test EBCDIC or ASCII -+case `echo A|od -x` in -+ *[Cc]1*) # EBCDIC based system -+ SP2NL="tr '\100' '\n'" -+ NL2SP="tr '\r\n' '\100\100'" -+ ;; -+ *) # Assume ASCII based system -+ SP2NL="tr '\040' '\012'" -+ NL2SP="tr '\015\012' '\040\040'" -+ ;; -+esac - - # NLS nuisances. - # Only set LANG and LC_ALL to C if already set. -@@ -83,11 +93,8 @@ - save_LANG="$LANG"; LANG=C; export LANG - fi - --if test "$LTCONFIG_VERSION" != "$VERSION"; then -- echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 -- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 --fi -+# Make sure IFS has a sensible default -+: ${IFS=" "} - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - echo "$modename: not configured to build any kind of library" 1>&2 -@@ -113,16 +120,16 @@ - arg="$1" - shift - -- case "$arg" in -+ case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then -- case "$prev" in -+ case $prev in - execute_dlfiles) -- eval "$prev=\"\$$prev \$arg\"" -+ execute_dlfiles="$execute_dlfiles $arg" - ;; - *) - eval "$prev=\$arg" -@@ -135,7 +142,7 @@ - fi - - # Have we seen a non-optional argument yet? -- case "$arg" in -+ case $arg in - --help) - show_help=yes - ;; -@@ -146,7 +153,7 @@ - ;; - - --config) -- sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 -+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 - exit 0 - ;; - -@@ -179,6 +186,8 @@ - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - -+ --preserve-dup-deps) duplicate_deps="yes" ;; -+ - --quiet | --silent) - show=: - ;; -@@ -207,16 +216,21 @@ - exit 1 - fi - -+# If this variable is set in any of the actions, the command in it -+# will be execed at the end. This prevents here-documents from being -+# left over by shells. -+exec_cmd= -+ - if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then -- case "$nonopt" in -- *cc | *++ | gcc* | *-gcc*) -+ case $nonopt in -+ *cc | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do -- case "$arg" in -+ case $arg in - -c) - mode=compile - break -@@ -261,12 +275,13 @@ - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. -- case "$mode" in -+ case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= -+ prev= - lastarg= - srcfile="$nonopt" - suppress_output= -@@ -274,8 +289,34 @@ - user_target=no - for arg - do -+ case $prev in -+ "") ;; -+ xcompiler) -+ # Aesthetically quote the previous argument. -+ prev= -+ lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -+ -+ case $arg in -+ # Double-quote args containing other shell metacharacters. -+ # Many Bourne shells cannot handle close brackets correctly -+ # in scan sets, so we specify it separately. -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ -+ # Add the previous argument to base_compile. -+ if test -z "$base_compile"; then -+ base_compile="$lastarg" -+ else -+ base_compile="$base_compile $lastarg" -+ fi -+ continue -+ ;; -+ esac -+ - # Accept any command-line options. -- case "$arg" in -+ case $arg in - -o) - if test "$user_target" != "no"; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 -@@ -288,9 +329,53 @@ - build_old_libs=yes - continue - ;; -+ -+ -prefer-pic) -+ pic_mode=yes -+ continue -+ ;; -+ -+ -prefer-non-pic) -+ pic_mode=no -+ continue -+ ;; -+ -+ -Xcompiler) -+ prev=xcompiler -+ continue -+ ;; -+ -+ -Wc,*) -+ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` -+ lastarg= -+ save_ifs="$IFS"; IFS=',' -+ for arg in $args; do -+ IFS="$save_ifs" -+ -+ # Double-quote args containing other shell metacharacters. -+ # Many Bourne shells cannot handle close brackets correctly -+ # in scan sets, so we specify it separately. -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ lastarg="$lastarg $arg" -+ done -+ IFS="$save_ifs" -+ lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` -+ -+ # Add the arguments to base_compile. -+ if test -z "$base_compile"; then -+ base_compile="$lastarg" -+ else -+ base_compile="$base_compile $lastarg" -+ fi -+ continue -+ ;; - esac - -- case "$user_target" in -+ case $user_target in - next) - # The next one is the -o target name - user_target=yes -@@ -316,10 +401,10 @@ - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - # Double-quote args containing other shell metacharacters. -- # Many Bourne shells cannot handle close brackets correctly in scan -- # sets, so we specify it separately. -- case "$lastarg" in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ # Many Bourne shells cannot handle close brackets correctly -+ # in scan sets, so we specify it separately. -+ case $lastarg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac -@@ -332,7 +417,7 @@ - fi - done - -- case "$user_target" in -+ case $user_target in - set) - ;; - no) -@@ -348,7 +433,7 @@ - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSfmso]' -- case "$libobj" in -+ case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; -@@ -363,7 +448,7 @@ - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - -- case "$libobj" in -+ case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 -@@ -387,10 +472,21 @@ - $run $rm $removelist - trap "$run $rm $removelist; exit 1" 1 2 15 - -+ # On Cygwin there's no "real" PIC flag so we must build both object types -+ case $host_os in -+ cygwin* | mingw* | pw32* | os2*) -+ pic_mode=default -+ ;; -+ esac -+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then -+ # non-PIC code in shared libraries is not supported -+ pic_mode=default -+ fi -+ - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then -- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} -+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit 1" 1 2 15 -@@ -402,7 +498,7 @@ - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then -- until ln "$0" "$lockfile" 2>/dev/null; do -+ until $run ln "$0" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done -@@ -434,8 +530,13 @@ - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - -- # All platforms use -DPIC, to notify preprocessed assembler code. -- command="$base_compile $srcfile $pic_flag -DPIC" -+ if test "$pic_mode" != no; then -+ # All platforms use -DPIC, to notify preprocessed assembler code. -+ command="$base_compile $srcfile $pic_flag -DPIC" -+ else -+ # Don't build PIC code -+ command="$base_compile $srcfile" -+ fi - if test "$build_old_libs" = yes; then - lo_libobj="$libobj" - dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` -@@ -506,7 +607,8 @@ - fi - - # If we have no pic_flag, then copy the object into place and finish. -- if test -z "$pic_flag" && test "$build_old_libs" = yes; then -+ if (test -z "$pic_flag" || test "$pic_mode" != default) && -+ test "$build_old_libs" = yes; then - # Rename the .lo from within objdir to obj - if test -f $obj; then - $show $rm $obj -@@ -532,6 +634,10 @@ - # Now arrange that obj and lo_libobj become the same file - $show "(cd $xdir && $LN_S $baseobj $libobj)" - if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then -+ # Unlock the critical section if it was locked -+ if test "$need_locks" != no; then -+ $run $rm "$lockfile" -+ fi - exit 0 - else - error=$? -@@ -546,7 +652,13 @@ - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then -- command="$base_compile $srcfile" -+ if test "$pic_mode" != yes; then -+ # Don't build PIC code -+ command="$base_compile $srcfile" -+ else -+ # All platforms use -DPIC, to notify preprocessed assembler code. -+ command="$base_compile $srcfile $pic_flag -DPIC" -+ fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - output_obj="$obj" -@@ -612,17 +724,17 @@ - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then -- $rm "$lockfile" -+ $run $rm "$lockfile" - fi - - exit 0 - ;; - - # libtool link mode -- link) -+ link | relink) - modename="$modename: link" -- case "$host" in -- *-*-cygwin* | *-*-mingw* | *-*-os2*) -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra -@@ -635,179 +747,12 @@ - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes -- -- # This is a source program that is used to create dlls on Windows -- # Don't remove nor modify the starting and closing comments --# /* ltdll.c starts here */ --# #define WIN32_LEAN_AND_MEAN --# #include --# #undef WIN32_LEAN_AND_MEAN --# #include --# --# #ifndef __CYGWIN__ --# # ifdef __CYGWIN32__ --# # define __CYGWIN__ __CYGWIN32__ --# # endif --# #endif --# --# #ifdef __cplusplus --# extern "C" { --# #endif --# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); --# #ifdef __cplusplus --# } --# #endif --# --# #ifdef __CYGWIN__ --# #include --# DECLARE_CYGWIN_DLL( DllMain ); --# #endif --# HINSTANCE __hDllInstance_base; --# --# BOOL APIENTRY --# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) --# { --# __hDllInstance_base = hInst; --# return TRUE; --# } --# /* ltdll.c ends here */ -- # This is a source program that is used to create import libraries -- # on Windows for dlls which lack them. Don't remove nor modify the -- # starting and closing comments --# /* impgen.c starts here */ --# /* Copyright (C) 1999 Free Software Foundation, Inc. --# --# This file is part of GNU libtool. --# --# 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 /* for printf() */ --# #include /* for open(), lseek(), read() */ --# #include /* for O_RDONLY, O_BINARY */ --# #include /* for strdup() */ --# --# static unsigned int --# pe_get16 (fd, offset) --# int fd; --# int offset; --# { --# unsigned char b[2]; --# lseek (fd, offset, SEEK_SET); --# read (fd, b, 2); --# return b[0] + (b[1]<<8); --# } --# --# static unsigned int --# pe_get32 (fd, offset) --# int fd; --# int offset; --# { --# unsigned char b[4]; --# lseek (fd, offset, SEEK_SET); --# read (fd, b, 4); --# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); --# } --# --# static unsigned int --# pe_as32 (ptr) --# void *ptr; --# { --# unsigned char *b = ptr; --# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); --# } --# --# int --# main (argc, argv) --# int argc; --# char *argv[]; --# { --# int dll; --# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; --# unsigned long export_rva, export_size, nsections, secptr, expptr; --# unsigned long name_rvas, nexp; --# unsigned char *expdata, *erva; --# char *filename, *dll_name; --# --# filename = argv[1]; --# --# dll = open(filename, O_RDONLY|O_BINARY); --# if (!dll) --# return 1; --# --# dll_name = filename; --# --# for (i=0; filename[i]; i++) --# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') --# dll_name = filename + i +1; --# --# pe_header_offset = pe_get32 (dll, 0x3c); --# opthdr_ofs = pe_header_offset + 4 + 20; --# num_entries = pe_get32 (dll, opthdr_ofs + 92); --# --# if (num_entries < 1) /* no exports */ --# return 1; --# --# export_rva = pe_get32 (dll, opthdr_ofs + 96); --# export_size = pe_get32 (dll, opthdr_ofs + 100); --# nsections = pe_get16 (dll, pe_header_offset + 4 +2); --# secptr = (pe_header_offset + 4 + 20 + --# pe_get16 (dll, pe_header_offset + 4 + 16)); --# --# expptr = 0; --# for (i = 0; i < nsections; i++) --# { --# char sname[8]; --# unsigned long secptr1 = secptr + 40 * i; --# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); --# unsigned long vsize = pe_get32 (dll, secptr1 + 16); --# unsigned long fptr = pe_get32 (dll, secptr1 + 20); --# lseek(dll, secptr1, SEEK_SET); --# read(dll, sname, 8); --# if (vaddr <= export_rva && vaddr+vsize > export_rva) --# { --# expptr = fptr + (export_rva - vaddr); --# if (export_rva + export_size > vaddr + vsize) --# export_size = vsize - (export_rva - vaddr); --# break; --# } --# } --# --# expdata = (unsigned char*)malloc(export_size); --# lseek (dll, expptr, SEEK_SET); --# read (dll, expdata, export_size); --# erva = expdata - export_rva; --# --# nexp = pe_as32 (expdata+24); --# name_rvas = pe_as32 (expdata+32); --# --# printf ("EXPORTS\n"); --# for (i = 0; i\?\'\ \ ]*|*]*|"") -+ qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test -+ ;; -+ *) qarg=$arg ;; -+ esac -+ libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then -- case "$prev" in -+ case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - -- case "$prev" in -+ case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. -@@ -905,7 +852,7 @@ - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi -- case "$arg" in -+ case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then -@@ -934,6 +881,7 @@ - dlprefiles="$dlprefiles $arg" - fi - prev= -+ continue - ;; - esac - ;; -@@ -951,6 +899,11 @@ - prev= - continue - ;; -+ inst_prefix) -+ inst_prefix_dir="$arg" -+ prev= -+ continue -+ ;; - release) - release="-$arg" - prev= -@@ -958,7 +911,7 @@ - ;; - rpath | xrpath) - # We need an absolute path. -- case "$arg" in -+ case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 -@@ -979,17 +932,32 @@ - prev= - continue - ;; -+ xcompiler) -+ compiler_flags="$compiler_flags $qarg" -+ prev= -+ compile_command="$compile_command $qarg" -+ finalize_command="$finalize_command $qarg" -+ continue -+ ;; -+ xlinker) -+ linker_flags="$linker_flags $qarg" -+ compiler_flags="$compiler_flags $wl$qarg" -+ prev= -+ compile_command="$compile_command $wl$qarg" -+ finalize_command="$finalize_command $wl$qarg" -+ continue -+ ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac -- fi -+ fi # test -n $prev - - prevarg="$arg" - -- case "$arg" in -+ case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" -@@ -1026,7 +994,7 @@ - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then -- $echo "$modename: not more than one -exported-symbols argument allowed" -+ $echo "$modename: more than one -exported-symbols argument is not allowed" - exit 1 - fi - if test "X$arg" = "X-export-symbols"; then -@@ -1037,58 +1005,81 @@ - continue - ;; - -+ -inst-prefix-dir) -+ prev=inst_prefix -+ continue -+ ;; -+ -+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* -+ # so, if we see these flags be careful not to treat them like -L -+ -L[A-Z][A-Z]*:*) -+ case $with_gcc/$host in -+ no/*-*-irix* | no/*-*-nonstopux*) -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" -+ ;; -+ esac -+ continue -+ ;; -+ - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. -- case "$dir" in -+ case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then -- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 -- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 -- absdir="$dir" -+ $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 -+ exit 1 - fi - dir="$absdir" - ;; - esac -- case " $deplibs " in -- *" $arg "*) ;; -- *) deplibs="$deplibs $arg";; -- esac -- case " $lib_search_path " in -- *" $dir "*) ;; -- *) lib_search_path="$lib_search_path $dir";; -+ case "$deplibs " in -+ *" -L$dir "*) ;; -+ *) -+ deplibs="$deplibs -L$dir" -+ lib_search_path="$lib_search_path $dir" -+ ;; - esac -- case "$host" in -- *-*-cygwin* | *-*-mingw* | *-*-os2*) -- dllsearchdir=`cd "$dir" && pwd || echo "$dir"` -- case ":$dllsearchpath:" in -- ::) dllsearchpath="$dllsearchdir";; -- *":$dllsearchdir:"*) ;; -- *) dllsearchpath="$dllsearchpath:$dllsearchdir";; -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ case :$dllsearchpath: in -+ *":$dir:"*) ;; -+ *) dllsearchpath="$dllsearchpath:$dir";; - esac - ;; - esac -+ continue - ;; - - -l*) -- if test "$arg" = "-lc"; then -- case "$host" in -- *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) -- # These systems don't actually have c library (as such) -+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then -+ case $host in -+ *-*-cygwin* | *-*-pw32* | *-*-beos*) -+ # These systems don't actually have a C or math library (as such) - continue - ;; -+ *-*-mingw* | *-*-os2*) -+ # These systems don't actually have a C library (as such) -+ test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-openbsd* | *-*-freebsd*) -+ # Do not include libc due to us having libc/libc_r. -+ test "X$arg" = "X-lc" && continue -+ ;; - esac -- elif test "$arg" = "-lm"; then -- case "$host" in -- *-*-cygwin* | *-*-beos*) -- # These systems don't actually have math library (as such) -+ elif test "X$arg" = "X-lc_r"; then -+ case $host in -+ *-*-openbsd* | *-*-freebsd*) -+ # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" -+ continue - ;; - - -module) -@@ -1096,6 +1087,25 @@ - continue - ;; - -+ -no-fast-install) -+ fast_install=no -+ continue -+ ;; -+ -+ -no-install) -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ # The PATH hackery in wrapper scripts is required on Windows -+ # in order for the loader to find any dlls it needs. -+ $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 -+ $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 -+ fast_install=no -+ ;; -+ *) no_install=yes ;; -+ esac -+ continue -+ ;; -+ - -no-undefined) - allow_undefined=no - continue -@@ -1121,7 +1131,7 @@ - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. -- case "$dir" in -+ case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 -@@ -1136,11 +1146,11 @@ - ;; - - -static) -- # If we have no pic_flag, then this is the same as -all-static. -- if test -z "$pic_flag" && test -n "$link_static_flag"; then -- compile_command="$compile_command $link_static_flag" -- finalize_command="$finalize_command $link_static_flag" -- fi -+ # The effects of -static are defined in a previous loop. -+ # We used to do the same as -all-static on platforms that -+ # didn't have a PIC flag, but the assumption that the effects -+ # would be equivalent was wrong. It would break on at least -+ # Digital Unix and AIX. - continue - ;; - -@@ -1154,28 +1164,71 @@ - continue - ;; - -+ -Wc,*) -+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` -+ arg= -+ save_ifs="$IFS"; IFS=',' -+ for flag in $args; do -+ IFS="$save_ifs" -+ case $flag in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ flag="\"$flag\"" -+ ;; -+ esac -+ arg="$arg $wl$flag" -+ compiler_flags="$compiler_flags $flag" -+ done -+ IFS="$save_ifs" -+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"` -+ ;; -+ -+ -Wl,*) -+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` -+ arg= -+ save_ifs="$IFS"; IFS=',' -+ for flag in $args; do -+ IFS="$save_ifs" -+ case $flag in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ flag="\"$flag\"" -+ ;; -+ esac -+ arg="$arg $wl$flag" -+ compiler_flags="$compiler_flags $wl$flag" -+ linker_flags="$linker_flags $flag" -+ done -+ IFS="$save_ifs" -+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"` -+ ;; -+ -+ -Xcompiler) -+ prev=xcompiler -+ continue -+ ;; -+ -+ -Xlinker) -+ prev=xlinker -+ continue -+ ;; -+ - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- case "$arg" in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - -- *.o | *.obj | *.a | *.lib) -- # A standard object. -- objs="$objs $arg" -- ;; -- -- *.lo) -- # A library object. -+ *.lo | *.$objext) -+ # A library or standard object. - if test "$prev" = dlfiles; then -- dlfiles="$dlfiles $arg" -- if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then -+ # This file was specified with -dlopen. -+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -+ dlfiles="$dlfiles $arg" - prev= - continue - else -@@ -1188,357 +1241,917 @@ - # Preload the old-style object. - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` - prev= -+ else -+ case $arg in -+ *.lo) libobjs="$libobjs $arg" ;; -+ *) objs="$objs $arg" ;; -+ esac - fi -- libobjs="$libobjs $arg" -+ ;; -+ -+ *.$libext) -+ # An archive. -+ deplibs="$deplibs $arg" -+ old_deplibs="$old_deplibs $arg" -+ continue - ;; - - *.la) - # A libtool-controlled library. - -- dlname= -- libdir= -- library_names= -- old_library= -- -- # Check to see that this really is a libtool archive. -- if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -+ if test "$prev" = dlfiles; then -+ # This library was specified with -dlopen. -+ dlfiles="$dlfiles $arg" -+ prev= -+ elif test "$prev" = dlprefiles; then -+ # The library was specified with -dlpreopen. -+ dlprefiles="$dlprefiles $arg" -+ prev= - else -- $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 -- exit 1 -+ deplibs="$deplibs $arg" - fi -+ continue -+ ;; - -- # If the library was installed with an old release of libtool, -- # it will not redefine variable installed. -- installed=yes -- -- # Read the .la file -- # If there is no directory component, then add one. -- case "$arg" in -- */* | *\\*) . $arg ;; -- *) . ./$arg ;; -+ # Some other compiler argument. -+ *) -+ # Unknown arguments in both finalize_command and compile_command need -+ # to be aesthetically quoted because they are evaled later. -+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; - esac -+ ;; -+ esac # arg - -- # Get the name of the library we link against. -- linklib= -- for l in $old_library $library_names; do -- linklib="$l" -- done -- -- if test -z "$linklib"; then -- $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 -- exit 1 -- fi -- -- # Find the relevant object directory and library name. -- name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` -- -- if test "X$installed" = Xyes; then -- dir="$libdir" -- else -- dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$dir" = "X$arg"; then -- dir="$objdir" -- else -- dir="$dir/$objdir" -- fi -- fi -+ # Now actually substitute the argument into the commands. -+ if test -n "$arg"; then -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" -+ fi -+ done # argument parsing loop - -- if test -n "$dependency_libs"; then -- # Extract -R and -L from dependency_libs -- temp_deplibs= -- for deplib in $dependency_libs; do -- case "$deplib" in -- -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` -- case " $rpath $xrpath " in -- *" $temp_xrpath "*) ;; -- *) xrpath="$xrpath $temp_xrpath";; -- esac;; -- -L*) case "$compile_command $temp_deplibs " in -- *" $deplib "*) ;; -- *) temp_deplibs="$temp_deplibs $deplib";; -- esac -- temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` -- case " $lib_search_path " in -- *" $temp_dir "*) ;; -- *) lib_search_path="$lib_search_path $temp_dir";; -- esac -- ;; -- *) temp_deplibs="$temp_deplibs $deplib";; -- esac -- done -- dependency_libs="$temp_deplibs" -- fi -+ if test -n "$prev"; then -+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 -+ $echo "$help" 1>&2 -+ exit 1 -+ fi - -- if test -z "$libdir"; then -- # It is a libtool convenience library, so add in its objects. -- convenience="$convenience $dir/$old_library" -- old_convenience="$old_convenience $dir/$old_library" -- deplibs="$deplibs$dependency_libs" -- compile_command="$compile_command $dir/$old_library$dependency_libs" -- finalize_command="$finalize_command $dir/$old_library$dependency_libs" -- continue -- fi -+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -+ eval arg=\"$export_dynamic_flag_spec\" -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" -+ fi - -- # This library was specified with -dlopen. -- if test "$prev" = dlfiles; then -- dlfiles="$dlfiles $arg" -- if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then -- # If there is no dlname, no dlopen support or we're linking statically, -- # we need to preload. -- prev=dlprefiles -- else -- # We should not create a dependency on this library, but we -- # may need any libraries it requires. -- compile_command="$compile_command$dependency_libs" -- finalize_command="$finalize_command$dependency_libs" -- prev= -- continue -- fi -- fi -+ # calculate the name of the file, without its directory -+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` -+ libobjs_save="$libobjs" - -- # The library was specified with -dlpreopen. -- if test "$prev" = dlprefiles; then -- # Prefer using a static library (so that no silly _DYNAMIC symbols -- # are required to link). -- if test -n "$old_library"; then -- dlprefiles="$dlprefiles $dir/$old_library" -- else -- dlprefiles="$dlprefiles $dir/$linklib" -- fi -- prev= -- fi -+ if test -n "$shlibpath_var"; then -+ # get the directories listed in $shlibpath_var -+ eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` -+ else -+ shlib_search_path= -+ fi -+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" -+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - -- if test -n "$library_names" && -- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then -- link_against_libtool_libs="$link_against_libtool_libs $arg" -- if test -n "$shlibpath_var"; then -- # Make sure the rpath contains only unique directories. -- case "$temp_rpath " in -- *" $dir "*) ;; -- *) temp_rpath="$temp_rpath $dir" ;; -- esac -- fi -+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` -+ if test "X$output_objdir" = "X$output"; then -+ output_objdir="$objdir" -+ else -+ output_objdir="$output_objdir/$objdir" -+ fi -+ # Create the object directory. -+ if test ! -d $output_objdir; then -+ $show "$mkdir $output_objdir" -+ $run $mkdir $output_objdir -+ status=$? -+ if test $status -ne 0 && test ! -d $output_objdir; then -+ exit $status -+ fi -+ fi - -- # We need an absolute path. -- case "$dir" in -- [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; -- *) -- absdir=`cd "$dir" && pwd` -- if test -z "$absdir"; then -- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 -- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 -- absdir="$dir" -- fi -- ;; -- esac -- -- # This is the magic to use -rpath. -- # Skip directories that are in the system default run-time -- # search path, unless they have been requested with -R. -- case " $sys_lib_dlsearch_path " in -- *" $absdir "*) ;; -- *) -- case "$compile_rpath " in -- *" $absdir "*) ;; -- *) compile_rpath="$compile_rpath $absdir" -- esac -- ;; -- esac -+ # Determine the type of output -+ case $output in -+ "") -+ $echo "$modename: you must specify an output file" 1>&2 -+ $echo "$help" 1>&2 -+ exit 1 -+ ;; -+ *.$libext) linkmode=oldlib ;; -+ *.lo | *.$objext) linkmode=obj ;; -+ *.la) linkmode=lib ;; -+ *) linkmode=prog ;; # Anything else should be a program. -+ esac - -- case " $sys_lib_dlsearch_path " in -- *" $libdir "*) ;; -+ specialdeplibs= -+ libs= -+ # Find all interdependent deplibs by searching for libraries -+ # that are linked more than once (e.g. -la -lb -la) -+ for deplib in $deplibs; do -+ if test "X$duplicate_deps" = "Xyes" ; then -+ case "$libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi -+ libs="$libs $deplib" -+ done -+ deplibs= -+ newdependency_libs= -+ newlib_search_path= -+ need_relink=no # whether we're linking any uninstalled libtool libraries -+ notinst_deplibs= # not-installed libtool libraries -+ notinst_path= # paths that contain not-installed libtool libraries -+ case $linkmode in -+ lib) -+ passes="conv link" -+ for file in $dlfiles $dlprefiles; do -+ case $file in -+ *.la) ;; - *) -- case "$finalize_rpath " in -- *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" -- esac -+ $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 -+ exit 1 - ;; - esac -- -- lib_linked=yes -- case "$hardcode_action" in -- immediate | unsupported) -- if test "$hardcode_direct" = no; then -- compile_command="$compile_command $dir/$linklib" -- deplibs="$deplibs $dir/$linklib" -- case "$host" in -- *-*-cygwin* | *-*-mingw* | *-*-os2*) -- dllsearchdir=`cd "$dir" && pwd || echo "$dir"` -- if test -n "$dllsearchpath"; then -- dllsearchpath="$dllsearchpath:$dllsearchdir" -- else -- dllsearchpath="$dllsearchdir" -- fi -- ;; -- esac -- elif test "$hardcode_minus_L" = no; then -- case "$host" in -- *-*-sunos*) -- compile_shlibpath="$compile_shlibpath$dir:" -- ;; -- esac -- case "$compile_command " in -- *" -L$dir "*) ;; -- *) compile_command="$compile_command -L$dir";; -- esac -- compile_command="$compile_command -l$name" -- deplibs="$deplibs -L$dir -l$name" -- elif test "$hardcode_shlibpath_var" = no; then -- case ":$compile_shlibpath:" in -- *":$dir:"*) ;; -- *) compile_shlibpath="$compile_shlibpath$dir:";; -- esac -- compile_command="$compile_command -l$name" -- deplibs="$deplibs -l$name" -+ done -+ ;; -+ prog) -+ compile_deplibs= -+ finalize_deplibs= -+ alldeplibs=no -+ newdlfiles= -+ newdlprefiles= -+ passes="conv scan dlopen dlpreopen link" -+ ;; -+ *) passes="conv" -+ ;; -+ esac -+ for pass in $passes; do -+ if test $linkmode = prog; then -+ # Determine which files to process -+ case $pass in -+ dlopen) -+ libs="$dlfiles" -+ save_deplibs="$deplibs" # Collect dlpreopened libraries -+ deplibs= -+ ;; -+ dlpreopen) libs="$dlprefiles" ;; -+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; -+ esac -+ fi -+ for deplib in $libs; do -+ lib= -+ found=no -+ case $deplib in -+ -l*) -+ if test $linkmode = oldlib && test $linkmode = obj; then -+ $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 -+ continue -+ fi -+ if test $pass = conv; then -+ deplibs="$deplib $deplibs" -+ continue -+ fi -+ name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` -+ for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do -+ # Search the libtool library -+ lib="$searchdir/lib${name}.la" -+ if test -f "$lib"; then -+ found=yes -+ break -+ fi -+ done -+ if test "$found" != yes; then -+ # deplib doesn't seem to be a libtool library -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" - else -- lib_linked=no -+ deplibs="$deplib $deplibs" -+ test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" - fi -+ continue -+ fi -+ ;; # -l -+ -L*) -+ case $linkmode in -+ lib) -+ deplibs="$deplib $deplibs" -+ test $pass = conv && continue -+ newdependency_libs="$deplib $newdependency_libs" -+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; -- -- relink) -- if test "$hardcode_direct" = yes; then -- compile_command="$compile_command $absdir/$linklib" -- deplibs="$deplibs $absdir/$linklib" -- elif test "$hardcode_minus_L" = yes; then -- case "$compile_command " in -- *" -L$absdir "*) ;; -- *) compile_command="$compile_command -L$absdir";; -- esac -- compile_command="$compile_command -l$name" -- deplibs="$deplibs -L$absdir -l$name" -- elif test "$hardcode_shlibpath_var" = yes; then -- case ":$compile_shlibpath:" in -- *":$absdir:"*) ;; -- *) compile_shlibpath="$compile_shlibpath$absdir:";; -- esac -- compile_command="$compile_command -l$name" -- deplibs="$deplibs -l$name" -+ prog) -+ if test $pass = conv; then -+ deplibs="$deplib $deplibs" -+ continue -+ fi -+ if test $pass = scan; then -+ deplibs="$deplib $deplibs" -+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - else -- lib_linked=no -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" - fi - ;; -- - *) -- lib_linked=no -+ $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 - ;; -- esac -+ esac # linkmode -+ continue -+ ;; # -L -+ -R*) -+ if test $pass = link; then -+ dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` -+ # Make sure the xrpath contains only unique directories. -+ case "$xrpath " in -+ *" $dir "*) ;; -+ *) xrpath="$xrpath $dir" ;; -+ esac -+ fi -+ deplibs="$deplib $deplibs" -+ continue -+ ;; -+ *.la) lib="$deplib" ;; -+ *.$libext) -+ if test $pass = conv; then -+ deplibs="$deplib $deplibs" -+ continue -+ fi -+ case $linkmode in -+ lib) -+ if test "$deplibs_check_method" != pass_all; then -+ echo -+ echo "*** Warning: Trying to link with static lib archive $deplib." -+ echo "*** I have the capability to make that library automatically link in when" -+ echo "*** you link to this library. But I can only do this if you have a" -+ echo "*** shared version of the library, which you do not appear to have" -+ echo "*** because the file extensions .$libext of this argument makes me believe" -+ echo "*** that it is just a static archive that I should not used here." -+ else -+ echo -+ echo "*** Warning: Linking the shared library $output against the" -+ echo "*** static library $deplib is not portable!" -+ deplibs="$deplib $deplibs" -+ fi -+ continue -+ ;; -+ prog) -+ if test $pass != link; then -+ deplibs="$deplib $deplibs" -+ else -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ fi -+ continue -+ ;; -+ esac # linkmode -+ ;; # *.$libext -+ *.lo | *.$objext) -+ if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -+ # If there is no dlopen support or we're linking statically, -+ # we need to preload. -+ newdlprefiles="$newdlprefiles $deplib" -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ newdlfiles="$newdlfiles $deplib" -+ fi -+ continue -+ ;; -+ %DEPLIBS%) -+ alldeplibs=yes -+ continue -+ ;; -+ esac # case $deplib -+ if test $found = yes || test -f "$lib"; then : -+ else -+ $echo "$modename: cannot find the library \`$lib'" 1>&2 -+ exit 1 -+ fi -+ -+ # Check to see that this really is a libtool archive. -+ if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -+ else -+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -+ exit 1 -+ fi -+ -+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` -+ test "X$ladir" = "X$lib" && ladir="." -+ -+ dlname= -+ dlopen= -+ dlpreopen= -+ libdir= -+ library_names= -+ old_library= -+ # If the library was installed with an old release of libtool, -+ # it will not redefine variable installed. -+ installed=yes -+ -+ # Read the .la file -+ case $lib in -+ */* | *\\*) . $lib ;; -+ *) . ./$lib ;; -+ esac -+ -+ if test "$linkmode,$pass" = "lib,link" || -+ test "$linkmode,$pass" = "prog,scan" || -+ { test $linkmode = oldlib && test $linkmode = obj; }; then -+ # Add dl[pre]opened files of deplib -+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen" -+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" -+ fi - -- if test "$lib_linked" != yes; then -- $echo "$modename: configuration error: unsupported hardcode properties" -+ if test $pass = conv; then -+ # Only check for convenience libraries -+ deplibs="$lib $deplibs" -+ if test -z "$libdir"; then -+ if test -z "$old_library"; then -+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -+ exit 1 -+ fi -+ # It is a libtool convenience library, so add in its objects. -+ convenience="$convenience $ladir/$objdir/$old_library" -+ old_convenience="$old_convenience $ladir/$objdir/$old_library" -+ tmp_libs= -+ for deplib in $dependency_libs; do -+ deplibs="$deplib $deplibs" -+ if test "X$duplicate_deps" = "Xyes" ; then -+ case "$tmp_libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi -+ tmp_libs="$tmp_libs $deplib" -+ done -+ elif test $linkmode != prog && test $linkmode != lib; then -+ $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit 1 - fi -+ continue -+ fi # $pass = conv - -- # Finalize command for both is simple: just hardcode it. -- if test "$hardcode_direct" = yes; then -- finalize_command="$finalize_command $libdir/$linklib" -- elif test "$hardcode_minus_L" = yes; then -- case "$finalize_command " in -- *" -L$libdir "*) ;; -- *) finalize_command="$finalize_command -L$libdir";; -- esac -- finalize_command="$finalize_command -l$name" -- elif test "$hardcode_shlibpath_var" = yes; then -- case ":$finalize_shlibpath:" in -- *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:";; -- esac -- finalize_command="$finalize_command -l$name" -+ # Get the name of the library we link against. -+ linklib= -+ for l in $old_library $library_names; do -+ linklib="$l" -+ done -+ if test -z "$linklib"; then -+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -+ exit 1 -+ fi -+ -+ # This library was specified with -dlopen. -+ if test $pass = dlopen; then -+ if test -z "$libdir"; then -+ $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 -+ exit 1 -+ fi -+ if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -+ # If there is no dlname, no dlopen support or we're linking -+ # statically, we need to preload. -+ dlprefiles="$dlprefiles $lib" - else -- # We cannot seem to hardcode it, guess we'll fake it. -- case "$finalize_command " in -- *" -L$dir "*) ;; -- *) finalize_command="$finalize_command -L$libdir";; -- esac -- finalize_command="$finalize_command -l$name" -+ newdlfiles="$newdlfiles $lib" -+ fi -+ continue -+ fi # $pass = dlopen -+ -+ # We need an absolute path. -+ case $ladir in -+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; -+ *) -+ abs_ladir=`cd "$ladir" && pwd` -+ if test -z "$abs_ladir"; then -+ $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 -+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 -+ abs_ladir="$ladir" -+ fi -+ ;; -+ esac -+ laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` -+ -+ # Find the relevant object directory and library name. -+ if test "X$installed" = Xyes; then -+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ $echo "$modename: warning: library \`$lib' was moved." 1>&2 -+ dir="$ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ else -+ dir="$libdir" -+ absdir="$libdir" - fi - else -- # Transform directly to old archives if we don't build new libraries. -- if test -n "$pic_flag" && test -z "$old_library"; then -- $echo "$modename: cannot find static library for \`$arg'" 1>&2 -+ dir="$ladir/$objdir" -+ absdir="$abs_ladir/$objdir" -+ # Remove this search path later -+ notinst_path="$notinst_path $abs_ladir" -+ fi # $installed = yes -+ name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` -+ -+ # This library was specified with -dlpreopen. -+ if test $pass = dlpreopen; then -+ if test -z "$libdir"; then -+ $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit 1 - fi -+ # Prefer using a static library (so that no silly _DYNAMIC symbols -+ # are required to link). -+ if test -n "$old_library"; then -+ newdlprefiles="$newdlprefiles $dir/$old_library" -+ # Otherwise, use the dlname, so that lt_dlopen finds it. -+ elif test -n "$dlname"; then -+ newdlprefiles="$newdlprefiles $dir/$dlname" -+ else -+ newdlprefiles="$newdlprefiles $dir/$linklib" -+ fi -+ fi # $pass = dlpreopen - -- # Here we assume that one of hardcode_direct or hardcode_minus_L -- # is not unsupported. This is valid on all known static and -- # shared platforms. -- if test "$hardcode_direct" != unsupported; then -- test -n "$old_library" && linklib="$old_library" -- compile_command="$compile_command $dir/$linklib" -- finalize_command="$finalize_command $dir/$linklib" -+ if test -z "$libdir"; then -+ # Link the convenience library -+ if test $linkmode = lib; then -+ deplibs="$dir/$old_library $deplibs" -+ elif test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$dir/$old_library $compile_deplibs" -+ finalize_deplibs="$dir/$old_library $finalize_deplibs" - else -- case "$compile_command " in -- *" -L$dir "*) ;; -- *) compile_command="$compile_command -L$dir";; -+ deplibs="$lib $deplibs" -+ fi -+ continue -+ fi -+ -+ if test $linkmode = prog && test $pass != link; then -+ newlib_search_path="$newlib_search_path $ladir" -+ deplibs="$lib $deplibs" -+ -+ linkalldeplibs=no -+ if test "$link_all_deplibs" != no || test -z "$library_names" || -+ test "$build_libtool_libs" = no; then -+ linkalldeplibs=yes -+ fi -+ -+ tmp_libs= -+ for deplib in $dependency_libs; do -+ case $deplib in -+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac -- compile_command="$compile_command -l$name" -- case "$finalize_command " in -- *" -L$dir "*) ;; -- *) finalize_command="$finalize_command -L$dir";; -+ # Need to link against all dependency_libs? -+ if test $linkalldeplibs = yes; then -+ deplibs="$deplib $deplibs" -+ else -+ # Need to hardcode shared library paths -+ # or/and link against static libraries -+ newdependency_libs="$deplib $newdependency_libs" -+ fi -+ if test "X$duplicate_deps" = "Xyes" ; then -+ case "$tmp_libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi -+ tmp_libs="$tmp_libs $deplib" -+ done # for deplib -+ continue -+ fi # $linkmode = prog... -+ -+ link_static=no # Whether the deplib will be linked statically -+ if test -n "$library_names" && -+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then -+ # Link against this shared library -+ -+ if test "$linkmode,$pass" = "prog,link" || -+ { test $linkmode = lib && test $hardcode_into_libs = yes; }; then -+ # Hardcode the library path. -+ # Skip directories that are in the system default run-time -+ # search path. -+ case " $sys_lib_dlsearch_path " in -+ *" $absdir "*) ;; -+ *) -+ case "$compile_rpath " in -+ *" $absdir "*) ;; -+ *) compile_rpath="$compile_rpath $absdir" -+ esac -+ ;; - esac -- finalize_command="$finalize_command -l$name" -+ case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; -+ *) -+ case "$finalize_rpath " in -+ *" $libdir "*) ;; -+ *) finalize_rpath="$finalize_rpath $libdir" -+ esac -+ ;; -+ esac -+ if test $linkmode = prog; then -+ # We need to hardcode the library path -+ if test -n "$shlibpath_var"; then -+ # Make sure the rpath contains only unique directories. -+ case "$temp_rpath " in -+ *" $dir "*) ;; -+ *" $absdir "*) ;; -+ *) temp_rpath="$temp_rpath $dir" ;; -+ esac -+ fi -+ fi -+ fi # $linkmode,$pass = prog,link... -+ -+ if test "$alldeplibs" = yes && -+ { test "$deplibs_check_method" = pass_all || -+ { test "$build_libtool_libs" = yes && -+ test -n "$library_names"; }; }; then -+ # We only need to search for static libraries -+ continue - fi -- fi - -- # Add in any libraries that this one depends upon. -- compile_command="$compile_command$dependency_libs" -- finalize_command="$finalize_command$dependency_libs" -- continue -- ;; -+ if test "$installed" = no; then -+ notinst_deplibs="$notinst_deplibs $lib" -+ need_relink=yes -+ fi -+ -+ if test -n "$old_archive_from_expsyms_cmds"; then -+ # figure out the soname -+ set dummy $library_names -+ realname="$2" -+ shift; shift -+ libname=`eval \\$echo \"$libname_spec\"` -+ # use dlname if we got it. it's perfectly good, no? -+ if test -n "$dlname"; then -+ soname="$dlname" -+ elif test -n "$soname_spec"; then -+ # bleh windows -+ case $host in -+ *cygwin*) -+ major=`expr $current - $age` -+ versuffix="-$major" -+ ;; -+ esac -+ eval soname=\"$soname_spec\" -+ else -+ soname="$realname" -+ fi - -- # Some other compiler argument. -- *) -- # Unknown arguments in both finalize_command and compile_command need -- # to be aesthetically quoted because they are evaled later. -- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- case "$arg" in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -- arg="\"$arg\"" -- ;; -- esac -- ;; -- esac -+ # Make a new name for the extract_expsyms_cmds to use -+ soroot="$soname" -+ soname=`echo $soroot | ${SED} -e 's/^.*\///'` -+ newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - -- # Now actually substitute the argument into the commands. -- if test -n "$arg"; then -- compile_command="$compile_command $arg" -- finalize_command="$finalize_command $arg" -- fi -- done -+ # If the library has no export list, then create one now -+ if test -f "$output_objdir/$soname-def"; then : -+ else -+ $show "extracting exported symbol list from \`$soname'" -+ save_ifs="$IFS"; IFS='~' -+ eval cmds=\"$extract_expsyms_cmds\" -+ for cmd in $cmds; do -+ IFS="$save_ifs" -+ $show "$cmd" -+ $run eval "$cmd" || exit $? -+ done -+ IFS="$save_ifs" -+ fi - -- if test -n "$prev"; then -- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ # Create $newlib -+ if test -f "$output_objdir/$newlib"; then :; else -+ $show "generating import library for \`$soname'" -+ save_ifs="$IFS"; IFS='~' -+ eval cmds=\"$old_archive_from_expsyms_cmds\" -+ for cmd in $cmds; do -+ IFS="$save_ifs" -+ $show "$cmd" -+ $run eval "$cmd" || exit $? -+ done -+ IFS="$save_ifs" -+ fi -+ # make sure the library variables are pointing to the new library -+ dir=$output_objdir -+ linklib=$newlib -+ fi # test -n $old_archive_from_expsyms_cmds -+ -+ if test $linkmode = prog || test "$mode" != relink; then -+ add_shlibpath= -+ add_dir= -+ add= -+ lib_linked=yes -+ case $hardcode_action in -+ immediate | unsupported) -+ if test "$hardcode_direct" = no; then -+ add="$dir/$linklib" -+ elif test "$hardcode_minus_L" = no; then -+ case $host in -+ *-*-sunos*) add_shlibpath="$dir" ;; -+ esac -+ add_dir="-L$dir" -+ add="-l$name" -+ elif test "$hardcode_shlibpath_var" = no; then -+ add_shlibpath="$dir" -+ add="-l$name" -+ else -+ lib_linked=no -+ fi -+ ;; -+ relink) -+ if test "$hardcode_direct" = yes; then -+ add="$dir/$linklib" -+ elif test "$hardcode_minus_L" = yes; then -+ add_dir="-L$dir" -+ # Try looking first in the location we're being installed to. -+ if test -n "$inst_prefix_dir"; then -+ case "$libdir" in -+ [\/]*) -+ add_dir="-L$inst_prefix_dir$libdir $add_dir" -+ ;; -+ esac -+ fi -+ add="-l$name" -+ elif test "$hardcode_shlibpath_var" = yes; then -+ add_shlibpath="$dir" -+ add="-l$name" -+ else -+ lib_linked=no -+ fi -+ ;; -+ *) lib_linked=no ;; -+ esac - -- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -- eval arg=\"$export_dynamic_flag_spec\" -- compile_command="$compile_command $arg" -- finalize_command="$finalize_command $arg" -- fi -+ if test "$lib_linked" != yes; then -+ $echo "$modename: configuration error: unsupported hardcode properties" -+ exit 1 -+ fi - -- oldlibs= -- # calculate the name of the file, without its directory -- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` -- libobjs_save="$libobjs" -+ if test -n "$add_shlibpath"; then -+ case :$compile_shlibpath: in -+ *":$add_shlibpath:"*) ;; -+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; -+ esac -+ fi -+ if test $linkmode = prog; then -+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" -+ test -n "$add" && compile_deplibs="$add $compile_deplibs" -+ else -+ test -n "$add_dir" && deplibs="$add_dir $deplibs" -+ test -n "$add" && deplibs="$add $deplibs" -+ if test "$hardcode_direct" != yes && \ -+ test "$hardcode_minus_L" != yes && \ -+ test "$hardcode_shlibpath_var" = yes; then -+ case :$finalize_shlibpath: in -+ *":$libdir:"*) ;; -+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -+ esac -+ fi -+ fi -+ fi - -- case "$output" in -- "") -- $echo "$modename: you must specify an output file" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- ;; -+ if test $linkmode = prog || test "$mode" = relink; then -+ add_shlibpath= -+ add_dir= -+ add= -+ # Finalize command for both is simple: just hardcode it. -+ if test "$hardcode_direct" = yes; then -+ add="$libdir/$linklib" -+ elif test "$hardcode_minus_L" = yes; then -+ add_dir="-L$libdir" -+ add="-l$name" -+ elif test "$hardcode_shlibpath_var" = yes; then -+ case :$finalize_shlibpath: in -+ *":$libdir:"*) ;; -+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -+ esac -+ add="-l$name" -+ else -+ # We cannot seem to hardcode it, guess we'll fake it. -+ add_dir="-L$libdir" -+ # Try looking first in the location we're being installed to. -+ if test -n "$inst_prefix_dir"; then -+ case "$libdir" in -+ [\/]*) -+ add_dir="-L$inst_prefix_dir$libdir $add_dir" -+ ;; -+ esac -+ fi -+ add="-l$name" -+ fi - -- *.a | *.lib) -- if test -n "$link_against_libtool_libs"; then -- $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 -- exit 1 -+ if test $linkmode = prog; then -+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" -+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs" -+ else -+ test -n "$add_dir" && deplibs="$add_dir $deplibs" -+ test -n "$add" && deplibs="$add $deplibs" -+ fi -+ fi -+ elif test $linkmode = prog; then -+ if test "$alldeplibs" = yes && -+ { test "$deplibs_check_method" = pass_all || -+ { test "$build_libtool_libs" = yes && -+ test -n "$library_names"; }; }; then -+ # We only need to search for static libraries -+ continue -+ fi -+ -+ # Try to link the static library -+ # Here we assume that one of hardcode_direct or hardcode_minus_L -+ # is not unsupported. This is valid on all known static and -+ # shared platforms. -+ if test "$hardcode_direct" != unsupported; then -+ test -n "$old_library" && linklib="$old_library" -+ compile_deplibs="$dir/$linklib $compile_deplibs" -+ finalize_deplibs="$dir/$linklib $finalize_deplibs" -+ else -+ compile_deplibs="-l$name -L$dir $compile_deplibs" -+ finalize_deplibs="-l$name -L$dir $finalize_deplibs" -+ fi -+ elif test "$build_libtool_libs" = yes; then -+ # Not a shared library -+ if test "$deplibs_check_method" != pass_all; then -+ # We're trying link a shared library against a static one -+ # but the system doesn't support it. -+ -+ # Just print a warning and add the library to dependency_libs so -+ # that the program can be linked against the static library. -+ echo -+ echo "*** Warning: This system can not link to static lib archive $lib." -+ echo "*** I have the capability to make that library automatically link in when" -+ echo "*** you link to this library. But I can only do this if you have a" -+ echo "*** shared version of the library, which you do not appear to have." -+ if test "$module" = yes; then -+ echo "*** But as you try to build a module library, libtool will still create " -+ echo "*** a static module, that should work as long as the dlopening application" -+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime." -+ if test -z "$global_symbol_pipe"; then -+ echo -+ echo "*** However, this would only work if libtool was able to extract symbol" -+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could" -+ echo "*** not find such a program. So, this module is probably useless." -+ echo "*** \`nm' from GNU binutils and a full rebuild may help." -+ fi -+ if test "$build_old_libs" = no; then -+ build_libtool_libs=module -+ build_old_libs=yes -+ else -+ build_libtool_libs=no -+ fi -+ fi -+ else -+ convenience="$convenience $dir/$old_library" -+ old_convenience="$old_convenience $dir/$old_library" -+ deplibs="$dir/$old_library $deplibs" -+ link_static=yes -+ fi -+ fi # link shared/static library? -+ -+ if test $linkmode = lib; then -+ if test -n "$dependency_libs" && -+ { test $hardcode_into_libs != yes || test $build_old_libs = yes || -+ test $link_static = yes; }; then -+ # Extract -R from dependency_libs -+ temp_deplibs= -+ for libdir in $dependency_libs; do -+ case $libdir in -+ -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` -+ case " $xrpath " in -+ *" $temp_xrpath "*) ;; -+ *) xrpath="$xrpath $temp_xrpath";; -+ esac;; -+ *) temp_deplibs="$temp_deplibs $libdir";; -+ esac -+ done -+ dependency_libs="$temp_deplibs" -+ fi -+ -+ newlib_search_path="$newlib_search_path $absdir" -+ # Link against this library -+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" -+ # ... and its dependency_libs -+ tmp_libs= -+ for deplib in $dependency_libs; do -+ newdependency_libs="$deplib $newdependency_libs" -+ if test "X$duplicate_deps" = "Xyes" ; then -+ case "$tmp_libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi -+ tmp_libs="$tmp_libs $deplib" -+ done -+ -+ if test $link_all_deplibs != no; then -+ # Add the search paths of all dependency libraries -+ for deplib in $dependency_libs; do -+ case $deplib in -+ -L*) path="$deplib" ;; -+ *.la) -+ dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` -+ test "X$dir" = "X$deplib" && dir="." -+ # We need an absolute path. -+ case $dir in -+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; -+ *) -+ absdir=`cd "$dir" && pwd` -+ if test -z "$absdir"; then -+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 -+ absdir="$dir" -+ fi -+ ;; -+ esac -+ if grep "^installed=no" $deplib > /dev/null; then -+ path="-L$absdir/$objdir" -+ else -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ if test -z "$libdir"; then -+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -+ exit 1 -+ fi -+ if test "$absdir" != "$libdir"; then -+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -+ fi -+ path="-L$absdir" -+ fi -+ ;; -+ *) continue ;; -+ esac -+ case " $deplibs " in -+ *" $path "*) ;; -+ *) deplibs="$deplibs $path" ;; -+ esac -+ done -+ fi # link_all_deplibs != no -+ fi # linkmode = lib -+ done # for deplib in $libs -+ if test $pass = dlpreopen; then -+ # Link the dlpreopened libraries before other libraries -+ for deplib in $save_deplibs; do -+ deplibs="$deplib $deplibs" -+ done - fi -+ if test $pass != dlopen; then -+ test $pass != scan && dependency_libs="$newdependency_libs" -+ if test $pass != conv; then -+ # Make sure lib_search_path contains only unique directories. -+ lib_search_path= -+ for dir in $newlib_search_path; do -+ case "$lib_search_path " in -+ *" $dir "*) ;; -+ *) lib_search_path="$lib_search_path $dir" ;; -+ esac -+ done -+ newlib_search_path= -+ fi - -- if test -n "$deplibs"; then -- $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 -+ if test "$linkmode,$pass" != "prog,link"; then -+ vars="deplibs" -+ else -+ vars="compile_deplibs finalize_deplibs" -+ fi -+ for var in $vars dependency_libs; do -+ # Add libraries to $var in reverse order -+ eval tmp_libs=\"\$$var\" -+ new_libs= -+ for deplib in $tmp_libs; do -+ case $deplib in -+ -L*) new_libs="$deplib $new_libs" ;; -+ *) -+ case " $specialdeplibs " in -+ *" $deplib "*) new_libs="$deplib $new_libs" ;; -+ *) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) new_libs="$deplib $new_libs" ;; -+ esac -+ ;; -+ esac -+ ;; -+ esac -+ done -+ tmp_libs= -+ for deplib in $new_libs; do -+ case $deplib in -+ -L*) -+ case " $tmp_libs " in -+ *" $deplib "*) ;; -+ *) tmp_libs="$tmp_libs $deplib" ;; -+ esac -+ ;; -+ *) tmp_libs="$tmp_libs $deplib" ;; -+ esac -+ done -+ eval $var=\"$tmp_libs\" -+ done # for var - fi -+ if test "$pass" = "conv" && -+ { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then -+ libs="$deplibs" # reset libs -+ deplibs= -+ fi -+ done # for pass -+ if test $linkmode = prog; then -+ dlfiles="$newdlfiles" -+ dlprefiles="$newdlprefiles" -+ fi - -+ case $linkmode in -+ oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi -@@ -1566,11 +2179,12 @@ - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" -+ objs="$objs$old_deplibs" - ;; - -- *.la) -+ lib) - # Make sure we only generate libraries of the form `libNAME.la'. -- case "$outputname" in -+ case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval libname=\"$libname_spec\" -@@ -1591,26 +2205,20 @@ - ;; - esac - -- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$output_objdir" = "X$output"; then -- output_objdir="$objdir" -- else -- output_objdir="$output_objdir/$objdir" -- fi -- - if test -n "$objs"; then -- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 -- exit 1 -- fi -- -- # How the heck are we supposed to write a wrapper for a shared library? -- if test -n "$link_against_libtool_libs"; then -- $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 -- exit 1 -+ if test "$deplibs_check_method" != pass_all; then -+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 -+ exit 1 -+ else -+ echo -+ echo "*** Warning: Linking the shared library $output against the non-libtool" -+ echo "*** objects $objs is not portable!" -+ libobjs="$libobjs $objs" -+ fi - fi - -- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then -- $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 -+ if test "$dlself" != no; then -+ $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath -@@ -1628,7 +2236,6 @@ - build_libtool_libs=convenience - build_old_libs=yes - fi -- dependency_libs="$deplibs" - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 -@@ -1640,7 +2247,7 @@ - else - - # Parse the version information argument. -- IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' -+ save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - -@@ -1655,8 +2262,8 @@ - age="$4" - - # Check that each of the things are valid numbers. -- case "$current" in -- 0 | [1-9] | [1-9][0-9]*) ;; -+ case $current in -+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -@@ -1664,8 +2271,8 @@ - ;; - esac - -- case "$revision" in -- 0 | [1-9] | [1-9][0-9]*) ;; -+ case $revision in -+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -@@ -1673,8 +2280,8 @@ - ;; - esac - -- case "$age" in -- 0 | [1-9] | [1-9][0-9]*) ;; -+ case $age in -+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -@@ -1692,21 +2299,49 @@ - major= - versuffix= - verstring= -- case "$version_type" in -+ case $version_type in - none) ;; - -- irix) -+ darwin) -+ # Like Linux, but with the current version available in -+ # verstring for coding it into the library header -+ major=.`expr $current - $age` -+ versuffix="$major.$age.$revision" -+ # Darwin ld doesn't like 0 for these options... -+ minor_current=`expr $current + 1` -+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" -+ ;; -+ -+ freebsd-aout) -+ major=".$current" -+ versuffix=".$current.$revision"; -+ ;; -+ -+ freebsd-elf) -+ major=".$current" -+ versuffix=".$current"; -+ ;; -+ -+ irix | nonstopux) - major=`expr $current - $age + 1` -- versuffix="$major.$revision" -- verstring="sgi$major.$revision" -+ -+ case $version_type in -+ nonstopux) verstring_prefix=nonstopux ;; -+ *) verstring_prefix=sgi ;; -+ esac -+ verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test $loop != 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` -- verstring="sgi$major.$iface:$verstring" -+ verstring="$verstring_prefix$major.$iface:$verstring" - done -+ -+ # Before this point, $major must not contain `.'. -+ major=.$major -+ versuffix="$major.$revision" - ;; - - linux) -@@ -1715,7 +2350,7 @@ - ;; - - osf) -- major=`expr $current - $age` -+ major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - -@@ -1736,21 +2371,11 @@ - versuffix=".$current.$revision" - ;; - -- freebsd-aout) -- major=".$current" -- versuffix=".$current.$revision"; -- ;; -- -- freebsd-elf) -- major=".$current" -- versuffix=".$current"; -- ;; -- - windows) -- # Like Linux, but with '-' rather than '.', since we only -- # want one extension on Windows 95. -+ # Use '-' rather than '.', since we only want one -+ # extension on DOS 8.3 filesystems. - major=`expr $current - $age` -- versuffix="-$major-$age-$revision" -+ versuffix="-$major" - ;; - - *) -@@ -1764,6 +2389,16 @@ - if test -z "$vinfo" && test -n "$release"; then - major= - verstring="0.0" -+ case $version_type in -+ darwin) -+ # we can't check for "0.0" in archive_cmds due to quoting -+ # problems, so we reset it completely -+ verstring="" -+ ;; -+ *) -+ verstring="0.0" -+ ;; -+ esac - if test "$need_version" = no; then - versuffix= - else -@@ -1777,7 +2412,7 @@ - versuffix= - verstring="" - fi -- -+ - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then -@@ -1785,34 +2420,16 @@ - build_libtool_libs=no - build_old_libs=yes - fi -- else -- # Don't allow undefined symbols. -- allow_undefined_flag="$no_undefined_flag" -- fi -- -- dependency_libs="$deplibs" -- case "$host" in -- *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) -- # these systems don't actually have a c library (as such)! -- ;; -- *) -- # Add libc to deplibs on all other systems. -- deplibs="$deplibs -lc" -- ;; -- esac -+ else -+ # Don't allow undefined symbols. -+ allow_undefined_flag="$no_undefined_flag" -+ fi - fi - -- # Create the output directory, or remove our outputs if we need to. -- if test -d $output_objdir; then -+ if test "$mode" != relink; then -+ # Remove our outputs. - $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" - $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* -- else -- $show "$mkdir $output_objdir" -- $run $mkdir $output_objdir -- status=$? -- if test $status -ne 0 && test ! -d $output_objdir; then -- exit $status -- fi - fi - - # Now set the variables for building old libraries. -@@ -1823,7 +2440,73 @@ - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - -+ # Eliminate all temporary directories. -+ for path in $notinst_path; do -+ lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'` -+ deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'` -+ dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` -+ done -+ -+ if test -n "$xrpath"; then -+ # If the user specified any rpath flags, then add them. -+ temp_xrpath= -+ for libdir in $xrpath; do -+ temp_xrpath="$temp_xrpath -R$libdir" -+ case "$finalize_rpath " in -+ *" $libdir "*) ;; -+ *) finalize_rpath="$finalize_rpath $libdir" ;; -+ esac -+ done -+ if test $hardcode_into_libs != yes || test $build_old_libs = yes; then -+ dependency_libs="$temp_xrpath $dependency_libs" -+ fi -+ fi -+ -+ # Make sure dlfiles contains only unique files that won't be dlpreopened -+ old_dlfiles="$dlfiles" -+ dlfiles= -+ for lib in $old_dlfiles; do -+ case " $dlprefiles $dlfiles " in -+ *" $lib "*) ;; -+ *) dlfiles="$dlfiles $lib" ;; -+ esac -+ done -+ -+ # Make sure dlprefiles contains only unique files -+ old_dlprefiles="$dlprefiles" -+ dlprefiles= -+ for lib in $old_dlprefiles; do -+ case "$dlprefiles " in -+ *" $lib "*) ;; -+ *) dlprefiles="$dlprefiles $lib" ;; -+ esac -+ done -+ - if test "$build_libtool_libs" = yes; then -+ if test -n "$rpath"; then -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) -+ # these systems don't actually have a c library (as such)! -+ ;; -+ *-*-rhapsody* | *-*-darwin1.[012]) -+ # Rhapsody C library is in the System framework -+ deplibs="$deplibs -framework System" -+ ;; -+ *-*-netbsd*) -+ # Don't link with libc until the a.out ld.so is fixed. -+ ;; -+ *-*-openbsd* | *-*-freebsd*) -+ # Do not include libc due to us having libc/libc_r. -+ ;; -+ *) -+ # Add libc to deplibs on all other systems if necessary. -+ if test $build_libtool_need_lc = "yes"; then -+ deplibs="$deplibs -lc" -+ fi -+ ;; -+ esac -+ fi -+ - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname -@@ -1838,7 +2521,7 @@ - major="" - newdeplibs= - droppeddeps=no -- case "$deplibs_check_method" in -+ case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check -@@ -1863,7 +2546,7 @@ - for i in $deplibs; do - name="`expr $i : '-l\(.*\)'`" - # If $name is empty we are operating on a -L argument. -- if test "$name" != "" ; then -+ if test -n "$name" && test "$name" != "0"; then - libname=`eval \\$echo \"$libname_spec\"` - deplib_matches=`eval \\$echo \"$library_names_spec\"` - set dummy $deplib_matches -@@ -1873,22 +2556,24 @@ - else - droppeddeps=yes - echo -- echo "*** Warning: This library needs some functionality provided by $i." -+ echo "*** Warning: dynamic linker does not accept needed library $i." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" -- echo "*** shared version of the library, which you do not appear to have." -+ echo "*** shared version of the library, which I believe you do not have" -+ echo "*** because a test_compile did reveal that the linker did not use it for" -+ echo "*** its dynamic dependency list that programs get resolved with at runtime." - fi - else - newdeplibs="$newdeplibs $i" - fi - done - else -- # Error occured in the first compile. Let's try to salvage the situation: -- # Compile a seperate program for each library. -+ # Error occured in the first compile. Let's try to salvage -+ # the situation: Compile a separate program for each library. - for i in $deplibs; do - name="`expr $i : '-l\(.*\)'`" - # If $name is empty we are operating on a -L argument. -- if test "$name" != "" ; then -+ if test -n "$name" && test "$name" != "0"; then - $rm conftest - $CC -o conftest conftest.c $i - # Did it work? -@@ -1903,10 +2588,12 @@ - else - droppeddeps=yes - echo -- echo "*** Warning: This library needs some functionality provided by $i." -+ echo "*** Warning: dynamic linker does not accept needed library $i." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" -- echo "*** shared version of the library, which you do not appear to have." -+ echo "*** shared version of the library, which you do not appear to have" -+ echo "*** because a test_compile did reveal that the linker did not use this one" -+ echo "*** as a dynamic dependency that programs can get resolved with at runtime." - fi - else - droppeddeps=yes -@@ -1924,19 +2611,19 @@ - ;; - file_magic*) - set dummy $deplibs_check_method -- file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`" -+ file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" - # If $name is empty we are operating on a -L argument. -- if test "$name" != "" ; then -+ if test -n "$name" && test "$name" != "0"; then - libname=`eval \\$echo \"$libname_spec\"` -- for i in $lib_search_path; do -+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then -- continue -+ continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. -@@ -1945,14 +2632,14 @@ - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do -- potliblink=`ls -ld $potlib | sed 's/.* -> //'` -- case "$potliblink" in -+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` -+ case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ -- | sed 10q \ -+ | ${SED} 10q \ - | egrep "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" -@@ -1963,10 +2650,59 @@ - if test -n "$a_deplib" ; then - droppeddeps=yes - echo -- echo "*** Warning: This library needs some functionality provided by $a_deplib." -+ echo "*** Warning: linker path does not have real file for library $a_deplib." -+ echo "*** I have the capability to make that library automatically link in when" -+ echo "*** you link to this library. But I can only do this if you have a" -+ echo "*** shared version of the library, which you do not appear to have" -+ echo "*** because I did check the linker path looking for a file starting" -+ if test -z "$potlib" ; then -+ echo "*** with $libname but no candidates were found. (...for file magic test)" -+ else -+ echo "*** with $libname and none of the candidates passed a file format test" -+ echo "*** using a file magic. Last file checked: $potlib" -+ fi -+ fi -+ else -+ # Add a -L argument. -+ newdeplibs="$newdeplibs $a_deplib" -+ fi -+ done # Gone through all deplibs. -+ ;; -+ match_pattern*) -+ set dummy $deplibs_check_method -+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` -+ for a_deplib in $deplibs; do -+ name="`expr $a_deplib : '-l\(.*\)'`" -+ # If $name is empty we are operating on a -L argument. -+ if test -n "$name" && test "$name" != "0"; then -+ libname=`eval \\$echo \"$libname_spec\"` -+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do -+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null` -+ for potent_lib in $potential_libs; do -+ potlib="$potent_lib" # see symlink-check below in file_magic test -+ if eval echo \"$potent_lib\" 2>/dev/null \ -+ | ${SED} 10q \ -+ | egrep "$match_pattern_regex" > /dev/null; then -+ newdeplibs="$newdeplibs $a_deplib" -+ a_deplib="" -+ break 2 -+ fi -+ done -+ done -+ if test -n "$a_deplib" ; then -+ droppeddeps=yes -+ echo -+ echo "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" -- echo "*** shared version of the library, which you do not appear to have." -+ echo "*** shared version of the library, which you do not appear to have" -+ echo "*** because I did check the linker path looking for a file starting" -+ if test -z "$potlib" ; then -+ echo "*** with $libname but no candidates were found. (...for regex pattern test)" -+ else -+ echo "*** with $libname and none of the candidates passed a file format test" -+ echo "*** using a regex pattern. Last file checked: $potlib" -+ fi - fi - else - # Add a -L argument. -@@ -1996,6 +2732,13 @@ - libname=$libname_save - name=$name_save - -+ case $host in -+ *-*-rhapsody* | *-*-darwin1.[012]) -+ # On Rhapsody replace the C library is the System framework -+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` -+ ;; -+ esac -+ - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo -@@ -2021,6 +2764,21 @@ - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." -+ -+ if test $allow_undefined = no; then -+ echo -+ echo "*** Since this library must not contain undefined symbols," -+ echo "*** because either the platform does not support them or" -+ echo "*** it was explicitly requested with -no-undefined," -+ echo "*** libtool will only create a static version of it." -+ if test "$build_old_libs" = no; then -+ oldlibs="$output_objdir/$libname.$libext" -+ build_libtool_libs=module -+ build_old_libs=yes -+ else -+ build_libtool_libs=no -+ fi -+ fi - fi - fi - # Done checking deplibs! -@@ -2031,9 +2789,64 @@ - library_names= - old_library= - dlname= -- -+ - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then -+ if test $hardcode_into_libs = yes; then -+ # Hardcode the library paths -+ hardcode_libdirs= -+ dep_rpath= -+ rpath="$finalize_rpath" -+ test "$mode" != relink && rpath="$compile_rpath$rpath" -+ for libdir in $rpath; do -+ if test -n "$hardcode_libdir_flag_spec"; then -+ if test -n "$hardcode_libdir_separator"; then -+ if test -z "$hardcode_libdirs"; then -+ hardcode_libdirs="$libdir" -+ else -+ # Just accumulate the unique libdirs. -+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in -+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) -+ ;; -+ *) -+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ ;; -+ esac -+ fi -+ else -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ dep_rpath="$dep_rpath $flag" -+ fi -+ elif test -n "$runpath_var"; then -+ case "$perm_rpath " in -+ *" $libdir "*) ;; -+ *) perm_rpath="$perm_rpath $libdir" ;; -+ esac -+ fi -+ done -+ # Substitute the hardcoded libdirs into the rpath. -+ if test -n "$hardcode_libdir_separator" && -+ test -n "$hardcode_libdirs"; then -+ libdir="$hardcode_libdirs" -+ eval dep_rpath=\"$hardcode_libdir_flag_spec\" -+ fi -+ if test -n "$runpath_var" && test -n "$perm_rpath"; then -+ # We should set the runpath_var. -+ rpath= -+ for dir in $perm_rpath; do -+ rpath="$rpath$dir:" -+ done -+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" -+ fi -+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" -+ fi -+ -+ shlibpath="$finalize_shlibpath" -+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" -+ if test -n "$shlibpath"; then -+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" -+ fi -+ - # Get the real and link names of the library. - eval library_names=\"$library_names_spec\" - set dummy $library_names -@@ -2045,6 +2858,7 @@ - else - soname="$realname" - fi -+ test -z "$dlname" && dlname=$soname - - lib="$output_objdir/$realname" - for link -@@ -2079,7 +2893,7 @@ - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - eval cmds=\"$export_symbols_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" -@@ -2116,7 +2930,7 @@ - - for xlib in $convenience; do - # Extract the objects. -- case "$xlib" in -+ case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac -@@ -2141,16 +2955,32 @@ - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" -- linkopts="$linkopts $flag" -+ linker_flags="$linker_flags $flag" -+ fi -+ -+ # Make a backup of the uninstalled library when relinking -+ if test "$mode" = relink; then -+ $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval cmds=\"$archive_expsym_cmds\" - else -+ save_deplibs="$deplibs" -+ for conv in $convenience; do -+ tmp_deplibs= -+ for test_deplib in $deplibs; do -+ if test "$test_deplib" != "$conv"; then -+ tmp_deplibs="$tmp_deplibs $test_deplib" -+ fi -+ done -+ deplibs="$tmp_deplibs" -+ done - eval cmds=\"$archive_cmds\" -+ deplibs="$save_deplibs" - fi -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" -@@ -2158,6 +2988,12 @@ - done - IFS="$save_ifs" - -+ # Restore the uninstalled library and exit -+ if test "$mode" = relink; then -+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? -+ exit 0 -+ fi -+ - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then -@@ -2174,12 +3010,7 @@ - fi - ;; - -- *.lo | *.o | *.obj) -- if test -n "$link_against_libtool_libs"; then -- $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 -- exit 1 -- fi -- -+ obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi -@@ -2204,9 +3035,9 @@ - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - -- case "$output" in -+ case $output in - *.lo) -- if test -n "$objs"; then -+ if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit 1 - fi -@@ -2230,7 +3061,7 @@ - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec -- wl= -+ wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then -@@ -2249,7 +3080,7 @@ - - for xlib in $convenience; do - # Extract the objects. -- case "$xlib" in -+ case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac -@@ -2273,11 +3104,11 @@ - fi - - # Create the old-style object. -- reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" -+ reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - eval cmds=\"$reload_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" -@@ -2308,12 +3139,12 @@ - exit 0 - fi - -- if test -n "$pic_flag"; then -+ if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - eval cmds=\"$reload_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" -@@ -2344,8 +3175,10 @@ - exit 0 - ;; - -- # Anything else should be a program. -- *) -+ prog) -+ case $host in -+ *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; -+ esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi -@@ -2355,20 +3188,34 @@ - fi - - if test "$preload" = yes; then -- if test "$dlopen" = unknown && test "$dlopen_self" = unknown && -+ if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." -- fi -+ fi - fi -- -+ -+ case $host in -+ *-*-rhapsody* | *-*-darwin1.[012]) -+ # On Rhapsody replace the C library is the System framework -+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` -+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` -+ case $host in -+ *darwin*) -+ # Don't allow lazy linking, it breaks C++ global constructors -+ compile_command="$compile_command ${wl}-bind_at_load" -+ finalize_command="$finalize_command ${wl}-bind_at_load" -+ ;; -+ esac -+ ;; -+ esac -+ -+ compile_command="$compile_command $compile_deplibs" -+ finalize_command="$finalize_command $finalize_deplibs" -+ - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. -- case "$compile_rpath " in -- *" $libdir "*) ;; -- *) compile_rpath="$compile_rpath $libdir" ;; -- esac - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; -@@ -2386,7 +3233,7 @@ - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. -- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in -+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -@@ -2404,6 +3251,14 @@ - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi -+ case $host in -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ case :$dllsearchpath: in -+ *":$libdir:"*) ;; -+ *) dllsearchpath="$dllsearchpath:$libdir";; -+ esac -+ ;; -+ esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && -@@ -2422,7 +3277,7 @@ - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. -- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in -+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -@@ -2449,23 +3304,6 @@ - fi - finalize_rpath="$rpath" - -- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$output_objdir" = "X$output"; then -- output_objdir="$objdir" -- else -- output_objdir="$output_objdir/$objdir" -- fi -- -- # Create the binary in the object directory, then wrap it. -- if test ! -d $output_objdir; then -- $show "$mkdir $output_objdir" -- $run $mkdir $output_objdir -- status=$? -- if test $status -ne 0 && test ! -d $output_objdir; then -- exit $status -- fi -- fi -- - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` -@@ -2482,7 +3320,7 @@ - fi - - if test -n "$dlsyms"; then -- case "$dlsyms" in -+ case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. -@@ -2514,7 +3352,7 @@ - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. -- progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` -+ progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" -@@ -2524,7 +3362,7 @@ - $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi -- -+ - if test -n "$export_symbols_regex"; then - $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' -@@ -2534,9 +3372,9 @@ - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$output.exp" - $run $rm $export_symbols -- $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -+ $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - else -- $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' -+ $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' - $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - fi -@@ -2544,7 +3382,7 @@ - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" -- name=`echo "$arg" | sed -e 's%^.*/%%'` -+ name=`echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval 'echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done -@@ -2559,7 +3397,13 @@ - fi - - # Try sorting and uniquifying the output. -- if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then -+ if grep -v "^: " < "$nlist" | -+ if sort -k 3 /dev/null 2>&1; then -+ sort -k 3 -+ else -+ sort +2 -+ fi | -+ uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S -@@ -2576,27 +3420,25 @@ - #undef lt_preloaded_symbols - - #if defined (__STDC__) && __STDC__ --# define lt_ptr_t void * -+# define lt_ptr void * - #else --# define lt_ptr_t char * -+# define lt_ptr char * - # define const - #endif - - /* The mapping between symbol names and symbols. */ - const struct { - const char *name; -- lt_ptr_t address; -+ lt_ptr address; - } - lt_preloaded_symbols[] = - {\ - " - -- sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ -- -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ -- < "$nlist" >> "$output_objdir/$dlsyms" -+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ -- {0, (lt_ptr_t) 0} -+ {0, (lt_ptr) 0} - }; - - /* This works around a problem in FreeBSD linker */ -@@ -2658,7 +3500,7 @@ - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - -- if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then -+ if test $need_relink = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" -@@ -2667,7 +3509,7 @@ - $show "$link_command" - $run eval "$link_command" - status=$? -- -+ - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" -@@ -2681,7 +3523,7 @@ - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do -- case "$dir" in -+ case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" -@@ -2723,11 +3565,24 @@ - fi - fi - -+ if test "$no_install" = yes; then -+ # We don't need to create a wrapper script. -+ link_command="$compile_var$compile_command$compile_rpath" -+ # Replace the output file specification. -+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` -+ # Delete the old output file. -+ $run $rm $output -+ # Link the executable and exit -+ $show "$link_command" -+ $run eval "$link_command" || exit $? -+ exit 0 -+ fi -+ - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" -- -+ - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else -@@ -2747,7 +3602,7 @@ - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` -- -+ - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - -@@ -2759,12 +3614,24 @@ - - # Quote the relink command for shipping. - if test -n "$relink_command"; then -+ # Preserve any variables that may affect compiler behavior -+ for var in $variables_saved_for_relink; do -+ if eval test -z \"\${$var+set}\"; then -+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" -+ elif eval var_value=\$$var; test -z "$var_value"; then -+ relink_command="$var=; export $var; $relink_command" -+ else -+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` -+ relink_command="$var=\"$var_value\"; export $var; $relink_command" -+ fi -+ done -+ relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $0 --fallback-echo"; then -- case "$0" in -+ case $0 in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; - *) qecho="$SHELL `pwd`/$0 --fallback-echo";; - esac -@@ -2778,7 +3645,12 @@ - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in -- *.exe) output=`echo $output|sed 's,.exe$,,'` ;; -+ *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;; -+ esac -+ # test for cygwin because mv fails w/o .exe extensions -+ case $host in -+ *cygwin*) exeext=.exe ;; -+ *) exeext= ;; - esac - $rm $output - trap "$rm $output; exit 1" 1 2 15 -@@ -2797,7 +3669,7 @@ - - # Sed substitution that helps us do robust quoting. It backslashifies - # metacharacters that are still active within double-quoted strings. --Xsed='sed -e 1s/^X//' -+Xsed="${SED}"' -e 1s/^X//' - sed_quote_subst='$sed_quote_subst' - - # The HP-UX ksh and POSIX shell print the target directory to stdout -@@ -2809,7 +3681,7 @@ - # This environment variable determines our operation mode. - if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: -- link_against_libtool_libs='$link_against_libtool_libs' -+ notinst_deplibs='$notinst_deplibs' - else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then -@@ -2835,20 +3707,20 @@ - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. -- file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` -+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in -- [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; -+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` -- file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` -+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. -@@ -2858,11 +3730,11 @@ - - if test "$fast_install" = yes; then - echo >> $output "\ -- program=lt-'$outputname' -+ program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" -- -+ - if test ! -f \"\$progdir/\$program\" || \\ -- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ -+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" -@@ -2877,8 +3749,9 @@ - - # relink executable if necessary - if test -n \"\$relink_command\"; then -- if (cd \"\$thisdir\" && eval \$relink_command); then : -+ if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else -+ $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit 1 - fi -@@ -2907,7 +3780,7 @@ - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var -- # The second colon is a workaround for a bug in BeOS R4 sed -+ # The second colon is a workaround for a bug in BeOS R4 ${SED} - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -@@ -2927,13 +3800,21 @@ - # Run the actual program with our arguments. - " - case $host in -- *-*-cygwin* | *-*-mingw | *-*-os2*) -- # win32 systems need to use the prog path for dll -- # lookup to work -+ # win32 systems need to use the prog path for dll -+ # lookup to work -+ *-*-cygwin* | *-*-pw32*) -+ $echo >> $output "\ -+ exec \$progdir/\$program \${1+\"\$@\"} -+" -+ ;; -+ -+ # Backslashes separate directories on plain windows -+ *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} - " - ;; -+ - *) - $echo >> $output "\ - # Export the path to the program. -@@ -2975,7 +3856,7 @@ - oldobjs="$libobjs_save" - build_libtool_libs=no - else -- oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` -+ oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` - fi - addlibs="$old_convenience" - fi -@@ -2991,11 +3872,11 @@ - exit $status - fi - generated="$generated $gentop" -- -+ - # Add in members from convenience archives. - for xlib in $addlibs; do - # Extract the objects. -- case "$xlib" in -+ case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac -@@ -3041,7 +3922,7 @@ - - eval cmds=\"$old_archive_cmds\" - fi -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" -@@ -3056,19 +3937,26 @@ - fi - - # Now create the libtool archive. -- case "$output" in -+ case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - -- if test -n "$xrpath"; then -- temp_xrpath= -- for libdir in $xrpath; do -- temp_xrpath="$temp_xrpath -R$libdir" -- done -- dependency_libs="$temp_xrpath $dependency_libs" -- fi -+ # Preserve any variables that may affect compiler behavior -+ for var in $variables_saved_for_relink; do -+ if eval test -z \"\${$var+set}\"; then -+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" -+ elif eval var_value=\$$var; test -z "$var_value"; then -+ relink_command="$var=; export $var; $relink_command" -+ else -+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` -+ relink_command="$var=\"$var_value\"; export $var; $relink_command" -+ fi -+ done -+ # Quote the link command for shipping. -+ relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" -+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - - # Only create the output if not a dry run. - if test -z "$run"; then -@@ -3078,8 +3966,52 @@ - break - fi - output="$output_objdir/$outputname"i -+ # Replace all uninstalled libtool libraries with the installed ones -+ newdependency_libs= -+ for deplib in $dependency_libs; do -+ case $deplib in -+ *.la) -+ name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ if test -z "$libdir"; then -+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -+ exit 1 -+ fi -+ newdependency_libs="$newdependency_libs $libdir/$name" -+ ;; -+ *) newdependency_libs="$newdependency_libs $deplib" ;; -+ esac -+ done -+ dependency_libs="$newdependency_libs" -+ newdlfiles= -+ for lib in $dlfiles; do -+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ if test -z "$libdir"; then -+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -+ exit 1 -+ fi -+ newdlfiles="$newdlfiles $libdir/$name" -+ done -+ dlfiles="$newdlfiles" -+ newdlprefiles= -+ for lib in $dlprefiles; do -+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ if test -z "$libdir"; then -+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -+ exit 1 -+ fi -+ newdlprefiles="$newdlprefiles $libdir/$name" -+ done -+ dlprefiles="$newdlprefiles" - fi - $rm $output -+ # place dlname in correct position for cygwin -+ tdlname=$dlname -+ case $host,$output,$installed,$module,$dlname in -+ *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; -+ esac - $echo > $output "\ - # $outputname - a libtool library file - # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -@@ -3088,7 +4020,7 @@ - # It is necessary for linking the library. - - # The name that we can dlopen(3). --dlname='$dlname' -+dlname='$tdlname' - - # Names of this library. - library_names='$library_names' -@@ -3107,16 +4039,23 @@ - # Is this an already installed library? - installed=$installed - -+# Files to dlopen/dlpreopen -+dlopen='$dlfiles' -+dlpreopen='$dlprefiles' -+ - # Directory that this library needs to be installed in: --libdir='$install_libdir'\ --" -+libdir='$install_libdir'" -+ if test "$installed" = no && test $need_relink = yes; then -+ $echo >> $output "\ -+relink_command=\"$relink_command\"" -+ fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" -- $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? -+ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit 0 -@@ -3128,10 +4067,12 @@ - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). -- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then -+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || -+ # Allow the use of GNU shtool's install command. -+ $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` -- case "$arg" in -+ case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; -@@ -3147,7 +4088,7 @@ - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- case "$arg" in -+ case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; -@@ -3170,7 +4111,7 @@ - continue - fi - -- case "$arg" in -+ case $arg in - -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; -@@ -3195,7 +4136,7 @@ - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- case "$arg" in -+ case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; -@@ -3246,11 +4187,11 @@ - exit 1 - fi - fi -- case "$destdir" in -+ case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do -- case "$file" in -+ case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 -@@ -3272,15 +4213,15 @@ - for file in $files; do - - # Do each installation. -- case "$file" in -- *.a | *.lib) -+ case $file in -+ *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. -- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -+ if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 -@@ -3289,8 +4230,9 @@ - - library_names= - old_library= -+ relink_command= - # If there is no directory component, then add one. -- case "$file" in -+ case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac -@@ -3309,10 +4251,38 @@ - esac - fi - -- dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" -+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - -+ if test -n "$relink_command"; then -+ # Determine the prefix the user has applied to our future dir. -+ inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"` -+ -+ # Don't allow the user to place us outside of our expected -+ # location b/c this prevents finding dependent libraries that -+ # are installed to the same prefix. -+ if test "$inst_prefix_dir" = "$destdir"; then -+ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ exit 1 -+ fi -+ -+ if test -n "$inst_prefix_dir"; then -+ # Stick the inst_prefix_dir data into the link command. -+ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` -+ else -+ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"` -+ fi -+ -+ $echo "$modename: warning: relinking \`$file'" 1>&2 -+ $show "$relink_command" -+ if $run eval "$relink_command"; then : -+ else -+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 -+ exit 1 -+ fi -+ fi -+ - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then -@@ -3320,9 +4290,16 @@ - shift - shift - -+ srcname="$realname" -+ test -n "$relink_command" && srcname="$realname"T -+ - # Install the shared library and build the symlinks. -- $show "$install_prog $dir/$realname $destdir/$realname" -- $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? -+ $show "$install_prog $dir/$srcname $destdir/$realname" -+ $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? -+ if test -n "$stripme" && test -n "$striplib"; then -+ $show "$striplib $destdir/$realname" -+ $run eval "$striplib $destdir/$realname" || exit $? -+ fi - - if test $# -gt 0; then - # Delete the old symlinks, and create new ones. -@@ -3338,7 +4315,7 @@ - # Do each command in the postinstall commands. - lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" -@@ -3369,11 +4346,11 @@ - fi - - # Deduce the name of the destination old-style object file. -- case "$destfile" in -+ case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; -- *.o | *.obj) -+ *.$objext) - staticdest="$destfile" - destfile= - ;; -@@ -3411,40 +4388,55 @@ - fi - - # Do a test to see if this is really a libtool program. -- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -- link_against_libtool_libs= -+ case $host in -+ *cygwin*|*mingw*) -+ wrapper=`echo $file | ${SED} -e 's,.exe$,,'` -+ ;; -+ *) -+ wrapper=$file -+ ;; -+ esac -+ if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then -+ notinst_deplibs= - relink_command= - - # If there is no directory component, then add one. -- case "$file" in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -+ case $file in -+ */* | *\\*) . $wrapper ;; -+ *) . ./$wrapper ;; - esac - - # Check the variables that should have been set. -- if test -z "$link_against_libtool_libs"; then -- $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 -+ if test -z "$notinst_deplibs"; then -+ $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit 1 - fi - - finalize=yes -- for lib in $link_against_libtool_libs; do -+ for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. -- case "$lib" in -+ case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi -- libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" -+ libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - -+ relink_command= -+ # If there is no directory component, then add one. -+ case $file in -+ */* | *\\*) . $wrapper ;; -+ *) . ./$wrapper ;; -+ esac -+ - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then -@@ -3456,6 +4448,7 @@ - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi -+ file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` -@@ -3477,6 +4470,23 @@ - fi - fi - -+ # remove .exe since cygwin /usr/bin/install will append another -+ # one anyways -+ case $install_prog,$host in -+ /usr/bin/install*,*cygwin*) -+ case $file:$destfile in -+ *.exe:*.exe) -+ # this is ok -+ ;; -+ *.exe:*) -+ destfile=$destfile.exe -+ ;; -+ *:*.exe) -+ destfile=`echo $destfile | ${SED} -e 's,.exe$,,'` -+ ;; -+ esac -+ ;; -+ esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" -@@ -3493,9 +4503,14 @@ - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - -+ if test -n "$stripme" && test -n "$striplib"; then -+ $show "$old_striplib $oldlib" -+ $run eval "$old_striplib $oldlib" || exit $? -+ fi -+ - # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" -@@ -3511,11 +4526,10 @@ - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" -- exec $SHELL $0 --finish$current_libdirs -- exit 1 -+ exec_cmd='$SHELL $0 --finish$current_libdirs' -+ else -+ exit 0 - fi -- -- exit 0 - ;; - - # libtool finish mode -@@ -3534,7 +4548,7 @@ - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - eval cmds=\"$finish_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" -@@ -3553,7 +4567,7 @@ - fi - - # Exit here if they wanted silent mode. -- test "$show" = : && exit 0 -+ test "$show" = ":" && exit 0 - - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" -@@ -3563,7 +4577,7 @@ - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" -- echo "specify the full pathname of the library, or use \`-LLIBDIR'" -+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -@@ -3613,10 +4627,10 @@ - fi - - dir= -- case "$file" in -+ case $file in - *.la) - # Check to see that this really is a libtool archive. -- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -+ if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 -@@ -3628,7 +4642,7 @@ - library_names= - - # If there is no directory component, then add one. -- case "$file" in -+ case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac -@@ -3683,13 +4697,13 @@ - args= - for file - do -- case "$file" in -+ case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. -- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. -- case "$file" in -+ case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac -@@ -3706,8 +4720,8 @@ - - if test -z "$run"; then - if test -n "$shlibpath_var"; then -- # Export the shlibpath_var. -- eval "export $shlibpath_var" -+ # Export the shlibpath_var. -+ eval "export $shlibpath_var" - fi - - # Restore saved enviroment variables -@@ -3718,31 +4732,35 @@ - LANG="$save_LANG"; export LANG - fi - -- # Now actually exec the command. -- eval "exec \$cmd$args" -- -- $echo "$modename: cannot exec \$cmd$args" -- exit 1 -+ # Now prepare to actually exec the command. -+ exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then -- eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" -- $echo "export $shlibpath_var" -+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" -+ $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit 0 - fi - ;; - -- # libtool uninstall mode -- uninstall) -- modename="$modename: uninstall" -+ # libtool clean and uninstall mode -+ clean | uninstall) -+ modename="$modename: $mode" - rm="$nonopt" - files= -+ rmforce= -+ exit_status=0 -+ -+ # This variable tells wrapper scripts just to set variables rather -+ # than running their programs. -+ libtool_install_magic="$magic" - - for arg - do -- case "$arg" in -+ case $arg in -+ -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac -@@ -3754,53 +4772,86 @@ - exit 1 - fi - -+ rmdirs= -+ - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` -- test "X$dir" = "X$file" && dir=. -+ if test "X$dir" = "X$file"; then -+ dir=. -+ objdir="$objdir" -+ else -+ objdir="$dir/$objdir" -+ fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -+ test $mode = uninstall && objdir="$dir" -+ -+ # Remember objdir for removal later, being careful to avoid duplicates -+ if test $mode = clean; then -+ case " $rmdirs " in -+ *" $objdir "*) ;; -+ *) rmdirs="$rmdirs $objdir" ;; -+ esac -+ fi -+ -+ # Don't error if the file doesn't exist and rm -f was used. -+ if (test -L "$file") >/dev/null 2>&1 \ -+ || (test -h "$file") >/dev/null 2>&1 \ -+ || test -f "$file"; then -+ : -+ elif test -d "$file"; then -+ exit_status=1 -+ continue -+ elif test "$rmforce" = yes; then -+ continue -+ fi - - rmfiles="$file" - -- case "$name" in -+ case $name in - *.la) - # Possibly a libtool archive, so verify it. -- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do -- rmfiles="$rmfiles $dir/$n" -+ rmfiles="$rmfiles $objdir/$n" - done -- test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" -+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" -+ test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - -- $show "$rm $rmfiles" -- $run $rm $rmfiles -- -- if test -n "$library_names"; then -- # Do each command in the postuninstall commands. -- eval cmds=\"$postuninstall_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -+ if test $mode = uninstall; then -+ if test -n "$library_names"; then -+ # Do each command in the postuninstall commands. -+ eval cmds=\"$postuninstall_cmds\" -+ save_ifs="$IFS"; IFS='~' -+ for cmd in $cmds; do -+ IFS="$save_ifs" -+ $show "$cmd" -+ $run eval "$cmd" -+ if test $? != 0 && test "$rmforce" != yes; then -+ exit_status=1 -+ fi -+ done - IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" -- done -- IFS="$save_ifs" -- fi -+ fi - -- if test -n "$old_library"; then -- # Do each command in the old_postuninstall commands. -- eval cmds=\"$old_postuninstall_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -+ if test -n "$old_library"; then -+ # Do each command in the old_postuninstall commands. -+ eval cmds=\"$old_postuninstall_cmds\" -+ save_ifs="$IFS"; IFS='~' -+ for cmd in $cmds; do -+ IFS="$save_ifs" -+ $show "$cmd" -+ $run eval "$cmd" -+ if test $? != 0 && test "$rmforce" != yes; then -+ exit_status=1 -+ fi -+ done - IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" -- done -- IFS="$save_ifs" -+ fi -+ # FIXME: should reinstall the best remaining shared library. - fi -- -- # FIXME: should reinstall the best remaining shared library. - fi - ;; - -@@ -3809,17 +4860,35 @@ - oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` - rmfiles="$rmfiles $dir/$oldobj" - fi -- $show "$rm $rmfiles" -- $run $rm $rmfiles - ;; - - *) -- $show "$rm $rmfiles" -- $run $rm $rmfiles -+ # Do a test to see if this is a libtool program. -+ if test $mode = clean && -+ (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ relink_command= -+ . $dir/$file -+ -+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" -+ if test "$fast_install" = yes && test -n "$relink_command"; then -+ rmfiles="$rmfiles $objdir/lt-$name" -+ fi -+ fi - ;; - esac -+ $show "$rm $rmfiles" -+ $run $rm $rmfiles || exit_status=1 - done -- exit 0 -+ -+ # Try to remove the ${objdir}s in the directories where we deleted files -+ for dir in $rmdirs; do -+ if test -d "$dir"; then -+ $show "rmdir $dir" -+ $run rmdir $dir >/dev/null 2>&1 -+ fi -+ done -+ -+ exit $exit_status - ;; - - "") -@@ -3829,13 +4898,20 @@ - ;; - esac - -- $echo "$modename: invalid operation mode \`$mode'" 1>&2 -- $echo "$generic_help" 1>&2 -- exit 1 -+ if test -z "$exec_cmd"; then -+ $echo "$modename: invalid operation mode \`$mode'" 1>&2 -+ $echo "$generic_help" 1>&2 -+ exit 1 -+ fi - fi # test -z "$show_help" - -+if test -n "$exec_cmd"; then -+ eval exec $exec_cmd -+ exit 1 -+fi -+ - # We need to display help for each of the modes. --case "$mode" in -+case $mode in - "") $echo \ - "Usage: $modename [OPTION]... [MODE-ARG]... - -@@ -3854,6 +4930,7 @@ - - MODE must be one of the following: - -+ clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries -@@ -3866,6 +4943,20 @@ - exit 0 - ;; - -+clean) -+ $echo \ -+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... -+ -+Remove files from the build directory. -+ -+RM is the name of the program to use to delete files associated with each FILE -+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -+to RM. -+ -+If FILE is a libtool library, object or program, all the files associated -+with it are deleted. Otherwise, only FILE itself is deleted using RM." -+ ;; -+ - compile) - $echo \ - "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE -@@ -3875,6 +4966,8 @@ - This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE -+ -prefer-pic try to building PIC objects only -+ -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - - COMPILE-COMMAND is a command to be used in creating a \`standard' object file -@@ -3954,6 +5047,8 @@ - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened -+ -no-fast-install disable the fast-install mode -+ -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -release RELEASE specify package release information ---- glib1.2-1.2.10.orig/gmodule/Makefile.in -+++ glib1.2-1.2.10/gmodule/Makefile.in -@@ -1,6 +1,6 @@ --# Makefile.in generated automatically by automake 1.4 from Makefile.am -+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am - --# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -62,8 +62,10 @@ - AS = @AS@ - CC = @CC@ - DLLTOOL = @DLLTOOL@ -+ECHO = @ECHO@ - ENABLE_MEM_CHECK = @ENABLE_MEM_CHECK@ - ENABLE_MEM_PROFILE = @ENABLE_MEM_PROFILE@ -+EXEEXT = @EXEEXT@ - GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ - GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ - GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -@@ -88,8 +90,10 @@ - MAINT = @MAINT@ - MAKEINFO = @MAKEINFO@ - OBJDUMP = @OBJDUMP@ -+OBJEXT = @OBJEXT@ - PACKAGE = @PACKAGE@ - RANLIB = @RANLIB@ -+STRIP = @STRIP@ - VERSION = @VERSION@ - - INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule -DG_LOG_DOMAIN=\"GModule\" @GLIB_DEBUG_FLAGS@ -@@ -112,17 +116,17 @@ - libgmodule_la_LDFLAGS = @G_MODULE_LDFLAGS@ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE) -export-dynamic - - --libgmodule_la_LIBADD = @G_MODULE_LIBS@ # $(libglib) -+libgmodule_la_LIBADD = @G_MODULE_LIBS@ $(libglib) - # we should really depend on $(libglib) for libgmodule.la, but libtool has a - # problem with this ;( - - libgplugin_a_la_SOURCES = libgplugin_a.c - libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module --libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ # $(libglib) -+libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ $(libglib) - - libgplugin_b_la_SOURCES = libgplugin_b.c - libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module --libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ # $(libglib) -+libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ $(libglib) - - noinst_PROGRAMS = testgmodule - testgmodule_LDFLAGS = @G_MODULE_LDFLAGS@ -@@ -143,10 +147,11 @@ - libgplugin_a_la_OBJECTS = libgplugin_a.lo - libgplugin_b_la_DEPENDENCIES = - libgplugin_b_la_OBJECTS = libgplugin_b.lo -+noinst_PROGRAMS = testgmodule$(EXEEXT) - PROGRAMS = $(noinst_PROGRAMS) - - testgmodule_SOURCES = testgmodule.c --testgmodule_OBJECTS = testgmodule.o -+testgmodule_OBJECTS = testgmodule.$(OBJEXT) - testgmodule_DEPENDENCIES = libgmodule.la $(top_builddir)/libglib.la - CFLAGS = @CFLAGS@ - COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -161,14 +166,14 @@ - - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - --TAR = gtar -+TAR = tar - GZIP_ENV = --best - SOURCES = $(libgmodule_la_SOURCES) $(libgplugin_a_la_SOURCES) $(libgplugin_b_la_SOURCES) testgmodule.c --OBJECTS = $(libgmodule_la_OBJECTS) $(libgplugin_a_la_OBJECTS) $(libgplugin_b_la_OBJECTS) testgmodule.o -+OBJECTS = $(libgmodule_la_OBJECTS) $(libgplugin_a_la_OBJECTS) $(libgplugin_b_la_OBJECTS) testgmodule.$(OBJEXT) - - all: all-redirect - .SUFFIXES: --.SUFFIXES: .S .c .lo .o .s -+.SUFFIXES: .S .c .lo .o .obj .s - $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps gmodule/Makefile - -@@ -197,6 +202,11 @@ - .c.o: - $(COMPILE) -c $< - -+# FIXME: We should only use cygpath when building on Windows, -+# and only if it is available. -+.c.obj: -+ $(COMPILE) -c `cygpath -w $<` -+ - .s.o: - $(COMPILE) -c $< - -@@ -205,6 +215,7 @@ - - mostlyclean-compile: - -rm -f *.o core *.core -+ -rm -f *.$(OBJEXT) - - clean-compile: - -@@ -250,8 +261,8 @@ - - maintainer-clean-noinstPROGRAMS: - --testgmodule: $(testgmodule_OBJECTS) $(testgmodule_DEPENDENCIES) -- @rm -f testgmodule -+testgmodule$(EXEEXT): $(testgmodule_OBJECTS) $(testgmodule_DEPENDENCIES) -+ @rm -f testgmodule$(EXEEXT) - $(LINK) $(testgmodule_LDFLAGS) $(testgmodule_OBJECTS) $(testgmodule_LDADD) $(LIBS) - - install-glibincludeHEADERS: $(glibinclude_HEADERS) -@@ -287,7 +298,7 @@ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ -- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) -+ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) - - mostlyclean-tags: - -@@ -313,15 +324,6 @@ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done --gmodule.lo gmodule.o : gmodule.c gmodule.h ../glib.h ../glibconfig.h \ -- gmoduleconf.h gmodule-dl.c --libgplugin_a.lo libgplugin_a.o : libgplugin_a.c gmodule.h ../glib.h \ -- ../glibconfig.h --libgplugin_b.lo libgplugin_b.o : libgplugin_b.c gmodule.h ../glib.h \ -- ../glibconfig.h --testgmodule.o: testgmodule.c gmodule.h ../glib.h ../glibconfig.h \ -- gmoduleconf.h -- - info-am: - info: info-am - dvi-am: ---- glib1.2-1.2.10.orig/gmodule/Makefile.am -+++ glib1.2-1.2.10/gmodule/Makefile.am -@@ -29,17 +29,17 @@ - -release $(LT_RELEASE) \ - -export-dynamic - --libgmodule_la_LIBADD = @G_MODULE_LIBS@ # $(libglib) -+libgmodule_la_LIBADD = @G_MODULE_LIBS@ $(libglib) - # we should really depend on $(libglib) for libgmodule.la, but libtool has a - # problem with this ;( - - libgplugin_a_la_SOURCES = libgplugin_a.c - libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module --libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ # $(libglib) -+libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ $(libglib) - - libgplugin_b_la_SOURCES = libgplugin_b.c - libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module --libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ # $(libglib) -+libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ $(libglib) - - noinst_PROGRAMS = testgmodule - testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@ ---- glib1.2-1.2.10.orig/gthread/Makefile.in -+++ glib1.2-1.2.10/gthread/Makefile.in -@@ -1,6 +1,6 @@ --# Makefile.in generated automatically by automake 1.4 from Makefile.am -+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am - --# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -62,8 +62,10 @@ - AS = @AS@ - CC = @CC@ - DLLTOOL = @DLLTOOL@ -+ECHO = @ECHO@ - ENABLE_MEM_CHECK = @ENABLE_MEM_CHECK@ - ENABLE_MEM_PROFILE = @ENABLE_MEM_PROFILE@ -+EXEEXT = @EXEEXT@ - GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ - GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ - GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -@@ -88,8 +90,10 @@ - MAINT = @MAINT@ - MAKEINFO = @MAKEINFO@ - OBJDUMP = @OBJDUMP@ -+OBJEXT = @OBJEXT@ - PACKAGE = @PACKAGE@ - RANLIB = @RANLIB@ -+STRIP = @STRIP@ - VERSION = @VERSION@ - - INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gthread -DG_LOG_DOMAIN=\"GThread\" -@@ -105,7 +109,7 @@ - libgthread_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE) -export-dynamic - - --libgthread_la_LIBADD = @G_THREAD_LIBS@ -+libgthread_la_LIBADD = @G_THREAD_LIBS@ $(libglib) - - noinst_PROGRAMS = testgthread - testgthread_LDADD = ../libglib.la libgthread.la -@@ -121,10 +125,11 @@ - LIBS = @LIBS@ - libgthread_la_DEPENDENCIES = - libgthread_la_OBJECTS = gthread.lo -+noinst_PROGRAMS = testgthread$(EXEEXT) - PROGRAMS = $(noinst_PROGRAMS) - - testgthread_SOURCES = testgthread.c --testgthread_OBJECTS = testgthread.o -+testgthread_OBJECTS = testgthread.$(OBJEXT) - testgthread_DEPENDENCIES = ../libglib.la libgthread.la - testgthread_LDFLAGS = - CFLAGS = @CFLAGS@ -@@ -137,14 +142,14 @@ - - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - --TAR = gtar -+TAR = tar - GZIP_ENV = --best - SOURCES = $(libgthread_la_SOURCES) testgthread.c --OBJECTS = $(libgthread_la_OBJECTS) testgthread.o -+OBJECTS = $(libgthread_la_OBJECTS) testgthread.$(OBJEXT) - - all: all-redirect - .SUFFIXES: --.SUFFIXES: .S .c .lo .o .s -+.SUFFIXES: .S .c .lo .o .obj .s - $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps gthread/Makefile - -@@ -181,6 +186,11 @@ - .c.o: - $(COMPILE) -c $< - -+# FIXME: We should only use cygpath when building on Windows, -+# and only if it is available. -+.c.obj: -+ $(COMPILE) -c `cygpath -w $<` -+ - .s.o: - $(COMPILE) -c $< - -@@ -189,6 +199,7 @@ - - mostlyclean-compile: - -rm -f *.o core *.core -+ -rm -f *.$(OBJEXT) - - clean-compile: - -@@ -228,8 +239,8 @@ - - maintainer-clean-noinstPROGRAMS: - --testgthread: $(testgthread_OBJECTS) $(testgthread_DEPENDENCIES) -- @rm -f testgthread -+testgthread$(EXEEXT): $(testgthread_OBJECTS) $(testgthread_DEPENDENCIES) -+ @rm -f testgthread$(EXEEXT) - $(LINK) $(testgthread_LDFLAGS) $(testgthread_OBJECTS) $(testgthread_LDADD) $(LIBS) - - tags: TAGS -@@ -250,7 +261,7 @@ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ -- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) -+ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) - - mostlyclean-tags: - -@@ -276,11 +287,6 @@ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done --gthread.lo gthread.o : gthread.c ../config.h ../glib.h ../glibconfig.h \ -- gthread-posix.c --testgthread.o: testgthread.c ../config.h ../testglib.c ../glib.h \ -- ../glibconfig.h -- - info-am: - info: info-am - dvi-am: ---- glib1.2-1.2.10.orig/gthread/Makefile.am -+++ glib1.2-1.2.10/gthread/Makefile.am -@@ -19,7 +19,7 @@ - -release $(LT_RELEASE) \ - -export-dynamic - --libgthread_la_LIBADD = @G_THREAD_LIBS@ -+libgthread_la_LIBADD = @G_THREAD_LIBS@ $(libglib) - - noinst_PROGRAMS = testgthread - testgthread_LDADD = ../libglib.la libgthread.la ---- glib1.2-1.2.10.orig/docs/Makefile.in -+++ glib1.2-1.2.10/docs/Makefile.in -@@ -1,6 +1,6 @@ --# Makefile.in generated automatically by automake 1.4 from Makefile.am -+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am - --# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -62,8 +62,10 @@ - AS = @AS@ - CC = @CC@ - DLLTOOL = @DLLTOOL@ -+ECHO = @ECHO@ - ENABLE_MEM_CHECK = @ENABLE_MEM_CHECK@ - ENABLE_MEM_PROFILE = @ENABLE_MEM_PROFILE@ -+EXEEXT = @EXEEXT@ - GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ - GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ - GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -@@ -88,8 +90,10 @@ - MAINT = @MAINT@ - MAKEINFO = @MAKEINFO@ - OBJDUMP = @OBJDUMP@ -+OBJEXT = @OBJEXT@ - PACKAGE = @PACKAGE@ - RANLIB = @RANLIB@ -+STRIP = @STRIP@ - VERSION = @VERSION@ - - info_TEXINFOS = glib.texi -@@ -114,7 +118,7 @@ - - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - --TAR = gtar -+TAR = tar - GZIP_ENV = --best - all: all-redirect - .SUFFIXES: -@@ -208,7 +212,7 @@ - else ii=; fi; \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ -- test -z "$ii" \ -+ test -z "$$ii" \ - || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ - done - @$(NORMAL_UNINSTALL) ---- glib1.2-1.2.10.orig/tests/Makefile.in -+++ glib1.2-1.2.10/tests/Makefile.in -@@ -1,6 +1,6 @@ --# Makefile.in generated automatically by automake 1.4 from Makefile.am -+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am - --# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -62,8 +62,10 @@ - AS = @AS@ - CC = @CC@ - DLLTOOL = @DLLTOOL@ -+ECHO = @ECHO@ - ENABLE_MEM_CHECK = @ENABLE_MEM_CHECK@ - ENABLE_MEM_PROFILE = @ENABLE_MEM_PROFILE@ -+EXEEXT = @EXEEXT@ - GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ - GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ - GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -@@ -88,8 +90,10 @@ - MAINT = @MAINT@ - MAKEINFO = @MAKEINFO@ - OBJDUMP = @OBJDUMP@ -+OBJEXT = @OBJEXT@ - PACKAGE = @PACKAGE@ - RANLIB = @RANLIB@ -+STRIP = @STRIP@ - VERSION = @VERSION@ - - INCLUDES = -I$(top_srcdir) -@@ -116,6 +120,10 @@ - mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs - CONFIG_HEADER = ../config.h - CONFIG_CLEAN_FILES = -+noinst_PROGRAMS = array-test$(EXEEXT) dirname-test$(EXEEXT) \ -+hash-test$(EXEEXT) list-test$(EXEEXT) node-test$(EXEEXT) \ -+relation-test$(EXEEXT) slist-test$(EXEEXT) string-test$(EXEEXT) \ -+strfunc-test$(EXEEXT) tree-test$(EXEEXT) type-test$(EXEEXT) - PROGRAMS = $(noinst_PROGRAMS) - - -@@ -124,47 +132,47 @@ - LDFLAGS = @LDFLAGS@ - LIBS = @LIBS@ - array_test_SOURCES = array-test.c --array_test_OBJECTS = array-test.o -+array_test_OBJECTS = array-test.$(OBJEXT) - array_test_DEPENDENCIES = $(top_builddir)/libglib.la - array_test_LDFLAGS = - dirname_test_SOURCES = dirname-test.c --dirname_test_OBJECTS = dirname-test.o -+dirname_test_OBJECTS = dirname-test.$(OBJEXT) - dirname_test_DEPENDENCIES = $(top_builddir)/libglib.la - dirname_test_LDFLAGS = - hash_test_SOURCES = hash-test.c --hash_test_OBJECTS = hash-test.o -+hash_test_OBJECTS = hash-test.$(OBJEXT) - hash_test_DEPENDENCIES = $(top_builddir)/libglib.la - hash_test_LDFLAGS = - list_test_SOURCES = list-test.c --list_test_OBJECTS = list-test.o -+list_test_OBJECTS = list-test.$(OBJEXT) - list_test_DEPENDENCIES = $(top_builddir)/libglib.la - list_test_LDFLAGS = - node_test_SOURCES = node-test.c --node_test_OBJECTS = node-test.o -+node_test_OBJECTS = node-test.$(OBJEXT) - node_test_DEPENDENCIES = $(top_builddir)/libglib.la - node_test_LDFLAGS = - relation_test_SOURCES = relation-test.c --relation_test_OBJECTS = relation-test.o -+relation_test_OBJECTS = relation-test.$(OBJEXT) - relation_test_DEPENDENCIES = $(top_builddir)/libglib.la - relation_test_LDFLAGS = - slist_test_SOURCES = slist-test.c --slist_test_OBJECTS = slist-test.o -+slist_test_OBJECTS = slist-test.$(OBJEXT) - slist_test_DEPENDENCIES = $(top_builddir)/libglib.la - slist_test_LDFLAGS = - string_test_SOURCES = string-test.c --string_test_OBJECTS = string-test.o -+string_test_OBJECTS = string-test.$(OBJEXT) - string_test_DEPENDENCIES = $(top_builddir)/libglib.la - string_test_LDFLAGS = - strfunc_test_SOURCES = strfunc-test.c --strfunc_test_OBJECTS = strfunc-test.o -+strfunc_test_OBJECTS = strfunc-test.$(OBJEXT) - strfunc_test_DEPENDENCIES = $(top_builddir)/libglib.la - strfunc_test_LDFLAGS = - tree_test_SOURCES = tree-test.c --tree_test_OBJECTS = tree-test.o -+tree_test_OBJECTS = tree-test.$(OBJEXT) - tree_test_DEPENDENCIES = $(top_builddir)/libglib.la - tree_test_LDFLAGS = - type_test_SOURCES = type-test.c --type_test_OBJECTS = type-test.o -+type_test_OBJECTS = type-test.$(OBJEXT) - type_test_DEPENDENCIES = $(top_builddir)/libglib.la - type_test_LDFLAGS = - CFLAGS = @CFLAGS@ -@@ -177,14 +185,14 @@ - - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - --TAR = gtar -+TAR = tar - GZIP_ENV = --best - SOURCES = array-test.c dirname-test.c hash-test.c list-test.c node-test.c relation-test.c slist-test.c string-test.c strfunc-test.c tree-test.c type-test.c --OBJECTS = array-test.o dirname-test.o hash-test.o list-test.o node-test.o relation-test.o slist-test.o string-test.o strfunc-test.o tree-test.o type-test.o -+OBJECTS = array-test.$(OBJEXT) dirname-test.$(OBJEXT) hash-test.$(OBJEXT) list-test.$(OBJEXT) node-test.$(OBJEXT) relation-test.$(OBJEXT) slist-test.$(OBJEXT) string-test.$(OBJEXT) strfunc-test.$(OBJEXT) tree-test.$(OBJEXT) type-test.$(OBJEXT) - - all: all-redirect - .SUFFIXES: --.SUFFIXES: .S .c .lo .o .s -+.SUFFIXES: .S .c .lo .o .obj .s - $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps tests/Makefile - -@@ -205,6 +213,11 @@ - .c.o: - $(COMPILE) -c $< - -+# FIXME: We should only use cygpath when building on Windows, -+# and only if it is available. -+.c.obj: -+ $(COMPILE) -c `cygpath -w $<` -+ - .s.o: - $(COMPILE) -c $< - -@@ -213,6 +226,7 @@ - - mostlyclean-compile: - -rm -f *.o core *.core -+ -rm -f *.$(OBJEXT) - - clean-compile: - -@@ -240,48 +254,48 @@ - - maintainer-clean-libtool: - --array-test: $(array_test_OBJECTS) $(array_test_DEPENDENCIES) -- @rm -f array-test -+array-test$(EXEEXT): $(array_test_OBJECTS) $(array_test_DEPENDENCIES) -+ @rm -f array-test$(EXEEXT) - $(LINK) $(array_test_LDFLAGS) $(array_test_OBJECTS) $(array_test_LDADD) $(LIBS) - --dirname-test: $(dirname_test_OBJECTS) $(dirname_test_DEPENDENCIES) -- @rm -f dirname-test -+dirname-test$(EXEEXT): $(dirname_test_OBJECTS) $(dirname_test_DEPENDENCIES) -+ @rm -f dirname-test$(EXEEXT) - $(LINK) $(dirname_test_LDFLAGS) $(dirname_test_OBJECTS) $(dirname_test_LDADD) $(LIBS) - --hash-test: $(hash_test_OBJECTS) $(hash_test_DEPENDENCIES) -- @rm -f hash-test -+hash-test$(EXEEXT): $(hash_test_OBJECTS) $(hash_test_DEPENDENCIES) -+ @rm -f hash-test$(EXEEXT) - $(LINK) $(hash_test_LDFLAGS) $(hash_test_OBJECTS) $(hash_test_LDADD) $(LIBS) - --list-test: $(list_test_OBJECTS) $(list_test_DEPENDENCIES) -- @rm -f list-test -+list-test$(EXEEXT): $(list_test_OBJECTS) $(list_test_DEPENDENCIES) -+ @rm -f list-test$(EXEEXT) - $(LINK) $(list_test_LDFLAGS) $(list_test_OBJECTS) $(list_test_LDADD) $(LIBS) - --node-test: $(node_test_OBJECTS) $(node_test_DEPENDENCIES) -- @rm -f node-test -+node-test$(EXEEXT): $(node_test_OBJECTS) $(node_test_DEPENDENCIES) -+ @rm -f node-test$(EXEEXT) - $(LINK) $(node_test_LDFLAGS) $(node_test_OBJECTS) $(node_test_LDADD) $(LIBS) - --relation-test: $(relation_test_OBJECTS) $(relation_test_DEPENDENCIES) -- @rm -f relation-test -+relation-test$(EXEEXT): $(relation_test_OBJECTS) $(relation_test_DEPENDENCIES) -+ @rm -f relation-test$(EXEEXT) - $(LINK) $(relation_test_LDFLAGS) $(relation_test_OBJECTS) $(relation_test_LDADD) $(LIBS) - --slist-test: $(slist_test_OBJECTS) $(slist_test_DEPENDENCIES) -- @rm -f slist-test -+slist-test$(EXEEXT): $(slist_test_OBJECTS) $(slist_test_DEPENDENCIES) -+ @rm -f slist-test$(EXEEXT) - $(LINK) $(slist_test_LDFLAGS) $(slist_test_OBJECTS) $(slist_test_LDADD) $(LIBS) - --string-test: $(string_test_OBJECTS) $(string_test_DEPENDENCIES) -- @rm -f string-test -+string-test$(EXEEXT): $(string_test_OBJECTS) $(string_test_DEPENDENCIES) -+ @rm -f string-test$(EXEEXT) - $(LINK) $(string_test_LDFLAGS) $(string_test_OBJECTS) $(string_test_LDADD) $(LIBS) - --strfunc-test: $(strfunc_test_OBJECTS) $(strfunc_test_DEPENDENCIES) -- @rm -f strfunc-test -+strfunc-test$(EXEEXT): $(strfunc_test_OBJECTS) $(strfunc_test_DEPENDENCIES) -+ @rm -f strfunc-test$(EXEEXT) - $(LINK) $(strfunc_test_LDFLAGS) $(strfunc_test_OBJECTS) $(strfunc_test_LDADD) $(LIBS) - --tree-test: $(tree_test_OBJECTS) $(tree_test_DEPENDENCIES) -- @rm -f tree-test -+tree-test$(EXEEXT): $(tree_test_OBJECTS) $(tree_test_DEPENDENCIES) -+ @rm -f tree-test$(EXEEXT) - $(LINK) $(tree_test_LDFLAGS) $(tree_test_OBJECTS) $(tree_test_LDADD) $(LIBS) - --type-test: $(type_test_OBJECTS) $(type_test_DEPENDENCIES) -- @rm -f type-test -+type-test$(EXEEXT): $(type_test_OBJECTS) $(type_test_DEPENDENCIES) -+ @rm -f type-test$(EXEEXT) - $(LINK) $(type_test_LDFLAGS) $(type_test_OBJECTS) $(type_test_LDADD) $(LIBS) - - tags: TAGS -@@ -302,7 +316,7 @@ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ -- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) -+ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) - - mostlyclean-tags: - -@@ -328,18 +342,6 @@ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done --array-test.o: array-test.c ../glib.h ../glibconfig.h --dirname-test.o: dirname-test.c ../glib.h ../glibconfig.h --hash-test.o: hash-test.c ../config.h ../glib.h ../glibconfig.h --list-test.o: list-test.c ../glib.h ../glibconfig.h --node-test.o: node-test.c ../config.h ../glib.h ../glibconfig.h --relation-test.o: relation-test.c ../glib.h ../glibconfig.h --slist-test.o: slist-test.c ../glib.h ../glibconfig.h --strfunc-test.o: strfunc-test.c ../glib.h ../glibconfig.h --string-test.o: string-test.c ../glib.h ../glibconfig.h --tree-test.o: tree-test.c ../glib.h ../glibconfig.h --type-test.o: type-test.c ../glib.h ../glibconfig.h -- - check-TESTS: $(TESTS) - @failed=0; all=0; \ - srcdir=$(srcdir); export srcdir; \ ---- glib1.2-1.2.10.orig/debian/rules -+++ glib1.2-1.2.10/debian/rules -@@ -0,0 +1,137 @@ -+#!/usr/bin/make -f -+# Sample debian/rules that uses debhelper. -+# GNU copyright 1997 to 1999 by Joey Hess. -+ -+# Uncomment this to turn on verbose mode. -+#export DH_VERBOSE=1 -+ -+# These are used for cross-compiling and for saving the configure script -+# from having to guess our platform (since we know it already) -+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -+ -+CFLAGS = -Wall -g -+ -+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) -+ CFLAGS += -O0 -+else -+ CFLAGS += -O2 -+endif -+ifeq (,$(findstring,nostrip,$(DEB_BUILD_OPTIONS))) -+ INSTALL_PROGRAM += -s -+endif -+ -+# shared library versions, option 1 -+version=2.0.5 -+major=2 -+# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so -+#version=`ls src/.libs/lib*.so.* | \ -+# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` -+#major=`ls src/.libs/lib*.so.* | \ -+# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` -+ -+config.status: configure -+ dh_testdir -+ -+ # Add here commands to configure the package. -+ ./configure --host=$(DEB_HOST_GNU_TYPE) \ -+ --build=$(DEB_BUILD_GNU_TYPE) \ -+ --prefix=/usr \ -+ --mandir=\$${prefix}/share/man \ -+ --infodir=\$${prefix}/share/info \ -+ --enable-debug=yes -+ -+build: build-stamp -+build-stamp: config.status -+ dh_testdir -+ -+ # Add here commands to compile the package. -+ $(MAKE) -+ -+ touch $@ -+ -+clean: -+ dh_testdir -+ dh_testroot -+ rm -f build-stamp -+ -+ # Add here commands to clean up after the build process. -+ -$(MAKE) distclean -+ -+ -test -r /usr/share/misc/config.sub && \ -+ cp -r /usr/share/misc/config.sub config.sub -+ -test -r /usr/share/misc/config.guess && \ -+ cp -r /usr/share/misc/config.guess config.guess -+ -+ dh_clean -+ -+install: build -+ dh_testdir -+ dh_testroot -+ dh_clean -k -+ dh_installdirs -+ -+ # Add here commands to install the package into debian/tmp -+ $(MAKE) install prefix=$(CURDIR)/debian/libglib1.2/usr -+ -+ # for -dbg -+ mkdir -p $(CURDIR)/debian/libglib1.2/usr/lib/debug -+ for l in `find $(CURDIR)/debian/libglib1.2/usr/lib -name '*.so*'`; do \ -+ cp -vdf $$l \ -+ $(CURDIR)/debian/libglib1.2/usr/lib/debug/; \ -+ done -+ -+ dh_movefiles --sourcedir=debian/libglib1.2 -+ -find $(CURDIR)/debian/ -type d -empty | xargs rmdir -p 2>&1 > /dev/null -+ -+# Build architecture-independent files here. -+binary-indep: build install -+ dh_testdir -i -+ dh_testroot -i -+ -+ dh_installdocs -i -+ -+ dh_installexamples -i -+ dh_installinfo -i -+ dh_installchangelogs -i ChangeLog -+ dh_compress -i -+ dh_fixperms -i -+ dh_installdeb -i -+ dh_gencontrol -i -+ dh_md5sums -i -+ dh_builddeb -i -+ -+# Build architecture-dependent files here. -+binary-arch: build install -+ dh_testdir -a -+ dh_testroot -a -+ -+# dh_installdebconf -+ dh_installdocs -a -+ dh_installexamples -a -+ dh_installmenu -a -+# dh_installlogrotate -+# dh_installemacsen -+# dh_installpam -+# dh_installmime -+# dh_installinit -+# dh_installcron -+ dh_installman -a -+ dh_installinfo -a -+# dh_undocumented -+ dh_installchangelogs -a ChangeLog -+ dh_link -a -+ dh_strip -a -Nlibglib1.2-dbg -+ dh_compress -a -+ dh_fixperms -a -+ dh_makeshlibs -a -Nlibglib1.2-dbg -+ dh_makeshlibs -n -plibglib1.2 -V 'libglib1.2 (>= 1.2.0)' -+ dh_installdeb -a -+# dh_perl -+ dh_shlibdeps -a -+ dh_gencontrol -a -+ dh_md5sums -a -+ dh_builddeb -a -+ -+binary: binary-indep binary-arch -+.PHONY: build clean binary-indep binary-arch binary install ---- glib1.2-1.2.10.orig/debian/docs -+++ glib1.2-1.2.10/debian/docs -@@ -0,0 +1,2 @@ -+NEWS -+README ---- glib1.2-1.2.10.orig/debian/README.Debian -+++ glib1.2-1.2.10/debian/README.Debian -@@ -0,0 +1,25 @@ -+glib for Debian -+---------------------- -+ -+This is GLib version 1.2. GLib, is a library which includes support -+routines for C such as lists, trees, hashes, memory allocation, and -+many other things. -+ -+Versions of GLib prior to 1.1 are distributed with GTK+ versions 1.1.0 -+and earlier. -+ -+The GIMP Tool Kit (gtk) is a set of widgets to help you program -+programs for the X Windowing System easily and powerfully. -+ -+gtk is the moving force behind The GNU Image Manipulation Program (The -+GIMP) -- the number one freely-available image editing and creation -+program available. -+ -+gtk is rapidly under development, and the source tree has officially -+been separated from The GIMP now, as other teams of programmers -+are beginning to write software using its great widget set -- like -+GNOME, a desktop interface for X, and gzilla, a freely available -+web browser for X. -+ -+Ben Gertzfield , Mon, 29 Sep 1997 13:11:45 -0700 -+ ---- glib1.2-1.2.10.orig/debian/changelog -+++ glib1.2-1.2.10/debian/changelog -@@ -0,0 +1,298 @@ -+glib1.2 (1.2.10-9) unstable; urgency=low -+ -+ * debian/control: -+ - bumped Standards-Version to 3.5.10.0. -+ - changed the sections for libglib1.2-dev and libglib1.2-dbg to libdevel. -+ * debian/compat: -+ - use it instead of DH_COMPAT. -+ * gmodule/Makefile.in, gthread/Makefile.in: -+ fix the undefined non-weak symbols. (closes: Bug#193347) -+ -+ -- Akira TAGOH Sun, 18 May 2003 00:00:17 +0900 -+ -+glib1.2 (1.2.10-8) unstable; urgency=low -+ -+ * Fixed libtool issue on mispel. (closes: Bug#183793) -+ * acinclude.m4, ltconfig: -+ - removed. it contained the old libtool stuff. -+ -+ -- Akira TAGOH Tue, 11 Mar 2003 23:36:10 +0900 -+ -+glib1.2 (1.2.10-7) unstable; urgency=low -+ -+ * debian/rules: -+ - fix twice modified the maintainer script for dh_installdocs. -+ - support DEB_HOST_GNU_TYPE and DEB_BUILD_GNU_TYPE. -+ - support noopt and nostrip for DEB_BUILD_OPTIONS. -+ - copy the latest config.sub and config.guess. (closes: Bug#181942) -+ - don't call ldconfig for -dbg package. -+ * debian/control: -+ - bumped Standards-Version to 3.5.8. -+ - updated Build-Depends. -+ - split the documentation files into libglib1.2-doc. -+ * debian/libglib1.2-doc.info: add glib.info. (closes: Bug#159677) -+ -+ -- Akira TAGOH Thu, 27 Feb 2003 00:12:39 +0900 -+ -+glib1.2 (1.2.10-6) unstable; urgency=low -+ -+ * debian/control: -+ - removed libc6-dev from Build-Depends. -+ - changed libc6-dev to libc6-dev | libc-dev in -dev's Depends. -+ -+ -- Akira TAGOH Thu, 22 Aug 2002 02:02:32 +0900 -+ -+glib1.2 (1.2.10-5) unstable; urgency=low -+ -+ * debian/control: add libc6-dev to Depends for -dev (closes: Bug#147653) -+ -+ -- Akira TAGOH Wed, 22 May 2002 23:58:14 +0900 -+ -+glib1.2 (1.2.10-4) unstable; urgency=low -+ -+ * debian/control: Fixed build-depends for NetBSD/i386 (closes: Bug#133443) -+ -+ -- Akira TAGOH Wed, 13 Feb 2002 02:22:20 +0900 -+ -+glib1.2 (1.2.10-3) unstable; urgency=low -+ -+ * Closed a NMU bug. (closes: Bug#93932) -+ * Fixed description typo (closes: Bug#102988) -+ * -dbg package contains shared libraries for debugging. so if you -+ need static link, add -static to compiler option and use -+ static libraries which is included in libglib1.2-dev. -+ -+ -- Akira TAGOH Sat, 24 Nov 2001 20:54:25 +0900 -+ -+glib1.2 (1.2.10-2) unstable; urgency=low -+ -+ * I took over this package from Ben. -+ * Closed a bug because it is already fixed in the latest release. -+ (closes: Bug#62463) -+ -+ -- Akira TAGOH Sat, 10 Nov 2001 19:49:14 +0900 -+ -+glib1.2 (1.2.10-1.2) unstable; urgency=low -+ -+ * Non-Maintainer Upload, approved by Ben. -+ * Updated config.sub and config.guess for ia64 (closes: #93932). -+ * If -dev's postinst fails at install-info, have a look at Bug#99816. -+ -+ -- Jordi Mallach Sat, 23 Jun 2001 05:28:15 +0200 -+ -+glib1.2 (1.2.10-1.1) unstable; urgency=low -+ -+ * Binary-only rebuild because of gcc 2.95 atexit() problem on i386. -+ (Closes: #93052) -+ -+ -- Ben Gertzfield Wed, 11 Apr 2001 19:46:27 -0700 -+ -+glib1.2 (1.2.10-1) unstable; urgency=low -+ -+ * New upstream version. -+ * Patch config.sub for s390 architecture. (Closes: #88553) -+ -+ -- Ben Gertzfield Sun, 1 Apr 2001 21:44:47 -0700 -+ -+glib1.2 (1.2.9-1) unstable; urgency=low -+ -+ * New upstream version. -+ * Include upstream changelog. (Closes: #59744) -+ * Note that the include files have been moved (according to -+ upstream) to /usr/include/glib-1.2/, but this should not be a -+ problem for anything using glib-config. Please, PLEASE, don't -+ submit bugs on my poor packages because your program isn't using -+ glib-config! -+ * Fix bashisms in debian/rules. (Hah, caught 'em on my own..) -+ -+ -- Ben Gertzfield Fri, 2 Mar 2001 16:18:36 -0800 -+ -+glib1.2 (1.2.8-2) unstable; urgency=low -+ -+ * Bump Standards-Version to 3.2.1. -+ -+ -- Ben Gertzfield Sat, 23 Dec 2000 01:31:39 -0800 -+ -+glib1.2 (1.2.8-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Wed, 24 May 2000 19:41:54 -0700 -+ -+glib1.2 (1.2.7-2) frozen unstable; urgency=medium -+ -+ * Fix "guard code" in configure.in that tests for gcc version -+ greater than 2.8 (will fail when 3.0 comes out.) This fixes -+ *half* of the release-critical bug report #55246. -+ * The other half of RC bug #55246 is not really a glib problem; -+ G_GNUC_EXTENSION arguably should be defined on all platforms, but -+ that's up to upstream to change this. It's been reported upstream as -+ gnome bug #6328, http://bugs.gnome.org/db/63/6328.html. In any case, -+ gentoo should be using G_GINT64_CONSTANT(12345) for portably declaring -+ 64-bit constants, instead of the undocumented, internal, -+ not-defined-on-all-platforms G_GNUC_EXTENSION. I will be reassigning -+ the remainder of RC bug #55246 to gentoo. -+ -+ -- Ben Gertzfield Mon, 28 Feb 2000 12:33:57 -0800 -+ -+glib1.2 (1.2.7-1) frozen unstable; urgency=low -+ -+ * To fix i18n problems with GTK+, glib 1.2.7 and gtk+ 1.2.7 -+ must both make it into frozen. -+ * (New upstream version, too. :) -+ -+ -- Ben Gertzfield Thu, 17 Feb 2000 09:12:20 -0800 -+ -+glib1.2 (1.2.6-1) unstable; urgency=low -+ -+ * New upstream version. -+ * Make sure docs are in /usr/share/doc/libglib1.2 etc. -+ -+ -- Ben Gertzfield Fri, 15 Oct 1999 09:44:19 -0700 -+ -+glib1.2 (1.2.5-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Fri, 24 Sep 1999 09:27:25 -0700 -+ -+glib1.2 (1.2.4-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Tue, 24 Aug 1999 11:10:11 -0700 -+ -+glib1.2 (1.2.3-2) unstable; urgency=low -+ -+ * Erg. Make sure -dev depends on exact version of lib, and -dbg -+ depends on exact version of -dev and lib. -+ -+ -- Ben Gertzfield Tue, 27 Jul 1999 15:24:33 -0700 -+ -+glib1.2 (1.2.3-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Tue, 11 May 1999 20:55:00 -0700 -+ -+glib1.2 (1.2.2-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Mon, 26 Apr 1999 18:15:06 -0700 -+ -+glib1.2 (1.2.1-2) unstable; urgency=low -+ -+ * Recompile with GNU libc 2.1. -+ -+ -- Ben Gertzfield Thu, 15 Apr 1999 13:26:50 -0700 -+ -+glib1.2 (1.2.1-1) unstable; urgency=low -+ -+ * New upstream version. -+ * Make the shlibs looser; now packages depend on libglib1.2 (>= 1.2.0) -+ -+ -- Ben Gertzfield Thu, 25 Mar 1999 10:33:26 -0800 -+ -+glib1.2 (1.2.0-1) unstable; urgency=low -+ -+ * Hallelujah! :) We made it. -+ -+ -- Ben Gertzfield Thu, 25 Feb 1999 22:17:36 -0800 -+ -+glib1.1.16 (1.1.16-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Tue, 16 Feb 1999 16:55:07 -0800 -+ -+glib1.1.13 (1.1.13-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Wed, 20 Jan 1999 18:25:48 -0800 -+ -+glib1.1.12 (1.1.12-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Mon, 4 Jan 1999 14:13:59 -0800 -+ -+glib1.1.11 (1.1.11-1) unstable; urgency=low -+ -+ * New upstream version. (They skipped .10.) -+ -+ -- Ben Gertzfield Wed, 30 Dec 1998 21:46:40 -0800 -+ -+glib1.1.9 (1.1.9-1) unstable; urgency=low -+ -+ * New upstream version. -+ * Now debian/rules uses a $(version) variable to make my life easier. -+ -+ -- Ben Gertzfield Thu, 17 Dec 1998 10:36:27 -0800 -+ -+glib1.1.6 (1.1.6-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Tue, 8 Dec 1998 20:54:59 -0800 -+ -+glib1.1.5 (1.1.5-2) unstable; urgency=low -+ -+ * Now libglib1.1.5-dev Provides: libglib-dev and libglib1.1-dev. -+ -+ -- Ben Gertzfield Sun, 29 Nov 1998 17:59:52 -0800 -+ -+glib1.1.5 (1.1.5-1) unstable; urgency=low -+ -+ * Now the source and binary packages *all* specifically have the version -+ number in them. This is so a new release of glib or gtk+ does not break -+ all apps dependant upon glib or gtk+'s unstable branch. -+ * Removed --enable-debug=no from libglib1.1 build; it was causing problems -+ -+ -- Ben Gertzfield Tue, 24 Nov 1998 14:25:15 -0800 -+ -+glib (1.1.4-1) unstable; urgency=low -+ -+ * New upstream version. -+ * debian/control: libglib-dev and libglib-dbg now depend on ${Source-Version} -+ of libglib1.1 to make upgrades force you to have one version of the library -+ and -dev and -dbg, no more multiple versions allowed. -+ -+ -- Ben Gertzfield Thu, 5 Nov 1998 10:50:03 -0800 -+ -+glib (1.1.3-2) unstable; urgency=low -+ -+ * Rebuild with new clean-dbg target to fix my error helped along by -+ an old broken debhelper. -+ -+ -- Ben Gertzfield Tue, 29 Sep 1998 13:01:24 -0700 -+ -+glib (1.1.3-1) unstable; urgency=low -+ -+ * New upstream version. -+ * New libglib-dbg package. -+ -+ -- Ben Gertzfield Mon, 21 Sep 1998 22:30:46 -0700 -+ -+glib (1.1.2-1) unstable; urgency=low -+ -+ * New upstream version (that was fast!). -+ -+ -- Ben Gertzfield Wed, 5 Aug 1998 12:13:59 -0700 -+ -+glib (1.1.1-1) unstable; urgency=low -+ -+ * New upstream version. -+ -+ -- Ben Gertzfield Tue, 4 Aug 1998 22:42:09 -0700 -+ -+glib (1.1.0-1) unstable; urgency=low -+ -+ * Split off of GTK+ package upstream. New package. -+ -+ -- Ben Gertzfield Mon, 27 Jul 1998 14:11:04 -0700 -+ -+Local variables: -+mode: debian-changelog -+End: ---- glib1.2-1.2.10.orig/debian/control -+++ glib1.2-1.2.10/debian/control -@@ -0,0 +1,73 @@ -+Source: glib1.2 -+Priority: optional -+Section: libs -+Maintainer: Akira TAGOH -+Standards-Version: 3.5.10.0 -+Build-Depends: debhelper (>> 4.0.0), libpth-dev [netbsd-i386], autotools-dev -+ -+Package: libglib1.2 -+Architecture: any -+Section: libs -+Depends: ${shlibs:Depends} -+Replaces: libgtk-doc -+Description: The GLib library of C routines -+ GLib is a library containing many useful C routines for things such -+ as trees, hashes, and lists. GLib was previously distributed with -+ the GTK+ toolkit, but has been split off as of the developers' version -+ 1.1.0. -+ . -+ You do not need to install this package if you have libgtk1 (note 1, -+ not 1.1 or 1.2) installed. libgtk1 included libglib in it. libgtk1.1 -+ and libgtk1.2, however, do need libglib1.1 to be installed separately. -+ -+Package: libglib1.2-dev -+Architecture: any -+Section: libdevel -+Depends: libglib1.2 (= ${Source-Version}), libc6-dev | libc-dev, pkg-config -+Conflicts: libglib-dev, libglib1.1.5-dev, libglib1.1.7-dev, libglib1.1.8-dev, libglib1.1.9-dev, libglib1.1.10-dev, libglib1.1.11-dev, libglib1.1.12-dev, libglib1.1.13-dev, libglib1.1.16-dev, libglib1.2 (<< 1.2.10-3) -+Provides: libglib-dev, libglib1.1-dev -+Replaces: libgtk-doc, libglib1.1.5-dev, libglib1.1.6-dev, libglib1.1.9-dev, libglib1.1.11-dev, libglib1.1.12-dev, libglib1.1.13-dev, libglib1.1.16-dev, libglib1.2 (<< 1.2.10-3) -+Suggests: libglib1.2-doc -+Description: Development files for GLib library -+ GLib is a library containing many useful C routines for things such -+ as trees, hashes, and lists. GLib was previously distributed with -+ the GTK+ toolkit, but has been split off as of the developers' version -+ 1.1.0. -+ . -+ This package contains the header files and static libraries for the -+ GLib C library -+ -+Package: libglib1.2-dbg -+Architecture: any -+Section: libdevel -+Priority: extra -+Conflicts: libgtk-dev -+Depends: libglib1.2 (= ${Source-Version}) -+Conflicts: libglib-dbg, libglib1.1.5-dbg, libglib1.1.7-dbg, libglib1.1.8-dbg, libglib1.1.9-dbg, libglib1.1.11-dbg, libglib1.1.12-dbg, libglib1.1.13-dbg, libglib1.1.16-dbg -+Replaces: libglib1.1.5-dbg, libglib1.1.6-dbg, libglib1.1.9-dbg, libglib1.1.11-dbg, libglib1.1.12-dbg, libglib1.1.13-dbg, libglib1.1.16-dbg -+Description: GLib libraries and debugging symbols -+ GLib is a library containing many useful C routines for things such -+ as trees, hashes, and lists. GLib was previously distributed with -+ the GTK+ toolkit, but has been split off as of the developers' version -+ 1.1.0. -+ . -+ This package contains unstripped shared libraries. it is provided -+ primarily to provide a backtrace with names in a debugger, this makes -+ it somewhat easier to interpret core dumps. The libraries are installed -+ in /usr/lib/debug and can be used by placing that directory in -+ LD_LIBRARY_PATH. -+ Most people will not need this package. -+ -+Package: libglib1.2-doc -+Architecture: all -+Section: doc -+Depends: lynx | www-browser -+Description: Documentation files for the GLib library version 1.2 -+ GLib is a library containing many useful C routines for things such -+ as trees, hashes, and lists. GLib was previously distributed with -+ the GTK+ toolkit, but has been split off as of the developers' version -+ 1.1.0. -+ . -+ This package contains the documentation files for the GLib library -+ in /usr/share/doc/libglib1.2-doc/ . -+ ---- glib1.2-1.2.10.orig/debian/copyright -+++ glib1.2-1.2.10/debian/copyright -@@ -0,0 +1,8 @@ -+This package was debianized by Ben Gertzfield -+on Mon, 27 Jul 1998 14:17:44 -0700 -+ -+GIMP's source may be fetched from http://www.gimp.org/ . -+ -+It may be redistributed under the terms of the GNU LGPL, Version 2 or -+later, found on Debian systems in the file /usr/share/common-licenses/LGPL-2. -+ ---- glib1.2-1.2.10.orig/debian/compat -+++ glib1.2-1.2.10/debian/compat -@@ -0,0 +1 @@ -+4 ---- glib1.2-1.2.10.orig/debian/libglib1.2-dbg.dirs -+++ glib1.2-1.2.10/debian/libglib1.2-dbg.dirs -@@ -0,0 +1 @@ -+usr/lib/debug ---- glib1.2-1.2.10.orig/debian/libglib1.2-dbg.files -+++ glib1.2-1.2.10/debian/libglib1.2-dbg.files -@@ -0,0 +1 @@ -+usr/lib/debug/*.so* ---- glib1.2-1.2.10.orig/debian/libglib1.2-dev.dirs -+++ glib1.2-1.2.10/debian/libglib1.2-dev.dirs -@@ -0,0 +1,4 @@ -+usr/include -+usr/lib -+usr/lib/pkgconfig -+ ---- glib1.2-1.2.10.orig/debian/libglib1.2-doc.doc-base -+++ glib1.2-1.2.10/debian/libglib1.2-doc.doc-base -@@ -0,0 +1,16 @@ -+Document: glib-docs -+Title: GLib C library documentation -+Author: Gregory McLean -+Abstract: Library reference for GLib C library of useful functions -+ This document goes into detail on each function of the GLib C -+ library of useful functions to deal with common structures like -+ lists, trees, et cetera. -+Section: Apps/Programming -+ -+Format: texinfo -+Files: /usr/share/doc/libglib1.2-doc/glib.texi.gz -+ -+Format: HTML -+Index: /usr/share/doc/libglib1.2-doc/glib_toc.html -+Files: /usr/share/doc/libglib1.2-doc/glib.html -+ ---- glib1.2-1.2.10.orig/debian/libglib1.2-dev.files -+++ glib1.2-1.2.10/debian/libglib1.2-dev.files -@@ -0,0 +1,7 @@ -+usr/bin/glib-config -+usr/include/* -+usr/lib/lib*.{so,la,a} -+usr/lib/glib/include/* -+usr/lib/pkgconfig/*.pc -+usr/share/aclocal/*m4 -+usr/share/man/man1/glib-config.1* ---- glib1.2-1.2.10.orig/debian/libglib1.2-doc.dirs -+++ glib1.2-1.2.10/debian/libglib1.2-doc.dirs -@@ -0,0 +1 @@ -+usr/share/doc/libglib1.2-doc ---- glib1.2-1.2.10.orig/debian/libglib1.2-doc.files -+++ glib1.2-1.2.10/debian/libglib1.2-doc.files -@@ -0,0 +1,2 @@ -+usr/share/doc/libglib1.2-doc/* -+usr/share/info/* ---- glib1.2-1.2.10.orig/debian/libglib1.2-doc.docs -+++ glib1.2-1.2.10/debian/libglib1.2-doc.docs -@@ -0,0 +1,2 @@ -+docs/*.html -+docs/*.texi ---- glib1.2-1.2.10.orig/debian/libglib1.2-doc.info -+++ glib1.2-1.2.10/debian/libglib1.2-doc.info -@@ -0,0 +1 @@ -+docs/glib.info ---- glib1.2-1.2.10.orig/glibconfig.h -+++ glib1.2-1.2.10/glibconfig.h -@@ -0,0 +1,131 @@ -+/* glibconfig.h -+ * -+ * This is a generated file. Please modify `configure.in' -+ */ -+ -+#ifndef GLIBCONFIG_H -+#define GLIBCONFIG_H -+ -+#include -+#include -+#define GLIB_HAVE_SYS_POLL_H -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+#define G_MINFLOAT FLT_MIN -+#define G_MAXFLOAT FLT_MAX -+#define G_MINDOUBLE DBL_MIN -+#define G_MAXDOUBLE DBL_MAX -+#define G_MINSHORT SHRT_MIN -+#define G_MAXSHORT SHRT_MAX -+#define G_MININT INT_MIN -+#define G_MAXINT INT_MAX -+#define G_MINLONG LONG_MIN -+#define G_MAXLONG LONG_MAX -+ -+typedef signed char gint8; -+typedef unsigned char guint8; -+typedef signed short gint16; -+typedef unsigned short guint16; -+typedef signed int gint32; -+typedef unsigned int guint32; -+ -+#if defined (__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) -+# define G_GNUC_EXTENSION __extension__ -+#else -+# define G_GNUC_EXTENSION -+#endif -+ -+#define G_HAVE_GINT64 1 -+ -+G_GNUC_EXTENSION typedef signed long long gint64; -+G_GNUC_EXTENSION typedef unsigned long long guint64; -+ -+#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) -+ -+#define GPOINTER_TO_INT(p) ((gint) (p)) -+#define GPOINTER_TO_UINT(p) ((guint) (p)) -+ -+#define GINT_TO_POINTER(i) ((gpointer) (i)) -+#define GUINT_TO_POINTER(u) ((gpointer) (u)) -+ -+#ifdef NeXT /* @#%@! NeXTStep */ -+# define g_ATEXIT(proc) (!atexit (proc)) -+#else -+# define g_ATEXIT(proc) (atexit (proc)) -+#endif -+ -+#define g_memmove(d,s,n) G_STMT_START { memmove ((d), (s), (n)); } G_STMT_END -+ -+#define GLIB_MAJOR_VERSION 1 -+#define GLIB_MINOR_VERSION 2 -+#define GLIB_MICRO_VERSION 10 -+ -+ -+#define G_VA_COPY __va_copy -+ -+#ifdef __cplusplus -+#define G_HAVE_INLINE 1 -+#else /* !__cplusplus */ -+#define G_HAVE_INLINE 1 -+#define G_HAVE___INLINE 1 -+#define G_HAVE___INLINE__ 1 -+#endif /* !__cplusplus */ -+ -+#define G_THREADS_ENABLED -+#define G_THREADS_IMPL_POSIX -+typedef struct _GStaticMutex GStaticMutex; -+struct _GStaticMutex -+{ -+ struct _GMutex *runtime_mutex; -+ union { -+ char pad[24]; -+ double dummy_double; -+ void *dummy_pointer; -+ long dummy_long; -+ } aligned_pad_u; -+}; -+#define G_STATIC_MUTEX_INIT { NULL, { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } } -+#define g_static_mutex_get_mutex(mutex) (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex))) -+ -+#define GINT16_TO_LE(val) ((gint16) (val)) -+#define GUINT16_TO_LE(val) ((guint16) (val)) -+#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) -+#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) -+#define GINT32_TO_LE(val) ((gint32) (val)) -+#define GUINT32_TO_LE(val) ((guint32) (val)) -+#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) -+#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) -+#define GINT64_TO_LE(val) ((gint64) (val)) -+#define GUINT64_TO_LE(val) ((guint64) (val)) -+#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) -+#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) -+#define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val)) -+#define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val)) -+#define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val)) -+#define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val)) -+#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) -+#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) -+#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) -+#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) -+#define G_BYTE_ORDER G_LITTLE_ENDIAN -+ -+#define GLIB_SYSDEF_POLLIN =1 -+#define GLIB_SYSDEF_POLLOUT =4 -+#define GLIB_SYSDEF_POLLPRI =2 -+#define GLIB_SYSDEF_POLLERR =8 -+#define GLIB_SYSDEF_POLLHUP =16 -+#define GLIB_SYSDEF_POLLNVAL =32 -+ -+ -+#define G_HAVE_WCHAR_H 1 -+#define G_HAVE_WCTYPE_H 1 -+ -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif /* GLIBCONFIG_H */ ---- glib1.2-1.2.10.orig/stamp-gc-h -+++ glib1.2-1.2.10/stamp-gc-h -@@ -0,0 +1 @@ -+timestamp ---- glib1.2-1.2.10.orig/glibconfig-sysdefs.h -+++ glib1.2-1.2.10/glibconfig-sysdefs.h -@@ -0,0 +1,6 @@ -+#define GLIB_SYSDEF_POLLIN =1 -+#define GLIB_SYSDEF_POLLOUT =4 -+#define GLIB_SYSDEF_POLLPRI =2 -+#define GLIB_SYSDEF_POLLERR =8 -+#define GLIB_SYSDEF_POLLHUP =16 -+#define GLIB_SYSDEF_POLLNVAL =32 diff --git a/openwrt/package/glib/patches/02-cross-compile-fix.patch b/openwrt/package/glib/patches/02-cross-compile-fix.patch deleted file mode 100644 index e3d68a01599..00000000000 --- a/openwrt/package/glib/patches/02-cross-compile-fix.patch +++ /dev/null @@ -1,210 +0,0 @@ -diff -urN glib-1.2.10.old/configure glib-1.2.10/configure ---- glib-1.2.10.old/configure 2005-04-03 01:09:18.000000000 +0200 -+++ glib-1.2.10/configure 2005-04-03 01:09:37.000000000 +0200 -@@ -6025,7 +6025,7 @@ - glib_save_LIBS=$LIBS - LIBS="$LIBS -lm" - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&5 - # DCE Threads return 1 as success, posix 0. what a mess. - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&5 - # DCE Threads return -1 as failure, posix ETIMEDOUT. - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <>confrun.c - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext < - #include - - /* include varargs functions for assertment macros -diff -urN glib-1.2.10.old/configure glib-1.2.10/configure ---- glib-1.2.10.old/configure 2005-04-03 01:43:49.000000000 +0200 -+++ glib-1.2.10/configure 2005-04-03 01:45:47.000000000 +0200 -@@ -575,16 +575,6 @@ - # Save this value here, since automake will set cflags later - cflags_set=${CFLAGS+set} - --# we rewrite this file --rm -f glibconfig-sysdefs.h -- -- -- -- -- -- -- -- - - # libtool versioning - LT_RELEASE=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION diff --git a/openwrt/package/glib/patches/04-gcc3.4-fix b/openwrt/package/glib/patches/04-gcc3.4-fix deleted file mode 100644 index 96f10b7fa75..00000000000 --- a/openwrt/package/glib/patches/04-gcc3.4-fix +++ /dev/null @@ -1,22 +0,0 @@ -Submitted By: Uwe Düffert (lfs at uwe-dueffert dot de) -Date: 2004-05-15 -Initial Package Version: 1.2.10 -Origin: self-created, http://www.uwe-dueffert.de/lfs/ownpatches/glib-1.2.10-gcc34-1.patch -Upstream Status: not reported -Description: fix compilation of glib1 with gcc34 - -$LastChangedBy$ -$Date$ - -diff -Naur glib-1.2.10.orig/gstrfuncs.c glib-1.2.10/gstrfuncs.c ---- glib-1.2.10.orig/gstrfuncs.c 2004-05-15 13:40:03.556092792 +0000 -+++ glib-1.2.10/gstrfuncs.c 2004-05-15 13:40:36.712052320 +0000 -@@ -47,6 +47,8 @@ - * inteferes with g_strsignal() on some OSes - */ - -+#define G_GNUC_PRETTY_FUNCTION -+ - typedef union _GDoubleIEEE754 GDoubleIEEE754; - #define G_IEEE754_DOUBLE_BIAS (1023) - /* multiply with base2 exponent to get base10 exponent (nomal numbers) */ diff --git a/openwrt/package/gmediaserver/Config.in b/openwrt/package/gmediaserver/Config.in deleted file mode 100644 index e9b6ed50495..00000000000 --- a/openwrt/package/gmediaserver/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_GMEDIASERVER - prompt "gmediaserver...................... An UPnP music media server" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_ID3LIB - select BR2_PACKAGE_LIBUPNP - help - An UPnP music media server. - - http://www.nongnu.org/gmediaserver/ - - Depends: id3lib, libupnp - diff --git a/openwrt/package/gmediaserver/Makefile b/openwrt/package/gmediaserver/Makefile deleted file mode 100644 index bbadfb11296..00000000000 --- a/openwrt/package/gmediaserver/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gmediaserver -PKG_VERSION:=0.9.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=93de0f8dcbc1353a0d0dd5b5ab4b3142 - -PKG_SOURCE_URL:=http://savannah.nongnu.org/download/gmediaserver/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,GMEDIASERVER,gmediaserver,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS=" -lixml -lthreadutil -lupnp -luClibc++ -lz" \ - am_cv_func_iconv=no \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-rpath \ - --with-gnu-ld \ - --with-id3lib="$(STAGING_DIR)/usr" \ - --with-libupnp="$(STAGING_DIR)/usr" \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_GMEDIASERVER): - install -m0755 -d $(IDIR_GMEDIASERVER)/etc/default - install -m0644 ./files/gmediaserver.default $(IDIR_GMEDIASERVER)/etc/default/gmediaserver - install -m0755 -d $(IDIR_GMEDIASERVER)/etc/init.d - install -m0755 ./files/gmediaserver.init $(IDIR_GMEDIASERVER)/etc/init.d/gmediaserver - install -m0755 -d $(IDIR_GMEDIASERVER)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/gmediaserver $(IDIR_GMEDIASERVER)/usr/sbin/ - $(RSTRIP) $(IDIR_GMEDIASERVER) - $(IPKG_BUILD) $(IDIR_GMEDIASERVER) $(PACKAGE_DIR) - diff --git a/openwrt/package/gmediaserver/files/gmediaserver.default b/openwrt/package/gmediaserver/files/gmediaserver.default deleted file mode 100644 index d130f912d53..00000000000 --- a/openwrt/package/gmediaserver/files/gmediaserver.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="--background --interface=br0 --pid-file=$PID_F" diff --git a/openwrt/package/gmediaserver/files/gmediaserver.init b/openwrt/package/gmediaserver/files/gmediaserver.init deleted file mode 100644 index 1582b37cc95..00000000000 --- a/openwrt/package/gmediaserver/files/gmediaserver.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -BIN=gmediaserver -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/gmediaserver/ipkg/gmediaserver.conffiles b/openwrt/package/gmediaserver/ipkg/gmediaserver.conffiles deleted file mode 100644 index d915334a35d..00000000000 --- a/openwrt/package/gmediaserver/ipkg/gmediaserver.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/gmediaserver diff --git a/openwrt/package/gmediaserver/ipkg/gmediaserver.control b/openwrt/package/gmediaserver/ipkg/gmediaserver.control deleted file mode 100644 index 6ba003f5a57..00000000000 --- a/openwrt/package/gmediaserver/ipkg/gmediaserver.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: gmediaserver -Priority: optional -Section: net -Depends: id3lib, libupnp -Description: An UPnP music media server. diff --git a/openwrt/package/gmediaserver/patches/no_iconv.patch b/openwrt/package/gmediaserver/patches/no_iconv.patch deleted file mode 100644 index 2e612117114..00000000000 --- a/openwrt/package/gmediaserver/patches/no_iconv.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff -ruN gmediaserver-0.8.0-old/src/main.c gmediaserver-0.8.0-new/src/main.c ---- gmediaserver-0.8.0-old/src/main.c 2005-09-10 09:26:00.000000000 +0200 -+++ gmediaserver-0.8.0-new/src/main.c 2005-09-17 20:48:01.000000000 +0200 -@@ -32,8 +32,10 @@ - #include /* Gnulib, C99 */ - #include /* ? */ - #include /* ? */ -+#ifdef HAVE_ICONV - #include /* Gnulib, POSIX */ - #include "iconvme.h" /* Gnulib */ -+#endif - #ifdef HAVE_NL_LANGINFO - #include - #endif -@@ -71,8 +73,10 @@ - #ifdef HAVE_ID3LIB - { "disable-id3", no_argument, NULL, OPT_DISABLE_ID3 }, - #endif -+#ifdef HAVE_ICONV - { "in-charset", required_argument, NULL, OPT_IN_CHARSET }, - { "device-charset", required_argument, NULL, OPT_DEVICE_CHARSET }, -+#endif - { "friendly-name", required_argument, NULL, OPT_FRIENDLY_NAME }, - { "pid-file", required_argument, NULL, OPT_PIDFILE }, - { "profile", required_argument, NULL, OPT_PROFILE, }, -@@ -90,15 +94,21 @@ - { NULL, 0, NULL, 0 } - }; - -+#ifdef HAVE_ICONV - iconv_t charset_convert = (iconv_t) -1; -+#endif - const char version_etc_copyright[] = "Copyright (C) 2005 Oskar Liljeblad."; - - char * - convert_string(const char *str) - { -+#ifdef HAVE_ICONV - if (charset_convert == (iconv_t) -1) - return xstrdup(str); - return iconv_alloc(charset_convert, str); -+#else -+ return xstrdup(str); -+#endif - } - - static void -@@ -140,13 +150,17 @@ - char *logfilename = NULL; - char *timestamp_format = NULL; - uint32_t expire_time; -+#ifdef HAVE_ICONV - char *in_charset = NULL; - char *device_charset = NULL; -+#endif - - set_program_name(argv[0]); - -+#ifdef LOCALE - if (setlocale(LC_ALL, "") == NULL) - warn(_("cannot set locale: %s\n"), errstr); -+#endif - #ifdef ENABLE_NLS - if (bindtextdomain(PACKAGE, LOCALEDIR) == NULL) - warn(_("cannot bind message domain: %s\n"), errstr); -@@ -174,12 +188,14 @@ - id3_enabled = false; - break; - #endif -+#ifdef HAVE_ICONV - case OPT_IN_CHARSET: - in_charset = optarg; - break; - case OPT_DEVICE_CHARSET: - device_charset = optarg; - break; -+#endif - case OPT_FRIENDLY_NAME: - if (optarg[0] == '\0') - die(_("friendly name cannot be empty\n")); -@@ -320,6 +336,7 @@ - - init_logging(logfilename, timestamp_format); - -+#ifdef HAVE_ICONV - if (device_charset != NULL) { - if (in_charset == NULL) { - #ifdef HAVE_NL_LANGINFO -@@ -336,6 +353,7 @@ - if (charset_convert == (iconv_t) -1) - die(_("cannot create character set convertor\nTry using another value for --in-charset or --device-charset\n")); - } -+#endif - - /* We could write pid before initiating logging too. - */ -@@ -409,8 +427,10 @@ - if (pidfilename != NULL) - unlink(pidfilename); /* ignore errors */ - -+#ifdef HAVE_ICONV - if (charset_convert != (iconv_t) -1) - iconv_close(charset_convert); /* ignore errors (only EINVAL) */ -+#endif - - finish_logging(true); - diff --git a/openwrt/package/gmp/Config.in b/openwrt/package/gmp/Config.in deleted file mode 100644 index 1e995a7340c..00000000000 --- a/openwrt/package/gmp/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_GMP - tristate - default n - depends BR2_PACKAGE_LIBGMP - -config BR2_PACKAGE_LIBGMP - prompt "libgmp............................ GNU multiprecision arithmetic library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_GMP - help - GNU multiprecision arithmetic library - - http://www.swox.com/gmp/ - diff --git a/openwrt/package/gmp/Makefile b/openwrt/package/gmp/Makefile deleted file mode 100644 index 53db9451bcf..00000000000 --- a/openwrt/package/gmp/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gmp -PKG_VERSION:=4.1.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=0aa7d3b3f5b5ec5951e7dddd6f65e891 - -PKG_SOURCE_URL:=@GNU/gmp -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBGMP,libgmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBGMP): - install -m0755 -d $(IDIR_LIBGMP)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(IDIR_LIBGMP)/usr/lib/ - $(RSTRIP) $(IDIR_LIBGMP) - $(IPKG_BUILD) $(IDIR_LIBGMP) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libgmp.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libgmp.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/gmp* \ - $(STAGING_DIR)/usr/lib/libgmp.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/gmp/ipkg/libgmp.control b/openwrt/package/gmp/ipkg/libgmp.control deleted file mode 100644 index 16900285617..00000000000 --- a/openwrt/package/gmp/ipkg/libgmp.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libgmp -Priority: optional -Section: net -Description: GNU multiprecision arithmetic library diff --git a/openwrt/package/gnutls/Config.in b/openwrt/package/gnutls/Config.in deleted file mode 100644 index bb3ea99e7ba..00000000000 --- a/openwrt/package/gnutls/Config.in +++ /dev/null @@ -1,99 +0,0 @@ -config BR2_COMPILE_GNUTLS - tristate - default n - depends BR2_PACKAGE_LIBGNUTLS - -config BR2_PACKAGE_LIBGNUTLS - prompt "libgnutls......................... The GNU TLS library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_GNUTLS - select BR2_PACKAGE_LIBGCRYPT - help - GnuTLS is a project that aims to develop a library which provides a - secure layer, over a reliable transport layer. Currently the GnuTLS - library implements the proposed standards by the IETF's TLS working - group. - - Quoting from RFC2246 - the TLS 1.0 protocol specification: - - "The TLS protocol provides communications privacy over the Internet. - The protocol allows client/server applications to communicate in a - way that is designed to prevent eavesdropping, tampering, or message - forgery." - - Features - - * Support for TLS 1.1 and SSL 3.0 protocols - * Support for TLS extensions - * Support for authentication using the SRP protocol - * Support for authentication using both X.509 certificates - * and OpenPGP keys Support for X.509 and OpenPGP certificate handling. - * Supports all the strong encryption algorithms - - http://www.gnu.org/software/gnutls/ - - This packages contains the GnuTLS shared libraries, needed by other programs. - -config BR2_PACKAGE_GNUTLS_UTILS - prompt "gnutls-utils.................... The GNU TLS utilities" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBGNUTLS - help - GnuTLS is a project that aims to develop a library which provides a - secure layer, over a reliable transport layer. Currently the GnuTLS - library implements the proposed standards by the IETF's TLS working - group. - - Quoting from RFC2246 - the TLS 1.0 protocol specification: - - "The TLS protocol provides communications privacy over the Internet. - The protocol allows client/server applications to communicate in a - way that is designed to prevent eavesdropping, tampering, or message - forgery." - - Features - - * Support for TLS 1.1 and SSL 3.0 protocols - * Support for TLS extensions - * Support for authentication using the SRP protocol - * Support for authentication using both X.509 certificates - * and OpenPGP keys Support for X.509 and OpenPGP certificate handling. - * Supports all the strong encryption algorithms - - http://www.gnu.org/software/gnutls/ - - This packages contains some GnuTLS utilities. - -config BR2_PACKAGE_LIBGNUTLS_OPENSSL - prompt "libgnutls-openssl............... The GNU TLS OpenSSL compatibility layer library" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBGNUTLS - help - GnuTLS is a project that aims to develop a library which provides a - secure layer, over a reliable transport layer. Currently the GnuTLS - library implements the proposed standards by the IETF's TLS working - group. - - Quoting from RFC2246 - the TLS 1.0 protocol specification: - - "The TLS protocol provides communications privacy over the Internet. - The protocol allows client/server applications to communicate in a - way that is designed to prevent eavesdropping, tampering, or message - forgery." - - Features - - * Support for TLS 1.1 and SSL 3.0 protocols - * Support for TLS extensions - * Support for authentication using the SRP protocol - * Support for authentication using both X.509 certificates - * and OpenPGP keys Support for X.509 and OpenPGP certificate handling. - * Supports all the strong encryption algorithms - - http://www.gnu.org/software/gnutls/ - - This packages contains the GnuTLS OpenSSL compatibility layer shared library. - diff --git a/openwrt/package/gnutls/Makefile b/openwrt/package/gnutls/Makefile deleted file mode 100644 index 5257850784c..00000000000 --- a/openwrt/package/gnutls/Makefile +++ /dev/null @@ -1,128 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gnutls -PKG_VERSION:=1.0.25 -PKG_RELEASE:=0 -PKG_MD5SUM:=3585b5b204135e51e0efc9084b3e028b - -PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/ \ - ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/ \ - http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \ - ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \ - http://josefsson.org/gnutls/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBGNUTLS,libgnutls,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,GNUTLS_UTILS,gnutls-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIBGNUTLS_OPENSSL,libgnutls-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - touch configure.in ; \ - touch acinclude.m4 ; \ - touch aclocal.m4 ; \ - touch Makefile.in ; \ - touch config.h.in ; \ - touch configure ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --disable-srp-authentication \ - --disable-anon-authentication \ - --disable-openpgp-authentication \ - --with-included-opencdk=yes \ - --with-included-libtasn1=yes \ - --with-included-libcfg=yes \ - --without-zlib \ - --without-lzo \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBGNUTLS): - install -m0755 -d $(IDIR_LIBGNUTLS)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra}.so.* $(IDIR_LIBGNUTLS)/usr/lib/ - $(RSTRIP) $(IDIR_LIBGNUTLS) - $(IPKG_BUILD) $(IDIR_LIBGNUTLS) $(PACKAGE_DIR) - -$(IPKG_LIBGNUTLS_OPENSSL): - install -m0755 -d $(IDIR_LIBGNUTLS_OPENSSL)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(IDIR_LIBGNUTLS_OPENSSL)/usr/lib/ - $(RSTRIP) $(IDIR_LIBGNUTLS_OPENSSL) - $(IPKG_BUILD) $(IDIR_LIBGNUTLS_OPENSSL) $(PACKAGE_DIR) - -$(IPKG_GNUTLS_UTILS): - install -m0755 -d $(IDIR_GNUTLS_UTILS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(IDIR_GNUTLS_UTILS)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} $(IDIR_GNUTLS_UTILS)/usr/bin/ - $(RSTRIP) $(IDIR_GNUTLS_UTILS) - $(IPKG_BUILD) $(IDIR_GNUTLS_UTILS) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libgnutls.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libgnutls{,-extra}-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gnutls $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - mkdir -p $(STAGING_DIR)/usr/share/aclocal - $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 $(STAGING_DIR)/usr/share/aclocal/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libgnutls.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/libgnutls{,-extra}-config \ - $(STAGING_DIR)/usr/include/gnutls \ - $(STAGING_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc \ - $(STAGING_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/gnutls/ipkg/gnutls-utils.control b/openwrt/package/gnutls/ipkg/gnutls-utils.control deleted file mode 100644 index 0353a54b152..00000000000 --- a/openwrt/package/gnutls/ipkg/gnutls-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: gnutls-utils -Priority: optional -Section: admin -Description: GNU TLS utilities -Depends: libgnutls diff --git a/openwrt/package/gnutls/ipkg/libgnutls-openssl.control b/openwrt/package/gnutls/ipkg/libgnutls-openssl.control deleted file mode 100644 index ea06e1522c4..00000000000 --- a/openwrt/package/gnutls/ipkg/libgnutls-openssl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libgnutls-openssl -Priority: optional -Section: libs -Description: GNU TLS OpenSSL compatibility layer library -Depends: libgnutls diff --git a/openwrt/package/gnutls/ipkg/libgnutls.control b/openwrt/package/gnutls/ipkg/libgnutls.control deleted file mode 100644 index e6d015ddb13..00000000000 --- a/openwrt/package/gnutls/ipkg/libgnutls.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libgnutls -Priority: optional -Section: libs -Description: GNU TLS library -Depends: libgcrypt diff --git a/openwrt/package/gnutls/patches/500-cross-compile.patch b/openwrt/package/gnutls/patches/500-cross-compile.patch deleted file mode 100644 index 5694bb25f40..00000000000 --- a/openwrt/package/gnutls/patches/500-cross-compile.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -ruN gnutls-1.0.24-orig/configure gnutls-1.0.24-1/configure ---- gnutls-1.0.24-orig/configure 2005-01-18 19:31:03.000000000 +0100 -+++ gnutls-1.0.24-1/configure 2005-03-15 23:23:12.000000000 +0100 -@@ -3633,7 +3633,7 @@ - if test x$opt_developer_mode = xyes; then - CFLAGS="${CFLAGS} -g -Wno-format-y2k -Wall -Wcast-align -W -Wpointer-arith -Wchar-subscripts -Wformat-security -Wmissing-braces -Winline -Wstrict-prototypes" - else -- CFLAGS="${CFLAGS} -O2 -finline-functions" -+ CFLAGS="${CFLAGS} -finline-functions" - fi - - if test x$opt_dmalloc_mode = xyes; then -@@ -25004,8 +25004,8 @@ - - - --LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS" --LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS -I${includedir}" -+LIBGNUTLS_LIBS="-lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS" -+LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS" - - CFLAGS="${CFLAGS} ${LIBGCRYPT_CFLAGS}" - -@@ -25015,8 +25015,8 @@ - SERV_LIBS="$LIBS $SERV_LIBS" - - --LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LIBOPENCDK_LIBS $LZO_LIBS $LIBGNUTLS_LIBS" --LIBGNUTLS_EXTRA_CFLAGS="$LIBOPENCDK_CFLAGS -I${includedir}" -+LIBGNUTLS_EXTRA_LIBS="-lgnutls-extra $LIBOPENCDK_LIBS $LZO_LIBS $LIBGNUTLS_LIBS" -+LIBGNUTLS_EXTRA_CFLAGS="$LIBOPENCDK_CFLAGS $LIBGNUTLS_CFLAGS" - - - -diff -ruN gnutls-1.0.24-orig/configure.in gnutls-1.0.24-1/configure.in ---- gnutls-1.0.24-orig/configure.in 2004-11-14 00:06:57.000000000 +0100 -+++ gnutls-1.0.24-1/configure.in 2005-03-15 23:24:35.000000000 +0100 -@@ -137,7 +137,7 @@ - if test x$opt_developer_mode = xyes; then - CFLAGS="${CFLAGS} -g -Wno-format-y2k -Wall -Wcast-align -W -Wpointer-arith -Wchar-subscripts -Wformat-security -Wmissing-braces -Winline -Wstrict-prototypes" - else -- CFLAGS="${CFLAGS} -O2 -finline-functions" -+ CFLAGS="${CFLAGS} -finline-functions" - fi - - if test x$opt_dmalloc_mode = xyes; then -@@ -489,8 +489,8 @@ - ]) - AM_PROG_LIBTOOL - --LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS" --LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS -I${includedir}" -+LIBGNUTLS_LIBS="-lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS" -+LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS" - - CFLAGS="${CFLAGS} ${LIBGCRYPT_CFLAGS}" - -@@ -500,8 +500,8 @@ - SERV_LIBS="$LIBS $SERV_LIBS" - AC_SUBST(SERV_LIBS) - --LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LIBOPENCDK_LIBS $LZO_LIBS $LIBGNUTLS_LIBS" --LIBGNUTLS_EXTRA_CFLAGS="$LIBOPENCDK_CFLAGS -I${includedir}" -+LIBGNUTLS_EXTRA_LIBS="-lgnutls-extra $LIBOPENCDK_LIBS $LZO_LIBS $LIBGNUTLS_LIBS" -+LIBGNUTLS_EXTRA_CFLAGS="$LIBOPENCDK_CFLAGS $LIBGNUTLS_CFLAGS" - - AC_SUBST(LIBGNUTLS_EXTRA_LIBS) - AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS) diff --git a/openwrt/package/gnutls/patches/501-certtool-libs.patch b/openwrt/package/gnutls/patches/501-certtool-libs.patch deleted file mode 100644 index db39f88a921..00000000000 --- a/openwrt/package/gnutls/patches/501-certtool-libs.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN gnutls-1.0.24-orig/src/Makefile.am gnutls-1.0.24-1/src/Makefile.am ---- gnutls-1.0.24-orig/src/Makefile.am 2004-09-17 11:08:24.000000000 +0200 -+++ gnutls-1.0.24-1/src/Makefile.am 2005-03-15 23:28:19.000000000 +0100 -@@ -31,7 +31,7 @@ - cfg/cfg+.c cfg/cfgfile.c cfg/cmdline.c cfg/parse.c cfg/props.c \ - cfg/shared.c cfg/platon/str/dynfgets.c cfg/platon/str/strctype.c \ - cfg/platon/str/strdyn.c cfg/platon/str/strplus.c --certtool_LDADD = ../lib/libgnutls.la $(LIBGCRYPT_LIBS) -+certtool_LDADD = ../lib/libgnutls.la $(LIBGCRYPT_LIBS) $(LIBTASN1_LIBS) - endif - - -diff -ruN gnutls-1.0.24-orig/src/Makefile.in gnutls-1.0.24-1/src/Makefile.in ---- gnutls-1.0.24-orig/src/Makefile.in 2005-01-18 19:31:14.000000000 +0100 -+++ gnutls-1.0.24-1/src/Makefile.in 2005-03-15 23:28:41.000000000 +0100 -@@ -308,7 +308,7 @@ - @HAVE_LIBCFG_FALSE@ cfg/platon/str/strdyn.c cfg/platon/str/strplus.c - - @HAVE_LIBCFG_TRUE@certtool_SOURCES = certtool-gaa.c certtool.c prime.c getpass.c certtool-cfg.c --@HAVE_LIBCFG_FALSE@certtool_LDADD = ../lib/libgnutls.la $(LIBGCRYPT_LIBS) -+@HAVE_LIBCFG_FALSE@certtool_LDADD = ../lib/libgnutls.la $(LIBGCRYPT_LIBS) $(LIBTASN1_LIBS) - @HAVE_LIBCFG_TRUE@certtool_LDADD = ../lib/libgnutls.la $(LIBGCRYPT_LIBS) $(LIBTASN1_LIBS) -lcfg+ - all: all-recursive - diff --git a/openwrt/package/gpg/Config.in b/openwrt/package/gpg/Config.in deleted file mode 100644 index 10f3ba9acd4..00000000000 --- a/openwrt/package/gpg/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_GPG - prompt "gpg .............................. Gnu Privacy Guard" - tristate - default m if CONFIG_DEVEL - help - GPG is an encryption program - - http://www.gnupg.org - diff --git a/openwrt/package/gpg/Makefile b/openwrt/package/gpg/Makefile deleted file mode 100644 index ca7e146cde8..00000000000 --- a/openwrt/package/gpg/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gnupg -PKG_VERSION:=1.4.2.1 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg \ - ftp://ftp.gnupg.org/gcrypt/gnupg -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_MD5:=2d59ed50d92f69994dbfbe00fe1612e4 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,GPG,gpg,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - ac_cv_c_bigendian=no \ - ac_cv_sizeof_off_t=8 \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - --disable-gnupg-iconv \ - --disable-card-support \ - --disable-agent-support \ - --disable-bzip2 \ - --disable-exec \ - --disable-ldap \ - --disable-hkp \ - --disable-finger \ - --disable-ftp \ - --disable-largefile \ - --disable-dns-srv \ - --enable-fake-curl \ - --disable-nls \ - --disable-rpath \ - --disable-regex \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) - touch $@ - -$(IPKG_GPG): - mkdir -p $(IDIR_GPG)/usr/bin - $(CP) $(PKG_BUILD_DIR)/g10/gpg $(IDIR_GPG)/usr/bin/ - $(RSTRIP) $(IDIR_GPG) - $(IPKG_BUILD) $(IDIR_GPG) $(PACKAGE_DIR) diff --git a/openwrt/package/gpg/ipkg/gpg.control b/openwrt/package/gpg/ipkg/gpg.control deleted file mode 100644 index 4cca7e8f91d..00000000000 --- a/openwrt/package/gpg/ipkg/gpg.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: gpg -Priority: optional -Section: text -Description: Gnu Privacy Guard diff --git a/openwrt/package/gpsd/Config.in b/openwrt/package/gpsd/Config.in deleted file mode 100644 index 7b5791917a5..00000000000 --- a/openwrt/package/gpsd/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -config BR2_PACKAGE_GPSD - prompt "gpsd.............................. An interface daemon for GPS receivers" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPTHREAD - select BR2_PACKAGE_UCLIBCXX - help - gpsd is a monitor daemon that watches a TCP/IP port (2947 by default), - waiting for applications to request information from GPSes or - differential-GPS radios attached to the host machine. Each GPS or - radio is expected to be direct-connected to the host via a USB or - RS232C serial port. The port may be specified to gpsd at startup, or - it may be set via a command shipped down a local control socket (e.g. - by a USB hotplug script). Given a GPS device by either means, gpsd - discovers the correct port speed and protocol for it. - - http://gpsd.berlios.de/ - diff --git a/openwrt/package/gpsd/Makefile b/openwrt/package/gpsd/Makefile deleted file mode 100644 index cd45b4ccb01..00000000000 --- a/openwrt/package/gpsd/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gpsd -PKG_VERSION:=2.30 -PKG_RELEASE:=1 -PKG_MD5SUM:=dde177174878e8ae6db15f8010da46dd - -PKG_SOURCE_URL:=http://download.berlios.de/gpsd/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,GPSD,gpsd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - ( cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm -lnotimpl" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --with-gnu-ld \ - --without-x \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CXXLINK="\$$(LINK)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_GPSD): - install -d -m0755 $(IDIR_GPSD)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(IDIR_GPSD)/usr/lib/ - install -d -m0755 $(IDIR_GPSD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(IDIR_GPSD)/usr/sbin/ - $(RSTRIP) $(IDIR_GPSD) - $(IPKG_BUILD) $(IDIR_GPSD) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libgps.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gps{,d}.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/libgpsmm.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libgps.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/gps{,d}.h \ - $(STAGING_DIR)/usr/include/libgpsmm.h \ - $(STAGING_DIR)/usr/lib/libgps.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/gpsd/ipkg/gpsd.control b/openwrt/package/gpsd/ipkg/gpsd.control deleted file mode 100644 index 94618b69caf..00000000000 --- a/openwrt/package/gpsd/ipkg/gpsd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: gpsd -Priority: optional -Section: net -Depends: libpthread, uclibc++ -Description: An interface daemon for GPS receivers. diff --git a/openwrt/package/gsm/Config.in b/openwrt/package/gsm/Config.in deleted file mode 100644 index 32ff68e79fe..00000000000 --- a/openwrt/package/gsm/Config.in +++ /dev/null @@ -1,30 +0,0 @@ -config BR2_COMPILE_GSM - tristate - default n - depends BR2_PACKAGE_LIBGSM - -config BR2_PACKAGE_LIBGSM - prompt "libgsm............................ A GSM 06.10 full-rate speech transcoding implementation (library)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_GSM - help - An implementation of the European GSM 06.10 provisional standard - for full-rate speech transcoding, prI-ETS 300 036, which uses - RPE/LTP (residual pulse excitation/long term prediction) coding - at 13 kbit/s. - - ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/ - -config BR2_PACKAGE_GSM_UTILS - prompt "gsm-utils....................... A GSM 06.10 full-rate speech transcoding implementation (utilities)" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBGSM - help - An implementation of the European GSM 06.10 provisional standard - for full-rate speech transcoding, prI-ETS 300 036, which uses - RPE/LTP (residual pulse excitation/long term prediction) coding - at 13 kbit/s. - - ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/ diff --git a/openwrt/package/gsm/Makefile b/openwrt/package/gsm/Makefile deleted file mode 100644 index b30a6c5ab50..00000000000 --- a/openwrt/package/gsm/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gsm -PKG_VERSION:=1.0.10 -PKG_RELEASE:=1 -PKG_MD5SUM:= - -PKG_SOURCE_URL:=ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.0-pl10 -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBGSM,libgsm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,GSM_UTILS,gsm-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - LD="$(TARGET_CC)" \ - COPTS="$(TARGET_CFLAGS)" \ - INSTALL_ROOT="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBGSM): - install -d -m0755 $(IDIR_LIBGSM)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(IDIR_LIBGSM)/usr/lib/ - $(RSTRIP) $(IDIR_LIBGSM) - $(IPKG_BUILD) $(IDIR_LIBGSM) $(PACKAGE_DIR) - -$(IPKG_GSM_UTILS): - install -d -m0755 $(IDIR_GSM_UTILS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_GSM_UTILS)/usr/bin/ - $(RSTRIP) $(IDIR_GSM_UTILS) - $(IPKG_BUILD) $(IDIR_GSM_UTILS) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libgsm.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gsm.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libgsm.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/gsm.h \ - $(STAGING_DIR)/usr/lib/libgsm.a \ - $(STAGING_DIR)/usr/lib/libgsm.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/gsm/ipkg/gsm-utils.control b/openwrt/package/gsm/ipkg/gsm-utils.control deleted file mode 100644 index b022f71544a..00000000000 --- a/openwrt/package/gsm/ipkg/gsm-utils.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: gsm-utils -Priority: optional -Section: admin -Description: A GSM 06.10 full-rate speech transcoding implementation (utilities) diff --git a/openwrt/package/gsm/ipkg/libgsm.control b/openwrt/package/gsm/ipkg/libgsm.control deleted file mode 100644 index 922f6965692..00000000000 --- a/openwrt/package/gsm/ipkg/libgsm.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libgsm -Priority: optional -Section: libs -Description: A GSM 06.10 full-rate speech transcoding implementation (library) diff --git a/openwrt/package/gsm/patches/01-debian-libsgm-1.0.10-13.patch b/openwrt/package/gsm/patches/01-debian-libsgm-1.0.10-13.patch deleted file mode 100644 index 4e6e71cce6b..00000000000 --- a/openwrt/package/gsm/patches/01-debian-libsgm-1.0.10-13.patch +++ /dev/null @@ -1,434 +0,0 @@ -diff -ruN gsm-1.0.10-orig/Makefile gsm-1.0.10-1/Makefile ---- gsm-1.0.10-orig/Makefile 1996-07-02 16:36:06.000000000 +0200 -+++ gsm-1.0.10-1/Makefile 2005-04-08 18:47:52.000000000 +0200 -@@ -7,11 +7,13 @@ - SASR = -DSASR - ######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1) - --MULHACK = -DUSE_FLOAT_MUL -+#MULHACK = -DUSE_FLOAT_MUL -+MULHACK = - ######### Define this if your host multiplies floats faster than integers, - ######### e.g. on a SPARCstation. - --FAST = -DFAST -+#FAST = -DFAST -+FAST = - ######### Define together with USE_FLOAT_MUL to enable the GSM library's - ######### approximation option for incorrect, but good-enough results. - -@@ -44,7 +46,8 @@ - # CCFLAGS = -c -O - - CC = gcc -ansi -pedantic --CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1 -+COPTS = -O2 -+CCFLAGS = -c $(COPTS) -DNeedFunctionPrototypes=1 - - LD = $(CC) - -@@ -78,10 +81,10 @@ - # Leave GSM_INSTALL_ROOT empty to not install the GSM library outside of - # this directory. - --GSM_INSTALL_ROOT = $(INSTALL_ROOT) -+GSM_INSTALL_ROOT = $(INSTALL_ROOT)/usr - GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib --GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc --GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3 -+GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include -+GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3 - - - # Where do you want to install the toast binaries and their manpage? -@@ -89,14 +92,14 @@ - # Leave TOAST_INSTALL_ROOT empty to not install the toast binaries outside - # of this directory. - --TOAST_INSTALL_ROOT = $(INSTALL_ROOT) -+TOAST_INSTALL_ROOT = $(INSTALL_ROOT)/usr - TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin --TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1 -+TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1 - - # Other tools - - SHELL = /bin/sh --LN = ln -+LN = ln -s - BASENAME = basename - AR = ar - ARFLAGS = cr -@@ -126,7 +129,7 @@ - - # Flags - --# DEBUG = -DNDEBUG -+DEBUG = -DNDEBUG - ######### Remove -DNDEBUG to enable assertions. - - CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \ -@@ -140,6 +143,7 @@ - # Targets - - LIBGSM = $(LIB)/libgsm.a -+LIBGSMSO= $(LIB)/libgsm.so - - TOAST = $(BIN)/toast - UNTOAST = $(BIN)/untoast -@@ -258,6 +262,9 @@ - - GSM_INSTALL_TARGETS = \ - $(GSM_INSTALL_LIB)/libgsm.a \ -+ $(GSM_INSTALL_LIB)/libgsm.so \ -+ $(GSM_INSTALL_LIB)/libgsm.so.1 \ -+ $(GSM_INSTALL_LIB)/libgsm.so.1.0.10 \ - $(GSM_INSTALL_INC)/gsm.h \ - $(GSM_INSTALL_MAN)/gsm.3 \ - $(GSM_INSTALL_MAN)/gsm_explode.3 \ -@@ -279,7 +286,7 @@ - - # Target rules - --all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST) -+all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST) - @-echo $(ROOT): Done. - - tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result -@@ -299,6 +306,11 @@ - - # The basic API: libgsm - -+$(LIBGSMSO): $(LIB) $(GSM_OBJECTS) -+ $(LD) -o $@.1.0.10 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc -+ ln -fs libgsm.so.1.0.10 lib/libgsm.so.1 -+ ln -fs libgsm.so.1.0.10 lib/libgsm.so -+ - $(LIBGSM): $(LIB) $(GSM_OBJECTS) - -rm $(RMFLAGS) $(LIBGSM) - $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS) -@@ -308,15 +320,15 @@ - # Toast, Untoast and Tcat -- the compress-like frontends to gsm. - - $(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM) -- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB) -+ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB) - - $(UNTOAST): $(BIN) $(TOAST) - -rm $(RMFLAGS) $(UNTOAST) -- $(LN) $(TOAST) $(UNTOAST) -+ $(LN) toast $(UNTOAST) - - $(TCAT): $(BIN) $(TOAST) - -rm $(RMFLAGS) $(TCAT) -- $(LN) $(TOAST) $(TCAT) -+ $(LN) toast $(TCAT) - - - # The local bin and lib directories -@@ -351,53 +363,66 @@ - fi - - $(TOAST_INSTALL_BIN)/toast: $(TOAST) -- -rm $@ -- cp $(TOAST) $@ -+ mkdir -p $(TOAST_INSTALL_BIN) -+ cp -f $(TOAST) $@ - chmod 755 $@ - - $(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast -- -rm $@ -- ln $? $@ -+ mkdir -p $(TOAST_INSTALL_BIN) -+ ln -sf $? $@ - - $(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast -- -rm $@ -- ln $? $@ -+ mkdir -p $(TOAST_INSTALL_BIN) -+ ln -sf $? $@ - - $(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1 -- -rm $@ -- cp $? $@ -+ mkdir -p $(TOAST_INSTALL_MAN) -+ cp -f $? $@ - chmod 444 $@ - - $(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3 -- -rm $@ -- cp $? $@ -+ mkdir -p $(GSM_INSTALL_MAN) -+ cp -f $? $@ - chmod 444 $@ - - $(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3 -- -rm $@ -- cp $? $@ -+ mkdir -p $(GSM_INSTALL_MAN) -+ cp -f $? $@ - chmod 444 $@ - - $(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3 -- -rm $@ -- cp $? $@ -+ mkdir -p $(GSM_INSTALL_MAN) -+ cp -f $? $@ - chmod 444 $@ - - $(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3 -- -rm $@ -- cp $? $@ -+ mkdir -p $(GSM_INSTALL_MAN) -+ cp -f $? $@ - chmod 444 $@ - - $(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h -- -rm $@ -- cp $? $@ -+ mkdir -p $(GSM_INSTALL_INC) -+ cp -f $? $@ - chmod 444 $@ - - $(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM) -- -rm $@ -- cp $? $@ -+ mkdir -p $(GSM_INSTALL_LIB) -+ cp -f $? $@ - chmod 444 $@ - -+$(GSM_INSTALL_LIB)/libgsm.so: $(LIBGSMSO) -+ mkdir -p $(GSM_INSTALL_LIB) -+ cp -f $? $@ -+ -+$(GSM_INSTALL_LIB)/libgsm.so.1: $(LIBGSMSO) -+ mkdir -p $(GSM_INSTALL_LIB) -+ cp -f $? $@ -+ -+$(GSM_INSTALL_LIB)/libgsm.so.1.0.10: $(LIBGSMSO) -+ mkdir -p $(GSM_INSTALL_LIB) -+ cp -f $? $@ -+ chmod 755 $@ -+ - - # Distribution - -@@ -426,7 +451,9 @@ - - clean: semi-clean - -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \ -- $(TOAST) $(TCAT) $(UNTOAST) \ -+ $(LIBGSMSO) $(LIB)/libgsm.so.1.0.10 \ -+ $(LIB)libgsm.so.1 \ -+ $(TOAST) $(TCAT) $(UNTOAST) \ - $(ROOT)/gsm-1.0.tar.Z - - -diff -ruN gsm-1.0.10-orig/inc/config.h gsm-1.0.10-1/inc/config.h ---- gsm-1.0.10-orig/inc/config.h 1996-07-02 16:32:27.000000000 +0200 -+++ gsm-1.0.10-1/inc/config.h 2005-04-08 18:24:31.000000000 +0200 -@@ -9,29 +9,29 @@ - #ifndef CONFIG_H - #define CONFIG_H - --/*efine SIGHANDLER_T int /* signal handlers are void */ --/*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */ -+/*efine SIGHANDLER_T int -* signal handlers are void */ -+/*efine HAS_SYSV_SIGNAL 1 -* sigs not blocked/reset? */ - - #define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */ --/*efine HAS_LIMITS_H 1 /* /usr/include/limits.h */ -+#define HAS_STDIO_H 1 /* /usr/include/stdio.h */ -+/*efine HAS_LIMITS_H 1 -* /usr/include/limits.h */ - #define HAS_FCNTL_H 1 /* /usr/include/fcntl.h */ --/*efine HAS_ERRNO_DECL 1 /* errno.h declares errno */ - - #define HAS_FSTAT 1 /* fstat syscall */ - #define HAS_FCHMOD 1 /* fchmod syscall */ - #define HAS_CHMOD 1 /* chmod syscall */ - #define HAS_FCHOWN 1 /* fchown syscall */ - #define HAS_CHOWN 1 /* chown syscall */ --/*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */ -+/*efine HAS__FSETMODE 1 -* _fsetmode -- set file mode */ - - #define HAS_STRING_H 1 /* /usr/include/string.h */ --/*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */ -+/*efine HAS_STRINGS_H 1 -* /usr/include/strings.h */ - - #define HAS_UNISTD_H 1 /* /usr/include/unistd.h */ - #define HAS_UTIME 1 /* POSIX utime(path, times) */ --/*efine HAS_UTIMES 1 /* use utimes() syscall instead */ -+/*efine HAS_UTIMES 1 -* use utimes() syscall instead */ - #define HAS_UTIME_H 1 /* UTIME header file */ --/*efine HAS_UTIMBUF 1 /* struct utimbuf */ --/*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */ -+/*efine HAS_UTIMBUF 1 -* struct utimbuf */ -+/*efine HAS_UTIMEUSEC 1 -* microseconds in utimbuf? */ - - #endif /* CONFIG_H */ -diff -ruN gsm-1.0.10-orig/inc/gsm.h gsm-1.0.10-1/inc/gsm.h ---- gsm-1.0.10-orig/inc/gsm.h 1996-07-05 20:31:51.000000000 +0200 -+++ gsm-1.0.10-1/inc/gsm.h 2005-04-08 18:24:31.000000000 +0200 -@@ -54,6 +54,10 @@ - #define GSM_OPT_FRAME_INDEX 5 - #define GSM_OPT_FRAME_CHAIN 6 - -+#ifdef __cplusplus -+extern "C" { -+#endif -+ - extern gsm gsm_create GSM_P((void)); - extern void gsm_destroy GSM_P((gsm)); - -@@ -66,6 +70,10 @@ - extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *)); - extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *)); - -+#ifdef __cplusplus -+} -+#endif -+ - #undef GSM_P - - #endif /* GSM_H */ -diff -ruN gsm-1.0.10-orig/inc/toast.h gsm-1.0.10-1/inc/toast.h ---- gsm-1.0.10-orig/inc/toast.h 1996-07-02 16:32:29.000000000 +0200 -+++ gsm-1.0.10-1/inc/toast.h 2005-04-08 18:24:31.000000000 +0200 -@@ -16,11 +16,12 @@ - - #include - #include -+#include - #include - - #include --#ifndef HAS_ERRNO_DECL -- extern int errno; -+#ifndef errno -+ extern int errno; - #endif - - #ifdef HAS_LIMITS_H -@@ -37,6 +38,10 @@ - # endif - #endif - -+#ifdef HAS_STDIO_H -+# include -+#endif -+ - #include "gsm.h" - - #ifndef S_ISREG -diff -ruN gsm-1.0.10-orig/src/code.c gsm-1.0.10-1/src/code.c ---- gsm-1.0.10-orig/src/code.c 1996-07-02 16:32:36.000000000 +0200 -+++ gsm-1.0.10-1/src/code.c 2005-04-08 18:24:31.000000000 +0200 -@@ -9,8 +9,8 @@ - #include "config.h" - - --#ifdef HAS_STDLIB_H --#include -+#ifdef HAS_STRING_H -+#include - #else - # include "proto.h" - extern char * memcpy P((char *, char *, int)); -diff -ruN gsm-1.0.10-orig/src/debug.c gsm-1.0.10-1/src/debug.c ---- gsm-1.0.10-orig/src/debug.c 1996-07-02 16:32:37.000000000 +0200 -+++ gsm-1.0.10-1/src/debug.c 2005-04-08 18:24:31.000000000 +0200 -@@ -49,7 +49,7 @@ - fprintf( stderr, "%s [%d .. %d]: ", name, from, to ); - while (from <= to) { - -- fprintf(stderr, "%d ", ptr[ from ] ); -+ fprintf(stderr, "%ld ", ptr[ from ] ); - from++; - if (nprinted++ >= 7) { - nprinted = 0; -@@ -63,14 +63,14 @@ - char * name, - longword value ) - { -- fprintf(stderr, "%s: %d\n", name, (long)value ); -+ fprintf(stderr, "%s: %ld\n", name, (long)value ); - } - - void gsm_debug_word P2( (name, value), - char * name, - word value ) - { -- fprintf(stderr, "%s: %d\n", name, (long)value); -+ fprintf(stderr, "%s: %ld\n", name, (long)value); - } - - #endif -diff -ruN gsm-1.0.10-orig/src/toast.c gsm-1.0.10-1/src/toast.c ---- gsm-1.0.10-orig/src/toast.c 1996-07-02 16:32:55.000000000 +0200 -+++ gsm-1.0.10-1/src/toast.c 2005-04-08 18:24:31.000000000 +0200 -@@ -251,8 +251,8 @@ - { - char * s; - if (!(s = malloc(len))) { -- fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n", -- progname, len); -+ fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n", -+ progname, (long) len); - onintr(); - exit(1); - } -@@ -270,7 +270,7 @@ - maxlen = strlen(name) + 1 + strlen(want) + strlen(cut); - p = strcpy(emalloc(maxlen), name); - -- if (s = suffix(p, cut)) strcpy(s, want); -+ if ((s = suffix(p, cut))) strcpy(s, want); - else if (*want && !suffix(p, want)) strcat(p, want); - - return p; -@@ -386,7 +386,7 @@ - ut[0] = instat.st_atime; - ut[1] = instat.st_mtime; - -- (void) utime(outname, ut); -+ (void) utime(outname, (struct utimbuf *)ut); - - #endif /* UTIMBUF */ - } -@@ -416,7 +416,7 @@ - } - if (st->st_nlink > 1 && !f_cat && !f_precious) { - fprintf(stderr, -- "%s: \"%s\" has %s other link%s -- unchanged.\n", -+ "%s: \"%s\" has %d other link%s -- unchanged.\n", - progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2)); - return 0; - } -@@ -585,8 +585,8 @@ - - if (cc != sizeof(s)) { - if (cc >= 0) fprintf(stderr, -- "%s: incomplete frame (%d byte%s missing) from %s\n", -- progname, sizeof(s) - cc, -+ "%s: incomplete frame (%ld byte%s missing) from %s\n", -+ progname, (long) sizeof(s) - cc, - "s" + (sizeof(s) - cc == 1), - inname ? inname : "stdin" ); - gsm_destroy(r); -@@ -624,8 +624,6 @@ - - static int process P1((name), char * name) - { -- int step = 0; -- - out = (FILE *)0; - in = (FILE *)0; - -@@ -779,7 +777,6 @@ - case 'h': help(); exit(0); - - default: -- usage: - fprintf(stderr, - "Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n", - progname); diff --git a/openwrt/package/hdparm/Config.in b/openwrt/package/hdparm/Config.in deleted file mode 100644 index d119ac6e522..00000000000 --- a/openwrt/package/hdparm/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_HDPARM - prompt "hdparm............................ get/set ATA drive parameters" - tristate - default m if CONFIG_DEVEL - help - - tune hard disk parameters for high performance - Get/set hard disk parameters for Linux IDE drives. - Primary use is for enabling irq-unmasking and IDE multiplemode. - - The original website: - http://sourceforge.net/projects/hdparm/ diff --git a/openwrt/package/hdparm/Makefile b/openwrt/package/hdparm/Makefile deleted file mode 100644 index 485fb59e078..00000000000 --- a/openwrt/package/hdparm/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=hdparm -PKG_VERSION:=6.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=ecea69f775396e4ab6112dcf9066239f - -PKG_SOURCE_URL:=@SF/hdparm -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,HDPARM,hdparm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) - touch $@ - -$(IPKG_HDPARM): - install -d -m0755 $(IDIR_HDPARM)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/hdparm $(IDIR_HDPARM)/usr/sbin - $(RSTRIP) $(IDIR_HDPARM) - $(IPKG_BUILD) $(IDIR_HDPARM) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) \ - clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/hdparm/ipkg/hdparm.control b/openwrt/package/hdparm/ipkg/hdparm.control deleted file mode 100644 index 4db1002d17b..00000000000 --- a/openwrt/package/hdparm/ipkg/hdparm.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: hdparm -Priority: optional -Section: misc -Description: get/set ATA drive parameters diff --git a/openwrt/package/heyu/Config.in b/openwrt/package/heyu/Config.in deleted file mode 100644 index c8e178391b7..00000000000 --- a/openwrt/package/heyu/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_HEYU - prompt "heyu.............................. X10 home automation control using a CM11A" - tristate - default m if CONFIG_DEVEL - help - X10 home automation control using the CM11A serial device. - - See http://heyu.tanj.com/heyu2/ for details. diff --git a/openwrt/package/heyu/Makefile b/openwrt/package/heyu/Makefile deleted file mode 100644 index 195d119bbfa..00000000000 --- a/openwrt/package/heyu/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=heyu -PKG_VERSION:=2.0beta.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=8289d5ca5b972333a72bc0fc3e640c13 -PKG_SOURCE_URL:=http://heyu.tanj.com/download/ -PKG_SOURCE:=heyu-$(PKG_VERSION).tgz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,HEYU,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ - CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -DSYSV -DPOSIX -DHAS_ITIMER -DLINUX -DHASSELECT -DHASTZ" - touch $@ - -$(IPKG_HEYU): - install -d -m0755 $(IDIR_HEYU)/etc/$(PKG_NAME) - install -m0644 ./files/x10.conf $(IDIR_HEYU)/etc/$(PKG_NAME)/x10.conf - install -d -m0755 $(IDIR_HEYU)/usr/bin - install -m0644 $(PKG_BUILD_DIR)/heyu $(IDIR_HEYU)/usr/bin/ - $(RSTRIP) $(IDIR_HEYU) - $(IPKG_BUILD) $(IDIR_HEYU) $(PACKAGE_DIR) diff --git a/openwrt/package/heyu/files/x10.conf b/openwrt/package/heyu/files/x10.conf deleted file mode 100644 index 3cacaf5e8a9..00000000000 --- a/openwrt/package/heyu/files/x10.conf +++ /dev/null @@ -1,24 +0,0 @@ -# this file should contain x10 appliance aliases, one per line, as: -# appliance-name housecode modulenumber -# for example: -# mydesklamp A 4 -# atticfan B 3 -# sumppump C 3 -# manythings J 1-4 -# -# IMPORTANT! disable the serial console if you need to use heyu -# on /dev/tts/0. Read http://forum.openwrt.org/viewtopic.php?id=1767 -# -# NOTE: using /dev/tts/1 requires the setserial package to -# set the port to use irq 3, otherwise performance will be -# unbearable as it is polled. -# -TTY /dev/tts/1 -# -# give your location - for computing sunrise and sunset times -# Boston, MA USA: -#LATITUDE N42:20 -#LONGITUDE W71:05 -# Menlo Park, CA USA: -LATITUDE N37:43 -LONGITUDE W122:20 diff --git a/openwrt/package/heyu/ipkg/files/heyu.conffiles b/openwrt/package/heyu/ipkg/files/heyu.conffiles deleted file mode 100644 index f3c36bc00f4..00000000000 --- a/openwrt/package/heyu/ipkg/files/heyu.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/heyu/x10.conf diff --git a/openwrt/package/heyu/ipkg/heyu.control b/openwrt/package/heyu/ipkg/heyu.control deleted file mode 100644 index c2800f6018b..00000000000 --- a/openwrt/package/heyu/ipkg/heyu.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: heyu -Priority: optional -Section: misc -Maintainer: Gregory P. Smith -Source: buildroot internal -Description: X10 home automation control using the CM11A -Depends: setserial diff --git a/openwrt/package/heyu/patches/01-avoid_configure.patch b/openwrt/package/heyu/patches/01-avoid_configure.patch deleted file mode 100644 index 110602f5dc4..00000000000 --- a/openwrt/package/heyu/patches/01-avoid_configure.patch +++ /dev/null @@ -1,194 +0,0 @@ -diff -urN orig/heyu-2.0beta.2/Makefile heyu-2.0beta.2/Makefile ---- orig/heyu-2.0beta.2/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ heyu-2.0beta.2/Makefile 2006-01-07 01:53:25.000000000 +0100 -@@ -0,0 +1,183 @@ -+# Makefile for HEYU, a program to control an X10 CM11A computer interface. -+# This makefile is generated by the Configure program. -+# -+BIN = /usr/bin -+MAN = /usr/man/man1 -+MAN5 = /usr/man/man5 -+GROUP = sys -+OWNER = root -+ -+# set DFLAGS equal to: -+# -DSYSV if using SYSTEM V -+# -DVOID if compiler doesn't understand 'void' -+ -+#This makefile is built for linux -+DFLAGS = -DSYSV -DPOSIX -DHAS_ITIMER -DLINUX -DHASSELECT -DHASTZ -DHASCM17A -+LIBS = -lm -lc -+# # The rest of the makefile should need no changes -+ -+## Makefile template for Heyu, a program to control an X10 CM11A computer -+## interface. From this point on the Makefile is copied from Makefile.in -+## by the Configure program -+ -+SRCS = date.c erase.c info.c message.c relay.c \ -+ monitor.c reset.c setclock.c stop.c \ -+ tty.c turn.c x10.c xread.c xwrite.c status.c cm11a.c \ -+ eeprom.c preset.c process.c sun.c cmd.c config.c x10state.c \ -+ poll.c modules.c cm17a.c xsync.c timing.c -+ -+OBJS = date.o erase.o info.o message.o relay.o \ -+ monitor.o reset.o setclock.o stop.o \ -+ tty.o turn.o x10.o xread.o xwrite.o status.o cm11a.o \ -+ eeprom.o preset.o process.o sun.o cmd.o config.o x10state.o \ -+ poll.o modules.o cm17a.o xsync.o timing.o -+ -+OTHERSRC = README README2 Makefile x10config.sample protocol.txt eeprom.h \ -+ x10.sched.sample heyu.1 x10.h x10config.5 x10cm17a.5 \ -+ history.txt version.h heyufaq.txt x10sched.5 process.h sun.h \ -+ x10scripts.5 Configure Makefile.in install.sh INSTALL LICENSE -+ -+EVERYTHING = $(OTHERSRC) $(SRCS) -+ -+all: heyu -+ -+heyu: $(OBJS) version.h -+ $(CC) $(LDFLAGS) -o heyu $(OBJS) $(LIBS) -+ @echo `id` >usergroup.tmp -+ @echo ${HOME} >userhome.tmp -+ @echo "** Now become root and run 'make install' **" -+ -+$(OBJS): x10.h process.h sun.h -+ -+eeprom.o: eeprom.h -+ -+install: $(BIN)/heyu $(MAN)/heyu.1 $(MAN5)/x10config.5 $(MAN5)/x10sched.5 \ -+ $(MAN5)/x10scripts.5 -+ -+uninstall: -+ rm -f $(BIN)/heyu -+ rm -f $(MAN)/heyu.1 -+ rm -f $(MAN5)/x10config.5 -+ rm -f $(MAN5)/x10sched.5 -+ rm -f $(MAN5)/x10scripts.5 -+ -+$(BIN)/heyu: heyu -+ mkdir -p -m 755 $(BIN) -+ cp heyu $(BIN) -+ chgrp $(GROUP) $(BIN)/heyu -+ chmod 755 $(BIN)/heyu -+ chown $(OWNER) $(BIN)/heyu -+ ./install.sh -+ -+$(MAN)/heyu.1: heyu.1 -+ mkdir -p -m 755 $(MAN) -+ cp heyu.1 $(MAN) -+ chmod 644 $(MAN)/heyu.1 -+ -+$(MAN5)/x10config.5: x10config.5 -+ mkdir -p -m 755 $(MAN5) -+ cp x10config.5 $(MAN5) -+ chmod 644 $(MAN5)/x10config.5 -+ -+$(MAN5)/x10sched.5: x10sched.5 -+ mkdir -p -m 755 $(MAN5) -+ cp x10sched.5 $(MAN5) -+ chmod 644 $(MAN5)/x10sched.5 -+ -+$(MAN5)/x10scripts.5: x10scripts.5 -+ mkdir -p -m 755 $(MAN5) -+ cp x10scripts.5 $(MAN5) -+ chmod 644 $(MAN5)/x10scripts.5 -+ -+lint: -+ lint $(DFLAGS) $(SRCS) -+ -+shar: x10_heyu.shar.1 x10_heyu.shar.2 -+ -+x10.o: x10.c version.h -+ -+ci: $(SRCS) index.html Makefile -+ @ for FL in $+ ; do \ -+ if test -w $$FL ; then \ -+ ci -l $$FL ;\ -+ fi ;\ -+ done -+ -+x10_heyu.shar.1: -+ shar $(OTHERSRC) >x10_heyu.shar.1 -+ -+x10_heyu.shar.2: -+ shar $(SRCS) > x10_heyu.shar.2 -+ -+bigshar: -+ shar $(EVERYTHING) > x10_heyu.shar -+ -+tar: x10_heyu.tgz -+ -+x10_heyu.tgz: $(EVERYTHING) -+ rm -fr heyu.dir -+ mkdir heyu.dir -+ cp -p $(EVERYTHING) heyu.dir -+ cp Makefile.dist heyu.dir/Makefile -+ tar -czvf x10_heyu.tgz heyu.dir -+ -+heyudistro: $(EVERYTHING) -+ rm -rf distro.dir -+ mkdir distro.dir -+ cp -p $(EVERYTHING) distro.dir -+ cp -p release_notes.txt distro.dir -+ rm distro.dir/Makefile -+ -+ -+beta: x10_beta.tgz -+ -+x10_beta.tgz: $(EVERYTHING) -+ rm -fr heyu.beta -+ mkdir heyu.beta -+ cp -p $(EVERYTHING) heyu.beta -+ cp Makefile.dist heyu.dir/Makefile -+ tar -czvf x10_beta.tgz heyu.beta -+ -+zip: x10_heyu.zip -+ -+x10_heyu.zip: $(EVERYTHING) -+ rm -f x10_heyu.zip -+ zip -kl x10_heyu.zip $(EVERYTHING) -+ -+touch: -+ touch $(OTHERSRC) -+ touch $(SRCS) -+ -+clean: -+ rm -f *.o -+ -+clobber: clean -+ rm -f heyu -+ -+upload: heyu index.html x10_heyu.tgz x10_heyu.zip -+ /bin/sh -c ./upload.sh -+ -+rcsdiffrw: -+ @-for x in `$(MAKE) rw` ;\ -+ do \ -+ echo ;\ -+ echo $$x ;\ -+ echo ========= ;\ -+ rcsdiff $$x ;\ -+ done 2>&1 ;\ -+ echo ;\ -+ echo all done -+ -+list: -+ @ls $(EVERYTHING) | more -+ -+rw: -+ @ls -l $(EVERYTHING) | \ -+ egrep '^[^l].w' | \ -+ sed 's;.* ;;' # strip to last space -+ -+populate: $(EVERYTHING) -+ -+$(EVERYTHING): -+## co -r$(revision) $@ -+ -diff -urN orig/heyu-2.0beta.2/local.h heyu-2.0beta.2/local.h ---- orig/heyu-2.0beta.2/local.h 1970-01-01 01:00:00.000000000 +0100 -+++ heyu-2.0beta.2/local.h 2006-01-07 01:54:13.000000000 +0100 -@@ -0,0 +1,3 @@ -+#define USESIGINT 1' -+#define SPOOLDIR "/tmp" -+#define LOCKDIR "/tmp" diff --git a/openwrt/package/hostap-utils/Config.in b/openwrt/package/hostap-utils/Config.in deleted file mode 100644 index d2a9f06347b..00000000000 --- a/openwrt/package/hostap-utils/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_HOSTAP_UTILS - prompt "hostap-utils...................... Host AP driver utility programs" - tristate - default m if CONFIG_DEVEL - help - Host AP driver utility programs - - http://hostap.epitest.fi/ - diff --git a/openwrt/package/hostap-utils/Makefile b/openwrt/package/hostap-utils/Makefile deleted file mode 100644 index 3833504f62b..00000000000 --- a/openwrt/package/hostap-utils/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=hostap-utils -PKG_VERSION:=0.4.7 -PKG_RELEASE:=1 -PKG_MD5SUM:=afe041581b8f01666e353bec20917c85 - -PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,HOSTAP_UTILS,hostap-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -Wall" \ - all - touch $@ - -$(IPKG_HOSTAP_UTILS): - install -m0755 -d $(IDIR_HOSTAP_UTILS)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/hostap_crypt_conf $(IDIR_HOSTAP_UTILS)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/hostap_diag $(IDIR_HOSTAP_UTILS)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/hostap_io_debug $(IDIR_HOSTAP_UTILS)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/hostap_rid $(IDIR_HOSTAP_UTILS)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/prism2_srec $(IDIR_HOSTAP_UTILS)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/split_combined_hex $(IDIR_HOSTAP_UTILS)/usr/sbin/ - $(RSTRIP) $(IDIR_HOSTAP_UTILS) - $(IPKG_BUILD) $(IDIR_HOSTAP_UTILS) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/hostap-utils/ipkg/hostap-utils.control b/openwrt/package/hostap-utils/ipkg/hostap-utils.control deleted file mode 100644 index c7e1270cb34..00000000000 --- a/openwrt/package/hostap-utils/ipkg/hostap-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: hostap-utils -Priority: optional -Section: net -Depends: -Description: Host AP driver utility programs diff --git a/openwrt/package/hostapd/Config.in b/openwrt/package/hostapd/Config.in deleted file mode 100644 index 7a66d876dd6..00000000000 --- a/openwrt/package/hostapd/Config.in +++ /dev/null @@ -1,61 +0,0 @@ -config BR2_COMPILE_HOSTAPD - tristate - default n - depends BR2_PACKAGE_HOSTAPD || BR2_PACKAGE_HOSTAPD_MINI || BR2_PACKAGE_HOSTAPD_UTILS - select BR2_PACKAGE_KMOD_MADWIFI - -config BR2_PACKAGE_HOSTAPD - prompt "hostapd........................... An IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_HOSTAPD - select BR2_PACKAGE_LIBOPENSSL - help - - hostapd is a user space daemon for access point and - authentication servers. It implements IEEE 802.11 access point - management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS - client, EAP server, and RADIUS authentication server. - - http://hostap.epitest.fi/hostapd/ - - Includes: - - hostapd - -config BR2_PACKAGE_HOSTAPD_MINI - prompt "hostapd-mini...................... An IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator (without EAP TLS/TTLS support)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_HOSTAPD - help - - hostapd is a user space daemon for access point and - authentication servers. It implements IEEE 802.11 access point - management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS - client, EAP server, and RADIUS authentication server. - - http://hostap.epitest.fi/hostapd/ - - Includes: - - hostapd (built with WPA support only) - -config BR2_PACKAGE_HOSTAPD_UTILS - prompt "hostapd-utils..................... An IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator (CLI utility)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_HOSTAPD - help - - hostapd is a user space daemon for access point and - authentication servers. It implements IEEE 802.11 access point - management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS - client, EAP server, and RADIUS authentication server. - - http://hostap.epitest.fi/hostapd/ - - Includes: - - hostapd_cli - -if (BR2_PACKAGE_HOSTAPD = y) && (BR2_PACKAGE_HOSTAPD_MINI = y) - comment "WARNING: both hostapd and hostapd-mini are selected for installation !" -endif diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile deleted file mode 100644 index ac45e7f7bcf..00000000000 --- a/openwrt/package/hostapd/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=hostapd -PKG_VERSION:=0.5.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=b7f4739ca4758798f8dc3b1ea9fd00d0 - -PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -define PKG_build - -ifneq ($(BR2_PACKAGE_$(1)),) -BUILD_TARGETS += $(PKG_INSTALL_DIR)/$(2)/hostapd -endif - -$(PKG_INSTALL_DIR)/$(2)/hostapd: $(PKG_BUILD_DIR)/.prepared - -$(MAKE) -C $(PKG_BUILD_DIR) clean - $(CP) ./files/$(2).config $(PKG_BUILD_DIR)/.config - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - OPTFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - hostapd - mkdir -p $(PKG_INSTALL_DIR)/$(2) - $(CP) $(PKG_BUILD_DIR)/hostapd $(PKG_INSTALL_DIR)/$(2)/ - touch $$@ - -$$(IPKG_$(1)): $(PKG_INSTALL_DIR)/$(2)/hostapd - install -m0755 -d $$(IDIR_$(1))/etc - install -m0600 $(PKG_BUILD_DIR)/madwifi.conf $$(IDIR_$(1))/etc/hostapd.conf - install -m0755 -d $$(IDIR_$(1))/usr/sbin - install -m0755 $(PKG_INSTALL_DIR)/$(2)/hostapd $$(IDIR_$(1))/usr/sbin/ - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,HOSTAPD_UTILS,hostapd-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_build,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - $(CP) ./files/hostapd.config $(PKG_BUILD_DIR)/.config - touch $@ - -$(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - OPTFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - hostapd_cli - touch $@ - -$(IPKG_HOSTAPD_UTILS): $(PKG_BUILD_DIR)/.built - install -m0755 -d $(IDIR_HOSTAPD_UTILS)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(IDIR_HOSTAPD_UTILS)/usr/sbin/ - $(RSTRIP) $(IDIR_HOSTAPD_UTILS) - $(IPKG_BUILD) $(IDIR_HOSTAPD_UTILS) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/hostapd/files/hostapd-mini.config b/openwrt/package/hostapd/files/hostapd-mini.config deleted file mode 100644 index 912bee8d7f4..00000000000 --- a/openwrt/package/hostapd/files/hostapd-mini.config +++ /dev/null @@ -1,69 +0,0 @@ -# Example hostapd build time configuration -# -# This file lists the configuration options that are used when building the -# hostapd binary. All lines starting with # are ignored. Configuration option -# lines must be commented out complete, if they are not to be included, i.e., -# just setting VARIABLE=n is not disabling that variable. -# -# This file is included in Makefile, so variables like CFLAGS and LIBS can also -# be modified from here. In most cass, these lines should use += in order not -# to override previous values of the variables. - -# Driver interface for Host AP driver -CONFIG_DRIVER_HOSTAP=y - -# Driver interface for wired authenticator -#CONFIG_DRIVER_WIRED=y - -# Driver interface for madwifi driver -CONFIG_DRIVER_MADWIFI=y -#CFLAGS += -I../head # change to reflect local setup; directory for madwifi src - -# Driver interface for Prism54 driver -#CONFIG_DRIVER_PRISM54=y - -# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) -#CONFIG_DRIVER_BSD=y -#CFLAGS += -I/usr/local/include -#LIBS += -L/usr/local/lib - -# IEEE 802.11F/IAPP -CONFIG_IAPP=y - -# WPA2/IEEE 802.11i RSN pre-authentication -CONFIG_RSN_PREAUTH=y - -# Integrated EAP authenticator -CONFIG_EAP=y - -# EAP-MD5 for the integrated EAP authenticator -#CONFIG_EAP_MD5=y - -# EAP-TLS for the integrated EAP authenticator -#CONFIG_EAP_TLS=y - -# EAP-MSCHAPv2 for the integrated EAP authenticator -#CONFIG_EAP_MSCHAPV2=y - -# EAP-PEAP for the integrated EAP authenticator -#CONFIG_EAP_PEAP=y - -# EAP-PSK for the integrated EAP authenticator -CONFIG_EAP_PSK=y - -# EAP-GTC for the integrated EAP authenticator -#CONFIG_EAP_GTC=y - -# EAP-TTLS for the integrated EAP authenticator -#CONFIG_EAP_TTLS=y - -# EAP-SIM for the integrated EAP authenticator -#CONFIG_EAP_SIM=y - -# PKCS#12 (PFX) support (used to read private key and certificate file from -# a file that usually has extension .p12 or .pfx) -#CONFIG_PKCS12=y - -# RADIUS authentication server. This provides access to the integrated EAP -# authenticator from external hosts using RADIUS. -#CONFIG_RADIUS_SERVER=y diff --git a/openwrt/package/hostapd/files/hostapd.config b/openwrt/package/hostapd/files/hostapd.config deleted file mode 100644 index e2237d6d8d8..00000000000 --- a/openwrt/package/hostapd/files/hostapd.config +++ /dev/null @@ -1,69 +0,0 @@ -# Example hostapd build time configuration -# -# This file lists the configuration options that are used when building the -# hostapd binary. All lines starting with # are ignored. Configuration option -# lines must be commented out complete, if they are not to be included, i.e., -# just setting VARIABLE=n is not disabling that variable. -# -# This file is included in Makefile, so variables like CFLAGS and LIBS can also -# be modified from here. In most cass, these lines should use += in order not -# to override previous values of the variables. - -# Driver interface for Host AP driver -CONFIG_DRIVER_HOSTAP=y - -# Driver interface for wired authenticator -#CONFIG_DRIVER_WIRED=y - -# Driver interface for madwifi driver -CONFIG_DRIVER_MADWIFI=y -#CFLAGS += -I../head # change to reflect local setup; directory for madwifi src - -# Driver interface for Prism54 driver -#CONFIG_DRIVER_PRISM54=y - -# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) -#CONFIG_DRIVER_BSD=y -#CFLAGS += -I/usr/local/include -#LIBS += -L/usr/local/lib - -# IEEE 802.11F/IAPP -CONFIG_IAPP=y - -# WPA2/IEEE 802.11i RSN pre-authentication -CONFIG_RSN_PREAUTH=y - -# Integrated EAP authenticator -CONFIG_EAP=y - -# EAP-MD5 for the integrated EAP authenticator -CONFIG_EAP_MD5=y - -# EAP-TLS for the integrated EAP authenticator -CONFIG_EAP_TLS=y - -# EAP-MSCHAPv2 for the integrated EAP authenticator -CONFIG_EAP_MSCHAPV2=y - -# EAP-PEAP for the integrated EAP authenticator -CONFIG_EAP_PEAP=y - -# EAP-PSK for the integrated EAP authenticator -CONFIG_EAP_PSK=y - -# EAP-GTC for the integrated EAP authenticator -CONFIG_EAP_GTC=y - -# EAP-TTLS for the integrated EAP authenticator -CONFIG_EAP_TTLS=y - -# EAP-SIM for the integrated EAP authenticator -#CONFIG_EAP_SIM=y - -# PKCS#12 (PFX) support (used to read private key and certificate file from -# a file that usually has extension .p12 or .pfx) -CONFIG_PKCS12=y - -# RADIUS authentication server. This provides access to the integrated EAP -# authenticator from external hosts using RADIUS. -#CONFIG_RADIUS_SERVER=y diff --git a/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles b/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles deleted file mode 100644 index f61980010e6..00000000000 --- a/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/hostapd.conf diff --git a/openwrt/package/hostapd/ipkg/hostapd-mini.control b/openwrt/package/hostapd/ipkg/hostapd-mini.control deleted file mode 100644 index 5118ba76ac1..00000000000 --- a/openwrt/package/hostapd/ipkg/hostapd-mini.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: hostapd-mini -Priority: optional -Section: net -Depends: kmod-madwifi -Description: an IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator (with EAP/PSK only) diff --git a/openwrt/package/hostapd/ipkg/hostapd-utils.control b/openwrt/package/hostapd/ipkg/hostapd-utils.control deleted file mode 100644 index 5f8d82d9c4c..00000000000 --- a/openwrt/package/hostapd/ipkg/hostapd-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: hostapd-utils -Priority: optional -Section: net -Depends: hostapd -Description: an IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator (CLI utility) diff --git a/openwrt/package/hostapd/ipkg/hostapd.conffiles b/openwrt/package/hostapd/ipkg/hostapd.conffiles deleted file mode 100644 index f61980010e6..00000000000 --- a/openwrt/package/hostapd/ipkg/hostapd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/hostapd.conf diff --git a/openwrt/package/hostapd/ipkg/hostapd.control b/openwrt/package/hostapd/ipkg/hostapd.control deleted file mode 100644 index cb2dac672b2..00000000000 --- a/openwrt/package/hostapd/ipkg/hostapd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: hostapd -Priority: optional -Section: net -Depends: kmod-madwifi, libopenssl -Provides: hostpad -Description: an IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator diff --git a/openwrt/package/hostapd/patches/001-cross_compile_fix.patch b/openwrt/package/hostapd/patches/001-cross_compile_fix.patch deleted file mode 100644 index 8b5ca681d27..00000000000 --- a/openwrt/package/hostapd/patches/001-cross_compile_fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -Common subdirectories: hostapd-0.5.2/logwatch and hostapd-0.5.2.new/logwatch -diff -u hostapd-0.5.2/Makefile hostapd-0.5.2.new/Makefile ---- hostapd-0.5.2/Makefile 2006-03-20 03:20:09.000000000 +0000 -+++ hostapd-0.5.2.new/Makefile 2006-03-21 22:25:23.803473592 +0000 -@@ -3,7 +3,7 @@ - DIR_HOSTAP=. - - ifndef CFLAGS --CFLAGS = -MMD -O2 -Wall -g -+CFLAGS = -MMD $(OPTFLAGS) $(CPPFLAGS) - endif - - # define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to -@@ -266,7 +266,7 @@ - for i in $(ALL); do cp $$i /usr/local/bin/$$i; done - - hostapd: $(OBJS) -- $(CC) -o hostapd $(OBJS) $(LIBS) -+ $(CC) -o hostapd $(OBJS) $(LDFLAGS) $(LIBS) - - driver_conf.c: Makefile .config - rm -f driver_conf.c -@@ -330,10 +330,10 @@ - endif - - nt_password_hash: $(NOBJS) -- $(CC) -o nt_password_hash $(NOBJS) $(LIBS_n) -+ $(CC) -o nt_password_hash $(NOBJS) $(LDFLAGS) $(LIBS_n) - - hlr_auc_gw: $(HOBJS) -- $(CC) -o hlr_auc_gw $(HOBJS) $(LIBS_h) -+ $(CC) -o hlr_auc_gw $(HOBJS) $(LDFLAGS) $(LIBS_h) - - clean: - rm -f core *~ *.o hostapd hostapd_cli nt_password_hash hlr_auc_gw diff --git a/openwrt/package/howl/Config.in b/openwrt/package/howl/Config.in deleted file mode 100644 index a409dd2a641..00000000000 --- a/openwrt/package/howl/Config.in +++ /dev/null @@ -1,62 +0,0 @@ -menu "howl.............................. A Zeroconf networking implementation" - -config BR2_COMPILE_HOWL - tristate - default n - depends BR2_PACKAGE_LIBHOWL - -config BR2_PACKAGE_LIBHOWL - prompt "libhowl........................... The howl library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_HOWL - help - A cross-platform implementation of Zeroconf networking. - - http://www.porchdogsoft.com/products/howl/ - - This package contains shared libraries, needed by other programs. - -config BR2_PACKAGE_HOWL_UTILS - prompt "howl-utils...................... The howl client utilities" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBHOWL - help - A cross-platform implementation of Zeroconf networking. - - http://www.porchdogsoft.com/products/howl/ - -comment "Daemons ---" - -config BR2_PACKAGE_AUTOIPD - prompt "autoipd........................... An IPv4 Link-Local address self-assigner daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBHOWL - help - A cross-platform implementation of Zeroconf networking. - - http://www.porchdogsoft.com/products/howl/ - -config BR2_PACKAGE_MDNSRESPONDER - prompt "mdnsresponder..................... An mDNS (Multicast DNS) service responder daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBHOWL - help - A cross-platform implementation of Zeroconf networking. - - http://www.porchdogsoft.com/products/howl/ - -config BR2_PACKAGE_NIFD - prompt "nifd.............................. A network interface monitor daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBHOWL - help - A cross-platform implementation of Zeroconf networking. - - http://www.porchdogsoft.com/products/howl/ - -endmenu diff --git a/openwrt/package/howl/Makefile b/openwrt/package/howl/Makefile deleted file mode 100644 index 02d9b78f2b5..00000000000 --- a/openwrt/package/howl/Makefile +++ /dev/null @@ -1,120 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=howl -PKG_VERSION:=1.0.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=c389d3ffba0e69a179de2ec650f1fdcc - -PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBHOWL,libhowl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,MDNSRESPONDER,mdnsresponder,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,HOWL_UTILS,howl-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,AUTOIPD,autoipd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,NIFD,nifd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBHOWL): - install -m0755 -d $(IDIR_LIBHOWL)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(IDIR_LIBHOWL)/usr/lib/ - $(RSTRIP) $(IDIR_LIBHOWL) - $(IPKG_BUILD) $(IDIR_LIBHOWL) $(PACKAGE_DIR) - -$(IPKG_HOWL_UTILS): - install -m0755 -d $(IDIR_HOWL_UTILS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(IDIR_HOWL_UTILS)/usr/bin/ - $(RSTRIP) $(IDIR_HOWL_UTILS) - $(IPKG_BUILD) $(IDIR_HOWL_UTILS) $(PACKAGE_DIR) - -$(IPKG_MDNSRESPONDER): - install -m0755 -d $(IDIR_MDNSRESPONDER)/etc - install -m0644 ./files/mDNSResponder.conf $(IDIR_MDNSRESPONDER)/etc/mDNSResponder.conf - install -m0755 -d $(IDIR_MDNSRESPONDER)/etc/init.d - install -m0644 ./files/mDNSResponder.init $(IDIR_MDNSRESPONDER)/etc/init.d/mDNSResponder - install -m0755 -d $(IDIR_MDNSRESPONDER)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(IDIR_MDNSRESPONDER)/usr/sbin/ - $(RSTRIP) $(IDIR_MDNSRESPONDER) - $(IPKG_BUILD) $(IDIR_MDNSRESPONDER) $(PACKAGE_DIR) - -$(IPKG_AUTOIPD): - install -m0755 -d $(IDIR_AUTOIPD)/etc/init.d - install -m0644 ./files/autoipd.init $(IDIR_AUTOIPD)/etc/init.d/autoipd - install -m0755 -d $(IDIR_AUTOIPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(IDIR_AUTOIPD)/usr/sbin/ - $(RSTRIP) $(IDIR_AUTOIPD) - $(IPKG_BUILD) $(IDIR_AUTOIPD) $(PACKAGE_DIR) - -$(IPKG_NIFD): - install -m0755 -d $(IDIR_NIFD)/etc/init.d - install -m0644 ./files/nifd.init $(IDIR_NIFD)/etc/init.d/nifd - install -m0755 -d $(IDIR_NIFD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/nifd $(IDIR_NIFD)/usr/sbin/ - $(RSTRIP) $(IDIR_NIFD) - $(IPKG_BUILD) $(IDIR_NIFD) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libhowl.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - touch $(STAGING_DIR)/usr/lib/libhowl.so - -install-dev: $(STAGING_DIR)/usr/lib/libhowl.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/howl \ - $(STAGING_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/howl.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/howl/files/autoipd.init b/openwrt/package/howl/files/autoipd.init deleted file mode 100644 index eed593603c4..00000000000 --- a/openwrt/package/howl/files/autoipd.init +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/autopid -RUN_D=/var/run -PID_F=$RUN_D/autoipd.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - autoipd $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac -exit $? diff --git a/openwrt/package/howl/files/mDNSResponder.conf b/openwrt/package/howl/files/mDNSResponder.conf deleted file mode 100644 index eac712f9e51..00000000000 --- a/openwrt/package/howl/files/mDNSResponder.conf +++ /dev/null @@ -1,2 +0,0 @@ -#name #type #domain #port #text -"My Router" _http._tcp local. 80 "txtvers=1" "path=/P" "note=My Router" diff --git a/openwrt/package/howl/files/mDNSResponder.init b/openwrt/package/howl/files/mDNSResponder.init deleted file mode 100644 index 292280f7c1c..00000000000 --- a/openwrt/package/howl/files/mDNSResponder.init +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/mDNSResponder -RUN_D=/var/run -PID_F=$RUN_D/mDNSResponder.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - mDNSResponder $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac -exit $? diff --git a/openwrt/package/howl/files/nifd.init b/openwrt/package/howl/files/nifd.init deleted file mode 100644 index b67861eb26f..00000000000 --- a/openwrt/package/howl/files/nifd.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/nifd -RUN_D=/var/run -PID_F=$RUN_D/nifd.pid - -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - nifd $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac -exit $? diff --git a/openwrt/package/howl/ipkg/autoipd.control b/openwrt/package/howl/ipkg/autoipd.control deleted file mode 100644 index 5d8af85e915..00000000000 --- a/openwrt/package/howl/ipkg/autoipd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: autoipd -Priority: optional -Section: net -Description: an IPv4 Link-Local address self-assigner daemon -Depends: libhowl, libpthread diff --git a/openwrt/package/howl/ipkg/howl-utils.control b/openwrt/package/howl/ipkg/howl-utils.control deleted file mode 100644 index ed6695b7643..00000000000 --- a/openwrt/package/howl/ipkg/howl-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: howl-utils -Priority: optional -Section: net -Description: a ZeroConf (aka RendezVous) implementation (utilities) -Depends: libhowl, libpthread diff --git a/openwrt/package/howl/ipkg/libhowl.control b/openwrt/package/howl/ipkg/libhowl.control deleted file mode 100644 index 390862d5caa..00000000000 --- a/openwrt/package/howl/ipkg/libhowl.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libhowl -Priority: optional -Section: net -Description: a ZeroConf (aka RendezVous) implementation (library) diff --git a/openwrt/package/howl/ipkg/mdnsresponder.conffiles b/openwrt/package/howl/ipkg/mdnsresponder.conffiles deleted file mode 100644 index eaf1aead959..00000000000 --- a/openwrt/package/howl/ipkg/mdnsresponder.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/mDNSResponder.conf diff --git a/openwrt/package/howl/ipkg/mdnsresponder.control b/openwrt/package/howl/ipkg/mdnsresponder.control deleted file mode 100644 index e2312e338fd..00000000000 --- a/openwrt/package/howl/ipkg/mdnsresponder.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mdnsresponder -Priority: optional -Section: net -Description: an mDNS (Multicast DNS) service responder daemon -Depends: libhowl, libpthread diff --git a/openwrt/package/howl/ipkg/nifd.control b/openwrt/package/howl/ipkg/nifd.control deleted file mode 100644 index 20f47e3f24f..00000000000 --- a/openwrt/package/howl/ipkg/nifd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: nifd -Priority: optional -Section: net -Description: a network interface monitor daemon -Depends: libhowl, libpthread diff --git a/openwrt/package/howl/patches/config-path.patch b/openwrt/package/howl/patches/config-path.patch deleted file mode 100644 index a0c26d1e274..00000000000 --- a/openwrt/package/howl/patches/config-path.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- howl-0.9.10-orig/src/mDNSResponder/Posix/posix_main.c 2005-01-27 04:11:20.000000000 +0100 -+++ howl-0.9.10-2/src/mDNSResponder/Posix/posix_main.c 2005-03-19 13:04:42.000000000 +0100 -@@ -249,9 +249,9 @@ - { - sw_mdns_servant_load_file(servant, conf_file); - } -- else if (sw_mdns_servant_load_file(servant, "/etc/howl/mDNSResponder.conf") != SW_OKAY) -+ else - { -- sw_mdns_servant_load_file(servant, "/usr/local/etc/howl/mDNSResponder.conf"); -+ sw_mdns_servant_load_file(servant, "/etc/mDNSResponder.conf"); - } - - write_pidfile("mDNSResponder", &pidfd); diff --git a/openwrt/package/howl/patches/debug-log.patch b/openwrt/package/howl/patches/debug-log.patch deleted file mode 100644 index 91410b8e948..00000000000 --- a/openwrt/package/howl/patches/debug-log.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- howl-0.9.10-orig/src/mDNSResponder/Posix/posix_main.c 2005-01-27 04:11:20.000000000 +0100 -+++ howl-0.9.10-2/src/mDNSResponder/Posix/posix_main.c 2005-03-19 13:04:42.000000000 +0100 -@@ -186,6 +186,7 @@ - case 'd': - { - make_daemon = SW_FALSE; -+ sw_debug_set_level(SW_LOG_VERBOSE); - } - break; - diff --git a/openwrt/package/howl/patches/proto-fix.patch b/openwrt/package/howl/patches/proto-fix.patch deleted file mode 100644 index 0b9d105dd64..00000000000 --- a/openwrt/package/howl/patches/proto-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- howl-0.9.10-orig/include/salt/platform.h 2005-01-28 21:46:14.000000000 +0100 -+++ howl-0.9.10-2/include/salt/platform.h 2005-03-19 13:04:42.000000000 +0100 -@@ -409,7 +409,7 @@ - */ - - sw_const_string --sw_strerror(); -+sw_strerror(void); - - - /* diff --git a/openwrt/package/htpdate/Config.in b/openwrt/package/htpdate/Config.in deleted file mode 100644 index 89f19d297cf..00000000000 --- a/openwrt/package/htpdate/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_HTPDATE - prompt "htpdate........................... HTP (Hypertext Time Protocol) implementation" - tristate - default m if CONFIG_DEVEL - help - An HTP (Hypertext Time Protocol) implementation - - http://www.clevervest.com/htp/ - diff --git a/openwrt/package/htpdate/Makefile b/openwrt/package/htpdate/Makefile deleted file mode 100644 index 8eb04c5a506..00000000000 --- a/openwrt/package/htpdate/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=htpdate -PKG_VERSION:=0.9.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=12cf883c5619cf4c13a62f77f1a55b54 - -PKG_SOURCE_URL:=http://www.clevervest.com/htp/archive/c/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,HTPDATE,htpdate,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" - touch $@ - -$(IPKG_HTPDATE): - install -d -m0755 $(IDIR_HTPDATE)/etc/default/ - install -m0644 ./files/htpdate.default $(IDIR_HTPDATE)/etc/default/htpdate - install -d -m0755 $(IDIR_HTPDATE)/etc/init.d/ - install -m0755 ./files/htpdate.init $(IDIR_HTPDATE)/etc/init.d/htpdate - ln -sf htpdate $(IDIR_HTPDATE)/etc/init.d/S49htpdate - install -d -m0755 $(IDIR_HTPDATE)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/htpdate $(IDIR_HTPDATE)/usr/sbin/ - $(RSTRIP) $(IDIR_HTPDATE) - $(IPKG_BUILD) $(IDIR_HTPDATE) $(PACKAGE_DIR) - diff --git a/openwrt/package/htpdate/files/htpdate.default b/openwrt/package/htpdate/files/htpdate.default deleted file mode 100644 index 94674fdd3c6..00000000000 --- a/openwrt/package/htpdate/files/htpdate.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="www.google.com www.yahoo.com www.linux.org www.freebsd.org" diff --git a/openwrt/package/htpdate/files/htpdate.init b/openwrt/package/htpdate/files/htpdate.init deleted file mode 100644 index 97a413f7742..00000000000 --- a/openwrt/package/htpdate/files/htpdate.init +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -BIN=htpdate -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - $BIN -l -s -t $OPTIONS && $BIN -D $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/htpdate/ipkg/htpdate.conffiles b/openwrt/package/htpdate/ipkg/htpdate.conffiles deleted file mode 100644 index cbbc558a1ae..00000000000 --- a/openwrt/package/htpdate/ipkg/htpdate.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/htpdate diff --git a/openwrt/package/htpdate/ipkg/htpdate.control b/openwrt/package/htpdate/ipkg/htpdate.control deleted file mode 100644 index cdb470c2d80..00000000000 --- a/openwrt/package/htpdate/ipkg/htpdate.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: htpdate -Priority: optional -Section: net -Description: an HTP (Hypertext Time Protocol) implementation diff --git a/openwrt/package/httping/Config.in b/openwrt/package/httping/Config.in deleted file mode 100644 index 8c84ec7c9fb..00000000000 --- a/openwrt/package/httping/Config.in +++ /dev/null @@ -1,21 +0,0 @@ -menu "httping........................... Httping is like 'ping' but for http-requests." - -config BR2_PACKAGE_HTTPING - prompt "httping............................ Httping is like 'ping' but for http-requests." - tristate - default m if CONFIG_DEVEL - help - Httping is like 'ping' but for http-requests. - Give it an url, and it'll show you how long it takes to connect, send a - request and retrieve the reply (only the headers). Be aware that the - transmission across the network also takes time! - - http://www.vanheusden.com/httping/ - -config BR2_PACKAGE_HTTPING_WITH_SSL - prompt "Enable SSL support" - bool - default y - depends BR2_PACKAGE_HTTPING - -endmenu diff --git a/openwrt/package/httping/Makefile b/openwrt/package/httping/Makefile deleted file mode 100644 index dbd92087f33..00000000000 --- a/openwrt/package/httping/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=httping -PKG_VERSION:=1.0.10 -PKG_RELEASE:=1 -PKG_MD5SUM:=998b00b8babeb3196d28c20ad87d9c15 - -PKG_SOURCE_URL:=http://www.vanheusden.com/httping/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_DEPEND=libopenssl -ifneq ($(BR2_PACKAGE_HTTPING_WITH_SSL),y) -SSL_ENABLE:=".nossl" -PKG_DEPEND:="" -endif - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,HTTPING,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) -f $(PKG_BUILD_DIR)/Makefile$(SSL_ENABLE) \ - CC=$(TARGET_CC) STAGING_DIR=$(STAGING_DIR) - touch $@ - -$(IPKG_HTTPING): - mkdir -p $(IDIR_HTTPING)/usr/sbin - echo "Depends: $(PKG_DEPEND)" >> $(IDIR_HTTPING)/CONTROL/control - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_HTTPING)/usr/sbin/ - $(STRIP) $(IDIR_HTTPING)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_HTTPING) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/httping/ipkg/httping.control b/openwrt/package/httping/ipkg/httping.control deleted file mode 100644 index 5ab31d9621a..00000000000 --- a/openwrt/package/httping/ipkg/httping.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: httping -Section: net -Priority: optional -Description: Httping is like 'ping' but for http-requests. diff --git a/openwrt/package/httping/patches/01-honor_includes_lib-paths.patch b/openwrt/package/httping/patches/01-honor_includes_lib-paths.patch deleted file mode 100644 index 92817c7b3ad..00000000000 --- a/openwrt/package/httping/patches/01-honor_includes_lib-paths.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -urN httping-1.0.10.orig/io.c httping-1.0.10/io.c ---- httping-1.0.10.orig/io.c 2006-02-13 13:48:37.645232976 +0100 -+++ httping-1.0.10/io.c 2006-02-13 13:48:24.083294704 +0100 -@@ -37,7 +37,7 @@ - struct timeval to; - fd_set rfds; - -- FD_ZERO(&rfds); -+ //FD_ZERO(&rfds); - FD_SET(fd, &rfds); - - to.tv_sec = timeout / 1000; -diff -urN httping-1.0.10.orig/Makefile httping-1.0.10/Makefile ---- httping-1.0.10.orig/Makefile 2006-01-02 17:07:29.000000000 +0100 -+++ httping-1.0.10/Makefile 2006-02-13 13:44:45.066590304 +0100 -@@ -15,8 +15,8 @@ - VERSION=1.0.10 - - DEBUG=-g --LDFLAGS+=-lssl -lcrypto $(DEBUG) --CFLAGS+=-O2 -Wall -DVERSION=\"$(VERSION)\" $(DEBUG) -+LDFLAGS+=-lssl -lcrypto $(DEBUG) -L$(STAGING_DIR)/usr/lib -+CFLAGS+=-O2 -Wall -DVERSION=\"$(VERSION)\" $(DEBUG) -I$(STAGING_DIR)/usr/include - - OBJS=http.o io.o str.o error.o utils.o main.o tcp.o mssl.o res.o - diff --git a/openwrt/package/icecast/Config.in b/openwrt/package/icecast/Config.in deleted file mode 100644 index 90c75c7cffa..00000000000 --- a/openwrt/package/icecast/Config.in +++ /dev/null @@ -1,24 +0,0 @@ -config BR2_PACKAGE_ICECAST - prompt "icecast........................... A streaming media server for Ogg/Vorbis and MP3 audio streams" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBCURL - select BR2_PACKAGE_LIBVORBISIDEC - select BR2_PACKAGE_LIBXML2 - select BR2_PACKAGE_LIBXSLT - help - Icecast is a streaming media server which currently supports Ogg - Vorbis and MP3 audio streams. It can be used to create an Internet - radio station or a privately running jukebox and many things in - between. It is very versatile in that new formats can be added - relatively easily and supports open standards for commuincation and - interaction. - - http://www.icecast.org/ - - Depends: - * libcurl - * libvorbisidec - * libxml2 - * libxslt - diff --git a/openwrt/package/icecast/Makefile b/openwrt/package/icecast/Makefile deleted file mode 100644 index ec2ed2405cd..00000000000 --- a/openwrt/package/icecast/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=icecast -PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=35256fbc4a93571662af2ed18fbbfcc5 - -PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/icecast/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ICECAST,icecast,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 " \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-rpath \ - --with-gnu-ld \ - --enable-yp \ - --with-curl="yes" \ - --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \ - --with-ogg="$(STAGING_DIR)/usr" \ - --with-speex="no" \ - --with-theora="no" \ - --with-vorbis="$(STAGING_DIR)/usr" \ - --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_ICECAST): - install -d -m0755 $(IDIR_ICECAST)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(IDIR_ICECAST)/etc/ - install -d -m0755 $(IDIR_ICECAST)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/icecast $(IDIR_ICECAST)/usr/bin/ - install -d -m0755 $(IDIR_ICECAST)/usr/share/icecast - $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(IDIR_ICECAST)/usr/share/icecast/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/web $(IDIR_ICECAST)/usr/share/icecast/ - $(RSTRIP) $(IDIR_ICECAST) - $(IPKG_BUILD) $(IDIR_ICECAST) $(PACKAGE_DIR) diff --git a/openwrt/package/icecast/ipkg/icecast.conffiles b/openwrt/package/icecast/ipkg/icecast.conffiles deleted file mode 100644 index 1203e9dc44e..00000000000 --- a/openwrt/package/icecast/ipkg/icecast.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/icecast.xml diff --git a/openwrt/package/icecast/ipkg/icecast.control b/openwrt/package/icecast/ipkg/icecast.control deleted file mode 100644 index 4df9d507f51..00000000000 --- a/openwrt/package/icecast/ipkg/icecast.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: icecast -Priority: optional -Section: net -Depends: libcurl, libvorbisidec, libpthread, libxml2, libxslt -Description: A streaming media server diff --git a/openwrt/package/icecast/patches/01-icecast-2.3.0-tremor.patch b/openwrt/package/icecast/patches/01-icecast-2.3.0-tremor.patch deleted file mode 100644 index ed170846ffc..00000000000 --- a/openwrt/package/icecast/patches/01-icecast-2.3.0-tremor.patch +++ /dev/null @@ -1,153 +0,0 @@ -diff -rNu icecast-2.3.0.old/configure icecast-2.3.0.new/configure ---- icecast-2.3.0.old/configure 2005-09-24 07:18:46.000000000 +1000 -+++ icecast-2.3.0.new/configure 2005-10-07 22:08:29.000000000 +1000 -@@ -21967,7 +21967,7 @@ - if test "${xt_cv_lib_ogg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- OGG_LIBS="-logg" -+ OGG_LIBS="-lvorbisidec" - - # - # check if the installed Ogg is sufficiently new. -@@ -22033,7 +22033,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include -+#include - int - main () - { -@@ -22188,9 +22188,9 @@ - - fi - --VORBIS_LIBS="-lvorbis" --VORBISFILE_LIBS="-lvorbisfile" --VORBISENC_LIBS="-lvorbisenc" -+VORBIS_LIBS="-lvorbisidec" -+VORBISFILE_LIBS="-lvorbisidec" -+VORBISENC_LIBS="-lvorbisidec" - - xt_save_LIBS="$LIBS" - xt_save_LDFLAGS="$LDFLAGS" -@@ -22327,17 +22327,18 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - --#include --#include -+#include - - - int - main () - { -+/* - if ((struct ovectl_ratemanage_arg *) 0) - return 0; - if (sizeof (struct ovectl_ratemanage_arg)) - return 0; -+*/ - ; - return 0; - } -diff -rNu icecast-2.3.0.old/src/format_flac.c icecast-2.3.0.new/src/format_flac.c ---- icecast-2.3.0.old/src/format_flac.c 2005-08-19 12:01:58.000000000 +1000 -+++ icecast-2.3.0.new/src/format_flac.c 2005-10-07 22:10:24.000000000 +1000 -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; -diff -rNu icecast-2.3.0.old/src/format_midi.c icecast-2.3.0.new/src/format_midi.c ---- icecast-2.3.0.old/src/format_midi.c 2005-08-19 12:01:58.000000000 +1000 -+++ icecast-2.3.0.new/src/format_midi.c 2005-10-07 22:10:12.000000000 +1000 -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; -diff -rNu icecast-2.3.0.old/src/format_ogg.c icecast-2.3.0.new/src/format_ogg.c ---- icecast-2.3.0.old/src/format_ogg.c 2005-08-19 12:01:58.000000000 +1000 -+++ icecast-2.3.0.new/src/format_ogg.c 2005-10-07 22:10:02.000000000 +1000 -@@ -24,7 +24,7 @@ - #include - #include - --#include -+#include - - #include "refbuf.h" - #include "source.h" -diff -rNu icecast-2.3.0.old/src/format_ogg.h icecast-2.3.0.new/src/format_ogg.h ---- icecast-2.3.0.old/src/format_ogg.h 2005-08-19 12:01:58.000000000 +1000 -+++ icecast-2.3.0.new/src/format_ogg.h 2005-10-07 22:09:51.000000000 +1000 -@@ -18,7 +18,7 @@ - #ifndef __FORMAT_OGG_H__ - #define __FORMAT_OGG_H__ - --#include -+#include - #include "refbuf.h" - #include "format.h" - -diff -rNu icecast-2.3.0.old/src/format_speex.c icecast-2.3.0.new/src/format_speex.c ---- icecast-2.3.0.old/src/format_speex.c 2005-08-19 12:01:58.000000000 +1000 -+++ icecast-2.3.0.new/src/format_speex.c 2005-10-07 22:09:44.000000000 +1000 -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; -diff -rNu icecast-2.3.0.old/src/format_theora.c icecast-2.3.0.new/src/format_theora.c ---- icecast-2.3.0.old/src/format_theora.c 2005-08-19 12:01:58.000000000 +1000 -+++ icecast-2.3.0.new/src/format_theora.c 2005-10-07 22:09:38.000000000 +1000 -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; -diff -rNu icecast-2.3.0.old/src/format_vorbis.c icecast-2.3.0.new/src/format_vorbis.c ---- icecast-2.3.0.old/src/format_vorbis.c 2005-08-19 12:01:58.000000000 +1000 -+++ icecast-2.3.0.new/src/format_vorbis.c 2005-10-07 22:09:29.000000000 +1000 -@@ -18,8 +18,8 @@ - #endif - - #include --#include --#include -+#include -+#include - #include - #include - -diff -rNu icecast-2.3.0.old/src/source.c icecast-2.3.0.new/src/source.c ---- icecast-2.3.0.old/src/source.c 2005-09-23 06:19:28.000000000 +1000 -+++ icecast-2.3.0.new/src/source.c 2005-10-07 22:09:17.000000000 +1000 -@@ -19,7 +19,7 @@ - #include - #include - #include --#include -+#include - #include - - #ifndef _WIN32 diff --git a/openwrt/package/icecast/patches/icecast-2.3.0-curl_config.patch b/openwrt/package/icecast/patches/icecast-2.3.0-curl_config.patch deleted file mode 100644 index eb9f46f2a1e..00000000000 --- a/openwrt/package/icecast/patches/icecast-2.3.0-curl_config.patch +++ /dev/null @@ -1,27127 +0,0 @@ -diff -ruN icecast-2.3.0-old/aclocal.m4 icecast-2.3.0-new/aclocal.m4 ---- icecast-2.3.0-old/aclocal.m4 2005-09-23 23:18:41.000000000 +0200 -+++ icecast-2.3.0-new/aclocal.m4 2005-10-02 13:02:52.000000000 +0200 -@@ -871,63 +871,13 @@ - ] - ) - --# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -+# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- - --# serial 47 AC_PROG_LIBTOOL -+# serial 46 AC_PROG_LIBTOOL -+# Debian $Rev$ - -- --# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) --# ----------------------------------------------------------- --# If this macro is not defined by Autoconf, define it here. --m4_ifdef([AC_PROVIDE_IFELSE], -- [], -- [m4_define([AC_PROVIDE_IFELSE], -- [m4_ifdef([AC_PROVIDE_$1], -- [$2], [$3])])]) -- -- --# AC_PROG_LIBTOOL --# --------------- - AC_DEFUN([AC_PROG_LIBTOOL], --[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl --dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX --dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. -- AC_PROVIDE_IFELSE([AC_PROG_CXX], -- [AC_LIBTOOL_CXX], -- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX -- ])]) --dnl And a similar setup for Fortran 77 support -- AC_PROVIDE_IFELSE([AC_PROG_F77], -- [AC_LIBTOOL_F77], -- [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 --])]) -- --dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. --dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run --dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. -- AC_PROVIDE_IFELSE([AC_PROG_GCJ], -- [AC_LIBTOOL_GCJ], -- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], -- [AC_LIBTOOL_GCJ], -- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], -- [AC_LIBTOOL_GCJ], -- [ifdef([AC_PROG_GCJ], -- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) -- ifdef([A][M_PROG_GCJ], -- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) -- ifdef([LT_AC_PROG_GCJ], -- [define([LT_AC_PROG_GCJ], -- defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) --])])# AC_PROG_LIBTOOL -- -- --# _AC_PROG_LIBTOOL --# ---------------- --AC_DEFUN([_AC_PROG_LIBTOOL], - [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl --AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl --AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl --AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - - # This can be used to rebuild libtool when needed - LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" -@@ -938,13 +888,10 @@ - - # Prevent multiple expansion - define([AC_PROG_LIBTOOL], []) --])# _AC_PROG_LIBTOOL -- -+]) - --# AC_LIBTOOL_SETUP --# ---------------- - AC_DEFUN([AC_LIBTOOL_SETUP], --[AC_PREREQ(2.50)dnl -+[AC_PREREQ(2.13)dnl - AC_REQUIRE([AC_ENABLE_SHARED])dnl - AC_REQUIRE([AC_ENABLE_STATIC])dnl - AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -@@ -954,294 +901,410 @@ - AC_REQUIRE([AC_PROG_LD])dnl - AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl - AC_REQUIRE([AC_PROG_NM])dnl -+AC_REQUIRE([LT_AC_PROG_SED])dnl - - AC_REQUIRE([AC_PROG_LN_S])dnl - AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl --# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - AC_REQUIRE([AC_OBJEXT])dnl - AC_REQUIRE([AC_EXEEXT])dnl - dnl - --AC_LIBTOOL_SYS_MAX_CMD_LEN --AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE --AC_LIBTOOL_OBJDIR -- --AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - _LT_AC_PROG_ECHO_BACKSLASH -- --case $host_os in --aix3*) -- # AIX sometimes has problems with the GCC collect2 program. For some -- # reason, if we set the COLLECT_NAMES environment variable, the problems -- # vanish in a puff of smoke. -- if test "X${COLLECT_NAMES+set}" != Xset; then -- COLLECT_NAMES= -- export COLLECT_NAMES -+# Only perform the check for file, if the check method requires it -+case $deplibs_check_method in -+file_magic*) -+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then -+ AC_PATH_MAGIC - fi - ;; - esac - --# Sed substitution that helps us do robust quoting. It backslashifies --# metacharacters that are still active within double-quoted strings. --Xsed='sed -e 1s/^X//' --[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] -- --# Same as above, but do not quote variable references. --[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] -- --# Sed substitution to delay expansion of an escaped shell variable in a --# double_quote_subst'ed string. --delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -- --# Sed substitution to avoid accidental globbing in evaled expressions --no_glob_subst='s/\*/\\\*/g' -- --# Constants: --rm="rm -f" -- --# Global variables: --default_ofile=libtool --can_build_shared=yes -- --# All known linkers require a `.a' archive for static linking (except MSVC, --# which needs '.lib'). --libext=a --ltmain="$ac_aux_dir/ltmain.sh" --ofile="$default_ofile" --with_gnu_ld="$lt_cv_prog_gnu_ld" -- --AC_CHECK_TOOL(AR, ar, false) - AC_CHECK_TOOL(RANLIB, ranlib, :) - AC_CHECK_TOOL(STRIP, strip, :) - --old_CC="$CC" --old_CFLAGS="$CFLAGS" -+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -+enable_win32_dll=yes, enable_win32_dll=no) - --# Set sane defaults for various variables --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru --test -z "$AS" && AS=as --test -z "$CC" && CC=cc --test -z "$LTCC" && LTCC=$CC --test -z "$DLLTOOL" && DLLTOOL=dlltool --test -z "$LD" && LD=ld --test -z "$LN_S" && LN_S="ln -s" --test -z "$MAGIC_CMD" && MAGIC_CMD=file --test -z "$NM" && NM=nm --test -z "$SED" && SED=sed --test -z "$OBJDUMP" && OBJDUMP=objdump --test -z "$RANLIB" && RANLIB=: --test -z "$STRIP" && STRIP=: --test -z "$ac_objext" && ac_objext=o -+AC_ARG_ENABLE(libtool-lock, -+ [ --disable-libtool-lock avoid locking (might break parallel builds)]) -+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - --# Determine commands to create old-style static archives. --old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' --old_postinstall_cmds='chmod 644 $oldlib' --old_postuninstall_cmds= -+# Some flags need to be propagated to the compiler or linker for good -+# libtool support. -+case $host in -+*-*-irix6*) -+ # Find out which ABI we are using. -+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext -+ if AC_TRY_EVAL(ac_compile); then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *32-bit*) -+ LD="${LD-ld} -32" -+ ;; -+ *N32*) -+ LD="${LD-ld} -n32" -+ ;; -+ *64-bit*) -+ LD="${LD-ld} -64" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; - --if test -n "$RANLIB"; then -- case $host_os in -- openbsd*) -- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" -- ;; -- *) -- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -- ;; -- esac -- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" --fi -+*-*-sco3.2v5*) -+ # On SCO OpenServer 5, we need -belf to get full-featured binaries. -+ SAVE_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -belf" -+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, -+ [AC_LANG_SAVE -+ AC_LANG_C -+ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) -+ AC_LANG_RESTORE]) -+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then -+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -+ CFLAGS="$SAVE_CFLAGS" -+ fi -+ ;; - --_LT_CC_BASENAME([$compiler]) -+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -+[*-*-cygwin* | *-*-mingw* | *-*-pw32*) -+ AC_CHECK_TOOL(DLLTOOL, dlltool, false) -+ AC_CHECK_TOOL(AS, as, false) -+ AC_CHECK_TOOL(OBJDUMP, objdump, false) - --# Only perform the check for file, if the check method requires it --case $deplibs_check_method in --file_magic*) -- if test "$file_magic_cmd" = '$MAGIC_CMD'; then -- AC_PATH_MAGIC -- fi -+ # recent cygwin and mingw systems supply a stub DllMain which the user -+ # can override, but on older systems we have to supply one -+ AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, -+ [AC_TRY_LINK([], -+ [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); -+ DllMain (0, 0, 0);], -+ [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) -+ -+ case $host/$CC in -+ *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) -+ # old mingw systems require "-dll" to link a DLL, while more recent ones -+ # require "-mdll" -+ SAVE_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -mdll" -+ AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, -+ [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) -+ CFLAGS="$SAVE_CFLAGS" ;; -+ *-*-cygwin* | *-*-pw32*) -+ # cygwin systems need to pass --dll to the linker, and not link -+ # crt.o which will require a WinMain@16 definition. -+ lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; -+ esac - ;; -+ ]) - esac - --AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) --AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], --enable_win32_dll=yes, enable_win32_dll=no) -- --AC_ARG_ENABLE([libtool-lock], -- [AC_HELP_STRING([--disable-libtool-lock], -- [avoid locking (might break parallel builds)])]) --test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -+_LT_AC_LTCONFIG_HACK - --AC_ARG_WITH([pic], -- [AC_HELP_STRING([--with-pic], -- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], -- [pic_mode="$withval"], -- [pic_mode=default]) --test -z "$pic_mode" && pic_mode=default -+]) - --# Use C for the default configuration in the libtool script --tagname= --AC_LIBTOOL_LANG_C_CONFIG --_LT_AC_TAGCONFIG --])# AC_LIBTOOL_SETUP -+# AC_LIBTOOL_HEADER_ASSERT -+# ------------------------ -+AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], -+[AC_CACHE_CHECK([whether $CC supports assert without backlinking], -+ [lt_cv_func_assert_works], -+ [case $host in -+ *-*-solaris*) -+ if test "$GCC" = yes && test "$with_gnu_ld" != yes; then -+ case `$CC --version 2>/dev/null` in -+ [[12]].*) lt_cv_func_assert_works=no ;; -+ *) lt_cv_func_assert_works=yes ;; -+ esac -+ fi -+ ;; -+ esac]) - -+if test "x$lt_cv_func_assert_works" = xyes; then -+ AC_CHECK_HEADERS(assert.h) -+fi -+])# AC_LIBTOOL_HEADER_ASSERT - --# _LT_AC_SYS_COMPILER --# ------------------- --AC_DEFUN([_LT_AC_SYS_COMPILER], --[AC_REQUIRE([AC_PROG_CC])dnl -+# _LT_AC_CHECK_DLFCN -+# -------------------- -+AC_DEFUN([_LT_AC_CHECK_DLFCN], -+[AC_CHECK_HEADERS(dlfcn.h) -+])# _LT_AC_CHECK_DLFCN - --# If no C compiler was specified, use CC. --LTCC=${LTCC-"$CC"} -+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -+# --------------------------------- -+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -+[AC_REQUIRE([AC_CANONICAL_HOST]) -+AC_REQUIRE([AC_PROG_NM]) -+AC_REQUIRE([AC_OBJEXT]) -+# Check for command to grab the raw symbol name followed by C symbol from nm. -+AC_MSG_CHECKING([command to parse $NM output]) -+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl - --# Allow CC to be a program name with arguments. --compiler=$CC --])# _LT_AC_SYS_COMPILER -+# These are sane defaults that work on at least a few old systems. -+# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -+# Character class describing NM global symbol codes. -+symcode='[[BCDEGRST]]' - --# _LT_CC_BASENAME(CC) --# ------------------- --# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. --AC_DEFUN([_LT_CC_BASENAME], --[for cc_temp in $1""; do -- case $cc_temp in -- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; -- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` --]) -+# Regexp to match symbols that can be accessed directly from C. -+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -+# Transform the above into a raw symbol and a C symbol. -+symxfrm='\1 \2\3 \3' - --# _LT_COMPILER_BOILERPLATE --# ------------------------ --# Check for compiler boilerplate output or warnings with --# the simple compiler test code. --AC_DEFUN([_LT_COMPILER_BOILERPLATE], --[ac_outfile=conftest.$ac_objext --printf "$lt_simple_compile_test_code" >conftest.$ac_ext --eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_compiler_boilerplate=`cat conftest.err` --$rm conftest* --])# _LT_COMPILER_BOILERPLATE -- -- --# _LT_LINKER_BOILERPLATE --# ---------------------- --# Check for linker boilerplate output or warnings with --# the simple link test code. --AC_DEFUN([_LT_LINKER_BOILERPLATE], --[ac_outfile=conftest.$ac_objext --printf "$lt_simple_link_test_code" >conftest.$ac_ext --eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_linker_boilerplate=`cat conftest.err` --$rm conftest* --])# _LT_LINKER_BOILERPLATE -- -- --# _LT_AC_SYS_LIBPATH_AIX --# ---------------------- --# Links a minimal program and checks the executable --# for the system default hardcoded library path. In most cases, --# this is /usr/lib:/lib, but when the MPI compilers are used --# the location of the communication and MPI libs are included too. --# If we don't find anything, use the default library path according --# to the aix ld manual. --AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], --[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi],[]) --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi --])# _LT_AC_SYS_LIBPATH_AIX -- -- --# _LT_AC_SHELL_INIT(ARG) --# ---------------------- --AC_DEFUN([_LT_AC_SHELL_INIT], --[ifdef([AC_DIVERSION_NOTICE], -- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], -- [AC_DIVERT_PUSH(NOTICE)]) --$1 --AC_DIVERT_POP --])# _LT_AC_SHELL_INIT -+# Transform an extracted symbol line into a proper C declaration -+lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" - -+# Transform an extracted symbol line into symbol name and symbol address -+lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - --# _LT_AC_PROG_ECHO_BACKSLASH --# -------------------------- --# Add some code to the start of the generated configure script which --# will find an echo command which doesn't interpret backslashes. --AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], --[_LT_AC_SHELL_INIT([ --# Check that we are running under the correct shell. --SHELL=${CONFIG_SHELL-/bin/sh} -+# Define system-specific variables. -+case $host_os in -+aix*) -+ symcode='[[BCDT]]' -+ ;; -+cygwin* | mingw* | pw32*) -+ symcode='[[ABCDGISTW]]' -+ ;; -+hpux*) # Its linker distinguishes data from code symbols -+ lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -+ lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ ;; -+irix* | nonstopux*) -+ symcode='[[BCDEGRST]]' -+ ;; -+osf*) -+ symcode='[[BCDEGQRST]]' -+ ;; -+solaris* | sysv5*) -+ symcode='[[BDT]]' -+ ;; -+sysv4) -+ symcode='[[DFNSTU]]' -+ ;; -+esac - --case X$ECHO in --X*--fallback-echo) -- # Remove one level of quotation (which was required for Make). -- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` -+# Handle CRLF in mingw tool chain -+opt_cr= -+case $host_os in -+mingw*) -+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; - esac - --echo=${ECHO-echo} --if test "X[$]1" = X--no-reexec; then -- # Discard the --no-reexec flag, and continue. -- shift --elif test "X[$]1" = X--fallback-echo; then -- # Avoid inline document here, it may be left over -- : --elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then -- # Yippee, $echo works! -- : --else -- # Restart under the correct shell. -- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -+# If we're using GNU nm, then use its standard symbol codes. -+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then -+ symcode='[[ABCDGISTW]]' - fi - --if test "X[$]1" = X--fallback-echo; then -- # used as fallback echo -- shift -- cat </dev/null 2>&1 && unset CDPATH -+ # Write the raw and C identifiers. -+lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" - --if test -z "$ECHO"; then --if test "X${echo_test_string+set}" != Xset; then --# find a string as large as possible, as long as the shell can cope with it -- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do -- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... -- if (echo_test_string=`eval $cmd`) 2>/dev/null && -- echo_test_string=`eval $cmd` && -- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null -- then -- break -- fi -- done --fi -+ # Check to see that the pipe works correctly. -+ pipe_works=no -+ rm -f conftest* -+ cat > conftest.$ac_ext </dev/null`" = 'X\t' && -- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && -- test "X$echo_testing_string" = "X$echo_test_string"; then -- : --else -- # The Solaris, AIX, and Digital Unix default echo programs unquote -- # backslashes. This makes it impossible to quote backslashes using -- # echo "$something" | sed 's/\\/\\\\/g' -- # -+ if AC_TRY_EVAL(ac_compile); then -+ # Now try to grab the symbols. -+ nlist=conftest.nm -+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then -+ # Try sorting and uniquifying the output. -+ if sort "$nlist" | uniq > "$nlist"T; then -+ mv -f "$nlist"T "$nlist" -+ else -+ rm -f "$nlist"T -+ fi -+ -+ # Make sure that we snagged all the symbols we need. -+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then -+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then -+ cat < conftest.$ac_ext -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+EOF -+ # Now generate the symbol file. -+ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' -+ -+ cat <> conftest.$ac_ext -+#if defined (__STDC__) && __STDC__ -+# define lt_ptr void * -+#else -+# define lt_ptr char * -+# define const -+#endif -+ -+/* The mapping between symbol names and symbols. */ -+const struct { -+ const char *name; -+ lt_ptr address; -+} -+lt_preloaded_symbols[[]] = -+{ -+EOF -+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext -+ cat <<\EOF >> conftest.$ac_ext -+ {0, (lt_ptr) 0} -+}; -+ -+#ifdef __cplusplus -+} -+#endif -+EOF -+ # Now try linking the two files. -+ mv conftest.$ac_objext conftstm.$ac_objext -+ save_LIBS="$LIBS" -+ save_CFLAGS="$CFLAGS" -+ LIBS="conftstm.$ac_objext" -+ CFLAGS="$CFLAGS$no_builtin_flag" -+ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then -+ pipe_works=yes -+ fi -+ LIBS="$save_LIBS" -+ CFLAGS="$save_CFLAGS" -+ else -+ echo "cannot find nm_test_func in $nlist" >&AC_FD_CC -+ fi -+ else -+ echo "cannot find nm_test_var in $nlist" >&AC_FD_CC -+ fi -+ else -+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC -+ fi -+ else -+ echo "$progname: failed program was:" >&AC_FD_CC -+ cat conftest.$ac_ext >&5 -+ fi -+ rm -f conftest* conftst* -+ -+ # Do not use the global_symbol_pipe unless it works. -+ if test "$pipe_works" = yes; then -+ break -+ else -+ lt_cv_sys_global_symbol_pipe= -+ fi -+done -+]) -+global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" -+if test -z "$lt_cv_sys_global_symbol_pipe"; then -+ global_symbol_to_cdecl= -+ global_symbol_to_c_name_address= -+else -+ global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" -+ global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" -+fi -+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; -+then -+ AC_MSG_RESULT(failed) -+else -+ AC_MSG_RESULT(ok) -+fi -+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -+ -+# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR -+# --------------------------------- -+AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], -+[# Find the correct PATH separator. Usually this is `:', but -+# DJGPP uses `;' like DOS. -+if test "X${PATH_SEPARATOR+set}" != Xset; then -+ UNAME=${UNAME-`uname 2>/dev/null`} -+ case X$UNAME in -+ *-DOS) lt_cv_sys_path_separator=';' ;; -+ *) lt_cv_sys_path_separator=':' ;; -+ esac -+ PATH_SEPARATOR=$lt_cv_sys_path_separator -+fi -+])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR -+ -+# _LT_AC_PROG_ECHO_BACKSLASH -+# -------------------------- -+# Add some code to the start of the generated configure script which -+# will find an echo command which doesn't interpret backslashes. -+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -+[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], -+ [AC_DIVERT_PUSH(NOTICE)]) -+_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR -+ -+# Check that we are running under the correct shell. -+SHELL=${CONFIG_SHELL-/bin/sh} -+ -+case X$ECHO in -+X*--fallback-echo) -+ # Remove one level of quotation (which was required for Make). -+ ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` -+ ;; -+esac -+ -+echo=${ECHO-echo} -+if test "X[$]1" = X--no-reexec; then -+ # Discard the --no-reexec flag, and continue. -+ shift -+elif test "X[$]1" = X--fallback-echo; then -+ # Avoid inline document here, it may be left over -+ : -+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then -+ # Yippee, $echo works! -+ : -+else -+ # Restart under the correct shell. -+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -+fi -+ -+if test "X[$]1" = X--fallback-echo; then -+ # used as fallback echo -+ shift -+ cat </dev/null && -+ echo_test_string="`eval $cmd`" && -+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null -+ then -+ break -+ fi -+ done -+fi -+ -+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ : -+else -+ # The Solaris, AIX, and Digital Unix default echo programs unquote -+ # backslashes. This makes it impossible to quote backslashes using -+ # echo "$something" | sed 's/\\/\\\\/g' -+ # - # So, first we look for a working echo in the user's PATH. - -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do -- IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && -@@ -1250,7 +1313,7 @@ - break - fi - done -- IFS="$lt_save_ifs" -+ IFS="$save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. -@@ -1323,353 +1386,38 @@ - fi - - AC_SUBST(ECHO) --])])# _LT_AC_PROG_ECHO_BACKSLASH -- -- --# _LT_AC_LOCK --# ----------- --AC_DEFUN([_LT_AC_LOCK], --[AC_ARG_ENABLE([libtool-lock], -- [AC_HELP_STRING([--disable-libtool-lock], -- [avoid locking (might break parallel builds)])]) --test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -- --# Some flags need to be propagated to the compiler or linker for good --# libtool support. --case $host in --ia64-*-hpux*) -- # Find out which ABI we are using. -- echo 'int i;' > conftest.$ac_ext -- if AC_TRY_EVAL(ac_compile); then -- case `/usr/bin/file conftest.$ac_objext` in -- *ELF-32*) -- HPUX_IA64_MODE="32" -- ;; -- *ELF-64*) -- HPUX_IA64_MODE="64" -- ;; -- esac -- fi -- rm -rf conftest* -- ;; --*-*-irix6*) -- # Find out which ABI we are using. -- echo '[#]line __oline__ "configure"' > conftest.$ac_ext -- if AC_TRY_EVAL(ac_compile); then -- if test "$lt_cv_prog_gnu_ld" = yes; then -- case `/usr/bin/file conftest.$ac_objext` in -- *32-bit*) -- LD="${LD-ld} -melf32bsmip" -- ;; -- *N32*) -- LD="${LD-ld} -melf32bmipn32" -- ;; -- *64-bit*) -- LD="${LD-ld} -melf64bmip" -- ;; -- esac -- else -- case `/usr/bin/file conftest.$ac_objext` in -- *32-bit*) -- LD="${LD-ld} -32" -- ;; -- *N32*) -- LD="${LD-ld} -n32" -- ;; -- *64-bit*) -- LD="${LD-ld} -64" -- ;; -- esac -- fi -- fi -- rm -rf conftest* -- ;; -- --x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) -- # Find out which ABI we are using. -- echo 'int i;' > conftest.$ac_ext -- if AC_TRY_EVAL(ac_compile); then -- case `/usr/bin/file conftest.o` in -- *32-bit*) -- case $host in -- x86_64-*linux*) -- LD="${LD-ld} -m elf_i386" -- ;; -- ppc64-*linux*|powerpc64-*linux*) -- LD="${LD-ld} -m elf32ppclinux" -- ;; -- s390x-*linux*) -- LD="${LD-ld} -m elf_s390" -- ;; -- sparc64-*linux*) -- LD="${LD-ld} -m elf32_sparc" -- ;; -- esac -- ;; -- *64-bit*) -- case $host in -- x86_64-*linux*) -- LD="${LD-ld} -m elf_x86_64" -- ;; -- ppc*-*linux*|powerpc*-*linux*) -- LD="${LD-ld} -m elf64ppc" -- ;; -- s390*-*linux*) -- LD="${LD-ld} -m elf64_s390" -- ;; -- sparc*-*linux*) -- LD="${LD-ld} -m elf64_sparc" -- ;; -- esac -- ;; -- esac -- fi -- rm -rf conftest* -- ;; -- --*-*-sco3.2v5*) -- # On SCO OpenServer 5, we need -belf to get full-featured binaries. -- SAVE_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS -belf" -- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, -- [AC_LANG_PUSH(C) -- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) -- AC_LANG_POP]) -- if test x"$lt_cv_cc_needs_belf" != x"yes"; then -- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -- CFLAGS="$SAVE_CFLAGS" -- fi -- ;; --AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], --[*-*-cygwin* | *-*-mingw* | *-*-pw32*) -- AC_CHECK_TOOL(DLLTOOL, dlltool, false) -- AC_CHECK_TOOL(AS, as, false) -- AC_CHECK_TOOL(OBJDUMP, objdump, false) -- ;; -- ]) --esac -- --need_locks="$enable_libtool_lock" -- --])# _LT_AC_LOCK -- -- --# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, --# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) --# ---------------------------------------------------------------- --# Check whether the given compiler option works --AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], --[AC_REQUIRE([LT_AC_PROG_SED]) --AC_CACHE_CHECK([$1], [$2], -- [$2=no -- ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="$3" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- # The option is referenced via a variable to avoid confusing sed. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) -- (eval "$lt_compile" 2>conftest.err) -- ac_status=$? -- cat conftest.err >&AS_MESSAGE_LOG_FD -- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD -- if (exit $ac_status) && test -s "$ac_outfile"; then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings other than the usual output. -- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then -- $2=yes -- fi -- fi -- $rm conftest* --]) -+AC_DIVERT_POP -+])# _LT_AC_PROG_ECHO_BACKSLASH - --if test x"[$]$2" = xyes; then -- ifelse([$5], , :, [$5]) -+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -+# ------------------------------------------------------------------ -+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -+[if test "$cross_compiling" = yes; then : -+ [$4] - else -- ifelse([$6], , :, [$6]) --fi --])# AC_LIBTOOL_COMPILER_OPTION -- -- --# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, --# [ACTION-SUCCESS], [ACTION-FAILURE]) --# ------------------------------------------------------------ --# Check whether the given compiler option works --AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], --[AC_CACHE_CHECK([$1], [$2], -- [$2=no -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS $3" -- printf "$lt_simple_link_test_code" > conftest.$ac_ext -- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then -- # The linker can only warn and ignore the option if not recognized -- # So say no if there are warnings -- if test -s conftest.err; then -- # Append any errors to the config.log. -- cat conftest.err 1>&AS_MESSAGE_LOG_FD -- $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if diff conftest.exp conftest.er2 >/dev/null; then -- $2=yes -- fi -- else -- $2=yes -- fi -- fi -- $rm conftest* -- LDFLAGS="$save_LDFLAGS" --]) -+ AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -+ lt_status=$lt_dlunknown -+ cat > conftest.$ac_ext < -+#endif - -+#include - --# AC_LIBTOOL_SYS_MAX_CMD_LEN --# -------------------------- --AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], --[# find the maximum length of command line arguments --AC_MSG_CHECKING([the maximum length of command line arguments]) --AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl -- i=0 -- teststring="ABCD" -- -- case $build_os in -- msdosdjgpp*) -- # On DJGPP, this test can blow up pretty badly due to problems in libc -- # (any single argument exceeding 2000 bytes causes a buffer overrun -- # during glob expansion). Even if it were fixed, the result of this -- # check would be larger than it should be. -- lt_cv_sys_max_cmd_len=12288; # 12K is about right -- ;; -- -- gnu*) -- # Under GNU Hurd, this test is not required because there is -- # no limit to the length of command line arguments. -- # Libtool will interpret -1 as no limit whatsoever -- lt_cv_sys_max_cmd_len=-1; -- ;; -- -- cygwin* | mingw*) -- # On Win9x/ME, this test blows up -- it succeeds, but takes -- # about 5 minutes as the teststring grows exponentially. -- # Worse, since 9x/ME are not pre-emptively multitasking, -- # you end up with a "frozen" computer, even though with patience -- # the test eventually succeeds (with a max line length of 256k). -- # Instead, let's just punt: use the minimum linelength reported by -- # all of the supported platforms: 8192 (on NT/2K/XP). -- lt_cv_sys_max_cmd_len=8192; -- ;; -- -- amigaos*) -- # On AmigaOS with pdksh, this test takes hours, literally. -- # So we just punt and use a minimum line length of 8192. -- lt_cv_sys_max_cmd_len=8192; -- ;; -- -- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) -- # This has been around since 386BSD, at least. Likely further. -- if test -x /sbin/sysctl; then -- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` -- elif test -x /usr/sbin/sysctl; then -- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` -- else -- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs -- fi -- # And add a safety zone -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` -- ;; -- osf*) -- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure -- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not -- # nice to cause kernel panics so lets avoid the loop below. -- # First set a reasonable default. -- lt_cv_sys_max_cmd_len=16384 -- # -- if test -x /sbin/sysconfig; then -- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in -- *1*) lt_cv_sys_max_cmd_len=-1 ;; -- esac -- fi -- ;; -- *) -- # If test is not a shell built-in, we'll probably end up computing a -- # maximum length that is only half of the actual maximum length, but -- # we can't tell. -- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} -- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ -- = "XX$teststring") >/dev/null 2>&1 && -- new_result=`expr "X$teststring" : ".*" 2>&1` && -- lt_cv_sys_max_cmd_len=$new_result && -- test $i != 17 # 1/2 MB should be enough -- do -- i=`expr $i + 1` -- teststring=$teststring$teststring -- done -- teststring= -- # Add a significant safety factor because C++ compilers can tack on massive -- # amounts of additional arguments before passing them to the linker. -- # It appears as though 1/2 is a usable value. -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` -- ;; -- esac --]) --if test -n $lt_cv_sys_max_cmd_len ; then -- AC_MSG_RESULT($lt_cv_sys_max_cmd_len) --else -- AC_MSG_RESULT(none) --fi --])# AC_LIBTOOL_SYS_MAX_CMD_LEN -- -- --# _LT_AC_CHECK_DLFCN --# -------------------- --AC_DEFUN([_LT_AC_CHECK_DLFCN], --[AC_CHECK_HEADERS(dlfcn.h)dnl --])# _LT_AC_CHECK_DLFCN -- -- --# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, --# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) --# ------------------------------------------------------------------ --AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], --[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl --if test "$cross_compiling" = yes; then : -- [$4] --else -- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -- lt_status=$lt_dlunknown -- cat > conftest.$ac_ext < --#endif -- --#include -- --#ifdef RTLD_GLOBAL --# define LT_DLGLOBAL RTLD_GLOBAL --#else --# ifdef DL_GLOBAL --# define LT_DLGLOBAL DL_GLOBAL --# else --# define LT_DLGLOBAL 0 --# endif --#endif -+#ifdef RTLD_GLOBAL -+# define LT_DLGLOBAL RTLD_GLOBAL -+#else -+# ifdef DL_GLOBAL -+# define LT_DLGLOBAL DL_GLOBAL -+# else -+# define LT_DLGLOBAL 0 -+# endif -+#endif - - /* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -@@ -1714,7 +1462,7 @@ - }] - EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then -- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null -+ (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; -@@ -1729,12 +1477,10 @@ - rm -fr conftest* - ])# _LT_AC_TRY_DLOPEN_SELF - -- - # AC_LIBTOOL_DLOPEN_SELF - # ------------------- - AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], --[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl --if test "x$enable_dlopen" != xyes; then -+[if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -@@ -1749,39 +1495,24 @@ - lt_cv_dlopen_self=yes - ;; - -- mingw* | pw32*) -+ cygwin* | mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - -- cygwin*) -- lt_cv_dlopen="dlopen" -- lt_cv_dlopen_libs= -- ;; -- -- darwin*) -- # if libdl is installed we need to link against it -- AC_CHECK_LIB([dl], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ -- lt_cv_dlopen="dyld" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- ]) -- ;; -- - *) - AC_CHECK_FUNC([shl_load], -- [lt_cv_dlopen="shl_load"], -+ [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], -- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], -+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], -+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], -+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], -- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) -+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) -@@ -1799,6 +1530,7 @@ - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" -+ AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" -@@ -1842,1833 +1574,707 @@ - fi - ])# AC_LIBTOOL_DLOPEN_SELF - -+AC_DEFUN([_LT_AC_LTCONFIG_HACK], -+[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl -+# Sed substitution that helps us do robust quoting. It backslashifies -+# metacharacters that are still active within double-quoted strings. -+Xsed='sed -e s/^X//' -+sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' - --# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) --# --------------------------------- --# Check to see if options -c and -o are simultaneously supported by compiler --AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], --[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl --AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], -- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], -- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no -- $rm -r conftest 2>/dev/null -- mkdir conftest -- cd conftest -- mkdir out -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- lt_compiler_flag="-o out/conftest2.$ac_objext" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) -- (eval "$lt_compile" 2>out/conftest.err) -- ac_status=$? -- cat out/conftest.err >&AS_MESSAGE_LOG_FD -- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD -- if (exit $ac_status) && test -s out/conftest2.$ac_objext -- then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings -- $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp -- $SED '/^$/d' out/conftest.err >out/conftest.er2 -- if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then -- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes -- fi -- fi -- chmod u+w . 2>&AS_MESSAGE_LOG_FD -- $rm conftest* -- # SGI C++ compiler will create directory out/ii_files/ for -- # template instantiation -- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files -- $rm out/* && rmdir out -- cd .. -- rmdir conftest -- $rm conftest* --]) --])# AC_LIBTOOL_PROG_CC_C_O -- -+# Same as above, but do not quote variable references. -+double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' - --# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) --# ----------------------------------------- --# Check to see if we can do hard links to lock some files if needed --AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], --[AC_REQUIRE([_LT_AC_LOCK])dnl -+# Sed substitution to delay expansion of an escaped shell variable in a -+# double_quote_subst'ed string. -+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - --hard_links="nottested" --if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then -- # do not overwrite the value of need_locks provided by the user -- AC_MSG_CHECKING([if we can lock with hard links]) -- hard_links=yes -- $rm conftest* -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- touch conftest.a -- ln conftest.a conftest.b 2>&5 || hard_links=no -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- AC_MSG_RESULT([$hard_links]) -- if test "$hard_links" = no; then -- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) -- need_locks=warn -- fi --else -- need_locks=no --fi --])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS -+# Constants: -+rm="rm -f" - -+# Global variables: -+default_ofile=libtool -+can_build_shared=yes - --# AC_LIBTOOL_OBJDIR --# ----------------- --AC_DEFUN([AC_LIBTOOL_OBJDIR], --[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], --[rm -f .libs 2>/dev/null --mkdir .libs 2>/dev/null --if test -d .libs; then -- lt_cv_objdir=.libs --else -- # MS-DOS does not allow filenames that begin with a dot. -- lt_cv_objdir=_libs --fi --rmdir .libs 2>/dev/null]) --objdir=$lt_cv_objdir --])# AC_LIBTOOL_OBJDIR -+# All known linkers require a `.a' archive for static linking (except M$VC, -+# which needs '.lib'). -+libext=a -+ltmain="$ac_aux_dir/ltmain.sh" -+ofile="$default_ofile" -+with_gnu_ld="$lt_cv_prog_gnu_ld" -+need_locks="$enable_libtool_lock" - -+old_CC="$CC" -+old_CFLAGS="$CFLAGS" - --# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) --# ---------------------------------------------- --# Check hardcoding attributes. --AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], --[AC_MSG_CHECKING([how to hardcode library paths into programs]) --_LT_AC_TAGVAR(hardcode_action, $1)= --if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ -- test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ -- test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then -+# Set sane defaults for various variables -+test -z "$AR" && AR=ar -+test -z "$AR_FLAGS" && AR_FLAGS=cru -+test -z "$AS" && AS=as -+test -z "$CC" && CC=cc -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+test -z "$LD" && LD=ld -+test -z "$LN_S" && LN_S="ln -s" -+test -z "$MAGIC_CMD" && MAGIC_CMD=file -+test -z "$NM" && NM=nm -+test -z "$OBJDUMP" && OBJDUMP=objdump -+test -z "$RANLIB" && RANLIB=: -+test -z "$STRIP" && STRIP=: -+test -z "$ac_objext" && ac_objext=o - -- # We can hardcode non-existant directories. -- if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && -- # If the only mechanism to avoid hardcoding is shlibpath_var, we -- # have to relink, otherwise we might link with an installed library -- # when we should be linking with a yet-to-be-installed one -- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && -- test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then -- # Linking always hardcodes the temporary library directory. -- _LT_AC_TAGVAR(hardcode_action, $1)=relink -- else -- # We can link without hardcoding, and we can hardcode nonexisting dirs. -- _LT_AC_TAGVAR(hardcode_action, $1)=immediate -- fi -+if test x"$host" != x"$build"; then -+ ac_tool_prefix=${host_alias}- - else -- # We cannot hardcode anything, or else we can only hardcode existing -- # directories. -- _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -+ ac_tool_prefix= - fi --AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - --if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then -- # Fast installation is not supported -- enable_fast_install=no --elif test "$shlibpath_overrides_runpath" = yes || -- test "$enable_shared" = no; then -- # Fast installation is not necessary -- enable_fast_install=needless --fi --])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH -+# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -+case $host_os in -+linux-gnu*) ;; -+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -+esac - -+case $host_os in -+aix3*) -+ # AIX sometimes has problems with the GCC collect2 program. For some -+ # reason, if we set the COLLECT_NAMES environment variable, the problems -+ # vanish in a puff of smoke. -+ if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+ fi -+ ;; -+esac - --# AC_LIBTOOL_SYS_LIB_STRIP --# ------------------------ --AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], --[striplib= --old_striplib= --AC_MSG_CHECKING([whether stripping libraries is possible]) --if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -- test -z "$striplib" && striplib="$STRIP --strip-unneeded" -- AC_MSG_RESULT([yes]) --else --# FIXME - insert some real tests, host_os isn't really good enough -+# Determine commands to create old-style static archives. -+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -+old_postinstall_cmds='chmod 644 $oldlib' -+old_postuninstall_cmds= -+ -+if test -n "$RANLIB"; then - case $host_os in -- darwin*) -- if test -n "$STRIP" ; then -- striplib="$STRIP -x" -- AC_MSG_RESULT([yes]) -- else -- AC_MSG_RESULT([no]) --fi -- ;; -- *) -- AC_MSG_RESULT([no]) -+ openbsd*) -+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" -+ ;; -+ *) -+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" - ;; - esac -+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" - fi --])# AC_LIBTOOL_SYS_LIB_STRIP - -+# Allow CC to be a program name with arguments. -+set dummy $CC -+compiler="[$]2" - --# AC_LIBTOOL_SYS_DYNAMIC_LINKER --# ----------------------------- --# PORTME Fill in your ld.so characteristics --AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], --[AC_MSG_CHECKING([dynamic linker characteristics]) --library_names_spec= --libname_spec='lib$name' --soname_spec= --shrext_cmds=".so" --postinstall_cmds= --postuninstall_cmds= --finish_cmds= --finish_eval= --shlibpath_var= --shlibpath_overrides_runpath=unknown --version_type=none --dynamic_linker="$host_os ld.so" --sys_lib_dlsearch_path_spec="/lib /usr/lib" --if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then -- # if the path contains ";" then we assume it to be the separator -- # otherwise default to the standard path separator (i.e. ":") - it is -- # assumed that no part of a normal pathname contains ";" but that should -- # okay in the real world where ";" in dirpaths is itself problematic. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi -+AC_MSG_CHECKING([for objdir]) -+rm -f .libs 2>/dev/null -+mkdir .libs 2>/dev/null -+if test -d .libs; then -+ objdir=.libs - else -- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+ # MS-DOS does not allow filenames that begin with a dot. -+ objdir=_libs - fi --need_lib_prefix=unknown --hardcode_into_libs=no -+rmdir .libs 2>/dev/null -+AC_MSG_RESULT($objdir) - --# when you set need_version to no, make sure it does not cause -set_version --# flags to be left without arguments --need_version=unknown - --case $host_os in --aix3*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' -- shlibpath_var=LIBPATH -+AC_ARG_WITH(pic, -+[ --with-pic try to use only PIC/non-PIC objects [default=use both]], -+pic_mode="$withval", pic_mode=default) -+test -z "$pic_mode" && pic_mode=default - -- # AIX 3 has no versioning support, so we append a major version to the name. -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -+# We assume here that the value for lt_cv_prog_cc_pic will not be cached -+# in isolation, and that seeing it set (from the cache) indicates that -+# the associated values are set (in the cache) correctly too. -+AC_MSG_CHECKING([for $compiler option to produce PIC]) -+AC_CACHE_VAL(lt_cv_prog_cc_pic, -+[ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_shlib= -+ lt_cv_prog_cc_wl= -+ lt_cv_prog_cc_static= -+ lt_cv_prog_cc_no_builtin= -+ lt_cv_prog_cc_can_build_shared=$can_build_shared - --aix4* | aix5*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- hardcode_into_libs=yes -- if test "$host_cpu" = ia64; then -- # AIX 5 supports IA64 -- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -+ if test "$GCC" = yes; then -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-static' -+ -+ case $host_os in -+ aix*) -+ # Below there is a dirty hack to force normal static linking with -ldl -+ # The problem is because libdl dynamically linked with both libc and -+ # libC (AIX C++ library), which obviously doesn't included in libraries -+ # list by gcc. This cause undefined symbols with -static flags. -+ # This hack allows C programs to be linked with "-static -ldl", but -+ # not sure about C++ programs. -+ lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" -+ ;; -+ amigaos*) -+ # FIXME: we need at least 68020 code to build shared libraries, but -+ # adding the `-m68020' flag to GCC prevents building anything better, -+ # like `-m68040'. -+ lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' -+ ;; -+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -+ # PIC is the default for these OSes. -+ ;; -+ darwin* | rhapsody*) -+ # PIC is the default on this platform -+ # Common symbols not allowed in MH_DYLIB files -+ lt_cv_prog_cc_pic='-fno-common' -+ ;; -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' -+ ;; -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ lt_cv_prog_cc_pic=-Kconform_pic -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic='-fPIC' -+ ;; -+ esac - else -- # With GCC up to 2.95.x, collect2 would create an import file -- # for dependence libraries. The import file would start with -- # the line `#! .'. This would cause the generated library to -- # depend on `.', always an invalid library. This was fixed in -- # development snapshots of GCC prior to 3.0. -+ # PORTME Check for PIC flags for the system compiler. - case $host_os in -- aix4 | aix4.[[01]] | aix4.[[01]].*) -- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -- echo ' yes ' -- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -- : -+ aix3* | aix4* | aix5*) -+ lt_cv_prog_cc_wl='-Wl,' -+ # All AIX code is PIC. -+ if test "$host_cpu" = ia64; then -+ # AIX 5 now supports IA64 processor -+ lt_cv_prog_cc_static='-Bstatic' - else -- can_build_shared=no -+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; -- esac -- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct -- # soname into executable. Probably we can add versioning support to -- # collect2, so additional links can be useful in future. -- if test "$aix_use_runtimelinking" = yes; then -- # If using run time linking (on AIX 4.2 or later) use lib.so -- # instead of lib.a to let people know that these are not -- # typical AIX shared libraries. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- else -- # We preserve .a as extension for shared libraries through AIX4.2 -- # and later when we are not doing run time linking. -- library_names_spec='${libname}${release}.a $libname.a' -- soname_spec='${libname}${release}${shared_ext}$major' -- fi -- shlibpath_var=LIBPATH -- fi -- ;; - --amigaos*) -- library_names_spec='$libname.ixlibrary $libname.a' -- # Create ${libname}_ixlibrary.a entries in /sys/libs. -- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' -- ;; -+ hpux9* | hpux10* | hpux11*) -+ # Is there a better lt_cv_prog_cc_static that works with the bundled CC? -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" -+ lt_cv_prog_cc_pic='+Z' -+ ;; - --beos*) -- library_names_spec='${libname}${shared_ext}' -- dynamic_linker="$host_os ld.so" -- shlibpath_var=LIBRARY_PATH -- ;; -+ irix5* | irix6* | nonstopux*) -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' -+ # PIC (with -KPIC) is the default. -+ ;; - --bsdi[[45]]*) -- version_type=linux -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -- # the default ld.so.conf also contains /usr/contrib/lib and -- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -- # libtool to hard-code these into programs -- ;; -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' -+ ;; - --cygwin* | mingw* | pw32*) -- version_type=windows -- shrext_cmds=".dll" -- need_version=no -- need_lib_prefix=no -+ newsos6) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ ;; - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32*) -- library_names_spec='$libname.dll.a' -- # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ -- dldir=$destdir/`dirname \$dlpath`~ -- test -d \$dldir || mkdir -p \$dldir~ -- $install_prog $dir/$dlname \$dldir/$dlname~ -- chmod a+x \$dldir/$dlname' -- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -- dlpath=$dir/\$dldll~ -- $rm \$dlpath' -- shlibpath_overrides_runpath=yes -+ osf3* | osf4* | osf5*) -+ # All OSF/1 code is PIC. -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' -+ ;; - -- case $host_os in -- cygwin*) -- # Cygwin DLLs use 'cyg' prefix rather than 'lib' -- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" -+ sco3.2v5*) -+ lt_cv_prog_cc_pic='-Kpic' -+ lt_cv_prog_cc_static='-dn' -+ lt_cv_prog_cc_shlib='-belf' - ;; -- mingw*) -- # MinGW DLLs use traditional 'lib' prefix -- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then -- # It is most probably a Windows format PATH printed by -- # mingw gcc, but we are running on Cygwin. Gcc prints its search -- # path with ; separators, and with drive letters. We can handle the -- # drive letters (cygwin fileutils understands them), so leave them, -- # especially as we might pass files found there to a mingw objdump, -- # which wouldn't understand a cygwinified path. Ahh. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ -+ solaris*) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ sunos4*) -+ lt_cv_prog_cc_pic='-PIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Qoption ld ' -+ ;; -+ -+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ uts4*) -+ lt_cv_prog_cc_pic='-pic' -+ lt_cv_prog_cc_static='-Bstatic' -+ ;; -+ -+ sysv4*MP*) -+ if test -d /usr/nec ;then -+ lt_cv_prog_cc_pic='-Kconform_pic' -+ lt_cv_prog_cc_static='-Bstatic' - fi - ;; -- pw32*) -- # pw32 DLLs use 'pw' prefix rather than 'lib' -- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -+ -+ *) -+ lt_cv_prog_cc_can_build_shared=no - ;; - esac -- ;; -+ fi -+]) -+if test -z "$lt_cv_prog_cc_pic"; then -+ AC_MSG_RESULT([none]) -+else -+ AC_MSG_RESULT([$lt_cv_prog_cc_pic]) - -- *) -- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' -- ;; -- esac -- dynamic_linker='Win32 ld.exe' -- # FIXME: first we should search . and the directory the executable is in -- shlibpath_var=PATH -- ;; -+ # Check to make sure the pic_flag actually works. -+ AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) -+ AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" -+ AC_TRY_COMPILE([], [], [dnl -+ case $host_os in -+ hpux9* | hpux10* | hpux11*) -+ # On HP-UX, both CC and GCC only warn that PIC is supported... then -+ # they create non-PIC objects. So, if there were any warnings, we -+ # assume that PIC is not supported. -+ if test -s conftest.err; then -+ lt_cv_prog_cc_pic_works=no -+ else -+ lt_cv_prog_cc_pic_works=yes -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic_works=yes -+ ;; -+ esac -+ ], [dnl -+ lt_cv_prog_cc_pic_works=no -+ ]) -+ CFLAGS="$save_CFLAGS" -+ ]) - --darwin* | rhapsody*) -- dynamic_linker="$host_os dyld" -- version_type=darwin -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -- shlibpath_overrides_runpath=yes -- shlibpath_var=DYLD_LIBRARY_PATH -- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. -- if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` -+ if test "X$lt_cv_prog_cc_pic_works" = Xno; then -+ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_can_build_shared=no - else -- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' -+ lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" - fi -- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' -- ;; - --dgux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -+ AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) -+fi - --freebsd1*) -- dynamic_linker=no -- ;; -+# Check for any special shared library compilation flags. -+if test -n "$lt_cv_prog_cc_shlib"; then -+ AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) -+ if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : -+ else -+ AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) -+ lt_cv_prog_cc_can_build_shared=no -+ fi -+fi - --kfreebsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -- ;; -+AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) -+AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl -+ lt_cv_prog_cc_static_works=no -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" -+ AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) -+ LDFLAGS="$save_LDFLAGS" -+]) - --freebsd* | dragonfly*) -- # DragonFly does not have aout. When/if they implement a new -- # versioning mechanism, adjust this. -- if test -x /usr/bin/objformat; then -- objformat=`/usr/bin/objformat` -+# Belt *and* braces to stop my trousers falling down: -+test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= -+AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) -+ -+pic_flag="$lt_cv_prog_cc_pic" -+special_shlib_compile_flags="$lt_cv_prog_cc_shlib" -+wl="$lt_cv_prog_cc_wl" -+link_static_flag="$lt_cv_prog_cc_static" -+no_builtin_flag="$lt_cv_prog_cc_no_builtin" -+can_build_shared="$lt_cv_prog_cc_can_build_shared" -+ -+ -+# Check to see if options -o and -c are simultaneously supported by compiler -+AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) -+AC_CACHE_VAL([lt_cv_compiler_c_o], [ -+$rm -r conftest 2>/dev/null -+mkdir conftest -+cd conftest -+echo "int some_variable = 0;" > conftest.$ac_ext -+mkdir out -+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -+# that will create temporary files in the current directory regardless of -+# the output directory. Thus, making CWD read-only will cause this test -+# to fail, enabling locking or at least warning the user not to do parallel -+# builds. -+chmod -w . -+save_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" -+compiler_c_o=no -+if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s out/conftest.err; then -+ lt_cv_compiler_c_o=no - else -- case $host_os in -- freebsd[[123]]*) objformat=aout ;; -- *) objformat=elf ;; -- esac -+ lt_cv_compiler_c_o=yes - fi -- version_type=freebsd-$objformat -- case $version_type in -- freebsd-elf*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -- need_version=no -- need_lib_prefix=no -- ;; -- freebsd-*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' -- need_version=yes -- ;; -- esac -- shlibpath_var=LD_LIBRARY_PATH -+else -+ # Append any errors to the config.log. -+ cat out/conftest.err 1>&AC_FD_CC -+ lt_cv_compiler_c_o=no -+fi -+CFLAGS="$save_CFLAGS" -+chmod u+w . -+$rm conftest* out/* -+rmdir out -+cd .. -+rmdir conftest -+$rm -r conftest 2>/dev/null -+]) -+compiler_c_o=$lt_cv_compiler_c_o -+AC_MSG_RESULT([$compiler_c_o]) -+ -+if test x"$compiler_c_o" = x"yes"; then -+ # Check to see if we can write to a .lo -+ AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) -+ AC_CACHE_VAL([lt_cv_compiler_o_lo], [ -+ lt_cv_compiler_o_lo=no -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -c -o conftest.lo" -+ save_objext="$ac_objext" -+ ac_objext=lo -+ AC_TRY_COMPILE([], [int some_variable = 0;], [dnl -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ lt_cv_compiler_o_lo=no -+ else -+ lt_cv_compiler_o_lo=yes -+ fi -+ ]) -+ ac_objext="$save_objext" -+ CFLAGS="$save_CFLAGS" -+ ]) -+ compiler_o_lo=$lt_cv_compiler_o_lo -+ AC_MSG_RESULT([$compiler_o_lo]) -+else -+ compiler_o_lo=no -+fi -+ -+# Check to see if we can do hard links to lock some files if needed -+hard_links="nottested" -+if test "$compiler_c_o" = no && test "$need_locks" != no; then -+ # do not overwrite the value of need_locks provided by the user -+ AC_MSG_CHECKING([if we can lock with hard links]) -+ hard_links=yes -+ $rm conftest* -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ touch conftest.a -+ ln conftest.a conftest.b 2>&5 || hard_links=no -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ AC_MSG_RESULT([$hard_links]) -+ if test "$hard_links" = no; then -+ AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) -+ need_locks=warn -+ fi -+else -+ need_locks=no -+fi -+ -+if test "$GCC" = yes; then -+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler -+ AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) -+ echo "int some_variable = 0;" > conftest.$ac_ext -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" -+ compiler_rtti_exceptions=no -+ AC_TRY_COMPILE([], [int some_variable = 0;], [dnl -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ compiler_rtti_exceptions=no -+ else -+ compiler_rtti_exceptions=yes -+ fi -+ ]) -+ CFLAGS="$save_CFLAGS" -+ AC_MSG_RESULT([$compiler_rtti_exceptions]) -+ -+ if test "$compiler_rtti_exceptions" = "yes"; then -+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' -+ else -+ no_builtin_flag=' -fno-builtin' -+ fi -+fi -+ -+# See if the linker supports building shared libraries. -+AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) -+ -+allow_undefined_flag= -+no_undefined_flag= -+need_lib_prefix=unknown -+need_version=unknown -+# when you set need_version to no, make sure it does not cause -set_version -+# flags to be left without arguments -+archive_cmds= -+archive_expsym_cmds= -+old_archive_from_new_cmds= -+old_archive_from_expsyms_cmds= -+export_dynamic_flag_spec= -+whole_archive_flag_spec= -+thread_safe_flag_spec= -+hardcode_into_libs=no -+hardcode_libdir_flag_spec= -+hardcode_libdir_separator= -+hardcode_direct=no -+hardcode_minus_L=no -+hardcode_shlibpath_var=unsupported -+runpath_var= -+link_all_deplibs=unknown -+always_export_symbols=no -+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -+# include_expsyms should be a list of space-separated symbols to be *always* -+# included in the symbol list -+include_expsyms= -+# exclude_expsyms can be an egrep regular expression of symbols to exclude -+# it will be wrapped by ` (' and `)$', so one must not match beginning or -+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -+# as well as any symbol that contains `d'. -+exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -+# platforms (ab)use it in PIC code, but their linkers get confused if -+# the symbol is explicitly referenced. Since portable code cannot -+# rely on this symbol name, it's probably fine to never include it in -+# preloaded symbol tables. -+extract_expsyms_cmds= -+ -+case $host_os in -+cygwin* | mingw* | pw32*) -+ # FIXME: the MSVC++ port hasn't been tested in a loooong time -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ if test "$GCC" != yes; then -+ with_gnu_ld=no -+ fi -+ ;; -+openbsd*) -+ with_gnu_ld=no -+ ;; -+esac -+ -+ld_shlibs=yes -+if test "$with_gnu_ld" = yes; then -+ # If archive_cmds runs LD, not CC, wlarc should be empty -+ wlarc='${wl}' -+ -+ # See if GNU ld supports shared libraries. - case $host_os in -- freebsd2*) -- shlibpath_overrides_runpath=yes -+ aix3* | aix4* | aix5*) -+ # On AIX, the GNU linker is very broken -+ # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. -+ ld_shlibs=no -+ cat <&2 -+ -+*** Warning: the GNU linker, at least up to release 2.9.1, is reported -+*** to be unable to reliably create shared libraries on AIX. -+*** Therefore, libtool is disabling shared libraries support. If you -+*** really care for shared libraries, you may want to modify your PATH -+*** so that a non-GNU linker is found, and then restart. -+ -+EOF - ;; -- freebsd3.[[01]]* | freebsdelf3.[[01]]*) -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ -+ # Samuel A. Falvo II reports -+ # that the semantics of dynamic libraries on AmigaOS, at least up -+ # to version 4, is to share data among multiple programs linked -+ # with the same dynamic library. Since this doesn't match the -+ # behavior of shared libraries on other platforms, we can use -+ # them. -+ ld_shlibs=no - ;; -- *) # from 3.2 on -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -+ -+ beos*) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ allow_undefined_flag=unsupported -+ # Joseph Beckenbach says some releases of gcc -+ # support --undefined. This deserves some investigation. FIXME -+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ else -+ ld_shlibs=no -+ fi - ;; -- esac -- ;; - --gnu*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- hardcode_into_libs=yes -- ;; -+ cygwin* | mingw* | pw32*) -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec='-L$libdir' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ -+ extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ -+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ -+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ -+ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ -+ else $CC -o impgen impgen.c ; fi)~ -+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' -+ -+ old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' -+ -+ # cygwin and mingw dlls have different entry points and sets of symbols -+ # to exclude. -+ # FIXME: what about values for MSVC? -+ dll_entry=__cygwin_dll_entry@12 -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ -+ case $host_os in -+ mingw*) -+ # mingw values -+ dll_entry=_DllMainCRTStartup@12 -+ dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ -+ ;; -+ esac - --hpux9* | hpux10* | hpux11*) -- # Give a soname corresponding to the major version so that dld.sl refuses to -- # link against other versions. -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- case $host_cpu in -- ia64*) -- shrext_cmds='.so' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.so" -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- if test "X$HPUX_IA64_MODE" = X32; then -- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" -+ # mingw and cygwin differ, and it's simplest to just exclude the union -+ # of the two symbol sets. -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 -+ -+ # recent cygwin and mingw systems supply a stub DllMain which the user -+ # can override, but on older systems we have to supply one (in ltdll.c) -+ if test "x$lt_cv_need_dllmain" = "xyes"; then -+ ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " -+ ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ -+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' - else -- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" -+ ltdll_obj= -+ ltdll_cmds= - fi -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -+ -+ # Extract the symbol export list from an `--export-all' def file, -+ # then regenerate the def file from the symbol export list, so that -+ # the compiled dll only exports the symbol export list. -+ # Be careful not to strip the DATA tag left be newer dlltools. -+ export_symbols_cmds="$ltdll_cmds"' -+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ -+ sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' -+ -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is. -+ # If DATA tags from a recent dlltool are present, honour them! -+ archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname-def; -+ else -+ echo EXPORTS > $output_objdir/$soname-def; -+ _lt_hint=1; -+ cat $export_symbols | while read symbol; do -+ set dummy \$symbol; -+ case \[$]# in -+ 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; -+ 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; -+ *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; -+ esac; -+ _lt_hint=`expr 1 + \$_lt_hint`; -+ done; -+ fi~ -+ '"$ltdll_cmds"' -+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ -+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ -+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' - ;; -- hppa*64*) -- shrext_cmds='.sl' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- *) -- shrext_cmds='.sl' -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=SHLIB_PATH -- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ -+ netbsd* | knetbsd*-gnu) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -+ wlarc= -+ else -+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ fi - ;; -- esac -- # HP-UX runs *really* slowly unless shared libraries are mode 555. -- postinstall_cmds='chmod 555 $lib' -- ;; -- --irix5* | irix6* | nonstopux*) -- case $host_os in -- nonstopux*) version_type=nonstopux ;; -- *) -- if test "$lt_cv_prog_gnu_ld" = yes; then -- version_type=linux -- else -- version_type=irix -- fi ;; -- esac -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' -- case $host_os in -- irix5* | nonstopux*) -- libsuff= shlibsuff= -- ;; -- *) -- case $LD in # libtool.m4 will add one of these switches to LD -- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") -- libsuff= shlibsuff= libmagic=32-bit;; -- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") -- libsuff=32 shlibsuff=N32 libmagic=N32;; -- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") -- libsuff=64 shlibsuff=64 libmagic=64-bit;; -- *) libsuff= shlibsuff= libmagic=never-match;; -- esac -- ;; -- esac -- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -- hardcode_into_libs=yes -- ;; -- --# No shared lib support for Linux oldld, aout, or coff. --linux*oldld* | linux*aout* | linux*coff*) -- dynamic_linker=no -- ;; -- --# This must be Linux ELF. --linux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- # This implies no fast_install, which is unacceptable. -- # Some rework will be needed to allow for fast_install -- # before this can be enabled. -- hardcode_into_libs=yes -- -- # Append ld.so.conf contents to the search path -- if test -f /etc/ld.so.conf; then -- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -- fi -- -- # We used to test for /lib/ld.so.1 and disable shared libraries on -- # powerpc, because MkLinux only supported shared libraries with the -- # GNU dynamic linker. Since this was broken with cross compilers, -- # most powerpc-linux boxes support dynamic linking these days and -- # people can always --disable-shared, the test was removed, and we -- # assume the GNU/Linux dynamic linker is in use. -- dynamic_linker='GNU/Linux ld.so' -- ;; -- --knetbsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -- ;; -- --netbsd*) -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- dynamic_linker='NetBSD (a.out) ld.so' -- else -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- dynamic_linker='NetBSD ld.elf_so' -- fi -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- --newsos6) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --nto-qnx*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --openbsd*) -- version_type=sunos -- need_lib_prefix=no -- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. -- case $host_os in -- openbsd3.3 | openbsd3.3.*) need_version=yes ;; -- *) need_version=no ;; -- esac -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- case $host_os in -- openbsd2.[[89]] | openbsd2.[[89]].*) -- shlibpath_overrides_runpath=no -- ;; -- *) -- shlibpath_overrides_runpath=yes -- ;; -- esac -- else -- shlibpath_overrides_runpath=yes -- fi -- ;; -- --os2*) -- libname_spec='$name' -- shrext_cmds=".dll" -- need_lib_prefix=no -- library_names_spec='$libname${shared_ext} $libname.a' -- dynamic_linker='OS/2 ld.exe' -- shlibpath_var=LIBPATH -- ;; -- --osf3* | osf4* | osf5*) -- version_type=osf -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -- ;; -- --sco3.2v5*) -- version_type=osf -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --solaris*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- # ldd complains unless libraries are executable -- postinstall_cmds='chmod +x $lib' -- ;; -- --sunos4*) -- version_type=sunos -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- if test "$with_gnu_ld" = yes; then -- need_lib_prefix=no -- fi -- need_version=yes -- ;; -- --sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- case $host_vendor in -- sni) -- shlibpath_overrides_runpath=no -- need_lib_prefix=no -- export_dynamic_flag_spec='${wl}-Blargedynsym' -- runpath_var=LD_RUN_PATH -- ;; -- siemens) -- need_lib_prefix=no -- ;; -- motorola) -- need_lib_prefix=no -- need_version=no -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -- ;; -- esac -- ;; -- --sysv4*MP*) -- if test -d /usr/nec ;then -- version_type=linux -- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' -- soname_spec='$libname${shared_ext}.$major' -- shlibpath_var=LD_LIBRARY_PATH -- fi -- ;; -- --uts4*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --*) -- dynamic_linker=no -- ;; --esac --AC_MSG_RESULT([$dynamic_linker]) --test "$dynamic_linker" = no && can_build_shared=no --])# AC_LIBTOOL_SYS_DYNAMIC_LINKER -- -- --# _LT_AC_TAGCONFIG --# ---------------- --AC_DEFUN([_LT_AC_TAGCONFIG], --[AC_ARG_WITH([tags], -- [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], -- [include additional configurations @<:@automatic@:>@])], -- [tagnames="$withval"]) -- --if test -f "$ltmain" && test -n "$tagnames"; then -- if test ! -f "${ofile}"; then -- AC_MSG_WARN([output file `$ofile' does not exist]) -- fi -- -- if test -z "$LTCC"; then -- eval "`$SHELL ${ofile} --config | grep '^LTCC='`" -- if test -z "$LTCC"; then -- AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) -- else -- AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) -- fi -- fi -- -- # Extract list of available tagged configurations in $ofile. -- # Note that this assumes the entire list is on one line. -- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` -- -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for tagname in $tagnames; do -- IFS="$lt_save_ifs" -- # Check whether tagname contains only valid characters -- case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in -- "") ;; -- *) AC_MSG_ERROR([invalid tag name: $tagname]) -- ;; -- esac -- -- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null -- then -- AC_MSG_ERROR([tag name \"$tagname\" already exists]) -- fi -- -- # Update the list of available tags. -- if test -n "$tagname"; then -- echo appending configuration tag \"$tagname\" to $ofile -- -- case $tagname in -- CXX) -- if test -n "$CXX" && ( test "X$CXX" != "Xno" && -- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || -- (test "X$CXX" != "Xg++"))) ; then -- AC_LIBTOOL_LANG_CXX_CONFIG -- else -- tagname="" -- fi -- ;; -- -- F77) -- if test -n "$F77" && test "X$F77" != "Xno"; then -- AC_LIBTOOL_LANG_F77_CONFIG -- else -- tagname="" -- fi -- ;; -- -- GCJ) -- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then -- AC_LIBTOOL_LANG_GCJ_CONFIG -- else -- tagname="" -- fi -- ;; -- -- RC) -- AC_LIBTOOL_LANG_RC_CONFIG -- ;; -- -- *) -- AC_MSG_ERROR([Unsupported tag name: $tagname]) -- ;; -- esac -- -- # Append the new tag name to the list of available tags. -- if test -n "$tagname" ; then -- available_tags="$available_tags $tagname" -- fi -- fi -- done -- IFS="$lt_save_ifs" -- -- # Now substitute the updated list of available tags. -- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then -- mv "${ofile}T" "$ofile" -- chmod +x "$ofile" -- else -- rm -f "${ofile}T" -- AC_MSG_ERROR([unable to update list of available tagged configurations.]) -- fi --fi --])# _LT_AC_TAGCONFIG -- -- --# AC_LIBTOOL_DLOPEN --# ----------------- --# enable checks for dlopen support --AC_DEFUN([AC_LIBTOOL_DLOPEN], -- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) --])# AC_LIBTOOL_DLOPEN -- -- --# AC_LIBTOOL_WIN32_DLL --# -------------------- --# declare package support for building win32 DLLs --AC_DEFUN([AC_LIBTOOL_WIN32_DLL], --[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) --])# AC_LIBTOOL_WIN32_DLL -- -- --# AC_ENABLE_SHARED([DEFAULT]) --# --------------------------- --# implement the --enable-shared flag --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. --AC_DEFUN([AC_ENABLE_SHARED], --[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl --AC_ARG_ENABLE([shared], -- [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], -- [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], -- [p=${PACKAGE-default} -- case $enableval in -- yes) enable_shared=yes ;; -- no) enable_shared=no ;; -- *) -- enable_shared=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_shared=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac], -- [enable_shared=]AC_ENABLE_SHARED_DEFAULT) --])# AC_ENABLE_SHARED -- -- --# AC_DISABLE_SHARED --# ----------------- --#- set the default shared flag to --disable-shared --AC_DEFUN([AC_DISABLE_SHARED], --[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl --AC_ENABLE_SHARED(no) --])# AC_DISABLE_SHARED -- -- --# AC_ENABLE_STATIC([DEFAULT]) --# --------------------------- --# implement the --enable-static flag --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. --AC_DEFUN([AC_ENABLE_STATIC], --[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl --AC_ARG_ENABLE([static], -- [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], -- [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], -- [p=${PACKAGE-default} -- case $enableval in -- yes) enable_static=yes ;; -- no) enable_static=no ;; -- *) -- enable_static=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_static=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac], -- [enable_static=]AC_ENABLE_STATIC_DEFAULT) --])# AC_ENABLE_STATIC -- -- --# AC_DISABLE_STATIC --# ----------------- --# set the default static flag to --disable-static --AC_DEFUN([AC_DISABLE_STATIC], --[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl --AC_ENABLE_STATIC(no) --])# AC_DISABLE_STATIC -- -- --# AC_ENABLE_FAST_INSTALL([DEFAULT]) --# --------------------------------- --# implement the --enable-fast-install flag --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. --AC_DEFUN([AC_ENABLE_FAST_INSTALL], --[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl --AC_ARG_ENABLE([fast-install], -- [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], -- [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], -- [p=${PACKAGE-default} -- case $enableval in -- yes) enable_fast_install=yes ;; -- no) enable_fast_install=no ;; -- *) -- enable_fast_install=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_fast_install=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac], -- [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) --])# AC_ENABLE_FAST_INSTALL -- -- --# AC_DISABLE_FAST_INSTALL --# ----------------------- --# set the default to --disable-fast-install --AC_DEFUN([AC_DISABLE_FAST_INSTALL], --[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl --AC_ENABLE_FAST_INSTALL(no) --])# AC_DISABLE_FAST_INSTALL -- -- --# AC_LIBTOOL_PICMODE([MODE]) --# -------------------------- --# implement the --with-pic flag --# MODE is either `yes' or `no'. If omitted, it defaults to `both'. --AC_DEFUN([AC_LIBTOOL_PICMODE], --[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl --pic_mode=ifelse($#,1,$1,default) --])# AC_LIBTOOL_PICMODE -- -- --# AC_PROG_EGREP --# ------------- --# This is predefined starting with Autoconf 2.54, so this conditional --# definition can be removed once we require Autoconf 2.54 or later. --m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], --[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], -- [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 -- then ac_cv_prog_egrep='grep -E' -- else ac_cv_prog_egrep='egrep' -- fi]) -- EGREP=$ac_cv_prog_egrep -- AC_SUBST([EGREP]) --])]) -- -- --# AC_PATH_TOOL_PREFIX --# ------------------- --# find a file program which can recognise shared library --AC_DEFUN([AC_PATH_TOOL_PREFIX], --[AC_REQUIRE([AC_PROG_EGREP])dnl --AC_MSG_CHECKING([for $1]) --AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, --[case $MAGIC_CMD in --[[\\/*] | ?:[\\/]*]) -- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -- ;; --*) -- lt_save_MAGIC_CMD="$MAGIC_CMD" -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR --dnl $ac_dummy forces splitting on constant user-supplied paths. --dnl POSIX.2 word splitting is done only on the output of word expansions, --dnl not every word. This closes a longstanding sh security hole. -- ac_dummy="ifelse([$2], , $PATH, [$2])" -- for ac_dir in $ac_dummy; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$1; then -- lt_cv_path_MAGIC_CMD="$ac_dir/$1" -- if test -n "$file_magic_test_file"; then -- case $deplibs_check_method in -- "file_magic "*) -- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` -- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -- $EGREP "$file_magic_regex" > /dev/null; then -- : -- else -- cat <&2 -- --*** Warning: the command libtool uses to detect shared libraries, --*** $file_magic_cmd, produces output that libtool cannot recognize. --*** The result is that libtool may fail to recognize shared libraries --*** as such. This will affect the creation of libtool libraries that --*** depend on shared libraries, but programs linked with such libtool --*** libraries will work regardless of this problem. Nevertheless, you --*** may want to report the problem to your system manager and/or to --*** bug-libtool@gnu.org -- --EOF -- fi ;; -- esac -- fi -- break -- fi -- done -- IFS="$lt_save_ifs" -- MAGIC_CMD="$lt_save_MAGIC_CMD" -- ;; --esac]) --MAGIC_CMD="$lt_cv_path_MAGIC_CMD" --if test -n "$MAGIC_CMD"; then -- AC_MSG_RESULT($MAGIC_CMD) --else -- AC_MSG_RESULT(no) --fi --])# AC_PATH_TOOL_PREFIX -- -- --# AC_PATH_MAGIC --# ------------- --# find a file program which can recognise a shared library --AC_DEFUN([AC_PATH_MAGIC], --[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) --if test -z "$lt_cv_path_MAGIC_CMD"; then -- if test -n "$ac_tool_prefix"; then -- AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) -- else -- MAGIC_CMD=: -- fi --fi --])# AC_PATH_MAGIC -- -- --# AC_PROG_LD --# ---------- --# find the pathname to the GNU or non-GNU linker --AC_DEFUN([AC_PROG_LD], --[AC_ARG_WITH([gnu-ld], -- [AC_HELP_STRING([--with-gnu-ld], -- [assume the C compiler uses GNU ld @<:@default=no@:>@])], -- [test "$withval" = no || with_gnu_ld=yes], -- [with_gnu_ld=no]) --AC_REQUIRE([LT_AC_PROG_SED])dnl --AC_REQUIRE([AC_PROG_CC])dnl --AC_REQUIRE([AC_CANONICAL_HOST])dnl --AC_REQUIRE([AC_CANONICAL_BUILD])dnl --ac_prog=ld --if test "$GCC" = yes; then -- # Check if gcc -print-prog-name=ld gives a path. -- AC_MSG_CHECKING([for ld used by $CC]) -- case $host in -- *-*-mingw*) -- # gcc leaves a trailing carriage return which upsets mingw -- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -- *) -- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -- esac -- case $ac_prog in -- # Accept absolute paths. -- [[\\/]]* | ?:[[\\/]]*) -- re_direlt='/[[^/]][[^/]]*/\.\./' -- # Canonicalize the pathname of ld -- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` -- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do -- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` -- done -- test -z "$LD" && LD="$ac_prog" -- ;; -- "") -- # If it fails, then pretend we aren't using GCC. -- ac_prog=ld -- ;; -- *) -- # If it is relative, then search for the first ld in PATH. -- with_gnu_ld=unknown -- ;; -- esac --elif test "$with_gnu_ld" = yes; then -- AC_MSG_CHECKING([for GNU ld]) --else -- AC_MSG_CHECKING([for non-GNU ld]) --fi --AC_CACHE_VAL(lt_cv_path_LD, --[if test -z "$LD"; then -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- for ac_dir in $PATH; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- lt_cv_path_LD="$ac_dir/$ac_prog" -- # Check to see if the program is GNU ld. I'd rather use --version, -- # but apparently some variants of GNU ld only accept -v. -- # Break only if it was the GNU/non-GNU ld that we prefer. -- case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then -- case $host_cpu in -- i*86 ) -- # Not sure whether the presence of OpenBSD here was a mistake. -- # Let's accept both of them until this is cleared up. -- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' -- lt_cv_file_magic_cmd=/usr/bin/file -- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -- ;; -- esac -- else -- lt_cv_deplibs_check_method=pass_all -- fi -- ;; -- --gnu*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --hpux10.20* | hpux11*) -- lt_cv_file_magic_cmd=/usr/bin/file -- case $host_cpu in -- ia64*) -- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' -- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so -- ;; -- hppa*64*) -- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] -- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl -- ;; -- *) -- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' -- lt_cv_file_magic_test_file=/usr/lib/libc.sl -- ;; -- esac -- ;; -- --irix5* | irix6* | nonstopux*) -- case $LD in -- *-32|*"-32 ") libmagic=32-bit;; -- *-n32|*"-n32 ") libmagic=N32;; -- *-64|*"-64 ") libmagic=64-bit;; -- *) libmagic=never-match;; -- esac -- lt_cv_deplibs_check_method=pass_all -- ;; -- --# This must be Linux ELF. --linux*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' -- else -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' -- fi -- ;; -- --newos6*) -- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' -- lt_cv_file_magic_cmd=/usr/bin/file -- lt_cv_file_magic_test_file=/usr/lib/libnls.so -- ;; -- --nto-qnx*) -- lt_cv_deplibs_check_method=unknown -- ;; -- --openbsd*) -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' -- else -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' -- fi -- ;; -- --osf3* | osf4* | osf5*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --sco3.2v5*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --solaris*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- case $host_vendor in -- motorola) -- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' -- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` -- ;; -- ncr) -- lt_cv_deplibs_check_method=pass_all -- ;; -- sequent) -- lt_cv_file_magic_cmd='/bin/file' -- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' -- ;; -- sni) -- lt_cv_file_magic_cmd='/bin/file' -- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" -- lt_cv_file_magic_test_file=/lib/libc.so -- ;; -- siemens) -- lt_cv_deplibs_check_method=pass_all -- ;; -- esac -- ;; -- --sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) -- lt_cv_deplibs_check_method=pass_all -- ;; --esac --]) --file_magic_cmd=$lt_cv_file_magic_cmd --deplibs_check_method=$lt_cv_deplibs_check_method --test -z "$deplibs_check_method" && deplibs_check_method=unknown --])# AC_DEPLIBS_CHECK_METHOD -- -- --# AC_PROG_NM --# ---------- --# find the pathname to a BSD-compatible name lister --AC_DEFUN([AC_PROG_NM], --[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, --[if test -n "$NM"; then -- # Let the user override the test. -- lt_cv_path_NM="$NM" --else -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- tmp_nm="$ac_dir/${ac_tool_prefix}nm" -- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then -- # Check to see if the nm accepts a BSD-compat flag. -- # Adding the `sed 1q' prevents false positives on HP-UX, which says: -- # nm: unknown option "B" ignored -- # Tru64's nm complains that /dev/null is an invalid object file -- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in -- */dev/null* | *'Invalid file or object type'*) -- lt_cv_path_NM="$tmp_nm -B" -- break -- ;; -- *) -- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in -- */dev/null*) -- lt_cv_path_NM="$tmp_nm -p" -- break -- ;; -- *) -- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but -- continue # so that we can try to find one that supports BSD flags -- ;; -- esac -- esac -- fi -- done -- IFS="$lt_save_ifs" -- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm --fi]) --NM="$lt_cv_path_NM" --])# AC_PROG_NM -- -- --# AC_CHECK_LIBM --# ------------- --# check for math library --AC_DEFUN([AC_CHECK_LIBM], --[AC_REQUIRE([AC_CANONICAL_HOST])dnl --LIBM= --case $host in --*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) -- # These system don't have libm, or don't need it -- ;; --*-ncr-sysv4.3*) -- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") -- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") -- ;; --*) -- AC_CHECK_LIB(m, cos, LIBM="-lm") -- ;; --esac --])# AC_CHECK_LIBM -- -- --# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) --# ----------------------------------- --# sets LIBLTDL to the link flags for the libltdl convenience library and --# LTDLINCL to the include flags for the libltdl header and adds --# --enable-ltdl-convenience to the configure arguments. Note that --# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, --# it is assumed to be `libltdl'. LIBLTDL will be prefixed with --# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' --# (note the single quotes!). If your package is not flat and you're not --# using automake, define top_builddir and top_srcdir appropriately in --# the Makefiles. --AC_DEFUN([AC_LIBLTDL_CONVENIENCE], --[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -- case $enable_ltdl_convenience in -- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; -- "") enable_ltdl_convenience=yes -- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; -- esac -- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la -- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) -- # For backwards non-gettext consistent compatibility... -- INCLTDL="$LTDLINCL" --])# AC_LIBLTDL_CONVENIENCE -- -- --# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) --# ----------------------------------- --# sets LIBLTDL to the link flags for the libltdl installable library and --# LTDLINCL to the include flags for the libltdl header and adds --# --enable-ltdl-install to the configure arguments. Note that --# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, --# and an installed libltdl is not found, it is assumed to be `libltdl'. --# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with --# '${top_srcdir}/' (note the single quotes!). If your package is not --# flat and you're not using automake, define top_builddir and top_srcdir --# appropriately in the Makefiles. --# In the future, this macro may have to be called after AC_PROG_LIBTOOL. --AC_DEFUN([AC_LIBLTDL_INSTALLABLE], --[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -- AC_CHECK_LIB(ltdl, lt_dlinit, -- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], -- [if test x"$enable_ltdl_install" = xno; then -- AC_MSG_WARN([libltdl not installed, but installation disabled]) -- else -- enable_ltdl_install=yes -- fi -- ]) -- if test x"$enable_ltdl_install" = x"yes"; then -- ac_configure_args="$ac_configure_args --enable-ltdl-install" -- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la -- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) -- else -- ac_configure_args="$ac_configure_args --enable-ltdl-install=no" -- LIBLTDL="-lltdl" -- LTDLINCL= -- fi -- # For backwards non-gettext consistent compatibility... -- INCLTDL="$LTDLINCL" --])# AC_LIBLTDL_INSTALLABLE -- -- --# AC_LIBTOOL_CXX --# -------------- --# enable support for C++ libraries --AC_DEFUN([AC_LIBTOOL_CXX], --[AC_REQUIRE([_LT_AC_LANG_CXX]) --])# AC_LIBTOOL_CXX -- -- --# _LT_AC_LANG_CXX --# --------------- --AC_DEFUN([_LT_AC_LANG_CXX], --[AC_REQUIRE([AC_PROG_CXX]) --AC_REQUIRE([_LT_AC_PROG_CXXCPP]) --_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) --])# _LT_AC_LANG_CXX -- --# _LT_AC_PROG_CXXCPP --# --------------- --AC_DEFUN([_LT_AC_PROG_CXXCPP], --[ --AC_REQUIRE([AC_PROG_CXX]) --if test -n "$CXX" && ( test "X$CXX" != "Xno" && -- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || -- (test "X$CXX" != "Xg++"))) ; then -- AC_PROG_CXXCPP --fi --])# _LT_AC_PROG_CXXCPP -- --# AC_LIBTOOL_F77 --# -------------- --# enable support for Fortran 77 libraries --AC_DEFUN([AC_LIBTOOL_F77], --[AC_REQUIRE([_LT_AC_LANG_F77]) --])# AC_LIBTOOL_F77 -- -- --# _LT_AC_LANG_F77 --# --------------- --AC_DEFUN([_LT_AC_LANG_F77], --[AC_REQUIRE([AC_PROG_F77]) --_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) --])# _LT_AC_LANG_F77 -- -- --# AC_LIBTOOL_GCJ --# -------------- --# enable support for GCJ libraries --AC_DEFUN([AC_LIBTOOL_GCJ], --[AC_REQUIRE([_LT_AC_LANG_GCJ]) --])# AC_LIBTOOL_GCJ -- -- --# _LT_AC_LANG_GCJ --# --------------- --AC_DEFUN([_LT_AC_LANG_GCJ], --[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], -- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], -- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], -- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], -- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], -- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) --_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) --])# _LT_AC_LANG_GCJ -- -- --# AC_LIBTOOL_RC --# -------------- --# enable support for Windows resource files --AC_DEFUN([AC_LIBTOOL_RC], --[AC_REQUIRE([LT_AC_PROG_RC]) --_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) --])# AC_LIBTOOL_RC - -+ solaris* | sysv5*) -+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then -+ ld_shlibs=no -+ cat <&2 - --# AC_LIBTOOL_LANG_C_CONFIG --# ------------------------ --# Ensure that the configuration vars for the C compiler are --# suitably defined. Those variables are subsequently used by --# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. --AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) --AC_DEFUN([_LT_AC_LANG_C_CONFIG], --[lt_save_CC="$CC" --AC_LANG_PUSH(C) -- --# Source file extension for C test sources. --ac_ext=c -- --# Object file extension for compiled C test sources. --objext=o --_LT_AC_TAGVAR(objext, $1)=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code="int some_variable = 0;\n" -- --# Code to be used in simple link tests --lt_simple_link_test_code='int main(){return(0);}\n' -- --_LT_AC_SYS_COMPILER -- --# save warnings/boilerplate of simple test code --_LT_COMPILER_BOILERPLATE --_LT_LINKER_BOILERPLATE -+*** Warning: The releases 2.8.* of the GNU linker cannot reliably -+*** create shared libraries on Solaris systems. Therefore, libtool -+*** is disabling shared libraries support. We urge you to upgrade GNU -+*** binutils to release 2.9.1 or newer. Another option is to modify -+*** your PATH or compiler configuration so that the native linker is -+*** used, and then restart. - --# --# Check for any special shared library compilation flags. --# --_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= --if test "$GCC" = no; then -- case $host_os in -- sco3.2v5*) -- _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' -+EOF -+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi - ;; -- esac --fi --if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then -- AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) -- if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : -- else -- AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) -- _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no -- fi --fi -- -- --# --# Check to make sure the static flag actually works. --# --AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], -- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), -- $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), -- [], -- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -- -- --AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) --AC_LIBTOOL_PROG_COMPILER_PIC($1) --AC_LIBTOOL_PROG_CC_C_O($1) --AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) --AC_LIBTOOL_PROG_LD_SHLIBS($1) --AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) --AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) --AC_LIBTOOL_SYS_LIB_STRIP --AC_LIBTOOL_DLOPEN_SELF($1) -- --# Report which librarie types wil actually be built --AC_MSG_CHECKING([if libtool supports shared libraries]) --AC_MSG_RESULT([$can_build_shared]) -- --AC_MSG_CHECKING([whether to build shared libraries]) --test "$can_build_shared" = "no" && enable_shared=no -- --# On AIX, shared libraries and static libraries use the same namespace, and --# are all built from PIC. --case $host_os in --aix3*) -- test "$enable_shared" = yes && enable_static=no -- if test -n "$RANLIB"; then -- archive_cmds="$archive_cmds~\$RANLIB \$lib" -- postinstall_cmds='$RANLIB $lib' -- fi -- ;; - --aix4* | aix5*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -- fi -+ sunos4*) -+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ wlarc= -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no - ;; --esac --AC_MSG_RESULT([$enable_shared]) -- --AC_MSG_CHECKING([whether to build static libraries]) --# Make sure either enable_shared or enable_static is yes. --test "$enable_shared" = yes || enable_static=yes --AC_MSG_RESULT([$enable_static]) - --AC_LIBTOOL_CONFIG($1) -- --AC_LANG_POP --CC="$lt_save_CC" --])# AC_LIBTOOL_LANG_C_CONFIG -- -- --# AC_LIBTOOL_LANG_CXX_CONFIG --# -------------------------- --# Ensure that the configuration vars for the C compiler are --# suitably defined. Those variables are subsequently used by --# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. --AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) --AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], --[AC_LANG_PUSH(C++) --AC_REQUIRE([AC_PROG_CXX]) --AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -- --_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no --_LT_AC_TAGVAR(allow_undefined_flag, $1)= --_LT_AC_TAGVAR(always_export_symbols, $1)=no --_LT_AC_TAGVAR(archive_expsym_cmds, $1)= --_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= --_LT_AC_TAGVAR(hardcode_direct, $1)=no --_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= --_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= --_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= --_LT_AC_TAGVAR(hardcode_minus_L, $1)=no --_LT_AC_TAGVAR(hardcode_automatic, $1)=no --_LT_AC_TAGVAR(module_cmds, $1)= --_LT_AC_TAGVAR(module_expsym_cmds, $1)= --_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown --_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds --_LT_AC_TAGVAR(no_undefined_flag, $1)= --_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= --_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no -- --# Dependencies to place before and after the object being linked: --_LT_AC_TAGVAR(predep_objects, $1)= --_LT_AC_TAGVAR(postdep_objects, $1)= --_LT_AC_TAGVAR(predeps, $1)= --_LT_AC_TAGVAR(postdeps, $1)= --_LT_AC_TAGVAR(compiler_lib_search_path, $1)= -- --# Source file extension for C++ test sources. --ac_ext=cpp -- --# Object file extension for compiled C++ test sources. --objext=o --_LT_AC_TAGVAR(objext, $1)=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code="int some_variable = 0;\n" -- --# Code to be used in simple link tests --lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. --_LT_AC_SYS_COMPILER -- --# save warnings/boilerplate of simple test code --_LT_COMPILER_BOILERPLATE --_LT_LINKER_BOILERPLATE -- --# Allow CC to be a program name with arguments. --lt_save_CC=$CC --lt_save_LD=$LD --lt_save_GCC=$GCC --GCC=$GXX --lt_save_with_gnu_ld=$with_gnu_ld --lt_save_path_LD=$lt_cv_path_LD --if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then -- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx --else -- unset lt_cv_prog_gnu_ld --fi --if test -n "${lt_cv_path_LDCXX+set}"; then -- lt_cv_path_LD=$lt_cv_path_LDCXX --else -- unset lt_cv_path_LD --fi --test -z "${LDCXX+set}" || LD=$LDCXX --CC=${CXX-"c++"} --compiler=$CC --_LT_AC_TAGVAR(compiler, $1)=$CC --_LT_CC_BASENAME([$compiler]) -- --# We don't want -fno-exception wen compiling C++ code, so set the --# no_builtin_flag separately --if test "$GXX" = yes; then -- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' --else -- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= --fi -- --if test "$GXX" = yes; then -- # Set up default GNU C++ configuration -- -- AC_PROG_LD -- -- # Check if GNU C++ uses GNU ld as the underlying linker, since the -- # archiving commands below assume that GNU ld is being used. -- if test "$with_gnu_ld" = yes; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- -- # If archive_cmds runs LD, not CC, wlarc should be empty -- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to -- # investigate it a little bit more. (MM) -- wlarc='${wl}' -- -- # ancient GNU ld didn't support --whole-archive et. al. -- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ -- grep 'no-whole-archive' > /dev/null; then -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ *) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -+ ld_shlibs=no - fi -- else -- with_gnu_ld=no -- wlarc= -+ ;; -+ esac - -- # A generic and very simple default shared library creation -- # command for GNU C++ for the case where it uses the native -- # linker, instead of GNU ld. If possible, this setting should -- # overridden to take advantage of the native linker features on -- # the platform it is being used on. -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' -+ if test "$ld_shlibs" = yes; then -+ runpath_var=LD_RUN_PATH -+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' -+ export_dynamic_flag_spec='${wl}--export-dynamic' -+ case $host_os in -+ cygwin* | mingw* | pw32*) -+ # dlltool doesn't understand --whole-archive et. al. -+ whole_archive_flag_spec= -+ ;; -+ *) -+ # ancient GNU ld didn't support --whole-archive et. al. -+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then -+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ else -+ whole_archive_flag_spec= -+ fi -+ ;; -+ esac - fi -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -- - else -- GXX=no -- with_gnu_ld=no -- wlarc= --fi -- --# PORTME: fill in a description of your system's C++ link characteristics --AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) --_LT_AC_TAGVAR(ld_shlibs, $1)=yes --case $host_os in -+ # PORTME fill in a description of your system's linker (not GNU ld) -+ case $host_os in - aix3*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -+ # Note: this linker hardcodes the directories in LIBPATH if there -+ # are no directories specified by -L. -+ hardcode_minus_L=yes -+ if test "$GCC" = yes && test -z "$link_static_flag"; then -+ # Neither direct hardcoding nor static linking is supported with a -+ # broken collect2. -+ hardcode_direct=unsupported -+ fi - ;; -+ - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't -@@ -3688,7 +2294,7 @@ - *-brtl*) - aix_use_runtimelinking=yes - break -- ;; -+ ;; - esac - done - esac -@@ -3703,42 +2309,34 @@ - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - -- _LT_AC_TAGVAR(archive_cmds, $1)='' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' -- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -- -- if test "$GXX" = yes; then -+ hardcode_direct=yes -+ archive_cmds='' -+ hardcode_libdir_separator=':' -+ if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) -- # We only want to do this on AIX 4.2 and lower, the check -- # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ -- strings "$collect2name" | grep resolve_lib_name >/dev/null -+ strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -+ hardcode_direct=yes - else - # We have old collect2 -- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported -+ hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -+ hardcode_minus_L=yes -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_libdir_separator= - fi - esac -+ - shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -- fi - else - # not using gcc - if test "$host_cpu" = ia64; then -- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release -- # chokes on -Wl,-G. The following line is correct: -- shared_flag='-G' -+ shared_flag='${wl}-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' -@@ -3748,935 +2346,845 @@ - fi - fi - -- # It seems that -bexpall does not export symbols beginning with -- # underscore (_), so it is better to generate a list of symbols to export. -- _LT_AC_TAGVAR(always_export_symbols, $1)=yes -+ # It seems that -bexpall can do strange things, so it is better to -+ # generate a list of symbols to export. -+ always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' -- # Determine the default libpath from the value encoded in an empty executable. -- _LT_AC_SYS_LIBPATH_AIX -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -- -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -- else -+ allow_undefined_flag='-berok' -+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' -+ archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -+ else - if test "$host_cpu" = ia64; then -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' -- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' -+ allow_undefined_flag="-z nodefs" -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else -- # Determine the default libpath from the value encoded in an empty executable. -- _LT_AC_SYS_LIBPATH_AIX -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -+ hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' -- # -bexpall does not export symbols beginning with underscore (_) -- _LT_AC_TAGVAR(always_export_symbols, $1)=yes -- # Exported symbols can be pulled into shared objects from archives -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -+ allow_undefined_flag='${wl}-berok' -+ # This is a bit strange, but is similar to how AIX traditionally builds -+ # it's shared libraries. -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; -- chorus*) -- case $cc_basename in -- *) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ # see comment about different semantics on the GNU ld section -+ ld_shlibs=no -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' -+ fix_srcfile_path='`cygpath -w "$srcfile"`' -+ ;; -+ -+ darwin* | rhapsody*) -+ case "$host_os" in -+ rhapsody* | darwin1.[[012]]) -+ allow_undefined_flag='-undefined suppress' -+ ;; -+ *) # Darwin 1.3 on -+ allow_undefined_flag='-flat_namespace -undefined suppress' -+ ;; - esac -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles -+ # `"' quotes if we put them in here... so don't! -+ archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' -+ # We need to add '_' to the symbols in $export_symbols first -+ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ whole_archive_flag_spec='-all_load $convenience' -+ ;; -+ -+ freebsd1*) -+ ld_shlibs=no -+ ;; -+ -+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -+ # support. Future versions do this automatically, but an explicit c++rt0.o -+ # does not break anything, and helps significantly (at the cost of a little -+ # extra space). -+ freebsd2.2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no - ;; - -+ # Unfortunately, older versions of FreeBSD 2 do not have this feature. -+ freebsd2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; - -- cygwin* | mingw* | pw32*) -- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -- # as there is no search path for DLLs. -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_AC_TAGVAR(always_export_symbols, $1)=no -- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- -- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -+ freebsd*) -+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ hpux9* | hpux10* | hpux11*) -+ case $host_os in -+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; -+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; -+ esac -+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_direct=yes -+ hardcode_minus_L=yes # Not in the search PATH, but as the default -+ # location of the library. -+ export_dynamic_flag_spec='${wl}-E' -+ ;; -+ -+ irix5* | irix6* | nonstopux*) -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='-rpath $libdir' - fi -- ;; -- darwin* | rhapsody*) -- case $host_os in -- rhapsody* | darwin1.[[012]]) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' -- ;; -- *) # Darwin 1.3 on -- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- else -- case ${MACOSX_DEPLOYMENT_TARGET} in -- 10.[[012]]) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- ;; -- 10.*) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' -- ;; -- esac -- fi -- ;; -- esac -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_AC_TAGVAR(hardcode_direct, $1)=no -- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' -- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -- -- if test "$GXX" = yes ; then -- lt_int_apple_cc_single_mod=no -- output_verbose_link_cmd='echo' -- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then -- lt_int_apple_cc_single_mod=yes -- fi -- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' -- else -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' -- fi -- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- else -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- fi -- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- else -- case $cc_basename in -- xlc*) -- output_verbose_link_cmd='echo' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' -- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- ;; -- *) -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- fi -- ;; -+ hardcode_libdir_separator=: -+ link_all_deplibs=yes -+ ;; - -- dgux*) -- case $cc_basename in -- ec++*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- ghcx*) -- # Green Hills C++ Compiler -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -+ netbsd* | knetbsd*-gnu) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -+ else -+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -+ fi -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no - ;; -- freebsd[[12]]*) -- # C++ shared libraries reported to be fairly broken before switch to ELF -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- freebsd-elf*) -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -- ;; -- freebsd* | kfreebsd*-gnu | dragonfly*) -- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF -- # conventions -- _LT_AC_TAGVAR(ld_shlibs, $1)=yes -- ;; -- gnu*) -- ;; -- hpux9*) -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, -- # but as the default -- # location of the library. -- -- case $cc_basename in -- CC*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- aCC*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- *) -- if test "$GXX" = yes; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- else -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- esac -+ -+ newsos6) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_shlibpath_var=no - ;; -- hpux10*|hpux11*) -- if test $with_gnu_ld = no; then -- case $host_cpu in -- hppa*64*) -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- ;; -- ia64*) -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -+ -+ openbsd*) -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ export_dynamic_flag_spec='${wl}-E' -+ else -+ case "$host_os" in -+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-R$libdir' - ;; - *) -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi -- case $host_cpu in -- hppa*64*) -- _LT_AC_TAGVAR(hardcode_direct, $1)=no -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- ia64*) -- _LT_AC_TAGVAR(hardcode_direct, $1)=no -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, -- # but as the default -- # location of the library. -- ;; -- *) -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, -- # but as the default -- # location of the library. -- ;; -- esac -+ ;; -+ -+ os2*) -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ allow_undefined_flag=unsupported -+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -+ ;; -+ -+ osf3*) -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ fi -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ ;; -+ -+ osf4* | osf5*) # as osf3* with the addition of -msym flag -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' -+ -+ #Both c and cxx compiler support -rpath directly -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ ;; -+ -+ sco3.2v5*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ export_dynamic_flag_spec='${wl}-Bexport' -+ ;; - -- case $cc_basename in -- CC*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- aCC*) -- case $host_cpu in -- hppa*64*|ia64*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' -- ;; -- *) -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- esac -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- *) -- if test "$GXX" = yes; then -- if test $with_gnu_ld = no; then -- case $host_cpu in -- ia64*|hppa*64*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' -- ;; -- *) -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- esac -- fi -- else -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- fi -+ solaris*) -+ # gcc --version < 3.0 without binutils cannot create self contained -+ # shared libraries reliably, requiring libgcc.a to resolve some of -+ # the object symbols generated in some cases. Libraries that use -+ # assert need libgcc.a to resolve __eprintf, for example. Linking -+ # a copy of libgcc.a into every shared library to guarantee resolving -+ # such symbols causes other problems: According to Tim Van Holder -+ # , C++ libraries end up with a separate -+ # (to the application) exception stack for one thing. -+ no_undefined_flag=' -z defs' -+ if test "$GCC" = yes; then -+ case `$CC --version 2>/dev/null` in -+ [[12]].*) -+ cat <&2 -+ -+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably -+*** create self contained shared libraries on Solaris systems, without -+*** introducing a dependency on libgcc.a. Therefore, libtool is disabling -+*** -no-undefined support, which will at least allow you to build shared -+*** libraries. However, you may find that when you link such libraries -+*** into an application without using GCC, you have to manually add -+*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to -+*** upgrade to a newer version of GCC. Another option is to rebuild your -+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. -+ -+EOF -+ no_undefined_flag= - ;; -+ esac -+ fi -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_shlibpath_var=no -+ case $host_os in -+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; -+ *) # Supported since Solaris 2.6 (maybe 2.5.1?) -+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - esac -+ link_all_deplibs=yes - ;; -- irix5* | irix6*) -- case $cc_basename in -- CC*) -- # SGI C++ -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- -- # Archives containing C++ object files must be created using -- # "CC -ar", where "CC" is the IRIX C++ compiler. This is -- # necessary to make sure instantiated templates are included -- # in the archive. -- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' -- ;; -- *) -- if test "$GXX" = yes; then -- if test "$with_gnu_ld" = no; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' -- fi -- fi -- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -- ;; -- esac -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -+ -+ sunos4*) -+ if test "x$host_vendor" = xsequent; then -+ # Use $CC to link under sequent, because it throws in some extra .o -+ # files that make .init and .fini sections work. -+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -+ fi -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no - ;; -- linux*) -- case $cc_basename in -- KCC*) -- # Kuck and Associates, Inc. (KAI) C++ Compiler -- -- # KCC will only create a shared library if the output file -- # ends with ".so" (or ".sl" for HP-UX), so rename the library -- # to its proper name (with version) after linking. -- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- -- # Archives containing C++ object files must be created using -- # "CC -Bstatic", where "CC" is the KAI C++ compiler. -- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' -- ;; -- icpc*) -- # Intel C++ -- with_gnu_ld=yes -- # version 8.0 and above of icpc choke on multiply defined symbols -- # if we add $predep_objects and $postdep_objects, however 7.1 and -- # earlier do not add the objects themselves. -- case `$CC -V 2>&1` in -- *"Version 7."*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- ;; -- *) # Version 8.0 or newer -- tmp_idyn= -- case $host_cpu in -- ia64*) tmp_idyn=' -i_dynamic';; -- esac -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- ;; -- esac -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -- ;; -- pgCC*) -- # Portland Group C++ compiler -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -+ -+ sysv4) -+ case $host_vendor in -+ sni) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes # is this really true??? -+ ;; -+ siemens) -+ ## LD is ld it makes a PLAMLIB -+ ## CC just makes a GrossModule. -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ reload_cmds='$CC -r -o $output$reload_objs' -+ hardcode_direct=no -+ ;; -+ motorola) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; -- cxx*) -- # Compaq C++ -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' -- -- runpath_var=LD_RUN_PATH -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; - esac -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no - ;; -- lynxos*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- m88k*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- mvs*) -- case $cc_basename in -- cxx*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -+ -+ sysv4.3*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ export_dynamic_flag_spec='-Bexport' -+ ;; -+ -+ sysv5*) -+ no_undefined_flag=' -z text' -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec= -+ hardcode_shlibpath_var=no -+ runpath_var='LD_RUN_PATH' -+ ;; -+ -+ uts4*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no - ;; -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' -- wlarc= -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -+ -+ dgux*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ ld_shlibs=yes - fi -- # Workaround some broken pre-1.5 toolchains -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; -- openbsd2*) -- # C++ shared libraries are fairly broken -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -+ -+ sysv4.2uw2*) -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=no -+ hardcode_shlibpath_var=no -+ hardcode_runpath_var=yes -+ runpath_var=LD_RUN_PATH - ;; -- openbsd*) -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ -+ sysv5uw7* | unixware7*) -+ no_undefined_flag='${wl}-z ${wl}text' -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi -- output_verbose_link_cmd='echo' -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no - ;; -- osf3*) -- case $cc_basename in -- KCC*) -- # Kuck and Associates, Inc. (KAI) C++ Compiler -- -- # KCC will only create a shared library if the output file -- # ends with ".so" (or ".sl" for HP-UX), so rename the library -- # to its proper name (with version) after linking. -- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Archives containing C++ object files must be created using -- # "CC -Bstatic", where "CC" is the KAI C++ compiler. -- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' -- -- ;; -- RCC*) -- # Rational C++ 2.4.1 -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- cxx*) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- *) -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -- else -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- esac -+ *) -+ ld_shlibs=no - ;; -- osf4* | osf5*) -- case $cc_basename in -- KCC*) -- # Kuck and Associates, Inc. (KAI) C++ Compiler -- -- # KCC will only create a shared library if the output file -- # ends with ".so" (or ".sl" for HP-UX), so rename the library -- # to its proper name (with version) after linking. -- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Archives containing C++ object files must be created using -- # the KAI C++ compiler. -- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' -- ;; -- RCC*) -- # Rational C++ 2.4.1 -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- cxx*) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ -- echo "-hidden">> $lib.exp~ -- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ -- $rm $lib.exp' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- *) -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -+ esac -+fi -+AC_MSG_RESULT([$ld_shlibs]) -+test "$ld_shlibs" = no && can_build_shared=no -+ -+# Check hardcoding attributes. -+AC_MSG_CHECKING([how to hardcode library paths into programs]) -+hardcode_action= -+if test -n "$hardcode_libdir_flag_spec" || \ -+ test -n "$runpath_var"; then -+ -+ # We can hardcode non-existant directories. -+ if test "$hardcode_direct" != no && -+ # If the only mechanism to avoid hardcoding is shlibpath_var, we -+ # have to relink, otherwise we might link with an installed library -+ # when we should be linking with a yet-to-be-installed one -+ ## test "$hardcode_shlibpath_var" != no && -+ test "$hardcode_minus_L" != no; then -+ # Linking always hardcodes the temporary library directory. -+ hardcode_action=relink -+ else -+ # We can link without hardcoding, and we can hardcode nonexisting dirs. -+ hardcode_action=immediate -+ fi -+else -+ # We cannot hardcode anything, or else we can only hardcode existing -+ # directories. -+ hardcode_action=unsupported -+fi -+AC_MSG_RESULT([$hardcode_action]) -+ -+striplib= -+old_striplib= -+AC_MSG_CHECKING([whether stripping libraries is possible]) -+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -+ test -z "$striplib" && striplib="$STRIP --strip-unneeded" -+ AC_MSG_RESULT([yes]) -+else -+ AC_MSG_RESULT([no]) -+fi -+ -+reload_cmds='$LD$reload_flag -o $output$reload_objs' -+test -z "$deplibs_check_method" && deplibs_check_method=unknown -+ -+# PORTME Fill in your ld.so characteristics -+AC_MSG_CHECKING([dynamic linker characteristics]) -+library_names_spec= -+libname_spec='lib$name' -+soname_spec= -+postinstall_cmds= -+postuninstall_cmds= -+finish_cmds= -+finish_eval= -+shlibpath_var= -+shlibpath_overrides_runpath=unknown -+version_type=none -+dynamic_linker="$host_os ld.so" -+sys_lib_dlsearch_path_spec="/lib /usr/lib" -+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+ -+case $host_os in -+aix3*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix $libname.a' -+ shlibpath_var=LIBPATH - -+ # AIX has no versioning support, so we append a major version to the name. -+ soname_spec='${libname}${release}.so$major' -+ ;; -+ -+aix4* | aix5*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ hardcode_into_libs=yes -+ if test "$host_cpu" = ia64; then -+ # AIX 5 supports IA64 -+ library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ else -+ # With GCC up to 2.95.x, collect2 would create an import file -+ # for dependence libraries. The import file would start with -+ # the line `#! .'. This would cause the generated library to -+ # depend on `.', always an invalid library. This was fixed in -+ # development snapshots of GCC prior to 3.0. -+ case $host_os in -+ aix4 | aix4.[[01]] | aix4.[[01]].*) -+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -+ echo ' yes ' -+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -+ : - else -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -+ can_build_shared=no - fi - ;; - esac -+ # AIX (on Power*) has no versioning support, so currently we can -+ # not hardcode correct soname into executable. Probably we can -+ # add versioning support to collect2, so additional links can -+ # be useful in future. -+ if test "$aix_use_runtimelinking" = yes; then -+ # If using run time linking (on AIX 4.2 or later) use lib.so -+ # instead of lib.a to let people know that these are not -+ # typical AIX shared libraries. -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ else -+ # We preserve .a as extension for shared libraries through AIX4.2 -+ # and later when we are not doing run time linking. -+ library_names_spec='${libname}${release}.a $libname.a' -+ soname_spec='${libname}${release}.so$major' -+ fi -+ shlibpath_var=LIBPATH -+ fi -+ hardcode_into_libs=yes -+ ;; -+ -+amigaos*) -+ library_names_spec='$libname.ixlibrary $libname.a' -+ # Create ${libname}_ixlibrary.a entries in /sys/libs. -+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' -+ ;; -+ -+beos*) -+ library_names_spec='${libname}.so' -+ dynamic_linker="$host_os ld.so" -+ shlibpath_var=LIBRARY_PATH -+ ;; -+ -+bsdi4*) -+ version_type=linux -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -+ export_dynamic_flag_spec=-rdynamic -+ # the default ld.so.conf also contains /usr/contrib/lib and -+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -+ # libtool to hard-code these into programs -+ ;; -+ -+cygwin* | mingw* | pw32*) -+ version_type=windows -+ need_version=no -+ need_lib_prefix=no -+ case $GCC,$host_os in -+ yes,cygwin*) -+ library_names_spec='$libname.dll.a' -+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' -+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog .libs/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $rm \$dlpath' - ;; -- psos*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- sco*) -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -- case $cc_basename in -- CC*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -+ yes,mingw*) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' -+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` - ;; -- sunos4*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.x -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- lcc*) -- # Lucid -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -+ yes,pw32*) -+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' - ;; -- solaris*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.2, 5.x and Centerline C++ -- _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes -- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -- -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- case $host_os in -- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; -- *) -- # The C++ compiler is used as linker so we must use $wl -- # flag to pass the commands to the underlying system -- # linker. We must also pass each convience library through -- # to the system linker between allextract/defaultextract. -- # The C++ compiler will combine linker options so we -- # cannot just pass the convience library names through -- # without $wl. -- # Supported since Solaris 2.6 (maybe 2.5.1?) -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' -- ;; -- esac -- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -+ *) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' -+ ;; -+ esac -+ dynamic_linker='Win32 ld.exe' -+ # FIXME: first we should search . and the directory the executable is in -+ shlibpath_var=PATH -+ ;; -+ -+darwin* | rhapsody*) -+ dynamic_linker="$host_os dyld" -+ version_type=darwin -+ need_lib_prefix=no -+ need_version=no -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. -+ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' -+ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' -+ shlibpath_overrides_runpath=yes -+ shlibpath_var=DYLD_LIBRARY_PATH -+ ;; - -- output_verbose_link_cmd='echo' -+freebsd1*) -+ dynamic_linker=no -+ ;; - -- # Archives containing C++ object files must be created using -- # "CC -xar", where "CC" is the Sun C++ compiler. This is -- # necessary to make sure instantiated templates are included -- # in the archive. -- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' -- ;; -- gcx*) -- # Green Hills C++ Compiler -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -+kfreebsd*-gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ dynamic_linker='GNU/FreeBSD ld.so' -+ ;; -+ -+freebsd*) -+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` -+ version_type=freebsd-$objformat -+ case $version_type in -+ freebsd-elf*) -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' -+ need_version=no -+ need_lib_prefix=no -+ ;; -+ freebsd-*) -+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' -+ need_version=yes -+ ;; -+ esac -+ shlibpath_var=LD_LIBRARY_PATH -+ case $host_os in -+ freebsd2*) -+ shlibpath_overrides_runpath=yes -+ ;; -+ *) -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ ;; -+ esac -+ ;; -+ -+gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ hardcode_into_libs=yes -+ ;; - -- # The C++ compiler must be used to create the archive. -- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' -- ;; -- *) -- # GNU C++ compiler with Solaris linker -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' -- if $CC --version | grep -v '^2\.7' > /dev/null; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" -- else -- # g++ 2.7 appears to require `-G' NOT `-shared' on this -- # platform. -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" -- fi -+hpux9* | hpux10* | hpux11*) -+ # Give a soname corresponding to the major version so that dld.sl refuses to -+ # link against other versions. -+ dynamic_linker="$host_os dld.sl" -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_var=SHLIB_PATH -+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' -+ soname_spec='${libname}${release}.sl$major' -+ # HP-UX runs *really* slowly unless shared libraries are mode 555. -+ postinstall_cmds='chmod 555 $lib' -+ ;; - -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' -- fi -- ;; -- esac -- ;; -- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -- ;; -- tandem*) -- case $cc_basename in -- NCC*) -- # NonStop-UX NCC 3.20 -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- ;; -- vxworks*) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -+irix5* | irix6* | nonstopux*) -+ case $host_os in -+ nonstopux*) version_type=nonstopux ;; -+ *) version_type=irix ;; -+ esac -+ need_lib_prefix=no -+ need_version=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' -+ case $host_os in -+ irix5* | nonstopux*) -+ libsuff= shlibsuff= - ;; - *) -- # FIXME: insert proper C++ library support -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -+ case $LD in # libtool.m4 will add one of these switches to LD -+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; -+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; -+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; -+ *) libsuff= shlibsuff= libmagic=never-match;; -+ esac - ;; --esac --AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) --test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -+ esac -+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -+ shlibpath_overrides_runpath=no -+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -+ ;; - --_LT_AC_TAGVAR(GCC, $1)="$GXX" --_LT_AC_TAGVAR(LD, $1)="$LD" -+# No shared lib support for Linux oldld, aout, or coff. -+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) -+ dynamic_linker=no -+ ;; - --AC_LIBTOOL_POSTDEP_PREDEP($1) --AC_LIBTOOL_PROG_COMPILER_PIC($1) --AC_LIBTOOL_PROG_CC_C_O($1) --AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) --AC_LIBTOOL_PROG_LD_SHLIBS($1) --AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) --AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) --AC_LIBTOOL_SYS_LIB_STRIP --AC_LIBTOOL_DLOPEN_SELF($1) -- --AC_LIBTOOL_CONFIG($1) -- --AC_LANG_POP --CC=$lt_save_CC --LDCXX=$LD --LD=$lt_save_LD --GCC=$lt_save_GCC --with_gnu_ldcxx=$with_gnu_ld --with_gnu_ld=$lt_save_with_gnu_ld --lt_cv_path_LDCXX=$lt_cv_path_LD --lt_cv_path_LD=$lt_save_path_LD --lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld --lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld --])# AC_LIBTOOL_LANG_CXX_CONFIG -+# This must be Linux ELF. -+linux-gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes - --# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) --# ------------------------ --# Figure out "hidden" library dependencies from verbose --# compiler output when linking a shared library. --# Parse the compiler output and extract the necessary --# objects, libraries and library flags. --AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ --dnl we can't use the lt_simple_compile_test_code here, --dnl because it contains code intended for an executable, --dnl not a library. It's possible we should let each --dnl tag define a new lt_????_link_test_code variable, --dnl but it's only used here... --ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext </dev/null; then -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ dynamic_linker='NetBSD (a.out) ld.so' -+ else -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' -+ soname_spec='${libname}${release}.so$major' -+ dynamic_linker='NetBSD ld.elf_so' -+ fi -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ hardcode_into_libs=yes -+ ;; - -- *) ;; # Ignore the rest. -+newsos6) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ ;; - -+openbsd*) -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ case "$host_os" in -+ openbsd2.[[89]] | openbsd2.[[89]].*) -+ shlibpath_overrides_runpath=no -+ ;; -+ *) -+ shlibpath_overrides_runpath=yes -+ ;; - esac -- done -+ else -+ shlibpath_overrides_runpath=yes -+ fi -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; - -- # Clean up. -- rm -f a.out a.exe --else -- echo "libtool.m4: error: problem compiling $1 test program" --fi -+os2*) -+ libname_spec='$name' -+ need_lib_prefix=no -+ library_names_spec='$libname.dll $libname.a' -+ dynamic_linker='OS/2 ld.exe' -+ shlibpath_var=LIBPATH -+ ;; -+ -+osf3* | osf4* | osf5*) -+ version_type=osf -+ need_version=no -+ need_lib_prefix=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -+ hardcode_into_libs=yes -+ ;; - --$rm -f confest.$objext -+sco3.2v5*) -+ version_type=osf -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; - --# PORTME: override above test on systems where it is broken --ifelse([$1],[CXX], --[case $host_os in - solaris*) -- case $cc_basename in -- CC*) -- # Adding this requires a known-good setup of shared libraries for -- # Sun compiler versions before 5.6, else PIC objects from an old -- # archive will be linked into the output, leading to subtle bugs. -- _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' -- ;; -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ hardcode_into_libs=yes -+ # ldd complains unless libraries are executable -+ postinstall_cmds='chmod +x $lib' -+ ;; -+ -+sunos4*) -+ version_type=sunos -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ if test "$with_gnu_ld" = yes; then -+ need_lib_prefix=no -+ fi -+ need_version=yes -+ ;; -+ -+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ case $host_vendor in -+ sni) -+ shlibpath_overrides_runpath=no -+ need_lib_prefix=no -+ export_dynamic_flag_spec='${wl}-Blargedynsym' -+ runpath_var=LD_RUN_PATH -+ ;; -+ siemens) -+ need_lib_prefix=no -+ ;; -+ motorola) -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_overrides_runpath=no -+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -+ ;; - esac --esac --]) -+ ;; - --case " $_LT_AC_TAGVAR(postdeps, $1) " in --*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; --esac --])# AC_LIBTOOL_POSTDEP_PREDEP -+uts4*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; - --# AC_LIBTOOL_LANG_F77_CONFIG --# ------------------------ --# Ensure that the configuration vars for the C compiler are --# suitably defined. Those variables are subsequently used by --# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. --AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) --AC_DEFUN([_LT_AC_LANG_F77_CONFIG], --[AC_REQUIRE([AC_PROG_F77]) --AC_LANG_PUSH(Fortran 77) -- --_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no --_LT_AC_TAGVAR(allow_undefined_flag, $1)= --_LT_AC_TAGVAR(always_export_symbols, $1)=no --_LT_AC_TAGVAR(archive_expsym_cmds, $1)= --_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= --_LT_AC_TAGVAR(hardcode_direct, $1)=no --_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= --_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= --_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= --_LT_AC_TAGVAR(hardcode_minus_L, $1)=no --_LT_AC_TAGVAR(hardcode_automatic, $1)=no --_LT_AC_TAGVAR(module_cmds, $1)= --_LT_AC_TAGVAR(module_expsym_cmds, $1)= --_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown --_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds --_LT_AC_TAGVAR(no_undefined_flag, $1)= --_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= --_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no -- --# Source file extension for f77 test sources. --ac_ext=f -- --# Object file extension for compiled f77 test sources. --objext=o --_LT_AC_TAGVAR(objext, $1)=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code=" subroutine t\n return\n end\n" -- --# Code to be used in simple link tests --lt_simple_link_test_code=" program t\n end\n" -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. --_LT_AC_SYS_COMPILER -- --# save warnings/boilerplate of simple test code --_LT_COMPILER_BOILERPLATE --_LT_LINKER_BOILERPLATE -+dgux*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; - --# Allow CC to be a program name with arguments. --lt_save_CC="$CC" --CC=${F77-"f77"} --compiler=$CC --_LT_AC_TAGVAR(compiler, $1)=$CC --_LT_CC_BASENAME([$compiler]) -+sysv4*MP*) -+ if test -d /usr/nec ;then -+ version_type=linux -+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' -+ soname_spec='$libname.so.$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ fi -+ ;; -+ -+*) -+ dynamic_linker=no -+ ;; -+esac -+AC_MSG_RESULT([$dynamic_linker]) -+test "$dynamic_linker" = no && can_build_shared=no - -+# Report the final consequences. - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - -@@ -4685,7 +3193,7 @@ - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. --case $host_os in -+case "$host_os" in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then -@@ -4693,7 +3201,8 @@ - postinstall_cmds='$RANLIB $lib' - fi - ;; --aix4* | aix5*) -+ -+aix4*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi -@@ -4706,207 +3215,114 @@ - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - --test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -- --_LT_AC_TAGVAR(GCC, $1)="$G77" --_LT_AC_TAGVAR(LD, $1)="$LD" -- --AC_LIBTOOL_PROG_COMPILER_PIC($1) --AC_LIBTOOL_PROG_CC_C_O($1) --AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) --AC_LIBTOOL_PROG_LD_SHLIBS($1) --AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) --AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) --AC_LIBTOOL_SYS_LIB_STRIP -- -- --AC_LIBTOOL_CONFIG($1) -- --AC_LANG_POP --CC="$lt_save_CC" --])# AC_LIBTOOL_LANG_F77_CONFIG -- -- --# AC_LIBTOOL_LANG_GCJ_CONFIG --# -------------------------- --# Ensure that the configuration vars for the C compiler are --# suitably defined. Those variables are subsequently used by --# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. --AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) --AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], --[AC_LANG_SAVE -- --# Source file extension for Java test sources. --ac_ext=java -- --# Object file extension for compiled Java test sources. --objext=o --_LT_AC_TAGVAR(objext, $1)=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code="class foo {}\n" -- --# Code to be used in simple link tests --lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. --_LT_AC_SYS_COMPILER -- --# save warnings/boilerplate of simple test code --_LT_COMPILER_BOILERPLATE --_LT_LINKER_BOILERPLATE -- --# Allow CC to be a program name with arguments. --lt_save_CC="$CC" --CC=${GCJ-"gcj"} --compiler=$CC --_LT_AC_TAGVAR(compiler, $1)=$CC --_LT_CC_BASENAME([$compiler]) -- --# GCJ did not exist at the time GCC didn't implicitly link libc in. --_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -- --_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -- --AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) --AC_LIBTOOL_PROG_COMPILER_PIC($1) --AC_LIBTOOL_PROG_CC_C_O($1) --AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) --AC_LIBTOOL_PROG_LD_SHLIBS($1) --AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) --AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) --AC_LIBTOOL_SYS_LIB_STRIP --AC_LIBTOOL_DLOPEN_SELF($1) -- --AC_LIBTOOL_CONFIG($1) -- --AC_LANG_RESTORE --CC="$lt_save_CC" --])# AC_LIBTOOL_LANG_GCJ_CONFIG -+if test "$hardcode_action" = relink; then -+ # Fast installation is not supported -+ enable_fast_install=no -+elif test "$shlibpath_overrides_runpath" = yes || -+ test "$enable_shared" = no; then -+ # Fast installation is not necessary -+ enable_fast_install=needless -+fi - -+variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -+if test "$GCC" = yes; then -+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -+fi - --# AC_LIBTOOL_LANG_RC_CONFIG --# -------------------------- --# Ensure that the configuration vars for the Windows resource compiler are --# suitably defined. Those variables are subsequently used by --# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. --AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) --AC_DEFUN([_LT_AC_LANG_RC_CONFIG], --[AC_LANG_SAVE -- --# Source file extension for RC test sources. --ac_ext=rc -- --# Object file extension for compiled RC test sources. --objext=o --_LT_AC_TAGVAR(objext, $1)=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' -- --# Code to be used in simple link tests --lt_simple_link_test_code="$lt_simple_compile_test_code" -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. --_LT_AC_SYS_COMPILER -- --# save warnings/boilerplate of simple test code --_LT_COMPILER_BOILERPLATE --_LT_LINKER_BOILERPLATE -+AC_LIBTOOL_DLOPEN_SELF - --# Allow CC to be a program name with arguments. --lt_save_CC="$CC" --CC=${RC-"windres"} --compiler=$CC --_LT_AC_TAGVAR(compiler, $1)=$CC --_LT_CC_BASENAME([$compiler]) --_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes -+if test "$enable_shared" = yes && test "$GCC" = yes; then -+ case $archive_cmds in -+ *'~'*) -+ # FIXME: we may have to deal with multi-command sequences. -+ ;; -+ '$CC '*) -+ # Test whether the compiler implicitly links with -lc since on some -+ # systems, -lgcc has to come before -lc. If gcc already passes -lc -+ # to ld, don't add -lc before -lgcc. -+ AC_MSG_CHECKING([whether -lc should be explicitly linked in]) -+ AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], -+ [$rm conftest* -+ echo 'static int dummy;' > conftest.$ac_ext -+ -+ if AC_TRY_EVAL(ac_compile); then -+ soname=conftest -+ lib=conftest -+ libobjs=conftest.$ac_objext -+ deplibs= -+ wl=$lt_cv_prog_cc_wl -+ compiler_flags=-v -+ linker_flags=-v -+ verstring= -+ output_objdir=. -+ libname=conftest -+ save_allow_undefined_flag=$allow_undefined_flag -+ allow_undefined_flag= -+ if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) -+ then -+ lt_cv_archive_cmds_need_lc=no -+ else -+ lt_cv_archive_cmds_need_lc=yes -+ fi -+ allow_undefined_flag=$save_allow_undefined_flag -+ else -+ cat conftest.err 1>&5 -+ fi]) -+ AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) -+ ;; -+ esac -+fi -+need_lc=${lt_cv_archive_cmds_need_lc-yes} - --AC_LIBTOOL_CONFIG($1) -+# The second clause should only fire when bootstrapping the -+# libtool distribution, otherwise you forgot to ship ltmain.sh -+# with your package, and you will get complaints that there are -+# no rules to generate ltmain.sh. -+if test -f "$ltmain"; then -+ : -+else -+ # If there is no Makefile yet, we rely on a make rule to execute -+ # `config.status --recheck' to rerun these tests and create the -+ # libtool script then. -+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` -+ if test -f "$ltmain_in"; then -+ test -f Makefile && make "$ltmain" -+ fi -+fi - --AC_LANG_RESTORE --CC="$lt_save_CC" --])# AC_LIBTOOL_LANG_RC_CONFIG -+if test -f "$ltmain"; then -+ trap "$rm \"${ofile}T\"; exit 1" 1 2 15 -+ $rm -f "${ofile}T" - -+ echo creating $ofile - --# AC_LIBTOOL_CONFIG([TAGNAME]) --# ---------------------------- --# If TAGNAME is not passed, then create an initial libtool script --# with a default configuration from the untagged config vars. Otherwise --# add code to config.status for appending the configuration named by --# TAGNAME from the matching tagged config vars. --AC_DEFUN([AC_LIBTOOL_CONFIG], --[# The else clause should only fire when bootstrapping the --# libtool distribution, otherwise you forgot to ship ltmain.sh --# with your package, and you will get complaints that there are --# no rules to generate ltmain.sh. --if test -f "$ltmain"; then -- # See if we are running on zsh, and set the options which allow our commands through -- # without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST -- fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. -- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ -- SED SHELL STRIP \ -- libname_spec library_names_spec soname_spec extract_expsyms_cmds \ -- old_striplib striplib file_magic_cmd finish_cmds finish_eval \ -- deplibs_check_method reload_flag reload_cmds need_locks \ -- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ -- lt_cv_sys_global_symbol_to_c_name_address \ -+ for var in echo old_CC old_CFLAGS SED \ -+ AR AR_FLAGS CC LD LN_S NM SHELL STRIP \ -+ reload_flag reload_cmds wl \ -+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ -+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ -+ library_names_spec soname_spec \ -+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ -+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ -+ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ -+ old_striplib striplib file_magic_cmd export_symbols_cmds \ -+ deplibs_check_method allow_undefined_flag no_undefined_flag \ -+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ -+ global_symbol_to_c_name_address \ -+ hardcode_libdir_flag_spec hardcode_libdir_separator \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -- old_postinstall_cmds old_postuninstall_cmds \ -- _LT_AC_TAGVAR(compiler, $1) \ -- _LT_AC_TAGVAR(CC, $1) \ -- _LT_AC_TAGVAR(LD, $1) \ -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ -- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ -- _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ -- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ -- _LT_AC_TAGVAR(old_archive_cmds, $1) \ -- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ -- _LT_AC_TAGVAR(predep_objects, $1) \ -- _LT_AC_TAGVAR(postdep_objects, $1) \ -- _LT_AC_TAGVAR(predeps, $1) \ -- _LT_AC_TAGVAR(postdeps, $1) \ -- _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ -- _LT_AC_TAGVAR(archive_cmds, $1) \ -- _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ -- _LT_AC_TAGVAR(postinstall_cmds, $1) \ -- _LT_AC_TAGVAR(postuninstall_cmds, $1) \ -- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ -- _LT_AC_TAGVAR(allow_undefined_flag, $1) \ -- _LT_AC_TAGVAR(no_undefined_flag, $1) \ -- _LT_AC_TAGVAR(export_symbols_cmds, $1) \ -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ -- _LT_AC_TAGVAR(hardcode_automatic, $1) \ -- _LT_AC_TAGVAR(module_cmds, $1) \ -- _LT_AC_TAGVAR(module_expsym_cmds, $1) \ -- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ -- _LT_AC_TAGVAR(exclude_expsyms, $1) \ -- _LT_AC_TAGVAR(include_expsyms, $1); do -+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do - - case $var in -- _LT_AC_TAGVAR(old_archive_cmds, $1) | \ -- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ -- _LT_AC_TAGVAR(archive_cmds, $1) | \ -- _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ -- _LT_AC_TAGVAR(module_cmds, $1) | \ -- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ -- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ -- _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ -- extract_expsyms_cmds | reload_cmds | finish_cmds | \ -- postinstall_cmds | postuninstall_cmds | \ -+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ -- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ -+ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ -+ postinstall_cmds | postuninstall_cmds | \ -+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; -@@ -4916,31 +3332,14 @@ - esac - done - -- case $lt_echo in -- *'\[$]0 --fallback-echo"') -- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` -- ;; -- esac -- --ifelse([$1], [], -- [cfgfile="${ofile}T" -- trap "$rm \"$cfgfile\"; exit 1" 1 2 15 -- $rm -f "$cfgfile" -- AC_MSG_NOTICE([creating $ofile])], -- [cfgfile="$ofile"]) -- -- cat <<__EOF__ >> "$cfgfile" --ifelse([$1], [], --[#! $SHELL -+ cat <<__EOF__ > "${ofile}T" -+#! $SHELL - --# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. - # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 --# Free Software Foundation, Inc. --# --# This file is part of GNU Libtool: -+# Copyright (C) 1996-2000 Free Software Foundation, Inc. - # Originally by Gordon Matzigkeit , 1996 - # - # This program is free software; you can redistribute it and/or modify -@@ -4955,28 +3354,24 @@ - # - # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --# A sed program that does not truncate output. -+# A sed that does not truncate output. - SED=$lt_SED - - # Sed that helps us avoid accidentally triggering echo(1) options like -n. --Xsed="$SED -e 1s/^X//" -+Xsed="${SED} -e s/^X//" - - # The HP-UX ksh and POSIX shell print the target directory to stdout - # if CDPATH is set. --(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - --# The names of the tagged configurations supported by this script. --available_tags= -- --# ### BEGIN LIBTOOL CONFIG], --[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) -+# ### BEGIN LIBTOOL CONFIG - - # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -@@ -4990,10 +3385,7 @@ - build_old_libs=$enable_static - - # Whether or not to add -lc for building shared libraries. --build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) -- --# Whether or not to disallow shared libs when runtime libs are static --allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) -+build_libtool_need_lc=$need_lc - - # Whether or not to optimize for fast installation. - fast_install=$enable_fast_install -@@ -5001,12 +3393,6 @@ - # The host system. - host_alias=$host_alias - host=$host --host_os=$host_os -- --# The build system. --build_alias=$build_alias --build=$build --build_os=$build_os - - # An echo program that does not interpret backslashes. - echo=$lt_echo -@@ -5015,20 +3401,14 @@ - AR=$lt_AR - AR_FLAGS=$lt_AR_FLAGS - --# A C compiler. --LTCC=$lt_LTCC -- --# A language-specific compiler. --CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) -+# The default C compiler. -+CC=$lt_CC - - # Is the compiler the GNU C compiler? --with_gcc=$_LT_AC_TAGVAR(GCC, $1) -- --# An ERE matcher. --EGREP=$lt_EGREP -+with_gcc=$GCC - - # The linker used to build libraries. --LD=$lt_[]_LT_AC_TAGVAR(LD, $1) -+LD=$lt_LD - - # Whether we need hard or soft links. - LN_S=$lt_LN_S -@@ -5059,7 +3439,7 @@ - reload_cmds=$lt_reload_cmds - - # How to pass a linker flag through the compiler. --wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) -+wl=$lt_wl - - # Object file suffix (normally "o"). - objext="$ac_objext" -@@ -5067,23 +3447,20 @@ - # Old archive suffix (normally "a"). - libext="$libext" - --# Shared library suffix (normally ".so"). --shrext_cmds='$shrext_cmds' -- - # Executable file suffix (normally ""). - exeext="$exeext" - - # Additional compiler flags for building library objects. --pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -+pic_flag=$lt_pic_flag - pic_mode=$pic_mode - --# What is the maximum length of a command? --max_cmd_len=$lt_cv_sys_max_cmd_len -- - # Does compiler simultaneously support -c and -o options? --compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) -+compiler_c_o=$lt_compiler_c_o -+ -+# Can we write directly to a .lo ? -+compiler_o_lo=$lt_compiler_o_lo - --# Must we lock files when doing compilation? -+# Must we lock files when doing compilation ? - need_locks=$lt_need_locks - - # Do we need the lib prefix for modules? -@@ -5093,1864 +3470,933 @@ - need_version=$need_version - - # Whether dlopen is supported. --dlopen_support=$enable_dlopen -- --# Whether dlopen of programs is supported. --dlopen_self=$enable_dlopen_self -- --# Whether dlopen of statically linked programs is supported. --dlopen_self_static=$enable_dlopen_self_static -- --# Compiler flag to prevent dynamic linking. --link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) -- --# Compiler flag to turn off builtin functions. --no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -- --# Compiler flag to allow reflexive dlopens. --export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) -- --# Compiler flag to generate shared objects directly from archives. --whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) -- --# Compiler flag to generate thread-safe objects. --thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) -- --# Library versioning type. --version_type=$version_type -- --# Format of library name prefix. --libname_spec=$lt_libname_spec -- --# List of archive names. First name is the real one, the rest are links. --# The last name is the one that the linker finds with -lNAME. --library_names_spec=$lt_library_names_spec -- --# The coded name of the library, if different from the real name. --soname_spec=$lt_soname_spec -- --# Commands used to build and install an old-style archive. --RANLIB=$lt_RANLIB --old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) --old_postinstall_cmds=$lt_old_postinstall_cmds --old_postuninstall_cmds=$lt_old_postuninstall_cmds -- --# Create an old-style archive from a shared archive. --old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) -- --# Create a temporary old-style archive to link instead of a shared archive. --old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) -- --# Commands used to build and install a shared archive. --archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) --archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) --postinstall_cmds=$lt_postinstall_cmds --postuninstall_cmds=$lt_postuninstall_cmds -- --# Commands used to build a loadable module (assumed same as above if empty) --module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) --module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) -- --# Commands to strip libraries. --old_striplib=$lt_old_striplib --striplib=$lt_striplib -- --# Dependencies to place before the objects being linked to create a --# shared library. --predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) -- --# Dependencies to place before the objects being linked to create a --# shared library. --predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) -- --# The library search path used internally by the compiler when linking --# a shared library. --compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) -- --# Method to check whether dependent libraries are shared objects. --deplibs_check_method=$lt_deplibs_check_method -- --# Command to use when deplibs_check_method == file_magic. --file_magic_cmd=$lt_file_magic_cmd -- --# Flag that allows shared libraries with undefined symbols to be built. --allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) -- --# Flag that forces no undefined symbols. --no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) -- --# Commands used to finish a libtool library installation in a directory. --finish_cmds=$lt_finish_cmds -- --# Same as above, but a single script fragment to be evaled but not shown. --finish_eval=$lt_finish_eval -- --# Take the output of nm and produce a listing of raw symbols and C names. --global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -- --# Transform the output of nm in a proper C declaration --global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -- --# Transform the output of nm in a C name address pair --global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -- --# This is the shared library runtime path variable. --runpath_var=$runpath_var -- --# This is the shared library path variable. --shlibpath_var=$shlibpath_var -- --# Is shlibpath searched before the hard-coded library search path? --shlibpath_overrides_runpath=$shlibpath_overrides_runpath -- --# How to hardcode a shared library path into an executable. --hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) -- --# Whether we should hardcode library paths into libraries. --hardcode_into_libs=$hardcode_into_libs -- --# Flag to hardcode \$libdir into a binary during linking. --# This must work even if \$libdir does not exist. --hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) -- --# If ld is used when linking, flag to hardcode \$libdir into --# a binary during linking. This must work even if \$libdir does --# not exist. --hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) -- --# Whether we need a single -rpath flag with a separated argument. --hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) -- --# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the --# resulting binary. --hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) -- --# Set to yes if using the -LDIR flag during linking hardcodes DIR into the --# resulting binary. --hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) -- --# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into --# the resulting binary. --hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) -- --# Set to yes if building a shared library automatically hardcodes DIR into the library --# and all subsequent libraries and executables linked against it. --hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) -- --# Variables whose values should be saved in libtool wrapper scripts and --# restored at relink time. --variables_saved_for_relink="$variables_saved_for_relink" -- --# Whether libtool must link a program against all its dependency libraries. --link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) -- --# Compile-time system search path for libraries --sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -- --# Run-time system search path for libraries --sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -- --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" -- --# Set to yes if exported symbols are required. --always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) -- --# The commands to list exported symbols. --export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) -- --# The commands to extract the exported symbol list from a shared archive. --extract_expsyms_cmds=$lt_extract_expsyms_cmds -- --# Symbols that should not be listed in the preloaded symbols. --exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) -- --# Symbols that must always be exported. --include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) -- --ifelse([$1],[], --[# ### END LIBTOOL CONFIG], --[# ### END LIBTOOL TAG CONFIG: $tagname]) -- --__EOF__ -- --ifelse([$1],[], [ -- case $host_os in -- aix3*) -- cat <<\EOF >> "$cfgfile" -- --# AIX sometimes has problems with the GCC collect2 program. For some --# reason, if we set the COLLECT_NAMES environment variable, the problems --# vanish in a puff of smoke. --if test "X${COLLECT_NAMES+set}" != Xset; then -- COLLECT_NAMES= -- export COLLECT_NAMES --fi --EOF -- ;; -- esac -- -- # We use sed instead of cat because bash on DJGPP gets confused if -- # if finds mixed CR/LF and LF-only lines. Since sed operates in -- # text mode, it properly converts lines to CR/LF. This bash problem -- # is reportedly fixed, but why not run on old versions too? -- sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || \ -- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") -- chmod +x "$ofile" --]) --else -- # If there is no Makefile yet, we rely on a make rule to execute -- # `config.status --recheck' to rerun these tests and create the -- # libtool script then. -- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` -- if test -f "$ltmain_in"; then -- test -f Makefile && make "$ltmain" -- fi --fi --])# AC_LIBTOOL_CONFIG -- -- --# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) --# ------------------------------------------- --AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], --[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -- --_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -- --if test "$GCC" = yes; then -- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -- -- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], -- lt_cv_prog_compiler_rtti_exceptions, -- [-fno-rtti -fno-exceptions], [], -- [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) --fi --])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI -- -- --# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE --# --------------------------------- --AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], --[AC_REQUIRE([AC_CANONICAL_HOST]) --AC_REQUIRE([AC_PROG_NM]) --AC_REQUIRE([AC_OBJEXT]) --# Check for command to grab the raw symbol name followed by C symbol from nm. --AC_MSG_CHECKING([command to parse $NM output from $compiler object]) --AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], --[ --# These are sane defaults that work on at least a few old systems. --# [They come from Ultrix. What could be older than Ultrix?!! ;)] -- --# Character class describing NM global symbol codes. --symcode='[[BCDEGRST]]' -- --# Regexp to match symbols that can be accessed directly from C. --sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -- --# Transform an extracted symbol line into a proper C declaration --lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" -- --# Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -- --# Define system-specific variables. --case $host_os in --aix*) -- symcode='[[BCDT]]' -- ;; --cygwin* | mingw* | pw32*) -- symcode='[[ABCDGISTW]]' -- ;; --hpux*) # Its linker distinguishes data from code symbols -- if test "$host_cpu" = ia64; then -- symcode='[[ABCDEGRST]]' -- fi -- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -- ;; --linux*) -- if test "$host_cpu" = ia64; then -- symcode='[[ABCDGIRSTW]]' -- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -- fi -- ;; --irix* | nonstopux*) -- symcode='[[BCDEGRST]]' -- ;; --osf*) -- symcode='[[BCDEGQRST]]' -- ;; --solaris* | sysv5*) -- symcode='[[BDRT]]' -- ;; --sysv4) -- symcode='[[DFNSTU]]' -- ;; --esac -- --# Handle CRLF in mingw tool chain --opt_cr= --case $build_os in --mingw*) -- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp -- ;; --esac -- --# If we're using GNU nm, then use its standard symbol codes. --case `$NM -V 2>&1` in --*GNU* | *'with BFD'*) -- symcode='[[ABCDGIRSTW]]' ;; --esac -- --# Try without a prefix undercore, then with it. --for ac_symprfx in "" "_"; do -- -- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. -- symxfrm="\\1 $ac_symprfx\\2 \\2" -+dlopen_support=$enable_dlopen - -- # Write the raw and C identifiers. -- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" -+# Whether dlopen of programs is supported. -+dlopen_self=$enable_dlopen_self - -- # Check to see that the pipe works correctly. -- pipe_works=no -+# Whether dlopen of statically linked programs is supported. -+dlopen_self_static=$enable_dlopen_self_static - -- rm -f conftest* -- cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then -- # Try sorting and uniquifying the output. -- if sort "$nlist" | uniq > "$nlist"T; then -- mv -f "$nlist"T "$nlist" -- else -- rm -f "$nlist"T -- fi -+# Compiler flag to turn off builtin functions. -+no_builtin_flag=$lt_no_builtin_flag - -- # Make sure that we snagged all the symbols we need. -- if grep ' nm_test_var$' "$nlist" >/dev/null; then -- if grep ' nm_test_func$' "$nlist" >/dev/null; then -- cat < conftest.$ac_ext --#ifdef __cplusplus --extern "C" { --#endif -+# Compiler flag to allow reflexive dlopens. -+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - --EOF -- # Now generate the symbol file. -- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' -+# Compiler flag to generate shared objects directly from archives. -+whole_archive_flag_spec=$lt_whole_archive_flag_spec - -- cat <> conftest.$ac_ext --#if defined (__STDC__) && __STDC__ --# define lt_ptr_t void * --#else --# define lt_ptr_t char * --# define const --#endif -+# Compiler flag to generate thread-safe objects. -+thread_safe_flag_spec=$lt_thread_safe_flag_spec - --/* The mapping between symbol names and symbols. */ --const struct { -- const char *name; -- lt_ptr_t address; --} --lt_preloaded_symbols[[]] = --{ --EOF -- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext -- cat <<\EOF >> conftest.$ac_ext -- {0, (lt_ptr_t) 0} --}; -+# Library versioning type. -+version_type=$version_type - --#ifdef __cplusplus --} --#endif --EOF -- # Now try linking the two files. -- mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -- LIBS="conftstm.$ac_objext" -- CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" -- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then -- pipe_works=yes -- fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -- else -- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD -- fi -- else -- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD -- fi -- else -- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD -- fi -- else -- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD -- cat conftest.$ac_ext >&5 -- fi -- rm -f conftest* conftst* -+# Format of library name prefix. -+libname_spec=$lt_libname_spec - -- # Do not use the global_symbol_pipe unless it works. -- if test "$pipe_works" = yes; then -- break -- else -- lt_cv_sys_global_symbol_pipe= -- fi --done --]) --if test -z "$lt_cv_sys_global_symbol_pipe"; then -- lt_cv_sys_global_symbol_to_cdecl= --fi --if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then -- AC_MSG_RESULT(failed) --else -- AC_MSG_RESULT(ok) --fi --]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -+# List of archive names. First name is the real one, the rest are links. -+# The last name is the one that the linker finds with -lNAME. -+library_names_spec=$lt_library_names_spec - -+# The coded name of the library, if different from the real name. -+soname_spec=$lt_soname_spec - --# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) --# --------------------------------------- --AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], --[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= --_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= --_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= -+# Commands used to build and install an old-style archive. -+RANLIB=$lt_RANLIB -+old_archive_cmds=$lt_old_archive_cmds -+old_postinstall_cmds=$lt_old_postinstall_cmds -+old_postuninstall_cmds=$lt_old_postuninstall_cmds - --AC_MSG_CHECKING([for $compiler option to produce PIC]) -- ifelse([$1],[CXX],[ -- # C++ specific cases for pic, static, wl, etc. -- if test "$GXX" = yes; then -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' -+# Create an old-style archive from a shared archive. -+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -- case $host_os in -- aix*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- fi -- ;; -- amigaos*) -- # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' -- ;; -- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -- # PIC is the default for these OSes. -- ;; -- mingw* | os2* | pw32*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' -- ;; -- darwin* | rhapsody*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' -- ;; -- *djgpp*) -- # DJGPP does not support shared libraries at all -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -- ;; -- sysv4*MP*) -- if test -d /usr/nec; then -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic -- fi -- ;; -- hpux*) -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- ;; -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- esac -- ;; -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- esac -- else -- case $host_os in -- aix4* | aix5*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- else -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' -- fi -- ;; -- chorus*) -- case $cc_basename in -- cxch68*) -- # Green Hills C++ Compiler -- # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" -- ;; -- esac -- ;; -- darwin*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- case $cc_basename in -- xlc*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- ;; -- esac -- ;; -- dgux*) -- case $cc_basename in -- ec++*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- ;; -- ghcx*) -- # Green Hills C++ Compiler -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- ;; -- *) -- ;; -- esac -- ;; -- freebsd* | kfreebsd*-gnu | dragonfly*) -- # FreeBSD uses GNU C++ -- ;; -- hpux9* | hpux10* | hpux11*) -- case $cc_basename in -- CC*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" -- if test "$host_cpu" != ia64; then -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' -- fi -- ;; -- aCC*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' -- ;; -- esac -- ;; -- *) -- ;; -- esac -- ;; -- irix5* | irix6* | nonstopux*) -- case $cc_basename in -- CC*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- # CC pic flag -KPIC is the default. -- ;; -- *) -- ;; -- esac -- ;; -- linux*) -- case $cc_basename in -- KCC*) -- # KAI C++ Compiler -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- icpc* | ecpc*) -- # Intel C++ -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' -- ;; -- pgCC*) -- # Portland Group C++ compiler. -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- cxx*) -- # Compaq C++ -- # Make sure the PIC flag is empty. It appears that all Alpha -- # Linux and Compaq Tru64 Unix objects are PIC. -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- *) -- ;; -- esac -- ;; -- lynxos*) -- ;; -- m88k*) -- ;; -- mvs*) -- case $cc_basename in -- cxx*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' -- ;; -- *) -- ;; -- esac -- ;; -- netbsd*) -- ;; -- osf3* | osf4* | osf5*) -- case $cc_basename in -- KCC*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' -- ;; -- RCC*) -- # Rational C++ 2.4.1 -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- ;; -- cxx*) -- # Digital/Compaq C++ -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # Make sure the PIC flag is empty. It appears that all Alpha -- # Linux and Compaq Tru64 Unix objects are PIC. -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- *) -- ;; -- esac -- ;; -- psos*) -- ;; -- sco*) -- case $cc_basename in -- CC*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- *) -- ;; -- esac -- ;; -- solaris*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.2, 5.x and Centerline C++ -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' -- ;; -- gcx*) -- # Green Hills C++ Compiler -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' -- ;; -- *) -- ;; -- esac -- ;; -- sunos4*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.x -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- lcc*) -- # Lucid -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- ;; -- *) -- ;; -- esac -- ;; -- tandem*) -- case $cc_basename in -- NCC*) -- # NonStop-UX NCC 3.20 -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- ;; -- *) -- ;; -- esac -- ;; -- unixware*) -- ;; -- vxworks*) -- ;; -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no -- ;; -- esac -- fi --], --[ -- if test "$GCC" = yes; then -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' -+# Create a temporary old-style archive to link instead of a shared archive. -+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -- case $host_os in -- aix*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- fi -- ;; -+# Commands used to build and install a shared archive. -+archive_cmds=$lt_archive_cmds -+archive_expsym_cmds=$lt_archive_expsym_cmds -+postinstall_cmds=$lt_postinstall_cmds -+postuninstall_cmds=$lt_postuninstall_cmds - -- amigaos*) -- # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' -- ;; -+# Commands to strip libraries. -+old_striplib=$lt_old_striplib -+striplib=$lt_striplib - -- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -- # PIC is the default for these OSes. -- ;; -+# Method to check whether dependent libraries are shared objects. -+deplibs_check_method=$lt_deplibs_check_method - -- mingw* | pw32* | os2*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' -- ;; -+# Command to use when deplibs_check_method == file_magic. -+file_magic_cmd=$lt_file_magic_cmd - -- darwin* | rhapsody*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' -- ;; -+# Flag that allows shared libraries with undefined symbols to be built. -+allow_undefined_flag=$lt_allow_undefined_flag - -- msdosdjgpp*) -- # Just because we use GCC doesn't mean we suddenly get shared libraries -- # on systems that don't support them. -- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no -- enable_shared=no -- ;; -+# Flag that forces no undefined symbols. -+no_undefined_flag=$lt_no_undefined_flag - -- sysv4*MP*) -- if test -d /usr/nec; then -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic -- fi -- ;; -+# Commands used to finish a libtool library installation in a directory. -+finish_cmds=$lt_finish_cmds - -- hpux*) -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- esac -- ;; -+# Same as above, but a single script fragment to be evaled but not shown. -+finish_eval=$lt_finish_eval - -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- esac -- else -- # PORTME Check for flag to pass linker flags through the system compiler. -- case $host_os in -- aix*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- else -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' -- fi -- ;; -- darwin*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- case $cc_basename in -- xlc*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- ;; -- esac -- ;; -+# Take the output of nm and produce a listing of raw symbols and C names. -+global_symbol_pipe=$lt_global_symbol_pipe - -- mingw* | pw32* | os2*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' -- ;; -+# Transform the output of nm in a proper C declaration -+global_symbol_to_cdecl=$lt_global_symbol_to_cdecl - -- hpux9* | hpux10* | hpux11*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' -- ;; -- esac -- # Is there a better lt_prog_compiler_static that works with the bundled CC? -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' -- ;; -+# Transform the output of nm in a C name address pair -+global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address - -- irix5* | irix6* | nonstopux*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # PIC (with -KPIC) is the default. -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -+# This is the shared library runtime path variable. -+runpath_var=$runpath_var - -- newsos6) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -+# This is the shared library path variable. -+shlibpath_var=$shlibpath_var - -- linux*) -- case $cc_basename in -- icc* | ecc*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' -- ;; -- pgcc* | pgf77* | pgf90* | pgf95*) -- # Portland Group compilers (*not* the Pentium gcc compiler, -- # which looks to be a dead project) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- ccc*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # All Alpha code is PIC. -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- esac -- ;; -+# Is shlibpath searched before the hard-coded library search path? -+shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -- osf3* | osf4* | osf5*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # All OSF/1 code is PIC. -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -+# How to hardcode a shared library path into an executable. -+hardcode_action=$hardcode_action - -- sco3.2v5*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' -- ;; -+# Whether we should hardcode library paths into libraries. -+hardcode_into_libs=$hardcode_into_libs - -- solaris*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- case $cc_basename in -- f77* | f90* | f95*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; -- esac -- ;; -+# Flag to hardcode \$libdir into a binary during linking. -+# This must work even if \$libdir does not exist. -+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -- sunos4*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -+# Whether we need a single -rpath flag with a separated argument. -+hardcode_libdir_separator=$lt_hardcode_libdir_separator - -- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -+# resulting binary. -+hardcode_direct=$hardcode_direct - -- sysv4*MP*) -- if test -d /usr/nec ;then -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- fi -- ;; -+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -+# resulting binary. -+hardcode_minus_L=$hardcode_minus_L - -- unicos*) -- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no -- ;; -+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -+# the resulting binary. -+hardcode_shlibpath_var=$hardcode_shlibpath_var - -- uts4*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -+# Variables whose values should be saved in libtool wrapper scripts and -+# restored at relink time. -+variables_saved_for_relink="$variables_saved_for_relink" - -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no -- ;; -- esac -- fi --]) --AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) -+# Whether libtool must link a program against all its dependency libraries. -+link_all_deplibs=$link_all_deplibs - --# --# Check to make sure the PIC flag actually works. --# --if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then -- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], -- _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), -- [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], -- [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in -- "" | " "*) ;; -- *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; -- esac], -- [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) --fi --case $host_os in -- # For platforms which do not support PIC, -DPIC is meaningless: -- *djgpp*) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -- ;; -- *) -- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" -- ;; --esac --]) -+# Compile-time system search path for libraries -+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -+# Run-time system search path for libraries -+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - --# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) --# ------------------------------------ --# See if the linker supports building shared libraries. --AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], --[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) --ifelse([$1],[CXX],[ -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- case $host_os in -- aix4* | aix5*) -- # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' -- else -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' -- fi -- ;; -- pw32*) -- _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" -- ;; -- cygwin* | mingw*) -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -- *) -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -- esac --],[ -- runpath_var= -- _LT_AC_TAGVAR(allow_undefined_flag, $1)= -- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no -- _LT_AC_TAGVAR(archive_cmds, $1)= -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)= -- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= -- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -- _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -- _LT_AC_TAGVAR(hardcode_direct, $1)=no -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -- _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -- _LT_AC_TAGVAR(hardcode_automatic, $1)=no -- _LT_AC_TAGVAR(module_cmds, $1)= -- _LT_AC_TAGVAR(module_expsym_cmds, $1)= -- _LT_AC_TAGVAR(always_export_symbols, $1)=no -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- # include_expsyms should be a list of space-separated symbols to be *always* -- # included in the symbol list -- _LT_AC_TAGVAR(include_expsyms, $1)= -- # exclude_expsyms can be an extended regexp of symbols to exclude -- # it will be wrapped by ` (' and `)$', so one must not match beginning or -- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -- # as well as any symbol that contains `d'. -- _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" -- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -- # platforms (ab)use it in PIC code, but their linkers get confused if -- # the symbol is explicitly referenced. Since portable code cannot -- # rely on this symbol name, it's probably fine to never include it in -- # preloaded symbol tables. -- extract_expsyms_cmds= -- # Just being paranoid about ensuring that cc_basename is set. -- _LT_CC_BASENAME([$compiler]) -- case $host_os in -- cygwin* | mingw* | pw32*) -- # FIXME: the MSVC++ port hasn't been tested in a loooong time -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- if test "$GCC" != yes; then -- with_gnu_ld=no -- fi -- ;; -- openbsd*) -- with_gnu_ld=no -- ;; -- esac -+# Fix the shell variable \$srcfile for the compiler. -+fix_srcfile_path="$fix_srcfile_path" - -- _LT_AC_TAGVAR(ld_shlibs, $1)=yes -- if test "$with_gnu_ld" = yes; then -- # If archive_cmds runs LD, not CC, wlarc should be empty -- wlarc='${wl}' -+# Set to yes if exported symbols are required. -+always_export_symbols=$always_export_symbols - -- # Set some defaults for GNU ld with shared library support. These -- # are reset later if shared libraries are not supported. Putting them -- # here allows them to be overridden if necessary. -- runpath_var=LD_RUN_PATH -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- # ancient GNU ld didn't support --whole-archive et. al. -- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- else -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -- fi -- supports_anon_versioning=no -- case `$LD -v 2>/dev/null` in -- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 -- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... -- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... -- *\ 2.11.*) ;; # other 2.11 versions -- *) supports_anon_versioning=yes ;; -- esac -+# The commands to list exported symbols. -+export_symbols_cmds=$lt_export_symbols_cmds - -- # See if GNU ld supports shared libraries. -- case $host_os in -- aix3* | aix4* | aix5*) -- # On AIX/PPC, the GNU linker is very broken -- if test "$host_cpu" != ia64; then -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- cat <&2 -+# The commands to extract the exported symbol list from a shared archive. -+extract_expsyms_cmds=$lt_extract_expsyms_cmds - --*** Warning: the GNU linker, at least up to release 2.9.1, is reported --*** to be unable to reliably create shared libraries on AIX. --*** Therefore, libtool is disabling shared libraries support. If you --*** really care for shared libraries, you may want to modify your PATH --*** so that a non-GNU linker is found, and then restart. -+# Symbols that should not be listed in the preloaded symbols. -+exclude_expsyms=$lt_exclude_expsyms - --EOF -- fi -- ;; -+# Symbols that must always be exported. -+include_expsyms=$lt_include_expsyms - -- amigaos*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- -- # Samuel A. Falvo II reports -- # that the semantics of dynamic libraries on AmigaOS, at least up -- # to version 4, is to share data among multiple programs linked -- # with the same dynamic library. Since this doesn't match the -- # behavior of shared libraries on other platforms, we can't use -- # them. -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -+# ### END LIBTOOL CONFIG - -- beos*) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported -- # Joseph Beckenbach says some releases of gcc -- # support --undefined. This deserves some investigation. FIXME -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- else -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -+__EOF__ - -- cygwin* | mingw* | pw32*) -- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -- # as there is no search path for DLLs. -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_AC_TAGVAR(always_export_symbols, $1)=no -- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' -- -- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- else -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -+ case $host_os in -+ aix3*) -+ cat <<\EOF >> "${ofile}T" - -- linux*) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- tmp_addflag= -- case $cc_basename,$host_cpu in -- pgcc*) # Portland Group C compiler -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag' -- ;; -- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag -Mnomain' ;; -- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 -- tmp_addflag=' -i_dynamic' ;; -- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 -- tmp_addflag=' -i_dynamic -nofor_main' ;; -- ifc* | ifort*) # Intel Fortran compiler -- tmp_addflag=' -nofor_main' ;; -- esac -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+# AIX sometimes has problems with the GCC collect2 program. For some -+# reason, if we set the COLLECT_NAMES environment variable, the problems -+# vanish in a puff of smoke. -+if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+fi -+EOF -+ ;; -+ esac - -- if test $supports_anon_versioning = yes; then -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- $echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -- fi -- else -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -+ case $host_os in -+ cygwin* | mingw* | pw32* | os2*) -+ cat <<'EOF' >> "${ofile}T" -+ # This is a source program that is used to create dlls on Windows -+ # Don't remove nor modify the starting and closing comments -+# /* ltdll.c starts here */ -+# #define WIN32_LEAN_AND_MEAN -+# #include -+# #undef WIN32_LEAN_AND_MEAN -+# #include -+# -+# #ifndef __CYGWIN__ -+# # ifdef __CYGWIN32__ -+# # define __CYGWIN__ __CYGWIN32__ -+# # endif -+# #endif -+# -+# #ifdef __cplusplus -+# extern "C" { -+# #endif -+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -+# #ifdef __cplusplus -+# } -+# #endif -+# -+# #ifdef __CYGWIN__ -+# #include -+# DECLARE_CYGWIN_DLL( DllMain ); -+# #endif -+# HINSTANCE __hDllInstance_base; -+# -+# BOOL APIENTRY -+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -+# { -+# __hDllInstance_base = hInst; -+# return TRUE; -+# } -+# /* ltdll.c ends here */ -+ # This is a source program that is used to create import libraries -+ # on Windows for dlls which lack them. Don't remove nor modify the -+ # starting and closing comments -+# /* impgen.c starts here */ -+# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. -+# -+# This file is part of GNU libtool. -+# -+# 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 /* for printf() */ -+# #include /* for open(), lseek(), read() */ -+# #include /* for O_RDONLY, O_BINARY */ -+# #include /* for strdup() */ -+# -+# /* O_BINARY isn't required (or even defined sometimes) under Unix */ -+# #ifndef O_BINARY -+# #define O_BINARY 0 -+# #endif -+# -+# static unsigned int -+# pe_get16 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[2]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 2); -+# return b[0] + (b[1]<<8); -+# } -+# -+# static unsigned int -+# pe_get32 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[4]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 4); -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# static unsigned int -+# pe_as32 (ptr) -+# void *ptr; -+# { -+# unsigned char *b = ptr; -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# int -+# main (argc, argv) -+# int argc; -+# char *argv[]; -+# { -+# int dll; -+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -+# unsigned long export_rva, export_size, nsections, secptr, expptr; -+# unsigned long name_rvas, nexp; -+# unsigned char *expdata, *erva; -+# char *filename, *dll_name; -+# -+# filename = argv[1]; -+# -+# dll = open(filename, O_RDONLY|O_BINARY); -+# if (dll < 1) -+# return 1; -+# -+# dll_name = filename; -+# -+# for (i=0; filename[i]; i++) -+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -+# dll_name = filename + i +1; -+# -+# pe_header_offset = pe_get32 (dll, 0x3c); -+# opthdr_ofs = pe_header_offset + 4 + 20; -+# num_entries = pe_get32 (dll, opthdr_ofs + 92); -+# -+# if (num_entries < 1) /* no exports */ -+# return 1; -+# -+# export_rva = pe_get32 (dll, opthdr_ofs + 96); -+# export_size = pe_get32 (dll, opthdr_ofs + 100); -+# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -+# secptr = (pe_header_offset + 4 + 20 + -+# pe_get16 (dll, pe_header_offset + 4 + 16)); -+# -+# expptr = 0; -+# for (i = 0; i < nsections; i++) -+# { -+# char sname[8]; -+# unsigned long secptr1 = secptr + 40 * i; -+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -+# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -+# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -+# lseek(dll, secptr1, SEEK_SET); -+# read(dll, sname, 8); -+# if (vaddr <= export_rva && vaddr+vsize > export_rva) -+# { -+# expptr = fptr + (export_rva - vaddr); -+# if (export_rva + export_size > vaddr + vsize) -+# export_size = vsize - (export_rva - vaddr); -+# break; -+# } -+# } -+# -+# expdata = (unsigned char*)malloc(export_size); -+# lseek (dll, expptr, SEEK_SET); -+# read (dll, expdata, export_size); -+# erva = expdata - export_rva; -+# -+# nexp = pe_as32 (expdata+24); -+# name_rvas = pe_as32 (expdata+32); -+# -+# printf ("EXPORTS\n"); -+# for (i = 0; i/dev/null; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -- wlarc= -- else -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- fi -- ;; -+EOF -+ ;; -+ esac - -- solaris* | sysv5*) -- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- cat <&2 -+ # We use sed instead of cat because bash on DJGPP gets confused if -+ # if finds mixed CR/LF and LF-only lines. Since sed operates in -+ # text mode, it properly converts lines to CR/LF. This bash problem -+ # is reportedly fixed, but why not run on old versions too? -+ sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) - --*** Warning: The releases 2.8.* of the GNU linker cannot reliably --*** create shared libraries on Solaris systems. Therefore, libtool --*** is disabling shared libraries support. We urge you to upgrade GNU --*** binutils to release 2.9.1 or newer. Another option is to modify --*** your PATH or compiler configuration so that the native linker is --*** used, and then restart. -+ mv -f "${ofile}T" "$ofile" || \ -+ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") -+ chmod +x "$ofile" -+fi - --EOF -- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -+])# _LT_AC_LTCONFIG_HACK - -- sunos4*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- wlarc= -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -+AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -- *) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- esac -+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -+AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -- if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then -- runpath_var= -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -+# AC_ENABLE_SHARED - implement the --enable-shared flag -+# Usage: AC_ENABLE_SHARED[(DEFAULT)] -+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -+# `yes'. -+AC_DEFUN([AC_ENABLE_SHARED], -+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -+AC_ARG_ENABLE(shared, -+changequote(<<, >>)dnl -+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -+changequote([, ])dnl -+[p=${PACKAGE-default} -+case $enableval in -+yes) enable_shared=yes ;; -+no) enable_shared=no ;; -+*) -+ enable_shared=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_shared=yes - fi -- else -- # PORTME fill in a description of your system's linker (not GNU ld) -- case $host_os in -- aix3*) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_AC_TAGVAR(always_export_symbols, $1)=yes -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -- # Note: this linker hardcodes the directories in LIBPATH if there -- # are no directories specified by -L. -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- if test "$GCC" = yes && test -z "$link_static_flag"; then -- # Neither direct hardcoding nor static linking is supported with a -- # broken collect2. -- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported -- fi -- ;; -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac], -+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -+]) - -- aix4* | aix5*) -- if test "$host_cpu" = ia64; then -- # On IA64, the linker does run time linking by default, so we don't -- # have to do anything special. -- aix_use_runtimelinking=no -- exp_sym_flag='-Bexport' -- no_entry_flag="" -- else -- # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' -- else -- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' -- fi -- aix_use_runtimelinking=no -+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -+AC_DEFUN([AC_DISABLE_SHARED], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+AC_ENABLE_SHARED(no)]) -+ -+# AC_ENABLE_STATIC - implement the --enable-static flag -+# Usage: AC_ENABLE_STATIC[(DEFAULT)] -+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -+# `yes'. -+AC_DEFUN([AC_ENABLE_STATIC], -+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -+AC_ARG_ENABLE(static, -+changequote(<<, >>)dnl -+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -+changequote([, ])dnl -+[p=${PACKAGE-default} -+case $enableval in -+yes) enable_static=yes ;; -+no) enable_static=no ;; -+*) -+ enable_static=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_static=yes -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac], -+enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -+]) - -- # Test if we are trying to use run time linking or normal -- # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) -- for ld_flag in $LDFLAGS; do -- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then -- aix_use_runtimelinking=yes -- break -- fi -- done -- esac -+# AC_DISABLE_STATIC - set the default static flag to --disable-static -+AC_DEFUN([AC_DISABLE_STATIC], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+AC_ENABLE_STATIC(no)]) - -- exp_sym_flag='-bexport' -- no_entry_flag='-bnoentry' -- fi - -- # When large executables or shared objects are built, AIX ld can -- # have problems creating the table of contents. If linking a library -- # or program results in "error TOC overflow" add -mminimal-toc to -- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -- -- _LT_AC_TAGVAR(archive_cmds, $1)='' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' -- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -- -- if test "$GCC" = yes; then -- case $host_os in aix4.[[012]]|aix4.[[012]].*) -- # We only want to do this on AIX 4.2 and lower, the check -- # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -- if test -f "$collect2name" && \ -- strings "$collect2name" | grep resolve_lib_name >/dev/null -- then -- # We have reworked collect2 -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- else -- # We have old collect2 -- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported -- # It fails to find uninstalled libraries when the uninstalled -- # path is not listed in the libpath. Setting hardcode_minus_L -- # to unsupported forces relinking -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -- fi -- esac -- shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -- fi -- else -- # not using gcc -- if test "$host_cpu" = ia64; then -- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release -- # chokes on -Wl,-G. The following line is correct: -- shared_flag='-G' -- else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -- else -- shared_flag='${wl}-bM:SRE' -- fi -- fi -- fi -+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -+# `yes'. -+AC_DEFUN([AC_ENABLE_FAST_INSTALL], -+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -+AC_ARG_ENABLE(fast-install, -+changequote(<<, >>)dnl -+<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -+changequote([, ])dnl -+[p=${PACKAGE-default} -+case $enableval in -+yes) enable_fast_install=yes ;; -+no) enable_fast_install=no ;; -+*) -+ enable_fast_install=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_fast_install=yes -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac], -+enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -+]) - -- # It seems that -bexpall does not export symbols beginning with -- # underscore (_), so it is better to generate a list of symbols to export. -- _LT_AC_TAGVAR(always_export_symbols, $1)=yes -- if test "$aix_use_runtimelinking" = yes; then -- # Warning - without using the other runtime loading flags (-brtl), -- # -berok will link without error, but may produce a broken library. -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' -- # Determine the default libpath from the value encoded in an empty executable. -- _LT_AC_SYS_LIBPATH_AIX -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -- else -- if test "$host_cpu" = ia64; then -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' -- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -- else -- # Determine the default libpath from the value encoded in an empty executable. -- _LT_AC_SYS_LIBPATH_AIX -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -- # Warning - without using the other run time loading flags, -- # -berok will link without error, but may produce a broken library. -- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' -- # -bexpall does not export symbols beginning with underscore (_) -- _LT_AC_TAGVAR(always_export_symbols, $1)=yes -- # Exported symbols can be pulled into shared objects from archives -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -- fi -- fi -- ;; -+# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install -+AC_DEFUN([AC_DISABLE_FAST_INSTALL], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+AC_ENABLE_FAST_INSTALL(no)]) - -- amigaos*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- # see comment about different semantics on the GNU ld section -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -+# AC_LIBTOOL_PICMODE - implement the --with-pic flag -+# Usage: AC_LIBTOOL_PICMODE[(MODE)] -+# Where MODE is either `yes' or `no'. If omitted, it defaults to -+# `both'. -+AC_DEFUN([AC_LIBTOOL_PICMODE], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+pic_mode=ifelse($#,1,$1,default)]) - -- bsdi[[45]]*) -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic -- ;; - -- cygwin* | mingw* | pw32*) -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- # hardcode_libdir_flag_spec is actually meaningless, as there is -- # no search path for DLLs. -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' -- # FIXME: Should let the user specify the lib program. -- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' -- _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' -- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- ;; -+# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library -+AC_DEFUN([AC_PATH_TOOL_PREFIX], -+[AC_MSG_CHECKING([for $1]) -+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -+[case $MAGIC_CMD in -+ /*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. -+ ;; -+ *) -+ ac_save_MAGIC_CMD="$MAGIC_CMD" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+dnl $ac_dummy forces splitting on constant user-supplied paths. -+dnl POSIX.2 word splitting is done only on the output of word expansions, -+dnl not every word. This closes a longstanding sh security hole. -+ ac_dummy="ifelse([$2], , $PATH, [$2])" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/$1; then -+ lt_cv_path_MAGIC_CMD="$ac_dir/$1" -+ if test -n "$file_magic_test_file"; then -+ case $deplibs_check_method in -+ "file_magic "*) -+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" -+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -+ egrep "$file_magic_regex" > /dev/null; then -+ : -+ else -+ cat <&2 - -- darwin* | rhapsody*) -- case $host_os in -- rhapsody* | darwin1.[[012]]) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' -- ;; -- *) # Darwin 1.3 on -- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- else -- case ${MACOSX_DEPLOYMENT_TARGET} in -- 10.[[012]]) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- ;; -- 10.*) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' -- ;; -- esac -- fi -- ;; -- esac -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_AC_TAGVAR(hardcode_direct, $1)=no -- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' -- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -- if test "$GCC" = yes ; then -- output_verbose_link_cmd='echo' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' -- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- else -- case $cc_basename in -- xlc*) -- output_verbose_link_cmd='echo' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' -- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- ;; -- *) -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- fi -- ;; -+*** Warning: the command libtool uses to detect shared libraries, -+*** $file_magic_cmd, produces output that libtool cannot recognize. -+*** The result is that libtool may fail to recognize shared libraries -+*** as such. This will affect the creation of libtool libraries that -+*** depend on shared libraries, but programs linked with such libtool -+*** libraries will work regardless of this problem. Nevertheless, you -+*** may want to report the problem to your system manager and/or to -+*** bug-libtool@gnu.org - -- dgux*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+EOF -+ fi ;; -+ esac -+ fi -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ MAGIC_CMD="$ac_save_MAGIC_CMD" -+ ;; -+esac]) -+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+if test -n "$MAGIC_CMD"; then -+ AC_MSG_RESULT($MAGIC_CMD) -+else -+ AC_MSG_RESULT(no) -+fi -+]) - -- freebsd1*) -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; - -- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -- # support. Future versions do this automatically, but an explicit c++rt0.o -- # does not break anything, and helps significantly (at the cost of a little -- # extra space). -- freebsd2.2*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+# AC_PATH_MAGIC - find a file program which can recognise a shared library -+AC_DEFUN([AC_PATH_MAGIC], -+[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl -+AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) -+if test -z "$lt_cv_path_MAGIC_CMD"; then -+ if test -n "$ac_tool_prefix"; then -+ AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) -+ else -+ MAGIC_CMD=: -+ fi -+fi -+]) - -- # Unfortunately, older versions of FreeBSD 2 do not have this feature. -- freebsd2*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; - -- # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -- freebsd* | kfreebsd*-gnu | dragonfly*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -+# AC_PROG_LD - find the path to the GNU or non-GNU linker -+AC_DEFUN([AC_PROG_LD], -+[AC_ARG_WITH(gnu-ld, -+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -+AC_REQUIRE([AC_PROG_CC])dnl -+AC_REQUIRE([AC_CANONICAL_HOST])dnl -+AC_REQUIRE([AC_CANONICAL_BUILD])dnl -+AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl -+ac_prog=ld -+if test "$GCC" = yes; then -+ # Check if gcc -print-prog-name=ld gives a path. -+ AC_MSG_CHECKING([for ld used by GCC]) -+ case $host in -+ *-*-mingw*) -+ # gcc leaves a trailing carriage return which upsets mingw -+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -+ *) -+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -+ esac -+ case $ac_prog in -+ # Accept absolute paths. -+ [[\\/]]* | [[A-Za-z]]:[[\\/]]*) -+ re_direlt='/[[^/]][[^/]]*/\.\./' -+ # Canonicalize the path of ld -+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` -+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do -+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` -+ done -+ test -z "$LD" && LD="$ac_prog" - ;; -- -- hpux9*) -- if test "$GCC" = yes; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ "") -+ # If it fails, then pretend we aren't using GCC. -+ ac_prog=ld -+ ;; -+ *) -+ # If it is relative, then search for the first ld in PATH. -+ with_gnu_ld=unknown -+ ;; -+ esac -+elif test "$with_gnu_ld" = yes; then -+ AC_MSG_CHECKING([for GNU ld]) -+else -+ AC_MSG_CHECKING([for non-GNU ld]) -+fi -+AC_CACHE_VAL(lt_cv_path_LD, -+[if test -z "$LD"; then -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for ac_dir in $PATH; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -+ lt_cv_path_LD="$ac_dir/$ac_prog" -+ # Check to see if the program is GNU ld. I'd rather use --version, -+ # but apparently some GNU ld's only accept -v. -+ # Break only if it was the GNU/non-GNU ld that we prefer. -+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then -+ test "$with_gnu_ld" != no && break - else -- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ test "$with_gnu_ld" != yes && break - fi -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- ;; -+ fi -+ done -+ IFS="$ac_save_ifs" -+else -+ lt_cv_path_LD="$LD" # Let the user override the test with a path. -+fi]) -+LD="$lt_cv_path_LD" -+if test -n "$LD"; then -+ AC_MSG_RESULT($LD) -+else -+ AC_MSG_RESULT(no) -+fi -+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -+AC_PROG_LD_GNU -+]) - -- hpux10* | hpux11*) -- if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*|ia64*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- *) -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- esac -- else -- case $host_cpu in -- hppa*64*|ia64*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -- ;; -- *) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -- ;; -- esac -- fi -- if test "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*) -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_AC_TAGVAR(hardcode_direct, $1)=no -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- ia64*) -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_direct, $1)=no -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- ;; -- *) -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- ;; -- esac -- fi -- ;; -+# AC_PROG_LD_GNU - -+AC_DEFUN([AC_PROG_LD_GNU], -+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -+[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -+if $LD -v 2>&1 &5; then -+ lt_cv_prog_gnu_ld=yes -+else -+ lt_cv_prog_gnu_ld=no -+fi]) -+with_gnu_ld=$lt_cv_prog_gnu_ld -+]) - -- irix5* | irix6* | nonstopux*) -- if test "$GCC" = yes; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' -- fi -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -- ;; -+# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker -+# -- PORTME Some linkers may need a different reload flag. -+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], -+[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, -+[lt_cv_ld_reload_flag='-r']) -+reload_flag=$lt_cv_ld_reload_flag -+test -n "$reload_flag" && reload_flag=" $reload_flag" -+]) - -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -- else -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -- fi -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies -+# -- PORTME fill in with the dynamic library characteristics -+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -+[AC_CACHE_CHECK([how to recognise dependent libraries], -+lt_cv_deplibs_check_method, -+[lt_cv_file_magic_cmd='$MAGIC_CMD' -+lt_cv_file_magic_test_file= -+lt_cv_deplibs_check_method='unknown' -+# Need to set the preceding variable on all platforms that support -+# interlibrary dependencies. -+# 'none' -- dependencies not supported. -+# `unknown' -- same as none, but documents that we really don't know. -+# 'pass_all' -- all dependencies passed with no checks. -+# 'test_compile' -- check by making test program. -+# 'file_magic [[regex]]' -- check by looking for files in library path -+# which responds to the $file_magic_cmd with a given egrep regex. -+# If you have `file' or equivalent on your system and you're not sure -+# whether `pass_all' will *always* work, you probably want this one. - -- newsos6) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+case $host_os in -+aix4* | aix5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- openbsd*) -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- else -- case $host_os in -- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- ;; -- *) -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- ;; -- esac -- fi -- ;; -+beos*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- os2*) -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -- ;; -+bsdi4*) -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ lt_cv_file_magic_test_file=/shlib/libc.so -+ ;; - -- osf3*) -- if test "$GCC" = yes; then -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- fi -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- ;; -+cygwin* | mingw* | pw32*) -+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ lt_cv_file_magic_cmd='$OBJDUMP -f' -+ ;; - -- osf4* | osf5*) # as osf3* with the addition of -msym flag -- if test "$GCC" = yes; then -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- else -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' -+darwin* | rhapsody*) -+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ case "$host_os" in -+ rhapsody* | darwin1.[[012]]) -+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` -+ ;; -+ *) # Darwin 1.3 on -+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' -+ ;; -+ esac -+ ;; -+ -+freebsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -+ case $host_cpu in -+ i*86 ) -+ # Not sure whether the presence of OpenBSD here was a mistake. -+ # Let's accept both of them until this is cleared up. -+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -+ ;; -+ esac -+ else -+ lt_cv_deplibs_check_method=pass_all -+ fi -+ ;; - -- # Both c and cxx compiler support -rpath directly -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' -- fi -- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -- ;; -+gnu*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- sco3.2v5*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- ;; -+hpux10.20*|hpux11*) -+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=/usr/lib/libc.sl -+ ;; - -- solaris*) -- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' -- if test "$GCC" = yes; then -- wlarc='${wl}' -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' -- else -- wlarc='' -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -- fi -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- case $host_os in -- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; -- *) -- # The compiler driver will combine linker options so we -- # cannot just pass the convience library names through -- # without $wl, iff we do not link with $LD. -- # Luckily, gcc supports the same syntax we need for Sun Studio. -- # Supported since Solaris 2.6 (maybe 2.5.1?) -- case $wlarc in -- '') -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; -- *) -- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; -- esac ;; -- esac -- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -- ;; -+irix5* | irix6* | nonstopux*) -+ case $LD in -+ *-32|*"-32 ") libmagic=32-bit;; -+ *-n32|*"-n32 ") libmagic=N32;; -+ *-64|*"-64 ") libmagic=64-bit;; -+ *) libmagic=never-match;; -+ esac -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- sunos4*) -- if test "x$host_vendor" = xsequent; then -- # Use $CC to link under sequent, because it throws in some extra .o -- # files that make .init and .fini sections work. -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -- fi -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+# This must be Linux ELF. -+linux-gnu*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- sysv4) -- case $host_vendor in -- sni) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? -- ;; -- siemens) -- ## LD is ld it makes a PLAMLIB -- ## CC just makes a GrossModule. -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' -- _LT_AC_TAGVAR(hardcode_direct, $1)=no -- ;; -- motorola) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie -- ;; -- esac -- runpath_var='LD_RUN_PATH' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+netbsd* | knetbsd*-gnu) -+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -+ lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' -+ else -+ lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' -+ fi -+ ;; - -- sysv4.3*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' -- ;; -+newos6*) -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=/usr/lib/libnls.so -+ ;; - -- sysv4*MP*) -- if test -d /usr/nec; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- _LT_AC_TAGVAR(ld_shlibs, $1)=yes -- fi -- ;; -+openbsd*) -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' -+ else -+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' -+ fi -+ ;; - -- sysv4.2uw2*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_direct, $1)=yes -- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- hardcode_runpath_var=yes -- runpath_var=LD_RUN_PATH -- ;; -+osf3* | osf4* | osf5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) -- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' -- if test "$GCC" = yes; then -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- fi -- runpath_var='LD_RUN_PATH' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+sco3.2v5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- sysv5*) -- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' -- # $CC -shared without GNU ld will not create a library from C++ -- # object files and a static libstdc++, better avoid it by now -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- runpath_var='LD_RUN_PATH' -- ;; -+solaris*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- uts4*) -- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -+sysv5uw[[78]]* | sysv4*uw2*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - -- *) -- _LT_AC_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- fi -+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ case $host_vendor in -+ motorola) -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` -+ ;; -+ ncr) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ sequent) -+ lt_cv_file_magic_cmd='/bin/file' -+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' -+ ;; -+ sni) -+ lt_cv_file_magic_cmd='/bin/file' -+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" -+ lt_cv_file_magic_test_file=/lib/libc.so -+ ;; -+ siemens) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ esac -+ ;; -+esac -+]) -+file_magic_cmd=$lt_cv_file_magic_cmd -+deplibs_check_method=$lt_cv_deplibs_check_method - ]) --AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) --test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - --variables_saved_for_relink="PATH $shlibpath_var $runpath_var" --if test "$GCC" = yes; then -- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" --fi - --# --# Do we need to explicitly link libc? --# --case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in --x|xyes) -- # Assume -lc should be added -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes -- -- if test "$enable_shared" = yes && test "$GCC" = yes; then -- case $_LT_AC_TAGVAR(archive_cmds, $1) in -- *'~'*) -- # FIXME: we may have to deal with multi-command sequences. -- ;; -- '$CC '*) -- # Test whether the compiler implicitly links with -lc since on some -- # systems, -lgcc has to come before -lc. If gcc already passes -lc -- # to ld, don't add -lc before -lgcc. -- AC_MSG_CHECKING([whether -lc should be explicitly linked in]) -- $rm conftest* -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then -- soname=conftest -- lib=conftest -- libobjs=conftest.$ac_objext -- deplibs= -- wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) -- compiler_flags=-v -- linker_flags=-v -- verstring= -- output_objdir=. -- libname=conftest -- lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) -- _LT_AC_TAGVAR(allow_undefined_flag, $1)= -- if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) -- then -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -- else -- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes -- fi -- _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag -+# AC_PROG_NM - find the path to a BSD-compatible name lister -+AC_DEFUN([AC_PROG_NM], -+[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl -+AC_MSG_CHECKING([for BSD-compatible nm]) -+AC_CACHE_VAL(lt_cv_path_NM, -+[if test -n "$NM"; then -+ # Let the user override the test. -+ lt_cv_path_NM="$NM" -+else -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do -+ test -z "$ac_dir" && ac_dir=. -+ tmp_nm=$ac_dir/${ac_tool_prefix}nm -+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then -+ # Check to see if the nm accepts a BSD-compat flag. -+ # Adding the `sed 1q' prevents false positives on HP-UX, which says: -+ # nm: unknown option "B" ignored -+ # Tru64's nm complains that /dev/null is an invalid object file -+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -B" -+ break -+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -p" -+ break - else -- cat conftest.err 1>&5 -+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but -+ continue # so that we can try to find one that supports BSD flags - fi -- $rm conftest* -- AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) -- ;; -- esac -- fi -+ fi -+ done -+ IFS="$ac_save_ifs" -+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -+fi]) -+NM="$lt_cv_path_NM" -+AC_MSG_RESULT([$NM]) -+]) -+ -+# AC_CHECK_LIBM - check for math library -+AC_DEFUN([AC_CHECK_LIBM], -+[AC_REQUIRE([AC_CANONICAL_HOST])dnl -+LIBM= -+case $host in -+*-*-beos* | *-*-cygwin* | *-*-pw32*) -+ # These system don't have libm -+ ;; -+*-ncr-sysv4.3*) -+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") -+ AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") -+ ;; -+*) -+ AC_CHECK_LIB(m, main, LIBM="-lm") - ;; - esac --])# AC_LIBTOOL_PROG_LD_SHLIBS -- -- --# _LT_AC_FILE_LTDLL_C --# ------------------- --# Be careful that the start marker always follows a newline. --AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ --# /* ltdll.c starts here */ --# #define WIN32_LEAN_AND_MEAN --# #include --# #undef WIN32_LEAN_AND_MEAN --# #include --# --# #ifndef __CYGWIN__ --# # ifdef __CYGWIN32__ --# # define __CYGWIN__ __CYGWIN32__ --# # endif --# #endif --# --# #ifdef __cplusplus --# extern "C" { --# #endif --# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); --# #ifdef __cplusplus --# } --# #endif --# --# #ifdef __CYGWIN__ --# #include --# DECLARE_CYGWIN_DLL( DllMain ); --# #endif --# HINSTANCE __hDllInstance_base; --# --# BOOL APIENTRY --# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) --# { --# __hDllInstance_base = hInst; --# return TRUE; --# } --# /* ltdll.c ends here */ --])# _LT_AC_FILE_LTDLL_C -- -+]) - --# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) --# --------------------------------- --AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) -+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -+# the libltdl convenience library and LTDLINCL to the include flags for -+# the libltdl header and adds --enable-ltdl-convenience to the -+# configure arguments. Note that LIBLTDL and LTDLINCL are not -+# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not -+# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed -+# with '${top_builddir}/' and LTDLINCL will be prefixed with -+# '${top_srcdir}/' (note the single quotes!). If your package is not -+# flat and you're not using automake, define top_builddir and -+# top_srcdir appropriately in the Makefiles. -+AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+ case $enable_ltdl_convenience in -+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; -+ "") enable_ltdl_convenience=yes -+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; -+ esac -+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la -+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) -+ # For backwards non-gettext consistent compatibility... -+ INCLTDL="$LTDLINCL" -+]) - -+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -+# the libltdl installable library and LTDLINCL to the include flags for -+# the libltdl header and adds --enable-ltdl-install to the configure -+# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is -+# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed -+# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will -+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed -+# with '${top_srcdir}/' (note the single quotes!). If your package is -+# not flat and you're not using automake, define top_builddir and -+# top_srcdir appropriately in the Makefiles. -+# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -+AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -+ AC_CHECK_LIB(ltdl, main, -+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], -+ [if test x"$enable_ltdl_install" = xno; then -+ AC_MSG_WARN([libltdl not installed, but installation disabled]) -+ else -+ enable_ltdl_install=yes -+ fi -+ ]) -+ if test x"$enable_ltdl_install" = x"yes"; then -+ ac_configure_args="$ac_configure_args --enable-ltdl-install" -+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la -+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) -+ else -+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no" -+ LIBLTDL="-lltdl" -+ LTDLINCL= -+ fi -+ # For backwards non-gettext consistent compatibility... -+ INCLTDL="$LTDLINCL" -+]) - - # old names - AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -@@ -6964,16 +4410,6 @@ - # This is just to silence aclocal about the macro not being used - ifelse([AC_DISABLE_FAST_INSTALL]) - --AC_DEFUN([LT_AC_PROG_GCJ], --[AC_CHECK_TOOL(GCJ, gcj, no) -- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" -- AC_SUBST(GCJFLAGS) --]) -- --AC_DEFUN([LT_AC_PROG_RC], --[AC_CHECK_TOOL(RC, windres, no) --]) -- - # NOTE: This macro has been submitted for inclusion into # - # GNU Autoconf as AC_PROG_SED. When it is available in # - # a released version of Autoconf we should remove this # -@@ -6987,51 +4423,79 @@ - AC_CACHE_VAL(lt_cv_path_SED, - [# Loop through the user's path and test for sed and gsed. - # Then use that list of sed's as ones to test for truncation. -+as_executable_p="test -f" - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for lt_ac_prog in sed gsed; do -+ for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then -- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" -+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then -+ _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" - fi - done - done - done --lt_ac_max=0 --lt_ac_count=0 --# Add /usr/xpg4/bin/sed as it is typically found on Solaris --# along with /bin/sed that truncates output. --for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do -- test ! -f $lt_ac_sed && continue -- cat /dev/null > conftest.in -- lt_ac_count=0 -- echo $ECHO_N "0123456789$ECHO_C" >conftest.in -- # Check for GNU sed and select it if it is found. -- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then -- lt_cv_path_SED=$lt_ac_sed -- break -- fi -- while true; do -- cat conftest.in conftest.in >conftest.tmp -- mv conftest.tmp conftest.in -- cp conftest.in conftest.nl -- echo >>conftest.nl -- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break -- cmp -s conftest.out conftest.nl || break -- # 10000 chars as input seems more than enough -- test $lt_ac_count -gt 10 && break -- lt_ac_count=`expr $lt_ac_count + 1` -- if test $lt_ac_count -gt $lt_ac_max; then -- lt_ac_max=$lt_ac_count -- lt_cv_path_SED=$lt_ac_sed -+ -+ # Create a temporary directory, and hook for its removal unless debugging. -+$debug || -+{ -+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 -+ trap '{ (exit 1); exit 1; }' 1 2 13 15 -+} -+ -+# Create a (secure) tmp directory for tmp files. -+: ${TMPDIR=/tmp} -+{ -+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && -+ test -n "$tmp" && test -d "$tmp" -+} || -+{ -+ tmp=$TMPDIR/sed$$-$RANDOM -+ (umask 077 && mkdir $tmp) -+} || -+{ -+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 -+ { (exit 1); exit 1; } -+} -+ _max=0 -+ _count=0 -+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris -+ # along with /bin/sed that truncates output. -+ for _sed in $_sed_list /usr/xpg4/bin/sed; do -+ test ! -f ${_sed} && break -+ cat /dev/null > "$tmp/sed.in" -+ _count=0 -+ echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" -+ # Check for GNU sed and select it if it is found. -+ if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then -+ lt_cv_path_SED=${_sed} -+ break - fi -+ while true; do -+ cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" -+ mv "$tmp/sed.tmp" "$tmp/sed.in" -+ cp "$tmp/sed.in" "$tmp/sed.nl" -+ echo >>"$tmp/sed.nl" -+ ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break -+ cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break -+ # 40000 chars as input seems more than enough -+ test $_count -gt 10 && break -+ _count=`expr $_count + 1` -+ if test $_count -gt $_max; then -+ _max=$_count -+ lt_cv_path_SED=$_sed -+ fi -+ done - done --done -+ rm -rf "$tmp" - ]) --SED=$lt_cv_path_SED -+if test "X$SED" != "X"; then -+ lt_cv_path_SED=$SED -+else -+ SED=$lt_cv_path_SED -+fi - AC_MSG_RESULT([$SED]) - ]) - -@@ -7898,7 +5362,11 @@ - AC_HELP_STRING([--with-curl-config=curl-config],[Use curl-config to find libcurl]), - CURL_CONFIG="$withval", [AC_PATH_PROGS(CURL_CONFIG, [curl-config], "")]) - --if test "x$curl_prefix" != "x" -a "x$curl_prefix" != "xyes"; then -+curl_ok="yes" -+ -+if test "x$curl_prefix" == "xno"; then -+ curl_ok="no" -+elif test "x$curl_prefix" != "x" -a "x$curl_prefix" != "xyes"; then - CURL_LIBS="-L$curl_prefix/lib -lcurl" - CURL_CFLAGS="-I$curl_prefix/include" - elif test "x$CURL_CONFIG" != "x"; then -@@ -7917,8 +5385,8 @@ - CURL_CFLAGS="-I$curl_prefix/include" - fi - --curl_ok="yes" -- -+if test "$curl_ok" = "yes" -+then - xt_curl_CPPFLAGS="$CPPFLAGS" - xt_curl_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $CURL_CFLAGS" -@@ -7928,16 +5396,13 @@ - dnl - AC_CHECK_HEADERS([curl/curl.h],, curl_ok="no") - AC_MSG_CHECKING(for libcurl) --if test "$curl_ok" = "yes" --then -- AC_RUN_IFELSE(AC_LANG_SOURCE([ -+AC_LINK_IFELSE(AC_LANG_SOURCE([ - #include - int main() - { - return 0; - } - ]),,[curl_ok="no"]) --fi - if test "$curl_ok" = "yes"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CURL, 1, [Define if you have libcurl.]) -@@ -7950,5 +5415,6 @@ - fi - CPPFLAGS="$xt_curl_CPPFLAGS" - LIBS="$xt_curl_LIBS" -+fi - ]) - -diff -ruN icecast-2.3.0-old/configure icecast-2.3.0-new/configure ---- icecast-2.3.0-old/configure 2005-09-23 23:18:46.000000000 +0200 -+++ icecast-2.3.0-new/configure 2005-10-02 13:05:14.000000000 +0200 -@@ -243,6 +243,17 @@ - $as_unset CDPATH - - -+# Find the correct PATH separator. Usually this is `:', but -+# DJGPP uses `;' like DOS. -+if test "X${PATH_SEPARATOR+set}" != Xset; then -+ UNAME=${UNAME-`uname 2>/dev/null`} -+ case X$UNAME in -+ *-DOS) lt_cv_sys_path_separator=';' ;; -+ *) lt_cv_sys_path_separator=':' ;; -+ esac -+ PATH_SEPARATOR=$lt_cv_sys_path_separator -+fi -+ - - # Check that we are running under the correct shell. - SHELL=${CONFIG_SHELL-/bin/sh} -@@ -261,7 +272,7 @@ - elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : --elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then -+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : - else -@@ -273,22 +284,22 @@ - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH -+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - - if test -z "$ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... -- if (echo_test_string=`eval $cmd`) 2>/dev/null && -- echo_test_string=`eval $cmd` && -+ if (echo_test_string="`eval $cmd`") 2>/dev/null && -+ echo_test_string="`eval $cmd`" && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break -@@ -307,9 +318,8 @@ - # - # So, first we look for a working echo in the user's PATH. - -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do -- IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && -@@ -318,7 +328,7 @@ - break - fi - done -- IFS="$lt_save_ifs" -+ IFS="$save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. -@@ -392,11 +402,6 @@ - - - -- --tagnames=${tagnames+${tagnames},}CXX -- --tagnames=${tagnames+${tagnames},}F77 -- - # Name of the host. - # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, - # so uname gets run too. -@@ -465,7 +470,7 @@ - # include - #endif" - --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL XSLTCONFIG FGREP OGG_PREFIX OGG_LIBS OGG_CFLAGS OGG_LDFLAGS VORBIS_PREFIX VORBIS_CFLAGS VORBIS_LDFLAGS VORBIS_LIBS VORBISFILE_LIBS VORBISENC_LIBS THEORA THEORA_CFLAGS THEORA_LDFLAGS THEORA_LIBS SPEEX SPEEX_CFLAGS SPEEX_LDFLAGS SPEEX_LIBS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS PTHREAD_CPPFLAGS CURL_CONFIG XIPH_CPPFLAGS XIPH_CFLAGS XIPH_LIBS XIPH_LDFLAGS LIBTOOL_DEPS DEBUG PROFILE ICECAST_OPTIONAL LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL XSLTCONFIG FGREP OGG_PREFIX OGG_LIBS OGG_CFLAGS OGG_LDFLAGS VORBIS_PREFIX VORBIS_CFLAGS VORBIS_LDFLAGS VORBIS_LIBS VORBISFILE_LIBS VORBISENC_LIBS THEORA THEORA_CFLAGS THEORA_LDFLAGS THEORA_LIBS SPEEX SPEEX_CFLAGS SPEEX_LDFLAGS SPEEX_LIBS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS PTHREAD_CPPFLAGS CURL_CONFIG XIPH_CPPFLAGS XIPH_CFLAGS XIPH_LIBS XIPH_LDFLAGS LIBTOOL_DEPS DEBUG PROFILE ICECAST_OPTIONAL LIBOBJS LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -926,26 +931,6 @@ - ac_env_CPP_value=$CPP - ac_cv_env_CPP_set=${CPP+set} - ac_cv_env_CPP_value=$CPP --ac_env_CXX_set=${CXX+set} --ac_env_CXX_value=$CXX --ac_cv_env_CXX_set=${CXX+set} --ac_cv_env_CXX_value=$CXX --ac_env_CXXFLAGS_set=${CXXFLAGS+set} --ac_env_CXXFLAGS_value=$CXXFLAGS --ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} --ac_cv_env_CXXFLAGS_value=$CXXFLAGS --ac_env_CXXCPP_set=${CXXCPP+set} --ac_env_CXXCPP_value=$CXXCPP --ac_cv_env_CXXCPP_set=${CXXCPP+set} --ac_cv_env_CXXCPP_value=$CXXCPP --ac_env_F77_set=${F77+set} --ac_env_F77_value=$F77 --ac_cv_env_F77_set=${F77+set} --ac_cv_env_F77_value=$F77 --ac_env_FFLAGS_set=${FFLAGS+set} --ac_env_FFLAGS_value=$FFLAGS --ac_cv_env_FFLAGS_set=${FFLAGS+set} --ac_cv_env_FFLAGS_value=$FFLAGS - ac_env_XSLTCONFIG_set=${XSLTCONFIG+set} - ac_env_XSLTCONFIG_value=$XSLTCONFIG - ac_cv_env_XSLTCONFIG_set=${XSLTCONFIG+set} -@@ -1051,23 +1036,17 @@ - (and sometimes confusing) to the casual installer - --disable-dependency-tracking Speeds up one-time builds - --enable-dependency-tracking Do not reject slow dependency extractors -- --enable-shared[=PKGS] -- build shared libraries [default=yes] -- --enable-static[=PKGS] -- build static libraries [default=yes] -- --enable-fast-install[=PKGS] -- optimize for fast installation [default=yes] -+ --enable-shared=PKGS build shared libraries default=yes -+ --enable-static=PKGS build static libraries default=yes -+ --enable-fast-install=PKGS optimize for fast installation default=yes - --disable-libtool-lock avoid locking (might break parallel builds) - --disable-yp disable YP directory support - - Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) -- --with-gnu-ld assume the C compiler uses GNU ld [default=no] -- --with-pic try to use only PIC/non-PIC objects [default=use -- both] -- --with-tags[=TAGS] -- include additional configurations [automatic] -+ --with-gnu-ld assume the C compiler uses GNU ld default=no -+ --with-pic try to use only PIC/non-PIC objects default=use both - --with-xslt-config=PATH use xslt-config in PATH to find libxslt - --with-ogg=PREFIX Prefix where libogg is installed (optional) - --with-vorbis=PREFIX Prefix where libvorbis is installed (optional) -@@ -1085,11 +1064,6 @@ - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - CPP C preprocessor -- CXX C++ compiler command -- CXXFLAGS C++ compiler flags -- CXXCPP C++ preprocessor -- F77 Fortran 77 compiler command -- FFLAGS Fortran 77 compiler flags - XSLTCONFIG XSLT configuration program - OGG_PREFIX path to ogg installation - VORBIS_PREFIX -@@ -1189,7 +1163,7 @@ - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi -- cd $ac_popdir -+ cd "$ac_popdir" - done - fi - -@@ -2531,8 +2505,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2590,8 +2563,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2707,8 +2679,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2762,8 +2733,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2808,8 +2778,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2853,8 +2822,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -3093,145 +3061,78 @@ - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} -- case $enableval in -- yes) enable_shared=yes ;; -- no) enable_shared=no ;; -- *) -- enable_shared=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_shared=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac -+case $enableval in -+yes) enable_shared=yes ;; -+no) enable_shared=no ;; -+*) -+ enable_shared=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_shared=yes -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac - else - enable_shared=yes - fi; -- - # Check whether --enable-static or --disable-static was given. - if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} -- case $enableval in -- yes) enable_static=yes ;; -- no) enable_static=no ;; -- *) -- enable_static=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_static=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac -+case $enableval in -+yes) enable_static=yes ;; -+no) enable_static=no ;; -+*) -+ enable_static=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_static=yes -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac - else - enable_static=yes - fi; -- - # Check whether --enable-fast-install or --disable-fast-install was given. - if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} -- case $enableval in -- yes) enable_fast_install=yes ;; -- no) enable_fast_install=no ;; -- *) -- enable_fast_install=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_fast_install=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac --else -- enable_fast_install=yes --fi; -- --echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 --echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 --if test "${lt_cv_path_SED+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- # Loop through the user's path and test for sed and gsed. --# Then use that list of sed's as ones to test for truncation. --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for lt_ac_prog in sed gsed; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then -- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" -- fi -- done -- done --done --lt_ac_max=0 --lt_ac_count=0 --# Add /usr/xpg4/bin/sed as it is typically found on Solaris --# along with /bin/sed that truncates output. --for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do -- test ! -f $lt_ac_sed && continue -- cat /dev/null > conftest.in -- lt_ac_count=0 -- echo $ECHO_N "0123456789$ECHO_C" >conftest.in -- # Check for GNU sed and select it if it is found. -- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then -- lt_cv_path_SED=$lt_ac_sed -- break -- fi -- while true; do -- cat conftest.in conftest.in >conftest.tmp -- mv conftest.tmp conftest.in -- cp conftest.in conftest.nl -- echo >>conftest.nl -- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break -- cmp -s conftest.out conftest.nl || break -- # 10000 chars as input seems more than enough -- test $lt_ac_count -gt 10 && break -- lt_ac_count=`expr $lt_ac_count + 1` -- if test $lt_ac_count -gt $lt_ac_max; then -- lt_ac_max=$lt_ac_count -- lt_cv_path_SED=$lt_ac_sed -+case $enableval in -+yes) enable_fast_install=yes ;; -+no) enable_fast_install=no ;; -+*) -+ enable_fast_install=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_fast_install=yes - fi - done --done -- --fi -- --SED=$lt_cv_path_SED --echo "$as_me:$LINENO: result: $SED" >&5 --echo "${ECHO_T}$SED" >&6 -- --echo "$as_me:$LINENO: checking for egrep" >&5 --echo $ECHO_N "checking for egrep... $ECHO_C" >&6 --if test "${ac_cv_prog_egrep+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ IFS="$ac_save_ifs" -+ ;; -+esac - else -- if echo a | (grep -E '(a|b)') >/dev/null 2>&1 -- then ac_cv_prog_egrep='grep -E' -- else ac_cv_prog_egrep='egrep' -- fi -+ enable_fast_install=yes -+fi; -+# Find the correct PATH separator. Usually this is `:', but -+# DJGPP uses `;' like DOS. -+if test "X${PATH_SEPARATOR+set}" != Xset; then -+ UNAME=${UNAME-`uname 2>/dev/null`} -+ case X$UNAME in -+ *-DOS) lt_cv_sys_path_separator=';' ;; -+ *) lt_cv_sys_path_separator=':' ;; -+ esac -+ PATH_SEPARATOR=$lt_cv_sys_path_separator - fi --echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 --echo "${ECHO_T}$ac_cv_prog_egrep" >&6 -- EGREP=$ac_cv_prog_egrep -- - - - # Check whether --with-gnu-ld or --without-gnu-ld was given. -@@ -3244,8 +3145,8 @@ - ac_prog=ld - if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. -- echo "$as_me:$LINENO: checking for ld used by $CC" >&5 --echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 -+ echo "$as_me:$LINENO: checking for ld used by GCC" >&5 -+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw -@@ -3255,12 +3156,12 @@ - esac - case $ac_prog in - # Accept absolute paths. -- [\\/]* | ?:[\\/]*) -+ [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -- # Canonicalize the pathname of ld -- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` -+ # Canonicalize the path of ld -+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do -- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` -+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; -@@ -3284,26 +3185,22 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test -z "$LD"; then -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do -- IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, -- # but apparently some variants of GNU ld only accept -v. -+ # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. -- case `"$lt_cv_path_LD" -v 2>&1 &1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break -- ;; -- *) -+ else - test "$with_gnu_ld" != yes && break -- ;; -- esac -+ fi - fi - done -- IFS="$lt_save_ifs" -+ IFS="$ac_save_ifs" - else - lt_cv_path_LD="$LD" # Let the user override the test with a path. - fi -@@ -3325,15 +3222,12 @@ - if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- # I'd rather use --version here, but apparently some GNU lds only accept -v. --case `$LD -v 2>&1 &1 &5; then - lt_cv_prog_gnu_ld=yes -- ;; --*) -+else - lt_cv_prog_gnu_ld=no -- ;; --esac -+fi - fi - echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 - echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -@@ -3350,20 +3244,7 @@ - echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 - echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 - reload_flag=$lt_cv_ld_reload_flag --case $reload_flag in --"" | " "*) ;; --*) reload_flag=" $reload_flag" ;; --esac --reload_cmds='$LD$reload_flag -o $output$reload_objs' --case $host_os in -- darwin*) -- if test "$GCC" = yes; then -- reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' -- else -- reload_cmds='$LD$reload_flag -o $output$reload_objs' -- fi -- ;; --esac -+test -n "$reload_flag" && reload_flag=" $reload_flag" - - echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 - echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 -@@ -3374,42 +3255,120 @@ - # Let the user override the test. - lt_cv_path_NM="$NM" - else -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do -- IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. -- tmp_nm="$ac_dir/${ac_tool_prefix}nm" -- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then -+ tmp_nm=$ac_dir/${ac_tool_prefix}nm -+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file -- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in -- */dev/null* | *'Invalid file or object type'*) -+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then - lt_cv_path_NM="$tmp_nm -B" - break -- ;; -- *) -- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in -- */dev/null*) -- lt_cv_path_NM="$tmp_nm -p" -- break -- ;; -- *) -- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but -- continue # so that we can try to find one that supports BSD flags -- ;; -- esac -- esac -+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -p" -+ break -+ else -+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but -+ continue # so that we can try to find one that supports BSD flags -+ fi - fi - done -- IFS="$lt_save_ifs" -+ IFS="$ac_save_ifs" - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm - fi - fi --echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 --echo "${ECHO_T}$lt_cv_path_NM" >&6 -+ - NM="$lt_cv_path_NM" -+echo "$as_me:$LINENO: result: $NM" >&5 -+echo "${ECHO_T}$NM" >&6 -+ -+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 -+if test "${lt_cv_path_SED+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ # Loop through the user's path and test for sed and gsed. -+# Then use that list of sed's as ones to test for truncation. -+as_executable_p="test -f" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_prog in sed gsed; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then -+ _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" -+ fi -+ done -+ done -+done -+ -+ # Create a temporary directory, and hook for its removal unless debugging. -+$debug || -+{ -+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 -+ trap '{ (exit 1); exit 1; }' 1 2 13 15 -+} -+ -+# Create a (secure) tmp directory for tmp files. -+: ${TMPDIR=/tmp} -+{ -+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && -+ test -n "$tmp" && test -d "$tmp" -+} || -+{ -+ tmp=$TMPDIR/sed$$-$RANDOM -+ (umask 077 && mkdir $tmp) -+} || -+{ -+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 -+ { (exit 1); exit 1; } -+} -+ _max=0 -+ _count=0 -+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris -+ # along with /bin/sed that truncates output. -+ for _sed in $_sed_list /usr/xpg4/bin/sed; do -+ test ! -f ${_sed} && break -+ cat /dev/null > "$tmp/sed.in" -+ _count=0 -+ echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" -+ # Check for GNU sed and select it if it is found. -+ if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then -+ lt_cv_path_SED=${_sed} -+ break -+ fi -+ while true; do -+ cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" -+ mv "$tmp/sed.tmp" "$tmp/sed.in" -+ cp "$tmp/sed.in" "$tmp/sed.nl" -+ echo >>"$tmp/sed.nl" -+ ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break -+ cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break -+ # 40000 chars as input seems more than enough -+ test $_count -gt 10 && break -+ _count=`expr $_count + 1` -+ if test $_count -gt $_max; then -+ _max=$_count -+ lt_cv_path_SED=$_sed -+ fi -+ done -+ done -+ rm -rf "$tmp" -+ -+fi -+ -+if test "X$SED" != "X"; then -+ lt_cv_path_SED=$SED -+else -+ SED=$lt_cv_path_SED -+fi -+echo "$as_me:$LINENO: result: $SED" >&5 -+echo "${ECHO_T}$SED" >&6 - - echo "$as_me:$LINENO: checking whether ln -s works" >&5 - echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -@@ -3437,7 +3396,7 @@ - # 'pass_all' -- all dependencies passed with no checks. - # 'test_compile' -- check by making test program. - # 'file_magic [[regex]]' -- check by looking for files in library path --# which responds to the $file_magic_cmd with a given extended regex. -+# which responds to the $file_magic_cmd with a given egrep regex. - # If you have `file' or equivalent on your system and you're not sure - # whether `pass_all' will *always* work, you probably want this one. - -@@ -3450,36 +3409,37 @@ - lt_cv_deplibs_check_method=pass_all - ;; - --bsdi[45]*) -+bsdi4*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - --cygwin*) -- # func_win32_libid is a shell function defined in ltmain.sh -- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' -- lt_cv_file_magic_cmd='func_win32_libid' -- ;; -- --mingw* | pw32*) -- # Base MSYS/MinGW do not provide the 'file' command needed by -- # func_win32_libid shell function, so use a weaker test based on 'objdump'. -+cygwin* | mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - - darwin* | rhapsody*) -- lt_cv_deplibs_check_method=pass_all -+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ case "$host_os" in -+ rhapsody* | darwin1.[012]) -+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` -+ ;; -+ *) # Darwin 1.3 on -+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' -+ ;; -+ esac - ;; - --freebsd* | kfreebsd*-gnu | dragonfly*) -+freebsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. -- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' -+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; -@@ -3493,22 +3453,10 @@ - lt_cv_deplibs_check_method=pass_all - ;; - --hpux10.20* | hpux11*) -+hpux10.20*|hpux11*) -+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_cmd=/usr/bin/file -- case $host_cpu in -- ia64*) -- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' -- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so -- ;; -- hppa*64*) -- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' -- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl -- ;; -- *) -- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' -- lt_cv_file_magic_test_file=/usr/lib/libc.sl -- ;; -- esac -+ lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - - irix5* | irix6* | nonstopux*) -@@ -3522,15 +3470,15 @@ - ;; - - # This must be Linux ELF. --linux*) -+linux-gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - --netbsd*) -+netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' -+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' - else -- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' -+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' - fi - ;; - -@@ -3540,15 +3488,13 @@ - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - --nto-qnx*) -- lt_cv_deplibs_check_method=unknown -- ;; -- - openbsd*) -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' - else -- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' -+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' - fi - ;; - -@@ -3564,6 +3510,10 @@ - lt_cv_deplibs_check_method=pass_all - ;; - -+sysv5uw[78]* | sysv4*uw2*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - case $host_vendor in - motorola) -@@ -3587,10 +3537,6 @@ - ;; - esac - ;; -- --sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) -- lt_cv_deplibs_check_method=pass_all -- ;; - esac - - fi -@@ -3598,210 +3544,211 @@ - echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 - file_magic_cmd=$lt_cv_file_magic_cmd - deplibs_check_method=$lt_cv_deplibs_check_method --test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - --# If no C compiler was specified, use CC. --LTCC=${LTCC-"$CC"} - --# Allow CC to be a program name with arguments. --compiler=$CC - - --# Check whether --enable-libtool-lock or --disable-libtool-lock was given. --if test "${enable_libtool_lock+set}" = set; then -- enableval="$enable_libtool_lock" - --fi; --test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -+# Check for command to grab the raw symbol name followed by C symbol from nm. -+echo "$as_me:$LINENO: checking command to parse $NM output" >&5 -+echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6 -+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else - --# Some flags need to be propagated to the compiler or linker for good --# libtool support. --case $host in --ia64-*-hpux*) -- # Find out which ABI we are using. -- echo 'int i;' > conftest.$ac_ext -- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -- case `/usr/bin/file conftest.$ac_objext` in -- *ELF-32*) -- HPUX_IA64_MODE="32" -- ;; -- *ELF-64*) -- HPUX_IA64_MODE="64" -- ;; -- esac -- fi -- rm -rf conftest* -- ;; --*-*-irix6*) -- # Find out which ABI we are using. -- echo '#line 3644 "configure"' > conftest.$ac_ext -- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -- if test "$lt_cv_prog_gnu_ld" = yes; then -- case `/usr/bin/file conftest.$ac_objext` in -- *32-bit*) -- LD="${LD-ld} -melf32bsmip" -- ;; -- *N32*) -- LD="${LD-ld} -melf32bmipn32" -- ;; -- *64-bit*) -- LD="${LD-ld} -melf64bmip" -- ;; -- esac -- else -- case `/usr/bin/file conftest.$ac_objext` in -- *32-bit*) -- LD="${LD-ld} -32" -- ;; -- *N32*) -- LD="${LD-ld} -n32" -- ;; -- *64-bit*) -- LD="${LD-ld} -64" -- ;; -- esac -- fi -- fi -- rm -rf conftest* -- ;; -+# These are sane defaults that work on at least a few old systems. -+# [They come from Ultrix. What could be older than Ultrix?!! ;)] - --x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) -- # Find out which ABI we are using. -- echo 'int i;' > conftest.$ac_ext -- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -- case `/usr/bin/file conftest.o` in -- *32-bit*) -- case $host in -- x86_64-*linux*) -- LD="${LD-ld} -m elf_i386" -- ;; -- ppc64-*linux*|powerpc64-*linux*) -- LD="${LD-ld} -m elf32ppclinux" -- ;; -- s390x-*linux*) -- LD="${LD-ld} -m elf_s390" -- ;; -- sparc64-*linux*) -- LD="${LD-ld} -m elf32_sparc" -- ;; -- esac -- ;; -- *64-bit*) -- case $host in -- x86_64-*linux*) -- LD="${LD-ld} -m elf_x86_64" -- ;; -- ppc*-*linux*|powerpc*-*linux*) -- LD="${LD-ld} -m elf64ppc" -- ;; -- s390*-*linux*) -- LD="${LD-ld} -m elf64_s390" -- ;; -- sparc*-*linux*) -- LD="${LD-ld} -m elf64_sparc" -- ;; -- esac -- ;; -- esac -- fi -- rm -rf conftest* -+# Character class describing NM global symbol codes. -+symcode='[BCDEGRST]' -+ -+# Regexp to match symbols that can be accessed directly from C. -+sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -+ -+# Transform the above into a raw symbol and a C symbol. -+symxfrm='\1 \2\3 \3' -+ -+# Transform an extracted symbol line into a proper C declaration -+lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" -+ -+# Transform an extracted symbol line into symbol name and symbol address -+lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ -+# Define system-specific variables. -+case $host_os in -+aix*) -+ symcode='[BCDT]' -+ ;; -+cygwin* | mingw* | pw32*) -+ symcode='[ABCDGISTW]' -+ ;; -+hpux*) # Its linker distinguishes data from code symbols -+ lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -+ lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ ;; -+irix* | nonstopux*) -+ symcode='[BCDEGRST]' -+ ;; -+osf*) -+ symcode='[BCDEGQRST]' -+ ;; -+solaris* | sysv5*) -+ symcode='[BDT]' -+ ;; -+sysv4) -+ symcode='[DFNSTU]' - ;; -+esac - --*-*-sco3.2v5*) -- # On SCO OpenServer 5, we need -belf to get full-featured binaries. -- SAVE_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS -belf" -- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 --echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 --if test "${lt_cv_cc_needs_belf+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -+# Handle CRLF in mingw tool chain -+opt_cr= -+case $host_os in -+mingw*) -+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp -+ ;; -+esac - -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -+# If we're using GNU nm, then use its standard symbol codes. -+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then -+ symcode='[ABCDGISTW]' -+fi - --int --main () --{ -+# Try without a prefix undercore, then with it. -+for ac_symprfx in "" "_"; do - -- ; -- return 0; -+ # Write the raw and C identifiers. -+lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" -+ -+ # Check to see that the pipe works correctly. -+ pipe_works=no -+ rm -f conftest* -+ cat > conftest.$ac_ext <&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+#endif -+int main(){nm_test_var='a';nm_test_func();return(0);} -+EOF -+ -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+ (exit $ac_status); }; then -+ # Now try to grab the symbols. -+ nlist=conftest.nm -+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 -+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- lt_cv_cc_needs_belf=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+ (exit $ac_status); } && test -s "$nlist"; then -+ # Try sorting and uniquifying the output. -+ if sort "$nlist" | uniq > "$nlist"T; then -+ mv -f "$nlist"T "$nlist" -+ else -+ rm -f "$nlist"T -+ fi - --lt_cv_cc_needs_belf=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ # Make sure that we snagged all the symbols we need. -+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then -+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then -+ cat < conftest.$ac_ext -+#ifdef __cplusplus -+extern "C" { -+#endif - --fi --echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 --echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 -- if test x"$lt_cv_cc_needs_belf" != x"yes"; then -- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -- CFLAGS="$SAVE_CFLAGS" -+EOF -+ # Now generate the symbol file. -+ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' -+ -+ cat <> conftest.$ac_ext -+#if defined (__STDC__) && __STDC__ -+# define lt_ptr void * -+#else -+# define lt_ptr char * -+# define const -+#endif -+ -+/* The mapping between symbol names and symbols. */ -+const struct { -+ const char *name; -+ lt_ptr address; -+} -+lt_preloaded_symbols[] = -+{ -+EOF -+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext -+ cat <<\EOF >> conftest.$ac_ext -+ {0, (lt_ptr) 0} -+}; -+ -+#ifdef __cplusplus -+} -+#endif -+EOF -+ # Now try linking the two files. -+ mv conftest.$ac_objext conftstm.$ac_objext -+ save_LIBS="$LIBS" -+ save_CFLAGS="$CFLAGS" -+ LIBS="conftstm.$ac_objext" -+ CFLAGS="$CFLAGS$no_builtin_flag" -+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && test -s conftest$ac_exeext; then -+ pipe_works=yes -+ fi -+ LIBS="$save_LIBS" -+ CFLAGS="$save_CFLAGS" -+ else -+ echo "cannot find nm_test_func in $nlist" >&5 -+ fi -+ else -+ echo "cannot find nm_test_var in $nlist" >&5 -+ fi -+ else -+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 -+ fi -+ else -+ echo "$progname: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 - fi -- ;; -+ rm -f conftest* conftst* - --esac -+ # Do not use the global_symbol_pipe unless it works. -+ if test "$pipe_works" = yes; then -+ break -+ else -+ lt_cv_sys_global_symbol_pipe= -+ fi -+done - --need_locks="$enable_libtool_lock" -+fi - -+global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" -+if test -z "$lt_cv_sys_global_symbol_pipe"; then -+ global_symbol_to_cdecl= -+ global_symbol_to_c_name_address= -+else -+ global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" -+ global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" -+fi -+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; -+then -+ echo "$as_me:$LINENO: result: failed" >&5 -+echo "${ECHO_T}failed" >&6 -+else -+ echo "$as_me:$LINENO: result: ok" >&5 -+echo "${ECHO_T}ok" >&6 -+fi - - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' -@@ -4038,6 +3985,21 @@ - ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -+echo "$as_me:$LINENO: checking for egrep" >&5 -+echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -+if test "${ac_cv_prog_egrep+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1 -+ then ac_cv_prog_egrep='grep -E' -+ else ac_cv_prog_egrep='egrep' -+ fi -+fi -+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -+echo "${ECHO_T}$ac_cv_prog_egrep" >&6 -+ EGREP=$ac_cv_prog_egrep -+ -+ - echo "$as_me:$LINENO: checking for ANSI C header files" >&5 - echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 - if test "${ac_cv_header_stdc+set}" = set; then -@@ -4071,8 +4033,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4242,8 +4203,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4310,8 +4270,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4426,65 +4385,160 @@ - - done - --ac_ext=cc --ac_cpp='$CXXCPP $CPPFLAGS' --ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_cxx_compiler_gnu --if test -n "$ac_tool_prefix"; then -- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC -- do -- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. --set dummy $ac_tool_prefix$ac_prog; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_CXX+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$CXX"; then -- ac_cv_prog_CXX="$CXX" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done - --fi --fi --CXX=$ac_cv_prog_CXX --if test -n "$CXX"; then -- echo "$as_me:$LINENO: result: $CXX" >&5 --echo "${ECHO_T}$CXX" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi - -- test -n "$CXX" && break -- done --fi --if test -z "$CXX"; then -- ac_ct_CXX=$CXX -- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC --do -- # Extract the first word of "$ac_prog", so it can be a program name with args. --set dummy $ac_prog; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ -+ -+ -+# Only perform the check for file, if the check method requires it -+case $deplibs_check_method in -+file_magic*) -+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then -+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 -+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ case $MAGIC_CMD in -+ /*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. -+ ;; -+ *) -+ ac_save_MAGIC_CMD="$MAGIC_CMD" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="/usr/bin:$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/${ac_tool_prefix}file; then -+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" -+ if test -n "$file_magic_test_file"; then -+ case $deplibs_check_method in -+ "file_magic "*) -+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" -+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -+ egrep "$file_magic_regex" > /dev/null; then -+ : -+ else -+ cat <&2 -+ -+*** Warning: the command libtool uses to detect shared libraries, -+*** $file_magic_cmd, produces output that libtool cannot recognize. -+*** The result is that libtool may fail to recognize shared libraries -+*** as such. This will affect the creation of libtool libraries that -+*** depend on shared libraries, but programs linked with such libtool -+*** libraries will work regardless of this problem. Nevertheless, you -+*** may want to report the problem to your system manager and/or to -+*** bug-libtool@gnu.org -+ -+EOF -+ fi ;; -+ esac -+ fi -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ MAGIC_CMD="$ac_save_MAGIC_CMD" -+ ;; -+esac -+fi -+ -+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+if test -n "$MAGIC_CMD"; then -+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -+echo "${ECHO_T}$MAGIC_CMD" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+if test -z "$lt_cv_path_MAGIC_CMD"; then -+ if test -n "$ac_tool_prefix"; then -+ echo "$as_me:$LINENO: checking for file" >&5 -+echo $ECHO_N "checking for file... $ECHO_C" >&6 -+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ case $MAGIC_CMD in -+ /*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. -+ ;; -+ *) -+ ac_save_MAGIC_CMD="$MAGIC_CMD" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="/usr/bin:$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/file; then -+ lt_cv_path_MAGIC_CMD="$ac_dir/file" -+ if test -n "$file_magic_test_file"; then -+ case $deplibs_check_method in -+ "file_magic "*) -+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" -+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -+ egrep "$file_magic_regex" > /dev/null; then -+ : -+ else -+ cat <&2 -+ -+*** Warning: the command libtool uses to detect shared libraries, -+*** $file_magic_cmd, produces output that libtool cannot recognize. -+*** The result is that libtool may fail to recognize shared libraries -+*** as such. This will affect the creation of libtool libraries that -+*** depend on shared libraries, but programs linked with such libtool -+*** libraries will work regardless of this problem. Nevertheless, you -+*** may want to report the problem to your system manager and/or to -+*** bug-libtool@gnu.org -+ -+EOF -+ fi ;; -+ esac -+ fi -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ MAGIC_CMD="$ac_save_MAGIC_CMD" -+ ;; -+esac -+fi -+ -+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+if test -n "$MAGIC_CMD"; then -+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -+echo "${ECHO_T}$MAGIC_CMD" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ else -+ MAGIC_CMD=: -+ fi -+fi -+ -+ fi -+ ;; -+esac -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -+set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_RANLIB+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- if test -n "$ac_ct_CXX"; then -- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -+ if test -n "$RANLIB"; then -+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. - else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH -@@ -4493,7 +4547,7 @@ - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ac_ct_CXX="$ac_prog" -+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -4502,12050 +4556,751 @@ - - fi - fi --ac_ct_CXX=$ac_cv_prog_ac_ct_CXX --if test -n "$ac_ct_CXX"; then -- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 --echo "${ECHO_T}$ac_ct_CXX" >&6 -+RANLIB=$ac_cv_prog_RANLIB -+if test -n "$RANLIB"; then -+ echo "$as_me:$LINENO: result: $RANLIB" >&5 -+echo "${ECHO_T}$RANLIB" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -- test -n "$ac_ct_CXX" && break --done --test -n "$ac_ct_CXX" || ac_ct_CXX="g++" -- -- CXX=$ac_ct_CXX - fi -- -- --# Provide some information about the compiler. --echo "$as_me:$LINENO:" \ -- "checking for C++ compiler version" >&5 --ac_compiler=`set X $ac_compile; echo $2` --{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 -- (eval $ac_compiler --version &5) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 -- (eval $ac_compiler -v &5) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 -- (eval $ac_compiler -V &5) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } -- --echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 --echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 --if test "${ac_cv_cxx_compiler_gnu+set}" = set; then -+if test -z "$ac_cv_prog_RANLIB"; then -+ ac_ct_RANLIB=$RANLIB -+ # Extract the first word of "ranlib", so it can be a program name with args. -+set dummy ranlib; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --int --main () --{ --#ifndef __GNUC__ -- choke me --#endif -- -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_compiler_gnu=yes -+ if test -n "$ac_ct_RANLIB"; then -+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_RANLIB="ranlib" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done - --ac_compiler_gnu=no -+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" - fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --ac_cv_cxx_compiler_gnu=$ac_compiler_gnu -- - fi --echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 --echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 --GXX=`test $ac_compiler_gnu = yes && echo yes` --ac_test_CXXFLAGS=${CXXFLAGS+set} --ac_save_CXXFLAGS=$CXXFLAGS --CXXFLAGS="-g" --echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 --echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 --if test "${ac_cv_prog_cxx_g+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -+if test -n "$ac_ct_RANLIB"; then -+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -+echo "${ECHO_T}$ac_ct_RANLIB" >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi - --int --main () --{ -+ RANLIB=$ac_ct_RANLIB -+else -+ RANLIB="$ac_cv_prog_RANLIB" -+fi - -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_prog_cxx_g=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_prog_cxx_g=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --fi --echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 --echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 --if test "$ac_test_CXXFLAGS" = set; then -- CXXFLAGS=$ac_save_CXXFLAGS --elif test $ac_cv_prog_cxx_g = yes; then -- if test "$GXX" = yes; then -- CXXFLAGS="-g -O2" -- else -- CXXFLAGS="-g" -- fi --else -- if test "$GXX" = yes; then -- CXXFLAGS="-O2" -- else -- CXXFLAGS= -- fi --fi --for ac_declaration in \ -- '' \ -- 'extern "C" void std::exit (int) throw (); using std::exit;' \ -- 'extern "C" void std::exit (int); using std::exit;' \ -- 'extern "C" void exit (int) throw ();' \ -- 'extern "C" void exit (int);' \ -- 'void exit (int);' --do -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_declaration --#include --int --main () --{ --exit (42); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --continue --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_declaration --int --main () --{ --exit (42); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- break --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --done --rm -f conftest* --if test -n "$ac_declaration"; then -- echo '#ifdef __cplusplus' >>confdefs.h -- echo $ac_declaration >>confdefs.h -- echo '#endif' >>confdefs.h --fi -- --ac_ext=cc --ac_cpp='$CXXCPP $CPPFLAGS' --ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -- --depcc="$CXX" am_compiler_list= -- --echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 --echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 --if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -+set dummy ${ac_tool_prefix}strip; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then -- # We make a subdir and do the tests there. Otherwise we can end up -- # making bogus files that we don't know about and never remove. For -- # instance it was reported that on HP-UX the gcc test will end up -- # making a dummy file named `D' -- because `-MD' means `put the output -- # in D'. -- mkdir conftest.dir -- # Copy depcomp to subdir because otherwise we won't find it if we're -- # using a relative directory. -- cp "$am_depcomp" conftest.dir -- cd conftest.dir -- -- am_cv_CXX_dependencies_compiler_type=none -- if test "$am_compiler_list" = ""; then -- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` -- fi -- for depmode in $am_compiler_list; do -- # We need to recreate these files for each test, as the compiler may -- # overwrite some of them when testing with obscure command lines. -- # This happens at least with the AIX C compiler. -- echo '#include "conftest.h"' > conftest.c -- echo 'int i;' > conftest.h -- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf -- -- case $depmode in -- nosideeffect) -- # after this tag, mechanisms are not by side-effect, so they'll -- # only be used when explicitly requested -- if test "x$enable_dependency_tracking" = xyes; then -- continue -- else -- break -- fi -- ;; -- none) break ;; -- esac -- # We check with `-c' and `-o' for the sake of the "dashmstdout" -- # mode. It turns out that the SunPro C++ compiler does not properly -- # handle `-M -o', and we need to detect this. -- if depmode=$depmode \ -- source=conftest.c object=conftest.o \ -- depfile=conftest.Po tmpdepfile=conftest.TPo \ -- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && -- grep conftest.h conftest.Po > /dev/null 2>&1 && -- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then -- am_cv_CXX_dependencies_compiler_type=$depmode -- break -- fi -- done -- -- cd .. -- rm -rf conftest.dir --else -- am_cv_CXX_dependencies_compiler_type=none --fi -- --fi --echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 --echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 --CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type -- -- -- -- --if test -n "$CXX" && ( test "X$CXX" != "Xno" && -- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || -- (test "X$CXX" != "Xg++"))) ; then -- ac_ext=cc --ac_cpp='$CXXCPP $CPPFLAGS' --ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_cxx_compiler_gnu --echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 --echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 --if test -z "$CXXCPP"; then -- if test "${ac_cv_prog_CXXCPP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ if test -n "$STRIP"; then -+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. - else -- # Double quotes because CXXCPP needs to be expanded -- for CXXCPP in "$CXX -E" "/lib/cpp" -- do -- ac_preproc_ok=false --for ac_cxx_preproc_warn_flag in '' yes -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH - do -- # Use a header file that comes with gcc, so configuring glibc -- # with a fresh cross-compiler works. -- # Prefer to if __STDC__ is defined, since -- # exists even on freestanding compilers. -- # On the NeXT, cc -E runs the code through the compiler's parser, -- # not just through cpp. "Syntax error" is here to catch this case. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#ifdef __STDC__ --# include --#else --# include --#endif -- Syntax error --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_cxx_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag -- else -- ac_cpp_err= -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_STRIP="${ac_tool_prefix}strip" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 - fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- # Broken: fails on valid input. --continue --fi --rm -f conftest.err conftest.$ac_ext -- -- # OK, works on sane cases. Now check whether non-existent headers -- # can be detected and how. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_cxx_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- # Broken: success on invalid input. --continue --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- # Passes both tests. --ac_preproc_ok=: --break --fi --rm -f conftest.err conftest.$ac_ext -- --done --# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then -- break --fi -- -- done -- ac_cv_prog_CXXCPP=$CXXCPP -- --fi -- CXXCPP=$ac_cv_prog_CXXCPP --else -- ac_cv_prog_CXXCPP=$CXXCPP --fi --echo "$as_me:$LINENO: result: $CXXCPP" >&5 --echo "${ECHO_T}$CXXCPP" >&6 --ac_preproc_ok=false --for ac_cxx_preproc_warn_flag in '' yes --do -- # Use a header file that comes with gcc, so configuring glibc -- # with a fresh cross-compiler works. -- # Prefer to if __STDC__ is defined, since -- # exists even on freestanding compilers. -- # On the NeXT, cc -E runs the code through the compiler's parser, -- # not just through cpp. "Syntax error" is here to catch this case. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#ifdef __STDC__ --# include --#else --# include --#endif -- Syntax error --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_cxx_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- # Broken: fails on valid input. --continue --fi --rm -f conftest.err conftest.$ac_ext -- -- # OK, works on sane cases. Now check whether non-existent headers -- # can be detected and how. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_cxx_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- # Broken: success on invalid input. --continue --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- # Passes both tests. --ac_preproc_ok=: --break --fi --rm -f conftest.err conftest.$ac_ext -- --done --# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then -- : --else -- { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check --See \`config.log' for more details." >&5 --echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --fi -- --ac_ext=cc --ac_cpp='$CXXCPP $CPPFLAGS' --ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -- --fi -- -- --ac_ext=f --ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' --ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_f77_compiler_gnu --if test -n "$ac_tool_prefix"; then -- for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran -- do -- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. --set dummy $ac_tool_prefix$ac_prog; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_F77+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$F77"; then -- ac_cv_prog_F77="$F77" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_F77="$ac_tool_prefix$ac_prog" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- --fi --fi --F77=$ac_cv_prog_F77 --if test -n "$F77"; then -- echo "$as_me:$LINENO: result: $F77" >&5 --echo "${ECHO_T}$F77" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- -- test -n "$F77" && break -- done --fi --if test -z "$F77"; then -- ac_ct_F77=$F77 -- for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran --do -- # Extract the first word of "$ac_prog", so it can be a program name with args. --set dummy $ac_prog; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_ac_ct_F77+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$ac_ct_F77"; then -- ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ac_ct_F77="$ac_prog" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- --fi --fi --ac_ct_F77=$ac_cv_prog_ac_ct_F77 --if test -n "$ac_ct_F77"; then -- echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 --echo "${ECHO_T}$ac_ct_F77" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- -- test -n "$ac_ct_F77" && break -+done - done - -- F77=$ac_ct_F77 --fi -- -- --# Provide some information about the compiler. --echo "$as_me:5183:" \ -- "checking for Fortran 77 compiler version" >&5 --ac_compiler=`set X $ac_compile; echo $2` --{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 -- (eval $ac_compiler --version &5) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 -- (eval $ac_compiler -v &5) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 -- (eval $ac_compiler -V &5) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --rm -f a.out -- --# If we don't use `.F' as extension, the preprocessor is not run on the --# input file. (Note that this only needs to work for GNU compilers.) --ac_save_ext=$ac_ext --ac_ext=F --echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 --echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 --if test "${ac_cv_f77_compiler_gnu+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF -- program main --#ifndef __GNUC__ -- choke me --#endif -- -- end --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_f77_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_compiler_gnu=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_compiler_gnu=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --ac_cv_f77_compiler_gnu=$ac_compiler_gnu -- --fi --echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 --echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 --ac_ext=$ac_save_ext --ac_test_FFLAGS=${FFLAGS+set} --ac_save_FFLAGS=$FFLAGS --FFLAGS= --echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 --echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 --if test "${ac_cv_prog_f77_g+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- FFLAGS=-g --cat >conftest.$ac_ext <<_ACEOF -- program main -- -- end --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_f77_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_prog_f77_g=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_prog_f77_g=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -- --fi --echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 --echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 --if test "$ac_test_FFLAGS" = set; then -- FFLAGS=$ac_save_FFLAGS --elif test $ac_cv_prog_f77_g = yes; then -- if test "x$ac_cv_f77_compiler_gnu" = xyes; then -- FFLAGS="-g -O2" -- else -- FFLAGS="-g" -- fi --else -- if test "x$ac_cv_f77_compiler_gnu" = xyes; then -- FFLAGS="-O2" -- else -- FFLAGS= -- fi --fi -- --G77=`test $ac_compiler_gnu = yes && echo yes` --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- -- -- --# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -- --# find the maximum length of command line arguments --echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 --echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 --if test "${lt_cv_sys_max_cmd_len+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- i=0 -- teststring="ABCD" -- -- case $build_os in -- msdosdjgpp*) -- # On DJGPP, this test can blow up pretty badly due to problems in libc -- # (any single argument exceeding 2000 bytes causes a buffer overrun -- # during glob expansion). Even if it were fixed, the result of this -- # check would be larger than it should be. -- lt_cv_sys_max_cmd_len=12288; # 12K is about right -- ;; -- -- gnu*) -- # Under GNU Hurd, this test is not required because there is -- # no limit to the length of command line arguments. -- # Libtool will interpret -1 as no limit whatsoever -- lt_cv_sys_max_cmd_len=-1; -- ;; -- -- cygwin* | mingw*) -- # On Win9x/ME, this test blows up -- it succeeds, but takes -- # about 5 minutes as the teststring grows exponentially. -- # Worse, since 9x/ME are not pre-emptively multitasking, -- # you end up with a "frozen" computer, even though with patience -- # the test eventually succeeds (with a max line length of 256k). -- # Instead, let's just punt: use the minimum linelength reported by -- # all of the supported platforms: 8192 (on NT/2K/XP). -- lt_cv_sys_max_cmd_len=8192; -- ;; -- -- amigaos*) -- # On AmigaOS with pdksh, this test takes hours, literally. -- # So we just punt and use a minimum line length of 8192. -- lt_cv_sys_max_cmd_len=8192; -- ;; -- -- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) -- # This has been around since 386BSD, at least. Likely further. -- if test -x /sbin/sysctl; then -- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` -- elif test -x /usr/sbin/sysctl; then -- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` -- else -- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs -- fi -- # And add a safety zone -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` -- ;; -- osf*) -- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure -- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not -- # nice to cause kernel panics so lets avoid the loop below. -- # First set a reasonable default. -- lt_cv_sys_max_cmd_len=16384 -- # -- if test -x /sbin/sysconfig; then -- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in -- *1*) lt_cv_sys_max_cmd_len=-1 ;; -- esac -- fi -- ;; -- *) -- # If test is not a shell built-in, we'll probably end up computing a -- # maximum length that is only half of the actual maximum length, but -- # we can't tell. -- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} -- while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ -- = "XX$teststring") >/dev/null 2>&1 && -- new_result=`expr "X$teststring" : ".*" 2>&1` && -- lt_cv_sys_max_cmd_len=$new_result && -- test $i != 17 # 1/2 MB should be enough -- do -- i=`expr $i + 1` -- teststring=$teststring$teststring -- done -- teststring= -- # Add a significant safety factor because C++ compilers can tack on massive -- # amounts of additional arguments before passing them to the linker. -- # It appears as though 1/2 is a usable value. -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` -- ;; -- esac -- --fi -- --if test -n $lt_cv_sys_max_cmd_len ; then -- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 --echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 --else -- echo "$as_me:$LINENO: result: none" >&5 --echo "${ECHO_T}none" >&6 --fi -- -- -- -- --# Check for command to grab the raw symbol name followed by C symbol from nm. --echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 --echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 --if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- --# These are sane defaults that work on at least a few old systems. --# [They come from Ultrix. What could be older than Ultrix?!! ;)] -- --# Character class describing NM global symbol codes. --symcode='[BCDEGRST]' -- --# Regexp to match symbols that can be accessed directly from C. --sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -- --# Transform an extracted symbol line into a proper C declaration --lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" -- --# Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -- --# Define system-specific variables. --case $host_os in --aix*) -- symcode='[BCDT]' -- ;; --cygwin* | mingw* | pw32*) -- symcode='[ABCDGISTW]' -- ;; --hpux*) # Its linker distinguishes data from code symbols -- if test "$host_cpu" = ia64; then -- symcode='[ABCDEGRST]' -- fi -- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -- ;; --linux*) -- if test "$host_cpu" = ia64; then -- symcode='[ABCDGIRSTW]' -- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -- fi -- ;; --irix* | nonstopux*) -- symcode='[BCDEGRST]' -- ;; --osf*) -- symcode='[BCDEGQRST]' -- ;; --solaris* | sysv5*) -- symcode='[BDRT]' -- ;; --sysv4) -- symcode='[DFNSTU]' -- ;; --esac -- --# Handle CRLF in mingw tool chain --opt_cr= --case $build_os in --mingw*) -- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp -- ;; --esac -- --# If we're using GNU nm, then use its standard symbol codes. --case `$NM -V 2>&1` in --*GNU* | *'with BFD'*) -- symcode='[ABCDGIRSTW]' ;; --esac -- --# Try without a prefix undercore, then with it. --for ac_symprfx in "" "_"; do -- -- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. -- symxfrm="\\1 $ac_symprfx\\2 \\2" -- -- # Write the raw and C identifiers. -- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" -- -- # Check to see that the pipe works correctly. -- pipe_works=no -- -- rm -f conftest* -- cat > conftest.$ac_ext <&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -- # Now try to grab the symbols. -- nlist=conftest.nm -- if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 -- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && test -s "$nlist"; then -- # Try sorting and uniquifying the output. -- if sort "$nlist" | uniq > "$nlist"T; then -- mv -f "$nlist"T "$nlist" -- else -- rm -f "$nlist"T -- fi -- -- # Make sure that we snagged all the symbols we need. -- if grep ' nm_test_var$' "$nlist" >/dev/null; then -- if grep ' nm_test_func$' "$nlist" >/dev/null; then -- cat < conftest.$ac_ext --#ifdef __cplusplus --extern "C" { --#endif -- --EOF -- # Now generate the symbol file. -- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' -- -- cat <> conftest.$ac_ext --#if defined (__STDC__) && __STDC__ --# define lt_ptr_t void * --#else --# define lt_ptr_t char * --# define const --#endif -- --/* The mapping between symbol names and symbols. */ --const struct { -- const char *name; -- lt_ptr_t address; --} --lt_preloaded_symbols[] = --{ --EOF -- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext -- cat <<\EOF >> conftest.$ac_ext -- {0, (lt_ptr_t) 0} --}; -- --#ifdef __cplusplus --} --#endif --EOF -- # Now try linking the two files. -- mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -- LIBS="conftstm.$ac_objext" -- CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" -- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && test -s conftest${ac_exeext}; then -- pipe_works=yes -- fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -- else -- echo "cannot find nm_test_func in $nlist" >&5 -- fi -- else -- echo "cannot find nm_test_var in $nlist" >&5 -- fi -- else -- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 -- fi -- else -- echo "$progname: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- fi -- rm -f conftest* conftst* -- -- # Do not use the global_symbol_pipe unless it works. -- if test "$pipe_works" = yes; then -- break -- else -- lt_cv_sys_global_symbol_pipe= -- fi --done -- --fi -- --if test -z "$lt_cv_sys_global_symbol_pipe"; then -- lt_cv_sys_global_symbol_to_cdecl= --fi --if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then -- echo "$as_me:$LINENO: result: failed" >&5 --echo "${ECHO_T}failed" >&6 --else -- echo "$as_me:$LINENO: result: ok" >&5 --echo "${ECHO_T}ok" >&6 --fi -- --echo "$as_me:$LINENO: checking for objdir" >&5 --echo $ECHO_N "checking for objdir... $ECHO_C" >&6 --if test "${lt_cv_objdir+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- rm -f .libs 2>/dev/null --mkdir .libs 2>/dev/null --if test -d .libs; then -- lt_cv_objdir=.libs --else -- # MS-DOS does not allow filenames that begin with a dot. -- lt_cv_objdir=_libs --fi --rmdir .libs 2>/dev/null --fi --echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 --echo "${ECHO_T}$lt_cv_objdir" >&6 --objdir=$lt_cv_objdir -- -- -- -- -- --case $host_os in --aix3*) -- # AIX sometimes has problems with the GCC collect2 program. For some -- # reason, if we set the COLLECT_NAMES environment variable, the problems -- # vanish in a puff of smoke. -- if test "X${COLLECT_NAMES+set}" != Xset; then -- COLLECT_NAMES= -- export COLLECT_NAMES -- fi -- ;; --esac -- --# Sed substitution that helps us do robust quoting. It backslashifies --# metacharacters that are still active within double-quoted strings. --Xsed='sed -e 1s/^X//' --sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' -- --# Same as above, but do not quote variable references. --double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' -- --# Sed substitution to delay expansion of an escaped shell variable in a --# double_quote_subst'ed string. --delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -- --# Sed substitution to avoid accidental globbing in evaled expressions --no_glob_subst='s/\*/\\\*/g' -- --# Constants: --rm="rm -f" -- --# Global variables: --default_ofile=libtool --can_build_shared=yes -- --# All known linkers require a `.a' archive for static linking (except MSVC, --# which needs '.lib'). --libext=a --ltmain="$ac_aux_dir/ltmain.sh" --ofile="$default_ofile" --with_gnu_ld="$lt_cv_prog_gnu_ld" -- --if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_AR+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$AR"; then -- ac_cv_prog_AR="$AR" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- --fi --fi --AR=$ac_cv_prog_AR --if test -n "$AR"; then -- echo "$as_me:$LINENO: result: $AR" >&5 --echo "${ECHO_T}$AR" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- --fi --if test -z "$ac_cv_prog_AR"; then -- ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_ac_ct_AR+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$ac_ct_AR"; then -- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ac_ct_AR="ar" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- -- test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" --fi --fi --ac_ct_AR=$ac_cv_prog_ac_ct_AR --if test -n "$ac_ct_AR"; then -- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 --echo "${ECHO_T}$ac_ct_AR" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- -- AR=$ac_ct_AR --else -- AR="$ac_cv_prog_AR" --fi -- --if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. --set dummy ${ac_tool_prefix}ranlib; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_RANLIB+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$RANLIB"; then -- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- --fi --fi --RANLIB=$ac_cv_prog_RANLIB --if test -n "$RANLIB"; then -- echo "$as_me:$LINENO: result: $RANLIB" >&5 --echo "${ECHO_T}$RANLIB" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- --fi --if test -z "$ac_cv_prog_RANLIB"; then -- ac_ct_RANLIB=$RANLIB -- # Extract the first word of "ranlib", so it can be a program name with args. --set dummy ranlib; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$ac_ct_RANLIB"; then -- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ac_ct_RANLIB="ranlib" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- -- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" --fi --fi --ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB --if test -n "$ac_ct_RANLIB"; then -- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 --echo "${ECHO_T}$ac_ct_RANLIB" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- -- RANLIB=$ac_ct_RANLIB --else -- RANLIB="$ac_cv_prog_RANLIB" --fi -- --if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. --set dummy ${ac_tool_prefix}strip; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_STRIP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$STRIP"; then -- ac_cv_prog_STRIP="$STRIP" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_STRIP="${ac_tool_prefix}strip" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- --fi --fi --STRIP=$ac_cv_prog_STRIP --if test -n "$STRIP"; then -- echo "$as_me:$LINENO: result: $STRIP" >&5 --echo "${ECHO_T}$STRIP" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- --fi --if test -z "$ac_cv_prog_STRIP"; then -- ac_ct_STRIP=$STRIP -- # Extract the first word of "strip", so it can be a program name with args. --set dummy strip; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 --if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -n "$ac_ct_STRIP"; then -- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ac_ct_STRIP="strip" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- -- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" --fi --fi --ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP --if test -n "$ac_ct_STRIP"; then -- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 --echo "${ECHO_T}$ac_ct_STRIP" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- -- STRIP=$ac_ct_STRIP --else -- STRIP="$ac_cv_prog_STRIP" --fi -- -- --old_CC="$CC" --old_CFLAGS="$CFLAGS" -- --# Set sane defaults for various variables --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru --test -z "$AS" && AS=as --test -z "$CC" && CC=cc --test -z "$LTCC" && LTCC=$CC --test -z "$DLLTOOL" && DLLTOOL=dlltool --test -z "$LD" && LD=ld --test -z "$LN_S" && LN_S="ln -s" --test -z "$MAGIC_CMD" && MAGIC_CMD=file --test -z "$NM" && NM=nm --test -z "$SED" && SED=sed --test -z "$OBJDUMP" && OBJDUMP=objdump --test -z "$RANLIB" && RANLIB=: --test -z "$STRIP" && STRIP=: --test -z "$ac_objext" && ac_objext=o -- --# Determine commands to create old-style static archives. --old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' --old_postinstall_cmds='chmod 644 $oldlib' --old_postuninstall_cmds= -- --if test -n "$RANLIB"; then -- case $host_os in -- openbsd*) -- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" -- ;; -- *) -- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -- ;; -- esac -- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" --fi -- --for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -- -- --# Only perform the check for file, if the check method requires it --case $deplibs_check_method in --file_magic*) -- if test "$file_magic_cmd" = '$MAGIC_CMD'; then -- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 --echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 --if test "${lt_cv_path_MAGIC_CMD+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- case $MAGIC_CMD in --[\\/*] | ?:[\\/]*) -- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -- ;; --*) -- lt_save_MAGIC_CMD="$MAGIC_CMD" -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" -- for ac_dir in $ac_dummy; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/${ac_tool_prefix}file; then -- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" -- if test -n "$file_magic_test_file"; then -- case $deplibs_check_method in -- "file_magic "*) -- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` -- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -- $EGREP "$file_magic_regex" > /dev/null; then -- : -- else -- cat <&2 -- --*** Warning: the command libtool uses to detect shared libraries, --*** $file_magic_cmd, produces output that libtool cannot recognize. --*** The result is that libtool may fail to recognize shared libraries --*** as such. This will affect the creation of libtool libraries that --*** depend on shared libraries, but programs linked with such libtool --*** libraries will work regardless of this problem. Nevertheless, you --*** may want to report the problem to your system manager and/or to --*** bug-libtool@gnu.org -- --EOF -- fi ;; -- esac -- fi -- break -- fi -- done -- IFS="$lt_save_ifs" -- MAGIC_CMD="$lt_save_MAGIC_CMD" -- ;; --esac --fi -- --MAGIC_CMD="$lt_cv_path_MAGIC_CMD" --if test -n "$MAGIC_CMD"; then -- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 --echo "${ECHO_T}$MAGIC_CMD" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- --if test -z "$lt_cv_path_MAGIC_CMD"; then -- if test -n "$ac_tool_prefix"; then -- echo "$as_me:$LINENO: checking for file" >&5 --echo $ECHO_N "checking for file... $ECHO_C" >&6 --if test "${lt_cv_path_MAGIC_CMD+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- case $MAGIC_CMD in --[\\/*] | ?:[\\/]*) -- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -- ;; --*) -- lt_save_MAGIC_CMD="$MAGIC_CMD" -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" -- for ac_dir in $ac_dummy; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/file; then -- lt_cv_path_MAGIC_CMD="$ac_dir/file" -- if test -n "$file_magic_test_file"; then -- case $deplibs_check_method in -- "file_magic "*) -- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` -- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -- $EGREP "$file_magic_regex" > /dev/null; then -- : -- else -- cat <&2 -- --*** Warning: the command libtool uses to detect shared libraries, --*** $file_magic_cmd, produces output that libtool cannot recognize. --*** The result is that libtool may fail to recognize shared libraries --*** as such. This will affect the creation of libtool libraries that --*** depend on shared libraries, but programs linked with such libtool --*** libraries will work regardless of this problem. Nevertheless, you --*** may want to report the problem to your system manager and/or to --*** bug-libtool@gnu.org -- --EOF -- fi ;; -- esac -- fi -- break -- fi -- done -- IFS="$lt_save_ifs" -- MAGIC_CMD="$lt_save_MAGIC_CMD" -- ;; --esac --fi -- --MAGIC_CMD="$lt_cv_path_MAGIC_CMD" --if test -n "$MAGIC_CMD"; then -- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 --echo "${ECHO_T}$MAGIC_CMD" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- -- else -- MAGIC_CMD=: -- fi --fi -- -- fi -- ;; --esac -- --enable_dlopen=no --enable_win32_dll=no -- --# Check whether --enable-libtool-lock or --disable-libtool-lock was given. --if test "${enable_libtool_lock+set}" = set; then -- enableval="$enable_libtool_lock" -- --fi; --test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -- -- --# Check whether --with-pic or --without-pic was given. --if test "${with_pic+set}" = set; then -- withval="$with_pic" -- pic_mode="$withval" --else -- pic_mode=default --fi; --test -z "$pic_mode" && pic_mode=default -- --# Use C for the default configuration in the libtool script --tagname= --lt_save_CC="$CC" --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- -- --# Source file extension for C test sources. --ac_ext=c -- --# Object file extension for compiled C test sources. --objext=o --objext=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code="int some_variable = 0;\n" -- --# Code to be used in simple link tests --lt_simple_link_test_code='int main(){return(0);}\n' -- -- --# If no C compiler was specified, use CC. --LTCC=${LTCC-"$CC"} -- --# Allow CC to be a program name with arguments. --compiler=$CC -- -- --# save warnings/boilerplate of simple test code --ac_outfile=conftest.$ac_objext --printf "$lt_simple_compile_test_code" >conftest.$ac_ext --eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_compiler_boilerplate=`cat conftest.err` --$rm conftest* -- --ac_outfile=conftest.$ac_objext --printf "$lt_simple_link_test_code" >conftest.$ac_ext --eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_linker_boilerplate=`cat conftest.err` --$rm conftest* -- -- --# --# Check for any special shared library compilation flags. --# --lt_prog_cc_shlib= --if test "$GCC" = no; then -- case $host_os in -- sco3.2v5*) -- lt_prog_cc_shlib='-belf' -- ;; -- esac --fi --if test -n "$lt_prog_cc_shlib"; then -- { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 --echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} -- if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : -- else -- { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 --echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} -- lt_cv_prog_cc_can_build_shared=no -- fi --fi -- -- --# --# Check to make sure the static flag actually works. --# --echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 --echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 --if test "${lt_prog_compiler_static_works+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_prog_compiler_static_works=no -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS $lt_prog_compiler_static" -- printf "$lt_simple_link_test_code" > conftest.$ac_ext -- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then -- # The linker can only warn and ignore the option if not recognized -- # So say no if there are warnings -- if test -s conftest.err; then -- # Append any errors to the config.log. -- cat conftest.err 1>&5 -- $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if diff conftest.exp conftest.er2 >/dev/null; then -- lt_prog_compiler_static_works=yes -- fi -- else -- lt_prog_compiler_static_works=yes -- fi -- fi -- $rm conftest* -- LDFLAGS="$save_LDFLAGS" -- --fi --echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 --echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 -- --if test x"$lt_prog_compiler_static_works" = xyes; then -- : --else -- lt_prog_compiler_static= --fi -- -- -- -- --lt_prog_compiler_no_builtin_flag= -- --if test "$GCC" = yes; then -- lt_prog_compiler_no_builtin_flag=' -fno-builtin' -- -- --echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 --echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 --if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_cv_prog_compiler_rtti_exceptions=no -- ac_outfile=conftest.$ac_objext -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="-fno-rtti -fno-exceptions" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- # The option is referenced via a variable to avoid confusing sed. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:6281: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>conftest.err) -- ac_status=$? -- cat conftest.err >&5 -- echo "$as_me:6285: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s "$ac_outfile"; then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings other than the usual output. -- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then -- lt_cv_prog_compiler_rtti_exceptions=yes -- fi -- fi -- $rm conftest* -- --fi --echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 --echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 -- --if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then -- lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" --else -- : --fi -- --fi -- --lt_prog_compiler_wl= --lt_prog_compiler_pic= --lt_prog_compiler_static= -- --echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 --echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 -- -- if test "$GCC" = yes; then -- lt_prog_compiler_wl='-Wl,' -- lt_prog_compiler_static='-static' -- -- case $host_os in -- aix*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- lt_prog_compiler_static='-Bstatic' -- fi -- ;; -- -- amigaos*) -- # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' -- ;; -- -- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -- # PIC is the default for these OSes. -- ;; -- -- mingw* | pw32* | os2*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- lt_prog_compiler_pic='-DDLL_EXPORT' -- ;; -- -- darwin* | rhapsody*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- lt_prog_compiler_pic='-fno-common' -- ;; -- -- msdosdjgpp*) -- # Just because we use GCC doesn't mean we suddenly get shared libraries -- # on systems that don't support them. -- lt_prog_compiler_can_build_shared=no -- enable_shared=no -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec; then -- lt_prog_compiler_pic=-Kconform_pic -- fi -- ;; -- -- hpux*) -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- lt_prog_compiler_pic='-fPIC' -- ;; -- esac -- ;; -- -- *) -- lt_prog_compiler_pic='-fPIC' -- ;; -- esac -- else -- # PORTME Check for flag to pass linker flags through the system compiler. -- case $host_os in -- aix*) -- lt_prog_compiler_wl='-Wl,' -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- lt_prog_compiler_static='-Bstatic' -- else -- lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' -- fi -- ;; -- darwin*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- case $cc_basename in -- xlc*) -- lt_prog_compiler_pic='-qnocommon' -- lt_prog_compiler_wl='-Wl,' -- ;; -- esac -- ;; -- -- mingw* | pw32* | os2*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- lt_prog_compiler_pic='-DDLL_EXPORT' -- ;; -- -- hpux9* | hpux10* | hpux11*) -- lt_prog_compiler_wl='-Wl,' -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- lt_prog_compiler_pic='+Z' -- ;; -- esac -- # Is there a better lt_prog_compiler_static that works with the bundled CC? -- lt_prog_compiler_static='${wl}-a ${wl}archive' -- ;; -- -- irix5* | irix6* | nonstopux*) -- lt_prog_compiler_wl='-Wl,' -- # PIC (with -KPIC) is the default. -- lt_prog_compiler_static='-non_shared' -- ;; -- -- newsos6) -- lt_prog_compiler_pic='-KPIC' -- lt_prog_compiler_static='-Bstatic' -- ;; -- -- linux*) -- case $cc_basename in -- icc* | ecc*) -- lt_prog_compiler_wl='-Wl,' -- lt_prog_compiler_pic='-KPIC' -- lt_prog_compiler_static='-static' -- ;; -- pgcc* | pgf77* | pgf90* | pgf95*) -- # Portland Group compilers (*not* the Pentium gcc compiler, -- # which looks to be a dead project) -- lt_prog_compiler_wl='-Wl,' -- lt_prog_compiler_pic='-fpic' -- lt_prog_compiler_static='-Bstatic' -- ;; -- ccc*) -- lt_prog_compiler_wl='-Wl,' -- # All Alpha code is PIC. -- lt_prog_compiler_static='-non_shared' -- ;; -- esac -- ;; -- -- osf3* | osf4* | osf5*) -- lt_prog_compiler_wl='-Wl,' -- # All OSF/1 code is PIC. -- lt_prog_compiler_static='-non_shared' -- ;; -- -- sco3.2v5*) -- lt_prog_compiler_pic='-Kpic' -- lt_prog_compiler_static='-dn' -- ;; -- -- solaris*) -- lt_prog_compiler_pic='-KPIC' -- lt_prog_compiler_static='-Bstatic' -- case $cc_basename in -- f77* | f90* | f95*) -- lt_prog_compiler_wl='-Qoption ld ';; -- *) -- lt_prog_compiler_wl='-Wl,';; -- esac -- ;; -- -- sunos4*) -- lt_prog_compiler_wl='-Qoption ld ' -- lt_prog_compiler_pic='-PIC' -- lt_prog_compiler_static='-Bstatic' -- ;; -- -- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- lt_prog_compiler_wl='-Wl,' -- lt_prog_compiler_pic='-KPIC' -- lt_prog_compiler_static='-Bstatic' -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec ;then -- lt_prog_compiler_pic='-Kconform_pic' -- lt_prog_compiler_static='-Bstatic' -- fi -- ;; -- -- unicos*) -- lt_prog_compiler_wl='-Wl,' -- lt_prog_compiler_can_build_shared=no -- ;; -- -- uts4*) -- lt_prog_compiler_pic='-pic' -- lt_prog_compiler_static='-Bstatic' -- ;; -- -- *) -- lt_prog_compiler_can_build_shared=no -- ;; -- esac -- fi -- --echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 --echo "${ECHO_T}$lt_prog_compiler_pic" >&6 -- --# --# Check to make sure the PIC flag actually works. --# --if test -n "$lt_prog_compiler_pic"; then -- --echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 --echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 --if test "${lt_prog_compiler_pic_works+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_prog_compiler_pic_works=no -- ac_outfile=conftest.$ac_objext -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="$lt_prog_compiler_pic -DPIC" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- # The option is referenced via a variable to avoid confusing sed. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:6543: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>conftest.err) -- ac_status=$? -- cat conftest.err >&5 -- echo "$as_me:6547: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s "$ac_outfile"; then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings other than the usual output. -- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then -- lt_prog_compiler_pic_works=yes -- fi -- fi -- $rm conftest* -- --fi --echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 --echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 -- --if test x"$lt_prog_compiler_pic_works" = xyes; then -- case $lt_prog_compiler_pic in -- "" | " "*) ;; -- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; -- esac --else -- lt_prog_compiler_pic= -- lt_prog_compiler_can_build_shared=no --fi -- --fi --case $host_os in -- # For platforms which do not support PIC, -DPIC is meaningless: -- *djgpp*) -- lt_prog_compiler_pic= -- ;; -- *) -- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" -- ;; --esac -- --echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 --echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 --if test "${lt_cv_prog_compiler_c_o+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_cv_prog_compiler_c_o=no -- $rm -r conftest 2>/dev/null -- mkdir conftest -- cd conftest -- mkdir out -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- lt_compiler_flag="-o out/conftest2.$ac_objext" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:6605: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>out/conftest.err) -- ac_status=$? -- cat out/conftest.err >&5 -- echo "$as_me:6609: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s out/conftest2.$ac_objext -- then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings -- $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp -- $SED '/^$/d' out/conftest.err >out/conftest.er2 -- if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then -- lt_cv_prog_compiler_c_o=yes -- fi -- fi -- chmod u+w . 2>&5 -- $rm conftest* -- # SGI C++ compiler will create directory out/ii_files/ for -- # template instantiation -- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files -- $rm out/* && rmdir out -- cd .. -- rmdir conftest -- $rm conftest* -- --fi --echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 --echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 -- -- --hard_links="nottested" --if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then -- # do not overwrite the value of need_locks provided by the user -- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 --echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 -- hard_links=yes -- $rm conftest* -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- touch conftest.a -- ln conftest.a conftest.b 2>&5 || hard_links=no -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- echo "$as_me:$LINENO: result: $hard_links" >&5 --echo "${ECHO_T}$hard_links" >&6 -- if test "$hard_links" = no; then -- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 --echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} -- need_locks=warn -- fi --else -- need_locks=no --fi -- --echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 --echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -- -- runpath_var= -- allow_undefined_flag= -- enable_shared_with_static_runtimes=no -- archive_cmds= -- archive_expsym_cmds= -- old_archive_From_new_cmds= -- old_archive_from_expsyms_cmds= -- export_dynamic_flag_spec= -- whole_archive_flag_spec= -- thread_safe_flag_spec= -- hardcode_libdir_flag_spec= -- hardcode_libdir_flag_spec_ld= -- hardcode_libdir_separator= -- hardcode_direct=no -- hardcode_minus_L=no -- hardcode_shlibpath_var=unsupported -- link_all_deplibs=unknown -- hardcode_automatic=no -- module_cmds= -- module_expsym_cmds= -- always_export_symbols=no -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- # include_expsyms should be a list of space-separated symbols to be *always* -- # included in the symbol list -- include_expsyms= -- # exclude_expsyms can be an extended regexp of symbols to exclude -- # it will be wrapped by ` (' and `)$', so one must not match beginning or -- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -- # as well as any symbol that contains `d'. -- exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -- # platforms (ab)use it in PIC code, but their linkers get confused if -- # the symbol is explicitly referenced. Since portable code cannot -- # rely on this symbol name, it's probably fine to never include it in -- # preloaded symbol tables. -- extract_expsyms_cmds= -- # Just being paranoid about ensuring that cc_basename is set. -- for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -- -- case $host_os in -- cygwin* | mingw* | pw32*) -- # FIXME: the MSVC++ port hasn't been tested in a loooong time -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- if test "$GCC" != yes; then -- with_gnu_ld=no -- fi -- ;; -- openbsd*) -- with_gnu_ld=no -- ;; -- esac -- -- ld_shlibs=yes -- if test "$with_gnu_ld" = yes; then -- # If archive_cmds runs LD, not CC, wlarc should be empty -- wlarc='${wl}' -- -- # Set some defaults for GNU ld with shared library support. These -- # are reset later if shared libraries are not supported. Putting them -- # here allows them to be overridden if necessary. -- runpath_var=LD_RUN_PATH -- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' -- export_dynamic_flag_spec='${wl}--export-dynamic' -- # ancient GNU ld didn't support --whole-archive et. al. -- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then -- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- else -- whole_archive_flag_spec= -- fi -- supports_anon_versioning=no -- case `$LD -v 2>/dev/null` in -- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 -- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... -- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... -- *\ 2.11.*) ;; # other 2.11 versions -- *) supports_anon_versioning=yes ;; -- esac -- -- # See if GNU ld supports shared libraries. -- case $host_os in -- aix3* | aix4* | aix5*) -- # On AIX/PPC, the GNU linker is very broken -- if test "$host_cpu" != ia64; then -- ld_shlibs=no -- cat <&2 -- --*** Warning: the GNU linker, at least up to release 2.9.1, is reported --*** to be unable to reliably create shared libraries on AIX. --*** Therefore, libtool is disabling shared libraries support. If you --*** really care for shared libraries, you may want to modify your PATH --*** so that a non-GNU linker is found, and then restart. -- --EOF -- fi -- ;; -- -- amigaos*) -- archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- hardcode_libdir_flag_spec='-L$libdir' -- hardcode_minus_L=yes -- -- # Samuel A. Falvo II reports -- # that the semantics of dynamic libraries on AmigaOS, at least up -- # to version 4, is to share data among multiple programs linked -- # with the same dynamic library. Since this doesn't match the -- # behavior of shared libraries on other platforms, we can't use -- # them. -- ld_shlibs=no -- ;; -- -- beos*) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- allow_undefined_flag=unsupported -- # Joseph Beckenbach says some releases of gcc -- # support --undefined. This deserves some investigation. FIXME -- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- else -- ld_shlibs=no -- fi -- ;; -- -- cygwin* | mingw* | pw32*) -- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, -- # as there is no search path for DLLs. -- hardcode_libdir_flag_spec='-L$libdir' -- allow_undefined_flag=unsupported -- always_export_symbols=no -- enable_shared_with_static_runtimes=yes -- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' -- -- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- else -- ld_shlibs=no -- fi -- ;; -- -- linux*) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- tmp_addflag= -- case $cc_basename,$host_cpu in -- pgcc*) # Portland Group C compiler -- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag' -- ;; -- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers -- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag -Mnomain' ;; -- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 -- tmp_addflag=' -i_dynamic' ;; -- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 -- tmp_addflag=' -i_dynamic -nofor_main' ;; -- ifc* | ifort*) # Intel Fortran compiler -- tmp_addflag=' -nofor_main' ;; -- esac -- archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- -- if test $supports_anon_versioning = yes; then -- archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- $echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -- fi -- else -- ld_shlibs=no -- fi -- ;; -- -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -- wlarc= -- else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- fi -- ;; -- -- solaris* | sysv5*) -- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then -- ld_shlibs=no -- cat <&2 -- --*** Warning: The releases 2.8.* of the GNU linker cannot reliably --*** create shared libraries on Solaris systems. Therefore, libtool --*** is disabling shared libraries support. We urge you to upgrade GNU --*** binutils to release 2.9.1 or newer. Another option is to modify --*** your PATH or compiler configuration so that the native linker is --*** used, and then restart. -- --EOF -- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- ld_shlibs=no -- fi -- ;; -- -- sunos4*) -- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- wlarc= -- hardcode_direct=yes -- hardcode_shlibpath_var=no -- ;; -- -- *) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- ld_shlibs=no -- fi -- ;; -- esac -- -- if test "$ld_shlibs" = no; then -- runpath_var= -- hardcode_libdir_flag_spec= -- export_dynamic_flag_spec= -- whole_archive_flag_spec= -- fi -- else -- # PORTME fill in a description of your system's linker (not GNU ld) -- case $host_os in -- aix3*) -- allow_undefined_flag=unsupported -- always_export_symbols=yes -- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -- # Note: this linker hardcodes the directories in LIBPATH if there -- # are no directories specified by -L. -- hardcode_minus_L=yes -- if test "$GCC" = yes && test -z "$link_static_flag"; then -- # Neither direct hardcoding nor static linking is supported with a -- # broken collect2. -- hardcode_direct=unsupported -- fi -- ;; -- -- aix4* | aix5*) -- if test "$host_cpu" = ia64; then -- # On IA64, the linker does run time linking by default, so we don't -- # have to do anything special. -- aix_use_runtimelinking=no -- exp_sym_flag='-Bexport' -- no_entry_flag="" -- else -- # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then -- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' -- else -- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' -- fi -- aix_use_runtimelinking=no -- -- # Test if we are trying to use run time linking or normal -- # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -- case $host_os in aix4.[23]|aix4.[23].*|aix5*) -- for ld_flag in $LDFLAGS; do -- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then -- aix_use_runtimelinking=yes -- break -- fi -- done -- esac -- -- exp_sym_flag='-bexport' -- no_entry_flag='-bnoentry' -- fi -- -- # When large executables or shared objects are built, AIX ld can -- # have problems creating the table of contents. If linking a library -- # or program results in "error TOC overflow" add -mminimal-toc to -- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -- -- archive_cmds='' -- hardcode_direct=yes -- hardcode_libdir_separator=':' -- link_all_deplibs=yes -- -- if test "$GCC" = yes; then -- case $host_os in aix4.[012]|aix4.[012].*) -- # We only want to do this on AIX 4.2 and lower, the check -- # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -- if test -f "$collect2name" && \ -- strings "$collect2name" | grep resolve_lib_name >/dev/null -- then -- # We have reworked collect2 -- hardcode_direct=yes -- else -- # We have old collect2 -- hardcode_direct=unsupported -- # It fails to find uninstalled libraries when the uninstalled -- # path is not listed in the libpath. Setting hardcode_minus_L -- # to unsupported forces relinking -- hardcode_minus_L=yes -- hardcode_libdir_flag_spec='-L$libdir' -- hardcode_libdir_separator= -- fi -- esac -- shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -- fi -- else -- # not using gcc -- if test "$host_cpu" = ia64; then -- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release -- # chokes on -Wl,-G. The following line is correct: -- shared_flag='-G' -- else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -- else -- shared_flag='${wl}-bM:SRE' -- fi -- fi -- fi -- -- # It seems that -bexpall does not export symbols beginning with -- # underscore (_), so it is better to generate a list of symbols to export. -- always_export_symbols=yes -- if test "$aix_use_runtimelinking" = yes; then -- # Warning - without using the other runtime loading flags (-brtl), -- # -berok will link without error, but may produce a broken library. -- allow_undefined_flag='-berok' -- # Determine the default libpath from the value encoded in an empty executable. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- -- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" -- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -- else -- if test "$host_cpu" = ia64; then -- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' -- allow_undefined_flag="-z nodefs" -- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -- else -- # Determine the default libpath from the value encoded in an empty executable. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- -- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" -- # Warning - without using the other run time loading flags, -- # -berok will link without error, but may produce a broken library. -- no_undefined_flag=' ${wl}-bernotok' -- allow_undefined_flag=' ${wl}-berok' -- # -bexpall does not export symbols beginning with underscore (_) -- always_export_symbols=yes -- # Exported symbols can be pulled into shared objects from archives -- whole_archive_flag_spec=' ' -- archive_cmds_need_lc=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -- fi -- fi -- ;; -- -- amigaos*) -- archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- hardcode_libdir_flag_spec='-L$libdir' -- hardcode_minus_L=yes -- # see comment about different semantics on the GNU ld section -- ld_shlibs=no -- ;; -- -- bsdi[45]*) -- export_dynamic_flag_spec=-rdynamic -- ;; -- -- cygwin* | mingw* | pw32*) -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- # hardcode_libdir_flag_spec is actually meaningless, as there is -- # no search path for DLLs. -- hardcode_libdir_flag_spec=' ' -- allow_undefined_flag=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_From_new_cmds='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes=yes -- ;; -- -- darwin* | rhapsody*) -- case $host_os in -- rhapsody* | darwin1.[012]) -- allow_undefined_flag='${wl}-undefined ${wl}suppress' -- ;; -- *) # Darwin 1.3 on -- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then -- allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- else -- case ${MACOSX_DEPLOYMENT_TARGET} in -- 10.[012]) -- allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- ;; -- 10.*) -- allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' -- ;; -- esac -- fi -- ;; -- esac -- archive_cmds_need_lc=no -- hardcode_direct=no -- hardcode_automatic=yes -- hardcode_shlibpath_var=unsupported -- whole_archive_flag_spec='' -- link_all_deplibs=yes -- if test "$GCC" = yes ; then -- output_verbose_link_cmd='echo' -- archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' -- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- else -- case $cc_basename in -- xlc*) -- output_verbose_link_cmd='echo' -- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' -- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- ;; -- *) -- ld_shlibs=no -- ;; -- esac -- fi -- ;; -- -- dgux*) -- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec='-L$libdir' -- hardcode_shlibpath_var=no -- ;; -- -- freebsd1*) -- ld_shlibs=no -- ;; -- -- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -- # support. Future versions do this automatically, but an explicit c++rt0.o -- # does not break anything, and helps significantly (at the cost of a little -- # extra space). -- freebsd2.2*) -- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -- hardcode_libdir_flag_spec='-R$libdir' -- hardcode_direct=yes -- hardcode_shlibpath_var=no -- ;; -- -- # Unfortunately, older versions of FreeBSD 2 do not have this feature. -- freebsd2*) -- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct=yes -- hardcode_minus_L=yes -- hardcode_shlibpath_var=no -- ;; -- -- # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -- freebsd* | kfreebsd*-gnu | dragonfly*) -- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -- hardcode_libdir_flag_spec='-R$libdir' -- hardcode_direct=yes -- hardcode_shlibpath_var=no -- ;; -- -- hpux9*) -- if test "$GCC" = yes; then -- archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- else -- archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- fi -- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -- hardcode_libdir_separator=: -- hardcode_direct=yes -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L=yes -- export_dynamic_flag_spec='${wl}-E' -- ;; -- -- hpux10* | hpux11*) -- if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*|ia64*) -- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- esac -- else -- case $host_cpu in -- hppa*64*|ia64*) -- archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -- ;; -- *) -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -- ;; -- esac -- fi -- if test "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*) -- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld='+b $libdir' -- hardcode_libdir_separator=: -- hardcode_direct=no -- hardcode_shlibpath_var=no -- ;; -- ia64*) -- hardcode_libdir_flag_spec='-L$libdir' -- hardcode_direct=no -- hardcode_shlibpath_var=no -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L=yes -- ;; -- *) -- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -- hardcode_libdir_separator=: -- hardcode_direct=yes -- export_dynamic_flag_spec='${wl}-E' -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L=yes -- ;; -- esac -- fi -- ;; -- -- irix5* | irix6* | nonstopux*) -- if test "$GCC" = yes; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- hardcode_libdir_flag_spec_ld='-rpath $libdir' -- fi -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator=: -- link_all_deplibs=yes -- ;; -- -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -- else -- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -- fi -- hardcode_libdir_flag_spec='-R$libdir' -- hardcode_direct=yes -- hardcode_shlibpath_var=no -- ;; -- -- newsos6) -- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct=yes -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator=: -- hardcode_shlibpath_var=no -- ;; -- -- openbsd*) -- hardcode_direct=yes -- hardcode_shlibpath_var=no -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' -- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -- export_dynamic_flag_spec='${wl}-E' -- else -- case $host_os in -- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) -- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec='-R$libdir' -- ;; -- *) -- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -- ;; -- esac -- fi -- ;; -- -- os2*) -- hardcode_libdir_flag_spec='-L$libdir' -- hardcode_minus_L=yes -- allow_undefined_flag=unsupported -- archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -- old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -- ;; -- -- osf3*) -- if test "$GCC" = yes; then -- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- allow_undefined_flag=' -expect_unresolved \*' -- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- fi -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator=: -- ;; -- -- osf4* | osf5*) # as osf3* with the addition of -msym flag -- if test "$GCC" = yes; then -- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -- else -- allow_undefined_flag=' -expect_unresolved \*' -- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' -- -- # Both c and cxx compiler support -rpath directly -- hardcode_libdir_flag_spec='-rpath $libdir' -- fi -- hardcode_libdir_separator=: -- ;; -- -- sco3.2v5*) -- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var=no -- export_dynamic_flag_spec='${wl}-Bexport' -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- ;; -- -- solaris*) -- no_undefined_flag=' -z text' -- if test "$GCC" = yes; then -- wlarc='${wl}' -- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' -- else -- wlarc='' -- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -- fi -- hardcode_libdir_flag_spec='-R$libdir' -- hardcode_shlibpath_var=no -- case $host_os in -- solaris2.[0-5] | solaris2.[0-5].*) ;; -- *) -- # The compiler driver will combine linker options so we -- # cannot just pass the convience library names through -- # without $wl, iff we do not link with $LD. -- # Luckily, gcc supports the same syntax we need for Sun Studio. -- # Supported since Solaris 2.6 (maybe 2.5.1?) -- case $wlarc in -- '') -- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; -- *) -- whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; -- esac ;; -- esac -- link_all_deplibs=yes -- ;; -- -- sunos4*) -- if test "x$host_vendor" = xsequent; then -- # Use $CC to link under sequent, because it throws in some extra .o -- # files that make .init and .fini sections work. -- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -- fi -- hardcode_libdir_flag_spec='-L$libdir' -- hardcode_direct=yes -- hardcode_minus_L=yes -- hardcode_shlibpath_var=no -- ;; -- -- sysv4) -- case $host_vendor in -- sni) -- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct=yes # is this really true??? -- ;; -- siemens) -- ## LD is ld it makes a PLAMLIB -- ## CC just makes a GrossModule. -- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- reload_cmds='$CC -r -o $output$reload_objs' -- hardcode_direct=no -- ;; -- motorola) -- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct=no #Motorola manual says yes, but my tests say they lie -- ;; -- esac -- runpath_var='LD_RUN_PATH' -- hardcode_shlibpath_var=no -- ;; -- -- sysv4.3*) -- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var=no -- export_dynamic_flag_spec='-Bexport' -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec; then -- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var=no -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- ld_shlibs=yes -- fi -- ;; -- -- sysv4.2uw2*) -- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct=yes -- hardcode_minus_L=no -- hardcode_shlibpath_var=no -- hardcode_runpath_var=yes -- runpath_var=LD_RUN_PATH -- ;; -- -- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) -- no_undefined_flag='${wl}-z ${wl}text' -- if test "$GCC" = yes; then -- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- fi -- runpath_var='LD_RUN_PATH' -- hardcode_shlibpath_var=no -- ;; -- -- sysv5*) -- no_undefined_flag=' -z text' -- # $CC -shared without GNU ld will not create a library from C++ -- # object files and a static libstdc++, better avoid it by now -- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -- hardcode_libdir_flag_spec= -- hardcode_shlibpath_var=no -- runpath_var='LD_RUN_PATH' -- ;; -- -- uts4*) -- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec='-L$libdir' -- hardcode_shlibpath_var=no -- ;; -- -- *) -- ld_shlibs=no -- ;; -- esac -- fi -- --echo "$as_me:$LINENO: result: $ld_shlibs" >&5 --echo "${ECHO_T}$ld_shlibs" >&6 --test "$ld_shlibs" = no && can_build_shared=no -- --variables_saved_for_relink="PATH $shlibpath_var $runpath_var" --if test "$GCC" = yes; then -- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" --fi -- --# --# Do we need to explicitly link libc? --# --case "x$archive_cmds_need_lc" in --x|xyes) -- # Assume -lc should be added -- archive_cmds_need_lc=yes -- -- if test "$enable_shared" = yes && test "$GCC" = yes; then -- case $archive_cmds in -- *'~'*) -- # FIXME: we may have to deal with multi-command sequences. -- ;; -- '$CC '*) -- # Test whether the compiler implicitly links with -lc since on some -- # systems, -lgcc has to come before -lc. If gcc already passes -lc -- # to ld, don't add -lc before -lgcc. -- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 --echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 -- $rm conftest* -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } 2>conftest.err; then -- soname=conftest -- lib=conftest -- libobjs=conftest.$ac_objext -- deplibs= -- wl=$lt_prog_compiler_wl -- compiler_flags=-v -- linker_flags=-v -- verstring= -- output_objdir=. -- libname=conftest -- lt_save_allow_undefined_flag=$allow_undefined_flag -- allow_undefined_flag= -- if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 -- (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } -- then -- archive_cmds_need_lc=no -- else -- archive_cmds_need_lc=yes -- fi -- allow_undefined_flag=$lt_save_allow_undefined_flag -- else -- cat conftest.err 1>&5 -- fi -- $rm conftest* -- echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 --echo "${ECHO_T}$archive_cmds_need_lc" >&6 -- ;; -- esac -- fi -- ;; --esac -- --echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 --echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 --library_names_spec= --libname_spec='lib$name' --soname_spec= --shrext_cmds=".so" --postinstall_cmds= --postuninstall_cmds= --finish_cmds= --finish_eval= --shlibpath_var= --shlibpath_overrides_runpath=unknown --version_type=none --dynamic_linker="$host_os ld.so" --sys_lib_dlsearch_path_spec="/lib /usr/lib" --if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then -- # if the path contains ";" then we assume it to be the separator -- # otherwise default to the standard path separator (i.e. ":") - it is -- # assumed that no part of a normal pathname contains ";" but that should -- # okay in the real world where ";" in dirpaths is itself problematic. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi --else -- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" --fi --need_lib_prefix=unknown --hardcode_into_libs=no -- --# when you set need_version to no, make sure it does not cause -set_version --# flags to be left without arguments --need_version=unknown -- --case $host_os in --aix3*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' -- shlibpath_var=LIBPATH -- -- # AIX 3 has no versioning support, so we append a major version to the name. -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- --aix4* | aix5*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- hardcode_into_libs=yes -- if test "$host_cpu" = ia64; then -- # AIX 5 supports IA64 -- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- else -- # With GCC up to 2.95.x, collect2 would create an import file -- # for dependence libraries. The import file would start with -- # the line `#! .'. This would cause the generated library to -- # depend on `.', always an invalid library. This was fixed in -- # development snapshots of GCC prior to 3.0. -- case $host_os in -- aix4 | aix4.[01] | aix4.[01].*) -- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -- echo ' yes ' -- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -- : -- else -- can_build_shared=no -- fi -- ;; -- esac -- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct -- # soname into executable. Probably we can add versioning support to -- # collect2, so additional links can be useful in future. -- if test "$aix_use_runtimelinking" = yes; then -- # If using run time linking (on AIX 4.2 or later) use lib.so -- # instead of lib.a to let people know that these are not -- # typical AIX shared libraries. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- else -- # We preserve .a as extension for shared libraries through AIX4.2 -- # and later when we are not doing run time linking. -- library_names_spec='${libname}${release}.a $libname.a' -- soname_spec='${libname}${release}${shared_ext}$major' -- fi -- shlibpath_var=LIBPATH -- fi -- ;; -- --amigaos*) -- library_names_spec='$libname.ixlibrary $libname.a' -- # Create ${libname}_ixlibrary.a entries in /sys/libs. -- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' -- ;; -- --beos*) -- library_names_spec='${libname}${shared_ext}' -- dynamic_linker="$host_os ld.so" -- shlibpath_var=LIBRARY_PATH -- ;; -- --bsdi[45]*) -- version_type=linux -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -- # the default ld.so.conf also contains /usr/contrib/lib and -- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -- # libtool to hard-code these into programs -- ;; -- --cygwin* | mingw* | pw32*) -- version_type=windows -- shrext_cmds=".dll" -- need_version=no -- need_lib_prefix=no -- -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32*) -- library_names_spec='$libname.dll.a' -- # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ -- dldir=$destdir/`dirname \$dlpath`~ -- test -d \$dldir || mkdir -p \$dldir~ -- $install_prog $dir/$dlname \$dldir/$dlname~ -- chmod a+x \$dldir/$dlname' -- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -- dlpath=$dir/\$dldll~ -- $rm \$dlpath' -- shlibpath_overrides_runpath=yes -- -- case $host_os in -- cygwin*) -- # Cygwin DLLs use 'cyg' prefix rather than 'lib' -- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" -- ;; -- mingw*) -- # MinGW DLLs use traditional 'lib' prefix -- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then -- # It is most probably a Windows format PATH printed by -- # mingw gcc, but we are running on Cygwin. Gcc prints its search -- # path with ; separators, and with drive letters. We can handle the -- # drive letters (cygwin fileutils understands them), so leave them, -- # especially as we might pass files found there to a mingw objdump, -- # which wouldn't understand a cygwinified path. Ahh. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi -- ;; -- pw32*) -- # pw32 DLLs use 'pw' prefix rather than 'lib' -- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- ;; -- esac -- ;; -- -- *) -- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -- ;; -- esac -- dynamic_linker='Win32 ld.exe' -- # FIXME: first we should search . and the directory the executable is in -- shlibpath_var=PATH -- ;; -- --darwin* | rhapsody*) -- dynamic_linker="$host_os dyld" -- version_type=darwin -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -- shlibpath_overrides_runpath=yes -- shlibpath_var=DYLD_LIBRARY_PATH -- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. -- if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` -- else -- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' -- fi -- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' -- ;; -- --dgux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --freebsd1*) -- dynamic_linker=no -- ;; -- --kfreebsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -- ;; -- --freebsd* | dragonfly*) -- # DragonFly does not have aout. When/if they implement a new -- # versioning mechanism, adjust this. -- if test -x /usr/bin/objformat; then -- objformat=`/usr/bin/objformat` -- else -- case $host_os in -- freebsd[123]*) objformat=aout ;; -- *) objformat=elf ;; -- esac -- fi -- version_type=freebsd-$objformat -- case $version_type in -- freebsd-elf*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -- need_version=no -- need_lib_prefix=no -- ;; -- freebsd-*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' -- need_version=yes -- ;; -- esac -- shlibpath_var=LD_LIBRARY_PATH -- case $host_os in -- freebsd2*) -- shlibpath_overrides_runpath=yes -- ;; -- freebsd3.[01]* | freebsdelf3.[01]*) -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- *) # from 3.2 on -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- ;; -- esac -- ;; -- --gnu*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- hardcode_into_libs=yes -- ;; -- --hpux9* | hpux10* | hpux11*) -- # Give a soname corresponding to the major version so that dld.sl refuses to -- # link against other versions. -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- case $host_cpu in -- ia64*) -- shrext_cmds='.so' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.so" -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- if test "X$HPUX_IA64_MODE" = X32; then -- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" -- else -- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" -- fi -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- hppa*64*) -- shrext_cmds='.sl' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- *) -- shrext_cmds='.sl' -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=SHLIB_PATH -- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- esac -- # HP-UX runs *really* slowly unless shared libraries are mode 555. -- postinstall_cmds='chmod 555 $lib' -- ;; -- --irix5* | irix6* | nonstopux*) -- case $host_os in -- nonstopux*) version_type=nonstopux ;; -- *) -- if test "$lt_cv_prog_gnu_ld" = yes; then -- version_type=linux -- else -- version_type=irix -- fi ;; -- esac -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' -- case $host_os in -- irix5* | nonstopux*) -- libsuff= shlibsuff= -- ;; -- *) -- case $LD in # libtool.m4 will add one of these switches to LD -- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") -- libsuff= shlibsuff= libmagic=32-bit;; -- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") -- libsuff=32 shlibsuff=N32 libmagic=N32;; -- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") -- libsuff=64 shlibsuff=64 libmagic=64-bit;; -- *) libsuff= shlibsuff= libmagic=never-match;; -- esac -- ;; -- esac -- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -- hardcode_into_libs=yes -- ;; -- --# No shared lib support for Linux oldld, aout, or coff. --linux*oldld* | linux*aout* | linux*coff*) -- dynamic_linker=no -- ;; -- --# This must be Linux ELF. --linux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- # This implies no fast_install, which is unacceptable. -- # Some rework will be needed to allow for fast_install -- # before this can be enabled. -- hardcode_into_libs=yes -- -- # Append ld.so.conf contents to the search path -- if test -f /etc/ld.so.conf; then -- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -- fi -- -- # We used to test for /lib/ld.so.1 and disable shared libraries on -- # powerpc, because MkLinux only supported shared libraries with the -- # GNU dynamic linker. Since this was broken with cross compilers, -- # most powerpc-linux boxes support dynamic linking these days and -- # people can always --disable-shared, the test was removed, and we -- # assume the GNU/Linux dynamic linker is in use. -- dynamic_linker='GNU/Linux ld.so' -- ;; -- --knetbsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -- ;; -- --netbsd*) -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- dynamic_linker='NetBSD (a.out) ld.so' -- else -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- dynamic_linker='NetBSD ld.elf_so' -- fi -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- --newsos6) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --nto-qnx*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --openbsd*) -- version_type=sunos -- need_lib_prefix=no -- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. -- case $host_os in -- openbsd3.3 | openbsd3.3.*) need_version=yes ;; -- *) need_version=no ;; -- esac -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- case $host_os in -- openbsd2.[89] | openbsd2.[89].*) -- shlibpath_overrides_runpath=no -- ;; -- *) -- shlibpath_overrides_runpath=yes -- ;; -- esac -- else -- shlibpath_overrides_runpath=yes -- fi -- ;; -- --os2*) -- libname_spec='$name' -- shrext_cmds=".dll" -- need_lib_prefix=no -- library_names_spec='$libname${shared_ext} $libname.a' -- dynamic_linker='OS/2 ld.exe' -- shlibpath_var=LIBPATH -- ;; -- --osf3* | osf4* | osf5*) -- version_type=osf -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -- ;; -- --sco3.2v5*) -- version_type=osf -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --solaris*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- # ldd complains unless libraries are executable -- postinstall_cmds='chmod +x $lib' -- ;; -- --sunos4*) -- version_type=sunos -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- if test "$with_gnu_ld" = yes; then -- need_lib_prefix=no -- fi -- need_version=yes -- ;; -- --sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- case $host_vendor in -- sni) -- shlibpath_overrides_runpath=no -- need_lib_prefix=no -- export_dynamic_flag_spec='${wl}-Blargedynsym' -- runpath_var=LD_RUN_PATH -- ;; -- siemens) -- need_lib_prefix=no -- ;; -- motorola) -- need_lib_prefix=no -- need_version=no -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -- ;; -- esac -- ;; -- --sysv4*MP*) -- if test -d /usr/nec ;then -- version_type=linux -- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' -- soname_spec='$libname${shared_ext}.$major' -- shlibpath_var=LD_LIBRARY_PATH -- fi -- ;; -- --uts4*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --*) -- dynamic_linker=no -- ;; --esac --echo "$as_me:$LINENO: result: $dynamic_linker" >&5 --echo "${ECHO_T}$dynamic_linker" >&6 --test "$dynamic_linker" = no && can_build_shared=no -- --echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 --echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 --hardcode_action= --if test -n "$hardcode_libdir_flag_spec" || \ -- test -n "$runpath_var" || \ -- test "X$hardcode_automatic" = "Xyes" ; then -- -- # We can hardcode non-existant directories. -- if test "$hardcode_direct" != no && -- # If the only mechanism to avoid hardcoding is shlibpath_var, we -- # have to relink, otherwise we might link with an installed library -- # when we should be linking with a yet-to-be-installed one -- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && -- test "$hardcode_minus_L" != no; then -- # Linking always hardcodes the temporary library directory. -- hardcode_action=relink -- else -- # We can link without hardcoding, and we can hardcode nonexisting dirs. -- hardcode_action=immediate -- fi --else -- # We cannot hardcode anything, or else we can only hardcode existing -- # directories. -- hardcode_action=unsupported --fi --echo "$as_me:$LINENO: result: $hardcode_action" >&5 --echo "${ECHO_T}$hardcode_action" >&6 -- --if test "$hardcode_action" = relink; then -- # Fast installation is not supported -- enable_fast_install=no --elif test "$shlibpath_overrides_runpath" = yes || -- test "$enable_shared" = no; then -- # Fast installation is not necessary -- enable_fast_install=needless --fi -- --striplib= --old_striplib= --echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 --echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 --if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -- test -z "$striplib" && striplib="$STRIP --strip-unneeded" -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 --else --# FIXME - insert some real tests, host_os isn't really good enough -- case $host_os in -- darwin*) -- if test -n "$STRIP" ; then -- striplib="$STRIP -x" -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- ;; -- *) -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- ;; -- esac --fi -- --if test "x$enable_dlopen" != xyes; then -- enable_dlopen=unknown -- enable_dlopen_self=unknown -- enable_dlopen_self_static=unknown --else -- lt_cv_dlopen=no -- lt_cv_dlopen_libs= -- -- case $host_os in -- beos*) -- lt_cv_dlopen="load_add_on" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- ;; -- -- mingw* | pw32*) -- lt_cv_dlopen="LoadLibrary" -- lt_cv_dlopen_libs= -- ;; -- -- cygwin*) -- lt_cv_dlopen="dlopen" -- lt_cv_dlopen_libs= -- ;; -- -- darwin*) -- # if libdl is installed we need to link against it -- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 --echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 --if test "${ac_cv_lib_dl_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --int --main () --{ --dlopen (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dl_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dl_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 --echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 --if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" --else -- -- lt_cv_dlopen="dyld" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- --fi -- -- ;; -- -- *) -- echo "$as_me:$LINENO: checking for shl_load" >&5 --echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 --if test "${ac_cv_func_shl_load+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define shl_load to an innocuous variant, in case declares shl_load. -- For example, HP-UX 11i declares gettimeofday. */ --#define shl_load innocuous_shl_load -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char shl_load (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef shl_load -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --{ --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char shl_load (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined (__stub_shl_load) || defined (__stub___shl_load) --choke me --#else --char (*f) () = shl_load; --#endif --#ifdef __cplusplus --} --#endif -- --int --main () --{ --return f != shl_load; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_func_shl_load=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_func_shl_load=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --fi --echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 --echo "${ECHO_T}$ac_cv_func_shl_load" >&6 --if test $ac_cv_func_shl_load = yes; then -- lt_cv_dlopen="shl_load" --else -- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 --echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 --if test "${ac_cv_lib_dld_shl_load+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldld $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char shl_load (); --int --main () --{ --shl_load (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dld_shl_load=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dld_shl_load=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 --echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 --if test $ac_cv_lib_dld_shl_load = yes; then -- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" --else -- echo "$as_me:$LINENO: checking for dlopen" >&5 --echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 --if test "${ac_cv_func_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define dlopen to an innocuous variant, in case declares dlopen. -- For example, HP-UX 11i declares gettimeofday. */ --#define dlopen innocuous_dlopen -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char dlopen (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef dlopen -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --{ --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined (__stub_dlopen) || defined (__stub___dlopen) --choke me --#else --char (*f) () = dlopen; --#endif --#ifdef __cplusplus --} --#endif -- --int --main () --{ --return f != dlopen; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_func_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_func_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --fi --echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 --echo "${ECHO_T}$ac_cv_func_dlopen" >&6 --if test $ac_cv_func_dlopen = yes; then -- lt_cv_dlopen="dlopen" --else -- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 --echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 --if test "${ac_cv_lib_dl_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --int --main () --{ --dlopen (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dl_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dl_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 --echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 --if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" --else -- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 --echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 --if test "${ac_cv_lib_svld_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lsvld $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --int --main () --{ --dlopen (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_svld_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_svld_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 --echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 --if test $ac_cv_lib_svld_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" --else -- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 --echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 --if test "${ac_cv_lib_dld_dld_link+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldld $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dld_link (); --int --main () --{ --dld_link (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dld_dld_link=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dld_dld_link=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 --echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 --if test $ac_cv_lib_dld_dld_link = yes; then -- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" --fi -- -- --fi -- -- --fi -- -- --fi -- -- --fi -- -- --fi -- -- ;; -- esac -- -- if test "x$lt_cv_dlopen" != xno; then -- enable_dlopen=yes -- else -- enable_dlopen=no -- fi -- -- case $lt_cv_dlopen in -- dlopen) -- save_CPPFLAGS="$CPPFLAGS" -- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -- -- save_LDFLAGS="$LDFLAGS" -- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -- -- save_LIBS="$LIBS" -- LIBS="$lt_cv_dlopen_libs $LIBS" -- -- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 --echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 --if test "${lt_cv_dlopen_self+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test "$cross_compiling" = yes; then : -- lt_cv_dlopen_self=cross --else -- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -- lt_status=$lt_dlunknown -- cat > conftest.$ac_ext < --#endif -- --#include -- --#ifdef RTLD_GLOBAL --# define LT_DLGLOBAL RTLD_GLOBAL --#else --# ifdef DL_GLOBAL --# define LT_DLGLOBAL DL_GLOBAL --# else --# define LT_DLGLOBAL 0 --# endif --#endif -- --/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -- find out it does not work in some platform. */ --#ifndef LT_DLLAZY_OR_NOW --# ifdef RTLD_LAZY --# define LT_DLLAZY_OR_NOW RTLD_LAZY --# else --# ifdef DL_LAZY --# define LT_DLLAZY_OR_NOW DL_LAZY --# else --# ifdef RTLD_NOW --# define LT_DLLAZY_OR_NOW RTLD_NOW --# else --# ifdef DL_NOW --# define LT_DLLAZY_OR_NOW DL_NOW --# else --# define LT_DLLAZY_OR_NOW 0 --# endif --# endif --# endif --# endif --#endif -- --#ifdef __cplusplus --extern "C" void exit (int); --#endif -- --void fnord() { int i=42;} --int main () --{ -- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -- int status = $lt_dlunknown; -- -- if (self) -- { -- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -- /* dlclose (self); */ -- } -- -- exit (status); --} --EOF -- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then -- (./conftest; exit; ) >&5 2>/dev/null -- lt_status=$? -- case x$lt_status in -- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; -- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; -- x$lt_unknown|x*) lt_cv_dlopen_self=no ;; -- esac -- else : -- # compilation failed -- lt_cv_dlopen_self=no -- fi --fi --rm -fr conftest* -- -- --fi --echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 --echo "${ECHO_T}$lt_cv_dlopen_self" >&6 -- -- if test "x$lt_cv_dlopen_self" = xyes; then -- LDFLAGS="$LDFLAGS $link_static_flag" -- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 --echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 --if test "${lt_cv_dlopen_self_static+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test "$cross_compiling" = yes; then : -- lt_cv_dlopen_self_static=cross --else -- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -- lt_status=$lt_dlunknown -- cat > conftest.$ac_ext < --#endif -- --#include -- --#ifdef RTLD_GLOBAL --# define LT_DLGLOBAL RTLD_GLOBAL --#else --# ifdef DL_GLOBAL --# define LT_DLGLOBAL DL_GLOBAL --# else --# define LT_DLGLOBAL 0 --# endif --#endif -- --/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -- find out it does not work in some platform. */ --#ifndef LT_DLLAZY_OR_NOW --# ifdef RTLD_LAZY --# define LT_DLLAZY_OR_NOW RTLD_LAZY --# else --# ifdef DL_LAZY --# define LT_DLLAZY_OR_NOW DL_LAZY --# else --# ifdef RTLD_NOW --# define LT_DLLAZY_OR_NOW RTLD_NOW --# else --# ifdef DL_NOW --# define LT_DLLAZY_OR_NOW DL_NOW --# else --# define LT_DLLAZY_OR_NOW 0 --# endif --# endif --# endif --# endif --#endif -- --#ifdef __cplusplus --extern "C" void exit (int); --#endif -- --void fnord() { int i=42;} --int main () --{ -- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -- int status = $lt_dlunknown; -- -- if (self) -- { -- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -- /* dlclose (self); */ -- } -- -- exit (status); --} --EOF -- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then -- (./conftest; exit; ) >&5 2>/dev/null -- lt_status=$? -- case x$lt_status in -- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; -- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; -- x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; -- esac -- else : -- # compilation failed -- lt_cv_dlopen_self_static=no -- fi --fi --rm -fr conftest* -- -- --fi --echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 --echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 -- fi -- -- CPPFLAGS="$save_CPPFLAGS" -- LDFLAGS="$save_LDFLAGS" -- LIBS="$save_LIBS" -- ;; -- esac -- -- case $lt_cv_dlopen_self in -- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; -- *) enable_dlopen_self=unknown ;; -- esac -- -- case $lt_cv_dlopen_self_static in -- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; -- *) enable_dlopen_self_static=unknown ;; -- esac --fi -- -- --# Report which librarie types wil actually be built --echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 --echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 --echo "$as_me:$LINENO: result: $can_build_shared" >&5 --echo "${ECHO_T}$can_build_shared" >&6 -- --echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 --echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 --test "$can_build_shared" = "no" && enable_shared=no -- --# On AIX, shared libraries and static libraries use the same namespace, and --# are all built from PIC. --case $host_os in --aix3*) -- test "$enable_shared" = yes && enable_static=no -- if test -n "$RANLIB"; then -- archive_cmds="$archive_cmds~\$RANLIB \$lib" -- postinstall_cmds='$RANLIB $lib' -- fi -- ;; -- --aix4* | aix5*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -- fi -- ;; --esac --echo "$as_me:$LINENO: result: $enable_shared" >&5 --echo "${ECHO_T}$enable_shared" >&6 -- --echo "$as_me:$LINENO: checking whether to build static libraries" >&5 --echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 --# Make sure either enable_shared or enable_static is yes. --test "$enable_shared" = yes || enable_static=yes --echo "$as_me:$LINENO: result: $enable_static" >&5 --echo "${ECHO_T}$enable_static" >&6 -- --# The else clause should only fire when bootstrapping the --# libtool distribution, otherwise you forgot to ship ltmain.sh --# with your package, and you will get complaints that there are --# no rules to generate ltmain.sh. --if test -f "$ltmain"; then -- # See if we are running on zsh, and set the options which allow our commands through -- # without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST -- fi -- # Now quote all the things that may contain metacharacters while being -- # careful not to overquote the AC_SUBSTed values. We take copies of the -- # variables and quote the copies for generation of the libtool script. -- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ -- SED SHELL STRIP \ -- libname_spec library_names_spec soname_spec extract_expsyms_cmds \ -- old_striplib striplib file_magic_cmd finish_cmds finish_eval \ -- deplibs_check_method reload_flag reload_cmds need_locks \ -- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ -- lt_cv_sys_global_symbol_to_c_name_address \ -- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -- old_postinstall_cmds old_postuninstall_cmds \ -- compiler \ -- CC \ -- LD \ -- lt_prog_compiler_wl \ -- lt_prog_compiler_pic \ -- lt_prog_compiler_static \ -- lt_prog_compiler_no_builtin_flag \ -- export_dynamic_flag_spec \ -- thread_safe_flag_spec \ -- whole_archive_flag_spec \ -- enable_shared_with_static_runtimes \ -- old_archive_cmds \ -- old_archive_from_new_cmds \ -- predep_objects \ -- postdep_objects \ -- predeps \ -- postdeps \ -- compiler_lib_search_path \ -- archive_cmds \ -- archive_expsym_cmds \ -- postinstall_cmds \ -- postuninstall_cmds \ -- old_archive_from_expsyms_cmds \ -- allow_undefined_flag \ -- no_undefined_flag \ -- export_symbols_cmds \ -- hardcode_libdir_flag_spec \ -- hardcode_libdir_flag_spec_ld \ -- hardcode_libdir_separator \ -- hardcode_automatic \ -- module_cmds \ -- module_expsym_cmds \ -- lt_cv_prog_compiler_c_o \ -- exclude_expsyms \ -- include_expsyms; do -- -- case $var in -- old_archive_cmds | \ -- old_archive_from_new_cmds | \ -- archive_cmds | \ -- archive_expsym_cmds | \ -- module_cmds | \ -- module_expsym_cmds | \ -- old_archive_from_expsyms_cmds | \ -- export_symbols_cmds | \ -- extract_expsyms_cmds | reload_cmds | finish_cmds | \ -- postinstall_cmds | postuninstall_cmds | \ -- old_postinstall_cmds | old_postuninstall_cmds | \ -- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -- # Double-quote double-evaled strings. -- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" -- ;; -- *) -- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" -- ;; -- esac -- done -- -- case $lt_echo in -- *'\$0 --fallback-echo"') -- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` -- ;; -- esac -- --cfgfile="${ofile}T" -- trap "$rm \"$cfgfile\"; exit 1" 1 2 15 -- $rm -f "$cfgfile" -- { echo "$as_me:$LINENO: creating $ofile" >&5 --echo "$as_me: creating $ofile" >&6;} -- -- cat <<__EOF__ >> "$cfgfile" --#! $SHELL -- --# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. --# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) --# NOTE: Changes made to this file will be lost: look at ltmain.sh. --# --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 --# Free Software Foundation, Inc. --# --# This file is part of GNU Libtool: --# Originally by Gordon Matzigkeit , 1996 --# --# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --# --# As a special exception to the GNU General Public License, if you --# distribute this file as part of a program that contains a --# configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -- --# A sed program that does not truncate output. --SED=$lt_SED -- --# Sed that helps us avoid accidentally triggering echo(1) options like -n. --Xsed="$SED -e 1s/^X//" -- --# The HP-UX ksh and POSIX shell print the target directory to stdout --# if CDPATH is set. --(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -- --# The names of the tagged configurations supported by this script. --available_tags= -- --# ### BEGIN LIBTOOL CONFIG -- --# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -- --# Shell to use when invoking shell scripts. --SHELL=$lt_SHELL -- --# Whether or not to build shared libraries. --build_libtool_libs=$enable_shared -- --# Whether or not to build static libraries. --build_old_libs=$enable_static -- --# Whether or not to add -lc for building shared libraries. --build_libtool_need_lc=$archive_cmds_need_lc -- --# Whether or not to disallow shared libs when runtime libs are static --allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes -- --# Whether or not to optimize for fast installation. --fast_install=$enable_fast_install -- --# The host system. --host_alias=$host_alias --host=$host --host_os=$host_os -- --# The build system. --build_alias=$build_alias --build=$build --build_os=$build_os -- --# An echo program that does not interpret backslashes. --echo=$lt_echo -- --# The archiver. --AR=$lt_AR --AR_FLAGS=$lt_AR_FLAGS -- --# A C compiler. --LTCC=$lt_LTCC -- --# A language-specific compiler. --CC=$lt_compiler -- --# Is the compiler the GNU C compiler? --with_gcc=$GCC -- --# An ERE matcher. --EGREP=$lt_EGREP -- --# The linker used to build libraries. --LD=$lt_LD -- --# Whether we need hard or soft links. --LN_S=$lt_LN_S -- --# A BSD-compatible nm program. --NM=$lt_NM -- --# A symbol stripping program --STRIP=$lt_STRIP -- --# Used to examine libraries when file_magic_cmd begins "file" --MAGIC_CMD=$MAGIC_CMD -- --# Used on cygwin: DLL creation program. --DLLTOOL="$DLLTOOL" -- --# Used on cygwin: object dumper. --OBJDUMP="$OBJDUMP" -- --# Used on cygwin: assembler. --AS="$AS" -- --# The name of the directory that contains temporary libtool files. --objdir=$objdir -- --# How to create reloadable object files. --reload_flag=$lt_reload_flag --reload_cmds=$lt_reload_cmds -- --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl -- --# Object file suffix (normally "o"). --objext="$ac_objext" -- --# Old archive suffix (normally "a"). --libext="$libext" -- --# Shared library suffix (normally ".so"). --shrext_cmds='$shrext_cmds' -- --# Executable file suffix (normally ""). --exeext="$exeext" -- --# Additional compiler flags for building library objects. --pic_flag=$lt_lt_prog_compiler_pic --pic_mode=$pic_mode -- --# What is the maximum length of a command? --max_cmd_len=$lt_cv_sys_max_cmd_len -- --# Does compiler simultaneously support -c and -o options? --compiler_c_o=$lt_lt_cv_prog_compiler_c_o -- --# Must we lock files when doing compilation? --need_locks=$lt_need_locks -- --# Do we need the lib prefix for modules? --need_lib_prefix=$need_lib_prefix -- --# Do we need a version for libraries? --need_version=$need_version -- --# Whether dlopen is supported. --dlopen_support=$enable_dlopen -- --# Whether dlopen of programs is supported. --dlopen_self=$enable_dlopen_self -- --# Whether dlopen of statically linked programs is supported. --dlopen_self_static=$enable_dlopen_self_static -- --# Compiler flag to prevent dynamic linking. --link_static_flag=$lt_lt_prog_compiler_static -- --# Compiler flag to turn off builtin functions. --no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -- --# Compiler flag to allow reflexive dlopens. --export_dynamic_flag_spec=$lt_export_dynamic_flag_spec -- --# Compiler flag to generate shared objects directly from archives. --whole_archive_flag_spec=$lt_whole_archive_flag_spec -- --# Compiler flag to generate thread-safe objects. --thread_safe_flag_spec=$lt_thread_safe_flag_spec -- --# Library versioning type. --version_type=$version_type -- --# Format of library name prefix. --libname_spec=$lt_libname_spec -- --# List of archive names. First name is the real one, the rest are links. --# The last name is the one that the linker finds with -lNAME. --library_names_spec=$lt_library_names_spec -- --# The coded name of the library, if different from the real name. --soname_spec=$lt_soname_spec -- --# Commands used to build and install an old-style archive. --RANLIB=$lt_RANLIB --old_archive_cmds=$lt_old_archive_cmds --old_postinstall_cmds=$lt_old_postinstall_cmds --old_postuninstall_cmds=$lt_old_postuninstall_cmds -- --# Create an old-style archive from a shared archive. --old_archive_from_new_cmds=$lt_old_archive_from_new_cmds -- --# Create a temporary old-style archive to link instead of a shared archive. --old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds -- --# Commands used to build and install a shared archive. --archive_cmds=$lt_archive_cmds --archive_expsym_cmds=$lt_archive_expsym_cmds --postinstall_cmds=$lt_postinstall_cmds --postuninstall_cmds=$lt_postuninstall_cmds -- --# Commands used to build a loadable module (assumed same as above if empty) --module_cmds=$lt_module_cmds --module_expsym_cmds=$lt_module_expsym_cmds -- --# Commands to strip libraries. --old_striplib=$lt_old_striplib --striplib=$lt_striplib -- --# Dependencies to place before the objects being linked to create a --# shared library. --predep_objects=$lt_predep_objects -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdep_objects=$lt_postdep_objects -- --# Dependencies to place before the objects being linked to create a --# shared library. --predeps=$lt_predeps -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdeps=$lt_postdeps -- --# The library search path used internally by the compiler when linking --# a shared library. --compiler_lib_search_path=$lt_compiler_lib_search_path -- --# Method to check whether dependent libraries are shared objects. --deplibs_check_method=$lt_deplibs_check_method -- --# Command to use when deplibs_check_method == file_magic. --file_magic_cmd=$lt_file_magic_cmd -- --# Flag that allows shared libraries with undefined symbols to be built. --allow_undefined_flag=$lt_allow_undefined_flag -- --# Flag that forces no undefined symbols. --no_undefined_flag=$lt_no_undefined_flag -- --# Commands used to finish a libtool library installation in a directory. --finish_cmds=$lt_finish_cmds -- --# Same as above, but a single script fragment to be evaled but not shown. --finish_eval=$lt_finish_eval -- --# Take the output of nm and produce a listing of raw symbols and C names. --global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -- --# Transform the output of nm in a proper C declaration --global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -- --# Transform the output of nm in a C name address pair --global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -- --# This is the shared library runtime path variable. --runpath_var=$runpath_var -- --# This is the shared library path variable. --shlibpath_var=$shlibpath_var -- --# Is shlibpath searched before the hard-coded library search path? --shlibpath_overrides_runpath=$shlibpath_overrides_runpath -- --# How to hardcode a shared library path into an executable. --hardcode_action=$hardcode_action -- --# Whether we should hardcode library paths into libraries. --hardcode_into_libs=$hardcode_into_libs -- --# Flag to hardcode \$libdir into a binary during linking. --# This must work even if \$libdir does not exist. --hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -- --# If ld is used when linking, flag to hardcode \$libdir into --# a binary during linking. This must work even if \$libdir does --# not exist. --hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld -- --# Whether we need a single -rpath flag with a separated argument. --hardcode_libdir_separator=$lt_hardcode_libdir_separator -- --# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the --# resulting binary. --hardcode_direct=$hardcode_direct -- --# Set to yes if using the -LDIR flag during linking hardcodes DIR into the --# resulting binary. --hardcode_minus_L=$hardcode_minus_L -- --# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into --# the resulting binary. --hardcode_shlibpath_var=$hardcode_shlibpath_var -- --# Set to yes if building a shared library automatically hardcodes DIR into the library --# and all subsequent libraries and executables linked against it. --hardcode_automatic=$hardcode_automatic -- --# Variables whose values should be saved in libtool wrapper scripts and --# restored at relink time. --variables_saved_for_relink="$variables_saved_for_relink" -- --# Whether libtool must link a program against all its dependency libraries. --link_all_deplibs=$link_all_deplibs -- --# Compile-time system search path for libraries --sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -- --# Run-time system search path for libraries --sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -- --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path="$fix_srcfile_path" -- --# Set to yes if exported symbols are required. --always_export_symbols=$always_export_symbols -- --# The commands to list exported symbols. --export_symbols_cmds=$lt_export_symbols_cmds -- --# The commands to extract the exported symbol list from a shared archive. --extract_expsyms_cmds=$lt_extract_expsyms_cmds -- --# Symbols that should not be listed in the preloaded symbols. --exclude_expsyms=$lt_exclude_expsyms -- --# Symbols that must always be exported. --include_expsyms=$lt_include_expsyms -- --# ### END LIBTOOL CONFIG -- --__EOF__ -- -- -- case $host_os in -- aix3*) -- cat <<\EOF >> "$cfgfile" -- --# AIX sometimes has problems with the GCC collect2 program. For some --# reason, if we set the COLLECT_NAMES environment variable, the problems --# vanish in a puff of smoke. --if test "X${COLLECT_NAMES+set}" != Xset; then -- COLLECT_NAMES= -- export COLLECT_NAMES --fi --EOF -- ;; -- esac -- -- # We use sed instead of cat because bash on DJGPP gets confused if -- # if finds mixed CR/LF and LF-only lines. Since sed operates in -- # text mode, it properly converts lines to CR/LF. This bash problem -- # is reportedly fixed, but why not run on old versions too? -- sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || \ -- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") -- chmod +x "$ofile" -- --else -- # If there is no Makefile yet, we rely on a make rule to execute -- # `config.status --recheck' to rerun these tests and create the -- # libtool script then. -- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` -- if test -f "$ltmain_in"; then -- test -f Makefile && make "$ltmain" -- fi --fi -- -- --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- --CC="$lt_save_CC" -- -- --# Check whether --with-tags or --without-tags was given. --if test "${with_tags+set}" = set; then -- withval="$with_tags" -- tagnames="$withval" --fi; -- --if test -f "$ltmain" && test -n "$tagnames"; then -- if test ! -f "${ofile}"; then -- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 --echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} -- fi -- -- if test -z "$LTCC"; then -- eval "`$SHELL ${ofile} --config | grep '^LTCC='`" -- if test -z "$LTCC"; then -- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 --echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} -- else -- { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 --echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} -- fi -- fi -- -- # Extract list of available tagged configurations in $ofile. -- # Note that this assumes the entire list is on one line. -- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` -- -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for tagname in $tagnames; do -- IFS="$lt_save_ifs" -- # Check whether tagname contains only valid characters -- case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in -- "") ;; -- *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 --echo "$as_me: error: invalid tag name: $tagname" >&2;} -- { (exit 1); exit 1; }; } -- ;; -- esac -- -- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null -- then -- { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 --echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} -- { (exit 1); exit 1; }; } -- fi -- -- # Update the list of available tags. -- if test -n "$tagname"; then -- echo appending configuration tag \"$tagname\" to $ofile -- -- case $tagname in -- CXX) -- if test -n "$CXX" && ( test "X$CXX" != "Xno" && -- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || -- (test "X$CXX" != "Xg++"))) ; then -- ac_ext=cc --ac_cpp='$CXXCPP $CPPFLAGS' --ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -- -- -- -- --archive_cmds_need_lc_CXX=no --allow_undefined_flag_CXX= --always_export_symbols_CXX=no --archive_expsym_cmds_CXX= --export_dynamic_flag_spec_CXX= --hardcode_direct_CXX=no --hardcode_libdir_flag_spec_CXX= --hardcode_libdir_flag_spec_ld_CXX= --hardcode_libdir_separator_CXX= --hardcode_minus_L_CXX=no --hardcode_automatic_CXX=no --module_cmds_CXX= --module_expsym_cmds_CXX= --link_all_deplibs_CXX=unknown --old_archive_cmds_CXX=$old_archive_cmds --no_undefined_flag_CXX= --whole_archive_flag_spec_CXX= --enable_shared_with_static_runtimes_CXX=no -- --# Dependencies to place before and after the object being linked: --predep_objects_CXX= --postdep_objects_CXX= --predeps_CXX= --postdeps_CXX= --compiler_lib_search_path_CXX= -- --# Source file extension for C++ test sources. --ac_ext=cpp -- --# Object file extension for compiled C++ test sources. --objext=o --objext_CXX=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code="int some_variable = 0;\n" -- --# Code to be used in simple link tests --lt_simple_link_test_code='int main(int, char *) { return(0); }\n' -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. -- --# If no C compiler was specified, use CC. --LTCC=${LTCC-"$CC"} -- --# Allow CC to be a program name with arguments. --compiler=$CC -- -- --# save warnings/boilerplate of simple test code --ac_outfile=conftest.$ac_objext --printf "$lt_simple_compile_test_code" >conftest.$ac_ext --eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_compiler_boilerplate=`cat conftest.err` --$rm conftest* -- --ac_outfile=conftest.$ac_objext --printf "$lt_simple_link_test_code" >conftest.$ac_ext --eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_linker_boilerplate=`cat conftest.err` --$rm conftest* -- -- --# Allow CC to be a program name with arguments. --lt_save_CC=$CC --lt_save_LD=$LD --lt_save_GCC=$GCC --GCC=$GXX --lt_save_with_gnu_ld=$with_gnu_ld --lt_save_path_LD=$lt_cv_path_LD --if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then -- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx --else -- unset lt_cv_prog_gnu_ld --fi --if test -n "${lt_cv_path_LDCXX+set}"; then -- lt_cv_path_LD=$lt_cv_path_LDCXX --else -- unset lt_cv_path_LD --fi --test -z "${LDCXX+set}" || LD=$LDCXX --CC=${CXX-"c++"} --compiler=$CC --compiler_CXX=$CC --for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -- -- --# We don't want -fno-exception wen compiling C++ code, so set the --# no_builtin_flag separately --if test "$GXX" = yes; then -- lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' --else -- lt_prog_compiler_no_builtin_flag_CXX= --fi -- --if test "$GXX" = yes; then -- # Set up default GNU C++ configuration -- -- --# Check whether --with-gnu-ld or --without-gnu-ld was given. --if test "${with_gnu_ld+set}" = set; then -- withval="$with_gnu_ld" -- test "$withval" = no || with_gnu_ld=yes --else -- with_gnu_ld=no --fi; --ac_prog=ld --if test "$GCC" = yes; then -- # Check if gcc -print-prog-name=ld gives a path. -- echo "$as_me:$LINENO: checking for ld used by $CC" >&5 --echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 -- case $host in -- *-*-mingw*) -- # gcc leaves a trailing carriage return which upsets mingw -- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -- *) -- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -- esac -- case $ac_prog in -- # Accept absolute paths. -- [\\/]* | ?:[\\/]*) -- re_direlt='/[^/][^/]*/\.\./' -- # Canonicalize the pathname of ld -- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` -- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do -- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` -- done -- test -z "$LD" && LD="$ac_prog" -- ;; -- "") -- # If it fails, then pretend we aren't using GCC. -- ac_prog=ld -- ;; -- *) -- # If it is relative, then search for the first ld in PATH. -- with_gnu_ld=unknown -- ;; -- esac --elif test "$with_gnu_ld" = yes; then -- echo "$as_me:$LINENO: checking for GNU ld" >&5 --echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 --else -- echo "$as_me:$LINENO: checking for non-GNU ld" >&5 --echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 --fi --if test "${lt_cv_path_LD+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test -z "$LD"; then -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- for ac_dir in $PATH; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- lt_cv_path_LD="$ac_dir/$ac_prog" -- # Check to see if the program is GNU ld. I'd rather use --version, -- # but apparently some variants of GNU ld only accept -v. -- # Break only if it was the GNU/non-GNU ld that we prefer. -- case `"$lt_cv_path_LD" -v 2>&1 &5 --echo "${ECHO_T}$LD" >&6 --else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi --test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 --echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} -- { (exit 1); exit 1; }; } --echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 --echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 --if test "${lt_cv_prog_gnu_ld+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- # I'd rather use --version here, but apparently some GNU lds only accept -v. --case `$LD -v 2>&1 &5 --echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 --with_gnu_ld=$lt_cv_prog_gnu_ld -- -- -- -- # Check if GNU C++ uses GNU ld as the underlying linker, since the -- # archiving commands below assume that GNU ld is being used. -- if test "$with_gnu_ld" = yes; then -- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- -- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' -- export_dynamic_flag_spec_CXX='${wl}--export-dynamic' -- -- # If archive_cmds runs LD, not CC, wlarc should be empty -- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to -- # investigate it a little bit more. (MM) -- wlarc='${wl}' -- -- # ancient GNU ld didn't support --whole-archive et. al. -- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ -- grep 'no-whole-archive' > /dev/null; then -- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- else -- whole_archive_flag_spec_CXX= -- fi -- else -- with_gnu_ld=no -- wlarc= -- -- # A generic and very simple default shared library creation -- # command for GNU C++ for the case where it uses the native -- # linker, instead of GNU ld. If possible, this setting should -- # overridden to take advantage of the native linker features on -- # the platform it is being used on. -- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' -- fi -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -- --else -- GXX=no -- with_gnu_ld=no -- wlarc= --fi -- --# PORTME: fill in a description of your system's C++ link characteristics --echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 --echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 --ld_shlibs_CXX=yes --case $host_os in -- aix3*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- aix4* | aix5*) -- if test "$host_cpu" = ia64; then -- # On IA64, the linker does run time linking by default, so we don't -- # have to do anything special. -- aix_use_runtimelinking=no -- exp_sym_flag='-Bexport' -- no_entry_flag="" -- else -- aix_use_runtimelinking=no -- -- # Test if we are trying to use run time linking or normal -- # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -- case $host_os in aix4.[23]|aix4.[23].*|aix5*) -- for ld_flag in $LDFLAGS; do -- case $ld_flag in -- *-brtl*) -- aix_use_runtimelinking=yes -- break -- ;; -- esac -- done -- esac -- -- exp_sym_flag='-bexport' -- no_entry_flag='-bnoentry' -- fi -- -- # When large executables or shared objects are built, AIX ld can -- # have problems creating the table of contents. If linking a library -- # or program results in "error TOC overflow" add -mminimal-toc to -- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -- -- archive_cmds_CXX='' -- hardcode_direct_CXX=yes -- hardcode_libdir_separator_CXX=':' -- link_all_deplibs_CXX=yes -- -- if test "$GXX" = yes; then -- case $host_os in aix4.[012]|aix4.[012].*) -- # We only want to do this on AIX 4.2 and lower, the check -- # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -- if test -f "$collect2name" && \ -- strings "$collect2name" | grep resolve_lib_name >/dev/null -- then -- # We have reworked collect2 -- hardcode_direct_CXX=yes -- else -- # We have old collect2 -- hardcode_direct_CXX=unsupported -- # It fails to find uninstalled libraries when the uninstalled -- # path is not listed in the libpath. Setting hardcode_minus_L -- # to unsupported forces relinking -- hardcode_minus_L_CXX=yes -- hardcode_libdir_flag_spec_CXX='-L$libdir' -- hardcode_libdir_separator_CXX= -- fi -- esac -- shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -- fi -- else -- # not using gcc -- if test "$host_cpu" = ia64; then -- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release -- # chokes on -Wl,-G. The following line is correct: -- shared_flag='-G' -- else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -- else -- shared_flag='${wl}-bM:SRE' -- fi -- fi -- fi -- -- # It seems that -bexpall does not export symbols beginning with -- # underscore (_), so it is better to generate a list of symbols to export. -- always_export_symbols_CXX=yes -- if test "$aix_use_runtimelinking" = yes; then -- # Warning - without using the other runtime loading flags (-brtl), -- # -berok will link without error, but may produce a broken library. -- allow_undefined_flag_CXX='-berok' -- # Determine the default libpath from the value encoded in an empty executable. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- -- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" -- -- archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -- else -- if test "$host_cpu" = ia64; then -- hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' -- allow_undefined_flag_CXX="-z nodefs" -- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -- else -- # Determine the default libpath from the value encoded in an empty executable. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- -- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" -- # Warning - without using the other run time loading flags, -- # -berok will link without error, but may produce a broken library. -- no_undefined_flag_CXX=' ${wl}-bernotok' -- allow_undefined_flag_CXX=' ${wl}-berok' -- # -bexpall does not export symbols beginning with underscore (_) -- always_export_symbols_CXX=yes -- # Exported symbols can be pulled into shared objects from archives -- whole_archive_flag_spec_CXX=' ' -- archive_cmds_need_lc_CXX=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -- fi -- fi -- ;; -- chorus*) -- case $cc_basename in -- *) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- esac -- ;; -- -- -- cygwin* | mingw* | pw32*) -- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, -- # as there is no search path for DLLs. -- hardcode_libdir_flag_spec_CXX='-L$libdir' -- allow_undefined_flag_CXX=unsupported -- always_export_symbols_CXX=no -- enable_shared_with_static_runtimes_CXX=yes -- -- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then -- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- else -- ld_shlibs_CXX=no -- fi -- ;; -- darwin* | rhapsody*) -- case $host_os in -- rhapsody* | darwin1.[012]) -- allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' -- ;; -- *) # Darwin 1.3 on -- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then -- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- else -- case ${MACOSX_DEPLOYMENT_TARGET} in -- 10.[012]) -- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- ;; -- 10.*) -- allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' -- ;; -- esac -- fi -- ;; -- esac -- archive_cmds_need_lc_CXX=no -- hardcode_direct_CXX=no -- hardcode_automatic_CXX=yes -- hardcode_shlibpath_var_CXX=unsupported -- whole_archive_flag_spec_CXX='' -- link_all_deplibs_CXX=yes -- -- if test "$GXX" = yes ; then -- lt_int_apple_cc_single_mod=no -- output_verbose_link_cmd='echo' -- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then -- lt_int_apple_cc_single_mod=yes -- fi -- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then -- archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' -- else -- archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' -- fi -- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then -- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- else -- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- fi -- module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- else -- case $cc_basename in -- xlc*) -- output_verbose_link_cmd='echo' -- archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' -- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- ;; -- *) -- ld_shlibs_CXX=no -- ;; -- esac -- fi -- ;; -- -- dgux*) -- case $cc_basename in -- ec++*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- ghcx*) -- # Green Hills C++ Compiler -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- esac -- ;; -- freebsd[12]*) -- # C++ shared libraries reported to be fairly broken before switch to ELF -- ld_shlibs_CXX=no -- ;; -- freebsd-elf*) -- archive_cmds_need_lc_CXX=no -- ;; -- freebsd* | kfreebsd*-gnu | dragonfly*) -- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF -- # conventions -- ld_shlibs_CXX=yes -- ;; -- gnu*) -- ;; -- hpux9*) -- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' -- hardcode_libdir_separator_CXX=: -- export_dynamic_flag_spec_CXX='${wl}-E' -- hardcode_direct_CXX=yes -- hardcode_minus_L_CXX=yes # Not in the search PATH, -- # but as the default -- # location of the library. -- -- case $cc_basename in -- CC*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- aCC*) -- archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- *) -- if test "$GXX" = yes; then -- archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- else -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- fi -- ;; -- esac -- ;; -- hpux10*|hpux11*) -- if test $with_gnu_ld = no; then -- case $host_cpu in -- hppa*64*) -- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld_CXX='+b $libdir' -- hardcode_libdir_separator_CXX=: -- ;; -- ia64*) -- hardcode_libdir_flag_spec_CXX='-L$libdir' -- ;; -- *) -- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' -- hardcode_libdir_separator_CXX=: -- export_dynamic_flag_spec_CXX='${wl}-E' -- ;; -- esac -- fi -- case $host_cpu in -- hppa*64*) -- hardcode_direct_CXX=no -- hardcode_shlibpath_var_CXX=no -- ;; -- ia64*) -- hardcode_direct_CXX=no -- hardcode_shlibpath_var_CXX=no -- hardcode_minus_L_CXX=yes # Not in the search PATH, -- # but as the default -- # location of the library. -- ;; -- *) -- hardcode_direct_CXX=yes -- hardcode_minus_L_CXX=yes # Not in the search PATH, -- # but as the default -- # location of the library. -- ;; -- esac -- -- case $cc_basename in -- CC*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- aCC*) -- case $host_cpu in -- hppa*64*|ia64*) -- archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' -- ;; -- *) -- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- esac -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- *) -- if test "$GXX" = yes; then -- if test $with_gnu_ld = no; then -- case $host_cpu in -- ia64*|hppa*64*) -- archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' -- ;; -- *) -- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- esac -- fi -- else -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- fi -- ;; -- esac -- ;; -- irix5* | irix6*) -- case $cc_basename in -- CC*) -- # SGI C++ -- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- -- # Archives containing C++ object files must be created using -- # "CC -ar", where "CC" is the IRIX C++ compiler. This is -- # necessary to make sure instantiated templates are included -- # in the archive. -- old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' -- ;; -- *) -- if test "$GXX" = yes; then -- if test "$with_gnu_ld" = no; then -- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' -- fi -- fi -- link_all_deplibs_CXX=yes -- ;; -- esac -- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_CXX=: -- ;; -- linux*) -- case $cc_basename in -- KCC*) -- # Kuck and Associates, Inc. (KAI) C++ Compiler -- -- # KCC will only create a shared library if the output file -- # ends with ".so" (or ".sl" for HP-UX), so rename the library -- # to its proper name (with version) after linking. -- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- -- hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' -- export_dynamic_flag_spec_CXX='${wl}--export-dynamic' -- -- # Archives containing C++ object files must be created using -- # "CC -Bstatic", where "CC" is the KAI C++ compiler. -- old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' -- ;; -- icpc*) -- # Intel C++ -- with_gnu_ld=yes -- # version 8.0 and above of icpc choke on multiply defined symbols -- # if we add $predep_objects and $postdep_objects, however 7.1 and -- # earlier do not add the objects themselves. -- case `$CC -V 2>&1` in -- *"Version 7."*) -- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- ;; -- *) # Version 8.0 or newer -- tmp_idyn= -- case $host_cpu in -- ia64*) tmp_idyn=' -i_dynamic';; -- esac -- archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- ;; -- esac -- archive_cmds_need_lc_CXX=no -- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' -- export_dynamic_flag_spec_CXX='${wl}--export-dynamic' -- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -- ;; -- pgCC*) -- # Portland Group C++ compiler -- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' -- -- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' -- export_dynamic_flag_spec_CXX='${wl}--export-dynamic' -- whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- ;; -- cxx*) -- # Compaq C++ -- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' -- -- runpath_var=LD_RUN_PATH -- hardcode_libdir_flag_spec_CXX='-rpath $libdir' -- hardcode_libdir_separator_CXX=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- esac -- ;; -- lynxos*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- m88k*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- mvs*) -- case $cc_basename in -- cxx*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- esac -- ;; -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' -- wlarc= -- hardcode_libdir_flag_spec_CXX='-R$libdir' -- hardcode_direct_CXX=yes -- hardcode_shlibpath_var_CXX=no -- fi -- # Workaround some broken pre-1.5 toolchains -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' -- ;; -- openbsd2*) -- # C++ shared libraries are fairly broken -- ld_shlibs_CXX=no -- ;; -- openbsd*) -- hardcode_direct_CXX=yes -- hardcode_shlibpath_var_CXX=no -- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' -- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' -- export_dynamic_flag_spec_CXX='${wl}-E' -- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- fi -- output_verbose_link_cmd='echo' -- ;; -- osf3*) -- case $cc_basename in -- KCC*) -- # Kuck and Associates, Inc. (KAI) C++ Compiler -- -- # KCC will only create a shared library if the output file -- # ends with ".so" (or ".sl" for HP-UX), so rename the library -- # to its proper name (with version) after linking. -- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- -- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' -- hardcode_libdir_separator_CXX=: -- -- # Archives containing C++ object files must be created using -- # "CC -Bstatic", where "CC" is the KAI C++ compiler. -- old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' -- -- ;; -- RCC*) -- # Rational C++ 2.4.1 -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- cxx*) -- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- -- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_CXX=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- *) -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- -- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_CXX=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -- -- else -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- fi -- ;; -- esac -- ;; -- osf4* | osf5*) -- case $cc_basename in -- KCC*) -- # Kuck and Associates, Inc. (KAI) C++ Compiler -- -- # KCC will only create a shared library if the output file -- # ends with ".so" (or ".sl" for HP-UX), so rename the library -- # to its proper name (with version) after linking. -- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- -- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' -- hardcode_libdir_separator_CXX=: -- -- # Archives containing C++ object files must be created using -- # the KAI C++ compiler. -- old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' -- ;; -- RCC*) -- # Rational C++ 2.4.1 -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- cxx*) -- allow_undefined_flag_CXX=' -expect_unresolved \*' -- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ -- echo "-hidden">> $lib.exp~ -- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ -- $rm $lib.exp' -- -- hardcode_libdir_flag_spec_CXX='-rpath $libdir' -- hardcode_libdir_separator_CXX=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -- ;; -- *) -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- -- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_CXX=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -- -- else -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- fi -- ;; -- esac -- ;; -- psos*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- sco*) -- archive_cmds_need_lc_CXX=no -- case $cc_basename in -- CC*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- esac -- ;; -- sunos4*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.x -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- lcc*) -- # Lucid -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- esac -- ;; -- solaris*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.2, 5.x and Centerline C++ -- archive_cmds_need_lc_CXX=yes -- no_undefined_flag_CXX=' -zdefs' -- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -- -- hardcode_libdir_flag_spec_CXX='-R$libdir' -- hardcode_shlibpath_var_CXX=no -- case $host_os in -- solaris2.[0-5] | solaris2.[0-5].*) ;; -- *) -- # The C++ compiler is used as linker so we must use $wl -- # flag to pass the commands to the underlying system -- # linker. We must also pass each convience library through -- # to the system linker between allextract/defaultextract. -- # The C++ compiler will combine linker options so we -- # cannot just pass the convience library names through -- # without $wl. -- # Supported since Solaris 2.6 (maybe 2.5.1?) -- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' -- ;; -- esac -- link_all_deplibs_CXX=yes -- -- output_verbose_link_cmd='echo' -- -- # Archives containing C++ object files must be created using -- # "CC -xar", where "CC" is the Sun C++ compiler. This is -- # necessary to make sure instantiated templates are included -- # in the archive. -- old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' -- ;; -- gcx*) -- # Green Hills C++ Compiler -- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -- -- # The C++ compiler must be used to create the archive. -- old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' -- ;; -- *) -- # GNU C++ compiler with Solaris linker -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- no_undefined_flag_CXX=' ${wl}-z ${wl}defs' -- if $CC --version | grep -v '^2\.7' > /dev/null; then -- archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -- archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" -- else -- # g++ 2.7 appears to require `-G' NOT `-shared' on this -- # platform. -- archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -- archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" -- fi -- -- hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' -- fi -- ;; -- esac -- ;; -- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) -- archive_cmds_need_lc_CXX=no -- ;; -- tandem*) -- case $cc_basename in -- NCC*) -- # NonStop-UX NCC 3.20 -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- esac -- ;; -- vxworks*) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- ld_shlibs_CXX=no -- ;; --esac --echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 --echo "${ECHO_T}$ld_shlibs_CXX" >&6 --test "$ld_shlibs_CXX" = no && can_build_shared=no -- --GCC_CXX="$GXX" --LD_CXX="$LD" -- -- --cat > conftest.$ac_ext <&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -- # Parse the compiler output and extract the necessary -- # objects, libraries and library flags. -- -- # Sentinel used to keep track of whether or not we are before -- # the conftest object file. -- pre_test_object_deps_done=no -- -- # The `*' in the case matches for architectures that use `case' in -- # $output_verbose_cmd can trigger glob expansion during the loop -- # eval without this substitution. -- output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` -- -- for p in `eval $output_verbose_link_cmd`; do -- case $p in -- -- -L* | -R* | -l*) -- # Some compilers place space between "-{L,R}" and the path. -- # Remove the space. -- if test $p = "-L" \ -- || test $p = "-R"; then -- prev=$p -- continue -- else -- prev= -- fi -- -- if test "$pre_test_object_deps_done" = no; then -- case $p in -- -L* | -R*) -- # Internal compiler library paths should come after those -- # provided the user. The postdeps already come after the -- # user supplied libs so there is no need to process them. -- if test -z "$compiler_lib_search_path_CXX"; then -- compiler_lib_search_path_CXX="${prev}${p}" -- else -- compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" -- fi -- ;; -- # The "-l" case would never come before the object being -- # linked, so don't bother handling this case. -- esac -- else -- if test -z "$postdeps_CXX"; then -- postdeps_CXX="${prev}${p}" -- else -- postdeps_CXX="${postdeps_CXX} ${prev}${p}" -- fi -- fi -- ;; -- -- *.$objext) -- # This assumes that the test object file only shows up -- # once in the compiler output. -- if test "$p" = "conftest.$objext"; then -- pre_test_object_deps_done=yes -- continue -- fi -- -- if test "$pre_test_object_deps_done" = no; then -- if test -z "$predep_objects_CXX"; then -- predep_objects_CXX="$p" -- else -- predep_objects_CXX="$predep_objects_CXX $p" -- fi -- else -- if test -z "$postdep_objects_CXX"; then -- postdep_objects_CXX="$p" -- else -- postdep_objects_CXX="$postdep_objects_CXX $p" -- fi -- fi -- ;; -- -- *) ;; # Ignore the rest. -- -- esac -- done -- -- # Clean up. -- rm -f a.out a.exe --else -- echo "libtool.m4: error: problem compiling CXX test program" --fi -- --$rm -f confest.$objext -- --# PORTME: override above test on systems where it is broken --case $host_os in --solaris*) -- case $cc_basename in -- CC*) -- # Adding this requires a known-good setup of shared libraries for -- # Sun compiler versions before 5.6, else PIC objects from an old -- # archive will be linked into the output, leading to subtle bugs. -- postdeps_CXX='-lCstd -lCrun' -- ;; -- esac --esac -- -- --case " $postdeps_CXX " in --*" -lc "*) archive_cmds_need_lc_CXX=no ;; --esac -- --lt_prog_compiler_wl_CXX= --lt_prog_compiler_pic_CXX= --lt_prog_compiler_static_CXX= -- --echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 --echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 -- -- # C++ specific cases for pic, static, wl, etc. -- if test "$GXX" = yes; then -- lt_prog_compiler_wl_CXX='-Wl,' -- lt_prog_compiler_static_CXX='-static' -- -- case $host_os in -- aix*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- lt_prog_compiler_static_CXX='-Bstatic' -- fi -- ;; -- amigaos*) -- # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -- lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' -- ;; -- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -- # PIC is the default for these OSes. -- ;; -- mingw* | os2* | pw32*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- lt_prog_compiler_pic_CXX='-DDLL_EXPORT' -- ;; -- darwin* | rhapsody*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- lt_prog_compiler_pic_CXX='-fno-common' -- ;; -- *djgpp*) -- # DJGPP does not support shared libraries at all -- lt_prog_compiler_pic_CXX= -- ;; -- sysv4*MP*) -- if test -d /usr/nec; then -- lt_prog_compiler_pic_CXX=-Kconform_pic -- fi -- ;; -- hpux*) -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- ;; -- *) -- lt_prog_compiler_pic_CXX='-fPIC' -- ;; -- esac -- ;; -- *) -- lt_prog_compiler_pic_CXX='-fPIC' -- ;; -- esac -- else -- case $host_os in -- aix4* | aix5*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- lt_prog_compiler_static_CXX='-Bstatic' -- else -- lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' -- fi -- ;; -- chorus*) -- case $cc_basename in -- cxch68*) -- # Green Hills C++ Compiler -- # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" -- ;; -- esac -- ;; -- darwin*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- case $cc_basename in -- xlc*) -- lt_prog_compiler_pic_CXX='-qnocommon' -- lt_prog_compiler_wl_CXX='-Wl,' -- ;; -- esac -- ;; -- dgux*) -- case $cc_basename in -- ec++*) -- lt_prog_compiler_pic_CXX='-KPIC' -- ;; -- ghcx*) -- # Green Hills C++ Compiler -- lt_prog_compiler_pic_CXX='-pic' -- ;; -- *) -- ;; -- esac -- ;; -- freebsd* | kfreebsd*-gnu | dragonfly*) -- # FreeBSD uses GNU C++ -- ;; -- hpux9* | hpux10* | hpux11*) -- case $cc_basename in -- CC*) -- lt_prog_compiler_wl_CXX='-Wl,' -- lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" -- if test "$host_cpu" != ia64; then -- lt_prog_compiler_pic_CXX='+Z' -- fi -- ;; -- aCC*) -- lt_prog_compiler_wl_CXX='-Wl,' -- lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- lt_prog_compiler_pic_CXX='+Z' -- ;; -- esac -- ;; -- *) -- ;; -- esac -- ;; -- irix5* | irix6* | nonstopux*) -- case $cc_basename in -- CC*) -- lt_prog_compiler_wl_CXX='-Wl,' -- lt_prog_compiler_static_CXX='-non_shared' -- # CC pic flag -KPIC is the default. -- ;; -- *) -- ;; -- esac -- ;; -- linux*) -- case $cc_basename in -- KCC*) -- # KAI C++ Compiler -- lt_prog_compiler_wl_CXX='--backend -Wl,' -- lt_prog_compiler_pic_CXX='-fPIC' -- ;; -- icpc* | ecpc*) -- # Intel C++ -- lt_prog_compiler_wl_CXX='-Wl,' -- lt_prog_compiler_pic_CXX='-KPIC' -- lt_prog_compiler_static_CXX='-static' -- ;; -- pgCC*) -- # Portland Group C++ compiler. -- lt_prog_compiler_wl_CXX='-Wl,' -- lt_prog_compiler_pic_CXX='-fpic' -- lt_prog_compiler_static_CXX='-Bstatic' -- ;; -- cxx*) -- # Compaq C++ -- # Make sure the PIC flag is empty. It appears that all Alpha -- # Linux and Compaq Tru64 Unix objects are PIC. -- lt_prog_compiler_pic_CXX= -- lt_prog_compiler_static_CXX='-non_shared' -- ;; -- *) -- ;; -- esac -- ;; -- lynxos*) -- ;; -- m88k*) -- ;; -- mvs*) -- case $cc_basename in -- cxx*) -- lt_prog_compiler_pic_CXX='-W c,exportall' -- ;; -- *) -- ;; -- esac -- ;; -- netbsd*) -- ;; -- osf3* | osf4* | osf5*) -- case $cc_basename in -- KCC*) -- lt_prog_compiler_wl_CXX='--backend -Wl,' -- ;; -- RCC*) -- # Rational C++ 2.4.1 -- lt_prog_compiler_pic_CXX='-pic' -- ;; -- cxx*) -- # Digital/Compaq C++ -- lt_prog_compiler_wl_CXX='-Wl,' -- # Make sure the PIC flag is empty. It appears that all Alpha -- # Linux and Compaq Tru64 Unix objects are PIC. -- lt_prog_compiler_pic_CXX= -- lt_prog_compiler_static_CXX='-non_shared' -- ;; -- *) -- ;; -- esac -- ;; -- psos*) -- ;; -- sco*) -- case $cc_basename in -- CC*) -- lt_prog_compiler_pic_CXX='-fPIC' -- ;; -- *) -- ;; -- esac -- ;; -- solaris*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.2, 5.x and Centerline C++ -- lt_prog_compiler_pic_CXX='-KPIC' -- lt_prog_compiler_static_CXX='-Bstatic' -- lt_prog_compiler_wl_CXX='-Qoption ld ' -- ;; -- gcx*) -- # Green Hills C++ Compiler -- lt_prog_compiler_pic_CXX='-PIC' -- ;; -- *) -- ;; -- esac -- ;; -- sunos4*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.x -- lt_prog_compiler_pic_CXX='-pic' -- lt_prog_compiler_static_CXX='-Bstatic' -- ;; -- lcc*) -- # Lucid -- lt_prog_compiler_pic_CXX='-pic' -- ;; -- *) -- ;; -- esac -- ;; -- tandem*) -- case $cc_basename in -- NCC*) -- # NonStop-UX NCC 3.20 -- lt_prog_compiler_pic_CXX='-KPIC' -- ;; -- *) -- ;; -- esac -- ;; -- unixware*) -- ;; -- vxworks*) -- ;; -- *) -- lt_prog_compiler_can_build_shared_CXX=no -- ;; -- esac -- fi -- --echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 --echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 -- --# --# Check to make sure the PIC flag actually works. --# --if test -n "$lt_prog_compiler_pic_CXX"; then -- --echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 --echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 --if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_prog_compiler_pic_works_CXX=no -- ac_outfile=conftest.$ac_objext -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- # The option is referenced via a variable to avoid confusing sed. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:11206: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>conftest.err) -- ac_status=$? -- cat conftest.err >&5 -- echo "$as_me:11210: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s "$ac_outfile"; then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings other than the usual output. -- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then -- lt_prog_compiler_pic_works_CXX=yes -- fi -- fi -- $rm conftest* -- --fi --echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 --echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 -- --if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then -- case $lt_prog_compiler_pic_CXX in -- "" | " "*) ;; -- *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; -- esac --else -- lt_prog_compiler_pic_CXX= -- lt_prog_compiler_can_build_shared_CXX=no --fi -- --fi --case $host_os in -- # For platforms which do not support PIC, -DPIC is meaningless: -- *djgpp*) -- lt_prog_compiler_pic_CXX= -- ;; -- *) -- lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" -- ;; --esac -- --echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 --echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 --if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_cv_prog_compiler_c_o_CXX=no -- $rm -r conftest 2>/dev/null -- mkdir conftest -- cd conftest -- mkdir out -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- lt_compiler_flag="-o out/conftest2.$ac_objext" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:11268: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>out/conftest.err) -- ac_status=$? -- cat out/conftest.err >&5 -- echo "$as_me:11272: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s out/conftest2.$ac_objext -- then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings -- $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp -- $SED '/^$/d' out/conftest.err >out/conftest.er2 -- if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then -- lt_cv_prog_compiler_c_o_CXX=yes -- fi -- fi -- chmod u+w . 2>&5 -- $rm conftest* -- # SGI C++ compiler will create directory out/ii_files/ for -- # template instantiation -- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files -- $rm out/* && rmdir out -- cd .. -- rmdir conftest -- $rm conftest* -- --fi --echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 --echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 -- -- --hard_links="nottested" --if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then -- # do not overwrite the value of need_locks provided by the user -- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 --echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 -- hard_links=yes -- $rm conftest* -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- touch conftest.a -- ln conftest.a conftest.b 2>&5 || hard_links=no -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- echo "$as_me:$LINENO: result: $hard_links" >&5 --echo "${ECHO_T}$hard_links" >&6 -- if test "$hard_links" = no; then -- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 --echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} -- need_locks=warn -- fi --else -- need_locks=no --fi -- --echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 --echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -- -- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- case $host_os in -- aix4* | aix5*) -- # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then -- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' -- else -- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' -- fi -- ;; -- pw32*) -- export_symbols_cmds_CXX="$ltdll_cmds" -- ;; -- cygwin* | mingw*) -- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -- *) -- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -- esac -- --echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 --echo "${ECHO_T}$ld_shlibs_CXX" >&6 --test "$ld_shlibs_CXX" = no && can_build_shared=no -- --variables_saved_for_relink="PATH $shlibpath_var $runpath_var" --if test "$GCC" = yes; then -- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" --fi -- --# --# Do we need to explicitly link libc? --# --case "x$archive_cmds_need_lc_CXX" in --x|xyes) -- # Assume -lc should be added -- archive_cmds_need_lc_CXX=yes -- -- if test "$enable_shared" = yes && test "$GCC" = yes; then -- case $archive_cmds_CXX in -- *'~'*) -- # FIXME: we may have to deal with multi-command sequences. -- ;; -- '$CC '*) -- # Test whether the compiler implicitly links with -lc since on some -- # systems, -lgcc has to come before -lc. If gcc already passes -lc -- # to ld, don't add -lc before -lgcc. -- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 --echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 -- $rm conftest* -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } 2>conftest.err; then -- soname=conftest -- lib=conftest -- libobjs=conftest.$ac_objext -- deplibs= -- wl=$lt_prog_compiler_wl_CXX -- compiler_flags=-v -- linker_flags=-v -- verstring= -- output_objdir=. -- libname=conftest -- lt_save_allow_undefined_flag=$allow_undefined_flag_CXX -- allow_undefined_flag_CXX= -- if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 -- (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } -- then -- archive_cmds_need_lc_CXX=no -- else -- archive_cmds_need_lc_CXX=yes -- fi -- allow_undefined_flag_CXX=$lt_save_allow_undefined_flag -- else -- cat conftest.err 1>&5 -- fi -- $rm conftest* -- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 --echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 -- ;; -- esac -- fi -- ;; --esac -- --echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 --echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 --library_names_spec= --libname_spec='lib$name' --soname_spec= --shrext_cmds=".so" --postinstall_cmds= --postuninstall_cmds= --finish_cmds= --finish_eval= --shlibpath_var= --shlibpath_overrides_runpath=unknown --version_type=none --dynamic_linker="$host_os ld.so" --sys_lib_dlsearch_path_spec="/lib /usr/lib" --if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then -- # if the path contains ";" then we assume it to be the separator -- # otherwise default to the standard path separator (i.e. ":") - it is -- # assumed that no part of a normal pathname contains ";" but that should -- # okay in the real world where ";" in dirpaths is itself problematic. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi --else -- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" --fi --need_lib_prefix=unknown --hardcode_into_libs=no -- --# when you set need_version to no, make sure it does not cause -set_version --# flags to be left without arguments --need_version=unknown -- --case $host_os in --aix3*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' -- shlibpath_var=LIBPATH -- -- # AIX 3 has no versioning support, so we append a major version to the name. -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- --aix4* | aix5*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- hardcode_into_libs=yes -- if test "$host_cpu" = ia64; then -- # AIX 5 supports IA64 -- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- else -- # With GCC up to 2.95.x, collect2 would create an import file -- # for dependence libraries. The import file would start with -- # the line `#! .'. This would cause the generated library to -- # depend on `.', always an invalid library. This was fixed in -- # development snapshots of GCC prior to 3.0. -- case $host_os in -- aix4 | aix4.[01] | aix4.[01].*) -- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -- echo ' yes ' -- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -- : -- else -- can_build_shared=no -- fi -- ;; -- esac -- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct -- # soname into executable. Probably we can add versioning support to -- # collect2, so additional links can be useful in future. -- if test "$aix_use_runtimelinking" = yes; then -- # If using run time linking (on AIX 4.2 or later) use lib.so -- # instead of lib.a to let people know that these are not -- # typical AIX shared libraries. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- else -- # We preserve .a as extension for shared libraries through AIX4.2 -- # and later when we are not doing run time linking. -- library_names_spec='${libname}${release}.a $libname.a' -- soname_spec='${libname}${release}${shared_ext}$major' -- fi -- shlibpath_var=LIBPATH -- fi -- ;; -- --amigaos*) -- library_names_spec='$libname.ixlibrary $libname.a' -- # Create ${libname}_ixlibrary.a entries in /sys/libs. -- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' -- ;; -- --beos*) -- library_names_spec='${libname}${shared_ext}' -- dynamic_linker="$host_os ld.so" -- shlibpath_var=LIBRARY_PATH -- ;; -- --bsdi[45]*) -- version_type=linux -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -- # the default ld.so.conf also contains /usr/contrib/lib and -- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -- # libtool to hard-code these into programs -- ;; -- --cygwin* | mingw* | pw32*) -- version_type=windows -- shrext_cmds=".dll" -- need_version=no -- need_lib_prefix=no -- -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32*) -- library_names_spec='$libname.dll.a' -- # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ -- dldir=$destdir/`dirname \$dlpath`~ -- test -d \$dldir || mkdir -p \$dldir~ -- $install_prog $dir/$dlname \$dldir/$dlname~ -- chmod a+x \$dldir/$dlname' -- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -- dlpath=$dir/\$dldll~ -- $rm \$dlpath' -- shlibpath_overrides_runpath=yes -- -- case $host_os in -- cygwin*) -- # Cygwin DLLs use 'cyg' prefix rather than 'lib' -- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" -- ;; -- mingw*) -- # MinGW DLLs use traditional 'lib' prefix -- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then -- # It is most probably a Windows format PATH printed by -- # mingw gcc, but we are running on Cygwin. Gcc prints its search -- # path with ; separators, and with drive letters. We can handle the -- # drive letters (cygwin fileutils understands them), so leave them, -- # especially as we might pass files found there to a mingw objdump, -- # which wouldn't understand a cygwinified path. Ahh. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi -- ;; -- pw32*) -- # pw32 DLLs use 'pw' prefix rather than 'lib' -- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- ;; -- esac -- ;; -- -- *) -- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -- ;; -- esac -- dynamic_linker='Win32 ld.exe' -- # FIXME: first we should search . and the directory the executable is in -- shlibpath_var=PATH -- ;; -- --darwin* | rhapsody*) -- dynamic_linker="$host_os dyld" -- version_type=darwin -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -- shlibpath_overrides_runpath=yes -- shlibpath_var=DYLD_LIBRARY_PATH -- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. -- if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` -- else -- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' -- fi -- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' -- ;; -- --dgux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --freebsd1*) -- dynamic_linker=no -- ;; -- --kfreebsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -- ;; -- --freebsd* | dragonfly*) -- # DragonFly does not have aout. When/if they implement a new -- # versioning mechanism, adjust this. -- if test -x /usr/bin/objformat; then -- objformat=`/usr/bin/objformat` -- else -- case $host_os in -- freebsd[123]*) objformat=aout ;; -- *) objformat=elf ;; -- esac -- fi -- version_type=freebsd-$objformat -- case $version_type in -- freebsd-elf*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -- need_version=no -- need_lib_prefix=no -- ;; -- freebsd-*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' -- need_version=yes -- ;; -- esac -- shlibpath_var=LD_LIBRARY_PATH -- case $host_os in -- freebsd2*) -- shlibpath_overrides_runpath=yes -- ;; -- freebsd3.[01]* | freebsdelf3.[01]*) -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- *) # from 3.2 on -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- ;; -- esac -- ;; -- --gnu*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- hardcode_into_libs=yes -- ;; -- --hpux9* | hpux10* | hpux11*) -- # Give a soname corresponding to the major version so that dld.sl refuses to -- # link against other versions. -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- case $host_cpu in -- ia64*) -- shrext_cmds='.so' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.so" -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- if test "X$HPUX_IA64_MODE" = X32; then -- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" -- else -- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" -- fi -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- hppa*64*) -- shrext_cmds='.sl' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- *) -- shrext_cmds='.sl' -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=SHLIB_PATH -- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- esac -- # HP-UX runs *really* slowly unless shared libraries are mode 555. -- postinstall_cmds='chmod 555 $lib' -- ;; -- --irix5* | irix6* | nonstopux*) -- case $host_os in -- nonstopux*) version_type=nonstopux ;; -- *) -- if test "$lt_cv_prog_gnu_ld" = yes; then -- version_type=linux -- else -- version_type=irix -- fi ;; -- esac -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' -- case $host_os in -- irix5* | nonstopux*) -- libsuff= shlibsuff= -- ;; -- *) -- case $LD in # libtool.m4 will add one of these switches to LD -- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") -- libsuff= shlibsuff= libmagic=32-bit;; -- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") -- libsuff=32 shlibsuff=N32 libmagic=N32;; -- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") -- libsuff=64 shlibsuff=64 libmagic=64-bit;; -- *) libsuff= shlibsuff= libmagic=never-match;; -- esac -- ;; -- esac -- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -- hardcode_into_libs=yes -- ;; -- --# No shared lib support for Linux oldld, aout, or coff. --linux*oldld* | linux*aout* | linux*coff*) -- dynamic_linker=no -- ;; -- --# This must be Linux ELF. --linux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- # This implies no fast_install, which is unacceptable. -- # Some rework will be needed to allow for fast_install -- # before this can be enabled. -- hardcode_into_libs=yes -- -- # Append ld.so.conf contents to the search path -- if test -f /etc/ld.so.conf; then -- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -- fi -- -- # We used to test for /lib/ld.so.1 and disable shared libraries on -- # powerpc, because MkLinux only supported shared libraries with the -- # GNU dynamic linker. Since this was broken with cross compilers, -- # most powerpc-linux boxes support dynamic linking these days and -- # people can always --disable-shared, the test was removed, and we -- # assume the GNU/Linux dynamic linker is in use. -- dynamic_linker='GNU/Linux ld.so' -- ;; -- --knetbsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -- ;; -- --netbsd*) -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- dynamic_linker='NetBSD (a.out) ld.so' -- else -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- dynamic_linker='NetBSD ld.elf_so' -- fi -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- --newsos6) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --nto-qnx*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --openbsd*) -- version_type=sunos -- need_lib_prefix=no -- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. -- case $host_os in -- openbsd3.3 | openbsd3.3.*) need_version=yes ;; -- *) need_version=no ;; -- esac -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- case $host_os in -- openbsd2.[89] | openbsd2.[89].*) -- shlibpath_overrides_runpath=no -- ;; -- *) -- shlibpath_overrides_runpath=yes -- ;; -- esac -- else -- shlibpath_overrides_runpath=yes -- fi -- ;; -- --os2*) -- libname_spec='$name' -- shrext_cmds=".dll" -- need_lib_prefix=no -- library_names_spec='$libname${shared_ext} $libname.a' -- dynamic_linker='OS/2 ld.exe' -- shlibpath_var=LIBPATH -- ;; -- --osf3* | osf4* | osf5*) -- version_type=osf -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -- ;; -- --sco3.2v5*) -- version_type=osf -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --solaris*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- # ldd complains unless libraries are executable -- postinstall_cmds='chmod +x $lib' -- ;; -- --sunos4*) -- version_type=sunos -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- if test "$with_gnu_ld" = yes; then -- need_lib_prefix=no -- fi -- need_version=yes -- ;; -- --sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- case $host_vendor in -- sni) -- shlibpath_overrides_runpath=no -- need_lib_prefix=no -- export_dynamic_flag_spec='${wl}-Blargedynsym' -- runpath_var=LD_RUN_PATH -- ;; -- siemens) -- need_lib_prefix=no -- ;; -- motorola) -- need_lib_prefix=no -- need_version=no -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -- ;; -- esac -- ;; -- --sysv4*MP*) -- if test -d /usr/nec ;then -- version_type=linux -- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' -- soname_spec='$libname${shared_ext}.$major' -- shlibpath_var=LD_LIBRARY_PATH -- fi -- ;; -- --uts4*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --*) -- dynamic_linker=no -- ;; --esac --echo "$as_me:$LINENO: result: $dynamic_linker" >&5 --echo "${ECHO_T}$dynamic_linker" >&6 --test "$dynamic_linker" = no && can_build_shared=no -- --echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 --echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 --hardcode_action_CXX= --if test -n "$hardcode_libdir_flag_spec_CXX" || \ -- test -n "$runpath_var_CXX" || \ -- test "X$hardcode_automatic_CXX" = "Xyes" ; then -- -- # We can hardcode non-existant directories. -- if test "$hardcode_direct_CXX" != no && -- # If the only mechanism to avoid hardcoding is shlibpath_var, we -- # have to relink, otherwise we might link with an installed library -- # when we should be linking with a yet-to-be-installed one -- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && -- test "$hardcode_minus_L_CXX" != no; then -- # Linking always hardcodes the temporary library directory. -- hardcode_action_CXX=relink -- else -- # We can link without hardcoding, and we can hardcode nonexisting dirs. -- hardcode_action_CXX=immediate -- fi --else -- # We cannot hardcode anything, or else we can only hardcode existing -- # directories. -- hardcode_action_CXX=unsupported --fi --echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 --echo "${ECHO_T}$hardcode_action_CXX" >&6 -- --if test "$hardcode_action_CXX" = relink; then -- # Fast installation is not supported -- enable_fast_install=no --elif test "$shlibpath_overrides_runpath" = yes || -- test "$enable_shared" = no; then -- # Fast installation is not necessary -- enable_fast_install=needless --fi -- --striplib= --old_striplib= --echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 --echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 --if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -- test -z "$striplib" && striplib="$STRIP --strip-unneeded" -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 --else --# FIXME - insert some real tests, host_os isn't really good enough -- case $host_os in -- darwin*) -- if test -n "$STRIP" ; then -- striplib="$STRIP -x" -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- ;; -- *) -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- ;; -- esac --fi -- --if test "x$enable_dlopen" != xyes; then -- enable_dlopen=unknown -- enable_dlopen_self=unknown -- enable_dlopen_self_static=unknown --else -- lt_cv_dlopen=no -- lt_cv_dlopen_libs= -- -- case $host_os in -- beos*) -- lt_cv_dlopen="load_add_on" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- ;; -- -- mingw* | pw32*) -- lt_cv_dlopen="LoadLibrary" -- lt_cv_dlopen_libs= -- ;; -- -- cygwin*) -- lt_cv_dlopen="dlopen" -- lt_cv_dlopen_libs= -- ;; -- -- darwin*) -- # if libdl is installed we need to link against it -- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 --echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 --if test "${ac_cv_lib_dl_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --int --main () --{ --dlopen (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dl_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dl_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 --echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 --if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" --else -- -- lt_cv_dlopen="dyld" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- --fi -- -- ;; -- -- *) -- echo "$as_me:$LINENO: checking for shl_load" >&5 --echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 --if test "${ac_cv_func_shl_load+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define shl_load to an innocuous variant, in case declares shl_load. -- For example, HP-UX 11i declares gettimeofday. */ --#define shl_load innocuous_shl_load -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char shl_load (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef shl_load -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --{ --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char shl_load (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined (__stub_shl_load) || defined (__stub___shl_load) --choke me --#else --char (*f) () = shl_load; --#endif --#ifdef __cplusplus --} --#endif -- --int --main () --{ --return f != shl_load; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_func_shl_load=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_func_shl_load=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --fi --echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 --echo "${ECHO_T}$ac_cv_func_shl_load" >&6 --if test $ac_cv_func_shl_load = yes; then -- lt_cv_dlopen="shl_load" --else -- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 --echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 --if test "${ac_cv_lib_dld_shl_load+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldld $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char shl_load (); --int --main () --{ --shl_load (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dld_shl_load=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dld_shl_load=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 --echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 --if test $ac_cv_lib_dld_shl_load = yes; then -- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" --else -- echo "$as_me:$LINENO: checking for dlopen" >&5 --echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 --if test "${ac_cv_func_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define dlopen to an innocuous variant, in case declares dlopen. -- For example, HP-UX 11i declares gettimeofday. */ --#define dlopen innocuous_dlopen -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char dlopen (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef dlopen -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --{ --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined (__stub_dlopen) || defined (__stub___dlopen) --choke me --#else --char (*f) () = dlopen; --#endif --#ifdef __cplusplus --} --#endif -- --int --main () --{ --return f != dlopen; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_func_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_func_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --fi --echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 --echo "${ECHO_T}$ac_cv_func_dlopen" >&6 --if test $ac_cv_func_dlopen = yes; then -- lt_cv_dlopen="dlopen" --else -- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 --echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 --if test "${ac_cv_lib_dl_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --int --main () --{ --dlopen (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dl_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dl_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 --echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 --if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" --else -- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 --echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 --if test "${ac_cv_lib_svld_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lsvld $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --int --main () --{ --dlopen (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_svld_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_svld_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 --echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 --if test $ac_cv_lib_svld_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" --else -- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 --echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 --if test "${ac_cv_lib_dld_dld_link+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldld $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dld_link (); --int --main () --{ --dld_link (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dld_dld_link=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dld_dld_link=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 --echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 --if test $ac_cv_lib_dld_dld_link = yes; then -- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" --fi -- -- --fi -- -- --fi -- -- --fi -- -- --fi -- -- --fi -- -- ;; -- esac -- -- if test "x$lt_cv_dlopen" != xno; then -- enable_dlopen=yes -- else -- enable_dlopen=no -- fi -- -- case $lt_cv_dlopen in -- dlopen) -- save_CPPFLAGS="$CPPFLAGS" -- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -- -- save_LDFLAGS="$LDFLAGS" -- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -- -- save_LIBS="$LIBS" -- LIBS="$lt_cv_dlopen_libs $LIBS" -- -- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 --echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 --if test "${lt_cv_dlopen_self+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test "$cross_compiling" = yes; then : -- lt_cv_dlopen_self=cross --else -- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -- lt_status=$lt_dlunknown -- cat > conftest.$ac_ext < --#endif -- --#include -- --#ifdef RTLD_GLOBAL --# define LT_DLGLOBAL RTLD_GLOBAL --#else --# ifdef DL_GLOBAL --# define LT_DLGLOBAL DL_GLOBAL --# else --# define LT_DLGLOBAL 0 --# endif --#endif -- --/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -- find out it does not work in some platform. */ --#ifndef LT_DLLAZY_OR_NOW --# ifdef RTLD_LAZY --# define LT_DLLAZY_OR_NOW RTLD_LAZY --# else --# ifdef DL_LAZY --# define LT_DLLAZY_OR_NOW DL_LAZY --# else --# ifdef RTLD_NOW --# define LT_DLLAZY_OR_NOW RTLD_NOW --# else --# ifdef DL_NOW --# define LT_DLLAZY_OR_NOW DL_NOW --# else --# define LT_DLLAZY_OR_NOW 0 --# endif --# endif --# endif --# endif --#endif -- --#ifdef __cplusplus --extern "C" void exit (int); --#endif -- --void fnord() { int i=42;} --int main () --{ -- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -- int status = $lt_dlunknown; -- -- if (self) -- { -- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -- /* dlclose (self); */ -- } -- -- exit (status); --} --EOF -- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then -- (./conftest; exit; ) >&5 2>/dev/null -- lt_status=$? -- case x$lt_status in -- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; -- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; -- x$lt_unknown|x*) lt_cv_dlopen_self=no ;; -- esac -- else : -- # compilation failed -- lt_cv_dlopen_self=no -- fi --fi --rm -fr conftest* -- -- --fi --echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 --echo "${ECHO_T}$lt_cv_dlopen_self" >&6 -- -- if test "x$lt_cv_dlopen_self" = xyes; then -- LDFLAGS="$LDFLAGS $link_static_flag" -- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 --echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 --if test "${lt_cv_dlopen_self_static+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if test "$cross_compiling" = yes; then : -- lt_cv_dlopen_self_static=cross --else -- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -- lt_status=$lt_dlunknown -- cat > conftest.$ac_ext < --#endif -- --#include -- --#ifdef RTLD_GLOBAL --# define LT_DLGLOBAL RTLD_GLOBAL --#else --# ifdef DL_GLOBAL --# define LT_DLGLOBAL DL_GLOBAL --# else --# define LT_DLGLOBAL 0 --# endif --#endif -- --/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -- find out it does not work in some platform. */ --#ifndef LT_DLLAZY_OR_NOW --# ifdef RTLD_LAZY --# define LT_DLLAZY_OR_NOW RTLD_LAZY --# else --# ifdef DL_LAZY --# define LT_DLLAZY_OR_NOW DL_LAZY --# else --# ifdef RTLD_NOW --# define LT_DLLAZY_OR_NOW RTLD_NOW --# else --# ifdef DL_NOW --# define LT_DLLAZY_OR_NOW DL_NOW --# else --# define LT_DLLAZY_OR_NOW 0 --# endif --# endif --# endif --# endif --#endif -- --#ifdef __cplusplus --extern "C" void exit (int); --#endif -- --void fnord() { int i=42;} --int main () --{ -- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -- int status = $lt_dlunknown; -- -- if (self) -- { -- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -- /* dlclose (self); */ -- } -- -- exit (status); --} --EOF -- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then -- (./conftest; exit; ) >&5 2>/dev/null -- lt_status=$? -- case x$lt_status in -- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; -- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; -- x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; -- esac -- else : -- # compilation failed -- lt_cv_dlopen_self_static=no -- fi --fi --rm -fr conftest* -- -- --fi --echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 --echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 -- fi -- -- CPPFLAGS="$save_CPPFLAGS" -- LDFLAGS="$save_LDFLAGS" -- LIBS="$save_LIBS" -- ;; -- esac -- -- case $lt_cv_dlopen_self in -- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; -- *) enable_dlopen_self=unknown ;; -- esac -- -- case $lt_cv_dlopen_self_static in -- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; -- *) enable_dlopen_self_static=unknown ;; -- esac --fi -- -- --# The else clause should only fire when bootstrapping the --# libtool distribution, otherwise you forgot to ship ltmain.sh --# with your package, and you will get complaints that there are --# no rules to generate ltmain.sh. --if test -f "$ltmain"; then -- # See if we are running on zsh, and set the options which allow our commands through -- # without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST -- fi -- # Now quote all the things that may contain metacharacters while being -- # careful not to overquote the AC_SUBSTed values. We take copies of the -- # variables and quote the copies for generation of the libtool script. -- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ -- SED SHELL STRIP \ -- libname_spec library_names_spec soname_spec extract_expsyms_cmds \ -- old_striplib striplib file_magic_cmd finish_cmds finish_eval \ -- deplibs_check_method reload_flag reload_cmds need_locks \ -- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ -- lt_cv_sys_global_symbol_to_c_name_address \ -- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -- old_postinstall_cmds old_postuninstall_cmds \ -- compiler_CXX \ -- CC_CXX \ -- LD_CXX \ -- lt_prog_compiler_wl_CXX \ -- lt_prog_compiler_pic_CXX \ -- lt_prog_compiler_static_CXX \ -- lt_prog_compiler_no_builtin_flag_CXX \ -- export_dynamic_flag_spec_CXX \ -- thread_safe_flag_spec_CXX \ -- whole_archive_flag_spec_CXX \ -- enable_shared_with_static_runtimes_CXX \ -- old_archive_cmds_CXX \ -- old_archive_from_new_cmds_CXX \ -- predep_objects_CXX \ -- postdep_objects_CXX \ -- predeps_CXX \ -- postdeps_CXX \ -- compiler_lib_search_path_CXX \ -- archive_cmds_CXX \ -- archive_expsym_cmds_CXX \ -- postinstall_cmds_CXX \ -- postuninstall_cmds_CXX \ -- old_archive_from_expsyms_cmds_CXX \ -- allow_undefined_flag_CXX \ -- no_undefined_flag_CXX \ -- export_symbols_cmds_CXX \ -- hardcode_libdir_flag_spec_CXX \ -- hardcode_libdir_flag_spec_ld_CXX \ -- hardcode_libdir_separator_CXX \ -- hardcode_automatic_CXX \ -- module_cmds_CXX \ -- module_expsym_cmds_CXX \ -- lt_cv_prog_compiler_c_o_CXX \ -- exclude_expsyms_CXX \ -- include_expsyms_CXX; do -- -- case $var in -- old_archive_cmds_CXX | \ -- old_archive_from_new_cmds_CXX | \ -- archive_cmds_CXX | \ -- archive_expsym_cmds_CXX | \ -- module_cmds_CXX | \ -- module_expsym_cmds_CXX | \ -- old_archive_from_expsyms_cmds_CXX | \ -- export_symbols_cmds_CXX | \ -- extract_expsyms_cmds | reload_cmds | finish_cmds | \ -- postinstall_cmds | postuninstall_cmds | \ -- old_postinstall_cmds | old_postuninstall_cmds | \ -- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -- # Double-quote double-evaled strings. -- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" -- ;; -- *) -- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" -- ;; -- esac -- done -- -- case $lt_echo in -- *'\$0 --fallback-echo"') -- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` -- ;; -- esac -- --cfgfile="$ofile" -- -- cat <<__EOF__ >> "$cfgfile" --# ### BEGIN LIBTOOL TAG CONFIG: $tagname -- --# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -- --# Shell to use when invoking shell scripts. --SHELL=$lt_SHELL -- --# Whether or not to build shared libraries. --build_libtool_libs=$enable_shared -- --# Whether or not to build static libraries. --build_old_libs=$enable_static -- --# Whether or not to add -lc for building shared libraries. --build_libtool_need_lc=$archive_cmds_need_lc_CXX -- --# Whether or not to disallow shared libs when runtime libs are static --allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX -- --# Whether or not to optimize for fast installation. --fast_install=$enable_fast_install -- --# The host system. --host_alias=$host_alias --host=$host --host_os=$host_os -- --# The build system. --build_alias=$build_alias --build=$build --build_os=$build_os -- --# An echo program that does not interpret backslashes. --echo=$lt_echo -- --# The archiver. --AR=$lt_AR --AR_FLAGS=$lt_AR_FLAGS -- --# A C compiler. --LTCC=$lt_LTCC -- --# A language-specific compiler. --CC=$lt_compiler_CXX -- --# Is the compiler the GNU C compiler? --with_gcc=$GCC_CXX -- --# An ERE matcher. --EGREP=$lt_EGREP -- --# The linker used to build libraries. --LD=$lt_LD_CXX -- --# Whether we need hard or soft links. --LN_S=$lt_LN_S -- --# A BSD-compatible nm program. --NM=$lt_NM -- --# A symbol stripping program --STRIP=$lt_STRIP -- --# Used to examine libraries when file_magic_cmd begins "file" --MAGIC_CMD=$MAGIC_CMD -- --# Used on cygwin: DLL creation program. --DLLTOOL="$DLLTOOL" -- --# Used on cygwin: object dumper. --OBJDUMP="$OBJDUMP" -- --# Used on cygwin: assembler. --AS="$AS" -- --# The name of the directory that contains temporary libtool files. --objdir=$objdir -- --# How to create reloadable object files. --reload_flag=$lt_reload_flag --reload_cmds=$lt_reload_cmds -- --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl_CXX -- --# Object file suffix (normally "o"). --objext="$ac_objext" -- --# Old archive suffix (normally "a"). --libext="$libext" -- --# Shared library suffix (normally ".so"). --shrext_cmds='$shrext_cmds' -- --# Executable file suffix (normally ""). --exeext="$exeext" -- --# Additional compiler flags for building library objects. --pic_flag=$lt_lt_prog_compiler_pic_CXX --pic_mode=$pic_mode -- --# What is the maximum length of a command? --max_cmd_len=$lt_cv_sys_max_cmd_len -- --# Does compiler simultaneously support -c and -o options? --compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX -- --# Must we lock files when doing compilation? --need_locks=$lt_need_locks -- --# Do we need the lib prefix for modules? --need_lib_prefix=$need_lib_prefix -- --# Do we need a version for libraries? --need_version=$need_version -- --# Whether dlopen is supported. --dlopen_support=$enable_dlopen -- --# Whether dlopen of programs is supported. --dlopen_self=$enable_dlopen_self -- --# Whether dlopen of statically linked programs is supported. --dlopen_self_static=$enable_dlopen_self_static -- --# Compiler flag to prevent dynamic linking. --link_static_flag=$lt_lt_prog_compiler_static_CXX -- --# Compiler flag to turn off builtin functions. --no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -- --# Compiler flag to allow reflexive dlopens. --export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX -- --# Compiler flag to generate shared objects directly from archives. --whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX -- --# Compiler flag to generate thread-safe objects. --thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX -- --# Library versioning type. --version_type=$version_type -- --# Format of library name prefix. --libname_spec=$lt_libname_spec -- --# List of archive names. First name is the real one, the rest are links. --# The last name is the one that the linker finds with -lNAME. --library_names_spec=$lt_library_names_spec -- --# The coded name of the library, if different from the real name. --soname_spec=$lt_soname_spec -- --# Commands used to build and install an old-style archive. --RANLIB=$lt_RANLIB --old_archive_cmds=$lt_old_archive_cmds_CXX --old_postinstall_cmds=$lt_old_postinstall_cmds --old_postuninstall_cmds=$lt_old_postuninstall_cmds -- --# Create an old-style archive from a shared archive. --old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX -- --# Create a temporary old-style archive to link instead of a shared archive. --old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX -- --# Commands used to build and install a shared archive. --archive_cmds=$lt_archive_cmds_CXX --archive_expsym_cmds=$lt_archive_expsym_cmds_CXX --postinstall_cmds=$lt_postinstall_cmds --postuninstall_cmds=$lt_postuninstall_cmds -- --# Commands used to build a loadable module (assumed same as above if empty) --module_cmds=$lt_module_cmds_CXX --module_expsym_cmds=$lt_module_expsym_cmds_CXX -- --# Commands to strip libraries. --old_striplib=$lt_old_striplib --striplib=$lt_striplib -- --# Dependencies to place before the objects being linked to create a --# shared library. --predep_objects=$lt_predep_objects_CXX -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdep_objects=$lt_postdep_objects_CXX -- --# Dependencies to place before the objects being linked to create a --# shared library. --predeps=$lt_predeps_CXX -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdeps=$lt_postdeps_CXX -- --# The library search path used internally by the compiler when linking --# a shared library. --compiler_lib_search_path=$lt_compiler_lib_search_path_CXX -- --# Method to check whether dependent libraries are shared objects. --deplibs_check_method=$lt_deplibs_check_method -- --# Command to use when deplibs_check_method == file_magic. --file_magic_cmd=$lt_file_magic_cmd -- --# Flag that allows shared libraries with undefined symbols to be built. --allow_undefined_flag=$lt_allow_undefined_flag_CXX -- --# Flag that forces no undefined symbols. --no_undefined_flag=$lt_no_undefined_flag_CXX -- --# Commands used to finish a libtool library installation in a directory. --finish_cmds=$lt_finish_cmds -- --# Same as above, but a single script fragment to be evaled but not shown. --finish_eval=$lt_finish_eval -- --# Take the output of nm and produce a listing of raw symbols and C names. --global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -- --# Transform the output of nm in a proper C declaration --global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -- --# Transform the output of nm in a C name address pair --global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -- --# This is the shared library runtime path variable. --runpath_var=$runpath_var -- --# This is the shared library path variable. --shlibpath_var=$shlibpath_var -- --# Is shlibpath searched before the hard-coded library search path? --shlibpath_overrides_runpath=$shlibpath_overrides_runpath -- --# How to hardcode a shared library path into an executable. --hardcode_action=$hardcode_action_CXX -- --# Whether we should hardcode library paths into libraries. --hardcode_into_libs=$hardcode_into_libs -- --# Flag to hardcode \$libdir into a binary during linking. --# This must work even if \$libdir does not exist. --hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -- --# If ld is used when linking, flag to hardcode \$libdir into --# a binary during linking. This must work even if \$libdir does --# not exist. --hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX -- --# Whether we need a single -rpath flag with a separated argument. --hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -- --# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the --# resulting binary. --hardcode_direct=$hardcode_direct_CXX -- --# Set to yes if using the -LDIR flag during linking hardcodes DIR into the --# resulting binary. --hardcode_minus_L=$hardcode_minus_L_CXX -- --# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into --# the resulting binary. --hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX -- --# Set to yes if building a shared library automatically hardcodes DIR into the library --# and all subsequent libraries and executables linked against it. --hardcode_automatic=$hardcode_automatic_CXX -- --# Variables whose values should be saved in libtool wrapper scripts and --# restored at relink time. --variables_saved_for_relink="$variables_saved_for_relink" -- --# Whether libtool must link a program against all its dependency libraries. --link_all_deplibs=$link_all_deplibs_CXX -- --# Compile-time system search path for libraries --sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -- --# Run-time system search path for libraries --sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -- --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path="$fix_srcfile_path_CXX" -- --# Set to yes if exported symbols are required. --always_export_symbols=$always_export_symbols_CXX -- --# The commands to list exported symbols. --export_symbols_cmds=$lt_export_symbols_cmds_CXX -- --# The commands to extract the exported symbol list from a shared archive. --extract_expsyms_cmds=$lt_extract_expsyms_cmds -- --# Symbols that should not be listed in the preloaded symbols. --exclude_expsyms=$lt_exclude_expsyms_CXX -- --# Symbols that must always be exported. --include_expsyms=$lt_include_expsyms_CXX -- --# ### END LIBTOOL TAG CONFIG: $tagname -- --__EOF__ -- -- --else -- # If there is no Makefile yet, we rely on a make rule to execute -- # `config.status --recheck' to rerun these tests and create the -- # libtool script then. -- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` -- if test -f "$ltmain_in"; then -- test -f Makefile && make "$ltmain" -- fi --fi -- -- --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- --CC=$lt_save_CC --LDCXX=$LD --LD=$lt_save_LD --GCC=$lt_save_GCC --with_gnu_ldcxx=$with_gnu_ld --with_gnu_ld=$lt_save_with_gnu_ld --lt_cv_path_LDCXX=$lt_cv_path_LD --lt_cv_path_LD=$lt_save_path_LD --lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld --lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -- -- else -- tagname="" -- fi -- ;; -- -- F77) -- if test -n "$F77" && test "X$F77" != "Xno"; then -- --ac_ext=f --ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' --ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_f77_compiler_gnu -- -- --archive_cmds_need_lc_F77=no --allow_undefined_flag_F77= --always_export_symbols_F77=no --archive_expsym_cmds_F77= --export_dynamic_flag_spec_F77= --hardcode_direct_F77=no --hardcode_libdir_flag_spec_F77= --hardcode_libdir_flag_spec_ld_F77= --hardcode_libdir_separator_F77= --hardcode_minus_L_F77=no --hardcode_automatic_F77=no --module_cmds_F77= --module_expsym_cmds_F77= --link_all_deplibs_F77=unknown --old_archive_cmds_F77=$old_archive_cmds --no_undefined_flag_F77= --whole_archive_flag_spec_F77= --enable_shared_with_static_runtimes_F77=no -- --# Source file extension for f77 test sources. --ac_ext=f -- --# Object file extension for compiled f77 test sources. --objext=o --objext_F77=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code=" subroutine t\n return\n end\n" -- --# Code to be used in simple link tests --lt_simple_link_test_code=" program t\n end\n" -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. -- --# If no C compiler was specified, use CC. --LTCC=${LTCC-"$CC"} -- --# Allow CC to be a program name with arguments. --compiler=$CC -- -- --# save warnings/boilerplate of simple test code --ac_outfile=conftest.$ac_objext --printf "$lt_simple_compile_test_code" >conftest.$ac_ext --eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_compiler_boilerplate=`cat conftest.err` --$rm conftest* -- --ac_outfile=conftest.$ac_objext --printf "$lt_simple_link_test_code" >conftest.$ac_ext --eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_linker_boilerplate=`cat conftest.err` --$rm conftest* -- -- --# Allow CC to be a program name with arguments. --lt_save_CC="$CC" --CC=${F77-"f77"} --compiler=$CC --compiler_F77=$CC --for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -- -- --echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 --echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 --echo "$as_me:$LINENO: result: $can_build_shared" >&5 --echo "${ECHO_T}$can_build_shared" >&6 -- --echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 --echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 --test "$can_build_shared" = "no" && enable_shared=no -- --# On AIX, shared libraries and static libraries use the same namespace, and --# are all built from PIC. --case $host_os in --aix3*) -- test "$enable_shared" = yes && enable_static=no -- if test -n "$RANLIB"; then -- archive_cmds="$archive_cmds~\$RANLIB \$lib" -- postinstall_cmds='$RANLIB $lib' -- fi -- ;; --aix4* | aix5*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -- fi -- ;; --esac --echo "$as_me:$LINENO: result: $enable_shared" >&5 --echo "${ECHO_T}$enable_shared" >&6 -- --echo "$as_me:$LINENO: checking whether to build static libraries" >&5 --echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 --# Make sure either enable_shared or enable_static is yes. --test "$enable_shared" = yes || enable_static=yes --echo "$as_me:$LINENO: result: $enable_static" >&5 --echo "${ECHO_T}$enable_static" >&6 -- --test "$ld_shlibs_F77" = no && can_build_shared=no -- --GCC_F77="$G77" --LD_F77="$LD" -- --lt_prog_compiler_wl_F77= --lt_prog_compiler_pic_F77= --lt_prog_compiler_static_F77= -- --echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 --echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 -- -- if test "$GCC" = yes; then -- lt_prog_compiler_wl_F77='-Wl,' -- lt_prog_compiler_static_F77='-static' -- -- case $host_os in -- aix*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- lt_prog_compiler_static_F77='-Bstatic' -- fi -- ;; -- -- amigaos*) -- # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -- lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' -- ;; -- -- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -- # PIC is the default for these OSes. -- ;; -- -- mingw* | pw32* | os2*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- lt_prog_compiler_pic_F77='-DDLL_EXPORT' -- ;; -- -- darwin* | rhapsody*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- lt_prog_compiler_pic_F77='-fno-common' -- ;; -- -- msdosdjgpp*) -- # Just because we use GCC doesn't mean we suddenly get shared libraries -- # on systems that don't support them. -- lt_prog_compiler_can_build_shared_F77=no -- enable_shared=no -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec; then -- lt_prog_compiler_pic_F77=-Kconform_pic -- fi -- ;; -- -- hpux*) -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- lt_prog_compiler_pic_F77='-fPIC' -- ;; -- esac -- ;; -- -- *) -- lt_prog_compiler_pic_F77='-fPIC' -- ;; -- esac -- else -- # PORTME Check for flag to pass linker flags through the system compiler. -- case $host_os in -- aix*) -- lt_prog_compiler_wl_F77='-Wl,' -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- lt_prog_compiler_static_F77='-Bstatic' -- else -- lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' -- fi -- ;; -- darwin*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- case $cc_basename in -- xlc*) -- lt_prog_compiler_pic_F77='-qnocommon' -- lt_prog_compiler_wl_F77='-Wl,' -- ;; -- esac -- ;; -- -- mingw* | pw32* | os2*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- lt_prog_compiler_pic_F77='-DDLL_EXPORT' -- ;; -- -- hpux9* | hpux10* | hpux11*) -- lt_prog_compiler_wl_F77='-Wl,' -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- lt_prog_compiler_pic_F77='+Z' -- ;; -- esac -- # Is there a better lt_prog_compiler_static that works with the bundled CC? -- lt_prog_compiler_static_F77='${wl}-a ${wl}archive' -- ;; -- -- irix5* | irix6* | nonstopux*) -- lt_prog_compiler_wl_F77='-Wl,' -- # PIC (with -KPIC) is the default. -- lt_prog_compiler_static_F77='-non_shared' -- ;; -- -- newsos6) -- lt_prog_compiler_pic_F77='-KPIC' -- lt_prog_compiler_static_F77='-Bstatic' -- ;; -- -- linux*) -- case $cc_basename in -- icc* | ecc*) -- lt_prog_compiler_wl_F77='-Wl,' -- lt_prog_compiler_pic_F77='-KPIC' -- lt_prog_compiler_static_F77='-static' -- ;; -- pgcc* | pgf77* | pgf90* | pgf95*) -- # Portland Group compilers (*not* the Pentium gcc compiler, -- # which looks to be a dead project) -- lt_prog_compiler_wl_F77='-Wl,' -- lt_prog_compiler_pic_F77='-fpic' -- lt_prog_compiler_static_F77='-Bstatic' -- ;; -- ccc*) -- lt_prog_compiler_wl_F77='-Wl,' -- # All Alpha code is PIC. -- lt_prog_compiler_static_F77='-non_shared' -- ;; -- esac -- ;; -- -- osf3* | osf4* | osf5*) -- lt_prog_compiler_wl_F77='-Wl,' -- # All OSF/1 code is PIC. -- lt_prog_compiler_static_F77='-non_shared' -- ;; -- -- sco3.2v5*) -- lt_prog_compiler_pic_F77='-Kpic' -- lt_prog_compiler_static_F77='-dn' -- ;; -- -- solaris*) -- lt_prog_compiler_pic_F77='-KPIC' -- lt_prog_compiler_static_F77='-Bstatic' -- case $cc_basename in -- f77* | f90* | f95*) -- lt_prog_compiler_wl_F77='-Qoption ld ';; -- *) -- lt_prog_compiler_wl_F77='-Wl,';; -- esac -- ;; -- -- sunos4*) -- lt_prog_compiler_wl_F77='-Qoption ld ' -- lt_prog_compiler_pic_F77='-PIC' -- lt_prog_compiler_static_F77='-Bstatic' -- ;; -- -- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- lt_prog_compiler_wl_F77='-Wl,' -- lt_prog_compiler_pic_F77='-KPIC' -- lt_prog_compiler_static_F77='-Bstatic' -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec ;then -- lt_prog_compiler_pic_F77='-Kconform_pic' -- lt_prog_compiler_static_F77='-Bstatic' -- fi -- ;; -- -- unicos*) -- lt_prog_compiler_wl_F77='-Wl,' -- lt_prog_compiler_can_build_shared_F77=no -- ;; -- -- uts4*) -- lt_prog_compiler_pic_F77='-pic' -- lt_prog_compiler_static_F77='-Bstatic' -- ;; -- -- *) -- lt_prog_compiler_can_build_shared_F77=no -- ;; -- esac -- fi -- --echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 --echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 -- --# --# Check to make sure the PIC flag actually works. --# --if test -n "$lt_prog_compiler_pic_F77"; then -- --echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 --echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 --if test "${lt_prog_compiler_pic_works_F77+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_prog_compiler_pic_works_F77=no -- ac_outfile=conftest.$ac_objext -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="$lt_prog_compiler_pic_F77" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- # The option is referenced via a variable to avoid confusing sed. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13628: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>conftest.err) -- ac_status=$? -- cat conftest.err >&5 -- echo "$as_me:13632: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s "$ac_outfile"; then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings other than the usual output. -- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then -- lt_prog_compiler_pic_works_F77=yes -- fi -- fi -- $rm conftest* -- --fi --echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 --echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 -- --if test x"$lt_prog_compiler_pic_works_F77" = xyes; then -- case $lt_prog_compiler_pic_F77 in -- "" | " "*) ;; -- *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; -- esac --else -- lt_prog_compiler_pic_F77= -- lt_prog_compiler_can_build_shared_F77=no --fi -- --fi --case $host_os in -- # For platforms which do not support PIC, -DPIC is meaningless: -- *djgpp*) -- lt_prog_compiler_pic_F77= -- ;; -- *) -- lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" -- ;; --esac -- --echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 --echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 --if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_cv_prog_compiler_c_o_F77=no -- $rm -r conftest 2>/dev/null -- mkdir conftest -- cd conftest -- mkdir out -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- lt_compiler_flag="-o out/conftest2.$ac_objext" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13690: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>out/conftest.err) -- ac_status=$? -- cat out/conftest.err >&5 -- echo "$as_me:13694: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s out/conftest2.$ac_objext -- then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings -- $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp -- $SED '/^$/d' out/conftest.err >out/conftest.er2 -- if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then -- lt_cv_prog_compiler_c_o_F77=yes -- fi -- fi -- chmod u+w . 2>&5 -- $rm conftest* -- # SGI C++ compiler will create directory out/ii_files/ for -- # template instantiation -- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files -- $rm out/* && rmdir out -- cd .. -- rmdir conftest -- $rm conftest* -- --fi --echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 --echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 -- -- --hard_links="nottested" --if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then -- # do not overwrite the value of need_locks provided by the user -- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 --echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 -- hard_links=yes -- $rm conftest* -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- touch conftest.a -- ln conftest.a conftest.b 2>&5 || hard_links=no -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- echo "$as_me:$LINENO: result: $hard_links" >&5 --echo "${ECHO_T}$hard_links" >&6 -- if test "$hard_links" = no; then -- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 --echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} -- need_locks=warn -- fi --else -- need_locks=no --fi -- --echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 --echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -- -- runpath_var= -- allow_undefined_flag_F77= -- enable_shared_with_static_runtimes_F77=no -- archive_cmds_F77= -- archive_expsym_cmds_F77= -- old_archive_From_new_cmds_F77= -- old_archive_from_expsyms_cmds_F77= -- export_dynamic_flag_spec_F77= -- whole_archive_flag_spec_F77= -- thread_safe_flag_spec_F77= -- hardcode_libdir_flag_spec_F77= -- hardcode_libdir_flag_spec_ld_F77= -- hardcode_libdir_separator_F77= -- hardcode_direct_F77=no -- hardcode_minus_L_F77=no -- hardcode_shlibpath_var_F77=unsupported -- link_all_deplibs_F77=unknown -- hardcode_automatic_F77=no -- module_cmds_F77= -- module_expsym_cmds_F77= -- always_export_symbols_F77=no -- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- # include_expsyms should be a list of space-separated symbols to be *always* -- # included in the symbol list -- include_expsyms_F77= -- # exclude_expsyms can be an extended regexp of symbols to exclude -- # it will be wrapped by ` (' and `)$', so one must not match beginning or -- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -- # as well as any symbol that contains `d'. -- exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" -- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -- # platforms (ab)use it in PIC code, but their linkers get confused if -- # the symbol is explicitly referenced. Since portable code cannot -- # rely on this symbol name, it's probably fine to never include it in -- # preloaded symbol tables. -- extract_expsyms_cmds= -- # Just being paranoid about ensuring that cc_basename is set. -- for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -- -- case $host_os in -- cygwin* | mingw* | pw32*) -- # FIXME: the MSVC++ port hasn't been tested in a loooong time -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- if test "$GCC" != yes; then -- with_gnu_ld=no -- fi -- ;; -- openbsd*) -- with_gnu_ld=no -- ;; -- esac -- -- ld_shlibs_F77=yes -- if test "$with_gnu_ld" = yes; then -- # If archive_cmds runs LD, not CC, wlarc should be empty -- wlarc='${wl}' -- -- # Set some defaults for GNU ld with shared library support. These -- # are reset later if shared libraries are not supported. Putting them -- # here allows them to be overridden if necessary. -- runpath_var=LD_RUN_PATH -- hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' -- export_dynamic_flag_spec_F77='${wl}--export-dynamic' -- # ancient GNU ld didn't support --whole-archive et. al. -- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then -- whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- else -- whole_archive_flag_spec_F77= -- fi -- supports_anon_versioning=no -- case `$LD -v 2>/dev/null` in -- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 -- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... -- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... -- *\ 2.11.*) ;; # other 2.11 versions -- *) supports_anon_versioning=yes ;; -- esac -- -- # See if GNU ld supports shared libraries. -- case $host_os in -- aix3* | aix4* | aix5*) -- # On AIX/PPC, the GNU linker is very broken -- if test "$host_cpu" != ia64; then -- ld_shlibs_F77=no -- cat <&2 -- --*** Warning: the GNU linker, at least up to release 2.9.1, is reported --*** to be unable to reliably create shared libraries on AIX. --*** Therefore, libtool is disabling shared libraries support. If you --*** really care for shared libraries, you may want to modify your PATH --*** so that a non-GNU linker is found, and then restart. -- --EOF -- fi -- ;; -- -- amigaos*) -- archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- hardcode_libdir_flag_spec_F77='-L$libdir' -- hardcode_minus_L_F77=yes -- -- # Samuel A. Falvo II reports -- # that the semantics of dynamic libraries on AmigaOS, at least up -- # to version 4, is to share data among multiple programs linked -- # with the same dynamic library. Since this doesn't match the -- # behavior of shared libraries on other platforms, we can't use -- # them. -- ld_shlibs_F77=no -- ;; -- -- beos*) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- allow_undefined_flag_F77=unsupported -- # Joseph Beckenbach says some releases of gcc -- # support --undefined. This deserves some investigation. FIXME -- archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- else -- ld_shlibs_F77=no -- fi -- ;; -- -- cygwin* | mingw* | pw32*) -- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, -- # as there is no search path for DLLs. -- hardcode_libdir_flag_spec_F77='-L$libdir' -- allow_undefined_flag_F77=unsupported -- always_export_symbols_F77=no -- enable_shared_with_static_runtimes_F77=yes -- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' -- -- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then -- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- else -- ld_shlibs_F77=no -- fi -- ;; -- -- linux*) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- tmp_addflag= -- case $cc_basename,$host_cpu in -- pgcc*) # Portland Group C compiler -- whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag' -- ;; -- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers -- whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag -Mnomain' ;; -- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 -- tmp_addflag=' -i_dynamic' ;; -- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 -- tmp_addflag=' -i_dynamic -nofor_main' ;; -- ifc* | ifort*) # Intel Fortran compiler -- tmp_addflag=' -nofor_main' ;; -- esac -- archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- -- if test $supports_anon_versioning = yes; then -- archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- $echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -- fi -- else -- ld_shlibs_F77=no -- fi -- ;; -- -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -- wlarc= -- else -- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- fi -- ;; -- -- solaris* | sysv5*) -- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then -- ld_shlibs_F77=no -- cat <&2 -- --*** Warning: The releases 2.8.* of the GNU linker cannot reliably --*** create shared libraries on Solaris systems. Therefore, libtool --*** is disabling shared libraries support. We urge you to upgrade GNU --*** binutils to release 2.9.1 or newer. Another option is to modify --*** your PATH or compiler configuration so that the native linker is --*** used, and then restart. -- --EOF -- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- ld_shlibs_F77=no -- fi -- ;; -- -- sunos4*) -- archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- wlarc= -- hardcode_direct_F77=yes -- hardcode_shlibpath_var_F77=no -- ;; -- -- *) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- ld_shlibs_F77=no -- fi -- ;; -- esac -- -- if test "$ld_shlibs_F77" = no; then -- runpath_var= -- hardcode_libdir_flag_spec_F77= -- export_dynamic_flag_spec_F77= -- whole_archive_flag_spec_F77= -- fi -- else -- # PORTME fill in a description of your system's linker (not GNU ld) -- case $host_os in -- aix3*) -- allow_undefined_flag_F77=unsupported -- always_export_symbols_F77=yes -- archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -- # Note: this linker hardcodes the directories in LIBPATH if there -- # are no directories specified by -L. -- hardcode_minus_L_F77=yes -- if test "$GCC" = yes && test -z "$link_static_flag"; then -- # Neither direct hardcoding nor static linking is supported with a -- # broken collect2. -- hardcode_direct_F77=unsupported -- fi -- ;; -- -- aix4* | aix5*) -- if test "$host_cpu" = ia64; then -- # On IA64, the linker does run time linking by default, so we don't -- # have to do anything special. -- aix_use_runtimelinking=no -- exp_sym_flag='-Bexport' -- no_entry_flag="" -- else -- # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then -- export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' -- else -- export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' -- fi -- aix_use_runtimelinking=no -- -- # Test if we are trying to use run time linking or normal -- # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -- case $host_os in aix4.[23]|aix4.[23].*|aix5*) -- for ld_flag in $LDFLAGS; do -- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then -- aix_use_runtimelinking=yes -- break -- fi -- done -- esac -- -- exp_sym_flag='-bexport' -- no_entry_flag='-bnoentry' -- fi -- -- # When large executables or shared objects are built, AIX ld can -- # have problems creating the table of contents. If linking a library -- # or program results in "error TOC overflow" add -mminimal-toc to -- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -- -- archive_cmds_F77='' -- hardcode_direct_F77=yes -- hardcode_libdir_separator_F77=':' -- link_all_deplibs_F77=yes -- -- if test "$GCC" = yes; then -- case $host_os in aix4.[012]|aix4.[012].*) -- # We only want to do this on AIX 4.2 and lower, the check -- # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -- if test -f "$collect2name" && \ -- strings "$collect2name" | grep resolve_lib_name >/dev/null -- then -- # We have reworked collect2 -- hardcode_direct_F77=yes -- else -- # We have old collect2 -- hardcode_direct_F77=unsupported -- # It fails to find uninstalled libraries when the uninstalled -- # path is not listed in the libpath. Setting hardcode_minus_L -- # to unsupported forces relinking -- hardcode_minus_L_F77=yes -- hardcode_libdir_flag_spec_F77='-L$libdir' -- hardcode_libdir_separator_F77= -- fi -- esac -- shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -- fi -- else -- # not using gcc -- if test "$host_cpu" = ia64; then -- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release -- # chokes on -Wl,-G. The following line is correct: -- shared_flag='-G' -- else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -- else -- shared_flag='${wl}-bM:SRE' -- fi -- fi -- fi -- -- # It seems that -bexpall does not export symbols beginning with -- # underscore (_), so it is better to generate a list of symbols to export. -- always_export_symbols_F77=yes -- if test "$aix_use_runtimelinking" = yes; then -- # Warning - without using the other runtime loading flags (-brtl), -- # -berok will link without error, but may produce a broken library. -- allow_undefined_flag_F77='-berok' -- # Determine the default libpath from the value encoded in an empty executable. -- cat >conftest.$ac_ext <<_ACEOF -- program main -- -- end --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_f77_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- -- hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" -- archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -- else -- if test "$host_cpu" = ia64; then -- hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' -- allow_undefined_flag_F77="-z nodefs" -- archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -- else -- # Determine the default libpath from the value encoded in an empty executable. -- cat >conftest.$ac_ext <<_ACEOF -- program main -- -- end --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_f77_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- -- hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" -- # Warning - without using the other run time loading flags, -- # -berok will link without error, but may produce a broken library. -- no_undefined_flag_F77=' ${wl}-bernotok' -- allow_undefined_flag_F77=' ${wl}-berok' -- # -bexpall does not export symbols beginning with underscore (_) -- always_export_symbols_F77=yes -- # Exported symbols can be pulled into shared objects from archives -- whole_archive_flag_spec_F77=' ' -- archive_cmds_need_lc_F77=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -- fi -- fi -- ;; -- -- amigaos*) -- archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- hardcode_libdir_flag_spec_F77='-L$libdir' -- hardcode_minus_L_F77=yes -- # see comment about different semantics on the GNU ld section -- ld_shlibs_F77=no -- ;; -- -- bsdi[45]*) -- export_dynamic_flag_spec_F77=-rdynamic -- ;; -- -- cygwin* | mingw* | pw32*) -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- # hardcode_libdir_flag_spec is actually meaningless, as there is -- # no search path for DLLs. -- hardcode_libdir_flag_spec_F77=' ' -- allow_undefined_flag_F77=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_From_new_cmds_F77='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path_F77='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes_F77=yes -- ;; -- -- darwin* | rhapsody*) -- case $host_os in -- rhapsody* | darwin1.[012]) -- allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' -- ;; -- *) # Darwin 1.3 on -- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then -- allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- else -- case ${MACOSX_DEPLOYMENT_TARGET} in -- 10.[012]) -- allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- ;; -- 10.*) -- allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' -- ;; -- esac -- fi -- ;; -- esac -- archive_cmds_need_lc_F77=no -- hardcode_direct_F77=no -- hardcode_automatic_F77=yes -- hardcode_shlibpath_var_F77=unsupported -- whole_archive_flag_spec_F77='' -- link_all_deplibs_F77=yes -- if test "$GCC" = yes ; then -- output_verbose_link_cmd='echo' -- archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' -- module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- else -- case $cc_basename in -- xlc*) -- output_verbose_link_cmd='echo' -- archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' -- module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- ;; -- *) -- ld_shlibs_F77=no -- ;; -- esac -- fi -- ;; -- -- dgux*) -- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec_F77='-L$libdir' -- hardcode_shlibpath_var_F77=no -- ;; -- -- freebsd1*) -- ld_shlibs_F77=no -- ;; -- -- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -- # support. Future versions do this automatically, but an explicit c++rt0.o -- # does not break anything, and helps significantly (at the cost of a little -- # extra space). -- freebsd2.2*) -- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -- hardcode_libdir_flag_spec_F77='-R$libdir' -- hardcode_direct_F77=yes -- hardcode_shlibpath_var_F77=no -- ;; -- -- # Unfortunately, older versions of FreeBSD 2 do not have this feature. -- freebsd2*) -- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_F77=yes -- hardcode_minus_L_F77=yes -- hardcode_shlibpath_var_F77=no -- ;; -- -- # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -- freebsd* | kfreebsd*-gnu | dragonfly*) -- archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -- hardcode_libdir_flag_spec_F77='-R$libdir' -- hardcode_direct_F77=yes -- hardcode_shlibpath_var_F77=no -- ;; -- -- hpux9*) -- if test "$GCC" = yes; then -- archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- else -- archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- fi -- hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' -- hardcode_libdir_separator_F77=: -- hardcode_direct_F77=yes -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L_F77=yes -- export_dynamic_flag_spec_F77='${wl}-E' -- ;; -- -- hpux10* | hpux11*) -- if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*|ia64*) -- archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- *) -- archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- esac -- else -- case $host_cpu in -- hppa*64*|ia64*) -- archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -- ;; -- *) -- archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -- ;; -- esac -- fi -- if test "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*) -- hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld_F77='+b $libdir' -- hardcode_libdir_separator_F77=: -- hardcode_direct_F77=no -- hardcode_shlibpath_var_F77=no -- ;; -- ia64*) -- hardcode_libdir_flag_spec_F77='-L$libdir' -- hardcode_direct_F77=no -- hardcode_shlibpath_var_F77=no -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L_F77=yes -- ;; -- *) -- hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' -- hardcode_libdir_separator_F77=: -- hardcode_direct_F77=yes -- export_dynamic_flag_spec_F77='${wl}-E' -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L_F77=yes -- ;; -- esac -- fi -- ;; -- -- irix5* | irix6* | nonstopux*) -- if test "$GCC" = yes; then -- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' -- fi -- hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_F77=: -- link_all_deplibs_F77=yes -- ;; -- -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -- else -- archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -- fi -- hardcode_libdir_flag_spec_F77='-R$libdir' -- hardcode_direct_F77=yes -- hardcode_shlibpath_var_F77=no -- ;; -- -- newsos6) -- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_F77=yes -- hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_F77=: -- hardcode_shlibpath_var_F77=no -- ;; -- -- openbsd*) -- hardcode_direct_F77=yes -- hardcode_shlibpath_var_F77=no -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' -- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' -- export_dynamic_flag_spec_F77='${wl}-E' -- else -- case $host_os in -- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) -- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec_F77='-R$libdir' -- ;; -- *) -- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' -- ;; -- esac -- fi -- ;; -- -- os2*) -- hardcode_libdir_flag_spec_F77='-L$libdir' -- hardcode_minus_L_F77=yes -- allow_undefined_flag_F77=unsupported -- archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -- old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -- ;; -- -- osf3*) -- if test "$GCC" = yes; then -- allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- allow_undefined_flag_F77=' -expect_unresolved \*' -- archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- fi -- hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_F77=: -- ;; -- -- osf4* | osf5*) # as osf3* with the addition of -msym flag -- if test "$GCC" = yes; then -- allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' -- else -- allow_undefined_flag_F77=' -expect_unresolved \*' -- archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' -- -- # Both c and cxx compiler support -rpath directly -- hardcode_libdir_flag_spec_F77='-rpath $libdir' -- fi -- hardcode_libdir_separator_F77=: -- ;; -- -- sco3.2v5*) -- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var_F77=no -- export_dynamic_flag_spec_F77='${wl}-Bexport' -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- ;; -- -- solaris*) -- no_undefined_flag_F77=' -z text' -- if test "$GCC" = yes; then -- wlarc='${wl}' -- archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' -- else -- wlarc='' -- archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -- fi -- hardcode_libdir_flag_spec_F77='-R$libdir' -- hardcode_shlibpath_var_F77=no -- case $host_os in -- solaris2.[0-5] | solaris2.[0-5].*) ;; -- *) -- # The compiler driver will combine linker options so we -- # cannot just pass the convience library names through -- # without $wl, iff we do not link with $LD. -- # Luckily, gcc supports the same syntax we need for Sun Studio. -- # Supported since Solaris 2.6 (maybe 2.5.1?) -- case $wlarc in -- '') -- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; -- *) -- whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; -- esac ;; -- esac -- link_all_deplibs_F77=yes -- ;; -- -- sunos4*) -- if test "x$host_vendor" = xsequent; then -- # Use $CC to link under sequent, because it throws in some extra .o -- # files that make .init and .fini sections work. -- archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -- fi -- hardcode_libdir_flag_spec_F77='-L$libdir' -- hardcode_direct_F77=yes -- hardcode_minus_L_F77=yes -- hardcode_shlibpath_var_F77=no -- ;; -- -- sysv4) -- case $host_vendor in -- sni) -- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_F77=yes # is this really true??? -- ;; -- siemens) -- ## LD is ld it makes a PLAMLIB -- ## CC just makes a GrossModule. -- archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- reload_cmds_F77='$CC -r -o $output$reload_objs' -- hardcode_direct_F77=no -- ;; -- motorola) -- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie -- ;; -- esac -- runpath_var='LD_RUN_PATH' -- hardcode_shlibpath_var_F77=no -- ;; -- -- sysv4.3*) -- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var_F77=no -- export_dynamic_flag_spec_F77='-Bexport' -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec; then -- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var_F77=no -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- ld_shlibs_F77=yes -- fi -- ;; -- -- sysv4.2uw2*) -- archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_F77=yes -- hardcode_minus_L_F77=no -- hardcode_shlibpath_var_F77=no -- hardcode_runpath_var=yes -- runpath_var=LD_RUN_PATH -- ;; -- -- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) -- no_undefined_flag_F77='${wl}-z ${wl}text' -- if test "$GCC" = yes; then -- archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- fi -- runpath_var='LD_RUN_PATH' -- hardcode_shlibpath_var_F77=no -- ;; -- -- sysv5*) -- no_undefined_flag_F77=' -z text' -- # $CC -shared without GNU ld will not create a library from C++ -- # object files and a static libstdc++, better avoid it by now -- archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -- hardcode_libdir_flag_spec_F77= -- hardcode_shlibpath_var_F77=no -- runpath_var='LD_RUN_PATH' -- ;; -- -- uts4*) -- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec_F77='-L$libdir' -- hardcode_shlibpath_var_F77=no -- ;; -- -- *) -- ld_shlibs_F77=no -- ;; -- esac -- fi -- --echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 --echo "${ECHO_T}$ld_shlibs_F77" >&6 --test "$ld_shlibs_F77" = no && can_build_shared=no -- --variables_saved_for_relink="PATH $shlibpath_var $runpath_var" --if test "$GCC" = yes; then -- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" --fi -- --# --# Do we need to explicitly link libc? --# --case "x$archive_cmds_need_lc_F77" in --x|xyes) -- # Assume -lc should be added -- archive_cmds_need_lc_F77=yes -- -- if test "$enable_shared" = yes && test "$GCC" = yes; then -- case $archive_cmds_F77 in -- *'~'*) -- # FIXME: we may have to deal with multi-command sequences. -- ;; -- '$CC '*) -- # Test whether the compiler implicitly links with -lc since on some -- # systems, -lgcc has to come before -lc. If gcc already passes -lc -- # to ld, don't add -lc before -lgcc. -- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 --echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 -- $rm conftest* -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } 2>conftest.err; then -- soname=conftest -- lib=conftest -- libobjs=conftest.$ac_objext -- deplibs= -- wl=$lt_prog_compiler_wl_F77 -- compiler_flags=-v -- linker_flags=-v -- verstring= -- output_objdir=. -- libname=conftest -- lt_save_allow_undefined_flag=$allow_undefined_flag_F77 -- allow_undefined_flag_F77= -- if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 -- (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } -- then -- archive_cmds_need_lc_F77=no -- else -- archive_cmds_need_lc_F77=yes -- fi -- allow_undefined_flag_F77=$lt_save_allow_undefined_flag -- else -- cat conftest.err 1>&5 -- fi -- $rm conftest* -- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 --echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 -- ;; -- esac -- fi -- ;; --esac -- --echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 --echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 --library_names_spec= --libname_spec='lib$name' --soname_spec= --shrext_cmds=".so" --postinstall_cmds= --postuninstall_cmds= --finish_cmds= --finish_eval= --shlibpath_var= --shlibpath_overrides_runpath=unknown --version_type=none --dynamic_linker="$host_os ld.so" --sys_lib_dlsearch_path_spec="/lib /usr/lib" --if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then -- # if the path contains ";" then we assume it to be the separator -- # otherwise default to the standard path separator (i.e. ":") - it is -- # assumed that no part of a normal pathname contains ";" but that should -- # okay in the real world where ";" in dirpaths is itself problematic. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi --else -- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" --fi --need_lib_prefix=unknown --hardcode_into_libs=no -- --# when you set need_version to no, make sure it does not cause -set_version --# flags to be left without arguments --need_version=unknown -- --case $host_os in --aix3*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' -- shlibpath_var=LIBPATH -- -- # AIX 3 has no versioning support, so we append a major version to the name. -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- --aix4* | aix5*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- hardcode_into_libs=yes -- if test "$host_cpu" = ia64; then -- # AIX 5 supports IA64 -- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- else -- # With GCC up to 2.95.x, collect2 would create an import file -- # for dependence libraries. The import file would start with -- # the line `#! .'. This would cause the generated library to -- # depend on `.', always an invalid library. This was fixed in -- # development snapshots of GCC prior to 3.0. -- case $host_os in -- aix4 | aix4.[01] | aix4.[01].*) -- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -- echo ' yes ' -- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -- : -- else -- can_build_shared=no -- fi -- ;; -- esac -- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct -- # soname into executable. Probably we can add versioning support to -- # collect2, so additional links can be useful in future. -- if test "$aix_use_runtimelinking" = yes; then -- # If using run time linking (on AIX 4.2 or later) use lib.so -- # instead of lib.a to let people know that these are not -- # typical AIX shared libraries. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- else -- # We preserve .a as extension for shared libraries through AIX4.2 -- # and later when we are not doing run time linking. -- library_names_spec='${libname}${release}.a $libname.a' -- soname_spec='${libname}${release}${shared_ext}$major' -- fi -- shlibpath_var=LIBPATH -- fi -- ;; -- --amigaos*) -- library_names_spec='$libname.ixlibrary $libname.a' -- # Create ${libname}_ixlibrary.a entries in /sys/libs. -- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' -- ;; -- --beos*) -- library_names_spec='${libname}${shared_ext}' -- dynamic_linker="$host_os ld.so" -- shlibpath_var=LIBRARY_PATH -- ;; -- --bsdi[45]*) -- version_type=linux -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -- # the default ld.so.conf also contains /usr/contrib/lib and -- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -- # libtool to hard-code these into programs -- ;; -- --cygwin* | mingw* | pw32*) -- version_type=windows -- shrext_cmds=".dll" -- need_version=no -- need_lib_prefix=no -- -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32*) -- library_names_spec='$libname.dll.a' -- # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ -- dldir=$destdir/`dirname \$dlpath`~ -- test -d \$dldir || mkdir -p \$dldir~ -- $install_prog $dir/$dlname \$dldir/$dlname~ -- chmod a+x \$dldir/$dlname' -- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -- dlpath=$dir/\$dldll~ -- $rm \$dlpath' -- shlibpath_overrides_runpath=yes -- -- case $host_os in -- cygwin*) -- # Cygwin DLLs use 'cyg' prefix rather than 'lib' -- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" -- ;; -- mingw*) -- # MinGW DLLs use traditional 'lib' prefix -- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then -- # It is most probably a Windows format PATH printed by -- # mingw gcc, but we are running on Cygwin. Gcc prints its search -- # path with ; separators, and with drive letters. We can handle the -- # drive letters (cygwin fileutils understands them), so leave them, -- # especially as we might pass files found there to a mingw objdump, -- # which wouldn't understand a cygwinified path. Ahh. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi -- ;; -- pw32*) -- # pw32 DLLs use 'pw' prefix rather than 'lib' -- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- ;; -- esac -- ;; -- -- *) -- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -- ;; -- esac -- dynamic_linker='Win32 ld.exe' -- # FIXME: first we should search . and the directory the executable is in -- shlibpath_var=PATH -- ;; -- --darwin* | rhapsody*) -- dynamic_linker="$host_os dyld" -- version_type=darwin -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -- shlibpath_overrides_runpath=yes -- shlibpath_var=DYLD_LIBRARY_PATH -- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. -- if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` -- else -- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' -- fi -- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' -- ;; -- --dgux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --freebsd1*) -- dynamic_linker=no -- ;; -- --kfreebsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -- ;; -- --freebsd* | dragonfly*) -- # DragonFly does not have aout. When/if they implement a new -- # versioning mechanism, adjust this. -- if test -x /usr/bin/objformat; then -- objformat=`/usr/bin/objformat` -- else -- case $host_os in -- freebsd[123]*) objformat=aout ;; -- *) objformat=elf ;; -- esac -- fi -- version_type=freebsd-$objformat -- case $version_type in -- freebsd-elf*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -- need_version=no -- need_lib_prefix=no -- ;; -- freebsd-*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' -- need_version=yes -- ;; -- esac -- shlibpath_var=LD_LIBRARY_PATH -- case $host_os in -- freebsd2*) -- shlibpath_overrides_runpath=yes -- ;; -- freebsd3.[01]* | freebsdelf3.[01]*) -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- *) # from 3.2 on -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- ;; -- esac -- ;; -- --gnu*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- hardcode_into_libs=yes -- ;; -- --hpux9* | hpux10* | hpux11*) -- # Give a soname corresponding to the major version so that dld.sl refuses to -- # link against other versions. -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- case $host_cpu in -- ia64*) -- shrext_cmds='.so' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.so" -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- if test "X$HPUX_IA64_MODE" = X32; then -- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" -- else -- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" -- fi -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- hppa*64*) -- shrext_cmds='.sl' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- *) -- shrext_cmds='.sl' -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=SHLIB_PATH -- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- esac -- # HP-UX runs *really* slowly unless shared libraries are mode 555. -- postinstall_cmds='chmod 555 $lib' -- ;; -- --irix5* | irix6* | nonstopux*) -- case $host_os in -- nonstopux*) version_type=nonstopux ;; -- *) -- if test "$lt_cv_prog_gnu_ld" = yes; then -- version_type=linux -- else -- version_type=irix -- fi ;; -- esac -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' -- case $host_os in -- irix5* | nonstopux*) -- libsuff= shlibsuff= -- ;; -- *) -- case $LD in # libtool.m4 will add one of these switches to LD -- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") -- libsuff= shlibsuff= libmagic=32-bit;; -- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") -- libsuff=32 shlibsuff=N32 libmagic=N32;; -- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") -- libsuff=64 shlibsuff=64 libmagic=64-bit;; -- *) libsuff= shlibsuff= libmagic=never-match;; -- esac -- ;; -- esac -- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -- hardcode_into_libs=yes -- ;; -- --# No shared lib support for Linux oldld, aout, or coff. --linux*oldld* | linux*aout* | linux*coff*) -- dynamic_linker=no -- ;; -- --# This must be Linux ELF. --linux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- # This implies no fast_install, which is unacceptable. -- # Some rework will be needed to allow for fast_install -- # before this can be enabled. -- hardcode_into_libs=yes -- -- # Append ld.so.conf contents to the search path -- if test -f /etc/ld.so.conf; then -- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -- fi -- -- # We used to test for /lib/ld.so.1 and disable shared libraries on -- # powerpc, because MkLinux only supported shared libraries with the -- # GNU dynamic linker. Since this was broken with cross compilers, -- # most powerpc-linux boxes support dynamic linking these days and -- # people can always --disable-shared, the test was removed, and we -- # assume the GNU/Linux dynamic linker is in use. -- dynamic_linker='GNU/Linux ld.so' -- ;; -- --knetbsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -- ;; -- --netbsd*) -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- dynamic_linker='NetBSD (a.out) ld.so' -- else -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- dynamic_linker='NetBSD ld.elf_so' -- fi -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- --newsos6) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --nto-qnx*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --openbsd*) -- version_type=sunos -- need_lib_prefix=no -- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. -- case $host_os in -- openbsd3.3 | openbsd3.3.*) need_version=yes ;; -- *) need_version=no ;; -- esac -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- case $host_os in -- openbsd2.[89] | openbsd2.[89].*) -- shlibpath_overrides_runpath=no -- ;; -- *) -- shlibpath_overrides_runpath=yes -- ;; -- esac -- else -- shlibpath_overrides_runpath=yes -- fi -- ;; -- --os2*) -- libname_spec='$name' -- shrext_cmds=".dll" -- need_lib_prefix=no -- library_names_spec='$libname${shared_ext} $libname.a' -- dynamic_linker='OS/2 ld.exe' -- shlibpath_var=LIBPATH -- ;; -- --osf3* | osf4* | osf5*) -- version_type=osf -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -- ;; -- --sco3.2v5*) -- version_type=osf -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --solaris*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- # ldd complains unless libraries are executable -- postinstall_cmds='chmod +x $lib' -- ;; -- --sunos4*) -- version_type=sunos -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- if test "$with_gnu_ld" = yes; then -- need_lib_prefix=no -- fi -- need_version=yes -- ;; -- --sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- case $host_vendor in -- sni) -- shlibpath_overrides_runpath=no -- need_lib_prefix=no -- export_dynamic_flag_spec='${wl}-Blargedynsym' -- runpath_var=LD_RUN_PATH -- ;; -- siemens) -- need_lib_prefix=no -- ;; -- motorola) -- need_lib_prefix=no -- need_version=no -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -- ;; -- esac -- ;; -- --sysv4*MP*) -- if test -d /usr/nec ;then -- version_type=linux -- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' -- soname_spec='$libname${shared_ext}.$major' -- shlibpath_var=LD_LIBRARY_PATH -- fi -- ;; -- --uts4*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --*) -- dynamic_linker=no -- ;; --esac --echo "$as_me:$LINENO: result: $dynamic_linker" >&5 --echo "${ECHO_T}$dynamic_linker" >&6 --test "$dynamic_linker" = no && can_build_shared=no -- --echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 --echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 --hardcode_action_F77= --if test -n "$hardcode_libdir_flag_spec_F77" || \ -- test -n "$runpath_var_F77" || \ -- test "X$hardcode_automatic_F77" = "Xyes" ; then -- -- # We can hardcode non-existant directories. -- if test "$hardcode_direct_F77" != no && -- # If the only mechanism to avoid hardcoding is shlibpath_var, we -- # have to relink, otherwise we might link with an installed library -- # when we should be linking with a yet-to-be-installed one -- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && -- test "$hardcode_minus_L_F77" != no; then -- # Linking always hardcodes the temporary library directory. -- hardcode_action_F77=relink -- else -- # We can link without hardcoding, and we can hardcode nonexisting dirs. -- hardcode_action_F77=immediate -- fi --else -- # We cannot hardcode anything, or else we can only hardcode existing -- # directories. -- hardcode_action_F77=unsupported --fi --echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 --echo "${ECHO_T}$hardcode_action_F77" >&6 -- --if test "$hardcode_action_F77" = relink; then -- # Fast installation is not supported -- enable_fast_install=no --elif test "$shlibpath_overrides_runpath" = yes || -- test "$enable_shared" = no; then -- # Fast installation is not necessary -- enable_fast_install=needless --fi -- --striplib= --old_striplib= --echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 --echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 --if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -- test -z "$striplib" && striplib="$STRIP --strip-unneeded" -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 --else --# FIXME - insert some real tests, host_os isn't really good enough -- case $host_os in -- darwin*) -- if test -n "$STRIP" ; then -- striplib="$STRIP -x" -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- ;; -- *) -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- ;; -- esac --fi -- -- -- --# The else clause should only fire when bootstrapping the --# libtool distribution, otherwise you forgot to ship ltmain.sh --# with your package, and you will get complaints that there are --# no rules to generate ltmain.sh. --if test -f "$ltmain"; then -- # See if we are running on zsh, and set the options which allow our commands through -- # without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST -- fi -- # Now quote all the things that may contain metacharacters while being -- # careful not to overquote the AC_SUBSTed values. We take copies of the -- # variables and quote the copies for generation of the libtool script. -- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ -- SED SHELL STRIP \ -- libname_spec library_names_spec soname_spec extract_expsyms_cmds \ -- old_striplib striplib file_magic_cmd finish_cmds finish_eval \ -- deplibs_check_method reload_flag reload_cmds need_locks \ -- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ -- lt_cv_sys_global_symbol_to_c_name_address \ -- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -- old_postinstall_cmds old_postuninstall_cmds \ -- compiler_F77 \ -- CC_F77 \ -- LD_F77 \ -- lt_prog_compiler_wl_F77 \ -- lt_prog_compiler_pic_F77 \ -- lt_prog_compiler_static_F77 \ -- lt_prog_compiler_no_builtin_flag_F77 \ -- export_dynamic_flag_spec_F77 \ -- thread_safe_flag_spec_F77 \ -- whole_archive_flag_spec_F77 \ -- enable_shared_with_static_runtimes_F77 \ -- old_archive_cmds_F77 \ -- old_archive_from_new_cmds_F77 \ -- predep_objects_F77 \ -- postdep_objects_F77 \ -- predeps_F77 \ -- postdeps_F77 \ -- compiler_lib_search_path_F77 \ -- archive_cmds_F77 \ -- archive_expsym_cmds_F77 \ -- postinstall_cmds_F77 \ -- postuninstall_cmds_F77 \ -- old_archive_from_expsyms_cmds_F77 \ -- allow_undefined_flag_F77 \ -- no_undefined_flag_F77 \ -- export_symbols_cmds_F77 \ -- hardcode_libdir_flag_spec_F77 \ -- hardcode_libdir_flag_spec_ld_F77 \ -- hardcode_libdir_separator_F77 \ -- hardcode_automatic_F77 \ -- module_cmds_F77 \ -- module_expsym_cmds_F77 \ -- lt_cv_prog_compiler_c_o_F77 \ -- exclude_expsyms_F77 \ -- include_expsyms_F77; do -- -- case $var in -- old_archive_cmds_F77 | \ -- old_archive_from_new_cmds_F77 | \ -- archive_cmds_F77 | \ -- archive_expsym_cmds_F77 | \ -- module_cmds_F77 | \ -- module_expsym_cmds_F77 | \ -- old_archive_from_expsyms_cmds_F77 | \ -- export_symbols_cmds_F77 | \ -- extract_expsyms_cmds | reload_cmds | finish_cmds | \ -- postinstall_cmds | postuninstall_cmds | \ -- old_postinstall_cmds | old_postuninstall_cmds | \ -- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -- # Double-quote double-evaled strings. -- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" -- ;; -- *) -- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" -- ;; -- esac -- done -- -- case $lt_echo in -- *'\$0 --fallback-echo"') -- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` -- ;; -- esac -- --cfgfile="$ofile" -- -- cat <<__EOF__ >> "$cfgfile" --# ### BEGIN LIBTOOL TAG CONFIG: $tagname -- --# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -- --# Shell to use when invoking shell scripts. --SHELL=$lt_SHELL -- --# Whether or not to build shared libraries. --build_libtool_libs=$enable_shared -- --# Whether or not to build static libraries. --build_old_libs=$enable_static -- --# Whether or not to add -lc for building shared libraries. --build_libtool_need_lc=$archive_cmds_need_lc_F77 -- --# Whether or not to disallow shared libs when runtime libs are static --allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 -- --# Whether or not to optimize for fast installation. --fast_install=$enable_fast_install -- --# The host system. --host_alias=$host_alias --host=$host --host_os=$host_os -- --# The build system. --build_alias=$build_alias --build=$build --build_os=$build_os -- --# An echo program that does not interpret backslashes. --echo=$lt_echo -- --# The archiver. --AR=$lt_AR --AR_FLAGS=$lt_AR_FLAGS -- --# A C compiler. --LTCC=$lt_LTCC -- --# A language-specific compiler. --CC=$lt_compiler_F77 -- --# Is the compiler the GNU C compiler? --with_gcc=$GCC_F77 -- --# An ERE matcher. --EGREP=$lt_EGREP -- --# The linker used to build libraries. --LD=$lt_LD_F77 -- --# Whether we need hard or soft links. --LN_S=$lt_LN_S -- --# A BSD-compatible nm program. --NM=$lt_NM -- --# A symbol stripping program --STRIP=$lt_STRIP -- --# Used to examine libraries when file_magic_cmd begins "file" --MAGIC_CMD=$MAGIC_CMD -- --# Used on cygwin: DLL creation program. --DLLTOOL="$DLLTOOL" -- --# Used on cygwin: object dumper. --OBJDUMP="$OBJDUMP" -- --# Used on cygwin: assembler. --AS="$AS" -- --# The name of the directory that contains temporary libtool files. --objdir=$objdir -- --# How to create reloadable object files. --reload_flag=$lt_reload_flag --reload_cmds=$lt_reload_cmds -- --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl_F77 -- --# Object file suffix (normally "o"). --objext="$ac_objext" -- --# Old archive suffix (normally "a"). --libext="$libext" -- --# Shared library suffix (normally ".so"). --shrext_cmds='$shrext_cmds' -- --# Executable file suffix (normally ""). --exeext="$exeext" -- --# Additional compiler flags for building library objects. --pic_flag=$lt_lt_prog_compiler_pic_F77 --pic_mode=$pic_mode -- --# What is the maximum length of a command? --max_cmd_len=$lt_cv_sys_max_cmd_len -- --# Does compiler simultaneously support -c and -o options? --compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 -- --# Must we lock files when doing compilation? --need_locks=$lt_need_locks -- --# Do we need the lib prefix for modules? --need_lib_prefix=$need_lib_prefix -- --# Do we need a version for libraries? --need_version=$need_version -- --# Whether dlopen is supported. --dlopen_support=$enable_dlopen -- --# Whether dlopen of programs is supported. --dlopen_self=$enable_dlopen_self -- --# Whether dlopen of statically linked programs is supported. --dlopen_self_static=$enable_dlopen_self_static -- --# Compiler flag to prevent dynamic linking. --link_static_flag=$lt_lt_prog_compiler_static_F77 -- --# Compiler flag to turn off builtin functions. --no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -- --# Compiler flag to allow reflexive dlopens. --export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 -- --# Compiler flag to generate shared objects directly from archives. --whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 -- --# Compiler flag to generate thread-safe objects. --thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 -- --# Library versioning type. --version_type=$version_type -- --# Format of library name prefix. --libname_spec=$lt_libname_spec -- --# List of archive names. First name is the real one, the rest are links. --# The last name is the one that the linker finds with -lNAME. --library_names_spec=$lt_library_names_spec -- --# The coded name of the library, if different from the real name. --soname_spec=$lt_soname_spec -- --# Commands used to build and install an old-style archive. --RANLIB=$lt_RANLIB --old_archive_cmds=$lt_old_archive_cmds_F77 --old_postinstall_cmds=$lt_old_postinstall_cmds --old_postuninstall_cmds=$lt_old_postuninstall_cmds -- --# Create an old-style archive from a shared archive. --old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 -- --# Create a temporary old-style archive to link instead of a shared archive. --old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 -- --# Commands used to build and install a shared archive. --archive_cmds=$lt_archive_cmds_F77 --archive_expsym_cmds=$lt_archive_expsym_cmds_F77 --postinstall_cmds=$lt_postinstall_cmds --postuninstall_cmds=$lt_postuninstall_cmds -- --# Commands used to build a loadable module (assumed same as above if empty) --module_cmds=$lt_module_cmds_F77 --module_expsym_cmds=$lt_module_expsym_cmds_F77 -- --# Commands to strip libraries. --old_striplib=$lt_old_striplib --striplib=$lt_striplib -- --# Dependencies to place before the objects being linked to create a --# shared library. --predep_objects=$lt_predep_objects_F77 -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdep_objects=$lt_postdep_objects_F77 -- --# Dependencies to place before the objects being linked to create a --# shared library. --predeps=$lt_predeps_F77 -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdeps=$lt_postdeps_F77 -- --# The library search path used internally by the compiler when linking --# a shared library. --compiler_lib_search_path=$lt_compiler_lib_search_path_F77 -- --# Method to check whether dependent libraries are shared objects. --deplibs_check_method=$lt_deplibs_check_method -- --# Command to use when deplibs_check_method == file_magic. --file_magic_cmd=$lt_file_magic_cmd -- --# Flag that allows shared libraries with undefined symbols to be built. --allow_undefined_flag=$lt_allow_undefined_flag_F77 -- --# Flag that forces no undefined symbols. --no_undefined_flag=$lt_no_undefined_flag_F77 -- --# Commands used to finish a libtool library installation in a directory. --finish_cmds=$lt_finish_cmds -- --# Same as above, but a single script fragment to be evaled but not shown. --finish_eval=$lt_finish_eval -- --# Take the output of nm and produce a listing of raw symbols and C names. --global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -- --# Transform the output of nm in a proper C declaration --global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -- --# Transform the output of nm in a C name address pair --global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -- --# This is the shared library runtime path variable. --runpath_var=$runpath_var -- --# This is the shared library path variable. --shlibpath_var=$shlibpath_var -- --# Is shlibpath searched before the hard-coded library search path? --shlibpath_overrides_runpath=$shlibpath_overrides_runpath -- --# How to hardcode a shared library path into an executable. --hardcode_action=$hardcode_action_F77 -- --# Whether we should hardcode library paths into libraries. --hardcode_into_libs=$hardcode_into_libs -- --# Flag to hardcode \$libdir into a binary during linking. --# This must work even if \$libdir does not exist. --hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 -- --# If ld is used when linking, flag to hardcode \$libdir into --# a binary during linking. This must work even if \$libdir does --# not exist. --hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 -- --# Whether we need a single -rpath flag with a separated argument. --hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 -- --# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the --# resulting binary. --hardcode_direct=$hardcode_direct_F77 -- --# Set to yes if using the -LDIR flag during linking hardcodes DIR into the --# resulting binary. --hardcode_minus_L=$hardcode_minus_L_F77 -- --# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into --# the resulting binary. --hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 -- --# Set to yes if building a shared library automatically hardcodes DIR into the library --# and all subsequent libraries and executables linked against it. --hardcode_automatic=$hardcode_automatic_F77 -- --# Variables whose values should be saved in libtool wrapper scripts and --# restored at relink time. --variables_saved_for_relink="$variables_saved_for_relink" -- --# Whether libtool must link a program against all its dependency libraries. --link_all_deplibs=$link_all_deplibs_F77 -- --# Compile-time system search path for libraries --sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -- --# Run-time system search path for libraries --sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -- --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path="$fix_srcfile_path_F77" -+fi -+fi -+STRIP=$ac_cv_prog_STRIP -+if test -n "$STRIP"; then -+ echo "$as_me:$LINENO: result: $STRIP" >&5 -+echo "${ECHO_T}$STRIP" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi - --# Set to yes if exported symbols are required. --always_export_symbols=$always_export_symbols_F77 -+fi -+if test -z "$ac_cv_prog_STRIP"; then -+ ac_ct_STRIP=$STRIP -+ # Extract the first word of "strip", so it can be a program name with args. -+set dummy strip; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$ac_ct_STRIP"; then -+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_STRIP="strip" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done - --# The commands to list exported symbols. --export_symbols_cmds=$lt_export_symbols_cmds_F77 -+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -+fi -+fi -+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -+if test -n "$ac_ct_STRIP"; then -+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -+echo "${ECHO_T}$ac_ct_STRIP" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi - --# The commands to extract the exported symbol list from a shared archive. --extract_expsyms_cmds=$lt_extract_expsyms_cmds -+ STRIP=$ac_ct_STRIP -+else -+ STRIP="$ac_cv_prog_STRIP" -+fi - --# Symbols that should not be listed in the preloaded symbols. --exclude_expsyms=$lt_exclude_expsyms_F77 - --# Symbols that must always be exported. --include_expsyms=$lt_include_expsyms_F77 -+enable_dlopen=no -+enable_win32_dll=no - --# ### END LIBTOOL TAG CONFIG: $tagname -+# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -+if test "${enable_libtool_lock+set}" = set; then -+ enableval="$enable_libtool_lock" - --__EOF__ -+fi; -+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -+# Some flags need to be propagated to the compiler or linker for good -+# libtool support. -+case $host in -+*-*-irix6*) -+ # Find out which ABI we are using. -+ echo '#line 4708 "configure"' > conftest.$ac_ext -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *32-bit*) -+ LD="${LD-ld} -32" -+ ;; -+ *N32*) -+ LD="${LD-ld} -n32" -+ ;; -+ *64-bit*) -+ LD="${LD-ld} -64" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; - -+*-*-sco3.2v5*) -+ # On SCO OpenServer 5, we need -belf to get full-featured binaries. -+ SAVE_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -belf" -+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 -+if test "${lt_cv_cc_needs_belf+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- # If there is no Makefile yet, we rely on a make rule to execute -- # `config.status --recheck' to rerun these tests and create the -- # libtool script then. -- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` -- if test -f "$ltmain_in"; then -- test -f Makefile && make "$ltmain" -- fi --fi - - --ac_ext=c -+ ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - --CC="$lt_save_CC" -- -- else -- tagname="" -- fi -- ;; -- -- GCJ) -- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - -+int -+main () -+{ - -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ lt_cv_cc_needs_belf=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --# Source file extension for Java test sources. --ac_ext=java -+lt_cv_cc_needs_belf=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu - --# Object file extension for compiled Java test sources. --objext=o --objext_GCJ=$objext -+fi -+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 -+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then -+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -+ CFLAGS="$SAVE_CFLAGS" -+ fi -+ ;; - --# Code to be used in simple compile tests --lt_simple_compile_test_code="class foo {}\n" - --# Code to be used in simple link tests --lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' -+esac - --# ltmain only uses $CC for tagged configurations so make sure $CC is set. -+# Sed substitution that helps us do robust quoting. It backslashifies -+# metacharacters that are still active within double-quoted strings. -+Xsed='sed -e s/^X//' -+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - --# If no C compiler was specified, use CC. --LTCC=${LTCC-"$CC"} -+# Same as above, but do not quote variable references. -+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - --# Allow CC to be a program name with arguments. --compiler=$CC -+# Sed substitution to delay expansion of an escaped shell variable in a -+# double_quote_subst'ed string. -+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -+# Constants: -+rm="rm -f" - --# save warnings/boilerplate of simple test code --ac_outfile=conftest.$ac_objext --printf "$lt_simple_compile_test_code" >conftest.$ac_ext --eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_compiler_boilerplate=`cat conftest.err` --$rm conftest* -- --ac_outfile=conftest.$ac_objext --printf "$lt_simple_link_test_code" >conftest.$ac_ext --eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_linker_boilerplate=`cat conftest.err` --$rm conftest* -+# Global variables: -+default_ofile=libtool -+can_build_shared=yes - -+# All known linkers require a `.a' archive for static linking (except M$VC, -+# which needs '.lib'). -+libext=a -+ltmain="$ac_aux_dir/ltmain.sh" -+ofile="$default_ofile" -+with_gnu_ld="$lt_cv_prog_gnu_ld" -+need_locks="$enable_libtool_lock" - --# Allow CC to be a program name with arguments. --lt_save_CC="$CC" --CC=${GCJ-"gcj"} --compiler=$CC --compiler_GCJ=$CC --for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -+old_CC="$CC" -+old_CFLAGS="$CFLAGS" - -+# Set sane defaults for various variables -+test -z "$AR" && AR=ar -+test -z "$AR_FLAGS" && AR_FLAGS=cru -+test -z "$AS" && AS=as -+test -z "$CC" && CC=cc -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+test -z "$LD" && LD=ld -+test -z "$LN_S" && LN_S="ln -s" -+test -z "$MAGIC_CMD" && MAGIC_CMD=file -+test -z "$NM" && NM=nm -+test -z "$OBJDUMP" && OBJDUMP=objdump -+test -z "$RANLIB" && RANLIB=: -+test -z "$STRIP" && STRIP=: -+test -z "$ac_objext" && ac_objext=o - --# GCJ did not exist at the time GCC didn't implicitly link libc in. --archive_cmds_need_lc_GCJ=no -+if test x"$host" != x"$build"; then -+ ac_tool_prefix=${host_alias}- -+else -+ ac_tool_prefix= -+fi - --old_archive_cmds_GCJ=$old_archive_cmds -+# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -+case $host_os in -+linux-gnu*) ;; -+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -+esac - -+case $host_os in -+aix3*) -+ # AIX sometimes has problems with the GCC collect2 program. For some -+ # reason, if we set the COLLECT_NAMES environment variable, the problems -+ # vanish in a puff of smoke. -+ if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+ fi -+ ;; -+esac - --lt_prog_compiler_no_builtin_flag_GCJ= -+# Determine commands to create old-style static archives. -+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -+old_postinstall_cmds='chmod 644 $oldlib' -+old_postuninstall_cmds= - --if test "$GCC" = yes; then -- lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' -+if test -n "$RANLIB"; then -+ case $host_os in -+ openbsd*) -+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" -+ ;; -+ *) -+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -+ ;; -+ esac -+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -+fi - -+# Allow CC to be a program name with arguments. -+set dummy $CC -+compiler="$2" - --echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 --echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 --if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking for objdir" >&5 -+echo $ECHO_N "checking for objdir... $ECHO_C" >&6 -+rm -f .libs 2>/dev/null -+mkdir .libs 2>/dev/null -+if test -d .libs; then -+ objdir=.libs - else -- lt_cv_prog_compiler_rtti_exceptions=no -- ac_outfile=conftest.$ac_objext -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="-fno-rtti -fno-exceptions" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- # The option is referenced via a variable to avoid confusing sed. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:15820: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>conftest.err) -- ac_status=$? -- cat conftest.err >&5 -- echo "$as_me:15824: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s "$ac_outfile"; then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings other than the usual output. -- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then -- lt_cv_prog_compiler_rtti_exceptions=yes -- fi -- fi -- $rm conftest* -- -+ # MS-DOS does not allow filenames that begin with a dot. -+ objdir=_libs - fi --echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 --echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 -+rmdir .libs 2>/dev/null -+echo "$as_me:$LINENO: result: $objdir" >&5 -+echo "${ECHO_T}$objdir" >&6 - --if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then -- lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" --else -- : --fi - --fi - --lt_prog_compiler_wl_GCJ= --lt_prog_compiler_pic_GCJ= --lt_prog_compiler_static_GCJ= -+# Check whether --with-pic or --without-pic was given. -+if test "${with_pic+set}" = set; then -+ withval="$with_pic" -+ pic_mode="$withval" -+else -+ pic_mode=default -+fi; -+test -z "$pic_mode" && pic_mode=default - -+# We assume here that the value for lt_cv_prog_cc_pic will not be cached -+# in isolation, and that seeing it set (from the cache) indicates that -+# the associated values are set (in the cache) correctly too. - echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 - echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 -+if test "${lt_cv_prog_cc_pic+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_shlib= -+ lt_cv_prog_cc_wl= -+ lt_cv_prog_cc_static= -+ lt_cv_prog_cc_no_builtin= -+ lt_cv_prog_cc_can_build_shared=$can_build_shared - - if test "$GCC" = yes; then -- lt_prog_compiler_wl_GCJ='-Wl,' -- lt_prog_compiler_static_GCJ='-static' -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-static' - - case $host_os in -- aix*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- lt_prog_compiler_static_GCJ='-Bstatic' -- fi -+ aix*) -+ # Below there is a dirty hack to force normal static linking with -ldl -+ # The problem is because libdl dynamically linked with both libc and -+ # libC (AIX C++ library), which obviously doesn't included in libraries -+ # list by gcc. This cause undefined symbols with -static flags. -+ # This hack allows C programs to be linked with "-static -ldl", but -+ # not sure about C++ programs. -+ lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" - ;; -- - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. -- lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' -+ lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' - ;; -- -- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; -- -- mingw* | pw32* | os2*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' -- ;; -- - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files -- lt_prog_compiler_pic_GCJ='-fno-common' -+ lt_cv_prog_cc_pic='-fno-common' - ;; -- -- msdosdjgpp*) -- # Just because we use GCC doesn't mean we suddenly get shared libraries -- # on systems that don't support them. -- lt_prog_compiler_can_build_shared_GCJ=no -- enable_shared=no -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' - ;; -- - sysv4*MP*) - if test -d /usr/nec; then -- lt_prog_compiler_pic_GCJ=-Kconform_pic -+ lt_cv_prog_cc_pic=-Kconform_pic - fi - ;; -- -- hpux*) -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- lt_prog_compiler_pic_GCJ='-fPIC' -- ;; -- esac -- ;; -- - *) -- lt_prog_compiler_pic_GCJ='-fPIC' -+ lt_cv_prog_cc_pic='-fPIC' - ;; - esac - else -- # PORTME Check for flag to pass linker flags through the system compiler. -+ # PORTME Check for PIC flags for the system compiler. - case $host_os in -- aix*) -- lt_prog_compiler_wl_GCJ='-Wl,' -+ aix3* | aix4* | aix5*) -+ lt_cv_prog_cc_wl='-Wl,' -+ # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor -- lt_prog_compiler_static_GCJ='-Bstatic' -+ lt_cv_prog_cc_static='-Bstatic' - else -- lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' -+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; -- darwin*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- case $cc_basename in -- xlc*) -- lt_prog_compiler_pic_GCJ='-qnocommon' -- lt_prog_compiler_wl_GCJ='-Wl,' -- ;; -- esac -- ;; -- -- mingw* | pw32* | os2*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' -- ;; - - hpux9* | hpux10* | hpux11*) -- lt_prog_compiler_wl_GCJ='-Wl,' -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- lt_prog_compiler_pic_GCJ='+Z' -- ;; -- esac -- # Is there a better lt_prog_compiler_static that works with the bundled CC? -- lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' -+ # Is there a better lt_cv_prog_cc_static that works with the bundled CC? -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" -+ lt_cv_prog_cc_pic='+Z' - ;; - - irix5* | irix6* | nonstopux*) -- lt_prog_compiler_wl_GCJ='-Wl,' -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' - # PIC (with -KPIC) is the default. -- lt_prog_compiler_static_GCJ='-non_shared' - ;; - -- newsos6) -- lt_prog_compiler_pic_GCJ='-KPIC' -- lt_prog_compiler_static_GCJ='-Bstatic' -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' - ;; - -- linux*) -- case $cc_basename in -- icc* | ecc*) -- lt_prog_compiler_wl_GCJ='-Wl,' -- lt_prog_compiler_pic_GCJ='-KPIC' -- lt_prog_compiler_static_GCJ='-static' -- ;; -- pgcc* | pgf77* | pgf90* | pgf95*) -- # Portland Group compilers (*not* the Pentium gcc compiler, -- # which looks to be a dead project) -- lt_prog_compiler_wl_GCJ='-Wl,' -- lt_prog_compiler_pic_GCJ='-fpic' -- lt_prog_compiler_static_GCJ='-Bstatic' -- ;; -- ccc*) -- lt_prog_compiler_wl_GCJ='-Wl,' -- # All Alpha code is PIC. -- lt_prog_compiler_static_GCJ='-non_shared' -- ;; -- esac -+ newsos6) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' - ;; - - osf3* | osf4* | osf5*) -- lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. -- lt_prog_compiler_static_GCJ='-non_shared' -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' - ;; - - sco3.2v5*) -- lt_prog_compiler_pic_GCJ='-Kpic' -- lt_prog_compiler_static_GCJ='-dn' -+ lt_cv_prog_cc_pic='-Kpic' -+ lt_cv_prog_cc_static='-dn' -+ lt_cv_prog_cc_shlib='-belf' - ;; - - solaris*) -- lt_prog_compiler_pic_GCJ='-KPIC' -- lt_prog_compiler_static_GCJ='-Bstatic' -- case $cc_basename in -- f77* | f90* | f95*) -- lt_prog_compiler_wl_GCJ='-Qoption ld ';; -- *) -- lt_prog_compiler_wl_GCJ='-Wl,';; -- esac -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' - ;; - - sunos4*) -- lt_prog_compiler_wl_GCJ='-Qoption ld ' -- lt_prog_compiler_pic_GCJ='-PIC' -- lt_prog_compiler_static_GCJ='-Bstatic' -+ lt_cv_prog_cc_pic='-PIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Qoption ld ' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- lt_prog_compiler_wl_GCJ='-Wl,' -- lt_prog_compiler_pic_GCJ='-KPIC' -- lt_prog_compiler_static_GCJ='-Bstatic' -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ uts4*) -+ lt_cv_prog_cc_pic='-pic' -+ lt_cv_prog_cc_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then -- lt_prog_compiler_pic_GCJ='-Kconform_pic' -- lt_prog_compiler_static_GCJ='-Bstatic' -+ lt_cv_prog_cc_pic='-Kconform_pic' -+ lt_cv_prog_cc_static='-Bstatic' - fi - ;; - -- unicos*) -- lt_prog_compiler_wl_GCJ='-Wl,' -- lt_prog_compiler_can_build_shared_GCJ=no -- ;; -- -- uts4*) -- lt_prog_compiler_pic_GCJ='-pic' -- lt_prog_compiler_static_GCJ='-Bstatic' -- ;; -- - *) -- lt_prog_compiler_can_build_shared_GCJ=no -+ lt_cv_prog_cc_can_build_shared=no - ;; - esac - fi - --echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 --echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 -- --# --# Check to make sure the PIC flag actually works. --# --if test -n "$lt_prog_compiler_pic_GCJ"; then -- --echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 --echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 --if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- lt_prog_compiler_pic_works_GCJ=no -- ac_outfile=conftest.$ac_objext -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="$lt_prog_compiler_pic_GCJ" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- # The option is referenced via a variable to avoid confusing sed. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16082: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>conftest.err) -- ac_status=$? -- cat conftest.err >&5 -- echo "$as_me:16086: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s "$ac_outfile"; then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings other than the usual output. -- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp -- $SED '/^$/d' conftest.err >conftest.er2 -- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then -- lt_prog_compiler_pic_works_GCJ=yes -- fi -- fi -- $rm conftest* -- - fi --echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 --echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 - --if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then -- case $lt_prog_compiler_pic_GCJ in -- "" | " "*) ;; -- *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; -- esac -+if test -z "$lt_cv_prog_cc_pic"; then -+ echo "$as_me:$LINENO: result: none" >&5 -+echo "${ECHO_T}none" >&6 - else -- lt_prog_compiler_pic_GCJ= -- lt_prog_compiler_can_build_shared_GCJ=no --fi -- --fi --case $host_os in -- # For platforms which do not support PIC, -DPIC is meaningless: -- *djgpp*) -- lt_prog_compiler_pic_GCJ= -- ;; -- *) -- lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" -- ;; --esac -+ echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5 -+echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6 - --echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 --echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 --if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then -+ # Check to make sure the pic_flag actually works. -+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 -+echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6 -+ if test "${lt_cv_prog_cc_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- lt_cv_prog_compiler_c_o_GCJ=no -- $rm -r conftest 2>/dev/null -- mkdir conftest -- cd conftest -- mkdir out -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- lt_compiler_flag="-o out/conftest2.$ac_objext" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16144: $lt_compile\"" >&5) -- (eval "$lt_compile" 2>out/conftest.err) -- ac_status=$? -- cat out/conftest.err >&5 -- echo "$as_me:16148: \$? = $ac_status" >&5 -- if (exit $ac_status) && test -s out/conftest2.$ac_objext -- then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings -- $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp -- $SED '/^$/d' out/conftest.err >out/conftest.er2 -- if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then -- lt_cv_prog_compiler_c_o_GCJ=yes -- fi -- fi -- chmod u+w . 2>&5 -- $rm conftest* -- # SGI C++ compiler will create directory out/ii_files/ for -- # template instantiation -- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files -- $rm out/* && rmdir out -- cd .. -- rmdir conftest -- $rm conftest* -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --fi --echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 --echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 -+int -+main () -+{ - -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ case $host_os in -+ hpux9* | hpux10* | hpux11*) -+ # On HP-UX, both CC and GCC only warn that PIC is supported... then -+ # they create non-PIC objects. So, if there were any warnings, we -+ # assume that PIC is not supported. -+ if test -s conftest.err; then -+ lt_cv_prog_cc_pic_works=no -+ else -+ lt_cv_prog_cc_pic_works=yes -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic_works=yes -+ ;; -+ esac - --hard_links="nottested" --if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then -- # do not overwrite the value of need_locks provided by the user -- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 --echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 -- hard_links=yes -- $rm conftest* -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- touch conftest.a -- ln conftest.a conftest.b 2>&5 || hard_links=no -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- echo "$as_me:$LINENO: result: $hard_links" >&5 --echo "${ECHO_T}$hard_links" >&6 -- if test "$hard_links" = no; then -- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 --echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} -- need_locks=warn -- fi - else -- need_locks=no --fi -- --echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 --echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -- -- runpath_var= -- allow_undefined_flag_GCJ= -- enable_shared_with_static_runtimes_GCJ=no -- archive_cmds_GCJ= -- archive_expsym_cmds_GCJ= -- old_archive_From_new_cmds_GCJ= -- old_archive_from_expsyms_cmds_GCJ= -- export_dynamic_flag_spec_GCJ= -- whole_archive_flag_spec_GCJ= -- thread_safe_flag_spec_GCJ= -- hardcode_libdir_flag_spec_GCJ= -- hardcode_libdir_flag_spec_ld_GCJ= -- hardcode_libdir_separator_GCJ= -- hardcode_direct_GCJ=no -- hardcode_minus_L_GCJ=no -- hardcode_shlibpath_var_GCJ=unsupported -- link_all_deplibs_GCJ=unknown -- hardcode_automatic_GCJ=no -- module_cmds_GCJ= -- module_expsym_cmds_GCJ= -- always_export_symbols_GCJ=no -- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- # include_expsyms should be a list of space-separated symbols to be *always* -- # included in the symbol list -- include_expsyms_GCJ= -- # exclude_expsyms can be an extended regexp of symbols to exclude -- # it will be wrapped by ` (' and `)$', so one must not match beginning or -- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -- # as well as any symbol that contains `d'. -- exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" -- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -- # platforms (ab)use it in PIC code, but their linkers get confused if -- # the symbol is explicitly referenced. Since portable code cannot -- # rely on this symbol name, it's probably fine to never include it in -- # preloaded symbol tables. -- extract_expsyms_cmds= -- # Just being paranoid about ensuring that cc_basename is set. -- for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -- -- case $host_os in -- cygwin* | mingw* | pw32*) -- # FIXME: the MSVC++ port hasn't been tested in a loooong time -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- if test "$GCC" != yes; then -- with_gnu_ld=no -- fi -- ;; -- openbsd*) -- with_gnu_ld=no -- ;; -- esac -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -- ld_shlibs_GCJ=yes -- if test "$with_gnu_ld" = yes; then -- # If archive_cmds runs LD, not CC, wlarc should be empty -- wlarc='${wl}' -+ lt_cv_prog_cc_pic_works=no - -- # Set some defaults for GNU ld with shared library support. These -- # are reset later if shared libraries are not supported. Putting them -- # here allows them to be overridden if necessary. -- runpath_var=LD_RUN_PATH -- hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' -- export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' -- # ancient GNU ld didn't support --whole-archive et. al. -- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then -- whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- else -- whole_archive_flag_spec_GCJ= -- fi -- supports_anon_versioning=no -- case `$LD -v 2>/dev/null` in -- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 -- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... -- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... -- *\ 2.11.*) ;; # other 2.11 versions -- *) supports_anon_versioning=yes ;; -- esac -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ CFLAGS="$save_CFLAGS" - -- # See if GNU ld supports shared libraries. -- case $host_os in -- aix3* | aix4* | aix5*) -- # On AIX/PPC, the GNU linker is very broken -- if test "$host_cpu" != ia64; then -- ld_shlibs_GCJ=no -- cat <&2 -+fi - --*** Warning: the GNU linker, at least up to release 2.9.1, is reported --*** to be unable to reliably create shared libraries on AIX. --*** Therefore, libtool is disabling shared libraries support. If you --*** really care for shared libraries, you may want to modify your PATH --*** so that a non-GNU linker is found, and then restart. - --EOF -- fi -- ;; -+ if test "X$lt_cv_prog_cc_pic_works" = Xno; then -+ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_can_build_shared=no -+ else -+ lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" -+ fi - -- amigaos*) -- archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- hardcode_minus_L_GCJ=yes -- -- # Samuel A. Falvo II reports -- # that the semantics of dynamic libraries on AmigaOS, at least up -- # to version 4, is to share data among multiple programs linked -- # with the same dynamic library. Since this doesn't match the -- # behavior of shared libraries on other platforms, we can't use -- # them. -- ld_shlibs_GCJ=no -- ;; -+ echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5 -+echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6 -+fi - -- beos*) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- allow_undefined_flag_GCJ=unsupported -- # Joseph Beckenbach says some releases of gcc -- # support --undefined. This deserves some investigation. FIXME -- archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- else -- ld_shlibs_GCJ=no -- fi -- ;; -+# Check for any special shared library compilation flags. -+if test -n "$lt_cv_prog_cc_shlib"; then -+ { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5 -+echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;} -+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : -+ else -+ { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 -+echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} -+ lt_cv_prog_cc_can_build_shared=no -+ fi -+fi - -- cygwin* | mingw* | pw32*) -- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, -- # as there is no search path for DLLs. -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- allow_undefined_flag_GCJ=unsupported -- always_export_symbols_GCJ=no -- enable_shared_with_static_runtimes_GCJ=yes -- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' -- -- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then -- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' -- else -- ld_shlibs_GCJ=no -- fi -- ;; -+echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 -+echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6 -+if test "${lt_cv_prog_cc_static_works+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ lt_cv_prog_cc_static_works=no -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - -- linux*) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- tmp_addflag= -- case $cc_basename,$host_cpu in -- pgcc*) # Portland Group C compiler -- whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag' -- ;; -- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers -- whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag -Mnomain' ;; -- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 -- tmp_addflag=' -i_dynamic' ;; -- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 -- tmp_addflag=' -i_dynamic -nofor_main' ;; -- ifc* | ifort*) # Intel Fortran compiler -- tmp_addflag=' -nofor_main' ;; -- esac -- archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+int -+main () -+{ - -- if test $supports_anon_versioning = yes; then -- archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- $echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -- fi -- else -- ld_shlibs_GCJ=no -- fi -- ;; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ lt_cv_prog_cc_static_works=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -- wlarc= -- else -- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- fi -- ;; -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ LDFLAGS="$save_LDFLAGS" - -- solaris* | sysv5*) -- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then -- ld_shlibs_GCJ=no -- cat <&2 -+fi - --*** Warning: The releases 2.8.* of the GNU linker cannot reliably --*** create shared libraries on Solaris systems. Therefore, libtool --*** is disabling shared libraries support. We urge you to upgrade GNU --*** binutils to release 2.9.1 or newer. Another option is to modify --*** your PATH or compiler configuration so that the native linker is --*** used, and then restart. - --EOF -- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- ld_shlibs_GCJ=no -- fi -- ;; -+# Belt *and* braces to stop my trousers falling down: -+test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= -+echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5 -+echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6 - -- sunos4*) -- archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- wlarc= -- hardcode_direct_GCJ=yes -- hardcode_shlibpath_var_GCJ=no -- ;; -+pic_flag="$lt_cv_prog_cc_pic" -+special_shlib_compile_flags="$lt_cv_prog_cc_shlib" -+wl="$lt_cv_prog_cc_wl" -+link_static_flag="$lt_cv_prog_cc_static" -+no_builtin_flag="$lt_cv_prog_cc_no_builtin" -+can_build_shared="$lt_cv_prog_cc_can_build_shared" - -- *) -- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then -- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- ld_shlibs_GCJ=no -- fi -- ;; -- esac - -- if test "$ld_shlibs_GCJ" = no; then -- runpath_var= -- hardcode_libdir_flag_spec_GCJ= -- export_dynamic_flag_spec_GCJ= -- whole_archive_flag_spec_GCJ= -- fi -- else -- # PORTME fill in a description of your system's linker (not GNU ld) -- case $host_os in -- aix3*) -- allow_undefined_flag_GCJ=unsupported -- always_export_symbols_GCJ=yes -- archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -- # Note: this linker hardcodes the directories in LIBPATH if there -- # are no directories specified by -L. -- hardcode_minus_L_GCJ=yes -- if test "$GCC" = yes && test -z "$link_static_flag"; then -- # Neither direct hardcoding nor static linking is supported with a -- # broken collect2. -- hardcode_direct_GCJ=unsupported -- fi -- ;; -+# Check to see if options -o and -c are simultaneously supported by compiler -+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -+if test "${lt_cv_compiler_c_o+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else - -- aix4* | aix5*) -- if test "$host_cpu" = ia64; then -- # On IA64, the linker does run time linking by default, so we don't -- # have to do anything special. -- aix_use_runtimelinking=no -- exp_sym_flag='-Bexport' -- no_entry_flag="" -- else -- # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then -- export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' -- else -- export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' -- fi -- aix_use_runtimelinking=no -+$rm -r conftest 2>/dev/null -+mkdir conftest -+cd conftest -+echo "int some_variable = 0;" > conftest.$ac_ext -+mkdir out -+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -+# that will create temporary files in the current directory regardless of -+# the output directory. Thus, making CWD read-only will cause this test -+# to fail, enabling locking or at least warning the user not to do parallel -+# builds. -+chmod -w . -+save_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" -+compiler_c_o=no -+if { (eval echo configure:5263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s out/conftest.err; then -+ lt_cv_compiler_c_o=no -+ else -+ lt_cv_compiler_c_o=yes -+ fi -+else -+ # Append any errors to the config.log. -+ cat out/conftest.err 1>&5 -+ lt_cv_compiler_c_o=no -+fi -+CFLAGS="$save_CFLAGS" -+chmod u+w . -+$rm conftest* out/* -+rmdir out -+cd .. -+rmdir conftest -+$rm -r conftest 2>/dev/null - -- # Test if we are trying to use run time linking or normal -- # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -- case $host_os in aix4.[23]|aix4.[23].*|aix5*) -- for ld_flag in $LDFLAGS; do -- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then -- aix_use_runtimelinking=yes -- break -- fi -- done -- esac -+fi - -- exp_sym_flag='-bexport' -- no_entry_flag='-bnoentry' -- fi -+compiler_c_o=$lt_cv_compiler_c_o -+echo "$as_me:$LINENO: result: $compiler_c_o" >&5 -+echo "${ECHO_T}$compiler_c_o" >&6 - -- # When large executables or shared objects are built, AIX ld can -- # have problems creating the table of contents. If linking a library -- # or program results in "error TOC overflow" add -mminimal-toc to -- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -- -- archive_cmds_GCJ='' -- hardcode_direct_GCJ=yes -- hardcode_libdir_separator_GCJ=':' -- link_all_deplibs_GCJ=yes -- -- if test "$GCC" = yes; then -- case $host_os in aix4.[012]|aix4.[012].*) -- # We only want to do this on AIX 4.2 and lower, the check -- # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -- if test -f "$collect2name" && \ -- strings "$collect2name" | grep resolve_lib_name >/dev/null -- then -- # We have reworked collect2 -- hardcode_direct_GCJ=yes -- else -- # We have old collect2 -- hardcode_direct_GCJ=unsupported -- # It fails to find uninstalled libraries when the uninstalled -- # path is not listed in the libpath. Setting hardcode_minus_L -- # to unsupported forces relinking -- hardcode_minus_L_GCJ=yes -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- hardcode_libdir_separator_GCJ= -- fi -- esac -- shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -- fi -- else -- # not using gcc -- if test "$host_cpu" = ia64; then -- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release -- # chokes on -Wl,-G. The following line is correct: -- shared_flag='-G' -- else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -- else -- shared_flag='${wl}-bM:SRE' -- fi -- fi -- fi -+if test x"$compiler_c_o" = x"yes"; then -+ # Check to see if we can write to a .lo -+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5 -+echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6 -+ if test "${lt_cv_compiler_o_lo+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else - -- # It seems that -bexpall does not export symbols beginning with -- # underscore (_), so it is better to generate a list of symbols to export. -- always_export_symbols_GCJ=yes -- if test "$aix_use_runtimelinking" = yes; then -- # Warning - without using the other runtime loading flags (-brtl), -- # -berok will link without error, but may produce a broken library. -- allow_undefined_flag_GCJ='-berok' -- # Determine the default libpath from the value encoded in an empty executable. -- cat >conftest.$ac_ext <<_ACEOF -+ lt_cv_compiler_o_lo=no -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -c -o conftest.lo" -+ save_objext="$ac_objext" -+ ac_objext=lo -+ cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -16555,58 +5310,90 @@ - int - main () - { -- -+int some_variable = 0; - ; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ lt_cv_compiler_o_lo=no -+ else -+ lt_cv_compiler_o_lo=yes -+ fi - --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ ac_objext="$save_objext" -+ CFLAGS="$save_CFLAGS" - -- hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" -- archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -- else -- if test "$host_cpu" = ia64; then -- hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' -- allow_undefined_flag_GCJ="-z nodefs" -- archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -- else -- # Determine the default libpath from the value encoded in an empty executable. -- cat >conftest.$ac_ext <<_ACEOF -+fi -+ -+ compiler_o_lo=$lt_cv_compiler_o_lo -+ echo "$as_me:$LINENO: result: $compiler_o_lo" >&5 -+echo "${ECHO_T}$compiler_o_lo" >&6 -+else -+ compiler_o_lo=no -+fi -+ -+# Check to see if we can do hard links to lock some files if needed -+hard_links="nottested" -+if test "$compiler_c_o" = no && test "$need_locks" != no; then -+ # do not overwrite the value of need_locks provided by the user -+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 -+ hard_links=yes -+ $rm conftest* -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ touch conftest.a -+ ln conftest.a conftest.b 2>&5 || hard_links=no -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ echo "$as_me:$LINENO: result: $hard_links" >&5 -+echo "${ECHO_T}$hard_links" >&6 -+ if test "$hard_links" = no; then -+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} -+ need_locks=warn -+ fi -+else -+ need_locks=no -+fi -+ -+if test "$GCC" = yes; then -+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler -+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 -+ echo "int some_variable = 0;" > conftest.$ac_ext -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" -+ compiler_rtti_exceptions=no -+ cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -16616,556 +5403,808 @@ - int - main () - { -- -+int some_variable = 0; - ; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ compiler_rtti_exceptions=no -+ else -+ compiler_rtti_exceptions=yes -+ fi - --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } --}'`; fi - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ CFLAGS="$save_CFLAGS" -+ echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5 -+echo "${ECHO_T}$compiler_rtti_exceptions" >&6 -+ -+ if test "$compiler_rtti_exceptions" = "yes"; then -+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' -+ else -+ no_builtin_flag=' -fno-builtin' -+ fi -+fi -+ -+# See if the linker supports building shared libraries. -+echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5 -+echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6 -+ -+allow_undefined_flag= -+no_undefined_flag= -+need_lib_prefix=unknown -+need_version=unknown -+# when you set need_version to no, make sure it does not cause -set_version -+# flags to be left without arguments -+archive_cmds= -+archive_expsym_cmds= -+old_archive_from_new_cmds= -+old_archive_from_expsyms_cmds= -+export_dynamic_flag_spec= -+whole_archive_flag_spec= -+thread_safe_flag_spec= -+hardcode_into_libs=no -+hardcode_libdir_flag_spec= -+hardcode_libdir_separator= -+hardcode_direct=no -+hardcode_minus_L=no -+hardcode_shlibpath_var=unsupported -+runpath_var= -+link_all_deplibs=unknown -+always_export_symbols=no -+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -+# include_expsyms should be a list of space-separated symbols to be *always* -+# included in the symbol list -+include_expsyms= -+# exclude_expsyms can be an egrep regular expression of symbols to exclude -+# it will be wrapped by ` (' and `)$', so one must not match beginning or -+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -+# as well as any symbol that contains `d'. -+exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -+# platforms (ab)use it in PIC code, but their linkers get confused if -+# the symbol is explicitly referenced. Since portable code cannot -+# rely on this symbol name, it's probably fine to never include it in -+# preloaded symbol tables. -+extract_expsyms_cmds= -+ -+case $host_os in -+cygwin* | mingw* | pw32*) -+ # FIXME: the MSVC++ port hasn't been tested in a loooong time -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ if test "$GCC" != yes; then -+ with_gnu_ld=no -+ fi -+ ;; -+openbsd*) -+ with_gnu_ld=no -+ ;; -+esac -+ -+ld_shlibs=yes -+if test "$with_gnu_ld" = yes; then -+ # If archive_cmds runs LD, not CC, wlarc should be empty -+ wlarc='${wl}' -+ -+ # See if GNU ld supports shared libraries. -+ case $host_os in -+ aix3* | aix4* | aix5*) -+ # On AIX, the GNU linker is very broken -+ # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. -+ ld_shlibs=no -+ cat <&2 -+ -+*** Warning: the GNU linker, at least up to release 2.9.1, is reported -+*** to be unable to reliably create shared libraries on AIX. -+*** Therefore, libtool is disabling shared libraries support. If you -+*** really care for shared libraries, you may want to modify your PATH -+*** so that a non-GNU linker is found, and then restart. -+ -+EOF -+ ;; -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ -+ # Samuel A. Falvo II reports -+ # that the semantics of dynamic libraries on AmigaOS, at least up -+ # to version 4, is to share data among multiple programs linked -+ # with the same dynamic library. Since this doesn't match the -+ # behavior of shared libraries on other platforms, we can use -+ # them. -+ ld_shlibs=no -+ ;; -+ -+ beos*) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ allow_undefined_flag=unsupported -+ # Joseph Beckenbach says some releases of gcc -+ # support --undefined. This deserves some investigation. FIXME -+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec='-L$libdir' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ -+ extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ -+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ -+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ -+ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ -+ else $CC -o impgen impgen.c ; fi)~ -+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' -+ -+ old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' -+ -+ # cygwin and mingw dlls have different entry points and sets of symbols -+ # to exclude. -+ # FIXME: what about values for MSVC? -+ dll_entry=__cygwin_dll_entry@12 -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ -+ case $host_os in -+ mingw*) -+ # mingw values -+ dll_entry=_DllMainCRTStartup@12 -+ dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ -+ ;; -+ esac -+ -+ # mingw and cygwin differ, and it's simplest to just exclude the union -+ # of the two symbol sets. -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 -+ -+ # recent cygwin and mingw systems supply a stub DllMain which the user -+ # can override, but on older systems we have to supply one (in ltdll.c) -+ if test "x$lt_cv_need_dllmain" = "xyes"; then -+ ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " -+ ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ -+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' -+ else -+ ltdll_obj= -+ ltdll_cmds= -+ fi -+ -+ # Extract the symbol export list from an `--export-all' def file, -+ # then regenerate the def file from the symbol export list, so that -+ # the compiled dll only exports the symbol export list. -+ # Be careful not to strip the DATA tag left be newer dlltools. -+ export_symbols_cmds="$ltdll_cmds"' -+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ -+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' -+ -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is. -+ # If DATA tags from a recent dlltool are present, honour them! -+ archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname-def; -+ else -+ echo EXPORTS > $output_objdir/$soname-def; -+ _lt_hint=1; -+ cat $export_symbols | while read symbol; do -+ set dummy \$symbol; -+ case \$# in -+ 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; -+ 4) echo " \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; -+ *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; -+ esac; -+ _lt_hint=`expr 1 + \$_lt_hint`; -+ done; -+ fi~ -+ '"$ltdll_cmds"' -+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ -+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ -+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' -+ ;; -+ -+ netbsd* | knetbsd*-gnu) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -+ wlarc= -+ else -+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ fi -+ ;; -+ -+ solaris* | sysv5*) -+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then -+ ld_shlibs=no -+ cat <&2 -+ -+*** Warning: The releases 2.8.* of the GNU linker cannot reliably -+*** create shared libraries on Solaris systems. Therefore, libtool -+*** is disabling shared libraries support. We urge you to upgrade GNU -+*** binutils to release 2.9.1 or newer. Another option is to modify -+*** your PATH or compiler configuration so that the native linker is -+*** used, and then restart. -+ -+EOF -+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ -+ sunos4*) -+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ wlarc= -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ *) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ esac -+ -+ if test "$ld_shlibs" = yes; then -+ runpath_var=LD_RUN_PATH -+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' -+ export_dynamic_flag_spec='${wl}--export-dynamic' -+ case $host_os in -+ cygwin* | mingw* | pw32*) -+ # dlltool doesn't understand --whole-archive et. al. -+ whole_archive_flag_spec= -+ ;; -+ *) -+ # ancient GNU ld didn't support --whole-archive et. al. -+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then -+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ else -+ whole_archive_flag_spec= -+ fi -+ ;; -+ esac -+ fi -+else -+ # PORTME fill in a description of your system's linker (not GNU ld) -+ case $host_os in -+ aix3*) -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -+ # Note: this linker hardcodes the directories in LIBPATH if there -+ # are no directories specified by -L. -+ hardcode_minus_L=yes -+ if test "$GCC" = yes && test -z "$link_static_flag"; then -+ # Neither direct hardcoding nor static linking is supported with a -+ # broken collect2. -+ hardcode_direct=unsupported -+ fi -+ ;; -+ -+ aix4* | aix5*) -+ if test "$host_cpu" = ia64; then -+ # On IA64, the linker does run time linking by default, so we don't -+ # have to do anything special. -+ aix_use_runtimelinking=no -+ exp_sym_flag='-Bexport' -+ no_entry_flag="" -+ else -+ aix_use_runtimelinking=no -+ -+ # Test if we are trying to use run time linking or normal -+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we -+ # need to do runtime linking. -+ case $host_os in aix4.[23]|aix4.[23].*|aix5*) -+ for ld_flag in $LDFLAGS; do -+ case $ld_flag in -+ *-brtl*) -+ aix_use_runtimelinking=yes -+ break -+ ;; -+ esac -+ done -+ esac -+ -+ exp_sym_flag='-bexport' -+ no_entry_flag='-bnoentry' -+ fi -+ -+ # When large executables or shared objects are built, AIX ld can -+ # have problems creating the table of contents. If linking a library -+ # or program results in "error TOC overflow" add -mminimal-toc to -+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -+ -+ hardcode_direct=yes -+ archive_cmds='' -+ hardcode_libdir_separator=':' -+ if test "$GCC" = yes; then -+ case $host_os in aix4.[012]|aix4.[012].*) -+ collect2name=`${CC} -print-prog-name=collect2` -+ if test -f "$collect2name" && \ -+ strings "$collect2name" | grep resolve_lib_name >/dev/null -+ then -+ # We have reworked collect2 -+ hardcode_direct=yes -+ else -+ # We have old collect2 -+ hardcode_direct=unsupported -+ # It fails to find uninstalled libraries when the uninstalled -+ # path is not listed in the libpath. Setting hardcode_minus_L -+ # to unsupported forces relinking -+ hardcode_minus_L=yes -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_libdir_separator= -+ fi -+ esac - -- hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" -- # Warning - without using the other run time loading flags, -- # -berok will link without error, but may produce a broken library. -- no_undefined_flag_GCJ=' ${wl}-bernotok' -- allow_undefined_flag_GCJ=' ${wl}-berok' -- # -bexpall does not export symbols beginning with underscore (_) -- always_export_symbols_GCJ=yes -- # Exported symbols can be pulled into shared objects from archives -- whole_archive_flag_spec_GCJ=' ' -- archive_cmds_need_lc_GCJ=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -+ shared_flag='-shared' -+ else -+ # not using gcc -+ if test "$host_cpu" = ia64; then -+ shared_flag='${wl}-G' -+ else -+ if test "$aix_use_runtimelinking" = yes; then -+ shared_flag='${wl}-G' -+ else -+ shared_flag='${wl}-bM:SRE' - fi - fi -- ;; -- -- amigaos*) -- archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- hardcode_minus_L_GCJ=yes -- # see comment about different semantics on the GNU ld section -- ld_shlibs_GCJ=no -- ;; -- -- bsdi[45]*) -- export_dynamic_flag_spec_GCJ=-rdynamic -- ;; -- -- cygwin* | mingw* | pw32*) -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- # hardcode_libdir_flag_spec is actually meaningless, as there is -- # no search path for DLLs. -- hardcode_libdir_flag_spec_GCJ=' ' -- allow_undefined_flag_GCJ=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- old_archive_From_new_cmds_GCJ='true' -- # FIXME: Should let the user specify the lib program. -- old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' -- fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' -- enable_shared_with_static_runtimes_GCJ=yes -- ;; -+ fi - -- darwin* | rhapsody*) -- case $host_os in -- rhapsody* | darwin1.[012]) -- allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' -- ;; -- *) # Darwin 1.3 on -- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then -- allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- else -- case ${MACOSX_DEPLOYMENT_TARGET} in -- 10.[012]) -- allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' -- ;; -- 10.*) -- allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' -- ;; -- esac -- fi -- ;; -- esac -- archive_cmds_need_lc_GCJ=no -- hardcode_direct_GCJ=no -- hardcode_automatic_GCJ=yes -- hardcode_shlibpath_var_GCJ=unsupported -- whole_archive_flag_spec_GCJ='' -- link_all_deplibs_GCJ=yes -- if test "$GCC" = yes ; then -- output_verbose_link_cmd='echo' -- archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' -- module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -+ # It seems that -bexpall can do strange things, so it is better to -+ # generate a list of symbols to export. -+ always_export_symbols=yes -+ if test "$aix_use_runtimelinking" = yes; then -+ # Warning - without using the other runtime loading flags (-brtl), -+ # -berok will link without error, but may produce a broken library. -+ allow_undefined_flag='-berok' -+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' -+ archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else -- case $cc_basename in -- xlc*) -- output_verbose_link_cmd='echo' -- archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' -- module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' -- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds -- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' -- ;; -- *) -- ld_shlibs_GCJ=no -- ;; -- esac -+ if test "$host_cpu" = ia64; then -+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' -+ allow_undefined_flag="-z nodefs" -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -+ else -+ hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' -+ # Warning - without using the other run time loading flags, -+ # -berok will link without error, but may produce a broken library. -+ allow_undefined_flag='${wl}-berok' -+ # This is a bit strange, but is similar to how AIX traditionally builds -+ # it's shared libraries. -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname' -+ fi - fi -- ;; -+ ;; - -- dgux*) -- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- hardcode_shlibpath_var_GCJ=no -- ;; -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ # see comment about different semantics on the GNU ld section -+ ld_shlibs=no -+ ;; - -- freebsd1*) -- ld_shlibs_GCJ=no -- ;; -+ cygwin* | mingw* | pw32*) -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' -+ fix_srcfile_path='`cygpath -w "$srcfile"`' -+ ;; -+ -+ darwin* | rhapsody*) -+ case "$host_os" in -+ rhapsody* | darwin1.[012]) -+ allow_undefined_flag='-undefined suppress' -+ ;; -+ *) # Darwin 1.3 on -+ allow_undefined_flag='-flat_namespace -undefined suppress' -+ ;; -+ esac -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles -+ # `"' quotes if we put them in here... so don't! -+ archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' -+ # We need to add '_' to the symbols in $export_symbols first -+ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ whole_archive_flag_spec='-all_load $convenience' -+ ;; -+ -+ freebsd1*) -+ ld_shlibs=no -+ ;; -+ -+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -+ # support. Future versions do this automatically, but an explicit c++rt0.o -+ # does not break anything, and helps significantly (at the cost of a little -+ # extra space). -+ freebsd2.2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; - -- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -- # support. Future versions do this automatically, but an explicit c++rt0.o -- # does not break anything, and helps significantly (at the cost of a little -- # extra space). -- freebsd2.2*) -- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -- hardcode_libdir_flag_spec_GCJ='-R$libdir' -- hardcode_direct_GCJ=yes -- hardcode_shlibpath_var_GCJ=no -- ;; -+ # Unfortunately, older versions of FreeBSD 2 do not have this feature. -+ freebsd2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; - -- # Unfortunately, older versions of FreeBSD 2 do not have this feature. -- freebsd2*) -- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_GCJ=yes -- hardcode_minus_L_GCJ=yes -- hardcode_shlibpath_var_GCJ=no -- ;; -+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -+ freebsd*) -+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; - -- # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -- freebsd* | kfreebsd*-gnu | dragonfly*) -- archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -- hardcode_libdir_flag_spec_GCJ='-R$libdir' -- hardcode_direct_GCJ=yes -- hardcode_shlibpath_var_GCJ=no -- ;; -+ hpux9* | hpux10* | hpux11*) -+ case $host_os in -+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; -+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; -+ esac -+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_direct=yes -+ hardcode_minus_L=yes # Not in the search PATH, but as the default -+ # location of the library. -+ export_dynamic_flag_spec='${wl}-E' -+ ;; - -- hpux9*) -- if test "$GCC" = yes; then -- archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- else -- archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- fi -- hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' -- hardcode_libdir_separator_GCJ=: -- hardcode_direct_GCJ=yes -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L_GCJ=yes -- export_dynamic_flag_spec_GCJ='${wl}-E' -- ;; -+ irix5* | irix6* | nonstopux*) -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ link_all_deplibs=yes -+ ;; - -- hpux10* | hpux11*) -- if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*|ia64*) -- archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- *) -- archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- esac -- else -- case $host_cpu in -- hppa*64*|ia64*) -- archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -- ;; -- *) -- archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -- ;; -- esac -- fi -- if test "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*) -- hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' -- hardcode_libdir_separator_GCJ=: -- hardcode_direct_GCJ=no -- hardcode_shlibpath_var_GCJ=no -- ;; -- ia64*) -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- hardcode_direct_GCJ=no -- hardcode_shlibpath_var_GCJ=no -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L_GCJ=yes -- ;; -- *) -- hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' -- hardcode_libdir_separator_GCJ=: -- hardcode_direct_GCJ=yes -- export_dynamic_flag_spec_GCJ='${wl}-E' -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- hardcode_minus_L_GCJ=yes -- ;; -- esac -- fi -- ;; -+ netbsd* | knetbsd*-gnu) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -+ else -+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -+ fi -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; - -- irix5* | irix6* | nonstopux*) -- if test "$GCC" = yes; then -- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' -- fi -- hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_GCJ=: -- link_all_deplibs_GCJ=yes -- ;; -+ newsos6) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_shlibpath_var=no -+ ;; - -- netbsd*) -- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -- else -- archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -- fi -- hardcode_libdir_flag_spec_GCJ='-R$libdir' -- hardcode_direct_GCJ=yes -- hardcode_shlibpath_var_GCJ=no -- ;; -+ openbsd*) -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ export_dynamic_flag_spec='${wl}-E' -+ else -+ case "$host_os" in -+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ ;; -+ *) -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ ;; -+ esac -+ fi -+ ;; - -- newsos6) -- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_GCJ=yes -- hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_GCJ=: -- hardcode_shlibpath_var_GCJ=no -- ;; -+ os2*) -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ allow_undefined_flag=unsupported -+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -+ ;; - -- openbsd*) -- hardcode_direct_GCJ=yes -- hardcode_shlibpath_var_GCJ=no -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' -- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' -- export_dynamic_flag_spec_GCJ='${wl}-E' -- else -- case $host_os in -- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) -- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec_GCJ='-R$libdir' -- ;; -- *) -- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' -- ;; -- esac -- fi -- ;; -+ osf3*) -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ fi -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ ;; - -- os2*) -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- hardcode_minus_L_GCJ=yes -- allow_undefined_flag_GCJ=unsupported -- archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -- old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -- ;; -+ osf4* | osf5*) # as osf3* with the addition of -msym flag -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' - -- osf3*) -- if test "$GCC" = yes; then -- allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- allow_undefined_flag_GCJ=' -expect_unresolved \*' -- archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- fi -- hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' -- hardcode_libdir_separator_GCJ=: -- ;; -+ #Both c and cxx compiler support -rpath directly -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ ;; - -- osf4* | osf5*) # as osf3* with the addition of -msym flag -- if test "$GCC" = yes; then -- allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' -- else -- allow_undefined_flag_GCJ=' -expect_unresolved \*' -- archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -- archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' -+ sco3.2v5*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ export_dynamic_flag_spec='${wl}-Bexport' -+ ;; - -- # Both c and cxx compiler support -rpath directly -- hardcode_libdir_flag_spec_GCJ='-rpath $libdir' -- fi -- hardcode_libdir_separator_GCJ=: -- ;; -+ solaris*) -+ # gcc --version < 3.0 without binutils cannot create self contained -+ # shared libraries reliably, requiring libgcc.a to resolve some of -+ # the object symbols generated in some cases. Libraries that use -+ # assert need libgcc.a to resolve __eprintf, for example. Linking -+ # a copy of libgcc.a into every shared library to guarantee resolving -+ # such symbols causes other problems: According to Tim Van Holder -+ # , C++ libraries end up with a separate -+ # (to the application) exception stack for one thing. -+ no_undefined_flag=' -z defs' -+ if test "$GCC" = yes; then -+ case `$CC --version 2>/dev/null` in -+ [12].*) -+ cat <&2 - -- sco3.2v5*) -- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var_GCJ=no -- export_dynamic_flag_spec_GCJ='${wl}-Bexport' -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- ;; -+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably -+*** create self contained shared libraries on Solaris systems, without -+*** introducing a dependency on libgcc.a. Therefore, libtool is disabling -+*** -no-undefined support, which will at least allow you to build shared -+*** libraries. However, you may find that when you link such libraries -+*** into an application without using GCC, you have to manually add -+*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to -+*** upgrade to a newer version of GCC. Another option is to rebuild your -+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. - -- solaris*) -- no_undefined_flag_GCJ=' -z text' -- if test "$GCC" = yes; then -- wlarc='${wl}' -- archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' -- else -- wlarc='' -- archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -- fi -- hardcode_libdir_flag_spec_GCJ='-R$libdir' -- hardcode_shlibpath_var_GCJ=no -- case $host_os in -- solaris2.[0-5] | solaris2.[0-5].*) ;; -- *) -- # The compiler driver will combine linker options so we -- # cannot just pass the convience library names through -- # without $wl, iff we do not link with $LD. -- # Luckily, gcc supports the same syntax we need for Sun Studio. -- # Supported since Solaris 2.6 (maybe 2.5.1?) -- case $wlarc in -- '') -- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; -- *) -- whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; -- esac ;; -+EOF -+ no_undefined_flag= -+ ;; - esac -- link_all_deplibs_GCJ=yes -- ;; -+ fi -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_shlibpath_var=no -+ case $host_os in -+ solaris2.[0-5] | solaris2.[0-5].*) ;; -+ *) # Supported since Solaris 2.6 (maybe 2.5.1?) -+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; -+ esac -+ link_all_deplibs=yes -+ ;; - -- sunos4*) -- if test "x$host_vendor" = xsequent; then -- # Use $CC to link under sequent, because it throws in some extra .o -- # files that make .init and .fini sections work. -- archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -- fi -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- hardcode_direct_GCJ=yes -- hardcode_minus_L_GCJ=yes -- hardcode_shlibpath_var_GCJ=no -- ;; -+ sunos4*) -+ if test "x$host_vendor" = xsequent; then -+ # Use $CC to link under sequent, because it throws in some extra .o -+ # files that make .init and .fini sections work. -+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -+ fi -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; - -- sysv4) -- case $host_vendor in -- sni) -- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_GCJ=yes # is this really true??? -- ;; -- siemens) -- ## LD is ld it makes a PLAMLIB -- ## CC just makes a GrossModule. -- archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- reload_cmds_GCJ='$CC -r -o $output$reload_objs' -- hardcode_direct_GCJ=no -+ sysv4) -+ case $host_vendor in -+ sni) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes # is this really true??? - ;; -- motorola) -- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie -- ;; -- esac -- runpath_var='LD_RUN_PATH' -- hardcode_shlibpath_var_GCJ=no -- ;; -+ siemens) -+ ## LD is ld it makes a PLAMLIB -+ ## CC just makes a GrossModule. -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ reload_cmds='$CC -r -o $output$reload_objs' -+ hardcode_direct=no -+ ;; -+ motorola) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie -+ ;; -+ esac -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no -+ ;; - -- sysv4.3*) -- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var_GCJ=no -- export_dynamic_flag_spec_GCJ='-Bexport' -- ;; -+ sysv4.3*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ export_dynamic_flag_spec='-Bexport' -+ ;; -+ -+ sysv5*) -+ no_undefined_flag=' -z text' -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec= -+ hardcode_shlibpath_var=no -+ runpath_var='LD_RUN_PATH' -+ ;; -+ -+ uts4*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; - -- sysv4*MP*) -- if test -d /usr/nec; then -- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_shlibpath_var_GCJ=no -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- ld_shlibs_GCJ=yes -- fi -- ;; -+ dgux*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; - -- sysv4.2uw2*) -- archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- hardcode_direct_GCJ=yes -- hardcode_minus_L_GCJ=no -- hardcode_shlibpath_var_GCJ=no -- hardcode_runpath_var=yes -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH -- ;; -- -- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) -- no_undefined_flag_GCJ='${wl}-z ${wl}text' -- if test "$GCC" = yes; then -- archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- fi -- runpath_var='LD_RUN_PATH' -- hardcode_shlibpath_var_GCJ=no -- ;; -+ hardcode_runpath_var=yes -+ ld_shlibs=yes -+ fi -+ ;; - -- sysv5*) -- no_undefined_flag_GCJ=' -z text' -- # $CC -shared without GNU ld will not create a library from C++ -- # object files and a static libstdc++, better avoid it by now -- archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -- hardcode_libdir_flag_spec_GCJ= -- hardcode_shlibpath_var_GCJ=no -- runpath_var='LD_RUN_PATH' -- ;; -+ sysv4.2uw2*) -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=no -+ hardcode_shlibpath_var=no -+ hardcode_runpath_var=yes -+ runpath_var=LD_RUN_PATH -+ ;; - -- uts4*) -- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec_GCJ='-L$libdir' -- hardcode_shlibpath_var_GCJ=no -- ;; -+ sysv5uw7* | unixware7*) -+ no_undefined_flag='${wl}-z ${wl}text' -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ fi -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no -+ ;; - -- *) -- ld_shlibs_GCJ=no -- ;; -- esac -- fi -+ *) -+ ld_shlibs=no -+ ;; -+ esac -+fi -+echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -+echo "${ECHO_T}$ld_shlibs" >&6 -+test "$ld_shlibs" = no && can_build_shared=no - --echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 --echo "${ECHO_T}$ld_shlibs_GCJ" >&6 --test "$ld_shlibs_GCJ" = no && can_build_shared=no -+# Check hardcoding attributes. -+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -+hardcode_action= -+if test -n "$hardcode_libdir_flag_spec" || \ -+ test -n "$runpath_var"; then - --variables_saved_for_relink="PATH $shlibpath_var $runpath_var" --if test "$GCC" = yes; then -- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -+ # We can hardcode non-existant directories. -+ if test "$hardcode_direct" != no && -+ # If the only mechanism to avoid hardcoding is shlibpath_var, we -+ # have to relink, otherwise we might link with an installed library -+ # when we should be linking with a yet-to-be-installed one -+ ## test "$hardcode_shlibpath_var" != no && -+ test "$hardcode_minus_L" != no; then -+ # Linking always hardcodes the temporary library directory. -+ hardcode_action=relink -+ else -+ # We can link without hardcoding, and we can hardcode nonexisting dirs. -+ hardcode_action=immediate -+ fi -+else -+ # We cannot hardcode anything, or else we can only hardcode existing -+ # directories. -+ hardcode_action=unsupported - fi -+echo "$as_me:$LINENO: result: $hardcode_action" >&5 -+echo "${ECHO_T}$hardcode_action" >&6 - --# --# Do we need to explicitly link libc? --# --case "x$archive_cmds_need_lc_GCJ" in --x|xyes) -- # Assume -lc should be added -- archive_cmds_need_lc_GCJ=yes -- -- if test "$enable_shared" = yes && test "$GCC" = yes; then -- case $archive_cmds_GCJ in -- *'~'*) -- # FIXME: we may have to deal with multi-command sequences. -- ;; -- '$CC '*) -- # Test whether the compiler implicitly links with -lc since on some -- # systems, -lgcc has to come before -lc. If gcc already passes -lc -- # to ld, don't add -lc before -lgcc. -- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 --echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 -- $rm conftest* -- printf "$lt_simple_compile_test_code" > conftest.$ac_ext -+striplib= -+old_striplib= -+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -+ test -z "$striplib" && striplib="$STRIP --strip-unneeded" -+ echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi - -- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } 2>conftest.err; then -- soname=conftest -- lib=conftest -- libobjs=conftest.$ac_objext -- deplibs= -- wl=$lt_prog_compiler_wl_GCJ -- compiler_flags=-v -- linker_flags=-v -- verstring= -- output_objdir=. -- libname=conftest -- lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ -- allow_undefined_flag_GCJ= -- if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 -- (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } -- then -- archive_cmds_need_lc_GCJ=no -- else -- archive_cmds_need_lc_GCJ=yes -- fi -- allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag -- else -- cat conftest.err 1>&5 -- fi -- $rm conftest* -- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 --echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 -- ;; -- esac -- fi -- ;; --esac -+reload_cmds='$LD$reload_flag -o $output$reload_objs' -+test -z "$deplibs_check_method" && deplibs_check_method=unknown - -+# PORTME Fill in your ld.so characteristics - echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 - echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 - library_names_spec= - libname_spec='lib$name' - soname_spec= --shrext_cmds=".so" - postinstall_cmds= - postuninstall_cmds= - finish_cmds= -@@ -17175,35 +6214,16 @@ - version_type=none - dynamic_linker="$host_os ld.so" - sys_lib_dlsearch_path_spec="/lib /usr/lib" --if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then -- # if the path contains ";" then we assume it to be the separator -- # otherwise default to the standard path separator (i.e. ":") - it is -- # assumed that no part of a normal pathname contains ";" but that should -- # okay in the real world where ";" in dirpaths is itself problematic. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi --else -- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" --fi --need_lib_prefix=unknown --hardcode_into_libs=no -- --# when you set need_version to no, make sure it does not cause -set_version --# flags to be left without arguments --need_version=unknown -+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - - case $host_os in - aix3*) - version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' -+ library_names_spec='${libname}${release}.so$versuffix $libname.a' - shlibpath_var=LIBPATH - -- # AIX 3 has no versioning support, so we append a major version to the name. -- soname_spec='${libname}${release}${shared_ext}$major' -+ # AIX has no versioning support, so we append a major version to the name. -+ soname_spec='${libname}${release}.so$major' - ;; - - aix4* | aix5*) -@@ -17213,7 +6233,7 @@ - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 -- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' -+ library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file -@@ -17223,54 +6243,57 @@ - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) -- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -- echo ' yes ' -- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -- : -- else -- can_build_shared=no -- fi -- ;; -+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -+ echo ' yes ' -+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -+ : -+ else -+ can_build_shared=no -+ fi -+ ;; - esac -- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct -- # soname into executable. Probably we can add versioning support to -- # collect2, so additional links can be useful in future. -+ # AIX (on Power*) has no versioning support, so currently we can -+ # not hardcode correct soname into executable. Probably we can -+ # add versioning support to collect2, so additional links can -+ # be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' -- soname_spec='${libname}${release}${shared_ext}$major' -+ soname_spec='${libname}${release}.so$major' - fi - shlibpath_var=LIBPATH - fi -+ hardcode_into_libs=yes - ;; - - amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. -- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' -+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - - beos*) -- library_names_spec='${libname}${shared_ext}' -+ library_names_spec='${libname}.so' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - --bsdi[45]*) -+bsdi4*) - version_type=linux - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -+ export_dynamic_flag_spec=-rdynamic - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs -@@ -17278,56 +6301,29 @@ - - cygwin* | mingw* | pw32*) - version_type=windows -- shrext_cmds=".dll" - need_version=no - need_lib_prefix=no -- - case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32*) -+ yes,cygwin*) - library_names_spec='$libname.dll.a' -- # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ -+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' -+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ -- $install_prog $dir/$dlname \$dldir/$dlname~ -- chmod a+x \$dldir/$dlname' -- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ $install_prog .libs/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' -- shlibpath_overrides_runpath=yes -- -- case $host_os in -- cygwin*) -- # Cygwin DLLs use 'cyg' prefix rather than 'lib' -- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" -- ;; -- mingw*) -- # MinGW DLLs use traditional 'lib' prefix -- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then -- # It is most probably a Windows format PATH printed by -- # mingw gcc, but we are running on Cygwin. Gcc prints its search -- # path with ; separators, and with drive letters. We can handle the -- # drive letters (cygwin fileutils understands them), so leave them, -- # especially as we might pass files found there to a mingw objdump, -- # which wouldn't understand a cygwinified path. Ahh. -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi -- ;; -- pw32*) -- # pw32 DLLs use 'pw' prefix rather than 'lib' -- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- ;; -- esac - ;; -- -+ yes,mingw*) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' -+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` -+ ;; -+ yes,pw32*) -+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' -+ ;; - *) -- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' -@@ -17340,65 +6336,42 @@ - version_type=darwin - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. -+ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' -+ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH -- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. -- if test "$GCC" = yes; then -- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` -- else -- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' -- fi -- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' -- ;; -- --dgux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH - ;; - - freebsd1*) - dynamic_linker=no - ;; - --kfreebsd*-gnu) -+kfreebsd*-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes -- dynamic_linker='GNU ld.so' -+ dynamic_linker='GNU/FreeBSD ld.so' - ;; - --freebsd* | dragonfly*) -- # DragonFly does not have aout. When/if they implement a new -- # versioning mechanism, adjust this. -- if test -x /usr/bin/objformat; then -- objformat=`/usr/bin/objformat` -- else -- case $host_os in -- freebsd[123]*) objformat=aout ;; -- *) objformat=elf ;; -- esac -- fi -+freebsd*) -+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' -+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' - need_version=yes - ;; - esac -@@ -17407,11 +6380,7 @@ - freebsd2*) - shlibpath_overrides_runpath=yes - ;; -- freebsd3.[01]* | freebsdelf3.[01]*) -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- *) # from 3.2 on -+ *) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; -@@ -17422,8 +6391,8 @@ - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' -+ soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; -@@ -17431,45 +6400,14 @@ - hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. -+ dynamic_linker="$host_os dld.sl" - version_type=sunos - need_lib_prefix=no - need_version=no -- case $host_cpu in -- ia64*) -- shrext_cmds='.so' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.so" -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- if test "X$HPUX_IA64_MODE" = X32; then -- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" -- else -- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" -- fi -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- hppa*64*) -- shrext_cmds='.sl' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- *) -- shrext_cmds='.sl' -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=SHLIB_PATH -- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- esac -+ shlibpath_var=SHLIB_PATH -+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' -+ soname_spec='${libname}${release}.sl$major' - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; -@@ -17477,29 +6415,21 @@ - irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; -- *) -- if test "$lt_cv_prog_gnu_ld" = yes; then -- version_type=linux -- else -- version_type=irix -- fi ;; -+ *) version_type=irix ;; - esac - need_lib_prefix=no - need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD -- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") -- libsuff= shlibsuff= libmagic=32-bit;; -- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") -- libsuff=32 shlibsuff=N32 libmagic=N32;; -- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") -- libsuff=64 shlibsuff=64 libmagic=64-bit;; -+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; -+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; -+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; -@@ -17508,21 +6438,20 @@ - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -- hardcode_into_libs=yes - ;; - - # No shared lib support for Linux oldld, aout, or coff. --linux*oldld* | linux*aout* | linux*coff*) -+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - - # This must be Linux ELF. --linux*) -+linux-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -17531,12 +6460,6 @@ - # before this can be enabled. - hardcode_into_libs=yes - -- # Append ld.so.conf contents to the search path -- if test -f /etc/ld.so.conf; then -- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -- fi -- - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, -@@ -17550,8 +6473,8 @@ - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes -@@ -17563,12 +6486,12 @@ - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' -+ soname_spec='${libname}${release}.so$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH -@@ -17578,17 +6501,7 @@ - - newsos6) - version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --nto-qnx*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -@@ -17596,52 +6509,48 @@ - openbsd*) - version_type=sunos - need_lib_prefix=no -- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. -- case $host_os in -- openbsd3.3 | openbsd3.3.*) need_version=yes ;; -- *) need_version=no ;; -- esac -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- shlibpath_var=LD_LIBRARY_PATH -+ need_version=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- case $host_os in -- openbsd2.[89] | openbsd2.[89].*) -- shlibpath_overrides_runpath=no -- ;; -- *) -- shlibpath_overrides_runpath=yes -- ;; -- esac -+ case "$host_os" in -+ openbsd2.[89] | openbsd2.[89].*) -+ shlibpath_overrides_runpath=no -+ ;; -+ *) -+ shlibpath_overrides_runpath=yes -+ ;; -+ esac - else - shlibpath_overrides_runpath=yes - fi -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ shlibpath_var=LD_LIBRARY_PATH - ;; - - os2*) - libname_spec='$name' -- shrext_cmds=".dll" - need_lib_prefix=no -- library_names_spec='$libname${shared_ext} $libname.a' -+ library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - - osf3* | osf4* | osf5*) - version_type=osf -- need_lib_prefix=no - need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ need_lib_prefix=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -+ hardcode_into_libs=yes - ;; - - sco3.2v5*) - version_type=osf -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -@@ -17649,8 +6558,8 @@ - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes -@@ -17660,7 +6569,7 @@ - - sunos4*) - version_type=sunos -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes -@@ -17672,8 +6581,8 @@ - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) -@@ -17694,22 +6603,31 @@ - esac - ;; - -+uts4*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+dgux*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ - sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux -- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' -- soname_spec='$libname${shared_ext}.$major' -+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' -+ soname_spec='$libname.so.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - --uts4*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- - *) - dynamic_linker=no - ;; -@@ -17718,35 +6636,44 @@ - echo "${ECHO_T}$dynamic_linker" >&6 - test "$dynamic_linker" = no && can_build_shared=no - --echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 --echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 --hardcode_action_GCJ= --if test -n "$hardcode_libdir_flag_spec_GCJ" || \ -- test -n "$runpath_var_GCJ" || \ -- test "X$hardcode_automatic_GCJ" = "Xyes" ; then -+# Report the final consequences. -+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -+echo "$as_me:$LINENO: result: $can_build_shared" >&5 -+echo "${ECHO_T}$can_build_shared" >&6 - -- # We can hardcode non-existant directories. -- if test "$hardcode_direct_GCJ" != no && -- # If the only mechanism to avoid hardcoding is shlibpath_var, we -- # have to relink, otherwise we might link with an installed library -- # when we should be linking with a yet-to-be-installed one -- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && -- test "$hardcode_minus_L_GCJ" != no; then -- # Linking always hardcodes the temporary library directory. -- hardcode_action_GCJ=relink -- else -- # We can link without hardcoding, and we can hardcode nonexisting dirs. -- hardcode_action_GCJ=immediate -+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -+test "$can_build_shared" = "no" && enable_shared=no -+ -+# On AIX, shared libraries and static libraries use the same namespace, and -+# are all built from PIC. -+case "$host_os" in -+aix3*) -+ test "$enable_shared" = yes && enable_static=no -+ if test -n "$RANLIB"; then -+ archive_cmds="$archive_cmds~\$RANLIB \$lib" -+ postinstall_cmds='$RANLIB $lib' - fi --else -- # We cannot hardcode anything, or else we can only hardcode existing -- # directories. -- hardcode_action_GCJ=unsupported --fi --echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 --echo "${ECHO_T}$hardcode_action_GCJ" >&6 -+ ;; -+ -+aix4*) -+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -+ test "$enable_shared" = yes && enable_static=no -+ fi -+ ;; -+esac -+echo "$as_me:$LINENO: result: $enable_shared" >&5 -+echo "${ECHO_T}$enable_shared" >&6 -+ -+echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -+# Make sure either enable_shared or enable_static is yes. -+test "$enable_shared" = yes || enable_static=yes -+echo "$as_me:$LINENO: result: $enable_static" >&5 -+echo "${ECHO_T}$enable_static" >&6 - --if test "$hardcode_action_GCJ" = relink; then -+if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no - elif test "$shlibpath_overrides_runpath" = yes || -@@ -17755,33 +6682,9 @@ - enable_fast_install=needless - fi - --striplib= --old_striplib= --echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 --echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 --if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -- test -z "$striplib" && striplib="$STRIP --strip-unneeded" -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 --else --# FIXME - insert some real tests, host_os isn't really good enough -- case $host_os in -- darwin*) -- if test -n "$STRIP" ; then -- striplib="$STRIP -x" -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi -- ;; -- *) -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- ;; -- esac -+variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -+if test "$GCC" = yes; then -+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - fi - - if test "x$enable_dlopen" != xyes; then -@@ -17792,99 +6695,16 @@ - lt_cv_dlopen=no - lt_cv_dlopen_libs= - -- case $host_os in -- beos*) -- lt_cv_dlopen="load_add_on" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- ;; -- -- mingw* | pw32*) -- lt_cv_dlopen="LoadLibrary" -- lt_cv_dlopen_libs= -- ;; -- -- cygwin*) -- lt_cv_dlopen="dlopen" -- lt_cv_dlopen_libs= -- ;; -- -- darwin*) -- # if libdl is installed we need to link against it -- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 --echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 --if test "${ac_cv_lib_dl_dlopen+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char dlopen (); --int --main () --{ --dlopen (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_dl_dlopen=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_dl_dlopen=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 --echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 --if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" --else -- -- lt_cv_dlopen="dyld" -+ case $host_os in -+ beos*) -+ lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes -+ ;; - --fi -- -+ cygwin* | mingw* | pw32*) -+ lt_cv_dlopen="LoadLibrary" -+ lt_cv_dlopen_libs= - ;; - - *) -@@ -17953,8 +6773,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18019,8 +6838,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18113,8 +6931,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18179,8 +6996,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18246,8 +7062,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18313,8 +7128,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18370,7 +7184,7 @@ - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" -- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -@@ -18386,10 +7200,10 @@ - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross - else -- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then -- (./conftest; exit; ) >&5 2>/dev/null -+ (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; -@@ -18484,10 +7298,10 @@ - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross - else -- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then -- (./conftest; exit; ) >&5 2>/dev/null -+ (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; -@@ -18584,407 +7398,76 @@ - *) enable_dlopen_self=unknown ;; - esac - -- case $lt_cv_dlopen_self_static in -- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; -- *) enable_dlopen_self_static=unknown ;; -- esac --fi -- -- --# The else clause should only fire when bootstrapping the --# libtool distribution, otherwise you forgot to ship ltmain.sh --# with your package, and you will get complaints that there are --# no rules to generate ltmain.sh. --if test -f "$ltmain"; then -- # See if we are running on zsh, and set the options which allow our commands through -- # without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST -- fi -- # Now quote all the things that may contain metacharacters while being -- # careful not to overquote the AC_SUBSTed values. We take copies of the -- # variables and quote the copies for generation of the libtool script. -- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ -- SED SHELL STRIP \ -- libname_spec library_names_spec soname_spec extract_expsyms_cmds \ -- old_striplib striplib file_magic_cmd finish_cmds finish_eval \ -- deplibs_check_method reload_flag reload_cmds need_locks \ -- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ -- lt_cv_sys_global_symbol_to_c_name_address \ -- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -- old_postinstall_cmds old_postuninstall_cmds \ -- compiler_GCJ \ -- CC_GCJ \ -- LD_GCJ \ -- lt_prog_compiler_wl_GCJ \ -- lt_prog_compiler_pic_GCJ \ -- lt_prog_compiler_static_GCJ \ -- lt_prog_compiler_no_builtin_flag_GCJ \ -- export_dynamic_flag_spec_GCJ \ -- thread_safe_flag_spec_GCJ \ -- whole_archive_flag_spec_GCJ \ -- enable_shared_with_static_runtimes_GCJ \ -- old_archive_cmds_GCJ \ -- old_archive_from_new_cmds_GCJ \ -- predep_objects_GCJ \ -- postdep_objects_GCJ \ -- predeps_GCJ \ -- postdeps_GCJ \ -- compiler_lib_search_path_GCJ \ -- archive_cmds_GCJ \ -- archive_expsym_cmds_GCJ \ -- postinstall_cmds_GCJ \ -- postuninstall_cmds_GCJ \ -- old_archive_from_expsyms_cmds_GCJ \ -- allow_undefined_flag_GCJ \ -- no_undefined_flag_GCJ \ -- export_symbols_cmds_GCJ \ -- hardcode_libdir_flag_spec_GCJ \ -- hardcode_libdir_flag_spec_ld_GCJ \ -- hardcode_libdir_separator_GCJ \ -- hardcode_automatic_GCJ \ -- module_cmds_GCJ \ -- module_expsym_cmds_GCJ \ -- lt_cv_prog_compiler_c_o_GCJ \ -- exclude_expsyms_GCJ \ -- include_expsyms_GCJ; do -- -- case $var in -- old_archive_cmds_GCJ | \ -- old_archive_from_new_cmds_GCJ | \ -- archive_cmds_GCJ | \ -- archive_expsym_cmds_GCJ | \ -- module_cmds_GCJ | \ -- module_expsym_cmds_GCJ | \ -- old_archive_from_expsyms_cmds_GCJ | \ -- export_symbols_cmds_GCJ | \ -- extract_expsyms_cmds | reload_cmds | finish_cmds | \ -- postinstall_cmds | postuninstall_cmds | \ -- old_postinstall_cmds | old_postuninstall_cmds | \ -- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -- # Double-quote double-evaled strings. -- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" -- ;; -- *) -- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" -- ;; -- esac -- done -- -- case $lt_echo in -- *'\$0 --fallback-echo"') -- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` -- ;; -- esac -- --cfgfile="$ofile" -- -- cat <<__EOF__ >> "$cfgfile" --# ### BEGIN LIBTOOL TAG CONFIG: $tagname -- --# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -- --# Shell to use when invoking shell scripts. --SHELL=$lt_SHELL -- --# Whether or not to build shared libraries. --build_libtool_libs=$enable_shared -- --# Whether or not to build static libraries. --build_old_libs=$enable_static -- --# Whether or not to add -lc for building shared libraries. --build_libtool_need_lc=$archive_cmds_need_lc_GCJ -- --# Whether or not to disallow shared libs when runtime libs are static --allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ -- --# Whether or not to optimize for fast installation. --fast_install=$enable_fast_install -- --# The host system. --host_alias=$host_alias --host=$host --host_os=$host_os -- --# The build system. --build_alias=$build_alias --build=$build --build_os=$build_os -- --# An echo program that does not interpret backslashes. --echo=$lt_echo -- --# The archiver. --AR=$lt_AR --AR_FLAGS=$lt_AR_FLAGS -- --# A C compiler. --LTCC=$lt_LTCC -- --# A language-specific compiler. --CC=$lt_compiler_GCJ -- --# Is the compiler the GNU C compiler? --with_gcc=$GCC_GCJ -- --# An ERE matcher. --EGREP=$lt_EGREP -- --# The linker used to build libraries. --LD=$lt_LD_GCJ -- --# Whether we need hard or soft links. --LN_S=$lt_LN_S -- --# A BSD-compatible nm program. --NM=$lt_NM -- --# A symbol stripping program --STRIP=$lt_STRIP -- --# Used to examine libraries when file_magic_cmd begins "file" --MAGIC_CMD=$MAGIC_CMD -- --# Used on cygwin: DLL creation program. --DLLTOOL="$DLLTOOL" -- --# Used on cygwin: object dumper. --OBJDUMP="$OBJDUMP" -- --# Used on cygwin: assembler. --AS="$AS" -- --# The name of the directory that contains temporary libtool files. --objdir=$objdir -- --# How to create reloadable object files. --reload_flag=$lt_reload_flag --reload_cmds=$lt_reload_cmds -- --# How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl_GCJ -- --# Object file suffix (normally "o"). --objext="$ac_objext" -- --# Old archive suffix (normally "a"). --libext="$libext" -- --# Shared library suffix (normally ".so"). --shrext_cmds='$shrext_cmds' -- --# Executable file suffix (normally ""). --exeext="$exeext" -- --# Additional compiler flags for building library objects. --pic_flag=$lt_lt_prog_compiler_pic_GCJ --pic_mode=$pic_mode -- --# What is the maximum length of a command? --max_cmd_len=$lt_cv_sys_max_cmd_len -- --# Does compiler simultaneously support -c and -o options? --compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ -- --# Must we lock files when doing compilation? --need_locks=$lt_need_locks -- --# Do we need the lib prefix for modules? --need_lib_prefix=$need_lib_prefix -- --# Do we need a version for libraries? --need_version=$need_version -- --# Whether dlopen is supported. --dlopen_support=$enable_dlopen -- --# Whether dlopen of programs is supported. --dlopen_self=$enable_dlopen_self -- --# Whether dlopen of statically linked programs is supported. --dlopen_self_static=$enable_dlopen_self_static -- --# Compiler flag to prevent dynamic linking. --link_static_flag=$lt_lt_prog_compiler_static_GCJ -- --# Compiler flag to turn off builtin functions. --no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ -- --# Compiler flag to allow reflexive dlopens. --export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ -- --# Compiler flag to generate shared objects directly from archives. --whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ -- --# Compiler flag to generate thread-safe objects. --thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ -- --# Library versioning type. --version_type=$version_type -- --# Format of library name prefix. --libname_spec=$lt_libname_spec -- --# List of archive names. First name is the real one, the rest are links. --# The last name is the one that the linker finds with -lNAME. --library_names_spec=$lt_library_names_spec -- --# The coded name of the library, if different from the real name. --soname_spec=$lt_soname_spec -- --# Commands used to build and install an old-style archive. --RANLIB=$lt_RANLIB --old_archive_cmds=$lt_old_archive_cmds_GCJ --old_postinstall_cmds=$lt_old_postinstall_cmds --old_postuninstall_cmds=$lt_old_postuninstall_cmds -- --# Create an old-style archive from a shared archive. --old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ -- --# Create a temporary old-style archive to link instead of a shared archive. --old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ -- --# Commands used to build and install a shared archive. --archive_cmds=$lt_archive_cmds_GCJ --archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ --postinstall_cmds=$lt_postinstall_cmds --postuninstall_cmds=$lt_postuninstall_cmds -- --# Commands used to build a loadable module (assumed same as above if empty) --module_cmds=$lt_module_cmds_GCJ --module_expsym_cmds=$lt_module_expsym_cmds_GCJ -- --# Commands to strip libraries. --old_striplib=$lt_old_striplib --striplib=$lt_striplib -- --# Dependencies to place before the objects being linked to create a --# shared library. --predep_objects=$lt_predep_objects_GCJ -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdep_objects=$lt_postdep_objects_GCJ -- --# Dependencies to place before the objects being linked to create a --# shared library. --predeps=$lt_predeps_GCJ -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdeps=$lt_postdeps_GCJ -- --# The library search path used internally by the compiler when linking --# a shared library. --compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ -- --# Method to check whether dependent libraries are shared objects. --deplibs_check_method=$lt_deplibs_check_method -- --# Command to use when deplibs_check_method == file_magic. --file_magic_cmd=$lt_file_magic_cmd -- --# Flag that allows shared libraries with undefined symbols to be built. --allow_undefined_flag=$lt_allow_undefined_flag_GCJ -- --# Flag that forces no undefined symbols. --no_undefined_flag=$lt_no_undefined_flag_GCJ -- --# Commands used to finish a libtool library installation in a directory. --finish_cmds=$lt_finish_cmds -- --# Same as above, but a single script fragment to be evaled but not shown. --finish_eval=$lt_finish_eval -- --# Take the output of nm and produce a listing of raw symbols and C names. --global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -- --# Transform the output of nm in a proper C declaration --global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -- --# Transform the output of nm in a C name address pair --global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -- --# This is the shared library runtime path variable. --runpath_var=$runpath_var -- --# This is the shared library path variable. --shlibpath_var=$shlibpath_var -- --# Is shlibpath searched before the hard-coded library search path? --shlibpath_overrides_runpath=$shlibpath_overrides_runpath -- --# How to hardcode a shared library path into an executable. --hardcode_action=$hardcode_action_GCJ -- --# Whether we should hardcode library paths into libraries. --hardcode_into_libs=$hardcode_into_libs -- --# Flag to hardcode \$libdir into a binary during linking. --# This must work even if \$libdir does not exist. --hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ -- --# If ld is used when linking, flag to hardcode \$libdir into --# a binary during linking. This must work even if \$libdir does --# not exist. --hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ -- --# Whether we need a single -rpath flag with a separated argument. --hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ -- --# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the --# resulting binary. --hardcode_direct=$hardcode_direct_GCJ -- --# Set to yes if using the -LDIR flag during linking hardcodes DIR into the --# resulting binary. --hardcode_minus_L=$hardcode_minus_L_GCJ -- --# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into --# the resulting binary. --hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ -- --# Set to yes if building a shared library automatically hardcodes DIR into the library --# and all subsequent libraries and executables linked against it. --hardcode_automatic=$hardcode_automatic_GCJ -- --# Variables whose values should be saved in libtool wrapper scripts and --# restored at relink time. --variables_saved_for_relink="$variables_saved_for_relink" -- --# Whether libtool must link a program against all its dependency libraries. --link_all_deplibs=$link_all_deplibs_GCJ -- --# Compile-time system search path for libraries --sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -- --# Run-time system search path for libraries --sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -- --# Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path="$fix_srcfile_path_GCJ" -- --# Set to yes if exported symbols are required. --always_export_symbols=$always_export_symbols_GCJ -- --# The commands to list exported symbols. --export_symbols_cmds=$lt_export_symbols_cmds_GCJ -- --# The commands to extract the exported symbol list from a shared archive. --extract_expsyms_cmds=$lt_extract_expsyms_cmds -- --# Symbols that should not be listed in the preloaded symbols. --exclude_expsyms=$lt_exclude_expsyms_GCJ -+ case $lt_cv_dlopen_self_static in -+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; -+ *) enable_dlopen_self_static=unknown ;; -+ esac -+fi - --# Symbols that must always be exported. --include_expsyms=$lt_include_expsyms_GCJ - --# ### END LIBTOOL TAG CONFIG: $tagname -+if test "$enable_shared" = yes && test "$GCC" = yes; then -+ case $archive_cmds in -+ *'~'*) -+ # FIXME: we may have to deal with multi-command sequences. -+ ;; -+ '$CC '*) -+ # Test whether the compiler implicitly links with -lc since on some -+ # systems, -lgcc has to come before -lc. If gcc already passes -lc -+ # to ld, don't add -lc before -lgcc. -+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 -+ if test "${lt_cv_archive_cmds_need_lc+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ $rm conftest* -+ echo 'static int dummy;' > conftest.$ac_ext - --__EOF__ -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ soname=conftest -+ lib=conftest -+ libobjs=conftest.$ac_objext -+ deplibs= -+ wl=$lt_cv_prog_cc_wl -+ compiler_flags=-v -+ linker_flags=-v -+ verstring= -+ output_objdir=. -+ libname=conftest -+ save_allow_undefined_flag=$allow_undefined_flag -+ allow_undefined_flag= -+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 -+ (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+ then -+ lt_cv_archive_cmds_need_lc=no -+ else -+ lt_cv_archive_cmds_need_lc=yes -+ fi -+ allow_undefined_flag=$save_allow_undefined_flag -+ else -+ cat conftest.err 1>&5 -+ fi -+fi - -+ echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 -+echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 -+ ;; -+ esac -+fi -+need_lc=${lt_cv_archive_cmds_need_lc-yes} - -+# The second clause should only fire when bootstrapping the -+# libtool distribution, otherwise you forgot to ship ltmain.sh -+# with your package, and you will get complaints that there are -+# no rules to generate ltmain.sh. -+if test -f "$ltmain"; then -+ : - else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the -@@ -18995,148 +7478,39 @@ - fi - fi - -+if test -f "$ltmain"; then -+ trap "$rm \"${ofile}T\"; exit 1" 1 2 15 -+ $rm -f "${ofile}T" - --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- --CC="$lt_save_CC" -- -- else -- tagname="" -- fi -- ;; -- -- RC) -- -- -- --# Source file extension for RC test sources. --ac_ext=rc -- --# Object file extension for compiled RC test sources. --objext=o --objext_RC=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' -- --# Code to be used in simple link tests --lt_simple_link_test_code="$lt_simple_compile_test_code" -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. -- --# If no C compiler was specified, use CC. --LTCC=${LTCC-"$CC"} -- --# Allow CC to be a program name with arguments. --compiler=$CC -- -- --# save warnings/boilerplate of simple test code --ac_outfile=conftest.$ac_objext --printf "$lt_simple_compile_test_code" >conftest.$ac_ext --eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_compiler_boilerplate=`cat conftest.err` --$rm conftest* -- --ac_outfile=conftest.$ac_objext --printf "$lt_simple_link_test_code" >conftest.$ac_ext --eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err --_lt_linker_boilerplate=`cat conftest.err` --$rm conftest* -- -- --# Allow CC to be a program name with arguments. --lt_save_CC="$CC" --CC=${RC-"windres"} --compiler=$CC --compiler_RC=$CC --for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -- --lt_cv_prog_compiler_c_o_RC=yes -+ echo creating $ofile - --# The else clause should only fire when bootstrapping the --# libtool distribution, otherwise you forgot to ship ltmain.sh --# with your package, and you will get complaints that there are --# no rules to generate ltmain.sh. --if test -f "$ltmain"; then -- # See if we are running on zsh, and set the options which allow our commands through -- # without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST -- fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. -- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ -- SED SHELL STRIP \ -- libname_spec library_names_spec soname_spec extract_expsyms_cmds \ -- old_striplib striplib file_magic_cmd finish_cmds finish_eval \ -- deplibs_check_method reload_flag reload_cmds need_locks \ -- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ -- lt_cv_sys_global_symbol_to_c_name_address \ -+ for var in echo old_CC old_CFLAGS SED \ -+ AR AR_FLAGS CC LD LN_S NM SHELL STRIP \ -+ reload_flag reload_cmds wl \ -+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ -+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ -+ library_names_spec soname_spec \ -+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ -+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ -+ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ -+ old_striplib striplib file_magic_cmd export_symbols_cmds \ -+ deplibs_check_method allow_undefined_flag no_undefined_flag \ -+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ -+ global_symbol_to_c_name_address \ -+ hardcode_libdir_flag_spec hardcode_libdir_separator \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -- old_postinstall_cmds old_postuninstall_cmds \ -- compiler_RC \ -- CC_RC \ -- LD_RC \ -- lt_prog_compiler_wl_RC \ -- lt_prog_compiler_pic_RC \ -- lt_prog_compiler_static_RC \ -- lt_prog_compiler_no_builtin_flag_RC \ -- export_dynamic_flag_spec_RC \ -- thread_safe_flag_spec_RC \ -- whole_archive_flag_spec_RC \ -- enable_shared_with_static_runtimes_RC \ -- old_archive_cmds_RC \ -- old_archive_from_new_cmds_RC \ -- predep_objects_RC \ -- postdep_objects_RC \ -- predeps_RC \ -- postdeps_RC \ -- compiler_lib_search_path_RC \ -- archive_cmds_RC \ -- archive_expsym_cmds_RC \ -- postinstall_cmds_RC \ -- postuninstall_cmds_RC \ -- old_archive_from_expsyms_cmds_RC \ -- allow_undefined_flag_RC \ -- no_undefined_flag_RC \ -- export_symbols_cmds_RC \ -- hardcode_libdir_flag_spec_RC \ -- hardcode_libdir_flag_spec_ld_RC \ -- hardcode_libdir_separator_RC \ -- hardcode_automatic_RC \ -- module_cmds_RC \ -- module_expsym_cmds_RC \ -- lt_cv_prog_compiler_c_o_RC \ -- exclude_expsyms_RC \ -- include_expsyms_RC; do -+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do - - case $var in -- old_archive_cmds_RC | \ -- old_archive_from_new_cmds_RC | \ -- archive_cmds_RC | \ -- archive_expsym_cmds_RC | \ -- module_cmds_RC | \ -- module_expsym_cmds_RC | \ -- old_archive_from_expsyms_cmds_RC | \ -- export_symbols_cmds_RC | \ -- extract_expsyms_cmds | reload_cmds | finish_cmds | \ -- postinstall_cmds | postuninstall_cmds | \ -+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ -- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ -+ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ -+ postinstall_cmds | postuninstall_cmds | \ -+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; -@@ -19146,16 +7520,46 @@ - esac - done - -- case $lt_echo in -- *'\$0 --fallback-echo"') -- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` -- ;; -- esac -+ cat <<__EOF__ > "${ofile}T" -+#! $SHELL -+ -+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -+# NOTE: Changes made to this file will be lost: look at ltmain.sh. -+# -+# Copyright (C) 1996-2000 Free Software Foundation, Inc. -+# Originally by Gordon Matzigkeit , 1996 -+# -+# 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. -+# -+# As a special exception to the GNU General Public License, if you -+# distribute this file as part of a program that contains a -+# configuration script generated by Autoconf, you may include it under -+# the same distribution terms that you use for the rest of that program. - --cfgfile="$ofile" -+# A sed that does not truncate output. -+SED=$lt_SED -+ -+# Sed that helps us avoid accidentally triggering echo(1) options like -n. -+Xsed="${SED} -e s/^X//" -+ -+# The HP-UX ksh and POSIX shell print the target directory to stdout -+# if CDPATH is set. -+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -- cat <<__EOF__ >> "$cfgfile" --# ### BEGIN LIBTOOL TAG CONFIG: $tagname -+# ### BEGIN LIBTOOL CONFIG - - # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -@@ -19169,10 +7573,7 @@ - build_old_libs=$enable_static - - # Whether or not to add -lc for building shared libraries. --build_libtool_need_lc=$archive_cmds_need_lc_RC -- --# Whether or not to disallow shared libs when runtime libs are static --allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC -+build_libtool_need_lc=$need_lc - - # Whether or not to optimize for fast installation. - fast_install=$enable_fast_install -@@ -19180,12 +7581,6 @@ - # The host system. - host_alias=$host_alias - host=$host --host_os=$host_os -- --# The build system. --build_alias=$build_alias --build=$build --build_os=$build_os - - # An echo program that does not interpret backslashes. - echo=$lt_echo -@@ -19194,20 +7589,14 @@ - AR=$lt_AR - AR_FLAGS=$lt_AR_FLAGS - --# A C compiler. --LTCC=$lt_LTCC -- --# A language-specific compiler. --CC=$lt_compiler_RC -+# The default C compiler. -+CC=$lt_CC - - # Is the compiler the GNU C compiler? --with_gcc=$GCC_RC -- --# An ERE matcher. --EGREP=$lt_EGREP -+with_gcc=$GCC - - # The linker used to build libraries. --LD=$lt_LD_RC -+LD=$lt_LD - - # Whether we need hard or soft links. - LN_S=$lt_LN_S -@@ -19238,7 +7627,7 @@ - reload_cmds=$lt_reload_cmds - - # How to pass a linker flag through the compiler. --wl=$lt_lt_prog_compiler_wl_RC -+wl=$lt_wl - - # Object file suffix (normally "o"). - objext="$ac_objext" -@@ -19246,23 +7635,20 @@ - # Old archive suffix (normally "a"). - libext="$libext" - --# Shared library suffix (normally ".so"). --shrext_cmds='$shrext_cmds' -- - # Executable file suffix (normally ""). - exeext="$exeext" - - # Additional compiler flags for building library objects. --pic_flag=$lt_lt_prog_compiler_pic_RC -+pic_flag=$lt_pic_flag - pic_mode=$pic_mode - --# What is the maximum length of a command? --max_cmd_len=$lt_cv_sys_max_cmd_len -- - # Does compiler simultaneously support -c and -o options? --compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC -+compiler_c_o=$lt_compiler_c_o -+ -+# Can we write directly to a .lo ? -+compiler_o_lo=$lt_compiler_o_lo - --# Must we lock files when doing compilation? -+# Must we lock files when doing compilation ? - need_locks=$lt_need_locks - - # Do we need the lib prefix for modules? -@@ -19281,19 +7667,19 @@ - dlopen_self_static=$enable_dlopen_self_static - - # Compiler flag to prevent dynamic linking. --link_static_flag=$lt_lt_prog_compiler_static_RC -+link_static_flag=$lt_link_static_flag - - # Compiler flag to turn off builtin functions. --no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC -+no_builtin_flag=$lt_no_builtin_flag - - # Compiler flag to allow reflexive dlopens. --export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC -+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - - # Compiler flag to generate shared objects directly from archives. --whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC -+whole_archive_flag_spec=$lt_whole_archive_flag_spec - - # Compiler flag to generate thread-safe objects. --thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC -+thread_safe_flag_spec=$lt_thread_safe_flag_spec - - # Library versioning type. - version_type=$version_type -@@ -19310,50 +7696,26 @@ - - # Commands used to build and install an old-style archive. - RANLIB=$lt_RANLIB --old_archive_cmds=$lt_old_archive_cmds_RC -+old_archive_cmds=$lt_old_archive_cmds - old_postinstall_cmds=$lt_old_postinstall_cmds - old_postuninstall_cmds=$lt_old_postuninstall_cmds - - # Create an old-style archive from a shared archive. --old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC -+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - - # Create a temporary old-style archive to link instead of a shared archive. --old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC -+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - - # Commands used to build and install a shared archive. --archive_cmds=$lt_archive_cmds_RC --archive_expsym_cmds=$lt_archive_expsym_cmds_RC -+archive_cmds=$lt_archive_cmds -+archive_expsym_cmds=$lt_archive_expsym_cmds - postinstall_cmds=$lt_postinstall_cmds - postuninstall_cmds=$lt_postuninstall_cmds - --# Commands used to build a loadable module (assumed same as above if empty) --module_cmds=$lt_module_cmds_RC --module_expsym_cmds=$lt_module_expsym_cmds_RC -- - # Commands to strip libraries. - old_striplib=$lt_old_striplib - striplib=$lt_striplib - --# Dependencies to place before the objects being linked to create a --# shared library. --predep_objects=$lt_predep_objects_RC -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdep_objects=$lt_postdep_objects_RC -- --# Dependencies to place before the objects being linked to create a --# shared library. --predeps=$lt_predeps_RC -- --# Dependencies to place after the objects being linked to create a --# shared library. --postdeps=$lt_postdeps_RC -- --# The library search path used internally by the compiler when linking --# a shared library. --compiler_lib_search_path=$lt_compiler_lib_search_path_RC -- - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method - -@@ -19361,10 +7723,10 @@ - file_magic_cmd=$lt_file_magic_cmd - - # Flag that allows shared libraries with undefined symbols to be built. --allow_undefined_flag=$lt_allow_undefined_flag_RC -+allow_undefined_flag=$lt_allow_undefined_flag - - # Flag that forces no undefined symbols. --no_undefined_flag=$lt_no_undefined_flag_RC -+no_undefined_flag=$lt_no_undefined_flag - - # Commands used to finish a libtool library installation in a directory. - finish_cmds=$lt_finish_cmds -@@ -19373,13 +7735,13 @@ - finish_eval=$lt_finish_eval - - # Take the output of nm and produce a listing of raw symbols and C names. --global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -+global_symbol_pipe=$lt_global_symbol_pipe - - # Transform the output of nm in a proper C declaration --global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -+global_symbol_to_cdecl=$lt_global_symbol_to_cdecl - - # Transform the output of nm in a C name address pair --global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -+global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address - - # This is the shared library runtime path variable. - runpath_var=$runpath_var -@@ -19391,45 +7753,36 @@ - shlibpath_overrides_runpath=$shlibpath_overrides_runpath - - # How to hardcode a shared library path into an executable. --hardcode_action=$hardcode_action_RC -+hardcode_action=$hardcode_action - - # Whether we should hardcode library paths into libraries. - hardcode_into_libs=$hardcode_into_libs - - # Flag to hardcode \$libdir into a binary during linking. - # This must work even if \$libdir does not exist. --hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC -- --# If ld is used when linking, flag to hardcode \$libdir into --# a binary during linking. This must work even if \$libdir does --# not exist. --hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC -+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - - # Whether we need a single -rpath flag with a separated argument. --hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC -+hardcode_libdir_separator=$lt_hardcode_libdir_separator - --# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the - # resulting binary. --hardcode_direct=$hardcode_direct_RC -+hardcode_direct=$hardcode_direct - - # Set to yes if using the -LDIR flag during linking hardcodes DIR into the - # resulting binary. --hardcode_minus_L=$hardcode_minus_L_RC -+hardcode_minus_L=$hardcode_minus_L - - # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into - # the resulting binary. --hardcode_shlibpath_var=$hardcode_shlibpath_var_RC -- --# Set to yes if building a shared library automatically hardcodes DIR into the library --# and all subsequent libraries and executables linked against it. --hardcode_automatic=$hardcode_automatic_RC -+hardcode_shlibpath_var=$hardcode_shlibpath_var - - # Variables whose values should be saved in libtool wrapper scripts and - # restored at relink time. - variables_saved_for_relink="$variables_saved_for_relink" - - # Whether libtool must link a program against all its dependency libraries. --link_all_deplibs=$link_all_deplibs_RC -+link_all_deplibs=$link_all_deplibs - - # Compile-time system search path for libraries - sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -@@ -19438,75 +7791,234 @@ - sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - - # Fix the shell variable \$srcfile for the compiler. --fix_srcfile_path="$fix_srcfile_path_RC" -+fix_srcfile_path="$fix_srcfile_path" - - # Set to yes if exported symbols are required. --always_export_symbols=$always_export_symbols_RC -+always_export_symbols=$always_export_symbols - - # The commands to list exported symbols. --export_symbols_cmds=$lt_export_symbols_cmds_RC -+export_symbols_cmds=$lt_export_symbols_cmds - - # The commands to extract the exported symbol list from a shared archive. - extract_expsyms_cmds=$lt_extract_expsyms_cmds - - # Symbols that should not be listed in the preloaded symbols. --exclude_expsyms=$lt_exclude_expsyms_RC -+exclude_expsyms=$lt_exclude_expsyms - - # Symbols that must always be exported. --include_expsyms=$lt_include_expsyms_RC -+include_expsyms=$lt_include_expsyms - --# ### END LIBTOOL TAG CONFIG: $tagname -+# ### END LIBTOOL CONFIG - - __EOF__ - -+ case $host_os in -+ aix3*) -+ cat <<\EOF >> "${ofile}T" - --else -- # If there is no Makefile yet, we rely on a make rule to execute -- # `config.status --recheck' to rerun these tests and create the -- # libtool script then. -- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` -- if test -f "$ltmain_in"; then -- test -f Makefile && make "$ltmain" -- fi -+# AIX sometimes has problems with the GCC collect2 program. For some -+# reason, if we set the COLLECT_NAMES environment variable, the problems -+# vanish in a puff of smoke. -+if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES - fi -+EOF -+ ;; -+ esac - -+ case $host_os in -+ cygwin* | mingw* | pw32* | os2*) -+ cat <<'EOF' >> "${ofile}T" -+ # This is a source program that is used to create dlls on Windows -+ # Don't remove nor modify the starting and closing comments -+# /* ltdll.c starts here */ -+# #define WIN32_LEAN_AND_MEAN -+# #include -+# #undef WIN32_LEAN_AND_MEAN -+# #include -+# -+# #ifndef __CYGWIN__ -+# # ifdef __CYGWIN32__ -+# # define __CYGWIN__ __CYGWIN32__ -+# # endif -+# #endif -+# -+# #ifdef __cplusplus -+# extern "C" { -+# #endif -+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -+# #ifdef __cplusplus -+# } -+# #endif -+# -+# #ifdef __CYGWIN__ -+# #include -+# DECLARE_CYGWIN_DLL( DllMain ); -+# #endif -+# HINSTANCE __hDllInstance_base; -+# -+# BOOL APIENTRY -+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -+# { -+# __hDllInstance_base = hInst; -+# return TRUE; -+# } -+# /* ltdll.c ends here */ -+ # This is a source program that is used to create import libraries -+ # on Windows for dlls which lack them. Don't remove nor modify the -+ # starting and closing comments -+# /* impgen.c starts here */ -+# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. -+# -+# This file is part of GNU libtool. -+# -+# 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 /* for printf() */ -+# #include /* for open(), lseek(), read() */ -+# #include /* for O_RDONLY, O_BINARY */ -+# #include /* for strdup() */ -+# -+# /* O_BINARY isn't required (or even defined sometimes) under Unix */ -+# #ifndef O_BINARY -+# #define O_BINARY 0 -+# #endif -+# -+# static unsigned int -+# pe_get16 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[2]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 2); -+# return b[0] + (b[1]<<8); -+# } -+# -+# static unsigned int -+# pe_get32 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[4]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 4); -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# static unsigned int -+# pe_as32 (ptr) -+# void *ptr; -+# { -+# unsigned char *b = ptr; -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# int -+# main (argc, argv) -+# int argc; -+# char *argv[]; -+# { -+# int dll; -+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -+# unsigned long export_rva, export_size, nsections, secptr, expptr; -+# unsigned long name_rvas, nexp; -+# unsigned char *expdata, *erva; -+# char *filename, *dll_name; -+# -+# filename = argv[1]; -+# -+# dll = open(filename, O_RDONLY|O_BINARY); -+# if (dll < 1) -+# return 1; -+# -+# dll_name = filename; -+# -+# for (i=0; filename[i]; i++) -+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -+# dll_name = filename + i +1; -+# -+# pe_header_offset = pe_get32 (dll, 0x3c); -+# opthdr_ofs = pe_header_offset + 4 + 20; -+# num_entries = pe_get32 (dll, opthdr_ofs + 92); -+# -+# if (num_entries < 1) /* no exports */ -+# return 1; -+# -+# export_rva = pe_get32 (dll, opthdr_ofs + 96); -+# export_size = pe_get32 (dll, opthdr_ofs + 100); -+# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -+# secptr = (pe_header_offset + 4 + 20 + -+# pe_get16 (dll, pe_header_offset + 4 + 16)); -+# -+# expptr = 0; -+# for (i = 0; i < nsections; i++) -+# { -+# char sname[8]; -+# unsigned long secptr1 = secptr + 40 * i; -+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -+# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -+# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -+# lseek(dll, secptr1, SEEK_SET); -+# read(dll, sname, 8); -+# if (vaddr <= export_rva && vaddr+vsize > export_rva) -+# { -+# expptr = fptr + (export_rva - vaddr); -+# if (export_rva + export_size > vaddr + vsize) -+# export_size = vsize - (export_rva - vaddr); -+# break; -+# } -+# } -+# -+# expdata = (unsigned char*)malloc(export_size); -+# lseek (dll, expptr, SEEK_SET); -+# read (dll, expdata, export_size); -+# erva = expdata - export_rva; -+# -+# nexp = pe_as32 (expdata+24); -+# name_rvas = pe_as32 (expdata+32); -+# -+# printf ("EXPORTS\n"); -+# for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) - -- *) -- { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 --echo "$as_me: error: Unsupported tag name: $tagname" >&2;} -- { (exit 1); exit 1; }; } -- ;; -- esac -+ mv -f "${ofile}T" "$ofile" || \ -+ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") -+ chmod +x "$ofile" -+fi - -- # Append the new tag name to the list of available tags. -- if test -n "$tagname" ; then -- available_tags="$available_tags $tagname" -- fi -- fi -- done -- IFS="$lt_save_ifs" - -- # Now substitute the updated list of available tags. -- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then -- mv "${ofile}T" "$ofile" -- chmod +x "$ofile" -- else -- rm -f "${ofile}T" -- { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 --echo "$as_me: error: unable to update list of available tagged configurations." >&2;} -- { (exit 1); exit 1; }; } -- fi --fi - - - -@@ -19521,24 +8033,6 @@ - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - DEBUG="-g" - if test -z "$GCC"; then - XIPH_CPPFLAGS="-D_REENTRANT" -@@ -19614,8 +8108,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19782,8 +8275,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19932,8 +8424,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20086,8 +8577,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20279,8 +8769,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20350,8 +8839,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20405,8 +8893,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20476,8 +8963,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20631,8 +9117,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20693,8 +9178,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20738,8 +9222,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20813,8 +9296,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20959,8 +9441,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21116,8 +9597,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21171,8 +9651,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21246,8 +9725,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21301,8 +9779,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21410,8 +9887,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21478,8 +9954,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21524,8 +9999,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21625,8 +10099,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21802,8 +10275,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21930,8 +10402,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22009,8 +10480,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22051,8 +10521,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22154,8 +10623,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22232,8 +10700,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22282,8 +10749,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22351,8 +10817,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22513,8 +10978,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22586,8 +11050,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22639,8 +11102,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22792,8 +11254,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22866,8 +11327,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22917,8 +11377,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22969,8 +11428,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23118,8 +11576,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23299,8 +11756,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23371,8 +11827,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23448,8 +11903,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23654,7 +12108,11 @@ - - fi; - --if test "x$curl_prefix" != "x" -a "x$curl_prefix" != "xyes"; then -+curl_ok="yes" -+ -+if test "x$curl_prefix" == "xno"; then -+ curl_ok="no" -+elif test "x$curl_prefix" != "x" -a "x$curl_prefix" != "xyes"; then - CURL_LIBS="-L$curl_prefix/lib -lcurl" - CURL_CFLAGS="-I$curl_prefix/include" - elif test "x$CURL_CONFIG" != "x"; then -@@ -23675,8 +12133,8 @@ - CURL_CFLAGS="-I$curl_prefix/include" - fi - --curl_ok="yes" -- -+if test "$curl_ok" = "yes" -+then - xt_curl_CPPFLAGS="$CPPFLAGS" - xt_curl_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $CURL_CFLAGS" -@@ -23715,8 +12173,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23835,16 +12292,7 @@ - - echo "$as_me:$LINENO: checking for libcurl" >&5 - echo $ECHO_N "checking for libcurl... $ECHO_C" >&6 --if test "$curl_ok" = "yes" --then -- if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF -+cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23858,12 +12306,22 @@ - } - - _ACEOF --rm -f conftest$ac_exeext -+rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23871,16 +12329,13 @@ - (exit $ac_status); }; }; then - : - else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 -+ echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --( exit $ac_status ) - curl_ok="no" - fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi --fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test "$curl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 - echo "${ECHO_T}yes" >&6 -@@ -23924,8 +12379,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24003,6 +12457,7 @@ - fi - CPPFLAGS="$xt_curl_CPPFLAGS" - LIBS="$xt_curl_LIBS" -+fi - - # Check whether --enable-yp or --disable-yp was given. - if test "${enable_yp+set}" = set; then -@@ -24734,22 +13189,12 @@ - s,@host_cpu@,$host_cpu,;t t - s,@host_vendor@,$host_vendor,;t t - s,@host_os@,$host_os,;t t --s,@EGREP@,$EGREP,;t t - s,@LN_S@,$LN_S,;t t - s,@ECHO@,$ECHO,;t t --s,@AR@,$AR,;t t --s,@ac_ct_AR@,$ac_ct_AR,;t t - s,@RANLIB@,$RANLIB,;t t - s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t - s,@CPP@,$CPP,;t t --s,@CXX@,$CXX,;t t --s,@CXXFLAGS@,$CXXFLAGS,;t t --s,@ac_ct_CXX@,$ac_ct_CXX,;t t --s,@CXXDEPMODE@,$CXXDEPMODE,;t t --s,@CXXCPP@,$CXXCPP,;t t --s,@F77@,$F77,;t t --s,@FFLAGS@,$FFLAGS,;t t --s,@ac_ct_F77@,$ac_ct_F77,;t t -+s,@EGREP@,$EGREP,;t t - s,@LIBTOOL@,$LIBTOOL,;t t - s,@XSLTCONFIG@,$XSLTCONFIG,;t t - s,@FGREP@,$FGREP,;t t -@@ -24953,11 +13398,6 @@ - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - -- if test x"$ac_file" != x-; then -- { echo "$as_me:$LINENO: creating $ac_file" >&5 --echo "$as_me: creating $ac_file" >&6;} -- rm -f "$ac_file" -- fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ -@@ -24996,6 +13436,12 @@ - fi;; - esac - done` || { (exit 1); exit 1; } -+ -+ if test x"$ac_file" != x-; then -+ { echo "$as_me:$LINENO: creating $ac_file" >&5 -+echo "$as_me: creating $ac_file" >&6;} -+ rm -f "$ac_file" -+ fi - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -diff -ruN icecast-2.3.0-old/m4/xiph_curl.m4 icecast-2.3.0-new/m4/xiph_curl.m4 ---- icecast-2.3.0-old/m4/xiph_curl.m4 2005-08-19 04:02:00.000000000 +0200 -+++ icecast-2.3.0-new/m4/xiph_curl.m4 2005-10-02 12:34:19.000000000 +0200 -@@ -14,7 +14,11 @@ - AC_HELP_STRING([--with-curl-config=curl-config],[Use curl-config to find libcurl]), - CURL_CONFIG="$withval", [AC_PATH_PROGS(CURL_CONFIG, [curl-config], "")]) - --if test "x$curl_prefix" != "x" -a "x$curl_prefix" != "xyes"; then -+curl_ok="yes" -+ -+if test "x$curl_prefix" == "xno"; then -+ curl_ok="no" -+elif test "x$curl_prefix" != "x" -a "x$curl_prefix" != "xyes"; then - CURL_LIBS="-L$curl_prefix/lib -lcurl" - CURL_CFLAGS="-I$curl_prefix/include" - elif test "x$CURL_CONFIG" != "x"; then -@@ -33,8 +37,8 @@ - CURL_CFLAGS="-I$curl_prefix/include" - fi - --curl_ok="yes" -- -+if test "$curl_ok" = "yes" -+then - xt_curl_CPPFLAGS="$CPPFLAGS" - xt_curl_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $CURL_CFLAGS" -@@ -44,16 +48,13 @@ - dnl - AC_CHECK_HEADERS([curl/curl.h],, curl_ok="no") - AC_MSG_CHECKING(for libcurl) --if test "$curl_ok" = "yes" --then -- AC_RUN_IFELSE(AC_LANG_SOURCE([ -+AC_LINK_IFELSE(AC_LANG_SOURCE([ - #include - int main() - { - return 0; - } - ]),,[curl_ok="no"]) --fi - if test "$curl_ok" = "yes"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CURL, 1, [Define if you have libcurl.]) -@@ -66,4 +67,5 @@ - fi - CPPFLAGS="$xt_curl_CPPFLAGS" - LIBS="$xt_curl_LIBS" -+fi - ]) diff --git a/openwrt/package/id3lib/Config.in b/openwrt/package/id3lib/Config.in deleted file mode 100644 index 6bca99aa607..00000000000 --- a/openwrt/package/id3lib/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_ID3LIB - prompt "id3lib............................ An ID3v1/ID3v2 tagging library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_UCLIBCXX - select BR2_PACKAGE_ZLIB - help - An ID3v1/ID3v2 tagging library. - - http://www.id3lib.org/ - - Depends: uClibc++, zlib - diff --git a/openwrt/package/id3lib/Makefile b/openwrt/package/id3lib/Makefile deleted file mode 100644 index fd02bef87c1..00000000000 --- a/openwrt/package/id3lib/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=id3lib -PKG_VERSION:=3.8.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=19f27ddd2dda4b2d26a559a4f0f402a7 - -PKG_SOURCE_URL:=@SF/id3lib -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ID3LIB,id3lib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(LINUX_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-Wl,-Bdynamic,-luClibc++,-Bstatic,-lstdc++,-Bdynamic,-lz,-lm,-lc" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_ID3LIB): - install -d -m0755 $(IDIR_ID3LIB)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(IDIR_ID3LIB)/usr/lib/ - $(IPKG_BUILD) $(IDIR_ID3LIB) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libid3.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/id3 $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/id3.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3.so $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libid3.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/id3 \ - $(STAGING_DIR)/usr/include/id3.h \ - $(STAGING_DIR)/usr/lib/libid3.a \ - $(STAGING_DIR)/usr/lib/libid3.so \ - $(STAGING_DIR)/usr/lib/libid3-*.so.* \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/id3lib/ipkg/id3lib.control b/openwrt/package/id3lib/ipkg/id3lib.control deleted file mode 100644 index c49b70ea6a4..00000000000 --- a/openwrt/package/id3lib/ipkg/id3lib.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: id3lib -Priority: optional -Section: libs -Depends: uclibc++, zlib -Description: An ID3v1/ID3v2 tagging library. diff --git a/openwrt/package/iftop/Config.in b/openwrt/package/iftop/Config.in deleted file mode 100644 index f2d41d5321a..00000000000 --- a/openwrt/package/iftop/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_IFTOP - prompt "iftop............................. display bandwith usage on an interface" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBNCURSES - select BR2_PACKAGE_LIBPTHREAD - help - iftop does for network usage what top(1) does for CPU usage. It - listens to network traffic on a named interface and displays a - table of current bandwidth usage by pairs of hosts. Handy for - answering the question "why is our ADSL link so slow?". - - http://www.ex-parrot.com/~pdw/iftop/ diff --git a/openwrt/package/iftop/Makefile b/openwrt/package/iftop/Makefile deleted file mode 100644 index a42d58d5266..00000000000 --- a/openwrt/package/iftop/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=iftop -PKG_VERSION:=0.17 -PKG_RELEASE:=1 -PKG_MD5SUM:=062bc8fb3856580319857326e0b8752d - -PKG_SOURCE_URL:=http://www.ex-parrot.com/~pdw/iftop/download -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,IFTOP,iftop,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --bindir=/usr/bin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $@ - -$(IPKG_IFTOP): - install -d -m0755 $(IDIR_IFTOP)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME) $(IDIR_IFTOP)/usr/bin/ - $(STRIP) $(IDIR_IFTOP)/usr/bin/* - $(IPKG_BUILD) $(IDIR_IFTOP) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/iftop/ipkg/iftop.control b/openwrt/package/iftop/ipkg/iftop.control deleted file mode 100644 index ce2cbadd5ee..00000000000 --- a/openwrt/package/iftop/ipkg/iftop.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iftop -Priority: optional -Section: net -Depends: libncurses, libpcap, libpthread -Description: display bandwith usage on an interface diff --git a/openwrt/package/igmpproxy/Config.in b/openwrt/package/igmpproxy/Config.in deleted file mode 100644 index c66258a23ec..00000000000 --- a/openwrt/package/igmpproxy/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_IGMPPROXY - prompt "igmpproxy......................... Multicast Routing Daemon" - tristate - default m if CONFIG_DEVEL - help - IGMPproxy is a simple dynamic Multicast Routing Daemon using - only IGMP signalling (Internet Group Management Protocol). - - http://sourceforge.net/projects/igmpproxy diff --git a/openwrt/package/igmpproxy/Makefile b/openwrt/package/igmpproxy/Makefile deleted file mode 100644 index eecfb6317b2..00000000000 --- a/openwrt/package/igmpproxy/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=igmpproxy -PKG_VERSION:=0.1-beta2 -PKG_RELEASE:=1 -PKG_MD5SUM:=2a5a59480f44d4b14077a6b5319e9940 - -PKG_SOURCE_URL:=@SF/igmpproxy -PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_CAT:=zcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,IGMPPROXY,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR)/src - touch $@ - -$(IPKG_IGMPPROXY): - mkdir -p $(IDIR_IGMPPROXY)/usr/sbin $(IDIR_IGMPPROXY)/etc - $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(IDIR_IGMPPROXY)/usr/sbin/ - $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME).conf $(IDIR_IGMPPROXY)/etc - $(STRIP) $(IDIR_IGMPPROXY)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_IGMPPROXY) $(PACKAGE_DIR) diff --git a/openwrt/package/igmpproxy/ipkg/igmpproxy.control b/openwrt/package/igmpproxy/ipkg/igmpproxy.control deleted file mode 100644 index 26bfe156390..00000000000 --- a/openwrt/package/igmpproxy/ipkg/igmpproxy.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: igmpproxy -Section: net -Priority: optional -Description: IGMPproxy is a simple dynamic Multicast Routing Daemon. diff --git a/openwrt/package/ipcad/Config.in b/openwrt/package/ipcad/Config.in deleted file mode 100644 index fa5d0e91fd0..00000000000 --- a/openwrt/package/ipcad/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_IPCAD - prompt "ipcad............................. listens for traffic on the specified interfaces" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPCAP - help - This daemon listens for traffic on the specified interfaces. - It has the built-in RSH and NetFlow engines to allow exporting - the accounting data the same way as Cisco routers do. - - http://lionet.info/ipcad/ - diff --git a/openwrt/package/ipcad/Makefile b/openwrt/package/ipcad/Makefile deleted file mode 100644 index 21231d4c1cc..00000000000 --- a/openwrt/package/ipcad/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ipcad -PKG_VERSION:=3.7 -PKG_RELEASE:=1 -PKG_MD5SUM:=34c542c99593dfe9d5b408deffcfe70e - -PKG_SOURCE_URL:=@SF/ipcad -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,IPCAD,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - touch cfglex.c cslex.c; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-rpath \ - --with-gnu-ld \ - --with-psrc=pcap \ - --with-pcap-include="$(STAGING_DIR)/usr/include" \ - --with-pcap-libraries="$(STAGING_DIR)/usr/lib" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - all install - touch $@ - -$(IPKG_IPCAD): - install -d -m0755 $(IDIR_IPCAD)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/ipcad.conf $(IDIR_IPCAD)/etc/ - install -d -m0755 $(IDIR_IPCAD)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ipcad $(IDIR_IPCAD)/usr/bin/ - $(RSTRIP) $(IDIR_IPCAD) - $(IPKG_BUILD) $(IDIR_IPCAD) $(PACKAGE_DIR) diff --git a/openwrt/package/ipcad/ipkg/ipcad.conffiles b/openwrt/package/ipcad/ipkg/ipcad.conffiles deleted file mode 100644 index f6843d846da..00000000000 --- a/openwrt/package/ipcad/ipkg/ipcad.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ipcad.conf diff --git a/openwrt/package/ipcad/ipkg/ipcad.control b/openwrt/package/ipcad/ipkg/ipcad.control deleted file mode 100644 index 93df70c1d5e..00000000000 --- a/openwrt/package/ipcad/ipkg/ipcad.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: ipcad -Depends: libpcap -Section: net -Architecture: mipsel -Priority: optional -Description: IPCAD stands for IP Cisco Accounting Daemon. It runs in background, listens traffic on the specified interfaces, and records the traffic for later retrieval and analysis. IPCAD can use raw BPF devices, PCAP library, divert, tee or Linux iptables' ULOG & IPQ packet sources to capture the packets. diff --git a/openwrt/package/ipcad/patches/01-honor_cppflags.patch b/openwrt/package/ipcad/patches/01-honor_cppflags.patch deleted file mode 100644 index 55f9888412b..00000000000 --- a/openwrt/package/ipcad/patches/01-honor_cppflags.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ruN ipcad-3.7-old/Makefile.in ipcad-3.7-new/Makefile.in ---- ipcad-3.7-old/Makefile.in 2005-11-21 05:41:07.000000000 +0100 -+++ ipcad-3.7-new/Makefile.in 2005-12-20 10:27:07.000000000 +0100 -@@ -9,6 +9,7 @@ - LDFLAGS+= @LDFLAGS@ - LIBS+= @LIBS@ - CFLAGS+= @CFLAGS@ @DEFS@ -W -Wall -+CPPFLAGS+= @CPPFLAGS@ - CPPFLAGS+=-DIPCAD_VERSION=\"@IPCAD_VERSION@\" - CPPFLAGS+=-DCONFIG_FILE=\"${sysconfdir}/ipcad.conf\" - CPPFLAGS+=@DEFS@ -D_REENTRANT -D_THREAD_SAFE diff --git a/openwrt/package/iperf/Config.in b/openwrt/package/iperf/Config.in deleted file mode 100644 index 2e939ad1907..00000000000 --- a/openwrt/package/iperf/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_IPERF - prompt "iperf............................. Internet Protocol bandwidth measuring tool" - tristate - default m if CONFIG_DEVEL - help - Iperf is a modern alternative for measuring TCP and UDP bandwidth - performance, allowing the tuning of various parameters and - characteristics. - - http://dast.nlanr.net/Projects/Iperf/ - diff --git a/openwrt/package/iperf/Makefile b/openwrt/package/iperf/Makefile deleted file mode 100644 index dc12dc0f4dd..00000000000 --- a/openwrt/package/iperf/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=iperf -PKG_VERSION:=2.0.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=bb658aba58a5af0356f5b1342dfe8f53 - -PKG_SOURCE_URL:=http://dast.nlanr.net/Projects/Iperf2.0 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,IPERF,iperf,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ - LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm -lgcc_s" \ - ac_cv_func_malloc_0_nonnull=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-rpath \ - --disable-multicast \ - --disable-threads \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" install - touch $@ - -$(IPKG_IPERF): - install -d -m0755 $(IDIR_IPERF)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/iperf $(IDIR_IPERF)/usr/bin - $(RSTRIP) $(IDIR_IPERF) - $(IPKG_BUILD) $(IDIR_IPERF) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/iperf/ipkg/iperf.control b/openwrt/package/iperf/ipkg/iperf.control deleted file mode 100644 index 16a82217ba7..00000000000 --- a/openwrt/package/iperf/ipkg/iperf.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iperf -Priority: optional -Section: net -Depends: uclibc++ -Description: Internet Protocol bandwidth measuring tool. diff --git a/openwrt/package/iptraf/Config.in b/openwrt/package/iptraf/Config.in deleted file mode 100644 index 3f15165d003..00000000000 --- a/openwrt/package/iptraf/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_IPTRAF - prompt "iptraf............................ A console-based network monitoring program" - tristate - default m if CONFIG_DEVEL - help - IPTraf is a console-based network statistics utility for Linux. It gathers - a variety of figures such as TCP connection packet and byte counts, - interface statistics and activity indicators, TCP/UDP traffic breakdowns, - and LAN station packet and byte counts. - - http://iptraf.seul.org/ - diff --git a/openwrt/package/iptraf/Makefile b/openwrt/package/iptraf/Makefile deleted file mode 100644 index c5ae8eab75d..00000000000 --- a/openwrt/package/iptraf/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=iptraf -PKG_VERSION:=2.7.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=7ff0bc933a0a57a4ca9e2b0443307539 - -PKG_SOURCE_URL:=ftp://iptraf.seul.org/pub/iptraf/ \ - ftp://the.wiretapped.net/pub/security/network-monitoring/iptraf/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,IPTRAF,iptraf,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DEBUG="" \ - INCLUDEDIR="-I../support -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDOPTS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PLATFORM="-DPLATFORM=\\\"Linux/$(ARCH)\\\"" \ - TARGET="/usr/bin" \ - WORKDIR="/var/lib/iptraf" \ - all - touch $@ - -$(IPKG_IPTRAF): - install -d -m0755 $(IDIR_IPTRAF)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/src/iptraf $(IDIR_IPTRAF)/usr/bin/ - $(RSTRIP) $(IDIR_IPTRAF) - $(IPKG_BUILD) $(IDIR_IPTRAF) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/iptraf/ipkg/iptraf.control b/openwrt/package/iptraf/ipkg/iptraf.control deleted file mode 100644 index 840c9d1e032..00000000000 --- a/openwrt/package/iptraf/ipkg/iptraf.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptraf -Priority: optional -Section: net -Depends: libncurses -Description: A console-based network monitoring program. diff --git a/openwrt/package/iptraf/patches/iptraf-2.7.0-cross_compile.patch b/openwrt/package/iptraf/patches/iptraf-2.7.0-cross_compile.patch deleted file mode 100644 index 6c0119df73a..00000000000 --- a/openwrt/package/iptraf/patches/iptraf-2.7.0-cross_compile.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -ruN iptraf-2.7.0-old/support/Makefile iptraf-2.7.0-new/support/Makefile ---- iptraf-2.7.0-old/support/Makefile 2001-11-27 09:37:11.000000000 +0100 -+++ iptraf-2.7.0-new/support/Makefile 2005-10-03 18:40:40.000000000 +0200 -@@ -3,16 +3,21 @@ - OBJS = input.o menurt.o listbox.o winops.o labels.o \ - msgboxes.o - -+AR=ar -+CC=cc -+RANLIB=ranlib -+CFLAGS= -O2 -g -fPIC -+ - all: libtextbox.a - - libtextbox.a: $(OBJS) - rm -rf libtextbox.a -- ar cq libtextbox.a $(OBJS) -- ranlib libtextbox.a --# gcc -shared -o libtextbox.so $(OBJS) -+ $(AR) cq libtextbox.a $(OBJS) -+ $(RANLIB) libtextbox.a -+# $(CC) -shared -o libtextbox.so $(OBJS) - - %.o: %.c *.h -- gcc -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $< -+ $(CC) $(CFLAGS) -Wall $(INCLUDEDIR) -c -o $*.o $< - - clean: - rm -rf *.o *~ libtextbox.a libtextbox.so diff --git a/openwrt/package/iptraf/patches/iptraf-2.7.0-ifaces.patch b/openwrt/package/iptraf/patches/iptraf-2.7.0-ifaces.patch deleted file mode 100644 index fdf09a20138..00000000000 --- a/openwrt/package/iptraf/patches/iptraf-2.7.0-ifaces.patch +++ /dev/null @@ -1,549 +0,0 @@ -diff -ruN iptraf-2.7.0-old/src/dirs.h iptraf-2.7.0-new/src/dirs.h ---- iptraf-2.7.0-old/src/dirs.h 2001-05-03 12:44:11.000000000 +0200 -+++ iptraf-2.7.0-new/src/dirs.h 2005-10-04 21:51:26.000000000 +0200 -@@ -148,11 +148,10 @@ - #define PORTFILE get_path(T_WORKDIR, "ports.dat") - - /* -- * The Ethernet and FDDI host description files -+ * The Ethernet host description files - */ - - #define ETHFILE get_path(T_WORKDIR, "ethernet.desc") --#define FDDIFILE get_path(T_WORKDIR, "fddi.desc") - - /* - * The rvnamed program file -diff -ruN iptraf-2.7.0-old/src/hostmon.c iptraf-2.7.0-new/src/hostmon.c ---- iptraf-2.7.0-old/src/hostmon.c 2002-04-16 04:15:25.000000000 +0200 -+++ iptraf-2.7.0-new/src/hostmon.c 2005-10-04 21:52:02.000000000 +0200 -@@ -30,7 +30,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -294,8 +293,6 @@ - wprintw(table->tabwin, "Ethernet"); - else if (entry->un.desc.linktype == LINK_PLIP) - wprintw(table->tabwin, "PLIP"); -- else if (entry->un.desc.linktype == LINK_FDDI) -- wprintw(table->tabwin, "FDDI"); - - wprintw(table->tabwin, " HW addr: %s", entry->un.desc.ascaddr); - -@@ -771,7 +768,6 @@ - - initethtab(&table, options->actmode); - loaddesclist(&elist, LINK_ETHERNET, WITHETCETHERS); -- loaddesclist(&flist, LINK_FDDI, WITHETCETHERS); - - if (logging) { - if (strcmp(current_logfile, "") == 0) -@@ -854,7 +850,7 @@ - } - linktype = getlinktype(fromaddr.sll_hatype, ifname, -1, NULL); - -- if ((linktype == LINK_ETHERNET) || (linktype == LINK_FDDI) -+ if ((linktype == LINK_ETHERNET) - || (linktype == LINK_PLIP) || (linktype == LINK_TR)) { - if (fromaddr.sll_protocol == htons(ETH_P_IP)) - is_ip = 1; -@@ -871,12 +867,6 @@ - memcpy(scratch_daddr, ((struct ethhdr *) buf)->h_dest, - ETH_ALEN); - list = &elist; -- } else if (linktype == LINK_FDDI) { -- memcpy(scratch_saddr, ((struct fddihdr *) buf)->saddr, -- FDDI_K_ALEN); -- memcpy(scratch_daddr, ((struct fddihdr *) buf)->daddr, -- FDDI_K_ALEN); -- list = &flist; - } else if (linktype == LINK_TR) { - memcpy(scratch_saddr, ((struct trh_hdr *) buf)->saddr, - TR_ALEN); -diff -ruN iptraf-2.7.0-old/src/ifaces.c iptraf-2.7.0-new/src/ifaces.c ---- iptraf-2.7.0-old/src/ifaces.c 2002-05-08 11:43:27.000000000 +0200 -+++ iptraf-2.7.0-new/src/ifaces.c 2005-10-04 21:54:00.000000000 +0200 -@@ -37,9 +37,9 @@ - extern int daemonized; - - char ifaces[][6] = -- { "lo", "eth", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb", -+ { "lo", "eth", "sl", "ppp", "ippp", "plip", "isdn", "dvb", - "pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3", -- "pent", "lec" }; -+ "pent", "lec", "vlan" }; - - char *ltrim(char *buf) - { -diff -ruN iptraf-2.7.0-old/src/landesc.c iptraf-2.7.0-new/src/landesc.c ---- iptraf-2.7.0-old/src/landesc.c 2001-11-27 11:23:32.000000000 +0100 -+++ iptraf-2.7.0-new/src/landesc.c 2005-10-04 21:57:33.000000000 +0200 -@@ -82,8 +82,6 @@ - - if (linktype == LINK_ETHERNET) - fd = fopen(ETHFILE, "r"); -- else if (linktype == LINK_FDDI) -- fd = fopen(FDDIFILE, "r"); - - if (fd == NULL) { - return; -@@ -204,8 +202,6 @@ - - if (linktype == LINK_ETHERNET) - fd = fopen(ETHFILE, "w"); -- else if (linktype == LINK_FDDI) -- fd = fopen(FDDIFILE, "w"); - - if (fd < 0) { - etherr(); -diff -ruN iptraf-2.7.0-old/src/links.h iptraf-2.7.0-new/src/links.h ---- iptraf-2.7.0-old/src/links.h 2001-12-18 03:45:16.000000000 +0100 -+++ iptraf-2.7.0-new/src/links.h 2005-10-04 21:57:17.000000000 +0200 -@@ -5,7 +5,6 @@ - #define LINK_LOOPBACK 5 - #define LINK_ISDN_RAWIP 6 - #define LINK_ISDN_CISCOHDLC 7 --#define LINK_FDDI 8 - #define LINK_FRAD 9 - #define LINK_DLCI 10 - #define LINK_TR 11 -diff -ruN iptraf-2.7.0-old/src/log.c iptraf-2.7.0-new/src/log.c ---- iptraf-2.7.0-old/src/log.c 2002-04-22 05:59:15.000000000 +0200 -+++ iptraf-2.7.0-new/src/log.c 2005-10-04 21:57:51.000000000 +0200 -@@ -465,8 +465,6 @@ - ptmp->un.desc.ascaddr); - else if (ptmp->un.desc.linktype == LINK_PLIP) - fprintf(fd, "\nPLIP address: %s", ptmp->un.desc.ascaddr); -- else if (ptmp->un.desc.linktype == LINK_FDDI) -- fprintf(fd, "\nFDDI address: %s", ptmp->un.desc.ascaddr); - - if (ptmp->un.desc.withdesc) - fprintf(fd, " (%s)", ptmp->un.desc.desc); -diff -ruN iptraf-2.7.0-old/src/options.c iptraf-2.7.0-new/src/options.c ---- iptraf-2.7.0-old/src/options.c 2001-12-28 10:39:15.000000000 +0100 -+++ iptraf-2.7.0-new/src/options.c 2005-10-04 21:58:15.000000000 +0200 -@@ -67,8 +67,6 @@ - tx_additem(menu, NULL, NULL); - tx_additem(menu, " ^E^thernet/PLIP host descriptions...", - "Manages descriptions for Ethernet and PLIP addresses"); -- tx_additem(menu, " ^F^DDI/Token Ring host descriptions...", -- "Manages descriptions for FDDI and FDDI addresses"); - tx_additem(menu, NULL, NULL); - tx_additem(menu, " E^x^it configuration", "Returns to main menu"); - } -@@ -366,9 +364,6 @@ - case 14: - ethdescmgr(LINK_ETHERNET); - break; -- case 15: -- ethdescmgr(LINK_FDDI); -- break; - } - - indicatesetting(row, options, statwin); -diff -ruN iptraf-2.7.0-old/src/othptab.c iptraf-2.7.0-new/src/othptab.c ---- iptraf-2.7.0-old/src/othptab.c 2001-12-28 03:23:59.000000000 +0100 -+++ iptraf-2.7.0-new/src/othptab.c 2005-10-04 21:58:33.000000000 +0200 -@@ -19,7 +19,6 @@ - #include - #include - #include --#include - #include - #include "arphdr.h" - #include "options.h" -@@ -139,11 +138,6 @@ - new_entry->smacaddr); - convmacaddr(((struct ethhdr *) packet)->h_dest, - new_entry->dmacaddr); -- } else if (linkproto == LINK_FDDI) { -- convmacaddr(((struct fddihdr *) packet)->saddr, -- new_entry->smacaddr); -- convmacaddr(((struct fddihdr *) packet)->daddr, -- new_entry->dmacaddr); - } else if (linkproto == LINK_TR) { - convmacaddr(((struct trh_hdr *) packet)->saddr, - new_entry->smacaddr); -@@ -373,8 +367,7 @@ - strcat(msgstring, scratchpad); - - if ((entry->linkproto == LINK_ETHERNET) || -- (entry->linkproto == LINK_PLIP) || -- (entry->linkproto == LINK_FDDI)) { -+ (entry->linkproto == LINK_PLIP)) { - sprintf(scratchpad, " from %s to %s on %s", - entry->smacaddr, entry->dmacaddr, entry->iface); - -diff -ruN iptraf-2.7.0-old/src/packet.c iptraf-2.7.0-new/src/packet.c ---- iptraf-2.7.0-old/src/packet.c 2002-05-08 11:44:08.000000000 +0200 -+++ iptraf-2.7.0-new/src/packet.c 2005-10-04 21:59:12.000000000 +0200 -@@ -35,7 +35,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -80,10 +79,10 @@ - case ARPHRD_ETHER: - if (strncmp(ifname, "eth", 3) == 0) - result = LINK_ETHERNET; -+ else if (strncmp(ifname, "vlan", 4) == 0) -+ result = LINK_ETHERNET; - else if (strncmp(ifname, "plip", 4) == 0) - result = LINK_PLIP; -- else if (strncmp(ifname, "fddi", 4) == 0) /* For some Ethernet- */ -- result = LINK_ETHERNET; /* emulated FDDI ifaces */ - else if (strncmp(ifname, "dvb", 3) == 0) - result = LINK_ETHERNET; - else if (strncmp(ifname, "sbni", 4) == 0) -@@ -127,9 +126,6 @@ - case ARPHRD_PPP: - result = LINK_PPP; - break; -- case ARPHRD_FDDI: -- result = LINK_FDDI; -- break; - case ARPHRD_IEEE802: - case ARPHRD_IEEE802_TR: - result = LINK_TR; -@@ -179,19 +175,6 @@ - *packet = tpacket + 4; - *readlen -= 4; - break; -- case LINK_FDDI: -- *packet = tpacket + sizeof(struct fddihdr); -- *readlen -= sizeof(struct fddihdr); -- -- /* -- * Move IP data into an aligned buffer. 96 bytes should be sufficient -- * for IP and TCP headers with reasonable numbers of options and some -- * data. -- */ -- -- memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen)); -- *packet = aligned_buf; -- break; - case LINK_TR: - /* - * Token Ring patch supplied by Tomas Dvorak -diff -ruN iptraf-2.7.0-old/src/promisc.c iptraf-2.7.0-new/src/promisc.c ---- iptraf-2.7.0-old/src/promisc.c 2002-01-16 02:51:03.000000000 +0100 -+++ iptraf-2.7.0-new/src/promisc.c 2005-10-04 22:05:25.000000000 +0200 -@@ -81,7 +81,7 @@ - */ - - if ((strncmp(buf, "eth", 3) == 0) || -- (strncmp(buf, "fddi", 4) == 0) || -+ (strncmp(buf, "vlan", 4) == 0) || - (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) || - (strncmp(ptmp->params.ifname, "lec", 3) == 0) || - (accept_unsupported_interfaces)) { -@@ -194,7 +194,7 @@ - - while (ptmp != NULL) { - if (((strncmp(ptmp->params.ifname, "eth", 3) == 0) || -- (strncmp(ptmp->params.ifname, "fddi", 4) == 0) || -+ (strncmp(ptmp->params.ifname, "vlan", 4) == 0) || - (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) || - (strncmp(ptmp->params.ifname, "lec", 3) == 0)) && - (ptmp->params.state_valid)) { -diff -ruN iptraf-2.7.0-old/src/promisc.~c iptraf-2.7.0-new/src/promisc.~c ---- iptraf-2.7.0-old/src/promisc.~c 1970-01-01 01:00:00.000000000 +0100 -+++ iptraf-2.7.0-new/src/promisc.~c 2005-10-04 22:00:02.000000000 +0200 -@@ -0,0 +1,238 @@ -+/*** -+ -+promisc.c - handles the promiscuous mode flag for the Ethernet/FDDI -+ interfaces -+ -+Written by Gerard Paul Java -+Copyright (c) Gerard Paul Java 1997, 1998 -+ -+This module contains functions that manage the promiscuous states of -+the interfaces. -+ -+This software is open source; 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 WITHOUT ANY WARRANTY; without even the -+implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+See the GNU General Public License in the included COPYING file for -+details. -+ -+***/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include "ifstats.h" -+#include "ifaces.h" -+#include "error.h" -+#include "promisc.h" -+#include "dirs.h" -+ -+#define PROMISC_MSG_MAX 80 -+ -+extern int daemonized; -+extern int accept_unsupported_interfaces; -+ -+void init_promisc_list(struct promisc_states **list) -+{ -+ FILE *fd; -+ int ifd; -+ char buf[8]; -+ struct promisc_states *ptmp; -+ struct promisc_states *tail = NULL; -+ struct ifreq ifr; -+ int istat; -+ char err_msg[80]; -+ -+ ifd = socket(PF_INET, SOCK_DGRAM, 0); -+ -+ *list = NULL; -+ fd = open_procnetdev(); -+ -+ do { -+ get_next_iface(fd, buf); -+ -+ if (strcmp(buf, "") != 0) { -+ ptmp = malloc(sizeof(struct promisc_states)); -+ strcpy(ptmp->params.ifname, buf); -+ -+ if (*list == NULL) { -+ *list = ptmp; -+ } else -+ tail->next_entry = ptmp; -+ -+ tail = ptmp; -+ ptmp->next_entry = NULL; -+ -+ /* -+ * Retrieve and save interface flags -+ */ -+ -+ if ((strncmp(buf, "eth", 3) == 0) || -+ (strncmp(buf, "vlan", 4) == 0) || -+ (strncmp(buf, "fddi", 4) == 0) || -+ (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) || -+ (strncmp(ptmp->params.ifname, "lec", 3) == 0) || -+ (accept_unsupported_interfaces)) { -+ strcpy(ifr.ifr_name, buf); -+ -+ istat = ioctl(ifd, SIOCGIFFLAGS, &ifr); -+ -+ if (istat < 0) { -+ sprintf(err_msg, -+ "Unable to obtain interface parameters for %s", -+ buf); -+ write_error(err_msg, daemonized); -+ ptmp->params.state_valid = 0; -+ } else { -+ ptmp->params.saved_state = ifr.ifr_flags; -+ ptmp->params.state_valid = 1; -+ } -+ } -+ } -+ } while (strcmp(buf, "") != 0); -+} -+ -+/* -+ * Save interfaces and their states to a temporary file. Used only by the -+ * first IPTraf instance. Needed in case there are subsequent, simultaneous -+ * instances of IPTraf, which may still need promiscuous mode even after -+ * the first instance exits. These subsequent instances will need to restore -+ * the promiscuous state from this file. -+ */ -+ -+void save_promisc_list(struct promisc_states *list) -+{ -+ int fd; -+ struct promisc_states *ptmp = list; -+ -+ fd = open(PROMISCLISTFILE, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); -+ -+ if (fd < 0) { -+ write_error("Unable to save interface flags", daemonized); -+ return; -+ } -+ -+ while (ptmp != NULL) { -+ write(fd, &(ptmp->params), sizeof(struct promisc_params)); -+ ptmp = ptmp->next_entry; -+ } -+ -+ close(fd); -+} -+ -+/* -+ * Load promiscuous states into list -+ */ -+ -+void load_promisc_list(struct promisc_states **list) -+{ -+ int fd; -+ struct promisc_states *ptmp = NULL; -+ struct promisc_states *tail = NULL; -+ int br; -+ -+ fd = open(PROMISCLISTFILE, O_RDONLY); -+ -+ if (fd < 0) { -+ write_error("Unable to retrieve saved interface flags", -+ daemonized); -+ *list = NULL; -+ return; -+ } -+ -+ do { -+ ptmp = malloc(sizeof(struct promisc_states)); -+ br = read(fd, &(ptmp->params), sizeof(struct promisc_params)); -+ -+ if (br > 0) { -+ if (tail != NULL) -+ tail->next_entry = ptmp; -+ else -+ *list = ptmp; -+ -+ ptmp->next_entry = NULL; -+ tail = ptmp; -+ } else -+ free(ptmp); -+ } while (br > 0); -+ -+ close(fd); -+} -+ -+/* -+ * Set/restore interface promiscuous mode. -+ */ -+ -+void srpromisc(int mode, struct promisc_states *list) -+{ -+ int fd; -+ struct ifreq ifr; -+ struct promisc_states *ptmp; -+ int istat; -+ char fullmsg[PROMISC_MSG_MAX]; -+ -+ ptmp = list; -+ -+ fd = socket(PF_INET, SOCK_DGRAM, 0); -+ -+ if (fd < 0) { -+ write_error("Unable to open socket for flag change", daemonized); -+ return; -+ } -+ -+ while (ptmp != NULL) { -+ if (((strncmp(ptmp->params.ifname, "eth", 3) == 0) || -+ (strncmp(ptmp->params.ifname, "vlan", 4) == 0) || -+ (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) || -+ (strncmp(ptmp->params.ifname, "lec", 3) == 0)) && -+ (ptmp->params.state_valid)) { -+ -+ strcpy(ifr.ifr_name, ptmp->params.ifname); -+ -+ if (mode) -+ ifr.ifr_flags = ptmp->params.saved_state | IFF_PROMISC; -+ else -+ ifr.ifr_flags = ptmp->params.saved_state; -+ -+ istat = ioctl(fd, SIOCSIFFLAGS, &ifr); -+ -+ if (istat < 0) { -+ sprintf(fullmsg, "Promisc change failed for %s", -+ ptmp->params.ifname); -+ write_error(fullmsg, daemonized); -+ } -+ } -+ ptmp = ptmp->next_entry; -+ } -+ -+ close(fd); -+} -+ -+void destroy_promisc_list(struct promisc_states **list) -+{ -+ struct promisc_states *ptmp = *list; -+ struct promisc_states *ctmp; -+ -+ if (ptmp != NULL) -+ ctmp = ptmp->next_entry; -+ -+ while (ptmp != NULL) { -+ free(ptmp); -+ ptmp = ctmp; -+ if (ctmp != NULL) -+ ctmp = ctmp->next_entry; -+ } -+} -diff -ruN iptraf-2.7.0-old/src/rvnamed.c iptraf-2.7.0-new/src/rvnamed.c ---- iptraf-2.7.0-old/src/rvnamed.c 2002-05-02 03:37:34.000000000 +0200 -+++ iptraf-2.7.0-new/src/rvnamed.c 2005-10-04 22:02:47.000000000 +0200 -@@ -48,7 +48,6 @@ - #include - #include - #include "rvnamed.h" --#include "dirs.h" - - #define NUM_CACHE_ENTRIES 2048 - #define TIME_TARGET_MAX 30 -diff -ruN iptraf-2.7.0-old/src/rvnamed.h iptraf-2.7.0-new/src/rvnamed.h ---- iptraf-2.7.0-old/src/rvnamed.h 2002-05-02 03:36:30.000000000 +0200 -+++ iptraf-2.7.0-new/src/rvnamed.h 2005-10-04 22:03:29.000000000 +0200 -@@ -1,9 +1,10 @@ - #include - #include -+#include "dirs.h" - --#define CHILDSOCKNAME "/dev/rvndcldcomsk" --#define PARENTSOCKNAME "/dev/rvndpntcomsk" --#define IPTSOCKNAME "/dev/rvndiptcomsk" -+#define CHILDSOCKNAME LOCKDIR "/rvndcldcomsk" -+#define PARENTSOCKNAME LOCKDIR "/rvndpntcomsk" -+#define IPTSOCKNAME LOCKDIR "/rvndiptcomsk" - - #define SOCKET_PREFIX "isock" - -diff -ruN iptraf-2.7.0-old/src/tcptable.c iptraf-2.7.0-new/src/tcptable.c ---- iptraf-2.7.0-old/src/tcptable.c 2002-05-08 03:36:27.000000000 +0200 -+++ iptraf-2.7.0-new/src/tcptable.c 2005-10-03 19:25:55.000000000 +0200 -@@ -598,9 +598,6 @@ - if ((linkproto == LINK_ETHERNET) || (linkproto == LINK_PLIP)) { - convmacaddr(((struct ethhdr *) packet)->h_source, - newmacaddr); -- } else if (linkproto == LINK_FDDI) { -- convmacaddr(((struct fddihdr *) packet)->saddr, -- newmacaddr); - } else if (linkproto == LINK_TR) { - convmacaddr(((struct trh_hdr *) packet)->saddr, newmacaddr); - } -diff -ruN iptraf-2.7.0-old/src/tcptable.h iptraf-2.7.0-new/src/tcptable.h ---- iptraf-2.7.0-old/src/tcptable.h 2001-12-28 03:16:39.000000000 +0100 -+++ iptraf-2.7.0-new/src/tcptable.h 2005-10-03 19:26:01.000000000 +0200 -@@ -22,7 +22,6 @@ - #include - #include - #include --#include - #include - #include - #include diff --git a/openwrt/package/irssi/Config.in b/openwrt/package/irssi/Config.in deleted file mode 100644 index 8a150f23ae0..00000000000 --- a/openwrt/package/irssi/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_IRSSI - prompt "irssi............................. console irc client" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_GLIB1 - select BR2_PACKAGE_LIBNCURSES - help - IRC client for the text console - - http://irssi.org - diff --git a/openwrt/package/irssi/Makefile b/openwrt/package/irssi/Makefile deleted file mode 100644 index 505c8010c0b..00000000000 --- a/openwrt/package/irssi/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=irssi -PKG_VERSION:=0.8.10 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://irssi.org/files/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)a.tar.bz2 -PKG_MD5SUM:=38e616bccb6a34ff6d91690317c2fa19 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,IRSSI,irssi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - ac_cv_c_bigendian=no \ - ac_cv_sizeof_off_t=8 \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - --with-perl=no \ - --with-glib1 \ - --with-gnu-ld \ - --with-textui \ - --without-terminfo \ - --without-bot \ - --without-file-offset-size \ - --without-ssl \ - $(DISABLE_NLS) \ - --disable-ssl \ - --disable-ipv6 \ - --disable-proxy \ - --with-glib-prefix=$(STAGING_DIR)/usr \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) - touch $@ - -$(IPKG_IRSSI): - mkdir -p $(IDIR_IRSSI)/usr/bin - $(CP) $(PKG_BUILD_DIR)/src/fe-text/$(PKG_NAME) $(IDIR_IRSSI)/usr/bin/ - $(STRIP) $(IDIR_IRSSI)/usr/bin/* - $(IPKG_BUILD) $(IDIR_IRSSI) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/irssi/ipkg/irssi.control b/openwrt/package/irssi/ipkg/irssi.control deleted file mode 100644 index a6d2566a779..00000000000 --- a/openwrt/package/irssi/ipkg/irssi.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: irssi -Priority: optional -Section: text -Depends: glib1, libpthread, libncurses -Description: IRC text client diff --git a/openwrt/package/irssi/patches/100-cross_compiling_fix.patch b/openwrt/package/irssi/patches/100-cross_compiling_fix.patch deleted file mode 100644 index 2b45ceac51d..00000000000 --- a/openwrt/package/irssi/patches/100-cross_compiling_fix.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -ruN irssi-0.8.10.orig/configure irssi-0.8.10/configure ---- irssi-0.8.10.orig/configure 2005-12-11 23:46:06.000000000 +0100 -+++ irssi-0.8.10/configure 2006-02-24 13:19:21.570891250 +0100 -@@ -21848,13 +21848,6 @@ - - echo "$as_me:$LINENO: checking size of off_t" >&5 - echo $ECHO_N "checking size of off_t... $ECHO_C" >&6 --if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -21872,35 +21865,8 @@ - } - - _ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- -- sizeof_off_t=`cat conftestval` -- rm -f conftestval -- --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) -- -- { { echo "$as_me:$LINENO: error: Unsupported off_t size" >&5 --echo "$as_me: error: Unsupported off_t size" >&2;} -- { (exit 1); exit 1; }; } -- --fi -+ sizeof_off_t=8 - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi - echo "$as_me:$LINENO: result: $sizeof_off_t" >&5 - echo "${ECHO_T}$sizeof_off_t" >&6 - diff --git a/openwrt/package/jamvm/Config.in b/openwrt/package/jamvm/Config.in deleted file mode 100644 index 5f713150f26..00000000000 --- a/openwrt/package/jamvm/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config BR2_PACKAGE_JAMVM - prompt "jamvm............................. A compact Java Virtual Machine" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_ZLIB - select BR2_PACKAGE_LIBFFI_SABLE - select BR2_PACKAGE_LIBSABLEVM_CLASSPATH - help - JamVM is a new Java Virtual Machine which conforms to the JVM - specification version (blue book). In comparison to most other VM's - (free and commercial) it is extremely small.However, unlike other - small VMs (e.g. KVM) it is designed to support the full - specification, and includes support for object finalisation, - Soft/Weak/Phantom References, the Java Native Interface (JNI) and the - Reflection API. - - http://sourceforge.net/projects/jamvm diff --git a/openwrt/package/jamvm/Makefile b/openwrt/package/jamvm/Makefile deleted file mode 100644 index 137a4e9722d..00000000000 --- a/openwrt/package/jamvm/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=jamvm -PKG_VERSION:=1.4.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=ed79d6b60e50b007614831f8c28321ac - -PKG_SOURCE_URL:=@SF/jamvm - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,JAMVM,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --enable-ffi \ - ); - touch $@ - - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR)/usr/bin - mkdir -p $(PKG_INSTALL_DIR)/usr/share/jamvm - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - $(TARGET_CONFIGURE_OPTS) - $(CP) $(PKG_BUILD_DIR)/src/jamvm $(PKG_INSTALL_DIR)/usr/bin - $(MAKE) -C $(PKG_BUILD_DIR)/lib - $(CP) $(PKG_BUILD_DIR)/lib/classes.zip $(PKG_INSTALL_DIR)/usr/share/jamvm - touch $@ - -$(IPKG_JAMVM): - install -d -m0755 $(IDIR_JAMVM)/usr/bin - install -d -m0755 $(IDIR_JAMVM)/usr/share/jamvm - $(CP) $(PKG_INSTALL_DIR)/usr/bin/jamvm $(IDIR_JAMVM)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/share/jamvm/classes.zip $(IDIR_JAMVM)/usr/share/jamvm - $(RSTRIP) $(IDIR_JAMVM) - $(IPKG_BUILD) $(IDIR_JAMVM) $(PACKAGE_DIR) - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/jamvm/ipkg/jamvm.control b/openwrt/package/jamvm/ipkg/jamvm.control deleted file mode 100644 index aee8fb88f81..00000000000 --- a/openwrt/package/jamvm/ipkg/jamvm.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: jamvm -Priority: optional -Section: misc -Description: A Java Virtual Machine (JVM) implementation -Depends: libffi-sable, zlib, libsablevm-classpath diff --git a/openwrt/package/jamvm/patches/100-jamvm-mips.patch b/openwrt/package/jamvm/patches/100-jamvm-mips.patch deleted file mode 100644 index 8feebc4f7aa..00000000000 --- a/openwrt/package/jamvm/patches/100-jamvm-mips.patch +++ /dev/null @@ -1,593 +0,0 @@ -diff -urN jamvm-1.4.0-orig/configure jamvm-1.4.0/configure ---- jamvm-1.4.0-orig/configure 2005-11-20 08:18:52.000000000 +0100 -+++ jamvm-1.4.0/configure 2005-11-27 17:02:15.000000000 +0100 -@@ -1934,6 +1934,7 @@ - i[456]86-*-openbsd*) host_cpu=i386 host_os=linux libdl_needed=no ;; - x86_64-*-linux*) host_os=linux ;; - arm*-*-linux*) host_cpu=arm host_os=linux ;; -+mips*-linux*) host_cpu=mips host_os=linux ;; - powerpc*-*-linux*) host_cpu=powerpc host_os=linux ;; - powerpc-*-darwin*) host_os=darwin ;; - *) { { echo "$as_me:$LINENO: error: $host not supported" >&5 -@@ -5742,7 +5743,7 @@ - ac_config_links="$ac_config_links src/arch.h:src/arch/$arch.h" - - -- ac_config_files="$ac_config_files Makefile src/Makefile src/arch/Makefile src/os/Makefile src/os/linux/Makefile src/os/darwin/Makefile src/os/linux/powerpc/Makefile src/os/linux/arm/Makefile src/os/linux/i386/Makefile src/os/linux/x86_64/Makefile src/os/darwin/powerpc/Makefile lib/Makefile lib/java/Makefile lib/java/lang/Makefile lib/jamvm/Makefile lib/jamvm/java/Makefile lib/jamvm/java/lang/Makefile lib/java/lang/reflect/Makefile lib/java/security/Makefile lib/gnu/Makefile lib/gnu/classpath/Makefile" -+ ac_config_files="$ac_config_files Makefile src/Makefile src/arch/Makefile src/os/Makefile src/os/linux/Makefile src/os/darwin/Makefile src/os/linux/powerpc/Makefile src/os/linux/arm/Makefile src/os/linux/i386/Makefile src/os/linux/x86_64/Makefile src/os/linux/mips/Makefile src/os/darwin/powerpc/Makefile lib/Makefile lib/java/Makefile lib/java/lang/Makefile lib/jamvm/Makefile lib/jamvm/java/Makefile lib/jamvm/java/lang/Makefile lib/java/lang/reflect/Makefile lib/java/security/Makefile lib/gnu/Makefile lib/gnu/classpath/Makefile" - - - cat >confcache <<\_ACEOF -@@ -6340,6 +6341,7 @@ - "src/os/linux/arm/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/os/linux/arm/Makefile" ;; - "src/os/linux/i386/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/os/linux/i386/Makefile" ;; - "src/os/linux/x86_64/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/os/linux/x86_64/Makefile" ;; -+ "src/os/linux/mips/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/os/linux/mips/Makefile" ;; - "src/os/darwin/powerpc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/os/darwin/powerpc/Makefile" ;; - "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "lib/java/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/java/Makefile" ;; -diff -urN jamvm-1.4.0-orig/configure.ac jamvm-1.4.0/configure.ac ---- jamvm-1.4.0-orig/configure.ac 2005-11-20 08:18:33.000000000 +0100 -+++ jamvm-1.4.0/configure.ac 2005-11-27 16:29:53.000000000 +0100 -@@ -60,6 +60,7 @@ - i[[456]]86-*-openbsd*) host_cpu=i386 host_os=linux libdl_needed=no ;; - x86_64-*-linux*) host_os=linux ;; - arm*-*-linux*) host_cpu=arm host_os=linux ;; -+mips*-linux*) host_cpu=mips host_os=linux ;; - powerpc*-*-linux*) host_cpu=powerpc host_os=linux ;; - powerpc-*-darwin*) host_os=darwin ;; - *) AC_MSG_ERROR($host not supported) ;; -@@ -202,6 +203,7 @@ - src/os/linux/arm/Makefile \ - src/os/linux/i386/Makefile \ - src/os/linux/x86_64/Makefile \ -+ src/os/linux/mips/Makefile \ - src/os/darwin/powerpc/Makefile \ - lib/Makefile \ - lib/java/Makefile \ -diff -urN jamvm-1.4.0-orig/src/arch/Makefile.am jamvm-1.4.0/src/arch/Makefile.am ---- jamvm-1.4.0-orig/src/arch/Makefile.am 2005-09-05 02:02:58.000000000 +0200 -+++ jamvm-1.4.0/src/arch/Makefile.am 2005-11-24 23:09:02.000000000 +0100 -@@ -1,3 +1,3 @@ - # used by automake to generate Makefile.in - --EXTRA_DIST = powerpc.h arm.h i386.h x86_64.h -+EXTRA_DIST = powerpc.h arm.h i386.h x86_64.h mips.h -diff -urN jamvm-1.4.0-orig/src/arch/Makefile.in jamvm-1.4.0/src/arch/Makefile.in ---- jamvm-1.4.0-orig/src/arch/Makefile.in 2005-11-20 08:18:49.000000000 +0100 -+++ jamvm-1.4.0/src/arch/Makefile.in 2005-11-27 17:04:08.000000000 +0100 -@@ -141,7 +141,7 @@ - use_zip_no = @use_zip_no@ - use_zip_yes = @use_zip_yes@ - with_classpath_install_dir = @with_classpath_install_dir@ --EXTRA_DIST = powerpc.h arm.h i386.h x86_64.h -+EXTRA_DIST = powerpc.h arm.h i386.h x86_64.h mips.h - all: all-am - - .SUFFIXES: -diff -urN jamvm-1.4.0-orig/src/arch/mips.h jamvm-1.4.0/src/arch/mips.h ---- jamvm-1.4.0-orig/src/arch/mips.h 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.4.0/src/arch/mips.h 2005-11-29 22:31:08.000000000 +0100 -@@ -0,0 +1,70 @@ -+/* -+ * Copyright (C) 2003, 2004, 2005 Robert Lougher . -+ * -+ * This file is part of JamVM. -+ * -+ * 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, -+ * 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+#define OS_ARCH "mips" -+ -+#include -+#include -+ -+/* Override default min and max heap sizes. mips machines are -+ usually embedded, and the standard defaults are too large. */ -+#define DEFAULT_MAX_HEAP 16*MB -+#define DEFAULT_MIN_HEAP 1*MB -+ -+#ifdef DIRECT -+#define HANDLER_TABLE_T static const void -+#else -+#define HANDLER_TABLE_T void -+#endif -+ -+#if defined(__MIPSEL__) -+#define DOUBLE_1_BITS 0x3ff0000000000000LL -+#else -+#error DOUBLE_1_BITS was not tested on a big endian mips! -+#define DOUBLE_1_BITS 0x000000003ff00000LL -+#endif -+ -+#if defined(__MIPSEL__) -+#define READ_DBL(v,p,l) v = ((u8)p[0]<<56)|((u8)p[1]<<48)|((u8)p[2]<<40) \ -+ |((u8)p[3]<<32)|((u8)p[4]<<24)|((u8)p[5]<<16) \ -+ |((u8)p[6]<<8)|(u8)p[7]; p+=8 -+#else -+#error READ_DBL was not tested on a big endian mips! -+#define READ_DBL(v,p,l) v = ((u8)p[4]<<56)|((u8)p[5]<<48)|((u8)p[6]<<40) \ -+ |((u8)p[7]<<32)|((u8)p[0]<<24)|((u8)p[1]<<16) \ -+ |((u8)p[2]<<8)|(u8)p[3]; p+=8 -+#endif -+ -+/* Needed for i386 -- empty here */ -+#define FPU_HACK -+ -+#define COMPARE_AND_SWAP(addr, old_val, new_val) compare_and_swap(addr,old_val,new_val) -+ -+ -+#define ATOMIC_READ(addr) *addr -+#define ATOMIC_WRITE(addr, new_val) *addr = new_val -+ -+ -+ -+#define MBARRIER() __asm__ __volatile__ ("" ::: "memory") -+#define UNLOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") -+#define JMM_LOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") -+#define JMM_UNLOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") -+ -diff -urN jamvm-1.4.0-orig/src/os/linux/Makefile.am jamvm-1.4.0/src/os/linux/Makefile.am ---- jamvm-1.4.0-orig/src/os/linux/Makefile.am 2005-09-08 22:53:16.000000000 +0200 -+++ jamvm-1.4.0/src/os/linux/Makefile.am 2005-11-24 23:05:44.000000000 +0100 -@@ -1,5 +1,5 @@ - SUBDIRS = @arch@ --DIST_SUBDIRS = powerpc arm i386 x86_64 -+DIST_SUBDIRS = powerpc arm i386 x86_64 mips - - noinst_LIBRARIES = libos.a - libos_a_SOURCES = dll_os.c -diff -urN jamvm-1.4.0-orig/src/os/linux/Makefile.in jamvm-1.4.0/src/os/linux/Makefile.in ---- jamvm-1.4.0-orig/src/os/linux/Makefile.in 2005-11-20 08:18:50.000000000 +0100 -+++ jamvm-1.4.0/src/os/linux/Makefile.in 2005-11-27 17:04:10.000000000 +0100 -@@ -163,7 +163,7 @@ - use_zip_yes = @use_zip_yes@ - with_classpath_install_dir = @with_classpath_install_dir@ - SUBDIRS = @arch@ --DIST_SUBDIRS = powerpc arm i386 x86_64 -+DIST_SUBDIRS = powerpc arm i386 x86_64 mips - noinst_LIBRARIES = libos.a - libos_a_SOURCES = dll_os.c - EXTRA_DIST = dll_os.c -diff -urN jamvm-1.4.0-orig/src/os/linux/mips/init.c jamvm-1.4.0/src/os/linux/mips/init.c ---- jamvm-1.4.0-orig/src/os/linux/mips/init.c 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.4.0/src/os/linux/mips/init.c 2005-11-02 22:42:21.000000000 +0100 -@@ -0,0 +1,23 @@ -+/* -+ * Copyright (C) 2003, 2004 Robert Lougher . -+ * -+ * This file is part of JamVM. -+ * -+ * 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, -+ * 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+void initialisePlatform() { -+ /* Nothing to do for mips */ -+} -diff -urN jamvm-1.4.0-orig/src/os/linux/mips/Makefile.am jamvm-1.4.0/src/os/linux/mips/Makefile.am ---- jamvm-1.4.0-orig/src/os/linux/mips/Makefile.am 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.4.0/src/os/linux/mips/Makefile.am 2005-09-05 02:03:01.000000000 +0200 -@@ -0,0 +1,4 @@ -+noinst_LIBRARIES = libnative.a -+libnative_a_SOURCES = init.c -+ -+AM_CPPFLAGS = -I$(top_builddir)/src -diff -urN jamvm-1.4.0-orig/src/os/linux/mips/Makefile.in jamvm-1.4.0/src/os/linux/mips/Makefile.in ---- jamvm-1.4.0-orig/src/os/linux/mips/Makefile.in 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.4.0/src/os/linux/mips/Makefile.in 2005-11-27 17:04:11.000000000 +0100 -@@ -0,0 +1,391 @@ -+# Makefile.in generated by automake 1.9.6 from Makefile.am. -+# @configure_input@ -+ -+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -+# 2003, 2004, 2005 Free Software Foundation, Inc. -+# This Makefile.in is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -+# PARTICULAR PURPOSE. -+ -+@SET_MAKE@ -+ -+srcdir = @srcdir@ -+top_srcdir = @top_srcdir@ -+VPATH = @srcdir@ -+pkgdatadir = $(datadir)/@PACKAGE@ -+pkglibdir = $(libdir)/@PACKAGE@ -+pkgincludedir = $(includedir)/@PACKAGE@ -+top_builddir = ../../../.. -+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -+INSTALL = @INSTALL@ -+install_sh_DATA = $(install_sh) -c -m 644 -+install_sh_PROGRAM = $(install_sh) -c -+install_sh_SCRIPT = $(install_sh) -c -+INSTALL_HEADER = $(INSTALL_DATA) -+transform = $(program_transform_name) -+NORMAL_INSTALL = : -+PRE_INSTALL = : -+POST_INSTALL = : -+NORMAL_UNINSTALL = : -+PRE_UNINSTALL = : -+POST_UNINSTALL = : -+build_triplet = @build@ -+host_triplet = @host@ -+subdir = src/os/linux/mips -+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ -+ $(top_srcdir)/configure.ac -+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ -+ $(ACLOCAL_M4) -+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -+CONFIG_CLEAN_FILES = -+LIBRARIES = $(noinst_LIBRARIES) -+AR = ar -+ARFLAGS = cru -+libnative_a_AR = $(AR) $(ARFLAGS) -+libnative_a_LIBADD = -+am_libnative_a_OBJECTS = init.$(OBJEXT) -+libnative_a_OBJECTS = $(am_libnative_a_OBJECTS) -+DEFAULT_INCLUDES = -I. -I$(srcdir) -+depcomp = $(SHELL) $(top_srcdir)/depcomp -+am__depfiles_maybe = depfiles -+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -+CCLD = $(CC) -+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+SOURCES = $(libnative_a_SOURCES) -+DIST_SOURCES = $(libnative_a_SOURCES) -+ETAGS = etags -+CTAGS = ctags -+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -+ACLOCAL = @ACLOCAL@ -+ALLOCA = @ALLOCA@ -+AMDEP_FALSE = @AMDEP_FALSE@ -+AMDEP_TRUE = @AMDEP_TRUE@ -+AMTAR = @AMTAR@ -+AUTOCONF = @AUTOCONF@ -+AUTOHEADER = @AUTOHEADER@ -+AUTOMAKE = @AUTOMAKE@ -+AWK = @AWK@ -+CC = @CC@ -+CCAS = @CCAS@ -+CCASFLAGS = @CCASFLAGS@ -+CCDEPMODE = @CCDEPMODE@ -+CFLAGS = @CFLAGS@ -+CPP = @CPP@ -+CPPFLAGS = @CPPFLAGS@ -+CYGPATH_W = @CYGPATH_W@ -+DEFS = @DEFS@ -+DEPDIR = @DEPDIR@ -+ECHO_C = @ECHO_C@ -+ECHO_N = @ECHO_N@ -+ECHO_T = @ECHO_T@ -+EGREP = @EGREP@ -+EXEEXT = @EXEEXT@ -+INSTALL_DATA = @INSTALL_DATA@ -+INSTALL_PROGRAM = @INSTALL_PROGRAM@ -+INSTALL_SCRIPT = @INSTALL_SCRIPT@ -+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -+LDFLAGS = @LDFLAGS@ -+LIBOBJS = @LIBOBJS@ -+LIBS = @LIBS@ -+LTLIBOBJS = @LTLIBOBJS@ -+MAINT = @MAINT@ -+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -+MAKEINFO = @MAKEINFO@ -+OBJEXT = @OBJEXT@ -+PACKAGE = @PACKAGE@ -+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -+PACKAGE_NAME = @PACKAGE_NAME@ -+PACKAGE_STRING = @PACKAGE_STRING@ -+PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_VERSION = @PACKAGE_VERSION@ -+PATH_SEPARATOR = @PATH_SEPARATOR@ -+RANLIB = @RANLIB@ -+SET_MAKE = @SET_MAKE@ -+SHELL = @SHELL@ -+STRIP = @STRIP@ -+VERSION = @VERSION@ -+ac_ct_CC = @ac_ct_CC@ -+ac_ct_RANLIB = @ac_ct_RANLIB@ -+ac_ct_STRIP = @ac_ct_STRIP@ -+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -+am__include = @am__include@ -+am__leading_dot = @am__leading_dot@ -+am__quote = @am__quote@ -+am__tar = @am__tar@ -+am__untar = @am__untar@ -+arch = @arch@ -+bindir = @bindir@ -+build = @build@ -+build_alias = @build_alias@ -+build_cpu = @build_cpu@ -+build_os = @build_os@ -+build_vendor = @build_vendor@ -+datadir = @datadir@ -+exec_prefix = @exec_prefix@ -+host = @host@ -+host_alias = @host_alias@ -+host_cpu = @host_cpu@ -+host_os = @host_os@ -+host_vendor = @host_vendor@ -+includedir = @includedir@ -+infodir = @infodir@ -+install_sh = @install_sh@ -+libdir = @libdir@ -+libexecdir = @libexecdir@ -+localstatedir = @localstatedir@ -+mandir = @mandir@ -+mkdir_p = @mkdir_p@ -+oldincludedir = @oldincludedir@ -+os = @os@ -+prefix = @prefix@ -+program_transform_name = @program_transform_name@ -+sbindir = @sbindir@ -+sharedstatedir = @sharedstatedir@ -+sysconfdir = @sysconfdir@ -+target_alias = @target_alias@ -+use_zip_no = @use_zip_no@ -+use_zip_yes = @use_zip_yes@ -+with_classpath_install_dir = @with_classpath_install_dir@ -+noinst_LIBRARIES = libnative.a -+libnative_a_SOURCES = init.c -+AM_CPPFLAGS = -I$(top_builddir)/src -+all: all-am -+ -+.SUFFIXES: -+.SUFFIXES: .c .o .obj -+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) -+ @for dep in $?; do \ -+ case '$(am__configure_deps)' in \ -+ *$$dep*) \ -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ -+ && exit 0; \ -+ exit 1;; \ -+ esac; \ -+ done; \ -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/os/linux/mips/Makefile'; \ -+ cd $(top_srcdir) && \ -+ $(AUTOMAKE) --gnu src/os/linux/mips/Makefile -+.PRECIOUS: Makefile -+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -+ @case '$?' in \ -+ *config.status*) \ -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ -+ *) \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ esac; -+ -+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+ -+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+ -+clean-noinstLIBRARIES: -+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -+libnative.a: $(libnative_a_OBJECTS) $(libnative_a_DEPENDENCIES) -+ -rm -f libnative.a -+ $(libnative_a_AR) libnative.a $(libnative_a_OBJECTS) $(libnative_a_LIBADD) -+ $(RANLIB) libnative.a -+ -+mostlyclean-compile: -+ -rm -f *.$(OBJEXT) -+ -+distclean-compile: -+ -rm -f *.tab.c -+ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Po@am__quote@ -+ -+.c.o: -+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(COMPILE) -c $< -+ -+.c.obj: -+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -+uninstall-info-am: -+ -+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ -+ mkid -fID $$unique -+tags: TAGS -+ -+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ -+ $(TAGS_FILES) $(LISP) -+ tags=; \ -+ here=`pwd`; \ -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ -+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ -+ test -n "$$unique" || unique=$$empty_fix; \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ $$tags $$unique; \ -+ fi -+ctags: CTAGS -+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ -+ $(TAGS_FILES) $(LISP) -+ tags=; \ -+ here=`pwd`; \ -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ -+ test -z "$(CTAGS_ARGS)$$tags$$unique" \ -+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ -+ $$tags $$unique -+ -+GTAGS: -+ here=`$(am__cd) $(top_builddir) && pwd` \ -+ && cd $(top_srcdir) \ -+ && gtags -i $(GTAGS_ARGS) $$here -+ -+distclean-tags: -+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -+ -+distdir: $(DISTFILES) -+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ -+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ -+ list='$(DISTFILES)'; for file in $$list; do \ -+ case $$file in \ -+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ -+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ -+ esac; \ -+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ -+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ -+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ -+ dir="/$$dir"; \ -+ $(mkdir_p) "$(distdir)$$dir"; \ -+ else \ -+ dir=''; \ -+ fi; \ -+ if test -d $$d/$$file; then \ -+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ -+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ -+ fi; \ -+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ -+ else \ -+ test -f $(distdir)/$$file \ -+ || cp -p $$d/$$file $(distdir)/$$file \ -+ || exit 1; \ -+ fi; \ -+ done -+check-am: all-am -+check: check-am -+all-am: Makefile $(LIBRARIES) -+installdirs: -+install: install-am -+install-exec: install-exec-am -+install-data: install-data-am -+uninstall: uninstall-am -+ -+install-am: all-am -+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -+ -+installcheck: installcheck-am -+install-strip: -+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ -+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ -+ `test -z '$(STRIP)' || \ -+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -+mostlyclean-generic: -+ -+clean-generic: -+ -+distclean-generic: -+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -+maintainer-clean-generic: -+ @echo "This command is intended for maintainers to use" -+ @echo "it deletes files that may require special tools to rebuild." -+clean: clean-am -+ -+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am -+ -+distclean: distclean-am -+ -rm -rf ./$(DEPDIR) -+ -rm -f Makefile -+distclean-am: clean-am distclean-compile distclean-generic \ -+ distclean-tags -+ -+dvi: dvi-am -+ -+dvi-am: -+ -+html: html-am -+ -+info: info-am -+ -+info-am: -+ -+install-data-am: -+ -+install-exec-am: -+ -+install-info: install-info-am -+ -+install-man: -+ -+installcheck-am: -+ -+maintainer-clean: maintainer-clean-am -+ -rm -rf ./$(DEPDIR) -+ -rm -f Makefile -+maintainer-clean-am: distclean-am maintainer-clean-generic -+ -+mostlyclean: mostlyclean-am -+ -+mostlyclean-am: mostlyclean-compile mostlyclean-generic -+ -+pdf: pdf-am -+ -+pdf-am: -+ -+ps: ps-am -+ -+ps-am: -+ -+uninstall-am: uninstall-info-am -+ -+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ -+ clean-noinstLIBRARIES ctags distclean distclean-compile \ -+ distclean-generic distclean-tags distdir dvi dvi-am html \ -+ html-am info info-am install install-am install-data \ -+ install-data-am install-exec install-exec-am install-info \ -+ install-info-am install-man install-strip installcheck \ -+ installcheck-am installdirs maintainer-clean \ -+ maintainer-clean-generic mostlyclean mostlyclean-compile \ -+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ -+ uninstall-am uninstall-info-am -+ -+# Tell versions [3.59,3.63) of GNU make to not export all variables. -+# Otherwise a system limit (for SysV at least) may be exceeded. -+.NOEXPORT: diff --git a/openwrt/package/jpeg/Config.in b/openwrt/package/jpeg/Config.in deleted file mode 100644 index 326fa8b5f4d..00000000000 --- a/openwrt/package/jpeg/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_JPEG - tristate - default n - depends BR2_PACKAGE_LIBJPEG - -config BR2_PACKAGE_LIBJPEG - prompt "libjpeg........................... The Independent JPEG Group's JPEG runtime library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_JPEG - help - The Independent JPEG Group's JPEG runtime library. - - http://www.ijg.org/ - diff --git a/openwrt/package/jpeg/Makefile b/openwrt/package/jpeg/Makefile deleted file mode 100644 index 11fd017a4d3..00000000000 --- a/openwrt/package/jpeg/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=jpeg -PKG_VERSION:=6b -PKG_RELEASE:=1 -PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547 - -PKG_SOURCE_URL:=http://www.ijg.org/files/ \ - ftp://ftp.uu.net/graphics/jpeg/ -PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBJPEG,libjpeg,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR)/usr/{include,lib} - $(MAKE) -C $(PKG_BUILD_DIR) \ - all - $(MAKE) -C $(PKG_BUILD_DIR) \ - prefix="$(PKG_INSTALL_DIR)/usr" \ - exec_prefix="$(PKG_INSTALL_DIR)/usr" \ - install-headers install-lib - touch $@ - -$(IPKG_LIBJPEG): - install -d -m0755 $(IDIR_LIBJPEG)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(IDIR_LIBJPEG)/usr/lib/ - $(RSTRIP) $(IDIR_LIBJPEG) - $(IPKG_BUILD) $(IDIR_LIBJPEG) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libjpeg.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(STAGING_DIR)/usr/lib/ - -install-dev: $(STAGING_DIR)/usr/lib/libjpeg.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/jpeglib.h \ - $(STAGING_DIR)/usr/include/j{config,error,morecfg}.h \ - $(STAGING_DIR)/usr/lib/libjpeg.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/jpeg/ipkg/libjpeg.control b/openwrt/package/jpeg/ipkg/libjpeg.control deleted file mode 100644 index 83111d7c7c6..00000000000 --- a/openwrt/package/jpeg/ipkg/libjpeg.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: libjpeg -Priority: optional -Section: libs -Depends: -Description: The Independent JPEG Group's JPEG runtime library - diff --git a/openwrt/package/jpeg/patches/jpeg-6b-config_guess.patch b/openwrt/package/jpeg/patches/jpeg-6b-config_guess.patch deleted file mode 100644 index d6912073fc9..00000000000 --- a/openwrt/package/jpeg/patches/jpeg-6b-config_guess.patch +++ /dev/null @@ -1,1536 +0,0 @@ -The supplied config.guess is just too old. -Use the one shipped with binutils instead. - -diff -ruN jpeg-6b-old/config.guess jpeg-6b-new/config.guess ---- jpeg-6b-old/config.guess 1998-03-25 16:25:38.000000000 +0100 -+++ jpeg-6b-new/config.guess 2004-11-22 21:33:30.000000000 +0100 -@@ -1,7 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. --# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. --# -+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+ -+timestamp='2004-11-12' -+ - # This file 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 -@@ -21,125 +24,314 @@ - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - --# Written by Per Bothner . --# The master version of this file is at the FSF in /home/gd/gnu/lib. -+# Originally written by Per Bothner . -+# Please send patches to . Submit a context -+# diff and a properly formatted ChangeLog entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # - # The plan is that this can be called by configure scripts if you --# don't specify an explicit system type (host/target name). --# --# Only a few systems have been added to this list; please add others --# (but try to keep the structure clean). --# -+# don't specify an explicit build system type. -+ -+me=`echo "$0" | sed -e 's,.*/,,'` -+ -+usage="\ -+Usage: $0 [OPTION] -+ -+Output the configuration name of the system \`$me' is run on. -+ -+Operation modes: -+ -h, --help print this help, then exit -+ -t, --time-stamp print date of last modification, then exit -+ -v, --version print version number, then exit -+ -+Report bugs and patches to ." -+ -+version="\ -+GNU config.guess ($timestamp) -+ -+Originally written by Per Bothner. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+Free Software Foundation, Inc. -+ -+This is free software; see the source for copying conditions. There is NO -+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -+ -+help=" -+Try \`$me --help' for more information." -+ -+# Parse command line -+while test $# -gt 0 ; do -+ case $1 in -+ --time-stamp | --time* | -t ) -+ echo "$timestamp" ; exit 0 ;; -+ --version | -v ) -+ echo "$version" ; exit 0 ;; -+ --help | --h* | -h ) -+ echo "$usage"; exit 0 ;; -+ -- ) # Stop option processing -+ shift; break ;; -+ - ) # Use stdin as input. -+ break ;; -+ -* ) -+ echo "$me: invalid option $1$help" >&2 -+ exit 1 ;; -+ * ) -+ break ;; -+ esac -+done -+ -+if test $# != 0; then -+ echo "$me: too many arguments$help" >&2 -+ exit 1 -+fi -+ -+trap 'exit 1' 1 2 15 -+ -+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -+# compiler to aid in system detection is discouraged as it requires -+# temporary files to be created and, as you can see below, it is a -+# headache to deal with in a portable fashion. -+ -+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -+# use `HOST_CC' if defined, but it is deprecated. -+ -+# Portable tmp directory creation inspired by the Autoconf team. -+ -+set_cc_for_build=' -+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -+: ${TMPDIR=/tmp} ; -+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || -+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -+dummy=$tmp/dummy ; -+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -+case $CC_FOR_BUILD,$HOST_CC,$CC in -+ ,,) echo "int x;" > $dummy.c ; -+ for c in cc gcc c89 c99 ; do -+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then -+ CC_FOR_BUILD="$c"; break ; -+ fi ; -+ done ; -+ if test x"$CC_FOR_BUILD" = x ; then -+ CC_FOR_BUILD=no_compiler_found ; -+ fi -+ ;; -+ ,,*) CC_FOR_BUILD=$CC ;; -+ ,*,*) CC_FOR_BUILD=$HOST_CC ;; -+esac ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. --# (ghazi@noc.rutgers.edu 8/24/94.) -+# (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH - fi - - UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown - UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown --UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - --trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 -- - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in -+ *:NetBSD:*:*) -+ # NetBSD (nbsd) targets should (where applicable) match one or -+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, -+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently -+ # switched to ELF, *-*-netbsd* would select the old -+ # object file format. This provides both forward -+ # compatibility and a consistent mechanism for selecting the -+ # object file format. -+ # -+ # Note: NetBSD doesn't particularly care about the vendor -+ # portion of the name. We always set it to "unknown". -+ sysctl="sysctl -n hw.machine_arch" -+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ -+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` -+ case "${UNAME_MACHINE_ARCH}" in -+ armeb) machine=armeb-unknown ;; -+ arm*) machine=arm-unknown ;; -+ sh3el) machine=shl-unknown ;; -+ sh3eb) machine=sh-unknown ;; -+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;; -+ esac -+ # The Operating System including object format, if it has switched -+ # to ELF recently, or will in the future. -+ case "${UNAME_MACHINE_ARCH}" in -+ arm*|i386|m68k|ns32k|sh3*|sparc|vax) -+ eval $set_cc_for_build -+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep __ELF__ >/dev/null -+ then -+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). -+ # Return netbsd for either. FIX? -+ os=netbsd -+ else -+ os=netbsdelf -+ fi -+ ;; -+ *) -+ os=netbsd -+ ;; -+ esac -+ # The OS release -+ # Debian GNU/NetBSD machines have a different userland, and -+ # thus, need a distinct triplet. However, they do not need -+ # kernel version information, so it can be replaced with a -+ # suitable tag, in the style of linux-gnu. -+ case "${UNAME_VERSION}" in -+ Debian*) -+ release='-gnu' -+ ;; -+ *) -+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ ;; -+ esac -+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: -+ # contains redundant information, the shorter form: -+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. -+ echo "${machine}-${os}${release}" -+ exit 0 ;; -+ amd64:OpenBSD:*:*) -+ echo x86_64-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ amiga:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ cats:OpenBSD:*:*) -+ echo arm-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ hp300:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ luna88k:OpenBSD:*:*) -+ echo m88k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ mac68k:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ macppc:OpenBSD:*:*) -+ echo powerpc-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ mvme68k:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ mvme88k:OpenBSD:*:*) -+ echo m88k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ mvmeppc:OpenBSD:*:*) -+ echo powerpc-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ sgi:OpenBSD:*:*) -+ echo mips64-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ sun3:OpenBSD:*:*) -+ echo m68k-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ *:OpenBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit 0 ;; -+ macppc:MirBSD:*:*) -+ echo powerppc-unknown-mirbsd${UNAME_RELEASE} -+ exit 0 ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit 0 ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac -+ # According to Compaq, /usr/sbin/psrinfo has been available on -+ # OSF/1 and Tru64 systems produced since 1995. I hope that -+ # covers most systems running today. This code pipes the CPU -+ # types through head -n 1, so we only detect the type of CPU 0. -+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` -+ case "$ALPHA_CPU_TYPE" in -+ "EV4 (21064)") -+ UNAME_MACHINE="alpha" ;; -+ "EV4.5 (21064)") -+ UNAME_MACHINE="alpha" ;; -+ "LCA4 (21066/21068)") -+ UNAME_MACHINE="alpha" ;; -+ "EV5 (21164)") -+ UNAME_MACHINE="alphaev5" ;; -+ "EV5.6 (21164A)") -+ UNAME_MACHINE="alphaev56" ;; -+ "EV5.6 (21164PC)") -+ UNAME_MACHINE="alphapca56" ;; -+ "EV5.7 (21164PC)") -+ UNAME_MACHINE="alphapca57" ;; -+ "EV6 (21264)") -+ UNAME_MACHINE="alphaev6" ;; -+ "EV6.7 (21264A)") -+ UNAME_MACHINE="alphaev67" ;; -+ "EV6.8CB (21264C)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.8AL (21264B)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.8CX (21264D)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.9A (21264/EV69A)") -+ UNAME_MACHINE="alphaev69" ;; -+ "EV7 (21364)") -+ UNAME_MACHINE="alphaev7" ;; -+ "EV7.9 (21364A)") -+ UNAME_MACHINE="alphaev79" ;; -+ esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- cat <dummy.s -- .globl main -- .ent main --main: -- .frame \$30,0,\$26,0 -- .prologue 0 -- .long 0x47e03d80 # implver $0 -- lda \$2,259 -- .long 0x47e20c21 # amask $2,$1 -- srl \$1,8,\$2 -- sll \$2,2,\$2 -- sll \$0,3,\$0 -- addl \$1,\$0,\$0 -- addl \$2,\$0,\$0 -- ret \$31,(\$26),1 -- .end main --EOF -- ${CC-cc} dummy.s -o dummy 2>/dev/null -- if test "$?" = 0 ; then -- ./dummy -- case "$?" in -- 7) -- UNAME_MACHINE="alpha" -- ;; -- 15) -- UNAME_MACHINE="alphaev5" -- ;; -- 14) -- UNAME_MACHINE="alphaev56" -- ;; -- 10) -- UNAME_MACHINE="alphapca56" -- ;; -- 16) -- UNAME_MACHINE="alphaev6" -- ;; -- esac -- fi -- rm -f dummy.s dummy -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit 0 ;; -+ Alpha\ *:Windows_NT*:*) -+ # How do we know it's Interix rather than the generic POSIX subsystem? -+ # Should we change UNAME_MACHINE based on the output of uname instead -+ # of the specific Alpha model? -+ echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) -- echo m68k-cbm-sysv4 -+ echo m68k-unknown-sysv4 - exit 0;; -- amiga:NetBSD:*:*) -- echo m68k-cbm-netbsd${UNAME_RELEASE} -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc64:OpenBSD:*:*) -- echo mips64el-unknown-openbsd${UNAME_RELEASE} -+ *:[Aa]miga[Oo][Ss]:*:*) -+ echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -+ *:[Mm]orph[Oo][Ss]:*:*) -+ echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; -- hkmips:OpenBSD:*:*) -- echo mips-unknown-openbsd${UNAME_RELEASE} -+ *:OS/390:*:*) -+ echo i370-ibm-openedition - exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mips-unknown-openbsd${UNAME_RELEASE} -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe - exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; -- arm32:NetBSD:*:*) -- echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -- exit 0 ;; -- SR2?01:HI-UX/MPP:*:*) -+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; -- Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) -+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 -@@ -147,9 +339,19 @@ - echo pyramid-pyramid-bsd - fi - exit 0 ;; -- NILE:*:*:dcosx) -+ NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit 0 ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) -+ case `/usr/bin/uname -p` in -+ sparc) echo sparc-icl-nx7 && exit 0 ;; -+ esac ;; -+ sun4H:SunOS:5.*:*) -+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; -@@ -175,7 +377,7 @@ - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) -- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` -+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) -@@ -189,29 +391,34 @@ - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; -- atari*:NetBSD:*:*) -- echo m68k-atari-netbsd${UNAME_RELEASE} -+ # The situation for MiNT is a little confusing. The machine name -+ # can be virtually everything (everything which is not -+ # "atarist" or "atariste" at least should have a processor -+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT" -+ # to the lowercase version "mint" (or "freemint"). Finally -+ # the system name "TOS" denotes a system which is actually not -+ # MiNT. But MiNT is downward compatible to TOS, so this should -+ # be no problem. -+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) -+ echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; -- atari*:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3*:NetBSD:*:*) -- echo m68k-sun-netbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3*:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:NetBSD:*:*) -- echo m68k-apple-netbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) -+ echo m68k-atari-mint${UNAME_RELEASE} -+ exit 0 ;; -+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) -+ echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) -+ echo m68k-milan-mint${UNAME_RELEASE} -+ exit 0 ;; -+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) -+ echo m68k-hades-mint${UNAME_RELEASE} -+ exit 0 ;; -+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) -+ echo m68k-unknown-mint${UNAME_RELEASE} -+ exit 0 ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -@@ -225,12 +432,18 @@ - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; -- 2020:CLIX:*:*) -+ 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) -- sed 's/^ //' << EOF >dummy.c -- int main (argc, argv) int argc; char **argv; { -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+#ifdef __cplusplus -+#include /* for printf() prototype */ -+ int main (int argc, char *argv[]) { -+#else -+ int main (argc, argv) int argc; char *argv[]; { -+#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); -@@ -245,12 +458,20 @@ - exit (-1); - } - EOF -- ${CC-cc} dummy.c -o dummy \ -- && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && rm dummy.c dummy && exit 0 -- rm -f dummy.c dummy -+ $CC_FOR_BUILD -o $dummy $dummy.c \ -+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -+ && exit 0 - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; -+ Motorola:PowerMAX_OS:*:*) -+ echo powerpc-motorola-powermax -+ exit 0 ;; -+ Motorola:*:4.3:PL8-*) -+ echo powerpc-harris-powermax -+ exit 0 ;; -+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) -+ echo powerpc-harris-powermax -+ exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; -@@ -266,15 +487,18 @@ - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then -- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -- -o ${TARGET_BINARY_INTERFACE}x = x ] ; then -+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] -+ then -+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ -+ [ ${TARGET_BINARY_INTERFACE}x = x ] -+ then - echo m88k-dg-dgux${UNAME_RELEASE} -- else -+ else - echo m88k-dg-dguxbcs${UNAME_RELEASE} -+ fi -+ else -+ echo i586-dg-dgux${UNAME_RELEASE} - fi -- else echo i586-dg-dgux${UNAME_RELEASE} -- fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -@@ -295,12 +519,21 @@ - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -- i?86:AIX:*:*) -+ i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; -+ ia64:AIX:*:*) -+ if [ -x /usr/bin/oslevel ] ; then -+ IBM_REV=`/usr/bin/oslevel` -+ else -+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} -+ fi -+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -+ exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then -- sed 's/^ //' << EOF >dummy.c -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c - #include - - main() -@@ -311,8 +544,7 @@ - exit(0); - } - EOF -- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 -- rm -f dummy.c dummy -+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 -@@ -320,8 +552,9 @@ - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; -- *:AIX:*:4) -- if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then -+ *:AIX:*:[45]) -+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` -+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc -@@ -329,7 +562,7 @@ - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else -- IBM_REV=4.${UNAME_RELEASE} -+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; -@@ -339,7 +572,7 @@ - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; -- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and -+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) -@@ -354,18 +587,85 @@ - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; -- 9000/[3478]??:HP-UX:*:*) -+ 9000/[34678]??:HP-UX:*:*) -+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; -- 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; -- 9000/8?? ) HP_ARCH=hppa1.0 ;; -+ 9000/[678][0-9][0-9]) -+ if [ -x /usr/bin/getconf ]; then -+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -+ case "${sc_cpu_version}" in -+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -+ 532) # CPU_PA_RISC2_0 -+ case "${sc_kernel_bits}" in -+ 32) HP_ARCH="hppa2.0n" ;; -+ 64) HP_ARCH="hppa2.0w" ;; -+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 -+ esac ;; -+ esac -+ fi -+ if [ "${HP_ARCH}" = "" ]; then -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ -+ #define _HPUX_SOURCE -+ #include -+ #include -+ -+ int main () -+ { -+ #if defined(_SC_KERNEL_BITS) -+ long bits = sysconf(_SC_KERNEL_BITS); -+ #endif -+ long cpu = sysconf (_SC_CPU_VERSION); -+ -+ switch (cpu) -+ { -+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -+ case CPU_PA_RISC2_0: -+ #if defined(_SC_KERNEL_BITS) -+ switch (bits) -+ { -+ case 64: puts ("hppa2.0w"); break; -+ case 32: puts ("hppa2.0n"); break; -+ default: puts ("hppa2.0"); break; -+ } break; -+ #else /* !defined(_SC_KERNEL_BITS) */ -+ puts ("hppa2.0"); break; -+ #endif -+ default: puts ("hppa1.0"); break; -+ } -+ exit (0); -+ } -+EOF -+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` -+ test -z "$HP_ARCH" && HP_ARCH=hppa -+ fi ;; - esac -- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` -+ if [ ${HP_ARCH} = "hppa2.0w" ] -+ then -+ # avoid double evaluation of $set_cc_for_build -+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ then -+ HP_ARCH="hppa2.0w" -+ else -+ HP_ARCH="hppa64" -+ fi -+ fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; -+ ia64:HP-UX:*:*) -+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` -+ echo ia64-hp-hpux${HPUX_REV} -+ exit 0 ;; - 3050*:HI-UX:*:*) -- sed 's/^ //' << EOF >dummy.c -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c - #include - int - main () -@@ -390,8 +690,7 @@ - exit (0); - } - EOF -- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 -- rm -f dummy.c dummy -+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) -@@ -400,13 +699,16 @@ - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; -+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) -+ echo hppa1.0-hp-mpeix -+ exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; -- i?86:OSF1:*:*) -+ i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else -@@ -434,196 +736,259 @@ - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; -- CRAY*X-MP:*:*:*) -- echo xmp-cray-unicos -- exit 0 ;; - CRAY*Y-MP:*:*:*) -- echo ymp-cray-unicos${UNAME_RELEASE} -+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ -+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -+ -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*TS:*:*:*) -- echo t90-cray-unicos${UNAME_RELEASE} -+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; -- CRAY-2:*:*:*) -- echo cray2-cray-unicos -- exit 0 ;; -- F300:UNIX_System_V:*:*) -- FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` -+ CRAY*T3E:*:*:*) -+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit 0 ;; -+ CRAY*SV1:*:*:*) -+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit 0 ;; -+ *:UNICOS/mp:*:*) -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit 0 ;; -+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) -+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; -- F301:UNIX_System_V:*:*) -- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` -- exit 0 ;; -- hp3[0-9][05]:NetBSD:*:*) -- echo m68k-hp-netbsd${UNAME_RELEASE} -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- i?86:BSD/386:*:* | *:BSD/OS:*:*) -+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; -- *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ sparc*:BSD/OS:*:*) -+ echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; -- *:NetBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ *:BSD/OS:*:*) -+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; -- *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ *:FreeBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - i*:CYGWIN*:*) -- echo i386-pc-cygwin32 -+ echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) -- echo i386-pc-mingw32 -+ echo ${UNAME_MACHINE}-pc-mingw32 -+ exit 0 ;; -+ i*:PW*:*) -+ echo ${UNAME_MACHINE}-pc-pw32 -+ exit 0 ;; -+ x86:Interix*:[34]*) -+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -+ exit 0 ;; -+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) -+ echo i${UNAME_MACHINE}-pc-mks -+ exit 0 ;; -+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*) -+ # How do we know it's Interix rather than the generic POSIX subsystem? -+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we -+ # UNAME_MACHINE based on the output of uname instead of i386? -+ echo i586-pc-interix -+ exit 0 ;; -+ i*:UWIN*:*) -+ echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) -- echo powerpcle-unknown-cygwin32 -+ echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; -- *:Linux:*:*) -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit 0 ;; -+ i*86:Minix:*:*) -+ echo ${UNAME_MACHINE}-pc-minix -+ exit 0 ;; -+ arm*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit 0 ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit 0 ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit 0 ;; -+ ia64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ m68*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ mips:Linux:*:*) -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #undef CPU -+ #undef mips -+ #undef mipsel -+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -+ CPU=mipsel -+ #else -+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -+ CPU=mips -+ #else -+ CPU= -+ #endif -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ ;; -+ mips64:Linux:*:*) -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #undef CPU -+ #undef mips64 -+ #undef mips64el -+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -+ CPU=mips64el -+ #else -+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -+ CPU=mips64 -+ #else -+ CPU= -+ #endif -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu -+ exit 0 ;; -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit 0 ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit 0 ;; -+ parisc:Linux:*:* | hppa:Linux:*:*) -+ # Look for CPU level -+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -+ PA7*) echo hppa1.1-unknown-linux-gnu ;; -+ PA8*) echo hppa2.0-unknown-linux-gnu ;; -+ *) echo hppa-unknown-linux-gnu ;; -+ esac -+ exit 0 ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu -+ exit 0 ;; -+ s390:Linux:*:* | s390x:Linux:*:*) -+ echo ${UNAME_MACHINE}-ibm-linux -+ exit 0 ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ sh*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ sparc:Linux:*:* | sparc64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit 0 ;; -+ x86_64:Linux:*:*) -+ echo x86_64-unknown-linux-gnu -+ exit 0 ;; -+ i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. -- ld_help_string=`ld --help 2>&1` -- ld_supported_emulations=`echo $ld_help_string \ -- | sed -ne '/supported emulations:/!d -+ # first see if it will tell us. cd to the root directory to prevent -+ # problems with other programs or directories called `ld' in the path. -+ # Set LC_ALL=C to ensure ld outputs messages in English. -+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -+ | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g -- s/.*supported emulations: *// -+ s/.*supported targets: *// - s/ .*// - p'` -- case "$ld_supported_emulations" in -- i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; -- i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; -- sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; -- m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; -- elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; -- esac -- -- if test "${UNAME_MACHINE}" = "alpha" ; then -- sed 's/^ //' <dummy.s -- .globl main -- .ent main -- main: -- .frame \$30,0,\$26,0 -- .prologue 0 -- .long 0x47e03d80 # implver $0 -- lda \$2,259 -- .long 0x47e20c21 # amask $2,$1 -- srl \$1,8,\$2 -- sll \$2,2,\$2 -- sll \$0,3,\$0 -- addl \$1,\$0,\$0 -- addl \$2,\$0,\$0 -- ret \$31,(\$26),1 -- .end main --EOF -- LIBC="" -- ${CC-cc} dummy.s -o dummy 2>/dev/null -- if test "$?" = 0 ; then -- ./dummy -- case "$?" in -- 7) -- UNAME_MACHINE="alpha" -- ;; -- 15) -- UNAME_MACHINE="alphaev5" -- ;; -- 14) -- UNAME_MACHINE="alphaev56" -- ;; -- 10) -- UNAME_MACHINE="alphapca56" -- ;; -- 16) -- UNAME_MACHINE="alphaev6" -- ;; -- esac -- -- objdump --private-headers dummy | \ -- grep ld.so.1 > /dev/null -- if test "$?" = 0 ; then -- LIBC="libc1" -- fi -- fi -- rm -f dummy.s dummy -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 -- elif test "${UNAME_MACHINE}" = "mips" ; then -- cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 -- rm -f dummy.c dummy -- else -- # Either a pre-BFD a.out linker (linux-gnuoldld) -- # or one that does not give us useful --help. -- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. -- # If ld does not provide *any* "supported emulations:" -- # that means it is gnuoldld. -- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" -- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 -- -- case "${UNAME_MACHINE}" in -- i?86) -- VENDOR=pc; -- ;; -- *) -- VENDOR=unknown; -- ;; -- esac -- # Determine whether the default compiler is a.out or elf -- cat >dummy.c < --main(argc, argv) -- int argc; -- char *argv[]; --{ --#ifdef __ELF__ --# ifdef __GLIBC__ --# if __GLIBC__ >= 2 -- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); --# else -- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); --# endif --# else -- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); --# endif --#else -- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); --#endif -- return 0; --} -+ case "$ld_supported_targets" in -+ elf32-i386) -+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -+ ;; -+ a.out-i386-linux) -+ echo "${UNAME_MACHINE}-pc-linux-gnuaout" -+ exit 0 ;; -+ coff-i386) -+ echo "${UNAME_MACHINE}-pc-linux-gnucoff" -+ exit 0 ;; -+ "") -+ # Either a pre-BFD a.out linker (linux-gnuoldld) or -+ # one that does not give us useful --help. -+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -+ exit 0 ;; -+ esac -+ # Determine whether the default compiler is a.out or elf -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #include -+ #ifdef __ELF__ -+ # ifdef __GLIBC__ -+ # if __GLIBC__ >= 2 -+ LIBC=gnu -+ # else -+ LIBC=gnulibc1 -+ # endif -+ # else -+ LIBC=gnulibc1 -+ # endif -+ #else -+ #ifdef __INTEL_COMPILER -+ LIBC=gnu -+ #else -+ LIBC=gnuaout -+ #endif -+ #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 -- rm -f dummy.c dummy -- fi ;; --# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions --# are messed up and put the nodename in both sysname and nodename. -- i?86:DYNIX/ptx:4*:*) -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ ;; -+ i*86:DYNIX/ptx:4*:*) -+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. -+ # earlier versions are messed up and put the nodename in both -+ # sysname and nodename. - echo i386-sequent-sysv4 - exit 0 ;; -- i?86:UNIX_SV:4.2MP:2.*) -+ i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, -@@ -631,28 +996,62 @@ - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; -- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) -+ i*86:OS/2:*:*) -+ # If we were able to find `uname', then EMX Unix compatibility -+ # is probably installed. -+ echo ${UNAME_MACHINE}-pc-os2-emx -+ exit 0 ;; -+ i*86:XTS-300:*:STOP) -+ echo ${UNAME_MACHINE}-unknown-stop -+ exit 0 ;; -+ i*86:atheos:*:*) -+ echo ${UNAME_MACHINE}-unknown-atheos -+ exit 0 ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit 0 ;; -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ echo i386-unknown-lynxos${UNAME_RELEASE} -+ exit 0 ;; -+ i*86:*DOS:*:*) -+ echo ${UNAME_MACHINE}-pc-msdosdjgpp -+ exit 0 ;; -+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) -+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -- echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} -+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else -- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} -+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; -- i?86:*:3.2:*) -+ i*86:*:5:[78]*) -+ case `/bin/uname -X | grep "^Machine"` in -+ *486*) UNAME_MACHINE=i486 ;; -+ *Pentium) UNAME_MACHINE=i586 ;; -+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;; -+ esac -+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -+ exit 0 ;; -+ i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then -- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` -- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 -- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ -+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` -+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 -+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 -+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ -+ && UNAME_MACHINE=i686 -+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ -+ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) -+ # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp -@@ -674,9 +1073,15 @@ - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; -- M68*:*:R3V[567]*:*) -+ mc68k:UNIX:SYSTEM5:3.51m) -+ echo m68k-convergent-sysv -+ exit 0 ;; -+ M680?0:D-NIX:5.3:*) -+ echo m68k-diab-dnix -+ exit 0 ;; -+ M68*:*:R3V[5678]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -@@ -687,24 +1092,27 @@ - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; -- m68*:LynxOS:2.*:*) -+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; -- i?86:LynxOS:2.*:*) -- echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; -- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) -+ rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ echo powerpc-unknown-lynxos${UNAME_RELEASE} -+ exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; -+ RM*:ReliantUNIX-*:*:*) -+ echo mips-sni-sysv4 -+ exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; -@@ -716,8 +1124,8 @@ - echo ns32k-sni-sysv - fi - exit 0 ;; -- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -- # says -+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -+ # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) -@@ -729,25 +1137,130 @@ - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; -+ *:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo hppa1.1-stratus-vos -+ exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; -- news*:NEWS-OS:*:6*) -+ news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; -- R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) -+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; -+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. -+ echo powerpc-be-beos -+ exit 0 ;; -+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. -+ echo powerpc-apple-beos -+ exit 0 ;; -+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible. -+ echo i586-pc-beos -+ exit 0 ;; -+ SX-4:SUPER-UX:*:*) -+ echo sx4-nec-superux${UNAME_RELEASE} -+ exit 0 ;; -+ SX-5:SUPER-UX:*:*) -+ echo sx5-nec-superux${UNAME_RELEASE} -+ exit 0 ;; -+ SX-6:SUPER-UX:*:*) -+ echo sx6-nec-superux${UNAME_RELEASE} -+ exit 0 ;; -+ Power*:Rhapsody:*:*) -+ echo powerpc-apple-rhapsody${UNAME_RELEASE} -+ exit 0 ;; -+ *:Rhapsody:*:*) -+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -+ exit 0 ;; -+ *:Darwin:*:*) -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ *86) UNAME_PROCESSOR=i686 ;; -+ unknown) UNAME_PROCESSOR=powerpc ;; -+ esac -+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -+ exit 0 ;; -+ *:procnto*:*:* | *:QNX:[0123456789]*:*) -+ UNAME_PROCESSOR=`uname -p` -+ if test "$UNAME_PROCESSOR" = "x86"; then -+ UNAME_PROCESSOR=i386 -+ UNAME_MACHINE=pc -+ fi -+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -+ exit 0 ;; -+ *:QNX:*:4*) -+ echo i386-pc-qnx -+ exit 0 ;; -+ NSR-?:NONSTOP_KERNEL:*:*) -+ echo nsr-tandem-nsk${UNAME_RELEASE} -+ exit 0 ;; -+ *:NonStop-UX:*:*) -+ echo mips-compaq-nonstopux -+ exit 0 ;; -+ BS2000:POSIX*:*:*) -+ echo bs2000-siemens-sysv -+ exit 0 ;; -+ DS/*:UNIX_System_V:*:*) -+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -+ exit 0 ;; -+ *:Plan9:*:*) -+ # "uname -m" is not consistent, so use $cputype instead. 386 -+ # is converted to i386 for consistency with other x86 -+ # operating systems. -+ if test "$cputype" = "386"; then -+ UNAME_MACHINE=i386 -+ else -+ UNAME_MACHINE="$cputype" -+ fi -+ echo ${UNAME_MACHINE}-unknown-plan9 -+ exit 0 ;; -+ *:TOPS-10:*:*) -+ echo pdp10-unknown-tops10 -+ exit 0 ;; -+ *:TENEX:*:*) -+ echo pdp10-unknown-tenex -+ exit 0 ;; -+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) -+ echo pdp10-dec-tops20 -+ exit 0 ;; -+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) -+ echo pdp10-xkl-tops20 -+ exit 0 ;; -+ *:TOPS-20:*:*) -+ echo pdp10-unknown-tops20 -+ exit 0 ;; -+ *:ITS:*:*) -+ echo pdp10-unknown-its -+ exit 0 ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit 0 ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit 0 ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms && exit 0 ;; -+ I*) echo ia64-dec-vms && exit 0 ;; -+ V*) echo vax-dec-vms && exit 0 ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit 0 ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 - #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - --cat >dummy.c <$dummy.c < - # include -@@ -785,7 +1298,10 @@ - #endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; -- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); -+ if (version < 4) -+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); -+ else -+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); - #endif - -@@ -830,11 +1346,24 @@ - #endif - - #if defined (vax) --#if !defined (ultrix) -- printf ("vax-dec-bsd\n"); exit (0); --#else -- printf ("vax-dec-ultrix\n"); exit (0); --#endif -+# if !defined (ultrix) -+# include -+# if defined (BSD) -+# if BSD == 43 -+ printf ("vax-dec-bsd4.3\n"); exit (0); -+# else -+# if BSD == 199006 -+ printf ("vax-dec-bsd4.3reno\n"); exit (0); -+# else -+ printf ("vax-dec-bsd\n"); exit (0); -+# endif -+# endif -+# else -+ printf ("vax-dec-bsd\n"); exit (0); -+# endif -+# else -+ printf ("vax-dec-ultrix\n"); exit (0); -+# endif - #endif - - #if defined (alliant) && defined (i860) -@@ -845,8 +1374,7 @@ - } - EOF - --${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 --rm -f dummy.c dummy -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 - - # Apollos put the system type in the environment. - -@@ -878,6 +1406,48 @@ - esac - fi - --#echo '(Unable to guess system type)' 1>&2 -+cat >&2 < in order to provide the needed -+information to handle your system. -+ -+config.guess timestamp = $timestamp -+ -+uname -m = `(uname -m) 2>/dev/null || echo unknown` -+uname -r = `(uname -r) 2>/dev/null || echo unknown` -+uname -s = `(uname -s) 2>/dev/null || echo unknown` -+uname -v = `(uname -v) 2>/dev/null || echo unknown` -+ -+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -+/bin/uname -X = `(/bin/uname -X) 2>/dev/null` -+ -+hostinfo = `(hostinfo) 2>/dev/null` -+/bin/universe = `(/bin/universe) 2>/dev/null` -+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -+/bin/arch = `(/bin/arch) 2>/dev/null` -+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -+ -+UNAME_MACHINE = ${UNAME_MACHINE} -+UNAME_RELEASE = ${UNAME_RELEASE} -+UNAME_SYSTEM = ${UNAME_SYSTEM} -+UNAME_VERSION = ${UNAME_VERSION} -+EOF - - exit 1 -+ -+# Local variables: -+# eval: (add-hook 'write-file-hooks 'time-stamp) -+# time-stamp-start: "timestamp='" -+# time-stamp-format: "%:y-%02m-%02d" -+# time-stamp-end: "'" -+# End: diff --git a/openwrt/package/kismet/Config.in b/openwrt/package/kismet/Config.in deleted file mode 100644 index 425ec6c511a..00000000000 --- a/openwrt/package/kismet/Config.in +++ /dev/null @@ -1,66 +0,0 @@ -#menu "kismet............................ An 802.11 layer2 wireless network detector, sniffer, and intrusion detection system" - -config BR2_COMPILE_KISMET - tristate - default n - depends BR2_PACKAGE_KISMET_CLIENT || BR2_PACKAGE_KISMET_DRONE || BR2_PACKAGE_KISMET_SERVER - -config BR2_PACKAGE_KISMET_CLIENT - prompt "kismet-client..................... The Kismet client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_KISMET - select BR2_PACKAGE_LIBNCURSES - select BR2_PACKAGE_UCLIBCXX - help - - An 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. - - http://www.kismetwireless.net/ - - This package contains the kismet text interface client. - - Depends: - - libncurses - - libpcap - - uClibc++ - -config BR2_PACKAGE_KISMET_DRONE - prompt "kismet-drone...................... The Kismet drone" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_KISMET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_UCLIBCXX - help - - An 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. - - http://www.kismetwireless.net/ - - This package contains the kismet remote sniffing.and monitoring drone. - - Depends: - - libpcap - - uClibc++ - -config BR2_PACKAGE_KISMET_SERVER - prompt "kismet-server..................... The Kismet server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_KISMET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_UCLIBCXX - help - - An 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. - - http://www.kismetwireless.net/ - - This package contains the kismet server. - - Depends: - - libpcap - - uClibc++ - -#endmenu diff --git a/openwrt/package/kismet/Makefile b/openwrt/package/kismet/Makefile deleted file mode 100644 index 5603a705e4d..00000000000 --- a/openwrt/package/kismet/Makefile +++ /dev/null @@ -1,101 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=kismet -PKG_VERSION:=2005-08-R1 -PKG_RELEASE:=1 -PKG_MD5SUM:=17edb7688e04dd28028d5268a77d0ce7 - -PKG_SOURCE_URL:=http://www.kismetwireless.net/code -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KISMET,kismet,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,KISMET_CLIENT,kismet-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,KISMET_DRONE,kismet-drone,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,KISMET_SERVER,kismet-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(LINUX_DIR)/include" \ - LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm -lgcc" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/kismet \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-syspcap=yes \ - --disable-setuid \ - --disable-wsp100 \ - --disable-gpsmap \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - LIBS="-luClibc++ -lc -lm -lgcc" \ - all - touch $@ - -$(IPKG_KISMET): - install -d -m0755 $(IDIR_KISMET)/usr/bin/ - install -m0755 $(PKG_BUILD_DIR)/scripts/kismet $(IDIR_KISMET)/usr/bin/kismet - $(IPKG_BUILD) $(IDIR_KISMET) $(PACKAGE_DIR) - -$(IPKG_KISMET_CLIENT): - install -d -m0755 $(IDIR_KISMET_CLIENT)/etc/kismet/ - install -m0644 ./files/ap_manuf $(IDIR_KISMET_CLIENT)/etc/kismet/ - install -m0644 ./files/client_manuf $(IDIR_KISMET_CLIENT)/etc/kismet/ - install -m0644 ./files/kismet.conf $(IDIR_KISMET_CLIENT)/etc/kismet/ - install -m0644 ./files/kismet_ui.conf $(IDIR_KISMET_CLIENT)/etc/kismet/ - install -d -m0755 $(IDIR_KISMET_CLIENT)/usr/bin - $(CP) $(PKG_BUILD_DIR)/kismet_client $(IDIR_KISMET_CLIENT)/usr/bin/ - $(RSTRIP) $(IDIR_KISMET_CLIENT) - $(IPKG_BUILD) $(IDIR_KISMET_CLIENT) $(PACKAGE_DIR) - -$(IPKG_KISMET_DRONE): - install -d -m0755 $(IDIR_KISMET_DRONE)/etc/kismet/ - install -m0644 ./files/kismet_drone.conf $(IDIR_KISMET_DRONE)/etc/kismet/ - install -d -m0755 $(IDIR_KISMET_DRONE)/usr/bin - $(CP) $(PKG_BUILD_DIR)/kismet_drone $(IDIR_KISMET_DRONE)/usr/bin/ - $(RSTRIP) $(IDIR_KISMET_DRONE) - $(IPKG_BUILD) $(IDIR_KISMET_DRONE) $(PACKAGE_DIR) - -$(IPKG_KISMET_SERVER): - install -d -m0755 $(IDIR_KISMET_SERVER)/etc/kismet/ - install -m0644 ./files/ap_manuf $(IDIR_KISMET_SERVER)/etc/kismet/ - install -m0644 ./files/client_manuf $(IDIR_KISMET_SERVER)/etc/kismet/ - install -m0644 ./files/kismet.conf $(IDIR_KISMET_SERVER)/etc/kismet/ - mkdir -p $(IDIR_KISMET_SERVER)/usr/bin - $(CP) $(PKG_BUILD_DIR)/kismet_server $(IDIR_KISMET_SERVER)/usr/bin/ - $(RSTRIP) $(IDIR_KISMET_SERVER) - $(IPKG_BUILD) $(IDIR_KISMET_SERVER) $(PACKAGE_DIR) - -mostlyclean: -# $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/kismet/files/ap_manuf b/openwrt/package/kismet/files/ap_manuf deleted file mode 100644 index 7561b6d5bdb..00000000000 --- a/openwrt/package/kismet/files/ap_manuf +++ /dev/null @@ -1,79 +0,0 @@ -00:01:03:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 -00:01:24:00:00:00/FF:FF:FF:00:00:00 SMC Unknown default 6 192.168.2.1 -00:01:24:24:00:00/FF:FF:FF:FF:00:00 SMC SMC7004AWBR default 6 192.168.2.1 -00:02:2D:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 -00:02:6F:00:00:00/FF:FF:FF:00:00:00 Senao Unknown 0 -00:02:A5:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 -00:03:2F:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 -00:04:3A:3A:00:00/FF:FF:FF:FF:00:00 Avaya ad-01444 0 -00:04:5A:0E:00:00/FF:FF:FF:FF:00:00 Linksys WAP11 linksys 6 192.168.1.1 -00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 linksys 6 192.168.1.1 -00:04:5A:2E:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 linksys 6 192.168.1.1 -00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 -00:04:75:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 -00:04:75:75:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE20096A AP2000 Version 1 3Com 0 169.254.0.1 -00:04:E2:00:00:00/FF:FF:FF:00:00:00 SMC Unknown 0 -00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC 7004AWBR default 6 192.168.2.1 -00:05:5D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-1000AP default 6 -00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 v2 linksys 6 192.168.1.1 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WET11 linksys 6 192.168.1.225 -00:07:0E:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:07:50:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:08:21:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:09:43:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 -00:09:7C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:09:92:92:00:00/FF:FF:FF:FF:00:00 Sweex LC000010 wireless 11 192.168.0.1 -00:09:E8:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:0A:41:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:0A:8A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:0A:8A:8A:00:00/FF:FF:FF:FF:00:00 Cisco AIR-AP1200 0 -00:30:65:00:00:00/FF:FF:FF:00:00:00 Apple Unknown 0 -00:30:65:65:00:00/FF:FF:FF:FF:00:00 Apple Snow Base Station 1 -00:30:AB:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 -00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MR314NA Wireless 1 192.168.0.1 -00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 -00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6230-3 0 -00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DI-614+ default 6 192.168.0.1 -00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-900AP+ default 6 192.168.0.50 -00:40:26:00:00:00/FF:FF:FF:00:00:00 Buffalo Unknown 0 -00:40:26:26:00:00/FF:FF:FF:FF:00:00 Buffalo WLAR-L11G-L 0 -00:40:96:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown tsunami 6 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-AP342E2R tsunami 6 192.168.1.1 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AP-350 tsunami 7 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco Aironet 350 tsunami 6 -00:50:08:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 -00:50:8B:8B:00:00/FF:FF:FF:FF:00:00 Compaq WL400 - ETSI region compaq 11 -00:50:DA:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 -00:50:DA:DA:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE747A 0 -00:50:F2:F2:00:00/FF:FF:FF:FF:00:00 Microsoft MN-500 MSHOME 6 192.168.0.1 -00:60:01:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 -00:60:1D:00:00:00/FF:FF:FF:00:00:00 Orinoco Unknown 0 -00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Orinoco RG1000 0 -00:60:6D:00:00:00/FF:FF:FF:00:00:00 Cabletron Unknown 0 -00:60:B3:00:00:00/FF:FF:FF:00:00:00 Proxim Unknown 0 -00:80:37:37:00:00/FF:FF:FF:FF:00:00 Ericsson A11 (AP-4121-105M-ER-EU) 0 -00:80:C6:00:00:00/FF:FF:FF:00:00:00 SOHOware Unknown -00:80:C6:C6:00:00/FF:FF:FF:FF:00:00 SOHOware NetBlaster II -00:90:4B:4B:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 linksys 6 192.168.1.1 -00:90:D1:00:00:00/FF:FF:FF:00:00:00 SMC Unknown WLAN 11 -00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 SMC SMC2652W WLAN 11 -00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 SMC SMC2682W BRIDGE 11 -00:A0:04:00:00:00/FF:FF:FF:00:00:00 3Com Unknown -00:A0:04:04:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE51196 -00:A0:F8:00:00:00/FF:FF:FF:00:00:00 Symbol Unknown -00:E0:29:00:00:00/FF:FF:FF:00:00:00 OEM Unknown -08:00:46:00:00:00/FF:FF:FF:00:00:00 Sony Unknown -00:50:F2:00:00:00/FF:FF:FF:00:00:00 Microsoft Unknown MSHOME 6 192.168.2.1 -00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknwon NETGEAR 11 192.168.0.1 -00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown WLAN 11 0.0.0.0 -00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown Wireless 11 192.168.0.2 -00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown belkin54g 11 0.0.0.0 -00:0D:88:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 192.168.0.1 -00:80:C8:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 192.168.0.1 -00:40:05:00:00:00/FF:FF:FF:00:00:00 ANI Unknown default 6 192.168.0.1 -00:0C:41:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 -00:04:E2:00:00:00/FF:FF:FF:00:00:00 SMC Unknown SMC 6 192.168.2.1 -00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys-g 6 192.168.1.1 diff --git a/openwrt/package/kismet/files/client_manuf b/openwrt/package/kismet/files/client_manuf deleted file mode 100644 index b1c5ef42586..00000000000 --- a/openwrt/package/kismet/files/client_manuf +++ /dev/null @@ -1,249 +0,0 @@ -00:00:22:22:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver 0 -00:00:8F:8F:00:00/FF:FF:FF:FF:00:00 BreezeCOM Breezenet Pro SA-PC 0 -00:01:03:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 -00:01:03:03:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE62092A -00:01:03:03:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE777A 0 -00:01:24:00:00:00/FF:FF:FF:00:00:00 SMC Unknown default 6 192.168.2.1 -00:01:F4:F4:00:00/FF:FF:FF:FF:00:00 Entrasys CSIBD-AB-S Roamabout 0 -00:02:2D:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Agere Orinoco Gold -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Agere PC24E-H-FC 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Avaya PC24E-H-ET -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Avaya PC24E-H-FC 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Avaya World Card Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Buffalo WLI-PCM-L11 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Buffalo WLI-PCM-L11 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Buffalo WLI-PCM-L11GP 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Dell TrueMobile 1150 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Dell TrueMobile 1150 Mini-PCI 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Dell Truemobile 1150 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Dell true mobile 1150 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Gold -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent PC24E-H-FC 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent PC24E-H-FC 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent PC24E-H-FC 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Silver 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Silver (PC24E-H-FC) 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN-Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN/IEEE Version 01.01 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco MiniPCI Card (embedded in Sony Laptop) 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Orinoco Gold wireless 3 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Orinoco Gold -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Orinoco Mini PCI Card 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco PC Card T2 Extended ORiNOCO Europe 128RC4 Kit Gold 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco PC24E-H-ET -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco PC24E-H-FC 0 -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Silver -00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Silver -00:02:6F:00:00:00/FF:FF:FF:00:00:00 Senao Unknown 0 -00:02:6F:6F:00:00/FF:FF:FF:FF:00:00 Senao SL-2011 CD -00:02:6F:6F:00:00/FF:FF:FF:FF:00:00 Senao SL-2011CD 0 -00:02:6F:6F:00:00/FF:FF:FF:FF:00:00 Senao SL-2011CD -00:02:6F:6F:00:00/FF:FF:FF:FF:00:00 Senao SL-2511CD PLUS EXT2(F200) 0 -00:02:A5:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 -00:02:A5:A5:00:00/FF:FF:FF:FF:00:00 Compaq WL110 -00:02:A5:A5:00:00/FF:FF:FF:FF:00:00 Compaq WL110 REV.0A 0 -00:02:B3:B3:00:00/FF:FF:FF:FF:00:00 Intel WPC-2011BWW 0 -00:03:2F:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 -00:03:2F:2F:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 0 -00:03:2F:2F:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 -00:03:2F:2F:00:00/FF:FF:FF:FF:00:00 Repotec GL241101 -00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 -00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown Linksys 6 192.168.1.1 -00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 -00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 linksys 0 -00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 -00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 -00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 -00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys WUSB11 -00:04:75:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 -00:04:75:75:00:00/FF:FF:FF:FF:00:00 3Com 3CRSHPW696 0 -00:04:75:75:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE62092B 0 -00:04:75:75:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE62092B -00:04:DB:DB:00:00/FF:FF:FF:FF:00:00 Tellus TWL-C11 0 -00:04:E2:00:00:00/FF:FF:FF:00:00:00 SMC Unknown 0 -00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W 0 -00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W -00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W -00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W -00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W -00:05:3C:3C:00:00/FF:FF:FF:FF:00:00 Intel Intel MiniPCI High Rate Wireless (ISL3874A) 0 -00:05:5D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown 0 -00:05:5D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 Compaq HNW-100 0 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DCF-650W -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 0 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 0 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 0 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650H -00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-660 H/W:A1 F/W:4.04 0 -00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 -00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 D-Link DCF-650W -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Dell True Mobile 1150 6 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 v2 linksys 6 192.168.1.1 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF11 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF11 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF12 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF12 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF12 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WMP11 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WMP11 v2.5 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 V.3 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v2.5 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v2.5 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3.0 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 ver.3 (FCC-ID: PKW-WPC11-V31[suggests V3.1]) 0 -00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WUSB11 v2.6 0 -00:07:0E:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:07:0E:0E:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 -00:07:0E:0E:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 -00:07:50:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:07:50:50:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 -00:07:50:50:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM350 0 -00:08:21:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:08:21:21:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 -00:08:21:21:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 -00:08:21:21:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 -00:08:21:21:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 -00:09:43:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:09:43:43:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 -00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 -00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA401 0 -00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA401RA 0 -00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA401RA -00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA701 0 -00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA701 -00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear ma101 0 -00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear wab501 0 -00:09:7C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:09:7C:7C:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 -00:09:7C:7C:00:00/FF:FF:FF:FF:00:00 Cisco Cisco Aironet 352 802.11b pcmcia card 0 -00:09:92:92:00:00/FF:FF:FF:FF:00:00 Sweex LC500010 ATMEL PCMCIA FastVNET (502A-D) 0 -00:09:B7:B7:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 0 -00:09:B7:B7:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 0 -00:09:E8:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:09:E8:E8:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 -00:0A:41:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 0 -00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 0 -00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 0 -00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 -00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 -00:0A:8A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:0A:8A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:0A:8A:8A:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 -00:0B:5F:5F:00:00/FF:FF:FF:FF:00:00 Cisco AIR-CB20A-A-K9 0 -00:20:A6:A6:00:00/FF:FF:FF:FF:00:00 Proxim Symphony (PC Card 4430) 0 -00:20:D6:D6:00:00/FF:FF:FF:FF:00:00 BreezeCOM Breezenet Pro.11 SA-PCR 0 -00:30:65:00:00:00/FF:FF:FF:00:00:00 Apple Unknown 0 -00:30:65:00:00:00/FF:FF:FF:00:00:00 Apple Unknown 0 -00:30:65:65:00:00/FF:FF:FF:FF:00:00 Apple Airport Card 2002 -00:30:AB:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 -00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 0 -00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 -00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 -00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 -00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 -00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MR314 Wireless 1 192.168.0.1 -00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear Netgear ma401 0 -00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 -00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 -00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 0 -00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 0 -00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 -00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 -00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 (Version 01.02) 0 -00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020u 0 -00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DI-614+ default 6 192.168.0.1 -00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DI-614+ 22Mbps router/AP/switch default 6 192.168.0.1 -00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-520+ 0 -00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 0 -00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 internet 8 -00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650+ wireless 6 192.168.0.1 -00:40:26:00:00:00/FF:FF:FF:00:00:00 Buffalo Unknown 0 -00:40:96:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 -00:40:96:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown tsunami 6 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco 350 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PC4800 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 0 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 0 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 (Dell Rebrand) 0 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 -00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco PC 4800 DS PCI Adapter 0 -00:50:08:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 -00:50:08:08:00:00/FF:FF:FF:FF:00:00 Compaq WL100 0 -00:50:08:08:00:00/FF:FF:FF:FF:00:00 Compaq WL100 -00:50:8B:8B:00:00/FF:FF:FF:FF:00:00 Compaq Compaq WL100 compaq 0 -00:50:8B:8B:00:00/FF:FF:FF:FF:00:00 Compaq WL200 - ETSI region 0 -00:50:DA:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 -00:50:DA:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 -00:50:DA:DA:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE73796B -00:50:F2:F2:00:00/FF:FF:FF:FF:00:00 Microsoft MN-510 0 -00:50:F2:F2:00:00/FF:FF:FF:FF:00:00 Microsoft Wireless Notebook Adapter MN-520 0 -00:60:01:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 -00:60:01:01:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Silver -00:60:1D:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 -00:60:1D:00:00:00/FF:FF:FF:00:00:00 Orinoco Unknown 0 -00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent Lucent WaveLAN Turbo - Bronze, P/N: 011498/A 0 -00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Gold -00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent PC24E-00-FC 0 -00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent Silver -00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Bronze -00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Gold -00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent Wavelan Turbo Bronze 0 -00:60:6D:00:00:00/FF:FF:FF:00:00:00 Cabletron Unknown 0 -00:60:6D:6D:00:00/FF:FF:FF:FF:00:00 Cabletron CSIBB-AA -00:60:6D:6D:00:00/FF:FF:FF:FF:00:00 Cabletron CSIBB-AA -00:60:6D:6D:00:00/FF:FF:FF:FF:00:00 Cabletron RoamAbout 802.11DS 0 -00:60:B3:00:00:00/FF:FF:FF:00:00:00 Proxim Unknown 0 -00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 3Com XI-815 0 -00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 3Com Zcom WL2000D 0 -00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 Proxim RangeLAN DS 0 -00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 Proxim RangeLan DS 8430 -00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 SMC SMC2642W -00:80:37:37:00:00/FF:FF:FF:FF:00:00 Ericsson C11 (LA-4121-102M-ER-EU) 0 -00:80:C6:00:00:00/FF:FF:FF:00:00:00 SOHOware Unknown 0 -00:90:4B:4B:00:00/FF:FF:FF:FF:00:00 Dell 1180 True Mobile PCI 0 -00:90:96:96:00:00/FF:FF:FF:FF:00:00 Yakumo WLAN PCMCIA Card 11 Mbps 0 -00:90:D1:00:00:00/FF:FF:FF:00:00:00 LeArtery Unknown 0 -00:90:D1:00:00:00/FF:FF:FF:00:00:00 SMC Unknown WLAN 11 -00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 LeArtery SyncByAir LN101 -00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 SMC 2662W 0 -00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W 0 -00:A0:04:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 -00:A0:65:65:00:00/FF:FF:FF:FF:00:00 Nexland Zcom XI-300 0 -00:A0:F8:00:00:00/FF:FF:FF:00:00:00 Symbol Unknown 0 -00:A0:F8:F8:00:00/FF:FF:FF:FF:00:00 Symbol Spectrum 24 High Rate 11MBps wireless LAN adapter 0 -00:A0:F8:F8:00:00/FF:FF:FF:FF:00:00 Symbol Spectrum24 -00:C0:49:49:00:00/FF:FF:FF:FF:00:00 US Robotics USR1120 0 -00:E0:29:00:00:00/FF:FF:FF:00:00:00 OEM Unknown 0 -00:E0:29:29:00:00/FF:FF:FF:FF:00:00 OEM OEM -00:E0:29:29:00:00/FF:FF:FF:FF:00:00 SMC 2632W 0 -00:E0:29:29:00:00/FF:FF:FF:FF:00:00 SMC EZ-Connect Wireless 0 -08:00:46:00:00:00/FF:FF:FF:00:00:00 Sony Unknown 0 -08:00:46:46:00:00/FF:FF:FF:FF:00:00 Sony PCWA-C100 diff --git a/openwrt/package/kismet/files/kismet.conf b/openwrt/package/kismet/files/kismet.conf deleted file mode 100644 index a417d2885b4..00000000000 --- a/openwrt/package/kismet/files/kismet.conf +++ /dev/null @@ -1,281 +0,0 @@ -# Kismet config file -# Most of the "static" configs have been moved to here -- the command line -# config was getting way too crowded and cryptic. We want functionality, -# not continually reading --help! - -# Version of Kismet config -version=2005.01.R1 - -# Name of server (Purely for organiational purposes) -servername=Kismet - -# User to setid to (should be your normal user) -suiduser=nobody - -# Sources are defined as: -# source=cardtype,interface,name[,initialchannel] -# Card types and required drivers are listed in the README. -# The initial channel is optional, if hopping is not enabled it can be used -# to set the channel the interface listens on. -# YOU MUST CHANGE THIS TO BE THE SOURCE YOU WANT TO USE -source=wrt54g,eth1,wireless -# For v1 hardware uncomment this: -# source=wrt54g,eth2,wireless - -# Comma-separated list of sources to enable. This is only needed if you defined -# multiple sources and only want to enable some of them. By default, all defined -# sources are enabled. -# For example: -# enablesources=prismsource,ciscosource - -# Do we channelhop? -channelhop=true - -# How many channels per second do we hop? (1-10) -channelvelocity=5 - -# By setting the dwell time for channel hopping we override the channelvelocity -# setting above and dwell on each channel for the given number of seconds. -#channeldwell=10 - -# Do we split channels between cards on the same spectrum? This means if -# multiple 802.11b capture sources are defined, they will be offset to cover -# the most possible spectrum at a given time. This also controls splitting -# fine-tuned sourcechannels lines which cover multiple interfaces (see below) -channelsplit=true - -# Basic channel hopping control: -# These define the channels the cards hop through for various frequency ranges -# supported by Kismet. More finegrain control is available via the -# "sourcechannels" configuration option. -# -# Don't change the IEEE80211 identifiers or channel hopping won't work. - -# Users outside the US might want to use this list: -# defaultchannels=IEEE80211b:1,7,13,2,8,3,14,9,4,10,5,11,6,12 -defaultchannels=IEEE80211b:1,6,11,2,7,3,8,4,9,5,10 - -# 802.11g uses the same channels as 802.11b... -defaultchannels=IEEE80211g:1,6,11,2,7,3,8,4,9,5,10 - -# 802.11a channels are non-overlapping so sequential is fine. You may want to -# adjust the list depending on the channels your card actually supports. -# defaultchannels=IEEE80211a:36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,184,188,192,196,200,204,208,212,216 -defaultchannels=IEEE80211a:36,40,44,48,52,56,60,64 - -# Combo cards like Atheros use both 'a' and 'b/g' channels. Of course, you -# can also explicitly override a given source. You can use the script -# extras/listchan.pl to extract all the channels your card supports. -defaultchannels=IEEE80211ab:1,6,11,2,7,3,8,4,9,5,10,36,40,44,48,52,56,60,64 - -# Fine-tuning channel hopping control: -# The sourcechannels option can be used to set the channel hopping for -# specific interfaces, and to control what interfaces share a list of -# channels for split hopping. This can also be used to easily lock -# one card on a single channel while hopping with other cards. -# Any card without a sourcechannel definition will use the standard hopping -# list. -# sourcechannels=sourcename[,sourcename]:ch1,ch2,ch3,...chN - -# ie, for us channels on the source 'prism2source' (same as normal channel -# hopping behavior): -# sourcechannels=prism2source:1,6,11,2,7,3,8,4,9,5,10 - -# Given two capture sources, "prism2a" and "prism2b", we want prism2a to stay -# on channel 6 and prism2b to hop normally. By not setting a sourcechannels -# line for prism2b, it will use the standard hopping. -# sourcechannels=prism2a:6 - -# To assign the same custom hop channel to multiple sources, or to split the -# same custom hop channel over two sources (if splitchannels is true), list -# them all on the same sourcechannels line: -# sourcechannels=prism2a,prism2b,prism2c:1,6,11 - -# Port to serve GUI data -tcpport=2501 -# People allowed to connect, comma seperated IP addresses or network/mask -# blocks. Netmasks can be expressed as dotted quad (/255.255.255.0) or as -# numbers (/24) -allowedhosts=127.0.0.1 -# Maximum number of concurrent GUI's -maxclients=5 - -# Do we have a GPS? -gps=false -# Host:port that GPSD is running on. This can be localhost OR remote! -gpshost=localhost:2947 -# Do we lock the mode? This overrides coordinates of lock "0", which will -# generate some bad information until you get a GPS lock, but it will -# fix problems with GPS units with broken NMEA that report lock 0 -gpsmodelock=false - -# Packet filtering options: -# filter_tracker - Packets filtered from the tracker are not processed or -# recorded in any way. -# filter_dump - Packets filtered at the dump level are tracked, displayed, -# and written to the csv/xml/network/etc files, but not -# recorded in the packet dump -# filter_export - Controls what packets influence the exported CSV, network, -# xml, gps, etc files. -# All filtering options take arguments containing the type of address and -# addresses to be filtered. Valid address types are 'ANY', 'BSSID', -# 'SOURCE', and 'DEST'. Filtering can be inverted by the use of '!' before -# the address. For example, -# filter_tracker=ANY(!00:00:DE:AD:BE:EF) -# has the same effect as the previous mac_filter config file option. -# filter_tracker=... -# filter_dump=... -# filter_export=... - -# Alerts to be reported and the throttling rates. -# alert=name,throttle/unit,burst -# The throttle/unit describes the number of alerts of this type that are -# sent per time unit. Valid time units are second, minute, hour, and day. -# Burst describes the number of alerts sent before throttling takes place. -# For example: -# alert=FOO,10/min,5 -# Would allow 5 alerts through before throttling is enabled, and will then -# limit the number of alerts to 10 per minute. -# A throttle rate of 0 disables throttling of the alert. -# See the README for a list of alert types. -alert=NETSTUMBLER,5/min,2 -alert=WELLENREITER,5/min,2 -alert=LUCENTTEST,5/min,2 -alert=DEAUTHFLOOD,5/min,4 -alert=BCASTDISCON,5/min,4 -alert=CHANCHANGE,5/min,4 -alert=AIRJACKSSID,5/min,2 -alert=PROBENOJOIN,5/min,2 -alert=DISASSOCTRAFFIC,5/min,2 -alert=NULLPROBERESP,5/min,5 -alert=BSSTIMESTAMP,5/min,5 - -# Known WEP keys to decrypt, bssid,hexkey. This is only for networks where -# the keys are already known, and it may impact throughput on slower hardware. -# Multiple wepkey lines may be used for multiple BSSIDs. -# wepkey=00:DE:AD:C0:DE:00,FEEDFACEDEADBEEF01020304050607080900 - -# Is transmission of the keys to the client allowed? This may be a security -# risk for some. If you disable this, you will not be able to query keys from -# a client. -allowkeytransmit=true - -# How often (in seconds) do we write all our data files (0 to disable) -writeinterval=300 - -# Where do we get our manufacturer fingerprints from? Assumed to be in the -# default config directory if an absolute path is not given. -ap_manuf=ap_manuf -client_manuf=client_manuf - -# Use metric measurements in the output? -metric=false - -# Do we write waypoints for gpsdrive to load? Note: This is NOT related to -# recent versions of GPSDrive's native support of Kismet. -waypoints=false -# GPSMap waypoint file. This WILL be truncated. -waypointdata=%h/.gpsdrive/way_kismet.txt - -# How many alerts do we backlog for new clients? Only change this if you have -# a -very- low memory system and need those extra bytes, or if you have a high -# memory system and a huge number of alert conditions. -alertbacklog=50 - -# File types to log, comma seperated -# dump - raw packet dump -# network - plaintext detected networks -# csv - plaintext detected networks in CSV format -# xml - XML formatted network and cisco log -# weak - weak packets (in airsnort format) -# cisco - cisco equipment CDP broadcasts -# gps - gps coordinates -logtypes=dump,network,csv,xml,weak,cisco,gps - -# Do we track probe responses and merge probe networks into their owners? -# This isn't always desireable, depending on the type of monitoring you're -# trying to do. -trackprobenets=true - -# Do we log "noise" packets that we can't decipher? I tend to not, since -# they don't have anything interesting at all in them. -noiselog=false - -# Do we log corrupt packets? Corrupt packets have enough header information -# to see what they are, but someting is wrong with them that prevents us from -# completely dissecting them. Logging these is usually not a bad idea. -corruptlog=true - -# Do we log beacon packets or do we filter them out of the dumpfile -beaconlog=true - -# Do we log PHY layer packets or do we filter them out of the dumpfile -phylog=true - -# Do we mangle packets if we can decrypt them or if they're fuzzy-detected -mangledatalog=true - -# Do we do "fuzzy" crypt detection? (byte-based detection instead of 802.11 -# frame headers) -# valid option: Comma seperated list of card types to perform fuzzy detection -# on, or 'all' -fuzzycrypt=wtapfile,wlanng,wlanng_legacy,wlanng_avs,hostap,wlanng_wext - -# What type of dump do we generate? -# valid option: "wiretap" -dumptype=wiretap -# Do we limit the size of dump logs? Sometimes ethereal can't handle big ones. -# 0 = No limit -# Anything else = Max number of packets to log to a single file before closing -# and opening a new one. -dumplimit=0 - -# Do we write data packets to a FIFO for an external data-IDS (such as Snort)? -# See the docs before enabling this. -#fifo=/tmp/kismet_dump - -# Default log title -logdefault=Kismet - -# logtemplate - Filename logging template. -# This is, at first glance, really nasty and ugly, but you'll hardly ever -# have to touch it so don't complain too much. -# -# %n is replaced by the logging instance name -# %d is replaced by the current date as Mon-DD-YYYY -# %D is replaced by the current date as YYYYMMDD -# %t is replaced by the starting log time -# %i is replaced by the increment log in the case of multiple logs -# %l is replaced by the log type (dump, status, crypt, etc) -# %h is replaced by the home directory -# ie, "netlogs/%n-%d-%i.dump" called with a logging name of "Pok" could expand -# to something like "netlogs/Pok-Dec-20-01-1.dump" for the first instance and -# "netlogs/Pok-Dec-20-01-2.%l" for the second logfile generated. -# %h/netlots/%n-%d-%i.dump could expand to -# /home/foo/netlogs/Pok-Dec-20-01-2.dump -# -# Other possibilities: Sorting by directory -# logtemplate=%l/%n-%d-%i -# Would expand to, for example, -# dump/Pok-Dec-20-01-1 -# crypt/Pok-Dec-20-01-1 -# and so on. The "dump", "crypt", etc, dirs must exist before kismet is run -# in this case. -logtemplate=%n-%d-%i.%l - -# Where do we store the pid file of the server? -piddir=/var/run/ - -# Where state info, etc, is stored. You shouldnt ever need to change this. -# This is a directory. -configdir=%h/.kismet/ - -# cloaked SSID file. You shouldn't ever need to change this. -ssidmap=ssid_map - -# Group map file. You shouldn't ever need to change this. -groupmap=group_map - -# IP range map file. You shouldn't ever need to change this. -ipmap=ip_map - diff --git a/openwrt/package/kismet/files/kismet_drone.conf b/openwrt/package/kismet/files/kismet_drone.conf deleted file mode 100644 index 901b5b83e1a..00000000000 --- a/openwrt/package/kismet/files/kismet_drone.conf +++ /dev/null @@ -1,121 +0,0 @@ -# Kismet drone config file - -version=2005.04.R1 - -# Name of server (Purely for organiational purposes) -servername=Kismet - -# User to setid to (should be your normal user) -suiduser=nobody - -# Port to serve packet data... This probably shouldn't be the same as the port -# you configured kismet_server for, or else you'll have problems running them -# on the same system. -tcpport=3501 -# People allowed to connect, comma seperated IP addresses or network/mask -# blocks. Netmasks can be expressed as dotted quad (/255.255.255.0) or as -# numbers (/24) -allowedhosts=127.0.0.1 -# Maximum number of concurrent stream attachments -maxclients=5 - -# Packet sources: -# source=capture_cardtype,capture_interface,capture_name -# Card type - Specifies the type of device. It can be one of: -# cisco - Cisco card with Linux Kernel drivers -# cisco_cvs - Cisco card with CVS Linux drivers -# cisco_bsd - Cisco on *BSD -# prism2 - Prism2 using wlan-ng drivers with pcap support (all -# current versions support pcap) -# prism2_hostap - Prism2 using hostap drivers -# prism2_legacy - Prism2 using wlan-ng drivers without pcap support (0.1.9) -# prism2_bsd - Prism2 on *BSD -# orinoco - Orinoco cards using Snax's patched driers -# generic - Generic card with no specific support. You will have -# to put this into monitor mode yourself! -# wsp100 - WSP100 embedded remote sensor. -# wtapfile - Saved file of packets readable by libwiretap -# ar5k - ar5k 802.11a using the vt_ar5k drivers -# Capture interface - Specifies the network interface Kismet will watch for -# packets to come in on. Typically "ethX" or "wlanX". For the WSP100 capture -# engine, the WSP100 device sends packets via a UDP stream, so the capture -# interface should be in the form of host:port where 'host' is the WSP100 and -# 'port' is the local UDP port that it will send data to. -# Capture Name - The name Kismet uses for this capture source. This is the -# name used to specify what sources to enable. -# -# To enable multiple sources, specify a source line for each and then use the -# enablesources line to enable them. For example: -# source=prism2,wlan0,prism -# source=cisco,eth0,cisco -source=wrt54g,eth1,wireless -# For v1 hardware uncomment this: -# source=wrt54g,eth2,wireless - -# Comma-separated list of sources to enable. This is only needed if you wish -# to selectively enable multiple sources. -# enablesources=prism,cisco - -# Do we channelhop? -channelhop=true - -# How many channels per second do we hop? (1-10) -channelvelocity=5 - -# By setting the dwell time for channel hopping we override the channelvelocity -# setting above and dwell on each channel for the given number of seconds. -#channeldwell=10 - -# Do we split channels between cards on the same spectrum? This means if -# multiple 802.11b capture sources are defined, they will be offset to cover -# the most possible spectrum at a given time. This also controls splitting -# fine-tuned sourcechannels lines which cover multiple interfaces (see below) -splitchannels=true - -# Basic channel hopping control: -# These define the channels the cards hop through for various frequency ranges -# supported by Kismet. More finegrain control is available via the -# "sourcechannels" configuration option. -# -# Don't change the IEEE80211 identifiers or channel hopping won't work. - -# Users outside the US might want to use this list: -# defaultchannels=IEEE80211b:1,7,13,2,8,3,14,9,4,10,5,11,6,12 -defaultchannels=IEEE80211b:1,6,11,2,7,3,8,4,9,5,10 - -# 802.11g uses the same channels as 802.11b... -defaultchannels=IEEE80211g:1,6,11,2,7,3,8,4,9,5,10 - -# 802.11a channels are non-overlapping so sequential is fine. You may want to -# adjust the list depending on the channels your card actually supports. -# defaultchannels=IEEE80211a:36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,184,188,192,196,200,204,208,212,216 -defaultchannels=IEEE80211a:36,40,44,48,52,56,60,64 - -# Combo cards like Atheros use both 'a' and 'b/g' channels. Of course, you -# can also explicitly override a given source. You can use the script -# extras/listchan.pl to extract all the channels your card supports. -defaultchannels=IEEE80211ab:1,6,11,2,7,3,8,4,9,5,10,36,40,44,48,52,56,60,64 - -# Fine-tuning channel hopping control: -# The sourcechannels option can be used to set the channel hopping for -# specific interfaces, and to control what interfaces share a list of -# channels for split hopping. This can also be used to easily lock -# one card on a single channel while hopping with other cards. -# Any card without a sourcechannel definition will use the standard hopping -# list. -# sourcechannels=sourcename[,sourcename]:ch1,ch2,ch3,...chN - -# ie, for us channels on the source 'prism2source' (same as normal channel -# hopping behavior): -# sourcechannels=prism2source:1,6,11,2,7,3,8,4,9,5,10 - -# Given two capture sources, "prism2a" and "prism2b", we want prism2a to stay -# on channel 6 and prism2b to hop normally. By not setting a sourcechannels -# line for prism2b, it will use the standard hopping. -# sourcechannels=prism2a:6 - -# To assign the same custom hop channel to multiple sources, or to split the -# same custom hop channel over two sources (if splitchannels is true), list -# them all on the same sourcechannels line: -# sourcechannels=prism2a,prism2b,prism2c:1,6,11 - diff --git a/openwrt/package/kismet/files/kismet_ui.conf b/openwrt/package/kismet/files/kismet_ui.conf deleted file mode 100644 index e704b37e514..00000000000 --- a/openwrt/package/kismet/files/kismet_ui.conf +++ /dev/null @@ -1,61 +0,0 @@ -# Kismet GUI config file - -# Version of Kismet config -version=2005.04.R1 - -# Do we show the intro window? -showintro=false - -# Gui type to use -# Valid types: curses, panel -gui=panel -# Server to connect to (host:port) -host=localhost:2501 -# Network traffic decay (active/recent/inactive) and packet click rate - increase -# this if you are doing prism2 channel hopping. -decay=3 -# What columns do we display? Comma seperated. Read the documentation for what -# columns are valid. -columns=decay,name,type,wep,channel,packets,flags,ip,size -# What columns do we display for clients? Comma seperated. -clientcolumns=decay,type,mac,manuf,data,crypt,size,ip,signal,quality,noise - -# Do we auotmatically make a group for probed networks or do we show them -# amidst other networks? -autogroup_probe=true -# Do we autogroup data-only networks? -autogroup_data=true - -# Display battery status? -apm=false - -# Simple borders (use - and | instead of smooth vertical and horizontal -# lines. This is required on Zaurus, and might be needed elsewhere if your -# terminal doesn't display the border characters correctly. -simpleborders=false - -# Colors (front, back) of text in the panel front. Valid colors are: -# black, red, yellow, green, blue, magenta, cyan, white -# optionally prefixed with "hi-" for bold/bright colors, ie -# hi-red, hi-yellow, hi-green, etc. - -# Enable colors? -color=true -# Background -backgroundcolor=black -# Default text -textcolor=white -# Window borders -bordercolor=green -# Titles -titlecolor=hi-white -# GPS and APM info -monitorcolor=hi-white -# WEP network color -wepcolor=hi-green -# Factory network color -factorycolor=hi-red -# Open color -opencolor=hi-yellow -# Decloaked network color -cloakcolor=hi-blue diff --git a/openwrt/package/kismet/ipkg/kismet-client.conffiles b/openwrt/package/kismet/ipkg/kismet-client.conffiles deleted file mode 100644 index b849ce1ce3a..00000000000 --- a/openwrt/package/kismet/ipkg/kismet-client.conffiles +++ /dev/null @@ -1,4 +0,0 @@ -/etc/kismet/ap_manuf -/etc/kismet/client_manuf -/etc/kismet/kismet.conf -/etc/kismet/kismet_ui.conf \ No newline at end of file diff --git a/openwrt/package/kismet/ipkg/kismet-client.control b/openwrt/package/kismet/ipkg/kismet-client.control deleted file mode 100644 index e5c8f512ce4..00000000000 --- a/openwrt/package/kismet/ipkg/kismet-client.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: kismet-client -Priority: optional -Section: net -Depends: uclibc++, libncurses -Description: The kismet client - Kismet is an 802.11 layer2 wireless network detector, - sniffer, and intrusion detection system. Kismet will work with any - wireless card which supports raw monitoring (rfmon) mode, and can - sniff 802.11b, 802.11a, and 802.11g traffic. diff --git a/openwrt/package/kismet/ipkg/kismet-drone.conffiles b/openwrt/package/kismet/ipkg/kismet-drone.conffiles deleted file mode 100644 index 744e2447320..00000000000 --- a/openwrt/package/kismet/ipkg/kismet-drone.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/kismet/kismet_drone.conf diff --git a/openwrt/package/kismet/ipkg/kismet-drone.control b/openwrt/package/kismet/ipkg/kismet-drone.control deleted file mode 100644 index 9d8ac0df39e..00000000000 --- a/openwrt/package/kismet/ipkg/kismet-drone.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: kismet-drone -Priority: optional -Section: net -Depends: uclibc++, libpcap -Description: The kismet drone - Kismet is an 802.11 layer2 wireless network detector, - sniffer, and intrusion detection system. Kismet will work with any - wireless card which supports raw monitoring (rfmon) mode, and can - sniff 802.11b, 802.11a, and 802.11g traffic. diff --git a/openwrt/package/kismet/ipkg/kismet-server.conffiles b/openwrt/package/kismet/ipkg/kismet-server.conffiles deleted file mode 100644 index 0fdf437639c..00000000000 --- a/openwrt/package/kismet/ipkg/kismet-server.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/kismet/ap_manuf -/etc/kismet/client_manuf -/etc/kismet/kismet.conf diff --git a/openwrt/package/kismet/ipkg/kismet-server.control b/openwrt/package/kismet/ipkg/kismet-server.control deleted file mode 100644 index 3c416be83c4..00000000000 --- a/openwrt/package/kismet/ipkg/kismet-server.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: kismet-server -Priority: optional -Section: net -Depends: uclibc++, libpcap -Description: The kismet server - Kismet is an 802.11 layer2 wireless network detector, - sniffer, and intrusion detection system. Kismet will work with any - wireless card which supports raw monitoring (rfmon) mode, and can - sniff 802.11b, 802.11a, and 802.11g traffic. diff --git a/openwrt/package/kismet/ipkg/kismet.control b/openwrt/package/kismet/ipkg/kismet.control deleted file mode 100644 index 193328563cc..00000000000 --- a/openwrt/package/kismet/ipkg/kismet.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: kismet -Priority: optional -Section: net -Depends: libgcc, kismet-client, kismet-server -Description: kismet - Kismet is an 802.11 layer2 wireless network detector, - sniffer, and intrusion detection system. Kismet will work with any - wireless card which supports raw monitoring (rfmon) mode, and can - sniff 802.11b, 802.11a, and 802.11g traffic. diff --git a/openwrt/package/kismet/patches/100-wrt54g_source.patch b/openwrt/package/kismet/patches/100-wrt54g_source.patch deleted file mode 100644 index 3336a8f4290..00000000000 --- a/openwrt/package/kismet/patches/100-wrt54g_source.patch +++ /dev/null @@ -1,189 +0,0 @@ -diff -urN kismet.old/kis_packsources.cc kismet.dev/kis_packsources.cc ---- kismet.old/kis_packsources.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev/kis_packsources.cc 2005-08-23 00:59:04.465379568 +0200 -@@ -192,7 +192,7 @@ - chancontrol_wlanng_avs, 1); - sourcetracker->RegisterPacketsource("wrt54g", 1, "na", 0, - pcapsource_wrt54g_registrant, -- monitor_wrt54g, NULL, NULL, 0); -+ monitor_wrt54g, unmonitor_wrt54g, chancontrol_wext, 0); - #else - REG_EMPTY_CARD(sourcetracker, "wlanng"); - REG_EMPTY_CARD(sourcetracker, "wlanng_avs"); -diff -urN kismet.old/packetsourcetracker.cc kismet.dev/packetsourcetracker.cc ---- kismet.old/packetsourcetracker.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev/packetsourcetracker.cc 2005-08-23 00:59:39.969982048 +0200 -@@ -986,6 +986,7 @@ - (meta_packsources[chanpak.meta_num]->device.c_str(), - chanpak.channel, errstr, - (void *) (meta_packsources[chanpak.meta_num]->capsource)) < 0) { -+#if 0 - - meta_packsources[chanpak.meta_num]->consec_errors++; - -@@ -1007,6 +1008,7 @@ - CHANFLAG_FATAL)); - continue; - } -+#endif - } else { - // Otherwise reset the error count - meta_packsources[chanpak.meta_num]->consec_errors = 0; -diff -urN kismet.old/pcapsource.cc kismet.dev/pcapsource.cc ---- kismet.old/pcapsource.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev/pcapsource.cc 2005-08-23 01:03:45.652632608 +0200 -@@ -115,6 +115,53 @@ - u_char callback_data[MAX_PACKET_LEN]; - - // Open a source -+int PcapSourceWrt54g::OpenSource() { -+ channel = 0; -+ -+ errstr[0] = '\0'; -+ -+ char *unconst = strdup("prism0"); -+ -+ pd = pcap_open_live(unconst, MAX_PACKET_LEN, 1, 1000, errstr); -+ -+ #if defined (SYS_OPENBSD) || defined(SYS_NETBSD) && defined(HAVE_RADIOTAP) -+ /* Request desired DLT on multi-DLT systems that default to EN10MB. We do this -+ later anyway but doing it here ensures we have the desired DLT from the get go. */ -+ pcap_set_datalink(pd, DLT_IEEE802_11_RADIO); -+ #endif -+ -+ free(unconst); -+ -+ if (strlen(errstr) > 0) -+ return -1; // Error is already in errstr -+ -+ paused = 0; -+ -+ errstr[0] = '\0'; -+ -+ num_packets = 0; -+ -+ if (DatalinkType() < 0) -+ return -1; -+ -+#ifdef HAVE_PCAP_NONBLOCK -+ pcap_setnonblock(pd, 1, errstr); -+#elif !defined(SYS_OPENBSD) -+ // do something clever (Thanks to Guy Harris for suggesting this). -+ int save_mode = fcntl(pcap_get_selectable_fd(pd), F_GETFL, 0); -+ if (fcntl(pcap_get_selectable_fd(pd), F_SETFL, save_mode | O_NONBLOCK) < 0) { -+ snprintf(errstr, 1024, "fcntl failed, errno %d (%s)", -+ errno, strerror(errno)); -+ } -+#endif -+ -+ if (strlen(errstr) > 0) -+ return -1; // Ditto -+ -+ return 1; -+} -+ -+// Open a source - int PcapSource::OpenSource() { - channel = 0; - -@@ -1928,63 +1975,32 @@ - int monitor_wrt54g(const char *in_dev, int initch, char *in_err, void **in_if, - void *in_ext) { - char cmdline[2048]; -- int mode; -- int wlmode = 0; -- --#ifdef HAVE_LINUX_WIRELESS -- vector devbits = StrTokenize(in_dev, ":"); - -- if (devbits.size() < 2) { -- snprintf(cmdline, 2048, "/usr/sbin/wl monitor 1"); -+ snprintf(cmdline, 2048, "/usr/sbin/iwpriv %s set_monitor 1", in_dev); - if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to set mode using 'wl monitor 1'. Some " -- "custom firmware images require you to specify the origial " -+ snprintf(in_err, 1024, "Unable to set mode using 'iwpriv %s set_monitor 1'. " -+ "Some custom firmware images require you to specify the origial " - "device and a new dynamic device and use the iwconfig controls. " - "see the README for how to configure your capture source."); - return -1; - } -- } else { -- // Get the mode ... If this doesn't work, try the old wl method. -- if (Iwconfig_Get_Mode(devbits[0].c_str(), in_err, &mode) < 0) { -- fprintf(stderr, "WARNING: Getting wireless mode via ioctls failed, " -- "defaulting to trying the 'wl' command.\n"); -- wlmode = 1; -- } - -- if (wlmode == 1) { -- snprintf(cmdline, 2048, "/usr/sbin/wl monitor 1"); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- } else if (mode != LINUX_WLEXT_MONITOR) { -- // Set it -- if (Iwconfig_Set_Mode(devbits[0].c_str(), in_err, -- LINUX_WLEXT_MONITOR) < 0) { -- snprintf(in_err, STATUS_MAX, "Unable to set iwconfig monitor " -- "mode. If you are using an older wrt54g, try specifying " -- "only the ethernet device, not ethX:prismX"); -- return -1; -- } -+ return 1; -+} -+ -+ -+int unmonitor_wrt54g(const char *in_dev, int initch, char *in_err, void **in_if, -+ void *in_ext) { -+ char cmdline[2048]; -+ -+ snprintf(cmdline, 2048, "/usr/sbin/iwpriv %s set_monitor 0", in_dev); -+ if (RunSysCmd(cmdline) < 0) { -+ snprintf(in_err, 1024, "Unable to set mode using 'iwpriv %s set_monitor 0'. " -+ "Some custom firmware images require you to specify the origial " -+ "device and a new dynamic device and use the iwconfig controls. " -+ "see the README for how to configure your capture source."); -+ return -1; - } -- } --#else -- snprintf(cmdline, 2048, "/usr/sbin/wl monitor 1"); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to set mode using 'wl monitor 1'. Some " -- "custom firmware images require you to specify the origial " -- "device and a new dynamic device and use the iwconfig controls. " -- "see the README for how to configure your capture source. " -- "Support for wireless extensions was not compiled in, so more " -- "advanced modes of setting monitor mode are not available."); -- return -1; -- } -- fprintf(stderr, "WARNING: Support for wireless extensions was not compiled " -- "into this binary. Using the iw* tools to set monitor mode will not " -- "be available. This may cause opening the source to fail on some " -- "firmware versions. To fix this, make sure wireless extensions are " -- "available and found by the configure script when building Kismet."); --#endif - - return 1; - } -diff -urN kismet.old/pcapsource.h kismet.dev/pcapsource.h ---- kismet.old/pcapsource.h 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev/pcapsource.h 2005-08-23 01:04:26.057490136 +0200 -@@ -265,6 +265,7 @@ - PcapSourceWrt54g(string in_name, string in_dev) : PcapSource(in_name, in_dev) { - fcsbytes = 4; - } -+ int OpenSource(); - int FetchPacket(kis_packet *packet, uint8_t *data, uint8_t *moddata); - protected: - carrier_type IEEE80211Carrier(); -@@ -412,6 +413,7 @@ - int monitor_wlanng_avs(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext); - // linksys wrt54g monitoring - int monitor_wrt54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext); -+int unmonitor_wrt54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext); - #endif - - // This should be expanded to handle BSD... diff --git a/openwrt/package/kismet/patches/110-uclibc++_fixes.patch b/openwrt/package/kismet/patches/110-uclibc++_fixes.patch deleted file mode 100644 index 4cf5a7b5b53..00000000000 --- a/openwrt/package/kismet/patches/110-uclibc++_fixes.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -urN kismet-2005-04-R1.old/configfile.cc kismet-2005-04-R1.dev/configfile.cc ---- kismet-2005-04-R1.old/configfile.cc 2005-04-03 07:33:42.000000000 +0200 -+++ kismet-2005-04-R1.dev/configfile.cc 2005-04-26 01:37:32.000000000 +0200 -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - #include "configfile.h" - #include "util.h" - -diff -urN kismet-2005-04-R1.old/macaddr.h kismet-2005-04-R1.dev/macaddr.h ---- kismet-2005-04-R1.old/macaddr.h 2005-04-03 07:33:42.000000000 +0200 -+++ kismet-2005-04-R1.dev/macaddr.h 2005-04-26 01:42:38.000000000 +0200 -@@ -321,12 +321,12 @@ - } - - // equal -- inline bool operator==(const iterator& op) const { -+ inline bool operator==(const iterator& op) { - return (singleton_itr == op.singleton_itr) && (vector_itr == op.vector_itr); - } - - // not -- inline bool operator!=(const iterator& op) const { -+ inline bool operator!=(const iterator& op) { - return (singleton_itr != op.singleton_itr) || (vector_itr != op.vector_itr); - } - diff --git a/openwrt/package/kismet/patches/120-cleanup.patch b/openwrt/package/kismet/patches/120-cleanup.patch deleted file mode 100644 index 17430807c70..00000000000 --- a/openwrt/package/kismet/patches/120-cleanup.patch +++ /dev/null @@ -1,3113 +0,0 @@ -diff -urN kismet.dev/Makefile.in kismet.dev2/Makefile.in ---- kismet.dev/Makefile.in 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/Makefile.in 2005-08-23 01:59:25.643220248 +0200 -@@ -39,26 +39,25 @@ - DEPEND = .depend - - # Objects --PSO = util.o ringbuf.o configfile.o speech.o ifcontrol.o iwcontrol.o packet.o \ -- pcapsource.o prism2source.o wtapfilesource.o wsp100source.o \ -- dronesource.o vihasource.o packetsourcetracker.o kis_packsources.o \ -- wtapdump.o wtaplocaldump.o gpsdump.o airsnortdump.o fifodump.o \ -- gpsd.o manuf.o \ -+PSO = util.o ringbuf.o configfile.o ifcontrol.o iwcontrol.o packet.o \ -+ pcapsource.o manuf.o \ -+ dronesource.o packetsourcetracker.o kis_packsources.o \ -+ wtapdump.o wtaplocaldump.o airsnortdump.o fifodump.o \ - packetracker.o timetracker.o alertracker.o finitestate.o \ - getopt.o \ - tcpserver.o server_protocols.o server_globals.o kismet_server.o - PS = kismet_server - - DRONEO = util.o ringbuf.o configfile.o getopt.o ifcontrol.o iwcontrol.o packet.o \ -- tcpstreamer.o prism2source.o pcapsource.o wtapfilesource.o wsp100source.o \ -- dronesource.o vihasource.o packetsourcetracker.o kis_packsources.o \ -- timetracker.o gpsd.o server_globals.o kismet_drone.o -+ tcpstreamer.o pcapsource.o \ -+ dronesource.o packetsourcetracker.o kis_packsources.o \ -+ timetracker.o server_globals.o kismet_drone.o - DRONE = kismet_drone - --NCO = util.o configfile.o speech.o manuf.o tcpclient.o \ -+NCO = util.o configfile.o manuf.o tcpclient.o \ - frontend.o cursesfront.o \ - panelfront.o panelfront_display.o panelfront_input.o \ -- gpsd.o getopt.o kismet_client.o -+ getopt.o kismet_client.o - NC = kismet_client - - GPSLO = getopt.o util.o configfile.o expat.o manuf.o \ -diff -urN kismet.dev/cursesfront.cc kismet.dev2/cursesfront.cc ---- kismet.dev/cursesfront.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/cursesfront.cc 2005-08-23 01:59:25.643220248 +0200 -@@ -30,7 +30,6 @@ - // Enable the protocols we can use - void NCurseFront::AddClient(TcpClient *in_client) { - client = in_client; -- client->EnableProtocol("GPS"); - client->EnableProtocol("INFO"); - client->EnableProtocol("REMOVE"); - client->EnableProtocol("NETWORK"); -@@ -88,32 +87,8 @@ - mvwaddstr(netborder, 1, 2, " SSID T W Ch Data LLC Crypt Wk Flags"); - } - -- char gpsdata[1024]; -- float lat, lon, alt, spd, heading; - int mode; - -- client->FetchLoc(&lat, &lon, &alt, &spd, &heading, &mode); -- -- if (!(lat == 0 && lon == 0 && alt == 0 && spd == 0 && mode == 0)) { -- -- char fix[16]; -- -- if (mode == -1) -- snprintf(fix, 16, "No signal"); -- else if (mode == 2) -- snprintf(fix, 5, "2D"); -- else if (mode == 3) -- snprintf(fix, 5, "3D"); -- else -- snprintf(fix, 5, "NONE"); -- -- snprintf(gpsdata, 1024, "Lat %.3f Lon %.3f Alt %.3f Spd %.3f Fix %s", -- lat, lon, alt, spd, fix); -- -- mvwaddstr(netborder, LINES-statheight-1, 2, gpsdata); -- -- } -- - box(infoborder, '|', '-'); - mvwaddstr(infoborder, 0, 2, "Info"); - -diff -urN kismet.dev/dronesource.cc kismet.dev2/dronesource.cc ---- kismet.dev/dronesource.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/dronesource.cc 2005-08-23 01:59:25.644220096 +0200 -@@ -201,9 +201,6 @@ - return -1; - } - -- // Grab the GPS info -- gps_enabled = vpkt.gps_enabled; -- - stream_recv_bytes = 0; - - // printf("debug - version packet valid\n\n"); -@@ -336,25 +333,6 @@ - packet->encoding = (encoding_type) phdr.encoding; - packet->datarate = (uint32_t) ntohl(phdr.datarate); - -- if (gps_enabled) { -- // If the drone is sending us GPS data, use it -- packet->gps_lat = Pair2Float((int16_t) ntohs(phdr.gps_lat), -- (int64_t) kis_ntoh64(phdr.gps_lat_mant)); -- packet->gps_lon = Pair2Float((int16_t) ntohs(phdr.gps_lon), -- (int64_t) kis_ntoh64(phdr.gps_lon_mant)); -- packet->gps_alt = Pair2Float((int16_t) ntohs(phdr.gps_alt), -- (int64_t) kis_ntoh64(phdr.gps_alt_mant)); -- packet->gps_spd = Pair2Float((int16_t) ntohs(phdr.gps_spd), -- (int64_t) kis_ntoh64(phdr.gps_spd_mant)); -- packet->gps_heading = Pair2Float((int16_t) ntohs(phdr.gps_heading), -- (int64_t) kis_ntoh64(phdr.gps_heading_mant)); -- packet->gps_fix = phdr.gps_fix; -- } else if (gpsd != NULL) { -- // Otherwise, no -- gpsd->FetchLoc(&packet->gps_lat, &packet->gps_lon, &packet->gps_alt, -- &packet->gps_spd, &packet->gps_heading, &packet->gps_fix); -- } -- - packet->data = data; - packet->moddata = moddata; - packet->modified = 0; -diff -urN kismet.dev/dronesource.h kismet.dev2/dronesource.h ---- kismet.dev/dronesource.h 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/dronesource.h 2005-08-23 01:59:25.644220096 +0200 -@@ -79,9 +79,6 @@ - uint8_t databuf[MAX_PACKET_LEN]; - - unsigned int resyncing; -- -- // Is the drone pushing GPS data to us? -- int gps_enabled; - }; - - // Nothing but a registrant for us -diff -urN kismet.dev/frontend.cc kismet.dev2/frontend.cc ---- kismet.dev/frontend.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/frontend.cc 2005-08-23 01:59:25.645219944 +0200 -@@ -248,33 +248,6 @@ - - } - -- // Aggregate the GPS data -- if (wnet->aggregate_points > 0) { -- dnet->virtnet->aggregate_lat += wnet->aggregate_lat; -- dnet->virtnet->aggregate_lon += wnet->aggregate_lon; -- dnet->virtnet->aggregate_alt += wnet->aggregate_alt; -- dnet->virtnet->aggregate_points += wnet->aggregate_points; -- } -- -- if (wnet->gps_fixed > dnet->virtnet->gps_fixed) -- dnet->virtnet->gps_fixed = wnet->gps_fixed; -- if (wnet->min_lat < dnet->virtnet->min_lat || dnet->virtnet->min_lat == 0) -- dnet->virtnet->min_lat = wnet->min_lat; -- if (wnet->min_lon < dnet->virtnet->min_lon || dnet->virtnet->min_lon == 0) -- dnet->virtnet->min_lon = wnet->min_lon; -- if (wnet->min_alt < dnet->virtnet->min_alt || dnet->virtnet->min_alt == 0) -- dnet->virtnet->min_alt = wnet->min_alt; -- if (wnet->min_spd < dnet->virtnet->min_spd || dnet->virtnet->min_spd == 0) -- dnet->virtnet->min_spd = wnet->min_spd; -- if (wnet->max_lat > dnet->virtnet->max_lat || dnet->virtnet->max_lat == 0) -- dnet->virtnet->max_lat = wnet->max_lat; -- if (wnet->max_lon > dnet->virtnet->max_lon || dnet->virtnet->max_lon == 0) -- dnet->virtnet->max_lon = wnet->max_lon; -- if (wnet->max_alt > dnet->virtnet->max_alt || dnet->virtnet->max_alt == 0) -- dnet->virtnet->max_alt = wnet->max_alt; -- if (wnet->max_spd > dnet->virtnet->max_spd || dnet->virtnet->max_spd == 0) -- dnet->virtnet->max_spd = wnet->max_spd; -- - // Aggregate the carriers and encodings - dnet->virtnet->carrier_set |= wnet->carrier_set; - dnet->virtnet->encoding_set |= wnet->encoding_set; -diff -urN kismet.dev/kis_packsources.cc kismet.dev2/kis_packsources.cc ---- kismet.dev/kis_packsources.cc 2005-08-23 00:59:04.465379568 +0200 -+++ kismet.dev2/kis_packsources.cc 2005-08-23 02:01:08.585570632 +0200 -@@ -60,13 +60,8 @@ - - #if defined(HAVE_LIBPCAP) && defined(HAVE_LINUX_WIRELESS) - // Linux wext-driven cards -- sourcetracker->RegisterPacketsource("cisco", 1, "IEEE80211b", 6, -- pcapsource_wext_registrant, -- monitor_cisco, unmonitor_cisco, -- chancontrol_wext, 1); -- sourcetracker->RegisterPacketsource("cisco_wifix", 1, "IEEE80211b", 6, -- pcapsource_ciscowifix_registrant, -- monitor_cisco_wifix, NULL, NULL, 1); -+ REG_EMPTY_CARD(sourcetracker, "cisco"); -+ REG_EMPTY_CARD(sourcetracker, "cisco_wifix"); - sourcetracker->RegisterPacketsource("hostap", 1, "IEEE80211b", 6, - pcapsource_wext_registrant, - monitor_hostap, unmonitor_hostap, -@@ -79,21 +74,9 @@ - pcapsource_wext_registrant, - monitor_orinoco, unmonitor_orinoco, - chancontrol_orinoco, 1); -- sourcetracker->RegisterPacketsource("acx100", 1, "IEEE80211b", 6, -- pcapsource_wextfcs_registrant, -- monitor_acx100, unmonitor_acx100, -- chancontrol_wext, 1); -- sourcetracker->RegisterPacketsource("admtek", 1, "IEEE80211b", 6, -- pcapsource_wext_registrant, -- monitor_admtek, unmonitor_admtek, -- chancontrol_wext, 1); -- sourcetracker->RegisterPacketsource("vtar5k", 1, "IEEE80211a", 36, -- pcapsource_wext_registrant, -- monitor_vtar5k, NULL, chancontrol_wext, 1); -- sourcetracker->RegisterPacketsource("atmel_usb", 1, "IEEE80211b", 6, -- pcapsource_wext_registrant, -- monitor_wext, unmonitor_wext, -- chancontrol_wext, 1); -+ REG_EMPTY_CARD(sourcetracker, "acx100"); -+ REG_EMPTY_CARD(sourcetracker, "admtek"); -+ REG_EMPTY_CARD(sourcetracker, "vtar5k"); - - sourcetracker->RegisterPacketsource("madwifi_a", 1, "IEEE80211a", 36, - pcapsource_wextfcs_registrant, -@@ -121,38 +104,14 @@ - monitor_prism54g, unmonitor_prism54g, - chancontrol_prism54g, 1); - -- sourcetracker->RegisterPacketsource("wlanng_wext", 1, "IEEE80211b", 6, -- pcapsource_wlanng_registrant, -- monitor_wlanng_avs, NULL, -- chancontrol_wext, 1); -- -- sourcetracker->RegisterPacketsource("ipw2100", 1, "IEEE80211b", 6, -- pcapsource_wext_registrant, -- monitor_ipw2100, unmonitor_ipw2100, -- chancontrol_ipw2100, 1); -- -- sourcetracker->RegisterPacketsource("ipw2200", 1, "IEEE80211g", 6, -- pcapsource_wext_registrant, -- monitor_ipw2200, unmonitor_ipw2200, -- chancontrol_ipw2200, 1); -- -- sourcetracker->RegisterPacketsource("ipw2915", 1, "IEEE80211ab", 6, -- pcapsource_wext_registrant, -- monitor_ipw2200, unmonitor_ipw2200, -- chancontrol_ipw2200, 1); -+ REG_EMPTY_CARD(sourcetracker, "wlanng_wext"); -+ REG_EMPTY_CARD(sourcetracker, "ipw2100"); -+ REG_EMPTY_CARD(sourcetracker, "ipw2200"); -+ REG_EMPTY_CARD(sourcetracker, "ipw2915"); -+ REG_EMPTY_CARD(sourcetracker, "rt2400"); -+ REG_EMPTY_CARD(sourcetracker, "rt2500"); -+ REG_EMPTY_CARD(sourcetracker, "rt8180"); - -- sourcetracker->RegisterPacketsource("rt2400", 1, "IEEE80211b", 6, -- pcapsource_wext_registrant, -- monitor_wext, unmonitor_wext, -- chancontrol_wext, 1); -- sourcetracker->RegisterPacketsource("rt2500", 1, "IEEE80211g", 6, -- pcapsource_11g_registrant, -- monitor_wext, unmonitor_wext, -- chancontrol_wext, 1); -- sourcetracker->RegisterPacketsource("rt8180", 1, "IEEE80211b", 6, -- pcapsource_wext_registrant, -- monitor_wext, unmonitor_wext, -- chancontrol_wext, 1); - - #else - // Register the linuxwireless pcap stuff as null -@@ -182,31 +141,13 @@ - REG_EMPTY_CARD(sourcetracker, "wlanng_wext"); - #endif - --#if defined(HAVE_LIBPCAP) && defined(SYS_LINUX) -- sourcetracker->RegisterPacketsource("wlanng", 1, "IEEE80211b", 6, -- pcapsource_wlanng_registrant, -- monitor_wlanng, NULL, chancontrol_wlanng, 1); -- sourcetracker->RegisterPacketsource("wlanng_avs", 1, "IEEE80211b", 6, -- pcapsource_wlanng_registrant, -- monitor_wlanng_avs, NULL, -- chancontrol_wlanng_avs, 1); - sourcetracker->RegisterPacketsource("wrt54g", 1, "na", 0, - pcapsource_wrt54g_registrant, -- monitor_wrt54g, unmonitor_wrt54g, chancontrol_wext, 0); --#else -+ monitor_wrt54g, unmonitor_wrt54g, chancontrol_wext, 0); -+ - REG_EMPTY_CARD(sourcetracker, "wlanng"); - REG_EMPTY_CARD(sourcetracker, "wlanng_avs"); -- REG_EMPTY_CARD(sourcetracker, "wrt54g"); --#endif -- --#if defined(SYS_LINUX) && defined(HAVE_LINUX_NETLINK) -- sourcetracker->RegisterPacketsource("wlanng_legacy", 1, "IEEE80211b", 6, -- prism2source_registrant, -- monitor_wlanng_legacy, NULL, -- chancontrol_wlanng_legacy, 1); --#else - REG_EMPTY_CARD(sourcetracker, "wlanng_legacy"); --#endif - - #if defined(HAVE_LIBPCAP) && defined(SYS_OPENBSD) - sourcetracker->RegisterPacketsource("cisco_openbsd", 1, "IEEE80211b", 6, -@@ -240,29 +181,11 @@ - REG_EMPTY_CARD(sourcetracker, "radiotap_bsd_b"); - #endif - --#if defined(HAVE_LIBWIRETAP) -- sourcetracker->RegisterPacketsource("wtapfile", 0, "na", 0, -- wtapfilesource_registrant, -- NULL, NULL, NULL, 0); --#else - REG_EMPTY_CARD(sourcetracker, "wtapfile"); --#endif - --#if defined(HAVE_WSP100) -- sourcetracker->RegisterPacketsource("wsp100", 0, "IEEE80211b", 6, -- wsp100source_registrant, -- monitor_wsp100, NULL, chancontrol_wsp100, 0); --#else - REG_EMPTY_CARD(sourcetracker, "wsp100"); --#endif - --#if defined(HAVE_VIHAHEADERS) -- sourcetracker->RegisterPacketsource("viha", 1, "IEEE80211b", 6, -- vihasource_registrant, -- NULL, NULL, chancontrol_viha, 0); --#else - REG_EMPTY_CARD(sourcetracker, "viha"); --#endif - - return 1; - } -diff -urN kismet.dev/kis_packsources.h kismet.dev2/kis_packsources.h ---- kismet.dev/kis_packsources.h 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/kis_packsources.h 2005-08-23 01:59:25.646219792 +0200 -@@ -22,11 +22,7 @@ - #include "config.h" - - #include "packetsource.h" --#include "prism2source.h" - #include "pcapsource.h" --#include "wtapfilesource.h" --#include "wsp100source.h" --#include "vihasource.h" - #include "dronesource.h" - #include "packetsourcetracker.h" - -diff -urN kismet.dev/kismet_client.cc kismet.dev2/kismet_client.cc ---- kismet.dev/kismet_client.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/kismet_client.cc 2005-08-23 01:59:25.648219488 +0200 -@@ -28,7 +28,6 @@ - #include "cursesfront.h" - #include "panelfront.h" - #include "configfile.h" --#include "speech.h" - - #ifndef exec_name - char *exec_name; -@@ -47,11 +46,7 @@ - char *configfile; - char *uiconfigfile; - char *server = NULL; --int sound = -1; --int speech = -1; - int flite = 0; --int speech_encoding = 0; --string speech_sentence_encrypted, speech_sentence_unencrypted; - unsigned int metric = 0; - unsigned int reconnect = 0; - -@@ -59,20 +54,9 @@ - string configdir, groupfile; - FILE *group_file = NULL; - --// Pipe file descriptor pairs and fd's --int soundpair[2]; --int speechpair[2]; --pid_t soundpid = -1, speechpid = -1; -- - // Catch our interrupt - void CatchShutdown(int sig) { - -- // Kill our sound players -- if (soundpid > 0) -- kill(soundpid, 9); -- if (speechpid > 0) -- kill(speechpid, 9); -- - if (group_track) { - if ((group_file = fopen(groupfile.c_str(), "w")) == NULL) { - fprintf(stderr, "WARNING: Unable to open '%s' for writing, groups will not be saved.\n", -@@ -116,215 +100,6 @@ - exit(0); - } - --// Subprocess sound handler --void SoundHandler(int *fds, const char *player, map soundmap) { -- int read_sock = fds[0]; -- -- close(fds[1]); -- -- signal(SIGPIPE, PipeHandler); -- -- fd_set rset; -- -- char data[1024]; -- -- pid_t sndpid = -1; -- int harvested = 1; -- -- while (1) { -- FD_ZERO(&rset); -- FD_SET(read_sock, &rset); -- char *end; -- -- memset(data, 0, 1024); -- -- if (harvested == 0) { -- // We consider a wait error to be a sign that the child pid died -- // so we flag it as harvested and keep on going -- pid_t harvestpid = waitpid(sndpid, NULL, WNOHANG); -- if (harvestpid == -1 || harvestpid == sndpid) -- harvested = 1; -- } -- -- struct timeval tim; -- tim.tv_sec = 1; -- tim.tv_usec = 0; -- -- if (select(read_sock + 1, &rset, NULL, NULL, &tim) < 0) { -- if (errno != EINTR) { -- exit(1); -- } -- } -- -- if (FD_ISSET(read_sock, &rset)) { -- int ret; -- ret = read(read_sock, data, 1024); -- -- // We'll die off if we get a read error, and we'll let kismet on the -- // other side detact that it died -- if (ret <= 0 && (errno != EAGAIN && errno != EPIPE)) -- exit(1); -- -- if ((end = strstr(data, "\n")) == NULL) -- continue; -- -- end[0] = '\0'; -- } -- -- if (data[0] == '\0') -- continue; -- -- // If we've harvested the process, spawn a new one and watch it -- // instead. Otherwise, we just let go of the data we read -- if (harvested == 1) { -- // Only take the first line -- char *nl; -- if ((nl = strchr(data, '\n')) != NULL) -- *nl = '\0'; -- -- char snd[1024]; -- -- if (soundmap.size() == 0) -- snprintf(snd, 1024, "%s", data); -- if (soundmap.find(data) != soundmap.end()) -- snprintf(snd, 1024, "%s", soundmap[data].c_str()); -- else -- continue; -- -- char plr[1024]; -- snprintf(plr, 1024, "%s", player); -- -- harvested = 0; -- if ((sndpid = fork()) == 0) { -- // Suppress errors -- int nulfd = open("/dev/null", O_RDWR); -- dup2(nulfd, 1); -- dup2(nulfd, 2); -- -- char * const echoarg[] = { plr, snd, NULL }; -- execve(echoarg[0], echoarg, NULL); -- } -- } -- -- data[0] = '\0'; -- } --} -- --// Subprocess speech handler --void SpeechHandler(int *fds, const char *player) { -- int read_sock = fds[0]; -- close(fds[1]); -- -- fd_set rset; -- -- char data[1024]; -- -- pid_t sndpid = -1; -- int harvested = 1; -- -- while (1) { -- FD_ZERO(&rset); -- FD_SET(read_sock, &rset); -- //char *end; -- -- memset(data, 0, 1024); -- -- struct timeval tim; -- tim.tv_sec = 1; -- tim.tv_usec = 0; -- -- if (select(read_sock + 1, &rset, NULL, NULL, &tim) < 0) { -- if (errno != EINTR) { -- exit(1); -- } -- } -- -- if (harvested == 0) { -- // We consider a wait error to be a sign that the child pid died -- // so we flag it as harvested and keep on going -- pid_t harvestpid = waitpid(sndpid, NULL, WNOHANG); -- if (harvestpid == -1 || harvestpid == sndpid) -- harvested = 1; -- } -- -- if (FD_ISSET(read_sock, &rset)) { -- int ret; -- ret = read(read_sock, data, 1024); -- -- // We'll die off if we get a read error, and we'll let kismet on the -- // other side detact that it died -- if (ret <= 0 && (errno != EAGAIN && errno != EPIPE)) -- exit(1); -- -- data[ret] = '\0'; -- -- } -- -- if (data[0] == '\0') -- continue; -- -- // If we've harvested the process, spawn a new one and watch it -- // instead. Otherwise, we just let go of the data we read -- if (harvested == 1) { -- harvested = 0; -- if ((sndpid = fork()) == 0) { -- // Only take the first line -- char *nl; -- if ((nl = strchr(data, '\n')) != NULL) -- *nl = '\0'; -- -- // Make sure it's shell-clean -- MungeToShell(data, strlen(data)); -- char spk_call[1024]; -- snprintf(spk_call, 1024, "echo \"(%s\\\"%s\\\")\" | %s " -- ">/dev/null 2>/dev/null", -- flite ? "": "SayText ", data, player); -- -- system(spk_call); -- -- exit(0); -- } -- } -- -- data[0] = '\0'; -- } --} -- -- --int PlaySound(string in_sound) { -- -- char snd[1024]; -- -- snprintf(snd, 1024, "%s\n", in_sound.c_str()); -- -- if (write(soundpair[1], snd, strlen(snd)) < 0) { -- char status[STATUS_MAX]; -- snprintf(status, STATUS_MAX, -- "ERROR: Could not write to sound pipe. Stopping sound."); -- gui->WriteStatus(status); -- -- return 0; -- } -- -- return 1; --} -- --int SayText(string in_text) { -- char snd[1024]; -- -- snprintf(snd, 1024, "%s\n", in_text.c_str()); -- -- if (write(speechpair[1], snd, strlen(snd)) < 0) { -- char status[STATUS_MAX]; -- snprintf(status, STATUS_MAX, -- "ERROR: Could not write to speech pipe. Stopping speech."); -- gui->WriteStatus(status); -- -- return 0; -- } -- -- return 1; --} - - int main(int argc, char *argv[]) { - exec_name = argv[0]; -@@ -345,8 +120,6 @@ - char guihost[1024]; - int guiport = -1; - -- int gpsmode = -1; -- - configfile = NULL; - uiconfigfile = NULL; - -@@ -391,7 +164,6 @@ - fprintf(stderr, "Using alternate UI config file: %s\n", uiconfigfile); - break; - case 'q': -- sound = 0; - break; - case 'g': - reqgui = strdup(optarg); -@@ -515,70 +287,6 @@ - server = strdup(gui_conf->FetchOpt("host").c_str()); - } - -- if (gui_conf->FetchOpt("sound") == "true" && sound == -1) { -- if (gui_conf->FetchOpt("soundplay") != "") { -- sndplay = gui_conf->FetchOpt("soundplay"); -- sound = 1; -- -- if (gui_conf->FetchOpt("soundopts") != "") -- sndplay += " " + gui_conf->FetchOpt("soundopts"); -- -- if (gui_conf->FetchOpt("sound_new") != "") -- wav_map["new"] = gui_conf->FetchOpt("sound_new"); -- if (gui_conf->FetchOpt("sound_new_wep") != "") -- wav_map["new_wep"] = gui_conf->FetchOpt("sound_new_wep"); -- if (gui_conf->FetchOpt("sound_traffic") != "") -- wav_map["traffic"] = gui_conf->FetchOpt("sound_traffic"); -- if (gui_conf->FetchOpt("sound_junktraffic") != "") -- wav_map["junktraffic"] = gui_conf->FetchOpt("sound_junktraffic"); -- if (gui_conf->FetchOpt("sound_gpslock") != "") -- wav_map["gpslock"] = gui_conf->FetchOpt("sound_gpslock"); -- if (gui_conf->FetchOpt("sound_gpslost") != "") -- wav_map["gpslost"] = gui_conf->FetchOpt("sound_gpslost"); -- if (gui_conf->FetchOpt("sound_alert") != "") -- wav_map["alert"] = gui_conf->FetchOpt("sound_alert"); -- -- } else { -- fprintf(stderr, "ERROR: Sound alerts enabled but no sound playing binary specified.\n"); -- sound = 0; -- } -- } else if (sound == -1) -- sound = 0; -- -- /* Added by Shaw Innes 17/2/02 */ -- if (gui_conf->FetchOpt("speech") == "true" && speech == -1) { -- if (gui_conf->FetchOpt("festival") != "") { -- festival = strdup(gui_conf->FetchOpt("festival").c_str()); -- speech = 1; -- -- if (gui_conf->FetchOpt("flite") == "true") -- flite = 1; -- -- string speechtype = gui_conf->FetchOpt("speech_type"); -- -- if (!strcasecmp(speechtype.c_str(), "nato")) -- speech_encoding = SPEECH_ENCODING_NATO; -- else if (!strcasecmp(speechtype.c_str(), "spell")) -- speech_encoding = SPEECH_ENCODING_SPELL; -- else -- speech_encoding = SPEECH_ENCODING_NORMAL; -- -- // Make sure we have encrypted text lines -- if (gui_conf->FetchOpt("speech_encrypted") == "" || gui_conf->FetchOpt("speech_unencrypted") == "") { -- fprintf(stderr, "ERROR: Speech request but speech_encrypted or speech_unencrypted line missing.\n"); -- speech = 0; -- } -- -- speech_sentence_encrypted = gui_conf->FetchOpt("speech_encrypted"); -- speech_sentence_unencrypted = gui_conf->FetchOpt("speech_unencrypted"); -- -- } else { -- fprintf(stderr, "ERROR: Speech alerts enabled but no path to festival has been specified.\n"); -- speech = 0; -- } -- } else if (speech == -1) -- speech = 0; -- - if (gui_conf->FetchOpt("decay") != "") { - if (sscanf(gui_conf->FetchOpt("decay").c_str(), "%d", &decay) != 1) { - fprintf(stderr, "FATAL: Illegal config file value for decay.\n"); -@@ -636,45 +344,6 @@ - } - } - -- // Fork and find the sound options -- if (sound) { -- if (pipe(soundpair) == -1) { -- fprintf(stderr, "WARNING: Unable to create pipe for audio. Disabling sound.\n"); -- sound = 0; -- } else { -- soundpid = fork(); -- -- if (soundpid < 0) { -- fprintf(stderr, "WARNING: Unable to fork for audio. Disabling sound.\n"); -- sound = 0; -- } else if (soundpid == 0) { -- SoundHandler(soundpair, sndplay.c_str(), wav_map); -- exit(0); -- } -- -- close(soundpair[0]); -- } -- } -- -- if (speech) { -- if (pipe(speechpair) == -1) { -- fprintf(stderr, "WARNING: Unable to create pipe for speech. Disabling speech.\n"); -- speech = 0; -- } else { -- speechpid = fork(); -- -- if (speechpid < 0) { -- fprintf(stderr, "WARNING: Unable to fork for speech. Disabling speech.\n"); -- speech = 0; -- } else if (speechpid == 0) { -- SpeechHandler(speechpair, festival); -- exit(0); -- } -- -- close(speechpair[0]); -- } -- } -- - if (kismet_serv.Connect(guiport, guihost) < 0) { - fprintf(stderr, "FATAL: Could not connect to %s:%d.\n", guihost, guiport); - CatchShutdown(-1); -@@ -884,53 +553,13 @@ - } - - if (pollret != 0) { -- if (pollret == CLIENT_ALERT) -- if (sound == 1) -- sound = PlaySound("alert"); -- - if (strlen(tcpcli->FetchStatus()) != 0) { - gui->WriteStatus(tcpcli->FetchStatus()); - // gui->DrawDisplay(); - } - -- // The GPS only gets updated for the primary client -- if (tcpcli == primary_client) { -- if (tcpcli->FetchMode() == 0 && gpsmode != 0) { -- if (sound == 1 && gpsmode != -1) -- sound = PlaySound("gpslost"); -- gpsmode = 0; -- } else if (tcpcli->FetchMode() != 0 && gpsmode == 0) { -- if (sound == 1 && gpsmode != -1) -- sound = PlaySound("gpslock"); -- gpsmode = 1; -- } -- } -- - if (tcpcli->FetchDeltaNumNetworks() > 0) { - wireless_network *newnet = tcpcli->FetchLastNewNetwork(); -- -- if (sound == 1 && newnet != lastspoken) { -- if (newnet->crypt_set && -- wav_map.find("new_wep") != wav_map.end()) -- sound = PlaySound("new_wep"); -- else -- sound = PlaySound("new"); -- } -- -- if (speech == 1 && newnet != lastspoken) { -- string text; -- -- if (newnet != NULL) { -- if (newnet->crypt_set) -- text = ExpandSpeechString(speech_sentence_encrypted, newnet, speech_encoding); -- else -- text = ExpandSpeechString(speech_sentence_unencrypted, newnet, speech_encoding); -- -- speech = SayText(text.c_str()); -- } -- } -- -- lastspoken = newnet; - } - - num_networks += tcpcli->FetchNumNetworks(); -@@ -938,17 +567,7 @@ - num_noise += tcpcli->FetchNumNoise(); - num_dropped += tcpcli->FetchNumDropped(); - -- if (tcpcli->FetchDeltaNumPackets() != 0) { -- if (time(0) - last_click >= decay && sound == 1) { -- if (tcpcli->FetchDeltaNumPackets() > tcpcli->FetchDeltaNumDropped()) { -- sound = PlaySound("traffic"); -- } else { -- sound = PlaySound("junktraffic"); -- } -- -- last_click = time(0); -- } -- } -+ tcpcli->FetchDeltaNumPackets(); - } - } - } else { -diff -urN kismet.dev/kismet_drone.cc kismet.dev2/kismet_drone.cc ---- kismet.dev/kismet_drone.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/kismet_drone.cc 2005-08-23 01:59:25.649219336 +0200 -@@ -32,16 +32,11 @@ - #include "packet.h" - - #include "packetsource.h" --#include "prism2source.h" - #include "pcapsource.h" --#include "wtapfilesource.h" --#include "wsp100source.h" --#include "vihasource.h" - #include "dronesource.h" - #include "packetsourcetracker.h" - #include "kis_packsources.h" - --#include "gpsd.h" - #include "tcpstreamer.h" - #include "configfile.h" - -@@ -53,10 +48,6 @@ - - const char *config_base = "kismet_drone.conf"; - --GPSD *gps = NULL; --int gpsmode = 0; --int gps_enable = 0; -- - // Timetracker - Timetracker timetracker; - -@@ -81,26 +72,6 @@ - exit(0); - } - --int GpsEvent(Timetracker::timer_event *evt, void *parm) { -- // The GPS only provides us a new update once per second we might -- // as well only update it here once a second -- if (gps_enable) { -- int gpsret; -- gpsret = gps->Scan(); -- if (gpsret < 0) { -- if (!silent) -- fprintf(stderr, "GPS error fetching data: %s\n", -- gps->FetchError()); -- -- gps_enable = 0; -- } -- -- } -- -- // We want to be rescheduled -- return 1; --} -- - // Handle channel hopping... this is actually really simple. - int ChannelHopEvent(Timetracker::timer_event *evt, void *parm) { - sourcetracker.AdvanceChannel(); -@@ -148,9 +119,6 @@ - - TcpStreamer streamer; - -- char gpshost[1024]; -- int gpsport = -1; -- - int channel_hop = -1; - int channel_velocity = 1; - int channel_dwell = 0; -@@ -351,46 +319,6 @@ - exit(1); - } - -- if (conf->FetchOpt("gps") == "true") { -- if (sscanf(conf->FetchOpt("gpshost").c_str(), "%1023[^:]:%d", gpshost, &gpsport) != 2) { -- fprintf(stderr, "Invalid GPS host in config (host:port required)\n"); -- exit(1); -- } -- -- gps_enable = 1; -- } else { -- gps_enable = 0; -- } -- -- if (gps_enable == 1) { -- // Open the GPS -- gps = new GPSD(gpshost, gpsport); -- -- // Lock GPS position -- if (conf->FetchOpt("gpsmodelock") == "true") { -- fprintf(stderr, "Enabling GPS position lock override (broken GPS unit reports 0 always)\n"); -- gps->SetOptions(GPSD_OPT_FORCEMODE); -- } -- -- if (gps->OpenGPSD() < 0) { -- fprintf(stderr, "%s\n", gps->FetchError()); -- -- gps_enable = 0; -- } else { -- fprintf(stderr, "Opened GPS connection to %s port %d\n", -- gpshost, gpsport); -- -- } -- } -- -- // Update GPS coordinates and handle signal loss if defined -- timetracker.RegisterTimer(SERVER_TIMESLICES_SEC, NULL, 1, &GpsEvent, NULL); -- -- // Add the GPS to the tcpstreamer -- streamer.AddGpstracker(gps); -- -- // Register the gps and timetracker with the sourcetracker -- sourcetracker.AddGpstracker(gps); - sourcetracker.AddTimetracker(&timetracker); - - // Register the sources -diff -urN kismet.dev/kismet_server.cc kismet.dev2/kismet_server.cc ---- kismet.dev/kismet_server.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/kismet_server.cc 2005-08-23 01:59:25.653218728 +0200 -@@ -37,11 +37,7 @@ - #include "packet.h" - - #include "packetsource.h" --#include "prism2source.h" - #include "pcapsource.h" --#include "wtapfilesource.h" --#include "wsp100source.h" --#include "vihasource.h" - #include "dronesource.h" - #include "packetsourcetracker.h" - #include "kis_packsources.h" -@@ -51,15 +47,11 @@ - #include "wtaplocaldump.h" - #include "airsnortdump.h" - #include "fifodump.h" --#include "gpsdump.h" -- --#include "gpsd.h" - - #include "packetracker.h" - #include "timetracker.h" - #include "alertracker.h" - --#include "speech.h" - #include "tcpserver.h" - #include "server_globals.h" - #include "kismet_server.h" -@@ -89,17 +81,8 @@ - Alertracker alertracker; - Timetracker timetracker; - --GPSD *gps = NULL; --int gpsmode = 0; --GPSDump gpsdump; -- --// Last time we tried to reconnect to the gps --time_t last_gpsd_reconnect = 0; --int gpsd_reconnect_attempt = 0; -- - FifoDumpFile fifodump; - TcpServer ui_server; --int sound = -1; - packet_info last_info; - int decay; - channel_power channel_graph[CHANNEL_MAX]; -@@ -112,11 +95,8 @@ - // Wep keys - macmap bssid_wep_map; - --// Pipe file descriptor pairs and fd's --int soundpair[2]; --int speechpair[2]; - int chanpair[2]; --pid_t soundpid = -1, speechpid = -1, chanpid = -1; -+pid_t chanpid = -1; - - // Past alerts - unsigned int max_alerts = 50; -@@ -177,17 +157,6 @@ - int tcpport = -1; - int tcpmax; - --//const char *sndplay = NULL; --string sndplay; -- --const char *festival = NULL; --int speech = -1; --int flite = 0; --int speech_encoding = 0; --string speech_sentence_encrypted, speech_sentence_unencrypted; -- --map wav_map; -- - int beacon_log = 1; - int phy_log = 1; - int mangle_log = 0; -@@ -347,17 +316,6 @@ - // delete cryptfile; - } - -- if (gps_log == 1) { -- if (gpsdump.CloseDump(1) < 0) -- fprintf(stderr, "Didn't log any GPS coordinates, unlinking gps file\n"); -- } -- -- // Kill our sound players -- if (soundpid > 0) -- kill(soundpid, 9); -- if (speechpid > 0) -- kill(speechpid, 9); -- - // Shut down the packet sources - sourcetracker.CloseSources(); - -@@ -368,228 +326,10 @@ - exit(0); - } - --// Subprocess sound handler --void SoundHandler(int *fds, const char *player, map soundmap) { -- int read_sock = fds[0]; -- close(fds[1]); -- -- fd_set rset; -- -- char data[1024]; -- -- pid_t sndpid = -1; -- int harvested = 1; -- -- while (1) { -- FD_ZERO(&rset); -- FD_SET(read_sock, &rset); -- char *end; -- -- memset(data, 0, 1024); -- -- struct timeval tm; -- tm.tv_sec = 1; -- tm.tv_usec = 0; -- -- if (select(read_sock + 1, &rset, NULL, NULL, &tm) < 0) { -- if (errno != EINTR) { -- exit(1); -- } -- } -- -- if (harvested == 0) { -- // We consider a wait error to be a sign that the child pid died -- // so we flag it as harvested and keep on going -- pid_t harvestpid = waitpid(sndpid, NULL, WNOHANG); -- if (harvestpid == -1 || harvestpid == sndpid) -- harvested = 1; -- } -- -- if (FD_ISSET(read_sock, &rset)) { -- int ret; -- ret = read(read_sock, data, 1024); -- -- // We'll die off if we get a read error, and we'll let kismet on the -- // other side detact that it died -- if (ret <= 0 && (errno != EAGAIN && errno != EPIPE)) -- exit(1); -- -- if ((end = strstr(data, "\n")) == NULL) -- continue; -- -- end[0] = '\0'; -- } -- -- if (data[0] == '\0') -- continue; -- -- -- // If we've harvested the process, spawn a new one and watch it -- // instead. Otherwise, we just let go of the data we read -- if (harvested == 1) { -- // Only take the first line -- char *nl; -- if ((nl = strchr(data, '\n')) != NULL) -- *nl = '\0'; -- -- // Make sure it's shell-clean -- -- char snd[1024]; -- -- if (soundmap.size() == 0) -- snprintf(snd, 1024, "%s", data); -- if (soundmap.find(data) != soundmap.end()) -- snprintf(snd, 1024, "%s", soundmap[data].c_str()); -- else -- continue; -- -- char plr[1024]; -- snprintf(plr, 1024, "%s", player); -- -- harvested = 0; -- if ((sndpid = fork()) == 0) { -- // Suppress errors -- if (silent) { -- int nulfd = open("/dev/null", O_RDWR); -- dup2(nulfd, 1); -- dup2(nulfd, 2); -- } -- -- char * const echoarg[] = { plr, snd, NULL }; -- execve(echoarg[0], echoarg, NULL); -- } -- } -- data[0] = '\0'; -- } --} -- --// Subprocess speech handler --void SpeechHandler(int *fds, const char *player) { -- int read_sock = fds[0]; -- close(fds[1]); -- -- fd_set rset; -- -- char data[1024]; -- -- pid_t sndpid = -1; -- int harvested = 1; -- -- while (1) { -- FD_ZERO(&rset); -- FD_SET(read_sock, &rset); -- //char *end; -- -- memset(data, 0, 1024); -- -- if (harvested == 0) { -- // We consider a wait error to be a sign that the child pid died -- // so we flag it as harvested and keep on going -- pid_t harvestpid = waitpid(sndpid, NULL, WNOHANG); -- if (harvestpid == -1 || harvestpid == sndpid) -- harvested = 1; -- } -- -- struct timeval tm; -- tm.tv_sec = 1; -- tm.tv_usec = 0; -- -- if (select(read_sock + 1, &rset, NULL, NULL, &tm) < 0) { -- if (errno != EINTR) { -- exit(1); -- } -- } -- -- if (FD_ISSET(read_sock, &rset)) { -- int ret; -- ret = read(read_sock, data, 1024); -- -- // We'll die off if we get a read error, and we'll let kismet on the -- // other side detact that it died -- if (ret <= 0 && (errno != EAGAIN && errno != EPIPE)) -- exit(1); -- -- data[ret] = '\0'; -- } -- -- if (data[0] == '\0') -- continue; -- -- // If we've harvested the process, spawn a new one and watch it -- // instead. Otherwise, we just let go of the data we read -- if (harvested == 1) { -- harvested = 0; -- if ((sndpid = fork()) == 0) { -- // Only take the first line -- char *nl; -- if ((nl = strchr(data, '\n')) != NULL) -- *nl = '\0'; -- -- // Make sure it's shell-clean -- MungeToShell(data, strlen(data)); -- char spk_call[1024]; -- snprintf(spk_call, 1024, "echo \"(%s\\\"%s\\\")\" | %s " -- ">/dev/null 2>/dev/null", -- flite ? "" : "SayText ", data, player); -- system(spk_call); -- -- exit(0); -- } -- } -- -- data[0] = '\0'; -- } --} -- -- --// Fork and run a system call to play a sound --int PlaySound(string in_sound) { -- -- char snd[1024]; -- -- snprintf(snd, 1024, "%s\n", in_sound.c_str()); -- -- if (write(soundpair[1], snd, strlen(snd)) < 0) { -- char status[STATUS_MAX]; -- if (!silent) -- fprintf(stderr, "ERROR: Write error, closing sound pipe.\n"); -- snprintf(status, STATUS_MAX, "ERROR: Write error on sound pipe, closing sound connection"); -- NetWriteStatus(status); -- -- return 0; -- } -- -- return 1; --} -- --int SayText(string in_text) { -- -- char snd[1024]; -- -- snprintf(snd, 1024, "%s\n", in_text.c_str()); -- MungeToShell(snd, 1024); -- -- if (write(speechpair[1], snd, strlen(snd)) < 0) { -- char status[STATUS_MAX]; -- if (!silent) -- fprintf(stderr, "ERROR: Write error, closing speech pipe.\n"); -- snprintf(status, STATUS_MAX, "ERROR: Write error on speech pipe, closing speech connection"); -- NetWriteStatus(status); -- -- return 0; -- } -- -- return 1; --} -- - void KisLocalAlert(const char *in_text) { - time_t now = time(0); - if (!silent) - fprintf(stderr, "ALERT %.24s %s\n", ctime(&now), in_text); -- -- if (sound == 1) -- sound = PlaySound("alert"); -- - } - - void KisLocalStatus(const char *in_status) { -@@ -638,37 +378,6 @@ - - char tmpstr[32]; - -- GPS_data gdata; -- -- if (gps_enable) { -- float lat, lon, alt, spd, hed; -- int mode; -- -- gps->FetchLoc(&lat, &lon, &alt, &spd, &hed, &mode); -- -- snprintf(tmpstr, 32, "%f", lat); -- gdata.lat = tmpstr; -- snprintf(tmpstr, 32, "%f", lon); -- gdata.lon = tmpstr; -- snprintf(tmpstr, 32, "%f", alt); -- gdata.alt = tmpstr; -- snprintf(tmpstr, 32, "%f", spd); -- gdata.spd = tmpstr; -- snprintf(tmpstr, 32, "%f", hed); -- gdata.heading = tmpstr; -- snprintf(tmpstr, 32, "%d", mode); -- gdata.mode = tmpstr; -- } else { -- gdata.lat = "0.0"; -- gdata.lon = "0.0"; -- gdata.alt = "0.0"; -- gdata.spd = "0.0"; -- gdata.heading = "0.0"; -- gdata.mode = "0"; -- } -- -- ui_server.SendToAll(gps_ref, (void *) &gdata); -- - INFO_data idata; - snprintf(tmpstr, 32, "%d", tracker.FetchNumNetworks()); - idata.networks = tmpstr; -@@ -789,81 +498,6 @@ - } - } - --int GpsEvent(Timetracker::timer_event *evt, void *parm) { -- char status[STATUS_MAX]; -- -- // The GPS only provides us a new update once per second we might -- // as well only update it here once a second -- -- // If we're disconnected, try to reconnect. -- if (gpsd_reconnect_attempt > 0) { -- // Increment the time between connection attempts -- if (last_gpsd_reconnect + ((gpsd_reconnect_attempt - 1) * 2) < time(0)) { -- if (gps->OpenGPSD() < 0) { -- last_gpsd_reconnect = time(0); -- -- if (gpsd_reconnect_attempt < 20) -- gpsd_reconnect_attempt++; -- -- snprintf(status, STATUS_MAX, "Unable to reconnect to GPSD, trying " -- "again in %d seconds.", ((gpsd_reconnect_attempt - 1) * 2)); -- -- if (!silent || NetWriteStatus(status) == 0) -- fprintf(stderr, "WARNING: %s\n", status); -- -- return 1; -- } else { -- gpsd_reconnect_attempt = 0; -- -- snprintf(status, STATUS_MAX, "Reopened connection to GPSD"); -- if (!silent || NetWriteStatus(status) == 0) -- fprintf(stderr, "NOTICE: %s\n", status); -- } -- } else { -- // Don't process more if we haven't woken up yet -- return 1; -- } -- -- } -- -- if (gps_enable) { -- int gpsret; -- gpsret = gps->Scan(); -- -- if (gpsret < 0) { -- snprintf(status, STATUS_MAX, "GPS error requesting data: %s", -- gps->FetchError()); -- -- if (!silent || NetWriteStatus(status) == 0) -- fprintf(stderr, "WARNING: %s\n", status); -- -- gpsd_reconnect_attempt = 1; -- } -- -- if (gpsret == 0 && gpsmode != 0) { -- if (!silent || NetWriteStatus("Lost GPS signal.") == 0) -- fprintf(stderr, "Lost GPS signal.\n"); -- if (sound == 1) -- sound = PlaySound("gpslost"); -- -- gpsmode = 0; -- } else if (gpsret != 0 && gpsmode == 0) { -- if (!silent || NetWriteStatus("Acquired GPS signal.") == 0) -- fprintf(stderr, "Acquired GPS signal.\n"); -- if (sound == 1) -- sound = PlaySound("gpslock"); -- -- gpsmode = 1; -- } -- } -- -- if (gps_log == 1 && gpsmode != 0 && gps != NULL) { -- gpsdump.DumpTrack(gps); -- } -- -- // We want to be rescheduled -- return 1; --} - - // Simple redirect to the network info drawer. We don't want to change netwriteinfo to a - // timer event since we call it un-timed too -@@ -884,13 +518,6 @@ - return 1; - } - --// Write the waypoints for gpsdrive --int WaypointSyncEvent(Timetracker::timer_event *evt, void *parm) { -- tracker.WriteGpsdriveWaypt(waypoint_file); -- -- return 1; --} -- - // Handle tracker maintenance - int TrackerTickEvent(Timetracker::timer_event *evt, void *parm) { - tracker.Tick(); -@@ -1159,11 +786,9 @@ - " -c, --capture-source Packet capture source line (type,interface,name)\n" - " -C, --enable-capture-sources Comma separated list of named packet sources to use.\n" - " -l, --log-types Comma separated list of types to log,\n" -- " (ie, dump,cisco,weak,network,gps)\n" -+ " (ie, dump,cisco,weak,network)\n" - " -d, --dump-type Dumpfile type (wiretap)\n" - " -m, --max-packets Maximum number of packets before starting new dump\n" -- " -q, --quiet Don't play sounds\n" -- " -g, --gps GPS server (host:port or off)\n" - " -p, --port TCPIP server port for GUI connections\n" - " -a, --allowed-hosts Comma separated list of hosts allowed to connect\n" - " -b, --bind-address
Bind to this address. Default INADDR_ANY\n." -@@ -1287,23 +912,6 @@ - ip_track = 1; - } - -- -- if (conf->FetchOpt("waypoints") == "true") { -- if(conf->FetchOpt("waypointdata") == "") { -- fprintf(stderr, "WARNING: Waypoint logging requested but no waypoint data file given.\n" -- "Waypoint logging will be disabled.\n"); -- waypoint = 0; -- } else { -- waypointfile = conf->ExpandLogPath(conf->FetchOpt("waypointdata"), "", "", 0, 1); -- waypoint = 1; -- } -- if(conf->FetchOpt("waypoint_essid") == "true") { -- waypointformat = 1; -- } else { -- waypointformat = 0; -- } -- } -- - if (conf->FetchOpt("metric") == "true") { - fprintf(stderr, "Using metric measurements.\n"); - metric = 1; -@@ -1421,26 +1029,6 @@ - } - - } -- -- if (strstr(logtypes, "gps")) { -- if (gps_log == 0) { -- fprintf(stderr, "WARNING: Disabling GPS logging.\n"); -- } else { -- gps_log = 1; -- -- if (conf->FetchOpt("logtemplate") == "") { -- fprintf(stderr, "FATAL: Logging (gps coordinates) enabled but no logtemplate given in config.\n"); -- ErrorShutdown(); -- } -- } -- -- } -- -- if (gps_log == 1 && !net_log) { -- fprintf(stderr, "WARNING: Logging (gps coordinates) enabled but XML logging (networks) was not.\n" -- "It will be enabled now.\n"); -- xml_log = 1; -- } - } - - if (conf->FetchOpt("decay") != "") { -@@ -1561,72 +1149,6 @@ - legal_ipblock_vec.push_back(ipb); - } - -- // Process sound stuff -- if (conf->FetchOpt("sound") == "true" && sound == -1) { -- if (conf->FetchOpt("soundplay") != "") { -- sndplay = conf->FetchOpt("soundplay"); -- -- if (conf->FetchOpt("soundopts") != "") -- sndplay += " " + conf->FetchOpt("soundopts"); -- -- sound = 1; -- -- if (conf->FetchOpt("sound_new") != "") -- wav_map["new"] = conf->FetchOpt("sound_new"); -- if (conf->FetchOpt("sound_new_wep") != "") -- wav_map["new_wep"] = conf->FetchOpt("sound_new_wep"); -- if (conf->FetchOpt("sound_traffic") != "") -- wav_map["traffic"] = conf->FetchOpt("sound_traffic"); -- if (conf->FetchOpt("sound_junktraffic") != "") -- wav_map["junktraffic"] = conf->FetchOpt("sound_traffic"); -- if (conf->FetchOpt("sound_gpslock") != "") -- wav_map["gpslock"] = conf->FetchOpt("sound_gpslock"); -- if (conf->FetchOpt("sound_gpslost") != "") -- wav_map["gpslost"] = conf->FetchOpt("sound_gpslost"); -- if (conf->FetchOpt("sound_alert") != "") -- wav_map["alert"] = conf->FetchOpt("sound_alert"); -- -- } else { -- fprintf(stderr, "ERROR: Sound alerts enabled but no sound playing binary specified.\n"); -- sound = 0; -- } -- } else if (sound == -1) -- sound = 0; -- -- /* Added by Shaw Innes 17/2/02 */ -- /* Modified by Andrew Etter 15/9/02 */ -- if (conf->FetchOpt("speech") == "true" && speech == -1) { -- if (conf->FetchOpt("festival") != "") { -- festival = strdup(conf->FetchOpt("festival").c_str()); -- speech = 1; -- -- if (conf->FetchOpt("flite") == "true") -- flite = 1; -- -- string speechtype = conf->FetchOpt("speech_type"); -- -- if (!strcasecmp(speechtype.c_str(), "nato")) -- speech_encoding = SPEECH_ENCODING_NATO; -- else if (!strcasecmp(speechtype.c_str(), "spell")) -- speech_encoding = SPEECH_ENCODING_SPELL; -- else -- speech_encoding = SPEECH_ENCODING_NORMAL; -- -- // Make sure we have encrypted text lines -- if (conf->FetchOpt("speech_encrypted") == "" || conf->FetchOpt("speech_unencrypted") == "") { -- fprintf(stderr, "ERROR: Speech request but speech_encrypted or speech_unencrypted line missing.\n"); -- speech = 0; -- } -- -- speech_sentence_encrypted = conf->FetchOpt("speech_encrypted"); -- speech_sentence_unencrypted = conf->FetchOpt("speech_unencrypted"); -- } else { -- fprintf(stderr, "ERROR: Speech alerts enabled but no path to festival has been specified.\n"); -- speech = 0; -- } -- } else if (speech == -1) -- speech = 0; -- - if (conf->FetchOpt("writeinterval") != "") { - if (sscanf(conf->FetchOpt("writeinterval").c_str(), "%d", &datainterval) != 1) { - fprintf(stderr, "FATAL: Illegal config file value for data interval.\n"); -@@ -1646,45 +1168,6 @@ - fprintf(stderr, "WARNING: No client_manuf file specified. Client manufacturers will not be detected.\n"); - } - -- // Fork and find the sound options -- if (sound) { -- if (pipe(soundpair) == -1) { -- fprintf(stderr, "WARNING: Unable to create pipe for audio. Disabling sound.\n"); -- sound = 0; -- } else { -- soundpid = fork(); -- -- if (soundpid < 0) { -- fprintf(stderr, "WARNING: Unable to fork for audio. Disabling sound.\n"); -- sound = 0; -- } else if (soundpid == 0) { -- SoundHandler(soundpair, sndplay.c_str(), wav_map); -- exit(0); -- } -- -- close(soundpair[0]); -- } -- } -- -- if (speech) { -- if (pipe(speechpair) == -1) { -- fprintf(stderr, "WARNING: Unable to create pipe for speech. Disabling speech.\n"); -- speech = 0; -- } else { -- speechpid = fork(); -- -- if (speechpid < 0) { -- fprintf(stderr, "WARNING: Unable to fork for speech. Disabling speech.\n"); -- speech = 0; -- } else if (speechpid == 0) { -- SpeechHandler(speechpair, festival); -- exit(0); -- } -- -- close(speechpair[0]); -- } -- } -- - // Grab the filtering - string filter_bit; - -@@ -1710,7 +1193,7 @@ - } - - if ((filter_bit = conf->FetchOpt("filter_export")) != "") { -- fprintf(stderr, "Enabling filtering on exported (csv, xml, network, gps) files.\n"); -+ fprintf(stderr, "Enabling filtering on exported (csv, xml, network) files.\n"); - filter_export = 1; - if (ConfigFile::ParseFilterLine(filter_bit, &filter_export_bssid, &filter_export_source, - &filter_export_dest, &filter_export_bssid_invert, -@@ -1816,14 +1299,6 @@ - - } - -- if (waypoint) { -- if ((waypoint_file = fopen(waypointfile.c_str(), "a")) == NULL) { -- fprintf(stderr, "WARNING: Could not open waypoint file '%s' for writing: %s\n", -- waypointfile.c_str(), strerror(errno)); -- waypoint = 0; -- } -- } -- - // Create all the logs and title/number them appropriately - // We need to save this for after we toast the conf record - int logfile_matched = 0; -@@ -1871,13 +1346,6 @@ - continue; - } - -- if (gps_log == 1) { -- gpslogfile = conf->ExpandLogPath(conf->FetchOpt("logtemplate"), logname, "gps", run_num); -- -- if (gpslogfile == "") -- continue; -- } -- - // if we made it this far we're cool -- all the logfiles we're writing to matched - // this number - logfile_matched = 1; -@@ -1906,9 +1374,6 @@ - if (cisco_log) - fprintf(stderr, "Logging cisco product information to %s\n", ciscologfile.c_str()); - -- if (gps_log == 1) -- fprintf(stderr, "Logging gps coordinates to %s\n", gpslogfile.c_str()); -- - if (data_log) - fprintf(stderr, "Logging data to %s\n", dumplogfile.c_str()); - -@@ -2055,7 +1520,6 @@ - { "dump-type", required_argument, 0, 'd' }, - { "max-packets", required_argument, 0, 'm' }, - { "quiet", no_argument, 0, 'q' }, -- { "gps", required_argument, 0, 'g' }, - { "port", required_argument, 0, 'p' }, - { "allowed-hosts", required_argument, 0, 'a' }, - { "bind-address", required_argument, 0, 'b'}, -@@ -2136,18 +1600,6 @@ - Usage(argv[0]); - } - break; -- case 'g': -- // GPS -- if (strcmp(optarg, "off") == 0) { -- gps_enable = 0; -- } -- else if (sscanf(optarg, "%1023[^:]:%d", gpshost, &gpsport) < 2) { -- fprintf(stderr, "Invalid GPS host '%s' (host:port or off required)\n", -- optarg); -- gps_enable = 1; -- Usage(argv[0]); -- } -- break; - case 'p': - // Port - if (sscanf(optarg, "%d", &tcpport) != 1) { -@@ -2169,7 +1621,6 @@ - break; - case 'q': - // Quiet -- sound = 0; - break; - case 'v': - // version -@@ -2323,39 +1774,6 @@ - // And we're done - fclose(pid_file); - -- -- // Set up the GPS object to give to the children -- if (gpsport == -1 && gps_enable) { -- if (conf->FetchOpt("gps") == "true") { -- if (sscanf(conf->FetchOpt("gpshost").c_str(), "%1023[^:]:%d", gpshost, -- &gpsport) != 2) { -- fprintf(stderr, "Invalid GPS host in config (host:port required)\n"); -- exit(1); -- } -- -- gps_enable = 1; -- } else { -- gps_enable = 0; -- gps_log = 0; -- } -- } -- -- if (gps_enable == 1) { -- gps = new GPSD(gpshost, gpsport); -- -- // Lock GPS position -- if (conf->FetchOpt("gpsmodelock") == "true") { -- fprintf(stderr, "Enabling GPS position lock override (broken GPS unit " -- "reports 0 always)\n"); -- gps->SetOptions(GPSD_OPT_FORCEMODE); -- } -- -- } else { -- gps_log = 0; -- } -- -- // Register the gps and timetracker with the sourcetracker -- sourcetracker.AddGpstracker(gps); - sourcetracker.AddTimetracker(&timetracker); - - // Handle errors here maybe in the future -@@ -2522,13 +1940,6 @@ - fprintf(stderr, "Dump file format: %s\n", dumpfile->FetchType()); - } - -- if (gps_enable && gps_log == 1) { -- if (gpsdump.OpenDump(gpslogfile.c_str(), xmllogfile.c_str()) < 0) { -- fprintf(stderr, "FATAL: GPS dump error: %s\n", gpsdump.FetchError()); -- ErrorShutdown(); -- } -- } -- - // Open our files first to make sure we can, we'll unlink the empties later. - FILE *testfile = NULL; - if (net_log) { -@@ -2600,14 +2011,13 @@ - */ - - if (data_log || net_log || crypt_log) { -- snprintf(status, STATUS_MAX, "Logging%s%s%s%s%s%s%s", -+ snprintf(status, STATUS_MAX, "Logging%s%s%s%s%s%s", - data_log ? " data" : "" , - net_log ? " networks" : "" , - csv_log ? " CSV" : "" , - xml_log ? " XML" : "" , - crypt_log ? " weak" : "", -- cisco_log ? " cisco" : "", -- gps_log == 1 ? " gps" : ""); -+ cisco_log ? " cisco" : ""); - fprintf(stderr, "%s\n", status); - } else if (no_log) { - snprintf(status, STATUS_MAX, "Not logging any data."); -@@ -2625,23 +2035,6 @@ - } - } - -- if (gps_enable) { -- // Open the GPS -- if (gps->OpenGPSD() < 0) { -- fprintf(stderr, "%s\n", gps->FetchError()); -- -- gps_enable = 0; -- gps_log = 0; -- } else { -- fprintf(stderr, "Opened GPS connection to %s port %d\n", -- gpshost, gpsport); -- -- gpsmode = gps->FetchMode(); -- -- last_gpsd_reconnect = time(0); -- } -- } -- - fprintf(stderr, "Listening on port %d.\n", tcpport); - for (unsigned int ipvi = 0; ipvi < legal_ipblock_vec.size(); ipvi++) { - char *netaddr = strdup(inet_ntoa(legal_ipblock_vec[ipvi]->network)); -@@ -2682,8 +2075,6 @@ - &Protocol_NETWORK, &ProtocolNetworkEnable); - client_ref = ui_server.RegisterProtocol("CLIENT", 0, CLIENT_fields_text, - &Protocol_CLIENT, &ProtocolClientEnable); -- gps_ref = ui_server.RegisterProtocol("GPS", 0, GPS_fields_text, -- &Protocol_GPS, NULL); - info_ref = ui_server.RegisterProtocol("INFO", 0, INFO_fields_text, - &Protocol_INFO, NULL); - remove_ref = ui_server.RegisterProtocol("REMOVE", 0, REMOVE_fields_text, -@@ -2738,14 +2129,9 @@ - // Write network info and tick the tracker once per second - timetracker.RegisterTimer(SERVER_TIMESLICES_SEC, NULL, 1, &NetWriteEvent, NULL); - timetracker.RegisterTimer(SERVER_TIMESLICES_SEC, NULL, 1, &TrackerTickEvent, NULL); -- // Update GPS coordinates and handle signal loss if defined -- timetracker.RegisterTimer(SERVER_TIMESLICES_SEC, NULL, 1, &GpsEvent, NULL); - // Sync the data files if requested - if (datainterval > 0 && no_log == 0) - timetracker.RegisterTimer(datainterval * SERVER_TIMESLICES_SEC, NULL, 1, &ExportSyncEvent, NULL); -- // Write waypoints if requested -- if (waypoint) -- timetracker.RegisterTimer(decay * SERVER_TIMESLICES_SEC, NULL, 1, &WaypointSyncEvent, NULL); - // Channel hop if requested - if (channel_hop) { - if (channel_dwell) -@@ -2769,7 +2155,6 @@ - snprintf(status, 1024, "%s", TIMESTAMP); - kdata.timestamp = status; - -- time_t last_click = 0; - int num_networks = 0, num_packets = 0, num_noise = 0, num_dropped = 0; - - -@@ -2918,54 +2303,13 @@ - - } - -- if (gps_log == 1 && info.type != packet_noise && -- info.type != packet_unknown && info.type != packet_phy && -- info.corrupt == 0) { -- if (gpsdump.DumpPacket(&info) < 0) { -- snprintf(status, STATUS_MAX, "%s", gpsdump.FetchError()); -- if (!silent || NetWriteStatus(status) == 0) -- fprintf(stderr, "%s\n", status); -- } -- } -- - // tracker.ProcessPacket(info); - tracker.ProcessPacket(&packet, &info, &bssid_wep_map, - wep_identity); - -- if (tracker.FetchNumNetworks() > num_networks) { -- if (sound == 1) -- if (info.crypt_set && -- wav_map.find("new_wep") != wav_map.end()) -- sound = PlaySound("new_wep"); -- else -- sound = PlaySound("new"); -- if (speech == 1) { -- string text; -- -- if (info.crypt_set) -- text = ExpandSpeechString(speech_sentence_encrypted, &info, -- speech_encoding); -- else -- text = ExpandSpeechString(speech_sentence_unencrypted, -- &info, speech_encoding); -- -- speech = SayText(MungeToShell(text).c_str()); -- } -- } - num_networks = tracker.FetchNumNetworks(); - - if (tracker.FetchNumPackets() != num_packets) { -- if (cur_time - last_click >= decay && sound == 1) { -- if (tracker.FetchNumPackets() - num_packets > -- tracker.FetchNumDropped() + localdropnum - num_dropped) { -- sound = PlaySound("traffic"); -- } else { -- sound = PlaySound("junktraffic"); -- } -- -- last_click = cur_time; -- } -- - num_packets = tracker.FetchNumPackets(); - num_noise = tracker.FetchNumNoise(); - num_dropped = tracker.FetchNumDropped() + localdropnum; -diff -urN kismet.dev/kismet_server.h kismet.dev2/kismet_server.h ---- kismet.dev/kismet_server.h 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/kismet_server.h 2005-08-23 01:59:25.653218728 +0200 -@@ -33,10 +33,6 @@ - void handle_command(TcpServer *tcps, client_command *cc); - int NetWriteStatus(const char *in_status); - void NetWriteInfo(); --int SayText(string in_text); --int PlaySound(string in_sound); --void SpeechHandler(int *fds, const char *player); --void SoundHandler(int *fds, const char *player, map soundmap); - void ProtocolAlertEnable(int in_fd); - void ProtocolNetworkEnable(int in_fd); - void ProtocolClientEnable(int in_fd); -diff -urN kismet.dev/packetracker.cc kismet.dev2/packetracker.cc ---- kismet.dev/packetracker.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/packetracker.cc 2005-08-23 01:59:25.656218272 +0200 -@@ -2439,23 +2439,3 @@ - - } - --// Write a gpsdrive compatable waypoint file --int Packetracker::WriteGpsdriveWaypt(FILE *in_file) { -- fseek(in_file, 0L, SEEK_SET); -- ftruncate(fileno(in_file), 0); -- -- // Convert the map to a vector and sort it -- for (map::const_iterator i = bssid_map.begin(); -- i != bssid_map.end(); ++i) { -- wireless_network *net = i->second; -- -- float lat, lon; -- lat = (net->min_lat + net->max_lat) / 2; -- lon = (net->min_lon + net->max_lon) / 2; -- fprintf(in_file, "%s\t%f %f\n", waypointformat == 1 ? net->ssid.c_str() : net->bssid.Mac2String().c_str(), lat, lon); -- } -- -- fflush(in_file); -- -- return 1; --} -diff -urN kismet.dev/packetracker.h kismet.dev2/packetracker.h ---- kismet.dev/packetracker.h 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/packetracker.h 2005-08-23 01:59:25.656218272 +0200 -@@ -30,7 +30,6 @@ - #include - - #include "util.h" --#include "gpsd.h" - #include "packet.h" - #include "tracktypes.h" - #include "manuf.h" -@@ -85,8 +84,6 @@ - int WriteXMLNetworks(string in_fname); - int WriteCisco(string in_fname); - -- int WriteGpsdriveWaypt(FILE *in_file); -- - void WriteSSIDMap(FILE *in_file); - void ReadSSIDMap(FILE *in_file); - -diff -urN kismet.dev/packetsourcetracker.cc kismet.dev2/packetsourcetracker.cc ---- kismet.dev/packetsourcetracker.cc 2005-08-23 00:59:39.969982048 +0200 -+++ kismet.dev2/packetsourcetracker.cc 2005-08-23 01:59:25.657218120 +0200 -@@ -24,7 +24,6 @@ - Packetsourcetracker::Packetsourcetracker() { - next_packsource_id = 0; - next_meta_id = 0; -- gpsd = NULL; - timetracker = NULL; - chanchild_pid = 0; - sockpair[0] = sockpair[1] = 0; -@@ -691,7 +690,6 @@ - - // Register the trackers with it - meta->capsource->AddTimetracker(timetracker); -- meta->capsource->AddGpstracker(gpsd); - - // Open it - fprintf(stderr, "Source %d (%s): Opening %s source interface %s...\n", -diff -urN kismet.dev/packetsourcetracker.h kismet.dev2/packetsourcetracker.h ---- kismet.dev/packetsourcetracker.h 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/packetsourcetracker.h 2005-08-23 01:59:25.658217968 +0200 -@@ -30,7 +30,6 @@ - #include - - #include "timetracker.h" --#include "gpsd.h" - #include "packetsource.h" - - // Sentinel for starting a new packet -@@ -144,9 +143,6 @@ - // Register a timer event handler for us to use - void AddTimetracker(Timetracker *in_tracker) { timetracker = in_tracker; } - -- // Register the GPS server for us to use -- void AddGpstracker(GPSD *in_gpsd) { gpsd = in_gpsd; } -- - // Register a packet prototype source... Card type string, root binding requirement, - // function to generate an instance of the source, and function to change channel - // for this card type. This fills out the prototype. Sources that don't hop -@@ -221,7 +217,6 @@ - uint16_t channel; - } chanchild_changepacket; - -- GPSD *gpsd; - Timetracker *timetracker; - - char errstr[1024]; -diff -urN kismet.dev/panelfront.cc kismet.dev2/panelfront.cc ---- kismet.dev/panelfront.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/panelfront.cc 2005-08-23 01:59:25.659217816 +0200 -@@ -37,7 +37,6 @@ - " Key Action", - " e List Kismet servers", - " z Toggle fullscreen zoom of network view", -- " m Toggle muting of sound and speech", - " t Tag (or untag) selected network", - " g Group tagged networks", - " u Ungroup current group", -@@ -121,7 +120,6 @@ - "Key Action", - " e List Kismet servers", - " z Toggle fullscreen net list", -- " m Toggle muting", - " t Tag (or untag) selected", - " g Group tagged networks", - " u Ungroup current group", -@@ -237,19 +235,6 @@ - }; - - --char *KismetHelpGps[] = { -- "KISMET NETWORK FOLLOW", -- "This panel estimates the center of a network, the current", -- "direction of travel, and the direction of the network center", -- "and distance relative to the current direction of movement.", -- " Key Action", -- " s Follow location of strongest packet", -- " c Follow location of estimated network center", -- " q Close popup", -- NULL --}; -- -- - char *KismetHelpStats[] = { - "KISMET NETWORK STATISTICS", - "This panel displays overall statistics about the wireless", -@@ -678,7 +663,6 @@ - } - - // Enable all the protocols we handle -- in_client->EnableProtocol("GPS"); - in_client->EnableProtocol("INFO"); - in_client->EnableProtocol("REMOVE"); - in_client->EnableProtocol("NETWORK"); -@@ -1282,27 +1266,6 @@ - if (con->client == NULL) - continue; - -- // Update GPS -- float newlat, newlon, newalt, newspd, newheading; -- int newfix; -- con->client->FetchLoc(&newlat, &newlon, &newalt, &newspd, &newheading, &newfix); -- -- if (GPSD::EarthDistance(newlat, newlon, last_lat, last_lon) > 10) { -- con->last_lat = con->lat; -- con->last_lon = con->lon; -- con->last_spd = con->spd; -- con->last_alt = con->alt; -- con->last_fix = con->fix; -- con->last_heading = con->heading; -- } -- -- con->lat = newlat; -- con->lon = newlon; -- con->alt = newalt; -- con->spd = newspd; -- con->heading = newheading; -- con->fix = newfix; -- - // Update quality - con->quality = con->client->FetchQuality(); - con->power = con->client->FetchPower(); -diff -urN kismet.dev/panelfront.h kismet.dev2/panelfront.h ---- kismet.dev/panelfront.h 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/panelfront.h 2005-08-23 01:59:25.660217664 +0200 -@@ -65,7 +65,6 @@ - #define SORT_SIZE 10 - extern char *KismetHelpPower[]; - extern char *KismetHelpRate[]; --extern char *KismetHelpGps[]; - extern char *KismetHelpStats[]; - extern char *KismetHelpDump[]; - extern char *KismetHelpPack[]; -@@ -269,7 +268,6 @@ - int RatePrinter(void *in_window); - int StatsPrinter(void *in_window); - int PackPrinter(void *in_window); -- int GpsPrinter(void *in_window); - int AlertPrinter(void *in_window); - - int MainClientPrinter(void *in_window); -@@ -298,7 +296,6 @@ - int PackInput(void *in_window, int in_chr); - // Help has a generic handler - int TextInput(void *in_window, int in_chr); -- int GpsInput(void *in_window, int in_chr); - int AlertInput(void *in_window, int in_chr); - - int MainClientInput(void *in_window, int in_chr); -diff -urN kismet.dev/panelfront_display.cc kismet.dev2/panelfront_display.cc ---- kismet.dev/panelfront_display.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/panelfront_display.cc 2005-08-23 01:59:25.663217208 +0200 -@@ -727,7 +727,7 @@ - mvwaddstr(netwin, netwin->_maxy, netwin->_maxx - 14, ptxt); - } - --#ifdef HAVE_GPS -+#if 0 - - - if (!(lat == 0 && lon == 0 && alt == 0 && spd == 0 && fix == 0)) { -@@ -1496,51 +1496,6 @@ - snprintf(output, print_width, "Networks: %d", (int) details_network->networks.size()); - kwin->text.push_back(output); - -- if (details_network->virtnet->gps_fixed != -1) { -- if ((details_network->virtnet->min_lat == 90) && (details_network->virtnet->min_lon == 180) && -- (details_network->virtnet->max_lat == -90) && (details_network->virtnet->max_lon == -180)) { -- snprintf(output, print_width, "Min Loc : N/A"); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Max Loc : N/A"); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Range : N/A"); -- kwin->text.push_back(output); -- } -- else { -- snprintf(output, print_width, "Min Loc : Lat %f Lon %f Alt %f Spd %f", -- details_network->virtnet->min_lat, details_network->virtnet->min_lon, -- metric ? details_network->virtnet->min_alt / 3.3 : details_network->virtnet->min_alt, -- metric ? details_network->virtnet->min_spd * 1.6093 : details_network->virtnet->min_spd); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Max Loc : Lat %f Lon %f Alt %f Spd %f", -- details_network->virtnet->max_lat, details_network->virtnet->max_lon, -- metric ? details_network->virtnet->max_alt / 3.3 : details_network->virtnet->max_alt, -- metric ? details_network->virtnet->max_spd * 1.6093 : details_network->virtnet->max_spd); -- kwin->text.push_back(output); -- -- double diagdist = GPSD::EarthDistance(details_network->virtnet->min_lat, -- details_network->virtnet->min_lon, -- details_network->virtnet->max_lat, -- details_network->virtnet->max_lon); -- -- if (finite(diagdist)) { -- if (metric) { -- if (diagdist < 1000) -- snprintf(output, print_width, "Range : %.3f meters", diagdist); -- else -- snprintf(output, print_width, "Range : %.3f kilometers", diagdist / 1000); -- } else { -- diagdist *= 3.3; -- if (diagdist < 5280) -- snprintf(output, print_width, "Range : %.3f feet", diagdist); -- else -- snprintf(output, print_width, "Range : %.3f miles", diagdist / 5280); -- } -- kwin->text.push_back(output); -- } -- } -- } -- - if (details_network->virtnet->carrier_set & (1 << (int) carrier_80211b)) { - snprintf(output, print_width, "Carrier : IEEE 802.11b"); - kwin->text.push_back(output); -@@ -1853,49 +1808,6 @@ - dnet->ipdata.range_ip[2], dnet->ipdata.range_ip[3]); - kwin->text.push_back(output); - } -- -- if (dnet->gps_fixed != -1) { -- if ((dnet->min_lat == 90) && (dnet->min_lon == 180) && -- (dnet->max_lat == -90) && (dnet->max_lon == -180)) { -- snprintf(output, print_width, "Min Loc : N/A"); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Max Loc : N/A"); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Range : N/A"); -- kwin->text.push_back(output); -- } -- else { -- snprintf(output, print_width, "Min Loc : Lat %f Lon %f Alt %f Spd %f", -- dnet->min_lat, dnet->min_lon, -- metric ? dnet->min_alt / 3.3 : dnet->min_alt, -- metric ? dnet->min_spd * 1.6093 : dnet->min_spd); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Max Loc : Lat %f Lon %f Alt %f Spd %f", -- dnet->max_lat, dnet->max_lon, -- metric ? dnet->max_alt / 3.3 : dnet->max_alt, -- metric ? dnet->max_spd * 1.6093 : dnet->max_spd); -- kwin->text.push_back(output); -- -- double diagdist = GPSD::EarthDistance(dnet->min_lat, dnet->min_lon, -- dnet->max_lat, dnet->max_lon); -- -- if (finite(diagdist)) { -- if (metric) { -- if (diagdist < 1000) -- snprintf(output, print_width, "Range : %f meters", diagdist); -- else -- snprintf(output, print_width, "Range : %f kilometers", diagdist / 1000); -- } else { -- diagdist *= 3.3; -- if (diagdist < 5280) -- snprintf(output, print_width, "Range : %f feet", diagdist); -- else -- snprintf(output, print_width, "Range : %f miles", diagdist / 5280); -- } -- kwin->text.push_back(output); -- } -- } -- } - } - - // Now we just use the text printer to handle the rest for us -@@ -1903,184 +1815,6 @@ - return TextPrinter(in_window); - } - --int PanelFront::GpsPrinter(void *in_window) { -- kis_window *kwin = (kis_window *) in_window; -- -- char output[1024]; -- kwin->text.clear(); -- -- if (details_network == NULL) { -- kwin->text.push_back("The network or group being displayed"); -- kwin->text.push_back("has been deleted. Please select a "); -- kwin->text.push_back("different network."); -- return TextPrinter(in_window); -- } -- -- wireless_network *dnet = details_network->virtnet; -- -- int print_width = kwin->print_width; -- if (print_width > 1024) -- print_width = 1023; -- -- if (print_width < 32) { -- kwin->text.push_back("Display not wide enough"); -- return TextPrinter(in_window); -- } -- -- if (dnet->aggregate_points == 0) { -- kwin->text.push_back("No GPS data."); -- return TextPrinter(in_window); -- } -- -- float center_lat, center_lon; -- -- // We hijack the "selected" field as a toggle -- if (kwin->selected == 1) { -- center_lat = dnet->best_lat; -- center_lon = dnet->best_lon; -- } else { -- center_lat = dnet->aggregate_lat / dnet->aggregate_points; -- center_lon = dnet->aggregate_lon / dnet->aggregate_points; -- } -- -- // Get bearing to the center -- float center_angle = GPSD::CalcHeading(center_lat, center_lon, lat, lon); -- -- float difference_angle = heading - center_angle; -- if (difference_angle < 0) -- difference_angle += 360; -- -- double diagdist = GPSD::EarthDistance(lat, lon, center_lat, center_lon); -- -- // Now we know everything - where we are, where we are headed, where we SHOULD be headed -- // to get to the supposed center of the network, how far it is, and the orientation on our -- // compass to get to it. Time to start drawing our output. -- -- char compass[5][10]; -- memset(compass, 0, sizeof(char) * 5 * 10); -- -- // | 41.12345x-74.12345 .-|-/ | -- // | Bearing: / |/ \ | -- // | 123.23 degrees | O | | -- // | \ \ / | -- // | Estimated center: '---\ | -- -- -- // Find the orientation on our compass: -- if (difference_angle > 330 || difference_angle <= 22) { -- snprintf(compass[0], 10, " .-|-. "); -- snprintf(compass[1], 10, " / | \\ "); -- snprintf(compass[2], 10, "| O |"); -- snprintf(compass[3], 10, " \\ / "); -- snprintf(compass[4], 10, " '---' "); -- } else if (difference_angle > 22 && difference_angle <= 66) { -- snprintf(compass[0], 10, " .---/ "); -- snprintf(compass[1], 10, " / / \\ "); -- snprintf(compass[2], 10, "| O |"); -- snprintf(compass[3], 10, " \\ / "); -- snprintf(compass[4], 10, " '---' "); -- } else if (difference_angle > 66 && difference_angle <= 110) { -- snprintf(compass[0], 10, " .---. "); -- snprintf(compass[1], 10, " / \\ "); -- snprintf(compass[2], 10, "| O----"); -- snprintf(compass[3], 10, " \\ / "); -- snprintf(compass[4], 10, " '---' "); -- } else if (difference_angle > 110 && difference_angle <= 154) { -- snprintf(compass[0], 10, " .---. "); -- snprintf(compass[1], 10, " / \\ "); -- snprintf(compass[2], 10, "| O |"); -- snprintf(compass[3], 10, " \\ \\ / "); -- snprintf(compass[4], 10, " '---\\ "); -- } else if (difference_angle > 154 && difference_angle <= 198) { -- snprintf(compass[0], 10, " .---. "); -- snprintf(compass[1], 10, " / \\ "); -- snprintf(compass[2], 10, "| O |"); -- snprintf(compass[3], 10, " \\ | / "); -- snprintf(compass[4], 10, " '-|-' "); -- } else if (difference_angle > 198 && difference_angle <= 242) { -- snprintf(compass[0], 10, " .---. "); -- snprintf(compass[1], 10, " / \\ "); -- snprintf(compass[2], 10, "| O |"); -- snprintf(compass[3], 10, " \\ / / "); -- snprintf(compass[4], 10, " /---' "); -- } else if (difference_angle > 242 && difference_angle <= 286) { -- snprintf(compass[0], 10, " .---. "); -- snprintf(compass[1], 10, " / \\ "); -- snprintf(compass[2], 10, "----O |"); -- snprintf(compass[3], 10, " \\ / "); -- snprintf(compass[4], 10, " '---' "); -- } else if (difference_angle > 286 && difference_angle <= 330) { -- snprintf(compass[0], 10, " \\---. "); -- snprintf(compass[1], 10, " / \\ \\ "); -- snprintf(compass[2], 10, "| O |"); -- snprintf(compass[3], 10, " \\ / "); -- snprintf(compass[4], 10, " '---' "); -- } else { -- snprintf(compass[0], 10, "%f\n", difference_angle); -- } -- -- -- // - Network GPS ---------------------| -- // | Current: | -- // | 41.12345x-74.12345 .-|-. | -- // | Bearing: / | \ | -- // | 123.23 degrees | O | | -- // | \ \ / | -- // | Estimated center: '---\ | -- // | -73.12345x43.12345 | -- // | 120 feet | -- // ------------------------------------ -- char textfrag[23]; -- -- snprintf(output, print_width, "Current:"); -- kwin->text.push_back(output); -- -- snprintf(textfrag, 23, "%.3f x %.3f", lat, lon); -- snprintf(output, print_width, "%-22s%s", textfrag, compass[0]); -- kwin->text.push_back(output); -- -- snprintf(textfrag, 23, " Bearing:"); -- snprintf(output, print_width, "%-22s%s", textfrag, compass[1]); -- kwin->text.push_back(output); -- -- snprintf(textfrag, 23, " %.2f*", heading); -- snprintf(output, print_width, "%-22s%s", textfrag, compass[2]); -- kwin->text.push_back(output); -- -- snprintf(textfrag, 23, " "); -- snprintf(output, print_width, "%-22s%s", textfrag, compass[3]); -- kwin->text.push_back(output); -- -- if (kwin->selected == 1) -- snprintf(textfrag, 23, "Strongest signal:"); -- else -- snprintf(textfrag, 23, "Estimated Center:"); -- snprintf(output, print_width, "%-22s%s", textfrag, compass[4]); -- kwin->text.push_back(output); -- -- snprintf(textfrag, 23, "%.3f x %.3f", center_lat, center_lon); -- snprintf(output, print_width, "%-22s%.2f*", textfrag, difference_angle); -- kwin->text.push_back(output); -- -- if (metric) { -- if (diagdist < 1000) -- snprintf(textfrag, 23, "%.2f m", diagdist); -- else -- snprintf(textfrag, 23, "%.2f km", diagdist / 1000); -- } else { -- diagdist *= 3.3; -- if (diagdist < 5280) -- snprintf(textfrag, 23, "%.2f ft", diagdist); -- else -- snprintf(textfrag, 23, "%.2f mi", diagdist / 5280); -- } -- -- snprintf(output, print_width, "%-22s%s", "", textfrag); -- kwin->text.push_back(output); -- -- return TextPrinter(in_window); --} -- - int PanelFront::PackPrinter(void *in_window) { - kis_window *kwin = (kis_window *) in_window; - -@@ -3049,53 +2783,6 @@ - details_client->ipdata.ip[2], details_client->ipdata.ip[3]); - kwin->text.push_back(output); - -- if (details_client->gps_fixed != -1) { -- kwin->text.push_back(""); -- -- if ((details_client->min_lat == 90) && (details_client->min_lon == 180) && -- (details_client->max_lat == -90) && (details_client->max_lon == -180)) { -- snprintf(output, print_width, "Min Loc : N/A"); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Max Loc : N/A"); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Range : N/A"); -- kwin->text.push_back(output); -- } -- else { -- snprintf(output, print_width, "Min Loc : Lat %f Lon %f Alt %f Spd %f", -- details_client->min_lat, details_client->min_lon, -- metric ? details_client->min_alt / 3.3 : details_client->min_alt, -- metric ? details_client->min_spd * 1.6093 : details_client->min_spd); -- kwin->text.push_back(output); -- snprintf(output, print_width, "Max Loc : Lat %f Lon %f Alt %f Spd %f", -- details_client->max_lat, details_client->max_lon, -- metric ? details_client->max_alt / 3.3 : details_client->max_alt, -- metric ? details_client->max_spd * 1.6093 : details_client->max_spd); -- kwin->text.push_back(output); -- -- double diagdist = GPSD::EarthDistance(details_client->min_lat, -- details_client->min_lon, -- details_client->max_lat, -- details_client->max_lon); -- -- if (finite(diagdist)) { -- if (metric) { -- if (diagdist < 1000) -- snprintf(output, print_width, "Range : %f meters", diagdist); -- else -- snprintf(output, print_width, "Range : %f kilometers", diagdist / 1000); -- } else { -- diagdist *= 3.3; -- if (diagdist < 5280) -- snprintf(output, print_width, "Range : %f feet", diagdist); -- else -- snprintf(output, print_width, "Range : %f miles", diagdist / 5280); -- } -- kwin->text.push_back(output); -- } -- } -- kwin->text.push_back(""); -- } - - snprintf(output, print_width, "Packets :"); - kwin->text.push_back(output); -diff -urN kismet.dev/panelfront_input.cc kismet.dev2/panelfront_input.cc ---- kismet.dev/panelfront_input.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/panelfront_input.cc 2005-08-23 01:59:25.665216904 +0200 -@@ -300,16 +300,9 @@ - break; - case 'f': - case 'F': -- if (sortby != sort_auto && last_displayed.size() > 0) { -- details_network = last_displayed[kwin->selected]; -- SpawnWindow("Network Location", &PanelFront::GpsPrinter, &PanelFront::GpsInput, 8, 34); -- } else { -- WriteStatus("Cannot view network GPS info in autofit sort mode. Sort by a different method."); -- } - break; - case 'm': - case 'M': -- MuteToggle(); - break; - case 'e': - case 'E': -@@ -447,7 +440,6 @@ - switch(in_chr) { - case 'm': - case 'M': -- MuteToggle(); - break; - case 'p': - case 'P': -@@ -546,33 +538,6 @@ - return 1; - } - --int PanelFront::GpsInput(void *in_window, int in_chr) { -- kis_window *kwin = (kis_window *) in_window; -- -- switch (in_chr) { -- case 's': -- case 'S': -- kwin->selected = 1; -- break; -- case 'c': -- case 'C': -- kwin->selected = 0; -- break; -- case 'h': -- case 'H': -- SpawnHelp(KismetHelpGps); -- break; -- case 'x': -- case 'X': -- case 'q': -- case 'Q': -- return 0; -- break; -- } -- -- return 1; --} -- - int PanelFront::RateInput(void *in_window, int in_chr) { - switch (in_chr) { - case 'h': -@@ -645,24 +610,6 @@ - return 1; - } - --void PanelFront::MuteToggle() { -- if (muted) { -- speech = old_speech; -- sound = old_sound; -- muted = 0; -- WriteStatus("Restoring sound"); -- } else if (sound != 0 || speech != 0) { -- old_speech = speech; -- old_sound = sound; -- sound = 0; -- speech = 0; -- muted = 1; -- WriteStatus("Muting sound"); -- } else if (sound == 0 && speech == 0) { -- WriteStatus("Sound not enabled."); -- } --} -- - int PanelFront::AlertInput(void *in_window, int in_chr) { - kis_window *kwin = (kis_window *) in_window; - -diff -urN kismet.dev/pcapsource.cc kismet.dev2/pcapsource.cc ---- kismet.dev/pcapsource.cc 2005-08-23 01:03:45.652632608 +0200 -+++ kismet.dev2/pcapsource.cc 2005-08-23 01:59:25.667216600 +0200 -@@ -343,11 +343,6 @@ - packet->moddata = moddata; - packet->modified = 0; - -- if (gpsd != NULL) { -- gpsd->FetchLoc(&packet->gps_lat, &packet->gps_lon, &packet->gps_alt, -- &packet->gps_spd, &packet->gps_heading, &packet->gps_fix); -- } -- - if (datalink_type == DLT_PRISM_HEADER) { - ret = Prism2KisPack(packet, data, moddata); - } else if (datalink_type == KDLT_BSD802_11) { -@@ -1146,133 +1141,6 @@ - - // Monitor commands - #ifdef HAVE_LINUX_WIRELESS --// Cisco uses its own config file in /proc to control modes --int monitor_cisco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- FILE *cisco_config; -- char cisco_path[128]; -- -- linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm)); -- (*in_if) = ifparm; -- -- if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) { -- return -1; -- } -- -- if (Iwconfig_Get_SSID(in_dev, in_err, ifparm->essid) < 0) -- return -1; -- -- if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0) -- return -1; -- -- if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0) -- return -1; -- -- if (Ifconfig_Delta_Flags(in_dev, in_err, IFF_UP | IFF_RUNNING | IFF_PROMISC) < 0) -- return -1; -- -- // Try the iwpriv -- if (Iwconfig_Set_IntPriv(in_dev, "setRFMonitor", 1, 0, in_err) >= 0) { -- return 0; -- } -- -- // Zero the ssid - nonfatal -- Iwconfig_Set_SSID(in_dev, in_err, NULL); -- -- // Build the proc control path -- snprintf(cisco_path, 128, "/proc/driver/aironet/%s/Config", in_dev); -- -- if ((cisco_config = fopen(cisco_path, "w")) == NULL) { -- snprintf(in_err, STATUS_MAX, "Unable to open cisco control file '%s' %d:%s", -- cisco_path, errno, strerror(errno)); -- return -1; -- } -- -- fprintf(cisco_config, "Mode: r\n"); -- fprintf(cisco_config, "Mode: y\n"); -- fprintf(cisco_config, "XmitPower: 1\n"); -- -- fclose(cisco_config); -- -- // Channel can't be set on cisco with these drivers. -- -- return 0; --} -- --int unmonitor_cisco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- linux_ifparm *ifparm = (linux_ifparm *) (*in_if); -- int ret = -1; -- -- // Try the iwpriv -- if (Iwconfig_Set_IntPriv(in_dev, "setRFMonitor", 0, 0, in_err) >= 0) { -- // If we're the new drivers, unmonitor -- if (Ifconfig_Set_Flags(in_dev, in_err, ifparm->flags) < 0) { -- return -1; -- } -- -- // Reset the SSID since monitor mode nukes it -- if (Iwconfig_Set_SSID(in_dev, in_err, ifparm->essid) < 0) -- return -1; -- -- if (ifparm->channel > 0) { -- if (Iwconfig_Set_Channel(in_dev, ifparm->channel, in_err) < 0) -- return -1; -- } -- -- ret = 1; -- } -- -- free(ifparm); -- -- return ret; --} -- --// Cisco uses its own config file in /proc to control modes --// --// I was doing this with ioctls but that seems to cause lockups while --// this method doesn't. I don't think I like these drivers. --int monitor_cisco_wifix(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- FILE *cisco_config; -- char cisco_path[128]; -- vector devbits = StrTokenize(in_dev, ":"); -- -- if (devbits.size() < 2) { -- snprintf(in_err, STATUS_MAX, "Invalid device pair '%s'. Proper device " -- "for cisco_wifix is eth?:wifi?.", in_dev); -- return -1; -- } -- -- // Bring the device up, zero its ip, and set promisc -- if (Ifconfig_Delta_Flags(devbits[0].c_str(), in_err, -- IFF_UP | IFF_RUNNING | IFF_PROMISC) < 0) -- return -1; -- if (Ifconfig_Delta_Flags(devbits[1].c_str(), in_err, -- IFF_UP | IFF_RUNNING | IFF_PROMISC) < 0) -- return -1; -- -- // Zero the ssid, nonfatally -- Iwconfig_Set_SSID(devbits[0].c_str(), in_err, NULL); -- Iwconfig_Set_SSID(devbits[1].c_str(), in_err, NULL); -- -- // Build the proc control path -- snprintf(cisco_path, 128, "/proc/driver/aironet/%s/Config", devbits[0].c_str()); -- -- if ((cisco_config = fopen(cisco_path, "w")) == NULL) { -- snprintf(in_err, STATUS_MAX, "Unable to open cisco control file '%s' %d:%s", -- cisco_path, errno, strerror(errno)); -- return -1; -- } -- -- fprintf(cisco_config, "Mode: r\n"); -- fprintf(cisco_config, "Mode: y\n"); -- fprintf(cisco_config, "XmitPower: 1\n"); -- -- fclose(cisco_config); -- -- // Channel can't be set on cisco with these drivers. -- -- return 0; --} -- - // Hostap uses iwpriv and iwcontrol settings to control monitor mode - int monitor_hostap(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { - int ret; -@@ -1421,134 +1289,6 @@ - return 1; - - } -- --// Acx100 uses the packhdr iwpriv control to set link state, rest is normal --int monitor_acx100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- int ret; -- -- // Allocate a tracking record for the interface settings and remember our -- // setup -- linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm)); -- (*in_if) = ifparm; -- -- if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) { -- return -1; -- } -- -- if (Iwconfig_Get_SSID(in_dev, in_err, ifparm->essid) < 0) -- return -1; -- -- if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0) -- return -1; -- -- if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0) -- return -1; -- -- // it looks like an orinoco now, apparently -- if ((ret = Iwconfig_Set_IntPriv(in_dev, "monitor", 1, initch, in_err)) < 0) { -- if (ret == -2) -- snprintf(in_err, 1024, "Could not find 'monitor' private ioctl " -- "Make sure you have the latest ACX100 development release."); -- return -1; -- } -- -- if (chancontrol_wext(in_dev, initch, in_err, NULL) < 0) -- return -1; -- -- return 0; --} -- --int unmonitor_acx100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- // Restore the IP settings -- linux_ifparm *ifparm = (linux_ifparm *) (*in_if); -- -- if (Ifconfig_Set_Flags(in_dev, in_err, ifparm->flags) < 0) { -- return -1; -- } -- -- Iwconfig_Set_IntPriv(in_dev, "monitor", 0, ifparm->channel, in_err); -- Iwconfig_Set_Mode(in_dev, in_err, ifparm->mode); -- -- if (Iwconfig_Set_SSID(in_dev, in_err, ifparm->essid) < 0) -- return -1; -- -- free(ifparm); -- -- return 1; --} -- --int monitor_admtek(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- // Allocate a tracking record for the interface settings and remember our -- // setup -- linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm)); -- (*in_if) = ifparm; -- -- // Try to figure out the name so we know if we have fcs bytes or not -- char iwname[IFNAMSIZ+1]; -- if (Iwconfig_Get_Name(in_dev, in_err, iwname) < 0) -- return -1; -- -- if (strncmp(iwname, "IEEE 802.11b", IFNAMSIZ) == 0) { -- // Looks like the GPL driver, we need to adjust the fcsbytes -- PcapSource *psrc = (PcapSource *) in_ext; -- psrc->fcsbytes = 4; -- } -- -- if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) { -- return -1; -- } -- -- if ((ifparm->flags & IFF_UP)) { -- if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0) -- return -1; -- -- if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0) -- return -1; -- -- if (Iwconfig_Get_SSID(in_dev, in_err, ifparm->essid) < 0) -- return -1; -- -- } else { -- ifparm->channel = -1; -- ifparm->mode = -1; -- } -- -- int ret = monitor_wext(in_dev, initch, in_err, in_if, in_ext); -- -- if (ret < 0 && ret != -2) -- return ret; -- -- if (Iwconfig_Set_SSID(in_dev, in_err, "") < 0) -- return -1; -- -- return 0; --} -- --int unmonitor_admtek(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- linux_ifparm *ifparm = (linux_ifparm *) (*in_if); -- -- if (unmonitor_wext(in_dev, initch, in_err, in_if, in_ext)) -- return -1; -- -- if (Iwconfig_Set_SSID(in_dev, in_err, ifparm->essid) < 0) -- return -1; -- -- return 1; --} --// vtar5k iwpriv control to set link state, rest is normal --int monitor_vtar5k(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- // Set the prism iwpriv control to 1 -- if (Iwconfig_Set_IntPriv(in_dev, "prism", 1, 0, in_err) < 0) { -- return -1; -- } -- -- // The rest is standard wireless extensions -- if (monitor_wext(in_dev, initch, in_err, in_if, in_ext) < 0) -- return -1; -- -- return 0; --} -- - // Madwifi stuff uses iwpriv mode - int monitor_madwifi_a(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { - // Allocate a tracking record for the interface settings and remember our -@@ -1726,89 +1466,6 @@ - - return unmonitor_wext(in_dev, initch, in_err, in_if, in_ext); - } -- --int monitor_ipw2100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- // Allocate a tracking record for the interface settings and remember our -- // setup -- linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm)); -- (*in_if) = ifparm; -- -- if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) { -- return -1; -- } -- -- if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0) -- return -1; -- -- if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0) -- return -1; -- -- // Call the normal monitor mode -- return (monitor_wext(in_dev, initch, in_err, in_if, in_ext)); --} -- --int unmonitor_ipw2100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- // Restore initial monitor header -- // linux_ifparm *ifparm = (linux_ifparm *) (*in_if); -- -- linux_ifparm *ifparm = (linux_ifparm *) (*in_if); -- -- if (Ifconfig_Set_Flags(in_dev, in_err, ifparm->flags) < 0) { -- return -1; -- } -- -- if (Iwconfig_Set_Mode(in_dev, in_err, ifparm->mode) < 0) -- return -1; -- -- free(ifparm); -- -- return 1; --} -- --int monitor_ipw2200(const char *in_dev, int initch, char *in_err, -- void **in_if, void *in_ext) { -- // Allocate a tracking record for the interface settings and remember our -- // setup -- linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm)); -- (*in_if) = ifparm; -- -- if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) { -- return -1; -- } -- -- if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0) -- return -1; -- -- if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0) -- return -1; -- -- // Call the normal monitor mode -- return (monitor_wext(in_dev, initch, in_err, in_if, in_ext)); --} -- --int unmonitor_ipw2200(const char *in_dev, int initch, char *in_err, -- void **in_if, void *in_ext) { -- // Restore initial monitor header -- // linux_ifparm *ifparm = (linux_ifparm *) (*in_if); -- -- linux_ifparm *ifparm = (linux_ifparm *) (*in_if); -- -- if (Ifconfig_Set_Flags(in_dev, in_err, ifparm->flags) < 0) { -- return -1; -- } -- -- if (Iwconfig_Set_Mode(in_dev, in_err, ifparm->mode) < 0) -- return -1; -- -- // James says this wants to be set to channel 0 for proper scanning operation -- if (Iwconfig_Set_Channel(in_dev, 0, in_err) < 0) -- return -1; -- -- free(ifparm); -- -- return 1; --} -- - // "standard" wireless extension monitor mode - int monitor_wext(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { - int mode; -@@ -1870,108 +1527,6 @@ - #endif - - #ifdef SYS_LINUX --// wlan-ng modern standard --int monitor_wlanng(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- // I really didn't want to do this... -- char cmdline[2048]; -- -- // Sanitize the device just to be safe. The ifconfig should fail if -- // the device is invalid, but why take risks -- for (unsigned int x = 0; x < strlen(in_dev); x++) { -- if (!isalnum(in_dev[x])) { -- snprintf(in_err, STATUS_MAX, "Invalid device '%s'", in_dev); -- return -1; -- } -- } -- -- if (Ifconfig_Delta_Flags(in_dev, in_err, IFF_UP | IFF_RUNNING | IFF_PROMISC) < 0) -- return -1; -- -- // Enable the interface -- snprintf(cmdline, 2048, "wlanctl-ng %s lnxreq_ifstate ifstate=enable >/dev/null 2>/dev/null", in_dev); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- // Turn off WEP -- snprintf(cmdline, 2048, "wlanctl-ng %s dot11req_mibset " -- "mibattribute=dot11PrivacyInvoked=false >/dev/null 2>/dev/null", in_dev); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- // Don't exclude packets -- snprintf(cmdline, 2048, "wlanctl-ng %s dot11req_mibset " -- "mibattribute=dot11ExcludeUnencrypted=false >/dev/null 2>/dev/null", in_dev); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- // Turn on rfmon on the initial channel -- snprintf(cmdline, 2048, "wlanctl-ng %s lnxreq_wlansniff channel=%d " -- "enable=true prismheader=true >/dev/null 2>/dev/null", in_dev, initch); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- return 0; --} -- --// wlan-ng avs --int monitor_wlanng_avs(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) { -- // I really didn't want to do this... -- char cmdline[2048]; -- -- // Sanitize the device just to be safe. The ifconfig should fail if -- // the device is invalid, but why take risks -- for (unsigned int x = 0; x < strlen(in_dev); x++) { -- if (!isalnum(in_dev[x])) { -- snprintf(in_err, STATUS_MAX, "Invalid device '%s'", in_dev); -- return -1; -- } -- } -- -- if (Ifconfig_Delta_Flags(in_dev, in_err, IFF_UP | IFF_RUNNING | IFF_PROMISC) < 0) -- return -1; -- -- // Enable the interface -- snprintf(cmdline, 2048, "wlanctl-ng %s lnxreq_ifstate ifstate=enable >/dev/null 2>/dev/null", in_dev); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- // Turn off WEP -- snprintf(cmdline, 2048, "wlanctl-ng %s dot11req_mibset " -- "mibattribute=dot11PrivacyInvoked=false >/dev/null 2>/dev/null", in_dev); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- // Don't exclude packets -- snprintf(cmdline, 2048, "wlanctl-ng %s dot11req_mibset " -- "mibattribute=dot11ExcludeUnencrypted=false >/dev/null 2>/dev/null", in_dev); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- // Turn on rfmon on the initial channel -- snprintf(cmdline, 2048, "wlanctl-ng %s lnxreq_wlansniff channel=%d prismheader=false " -- "wlanheader=true stripfcs=false keepwepflags=false enable=true >/dev/null 2>/dev/null", in_dev, initch); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- return 0; --} -- - int monitor_wrt54g(const char *in_dev, int initch, char *in_err, void **in_if, - void *in_ext) { - char cmdline[2048]; -@@ -1981,7 +1536,7 @@ - snprintf(in_err, 1024, "Unable to set mode using 'iwpriv %s set_monitor 1'. " - "Some custom firmware images require you to specify the origial " - "device and a new dynamic device and use the iwconfig controls. " -- "see the README for how to configure your capture source."); -+ "see the README for how to configure your capture source.", in_dev); - return -1; - } - -@@ -1998,7 +1553,7 @@ - snprintf(in_err, 1024, "Unable to set mode using 'iwpriv %s set_monitor 0'. " - "Some custom firmware images require you to specify the origial " - "device and a new dynamic device and use the iwconfig controls. " -- "see the README for how to configure your capture source."); -+ "see the README for how to configure your capture source.", in_dev); - return -1; - } - -@@ -2244,75 +1799,6 @@ - return 0; - } - --int chancontrol_ipw2100(const char *in_dev, int in_ch, char *in_err, void *in_ext) { -- // Introduce a slight delay to let the driver settle, a la orinoco. I don't -- // like doing this at all since it introduces hiccups into the channel control -- // process, but.... -- -- int ret = 0; -- -- ret = chancontrol_wext(in_dev, in_ch, in_err, in_ext); -- usleep(5000); -- -- return ret; --} -- --int chancontrol_ipw2200(const char *in_dev, int in_ch, char *in_err, void *in_ext) { -- // Lets see if this really needs the channel change delay like the 2100 did -- int ret = 0; -- -- ret = chancontrol_wext(in_dev, in_ch, in_err, in_ext); -- // Drop a tiny sleep in here to let the channel set settle, otherwise we -- // run the risk of the card freaking out -- usleep(7000); -- -- return ret; --} -- --#endif -- --#ifdef SYS_LINUX --int chancontrol_wlanng(const char *in_dev, int in_ch, char *in_err, void *in_ext) { -- // I really didn't want to do this... -- char cmdline[2048]; -- -- // Turn on rfmon on the initial channel -- snprintf(cmdline, 2048, "wlanctl-ng %s lnxreq_wlansniff channel=%d enable=true " -- "prismheader=true >/dev/null 2>&1", in_dev, in_ch); -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- if (in_ext != NULL) { -- PcapSourceWlanng *src = (PcapSourceWlanng *) in_ext; -- src->last_channel = in_ch; -- } -- -- return 0; --} -- --int chancontrol_wlanng_avs(const char *in_dev, int in_ch, char *in_err, void *in_ext) { -- // I really didn't want to do this... -- char cmdline[2048]; -- -- // Turn on rfmon on the initial channel -- snprintf(cmdline, 2048, "wlanctl-ng %s lnxreq_wlansniff channel=%d " -- "prismheader=false wlanheader=true stripfcs=false keepwepflags=false " -- "enable=true >/dev/null 2>&1", in_dev, in_ch); -- -- if (RunSysCmd(cmdline) < 0) { -- snprintf(in_err, 1024, "Unable to execute '%s'", cmdline); -- return -1; -- } -- -- if (in_ext != NULL) { -- PcapSourceWlanng *src = (PcapSourceWlanng *) in_ext; -- src->last_channel = in_ch; -- } -- -- return 0; --} - #endif - - #ifdef SYS_OPENBSD -diff -urN kismet.dev/tcpstreamer.cc kismet.dev2/tcpstreamer.cc ---- kismet.dev/tcpstreamer.cc 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/tcpstreamer.cc 2005-08-23 01:59:25.668216448 +0200 -@@ -30,8 +30,6 @@ - serv_fd = 0; - - max_fd = 0; -- -- gpsd = NULL; - } - - TcpStreamer::~TcpStreamer() -@@ -287,10 +285,6 @@ - hdr.frame_len = (uint32_t) htonl(sizeof(struct stream_version_packet)); - - vpkt.drone_version = (uint16_t) htons(STREAM_DRONE_VERSION); -- if (gpsd != NULL) -- vpkt.gps_enabled = 1; -- else -- vpkt.gps_enabled = 0; - - if (!FD_ISSET(in_fd, &client_fds)) - return -1; -diff -urN kismet.dev/tcpstreamer.h kismet.dev2/tcpstreamer.h ---- kismet.dev/tcpstreamer.h 2005-08-16 03:22:51.000000000 +0200 -+++ kismet.dev2/tcpstreamer.h 2005-08-23 01:59:25.669216296 +0200 -@@ -42,7 +42,6 @@ - #include "ringbuf.h" - #include "packet.h" - #include "packetstream.h" --#include "gpsd.h" - - // Global in kismet_drone.cc - extern int silent; -@@ -76,9 +75,6 @@ - - int FetchDescriptor() { return serv_fd; } - -- // Register the GPS server for us to use -- void AddGpstracker(GPSD *in_gpsd) { gpsd = in_gpsd; } -- - void Kill(int in_fd); - - int Poll(fd_set& in_rset, fd_set& in_wset); -@@ -124,8 +120,6 @@ - fd_set client_fds; - - unsigned int max_fd; -- -- GPSD *gpsd; - }; - - #endif diff --git a/openwrt/package/knock/Config.in b/openwrt/package/knock/Config.in deleted file mode 100644 index 3f90b496d59..00000000000 --- a/openwrt/package/knock/Config.in +++ /dev/null @@ -1,41 +0,0 @@ -config BR2_COMPILE_KNOCK - tristate - default n - depends BR2_PACKAGE_KNOCK || BR2_PACKAGE_KNOCKD - -config BR2_PACKAGE_KNOCK - prompt "knock............................. A port-knocking client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_KNOCK - help - It listens to all traffic on an ethernet (or PPP) interface, - looking for special "knock" sequences of port-hits. A client - makes these port-hits by sending a TCP (or UDP) packet to a - port on the server. This port need not be open -- since - knockd listens at the link-layer level, it sees all traffic - even if it's destined for a closed port. When the server - detects a specific sequence of port-hits, it runs a command - defined in its configuration file. This can be used to open - up holes in a firewall for quick access. - - http://www.zeroflux.org/cgi-bin/cvstrac/knock/wiki - -config BR2_PACKAGE_KNOCKD - prompt "knockd............................ A port-knocking server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_KNOCK - help - It listens to all traffic on an ethernet (or PPP) interface, - looking for special "knock" sequences of port-hits. A client - makes these port-hits by sending a TCP (or UDP) packet to a - port on the server. This port need not be open -- since - knockd listens at the link-layer level, it sees all traffic - even if it's destined for a closed port. When the server - detects a specific sequence of port-hits, it runs a command - defined in its configuration file. This can be used to open - up holes in a firewall for quick access. - - http://www.zeroflux.org/cgi-bin/cvstrac/knock/wiki - diff --git a/openwrt/package/knock/Makefile b/openwrt/package/knock/Makefile deleted file mode 100644 index d8d6262e869..00000000000 --- a/openwrt/package/knock/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=knock -PKG_VERSION:=0.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=ca09d61458974cff90a700aba6120891 - -PKG_SOURCE_URL:=http://www.zeroflux.org/knock/files/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KNOCK,knock,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,KNOCKD,knockd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_lib_pcap_pcap_open_live=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/kismet \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-rpath \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_KNOCK): - install -d -m0755 $(IDIR_KNOCK)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/knock $(IDIR_KNOCK)/usr/bin/ - $(RSTRIP) $(IDIR_KNOCK) - $(IPKG_BUILD) $(IDIR_KNOCK) $(PACKAGE_DIR) - -$(IPKG_KNOCKD): - install -d -m0755 $(IDIR_KNOCKD)/etc - install -m0600 $(PKG_INSTALL_DIR)/etc/knockd.conf $(IDIR_KNOCKD)/etc/ - install -d -m0755 $(IDIR_KNOCKD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/knockd $(IDIR_KNOCKD)/usr/sbin/ - $(RSTRIP) $(IDIR_KNOCKD) - $(IPKG_BUILD) $(IDIR_KNOCKD) $(PACKAGE_DIR) diff --git a/openwrt/package/knock/ipkg/knock.control b/openwrt/package/knock/ipkg/knock.control deleted file mode 100644 index 72e635ff495..00000000000 --- a/openwrt/package/knock/ipkg/knock.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: knock -Priority: optional -Section: net -Depends: -Description: A port-knocking client diff --git a/openwrt/package/knock/ipkg/knockd.conffiles b/openwrt/package/knock/ipkg/knockd.conffiles deleted file mode 100644 index e191bfd70a1..00000000000 --- a/openwrt/package/knock/ipkg/knockd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/knockd.conf \ No newline at end of file diff --git a/openwrt/package/knock/ipkg/knockd.control b/openwrt/package/knock/ipkg/knockd.control deleted file mode 100644 index e0c94391523..00000000000 --- a/openwrt/package/knock/ipkg/knockd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: knockd -Priority: optional -Section: net -Depends: libpcap -Description: A port-knocking server diff --git a/openwrt/package/l2tpd/Config.in b/openwrt/package/l2tpd/Config.in deleted file mode 100644 index 47d83ed7412..00000000000 --- a/openwrt/package/l2tpd/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_L2TPD - prompt "l2tpd............................. An L2TP (Layer 2 Tunneling Protocol) daemon" - tristate - default m if CONFIG_DEVEL - help - A layer 2 tunneling protocol implementation. - l2tpd is the open source implementation of the L2TP tunneling - protocol (RFC2661). It does implement both LAC and LNS role - in a L2TP networking architecture. The main goal of this protocol is - to tunnel PPP frame trough an ip network. - - http://l2tpd.sourceforge.net/ - diff --git a/openwrt/package/l2tpd/Makefile b/openwrt/package/l2tpd/Makefile deleted file mode 100644 index 6435f35a7d4..00000000000 --- a/openwrt/package/l2tpd/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=l2tpd -PKG_VERSION:=0.70pre -PKG_UPSTREAM_VERSION:=0.70-pre20031121 -PKG_RELEASE:=4.1 -PKG_MD5SUM:=3f2707b6e16a8cb72e7bf64f574202fa - -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/l2tpd -PKG_SOURCE:=$(PKG_NAME)_$(PKG_UPSTREAM_VERSION).orig.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).orig -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,L2TPD,l2tpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CC=$(TARGET_CC) \ - CFLAGS="$(TARGET_CFLAGS) -I. -DLINUX -DSANITY -DIP_ALLOCATION" - touch $@ - -$(IPKG_L2TPD): - install -d -m0755 $(IDIR_L2TPD)/etc/l2tpd - install -m0644 ./files/l2tpd.conf $(IDIR_L2TPD)/etc/l2tpd/ - install -d -m0755 $(IDIR_L2TPD)/etc/ppp - install -m0644 ./files/options.l2tpd $(IDIR_L2TPD)/etc/ppp/ - install -d -m0755 $(IDIR_L2TPD)/etc/init.d - install -m0755 ./files/l2tpd.init $(IDIR_L2TPD)/etc/init.d/l2tpd - install -d -m0755 $(IDIR_L2TPD)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_L2TPD)/usr/sbin/ - $(RSTRIP) $(IDIR_L2TPD) - $(IPKG_BUILD) $(IDIR_L2TPD) $(PACKAGE_DIR) - diff --git a/openwrt/package/l2tpd/files/l2tpd.conf b/openwrt/package/l2tpd/files/l2tpd.conf deleted file mode 100644 index 2a9ba1cc63e..00000000000 --- a/openwrt/package/l2tpd/files/l2tpd.conf +++ /dev/null @@ -1,29 +0,0 @@ -; -; This is a minimal sample l2tpd configuration file for use -; with L2TP over IPsec. -; -; The idea is to provide an L2TP daemon to which remote Windows L2TP/IPsec -; clients connect. In this example, the internal (protected) network -; is 192.168.1.0/24. A special IP range within this network is reserved -; for the remote clients: 192.168.1.128/25 -; (i.e. 192.168.1.128 ... 192.168.1.254) -; -; The listen-addr parameter can be used if you want to bind the L2TP daemon -; to a specific IP address instead of to all interfaces. For instance, -; you could bind it to the interface of the internal LAN (e.g. 192.168.1.98 -; in the example below). Yet another IP address (local ip, e.g. 192.168.1.99) -; will be used by l2tpd as its address on pppX interfaces. - -[global] -; listen-addr = 192.168.1.98 - -[lns default] -ip range = 192.168.1.128-192.168.1.254 -local ip = 192.168.1.99 -require chap = yes -refuse pap = yes -require authentication = yes -name = LinuxVPNserver -ppp debug = yes -pppoptfile = /etc/ppp/options.l2tpd -length bit = yes diff --git a/openwrt/package/l2tpd/files/l2tpd.init b/openwrt/package/l2tpd/files/l2tpd.init deleted file mode 100644 index f5317579932..00000000000 --- a/openwrt/package/l2tpd/files/l2tpd.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -BIN=l2tpd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/l2tpd/files/options.l2tpd b/openwrt/package/l2tpd/files/options.l2tpd deleted file mode 100644 index 425a56e0874..00000000000 --- a/openwrt/package/l2tpd/files/options.l2tpd +++ /dev/null @@ -1,17 +0,0 @@ -ipcp-accept-local -ipcp-accept-remote -ms-dns 192.168.1.1 -ms-dns 192.168.1.3 -ms-wins 192.168.1.2 -ms-wins 192.168.1.4 -noccp -auth -crtscts -idle 1800 -mtu 1410 -mru 1410 -nodefaultroute -debug -lock -proxyarp -connect-delay 5000 diff --git a/openwrt/package/l2tpd/ipkg/l2tpd.conffiles b/openwrt/package/l2tpd/ipkg/l2tpd.conffiles deleted file mode 100644 index 1607479cb0b..00000000000 --- a/openwrt/package/l2tpd/ipkg/l2tpd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/l2tpd/l2tpd.conf -/etc/ppp/options.l2tpd diff --git a/openwrt/package/l2tpd/ipkg/l2tpd.control b/openwrt/package/l2tpd/ipkg/l2tpd.control deleted file mode 100644 index b2552dcd764..00000000000 --- a/openwrt/package/l2tpd/ipkg/l2tpd.control +++ /dev/null @@ -1,8 +0,0 @@ -Package: l2tpd -Priority: optional -Section: net -Description: A layer 2 tunneling protocol implementation. - l2tpd is the open source implementation of the L2TP tunneling - protocol (RFC2661). It does implement both LAC and LNS role - in a L2TP networking architecture. The main goal of this protocol is - to tunnel PPP frame trough an ip network. diff --git a/openwrt/package/l2tpd/patches/01-debian-2.patch b/openwrt/package/l2tpd/patches/01-debian-2.patch deleted file mode 100644 index 8a6e204c4dc..00000000000 --- a/openwrt/package/l2tpd/patches/01-debian-2.patch +++ /dev/null @@ -1,3394 +0,0 @@ ---- l2tpd-0.70-pre20031121.orig/Makefile -+++ l2tpd-0.70-pre20031121/Makefile -@@ -28,7 +28,8 @@ - # become runtime options) debugging flags - # - #DFLAGS= -g -O2 -DDEBUG_PPPD --DFLAGS= -g -O2 -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY -+#DFLAGS= -g -O2 -Wall -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY -+DFLAGS= -ggdb -Wall -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY - # - # Uncomment the next line for Linux - # -@@ -58,7 +59,7 @@ - - FFLAGS= -DIP_ALLOCATION - --CFLAGS= $(DFLAGS) -Wall -DSANITY $(OSFLAGS) $(FFLAGS) -+CFLAGS= $(DFLAGS) -Wall -DSANITY $(OSFLAGS) $(FFLAGS) - HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h - OBJS=l2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o - LIBS= $(OSLIB) # -lefence # efence for malloc checking ---- l2tpd-0.70-pre20031121.orig/control.c -+++ l2tpd-0.70-pre20031121/control.c -@@ -227,7 +227,7 @@ - add_bearer_caps_avp (buf, t->ourbc); - /* FIXME: Tie breaker */ - add_firmware_avp (buf); -- add_hostname_avp (buf); -+ add_hostname_avp (buf, t); - add_vendor_avp (buf); - add_tunnelid_avp (buf, t->ourtid); - if (t->ourrws >= 0) -@@ -346,7 +346,6 @@ - "%s: Peer did not specify assigned tunnel ID. Closing.\n", - __FUNCTION__); - set_error (c, VENDOR_ERROR, "Specify your assigned tunnel ID"); -- c->needclose = -1; - return -EINVAL; - } - if (!(t->lns = get_lns (t))) -@@ -356,7 +355,6 @@ - "%s: Denied connection to unauthorized peer %s\n", - __FUNCTION__, IPADDY (t->peer.sin_addr)); - set_error (c, VENDOR_ERROR, "No Authorization"); -- c->needclose = -1; - return -EINVAL; - } - t->ourrws = t->lns->tun_rws; -@@ -368,7 +366,6 @@ - "%s: Peer did not specify framing capability. Closing.\n", - __FUNCTION__); - set_error (c, VENDOR_ERROR, "Specify framing capability"); -- c->needclose = -1; - return -EINVAL; - } - /* FIXME: Do we need to be sure they specified a version number? -@@ -380,7 +377,6 @@ - if (DEBUG) log(LOG_DEBUG, - "%s: Peer did not specify bearer capability. Closing.\n",__FUNCTION__); - set_error(c, VENDOR_ERROR, "Specify bearer capability"); -- c->needclose = -1; - return -EINVAL; - } */ - if ((!strlen (t->hostname)) && ((t->chal_us.state) || ((t->lns->challenge)))) -@@ -390,7 +386,6 @@ - "%s: Peer did not specify hostname. Closing.\n", - __FUNCTION__); - set_error (c, VENDOR_ERROR, "Specify your hostname"); -- c->needclose = -1; - return -EINVAL; - } - y = tunnels.head; -@@ -427,7 +422,7 @@ - add_frame_caps_avp (buf, t->ourfc); - add_bearer_caps_avp (buf, t->ourbc); - add_firmware_avp (buf); -- add_hostname_avp (buf); -+ add_hostname_avp (buf, t); - add_vendor_avp (buf); - add_tunnelid_avp (buf, t->ourtid); - if (t->ourrws >= 0) -@@ -481,7 +476,6 @@ - "%s: Peer did not specify framing capability. Closing.\n", - __FUNCTION__); - set_error (c, VENDOR_ERROR, "Specify framing capability"); -- c->needclose = -1; - return -EINVAL; - } - /* FIXME: Do we need to be sure they specified a version number? -@@ -493,7 +487,6 @@ - if (DEBUG) log(LOG_DEBUG, - "%s: Peer did not specify bearer capability. Closing.\n",__FUNCTION__); - set_error(c, VENDOR_ERROR, "Specify bearer capability"); -- c->needclose = -1; - return -EINVAL; - } */ - if ((!strlen (t->hostname)) && ((t->chal_them.state) || ((t->chal_us.state)))) -@@ -503,7 +496,6 @@ - "%s: Peer did not specify hostname. Closing.\n", - __FUNCTION__); - set_error (c, VENDOR_ERROR, "Specify your hostname"); -- c->needclose = -1; - return -EINVAL; - } - if (t->tid <= 0) -@@ -513,7 +505,6 @@ - "%s: Peer did not specify assigned tunnel ID. Closing.\n", - __FUNCTION__); - set_error (c, VENDOR_ERROR, "Specify your assigned tunnel ID"); -- c->needclose = -1; - return -EINVAL; - } - if (t->chal_them.state) -@@ -524,7 +515,6 @@ - set_error (c, VENDOR_ERROR, "No secret key on our side"); - log (LOG_WARN, "%s: No secret key for authenticating '%s'\n", - __FUNCTION__, t->hostname); -- c->needclose = -1; - return -EINVAL; - } - if (memcmp -@@ -534,7 +524,6 @@ - "Invalid challenge authentication"); - log (LOG_DEBUG, "%s: Invalid authentication for host '%s'\n", - __FUNCTION__, t->hostname); -- c->needclose = -1; - return -EINVAL; - } - } -@@ -546,7 +535,6 @@ - log (LOG_WARN, "%s: No secret for authenticating to '%s'\n", - __FUNCTION__, t->hostname); - set_error (c, VENDOR_ERROR, "No secret key on our end"); -- c->needclose = -1; - return -EINVAL; - }; - } -@@ -606,7 +594,6 @@ - "Invalid challenge authentication"); - log (LOG_DEBUG, "%s: Invalid authentication for host '%s'\n", - __FUNCTION__, t->hostname); -- c->needclose = -1; - return -EINVAL; - } - } -@@ -1584,6 +1571,14 @@ - wbuf[pos++] = e; - for (x = 0; x < buf->len; x++) - { -+ // we must at least still have 4 bytes left in the worst case scenario: -+ // 1 for a possible escape, 1 for the value and 1 to end the PPP stream. -+ if(pos >= (sizeof(wbuf) - 4)) { -+ if(DEBUG) -+ log(LOG_CRIT, "%s: rx packet is too big after PPP encoding (size %u, max is %u)\n", -+ __FUNCTION__, buf->len, MAX_RECV_SIZE); -+ return -EINVAL; -+ } - e = *((char *) buf->start + x); - if ((e < 0x20) || (e == PPP_ESCAPE) || (e == PPP_FLAG)) - { -@@ -1592,7 +1587,6 @@ - wbuf[pos++] = PPP_ESCAPE; - } - wbuf[pos++] = e; -- - } - wbuf[pos++] = PPP_FLAG; - x = write (c->fd, wbuf, pos); ---- l2tpd-0.70-pre20031121.orig/misc.h -+++ l2tpd-0.70-pre20031121/misc.h -@@ -80,4 +80,11 @@ - extern void safe_copy (char *, char *, int); - extern void opt_destroy (struct ppp_opts *); - extern struct ppp_opts *add_opt (struct ppp_opts *, char *, ...); -+extern u_int16_t get16(u_int8_t *); -+extern u_int32_t get32(u_int8_t *); -+extern u_int64_t get64(u_int8_t *); -+extern void set16(u_int8_t *, u_int16_t); -+extern void set32(u_int8_t *, u_int32_t); -+extern void set64(u_int8_t *, u_int64_t); -+ - #endif ---- l2tpd-0.70-pre20031121.orig/avp.h -+++ l2tpd-0.70-pre20031121/avp.h -@@ -19,22 +19,35 @@ - - struct avp_hdr - { -- _u16 length; -- _u16 vendorid; -- _u16 attr; -+ u_int16_t length; -+ u_int16_t vendorid; -+ u_int16_t attr; - }; - -+#define AVP_F_MANDATORY 0x1 -+#define AVP_F_FIXLEN 0x2 -+#define AVP_F_ASCII 0x4 -+ - struct avp - { -- int num; /* Number of AVP */ -- int m; /* Set M? */ -- int (*handler) (struct tunnel *, struct call *, void *, int); -- /* This should handle the AVP -- taking a tunnel, call, the data, -- and the length of the AVP as -- parameters. Should return 0 -- upon success */ -- char *description; /* A name, for debugging */ -+ u_int32_t num; /* Number of AVP */ -+ u_int32_t flags; -+ u_int32_t sz; /* expected avp payload size as -+ * (AVP_F_FIXLEN) ? (==) : (!>=) -+ * note: size checked is performed -+ * after unhiding */ -+ u_int8_t allowed_states[8]; /* List of allowed message types for -+ * a particular avp. Fixed len for -+ * alignement issues. */ -+ -+ /* This should handle the AVP taking a tunnel, call, -+ * the data, and the length of the AVP as parameters. -+ * Should return 0 upon success */ -+ int (*handle) (struct tunnel *, struct call *, void *, int); -+ -+ /* This should handle avp specifics sanity checks */ -+ int (*validate) (int, struct tunnel *, struct call *, void *, int); -+ char *description; /* A name, for debugging */ - }; - - extern int handle_avps (struct buffer *buf, struct tunnel *t, struct call *c); -@@ -84,8 +97,56 @@ - #define RESULT_CLEAR 1 - #define RESULT_ERROR 2 - #define RESULT_EXISTS 3 -+ -+/* avp id's */ -+#define MESSAGE_TYPE_AVP 0 -+#define RESULT_CODE_AVP 1 -+#define PROTOCOL_VERSION_AVP 2 -+#define FRAMING_CAP_AVP 3 -+#define BEARER_CAP_AVP 4 -+#define TIE_BREAKER_AVP 5 -+#define FIRMWARE_REV_AVP 6 -+#define HOSTNAME_AVP 7 -+#define VENDOR_NAME_AVP 8 -+#define ASSIGNED_TUN_ID_AVP 9 -+#define RX_WIN_SIZE_AVP 10 -+#define CHALLENGE_AVP 11 -+#define CHALLENGE_RESP_AVP 12 -+#define CAUSE_ERROR_AVP 13 -+#define ASSIGNED_SES_ID_AVP 14 -+#define SERIAL_NUMBER_AVP 15 -+#define MIN_BPS_AVP 16 -+#define MAX_BPS_AVP 17 -+#define BEARER_TYPE_AVP 18 -+#define FRAMING_TYPE_AVP 19 -+#define PACKET_DELAY_AVP 20 -+#define CALLED_NUMBER_AVP 21 -+#define CALLING_NUMBER_AVP 22 -+#define SUB_ADDRESS_AVP 23 -+#define TX_CONNECT_SPEED_AVP 24 -+#define PHYS_CHAN_ID_AVP 25 -+#define INIT_RX_LCP_AVP 26 -+#define LAST_TX_LCP_AVP 27 -+#define LAST_RX_LCP_AVP 28 -+#define PROXY_AUTH_TYPE_AVP 29 -+#define PROXY_AUTH_NAME_AVP 30 -+#define PROXY_AUTH_CHAL_AVP 31 -+#define PROXY_AUTH_ID_AVP 32 -+#define PROXY_AUTH_CHAL_RESP_AVP 33 -+#define CALL_ERROR_AVP 34 -+#define ACCM_AVP 35 -+#define RANDOM_VECTOR_AVP 36 -+#define PRIV_GROUP_ID_AVP 37 -+#define RX_CONNECT_SPEED_AVP 38 -+#define SEQ_REQUIRED_AVP 39 -+#define AVP_MAX SEQ_REQUIRED_AVP -+ -+extern int validate_msgtype_avp(int, struct tunnel *, struct call *, void *, int); -+extern int validate_gen_avp(int, struct tunnel *, struct call *, void *, int); -+ - extern void encrypt_avp (struct buffer *, _u16, struct tunnel *); - extern int decrypt_avp (char *, struct tunnel *); -+ - extern int message_type_avp (struct tunnel *, struct call *, void *, int); - extern int protocol_version_avp (struct tunnel *, struct call *, void *, int); - extern int framing_caps_avp (struct tunnel *, struct call *, void *, int); -@@ -97,12 +158,12 @@ - extern int receive_window_size_avp (struct tunnel *, struct call *, void *, - int); - extern int result_code_avp (struct tunnel *, struct call *, void *, int); --extern int assigned_call_avp (struct tunnel *, struct call *, void *, int); -+extern int assigned_session_avp (struct tunnel *, struct call *, void *, int); - extern int call_serno_avp (struct tunnel *, struct call *, void *, int); - extern int bearer_type_avp (struct tunnel *, struct call *, void *, int); - extern int call_physchan_avp (struct tunnel *, struct call *, void *, int); --extern int dialed_number_avp (struct tunnel *, struct call *, void *, int); --extern int dialing_number_avp (struct tunnel *, struct call *, void *, int); -+extern int called_number_avp (struct tunnel *, struct call *, void *, int); -+extern int calling_number_avp (struct tunnel *, struct call *, void *, int); - extern int sub_address_avp (struct tunnel *, struct call *, void *, int); - extern int frame_type_avp (struct tunnel *, struct call *, void *, int); - extern int rx_speed_avp (struct tunnel *, struct call *, void *, int); -@@ -118,7 +179,7 @@ - extern int add_avp_rws (struct buffer *, _u16); - extern int add_tunnelid_avp (struct buffer *, _u16); - extern int add_vendor_avp (struct buffer *); --extern int add_hostname_avp (struct buffer *); -+extern int add_hostname_avp (struct buffer *, struct tunnel*); - extern int add_firmware_avp (struct buffer *); - extern int add_bearer_caps_avp (struct buffer *buf, _u16 caps); - extern int add_frame_caps_avp (struct buffer *buf, _u16 caps); ---- l2tpd-0.70-pre20031121.orig/network.c -+++ l2tpd-0.70-pre20031121/network.c -@@ -214,6 +214,8 @@ - t->self->needclose = -1; - } - } -+ free(buf->rstart); -+ free(buf); - } - else - { -@@ -371,7 +373,9 @@ - if (debug_network) - { - log (LOG_DEBUG, "%s: recv packet from %s, size = %d," \ --"tunnel = %d, call = %d\n", __FUNCTION__, inet_ntoa (from.sin_addr), recvsize, tunnel, call); -+ "tunnel = %d, call = %d\n", __func__, -+ inet_ntoa (from.sin_addr), recvsize, -+ tunnel, call); - } - if (packet_dump) - { ---- l2tpd-0.70-pre20031121.orig/aaa.c -+++ l2tpd-0.70-pre20031121/aaa.c -@@ -209,9 +209,11 @@ - __FUNCTION__, u, t, s); - #endif - strncpy (secret, s, size); -+ fclose(f); - return -1; - } - } -+ fclose(f); - return 0; - } - ---- l2tpd-0.70-pre20031121.orig/l2tpd.c -+++ l2tpd-0.70-pre20031121/l2tpd.c -@@ -266,6 +266,9 @@ - /* erase pid file */ - unlink (gconfig.pidfile); - -+ /* erase control pipe */ -+ unlink(CONTROL_PIPE); -+ - exit (1); - } - -@@ -333,13 +336,17 @@ - tcgetattr (c->fd, &ptyconf); - *(c->oldptyconf) = ptyconf; - ptyconf.c_cflag &= ~(ICANON | ECHO); -- ptyconf.c_lflag &= ~ECHO; -+ ptyconf.c_lflag &= ~ECHO; - tcsetattr (c->fd, TCSANOW, &ptyconf); - - snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); - fd2 = open (tty, O_RDWR); -- stropt[pos++] = strdup(tty); -- stropt[pos] = NULL; -+ if(!fd2) -+ log(LOG_WARN, "unable to open tty %s", tty); -+ -+ /* XXX JEF: CHECK ME */ -+ stropt[pos++] = strdup(tty); -+ stropt[pos] = NULL; - - #ifdef USE_KERNEL - } -@@ -623,7 +630,13 @@ - { - struct lac *lac; - lac = (struct lac *) data; -- if (!lac->active) -+ -+ if (!lac) -+ { -+ log (LOG_WARN, "%s : called on NULL lac!\n", __FUNCTION__); -+ return; -+ } -+ if (!lac->active) - { - log (LOG_DEBUG, "%s: LAC %s not active", __FUNCTION__, lac->entname); - return; -@@ -635,11 +648,6 @@ - log (LOG_LOG, "%s: maximum retries exceeded.\n", __FUNCTION__); - return; - } -- if (!lac) -- { -- log (LOG_WARN, "%s : called on NULL lac!\n", __FUNCTION__); -- return; -- } - if (!lac->t) - { - #ifdef DEGUG_MAGIC -@@ -774,12 +782,7 @@ - void do_control () - { - char buf[1024]; -- char *host; -- char *tunstr; -- char *callstr; -- -- char *sub_str; /* jz: use by the strtok function */ -- char *tmp_ptr; /* jz: use by the strtok function */ -+ char *host, *tunstr, *callstr, *tmpstr; - struct lac *lac; - int call; - int tunl; -@@ -792,24 +795,39 @@ - if (buf[cnt - 1] == '\n') - buf[--cnt] = 0; - #ifdef DEBUG_CONTROL -- log (LOG_DEBUG, "%s: Got message %s (%d bytes long)\n", -+ log (LOG_DEBUG, "%s: Got message \"%s\" (%d bytes long)\n", - __FUNCTION__, buf, cnt); - #endif - switch (buf[0]) - { - case 't': -- host = strchr (buf, ' ') + 1; -+ host = strchr (buf, ' '); -+ if(!host) -+ goto out; -+ host++; - #ifdef DEBUG_CONTROL - log (LOG_DEBUG, "%s: Attempting to tunnel to %s\n", - __FUNCTION__, host); - #endif - l2tp_call (host, UDP_LISTEN_PORT, NULL, NULL); - break; -- case 'c': -- -- switch_io = 1; /* jz: Switch for Incoming - Outgoing Calls */ -- -- tunstr = strchr (buf, ' ') + 1; -+ case 'c': /* option 'c' for incoming call */ -+ case 'o': /* option 'o' for outgoing call */ -+ tunstr = strchr (buf, ' '); -+ if(!tunstr) -+ goto out; -+ tunstr++; -+ -+ if(buf[0] == 'c') -+ switch_io = 1; /* Switch for Incoming Calls */ -+ else { -+ switch_io = 0; /* Switch for Outgoing Calls */ -+ tmpstr = strchr(tunstr, ' '); -+ if(!tmpstr) -+ goto out; -+ strncpy(dial_no_tmp,tmpstr, sizeof(*dial_no_tmp)); -+ } -+ - lac = laclist; - while (lac) - { -@@ -842,52 +860,12 @@ - #endif - lac_call (tunl, NULL, NULL); - break; -- -- case 'o': /* jz: option 'o' for doing a outgoing call */ -- -- switch_io = 0; /* jz: Switch for incoming - outgoing Calls */ -- -- sub_str = strchr (buf, ' ') + 1; -- -- tunstr = strtok (sub_str, " "); /* jz: using strtok function to get */ -- tmp_ptr = strtok (NULL, " "); /* params out of the pipe */ -- strcpy (dial_no_tmp, tmp_ptr); -- -- lac = laclist; -- while (lac) -- { -- if (!strcasecmp (lac->entname, tunstr)) -- { -- lac->active = -1; -- lac->rtries = 0; -- if (!lac->c) -- magic_lac_dial (lac); -- else -- log (LOG_DEBUG, -- "%s: Session '%s' already active!\n", -- __FUNCTION__, lac->entname); -- break; -- } -- lac = lac->next; -- } -- if (lac) -- break; -- tunl = atoi (tunstr); -- if (!tunl) -- { -- log (LOG_DEBUG, "%s: No such tunnel '%s'\n", __FUNCTION__, -- tunstr); -- break; -- } --#ifdef DEBUG_CONTROL -- log (LOG_DEBUG, "%s: Attempting to call on tunnel %d\n", -- __FUNCTION__, tunl); --#endif -- lac_call (tunl, NULL, NULL); -- break; -- - case 'h': -- callstr = strchr (buf, ' ') + 1; -+ callstr = strchr (buf, ' '); -+ if(!callstr) -+ goto out; -+ callstr++; -+ - call = atoi (callstr); - #ifdef DEBUG_CONTROL - log (LOG_DEBUG, "%s: Attempting to call %d\n", __FUNCTION__, -@@ -896,7 +874,11 @@ - lac_hangup (call); - break; - case 'd': -- tunstr = strchr (buf, ' ') + 1; -+ tunstr = strchr (buf, ' '); -+ if(!tunstr) -+ goto out; -+ tunstr++; -+ - lac = laclist; - while (lac) - { -@@ -937,6 +919,8 @@ - } - } - } -+ -+out: - /* Otherwise select goes nuts */ - close (control_fd); - control_fd = open (CONTROL_PIPE, O_RDONLY | O_NONBLOCK, 0600); -@@ -1002,7 +986,6 @@ - int pid=0; - int i,l; - char buf[STRLEN]; -- int pidfilewritten=0; - - if((pid = fork()) < 0) { - log(LOG_LOG, "%s: Unable to fork ()\n",__FUNCTION__); -@@ -1012,56 +995,52 @@ - else if (pid) - exit(0); - -- close(0); -- close(1); -- close(2); -+ -+ close(0); -+ close(1); -+ close(2); -+ dup2(open("/dev/null", O_RDONLY), 0); -+ dup2(open("/dev/null", O_RDONLY), 1); -+ dup2(open("/dev/null", O_RDONLY), 2); - - /* Read previous pid file. */ -- if ((i = open(gconfig.pidfile,O_RDONLY)) > 0) { -- l=read(i,buf,sizeof(buf)-1); -- if (i < 0) { -- log(LOG_LOG, "%s: Unable to read pid file [%s]\n", -- __FUNCTION__, gconfig.pidfile); -- } -- buf[i] = '\0'; -- pid = atoi(buf); -- -- /* If the previous server process is not still running, -- write a new pid file immediately. */ -- if (pid && (pid == getpid () || kill (pid, 0) < 0)) { -- unlink (gconfig.pidfile); -- if ((i = open (gconfig.pidfile, O_WRONLY | O_CREAT, 0640)) >= 0) -- { -- snprintf (buf, sizeof(buf), "%d\n", (int)getpid()); -- write (i, buf, strlen(buf)); -- close (i); -- pidfilewritten = 1; -- } -+ if((i = open(gconfig.pidfile,O_RDONLY)) > 0) { -+ l=read(i,buf,sizeof(buf)-1); -+ if (l >= 0) { -+ buf[l] = '\0'; -+ pid = atoi(buf); - } -- else -- { -+ close(i); -+ -+ /* if pid is read and process exist exit */ -+ if(pid && !kill(pid, 0)) { - log(LOG_LOG, "%s: There's already a l2tpd server running.\n", - __FUNCTION__); - close(server_socket); - exit(1); - } -+ -+ /* remove stalled pid file */ -+ unlink(gconfig.pidfile); - } - - pid = setsid(); - -- if(! pidfilewritten) { -- unlink(gconfig.pidfile); -- if ((i = open (gconfig.pidfile, O_WRONLY | O_CREAT, 0640)) >= 0) { -- snprintf (buf, strlen(buf), "%d\n", (int)getpid()); -- write (i, buf, strlen(buf)); -- close (i); -- pidfilewritten = 1; -- } -- } -+ /* create new pid file */ -+ if ((i = open (gconfig.pidfile, O_WRONLY | O_CREAT, 0644)) >= 0) { -+ snprintf (buf, sizeof(buf), "%d", (int)getpid()); -+ write (i, buf, strlen(buf)); -+ close (i); -+ } -+ else { -+ log(LOG_LOG, "%s: could not write pid file %s error %d", -+ __FUNCTION__, gconfig.pidfile, i); -+ close(server_socket); -+ exit(1); -+ } - } - - -- - void init (int argc,char *argv[]) - { - struct lac *lac; -@@ -1103,10 +1082,6 @@ - } - log (LOG_LOG, "l2tpd version " SERVER_VERSION " started on %s PID:%d\n", - hostname, getpid ()); -- log (LOG_LOG, -- "Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.\n"); -- log (LOG_LOG, "Forked by Scott Balmos and David Stipp, (C) 2001\n"); -- log (LOG_LOG, "Inherited by Jeff McAdams, (C) 2002\n"); - listenaddr.s_addr = gconfig.listenaddr; - log (LOG_LOG, "%s version %s on a %s, listening on IP address %s, port %d\n", uts.sysname, - uts.release, uts.machine, inet_ntoa(listenaddr), gconfig.port); ---- l2tpd-0.70-pre20031121.orig/misc.c -+++ l2tpd-0.70-pre20031121/misc.c -@@ -301,3 +301,42 @@ - return -1; - } - } -+ -+u_int16_t get16(u_int8_t *p) { -+ return p[0] << 8 | p[1]; -+} -+ -+u_int32_t get32(u_int8_t *p) { -+ return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; -+} -+ -+u_int64_t get64(u_int8_t *p) { -+ return (u_int64_t)p[0] << 56 | (u_int64_t)p[1] << 48 | -+ (u_int64_t)p[2] << 40 | (u_int64_t)p[3] << 32 | -+ (u_int64_t)p[4] << 24 | (u_int64_t)p[5] << 16 | -+ (u_int64_t)p[6] << 8 | (u_int64_t)p[7]; -+} -+ -+void set16(u_int8_t *cp, u_int16_t x) { -+ *cp++ = x >> 8; -+ *cp = x & 0xff; -+} -+ -+void set32(u_int8_t *cp, u_int32_t x) { -+ *cp++ = x >> 24; -+ *cp++ = (x >> 16) & 0xff; -+ *cp++ = (x >> 8) & 0xff; -+ *cp = x & 0xff; -+} -+ -+void set64(u_int8_t *cp, u_int64_t x) { -+ *cp++ = x >> 56; -+ *cp++ = (x >> 48) & 0xff; -+ *cp++ = (x >> 40) & 0xff; -+ *cp++ = (x >> 32) & 0xff; -+ *cp++ = (x >> 24) & 0xff; -+ *cp++ = (x >> 16) & 0xff; -+ *cp++ = (x >> 8) & 0xff; -+ *cp = x & 0xff; -+} -+ ---- l2tpd-0.70-pre20031121.orig/avp.c -+++ l2tpd-0.70-pre20031121/avp.c -@@ -4,9 +4,12 @@ - * Layer Two Tunnelling Protocol Daemon - * Copyright (C) 1998 Adtran, Inc. - * Copyright (C) 2002 Jeff McAdams -+ * Copyright (C) 2003 Jean-Francois Dive - * - * Mark Spencer - * -+ * 12/2003 parsing sanitization, Jean-Francois Dive -+ * - * This software is distributed under the terms - * of the GPL, which you should have received - * along with this source. -@@ -20,50 +23,53 @@ - #include - #include "l2tp.h" - --#define AVP_MAX 39 -+/* TODO: -+ * - Tie breaker. -+ * - Clean Proxy Authentication solution. -+ */ - -+/*****************************************************************************/ - struct avp avps[] = { -- -- {0, 1, &message_type_avp, "Message Type"}, -- {1, 1, &result_code_avp, "Result Code"}, -- {2, 1, &protocol_version_avp, "Protocol Version"}, -- {3, 1, &framing_caps_avp, "Framing Capabilities"}, -- {4, 1, &bearer_caps_avp, "Bearer Capabilities"}, -- {5, 0, NULL, "Tie Breaker"}, -- {6, 0, &firmware_rev_avp, "Firmware Revision"}, -- {7, 0, &hostname_avp, "Host Name"}, -- {8, 1, &vendor_avp, "Vendor Name"}, -- {9, 1, &assigned_tunnel_avp, "Assigned Tunnel ID"}, -- {10, 1, &receive_window_size_avp, "Receive Window Size"}, -- {11, 1, &challenge_avp, "Challenge"}, -- {12, 0, NULL, "Q.931 Cause Code"}, -- {13, 1, &chalresp_avp, "Challenge Response"}, -- {14, 1, &assigned_call_avp, "Assigned Call ID"}, -- {15, 1, &call_serno_avp, "Call Serial Number"}, -- {16, 1, NULL, "Minimum BPS"}, -- {17, 1, NULL, "Maximum BPS"}, -- {18, 1, &bearer_type_avp, "Bearer Type"}, -- {19, 1, &frame_type_avp, "Framing Type"}, -- {20, 1, &packet_delay_avp, "Packet Processing Delay"}, -- {21, 1, &dialed_number_avp, "Dialed Number"}, -- {22, 1, &dialing_number_avp, "Dialing Number"}, -- {23, 1, &sub_address_avp, "Sub-Address"}, -- {24, 1, &tx_speed_avp, "Transmit Connect Speed"}, -- {25, 1, &call_physchan_avp, "Physical channel ID"}, -- {26, 0, NULL, "Initial Received LCP Confreq"}, -- {27, 0, NULL, "Last Sent LCP Confreq"}, -- {28, 0, NULL, "Last Received LCP Confreq"}, -- {29, 1, &ignore_avp, "Proxy Authen Type"}, -- {30, 0, &ignore_avp, "Proxy Authen Name"}, -- {31, 0, &ignore_avp, "Proxy Authen Challenge"}, -- {32, 0, &ignore_avp, "Proxy Authen ID"}, -- {33, 1, &ignore_avp, "Proxy Authen Response"}, -- {34, 1, NULL, "Call Errors"}, -- {35, 1, &ignore_avp, "ACCM"}, -- {36, 1, &rand_vector_avp, "Random Vector"}, -- {37, 1, NULL, "Private Group ID"}, -- {38, 0, &rx_speed_avp, "Receive Connect Speed"}, -- {39, 1, &seq_reqd_avp, "Sequencing Required"} -+ {0, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {0}, &message_type_avp, &validate_msgtype_avp, "Message Type"}, -+ {1, AVP_F_MANDATORY, MAXSTRLEN, {CDN, StopCCN}, &result_code_avp, &validate_gen_avp, "Result Code"}, -+ {2, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {SCCRP, SCCRQ}, &protocol_version_avp, &validate_gen_avp, "Protocol Version"}, -+ {3, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {SCCRP, SCCRQ}, &framing_caps_avp, &validate_gen_avp, "Framing Capabilities"}, -+ {4, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {SCCRP, SCCRQ}, &bearer_caps_avp, &validate_gen_avp, "Bearer Capabilities"}, -+ {5, 0, 0, {0}, NULL, NULL, "Tie Breaker"}, -+ {6, AVP_F_FIXLEN, 2, {SCCRP, SCCRQ}, &firmware_rev_avp, &validate_gen_avp, "Firmware Revision"}, -+ {7, AVP_F_ASCII, MAXSTRLEN, {SCCRP, SCCRQ}, &hostname_avp, &validate_gen_avp, "Host Name"}, -+ {8, AVP_F_MANDATORY|AVP_F_ASCII, MAXSTRLEN, {SCCRP, SCCRQ}, &vendor_avp, &validate_gen_avp, "Vendor Name"}, -+ {9, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {SCCRP, SCCRQ, StopCCN}, &assigned_tunnel_avp, &validate_gen_avp, "Assigned Tunnel ID"}, -+ {10, AVP_F_MANDATORY|AVP_F_FIXLEN, 2,{SCCRP, SCCRQ, OCRP, OCCN, StopCCN}, &receive_window_size_avp, &validate_gen_avp, "Receive Window Size"}, -+ {11, AVP_F_MANDATORY, 128, {SCCRP, SCCRQ}, &challenge_avp, &validate_gen_avp, "Challenge"}, -+ {12, 0, 0, {0}, NULL, NULL, "Q.931 Cause Code"}, -+ {13, AVP_F_MANDATORY, MD_SIG_SIZE, {SCCRP, SCCCN}, &chalresp_avp, &validate_gen_avp, "Challenge Response"}, -+ {14, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {CDN, ICRP, ICRQ, OCRP, OCRQ}, &assigned_session_avp, &validate_gen_avp, "Assigned Session ID"}, -+ {15, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICRQ, OCRQ}, &call_serno_avp, &validate_gen_avp, "Call Serial Number"}, -+ {16, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {0}, NULL, NULL, "Minimum BPS"}, -+ {17, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {0}, NULL, NULL, "Maximum BPS"}, -+ {18, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICRQ, OCRQ}, &bearer_type_avp, &validate_gen_avp, "Bearer Type"}, -+ {19, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICCN, OCRQ, OCCN}, &frame_type_avp, &validate_gen_avp, "Framing Type"}, -+ {20, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {ICRP, OCRQ, ICCN, OCRP, OCCN}, &packet_delay_avp, &validate_gen_avp, "Packet Processing Delay"}, -+ {21, AVP_F_MANDATORY|AVP_F_ASCII, MAXSTRLEN, {ICRQ, OCRQ}, &called_number_avp, &validate_gen_avp, "Called Number"}, -+ {22, AVP_F_MANDATORY|AVP_F_ASCII, MAXSTRLEN, {ICRQ}, &calling_number_avp, &validate_gen_avp, "Calling Number"}, -+ {23, AVP_F_MANDATORY|AVP_F_ASCII, MAXSTRLEN, {OCRP, ICRQ}, &sub_address_avp, &validate_gen_avp, "Sub-Address"}, -+ {24, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICCN, OCCN, OCRP}, &tx_speed_avp, &validate_gen_avp, "Transmit Connect Speed"}, -+ {25, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICRQ, OCRQ, OCRP, OCCN}, &call_physchan_avp, &validate_gen_avp, "Physical channel ID"}, -+ {26, 0, 0, {0}, NULL, NULL, "Initial Received LCP Confreq"}, -+ {27, 0, 0, {0}, NULL, NULL, "Last Sent LCP Confreq"}, -+ {28, 0, 0, {0}, NULL, NULL, "Last Received LCP Confreq"}, -+ {29, AVP_F_MANDATORY, 0, {0}, &ignore_avp, NULL, "Proxy Authen Type"}, -+ {30, 0, 0, {0}, &ignore_avp, NULL, "Proxy Authen Name"}, -+ {31, 0, 0, {0}, &ignore_avp, NULL, "Proxy Authen Challenge"}, -+ {32, 0, 0, {0}, &ignore_avp, NULL, "Proxy Authen ID"}, -+ {33, AVP_F_MANDATORY, 0, {0}, &ignore_avp, NULL, "Proxy Authen Response"}, -+ {34, AVP_F_MANDATORY|AVP_F_FIXLEN, 26, {0}, NULL, NULL, "Call Errors"}, -+ {35, AVP_F_MANDATORY|AVP_F_FIXLEN, 10, {0}, &ignore_avp, NULL, "ACCM"}, -+ {36, AVP_F_MANDATORY, 1024, {0}, &rand_vector_avp, &validate_gen_avp, "Random Vector"}, -+ {37, AVP_F_MANDATORY, 0, {0}, NULL, NULL, "Private Group ID"}, -+ {38, AVP_F_FIXLEN, 4, {ICCN, OCCN, OCRP}, &rx_speed_avp, &validate_gen_avp, "Receive Connect Speed"}, -+ {39, AVP_F_MANDATORY, 0, {ICCN, OCCN, OCRP}, &seq_reqd_avp, &validate_gen_avp, "Sequencing Required"} - }; - - char *msgtypes[] = { -@@ -111,6 +117,7 @@ - "Call was connected but no appropriate framing was detect" - }; - -+/*****************************************************************************/ - void wrong_length (struct call *c, char *field, int expected, int found, - int min) - { -@@ -126,12 +133,9 @@ - c->needclose = -1; - } - --/* -- * t, c, data, and datalen may be assumed to be defined for all avp's -- */ -- --int message_type_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+/*****************************************************************************/ -+int validate_msgtype_avp(int attr, struct tunnel *t, struct call *c, -+ void *data, int datalen) - { - /* - * This will be with every control message. It is critical that this -@@ -139,28 +143,9 @@ - * (assuming sanity check) - */ - -- _u16 *raw = data; -- c->msgtype = ntohs (raw[3]); -- if (datalen != 8) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s: wrong size (%d != 8)\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Message Type", 8, datalen, 0); -- return -EINVAL; -- } -- if ((c->msgtype > MAX_MSG) || (!msgtypes[c->msgtype])) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s: unknown message type %d\n", __FUNCTION__, -- c->msgtype); -- return -EINVAL; -- } -- if (debug_avp) -- if (DEBUG) -- log (LOG_DEBUG, "%s: message type %d (%s)\n", __FUNCTION__, -- c->msgtype, msgtypes[c->msgtype]); --#ifdef SANITY -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ c->msgtype = get16(p); -+ - if (t->sanity) - { - /* -@@ -172,11 +157,11 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate tunnel inside a call!\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - -- switch (c->msgtype) -+ switch (get16(p)) - { - case SCCRQ: - if ((t->state != 0) && (t->state != SCCRQ)) -@@ -189,7 +174,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate SCCRQ with state != 0\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -199,7 +184,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate SCCRP with state != SCCRQ!\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -209,7 +194,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate SCCCN with state != SCCRP!\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -219,7 +204,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate ICRQ when state != SCCCN\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - if (c != t->self) -@@ -227,7 +212,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate ICRQ on a call!\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -237,7 +222,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate ICRP on tunnel!=SCCCN\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - if (c->state != ICRQ) -@@ -245,7 +230,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate ICRP when state != ICRQ\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -255,7 +240,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate ICCN when state != ICRP\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -265,7 +250,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate SLI when state != ICCN\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -275,7 +260,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate OCRP on tunnel!=SCCCN\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - if (c->state != OCRQ) -@@ -283,7 +268,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate OCRP when state != OCRQ\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -294,7 +279,7 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: attempting to negotiate OCCN when state != OCRQ\n", -- __FUNCTION__); -+ __func__); - return -EINVAL; - } - break; -@@ -303,72 +288,33 @@ - case Hello: - break; - default: -- log (LOG_WARN, "%s: i don't know how to handle %s messages\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return -EINVAL; -- } -- } --#endif -- if (c->msgtype == ICRQ) -- { -- struct call *tmp; -- if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s: new incoming call\n", __FUNCTION__); -- } -- tmp = new_call (t); -- if (!tmp) -- { -- log (LOG_WARN, "%s: unable to create new call\n", __FUNCTION__); -+ log (LOG_WARN, "%s: unknown messages type %d\n", -+ __func__, get16(p)); - return -EINVAL; - } -- tmp->next = t->call_head; -- t->call_head = tmp; -- t->count++; -- /* -- * Is this still safe to assume that the head will always -- * be the most recent call being negotiated? -- * Probably... FIXME anyway... -- */ -- - } -- return 0; -+ return 0; - } - --int rand_vector_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) --{ -- int size; -- _u16 *raw = (_u16 *) data; -- size = (raw[0] & 0x0FFF) - 6; -- if (t->sanity) -- { -- if (size < 0) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s: Random vector too small (%d < 0)\n", -- __FUNCTION__, size); -- wrong_length (c, "Random Vector", 6, datalen, 1); -- return -EINVAL; -- } -- if (size > MAX_VECTOR_SIZE) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s: Random vector too large (%d > %d)\n", -- __FUNCTION__, datalen, MAX_VECTOR_SIZE); -- wrong_length (c, "Random Vector", 6, datalen, 1); -- return -EINVAL; -- } -- } -- if (debug_avp) -- log (LOG_DEBUG, "%s: Random Vector of %d octets\n", __FUNCTION__, -- size); -- t->chal_us.vector = (unsigned char *) &raw[3]; -- t->chal_us.vector_len = size; -- return 0; -+/*****************************************************************************/ -+int validate_gen_avp(int attr, struct tunnel *t, struct call *c, -+ void *data, int datalen) { -+ (void)data; (void)datalen; -+ int i = 0, found = 0; -+ -+ if(t->sanity) { -+ for(i = 0; i < 8; i++) { -+ if(c->msgtype == avps[attr].allowed_states[i]) -+ found++; -+ } -+ if(!found) -+ return -EINVAL; -+ } -+ return 0; - } - -+/* t, c, data, and datalen may be assumed to be defined for all avp's */ -+/*****************************************************************************/ - int ignore_avp (struct tunnel *t, struct call *c, void *data, int datalen) - { - /* -@@ -383,94 +329,88 @@ - * - */ - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s : Ignoring AVP\n", __FUNCTION__); -- } -+ log (LOG_DEBUG, "%s : Ignoring AVP\n", __func__); - return 0; - } - --int seq_reqd_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int message_type_avp (struct tunnel *t, struct call *c, void *data, -+ int avplen) - { --#ifdef SANITY -- if (t->sanity) -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ -+ if(!c->msgtype) -+ c->msgtype = get16(p); -+ -+ if ((c->msgtype > MAX_MSG) || (!msgtypes[c->msgtype])) - { -- if (datalen != 6) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is incorrect size. %d != 6\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Sequencing Required", 6, datalen, 1); -- return -EINVAL; -- } -- switch (c->msgtype) -+ log (LOG_DEBUG, "%s: unknown message type %d\n", __func__, -+ c->msgtype); -+ return -EINVAL; -+ } -+ if (debug_avp) -+ log (LOG_DEBUG, "%s: message type %d (%s)\n", __func__, -+ c->msgtype, msgtypes[c->msgtype]); -+ if (c->msgtype == ICRQ) -+ { -+ struct call *tmp; -+ if (debug_avp) -+ log (LOG_DEBUG, "%s: new incoming call\n", __func__); -+ tmp = new_call (t); -+ if (!tmp) - { -- case ICCN: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: sequencing required not appropriate for %s!\n", -- __FUNCTION__, msgtypes[c->msgtype]); -+ log (LOG_WARN, "%s: unable to create new call\n", __func__); - return -EINVAL; - } -+ tmp->next = t->call_head; -+ t->call_head = tmp; -+ t->count++; -+ /* -+ * Is this still safe to assume that the head will always -+ * be the most recent call being negotiated? -+ * Probably... FIXME anyway... -+ */ - } --#endif -+ return 0; -+} -+ -+/*****************************************************************************/ -+int rand_vector_avp (struct tunnel *t, struct call *c, void *data, -+ int avplen) -+{ -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ int datalen = avplen - sizeof(struct avp_hdr); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s: peer requires sequencing.\n", __FUNCTION__); -- } -+ log (LOG_DEBUG, "%s: random vector len %d\n", __func__, datalen); -+ t->chal_us.vector = (unsigned char *)p; -+ t->chal_us.vector_len = datalen; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int seq_reqd_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+{ -+ if (debug_avp) -+ log (LOG_DEBUG, "%s: peer requires sequencing.\n", __func__); - c->seq_reqd = -1; - return 0; - } - -+/*****************************************************************************/ - int result_code_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * Find out what version of l2tp the other side is using. -- * I'm not sure what we're supposed to do with this but whatever.. -- */ -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ int datalen = avplen - sizeof(struct avp_hdr); -+ u_int16_t result = get16(p); -+ u_int16_t error = get16(p + 2); - -- int error; -- int result; -- _u16 *raw = data; --#ifdef SANITY -- if (t->sanity) -- { -- if (datalen < 10) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is incorrect size. %d < 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Result Code", 10, datalen, 1); -- return -EINVAL; -- } -- switch (c->msgtype) -- { -- case CDN: -- case StopCCN: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: result code not appropriate for %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- } --#endif -- result = ntohs (raw[3]); -- error = ntohs (raw[4]); - if ((c->msgtype == StopCCN) && ((result > 7) || (result < 1))) - { - if (DEBUG) - log (LOG_DEBUG, -- "%s: result code out of range (%d %d %d). Ignoring.\n", -- __FUNCTION__, result, error, datalen); -+ "%s: (StopCCN) result code out of range ! (1 < %d < 7)\n", -+ __func__, result); - return 0; - } - -@@ -478,1112 +418,348 @@ - { - if (DEBUG) - log (LOG_DEBUG, -- "%s: result code out of range (%d %d %d). Ignoring.\n", -- __FUNCTION__, result, error, datalen); -+ "%s: (CDN) result code out of range !(1 < %d < 11)\n", -+ __func__, result); - return 0; - } - - c->error = error; - c->result = result; -- safe_copy (c->errormsg, (char *) &raw[5], datalen - 10); -+ memcpy(c->errormsg, (char*)p + 4, datalen - 4); -+ c->errormsg[datalen - 4] = '\0'; -+ - if (debug_avp) - { -- if (DEBUG && (c->msgtype == StopCCN)) -+ if(c->msgtype == StopCCN) - { - log (LOG_DEBUG, - "%s: peer closing for reason %d (%s), error = %d (%s)\n", -- __FUNCTION__, result, stopccn_result_codes[result], error, -+ __func__, result, stopccn_result_codes[result], error, - c->errormsg); - } - else - { - log (LOG_DEBUG, - "%s: peer closing for reason %d (%s), error = %d (%s)\n", -- __FUNCTION__, result, cdn_result_codes[result], error, -+ __func__, result, cdn_result_codes[result], error, - c->errormsg); - } - } - return 0; - } - -+/*****************************************************************************/ - int protocol_version_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * Find out what version of l2tp the other side is using. -- * I'm not sure what we're supposed to do with this but whatever.. -- */ -+ u_int8_t *p = data + sizeof(struct avp_hdr); - -- int ver; -- _u16 *raw = data; --#ifdef SANITY -- if (t->sanity) -- { -- if (datalen != 8) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is incorrect size. %d != 8\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Protocol Version", 8, datalen, 1); -- return -EINVAL; -- } -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: protocol version not appropriate for %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- } --#endif -- ver = ntohs (raw[3]); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer is using version %d, revision %d.\n", __FUNCTION__, -- (ver >> 8), ver & 0xFF); -- } -+ log (LOG_DEBUG, "%s: peer is using version %d, revision %d.\n", -+ __func__,*p, *(p+1)); - return 0; - } - -+/*****************************************************************************/ - int framing_caps_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * Retrieve the framing capabilities -- * from the peer -- */ -- -- int caps; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ u_int16_t caps = get16(p + 2); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: framing capabilities not appropriate for %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 10) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is incorrect size. %d != 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Framming Capabilities", 10, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- caps = ntohs (raw[4]); - if (debug_avp) -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: supported peer frames:%s%s\n", __FUNCTION__, -- caps & ASYNC_FRAMING ? " async" : "", -- caps & SYNC_FRAMING ? " sync" : ""); -+ log (LOG_DEBUG, "%s: supported peer frames:%s %s\n", __func__, -+ caps & ASYNC_FRAMING ? "async" : "", -+ caps & SYNC_FRAMING ? "sync" : ""); -+ - t->fc = caps & (ASYNC_FRAMING | SYNC_FRAMING); - return 0; - } - -+/*****************************************************************************/ - int bearer_caps_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * What kind of bearer channels does our peer support? -- */ -- int caps; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ u_int16_t caps = get16(p + 2); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: bearer capabilities not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 10) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is incorrect size. %d != 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Bearer Capabilities", 10, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- caps = ntohs (raw[4]); - if (debug_avp) -- { -- if (DEBUG) -- { -- log (LOG_DEBUG, -- "%s: supported peer bearers:%s%s\n", -- __FUNCTION__, -- caps & ANALOG_BEARER ? " analog" : "", -- caps & DIGITAL_BEARER ? " digital" : ""); -- } -+ log (LOG_DEBUG, "%s: supported peer bearers:%s %s\n", -+ __func__, -+ caps & ANALOG_BEARER ? "analog" : "", -+ caps & DIGITAL_BEARER ? "digital" : ""); - -- } - t->bc = caps & (ANALOG_BEARER | DIGITAL_BEARER); - return 0; - } - -- --/* FIXME: I need to handle tie breakers eventually */ -- -+/*****************************************************************************/ - int firmware_rev_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * Report and record remote firmware version -- */ -- int ver; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: firmware revision not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 8) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is incorrect size. %d != 8\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Firmware Revision", 8, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- ver = ntohs (raw[3]); -+ t->firmware = get16(p); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer reports firmware version %d (0x%.4x)\n", -- __FUNCTION__, ver, ver); -- } -- t->firmware = ver; -+ log (LOG_DEBUG, "%s: peer reports firmware version %d (0x%.4X)\n", -+ __func__, t->firmware, t->firmware); - return 0; - } - -+/*****************************************************************************/ - int bearer_type_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * What kind of bearer channel is the call on? -- */ -- int b; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case ICRQ: -- case OCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: bearer type not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 10) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is incorrect size. %d != 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Bearer Type", 10, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- b = ntohs (raw[4]); -+ t->call_head->bearer = get16(p + 2); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer bears:%s\n", __FUNCTION__, -- b & ANALOG_BEARER ? " analog" : "digital"); -- } -- t->call_head->bearer = b; -+ log (LOG_DEBUG, "%s: peer bears: %s\n", __func__, -+ (t->call_head->bearer & ANALOG_BEARER) ? "analog" : "digital"); - return 0; - } - --int frame_type_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int frame_type_avp (struct tunnel *t, struct call *c, void *data, int avplen) - { -- /* -- * What kind of frame channel is the call on? -- */ -- int b; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case ICCN: -- case OCRQ: -- case OCCN: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: frame type not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 10) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is incorrect size. %d != 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Frame Type", 10, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- b = ntohs (raw[4]); -+ c->frame = get16(p + 2); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer uses:%s frames\n", __FUNCTION__, -- b & ASYNC_FRAMING ? " async" : "sync"); -- } -- c->frame = b; -+ log (LOG_DEBUG, "%s: peer uses:%s frames\n", __func__, -+ (c->frame & ASYNC_FRAMING) ? "async" : "sync"); - return 0; - } - --int hostname_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int hostname_avp (struct tunnel *t, struct call *c, void *data, int avplen) - { -- /* -- * What is the peer's name? -- */ -- int size; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ int datalen = avplen - sizeof(struct avp_hdr); -+ -+ memcpy(t->hostname, p, datalen); -+ t->hostname[datalen] = '\0'; - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: hostname not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen < 6) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is too small. %d < 6\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Hostname", 6, datalen, 1); -- return -EINVAL; -- } -- } --#endif -- size = raw[0] & 0x0FFF; -- if (size > MAXSTRLEN - 1) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s: truncating reported hostname (size is %d)\n", -- __FUNCTION__, size); -- size = MAXSTRLEN - 1; -- } -- safe_copy (t->hostname, (char *) &raw[3], size - 6); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer reports hostname '%s'\n", __FUNCTION__, -- t->hostname); -- } -+ log (LOG_DEBUG, "%s: peer reports hostname '%s'\n", __func__, -+ t->hostname); -+ - return 0; - } - --int dialing_number_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+/*****************************************************************************/ -+int calling_number_avp (struct tunnel *t, struct call *c, void *data, -+ int avplen) - { -- /* -- * What is the peer's name? -- */ -- int size; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ int datalen = avplen - sizeof(struct avp_hdr); -+ -+ memcpy(t->call_head->dialing, p, datalen); -+ t->call_head->dialing[datalen] = '\0'; - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case ICRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: dialing number not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen < 6) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is too small. %d < 6\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Dialing Number", 6, datalen, 1); -- return -EINVAL; -- } -- } --#endif -- size = raw[0] & 0x0FFF; -- if (size > MAXSTRLEN - 1) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: truncating reported dialing number (size is %d)\n", -- __FUNCTION__, size); -- size = MAXSTRLEN - 1; -- } -- safe_copy (t->call_head->dialing, (char *) &raw[3], size); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer reports dialing number '%s'\n", __FUNCTION__, -- t->call_head->dialing); -- } -+ log (LOG_DEBUG, "%s: peer reports dialing number '%s'\n", __func__, -+ t->call_head->dialing); -+ - return 0; - } - --int dialed_number_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+/*****************************************************************************/ -+int called_number_avp (struct tunnel *t, struct call *c, void *data, -+ int avplen) - { -- /* -- * What is the peer's name? -- */ -- int size; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ int datalen = avplen - sizeof(struct avp_hdr); -+ -+ memcpy(t->call_head->dialed, p, datalen); -+ t->call_head->dialed[datalen] = '\0'; - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case OCRQ: -- case ICRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: dialed number not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen < 6) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is too small. %d < 6\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Dialed Number", 6, datalen, 1); -- return -EINVAL; -- } -- } --#endif -- size = raw[0] & 0x0FFF; -- if (size > MAXSTRLEN - 1) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: truncating reported dialed number (size is %d)\n", -- __FUNCTION__, size); -- size = MAXSTRLEN - 1; -- } -- safe_copy (t->call_head->dialed, (char *) &raw[3], size); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer reports dialed number '%s'\n", __FUNCTION__, -- t->call_head->dialed); -- } -+ log (LOG_DEBUG, "%s: peer reports dialed number '%s'\n", __func__, -+ t->call_head->dialed); -+ - return 0; - } - -+/*****************************************************************************/ - int sub_address_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * What is the peer's name? -- */ -- int size; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ int datalen = avplen - sizeof(struct avp_hdr); -+ -+ memcpy(t->call_head->subaddy, p, datalen); -+ t->call_head->subaddy[datalen] = '\0'; - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case OCRP: -- case ICRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: sub_address not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen < 6) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is too small. %d < 6\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Sub-address", 6, datalen, 1); -- return -EINVAL; -- } -- } --#endif -- size = raw[0] & 0x0FFF; -- if (size > MAXSTRLEN - 1) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: truncating reported sub address (size is %d)\n", -- __FUNCTION__, size); -- size = MAXSTRLEN - 1; -- } -- safe_copy (t->call_head->subaddy, (char *) &raw[3], size); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer reports subaddress '%s'\n", __FUNCTION__, -- t->call_head->subaddy); -- } -+ log (LOG_DEBUG, "%s: peer reports subaddress '%s'\n", __func__, -+ t->call_head->subaddy); - return 0; - } - --int vendor_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int vendor_avp (struct tunnel *t, struct call *c, void *data, int avplen) - { -- /* -- * What vendor makes the other end? -- */ -- int size; -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ int datalen = avplen - sizeof(struct avp_hdr); -+ -+ memcpy(t->vendor, p, datalen); -+ t->vendor[datalen] = '\0'; - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: vendor not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen < 6) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is too small. %d < 6\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Vendor", 6, datalen, 1); -- return -EINVAL; -- } -- } --#endif -- size = raw[0] & 0x0FFF; -- if (size > MAXSTRLEN - 1) -- { -- if (DEBUG) -- log (LOG_DEBUG, "%s: truncating reported vendor (size is %d)\n", -- __FUNCTION__, size); -- size = MAXSTRLEN - 1; -- } -- safe_copy (t->vendor, (char *) &raw[3], size); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer reports vendor '%s'\n", __FUNCTION__, t->vendor); -- } -+ log (LOG_DEBUG, "%s: peer reports vendor '%s'\n", __func__, t->vendor); - return 0; - } - --int challenge_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int challenge_avp (struct tunnel *t, struct call *c, void *data, int avplen) - { -- /* -- * We are sent a challenge -- */ -- _u16 *raw = data; -- int size; --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: challenge not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen < 6) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is too small. %d < 6\n", __FUNCTION__, -- datalen); -- wrong_length (c, "challenge", 6, datalen, 1); -- return -EINVAL; -- } -- } --#endif -- /* size = raw[0] & 0x0FFF; */ -- /* length field of AVP's is only 10 bits long, not 12 */ -- size = raw[0] & 0x03FF; -- size -= sizeof (struct avp_hdr); -- /* if (size != MD_SIG_SIZE) -- { -- log (LOG_DEBUG, "%s: Challenge is not the right length (%d != %d)\n", -- __FUNCTION__, size, MD_SIG_SIZE); -- return -EINVAL; -- } */ -- t->chal_us.challenge = malloc(size+1); -- if (t->chal_us.challenge == NULL) -- { -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ int datalen = avplen - sizeof(struct avp_hdr); -+ -+ t->chal_us.challenge = calloc(datalen, 1); -+ if (!t->chal_us.challenge) - return -ENOMEM; -- } -- memset(t->chal_us.challenge, 0, size+1); -- bcopy (&raw[3], (t->chal_us.challenge), size); -+ memcpy(t->chal_us.challenge, p, datalen); - t->chal_us.state = STATE_CHALLENGED; -+ - if (debug_avp) -- { -- log (LOG_DEBUG, "%s: challenge avp found\n", __FUNCTION__); -- } -+ log (LOG_DEBUG, "%s: challenge avp found\n", __func__); -+ - return 0; - } - --int chalresp_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int chalresp_avp (struct tunnel *t, struct call *c, void *data, int avplen) - { -- /* -- * We are sent a challenge -- */ -- _u16 *raw = data; -- int size; --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCCN: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: challenge response not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen < 6) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is too small. %d < 6\n", __FUNCTION__, -- datalen); -- wrong_length (c, "challenge", 6, datalen, 1); -- return -EINVAL; -- } -- } --#endif -- size = raw[0] & 0x0FFF; -- size -= sizeof (struct avp_hdr); -- if (size != MD_SIG_SIZE) -- { -- log (LOG_DEBUG, "%s: Challenge is not the right length (%d != %d)\n", -- __FUNCTION__, size, MD_SIG_SIZE); -- return -EINVAL; -- } -+ u_int8_t *p = data + sizeof(struct avp_hdr); - -- bcopy (&raw[3], t->chal_them.reply, MD_SIG_SIZE); -- if (debug_avp) -- { -- log (LOG_DEBUG, "%s: Challenge reply found\n", __FUNCTION__); -- } -+ memcpy(t->chal_them.reply, p, MD_SIG_SIZE); -+ if(debug_avp) -+ log(LOG_DEBUG, "%s: Challenge reply found\n", __func__); - return 0; - } - -+/*****************************************************************************/ - int assigned_tunnel_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * What is their TID that we must use from now on? -- */ -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ u_int16_t id = get16(p); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- case StopCCN: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: tunnel ID not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 8) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is wrong size. %d != 8\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Assigned Tunnel ID", 8, datalen, 0); -- return -EINVAL; -- } -- } --#endif - if (c->msgtype == StopCCN) -- { -- t->qtid = ntohs (raw[3]); -- } -+ t->qtid = id; - else -- { -- t->tid = ntohs (raw[3]); -- } -+ t->tid = id; - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: using peer's tunnel %d\n", __FUNCTION__, -- ntohs (raw[3])); -- } -+ log (LOG_DEBUG, "%s: using peer's tunnel %d\n", __func__, id); - return 0; - } - --int assigned_call_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+/*****************************************************************************/ -+int assigned_session_avp (struct tunnel *t, struct call *c, void *data, -+ int avplen) - { -- /* -- * What is their CID that we must use from now on? -- */ -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); -+ u_int16_t id = get16(p); -+ -+ switch(c->msgtype) { -+ case CDN: -+ case ICRP: -+ case OCRP: -+ c->cid = id; -+ break; -+ case ICRQ: -+ t->call_head->cid = id; -+ break; -+ }; - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case CDN: -- case ICRP: -- case ICRQ: -- case OCRP: /* jz: deleting the debug message */ -- break; -- case OCRQ: -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: call ID not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 8) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is wrong size. %d != 8\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Assigned Call ID", 8, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- if (c->msgtype == CDN) -- { -- c->qcid = ntohs (raw[3]); -- } -- else if (c->msgtype == ICRQ) -- { -- t->call_head->cid = ntohs (raw[3]); -- } -- else if (c->msgtype == ICRP) -- { -- c->cid = ntohs (raw[3]); -- } -- else if (c->msgtype == OCRP) -- { /* jz: copy callid to c->cid */ -- c->cid = ntohs (raw[3]); -- } -- else -- { -- log (LOG_DEBUG, "%s: Dunno what to do when it's state %s!\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- } - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: using peer's call %d\n", __FUNCTION__, ntohs (raw[3])); -- } -+ log (LOG_DEBUG, "%s: assigned session id: %d\n", __func__, id); - return 0; - } - -+/*****************************************************************************/ - int packet_delay_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * What is their CID that we must use from now on? -- */ -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case ICRP: -- case OCRQ: -- case ICCN: -- case OCRP: -- case OCCN: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: packet delay not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 8) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is wrong size. %d != 8\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Assigned Call ID", 8, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- c->ppd = ntohs (raw[3]); -+ c->ppd = get16(p); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer's delay is %d 1/10's of a second\n", __FUNCTION__, -- ntohs (raw[3])); -- } -+ log (LOG_DEBUG, "%s: peer's delay is %d 1/10's of a second\n", __func__, -+ c->ppd); - return 0; - } - --int call_serno_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int call_serno_avp (struct tunnel *t, struct call *c, void *data, int avplen) - { - /* - * What is the serial number of the call? - */ -- _u16 *raw = data; -- --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case ICRQ: -- case OCRQ: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: call ID not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 10) -- { --#ifdef STRICT -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is wrong size. %d != 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Serial Number", 10, datalen, 0); -- return -EINVAL; --#else -- log (LOG_DEBUG, -- "%s: peer is using old style serial number. Will be invalid.\n", -- __FUNCTION__); --#endif -+ u_int8_t *p = data + sizeof(struct avp_hdr); - -- } -- } --#endif -- t->call_head->serno = (((unsigned int) ntohs (raw[3])) << 16) | -- ((unsigned int) ntohs (raw[4])); -+ t->call_head->serno = get32(p); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: serial number is %d\n", __FUNCTION__, -- t->call_head->serno); -- } -+ log (LOG_DEBUG, "%s: serial number is %d\n", __func__, -+ t->call_head->serno); - return 0; - } - --int rx_speed_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int rx_speed_avp (struct tunnel *t, struct call *c, void *data, int avplen) - { -- /* -- * What is the received baud rate of the call? -- */ -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case ICCN: -- case OCCN: -- case OCRP: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: rx connect speed not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 10) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is wrong size. %d != 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Connect Speed (RX)", 10, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- c->rxspeed = (((unsigned int) ntohs (raw[3])) << 16) | -- ((unsigned int) ntohs (raw[4])); -- if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: receive baud rate is %d\n", __FUNCTION__, c->rxspeed); -- } -+ c->rxspeed = get32(p); -+ if(debug_avp) -+ log(LOG_DEBUG, "%s: receive baud rate is %d\n", __func__, c->rxspeed); - return 0; - } - --int tx_speed_avp (struct tunnel *t, struct call *c, void *data, int datalen) -+/*****************************************************************************/ -+int tx_speed_avp (struct tunnel *t, struct call *c, void *data, int avplen) - { -- /* -- * What is the tranmsit baud rate of the call? -- */ -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case ICCN: -- case OCCN: -- case OCRP: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: tx connect speed not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 10) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is wrong size. %d != 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Connect Speed (tx)", 10, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- c->txspeed = (((unsigned int) ntohs (raw[3])) << 16) | -- ((unsigned int) ntohs (raw[4])); -+ c->txspeed = get32(p); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: transmit baud rate is %d\n", __FUNCTION__, c->txspeed); -- } -+ log (LOG_DEBUG, "%s: transmit baud rate is %d\n", -+ __func__, c->txspeed); - return 0; - } -+ -+/*****************************************************************************/ - int call_physchan_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * What is the physical channel? -- */ -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case ICRQ: -- case OCRQ: -- case OCRP: -- case OCCN: -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: physical channel not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 10) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is wrong size. %d != 10\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Physical Channel", 10, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- t->call_head->physchan = (((unsigned int) ntohs (raw[3])) << 16) | -- ((unsigned int) ntohs (raw[4])); -+ t->call_head->physchan = get32(p); - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: physical channel is %d\n", __FUNCTION__, -- t->call_head->physchan); -- } -+ log(LOG_DEBUG, "%s: physical channel is %d\n", __func__, -+ t->call_head->physchan); - return 0; - } - -+/*****************************************************************************/ - int receive_window_size_avp (struct tunnel *t, struct call *c, void *data, -- int datalen) -+ int avplen) - { -- /* -- * What is their RWS? -- */ -- _u16 *raw = data; -+ u_int8_t *p = data + sizeof(struct avp_hdr); - --#ifdef SANITY -- if (t->sanity) -- { -- switch (c->msgtype) -- { -- case SCCRP: -- case SCCRQ: -- case OCRP: /* jz */ -- case OCCN: /* jz */ -- case StopCCN: --/* case ICRP: -- case ICCN: */ -- break; -- default: -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: RWS not appropriate for message %s. Ignoring.\n", -- __FUNCTION__, msgtypes[c->msgtype]); -- return 0; -- } -- if (datalen != 8) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: avp is wrong size. %d != 8\n", __FUNCTION__, -- datalen); -- wrong_length (c, "Receive Window Size", 8, datalen, 0); -- return -EINVAL; -- } -- } --#endif -- t->rws = ntohs (raw[3]); -+ t->rws = get16(p); - /* if (c->rws >= 0) - c->fbit = FBIT; */ - if (debug_avp) -- { -- if (DEBUG) -- log (LOG_DEBUG, -- "%s: peer wants RWS of %d. Will use flow control.\n", -- __FUNCTION__, t->rws); -- } -+ log (LOG_DEBUG, "%s: peer wants RWS of %d. Will use flow control.\n", -+ __func__, t->rws); - return 0; - } - - -+/*****************************************************************************/ - int handle_avps (struct buffer *buf, struct tunnel *t, struct call *c) - { - /* -@@ -1594,82 +770,100 @@ - - struct avp_hdr *avp; - int len = buf->len - sizeof (struct control_hdr); -+ u_int16_t rlen = 0; -+ u_int16_t attr = 0; - int firstavp = -1; -- int hidlen; -+ int hidlen = 0; - char *data = buf->start + sizeof (struct control_hdr); - avp = (struct avp_hdr *) data; -+ - if (debug_avp) - log (LOG_DEBUG, "%s: handling avp's for tunnel %d, call %d\n", -- __FUNCTION__, t->ourtid, c->ourcid); -+ __func__, t->ourtid, c->ourcid); -+ -+ if(len < 6) { -+ log (LOG_WARN, "%s: packet too small\n", __func__); -+ set_error(c, ERROR_LENGTH, "Invalid message length"); -+ return -EINVAL; -+ } -+ - while (len > 0) - { -- /* Go ahead and byte-swap the header */ -- swaps (avp, sizeof (struct avp_hdr)); -- if (avp->attr > AVP_MAX) -+ rlen = get16((u_int8_t*)&avp->length); -+ attr = get16((u_int8_t*)&avp->attr); -+ -+ /* AVP header checks */ -+ if (attr > AVP_MAX) - { -- if (AMBIT (avp->length)) -+ if (AMBIT(rlen)) - { - log (LOG_WARN, -- "%s: dont know how to handle mandatory attribute %d. Closing %s.\n" -- __FUNCTION__, avp->attr, -- (c != t->self) ? "call" : "tunnel"); -- set_error (c, VENDOR_ERROR, -- "mandatory attribute %d cannot be handled", -- avp->attr); -- c->needclose = -1; -+ "%s: unhandeled mandatory attribute %d. Closing %s.\n", -+ __func__, attr, (c != t->self) ? "call" : "tunnel"); -+ set_error (c, VENDOR_ERROR, -+ "mandatory attribute %d cannot be handled", attr); - return -EINVAL; - } - else - { - if (DEBUG) - log (LOG_WARN, -- "%s: dont know how to handle atribute %d.\n", -- __FUNCTION__, avp->attr); -+ "%s: handeled attribute %d.\n", -+ __func__, attr); - goto next; - } - } -- if (ALENGTH (avp->length) > len) -+ if (ALENGTH (rlen) > len) - { - log (LOG_WARN, -- "%s: AVP received with length > remaining packet length!\n", -- __FUNCTION__); -+ "%s: AVP reported length > remaining packet length\n", -+ __func__); - set_error (c, ERROR_LENGTH, "Invalid AVP length"); -- c->needclose = -1; - return -EINVAL; - } -- if (avp->attr && firstavp) -+ if (ALENGTH (rlen) < sizeof (struct avp_hdr)) - { -- log (LOG_WARN, "%s: First AVP was not message type.\n", -- __FUNCTION__); -- set_error (c, VENDOR_ERROR, "First AVP must be message type"); -- c->needclose = -1; -+ log (LOG_WARN, "%s: AVP reported length too small (%d).\n", -+ __func__, ALENGTH (rlen)); -+ set_error (c, ERROR_LENGTH, "AVP too small"); - return -EINVAL; - } -- if (ALENGTH (avp->length) < sizeof (struct avp_hdr)) -+ if (avps[attr].sz) { -+ if((avps[attr].flags & AVP_F_FIXLEN) ? -+ (ALENGTH(rlen) - sizeof(struct avp_hdr)) != avps[attr].sz : -+ (ALENGTH(rlen) - sizeof(struct avp_hdr)) > avps[attr].sz) { -+ log (LOG_DEBUG, "%s: %s avp size mismatch (%d %s %d)\n", -+ __func__, -+ avps[attr].description, -+ (avps[attr].flags & AVP_F_FIXLEN) ? "!=" : "<", -+ ALENGTH(rlen), avps[attr].sz); -+ set_error (c, ERROR_LENGTH, "AVP size check failed"); -+ return -EINVAL; -+ } -+ } -+ if (attr && firstavp) - { -- log (LOG_WARN, "%s: AVP with too small of size (%d).\n", -- __FUNCTION__, ALENGTH (avp->length)); -- set_error (c, ERROR_LENGTH, "AVP too small"); -- c->needclose = -1; -+ log (LOG_WARN, "%s: First AVP was not message type.\n", -+ __func__); -+ set_error (c, VENDOR_ERROR, "First AVP must be message type"); - return -EINVAL; - } -- if (AZBITS (avp->length)) -+ if (AZBITS (rlen)) - { -- log (LOG_WARN, "%s: %sAVP has reserved bits set.\n", __FUNCTION__, -- AMBIT (avp->length) ? "Mandatory " : ""); -- if (AMBIT (avp->length)) -+ log (LOG_WARN, "%s: %sAVP has reserved bits set.\n", __func__, -+ AMBIT (rlen) ? "Mandatory " : ""); -+ if (AMBIT (rlen)) - { - set_error (c, ERROR_RESERVED, "reserved bits set in AVP"); -- c->needclose = -1; - return -EINVAL; - } - goto next; - } -- if (AHBIT (avp->length)) -+ -+ /* decryption */ -+ if (AHBIT (rlen)) - { --#ifdef DEBUG_HIDDEN -- log (LOG_DEBUG, "%s: Hidden bit set on AVP.\n", __FUNCTION__); --#endif -+ log (LOG_DEBUG, "%s: Hidden bit set on AVP.\n", __func__); - /* We want to rewrite the AVP as an unhidden AVP - and then pass it along as normal. Remeber how - long the AVP was in the first place though! */ -@@ -1678,12 +872,11 @@ - { - if (debug_avp) - log (LOG_WARN, "%s: Unable to handle hidden %sAVP\n:", -- __FUNCTION__, -- (AMBIT (avp->length) ? "mandatory " : "")); -- if (AMBIT (avp->length)) -+ __func__, -+ (AMBIT (rlen) ? "mandatory " : "")); -+ if (AMBIT (rlen)) - { - set_error (c, VENDOR_ERROR, "Invalid Hidden AVP"); -- c->needclose = -1; - return -EINVAL; - } - goto next; -@@ -1696,17 +889,43 @@ - } - else - hidlen = 0; -- if (avps[avp->attr].handler) -+ -+ /* validate */ -+ if (avps[attr].validate) -+ { -+ if(avps[attr].validate(attr, t, c, avp, ALENGTH (rlen))) { -+ if (AMBIT (rlen)) -+ { -+ log (LOG_WARN, -+ "%s: verification of AVP %d (%s) failed.\n", -+ __func__, attr, -+ avps[attr].description); -+ set_error (c, VENDOR_ERROR, "processing failed on mandatory AVP"); -+ return -EINVAL; -+ } -+ else -+ { -+ if (DEBUG) -+ log (LOG_DEBUG, -+ "%s: Bad exit status handling attribute %d (%s).\n", -+ __func__, attr, -+ avps[attr].description); -+ } -+ } -+ } -+ -+ /* handling */ -+ if (avps[attr].handle) - { -- if (avps[avp->attr].handler (t, c, avp, ALENGTH (avp->length))) -+ if (avps[attr].handle(t, c, avp, ALENGTH (rlen))) - { -- if (AMBIT (avp->length)) -+ if (AMBIT (rlen)) - { - log (LOG_WARN, -- "%s: Bad exit status handling attribute %d (%s) on mandatory packet.\n", -- __FUNCTION__, avp->attr, -- avps[avp->attr].description); -- c->needclose = -1; -+ "%s: Bad exit status handling mandatory attribute %d (%s).\n", -+ __func__, attr, -+ avps[attr].description); -+ set_error (c, VENDOR_ERROR, "processing failed on mandatory AVP"); - return -EINVAL; - } - else -@@ -1714,29 +933,31 @@ - if (DEBUG) - log (LOG_DEBUG, - "%s: Bad exit status handling attribute %d (%s).\n", -- __FUNCTION__, avp->attr, -- avps[avp->attr].description); -+ __func__, attr, -+ avps[attr].description); - } - } - } - else - { -- if (AMBIT (avp->length)) -+ if (AMBIT (rlen)) - { - log (LOG_WARN, - "%s: No handler for mandatory attribute %d (%s). Closing %s.\n", -- __FUNCTION__, avp->attr, avps[avp->attr].description, -+ __func__, attr, -+ avps[attr].description, - (c != t->self) ? "call" : "tunnel"); - set_error (c, VENDOR_ERROR, "No handler for attr %d (%s)\n", -- avp->attr, avps[avp->attr].description); -+ attr, -+ avps[attr].description); - return -EINVAL; - } - else - { - if (DEBUG) - log (LOG_WARN, "%s: no handler for atribute %d (%s).\n", -- __FUNCTION__, avp->attr, -- avps[avp->attr].description); -+ __func__, attr, -+ avps[attr].description); - } - } - next: -@@ -1748,16 +969,17 @@ - } - else - { -- len -= ALENGTH (avp->length); -- data += ALENGTH (avp->length); /* Next AVP, please */ -+ len -= ALENGTH (rlen); -+ data += ALENGTH (rlen); /* Next AVP, please */ - } - avp = (struct avp_hdr *) data; - firstavp = 0; - } - if (len != 0) - { -- log (LOG_WARN, "%s: negative overall packet length\n", __FUNCTION__); -+ log (LOG_WARN, "%s: negative overall packet length\n", __func__); - return -EINVAL; - } -+ - return 0; - } ---- l2tpd-0.70-pre20031121.orig/avpsend.c -+++ l2tpd-0.70-pre20031121/avpsend.c -@@ -1,11 +1,5 @@ - /* -- * $Id$ -- * -- * Layer Two Tunnelling Protocol Daemon -- * Copyright (C) 1998 Adtran, Inc. -- * Copyright (C) 2002 Jeff McAdams -- * -- * Mark Spencer -+ * Copyright (C) 2004 Jean-Francois Dive - * - * This software is distributed under the terms - * of the GPL, which you should have received -@@ -14,337 +8,288 @@ - * Attribute Value Pair creating routines - */ - -+/* TODO: Handle Tie break */ -+/* TODO: Get real hostname / config */ -+/* TODO: There should be an overflow check on -+ * the buffer size. (safe for now as -+ * packet size = 4k -+ */ -+ - #include - #include --#include -+#include - #include "l2tp.h" - --/* -- * These routines should add avp's to a buffer -- * to be sent -- */ -+extern struct avp avps[]; - -+/* We could add here padding support which would allow -+ * to keep alignemnt straight */ -+static int add_avp(struct buffer *buf, u_int32_t avpid, unsigned char *v, -+ u_int32_t sz, u_int8_t setpayload) { -+ u_int8_t *p = buf->start + buf->len; -+ -+ if(avpid > AVP_MAX || !avps[avpid].flags) { -+ log(LOG_DEBUG, "%s: invalid avp id %d\n", __func__, avpid); -+ return 1; -+ } -+ -+ set16(p, (sz + 6) | (avps[avpid].flags & AVP_F_MANDATORY ? MBIT : 0)); -+ set16(p + 2, VENDOR_ID); -+ set16(p + 4, avpid); -+ if(setpayload) -+ memcpy(p + 6, v, sz); - --/* FIXME: If SANITY is on, we should check for buffer overruns */ -+ buf->len += (sz + 6); -+ return 0; -+} - --/* FIXME: Can't this be condensed alot? */ -+/*****************************************************************************/ -+int add_message_type_avp(struct buffer *buf, _u16 type) { -+ u_int8_t t[2]; -+ set16(t, type); -+ if(add_avp(buf, MESSAGE_TYPE_AVP, t, 2, 1)) -+ return 1; -+ return 0; -+} - --int add_message_type_avp (struct buffer *buf, _u16 type) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x8 | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = 0; -- raw[3] = htons (type); -- buf->len += 8; -+/*****************************************************************************/ -+int add_protocol_avp(struct buffer *buf) { -+ u_int8_t t[2]; -+ set16(t, OUR_L2TP_VERSION); -+ if(add_avp(buf, PROTOCOL_VERSION_AVP, t, 2, 1)) -+ return 1; - return 0; - } - --int add_protocol_avp (struct buffer *buf) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x8 | MBIT); /* Length and M bit */ -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x2); /* Value of our AVP */ -- raw[3] = htons (OUR_L2TP_VERSION); -- buf->len += 8; -+/*****************************************************************************/ -+int add_frame_caps_avp(struct buffer *buf, _u16 caps) { -+ u_int8_t t[4]; -+ t[0] = 0; -+ t[1] = 0; -+ set16(&t[2], caps); -+ if(add_avp(buf, FRAMING_CAP_AVP, t, 4, 1)) -+ return 1; - return 0; - } - --int add_frame_caps_avp (struct buffer *buf, _u16 caps) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x3); -- raw[3] = 0; -- raw[4] = htons (caps); -- buf->len += 10; -+/*****************************************************************************/ -+int add_bearer_caps_avp(struct buffer *buf, _u16 caps) { -+ u_int8_t t[4]; -+ t[0] = 0; -+ t[1] = 0; -+ set16(&t[2], caps); -+ if(add_avp(buf, BEARER_CAP_AVP, t, 4, 1)) -+ return 1; - return 0; - } - --int add_bearer_caps_avp (struct buffer *buf, _u16 caps) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x4); -- raw[3] = 0; -- raw[4] = htons (caps); -- buf->len += 10; -+/*****************************************************************************/ -+int add_firmware_avp(struct buffer *buf) { -+ u_int8_t t[2]; -+ set16(t, OUR_L2TP_VERSION); -+ if(add_avp(buf, FIRMWARE_REV_AVP, t, 2, 1)) -+ return 1; - return 0; - } - --/* FIXME: I need to send tie breaker AVP's */ -- --int add_firmware_avp (struct buffer *buf) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x8); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x6); -- raw[3] = htons (FIRMWARE_REV); -- buf->len += 8; -+/*****************************************************************************/ -+int add_hostname_avp(struct buffer *buf, struct tunnel *t) { -+ char n[STRLEN]; -+ int sz = 0; -+ if(t->lac && t->lac->hostname[0]) { -+ strncpy(n,t->lac->hostname, sizeof(n)); -+ sz = strnlen(t->lac->hostname, sizeof(t->lac->hostname)); -+ } -+ else if(t->lns && t->lns->hostname[0]) { -+ strncpy(n,t->lns->hostname, sizeof(n)); -+ sz = strnlen(t->lns->hostname, sizeof(t->lns->hostname)); -+ } -+ else { -+ if(gethostname(n, STRLEN)) { -+ strcpy(n,"eriwan"); -+ sz = 6; -+ } -+ else -+ sz = strnlen(n, sizeof(n)); -+ } -+ if(add_avp(buf, HOSTNAME_AVP, n, sz, 1)) -+ return 1; - return 0; - } - --/* --int add_hostname_avp(struct buffer *buf) { -- _u16 *raw = (_u16 *)(buf->start + buf->len); -- raw[0] = htons((0x6 + strlen(hostname)) | MBIT); -- raw[1] = htons(VENDOR_ID); -- raw[2] = htons(0x7); -- strcpy((char *)(&raw[3]), hostname); -- buf->len += 6 + strlen(hostname); -- return 0; -+/*****************************************************************************/ -+int add_vendor_avp(struct buffer *buf) { -+ if(add_avp(buf, VENDOR_NAME_AVP, VENDOR_NAME, strlen(VENDOR_NAME), 1)) -+ return 1; -+ return 0; - } --*/ - --int add_hostname_avp (struct buffer *buf) --{ -- char names[6] = "eriwan"; -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xC | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x7); -- strcpy ((char *) (&raw[3]), names); -- buf->len += 12; -- return 0; --} -- --int add_vendor_avp (struct buffer *buf) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x6 + strlen (VENDOR_NAME)); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x8); -- strcpy ((char *) (&raw[3]), VENDOR_NAME); -- buf->len += 6 + strlen (VENDOR_NAME); -- return 0; --} -- --int add_tunnelid_avp (struct buffer *buf, _u16 tid) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x8 | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x9); -- raw[3] = htons (tid); -- buf->len += 8; -- return 0; --} -- --int add_avp_rws (struct buffer *buf, _u16 rws) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x8 | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0xA); -- raw[3] = htons (rws); -- buf->len += 8; -- return 0; --} -- --int add_challenge_avp (struct buffer *buf, char *c, int len) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons ((0x6 + len) | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0xB); -- bcopy (c, (char *) (&raw[3]), len); -- buf->len += 6 + len; -- return 0; --} -- --int add_chalresp_avp (struct buffer *buf, char *c, int len) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons ((0x6 + len) | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0xD); -- bcopy (c, (char *) (&raw[3]), len); -- buf->len += 6 + len; -- return 0; --} -- --int add_randvect_avp (struct buffer *buf, char *c, int len) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons ((0x6 + len) | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x24); -- bcopy (c, (char *) (&raw[3]), len); -- buf->len += 6 + len; -- return 0; --} -- --int add_result_code_avp (struct buffer *buf, _u16 result, _u16 error, -- char *msg, int len) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons ((0xA + len) | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x1); -- raw[3] = htons (result); -- raw[4] = htons (error); -- bcopy (msg, (char *) &raw[5], len); -- buf->len += (10 + len); -+/*****************************************************************************/ -+int add_tunnelid_avp(struct buffer *buf, _u16 tid) { -+ u_int8_t t[2]; -+ set16(t, tid); -+ if(add_avp(buf, ASSIGNED_TUN_ID_AVP, t, 2, 1)) -+ return 1; - return 0; - } - -+/*****************************************************************************/ -+int add_avp_rws(struct buffer *buf, _u16 rws) { -+ u_int8_t t[2]; -+ set16(t, rws); -+ if(add_avp(buf, RX_WIN_SIZE_AVP, t, 2, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_challenge_avp(struct buffer *buf, char *c, int len) { -+ if(add_avp(buf, CHALLENGE_AVP, c, len, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_chalresp_avp(struct buffer *buf, char *c, int len) { -+ if(add_avp(buf, CHALLENGE_RESP_AVP, c, len, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_randvect_avp(struct buffer *buf, char *c, int len) { -+ if(add_avp(buf, RANDOM_VECTOR_AVP, c, len, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_result_code_avp(struct buffer *buf, _u16 result, _u16 error, -+ char *msg, int len) { -+ u_int8_t t[4]; -+ set16(t, result); -+ set16(&t[2], error); -+ memcpy((u_int8_t*)(buf->start + buf->len + 10), msg, len); -+ memcpy((u_int8_t*)(buf->start + buf->len + 6), t, 4); -+ if(add_avp(buf, RESULT_CODE_AVP, 0, 4 + len, 0)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ - #ifdef TEST_HIDDEN --int add_callid_avp (struct buffer *buf, _u16 callid, struct tunnel *t) --{ --#else --int add_callid_avp (struct buffer *buf, _u16 callid) --{ --#endif -- _u16 *raw = (_u16 *) (buf->start + buf->len); --#ifdef TEST_HIDDEN -+int add_callid_avp(struct buffer *buf, _u16 callid, struct tunnel *t) { -+ u_int8_t t[2]; - if (t->hbit) - raw++; --#endif -- raw[0] = htons (0x8 | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0xE); -- raw[3] = htons (callid); -- buf->len += 8; --#ifdef TEST_HIDDEN -+ set16(t, callid); -+ if(add_avp(buf, ASSIGNED_SES_ID_AVP, t, 2, 1)) -+ return 1; - if (t->hbit) - encrypt_avp (buf, 8, t); -+ return 0; -+} -+#else -+int add_callid_avp(struct buffer *buf, _u16 callid) { -+ u_int8_t t[2]; -+ set16(t, callid); -+ if(add_avp(buf, ASSIGNED_SES_ID_AVP, t, 2, 1)) -+ return 1; -+ return 0; -+} - #endif -+ -+/*****************************************************************************/ -+int add_serno_avp(struct buffer *buf, unsigned int serno) { -+ u_int8_t t[4]; -+ set32(t, serno); -+ if(add_avp(buf, SERIAL_NUMBER_AVP, t, 4, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_bearer_avp(struct buffer *buf, int bearer) { -+ u_int8_t t[4]; -+ set32(t, bearer); -+ if(add_avp(buf, BEARER_TYPE_AVP, t, 4, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_frame_avp(struct buffer *buf, int frame) { -+ u_int8_t t[4]; -+ set32(t, frame); -+ if(add_avp(buf, FRAMING_TYPE_AVP, t, 4, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_txspeed_avp(struct buffer *buf, int speed) { -+ u_int8_t t[4]; -+ set32(t, speed); -+ if(add_avp(buf, TX_CONNECT_SPEED_AVP, t, 4, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_rxspeed_avp(struct buffer *buf, int speed) { -+ u_int8_t t[4]; -+ set32(t, speed); -+ if(add_avp(buf, RX_CONNECT_SPEED_AVP, t, 4, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_physchan_avp(struct buffer *buf, unsigned int physchan) { -+ u_int8_t t[4]; -+ set32(t, physchan); -+ if(add_avp(buf, PHYS_CHAN_ID_AVP, t, 4, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_ppd_avp(struct buffer *buf, _u16 ppd) { -+ u_int8_t t[2]; -+ set16(t, ppd); -+ if(add_avp(buf, PACKET_DELAY_AVP, t, 2, 1)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_seqreqd_avp(struct buffer *buf) { -+ if(add_avp(buf, SEQ_REQUIRED_AVP, 0, 0, 0)) -+ return 1; -+ return 0; -+} -+ -+/*****************************************************************************/ -+int add_minbps_avp(struct buffer *buf, int speed) { -+ u_int8_t t[4]; -+ set32(t, speed); -+ if(add_avp(buf, MIN_BPS_AVP, t, 4, 1)) -+ return 1; - return 0; - } - --int add_serno_avp (struct buffer *buf, unsigned int serno) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0xF); -- raw[3] = htons ((serno >> 16) & 0xFFFF); -- raw[4] = htons (serno & 0xFFFF); -- buf->len += 10; -- return 0; --} -- --int add_bearer_avp (struct buffer *buf, int bearer) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x12); -- raw[3] = htons ((bearer >> 16) & 0xFFFF); -- raw[4] = htons (bearer & 0xFFFF); -- buf->len += 10; -- return 0; --} -- --int add_frame_avp (struct buffer *buf, int frame) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x13); -- raw[3] = htons ((frame >> 16) & 0xFFFF); -- raw[4] = htons (frame & 0xFFFF); -- buf->len += 10; -- return 0; --} -- --int add_txspeed_avp (struct buffer *buf, int speed) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x18); -- raw[3] = htons ((speed >> 16) & 0xFFFF); -- raw[4] = htons (speed & 0xFFFF); -- buf->len += 10; -- return 0; --} -- --int add_rxspeed_avp (struct buffer *buf, int speed) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x26); -- raw[3] = htons ((speed >> 16) & 0xFFFF); -- raw[4] = htons (speed & 0xFFFF); -- buf->len += 10; -- return 0; --} -- --int add_physchan_avp (struct buffer *buf, unsigned int physchan) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x8 | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x19); -- raw[3] = htons ((physchan >> 16) & 0xFFFF); -- raw[4] = htons (physchan & 0xFFFF); -- buf->len += 10; -- return 0; --} -- --int add_ppd_avp (struct buffer *buf, _u16 ppd) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x8 | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x14); -- raw[3] = htons (ppd); -- buf->len += 8; -- return 0; --} -- --int add_seqreqd_avp (struct buffer *buf) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0x6 | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x27); -- buf->len += 6; -- return 0; --} -- --/* jz: options dor the outgoing call */ -- --/* jz: Minimum BPS - 16 */ --int add_minbps_avp (struct buffer *buf, int speed) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x10); -- raw[3] = htons ((speed >> 16) & 0xFFFF); -- raw[4] = htons (speed & 0xFFFF); -- buf->len += 10; -- return 0; --} -- --/* jz: Maximum BPS - 17 */ --int add_maxbps_avp (struct buffer *buf, int speed) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons (0xA | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x11); -- raw[3] = htons ((speed >> 16) & 0xFFFF); -- raw[4] = htons (speed & 0xFFFF); -- buf->len += 10; -- return 0; --} -- --/* jz: Dialed Number 21 */ --int add_number_avp (struct buffer *buf, char *no) --{ -- _u16 *raw = (_u16 *) (buf->start + buf->len); -- raw[0] = htons ((0x6 + strlen (no)) | MBIT); -- raw[1] = htons (VENDOR_ID); -- raw[2] = htons (0x15); -- strncpy ((char *) (&(raw[3])), no, strlen (no)); -- buf->len += 6 + strlen (no); -+/*****************************************************************************/ -+int add_maxbps_avp(struct buffer *buf, int speed) { -+ u_int8_t t[4]; -+ set32(t, speed); -+ if(add_avp(buf, MAX_BPS_AVP, t, 4, 1)) -+ return 1; - return 0; - } -+ -+/*****************************************************************************/ -+int add_number_avp(struct buffer *buf, char *no) { -+ if(add_avp(buf, CALLED_NUMBER_AVP, no, strlen(no), 1)) -+ return 1; -+ return 0; -+} diff --git a/openwrt/package/l2tpd/patches/02-debian-2-pty-rev.patch b/openwrt/package/l2tpd/patches/02-debian-2-pty-rev.patch deleted file mode 100644 index 135e17e183f..00000000000 --- a/openwrt/package/l2tpd/patches/02-debian-2-pty-rev.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ruN l2tpd-0.70pre-old/l2tpd.c l2tpd-0.70pre-new/l2tpd.c ---- l2tpd-0.70pre-old/l2tpd.c 2005-12-16 12:02:02.000000000 +0100 -+++ l2tpd-0.70pre-new/l2tpd.c 2005-12-16 12:14:24.000000000 +0100 -@@ -336,17 +336,10 @@ - tcgetattr (c->fd, &ptyconf); - *(c->oldptyconf) = ptyconf; - ptyconf.c_cflag &= ~(ICANON | ECHO); -- ptyconf.c_lflag &= ~ECHO; - tcsetattr (c->fd, TCSANOW, &ptyconf); - - snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); - fd2 = open (tty, O_RDWR); -- if(!fd2) -- log(LOG_WARN, "unable to open tty %s", tty); -- -- /* XXX JEF: CHECK ME */ -- stropt[pos++] = strdup(tty); -- stropt[pos] = NULL; - - #ifdef USE_KERNEL - } diff --git a/openwrt/package/l2tpd/patches/03-jacco-pty.patch b/openwrt/package/l2tpd/patches/03-jacco-pty.patch deleted file mode 100644 index 67169b8ead6..00000000000 --- a/openwrt/package/l2tpd/patches/03-jacco-pty.patch +++ /dev/null @@ -1,1194 +0,0 @@ -diff -ruN l2tpd-0.70pre-old/l2tpd.c l2tpd-0.70pre-new/l2tpd.c ---- l2tpd-0.70pre-old/l2tpd.c 2005-12-16 12:34:12.000000000 +0100 -+++ l2tpd-0.70pre-new/l2tpd.c 2005-12-16 12:34:54.000000000 +0100 -@@ -16,6 +16,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -274,8 +275,8 @@ - - int start_pppd (struct call *c, struct ppp_opts *opts) - { -- char a, b; -- char tty[80]; -+ /* char a, b; */ -+ char *tty; - char *stropt[80]; - struct ppp_opts *p; - #ifdef USE_KERNEL -@@ -324,12 +325,45 @@ - else - { - #endif -- if ((c->fd = getPtyMaster (&a, &b)) < 0) -+ c->fd = open("/dev/ptmx", O_RDWR); -+ if (c->fd == -1) -+ { -+ log (LOG_WARN, "%s: unable to open /dev/ptmx to allocate pty\n", -+ __FUNCTION__); -+ return -EINVAL; -+ } else -+ { -+ if (grantpt(c->fd)) -+ { -+ log (LOG_WARN, "%s: unable to grantpt() on pty\n", -+ __FUNCTION__); -+ close(c->fd); -+ return -EINVAL; -+ } -+ if (unlockpt(c->fd)) -+ { -+ log (LOG_WARN, "%s: unable to unlockpt() on pty\n", -+ __FUNCTION__); -+ close(c->fd); -+ return -EINVAL; -+ } -+ tty = ptsname(c->fd); -+ if (tty == NULL) -+ { -+ log (LOG_WARN, "%s: unable to obtain name of slave tty\n", -+ __FUNCTION__); -+ close(c->fd); -+ return -EINVAL; -+ } -+ } -+ -+ -+ /* if ((c->fd = getPtyMaster (&a, &b)) < 0) - { - log (LOG_WARN, "%s: unable to allocate pty, abandoning!\n", - __FUNCTION__); - return -EINVAL; -- } -+ } */ - - /* set fd opened above to not echo so we don't see read our own packets - back of the file descriptor that we just wrote them to */ -@@ -338,8 +372,14 @@ - ptyconf.c_cflag &= ~(ICANON | ECHO); - tcsetattr (c->fd, TCSANOW, &ptyconf); - -- snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); -+/* snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); */ - fd2 = open (tty, O_RDWR); -+ if (fd2 == -1) -+ { -+ log (LOG_WARN, "%s: unable to open slave tty %s\n", __FUNCTION__, tty); -+ close(c->fd); -+ return -EINVAL; -+ } - - #ifdef USE_KERNEL - } -diff -ruN l2tpd-0.70pre-old/l2tpd.c.orig l2tpd-0.70pre-new/l2tpd.c.orig ---- l2tpd-0.70pre-old/l2tpd.c.orig 1970-01-01 01:00:00.000000000 +0100 -+++ l2tpd-0.70pre-new/l2tpd.c.orig 2005-12-16 12:14:24.000000000 +0100 -@@ -0,0 +1,1104 @@ -+/* -+ * $Id$ -+ * -+ * Layer Two Tunnelling Protocol Daemon -+ * Copyright (C) 1998 Adtran, Inc. -+ * Copyright (C) 2002 Jeff McAdams -+ * -+ * Mark Spencer -+ * -+ * This software is distributed under the terms -+ * of the GPL, which you should have received -+ * along with this source. -+ * -+ * Main Daemon source. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#if (__GLIBC__ < 2) -+# if defined(FREEBSD) -+# include -+# elif defined(LINUX) -+# include -+# elif defined(SOLARIS) -+# include -+# endif -+#else -+# include -+#endif -+#include -+#include -+#include -+#include -+#include -+#ifdef USE_KERNEL -+#include -+#endif -+#include "l2tp.h" -+ -+struct tunnel_list tunnels; -+int max_tunnels = DEF_MAX_TUNNELS; -+struct utsname uts; -+int ppd = 1; /* Packet processing delay */ -+int control_fd; /* descriptor of control area */ -+char *args; -+ -+char *dial_no_tmp; /* jz: Dialnumber for Outgoing Call */ -+int switch_io = 0; /* jz: Switch for Incoming or Outgoing Call */ -+ -+void init_tunnel_list (struct tunnel_list *t) -+{ -+ t->head = NULL; -+ t->count = 0; -+ t->calls = 0; -+} -+ -+/* Now sends to syslog instead - MvO */ -+void show_status (void) -+{ -+ struct schedule_entry *se; -+ struct tunnel *t; -+ struct call *c; -+ struct lns *tlns; -+ struct lac *tlac; -+ struct host *h; -+ int s = 0; -+ log (LOG_WARN, "====== l2tpd statistics ========\n"); -+ log (LOG_WARN, " Scheduler entries:\n"); -+ se = events; -+ while (se) -+ { -+ s++; -+ t = (struct tunnel *) se->data; -+ tlac = (struct lac *) se->data; -+ c = (struct call *) se->data; -+ if (se->func == &hello) -+ { -+ log (LOG_WARN, "%d: HELLO to %d\n", s, t->tid); -+ } -+ else if (se->func == &magic_lac_dial) -+ { -+ log (LOG_WARN, "%d: Magic dial on %s\n", s, tlac->entname); -+ } -+ else if (se->func == &send_zlb) -+ { -+ log (LOG_WARN, "%d: Send payload ZLB on call %d:%d\n", s, -+ c->container->tid, c->cid); -+ } -+ else if (se->func == &dethrottle) -+ { -+ log (LOG_WARN, "%d: Dethrottle call %d:%d\n", s, c->container->tid, -+ c->cid); -+ } -+ else -+ log (LOG_WARN, "%d: Unknown event\n", s); -+ se = se->next; -+ }; -+ log (LOG_WARN, "Total Events scheduled: %d\n", s); -+ log (LOG_WARN, "Number of tunnels open: %d\n", tunnels.count); -+ t = tunnels.head; -+ while (t) -+ { -+ log (LOG_WARN, "Tunnel %s, ID = %d (local), %d (remote) to %s:%d\n" -+ " control_seq_num = %d, control_rec_seq_num = %d,\n" -+ " cLr = %d\n", -+ (t->lac ? t->lac->entname : (t->lns ? t->lns->entname : "")), -+ t->ourtid, t->tid, IPADDY (t->peer.sin_addr), -+ ntohs (t->peer.sin_port), t->control_seq_num, -+ t->control_rec_seq_num, t->cLr); -+ c = t->call_head; -+ while (c) -+ { -+ log (LOG_WARN, -+ "Call %s, ID = %d (local), %d (remote), serno = %u,\n" -+ " data_seq_num = %d, data_rec_seq_num = %d,\n" -+ " pLr = %d, tx = %u bytes (%u), rx= %u bytes (%u)\n", -+ (c->lac ? c->lac-> -+ entname : (c->lns ? c->lns->entname : "")), c->ourcid, -+ c->cid, c->serno, c->data_seq_num, c->data_rec_seq_num, -+ c->pLr, c->tx_bytes, c->tx_pkts, c->rx_bytes, c->rx_pkts); -+ c = c->next; -+ } -+ t = t->next; -+ } -+ log (LOG_WARN, "==========Config File===========\n"); -+ tlns = lnslist; -+ while (tlns) -+ { -+ log (LOG_WARN, "LNS entry %s\n", -+ tlns->entname[0] ? tlns->entname : "(unnamed)"); -+ tlns = tlns->next; -+ }; -+ tlac = laclist; -+ while (tlac) -+ { -+ log (LOG_WARN, "LAC entry %s, LNS is/are:", -+ tlac->entname[0] ? tlac->entname : "(unnamed)"); -+ h = tlac->lns; -+ if (h) -+ { -+ while (h) -+ { -+ log (LOG_WARN, " %s", h->hostname); -+ h = h->next; -+ } -+ } -+ else -+ log (LOG_WARN, " [none]"); -+ log (LOG_WARN, "\n"); -+ tlac = tlac->next; -+ }; -+ log (LOG_WARN, "================================\n"); -+} -+ -+void null_handler(int sig) -+{ -+ /* FIXME -+ * A sighup is received when a call is terminated, unknown origine .. -+ * I catch it and ll looks good, but .. -+ */ -+} -+ -+void status_handler (int sig) -+{ -+ show_status (); -+} -+ -+void child_handler (int signal) -+{ -+ /* -+ * Oops, somebody we launched was killed. -+ * It's time to reap them and close that call. -+ * But first, we have to find out what PID died. -+ * unfortunately, pppd will -+ */ -+ struct tunnel *t; -+ struct call *c; -+ pid_t pid; -+ int status; -+ t = tunnels.head; -+ /* Keep looping until all are cleared */ -+ for(;;) -+ { -+ pid = waitpid (-1, &status, WNOHANG); -+ if (pid < 1) -+ { -+ /* -+ * Oh well, nobody there. Maybe we reaped it -+ * somewhere else already -+ */ -+ return; -+ } -+ while (t) -+ { -+ c = t->call_head; -+ while (c) -+ { -+ if (c->pppd == pid) -+ { -+ if ( WIFEXITED( status ) ) -+ { -+ log (LOG_DEBUG, "%s : pppd exited for call %d with code %d\n", __FUNCTION__, -+ c->cid, WEXITSTATUS( status ) ); -+ } -+ else if( WIFSIGNALED( status ) ) -+ { -+ log (LOG_DEBUG, "%s : pppd terminated for call %d by signal %d\n", __FUNCTION__, -+ c->cid, WTERMSIG( status ) ); -+ } -+ else -+ { -+ log (LOG_DEBUG, "%s : pppd exited for call %d for unknown reason\n", __FUNCTION__, -+ c->cid ); -+ } -+ c->needclose = -1; -+ /* -+ * OK...pppd died, we can go ahead and close the pty for -+ * it -+ */ -+ close (c->fd); -+ c->fd = -1; -+ return; -+ } -+ c = c->next; -+ } -+ t = t->next; -+ } -+ } -+} -+ -+void death_handler (int signal) -+{ -+ /* -+ * If we get here, somebody terminated us with a kill or a control-c. -+ * we call call_close on each tunnel twice to get a StopCCN out -+ * for each one (we can't pause to make sure it's received. -+ * Then we close the connections -+ */ -+ struct tunnel *st, *st2; -+ int sec; -+ log (LOG_CRIT, "%s: Fatal signal %d received\n", __FUNCTION__, signal); -+ st = tunnels.head; -+ while (st) -+ { -+ st2 = st->next; -+ strcpy (st->self->errormsg, "Server closing"); -+ sec = st->self->closing; -+ if (st->lac) -+ st->lac->redial = 0; -+ call_close (st->self); -+ if (!sec) -+ { -+ st->self->closing = -1; -+ call_close (st->self); -+ } -+ st = st2; -+ } -+ -+ /* erase pid file */ -+ unlink (gconfig.pidfile); -+ -+ /* erase control pipe */ -+ unlink(CONTROL_PIPE); -+ -+ exit (1); -+} -+ -+int start_pppd (struct call *c, struct ppp_opts *opts) -+{ -+ char a, b; -+ char tty[80]; -+ char *stropt[80]; -+ struct ppp_opts *p; -+#ifdef USE_KERNEL -+ struct l2tp_call_opts co; -+#endif -+ int pos = 1; -+ int fd2; -+#ifdef DEBUG_PPPD -+ int x; -+#endif -+ struct termios ptyconf; -+ char *str; -+ p = opts; -+ stropt[0] = strdup (PPPD); -+ while (p) -+ { -+ stropt[pos] = (char *) malloc (strlen (p->option) + 1); -+ strncpy (stropt[pos], p->option, strlen (p->option) + 1); -+ pos++; -+ p = p->next; -+ } -+ stropt[pos] = NULL; -+ if (c->pppd > 0) -+ { -+ log (LOG_WARN, "%s: PPP already started on call!\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ if (c->fd > -1) -+ { -+ log (LOG_WARN, "%s: file descriptor already assigned!\n", -+ __FUNCTION__); -+ return -EINVAL; -+ } -+#ifdef USE_KERNEL -+ if (kernel_support) -+ { -+ co.ourtid = c->container->ourtid; -+ co.ourcid = c->ourcid; -+ ioctl (server_socket, L2TPIOCGETCALLOPTS, &co); -+ stropt[pos++] = strdup ("channel"); -+ stropt[pos] = (char *) malloc (10); -+ snprintf (stropt[pos], 10, "%d", co.id); -+ pos++; -+ stropt[pos] = NULL; -+ } -+ else -+ { -+#endif -+ if ((c->fd = getPtyMaster (&a, &b)) < 0) -+ { -+ log (LOG_WARN, "%s: unable to allocate pty, abandoning!\n", -+ __FUNCTION__); -+ return -EINVAL; -+ } -+ -+ /* set fd opened above to not echo so we don't see read our own packets -+ back of the file descriptor that we just wrote them to */ -+ tcgetattr (c->fd, &ptyconf); -+ *(c->oldptyconf) = ptyconf; -+ ptyconf.c_cflag &= ~(ICANON | ECHO); -+ tcsetattr (c->fd, TCSANOW, &ptyconf); -+ -+ snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); -+ fd2 = open (tty, O_RDWR); -+ -+#ifdef USE_KERNEL -+ } -+#endif -+ str = stropt[0]; -+#ifdef DEBUG_PPPD -+ log (LOG_DEBUG, "%s: I'm running: ", __FUNCTION__); -+ for (x = 0; stropt[x]; x++) -+ { -+ log (LOG_DEBUG, "\"%s\" ", stropt[x]); -+ }; -+ log (LOG_DEBUG, "\n"); -+#endif -+ c->pppd = fork (); -+ if (c->pppd < 0) -+ { -+ log (LOG_WARN, "%s: unable to fork(), abandoning!\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ else if (!c->pppd) -+ { -+ struct call *sc; -+ struct tunnel *st; -+ -+ close (0); -+ close (1); -+ close (2); -+#ifdef USE_KERNEL -+ if (!kernel_support && (fd2 < 0)) -+#else -+ if (fd2 < 0) -+#endif -+ { -+ log (LOG_WARN, "%s: Unable to open %s to launch pppd!\n", -+ __FUNCTION__, tty); -+ exit (1); -+ } -+ dup2 (fd2, 0); -+ dup2 (fd2, 1); -+ -+ -+ /* close all the calls pty fds */ -+ st = tunnels.head; -+ while (st) -+ { -+ sc = st->call_head; -+ while (sc) -+ { -+ close (sc->fd); -+ sc = sc->next; -+ } -+ st = st->next; -+ } -+ -+ /* close the UDP socket fd */ -+ close (server_socket); -+ -+ /* close the control pipe fd */ -+ close (control_fd); -+ -+ if( c->dialing[0] ) -+ { -+ setenv( "CALLER_ID", c->dialing, 1 ); -+ } -+ execv (PPPD, stropt); -+ log (LOG_WARN, "%s: Exec of %s failed!\n", __FUNCTION__, PPPD); -+ exit (1); -+ }; -+ close (fd2); -+ pos = 0; -+ while (stropt[pos]) -+ { -+ free (stropt[pos]); -+ pos++; -+ }; -+ return 0; -+} -+ -+void destroy_tunnel (struct tunnel *t) -+{ -+ /* -+ * Immediately destroy a tunnel (and all its calls) -+ * and free its resources. This may be called -+ * by the tunnel itself,so it needs to be -+ * "suicide safe" -+ */ -+ -+ struct call *c, *me; -+ struct tunnel *p; -+ struct timeval tv; -+ if (!t) -+ return; -+ -+ /* -+ * Save ourselves until the very -+ * end, since we might be calling this ourselves. -+ * We must divorce ourself from the tunnel -+ * structure, however, to avoid recursion -+ * because of the logic of the destroy_call -+ */ -+ me = t->self; -+ -+ /* -+ * Destroy all the member calls -+ */ -+ c = t->call_head; -+ while (c) -+ { -+ destroy_call (c); -+ c = c->next; -+ }; -+ /* -+ * Remove ourselves from the list of tunnels -+ */ -+ -+ if (tunnels.head == t) -+ { -+ tunnels.head = t->next; -+ tunnels.count--; -+ } -+ else -+ { -+ p = tunnels.head; -+ if (p) -+ { -+ while (p->next && (p->next != t)) -+ p = p->next; -+ if (p->next) -+ { -+ p->next = t->next; -+ tunnels.count--; -+ } -+ else -+ { -+ log (LOG_WARN, -+ "%s: unable to locate tunnel in tunnel list\n", -+ __FUNCTION__); -+ } -+ } -+ else -+ { -+ log (LOG_WARN, "%s: tunnel list is empty!\n", __FUNCTION__); -+ } -+ } -+ if (t->lac) -+ { -+ t->lac->t = NULL; -+ if (t->lac->redial && (t->lac->rtimeout > 0) && !t->lac->rsched && -+ t->lac->active) -+ { -+ log (LOG_LOG, "%s: Will redial in %d seconds\n", __FUNCTION__, -+ t->lac->rtimeout); -+ tv.tv_sec = t->lac->rtimeout; -+ tv.tv_usec = 0; -+ t->lac->rsched = schedule (tv, magic_lac_dial, t->lac); -+ } -+ } -+ /* XXX L2TP/IPSec: remove relevant SAs here? NTB 20011010 -+ * XXX But what if another tunnel is using same SA? -+ */ -+ if (t->lns) -+ t->lns->t = NULL; -+ free (t); -+ free (me); -+} -+ -+struct tunnel *l2tp_call (char *host, int port, struct lac *lac, -+ struct lns *lns) -+{ -+ /* -+ * Establish a tunnel from us to host -+ * on port port -+ */ -+ struct call *tmp = NULL; -+ struct hostent *hp; -+ unsigned int addr; -+ port = htons (port); -+ hp = gethostbyname (host); -+ if (!hp) -+ { -+ log (LOG_WARN, "%s: gethostbyname() failed for %s.\n", __FUNCTION__, -+ host); -+ return NULL; -+ } -+ bcopy (hp->h_addr, &addr, hp->h_length); -+ /* Force creation of a new tunnel -+ and set it's tid to 0 to cause -+ negotiation to occur */ -+ /* XXX L2TP/IPSec: Set up SA to addr:port here? NTB 20011010 -+ */ -+ tmp = get_call (0, 0, addr, port); -+ if (!tmp) -+ { -+ log (LOG_WARN, "%s: Unable to create tunnel to %s.\n", __FUNCTION__, -+ host); -+ return NULL; -+ } -+ tmp->container->tid = 0; -+ tmp->container->lac = lac; -+ tmp->container->lns = lns; -+ tmp->lac = lac; -+ tmp->lns = lns; -+ if (lac) -+ lac->t = tmp->container; -+ if (lns) -+ lns->t = tmp->container; -+ /* -+ * Since our state is 0, we will establish a tunnel now -+ */ -+ log (LOG_LOG, "%s:Connecting to host %s, port %d\n", __FUNCTION__, host, -+ ntohs (port)); -+ control_finish (tmp->container, tmp); -+ return tmp->container; -+} -+ -+void magic_lac_tunnel (void *data) -+{ -+ struct lac *lac; -+ lac = (struct lac *) data; -+ if (!lac) -+ { -+ log (LOG_WARN, "%s: magic_lac_tunnel: called on NULL lac!\n", -+ __FUNCTION__); -+ return; -+ } -+ if (lac->lns) -+ { -+ /* FIXME: I should try different LNS's if I get failures */ -+ l2tp_call (lac->lns->hostname, lac->lns->port, lac, NULL); -+ return; -+ } -+ else if (deflac && deflac->lns) -+ { -+ l2tp_call (deflac->lns->hostname, deflac->lns->port, lac, NULL); -+ return; -+ } -+ else -+ { -+ log (LOG_WARN, "%s: Unable to find hostname to dial for '%s'\n", -+ __FUNCTION__, lac->entname); -+ return; -+ } -+} -+ -+struct call *lac_call (int tid, struct lac *lac, struct lns *lns) -+{ -+ struct tunnel *t = tunnels.head; -+ struct call *tmp; -+ while (t) -+ { -+ if (t->ourtid == tid) -+ { -+ tmp = new_call (t); -+ if (!tmp) -+ { -+ log (LOG_WARN, "%s: unable to create new call\n", -+ __FUNCTION__); -+ return NULL; -+ } -+ tmp->next = t->call_head; -+ t->call_head = tmp; -+ t->count++; -+ tmp->cid = 0; -+ tmp->lac = lac; -+ tmp->lns = lns; -+ if (lac) -+ lac->c = tmp; -+ log (LOG_LOG, "%s: Calling on tunnel %d\n", __FUNCTION__, tid); -+ strcpy (tmp->dial_no, dial_no_tmp); /* jz: copy dialnumber to tmp->dial_no */ -+ control_finish (t, tmp); -+ return tmp; -+ } -+ t = t->next; -+ }; -+ log (LOG_DEBUG, "%s: No such tunnel %d to generate call.\n", __FUNCTION__, -+ tid); -+ return NULL; -+} -+ -+void magic_lac_dial (void *data) -+{ -+ struct lac *lac; -+ lac = (struct lac *) data; -+ -+ if (!lac) -+ { -+ log (LOG_WARN, "%s : called on NULL lac!\n", __FUNCTION__); -+ return; -+ } -+ if (!lac->active) -+ { -+ log (LOG_DEBUG, "%s: LAC %s not active", __FUNCTION__, lac->entname); -+ return; -+ } -+ lac->rsched = NULL; -+ lac->rtries++; -+ if (lac->rmax && (lac->rtries > lac->rmax)) -+ { -+ log (LOG_LOG, "%s: maximum retries exceeded.\n", __FUNCTION__); -+ return; -+ } -+ if (!lac->t) -+ { -+#ifdef DEGUG_MAGIC -+ log (LOG_DEBUG, "%s : tunnel not up! Connecting!\n", __FUNCTION__); -+#endif -+ magic_lac_tunnel (lac); -+ return; -+ } -+ lac_call (lac->t->ourtid, lac, NULL); -+} -+ -+void lac_hangup (int cid) -+{ -+ struct tunnel *t = tunnels.head; -+ struct call *tmp; -+ while (t) -+ { -+ tmp = t->call_head; -+ while (tmp) -+ { -+ if (tmp->ourcid == cid) -+ { -+ log (LOG_LOG, -+ "%s :Hanging up call %d, Local: %d, Remote: %d\n", -+ __FUNCTION__, tmp->serno, tmp->ourcid, tmp->cid); -+ strcpy (tmp->errormsg, "Goodbye!"); -+/* tmp->needclose = -1; */ -+ kill (tmp->pppd, SIGTERM); -+ return; -+ } -+ tmp = tmp->next; -+ } -+ t = t->next; -+ }; -+ log (LOG_DEBUG, "%s : No such call %d to hang up.\n", __FUNCTION__, cid); -+ return; -+} -+ -+void lac_disconnect (int tid) -+{ -+ struct tunnel *t = tunnels.head; -+ while (t) -+ { -+ if (t->ourtid == tid) -+ { -+ log (LOG_LOG, -+ "%s: Disconnecting from %s, Local: %d, Remote: %d\n", -+ __FUNCTION__, IPADDY (t->peer.sin_addr), t->ourtid, t->tid); -+ t->self->needclose = -1; -+ strcpy (t->self->errormsg, "Goodbye!"); -+ call_close (t->self); -+ return; -+ } -+ t = t->next; -+ }; -+ log (LOG_DEBUG, "%s: No such tunnel %d to hang up.\n", __FUNCTION__, tid); -+ return; -+} -+ -+struct tunnel *new_tunnel () -+{ -+ struct tunnel *tmp = malloc (sizeof (struct tunnel)); -+ char entropy_buf[2] = "\0"; -+ if (!tmp) -+ return NULL; -+ tmp->control_seq_num = 0; -+ tmp->control_rec_seq_num = 0; -+ tmp->cLr = 0; -+ tmp->call_head = NULL; -+ tmp->next = NULL; -+ tmp->debug = -1; -+ tmp->tid = -1; -+ tmp->hello = NULL; -+#ifndef TESTING -+/* while(get_call((tmp->ourtid = rand() & 0xFFFF),0,0,0)); */ -+#ifdef USE_KERNEL -+ if (kernel_support) -+ tmp->ourtid = ioctl (server_socket, L2TPIOCADDTUNNEL, 0); -+ else -+#endif -+/* tmp->ourtid = rand () & 0xFFFF; */ -+ /* get_entropy((char *)&tmp->ourtid, 2); */ -+ get_entropy(entropy_buf, 2); -+ { -+ int *temp; -+ temp = (int *)entropy_buf; -+ tmp->ourtid = *temp & 0xFFFF; -+#ifdef DEBUG_ENTROPY -+ log(LOG_DEBUG, "ourtid = %u, entropy_buf = %hx\n", tmp->ourtid, *temp); -+#endif -+ } -+#else -+ tmp->ourtid = 0x6227; -+#endif -+ tmp->nego = 0; -+ tmp->count = 0; -+ tmp->state = 0; /* Nothing */ -+ tmp->peer.sin_family = AF_INET; -+ tmp->peer.sin_port = 0; -+ bzero (&(tmp->peer.sin_addr), sizeof (tmp->peer.sin_addr)); -+ tmp->sanity = -1; -+ tmp->qtid = -1; -+ tmp->ourfc = ASYNC_FRAMING | SYNC_FRAMING; -+ tmp->ourbc = 0; -+ tmp->ourtb = (((_u64) rand ()) << 32) | ((_u64) rand ()); -+ tmp->fc = -1; /* These really need to be specified by the peer */ -+ tmp->bc = -1; /* And we want to know if they forgot */ -+ tmp->hostname[0] = 0; -+ tmp->vendor[0] = 0; -+ tmp->secret[0] = 0; -+ if (!(tmp->self = new_call (tmp))) -+ { -+ free (tmp); -+ return NULL; -+ }; -+ tmp->ourrws = DEFAULT_RWS_SIZE; -+ tmp->self->ourfbit = FBIT; -+ tmp->lac = NULL; -+ tmp->lns = NULL; -+ tmp->chal_us.state = 0; -+ tmp->chal_us.secret[0] = 0; -+ memset (tmp->chal_us.reply, 0, MD_SIG_SIZE); -+ tmp->chal_them.state = 0; -+ tmp->chal_them.secret[0] = 0; -+ memset (tmp->chal_them.reply, 0, MD_SIG_SIZE); -+ tmp->chal_them.vector = (unsigned char *) malloc (VECTOR_SIZE); -+ tmp->chal_us.vector = NULL; -+ tmp->hbit = 0; -+ return tmp; -+} -+ -+void do_control () -+{ -+ char buf[1024]; -+ char *host, *tunstr, *callstr, *tmpstr; -+ struct lac *lac; -+ int call; -+ int tunl; -+ int cnt = -1; -+ while (cnt) -+ { -+ cnt = read (control_fd, buf, sizeof (buf)); -+ if (cnt > 0) -+ { -+ if (buf[cnt - 1] == '\n') -+ buf[--cnt] = 0; -+#ifdef DEBUG_CONTROL -+ log (LOG_DEBUG, "%s: Got message \"%s\" (%d bytes long)\n", -+ __FUNCTION__, buf, cnt); -+#endif -+ switch (buf[0]) -+ { -+ case 't': -+ host = strchr (buf, ' '); -+ if(!host) -+ goto out; -+ host++; -+#ifdef DEBUG_CONTROL -+ log (LOG_DEBUG, "%s: Attempting to tunnel to %s\n", -+ __FUNCTION__, host); -+#endif -+ l2tp_call (host, UDP_LISTEN_PORT, NULL, NULL); -+ break; -+ case 'c': /* option 'c' for incoming call */ -+ case 'o': /* option 'o' for outgoing call */ -+ tunstr = strchr (buf, ' '); -+ if(!tunstr) -+ goto out; -+ tunstr++; -+ -+ if(buf[0] == 'c') -+ switch_io = 1; /* Switch for Incoming Calls */ -+ else { -+ switch_io = 0; /* Switch for Outgoing Calls */ -+ tmpstr = strchr(tunstr, ' '); -+ if(!tmpstr) -+ goto out; -+ strncpy(dial_no_tmp,tmpstr, sizeof(*dial_no_tmp)); -+ } -+ -+ lac = laclist; -+ while (lac) -+ { -+ if (!strcasecmp (lac->entname, tunstr)) -+ { -+ lac->active = -1; -+ lac->rtries = 0; -+ if (!lac->c) -+ magic_lac_dial (lac); -+ else -+ log (LOG_DEBUG, -+ "%s: Session '%s' already active!\n", -+ __FUNCTION__, lac->entname); -+ break; -+ } -+ lac = lac->next; -+ } -+ if (lac) -+ break; -+ tunl = atoi (tunstr); -+ if (!tunl) -+ { -+ log (LOG_DEBUG, "%s: No such tunnel '%s'\n", __FUNCTION__, -+ tunstr); -+ break; -+ } -+#ifdef DEBUG_CONTROL -+ log (LOG_DEBUG, "%s: Attempting to call on tunnel %d\n", -+ __FUNCTION__, tunl); -+#endif -+ lac_call (tunl, NULL, NULL); -+ break; -+ case 'h': -+ callstr = strchr (buf, ' '); -+ if(!callstr) -+ goto out; -+ callstr++; -+ -+ call = atoi (callstr); -+#ifdef DEBUG_CONTROL -+ log (LOG_DEBUG, "%s: Attempting to call %d\n", __FUNCTION__, -+ call); -+#endif -+ lac_hangup (call); -+ break; -+ case 'd': -+ tunstr = strchr (buf, ' '); -+ if(!tunstr) -+ goto out; -+ tunstr++; -+ -+ lac = laclist; -+ while (lac) -+ { -+ if (!strcasecmp (lac->entname, tunstr)) -+ { -+ lac->active = 0; -+ lac->rtries = 0; -+ if (lac->t) -+ lac_disconnect (lac->t->ourtid); -+ else -+ log (LOG_DEBUG, "%s: Session '%s' not up\n", -+ __FUNCTION__, lac->entname); -+ break; -+ } -+ lac = lac->next; -+ } -+ if (lac) -+ break; -+ tunl = atoi (tunstr); -+ if (!tunl) -+ { -+ log (LOG_DEBUG, "%s: No such tunnel '%s'\n", __FUNCTION__, -+ tunstr); -+ break; -+ } -+#ifdef DEBUG_CONTROL -+ log (LOG_DEBUG, "%s: Attempting to disconnect tunnel %d\n", -+ __FUNCTION__, tunl); -+#endif -+ lac_disconnect (tunl); -+ break; -+ case 's': -+ show_status (); -+ break; -+ default: -+ log (LOG_DEBUG, "%s: Unknown command %c\n", __FUNCTION__, -+ buf[0]); -+ } -+ } -+ } -+ -+out: -+ /* Otherwise select goes nuts */ -+ close (control_fd); -+ control_fd = open (CONTROL_PIPE, O_RDONLY | O_NONBLOCK, 0600); -+} -+ -+void usage(void) { -+ printf("Usage: l2tpd -D -c [config file] -s [secret file] -p [pid file]\n"); -+ printf("\n"); -+ exit(1); -+} -+ -+void init_args(int argc, char *argv[]) { -+ int i=0; -+ gconfig.daemon=1; -+ memset(gconfig.altauthfile,0,STRLEN); -+ memset(gconfig.altconfigfile,0,STRLEN); -+ memset(gconfig.authfile,0,STRLEN); -+ memset(gconfig.configfile,0,STRLEN); -+ memset(gconfig.pidfile,0,STRLEN); -+ strncpy(gconfig.altauthfile,ALT_DEFAULT_AUTH_FILE, -+ sizeof(gconfig.altauthfile) - 1); -+ strncpy(gconfig.altconfigfile,ALT_DEFAULT_CONFIG_FILE, -+ sizeof(gconfig.altconfigfile) - 1); -+ strncpy(gconfig.authfile,DEFAULT_AUTH_FILE, -+ sizeof(gconfig.authfile) - 1); -+ strncpy(gconfig.configfile,DEFAULT_CONFIG_FILE, -+ sizeof(gconfig.configfile) - 1); -+ strncpy(gconfig.pidfile,DEFAULT_PID_FILE, -+ sizeof(gconfig.pidfile) - 1); -+ for (i = 1; i < argc; i++) { -+ if(! strncmp(argv[i],"-c",2)) { -+ if(++i == argc) -+ usage(); -+ else -+ strncpy(gconfig.configfile,argv[i], -+ sizeof(gconfig.configfile) - 1); -+ } -+ else if (! strncmp(argv[i],"-D",2)) { -+ gconfig.daemon=0; -+ } -+ else if (! strncmp(argv[i],"-s",2)) { -+ if(++i == argc) -+ usage(); -+ else -+ strncpy(gconfig.authfile,argv[i], -+ sizeof(gconfig.authfile) - 1); -+ } -+ else if (! strncmp(argv[i],"-p",2)) { -+ if(++i == argc) -+ usage(); -+ else -+ strncpy(gconfig.pidfile,argv[i], -+ sizeof(gconfig.pidfile) - 1); -+ } -+ else { -+ usage(); -+ } -+ } -+} -+ -+ -+void daemonize() { -+ int pid=0; -+ int i,l; -+ char buf[STRLEN]; -+ -+ if((pid = fork()) < 0) { -+ log(LOG_LOG, "%s: Unable to fork ()\n",__FUNCTION__); -+ close(server_socket); -+ exit(1); -+ } -+ else if (pid) -+ exit(0); -+ -+ -+ close(0); -+ close(1); -+ close(2); -+ dup2(open("/dev/null", O_RDONLY), 0); -+ dup2(open("/dev/null", O_RDONLY), 1); -+ dup2(open("/dev/null", O_RDONLY), 2); -+ -+ /* Read previous pid file. */ -+ if((i = open(gconfig.pidfile,O_RDONLY)) > 0) { -+ l=read(i,buf,sizeof(buf)-1); -+ if (l >= 0) { -+ buf[l] = '\0'; -+ pid = atoi(buf); -+ } -+ close(i); -+ -+ /* if pid is read and process exist exit */ -+ if(pid && !kill(pid, 0)) { -+ log(LOG_LOG, "%s: There's already a l2tpd server running.\n", -+ __FUNCTION__); -+ close(server_socket); -+ exit(1); -+ } -+ -+ /* remove stalled pid file */ -+ unlink(gconfig.pidfile); -+ } -+ -+ pid = setsid(); -+ -+ /* create new pid file */ -+ if ((i = open (gconfig.pidfile, O_WRONLY | O_CREAT, 0644)) >= 0) { -+ snprintf (buf, sizeof(buf), "%d", (int)getpid()); -+ write (i, buf, strlen(buf)); -+ close (i); -+ } -+ else { -+ log(LOG_LOG, "%s: could not write pid file %s error %d", -+ __FUNCTION__, gconfig.pidfile, i); -+ close(server_socket); -+ exit(1); -+ } -+} -+ -+ -+void init (int argc,char *argv[]) -+{ -+ struct lac *lac; -+ struct in_addr listenaddr; -+ -+ init_args (argc,argv); -+ srand( time(NULL) ); -+ rand_source = 0; -+ init_addr (); -+ if (init_config ()) -+ { -+ log (LOG_CRIT, "%s: Unable to load config file\n", __FUNCTION__); -+ exit (1); -+ } -+ if (uname (&uts)) -+ { -+ log (LOG_CRIT, "%s : Unable to determine host system\n", -+ __FUNCTION__); -+ exit (1); -+ } -+ init_tunnel_list (&tunnels); -+ if (init_network ()) -+ exit (1); -+ if (gconfig.daemon) -+ daemonize (); -+ signal (SIGTERM, &death_handler); -+ signal (SIGINT, &death_handler); -+ signal (SIGCHLD, &child_handler); -+ signal (SIGUSR1, &status_handler); -+ signal (SIGHUP, &null_handler); -+ init_scheduler (); -+ mkfifo (CONTROL_PIPE, 0600); -+ control_fd = open (CONTROL_PIPE, O_RDONLY | O_NONBLOCK, 0600); -+ if (control_fd < 0) -+ { -+ log (LOG_CRIT, "%s: Unable to open " CONTROL_PIPE " for reading.", -+ __FUNCTION__); -+ exit (1); -+ } -+ log (LOG_LOG, "l2tpd version " SERVER_VERSION " started on %s PID:%d\n", -+ hostname, getpid ()); -+ listenaddr.s_addr = gconfig.listenaddr; -+ log (LOG_LOG, "%s version %s on a %s, listening on IP address %s, port %d\n", uts.sysname, -+ uts.release, uts.machine, inet_ntoa(listenaddr), gconfig.port); -+ lac = laclist; -+ while (lac) -+ { -+ if (lac->autodial) -+ { -+#ifdef DEBUG_MAGIC -+ log (LOG_DEBUG, "%s: Autodialing '%s'\n", __FUNCTION__, -+ lac->entname[0] ? lac->entname : "(unnamed)"); -+#endif -+ lac->active = -1; -+ switch_io = 1; /* If we're a LAC, autodials will be ICRQ's */ -+ magic_lac_dial (lac); -+ } -+ lac = lac->next; -+ } -+} -+ -+int main (int argc, char *argv[]) -+{ -+ init(argc,argv); -+ dial_no_tmp = calloc (128, sizeof (char)); -+ network_thread (); -+ return 0; -+} diff --git a/openwrt/package/l2tpd/patches/04-gcc4.patch b/openwrt/package/l2tpd/patches/04-gcc4.patch deleted file mode 100644 index c4a906eaced..00000000000 --- a/openwrt/package/l2tpd/patches/04-gcc4.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN ../tmp-orig/l2tpd-0.70-pre20031121/aaa.c ./aaa.c ---- ../tmp-orig/l2tpd-0.70-pre20031121/aaa.c 2004-12-09 09:54:10.159417376 +0100 -+++ ./aaa.c 2004-12-09 09:54:01.918670160 +0100 -@@ -27,7 +27,7 @@ - - /* FIXME: Accounting? */ - --static struct addr_ent *uaddr[ADDR_HASH_SIZE]; -+struct addr_ent *uaddr[ADDR_HASH_SIZE]; - - void init_addr () - { diff --git a/openwrt/package/l2tpd/patches/04-nonblock.patch b/openwrt/package/l2tpd/patches/04-nonblock.patch deleted file mode 100644 index 7fc2226acda..00000000000 --- a/openwrt/package/l2tpd/patches/04-nonblock.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- l2tpd-0.70-pre20031121.orig/l2tpd.c.orig 2006-04-05 13:28:36.000000000 +0100 -+++ l2tpd-0.70-pre20031121.orig/l2tpd.c 2006-04-05 13:33:39.000000000 +0100 -@@ -289,6 +289,8 @@ - #endif - struct termios ptyconf; - char *str; -+ int flags; -+ - p = opts; - stropt[0] = strdup (PPPD); - while (p) -@@ -347,6 +349,14 @@ - close(c->fd); - return -EINVAL; - } -+ flags = fcntl(c->fd, F_GETFL); -+ if (flags < 0 || fcntl(c->fd, F_SETFL, flags | O_NONBLOCK) < 0) -+ { -+ log (LOG_WARN, "%s: unable to fcntl(O_NONBLOCK) on pty\n", -+ __FUNCTION__); -+ close(c->fd); -+ return -EINVAL; -+ } - tty = ptsname(c->fd); - if (tty == NULL) - { diff --git a/openwrt/package/l2tpd/patches/05-df-disable.patch b/openwrt/package/l2tpd/patches/05-df-disable.patch deleted file mode 100644 index 806c48d128a..00000000000 --- a/openwrt/package/l2tpd/patches/05-df-disable.patch +++ /dev/null @@ -1,25 +0,0 @@ -Patch to stop l2tpd setting the DF bit on each of the packets it sends. -Apart from not being useful with L2TP, this also prevents interoperating -with Cisco IOS over IPSEC. - ---- l2tpd-0.70-pre20031121.orig/network.c.orig 2006-04-11 08:50:38.000000000 +0100 -+++ l2tpd-0.70-pre20031121.orig/network.c 2006-04-11 08:58:18.000000000 +0100 -@@ -56,6 +56,18 @@ - __FUNCTION__); - return -EINVAL; - }; -+#ifdef IP_MTU_DISCOVER -+#ifdef IP_PMTUDISC_DONT -+ { -+ /* Don't set DF bit on outbound packets */ -+ int val = IP_PMTUDISC_DONT; -+ if (setsockopt(server_socket, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val)) < 0) -+ { -+ log (LOG_LOG, "Failed to disable PMTU discovery\n"); -+ } -+ } -+#endif -+#endif - /* L2TP/IPSec: Set up SA for listening port here? NTB 20011015 - */ - if (bind (server_socket, (struct sockaddr *) &server, sizeof (server))) diff --git a/openwrt/package/l2tpns/Config.in b/openwrt/package/l2tpns/Config.in deleted file mode 100644 index e78b46b1c9d..00000000000 --- a/openwrt/package/l2tpns/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_L2TPNS - prompt "l2tpns............................ An L2TP enhanced server" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBCLI - help - l2tpns is a layer 2 tunneling protocol network server (LNS). - It supports up to 65535 concurrent sessions per server/cluster - plus ISP features such as rate limiting, walled garden, usage - accounting, and more. - - http://sourceforge.net/projects/l2tpns diff --git a/openwrt/package/l2tpns/Makefile b/openwrt/package/l2tpns/Makefile deleted file mode 100644 index 278ecdd2975..00000000000 --- a/openwrt/package/l2tpns/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=l2tpns -PKG_VERSION:=2.1.14 -PKG_RELEASE:=1 -PKG_MD5SUM:=2a0ee2a3678160c335f1d68c17c4f871 - -PKG_SOURCE_URL:=@SF/l2tpns -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,L2TPNS,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - LD=$(TARGET_CC) \ - OPTIM="$(TARGET_CFLAGS)" \ - DESTDIR=$(PKG_INSTALL_DIR) \ - STAGING_DIR=$(STAGING_DIR) \ - all install - touch $@ - -$(IPKG_L2TPNS): - install -d -m0755 $(IDIR_L2TPNS)/etc/l2tpns - $(CP) $(PKG_INSTALL_DIR)/etc/l2tpns/* $(IDIR_L2TPNS)/etc/l2tpns/ - install -d -m0755 $(IDIR_L2TPNS)/usr/lib/l2tpns - $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tpns/* $(IDIR_L2TPNS)/usr/lib/l2tpns/ - install -d -m0755 $(IDIR_L2TPNS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_L2TPNS)/usr/sbin/ - $(RSTRIP) $(IDIR_L2TPNS) - $(IPKG_BUILD) $(IDIR_L2TPNS) $(PACKAGE_DIR) diff --git a/openwrt/package/l2tpns/ipkg/l2tpns.conffiles b/openwrt/package/l2tpns/ipkg/l2tpns.conffiles deleted file mode 100644 index eaf3a509542..00000000000 --- a/openwrt/package/l2tpns/ipkg/l2tpns.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/l2tpns/ip_pool -/etc/l2tpns/startup-config -/etc/l2tpns/users diff --git a/openwrt/package/l2tpns/ipkg/l2tpns.control b/openwrt/package/l2tpns/ipkg/l2tpns.control deleted file mode 100644 index 1946f88880f..00000000000 --- a/openwrt/package/l2tpns/ipkg/l2tpns.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: l2tpns -Section: net -Priority: optional -Description: A layer 2 tunneling protocol network server (LNS). diff --git a/openwrt/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch b/openwrt/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch deleted file mode 100644 index a8e4d754a5e..00000000000 --- a/openwrt/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff -urN orig/l2tpns-2.1.14/Makefile l2tpns-2.1.14/Makefile ---- orig/l2tpns-2.1.14/Makefile 2005-12-07 06:21:37.000000000 +0100 -+++ l2tpns-2.1.14/Makefile 2005-12-14 12:50:49.000000000 +0100 -@@ -11,17 +11,14 @@ - DEFINES += -DETCDIR='"$(etcdir)"' - - OPTIM = --OPTIM += -g - OPTIM += -O3 - --CC = gcc --LD = gcc --INCLUDES = -I. -+INCLUDES = -I. -I$(STAGING_DIR)/usr/include - CPPFLAGS = $(INCLUDES) $(DEFINES) - CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM) --LDFLAGS = -+LDFLAGS = -L$(STAGING_DIR)/usr/lib - LDLIBS = --INSTALL = install -c -D -o root -g root -+INSTALL = install -c -D - - l2tpns.LIBS = -lm -lcli -ldl - -diff -urN orig/l2tpns-2.1.14/l2tpns.c l2tpns-2.1.14/l2tpns.c ---- orig/l2tpns-2.1.14/l2tpns.c 2005-12-07 06:21:37.000000000 +0100 -+++ l2tpns-2.1.14/l2tpns.c 2005-12-14 12:50:36.000000000 +0100 -@@ -940,18 +940,14 @@ - - if (!t) - { -- static int backtrace_count = 0; - LOG(0, 0, t, "tunnelsend called with 0 as tunnel id\n"); - STAT(tunnel_tx_errors); -- log_backtrace(backtrace_count, 5) - return; - } - - if (!tunnel[t].ip) - { -- static int backtrace_count = 0; - LOG(1, 0, t, "Error sending data out tunnel: no remote endpoint (tunnel not set up)\n"); -- log_backtrace(backtrace_count, 5) - STAT(tunnel_tx_errors); - return; - } -@@ -4125,23 +4121,8 @@ - struct sched_param params = {0}; - params.sched_priority = 1; - -- if (get_nprocs() < 2) -- { -- LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n"); -- config->scheduler_fifo = 0; -- } -- else -- { -- if ((ret = sched_setscheduler(0, SCHED_FIFO, ¶ms)) == 0) -- { -- LOG(1, 0, 0, "Using FIFO scheduler. Say goodbye to any other processes running\n"); -- } -- else -- { -- LOG(0, 0, 0, "Error setting scheduler to FIFO: %s\n", strerror(errno)); -- config->scheduler_fifo = 0; -- } -- } -+ LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n"); -+ config->scheduler_fifo = 0; - } - - /* Set up the cluster communications port. */ -diff -urN orig/l2tpns-2.1.14/l2tpns.h l2tpns-2.1.14/l2tpns.h ---- orig/l2tpns-2.1.14/l2tpns.h 2005-12-09 01:43:17.000000000 +0100 -+++ l2tpns-2.1.14/l2tpns.h 2005-12-14 07:43:51.000000000 +0100 -@@ -5,7 +5,6 @@ - #define __L2TPNS_H__ - - #include --#include - #include - #include - #include -@@ -766,21 +765,6 @@ - extern ippoolt *ip_address_pool; - #define sessionfree (session[0].next) - --#define log_backtrace(count, max) \ --if (count++ < max) { \ -- void *array[20]; \ -- char **strings; \ -- int size, i; \ -- LOG(0, 0, t, "Backtrace follows:\n"); \ -- size = backtrace(array, 10); \ -- strings = backtrace_symbols(array, size); \ -- if (strings) for (i = 0; i < size; i++) \ -- { \ -- LOG(0, 0, t, " %s\n", strings[i]); \ -- } \ -- free(strings); \ --} -- - - extern configt *config; - extern time_t basetime; // Time when this process started. -diff -urN orig/l2tpns-2.1.14/ppp.c l2tpns-2.1.14/ppp.c ---- orig/l2tpns-2.1.14/ppp.c 2005-12-07 06:21:37.000000000 +0100 -+++ l2tpns-2.1.14/ppp.c 2005-12-14 07:43:08.000000000 +0100 -@@ -1755,9 +1755,7 @@ - { - if (size < 12) // Need more space than this!! - { -- static int backtrace_count = 0; - LOG(0, s, t, "makeppp buffer too small for L2TP header (size=%d)\n", size); -- log_backtrace(backtrace_count, 5) - return NULL; - } - -@@ -1780,9 +1778,7 @@ - - if (l + 12 > size) - { -- static int backtrace_count = 0; - LOG(2, s, t, "makeppp would overflow buffer (size=%d, header+payload=%d)\n", size, l + 12); -- log_backtrace(backtrace_count, 5) - return NULL; - } - diff --git a/openwrt/package/lcd4linux/Config.in b/openwrt/package/lcd4linux/Config.in deleted file mode 100644 index 9dbb1dad64b..00000000000 --- a/openwrt/package/lcd4linux/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LCD4LINUX - prompt "lcd4linux......................... Program to access an external LCD" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - LCD4Linux - - https://ssl.bulix.org/projects/lcd4linux/wiki/Howto - diff --git a/openwrt/package/lcd4linux/Makefile b/openwrt/package/lcd4linux/Makefile deleted file mode 100644 index 09d329b9dcc..00000000000 --- a/openwrt/package/lcd4linux/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lcd4linux -PKG_VERSION:=0.10.0+cvs20051015 -PKG_RELEASE:=1 -PKG_MD5SUM:=5b5ac629be4bb5c29104fb8f6b7fa444 - -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/lcd4linux/ \ - http://ftp.de.debian.org/debian/pool/main/l/lcd4linux/ -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LCD4LINUX,lcd4linux,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --without-x \ - --with-drivers='all,!PNG,!RouterBoard,!X11' \ - --with-plugins=wireless \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ - CFLAGS="$(TARGET_CFLAGS) -Wall" - touch $@ - -$(IPKG_LCD4LINUX): - install -d -m0755 $(IDIR_LCD4LINUX)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/lcd4linux $(IDIR_LCD4LINUX)/usr/bin/ - $(RSTRIP) $(IDIR_LCD4LINUX) - $(IPKG_BUILD) $(IDIR_LCD4LINUX) $(PACKAGE_DIR) diff --git a/openwrt/package/lcd4linux/ipkg/lcd4linux.control b/openwrt/package/lcd4linux/ipkg/lcd4linux.control deleted file mode 100644 index f4809f0126f..00000000000 --- a/openwrt/package/lcd4linux/ipkg/lcd4linux.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lcd4linux -Priority: optional -Section: apps -Description: lcd software -Depends: libncurses diff --git a/openwrt/package/lcd4linux/patches/100-drv_RouterBoard.patch b/openwrt/package/lcd4linux/patches/100-drv_RouterBoard.patch deleted file mode 100644 index fc9cbb43a97..00000000000 --- a/openwrt/package/lcd4linux/patches/100-drv_RouterBoard.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- lcd4linux-0.10.0-RC1/drv_RouterBoard.c 2004-08-30 15:20:45.000000000 +0200 -+++ lcd-patched/drv_RouterBoard.c 2005-03-19 16:03:26.849650830 +0100 -@@ -113,7 +113,7 @@ - #include - #include - #include --#include -+#include - - #include "debug.h" - #include "cfg.h" diff --git a/openwrt/package/lcd4linux/patches/110-ucdelay.patch b/openwrt/package/lcd4linux/patches/110-ucdelay.patch deleted file mode 100644 index 0908973b72f..00000000000 --- a/openwrt/package/lcd4linux/patches/110-ucdelay.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN lcd4linux.old/udelay.h lcd4linux.dev/udelay.h ---- lcd4linux.old/udelay.h 2005-05-08 06:32:45.000000000 +0200 -+++ lcd4linux.dev/udelay.h 2006-01-20 03:50:36.806897500 +0100 -@@ -76,7 +76,7 @@ - /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ - static inline void rep_nop(void) - { -- __asm__ __volatile__("rep; nop"); -+ __asm__ __volatile__("nop"); - } - - diff --git a/openwrt/package/lcd4linux/patches/120-remove_parport_outb.patch b/openwrt/package/lcd4linux/patches/120-remove_parport_outb.patch deleted file mode 100644 index 37693241a01..00000000000 --- a/openwrt/package/lcd4linux/patches/120-remove_parport_outb.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urN lcd4linux.old/drv_generic_parport.c lcd4linux.dev/drv_generic_parport.c ---- lcd4linux.old/drv_generic_parport.c 2006-01-20 03:52:18.426419500 +0100 -+++ lcd4linux.dev/drv_generic_parport.c 2006-01-20 03:57:59.205263500 +0100 -@@ -134,6 +134,11 @@ - #define PARPORT_STATUS_BUSY 0x80 - #endif - -+#ifndef WITH_OUTB -+#define inb(foo) 0 -+#define outb(foo,bar) 0 -+#endif -+ - #if !defined(WITH_OUTB) && !defined(WITH_PPDEV) - #error neither outb() nor ppdev() possible - #error cannot compile parallel port driver diff --git a/openwrt/package/less/Config.in b/openwrt/package/less/Config.in deleted file mode 100644 index 2581bd923bd..00000000000 --- a/openwrt/package/less/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LESS - prompt "less.............................. A text file viewer." - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - less - less is a pager. A pager usually displays text files. - - http://www.greenwoodsoftware.com/less/ - diff --git a/openwrt/package/less/Makefile b/openwrt/package/less/Makefile deleted file mode 100644 index 51e0a5e482f..00000000000 --- a/openwrt/package/less/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=less -PKG_VERSION:=381 -PKG_RELEASE:=1 -PKG_MD5SUM:=40c2dd4ac137b61b6a55a6478817daf4 - -PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LESS,less,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="-I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --without-regex \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_LESS): - install -d -m0755 $(IDIR_LESS)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/less $(IDIR_LESS)/usr/bin/ - $(RSTRIP) $(IDIR_LESS) - $(IPKG_BUILD) $(IDIR_LESS) $(PACKAGE_DIR) diff --git a/openwrt/package/less/ipkg/less.control b/openwrt/package/less/ipkg/less.control deleted file mode 100644 index dbf4e4fa773..00000000000 --- a/openwrt/package/less/ipkg/less.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: less -Priority: optional -Section: misc -Depends: libncurses -Description: A text mode pager diff --git a/openwrt/package/libamsel/Config.in b/openwrt/package/libamsel/Config.in deleted file mode 100644 index 60738b4ef64..00000000000 --- a/openwrt/package/libamsel/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_LIBAMSEL - prompt "libamsel.......................... The amwall library" - tristate - default m if CONFIG_DEVEL - help - A library for amwall configuration files - - http://amselinux.de/ - diff --git a/openwrt/package/libamsel/Makefile b/openwrt/package/libamsel/Makefile deleted file mode 100644 index 0a32c73eaf5..00000000000 --- a/openwrt/package/libamsel/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libamsel -PKG_VERSION:=20040621-cvs -PKG_RELEASE:=1 -PKG_MD5SUM:=2077e620047404881a65d39c53c9917e - -PKG_SOURCE_URL:=ftp://ftp.amselinux.net/source/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBAMSEL,libamsel,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - LDIR=$(PKG_BUILD_DIR) \ - PREFIX="$(PKG_INSTALL_DIR)/usr" \ - all install - touch $@ - -$(IPKG_LIBAMSEL): - install -d -m0755 $(IDIR_LIBAMSEL)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(IDIR_LIBAMSEL)/usr/lib - $(RSTRIP) $(IDIR_LIBAMSEL) - $(IPKG_BUILD) $(IDIR_LIBAMSEL) $(PACKAGE_DIR) - - -$(STAGING_DIR)/usr/lib/libamsel.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/amsel/compat.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/include/compat - $(CP) $(PKG_INSTALL_DIR)/usr/include/amsel/compat/queue.h $(STAGING_DIR)/usr/include/compat - mkdir -p $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libamsel.so $(STAGING_DIR)/usr/lib/ - touch $(STAGING_DIR)/usr/lib/libamsel.so - -install-dev: $(STAGING_DIR)/usr/lib/libamsel.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/compat.h \ - $(STAGING_DIR)/usr/include/compat \ - $(STAGING_DIR)/usr/lib/libamsel.so \ - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/libamsel/ipkg/libamsel.control b/openwrt/package/libamsel/ipkg/libamsel.control deleted file mode 100644 index 9629fa3995a..00000000000 --- a/openwrt/package/libamsel/ipkg/libamsel.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libamsel -Priority: optional -Section: libs -Description: library for amwall diff --git a/openwrt/package/libao/Config.in b/openwrt/package/libao/Config.in deleted file mode 100644 index 67403aece26..00000000000 --- a/openwrt/package/libao/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LIBAO - prompt "libao............................. A cross platform audio library" - tristate - default m if CONFIG_DEVEL - help - Libao is a cross-platform audio library that allows programs to - output audio using a simple API on a wide variety of platforms. - - http://www.xiph.org/ao/ - diff --git a/openwrt/package/libao/Makefile b/openwrt/package/libao/Makefile deleted file mode 100644 index dee885ea2dd..00000000000 --- a/openwrt/package/libao/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libao -PKG_VERSION:=0.8.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=12e136a4c0995068ff134997c84421ed - -PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ao/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBAO,libao,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --disable-esd \ - --disable-arts \ - --disable-nas \ - --disable-polyp \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBAO): - install -m0755 -d $(IDIR_LIBAO)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(IDIR_LIBAO)/usr/lib/ - $(RSTRIP) $(IDIR_LIBAO) - $(IPKG_BUILD) $(IDIR_LIBAO) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libao.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ao $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so* $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ao.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libao.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/ao \ - $(STAGING_DIR)/usr/lib/libao.a \ - $(STAGING_DIR)/usr/lib/libao.so* \ - $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libao/ipkg/libao.control b/openwrt/package/libao/ipkg/libao.control deleted file mode 100644 index 510392922db..00000000000 --- a/openwrt/package/libao/ipkg/libao.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libao -Priority: optional -Section: libs -Description: A cross platform audio library diff --git a/openwrt/package/libart/Config.in b/openwrt/package/libart/Config.in deleted file mode 100644 index 562e77f68be..00000000000 --- a/openwrt/package/libart/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_LIBART - prompt "libart............................ An high-performance 2D graphics library" - tristate -# default m if CONFIG_DEVEL - default n - help - A library of functions for 2D graphics supporting a superset of the - PostScript imaging model, designed to be integrated with graphics, artwork, - and illustration programs. It is written in optimized C, and is fully - compatible with C++. With a small footprint of 10,000 lines of code, it is - especially suitable for embedded applications. - - http://www.levien.com/libart/ - diff --git a/openwrt/package/libart/Makefile b/openwrt/package/libart/Makefile deleted file mode 100644 index 558ff212352..00000000000 --- a/openwrt/package/libart/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libart -PKG_VERSION:=2.3.17 -PKG_RELEASE:=1 -PKG_MD5SUM:=f1f6b3e5490f382535dccb288f5d8b14 - -PKG_SOURCE_URL:=http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3 -PKG_SOURCE:=$(PKG_NAME)_lgpl-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_lgpl-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBART,libart,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - $(TARGET_CONFIGURE_OPTS) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared=yes \ - --enable-static=yes \ - --disable-rpath \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - HOSTCC="$(HOSTCC)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBART): - install -d -m0755 $(IDIR_LIBART)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.so.* $(IDIR_LIBART)/usr/lib/ - $(RSTRIP) $(IDIR_LIBART) - $(IPKG_BUILD) $(IDIR_LIBART) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libart_lgpl_2.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libart2-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libart-2.0 $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libart-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libart_lgpl_2.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/libart2-config \ - $(STAGING_DIR)/usr/include/libart-2.0 \ - $(STAGING_DIR)/usr/lib/libart_lgpl_2.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/libart-2.0.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libart/ipkg/libart.control b/openwrt/package/libart/ipkg/libart.control deleted file mode 100644 index 42d9523adff..00000000000 --- a/openwrt/package/libart/ipkg/libart.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: libart -Priority: optional -Section: libs -Description: An high-performance 2D graphics library. - A library of functions for 2D graphics supporting a superset of the - PostScript imaging model, designed to be integrated with graphics, artwork, - and illustration programs. It is written in optimized C, and is fully - compatible with C++. With a small footprint of 10,000 lines of code, it is - especially suitable for embedded applications. diff --git a/openwrt/package/libart/patches/100-cross_compile_fix.patch b/openwrt/package/libart/patches/100-cross_compile_fix.patch deleted file mode 100644 index aae1acccfae..00000000000 --- a/openwrt/package/libart/patches/100-cross_compile_fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urN libart.old/Makefile.in libart.dev/Makefile.in ---- libart.old/Makefile.in 2005-01-21 10:52:11.000000000 +0100 -+++ libart.dev/Makefile.in 2005-07-17 19:31:05.000000000 +0200 -@@ -440,9 +440,9 @@ - @rm -f testuta$(EXEEXT) - $(LINK) $(testuta_LDFLAGS) $(testuta_OBJECTS) $(testuta_LDADD) $(LIBS) - --gen_art_config$(EXEEXT): $(gen_art_config_OBJECTS) $(gen_art_config_DEPENDENCIES) -+gen_art_config$(EXEEXT): - @rm -f gen_art_config$(EXEEXT) -- $(LINK) $(gen_art_config_LDFLAGS) $(gen_art_config_OBJECTS) $(gen_art_config_LDADD) $(LIBS) -+ $(HOSTCC) -I. -DLIBART_COMPILATION -DHAVE_CONFIG_H -o $@ gen_art_config.c - - install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) diff --git a/openwrt/package/libaudiofile/Config.in b/openwrt/package/libaudiofile/Config.in deleted file mode 100644 index f9a89de1e39..00000000000 --- a/openwrt/package/libaudiofile/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_LIBAUDIOFILE - prompt "libaudiofile...................... An open-source version of SGI's audiofile library" - tristate - help - The audiofile library allows the processing of audio data to and from audio - files of many common formats (currently AIFF, AIFF-C, WAVE, NeXT/Sun, BICS, - and raw data). diff --git a/openwrt/package/libaudiofile/Makefile b/openwrt/package/libaudiofile/Makefile deleted file mode 100644 index 308bf169c32..00000000000 --- a/openwrt/package/libaudiofile/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libaudiofile -PKG_VERSION:=0.2.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=460f848ce5f4a33ae66b15a4fb7720ec - -PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/peercast -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBAUDIOFILE,libaudiofile,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_linux_vers=$(BR2_DEFAULT_KERNEL_HEADERS) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --with-build-cc=$(HOSTCC) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CCOPT="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBAUDIOFILE): - install -m0755 -d $(IDIR_LIBAUDIOFILE)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so.* $(IDIR_LIBAUDIOFILE)/usr/lib/ - $(RSTRIP) $(IDIR_LIBAUDIOFILE) - $(IPKG_BUILD) $(IDIR_LIBAUDIOFILE) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libaudiofile.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/audiofile-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/af_vfs.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/audiofile.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/aupvlist.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so* $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/audiofile.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/audiofile.pc - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/audiofile.pc - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libaudiofile.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/af_vfs.h \ - $(STAGING_DIR)/usr/include/audiofile.h \ - $(STAGING_DIR)/usr/include/aupvlist.h \ - $(STAGING_DIR)/usr/lib/libaudiofile.a \ - $(STAGING_DIR)/usr/lib/libaudiofile.so* \ - $(STAGING_DIR)/usr/lib/pkgconfig/libaudiofile.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libaudiofile/ipkg/libaudiofile.control b/openwrt/package/libaudiofile/ipkg/libaudiofile.control deleted file mode 100644 index b9ba5e1845a..00000000000 --- a/openwrt/package/libaudiofile/ipkg/libaudiofile.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libaudiofile -Priority: optional -Section: libs -Description: Open-source version of SGI's audiofile library diff --git a/openwrt/package/libaudiofile/patches/001-audiofile-config-libdirs.patch b/openwrt/package/libaudiofile/patches/001-audiofile-config-libdirs.patch deleted file mode 100644 index ba92d7d4ef4..00000000000 --- a/openwrt/package/libaudiofile/patches/001-audiofile-config-libdirs.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- libaudiofile-0.2.6/audiofile-config.in.orig 2004-03-06 07:39:23.000000000 +0100 -+++ libaudiofile-0.2.6/audiofile-config.in 2005-12-13 14:15:52.000000000 +0100 -@@ -45,7 +45,9 @@ - echo $includes - ;; - --libs) -- libdirs=-L@libdir@ -+ if test @libdir@ != /usr/libdir ; then -+ libdirs=-L@libdir@ -+ fi - echo $libdirs -laudiofile -lm - ;; - *) diff --git a/openwrt/package/libcli/Config.in b/openwrt/package/libcli/Config.in deleted file mode 100644 index a7a187cca8c..00000000000 --- a/openwrt/package/libcli/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_LIBCLI - prompt "libcli............................ A Cisco-like command line interface" - tristate - default m if CONFIG_DEVEL - help - Provides a shared library for including a Cisco-like - command-line interface into other software. It's a telnet - interface which supports command-line editing, history, - authentication and callbacks for a user-definable function tree - - http://libcli.sourceforge.net/ diff --git a/openwrt/package/libcli/Makefile b/openwrt/package/libcli/Makefile deleted file mode 100755 index 398ee092d25..00000000000 --- a/openwrt/package/libcli/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libcli -PKG_VERSION:=1.8.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=0fdd30df5a8c1388a4549751ba61247a - -PKG_SOURCE_URL:=@SF/libcli -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBCLI,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CC) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - -C $(PKG_BUILD_DIR) install - touch $@ - -$(IPKG_LIBCLI): - install -d -m0755 $(IDIR_LIBCLI)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcli* $(IDIR_LIBCLI)/usr/lib - $(RSTRIP) $(IDIR_LIBCLI) - $(IPKG_BUILD) $(IDIR_LIBCLI) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libcli.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libcli.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcli.so* $(STAGING_DIR)/usr/lib/ - -install-dev: $(STAGING_DIR)/usr/lib/libcli.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/libcli.h \ - $(STAGING_DIR)/usr/lib/libcli.so* - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/libcli/ipkg/libcli.control b/openwrt/package/libcli/ipkg/libcli.control deleted file mode 100755 index 6ef456b5975..00000000000 --- a/openwrt/package/libcli/ipkg/libcli.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libcli -Section: libs -Architecture: mipsel -Priority: optional -Description: Provides a shared library for including a Cisco-like command-line interface into other software. \ No newline at end of file diff --git a/openwrt/package/libcli/patches/01-remove_debug_honor_prefix.patch b/openwrt/package/libcli/patches/01-remove_debug_honor_prefix.patch deleted file mode 100644 index 830baa07209..00000000000 --- a/openwrt/package/libcli/patches/01-remove_debug_honor_prefix.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -urN orig/libcli-1.8.5/Makefile libcli-1.8.5/Makefile ---- orig/libcli-1.8.5/Makefile 2005-05-02 11:57:39.000000000 +0200 -+++ libcli-1.8.5/Makefile 2005-12-13 17:42:46.000000000 +0100 -@@ -1,13 +1,12 @@ - DESTDIR = --PREFIX = /usr/local -+PREFIX = /usr/ - - MAJOR = 1 - MINOR = 8 - REVISION = 5 - LIB = libcli.so - --CC = gcc --DEBUG = -g -+DEBUG = - OPTIM = -O3 - CFLAGS += $(DEBUG) $(OPTIM) -Wall -Wformat-security -Wno-format-zero-length - LDFLAGS += -shared -Wl,-soname,$(LIB).$(MAJOR).$(MINOR) diff --git a/openwrt/package/libdaemon/Config.in b/openwrt/package/libdaemon/Config.in deleted file mode 100644 index 3cda2d0728e..00000000000 --- a/openwrt/package/libdaemon/Config.in +++ /dev/null @@ -1,19 +0,0 @@ -config BR2_PACKAGE_LIBDAEMON - prompt "libdaemon......................... A lightweight C library that eases the writing of UNIX daemons" - tristate - default m if CONFIG_DEVEL - help - libdaemon is a lightweight C library that eases the writing of UNIX daemons. - It consists of the following parts: - - * A wrapper around fork() which does the correct daemonization procedure of a process - * A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR - * An API for writing PID files - * An API for serializing UNIX signals into a pipe for usage with select() or poll() - * An API for running subprocesses with STDOUT and STDERR redirected to syslog. - - APIs like these are used in most daemon software available. It is not that - simple to get it done right and code duplication is not a goal. - - http://0pointer.de/lennart/projects/libdaemon/ - diff --git a/openwrt/package/libdaemon/Makefile b/openwrt/package/libdaemon/Makefile deleted file mode 100644 index 272e8c2b75d..00000000000 --- a/openwrt/package/libdaemon/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libdaemon -PKG_VERSION:=0.10 -PKG_RELEASE:=1 -PKG_MD5SUM:=6812a5e4063b5016f25e9a0cebbd3dd9 - -PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBDAEMON,libdaemon,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_func_setpgrp_void=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --disable-lynx \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBDAEMON): - install -d -m0755 $(IDIR_LIBDAEMON)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(IDIR_LIBDAEMON)/usr/lib/ - $(RSTRIP) $(IDIR_LIBDAEMON) - $(IPKG_BUILD) $(IDIR_LIBDAEMON) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libdaemon.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so* $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdaemon.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libdaemon.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/libdaemon \ - $(STAGING_DIR)/usr/lib/libdaemon.a \ - $(STAGING_DIR)/usr/lib/libdaemon.so* \ - $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libdaemon/ipkg/libdaemon.control b/openwrt/package/libdaemon/ipkg/libdaemon.control deleted file mode 100644 index 3f534222467..00000000000 --- a/openwrt/package/libdaemon/ipkg/libdaemon.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libdaemon -Priority: optional -Section: libs -Description: A lightweight C library that eases the writing of UNIX daemons. diff --git a/openwrt/package/libdb/Config.in b/openwrt/package/libdb/Config.in deleted file mode 100644 index 5871032a8a3..00000000000 --- a/openwrt/package/libdb/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_DB - tristate - default n - depends BR2_PACKAGE_LIBDB - -config BR2_PACKAGE_LIBDB - prompt "libdb............................. Berkeley DB" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_DB - help - disk file format database which stores key/data-pairs in single files. - - http://www.sleepycat.com/products/db.shtml - diff --git a/openwrt/package/libdb/Makefile b/openwrt/package/libdb/Makefile deleted file mode 100644 index d2ecf93f1bb..00000000000 --- a/openwrt/package/libdb/Makefile +++ /dev/null @@ -1,91 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libdb -PKG_VERSION:=4.2.52 -PKG_RELEASE:=1 -PKG_MD5SUM:=x - -PKG_SOURCE_URL:=ftp://ftp.sleepycat.com/releases/ \ - http://downloads.sleepycat.com/ -PKG_SOURCE:=db-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBDB,libdb,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR)/build_unix ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ../dist/configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-java \ - --enable-cxx \ - --disable-posixmutexes \ - --disable-uimutexes \ - --disable-tcl \ - --disable-rpc \ - --enable-compat185 \ - --enable-debug \ - --enable-statistics \ - --enable-replication \ - --enable-cryptography \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \ - DESTDIR="$(PKG_INSTALL_DIR)" install - touch $@ - -$(IPKG_LIBDB): - install -m0755 -d $(IDIR_LIBDB)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.so $(IDIR_LIBDB)/usr/lib/ - $(RSTRIP) $(IDIR_LIBDB) - $(IPKG_BUILD) $(IDIR_LIBDB) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libdb.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(STAGING_DIR)/usr/lib/ - touch $(STAGING_DIR)/usr/lib/libdb.so - -install-dev: $(STAGING_DIR)/usr/lib/libdb.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/db.h - rm -rf $(STAGING_DIR)/usr/lib/libdb*.{a,so} - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libdb/ipkg/libdb.control b/openwrt/package/libdb/ipkg/libdb.control deleted file mode 100644 index 28605c38f67..00000000000 --- a/openwrt/package/libdb/ipkg/libdb.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libdb -Priority: optional -Section: libs -Description: disk file format database which stores key/data-pairs in single files diff --git a/openwrt/package/libdnet/Config.in b/openwrt/package/libdnet/Config.in deleted file mode 100644 index de7c3548d48..00000000000 --- a/openwrt/package/libdnet/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_LIBDNET - prompt "libdnet........................... Low-level network library" - tristate - default m if CONFIG_DEVEL - help - simplified, portable interface to several low-level networking routines - - http://sourceforge.net/projects/libdnet/ - diff --git a/openwrt/package/libdnet/Makefile b/openwrt/package/libdnet/Makefile deleted file mode 100644 index d325a05335e..00000000000 --- a/openwrt/package/libdnet/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libdnet -PKG_VERSION:=1.10 -PKG_RELEASE:=1 -PKG_MD5SUM:=416b765e9d9961501ac85e9a366fd219 - -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/libdnet-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBDNET,libdnet,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - touch configure.in; \ - touch include.m4; \ - touch aclocal.m4; \ - touch Makefile.in; \ - touch configure; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var/run \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBDNET): - install -m0755 -d $(IDIR_LIBDNET)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* $(IDIR_LIBDNET)/usr/lib/ - install -m0755 -d $(IDIR_LIBDNET)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnet $(IDIR_LIBDNET)/usr/sbin/ - $(RSTRIP) $(IDIR_LIBDNET) - $(IPKG_BUILD) $(IDIR_LIBDNET) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libdnet.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnet-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/dnet.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/dnet $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libdnet.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/dnet-config \ - $(STAGING_DIR)/usr/include/dnet.h \ - $(STAGING_DIR)/usr/include/dnet \ - $(STAGING_DIR)/usr/lib/libdnet.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libdnet/ipkg/libdnet.control b/openwrt/package/libdnet/ipkg/libdnet.control deleted file mode 100644 index cb7c6ac6728..00000000000 --- a/openwrt/package/libdnet/ipkg/libdnet.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libdnet -Priority: optional -Section: libs -Description: a low-level networking library diff --git a/openwrt/package/libdnet/patches/libdnet-1.10-dnet_config.patch b/openwrt/package/libdnet/patches/libdnet-1.10-dnet_config.patch deleted file mode 100644 index 005ac3305c8..00000000000 --- a/openwrt/package/libdnet/patches/libdnet-1.10-dnet_config.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- libdnet-1.10/dnet-config.in.orig 2001-10-19 03:29:00.000000000 +0200 -+++ libdnet-1.10/dnet-config.in 2005-09-20 09:32:53.000000000 +0200 -@@ -45,10 +45,18 @@ - done - - if test "$echo_cflags" = "yes"; then -- echo -I@includedir@ -+ includes= -+ if test "@includedir@" != "/usr/include" ; then -+ includes=-I@includedir@ -+ fi -+ echo $includes - fi - - if test "$echo_libs" = "yes"; then -- echo -L@libdir@ -ldnet @LIBS@ -+ libs= -+ if test "@libdir@" != "/usr/lib" ; then -+ libs=-I@libdir@ -+ fi -+ echo $libs -ldnet @LIBS@ - fi - diff --git a/openwrt/package/libelf/Config.in b/openwrt/package/libelf/Config.in deleted file mode 100644 index 915632ebf4a..00000000000 --- a/openwrt/package/libelf/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LIBELF - prompt "libelf............................ ELF object file access library" - tristate - default m if CONFIG_DEVEL - help - This is the public release of libelf-0.8.5, a free ELF object - file access library. - - http://www.stud.uni-hannover.de/~michael/software/ - diff --git a/openwrt/package/libelf/Makefile b/openwrt/package/libelf/Makefile deleted file mode 100644 index 29057b74f4b..00000000000 --- a/openwrt/package/libelf/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libelf -PKG_VERSION:=0.8.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=c1daf069367871350ece779b7de20047 - -PKG_SOURCE_URL:=http://www.mr511.de/software/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBELF,libelf,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - mr_cv_target_elf=yes \ - libelf_64bit=yes \ - libelf_cv_struct_elf64_ehdr=yes \ - libelf_cv_type_elf64_addr=no \ - libelf_cv_struct_elf64_rel=yes \ - ac_cv_sizeof_long_long=8 \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --enable-elf64=yes \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \ - instroot="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBELF): - install -d -m0755 $(IDIR_LIBELF)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(IDIR_LIBELF)/usr/lib/ - $(RSTRIP) $(IDIR_LIBELF) - $(IPKG_BUILD) $(IDIR_LIBELF) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libelf.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libelf* $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.{a,so*} $(STAGING_DIR)/usr/lib/ - -install-dev: $(STAGING_DIR)/usr/lib/libelf.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/libelf* - rm -rf $(STAGING_DIR)/usr/lib/libelf.{a,so*} - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libelf/ipkg/libelf.control b/openwrt/package/libelf/ipkg/libelf.control deleted file mode 100644 index 804b02fd7f2..00000000000 --- a/openwrt/package/libelf/ipkg/libelf.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libelf -Priority: optional -Section: libs -Description: a library for accessing ELF objects diff --git a/openwrt/package/libevent/Config.in b/openwrt/package/libevent/Config.in deleted file mode 100644 index 6f1eafcc322..00000000000 --- a/openwrt/package/libevent/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config BR2_PACKAGE_LIBEVENT - prompt "libevent.......................... Event notification library for event-driven network servers" - tristate - default m if CONFIG_DEVEL - help - The libevent API provides a mechanism to execute a callback function - when a specific event occurs on a file descriptor or after a timeout - has been reached. Furthermore, libevent also support callbacks due - to signals or regular timeouts. - - libevent is meant to replace the event loop found in event driven - network servers. An application just needs to call event_dispatch() - and then add or remove events dynamically without having to change - the event loop. - - http://www.monkey.org/~provos/libevent/ - diff --git a/openwrt/package/libevent/Makefile b/openwrt/package/libevent/Makefile deleted file mode 100644 index 487fe559a19..00000000000 --- a/openwrt/package/libevent/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libevent -PKG_VERSION:=1.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=a5bd281aeb41bdaa48fbbf0495423d20 - -PKG_SOURCE_URL:=http://www.monkey.org/~provos/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBEVENT,libevent,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBEVENT): - install -d -m0755 $(IDIR_LIBEVENT)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so.* $(IDIR_LIBEVENT)/usr/lib/ - $(RSTRIP) $(IDIR_LIBEVENT) - $(IPKG_BUILD) $(IDIR_LIBEVENT) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libevent.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/event.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent.{a,so} $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libevent.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/event.h \ - $(STAGING_DIR)/usr/lib/libevent.{a,so} \ - $(STAGING_DIR)/usr/lib/libevent-$(PKG_VERSION).so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libevent/ipkg/libevent.control b/openwrt/package/libevent/ipkg/libevent.control deleted file mode 100644 index 31da5b27ef0..00000000000 --- a/openwrt/package/libevent/ipkg/libevent.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libevent -Priority: optional -Section: libs -Description: Event notification library for event-driven network servers diff --git a/openwrt/package/libffi-sable/Config.in b/openwrt/package/libffi-sable/Config.in deleted file mode 100644 index 18db3def73d..00000000000 --- a/openwrt/package/libffi-sable/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_LIBFFI_SABLE - prompt "libffi-sable...................... Foreign Function Interface library (for sablevm)" - tristate - default m if CONFIG_DEVEL - help - The libffi library provides a portable, high level programming - interface to various calling conventions. This allows a programmer to - call any function specified by a call interface description at run - time. - - http://sources.redhat.com/libffi/ - diff --git a/openwrt/package/libffi-sable/Makefile b/openwrt/package/libffi-sable/Makefile deleted file mode 100644 index 402ce56f9e4..00000000000 --- a/openwrt/package/libffi-sable/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libffi-sable -PKG_VERSION:=3325 -PKG_RELEASE:=3 -PKG_MD5SUM:=0c32eaaea0269c5fbe156fcd0be3e5bd - -PKG_SOURCE_URL:=http://sablevm.org/download/snapshot/2005-01-21/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -BR2_PACKAGE_LIBFFI_SABLE=m - -$(eval $(call PKG_template,LIBFFI_SABLE,libffi-sable,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-debug \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBFFI_SABLE): - install -m0755 -d $(IDIR_LIBFFI_SABLE)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* $(IDIR_LIBFFI_SABLE)/usr/lib/ - $(RSTRIP) $(IDIR_LIBFFI_SABLE) - $(IPKG_BUILD) $(IDIR_LIBFFI_SABLE) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libffi.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ffi{,target}.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libffi.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/ffi{,target}.h \ - $(STAGING_DIR)/usr/lib/libffi.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libffi-sable/ipkg/libffi-sable.control b/openwrt/package/libffi-sable/ipkg/libffi-sable.control deleted file mode 100644 index 697b3e82bab..00000000000 --- a/openwrt/package/libffi-sable/ipkg/libffi-sable.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libffi-sable -Priority: optional -Section: libs -Description: Foreign Function Interface library diff --git a/openwrt/package/libgcrypt/Config.in b/openwrt/package/libgcrypt/Config.in deleted file mode 100644 index e75c7744a32..00000000000 --- a/openwrt/package/libgcrypt/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_PACKAGE_LIBGCRYPT - prompt "libgcrypt......................... The GNU crypto library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBGPG_ERROR - help - This is a general purpose cryptographic library based on the code from - GnuPG. It provides functions for all cryptograhic building blocks: - symmetric ciphers (AES, DES, Blowfish, CAST5, Twofish, Arcfour), hash - algorithms (MD4, MD5, RIPE-MD160, SHA-1, TIGER-192), MACs (HMAC for all - hash algorithms), public key algorithms (RSA, ElGamal, DSA), large - integer functions, random numbers and a lot of supporting functions. - - http://directory.fsf.org/security/libgcrypt.html - diff --git a/openwrt/package/libgcrypt/Makefile b/openwrt/package/libgcrypt/Makefile deleted file mode 100644 index bf35eef2349..00000000000 --- a/openwrt/package/libgcrypt/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libgcrypt -PKG_VERSION:=1.2.1 -PKG_RELEASE:=0 -PKG_MD5SUM:=b6d3217c9333c520fe54d2e8dc5e60ec - -PKG_SOURCE_URL:=http://ftp.gnupg.org/gcrypt/libgcrypt/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBGCRYPT,libgcrypt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --disable-asm \ - --with-gpg-error-prefix="$(STAGING_DIR)/usr" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBGCRYPT): - install -m0755 -d $(IDIR_LIBGCRYPT)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(IDIR_LIBGCRYPT)/usr/lib/ - $(RSTRIP) $(IDIR_LIBGCRYPT) - $(IPKG_BUILD) $(IDIR_LIBGCRYPT) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libgcrypt.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/share/aclocal - $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(STAGING_DIR)/usr/share/aclocal/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libgcrypt.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/libgcrypt-config \ - $(STAGING_DIR)/usr/include/gcrypt*.h \ - $(STAGING_DIR)/usr/lib/libgcrypt.{a,so*} \ - $(STAGING_DIR)/usr/share/aclocal/libgcrypt.m4 \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/libgcrypt/ipkg/libgcrypt.control b/openwrt/package/libgcrypt/ipkg/libgcrypt.control deleted file mode 100644 index 8cf2b303fde..00000000000 --- a/openwrt/package/libgcrypt/ipkg/libgcrypt.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: libgcrypt -Priority: optional -Section: libs -Description: GNU crypto library -Depends: libgpg-error - diff --git a/openwrt/package/libgcrypt/patches/500-cross-compile.patch b/openwrt/package/libgcrypt/patches/500-cross-compile.patch deleted file mode 100644 index e7d4d5877b2..00000000000 --- a/openwrt/package/libgcrypt/patches/500-cross-compile.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN libgcrypt-1.2.1-orig/tests/Makefile.am libgcrypt-1.2.1-1/tests/Makefile.am ---- libgcrypt-1.2.1-orig/tests/Makefile.am 2004-03-03 09:08:05.000000000 +0100 -+++ libgcrypt-1.2.1-1/tests/Makefile.am 2005-03-15 21:36:49.000000000 +0100 -@@ -21,7 +21,7 @@ - TESTS = prime register ac basic tsexp keygen pubkey benchmark - - INCLUDES = -I$(top_srcdir)/src --LDADD = ../src/libgcrypt.la -+LDADD = ../src/libgcrypt.la @LTLIBOBJS@ @GPG_ERROR_LIBS@ - - EXTRA_PROGRAMS = testapi - noinst_PROGRAMS = $(TESTS) -diff -ruN libgcrypt-1.2.1-orig/tests/Makefile.in libgcrypt-1.2.1-1/tests/Makefile.in ---- libgcrypt-1.2.1-orig/tests/Makefile.in 2005-01-05 14:53:23.000000000 +0100 -+++ libgcrypt-1.2.1-1/tests/Makefile.in 2005-03-15 21:37:12.000000000 +0100 -@@ -258,7 +258,7 @@ - target_vendor = @target_vendor@ - TESTS = prime register ac basic tsexp keygen pubkey benchmark - INCLUDES = -I$(top_srcdir)/src --LDADD = ../src/libgcrypt.la -+LDADD = ../src/libgcrypt.la @LTLIBOBJS@ @GPG_ERROR_LIBS@ - AM_CFLAGS = @GPG_ERROR_CFLAGS@ - all: all-am - diff --git a/openwrt/package/libgd/Config.in b/openwrt/package/libgd/Config.in deleted file mode 100644 index 8c513bda78a..00000000000 --- a/openwrt/package/libgd/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_LIBGD - prompt "libgd............................. The GD Graphics Library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBJPEG - select BR2_PACKAGE_LIBPNG - help - The GD Graphics Library - - http://www.boutell.com/gd/ - diff --git a/openwrt/package/libgd/Makefile b/openwrt/package/libgd/Makefile deleted file mode 100644 index 88933e70211..00000000000 --- a/openwrt/package/libgd/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gd -PKG_VERSION:=2.0.33 -PKG_RELEASE:=2 -PKG_MD5SUM:=be0a6d326cd8567e736fbc75df0a5c45 - -PKG_SOURCE_URL:=http://www.boutell.com/gd/http -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBGD,libgd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBPNG12_CONFIG="$(STAGING_DIR)/usr/bin/libpng12-config" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --without-x \ - --without-freetype \ - --with-jpeg=$(STAGING_DIR)/usr \ - --with-png=$(STAGING_DIR)/usr \ - --without-xpm \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBGD): - install -d -m0755 $(IDIR_LIBGD)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(IDIR_LIBGD)/usr/lib/ - $(RSTRIP) $(IDIR_LIBGD) - $(IPKG_BUILD) $(IDIR_LIBGD) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libgd.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/gd*.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libgd.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/gdlib-config \ - $(STAGING_DIR)/usr/include/entities.h \ - $(STAGING_DIR)/usr/include/gd*.h \ - $(STAGING_DIR)/usr/lib/libgd.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/libgd/ipkg/libgd.control b/openwrt/package/libgd/ipkg/libgd.control deleted file mode 100644 index f6a78e5c3af..00000000000 --- a/openwrt/package/libgd/ipkg/libgd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libgd -Priority: optional -Section: libs -Depends: libjpeg, libpng -Description: A library for the dynamic creation of images diff --git a/openwrt/package/libgd/patches/100-configure_fix.patch b/openwrt/package/libgd/patches/100-configure_fix.patch deleted file mode 100644 index dd7d6bc457e..00000000000 --- a/openwrt/package/libgd/patches/100-configure_fix.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -urN gd-2.0.33.old/configure gd-2.0.33.dev/configure ---- gd-2.0.33.old/configure 2004-11-04 00:14:47.000000000 +0100 -+++ gd-2.0.33.dev/configure 2005-05-05 15:06:26.000000000 +0200 -@@ -7217,8 +7217,6 @@ - shlibpath_overrides_runpath=unknown - version_type=none - dynamic_linker="$host_os ld.so" --sys_lib_dlsearch_path_spec="/lib /usr/lib" --sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - - case $host_os in - aix3*) -@@ -7481,8 +7479,6 @@ - *) - ;; - esac -- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" -- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - - netbsd*) -@@ -11032,14 +11028,14 @@ - fi - - if test -n "$LIBPNG12_CONFIG"; then -- libpng_CPPFLAGS=`libpng12-config --cflags` -+ libpng_CPPFLAGS=`$LIBPNG12_CONFIG --cflags` - # should be --ldopts, but it's currently broken -- libpng_LDFLAGS=`libpng12-config --ldflags` -+ libpng_LDFLAGS=`$LIBPNG12_CONFIG --ldflags` - libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[^ ][^ ]*//g'` - elif test -n "$LIBPNG_CONFIG"; then -- libpng_CPPFLAGS=`libpng-config --cflags` -+ libpng_CPPFLAGS=`$LIBPNG_CONFIG --cflags` - # should be --ldopts, but it's currently broken -- libpng_LDFLAGS=`libpng-config --ldflags` -+ libpng_LDFLAGS=`$LIBPNG_CONFIG --ldflags` - libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[^ ][^ ]*//g'` - elif test -d "$withval"; then - libpng_CPPFLAGS="-I$withval/include" diff --git a/openwrt/package/libgdbm/Config.in b/openwrt/package/libgdbm/Config.in deleted file mode 100644 index c969a947cf7..00000000000 --- a/openwrt/package/libgdbm/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_LIBGDBM - prompt "libgdbm........................... The GNU database manager" - tristate - default m if CONFIG_DEVEL - help - disk file format database which stores key/data-pairs in single files. - - http://www.gnu.org - diff --git a/openwrt/package/libgdbm/Makefile b/openwrt/package/libgdbm/Makefile deleted file mode 100644 index 9611e843ade..00000000000 --- a/openwrt/package/libgdbm/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libgdbm -PKG_VERSION:=1.8.3 -PKG_RELEASE:=0 -PKG_MD5SUM:=1d1b1d5c0245b1c00aff92da751e9aa1 - -PKG_SOURCE_URL:=@GNU/gdbm -PKG_SOURCE:=gdbm-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/gdbm-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBGDBM,libgdbm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - BINOWN=`id -u` \ - BINGRP=`id -g` \ - $(TARGET_CONFIGURE_OPTS) \ - INSTALL_ROOT="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBGDBM): $(STAGING_DIR)/usr/lib/libgdbm.so - install -m0755 -d $(IDIR_LIBGDBM)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.so.* $(IDIR_LIBGDBM)/usr/lib/ - $(RSTRIP) $(IDIR_LIBGDBM) - $(IPKG_BUILD) $(IDIR_LIBGDBM) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libgdbm.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gdbm.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $(STAGING_DIR)/usr/lib/libgdbm.so - -install-dev: $(STAGING_DIR)/usr/lib/libgdbm.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/gdbm.h - rm -rf $(STAGING_DIR)/usr/lib/libgdbm.{a,so*} - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libgdbm/ipkg/libgdbm.control b/openwrt/package/libgdbm/ipkg/libgdbm.control deleted file mode 100644 index a05a7ac37bc..00000000000 --- a/openwrt/package/libgdbm/ipkg/libgdbm.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libgdbm -Priority: optional -Section: libs -Description: disk file format database which stores key/data-pairs in single files diff --git a/openwrt/package/libgpg-error/Config.in b/openwrt/package/libgpg-error/Config.in deleted file mode 100644 index 1a6b0037422..00000000000 --- a/openwrt/package/libgpg-error/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_LIBGPG_ERROR - prompt "libgpg-error...................... An helper library for common error codes and descriptions" - tristate - default m if CONFIG_DEVEL - help - This is a library that defines common error values for all GnuPG - components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, - Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the - future. - - http://www.gnupg.org/related_software/libgpg-error/ - diff --git a/openwrt/package/libgpg-error/Makefile b/openwrt/package/libgpg-error/Makefile deleted file mode 100644 index eb127d3f174..00000000000 --- a/openwrt/package/libgpg-error/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libgpg-error -PKG_VERSION:=1.0 -PKG_RELEASE:=0 -PKG_MD5SUM:=ff409db977e4a4897aa09ea420a28a2f - -PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgpg-error/ \ - http://mirrors.rootmode.com/ftp.gnupg.org/libgpg-error/ \ - http://gulus.usherbrooke.ca/pub/appl/GnuPG/libgpg-error/ \ - http://gnupg.unixmexico.org/ftp/libgpg-error/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBGPG_ERROR,libgpg-error,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBGPG_ERROR): - install -m0755 -d $(IDIR_LIBGPG_ERROR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* $(IDIR_LIBGPG_ERROR)/usr/lib/ - $(RSTRIP) $(IDIR_LIBGPG_ERROR) - $(IPKG_BUILD) $(IDIR_LIBGPG_ERROR) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libgpg-error.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/gpg-error-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gpg-error.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/share/aclocal - $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 $(STAGING_DIR)/usr/share/aclocal/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libgpg-error.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/gpg-error-config \ - $(STAGING_DIR)/usr/include/gpg-error.h \ - $(STAGING_DIR)/usr/lib/libgpg-error.{a,so*} \ - $(STAGING_DIR)/usr/share/aclocal/gpg-error.m4 \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/libgpg-error/ipkg/libgpg-error.control b/openwrt/package/libgpg-error/ipkg/libgpg-error.control deleted file mode 100644 index 6a08c01abcb..00000000000 --- a/openwrt/package/libgpg-error/ipkg/libgpg-error.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libgpg-error -Priority: optional -Section: libs -Description: an helper library for common error codes and descriptions diff --git a/openwrt/package/libiconv/Config.in b/openwrt/package/libiconv/Config.in deleted file mode 100644 index a3247c9112e..00000000000 --- a/openwrt/package/libiconv/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_LIBICONV - prompt "libiconv.......................... character set conversion library" - tristate - default m if CONFIG_DEVEL - help - - This package contains a _very_ stripped down version of GNU Libiconv, - all charsets have been removed, except ASCII, various unicode charsets - and iso8896-1. - - The original website: - http://www.gnu.org/software/libiconv/ - diff --git a/openwrt/package/libiconv/Makefile b/openwrt/package/libiconv/Makefile deleted file mode 100644 index e72742101bb..00000000000 --- a/openwrt/package/libiconv/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libiconv -PKG_VERSION:=1.9.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=0c99a05e0c3c153bac1c960f78711155 - -PKG_SOURCE_URL:=@GNU/libiconv -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBICONV,libiconv,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - libdir="$(PKG_INSTALL_DIR)/usr/lib" \ - includedir="$(PKG_INSTALL_DIR)/usr/include" \ - install-lib - touch $@ - -$(IPKG_LIBICONV): - install -d -m0755 $(IDIR_LIBICONV)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.so* $(IDIR_LIBICONV)/usr/lib/ - chmod 0644 $(IDIR_LIBICONV)/usr/lib/* - $(RSTRIP) $(IDIR_LIBICONV) - $(IPKG_BUILD) $(IDIR_LIBICONV) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/iconv/libiconv.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/iconv - $(CP) $(PKG_INSTALL_DIR)/usr/include/iconv.h $(STAGING_DIR)/usr/include/iconv - mkdir -p $(STAGING_DIR)/usr/lib/iconv - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.* $(STAGING_DIR)/usr/lib/iconv - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/iconv/libiconv.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/iconv \ - $(STAGING_DIR)/usr/lib/iconv \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libiconv/ipkg/libiconv.control b/openwrt/package/libiconv/ipkg/libiconv.control deleted file mode 100644 index 21306f1d756..00000000000 --- a/openwrt/package/libiconv/ipkg/libiconv.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libiconv -Priority: optional -Section: libs -Description: character set conversion library diff --git a/openwrt/package/libiconv/patches/100-strip_charsets.patch b/openwrt/package/libiconv/patches/100-strip_charsets.patch deleted file mode 100644 index 1b8b0fd0bc9..00000000000 --- a/openwrt/package/libiconv/patches/100-strip_charsets.patch +++ /dev/null @@ -1,2962 +0,0 @@ -diff -Nur libiconv-1.9.1-orig/lib/aliases.gperf libiconv-1.9.1-nocompile/lib/aliases.gperf ---- libiconv-1.9.1-orig/lib/aliases.gperf 2003-05-22 22:17:15.000000000 +0200 -+++ libiconv-1.9.1-nocompile/lib/aliases.gperf 2006-03-05 15:50:42.000000000 +0100 -@@ -48,8 +48,6 @@ - UCS-2-SWAPPED, ei_ucs2swapped - UCS-4-INTERNAL, ei_ucs4internal - UCS-4-SWAPPED, ei_ucs4swapped --C99, ei_c99 --JAVA, ei_java - ISO-8859-1, ei_iso8859_1 - ISO_8859-1, ei_iso8859_1 - ISO_8859-1:1987, ei_iso8859_1 -@@ -60,276 +58,5 @@ - L1, ei_iso8859_1 - CSISOLATIN1, ei_iso8859_1 - ISO8859-1, ei_iso8859_1 --ISO-8859-2, ei_iso8859_2 --ISO_8859-2, ei_iso8859_2 --ISO_8859-2:1987, ei_iso8859_2 --ISO-IR-101, ei_iso8859_2 --LATIN2, ei_iso8859_2 --L2, ei_iso8859_2 --CSISOLATIN2, ei_iso8859_2 --ISO8859-2, ei_iso8859_2 --ISO-8859-3, ei_iso8859_3 --ISO_8859-3, ei_iso8859_3 --ISO_8859-3:1988, ei_iso8859_3 --ISO-IR-109, ei_iso8859_3 --LATIN3, ei_iso8859_3 --L3, ei_iso8859_3 --CSISOLATIN3, ei_iso8859_3 --ISO8859-3, ei_iso8859_3 --ISO-8859-4, ei_iso8859_4 --ISO_8859-4, ei_iso8859_4 --ISO_8859-4:1988, ei_iso8859_4 --ISO-IR-110, ei_iso8859_4 --LATIN4, ei_iso8859_4 --L4, ei_iso8859_4 --CSISOLATIN4, ei_iso8859_4 --ISO8859-4, ei_iso8859_4 --ISO-8859-5, ei_iso8859_5 --ISO_8859-5, ei_iso8859_5 --ISO_8859-5:1988, ei_iso8859_5 --ISO-IR-144, ei_iso8859_5 --CYRILLIC, ei_iso8859_5 --CSISOLATINCYRILLIC, ei_iso8859_5 --ISO8859-5, ei_iso8859_5 --ISO-8859-6, ei_iso8859_6 --ISO_8859-6, ei_iso8859_6 --ISO_8859-6:1987, ei_iso8859_6 --ISO-IR-127, ei_iso8859_6 --ECMA-114, ei_iso8859_6 --ASMO-708, ei_iso8859_6 --ARABIC, ei_iso8859_6 --CSISOLATINARABIC, ei_iso8859_6 --ISO8859-6, ei_iso8859_6 --ISO-8859-7, ei_iso8859_7 --ISO_8859-7, ei_iso8859_7 --ISO_8859-7:1987, ei_iso8859_7 --ISO-IR-126, ei_iso8859_7 --ECMA-118, ei_iso8859_7 --ELOT_928, ei_iso8859_7 --GREEK8, ei_iso8859_7 --GREEK, ei_iso8859_7 --CSISOLATINGREEK, ei_iso8859_7 --ISO8859-7, ei_iso8859_7 --ISO-8859-8, ei_iso8859_8 --ISO_8859-8, ei_iso8859_8 --ISO_8859-8:1988, ei_iso8859_8 --ISO-IR-138, ei_iso8859_8 --HEBREW, ei_iso8859_8 --CSISOLATINHEBREW, ei_iso8859_8 --ISO8859-8, ei_iso8859_8 --ISO-8859-9, ei_iso8859_9 --ISO_8859-9, ei_iso8859_9 --ISO_8859-9:1989, ei_iso8859_9 --ISO-IR-148, ei_iso8859_9 --LATIN5, ei_iso8859_9 --L5, ei_iso8859_9 --CSISOLATIN5, ei_iso8859_9 --ISO8859-9, ei_iso8859_9 --ISO-8859-10, ei_iso8859_10 --ISO_8859-10, ei_iso8859_10 --ISO_8859-10:1992, ei_iso8859_10 --ISO-IR-157, ei_iso8859_10 --LATIN6, ei_iso8859_10 --L6, ei_iso8859_10 --CSISOLATIN6, ei_iso8859_10 --ISO8859-10, ei_iso8859_10 --ISO-8859-13, ei_iso8859_13 --ISO_8859-13, ei_iso8859_13 --ISO-IR-179, ei_iso8859_13 --LATIN7, ei_iso8859_13 --L7, ei_iso8859_13 --ISO8859-13, ei_iso8859_13 --ISO-8859-14, ei_iso8859_14 --ISO_8859-14, ei_iso8859_14 --ISO_8859-14:1998, ei_iso8859_14 --ISO-IR-199, ei_iso8859_14 --LATIN8, ei_iso8859_14 --L8, ei_iso8859_14 --ISO-CELTIC, ei_iso8859_14 --ISO8859-14, ei_iso8859_14 --ISO-8859-15, ei_iso8859_15 --ISO_8859-15, ei_iso8859_15 --ISO_8859-15:1998, ei_iso8859_15 --ISO-IR-203, ei_iso8859_15 --ISO8859-15, ei_iso8859_15 --ISO-8859-16, ei_iso8859_16 --ISO_8859-16, ei_iso8859_16 --ISO_8859-16:2000, ei_iso8859_16 --ISO-IR-226, ei_iso8859_16 --ISO8859-16, ei_iso8859_16 --KOI8-R, ei_koi8_r --CSKOI8R, ei_koi8_r --KOI8-U, ei_koi8_u --KOI8-RU, ei_koi8_ru --CP1250, ei_cp1250 --WINDOWS-1250, ei_cp1250 --MS-EE, ei_cp1250 --CP1251, ei_cp1251 --WINDOWS-1251, ei_cp1251 --MS-CYRL, ei_cp1251 --CP1252, ei_cp1252 --WINDOWS-1252, ei_cp1252 --MS-ANSI, ei_cp1252 --CP1253, ei_cp1253 --WINDOWS-1253, ei_cp1253 --MS-GREEK, ei_cp1253 --CP1254, ei_cp1254 --WINDOWS-1254, ei_cp1254 --MS-TURK, ei_cp1254 --CP1255, ei_cp1255 --WINDOWS-1255, ei_cp1255 --MS-HEBR, ei_cp1255 --CP1256, ei_cp1256 --WINDOWS-1256, ei_cp1256 --MS-ARAB, ei_cp1256 --CP1257, ei_cp1257 --WINDOWS-1257, ei_cp1257 --WINBALTRIM, ei_cp1257 --CP1258, ei_cp1258 --WINDOWS-1258, ei_cp1258 --CP850, ei_cp850 --IBM850, ei_cp850 --850, ei_cp850 --CSPC850MULTILINGUAL, ei_cp850 --CP862, ei_cp862 --IBM862, ei_cp862 --862, ei_cp862 --CSPC862LATINHEBREW, ei_cp862 --CP866, ei_cp866 --IBM866, ei_cp866 --866, ei_cp866 --CSIBM866, ei_cp866 --MACROMAN, ei_mac_roman --MACINTOSH, ei_mac_roman --MAC, ei_mac_roman --CSMACINTOSH, ei_mac_roman --MACCENTRALEUROPE, ei_mac_centraleurope --MACICELAND, ei_mac_iceland --MACCROATIAN, ei_mac_croatian --MACROMANIA, ei_mac_romania --MACCYRILLIC, ei_mac_cyrillic --MACUKRAINE, ei_mac_ukraine --MACGREEK, ei_mac_greek --MACTURKISH, ei_mac_turkish --MACHEBREW, ei_mac_hebrew --MACARABIC, ei_mac_arabic --MACTHAI, ei_mac_thai --HP-ROMAN8, ei_hp_roman8 --ROMAN8, ei_hp_roman8 --R8, ei_hp_roman8 --CSHPROMAN8, ei_hp_roman8 --NEXTSTEP, ei_nextstep --ARMSCII-8, ei_armscii_8 --GEORGIAN-ACADEMY, ei_georgian_academy --GEORGIAN-PS, ei_georgian_ps --KOI8-T, ei_koi8_t --MULELAO-1, ei_mulelao --CP1133, ei_cp1133 --IBM-CP1133, ei_cp1133 --TIS-620, ei_tis620 --TIS620, ei_tis620 --TIS620-0, ei_tis620 --TIS620.2529-1, ei_tis620 --TIS620.2533-0, ei_tis620 --TIS620.2533-1, ei_tis620 --ISO-IR-166, ei_tis620 --CP874, ei_cp874 --WINDOWS-874, ei_cp874 --VISCII, ei_viscii --VISCII1.1-1, ei_viscii --CSVISCII, ei_viscii --TCVN, ei_tcvn --TCVN-5712, ei_tcvn --TCVN5712-1, ei_tcvn --TCVN5712-1:1993, ei_tcvn --JIS_C6220-1969-RO, ei_iso646_jp --ISO646-JP, ei_iso646_jp --ISO-IR-14, ei_iso646_jp --JP, ei_iso646_jp --CSISO14JISC6220RO, ei_iso646_jp --JIS_X0201, ei_jisx0201 --JISX0201-1976, ei_jisx0201 --X0201, ei_jisx0201 --CSHALFWIDTHKATAKANA, ei_jisx0201 --JIS_X0208, ei_jisx0208 --JIS_X0208-1983, ei_jisx0208 --JIS_X0208-1990, ei_jisx0208 --JIS0208, ei_jisx0208 --X0208, ei_jisx0208 --ISO-IR-87, ei_jisx0208 --JIS_C6226-1983, ei_jisx0208 --CSISO87JISX0208, ei_jisx0208 --JIS_X0212, ei_jisx0212 --JIS_X0212.1990-0, ei_jisx0212 --JIS_X0212-1990, ei_jisx0212 --X0212, ei_jisx0212 --ISO-IR-159, ei_jisx0212 --CSISO159JISX02121990, ei_jisx0212 --GB_1988-80, ei_iso646_cn --ISO646-CN, ei_iso646_cn --ISO-IR-57, ei_iso646_cn --CN, ei_iso646_cn --CSISO57GB1988, ei_iso646_cn --GB_2312-80, ei_gb2312 --ISO-IR-58, ei_gb2312 --CSISO58GB231280, ei_gb2312 --CHINESE, ei_gb2312 --ISO-IR-165, ei_isoir165 --CN-GB-ISOIR165, ei_isoir165 --KSC_5601, ei_ksc5601 --KS_C_5601-1987, ei_ksc5601 --KS_C_5601-1989, ei_ksc5601 --ISO-IR-149, ei_ksc5601 --CSKSC56011987, ei_ksc5601 --KOREAN, ei_ksc5601 --EUC-JP, ei_euc_jp --EUCJP, ei_euc_jp --EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE, ei_euc_jp --CSEUCPKDFMTJAPANESE, ei_euc_jp --SHIFT_JIS, ei_sjis --SHIFT-JIS, ei_sjis --SJIS, ei_sjis --MS_KANJI, ei_sjis --CSSHIFTJIS, ei_sjis --CP932, ei_cp932 --ISO-2022-JP, ei_iso2022_jp --CSISO2022JP, ei_iso2022_jp --ISO-2022-JP-1, ei_iso2022_jp1 --ISO-2022-JP-2, ei_iso2022_jp2 --CSISO2022JP2, ei_iso2022_jp2 --EUC-CN, ei_euc_cn --EUCCN, ei_euc_cn --GB2312, ei_euc_cn --CN-GB, ei_euc_cn --CSGB2312, ei_euc_cn --GBK, ei_ces_gbk --CP936, ei_ces_gbk --GB18030, ei_gb18030 --ISO-2022-CN, ei_iso2022_cn --CSISO2022CN, ei_iso2022_cn --ISO-2022-CN-EXT, ei_iso2022_cn_ext --HZ, ei_hz --HZ-GB-2312, ei_hz --EUC-TW, ei_euc_tw --EUCTW, ei_euc_tw --CSEUCTW, ei_euc_tw --BIG5, ei_ces_big5 --BIG-5, ei_ces_big5 --BIG-FIVE, ei_ces_big5 --BIGFIVE, ei_ces_big5 --CN-BIG5, ei_ces_big5 --CSBIG5, ei_ces_big5 --CP950, ei_cp950 --BIG5-HKSCS, ei_big5hkscs --BIG5HKSCS, ei_big5hkscs --EUC-KR, ei_euc_kr --EUCKR, ei_euc_kr --CSEUCKR, ei_euc_kr --CP949, ei_cp949 --UHC, ei_cp949 --JOHAB, ei_johab --CP1361, ei_johab --ISO-2022-KR, ei_iso2022_kr --CSISO2022KR, ei_iso2022_kr - CHAR, ei_local_char - WCHAR_T, ei_local_wchar_t -diff -Nur libiconv-1.9.1-orig/lib/aliases.h libiconv-1.9.1-nocompile/lib/aliases.h ---- libiconv-1.9.1-orig/lib/aliases.h 2003-05-22 22:17:17.000000000 +0200 -+++ libiconv-1.9.1-nocompile/lib/aliases.h 2006-03-05 15:50:42.000000000 +0100 -@@ -1,6 +1,6 @@ --/* ANSI-C code produced by gperf version 3.0 */ --/* Command-line: gperf -m 10 lib/aliases.gperf */ --/* Computed positions: -k'1,3-11,$' */ -+/* ANSI-C code produced by gperf version 3.0.1 */ -+/* Command-line: gperf -m 10 aliases.gperf */ -+/* Computed positions: -k'4-7,$' */ - - #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ -@@ -29,15 +29,15 @@ - #error "gperf generated tables don't work with this execution character set. Please report a bug to ." - #endif - --#line 1 "lib/aliases.gperf" -+#line 1 "aliases.gperf" - struct alias { int name; unsigned int encoding_index; }; - --#define TOTAL_KEYWORDS 324 -+#define TOTAL_KEYWORDS 51 - #define MIN_WORD_LENGTH 2 --#define MAX_WORD_LENGTH 45 --#define MIN_HASH_VALUE 15 --#define MAX_HASH_VALUE 879 --/* maximum key range = 865, duplicates = 0 */ -+#define MAX_WORD_LENGTH 17 -+#define MIN_HASH_VALUE 4 -+#define MAX_HASH_VALUE 67 -+/* maximum key range = 64, duplicates = 0 */ - - #ifdef __GNUC__ - __inline -@@ -49,39 +49,27 @@ - static unsigned int - aliases_hash (register const char *str, register unsigned int len) - { -- static const unsigned short asso_values[] = -+ static const unsigned char asso_values[] = - { -- 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, -- 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, -- 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, -- 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, -- 880, 880, 880, 880, 880, 6, 69, 880, 44, 5, -- 6, 18, 60, 9, 8, 50, 14, 13, 271, 880, -- 880, 880, 880, 880, 880, 107, 152, 5, 29, 7, -- 43, 112, 42, 5, 341, 106, 10, 158, 8, 5, -- 6, 880, 61, 38, 98, 152, 194, 112, 30, 10, -- 6, 880, 880, 880, 880, 60, 880, 880, 880, 880, -- 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, -- 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, -- 880, 880, 880, 880, 880, 880, 880, 880 -+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, -+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, -+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, -+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, -+ 68, 68, 68, 68, 68, 3, 68, 68, 32, 2, -+ 3, 27, 2, 13, 5, 10, 4, 18, 68, 68, -+ 68, 68, 68, 68, 68, 33, 24, 2, 5, 2, -+ 68, 4, 68, 2, 68, 68, 2, 68, 11, 11, -+ 68, 68, 3, 5, 2, 68, 68, 68, 2, 68, -+ 68, 68, 68, 68, 68, 16, 68, 68, 68, 68, -+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, -+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, -+ 68, 68, 68, 68, 68, 68, 68, 68 - }; - register int hval = len; - - switch (hval) - { - default: -- hval += asso_values[(unsigned char)str[10]]; -- /*FALLTHROUGH*/ -- case 10: -- hval += asso_values[(unsigned char)str[9]]; -- /*FALLTHROUGH*/ -- case 9: -- hval += asso_values[(unsigned char)str[8]]; -- /*FALLTHROUGH*/ -- case 8: -- hval += asso_values[(unsigned char)str[7]]; -- /*FALLTHROUGH*/ -- case 7: - hval += asso_values[(unsigned char)str[6]]; - /*FALLTHROUGH*/ - case 6: -@@ -94,11 +82,7 @@ - hval += asso_values[(unsigned char)str[3]]; - /*FALLTHROUGH*/ - case 3: -- hval += asso_values[(unsigned char)str[2]]; -- /*FALLTHROUGH*/ - case 2: -- case 1: -- hval += asso_values[(unsigned char)str[0]]; - break; - } - return hval + asso_values[(unsigned char)str[len - 1]]; -@@ -106,1479 +90,227 @@ - - struct stringpool_t - { -- char stringpool_str15[sizeof("CN")]; -- char stringpool_str17[sizeof("L1")]; -- char stringpool_str18[sizeof("L2")]; -- char stringpool_str20[sizeof("L6")]; -- char stringpool_str21[sizeof("L5")]; -- char stringpool_str26[sizeof("L8")]; -- char stringpool_str29[sizeof("862")]; -- char stringpool_str30[sizeof("L3")]; -- char stringpool_str33[sizeof("866")]; -- char stringpool_str34[sizeof("C99")]; -- char stringpool_str38[sizeof("EUCCN")]; -- char stringpool_str41[sizeof("CP1251")]; -- char stringpool_str43[sizeof("CP1252")]; -- char stringpool_str44[sizeof("CP862")]; -- char stringpool_str45[sizeof("EUC-CN")]; -- char stringpool_str47[sizeof("CP1256")]; -- char stringpool_str48[sizeof("CP866")]; -- char stringpool_str49[sizeof("CP1255")]; -- char stringpool_str50[sizeof("HZ")]; -- char stringpool_str52[sizeof("CP1361")]; -- char stringpool_str53[sizeof("CP932")]; -- char stringpool_str55[sizeof("CP819")]; -- char stringpool_str57[sizeof("CP936")]; -- char stringpool_str58[sizeof("X0212")]; -- char stringpool_str59[sizeof("CP1258")]; -- char stringpool_str62[sizeof("L7")]; -- char stringpool_str67[sizeof("CP1253")]; -- char stringpool_str72[sizeof("L4")]; -- char stringpool_str75[sizeof("CP1133")]; -- char stringpool_str77[sizeof("R8")]; -- char stringpool_str84[sizeof("CHINESE")]; -- char stringpool_str85[sizeof("ISO8859-1")]; -- char stringpool_str87[sizeof("ISO8859-2")]; -- char stringpool_str91[sizeof("ISO8859-6")]; -- char stringpool_str92[sizeof("ISO-8859-1")]; -- char stringpool_str93[sizeof("ISO8859-5")]; -- char stringpool_str94[sizeof("ISO-8859-2")]; -- char stringpool_str95[sizeof("X0201")]; -- char stringpool_str97[sizeof("ISO8859-16")]; -- char stringpool_str98[sizeof("ISO-8859-6")]; -- char stringpool_str99[sizeof("ISO8859-15")]; -- char stringpool_str100[sizeof("ISO-8859-5")]; -- char stringpool_str101[sizeof("ISO8859-9")]; -- char stringpool_str103[sizeof("ISO8859-8")]; -- char stringpool_str104[sizeof("ISO-8859-16")]; -- char stringpool_str105[sizeof("850")]; -- char stringpool_str106[sizeof("ISO-8859-15")]; -- char stringpool_str108[sizeof("ISO-8859-9")]; -- char stringpool_str109[sizeof("CP949")]; -- char stringpool_str110[sizeof("ISO-8859-8")]; -- char stringpool_str111[sizeof("ISO8859-3")]; -- char stringpool_str112[sizeof("ISO-IR-6")]; -- char stringpool_str113[sizeof("X0208")]; -- char stringpool_str114[sizeof("CYRILLIC")]; -- char stringpool_str116[sizeof("ISO-2022-CN")]; -- char stringpool_str117[sizeof("ISO8859-13")]; -- char stringpool_str118[sizeof("ISO-8859-3")]; -- char stringpool_str119[sizeof("CP1250")]; -- char stringpool_str120[sizeof("CP950")]; -- char stringpool_str121[sizeof("CP850")]; -- char stringpool_str122[sizeof("ISO646-CN")]; -- char stringpool_str123[sizeof("SJIS")]; -- char stringpool_str124[sizeof("ISO-8859-13")]; -- char stringpool_str125[sizeof("ISO-IR-126")]; -- char stringpool_str126[sizeof("ISO-IR-226")]; -- char stringpool_str127[sizeof("ISO-IR-166")]; -- char stringpool_str129[sizeof("ISO-IR-165")]; -- char stringpool_str131[sizeof("CP1257")]; -- char stringpool_str132[sizeof("ASCII")]; -- char stringpool_str134[sizeof("ISO-IR-58")]; -- char stringpool_str136[sizeof("CP367")]; -- char stringpool_str137[sizeof("LATIN1")]; -- char stringpool_str138[sizeof("ISO-IR-159")]; -- char stringpool_str139[sizeof("LATIN2")]; -- char stringpool_str142[sizeof("ISO-IR-199")]; -- char stringpool_str143[sizeof("LATIN6")]; -- char stringpool_str145[sizeof("LATIN5")]; -- char stringpool_str146[sizeof("ISO_8859-1")]; -- char stringpool_str147[sizeof("CSISO2022CN")]; -- char stringpool_str148[sizeof("ISO_8859-2")]; -- char stringpool_str149[sizeof("ISO-IR-138")]; -- char stringpool_str151[sizeof("CP1254")]; -- char stringpool_str152[sizeof("ISO_8859-6")]; -- char stringpool_str154[sizeof("ISO_8859-5")]; -- char stringpool_str155[sizeof("LATIN8")]; -- char stringpool_str157[sizeof("ISO-IR-101")]; -- char stringpool_str158[sizeof("ISO_8859-16")]; -- char stringpool_str159[sizeof("GB2312")]; -- char stringpool_str160[sizeof("ISO_8859-15")]; -- char stringpool_str161[sizeof("ISO-CELTIC")]; -- char stringpool_str162[sizeof("ISO_8859-9")]; -- char stringpool_str163[sizeof("LATIN3")]; -- char stringpool_str164[sizeof("ISO_8859-8")]; -- char stringpool_str165[sizeof("UHC")]; -- char stringpool_str169[sizeof("ISO8859-10")]; -- char stringpool_str170[sizeof("ISO_8859-15:1998")]; -- char stringpool_str171[sizeof("MAC")]; -- char stringpool_str172[sizeof("ISO_8859-3")]; -- char stringpool_str173[sizeof("ISO-IR-109")]; -- char stringpool_str175[sizeof("ISO8859-7")]; -- char stringpool_str176[sizeof("ISO-8859-10")]; -- char stringpool_str177[sizeof("CSASCII")]; -- char stringpool_str178[sizeof("ISO_8859-13")]; -- char stringpool_str179[sizeof("ISO-IR-179")]; -- char stringpool_str182[sizeof("ISO-8859-7")]; -- char stringpool_str184[sizeof("ISO-IR-203")]; -- char stringpool_str189[sizeof("ISO-IR-149")]; -- char stringpool_str190[sizeof("MS-EE")]; -- char stringpool_str191[sizeof("ISO-IR-148")]; -- char stringpool_str192[sizeof("US")]; -- char stringpool_str194[sizeof("CP874")]; -- char stringpool_str195[sizeof("ISO8859-4")]; -- char stringpool_str196[sizeof("ISO-IR-110")]; -- char stringpool_str197[sizeof("ISO_8859-10:1992")]; -- char stringpool_str199[sizeof("ISO_8859-16:2000")]; -- char stringpool_str201[sizeof("ISO8859-14")]; -- char stringpool_str202[sizeof("ISO-8859-4")]; -- char stringpool_str203[sizeof("IBM862")]; -- char stringpool_str206[sizeof("ISO-IR-57")]; -- char stringpool_str207[sizeof("IBM866")]; -- char stringpool_str208[sizeof("ISO-8859-14")]; -- char stringpool_str209[sizeof("ISO-IR-127")]; -- char stringpool_str210[sizeof("ISO-2022-CN-EXT")]; -- char stringpool_str211[sizeof("ISO-IR-87")]; -- char stringpool_str212[sizeof("ISO-IR-157")]; -- char stringpool_str213[sizeof("UCS-2")]; -- char stringpool_str214[sizeof("IBM819")]; -- char stringpool_str221[sizeof("ISO_8859-14:1998")]; -- char stringpool_str222[sizeof("ISO-IR-14")]; -- char stringpool_str225[sizeof("ELOT_928")]; -- char stringpool_str227[sizeof("LATIN7")]; -- char stringpool_str228[sizeof("UTF-16")]; -- char stringpool_str230[sizeof("ISO_8859-10")]; -- char stringpool_str232[sizeof("CSUNICODE")]; -- char stringpool_str233[sizeof("UCS-2LE")]; -- char stringpool_str234[sizeof("UTF-8")]; -- char stringpool_str235[sizeof("ISO-IR-100")]; -- char stringpool_str236[sizeof("ISO_8859-7")]; -- char stringpool_str237[sizeof("UTF-32")]; -- char stringpool_str238[sizeof("CHAR")]; -- char stringpool_str241[sizeof("UNICODE-1-1")]; -- char stringpool_str242[sizeof("CSUNICODE11")]; -- char stringpool_str244[sizeof("TIS620")]; -- char stringpool_str245[sizeof("EUCKR")]; -- char stringpool_str246[sizeof("UTF-16LE")]; -- char stringpool_str247[sizeof("LATIN4")]; -- char stringpool_str250[sizeof("KSC_5601")]; -- char stringpool_str251[sizeof("TIS-620")]; -- char stringpool_str252[sizeof("EUC-KR")]; -- char stringpool_str254[sizeof("IBM-CP1133")]; -- char stringpool_str256[sizeof("ISO_8859-4")]; -- char stringpool_str257[sizeof("UTF-32LE")]; -- char stringpool_str258[sizeof("VISCII")]; -- char stringpool_str259[sizeof("KOI8-R")]; -- char stringpool_str262[sizeof("ISO_8859-14")]; -- char stringpool_str264[sizeof("CSKOI8R")]; -- char stringpool_str266[sizeof("GREEK8")]; -- char stringpool_str267[sizeof("MS-CYRL")]; -- char stringpool_str270[sizeof("CSVISCII")]; -- char stringpool_str280[sizeof("IBM850")]; -- char stringpool_str283[sizeof("ISO-IR-144")]; -- char stringpool_str286[sizeof("BIG5")]; -- char stringpool_str287[sizeof("UCS-4LE")]; -- char stringpool_str288[sizeof("GB18030")]; -- char stringpool_str290[sizeof("MACCYRILLIC")]; -- char stringpool_str291[sizeof("CSUNICODE11UTF7")]; -- char stringpool_str292[sizeof("UNICODE-1-1-UTF-7")]; -- char stringpool_str293[sizeof("BIG-5")]; -- char stringpool_str295[sizeof("IBM367")]; -- char stringpool_str296[sizeof("TIS620-0")]; -- char stringpool_str298[sizeof("CSBIG5")]; -- char stringpool_str299[sizeof("NEXTSTEP")]; -- char stringpool_str301[sizeof("CSKSC56011987")]; -- char stringpool_str302[sizeof("CSISOLATIN1")]; -- char stringpool_str303[sizeof("KOREAN")]; -- char stringpool_str304[sizeof("CSISOLATIN2")]; -- char stringpool_str305[sizeof("CN-BIG5")]; -- char stringpool_str306[sizeof("UTF-7")]; -- char stringpool_str308[sizeof("CSISOLATIN6")]; -- char stringpool_str309[sizeof("CSISOLATINCYRILLIC")]; -- char stringpool_str310[sizeof("CSISOLATIN5")]; -- char stringpool_str312[sizeof("TCVN")]; -- char stringpool_str315[sizeof("TIS620.2529-1")]; -- char stringpool_str318[sizeof("CSGB2312")]; -- char stringpool_str320[sizeof("ISO-10646-UCS-2")]; -- char stringpool_str321[sizeof("UCS-4")]; -- char stringpool_str322[sizeof("MULELAO-1")]; -- char stringpool_str323[sizeof("ISO-2022-KR")]; -- char stringpool_str324[sizeof("ECMA-118")]; -- char stringpool_str325[sizeof("GB_2312-80")]; -- char stringpool_str326[sizeof("CSUCS4")]; -- char stringpool_str327[sizeof("GBK")]; -- char stringpool_str328[sizeof("CSISOLATIN3")]; -- char stringpool_str329[sizeof("ISO646-US")]; -- char stringpool_str331[sizeof("US-ASCII")]; -- char stringpool_str332[sizeof("TIS620.2533-1")]; -- char stringpool_str333[sizeof("KOI8-T")]; -- char stringpool_str334[sizeof("MS-ANSI")]; -- char stringpool_str335[sizeof("KS_C_5601-1989")]; -- char stringpool_str336[sizeof("GB_1988-80")]; -- char stringpool_str339[sizeof("EUCTW")]; -- char stringpool_str343[sizeof("GREEK")]; -- char stringpool_str346[sizeof("EUC-TW")]; -- char stringpool_str347[sizeof("WINDOWS-1251")]; -- char stringpool_str348[sizeof("WINDOWS-1252")]; -- char stringpool_str349[sizeof("JP")]; -- char stringpool_str350[sizeof("WINDOWS-1256")]; -- char stringpool_str351[sizeof("WINDOWS-1255")]; -- char stringpool_str353[sizeof("VISCII1.1-1")]; -- char stringpool_str354[sizeof("CSISO2022KR")]; -- char stringpool_str356[sizeof("WINDOWS-1258")]; -- char stringpool_str360[sizeof("WINDOWS-1253")]; -- char stringpool_str361[sizeof("ARMSCII-8")]; -- char stringpool_str366[sizeof("CSIBM866")]; -- char stringpool_str368[sizeof("ROMAN8")]; -- char stringpool_str369[sizeof("HZ-GB-2312")]; -- char stringpool_str370[sizeof("EUCJP")]; -- char stringpool_str371[sizeof("TIS620.2533-0")]; -- char stringpool_str372[sizeof("KS_C_5601-1987")]; -- char stringpool_str373[sizeof("MACICELAND")]; -- char stringpool_str374[sizeof("ISO-10646-UCS-4")]; -- char stringpool_str375[sizeof("UCS-2BE")]; -- char stringpool_str377[sizeof("EUC-JP")]; -- char stringpool_str386[sizeof("WINDOWS-1250")]; -- char stringpool_str387[sizeof("ARABIC")]; -- char stringpool_str388[sizeof("UTF-16BE")]; -- char stringpool_str391[sizeof("TCVN-5712")]; -- char stringpool_str392[sizeof("WINDOWS-1257")]; -- char stringpool_str394[sizeof("CSPC862LATINHEBREW")]; -- char stringpool_str396[sizeof("TCVN5712-1")]; -- char stringpool_str399[sizeof("UTF-32BE")]; -- char stringpool_str402[sizeof("WINDOWS-1254")]; -- char stringpool_str404[sizeof("CSEUCKR")]; -- char stringpool_str406[sizeof("ASMO-708")]; -- char stringpool_str409[sizeof("CSISOLATINARABIC")]; -- char stringpool_str410[sizeof("MACINTOSH")]; -- char stringpool_str411[sizeof("UCS-2-INTERNAL")]; -- char stringpool_str412[sizeof("CSISOLATIN4")]; -- char stringpool_str416[sizeof("ECMA-114")]; -- char stringpool_str418[sizeof("CN-GB-ISOIR165")]; -- char stringpool_str420[sizeof("ANSI_X3.4-1986")]; -- char stringpool_str421[sizeof("CSISO57GB1988")]; -- char stringpool_str423[sizeof("CSISO58GB231280")]; -- char stringpool_str424[sizeof("HP-ROMAN8")]; -- char stringpool_str426[sizeof("ANSI_X3.4-1968")]; -- char stringpool_str427[sizeof("MACTHAI")]; -- char stringpool_str429[sizeof("UCS-4BE")]; -- char stringpool_str430[sizeof("CSHPROMAN8")]; -- char stringpool_str432[sizeof("CN-GB")]; -- char stringpool_str434[sizeof("UNICODELITTLE")]; -- char stringpool_str435[sizeof("ISO_8859-5:1988")]; -- char stringpool_str438[sizeof("ISO_8859-9:1989")]; -- char stringpool_str440[sizeof("ISO_8859-8:1988")]; -- char stringpool_str441[sizeof("KOI8-U")]; -- char stringpool_str444[sizeof("ISO_8859-3:1988")]; -- char stringpool_str448[sizeof("ISO-2022-JP")]; -- char stringpool_str449[sizeof("ISO-2022-JP-1")]; -- char stringpool_str450[sizeof("ISO-2022-JP-2")]; -- char stringpool_str451[sizeof("CSISOLATINHEBREW")]; -- char stringpool_str454[sizeof("ISO646-JP")]; -- char stringpool_str457[sizeof("EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE")]; -- char stringpool_str465[sizeof("UCS-4-INTERNAL")]; -- char stringpool_str467[sizeof("ISO_8859-1:1987")]; -- char stringpool_str468[sizeof("ISO_8859-2:1987")]; -- char stringpool_str470[sizeof("ISO_8859-6:1987")]; -- char stringpool_str479[sizeof("CSISO2022JP")]; -- char stringpool_str480[sizeof("CSISO2022JP2")]; -- char stringpool_str486[sizeof("ISO_8859-4:1988")]; -- char stringpool_str489[sizeof("MACCENTRALEUROPE")]; -- char stringpool_str492[sizeof("HEBREW")]; -- char stringpool_str494[sizeof("MS-HEBR")]; -- char stringpool_str496[sizeof("ISO_646.IRV:1991")]; -- char stringpool_str498[sizeof("CSEUCTW")]; -- char stringpool_str503[sizeof("KOI8-RU")]; -- char stringpool_str505[sizeof("WINDOWS-874")]; -- char stringpool_str508[sizeof("JIS0208")]; -- char stringpool_str509[sizeof("GEORGIAN-PS")]; -- char stringpool_str512[sizeof("ISO_8859-7:1987")]; -- char stringpool_str514[sizeof("CSISOLATINGREEK")]; -- char stringpool_str515[sizeof("JIS_C6226-1983")]; -- char stringpool_str518[sizeof("MACROMAN")]; -- char stringpool_str519[sizeof("UCS-2-SWAPPED")]; -- char stringpool_str524[sizeof("CSMACINTOSH")]; -- char stringpool_str527[sizeof("BIGFIVE")]; -- char stringpool_str528[sizeof("CSISO159JISX02121990")]; -- char stringpool_str529[sizeof("CSISO14JISC6220RO")]; -- char stringpool_str530[sizeof("CSPC850MULTILINGUAL")]; -- char stringpool_str534[sizeof("BIG-FIVE")]; -- char stringpool_str541[sizeof("JIS_C6220-1969-RO")]; -- char stringpool_str545[sizeof("JIS_X0212")]; -- char stringpool_str549[sizeof("BIG5HKSCS")]; -- char stringpool_str553[sizeof("JISX0201-1976")]; -- char stringpool_str554[sizeof("GEORGIAN-ACADEMY")]; -- char stringpool_str556[sizeof("BIG5-HKSCS")]; -- char stringpool_str560[sizeof("CSISO87JISX0208")]; -- char stringpool_str570[sizeof("MACGREEK")]; -- char stringpool_str571[sizeof("MS-GREEK")]; -- char stringpool_str573[sizeof("UCS-4-SWAPPED")]; -- char stringpool_str578[sizeof("MACCROATIAN")]; -- char stringpool_str582[sizeof("JIS_X0201")]; -- char stringpool_str585[sizeof("WCHAR_T")]; -- char stringpool_str594[sizeof("UNICODEBIG")]; -- char stringpool_str599[sizeof("JIS_X0212-1990")]; -- char stringpool_str600[sizeof("JIS_X0208")]; -- char stringpool_str614[sizeof("MACARABIC")]; -- char stringpool_str619[sizeof("CSHALFWIDTHKATAKANA")]; -- char stringpool_str620[sizeof("JIS_X0208-1983")]; -- char stringpool_str621[sizeof("SHIFT-JIS")]; -- char stringpool_str626[sizeof("MACUKRAINE")]; -- char stringpool_str635[sizeof("CSEUCPKDFMTJAPANESE")]; -- char stringpool_str646[sizeof("JIS_X0208-1990")]; -- char stringpool_str663[sizeof("CSSHIFTJIS")]; -- char stringpool_str664[sizeof("JIS_X0212.1990-0")]; -- char stringpool_str665[sizeof("MACHEBREW")]; -- char stringpool_str675[sizeof("SHIFT_JIS")]; -- char stringpool_str685[sizeof("TCVN5712-1:1993")]; -- char stringpool_str694[sizeof("MS-TURK")]; -- char stringpool_str717[sizeof("MACTURKISH")]; -- char stringpool_str731[sizeof("MACROMANIA")]; -- char stringpool_str750[sizeof("MS-ARAB")]; -- char stringpool_str753[sizeof("JAVA")]; -- char stringpool_str798[sizeof("MS_KANJI")]; -- char stringpool_str799[sizeof("JOHAB")]; -- char stringpool_str879[sizeof("WINBALTRIM")]; -+ char stringpool_str4[sizeof("L1")]; -+ char stringpool_str7[sizeof("US")]; -+ char stringpool_str10[sizeof("CHAR")]; -+ char stringpool_str11[sizeof("ASCII")]; -+ char stringpool_str12[sizeof("UCS-4")]; -+ char stringpool_str14[sizeof("UCS-2")]; -+ char stringpool_str16[sizeof("UTF-8")]; -+ char stringpool_str17[sizeof("CSUCS4")]; -+ char stringpool_str18[sizeof("UCS-4LE")]; -+ char stringpool_str19[sizeof("UCS-2LE")]; -+ char stringpool_str20[sizeof("CSASCII")]; -+ char stringpool_str21[sizeof("UTF-16")]; -+ char stringpool_str22[sizeof("UTF-16LE")]; -+ char stringpool_str23[sizeof("LATIN1")]; -+ char stringpool_str24[sizeof("ISO-IR-6")]; -+ char stringpool_str26[sizeof("UCS-4-INTERNAL")]; -+ char stringpool_str27[sizeof("UCS-2-INTERNAL")]; -+ char stringpool_str28[sizeof("UTF-7")]; -+ char stringpool_str29[sizeof("ISO646-US")]; -+ char stringpool_str30[sizeof("CP367")]; -+ char stringpool_str31[sizeof("UCS-4-SWAPPED")]; -+ char stringpool_str32[sizeof("UCS-2-SWAPPED")]; -+ char stringpool_str33[sizeof("UNICODE-1-1")]; -+ char stringpool_str34[sizeof("UNICODEBIG")]; -+ char stringpool_str35[sizeof("UNICODELITTLE")]; -+ char stringpool_str36[sizeof("ISO-8859-1")]; -+ char stringpool_str37[sizeof("CSUNICODE")]; -+ char stringpool_str39[sizeof("CSUNICODE11")]; -+ char stringpool_str40[sizeof("UCS-4BE")]; -+ char stringpool_str41[sizeof("UCS-2BE")]; -+ char stringpool_str42[sizeof("UTF-32")]; -+ char stringpool_str43[sizeof("CP819")]; -+ char stringpool_str44[sizeof("UTF-16BE")]; -+ char stringpool_str45[sizeof("UTF-32LE")]; -+ char stringpool_str46[sizeof("ISO_646.IRV:1991")]; -+ char stringpool_str47[sizeof("UNICODE-1-1-UTF-7")]; -+ char stringpool_str48[sizeof("IBM819")]; -+ char stringpool_str49[sizeof("ISO_8859-1")]; -+ char stringpool_str50[sizeof("ISO8859-1")]; -+ char stringpool_str51[sizeof("CSUNICODE11UTF7")]; -+ char stringpool_str52[sizeof("US-ASCII")]; -+ char stringpool_str53[sizeof("ISO-IR-100")]; -+ char stringpool_str58[sizeof("IBM367")]; -+ char stringpool_str59[sizeof("ISO-10646-UCS-4")]; -+ char stringpool_str60[sizeof("ISO-10646-UCS-2")]; -+ char stringpool_str62[sizeof("ISO_8859-1:1987")]; -+ char stringpool_str63[sizeof("WCHAR_T")]; -+ char stringpool_str64[sizeof("CSISOLATIN1")]; -+ char stringpool_str65[sizeof("ANSI_X3.4-1968")]; -+ char stringpool_str66[sizeof("ANSI_X3.4-1986")]; -+ char stringpool_str67[sizeof("UTF-32BE")]; - }; - static const struct stringpool_t stringpool_contents = - { -- "CN", - "L1", -- "L2", -- "L6", -- "L5", -- "L8", -- "862", -- "L3", -- "866", -- "C99", -- "EUCCN", -- "CP1251", -- "CP1252", -- "CP862", -- "EUC-CN", -- "CP1256", -- "CP866", -- "CP1255", -- "HZ", -- "CP1361", -- "CP932", -- "CP819", -- "CP936", -- "X0212", -- "CP1258", -- "L7", -- "CP1253", -- "L4", -- "CP1133", -- "R8", -- "CHINESE", -- "ISO8859-1", -- "ISO8859-2", -- "ISO8859-6", -- "ISO-8859-1", -- "ISO8859-5", -- "ISO-8859-2", -- "X0201", -- "ISO8859-16", -- "ISO-8859-6", -- "ISO8859-15", -- "ISO-8859-5", -- "ISO8859-9", -- "ISO8859-8", -- "ISO-8859-16", -- "850", -- "ISO-8859-15", -- "ISO-8859-9", -- "CP949", -- "ISO-8859-8", -- "ISO8859-3", -- "ISO-IR-6", -- "X0208", -- "CYRILLIC", -- "ISO-2022-CN", -- "ISO8859-13", -- "ISO-8859-3", -- "CP1250", -- "CP950", -- "CP850", -- "ISO646-CN", -- "SJIS", -- "ISO-8859-13", -- "ISO-IR-126", -- "ISO-IR-226", -- "ISO-IR-166", -- "ISO-IR-165", -- "CP1257", -- "ASCII", -- "ISO-IR-58", -- "CP367", -- "LATIN1", -- "ISO-IR-159", -- "LATIN2", -- "ISO-IR-199", -- "LATIN6", -- "LATIN5", -- "ISO_8859-1", -- "CSISO2022CN", -- "ISO_8859-2", -- "ISO-IR-138", -- "CP1254", -- "ISO_8859-6", -- "ISO_8859-5", -- "LATIN8", -- "ISO-IR-101", -- "ISO_8859-16", -- "GB2312", -- "ISO_8859-15", -- "ISO-CELTIC", -- "ISO_8859-9", -- "LATIN3", -- "ISO_8859-8", -- "UHC", -- "ISO8859-10", -- "ISO_8859-15:1998", -- "MAC", -- "ISO_8859-3", -- "ISO-IR-109", -- "ISO8859-7", -- "ISO-8859-10", -- "CSASCII", -- "ISO_8859-13", -- "ISO-IR-179", -- "ISO-8859-7", -- "ISO-IR-203", -- "ISO-IR-149", -- "MS-EE", -- "ISO-IR-148", - "US", -- "CP874", -- "ISO8859-4", -- "ISO-IR-110", -- "ISO_8859-10:1992", -- "ISO_8859-16:2000", -- "ISO8859-14", -- "ISO-8859-4", -- "IBM862", -- "ISO-IR-57", -- "IBM866", -- "ISO-8859-14", -- "ISO-IR-127", -- "ISO-2022-CN-EXT", -- "ISO-IR-87", -- "ISO-IR-157", -+ "CHAR", -+ "ASCII", -+ "UCS-4", - "UCS-2", -- "IBM819", -- "ISO_8859-14:1998", -- "ISO-IR-14", -- "ELOT_928", -- "LATIN7", -- "UTF-16", -- "ISO_8859-10", -- "CSUNICODE", -- "UCS-2LE", - "UTF-8", -- "ISO-IR-100", -- "ISO_8859-7", -- "UTF-32", -- "CHAR", -+ "CSUCS4", -+ "UCS-4LE", -+ "UCS-2LE", -+ "CSASCII", -+ "UTF-16", -+ "UTF-16LE", -+ "LATIN1", -+ "ISO-IR-6", -+ "UCS-4-INTERNAL", -+ "UCS-2-INTERNAL", -+ "UTF-7", -+ "ISO646-US", -+ "CP367", -+ "UCS-4-SWAPPED", -+ "UCS-2-SWAPPED", - "UNICODE-1-1", -+ "UNICODEBIG", -+ "UNICODELITTLE", -+ "ISO-8859-1", -+ "CSUNICODE", - "CSUNICODE11", -- "TIS620", -- "EUCKR", -- "UTF-16LE", -- "LATIN4", -- "KSC_5601", -- "TIS-620", -- "EUC-KR", -- "IBM-CP1133", -- "ISO_8859-4", -+ "UCS-4BE", -+ "UCS-2BE", -+ "UTF-32", -+ "CP819", -+ "UTF-16BE", - "UTF-32LE", -- "VISCII", -- "KOI8-R", -- "ISO_8859-14", -- "CSKOI8R", -- "GREEK8", -- "MS-CYRL", -- "CSVISCII", -- "IBM850", -- "ISO-IR-144", -- "BIG5", -- "UCS-4LE", -- "GB18030", -- "MACCYRILLIC", -- "CSUNICODE11UTF7", -+ "ISO_646.IRV:1991", - "UNICODE-1-1-UTF-7", -- "BIG-5", -- "IBM367", -- "TIS620-0", -- "CSBIG5", -- "NEXTSTEP", -- "CSKSC56011987", -- "CSISOLATIN1", -- "KOREAN", -- "CSISOLATIN2", -- "CN-BIG5", -- "UTF-7", -- "CSISOLATIN6", -- "CSISOLATINCYRILLIC", -- "CSISOLATIN5", -- "TCVN", -- "TIS620.2529-1", -- "CSGB2312", -- "ISO-10646-UCS-2", -- "UCS-4", -- "MULELAO-1", -- "ISO-2022-KR", -- "ECMA-118", -- "GB_2312-80", -- "CSUCS4", -- "GBK", -- "CSISOLATIN3", -- "ISO646-US", -+ "IBM819", -+ "ISO_8859-1", -+ "ISO8859-1", -+ "CSUNICODE11UTF7", - "US-ASCII", -- "TIS620.2533-1", -- "KOI8-T", -- "MS-ANSI", -- "KS_C_5601-1989", -- "GB_1988-80", -- "EUCTW", -- "GREEK", -- "EUC-TW", -- "WINDOWS-1251", -- "WINDOWS-1252", -- "JP", -- "WINDOWS-1256", -- "WINDOWS-1255", -- "VISCII1.1-1", -- "CSISO2022KR", -- "WINDOWS-1258", -- "WINDOWS-1253", -- "ARMSCII-8", -- "CSIBM866", -- "ROMAN8", -- "HZ-GB-2312", -- "EUCJP", -- "TIS620.2533-0", -- "KS_C_5601-1987", -- "MACICELAND", -+ "ISO-IR-100", -+ "IBM367", - "ISO-10646-UCS-4", -- "UCS-2BE", -- "EUC-JP", -- "WINDOWS-1250", -- "ARABIC", -- "UTF-16BE", -- "TCVN-5712", -- "WINDOWS-1257", -- "CSPC862LATINHEBREW", -- "TCVN5712-1", -- "UTF-32BE", -- "WINDOWS-1254", -- "CSEUCKR", -- "ASMO-708", -- "CSISOLATINARABIC", -- "MACINTOSH", -- "UCS-2-INTERNAL", -- "CSISOLATIN4", -- "ECMA-114", -- "CN-GB-ISOIR165", -- "ANSI_X3.4-1986", -- "CSISO57GB1988", -- "CSISO58GB231280", -- "HP-ROMAN8", -- "ANSI_X3.4-1968", -- "MACTHAI", -- "UCS-4BE", -- "CSHPROMAN8", -- "CN-GB", -- "UNICODELITTLE", -- "ISO_8859-5:1988", -- "ISO_8859-9:1989", -- "ISO_8859-8:1988", -- "KOI8-U", -- "ISO_8859-3:1988", -- "ISO-2022-JP", -- "ISO-2022-JP-1", -- "ISO-2022-JP-2", -- "CSISOLATINHEBREW", -- "ISO646-JP", -- "EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE", -- "UCS-4-INTERNAL", -+ "ISO-10646-UCS-2", - "ISO_8859-1:1987", -- "ISO_8859-2:1987", -- "ISO_8859-6:1987", -- "CSISO2022JP", -- "CSISO2022JP2", -- "ISO_8859-4:1988", -- "MACCENTRALEUROPE", -- "HEBREW", -- "MS-HEBR", -- "ISO_646.IRV:1991", -- "CSEUCTW", -- "KOI8-RU", -- "WINDOWS-874", -- "JIS0208", -- "GEORGIAN-PS", -- "ISO_8859-7:1987", -- "CSISOLATINGREEK", -- "JIS_C6226-1983", -- "MACROMAN", -- "UCS-2-SWAPPED", -- "CSMACINTOSH", -- "BIGFIVE", -- "CSISO159JISX02121990", -- "CSISO14JISC6220RO", -- "CSPC850MULTILINGUAL", -- "BIG-FIVE", -- "JIS_C6220-1969-RO", -- "JIS_X0212", -- "BIG5HKSCS", -- "JISX0201-1976", -- "GEORGIAN-ACADEMY", -- "BIG5-HKSCS", -- "CSISO87JISX0208", -- "MACGREEK", -- "MS-GREEK", -- "UCS-4-SWAPPED", -- "MACCROATIAN", -- "JIS_X0201", - "WCHAR_T", -- "UNICODEBIG", -- "JIS_X0212-1990", -- "JIS_X0208", -- "MACARABIC", -- "CSHALFWIDTHKATAKANA", -- "JIS_X0208-1983", -- "SHIFT-JIS", -- "MACUKRAINE", -- "CSEUCPKDFMTJAPANESE", -- "JIS_X0208-1990", -- "CSSHIFTJIS", -- "JIS_X0212.1990-0", -- "MACHEBREW", -- "SHIFT_JIS", -- "TCVN5712-1:1993", -- "MS-TURK", -- "MACTURKISH", -- "MACROMANIA", -- "MS-ARAB", -- "JAVA", -- "MS_KANJI", -- "JOHAB", -- "WINBALTRIM" -+ "CSISOLATIN1", -+ "ANSI_X3.4-1968", -+ "ANSI_X3.4-1986", -+ "UTF-32BE" - }; - #define stringpool ((const char *) &stringpool_contents) - - static const struct alias aliases[] = - { -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 271 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str15, ei_iso646_cn}, -- {-1}, --#line 60 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str17, ei_iso8859_1}, --#line 68 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str18, ei_iso8859_2}, -- {-1}, --#line 133 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str20, ei_iso8859_10}, --#line 125 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str21, ei_iso8859_9}, -- {-1}, {-1}, {-1}, {-1}, --#line 147 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str26, ei_iso8859_14}, -- {-1}, {-1}, --#line 196 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str29, ei_cp862}, --#line 76 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str30, ei_iso8859_3}, -- {-1}, {-1}, --#line 200 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str33, ei_cp866}, --#line 51 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str34, ei_c99}, -- {-1}, {-1}, {-1}, --#line 301 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str38, ei_euc_cn}, -- {-1}, {-1}, --#line 167 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str41, ei_cp1251}, -- {-1}, --#line 170 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str43, ei_cp1252}, --#line 194 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str44, ei_cp862}, --#line 300 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str45, ei_euc_cn}, -- {-1}, --#line 182 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str47, ei_cp1256}, --#line 198 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str48, ei_cp866}, --#line 179 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str49, ei_cp1255}, --#line 311 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str50, ei_hz}, -- {-1}, --#line 331 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str52, ei_johab}, --#line 294 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str53, ei_cp932}, -- {-1}, --#line 57 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str55, ei_iso8859_1}, -- {-1}, --#line 306 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str57, ei_ces_gbk}, --#line 265 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str58, ei_jisx0212}, --#line 188 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str59, ei_cp1258}, -- {-1}, {-1}, --#line 140 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str62, ei_iso8859_13}, -- {-1}, {-1}, {-1}, {-1}, --#line 173 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str67, ei_cp1253}, - {-1}, {-1}, {-1}, {-1}, --#line 84 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str72, ei_iso8859_4}, -+#line 58 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str4, ei_iso8859_1}, - {-1}, {-1}, --#line 227 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str75, ei_cp1133}, -- {-1}, --#line 219 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str77, ei_hp_roman8}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 276 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str84, ei_gb2312}, --#line 62 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str85, ei_iso8859_1}, -- {-1}, --#line 70 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str87, ei_iso8859_2}, -- {-1}, {-1}, {-1}, --#line 102 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str91, ei_iso8859_6}, --#line 53 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str92, ei_iso8859_1}, --#line 93 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str93, ei_iso8859_5}, --#line 63 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str94, ei_iso8859_2}, --#line 252 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str95, ei_jisx0201}, -- {-1}, --#line 159 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str97, ei_iso8859_16}, --#line 94 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str98, ei_iso8859_6}, --#line 154 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str99, ei_iso8859_15}, --#line 87 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str100, ei_iso8859_5}, --#line 127 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str101, ei_iso8859_9}, -- {-1}, --#line 119 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str103, ei_iso8859_8}, --#line 155 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str104, ei_iso8859_16}, --#line 192 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str105, ei_cp850}, --#line 150 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str106, ei_iso8859_15}, -- {-1}, --#line 120 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str108, ei_iso8859_9}, --#line 328 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str109, ei_cp949}, --#line 113 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str110, ei_iso8859_8}, --#line 78 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str111, ei_iso8859_3}, --#line 16 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str112, ei_ascii}, --#line 258 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str113, ei_jisx0208}, --#line 91 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str114, ei_iso8859_5}, -- {-1}, --#line 308 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str116, ei_iso2022_cn}, --#line 141 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str117, ei_iso8859_13}, --#line 71 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str118, ei_iso8859_3}, --#line 164 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str119, ei_cp1250}, --#line 322 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str120, ei_cp950}, --#line 190 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str121, ei_cp850}, --#line 269 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str122, ei_iso646_cn}, --#line 291 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str123, ei_sjis}, --#line 136 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str124, ei_iso8859_13}, --#line 106 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str125, ei_iso8859_7}, --#line 158 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str126, ei_iso8859_16}, --#line 235 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str127, ei_tis620}, -- {-1}, --#line 277 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str129, ei_isoir165}, -- {-1}, --#line 185 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str131, ei_cp1257}, --#line 13 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str132, ei_ascii}, -- {-1}, --#line 274 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str134, ei_gb2312}, -- {-1}, --#line 19 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str136, ei_ascii}, --#line 59 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str137, ei_iso8859_1}, --#line 266 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str138, ei_jisx0212}, --#line 67 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str139, ei_iso8859_2}, -- {-1}, {-1}, --#line 145 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str142, ei_iso8859_14}, --#line 132 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str143, ei_iso8859_10}, -- {-1}, --#line 124 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str145, ei_iso8859_9}, --#line 54 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str146, ei_iso8859_1}, --#line 309 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str147, ei_iso2022_cn}, --#line 64 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str148, ei_iso8859_2}, --#line 116 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str149, ei_iso8859_8}, -- {-1}, --#line 176 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str151, ei_cp1254}, --#line 95 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str152, ei_iso8859_6}, -- {-1}, --#line 88 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str154, ei_iso8859_5}, --#line 146 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str155, ei_iso8859_14}, -- {-1}, --#line 66 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str157, ei_iso8859_2}, --#line 156 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str158, ei_iso8859_16}, --#line 302 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str159, ei_euc_cn}, --#line 151 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str160, ei_iso8859_15}, --#line 148 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str161, ei_iso8859_14}, --#line 121 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str162, ei_iso8859_9}, --#line 75 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str163, ei_iso8859_3}, --#line 114 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str164, ei_iso8859_8}, --#line 329 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str165, ei_cp949}, -- {-1}, {-1}, {-1}, --#line 135 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str169, ei_iso8859_10}, --#line 152 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str170, ei_iso8859_15}, --#line 204 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str171, ei_mac_roman}, --#line 72 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str172, ei_iso8859_3}, --#line 74 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str173, ei_iso8859_3}, -- {-1}, --#line 112 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str175, ei_iso8859_7}, --#line 128 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str176, ei_iso8859_10}, --#line 22 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str177, ei_ascii}, --#line 137 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str178, ei_iso8859_13}, --#line 138 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str179, ei_iso8859_13}, -- {-1}, {-1}, --#line 103 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str182, ei_iso8859_7}, -- {-1}, --#line 153 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str184, ei_iso8859_15}, -- {-1}, {-1}, {-1}, {-1}, --#line 282 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str189, ei_ksc5601}, --#line 166 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str190, ei_cp1250}, --#line 123 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str191, ei_iso8859_9}, --#line 21 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str192, ei_ascii}, -- {-1}, --#line 236 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str194, ei_cp874}, --#line 86 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str195, ei_iso8859_4}, --#line 82 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str196, ei_iso8859_4}, --#line 130 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str197, ei_iso8859_10}, -- {-1}, --#line 157 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str199, ei_iso8859_16}, -- {-1}, --#line 149 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str201, ei_iso8859_14}, --#line 79 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str202, ei_iso8859_4}, --#line 195 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str203, ei_cp862}, -- {-1}, {-1}, --#line 270 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str206, ei_iso646_cn}, --#line 199 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str207, ei_cp866}, --#line 142 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str208, ei_iso8859_14}, --#line 97 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str209, ei_iso8859_6}, --#line 310 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str210, ei_iso2022_cn_ext}, --#line 259 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str211, ei_jisx0208}, --#line 131 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str212, ei_iso8859_10}, --#line 24 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str213, ei_ucs2}, --#line 58 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str214, ei_iso8859_1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 144 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str221, ei_iso8859_14}, --#line 247 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str222, ei_iso646_jp}, -- {-1}, {-1}, --#line 108 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str225, ei_iso8859_7}, -- {-1}, --#line 139 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str227, ei_iso8859_13}, --#line 38 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str228, ei_utf16}, -- {-1}, --#line 129 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str230, ei_iso8859_10}, -- {-1}, --#line 26 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str232, ei_ucs2}, --#line 31 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str233, ei_ucs2le}, --#line 23 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str234, ei_utf8}, --#line 56 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str235, ei_iso8859_1}, --#line 104 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str236, ei_iso8859_7}, --#line 41 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str237, ei_utf32}, --#line 334 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str238, ei_local_char}, -- {-1}, {-1}, --#line 29 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str241, ei_ucs2be}, --#line 30 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str242, ei_ucs2be}, -- {-1}, --#line 230 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str244, ei_tis620}, --#line 326 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str245, ei_euc_kr}, --#line 40 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str246, ei_utf16le}, --#line 83 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str247, ei_iso8859_4}, -- {-1}, {-1}, --#line 279 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str250, ei_ksc5601}, --#line 229 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str251, ei_tis620}, --#line 325 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str252, ei_euc_kr}, -- {-1}, --#line 228 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str254, ei_cp1133}, -- {-1}, --#line 80 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str256, ei_iso8859_4}, --#line 43 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str257, ei_utf32le}, --#line 238 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str258, ei_viscii}, --#line 160 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str259, ei_koi8_r}, -- {-1}, {-1}, --#line 143 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str262, ei_iso8859_14}, -- {-1}, --#line 161 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str264, ei_koi8_r}, -- {-1}, --#line 109 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str266, ei_iso8859_7}, --#line 169 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str267, ei_cp1251}, -- {-1}, {-1}, --#line 240 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str270, ei_viscii}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 191 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str280, ei_cp850}, -- {-1}, {-1}, --#line 90 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str283, ei_iso8859_5}, -- {-1}, {-1}, --#line 316 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str286, ei_ces_big5}, --#line 37 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str287, ei_ucs4le}, --#line 307 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str288, ei_gb18030}, -- {-1}, --#line 210 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str290, ei_mac_cyrillic}, --#line 46 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str291, ei_utf7}, --#line 45 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str292, ei_utf7}, --#line 317 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str293, ei_ces_big5}, -- {-1}, --#line 20 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str295, ei_ascii}, --#line 231 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str296, ei_tis620}, -- {-1}, --#line 321 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str298, ei_ces_big5}, --#line 221 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str299, ei_nextstep}, -- {-1}, --#line 283 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str301, ei_ksc5601}, --#line 61 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str302, ei_iso8859_1}, --#line 284 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str303, ei_ksc5601}, --#line 69 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str304, ei_iso8859_2}, --#line 320 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str305, ei_ces_big5}, --#line 44 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str306, ei_utf7}, -- {-1}, --#line 134 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str308, ei_iso8859_10}, --#line 92 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str309, ei_iso8859_5}, --#line 126 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str310, ei_iso8859_9}, -- {-1}, --#line 241 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str312, ei_tcvn}, -- {-1}, {-1}, --#line 232 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str315, ei_tis620}, -- {-1}, {-1}, --#line 304 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str318, ei_euc_cn}, -- {-1}, --#line 25 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str320, ei_ucs2}, --#line 33 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str321, ei_ucs4}, --#line 226 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str322, ei_mulelao}, --#line 332 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str323, ei_iso2022_kr}, --#line 107 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str324, ei_iso8859_7}, --#line 273 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str325, ei_gb2312}, --#line 35 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str326, ei_ucs4}, --#line 305 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str327, ei_ces_gbk}, --#line 77 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str328, ei_iso8859_3}, --#line 14 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str329, ei_ascii}, -- {-1}, --#line 12 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str331, ei_ascii}, --#line 234 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str332, ei_tis620}, --#line 225 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str333, ei_koi8_t}, --#line 172 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str334, ei_cp1252}, --#line 281 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str335, ei_ksc5601}, --#line 268 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str336, ei_iso646_cn}, -- {-1}, {-1}, --#line 314 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str339, ei_euc_tw}, -- {-1}, {-1}, {-1}, --#line 110 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str343, ei_iso8859_7}, -- {-1}, {-1}, --#line 313 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str346, ei_euc_tw}, --#line 168 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str347, ei_cp1251}, --#line 171 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str348, ei_cp1252}, --#line 248 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str349, ei_iso646_jp}, --#line 183 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str350, ei_cp1256}, --#line 180 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str351, ei_cp1255}, -- {-1}, --#line 239 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str353, ei_viscii}, --#line 333 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str354, ei_iso2022_kr}, -- {-1}, --#line 189 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str356, ei_cp1258}, -- {-1}, {-1}, {-1}, --#line 174 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str360, ei_cp1253}, --#line 222 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str361, ei_armscii_8}, -- {-1}, {-1}, {-1}, {-1}, --#line 201 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str366, ei_cp866}, -- {-1}, --#line 218 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str368, ei_hp_roman8}, --#line 312 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str369, ei_hz}, --#line 286 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str370, ei_euc_jp}, --#line 233 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str371, ei_tis620}, --#line 280 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str372, ei_ksc5601}, --#line 207 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str373, ei_mac_iceland}, --#line 34 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str374, ei_ucs4}, --#line 27 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str375, ei_ucs2be}, -- {-1}, --#line 285 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str377, ei_euc_jp}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 165 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str386, ei_cp1250}, --#line 100 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str387, ei_iso8859_6}, --#line 39 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str388, ei_utf16be}, -- {-1}, {-1}, --#line 242 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str391, ei_tcvn}, --#line 186 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str392, ei_cp1257}, -- {-1}, --#line 197 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str394, ei_cp862}, -- {-1}, --#line 243 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str396, ei_tcvn}, -- {-1}, {-1}, --#line 42 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str399, ei_utf32be}, -- {-1}, {-1}, --#line 177 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str402, ei_cp1254}, -- {-1}, --#line 327 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str404, ei_euc_kr}, -- {-1}, --#line 99 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str406, ei_iso8859_6}, -- {-1}, {-1}, --#line 101 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str409, ei_iso8859_6}, --#line 203 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str410, ei_mac_roman}, --#line 47 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str411, ei_ucs2internal}, --#line 85 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str412, ei_iso8859_4}, -- {-1}, {-1}, {-1}, --#line 98 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str416, ei_iso8859_6}, -- {-1}, --#line 278 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str418, ei_isoir165}, -- {-1}, --#line 18 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str420, ei_ascii}, --#line 272 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str421, ei_iso646_cn}, -- {-1}, --#line 275 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str423, ei_gb2312}, --#line 217 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str424, ei_hp_roman8}, -- {-1}, --#line 17 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str426, ei_ascii}, --#line 216 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str427, ei_mac_thai}, -- {-1}, --#line 36 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str429, ei_ucs4be}, --#line 220 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str430, ei_hp_roman8}, -- {-1}, --#line 303 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str432, ei_euc_cn}, -- {-1}, --#line 32 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str434, ei_ucs2le}, --#line 89 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str435, ei_iso8859_5}, -- {-1}, {-1}, --#line 122 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str438, ei_iso8859_9}, -- {-1}, --#line 115 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str440, ei_iso8859_8}, --#line 162 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str441, ei_koi8_u}, -- {-1}, {-1}, --#line 73 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str444, ei_iso8859_3}, -- {-1}, {-1}, {-1}, --#line 295 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str448, ei_iso2022_jp}, --#line 297 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str449, ei_iso2022_jp1}, --#line 298 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str450, ei_iso2022_jp2}, --#line 118 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str451, ei_iso8859_8}, -- {-1}, {-1}, --#line 246 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str454, ei_iso646_jp}, -- {-1}, {-1}, --#line 287 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str457, ei_euc_jp}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 49 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str465, ei_ucs4internal}, -- {-1}, --#line 55 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str467, ei_iso8859_1}, --#line 65 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str468, ei_iso8859_2}, -- {-1}, --#line 96 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str470, ei_iso8859_6}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 296 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str479, ei_iso2022_jp}, --#line 299 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str480, ei_iso2022_jp2}, -- {-1}, {-1}, {-1}, {-1}, {-1}, --#line 81 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str486, ei_iso8859_4}, -- {-1}, {-1}, --#line 206 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str489, ei_mac_centraleurope}, -- {-1}, {-1}, --#line 117 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str492, ei_iso8859_8}, -- {-1}, --#line 181 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str494, ei_cp1255}, -- {-1}, --#line 15 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str496, ei_ascii}, -- {-1}, --#line 315 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str498, ei_euc_tw}, -- {-1}, {-1}, {-1}, {-1}, --#line 163 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str503, ei_koi8_ru}, -- {-1}, --#line 237 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str505, ei_cp874}, -- {-1}, {-1}, --#line 257 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str508, ei_jisx0208}, --#line 224 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str509, ei_georgian_ps}, -- {-1}, {-1}, --#line 105 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str512, ei_iso8859_7}, -- {-1}, --#line 111 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str514, ei_iso8859_7}, --#line 260 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str515, ei_jisx0208}, -- {-1}, {-1}, --#line 202 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str518, ei_mac_roman}, --#line 48 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str519, ei_ucs2swapped}, -- {-1}, {-1}, {-1}, {-1}, --#line 205 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str524, ei_mac_roman}, -- {-1}, {-1}, --#line 319 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str527, ei_ces_big5}, --#line 267 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str528, ei_jisx0212}, --#line 249 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str529, ei_iso646_jp}, --#line 193 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str530, ei_cp850}, -- {-1}, {-1}, {-1}, --#line 318 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str534, ei_ces_big5}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 245 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str541, ei_iso646_jp}, -- {-1}, {-1}, {-1}, --#line 262 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str545, ei_jisx0212}, -- {-1}, {-1}, {-1}, --#line 324 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str549, ei_big5hkscs}, -- {-1}, {-1}, {-1}, --#line 251 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str553, ei_jisx0201}, --#line 223 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str554, ei_georgian_academy}, -- {-1}, --#line 323 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str556, ei_big5hkscs}, -- {-1}, {-1}, {-1}, --#line 261 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str560, ei_jisx0208}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 212 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str570, ei_mac_greek}, --#line 175 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str571, ei_cp1253}, -- {-1}, --#line 50 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str573, ei_ucs4swapped}, -- {-1}, {-1}, {-1}, {-1}, --#line 208 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str578, ei_mac_croatian}, -- {-1}, {-1}, {-1}, --#line 250 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str582, ei_jisx0201}, -- {-1}, {-1}, --#line 335 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str585, ei_local_wchar_t}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 28 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str594, ei_ucs2be}, -- {-1}, {-1}, {-1}, {-1}, --#line 264 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str599, ei_jisx0212}, --#line 254 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str600, ei_jisx0208}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, --#line 215 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str614, ei_mac_arabic}, -- {-1}, {-1}, {-1}, {-1}, --#line 253 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str619, ei_jisx0201}, --#line 255 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str620, ei_jisx0208}, --#line 290 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str621, ei_sjis}, -- {-1}, {-1}, {-1}, {-1}, --#line 211 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str626, ei_mac_ukraine}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 288 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str635, ei_euc_jp}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, --#line 256 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str646, ei_jisx0208}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 293 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str663, ei_sjis}, --#line 263 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str664, ei_jisx0212}, --#line 214 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str665, ei_mac_hebrew}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 289 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str675, ei_sjis}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 244 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str685, ei_tcvn}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 178 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str694, ei_cp1254}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, --#line 213 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str717, ei_mac_turkish}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, --#line 209 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str731, ei_mac_romania}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 184 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str750, ei_cp1256}, -+#line 21 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str7, ei_ascii}, - {-1}, {-1}, --#line 52 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str753, ei_java}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 292 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str798, ei_sjis}, --#line 330 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str799, ei_johab}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, -- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, --#line 187 "lib/aliases.gperf" -- {(int)(long)&((struct stringpool_t *)0)->stringpool_str879, ei_cp1257} -+#line 61 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str10, ei_local_char}, -+#line 13 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str11, ei_ascii}, -+#line 33 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str12, ei_ucs4}, -+ {-1}, -+#line 24 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str14, ei_ucs2}, -+ {-1}, -+#line 23 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str16, ei_utf8}, -+#line 35 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str17, ei_ucs4}, -+#line 37 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str18, ei_ucs4le}, -+#line 31 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str19, ei_ucs2le}, -+#line 22 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str20, ei_ascii}, -+#line 38 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str21, ei_utf16}, -+#line 40 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str22, ei_utf16le}, -+#line 57 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str23, ei_iso8859_1}, -+#line 16 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str24, ei_ascii}, -+ {-1}, -+#line 49 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str26, ei_ucs4internal}, -+#line 47 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str27, ei_ucs2internal}, -+#line 44 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str28, ei_utf7}, -+#line 14 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str29, ei_ascii}, -+#line 19 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str30, ei_ascii}, -+#line 50 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str31, ei_ucs4swapped}, -+#line 48 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str32, ei_ucs2swapped}, -+#line 29 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str33, ei_ucs2be}, -+#line 28 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str34, ei_ucs2be}, -+#line 32 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str35, ei_ucs2le}, -+#line 51 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str36, ei_iso8859_1}, -+#line 26 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str37, ei_ucs2}, -+ {-1}, -+#line 30 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str39, ei_ucs2be}, -+#line 36 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str40, ei_ucs4be}, -+#line 27 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str41, ei_ucs2be}, -+#line 41 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str42, ei_utf32}, -+#line 55 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str43, ei_iso8859_1}, -+#line 39 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str44, ei_utf16be}, -+#line 43 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str45, ei_utf32le}, -+#line 15 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str46, ei_ascii}, -+#line 45 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str47, ei_utf7}, -+#line 56 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str48, ei_iso8859_1}, -+#line 52 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str49, ei_iso8859_1}, -+#line 60 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str50, ei_iso8859_1}, -+#line 46 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str51, ei_utf7}, -+#line 12 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str52, ei_ascii}, -+#line 54 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str53, ei_iso8859_1}, -+ {-1}, {-1}, {-1}, {-1}, -+#line 20 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str58, ei_ascii}, -+#line 34 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str59, ei_ucs4}, -+#line 25 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str60, ei_ucs2}, -+ {-1}, -+#line 53 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str62, ei_iso8859_1}, -+#line 62 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str63, ei_local_wchar_t}, -+#line 59 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str64, ei_iso8859_1}, -+#line 17 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str65, ei_ascii}, -+#line 18 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str66, ei_ascii}, -+#line 42 "aliases.gperf" -+ {(int)(long)&((struct stringpool_t *)0)->stringpool_str67, ei_utf32be} - }; - - #ifdef __GNUC__ -diff -Nur libiconv-1.9.1-orig/lib/converters.h libiconv-1.9.1-nocompile/lib/converters.h ---- libiconv-1.9.1-orig/lib/converters.h 2002-05-29 16:06:52.000000000 +0200 -+++ libiconv-1.9.1-nocompile/lib/converters.h 2006-03-05 15:50:36.000000000 +0100 -@@ -125,154 +125,7 @@ - #include "ucs2swapped.h" - #include "ucs4internal.h" - #include "ucs4swapped.h" --#include "c99.h" --#include "java.h" - - /* 8-bit encodings */ - #include "iso8859_1.h" --#include "iso8859_2.h" --#include "iso8859_3.h" --#include "iso8859_4.h" --#include "iso8859_5.h" --#include "iso8859_6.h" --#include "iso8859_7.h" --#include "iso8859_8.h" --#include "iso8859_9.h" --#include "iso8859_10.h" --#include "iso8859_13.h" --#include "iso8859_14.h" --#include "iso8859_15.h" --#include "iso8859_16.h" --#include "koi8_r.h" --#include "koi8_u.h" --#include "koi8_ru.h" --#include "cp1250.h" --#include "cp1251.h" --#include "cp1252.h" --#include "cp1253.h" --#include "cp1254.h" --#include "cp1255.h" --#include "cp1256.h" --#include "cp1257.h" --#include "cp1258.h" --#include "cp850.h" --#include "cp862.h" --#include "cp866.h" --#include "mac_roman.h" --#include "mac_centraleurope.h" --#include "mac_iceland.h" --#include "mac_croatian.h" --#include "mac_romania.h" --#include "mac_cyrillic.h" --#include "mac_ukraine.h" --#include "mac_greek.h" --#include "mac_turkish.h" --#include "mac_hebrew.h" --#include "mac_arabic.h" --#include "mac_thai.h" --#include "hp_roman8.h" --#include "nextstep.h" --#include "armscii_8.h" --#include "georgian_academy.h" --#include "georgian_ps.h" --#include "koi8_t.h" --#include "mulelao.h" --#include "cp1133.h" --#include "tis620.h" --#include "cp874.h" --#include "viscii.h" --#include "tcvn.h" -- --/* CJK character sets [CCS = coded character set] [CJKV.INF chapter 3] */ -- --typedef struct { -- unsigned short indx; /* index into big table */ -- unsigned short used; /* bitmask of used entries */ --} Summary16; -- --#include "iso646_jp.h" --#include "jisx0201.h" --#include "jisx0208.h" --#include "jisx0212.h" -- --#include "iso646_cn.h" --#include "gb2312.h" --#include "isoir165.h" --/*#include "gb12345.h"*/ --#include "gbk.h" --#include "cns11643.h" --#include "big5.h" -- --#include "ksc5601.h" --#include "johab_hangul.h" -- --/* CJK encodings [CES = character encoding scheme] [CJKV.INF chapter 4] */ -- --#include "euc_jp.h" --#include "sjis.h" --#include "cp932.h" --#include "iso2022_jp.h" --#include "iso2022_jp1.h" --#include "iso2022_jp2.h" -- --#include "euc_cn.h" --#include "ces_gbk.h" --#include "gb18030.h" --#include "iso2022_cn.h" --#include "iso2022_cnext.h" --#include "hz.h" --#include "euc_tw.h" --#include "ces_big5.h" --#include "cp950.h" --#include "big5hkscs.h" -- --#include "euc_kr.h" --#include "cp949.h" --#include "johab.h" --#include "iso2022_kr.h" -- --/* Encodings used by system dependent locales. */ -- --#ifdef USE_AIX --#include "cp856.h" --#include "cp922.h" --#include "cp943.h" --#include "cp1046.h" --#include "cp1124.h" --#include "cp1129.h" --#include "cp1161.h" --#include "cp1162.h" --#include "cp1163.h" --#endif -- --#ifdef USE_OSF1 --#include "dec_kanji.h" --#include "dec_hanyu.h" --#endif -- --#ifdef USE_DOS --#include "cp437.h" --#include "cp737.h" --#include "cp775.h" --#include "cp852.h" --#include "cp853.h" --#include "cp855.h" --#include "cp857.h" --#include "cp858.h" --#include "cp860.h" --#include "cp861.h" --#include "cp863.h" --#include "cp864.h" --#include "cp865.h" --#include "cp869.h" --#include "cp1125.h" --#endif -- --#ifdef USE_EXTRA --#include "euc_jisx0213.h" --#include "shift_jisx0213.h" --#include "iso2022_jp3.h" --#include "tds565.h" --#include "riscos1.h" --#endif - -diff -Nur libiconv-1.9.1-orig/lib/encodings.def libiconv-1.9.1-nocompile/lib/encodings.def ---- libiconv-1.9.1-orig/lib/encodings.def 2003-04-24 12:48:06.000000000 +0200 -+++ libiconv-1.9.1-nocompile/lib/encodings.def 2006-03-05 15:52:21.000000000 +0100 -@@ -155,16 +155,6 @@ - ucs4swapped, - { ucs4swapped_mbtowc, NULL }, { ucs4swapped_wctomb, NULL }) - --DEFENCODING(( "C99", -- ), -- c99, -- { c99_mbtowc, NULL }, { c99_wctomb, NULL }) -- --DEFENCODING(( "JAVA", -- ), -- java, -- { java_mbtowc, NULL }, { java_wctomb, NULL }) -- - /* Standard 8-bit encodings */ - - DEFENCODING(( "ISO-8859-1", /* IANA */ -@@ -182,635 +172,3 @@ - iso8859_1, - { iso8859_1_mbtowc, NULL }, { iso8859_1_wctomb, NULL }) - --DEFENCODING(( "ISO-8859-2", /* IANA */ -- "ISO_8859-2", /* IANA */ -- "ISO_8859-2:1987", /* IANA */ -- "ISO-IR-101", /* IANA */ -- "LATIN2", /* IANA */ -- "L2", /* IANA */ -- "csISOLatin2", /* IANA */ -- "ISO8859-2", /* X11R6.4, glibc, FreeBSD */ -- /*"ISO8859_2", JDK 1.1 */ -- ), -- iso8859_2, -- { iso8859_2_mbtowc, NULL }, { iso8859_2_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-3", /* IANA */ -- "ISO_8859-3", /* IANA */ -- "ISO_8859-3:1988", /* IANA */ -- "ISO-IR-109", /* IANA */ -- "LATIN3", /* IANA */ -- "L3", /* IANA */ -- "csISOLatin3", /* IANA */ -- "ISO8859-3", /* X11R6.4, glibc, FreeBSD */ -- /*"ISO8859_3", JDK 1.1 */ -- ), -- iso8859_3, -- { iso8859_3_mbtowc, NULL }, { iso8859_3_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-4", /* IANA */ -- "ISO_8859-4", /* IANA */ -- "ISO_8859-4:1988", /* IANA */ -- "ISO-IR-110", /* IANA */ -- "LATIN4", /* IANA */ -- "L4", /* IANA */ -- "csISOLatin4", /* IANA */ -- "ISO8859-4", /* X11R6.4, glibc, FreeBSD */ -- /*"ISO8859_4", JDK 1.1 */ -- ), -- iso8859_4, -- { iso8859_4_mbtowc, NULL }, { iso8859_4_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-5", /* IANA */ -- "ISO_8859-5", /* IANA */ -- "ISO_8859-5:1988", /* IANA */ -- "ISO-IR-144", /* IANA */ -- "CYRILLIC", /* IANA */ -- "csISOLatinCyrillic", /* IANA */ -- "ISO8859-5", /* X11R6.4, glibc, FreeBSD */ -- /*"ISO8859_5", JDK 1.1 */ -- ), -- iso8859_5, -- { iso8859_5_mbtowc, NULL }, { iso8859_5_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-6", /* IANA */ -- "ISO_8859-6", /* IANA */ -- "ISO_8859-6:1987", /* IANA */ -- "ISO-IR-127", /* IANA */ -- "ECMA-114", /* IANA */ -- "ASMO-708", /* IANA */ -- "ARABIC", /* IANA */ -- "csISOLatinArabic", /* IANA */ -- "ISO8859-6", /* X11R6.4, glibc, FreeBSD */ -- /*"ISO8859_6", JDK 1.1 */ -- ), -- iso8859_6, -- { iso8859_6_mbtowc, NULL }, { iso8859_6_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-7", /* IANA, RFC 1947 */ -- "ISO_8859-7", /* IANA */ -- "ISO_8859-7:1987", /* IANA */ -- "ISO-IR-126", /* IANA */ -- "ECMA-118", /* IANA */ -- "ELOT_928", /* IANA */ -- "GREEK8", /* IANA */ -- "GREEK", /* IANA */ -- "csISOLatinGreek", /* IANA */ -- "ISO8859-7", /* X11R6.4, glibc, FreeBSD */ -- /*"ISO8859_7", JDK 1.1 */ -- ), -- iso8859_7, -- { iso8859_7_mbtowc, NULL }, { iso8859_7_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-8", /* IANA */ -- "ISO_8859-8", /* IANA */ -- "ISO_8859-8:1988", /* IANA */ -- "ISO-IR-138", /* IANA */ -- "HEBREW", /* IANA */ -- "csISOLatinHebrew", /* IANA */ -- "ISO8859-8", /* X11R6.4, glibc, FreeBSD */ -- /*"ISO8859_8", JDK 1.1 */ -- ), -- iso8859_8, -- { iso8859_8_mbtowc, NULL }, { iso8859_8_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-9", /* IANA */ -- "ISO_8859-9", /* IANA */ -- "ISO_8859-9:1989", /* IANA */ -- "ISO-IR-148", /* IANA */ -- "LATIN5", /* IANA */ -- "L5", /* IANA */ -- "csISOLatin5", /* IANA */ -- "ISO8859-9", /* X11R6.4, glibc, FreeBSD */ -- /*"ISO8859_9", JDK 1.1 */ -- ), -- iso8859_9, -- { iso8859_9_mbtowc, NULL }, { iso8859_9_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-10", /* IANA */ -- "ISO_8859-10", -- "ISO_8859-10:1992", /* IANA */ -- "ISO-IR-157", /* IANA */ -- "LATIN6", /* IANA */ -- "L6", /* IANA */ -- "csISOLatin6", /* IANA */ -- "ISO8859-10", /* X11R6.4, glibc, FreeBSD */ -- ), -- iso8859_10, -- { iso8859_10_mbtowc, NULL }, { iso8859_10_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-13", /* IANA, glibc */ -- "ISO_8859-13", -- "ISO-IR-179", /* glibc */ -- "LATIN7", /* glibc */ -- "L7", /* glibc */ -- "ISO8859-13", /* glibc, FreeBSD */ -- ), -- iso8859_13, -- { iso8859_13_mbtowc, NULL }, { iso8859_13_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-14", /* IANA, glibc */ -- "ISO_8859-14", /* IANA */ -- "ISO_8859-14:1998", /* IANA, glibc */ -- "ISO-IR-199", /* IANA */ -- "LATIN8", /* IANA, glibc */ -- "L8", /* IANA, glibc */ -- "ISO-CELTIC", /* IANA */ -- "ISO8859-14", /* glibc, FreeBSD */ -- ), -- iso8859_14, -- { iso8859_14_mbtowc, NULL }, { iso8859_14_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-15", /* IANA, glibc */ -- "ISO_8859-15", /* IANA */ -- "ISO_8859-15:1998", /* glibc */ -- "ISO-IR-203", -- "ISO8859-15", /* glibc, FreeBSD */ -- ), -- iso8859_15, -- { iso8859_15_mbtowc, NULL }, { iso8859_15_wctomb, NULL }) -- --DEFENCODING(( "ISO-8859-16", -- "ISO_8859-16", -- "ISO_8859-16:2000", -- "ISO-IR-226", -- "ISO8859-16", /* glibc, FreeBSD */ -- ), -- iso8859_16, -- { iso8859_16_mbtowc, NULL }, { iso8859_16_wctomb, NULL }) -- --DEFENCODING(( "KOI8-R", /* IANA, RFC 1489, X11R6.4, JDK 1.1 */ -- "csKOI8R", /* IANA */ -- ), -- koi8_r, -- { koi8_r_mbtowc, NULL }, { koi8_r_wctomb, NULL }) -- --DEFENCODING(( "KOI8-U", /* IANA, RFC 2319 */ -- ), -- koi8_u, -- { koi8_u_mbtowc, NULL }, { koi8_u_wctomb, NULL }) -- --DEFENCODING(( "KOI8-RU", -- ), -- koi8_ru, -- { koi8_ru_mbtowc, NULL }, { koi8_ru_wctomb, NULL }) -- --/* Windows 8-bit encodings */ -- --DEFENCODING(( "CP1250", /* JDK 1.1 */ -- "WINDOWS-1250", /* IANA */ -- "MS-EE", -- ), -- cp1250, -- { cp1250_mbtowc, NULL }, { cp1250_wctomb, NULL }) -- --DEFENCODING(( "CP1251", /* JDK 1.1 */ -- "WINDOWS-1251", /* IANA */ -- "MS-CYRL", -- ), -- cp1251, -- { cp1251_mbtowc, NULL }, { cp1251_wctomb, NULL }) -- --DEFENCODING(( "CP1252", /* JDK 1.1 */ -- "WINDOWS-1252", /* IANA */ -- "MS-ANSI", -- ), -- cp1252, -- { cp1252_mbtowc, NULL }, { cp1252_wctomb, NULL }) -- --DEFENCODING(( "CP1253", /* JDK 1.1 */ -- "WINDOWS-1253", /* IANA */ -- "MS-GREEK", -- ), -- cp1253, -- { cp1253_mbtowc, NULL }, { cp1253_wctomb, NULL }) -- --DEFENCODING(( "CP1254", /* JDK 1.1 */ -- "WINDOWS-1254", /* IANA */ -- "MS-TURK", -- ), -- cp1254, -- { cp1254_mbtowc, NULL }, { cp1254_wctomb, NULL }) -- --DEFENCODING(( "CP1255", /* JDK 1.1 */ -- "WINDOWS-1255", /* IANA */ -- "MS-HEBR", -- ), -- cp1255, -- { cp1255_mbtowc, cp1255_flushwc }, { cp1255_wctomb, NULL }) -- --DEFENCODING(( "CP1256", /* JDK 1.1 */ -- "WINDOWS-1256", /* IANA */ -- "MS-ARAB", -- ), -- cp1256, -- { cp1256_mbtowc, NULL }, { cp1256_wctomb, NULL }) -- --DEFENCODING(( "CP1257", /* JDK 1.1 */ -- "WINDOWS-1257", /* IANA */ -- "WINBALTRIM", -- ), -- cp1257, -- { cp1257_mbtowc, NULL }, { cp1257_wctomb, NULL }) -- --DEFENCODING(( "CP1258", /* JDK 1.1 */ -- "WINDOWS-1258", /* IANA */ -- ), -- cp1258, -- { cp1258_mbtowc, cp1258_flushwc }, { cp1258_wctomb, NULL }) -- --/* DOS 8-bit encodings */ -- --DEFENCODING(( "CP850", /* IANA, JDK 1.1 */ -- "IBM850", /* IANA */ -- "850", /* IANA */ -- "csPC850Multilingual", /* IANA */ -- ), -- cp850, -- { cp850_mbtowc, NULL }, { cp850_wctomb, NULL }) -- --DEFENCODING(( "CP862", /* IANA, JDK 1.1 */ -- "IBM862", /* IANA */ -- "862", /* IANA */ -- "csPC862LatinHebrew", /* IANA */ -- ), -- cp862, -- { cp862_mbtowc, NULL }, { cp862_wctomb, NULL }) -- --DEFENCODING(( "CP866", /* IANA, JDK 1.1 */ -- "IBM866", /* IANA */ -- "866", /* IANA */ -- "csIBM866", /* IANA */ -- ), -- cp866, -- { cp866_mbtowc, NULL }, { cp866_wctomb, NULL }) -- --/* Macintosh 8-bit encodings */ -- --DEFENCODING(( "MacRoman", /* JDK 1.1 */ -- /* This is the best table for MACINTOSH. The ones */ -- /* in glibc and FreeBSD-iconv are bad quality. */ -- "MACINTOSH", /* IANA */ -- "MAC", /* IANA */ -- "csMacintosh", /* IANA */ -- ), -- mac_roman, -- { mac_roman_mbtowc, NULL }, { mac_roman_wctomb, NULL }) -- --DEFENCODING(( "MacCentralEurope", /* JDK 1.1 */ -- ), -- mac_centraleurope, -- { mac_centraleurope_mbtowc, NULL }, { mac_centraleurope_wctomb, NULL }) -- --DEFENCODING(( "MacIceland", /* JDK 1.1 */ -- ), -- mac_iceland, -- { mac_iceland_mbtowc, NULL }, { mac_iceland_wctomb, NULL }) -- --DEFENCODING(( "MacCroatian", /* JDK 1.1 */ -- ), -- mac_croatian, -- { mac_croatian_mbtowc, NULL }, { mac_croatian_wctomb, NULL }) -- --DEFENCODING(( "MacRomania", /* JDK 1.1 */ -- ), -- mac_romania, -- { mac_romania_mbtowc, NULL }, { mac_romania_wctomb, NULL }) -- --DEFENCODING(( "MacCyrillic", /* JDK 1.1 */ -- ), -- mac_cyrillic, -- { mac_cyrillic_mbtowc, NULL }, { mac_cyrillic_wctomb, NULL }) -- --DEFENCODING(( "MacUkraine", /* JDK 1.1 */ -- ), -- mac_ukraine, -- { mac_ukraine_mbtowc, NULL }, { mac_ukraine_wctomb, NULL }) -- --DEFENCODING(( "MacGreek", /* JDK 1.1 */ -- ), -- mac_greek, -- { mac_greek_mbtowc, NULL }, { mac_greek_wctomb, NULL }) -- --DEFENCODING(( "MacTurkish", /* JDK 1.1 */ -- ), -- mac_turkish, -- { mac_turkish_mbtowc, NULL }, { mac_turkish_wctomb, NULL }) -- --DEFENCODING(( "MacHebrew", /* JDK 1.1 */ -- ), -- mac_hebrew, -- { mac_hebrew_mbtowc, NULL }, { mac_hebrew_wctomb, NULL }) -- --DEFENCODING(( "MacArabic", /* JDK 1.1 */ -- ), -- mac_arabic, -- { mac_arabic_mbtowc, NULL }, { mac_arabic_wctomb, NULL }) -- --DEFENCODING(( "MacThai", /* JDK 1.1 */ -- ), -- mac_thai, -- { mac_thai_mbtowc, NULL }, { mac_thai_wctomb, NULL }) -- --/* Other platform specific 8-bit encodings */ -- --DEFENCODING(( "HP-ROMAN8", /* IANA, X11R6.4 */ -- "ROMAN8", /* IANA */ -- "R8", /* IANA */ -- "csHPRoman8", /* IANA */ -- ), -- hp_roman8, -- { hp_roman8_mbtowc, NULL }, { hp_roman8_wctomb, NULL }) -- --DEFENCODING(( "NEXTSTEP", -- ), -- nextstep, -- { nextstep_mbtowc, NULL }, { nextstep_wctomb, NULL }) -- --/* Regional 8-bit encodings used for a single language */ -- --DEFENCODING(( "ARMSCII-8", -- ), -- armscii_8, -- { armscii_8_mbtowc, NULL }, { armscii_8_wctomb, NULL }) -- --DEFENCODING(( "GEORGIAN-ACADEMY", -- ), -- georgian_academy, -- { georgian_academy_mbtowc, NULL }, { georgian_academy_wctomb, NULL }) -- --DEFENCODING(( "GEORGIAN-PS", -- ), -- georgian_ps, -- { georgian_ps_mbtowc, NULL }, { georgian_ps_wctomb, NULL }) -- --DEFENCODING(( "KOI8-T", -- ), -- koi8_t, -- { koi8_t_mbtowc, NULL }, { koi8_t_wctomb, NULL }) -- --DEFENCODING(( "MULELAO-1", -- ), -- mulelao, -- { mulelao_mbtowc, NULL }, { mulelao_wctomb, NULL }) -- --DEFENCODING(( "CP1133", -- "IBM-CP1133", -- ), -- cp1133, -- { cp1133_mbtowc, NULL }, { cp1133_wctomb, NULL }) -- --DEFENCODING(( "TIS-620", /* IANA */ -- "TIS620", /* glibc */ -- "TIS620-0", /* glibc */ -- "TIS620.2529-1", /* glibc */ -- "TIS620.2533-0", /* glibc */ -- "TIS620.2533-1", -- "ISO-IR-166", /* glibc */ -- ), -- tis620, -- { tis620_mbtowc, NULL }, { tis620_wctomb, NULL }) -- --DEFENCODING(( "CP874", /* JDK 1.1 */ -- "WINDOWS-874", -- ), -- cp874, -- { cp874_mbtowc, NULL }, { cp874_wctomb, NULL }) -- --DEFENCODING(( "VISCII", /* IANA, RFC 1456 */ -- "VISCII1.1-1", -- "csVISCII", /* IANA */ -- ), -- viscii, -- { viscii_mbtowc, NULL }, { viscii_wctomb, NULL }) -- --DEFENCODING(( "TCVN", -- "TCVN-5712", -- "TCVN5712-1", -- "TCVN5712-1:1993", -- ), -- tcvn, -- { tcvn_mbtowc, tcvn_flushwc }, { tcvn_wctomb, NULL }) -- --/* CJK character sets (not documented) */ -- --DEFENCODING(( "JIS_C6220-1969-RO", /* IANA */ -- "ISO646-JP", /* IANA */ -- "ISO-IR-14", /* IANA */ -- "JP", /* IANA */ -- "csISO14JISC6220ro", /* IANA */ -- ), -- iso646_jp, -- { iso646_jp_mbtowc, NULL }, { iso646_jp_wctomb, NULL }) -- --DEFENCODING(( "JIS_X0201", /* IANA */ -- "JISX0201-1976", -- "X0201", /* IANA */ -- "csHalfWidthKatakana", /* IANA */ -- /*"JISX0201.1976-0", X11R6.4 */ -- /*"JIS0201", JDK 1.1 */ -- ), -- jisx0201, -- { jisx0201_mbtowc, NULL }, { jisx0201_wctomb, NULL }) -- --DEFENCODING(( "JIS_X0208", -- "JIS_X0208-1983", /* IANA */ -- "JIS_X0208-1990", -- "JIS0208", -- "X0208", /* IANA */ -- "ISO-IR-87", /* IANA */ -- "JIS_C6226-1983", /* IANA */ -- "csISO87JISX0208", /* IANA */ -- /*"JISX0208.1983-0", X11R6.4 */ -- /*"JISX0208.1990-0", X11R6.4 */ -- /*"JIS0208", JDK 1.1 */ -- ), -- jisx0208, -- { jisx0208_mbtowc, NULL }, { jisx0208_wctomb, NULL }) -- --DEFENCODING(( "JIS_X0212", -- "JIS_X0212.1990-0", -- "JIS_X0212-1990", /* IANA */ -- "X0212", /* IANA */ -- "ISO-IR-159", /* IANA */ -- "csISO159JISX02121990", /* IANA */ -- /*"JISX0212.1990-0", X11R6.4 */ -- /*"JIS0212", JDK 1.1 */ -- ), -- jisx0212, -- { jisx0212_mbtowc, NULL }, { jisx0212_wctomb, NULL }) -- --DEFENCODING(( "GB_1988-80", /* IANA */ -- "ISO646-CN", /* IANA */ -- "ISO-IR-57", /* IANA */ -- "CN", /* IANA */ -- "csISO57GB1988", /* IANA */ -- ), -- iso646_cn, -- { iso646_cn_mbtowc, NULL }, { iso646_cn_wctomb, NULL }) -- --DEFENCODING(( "GB_2312-80", /* IANA */ -- "ISO-IR-58", /* IANA */ -- "csISO58GB231280", /* IANA */ -- "CHINESE", /* IANA */ -- /*"GB2312.1980-0", X11R6.4 */ -- ), -- gb2312, -- { gb2312_mbtowc, NULL }, { gb2312_wctomb, NULL }) -- --DEFENCODING(( "ISO-IR-165", -- "CN-GB-ISOIR165", /* RFC 1922 */ -- ), -- isoir165, -- { isoir165_mbtowc, NULL }, { isoir165_wctomb, NULL }) -- --DEFENCODING(( "KSC_5601", /* IANA */ -- "KS_C_5601-1987", /* IANA */ -- "KS_C_5601-1989", /* IANA */ -- "ISO-IR-149", /* IANA */ -- "csKSC56011987", /* IANA */ -- "KOREAN", /* IANA */ -- /*"KSC5601.1987-0", X11R6.4 */ -- /*"KSX1001:1992", Ken Lunde */ -- ), -- ksc5601, -- { ksc5601_mbtowc, NULL }, { ksc5601_wctomb, NULL }) -- --/* CJK encodings */ -- --DEFENCODING(( "EUC-JP", /* IANA */ -- "EUCJP", /* glibc */ -- "Extended_UNIX_Code_Packed_Format_for_Japanese", /* IANA */ -- "csEUCPkdFmtJapanese", /* IANA */ -- /*"EUC_JP", JDK 1.1 */ -- ), -- euc_jp, -- { euc_jp_mbtowc, NULL }, { euc_jp_wctomb, NULL }) -- --DEFENCODING(( "SHIFT_JIS", /* IANA */ -- "SHIFT-JIS", /* glibc */ -- "SJIS", /* JDK 1.1 */ -- "MS_KANJI", /* IANA */ -- "csShiftJIS", /* IANA */ -- ), -- sjis, -- { sjis_mbtowc, NULL }, { sjis_wctomb, NULL }) -- --DEFENCODING(( "CP932", /* glibc */ -- ), -- cp932, -- { cp932_mbtowc, NULL }, { cp932_wctomb, NULL }) -- --DEFENCODING(( "ISO-2022-JP", /* IANA, RFC 1468 */ -- "csISO2022JP", /* IANA */ -- /*"ISO2022JP", JDK 1.1 */ -- ), -- iso2022_jp, -- { iso2022_jp_mbtowc, NULL }, { iso2022_jp_wctomb, iso2022_jp_reset }) -- --DEFENCODING(( "ISO-2022-JP-1", /* RFC 2237 */ -- ), -- iso2022_jp1, -- { iso2022_jp1_mbtowc, NULL }, { iso2022_jp1_wctomb, iso2022_jp1_reset }) -- --DEFENCODING(( "ISO-2022-JP-2", /* IANA, RFC 1554 */ -- "csISO2022JP2", /* IANA */ -- ), -- iso2022_jp2, -- { iso2022_jp2_mbtowc, NULL }, { iso2022_jp2_wctomb, iso2022_jp2_reset }) -- --DEFENCODING(( "EUC-CN", /* glibc */ -- "EUCCN", /* glibc */ -- "GB2312", /* IANA */ -- "CN-GB", /* RFC 1922 */ -- "csGB2312", /* IANA */ -- /*"EUC_CN", JDK 1.1 */ -- ), -- euc_cn, -- { euc_cn_mbtowc, NULL }, { euc_cn_wctomb, NULL }) -- --DEFENCODING(( "GBK", /* JDK 1.1 */ -- "CP936", -- ), -- ces_gbk, -- { ces_gbk_mbtowc, NULL }, { ces_gbk_wctomb, NULL }) -- --DEFENCODING(( "GB18030", /* glibc */ -- ), -- gb18030, -- { gb18030_mbtowc, NULL }, { gb18030_wctomb, NULL }) -- --DEFENCODING(( "ISO-2022-CN", /* IANA, RFC 1922 */ -- "csISO2022CN", -- /*"ISO2022CN", JDK 1.1 */ -- ), -- iso2022_cn, -- { iso2022_cn_mbtowc, NULL }, { iso2022_cn_wctomb, iso2022_cn_reset }) -- --DEFENCODING(( "ISO-2022-CN-EXT", /* IANA, RFC 1922 */ -- ), -- iso2022_cn_ext, -- { iso2022_cn_ext_mbtowc, NULL }, { iso2022_cn_ext_wctomb, iso2022_cn_ext_reset }) -- --DEFENCODING(( "HZ", /* RFC 1843 */ -- "HZ-GB-2312", /* IANA, RFC 1842 */ -- ), -- hz, -- { hz_mbtowc, NULL }, { hz_wctomb, hz_reset }) -- --DEFENCODING(( "EUC-TW", /* glibc */ -- "EUCTW", /* glibc */ -- "csEUCTW", -- /*"EUC_TW", JDK 1.1 */ -- ), -- euc_tw, -- { euc_tw_mbtowc, NULL }, { euc_tw_wctomb, NULL }) -- --DEFENCODING(( "BIG5", /* IANA, JDK 1.1 */ -- "BIG-5", /* glibc */ -- "BIG-FIVE", /* glibc */ -- "BIGFIVE", /* glibc */ -- "CN-BIG5", /* RFC 1922 */ -- "csBig5", /* IANA */ -- ), -- ces_big5, -- { ces_big5_mbtowc, NULL }, { ces_big5_wctomb, NULL }) -- --DEFENCODING(( "CP950", /* JDK 1.1 */ -- ), -- cp950, -- { cp950_mbtowc, NULL }, { cp950_wctomb, NULL }) -- --DEFENCODING(( "BIG5-HKSCS", /* IANA */ -- "BIG5HKSCS", /* glibc */ -- ), -- big5hkscs, -- { big5hkscs_mbtowc, NULL }, { big5hkscs_wctomb, NULL }) -- --DEFENCODING(( "EUC-KR", /* IANA, RFC 1557 */ -- "EUCKR", /* glibc */ -- "csEUCKR", /* IANA */ -- /*"EUC_KR", JDK 1.1 */ -- ), -- euc_kr, -- { euc_kr_mbtowc, NULL }, { euc_kr_wctomb, NULL }) -- --DEFENCODING(( "CP949", /* JDK 1.1 */ -- "UHC", /* glibc */ -- ), -- cp949, -- { cp949_mbtowc, NULL }, { cp949_wctomb, NULL }) -- --DEFENCODING(( "JOHAB", /* glibc */ -- "CP1361", /* glibc */ -- ), -- johab, -- { johab_mbtowc, NULL }, { johab_wctomb, NULL }) -- --DEFENCODING(( "ISO-2022-KR", /* IANA, RFC 1557 */ -- "csISO2022KR", /* IANA */ -- /*"ISO2022KR", JDK 1.1 */ -- ), -- iso2022_kr, -- { iso2022_kr_mbtowc, NULL }, { iso2022_kr_wctomb, iso2022_kr_reset }) -- -diff -Nur libiconv-1.9.1-orig/lib/loop_unicode.h libiconv-1.9.1-nocompile/lib/loop_unicode.h ---- libiconv-1.9.1-orig/lib/loop_unicode.h 2003-04-16 12:08:22.000000000 +0200 -+++ libiconv-1.9.1-nocompile/lib/loop_unicode.h 2006-03-05 15:52:29.000000000 +0100 -@@ -21,17 +21,19 @@ - /* This file defines the conversion loop via Unicode as a pivot encoding. */ - - /* Attempt to transliterate wc. Return code as in xxx_wctomb. */ -+ - static int unicode_transliterate (conv_t cd, ucs4_t wc, - unsigned char* outptr, size_t outleft) - { -+/* - if (cd->oflags & HAVE_HANGUL_JAMO) { -- /* Decompose Hangul into Jamo. Use double-width Jamo (contained -+ /-* Decompose Hangul into Jamo. Use double-width Jamo (contained - in all Korean encodings and ISO-2022-JP-2), not half-width Jamo -- (contained in Unicode only). */ -+ (contained in Unicode only). *-/ - ucs4_t buf[3]; - int ret = johab_hangul_decompose(cd,buf,wc); - if (ret != RET_ILUNI) { -- /* we know 1 <= ret <= 3 */ -+ /-* we know 1 <= ret <= 3 *-/ - state_t backup_state = cd->ostate; - unsigned char* backup_outptr = outptr; - size_t backup_outleft = outleft; -@@ -57,9 +59,9 @@ - } - } - { -- /* Try to use a variant, but postfix it with -+ /-* Try to use a variant, but postfix it with - U+303E IDEOGRAPHIC VARIATION INDICATOR -- (cf. Ken Lunde's "CJKV information processing", p. 188). */ -+ (cf. Ken Lunde's "CJKV information processing", p. 188). *-/ - int indx = -1; - if (wc == 0x3006) - indx = 0; -@@ -105,20 +107,20 @@ - } - } - if (wc >= 0x2018 && wc <= 0x201a) { -- /* Special case for quotation marks 0x2018, 0x2019, 0x201a */ -+ /-* Special case for quotation marks 0x2018, 0x2019, 0x201a *-/ - ucs4_t substitute = - (cd->oflags & HAVE_QUOTATION_MARKS - ? (wc == 0x201a ? 0x2018 : wc) - : (cd->oflags & HAVE_ACCENTS -- ? (wc==0x2019 ? 0x00b4 : 0x0060) /* use accents */ -- : 0x0027 /* use apostrophe */ -+ ? (wc==0x2019 ? 0x00b4 : 0x0060) /-* use accents *-/ -+ : 0x0027 /-* use apostrophe *-/ - ) ); - int outcount = cd->ofuncs.xxx_wctomb(cd,outptr,substitute,outleft); - if (outcount != RET_ILUNI) - return outcount; - } - { -- /* Use the transliteration table. */ -+ /-* Use the transliteration table. *-/ - int indx = translit_index(wc); - if (indx >= 0) { - const unsigned int * cp = &translit_data[indx]; -@@ -135,7 +137,7 @@ - } - sub_outcount = cd->ofuncs.xxx_wctomb(cd,outptr,cp[i],outleft); - if (sub_outcount == RET_ILUNI) -- /* Recursive transliteration. */ -+ /-* Recursive transliteration. *-/ - sub_outcount = unicode_transliterate(cd,cp[i],outptr,outleft); - if (sub_outcount <= RET_ILUNI) - goto translit_failed; -@@ -151,6 +153,7 @@ - return RET_TOOSMALL; - } - } -+*/ - return RET_ILUNI; - } - diff --git a/openwrt/package/libid3tag/Config.in b/openwrt/package/libid3tag/Config.in deleted file mode 100644 index 8ee04ab9ee4..00000000000 --- a/openwrt/package/libid3tag/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_LIBID3TAG - prompt "libid3tag......................... An ID3 tag manipulation library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_ZLIB - help - libid3tag is a library for reading and (eventually) writing ID3 tags, both - ID3v1 and the various versions of ID3v2. - - http://mad.sourceforge.net/ - - Depends: zlib - diff --git a/openwrt/package/libid3tag/Makefile b/openwrt/package/libid3tag/Makefile deleted file mode 100644 index b4281652c4f..00000000000 --- a/openwrt/package/libid3tag/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libid3tag -PKG_VERSION:=0.15.1b -PKG_RELEASE:=1 -PKG_MD5SUM:=e5808ad997ba32c498803822078748c3 - -PKG_SOURCE_URL:=@SF/mad -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBID3TAG,libid3tag,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --disable-debugging \ - --disable-profiling \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBID3TAG): - install -m0755 -d $(IDIR_LIBID3TAG)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so.* $(IDIR_LIBID3TAG)/usr/lib/ - $(RSTRIP) $(IDIR_LIBID3TAG) - $(IPKG_BUILD) $(IDIR_LIBID3TAG) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libid3tag.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/id3tag.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libid3tag.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/id3tag.h \ - $(STAGING_DIR)/usr/lib/libid3tag.a \ - $(STAGING_DIR)/usr/lib/libid3tag.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libid3tag/ipkg/libid3tag.control b/openwrt/package/libid3tag/ipkg/libid3tag.control deleted file mode 100644 index ec9a7547012..00000000000 --- a/openwrt/package/libid3tag/ipkg/libid3tag.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libid3tag -Priority: optional -Section: libs -Depends: zlib -Description: an ID3 tag manipulation library diff --git a/openwrt/package/liblzo/Config.in b/openwrt/package/liblzo/Config.in deleted file mode 100644 index b63a09a9197..00000000000 --- a/openwrt/package/liblzo/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_LIBLZO - prompt "liblzo............................ Real-time data compression library" - tristate - default m if CONFIG_DEVEL - help - A real-time data compression library - - http://www.oberhumer.com/opensource/lzo/ - diff --git a/openwrt/package/liblzo/Makefile b/openwrt/package/liblzo/Makefile deleted file mode 100644 index 60b3710c99f..00000000000 --- a/openwrt/package/liblzo/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lzo -PKG_VERSION:=1.08 -PKG_RELEASE:=1 -PKG_MD5SUM:=ab94d3da364c7cbd5b78d76f1875b0f6 - -PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBLZO,liblzo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS_O="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBLZO): - install -d -m0755 $(IDIR_LIBLZO)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo.so.* $(IDIR_LIBLZO)/usr/lib - $(RSTRIP) $(IDIR_LIBLZO) - $(IPKG_BUILD) $(IDIR_LIBLZO) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/liblzo.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo*.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $(STAGING_DIR)/usr/lib/liblzo.so - -install-dev: $(STAGING_DIR)/usr/lib/liblzo.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/lzo*.h \ - $(STAGING_DIR)/usr/lib/liblzo.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/liblzo/ipkg/liblzo.control b/openwrt/package/liblzo/ipkg/liblzo.control deleted file mode 100644 index 3f84ee6f2a7..00000000000 --- a/openwrt/package/liblzo/ipkg/liblzo.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: liblzo -Priority: optional -Section: libs -Description: a real-time data compression library diff --git a/openwrt/package/liblzo/patches/lzo-cross-compile.patch b/openwrt/package/liblzo/patches/lzo-cross-compile.patch deleted file mode 100644 index 68a3d0449e5..00000000000 --- a/openwrt/package/liblzo/patches/lzo-cross-compile.patch +++ /dev/null @@ -1,43 +0,0 @@ -For some reason the lzo autoconf script uses a local macro that does -a test for cross-compiles, and assumes that if the build target name -and the host target name are the same that --host was not specified to -the configure script. In the uClibc buildroot, this is not the case. - ---- lzo-1.08/aclocal.m4 2002-07-12 18:31:52.000000000 -0700 -+++ lzo-1.08/aclocal.m4.new 2004-03-10 15:32:42.000000000 -0700 -@@ -205,12 +205,6 @@ - [ - AC_REQUIRE([AC_PROG_CC]) - --if test "X$cross_compiling" = Xyes; then -- if test "X$build" = "X$host"; then -- AC_MSG_ERROR([you are cross compiling - please use the \`--host=' option]) -- fi --fi -- - ]) - - ---- lzo-1.08/configure-dist 2004-03-11 02:18:28.000000000 -0600 -+++ lzo-1.08/configure 2004-03-11 02:19:16.000000000 -0600 -@@ -2282,13 +2282,13 @@ - - - --if test "X$cross_compiling" = Xyes; then -- if test "X$build" = "X$host"; then -- { { echo "$as_me:$LINENO: error: you are cross compiling - please use the \`--host=' option" >&5 --echo "$as_me: error: you are cross compiling - please use the \`--host=' option" >&2;} -- { (exit 1); exit 1; }; } -- fi --fi -+#if test "X$cross_compiling" = Xyes; then -+# if test "X$build" = "X$host"; then -+# { { echo "$as_me:$LINENO: error: you are cross compiling - please use the \`--host=' option" >&5 -+#echo "$as_me: error: you are cross compiling - please use the \`--host=' option" >&2;} -+# { (exit 1); exit 1; }; } -+# fi -+#fi - - - diff --git a/openwrt/package/libmad/Config.in b/openwrt/package/libmad/Config.in deleted file mode 100644 index 480b0e12843..00000000000 --- a/openwrt/package/libmad/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_LIBMAD - prompt "libmad............................ An high-quality MPEG audio decoding library" - tristate - default m if CONFIG_DEVEL - help - MAD is a high-quality MPEG audio decoder. It currently supports - MPEG-1 and the MPEG-2 extension to lower sampling frequencies, - as well as the de facto MPEG 2.5 format. All three audio layers - - Layer I, Layer II, and Layer III (i.e. MP3) - are fully implemented. - - http://www.underbit.com/products/mad/ - diff --git a/openwrt/package/libmad/Makefile b/openwrt/package/libmad/Makefile deleted file mode 100644 index 91983eac53e..00000000000 --- a/openwrt/package/libmad/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libmad -PKG_VERSION:=0.15.1b -PKG_RELEASE:=1 -PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c - -PKG_SOURCE_URL:=@SF/mad \ - ftp://ftp.mars.org/pub/mpeg/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBMAD,libmad,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -FPM:=default -ifeq ($(ARCH),i386) -FPM:=intel -endif -ifeq ($(ARCH),mipsel) -FPM:=mips -endif - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --enable-fpm=$(FPM) \ - --disable-debugging \ - --enable-speed \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBMAD): - install -m0755 -d $(IDIR_LIBMAD)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(IDIR_LIBMAD)/usr/lib/ - $(RSTRIP) $(IDIR_LIBMAD) - $(IPKG_BUILD) $(IDIR_LIBMAD) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libmad.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/mad.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libmad.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/mad.h \ - $(STAGING_DIR)/usr/lib/libmad.a \ - $(STAGING_DIR)/usr/lib/libmad.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libmad/ipkg/libmad.control b/openwrt/package/libmad/ipkg/libmad.control deleted file mode 100644 index e81fea2dc0c..00000000000 --- a/openwrt/package/libmad/ipkg/libmad.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libmad -Priority: optional -Section: libs -Description: An high-quality MPEG audio decoding library diff --git a/openwrt/package/libnet/Config.in b/openwrt/package/libnet/Config.in deleted file mode 100644 index a3cb965c3a7..00000000000 --- a/openwrt/package/libnet/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_LIBNET - prompt "libnet............................ Low-level packet creation library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPCAP - help - A low-level packet creation library. - - http://www.packetfactory.net/libnet/ - - Depends: libpcap - diff --git a/openwrt/package/libnet/Makefile b/openwrt/package/libnet/Makefile deleted file mode 100644 index 4e89b354110..00000000000 --- a/openwrt/package/libnet/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libnet -PKG_VERSION:=1.0.2a -PKG_RELEASE:=7 -PKG_MD5SUM:=ddf53f0f484184390e8c2a1bd0853667 - -PKG_SOURCE_URL:=http://www.packetfactory.net/libnet/dist/deprecated/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/Libnet-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -ENDIAN:=lil -ifeq ($(ARCH),mips) -ENDIAN:=big -endif - -$(eval $(call PKG_template,LIBNET,libnet,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - touch configure.in; \ - touch include.m4; \ - touch aclocal.m4; \ - touch Makefile.in; \ - touch configure; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_libnet_have_pf_packet=yes \ - ac_cv_lbl_unaligned_fail=no \ - ac_cv_libnet_endianess=$(ENDIAN) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --with-pf_packet=yes \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBNET): - install -m0755 -d $(IDIR_LIBNET)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so.* $(IDIR_LIBNET)/usr/lib/ - $(RSTRIP) $(IDIR_LIBNET) - $(IPKG_BUILD) $(IDIR_LIBNET) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libnet.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libnet.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/libnet-config \ - $(STAGING_DIR)/usr/include/libnet* \ - $(STAGING_DIR)/usr/lib/libnet.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libnet/ipkg/libnet.control b/openwrt/package/libnet/ipkg/libnet.control deleted file mode 100644 index 65a2b5e8488..00000000000 --- a/openwrt/package/libnet/ipkg/libnet.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libnet -Priority: optional -Section: libs -Description: a low-level packet creation library -Depends: libpcap diff --git a/openwrt/package/libnet/patches/500-debian-subset.patch.gz b/openwrt/package/libnet/patches/500-debian-subset.patch.gz deleted file mode 100644 index 0c1d676ca4b443b9be68ba77cd310f115ec80a91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 208420 zcmV(vKzB?ue-h07nzP8EpP9IA%d#F| z-#UEp?7%uWgn#VduyJqz|7r*Fk5vy24-U4g)#`oCY#kjOJhcv%sSYI+Ts4;0c*9kt3l|_SDw$xyJ@tvli2lwxMIq!xzS<~h1=Eb>gf9AX>T}U zO$KyKa3Z4n(|FjnPkW;=;EH)~g3umyhP|sX@{4}BQ8)>vh`#mXB#6S=tigWl4oAH~ zf4jPs_#U%-wv*Ird-bn9kQ(|D%}U>t>O1T^R{oBC&&sWB?~y|#bh^)!QtgKaPEh_G z<0nOZ<}f~?QEXq22bb+1y7u5|48}ndPomflrXdR>%k!6h==q@=_z4;t2dZiJACotIkQmKA!C=pJD;7_*vOrMi5E`DzFPpO6@-&0^gpZ;9Qf}!^SytZq{Y|F zD)#LlT&_~+6-RVK=VtCh$KdaDwOA(1^KVwuX%J2sw#A&#W3bF_qQqx@97i#M}%`Pwokh+ug^i>WekS- zz_o9p?i>Ir`yYJQ7HGm406=p$WH537U|#n6_SFy?{YhZJuOOzrZT0${EJ`>ifxhUy z%%Wk23DjjfCsYH-yujM;j)W8W;y}Zi>Rca2knIZ5Z z*C2R8-MP3v?J5G%8-r-3h^$weh;+%C`Hlx()?_<-1lwd4x;R5JjH5>|CTYBKQ<$h3 z&dWz|E*v+GGF?#msXAvD?eme@2m!G9t1E@$7y$s>;N?HNo$*L(eubz246JJ?@);TQDmW);l6LQOdal-Yz@c^gqqyb1LbP%RBZriMZsU8~DT+S+Qx z3uaA7+s8!Jij{}f&>D7!_I}yRE!U$yo>2UQB&#%-8zfA)9!`o#O)BitC?pj~O)aq6 z!e9^O8u_q{##k)x@(7~Bo;`hfADNB?9wgOKMMZ52pTYAGsg5)rB-NphCN&*@MNgf= zo&tlI1;u!(@OXwI6da2Uq$k)^zk(#@fb1(ndU*sSC zMgGgb$lv~p{DUv#hk3ej;ubRSh-%{u#&wPVxpUtM(eVZo?lLX@t0k7A(kgsR7koyES-M$sgF?|{9}qE+b8VS1nSLYIs-o&`z9>`yj)NOaRs<<2`#wl# z3^4c|tx~p#ykHWzBsPQvCrR>fs^*m(sa+b??;z406D_*riZ z@!E);4Th|Z0*3X4)TJJ_M%}TE3A7g0MEaqr^A1&=97V9M0qV!A z_V`tXc=>J$aDAG=ZE%rmy_`P15xl|oh)7p6gs2OJ%$yFo<1B0& z7DSVEPEoaHsa*c^=g})$#B|l#r}8c$>`@oY(H;+ml@cx+*W0cNH;&yAMamIV0A?pM za_>SL38QG(TCi`Ak29oK!@>EmeOW-AA>&EmLMpkZyy~`3yF(($Y%|b#82kj2ScDW4 z)K*YCbQV64^#{YtHlE;Q=Nj8p*obm~!DyU?2)66~8e<-WtT~uC-NEr^4iPTclK^1N zS(KzE9P2oaPCWH92o7oSe68IXTwX#z-eg0t#$^|}OXIAZvga?8igEHcZzsS3ZWUl) zJOjmxA$V#%hVLCm*=IO!-!Wxv2ms}jUro}r! z0`e1BnX4N$&D))eK?jEC@|XtS)WdP-k?YKBi(|eTMBQE-lbH(W#o_{vf_|%RVUD}H zZg!Ga(2kCSAfC5RyI0-*X}90$;R%wrqWe(cf;qXZGW51g(MzMHPP$SibR8Fbp{UHG zDN1Ep+c})ZMg}JDk~MjwP{lc&*bC<)>{tLD z4X%eB)KRQFqdx3*uEB}^*tN&);dz(j9>a%oVGGG!u zQ{^iHH;o*lL}9MHfFmc!p`vm`l@!Ajo!Q>oel&`@)Qk(vY#kXaBCU4q}V&)OHGE)nReLXL;m1`cb4f)&c4V@$kPMQtcmLa6`Uj{OS5pAfH9&Pb2*R8`6hX<$!D*L6L(D|@Sic$dqKXqZ<5rj%D4COk8adfSvqdXB>w#>SL*5PC;2Qr9MFxkpN zOp-AGilk)_z;JP@>@A82q#TLdruCQ=!Pm&;9nu=TK&&yyWw8$Bq=T3Llz1$1poEC( zcrdsS5G-<_F&4UpD1FUAIOEnMgS4+ZIXpm+geD7KX+hEEn!qS_2Kje*4lCL3IO-6QqA`5^#t? z0tgBhnWAwVLo9Gm*Cu_}+R2sDne6wVP03kbkDP5><6;Z^IR zb#PqUO>OS9WLbfA>t~yp{F95F*OZUDGZOO2aKVcFyqAHNE zO?hyTu)Qdi1O`YD{l1D)#ZQ$M1)AcxFWwl4Go5*s6PI!Gz)2LCR~6D-t~3fN3K1DB zk*2@(LobRoiq`?HQwl9n1Yq_dMfMp5oivRTCLKJLuDT{sLQ`3m;7F54idJiBRP}Q* zp{MZz15uMm!Ks)@EpWK30ZQdZ@JOQNS&qUKjJb7J2!dy$18$;SkbOcJeXDua;8 z9EhZX8g#R+(PH3rO`{@{Ei!oY1jqnB^DSD@OSDbT3?F=Cc<&QKxmY5k4Tmjq-?OM31)BoC8ko#|2Sb@L`NvbTqp6_ zP9fV46Db-z80?kH0Nkr60As#8i`WjMJ3OHho*&A)a(LhvV##sYIWagN$3hHSfc8HG zDLXI)5ajSgg8amBdD)9XpO;MS45QuCoHVCUwTP29_W(bPIRp}&-r#!FFo3euC>q-! zTuX9f(lI!MVyOOMjLTkz$QT{bdzEgfWyKkzv57<(cU`Koj8c|cwO9}C{t<>TC~U4qikA@l4=|D!qrU&R^9lTbXwcRi?n!Ipe_{@ zXJqn}kbF9@SPEyX=%U@ern z+mq}vEOA3+6O|S457f>M`t-H#*URO}PRU&R1rkbJLaESzC_xFJ&Np;_(fQ)c*NHh} zTr&fyE;1@#G$3DMHeob=fBmp=INbv#kR4t?fI9z3`6_&cl}6DV`)kR|@_B?*#rSx_ zY5+@^jh{%Ta$g0q1jMv4Wk#Jv!?;ETHGMaY;*UECnZgqDLE3}SC4rjyr;e;M_vA5ZMZJ&hX zp(qCbcHhqecgC-dU1ybW?NoDkO?>0C*w-%?-s5UT+h`k9PDrbx3XAZ$#QPxe_u0}( z5)$V530T`xUFLVmqT3jxp+WI>q=qhiE!kh8b%K4Hgi#C*wTxi~`RWtqEGErz`AE*a z)J}XqY=#jB@E}>N4A>$0vPkMW9Ie;IYLE*~X1~Q^6IWkFD~_)ouoR9@xh&2BM9H~I zd6!pG7`$kym2#d>ssGVWv_s;XndnJLwga;}>vQfWSG3v>@8aGh^x>NlkKSNIytI{t zE7)&CqzZgsW1-*+nt(AVVZZm95ErR1bnhM1CQdM??wl|aR}`EYMv{ggGlfysPMh@1 zmm(N&X(^g3bw7T^@n80g| zf?eg@HLr5usA7hzYtx&VfgzP*|F*gF@U(wmGB-}L^AV*gQjiAqwaKU_fuM#jRx5q> z8qRADV*V@F>;L|hiLI|M8@xBn&h^iCp6m9lq2iD2I;v1H0}l6pfKu+7R@>FyDMs)7 zMvJaSjT_U8-sp;MPJx?W&{s^gHKD;?z$4C#5dHkV@|$n5k3nJg@=<#rCp2GLem7Wl#5Y)3nri(S$X3RP(zN7orb&~l0o8Om(IE9X|w!zcO3;Bs!EOmNmaCc`+12Qf-ziEO~ zF58uI87*GV@ZYmr+_zNzZ>$xiB%S(cV%iWjk1E{4asd@@&YUyE?g=s+D`A^*Sxuu8 z)d4Z{MM3>Q2i#y5U?`#w)^f~w11OaJr3c^Hr^YUK5gqO$I^0FL{|!Fk|0ks}BRd;s zq>xPcsg9gho&2=Q0y+iLDnGAqe>kVnS7Re`i=KR8m&wK9zzJdW7&n*TR+uTZVg-Od zH`L%BE1ROAnW*y<(lUhjgBMKBYZ%Y;rMKz`#B!PKN65-{zJ8Za1DoP?*qlpn zQg2|AbBHG(DqC7p=~C6r%u)^FVh!n+g!}bheyjg$uUy{W*Ev1&7>)b&S53_;qj?jz zo`rxmOLb0RTF*=(%bAs>%0vSwW@jhAcN^A0TX^-1J=VOOm+@j`OW6ltM*R)5WkkSq zS~6=nTo;hjKA$O|6m+1=QjF5|VFBw=5&is6Ek_|oQs8+F8!2w1fI8b+Hq-oX3G!fE zN*N6$pP?joP7jjhO`kt&>G9lj>N0jHX1pYAmTI*+U$RnzQie85caN3^vDw-~17SV* z{`A?iXPNh>PBni20bij0dV)W4=2E{}=Q}<=W)}WHK4FJ>0gqwNJ$rp57dA><#(VYk zpQ8w2TpkL;*-gz@LqeL{6_%{&AHlLA4NO}Yy&Z+)^emb%%e3Gf!^gDXD&?En3PWye z`ul>Hx0^Oj(eMqh9zD8cqGr~MqQ-9iIC`)(p!@mJjp0lA7=N@;(AdupHifTO%%-sZ z1!hFH$JjA9ewO^Xvl0XZ0H+q>-*bq3_;OD})CT|2|G#&(h#Mr4FkFRD5EmP$6?td8 z!ASXK663#2lULdN|L2E+2%mmf2p(g)a`4x4KHje2FZZM<`e`5j!jP_V<`cY0rc^Ke zC~v_Nmrh7mEGP=}5SL37d*UTKH_f)lBg>Sqe4wtMuk49#tA`Bhrdox>>HQ?*|Seph&cRY z0?OZh`K|Hmul0X5e!eRw1O&1@U+kIX@}J{Ne9&&y)5Y>r-C0AHVsZd87n~8SzV4o3G--zuxs18zL8#P`9AnWSTESuOCJazoBy7616EpvnK$7$Pm0;|N z&7NFqO?0hvDck1nfjyn1&4gQZL$jw37QSZ|oehCfK$54+Y+#HF(*)JVFJ+}_(8swy zY~7Gk{xI;{_axNVhvvG_a;S41YR*0ugp!&yqdG&ry`mLkiYP9BzS)TDwfbiLdSkG0 zxA9P-$3Ou2SC%&yUH@w0mtJI^DJ98XW){=#UD%~t;H|rt@P7atzg&J=d7h=+lar&9 zbymoUZqOMCzcUJk26NX7V#7f|En)Xg(^m$u12!u1N22s*7eu=K^oKZM4WwldO^2y6nKBoKH~`%b|GKCuU`-(#b6zbBupCmo2%a-GWQ*#xmy z+h1CayX)CryiOT5MVn)iMM{`VL(Jq&G+(+CfliunT6#BDH|S_x8UDYv2eT>Q`ZJqS z=;dNcxen2mjorG)^ffkc>`6v5$B8Tt_XeY!*zICf4Nxvrwkx%1mXx*YbhKo*m~dl6 zJJn2IM6E7L2iKTX$9;}%ZhEnVbg7mV^>g?h2$pp_%G)E+Ka^HBsW3j+G&KvCI)IyF z#zcmCVQbx(SK3d^Eroe%MD}#Z06dI6>q5tM9bp4w9pB7-NA^`oYbC4IUwFJETPrI- z_zD%!0JBY}wW&{*h+|+ZO-2E zXleyHH|t4TFEeY1zfPZpV}L5`IcG$*!ZKx8jM?*?A9JE&iWxTv1I=^__DX6kttYCN zL?N7;DeCE`aNUiOAfGCuS&WvjF5H+2ycavsdLnp&damjwwy^U|ZgWFlj5V}fOf{1g z=fE!4!zgA65}}$*qTYJibna`{hIn5mk_krgS{ns?9%n6Ks%@MEdtKALlZ%=#Q(PCB zHj7DPMg*Th6-0(vHdY<9JL|#;Iw7B`*&M(@H;5CjWA)Y?1=wzut$Q+T1@9R5;d*Xt z3vwDeetUHI8(xm4Erj{nU*52yq{dwlmUEdUtSdC(oiuTiXIOpCkx@a)w7}6&3Zq~a zTFI^VA}MHv)(Q)yMHO0&XD}nNf%7+dj*V(!^CvlA6;&fc(pMS~rV2z0m>|$8-HC); zM=fL<6kyYoG!EF5A$ig}oPYx$$r{MU9b^&~MQ|z;JK!o-62!vh-|VWAaZByX+>J_= z^J$E|^)k06RZnlv?EQ|LRq+0VeJN-w@|8WVasoGv2E*Q{%IIXay-I=bcaL6wkE9W( zQ4gRu5>hPAR%=gRR#$7!Rx9ZA@aFIxoA|(q-H$M!FA6HOv9*^3xl|k}ZvznA;`?|M zU`mi4@C9XL9vb)YuL3v%n7MdVA;#be1KzcQpiMFMYKKR=A21rh`s73mR!FU6f&}v_ zFAak!ff*E*yyX@6Pb|M&UtL~beK}JW1{cJvNf@3|zLDpYf}!2-a{dJa>M`jTpgO~l z2^jFab1pb6xPr4XU}-D(VR zdmpiAFpS#c7NUvMO$leQzVHpRvnUqu|JmmT3xD&}Adt+NQQi5rc>xG@*z;n347_+p z$WSP+8o(00Z5}l;UNm3*cDmbayx%(3FL(Bj_nJGqzsevYuw$J{ueTbf%?~f0HA#!F z-@e^~lf7}Yzjd-_+M$OC3SqiW8%NuJ+1lATX*RZ+`@4sUDp(vh#L8+FHpI$PPTiu) zG@%o}9-UzSQ$qpvfwpM?q{2r0IJ$o?b-9T}0IdW#j5Q@bQFBZ)UWM!hnvtT&vC!aw%n3=>w-Dp2q z`aZ79%nI&{PT7`f zdxu9S_;fkZF`m{s|4H||u5%A?Pp~W4jr|qe-$;!>_{Hr!kET5KRCdGu_|BTltXFyo ztVaE~S4RVpIPqLp%IsJ zaDoF>XP}{PDL30>& zO_!1Fd|>wOj2d0@WEyQgoP$4zuRu53I}w*zIYya{}S9KvUA4L@Y?+bI`XH_^wS zU8roBSEOw%?|#@r;=Z^4?qpZJeLzx)UwT0=hW`9H_N!v4D&p|(LDVV7ex+gt+Zx=L zVe~clp8~g31&>b^!TyC&Yt)5a!g%(Mw%_c%-aFjc{ZJKuhDsISHJ2(}_B(W(dga&R zZnxR-dtvt;rgclr=Z5n>M5C_&!_=t$%O`Fzh3il*xdt1_iRulli4x`BP|s9vSnCa~ zCfz4A6DYS>^5)DQ?v3kc;RZTc&n+LlGuYj?CyLVj0 zJ0V2B3ii^>CXLkU?<~u4-p2*eQ5Ug0M7t3ScaL{Z4l3s5XDd1*(~vQ6Kc!f_+uK2- z&?O?ab`jMUO#Bsy5BE-6xd@<3JeaQvQa>uF?UGwxSO^52y!Y>GLfnER2<#Uc0+GgZ zByOYO$G`tTWY2ElK8OiNiE1+hy^D#2rMsi(R$jRtn<;RzkeBqJ=XRhOTM z#TP5pm1TXjtDCK&-)gE%FaD>XsgHNSBVIDT-ZFEr1xHxpP4i^80hm=LAS!q{SE$u$ z!jI!|4-J|6kt8iaca|o}Cz{&xtoAsBUzu1v`;^G;62PdK?q&u9+$7FxV*C6*2-aC^Vj?>W<_0?LCPTXb*nWA-*7w^#1o@TNixUtmsQwb zE6-M{FKB-~kucsJmf?#;G!`XT2&(e1&g4wev%SMN<(?1HAn-T1z5PCjb+Sz;x4i|W zn!j%CmofI=Cp9WvvT6o!<}&Q+me;WALZw4Y^VB2?tghgAR+pbwpF5&}T1vB=<_6g; zqiljg&dX+5ST?I0khT2t}Jd>vH#t21^`?eCGZ!?T9*4Ou$~ z$hYV1ATZySxr6m376^%`nI3V6a!tuQBc%Qwpo6lmR#!<%K}8{I z`NE`zWV~?`;9Xg37!F2A)ye4rRvm38)}CQ!(fFh(gIVLto!|=2SW!F)KCO%8r4`hJ zW59XI-JB(=T)?8^vyDbUcevUp`B%2XE!M@=&kOpe;*@M5sil;y6x*3(_qNN#!kp#JU(UF5)HKR z?p5QoEGwDb9}f{LfnLDUVNMymyz=`oQ6yGUWlWAZLnf9PS!WL2Ig*oje6kDkSYD|u zuX4MIiQPTidbPjXY`on%+1Arc;B zP$30}gfcW$lAA!WTNNcsoK2L-Kh-J`63xH<3 z3p@q|%S%2&t;S?n@AnQ@R{$a%OtSKA*oSBBZr1^6o)T0V#n#CiNgm7cNbrEU`$&@Z znGhZ(XvE5%{T4RDrzmV=7%*ZL%01%Lu7-jCQ4IVc2wXvz?V#fd9tFHecSYF|39E_q z$#ws(AK~p$#%mk^pGJ+S7l=+5Z9?$0l+hf4bsPBCB=1RX3w`VW8HUIup=U9CLj=5z zqPE3WD3kG;!a3q25XTmPYY2zo-7`ipVC>QP8Tn=oF9}Q-Dn5}#A7h3wykM50lh5Wa zF!rNpHY5DoY>I+*3oDdtH3gpRz!pjz-ok7IzcqK2=7UF2v9Xpqd08LF!}?X&uagwv zK#Q*a3IH!@2t;pISG=omw4gPJ`#Zo;eBR&jy6p$yt*#W*iw&tAUI0AGE8fp4|7>ki z3(wY4HF$ri9Vg8XwR%PELSBNn6|L4*K0Q^daMTx#?IUpno1%d{{7^it;yMs6cvnHU zg9w0Lt-zOeJ$a)Eymr|4(VLZ)se$|^=T?EP@)zo5;u!;^H~Ms;{a!u;b`7Z^q1v`V zHta^s)nHq9N2tSTwVL#}iBF~Oia4RILpYhCD{_9+qiypW(P4k@5Zb$_;(r+cacAVb z=|>lp1niUD#_7???uA1(?+V3?>bxUKXK!QRJWC8LE|F4ET(??crS_r*a&d6oia{1! z!d=%7ZiC?loQS+Qxcg{g7>=H5YcUEg9exbOJ40k?-CqN7!c`+#VYN%M zp*sGp3ZREb5UQf%!_k;ga;t$da{hbZe|Fv-0R4w8h)Lv4Nygk^&_XVn`$!ih)Ilk< z#6*c;GJQBd##dse+dTkAUlJR{GQ1FCNaW-Ls6PzbaG0Xp3F3d$MFSWG40Z&vCM4%E zT=J<%<8jzAq!5JAZd;XC9q5evEz}TbbjHQR(*xxY3!80JRU7^cMc!ebZi|~ue|g z=GTkc+mdKnm{bSU21M#d>cJO-SQWJ&VCEA`sf_gt9<*A(MZgmXmKLzBic8u>+sR>| za01pQR?tk{9#-bZxdbbNWLedci+vN_>drt{Vw*&@(I4bC9JOxDv?i8S(Ek}VHmOmY z3fb@QRYg&v%xy1EhV<yO!{tw~m@+b^KFQW)GWDXFs3!RoY}|ZHd1%5IF23VTFiR z6Yh)mVINWKm*r=IWpIjKEY5CuYf0d)P<8cHvEF&-rsC*7vzPO3G9SjXkPcnO>|%U z!M--tS1!yIVgGf+O0i-hRvK=I`gOLva&b{xsEC{a0O`=I3X5#&TV4h1uw6qfJbw5% zOR_%~QaBKbCC&kj({bmFSRXnv1Yenp*KR5(7a>1E1g5Mm3g8-?wrIQR|7GGk&j}h%VKB{I}!;QFy zOocKv2jbWXZt0|x)R%5D&H%_gjyd4|zw5#Ye^(RYJpySFI|0HOvnBwzFH8LV!w+Jk za={(hz5z+Gg}$+^E>iM#fLhxt6ewYwJPI{St*A{bJp9D3o29d}SKB+gZ%$zGE=mmV zB)AUl1~^+iAE>mfDhDQ&uzm{-i38=H3+xW{f15!M{LyCVynJ@n-17d%_x^ryp}#J9 zFE1_@&MUI5Q=K*(7uvsyC_e z8GsH(!-`mXs6vlbt)fH^r?T~(;S^xzZ5Zc&K3^d)a^O2`f64gn>1!(6UBjGknBRu(=q@*vUtL;c&EoV%Qw3+7{G%v)4F%Z`HjSi~&AyF?*v}X*KYw3IL767rsFw95q0=Lj9;8k0P4=^y(V= z!r__BtS&mXy+r{G$53Do2&TORNwO8#w8H+aI=*R3F$SJo>y}DFiumAh;d| z15qjilrMC<{p$5j1r=WLOO*}i1{u3O@z8qTlh*rQhV?!hME;Ad_h(jb&x=D;QNT{L8EAQk zNlCmUtgoW9_n$-sw?HbJ&BU;+xxRvGPC+q ziu})IRKiU(r54jLB3PNXHdATXqOxB9!&Btn(o=+}CayCR9%VFY;h%CI#gJK_KoC_| zCE0v*0e!*^Mx}A4WZ9(u8#t%Tjsr6}dpQ0ZU*YVL*l{^qj+L`ODay@e<8%iNA=u}T ze;_X>nE~eO=_UbPh}q~N^_u6@dfq~2-<;ry`7xd+i{xgF&VD_AFhH7r6^w3!pl=Jq zu_X=1HFD!2`05ZP&mVrm9l=T)QeMLDNx_I5U65Y{&a@lB3bZBi#b;+17XrBW&+G?7 z{Vjgp-u7Cp2XqW@O-zKkC`ehJBvSn7n1KaLpt1$48p~9*Y2s92%AT;6{XBQw0sfLB z?g5jvp*GXJIEn^;7i+au@v5-{40sUtOCxy$b`!$1iw3Z-z`8pAAU_E2PSom&`ANEf zRHctd9X)lpT$l-cqgQu zrf-Yp$Uz7mWkBQCi8{r8M5cnk-ZatTf(xZNIUJ9}E~z2#>IDGbI#M0sfy_GQSWB+^ zSJcBwbjunTzL6}D3NzO7`*_(yLF(;8p2A})^!qdP{q;_BdmE$Ig$ZUV9}aLBd0-5~ zr6Ennoy#QJUFz!trxO^)aU#Q-?hB8KM`Yj?(YP5&%R1%BL(_3-?R@LU>uD%0f0P#8 ze){uM*KWi0iXp68P!i=1M>$87wJ?)U6NM7`fw|C`zkt zb7(RY#4mctZdYQ@Zh`#Sol@4UoJS4!6HmtBl#FEy?SwWSl7$b%$ zQ!h1(Qp(2*M>y2_$p4UX)!7j-dTqd9$y)&sRGLT7Pme4fe_?7WuekCo^KyKuaDsYF*KansIcwBxP_{4 zoF%IWS-`S^3#QZv`(ui51QQr`Mo2F+TX1H`Ze@!^q_9uddF`k*?x9%{=7Fo?@hszv zQDkE@Ji|)sZY!7NB3}@kk4hDXmXHzl2Y75Z_**y_1OS{X(JB9fhRU=a7ms&YKAxap zhWUF4K|}#ppx{hX@$>Q`KK`ZfpfvrDn;CM~0sK$}XzN-tZ3(PT7K;m#-IoI6l6AWP zy?=Y`z55_O#y7NX$48C54?Gf?aggKzPRU}zMx#o8)RyjH(D&^fIyNYw$|yno`JJTt zHqn>0HZk`VN1o#c8^WCvI@bx!)g0L1ap=qrqltU}I{SE;msC!0A@VE4LE)D{6vyEe zx&S!dhJl<0yq#~Mo1MI7A+8OrDthFFSHiV;y7V`>&?SDbl6KKG*%cryX>*~;)$EdGwG_!Jl+8QivC}4lu@%^wi&i{6v&YGOGQ-|hz0^H`*41!S z^}>|?T`C}{Q5s-*12tRLp&+>H8hp!I6v){hujwLpo@+Fs zDlE(}rjxT9MQmead@~82bWfG>VsKa2SOnX9jWY9R{3GTbV2Vh54m-&7!$Ww0uZqbt zTL>$vJG~X;Z!m6MnJt6puJZt*Um|ryXN9yL8XZ8zMrDIqy7mm{CGt^BgP9r4#J8fF z>J7}NYQ5lYEs@+>YE{%y6lRZ6GFym}Sz^?%M)Ui}sL@5fLmV3G+@X2J4F`j z6t|IWmS@gYFhWZ*ELjDn-P$x=yp{pB?^6&PlC80j4`6TjZAhr0{A+PgIvDdA%HG>j zZ6|b(i2p_zgSm`h*!oy=aJZz3mZaLKYwvO5y^(XVwzzth+~IS2L^k`*e1fWz8~~Yx zu)-GJR!L2&!~`Q#`PbwUp=~g@_R-1So4rGj_3h^Jg$FriW`i>8sxl5d)$;^^ta{9O z+Ha<^raa?Hm8Gth*+z!%NU~O|BmNYh_e<8z=p#?;x$kgb&wUF5&tcdN^tzGbAxQup zuN%!QUfpJQGIR0FR69I<##G4OPu+m_bmbmDkLt^;6Z=iHVb0wSIha0|iN|wXso?Hl zQ(9N%)6W?*4mmmE!Ys@AZ?KC0K8yDiGfP((^C+xesmRD8?x7RzP|9K?t;`LE!KY11 zaxiBLS4J{QOHJ8gRq}x)nlYz1XEBPoQcJFk#A$=fwULxo%xw`3q<}RGI%^QydZ;S| zC_v{oNlst2Dc{xYWgTgH51TeQ*beoBi#(QM?@m@IU z4KOK8_nvr~zmDnl7*23rW$ai@k7bh;6xQXIx|-rA_^o<$p}A*IWAy2h8@# zQKR8)9~~U;?e87Fsmyef@ikW+iJ?igv)XkSy(yOFeR7v;F+$M6epXz&a4vPUV@-ya z5eF2ZYlL=p-2d2*Zu^@{8~nQ;HODd9=WZ^mC+O@cpRLGxoJNkW6EukF7OH3S`Cj~1 z5NLYZ4mxp7#^ecgpmykf^Q|2(S~^GlWUK?SqkU_mf|Jwz9eI^SXdx|BV3v0F`SIMG zTSnQq2nMjTZ&%L-;Fi$x|7q8DRFs8KiYs`BOzueN`H8nM1E3e^k5W_d$2pLFq8V!nXnycj#;B|saw2s> zYaaAeT2LmyaSK{-oF1u8P6n1L>VUJl=7P%ym@1k8m|t_rt|Zq#{mXn$;m8zoNxFkz zLo1L4(7wu4rFWfvG;EhE;xidAhns6FX!xw`rA4`dHc)^>Z108n#)0&302Oi@xA6E& za&+uyj<96T$xY#qiw)MPvDsd?Bb`@2TcTIF-Hq>i{JL78z7{IVbuaYF}6-j4x>KD z@o?;C+}J|af#|$wA`(r0OKTLiOd)lq^ToXmUX*-<`bM;G(PjpY^AWK6L8KkT9Z&@{ zeMG~NX4EgF-z&JO=dp~G!ml>uZl36hmuz_-THX(@hW_w=a?1+30;BmESi$Y`S$u;b zjr_I=UxA-9w=q?yaN$H_U^svQ<+FCTjraN4(DLDBbQ+^na6@xviN10%dX))QVwfzD z>LEECCqd)^$?RFT-7V<43Hb3Ro`Q@P9@ho}D%gX}oN4$&6fx0IMpImF!ct+QUQoH^vuWUxoB*zL))iomjFR<`=}6RZy5?0L4|PJ@86p8wXKeG}#$ley#H zN9H_`YiDg{hmI&b-*Mi$8#rw&E+nnw3r-nk#ipBSibf-pWDTb1OFyb)aX}e%WXz(> z;*uXq(e0e})K6&!(Hoo1i;D^&sYtA4XTG@sz5>nh<-IZ6tb9#|WnvjQo}gB_gAJP;`?K8eYOv zOdE>&Qjiqe(HLV{lCrZcb>ny|{2>n7nH7C3P&2Ax(d;yC`2#FXH^sUS7>lw5N1==vifH}#k%^dI=79U zO@1F^euJE}Ss*eYBW%3k*e*Jv#yZ85Mr)jAgqq|{oz58uDhI7@VxnPKBpnVEqq;Lb zb2yCHisyA%^GkpOts7i=)L_d^qWo{lm^gJX5(mX!w>d&S>7_Y_W2pwMm(U6n{(_*p z>7(}*g^tvt5wC zQcgaM5Tis;9~?YRa|Am|Pq&Q6N;ZF6CunFUwoW$vq5HfkL$uLb{sAY!*eN7mH#U6- zC`R)_hHZPZ)v}+=L11fNMu!&CO=DCdINH690O&QeDF2(_YsT6<3OEvSFq5;!e`sThgj#pSf z|Jsaf%e%V*iN!JyXOT95b;AL*2tPPf#b)s{$crh#)-hJ@n@wouCQF@!JkV9#RtlNSUVs3|u!J`f z=dvUJC}x!{*h2Y?Kpz27sUlNTT_`3W{UZgxVD|SGhM5EED??-(p^w~s*g#--O{V@7 zQw`0|$GzS?27*K0 zj2C((+x*t7B17Gzr?x@wK?D7d%*~KbV?@HvzShL{T?N<5Ow5O(Y$+xoHW?zTZF9Pn z5Yf3NiJLlBIwpE44?t=Iz8AxzV`Cot7S2ZoGNI%g7!&_^Z@b=)`X2nn{s8%jLF(f} zdJ{`sMWdSwWTpXBvxnh|IR51)zgwsZ{ZLk^*e8m5Ne4=@BqPN8fbBp7^6W5CegOKI z86=A}X|ou{u+`J}1~4b%`E56=Fw0))7skap<7JBNEhe8N)PYt6Rr|C^b+CkyYfD)# zWk*XMe<>+JJ&UXYZ=u57;b&gF3UD`$2)jZwLxp`a!W&@@Ed}cXtI!9I10y=Ryg2Pv zRQFmIkmeXgXjehY$2|hG-tG#ioU^qr1Oj)Epk&p6l?E0(*%oEw4YoN|9jfsw$`U2I z`h=`8fHGcqbSF=iQCvDymj?_EX8VdFpVw4&AM6_?Rj1e#I(iL_OAeOO7S!w!hB40$ z(Xm);8xI5~+V;>23Jht*rDLc9g43xu!X}PVfzl0TuCybM=*Ob?If*n6UUxec z${*I?+K*xz3107gIM`j+G5K`}(PuA~R+h96B_}^(BsMdg7?j^`E90R{uSWn%G>HfS znYaO`CW;vxM`5}r*9vI~UbWZkqXM(GRLYr@0pUJ3CA?t}Q@FO(72yHSVx}d0Hj0LU z=dYELlR>vuz|>;Uz^CfVGdFx7{D|Vts{Feq|30-R5Ko7Y?X;D1ip+8a7<=_=kIab`M`I)BU8WE%9R6N%(P{#)MsVk&0bXSy&g_6B+uZ$dd~|Y}8Zkv~TsSyR$Gis4hn#Er z#_Mw~1HAVal)PY}@Rx#-jx259XD$gKLaJ-_y|=pc#xWf1T2YM=gE-}iO1H*QQFY#n z+LS|r@E!iH$-htYdYU+!NT7oSLc&dy0~QuKQ%g=G3(C#bV2r0<=s#Pt49v0eQ^4d~ z6Wx4o>)9I8M~niD-sE#Rhu|xH3UYhWMl+}MRUdHFyV_gFv}$#jB0Qer8emi@d(HSe z26cUj6N6utm-M$~dn@e4@?6zEE}3LoM{l;I-K#Oi0d0dM@biq5o^w!S90`8bK_MlS z!USYo{GU>KA|}zzS@9)jX#kMqm@Ldfv@Y`j{TKLNNl?jJx`+R_NEd(a2e)w)KbuHe z{$i7s8TXQDVcLO+6yT`wy1txA1HKzVm=3u~hjIr!utt;9OuL^~f~1EMCB(_he5$sPDU?fC+Q}VT@&J0 zS$C=Sf&z*lt!LkD1(mNPTO*F~^AYGO2Ycz`Z<(_ji>UG#7t4=pkIlO)f5@ON6O-@C z^v6#8=bjaqH6TS230%70CRA5S|AO(kwfaTzj3T`v4C6xQ(8^cFaQrW28bRA3JGLFZ zN@haJXxQ6+o&radk<|s)W#rmkSIsyb$#3&S4Ney`G4<$B8 z(M5 zlaq|rSO)^xs7mr7DIn(lOl}Rir7PmxQP+J)qo|2^_rbN}%T`IwNQjeB@@z1LjE$la z@xj!zZv6grKsEv8AAhWhpME0C4P^#*c7|azJ7jo$v)O>Mqp`&TqV9u)I z!T^y|YHQrHU@6U9aEHOU^QtB(y1Zn8pPz!5rs0;O8r?@@#Ww3ahU9w^j&y(oJCb8F zL02~~rP)aK$iE1RHeGNJmcn^DIq(8^N@(aW7jM}AqrKC=lDcyhB3_}!+0fs2(WE5T?3Y>)@s}+8ejy296 z2YQz}{rB7LNqweE>21unDf<%iKN-^=Ja>kHzP4B7a3-Q*yhJCT^pc_~IS^$yXaaYExCh@_@Rh5Vj{&hUlpfyy{cRk?7<1-vOzhrqbGz~GU?TTQ z70K?qaeDG@`&3mDWsWSfBU@cmOl<0|gHJk1gLqG=v=me!PT!8)@E!YYH}&ck1Fj~` zh;y!2(BjLDt(+=o-WM|L-;$-11qu_n8aYu8OXF^EmH1;o;RSs-M%5BuRCE=GeKtph zO2yJ_zH00=8%OU>ws$k$X1+AOu=jBt1NT!-l#KT}-F<&*0gN9y>P;(#S?@2bp!#R- zNogh|9BjC+psJi3*pW-tO9!008G(A(;rA0Um0WzTOn}pm6d08{)Jfz6TbGq9F$RLi z!@z6t^?KNY-Q@QJzV_7O0A6Y;!akMmD{VT!^f-#S6;V8o+^gzMD2OEX$zqW*fNRks z%XUP)gPqW}e(-@zPMc9L(59)h428^$9SlxJQ`~B`qG4NxG&luXbqWM4xUY&mzc2Rv zek%~C{(Tq78=UMsJyHihw3B|vY{`I%cQlre5*um{B4TFfu1vc#9ZI1;?YS-sb+o;5**_o$1cR%b_*%}<{ zp)D!?MfOWw%u1P2N0B1|5w#waZxZ8&kfAn_7c%%Gb1m;ypwUpaIG##M9N~zxL+FYd zdEQ0|I@AHpK8rFr=*UR9l7Cs(&iL!%oUABi-Sa|4EdTW9ryH`G^$NXC?Z#QOeX#vn z^ZI570zGA)bw+*4z^z4j%7by;kEG5-sxx5_6u}+1uj_vJcXl1cn0~;q++$XBExjW; zDZ$;A4--AJWpcyBr6w;e?KwrH2N*JT#;j^fne8wUDImvmZD7_}(Ty@xfXP!LYIfx@ zk-{u|Wy=6rTEP?{qUJUFb~%0$RhJgn1&1^V%Qjn&Go?1nK7kxn)%PMGGm;R8h~yEF zNi*t(qsuC%y{Y-4fY;K@mfYmlOit3lA#HJ>CwC}5%+ffxh+^FfqzA?NEQcx1*jbX- zI!ofSv&o&^Z5U#M#_Yt}z3Mh~r6wK47AHsAC4MAV0j{dyNUoc6U^Km#zEXU3RnM+`lR9d#EWNDnFh|rDz^@kMTjYTEYJuqfUjYx+q#F4MXf)q3* z-Yfvmi(Nz=rU?U?l2lmnEngb%S#p-^I~hEr-!2mBPaSqG+c zA$gLG93u^hEC|g|nVYpnBpGE#uqAP(Z_wU1U#}8*B5Y91n~$P#>&B`(1=ydTV$|*w zl&@|+$%2~#`ld`7oxQC?-c~bc#<o<=%9b}LYlakrx;En=(C|s zFcNklB&Zl`$k-a%(O&r?!-GnyJSCMP{}bsIhl$AW*hOwp`!K^`Y;S4vGq@YX_dWI0 z_Mt{qY_lKS=Dy>qv3j2u84Oef>h-YNM~Z^yD{- z%uaDlIWN-lfLd`MsaOGr2N-JW3PS_n!Poy3^h1n(Bff}?e4;8q#CfR{*J}%+UdONa z6q$oBaQ=sXgY&NFwpC&eWl|!k1yr_Psw# zt+*8B5}kvWl_K*;nB=gBk&;}sf6qr2=JvMw(DFITNE zwS{(Vp~P*;=B>fTP)as<)hbcA96ts=7=tUtY|F)yLN}q>YT&Ysu9k`E*es}sP)Dy{ zH-LJbZoS&yZ5B9c0dDK-8tvSyoX0WMWqk*U94;eT88d-!&Znc=sIpw8^!t%Q5bQMcp36i z;RMbIV;Der<#B0chR4*3rPwh)q$`zv@F^H-Ehu%HMx^q->xrf)J~X={411LzRx(s! zBE~tYbA_YN%}}>yy@Fj!?=0&?8F<;&q9!z6utAd=hzy+=>`ioA%24!>YPWTEhH3et zPMHc;QVOOAXvfiNbJH~pm%Mbhw7j&EwAjEX&ID3Om|}BNtW>7<6e|MYmN+|GLTxiL z4j>}QN6Y*u2`2{@ev~@w)p@^=rRd7g(q*eJa^R=?yOQqj^5eDOs^9xL{m$uo;!)yf zdSn?rP%ZzQ(Q*RbFc^(NRw$!VwApw^w>x%~qz3V^n!`t^2){x#I9Vn56{wG9e1etmjLJP`w>K}H)bUX2GPU`5X1P3yA+IuRnJ0AmD!fkOP6pWh$AayK-DxQK zn3=>+Crs8(e$qD9G?_D~2=k2Ki`gBlIK(@l2uzfP>4Q0*rUpz3Qs0mQFa@h%W90PS z!qUywTO-nadv6V_LV6X+=p^MpG%@734xT~zbQ-@>6c0QbZ+xN`S3%GhtQ=(z;BEvT zG~EhS)Ux*|b0GuBx#O-|ttu%i+3XCs4BH_{=Hs?empH(PJPHH%1vN z%6>@2n6YCV8vAkf|8wGRr3>1j$;g70WDHW9nr5wP8G5?Cj6v+Su?K<=~L==I;0Anb9g3|#RMCm7O z=2dB`blz$-;99|vFDxvG_pB3JPjs$o%mv2-JaT{;4RGKqwU@Q!D)wF3NHQFjp~e)+ zQkD;i%a!Jl$*Ghhs&Va8)X~9d7F2brDQKY`#?p*2Ra-6*28ZpS%7MW^Q|PkTLL{fN zF%@nGwG*gJzV-WL^Vo~pVdown4=I%{!%_bGKKbFfOV)|T{kDpM1$z(U!}!Ay<=~Z> zHH-&sB3w=)kRH(dA{%}-Ip$d1UkUG|PfV@tkNkhg#Ei;_8e{yCK#lSQs(v3?AL!W0 z*2!x`7El#et_35FJY-#?XOoAMUjPOaiXrZCL>Ubrg)N z0NC9SBL;RdcYj2xP%XDt)g9Z|1g3!!yx_L!YJ1g}^2cZBC*JZa*|wWC&P-MXe> z8?1P}wjeMbgU!ji`u|LIsiQgLa`WQ9qBt1bh*vl6!{3R@vK7A`Ks_$fSge8pgvyP;ot@8GU)`^+22>;vmUY8XIu4bU8qGDGW9eizI5s& zNnY3+Tn8wpfBC{*!}yV*$qV)0=f!#bd_i!jb0|jZ8FOUE^M&(zy_zTlWde-zYD$RD z8036j)ax7cccBR1#9%`_6tESva4MEcOX*`p0sM#R*W@t-cL9zfn-uG@S!o>J9yNgJ zW;U~MSCEXoP|p$f7_=GMh5*d_jZfD1Y};^b?C zk_vbY+t`mci(4Q;cz3-Ju`0Mt{f zBQ%-gGt@Dn(5-_YRjwE-Eh|vz(+sjzd)A$Hc%= za#&k?&nj36E8U=X-LVgG0EYHp-tIUI zR1B!v&erJ`aJkofb$*4hS#Mz{$gB&B0%YCUqNlN%!GaDBWgTf|X6Oge4^Q10mWmlv zrDP7XDTiLEs28-9d2g&~r$YVZYMmq5HR^3b*+N_wzu^6c_wwRmp{kt{;7@@~|i8cXt zA3U*qshU}^n#t@iw>o3DkIBMOL7(`H&R0NrZ5(%D}kaDO+j$r$b3{p0MJD-`bO=aWt zgya>Y3DFc179_7Ay!yx2PIx}ZKi1+a*J84WCY7``K5<$tbEyZTcypGJW-W zN35LJUQAGsrj>tFZ<^4~TWdg9YAq zUM#%_`Eqz2(3KG;bs1a_{WkTH;ar9N@hD{LJ?C}|gKZGI4M4W~tmal0>#@0XVkr9N z32PbacNqYKBcj>ir29T4Hq`e~3^U)foY(|^0Ml{09f zAIAZRcZ2aT@J1*b+f-7vJdIk)p4l`qX(Fs$_;XBxlUFPMyla&|5N9glWaj@a>N*)| ze{3V}{hj8?yTc~mX*)}vzW(6hctg51p&#ybNUjyUswpL6S)epY89U`Fh#dH&n5%9U z@g8P~Nk!Y3cni($J(c7$07C6|b!hl}n|yws&YLk0M6(s5a4l^=+F={pG#7Cb8=SN; z`jJ~Vb34rCb-7Taja(=tdf*t*m#k8$<`TmAw7E%V7qKFETcLwwvXBm1jdNClfOA7i zn|3wI)_E#JdbPWr+TW*7msf=Mmj1mu zSZ|!{W|}KxwpdbXA2R#VaTjsU)P|KgDr97^kVA{@@4X_XLHV~SFsK^pM^0%9ci0Kp zi@@7Y-iA8%3=*ePE|MmA7DaDQ=1zBsI}9cWiRZh~v+VQYu5Il#wP284^=|3#O~5 zI63V6jCchAW$ZjuT&6~jTrZ`1GXN+zD9JXtuKEK;{Yn zWfbGdl0DUsjIiO75?bln+1bkK#l;uvdu`#1TKhRleaKV=YbXnErA<_6+jR+gxIq1; z`V(f5Bbj4?D`4L~(s!xMV|q%OHNB43&0lI&uO_Z4rXPw}7m&W^AgjQAem5mbDmE1I|v{;z(*Vng)gsM85E(u>MZXi3pL}al%qJ*MkiKlSESGGd>B66s+ zkxDO3ocIC-pA)A?+jMo;0is{PByhs(0a*$Gm%LHb0t8TCwm*EJm8wfCeO$=v#l<@1 zI~fkb0V)af-~C)Eu;P+@UyU^W4lPOc^C@$I&^%>bdlXX@ep!PPQcb?3j1$%`IMd zT5dL{0hS%!B>7YWCY!=0cF0_!+Xkw^nv4R>rCsO zjeKI&nBy(esaLV`YQiJ{Q^szi*rou9`o2}0gEmv+v7As^a2!}@vZuGT{R3@&hnEjxAoPek6t&t)!f0YnH=jbjq@x!h%O zyFPJ^s2ex4FWIEI|CZSqW|H)fmeXaPC1)064fP0R7YqesuSzg5LYPt9lIvNW~N`t zt0lamNYmk!0wN8ql@x(A8h4wt)MRq%w<*(XEpuD59em=#D9N-)CPb3Fg3zX<9C}4~ z-ByutG>Tuy^jC#mPK5ONgxQF=tyXEzv`GzP5byjSv=QaEHZz;Lll{pj84I%al)ANU8SixNG_snNQXyJkFW z;Ru?DMVqBd*c*gT-Yra|d{?+km{a5@YL~&FrBGkc_anL-)ZyC8O1RgT7CDTwen9$E z3^S9;{=HCvDcm8jV!5^|qW%<^@MlEwJjKotv$SDy_vzI-3A&^@1R^wu;_&WX6w4Jm zi-lG)bs}xhEk8&fV$Vtt#w^4bQ=E>*eUPcTyyS$_$j-(x1Y`oxJ=zEcBUDKLJ-(sh zC6v5-5hjoTf$SW*-tsY~wGdlfkmax#&`%^S5*8`;#3h{Hl-Vwp=se)iGCkA=;6BB) zj&a1A-yd>!=}>qdgJ94c48u<_42-WA3^DE=I%^?9(nkIaUmm=kAH&O9WcIYQlP;Et zgRd2Pz_3wVy_(e5(|mZG3>%1)qO5!{&mr7+qwgwo)Ss!J9Y+YKT*& zg88%-7l)%ISU`A&5sxs)KnwG%V}c{zZu6Ge%j@w71GGsWQrb&&E9DS&-h&w3N=8W1 ztuQzp+l`dq`l5qPRPe481%T^**a2|FCzPdmODkgK2&zd&qprMjBu6?9-^H2DcxRKgs`O#e>j9Ia7hc7>)p2D+C-8CkoJsnw zQ#A7^Q=IC|<5$C5C2YASo39}!paTX|n{V*7P-ch*Ir5x=+eUi%gU&RQ{1@WE#GJ#L zgGkv|aJ9;GVNcTFe-IvAiA9(MMXGrmUw=*h502fEU3Zgb91f)3r%CWjHq(-Uy3pkt zZ6lo1`&sZggKwFpxWU%aRxohZ--NacG4)MMe@D9H`!!Lb2HX^{V^bLC6-PQNA^r9J;KQ2vXSj|Ed zG|wUHnRueIvMzcli;M?tWW0vKbr_>-tkeuTNcm8YF{2DmY}zDws**3?sw&@r8Sy)R zmRySzH9a%Uj5{gTd}K_;cbWw?0nXT!rfTY*Nkt;no92JVVtr<+g0?sun{xKGo*g)| z$}o`0)A>(4oShCY99=Hk(tZFb^3dDu>5tFNC$JJI*$YzTWDfSE(B~Hy8IRap;(PJMlP-Lc+fU&Xe>3)||Ex9o>Q%D4X*i_hO+yr~q_)JjXtigw z|8%E{m74OBLElq|y~DlJy~D=o*5USU#-)XE)CxN4x?pFwv3;_4e2O;(=LJ>bypZW+ znXXU%yEBz6h{oRGoBdsJcy!o!yLGa=Gh-9lt9EkXpm#?;Yzj}N!A5NRAM``_{--q@ z(U)0KZ4%(pR2?sLH0%wsL=FWeeG8Uuz@TGi^${#;rs`9&h%kLX*x{`-aBB1O^M#aU zL2AS1T^#-=Fuo2$lRbYKQ)e!`6ZgS3XSk0r}7;8g^8+u{&acX!5XRXa^FX0uGxz5k~x3ACGKD_X6s z7`Ntsl2n>4(#__4XP464?leirb?-0tj0ySFnCJ>SR`E>bP4>DFTdh_!Y)hA!)37Ig_50#2UFRq`KaRp) z?UUcH-O%G-2C%21pf2PvVF*eF0{c}MCG@IH?AaYg8SUFdSv z`be{b5zpu@PAY}diJwZSl|cK<$N48*(iyMO&q^wIX^H7)XO^47r%_Kb`c&>xX0Bzv_0eSmcc`YlTEqR=Qa*nksffMKDJ zrfWa}ySggl*|GJEiswt`h6+8v)-v38hGee01Yp!HVz7yAO}-6maitP+kqHkWt*)tu zhkj@_-X!cw-(WO#grOYQdVZe`uYkW~Am^7%df3H;XNBCM$`tYDR;+mppD+u8Wh!r{+#O|w4q?*pxXnAu z9a5hD_PZN_V05Cjw4DQ^fW=P4{V-p3{*C;8&Imb(BN^MsbQ5Tw`t#2}XKBpiFz5yS z*y`i_ynue8mp{>HL@u=HJ>K6s*x!5Qlmqmk=)S7V8?=NxATzt#v_U_5q?~LnVV7?+es#}k3CFhXNuHNr_99Uflizyhm4PJpD%C@<-1#;&(9~2b!J)r z&aA6N-@nP+PqD%FZOwP&g%iy7x3r@0lTG;*gMn?jSsl+ztT%N1$%_95OwOPG zjQX!8DL7uYhdiXwx zLYpReA6-o3lB|NsaAQhaQ>|^5un75sV6+9@E6m6i+=UnqZe+)~N@OieY(sLwr|FXD zqocV~#Qh!|uzo*`d!%?Gmcp7gR1VrpY{e)t@tin>N0rsUw;{+Zw}I$|*Eb{MXpNe- zWXO?w4T-dMw}F+kP=(WxO5ginSK>d(8r^^Ke-lIoeJGdHiR0;#ZshwMM+{eqHpiPw%(+Ecrj!>;{ z;%z^|mmJ~66?yk}l#r`U>@sCv(^q+jG+Rh!n?0EPs7?LOdZDug6J?e`6kp3AiWD=k z+pfhCWk84Z4~B?ZtvF+uO*TFbl~>LF^u;+w>;;FI5lU+#Hm|5gclV#UmuX_0FF=IDM9Z1#z)DLIu#x~c6x zd8%OXfv=%}Q|&H0NRV%?jGu{aT-u+@Dm$g5{DP8}teBP6*TkxHx(yv2-{I4Y6)2HE zB|dm4ewLvf9$*-BK|k(bEHY#3MjVDajWXh+IuXI~DUsz)qVtegZB>$THV@h%iY?woaaq~p~Tr`KJny?k1` ztLl(u;+A*-r7EF}c4%6GIuQi|uXFWKhqF26ELqg*eka)5x5b{dwsE+IRK!xB|gF!0XV`#ttZiMcnrX zzyXc)z3*U%Nkn0eR%=VOluFpT9^oLLG7EE!Ey3MieD4hC^qDPXO7rl&*@W|L8$CkA z3gx8I4>mX93D9%-;9&3Y=mg7cikHtTB^l;XLZT?CiD&beu)I^+5D#e9&tdp1!+xxh z6%ts8bvt@lCVNj|%jVKLO5OxzSdC-!09dF@ArdB12XiaDlDfiC^JQ$BND|nh${;1fEljfl1uDo0G@_WS4?LDF#7=>2>jJ)3N*G zK!)eFqQL^KM2~8Yl$zzr`dIR15va)oE=9iF5P$Dwim4$;H!v(fA`DN^r}HB#wKiR; zVO&iZ2~42@giJe4rj~EyB#3sDwGfXVwVymVi5NfbOfy1%&Z(;klYUb=aq8S6wNls+Ur~$VVcdlyvCMXz7GGo1Nl!*VwQ;60 zsTnBca0Rm2xE-!d<)d7V>0dz?9=VTfv7m$_#CUA@cfB58Ve-swn{%5uww_ZtrwPnE z)lIPPAC{NR548RohFAO`lfyUgGX;sP7ToH&_iElyKI46Dxok6f)NnF@XTp=1jnv|F zr-6cUbv3q=XY{V@g%{q7%=fam*%V45%wj)TFl0qf?$wC`Zj_&~suW zFb83wSUb9nb5J&08eo17EzJ^49bVSTrj-_T5=o_8TZ$XE5%*GB|10#h0$#=S-@6#_ zV&9ay#YD&T1DIb+3M1x-5Ry`{@B&m2IYk=Tf^%QtsuIAK$Q2#cL4}t;w|0 zpOHU*2sfzV^J1HFpAiAo2IcK8l-w+W)I7o}m+%kqVOScWUnbIWx9JVWK)@giA1N5Z zKs_^N>Z+r-*c6}($TK&u%BtVi=n{GW7$1y2dw4i7X)m8QE}9#f2Wqj~)$i!sPy@8C z1Q{iqjLws(;5V*lF5zKwSGIWMmmaDgwa)B!%^9s1oJ(Hog-K4jQ5W@V`J=j7uhy&A zh0Elq?a+H!gPxA$gWIV%UYk50+?#*y)SEM?tKB~AtCG~2TY4Y%S67gtf>a_|C>eQ- z0z+9!bs0#brgCK&O|?wzs-zmEsZ4|1!^u6h^WwYZG6n7XE^93vn#o`ur7ijT*lOP? zvf9_gReKE6;$X#;C}(hdssLv&!4%po6C&{`-vsT^b!TIuzPf7(_9?AjmBNXO#5=!b z@K}t|ZUC|b9y983!H+7)l6T!7e-{Pdzacw2oiUv-_0!avNhc+LVr9cg*wwgI(9}5N9%;D)jNA@#r$OXtEivs4E!u%r2;PZmL4i?U*12 z-*q7~G!>cHqaUYG&72>mzu(+h(<$>byL*;RihGJpMXoG0XELbU40}I$YEQ@6Nm!d4 z1>@(xCk>EPRivf%?@b4$sfDIQbDI}$FuR|Wxiq@Zmi6G zg*%w>$jO>OJ?p8Uc)0ta^-V@{`kFfU)?1UFfNiqvk&*nMBk^w2xyDv*uu?!UI%`Zr_;{>2(@um4CT_f!;BNmY7-Zb$)^MaKu4B+m)u zNem@GdT*icH{H*2%?3KUand!WFjpLCTZY;ue`CZX8zR@dBFAQSc|s#NsK{q=+qH8` zus&S*J>B3^8zie>6BJ>Y_20{+h+#kJ%*5^tMTWC8K70osCB~yco=K;c0-%E7NG9v> zop8;kFku_{MUIqhg3NbA6-h&)<6Fd4hSI|r)v`w(;k3Al?o94@rwN&w2fEy5y9lYv zmlwo1pVDN)^W-#0i|MMgtwjBmFBK{(%loYykWQ~be$92BlZ1g7DY9@8viQD|sg@Ku z?ZBGf$O(RHRL*ZD16fkqBldAG5tt-7hljxkW%e=!{H$0LX|B}&rQAzO+WCs>@SHKC zjSY#1L{`%FnRFg$4^FciX8^#c{rw5gSCgHoxF-=yMdIu__P)y4HxI2c2dc2& zxs&m;tR6~7jkH}qE4BL4rlHgarspsoKrf##oke9r?_XcG(F zCF>Tc0CP28=Gt|V>TB^Xsrj-4hGZY2|55^udoLKZzS_uX`aBz}SCmhhAZ9na?F>`b zY<%Q1E$ebZPAB@q;w`=Li`BnY)z^u}{{KIscYb^kJG#hhyh{EB)YKS%Kx3{0cpcyO z^gYrP7ih)cB%_Q>zXnT%T(r3|MVdA^n0&bs$ZCLF+j4gyM35*<9? z|KJg0(H|X?AR{7y*f1n6dzPkfvT;<)zQnENn#H?AP1Tsy_lIdOk8_HCl`%f)9qJah zJi^@`=1H$sVvrYp&mFBGRD? zTMjk}l0?;h#KCV#DVZGY5xI3#Gp^kFZ7Zyde5gF0V!VYV6vCu)Ro2_h6SLx@?i9K( z;YTF&B&Lo9;^w8xL!;bvzL_cuT8~)>5d4s3DyZ+)qC1BlZJ&hH_ot#>&hDi72#22gfn2@aD>c0^k!=3#cPZlD%aRo zu`$up#>tx@+p+chG|vD|H#gyQH-nPrbl%AA5CRkW24o!s0vQJ(vu|+3q0FG%wt>K6 zoL407{wEAs5)GR?7n=p7wxZ||W8uV>u;(-@hRG!0#r&7(sMy^7u)EznKG}V}_d#qQ z9USlN@179-7xrOLP~(90hv%n9NBhm4{iEaE!)AjLI@w*!+a(i5!0fC|4?1` zeunJhM{RiBmW)anaUezoNQdI}x)@m&T^Px05NNWzjDo5)bmqg?es>u7ZH!YAqXi7S zQgF~2uU+LlymX_EEoulDyO&GmQVZ#%OAoyt*=3#-b?3?R0*06_ECt^M*@7wF_C zC*5?D`M1_ZmCK)@fjdfxxReW0QAu8-in3sMlX0(izflrD>5{dg-@-(}DjGYW3bcF* zxV4K7!%I2m71#5TxtL7_Mm>golJyKj9c(&HVo0_-T|`CjRKIV#n?)WnIukTot>$f4 zy>lb%YM2R@E|VsF%rUws+Uc`A_G6 zUKZz4!+u^Mtbsr0<}ynb(&Co%^vy>TTXJMa;0a|dowxF0%o$HHcXA{KI=Qw+2JPSw zz$o2M`DG`x(B2JMl#loon{=3jAC`5Xv^Zh(#7QybGCU?3zidN&b!FcLKohwF&El;fLlAiATTANFhU4b~^B zMZr3NEBxqRGh;~A=t>>aD=SskDAta@L-Kh=0Kf|k$6Yq!QBL)yiJBFdrGv4a=!M1h zt=n;HIDXME;DeMn7xMML4=|=U-t~7WO1aMwY_VOT9k(TnOV(4>kmii>3VIk&(2^2I zG$P+zy1ZuVf6Dm4zNz|7T}uY7VK|`S_Sw##IuED#rt|~h2aXfSISjg3uZ8`3>C$0( z&FGuX1PJ|J4;M~D8lRpn#WC_JJ9$D8K`{DM57T^oj>s45^c)JXb7(;cK8cc(uNkK#_MjWAm=jJfF(-4i_9U19MY@NV=O@0i8_ICt1=^h@4 z#@pTfeZc{KWMMlHj}@f{&KXrgr^2JC(tKp{gMLH;BCH1g&QrW8NTVC%9)P3kSi!FI zf?zwhY6?PH<6tWdR4FNJ**VZ?Ou0$X=uJ{;Q_$2q*B{T33bO)~rldeUpJ`Y!l((!N z=k(TjYjsY=Zqh-VC=f}LjQp^$aO0pl^|Rt9Wu9m0*o6v&rKPvs;$>J?*=lnT4uZs^ zQPga;gO*0L^jlizCUBEOyvUHna--elXRi^eZl02K!gZahs+lX`(993aq{OI>uOmj@o^Wjq{u*<)Iu{JU&W*If_ewVvR|}=u7BTD zM~He0?Ln)BV|(e!H_&sDA^%yFl^G`Js9T*~rxMJ&I3`OI5cT3Qn5 zdL|lCXN1vV#p?(NtMm%p>$hkmM^FtF#@zWg(GaE^7_rgc!|RU$@Jl~l!=qoW`{SA) z)_NfTia>S0NDb}rPgQC{woT@%GP(frt?11Jhb6bUL5wt7L=FSZp;NjB;8W^AFnduu z?A#-qa3qsEu!-cbr#Kuk@#GorietcUkfirvDf$?E2b#tw@eQoS6~Vz8dE?$tDnOmm zNVOpWqKP#EDZ?z2P{0XkDi}UehP;tgYdOO=qojOT2>T`)1k4_WBfX*=1Bu*o5zPC& z)3-Ukp~}{)z5Tt@ z-%zLddhhgbx6u%cXE8x*hMSZK%1Ewq)tt7hgNBbQ7(Y3 z?Z#^0zrn&vIgM0JAZ7$1CM`5Mxh5|jDc`%1iiJ9|CUOJC2H=Z9=oyBiKzU0!%Zk;L z7+n=lUy9QJbA^fHu8(On(;Q|PS#b{a)cv9nZ4Q{BjZAJfM0OdL&cT$ZDJG8kk~tMg)h zeqOxVeY1Bcq;6PjA058ld&6({r4WYp;A-(H2C%@Z8F5+0Kjc981p|HK7Z2!>73WEw zZOebVT$dA1BbWKHNOKbQKSgA=&XdAug*%x}OkOr~cD|RIQp}mfvT61m9@OW1J1I!A zk&vt4o&qs(VWS~N4Ap{0CG(&uJuo7(Ik~5GSF5Symptf*kUiiIv@eBo=>cG!yNzPT zg@?gZT2$7BLq)oM1J1*Tftv69oS(=YD8+GyaOk}V7#<7>IZ=K**mgMCF{$VPq5J%fuB!TMN+f;gco6GIR?hSz=nWoOqPZrt8 zsRgtCM%6o&dE}sq@+)EVu$OM1smuP3yGpn0@j@aQE*UZ&d>?^z4x2n4{Gw>ttHurm z$biK||CD~uqIQP|RQ&Kj6FyESYr-$fvaoYdxxqUJzj1|kviq2?5<_sBOK94L332%< zxJJ5PAP)7(;=$INz3t}q0Sr`swZH;J;IK*SVrPF}s;4kQi0(Z+M)CrbQhqCBSC_e1 z+T-4UmhtG-f9IcEv5z<>syLB7N(ck+ z4c86k~O%6*KpfX7=QDpYuMAhzP2zPfgi6L$nyF85hg zB5UrNur@hOQ{~_;;L7|(R^Br4IrVPkM8ysTmBNsmZ=7nSqoWy6Klm}aI&T)$H*RMK zNtDSY9O4b6-w&d3Y+SrBycC|=UZhTbpc1wcgzurO2Qm|aPmw2?K~#B(Imu+L8wnc- zDoMroL2Oul`@Fo-EQ_2 z*+fYyg^lNBlO(E`{cc**tg-h{V{cKLOg%m|llew7)I_wbFvVz3SWASXcVgdg&DR`G zhok=z3_8ms=# zKT(TQJ@XZ$KC8lhTU%coZXN8_GSdaf4ksR)^BWb~ZRZr1rAfAJhn-G9xpxU0^a#ju z(oHyk4OzeS(xcT$oZ#?~@Jk*UNt=pi*O{H5_`BJTr*0c1(R+?w` z#V#@X(x#hEt)IJgS(*6kQr7c~1Q*1eq!u`5adQ_|jf)foLo^()GL zyFouDj)O11kh7&^PRcMz#r+>8JZW6AjOSohE)r}f>xDBGM=6kbCAYb0Nhv7WIwA|T z;y#k3llf&|W;xG@hC}qp%9Jj1B_g^6d~708WE!~OvS*sNxGe)~)Zz#Vsb=^T&VZYG znuF4O55)N`Np4XmglqnYmKk=QB-^owr%wNtsv0D>KCJUq^eNz2jXv7XT_Z=&%D>Lg zzosk-JXP|(2uqR~=uLFnuesS;td{V%B=KlDKt~8E?2sUU=!-Z3>{ff+;^dv2bP3)K z{ad|8SZG@wWlt8<*R9lG`mtz>bgWAFWdm&AzDesy#)YvTBia`0&<-dTyt5i zozYKa%v8i96$m6SVWUkeGPEjI`FV2ApGoG$j+|{0a%B#QVpYRgYUQFxr=?4pPN!5t z`d%VG?VU}_Gh7{u>1Q^*vBq&O9Rg+7#Z}m+bZO%ui_l8GumkK+#1^{L0oF8;+9$aRjlLicQKwpoM+GMn@tsF92*Kd{bp9mJ(His%d z$IjjfI)f358b^s4vhvSCIi5^u;s-knEtjDT&#m1znUOP@8!*2Ui0R%wHbE2cT{@w% zf2Q*8<#&TZ-r+q#^VhADO>AsxPt>)}q@EUR+BqBpQ7gh#G(==FLzG!n z?xcHXgOeDK+?}#=E+(Hi0;)%}nzi&c4Rp0H6Y`G{)0gv7I&6*mk8LHx!{2Tv{aO;N z@J=2ec=e-Z9jHz`Y?0c{X5aRwP4)JMg*DJXtQw9!WNxejz7KF~7*R z$_psA8oj8e(bclAv+ z$6#B7?l{K(@hN8N8umqDyC6P0Rm3aYi(AKgyN9PIzloi0_W+I0%WwA%8>d@`+q>ds z4^GIc*m-|+vZMFK{_(Fzd-#*mfwe0e`At9MchQ*;J%5agb^g=DMdbP4+1=jXI@wjV zcJ}wny1%jmdQ_(S&E^dh!ZG;$R?xfxIhw?5*g0unf3%Mp-SwjH#7 z9rQEz9lRB3Tf>(#+8WaAoob7y&{#yFk$~j#+=Ac1tnj{q2O(leb~&+!S2G@Ad9t5xuVWGU2+V3$f#`> z#oNGgr7D2)4?f}-ycEl**=hAhUAy8@^JM4faR0X|e0#NbxCIACvJM-h+m+x+dpuC! zB|Xsf!<2VPSp;<998eM=#`6F7mf-_o`_}0$J&X8wg z*&klFs;CwF%H#F!iqQoJ30@~hglCj2{`Hb4N`0HKPmwJ`TM1VX0`YmM`qL7?5(4DVl+!=+qZQ1u6#7JEDwr zeiX~JGIMg#mlHsnvPlKh=@AgAa=5v)q2Hc`7jQN#E;2}L!+L|4W2Jft4RMoC&(BLD z>-l<#A?0)ikT4XBPM4ENfrzd5e;Xr$FWs%S%sd#B;gW9UMX?6|uPo`}7FMMpTd)?z zOD0|ReA|_A-thqFM-uU3Nz5}B!rH}f!- z0h}BV^kYdZNHUTr{0T3y(i5y;K=tq(ZSxI z#oJu>abl&>UT0&|{r$fvm*`WY4FxlJg*N-;F2>QWYgszU=Q( zj0BK&M=^sy`HP^}q|i&flS)|G7tEHxI%|pva))UXP`JIlxhLH@#u@G8|L=XO$| zaaBaN_!MqDPOwELK1y*!hPTqLmO@tT?7n_? zSUyYDzo-g)_-Yr#{N3_dap|IJ7XsSw?)aj@Va=T8SBjr!S$=whR zm9Hg6?=+2Jrp{O@PQPr*9$es+2L_ZW7vZ$*NBlp)u2kCnE`i@Vc_ZtVWmb|Wi!Jg% zCb#VJk3UvndvNg|e-z0XI@>({%bUi9$Z-l2XL4wpKmC;7Nw>wbs<`0x&IX&s&(dew zlYky%C`M`Pjb7(SU2sf^_>g!DiNvrUCEsAc!VMLrGaXbCDa^ift{#z#6k9>y-O+V4 z;@B%lHdV|Q)R{(oz8KV&5A40a_ZnSeKI0!aqk)L{ExO@uh8>LR2+!e}DfF;jEvU#V zgOAs!*fRs=FbgUM z-=PQ8bRIpRmtRQ_Xv{Oy11g=Q2g&fO+4LaM$?r`MbWF|^Jy1bNGw6XGpY%V99#|1d zzl9z!n7l>Irw3}IrRag#VF`L5J$SO|fkFPq(*vq&=z&WSUT-x{n{;tVoJ$T}K)+s3 z8MfzA2OHM^3XQNkkV7f#B40-@?75hgYS?u&?U?LholQfsyZ@ajiR0RxK~EAPchgiQ z6_fWri?$@^=bI>u18nj_=Te)*CQi~EhtAljm_uz++vw3W$A*yLL{!D&z3qdeo!tzY zgEyDnAd?MAR6Z-?zb=I#px;1VuA%mnf5QEVsn* zmp#%(2%pUd)V(;{K(Hx5E4uE7ane>k(f=e|H2^nSFm93JvW$Rlq5#W?xM*Riee|(D zlM($$sz2&7ZC6Gm*bw@A0V#sSQ`q=Jp)BaFY>{lIjWB9z^9b?t`gd=k9mUC3xCym= zv*9O+kq{H9(K=KBj1Wi^C?K+O-iZfYKuGdI=~E7akq>(TyX>Ljfb0{D-CJK#Y0tyTe^{=rvGPDS4 zq{qW>bT821wI*kX#J!moWQ7jL(_{=)54-;hhEOyj)v2ubdYy3k1&|Ox75=6q+OBiC%R5)x>$`2*t`z z!iuOv5a5ub@XyYi&8Q&Qnu*oG_yDtCq=M_p7valfD`$P0hUe^aa zs#TSt`#5HmXge5TWQnAPrOF@@tjO`mGzaX*k z29SXQh-P8K3MzxKoerTRCjL>9xyrRqS{(x!cGg4CaL)Gj6PKQ>0>|TDwJn0b*@-`mCqQk2vL%4rE#9Ji$~a z{K@WrzuQ9|1&?$*=^Zve^KD56pb+jTp3wma!3M{k<@J8H%WwbA{=3U)^^u=*a`XJW8{4IPk^1`41vX)&$pgYJ^U!?xBCNc5 zD1ua-2ZV5m#iwp>Z<{4|Fk|cR=x}d)YrpySsBt>2%&T{MF#dEQbxotV;NKd&j*Z>p zt&^?OqZ3&NmL73@v)i7Q#$;Y>le>7x88SS&Z}hOTM>!KC)jrXNGc_NHixCsBmQ+1{roi3nM%V|0<5UXh5u3 zOMH8Fc79&JxIhnzv$HMle|+!n7Z>a5sg8m>WS2w0(o+5G?00y_|1Q+eYv;AP&U{A! zi=sY8y1{c)?>0OV+p3Tr9*5VLKXvTdbNKwJ{-tdAcKD({q5X`u^6-8F|@!3kPs zR&#DrdxiK<1_HEN(2c4?$mLY`cZf^fmxm7mO2qUn6f`b@=m`=hvKMic!zg0>Iz0Su zDX{|DlCq;DplHoqdo^7yW+<3+QH*M%Pl1FiUF(#aTZclibjgGox1@w_(~NQdV?Vm> zr*GHod`gqDb!P56rfL`IqtPv<2`&{ys+}i+?vv>0oI3mV88fqXsOXZW3=xGRT7I2) zVk8cQ7CKRR)?3boL&3^&#hHCuj!7b$B9s`mBM7J`H-T+O&$EjPkWyO=ebSAf!p-xf zKR{4lzWI zms%ck7zo^2-Y43);zwIdkpfByV@-b{Zur&fok}TFI>|!YA5>yNi_z55OHKuuuF9#Q zIM(S*szUwbV(vd)3&I&|_7m*ueu{71pTMy0&%mjsNSrLUdvbDgQa*zTWE3Dv3s}?+ z`V8Q%;T*zJha_30CIwrzbb!`#;bpT|_)f7{ObCc#P!dNg4it^X;P*vUO)}Ujc9$qsf!1E+ys#UvTZpb921mIWuNGtFo{b3sY#2(uaK zu+tK#9r02xY`1NPxx8ECwebOb&+cVxl;T^V-cKbCk`?#)7u7hD~T1m^Hte#{} zy6l?~EHeTzVMU&@ERB_!`b4;-l97l@3P6_jX>$_v&64CtN;pA>0s9K7i;V#~Mv+od zyY^#(C=7iKToA^>QGVvi;%lA*24}4Rc`23PfC@^u5cVrK=_D1rRQ+c%U2tLkEySI4tE1gLn|h_yM>UNmZjf zuTU)OOJYb(QdjmUU_3jwU3O>$=ri@VaflI~(2b|>=$B+xveGb+OTjK`Dtg$ZnMKli zEwHoy0;#_^Ry-=M06~;e3w2#TB||2LsB-_%5XE0p zEpCTvQ|sBQxV!%vR&vREiGmmXS@5oa<2pM#*uS`Fyb@(6e%cp{h*V0Zo#e(<+Lbz~ zp}hU&hV%u%E*S>_g$H_StRrqyj17{4I4zKaHjDzo3I0#P3ReEMDP+> zDge}*3}JvTCiIqX4aQn25-z-WCaj!AhmzJfNni))IZsJmJK_jv^{d7XTc)F&;{&S4 zn5fPYh=8#N=27yEc&#k`cY6W@qji}W(REuuSTi2z$}=Kj8J%~bA75mDD)sQ}Y!&GN zjHgTi-+_Uu{M-)cu4Uj~XX9w*x*?uAXqsCxg>Kd|BW0*9Xf;YQ(UH;K&PX!t+}^vNfYqR`>$ ziYoDJ4GTP5bKXB&vw&F7`*`u>0bOt1xEuaat7u1-yTXVA{qY^1iyZiBeCK@~a`c1I z_oFtGP>RNn(mRDX!IeZ6>Ur(rV(}cd%(=p#Mf0s#nt8`e1J9uBz0?QlA3yufT!;y1 zI3o-4wY#9-jU5gI-97X=esfC`shX{dyqpbRE{!r!pZ1Z8oqq1*5itK=iLw_4TPuuL(6ko@z%bpJgu^ zMMD@)#NojvK`?sf?|ga2TfNna5v}>hxOFA)*Q4&$M!i9^-`mueUrE!HelK;6)H5ozc;Qt+gxCFue8yDC)8Y8p8pxQ?N$gga^G%`R(cDO2 z3^q!J=XXO#r*2)mmDO~4uM&6WDu*nLM|uV?Rjf-6UHHqMY=HC`7^aCE!bBr@H5VQMgt zQ35CyM_N&ghF&91(MWVkr#+Dh=orzDGgdwR3Q}ZSX~FKt?dFaHw-etr(V*PonvlsG z!!w{DSk$@>;mZdgh)8nH?MDx3ZnoK)sgY^6mSvoTg*R;-E-^-E!9!YDKmh!1G?Dnr zC?P2nZma_lvvQua(kP~?a|%S?*3eUoSw&u#>duyXw^h;X-4f!{IJ;Fr{VI6f-fbbH zLX{#csZvFrqi&Cj8aJ9rm7L<{BsJa@`=>km&F!PZUw04pb`Q6A&&ohFD;Mk+5(`;E zsqZPav`&MDP-GSyjO@rE3;H3cz0`F81w#M`dxzT^ii)6?3y34cP+h;>j*Vv&zV+;8 zO!RS`8C1IqVcdnoXe9TA8i~^(pRWq!bTr<*YMi302gZd2N{AE7Aq3#f&fZBwp!zmw zvttMa9gkJ@0cXl)KM|y&WV_dvDJd@H$k3-mbwtG?1AZR_^og0~OewT)yHTDm((ZJ5f;w%urxiM#;Mrwlv~Y-XDXi zir#AXQw2LWUBEl?VKf+q{wP2@5B4%R001g4VbX0TiH(nOol)YC^pwKsZrZ5Aq7XW! zxz-76=`3dfudHJVpy;470=uXfBQ25Bi1F_tV=Rr6O~A>R$*lV6pI>m!_j@M#%_4fB=#PtnCw6ylM+cUFmwz17D}XCBgx+6pGS$5kE?{HmlmNs zo(g4yD~ zI7Ct61(~YdNn5py_h?hjK$N7E2M56PBS$=v6!!hr2@F!99w%a!ILQVOjtjH&Ic>{} zN~2rM?46>t%*|dX9sIP87NDM^9Q_(HtpGBFZ=}qUFn=3qHk0)Yy0EKo>v z&?syFSw{i}siJgR&TctycG5)^`gE4qUQ#7uY9s;#aSb>4N%5CTZZ#Q7!L7zI60)i# zL$Zi;oR-P;RD0=o4w?0|dx?-A+vg;+Fe;@|g;^@o_hj(jU-7C8l^Ym`6H}kHx)G2y zOv5&2wGmT3PRfA<7d*pVGO^BlxwGlxf~yX*2&j^JP#i>rXbZe6j*HHm?AK*yXp z4tfI!M<#G+Y`Fyl9Xc`)hRQ$M_nEavIto~Dd#V4Ng!6(~V2=?Ku>2~iul`9wKKQ`Ha ztISf2hVT|6$`RKATug9l?EYek(;me!Y7C)=$7DuL^T%=Qm=kagCAW|H&fh+Ppg!ol zT&gqD!*Y^>5@55j?S2%Y^21~jM}=gGovdk|iKbJ0ZOPnR$I`y;6jvITLHcEKYFT(& zqJc*;a-IetyT>8qeaxq$t{j_#&4SeZ73dYILr8lG|K#W~X%=Efi}_@cRh3lU0^=%G zxDqQbW23y3T2bkOL&L?P8uh0vfZfLAIasJv5>iR2MuLej*l*iZq_eS@7_sh1(zAeo zCwvQpXvUO+JH}k;`n#A2BB^>(N+~4>!a^Ni2&MvAimlpFUZ9NF<&ulkB(RoNSt5K*64Ww@C{F49&Pd;_swT=Np5&!SxzlixH`a$;|+1pET+~z>O9Mm^O;0 zPWg+eLqZagf*eM{@{E}5dXw#O!^FWo6E-Dm^)}_;tz7zGZ33IX;UqevO#HH@fN`Iz z^*#yrMb_*K4pEv7yx-NOXkC8#Df69LdM^;Axb7G0AoTv|g0cGu2uFq=&dov#NkA+T zrCb=vI`d*}3A4{2Pe7+)*vHrhaexWKdYsx6(~0)+{8g0*V~dP*!n=k|xRi2fk|@cM zDpc7;v8>JalsIO?DdHARoh-PmWhwJCi5Jb-+-7ATC_<5SMcytdP6jdnLsDcb?7W!U^g&vnz2onjVk_ZuVoRLQ;Yq(#LMd;g; z2z_%7p~s~V!W!QtfzUVR5Blo#K~i;m(A;`=dUUY$7mzP@Pa1nihh_P;DRy(nmf`2p$xo7?YBPIeDZQ}w3}T*;ZJy3S}GubBbMafe?8 zJSj@rLRuhYQF%couU;uu0{q-N+%x@2j&o9=~!i>hhl5rx3?pBr-`s15fvRafA z!lC0ZpQ<7(U2?IY)+JsrLfZF`Ac4D}=zf?y!t~uM9JUgPd4tkzuP2wCyQ=)f#_?RGi8Bk<-!iD=i#tod%14l)0R^sp;feM)1E_%IcobV zSm)IP?n)NeES(q2rsYb##PV#x0)o*N3yO@@7dX};2K$+3^)${8^orY%x6Q?ay+&j2 z@C}d=Zc_f|64d&yB2^yzFiDi9(%ap124DsS;^)Ya6cs+Jc)jr*|c zN8>)hAa?I5Nz> z&*3iT?T%4SU796Ba{0zyUa}Mjy$j9?N*vnibL)g*ba+x59FQX<$|RGwQ{2*a@>uh! zGa5rFt`Q#(?V*2*H<)@mN&^BX5?=Gn9rR9cT`Unt&MQm za?Ahu&th=fzO>AA4v?kT**gWMd~5$(6&q=mefj0f=ftuvRsUe$|6t$$@38N200gxw zo@H&b^5NFOZdK5U;pyj7bsLVLzr#loSv9spzDQ2W=2nyH##a&+perlV)<{QfUPcuK zrgvAC5wEvSp|5AfrFHE*pc`AKFySQN%bKsZ_8Ys>$YF+>+9igpvqQsry<<*J>Zjn;jx9TkTVF<=f=P@pxP%1~P6~FPGCCBA za?j`JGb43=nWD~86;1!H(eC(zSpPw+|AUFO6ze2E?31w#FiRNZ-pBlbS3#F!W%-no zyBlz{{Yw*4w*+O#3U-KAPJLp#F{DS80(sqV5NAYGZNEzL*H8*NMh{(OTUttig2vDx z-RYt6`U0TNLRHBolF#Onu%9UcH@bR_N+gx6?qNdQtndXuegOxHsOFBQc>gInlZ z40{x_&IVHW-rg3$s8vf^&Q@ip^H^Fm^@W)VL~$|(R5RN|OSs+R-NT*T!|lD@1|5DA z&N`AUgMeeFahQ0Hk*t%1#3oYKJ$o0ik;uG2(6}87+uMaI{QKbp{&}8{Xt($)Mw=qt%Gy!8v0cO&DWxd>jxeT4j|7!7a;^LQLu*;Zhf?Ln)xStw%AY0@4jOk;bf3mpzs z$Z8)xRPAbjT(eX|oU58@go5d6rR!E}6=O}8QUCyb?RF8HGuq7rV1G0KWJR(%UXjAA z6D82vY4Pa3OQDa71Sz8#yx?kmY65Fyhq5#6peyJ_DtPbK0k7A)U5m$}2)R9kgS8zO z=l20=Q?*`?(7YXKC+C<6B+$Df{Bn!24W)A>Mp_;Z7>taScNJZaV|lr!{4hK%p>ml0iod}egU7cwnOC>_z;;&O-L z^eOG$rFQ@im~3ATq}49lF{$o|of28~uss*Df8_d2dPg!4!h>2)ERi^#Mb$!NPueZb z1UaL!>CkOZ8U_qUYE+D})Trpmackf%VX7ysc1Gvk%R^0SA+PxQgI3s%jz~&eN3E;% zV>AgPaT9b0b~=%;?_(mJ7Ae~;tj5GlF|VgyN(MsOS><01D~Fxf+cqaFtOUZBX-Ayy z`J`<}AThe%2b>cGb5YY)kjx8mfC!KVtkyCyOol?o$#_WdR?U#vWQuy|!04&-nx~IJ zxQoNM0TalknltR%&Azn8F`>YdB!t4&xE7`x0sT_)*mA5_K+(YXYTm4hFbroI@x9-`I{J6EPYO5KUNvPW)yM8G3t= zTCvIje-*G;0U>25tnw||jKUFn?H~^}8FS92?zq<%FP21^+BvUO*&T_Y80&M=@ZLlb zCGt?4kcPu-VrV5Kzhbdan&{0dVDH(ZQ3h{iOUx1ZGBXv!ISPPNp=GKH8G>80Q9b`& zLBjYD%xlx&Rct!qO|f#Q*!1WsM$1<#WlulQ{bFJ02DTS4_?X@g&G1Jie(l!Y2P@Tu zthFwFLiDR^3eYmf&>=1@+TpH>HSttDvkd~t7_T(1eEbSjKOU8eVX1agC}D#0EU?(k zcSNr)otEQKF|6H`q(Q5cwyn3zwHtXqq@YL}Q}F_b!e=xOtv;}A=#7pAF^VuZPofRi zv`rh;eny)RIhqH-Kgmh%!5PMJWWU112KcJi;q9xuWX;atr~L@Y4^tm2wjsN)5w|z; zud8sHVD88;23cEqEduIcRgdddIY>cpUs4fW2zzj@Sf*_=&HzIR6gI^0*+Y!QgV%{k zyTQVpa^o`lsEPI{cmR?&mz7dL$4Su3&rujMqp+LMf=H?=Y}c3yHz;=y2PGgJz4Th_ z;CSgpC7mxJMixVgvxT-F-}K^98!a;x5S(eer~{Ha9`?zY*s$4+asPN2iS5Njv+=Y) zg;Mn^NNA+jrK4Ry514JgHJe->U=}HWxs*%2sn`5mb7M^JHr;I?&jR;p@iTCvyB|)y z=)tNF5Ge>y0s+yKJoD8lyfd|nq}4RUTXKuSga0Ct+kB$82A;6Oc8HaqbeUi{lm_wi zA**C-%RQ^zh~xm0*+BB^Pwd?kNX5@6pm@llKA>H%*O7ZQBO8eud?tixLL@IfnhrhI_yb23*&f<;YTU0T5Ro2;#B?N$5@m}jYOF4y@y$ghUk6Ex3@g%Q5z?d zC3#?of*6x+8dw~G1TW!y9g7ATT^Wmpvn9DfvQ<@b+F}XRJ2~ z>ab5QYD-hv=Gk1gT0Abf!?p-rnQi0~-7EP5o+e1!jMUJSFxMM zYu$3POqgr}Mkkdr85WyTACsf4+27sT**kpG+&MZ;-P5R=;!H9x(psb0jz$mA*SK(D zCn=WW*BY7R@RKgHT61INR+Cw`%|v)=sZ^>pmDxC>2%LulvT_1h0Fcfbg*|CagR84u zrZa0QYx-e8k*s1=16#`x++k77O6|BL%z|5n^cx9z(>700$0xBHq#=0)v(nh#YP{Vn zotNYtRs!Lv94^i59dWmx+mP-1pqvh1&$k21dcm3w1sZ*3zt82H>v~YX*o+B8Ldb}TpDXXO^(@S=r)&@P} zMDD?(f|rEn%lZ>IAb48_#mbU_)}#}R}IwiL1x zk(CP$o!wo4lqhy#VyK>MdBnmICR>!Hjl#F}x)h?^YitOQNPvq%adr@f6T^-w zw}Rn_by}#CgKoVVj}(7{sy&$w&KFnVHLM_+ZDvYG&#KaV8vcDzohUE;VW#(ou=F1< zEGYxm9+1JkLoy-GsB(66jM|gN#q8GC$#aH7 zL-It)9uNbsJg;@oP{meZ96U0nA+HmxTOJGp?Hl5u(?_LhE`&K0+u(+Rn*qjQ$S-b3 zc`IorZ*|FhOYu25g(NJHbmFG6Y{9|~MrsSTWWdwp^e9s~W%58K5mcD^AM4vPIFb4> z@#1J^*ck;n=xQHBT4|9^#%Qw~R*~G$E4nJ?ezJd@nl)6y`zB^$X|rfvWBhQh8~J_w7QJuiexNYJc2NPZ#dEvUNR;% z#<-o3Y&ynp0t0;*-C}4)*byFE_OX%Mt^7qU*^G=~2c$U=6;^0NSPxcF*W8qt$AlCU zgL~}Wpq)H~>AR#`SP#8GlCP~;8PFQJmn7gf%9#}{xFy7E{@Fa;A`z%Gu_e2Ld|c9f zf3k?}@4e0#UR9C@K3|&e4*&bz(dq7vIfV*E`L%!tkyMt+6(LD0qq07^3Pt%9E2}(9 z{c-OK^SW4IbU)`gS2z04$A;jNhj%SaDz<>o{l-R~*`xt4UXVPTY#pcq2Tkd!N-xS= z+xth`Tl-aIzV7jTkQLzMp^{Mx2onk$Rej#&6hi7%)w-$Kfxq3|+SxtfnjGmnqaXs` zJA8dqrL!mOccLt42Y^3SG4dq@n_4y-Z!?~qp6nf`=9-E~fm;(t^1!4v;EjqcqvQANDyH2jLB<@@9bJmx8g(n1TuKe>PeHEC!Bg~Dc z-WSlquX{VYP;_^{VKutFoo%6{R5v;5L>yZ_DoH zVdeqkLCqNf6wew0HdwJPV9g~g=_H*4SL@f&y@Yp470*M8*fAcoeHFTWNjnX8m zkU=5o&CyCMR+u^|;_2@TPR+A#-9hcrl^oq&vB znYof;fMF#uiU`KJ<%>~NXfQQszCAknizt)QM*7}WWTz1V>IIP_7zT+MQd$}k6siAl zRbGZ5`>6(iFeqiYH2}6jcW-2JI(ES!bGM`3fZ{AHmvBbg!5v-AaF3d@d4SjiLP#yi zSbfVJvlbuA%m(RdXePoMN46An3NzXjF^y7jd40j8L3S?yjOCCFKfQc;FRZ<5VsTJ`dWpZXs< zmH#6;m2@b1vyZZ@gA(B__@FV{X|wp*{O}5PEEM_Ni*E`KmNa9ESH3aK=8Sw>V%H_;j^iheL0Ug?j&FarcmtzU+03?=X4HQUE{pQ)8hRqe`;h20GHA9INu~m`nR~N*3*R zt$-=#z@i)wQYXueY_l+5;0NR_w#gDBi0b3+NE+V5;*zNvhCo0ZqUq#zB#@dC(^R8! zf^63_(qfTa7Y^fcw-5W5P6(v|kZx7`f&a;Uj&-Gv`g}@MI^L+Z0&`YfAw><{!(I>C;;=p2jRRp#26cZ1DIAg69*h;U)2uvW8Urr zTLRS_uS`Uil7%h8@&TM-9hbAaen;YI6t)I!*cBfOG;`#^~BQir%z#D z!4@o8SztKXr3sWz96nwAk(5PTyh>_Z;t+uxllnFqQa(|?jV9hzUgWT&mPDmR9_rXA z>K+qColmHM!wXbEHj)elC*vyzwd)$D%A_Hdp%`iE ztayAfO`+dv1%naod>uT{R}Mpr7A0POjO%^f5C0BRaS4RCrp;;GdNGU;&B9?ltT-?g z9X4fjgV^B3ekWK*OrW^pAgm%9bd}N~E3Z{bV6J0`!b-JJK^PRN}7{mmdZ4lWIjzW@QcnE1?x(&m{ATHP} zpc9)^@=^;*^3nao1JUwznO&X`rb!_v119iZiaV;~Au`-g8A>#B*7-+R*6a?*` z{{yLp>$<2NG43xxFi<_atd&fd2r{pXMX^jxH3t=m@f^~|_8L=FC^bVnz~lH<<~+cA zY!wA;IL5nw+(2AS*szPVJupl^zhsL8^Hc_ZG7)~QIKf!He5rDOmQ1A*&Ol}(#6I{$ z`lXxU9a16OrzYM$r_+QZ0+VEsClYGeWI~8|eC5GG-0jw=$FhyhlC?0RW<^|{7e{?@ z7~G8-qhLVzbp$Qqk1Ef-+;S?6l!}NW9rM&4qz%h>!vS^(H$zk}VU87Y0g>TQC=-Jn z-b`*T#&XMG*uNtCWfesak$}xe)zoNTD~h>*CqE$5z`-bXXR`gVfFEt+{PUGUv27fl z5GbyS#ih~uDz+XoYpIipP~B$dtlsE*kB*bQqV801G$eYJlFcVfO|5d)B`l1olx=n@ z%bUxPw?TJ+c~4~SFg6C4+g*7hWjf`2)#b<^tm_}F>wh@wnhpkVuyy!me^*&rP6?cx za{qT~)1k^y0qA%0qPNz(8u%k1^6{u#gxz*__PY+o*t{UyZnN7HX5Q2KVoA3RAlZ^E zU@cBqA2VMeW2AQPWk^%@>87xvovwc^O=Hpfav<}qxI;8OQnu;RurfV+WKdQW%Q+)z zl;z(U9f7cvtik7OJb*>_;sDt_+<+=^y(aVW$eJ()?TrZ=XLoD+t&HM8^`yys+Th+4 zskp0UOmz7V;OT1*Dgp@ja(Hy=k>&4f!*#~JOZnyl2@f|6w;&V9Q9}~GqndEXt@~%( z3ZQcS%8>(tK(7NeOy_E_XSq?!cnusxHt2r}hf$vxKJ1|1m!Z2eb?@5g@(&5j-fcILOx>kx=wmyTNJ{2jXDbzF?#5(t^j{R(uuu1_PZr}Yh;L}iM7NB_Z1^V= ze-7=Hq)y=yXh=!NhbHMoT5R(*ajP3$UCE85LMl@!PMo0K4gp0D#`22X+n1qTWS`tD zklJ;er2Y852aNB>4Zc%m!>SnFG*E~Rhi!3b4(xdv6XJ}lOC2c(*R=;cMJ7as8-+{~#{AF^p-H@WUHR^LIU??tQF#gIhdX zxS$)_4~1kHOPH;8*v7d=AAKDS(rS8Y%a{6+R&cPvPI9f&eW4Wa(*PGt><$yy&#LZ@ zKLt#W)r@uzHmjtg6od#h1Ik5Jre~mxi+$0Jb?^tjFLi z=TCeid>M(o4-Hbd6$3#x1C%B7V-p9*+GnZ`LXuPkbz$edIYu9cmgB-4yqBUJJafqp@9~0^YyBa!nGG)rk|b1Jq)0C}iN9r$|QfrNd*aR}HvuYBgWl!an%4c?+# zsPKm4L(vVd`oYLst}WG8d@q6}R52#5$CxAAegE8f`2+--X#nO>Dc~(V^;Vt&`C4Cj zvA*`Qwxm8{aS7f(SzKJ4*boAF>MgB$OE1LI>iW~w^_6E1kYxb!%P+!Pu09uw%hly2 z@yjny#QYCJCYpfnVrw+QID&{PJTxCkVAKy=K<6bNg7&DjCm!BHrPLg7&c0lQ|JUIE zr=;?DHjTOP=J^6R3l{vlO8>6WzY=0b{3-_VjX{6447gds8s5@#Z~0{j-U!<{`72o; z48VxljlP-n5szhkR2vc?azca$E6Y_lRu@;+s;es!7qkS*6iAvRIZ-{;4NH}VjTiRH zJXbMxs)y2TTh0i=<00$Abu76MB8vg5HR+`$OajsDz07_HjUU6fUPYrD=#TjEiog8Q zy1(v^;~J2fp9n2aQJnQ-i=|`0)&fdJ-s{F|B)#<;kg4m}?K;4z!xp2X^9XP;eLu}y?uy-RCvw`+d zxK^Fk1E;Eo@q5~0o6-#IN60sfF!hp{*ElNI%;$|9Pu@Qzd( z1-4ok?xSkirjJYr2@coW7o5k0^Aqva=Sb=!mh7Bq1jTx}Y&C;FQI8Y!9fDp1+$ zudMJqa-=cxlz>gR@~nzcteS5!$EdzyFnv)*PN~k(FsSzxB0?TAiCvYuQE6C+2fo6H zHh#O!>>l-tvqBAIEU0#y71A+6DI?#H`W-0y5p_&7S)<_?1Y=YjU=*Q>qI>yWW@VPu zaiUSZK*vE|a>5{2YYX*i6{8?OSsbGW1e}qW2N=Gsi{g@y5y>v_{SjLgjBbL&hPOj6 z%a+eCi@kvE{E_RC;?dC{kTodJ86~;!ZmPobFh82UktJl|`NHQ?gMo`r6-HPAiLS?* zH&uZ`L_jaPXo1ApD_fFOy8u2_EgKH2#ZOLL8>iNj#gl+zj*YK50o*K`w15>QRGL?$ z*A5F%F6z^RFyI!VVBGHw*{Vo@3K!Ampg$ zMpfBhJknaYWch`3&w7DL%r2WRE*Eh`1@Y6LS4?s2`EphS5T_A4xQ7ufU>QM_STd4? z)i?!MMU9Tux4W%#!zyMQ#k(!>vl3;7TYf4PWpr2CeD!W`e+MU4C)=_U=*a`9CJuG# zV<{ve@$%WmPS(RL&mk#}Bw1ziI-DWaEwx~~`ItJ0EvIBaU^Z-ngFG7g!+RA1hHS}{ zIuTHv%&im?iu;!`OIKyYZR!XHWuYv?l=#b+VI}E01F0d&haDdfL+iiZ!T|?@3Ld=o zRdH$0NJ(oxu5>!lw?~ar%vfEcxQ-(kXPAtl)GN*}Ms`YUL&*JW2ZJHVl$_y-wz2Ba z2)3aK`@=z_al-oXfPy7UJ%P6Q83iQFK0)7rW~v{$;4|?Vr)KlA%%;6d&!1zDdLI!{(0I)I8*B%zRBv5>piiMZyW zI*>TvL_nz|X$~~f(8jl0v}lDi=9Px4zO~H^&SAtO?w^9BNSC0Mpb+Jo*tQDm>=%samZVN{dX+-3B_%>NWt*939rA zOlnb5;MR+mqV@8nJn-f?$YfC^%}e&GmC6MsbizcU&2|rAbghCuL#RY2q%TOX>5C%R zcLir`t{tK;w(!dyqnbY#%l5SP6(MuvGrz1?spT;!)1pkn;77|M&2he$=WB z$D?Zusui@y;zfOBt^RVYMwbmaWsu$TmR@)(Yn3OoM#?s`UIRG}wKLSI-1QN27`bz^ zi2tsuI)tpm>f+-kc)bO~euuVF&4aD&w|j@XNJ40|UN1o&zI;iPl=%V`fRo+*-K~ZN zV3-F$l~e#ce%$!2ak_h8>c@HYWkFSaaklEY_2p9;1k(Wcl-Is0sR2Ckm~UVzueP7s zOY~Qf3C&b^h;PUytjm!5$UTJDeUfZoFMBMDAsx5^Mw;XiW&9u9wYp<8uSRtUmnjrK zJFD}st{(7c&2KsT=7Ai}LqT)B3+so$2(Wp5VSNFR6qrE%Ez13?xLuK9BV%RI!P|1&&b#}s?PeClEsY=!x`E8~5@EVFsKr@KSv|yJg}TK7 z_W2XVA|wY1cn6{m*FiD`htE~m#lX0%tD!sW81wj;?6)McaGTOuAg@V$&I>@8B9}p> z?li#(@G@BkcIGP;y3V4yxZ}0Ti`g@d7A>!G@PZ{I1#dy3G+wmN0bAM{bvFzA7mxaz z+gcA;Mqt;P{;+ieGS-}fbj>Xg?qCDeVTS<%`=xQEW=*?}32Cl;i0O?C(qip*sq zI<+Zrm*D!tUT}pNNFCjzpPtHXy0KwOEjWeJMdF*)pliy+H{I+qS9Y0n5v!TZuDdl@ zz?oy+m(-~MiZob6V7)3O`jogrXi}BFx@c>mu$_P~#_R1sH{R04fl#3{M*UOmF>|}{ zC0u>+>`U+2i;rLW@#@OQFE9rSUt++;)|XHI9ny?$e}o? zB#;bjXsAf@^k^rz3Vphtu1m5Y(JWThKqiPO-coj1EbL3nxEaS)85o!}@_<^Xq6~pD z1ErI9mR0tIlgTNuG*$i>4Ew;ZDvgGvccFV?a`vMchc&~y`L>Mg#pHM#N?8swf~$D0 zD)LM>?2qp})Uu_J(mkhW)_4wR66fUHY?iQgDLu=&04qzA$Ke-~VCl?jUep%q=QYY8 zmt2ZQhzPcQ{H}TW+wrb#3V1zseJDe9Ui>m=O}(CewO2ZK(d`s z6#2dOv$b_}p|VbWf^+xcS@YSNqETK1MF2sQla~cCy!JC8BIWoBc*9mUv~U0i>Eq$G z{85|<&^iichjueqU0V8%qwN9<`r^gM1Vnrzp}zPUsDKd9Qb50@n*eYy$X=HL5Rl=Z z^%XEb^@8u*OMsZ3%x{`VfcV`9KIr*(-xbB<>o6bQ)mOk9_gBB;vfN$|!}$Ad>V-^b zNy+GI;07N*Ml-|3!jIWM2jMUqi!3zig~J)UngK1hr!zn$&cyEyZh)FMUN0-Ste|r0 z@v*$HR$HRuHlY!QiU~B*Q?N(E<6!tW#k<&!VRGG{T{mvot2?fM?xwdd# zQ8!4@5cBMwFJsQiFQz+|tmZaoac+g(U)Mx=WqIk@TBTs&i&8EXsJ(&_qp(8l>Eo*G zZ*R#)p4IW+7c)0S4J}V>DERa=QK$Ay*4mm}?O9&EKhJ9~Wv$6=Jy&fRY9@~RwZ4(V(4vP8723vhT~NVaQw60skSckaU$PSh zT^SrKQRzdn5+)qh^)MX7Fr?TfU34yi=bwTu*Illy2nq~SfNuqou$BI}_QaDsIZl8F zBD)vGoow;VN&o%(*{`P`E;s>r&I$M!V8;>~JRS{2Y3tSY&hG0sZ}-!JC{ZC1h{HsGtma@7x*pwBEvjox`F1KJ2%n z+qijns#UHaf}`LKWF60H5UNYD*rULwcVg&|Zj`485_&Sn3tQs&sIm8fywT`z`I!Y) z*3x1o5i$~U)%dg?l-Q26pKJyMXU5o$F-mZh5fB+BL1WZ;vi9lztfePfDd1Z|?kOyB zf|VfpZH;&R>C*aY<%vkH^ljMhk5+3>(-5{$v|Lz!cewYV$$GKouj{~d;KX?rN7}mT zVYu;6Yngm1zfr&ewr9jvTl?)X|KWmVHBE|dQe}02Etn2xnh7+I9Zf-%jNaLne}SOS zj-rdRMtm_F%SXM5;w;Yb?4WlM4F@-m1K7hV*#M6k_0^Y44w!KD`H~mP(FSZglwEag zX~~j%^>iuuieSWRXa$|(R)@XylfB0F!uoRUY-xGr0>FI1hbVA_ch*ybcOdoqz#8^F zE|Xe>B%;WBKEDfm1*hMe1#$?3U|%CCQhc?!_72 z?)syVxtWwA4)@w3Et z#dmTs@Zo~}ROEEz({RlJNws%Q8b3e7Rf9p^5xIG0){L~@UfAk-{kvyrbk=p5W+Am& zSy+E=1Sw|3^{uY(2A76aCg2s3YUsH(I$1J&fi11CyoxSn9Ud)lj zR;Fu2f3ICEsPoj_Y}n3%-433TetQsgg9W#FVK)!ezNUG5S;%o==|y$r86eAxmFgNJ zi&9mn*6p^5)>6~seiY|!a(faHUtqb2bmJ5zFT1gq%YPH~VAQJjqER~`hf>UwVYvvn zTwSd^l-#WW@OT5I2o8BX-;qs?+v2Jgt}Y2-@FMQg60C6Od-wj8jE?ah!ADc{rCvOPoMp%K7H#eWc zp^P1I9Q;Q6*nU# zk;EaguF}=KfFmoA>zXK_Su_1sP^1fK7a0ZGDM~IW^k7F8L>W7WCeHK|+j`Ar*&0Bi z>B8wzqafM=jFd7M%6EDObXW#!DzHZY`4uqJY8imx?W3uHHWOe6JOEDm8@3;%2~t4N zmNLR=f}%ZXbt`A}ECBWlAw#xFZkm7p+a0 z>i)tET~F=R%s!hDCiu#Z--S)!wrw6-t(%A6dD`+x56#=eO^#kUiO#D>cGuOjNj;}B zkDI(3za7MG>*|r+x_UOLbt?17rE}NJZF6#KM%(>}_ORwU639`|&%ixeEctrk+7oOk zw7BrZoFmXo21(4$8ZpLet1qg{FEp?7>(&PlhWAfT_C72)fIs_VO$N@hdK==I6seAsCR9noyI23=rQ;D3B3of>~cZ-}UN^OF$u1v+Sn)$5c= zFFuM$>%LHjR!o0YAFHyD*u}Gp3U+c{nv2XfIIg(C75nY5gVLO_qGwOGCQdCGN9)Hp z=ew^e$9tNlQs_4sR)FPEA@+EAO@x zi>z-dU@6bbXG`A8i-q$Fnr`5g#HE2W?73E%Msk7@8CILH90{`|WfEq9efY${UIlLb9`(DU!oBCCdl($DJp@%{@h z4F@n1`ZfW|A-b|P--19y8{O&`YC-P%Ktb-O_I6S$BGC%LYND8(Nn>qLD95Me$>%St z%TED=U#{9TcI($LJUU!&Uytu3T=kh3J8$amKIp(%T#~2)+MuCy7UF#zg{0QCcqNZd zj<$CjjiZyz4EbNF{m4T9OkK6=Dj**AS}$HKFD(&n=Db~A5*JGE;>|Ij&!<}_Z+1_c zul5eNPJV0d9iHxk3+p>kcK{Nd+u1X=7q#W}l?rVccqCS8E45{m6Zyw7`~dmqJGJGMhl02cF)}$ZF^@6=QD4d^VX&BOzBej z3|y895@-qgRpJQ@e}3@{$6;}p;e!20DCIURh3spZJcs_XH46&w6Yoywy&uJNFJ|wh zxxH5hu$sSG6hfA|H29+nB`qau8OXj z@;D@uRF^zb(mh4fBEx}Y@_G|(h_kC|?hQ7g#jD-Nb(Ys#oonFP&|zY34*9Hdh0%9q zt@;A6_vupgxl}gOpoyu$ADUyCz_M7($~0~xhuxUYZx~L)W)f$c5F+RZVUi~w~a1uS_37#hGpx+9NY5Wv@TZ$5hyMT zwkpc*Fre#a)8>QfcZqvm%AaYhM6MG&d$e?XqUbl0gW4^` zHt3l`Ygx485rjsqIujZ-j4T?HWWiRR^5~wc(Gl&u>J3N0iLR0AlLc~)G- zZ77?@ItH_l3B)}kq@@<0N7BBYZ0ElLjDnHT+mr9u@ z>$)N80032_{MAuI9!50p&z>X8yZ97X-xp8y%(H2;nt4(TyaXJrpRKN4!08U)p!@49 z&J_>qcm}!4pa497fgs)hjORS;V);yaQP^O()@;-A(ADRlzDvF$+9X_Bj-kllS81v*l;cUtT~(RY6|+ChENS zIj1*Ve90IRad&XeNW!Fl=sG7w8?J*9`Nm%uE&~C?t!8U5ZmN(bm#OlNZK7;)&nND& zvM>-JvZqKBlRafaWRD5p%TF6KKvYZU_SN!SOn;uPteQzK$Z11ED#5-L$6HO*KP@+x z@*%uPL0Ha$u$&8Fb)}O1#(}Vs-v?*t)}&4xI)1Qar|&DZrG7#4q}iWmYw1e2()bLK zrBq74FEBNl7qnl+@=|SO!f2eU>a3Sfw67H5FAQ8Z$Ty>fB=+WWi}+S?jBY#Gy1!(f z=2=-LnnZgVNAFIycT;6--5`bw14c8q$haRuDJqgIWORU)0UZopK%)PhJIV;(rzgu;Lm1ka)o2rsKH`zVSsR8MtvE;Udl-0ogo7lSd3 zq^vh|MFt*7jUc1;a-#O~BWlAQUH_Jqn6t-^tC22|F$3HU5FhQ1)27VtIoDZTN!IC4 zssqFD$K6q~&ZH_2Id4d>O)Byq@+OD0MM5vR#HE7Bp&tGYL{F9|*rjnaOdXjQA!_M;181Z(cACN> zfi+Y=p^TdcIVlP;quLlnC8WD!o#`-(0GknEtQa@!2YPwu5pJw!yoL9VpRJL*aNcz9 z3a=uxo3JeI_z6=-;*yK>%Jx{!C`|8UxF_(4J3B2Eef7R)R636Ni=@6d1e5T}Bd(+Ky zSM&(Q%U53WWUF25*aVKH=54T&zW!D0zmk?LF$yFBkOS-&a&DGatIMlm@%hrz>hd!! zjVYnPs-UGVN#>;BmBzk>mp}i!uzqm7TMyM0?*hnnOZKyb6)FMi4T3P^*5zh^BT_zL zXbdorgVE0tU0X(IQQS#S5LW%!@-It|C|S+uWi78XdbZ#^OXx<}W$ZpyCP9{dgm(XA zf5Eu3-214MCA3OwATzJLgk@S=(IIp3v%R*kz8&>H1$V4hhv{k2PxBOun4z}TJTAa% z=bS-iz}qKVzb$<54#;BIG9bAF0lzi$@1d(dhJ8KlwNV_$=R0oKNoBuZcRmM{wFng4z=uN5pHeayevVVSMZj#WUjKX*nK_U zg`=MDz){yXO5Xs(x|f=Lo=zKy^%}ignq|GF6q|9qH0F6LiEbe5m1&4ak6y28>u2S$ zVLL)Vfp`A}9N{}OMA%ffF#~qEp`{dOzW4VFx5srp2+cID?y3&j?kK^hr*kAuhVKK+)AmuL-W#}vHvqo>$r;JuTiSsoIa^x3NUsV2dHpP@U}@SH9XJAmF^XZ%-?=f+;~ zvo(kZ^9$fT6cYAn1@jtb^kGIIdFKPH>GGs)Mr}f8mvuYiyTK*yEm)5FD*RQJm-ySUy(9+AEu|l6W@ur3D{g`GelB)sZ)Dx}(DK22p zLe?mp!D$1>nCO`8exTU7OlTS8I0H~Fi#QdgV3;!B-sBN0plGWOfMmG< z``5RtD;c}N8LDSlfau|^uIRRor#3XeR#ND92Rlc4{VuHIZIk6n`IOs|uC^0Ke_kWB zNJ9sJPcNVa<&OLEDecbG;}@Ba(Hh(ICUf#WX847M33q3Jd>r&g;kftD^@H9U0Y4Z= zJBSwI$^xLity=PXBx=-oe_|jQ2Fbc)aU0K0vJaIcM22=jYuFJ7}ET zKSWvvSy(BJ2fBgYHwHf^m&j;f7!0x<`_eGJ(ZNsB$~TAa9Aa>pIVA>KwO(5&V%`hg zkL&(;S{HPsCmbD*^Y1YFs7adI@R?V?_{O$Vrw_*W)3U}q=M>SgV+ethEX2*Dol2h-6Ag3IqOwW6!^Xe_g8@GdgoTHN&XA_&1MDf43dxChZ)c0BY+AmZ<;2gwm+k(SJ_Ry z%4q6Ux~W%oQ&vOxh<@_DmHxulNi?gMse6sA`y+MJ@jF7)Zp3#WPQrr+%B**1g5&ek z^imfrowf|7E|)un(%*Z*pRFZ-{|gpfHS#Z6b{^sXPYaK+=+YD;8PIS7p#T7xv`~Vu z;)qTF!m;KYARHq>dC}B=N3#QpJ5vYD10F<%C6kfJeiU`I>#Rd53~8n#DeV6G6s>UF z;7UqEs0^u~(6dTjp=YYp@%9!L%P2)ry6j@lrx)A(^;vGm>_X4;I`-_jRqDk;W{Vi< z%CWeSRyNVqUjfYq!t(~h@RL6ZJdERpMvF2Bq{6svyB0^aW%o|iB=`Io?Q)jnb&A;E zd$qk;K(1t&QW~Kt06)W@6Kv2^2vYov^|In+`V>D>BMRL>4HB3$FZQG8Be~a}wlu9mq+i8P;ArD`53YY)pdLx(b$m48}~W?i;apZbARW%HM!lW+>|mrbVGd1?a&CL`gy%$3bV@m9(fP#G6)2-1>b^ zgv+T9uE!xTI#Zvk#BK;`H|83`1U4{s!l_$bt*xOK|`~I=_$G$s@#GJQN~;#n2{kBxxHD@1)g|1 zyucIBi7)WP`~1YyQ4lEU2A-`tIKZD`r~7VH0I10enqL8@FPj9~RmuC@^d&%xBA9DP{^(vfO2)}+b2(lJh*s>mrrD7!EmVkMQMV&IQ% zC?St%1S7G(-Q3#W-`vJVf_{vN<^We%2^@=F5MxSCOqeNl``4JN8><3k(3`#~GZt-L zLjUU<2B3Rx$^Qm}q2#%>;tqo48~%9H~^+ z3X2E5hI7qyXx4);4X422dB1{4akX4Zm7q~G_L7N4vYR?O@K+L#Z&CJW!_Q9OQ^*7I za+pgH66~CM@&=_l`3yI=ejxlMrl-3O+7KirD3ZO`KGP5>}i>~W*oiKEMJAl zvVHZW1-S==adaovYD?-7O}t|c0<4-b$f>3 zFcBFNK){yqfD>xVq-6c59mvZu&Yl+E$L!k(h1AQMWo@9_Twk*_k&o1s(IPm?GSVre zwPksmO;@nhW*V5La2XKocUd|&64uhA{Dw7QR8K6+Bi4lKXRnJL<{%FKHim;W5l7jz z6u;QW~9HTR-Wv4SQ-u1&f%302V#ep`*H+axT9ntvpWKCxd zzM(|PaFpNbSmZVsPW=wYC>`+e2$SbwAVZwTm0GQ4m)#S7j|lW2io+2SX`g;)e?i z82N~iPVJP1rvHz$XYFbmN%nL26}p63z*t5P+ZfMeW(Xk(cfw;a$z~2=64@3;gDrU^ z+2B3d|GxF;R<|BDu)|5LR;#P}T~*y(U6r9I-ppRIJ#g0Bb<`f&@eLlY-;)zZVU>{l zp0ZlhW}Wx+j!r&PSLEFsGBqa$7<~X<(787WPb&)?C64J&Do?+mc%LtOrc3spdzWYD zk8h|XX*6Ae3N-|x1z|}RV=@i!=vk#qxNKWy5u)z5Bd3KH=b}~W>vB90 z0Xj1anl5WkZBEy!=Cm@9yIP%+6y#3MH^iyG zv{Z2#%~7n+S*k#>s%WS}bCNABiY)6}n7w0~AXOF(o&)qB%}&C~nfUaK$^goALM1_U z8%~~d*1E0k)n4aXHzutalKL!};QAjYZ0&VjGc8?fcG|UV)<@5u83gb}T`sQ)1)b`o zty0q3_u8Qk!etZ|&mw}hOe{C9S5NGU)-32OJdxsMO{dJ3o5G4mG^MSV-9f*BjixMS zXhT_E812L^t(^peZjsr zG=+>t?G@g5-o}mC7nLwU$HHDO+)^x$i=_xQds^wM~_u*#3T2lGXwxX6)NlU(-TArnQ@lAHY-YlqNCYw(nWHAh$2vCJ zv61F|q=T&K*jpHhcjFuVh2bU147EFnr8aW>wZI6oBh$QU8fqbqyVxmRw`2wkQNS0s zWZ$OQ*+VO?wzcP?sX@B;_>yc>2RAXaz`ABd#j-8F78Z}BtX<{|C#dOD>t48@u3GKA zYb9Dw$lx#;Lu6Xn0vgz|CwWu0Mf_z`kWh|atnM2V5w#j_(H8D7@cQPkQbj9Yw2pMS z!PGZ4@Fw1;b|+geZL(=%X`K>_vzd2tKoxd{?U@?6VQ?F0Axgy6Yq{8Fr)8-K(JU_M zu~x$$JOQbQ-7RFr{z{hRjrJ~oJ7^YS-t?S&#QS%Jh`p9&*YqkFFV1>IJvTS?mPGdh zjTkt|kjND@nn>2rSl87b#&yl$Utx)qev~y*RGv_%zR`efSytU?;)vaM>W;F>l<$UG zMSJOnGIQ1~t5)eb3XYXfe{y^v5jVp@%*&mMk-|%3q&nN?-tjeui2z^CW_*7U_l}^?kUsqA{_D-%|A6@sd{fk^*qv_t^(63$* zl&W-b0(254ofoEv&CK5~BxFe#D2G=0f*^G7Sc5Yv;flPd@)luVDB2k z&i}mxCJjh_x(M)8YS=hwy!K*Xw!aPrCtfga9O8*f(s+0FNwc$~wCiV72H93ixOd5e zSgrf^^0UyFc#Cc(-ubaN9vbicdmqYji;rLN!pX#o@BFj@lFZNS!w#<~kN~1wt_L1% zF3BUsB#pgvmgMaL|6-WKKPTJ~F8i^uZ5MBpx20G> zlnb;&(5=b7s0r1Yi>A89_q&{4RG-klPio!Mqkr{Gs8_o@RibcVVxlOi@W*t4eCnw= zVr)%!-juT|AWnZne~?+EGG63HB$WrgFQo%4YL{VFt%1daEDvo{pO=T{(plC2G&!?N zu77ie<}b^ZXK2Nxaq6bm{_E(W``TBgi7}ix%!L&=W=%W86K_Z|{cFE&oSz?(C)`Gn zy7ztfSLLbhwGTr4%8cMUo{!;UFpk1ix$v-GmJzU^Rr%18!T{9DM~qsTh>JtjsC%Ey zX1Dk8{OCe6FT-s9p~>TKHud9**;s|DwG373*{IsfP_>_jia0p%$XjokM8id;jxx7> zERsCsa%UyF(t`K-c;9&OeULd0;eELZ-)^-|rbeu+!K*zoOd{%5P9{Dq-%ZPs$_fmr zP){j7uAIX(l4P;g{pacDE_zLbr4uaV_OElBy_z9=Wxrlm4lX2P=VnTOFWVK;+Q8+F zko-Qz6zf>l9@Z*a>N==}`B(Ua@x^rnQKqoh4#NuI%jr*h7v?YB)3Z}Nq7Y`ya-%3r zVl(x^p+7Ohq-1oWssN`^*h`~najFnEAcF9h8Ac%*5#JZx^N_hcQX_885X9rWivx3^MmP( zT&jo*l?{W32Aw+b<^^f9aCeD4CV^$J&~<$t1RTh4F^gy75U-INtRg=eq^>?lu?~fO zH7<%~$3OpFA*&p>rS0x1wog^V!4T`2cHWihbU3xu(g_AdVq2B4N2f=hS3&xrUoo71 z>p^~$uVV=^@Y{z{6nc+o>T!ik&;bz^&8aBb=ifeT1?Fe6!{Atk>VFP>upk71fXO>+-WyJiv1oe!)hnavN-9}Z z_-4Z`7Kh-uPcWpRviJ8btNjSN*bk#hlv+POtsw=JY#TjTF=QS=l)s#8R&uM2Zz4%Mm`3Aq zlw?Y5!X>Ma6Di6M=Rq8WAn~RRIrTan+U{&xPQ9tTdoicL{S+Mi%q>2KQWI)4^OHo+ zKr#lV%>QsC0pGB?$WWGnp(*T3^6^S{1nR~ZJ>pIx=)?f}Xd?|KAb)z3X`K|=ZoFX3 zVr|Bg)^^CwNI`lv7SW8<`-ErThesZ?K2&v7V5?BTYmvMD;ShnI`e#@$Vf7Tcg|5 z=mR{o4m1v)xdZB-xJ>4hwdj5oMgAGbNE8oIC7S%}&V!-P%8xuE_Yp=6zfYx?OF6#)s6kC)U^Lj4$M__tv5oB#A6F2gI2q`};$tS=u=;uLlpGt7D0=QLg zn0Go{;ZtRn^sQ9N?9w%+1*;THy)()U+E`!|}{025KlsL^A6azV2zC)=bk}4gA8fEZejk z)7mpEt7|vAj@7W_pRr@v7A$Iac2;D9C|aiFnpVfK+-}S5I_(k)@_|V_GFuJ&pELx3 zs{MzAZWc3Tg#HMI9E1#FSV!S)6UpBs^|u>#17Qt-o-Sgd)LVz!D8SiuW8Z=QF8pu8 z|5hDi+XkA)GkVcYN}Ky{qglw=)Q#hC(7={|dO;d2u9fn3C@+_OoAfJkr{6vL?a=Rj zol)Q>S{;9F`gQ2nrQhbGMF!@rMjk?#R@-!%oAAZJ``N%2>E1Oww}3mLI5-G^DQ?qx zmD$k2hYxI)N@UYuP*imCfo~3cuT7K9|;WHuT>_6bV_y|a^}94f>#@IuMy zD3QR^Fi@t*t}F$U>3C5p3IaET|1KOq&c5&q_fiNGva7gL*ixH^8+Uy`HcKN+RVR)< z@fO(%0|)}zh>6#PMpuFy0`F|bL4U^F*^ehlCg#wNA#MTEZ9v@5BZL7W4?C*EgFRZkUwa^i0 zeNQZF(eBMx+|n~o4o*M5J)o8Hg~^-c=Gpnt#lhwA={vzIs7zF#`xw2;;LS?fJp!?h zcW|jD(4(TJ1F9c(sY$1?4;!{{=V}T)S%S~EI0+e(AYo~lBzci;{UcVjYiw9(EW|u{ zdjUm+qOIpsL95^&q&oO;d{Fp$Pl}H8fh1jRN2#g@GgxMQChieW{8!SKw3T^}COdHr zGRXFg)+xqYx)VF~Q1rZoF*LfRh8h#&lq7(+fpEhKchYU#nloS2C=F>Ai7iH(g7Ur? zUQU8k_#OAtX4opP*1rHJ&)Vne?EDgV_jSIZvK>%81+@jzzr$7InJ*YYsxw~RKonZ| zNk~J~ysgVCvGR|HDUmmf7gtoU3IvcMfMVJi08K6!K-$`CAjotc!5k4t4yNTOqxdpW z4r*=Zf*kG{{n;qtD^^dSEb9m;H`cI`k*aD^!tHOUehMPlcS5n z_Xnq!2d|Gm9AEy9+q7?wFHetpJ>%`!g>hhAAbCBaABN(yf{DW9dRS#ICur2 z%XndY`L=;e2^uq-gmw~P&T3i5Fu(~sTp!3i;W11aDA_G?OgawQcxjj;+F1q;h$BOr zNi^DX!|c0w#ghy(HPn%Sn9o^PDvJ%-M!Xts-*GWkf)!sYA!%x0=C_pdZ5f&-@p=WQ za4!gqB#ov9-(!%9)6jnzp5!*TNreL?1#X}c1KnXuhahg?1-x*I77`>_A$_e}vI$TW z!GL7;8}hO?w$wR{0 z)+;9XOvZP)UIuL+sfrO&dz+EhatP8Wg2F>RB!*-u3U%UP^nBcvO?_qJ2kn9yBfO3X zR4gL0jrW}oPJbs#b=JdqCi!v?L{JoL7TY8zyvIokqQL~OG-mva{M*wm4|Sb_g}DR^ z1~z8`@Br07D!(Ak_5H6=BCmtl>H^pwY`4w)vUT-`d0jK<_sjOi?iYt{g>l151jM`y zWr~A)U!3pbxL04Y7kTqKie|gK;{!Gs9@^Nv&vT5;LnDNAVZ7CbTK z5GFyht@ykPXXz~$%v+$|-V11VeB|32h=3u?PnbzSSq%cngQ{{D;N#vO&?5-@z|+VQ z1ftrhK(&*h8h~)Wt={kBL;{-ghx;fd1KBGOzzB$E2@IwTOvbE&GbCUW1*`TtmGu zr`-J_3w%=*n4nCG69S%m;95}~b?ZQO6DF56P+a4UPpdf~=RkM){?)*bQ}o!T^NRv~ zXCj@;kzFdkG%hk;fqa6JkQqke!nA%wooUi+0uCo_3;_Fz(DVQ>od}lPxRfTbvF{H& zT;2n&1>dZvWgv2Q-$Mn;1d@!Sdo<6Kdbbgh0X+EPyB>G^z^yI_bm*Ow+~MiP6QUz8 zDCl2}`{-#1L8wApU~fSTtbT~)8b(_tSn?_$WaXfqVIjq zH%#m{K7sE{VcCNS-93a$ZY79R^82pLt3%k{YgveBm`v^V!vofcEY6C6KhD61Q`^oy z6G`P@6tkqMy(uWV7$Qv@j{P(X2C1(s9^y!o1;OUPyN9BEL{L;$*dM)Wnw@L)+G?wC z8*ebnSG0|K)!w_-u~5}SsDKG06fS(rVQV*w_$IFV6%GE2SE?zF0Q$Y^kFR|rHx3{; zze2^w>;=Q}<2)9K2F(YpD>-gxTXXCtmmlK?thSnhPLcF&BmY{FCf>8}jABGCUHahe8!D*2g|_8z zGeF2y116b5n~4`m&X}xn9O}%VDO!|;V`wIhCEYqhk*DdO^doaC5j|?3EKEaFCx_GN zpf3lQqT2XI=8KbC6j+-i#7rImGQsSo-MJmeknLnKjrgU;A3Ty1$6*U6uq|JdEc=9PisLLsV6u zBKhNAv|cv8O$VDf7c<{P88#`Elt;E;<&H-To64dt2s60PG#=x+-LK;kn?SalZ4!k* z@E@Y~GhtgdpxuYGONje^h_dgG0=^T1>vpoP8z9$dU$YH6v}j>`7dC;n>Gsgdwwn$p z4GF9-jWag$3rl?36r-x4X*yjHqayOQzP)GF9T$&u?0TmyFA4I7wUpSOBI^|dJ@W-> zI^j}~1~-MWO7a_CY!g>??_>ZK*=vFoK|ne76my6^^6f0 z;zvO{xKJ>o7!U*+3dB%+4)CSbnxsO7V&KT6k1dfkyU8RA+{oOyZu_Ec4+80eo;n_~ z`Yr8tqZ?cmwz*`aRf{2-;GEZD7<-}(fEpK2PPt0qlo33j%D5;a%PkZpc4}s}t&wUK z@gUvi6t}7!rUN}Z_7#eDllzQVXcqLxX1ODf{b`9+S#qqN`xYG;(t?LuS_z=)C2JyG z2-PE6ZT*cz$2_zsa9;S#N9i~+0W^jp3DU(hh%!9V?%i%lDLVjO{<~0R0 zkF&72@F8E-hRwj`?!FrQnO^UUu5a=*9JI1PO9a{v3Wqj8gey{gyeWB?qEX`Iz*wR1 z#}7%6z1^_?QSQk-F$_^07J<1we>K@yOr(}pzrsw(&`KNoS{Nne?47z+NW--v(aC0L z@L%@6w6TdJY524G6&;~n`H206K$K@xU7o5P30EPFN=aOr+FV%u}_ zA)lVg$*jAV7ddv5i`jRZ-i_=+WUk%3nhi_u3wrCY8>uk!GQkcL&lKNm2mRmVhcQm} z8@o$7+`YS3$dEc5e$GxpT)u^3_G*65?#`NNmwk%4di{c@0R2qo0C{n0!1I7t*1Y1G zKpv&#d?v6(4JYDmfBIx#U*K%uyy$(_K)8HlQ!gL8&(d6dO5nFk*^;k+G+-=iMJEUQ zJ<>Y?oh0o=MItHI|a*GNh^Qj5r{k}U(#!F=ha2jxmX#n(RDK*bK_*>3mK`o*kQSVFp>Ki|8z;3&dOn-L`K2s2!O*2l$%_ zPJ`Ac$ty?+ZtuCKc6=JH%lRwYexNUu!?|7<8Nv08m^uiTkkd0_9we7^jt(@BACi=P z_0e*5RXlLz^^=a6%FdG+o^G3^pQ%EE&}5|Sd)>#ke2eaV1Aq)J zIys$19+(r&B?)_O(dD9Z62{_hjg^0Lt_fPF-Q1~opE~Q;7+^b2#zEpsqMFW1BLa_c zq8mcx$Je*uz%W-I(jP>A26g>K9nzzX>WexAg)|MYx2R?pT@#MqqnsxE^4f<=-Ep9zt%4sQlrAt$@)_YNl zuN|qSeDzyvE$6hiwJbNo?((7LuC1X9v4yp@mFn6`ZhKp+k8%oYtiuK=qWn1%j{5<% zxaPIE=9FE@DaPk>>8e!lTkeqjriVm%73jvjZ4G~WCt339(WPst0p;^l-W2dbD?1Bl zSfVFyu)N;NEeqe%s|X$ZYZRB8`cV(pU_Q!W7KOeANHR(WDbmZU zjJ$b;Ei)RJmn?ynNk;-+;UTA!#tdF}(HQEd;H+pkE7QYSS+b)Qc7{mbSLH@SJ5fx( zbG~EaafnM8r;F4C$YDMd4ZKe0W&L;ssnCO^2ZjoTJ-Q?U{NhpXc7r_1#?*;3o3Ra( zS6e$wG2?ya?*+#)biyeYWeDNb$Knf z;;BykA`w z5JfyXH_1R)eY;|-9oGrkbg;z3RGsPf$L}A}%R_pT=Q-;2S%0rSX#@W>Xvub%I`dAYrz1|i+5XvrQIp9=IN6tynP0GLPkzVvowjcarsG5^Cy z?;cBj^9bJ`uky#ot9REl8u8`T^@q}T@5?w6;A76C)Korlr;--Q+7j_!4<4->{)?oi z=-|NU7-^3QtIq1^1M{7CBJ{h&6!*;OU4IZyRSNRCn?GtVV9ZbwwZcyx(UvTlo$6ki z)4_eUQ{ng>6qt*yctN^_WJ7SuQ8-rXD?hq-ZI?{FQ8-MG(<*kQ zl+6sGS~08ER>A(JsEW0`Zr-knwVWCZ{4a){1)jtmGerFSB~<`F0knO^pdId$2&QNY z#TSi0`q>n$T_(g4;m?%P7|d!>kojHwS!)-ugvmK=o~#7NI?A-pV0|q=RtxKE533KB z$DGSX!|;7B=YXEcucl!hB%^7zaU@>6-&j3hQ{8-4lMvqKUq*XJ`u8*S3ukbgR_AkB z_%Y%SMiVN#$Z~yGLzH3O0mQ5dL)?pivn}f8AjTivPmB|1aIPB<`WLzKjFfv}GfG^* z0!Z@3A?XQE+HRrC{31dd7c6bm^U-S!(A{btMHTrxc!>itAv}(rDIE$DfCEG{C1v=IL>6e`v3&?}GV9LMCaa1Xjfr`5Wo>mGg9kiZ zU9GO=x0(^LjOGQ{KRJzk-eGg? z!D{sZoV*@BTCP48d3yi!vy1GjpJ@!_~$+SvrYu%8umuy9HOALnzvLQ7=ldWE|37B5Ez13XEnQEc+p|4ae8Rx z;T3v&%>fqS<&HeB*vH8Ip4&D7ml_e>w!A@E&kjo7^+xnC7cz^|9>}bvzR|ey4`2H6 z*zye_j&APE()dn)HInTr*T3$y$^9%dL=QYQ`R!Q$taiL-)FVB@HiZYY)(U4)OG)Tl zx?$XW`K*$tzduknA-g=KxPcgbSdq5@iS$!|%6Jo}rQ0yFVQ>11_ZZ1Pt6H8!7gu>? z1zX*h$WL3%C9Ss{=hRBczhEP5z3toq-O3aG_IutA1(=2;eJ+(t6c3op=jLEN2+Uxr z>$h?VgZbFSy@`lK$YD{W(O1Fam=B_>q z^0pmXz*OR*{ zTv)fid+sNB=X>J)EmA|H3eK$$vS)<8J-IH-@Y(9tCoeTK=)Ogry4)iGG4bs9+MxSj zNX7;DlZ$zzOXT(_S$#}O7psq#a)*@?gugQduBF6vVUcUUOtA8JC71OZqjfQpoGuse z<3`0SjWncXHla}1$rcNvBF-O@%xMR`9h;evYv&@Yac-sM%H_e*Lp+u}diW59`FRJN zw;K)zH&dWr zRw-h*nn#Sa)_8HXP%>9{U^q^l0t%7#onkfYJc1$WdE-u?thT3EgS!aEgNZQ6b_xD1 zfUrIR!1e0m0y;qos_9k8imGEuTO7!`x%rY>p ztDkr6;gN5usc-iqpwB?DbATH{t}G#^C9_U(xX>Y9fiQ{{(r!kUgmkUPg3CwCEC_4i zQ=UW$KD#0*$9PJi8BX5KfcPQygwxd4hZ4VXY1NqIk1cs=$g@80U-tX+A1|-r|D=ef z{68NU8F`$Iev5|5D3g_Y??KD--2-6y%#@oXVfi97B=gEA^XxBug^1ho(()rzA}pM% zobvkgaGk5Xbe*rfv@mnE{vfYk@VR!?_NO!@R=FnATvo0{2v?6DzaJ|d6W_4*lfv|a-*~PKQ6BwbMyQ|bm z&*T_-X}!9FZn2lv)~ajl7u)rGW4t1U=u{%Ej3&RZ;-PY3KgnD*qYEKwUz)A*!<`-R-% z56Q^{2NUbvaG0-zWFybEw{(1(K%xhS!=lZ{->MWcm~ovW zZWnbCk_$FVb_|+56J|1Y$URyDFP&kEZ_7Zd@dnMgtSnkbSnkfyD>5d-%H<(blC90~ zUsz3M;K(dR+}p3Nle?Iu$2Pb!B`+^M$b%!TXT47l!BoY}mRW|DEhPz2^D`ZF@!yb%S|)vZX`*j`&ye zeJ&oKl$Vby8>TqCdo4Y#q++5-{1RjROC!Gih}ePURp9zXqeNfi8-E_UY5itkpoSSRlk0#$o~#!PaOk%)>IL-BK9?*q6a0MB_3dwsqCR&i z(NBEwDOKPu&CQF?93PC%b!(75Cpc6^&@(|(9hb5oUSqhivtcb zYQ@R5z+x>ddTCutWkEb*?`^=DrN%0+LGPUwb)&(!c6zYF_wQo^!)<}xH|J23B=@Nqz;_PlSM%&4eEty%+pbp zgpj?DhJpZ^toC&WjD|r9LdplDXx#H7#=0{fS>+yMyQSNZa1ECNp&xX*noO{hNNxbU zgrm$Dvs#akZi;Ry^U-~89@rD4pm94&(m;qw=muP}t-Id4Ugw{O1UzJXHi6(Ic=bWp z4cR+!7$DowfvG`%ZI_{X`TFokZSOr(J9}!r>aZ3m$HsNL?V@u{+HngUy+I0{HMRXb z8PZb$2EcJn`2!ughH;tCd6F)nOQkyP&vVZEWcK|0-5hd!l!70fI~eWBk?je*J>i zz+j~tUXm2$+8GD{GGQPf$49El8wTGOs$rk}&z6UphJPB%J3U-tr;RI1mJ4U*Wqkrz z&h$~Zl+}-}vqqs7ruqC%zNK|n^+AFaY@Do~z70-i%V8tw)pj44r$L;AmJgK=ZU>jw zIfmQH%EPLT)?N!*k>jW_aQ!r*6Cu}$C%-$0deiA(pc9w3+z=rPq?fFyIp^NiRRv!$awhkK08ZXpxbR{QX7|-A3`{Y&483qrOk&87 zKXT0v>VzKrIM3&}hbxa6gC0E4LPpL}a5^v(KkT2`wzx9c8t~#nU<|$TtL~hxv0QWI z;kpjXHzR>L$nkNDoKl_vEmc%@u*U6%M`L%6Sek?`-Z}FpR46AAzz~CJ+D2~{X1;Q6 zO>5`YQrfvG4O~ROfroqp7xmr;ZW_Kh7@-Ae`anqo^^mN*7M53+A6Hl8WHb-h9}jw_ z2h18S*R3u$I$&ZAPoDsp+9*R3b|YsAjf~Jk&#?HKnBzHjd>5=;o39#q`CdYQp;lyO z^fWwUCs?7HM{$e^)-fagEi5*lz@9a?c6z=A$}j_Ct}?fed{&Z+LqzuKU(H6tE+$n z4_!aTu8ICU8mnv1%C6D8eRmAt0maTub$Gt#ihzotfzR^V%A@M)W4$=Xn)jHsHP32J zbJSCL%r?}?ZscZM#CcVAld=tFGtZnv2V`;{F)(_NoG3oY$;xUSl3l;#Y!6tsb{TFd z)No|PQSKcPg44dKDN&J`nadEE+Cf94=9(LyVeXarb)APja7dMqg(OZs z7`8;SQ24OugJEkg2TYU&V^up$R~|0`P9wMVU};_7&R}ttwE5*(%SWaan{lc8!eStM z>hzl?H@UX`nu9DFDrx~rC;TjqN`Y-eR!}8PGTcgWJMx8G`q1cCE_aT$eL-e?jS~r5 z10IP|^JHyv-3is_mR1Hoj40b?za`INL1{Z8X9zO&Il3ykv+TzF7Un>uWKksUi)9A8 zSTY)s+9`TYaXP$8tfc?IP=$EokRL=4QpN`=gbWg=aJjbpP^~O)Jb1jZx_XN^g#uy9 zFoml~6RK;E9%KR);)UxAipmP}FcM$(>}CNNGg$v^3=nIkjKi%BLX4P#_bxb13B@dY zVZzh}qhXAZgIZ+dJL0G=61UErY*y;atBT_!W}`H@Q4XhyarnZGk%wWSbeue>=fPtP z&BBoo-KsF0(i&I7e7TlfK%3!=k2hT$w@K;5;*vNlPeb)I9u2fx+hIg! z>FA8ZI@NlrRQ~XPhd=2kqzg$n{8Yj))3afB)Im&0F6NXI19#gdDrLaF?>(x)mrAY%YL zIY8uq#fEXju)`F<2|E8QN;t$cMRo*~9bp_uC`EqERP9_<49p4;4*0DAz3TWqf4Z65 zb$G&%-2FI#!)S5m-E8+3FlODe*PFXrn}^$tWehPzMh5zmVpnP}|9(h=g>!Q#b_k;$ zLb}2bY5*(2DXP;P&8pd#n>)LW^`$40318n_4=2cJ@r1hfL4_?1hu{QGc||)d9``;)4hdPhs%vh zSyk|9rBV5TpVk_c1$@F<_I3|dZv=DKYf%6y@-CM&fdpZF6l!R9bMFQH^Lq2ew%Xll zZa#ZE zdUyz63E0d1z3rpTga5^6jKoX7uU~E->}=uVtIb#22L{g3_U`tppP&T2?7ZB@xL25l z(}csZaQ#Fu>mRCgGK)K(Ds$HwTLv5C%N$MD3C6V7Gp5w|BDC6M7L~Ho;3VT@>R?Inxf3P;SPd%>W$z`faGn@oaEBR~d^+n7M)fc!)$_Jv_p((AB8L40__) zq9H21IkDMfC{zPJFP6M|b*6@X@ai|I8C>2&z!JkfybfEVVZdt&N?};ZvQt{ZOMYb3 zreT3*;5QhX`urlsm|A>?|IHuIEzXxK>i8qewBP7lZ;odd7mw$PlDw2U9olHv>p1Lw zcyZ_-a$3@Wk3838iLm%Q%rUfP@qYq=NHj$?>pUI-2Z)$3`dt&*Ej#D=)Akz zM@K-p8^0PMn3Ia1viNz&ZKTPUf6qZh?49)U6q&*F9EXr;HS4PfX@Khq`a@VPO2PVpq|zU2t1b$m%2613z5I)Zvw zXE?;b3IeQ4)J$a6&_R3(H2wyM_6ijk2O|o@c>*lx*8aJQSq`;=yXqX>>eJ9rurm=otwq@w6(wYeCI{;@TYBH ztQfT_l{wR$+v5+CsZ^H5Q8LK+{NyhacqPfqdyrNq_UUBcg96d&6+1`U@de8hQ$F zK1>gs56MN%MtY8PCMoIWwMk(MDt41f% z>pbohS)Pvi$a&gzUWLtU=iC1T7YCAl2!R4lC=QP^@TZBF6Ns z03%od6b8;>2z45~OA6R&igcyKYK(u4gzDHMW3mr#easv!e)835NA$m~JzTc8fqPr(2~GXfzPodbV~A{pYM8x?NN zt6SgO?a1nEuZp@ab7aMxGyrEIJ};fML0zz6&~YsPfyTcU6V4t4M|kTyBE21Qstc z6P*w}aS~3Exl1(Y$)OU|`l2^N40s#+jlOzE30ukpLw)Y;1bnrR@!Sanj?uk^Pt0x8 z`r%uF5|U^bg5ws(MaM78)s^b%NtKgpJtY~uRN)rpTl3Xg54g?kt)KRrdky~GY5;~; z`1z<&nW+drhq>pKGPwb^_6e0jmJoEGMkgm)7Py#@C+Np!Y84 zs@EAxn4rgejCq0!!STF80qC&;!&!EEO*mq=`l{AX9UV;~jbBA`tR%UGPt%U42Gi+z zGwj!kfTx;an$YfhWFc#PSd2wgQkG^P54^fk9=6EbuuElPHPwbf3i^_mJmzxY9kiw z?33B^-js3spsv4}uhn4DbxwoU`x?^lIVPP4VK+wM3viaC#e+NQ@1s~e>d&(D;0l7a@43#9x^PW z)ZtC7){AR{5GjPagFK6pRxn_Ebh4tK0q z)FZ~b9k)hZyh29ihs<@m!3|1LI^h{CvdfUJB{uvzPG-wAHkIR{e@>-4fXW;A>{j@{ zXqpJXxe#r7-x;V$sHcpS1;${990Y#I=J4DWz&|GCqJtiZZT)+pNf%qh6gmKvo z)%V|T?>|S-^uzoZ>P~QdEH(b=Rqgc~l3>s&#j?FXz)+6_dj=gvMMKy$pnoy5x5=;_ zGf9DVGlfE00|X*POE^tvh)Y7GRAa*&$N9q(<&OsmWC*GC2)N*}<4t^PGV#wRR`;1b zHai3iT?adb5BdVMN?&76r4uX-1DqM~j2-gHAR1~pP^(KqJ3O_i2TQ-x1XuWV#eZE+ zrJ6UwFKl~-MMuotz+k{IjjqyNse7uO8#^N~(u(`xxTotJh?2jG1V&FJ!NFQ-Y5j>G%<5g58(N}U>+*&Gs zz#ld935JN|uF+WnU*Th^K-9}i&Alm5B-|afPVJIGbk|3QGRo|zDOwWfek=zqWO7j@ z*F|NETBh_A=%tEL%z&91&D58onr;n@r>?y;VQJ}E(Nj_4sdA_*K|!MJ??3i>1kYPS zSx6WJe~X9)10ijnxb)n?DkQVFXvwsL`b9Kh#$N^n7(SDKg~WwY*GD$DDav4H0 z-QUtQ6ZtQnzdy^g-Fi&vI`BRoJx@b@V~}(qGi-nioOtn>{vf5XNH_b1@Ju?MMF{`LDc963GF(-w|An` zArNPEHi)}qR&Zf;<59Ah48x$UB}7yPy_(5=k0>+aQJiE1s49(ON0Jbgx%m!*$FibE znq$breur-$V5#*&LZ;kBBQiG9&VR-SoMhu(4Okc8n);2j_T&Z33hD9T1K)u4*oPaN z5hQB%@aKco`bt&pq800$8id2qphvt{d_GE8%)wVwRRjdn%CgDxaF~#q4va5~Vxa|6 z2T&tZ-N%oTz1H)O$$UOq{+%=v2{G4y`0FywG|7fNZFyvM@845UhaBpffbeJ0b%V|? z9kg7*0olZm)@`<>PiV?5(^Zdp8`Mhv(gehaPk+C5N4n=cOWVe{|X`gx+f5}jXNN8M4^u@pzKTS9m7qajkSKy$lz`>4fnbrvT@i50ge zA32%FnGxjpr8+l zixx>-0MQ8tY|lgbZ%9HCUPV!_)fu(JM0cxEItC!}Rehff+fiJ<_yND2sh>7~hLQZ= z!zQZHA2xp?5u(X@lPt0iN6L;Gyl1Imhew-7Ii+yDX9^u2J=<#jw7vO^lx^J-!#2ze z=l8xs4+IMB7$n`~s*j%S?mXp+3*hLAGp#1Hkv5;H@7z}5{TyX_x&3ng;D6KbyRbS2 zH!1jT^~7uBj}_IL8DJ_=FuXf^M|qP1M+A3HvI7Id3r4+dSG-TmSol=J*#qKT1#E z=GN~1*5wc>^_PpqbHk+W>}{vN=49NWtzT_zDS6s` zCSP8?;s+iB$gurpd;86i+JE{#`15T0)w7)g>Z)Fu_{=Qq=1WL!9v!^imdEFtyNB}p z6ej9$ck}Qks1#mb?my!J!~Lfn_P4gUod1c-@9s4jRi#lfAgE2SjjIy-cC^30i@(rJ z=**EkRU86ACZvr@h5ZN{rYvM0(psM4&H5=Y2z|}1(MA>xHCL)%#llpSB}9&I!I0pL zZi|oR@aog|~;qyVUR1Xt_1^_V>2$)mj1U)67TI#YDGG z-|$k|B-w+UORfY2E=_(^y|~FbZ;gBCtpFNk69!>x#67&H-13InxgR-_EjgiCd-O=V zH%Oo@yGCuYP{+N9t`AZoM8I3;TR<88hP6RjH&*@OdPLQz67_Ik9Njr zE)u@2r~BVg56+Spdx3P`@D?JW`@0fek?8gB4b|dV923Vw8l#Xn^k$c2w+NmTmlB?| zQ?_hF#U>XPLIH%*3=`==p^ItK#o#%oHor#8xIxguI~#kL>q9L)42O&Afq3^=MdMXC z&xONQ9a;wc30keNPdBpN`aRio8kO<~rwyNwn+McS3Q`kJwp&ytha^=bNCtUgeXzVF zzMy0S!cw{begcrZCAkUkrNXDa^dcl@+jf)z_07ShCI=VgoLg$+&n>ktIJMNWXNct$ zv|7@Sirc(0s9=RFdfJMv<( z2bOyD>6+zBC?7FNjpMSZzQhi4A6FkdhFMuz!e5*g{L_jS_gEUC&|eGbpOl>PsD%RG zYx4~>*P+kQOrtvDWHgt7Z)?q<_K(fl|B=gx28Jb4>XtLjtd*LB+*{L0^d-T z>$kr)030h6qq8|4)J=oqbelOC2EC!$x;gKST&sCQSramQ!X@60g7Y4%P;>!Levk_L zuXU2_XL1ye_1A=j`v|9|^rLyw5Ar+5!>?ycilHkD1FtdfKy+W6XZvWL8ahOS6x1Do zQ7swmC`q$PR5e#lydA;vp7ewKN+qTPlvjiIz6wjJ`$pTb)_aX`q+GeQ}=c zqj}N~W}qELA$PQ$bbqkv8n{;D^=8LsYc5mH0=KzC;Mz4&69qR-_&qx5Hi;C zD&5U{b6=ci`{)jOJ1_&LVdajNPRzs0HoJzXNd@}Nt}JmEp}pc5%Jb2N$F9xmavb?B zQ!<~7+G3WJ@>S+R_#3LDF-vL~8MGl_#aP}DJ@r`Jirp(s+@frgr76zNU^a&4yT!%x z%8A~_#8sHK!Z3u}7-Bf!Hh}tagX9CXq(mO?9Wx7t2^(ASkfz<Wn&ZxCC#iVUM(% zNp>jNKQ(%>on>c~B^`&kRG)wQYt2^-E~#7%sshWCygquvFr6jk_@1jw*B7!~cK}Go z8HYJtP*}g*5`(1}Ah3LD)aP%B%>n`~iyH6#Xnb}!oj*H17qNEuN8H_iGDhd{ZwpS> zix^v?=f($FWwCNBf0fGOdFh1r7lPu#xCu4OBkb)YdQ!2~RUFDvv`i@W!l zuc=)AtM}%`r_K#+La46MRYx*?AW-#wVvFHVIN1DT=6pFV5 z8XD`2LQ-%Zk_lfNv)VI@HjIw6=yGl@zJ8-t>&ptAF$w8G)pCVO<+axcWy3j|y_MFy zQ*TiK_3mD6pFeDJK%W9N3rhObogUTw<_m$N}5<+9YzcXqdBsWR(H z)O`>p8aig+QZ%laKdswtM}l+r;+hzTx_|9hIcB5rXox}uk~4Ct-$xM!^RCrc5ayTS zs*X?S-i9H8^}ww$@&e8+XWRAJk+Ah+(EnzyH@nq;u3 z((hI)Cu9_7JAdRY#~Qp*6`19%)Pv$B0g&WEU~L2yw7XGnETF_fa^!9fFcGwl1tKK{ zjy{X{Ey4g*HNHPDnnyZpG3>Deshf_MReBW69hO_ItrKYsFmBq_r&E&w7Y=m?{97;$ zkQ@{;_jXr3XvJMU_U=ua>4H<`6deHO(#~WKQpKmlqPF5Tx$Eat@a_i08n=R)Xfwt_?&kax z>1o{bLm~bwd3*YLXZM*?jUB@?edjAKGCAj4`f2>Me|RKgOE*jS?lsqkL&Mg>Y zaU}%~!*jAtdEehQpds&62GCphjI5k=jhH>Tq}D}flQB2fIR$`|&}IBqyXBk~yOr4X zUf0ZRnzL-)m=-e)z_YR?n^?+Tx!GcGglyg9lrkumzQ8~hD|J%lW0xLFnl)~|VODKy z!wmz&KNGXHqVVTq8D$DDG-pne_7<1eS_eR5FmGTu&-PKCE(Y^?;N+_GGW1|34ov%O zALZ#H$%UC*pzfrP)A}*!HI&WawNAqOPNR*y?II>`K z&qj`l%13Wo^IyF;_r)IL_=9~kPx>Jx8+NLa{yN*?e5y6+52<(m)jeGDCpX=BwvT2Y zohoyO(@D=CPFC~zXg6i&**=;l{g4?PE^9`H_xE`hu=nP^IM4Rc=^>Xc=pHBL^-WZq zJ{lg%KANXgHzc3*LO8E^2Za0LJe$T!uH3dtT0v8_BG*TcdG}wvH}}Qj4}Y+a<|*4# zU4`wfJ~7OvT9N*cdiP&lZ01jHy7TM~ny#p5;BfA!wn z7ZG1!gs|nuYGHkK34cX==DmwNYKvmo4b=h;4*Cp$@A%k$^S z%aS)$qD}bG@bC7~Jn0Ad<)0MxN@2lVISR}>aNQT@**=;l{a`vO0CIaMX?b1ioiVRq zf5(dJkRdzky8^qjJ}_DiJR=_>Xt{6hi}Q?ONtJy!Ps9{tKjTAB8f(?JjOrcfCd)tYQ?sh4lyPI+`BF@beCpJQb6^Wk0zHZa=5|jftaf9uPV7xk0 zNtvE_>4hnpsy=#*G3VAFuT=H5Sx$*mulZ}*6Jz{$1Xi`{F#i zAN@SuoBQHCr=XY=JLvuuLjKtMd2**9(xc@(r066iX)KED5O|NaVfZ<} zIhc~$h=Dm)rXS6devsdE69?|8QKabe4n+6GdA5({$#!H=eEO5L+|F2ICjwaT>bhZo2bqAI*~;R$F)e(AxC8;T20O z1e$&{Px?WA`6nell)`BNqGvoN!zXh4d8bnM#d)@m=1D)8{tJNIzPq*O_Wlxqi6sfa z%|6>l^CSqOEl@lS41KvSc~j5!(L8B|5?>XJec|euak=s7N_leaTUU<{Kc^(g+D2)^ z4iw!L@X+(4GyQyjGG3LB3Kc8zSr|o%d<5W+P~(%P+?5)ifU^p2@?nA+Us~5rO5Lrl zo!b@)aQUpLx#24`u2Wia`lm)+<)RGR#IMtch+>O|aaoeKod;6+-k}$h z9IBz&T=v`x@8gWfYva&?f`p@wbFofG3R+@>9PH$LCs}lx2cGaPwR@AauQOgeyEJnHLgvKZ!mLS|4 zn6iYf-Fj_|IuP~xqal7+nQ3SPP>blYz{kWd$^}12&rz*u50dqc3?4>On*evLCnHGdt z(01bUdo}A;k;UKWnePTiNKdOcowIH~YUGW{rl31IO-4~5FmYxvdjVC?!<0Ol4fa5IBU88|czR4sYqm;aUGs zIPLlS9)2nnWslhy4W(ehOyB@F zN~iUkLKj=uhgwaVv!Rl0P1vsxPCQ^+qEP{-kC~ZnI1E}kgmc1vJIt&$u}lL<63-93ea3Wti4(759Rc!- z+#;C_!^og;{6Ucl_b_6EJ@tkDnZWfBeJokMEdy%i;u$qW?`*WMo;kW89cb zQPNC_EQY&T=6{Bzon|j!S?=u~s@^C{f?kV6M)%b|S^0!yl9tfA+Ct(QbkGKfQaGF^ zq;=7YE-v)bkV=et7~ztfoT4`*gr*%GQIJiHgedzldBma}UWN7Zy4u~`d(qfZvyhKm zh8}M1&()bjxJLT0yVZQTeR#O}V*8L>@xVrv=r9`?pqE^#(zP`@l7a%b-eFuuY(;Vc z&8vJz9gcgoEd;kkp4%h~c|>NPy~z0So?myj>JQjLi8_Okacz7XZu%2@?7$CCgokzk zY&AD`cTI#G2LL4?2n~QfJjnr|#~>eyPW3_QuX*rj5KOPq@Fq_X)-+2PRdEs)B4*|O&M7UX)W>~iH2d2I}A=b&bR@nOw6 zPIfXmjmSjxPJ8wxH{)Z^N;_wCT)GN+Lmnzwrux)GhnA|uM-=G^yIDq{P&(jBEu#vH zryUNN=FqHr>1Z|=vWGM6lGo4~C-7FPn;c}?8J=;S2ENzvs7)kEpDOAXD!`aviP}HZ z@kTi;FEGvLLyQ&NjfNr`A^(?n1`e-VA-WE(;b~=XmUCLEUl2dC^G3D$ee@0v>mN`Q z%Xa%iHi;pZQ)FdL%moH_HEb&yTw@5-00RMHd+NgH{@_-Djs?-bx7H2=j57y07j-c7 zxS!KWt|3O|ofWWH=9ECAw@K}%or1j->u|4HVqFEa?ogN(PH{IF97;U}%t>Qt!JhUu zE&pt@9} zyyP$?c$@DY#p3gid=UG~;@e*r-{F7r<-h!eZ!%2KbyKz^A=kO6Mh*?QE{8r-(QI3S z2cskWloRuh99oiOC2z=4{su;Cm_;$k;=ALy#l?BkqQ&`gMIC=+2G`BJxOhB=If_$@ z3SyXColsXSHK{=D_&wcD8ZR#GhO%D#)oJeW;<3|UcrGt~PzkhPdGU$*T_lUZol_yq z%nh&4Ps}y}&|DFSWD!#8_>J%B990>apnHyF?>h_;B>1^l_E&}L6i}el`Ictw;ac^< z^151h^yp#r;nE6S(;%I^9ay{P=d6c}^kI^e5mz8Bd&f%G={1|@=86@y6yvjMkhPr$ z7x^0ePXD?=!yyPdK--%k$kQm?&?}{X|KxxBh z7~@4iOJZqDa?CzmJu0OASMD5bJF+@wyJSM2FXMFzH%gL|4fM5Wh1Aq^3NS?OcM;Bx zkBjaN?Q9Bb<_e~Bn!67>zkV-*w5N!?4rMcarM_uInx;p%)(E>;h=9#thkyvk>EshR z)Ehh)$YRq4yt@PLKqn^O(xfgZJB{+oaPE2ptOrp{uW_$w791C>%>Y zeqt6Z&?&eudN?ulRXE-mjyr~yn&$c^wM6w?cncH{%s{^B+^m=B0$=4c9Zs{EAph=4 z;^`oho0X1vsWSoM_~mVY=HxDbi`gs}Cot^?znxA-0q34mY`s$f%;wF9iJ9D^kAQSP z`K|Oa3rzp)WNV)qa9;i**qCu^OTcYy`K^NlDYv!dLe4E<)BG~@k(?3hLiCcVi8JVu z^yWbw2f)vhg@K9Ux?Ld1o8JbVMF7aFTf+n(sa!d5sF~tCUUx=bQ{$mC>E6h@*WXEi z()sdWNd^le(+;Ot3Tj>Bd1oKjpyGi#H3rOz|S5inREp%nJceo6QzHVluMCrmhA( zqr)S3j%jhsG7d}dz2g?(6@6K*u2fg&U@Jc#gniX=uHNm+!MmhjKpvic26P$(>hR}- zH7?P?5XP#8vX|f{QRf%IKcc_2f~a2~jE3iU9~8Dnb>XtO5w)I@W~AGI>_oCy>n&dQ z7Il-Zd%10*Gj*>)7}0<+s*pgYQJJauXBNs;W6WuA9?gmAOfI0~Rz+vR1uP!)%1i3) z{woam@ec2j-~POL(D-?C_w_cuqTbL^to_IXb&3XYk0hWrRKYBY%d2W@t137R<>sm) z5+Qj;SK*Fn0K@6~Fbo0FJMk5VS$2Hz(UOU6R5n-&XQPhmvmctIqq(un$40#1hzVL2 z<9hp}<@fXULE{7$w*+%J(bvITKDg)Py#v!f3bwRVsWFV5$%l z)-ZAF&N;+mBoc&_lLQO9!W*vo-*`llA0cDFpcyABPY0x^!!EYvCd9&zPm`@Pvk-W%5);wR2&foNIA3b=!+ehbbY7dYe zxO@+g>Q;^(VFV6&jZ;WQO+-?T9VfbUG=3Qu^87gxw_nqDy?9uoOJr#Y9saP%0FJ#p z5>SDa_VHNI6syYTI(=ksj|Ktg;&&mf>S_*K*1GW%Ikh8ZLfu>_t*nScZl-S|F z`a7HwWvcm;LzHx6*PAd^7FTe~FH4`MD2ws`YJ%tj0e93c#tB2L!1UDinTDjtQDSBz zv3{>uI{dl7g zwRuy~ea95gCC+=J8cdc$(~<-zGO;XMRu5!^N)RvhUaL;qjD9b6;Phdty}uz|o>TBW zHamE=v$cr33;fE4XE6dZodWAdWQ}D`XPps-Zid;&J?7HXY;D=@w@ zCpf1;&_WUXL(z&(tFqErZTEXL)q<_-2b3wGZVl;>dOn>4eX`Jh&`YD5ZdC^iBx;uy z%V4_}w-y#?YvMC)oNB|)_nL^L+mWtV$7ZHDcLl9*VM$AzF?3sjlku84+{BB8=pYm+ z#9hP@o|(E(IcjIS@;TN4p$OCqtXNM+EjxbX$5-zsD7*4o(=7RHJ+ z%}LvnYjU){K`7B2Dcm4xylBBGYW3=qJRjM$Rz*MV)6G=>s!fWWa^=Sgyowbq1z4yp63% zYoKQVE~fI~Xqi!4Fbd{w!BpS8g+w<6?w3#XR8MnqWcuubOjSQ|2&QR}J0N3gTPy@{ z`;l^xl^@eXV-hkW;uO8rSmajecD?}cV!FiV;YDhB7WUdE=HkNV_I_*=(kL))B+@0l z(NLmYY&Kbbzpu8CQKsDv&%$01ohK|!yowU^>SMysCc_)HQsZ3dedEkQkwu#eiu$_; z?gjd}OreYm3uZ45^j0&W*3YW(vumqkwA7Dm12r~Z)Em>Vz_GWHmSi{90{!=1to&;t z_XZ?N91g~@*40jX05{l#miRnUCSwIE7C#io9$3*DJvk9qW)kHN#&$F#!P<)ZHv>A7 z&Th@Am8GRs^?VS9>M%YVULnu&JRSiXjBT%~ogUgX&_%i(9nlFx!$~ZdNI|Nz5Z1kg zbC^;zup#w$lq`h?7zO%<<_hJ)yIBxZah=e(iF)rJ9Arr$V%V&CalcP?O$ zfB5SI=Vs(fj64^<+{hDVac4+M;yPd!)Wb+*G}!TK)N|p5hu%$Xt-ex!@EDlNo!+HZ zIrr=iuryJcGT!5s|K{8iEqves!NE9uy|?*t8<>^*fZ+0{?%$^muYmVLoUQ8*eh#)& zA)W4qI+-;uaAX+KL#>z6<0IyB`FCI|B}11=>X)?EA1|#@?|m=6>e)gAx6ok9LWx@_ znX=HOTj+99p?eD?sKyxZQlwAiGhZhGax=4xm%zAReGvGU+a4@}mka*c+(5&mEF|-n z(=y!^0$O|T0!$_4!7Ts?=zJMoFT%c-+$1E#Hvlt9lg19QkU(U+tdqv{xM(u;O-jxf zN>UNfF=H4fo$xa3xByd0Q;s1cMucQO%xR%cDrjN`AQ1|o3#^$GjINt>?5+8N27PSO zO8xb^^9cXXXd0jCJ#SHDsI}xGrQD+H(!7!WE(My&1s_!;p94tMTB3zaa#dD{DXzMH zS5?<@tHzB8HA;iau(|X6uu+D8o+x^HwR!YY^Kkps=E3IC{()G1CuUGFS=;SXeg_PG zb7TSu^ABixLyvs$XO0BHY$%;a>}YFgnS%6XDnA{bxq~zA`pTMzVhX${@ZDk9ttQ9iLb;EQ`E20UTdn| zuqj}olo6bmr(LAWlkj#lK!Y_(tV+!R+k663*wd_-#RIBtt*(y5O%Sx6uX_Y?s$mbN zXxMNJC^k=3dbmkJNZh7S`?d3{kaZ=JQNQ0I$iy_NvNZ|@2&A5ZRl%Z)duXYH9={-o z&$yTu_$<*Z$0yxxSfgl$1E1#cKVYixSAUXM{fYe-jCE>uXTF%IDn9OiLS7s9kqp~S zqxaI-s)~^&-rU-S%O*@JuHzI0 z4eR&e=2Ix`BnI=s>B|rS8mPqHftO0CFG&zZ1+bQG!h^>THdHYH#SUN`mfN!BTj;R} ziFlG_%sCgd)Aj6x&w^OKJ+DTlIpgEQMKh&L8g1bY$df5%hnDDxoeP9A<$O?4>)PrG z-7=8_2Ti*GBMY5@SsxniAV|kJ4bjxWSBsoPe5dIh;+`{>Co(nxuYgROb%dppu2cH9E#R7?w&jGMX06e`{Dz9<40Q-e9+z$WOm)9Nq z&jCRz0Nr_cp2+ykAhVk|B|4}4dHcZ$8EyO=V-UwQZ+et*VV{`ZIcQ@XsNVu{1d5M3 zw*$1|0~qL6Wd81|2e}78t8O@WAa68mU9~YQ{efvc-dtM7(vjZAld#VZ z$R0G`!}vFQX#R5+kceL771%^Pm@caoeX@2vv!Qfd1n=geYH)5mWaYRvBiF;^hb-4G z8PEZ(HDO$7eO?qID*ExZafsw>E4!gKwh2$m#COdBE=P z&KYS<*h!~s8a3y$C`X@6s1v7bCaQ=2m=l?R9d^%&Z$hidke=a^9uoY^o4yiYvYA1^ zX_Z=VGZy9OQNGpWvNtt*IJum~VyV51o6?J4nW<40uK+7xTnFeZoOgsyD9#l6R{4k3 zT7a0r3e{iIONXxj`CpXl0SU(wd3N|del&j5vZ>-h?K|?HhFL%4Ej;6tEt^KZ5ysTN zJhuMjY3g4dQ$HQ`NI&Nn@^pkI!Glqs9Gnd3G+1d@6?yX=^`RYI0Ar%Zvy2Px^U!n{ zf!JF@*3c3^YPf5Y-#)#q!sd7-=5e%JCSoEyAShQPKjfUS_rcohCfFQuKQ%h<+|ZV3 zE{C-vP~6rOp-;oed)3;;JlGq7(N? z3%!L^sKMwG85+Qzk#U5Ys1Q8@2K7hQv^zu@7K~)<42QP3wzt;gyo@!M$u=5Yt7I%c_X9!JEn?Acjs4J%$(uTRW@X47zH7&LnblGQn%E|aL4q<$M zyP`FVLYQD6Mw)G-4Kl&Ess_y475VzdQ5Kh{^jy*)dlWPUs9Scuq%BLhJw&@wDxVX^ zDm6|7A%BcA4`;qfLca=l)ZjCU$H4&r&u^IW9E;o_}o zNqdLCueRCZMC?Ha3Hbw}y}5MWYL&>FVnlLzb_n4bJF!|g?n3o@HC*uRQMY@epxhJe zI09;vR|XpRR)x0Q%E_@f zVNH7nk%rC^ZEVk_nkDW6JjC4Ea$tCMH7F4%@vgZ0q`MGLNuNAESipG235){%sF_bC z8c4eCjLwkHg6}21H!W?Hq&gaPNW&{m_AupNOY1E9{#p5Vp61T9C3mKNlnr}RtOwkW zYmw?NB8^Vs+h2bnCyuAhTdZKcRBhoRY5$nDOQ*8MU(1VtGmfj$oYkddb=8E;G!x^@ zhAbldk0#n1h>~-+oIw#^yn_hhBbS$sA)+{0bKs6c!05b(4y1v5Tq+Eb0c;rZD4bV0 z#VomX+=$`zLD^x7C>P&g!2`vS;E)j#D}rk+^w`Qz5rbg*Sh4k07^EPTb zi!9Xgs#<>VMD`-);!GY6DZ|geh2(lOt2l$84-gi>lIKY1AL+RpOEEu_V15;P`S=^X zETETE7aL%PZM2p9Gmz1=-O!?)F4)aU6>8KvU2L^dp^S2RgtnKp8Dpm;8Fg5o%!p?Q zwi88Y9Px7nL|y~ZUP!!EnktD$w`2xHbW9qQ;*>a$sLeuIqza0Xy0}NWqgYpAS-eGdUpT%jbhU zJUZCfd*MLj51$Y4>FXB<+pqQyjvScgTMDct`s7xXke{9PQcR5w`MMiwnFYIYJwt54 zn;pDxsS6r>kw4%Cf9ucs174WMA26{nci<1$T2_1=x4g>nllzDBvQv5HU6{f%FAY%2 zA#Qnh2QMu*)MQ`1%-s5X@KmMNpNP;#U+pe_REw2#BQ@`w=MH#*ayUGgsh`img1wpUW~oSTOx2-7tEiX1yP4|e>q--)t8(ljXFFQGS@~b#I4~7cZxY$ zE5N|9^OAPVLiB)xv^WD=(4xsCD(g~q9BInUZAcQ|sMKD!Le53YM&aa*8GO^LUqW61!JAclj0b**8d zLE2jr@;CB6><`VE0722EiKuc=O&Cyx?&DHQ7$QMF@$XgSl2_k2;HDC=m*nHww;brb zxm0_MN<-usxjv8DOa01;-Ym7$IqtM6!?CP31VQ(YQ12&9aWeyNZ8ML}iC|HnUCM_` zy)UIf+X6+o&HcYLyIQubGMJ0s&6P|M(unRXyBLI8Dr8ki(UxNQDt)M!Q|KVPr0E`v zdbyZ&2QXLkx@3x)!i)`b8B|4V_`E)n0zVDcm-K1^l&SkMm%T-E*k(IoI_Q)|6+<#- zrtd$V%v%>h?;L#xN9Zgv-S~|u$6!iGG!BIgq&>PDN*KEhrMwR3v}00%N!4j%5h?DD zW`1?!3vhLL6Ku6X+<2q7S-wK`r5ws>Z_!!2>+O~$XPtX7@lv``(l&c_d`FsF`u@$) z;4;H7g%+2%KyU!LjV;jiD*2Z59J#XO?9VA>9<*9Pw=&FijQUAkDfIpX9F3?)guR3u ztp_cb)}VD$ced|LRa1oARHoI2xAP7q$W9iUE%ah+2<(gGe6!UO(H{_$W9DHqmI@++ z7bE=?&RKkzKn{4-YGo16IT@aAP}nz!yO9XkM5(rzCVVD1A&?&?wHA$R#7Qq&^wZ5q z1=VpD$(Qk<>oPEufNuK+LpoiIYxfre)+Byx)aWAHpR0>d{QP=O>Sh6Ltm}L6?KVfD zXOd}7hYue)r^C;wL)71KIox?*0V($%9avz&>k16?biJS&7HlW5pwoWS{Lg5;0j&|B zdEOi8#`|9pTS;h{h4uaSN*m&lwEN+s#}4Ab+4R14%U7}j&l2YE22pQz?!zD)jt0Hi zr8!tNH3WsHSzJ1}0}viNX#98$cnzYzI3CBPIhunfl3RbL)4&6?Av8gulH57Zl}fbe z6#qWqYanr~$CiZ^w(UcW{OA%LIEt{RN~hWZ>*`SqU-reFjyY-~IB=|ZYz~tK&z3%A zMxI6`xp4D>Gi35e+uZ;Sne7G-@s9UhU|xmCtFbOY9x@h<6}Aa0qxP z(%zc~Q|y0_R+c_{|I4e9m%_ODp#r)&x0>*x@evZklm%V)Y)#ei2RR+j0d*@O@p-Ft zCsN|np3;Kdgm!@Y5pEQ!*@U)jHJg|fFT^1s?6spacb~w)AKbXBb=v_b8Z0?m$)i=X zl|cEtodiCcjRg0Sk18Z>Tns^+YayPZjW9?|hMfpGZki^U4l|gCOQ;WKOxN-jI{LIv zDGa>W+VZQ$54t9-0$@laHWa2iq1sB6PI70H&JU0xUnbzGnF&6`BtX@tLDUDUIf$AE z>sFWwtLywuP?f>c5%LVUmQNKAaealS6N`-JxcN8;P72)lw;|ZnLWH42Z)s>oGyjMdTYNY8{7%e}cD{oicJ>fyoU)1#z z0(Us-?H{VO`f`1_02~&Ovh(_<)qf%h^YeWMw70!QQP%29^_6k0ONN6{YpD7$Htz%e zb6r(8Pd+`lC+`21mxF8kM>s&&Vjq^OOP{zpRMUC03p~YgeQ5>iT=MH81l$?g$gv&h zGWw!OMyGtojJoO!{LMVqrIo9K9>@QQNcSfgbO{)S)9S%us9~&gwt@xPiE3K#t&c(p z;k5$>izd8IRvJk&0cswXZ;2xomT)Xv=yC3^=W0RCo~s|#IjqtR1t&G?>`$*=zfljN zkKT}mNmwVi3ky6U2x1n&&!ZJ9&r!>KOwHk(!t@UcabRm-t=3mA*9xXgNt=gH%(DPN zmUju7%M}33C1|x*8+>|#{1!kOE-YYnc>Sa+j=LdwsJVb+0PCwAV)T+xzYhc3?%dQi z_YQX~+ejCp5{|-aAED9PcZeb@52|YU;U{h?wE+|7(FHUN@b%lJca*fS0AJjuK)r`s zfK1A-(j5*}t5I-bvi(9oLZ|ViOo38*)j4%W{o#Nr!w1!u&STwur{?jPj8O^!N8}>A z^uCU2yF^7+>MIX7)bfL+_1e@oz{N%4f^rGY5(ipql29{wbd2%GltuoJqRz=<2iMi!X=GK zrWT%&WyS}fZBG=-Clr|}PLfYNUR%;krOZ_xV<|}vbEzqMS_{xJ0kRwT{K1`_=qJ}( z#CnWjJfvvB8C6nKr&HF9bCoK;|NfXaDN&5$QalsNY~Rzf#u!>-|JBi9qXMh}^kvi= z#2t*P62s(f`ATwu(eFRYezH`kLP{#;#!h@emK-nPc|IXaZV_|}Ii>*mck?}pjLD6>^)zlGi;0RK z2+5}`skCwA#m_nwjq!`Pgl00`-rae+w|&%nzIk}md;=i1e%jvpyIN*KzA%LozlE|l zA-SIV$VdD1IG*RHZz9s>7n+QPDX3OSYl6!uE>_;&`f0zpH_pcuolGekN%Pj-P&yxY zQ=~FEQ@x-Mle!jrob&)X;cPTC&l48EXovDbgZ!K&v0KZ6I4P$V>B&@prk!kd0?4B_ z&I{l~1ehMsWTbF<<@KK&bY;4HGA({jge08exZd6d#x&SZp7e7Y%>k7+yej;beIP76 z`jpNAD9K~zCdfC}mzk4#E01Oic^=I^1K5fK%=$I^3_#@FY+(vwQs4o!fR?0lPeDqs z$emG=w0F@WI^w!)bIFKXK7*%vm5DFTT(ovPZ+_Vtb6og+?h?xdai=Scop6p>U^>G( zJHT%^pZQC6aoyTI=|YZs(%XYtv7pim>(;JHr&(7;o<)mRRyO|>Yl{or+3L!3dFrh& z)*emeB(vFTf1UY|(&(xen(<+pi{75c(l1+VE~w95ZUsQ@birw-rDK+y%>wf$Bj_dR zui2&d87^KIa$UTB4!9K;TzUz9hPzjm>5x&u7kWisDE5l(L_Eqk{am;Mr=N5@&pQ2F znC$dZkp!mOYzF;E2U=>Bmg|p7_u$m{JR%eD^Efu=W(|?OjrG}hGoW~gwu}T3CMYc&YkuY5k%4+uyJZ-{z17KH5)8!!c#&VCRimOwdEE^A%;!i|#ix zfbK@;0Ycf*Uv*d`c?FIhZdg>)3} zZG`C#g!4f>>f_Z+aCSy!=lh3?E0sj=D=AQ@f*%;Kbe$W=Vm}GHL2nqfusQW~6U2rQ z$z?B$M+tiIx6!0XBbM%>>W(C=KIZB)P)`q^DF{8M6_0xCRJb3;fVy~-snFRNkXX{2Qb{LBE?A`;i$h~V@~T*O?R&NC z)mry1eyrpF7e5mHng2*jkf@G4%V+nKUE}frm+btU_}(U~9AhE8fB1Zv^uY1Xa{t+p zTCFd!b=#1lF2`3r*|*Ld5vMKxjQlH;zYar|c%=bkF`|ivmeM6d*n*H`4}j!ZFtA3& zT;0Id{)%BQz(G6Ln?}-#qn-^tZ|A`^GfJ7ZA`mAG^S>q*(U;rr^vKg0wf6q3M| z8>CZnCWJ9_7N3oA3wMEU3t4PixGk>vz5r2kl&&M8ScRQSS!Gg82z$h5aM2kub4lDR zeS^#K=7XTa79$#52+h?cE{i}Xwlzd*B7o^R?ch*d(d5Z_c zbdC~cCw_V*)zxZkjgNJKvOyi-t!Bniad);b6JXj-2?b4?F*jrAn|(~-;vVu1n*(T- znuE8aGx!hxX=8o-)0+ZEVkk1?#~snS?BpjK)0n^E0f6hc?FP8bH>o#$>t27O?3Uh__`391r)Yyg1Ers&Xp86si+MMy+Siay=UsNqvO^Z%#M2; zImHkX93}X}WiY4#7y7AAN3fx*=*0d_$kj6!QDLvmN!lP)k-OGtI1);e;dYy^4)$Lh zY`&zuJM|6qwB^&MiiySHl|I}$*m-s273NP)Sq%9j`7Omj_*Nm;QsK}tWdcvfhCU;WRB zm|8k@-djjI7^`PlsvwLT2Hn1^cFitRDD>wEt{26dAdpkuNMjpo2Pp9AsaPm!PXm;z zk{|>f{RVYSUy=_**z0P$+Djt0$%()iStmTOFQd!^N?gHd&-% zZ`28#JZif`qw!G$R zzsh8$(=9C%j0n5C!4N60geJWb2Rwlm@OBWJ zNG}QHfEPi(?~Yh>R<&nII3QM)8)XbJjJ!kPnUs!>P$9az3@ijwjgq?-?K9L_Z@L9^ z&Jm2Y5V%cY8*&{|%nB|4Y!TH)<&0C-5RKa5fP7Ej(l^sP@tTPz9%~5(B#XuSAY5Zc zISB_cv`Y2dr+W+BBUpGh7(~PA(75}kuT$IPiz`7}dJqI#!F7^F-#K8f^t!pP_GO`L z*bBzVLyBHUtr(ddX(cM|w28U_qM?t4L3BFO$;o&37Fh3%dZ%X?1^eR$^RDZePOWe} zJ5PII9w#pe>-zpRb=5?x9j}g3mqz|oQ=^nrf32p9R-Y7IOd+{_&Hj7i5%Te6<25!q z@5Si;1ib~PTg10r)3@ljTuqf7-=t^U7>pHnjAyfQU3dfz3_~i|(6u4OzY@6~-R(U! z@+VSrJfUm0N>vBkiO5^<2%VEAEcX-V_~ft79t zwFdD?%g+xxM*pf!nhZ3J*T@;~93JlMy)Y7kYYCGi-_ftw2cqE^A<}?egtH@_t_|7{ zvk2|ct)wEfXEPgF7I>;wLk&p`f#vMF09XJvA+?dtU2;?w{G8+5)|l`|$0t&x;@oTw z;~1Ae;*{=79{KnjAVeFOghKzj?{VmBedvo^h^l%F(#)fY`x*WV&Wd(;Ar zlX}H)c^n5ZQRP{xs@b2zi8u{elqOe|3_=${X<@G&(!IEQ28ua)3x{^^MDIf`rd-(N zS*j!*zVETy=O76JY2i9YaDY@rH{KyD=!Hn8u;18EFk7|MGu zvE3b#GEmeijyH)y42~2Ti`O0Eplie&*Qv!)N2B6QjH*{Gios6SQ+wg{@NkI1l>nRf zp+Ypj=FEhC=Z*YCmvzrnYM zm~!FIcX7cT`w(7UdbD;YPJ|CO_jY%le$oB)6xaEF+s0kr>zq^Q-ckEEfBE|zT#-?HlwK*+2{CMUicT?Z-3T}D2>zj zD^VP=yerX#)Zj6?n2}@mi@8gYof3|%!#Zv^7jmw#n!fSU7bot-`IDJ;ah+LA{+)|n zModYtOJ%={j-gz3@l3d)p{102JtHaWlUz4XtOIlA)xh7^^_G_z4@4$o6zF%)CJEMO z3&WW}&%ob^eb3oegTcMpSJ*FWf5`5(y!`l1cDK!guer00yX%?7Pjl1BvWv@ScfrrN zHmYvmy-~G^7e`f80ZtFzvA3h1dlbP! zVxu*d(U(?m+dyW@gfF{&EHoRZEiXQs#Hm3S8Hp8E^}?{t0qZumcK5e7cY!F#Qw`7h zo|O4hfY&}jr$z~`>CLCoCvN8E>!W?V@I)~3mPM%3Dy6!z4>hW zKtSO{l(VjM z;7L=KFO=kx7-0Aj}s^JaYA4w`y{+jY8kEIm3P2DJ2YU8cD`~q3wO%6s);fcUB ztbEN+r$M<~^KIyX#ep&W z^4Fma=%&0;wms3n^TNNUI4&Jz^y^9r?~2d(Q&F97Y{s9Cy5zDM-?)r_HJ9<3%l}Wc z+Q0D_|29;>4%#;s<6p>PWN3-k)&F>c@n>calvdMia(tt(jf!XgRrJCMY&dTDH&n^^ zRs*c`T?1rC5%nE)B04XKdLvP^(Z>JjiTlGyRNAkXX|xygh*st=q0}3w)A&3_7h=W- zQq>p&>-ZZzQk)=l2-b=9^|M_z2+}U1v!RRG<@>0ru;dObHK0X-=>o?asR?Lid;vh? zM(DpaG|uWojiZW`1Kk3UI|(Ehr$G`T<)G$ESqy)NdKjlto2gzrV^AP(?9A2{Dq;La zzB4W?tS839)fsAGkr_FDm)4lBW*2LEIzKEgR8-|t`EMmx1M5GLpZtuYX3DCd)xnS2 zW^tlzfdljQrUnZ>D(ArZw&8r^L?@g_3y|>JnRIH_Q~3?`ESI>WChheCWPsFC86Q5TI8_@%XYKOxh>Lg>MC*FBQ)5JQtuU-w}OI*RE1%s;M zgDxwX1g97(0T;GzNxgs$TIXgyopbsin(xy8!0JpiPS`tJ*?xN>ByHv7-hvmAH#0?E zOx}UxspWfXasd?{mr8Sb8D--278m14zCsn*My65zu^6F`%Rd5bE}P6HTPKdXO_-y> zzg^cZZ`r4G{y$Y`e!gXA()qt~XT*FZqYPwiSQh7dAIb2QpanL65!=}fZW+Yc(J zQ`D3?Y)a}BpUHpJ(cs2}TR1s;??#9H4k`WF}=HsRS zl4bD%R#0n731fsU-%B>E5)R(HMv}L`s(15?i(-;J&2n>V$zNb@j<33;T#*$8JHlOs zhpNi{o@hw5w5W^0p3sd|=SF*uOkm(~eFO+#OHql`3EoMmac- zF#%Ak-2#M5)ND|npHp!U{iJH==VWF?{?F^Y5k5tK<8bmDk;56fIr+#-bN2 z#GbkiyT(}EK+v@G$WNCI-xEDvU$X0@Zd@a=t3-g<#KndSmzS?0I{XO%>QC@GZ`0?w zI?auHexTT+>BoTZ=3$@w@*3!@PA*@!|AE~ zoYQa2|DOJazAI-qY=+8eYht1VVU9$k$Y!K6qNe2A;Pf5!ol6)oDi+a8*;2ErIvov# zyfiB0*{n-36QO7;9H8S{z$~&m!%B!D)iuq-Kw>4{WS)fA{ee4_8>;g5*ZRBp_bpI#GB@LR=_{&cs}JM2vQ$QxslQsUWsD8j808a-Pbja1@%G zkmwB3D+xLDgEjUHeW3-to6{J5k^unRVX$8s?2o`D1@9v?Wt+)qL8jN#XXld}3?cVe zATj#P3H>TaHiV|=D07P+)nX-A?-v*FL`L4B))Mkpb}l>7$rm&6cUnoBfq(c=bMOxz z`lic)R&LhEK0Pgy&vT4`MaMavy3RC`J*&EB0-Uh+2>tgtJ#>P7qYu3^q}Wx({))*m z(*=OK__WoIZzkq$J7b^ zE`cd%VmC#BAH(?&+d~85L4f8|xl4+JWY}ow0qi&!@@;BsQtyt4m<1GU4sIHi`l6mw zGA^Hni-2a!q5OIIDog$9f$vX3$k@{eiZ?pVvGb^1x0E?9|#yb6_!Ik8~~p?8`Z-) zI^@QXw0MZ|z|ZNBy~KV}D251~r`%U3gKi~zKJm^Y<|JZIAzDKJr#XKpkF!^w!Pl!i z9-h9Zd1y6(gPwM$!X=5G#&eg8mn$Nt?QMk!e^(pRSFU|p_ddR(u3PiTCi9rP4>!wt zwoWSm`~Ms%Yigcj=kfHnsrMgQ z0%N7&f6y+JqS7a`&c=}H-V^1f&Cj_`u1+-h{#wM@A;+2)GkWIIVj#hFj!R!TG1`BB zE-6JJ&2$%OnrMDKN_{7_ejbIcm)-fyA)=EH6dr`JblYYD`n3P_e;n$}Nkp9mwaT2~ zwhX+DYl+@Nt-#?{oO}_GDd@IusQ%wYzwbw9J;eD$U`1!Q zCG};47I#kOEo(ej&LjBb2DWyoD!;1v1&8E7cI6fxP-pyR3rIZ+I;U>W9qc6%gV+k6 zd{d?76_K9iStmFz&CJXoH%~dfQ?fEVK~wD|e$laeN;WId&KFx-jT58Z?`B}_e$+`KaPWLW z9l*>@c3ILWf8Ylq-jqt(aXOWM?=8rCsdhenj7{{H!um&vs!b_f^2(~>>{eRzf$t=+q^A?FL=^A<`dx-0iAqfuV4I-`WVIO zZ#T)}@TMOoIp2|Z&}XRcC8~spJM*&`11Hik7~01UrjudZ345$UcCdA*9@HOJ5_FwU zKJM#@ZelVVj9No=I>LPw_GxvEgz4VG^PSyoHLqsp2dyOThrKy9>tvlrEj4<>0JlI$ zzc%436rFp5;DTY)0(1-pYCcr6eMp&;vn79=?~8njYKxu_KVTSv{@dss^8y|u^dnCX z(4g}<{UX&?4dki<6rB@@{4t^0E`w$#f&shKZyZx`_OjZaqfZH-={YqQ5@Dt=31QFa z0yw|3mvb)Dl5j(5I`$8rtF`))+5*-h_+7PH6j7amj^o7!OjOW86{#Anq*D{ql_M%% zaNI<7HtMysKf_^6Xh7osWH>rIW2Gw;H&u?WfBLDSF2ZZ-WY8LhM6B@wO9B;&P6kI= z2WXdgs7H-dWC+vuC4Qob`|a?*|4sA;t|8bt9Zff}J(OG}mS8c-FC z)>Uvr7qlGBlk~DUGIzjKGZ+kl8)z;Ds2r+J7$iKHfaSdqok0eyje9kShM~Z2G?t__ z9H!=i!n321)xwG?g zlNT)gYt}BcVQ}7pM*#+JmrruocUb_iDlw=hWU8vAIn=bl=eJAm6mptg^0G~)F&fMM zW3*(%TVTP^U7M-}y(D_VdO(;TFyf429;0fiwOzucLRz6Hzt*ddoSY`OSTI(ATFtJ>=~YI&)?vc#8ius#Me zwaw5bavW~4o=6}qP_<{xpI*Iw(>&aNeXzAnaU6a=Si`E{v@o%`{pM(U551`#q7+W< z8IT0Qc$Z4bZ=tL$s8p4*&`a@_-qZZ)dJ=XRiO^GZ*oevL5a& zhzZ@-Ie|@o+R|5V`M2izCB)cImbf+bqYKB9C!D zmP=(=mrKd{si5aJaf%b8&bTgTCpPuZ2Z!z9%S{tmrys_sR5~Kx9a{?vR&Nb81VtHR z3)q1}vUj-RtS5+Ol`293dX2@d!~r*yYKN^3GF1@=D(6dI+?Q~8ptR%VLsy1?a1S7b zC!;y0wrIymfv0Fpq^s+;7AlR}p;o@*Ca?h`DVjt>Yq3#Dta(X0Bq!BSmlMjRKKX2A zFOpjQ&M3kEnEOs&BYhL@ecNdMD>oV)_|aL3XuC{Qs#4Jp$j1UJT-qwB%Q(U_UwdPN zKqG%Y2haxb6)@mWC?Szl!Q@d@c6bsyKhqwZ*>?Df&irzEPcTRA(xx^CvmD=g^zHll*+v z|B$or(_V-waMVhjv?^XqS$n;fVmIk8H)n-UXBFlC`8ip9@FyJ6;6FWZ(zESX&vp(P z9F*1#n*FIA_Bq~{oiu`pddCO^kMi1WiT@GK`F*yBVE<1T?lyQIda=Z1@1i~c7YtjL zs%-B)t59yJKN`a3KJzz11xD-otDpAw{&z#^^m_}CUo3mC^feUO+LN0SW~@1sb#xh4 z*+D5b5xu2aFH7wyi~`AWV|ddcUlJNLd7?N)-*w!*DU3fRfyi-O0-crIjne%RfB1bA z55orR!0^HXtwxWA2pxT(Q$D=ZKuu+KL`$^_5Yt!P1R4L5Ohxxh;=9pailcP0-GieT zcEN-N7qhtCFu3%;W7#fVi=Cs@=0()HAj8eL)fx>@L*e8KgZKi1jQV&yMQk8UX1_E& z)kmi!tr5@^JENUAevh|rC%A@Dn|OxWNgb>7K!c zq^t*}kCr|02knI1C?k%${_Wg}mtXT;&p*66C;;QZ#O}V@gVQwPz|+HL`8ePxyx4lE z9rxWvF!`=)Tq$W}sW{l;nt@L-4*9)Jb-3>K*z0r&_J94=={t0kFSniO>=OjQwse8u z*Uzx-ZX!sqbpNd(vsTco)xsW{+0}py0=9>})=drFW)dBUF})ong&AOfQ|CaidfqgB zV318)qNz(1sK8Ku;E#Yp7nd#Z2KmIP>UvyuykNa{182h+K|b74cqh<7%H<=?)#gjs zWS(wr{rzxv^YEue<+x%e=`*V(kj3RXgs|c_|)L?0AwN zM@~3nGNPwE%mE^{qfj3>N6OCf#bvu&DlGe zcG$t2#QPplJocT4HL%Zh_6EYH*9^zlU!$EgtTQ0U@c?}~5j0?8`Gy@^hdKe&J@S>7 z)0jY9*BY;5up>UJz~VL=)Jg3nd_V^fi8|>E!@&-?baT|R3aQd`-{asIehywZ$5z}& zH69vRyp54j)HTHJpj}x8C=&PVl|jgGSSTAnhdTjsLw5V2>RWw(3NtNfwR0NxODGQF zM^UFOMr*7~`dTGH#VBmV4zSe8s82@UFcS!09L0IfL*HZ!Btegy;n^8BAwHAKE;`(>S`-4L z4(qv0b(5hGS2-GxPk!5FHqWOPdN8^=cmNL{gYYMZaRUaBdGRS$y>NqG6o(W!qg~kF zfio2E1i4c^sHzNQ}3H zeVj6KGMt9~#PLyo7!H9U47A@c(u;zF#Emz=RfF}!)fw+=8VI_sV_mGEuR0in*hL+z z5@R7ixz4EDQ;(L^EY)*7S7n_ZhJqmt*qspBTwcTyW)O zdEIywyGib`ilMPhwp|(gwHG7tVcIiiyAYfW$x{~k)eFw6u$Qzhf?kw#S^pMM^z?@4 zR*lQ*_#HQuPRD|wu{xFGCgDtYjr27_9n3-a`v@8?T9__3Kb|E6j?7UppK1BwT(ny! zx;&8)!W0eWBg4jP7;pj=NB}dO%Trq*i6J#(%OS#kzl8bIKY_q#m z1|mwJJ4UgONN>P2{BYEJHHcH%4d|E;2Uoja(U4&9+a2226|{i;qk5_sw0$|G0LD_L zx?$#AyKPoN?;8Fxke$H)TK>S+&$alIQ(nX@jT8c^VYi=~bOdR(beZD3TjDJ&Ck1+s zRbln1)>?Qp4!^KJ{u(OPM$c6UAupyx!JG9l4;3-Oy5o{g70Hez%&e|kCH5j~4P@En1 zL@W3gx(t{@O`sT2jC(z7<6yFa@{N|XSXhMA3FGP#@NpX>D`@;#E+Odc&4fn0Et}(#?jWySc$N)3KLZQ>neI zJRzs+gYyvy;*k6RyVJG+QU6uAc~0V2Jh))mnWSseS=eGTq?v^ZKX7 zHdmej7J%E^-Xdd!`ci#md{f1Cq#t8j$t>l%s&2>@MJch=^73%a{|JG7Yp4%P)um6m zQas4K*@d&ra(!t9YF_ed6zT~Kq2cs8Fa+qX6Zi*?aD>{kT)~@pu1|;73wnH`5SfE> z54N)|*PK~6JBLHs(wy!*+G^0=?F}@XI_m;`VL?w80wO!N`T03zX0T;Gr{;K0 zagGm!CtLe!wZ3w>Ryd&=8HP`sHvxsVaA?saR(5mnvfhA7)EZ4o0@JZq1)Sch)63Bs%rV+C+qGUxi?6jKZ_C3 z{(Aj(>767lEWo#Pqo4(cTYz}VuiPCXk`juc9kx0+B|)Wbj9#=(-BEuykV^59W^T!} zqMvHRc>G5eQ5&V`y2!>-Krh&H zqcd{MuR7#n-!@$vfQg~!Z%^D#1pT+G@7VOy%R7JiM4i@t_zn8>Ak~xCyGI8*Z)&S6 z>gQD;NV5mwrFuN4E>k#XG0xP+v$bq+=9{OXZ`w@Xw3&)bl!PJs`c5HqMSq-22&r+R z*C5H`u&aI|1q{*S=5mI@K7RlGv9VWyPmyLIENyZ5^PD=;UWq*S4O{!Kjt(1@+WrcR z*Qhs$JDpl5j{7LKh`Z6Sb_SCY)-5IG7{DvLq&!H)#!kzaYE%grVX67<0S;=qX;XlHCPG zdgg#p@qjJU5QBkBN47v)CvTAD+fDMbS`3G+MQK@8QPA)NrSbBK^3lnIlAO$>8U#Fm z%H&5bXEFV)8=VITWy@A3_ci>QsM9zeo_1o4903gXStst}9cz@d5)E{X8{vRHP1+ic zmiv)^ZXIzeP{4%aUPmCFOD}@67--|*6Ge=8i53=EY%!D5&%<(BMM3u3nPeE+1Wch+T7hW zH=$W)GXbn)fpr(oX8tu1S^+6rt$5Vqs6}Fh3Wrm^h8_fL0Gf1ycuy^%FUZe@;}>^VxauEaeTZOCoAx;3_m@-KAXP+; zuwSFtzAgYZ*xi3;>NfYUP^$K2ZI(^7mh{6G9FAMc&Li!pT2J7oS5jTA*4FrxZaCeX zl4L1Ef*NBRscNl~6y-bBReD2qZ^mA}+N*8*WNp>;B?5Dat`5o66cOf(7p94a>=YrA zY3@N_vUO}g2@F^@8(Y$euM`j@GlmCgK}uYFLyQ&8vELfMj5r38@}T z7q!Q1T=}OOCsl%oy-q^2P3Qq2hHDLm*kwpg2SJPXfbxgSU{C{g_LGhq>Im96`g^Ox zfkUAPD|Qbl>LN#NL}6+&jD{mwoS9v>`RZW*#lhxF+OAUH8kO<~`Shvc2a(n}54R3> zULARb`O_3-pKTs(dL{9LTTa!wYJF|3GQ~}bam?!8C&PkB;8Z?~pXR1?>{?hp%fz6_ zp7jsiQcsX#kg0_ZaJphbo8DA6>Wd4tYO~qwH>(oTltd0C8lL0QvFBh9!8GX$fo>*p zqC1x5p0*tNybBv*7M-&XtOINJQIX1lbw%}J8Ow_6#K~GYps%e6w{FqiFX896%kMUn zHei5JENK>&gEWc)7p!q)PjM_xe5C+KGC{RCQ5Lj9KQ-Zgb#rqm&vXmNxacNVGMfmxz|-6=G}jue|U z2zs69RP)sL)%G=C`&iNj=R30YDCv#1M9NjsP#=E+bC4zj5z^bh6I|U}ol=-qCW35~ zSElo?Dfy>xrYSk6^_+RIxwpIX^e#2S5#t$ZDJ@rYYHXNHFy6Z%k2S2m0ckf5BDoJG z?A4Y0i;hd5#bDEbjOVa%nsPa8huQN6Orsv>$VVFvqC2)4EezId;fiK7nAy`TpJqLz z`f{d4DJqwl^9ekQp8i~x#U`%b8EN39ud+?X2^U2g?tC`K$B#-+!{5+nV=0G<1cU!d z3bJ`{*VJS4AfIwQ15Wsw)BtNJrUsY_)BuOsQiCyuz{y1*`q$R>SH6um_vK7eTljKzn(;mygI;ZJ z{eAPrc1;A%pR^d?lq5kuoX+Ny2LKPDBoXYz>6Bhf2`o}iCo$>U6@z_JY|?7psKOqL z0FS(1!U0-qKgK;W&w}3d(V0j*U=2N7c`y?Aqh>yph~m*IjLy*Q1bi<&aWZ|{sFw8F z>%S+0Y&&YD=VpxGlpzBC2<^tabaGMp5-vkZN!<3yiL9i?M}u9er%! zZxgVEGEI*yl>JMvg#hGY3#a5_i%$BF!xl3dcY!Squ<_V}m-sb(+2G-fmogr6NKs+@ zEoT;g+(KV~MJ|{;T=LTMFe;VdKMk+a<8uetl?5p{MrtHHA_KhM;Co;*BrtNX#e)iI zUBdrQHY#KtO&<0C=f$g6>~r|!Nrf$PpY0#I821J-#AUt&+rDe4Hy*yd-rIbMqCEPo zos5Vlc7xo0Vqr4O;+ryMvH@;uQ0biN43P^-ZW6wJGM#8tplwb7Tl_1|yP@-HvqZo7 zjdD@ZiCR|Yy-}^x_SKQ(+c-5O$kOZ-ummafBhFefoDF}53?nonfQ0`1aSuclh7@;&J`BzF5(D00Dwt+>2U4 z2g9eBt57%rcZ>y|>6Gy(hp%#BmHg!x{{FJ~mvb98n%yXPx%E9vscf26$}!+16^L>5 zm6E?$2vBRuRBCU@-J{>`GddycKFb`nw0U!>WH4yw3=jIKL7Pd&|yuCy`>!*s5e1#%JwgVu#Hk7nsZr>(Vm1iHJv#d6iHMsFK-mAe!rz1pW( zxp-06nL_%&`LZi@{7KIP0ccm7wmO?PTcuo{Y3j>_o{0SJv%7Yz1K4E2OwDs-1R2&5 zxFgE2Y=@_#Zv+=DE4Xl4b!KuIRg;p@;?GO9J_}QPj5lzNEL4YN(4K*QZo<$gP>4_r z5M3q;2B^|ju*u?Pifml1Ci|E{AF@t`}8X%Y) zooO#YLyr5sXmQ1OA7ZUq10cd-@w!_=3l1_o|K9Tj7qS`gEWrCnlD? z^48yXw0~Oxg)oe)IaE+U;@nQOAI|3{HP)sl6T3J`94E3&z0+GKZ3Mv|ue7-6*)7CH z&x*uF&+cAal-USA!2j~$k|oRrS-lg=vEfu(gm37kpO&d#sTf_{qU_2OVu{K01Z_T+ z=bo^4{AD)zm?$Qe1&0nvVHRhhV{>-ZjVGmJi;fi}%j~19a2#iQE6RGmkU%K(HdehQ zaX_)`?lZfPr&!0!Fj%(nnLhfgb~ah-bWEWKmML7Y26FSkn7MpFHq+FWlil)8d zK$hIXCFLbgIkhRh`d)YPRA!1yLjrIE*n4@`cS(CMJ%@x7?~S}2ZtrD-AXwOU%$l*f zdaFgc??!i>tXgixwGF%dX0O{YtQFqR4db}eL@QNkrt((=uRePHDC?v;K=#T8T zOLNY~U^0K)kqXFRB%p#+gvQ>;`DGcuG$NW7l+up1=$vMo*uPB^ZPr^fp`X(P;ywKW zskLnYls>`Kybn=((wtDc!LW59qD13OOx_92mYd%XTuzpYrH=VUChiOfHg_N3g!O41xX{G1KDu^gF&vC~Ep#==-Y%yx zotg+_TKavseHSNVlHMb34C2xGg`wB5j7fxq20TYn?}F@vYs;lq^GQ+p1OT+l!P>v{?)1kTE_&ti(R$5!)NLm2wnS3iy$R`O=t=` z3oVt+vlSv%GvgoE%!M-2wz@Zsns1!Y)-@1Jy&QOkUG)D4pNYU$xaY+(02 z4h)KnYrn(1aiK++g*Wt9n)B{U#PglyjE3mw*En%*%NJ<3as~=&bpV&kHPnxMw*L|n z)2%_AM;LPm!+_9-Vm!?P0VlVrV-vBNKBZ(cEssU{foBIn)T5rPA-BJp!ty?{SHmUO`=m-s%PXsE57r+(dMrs> zl+;4cq&Xlpho>d6nz|-oha58xMJyI2JZx5ISdwm(oWu5bxmUipDt*WA8G@lWtH;0YrScQ>dO2BEMgkYkcgFhq}$ ziFbNqCnCdez+>ine<#+yg03zo#DeE}Kkd`@zBGEao4N>#x?oC1Q}sH>pIuKDnsRyQH#Nk5|*bC87~x?V%=1o(Zxx8Y+jRM(B! zo{+Dc(=bjxr&!XC)+Uy7XK{P?xq6Gi66l}#+9~i&Z(r`dJA4X90Z|Ah5zxo>O)uy| z34k|ODPFS1DGf=GYPp{MV`{vF%Fh=KLz^;SjQ(3q16%R#$G-Icfr~ zVOT%?Fq*GLtB=-a>+`635TO@zK!Od0ALo7?)1~tM)Bkz)`sFL&gDbXy?O-4c99#tb zByQi_s%*;vp@g#a(XI;&XK5MVqvw)X(&n#h=Bm(&D_NL8TWMmaL{(EUhJi{z|AdYPr6u z;@-r@aGwQXq~i7sJXf-MA$p?D24M&bgJ%crjIlq>CSZQE2`wW{rEOKyDmpr)fbDmd zdaFM&%1Y7vqjlv3Mc5M>V+f3FHc5yMSmHBuSlL5CAl~)S1%8134TczB&qCP^hbR!@ zYd#7eql0Py!x?pqeq*Z>63&eJrtp+#IQtw%2ioyb+B3HpydMH|$GlOi-BqLR*&l}b}9e=?(>6nsGG6T+-ao!t!29dq!kFJ-O z>MKk0AL()VR_lH?vE-Ki`S@zHcCd4}MK5*wcW!DLkQv``l-3_rr$^BMcPUr^_^^%- zJ@g3}L+`k6jP$$DjP~K`%E$QgzSl`S zE+Yo2XJ+n;YZ^av*~y=L|vI_^pbR_c#x{rD;z^joEAacR=r?7qag z@tD9{Ad~}LwwC&Q9$9m-Do)N;k@~>zn*4qa^PIF|^!fc+MOnJ~IVEqB%Lk*Yw+|nY zRx-Y>&5y1oGpzZb)-;Uz3IZ{2tNQVQOPL8J;FQ#kwa52vJd6j>nYk~=gNdgB_0lP$ zg!^MSm1)__)S8+17{y*|Fu5P@IO>84hK=eCi{HAgrrglqY0-ppu{$YOj=9CWhW^QCz2k1P1CX zyi#$eEm9vAbiD;2H`qn-_{t$k(7^73T+gGEEno(r7@gCCp5*xPyYJMKxp#UR1N4;u zIa-~7Zf?=t-zg3r3>EiY&sU2=fFdF9;$x%o_UYEM?H31!NAD^O?EvLi6fBh(FDWS9 z(ykWZ*hjKEzIMb*Ky3XM0|r*DQ8}J{+Z6K`{UCuarJkcf&`VGPqD%w_6ko;|Wz}L{ zKyH~ex-tCgvq2XsSXRd?$E)giH3JZ@Uf6#Go(UNcMQ0HB9F`8CwnG@P0VywNIjxT@ z!?@YPOpTJn^5mPQU+W53hU3{fbf>(C$^pQcQt*xAGCsnz0Ejooq1{rwsnP@l1MVk;9=#_J0sE>D{-@hHlfsuox`JF zY{?5cD56F)tV~g_ZbuaGa}<%Y-gYny7=5Ydg6@_xnhqh3iV z0V%f*fG>%9j9m&9KXEP)HRC?a!Jv_cwT_Xa{cpDr}N?Z7dS+YgNk@ zDL2uLK|kB59SJ?HE!y^8!wxIPY2-Z_gIx`w<-wqxrt7GZ1Vq2~vsPT3-cY7+CGjmF zlCvAfVLNNas!zjv&0GpSl@m13&rHs+y>IV zEfwL#A5e{uEXc=g;~AF$35k(i!pUy_T*6iGePx&yNs6H6+2V<>4W(QoO5>%e}u%58B?(EVWn#)KS z1rj0LWo)0X7`nwuAW#&3r4?cg+bbJ@NUM9KoM$G=(F32@U08;BkywsDs`5CbR>wc6 zGF6*1N?#1~s}8Q!hC_WCs;`vRfJY*NZmN;8;d&qSqTff+*^Sn1ca*|ppfR@r2NVrU zkU|%KIWo%D-AlHsl<($A!x9y1UXCW4PSrk)xS21>C+=tvnk(+47o6iAgZ6o$`C^G* z?6z2FuDdYH72AazJ@K4ExZEa`Vmd-ZBZr#YhK|Tep3#fqJnV%73Ab*JdayR@>|veU z;g-koM{W9MkX z)5#n$&-pG7fy-7SdlI# z34P!jjPYBHk6}o5kssIVes~od72X+AAuJ4Il?=OHTsa&ZR0-eRd5UHU_*1f9ZS*F3 z;1tf91C5hYWy-y{c{++ZK(w^w*UZ#g9(FQ+zr&P2j2`RJw8lwZ00xI?A=^qF^*|3* z*^F>%gq$(P6cc=bn=cB>WNqRSHq!Iec!(Wv!Yc@fVgNu+Gv$31MmJ8h2WK$qjo&F9 za16|Xk_kbjBV5hn0=n^Sd^YNuPG!(3zEC6gyyiQf#iS3U!#U(^>!PY34Mi!@z084@ znmNrloN#o2(|0BXthR2p>#y+MLLN^(etc8$gU05y?JYQj=O_8cW2?wlbdn#xkxf%a zF$gbT$@hst1CZ@@IkzD>Uwzm>f~Qj~WwgzgP204o)l1{|`Jni_Q6l99&}eZS!+yU} zDQ~@crSKmj9u-dDBLF6Dsai`30k+w4mlT&paw-Mm9CDWftGxTH04QxD7PK2%P`l^! zzfP?s3j_!kGe(gMfpVZ6H6Bc-9-CVuKU2GY5jJT zMqrMJ`iXbiCH8U}_T6AAQif1UTs~bVfpD?_=;g#(nCX%4`cF3J0 zj7c=JXBq1m;^34!F18cX3TFEK3>7Sp(&Xg)4+zJcJzhI{F@D75wA1K*zX@M?U&vB` z{Cxb(MVwI2K11dd((IRsgJ_e)|740L+YAnA-uPOviP`rPMl)qt0C5?xH0V4h52#U4>^F54k0SBq8N1=%V5 znTdp1^}y`eFr~Emzb)`@3p}&H?J7)0bVrYCMtkPSuEeiL3|`?rm9Szs=0V25XPtl+ z$r}MVW^HznD?u9;`0g#Udbg2kS{DyALpm{D^xYvt?z%y1;vyu@kkG4veP@tHf@MI z%6vDTNhyDzKB`%!+1siz8+<&StIRo6l9V5rOp#Jzx+#r{6t39&;+#zMQ?a+fQyjz6 zKnl)edD$?W#`X&!0*y@a)RVWlcen$K$T^=);W#*_&=eEP*9X5i$hEm*%xGf@@Z7blM^)RI4@knolDSc`g_ zeGb{{{9$#Rv_Qp}$5)0Tmrjr4Rl>g^w@wfeQvl*9Uw zWecTHb;Is_6>A!jx1wQ8RQuoL1n3Y%@9Z}#ilhYxw~`L*guN`&)~HG_5UqPz(%rT2#HyrHD=-+124miNW;h6C}Zm^HFoZjlD!&LFz3 zt-%aFQ0EwQ3?(qc47JdyxatNdpVmrtY>ZP2dP$Vhvm+_C?4pn-qinbF@5JU%*M)b1 znVzkviu$Wsx?Xzzd`>kQ__VS#=V(vw9PaM_vVAbynp3ltprXESD183wU+D+lD*vds z`H%Krzj`J4ow7fw%4S6^K#lNHQvhjBZ6JubtRlBl>{vv|vjufW6`KeB@X8wt^SKurY%QRU(EL6-;9+i6q{>)2?1y? zj0_`N&)qUyvnthS^iDRJ>ceh2U#Fk*ZrnpRz3TLoesW|f)A4EgP(Ss--f7?1lYJ`R z`t)0rOT>lJfB*flURs)N(9PRV+ndj}4-VC`U3%77b04<1gPk|(L4CD~X0wY(*V$|Z zs0O_NXk<~arcTrvva9#(|Kx&L!~^I3&@)aVK58b&aIwIvp^~Zog87BUI!%CL z5ncemYTTYUZV-by{UH|^O%SJG#@C`{*++VOAkY*MhS#1lIyGyn^XRY2H>}FrI#ry~Cg8yQ?b7Eq$3Yg3=Z!_rA=EsQ~ zhaEdLN`lj<6Af?1k9b~*?707XF$Uk*f^TfWH@3jLe#(cpqPg0)`P3v=7x?#~xD#mWH$A&=dUiQd?w|@o@f&LeONy&N_g$|1_O2_?8g{qq5y9a2MkISqSyS)~ zPv8Ej!I{<;tOHCE-_G#{PTBltO_*#{6fa4fkDQtowQtj}NpL=I_{l|y@&DV661v`m z+6EY?C_%S;qJ#e9^o_kG(9df*d*KV!=4cory)faZ$dBvvjhzhV^G7y;6@!i*k4vv) z{+`18ZSnj)4b_&+AMCET8r<8#y}O0!uK7D!oP{7iuhkJ-ZJmuUa#Gb>{v0+7_ot>)(8)BQKF>)cnhssGgd`&8l}#29V7KS^LR)EnR2`upaK z?dIO*%WaC+jOHa$;+A#j)?tI^Sbu}Dj$Mx}X2uEs7Hyna$C2rOiulQ}ML9y%;~ci) zUoNon*}y-mxKz8K-|uy9R6iUTN8on*Kt<##vESx1JF-`_n+!01-%#^sc@FQ1?Xq6; zO$;1S+wuMBBYL<&9bNu@8eB%LXmlLhWWTtd5c(8oomXtyVDYB0ccOodqi7%s$GYf- z2=VJ|lx*%2#{)Bg=2d(N%zV`5{gqlSX1@r7w5OQE`f=mVYiP$wx)!biPkQL9E+0PT z!1(eo!uSJ|{s}0BE)$)hk1t3lan$^K0%N2=!zDlhbgp`SAo7T$~-_oIY!Kt2Tx zMDl*!C~>Ic<5DglAlfLKZ~(EB%j41syCHP@m)C9MsgWfYsVJVuxjj@XKe!>c#X%yw zXZ6N}dQi%9rA;L^*bkz1i0HaHU8W85-opI+y!r)Bi9ilEG-E-*E?^|c3;75Q(O|1* z(@#H0Q4}Us29fGl75T09sAWQ|vyHxnsa+v*wB3K8tvLcgkEgsrQFwQ^L^rr0L4Xsa z_a9-VF$@N+)J83oOHnv8VvvHfGi*I|5JT4^2OFOm@CE|a%3wH9ELqK_`%Fh65lAFD zG9{}oLB$#>gR!8gArzGZrY#t>NvD%S7D6jAerhM|qFFA+a)X9qGR0P9I5+|vTNOt@ zxUf){!>?{YSD3=!9EcRmfbi?Z=3qJP5nQ7Q+F@QY+pC@ zMVZcIBYEm5JJap(_tiE>?P3XFG)TzPb{lc5lsQNZf*uAhB=1*|jg@9D&nUhZ?^lC! z3c?0k8|@BRIRL|=tq3b@lvkz}sbT)<1ZtRbS`+?*&Ar{7r*~t+Z%3Y?`j?Y_jSZ7& zA}>(amB0wm+Q3zW+c)ptv`04&w_j}@Y#!|&h{|4KwrWh)j?O5*0|vi28+T$i?!<1~ zvh`!cV7dZj_i193AVGvNA?#5Mdd(7$myX2E(>HZ2>S-!FfJ^DS=k$OTAm%up^(-C% zWgc6rzBw1NrB?LHVxr|bhR6S;HRVhLQ;RQy0u$(s#)e#CV-xS1(&XN)d;Lmb@lel4 zS$BH^J^2Fi@u#B}?f~31&2VAoQx0$VQw6?JkqK19AG|-5bg2C0<QL^;M zUxNijvW!3;YE5ApX4_Y273OBSdp^kRsO_Du#9IqK)yl|6?vNuwyRZJ;Fhm6EPekDk zj}CV3BBFse>;yEQrcqKuXZc3OCQvawT=^LJ$8tj4mU6mvsU?@5`w2ux@F17kn6y8V z3ChFWq0B>BIy`}Xd_KAOvrz}9^IwPk8AB=Df%mh2qZ(83J~DKFB&it7`N-tuF+S4N zEZ>u*InMW7uIHBY$7|Xcp69F4BBh)@nvUrzT=e${lr9cgdxR?OPTUWBq?9aQuA<)R z3ViR-N7Pc;@*MTnYMfEa{c4>UQe#YLM@cpXJ$If*mtn8&kqfC!vNkbm0j;2nmjQ+< z%PCZ1%8c>92=aAqCUoa<-HQ>6a*|o~m6f4^$fDA6Lcx?ImJ$qLKR6GD{J~R!gMLd~ zbzHsYaok2QS`3_w`Y2efy8*Q6CSkrdU&Dyu>wHafUp>bVf2e+abrH2L)aKJ246PdI zFxYj2IFPWk)b{clhC}uNkW@n>Lr*;+wsGQkW zFj{moK-hAK8fw|_pPBHU46sx@kA@Y{6kteU*vt~(sACLeEGsd&{1lhKtyYr?G%^1d za~CG)aqyq-|5oV>yFa4|*B!bA{kp!F{>^Q?zM0SFhXek%=#M3FIkfO=+Og$TcT4-( zW4%F6a#tmc%YO$=p2GE3&e#_mISO*FyNBrOQhqk%k4xy5#bw0qvnqjT69C(MgYk{j zO8rrNsj9;BR-%^cOUMKFLZBQ^;PApc3i86Vp)(xAaX36l$-kMVBZ=Hj0~-!7lF?~0 zjD{mptsvcvi?Gv2Pn2-(RnQ)cFN8r*kv)bJ_fVY%t@lYMNG_r?(%ra^8uI~0pbuKZ za3C5W$WsGg)Zu6i;aoy874%p_VO47sR<&(>cHLWe152b)!F5uDf{VYtSzN5px@l6@ zCbbhXEFRCkJw7fSAD@(u;qTq?+#>ueFP>MVPbj~EvrupvUxuvl(dH1>1V>#0>xL&2 zMWLV2lm=_(Ruxv2UsGoEP}`;x+;C9XM08bx9x$n`ppUs>XgjtAFd6~5dCXK^F++oG zLzqon%4wbbD=+F_-MFo|hq0%I$p(^+Mv2HriPK(CkZ02l%p(3XnlYXN8b%SO74#@3 zeY?rJH1-6y2_1Rgi?4ceE=#n%gbLJ2J*dF^w=Qtn5l4}_MlH&T3@VUaGy_#H%Rg^b z5f~rFm_e=7q4vrg^c#MWE(J&zkzwJ3b}+goK?r}VCl}BuZZ#@`IlX}Ih;m2*nw_>) zO~F$-e}f!YC!I}`F~{B*`oFb>ocvZv-ZK0?BgBxy??^im>O2l}46Dfuw;Z8~8`wM` zk;~>mBN+JKn+%y#`K8esjJ!;eeAoy)pwLYG4oz;g-0#nJcaQe>cPUYx8|_Yqr`l%Q zeMULp=+$X^-}jnaAwD!pogQrQB{zekgaf&(rVP%8n{V$WW!QV!=yl!i`%nMp+3S}q zgp%h5Y-{aNx9?_i?&##kX~Rvnf-Dx#c!_4C)RHcKYsBv56cBHeAPBWC(*p3NppLM= zQT~9Ln?WZEl20|yZr;siohBX)fH;sT5-f<(^*quIJf6~94N!Bwil0QNp#a~M5kRP< zHHi8YEXImDnsGvBbPHgPh&_X!Qqr7MSw=9&D~pvA zyI*8045I5*eVE?ddE-O^zX*(KTw<*;Uu@xdw9^S&!xhaX!JhIQNdy#SK!Y$y;vU&# z!C5>JQS#RQ?(X*15!oLe!rA6B8pJ)cqc!WQ>gv@=OsmVF7bO=&XjOl7c82sg>BjFv z-?{Re@&^yToOfaR-*_ipx=GqM~L3?9}FgGITr3IltP*3Y0}o>oZMEFjs=#g0rx5m`DZyVuLyr!#p{Vc zZvjz@k}^YGDyKjFGXuY5*Eej9@fA>Ck!luPEs+s;>N5$@)0#CY)R14ryjr$?-1%OTrM5E*cU6pFJDI zVt9)M=b%(OY5~d9dfWFY5tFn~RzgP{)M`gFIj_9~&T znRU^1SFd)qrnsCP4`3R*8atSGa9x|7p@x-M=ItdX4WSDn1fwCUs|^kO;$0Oia{ z%p4KQ=`So|w8QZN`O}m|cuoT=wO=~bN?xKgv{K`Tik7sZQs)+;OEn<(7TS@c$`8;^CF&lGdb^|AH$d6| z&pUvquCW2d{KH_yxLzzQ__C#Dk&oJ1SP=Vzo4Kl-j^fixJVpR0B%!^^P)EE)n;F-X z!h(a*J|$5?oh>T3ZKIxqF;>Y<_cZPZeRSE{BPq@!jsTyo{W1+;J0Bs2y4Mw zB|R9YA&dkZ0Pt4yfqq!WhaO4{;yxZoKB_o5Tb18609Qb$zxjRO4j@oGw)HWGT_Te3 z4j8t77}^Qd6}N-IRn$XRgNvY_#O<32@JJkmGBMa(@U&zzZvpF!<~@SGhMVA}@bahT zv;RfbjAG1<8^W_*jA6k6R%V!5H|Nq?VAjvC@S%UTy23-T;M2uTTF zs|L^+l>KNThnpd9{CVl<9GDlU%ONzkFr;=J0rQN!$xt)=Di4zV>%KrNTtvn}%VnkjxeD z+}J4rM94HvGv?L`2M`AO@N!%DGaLZKAl4`lMARl#df%>3*dz$w;df1b9~8ATwKvh> z7bXY^H&G6lSY!y&!^lE~W~)EK-7gB(*UV`0>G=U*@|8aJCu(PNeN7qXMUbmt6MSlR zL9S2C1`BeZ_5ep~r#l;qK+qOph;VyK>VQ#|{5j+23!n>+abWOadC5F2yGwzcXp#t! zDO)Zz=M}>7s*Pme6m})NI@#L#amqn2*eG(ggdlIDkkedg3^FeKUnM&bU~pbLaPLH^D*o12Mpv}j_-$1`PMWE&IZ&hFq+yx@Pl^}ERJ?l_M`H7o(5o62Qa7owPz@P(!A+^yw=#aI1Aqt#r_lHEbw3c;c~+9 zX@)eBe|lAW{ie#Y!L2Qlq@(mGM%R_-|n27&L0&pyD$Dk$VBRHkRAz8X?yNZ}l@dECy3t+H+@&W1FH}q-8RL z`|ph2nt5N(@(x}Jn_1tuel36Vxoniv$1jX|;q4vH{!+4hiMPeQ$!;u7*<>5)O)oAM zwCj6=DY+%P?`6T1@;DRAPTiiZX=eC@am9Pft$YZPJ?V$72<7^&NcToZSt15s zi@&|g?wn(h!}v|~AbosN-rA~IhqCaV1F=#pavtwS`cA-$FKP65#kH`~lPX(vCxza3 z*_l->RHe6S=3QPz_`Q?~a-lXn^qDwjLAyP!Bcu|tg}1QMwy<|;73+|AqPHn+wKI13 z?z$%9m3yiMWgQ6JhPig`YSQaQl5WdlPYLlB*PLAJ4ms^&@G_P}C`EC&QPL{JM1nG3 z^E+A6?B0Jk7yiw5;~Pu<-(kCvOD?{m3CCA7)vz?oC3GH3Na_tkH4od;yn@}m#XcbM zenNF`)Nl}^Nqz#o>~wGoXvbGQtsk3VBHbYqJ`y#G3Y11}#oYOzr{M3>1xSjeMO7L7 z0A@Ue+vB}liwvkhlGP}&}zPA2IJm9LPr=|<#MY4#7RER&znrk8T`>(jZ@8A`rl z8qRGP;!e);=>!dIkSD3NSa&Mw!te*ZkTpllArAFI^wxh%&O={MLJd$CxfFJ_s;6f- z#sZqgLRH)NK$$x*P%V?~uvvI{dXPE|=B@3#@bJOjOiIkgPy<@C^rVz)FV5iN5ox|{ zwp#Ikbx2}$6nE9p0KnW-)lSe;yFsrNs-xhh0}Lp;4@K*EzGWS__Pq&f(c#r9D(ZJ6x3?6bw8$ySfX^jR0)SZTAgsou=$)0Odt&k@^U`;M^%{oe|C^E(dZ~gKN)wSC- zmQql?q+`UvV`y~llU5Z_)hfFLz;b9=fxmbx)2cTjh_HS`Q0jmdHL>ak1E5!72Z7OI zAoX`rUanm!RH4n6z-BD4W9-qQo{tq5ajoJl;uA5HX@1CX`5O<`A1!6%lym5t_ra5V zDWzL4i%M|kHBywKX1Ol0j$D5Tcq?l~L%8Cj^Ij|>e7UQF_IuuX+YILrXhv{@He^N` zgqWlSL9SdO)v|O%!t6RMkP>)VB>tHjVh|QVpPcsMA)VN(#Cm|hL9cgW_RWBNU%E*& z?smt|vR{Pe6LVs=xx;_Lsb0mf8=&w+x8xa~zy9-;5VU$|3r;;F8DOqb(k=Povh z42~gO_w+fHBZ!u328&~1iiXQ1FGTZ(IM3Cv}vw_ zg#?ml&8x|p(!Gefug&t&KcH|J#sVqk7I0C-jmxNQV*}&yU^*^Dddv>eP>IrZd?Euf zrfeSX;f$2vy~j@y@6fX-7}&>Cmu1Akb3pM@8^#!(!j_!??5_`y(r2K2cJ&hw*yb<5 zUOz*MQ*#r244M9B%@`GGo9W{dVzMga<@5N2G@NR`RVWz8DVo3}!P$gsp)Uq)?tvU1 z14w|=haV@|F5dChQe(tFXwxtl4kLbIM+=lf;-Gx_&*$>`;4;&L1I zyl@C%;?s~z9tFlyOg&o^%U8@K+ATmQzb{{h_k1WM$y?1h>C9r*SF-h6s)JJsn) zjCW4<^|WDgaps1~IQ>fB6IFP-k#EJjP{kLpjt5iG%!WP^95TCrSSkK=%?@nLQ`71} zlMU=$kD~&1w!Hgn&H^8&(KOzJ>2&b2T*AEtvI%V(b7vkOx}eK`BOWX|)y{fGJ@RcO z32;C`gC_eGJywN14BSTE3EWJ`ll9`Nqf{RaEfdMNBQ+?b^CK`eTNGpJ@QlMvqJ^|^ z69S!a9g^7B@VcMeboE!)O$oYOX!gRZ!Za?L=yW#BYKqM|4NMbnP$B8+BJPB?u#+;p z!0VqTvb^4RWa`llstF85OpZH<0-4WfA0G|!i%41$;ZXi~7_6}eZ|{?K$FuiRl>q{J-$63d zy9|2~x|hR{_2=YqO-eNTQ9sl^n2swzD(mxVaSZH3<5BKAD`T*$VBUCv#;!XT`lxbew8JgdTS`qqGF^&=2s5KrT3L_5Eae#~)ISeSm7=(~t8|n)% zZgMoNIPNTw*b-&L7?~R7xY^VrfD;F8gQtorqm75-c%+F{o-?u{yI1Y`on1a)uU{Vi zOui>@rCkK%OXD;Qdy1u7Y`5Bp;SaB)Bkh;$7bN+Jf8;41-D;4taJfo{PP&@&u2Xp~ z{xWI};v@#@{&SR!fNg~)_+H5PsQ+EYGm7iQ&?=3x)tcvFE1S`EK1MnuMB<3Qv(-Aq zawH8qXUg4s6p+tE?LMp0P;70%7{Fq0IYcPz_J=pr983Vh_~EMasiLjUgaLW6_Zn>} zi}!Ori)F1T#u@699mVF(8}V#-Uv|y_&fATbP1d<;-^^m+HuuP_7u^2ZG}~<0x{}ykXU>R)k^(weYuKl*Loie zhe`N|d{s*Rh!&Zse58j`dQ>;DdSQLT$)swcCqNAxQ6i7|GqDvEVuFck3ss?MU<;9) zJbY%Hq#$$T#=h;w?da@=gWYln7lfm&&I2-7@u!RepJ<;_u=dcaNkCB^B=W6m_nC6? zl5&*?2aPf-vozVw*J7{|U5oyIy&VjLf0miYz0aJXLN9)_pCdU#nbIxG@9sQ3*gW{( z=FT&<48?C<{^#w3!=3#-Rqh7A#e>g*aIpRJ4ucqkml5v6(?Rjw3PPG;YyPR7-rOyeng}}&+dcKd;SaKa5)H%pIS9Leol%RzISc2TS~!SS`-k2lHDF?; znf^6erznoab)aw{0V8q$K>fQ2IFWSNX${19z(~+Jpx=fYv;Wfms{KAO{{v+-jMMNU zxQx)h-&yYJkLfUF*oLaU+89}PDv+aFNYC^dBi})DMjQbrGF7Xgw`i2SEF0sH%7!Co zh7}9EN3sDdE_xBj3wh4ch}_ef$GB_3%m2i{*IuZnK)7M^3t%k1|7~!(`nOXQ5de+; z0i`JkUuX$2r3pT7wJZ=V&ac%>l{)ZvJ4`Sdh(L&dkxzzz1$g>KXQjwTm`3|#1|6LD zVxm&cSwKz}j_iRCe6%svl9=2=majTxd91}$xRP_pnwc7H0I#QLEE9zNE?kJjerl8N zZW!QR#i7gt?banSE2xJT57>EyM=9C?p6%{xr%$(7?9OWDRN?1!D(Xl!mUQv2EA;2+pK?Y8%(O#Fz*9)(BEo#)~6-HbMEiv?PgI;tl zVOpazIynsi9fq*~_2UTrzLEDEpn=XY*x5ql{8-nYv}-!zipWo%_`<|Rh9?(skOb8> zshUQ!$!%(yPk&opaWcsPRWF-ooz6=*ze1jBUP1E_7_yw?e`*#t&(N7^j^h=FM~FM1 zzd8+e%waLuW;aPW77^k^iXr_aC&4?c>hLPoXIPx_`q!F<>H2TGItW{cml@<`A8E|x;}I5!-RM*a zaPd6ps$9?tz`G6!>d3MN;~b3p?xB=Jy6<&-9eWx-W;ac5>l-J zoSvDg-A?BVw+J1}#jj%SpLx888TFizbgzpTN!$RevLM9u7l|mzAu!<4Nv+18YrqLq z(5o5gAXOc{6c2u|d4z*NRD^UUWxNV!E2!#|r2|M`c(utX8Qs=#iKGCCp~+7}I_aK` zI@&6M!gf-zXPZZxz~!E^34((K643(=377Fkxx zIaH-$H?s+wUZrd%w2~{fHndZt{&IDZ{jVJ^wh3iR$)ft3db?D6{BC}6(R`YJQb%^D zga}<+f1YSt5BCn!Qt7^N6^BzEbnwFAhGnI7g9)?C$&f_98U&;NHPhEJZuPfm{AP-Om$Jy_d!rj~T6g zI^USVvtBOPkp`Xn1>#t?3JT6NfzZM!dDvLSHxyN+EB=Udp916rS|H0YaA%bDRexNT z6#Puwz;XFLF#srkp@=XcMHwOKpPxJ6#UQ`U#b?gN_#>GJW$VbR1m3j$sivahOJ;iE&s-AA1cxD0YFG4|nU=e0U#MwcpIS_MnG%sc zef~_X9M>O>5r}4meG_k%P$kVsJTZLWygrvYH!FO5Yp#tL#F)FIL++YB+mVzseTT$A zroBk|1c=R z!ctaIPmFlk+mq|`xED~ELUaGbQ1HTh(j63x4bdLp%$+R8nf5L@lLdE{#lUBpH>-0u7|}Rm#`9M)`&~6A{Oi16nl*Qzj=k zjjJ=Z`>c8JdaucM*xr<9uRFLqwE^9d(2IZlQK)pMOUfBoGE~M1UngAskj0f8Z1qhd z-n$GiOlTW}S)rC+O^59aflvn>)6(?7wy43M|(%58UV7Pv!tq%kVX>o>1YV12daXs7&T^I6Oy=DqMNbbqd+HBSJ#`=rGey<@}21ojIpr&B;37%nTvs-SWx=L zp&i=@OX35{^bQ)?1eUG|&=I)6b~tQ6LBu~%rmsC^lr&4e7xO7md^?qLPE5r$*rp!g z;ING;;uQcC|34_I%=8?&UJ6KN0Z_D63Kc4u>L}2xoeqW_4(8DfulUZsr~QVphhGhV z;$HD!NlOhRd)V+v3C(o1X?f1TsjVn{S6zq z&@`3Ej!YfxZ_zc~84&yuc{#0hfh0wMN3~(xg2~rlw%)v=;_Z2z#X2jJ}?tYYrs9U957|C}%l6jn27djgxf~U#N(m_W9WYZ8B>s zP}!&y)7q4+R6cqyEw5<&#>YCLrlyj(u{2J~AGWqWsak&!^@cT^fEs<*nNC~}*=J-I zWJ{MsGXpS}1H31h3?cx68I3!a)W;@mp{`${8RKc2f_V~74MKE}7q$&er}W&BwJx}A zagH-RrlhwMP|=+snSmud?Z8EvsKMUJpNwVX##|>01Y(TE#W-HMSvv$dJ)sI*IHVPl z-dF_$Qcc@34&a!Oc!O4r-xY69o|#%zDJQ3EpE6@vJfHS3UC^Y(i{<0)8TWm?a)$?= zu#3)k74VtiMVddgVDhPJYIV${nr)$4tjWp1{8_~t4E^L1(H#m7+m(R7M2-XU8%K^Q zU`+(Qb5eLDr}VJV>v&TXP|Ol7b0zE;y|^|eBx{B5P%tD>lCch03<@rDi)|pt;5X*nt9V|qK5a#W9};q-eASV z6FCdzBtW)n}>1qGh4 z>e>b>shz;#?wE6Xd%u#8F2AsGoVk^CP(O$Jn_|gM9RCAVH1IRI6I_C$1Bt{jocT=Q zwD?UQJ4e)vi|MCq+}MA~XqQryY%=QhVnJRtB`(iQxsX+MC0D8R9W37bY1Lhl#XBSM z`bhKP6a#BBspJ|W(p8Jl?hdHmMSMk!C*){HC_W&iUUr>HkXX4bYjbla*fRyX+&!jL z6p03EtwAT-GPyA<%Vk167%wyMH!l4BW@Yl$%IC_1#k!MQNr*m=Ga(C1q4b*}_}Z zI;}F>c%Q&C?h~kv@lVs5hLKkuSwR?WD#2(NcTuiqi8wi8m0=JulKu`8A-yPe22dFe zMpizm$A=9#JK@l}U}gd5jXsZQVM9&@3>Wh(?!P|Tz^F0sfiE!o5`Ss zJ!m2pH7X~tHVB_;S1^#0Rys+kQ51&}r}KPCALvWwUc}^sGF*C@kM`!OqJV8SA4rOd zw(Ob6)bn#NfX@i1TCT6ExHkbN{0!+dPX_vGnmY7lfiqVJVTS~UK!W;l5?$Y@^6Z@J zf7^(c&SImsEq_QIlA06ph#80xhTj~HdT^rZ@PrdaBQu+br@j=R8`K31hbV^rM{+^g zD|qhi#^{s>j$_Br^j6RhQHr(Mfs-6&1L}Eh!m{5dk)Aq%-TU`ZJY?5{fXsciU+nAW4oe7 z8@fD8{CmCJ1$K@6U)4oQPvcSJK-H*G&F^wE2TpaLXI>qT96!>P0t^A@|glQ{>`o5Qe8o+k`1E-kD)>LEfi_&(unNg$V>N z;sj_R4w?2^&{|j+43}U6;TyVDKvx1Si~&9v;l&WcvdS*cM?>@iBbK7Hmgp|ZBkQ~d z(S?S%VKB8YIO9Nu#NXz6gB4Toh7{TV^ImiY;D}3@6{VI|%%Tw#k_?9(xoISGIrb64 zQMYB7pyy*$DQ>Sgq4a5MQFmtwM(v=0QTt3yi~H)eOWLYpsbb~>2FFaic1g-NNjOVq zVSv-;4bq(s(bT=n@TpVxUw3bnu;rXIy#~0!C&*qJr47Ce%5}sbJum3EtD0Bb>0IT= zKM)VbhTt^(Lq@BDi_J|w>In`0C*i@VT7W^&q?-Hj`IqDWq%EPKY=cJ}Hl*(5IQSKp zX~{udX!3>83@&K>H29puw@eb-U~O65m|}tZ#%HVqc$9oS6g@msjf_7i&UoYu#T|`;9ssZJT23`_&1Br2nML!j(NmwAs-OlAJHVQL zuBQjitTJ?D{BVB7?FkO&Nt~<~vlcH@&C=()W-e~M*rq4WW^yu_$nOqTcxRqv5rl5YnEu*S*iLHGW~YsxqvN@nV5-z zbI`jwZdGP1-Y(T1zRP@IHHo|8h{s*@q!*sXCVsN|r(bJ!K6`%LW?J4TeZvqZE1AXc zCDQCE^*#NeVqvCSE|~iXwX?T#w6k}3w7IvnopV`X4YR^CeNFIe`*7=E=hYG35FD3u zj^k3UQDwF~S?Ercv!o7p_Fn96tG)fb!=E+}wx3N|g|V9*pE>Malg*mOlS!}<+x`#j z%xnMG8Vu=ST2vbcxH3_;3k{9B{k+4529v%0%2r^}@oe=L%xSLBQBToaQULh7p9-4Dmw!M$8&CLU z94=b*FX4#gm~r51ZU^NgXBoaB&Ne6>D=NOWRY9ziVD92Og|A%bq6#@1qL_7B>?G33 z1A^pME<3GO*e^H*tV#Fu<*s!4_*kT?CKfxr8Gqu!PgwE)NAf}$W63cDcpd@VHrWN$ z^|iH9HAYel*~|@fZ~k=gfHA9VMvtm%){Oa2;zzTYx!H{E+){?xoyG(C<{U}mZKH%i zV)2UJ`0v%D>WWe8GRDbbN3AWV!){x<2Db_fDI;iYbzO$9-^ZOHYb2bbrhUNX&V+;5 z^&|#j=5|OGjf@M-tDV+=C534!P8#}ErS?p3q$J{a`4nSVdJoL%wb2OqY?n!?BV;G) z)THQAOFJ;r!411xmsZfxzY59AvN!1)dL|nKnDs|tC_On%#TeO4&xszdW9_e0-muqI zB1Cqlr+y6j>J>fY=ytvzb$ZqJLBD!Q$9*9Ad(mwKa zLksdc8Vv9yj?VF-GT}GS#H#s@RtG(r(JP#YgVS*(N+^#&z0BL$B%IM5Z@|xq&UWT7 z=)YLwgvm|;jvN=L(60)EVYfrUHDD2SCkWva9RqmaJ&T`!vOY258=yZT1xU7I0qg*~ z5cZqoJzfJ*rfUJus{pr!7MZ@{1f1!zc&lTb8SSl?ZVl~dfOTYe?A(%l=28GpR|vn> zb2V8su%4BU_Cbm}1hS^4nI2l5xlohPCVh#%(yq9(U>b1Iu9& zMmh-QJ*9I`={U|~ZXqejI87P?$D@fZvOdRIxy3~{`DnK;tTxn_K2}0QORo=;)K;a% zim&~!IaL?tlTh}QaZVAXO%tZM+R|P~*fc6$8(&RQi@oh-Iy+IMr#fXNCQo$YDtTyp zeD%!|2WPy#0{r~V1hmd1>%W=zmAi)%y_?E{?iA`S-#o)cZ-tDz%MT(;0l= z=<;5g=oU(>0&37( zlY(x(LP?cYcs^#o9kvCpc5cmaAD_*_)(k=BZ^E4GMKYdR7@gcuKgw>0)1T_F?!Me% zZ(BPHNVwmB{*RT;8#&xLNEoSivfU-v}ugQzQH8p z+Da#)h%>%S{0iR(UHIh_JMM2CS1Hz%s$Fh*ziEta24THVmxC5U@Vx6rk(ajsAQgyK z@*mdfvc(ITT8kT0w97LFdQRCXCFKLzXsMVLjM=&z^@a@t9baQ=#txLoKo%1|7XJ`W z9UoyDq<1lHqgy$v!bs$!zl`FzQxg~H|Ku`2t4Tcs@&~CO3)zDth8!o^2>HJ-Ph|4W zMqN=y4g};5lbWD$G1Z#(i)`{`#5}J8T>80e26`BT3v320%xS%!B@5 zh_PQ`jUH83swsKD^X|pIS|xZknmGUJezP(GfYKj)E0yNqyU~D)cni&Y)Eb2mGYR!N zq`(~^39one500>0U48e>VoAJpN=xMEHjy?Di_&SAHq=M7(O{2?j+F-1$nxr})Vk}4 zE|Uu*4|H>B;WHnA1=xv0H0M}aoPr>%(-o!>bt@i0*^GwdidXn#)`KzLL96O;7@bpi zZodt*#ZPyOyQm?YhM+Z119mPIyG@*vmkta{1~+eeZ0wZp?9mR`Ce~F*d7xd8sOXQY zYe+YD(Smr9Q~>~ZzsHIH0LR?6gm)oEk75lWDL|@5=wDzp?==&CAr8gEvg6Pf z@FbeYv$NYQyX4!VE(bYHMs6w8<$G)VN#cSHfj@+40T7|Di9X#OS<%qxtrXp(!c1TZ zZ9~ZR&|(@6Q5He9qO6U${j7uJrAdhRcK4Z;=H%SCxSywj z@U}=i10b)ruB)Gizg3rNrwhOQR{M47bn(=-SbTW8`j8v|ZSd*D_W(1-TK0T4(C-=? zlLGp|GKGn6+S_kv&smvO7YiHe4zR#{Qkp=fOU@5$h&kIhu_Gy|YKdO*63 zTb;*KDJY*-`YW))El-il5R`C+=vWW`uGivojCR^>ac~+>d3P$!G=XfVx(UMl?dq!i zfeL-Y&N(M!()PCfOco-m2fupmb7^HLX?&_3>w5-|DlP_4OLz~n-eH^`G~iFJuIG02 zl+qXUZ}#s+VkfwKY^g!5{){3s; z9FWcC1DKLS<-r6whi~xGwHA&~LZ}ohP1E5n;GT&&hX!BAb6H&bt&6@}ZZ2x2GhI#t zw^#0$>aVp*?V@y6{KK54kJzX5m|~hstuAr5XXinD$&#N+lMrZCqJ;l}bos~526cN{ zY*FYsLZ8Mypw)$v^&)V~Bdl@;{}2s^rLpz1L=^QF<)AYQ^p^3Cyjl!&nzcI61I4W- zKWl)TxqDq!|8{1V;QwKMF#GK3;l#xJA#Yx^Hna}ZW4CMa=+@8^bl!OxAiMzFlX2iD z?Po61Vclg`VCBpTif)Zq?>9petrxs^dnd!jlHI7O+J*cm*K6fk`J!-^oU`jcF>A`x z0eo;Z4Zf=rSA)m$XD++Fd%DJc$9?%q-L<8kI{im$h)IDL5yDBF$B}O@=P^Qjp;UE{ zGb`bjD7>1NL0rnX$G?>P+d9udUoJ7wy6Lh|)x(wC%&p`jcXyBXnVjR@#Wmh-h!qbi zrZ}pDYg7BEg9Rq;VId?4QbIfJ%hi1vNRCE%Dr zj|;xjezGbT{qbiJ`F(+8>~w;3!qQI@WG1oL%l$Vs?Y@kt!cuBmc%7s3f3-10&ZsUH zeb-Fv0byM;c?dHZsTzEOXgoSgZJKmbDVhqFEOQGQDVwekcH7n)#b@2f4EaPR^qAxn zsM-6&j`x!XYX@ahvxn!X82Pu@RN%@IY$pBk&2aXUclLCcodmVXSulKlnK(eOs!DU~ zpBoQM69!Fj$TzQEVpzaH3sy05mHHLkn%lvj`hnMbD zc0Onh}c80B~uJ*DYNSs3cPMZwZFv$Gp6~!JC_+WPMxZM%_Q>cR(ubiv}G^?KS zYlx>GdapB((`ObM=0?%Bqi;nq)!t(<>THotlsIFAk{raHPPp3JmVK!_TKlk6fPYnC zF{@up>jf8`X8qAx<-9X88(Qge&Awk1e%Z?V$W!V1@WWPq`WWjzee70+U$!dzFg2e( z_IjQ&&OVx@R)FwmUZ&r)X1hO&f0%|p-hxn@AX^lXAAt)stCBxGS)k3BE>xV>bitl; zbn59~4)ctL^8G!$X;B-fivhfWwkvZW@OHb3${vu3WIE*|%$gJ|>Lp;6skFaDXX&A_ z(RnDH@9e#B`}zXOfxlR?UFqLaxIGm_byS?*pxYrI*{U4?PLg{<8-+s&;NF{P#80oX zT=N+17CCAjW0-UHl`h`W$#fhc$!(Eqo|BC_Td<+>AXMbLxaI2yCP*Ky{1d&~QXj;t zU>D>ho8{iCB#2>?_b|)So?8)*gw`bU^*e!hRAjXA@KOzEuSP;-?Y~K=PhrG8GIJei zZ3GEeL={OwVjPvkWp1U1ZpLLq6@qDX9$kkf{;b!9#8!eKw^$QGWcczdjO!^%5|xT9 zgDAk4MJE;ISAhsrFqO4OxfK&1g-q0Iye0_+F%o3qCS=ilC0i}Ya=N}zKamprRL82H ziUzW{v|F6xUc$pnat-&x5%TN{X(h-H>+qA^ejN zn{Y|f_$Sw6>}OT7yWLgs8D`4!@m#@v`sw=X{lVrrQ?;H_zx~eloC?3IR_rp15W)>T zGfTacq{Y&T_9V{G0E6}CM>=;#IaA?IfJ(bl?Rwh1TD3P1q%tR}A>VtC39>XDN(aX^ z@9`y9Z$^(2-3@+7xFSrQ14zz+_v~4G3GC#p(Zytz!%;YBHe*jQxz+?4a2P{+o$FmoXns-)gn!e6f&lP!-2C&$TZYx8%H5(rJPRn|jkmW?v zW_+KwCeG&9BmFs1wg2x3-ubR#Tt_jp(JJ|mPg5N=0*<)|Av?b5nKz^<*6fOlI zZCDhSy-HIk**L0ZKj2n#72*ABG2}=Q%~T$`C)rqSmjSV^EteWG(!Yc~i~& zk3u%sxD4?Q47wBpklds-XEF5ew2i8%vBye^>LwdK&eB5K^l{2MCa0UTl3B&bHhD%1 zJ#8|Tc}S|Pec8@dW{|zV~ji+cBr;Da&ms)t{95MZwPNqT4&Uh^46K?AfNZZ;;24X$xu0L52G=GcIwK^{>X`@@Bb?wRp258k7QPy z6?aXu+z(A^yqKSfW~hyww>w*n!=s%SyKmLj!Ry1_y`3Yv@0EM`7xX+F*Q7G-Ru?6s zge0!LQF-~+AU=`NKp)kUb2ZqSLRtpe1^o10cOZ15lf*1Mzu#pkK3K!3L{kNFxDd2j z4FKA7zHT>_PE$$wcAaQxlI(d8dfsE=Z*tE`A4^k^8QV8<^VfWBIbNeV~y6g>t0fPx3?rdotf(6j6J-#0e5$QN~O z2}!m#`e(0RR$>0N2g^DS>)K59L#iDvl1}&AN4xJ-ACSIHp2E!HDE1xR>Gz}NI2y-% z4AI?gr_b>AeYex=jG&DlR4Z%(Zyd&UX=&SDSbzOx(Y9J$?PONG2uFC;M(tK`BV(Fx zB}Qb%Vs-?91crW0-rdz@7_|6Gl9~-TTjO)p3-E!M!%_pBwa4h(wH;oe%Ka!p=7gV& zl|0PjV=t~yx6>TS12bSyJC23L4LDuh=t?YK4}sf*ew}H-5WZ*sz4(hv){jrN(Lx;^ z$FobeGCOYOCY-wD1(;!?6_>bhSY)~^AvkiNyLeU^B>O*(4*CUh0 z*f1nSNggE@(C#|tYB?=naik+o3x!3#Qk2xtIg4t|;@WVyiX|Wm@AGk7FOuVEdd;o8 zSEb+7(sD_;#g$u`Onwq`kR~~unIxeFj6SU&qrXy>*c%hET(hhw^pd@xkb&#T$;nmx3{%aYZJYri ze~bB88YF{Q5jH5xr59lzIN)M7jA~2k(if_Lp#@^?gQ}HOijbf(z)xp%hXg7T(J2@n zW**8@EkRDNeX84;+}CA{DTlAiDd~`ZSw)guiBH&?hNgK@%OpgRq^h9K=j^nrsWJl* z%g@QJ&q>E(!{mRBUJiisLSgE0y@>xlSf=j+4G#mR!LNeQre7fG`{$E5Upjr0x_|xb z`)l|9+P%Ma^RL|`dj0cn-c*l&>gCIrJsacS;%ZI~dgASzRXBY?CrizEM`s9~3YAv( zmY27d3{JbTx!kO>CNBMdLej)jy_=j#7WFeqnPfCp#>5GKsf0 z^Zy0e63;eAvLu<)Xvmg?=RQ;%k}tz^xHRbZw zZRP7_uzA+3f0LdG@XImna=T&6E+b6GI_6TuM&dGCgei^Nx zqPT(WJ-2#x1AZCPKz893E+oncW)@6a_5uv!{yuaxhp6)2=KucOI5=wTAN+)j15%g( z2R(|wh=pLu*o7#%b7(0HP~X8Yj3L|Ul9Sj@pY%4=pc{-Z7DQFkzNBiC?8aFFS|7~H zn3YpQ7Sa@S*1;^L)5?T){DMw9-iY)dCpVTV>NV#K&2KKh!Bo*igZVXA+)A?l>0kCc z1tXLB6h*8Jkvt2)5iD-FRVlCCkA|&bVd zVfSsuIs$(mFf2m40{ZF5a4pK$Df&Ke!f6TdZ>F1SN)vd7lDE|Rk|jH*5ZkGSbLi~M za!)m!=1{RxFzKU!sIVl#hb~h3@5Ji>^Rni!%}R=KWl|p`-$boXC(drseJ+YF?T_vA z5_XflicKp1lt*lZn2vPMlNo9W+qReMOY}tiW`uKvY`JJ!Vo9U20lh!;qs1(zRvC44 z;H(Kgux9PwxPY5748588Ele0x!u6InHZ4)M6knc~KgrH=UB;7h{Ta%HmP-Gxq?`7tJP&jzXI?k!q2MLr}G>H?G0@SqH>VK&Bh1EmOm8R6Zph{6vmEX&H`o*K=U_T8 zw7P?o%nFsv0RftF-0R(Jlrji@hi{zaA`}?Oz6&MuPkzR8c~|!9Ti27)$=%L*R$6ra zuehG^tfq^!!hz%3PN}P|#u~_JHk!@GRo6bi@nIqUIIdUT+kVg$Zz>rb7LSGiSEh9! z_Xpz<4x!Z<)~n7qGv`ETnxcC($VL+Fs=>!G`_0=I%u?cVp!&8zDf3 zX2YsX%u*?nP-KE4$r|`Xnk28n(=_3LL(yw73IA1Kp+4$Jgdt!-m|jaYyQE(uSeHV> zwL5SNT%qXXJc>qel!C!PLb73H?Nhqd!BciVMk24w;c~A!(9}&dMlGxhV5>(Md$BVB zvJd&EYJ7?H>4t+sL%5fk?}7_Kn=VL zsb7k#O942fjWd?oRE3DIRE8nlY$Yr?42R>sM6<&|v0-`>F6L2agX|eU-OXWVK+|P= zdLDeE)30-oDwz$2mVoQ95~4Q5DNMRpt9JUe(wXpC$=Nr&1yCm6Ocy98nx9!Nml~h8 zpa>w44tFEqus2`vx~&EfkMxH{#K$|^S{Y^Y2>!pp$xvu-TkY*Pj@ABab^K~)Z%-Yc9PJ+J z!T`GHTNcrq{-)dDs;f&3MCPoLLTFf_hUn1o?>xN&-O}h1Da}S4v_mKJ>M{ZvUE?B~ z-gQE4=@!yq2;4{lx|BE;$JOy}I5z>Ebe&U>CP9FN$F{8<@7T6&bH}!g9qib)ZQHhO zd;T$R?k?iu9_}J4`k}ijqMy2=vogOd0iEus=afV|YG=)2zxHa=n|On)6!2a+XzYAq zS_g@T>{Bcs;VgJ`%<3Z!6y=gkL*&7N|MwR0_pw{x2vB;lf(avy7C)OJusGg{;n09e zRq~e4oagnxu84`bb;@%pRTCv>hD07OrdSZ}%jYb7rn7GL;Keg|DyB5aad%89fG|kv zv~LeI;tggdzA_b&$wVBIQf+xEO{8=cQ#uz#8YZ#m9m*{!zqi=C zvOrD^!bM8oxvGxywU3gwxe^pDRV#nvXvA(&!K3@-RKmlL; zY7YI)#RD1m4}7Y?_7%GYIiv#oK;P}IzL>CvEzzLZ_q9$ZY=GX|7f5`z?!(AZuJV0%?gC;#{yIL<=ON zYNKDUwc~?mBA}Hm5@Ha#s}9Od>C8Ud6Un}B!aedb1g>JH;sH~@`!$uhq-=nN>#>R; zb_z?UZ?ngRV`K#k3Vu5zr@)w?!#L=S{nkBNZ~zX(Co%)*!_$N3iTMS(%9?j~M~l}z zbI62yomYL2lXs;a9#B#-0(*>{Ys>Z}@R;k%@#*cZJEZP+F!^;O`1vAAi$#h7wzj~G zYkOVx%S>%ue@UDM%4#H1EIl4{A(vgT9RVAP^RFvO^Fx|Lhn|6Y&h&~5t%?Nfy{$xgjrgVWS}~L@QqA952u6M z84NHXwtBI*z#@Z+#+@5u_hu2#-@wk41^Rq+x;3KFT_Tc3>btDFQDWR@0^m6-sb_$d0x=R0Vt$!eigqcQsO9dB6<$XxSp%!wAVi)IsMFO6c7H}5 zsH<(K6h{b>0jW{$3kq2g$FJpO`9!XXYkk_-(5f;hg1lV6()E_SMD%~Y*7l#OjVKnN z1Sd-jM1C`Xzz0$xTC$bEV+e#zm?pH|S!NUc_Q#JHh#P1*(0zh5!^ykS{?(LZ`S=K* zXG3Zzylr{B^n*(D>;^cx5$@>9As{?0F86&!Y^7v&P{?3Ggt5P2P`)W(H3(8)BCEtZF^;J+En!9R890ROd5K&_K^>|A(#UKvOtheBS}BQdmoKNLHoSxRW_eeCpTu4o|=Q@gZ4&->Ot^EcgK(P>Z2t?%Og(()Rkk zV@KV0It$bGh4VcB&l?^tkXOD*>)r$#BUAE-huLV}+PB!o)J<$R_eiS~JBSX(?U0-=R1v>SKU>^JKFQ!sDw4kx}YFv z*0G`+BF&qBprw##;l6N9m(VBC+GH`rqF)nL-T$gjdE<%_CL8zX=22%|@aIr$!T=k_ zN|YQFsD55uyA`B5Qy`(FZdkeq1$RS5kc+cfJP5jDWqh?kiYRH00lLILIJq#G2p(<& z?F;btds0|8AO*S;#sWuyB*U^+CO?TOd{k%78mscjb`pg&{=$3HiY39_Jcd|Dt+TE1 zk=*q&(i(QUrsTOfm{Y<`xI}La`g8hgGhD^QGve!AE0Z$EmCYm< zkBNxu{0{>VFb1WZ@5=HkyT9UUs1cs2MVw)Gpk>QTB#herc`Wkmw^^+#8tEr3+xNA z;{%BAm44xOt4acibD4H8rnz#Yr7lpXX^LMpGd{8*sOIejKco|n$WK@#9~St(tZ&`o zFoMm*S3h;SFFJ3X7#~0UA*gb$6y>{ml2QDS?^9a!h$hOa`{TOZSgrX-UogBY$cE|Y zWl`2Nnz$6&VvI4jq(4ItYRZE#G~$}R`V~Zxf>99XZZ2!sEFQTIo_uoF5Y_o)Qq&?- z?gp~gvgZ_zSh!=@#1}T!ZV_^N&R(CgVzw|sK~yjwLxn*;_PF}|L0e4O%n$I0fXIq1 zrU{WL(frH~)2O{oOIH-$V&k%YWgkWnn%g(&-%rJ_;W|K*0AZM@kxIL)@DCM@fW$X1 zZcY?5_A|-dd4W}gnq?}6W|7*j-z7a(L)nxmE~2Qv?>v7DPJ1&2+zb7KCJj4*LbD(x zp#U*COS#&cmlc(MxvFd3EF zt%>te3$J1I2I?0ET1+~q^WWHB1Z0rfZYWd%+os{ESaQsSVbDYPpx+JR8s^f~^^g;1 zCu-*mSu~#rLB5eszt5&E+H&1?h4Or&2L)i$E=BlvO`QuHOfMqM@*ae5hy>J}#+~ft zO7yUOB3%FYD081xJ$oy}S|rG++L^w}+LbL^ILRfAQW5L|v0Oalh>`zTj&pQ`N1mF*d8)nmcVy`Zdd%_{~ z9!fzAlPr3n9w-q)xvL8yK>CbrZJUE9caz3r)zZ!F`^RGkVBnku8??(Kx1*AUO>fB6 zVZWgb^9Xok93piquC@wr63J0mqfvevW3UW6cBbaaE>^8vVubjmk3}-XLNRAN>-~G-tzRSwJJ2+Ov=g#0l`K)BNAcba$&6+NFn=6e3 zo`GNiu1MpAxj|#azbozrR4Y899C3Vj`#%R(!dY|oPfO%){vLE$8mrr(2sWdC0jlgM zNf4gez--(FIr=B!606QCE6i%w2`XpJqvWPF*O4l7hqVZ^XPG?T!7-cC4J0%<2Wgm3 zPm$ooh4XB;A+6OkctMdx3svDniwVW|d8!IoiHev(%DG7IA03AJvK3;i>{P2eRw#sF z-Ei1Pd=u-7AJP-Er_dbMJ;1;MuMZ8iw8|W>JH3dqFOgr^UI&7#UNf5XxAkldK0*t* zN+jRsnk6P>VqQGHdI7uMJpDzqUKIgv-$&)azq<0c*S}~fJk2v*Z$2p{c@7qzARNTm z)+}r$^V8WYoaH^bt)VCD?jIF3XY~?Bm#OIbk3CR_fBv6v<&YB$>mnjQsf*po5;@=2 zpITxLJjOJ%K21pft065}A{F|UTgkEwaFHIUb-m^vjv?0B` zxV0(ZI|HLtSN(Rd#e7JrAKNG=+MQBX=imJ${K(ZtuGq$CyyiM)y-4W3_L^uBhxFU% zhd6v{kTi`>#f{j5(6fdVSZC;F^bLIrG?fU^ba*kc&LG)q+^DJ?eIXMB7t_fr7pBHC=1AGLs(97O)aZ;})p^}XwKG7eH8mOt{T9O&2QVRl=&uLy|fxxLWh(Ku;GtAaO}hWvm{!D^`s9AEZ=YT~Nx z@VT&ajVMYL6eQ{y`WNg)82${sy%R;6&cCL6CFK}OxRexcEL;8Z%5;So>z4I27TvO_I3c)<7ab$^t#SyX>6r>jbtFGDXqks$3(q5oaD=!1**J47#@(|Rq?69Ua4X0 zn*@Mp8!uL^9!YjI?R_3I;ZD;UtQ)uN^i+OQvznJ}B~P5Yo1NrD9b_elI`JF0JJUGm zsaZvQRXKc3jMrFd(q?|wzx|v=`gNGw#+IRaHYRiC4SJhq{G?LkPVN%VZl7_yYxt4~ zV|GW@4>T!o203Q>%+1{*w>AWnz9N&S_oA1{_+0Fnu%7Br;po#%6908QtKt2`KLALz zlk`39Mu++K${F#di^0hT?fYHoHN2b9DYPHhDXM;(R=rJ;U_iBuoU%|}+}?zVQ5Lc% zJN6quAjaUqOzF%0^9tR%`NqPeQz53cMwF>^LkYn&0->{OC`fXGf530GMqG(7$z?$t zWy|Vl;mror=CrE5&X0xQM~Na$H|E^WgN8vOFlNWx6x4s}B`nO2jTh8Wqu2_iw@TSb z1e9R$ohyo+{LVgL+y?HM*u#A|IA1u_%99k3+0#5dwUji^F34=D%ou=z@tZE;Iib;@ zR*ye~QB9g0KT9oE`U2rn9)8nTjNJA#p(}3&lsiwzX-}MUi|Jl_b|g7$-GQ8ngSgib z0Vbnr?YXK}N?a`w1mw$_+Ux&RV9&BA-O}YstzGQkI#mRsA#HY}o{2$dh&w#FEbFLVb zaYS4afOeW=A-yc8+)r4=WDQi_6jcVsc%uy^HfT{^cJlIYaB=coVPZ5Ou0A`Dm}FL7 zO3z*3`qF18(z+!Z*E$tHFU$>S@G2t)IIZ~;Cnl*ERjL7>Z8)@LoD5pk{Q)0{d3XG4 z{hI5k&=(FN>!>3f!~O}Gr1p>-h%=zpzeVoTSYa-aE?AfniEdEq5L`)GzkHGhm=$V4 z@4-NrlW7WEjmm_j()9rC7$UzIYJx;}MFOV!6yYe$Pozd0^+NGPq|W6|C{Y^m#Mjl= z^||Lj_8VIycOyghb|PX{K^e%#Sfv*&)1dxT+<$>O>@~CN5kXm-Un^_XnMe3Vy?%lc zv*@XFKl~Sgi#nPfmQr(b!)^Wctz5Y{UEPbs6(YpD^r4}3l=wDag{AWyWa;d?m*2h` zwlV$?zjz^<7<8UE3Z@FPkXy@Zbbwt%D#7O@#Tq@n4dX!>- z`sNNTeGj1|TiZlzs+_~BBl@8NSM@KREXX^u@y+J%lcPOit^mUen)pRx(0^6Evl`F! zD{Uc%RR!zYu(*APR5Fi=F@sKV=$H6|;f%q~i>__rxH( zO#j-T6Xg{yRFPrkP7mXRhEYJDcG>ao(?CK0xa3z%;CgBc_0S`qQCf1Mvf;)tlQBin zed*O-tDw|?O03frW)_*JP)B^w%z5REx>f#&kzE#|jzC};L6=goN$2s~jOi)029~eu zXg>Y|5T!GqXqEH^qrE35{jo^f*-;?}wY^^-ctyBdjN@epy^l$>RWvcIQD)+%L&*x-&645D5aJ|2BVVyF|TAo4f%T7fP<55G8>xJ zXw9?o!QkPY8*ur{t5Z|$`#cJ;*B!gF#~*|*jX6i-c@P>do$CR5+r)v#y*tv()}Mu* zV4?EOrAs^8*wo%w*e4Wa*3lY0WZGUH+D*X$Mw)NYNeU{LG2QdSVBUk$KcUXSQmDHh3qY~p%fX_mi_c`=;bg9g zub&uf0_tftbjzFyZQCFl*yx$#;9J|aWI1&RIodRNN*tHvaFHycH;v;+cYq&2(#O(X z9)+VbLEWC`sdap(NlKJuw&AOtzF~G%;YJO$QuKloSKp7FuGxhkUCJSp1;jw=8wkj{ z9h|9TV>y{r(T#iIMBqZQd@Y;mf+!1o?pA1y-js;E#;;-M0!}T`f#GYv?`B3Mpz^JB zHlVtRLB!d}57-ZDwKgHTl62zXJA7-4T!H3|$Nx?7MA;x&L#0In!0rTxcsgkq)EGI; zktK7CO$SW*{jXM<4$_5hY`G$;=_wLJB^gB8=z;o#V*%zR{Uk*{z-qfv3<)gq@Tn!|fW<&ILky;L^INW4`;GWfq2rt+KmZgjq5Bo3S z`0h}8P+yuBYnbejQvpIT?O8}F*x}g!_g4oF4129xxEIBCQE<}Qoh>)tBOGlSW6=->y-ZL; z_Oi3N{GwIpwYO>5!C13MNmd@N-IEczwC;FhSioq`Ggy>P=iECS(VQTU%sttEC7*po zdd**RJSbu28m+QrcW@mCnFv8j+aoLX1kdzKZl$aj6q>t#K%HyR&V<}>YCRz-Etplm zyfY9hl0Ru=e(@1=FznqRbW)hCFH$XD)OH4!NB0x)4gwnPK4%{xeqi(j@vyetti_)@ z@Gr$q#H#Dq*`X`D(Q=hbIUzki?C+f3xWVFLj=V~tXX{yBT;~}GlR80EDkucU`;%Ic z1nyx88b2Jb!A2=IcxL6!mT;pP=vtRHIm0G+5B^pLy>ZqhMw(aa#5_xmDoVF~Lgtvvy&Z-m%9*lXfARXQHV z$SFM>x`#C{VWWDYHA=woww{sOccH^QU{4O8Dedcixg$yp3g*5NW}s1kUoMHJ6i^>t z?H0-z9m+~vWA$mTg4;O9Jz;WPN&)xwWR%Twn2DV5TSvg$<5wgxvs+}U$A+R~)`!FS zN4OR4&R}D=f@}ZzPlgmsE3VEaO2P_u( z>4Lgh7L=eyUU8{RP}{~hwso7kh2(vu7nffS@y&@k zhT@IiJ)4lWH}2W^#zOpFx5O$hevm<$D>M>F{H6hXJ^=TXV62khYA|n35ne1aS7yin zD1Io*rz9J`{Y&EIW+ws!h7Yt3Ig?#BeqPWta#SL}bl)PMQ=Lf2uQZd*%iz`B7*^7k zNog`H;`wKZJoEPu3MHU5+P!9h+y&a(K-Zi_59F+I$()8<%B9sf=p#kKqbE*`0q^#= zPx4ZmBxrkcj!ckaZF0ECf(5@O&TSUoyq*|0SUce~0W}3BOmWqxzm5Pv)@XE{@OgS5 z4?~cO+3ZnRwq0c38v_}qtcqNBUORjlHnP)CRl zI5-v7VmGRq8+Zrw&RjHx?%ll9YD44OxchkSTw!7)1t*FVH&wtaaqH$cCVX((hRfy`?65~E~ zX=ksk%<$x8@BBcZ<_KL;5Qx!N`uKzMHm5A~2azovb_tgYwg|&hxIwAQu!-Hd{b6Jm zog~db_bwK(2~o&8TA|gc)#<@=&h*QW9~?M;NPtSs&b39+!RYU7jkd`1 zU#{IgkLTfw-2LZG19(nDSXl1jjK2z*tWxlvPc=@ijU) zHD~=hZzh@0{Xl)~h3)du#22uWL%=ZSJZ#7Se`*rEX}*+U&d{4MEk`CuL{Y z_KqI|=v{=n`wBt$t>pZ~J`29jz?zDpe&T4YSO5~#NM#fJ5BcroM4R|%r|_9Xq6F_b znSJYvsZ@38r5|A5DE)&JN7lU_5{5H%9Fr&p4I% z5l${KB|m`}vVCJ)orJA$3C-~KO6Z0Q1^qlX zI1u}~5LQ{Xt`j#+$i$UXng6)@fys zD)j1^f3U7(J(;IxXtpz^SR-@x7>pMO6!Lg|M~BB6ms~XnZ|CkZ1P+mYbNkDC#9qzM zywC5ZBMPMk=%HHif5Nd}RM|aQ)b{#lSqk#FR9UVV5ex&)))t0`EjN=aEDE#AG{&4k_H#hq)xaGRp|60wy>3xcashg?V+hfM5&%CDGmDwwti5KC$B zf`op|3ATpKTbp;XerP%s_)HZh)#A>A8ha)TqqEMndEEFeIp#cpa`z9L1b%=;WhBXp zHta{F`HX?;kbyVN>}Dj-uXh9IaG0Jo!Fs06(*uh-`(z+<+eP5fM;drwntXk(FBR5S zQi-y0bF9-|S9FcH{!0d+=g|~I&>i0P(10<9*_ie@(Zab28SQW5qq~%zM|m~%?$Ij9 zV-;_>Fh(cHPm)$UF2rQ*IJSI0Q4?=&&$|>=7Fkl8GeFd4TU)s6^@7cfQ{)phfYE8|(UBwVhSV!HOdfaO!P${TvE5D&;>vnWeURtCC>{`|UGVG4=#?o(eI~ ztsWH{KN_l45?hHw<7cY5>FZGJ#VE67T8w*2Z7&t38`jA036@BFfmdyrQDsJq!?N!+5Uwl|@Ft%Cf z0j9B5oU1Gahkn48O@(E=#UWr1btUh^eXv4k6bA;#JuC_WzYWnF#_!x`wPQ%_&#jN~9p#MZxrOrsa@4PTy~*bU9tK<6IJU*( z34E9ci8{u)fvm+=6GBgCj$P45!5DnW5fGG;GMD~uOBTZj4o;{8zi{(c{xNac{OVC? zwSLqT9{fyGB<@K(vb2it!pTf=mbH=)nfyXCA9g!sf$E<+DPm9)j(l%7)k`^}mSXvNhFGzfNG;AgI^I=EH(bCQ0eajB7=I@#+ zoQqJNS?Dn3Z|7UdikxflU#)cecR)4Hi!#;DJC7QfsEGMtvky?9Ee(#l9oYzxo-pn@ z;z(d5{;*bzv6hI6idL>s%ko&m_izKF?L=P>bfWLw8|q1|vcSI;gXnvNZ|sGYzo*RJ z8}QhHpQ$)95H=T<>?UHCZ+m?JjUT6Voc8tWr>RFbZJT}&t{FDE-wz$vPDH<*6o7R< zDQXiJzVCCQvQ4ihMx-Hu-dcL4?WMT<28{0i{wbn}8L!x>E4#ly+Ez z56OA~(6;7AbWIg(bq+ldy3JDcy|!*eXwBw6jRxZVDvvNZPn0ds`x3Sjme1jPb=(fQ zX1)CXMz_r38~Z|ShUCKOSrz>07mRE{$qvu!%{+_aBQSJ@Z~giX=G*nNrd^R2S=IkJ zda|7787`jB75wCXDzA}Wx=H_*9nruSZ=Rs+Pu$Xq@vKkZ+ulz}F<}^#qfZIVJPgMw zd-ZF|ElZ4C^?t|eZPfOQK!!laW`4D@eLA?en@yVZRAB3!H@o>x!XgNOGSLMqp>|ej zFQnl~?)z0u*Xl7u=twx{yvjkURt^-W_1ZovqI|yFXyj%f-!fguw+nUNuL+z0>qS%) z?xRlvxqI}U^lh8{?ZLy62_zCC2q5Y)5>8+k5+Wxp&U1hW`-oI1^NDKaR<0#_Cp}rs z{NP0us3zNqVO}@Xl!}cE8E-2RlPvc}c2F?OZ@WL{INL3}n8f-_gq_IwcHdM^8@?jR z@dcQZGf&e$ZS8&=A1XsD#iHM-m~C;*pRvaf?uc`_gx(#AaxGaysZ?K#deU`cu;@Z7 z+I~*h2_EfaBz^0ad9S=QEtl#hD&!#H_I+e%@zp3zn5kH{94Hy&hQNF{uj;!R@KZol zWOxvIKk7Lg@V%TL?p6>016G1{A3Huez;qtPvcADm)Va7v%hfLt>M?yFbE&&d7ILsM z!89pV^2R;0T{yGG3D16~Oh0n9uO$zUR&j7y*VH=!;G?ta+xznLzedq* zF@(Q~1$x>~Bf%gK2IEFeYUujsOweMc?Pe93oq#`Exltn?W#dm~EPjVh1=8%+eQ@~^ zs#(qJP}FI!J(?P~{M+z8ThFq zz}5ABgFj7(Z?EZSh^2X%US?x=m<^LN8&S<4*BFk@Z++>e)-R5hFqx*Y)~7Y7%*h+f zKE*uWw=#FK^C4P=(E31h)2vO36w~Osi$zZk4iC3VnHg#AjNe8cQ1AK4m&ah*0j7B; z04zEMp&c9RiH&uSmSz_@BX)Z1**zX<0F9{cvsz#Ia{1)$T;e*`>z0_6AGeUw#18M< zv4e+;3#~hS@<+D zE*-2x$c+B5sx!;<-habnxhxFp#P_g<70e`o-6aR#nL7feJx5B0dZ0nJVFqZwYCv>^ zGn_{}v)uL?%dg+ws6RDl7 zG#6TyJ+JhZA56y6ne5Ox;23f2CLII3Th4Qpb&*%ZIhtok5T!`gt-}>e%e>NNyJSxF z$XP_m6UjxsNXit%M*MKw6g)2%$b{Ei9F2v~`X$e1(ax7eN7{lb(WK@pPwN&^kv;-L zTV$Q{N_ke?jh6&I)0M8CY%?agswgAhi;%~y_Z5{cHq1Ig_ul1LqK{yJ{y^tqSBKf2 z_+X(SIo`$uUQQ+}2A(=Q1pb?7kQoWx-aX-WDU5`C-hlYtx|~Z zN|(YJj_JaGa3%M$uXF#jzOKjCTdFTqpL;IzRywk(^_TfKl`Ui5Z{Frq_Y0f2%g)2U zy(w3KQa|Ks*=||k&T`7-7Eow$THM;}N30(Ij+WY~k>;$d9&&T3zLfn&mDgX;^8hLa zOp6v*EjUYd)3R!&*XUYZcUxax+TGY5do&Gw+g{M{ExGoIMlF~j+P|($`r5hO$Y*rf zbnFJSiZy7iq9&VeBDQBm@Wu9?f|Ew?;fP6jkh8p1MTk)}7J(yzg)fMdoot0zlmsk& z>)3Qz3``H4ygr(WUY3RXmSd@&i4W{kV(9@zvO^mAvXV}AHQ%3h+#ig{1H16+{`_Y7 z+;6oI+?)3K2vMS;`x)>z^o7HhB zfhlzWVV@1xceQ;&^;!^io5zC^MHp6FlLk0-Hykkc$d7a1UjkK=tP(Xs6o{Zp!@*nm zxTzK%46HS3*a!U)dtsRUj&d+{QsV|9oT0FHe*)-NZgyxv1;Zt`jmmM+M5=S6EJSm7 zs)t)))abCoDuG*F4wP`Nl(++W#;Q#PLY*s~hic3dInFQRM6urRz9Ynx-VO%5L@IpR zfe=G_PeN*eRO5mrY}L5FF+%yYQlbQiXL}YRkOGq5dU<38YQ=~;viNMx%z)7)p6WpW zE*U+XiP^1@_d>NLrI`klyV)ybpdj`IdnhrI^9voHkRswo1WpJGq7tKuAf{BK0{@p8 z7Od@!=!wti4P~?TUQ?;T#3N>h7q@4X0iC%UN-U#R7(~!C78}+*7bBaK3)Kggd?1A5 zkkp4l(MD93OqWG3H;F{lOjE+HT-XNrtb~DiiEJ&P9zbw%5w#*^ua$*G*z~6y=xE%z zr@0?+Hw3Q6{42NFI6yNPf_uA5F=!V;z=9>vWBl?{bwqVow@B4kSkSsmDPRxP&L9OI zE68Ez%Hh@NA*|{)WNP*o2)2>6%dnf_k3+>=Tv4(MF$7<)9GnObiDhpvxInb{4G2=i z`Up&g@QS2)E((OiNgM|~=_ry$af@sV+9h`b+Fzc;2408Syb#}|V-B4P6>`e~3d?Y< ziwJ4%uUy`54nF_k>X0mCx2hEgEQZGMLF|Wt--#F`9Fhel)=+KZ6$*K8IBatcuT9oi4-slDeCtYUmFp5{m_1D=veZ03n1!Hd{BCy~)*O47w2WsC<9 zy@8%&5w8E41X0>c(A+gd(4v)tG_Vpi(kO$$3<@HQ;VNJRskKFvwfo}&^PN|x4W@6R z8InAfkU2!HPD04;b2Sz6u?8fnU!GK(q*UgrC~^Gh>e+r9ae!b3-M1{w!K+&-oJZ}u zC?~HTK=1|nEs$YV6w?&YY7LnUq)uLk!=%{&6V@fGa|gh6akuY$PfjjIpDSNOzb_fg z_VUf((!lzSfG*aq73$D$zG4tb<`y~HW_}+}6gqlrYUghUDk?>sKa5ekc-O9wX3kNR z2q`-;`MrgcU8)C?A1v}tnpz*#+Up`+>ZlN^L($8wE*AzSgQ+V%--~;`ZhueS7K=P`#CY zUcptEN{lhf;p*u&fxXq%MWwEqnehuolb!SWpelr2U+v;w&ik#O+Mix4n^v~*TKZp4 zpKGe%`byHOZ=#o&K#DnS^jE_}^}dLc>u@2xhPuBlb#4eRZ+1QHQMzi>YF0S@+#$9{`KY}Ii= z#7B9Cz>z@J)!mIM9A8Z%aZ%vF7qteTr7L3EuiI~;TWY?*nu6Fzycw>-Xs53U;mEFv zRa1ct5@G2k$C>x;r(4Z=qa&iUVK(y+!k5`4I}9tv;2Yb2tLG62IRJAQ5*cDltcu+s zem%z7Uon5($uxy3%CCpsIZ`9kD9{Qx39!PWT{6X`17|yFgc;7BF##hU#8d^;I!83L zwMT{(U89aoPUVEkVp&x7ZyPuV!S~^_;v`t1Vlg}4^O1u3Odgll!aPtjdehqg)A1mN zGH$}CrMz`xw^q>Vi@O#H_#kXolb&h|XLA!9D%)R#PbA4m2<>a4j^vSJO-t4}9pAFv1+{8llghK)-kM(GHQs9p5kL zKjZo&wD3u(f~vV_6@Hh1tKb8X!r(RhnWMb^$Vf$o_hJjw{*BQhG-W7)4z=O-c2nSH zIAPP`#XL8*rq3Q&mc1}vPT~jFC02k>6vMr`KCb84Gg@LBu(Iyw{QK))++;HuVzQY? zG6Jh;^VK6*coGdMiG4;a$Ev^0JsUlwjWOL#aJ{?(FjPsQ!atAf7b)}@{j1BXy}x#G zFuBOKIfcyP2i-|Vb+?h8=pF~|qxo`u+z*y=hiKt@vJ%YeOhK7iqnUN5)Z}+Gv0A59 z$Qni;1JjHAly|hN;M&acsjw4{kR_u z*@Is_SbIk`FSJj45Acn>yDNc=>xOIOn^GKap4>#lV9!LfFX44iV*z;;@!` zkH^<~pJ(GCX#F`6?xV<5@>n=TB;^Vvepk|+l9))Q*3m()R5;zrB%L7x0w+iuN#j3k zVb7oFRktUmzS^9psFnivJO8}>DPdtbAq^ox4T#@Ako19rCeJg-FHaqM+5^m|`W`np zJj6@g9!U^Vu29DIfBj#he&gH6U(#i; z68pWzoXj|LTo*JbCJk~59r;d*ozKefmybRQ@63*+W|>M{tju1RS*eirB?4zkMYP;5d&VP5p!yGo-a zmj<46+Ow(JeXM|8dJJ9Z8Iv{a^s(l!gzbqEs`F>0S9Ex6$XCWCvIBoPM~nor&@{kG zg|JfAEze^qeER)`s4toPkIdyQ0Brxfith2rIZusScXHz1v7AIS#H41w-Ya+$lGw}y z=w3|d()X(6e7=l7RT)e63K4xpg0H|Ab7a+ta?LlwWY2H)wUH@;VPcZR0p77ZHDn)5 zPYb0!cadIATb!offNP6X2?ygBjD3QRCWukc7p}rRxBo$h3pQNPG1P3I;%rauMIa$k z`<{6)HBXUuR%tw4M~jmq$g@{hVhyp$gj9!UO-BAoEZxSrj;(ayBAPTo@EIoOEcDc);oQS~h|Ci22G5qjCL0eAI_h3EnK>XZ z$rVjwqC}&TNmuN(yw|+~sP{f7XQ%U0l(tuPTzbgq-_{Cj6Q3sp1PWf*P84+}pRz3o zbbccLlcz<&VL^$=SNpJBwL?OrSdJFgJSF>;c+^rmgP-rcmg{{1SFScsi)aaW6C7T( zSGxp}>7YwMaqoFP=ATj-MSPat4i%EjES?hm1WA15z3O)iE5u_wF3s?AEo?`bEZ z;)I2^EzFTel8=VG(}^7%;gUEa{8AV4XMdnT)6&j`NKMq{t2`+YHGo-{B`ln50L~vK zx`I#(CWcSE(@3|cZKdNV1wAMaNne-%7uz~NU!6Y&Sh-ctFaKtR`LI`4oqF#`Gkah( zqhLMGnGIB$5%hYtH+SfuPv*?{g4GjS!q@*=-SZgVd|&&j>Kbuudt^g~d+|DPnEj&Z zy(m9iuijO0tB_04siWhb%DS)%n@8v>2V+be%1O&FY`WPsEa z&F5rx8xy*ThVk`@>yLI}= z?J(%mU#BjWN+4|gZg#IebSd0(lY0fDa@ZafvV`@XiV{wDn?PP?8M+ABU7`Zh7+Xe# zH)}a#J!v@%H05m*Z;xGco>-^ZErB5j#!L-n5rU>$zqXF84;?mqAgrKgt~OGk-F{Yl z`RnQV3DGmMbd)tawz>tm3^3QV(9uJSOyO#4nu_WW=kqJ-LGoSzrUk|cWGsSXx!9&i4JNHS=L?8vA&u$j6Mr zNN}<1F;^R2Wgwu~1v~Q9msA>Y)3yxrzl)p7K+zF};K=(+F<_jB@QspiH926u&`WSC8itMn2tPd%b#;(iM8{Vr%qX(gx1klz0^)f7VEkAbw zxY$D%3~B>M^eT*hkiJvbBQpkbq1u;{iqeMysb7eyAur6Wm=T7J_PQY2o*2Z6lx7OV z2Etb#WEWBx5N62_6gsSgx(;(RYXC-|!pw0(L7iCC;QB{Z)oL5ZVSt;%PLWQWnTscu zMBog9kO#VYD6U(W>Gif7;)_XB+C z4E8rqXK9j73NiMM;Y7)_$NTc(Xvtyc>>2&0ib_xb%f~M&uZ{Lx@3V)klf?f3k3ew02!ABSQ73~8 z=a=N0tVAlgF=)WV`!QZr4Fpjtm6aj2fc8ekp@&8Okkr^D$6h*I-Z&i2vOgrZ6^sJT zk}uubO-y=y+@SfPbII5U0VtFbUV`p9Y6e}WkoVh;&Wy~a3W>ov_J`y~-IiCt`)yii zN4h$FNjjb-O6Cu}pL;;$oiy;>qw!`7ch*Ztm-35Ps1U!}3>)%8a(DN)Y_9zwxxgpe zT>C?EpYJ-k_J`yiZSF&Fki#F6x_JaCn@4(V`#7e3owvQci%&Y6dkq2QM2ekJ+L0E_9(=kvK;XBcq0Z!AZhmAM zjdY9bGZd2f!%H>eaDVzGcr5mZpKHeB{r1a5P6uXG6hi=!0{(T=%#fU4UOo@Ve0zCj zIPOocL}Z&bW7)zpw6$d*pSUIf+Jl!zo39D{y_7_`qz zI0ndhz4=c(r25m|6?{#=Z@5JH4iaBku`!Otiwf@2(<=U*7G zs$3AAZEYNgcV8`&-zq5Zv9+PthgHAz@%KW4baP3$qO22{Dw((n)ZFbGVE@~W%r?#_ z=nmUo6b3`eNVsvz8D`R3mR`?9lnQU9$tWkQY5gMZ1efqCx*g~M?-Sb5zQ{Eko{8|0 zf1=>=%oIQvEb?NTGz2$W2mSXgt0efHx&E$-Mg1@Y)S>=l>lH$AKX^&7bltw*AW7BD zWQZx{6`@H1!2UHxp2oQ3+5VrGhld*^ykRdQxFx|NNlIdMzKARl?lNm7bmUEf>@dab zbr@2Ju=jASwE#B&A4hHKFsLXs=wV#0SS@hIT6N{|qW897pT%JI?&E;wK=BbDX3Q@| z8^|KEY3U`~B9IxvyVywCyZuI7FEt0MGDy76nM_*0lGxj@3RSm1^LpxLx_u8H`~CVJ z%_i(HZD{Wuiqk6tU{mwDq#}(0zA5TXdHGtv*+R{)zlNiSt>CXj9Zyk!t`4mm0GS2Z zg@UMXg)O?B!Z;Qq>0U5E6ixAKV2?3Qqii@_*N@C|naFuO zA4VTpl17Bt*H5tC*0JcaT0bGEn@n~pEm!+l6gV;W!Lp~H^>Y7>l|rpmpL~ZtFZ%C+ z(IyG6rlW|kpxQV^Z=n^wHx=C^r^u_F&22a&ZV^dx3hnLg|1;4JB{@apA^6xSqLZ*x zk<{Uykyim(6sE*s3b)e3cBPf{W%Y%TO6!IqVDo)C;G*|}7Li`ngd%UkdrZpRz2|J^ zG*zDbo+Y%D9i6SLe#CK3UQgQB&S^%SJM>03S6*L~>GwoQcj!kTF}Ew7@AsxtCv`YY z5nSt;i+cO%gXPmRK2{~R`s$B50orS`aReDUj>6ucONl|V3HX%USVSxh&apFCMne(S zoL^DD92}xB<@i_i3m&Oo0dMfpt6Y|~iX{Ix7-CRf@$lIll-Wd*1-(%G$FhUSOmUsS z3{A4m?^x&eaR(zk^V25@y16O|7SZoS5B`DS64g>^VHHx?H?O5Y-e^NjSd57D#l^ma z%UA_m_>b(1^&0>preUbphg{w8qAsR{`JA~96jgT?GZP3 z&XP02#ERSwpMg8IBwo0=tq03nscvGRd5Z42P8X9S=oFNcbWsh}PFbCVg~h8LDU1Wq zeGeZMt%v*UqCc)i!;2rPg&B+?bOAm90yS_1;0$;eQ2!i@gM#8pSxvrX=%tDtck~r} zs$IA_=U3}Bo470Vd{8Kyo}CuW148Kxl6a8@H~em~um$*iW#y52F$_a>9JNPRs4MgW zHH2sh%W%mxt8#Jr$Xs4j@j}JQu~g;<+PwDQR;93t<35QRP(Be3$z3SZeE8s8Mo&dR z^_`=B4qmFgsMTrTpzSpbKcPIZoS`#t8{-u;0q;i);y6@#Txxgh^EGNY%E5Px!Qphj z$2T7v0)y!#d|SQotj5v74xnnrd8D_M*+rFr2Wx2qe3U;dv%G=D3iGG{vZ57#SUYD` zq+ylHQeFGUFv|SGnij5$tE8!WZQVbx@vJTjppz=g*3bMV>y(Z!JM9r`J8Cx-$Zm9W^x%}07@ zDz)6iIyovU%XXPfby@Ct^-2g~{e&o|v+4&0m;`#C(a1uttYi7Lt~V!Tys(5{KWf*; z4kj^(%d-*?l&>udgk48G3rjvSZt&!;#p9}Ph#6nYgWfqHFbu%TYY6u`Y|#naf8J!X#T0~PJ27IYvY??TxKq9+WdklGbw@E_5 z`oJIZm;dMrMSZgPr^{#53m)5{!5I!o!GKQgQP8_7Q$*@rf9a3OLl8d34np%fw;RUq z*c%gD9}L;0zx0Rv9Zm=O zaUbcni$00yKQG*WhNh>1zF7j)!8SYuzmxf%KqXD#t)eSwbwLIdRuxP|Z^)1myMkUo zuA1R61Q4k;5E)b#{;25goWl>X$i=X=Btpw+DM4h}90N?^_?Lt0O;)y>ay2+HU9>%x zpz|azr%mZtYXcdfLY9@=Y3|?)lg#RLgh*N^+r_Oq$ZuXhVR;zJn(xu?%Kr%k&%(zk z8k+QmsLj2_S*}7a*zQ`9lNMKdziHiGU01aOp4oYrd7_H|qfy-bkSqj~-5=oBsp z@ugI7JsVG}?3a}WlHQP~HIgo$Xei-DdDiw))udS;UZ*scC@f91!U0S4Y;6r#wgCfb zwsc}*Rtb7>DrJ$bV_1x-H*=@YZwwkl*3&RI>Gqwm`fS7{-;~zgmEDyw8>DT8$o&}l zK-M5lZd8fIWbU$q9-1-H5zUmvQ!Y!3!v1@pX-A%08}$a{NgKVFjXFK@HjUkBJz;_xF*wMa z7I%AzCWSb`4*FzA@o3Q1j(m-`7JN|?2I_-6F0ri$o+KNcZbJveD&pYCBO%6za|)Hz zimjY^B*moS5n5F&f0SoEJ&T1HX`66SVf+66UvbXeK!8d+#Et*L74-GnAq*{`K?_kclK&Q6dVzGiMjN1pVF)uk5 zd|AdO7Rhm`Zb4&BazW(jqh~`WQYtn+Namu-O3qA~2yNousy=Blul6G&d()Ct7Kv-G z>e}TaqcN|wDw{Ur69E}`u-X*kP1aj?ya9dVF%UyZ_QD$qDI# z&)>W}+BrNpI&sRHG+W$NS1-Hj>b8iadp`9d@UHuf|?ZsIfbv@HE-Wz9zdjSTj&B!%xd?CJp9B8~!e*-@aj1w7s6vZvc@3z7Lmnan3_ zBI~I_GJhm8_I1X7BI877I5119-RYY%W{H=47_$HkUo!=47GBu3D5> zGFhy|I&!D_Gm&Y!bbcj@L}nAB)DD=nPi+nNYJa2(n4Z1gsbZ0{zi$6Y9qw{chdW(V z)VRwDHSTml(&R3Cn%uU~*3T~qFaHE3%y$a!S!`#sEP73$)y=KFgRM=x6XeUudUJAs zmn7!Nr=Llh<(!G1ekRl4lFdJC0W7|||Kb3$^`}$&HQW7y=uGEV#y(+k#>RT-4x(X|KEyQq<;>xyf8q>&`lmBIt&3kay79{MiWeeCJ?oRI80``Y3;27+b z9fKWPKx}r(Vzc9{ApwB{0ec9+doJ)MjCaaO;~j6N8TLEnZ2O(OY8LM%67wpE6;HAX zCp#w_w{gqaI#VxMQk&tGwHcmMM_d1ujrCvh5Kuq*)46Bf?(Dp!dxk!2#=-Od;SBz8 zFSx_)-6Oi<@WY2=xvm9<<(FTCLOe(T`gTvh7FQAq&_9v|$nmZzLBA43o&y#<-rGEW zrAwIvci|!Z^}+TIt-pNxL-pMO%b5Mdyb5}Z8L2K%H)uQIkAL&ay`S7eb6nh?9uzPD zIE^9Ai>={b4^mGK4)z#0@yp9X7uB4FUryGElX>E2YbMaLgE|o3q(}Bow3MM1KFwB! zUzfB=09#Q!{#KGPsXYuXCYr!38v}%?Mlj39E}@w0bap$K<)qQax-(jOea$0mgf)y`&>wP^Elg@8>>h0}9uA^7 zv^M7FAse+z!Z|Q+6o<_!>XBV~WSfZxD9IQP#OFmzN!(nlw2%~JoINXv;Y67;Y&$IF z(_)eHVRRL`Hb?I5{tMd{C6hQwN-pVgJdsZnrX9f3DcQWnWczG_%uqeM>6T*i# z)UTawT{J^u8qWM9Z!L#(5?dVEqOQ%6O`T?SM8J9GLO4Gm%&=O{5bZlVx6w1#ux7kFeY?>%go#f2-B%ufG<``W=GxV@V5E z*Qj>-g{pOgYde&nZtJYzfN4N!xPdCD*aw!sJ*4m@>klPVt==ZFD9f(0UR}cS)(@-G z4P!C<^$`c?#3(~|NI3J&7MXVi){h>mL!zC?prOAJ*$9upx0)A9vZ@=C$Q^Vc#9ed* zMjmc3zBNAgh|hLZzf@{J8nOEi4*bc6S>o`cDoPso{A=R?<23Z7YsR%_Q7@MD7Rfc) zhnL+5<4@Jiuezp#5)@H_zp{;~o#;)~zT+c$Z#gX)X}3u-hJDCy#p5={EGpFOWFT43 z<+syn4JT31qu5l1YPD9Nl_sx3o-DlRHCnYDMWeXxbs$B&HCuWJO+UQgC9}ql{yb=NiDg)JP4_ zUkU8oHlHyUek?Vbnu1wK7YnfT(z^V+j;LT*4L~g_sqMvR4s$W(4%qr6b|%Aqg{w;l{HKex+LFN>N&m!&D(Iyc%S|gYxe+we zznwc{cO&>36`#h=G|*YGoycV0#^Tu+OXm45c8X1DXh!$P_)OOkXKyTVa>)W?xN5QG za>C@+oKKyrQ<-7VEQ5!O*+Zq}8*CMwseMq!1;2z3U);_V@Dg{Jw}39MMmBJzicDY(xCP(?wfr>!<7&E=~Qi-gv_CZ@ z-0>Yl{H?k!u``I6<>WnHb5J{PyTJe0U98t3kY$bsR&QE>a!zP+zG?I;$zearlY3O=?B#*~n*H)v_j<{O}le zO{};>DEO?q9--fW%eN;=SVG2a)mfUN-UlUQ4Sb5v>JRE4>&AUG?vv|pI5nAK7TL35 zN;zZF3(3x-$zQN)q4wUec*H95_Iovcdj=7Yw>o-|*WZm^apM{$PDsu@byt(cgbcUFntbW=W7 z6En>yk(#sLWTN}2OEAlT+y$A~TP?SN+pm-Zto)f=8k3P)5vS^{)*`b@ck($6*OE2v z1{aCrnLBHnnF$Mbo&CfiBtc-(N+fIgtKr)BX(nl5N$M_wTxZ6^v_A(9`i)Uq#_$KGuGG;8HS40OGa7m<`W zYhV5YRkR!cs6vu^d2ve%6GU)YC0&~u^)NDUVYPF5N^t-a!zy?JH7T8%yB!u(iR;;e zt-xsFhrc~cUV*iT1<6}~sM47i1rpNe7K&yVNtnqDSZ$YA_7Z zj|wRs$8bmM36;c|is$=bp;Ha3W%hf(O^svi&S0^u24OTn?=0lP>KtDthJ#@z=7$Rm zAS}`O6bg`x?j;b8UMNdnQ4*k`<_f>B9U!Z#>xxSzCZXJCaZ_i&$WoLlXgPVhSPDq( zV6zVk#Xz2$V|V;QZNkAJsZQeHh}cHn1hv*Q>HV{ui*&P73gKlH;TzFaha*5(cj3b( z#(QGg@t%ST0IcB-EG{vl&v-U|b3=;SkFUz?qd$Lso4c z99QDeO&7J&V+wk)PKC8wu|lz3xDBgFKBw&ptt+fQTR@R?t?6F2=k%c31v_bvddD)3 zn=~rvM4y;f&mCocOfd~o>s_y|;G$F;$I*D$4AYI+^4ypX6EUx>Ji=D`V%M1CQHWI9 z#H2txcE+%gse_(}8oo;6hUvk3P2GuMd!15GWmf4MSCGk!7Nh$0JJ3$Pm#vfUnIGox zp?1=h%^TS2{+DG84{bEUOl*~6eMRaLh*1>q5?5`HnxdmINEx7h5M>7 z&kb^))L?;KeEGP z*&88`WNZe0y2zvDwsEA(dL1ZC$ehwG;+L!gd`gBChvqP$x>PL7+?QqUNFG1C4v#3KDOHxey$;tm*iXTScpSTZWU$N zA%_BA%QAdgaAjRPRNxm${vhh}yV;FeSGBdx#sF1$#(*A2?BSbqS=$RkfLE*@SuFa-Z@X-88 zJ}DZ>~WqM%2^Xb=vyKV53Y2rfE(@g~_Ti;f2`vBVk%m=U_`~e(D1Fs^r#O~-G5+Z4Bemq^}ujl4# z>*MJfe{Fw!crn0s@dy4hw!g>tPe{Lca0t?UZ$dbBXYYSVPBk%qD1I-9`CABL=s}U7 z94eLh^o8#c%3*5!ddRm7p9`2_31foYOK`qi367)0N^0tw7$#Tlo}oOE;l*05l)iuH zIN&MqeOc$<1gH&f?}E6@l5fHWjLG5>@{QPt%^~_aE|pW4Mb1q@E;puL7B;9R`Dcf^ zXM#f~qY>L{^w`r5#!j{np#7F2@s806sv^rc z3;P)8lzr;p4hHX|PKzPH*$axU;fOTU0{Zqx{cCc^zfwW}8W@Iw1QhWi#vtu>IJ!=s zGFfs#i_y{ENHMSi9}DAFSg(S3U4{$ftl15NVW}$O8G-aQbO9tj9`upmYrL$l@nxWL z=^8I%D*OhT2%CDayskem1Sg)l`AiOe;g{d$)WWa)FU0_blts9JP8X#BUiigw){U=k zdbsl+={vs+cRCD$>?LOCnK~xP$+XVWl27rgj zEe_l6a0E zsFEL(P_m(mB~<%gQkz>9Hcpio@t09Qf&&2%G46MMcX6MXy%=iA1(Y9>ClWS+5ic$o z{xhy!l+x$+ht$Ef2i$32%l=>m+;buUhhrt85t3o)GfLP|dngE?zcXi*Pi7Ky{8V8kOFX|3Iv z)ZltnX5#K10kNk2oYQow8Ti3*)!LG9zCR5+BeQK`i)?rkxBN($9BBqo2uJso;aT~S zQvv`I0V!+bY)s51nd=g|0mh2-4|95b45OkcFD=+N9oEwOM8=QV9sLvy-@!JZ=X`1# zP}W5_s*KQ+YK$M3VWr&-F3?||(+OU{!|XQ295cTF&Yo^JG$h2OWJ|)2zh~@7Zu{i(%DN5@#79+W{zP>jxdOBa>Ro6UG>z7l{B;c?L{gPG*e^)DFCwGoJ zw;|yLXT?>XjJ9gzx*Aa>WVjYhCEho*_Suw^OqYMU@@;V|Z_@HKFt^8I{+f0{KT>2#~&A~A$Ik$CxFvb6w3gWJmslTu=sQmcI6V8 z>W7>)?O|`qqsOH=S_L2<9TmPjjaEOCM4JJ@et2K@{4H;@&V_0l&Q{>%p7@+#;X%uF%*#{WLu@OxI%@0pFi6I6?X zx&AXmi^dJpXco;hPdZe(OeV#mGiM1}^WUrcYfwT)d(O$HowZ(HU8ShWNM)wRM1wdO zS(r-~N)oHgauJPK<4@*8t_c0p{WxWyPmNYt$t|^|zDEAiRe>*$hdn@vL zEAo3Q^4#h(Tai0DwT=d^tDS35w<$o`I;ef3az&~-6y_AwUiZrJE*+C0y%}?%W$Qph zw_QTQtQB69jzZH5n1I3Zf*$(d?+qGFV9ZAKRaT|LWC=T#uBO)YIcMbtuP~3*Ts9xf zC+cnK1tj*|XgxR?$>E5Xtwb_;>GFK1@Z=dR=miH0lbFF#FS3Y6Cr-jMW(u>SnM8#Q zER#`UQUkZgF?QMio+ze9`&PM3Zul*g*wqYLte%>CcA%wPol;$VMx|0#AZkIm>Dq@< zI3_id8Fd@;s5R_yI<-cnZbz-TRr08{WSPm0+>u)2HvXo-j!E~F+C8OqPpRGe`?>e` z^X2>dS)xr)y;Glz zRrnlEeR9c%>##XCRzFC+8~fpGdSP;TkzAXlqXJq4p#z!15@^x98!8v2^97=UC<-^5 za3mdJ^PPV@8g>Ti^$Qh8sE38mE#rY$>f+Nl62#)jo!%ViA*gL``d(XK@0Ac$F@e)V z4R|3awlKUjYAd4N7qnplns3q*=)2HF(QBFTw+cqg0YK?pJv55VyIP0$YiVDFY)~Wm()yir6!!HPUZQdh?$gL< z!c%Ai(Z~+_(fHzW-Ro=+#iNS&)8|Hro^poCuc9sZpX!HK+#p5C9N=3e>NOkFnj5JWLE~BoqFB4;*3S_}c3bsuBpz@z%0QLvLaOCkru*;Kq zAq0cj`5;?5lLzv%bF1Ek_aSio`|>@WvmhgX;a5G`c#0@P!7G>Q3TC6`VR65glj`m} zAP2XRd9{N+J(?pOTvycm5gKiqWV?g~%xM)Pac)9Kjz1$%Baq}EJM}Zs>jo6@8z-r{ zs?`Q&Y&1VheRG*YQq%+p0X3k;Yvm zSsLdXZ!~Z62ZAC6ISw^5BEwpy^9;)B^xsGC*oDOCs?!XOP948wv-TV+hohVQ0pJNd z?jym-^m<9x!UDIuNb!|NfH<3@anQ9MA1J&s&MaoJo*3+jNY6}?A*SYl2JnkZ7@o6O zQ-5fFCH4!{YC2;b(Bl9OSzO~PkTHk9(QHhT)Vbn9TthxSW_4UkcVyRI(Qy|3$zCd_ zW+iGR0~#e%_SgAuFyjrSomuJ6JjX1K#}Z=1va>|U$5lsyK!$NmN5O;IW=mxzpS^H6g*Abt;Zh+~4Ei~R{C>nL8cHZgN;>(Xo!4;I` zwIshaPUH1NXN@>OBX3sCw}xFnEL;scwAR+KLpQoGwzhq;|BDlfX({tqSZ}oX1sWo{ z>Z36#0R&JDWks>bTd5wXjW>NDC`RKx%)NV4rZ{v5$IQpIgHAUlGkseJhs&CK@4~@I zMT3wGbzRl8GO}L&(5@n}{ztP`9K;nVh!f4Tfnz2k1JS6wl`1Aku;0D7|i zCcw_PiHxQRq$e5;JgP=8yx{9fnu`J6`Xdd?Uw>`nwHejK!)!8LRVu%aJK=~Q?Qq?n zxK>n3agg@pX~<~|4v9Yx6ZuY>{=x1PlgMv?l>YFcOzij9Uze@fGafcvd&8%6#A37f z518+&SX*)W<)>=-+w$sT_3Rl=baSh* zyT5y~5D%L*?tmq1jn1IjT!a$Kt$vsOQQP4t9QIJ~fpM}&H-nI{S{yPDI*cM-cGM7W zS+#3!0Q%Y5+&|dg-P+u19RGZLvh$h}IYKW6!`*zdcd}3$$HPU$s++HATn!!Yd4UI4 zRy=(yqkh~0Minm{i8Osi(|LXTvT?L?jIBKnfiWWvHxPSwTrW0t7ikZ%V6w6pvASBV z;;eD0)}EACVX+=P(yIlHAHR8ie6o-Z%Db4G%TaZ)%?d6=z@<``*>mV2rjN62A>*^!^Kqg-hNqi`!-wP z>VS3zgUx0PM0S0Mo)X&Qep5Uom;tS>u9Uw~%d4y3!XF$G{s+ynUHrnU%^!Cf+k1z* z(4FI~WvFoZYT5%`7dX-DS{yasg{WZXF1HgQyN(400TyDlJRgSJWTSL^fYaUF`sdDx z=%;0sq7Gpz(NYTy-4?ks6MYp?Yh%!EaBs@JoRs+w8rBfZi~K@5HVTEbK##wn1$y$t zS)j}S*Y!eWyYc*ZTP)}m{7U|OvH9b{5hfPQLUZ5ZFmC})XN`o?eO$>ha4%-KIelga z+lJm~>o8~MK9X?bd~>p3 zM1=@5HUHPi)?p%LM|Q;~pV}CUwKvvLf8s+YH1+YGWUqs+`}3-sA%TiaXEdU|bF zzN6Kh_ujKIpPPWX`nLLn$#Hktv2x1WH#5Im(cp$%KP_x6s@3nldtAnUpU}Tg>ECbY z-*4&P@5%~>ze4}6(!XoO@WIC;`uSL?7sD_FCb2!bLUo`Qc(n!0{OavH)W*b;o)7qezHK#D9z$viWGgBzsDYCtCd>pB{C&QbNGGorx~ivl^? z<1V0*PP@~jwwcN9Mo4tV%$ES$gO3XAGbRp)@5w&e%mXOViy@q5__STM^n<}AFtlun z2`maZjyb0{*7le=WhktE+C6y%NK0+*|Ezx6JUZIkKlz!sEPipow^5$oNcOuMTy5B= zAYixOhuj-7>m4Wq3pNb;BMJ)sdgo~C6*Rf|e0Oj6}?*Y!#78V2gf@!!)M2Ezasfgz#^IibrVnY!Lp-ZQ1^n1K3M+oaP#DqS9tL5 z0`@Q9!o>yoUaUPs`egIv4i|wFq)YH;vVa^ZUC93Q3VLc^byY?G&b>yX*@7Qi+c-A3 zo{N9{@A0dKupi6SkHrPdXdLgrdTgE?94+#rMC-w_4*XNM0aFoQ5slx7FB{vNCz~=H zowkS$3o1SJ^zmb_D3Z2Eo3ArUd&Q2oj&=`EGE2z_v`2L;qLXkOa0`x%r#s9P2yK|u z21>o5*#5!M>&?A}o!t6^WuRRW2?xg~eu`9kv!AM%Ov0*(G-gjx4WdglEW7fD)kI#( zO~>E3kpY_ayBVAUS=+nEC!|1su!**)PrK6CSQ*A4 zqd-z*?*N&+*Nqy;zrC}+wYvjr$GzA&0J!wt2_&L?o!TV1(_&(P@|pOFL)N-Cjb3mAs1s6|^PsW>0nYEEovk-;n1Mw&**to=bAmJk z45R`)_;?tjqGc2LN9T9zeaHEQlfE4F+zOq3JMwjY`(<2a1>l1z{t-g|KvS3>!Z||PKtpKo(0wT)vldupefxXz=JKmuJ_NU224KbUCzbFg9 zlT+aX6ZjW>zBxI-gFy-MEy?BxJ+r?g3omJ%As6=MPyeKppZ*CyELVzY_7`MrZDG>Z z7Jb4XUmtAmaEkoE43dITDt%$n;UWD#Jmep?gnVQ2&oAjh{fW}`55(L%FQ_d3rJtgr z@{GSAX=m%z0Vd#I`Ptag35_kCv~QC3b<&ARI>DruM>{l7`oM&@JFxqdLSN7DKHYK_ z$NqX|uUfg^pSi!CY8avc z#F8p68L0~TSfo?A=)v><(fRnvi8@7oqIgeI@RJjry|BM9%L?5n&;Il?8*jD}`H+G| z2w3*^>9fHjfxr0k#2xR69WfpyL>ic`zbV;0P4*XLK}7*C{(>YSN-@pSr}EW!{s!Ul z;ONB3wuw$b3jE=e!QW0c0?7VLw*aR&MF7<#8<8ZZkPyReAxWY_E_KXh+!QDR%nK|Z zX7Lv!X(j>_9fpG6tS}8fFacql67U0A2s;)#27Cw_H5h5>ZP@d}b>e+ARJJ*_N?;CZCXqgiwP; zpqSzO6ms7o^NIR5W3|6@mW)(?>*UB5k4#xRO6RAQPsup#FUo31CY?S#{*Kf2FUT@n z>NEc0B%Gm5mS32KL^r;{>b|`MD8Q0v%;7IgVr42y<4;J8(6Y*%gqMK)u~}`i(AnG{ z7s<+jDzOEx*uYnO84SagI}1Mri`>Md-yzxNmto^P_DwiDv+3?{n=Kn}f7z_atrj_T zEC6^34z1KUI7Cto5k5>j>|FF!KdQj#MRkLIvl9y8NxX?BF_->dmfUiJ)N&c%W!+(T zfT6<9kpkU(O?Z%B7gd4|f3RFVe)9q@l$~SXm@|3Rb(O>2PUBRC6Z9EG4Eyj5AJyOo zSugy9?9oZfjBO%Hnbk^4_+yleFBOZBxU^^zplVCTqeU@`C{W2=g4Lesmf2KTK&U{O^ndhb&hnTul1}=Bte9?Xf;pq1@}t!4K0{i<1Ogb3nw!qk1Xb zB_J!jEcvP|Vkzgk^kV-M2cm1ETJ;T5d54dJ1&sm%um<#Yy&!h$#er+)_u;qdQtiWs z(pkY=dZZX^7b78rTZF5j*n(C{cyDLUuU0I!O9gwx@){~|LxtRh!iEa=0>({u_tV=w zZ>!9^z~Y^k`qm4^fH&Kk=rGPRPg~vtjm8%`*0df>(Xbt#G5LIvA1x*}VL~_2n3Q3g zEsl}HPk%iQOfl|@ftPu&yolI5a)_3Y{6=Yr2O37iR!yOeSR3O@pfvM77ZRtepV4ZrydIy2|#gf z?S3=_tXnjf+Xh^2?Rv4ernh|5h{Ld7??;@#e1>*A@l1d*u34(SRy*UO8q&2GTOeHC zkFvm=ffrVai~x$lN>NF!Wnk87{OKH&;a3aZEsN#=GJH}X)2V#>%S;NoA3(?U6e0ea zT-=nkXl(&6Fd5Gz@&V@UG-*gqw47vL4#fbC)?nUCb)ZNMAF%WeexW8YO=m;7d0E_n zvq*X&XqozvzfO7M^p?ij9B|_}ZF}<+aae`qwd%Y^C4SrM(tEAJa8e`qUpTBJa_apquqb1Q&?9GyY8C|Fo7Mu46tQtwKf^h8GN+d$ zf;$?Zg;?vz(dD0p7^Vyhodg#jti0u?e=cG;3bdUgis6@HaphN7IyC%n&oBpoK^O@O_hM&>K05n&^>S6V~wieKWNki z5x)^SotWB|KAj&eSatP!@ zUrvY|{RC$qW?E+ZxdRQQg3#C17N7YoKJv}~?3up@G6%>U2;0hqFlm{DJ6jq|wvu4t zCv0VaNfJ)*7I;Z8VYW#Gcr7io^8|$CrH&gT)zO6L&g5KBFO?4DzjTJd$jFzR5qw&) z8R0j$v#6SSdBlH?e|`=BlFluwO>qm*>AL7bnS0-neiav_&|(cWWamU#7qyrN#_5#a zcOmK}5zb-p>>20D@AgiJFG?O}uZFT@{y zD;Ay6);@eFoEi2-CB(2ZwB=8}_8}=~cAK{(uXplfHaZSjr6nmwa9A~xLo-e906MNf zy%CZutX$)GJ>>8*gYRgWa6Q%yODZodK|qVa8kcZa&y}lc(DF-p*Ecp(DkU#lXLWEb zS~YJyQn;(-;U-#3JqM_a<9C+LYXZP&pelo-bOVXeC%JsKq;sCEq!}~T=?$dG7z71- z9;F>!0(q?gIa0~$Bcrt6n@h+1MN}F2XK_cU>p6qeuAQb7OD=tqPqO=&$1yqg4my2n zNPl(oz{^KgkD%a{^~+5drBm4LZOTTlo^Q}wCk=q0Cn@VmHD%HypmN3>ErTL3uO^6& z*0Ys{y)yjNLedP`_uS`@B=gFAIxRu+LB%=lJWJ`(j3{F?q%>^{_$t)46zUe)Qoath z^X{;&GS!=HJMN0(lSDSqc%wlJAGcquY8sSX%huku-O?Sg{vcluB%wTtFGZOepax3Q zb|sVQ`03bZy%I}HXL?%^Enxm)$>pN>eo2h4v9teUoeE<@-PSCe>5=)8Pm=9-n(Oun z(M_==k4@E7k9mA|tObymsW{Z3udu^UeY$ock3_Ob0jJaJGoCL!=;((73QIR)ewOu6%0@K6347Jz#nk_DBN-Y9_vYLpxa79 z*?L;AK5-jTrExm$-lW@;jY&K^tgFm7h~(o0HlJ~1Rfb*wRvon3>&i1ikyJhZ0o+7` zIFTLeT#Ki%-@J$8q$vx7w4b=1Ywtq(bce4F_J2lJDE;cktiSM6=(B@|!*{UKo5_zR zIQ@wyFZIGhd>++Jh!o5oe)5sZdOxCWg&^Su-ggwAE;>_uu;@~2M@m-JcrCG;!eSoh zI3;gE@0LtmnQraGp1PZ*65H$5gVUwF8`QgJRpQXORguQ=$e@hV!jj;eBQ)Wxay@$} zW<4~?dam_WtF8Ftz==_GNQjwF3ZO;0BYWi@q5Ko%)p1YJygCV?6%ixH>X%2=C*PGH zRi8duM74mI`)|Z^RwO?82hotj$QnHYQaU)$@9`M8l>*F4{PG37E01sDAJOMC%s3t` z8vn7^%`j|{IdygaVCOBGJgm=V>+edz@{I1CGSh7RouX);zfxIwQdxVVR@T@NzPvXL36z|c4L;q^F1E$APpkxc+$ zY9v;US-%YDP~1zg^F8f(*_i^a-(VQE#!UoxZ-~@N4LyU%x`~C<^J5@FUo{SnGcp>_ ze?Hl19RIX=Xfn}1QDb}ON3kt}Gv-x#v3Y#bc>C>B_8nt#$v@8V!QST4uI-2Y9YIsr zrk{$Qi8i;lj~d6DjlG?Hv)2>aNwwj)81ibL9KG2(X#l6Ob^PWvyT1Vlf25YzzA1l8 zfSz0kpzn9~w|6)9lR104dnU()VgO!L5TZ!d^bc&fv&$GFShm@uMn9|YY;9Ibe$DXZF6`31P#}YXKMDWA9qW} zAJ#&p3%?iBZQ@cM?@eC6?|oNIiBalPJ8>}VFv}YcCuI)_0T3W(hQ;fJJ@lhCZRuX` zygoSkdA9wSI9oi!Zo|IUsVVD-KAg_S?OxQn(<*+Cgj+vzO#Vqf*+wJBnI;QO!k*01 zB${2$1bF(mm7MdIZciV#S%x_5^e?6#54LTb?Q}?^GqyQnlli-wgqq`@j~mb5ym)=E zJrm5dx`R$5yuRDno7_Uy$mo*Uc{>|CYoBCy9a&EOtZ^Y$*gcpwD!_ATw3ov7g7;<{ z;wYHm(BS}2Hm5EcqrFT-m^Da^31=DSY_|vwboOiHd*BZMM@((?&HgUn2-D=g#H>ND zguzAV78eWRRNvTJ&}t2l!n(o-Pjx=N04fYw3wG&AbeC>1z9iqV=NRGvaAHOe)?zxd zuQn>h*w{L@>CCp!B6>PPZH*SAM>yK?ZSuwR-8M zSf8w3vW^w*CH8{mFiNCF@u2OeusdjACgWMX0VY>!f}kK>^tLu?Y$;ibbqto#_m|^_EmtIz=ZVdqXwn(mgyypSv89{Kb;*|A*ay?SvfXy^ zKZj$sNlTRBn{Db6+&f75(;TGatm|Lr6XE~HcKp|R+qj3Hdq*1oMUFJ?eQDhL(zy4f z@qfgZ#uOJ0m@vV2gYUB8LB21B1ZVVF-7(-8C-`A-vojnpV0NbG1|4F5>@tBD=TZ2m2cF_ z%KGYe>uXQ$UF84UtCVFmQu;d8 zT4FCgsLZoTb>aMG6sl;5wm+8v+u@vtzyi?i+U|s{GMWpOfDozlVMlPY^>D%tZfx3` z8+FW6T~?Jk4$0!^L8TQn$Gs3v1vvv4h8MxG#nCT9y@veQqv9qUz!Bc)w;nIlDSW08 zV^en+vziB5r_-k0p)aLsORCY3o?fAK(-epnG?WF)Ix8QFbqNcrYnKAAdU| z{JKrd1i6nNm%mZV^e;lL(a<;#;t-WI>V<-n+6aahl!84qd-#0Q9H4eb;X$Q&*^63| zhM$U23&PKd#Btj<5Qmub8;#b68TOt;QDfF?VA zazJx_qh124h3$VGjQ-uZcnA1XeSZN-&o27oYS5{|EnW><;~&^wOvaV8i%Qsb>A*1#-&2Ro+es>AVl7bvAYSm{2J7|=DQ#Fu0& zh3!l-Cfm?=f(G<8-G?+-hP#2n69I_=BOfaEFu#cVq`JY#R;}ht|CVN9XcLCbWSNB- zv#*IZUt}ye#q2A~=F8l7xW3p(&Jq*v9t|-x6A-rDSWo^ChOv1*bF=G(XA0% z|jEqUNx2*)<35YJMC*J`X3yT!0!*0+F;Se8> zv4uyE;8;8d`WlPA-c&1VtE;P()kiCEe%>5!>Pc6S@G+1R9aMPHZaE- z_FZ}l$!>=~cLswH8s|#5H1SuaRfKdbbOcQ!2v{uFjD{Fl4kihl7f+r9@@(=XjUm1u zM_$+pEme_q(hJ3vg13alKUSA99Ms1L%N$bkHfuJ^)akDe~7?eM%4^ovK~`*pSY_=zggAb`CH#@$f^2U&lx z44XHo7fyyZ>h#Qv7B&XcOBQ{0$lU>*Yvgcx!9}N8FFbts@b%`)-7UjJLqb8+s_O;% zgFoNH_j^@o!}qXPFObAc7UUQsT#e7;QD-EF91kjX9>b>MBf~H{9|IJiQa*aoQEC^s zDA?k-8{p=W7V*650eWv<2E(8^A`vaNg109$j54R@2>li!riNRs6#@1OE2QS%QrhLu zgXOmXM6hMFp@kB@xUI&u-`>`0r3cH9#dZM=8g0E4*G?CHIXyi)JuMVZ;lE!`7i;im zwRS-P2MKa_o^Nf#;=mei9&hdLs=NLNOa#7^^1I;Xhp440*C=%Vga*~pFI&xDSCKhtL+cOKso2S!{4) zWLGmZg6%MO3eHC%a2Yq+wycE?pruHnk+6KajyruJ{w@Sm`T_>BHp8zlZ^ z?^yN6ojB-gj^>~bECPlp+}qrLNmte0Rs$_&fi~Jg>L=(9!=OcF#P350C$5K>hs8Ej zd)$ZX9pjWn!gPcjNR(J2z%#t@F<+91=qa9RSOv6&9oM(i0u%*Ad83ZE4i>4WpODlM z|29$A#15r5A|UvXbR8pxqT3V6GDO@i$x{4-=K?rt^bs#g_-pS*Y`eh)0Jrf+VMC^0 z-`dckP)^{R&}|xqJ*i=w6*LQfuu+<$ZE_P`4(Y2EUq}Ge!+dsM9FsgOKzB-U2Sd8b zrSxEV9WGSJhx={r!7|bU?r7K^N-jrIH71RQ8(1!@=pgn~T+kG-JMM9*;ZZzBOs=Is+VMc4u4YArinnx#W@$MZI&MT?V`Qx zM(2Sqqo#Yi=-%QFmitj3SiL%#CcT$GoB+&t9nFfOE7&F+bb)_0=-y}ZF#xJYt4lAJ zb+n^ei|Pfq-cGCC=(Jd?7XOIO{}o=3KGvXawAR(RCLIfPqnh04hrtj|1ahBlz*}KO zF(z&kNKIf2DR^-A24-}1i981Dc+9KH1yN)zBHu{n2IQYZ$}usAibIg8I<%)13i}9M zV0lfSy~P4VqP;Z=G__wUjiB=H&C36-RKELlsSbDh8K5+5!!{rZh?=;&d9};zAg*gC z0=k4}qfllGaNNgn5}A%JSz@#>>5PctHF_j*>cLvrrt}zb?$z&9qK(MwU8aukrLlZ{9p+K+ejS$|_mIrQsQU!#!tkGCpKXoMdB+|Ui zNU|&Fk!0^@yVLKW_Z!001^!iV@-cnUoT~yS6!^^Hr<_PmN5sYr6&XFbEom=LmDYGr zVV^1R)kOzUY?kI&l6m8d*&o|^2>6Cx6SRy8C3l2>kN_bQb9|}tRt=T1 z4DvSXCbwt5Eixm393hj0igm8Yf6MA-T#>w+=8{}$HUWf}mY3n*i)Ispg)dd)<6?Ok z|6F&Q_U@ze14#6pPCzOQ_DBCjT4T|qRz1Amopj^`9uOi zpO%vLBdSM2ex<35t59pR@%uGvHAhM2gqySHDS;tKG1;H69m4-0(}i3W0*uhPS%BkS z1!>@!^UgB^kj>0G&sV_^R_J0KAAFD}=n&NU9rFQ!BhL*QG&RRp$lcr3ZzbppsDc&* zre%HC*jpz_vbmHPF}m(%Ao_qkkFJ=tp`8^JPEzYQO{ZpUmRz`eQvpjQW!$4WD}I;W zZ;9gV6zN@(p#zJnUKq#d&lP4D(3C3zpH1{_OVbk-B_=GT7fknrpL*Ovkm~!F((@&u zJSGtrK*^ZIj(~|-?*q^^FBQ(cjrT*?ZvrxnSVRevxIxNH!M)LZN8FIcdAxZd-!=+x zjE5AneMsR9tI07vIgJw5^{(v?`uimkKk?G!0 z?GC=c0U-j!1JDToaaS61-{3n^91a3}mLs5>Tl(enm(%}uI)D1x>DQ-ArwgZxr+=J& zJpFLGar*t~52yb)EuE^)&c+uQ$nA9H6Qu z?F-#Z7jb)#SSZR~6vry#n!t^HB#K%-3z~rn{T&YIY2T;q~ z;(wKB(V1JJ=)gN0628&+!z*Z@(jHL7G95Jre=K1 z%eRt8)Z{_vC1OqEbVkgV8`Ce(ZD9&0+M=Acig^;5Hq#LXNY zyh*1yuKk8(Yc)K^a~7M;k&v^~MtRHbi(}X(luee(B{7uYjiwEcH<*l6R0QyY)TAq7 zj^2*%jta2)ryv8Ye=Bs5gk<&~a~B+ui6sP2=yNt_ZxC~!wLD8l3{I_T2A0-GJGr-t zH`YT)8V|*PCq%@X;+$s(&EU!AJC7c*;TO5~@5HRE00aluK%A053YkZiTfHIK&>THe zTtrMc@ck{(u)Kz1^el@Wl%n&08Q%L=7?voLF+gsAWUq=K&Y?-uPxG=!nDidKvoen4a<-n5(gP1|3kDMuxnsL>tY9e?Q-J^_W<+0Tx}+%u!GiajrP zz-9*6PR(&=j5YzRZ$bZXof&XXF6NOjF#4Gh`EVW0TWV?8WNZVgZ)65~?)}ISBWNbW z>e7TJ3=O^-HAfaU8CzJ;)CbvrxpCBM{C=(UBAareH(U)OfyRQQv`18w%WnEI#q6gM zRD}|z7S`cCsnelSaY#6e)aBxFyWP1CHRzk?BV0-&Jc$t}6E2HLud9P$00*e{*W%Gp zURQXZYh*g>rC*v`FOJ*2IQq5Z?h&t{m5)_}R+>GmMlW~3RWVF9q(HZdRW<*1i0c2R#Hl@Id6Oy#S zX|+i0$P?z75BsTg?M91gdb34*LoJ-m1fqffTOn#UB1@rsb%O5?TnU!Y~ZF z1$DT)MdCTR;%Ea{E#W-EkRS{c6otzLSnaP>Lu`}UM}auN*2NWm46Yun;om4;vv6sc zFr$c(1xo(%>pHmbFmNj*YyldB4QY_wVFRdv%cw=1?jVTc22eBp9?jExF;2M2BCpi@ zpW@Ia+E^iMO&+!jS6e~1IY!lY4xoi^Ue1*yl&q{~r>%u$Lkjey+i>aR;hy#1`!g}FbY<~t#DZ5LHcEo6eW{h^!+a4@7D zQ|mS$ojgpa7}3BMV<)X-6(frv)a3EWxHznq<-0D7v7ytEf*bwhuskg(Q+^HxT-UGfMaIxQTYYWqb?;_J;JB@M(-A)M0qQ z(Fmnc1Z-$80hliAGS-gO0zqZvUyE#4gKx0VK9U}2wWE+G4NMby9{j*CmwoNb`M17( z9bzwEf?CuME)*nBp7-tpG;2d@H3q@xGC>-U29f5fPt(OuQ?1K$l&I6uon}$(6*Ixc z5>0Ql!TLG({Z!o(zzy=4M$60!S*)Dp@jw^IVxrr*4hP=mRXmSdjZ0vvfmcIEE9c{j zx<@Zr<}T|d{L01qC~X3ESnqR8U|-pWWhjdsI+9bs8Oj+U6NWhKog)M{`I&Q0=&KY1 zr?;0nCrW`@PBMYWw)ab#cF>pX^mbE>;mm~BTsLYM36Pb!^6zNv{6~c)0GUiR6!gYS;;-)dOE0f z;x5(5sorz3)FE35Rg_WcIyRLO+2wJ)_>Tv!U#+5eR;~c^uwuxtugI4c)N}?YYC=B2Vu^`qqaAaSJK`x-j92CbV>IC8RTw0<+)$cnhNN zjqNF=9y-RC9`9*{FNj94*CZ+0U|Hsc%+1V%w&?a;L`ny$E6 zHYo3Xf&nquL!Y*sBKFi-JW5*k8Z+jsg+_l=Hih==y7)R!`hJ!5AnRavz51{=B(@{S zVQo)Wn7d%*F1o3L@ei4x9fXZtbdUD5>lWpa#M9!SfbU~Tk(j#i#fRI+_m1nS(yXL& z5z(S?QFj?Rg;&YjKM{}>vo_Aj`r*S1sJRrH` zGx2G$;zJ@C_%S&thm`sWi6PomQ2BYa535TC@)u%vkE=+CP7_v$(W0J3kNPQ2c4h&c z)#8}x%Aqh^x>vm`i|%gGrB<4yR>@hfdG)5>Wwt%c_X02nKB?qXQueNdd-Lnn(iA3X5XEF) zX5!?Ge4dHRp`q9`Mrop8G>3Wd5z8mC4u%E!&v8K$>Ddf2Gl!&P?3O`;X2H*~fPkem zM9e5muUHzkI+`cWf}_+xiV4Un{FMalJ>7awxBgw|)|qJ1nF!Kp)aYM8if*CA8YxRy zSvaX33pLKPBSpwm>l9z1*AN5{+f2}GcJL}8g%^~HlSsW!8q?OpMe^w8o7*Orjt=Cg z(?cI2y@C3{CFUJ8lPY#AQIjF4ryZbM zN2l1fL=20@&XKvg>@+X6CkK&LGwRasI7Y`G89*Re@RR~yJPd3jM3G=w)DyWes|{y4 zdgtHw^K7KiK+gf_{;@^xW;XZ5?%UTp>i|U1+GyM-6{j-48`IF>6vILRbtT@YAoU#2 z%@sm6Urx3${YECsNi#)*eA7A1yLTRS<1$W?^J#-Uq(W}J0^daP1~(4z#t1H-7clXD zbXCUX)7~vbiNLmk9)N7WQD3VHS+FEUYnlhNgSubm@FyJN_Bm6cdzoA?(8yVb4n`KU zof2Kx#1J{UXXER~}f3frf1jY&xxIbj?jw_?N6eO`7Oz1(&Fotf`9 zFvO>rdZLz_s0+rIFrKW!$qb;2V5d7F5CxKgoJBfSp8cINeu|;H$?Qm5j=&Blk^m;- zFc>y3oiRW&4Njz|CJw73Sh63FB;suY*>$}jM5;8zWZb+$TR#WPaaoBB}((K5h z(YgVA*J&n`1=Q+UiH%`+5nfA{@qlJ$1J{mOf|0XGfLzDj(Dc-g8e+6(lAM~XOy6KY zW|e(i3bMLU&~ksf2L0Ap2g-$TwDm7%&9B`bgK*gMzz7LjKj9MjnnoP7?eO2Du~gmO zfj?P9@D4D8Ha#Fl@Iq7u*-NCOV~lr==5Z(51trWb*eN!h@ei(%gCh+h4OkQgIfY%B z&e-CQ%+VeQ#*nNn6#Cz49JS4Wo zYY@~IogY%ewrVINPm|0_G|e)6#y(lzmRfnX6v?zz$v6?5p>1}Pnz{@}R_Aq|{IwISBt$!%_psG0lEF(#c1h<{^_ej5J{Sd@GaE>;9JLpLNj-8wqZe==mS|INkIPMtz zU9PM6U1tEOB1UC)@%%>F-VQD;D(Z~}owc#4E7$$0ioYif1MceOg|4AoPcL%`t3{C` zv3X4T-cO{cX9sUi4&R(S(-P1WA&^W;)bK6xl4Ftk@PoYx7ZaFIZW3RmZH^aAYq#^I z=RJvN{VUu#8JL(d%{1xbpI>9}mS@^tXr_55E9py+QGh{@DbuEe$Mp&H{iKBCtHI7V{(5)@{^_MoTr73=q5`V<;N4kyPHWA7?fhDiE;X0qCB z)J(%p!kdCSV5W4lhAlL(Gx$l(Idr_Bpafw*V>?37avPeuEmUT#j07#Z51|ik!;-Cd z1)RrG7kw*WevYN&FQ=!qUs1I2%Vy<&gUY{uUFVd=6pUs#mBF_l)5&n$uV6>a&Walc zhu-tHEDcxbBS6#g;DttCDDuP$j(psob?-Ve zujWjX^J=8$C!p_nqbr=cw!srojzikDJ8IsLT-1^!R6b^g)k{^M zeHpW=W?2clvxu&&B#n)BMQX@WYi1qAsH7L79A5kQZ;wYDt6?sUkxtK&ZI>ugKnRQ6 zWVi0(1(ntG9j`qGQ{@gCWi*akzd2uMGuf4ZaZkqn0F3jo2^FAVqK>}9CsgB0ts+#( zBHw&zI%P_AEtmX|OsSarGvS2Cy-KadP(~)-vy**DxUM2XJ%q4TvEouOOBGWaeb+oN z&m6{`M5g@2pOZTl@eoI}!UIQ+;HL8orhzyT1QjL-Dj0-RXK+&vxnMF}Zgz7>4yc<+r>1)bQgFO}hA_xNOeiJn<2d;16LOSYXjD$C=39BPJvQ7?+B z;p%RWIcy5@MMHjwrNCnNYPx6Uw}XMj zeqrgO(51}5#1@XPBTuZ3`}w~yfK!ZK$JsbDUYrbI!8!g z?mc-W&Iy$z5_e5z0f|-FqqQg`CagvCwh9+42;t$2+evcbrZ}4FsZls^c>5ld3<`<5tf!yJbIGuCAhWxaD=+Rg9VJdLqc{Cv`b*-j!g(0Q z=7efr5!$PGi`21#=4eds_!7#5;tTX}PxKSqLJ*@u$E7{#nT&FBH|!3~-gRD=*$W0| zDt|0^F#~Yx(O@7Z{AowD&7m80ycp=ZsaoTZb#8D-Vnx)%KxECvuzI(#XbACwwzzd0 z!-+e5*SR!?f*SB)mvrO?{G>uxNp<30x@b0ivUB{f7%=aRKEVH|ulPgd9e;hO{8N7n z5+AX1HQk{%df~#QkhiYM`QcOXmDn4LM0FIajm_^H!xMOU#jU=#;*^db~eYE6VbJDx`jh6FXqo~t=T zoq0V18r@En$n(xcKN?ExYWC!8ZX1^AT!Gq81FK8Yiya=JfsJJ}vcshMSETNV z&Y1x}ybsU`H)(!d4I>@iNQ&T-B@RLd9H#2qor?|zop{slToW_0x%;*{VZ|6_SMXUL zm(6{ppNx2g38x^;2E6G(e?p~M9qy&x01eoa8$JU3*?l9k4 z;WF3Z-}yD>)iK%`v9`NWKo@#c8pYdYd5KZ-n?9=b^d0Alu=V7yCM7Ij4->w?0dF~K zhaF=CX+M2d*f>JZ$%yMwl#I?|FuZAX`if@xxJ$b2{S%zwddrFr&Gg<}WM3}4c$?PY z(NK~22_sD!Z)tP0JZMTpR}R*TJel^?E?#R`X3F&BZIqkrn=jiOB<*I16`1&tn)@8; zJQa}!hOgkxB*?gLT>pp}rlV3Sul!ZFBTumFXcOfuW5)CNygKA|*~p*^SLo=b8#?=u z{~kP1`-OdjJ#e2o%o1d2CIDTl^#!#pZS22^EiEd^PUpFtp$~%CmW92()@8z(j@m|ZG=3yC~;>bm&k8SyX&0TB8qIs^77(=SjeZdn!wiSv|DIHX}Bx^t5w;MPJ5QvVq)rH|WB6(OpufrmBAwGk^W=2kg13pw*1>2<%=M!7aaP0xFs>$#522(=|l zXB69a1yK_xF^Cti_^nv4P4=uRS4;z`RD0tTG9km53N&ET6KgteG`jW3(32mUPBCNd zSN3*-a=ZtK)3Z~a#A)H}Y4H!g?#I)DI{lzd&74kwRavj8+65eanU(9DF5SFcc{_%i zxRDwK%s8FwL5Ekj)y=8xWtjTz#x>ZuZR*~6jt;!z@wVu-q@5mcD|xO76V8;9E0-$h z{;v7;^lBO-M#oswz-q#Dot+kWttRk}?=H!op(*70PV$Nv2(XTne1ts7mr~}i=6sJz zKBn~@oa&cATnBXAiAR~+$4Yy!at zX-<&@ALEof|Cd`VaI(A>oOCoqMeSRpMsLu-^MYVcn`a}5kuX+u9o&kibl>F2`J7iT zNVeYXvIlkRUO^LB7~_mir8e+04i6>cS3ki z`g0ZYT~}vb{60Rl9K+93Cnv-ldqP(30p+ZTwE(>1CFrt+ETt+(b6yw@Ti!L7pf7K+ z`{9*d)aFgY&&Wo&WY)@NruBYAMweu`4%}U7Xw}E@J;Ver3#|!sVt>$+1nPk3QL*RN z%FOj>U{HxA-?Z1_5@5D=w99A)XLEv~6bW3=sRgVk+RbUhS(cD>*s#ZPCN9$<0y7bg zaZ$|~2D2!Xnn9B3q>aACBLCD>*14BibxcLBrH?Zn&qardwE$wtRVNLWQ~#o;9fTlb zpU1x(`#gUMDGGqZF*EFzSy%_ZD7TuMXW<^Vfh>4&8@PDZ>9l)WrAkd2*b5VH@I|0ea##;9dM1(NJ^Mu0}FVcBF~JssGhd#E7{{7Enj1G-)v`kZ3PdI zwYT!SQxCUy4)=DSA3r1{;2!RY*du}REWSg3NCXb(1UsY0l6*St$`b{{A>TXv zM5>DE%Sfe_n=+_;;aA)wgPqxI5YrRZ>m(tPA_({>&yc~Ol1lLpoX|(WInKJ*$0$(C-D_uO$d#fpJYSSGjlR>x@vJOyT z`jOl-N79fGnpp6z*gSMG(_SWKZT2GBI?@ieZ~aeN4G&=dnloY+W;*%k-Vb|sydNBr zkzCF&tY=+ycs%y-cpN3~JJ~s`>|Z0Ej3jTpkDT?!FjVg_Mvp|`5*-xnHH_(EU^jjr zdy*@ofH%pU$y0Qp#EHr-wEYQlrYV4!VNoO8^|`51&>7AX&!2T8PsLx3Y3!_FK?JaI zQ@tOsv`b6sCk>G&#^oBhiJ_Ml>(fQUrk+K$kkQsItMQPGJ{Sb&oo;7zA6k8KOOw?wN@l1Gy#UyUs;W}Y$0O*sNkRi?sU-zEZE?1SYDHO1iZcRH z%Si;)DhuC%O|bJXg$jwmP{(}EYSDR|Q4;)N6!x+8SZUbdemahU2rf;mdLbG^cf#zJ zY30})=wB$G3K9+zxWKL!?ci`p9}C?XRWon$X~3{2vI5fOa>K{m7?E0Vf#;h<(wXb) z`!O;M3ERWqn?P{h4ZpHgr=FK=T409z@2d<%H$#8_$(tl!FFA?w3CkPY#0V^<4UtAy zmdCfglao3LOx`*LvK1RrZVcG(!!YE{)=~xSUNK6_qZm>U50p(4`T7XH7=tJV_X*gD z*8X~K)DgGHurkJ!%aa<(fIO&LS&n8;vh6qNS<7<#5A1tCb1BN-!~`egd+E!yyCFSl z2R};Wv{GJ-twP$*=sE)@?qxBj{La;LDE^bS1RBxN$jR!{k^A!TqA=GqNX;W#FH z(ALsvs%S%TkQoIxRuF%ltu8U?543=bzvS#vaP`hPyXl&fy=jnxCrl8JIG9+c9oh9G zN202Q6~oenkJl*NAfnJMar1B$%G3aQRm3=|xJ+;-kXkUT*02+>J0)q0_EG=P{&>i< zy6FF)gAj4DZ6X7T=)FcZ0;i`y>Qy;it2tLywPq8H3zmu8GZbg$84ds+(~KgbXDc$xYP}c#vv2+A+4+gOv7G z4iziTw28zd4#ja(mm?!3?2@=kJ%c|6SYMjq6>z{dDf5_&plql|a&yQ)j-yUvE4trZ zIlQ@fwYyAtw-T-+)ZrRAF zH_%T;JiXMLnJb`hByW@HBIW&et7kS{NfH~hQ z=<2tGq3RNtIDkc{*j_INVst$?*N$R#;=ogp$p-azJjZFO;}&|1X_^>wGW-?h;;r0y zNH5u&yPk=V(!1<+&xAnXuOQd4qw)-tyJ^9p;3rV-xfhc;ce4=F6DVo#DDcouHS8+VsnWzcSrcz4Pmm%SiyqH99lOo1?cAJ`xs zcG?mGfQ~)3@2U8|EgEtZkHB01)h6Ksj1PLv;4P~H*>*RrmW9|R?p}ga)kU(<+!h;+#aK^WP@(9@0ipXh8yuOYcPI3()rdw4vX^Xw6U5pmGP8B z(D}0csr;$%p|)%aAvs7-!cZXS(Gyjl0;5r^)k<1&4YOs@^{iKgqj#PwLHS%4h8DE_5>xkN2MMAnX(eHKS#w=EVrADtBSl}O*eWmLg?8;pQ7;lxwgI;o3r79GAiX#o zsn)pHOG| zjjHg!QjFnm+T@xIlA{*N8k0m-E(fP%di8?GsHM0+F6CRN8kBI}4KLwxwqC>xiu0Tc z67CY0W{3*sdcnV45^TE}hmKwLqrg>-YfM=?yBTE{(|4H8PnEl-0DlT@==wRfB>voy4Ox z237;Qhs}z~{#8d3XR}D8>H5)C5}Z(UmoTs7!Bl`)aFroai>_lb^6HTpop}4zp#X3Y z97*x?Oj<43i!9rt&;Kj=P=K4k=F;g+I<<|_8*Gmaelbh$CW<2z56W2*Z}?bBJFbM~cg^$MH^cyk|`n5eTXzAIJvq}5M0lv=)dRE9_$zB5+^UA=OJM!^Exq#h|2dUkwoAXhmSC9l`ua702uNF-y8Yco&X@i`3s#( zCt7v*r#Z94bB5kvH#eUI7pYbIGXZ01QF(=v9AM(AVTamWIwyou#>sz+^GPf>poMx?zgg@FE?;EB$bwIWt#MCM)umD ztA6iJzY1u`%~zN9TFP%Fw*`-q$R1Y4aAp`rqWe^h2}tWJ<3s1vGO}4nXZD{g~#=9h8)VWnt9YBWw@j2c8Hd4oSJ0~ycr(W;=v7d6sXWsDc{eJt~ebOP! zUf7KL=}ve(qv&Wu*be;sajFxp&}B4}#m{tt^w`B3TSQxZdZnkQ1| z6)GBDiCb?m3qg@h)K&@1i|U3+^eK&q=Bz`jRTXRV!2h%H2KxDi1!Rwm+FGvPk_P1I z%eW)2CU!6DB6oW8mM~ithAcUZZfu5zc8=nN)Va0NgsC@GVItMB;0hhuX7-+w6|=ie zoSq5r>%CX*lWKJGjndnt+gZROs3T4vv7IYFl_%fT&9lEUPV4RKp>|2HUm3NB2T_lu z>&F!SAEYz}!%iO?6BR&GQVd$YDHS@+_aEF{p?o1pUdXgOx!{shg``fwrsaJ*dV5cN4(*5 z1OP6$z8!%a3f3ElNBFOZwX;lY4Ulp(WnO790=|ld@37Zygm5Qu1W9X-0CB*28yN3C zqh(ra0x(j9#JXCeojl6J6oz3Ob>Hh))iFj@7>@h++FnhwMx>o^(T&c7u0+{u3_1hn zWoJ&nbk2_9Rdf};N9AMMS&rdAn@uz8SkKm|xk>hCqe#DT$fyc_izug$Sx|3W-<3sC z^7O3VE8&%6!$@!pimtH&f&nBNG!_dOtI2Vvr_^yICb!G)f7J_S)o*UoSxtLuG3aR+3xGq_yzeb}acsA2X|-x_UxcdS5OvxFJ7mKyi)!Lw>`^{R!Zo+ILXAyBdsEwJO zJTT{=-*}v*azs45fq2wr9*E=r%Zvzxo3XeEBy%u#5W3sM;?kmWUh*x7g)_NwSAA7# zM3F*i{xxYDPHM2nTrv-xnOn|~PHFVy5>}R8(uUh9?QG-vH04M(*CNZYp~>{_3QOKb zr_&ta!$o|FZe8!O2IEas>bGv4T}Q4d$3zL6V?UFe^0JgNaoc6za;er+?i{S%YLaZ2 z&0$-T08t3jAZ=V4IP6ILsXs?ZpHGv{`j2HHdfI4Ic6JX_O3G8#sXr+oHQw3u8*(X6JXJg?=hXNfrMwhIX+VzM_=?FT={rKukx z!;U>MuA#3eGr3DD{HZ-&->S=_PwkE(zRud48#DHkSC(CR&Ahf;{8M|C=uaXfwlJ2F z*%*cw;q|QJym6&@>DDO(T)c$6UHhU_S6|9?{B`|0j9cS#_UGJVXF*-hM+jz zEt$csZsk>BPBVAfqM_?qhdgit!BLl4FDahbA~OJo>p~qFDIRHwWA~hg7x*%7CWT?rwgq#kYB8fM= z1jCy}luUD6KaniS^bl!~ZC39o%4Ayqd9=y&t_8Od4j}Q+VK5XYGg>JCCpGM`5}*_5 zH779pI+_?cM}bySt>FJbM#`usIrVQRPa3vX^)Ou5AQ(cz2!@DEe{u_MdBedUFc{Y=biKB%N-mjwEM-( z)Ld^kS-jvh5KcVEiHTg0P7hk;2CQ~$4+`FudwWyfzfm1Cs+}*Z7*XZj9QIUKu@> z;C;~PinnR0Yx}1a_4p|6bhi5VH z0^TIAa0_t%($ zM6{6b8D)euN6p;DrWK0j$f|K+_2Q>?r3^JvQ}mo~lGMqD{hTvk0LGbb;7D{M|K*j0 zYqL0yv`o{6p4TgNclUC+qTL!r_a2fM7mdE01W3z+?D8J%I(sS7vs+=fF}y@1@*(DT-~)r&dUqG@c(+=XWC zfTeC{qBEmNUWQev&%=-b)6yd&?LdZ;urm@0EbXk2B^s2vb;7*1G}A?WF^I>>BC!qq zTOggW@zf8b#V{Sf}*6p zPv!2aJEk4q1JSW}o8NzG85icQi%lg=RqU#vNKq=YjKoOtI7QDA*xgj7C$YFSIYTIx zu(!0V1C-c8@`W-9+0^Fm2Hg&+TpfEIeCG~RJZ|TiM6k}zYyxn`v)^=CVpcZ_GVdoR zg-M^2sAw#itnLrF*BiWVnnHQSQ(@62+UaBYBDbX}Dwf=!Sn|RSQjUf~(JDO6sH}iAzwa@Za$Ba zP@X(pq1U4GZOZReIQDS1Zde53FwDW4ucIXv)gQdS%F3V{^5 z`&=oncIaxX1gy`K0aZCXcyfAt9*6HH3_+JLpv2`knP@>M-!HKz&B$!&I1JZI$u zBR5gu-MtAGHpzg|a*p}_t;A?VVvtF|Fmc4Y!IgJi4;Cc_iuGvV4~7SJ3zt0ag4&7a zY(67sW;|f#^8CRvgCjXezH(pp5$BjFa8NL*SMw%_aVqQHVru|PK(xOmkEp?+Y)g_@ zi2Pr8mYdE^PBWJt%Q2ndFYc~UgDa<|tfw)E^-^W=4_PW%D7#AVZzMaHHGy&y5c&A) zL&Ee}3=DtD(F`gvo1x;lYY}hy?(C;ddP)kHSyR8umD)6;pjf0vjF}~Y8ZmtwJONF; zdan<|_fMbb??GmMUZfag%ka>wtrPhQ2aoJWdpsdmRrV=OoJ$UYKZ)}GrQY_gqt>Tpy>x56)EB6v_e$eGnYUS;)Yo>_Q3E6rW zKtCN{WF2R&%v{+_ztB=ULH|uwAGGQiOtjajgEY}a+tm-L$>ZZRi@Orrm1&CN&+CSG zM-X&-lTOOLhy*jq5T@*kebHXUznY`458INMzP80*nr1Fe{%pOi>jtRPPupphIZn`q zB>I@g1|H}USGrBJFg{ZR(!F*rGM`U^Z5k@WZD?guN3*xGydg5@`*XwEGh2-#XA2L& zyUnr$bTwul^irM{@dA%{IC(Emi;j+7zL@7lQRK^eRiwcITDhSWBLW3r!{;$xSExON zriN?}Mk5O03L^bJ-37j-2K2kgV#Fj*hKkg+Ub581f39wZ-&RFd<()?QkMV#Sq11XD zl;wT5onjXXF7EcPcG4_&Ig(^aC&xe8R9-D`JEOsHn0CDe&vX@bs4{87NbJxJa6PGor{ z6zK=@W`+^Ka*0R$SVCY7^lD^~T|Q0z1ONGk)E~OKl7kf&8GZCHR)N%@I7xWtO%tGV z7~QLTPy^@`4&WliZ41H>&&&a@LeXkzaMLx#5WeaHf^!-GVr5yH84D^gW}{G+>`Dy> z1Kxdix>pqcr#sg4G{`iA90sT9Er2rxIU%`#F}|g2Fa%EN)^+vPjKf`>t!u@jyAr31 zRX*IB$hkceci;>eN7mI8t@bDa01n>m7 z&GD@&uQ3Q86Cx!1ATD?Y8WH(`ZQdLe4?Uwt$C~4*)tf)Iwa7)yo7NasKZ{ne0e9Sr zj*W=lM%e0RnLNLA9tn6WBWkzP;h5YkU7NXXy%aX}U?D@iRv#c@h}Yg+0YmnIB=)*Mg51y{ z*kG=?i?rRs!04^SC5#~HcgTSU9dyg0HEf5bd-j8NEI3gl6g{S6krnk8EW_{XcpoKusQFI@?e=8EWRXmjDeRhn0M_Rq z#lY|qA0=z`-sydmaOO$Y1x_5V1vZi$L)xG{H)g8nZkyL=DQ=-HCyiKE}LkVgy7FCdUJNu=Ec zgxoPQ=@QBZC6&Jyv3z)P`EU`IA`N~S$)qs@O^P&3Y+i(J`XmzpFq>?uoA&*W)USX5 z8WbQKF2;+CTW?{=Hfo<(a)KU5J<1&kj2GRpu0OQ?3&5PNolF=a4frP}(^wqEnZZr| z+|u3&Hr=s+i{$SM$9zMJY1S)@S#+Cg>~hklnCz_{ignz%SZqmS;=|4&lw9aBho6qe z>F9xvDmOzdYO{b~Ty@)`dB{;FUqqA!v=X~8Z7NBMJ466+DnCj1bdiK9Wa8fRV{8Ox zly^dzveAR;i_WRLpHd9hJDe3(G1*m@e&3T@^HupTuX|Cya%yfk7^BGAlAFf!9xl4M z33^?xy;)A4d~c#wXxJdWPocU^1-;*t+X)339?*4UHn`-?#Yvsa0pCL%(E$eku&tKd zo;kepLh?x>Y$Ubs;V=8$9#0ESm`xXV%}~xH%po*Y>2^d4Cq1xKc%)-jrj+n!prw5YyYn|c#%SGzaB zyE8U5dXIi<1Xk*D#jS+&4wXbec>ZeN18{p3SJQ#A{puJn)vkFd!e!89UEpt&kLjEi zuaii5FG)>(85c?ePKnOQ))oKqDM4f05lbbBF1294+UrIgvgfX~!hvsAR$!|~+EEvE z27-_`i<<0z?a(UBY=U6{xTQt`nhFfo*M76_QpVkKNcc+e$S}opS?L%p-hw`{+HPTi z^f}3s82)>yQ@jU1{JysDuzit}IUjrQC!4aHcnTsxhIJ$E2UTc9`t^#14{z-rOLv6JzuWGJD^qe$M58~z z*+b_*ATdbz2-j)S@6?l}dcBTaQip`S)J-*vQ&iA6s!{tAv6xrW^n$8lGAdKFxIxYo z+RpJnnw;B?p`IMHvN69PaHX9MB{3ntV}1tl((#Ikr33FE)WNTP1*A# zQH_T^x)dz7wb+rxAj%(G`d*K&2=*16UUTmrDjA$%_{uxR_z3&=@%8WH>r0O>!r4SH z_>VimykY#WJ;VqcpN!G_CpA29d*sGpRh3J(;ogF<3TP)l@i7`^=;q7ogOfL}e@)&j zudZHc0FBql!W()tVS9;6)njrYLCl79cVn7H4^51SiL(ojod~fYmyw!oW1|w&8(Fpr z(A-#EiMF6A6l_#@cRBCZ3oil(M6?+ma+Vji@oievcCW?v3sXDblrBO>O{00T>MMps zxUyCTW#6=7QB4lY)~sUDnkbZA1C2#v$FXS-d4A6?oi~e*bNK=1v@d#;9QCb%5#Un~ z-AZx4d&WkEmPQWhpIeN#Z(~TGtmci85)EMz_oD@7&w_rMeS2}J{plGFdT#u7Mq)Ue zvddc`1u?A2XAbbt2E9oN;*(y@>Ud{1JFRj_GJNki&gndE$3a}F;nG5k|LHSHSvFg=hhzpwde z(AGT}jAHF{*~|-sWS}Em%*&2Jt6-W6x>|owGee3F#Upw|0wi;ZA#@IF&JYb`o>}=S z?t=RN;N%v@Wo>~B1cm!0MuSgFv=KIDa`q67+sbc?53e9cO&l58j{D7$ALxiu9Hw#$ zP&Mu%J@?9e)3qd*FPqkKoLCQc6lb_5WFWVKS`eaNxJ_Y)plcnWmPus;2!u`+=)w6V z=H4-vg?y}~A2kc0YY$1$?5TihgJC0qR{`QpvQss1 z9P#}|0`Wc=CpoH-wkJG$r`8e+n1LI6+&kMtaCkAwbFeBo4lIr=Dfz5g?e^rx1_%*9 z1*t1{ML`1YaG1IA6c;sFJeH?STgE#DE;f;}=JT*`BJ-brd~@Yo_Q?vVvdBxZF$DoA zqThnWSkj29?~nR329(HVSYw}wN#EoGjVHAjrlXtCBMJY+y^`olHL;a8y%s``BpOjJ zxkbmix1UZfvT=7j5lm80bQGCv^p=t4XqbB=IGJ<`iwD;JJ&hNaE2iMZg|jO%bM?%e z3s=SWEw`}r2S&H9YD+I(m`*FI9C0X{ACKL(>lwW15;6g!Osy&jTXiJO*&Fm`g=;j* z?%T?G03=WV2YXm}XDUitRPxtyMH{w}8aUwF^Ko z&j1+jn*$m@KkuUBEAm3u6?L*GI?&MR&<^yNxZD~F)H&G;tm_uN&~#o2(oMAZ(3c=^ z*>(4F{4Ak=@{#JYfw_#x!GpiyD4bG$R8lE|F%-C01;BzmsF(*~wBV6RdlI?jBG37G zt*xw9M`dM03cS%}-y*~N7XrvV4bLs;Vy;GaU_^HlG# z!^%=xzp5v#?uV+eq>!5<*bx+)pjLxA$h_5<9hMP87kZb24#sAae(+P_z_;mna6DDu z2b&BBD|!UwgUyNK32gkHtGYY)0_FmZOdrdy_2pGF5cZ;WDo7JvC2@}ShyGPkyG&>Z zl&1~q_#q3}<9?~#;X;Th<&Ou4&C}0`c9KZNs?sxZohLM{%vZ63-mw&Jr2JP42nSg( zo(rsDzXJz=K@pDdaLc|cw7QP+zuT5@43rd>qrJ}QTOM&Dr$HQ#@VHYJ7Q;nQ|X59lZKRg}7xp=IdIKSeaf&$*Ya|fm5AS`al!uQ|D zM;IHC6FVce(W%V)>jCgW8eOPB{8V;>h!)z5^)yIzLG?!NXaNE+9t`vQ_@fP7^7%u_ zCmI^;gzNg-oIjPqZ(Q-_E#;z))Z;HM1JtpF&ia6B$1E ziQghv;HBq{axvQ{$p?4@a95*e1eR_D#T!!IJ336|UM{M9>6|VP7$7PaA1cpcdSs5)3mKD-Dy)2dMepDc zGV+V}HRM3eBz6a0{B4aU214x(aHC%6u-T`Q(rrFwhzrWCgK|ufvVnN#q{nk|C@rc= z6e-yhk~WU#6ef?Ksm6US=jxP}oQ#wu%5KcDpRw0X*z4BK?^!=%Z@xZP@iSe8pmVrP z+lC7^BM?tvK?~W>7=xH&JEyapGW=M`dW?XUjR&K&aMz&H0-O4M_RHDS{bIg4%7s_9 zXkMP9-)rv1+Toijaz98^?U-6MOWjc~Nb;P-Y81>W*r}U=XmU_48WoSGfWY*JFHl@{ zA)p@%CEYJ+bEXiyf0@+evK#=T>6p}?4lff;_^lPAxMa0XJ;V}g*Wu(K6XGQ;#!_w^ zar76q7P1Dq5(kEYd}XYI>2}aUwcYA5lhjeY7ps?a=hoJ7b@-*}+wRue!)0%~BUm3MdE3lR-7H~F zhA?CZ-E>_h4V0J2>`v*O=-A-#%#+=zFk2Thw{Etzg+N;=KH+iQV~~$bT9ZcHMvF3I z0aun{cwH97dL2g`bC`Idyrg909^Cpzs$|BgM^o64by*i9(`1ty8xigiy4qd!Qbn}F z%0H=P3Dqs}(b>0Vx@6g3)XJ8Qa+_jgut3E*F~>q;vcuok0lP1xGZX$2=QR$Ux` zn?C>^4uF5haWzR8(GQ{#unlNQjBpG91D5PyS0Z5cZYicQ02xDuku!D|z|ubg-q3iOwofBYe9;2AcY!`d#S>F z?T3)aDT=Up)gND={K)OWlD7jNKo26qQcK38w;|6CijayT&_s$ zVSEkm3PTZ>l5z;8Qu650BU;*Q(jCK*oxSZ2lRg^(O1OFP%QBW^96N@FUoz*TEB-ok zy{1_6!DQ0pfErOuko!D?pFJV!qfr8@Oz{WA1mY1cvX7 zF^VLiaN<-SiCdfM?gZH+E+gAn8qN%WtZq;Xg=yRKpH2591cjL* zF+sFe#q30C7hlvH%wI29zT3PCY%0u>Pcf^A8&!mR+q0@LJX~N=K__6|nj$_5hdsEf zIYsn79is)ZXPBqW7oBuYf`jr;r2>SvG+7zItvUrORaSM|8! zfb=Tm`a$Sd>gk8Hyt48vTPf4;mCAV%%6^fVKAd8}20r~qY6j--6-XOXjUpRv)IOmm zsVRO3oP>n6bk-wY%aEGNEx zS@z>8bC#E0>%VU`Nbd>-1mlptJC7eH?4pJ`j%+-dU}6jwEp*~?k~&77@&@+z``+i; z1@QdM*0@QiEAppI%vKFw71ni~LW@*GbBrupHH&O>3@x`X({!>Am@6aZnVOETu#lb`6=RPB2D`c^1MZoV5kDIyL*P*)hi?? zp-i`kpWz$gFlGwE`8-5C3i@D9B0_>6z)!?8fWa3J<{~oHHNthBoZm;p;$*3ua}SYx zTJyMtOmPV*+=BDEf;gEGqQ2~RNZV1hgWUk$pvOUNu-6Sc+zlDPhCf`dIAt$!tLvb{ z9CrmNO%&zt?!^+J&odoa=5b<~>cGO9X>nZ1Z#xgCEOGQtF%Qk0qvn1j@!vG?-!$-_ zlLi{hyc02u)Y^=i&B^zFBg&+Z!Sg~9;Ocr(hE9_uFb{M@;$4q_XYwn^y#QO z5|{GfRtpn+ncI6~A;;U>Hp5SIH)=s@9lFtYd@~Bd``C_n4II7B3clXI(Q7}|m7xZc+b(~ke?Om^UuUig9txJY zBswx^S?BkeHvK3$ZjCY~D0I_B&5KSw8%##+R4+E{K-!uFDjdJSPTICdD-4RTgclZF z7vdF@Qe*M)>aqcMO}&ID=K6$!+EChW^%%17sxWFLDV?@xd5|oxQe!X7Me@aMQa(O8 zdU3M-5}L*+Ehh1F`R{utr~5~T<+J^ld#7jHFORAE;^Rl%%T9WkG@I>VZ<67Ei;poM z_o$yVN;^Q{K0=wa-|1drY3S}4W6}5J<{4G{Z}El^kbuL9aAY3D5ZGBT}wM^w@V?}o0Q{BUP-5WG$OMP+`clCx=6^>2>Ssz>oU2@I@Q62ah2wB z-x9+eds$tC0F{koOV(j4sSrLevYMJ4`;D^fzVDkDE=r>1lyioloD`PioP?f_qHmlu zH+fcOwKck82WoBIGdtGnCb4+|*a%J9@u?C(2pTe;ZT>~b;mZWSV)uChirzjI29c?5 z>@RZ!Ed5aEW90X$o>}jJsaXoERm&wyL+lEjRbmaX$*q(yzg&;0_(13IQ@fKN*+UO^ zZr{qBFj4GZNi6LQuSR}!of>DlHTviz*BE`i|Nqt5Z)yfm$yR@@FG~pB@@iv!by!JC zmG68g7Wlw)~hrg~StNObP|ErWL$#)Sig~&H1mssSot9}8kkf^}S6~TvGzU07!$lWzmX+vTem)LR8 zpT!r@A%_Zi=#TV1h+ScG-KtkT28vBFNGRqFpa{#B)6m1?(ykP+r5mxc;x5GRJ`~Sl zMHCleRO1ZfiEKdeU&+dw#QyH(ttQSCT(lD~!-B2qp(lm`MTQ$&OKNYEr^$CV%&`;k z_{sPGvF--*G36J%*gf?6F$EyL>~iBcHfOr00mL?9TfT6(PCHYG|7Brsf`vZnjR(y( zGBiRYq$Xo>oR5ssDP}!@SvovA+yfSL zc6XZ1D)L790A&(~2ON(QO5m}Kd?w8&{M-f+n?CD%x)=-C(lfex84eKzFVgXQ46r8* z6vx6qJe6@WBTB6#e8YxZZo=(KcUXxoyJQfpP6so1!mH1Vk7JX6{U!ks^rORgPFZe> zOwyD#eGHqnW_MbuB>A|uk}UD~tH~OS`|~pcEec^ddW(T#G1xL&7=h$*gT(#$C{2Gj z-PIV-#J01X@cd+N556>iIy(8=_Q}z!!`;Ql67!Cs$7|^WC>>9Rn7|XqBsn}|5M45~PO{?$nl4w5?X+bHLpo$1zl&S?|0cx8btfYaK0n^3g zDv<=o6U^~yQfgst+fggKW>?Ev55qJ{Z3)&WX`t{Xl2bcd11O0Nj`8R;V&Wvzm{N9N z*s>;j<@kjrKQHbHT~*1UYo@Pbe^P%^{}XKv&3)}6z|;CVQ*kHd^^@gK&ePNSn)eI> z7QWJC)}m<)Z-bpET+1aLu^)pAuU(=mT1t!+T2k9Zc-40EXj$@%m7P4^*Tcz&f9UW^ zd9!H~8d$GmHP;&{QpB-LP%@{TC~$bge2MLHf6zn~A)L%Kf^u|>7(Ie1MWa*=jn;}B z>h99M(J}=#R5IfoV2k>gDI2G2?cg2#k*g7klDNAlii&9Dyc#5{Q*|f>(FmiEmQ>w| z`uycBBBpCojg+2!y>YjiBL2&En)!Ff@v#qZy z#$&DW^%V(*IO<{pB;PVcoxOh&Q4OXV^YwP4Hu=TC}YAsx}hG&AWsLO z9_1dRYi@`OeV(ii_JXwTX=07EriF_%SD>bWlN5FF@3?^tvK(uX8zBxO?T>9vX0O#o zS<0-&+V||Y7VJ!&+rk;p&WC=C1d_BDKsnnzKjdR$z6Qf^ka#y5Zsz=js5kCuql}md z=7u@npmOvwYW6B4$Ch)Kx9-c?*X_RlL^Ss4T#-+mxTiCto)#go3Ebh%&kuXrD8=HQ z0^p2ce|*gzerA!T?=nSix$Zc};tf_p7FbS-{Pp`!;?83-4jUJa_an^0G)l7es5>Op zSiyM(1DSbt-Q}qDx^aCmobzb@LpJXNZu_n;x~?evfvOx(<}31>PTLa}5u7k8cRoJv z>bd0Daj@5RBvcDX#4TbeX=P1*5ib+a7cLt27_)Q6>LFRmhihM)>ha*ED6$z5D0HjK z+eq>-<1}yh@O;}&uma6<&2xbIoe5>zb>ZbZR0!j4*WeQ1Yj@69K@N#&pa~%x3uIr^ zPyVhqScW|7IeRgS_Dh4VQ1M`IP{vr=TOE8LbBNVGRc!eEWG=c?xF76=w)En2FueRd?>gMz}lf?O^ z`)%uSojX*#E<-aG&+YgBn+&88k@r;hg(q-!-6c(W+{Dhu9G9Cv9;G0Lzhix-&EP@0 zQB11Qy1Ya!i5hAEK>_KjI~WOf4>joEH#I3USch~=O0I4EDFT~b$zkY;k67_B?559+ z(zG34`dC;E!9MBZhQycn^pSpT+Sums^ep*I{|_M{TV2NnC1Ef1Cg~>d8C1<)AewK} zM;hz9pjSg+Y`1nh+3tLs5cttVe|KP+(fHD&UX6~U;S3ugJbP45B(2=(hiXO&FOjQT zjU1MCDnUOp=My7QjQrf>RD6g2u#ot|p8mLZaFCSOl3MK&Xg5Y!tkLJdm~M?l(BhyQ zzhNzaYH@?CR|^UfxK@jbi`>XnEWCc>3Css3L8GvZyENfLnw-CZ>6(!GjFX%8ugC`+ zt)GzmDd8b*t6#(G-guY+@6!Dduq6GbPna>mMw!E8N{DT>Fhv>p7-9~lxuQ1-{laqrqsVz6KxYsH;b7ls2)aKs1l12HMB zZr+jlF-zXB4tRKIf!9aJ*=#ZINdm(#e!fr`%5G96YoaZ0z3zRcd<-Xtr!aaZT3BG> zk|)Xfw+_4cy@3K=D?a)vVRWP`I`gTPpr&HLfknMziDq2RAD~$Kp0FmoSNm5R zIt{*+nvhB&b);yfFz)tT!)VlHVnc=*=A#PWz?#2|Qeb27I%S{hrfa-F_2(&KF2|pO z0o)AW@IqWs6IqT3#^V~0ZiqY+F~~zkKA?omID8KAXYLhxw{?d0DKhYCCQsI)lu|D3 z4Ks`w1^a6>xIopo1Tm>6$^Mu^!DhV{rn~53Osz-BO*(GjJvZ!3O!Ppl;5?yW7y$}N z@Aw83u(UInU@8aN>>b)Fuz_JbNDDT_B&tN#PV3p~uRpJ@Ru&%z)B)3m_-`saA6&s7 zk87`fPTpqMBoiJVo$mh(piE&L9F7JdH*SqE8kPZFLN@F$GBg9g9lo=BynXhgaMLh2 zB^-3X^G7}6H?auQ5vjJhVGc8X@l2>#a0oR*-ltL0X;|QgnrFnNrE@9BuxHEYlF~{v>t3GP4~jGm8i>=goPZA^T?zEi?@0h$@o?l!qRYe ziqejm;#cuGvQZ1dolYe6sK8z+*w~uBam}x2Aaq|Z$A}%k&yDgr0rck@X89YXI1aZv zHFZbV2!y3mj9he9XtJ2Nu-l*5XgHEchEGtpyYnRhOr*BEuM`xQ7NK)$=Zo!rjM6c}R63M6?H#2h9{{M4~3&1YmKq zw1l|)$g0C&qQOiW#EZxpd@#y(*-0Nv1L)Qv9n{SbY4gZEUbiiAa{1tRpHfIZH)yWZ zuQLP?E6?E=uK|@u7@2`ud(}#|T3@bxpRBG9Wt{J?>Ed6cD_f049RzR(zTFK94F!Yl z4)%XX+eFMw>%bpHG2qWJuPmVl918ub)SH*PfdF_i8r`%X?08)yCY}W+V~gAH5x@q= zSYu(1&7ym?-RPBG5xq)@7q(Z)mM@isnhi{`I&GYL^_&H^eb2SjYE7yplz>TBq7!fF zRg_&Cu_Z|G8!vy`>yYGLda9I}{nR4i zLJ2F_5Osu?5DCj!6`FLwVtJz>Yx>b$i1p66u#)?}UiUsZgxIdx`fm*oMomA7b85)) z62|`=?Tr)y46xvkYLshEIsNQRyW@^D+(>1PUg(v`p8&|n`(WS^>rm8~rHD35TvC*x z934HzD@)sHmH|`mk6Q37W8QAT5rqF zu~*%z{{k#>44@0AforSQ7kkWeBV+8{(n^FlvdjRIS@$TFEs6e!qb^YWrd;Ah({T8v z2SJJsbGe?6=$r#w=(XiWO+iv#4lEaFwQ_gVw#)q8wB3uRgPT;NyQ@gs2H}A%Jllib zpkHIbf+NUAx@O@jOMzMKa1GXqAiF0vzvRwA)~mqU|BxP?CMVwrF^mu2J2P`P>;CDv zy0HO#2uOpL4~eFS^f2oYnxKkdU#c8fE_OOsQ}HUnCb1(?97m??CD`qX8ilK_ms4d4kd?%0Z=w9!XVbif4Lf zJrR>SY>**BxAMIn)#(iem{(@Za>-&WunEO7sZIyKh#C&TiRIK7z844}~}f`Q(CxVh$-4 z{IZb+WJfX5MFu`~tVT0fJko|eb=OQ_`)TdFL$il1AGMZYd8DT4)BxU9qs;`FsLR~_ zj)Be(MjKINF&EubyW!qJn>NlI`4WDS?WncLAhT3$ukN)V^-ojY5Jn@}8MJ9zhF*dHliZWqr;h76p>tI#g{K{KoQSt??opUlFLyvop7ymiHFl|b*PI?KL$N~ z$Tz;(9~9aV#D~JURUE=!JdPwO=+LrGw(=a&s=47gLRMGGbB3%|ODhX89Dxrtiz?Ae zTB&M}!nrdO&K0@T4VzySXTKoIz8iY|o)Pwgpz8#yIb!Sckq_8@lipmQ-aD6vLbeFm z+1ea|WH za$$r*8tN*2yx7@=Z92!j`f1F_FWx2Ytev{K!#gR)J?~I;Jj(46=3A@XvL2h7#0&7W zPgh%}JZCX{l!(6;k!uWA0)rV$uC8-=$w?bJY-O-zzLE_uF`(r{9Jp!9{mk8woZVp_ zb1E?_m3d(@bFLlu4|^HS1OMM#R&ys4MI^I%baa8A{XD_A2TytfV>dE2ZFw#pH`SPx zvwTWOZr{RW8q)f>YWb^w*7OXvKu+)GoNl42(52%}Dc`s)_!{cKayDi{Bm(X+nmr3B zUCYEKml$QZZH=+~v>;}<=x&{o$$egC_Nf%ibEdk_P(qCkVz_Hnl5<2181$9xMf#5YBQZnQbA(N&gg(H%R*O8L+P;P-@+4lLG#lypW($o%2t1s4}QcWX_cynIeWY% zh&u41w=UJMs4qk-@iW`VsbHK4TyI{M%N8QQES2*wHCpIuSre7|u~}n_5^qNV84tkf zXE>hOT**NRj&SIrg297cK5kmDyt4!}8sR?2#B$|B{e5P!c%m^BnLms_K|r#qA};g4j;aK2Bvz#H6?>YjNWSEivgt&|tmdyP%e_{21x}om{$ORf-s$zK zrki?w^`hHf)w-ejBx>23IHyWd;|yrdxxw+fzT9l}nDWvjyGP04(HRgSaZ922E4}n9 zvI-?dwYhvxG$Xf$tLd3!-D*WiV^*OXBW`krm!+pwC?qhclm$9seR)WMk;pg|db4fH zFA7qGhJxO6CFoOZTScO_Qi99NSIW+lG;rYC+|m#LEsf>vWJq2@A&sttXRb8&cS#KE z=-}D#Sfz-?$L+}obBt}4<;UXV))n9*{DqdD@48rjv#h_k+5L=1*6JI(#$1>H5b4aj zO^d(Wz;oJ#W6ij;YGU`|s^GskBPM$ld?jD$t?opb;%>xhPBBx=KL==c>~d`zw3B9^Xsim;Y%i)Rw&MMP6V`wKLHosiPZ zwsWwHX^~F0Pkw2VnXp7%a<1GcNt9#c%{6DIt#=59NhAiOC*mij`Rk?Sxf0mlvGrKO zGXKtqemQqanpfXi;hA3xWP(H-L5cea7@4a4H zubPYLMAq>lz3TSSi`Aq$Hpb0Ox`bXz$$5}`NMK+8#235C;aN4XP(<(SKJ-RPG?vfY zc;EIT9S+&GvD%?Nx5@TXqRAj(LwcTFBU~y5JycvYNRk*vLz`D#;}ZuGYtgNi!tjF6ml-K7g0Q&V;>8cgNu)mVabNW2sSX zd~AGfd}=&veAoEC@z+MBku(uBdE*vjiF1~0lS(HgcM7HQx_S02 zrmY>D*MwhJrk&SUovAVIWp{)ZyNX=mj&b1x|CY1LbMp4@+-IzXzY-d$bmlVT7vYXe z-~hr|hoT)GEQI?=W45sS$zB?_+U;~Wc7m3Qn+%45Q`Dz4Spo{Qw%xR*jv9X-)<}QC z@%3)gAJO=BnCdICO4WN_^1!;$ZxUx#^`Oyv4(#6z55gR*Fun8Vy}vQ{j=IE~47hK+XzlS~LOtu^I6GrL60zA67PVR;a)1R8MFG_s^t)8_*?Nt{8_ z*g<4bAKf1^A0Zo4x@5JrSB@nutKQS&xww=g9(R(WRLn=&N$3F zRH&IBib0z|Kd~T4Ltvy6xoz-JplC?Aa3IlQ*@_~Y#7WCsbbFw2{dXceJ#TSr3-|;g zmUDyS5|BnO8>1;D4%?&$jE1wAXEogB@<~STH}yx!Dfy`4b;fwq;=rY32FFGWWXEW` zb!oJ#Va&$4`$)Np)NXdJQ@&Bn($sR=E`Yk82Z{8=VDBi{kzF;EGi1@|L!c|>xvQs3 zNeQ@pO?xty(gBayo9uz>Fqj z87I|1N!X2=;Rq#oCDfVR+}tL-2SVg8KZ1j3oIII=`lQ#*#*X&Mj4l@r#>LPn7W9_j z3g`^cEw+A9T535QJoqKDrp!(hd)%~qTEx^ey+L(G_(_>1%DTKmSr{pBwQ=H6MyEbK zOrJEm|f|awiiOm(?~H94sckT-JMD=3sUQu3E`n++eCX z3LEB(zf`sl+^(L~wsF35iPN`krtv+Aw&icUktteo5)wT5ts>+9Bq8@pzXn>t`m!nl zOVxNFdkQ^2B_|Z1FLp7vig-5OibcAw-diM-P3NjU487qnluV#7eRQD%A;v%ypN-s} zT_pqYMgz8fT|Q`_i+WODb>5f&$<|7rF_2=a`8X*79why)e+ars?R`q0zk<|Q&_V07 z6XJz?B;Q6sB0RJBbVj7^G|5eqcci?kyMy%i>O4vN{LP(fVM?k#6r;QomNr=N3A?(8 zQ7Z-J2Hsd{m5REoEN|sL;ojWQ|}zPL6Lg4(OY&OHdS>jI(ZsbP+h7 z^aC95#tuhY=?yqcR&uf0W&$)fguWR_G#&2q5TN@N{;x`j497g!T z1`+gO(kn~}J;<%&+UfGThmyu7j>Lz8m2xfRqWfJkv^b`Yg}5en6b8qPkw@!dVC`mA z`!6U-C^vQn>@j+z#4yfj>Il-e7iVc;qDriZ<-8D;hMiy8N#_BHm z-KvN7pMI2S)|drOp7a)N0Ad;c%-6!P`lFpzJZ78f4N@etwIFj;5SUP*EU`w|maCt> zCj+IrX9dxJYp&80*8sv2axFuygwE&{El4E;@)q_TB;+g8#v(zI?F^mLd7*Mp^#H%rt*3Q# z)V{4ca-^j5kr6+q9KRG6%+;!q?1PhB5qai)D`QSlqA59gpoQE;h`*;G;Nx!EnY8oQZ|=0wLoplQ_SA>Urp_?Bq(JGz+mV(jqTb96UVQ7^ zbS3pN`|9MHDtXgzChAl!QZ`v9{oCBqBeN^Ys2q267gbYklLy^Uz>VJ~&`klF(9|M% zBmCV*01rS>yjO$LKHZ9vCW^jmMhx(~==tNFmFAoe%_wda;*&14@6s{_U8VrYw4^`v zx^W7e8cwZ-TP+VT6VZGjaRZ!m*P&S879M_alrc&THPA*KB1e=>`;ICNmYqwGDW!`&4zBbEK1iH& z!m;rF|2#X@8WnDOn=l_J&M_378XVpiOBF)7h)vPt%1JW58Irzu6@FM5(e`@w@_2Xu zgjZdP>bqPUW&W`$M4?tL+cKz-Vh8pbhDYX-)GWv9_|LU9``Xh_(H@XI#Iuy4>Yrr- zCfjueoZ{9kPPv9Zfov>M=I(I#;vZ*m4KT`<)nl46cYYbJa35E;XetLkcY|)zDLO=5 zwmJ2PbFI@uC=wS;-~>UJxt7ucgC0j-Hu_?UCD;`V-lI*@otKWpWz8jIy741m_t*{` zS)*Pz9U1M@46G||<4sH^fl z#j8b{g$axM1HKlA7SLLv)xUk;y0!7rUG96u;ReG-msd8!)`EuZHLc?Jpo-tN<*u1SHN%;QOLdN9FW6H=qEW?ZO!O-fXd0%HM1gJ; z$$*aL#iBO5_~$lA%(~7sn)3_~tghynVsbxjedxpFl1OCTu@*+EXA=v0?z>yGCA1$f23$nt&N(NRnJT;XT|TEJKnoiAk&bl(_>=mHt>0 zPnfM-BKVSp#|9y*ZZX+>M4xI8@~7lBY5hN~(#P{$R9BxVs4X;s+CvzL@b402E#P(y zQZ`y`Q=XPL`o%xiRQ?q2NxZNSd>8EG#3M`&Zh^^Jt{2_`KT3WANz~pZ=YnxEr|XF} z78tDHnR>e-s@0a}siw5jq-h1FhC{p6I=4`-+pa{NOBe5Gn7&wKmu}3`>%I*-?$VCU zg0UKblCff6wPx(oFjkg=Ldc>?2!~^l+a&T-!f52@Zi|&7L@h8z`acxjyc1^HLf`>U zs}W={D6QH?JUkThmJ5ZrfUC`DN&C2a)gK^|AyLJ2puJq^HatBfnyi6L)HgcxIDQf4 zT2cnvx*Bt)B}}wbD(lS;2K&n^Ke(uwvw0C_YtAnO5>}Tft~=)g%Y<%7$S})>MLxAi z4Kj>0aNtgO071rSr8gqoxMv8RACA7^?#^t{{3Ptxb_a(xFFQugp-m4i03-2mm!3O$ zCfQG78M84?W8m4Qlb(8Hs`I^r=J&T+i5ZK0>G}El-YVNO$X+SC?>x(ovr(&`AuEi~ zCUKiq!Z3mh<^oJ}JZMUW(qcg@0o`UC&eJaR61v-H{8!E->gPMH)-86=xX3DwEw7;{-WdB+4cf&Q|1JPwdV46qm{$ zNl|vN)7(Bdpa`{IB2^d$e^QMaKiL?q{2UUMNC(@8FXGL^2h%wGcAAE#_&kyR0wN62 z35p_|NE&KNVB!cP_9{Y^(?A#DA6i@$n!J3QyWMQqYuzUA>7rEQ%yf9~%)hX_bWX05 zfIP>@vYw=~7o30T!5hqHUR8R#m!i*fzheWc8qtuyeX?Js35oPmIv?HS1NztyGNT)y z6K&(|55sIq3W2rzpFqF2J9R9ge1Z@C$iaB&DZGNQm3rsyBP0@Micxeb)>a?&H>_ig}^ zac45@q3up2YJ`k{_OyWxyBnhiPu|a1I`{pIWlc+3LqU~~m=InZQwAtBzmaWTFpvTj}05iTzF`3{IABI>1(RXsQtiWWrjD>0&cKe!Dn_79rUNZ=flM7Gk5 z79@tF=3>If&n8=IxHk=Th(}n@D`9e$!c*)sEa~y@dI?iQ4>?oVz4paFQ?GuN%15q$ zBQ_eLkw(r+W6_CeUj8dOINCfy&W`%Z-%<-cOJM_*%Q<61BNtsr8=LS*<{ia`c_FX% zE^|XaSK(iE1;qO9`Tox@_cqjjV3fM9fEPFpI2c9k6;odtOT?%$ZGML&PN(BW>12P! z0!Oq6MNoo*8Fr#$nyp?a(kn!%5<~F!Q8~nn+eKlZ=I?hSiKjNfRv5N8lDT|-i}d1Q z^u{$OWV(+gvMn8E#uzByB-)a1=;wY>>oR8pSiCp#4QmR;HWsm&AOJ)AoGJ0>I9X5M zlY)nmY2hK-Vd=nf)@nb&d|B*Ts-{ZM&|Z+LsPz%k0Q)M$f@yj~HmP%_?hBozlE{y9 zUGKd-+TC-d46Q_&jk@h-D22E(2rr`54|`IPDgiv%sMxni?urL}5_?g1kN;NgH#ANU znmlrbgKN-~>&nH)-hmStDG_JVZD{4kNl2vk|MS|`Os*Y*$l zog%w?G00R;h$$T@i(IY0f^}d_i0=AFVWnp@U00zk08AaQl8tO`-K|%vU8XHG(agd& zE?QZ)9Sqv_&_^Z#m(8@phIn?~2x*Xl8t0OIhznG-JgukmNBgD2f=06_n6op<@P0EkL7evJtjwS#iRDLOFiA0f$1%1!W1j*?!vb$ zP?*a4+yYT+0?d(WJSZHJ@6PQiCGoaO|FkCK0nUU2=b~;)Z+lS-D4Kl4+Lp2bmL~fs zgo7~>mlqTpz>$-{%y}Ukmj2OaE2<$8F&WcMJ+iBF{)iV;%M2eiXnm)qR z0TM|HM*$o)S29$WG^~8Y5hl?YHz)Cwz8M2gUM8 zdsI)3Pz(INo24rpag{q8XKC*e`&2e+f+oH=rjoOcyov9#lCu4Gj$R%^e>JgD!V;%P zuTFOM7^aJlcjloJX5-iZBcv8563y}4GoP&C4PRFXs4R$3y4oONU%VOtBH=i*q4ytW znemEJWegyej%t7ivPZ|vzM2F5cz?&FfJJb-weXssYlgM(OSGm0d9i<5J#_vuX=5Ab z^+81(7AIYzCY;_+gTs*RCIQ-C2}U;+(it~V&qx`LG~pz+4=wdOtx>1q2ATi{OSc}| z1lvWG)ro+UkWHc(l8{C8P3<%ym$kIN7a!ZUHHbT2P_(OYE{pd8f)Cv~s4Jt0yyM};w!+Jfz6vnTKI}pmXedpus3lUwc`4r8Q>9#Ud%tZgQ z1M|lK!_IO=q87zC+`)*jn=Dk-_61N!k}DADb1WF>AYrJU`4f^JMlYIWe*QJu_*QfpR;A8U`kd{{mfo6 zyLqk%X9N%#<;f8+qu`T{C}t?|ukV0Hpeb;YyuwQ;vG-T0#01*!vO5FacB&HtYKHvF zX@$EBU-#PfZU9z}Z2$1|Z2REAImifs<*UO5ChW%Hz$U1wT#2_XdO@E!7R8nhnhY;M zoVsF5gdmb8#Fnl-tOS$;^TnY5!=)MlaC@0VO9fgCClen2E?zQ*(~|Syu*9d)52w2| zYyt*+(X*k*l-SNeUx;oF7)vfx(Dcqk3QHx{96F@1AOlsMn1@4_*W^zXppcS z4m(hLZYARZa5uu2yR5heK(}xIykusHj~j{H4UJnygVu`{B3GJ9GwQeTr@|K=s7j)OyTNBwwzH_ouFqDK+u% zXc;k6&RE!yL%wB8<3|qBeM$9J5!SQ7R2K&UyM5ff(YB0;|HmSex46G?z|0%EfA7COaml zBL|BHwz-D7@0t;gJKcj!GVm%*{xq~A#|i9sdYPuo4( zXE-oBPQ0v7I0VHd6Pok`5K~J0=HOgT(h!Q{zBPQb30$T^05t))OgS`9_73*8PoWXj z3lCfEx2V(70-oLnD-vVoEIyq8LN0V36lQ|LZL_^tkW(?Sj#{;o*U1|XmGXXOvU!;$ z1Zt(`MeO_IVN_16nNFUHv@}YlYB>93=hex{-r?Enjg!5O{ zW*BNno0HLDLV{*1&@NIaU+@CBvB<@}RW*B}!GGq>0fdCYXe*CtHkm}Nz(%9&ZSS#j zM@|Ly6wtVvVo()(?@9A0m_tjrraC&-nAsTUlDdF|RMGcjAnUGXa++^DP98BUK4d3SsS#Hqlj1lD{XxZ#lqnJ4w3S%V zq7L|vl7j&(Q}TDc%-X z`%3e-;w(X`zd_b}Jh@;i+~hKSpXkgmg{wJn-(PpFhz4KlTz_~Ale!)!OFPwM{V#v{ z(+d9mpY-=%RuUNG8vXr*{(hP~AAxXvI=CFaM}&Qj*@nfxcfa4JCXb*!jBtm%10XJt z!Jq!nq}yjCQ6WzV zc@B(WWMhuj+r$EasCnF|m$Y~ImJjwctGWBH)lPWu_%&JFPm zpc(2Uu^p^YH1%g1;Xs*(Cq(;~Sn^Zepo+~PBSS{2TDD-ic2>q%>KgVf^PK3Ch)f!5 zXD=tc6>I_uCqM0<{Rn4DvVHhV^3(Ro$@bydFVD<9Ei!e?k>7Au7?=mF&iIxx4?jv? z?w#!X2vxR!*gx1m`vvFleE;ll@ANczesq#-C&$|-XZt&^4z^E{<5wrgN2hpmBxxZi zGkh^f4GG|jqfF-g3#_9X{S@ea+C|x_#lfU!t`z~bH&7;P?7;CEN|nGst|aeA-EpcM zske%hq&&dkmE_yMBxfmV%aUUX16WH=F&1a?^eOCx9|qYNi@w~(%4<*7*Vk+7PuF0_ zygJ>MX>F6kD9hi%ogiMw2#RO3BI+z`!$EAC73s_oGg~9l-dNp%uZwG8W&dVfBEDX^ z#!RSr#!?ceqlKy6+r3FAHCsl}o-VA-XlNd^kBn+#BI`T$bW5$Vr#EraK%~FfG!WwC zkEe_|K-Q+793}TOVw(<-GB!6D^!tqBXtSYqL9BIbjmM-bJ{RIh4wq~xjtX|(WptQ~ z+GyG%!K3Sr*~z7WYg%u$?F`J@W~;sF7J=hTJZB1upgjpsL2_HIvz2)bb)0mLTVtq6 z-v&5$F8+Y$B;_YTg!L%Eu(Z=uqKqMI@L!X3x>VlsLf!ZWIyuaB$5xyr<8vZtm$-3t zC`&_QN!`b5oem+EP_-&iBvnk@OpxTUQMEr!lGm<3)%d@Z{_64HLotV9&H~s_zzUb| zJU%&kakBlAu2WvU1QAd5+!D8-aULzfC`FQjen;eBl%QFT((z=37AOD{vdCv^EiueD zeuQuPgZF(PTF@Dy5Vk4}(kPD1wF}O0#WP9C8>6^JD7AMho0^Iv|jol$u$En>$kV{_KZfzND|lh$&J|2@VJA!Wh~`( zbH9ENHl(TE)lUXD2P+g$b$PCJkcHD#t zT+y6)0i6ZD@o@j}#fCt@Qb$x~IKhX2^>es45>m;klE{haF=6%s`Elepkw^%ifn-AB zJ$!Ue$IlgM`G&+2ywh`91Cr(%xi`+YWqDQma-5EO71e~|?cs}2>jKN(h~#Y`ATkr|`P&;kj<#XC`7c#nh?1XSmo+ACElCA#wI(f6a{d(u+o952Z;q(0$ z%^&x+clS<~FsybJ!)jOS%d3s`RiL}UjKs0jE--r|;1Y|kgF?i`ou=!6O`f=MH(bp> zTXJ0sH&Bbqjn&nPyx4&0tya!Gf9K*Z z%9p_Ql!|?y?G|yX<#!2E(SN}M$?%S?o65?Z2b9y=RPs0bd~#Zf)4qZ&18vol+W2+| z+!$;d6w#fDpmiY{fPZ37A4D}ks|I{2uL80FqRAK538J8zTq33mq9D3HbI`{_lW$Bs zynk*i!Nu2`BV2R2PR!DjZVjYU65(zYm7L}9kcwBBsu1>p)8nQa2)dAA-qUO9Dl(l3yfy-vHXZUC*}N> zFD1>Zc&jNVPEU65p3R`MDfmfA=xuqmy=qcT&@c#jrDn;FWx>q2J#-7md_rH|xw^i7 zh_0{wu7l7NPITJW9II1mInC1$zxNiTs9HO$RzZK{rE2m~^=xa;lFt=wtsUPoz4XH; z)WZBh8>TmH!#sy^{l5E!dzf>(sJiI)*eAXD_et-I_lcdzov>A_&5L(Fyh6lN#ohl3 ze&=3jzYyX(JBX$I_AOsBIboS28vq+W19&TC=$3e_51$dSNI!7%=CYSeKcp73!v(*w_h!H}oF?b8_fsMUAZznP7&xVsx zcQDDEX4+)3O43HFmyx9ro9Xv6y!%5_HfV{>ep&#?t1DDQvw*p@z5nxy)7I{*m1O^9 z|L5u~EgiIQrZd$YJaAPZTz#z)K_=F;>$@Gj-?#T%wpZJWt*85_01$GDab zVfELoEFG(<$uI||CtTxHprZu|S#Jg(K z4J};|AFixLl}{R&taqjnqXaZX8AG$x!Ro4VNjxN5Bpja2ZYSC73i`jkOaIsR?|&{b zy^kk)#cEwHFamWiwQ0QwpG}HMzNWVBaG|2Db(^DKNNjNEXsv{%J;Tjp|;-}j<`mVvF|vF z8#}G3BZ_npAD@COTr7;paM>S>I*G7Q8z!tV%ME;iyU|!(eYE-vf34y_@R+P#;qxQ> z{Y(TISzP>yZcOOMOP9_Rq7HxPRkQh8D(la(=F8(%)z?8n22-)VYKtg_yD34ObWDhc zS~i;bjDcy(*yvFF#i@?Eie3xYn9*o6ma(_Ey9G<@%hG}wg=~cdrOE=@>a@0p@$4Dh{^HnACzdCmfBGaHm9rk4|er(a*_fX+;l(TLcYOON=M| z)Y1ZpET|pL@SRC!IL{>3dnU&VkdGP~!A@t6vQc~0y^Riemf(94gA^3IH;WXub4MoW zTlTwA^Z4=-9A-^660f@L*4yNZ!@&(Mng?eG`#+p)pX~3QCYv&*daos);i1`UH93q8 z7Qmp}@?IRw>uvXCHfXTKe@B(I2Ocj&)`K~NaFWjQOMD)gM;S&;aT(Sm*c&yV1zB4OYCrjr$8z&pvmE|Ja;)Twd0feO)BD#`0V|hBqSORFUt6E!~{#VRc0;p`i z*mFAiW_m|5+dFlI^MX!vN)C?gK0nxgfke*t%?AR$v4)we3VrlVke(Vqv{kzv4Blc= z#9kjSRB9@B*IPi8clS=ucK1)J<)t2FiLI`}zeM8dtp(4!*)+p9rqiq5;h^jGr=L8) zsm*iHb^8x<&_O$QJ?Pe+ur?rZ=j3^f84ry0`k(9HO2|{^2*k=;)>y9FA5O+XPja57 z-;l%Sw=1F7>7R4Hr|aT@ip`)CDm{La%;AelewFTQ@~))QJUg)oR7qk$g?_xBH7QMW`4 zR|0f`<~Nr0?zP?<|50pYnhWVn|4~x$Huv0M>tNuO7$VhQol zgJX+-ZJ{H+a%K41KEbEIA8()i=oKEmy+Vq@h09CwySln10p7U?lLH+_q=4{*TF5?n z1#v8Ns&hGXQ)}Hco9zxf?Cj#$fWa?+{QpmXZ2o=k1PS2d`seZzerTTV0mQb?j!vqi zi*I*K=rEj*{M<5hvYA~scel^BWjOk-n$+4T4gcwzZ@i-F-jy%y6+7KI**`vumXZ;O zg*Fw@S2&I;MkUeQclc3oxM|)}vJNPAcy#h|8#zXu98l=vlfB@@(dn80MykC!%vB6u zVb$QBaF)QD_2BFRc+v}i=Jg;OyYKNC7qT_FO1%&K20rcXL-QDg3(j<$XGA`Ty~TJR z7*>9!Op#3l6`|1Lq*>as>I zU_vGwMr8}ayS<$=D@ht5u{Y2+A|dt$Q4!IWWBJfNt8nO7G}56h=!k~7mn0YZEwEr{ zOGczZzk(wc+FC{?3}2x@=-0OrVOSQ$!B|-%59azqVK7#Mq`|N>ih|)gk^^Hcj3RR( zDKLCVBB0*_$$++;5dfX#5a};~tP%fu0~h@)R?#NTeE?kD-Fv?M>Hw+k&cUl)!qVD) z9sV=ajDANq-r{2*1*C$MO$Lv2ec8Ne-2!*AX(ABQ2zGX=#Em~cm4CgCtF+1N@9me( zo#SJYER>|!XZ~y+I}OJjicq`gaCUYMc6I6;S~5B= z3RH)M4t9&CX1ft-3%{A4wLwzen$1_yAvUYf-Wkhs>6n~=cjU3nkJyCJRRo|t6|4HF zEy45I-p~7o&yVQ$-p^+z+f6J{HRl^rMEMD$-`?HbNB4g?GXOwDE`wKC=p~TU=JV}? z(>*F+AI-MNc4=Ph{@h^OJd`!>B$NXSR z$Zvf8%M0Qwf1>yLutocv%HqHDc#Ki}=mq|QS9?1@9^ni8S00-?`l7j`uMW+tLw$8- zUY+5q7bkl(Q2K!{e%^!Cr#JL#3)#vY2RQa=%W|B;=5D#q&S%ToZUwKLLWZ&3^53{c z&frC?HSYsduv(5S`H3(0e>mJbQ#VGtX0i9V;;=S;nhdF(7&UWu(^VLr99o}FOLY9L=`q|`>z`t9<`1tBFON>noX_^9Q;;H{I%V+L`HTp1 z_`)r~Z=51PYQje3l~YJ$Lbs5-qC&2a$YtC&Pz0oW03UwhUw9CRw2dzv$(wj?dWS#o z1>!ipz#k|{+p*X&wA#(~xXDCIf1B5~clX(RHa$3x%=h*F~KXL^7S7i0lUQY8J_68X}VD}@{Fbz7Nv z&5!0|dpNP5;K6(tI8_F={JXT@8I0^FeumFhzp*7hw>XUf21CX;&G5l_6sgydc1Z{} zW3^BENk*!__4U9OADFUsl+L5QRFiSqC;D_bFz@N7r{>`I`m{w{trX{9{0e7iU&|AI zLSYr}OSNzB1r$JgApXL?@D<*6H;43&f5OWFChKq~;k`gLk%6`WbX*C-MPgr|N@me3 zGx)_h9o<>@Z?MR1hSINoHcv*I;b}2M!C@BNeYT%v;q8 z05!~*xA?ez`sz8b&wHmE?(YOp9aT$p{Qt#&Ek2H_v^SDM1^9F|x2TeR4Kq43Y>|ar zI;5~Hf2BYb4YKzlW4KDRS|t(XIznx^T!xp+Rr3O>c0zqIUa*vx@GKH73;q-hO6#Up zgX0^{i)(6Q!8k@dbJ`T^S$%~Dcl;YowfGl%quSn8iAH_vS%{h+Jp>c?R=2{9#APc6EalKQCqhcOJY>^SgOrz>5?u;DsX;Q@BY*m}zP$SB zQ{}w$%-6pGe;-aaH+cC|)f7EualBg2 z&CZPWS=6X9MzF=q%^(~1Zh2+po{N^0r?*@$FR^x%3Zr>ZaZ!oX0(?ZfKG@)!H@;OP zJCpKv`t9Ps@?X#4QLi14ihPHz5mdY_8<%Dv9}Ubgg&E)9#YN`p9s<2{sdcb_dQ6vFuvBbfP$l7zvEM1^ zRFBjV<^%fwZIW)DlTT#vDPR4Tu%!8s;#(37|0+!E^^SJjvf9Im^*a{+zqGdE14Zd%3?0L*hxHZs-bl z8=N#Hxr2Y{;E%yofs?l+S@6K7z{Il}THoZ((Pd%teE7a2gPFD({~F8TMO0X#JKZK` zBdwOp2sd3L9sGuj+M%)(vp|a>i51wC%jwN@WiD{2PD%f%xMf&rTuoNXx_^?{pBV6 zO~$8e9lSzLKi)I6;tIoRoMmA#ynMvA*olP@MZvz6q866=puPe&DuB<53ZSOw& zY65NMzST>CJV?y)DwlAf=gOvvT7D^qwsSKTqx-N^avYbT_NoVu9PR3Ow25G;bAZY? zeg|w`6BG!pHay8U5R9JVVzIlr5sAC@w>D$OI=cZ64h9wMew22!1k|Ta;(bI)`@Q+{ zDcvw3gK4y|^kyT`52T}|0;-n7qsEi693xgFPNX&MQk0*lTEf}FmYy?$g-Q(vU3j?C z)rLm;paJS{yl1sv@X7m(_tEwhpC@Q-pG=zi8+rbt70Z0cF32;OHVHey*RE8Mlee0 zOu=X(G#=QiG%Q9j{jF~`$W~0dl6ZnB3rx-`aDxWg8;J!x?F0e2Rpz_j?WmHRT%Y7t zkhgd!8Ye#IL!)`ug>k&=>fq=XVa4_M2DUK%Z8qEGU?UL$T3=}CU~~G)I7byXYqJ{< zLAOz%0G8PJV0Vk^AU$c{EdVIB5t0s_M2MLiNe)-z3l%BmuWr5}S*SoE0zKvs#((3N zPy~o<_8j^dZOG!|Vdruqfxn~&{zV`df+#l3^nIqUT}tlKbpdcvq?ElY8u;#=q*6Nm z@#ydukq?D4M^z|~MM8t=D)Jsl@^F}Aw~`!c7cJO9#XBv(%lw+ASvuLZleMZ&|-J1pG>a;K;CC9j{> zzx~U~)B2yDR?!wk1ApR~$0-5P$b~kOCP&XW^{dT0Ez#@}a+^(-@c2Ew&Hj#NCTP(x zHaWgAJthW`g9hq{M|(e`k?oAcy?C1)SYX9mq5UG$oUi?o=r_GyTYFMl`!;#9w(;ai z%x}8L|2p5)TrSv8*H-?NJchsjj4s$ovW)+&!e0PZHCX))C;>EIzy2Q9I(dX)FMr(r z`<_XXQ^l83wp6d@+}}#@9W%#YPKPe?XRCW+zBM(DOJT_(SQl2fx66BRi+6Q?zjKh6 z{s1?da@J^b(;5wvF-U}H-`2coWp5L*p6ql+7-Vh;<>_FuMmn%a@PCUoXtFqaZT5Fw z9?xEvu+-Ew2@8MOdgNOB1J;7pfH-^lHR+Ei1w1{ByEjaA>?2Ukn_-f5dq4xngZ|Yd zO@?UnJ-BRk($@I;LDp@aRlCEQJ>-gg$$H&wwPwRzzzH+BnFF3!Z8lKDQd1!t7XC8u=34s$=mlB_ zH!(8WfPeO~7XOf(%MU>Sc*SNfMZVnB#mE=`vgL@h_XjKpaZng*p~XpwzZCeelV(Fc zC^Qx9LD?^ZdDz$=0PyU#U%TuL1|8yI;6HL9GCv-7hl8QF4IbZjDS)8OUW%a5)TIc@ ze%Vrljr{>jG3gBPKZ5%g;=cN$T<0chz7&Dh6u37$Z439{C?0hHR{b&6 - ;; - *) -- echo "$as_me:$LINENO: result: $withval" >&5 --echo "${ECHO_T}$withval" >&6 -+ echo "$ac_t""$withval" 1>&6 - if test -f $withval/pcap.h -a -f $withval/libpcap.a; then - owd=`pwd` - if cd $withval; then withval=`pwd`; cd $owd; fi -- PCAP_CFLAGS="-I$withval -I$withval/bpf" -+ PCAPINC="-I$withval -I$withval/bpf" - PCAPLIB="-L$withval -lpcap" -+ elif test -f $withval/include/pcap.h -a \ -+ -f $withval/include/pcap-bpf.h -a \ -+ -f $withval/lib/libpcap.a; then -+ owd=`pwd` -+ if cd $withval; then withval=`pwd`; cd $owd; fi -+ PCAPINC="-I$withval/include" -+ PCAPLIB="-L$withval/lib -lpcap" - else -- { { echo "$as_me:$LINENO: error: pcap.h or libpcap.a not found in $withval" >&5 --echo "$as_me: error: pcap.h or libpcap.a not found in $withval" >&2;} -- { (exit 1); exit 1; }; } -+ { echo "configure: error: pcap.h" 1>&2; exit 1; } - fi - ;; - esac -@@ -3605,10 +3609,10 @@ - *) - echo "$as_me:$LINENO: result: $withval" >&5 - echo "${ECHO_T}$withval" >&6 -- if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.a -a -f $withval/libnet-config ; then -+ if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.a -a -f $withval/bin/libnet-config ; then - owd=`pwd` - if cd $withval; then withval=`pwd`; cd $owd; fi -- LNET_CFLAGS="-I$withval/include `$withval/libnet-config --defines`" -+ LNET_CFLAGS="-I$withval/include `$withval/bin/libnet-config --defines`" - LNETLIB="-L$withval/lib -lnet" - elif test -f $withval/include/libnet.h -a -f $withval/src/libnet.a; then - owd=`pwd` -@@ -3861,7 +3865,7 @@ - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --HAVE_BSD_UDPHDR=0 -+HAVE_BSD_UDPHDR=1 - fi - rm -f conftest.$ac_objext conftest.$ac_ext - diff --git a/openwrt/package/libnids/patches/no_asm_for_i386.patch b/openwrt/package/libnids/patches/no_asm_for_i386.patch deleted file mode 100644 index ff6fde7b12e..00000000000 --- a/openwrt/package/libnids/patches/no_asm_for_i386.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN libnids-1.18-orig/src/checksum.c libnids-1.18/src/checksum.c ---- libnids-1.18-orig/src/checksum.c 2003-09-20 22:40:44.000000000 +0200 -+++ libnids-1.18/src/checksum.c 2005-08-09 23:55:00.000000000 +0200 -@@ -4,7 +4,7 @@ - #include - #include - --#if ( __i386__ || __i386 ) -+#if 0 - // all asm procedures are copied from Linux 2.0.36 and 2.2.10 kernels - - /* diff --git a/openwrt/package/libogg/Config.in b/openwrt/package/libogg/Config.in deleted file mode 100644 index b27f1a90ffe..00000000000 --- a/openwrt/package/libogg/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_LIBOGG - prompt "libogg............................ The Ogg bitstream handling library" - tristate - default n - help - The Ogg bitstream handling library. - - http://www.vorbis.com/ - diff --git a/openwrt/package/libogg/Makefile b/openwrt/package/libogg/Makefile deleted file mode 100644 index 4459aa25f3b..00000000000 --- a/openwrt/package/libogg/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libogg -PKG_VERSION:=1.1.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=4d82996517bf33bb912c97e9d0b635c4 - -PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ogg/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBOGG,libogg,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBOGG): - install -m0755 -d $(IDIR_LIBOGG)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.so.* $(IDIR_LIBOGG)/usr/lib/ - $(RSTRIP) $(IDIR_LIBOGG) - $(IPKG_BUILD) $(IDIR_LIBOGG) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libogg.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ogg $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.so* $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ogg.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ogg.pc - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ogg.pc - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libogg.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/ogg \ - $(STAGING_DIR)/usr/lib/libogg.a \ - $(STAGING_DIR)/usr/lib/libogg.so* \ - $(STAGING_DIR)/usr/lib/pkgconfig/ogg.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libogg/ipkg/libogg.control b/openwrt/package/libogg/ipkg/libogg.control deleted file mode 100644 index dd816f3c2f8..00000000000 --- a/openwrt/package/libogg/ipkg/libogg.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libogg -Priority: optional -Section: libs -Description: The Ogg bitstream handling library diff --git a/openwrt/package/libol/Config.in b/openwrt/package/libol/Config.in deleted file mode 100644 index 3037283f8c2..00000000000 --- a/openwrt/package/libol/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_LIBOL - prompt "libol............................. Support library for syslog-ng" - tristate - default n - help - Support library for syslog-ng - - http://www.balabit.com diff --git a/openwrt/package/libol/Makefile b/openwrt/package/libol/Makefile deleted file mode 100644 index c0431392fe3..00000000000 --- a/openwrt/package/libol/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libol -PKG_VERSION:=0.3.17 -PKG_RELEASE:=1 -PKG_MD5SUM:=28cc52e84bdb472b7830f9ad120a62a7 - -PKG_SOURCE_URL:=http://www.balabit.com/downloads/libol/0.3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBOL,libol,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - # pass CFLAGS again to override -O2 set by configure - $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBOL): - install -d -m0755 $(IDIR_LIBOL)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libol.so.* $(IDIR_LIBOL)/usr/lib/ - $(RSTRIP) $(IDIR_LIBOL) - $(IPKG_BUILD) $(IDIR_LIBOL) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libol.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libol-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libol $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libol.{*a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libol.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/libol-config \ - $(STAGING_DIR)/usr/include/libol \ - $(STAGING_DIR)/usr/lib/libol.{*a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/libol/ipkg/libol.control b/openwrt/package/libol/ipkg/libol.control deleted file mode 100644 index c65ae38591e..00000000000 --- a/openwrt/package/libol/ipkg/libol.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libol -Section: libs -Description: Support library for syslog-ng -Priority: optional diff --git a/openwrt/package/libosip2/Config.in b/openwrt/package/libosip2/Config.in deleted file mode 100644 index 456865c7b31..00000000000 --- a/openwrt/package/libosip2/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_LIBOSIP2 - prompt "libosip2.......................... The GNU oSIP library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPTHREAD - help - GNU oSIP library, a Session Initiation Protocol (SIP) implementation - - http://www.gnu.org/software/osip/ diff --git a/openwrt/package/libosip2/Makefile b/openwrt/package/libosip2/Makefile deleted file mode 100644 index bacf0728722..00000000000 --- a/openwrt/package/libosip2/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libosip2 -PKG_VERSION:=2.2.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=f1237af0250c59b318bd64a59f5750ea - -PKG_SOURCE_URL:=@GNU/osip -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBOSIP2,libosip2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --with-gnu-ld \ - --disable-debug \ - --disable-trace \ - --enable-pthread \ - --enable-semaphore \ - --enable-ntimer \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBOSIP2): - install -m0755 -d $(IDIR_LIBOSIP2)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so.* $(IDIR_LIBOSIP2)/usr/lib/ - $(RSTRIP) $(IDIR_LIBOSIP2) - $(IPKG_BUILD) $(IDIR_LIBOSIP2) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libosip2.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/osip{,parser}2 $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libosip2.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libosip2.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/osip{,parser}2 \ - $(STAGING_DIR)/usr/lib/libosip{,parser}2.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/libosip2.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libosip2/ipkg/libosip2.control b/openwrt/package/libosip2/ipkg/libosip2.control deleted file mode 100644 index 706c3e465e0..00000000000 --- a/openwrt/package/libosip2/ipkg/libosip2.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libosip2 -Priority: optional -Section: libs -Description: GNU oSIP library, a SIP (Session Initiation Protocol) implementation -Depends: libpthread diff --git a/openwrt/package/libpcap/Config.in b/openwrt/package/libpcap/Config.in deleted file mode 100644 index d2075647e18..00000000000 --- a/openwrt/package/libpcap/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_LIBPCAP - prompt "libpcap........................... Low-level packet capture library" - tristate - default m if CONFIG_DEVEL - help - A system-independent library for user-level network packet capture. - - http://www.tcpdump.org/ - diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile deleted file mode 100644 index 67bc3f7fdc3..00000000000 --- a/openwrt/package/libpcap/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libpcap -PKG_VERSION:=0.9.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=79025766e8027df154cb1f32de8a7974 - -PKG_SOURCE_URL:=http://www.tcpdump.org/release/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBPCAP,libpcap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_linux_vers=$(BR2_DEFAULT_KERNEL_HEADERS) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-yydebug \ - --enable-ipv6 \ - --with-build-cc=$(HOSTCC) \ - --with-pcap=linux \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBPCAP): - install -m0755 -d $(IDIR_LIBPCAP)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(IDIR_LIBPCAP)/usr/lib/ - $(RSTRIP) $(IDIR_LIBPCAP) - $(IPKG_BUILD) $(IDIR_LIBPCAP) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libpcap.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap* $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $(STAGING_DIR)/usr/lib/libpcap.so - -install-dev: $(STAGING_DIR)/usr/lib/libpcap.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/pcap* - rm -rf $(STAGING_DIR)/usr/lib/libpcap.{a,so*} - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libpcap/ipkg/libpcap.control b/openwrt/package/libpcap/ipkg/libpcap.control deleted file mode 100644 index a743ea4fcb6..00000000000 --- a/openwrt/package/libpcap/ipkg/libpcap.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libpcap -Priority: optional -Section: libs -Description: a low-level packet capture library diff --git a/openwrt/package/libpcap/patches/100-shared-lib.patch b/openwrt/package/libpcap/patches/100-shared-lib.patch deleted file mode 100644 index 54cc774a376..00000000000 --- a/openwrt/package/libpcap/patches/100-shared-lib.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -urN libpcap-0.9.4.orig/Makefile.in libpcap-0.9.4/Makefile.in ---- libpcap-0.9.4.orig/Makefile.in 2003-12-15 02:35:03.000000000 +0100 -+++ libpcap-0.9.4/Makefile.in 2006-02-05 16:56:18.000000000 +0100 -@@ -37,6 +37,15 @@ - srcdir = @srcdir@ - VPATH = @srcdir@ - -+# some defines for shared library compilation -+MAJ=0.9 -+MIN=4 -+VERSION=$(MAJ).$(MIN) -+LIBNAME=pcap -+LIBRARY=lib$(LIBNAME).a -+SOLIBRARY=lib$(LIBNAME).so -+SHAREDLIB=$(SOLIBRARY).$(VERSION) -+ - # - # You shouldn't need to edit anything below. - # -@@ -50,6 +59,7 @@ - - # Standard CFLAGS - CFLAGS = $(CCOPT) $(INCLS) $(DEFS) -+CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ) - - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ -@@ -70,7 +80,12 @@ - .c.o: - @rm -f $@ - $(CC) $(CFLAGS) -c $(srcdir)/$*.c -+ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c - -+%_pic.o: %.c -+ @rm -f $@ -+ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c -+ - PSRC = pcap-@V_PCAP@.c - FSRC = fad-@V_FINDALLDEVS@.c - SSRC = @SSRC@ -@@ -84,6 +99,7 @@ - # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot - # hack the extra indirection - OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) -+OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(SSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) - HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ - ethertype.h gencode.h gnuc.h - GENHDR = \ -@@ -95,15 +111,23 @@ - TAGFILES = \ - $(SRC) $(HDR) $(TAGHDR) - --CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c -+CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* - --all: libpcap.a -+all: libpcap.a $(SHAREDLIB) - - libpcap.a: $(OBJ) - @rm -f $@ - ar rc $@ $(OBJ) $(LIBS) - $(RANLIB) $@ - -+$(SHAREDLIB): $(OBJ_PIC) -+ -@rm -f $@ -+ -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) -+ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc -+ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) -+ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) -+ -+ - shared: libpcap.$(DYEXT) - - # -@@ -129,6 +153,10 @@ - scanner.o: scanner.c tokdefs.h - $(CC) $(CFLAGS) -c scanner.c - -+scanner_pic.o: scanner.c tokdefs.h -+ $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c -+ -+ - pcap.o: version.h - - tokdefs.h: grammar.c -@@ -142,9 +170,16 @@ - @rm -f $@ - $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c - -+grammar_pic.o: grammar.c -+ @rm -f $@ -+ $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c -+ - version.o: version.c - $(CC) $(CFLAGS) -c version.c - -+version_pic.o: version.c -+ $(CC) -fPIC $(CFLAGS) -c version.c -o $@ -+ - snprintf.o: $(srcdir)/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c - -@@ -170,10 +205,17 @@ - bpf_filter.o: bpf_filter.c - $(CC) $(CFLAGS) -c bpf_filter.c - -+bpf_filter_pic.o: bpf_filter.c -+ $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@ -+ -+ - install: libpcap.a - [ -d $(DESTDIR)$(libdir) ] || \ - (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) - $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a -+ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ -+ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) -+ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) - $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a - [ -d $(DESTDIR)$(includedir) ] || \ - (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) diff --git a/openwrt/package/libpcap/patches/101-cross-compile-fix.patch b/openwrt/package/libpcap/patches/101-cross-compile-fix.patch deleted file mode 100644 index 5ba78adaef6..00000000000 --- a/openwrt/package/libpcap/patches/101-cross-compile-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN libpcap-0.9.4.orig/Makefile.in libpcap-0.9.4/Makefile.in ---- libpcap-0.9.4.orig/Makefile.in 2006-02-05 16:57:16.000000000 +0100 -+++ libpcap-0.9.4/Makefile.in 2006-02-05 16:57:03.000000000 +0100 -@@ -117,7 +117,7 @@ - - libpcap.a: $(OBJ) - @rm -f $@ -- ar rc $@ $(OBJ) $(LIBS) -+ $(AR) rc $@ $(OBJ) $(LIBS) - $(RANLIB) $@ - - $(SHAREDLIB): $(OBJ_PIC) diff --git a/openwrt/package/libpcap/patches/102-alt-ether.patch b/openwrt/package/libpcap/patches/102-alt-ether.patch deleted file mode 100644 index 347265d6e91..00000000000 --- a/openwrt/package/libpcap/patches/102-alt-ether.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -urN libpcap-0.9.4.orig/nametoaddr.c libpcap-0.9.4/nametoaddr.c ---- libpcap-0.9.4.orig/nametoaddr.c 2005-04-20 13:13:51.000000000 +0200 -+++ libpcap-0.9.4/nametoaddr.c 2006-02-05 16:58:46.000000000 +0100 -@@ -410,7 +410,7 @@ - e = ep = (u_char *)malloc(6); - - while (*s) { -- if (*s == ':') -+ if (*s == ':' || *s == '.') - s += 1; - d = xdtoi(*s++); - if (isxdigit((unsigned char)*s)) { -diff -urN libpcap-0.9.4.orig/scanner.l libpcap-0.9.4/scanner.l ---- libpcap-0.9.4.orig/scanner.l 2005-09-05 11:08:07.000000000 +0200 -+++ libpcap-0.9.4/scanner.l 2006-02-05 17:00:13.000000000 +0100 -@@ -80,6 +80,7 @@ - N ([0-9]+|(0X|0x)[0-9A-Fa-f]+) - B ([0-9A-Fa-f][0-9A-Fa-f]?) - W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?) -+X [0-9A-Fa-f] - - %a 16000 - %o 19000 -@@ -306,7 +307,7 @@ - {N} { yylval.i = stoi((char *)yytext); return NUM; } - ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) { - yylval.s = sdup((char *)yytext); return HID; } --{B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext); -+({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) { yylval.e = pcap_ether_aton((char *)yytext); - return EID; } - {V6} { - #ifdef INET6 -@@ -324,6 +325,7 @@ - #endif /*INET6*/ - } - {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); } -+{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;} - icmptype { yylval.i = 0; return NUM; } - icmpcode { yylval.i = 1; return NUM; } - icmp-echoreply { yylval.i = 0; return NUM; } diff --git a/openwrt/package/libpng/Config.in b/openwrt/package/libpng/Config.in deleted file mode 100644 index 1b51de17515..00000000000 --- a/openwrt/package/libpng/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LIBPNG - prompt "libpng............................ PNG (Portable Network Graphics) format files handling library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_ZLIB - help - A library for reading/writing PNG files - - http://www.libpng.org/pub/png/libpng.html - diff --git a/openwrt/package/libpng/Makefile b/openwrt/package/libpng/Makefile deleted file mode 100644 index 8033d42c414..00000000000 --- a/openwrt/package/libpng/Makefile +++ /dev/null @@ -1,92 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libpng -PKG_VERSION:=1.2.8 -PKG_RELEASE:=1 -PKG_MD5SUM:=e5a39003eed16103cbbd3b6a8bc6b1f9 - -PKG_SOURCE_URL:=@SF/libpng -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-config.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-config -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBPNG,libpng,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --with-zlib=$(STAGING_DIR)/usr/ \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBPNG): - install -d -m0755 $(IDIR_LIBPNG)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(IDIR_LIBPNG)/usr/lib/ - $(RSTRIP) $(IDIR_LIBPNG) - $(IPKG_BUILD) $(IDIR_LIBPNG) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libpng.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf}.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/libpng $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,12}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,^[ILR]_opts=".\+",,g' $(STAGING_DIR)/usr/bin/libpng*-config - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libpng.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/libpng{,12}-config \ - $(STAGING_DIR)/usr/include/png{,conf}.h \ - $(STAGING_DIR)/usr/include/libpng \ - $(STAGING_DIR)/usr/lib/libpng{,12}.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/libpng{,12}.pc - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/libpng/ipkg/libpng.control b/openwrt/package/libpng/ipkg/libpng.control deleted file mode 100644 index 96c91b4de23..00000000000 --- a/openwrt/package/libpng/ipkg/libpng.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libpng -Priority: optional -Section: libs -Depends: zlib -Description: A library for reading/writing PNG images diff --git a/openwrt/package/libpng/patches/100-config_fix.patch b/openwrt/package/libpng/patches/100-config_fix.patch deleted file mode 100644 index 453d271096c..00000000000 --- a/openwrt/package/libpng/patches/100-config_fix.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- libpng3-1.2.5.0.orig/scripts/libpng-config-body.in -+++ libpng3-1.2.5.0/scripts/libpng-config-body.in -@@ -83,6 +83,7 @@ - - --static) - R_opts="" -+ libs=${all_libs} - ;; - - *) ---- libpng3-1.2.5.0.orig/scripts/libpng.pc.in -+++ libpng3-1.2.5.0/scripts/libpng.pc.in -@@ -7,5 +7,5 @@ - Name: libpng12 - Description: Loads and saves PNG files - Version: 1.2.8 --Libs: -L${libdir} -lpng12 -lz -lm -+Libs: -lpng12 - Cflags: -I${includedir}/libpng12 diff --git a/openwrt/package/libpng/patches/101-pkgconfig-install.patch b/openwrt/package/libpng/patches/101-pkgconfig-install.patch deleted file mode 100644 index 7f362fbc3b9..00000000000 --- a/openwrt/package/libpng/patches/101-pkgconfig-install.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- libpng-1.2.8-config/Makefile.in.orig 2004-12-03 01:14:51.000000000 +0100 -+++ libpng-1.2.8-config/Makefile.in 2005-05-18 14:17:31.000000000 +0200 -@@ -874,13 +874,13 @@ - cp libpng.pc libpng12.pc - - install-data-local: libpng.pc libpng12.pc -- @INSTALL@ -d @PKGCONFIGDIR@ -- @INSTALL_DATA@ libpng.pc @PKGCONFIGDIR@ -- @INSTALL_DATA@ libpng12.pc @PKGCONFIGDIR@ -+ @INSTALL@ -d $(DESTDIR)@PKGCONFIGDIR@ -+ @INSTALL_DATA@ libpng.pc $(DESTDIR)@PKGCONFIGDIR@ -+ @INSTALL_DATA@ libpng12.pc $(DESTDIR)@PKGCONFIGDIR@ - - uninstall-local: -- rm -f @PKGCONFIGDIR@/libpng.pc -- rm -f @PKGCONFIGDIR@/libpng12.pc -+ rm -f $(DESTDIR)@PKGCONFIGDIR@/libpng.pc -+ rm -f $(DESTDIR)@PKGCONFIGDIR@/libpng12.pc - - libpng-config: - ( cat ${srcdir}/scripts/libpng-config-head.in; \ diff --git a/openwrt/package/libpthread/Config.in b/openwrt/package/libpthread/Config.in deleted file mode 100644 index fb6cb584168..00000000000 --- a/openwrt/package/libpthread/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_LIBPTHREAD - prompt "libpthread........................ POSIX threads library" - tristate - default m if CONFIG_DEVEL - help - POSIX threads library - diff --git a/openwrt/package/libpthread/Makefile b/openwrt/package/libpthread/Makefile deleted file mode 100644 index 7e6b8d42e1d..00000000000 --- a/openwrt/package/libpthread/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libpthread -PKG_VERSION:=0.9.28 -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBPTHREAD,libpthread,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - touch $@ - -$(IPKG_LIBPTHREAD): $(PKG_BUILD_DIR)/.built - mkdir -p $(IDIR_LIBPTHREAD)/lib - $(CP) $(STAGING_DIR)/lib/libpthread.so.* $(IDIR_LIBPTHREAD)/lib/ - $(CP) $(STAGING_DIR)/lib/libpthread-*.so $(IDIR_LIBPTHREAD)/lib/ - $(RSTRIP) $(IDIR_LIBPTHREAD) - $(IPKG_BUILD) $(IDIR_LIBPTHREAD) $(PACKAGE_DIR) - diff --git a/openwrt/package/libpthread/ipkg/libpthread.control b/openwrt/package/libpthread/ipkg/libpthread.control deleted file mode 100644 index 73978c2ccc4..00000000000 --- a/openwrt/package/libpthread/ipkg/libpthread.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libpthread -Priority: optional -Section: libs -Description: POSIX threads library diff --git a/openwrt/package/libtasn1/Config.in b/openwrt/package/libtasn1/Config.in deleted file mode 100644 index 4553c25b238..00000000000 --- a/openwrt/package/libtasn1/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_LIBTASN1 - prompt "libtasn1.......................... An ASN.1 and DER structures manipulation library" - tristate -# default m if CONFIG_DEVEL - default n - help - This is a library for Abstract Syntax Notation One (ASN.1) and - Distinguish Encoding Rules (DER) manipulation. - - ftp://ftp.gnutls.org/pub/gnutls/libtasn1/ - diff --git a/openwrt/package/libtasn1/Makefile b/openwrt/package/libtasn1/Makefile deleted file mode 100644 index 9402aa53a99..00000000000 --- a/openwrt/package/libtasn1/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libtasn1 -PKG_VERSION:=0.2.13 -PKG_RELEASE:=0 -PKG_MD5SUM:=d124b11908cfb88883fe71472c25d53a - -PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/libtasn1/ \ - ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/libtasn1/ \ - http://www.mirrors.wiretapped.net/security/network-security/gnutls/libtasn1/ \ - ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/libtasn1/ \ - http://josefsson.org/gnutls/releases/libtasn1/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBTASN1,libtasn1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - touch configure.ac ; \ - touch acinclude.m4 ; \ - touch aclocal.m4 ; \ - touch Makefile.in ; \ - touch config.h.in ; \ - touch configure ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBTASN1): - install -m0755 -d $(IDIR_LIBTASN1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.so.* $(IDIR_LIBTASN1)/usr/lib/ - $(RSTRIP) $(IDIR_LIBTASN1) - $(IPKG_BUILD) $(IDIR_LIBTASN1) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libtasn1.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libtasn1-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libtasn1.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/share/aclocal - $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libtasn1.m4 $(STAGING_DIR)/usr/share/aclocal/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libtasn1.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/libtasn1-config \ - $(STAGING_DIR)/usr/include/libtasn1.h \ - $(STAGING_DIR)/usr/lib/libtasn1.{a,so*} \ - $(STAGING_DIR)/usr/share/aclocal/libtasn1.m4 \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/libtasn1/ipkg/libtasn1.control b/openwrt/package/libtasn1/ipkg/libtasn1.control deleted file mode 100644 index 4a5c1f6f3dd..00000000000 --- a/openwrt/package/libtasn1/ipkg/libtasn1.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libtasn1 -Priority: optional -Section: libs -Description: an ASN.1 and DER structures manipulation library diff --git a/openwrt/package/libtasn1/patches/500-cross-compile.patch b/openwrt/package/libtasn1/patches/500-cross-compile.patch deleted file mode 100644 index dadbf2b845e..00000000000 --- a/openwrt/package/libtasn1/patches/500-cross-compile.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ruN libtasn1-0.2.13-orig/configure libtasn1-0.2.13-1/configure ---- libtasn1-0.2.13-orig/configure 2004-12-15 19:40:02.000000000 +0100 -+++ libtasn1-0.2.13-1/configure 2005-03-15 22:35:56.000000000 +0100 -@@ -22448,8 +22448,8 @@ - - - --LIBTASN1_LIBS="-L${libdir} -ltasn1 $LIBS" --LIBTASN1_CFLAGS="-I${includedir}" -+LIBTASN1_LIBS="-ltasn1 $LIBS" -+LIBTASN1_CFLAGS="" - - - -diff -ruN libtasn1-0.2.13-orig/configure.in libtasn1-0.2.13-1/configure.in ---- libtasn1-0.2.13-orig/configure.in 2004-12-15 19:39:01.000000000 +0100 -+++ libtasn1-0.2.13-1/configure.in 2005-03-15 22:35:46.000000000 +0100 -@@ -85,8 +85,8 @@ - ]) - AM_PROG_LIBTOOL - --LIBTASN1_LIBS="-L${libdir} -ltasn1 $LIBS" --LIBTASN1_CFLAGS="-I${includedir}" -+LIBTASN1_LIBS="-ltasn1 $LIBS" -+LIBTASN1_CFLAGS="" - - AC_SUBST(LIBTASN1_LIBS) - AC_SUBST(LIBTASN1_CFLAGS) diff --git a/openwrt/package/libtool/Config.in b/openwrt/package/libtool/Config.in deleted file mode 100644 index 4cc721379b9..00000000000 --- a/openwrt/package/libtool/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_COMPILE_LIBTOOL - tristate - depends BR2_PACKAGE_LIBLTDL - -config BR2_PACKAGE_LIBLTDL - prompt "libltdl........................... A generic dynamic object loading library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_LIBTOOL - help - A generic dynamic object loading library. - - http://www.gnu.org/software/libtool/ - diff --git a/openwrt/package/libtool/Makefile b/openwrt/package/libtool/Makefile deleted file mode 100644 index f84d1711ee3..00000000000 --- a/openwrt/package/libtool/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libtool -PKG_VERSION:=1.5.14 -PKG_RELEASE:=1 -PKG_MD5SUM:=049bf67de9b0eb75cd943dafe3d749ec - -PKG_SOURCE_URL:=@GNU/libtool -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBLTDL,libltdl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBLTDL): - install -m0755 -d $(IDIR_LIBLTDL)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libltdl.so.* $(IDIR_LIBLTDL)/usr/lib/ - $(RSTRIP) $(IDIR_LIBLTDL) - $(IPKG_BUILD) $(IDIR_LIBLTDL) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libltdl.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ltdl.h $(STAGING_DIR)/usr/include/ - mkdir -p $(I_LIBLTDL_DEV)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libltdl.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libltdl.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/ltdl.h \ - $(STAGING_DIR)/usr/lib/libltdl.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libtool/ipkg/libltdl.control b/openwrt/package/libtool/ipkg/libltdl.control deleted file mode 100644 index d6a1777d3a1..00000000000 --- a/openwrt/package/libtool/ipkg/libltdl.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libltdl -Priority: optional -Section: libs -Description: a generic dynamic object loading library diff --git a/openwrt/package/libupnp/Config.in b/openwrt/package/libupnp/Config.in deleted file mode 100644 index bbe822efe5e..00000000000 --- a/openwrt/package/libupnp/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_LIBUPNP - prompt "libupnp........................... Universal Plug and Play (UPnP) SDK library" - tristate - default m if CONFIG_DEVEL - help - The Universal Plug and Play (UPnP) SDK for Linux provides support - for building UPnP-compliant control points, devices, and bridges - on Linux. - - http://upnp.sourceforge.net/ - - Depends: libpthread - diff --git a/openwrt/package/libupnp/Makefile b/openwrt/package/libupnp/Makefile deleted file mode 100644 index 6e862722e61..00000000000 --- a/openwrt/package/libupnp/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libupnp -PKG_VERSION:=1.2.1a -PKG_RELEASE:=1 -PKG_MD5SUM:=e72b3550bf064eedf080f16f09688891 - -PKG_SOURCE_URL:=@SF/upnp -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBUPNP,libupnp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR)/upnp \ - $(TARGET_CONFIGURE_OPTS) \ - OPT_FLAGS="$(TARGET_CFLAGS)" \ - STRIP=/bin/true - touch $@ - -$(IPKG_LIBUPNP): - install -m0755 -d $(IDIR_LIBUPNP)/usr/lib - $(CP) $(PKG_BUILD_DIR)/upnp/bin/libixml.so $(IDIR_LIBUPNP)/usr/lib/ ; \ - $(CP) $(PKG_BUILD_DIR)/upnp/bin/libthreadutil.so $(IDIR_LIBUPNP)/usr/lib/ ; \ - $(CP) $(PKG_BUILD_DIR)/upnp/bin/libupnp.so $(IDIR_LIBUPNP)/usr/lib/ ; \ - $(RSTRIP) $(IDIR_LIBUPNP) - $(IPKG_BUILD) $(IDIR_LIBUPNP) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libupnp.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/upnp - $(CP) $(PKG_BUILD_DIR)/upnp/inc/*.h $(STAGING_DIR)/usr/include/upnp/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_BUILD_DIR)/upnp/bin/libixml.so $(STAGING_DIR)/usr/lib/ ; \ - $(CP) $(PKG_BUILD_DIR)/upnp/bin/libthreadutil.so $(STAGING_DIR)/usr/lib/ ; \ - $(CP) $(PKG_BUILD_DIR)/upnp/bin/libupnp.so $(STAGING_DIR)/usr/lib/ ; \ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libupnp.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/upnp \ - $(STAGING_DIR)/usr/lib/libixml.so \ - $(STAGING_DIR)/usr/lib/libthreadutil.so \ - $(STAGING_DIR)/usr/lib/libupnp.so \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libupnp/ipkg/libupnp.control b/openwrt/package/libupnp/ipkg/libupnp.control deleted file mode 100644 index 2ebe4f7a80f..00000000000 --- a/openwrt/package/libupnp/ipkg/libupnp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libupnp -Priority: optional -Section: libs -Depends: libpthread -Description: The Universal Plug and Play (UPnP) SDK library. diff --git a/openwrt/package/libupnp/patches/libupnp-1.2.1a-gcc4.patch b/openwrt/package/libupnp/patches/libupnp-1.2.1a-gcc4.patch deleted file mode 100644 index 2ea3f88052c..00000000000 --- a/openwrt/package/libupnp/patches/libupnp-1.2.1a-gcc4.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: libupnp-1.2.1a/ixml/src/element.c -=================================================================== ---- libupnp-1.2.1a.orig/ixml/src/element.c -+++ libupnp-1.2.1a/ixml/src/element.c -@@ -454,9 +454,9 @@ ixmlElement_removeAttributeNode( IN IXML - element->n.firstAttr = nextSib; - } - -- ( IXML_Attr * ) attrNode->parentNode = NULL; -- ( IXML_Attr * ) attrNode->prevSibling = NULL; -- ( IXML_Attr * ) attrNode->nextSibling = NULL; -+ attrNode->parentNode = NULL; -+ attrNode->prevSibling = NULL; -+ attrNode->nextSibling = NULL; - *rtAttr = ( IXML_Attr * ) attrNode; - return IXML_SUCCESS; - diff --git a/openwrt/package/libupnp/patches/opt-flags.patch b/openwrt/package/libupnp/patches/opt-flags.patch deleted file mode 100644 index c6a8ce5996d..00000000000 --- a/openwrt/package/libupnp/patches/opt-flags.patch +++ /dev/null @@ -1,315 +0,0 @@ -diff -ruN libupnp-1.2.1-orig/ixml/src/Makefile libupnp-1.2.1-1/ixml/src/Makefile ---- libupnp-1.2.1-orig/ixml/src/Makefile 2003-01-14 23:06:12.000000000 +0100 -+++ libupnp-1.2.1-1/ixml/src/Makefile 2005-05-15 19:32:46.000000000 +0200 -@@ -47,6 +47,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE), 1) - CC = insure - endif -@@ -71,7 +73,7 @@ - ifeq ($(DEBUG),1) - DEBUG_FLAGS = -O -g -DDEBUG - else -- DEBUG_FLAGS = -Os -DNDEBUG -+ DEBUG_FLAGS = $(OPT_FLAGS) -DNDEBUG - STRIPU = $(STRIP) $(OBJ_DIR)/$(TARGET_OUTPUT) - endif - -diff -ruN libupnp-1.2.1-orig/threadutil/src/Makefile libupnp-1.2.1-1/threadutil/src/Makefile ---- libupnp-1.2.1-orig/threadutil/src/Makefile 2003-01-14 23:06:12.000000000 +0100 -+++ libupnp-1.2.1-1/threadutil/src/Makefile 2005-05-15 19:32:33.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - DEPDIR = .deps - df = $(DEPDIR)/$(*F) - -@@ -74,7 +76,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - CLEAN_PATH=debug/$(DIR_PATH) - else --DEBUG_FLAGS += -Os -DNO_DEBUG -DNDEBUG -+DEBUG_FLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - LOCALDIR +=../bin/$(DIR_PATH) - TARGET_OUTPUT = libthreadutil.so - OBJ_DIR = obj/$(DIR_PATH) -diff -ruN libupnp-1.2.1-orig/upnp/src/api/makefile libupnp-1.2.1-1/upnp/src/api/makefile ---- libupnp-1.2.1-orig/upnp/src/api/makefile 2003-01-14 23:06:13.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/api/makefile 2005-05-15 19:33:04.000000000 +0200 -@@ -43,6 +43,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE), 1) - CC = insure - endif -@@ -64,7 +66,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = ../lib/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = ../lib/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/gena/Makefile libupnp-1.2.1-1/upnp/src/gena/Makefile ---- libupnp-1.2.1-orig/upnp/src/gena/Makefile 2003-01-14 23:06:13.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/gena/Makefile 2005-05-15 19:33:32.000000000 +0200 -@@ -43,6 +43,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC=insure - endif -@@ -60,7 +62,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/genlib/client_table/Makefile libupnp-1.2.1-1/upnp/src/genlib/client_table/Makefile ---- libupnp-1.2.1-orig/upnp/src/genlib/client_table/Makefile 2003-01-14 23:06:13.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/genlib/client_table/Makefile 2005-05-15 19:33:41.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC=insure - endif -@@ -73,7 +75,7 @@ - else - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = ../../lib/$(DIR_PATH) --CFLAGS += -Os -D_REENTRANT -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -D_REENTRANT -DNO_DEBUG -DNDEBUG - endif - - TARGET_OUTPUT = $(UPNP_LIB_DIR)client_table.o -diff -ruN libupnp-1.2.1-orig/upnp/src/genlib/miniserver/Makefile libupnp-1.2.1-1/upnp/src/genlib/miniserver/Makefile ---- libupnp-1.2.1-orig/upnp/src/genlib/miniserver/Makefile 2003-01-14 23:06:13.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/genlib/miniserver/Makefile 2005-05-15 19:33:56.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC=insure - endif -@@ -60,7 +62,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = ../../lib/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = ../../lib/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/genlib/net/Makefile libupnp-1.2.1-1/upnp/src/genlib/net/Makefile ---- libupnp-1.2.1-orig/upnp/src/genlib/net/Makefile 2003-01-14 23:06:13.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/genlib/net/Makefile 2005-05-15 19:34:07.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - LIBS=../../lib - UPNP_INC_DIR = -I../../inc -I../../../inc -I ../../../../threadutil/src/win32 \ - -I ../../../../threadutil/src -I ../../../../ixml/inc -@@ -59,7 +61,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/genlib/net/http/Makefile libupnp-1.2.1-1/upnp/src/genlib/net/http/Makefile ---- libupnp-1.2.1-orig/upnp/src/genlib/net/http/Makefile 2003-01-14 23:06:13.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/genlib/net/http/Makefile 2005-05-15 19:34:18.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - UPNP_INC_DIR = -I ../../../../inc -I ../../../inc \ - -I ../../../../../threadutil/src/win32 \ - -I ../../../../../threadutil/src -I ../../../../../ixml/inc -@@ -57,7 +59,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/genlib/net/uri/makefile libupnp-1.2.1-1/upnp/src/genlib/net/uri/makefile ---- libupnp-1.2.1-orig/upnp/src/genlib/net/uri/makefile 2003-01-14 23:06:13.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/genlib/net/uri/makefile 2005-05-15 19:35:22.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - LIBS = ../../../lib - - -@@ -59,7 +61,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/genlib/service_table/Makefile libupnp-1.2.1-1/upnp/src/genlib/service_table/Makefile ---- libupnp-1.2.1-orig/upnp/src/genlib/service_table/Makefile 2003-01-14 23:06:14.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/genlib/service_table/Makefile 2005-05-15 19:35:33.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC=insure - endif -@@ -61,7 +63,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/genlib/util/Makefile libupnp-1.2.1-1/upnp/src/genlib/util/Makefile ---- libupnp-1.2.1-orig/upnp/src/genlib/util/Makefile 2003-01-14 23:06:14.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/genlib/util/Makefile 2005-05-15 19:35:44.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC=insure - endif -@@ -62,7 +64,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/soap/makefile libupnp-1.2.1-1/upnp/src/soap/makefile ---- libupnp-1.2.1-orig/upnp/src/soap/makefile 2003-01-14 23:06:14.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/soap/makefile 2005-05-15 19:35:55.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC = insure - endif -@@ -61,7 +63,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/ssdp/makefile libupnp-1.2.1-1/upnp/src/ssdp/makefile ---- libupnp-1.2.1-orig/upnp/src/ssdp/makefile 2003-01-14 23:06:14.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/ssdp/makefile 2005-05-15 19:36:04.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC = insure - endif -@@ -61,7 +63,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/urlconfig/Makefile libupnp-1.2.1-1/upnp/src/urlconfig/Makefile ---- libupnp-1.2.1-orig/upnp/src/urlconfig/Makefile 2003-01-14 23:06:14.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/urlconfig/Makefile 2005-05-15 19:36:30.000000000 +0200 -@@ -43,6 +43,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC = insure - endif -@@ -60,7 +62,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif -diff -ruN libupnp-1.2.1-orig/upnp/src/uuid/Makefile libupnp-1.2.1-1/upnp/src/uuid/Makefile ---- libupnp-1.2.1-orig/upnp/src/uuid/Makefile 2003-01-14 23:06:14.000000000 +0100 -+++ libupnp-1.2.1-1/upnp/src/uuid/Makefile 2005-05-15 19:36:53.000000000 +0200 -@@ -44,6 +44,8 @@ - STRIP = strip - endif - -+OPT_FLAGS = -Os -+ - ifeq ($(INSURE),1) - CC = insure - endif -@@ -61,7 +63,7 @@ - OBJ_DIR = obj/debug/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/debug/$(DIR_PATH) - else --CFLAGS += -Os -DNO_DEBUG -DNDEBUG -+CFLAGS += $(OPT_FLAGS) -DNO_DEBUG -DNDEBUG - OBJ_DIR = obj/$(DIR_PATH) - UPNP_LIB_DIR = $(LIBS)/$(DIR_PATH) - endif diff --git a/openwrt/package/libusb/Config.in b/openwrt/package/libusb/Config.in deleted file mode 100644 index d38581a9e3b..00000000000 --- a/openwrt/package/libusb/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_LIBUSB - prompt "libusb............................ A library for accessing Linux USB devices" - tristate - default m if CONFIG_DEVEL - help - A library for accessing Linux USB devices - - http://libusb.sourceforge.net/ - diff --git a/openwrt/package/libusb/Makefile b/openwrt/package/libusb/Makefile deleted file mode 100644 index e6cf4ba2bbf..00000000000 --- a/openwrt/package/libusb/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libusb -PKG_VERSION:=0.1.10a -PKG_RELEASE:=1 -PKG_MD5SUM:=c6062b29acd2cef414bcc34e0decbdd1 - -PKG_SOURCE_URL:=@SF/libusb -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBUSB,libusb,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_c_bigendian=no \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBUSB): - install -m0755 -d $(IDIR_LIBUSB)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb*.so.* $(IDIR_LIBUSB)/usr/lib/ - $(RSTRIP) $(IDIR_LIBUSB) - $(IPKG_BUILD) $(IDIR_LIBUSB) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libusb.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libusb-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/usb.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb*.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libusb.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/libusb-config \ - $(STAGING_DIR)/usr/include/usb.h \ - $(STAGING_DIR)/usr/lib/libusb*.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/libusb/ipkg/libusb.control b/openwrt/package/libusb/ipkg/libusb.control deleted file mode 100644 index 599a217fc5f..00000000000 --- a/openwrt/package/libusb/ipkg/libusb.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libusb -Priority: optional -Section: libs -Description: a Library for accessing Linux USB devices diff --git a/openwrt/package/libusb/patches/no-libusbpp.patch b/openwrt/package/libusb/patches/no-libusbpp.patch deleted file mode 100644 index e9f48f14db5..00000000000 --- a/openwrt/package/libusb/patches/no-libusbpp.patch +++ /dev/null @@ -1,105 +0,0 @@ ---- libusb-0.1.10a.dev/Makefile.in.old 2005-04-20 21:49:04.000000000 +0200 -+++ libusb-0.1.10a.dev/Makefile.in 2005-04-20 21:50:23.000000000 +0200 -@@ -16,7 +16,7 @@ - - - --SOURCES = $(libusb_la_SOURCES) $(libusbpp_la_SOURCES) -+SOURCES = $(libusb_la_SOURCES) - - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ -@@ -71,8 +71,8 @@ - am_libusb_la_OBJECTS = usb.lo error.lo descriptors.lo $(am__objects_1) - libusb_la_OBJECTS = $(am_libusb_la_OBJECTS) - libusbpp_la_LIBADD = --am_libusbpp_la_OBJECTS = usbpp.lo --libusbpp_la_OBJECTS = $(am_libusbpp_la_OBJECTS) -+am_libusbpp_la_OBJECTS = -+libusbpp_la_OBJECTS = - binSCRIPT_INSTALL = $(INSTALL_SCRIPT) - SCRIPTS = $(bin_SCRIPTS) - DEFAULT_INCLUDES = -@@ -80,8 +80,7 @@ - am__depfiles_maybe = depfiles - @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bsd.Plo ./$(DEPDIR)/darwin.Plo \ - @AMDEP_TRUE@ ./$(DEPDIR)/descriptors.Plo ./$(DEPDIR)/error.Plo \ --@AMDEP_TRUE@ ./$(DEPDIR)/linux.Plo ./$(DEPDIR)/usb.Plo \ --@AMDEP_TRUE@ ./$(DEPDIR)/usbpp.Plo -+@AMDEP_TRUE@ ./$(DEPDIR)/linux.Plo ./$(DEPDIR)/usb.Plo - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ -@@ -98,8 +97,8 @@ - CXXLD = $(CXX) - CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ --SOURCES = $(libusb_la_SOURCES) $(libusbpp_la_SOURCES) --DIST_SOURCES = $(am__libusb_la_SOURCES_DIST) $(libusbpp_la_SOURCES) -+SOURCES = $(libusb_la_SOURCES) -+DIST_SOURCES = $(am__libusb_la_SOURCES_DIST) - RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ -@@ -250,7 +249,7 @@ - # require automake 1.4 - # gnu strictness chokes on README being autogenerated - AUTOMAKE_OPTIONS = 1.4 foreign --SUBDIRS = . tests doc -+SUBDIRS = . - AM_CFLAGS = $(CFLAGS_EXT) - configincludedir = $(pkglibdir)/include - bin_SCRIPTS = libusb-config -@@ -259,7 +258,7 @@ - apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png - - EXTRA_libusb_la_SOURCE = linux.c linux.h bsd.c darwin.c --lib_LTLIBRARIES = libusb.la libusbpp.la -+lib_LTLIBRARIES = libusb.la - @BSD_API_FALSE@@DARWIN_API_FALSE@@LINUX_API_FALSE@OS_SUPPORT = - @BSD_API_FALSE@@DARWIN_API_TRUE@@LINUX_API_FALSE@OS_SUPPORT = darwin.c - @BSD_API_TRUE@@LINUX_API_FALSE@OS_SUPPORT = bsd.c -@@ -269,24 +268,18 @@ - AM_CPPFLAGS = -I. - AM_CXXFLAGS = - libusb_la_SOURCES = usb.c usbi.h error.c error.h descriptors.c $(OS_SUPPORT) --libusbpp_la_SOURCES = usbpp.cpp usbpp.h -+libusbpp_la_SOURCES = - - # Do not add usb.h to *_SOURCES, regardless of dependencies. - # It would be added to the dist tarball, which it shouldn't be. - nodist_include_HEADERS = usb.h --include_HEADERS = usbpp.h -+include_HEADERS = - libusb_la_LDFLAGS = \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -release $(LT_RELEASE) \ - -export-dynamic \ - $(LDADDS) - --libusbpp_la_LDFLAGS = \ -- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -- -release $(LT_RELEASE) \ -- -export-dynamic \ -- $(LDADDS) -lusb $(QT_LDFLAGS) -- - all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -@@ -381,8 +374,6 @@ - done - libusb.la: $(libusb_la_OBJECTS) $(libusb_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libusb_la_LDFLAGS) $(libusb_la_OBJECTS) $(libusb_la_LIBADD) $(LIBS) --libusbpp.la: $(libusbpp_la_OBJECTS) $(libusbpp_la_DEPENDENCIES) -- $(CXXLINK) -rpath $(libdir) $(libusbpp_la_LDFLAGS) $(libusbpp_la_OBJECTS) $(libusbpp_la_LIBADD) $(LIBS) - install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" -@@ -415,7 +406,6 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usbpp.Plo@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ diff --git a/openwrt/package/libvorbis/Config.in b/openwrt/package/libvorbis/Config.in deleted file mode 100644 index 805f1f8ba79..00000000000 --- a/openwrt/package/libvorbis/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LIBVORBIS - prompt "libvorbis......................... The Vorbis General Audio Compression Codec library" - tristate - default n - select BR2_PACKAGE_LIBOGG - help - The Vorbis General Audio Compression Codec library. - - http://www.vorbis.com/ - diff --git a/openwrt/package/libvorbis/Makefile b/openwrt/package/libvorbis/Makefile deleted file mode 100644 index ec36018f1cb..00000000000 --- a/openwrt/package/libvorbis/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libvorbis -PKG_VERSION:=1.1.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=37847626b8e1b53ae79a34714c7b3211 - -PKG_SOURCE_URL:=http://downloads.xiph.org/releases/vorbis/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBVORBIS,libvorbis,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -# NOTE: check ./toolchain/libnotimpl -# it implements those functions missing from the version of uClibc we're currently using -# for libvorbis, they are cosf/sinf - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-lm -logg -lnotimpl" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --with-ogg="$(STAGING_DIR)/usr" \ - --with-ogg-includes="$(STAGING_DIR)/usr/include" \ - --with-ogg-libraries="$(STAGING_DIR)/usr/lib" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBVORBIS): - install -m0755 -d $(IDIR_LIBVORBIS)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbis.so.* $(IDIR_LIBVORBIS)/usr/lib/ - $(RSTRIP) $(IDIR_LIBVORBIS) - $(IPKG_BUILD) $(IDIR_LIBVORBIS) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libvorbis.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/vorbis $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbis.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbis{,enc,file}.so* $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libvorbis.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/vorbis \ - $(STAGING_DIR)/usr/lib/libvorbis{,enc,file}.a \ - $(STAGING_DIR)/usr/lib/libvorbis{,enc,file}.so* \ - $(STAGING_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libvorbis/ipkg/libvorbis.control b/openwrt/package/libvorbis/ipkg/libvorbis.control deleted file mode 100644 index d122faa2e0f..00000000000 --- a/openwrt/package/libvorbis/ipkg/libvorbis.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libvorbis -Priority: optional -Section: libs -Description: The Vorbis General Audio Compression Codec library diff --git a/openwrt/package/libvorbis/patches/100-no_examples.patch b/openwrt/package/libvorbis/patches/100-no_examples.patch deleted file mode 100644 index 35c50a4c59e..00000000000 --- a/openwrt/package/libvorbis/patches/100-no_examples.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur libvorbis-1.1.2/Makefile.in libvorbis-1.1.2-owrt/Makefile.in ---- libvorbis-1.1.2/Makefile.in 2005-11-28 06:43:44.000000000 +0100 -+++ libvorbis-1.1.2-owrt/Makefile.in 2006-01-29 21:55:23.000000000 +0100 -@@ -217,7 +217,7 @@ - target_os = @target_os@ - target_vendor = @target_vendor@ - AUTOMAKE_OPTIONS = foreign dist-zip --SUBDIRS = lib include doc examples vq -+SUBDIRS = lib include doc vq - m4datadir = $(datadir)/aclocal - m4data_DATA = vorbis.m4 - pkgconfigdir = $(libdir)/pkgconfig diff --git a/openwrt/package/libvorbisidec/Config.in b/openwrt/package/libvorbisidec/Config.in deleted file mode 100644 index 640e3e2aeeb..00000000000 --- a/openwrt/package/libvorbisidec/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_LIBVORBISIDEC - prompt "libvorbisidec..................... A fixed-point implementation (Tremor) of libogg/libvorbis" - tristate - default m if CONFIG_DEVEL - help - libvorbisidec is "tremor", a fixed-point implementation of libvorbis. - It also has libogg built-in. It is suitable as a replacement for - libvorbis and libogg in tremor-aware applications. - Tremor is a decoder only. - - http://http://wiki.xiph.org/index.php/Tremor - diff --git a/openwrt/package/libvorbisidec/Makefile b/openwrt/package/libvorbisidec/Makefile deleted file mode 100644 index d668a0e9b75..00000000000 --- a/openwrt/package/libvorbisidec/Makefile +++ /dev/null @@ -1,91 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libvorbisidec -PKG_VERSION:=1.2.0-dave -PKG_RELEASE:=1 -PKG_MD5SUM:=cb8e51aab92ef164f8e0e8853f7164fa - -PKG_SOURCE_URL:=http://users.tpg.com.au/davico/openwrt/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBVORBISIDEC,libvorbisidec,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBVORBISIDEC): - install -m0755 -d $(IDIR_LIBVORBISIDEC)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.so.* $(IDIR_LIBVORBISIDEC)/usr/lib/ - $(RSTRIP) $(IDIR_LIBVORBISIDEC) - $(IPKG_BUILD) $(IDIR_LIBVORBISIDEC) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libvorbisidec.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/tremor $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libvorbisidec.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/tremor \ - $(STAGING_DIR)/usr/lib/libvorbisidec.a \ - $(STAGING_DIR)/usr/lib/libvorbisidec.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libvorbisidec/ipkg/libvorbisidec.control b/openwrt/package/libvorbisidec/ipkg/libvorbisidec.control deleted file mode 100644 index 41cd1e03785..00000000000 --- a/openwrt/package/libvorbisidec/ipkg/libvorbisidec.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libvorbisidec -Priority: optional -Section: libs -Description: A fixed-point implementation (Tremor) of libogg/libvorbis" diff --git a/openwrt/package/libxml2/Config.in b/openwrt/package/libxml2/Config.in deleted file mode 100644 index f4632eb068d..00000000000 --- a/openwrt/package/libxml2/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_LIBXML2 - prompt "libxml2........................... Gnome XML library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPTHREAD - select BR2_PACKAGE_ZLIB - help - A library for manipulating XML and HTML resources. - - http://xmlsoft.org/ - diff --git a/openwrt/package/libxml2/Makefile b/openwrt/package/libxml2/Makefile deleted file mode 100644 index c08d5fe8b23..00000000000 --- a/openwrt/package/libxml2/Makefile +++ /dev/null @@ -1,127 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libxml2 -PKG_VERSION:=2.6.20 -PKG_RELEASE:=1 -PKG_MD5SUM:=8f0b3ce721bda11401e656b90ba4e78c - -PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \ - ftp://fr.rpmfind.net/pub/libxml/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBXML2,libxml2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --without-c14n \ - --without-catalog \ - --without-debug \ - --without-docbook \ - --with-html \ - --without-ftp \ - --without-http \ - --without-iconv \ - --without-iso8859x \ - --without-legacy \ - --with-output \ - --without-pattern \ - --without-push \ - --without-python \ - --with-reader \ - --without-readline \ - --without-regexps \ - --with-sax1 \ - --with-schemas \ - --with-threads \ - --with-tree \ - --with-valid \ - --with-writer \ - --with-xinclude \ - --with-xpath \ - --with-xptr \ - --with-zlib \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBXML2): - install -m0755 -d $(IDIR_LIBXML2)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(IDIR_LIBXML2)/usr/lib/ - $(RSTRIP) $(IDIR_LIBXML2) - $(IPKG_BUILD) $(IDIR_LIBXML2) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libxml2.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir}/libxml2,,g' $(STAGING_DIR)/usr/bin/xml2-config - $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/bin/xml2-config - $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR)/usr/bin/xml2-config - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/bin/xml2-config - $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(STAGING_DIR)/usr/bin/xml2-config - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libxml2.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/xml2-config \ - $(STAGING_DIR)/usr/include/libxml2 \ - $(STAGING_DIR)/usr/lib/libxml2.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/libxml-2.0.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libxml2/ipkg/libxml2.control b/openwrt/package/libxml2/ipkg/libxml2.control deleted file mode 100644 index 92740918791..00000000000 --- a/openwrt/package/libxml2/ipkg/libxml2.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libxml2 -Priority: optional -Section: libs -Description: Gnome XML library -Depends: zlib diff --git a/openwrt/package/libxslt/Config.in b/openwrt/package/libxslt/Config.in deleted file mode 100644 index e4857fc12ea..00000000000 --- a/openwrt/package/libxslt/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LIBXSLT - prompt "libxslt........................... Gnome XSLT library" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBXML2 - help - A library for XML transformation using XSLT. - - http://xmlsoft.org/XSLT/ - diff --git a/openwrt/package/libxslt/Makefile b/openwrt/package/libxslt/Makefile deleted file mode 100644 index dc6544810f6..00000000000 --- a/openwrt/package/libxslt/Makefile +++ /dev/null @@ -1,107 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libxslt -PKG_VERSION:=1.1.14 -PKG_RELEASE:=1 -PKG_MD5SUM:=db71660bb7d01ccd4e6be990af8d813b - -PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \ - ftp://fr.rpmfind.net/pub/libxml/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBXSLT,libxslt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/libxml2" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - --with-libxml-prefix="$(STAGING_DIR)/usr" \ - --with-libxml-include-prefix="$(STAGING_DIR)/usr/include" \ - --with-libxml-libs-prefix="$(STAGING_DIR)/usr/lib" \ - --without-python \ - --without-crypto \ - --without-debug \ - --without-mem-debug \ - --without-debugger \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBXSLT): - install -m0755 -d $(IDIR_LIBXSLT)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(IDIR_LIBXSLT)/usr/lib/ - $(RSTRIP) $(IDIR_LIBXSLT) - $(IPKG_BUILD) $(IDIR_LIBXSLT) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libxslt.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libxslt $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/bin/xslt-config - $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR)/usr/bin/xslt-config - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/bin/xslt-config - $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(STAGING_DIR)/usr/bin/xslt-config - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libxslt.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/xslt-config \ - $(STAGING_DIR)/usr/include/libxslt \ - $(STAGING_DIR)/usr/lib/libxslt.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/libxslt/ipkg/libxslt.control b/openwrt/package/libxslt/ipkg/libxslt.control deleted file mode 100644 index 7236bb147ff..00000000000 --- a/openwrt/package/libxslt/ipkg/libxslt.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libxslt -Priority: optional -Section: libs -Description: Gnome XML library -Depends: libxml2 diff --git a/openwrt/package/lighttpd/Config.in b/openwrt/package/lighttpd/Config.in deleted file mode 100644 index a0839282410..00000000000 --- a/openwrt/package/lighttpd/Config.in +++ /dev/null @@ -1,106 +0,0 @@ -menu "lighttpd.......................... Flexible and lightweight web server" - -config BR2_PACKAGE_LIGHTTPD - prompt "lighttpd.......................... Flexible and lightweight web server" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_LIBPCRE - help - A flexible and lightweight web server. - - http://www.lighttpd.net/ - - Depends: libopenssl, libpcre - -config BR2_PACKAGE_LIGHTTPD_MOD_ACCESSLOG - prompt "lighttpd-mod-accesslog.......... Access logging module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_ALIAS - prompt "lighttpd-mod-alias.............. Directory alias module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_AUTH - prompt "lighttpd-mod-auth............... Authentication module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_CGI - prompt "lighttpd-mod-cgi................ CGI module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_EVASIVE - prompt "lighttpd-mod-evasive............ Evasive module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_EXPIRE - prompt "lighttpd-mod-expire............. Expire module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_FASTCGI - prompt "lighttpd-mod-fastcgi............ FastCGI module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_PROXY - prompt "lighttpd-mod-proxy.............. Proxy module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_REDIRECT - prompt "lighttpd-mod-redirect........... URL redirection module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_REWRITE - prompt "lighttpd-mod-rewrite............ URL rewriting module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_SETENV - prompt "lighttpd-mod-setenv............. Environment variable setting module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_SIMPLE_VHOST - prompt "lighttpd-mod-simple-vhost....... Simple virtual hosting module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_SSI - prompt "lighttpd-mod-ssi................ SSI module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_STATUS - prompt "lighttpd-mod-status............. Server status display module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -config BR2_PACKAGE_LIGHTTPD_MOD_USERTRACK - prompt "lighttpd-mod-usertrack.......... User tracking module" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIGHTTPD - -endmenu diff --git a/openwrt/package/lighttpd/Makefile b/openwrt/package/lighttpd/Makefile deleted file mode 100644 index d15efe4560e..00000000000 --- a/openwrt/package/lighttpd/Makefile +++ /dev/null @@ -1,131 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lighttpd -PKG_VERSION:=1.4.11 -PKG_RELEASE:=1 -PKG_MD5SUM:=f55eebb9815c94a7de35906bb557ecd3 - -PKG_SOURCE_URL:=http://www.lighttpd.net/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -define PKG_mod_template - -$$(IPKG_$(1)): - install -d -m0755 $$(IDIR_$(1))/usr/lib/lighttpd - install -m0755 $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$(2).so $$(IDIR_$(1))/usr/lib/lighttpd/ - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,LIGHTTPD,lighttpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_ACCESSLOG,lighttpd-mod-accesslog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_ALIAS,lighttpd-mod-alias,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_AUTH,lighttpd-mod-auth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_CGI,lighttpd-mod-cgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_EVASIVE,lighttpd-mod-evasive,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_EXPIRE,lighttpd-mod-expire,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_FASTCGI,lighttpd-mod-fastcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_PROXY,lighttpd-mod-proxy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_REDIRECT,lighttpd-mod-redirect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_REWRITE,lighttpd-mod-rewrite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_SETENV,lighttpd-mod-setenv,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_SIMPLE_VHOST,lighttpd-mod-simple-vhost,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_SSI,lighttpd-mod-ssi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_STATUS,lighttpd-mod-status,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIGHTTPD_MOD_USERTRACK,lighttpd-mod-usertrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_ACCESSLOG,accesslog)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_ALIAS,alias)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_AUTH,auth)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_CGI,cgi)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_EVASIVE,evasive)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_EXPIRE,expire)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_FASTCGI,fastcgi)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_PROXY,proxy)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_REDIRECT,redirect)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_REWRITE,rewrite)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_SETENV,setenv)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_SIMPLE_VHOST,simple_vhost)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_SSI,ssi)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_STATUS,status)) -$(eval $(call PKG_mod_template,LIGHTTPD_MOD_USERTRACK,usertrack)) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PCRE_LIB="-lpcre" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib/lighttpd \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/lighttpd \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --without-attr \ - --without-bzip2 \ - --without-fam \ - --without-gdbm \ - --without-ldap \ - --without-lua \ - --without-memcache \ - --without-mysql \ - --with-openssl="$(STAGING_DIR)/usr" \ - --with-pcre \ - --without-valgrind \ - --without-webdav-props \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIGHTTPD): - install -m0755 -d $(IDIR_LIGHTTPD)/etc - install -m0644 ./files/lighttpd.conf $(IDIR_LIGHTTPD)/etc/ - install -m0755 -d $(IDIR_LIGHTTPD)/etc/default - install -m0644 ./files/lighttpd.default $(IDIR_LIGHTTPD)/etc/default/lighttpd - install -m0755 -d $(IDIR_LIGHTTPD)/etc/init.d - install -m0755 ./files/lighttpd.init $(IDIR_LIGHTTPD)/etc/init.d/lighttpd - install -m0755 -d $(IDIR_LIGHTTPD)/usr/lib/lighttpd - for m in dirlisting indexfile staticfile; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \ - done - install -m0755 -d $(IDIR_LIGHTTPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin/ - $(RSTRIP) $(IDIR_LIGHTTPD) - $(IPKG_BUILD) $(IDIR_LIGHTTPD) $(PACKAGE_DIR) - diff --git a/openwrt/package/lighttpd/files/lighttpd.conf b/openwrt/package/lighttpd/files/lighttpd.conf deleted file mode 100644 index 6e5137740ed..00000000000 --- a/openwrt/package/lighttpd/files/lighttpd.conf +++ /dev/null @@ -1,217 +0,0 @@ -# lighttpd configuration file -# -## modules to load -# all other module should only be loaded if really neccesary -# - saves some time -# - saves memory -#server.modules = ( -# "mod_rewrite", -# "mod_redirect", -# "mod_alias", -# "mod_auth", -# "mod_status", -# "mod_setenv", -# "mod_fastcgi", -# "mod_proxy", -# "mod_simple_vhost", -# "mod_cgi", -# "mod_ssi", -# "mod_usertrack", -# "mod_expire" -#) - -## a static document-root, for virtual-hosting take look at the -## server.virtual-* options -server.document-root = "/www/" - -## where to send error-messages to -#server.errorlog = "/var/log/lighttpd/error.log" - -## files to check for if .../ is requested -index-file.names = ( "index.html", "default.html", "index.htm", "default.htm" ) - -## mimetype mapping -mimetype.assign = ( - ".pdf" => "application/pdf", - ".class" => "application/octet-stream", - ".pac" => "application/x-ns-proxy-autoconfig", - ".swf" => "application/x-shockwave-flash", - ".wav" => "audio/x-wav", - ".gif" => "image/gif", - ".jpg" => "image/jpeg", - ".jpeg" => "image/jpeg", - ".png" => "image/png", - ".css" => "text/css", - ".html" => "text/html", - ".htm" => "text/html", - ".js" => "text/javascript", - ".txt" => "text/plain", - ".dtd" => "text/xml", - ".xml" => "text/xml" - ) - -## Use the "Content-Type" extended attribute to obtain mime type if possible -#mimetypes.use-xattr = "enable" - -## send a different Server: header -## be nice and keep it at lighttpd -#server.tag = "lighttpd" - -$HTTP["url"] =~ "\.pdf$" { - server.range-requests = "disable" -} - -## -# which extensions should not be handle via static-file transfer -# -# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi -static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) - -######### Options that are good to be but not neccesary to be changed ####### - -## bind to port (default: 80) -#server.port = 81 - -## bind to localhost (default: all interfaces) -#server.bind = "localhost" - -## error-handler for status 404 -#server.error-handler-404 = "/error-handler.html" -#server.error-handler-404 = "/error-handler.php" - -## to help the rc.scripts -server.pid-file = "/var/run/lighttpd.pid" - - -###### virtual hosts -## -## If you want name-based virtual hosting add the next three settings and load -## mod_simple_vhost -## -## document-root = -## virtual-server-root + virtual-server-default-host + virtual-server-docroot or -## virtual-server-root + http-host + virtual-server-docroot -## -#simple-vhost.server-root = "/home/weigon/wwwroot/servers/" -#simple-vhost.default-host = "grisu.home.kneschke.de" -#simple-vhost.document-root = "/pages/" - - -## -## Format: .html -## -> ..../status-404.html for 'File not found' -#server.errorfile-prefix = "/www/error-" - -## virtual directory listings -#server.dir-listing = "enable" - -## send unhandled HTTP-header headers to error-log -#debug.dump-unknown-headers = "enable" - -### only root can use these options -# -# chroot() to directory (default: no chroot() ) -#server.chroot = "/" - -## change uid to (default: don't care) -#server.username = "nobody" - -## change uid to (default: don't care) -#server.groupname = "nobody" - -#### compress module -#compress.cache-dir = "/dev/null/" -#compress.filetype = ("text/plain", "text/html") - -#### proxy module -## read proxy.txt for more info -#proxy.server = ( -# ".php" => ( -# "localhost" => ( -# "host" => "192.168.0.101", -# "port" => 80 -# ) -# ) -#) - -#### fastcgi module -## read fastcgi.txt for more info -#fastcgi.server = ( -# ".php" => ( -# "localhost" => ( -# "socket" => "/tmp/php-fastcgi.socket", -# "bin-path" => "/usr/local/bin/php" -# ) -# ) -#) - -#### CGI module -#cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" ) - -#### SSL engine -#ssl.engine = "enable" -#ssl.pemfile = "server.pem" - -#### status module -#status.status-url = "/server-status" -#status.config-url = "/server-config" - -#### auth module -## read authentification.txt for more info -#auth.backend = "plain" -#auth.backend.plain.userfile = "lighttpd.user" -#auth.backend.plain.groupfile = "lighttpd.group" -#auth.require = ( -# "/server-status" => ( -# "method" => "digest", -# "realm" => "download archiv", -# "require" => "group=www|user=jan|host=192.168.2.10" -# ), -# "/server-info" => ( -# "method" => "digest", -# "realm" => "download archiv", -# "require" => "group=www|user=jan|host=192.168.2.10" -# ) -#) - -#### url handling modules (rewrite, redirect, access) -#url.rewrite = ( "^/$" => "/server-status" ) -#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" ) - -#### both rewrite/redirect support back reference to regex conditional using %n -#$HTTP["host"] =~ "^www\.(.*)" { -# url.redirect = ( "^/(.*)" => "http://%1/$1" ) -#} - -#### expire module -#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes") - -#### ssi -#ssi.extension = ( ".shtml" ) - -#### setenv -#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) -#setenv.add-response-header = ( "X-Secret-Message" => "42" ) - -#### variable usage: -## variable name without "." is auto prefixed by "var." and becomes "var.bar" -#bar = 1 -#var.mystring = "foo" - -## integer add -#bar += 1 -## string concat, with integer cast as string, result: "www.foo1.com" -#server.name = "www." + mystring + var.bar + ".com" -## array merge -#index-file.names = (foo + ".php") + index-file.names -#index-file.names += (foo + ".php") - -#### include -#include /etc/lighttpd/lighttpd-inc.conf -## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" -#include "lighttpd-inc.conf" - -#### include_shell -#include_shell "echo var.a=1" -## the above is same as: -#var.a=1 diff --git a/openwrt/package/lighttpd/files/lighttpd.default b/openwrt/package/lighttpd/files/lighttpd.default deleted file mode 100644 index 649571e640c..00000000000 --- a/openwrt/package/lighttpd/files/lighttpd.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="-f /etc/lighttpd.conf" \ No newline at end of file diff --git a/openwrt/package/lighttpd/files/lighttpd.init b/openwrt/package/lighttpd/files/lighttpd.init deleted file mode 100644 index ca7a3f97f59..00000000000 --- a/openwrt/package/lighttpd/files/lighttpd.init +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -BIN=lighttpd -DEFAULT=/etc/default/$BIN -LOG_D=/var/log/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $LOG_D - mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-accesslog.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-accesslog.control deleted file mode 100644 index 640122652c8..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-accesslog.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-accesslog -Priority: optional -Section: net -Description: an access logging module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-alias.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-alias.control deleted file mode 100644 index c1e12e37370..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-alias.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-alias -Priority: optional -Section: net -Description: a directory alias module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-auth.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-auth.control deleted file mode 100644 index 179501fbf55..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-auth.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-auth -Priority: optional -Section: net -Description: an authentication module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-cgi.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-cgi.control deleted file mode 100644 index 18c574a9b47..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-cgi.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-cgi -Priority: optional -Section: net -Description: a CGI module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-evasive.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-evasive.control deleted file mode 100644 index dd00165eaad..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-evasive.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-evasive -Priority: optional -Section: net -Description: Evasive module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-expire.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-expire.control deleted file mode 100644 index 8d5c5546c0b..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-expire.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-expire -Priority: optional -Section: net -Description: Expire module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-fastcgi.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-fastcgi.control deleted file mode 100644 index 123e9b63623..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-fastcgi.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-fastcgi -Priority: optional -Section: net -Description: FASTCGI module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-proxy.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-proxy.control deleted file mode 100644 index 5578d1a5371..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-proxy.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-proxy -Priority: optional -Section: net -Description: a proxy module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-redirect.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-redirect.control deleted file mode 100644 index 80f3a574c62..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-redirect.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-redirect -Priority: optional -Section: net -Description: an url redirection module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-rewrite.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-rewrite.control deleted file mode 100644 index 19c5b1a7699..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-rewrite.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-rewrite -Priority: optional -Section: net -Description: an url rewriting module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-setenv.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-setenv.control deleted file mode 100644 index 0506b7a4cd0..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-setenv.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-setenv -Priority: optional -Section: net -Description: an environment variable setting module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-simple-vhost.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-simple-vhost.control deleted file mode 100644 index 58550e12446..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-simple-vhost.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-simple-vhost -Priority: optional -Section: net -Description: a simple virtual hosting module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-ssi.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-ssi.control deleted file mode 100644 index 266d4ea688f..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-ssi.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-ssi -Priority: optional -Section: net -Description: SSI module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-status.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-status.control deleted file mode 100644 index 081d21c4e57..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-status.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-status -Priority: optional -Section: net -Description: a server status display module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd-mod-usertrack.control b/openwrt/package/lighttpd/ipkg/lighttpd-mod-usertrack.control deleted file mode 100644 index 32a0e79a08d..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd-mod-usertrack.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lighttpd-mod-usertrack -Priority: optional -Section: net -Description: an user tracking module for lighttpd -Depends: lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd.conffiles b/openwrt/package/lighttpd/ipkg/lighttpd.conffiles deleted file mode 100644 index 6c127a40893..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/lighttpd.conf -/etc/default/lighttpd -/etc/init.d/lighttpd diff --git a/openwrt/package/lighttpd/ipkg/lighttpd.control b/openwrt/package/lighttpd/ipkg/lighttpd.control deleted file mode 100644 index 3fdfcb0edf0..00000000000 --- a/openwrt/package/lighttpd/ipkg/lighttpd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: lighttpd -Priority: optional -Section: net -Description: a flexible and lightweight web server, - built with SSL support. -Depends: libopenssl, libpcre diff --git a/openwrt/package/lighttpd/patches/500-configure_cross.patch b/openwrt/package/lighttpd/patches/500-configure_cross.patch deleted file mode 100644 index 8f8099823fb..00000000000 --- a/openwrt/package/lighttpd/patches/500-configure_cross.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN lighttpd-1.4.2-old/configure lighttpd-1.4.2-new/configure ---- lighttpd-1.4.2-old/configure 2005-08-29 14:18:11.000000000 +0200 -+++ lighttpd-1.4.2-new/configure 2005-09-01 09:06:29.000000000 +0200 -@@ -23849,7 +23849,7 @@ - echo "$as_me:$LINENO: result: $WITH_PCRE" >&5 - echo "${ECHO_T}$WITH_PCRE" >&6 - --if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then -+if test "$WITH_PCRE" != "no"; then - # Extract the first word of "pcre-config", so it can be a program name with args. - set dummy pcre-config; ac_word=$2 - echo "$as_me:$LINENO: checking for $ac_word" >&5 -diff -ruN lighttpd-1.4.2-old/configure.in lighttpd-1.4.2-new/configure.in ---- lighttpd-1.4.2-old/configure.in 2005-08-29 14:06:03.000000000 +0200 -+++ lighttpd-1.4.2-new/configure.in 2005-09-01 09:05:39.000000000 +0200 -@@ -222,7 +222,7 @@ - [WITH_PCRE=$withval],[WITH_PCRE=yes]) - AC_MSG_RESULT([$WITH_PCRE]) - --if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then -+if test "$WITH_PCRE" != "no"; then - AC_PATH_PROG(PCRECONFIG, pcre-config) - - if test x"$PCRECONFIG" != x; then diff --git a/openwrt/package/logrotate/Config.in b/openwrt/package/logrotate/Config.in deleted file mode 100644 index 7a210b7266c..00000000000 --- a/openwrt/package/logrotate/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LOGROTATE - prompt "logrotate......................... rotates, compresses, and mails system logs" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPOPT - help - logrotate is designed to ease administration of systems that generate - large numbers of log files. It allows auto-matic rotation, compression, - removal, and mailing of log files. Each log file may be handled - daily, weekly,monthly, or when it grows too large. diff --git a/openwrt/package/logrotate/Makefile b/openwrt/package/logrotate/Makefile deleted file mode 100644 index e08e1643e12..00000000000 --- a/openwrt/package/logrotate/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=logrotate -PKG_VERSION:=3.7.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=552639142e163745f6bcd4f1f3816d8a - -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/logrotate -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LOGROTATE,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - touch $@ - -$(PKG_BUILD_DIR)/.built: - make -C ${PKG_BUILD_DIR} \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - CC=$(TARGET_CC) logrotate - touch $@ - -$(IPKG_LOGROTATE): - mkdir -p $(IDIR_LOGROTATE)/usr/sbin - $(CP) ${PKG_BUILD_DIR}/logrotate $(IDIR_LOGROTATE)/usr/sbin - mkdir -p $(IDIR_LOGROTATE)/etc/logrotate.d - $(CP) ./files/logrotate.conf $(IDIR_LOGROTATE)/etc - $(RSTRIP) $(IDIR_LOGROTATE) - $(IPKG_BUILD) $(IDIR_LOGROTATE) $(PACKAGE_DIR) - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/logrotate/files/logrotate.conf b/openwrt/package/logrotate/files/logrotate.conf deleted file mode 100644 index 9a91db94f30..00000000000 --- a/openwrt/package/logrotate/files/logrotate.conf +++ /dev/null @@ -1,30 +0,0 @@ -# rotate log files weekly -weekly -#daily - -# keep 4 weeks worth of backlogs -rotate 4 - -# create new (empty) log files after rotating old ones -create - -notifempty -nomail -#olddir /var/log/backup/ -missingok -#dateext - -# uncomment this if you want your log files compressed -#compress - -# packages can drop log rotation information into this directory -include /etc/logrotate.d - -# no packages own lastlog or wtmp -- we'll rotate them here -#/var/log/wtmp { -# monthly -# create 0664 root utmp -# rotate 1 -#} - -# system-specific logs may be also be configured here. diff --git a/openwrt/package/logrotate/ipkg/logrotate.control b/openwrt/package/logrotate/ipkg/logrotate.control deleted file mode 100644 index 1c984e58f61..00000000000 --- a/openwrt/package/logrotate/ipkg/logrotate.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: logrotate -Priority: optional -Section: misc -Depends: libpopt -Source: http://ftp.debian.org/debian/pool/main/l/logrotate -Description: logrotate is designed to ease administration of systems that generate large numbers of log files. diff --git a/openwrt/package/logrotate/patches/logrotate-3.7.1-dateext-maxage.patch b/openwrt/package/logrotate/patches/logrotate-3.7.1-dateext-maxage.patch deleted file mode 100644 index 1623b4bf128..00000000000 --- a/openwrt/package/logrotate/patches/logrotate-3.7.1-dateext-maxage.patch +++ /dev/null @@ -1,433 +0,0 @@ -diff -u -ruN logrotate-3.7.1.orig/config.c logrotate-3.7.1/config.c ---- logrotate-3.7.1.orig/config.c 2003-08-07 07:13:14.000000000 -0400 -+++ logrotate-3.7.1/config.c 2005-05-24 12:21:09.000000000 -0400 -@@ -511,6 +511,14 @@ - newlog->flags &= ~LOG_FLAG_IFEMPTY; - - *endtag = oldchar, start = endtag; -+ } else if (!strcmp(start, "dateext")) { -+ newlog->flags |= LOG_FLAG_DATEEXT; -+ -+ *endtag = oldchar, start = endtag; -+ } else if (!strcmp(start, "nodateext")) { -+ newlog->flags &= ~LOG_FLAG_DATEEXT; -+ -+ *endtag = oldchar, start = endtag; - } else if (!strcmp(start, "noolddir")) { - newlog->oldDir = NULL; - -@@ -670,6 +678,21 @@ - } - *endtag = oldchar, start = endtag; - } -+ } else if (!strcmp(start, "maxage")) { -+ *endtag = oldchar, start = endtag; -+ -+ if (!isolateValue(configFile, lineNum, "maxage count", &start, -+ &endtag)) { -+ oldchar = *endtag, *endtag = '\0'; -+ -+ newlog->rotateAge = strtoul(start, &chptr, 0); -+ if (*chptr || newlog->rotateAge < 0) { -+ message(MESS_ERROR, "%s:%d bad maximum age '%s'\n", -+ configFile, lineNum, start); -+ return 1; -+ } -+ *endtag = oldchar, start = endtag; -+ } - } else if (!strcmp(start, "errors")) { - message(MESS_DEBUG, "%s: %d: the errors directive is deprecated and no longer used.\n", - configFile, lineNum); -diff -u -ruN logrotate-3.7.1.orig/logrotate.8 logrotate-3.7.1/logrotate.8 ---- logrotate-3.7.1.orig/logrotate.8 2003-08-07 07:13:14.000000000 -0400 -+++ logrotate-3.7.1/logrotate.8 2005-05-24 12:21:09.000000000 -0400 -@@ -200,6 +200,11 @@ - Log files are rotated every day. - - .TP -+\fBdateext\fR -+Archive old versions of log files adding a daily extension like YYYYMMDD -+instead of simply adding a number. -+ -+.TP - \fBdelaycompress\fR - Postpone compression of the previous log file to the next rotation cycle. - This has only effect when used in combination with \fBcompress\fR. -@@ -246,6 +251,12 @@ - instead of the just-rotated file (this is the default). - - .TP -+\fBmaxage\fR \fIcount\fR -+Remove rotated logs older than days. The age is only checked -+if the logfile is to be rotated. The files are mailed to the -+configured address if \fBmaillast\fR and \fBmail\fR are configured. -+ -+.TP - \fBmissingok\fR - If the log file is missing, go on to the next one without issuing an error - message. See also \fBnomissingok\fR. -diff -u -ruN logrotate-3.7.1.orig/logrotate.c logrotate-3.7.1/logrotate.c ---- logrotate-3.7.1.orig/logrotate.c 2004-10-19 17:41:24.000000000 -0400 -+++ logrotate-3.7.1/logrotate.c 2005-05-24 12:21:09.000000000 -0400 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #ifdef WITH_SELINUX - #include -@@ -22,6 +23,10 @@ - #include "log.h" - #include "logrotate.h" - -+#if !defined(GLOB_ABORTED) && defined(GLOB_ABEND) -+#define GLOB_ABORTED GLOB_ABEND -+#endif -+ - typedef struct { - char * fn; - struct tm lastRotated; /* only tm.mon, tm_mday, tm_year are good! */ -@@ -42,6 +47,14 @@ - char * mailCommand = DEFAULT_MAIL_COMMAND; - time_t nowSecs = 0; - -+static int globerr(const char * pathname, int theerr) { -+ message(MESS_ERROR, "error accessing %s: %s\n", pathname, -+ strerror(theerr)); -+ -+ /* We want the glob operation to continue, so return 0 */ -+ return 1; -+} -+ - static logState * findState(const char * fn, struct stateSet * sip) { - int i; - logState * states = sip->states; -@@ -49,9 +62,11 @@ - struct tm now = *localtime(&nowSecs); - time_t lr_time; - -+ /* find the filename fn in the statesPtr list */ - for (i = 0; i < numStates; i++) - if (!strcmp(fn, states[i].fn)) break; - -+ /* not in statesPtr list, so add new entry */ - if (i == numStates) { - i = numStates++; - states = realloc(states, sizeof(*states) * numStates); -@@ -121,6 +136,17 @@ - return rc; - } - -+static int removeLogFile(char * name) { -+ message(MESS_DEBUG, "removing old log %s\n", name); -+ -+ if (!debug && unlink(name)) { -+ message(MESS_ERROR, "Failed to remove old log %s: %s\n", -+ name, strerror(errno)); -+ return 1; -+ } -+ return 0; -+} -+ - static int compressLogFile(char * name, logInfo * log, struct stat *sb) { - char * compressedName; - const char ** fullCommand; -@@ -265,6 +291,25 @@ - return rc; - } - -+static int mailLogWrapper (char * mailFilename, char * mailCommand, int logNum, logInfo * log) { -+ /* if the log is compressed (and we're not mailing a -+ * file whose compression has been delayed), we need -+ * to uncompress it */ -+ if ((log->flags & LOG_FLAG_COMPRESS) && -+ !((log->flags & LOG_FLAG_DELAYCOMPRESS) && -+ (log->flags & LOG_FLAG_MAILFIRST))) { -+ if (mailLog(mailFilename, mailCommand, -+ log->uncompress_prog, log->logAddress, -+ log->files[logNum])) -+ return 1; -+ } else { -+ if (mailLog(mailFilename, mailCommand, NULL, -+ log->logAddress, mailFilename)) -+ return 1; -+ } -+ return 0; -+} -+ - static int copyTruncate(char * currLog, char * saveLog, struct stat * sb, int flags) { - char buf[BUFSIZ]; - int fdcurr = -1, fdsave = -1; -@@ -479,6 +524,9 @@ - char * baseName; - char * dirName; - char * firstRotated; -+ char * glob_pattern; -+ glob_t globResult; -+ int rc; - size_t alloc_size; - int rotateCount = log->rotateCount ? log->rotateCount : 1; - int logStart = (log->logStart == -1) ? 1 : log->logStart; -@@ -509,7 +557,7 @@ - - alloc_size = strlen(dirName) + strlen(baseName) + - strlen(log->files[logNum]) + strlen(fileext) + -- strlen(compext) + 10; -+ strlen(compext) + 18; - - oldName = alloca(alloc_size); - newName = alloca(alloc_size); -@@ -531,16 +579,116 @@ - /* First compress the previous log when necessary */ - if (log->flags & LOG_FLAG_COMPRESS && - log->flags & LOG_FLAG_DELAYCOMPRESS) { -- struct stat sbprev; -- -- sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -- if (stat(oldName, &sbprev)) { -- message(MESS_DEBUG, "previous log %s does not exist\n", -- oldName); -- } else { -- hasErrors = compressLogFile(oldName, log, &sbprev); -+ if (log->flags & LOG_FLAG_DATEEXT) { -+ /* glob for uncompressed files with our pattern */ -+ glob_pattern = malloc(strlen(dirName) + strlen(baseName) -+ + strlen(fileext) + 44 ); -+ sprintf(glob_pattern, -+ "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s", -+ dirName, baseName, fileext); -+ rc = glob(glob_pattern, 0, globerr, &globResult); -+ if (!rc && globResult.gl_pathc > 0) { -+ for (i = 0; i < globResult.gl_pathc && !hasErrors; i++) { -+ struct stat sbprev; -+ sprintf(oldName,"%s",(globResult.gl_pathv)[i]); -+ if (stat(oldName, &sbprev)) { -+ message(MESS_DEBUG, "previous log %s does not exist\n", oldName); -+ } else { -+ hasErrors = compressLogFile(oldName, log, &sbprev); -+ } -+ } -+ } else { -+ message (MESS_DEBUG, "glob finding logs to compress failed\n"); -+ /* fallback to old behaviour */ -+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -+ } -+ globfree(&globResult); -+ free(glob_pattern); -+ } else { -+ struct stat sbprev; -+ -+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -+ if (stat(oldName, &sbprev)) { -+ message(MESS_DEBUG, "previous log %s does not exist\n", -+ oldName); -+ } else { -+ hasErrors = compressLogFile(oldName, log, &sbprev); -+ } - } - } -+ -+ firstRotated = alloca(strlen(dirName) + strlen(baseName) + -+ strlen(fileext) + strlen(compext) + 30); -+ -+ if(log->flags & LOG_FLAG_DATEEXT) { -+ /* glob for compressed files with our pattern -+ * and compress ext */ -+ glob_pattern = malloc(strlen(dirName)+strlen(baseName) -+ +strlen(fileext)+strlen(compext)+44); -+ sprintf(glob_pattern, -+ "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s%s", -+ dirName, baseName, fileext, compext); -+ rc = glob(glob_pattern, 0, globerr, &globResult); -+ if (!rc) { -+ /* search for files to drop, if we find one remember it, -+ * if we find another one mail and remove the first and -+ * remember the second and so on */ -+ struct stat fst_buf; -+ int mail_out = -1; -+ /* remove the first (n - rotateCount) matches -+ * no real rotation needed, since the files have -+ * the date in their name */ -+ for (i = 0; i < globResult.gl_pathc; i++) { -+ if( !stat((globResult.gl_pathv)[i],&fst_buf) ) { -+ if ((i <= ((int)globResult.gl_pathc - rotateCount)) -+ || ((log->rotateAge > 0) -+ && (((nowSecs - fst_buf.st_mtime)/60/60/24) -+ > log->rotateAge))) { -+ if ( mail_out != -1 ) { -+ if (!hasErrors && log->logAddress) { -+ char * mailFilename = (globResult.gl_pathv)[mail_out]; -+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log); -+ if (!hasErrors) -+ hasErrors = removeLogFile(mailFilename); -+ } -+ } -+ mail_out = i; -+ } -+ } -+ } -+ if ( mail_out != -1 ) { -+ /* oldName is oldest Backup found (for unlink later) */ -+ sprintf(oldName, "%s", (globResult.gl_pathv)[mail_out]); -+ strcpy(disposeName, oldName); -+ } else -+ disposeName = NULL; -+ } else { -+ message (MESS_DEBUG, "glob finding old rotated logs failed\n"); -+ disposeName = NULL; -+ } -+ /* firstRotated is most recently created/compressed rotated log */ -+ sprintf(firstRotated, "%s/%s-%04d%02d%02d%s%s", -+ dirName, baseName, now.tm_year+1900, -+ now.tm_mon+1, now.tm_mday, fileext, compext); -+ globfree(&globResult); -+ free(glob_pattern); -+ } else { -+ if ( log->rotateAge ) { -+ struct stat fst_buf; -+ for (i=1; i <= rotateCount; i++) { -+ sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName, -+ rotateCount + 1, fileext, compext); -+ if(!stat(oldName,&fst_buf) -+ && (((nowSecs - fst_buf.st_mtime)/60/60/24) -+ > log->rotateAge)) { -+ char * mailFilename = (globResult.gl_pathv)[i]; -+ if (!hasErrors && log->logAddress) -+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log); -+ if (!hasErrors) -+ hasErrors = removeLogFile(mailFilename); -+ } -+ } -+ } - - sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName, - logStart + rotateCount, fileext, compext); -@@ -548,8 +696,6 @@ - - strcpy(disposeName, oldName); - -- firstRotated = alloca(strlen(dirName) + strlen(baseName) + -- strlen(fileext) + strlen(compext) + 30); - sprintf(firstRotated, "%s/%s.%d%s%s", dirName, baseName, - logStart, fileext, - (log->flags & LOG_FLAG_DELAYCOMPRESS) ? "" : compext); -@@ -600,12 +746,27 @@ - } - } - } -- -+ } /* !LOG_FLAG_DATEEXT */ -+ - finalName = oldName; -- -- /* note: the gzip extension is *not* used here! */ -- sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -- -+ -+ if(log->flags & LOG_FLAG_DATEEXT) { -+ char * destFile = alloca(strlen(dirName) + strlen(baseName) + -+ strlen(fileext) + strlen(compext) + 30); -+ struct stat fst_buf; -+ sprintf(finalName, "%s/%s-%04d%02d%02d%s", -+ dirName, baseName, now.tm_year+1900, -+ now.tm_mon+1, now.tm_mday, fileext); -+ sprintf(destFile, "%s%s", finalName, compext); -+ if(!stat(destFile,&fst_buf)) { -+ message (MESS_DEBUG, "destination %s already exists, skipping rotation\n", firstRotated); -+ hasErrors = 1; -+ } -+ } else { -+ /* note: the gzip extension is *not* used here! */ -+ sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext); -+ } -+ - /* if the last rotation doesn't exist, that's okay */ - if (!debug && access(disposeName, F_OK)) { - message(MESS_DEBUG, "log %s doesn't exist -- won't try to " -@@ -613,9 +774,6 @@ - disposeName = NULL; - } - -- free(dirName); -- free(baseName); -- - if (!hasErrors) { - if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) { - message(MESS_DEBUG, "running prerotate script\n"); -@@ -722,33 +880,12 @@ - else - mailFilename = disposeName; - -- if (mailFilename) { -- /* if the log is compressed (and we're not mailing a -- file whose compression has been delayed), we need -- to uncompress it */ -- if ((log->flags & LOG_FLAG_COMPRESS) && -- !((log->flags & LOG_FLAG_DELAYCOMPRESS) && -- (log->flags & LOG_FLAG_MAILFIRST))) { -- if (mailLog(mailFilename, mailCommand, -- log->uncompress_prog, log->logAddress, -- log->files[logNum])) -- hasErrors = 1; -- } else { -- if (mailLog(mailFilename, mailCommand, NULL, -- log->logAddress, mailFilename)) -- hasErrors = 1; -- } -- } -+ if (mailFilename) -+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log); - } - - if (!hasErrors && disposeName) { -- message(MESS_DEBUG, "removing old log %s\n", disposeName); -- -- if (!debug && unlink(disposeName)) { -- message(MESS_ERROR, "Failed to remove old log %s: %s\n", -- disposeName, strerror(errno)); -- hasErrors = 1; -- } -+ hasErrors = removeLogFile(disposeName); - } - } - -@@ -761,6 +898,8 @@ - } - } - #endif -+ free(dirName); -+ free(baseName); - return hasErrors; - } - -@@ -1047,7 +1186,9 @@ - - int main(int argc, const char ** argv) { - logInfo defConfig = { NULL, NULL, 0, NULL, ROT_SIZE, -- /* threshHold */ 1024 * 1024, 0, -+ /* threshHold */ 1024 * 1024, -+ /* rotateCount */ 0, -+ /* rotateAge */ 0, - /* log start */ -1, - /* pre, post */ NULL, NULL, - /* first, last */ NULL, NULL, -diff -u -ruN logrotate-3.7.1.orig/logrotate.h logrotate-3.7.1/logrotate.h ---- logrotate-3.7.1.orig/logrotate.h 2003-08-07 07:13:14.000000000 -0400 -+++ logrotate-3.7.1/logrotate.h 2005-05-24 12:21:09.000000000 -0400 -@@ -15,6 +15,7 @@ - #define LOG_FLAG_MAILFIRST (1 << 6) - #define LOG_FLAG_SHAREDSCRIPTS (1 << 7) - #define LOG_FLAG_COPY (1 << 8) -+#define LOG_FLAG_DATEEXT (1 << 9) - - #define NO_FORCE_ROTATE 0 - #define FORCE_ROTATE 1 -@@ -34,6 +35,7 @@ - enum { ROT_DAYS, ROT_WEEKLY, ROT_MONTHLY, ROT_SIZE, ROT_FORCE } criterium; - unsigned int threshhold; - int rotateCount; -+ int rotateAge; - int logStart; - char * pre, * post, * first, * last; - char * logAddress; diff --git a/openwrt/package/logrotate/patches/logrotate-3.7.1-datehack.patch b/openwrt/package/logrotate/patches/logrotate-3.7.1-datehack.patch deleted file mode 100644 index 69121aafa9a..00000000000 --- a/openwrt/package/logrotate/patches/logrotate-3.7.1-datehack.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -ruN logrotate-3.7.1.orig/logrotate.c logrotate-3.7.1/logrotate.c ---- logrotate-3.7.1.orig/logrotate.c 2004-10-19 17:41:24.000000000 -0400 -+++ logrotate-3.7.1/logrotate.c 2005-05-24 12:12:26.000000000 -0400 -@@ -1002,7 +1002,7 @@ - } - - /* Hack to hide earlier bug */ -- if ((year != 1900) && (year < 1996 || year > 2100)) { -+ if ((year != 1900) && (year < 1970 || year > 2100)) { - message(MESS_ERROR, "bad year %d for file %s in state file %s\n", - year, argv[0], stateFilename); - fclose(f); diff --git a/openwrt/package/logrotate/patches/logrotate-3.7.1-ignore-hidden.patch b/openwrt/package/logrotate/patches/logrotate-3.7.1-ignore-hidden.patch deleted file mode 100644 index 390de7537c6..00000000000 --- a/openwrt/package/logrotate/patches/logrotate-3.7.1-ignore-hidden.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- logrotate-3.7/config.c.orig 2005-04-26 22:57:53.000000000 -0400 -+++ logrotate-3.7/config.c 2005-04-26 22:59:36.000000000 -0400 -@@ -142,6 +142,11 @@ - (!fname[1] || (fname[1] == '.' && !fname[2]))) - return 0; - -+ /* Don't include 'hidden' files either; this breaks Gentoo -+ portage config file management http://bugs.gentoo.org/87683 */ -+ if (fname[0] == '.') -+ return 0; -+ - /* Check if fname is ending in a taboo-extension; if so, return - false */ - for (i = 0; i < tabooCount; i++) { diff --git a/openwrt/package/logrotate/patches/logrotate-3.7.1-no-tmpdir.patch b/openwrt/package/logrotate/patches/logrotate-3.7.1-no-tmpdir.patch deleted file mode 100644 index fb95f1ee3e8..00000000000 --- a/openwrt/package/logrotate/patches/logrotate-3.7.1-no-tmpdir.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -u -ruN logrotate-3.7.1-cur/logrotate.c logrotate-3.7.1/logrotate.c ---- logrotate-3.7.1-cur/logrotate.c 2005-05-25 18:20:41.000000000 -0400 -+++ logrotate-3.7.1/logrotate.c 2005-05-25 18:21:10.000000000 -0400 -@@ -90,10 +90,7 @@ - } - - static int runScript(char * logfn, char * script) { -- int fd; -- char *filespec; - int rc; -- char buf[256]; - - if (debug) { - message(MESS_DEBUG, "running script with arg %s: \"%s\"\n", -@@ -101,38 +98,12 @@ - return 0; - } - -- filespec = buf; -- snprintf(buf, sizeof(buf), "%s/logrotate.XXXXXX", getenv("TMPDIR") ?: "/tmp"); -- fd = -1; -- if (!filespec || (fd = mkstemp(filespec)) < 0 || fchmod(fd, 0700)) { -- message(MESS_DEBUG, "error creating %s: %s\n", filespec, -- strerror(errno)); -- if (fd >= 0) { -- close(fd); -- unlink(filespec); -- } -- return -1; -- } -- -- if (write(fd, "#!/bin/sh\n\n", 11) != 11 || -- write(fd, script, strlen(script)) != strlen(script)) { -- message(MESS_DEBUG, "error writing %s\n", filespec); -- close(fd); -- unlink(filespec); -- return -1; -- } -- -- close(fd); -- - if (!fork()) { -- execlp(filespec, filespec, logfn, NULL); -+ execl("/bin/sh", "sh", "-c", script, NULL); - exit(1); - } - - wait(&rc); -- -- unlink(filespec); -- - return rc; - } - diff --git a/openwrt/package/logrotate/patches/logrotate-3.7.1-taboo-to-debug.patch b/openwrt/package/logrotate/patches/logrotate-3.7.1-taboo-to-debug.patch deleted file mode 100644 index 2e07188f5ad..00000000000 --- a/openwrt/package/logrotate/patches/logrotate-3.7.1-taboo-to-debug.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -ruN logrotate-3.7.1.orig/config.c logrotate-3.7.1/config.c ---- logrotate-3.7.1.orig/config.c 2003-08-07 07:13:14.000000000 -0400 -+++ logrotate-3.7.1/config.c 2005-05-24 12:13:41.000000000 -0400 -@@ -147,7 +147,7 @@ - for (i = 0; i < tabooCount; i++) { - if (!strcmp(fname + strlen(fname) - strlen(tabooExts[i]), - tabooExts[i])) { -- message(MESS_ERROR, "Ignoring %s, because of %s " -+ message(MESS_DEBUG, "Ignoring %s, because of %s " - "ending\n", fname, tabooExts[i]); - - return 0; diff --git a/openwrt/package/logrotate/patches/logrotate-3.7.1-weekly.patch b/openwrt/package/logrotate/patches/logrotate-3.7.1-weekly.patch deleted file mode 100644 index 8a371e8e003..00000000000 --- a/openwrt/package/logrotate/patches/logrotate-3.7.1-weekly.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- logrotate-3.7.1-old/logrotate.c 2004-10-19 23:41:24.000000000 +0200 -+++ logrotate-3.7.1-new/logrotate.c 2005-10-02 17:29:22.380767321 +0200 -@@ -424,12 +424,15 @@ int findNeedRotating(logInfo * log, int - switch (log->criterium) { - case ROT_WEEKLY: - /* rotate if: -- 1) the current weekday is before the weekday of the -- last rotation -+ 1) the day of the week is the same as the day of the week of -+ the previous rotation but not the same day of the year -+ this will rotate it on the same day every week, but not -+ twice a day. - 2) more then a week has passed since the last - rotation */ -- state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) || -- ((mktime(&now) - mktime(&state->lastRotated)) > -+ state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday && -+ now.tm_yday != state->lastRotated.tm_yday) || -+ ((mktime(&now) - mktime(&state->lastRotated)) > - (7 * 24 * 3600))); - break; - case ROT_MONTHLY: diff --git a/openwrt/package/lrzsz/Config.in b/openwrt/package/lrzsz/Config.in deleted file mode 100644 index 5398990946a..00000000000 --- a/openwrt/package/lrzsz/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_LRZSZ - prompt "lrsz.............................. X,Y and Z-modem protocols" - tristate - default m if CONFIG_DEVEL - help - Transfer files in your login sessions. - Very leightweight ans straight forward. - You just need a terminal client that can do - either X, Y or Z-modem file transfers. - - http://www.ohse.de/uwe/software/lrzsz.html diff --git a/openwrt/package/lrzsz/Makefile b/openwrt/package/lrzsz/Makefile deleted file mode 100644 index bc4fb112bff..00000000000 --- a/openwrt/package/lrzsz/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lrzsz -PKG_VERSION:=0.12.20 -PKG_RELEASE:=1 -PKG_MD5SUM:=b5ce6a74abc9b9eb2af94dffdfd372a4 - -PKG_SOURCE_URL:=http://www.ohse.de/uwe/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LRZSZ,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --without-libiconv-prefix \ - --without-libintl-prefix \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LRZSZ): - install -d -m0755 $(IDIR_LRZSZ)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/lrz $(IDIR_LRZSZ)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/lsz $(IDIR_LRZSZ)/usr/bin/ - (cd $(IDIR_LRZSZ)/usr/bin; \ - ln -fs lrz lrx; \ - ln -fs lrz lrb; \ - ln -fs lsz lsx; \ - ln -fs lsz lsb; \ - ); - $(RSTRIP) $(IDIR_LRZSZ) - $(IPKG_BUILD) $(IDIR_LRZSZ) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/lrzsz/ipkg/lrzsz.control b/openwrt/package/lrzsz/ipkg/lrzsz.control deleted file mode 100644 index 3e6344bab89..00000000000 --- a/openwrt/package/lrzsz/ipkg/lrzsz.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lrzsz -Priority: optional -Section: communications -Source: http://www.ohse.de/uwe/software/lrzsz.html -Description: X-Modem, Y-modem, Z-modem protocol handlers. Transfer files in a terminal session. You just need a terminal client that supports x,y or z-modem diff --git a/openwrt/package/lua/Config.in b/openwrt/package/lua/Config.in deleted file mode 100644 index fc258264be2..00000000000 --- a/openwrt/package/lua/Config.in +++ /dev/null @@ -1,111 +0,0 @@ -menu "lua............................... LUA programming language" - -config BR2_COMPILE_LUA - tristate - default n - depends BR2_PACKAGE_LIBLUA - -config BR2_PACKAGE_LIBLUA - prompt "liblua............................ LUA programming language shared libraries" - tristate - select BR2_COMPILE_LUA - help - Lua is a powerful light-weight programming language designed for extending - applications. Lua is also frequently used as a general-purpose, stand-alone - language. Lua is free software. - - Lua combines simple procedural syntax with powerful data description - constructs based on associative arrays and extensible semantics. Lua is - dynamically typed, interpreted from bytecodes, and has automatic memory - management with garbage collection, making it ideal for configuration, - scripting, and rapid prototyping. - - Lua is implemented as a small library of C functions, written in ANSI C, and - compiles unmodified in all known platforms. The implementation goals are - simplicity, efficiency, portability, and low embedding cost. The result is a - fast language engine with small footprint, making it ideal in embedded systems - too. - - http://www.lua.org/ - - This package contains the LUA shared libraries, needed by other programs. - -config BR2_PACKAGE_LUA - prompt "lua............................... LUA programming language interpreter" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBLUA - help - Lua is a powerful light-weight programming language designed for extending - applications. Lua is also frequently used as a general-purpose, stand-alone - language. Lua is free software. - - Lua combines simple procedural syntax with powerful data description - constructs based on associative arrays and extensible semantics. Lua is - dynamically typed, interpreted from bytecodes, and has automatic memory - management with garbage collection, making it ideal for configuration, - scripting, and rapid prototyping. - - Lua is implemented as a small library of C functions, written in ANSI C, and - compiles unmodified in all known platforms. The implementation goals are - simplicity, efficiency, portability, and low embedding cost. The result is a - fast language engine with small footprint, making it ideal in embedded systems - too. - - http://www.lua.org/ - - This package contains the LUA language interpreter. - -config BR2_PACKAGE_LUAC - prompt "luac.............................. LUA programming language compiler" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBLUA - help - Lua is a powerful light-weight programming language designed for extending - applications. Lua is also frequently used as a general-purpose, stand-alone - language. Lua is free software. - - Lua combines simple procedural syntax with powerful data description - constructs based on associative arrays and extensible semantics. Lua is - dynamically typed, interpreted from bytecodes, and has automatic memory - management with garbage collection, making it ideal for configuration, - scripting, and rapid prototyping. - - Lua is implemented as a small library of C functions, written in ANSI C, and - compiles unmodified in all known platforms. The implementation goals are - simplicity, efficiency, portability, and low embedding cost. The result is a - fast language engine with small footprint, making it ideal in embedded systems - too. - - http://www.lua.org/ - - This package contains the LUA language compiler. - -config BR2_PACKAGE_LUA_EXAMPLES - prompt "lua-examples...................... LUA programming language examples" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LUA - help - Lua is a powerful light-weight programming language designed for extending - applications. Lua is also frequently used as a general-purpose, stand-alone - language. Lua is free software. - - Lua combines simple procedural syntax with powerful data description - constructs based on associative arrays and extensible semantics. Lua is - dynamically typed, interpreted from bytecodes, and has automatic memory - management with garbage collection, making it ideal for configuration, - scripting, and rapid prototyping. - - Lua is implemented as a small library of C functions, written in ANSI C, and - compiles unmodified in all known platforms. The implementation goals are - simplicity, efficiency, portability, and low embedding cost. The result is a - fast language engine with small footprint, making it ideal in embedded systems - too. - - http://www.lua.org/ - - This package contains LUA language examples. - -endmenu diff --git a/openwrt/package/lua/Makefile b/openwrt/package/lua/Makefile deleted file mode 100644 index ae6d085cf91..00000000000 --- a/openwrt/package/lua/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua -PKG_VERSION:=5.0.2 -PKG_RELEASE:=1 -PKG_MD5SUM:= dea74646b7e5c621fef7174df83c34b1 - -PKG_SOURCE_URL:=http://www.lua.org/ftp/ \ - http://ftp.gwdg.de/pub/languages/lua/ \ - http://mirrors.dotsrc.org/lua/ \ - http://www.tecgraf.puc-rio.br/lua/ftp/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBLUA,liblua,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LUA,lua,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LUAC,luac,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LUA_EXAMPLES,lua-examples,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CROSS)gcc" \ - LD="$(TARGET_CROSS)ld" \ - AR="$(TARGET_CROSS)ar rcu" \ - RANLIB="$(TARGET_CROSS)ranlib" \ - INSTALL_ROOT=/usr \ - MYCFLAGS="-I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \ - MYLDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - all so - # remove statically linked binaries, so that they will get linked against shlib this time - rm -f $(PKG_BUILD_DIR)/bin/lua{,c} - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CROSS)gcc" \ - LD="$(TARGET_CROSS)ld" \ - AR="$(TARGET_CROSS)ar rcu" \ - RANLIB="$(TARGET_CROSS)ranlib" \ - INSTALL_ROOT=/usr \ - MYCFLAGS="-I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \ - MYLDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - all - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - INSTALL_ROOT="$(PKG_INSTALL_DIR)/usr" \ - install soinstall - touch $@ - -$(IPKG_LIBLUA): - install -d -m0755 $(IDIR_LIBLUA)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.so.* $(IDIR_LIBLUA)/usr/lib/ - $(RSTRIP) $(IDIR_LIBLUA) - $(IPKG_BUILD) $(IDIR_LIBLUA) $(PACKAGE_DIR) - -$(IPKG_LUA): - install -d -m0755 $(IDIR_LUA)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/lua $(IDIR_LUA)/usr/bin/ - $(RSTRIP) $(IDIR_LUA) - $(IPKG_BUILD) $(IDIR_LUA) $(PACKAGE_DIR) - -$(IPKG_LUAC): - install -d -m0755 $(IDIR_LUAC)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/luac $(IDIR_LUAC)/usr/bin/ - $(RSTRIP) $(IDIR_LUAC) - $(IPKG_BUILD) $(IDIR_LUAC) $(PACKAGE_DIR) - -$(IPKG_LUA_EXAMPLES): - install -d -m0755 $(IDIR_LUA_EXAMPLES)/usr/share/lua/examples - install -m0644 $(PKG_BUILD_DIR)/test/*.lua \ - $(IDIR_LUA_EXAMPLES)/usr/share/lua/examples/ - $(RSTRIP) $(IDIR_LUA_EXAMPLES) - $(IPKG_BUILD) $(IDIR_LUA_EXAMPLES) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/liblua.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/lua{,lib}.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/lauxlib.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/liblua.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/lua{,lib}.h \ - $(STAGING_DIR)/usr/include/lauxlib.h \ - $(STAGING_DIR)/usr/lib/liblua{,lib}.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/lua/ipkg/liblua.control b/openwrt/package/lua/ipkg/liblua.control deleted file mode 100644 index 502523a53c4..00000000000 --- a/openwrt/package/lua/ipkg/liblua.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: liblua -Priority: optional -Section: libs -Description: LUA programming language shared libraries diff --git a/openwrt/package/lua/ipkg/lua-examples.control b/openwrt/package/lua/ipkg/lua-examples.control deleted file mode 100644 index fc0e46e074c..00000000000 --- a/openwrt/package/lua/ipkg/lua-examples.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lua-examples -Priority: optional -Section: devel -Description: LUA programming language examples -Depends: lua diff --git a/openwrt/package/lua/ipkg/lua.control b/openwrt/package/lua/ipkg/lua.control deleted file mode 100644 index a938103ee54..00000000000 --- a/openwrt/package/lua/ipkg/lua.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lua -Priority: optional -Section: admin -Description: LUA programming language interpreter -Depends: liblua diff --git a/openwrt/package/lua/ipkg/luac.control b/openwrt/package/lua/ipkg/luac.control deleted file mode 100644 index f379f9e45bc..00000000000 --- a/openwrt/package/lua/ipkg/luac.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: luac -Priority: optional -Section: devel -Description: LUA programming language compiler -Depends: liblua diff --git a/openwrt/package/lua/patches/lua-5.0.2-config.patch b/openwrt/package/lua/patches/lua-5.0.2-config.patch deleted file mode 100644 index fa5b0e76599..00000000000 --- a/openwrt/package/lua/patches/lua-5.0.2-config.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -ruN lua-5.0.2-orig/config lua-5.0.2-1/config ---- lua-5.0.2-orig/config 2003-04-11 16:00:41.000000000 +0200 -+++ lua-5.0.2-1/config 2005-05-25 11:23:35.000000000 +0200 -@@ -25,15 +25,15 @@ - # interface (e.g., Linux, Solaris, IRIX, BSD, AIX, HPUX, and probably others), - # uncomment the next two lines. - # --#LOADLIB= -DUSE_DLOPEN=1 --#DLLIB= -ldl -+LOADLIB= -DUSE_DLOPEN=1 -+DLLIB= -ldl - # - # In Linux with gcc, you should also uncomment the next definition for - # MYLDFLAGS, which passes -E (= -export-dynamic) to the linker. This option - # allows dynamic libraries to link back to the `lua' program, so that they do - # not need the Lua libraries. (Other systems may have an equivalent facility.) - # --#MYLDFLAGS= -Wl,-E -+MYLDFLAGS= -Wl,-E - # - # On Windows systems. support for dynamic loading is enabled by default. - # To disable this support, uncomment the next line. -@@ -142,7 +142,7 @@ - - # This should work in all Unix systems, but you may want to add options. - # --STRIP= strip -+STRIP= /bin/true - - # ------------------------------------------------------------------ install - diff --git a/openwrt/package/lua/patches/lua-5.0.2-soname.patch b/openwrt/package/lua/patches/lua-5.0.2-soname.patch deleted file mode 100644 index 3364ff6ad6a..00000000000 --- a/openwrt/package/lua/patches/lua-5.0.2-soname.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ruN lua-5.0.2-orig/Makefile lua-5.0.2-1/Makefile ---- lua-5.0.2-orig/Makefile 2004-03-12 02:50:55.000000000 +0100 -+++ lua-5.0.2-1/Makefile 2005-05-25 11:41:44.000000000 +0200 -@@ -38,8 +38,8 @@ - - # shared libraries (for Linux) - so: -- ld -o lib/liblua.so.$V -shared src/*.o -- ld -o lib/liblualib.so.$V -shared src/lib/*.o -+ $(LD) -o lib/liblua.so.$V -shared -soname="liblua.so.$V" src/*.o -+ $(LD) -o lib/liblualib.so.$V -shared -soname="liblualib.so.$V" src/lib/*.o - cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so - - # binaries using shared libraries diff --git a/openwrt/package/macchanger/Config.in b/openwrt/package/macchanger/Config.in deleted file mode 100755 index c0ece4784b4..00000000000 --- a/openwrt/package/macchanger/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_MACCHANGER - tristate "macchanger........................ utility for viewing/manipulating the MAC address" - default m if CONFIG_DEVEL - help - This is a GNU/Linux utility for viewing/manipulating the MAC address - of network interfaces. - - http://www.alobbs.com/macchanger diff --git a/openwrt/package/macchanger/Makefile b/openwrt/package/macchanger/Makefile deleted file mode 100755 index 75cbb9c8dbf..00000000000 --- a/openwrt/package/macchanger/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=macchanger -PKG_VERSION:=1.5.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=79b7cdaeca3d8ebafa764c4b0dd03ab7 -PKG_SOURCE_URL:=@GNU/macchanger -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MACCHANGER,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) DESTDIR=$(PKG_INSTALL_DIR) -C $(PKG_BUILD_DIR) install - touch $@ - -$(IPKG_MACCHANGER): - mkdir -p $(IDIR_MACCHANGER) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_MACCHANGER)/ - $(RSTRIP) $(IDIR_MACCHANGER) - $(IPKG_BUILD) $(IDIR_MACCHANGER) $(PACKAGE_DIR) diff --git a/openwrt/package/macchanger/ipkg/macchanger.control b/openwrt/package/macchanger/ipkg/macchanger.control deleted file mode 100755 index 9149cc32f11..00000000000 --- a/openwrt/package/macchanger/ipkg/macchanger.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: macchanger -Section: sys -Architecture: mipsel -Priority: optional -Description: This is a GNU/Linux utility for viewing/manipulating the MAC address -of network interfaces. diff --git a/openwrt/package/madplay/Config.in b/openwrt/package/madplay/Config.in deleted file mode 100644 index 59e234668e3..00000000000 --- a/openwrt/package/madplay/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_MADPLAY - tristate "madplay........................... MPEG audio player in fixed point" - default m if CONFIG_DEVELOPER - select BR2_PACKAGE_LIBID3TAG - select BR2_PACKAGE_LIBMAD - help - MAD is an MPEG audio decoder. It currently only supports the MPEG 1 - standard, but fully implements all three audio layers (Layer I, Layer II, - and Layer III, the latter often colloquially known as MP3.). There is also - full support for ID3 tags. - - diff --git a/openwrt/package/madplay/Makefile b/openwrt/package/madplay/Makefile deleted file mode 100644 index 15ddd142730..00000000000 --- a/openwrt/package/madplay/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=madplay -PKG_VERSION:=0.15.2b -PKG_RELEASE:=1 -PKG_MD5SUM:=6814b47ceaa99880c754c5195aa1aac1 - -PKG_SOURCE_URL:=@SF/mad \ - ftp://ftp.mars.org/pub/mpeg/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MADPLAY,madplay,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-lz" \ - ac_cv_linux_vers=2 \ - td_cv_buggygetaddrinfo="no" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --with-gnu-ld \ - --disable-rpath \ - --disable-debugging \ - --disable-profiling \ - --disable-experimental \ - --without-libiconv-prefix \ - --without-libintl-prefix \ - --without-alsa \ - --without-esd \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_MADPLAY): - install -m0755 -d $(IDIR_MADPLAY)/usr/bin - install -m0755 $(PKG_INSTALL_DIR)/usr/bin/madplay $(IDIR_MADPLAY)/usr/bin/ - $(RSTRIP) $(IDIR_MADPLAY) - $(IPKG_BUILD) $(IDIR_MADPLAY) $(PACKAGE_DIR) diff --git a/openwrt/package/madplay/ipkg/madplay.control b/openwrt/package/madplay/ipkg/madplay.control deleted file mode 100644 index f776e7ca63f..00000000000 --- a/openwrt/package/madplay/ipkg/madplay.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: madplay -Priority: optional -Section: sound -Description: MPEG audio player in fixed point -Depends: libid3tag, libmad - diff --git a/openwrt/package/maradns/Config.in b/openwrt/package/maradns/Config.in deleted file mode 100644 index 7c6974c867e..00000000000 --- a/openwrt/package/maradns/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_MARADNS - prompt "maradns........................... Small and secure DNS Server" - tristate - default m if CONFIG_DEVEL - help - A small and secure DNS server - - http://www.maradns.org/ - diff --git a/openwrt/package/maradns/Makefile b/openwrt/package/maradns/Makefile deleted file mode 100644 index 4625ed7c465..00000000000 --- a/openwrt/package/maradns/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=maradns -PKG_VERSION:=1.0.35 -PKG_RELEASE:=1 -PKG_MD5SUM:=1b2ba196ddde5f545af177b4531e0d70 - -PKG_SOURCE_URL:=http://www.maradns.org/download -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MARADNS,maradns,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS)" \ - FLAGS="$(TARGET_CFLAGS)" \ - CC=$(TARGET_CC) \ - HOSTCC="$(HOSTCC)" - mkdir -p $(PKG_INSTALL_DIR)/usr/{bin,sbin} - mkdir -p $(PKG_INSTALL_DIR)/usr/man/man{1,5,8} - $(MAKE) -C $(PKG_BUILD_DIR) \ - PREFIX="$(PKG_INSTALL_DIR)/usr" \ - RPM_BUILD_ROOT="$(PKG_INSTALL_DIR)" \ - install - touch $@ - -$(IPKG_MARADNS): - install -d -m0755 $(IDIR_MARADNS)/etc - install -m0644 ./files/mararc $(IDIR_MARADNS)/etc/mararc - install -d -m0755 $(IDIR_MARADNS)/etc/init.d - install -m0755 ./files/maradns.init $(IDIR_MARADNS)/etc/init.d/S60maradns - install -d -m0755 $(IDIR_MARADNS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone} $(IDIR_MARADNS)/usr/bin/ - install -d -m0755 $(IDIR_MARADNS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{maradns,zoneserver} $(IDIR_MARADNS)/usr/sbin/ - $(RSTRIP) $(IDIR_MARADNS) - $(IPKG_BUILD) $(IDIR_MARADNS) $(PACKAGE_DIR) diff --git a/openwrt/package/maradns/files/maradns.init b/openwrt/package/maradns/files/maradns.init deleted file mode 100644 index eec174eca32..00000000000 --- a/openwrt/package/maradns/files/maradns.init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -[ -d /etc/maradns ] || mkdir -p /etc/maradns -/usr/sbin/maradns >/dev/null 2>&1 & diff --git a/openwrt/package/maradns/files/mararc b/openwrt/package/maradns/files/mararc deleted file mode 100644 index e67ee995929..00000000000 --- a/openwrt/package/maradns/files/mararc +++ /dev/null @@ -1,9 +0,0 @@ -hide_disclaimer="YES" -chroot_dir="/etc/maradns" -bind_address="0.0.0.0" -maradns_uid=65534 -maxprocs=10 -random_seed_file="/dev/urandom" -recursive_acl="192.168.1.0/24" -root_servers={} -root_servers["."]="198.41.0.4,128.9.0.107,192.33.4.12,128.8.10.90,192.203.230.10,192.5.5.241,192.112.36.4,128.63.2.53,192.36.148.17,192.58.128.30,193.0.14.129,198.32.64.12,202.12.27.33" diff --git a/openwrt/package/maradns/ipkg/maradns.conffiles b/openwrt/package/maradns/ipkg/maradns.conffiles deleted file mode 100644 index 53fcab8e5f0..00000000000 --- a/openwrt/package/maradns/ipkg/maradns.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/mararc \ No newline at end of file diff --git a/openwrt/package/maradns/ipkg/maradns.control b/openwrt/package/maradns/ipkg/maradns.control deleted file mode 100644 index 5db7497f442..00000000000 --- a/openwrt/package/maradns/ipkg/maradns.control +++ /dev/null @@ -1,8 +0,0 @@ -Package: maradns -Section: net -Priority: optional -Depends: libpthread -Description: MaraDNS is a small, secure DNS Server - MaraDNS is intended for environments where a DNS - server must be secure and where the server must use - the absolute minimum number of resources possible. diff --git a/openwrt/package/maradns/patches/cross-compile-fix.patch b/openwrt/package/maradns/patches/cross-compile-fix.patch deleted file mode 100644 index d8ee0e0512e..00000000000 --- a/openwrt/package/maradns/patches/cross-compile-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN maradns-1.0.26.old/rng/Makefile maradns-1.0.26.dev/rng/Makefile ---- maradns-1.0.26.old/rng/Makefile 2003-08-02 21:39:36.000000000 +0200 -+++ maradns-1.0.26.dev/rng/Makefile 2005-04-30 23:29:30.000000000 +0200 -@@ -20,7 +20,7 @@ - $(CC) -c $(FLAGS) -o rng-api-fst.o rng-api-fst.c - - make_32bit_tables: make_32bit_tables.c -- $(CC) -o make_32bit_tables make_32bit_tables.c -+ $(HOSTCC) -o make_32bit_tables make_32bit_tables.c - - rng-32bit-tables.h: make_32bit_tables - ./make_32bit_tables > rng-32bit-tables.h diff --git a/openwrt/package/matrixssl/Config.in b/openwrt/package/matrixssl/Config.in deleted file mode 100644 index 3d4532e52a6..00000000000 --- a/openwrt/package/matrixssl/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config BR2_COMPILE_MATRIXSSL - tristate - depends BR2_PACKAGE_LIBMATRIXSSL - -config BR2_PACKAGE_LIBMATRIXSSL - prompt "libmatrixssl...................... Embedded SSL implementation" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_MATRIXSSL - select BR2_PACKAGE_LIBPTHREAD - help - An embedded SSL implementation - - http://www.matrixssl.org/ - - Depends: libpthread - diff --git a/openwrt/package/matrixssl/Makefile b/openwrt/package/matrixssl/Makefile deleted file mode 100644 index 89bd39a92c9..00000000000 --- a/openwrt/package/matrixssl/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=matrixssl -PKG_VERSION:=1.2.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=771c1489488e62668d673478311d63ca - -PKG_SOURCE_URL:=http://nbd.vd-s.ath.cx/openwrt -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBMATRIXSSL,libmatrixssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - $(TARGET_CONFIGURE_OPTS) \ - DFLAGS="$(TARGET_CFLAGS) -Wall" - touch $@ - -$(IPKG_LIBMATRIXSSL): - install -d -m0755 $(IDIR_LIBMATRIXSSL)/usr/lib - $(CP) $(PKG_BUILD_DIR)/src/libmatrixssl.so.* $(IDIR_LIBMATRIXSSL)/usr/lib/ - $(RSTRIP) $(IDIR_LIBMATRIXSSL) - $(IPKG_BUILD) $(IDIR_LIBMATRIXSSL) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libmatrixssl.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/matrixSsl - $(CP) $(PKG_BUILD_DIR)/matrixSsl.h $(STAGING_DIR)/usr/include/matrixSsl - ln -sf matrixSsl/matrixSsl.h $(STAGING_DIR)/usr/include/matrixSsl.h - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_BUILD_DIR)/src/libmatrixssl.so* $(STAGING_DIR)/usr/lib - -install-dev: $(STAGING_DIR)/usr/lib/libmatrixssl.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/matrixSsl* \ - $(STAGING_DIR)/usr/lib/libmatrixssl.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/matrixssl/ipkg/libmatrixssl.control b/openwrt/package/matrixssl/ipkg/libmatrixssl.control deleted file mode 100644 index fb1816ab2f3..00000000000 --- a/openwrt/package/matrixssl/ipkg/libmatrixssl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libmatrixssl -Priority: optional -Section: libs -Description: an embedded SSL implementation -Depends: libpthread diff --git a/openwrt/package/matrixssl/patches/matrixssl-1.2.4.diff b/openwrt/package/matrixssl/patches/matrixssl-1.2.4.diff deleted file mode 100644 index b4a2bc99057..00000000000 --- a/openwrt/package/matrixssl/patches/matrixssl-1.2.4.diff +++ /dev/null @@ -1,1971 +0,0 @@ -diff -urN matrixssl.old/matrixSsl.h matrixssl/matrixSsl.h ---- matrixssl.old/matrixSsl.h 2005-02-23 22:43:10.000000000 +0100 -+++ matrixssl/matrixSsl.h 2005-03-06 01:32:33.000000000 +0100 -@@ -154,6 +154,29 @@ - - #define SSL_OPTION_DELETE_SESSION 0 - -+ -+#define SSL_MD5_DIGEST_LENGTH 16 -+#define SSL_MD5_CONTEXT_DATA_SIZE 96 -+ -+typedef struct { -+ unsigned char data[SSL_MD5_CONTEXT_DATA_SIZE]; -+} sslMd5Context_t; -+ -+ -+#define SSL_SHA1_DIGEST_LENGTH 20 -+#define SSL_SHA1_CONTEXT_DATA_SIZE 96 -+ -+typedef struct { -+ unsigned char data[SSL_SHA1_CONTEXT_DATA_SIZE]; -+} sslSha1Context_t; -+ -+ -+#define SSL_CIPHER_CONTEXT_DATA_SIZE 784 -+ -+typedef struct { -+ unsigned char data[SSL_CIPHER_CONTEXT_DATA_SIZE]; -+} sslCipherContext_t; -+ - /******************************************************************************/ - /* - Explicitly import these apis on Windows. If we're being included from the -@@ -220,6 +243,71 @@ - char *privBuf, int32 privLen, char *privPass, - char *trustedCABuf, int32 trustedCALen); - -+ -+/* -+ ARC4 (RC4) API -+*/ -+ -+SSLPUBLIC void matrixArc4Init(sslCipherContext_t *ctx, unsigned char *key, -+ int keylen); -+ -+SSLPUBLIC int matrixArc4(sslCipherContext_t *ctx, unsigned char *in, -+ unsigned char *out, int len); -+ -+/* -+ 3DES (Triple-DES) API -+*/ -+ -+SSLPUBLIC int matrix3desInit(sslCipherContext_t *ctx, unsigned char *IV, -+ unsigned char *key, int keylen); -+ -+SSLPUBLIC int matrix3desEncrypt(sslCipherContext_t *ctx, unsigned char *pt, -+ unsigned char *ct, int len); -+ -+SSLPUBLIC int matrix3desDecrypt(sslCipherContext_t *ctx, unsigned char *ct, -+ unsigned char *pt, int len); -+ -+/* -+ AES API -+*/ -+ -+SSLPUBLIC int matrixAesInit(sslCipherContext_t *ctx, unsigned char *IV, -+ unsigned char *key, int keylen); -+ -+SSLPUBLIC int matrixAesEncrypt(sslCipherContext_t *ctx, unsigned char *pt, -+ unsigned char *ct, int len); -+ -+SSLPUBLIC int matrixAesDecrypt(sslCipherContext_t *ctx, unsigned char *ct, -+ unsigned char *pt, int len); -+ -+/* -+ MD5 API -+*/ -+ -+SSLPUBLIC void matrixMd5Init(sslMd5Context_t *ctx); -+ -+SSLPUBLIC void matrixMd5Update(sslMd5Context_t *ctx, const unsigned char *buf, -+ unsigned long len); -+ -+SSLPUBLIC int matrixMd5Final(sslMd5Context_t *ctx, unsigned char *hash); -+ -+SSLPUBLIC unsigned char *matrixMd5Digest(const unsigned char *buf, -+ unsigned long len, unsigned char *hash); -+ -+/* -+ SHA1 API -+*/ -+ -+SSLPUBLIC void matrixSha1Init(sslSha1Context_t *ctx); -+ -+SSLPUBLIC void matrixSha1Update(sslSha1Context_t *ctx, const unsigned char *buf, -+ unsigned long len); -+ -+SSLPUBLIC int matrixSha1Final(sslSha1Context_t *ctx, unsigned char *hash); -+ -+SSLPUBLIC unsigned char *matrixSha1Digest(const unsigned char *buf, -+ unsigned long len, unsigned char *hash); -+ - /******************************************************************************/ - - #ifdef __cplusplus -diff -urN matrixssl.old/src/crypto/cryptoLayer.h matrixssl/src/crypto/cryptoLayer.h ---- matrixssl.old/src/crypto/cryptoLayer.h 2005-02-23 22:43:10.000000000 +0100 -+++ matrixssl/src/crypto/cryptoLayer.h 2005-03-06 01:32:33.000000000 +0100 -@@ -115,6 +115,7 @@ - */ - /* #define USE_FULL_CERT_PARSE */ - /* #define USE_MD2 */ -+#define USE_AES - - /* - Now that we've set up the required defines, include the crypto layer header -diff -urN matrixssl.old/src/crypto/peersec/aes.c matrixssl/src/crypto/peersec/aes.c ---- matrixssl.old/src/crypto/peersec/aes.c 1970-01-01 01:00:00.000000000 +0100 -+++ matrixssl/src/crypto/peersec/aes.c 2005-03-06 01:32:33.000000000 +0100 -@@ -0,0 +1,1708 @@ -+/* -+ * aes.c -+ * -+ * AES CBC block cipher implementation -+ */ -+/* -+ * Copyright (c) PeerSec Networks, 2002-2004. All Rights Reserved. -+ * The latest version of this code is available at http://www.matrixssl.org -+ * -+ * This software is open source; 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 General Public License does NOT permit incorporating this software -+ * into proprietary programs. If you are unable to comply with the GPL, a -+ * commercial license for this software may be purchased from PeerSec Networks -+ * at http://www.peersec.com -+ * -+ * This program is distributed in 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 -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+/******************************************************************************/ -+ -+#include "../cryptoLayer.h" -+ -+#ifdef USE_AES -+ -+/* The precomputed tables for AES */ -+/* -+Te0[x] = S [x].[02, 01, 01, 03]; -+Te1[x] = S [x].[03, 02, 01, 01]; -+Te2[x] = S [x].[01, 03, 02, 01]; -+Te3[x] = S [x].[01, 01, 03, 02]; -+Te4[x] = S [x].[01, 01, 01, 01]; -+ -+Td0[x] = Si[x].[0e, 09, 0d, 0b]; -+Td1[x] = Si[x].[0b, 0e, 09, 0d]; -+Td2[x] = Si[x].[0d, 0b, 0e, 09]; -+Td3[x] = Si[x].[09, 0d, 0b, 0e]; -+Td4[x] = Si[x].[01, 01, 01, 01]; -+*/ -+ -+static const ulong32 TE0[256] = { -+ 0xc66363a5UL, 0xf87c7c84UL, 0xee777799UL, 0xf67b7b8dUL, -+ 0xfff2f20dUL, 0xd66b6bbdUL, 0xde6f6fb1UL, 0x91c5c554UL, -+ 0x60303050UL, 0x02010103UL, 0xce6767a9UL, 0x562b2b7dUL, -+ 0xe7fefe19UL, 0xb5d7d762UL, 0x4dababe6UL, 0xec76769aUL, -+ 0x8fcaca45UL, 0x1f82829dUL, 0x89c9c940UL, 0xfa7d7d87UL, -+ 0xeffafa15UL, 0xb25959ebUL, 0x8e4747c9UL, 0xfbf0f00bUL, -+ 0x41adadecUL, 0xb3d4d467UL, 0x5fa2a2fdUL, 0x45afafeaUL, -+ 0x239c9cbfUL, 0x53a4a4f7UL, 0xe4727296UL, 0x9bc0c05bUL, -+ 0x75b7b7c2UL, 0xe1fdfd1cUL, 0x3d9393aeUL, 0x4c26266aUL, -+ 0x6c36365aUL, 0x7e3f3f41UL, 0xf5f7f702UL, 0x83cccc4fUL, -+ 0x6834345cUL, 0x51a5a5f4UL, 0xd1e5e534UL, 0xf9f1f108UL, -+ 0xe2717193UL, 0xabd8d873UL, 0x62313153UL, 0x2a15153fUL, -+ 0x0804040cUL, 0x95c7c752UL, 0x46232365UL, 0x9dc3c35eUL, -+ 0x30181828UL, 0x379696a1UL, 0x0a05050fUL, 0x2f9a9ab5UL, -+ 0x0e070709UL, 0x24121236UL, 0x1b80809bUL, 0xdfe2e23dUL, -+ 0xcdebeb26UL, 0x4e272769UL, 0x7fb2b2cdUL, 0xea75759fUL, -+ 0x1209091bUL, 0x1d83839eUL, 0x582c2c74UL, 0x341a1a2eUL, -+ 0x361b1b2dUL, 0xdc6e6eb2UL, 0xb45a5aeeUL, 0x5ba0a0fbUL, -+ 0xa45252f6UL, 0x763b3b4dUL, 0xb7d6d661UL, 0x7db3b3ceUL, -+ 0x5229297bUL, 0xdde3e33eUL, 0x5e2f2f71UL, 0x13848497UL, -+ 0xa65353f5UL, 0xb9d1d168UL, 0x00000000UL, 0xc1eded2cUL, -+ 0x40202060UL, 0xe3fcfc1fUL, 0x79b1b1c8UL, 0xb65b5bedUL, -+ 0xd46a6abeUL, 0x8dcbcb46UL, 0x67bebed9UL, 0x7239394bUL, -+ 0x944a4adeUL, 0x984c4cd4UL, 0xb05858e8UL, 0x85cfcf4aUL, -+ 0xbbd0d06bUL, 0xc5efef2aUL, 0x4faaaae5UL, 0xedfbfb16UL, -+ 0x864343c5UL, 0x9a4d4dd7UL, 0x66333355UL, 0x11858594UL, -+ 0x8a4545cfUL, 0xe9f9f910UL, 0x04020206UL, 0xfe7f7f81UL, -+ 0xa05050f0UL, 0x783c3c44UL, 0x259f9fbaUL, 0x4ba8a8e3UL, -+ 0xa25151f3UL, 0x5da3a3feUL, 0x804040c0UL, 0x058f8f8aUL, -+ 0x3f9292adUL, 0x219d9dbcUL, 0x70383848UL, 0xf1f5f504UL, -+ 0x63bcbcdfUL, 0x77b6b6c1UL, 0xafdada75UL, 0x42212163UL, -+ 0x20101030UL, 0xe5ffff1aUL, 0xfdf3f30eUL, 0xbfd2d26dUL, -+ 0x81cdcd4cUL, 0x180c0c14UL, 0x26131335UL, 0xc3ecec2fUL, -+ 0xbe5f5fe1UL, 0x359797a2UL, 0x884444ccUL, 0x2e171739UL, -+ 0x93c4c457UL, 0x55a7a7f2UL, 0xfc7e7e82UL, 0x7a3d3d47UL, -+ 0xc86464acUL, 0xba5d5de7UL, 0x3219192bUL, 0xe6737395UL, -+ 0xc06060a0UL, 0x19818198UL, 0x9e4f4fd1UL, 0xa3dcdc7fUL, -+ 0x44222266UL, 0x542a2a7eUL, 0x3b9090abUL, 0x0b888883UL, -+ 0x8c4646caUL, 0xc7eeee29UL, 0x6bb8b8d3UL, 0x2814143cUL, -+ 0xa7dede79UL, 0xbc5e5ee2UL, 0x160b0b1dUL, 0xaddbdb76UL, -+ 0xdbe0e03bUL, 0x64323256UL, 0x743a3a4eUL, 0x140a0a1eUL, -+ 0x924949dbUL, 0x0c06060aUL, 0x4824246cUL, 0xb85c5ce4UL, -+ 0x9fc2c25dUL, 0xbdd3d36eUL, 0x43acacefUL, 0xc46262a6UL, -+ 0x399191a8UL, 0x319595a4UL, 0xd3e4e437UL, 0xf279798bUL, -+ 0xd5e7e732UL, 0x8bc8c843UL, 0x6e373759UL, 0xda6d6db7UL, -+ 0x018d8d8cUL, 0xb1d5d564UL, 0x9c4e4ed2UL, 0x49a9a9e0UL, -+ 0xd86c6cb4UL, 0xac5656faUL, 0xf3f4f407UL, 0xcfeaea25UL, -+ 0xca6565afUL, 0xf47a7a8eUL, 0x47aeaee9UL, 0x10080818UL, -+ 0x6fbabad5UL, 0xf0787888UL, 0x4a25256fUL, 0x5c2e2e72UL, -+ 0x381c1c24UL, 0x57a6a6f1UL, 0x73b4b4c7UL, 0x97c6c651UL, -+ 0xcbe8e823UL, 0xa1dddd7cUL, 0xe874749cUL, 0x3e1f1f21UL, -+ 0x964b4bddUL, 0x61bdbddcUL, 0x0d8b8b86UL, 0x0f8a8a85UL, -+ 0xe0707090UL, 0x7c3e3e42UL, 0x71b5b5c4UL, 0xcc6666aaUL, -+ 0x904848d8UL, 0x06030305UL, 0xf7f6f601UL, 0x1c0e0e12UL, -+ 0xc26161a3UL, 0x6a35355fUL, 0xae5757f9UL, 0x69b9b9d0UL, -+ 0x17868691UL, 0x99c1c158UL, 0x3a1d1d27UL, 0x279e9eb9UL, -+ 0xd9e1e138UL, 0xebf8f813UL, 0x2b9898b3UL, 0x22111133UL, -+ 0xd26969bbUL, 0xa9d9d970UL, 0x078e8e89UL, 0x339494a7UL, -+ 0x2d9b9bb6UL, 0x3c1e1e22UL, 0x15878792UL, 0xc9e9e920UL, -+ 0x87cece49UL, 0xaa5555ffUL, 0x50282878UL, 0xa5dfdf7aUL, -+ 0x038c8c8fUL, 0x59a1a1f8UL, 0x09898980UL, 0x1a0d0d17UL, -+ 0x65bfbfdaUL, 0xd7e6e631UL, 0x844242c6UL, 0xd06868b8UL, -+ 0x824141c3UL, 0x299999b0UL, 0x5a2d2d77UL, 0x1e0f0f11UL, -+ 0x7bb0b0cbUL, 0xa85454fcUL, 0x6dbbbbd6UL, 0x2c16163aUL, -+}; -+ -+static const ulong32 Te4[256] = { -+ 0x63636363UL, 0x7c7c7c7cUL, 0x77777777UL, 0x7b7b7b7bUL, -+ 0xf2f2f2f2UL, 0x6b6b6b6bUL, 0x6f6f6f6fUL, 0xc5c5c5c5UL, -+ 0x30303030UL, 0x01010101UL, 0x67676767UL, 0x2b2b2b2bUL, -+ 0xfefefefeUL, 0xd7d7d7d7UL, 0xababababUL, 0x76767676UL, -+ 0xcacacacaUL, 0x82828282UL, 0xc9c9c9c9UL, 0x7d7d7d7dUL, -+ 0xfafafafaUL, 0x59595959UL, 0x47474747UL, 0xf0f0f0f0UL, -+ 0xadadadadUL, 0xd4d4d4d4UL, 0xa2a2a2a2UL, 0xafafafafUL, -+ 0x9c9c9c9cUL, 0xa4a4a4a4UL, 0x72727272UL, 0xc0c0c0c0UL, -+ 0xb7b7b7b7UL, 0xfdfdfdfdUL, 0x93939393UL, 0x26262626UL, -+ 0x36363636UL, 0x3f3f3f3fUL, 0xf7f7f7f7UL, 0xccccccccUL, -+ 0x34343434UL, 0xa5a5a5a5UL, 0xe5e5e5e5UL, 0xf1f1f1f1UL, -+ 0x71717171UL, 0xd8d8d8d8UL, 0x31313131UL, 0x15151515UL, -+ 0x04040404UL, 0xc7c7c7c7UL, 0x23232323UL, 0xc3c3c3c3UL, -+ 0x18181818UL, 0x96969696UL, 0x05050505UL, 0x9a9a9a9aUL, -+ 0x07070707UL, 0x12121212UL, 0x80808080UL, 0xe2e2e2e2UL, -+ 0xebebebebUL, 0x27272727UL, 0xb2b2b2b2UL, 0x75757575UL, -+ 0x09090909UL, 0x83838383UL, 0x2c2c2c2cUL, 0x1a1a1a1aUL, -+ 0x1b1b1b1bUL, 0x6e6e6e6eUL, 0x5a5a5a5aUL, 0xa0a0a0a0UL, -+ 0x52525252UL, 0x3b3b3b3bUL, 0xd6d6d6d6UL, 0xb3b3b3b3UL, -+ 0x29292929UL, 0xe3e3e3e3UL, 0x2f2f2f2fUL, 0x84848484UL, -+ 0x53535353UL, 0xd1d1d1d1UL, 0x00000000UL, 0xededededUL, -+ 0x20202020UL, 0xfcfcfcfcUL, 0xb1b1b1b1UL, 0x5b5b5b5bUL, -+ 0x6a6a6a6aUL, 0xcbcbcbcbUL, 0xbebebebeUL, 0x39393939UL, -+ 0x4a4a4a4aUL, 0x4c4c4c4cUL, 0x58585858UL, 0xcfcfcfcfUL, -+ 0xd0d0d0d0UL, 0xefefefefUL, 0xaaaaaaaaUL, 0xfbfbfbfbUL, -+ 0x43434343UL, 0x4d4d4d4dUL, 0x33333333UL, 0x85858585UL, -+ 0x45454545UL, 0xf9f9f9f9UL, 0x02020202UL, 0x7f7f7f7fUL, -+ 0x50505050UL, 0x3c3c3c3cUL, 0x9f9f9f9fUL, 0xa8a8a8a8UL, -+ 0x51515151UL, 0xa3a3a3a3UL, 0x40404040UL, 0x8f8f8f8fUL, -+ 0x92929292UL, 0x9d9d9d9dUL, 0x38383838UL, 0xf5f5f5f5UL, -+ 0xbcbcbcbcUL, 0xb6b6b6b6UL, 0xdadadadaUL, 0x21212121UL, -+ 0x10101010UL, 0xffffffffUL, 0xf3f3f3f3UL, 0xd2d2d2d2UL, -+ 0xcdcdcdcdUL, 0x0c0c0c0cUL, 0x13131313UL, 0xececececUL, -+ 0x5f5f5f5fUL, 0x97979797UL, 0x44444444UL, 0x17171717UL, -+ 0xc4c4c4c4UL, 0xa7a7a7a7UL, 0x7e7e7e7eUL, 0x3d3d3d3dUL, -+ 0x64646464UL, 0x5d5d5d5dUL, 0x19191919UL, 0x73737373UL, -+ 0x60606060UL, 0x81818181UL, 0x4f4f4f4fUL, 0xdcdcdcdcUL, -+ 0x22222222UL, 0x2a2a2a2aUL, 0x90909090UL, 0x88888888UL, -+ 0x46464646UL, 0xeeeeeeeeUL, 0xb8b8b8b8UL, 0x14141414UL, -+ 0xdedededeUL, 0x5e5e5e5eUL, 0x0b0b0b0bUL, 0xdbdbdbdbUL, -+ 0xe0e0e0e0UL, 0x32323232UL, 0x3a3a3a3aUL, 0x0a0a0a0aUL, -+ 0x49494949UL, 0x06060606UL, 0x24242424UL, 0x5c5c5c5cUL, -+ 0xc2c2c2c2UL, 0xd3d3d3d3UL, 0xacacacacUL, 0x62626262UL, -+ 0x91919191UL, 0x95959595UL, 0xe4e4e4e4UL, 0x79797979UL, -+ 0xe7e7e7e7UL, 0xc8c8c8c8UL, 0x37373737UL, 0x6d6d6d6dUL, -+ 0x8d8d8d8dUL, 0xd5d5d5d5UL, 0x4e4e4e4eUL, 0xa9a9a9a9UL, -+ 0x6c6c6c6cUL, 0x56565656UL, 0xf4f4f4f4UL, 0xeaeaeaeaUL, -+ 0x65656565UL, 0x7a7a7a7aUL, 0xaeaeaeaeUL, 0x08080808UL, -+ 0xbabababaUL, 0x78787878UL, 0x25252525UL, 0x2e2e2e2eUL, -+ 0x1c1c1c1cUL, 0xa6a6a6a6UL, 0xb4b4b4b4UL, 0xc6c6c6c6UL, -+ 0xe8e8e8e8UL, 0xddddddddUL, 0x74747474UL, 0x1f1f1f1fUL, -+ 0x4b4b4b4bUL, 0xbdbdbdbdUL, 0x8b8b8b8bUL, 0x8a8a8a8aUL, -+ 0x70707070UL, 0x3e3e3e3eUL, 0xb5b5b5b5UL, 0x66666666UL, -+ 0x48484848UL, 0x03030303UL, 0xf6f6f6f6UL, 0x0e0e0e0eUL, -+ 0x61616161UL, 0x35353535UL, 0x57575757UL, 0xb9b9b9b9UL, -+ 0x86868686UL, 0xc1c1c1c1UL, 0x1d1d1d1dUL, 0x9e9e9e9eUL, -+ 0xe1e1e1e1UL, 0xf8f8f8f8UL, 0x98989898UL, 0x11111111UL, -+ 0x69696969UL, 0xd9d9d9d9UL, 0x8e8e8e8eUL, 0x94949494UL, -+ 0x9b9b9b9bUL, 0x1e1e1e1eUL, 0x87878787UL, 0xe9e9e9e9UL, -+ 0xcecececeUL, 0x55555555UL, 0x28282828UL, 0xdfdfdfdfUL, -+ 0x8c8c8c8cUL, 0xa1a1a1a1UL, 0x89898989UL, 0x0d0d0d0dUL, -+ 0xbfbfbfbfUL, 0xe6e6e6e6UL, 0x42424242UL, 0x68686868UL, -+ 0x41414141UL, 0x99999999UL, 0x2d2d2d2dUL, 0x0f0f0f0fUL, -+ 0xb0b0b0b0UL, 0x54545454UL, 0xbbbbbbbbUL, 0x16161616UL, -+}; -+ -+static const ulong32 TD0[256] = { -+ 0x51f4a750UL, 0x7e416553UL, 0x1a17a4c3UL, 0x3a275e96UL, -+ 0x3bab6bcbUL, 0x1f9d45f1UL, 0xacfa58abUL, 0x4be30393UL, -+ 0x2030fa55UL, 0xad766df6UL, 0x88cc7691UL, 0xf5024c25UL, -+ 0x4fe5d7fcUL, 0xc52acbd7UL, 0x26354480UL, 0xb562a38fUL, -+ 0xdeb15a49UL, 0x25ba1b67UL, 0x45ea0e98UL, 0x5dfec0e1UL, -+ 0xc32f7502UL, 0x814cf012UL, 0x8d4697a3UL, 0x6bd3f9c6UL, -+ 0x038f5fe7UL, 0x15929c95UL, 0xbf6d7aebUL, 0x955259daUL, -+ 0xd4be832dUL, 0x587421d3UL, 0x49e06929UL, 0x8ec9c844UL, -+ 0x75c2896aUL, 0xf48e7978UL, 0x99583e6bUL, 0x27b971ddUL, -+ 0xbee14fb6UL, 0xf088ad17UL, 0xc920ac66UL, 0x7dce3ab4UL, -+ 0x63df4a18UL, 0xe51a3182UL, 0x97513360UL, 0x62537f45UL, -+ 0xb16477e0UL, 0xbb6bae84UL, 0xfe81a01cUL, 0xf9082b94UL, -+ 0x70486858UL, 0x8f45fd19UL, 0x94de6c87UL, 0x527bf8b7UL, -+ 0xab73d323UL, 0x724b02e2UL, 0xe31f8f57UL, 0x6655ab2aUL, -+ 0xb2eb2807UL, 0x2fb5c203UL, 0x86c57b9aUL, 0xd33708a5UL, -+ 0x302887f2UL, 0x23bfa5b2UL, 0x02036abaUL, 0xed16825cUL, -+ 0x8acf1c2bUL, 0xa779b492UL, 0xf307f2f0UL, 0x4e69e2a1UL, -+ 0x65daf4cdUL, 0x0605bed5UL, 0xd134621fUL, 0xc4a6fe8aUL, -+ 0x342e539dUL, 0xa2f355a0UL, 0x058ae132UL, 0xa4f6eb75UL, -+ 0x0b83ec39UL, 0x4060efaaUL, 0x5e719f06UL, 0xbd6e1051UL, -+ 0x3e218af9UL, 0x96dd063dUL, 0xdd3e05aeUL, 0x4de6bd46UL, -+ 0x91548db5UL, 0x71c45d05UL, 0x0406d46fUL, 0x605015ffUL, -+ 0x1998fb24UL, 0xd6bde997UL, 0x894043ccUL, 0x67d99e77UL, -+ 0xb0e842bdUL, 0x07898b88UL, 0xe7195b38UL, 0x79c8eedbUL, -+ 0xa17c0a47UL, 0x7c420fe9UL, 0xf8841ec9UL, 0x00000000UL, -+ 0x09808683UL, 0x322bed48UL, 0x1e1170acUL, 0x6c5a724eUL, -+ 0xfd0efffbUL, 0x0f853856UL, 0x3daed51eUL, 0x362d3927UL, -+ 0x0a0fd964UL, 0x685ca621UL, 0x9b5b54d1UL, 0x24362e3aUL, -+ 0x0c0a67b1UL, 0x9357e70fUL, 0xb4ee96d2UL, 0x1b9b919eUL, -+ 0x80c0c54fUL, 0x61dc20a2UL, 0x5a774b69UL, 0x1c121a16UL, -+ 0xe293ba0aUL, 0xc0a02ae5UL, 0x3c22e043UL, 0x121b171dUL, -+ 0x0e090d0bUL, 0xf28bc7adUL, 0x2db6a8b9UL, 0x141ea9c8UL, -+ 0x57f11985UL, 0xaf75074cUL, 0xee99ddbbUL, 0xa37f60fdUL, -+ 0xf701269fUL, 0x5c72f5bcUL, 0x44663bc5UL, 0x5bfb7e34UL, -+ 0x8b432976UL, 0xcb23c6dcUL, 0xb6edfc68UL, 0xb8e4f163UL, -+ 0xd731dccaUL, 0x42638510UL, 0x13972240UL, 0x84c61120UL, -+ 0x854a247dUL, 0xd2bb3df8UL, 0xaef93211UL, 0xc729a16dUL, -+ 0x1d9e2f4bUL, 0xdcb230f3UL, 0x0d8652ecUL, 0x77c1e3d0UL, -+ 0x2bb3166cUL, 0xa970b999UL, 0x119448faUL, 0x47e96422UL, -+ 0xa8fc8cc4UL, 0xa0f03f1aUL, 0x567d2cd8UL, 0x223390efUL, -+ 0x87494ec7UL, 0xd938d1c1UL, 0x8ccaa2feUL, 0x98d40b36UL, -+ 0xa6f581cfUL, 0xa57ade28UL, 0xdab78e26UL, 0x3fadbfa4UL, -+ 0x2c3a9de4UL, 0x5078920dUL, 0x6a5fcc9bUL, 0x547e4662UL, -+ 0xf68d13c2UL, 0x90d8b8e8UL, 0x2e39f75eUL, 0x82c3aff5UL, -+ 0x9f5d80beUL, 0x69d0937cUL, 0x6fd52da9UL, 0xcf2512b3UL, -+ 0xc8ac993bUL, 0x10187da7UL, 0xe89c636eUL, 0xdb3bbb7bUL, -+ 0xcd267809UL, 0x6e5918f4UL, 0xec9ab701UL, 0x834f9aa8UL, -+ 0xe6956e65UL, 0xaaffe67eUL, 0x21bccf08UL, 0xef15e8e6UL, -+ 0xbae79bd9UL, 0x4a6f36ceUL, 0xea9f09d4UL, 0x29b07cd6UL, -+ 0x31a4b2afUL, 0x2a3f2331UL, 0xc6a59430UL, 0x35a266c0UL, -+ 0x744ebc37UL, 0xfc82caa6UL, 0xe090d0b0UL, 0x33a7d815UL, -+ 0xf104984aUL, 0x41ecdaf7UL, 0x7fcd500eUL, 0x1791f62fUL, -+ 0x764dd68dUL, 0x43efb04dUL, 0xccaa4d54UL, 0xe49604dfUL, -+ 0x9ed1b5e3UL, 0x4c6a881bUL, 0xc12c1fb8UL, 0x4665517fUL, -+ 0x9d5eea04UL, 0x018c355dUL, 0xfa877473UL, 0xfb0b412eUL, -+ 0xb3671d5aUL, 0x92dbd252UL, 0xe9105633UL, 0x6dd64713UL, -+ 0x9ad7618cUL, 0x37a10c7aUL, 0x59f8148eUL, 0xeb133c89UL, -+ 0xcea927eeUL, 0xb761c935UL, 0xe11ce5edUL, 0x7a47b13cUL, -+ 0x9cd2df59UL, 0x55f2733fUL, 0x1814ce79UL, 0x73c737bfUL, -+ 0x53f7cdeaUL, 0x5ffdaa5bUL, 0xdf3d6f14UL, 0x7844db86UL, -+ 0xcaaff381UL, 0xb968c43eUL, 0x3824342cUL, 0xc2a3405fUL, -+ 0x161dc372UL, 0xbce2250cUL, 0x283c498bUL, 0xff0d9541UL, -+ 0x39a80171UL, 0x080cb3deUL, 0xd8b4e49cUL, 0x6456c190UL, -+ 0x7bcb8461UL, 0xd532b670UL, 0x486c5c74UL, 0xd0b85742UL, -+}; -+ -+static const ulong32 Td4[256] = { -+ 0x52525252UL, 0x09090909UL, 0x6a6a6a6aUL, 0xd5d5d5d5UL, -+ 0x30303030UL, 0x36363636UL, 0xa5a5a5a5UL, 0x38383838UL, -+ 0xbfbfbfbfUL, 0x40404040UL, 0xa3a3a3a3UL, 0x9e9e9e9eUL, -+ 0x81818181UL, 0xf3f3f3f3UL, 0xd7d7d7d7UL, 0xfbfbfbfbUL, -+ 0x7c7c7c7cUL, 0xe3e3e3e3UL, 0x39393939UL, 0x82828282UL, -+ 0x9b9b9b9bUL, 0x2f2f2f2fUL, 0xffffffffUL, 0x87878787UL, -+ 0x34343434UL, 0x8e8e8e8eUL, 0x43434343UL, 0x44444444UL, -+ 0xc4c4c4c4UL, 0xdedededeUL, 0xe9e9e9e9UL, 0xcbcbcbcbUL, -+ 0x54545454UL, 0x7b7b7b7bUL, 0x94949494UL, 0x32323232UL, -+ 0xa6a6a6a6UL, 0xc2c2c2c2UL, 0x23232323UL, 0x3d3d3d3dUL, -+ 0xeeeeeeeeUL, 0x4c4c4c4cUL, 0x95959595UL, 0x0b0b0b0bUL, -+ 0x42424242UL, 0xfafafafaUL, 0xc3c3c3c3UL, 0x4e4e4e4eUL, -+ 0x08080808UL, 0x2e2e2e2eUL, 0xa1a1a1a1UL, 0x66666666UL, -+ 0x28282828UL, 0xd9d9d9d9UL, 0x24242424UL, 0xb2b2b2b2UL, -+ 0x76767676UL, 0x5b5b5b5bUL, 0xa2a2a2a2UL, 0x49494949UL, -+ 0x6d6d6d6dUL, 0x8b8b8b8bUL, 0xd1d1d1d1UL, 0x25252525UL, -+ 0x72727272UL, 0xf8f8f8f8UL, 0xf6f6f6f6UL, 0x64646464UL, -+ 0x86868686UL, 0x68686868UL, 0x98989898UL, 0x16161616UL, -+ 0xd4d4d4d4UL, 0xa4a4a4a4UL, 0x5c5c5c5cUL, 0xccccccccUL, -+ 0x5d5d5d5dUL, 0x65656565UL, 0xb6b6b6b6UL, 0x92929292UL, -+ 0x6c6c6c6cUL, 0x70707070UL, 0x48484848UL, 0x50505050UL, -+ 0xfdfdfdfdUL, 0xededededUL, 0xb9b9b9b9UL, 0xdadadadaUL, -+ 0x5e5e5e5eUL, 0x15151515UL, 0x46464646UL, 0x57575757UL, -+ 0xa7a7a7a7UL, 0x8d8d8d8dUL, 0x9d9d9d9dUL, 0x84848484UL, -+ 0x90909090UL, 0xd8d8d8d8UL, 0xababababUL, 0x00000000UL, -+ 0x8c8c8c8cUL, 0xbcbcbcbcUL, 0xd3d3d3d3UL, 0x0a0a0a0aUL, -+ 0xf7f7f7f7UL, 0xe4e4e4e4UL, 0x58585858UL, 0x05050505UL, -+ 0xb8b8b8b8UL, 0xb3b3b3b3UL, 0x45454545UL, 0x06060606UL, -+ 0xd0d0d0d0UL, 0x2c2c2c2cUL, 0x1e1e1e1eUL, 0x8f8f8f8fUL, -+ 0xcacacacaUL, 0x3f3f3f3fUL, 0x0f0f0f0fUL, 0x02020202UL, -+ 0xc1c1c1c1UL, 0xafafafafUL, 0xbdbdbdbdUL, 0x03030303UL, -+ 0x01010101UL, 0x13131313UL, 0x8a8a8a8aUL, 0x6b6b6b6bUL, -+ 0x3a3a3a3aUL, 0x91919191UL, 0x11111111UL, 0x41414141UL, -+ 0x4f4f4f4fUL, 0x67676767UL, 0xdcdcdcdcUL, 0xeaeaeaeaUL, -+ 0x97979797UL, 0xf2f2f2f2UL, 0xcfcfcfcfUL, 0xcecececeUL, -+ 0xf0f0f0f0UL, 0xb4b4b4b4UL, 0xe6e6e6e6UL, 0x73737373UL, -+ 0x96969696UL, 0xacacacacUL, 0x74747474UL, 0x22222222UL, -+ 0xe7e7e7e7UL, 0xadadadadUL, 0x35353535UL, 0x85858585UL, -+ 0xe2e2e2e2UL, 0xf9f9f9f9UL, 0x37373737UL, 0xe8e8e8e8UL, -+ 0x1c1c1c1cUL, 0x75757575UL, 0xdfdfdfdfUL, 0x6e6e6e6eUL, -+ 0x47474747UL, 0xf1f1f1f1UL, 0x1a1a1a1aUL, 0x71717171UL, -+ 0x1d1d1d1dUL, 0x29292929UL, 0xc5c5c5c5UL, 0x89898989UL, -+ 0x6f6f6f6fUL, 0xb7b7b7b7UL, 0x62626262UL, 0x0e0e0e0eUL, -+ 0xaaaaaaaaUL, 0x18181818UL, 0xbebebebeUL, 0x1b1b1b1bUL, -+ 0xfcfcfcfcUL, 0x56565656UL, 0x3e3e3e3eUL, 0x4b4b4b4bUL, -+ 0xc6c6c6c6UL, 0xd2d2d2d2UL, 0x79797979UL, 0x20202020UL, -+ 0x9a9a9a9aUL, 0xdbdbdbdbUL, 0xc0c0c0c0UL, 0xfefefefeUL, -+ 0x78787878UL, 0xcdcdcdcdUL, 0x5a5a5a5aUL, 0xf4f4f4f4UL, -+ 0x1f1f1f1fUL, 0xddddddddUL, 0xa8a8a8a8UL, 0x33333333UL, -+ 0x88888888UL, 0x07070707UL, 0xc7c7c7c7UL, 0x31313131UL, -+ 0xb1b1b1b1UL, 0x12121212UL, 0x10101010UL, 0x59595959UL, -+ 0x27272727UL, 0x80808080UL, 0xececececUL, 0x5f5f5f5fUL, -+ 0x60606060UL, 0x51515151UL, 0x7f7f7f7fUL, 0xa9a9a9a9UL, -+ 0x19191919UL, 0xb5b5b5b5UL, 0x4a4a4a4aUL, 0x0d0d0d0dUL, -+ 0x2d2d2d2dUL, 0xe5e5e5e5UL, 0x7a7a7a7aUL, 0x9f9f9f9fUL, -+ 0x93939393UL, 0xc9c9c9c9UL, 0x9c9c9c9cUL, 0xefefefefUL, -+ 0xa0a0a0a0UL, 0xe0e0e0e0UL, 0x3b3b3b3bUL, 0x4d4d4d4dUL, -+ 0xaeaeaeaeUL, 0x2a2a2a2aUL, 0xf5f5f5f5UL, 0xb0b0b0b0UL, -+ 0xc8c8c8c8UL, 0xebebebebUL, 0xbbbbbbbbUL, 0x3c3c3c3cUL, -+ 0x83838383UL, 0x53535353UL, 0x99999999UL, 0x61616161UL, -+ 0x17171717UL, 0x2b2b2b2bUL, 0x04040404UL, 0x7e7e7e7eUL, -+ 0xbabababaUL, 0x77777777UL, 0xd6d6d6d6UL, 0x26262626UL, -+ 0xe1e1e1e1UL, 0x69696969UL, 0x14141414UL, 0x63636363UL, -+ 0x55555555UL, 0x21212121UL, 0x0c0c0c0cUL, 0x7d7d7d7dUL, -+}; -+ -+#ifdef SMALL_CODE -+ -+#define Te0(x) TE0[x] -+#define Te1(x) ROR(TE0[x], 8) -+#define Te2(x) ROR(TE0[x], 16) -+#define Te3(x) ROR(TE0[x], 24) -+ -+#define Td0(x) TD0[x] -+#define Td1(x) ROR(TD0[x], 8) -+#define Td2(x) ROR(TD0[x], 16) -+#define Td3(x) ROR(TD0[x], 24) -+ -+#define Te4_0 0x000000FF & Te4 -+#define Te4_1 0x0000FF00 & Te4 -+#define Te4_2 0x00FF0000 & Te4 -+#define Te4_3 0xFF000000 & Te4 -+ -+#else /* SMALL_CODE */ -+ -+#define Te0(x) TE0[x] -+#define Te1(x) TE1[x] -+#define Te2(x) TE2[x] -+#define Te3(x) TE3[x] -+ -+#define Td0(x) TD0[x] -+#define Td1(x) TD1[x] -+#define Td2(x) TD2[x] -+#define Td3(x) TD3[x] -+ -+static const ulong32 TE1[256] = { -+ 0xa5c66363UL, 0x84f87c7cUL, 0x99ee7777UL, 0x8df67b7bUL, -+ 0x0dfff2f2UL, 0xbdd66b6bUL, 0xb1de6f6fUL, 0x5491c5c5UL, -+ 0x50603030UL, 0x03020101UL, 0xa9ce6767UL, 0x7d562b2bUL, -+ 0x19e7fefeUL, 0x62b5d7d7UL, 0xe64dababUL, 0x9aec7676UL, -+ 0x458fcacaUL, 0x9d1f8282UL, 0x4089c9c9UL, 0x87fa7d7dUL, -+ 0x15effafaUL, 0xebb25959UL, 0xc98e4747UL, 0x0bfbf0f0UL, -+ 0xec41adadUL, 0x67b3d4d4UL, 0xfd5fa2a2UL, 0xea45afafUL, -+ 0xbf239c9cUL, 0xf753a4a4UL, 0x96e47272UL, 0x5b9bc0c0UL, -+ 0xc275b7b7UL, 0x1ce1fdfdUL, 0xae3d9393UL, 0x6a4c2626UL, -+ 0x5a6c3636UL, 0x417e3f3fUL, 0x02f5f7f7UL, 0x4f83ccccUL, -+ 0x5c683434UL, 0xf451a5a5UL, 0x34d1e5e5UL, 0x08f9f1f1UL, -+ 0x93e27171UL, 0x73abd8d8UL, 0x53623131UL, 0x3f2a1515UL, -+ 0x0c080404UL, 0x5295c7c7UL, 0x65462323UL, 0x5e9dc3c3UL, -+ 0x28301818UL, 0xa1379696UL, 0x0f0a0505UL, 0xb52f9a9aUL, -+ 0x090e0707UL, 0x36241212UL, 0x9b1b8080UL, 0x3ddfe2e2UL, -+ 0x26cdebebUL, 0x694e2727UL, 0xcd7fb2b2UL, 0x9fea7575UL, -+ 0x1b120909UL, 0x9e1d8383UL, 0x74582c2cUL, 0x2e341a1aUL, -+ 0x2d361b1bUL, 0xb2dc6e6eUL, 0xeeb45a5aUL, 0xfb5ba0a0UL, -+ 0xf6a45252UL, 0x4d763b3bUL, 0x61b7d6d6UL, 0xce7db3b3UL, -+ 0x7b522929UL, 0x3edde3e3UL, 0x715e2f2fUL, 0x97138484UL, -+ 0xf5a65353UL, 0x68b9d1d1UL, 0x00000000UL, 0x2cc1ededUL, -+ 0x60402020UL, 0x1fe3fcfcUL, 0xc879b1b1UL, 0xedb65b5bUL, -+ 0xbed46a6aUL, 0x468dcbcbUL, 0xd967bebeUL, 0x4b723939UL, -+ 0xde944a4aUL, 0xd4984c4cUL, 0xe8b05858UL, 0x4a85cfcfUL, -+ 0x6bbbd0d0UL, 0x2ac5efefUL, 0xe54faaaaUL, 0x16edfbfbUL, -+ 0xc5864343UL, 0xd79a4d4dUL, 0x55663333UL, 0x94118585UL, -+ 0xcf8a4545UL, 0x10e9f9f9UL, 0x06040202UL, 0x81fe7f7fUL, -+ 0xf0a05050UL, 0x44783c3cUL, 0xba259f9fUL, 0xe34ba8a8UL, -+ 0xf3a25151UL, 0xfe5da3a3UL, 0xc0804040UL, 0x8a058f8fUL, -+ 0xad3f9292UL, 0xbc219d9dUL, 0x48703838UL, 0x04f1f5f5UL, -+ 0xdf63bcbcUL, 0xc177b6b6UL, 0x75afdadaUL, 0x63422121UL, -+ 0x30201010UL, 0x1ae5ffffUL, 0x0efdf3f3UL, 0x6dbfd2d2UL, -+ 0x4c81cdcdUL, 0x14180c0cUL, 0x35261313UL, 0x2fc3ececUL, -+ 0xe1be5f5fUL, 0xa2359797UL, 0xcc884444UL, 0x392e1717UL, -+ 0x5793c4c4UL, 0xf255a7a7UL, 0x82fc7e7eUL, 0x477a3d3dUL, -+ 0xacc86464UL, 0xe7ba5d5dUL, 0x2b321919UL, 0x95e67373UL, -+ 0xa0c06060UL, 0x98198181UL, 0xd19e4f4fUL, 0x7fa3dcdcUL, -+ 0x66442222UL, 0x7e542a2aUL, 0xab3b9090UL, 0x830b8888UL, -+ 0xca8c4646UL, 0x29c7eeeeUL, 0xd36bb8b8UL, 0x3c281414UL, -+ 0x79a7dedeUL, 0xe2bc5e5eUL, 0x1d160b0bUL, 0x76addbdbUL, -+ 0x3bdbe0e0UL, 0x56643232UL, 0x4e743a3aUL, 0x1e140a0aUL, -+ 0xdb924949UL, 0x0a0c0606UL, 0x6c482424UL, 0xe4b85c5cUL, -+ 0x5d9fc2c2UL, 0x6ebdd3d3UL, 0xef43acacUL, 0xa6c46262UL, -+ 0xa8399191UL, 0xa4319595UL, 0x37d3e4e4UL, 0x8bf27979UL, -+ 0x32d5e7e7UL, 0x438bc8c8UL, 0x596e3737UL, 0xb7da6d6dUL, -+ 0x8c018d8dUL, 0x64b1d5d5UL, 0xd29c4e4eUL, 0xe049a9a9UL, -+ 0xb4d86c6cUL, 0xfaac5656UL, 0x07f3f4f4UL, 0x25cfeaeaUL, -+ 0xafca6565UL, 0x8ef47a7aUL, 0xe947aeaeUL, 0x18100808UL, -+ 0xd56fbabaUL, 0x88f07878UL, 0x6f4a2525UL, 0x725c2e2eUL, -+ 0x24381c1cUL, 0xf157a6a6UL, 0xc773b4b4UL, 0x5197c6c6UL, -+ 0x23cbe8e8UL, 0x7ca1ddddUL, 0x9ce87474UL, 0x213e1f1fUL, -+ 0xdd964b4bUL, 0xdc61bdbdUL, 0x860d8b8bUL, 0x850f8a8aUL, -+ 0x90e07070UL, 0x427c3e3eUL, 0xc471b5b5UL, 0xaacc6666UL, -+ 0xd8904848UL, 0x05060303UL, 0x01f7f6f6UL, 0x121c0e0eUL, -+ 0xa3c26161UL, 0x5f6a3535UL, 0xf9ae5757UL, 0xd069b9b9UL, -+ 0x91178686UL, 0x5899c1c1UL, 0x273a1d1dUL, 0xb9279e9eUL, -+ 0x38d9e1e1UL, 0x13ebf8f8UL, 0xb32b9898UL, 0x33221111UL, -+ 0xbbd26969UL, 0x70a9d9d9UL, 0x89078e8eUL, 0xa7339494UL, -+ 0xb62d9b9bUL, 0x223c1e1eUL, 0x92158787UL, 0x20c9e9e9UL, -+ 0x4987ceceUL, 0xffaa5555UL, 0x78502828UL, 0x7aa5dfdfUL, -+ 0x8f038c8cUL, 0xf859a1a1UL, 0x80098989UL, 0x171a0d0dUL, -+ 0xda65bfbfUL, 0x31d7e6e6UL, 0xc6844242UL, 0xb8d06868UL, -+ 0xc3824141UL, 0xb0299999UL, 0x775a2d2dUL, 0x111e0f0fUL, -+ 0xcb7bb0b0UL, 0xfca85454UL, 0xd66dbbbbUL, 0x3a2c1616UL, -+}; -+static const ulong32 TE2[256] = { -+ 0x63a5c663UL, 0x7c84f87cUL, 0x7799ee77UL, 0x7b8df67bUL, -+ 0xf20dfff2UL, 0x6bbdd66bUL, 0x6fb1de6fUL, 0xc55491c5UL, -+ 0x30506030UL, 0x01030201UL, 0x67a9ce67UL, 0x2b7d562bUL, -+ 0xfe19e7feUL, 0xd762b5d7UL, 0xabe64dabUL, 0x769aec76UL, -+ 0xca458fcaUL, 0x829d1f82UL, 0xc94089c9UL, 0x7d87fa7dUL, -+ 0xfa15effaUL, 0x59ebb259UL, 0x47c98e47UL, 0xf00bfbf0UL, -+ 0xadec41adUL, 0xd467b3d4UL, 0xa2fd5fa2UL, 0xafea45afUL, -+ 0x9cbf239cUL, 0xa4f753a4UL, 0x7296e472UL, 0xc05b9bc0UL, -+ 0xb7c275b7UL, 0xfd1ce1fdUL, 0x93ae3d93UL, 0x266a4c26UL, -+ 0x365a6c36UL, 0x3f417e3fUL, 0xf702f5f7UL, 0xcc4f83ccUL, -+ 0x345c6834UL, 0xa5f451a5UL, 0xe534d1e5UL, 0xf108f9f1UL, -+ 0x7193e271UL, 0xd873abd8UL, 0x31536231UL, 0x153f2a15UL, -+ 0x040c0804UL, 0xc75295c7UL, 0x23654623UL, 0xc35e9dc3UL, -+ 0x18283018UL, 0x96a13796UL, 0x050f0a05UL, 0x9ab52f9aUL, -+ 0x07090e07UL, 0x12362412UL, 0x809b1b80UL, 0xe23ddfe2UL, -+ 0xeb26cdebUL, 0x27694e27UL, 0xb2cd7fb2UL, 0x759fea75UL, -+ 0x091b1209UL, 0x839e1d83UL, 0x2c74582cUL, 0x1a2e341aUL, -+ 0x1b2d361bUL, 0x6eb2dc6eUL, 0x5aeeb45aUL, 0xa0fb5ba0UL, -+ 0x52f6a452UL, 0x3b4d763bUL, 0xd661b7d6UL, 0xb3ce7db3UL, -+ 0x297b5229UL, 0xe33edde3UL, 0x2f715e2fUL, 0x84971384UL, -+ 0x53f5a653UL, 0xd168b9d1UL, 0x00000000UL, 0xed2cc1edUL, -+ 0x20604020UL, 0xfc1fe3fcUL, 0xb1c879b1UL, 0x5bedb65bUL, -+ 0x6abed46aUL, 0xcb468dcbUL, 0xbed967beUL, 0x394b7239UL, -+ 0x4ade944aUL, 0x4cd4984cUL, 0x58e8b058UL, 0xcf4a85cfUL, -+ 0xd06bbbd0UL, 0xef2ac5efUL, 0xaae54faaUL, 0xfb16edfbUL, -+ 0x43c58643UL, 0x4dd79a4dUL, 0x33556633UL, 0x85941185UL, -+ 0x45cf8a45UL, 0xf910e9f9UL, 0x02060402UL, 0x7f81fe7fUL, -+ 0x50f0a050UL, 0x3c44783cUL, 0x9fba259fUL, 0xa8e34ba8UL, -+ 0x51f3a251UL, 0xa3fe5da3UL, 0x40c08040UL, 0x8f8a058fUL, -+ 0x92ad3f92UL, 0x9dbc219dUL, 0x38487038UL, 0xf504f1f5UL, -+ 0xbcdf63bcUL, 0xb6c177b6UL, 0xda75afdaUL, 0x21634221UL, -+ 0x10302010UL, 0xff1ae5ffUL, 0xf30efdf3UL, 0xd26dbfd2UL, -+ 0xcd4c81cdUL, 0x0c14180cUL, 0x13352613UL, 0xec2fc3ecUL, -+ 0x5fe1be5fUL, 0x97a23597UL, 0x44cc8844UL, 0x17392e17UL, -+ 0xc45793c4UL, 0xa7f255a7UL, 0x7e82fc7eUL, 0x3d477a3dUL, -+ 0x64acc864UL, 0x5de7ba5dUL, 0x192b3219UL, 0x7395e673UL, -+ 0x60a0c060UL, 0x81981981UL, 0x4fd19e4fUL, 0xdc7fa3dcUL, -+ 0x22664422UL, 0x2a7e542aUL, 0x90ab3b90UL, 0x88830b88UL, -+ 0x46ca8c46UL, 0xee29c7eeUL, 0xb8d36bb8UL, 0x143c2814UL, -+ 0xde79a7deUL, 0x5ee2bc5eUL, 0x0b1d160bUL, 0xdb76addbUL, -+ 0xe03bdbe0UL, 0x32566432UL, 0x3a4e743aUL, 0x0a1e140aUL, -+ 0x49db9249UL, 0x060a0c06UL, 0x246c4824UL, 0x5ce4b85cUL, -+ 0xc25d9fc2UL, 0xd36ebdd3UL, 0xacef43acUL, 0x62a6c462UL, -+ 0x91a83991UL, 0x95a43195UL, 0xe437d3e4UL, 0x798bf279UL, -+ 0xe732d5e7UL, 0xc8438bc8UL, 0x37596e37UL, 0x6db7da6dUL, -+ 0x8d8c018dUL, 0xd564b1d5UL, 0x4ed29c4eUL, 0xa9e049a9UL, -+ 0x6cb4d86cUL, 0x56faac56UL, 0xf407f3f4UL, 0xea25cfeaUL, -+ 0x65afca65UL, 0x7a8ef47aUL, 0xaee947aeUL, 0x08181008UL, -+ 0xbad56fbaUL, 0x7888f078UL, 0x256f4a25UL, 0x2e725c2eUL, -+ 0x1c24381cUL, 0xa6f157a6UL, 0xb4c773b4UL, 0xc65197c6UL, -+ 0xe823cbe8UL, 0xdd7ca1ddUL, 0x749ce874UL, 0x1f213e1fUL, -+ 0x4bdd964bUL, 0xbddc61bdUL, 0x8b860d8bUL, 0x8a850f8aUL, -+ 0x7090e070UL, 0x3e427c3eUL, 0xb5c471b5UL, 0x66aacc66UL, -+ 0x48d89048UL, 0x03050603UL, 0xf601f7f6UL, 0x0e121c0eUL, -+ 0x61a3c261UL, 0x355f6a35UL, 0x57f9ae57UL, 0xb9d069b9UL, -+ 0x86911786UL, 0xc15899c1UL, 0x1d273a1dUL, 0x9eb9279eUL, -+ 0xe138d9e1UL, 0xf813ebf8UL, 0x98b32b98UL, 0x11332211UL, -+ 0x69bbd269UL, 0xd970a9d9UL, 0x8e89078eUL, 0x94a73394UL, -+ 0x9bb62d9bUL, 0x1e223c1eUL, 0x87921587UL, 0xe920c9e9UL, -+ 0xce4987ceUL, 0x55ffaa55UL, 0x28785028UL, 0xdf7aa5dfUL, -+ 0x8c8f038cUL, 0xa1f859a1UL, 0x89800989UL, 0x0d171a0dUL, -+ 0xbfda65bfUL, 0xe631d7e6UL, 0x42c68442UL, 0x68b8d068UL, -+ 0x41c38241UL, 0x99b02999UL, 0x2d775a2dUL, 0x0f111e0fUL, -+ 0xb0cb7bb0UL, 0x54fca854UL, 0xbbd66dbbUL, 0x163a2c16UL, -+}; -+static const ulong32 TE3[256] = { -+ -+ 0x6363a5c6UL, 0x7c7c84f8UL, 0x777799eeUL, 0x7b7b8df6UL, -+ 0xf2f20dffUL, 0x6b6bbdd6UL, 0x6f6fb1deUL, 0xc5c55491UL, -+ 0x30305060UL, 0x01010302UL, 0x6767a9ceUL, 0x2b2b7d56UL, -+ 0xfefe19e7UL, 0xd7d762b5UL, 0xababe64dUL, 0x76769aecUL, -+ 0xcaca458fUL, 0x82829d1fUL, 0xc9c94089UL, 0x7d7d87faUL, -+ 0xfafa15efUL, 0x5959ebb2UL, 0x4747c98eUL, 0xf0f00bfbUL, -+ 0xadadec41UL, 0xd4d467b3UL, 0xa2a2fd5fUL, 0xafafea45UL, -+ 0x9c9cbf23UL, 0xa4a4f753UL, 0x727296e4UL, 0xc0c05b9bUL, -+ 0xb7b7c275UL, 0xfdfd1ce1UL, 0x9393ae3dUL, 0x26266a4cUL, -+ 0x36365a6cUL, 0x3f3f417eUL, 0xf7f702f5UL, 0xcccc4f83UL, -+ 0x34345c68UL, 0xa5a5f451UL, 0xe5e534d1UL, 0xf1f108f9UL, -+ 0x717193e2UL, 0xd8d873abUL, 0x31315362UL, 0x15153f2aUL, -+ 0x04040c08UL, 0xc7c75295UL, 0x23236546UL, 0xc3c35e9dUL, -+ 0x18182830UL, 0x9696a137UL, 0x05050f0aUL, 0x9a9ab52fUL, -+ 0x0707090eUL, 0x12123624UL, 0x80809b1bUL, 0xe2e23ddfUL, -+ 0xebeb26cdUL, 0x2727694eUL, 0xb2b2cd7fUL, 0x75759feaUL, -+ 0x09091b12UL, 0x83839e1dUL, 0x2c2c7458UL, 0x1a1a2e34UL, -+ 0x1b1b2d36UL, 0x6e6eb2dcUL, 0x5a5aeeb4UL, 0xa0a0fb5bUL, -+ 0x5252f6a4UL, 0x3b3b4d76UL, 0xd6d661b7UL, 0xb3b3ce7dUL, -+ 0x29297b52UL, 0xe3e33eddUL, 0x2f2f715eUL, 0x84849713UL, -+ 0x5353f5a6UL, 0xd1d168b9UL, 0x00000000UL, 0xeded2cc1UL, -+ 0x20206040UL, 0xfcfc1fe3UL, 0xb1b1c879UL, 0x5b5bedb6UL, -+ 0x6a6abed4UL, 0xcbcb468dUL, 0xbebed967UL, 0x39394b72UL, -+ 0x4a4ade94UL, 0x4c4cd498UL, 0x5858e8b0UL, 0xcfcf4a85UL, -+ 0xd0d06bbbUL, 0xefef2ac5UL, 0xaaaae54fUL, 0xfbfb16edUL, -+ 0x4343c586UL, 0x4d4dd79aUL, 0x33335566UL, 0x85859411UL, -+ 0x4545cf8aUL, 0xf9f910e9UL, 0x02020604UL, 0x7f7f81feUL, -+ 0x5050f0a0UL, 0x3c3c4478UL, 0x9f9fba25UL, 0xa8a8e34bUL, -+ 0x5151f3a2UL, 0xa3a3fe5dUL, 0x4040c080UL, 0x8f8f8a05UL, -+ 0x9292ad3fUL, 0x9d9dbc21UL, 0x38384870UL, 0xf5f504f1UL, -+ 0xbcbcdf63UL, 0xb6b6c177UL, 0xdada75afUL, 0x21216342UL, -+ 0x10103020UL, 0xffff1ae5UL, 0xf3f30efdUL, 0xd2d26dbfUL, -+ 0xcdcd4c81UL, 0x0c0c1418UL, 0x13133526UL, 0xecec2fc3UL, -+ 0x5f5fe1beUL, 0x9797a235UL, 0x4444cc88UL, 0x1717392eUL, -+ 0xc4c45793UL, 0xa7a7f255UL, 0x7e7e82fcUL, 0x3d3d477aUL, -+ 0x6464acc8UL, 0x5d5de7baUL, 0x19192b32UL, 0x737395e6UL, -+ 0x6060a0c0UL, 0x81819819UL, 0x4f4fd19eUL, 0xdcdc7fa3UL, -+ 0x22226644UL, 0x2a2a7e54UL, 0x9090ab3bUL, 0x8888830bUL, -+ 0x4646ca8cUL, 0xeeee29c7UL, 0xb8b8d36bUL, 0x14143c28UL, -+ 0xdede79a7UL, 0x5e5ee2bcUL, 0x0b0b1d16UL, 0xdbdb76adUL, -+ 0xe0e03bdbUL, 0x32325664UL, 0x3a3a4e74UL, 0x0a0a1e14UL, -+ 0x4949db92UL, 0x06060a0cUL, 0x24246c48UL, 0x5c5ce4b8UL, -+ 0xc2c25d9fUL, 0xd3d36ebdUL, 0xacacef43UL, 0x6262a6c4UL, -+ 0x9191a839UL, 0x9595a431UL, 0xe4e437d3UL, 0x79798bf2UL, -+ 0xe7e732d5UL, 0xc8c8438bUL, 0x3737596eUL, 0x6d6db7daUL, -+ 0x8d8d8c01UL, 0xd5d564b1UL, 0x4e4ed29cUL, 0xa9a9e049UL, -+ 0x6c6cb4d8UL, 0x5656faacUL, 0xf4f407f3UL, 0xeaea25cfUL, -+ 0x6565afcaUL, 0x7a7a8ef4UL, 0xaeaee947UL, 0x08081810UL, -+ 0xbabad56fUL, 0x787888f0UL, 0x25256f4aUL, 0x2e2e725cUL, -+ 0x1c1c2438UL, 0xa6a6f157UL, 0xb4b4c773UL, 0xc6c65197UL, -+ 0xe8e823cbUL, 0xdddd7ca1UL, 0x74749ce8UL, 0x1f1f213eUL, -+ 0x4b4bdd96UL, 0xbdbddc61UL, 0x8b8b860dUL, 0x8a8a850fUL, -+ 0x707090e0UL, 0x3e3e427cUL, 0xb5b5c471UL, 0x6666aaccUL, -+ 0x4848d890UL, 0x03030506UL, 0xf6f601f7UL, 0x0e0e121cUL, -+ 0x6161a3c2UL, 0x35355f6aUL, 0x5757f9aeUL, 0xb9b9d069UL, -+ 0x86869117UL, 0xc1c15899UL, 0x1d1d273aUL, 0x9e9eb927UL, -+ 0xe1e138d9UL, 0xf8f813ebUL, 0x9898b32bUL, 0x11113322UL, -+ 0x6969bbd2UL, 0xd9d970a9UL, 0x8e8e8907UL, 0x9494a733UL, -+ 0x9b9bb62dUL, 0x1e1e223cUL, 0x87879215UL, 0xe9e920c9UL, -+ 0xcece4987UL, 0x5555ffaaUL, 0x28287850UL, 0xdfdf7aa5UL, -+ 0x8c8c8f03UL, 0xa1a1f859UL, 0x89898009UL, 0x0d0d171aUL, -+ 0xbfbfda65UL, 0xe6e631d7UL, 0x4242c684UL, 0x6868b8d0UL, -+ 0x4141c382UL, 0x9999b029UL, 0x2d2d775aUL, 0x0f0f111eUL, -+ 0xb0b0cb7bUL, 0x5454fca8UL, 0xbbbbd66dUL, 0x16163a2cUL, -+}; -+ -+static const ulong32 Te4_0[] = { -+0x00000063UL, 0x0000007cUL, 0x00000077UL, 0x0000007bUL, 0x000000f2UL, 0x0000006bUL, 0x0000006fUL, 0x000000c5UL, -+0x00000030UL, 0x00000001UL, 0x00000067UL, 0x0000002bUL, 0x000000feUL, 0x000000d7UL, 0x000000abUL, 0x00000076UL, -+0x000000caUL, 0x00000082UL, 0x000000c9UL, 0x0000007dUL, 0x000000faUL, 0x00000059UL, 0x00000047UL, 0x000000f0UL, -+0x000000adUL, 0x000000d4UL, 0x000000a2UL, 0x000000afUL, 0x0000009cUL, 0x000000a4UL, 0x00000072UL, 0x000000c0UL, -+0x000000b7UL, 0x000000fdUL, 0x00000093UL, 0x00000026UL, 0x00000036UL, 0x0000003fUL, 0x000000f7UL, 0x000000ccUL, -+0x00000034UL, 0x000000a5UL, 0x000000e5UL, 0x000000f1UL, 0x00000071UL, 0x000000d8UL, 0x00000031UL, 0x00000015UL, -+0x00000004UL, 0x000000c7UL, 0x00000023UL, 0x000000c3UL, 0x00000018UL, 0x00000096UL, 0x00000005UL, 0x0000009aUL, -+0x00000007UL, 0x00000012UL, 0x00000080UL, 0x000000e2UL, 0x000000ebUL, 0x00000027UL, 0x000000b2UL, 0x00000075UL, -+0x00000009UL, 0x00000083UL, 0x0000002cUL, 0x0000001aUL, 0x0000001bUL, 0x0000006eUL, 0x0000005aUL, 0x000000a0UL, -+0x00000052UL, 0x0000003bUL, 0x000000d6UL, 0x000000b3UL, 0x00000029UL, 0x000000e3UL, 0x0000002fUL, 0x00000084UL, -+0x00000053UL, 0x000000d1UL, 0x00000000UL, 0x000000edUL, 0x00000020UL, 0x000000fcUL, 0x000000b1UL, 0x0000005bUL, -+0x0000006aUL, 0x000000cbUL, 0x000000beUL, 0x00000039UL, 0x0000004aUL, 0x0000004cUL, 0x00000058UL, 0x000000cfUL, -+0x000000d0UL, 0x000000efUL, 0x000000aaUL, 0x000000fbUL, 0x00000043UL, 0x0000004dUL, 0x00000033UL, 0x00000085UL, -+0x00000045UL, 0x000000f9UL, 0x00000002UL, 0x0000007fUL, 0x00000050UL, 0x0000003cUL, 0x0000009fUL, 0x000000a8UL, -+0x00000051UL, 0x000000a3UL, 0x00000040UL, 0x0000008fUL, 0x00000092UL, 0x0000009dUL, 0x00000038UL, 0x000000f5UL, -+0x000000bcUL, 0x000000b6UL, 0x000000daUL, 0x00000021UL, 0x00000010UL, 0x000000ffUL, 0x000000f3UL, 0x000000d2UL, -+0x000000cdUL, 0x0000000cUL, 0x00000013UL, 0x000000ecUL, 0x0000005fUL, 0x00000097UL, 0x00000044UL, 0x00000017UL, -+0x000000c4UL, 0x000000a7UL, 0x0000007eUL, 0x0000003dUL, 0x00000064UL, 0x0000005dUL, 0x00000019UL, 0x00000073UL, -+0x00000060UL, 0x00000081UL, 0x0000004fUL, 0x000000dcUL, 0x00000022UL, 0x0000002aUL, 0x00000090UL, 0x00000088UL, -+0x00000046UL, 0x000000eeUL, 0x000000b8UL, 0x00000014UL, 0x000000deUL, 0x0000005eUL, 0x0000000bUL, 0x000000dbUL, -+0x000000e0UL, 0x00000032UL, 0x0000003aUL, 0x0000000aUL, 0x00000049UL, 0x00000006UL, 0x00000024UL, 0x0000005cUL, -+0x000000c2UL, 0x000000d3UL, 0x000000acUL, 0x00000062UL, 0x00000091UL, 0x00000095UL, 0x000000e4UL, 0x00000079UL, -+0x000000e7UL, 0x000000c8UL, 0x00000037UL, 0x0000006dUL, 0x0000008dUL, 0x000000d5UL, 0x0000004eUL, 0x000000a9UL, -+0x0000006cUL, 0x00000056UL, 0x000000f4UL, 0x000000eaUL, 0x00000065UL, 0x0000007aUL, 0x000000aeUL, 0x00000008UL, -+0x000000baUL, 0x00000078UL, 0x00000025UL, 0x0000002eUL, 0x0000001cUL, 0x000000a6UL, 0x000000b4UL, 0x000000c6UL, -+0x000000e8UL, 0x000000ddUL, 0x00000074UL, 0x0000001fUL, 0x0000004bUL, 0x000000bdUL, 0x0000008bUL, 0x0000008aUL, -+0x00000070UL, 0x0000003eUL, 0x000000b5UL, 0x00000066UL, 0x00000048UL, 0x00000003UL, 0x000000f6UL, 0x0000000eUL, -+0x00000061UL, 0x00000035UL, 0x00000057UL, 0x000000b9UL, 0x00000086UL, 0x000000c1UL, 0x0000001dUL, 0x0000009eUL, -+0x000000e1UL, 0x000000f8UL, 0x00000098UL, 0x00000011UL, 0x00000069UL, 0x000000d9UL, 0x0000008eUL, 0x00000094UL, -+0x0000009bUL, 0x0000001eUL, 0x00000087UL, 0x000000e9UL, 0x000000ceUL, 0x00000055UL, 0x00000028UL, 0x000000dfUL, -+0x0000008cUL, 0x000000a1UL, 0x00000089UL, 0x0000000dUL, 0x000000bfUL, 0x000000e6UL, 0x00000042UL, 0x00000068UL, -+0x00000041UL, 0x00000099UL, 0x0000002dUL, 0x0000000fUL, 0x000000b0UL, 0x00000054UL, 0x000000bbUL, 0x00000016UL -+}; -+ -+static const ulong32 Te4_1[] = { -+0x00006300UL, 0x00007c00UL, 0x00007700UL, 0x00007b00UL, 0x0000f200UL, 0x00006b00UL, 0x00006f00UL, 0x0000c500UL, -+0x00003000UL, 0x00000100UL, 0x00006700UL, 0x00002b00UL, 0x0000fe00UL, 0x0000d700UL, 0x0000ab00UL, 0x00007600UL, -+0x0000ca00UL, 0x00008200UL, 0x0000c900UL, 0x00007d00UL, 0x0000fa00UL, 0x00005900UL, 0x00004700UL, 0x0000f000UL, -+0x0000ad00UL, 0x0000d400UL, 0x0000a200UL, 0x0000af00UL, 0x00009c00UL, 0x0000a400UL, 0x00007200UL, 0x0000c000UL, -+0x0000b700UL, 0x0000fd00UL, 0x00009300UL, 0x00002600UL, 0x00003600UL, 0x00003f00UL, 0x0000f700UL, 0x0000cc00UL, -+0x00003400UL, 0x0000a500UL, 0x0000e500UL, 0x0000f100UL, 0x00007100UL, 0x0000d800UL, 0x00003100UL, 0x00001500UL, -+0x00000400UL, 0x0000c700UL, 0x00002300UL, 0x0000c300UL, 0x00001800UL, 0x00009600UL, 0x00000500UL, 0x00009a00UL, -+0x00000700UL, 0x00001200UL, 0x00008000UL, 0x0000e200UL, 0x0000eb00UL, 0x00002700UL, 0x0000b200UL, 0x00007500UL, -+0x00000900UL, 0x00008300UL, 0x00002c00UL, 0x00001a00UL, 0x00001b00UL, 0x00006e00UL, 0x00005a00UL, 0x0000a000UL, -+0x00005200UL, 0x00003b00UL, 0x0000d600UL, 0x0000b300UL, 0x00002900UL, 0x0000e300UL, 0x00002f00UL, 0x00008400UL, -+0x00005300UL, 0x0000d100UL, 0x00000000UL, 0x0000ed00UL, 0x00002000UL, 0x0000fc00UL, 0x0000b100UL, 0x00005b00UL, -+0x00006a00UL, 0x0000cb00UL, 0x0000be00UL, 0x00003900UL, 0x00004a00UL, 0x00004c00UL, 0x00005800UL, 0x0000cf00UL, -+0x0000d000UL, 0x0000ef00UL, 0x0000aa00UL, 0x0000fb00UL, 0x00004300UL, 0x00004d00UL, 0x00003300UL, 0x00008500UL, -+0x00004500UL, 0x0000f900UL, 0x00000200UL, 0x00007f00UL, 0x00005000UL, 0x00003c00UL, 0x00009f00UL, 0x0000a800UL, -+0x00005100UL, 0x0000a300UL, 0x00004000UL, 0x00008f00UL, 0x00009200UL, 0x00009d00UL, 0x00003800UL, 0x0000f500UL, -+0x0000bc00UL, 0x0000b600UL, 0x0000da00UL, 0x00002100UL, 0x00001000UL, 0x0000ff00UL, 0x0000f300UL, 0x0000d200UL, -+0x0000cd00UL, 0x00000c00UL, 0x00001300UL, 0x0000ec00UL, 0x00005f00UL, 0x00009700UL, 0x00004400UL, 0x00001700UL, -+0x0000c400UL, 0x0000a700UL, 0x00007e00UL, 0x00003d00UL, 0x00006400UL, 0x00005d00UL, 0x00001900UL, 0x00007300UL, -+0x00006000UL, 0x00008100UL, 0x00004f00UL, 0x0000dc00UL, 0x00002200UL, 0x00002a00UL, 0x00009000UL, 0x00008800UL, -+0x00004600UL, 0x0000ee00UL, 0x0000b800UL, 0x00001400UL, 0x0000de00UL, 0x00005e00UL, 0x00000b00UL, 0x0000db00UL, -+0x0000e000UL, 0x00003200UL, 0x00003a00UL, 0x00000a00UL, 0x00004900UL, 0x00000600UL, 0x00002400UL, 0x00005c00UL, -+0x0000c200UL, 0x0000d300UL, 0x0000ac00UL, 0x00006200UL, 0x00009100UL, 0x00009500UL, 0x0000e400UL, 0x00007900UL, -+0x0000e700UL, 0x0000c800UL, 0x00003700UL, 0x00006d00UL, 0x00008d00UL, 0x0000d500UL, 0x00004e00UL, 0x0000a900UL, -+0x00006c00UL, 0x00005600UL, 0x0000f400UL, 0x0000ea00UL, 0x00006500UL, 0x00007a00UL, 0x0000ae00UL, 0x00000800UL, -+0x0000ba00UL, 0x00007800UL, 0x00002500UL, 0x00002e00UL, 0x00001c00UL, 0x0000a600UL, 0x0000b400UL, 0x0000c600UL, -+0x0000e800UL, 0x0000dd00UL, 0x00007400UL, 0x00001f00UL, 0x00004b00UL, 0x0000bd00UL, 0x00008b00UL, 0x00008a00UL, -+0x00007000UL, 0x00003e00UL, 0x0000b500UL, 0x00006600UL, 0x00004800UL, 0x00000300UL, 0x0000f600UL, 0x00000e00UL, -+0x00006100UL, 0x00003500UL, 0x00005700UL, 0x0000b900UL, 0x00008600UL, 0x0000c100UL, 0x00001d00UL, 0x00009e00UL, -+0x0000e100UL, 0x0000f800UL, 0x00009800UL, 0x00001100UL, 0x00006900UL, 0x0000d900UL, 0x00008e00UL, 0x00009400UL, -+0x00009b00UL, 0x00001e00UL, 0x00008700UL, 0x0000e900UL, 0x0000ce00UL, 0x00005500UL, 0x00002800UL, 0x0000df00UL, -+0x00008c00UL, 0x0000a100UL, 0x00008900UL, 0x00000d00UL, 0x0000bf00UL, 0x0000e600UL, 0x00004200UL, 0x00006800UL, -+0x00004100UL, 0x00009900UL, 0x00002d00UL, 0x00000f00UL, 0x0000b000UL, 0x00005400UL, 0x0000bb00UL, 0x00001600UL -+}; -+ -+static const ulong32 Te4_2[] = { -+0x00630000UL, 0x007c0000UL, 0x00770000UL, 0x007b0000UL, 0x00f20000UL, 0x006b0000UL, 0x006f0000UL, 0x00c50000UL, -+0x00300000UL, 0x00010000UL, 0x00670000UL, 0x002b0000UL, 0x00fe0000UL, 0x00d70000UL, 0x00ab0000UL, 0x00760000UL, -+0x00ca0000UL, 0x00820000UL, 0x00c90000UL, 0x007d0000UL, 0x00fa0000UL, 0x00590000UL, 0x00470000UL, 0x00f00000UL, -+0x00ad0000UL, 0x00d40000UL, 0x00a20000UL, 0x00af0000UL, 0x009c0000UL, 0x00a40000UL, 0x00720000UL, 0x00c00000UL, -+0x00b70000UL, 0x00fd0000UL, 0x00930000UL, 0x00260000UL, 0x00360000UL, 0x003f0000UL, 0x00f70000UL, 0x00cc0000UL, -+0x00340000UL, 0x00a50000UL, 0x00e50000UL, 0x00f10000UL, 0x00710000UL, 0x00d80000UL, 0x00310000UL, 0x00150000UL, -+0x00040000UL, 0x00c70000UL, 0x00230000UL, 0x00c30000UL, 0x00180000UL, 0x00960000UL, 0x00050000UL, 0x009a0000UL, -+0x00070000UL, 0x00120000UL, 0x00800000UL, 0x00e20000UL, 0x00eb0000UL, 0x00270000UL, 0x00b20000UL, 0x00750000UL, -+0x00090000UL, 0x00830000UL, 0x002c0000UL, 0x001a0000UL, 0x001b0000UL, 0x006e0000UL, 0x005a0000UL, 0x00a00000UL, -+0x00520000UL, 0x003b0000UL, 0x00d60000UL, 0x00b30000UL, 0x00290000UL, 0x00e30000UL, 0x002f0000UL, 0x00840000UL, -+0x00530000UL, 0x00d10000UL, 0x00000000UL, 0x00ed0000UL, 0x00200000UL, 0x00fc0000UL, 0x00b10000UL, 0x005b0000UL, -+0x006a0000UL, 0x00cb0000UL, 0x00be0000UL, 0x00390000UL, 0x004a0000UL, 0x004c0000UL, 0x00580000UL, 0x00cf0000UL, -+0x00d00000UL, 0x00ef0000UL, 0x00aa0000UL, 0x00fb0000UL, 0x00430000UL, 0x004d0000UL, 0x00330000UL, 0x00850000UL, -+0x00450000UL, 0x00f90000UL, 0x00020000UL, 0x007f0000UL, 0x00500000UL, 0x003c0000UL, 0x009f0000UL, 0x00a80000UL, -+0x00510000UL, 0x00a30000UL, 0x00400000UL, 0x008f0000UL, 0x00920000UL, 0x009d0000UL, 0x00380000UL, 0x00f50000UL, -+0x00bc0000UL, 0x00b60000UL, 0x00da0000UL, 0x00210000UL, 0x00100000UL, 0x00ff0000UL, 0x00f30000UL, 0x00d20000UL, -+0x00cd0000UL, 0x000c0000UL, 0x00130000UL, 0x00ec0000UL, 0x005f0000UL, 0x00970000UL, 0x00440000UL, 0x00170000UL, -+0x00c40000UL, 0x00a70000UL, 0x007e0000UL, 0x003d0000UL, 0x00640000UL, 0x005d0000UL, 0x00190000UL, 0x00730000UL, -+0x00600000UL, 0x00810000UL, 0x004f0000UL, 0x00dc0000UL, 0x00220000UL, 0x002a0000UL, 0x00900000UL, 0x00880000UL, -+0x00460000UL, 0x00ee0000UL, 0x00b80000UL, 0x00140000UL, 0x00de0000UL, 0x005e0000UL, 0x000b0000UL, 0x00db0000UL, -+0x00e00000UL, 0x00320000UL, 0x003a0000UL, 0x000a0000UL, 0x00490000UL, 0x00060000UL, 0x00240000UL, 0x005c0000UL, -+0x00c20000UL, 0x00d30000UL, 0x00ac0000UL, 0x00620000UL, 0x00910000UL, 0x00950000UL, 0x00e40000UL, 0x00790000UL, -+0x00e70000UL, 0x00c80000UL, 0x00370000UL, 0x006d0000UL, 0x008d0000UL, 0x00d50000UL, 0x004e0000UL, 0x00a90000UL, -+0x006c0000UL, 0x00560000UL, 0x00f40000UL, 0x00ea0000UL, 0x00650000UL, 0x007a0000UL, 0x00ae0000UL, 0x00080000UL, -+0x00ba0000UL, 0x00780000UL, 0x00250000UL, 0x002e0000UL, 0x001c0000UL, 0x00a60000UL, 0x00b40000UL, 0x00c60000UL, -+0x00e80000UL, 0x00dd0000UL, 0x00740000UL, 0x001f0000UL, 0x004b0000UL, 0x00bd0000UL, 0x008b0000UL, 0x008a0000UL, -+0x00700000UL, 0x003e0000UL, 0x00b50000UL, 0x00660000UL, 0x00480000UL, 0x00030000UL, 0x00f60000UL, 0x000e0000UL, -+0x00610000UL, 0x00350000UL, 0x00570000UL, 0x00b90000UL, 0x00860000UL, 0x00c10000UL, 0x001d0000UL, 0x009e0000UL, -+0x00e10000UL, 0x00f80000UL, 0x00980000UL, 0x00110000UL, 0x00690000UL, 0x00d90000UL, 0x008e0000UL, 0x00940000UL, -+0x009b0000UL, 0x001e0000UL, 0x00870000UL, 0x00e90000UL, 0x00ce0000UL, 0x00550000UL, 0x00280000UL, 0x00df0000UL, -+0x008c0000UL, 0x00a10000UL, 0x00890000UL, 0x000d0000UL, 0x00bf0000UL, 0x00e60000UL, 0x00420000UL, 0x00680000UL, -+0x00410000UL, 0x00990000UL, 0x002d0000UL, 0x000f0000UL, 0x00b00000UL, 0x00540000UL, 0x00bb0000UL, 0x00160000UL -+}; -+ -+static const ulong32 Te4_3[] = { -+0x63000000UL, 0x7c000000UL, 0x77000000UL, 0x7b000000UL, 0xf2000000UL, 0x6b000000UL, 0x6f000000UL, 0xc5000000UL, -+0x30000000UL, 0x01000000UL, 0x67000000UL, 0x2b000000UL, 0xfe000000UL, 0xd7000000UL, 0xab000000UL, 0x76000000UL, -+0xca000000UL, 0x82000000UL, 0xc9000000UL, 0x7d000000UL, 0xfa000000UL, 0x59000000UL, 0x47000000UL, 0xf0000000UL, -+0xad000000UL, 0xd4000000UL, 0xa2000000UL, 0xaf000000UL, 0x9c000000UL, 0xa4000000UL, 0x72000000UL, 0xc0000000UL, -+0xb7000000UL, 0xfd000000UL, 0x93000000UL, 0x26000000UL, 0x36000000UL, 0x3f000000UL, 0xf7000000UL, 0xcc000000UL, -+0x34000000UL, 0xa5000000UL, 0xe5000000UL, 0xf1000000UL, 0x71000000UL, 0xd8000000UL, 0x31000000UL, 0x15000000UL, -+0x04000000UL, 0xc7000000UL, 0x23000000UL, 0xc3000000UL, 0x18000000UL, 0x96000000UL, 0x05000000UL, 0x9a000000UL, -+0x07000000UL, 0x12000000UL, 0x80000000UL, 0xe2000000UL, 0xeb000000UL, 0x27000000UL, 0xb2000000UL, 0x75000000UL, -+0x09000000UL, 0x83000000UL, 0x2c000000UL, 0x1a000000UL, 0x1b000000UL, 0x6e000000UL, 0x5a000000UL, 0xa0000000UL, -+0x52000000UL, 0x3b000000UL, 0xd6000000UL, 0xb3000000UL, 0x29000000UL, 0xe3000000UL, 0x2f000000UL, 0x84000000UL, -+0x53000000UL, 0xd1000000UL, 0x00000000UL, 0xed000000UL, 0x20000000UL, 0xfc000000UL, 0xb1000000UL, 0x5b000000UL, -+0x6a000000UL, 0xcb000000UL, 0xbe000000UL, 0x39000000UL, 0x4a000000UL, 0x4c000000UL, 0x58000000UL, 0xcf000000UL, -+0xd0000000UL, 0xef000000UL, 0xaa000000UL, 0xfb000000UL, 0x43000000UL, 0x4d000000UL, 0x33000000UL, 0x85000000UL, -+0x45000000UL, 0xf9000000UL, 0x02000000UL, 0x7f000000UL, 0x50000000UL, 0x3c000000UL, 0x9f000000UL, 0xa8000000UL, -+0x51000000UL, 0xa3000000UL, 0x40000000UL, 0x8f000000UL, 0x92000000UL, 0x9d000000UL, 0x38000000UL, 0xf5000000UL, -+0xbc000000UL, 0xb6000000UL, 0xda000000UL, 0x21000000UL, 0x10000000UL, 0xff000000UL, 0xf3000000UL, 0xd2000000UL, -+0xcd000000UL, 0x0c000000UL, 0x13000000UL, 0xec000000UL, 0x5f000000UL, 0x97000000UL, 0x44000000UL, 0x17000000UL, -+0xc4000000UL, 0xa7000000UL, 0x7e000000UL, 0x3d000000UL, 0x64000000UL, 0x5d000000UL, 0x19000000UL, 0x73000000UL, -+0x60000000UL, 0x81000000UL, 0x4f000000UL, 0xdc000000UL, 0x22000000UL, 0x2a000000UL, 0x90000000UL, 0x88000000UL, -+0x46000000UL, 0xee000000UL, 0xb8000000UL, 0x14000000UL, 0xde000000UL, 0x5e000000UL, 0x0b000000UL, 0xdb000000UL, -+0xe0000000UL, 0x32000000UL, 0x3a000000UL, 0x0a000000UL, 0x49000000UL, 0x06000000UL, 0x24000000UL, 0x5c000000UL, -+0xc2000000UL, 0xd3000000UL, 0xac000000UL, 0x62000000UL, 0x91000000UL, 0x95000000UL, 0xe4000000UL, 0x79000000UL, -+0xe7000000UL, 0xc8000000UL, 0x37000000UL, 0x6d000000UL, 0x8d000000UL, 0xd5000000UL, 0x4e000000UL, 0xa9000000UL, -+0x6c000000UL, 0x56000000UL, 0xf4000000UL, 0xea000000UL, 0x65000000UL, 0x7a000000UL, 0xae000000UL, 0x08000000UL, -+0xba000000UL, 0x78000000UL, 0x25000000UL, 0x2e000000UL, 0x1c000000UL, 0xa6000000UL, 0xb4000000UL, 0xc6000000UL, -+0xe8000000UL, 0xdd000000UL, 0x74000000UL, 0x1f000000UL, 0x4b000000UL, 0xbd000000UL, 0x8b000000UL, 0x8a000000UL, -+0x70000000UL, 0x3e000000UL, 0xb5000000UL, 0x66000000UL, 0x48000000UL, 0x03000000UL, 0xf6000000UL, 0x0e000000UL, -+0x61000000UL, 0x35000000UL, 0x57000000UL, 0xb9000000UL, 0x86000000UL, 0xc1000000UL, 0x1d000000UL, 0x9e000000UL, -+0xe1000000UL, 0xf8000000UL, 0x98000000UL, 0x11000000UL, 0x69000000UL, 0xd9000000UL, 0x8e000000UL, 0x94000000UL, -+0x9b000000UL, 0x1e000000UL, 0x87000000UL, 0xe9000000UL, 0xce000000UL, 0x55000000UL, 0x28000000UL, 0xdf000000UL, -+0x8c000000UL, 0xa1000000UL, 0x89000000UL, 0x0d000000UL, 0xbf000000UL, 0xe6000000UL, 0x42000000UL, 0x68000000UL, -+0x41000000UL, 0x99000000UL, 0x2d000000UL, 0x0f000000UL, 0xb0000000UL, 0x54000000UL, 0xbb000000UL, 0x16000000UL -+}; -+ -+static const ulong32 TD1[256] = { -+ 0x5051f4a7UL, 0x537e4165UL, 0xc31a17a4UL, 0x963a275eUL, -+ 0xcb3bab6bUL, 0xf11f9d45UL, 0xabacfa58UL, 0x934be303UL, -+ 0x552030faUL, 0xf6ad766dUL, 0x9188cc76UL, 0x25f5024cUL, -+ 0xfc4fe5d7UL, 0xd7c52acbUL, 0x80263544UL, 0x8fb562a3UL, -+ 0x49deb15aUL, 0x6725ba1bUL, 0x9845ea0eUL, 0xe15dfec0UL, -+ 0x02c32f75UL, 0x12814cf0UL, 0xa38d4697UL, 0xc66bd3f9UL, -+ 0xe7038f5fUL, 0x9515929cUL, 0xebbf6d7aUL, 0xda955259UL, -+ 0x2dd4be83UL, 0xd3587421UL, 0x2949e069UL, 0x448ec9c8UL, -+ 0x6a75c289UL, 0x78f48e79UL, 0x6b99583eUL, 0xdd27b971UL, -+ 0xb6bee14fUL, 0x17f088adUL, 0x66c920acUL, 0xb47dce3aUL, -+ 0x1863df4aUL, 0x82e51a31UL, 0x60975133UL, 0x4562537fUL, -+ 0xe0b16477UL, 0x84bb6baeUL, 0x1cfe81a0UL, 0x94f9082bUL, -+ 0x58704868UL, 0x198f45fdUL, 0x8794de6cUL, 0xb7527bf8UL, -+ 0x23ab73d3UL, 0xe2724b02UL, 0x57e31f8fUL, 0x2a6655abUL, -+ 0x07b2eb28UL, 0x032fb5c2UL, 0x9a86c57bUL, 0xa5d33708UL, -+ 0xf2302887UL, 0xb223bfa5UL, 0xba02036aUL, 0x5ced1682UL, -+ 0x2b8acf1cUL, 0x92a779b4UL, 0xf0f307f2UL, 0xa14e69e2UL, -+ 0xcd65daf4UL, 0xd50605beUL, 0x1fd13462UL, 0x8ac4a6feUL, -+ 0x9d342e53UL, 0xa0a2f355UL, 0x32058ae1UL, 0x75a4f6ebUL, -+ 0x390b83ecUL, 0xaa4060efUL, 0x065e719fUL, 0x51bd6e10UL, -+ 0xf93e218aUL, 0x3d96dd06UL, 0xaedd3e05UL, 0x464de6bdUL, -+ 0xb591548dUL, 0x0571c45dUL, 0x6f0406d4UL, 0xff605015UL, -+ 0x241998fbUL, 0x97d6bde9UL, 0xcc894043UL, 0x7767d99eUL, -+ 0xbdb0e842UL, 0x8807898bUL, 0x38e7195bUL, 0xdb79c8eeUL, -+ 0x47a17c0aUL, 0xe97c420fUL, 0xc9f8841eUL, 0x00000000UL, -+ 0x83098086UL, 0x48322bedUL, 0xac1e1170UL, 0x4e6c5a72UL, -+ 0xfbfd0effUL, 0x560f8538UL, 0x1e3daed5UL, 0x27362d39UL, -+ 0x640a0fd9UL, 0x21685ca6UL, 0xd19b5b54UL, 0x3a24362eUL, -+ 0xb10c0a67UL, 0x0f9357e7UL, 0xd2b4ee96UL, 0x9e1b9b91UL, -+ 0x4f80c0c5UL, 0xa261dc20UL, 0x695a774bUL, 0x161c121aUL, -+ 0x0ae293baUL, 0xe5c0a02aUL, 0x433c22e0UL, 0x1d121b17UL, -+ 0x0b0e090dUL, 0xadf28bc7UL, 0xb92db6a8UL, 0xc8141ea9UL, -+ 0x8557f119UL, 0x4caf7507UL, 0xbbee99ddUL, 0xfda37f60UL, -+ 0x9ff70126UL, 0xbc5c72f5UL, 0xc544663bUL, 0x345bfb7eUL, -+ 0x768b4329UL, 0xdccb23c6UL, 0x68b6edfcUL, 0x63b8e4f1UL, -+ 0xcad731dcUL, 0x10426385UL, 0x40139722UL, 0x2084c611UL, -+ 0x7d854a24UL, 0xf8d2bb3dUL, 0x11aef932UL, 0x6dc729a1UL, -+ 0x4b1d9e2fUL, 0xf3dcb230UL, 0xec0d8652UL, 0xd077c1e3UL, -+ 0x6c2bb316UL, 0x99a970b9UL, 0xfa119448UL, 0x2247e964UL, -+ 0xc4a8fc8cUL, 0x1aa0f03fUL, 0xd8567d2cUL, 0xef223390UL, -+ 0xc787494eUL, 0xc1d938d1UL, 0xfe8ccaa2UL, 0x3698d40bUL, -+ 0xcfa6f581UL, 0x28a57adeUL, 0x26dab78eUL, 0xa43fadbfUL, -+ 0xe42c3a9dUL, 0x0d507892UL, 0x9b6a5fccUL, 0x62547e46UL, -+ 0xc2f68d13UL, 0xe890d8b8UL, 0x5e2e39f7UL, 0xf582c3afUL, -+ 0xbe9f5d80UL, 0x7c69d093UL, 0xa96fd52dUL, 0xb3cf2512UL, -+ 0x3bc8ac99UL, 0xa710187dUL, 0x6ee89c63UL, 0x7bdb3bbbUL, -+ 0x09cd2678UL, 0xf46e5918UL, 0x01ec9ab7UL, 0xa8834f9aUL, -+ 0x65e6956eUL, 0x7eaaffe6UL, 0x0821bccfUL, 0xe6ef15e8UL, -+ 0xd9bae79bUL, 0xce4a6f36UL, 0xd4ea9f09UL, 0xd629b07cUL, -+ 0xaf31a4b2UL, 0x312a3f23UL, 0x30c6a594UL, 0xc035a266UL, -+ 0x37744ebcUL, 0xa6fc82caUL, 0xb0e090d0UL, 0x1533a7d8UL, -+ 0x4af10498UL, 0xf741ecdaUL, 0x0e7fcd50UL, 0x2f1791f6UL, -+ 0x8d764dd6UL, 0x4d43efb0UL, 0x54ccaa4dUL, 0xdfe49604UL, -+ 0xe39ed1b5UL, 0x1b4c6a88UL, 0xb8c12c1fUL, 0x7f466551UL, -+ 0x049d5eeaUL, 0x5d018c35UL, 0x73fa8774UL, 0x2efb0b41UL, -+ 0x5ab3671dUL, 0x5292dbd2UL, 0x33e91056UL, 0x136dd647UL, -+ 0x8c9ad761UL, 0x7a37a10cUL, 0x8e59f814UL, 0x89eb133cUL, -+ 0xeecea927UL, 0x35b761c9UL, 0xede11ce5UL, 0x3c7a47b1UL, -+ 0x599cd2dfUL, 0x3f55f273UL, 0x791814ceUL, 0xbf73c737UL, -+ 0xea53f7cdUL, 0x5b5ffdaaUL, 0x14df3d6fUL, 0x867844dbUL, -+ 0x81caaff3UL, 0x3eb968c4UL, 0x2c382434UL, 0x5fc2a340UL, -+ 0x72161dc3UL, 0x0cbce225UL, 0x8b283c49UL, 0x41ff0d95UL, -+ 0x7139a801UL, 0xde080cb3UL, 0x9cd8b4e4UL, 0x906456c1UL, -+ 0x617bcb84UL, 0x70d532b6UL, 0x74486c5cUL, 0x42d0b857UL, -+}; -+static const ulong32 TD2[256] = { -+ 0xa75051f4UL, 0x65537e41UL, 0xa4c31a17UL, 0x5e963a27UL, -+ 0x6bcb3babUL, 0x45f11f9dUL, 0x58abacfaUL, 0x03934be3UL, -+ 0xfa552030UL, 0x6df6ad76UL, 0x769188ccUL, 0x4c25f502UL, -+ 0xd7fc4fe5UL, 0xcbd7c52aUL, 0x44802635UL, 0xa38fb562UL, -+ 0x5a49deb1UL, 0x1b6725baUL, 0x0e9845eaUL, 0xc0e15dfeUL, -+ 0x7502c32fUL, 0xf012814cUL, 0x97a38d46UL, 0xf9c66bd3UL, -+ 0x5fe7038fUL, 0x9c951592UL, 0x7aebbf6dUL, 0x59da9552UL, -+ 0x832dd4beUL, 0x21d35874UL, 0x692949e0UL, 0xc8448ec9UL, -+ 0x896a75c2UL, 0x7978f48eUL, 0x3e6b9958UL, 0x71dd27b9UL, -+ 0x4fb6bee1UL, 0xad17f088UL, 0xac66c920UL, 0x3ab47dceUL, -+ 0x4a1863dfUL, 0x3182e51aUL, 0x33609751UL, 0x7f456253UL, -+ 0x77e0b164UL, 0xae84bb6bUL, 0xa01cfe81UL, 0x2b94f908UL, -+ 0x68587048UL, 0xfd198f45UL, 0x6c8794deUL, 0xf8b7527bUL, -+ 0xd323ab73UL, 0x02e2724bUL, 0x8f57e31fUL, 0xab2a6655UL, -+ 0x2807b2ebUL, 0xc2032fb5UL, 0x7b9a86c5UL, 0x08a5d337UL, -+ 0x87f23028UL, 0xa5b223bfUL, 0x6aba0203UL, 0x825ced16UL, -+ 0x1c2b8acfUL, 0xb492a779UL, 0xf2f0f307UL, 0xe2a14e69UL, -+ 0xf4cd65daUL, 0xbed50605UL, 0x621fd134UL, 0xfe8ac4a6UL, -+ 0x539d342eUL, 0x55a0a2f3UL, 0xe132058aUL, 0xeb75a4f6UL, -+ 0xec390b83UL, 0xefaa4060UL, 0x9f065e71UL, 0x1051bd6eUL, -+ 0x8af93e21UL, 0x063d96ddUL, 0x05aedd3eUL, 0xbd464de6UL, -+ 0x8db59154UL, 0x5d0571c4UL, 0xd46f0406UL, 0x15ff6050UL, -+ 0xfb241998UL, 0xe997d6bdUL, 0x43cc8940UL, 0x9e7767d9UL, -+ 0x42bdb0e8UL, 0x8b880789UL, 0x5b38e719UL, 0xeedb79c8UL, -+ 0x0a47a17cUL, 0x0fe97c42UL, 0x1ec9f884UL, 0x00000000UL, -+ 0x86830980UL, 0xed48322bUL, 0x70ac1e11UL, 0x724e6c5aUL, -+ 0xfffbfd0eUL, 0x38560f85UL, 0xd51e3daeUL, 0x3927362dUL, -+ 0xd9640a0fUL, 0xa621685cUL, 0x54d19b5bUL, 0x2e3a2436UL, -+ 0x67b10c0aUL, 0xe70f9357UL, 0x96d2b4eeUL, 0x919e1b9bUL, -+ 0xc54f80c0UL, 0x20a261dcUL, 0x4b695a77UL, 0x1a161c12UL, -+ 0xba0ae293UL, 0x2ae5c0a0UL, 0xe0433c22UL, 0x171d121bUL, -+ 0x0d0b0e09UL, 0xc7adf28bUL, 0xa8b92db6UL, 0xa9c8141eUL, -+ 0x198557f1UL, 0x074caf75UL, 0xddbbee99UL, 0x60fda37fUL, -+ 0x269ff701UL, 0xf5bc5c72UL, 0x3bc54466UL, 0x7e345bfbUL, -+ 0x29768b43UL, 0xc6dccb23UL, 0xfc68b6edUL, 0xf163b8e4UL, -+ 0xdccad731UL, 0x85104263UL, 0x22401397UL, 0x112084c6UL, -+ 0x247d854aUL, 0x3df8d2bbUL, 0x3211aef9UL, 0xa16dc729UL, -+ 0x2f4b1d9eUL, 0x30f3dcb2UL, 0x52ec0d86UL, 0xe3d077c1UL, -+ 0x166c2bb3UL, 0xb999a970UL, 0x48fa1194UL, 0x642247e9UL, -+ 0x8cc4a8fcUL, 0x3f1aa0f0UL, 0x2cd8567dUL, 0x90ef2233UL, -+ 0x4ec78749UL, 0xd1c1d938UL, 0xa2fe8ccaUL, 0x0b3698d4UL, -+ 0x81cfa6f5UL, 0xde28a57aUL, 0x8e26dab7UL, 0xbfa43fadUL, -+ 0x9de42c3aUL, 0x920d5078UL, 0xcc9b6a5fUL, 0x4662547eUL, -+ 0x13c2f68dUL, 0xb8e890d8UL, 0xf75e2e39UL, 0xaff582c3UL, -+ 0x80be9f5dUL, 0x937c69d0UL, 0x2da96fd5UL, 0x12b3cf25UL, -+ 0x993bc8acUL, 0x7da71018UL, 0x636ee89cUL, 0xbb7bdb3bUL, -+ 0x7809cd26UL, 0x18f46e59UL, 0xb701ec9aUL, 0x9aa8834fUL, -+ 0x6e65e695UL, 0xe67eaaffUL, 0xcf0821bcUL, 0xe8e6ef15UL, -+ 0x9bd9bae7UL, 0x36ce4a6fUL, 0x09d4ea9fUL, 0x7cd629b0UL, -+ 0xb2af31a4UL, 0x23312a3fUL, 0x9430c6a5UL, 0x66c035a2UL, -+ 0xbc37744eUL, 0xcaa6fc82UL, 0xd0b0e090UL, 0xd81533a7UL, -+ 0x984af104UL, 0xdaf741ecUL, 0x500e7fcdUL, 0xf62f1791UL, -+ 0xd68d764dUL, 0xb04d43efUL, 0x4d54ccaaUL, 0x04dfe496UL, -+ 0xb5e39ed1UL, 0x881b4c6aUL, 0x1fb8c12cUL, 0x517f4665UL, -+ 0xea049d5eUL, 0x355d018cUL, 0x7473fa87UL, 0x412efb0bUL, -+ 0x1d5ab367UL, 0xd25292dbUL, 0x5633e910UL, 0x47136dd6UL, -+ 0x618c9ad7UL, 0x0c7a37a1UL, 0x148e59f8UL, 0x3c89eb13UL, -+ 0x27eecea9UL, 0xc935b761UL, 0xe5ede11cUL, 0xb13c7a47UL, -+ 0xdf599cd2UL, 0x733f55f2UL, 0xce791814UL, 0x37bf73c7UL, -+ 0xcdea53f7UL, 0xaa5b5ffdUL, 0x6f14df3dUL, 0xdb867844UL, -+ 0xf381caafUL, 0xc43eb968UL, 0x342c3824UL, 0x405fc2a3UL, -+ 0xc372161dUL, 0x250cbce2UL, 0x498b283cUL, 0x9541ff0dUL, -+ 0x017139a8UL, 0xb3de080cUL, 0xe49cd8b4UL, 0xc1906456UL, -+ 0x84617bcbUL, 0xb670d532UL, 0x5c74486cUL, 0x5742d0b8UL, -+}; -+static const ulong32 TD3[256] = { -+ 0xf4a75051UL, 0x4165537eUL, 0x17a4c31aUL, 0x275e963aUL, -+ 0xab6bcb3bUL, 0x9d45f11fUL, 0xfa58abacUL, 0xe303934bUL, -+ 0x30fa5520UL, 0x766df6adUL, 0xcc769188UL, 0x024c25f5UL, -+ 0xe5d7fc4fUL, 0x2acbd7c5UL, 0x35448026UL, 0x62a38fb5UL, -+ 0xb15a49deUL, 0xba1b6725UL, 0xea0e9845UL, 0xfec0e15dUL, -+ 0x2f7502c3UL, 0x4cf01281UL, 0x4697a38dUL, 0xd3f9c66bUL, -+ 0x8f5fe703UL, 0x929c9515UL, 0x6d7aebbfUL, 0x5259da95UL, -+ 0xbe832dd4UL, 0x7421d358UL, 0xe0692949UL, 0xc9c8448eUL, -+ 0xc2896a75UL, 0x8e7978f4UL, 0x583e6b99UL, 0xb971dd27UL, -+ 0xe14fb6beUL, 0x88ad17f0UL, 0x20ac66c9UL, 0xce3ab47dUL, -+ 0xdf4a1863UL, 0x1a3182e5UL, 0x51336097UL, 0x537f4562UL, -+ 0x6477e0b1UL, 0x6bae84bbUL, 0x81a01cfeUL, 0x082b94f9UL, -+ 0x48685870UL, 0x45fd198fUL, 0xde6c8794UL, 0x7bf8b752UL, -+ 0x73d323abUL, 0x4b02e272UL, 0x1f8f57e3UL, 0x55ab2a66UL, -+ 0xeb2807b2UL, 0xb5c2032fUL, 0xc57b9a86UL, 0x3708a5d3UL, -+ 0x2887f230UL, 0xbfa5b223UL, 0x036aba02UL, 0x16825cedUL, -+ 0xcf1c2b8aUL, 0x79b492a7UL, 0x07f2f0f3UL, 0x69e2a14eUL, -+ 0xdaf4cd65UL, 0x05bed506UL, 0x34621fd1UL, 0xa6fe8ac4UL, -+ 0x2e539d34UL, 0xf355a0a2UL, 0x8ae13205UL, 0xf6eb75a4UL, -+ 0x83ec390bUL, 0x60efaa40UL, 0x719f065eUL, 0x6e1051bdUL, -+ 0x218af93eUL, 0xdd063d96UL, 0x3e05aeddUL, 0xe6bd464dUL, -+ 0x548db591UL, 0xc45d0571UL, 0x06d46f04UL, 0x5015ff60UL, -+ 0x98fb2419UL, 0xbde997d6UL, 0x4043cc89UL, 0xd99e7767UL, -+ 0xe842bdb0UL, 0x898b8807UL, 0x195b38e7UL, 0xc8eedb79UL, -+ 0x7c0a47a1UL, 0x420fe97cUL, 0x841ec9f8UL, 0x00000000UL, -+ 0x80868309UL, 0x2bed4832UL, 0x1170ac1eUL, 0x5a724e6cUL, -+ 0x0efffbfdUL, 0x8538560fUL, 0xaed51e3dUL, 0x2d392736UL, -+ 0x0fd9640aUL, 0x5ca62168UL, 0x5b54d19bUL, 0x362e3a24UL, -+ 0x0a67b10cUL, 0x57e70f93UL, 0xee96d2b4UL, 0x9b919e1bUL, -+ 0xc0c54f80UL, 0xdc20a261UL, 0x774b695aUL, 0x121a161cUL, -+ 0x93ba0ae2UL, 0xa02ae5c0UL, 0x22e0433cUL, 0x1b171d12UL, -+ 0x090d0b0eUL, 0x8bc7adf2UL, 0xb6a8b92dUL, 0x1ea9c814UL, -+ 0xf1198557UL, 0x75074cafUL, 0x99ddbbeeUL, 0x7f60fda3UL, -+ 0x01269ff7UL, 0x72f5bc5cUL, 0x663bc544UL, 0xfb7e345bUL, -+ 0x4329768bUL, 0x23c6dccbUL, 0xedfc68b6UL, 0xe4f163b8UL, -+ 0x31dccad7UL, 0x63851042UL, 0x97224013UL, 0xc6112084UL, -+ 0x4a247d85UL, 0xbb3df8d2UL, 0xf93211aeUL, 0x29a16dc7UL, -+ 0x9e2f4b1dUL, 0xb230f3dcUL, 0x8652ec0dUL, 0xc1e3d077UL, -+ 0xb3166c2bUL, 0x70b999a9UL, 0x9448fa11UL, 0xe9642247UL, -+ 0xfc8cc4a8UL, 0xf03f1aa0UL, 0x7d2cd856UL, 0x3390ef22UL, -+ 0x494ec787UL, 0x38d1c1d9UL, 0xcaa2fe8cUL, 0xd40b3698UL, -+ 0xf581cfa6UL, 0x7ade28a5UL, 0xb78e26daUL, 0xadbfa43fUL, -+ 0x3a9de42cUL, 0x78920d50UL, 0x5fcc9b6aUL, 0x7e466254UL, -+ 0x8d13c2f6UL, 0xd8b8e890UL, 0x39f75e2eUL, 0xc3aff582UL, -+ 0x5d80be9fUL, 0xd0937c69UL, 0xd52da96fUL, 0x2512b3cfUL, -+ 0xac993bc8UL, 0x187da710UL, 0x9c636ee8UL, 0x3bbb7bdbUL, -+ 0x267809cdUL, 0x5918f46eUL, 0x9ab701ecUL, 0x4f9aa883UL, -+ 0x956e65e6UL, 0xffe67eaaUL, 0xbccf0821UL, 0x15e8e6efUL, -+ 0xe79bd9baUL, 0x6f36ce4aUL, 0x9f09d4eaUL, 0xb07cd629UL, -+ 0xa4b2af31UL, 0x3f23312aUL, 0xa59430c6UL, 0xa266c035UL, -+ 0x4ebc3774UL, 0x82caa6fcUL, 0x90d0b0e0UL, 0xa7d81533UL, -+ 0x04984af1UL, 0xecdaf741UL, 0xcd500e7fUL, 0x91f62f17UL, -+ 0x4dd68d76UL, 0xefb04d43UL, 0xaa4d54ccUL, 0x9604dfe4UL, -+ 0xd1b5e39eUL, 0x6a881b4cUL, 0x2c1fb8c1UL, 0x65517f46UL, -+ 0x5eea049dUL, 0x8c355d01UL, 0x877473faUL, 0x0b412efbUL, -+ 0x671d5ab3UL, 0xdbd25292UL, 0x105633e9UL, 0xd647136dUL, -+ 0xd7618c9aUL, 0xa10c7a37UL, 0xf8148e59UL, 0x133c89ebUL, -+ 0xa927eeceUL, 0x61c935b7UL, 0x1ce5ede1UL, 0x47b13c7aUL, -+ 0xd2df599cUL, 0xf2733f55UL, 0x14ce7918UL, 0xc737bf73UL, -+ 0xf7cdea53UL, 0xfdaa5b5fUL, 0x3d6f14dfUL, 0x44db8678UL, -+ 0xaff381caUL, 0x68c43eb9UL, 0x24342c38UL, 0xa3405fc2UL, -+ 0x1dc37216UL, 0xe2250cbcUL, 0x3c498b28UL, 0x0d9541ffUL, -+ 0xa8017139UL, 0x0cb3de08UL, 0xb4e49cd8UL, 0x56c19064UL, -+ 0xcb84617bUL, 0x32b670d5UL, 0x6c5c7448UL, 0xb85742d0UL, -+}; -+ -+static const ulong32 Tks0[] = { -+0x00000000UL, 0x0e090d0bUL, 0x1c121a16UL, 0x121b171dUL, 0x3824342cUL, 0x362d3927UL, 0x24362e3aUL, 0x2a3f2331UL, -+0x70486858UL, 0x7e416553UL, 0x6c5a724eUL, 0x62537f45UL, 0x486c5c74UL, 0x4665517fUL, 0x547e4662UL, 0x5a774b69UL, -+0xe090d0b0UL, 0xee99ddbbUL, 0xfc82caa6UL, 0xf28bc7adUL, 0xd8b4e49cUL, 0xd6bde997UL, 0xc4a6fe8aUL, 0xcaaff381UL, -+0x90d8b8e8UL, 0x9ed1b5e3UL, 0x8ccaa2feUL, 0x82c3aff5UL, 0xa8fc8cc4UL, 0xa6f581cfUL, 0xb4ee96d2UL, 0xbae79bd9UL, -+0xdb3bbb7bUL, 0xd532b670UL, 0xc729a16dUL, 0xc920ac66UL, 0xe31f8f57UL, 0xed16825cUL, 0xff0d9541UL, 0xf104984aUL, -+0xab73d323UL, 0xa57ade28UL, 0xb761c935UL, 0xb968c43eUL, 0x9357e70fUL, 0x9d5eea04UL, 0x8f45fd19UL, 0x814cf012UL, -+0x3bab6bcbUL, 0x35a266c0UL, 0x27b971ddUL, 0x29b07cd6UL, 0x038f5fe7UL, 0x0d8652ecUL, 0x1f9d45f1UL, 0x119448faUL, -+0x4be30393UL, 0x45ea0e98UL, 0x57f11985UL, 0x59f8148eUL, 0x73c737bfUL, 0x7dce3ab4UL, 0x6fd52da9UL, 0x61dc20a2UL, -+0xad766df6UL, 0xa37f60fdUL, 0xb16477e0UL, 0xbf6d7aebUL, 0x955259daUL, 0x9b5b54d1UL, 0x894043ccUL, 0x87494ec7UL, -+0xdd3e05aeUL, 0xd33708a5UL, 0xc12c1fb8UL, 0xcf2512b3UL, 0xe51a3182UL, 0xeb133c89UL, 0xf9082b94UL, 0xf701269fUL, -+0x4de6bd46UL, 0x43efb04dUL, 0x51f4a750UL, 0x5ffdaa5bUL, 0x75c2896aUL, 0x7bcb8461UL, 0x69d0937cUL, 0x67d99e77UL, -+0x3daed51eUL, 0x33a7d815UL, 0x21bccf08UL, 0x2fb5c203UL, 0x058ae132UL, 0x0b83ec39UL, 0x1998fb24UL, 0x1791f62fUL, -+0x764dd68dUL, 0x7844db86UL, 0x6a5fcc9bUL, 0x6456c190UL, 0x4e69e2a1UL, 0x4060efaaUL, 0x527bf8b7UL, 0x5c72f5bcUL, -+0x0605bed5UL, 0x080cb3deUL, 0x1a17a4c3UL, 0x141ea9c8UL, 0x3e218af9UL, 0x302887f2UL, 0x223390efUL, 0x2c3a9de4UL, -+0x96dd063dUL, 0x98d40b36UL, 0x8acf1c2bUL, 0x84c61120UL, 0xaef93211UL, 0xa0f03f1aUL, 0xb2eb2807UL, 0xbce2250cUL, -+0xe6956e65UL, 0xe89c636eUL, 0xfa877473UL, 0xf48e7978UL, 0xdeb15a49UL, 0xd0b85742UL, 0xc2a3405fUL, 0xccaa4d54UL, -+0x41ecdaf7UL, 0x4fe5d7fcUL, 0x5dfec0e1UL, 0x53f7cdeaUL, 0x79c8eedbUL, 0x77c1e3d0UL, 0x65daf4cdUL, 0x6bd3f9c6UL, -+0x31a4b2afUL, 0x3fadbfa4UL, 0x2db6a8b9UL, 0x23bfa5b2UL, 0x09808683UL, 0x07898b88UL, 0x15929c95UL, 0x1b9b919eUL, -+0xa17c0a47UL, 0xaf75074cUL, 0xbd6e1051UL, 0xb3671d5aUL, 0x99583e6bUL, 0x97513360UL, 0x854a247dUL, 0x8b432976UL, -+0xd134621fUL, 0xdf3d6f14UL, 0xcd267809UL, 0xc32f7502UL, 0xe9105633UL, 0xe7195b38UL, 0xf5024c25UL, 0xfb0b412eUL, -+0x9ad7618cUL, 0x94de6c87UL, 0x86c57b9aUL, 0x88cc7691UL, 0xa2f355a0UL, 0xacfa58abUL, 0xbee14fb6UL, 0xb0e842bdUL, -+0xea9f09d4UL, 0xe49604dfUL, 0xf68d13c2UL, 0xf8841ec9UL, 0xd2bb3df8UL, 0xdcb230f3UL, 0xcea927eeUL, 0xc0a02ae5UL, -+0x7a47b13cUL, 0x744ebc37UL, 0x6655ab2aUL, 0x685ca621UL, 0x42638510UL, 0x4c6a881bUL, 0x5e719f06UL, 0x5078920dUL, -+0x0a0fd964UL, 0x0406d46fUL, 0x161dc372UL, 0x1814ce79UL, 0x322bed48UL, 0x3c22e043UL, 0x2e39f75eUL, 0x2030fa55UL, -+0xec9ab701UL, 0xe293ba0aUL, 0xf088ad17UL, 0xfe81a01cUL, 0xd4be832dUL, 0xdab78e26UL, 0xc8ac993bUL, 0xc6a59430UL, -+0x9cd2df59UL, 0x92dbd252UL, 0x80c0c54fUL, 0x8ec9c844UL, 0xa4f6eb75UL, 0xaaffe67eUL, 0xb8e4f163UL, 0xb6edfc68UL, -+0x0c0a67b1UL, 0x02036abaUL, 0x10187da7UL, 0x1e1170acUL, 0x342e539dUL, 0x3a275e96UL, 0x283c498bUL, 0x26354480UL, -+0x7c420fe9UL, 0x724b02e2UL, 0x605015ffUL, 0x6e5918f4UL, 0x44663bc5UL, 0x4a6f36ceUL, 0x587421d3UL, 0x567d2cd8UL, -+0x37a10c7aUL, 0x39a80171UL, 0x2bb3166cUL, 0x25ba1b67UL, 0x0f853856UL, 0x018c355dUL, 0x13972240UL, 0x1d9e2f4bUL, -+0x47e96422UL, 0x49e06929UL, 0x5bfb7e34UL, 0x55f2733fUL, 0x7fcd500eUL, 0x71c45d05UL, 0x63df4a18UL, 0x6dd64713UL, -+0xd731dccaUL, 0xd938d1c1UL, 0xcb23c6dcUL, 0xc52acbd7UL, 0xef15e8e6UL, 0xe11ce5edUL, 0xf307f2f0UL, 0xfd0efffbUL, -+0xa779b492UL, 0xa970b999UL, 0xbb6bae84UL, 0xb562a38fUL, 0x9f5d80beUL, 0x91548db5UL, 0x834f9aa8UL, 0x8d4697a3UL -+}; -+ -+static const ulong32 Tks1[] = { -+0x00000000UL, 0x0b0e090dUL, 0x161c121aUL, 0x1d121b17UL, 0x2c382434UL, 0x27362d39UL, 0x3a24362eUL, 0x312a3f23UL, -+0x58704868UL, 0x537e4165UL, 0x4e6c5a72UL, 0x4562537fUL, 0x74486c5cUL, 0x7f466551UL, 0x62547e46UL, 0x695a774bUL, -+0xb0e090d0UL, 0xbbee99ddUL, 0xa6fc82caUL, 0xadf28bc7UL, 0x9cd8b4e4UL, 0x97d6bde9UL, 0x8ac4a6feUL, 0x81caaff3UL, -+0xe890d8b8UL, 0xe39ed1b5UL, 0xfe8ccaa2UL, 0xf582c3afUL, 0xc4a8fc8cUL, 0xcfa6f581UL, 0xd2b4ee96UL, 0xd9bae79bUL, -+0x7bdb3bbbUL, 0x70d532b6UL, 0x6dc729a1UL, 0x66c920acUL, 0x57e31f8fUL, 0x5ced1682UL, 0x41ff0d95UL, 0x4af10498UL, -+0x23ab73d3UL, 0x28a57adeUL, 0x35b761c9UL, 0x3eb968c4UL, 0x0f9357e7UL, 0x049d5eeaUL, 0x198f45fdUL, 0x12814cf0UL, -+0xcb3bab6bUL, 0xc035a266UL, 0xdd27b971UL, 0xd629b07cUL, 0xe7038f5fUL, 0xec0d8652UL, 0xf11f9d45UL, 0xfa119448UL, -+0x934be303UL, 0x9845ea0eUL, 0x8557f119UL, 0x8e59f814UL, 0xbf73c737UL, 0xb47dce3aUL, 0xa96fd52dUL, 0xa261dc20UL, -+0xf6ad766dUL, 0xfda37f60UL, 0xe0b16477UL, 0xebbf6d7aUL, 0xda955259UL, 0xd19b5b54UL, 0xcc894043UL, 0xc787494eUL, -+0xaedd3e05UL, 0xa5d33708UL, 0xb8c12c1fUL, 0xb3cf2512UL, 0x82e51a31UL, 0x89eb133cUL, 0x94f9082bUL, 0x9ff70126UL, -+0x464de6bdUL, 0x4d43efb0UL, 0x5051f4a7UL, 0x5b5ffdaaUL, 0x6a75c289UL, 0x617bcb84UL, 0x7c69d093UL, 0x7767d99eUL, -+0x1e3daed5UL, 0x1533a7d8UL, 0x0821bccfUL, 0x032fb5c2UL, 0x32058ae1UL, 0x390b83ecUL, 0x241998fbUL, 0x2f1791f6UL, -+0x8d764dd6UL, 0x867844dbUL, 0x9b6a5fccUL, 0x906456c1UL, 0xa14e69e2UL, 0xaa4060efUL, 0xb7527bf8UL, 0xbc5c72f5UL, -+0xd50605beUL, 0xde080cb3UL, 0xc31a17a4UL, 0xc8141ea9UL, 0xf93e218aUL, 0xf2302887UL, 0xef223390UL, 0xe42c3a9dUL, -+0x3d96dd06UL, 0x3698d40bUL, 0x2b8acf1cUL, 0x2084c611UL, 0x11aef932UL, 0x1aa0f03fUL, 0x07b2eb28UL, 0x0cbce225UL, -+0x65e6956eUL, 0x6ee89c63UL, 0x73fa8774UL, 0x78f48e79UL, 0x49deb15aUL, 0x42d0b857UL, 0x5fc2a340UL, 0x54ccaa4dUL, -+0xf741ecdaUL, 0xfc4fe5d7UL, 0xe15dfec0UL, 0xea53f7cdUL, 0xdb79c8eeUL, 0xd077c1e3UL, 0xcd65daf4UL, 0xc66bd3f9UL, -+0xaf31a4b2UL, 0xa43fadbfUL, 0xb92db6a8UL, 0xb223bfa5UL, 0x83098086UL, 0x8807898bUL, 0x9515929cUL, 0x9e1b9b91UL, -+0x47a17c0aUL, 0x4caf7507UL, 0x51bd6e10UL, 0x5ab3671dUL, 0x6b99583eUL, 0x60975133UL, 0x7d854a24UL, 0x768b4329UL, -+0x1fd13462UL, 0x14df3d6fUL, 0x09cd2678UL, 0x02c32f75UL, 0x33e91056UL, 0x38e7195bUL, 0x25f5024cUL, 0x2efb0b41UL, -+0x8c9ad761UL, 0x8794de6cUL, 0x9a86c57bUL, 0x9188cc76UL, 0xa0a2f355UL, 0xabacfa58UL, 0xb6bee14fUL, 0xbdb0e842UL, -+0xd4ea9f09UL, 0xdfe49604UL, 0xc2f68d13UL, 0xc9f8841eUL, 0xf8d2bb3dUL, 0xf3dcb230UL, 0xeecea927UL, 0xe5c0a02aUL, -+0x3c7a47b1UL, 0x37744ebcUL, 0x2a6655abUL, 0x21685ca6UL, 0x10426385UL, 0x1b4c6a88UL, 0x065e719fUL, 0x0d507892UL, -+0x640a0fd9UL, 0x6f0406d4UL, 0x72161dc3UL, 0x791814ceUL, 0x48322bedUL, 0x433c22e0UL, 0x5e2e39f7UL, 0x552030faUL, -+0x01ec9ab7UL, 0x0ae293baUL, 0x17f088adUL, 0x1cfe81a0UL, 0x2dd4be83UL, 0x26dab78eUL, 0x3bc8ac99UL, 0x30c6a594UL, -+0x599cd2dfUL, 0x5292dbd2UL, 0x4f80c0c5UL, 0x448ec9c8UL, 0x75a4f6ebUL, 0x7eaaffe6UL, 0x63b8e4f1UL, 0x68b6edfcUL, -+0xb10c0a67UL, 0xba02036aUL, 0xa710187dUL, 0xac1e1170UL, 0x9d342e53UL, 0x963a275eUL, 0x8b283c49UL, 0x80263544UL, -+0xe97c420fUL, 0xe2724b02UL, 0xff605015UL, 0xf46e5918UL, 0xc544663bUL, 0xce4a6f36UL, 0xd3587421UL, 0xd8567d2cUL, -+0x7a37a10cUL, 0x7139a801UL, 0x6c2bb316UL, 0x6725ba1bUL, 0x560f8538UL, 0x5d018c35UL, 0x40139722UL, 0x4b1d9e2fUL, -+0x2247e964UL, 0x2949e069UL, 0x345bfb7eUL, 0x3f55f273UL, 0x0e7fcd50UL, 0x0571c45dUL, 0x1863df4aUL, 0x136dd647UL, -+0xcad731dcUL, 0xc1d938d1UL, 0xdccb23c6UL, 0xd7c52acbUL, 0xe6ef15e8UL, 0xede11ce5UL, 0xf0f307f2UL, 0xfbfd0effUL, -+0x92a779b4UL, 0x99a970b9UL, 0x84bb6baeUL, 0x8fb562a3UL, 0xbe9f5d80UL, 0xb591548dUL, 0xa8834f9aUL, 0xa38d4697UL -+}; -+ -+static const ulong32 Tks2[] = { -+0x00000000UL, 0x0d0b0e09UL, 0x1a161c12UL, 0x171d121bUL, 0x342c3824UL, 0x3927362dUL, 0x2e3a2436UL, 0x23312a3fUL, -+0x68587048UL, 0x65537e41UL, 0x724e6c5aUL, 0x7f456253UL, 0x5c74486cUL, 0x517f4665UL, 0x4662547eUL, 0x4b695a77UL, -+0xd0b0e090UL, 0xddbbee99UL, 0xcaa6fc82UL, 0xc7adf28bUL, 0xe49cd8b4UL, 0xe997d6bdUL, 0xfe8ac4a6UL, 0xf381caafUL, -+0xb8e890d8UL, 0xb5e39ed1UL, 0xa2fe8ccaUL, 0xaff582c3UL, 0x8cc4a8fcUL, 0x81cfa6f5UL, 0x96d2b4eeUL, 0x9bd9bae7UL, -+0xbb7bdb3bUL, 0xb670d532UL, 0xa16dc729UL, 0xac66c920UL, 0x8f57e31fUL, 0x825ced16UL, 0x9541ff0dUL, 0x984af104UL, -+0xd323ab73UL, 0xde28a57aUL, 0xc935b761UL, 0xc43eb968UL, 0xe70f9357UL, 0xea049d5eUL, 0xfd198f45UL, 0xf012814cUL, -+0x6bcb3babUL, 0x66c035a2UL, 0x71dd27b9UL, 0x7cd629b0UL, 0x5fe7038fUL, 0x52ec0d86UL, 0x45f11f9dUL, 0x48fa1194UL, -+0x03934be3UL, 0x0e9845eaUL, 0x198557f1UL, 0x148e59f8UL, 0x37bf73c7UL, 0x3ab47dceUL, 0x2da96fd5UL, 0x20a261dcUL, -+0x6df6ad76UL, 0x60fda37fUL, 0x77e0b164UL, 0x7aebbf6dUL, 0x59da9552UL, 0x54d19b5bUL, 0x43cc8940UL, 0x4ec78749UL, -+0x05aedd3eUL, 0x08a5d337UL, 0x1fb8c12cUL, 0x12b3cf25UL, 0x3182e51aUL, 0x3c89eb13UL, 0x2b94f908UL, 0x269ff701UL, -+0xbd464de6UL, 0xb04d43efUL, 0xa75051f4UL, 0xaa5b5ffdUL, 0x896a75c2UL, 0x84617bcbUL, 0x937c69d0UL, 0x9e7767d9UL, -+0xd51e3daeUL, 0xd81533a7UL, 0xcf0821bcUL, 0xc2032fb5UL, 0xe132058aUL, 0xec390b83UL, 0xfb241998UL, 0xf62f1791UL, -+0xd68d764dUL, 0xdb867844UL, 0xcc9b6a5fUL, 0xc1906456UL, 0xe2a14e69UL, 0xefaa4060UL, 0xf8b7527bUL, 0xf5bc5c72UL, -+0xbed50605UL, 0xb3de080cUL, 0xa4c31a17UL, 0xa9c8141eUL, 0x8af93e21UL, 0x87f23028UL, 0x90ef2233UL, 0x9de42c3aUL, -+0x063d96ddUL, 0x0b3698d4UL, 0x1c2b8acfUL, 0x112084c6UL, 0x3211aef9UL, 0x3f1aa0f0UL, 0x2807b2ebUL, 0x250cbce2UL, -+0x6e65e695UL, 0x636ee89cUL, 0x7473fa87UL, 0x7978f48eUL, 0x5a49deb1UL, 0x5742d0b8UL, 0x405fc2a3UL, 0x4d54ccaaUL, -+0xdaf741ecUL, 0xd7fc4fe5UL, 0xc0e15dfeUL, 0xcdea53f7UL, 0xeedb79c8UL, 0xe3d077c1UL, 0xf4cd65daUL, 0xf9c66bd3UL, -+0xb2af31a4UL, 0xbfa43fadUL, 0xa8b92db6UL, 0xa5b223bfUL, 0x86830980UL, 0x8b880789UL, 0x9c951592UL, 0x919e1b9bUL, -+0x0a47a17cUL, 0x074caf75UL, 0x1051bd6eUL, 0x1d5ab367UL, 0x3e6b9958UL, 0x33609751UL, 0x247d854aUL, 0x29768b43UL, -+0x621fd134UL, 0x6f14df3dUL, 0x7809cd26UL, 0x7502c32fUL, 0x5633e910UL, 0x5b38e719UL, 0x4c25f502UL, 0x412efb0bUL, -+0x618c9ad7UL, 0x6c8794deUL, 0x7b9a86c5UL, 0x769188ccUL, 0x55a0a2f3UL, 0x58abacfaUL, 0x4fb6bee1UL, 0x42bdb0e8UL, -+0x09d4ea9fUL, 0x04dfe496UL, 0x13c2f68dUL, 0x1ec9f884UL, 0x3df8d2bbUL, 0x30f3dcb2UL, 0x27eecea9UL, 0x2ae5c0a0UL, -+0xb13c7a47UL, 0xbc37744eUL, 0xab2a6655UL, 0xa621685cUL, 0x85104263UL, 0x881b4c6aUL, 0x9f065e71UL, 0x920d5078UL, -+0xd9640a0fUL, 0xd46f0406UL, 0xc372161dUL, 0xce791814UL, 0xed48322bUL, 0xe0433c22UL, 0xf75e2e39UL, 0xfa552030UL, -+0xb701ec9aUL, 0xba0ae293UL, 0xad17f088UL, 0xa01cfe81UL, 0x832dd4beUL, 0x8e26dab7UL, 0x993bc8acUL, 0x9430c6a5UL, -+0xdf599cd2UL, 0xd25292dbUL, 0xc54f80c0UL, 0xc8448ec9UL, 0xeb75a4f6UL, 0xe67eaaffUL, 0xf163b8e4UL, 0xfc68b6edUL, -+0x67b10c0aUL, 0x6aba0203UL, 0x7da71018UL, 0x70ac1e11UL, 0x539d342eUL, 0x5e963a27UL, 0x498b283cUL, 0x44802635UL, -+0x0fe97c42UL, 0x02e2724bUL, 0x15ff6050UL, 0x18f46e59UL, 0x3bc54466UL, 0x36ce4a6fUL, 0x21d35874UL, 0x2cd8567dUL, -+0x0c7a37a1UL, 0x017139a8UL, 0x166c2bb3UL, 0x1b6725baUL, 0x38560f85UL, 0x355d018cUL, 0x22401397UL, 0x2f4b1d9eUL, -+0x642247e9UL, 0x692949e0UL, 0x7e345bfbUL, 0x733f55f2UL, 0x500e7fcdUL, 0x5d0571c4UL, 0x4a1863dfUL, 0x47136dd6UL, -+0xdccad731UL, 0xd1c1d938UL, 0xc6dccb23UL, 0xcbd7c52aUL, 0xe8e6ef15UL, 0xe5ede11cUL, 0xf2f0f307UL, 0xfffbfd0eUL, -+0xb492a779UL, 0xb999a970UL, 0xae84bb6bUL, 0xa38fb562UL, 0x80be9f5dUL, 0x8db59154UL, 0x9aa8834fUL, 0x97a38d46UL -+}; -+ -+static const ulong32 Tks3[] = { -+0x00000000UL, 0x090d0b0eUL, 0x121a161cUL, 0x1b171d12UL, 0x24342c38UL, 0x2d392736UL, 0x362e3a24UL, 0x3f23312aUL, -+0x48685870UL, 0x4165537eUL, 0x5a724e6cUL, 0x537f4562UL, 0x6c5c7448UL, 0x65517f46UL, 0x7e466254UL, 0x774b695aUL, -+0x90d0b0e0UL, 0x99ddbbeeUL, 0x82caa6fcUL, 0x8bc7adf2UL, 0xb4e49cd8UL, 0xbde997d6UL, 0xa6fe8ac4UL, 0xaff381caUL, -+0xd8b8e890UL, 0xd1b5e39eUL, 0xcaa2fe8cUL, 0xc3aff582UL, 0xfc8cc4a8UL, 0xf581cfa6UL, 0xee96d2b4UL, 0xe79bd9baUL, -+0x3bbb7bdbUL, 0x32b670d5UL, 0x29a16dc7UL, 0x20ac66c9UL, 0x1f8f57e3UL, 0x16825cedUL, 0x0d9541ffUL, 0x04984af1UL, -+0x73d323abUL, 0x7ade28a5UL, 0x61c935b7UL, 0x68c43eb9UL, 0x57e70f93UL, 0x5eea049dUL, 0x45fd198fUL, 0x4cf01281UL, -+0xab6bcb3bUL, 0xa266c035UL, 0xb971dd27UL, 0xb07cd629UL, 0x8f5fe703UL, 0x8652ec0dUL, 0x9d45f11fUL, 0x9448fa11UL, -+0xe303934bUL, 0xea0e9845UL, 0xf1198557UL, 0xf8148e59UL, 0xc737bf73UL, 0xce3ab47dUL, 0xd52da96fUL, 0xdc20a261UL, -+0x766df6adUL, 0x7f60fda3UL, 0x6477e0b1UL, 0x6d7aebbfUL, 0x5259da95UL, 0x5b54d19bUL, 0x4043cc89UL, 0x494ec787UL, -+0x3e05aeddUL, 0x3708a5d3UL, 0x2c1fb8c1UL, 0x2512b3cfUL, 0x1a3182e5UL, 0x133c89ebUL, 0x082b94f9UL, 0x01269ff7UL, -+0xe6bd464dUL, 0xefb04d43UL, 0xf4a75051UL, 0xfdaa5b5fUL, 0xc2896a75UL, 0xcb84617bUL, 0xd0937c69UL, 0xd99e7767UL, -+0xaed51e3dUL, 0xa7d81533UL, 0xbccf0821UL, 0xb5c2032fUL, 0x8ae13205UL, 0x83ec390bUL, 0x98fb2419UL, 0x91f62f17UL, -+0x4dd68d76UL, 0x44db8678UL, 0x5fcc9b6aUL, 0x56c19064UL, 0x69e2a14eUL, 0x60efaa40UL, 0x7bf8b752UL, 0x72f5bc5cUL, -+0x05bed506UL, 0x0cb3de08UL, 0x17a4c31aUL, 0x1ea9c814UL, 0x218af93eUL, 0x2887f230UL, 0x3390ef22UL, 0x3a9de42cUL, -+0xdd063d96UL, 0xd40b3698UL, 0xcf1c2b8aUL, 0xc6112084UL, 0xf93211aeUL, 0xf03f1aa0UL, 0xeb2807b2UL, 0xe2250cbcUL, -+0x956e65e6UL, 0x9c636ee8UL, 0x877473faUL, 0x8e7978f4UL, 0xb15a49deUL, 0xb85742d0UL, 0xa3405fc2UL, 0xaa4d54ccUL, -+0xecdaf741UL, 0xe5d7fc4fUL, 0xfec0e15dUL, 0xf7cdea53UL, 0xc8eedb79UL, 0xc1e3d077UL, 0xdaf4cd65UL, 0xd3f9c66bUL, -+0xa4b2af31UL, 0xadbfa43fUL, 0xb6a8b92dUL, 0xbfa5b223UL, 0x80868309UL, 0x898b8807UL, 0x929c9515UL, 0x9b919e1bUL, -+0x7c0a47a1UL, 0x75074cafUL, 0x6e1051bdUL, 0x671d5ab3UL, 0x583e6b99UL, 0x51336097UL, 0x4a247d85UL, 0x4329768bUL, -+0x34621fd1UL, 0x3d6f14dfUL, 0x267809cdUL, 0x2f7502c3UL, 0x105633e9UL, 0x195b38e7UL, 0x024c25f5UL, 0x0b412efbUL, -+0xd7618c9aUL, 0xde6c8794UL, 0xc57b9a86UL, 0xcc769188UL, 0xf355a0a2UL, 0xfa58abacUL, 0xe14fb6beUL, 0xe842bdb0UL, -+0x9f09d4eaUL, 0x9604dfe4UL, 0x8d13c2f6UL, 0x841ec9f8UL, 0xbb3df8d2UL, 0xb230f3dcUL, 0xa927eeceUL, 0xa02ae5c0UL, -+0x47b13c7aUL, 0x4ebc3774UL, 0x55ab2a66UL, 0x5ca62168UL, 0x63851042UL, 0x6a881b4cUL, 0x719f065eUL, 0x78920d50UL, -+0x0fd9640aUL, 0x06d46f04UL, 0x1dc37216UL, 0x14ce7918UL, 0x2bed4832UL, 0x22e0433cUL, 0x39f75e2eUL, 0x30fa5520UL, -+0x9ab701ecUL, 0x93ba0ae2UL, 0x88ad17f0UL, 0x81a01cfeUL, 0xbe832dd4UL, 0xb78e26daUL, 0xac993bc8UL, 0xa59430c6UL, -+0xd2df599cUL, 0xdbd25292UL, 0xc0c54f80UL, 0xc9c8448eUL, 0xf6eb75a4UL, 0xffe67eaaUL, 0xe4f163b8UL, 0xedfc68b6UL, -+0x0a67b10cUL, 0x036aba02UL, 0x187da710UL, 0x1170ac1eUL, 0x2e539d34UL, 0x275e963aUL, 0x3c498b28UL, 0x35448026UL, -+0x420fe97cUL, 0x4b02e272UL, 0x5015ff60UL, 0x5918f46eUL, 0x663bc544UL, 0x6f36ce4aUL, 0x7421d358UL, 0x7d2cd856UL, -+0xa10c7a37UL, 0xa8017139UL, 0xb3166c2bUL, 0xba1b6725UL, 0x8538560fUL, 0x8c355d01UL, 0x97224013UL, 0x9e2f4b1dUL, -+0xe9642247UL, 0xe0692949UL, 0xfb7e345bUL, 0xf2733f55UL, 0xcd500e7fUL, 0xc45d0571UL, 0xdf4a1863UL, 0xd647136dUL, -+0x31dccad7UL, 0x38d1c1d9UL, 0x23c6dccbUL, 0x2acbd7c5UL, 0x15e8e6efUL, 0x1ce5ede1UL, 0x07f2f0f3UL, 0x0efffbfdUL, -+0x79b492a7UL, 0x70b999a9UL, 0x6bae84bbUL, 0x62a38fb5UL, 0x5d80be9fUL, 0x548db591UL, 0x4f9aa883UL, 0x4697a38dUL -+}; -+ -+#endif /* SMALL CODE */ -+ -+static const ulong32 rcon[] = { -+ 0x01000000UL, 0x02000000UL, 0x04000000UL, 0x08000000UL, -+ 0x10000000UL, 0x20000000UL, 0x40000000UL, 0x80000000UL, -+ 0x1B000000UL, 0x36000000UL, /* for 128-bit blocks, AES never uses more than 10 rcon values */ -+}; -+ -+ -+static int aes_setup(const unsigned char *key, int keylen, int rounds, aes_CBC *skey); -+static void aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey); -+static void aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_CBC *skey); -+ -+#ifdef CLEAN_STACK -+static void _aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_CBC *skey); -+static void _aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey); -+#endif -+ -+int matrixAesInit(sslCipherContext_t *ctx, unsigned char *IV, unsigned char *key, int keylen) -+{ -+ int x, err; -+ -+ if (IV == NULL || key == NULL || ctx == NULL) { -+ return -1; -+ } -+/* -+ setup cipher -+ */ -+ if ((err = aes_setup(key, keylen, 0, &ctx->aes)) != CRYPT_OK) { -+ return -1; -+ } -+/* -+ copy IV -+ */ -+ ctx->aes.blocklen = 16; -+ for (x = 0; x < ctx->aes.blocklen; x++) { -+ ctx->aes.IV[x] = IV[x]; -+ } -+ return 0; -+} -+ -+int matrixAesEncrypt(sslCipherContext_t *ctx, unsigned char *pt, unsigned char *ct, int len) -+{ -+ int x, i; -+ unsigned char tmp[MAXBLOCKSIZE]; -+ -+ if (pt == NULL || ct == NULL || ctx == NULL || (len & 0x7) != 0) { -+ matrixStrDebugMsg("Bad parameters to matrixAesEncrypt\n", NULL); -+ return -1; -+ } -+ -+/* -+ is blocklen valid? -+ */ -+ if (ctx->aes.blocklen < 0 || ctx->aes.blocklen > -+ (int)sizeof(ctx->aes.IV)) { -+ return -1; -+ } -+ -+ for (i = 0; i < len; i += ctx->aes.blocklen) { -+/* -+ xor IV against plaintext -+ */ -+ for (x = 0; x < ctx->aes.blocklen; x++) { -+ tmp[x] = pt[x] ^ ctx->aes.IV[x]; -+ } -+/* -+ encrypt -+ */ -+ aes_ecb_encrypt(tmp, ct, &ctx->aes); -+ -+/* -+ store IV [ciphertext] for a future block -+ */ -+ for (x = 0; x < ctx->aes.blocklen; x++) { -+ ctx->aes.IV[x] = ct[x]; -+ } -+ ct += ctx->aes.blocklen; -+ pt += ctx->aes.blocklen; -+ } -+ -+#ifdef CLEAN_STACK -+ zeromem(tmp, sizeof(tmp)); -+#endif -+ return len; -+} -+ -+int matrixAesDecrypt(sslCipherContext_t *ctx, unsigned char *ct, unsigned char *pt, int len) -+{ -+ int x, i; -+ unsigned char tmp[MAXBLOCKSIZE], tmp2[MAXBLOCKSIZE]; -+ -+ if (pt == NULL || ct == NULL || ctx == NULL || (len & 0x7) != 0) { -+ matrixStrDebugMsg("Bad parameters to matrixAesDecrypt\n", NULL); -+ return -1; -+ } -+ -+/* -+ is blocklen valid? -+ */ -+ if (ctx->aes.blocklen < 0 || ctx->aes.blocklen > -+ (int)sizeof(ctx->aes.IV)) { -+ return -1; -+ } -+ for (i = 0; i < len; i += ctx->aes.blocklen) { -+/* -+ decrypt the block from ct into tmp -+ */ -+ aes_ecb_decrypt(ct, tmp, &ctx->aes); -+/* -+ xor IV against the plaintext of the previous step -+ */ -+ for (x = 0; x < ctx->aes.blocklen; x++) { -+/* -+ copy CT in case ct == pt -+ */ -+ tmp2[x] = ct[x]; -+/* -+ actually decrypt the byte -+ */ -+ pt[x] = tmp[x] ^ ctx->aes.IV[x]; -+ } -+/* -+ replace IV with this current ciphertext -+ */ -+ for (x = 0; x < ctx->aes.blocklen; x++) { -+ ctx->aes.IV[x] = tmp2[x]; -+ } -+ ct += ctx->aes.blocklen; -+ pt += ctx->aes.blocklen; -+ } -+#ifdef CLEAN_STACK -+ zeromem(tmp, sizeof(tmp)); -+ zeromem(tmp2, sizeof(tmp2)); -+#endif -+ return len; -+} -+ -+int aes_setup(const unsigned char *key, int keylen, int rounds, aes_CBC *skey) -+{ -+ int i, j; -+ ulong32 temp, *rk, *rrk; -+ -+ if (key == NULL || skey == NULL) { -+ return -1; -+ } -+ -+ if (keylen != 16 && keylen != 24 && keylen != 32) { -+ return CRYPT_INVALID_KEYSIZE; -+ } -+ -+ if (rounds != 0 && rounds != (10 + ((keylen/8)-2)*2)) { -+ return CRYPT_INVALID_ROUNDS; -+ } -+ -+ skey->key.Nr = 10 + ((keylen/8)-2)*2; -+ -+/* -+ setup the forward key -+ */ -+ i = 0; -+ rk = skey->key.eK; -+ LOAD32H(rk[0], key ); -+ LOAD32H(rk[1], key + 4); -+ LOAD32H(rk[2], key + 8); -+ LOAD32H(rk[3], key + 12); -+ if (keylen == 16) { -+ j = 44; -+ for (;;) { -+ temp = rk[3]; -+ rk[4] = rk[0] ^ -+ (Te4_3[byte(temp, 2)]) ^ -+ (Te4_2[byte(temp, 1)]) ^ -+ (Te4_1[byte(temp, 0)]) ^ -+ (Te4_0[byte(temp, 3)]) ^ -+ rcon[i]; -+ rk[5] = rk[1] ^ rk[4]; -+ rk[6] = rk[2] ^ rk[5]; -+ rk[7] = rk[3] ^ rk[6]; -+ if (++i == 10) { -+ break; -+ } -+ rk += 4; -+ } -+ } else if (keylen == 24) { -+ j = 52; -+ LOAD32H(rk[4], key + 16); -+ LOAD32H(rk[5], key + 20); -+ for (;;) { -+ #ifdef _MSC_VER -+ temp = skey->key.eK[rk - skey->key.eK + 5]; -+ #else -+ temp = rk[5]; -+ #endif /* _MSC_VER */ -+ rk[ 6] = rk[ 0] ^ -+ (Te4_3[byte(temp, 2)]) ^ -+ (Te4_2[byte(temp, 1)]) ^ -+ (Te4_1[byte(temp, 0)]) ^ -+ (Te4_0[byte(temp, 3)]) ^ -+ rcon[i]; -+ rk[ 7] = rk[ 1] ^ rk[ 6]; -+ rk[ 8] = rk[ 2] ^ rk[ 7]; -+ rk[ 9] = rk[ 3] ^ rk[ 8]; -+ if (++i == 8) { -+ break; -+ } -+ rk[10] = rk[ 4] ^ rk[ 9]; -+ rk[11] = rk[ 5] ^ rk[10]; -+ rk += 6; -+ } -+ } else if (keylen == 32) { -+ j = 60; -+ LOAD32H(rk[4], key + 16); -+ LOAD32H(rk[5], key + 20); -+ LOAD32H(rk[6], key + 24); -+ LOAD32H(rk[7], key + 28); -+ for (;;) { -+ #ifdef _MSC_VER -+ temp = skey->key.eK[rk - skey->key.eK + 7]; -+ #else -+ temp = rk[7]; -+ #endif /* _MSC_VER */ -+ rk[ 8] = rk[ 0] ^ -+ (Te4_3[byte(temp, 2)]) ^ -+ (Te4_2[byte(temp, 1)]) ^ -+ (Te4_1[byte(temp, 0)]) ^ -+ (Te4_0[byte(temp, 3)]) ^ -+ rcon[i]; -+ rk[ 9] = rk[ 1] ^ rk[ 8]; -+ rk[10] = rk[ 2] ^ rk[ 9]; -+ rk[11] = rk[ 3] ^ rk[10]; -+ if (++i == 7) { -+ break; -+ } -+ temp = rk[11]; -+ rk[12] = rk[ 4] ^ -+ (Te4_3[byte(temp, 3)]) ^ -+ (Te4_2[byte(temp, 2)]) ^ -+ (Te4_1[byte(temp, 1)]) ^ -+ (Te4_0[byte(temp, 0)]); -+ rk[13] = rk[ 5] ^ rk[12]; -+ rk[14] = rk[ 6] ^ rk[13]; -+ rk[15] = rk[ 7] ^ rk[14]; -+ rk += 8; -+ } -+ } else { -+/* -+ this can't happen -+ */ -+ j = 4; -+ } -+ -+/* -+ setup the inverse key now -+ */ -+ rk = skey->key.dK; -+ rrk = skey->key.eK + j - 4; -+ -+/* -+ apply the inverse MixColumn transform to all round keys but the first and the last: -+ */ -+ /* copy first */ -+ *rk++ = *rrk++; -+ *rk++ = *rrk++; -+ *rk++ = *rrk++; -+ *rk = *rrk; -+ rk -= 3; rrk -= 3; -+ -+ for (i = 1; i < skey->key.Nr; i++) { -+ rrk -= 4; -+ rk += 4; -+#ifdef SMALL_CODE -+ temp = rrk[0]; -+ rk[0] = -+ Td0(255 & Te4[byte(temp, 3)]) ^ -+ Td1(255 & Te4[byte(temp, 2)]) ^ -+ Td2(255 & Te4[byte(temp, 1)]) ^ -+ Td3(255 & Te4[byte(temp, 0)]); -+ temp = rrk[1]; -+ rk[1] = -+ Td0(255 & Te4[byte(temp, 3)]) ^ -+ Td1(255 & Te4[byte(temp, 2)]) ^ -+ Td2(255 & Te4[byte(temp, 1)]) ^ -+ Td3(255 & Te4[byte(temp, 0)]); -+ temp = rrk[2]; -+ rk[2] = -+ Td0(255 & Te4[byte(temp, 3)]) ^ -+ Td1(255 & Te4[byte(temp, 2)]) ^ -+ Td2(255 & Te4[byte(temp, 1)]) ^ -+ Td3(255 & Te4[byte(temp, 0)]); -+ temp = rrk[3]; -+ rk[3] = -+ Td0(255 & Te4[byte(temp, 3)]) ^ -+ Td1(255 & Te4[byte(temp, 2)]) ^ -+ Td2(255 & Te4[byte(temp, 1)]) ^ -+ Td3(255 & Te4[byte(temp, 0)]); -+#else /* SMALL CODE */ -+ temp = rrk[0]; -+ rk[0] = -+ Tks0[byte(temp, 3)] ^ -+ Tks1[byte(temp, 2)] ^ -+ Tks2[byte(temp, 1)] ^ -+ Tks3[byte(temp, 0)]; -+ temp = rrk[1]; -+ rk[1] = -+ Tks0[byte(temp, 3)] ^ -+ Tks1[byte(temp, 2)] ^ -+ Tks2[byte(temp, 1)] ^ -+ Tks3[byte(temp, 0)]; -+ temp = rrk[2]; -+ rk[2] = -+ Tks0[byte(temp, 3)] ^ -+ Tks1[byte(temp, 2)] ^ -+ Tks2[byte(temp, 1)] ^ -+ Tks3[byte(temp, 0)]; -+ temp = rrk[3]; -+ rk[3] = -+ Tks0[byte(temp, 3)] ^ -+ Tks1[byte(temp, 2)] ^ -+ Tks2[byte(temp, 1)] ^ -+ Tks3[byte(temp, 0)]; -+#endif /* SMALL CODE */ -+ } -+ -+ /* copy last */ -+ rrk -= 4; -+ rk += 4; -+ *rk++ = *rrk++; -+ *rk++ = *rrk++; -+ *rk++ = *rrk++; -+ *rk = *rrk; -+ -+ return CRYPT_OK; -+} -+ -+#ifdef CLEAN_STACK -+void aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey) -+{ -+ _aes_ecb_encrypt(pt, ct, skey); -+ burn_stack(sizeof(unsigned long)*8 + sizeof(unsigned long*) + sizeof(int)*2); -+} -+#endif /* CLEAN_STACK */ -+ -+#ifdef CLEAN_STACK -+static void _aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey) -+#else -+void aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey) -+#endif /* CLEAN_STACK */ -+{ -+ ulong32 s0, s1, s2, s3, t0, t1, t2, t3, *rk; -+ int Nr, r; -+ -+ if (pt == NULL || ct == NULL || skey == NULL) { -+ return; -+ } -+ -+ Nr = skey->key.Nr; -+ rk = skey->key.eK; -+ -+/* -+ map byte array block to cipher state -+ and add initial round key: -+ */ -+ LOAD32H(s0, pt ); s0 ^= rk[0]; -+ LOAD32H(s1, pt + 4); s1 ^= rk[1]; -+ LOAD32H(s2, pt + 8); s2 ^= rk[2]; -+ LOAD32H(s3, pt + 12); s3 ^= rk[3]; -+ -+/* -+ Nr - 1 full rounds: -+ */ -+ r = Nr >> 1; -+ for (;;) { -+ -+ t0 = -+ Te0(byte(s0, 3)) ^ -+ Te1(byte(s1, 2)) ^ -+ Te2(byte(s2, 1)) ^ -+ Te3(byte(s3, 0)) ^ -+ rk[4]; -+ t1 = -+ Te0(byte(s1, 3)) ^ -+ Te1(byte(s2, 2)) ^ -+ Te2(byte(s3, 1)) ^ -+ Te3(byte(s0, 0)) ^ -+ rk[5]; -+ t2 = -+ Te0(byte(s2, 3)) ^ -+ Te1(byte(s3, 2)) ^ -+ Te2(byte(s0, 1)) ^ -+ Te3(byte(s1, 0)) ^ -+ rk[6]; -+ t3 = -+ Te0(byte(s3, 3)) ^ -+ Te1(byte(s0, 2)) ^ -+ Te2(byte(s1, 1)) ^ -+ Te3(byte(s2, 0)) ^ -+ rk[7]; -+ -+ rk += 8; -+ if (--r == 0) { -+ break; -+ } -+ -+ s0 = -+ Te0(byte(t0, 3)) ^ -+ Te1(byte(t1, 2)) ^ -+ Te2(byte(t2, 1)) ^ -+ Te3(byte(t3, 0)) ^ -+ rk[0]; -+ s1 = -+ Te0(byte(t1, 3)) ^ -+ Te1(byte(t2, 2)) ^ -+ Te2(byte(t3, 1)) ^ -+ Te3(byte(t0, 0)) ^ -+ rk[1]; -+ s2 = -+ Te0(byte(t2, 3)) ^ -+ Te1(byte(t3, 2)) ^ -+ Te2(byte(t0, 1)) ^ -+ Te3(byte(t1, 0)) ^ -+ rk[2]; -+ s3 = -+ Te0(byte(t3, 3)) ^ -+ Te1(byte(t0, 2)) ^ -+ Te2(byte(t1, 1)) ^ -+ Te3(byte(t2, 0)) ^ -+ rk[3]; -+ } -+/* -+ apply last round and map cipher state to byte array block: -+ */ -+ s0 = -+ (Te4_3[byte(t0, 3)]) ^ -+ (Te4_2[byte(t1, 2)]) ^ -+ (Te4_1[byte(t2, 1)]) ^ -+ (Te4_0[byte(t3, 0)]) ^ -+ rk[0]; -+ STORE32H(s0, ct); -+ s1 = -+ (Te4_3[byte(t1, 3)]) ^ -+ (Te4_2[byte(t2, 2)]) ^ -+ (Te4_1[byte(t3, 1)]) ^ -+ (Te4_0[byte(t0, 0)]) ^ -+ rk[1]; -+ STORE32H(s1, ct+4); -+ s2 = -+ (Te4_3[byte(t2, 3)]) ^ -+ (Te4_2[byte(t3, 2)]) ^ -+ (Te4_1[byte(t0, 1)]) ^ -+ (Te4_0[byte(t1, 0)]) ^ -+ rk[2]; -+ STORE32H(s2, ct+8); -+ s3 = -+ (Te4_3[byte(t3, 3)]) ^ -+ (Te4_2[byte(t0, 2)]) ^ -+ (Te4_1[byte(t1, 1)]) ^ -+ (Te4_0[byte(t2, 0)]) ^ -+ rk[3]; -+ STORE32H(s3, ct+12); -+} -+ -+#ifdef CLEAN_STACK -+void aes_ecb_decrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey) -+{ -+ _aes_ecb_decrypt(pt, ct, skey); -+ burn_stack(sizeof(unsigned long)*8 + sizeof(unsigned long*) + sizeof(int)*2); -+} -+#endif /* CLEAN_STACK */ -+ -+#ifdef CLEAN_STACK -+static void _aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_CBC *skey) -+#else -+void aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_CBC *skey) -+#endif /* CLEAN_STACK */ -+{ -+ ulong32 s0, s1, s2, s3, t0, t1, t2, t3, *rk; -+ int Nr, r; -+ -+ if (pt == NULL || ct == NULL || skey == NULL) { -+ return; -+ } -+ -+ Nr = skey->key.Nr; -+ rk = skey->key.dK; -+ -+/* -+ map byte array block to cipher state and add initial round key: -+ */ -+ LOAD32H(s0, ct ); s0 ^= rk[0]; -+ LOAD32H(s1, ct + 4); s1 ^= rk[1]; -+ LOAD32H(s2, ct + 8); s2 ^= rk[2]; -+ LOAD32H(s3, ct + 12); s3 ^= rk[3]; -+ -+/* -+ Nr - 1 full rounds: -+ */ -+ r = Nr >> 1; -+ for (;;) { -+ -+ t0 = -+ Td0(byte(s0, 3)) ^ -+ Td1(byte(s3, 2)) ^ -+ Td2(byte(s2, 1)) ^ -+ Td3(byte(s1, 0)) ^ -+ rk[4]; -+ t1 = -+ Td0(byte(s1, 3)) ^ -+ Td1(byte(s0, 2)) ^ -+ Td2(byte(s3, 1)) ^ -+ Td3(byte(s2, 0)) ^ -+ rk[5]; -+ t2 = -+ Td0(byte(s2, 3)) ^ -+ Td1(byte(s1, 2)) ^ -+ Td2(byte(s0, 1)) ^ -+ Td3(byte(s3, 0)) ^ -+ rk[6]; -+ t3 = -+ Td0(byte(s3, 3)) ^ -+ Td1(byte(s2, 2)) ^ -+ Td2(byte(s1, 1)) ^ -+ Td3(byte(s0, 0)) ^ -+ rk[7]; -+ -+ rk += 8; -+ if (--r == 0) { -+ break; -+ } -+ -+ s0 = -+ Td0(byte(t0, 3)) ^ -+ Td1(byte(t3, 2)) ^ -+ Td2(byte(t2, 1)) ^ -+ Td3(byte(t1, 0)) ^ -+ rk[0]; -+ s1 = -+ Td0(byte(t1, 3)) ^ -+ Td1(byte(t0, 2)) ^ -+ Td2(byte(t3, 1)) ^ -+ Td3(byte(t2, 0)) ^ -+ rk[1]; -+ s2 = -+ Td0(byte(t2, 3)) ^ -+ Td1(byte(t1, 2)) ^ -+ Td2(byte(t0, 1)) ^ -+ Td3(byte(t3, 0)) ^ -+ rk[2]; -+ s3 = -+ Td0(byte(t3, 3)) ^ -+ Td1(byte(t2, 2)) ^ -+ Td2(byte(t1, 1)) ^ -+ Td3(byte(t0, 0)) ^ -+ rk[3]; -+ } -+ -+/* -+ apply last round and map cipher state to byte array block: -+ */ -+ s0 = -+ (Td4[byte(t0, 3)] & 0xff000000) ^ -+ (Td4[byte(t3, 2)] & 0x00ff0000) ^ -+ (Td4[byte(t2, 1)] & 0x0000ff00) ^ -+ (Td4[byte(t1, 0)] & 0x000000ff) ^ -+ rk[0]; -+ STORE32H(s0, pt); -+ s1 = -+ (Td4[byte(t1, 3)] & 0xff000000) ^ -+ (Td4[byte(t0, 2)] & 0x00ff0000) ^ -+ (Td4[byte(t3, 1)] & 0x0000ff00) ^ -+ (Td4[byte(t2, 0)] & 0x000000ff) ^ -+ rk[1]; -+ STORE32H(s1, pt+4); -+ s2 = -+ (Td4[byte(t2, 3)] & 0xff000000) ^ -+ (Td4[byte(t1, 2)] & 0x00ff0000) ^ -+ (Td4[byte(t0, 1)] & 0x0000ff00) ^ -+ (Td4[byte(t3, 0)] & 0x000000ff) ^ -+ rk[2]; -+ STORE32H(s2, pt+8); -+ s3 = -+ (Td4[byte(t3, 3)] & 0xff000000) ^ -+ (Td4[byte(t2, 2)] & 0x00ff0000) ^ -+ (Td4[byte(t1, 1)] & 0x0000ff00) ^ -+ (Td4[byte(t0, 0)] & 0x000000ff) ^ -+ rk[3]; -+ STORE32H(s3, pt+12); -+} -+ -+#ifdef CLEAN_STACK -+void aes(const unsigned char *ct, unsigned char *pt, aes_CBC *skey) -+{ -+ _aes_ecb_decrypt(ct, pt, skey); -+ burn_stack(sizeof(unsigned long)*8 + sizeof(unsigned long*) + sizeof(int)*2); -+} -+#endif /* CLEAN_STACK */ -+ -+ -+#ifdef PEERSEC_TEST -+ -+int matrixAesTest() -+{ -+ int err; -+ static const struct { -+ int keylen; -+ unsigned char key[32], pt[16], ct[16]; -+ } tests[] = { -+ { 16, -+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, -+ { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, -+ 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, -+ { 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30, -+ 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a } -+ }, { -+ 24, -+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 }, -+ { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, -+ 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, -+ { 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0, -+ 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 } -+ }, { -+ 32, -+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, -+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, -+ { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, -+ 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, -+ { 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf, -+ 0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 } -+ } -+ }; -+ -+ aes_CBC key; -+ unsigned char tmp[2][16]; -+ int i, y; -+ -+ for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { -+ zeromem(&key, sizeof(key)); -+ if ((err = aes_setup(tests[i].key, tests[i].keylen, 0, &key)) != CRYPT_OK) { -+ return err; -+ } -+ -+ aes_ecb_encrypt(tests[i].pt, tmp[0], &key); -+ aes_ecb_decrypt(tmp[0], tmp[1], &key); -+ if (memcmp(tmp[0], tests[i].ct, 16) || memcmp(tmp[1], tests[i].pt, 16)) { -+#if 0 -+ printf("\n\nTest %d failed\n", i); -+ if (memcmp(tmp[0], tests[i].ct, 16)) { -+ printf("CT: "); -+ for (i = 0; i < 16; i++) { -+ printf("%02x ", tmp[0][i]); -+ } -+ printf("\n"); -+ } else { -+ printf("PT: "); -+ for (i = 0; i < 16; i++) { -+ printf("%02x ", tmp[1][i]); -+ } -+ printf("\n"); -+ } -+#endif /* 0 */ -+ return CRYPT_FAIL_TESTVECTOR; -+ } -+ -+/* -+ now see if we can encrypt all zero bytes 1000 times, -+ decrypt and come back where we started -+ */ -+ for (y = 0; y < 16; y++) tmp[0][y] = 0; -+ for (y = 0; y < 1000; y++) aes_ecb_encrypt(tmp[0], tmp[0], &key); -+ for (y = 0; y < 1000; y++) aes_ecb_decrypt(tmp[0], tmp[0], &key); -+ for (y = 0; y < 16; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; -+ } -+ return CRYPT_OK; -+} -+#endif /* PEERSEC_TEST */ -+ -+#endif /* USE_AES */ -+/******************************************************************************/ -diff -urN matrixssl.old/src/crypto/peersec/md5.c matrixssl/src/crypto/peersec/md5.c ---- matrixssl.old/src/crypto/peersec/md5.c 2005-02-23 22:43:10.000000000 +0100 -+++ matrixssl/src/crypto/peersec/md5.c 2005-03-06 01:32:33.000000000 +0100 -@@ -334,7 +334,7 @@ - #ifdef CLEAN_STACK - psZeromem(md, sizeof(hash_state)); - #endif /* CLEAN_STACK */ -- return 16; -+ return SSL_MD5_HASH_SIZE; - } - - #ifdef PEERSEC_TEST -diff -urN matrixssl.old/src/crypto/peersec/pscrypto.h matrixssl/src/crypto/peersec/pscrypto.h ---- matrixssl.old/src/crypto/peersec/pscrypto.h 2005-02-23 22:43:10.000000000 +0100 -+++ matrixssl/src/crypto/peersec/pscrypto.h 2005-03-06 01:32:33.000000000 +0100 -@@ -40,7 +40,7 @@ - PeerSec crypto-specific defines. - */ - #define SMALL_CODE --#define CLEAN_STACK -+#undef CLEAN_STACK - /* - If Native 64 bit integers are not supported, we must set the 16 bit flag - to produce 32 bit mp_words in mpi.h -diff -urN matrixssl.old/src/crypto/peersec/sha1.c matrixssl/src/crypto/peersec/sha1.c ---- matrixssl.old/src/crypto/peersec/sha1.c 2005-02-23 22:43:10.000000000 +0100 -+++ matrixssl/src/crypto/peersec/sha1.c 2005-03-06 01:32:33.000000000 +0100 -@@ -273,7 +273,7 @@ - #ifdef CLEAN_STACK - psZeromem(md, sizeof(hash_state)); - #endif /* CLEAN_STACK */ -- return 20; -+ return SSL_SHA1_HASH_SIZE; - } - - #ifdef PEERSEC_TEST -diff -urN matrixssl.old/src/Makefile matrixssl/src/Makefile ---- matrixssl.old/src/Makefile 2005-02-23 22:43:10.000000000 +0100 -+++ matrixssl/src/Makefile 2005-03-06 01:39:06.000000000 +0100 -@@ -15,7 +15,14 @@ - E = - - LIBRARY = libmatrixssl$(SO) --STATIC = libmatrixsslstatic$(A) -+ -+SOVERSION_MAJ := 1 -+SOVERSION_MIN := 2 -+SOVERSION_REV := 4 -+SONAME := $(LIBRARY).$(SOVERSION_MAJ) -+SOREAL := $(LIBRARY).$(SOVERSION_MAJ).$(SOVERSION_MIN).$(SOVERSION_REV) -+ -++STATIC = libmatrixsslstatic$(A) - - OBJECTS = \ - cipherSuite$(O) \ -@@ -24,6 +31,7 @@ - sslEncode$(O) \ - sslv3$(O) \ - os/linux/linux$(O) \ -+ crypto/peersec/aes$(O) \ - crypto/peersec/arc4$(O) \ - crypto/peersec/asn1$(O) \ - crypto/peersec/base64$(O) \ -@@ -66,7 +74,7 @@ - # - SHARED = -shared - CFLAGS = $(DFLAGS) -DLINUX -I./ -Icrypto/peersec --LDFLAGS = -lc -lpthread -lcrypto -+LDFLAGS = -lc -lpthread -Wl,-soname,$(SONAME) - - # - # Override variables for compilation on Mac OS X (Darwin) -@@ -105,8 +113,9 @@ - # Build the library - # - $(LIBRARY): $(OBJECTS) -- $(CC) $(SHARED) -o $@ $^ $(LDFLAGS) -- $(STRIP) $(LIBRARY) -+ $(CC) $(SHARED) -o $(SOREAL) $^ $(LDFLAGS) -+ ln -sf $(SOREAL) $(SONAME) -+ ln -sf $(SONAME) $(LIBRARY) - - # - # Build the static library -@@ -119,4 +128,4 @@ - # Clean up all generated files - # - clean: -- rm -f $(LIBRARY) $(OBJECTS) $(STATIC) -+ rm -f $(LIBRARY) $(OBJECTS) $(SONAME) $(SOREAL) -diff -urN matrixssl.old/src/matrixSsl.c matrixssl/src/matrixSsl.c ---- matrixssl.old/src/matrixSsl.c 2005-02-23 22:43:10.000000000 +0100 -+++ matrixssl/src/matrixSsl.c 2005-03-06 01:37:41.000000000 +0100 -@@ -950,6 +950,49 @@ - sslAssert(ssl->hsPool == NULL); - } - -+ -+/******************************************************************************/ -+/* -+ Compute an MD5 digest -+*/ -+unsigned char *matrixMd5Digest( -+ const unsigned char *buf, unsigned long len, unsigned char *hash) -+{ -+ sslMd5Context_t ctx; -+ static unsigned char hashBuf[SSL_MD5_HASH_SIZE]; -+ -+ if (hash == NULL) { -+ hash = hashBuf; -+ } -+ -+ matrixMd5Init(&ctx); -+ matrixMd5Update(&ctx, buf, len); -+ matrixMd5Final(&ctx, hash); -+ -+ return hash; -+} -+ -+/******************************************************************************/ -+/* -+ Compute an SHA1 digest -+*/ -+unsigned char *matrixSha1Digest( -+ const unsigned char *buf, unsigned long len, unsigned char *hash) -+{ -+ sslSha1Context_t ctx; -+ static unsigned char hashBuf[SSL_SHA1_HASH_SIZE]; -+ -+ if (hash == NULL) { -+ hash = hashBuf; -+ } -+ -+ matrixSha1Init(&ctx); -+ matrixSha1Update(&ctx, buf, len); -+ matrixSha1Final(&ctx, hash); -+ -+ return hash; -+} -+ - /******************************************************************************/ - /* - Debugging APIs diff --git a/openwrt/package/matrixssl/patches/matrixssl-typefix.patch b/openwrt/package/matrixssl/patches/matrixssl-typefix.patch deleted file mode 100644 index 1b9b7a8d00e..00000000000 --- a/openwrt/package/matrixssl/patches/matrixssl-typefix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN matrixssl.old/src/os/linux/linux.c matrixssl/src/os/linux/linux.c ---- matrixssl.old/src/os/linux/linux.c 2005-02-23 22:43:10.000000000 +0100 -+++ matrixssl/src/os/linux/linux.c 2005-03-06 01:52:51.000000000 +0100 -@@ -51,7 +51,7 @@ - static sslTime_t hiresStart; /* zero-time */ - static sslTime_t hiresFreq; /* tics per second */ - #else /* __i386__ */ --static unsigned int32 prevTicks; /* Check wrap */ -+static uint32 prevTicks; /* Check wrap */ - static sslTime_t elapsedTime; /* Last elapsed time */ - #endif - diff --git a/openwrt/package/mgetty/Config.in b/openwrt/package/mgetty/Config.in deleted file mode 100644 index 5761bbb6f11..00000000000 --- a/openwrt/package/mgetty/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_MGETTY - prompt "mgetty+sendfax.................... the data/fax solution for your analog modem" - tristate - default m if CONFIG_DEVEL - help - mgetty now includes sendfax (and AutoPPP) - using pppd for data and doing fax/login by itself. diff --git a/openwrt/package/mgetty/Makefile b/openwrt/package/mgetty/Makefile deleted file mode 100644 index d02f027837e..00000000000 --- a/openwrt/package/mgetty/Makefile +++ /dev/null @@ -1,118 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mgetty -PKG_VERSION:=1.1.35 -PKG_XVERSION:=Feb22 -PKG_RELEASE:=1 -PKG_MD5SUM:=6805f8e31423bb777be80e3a856001cb - -PKG_SOURCE_URL:=ftp://alpha.greenie.net/pub/mgetty/source/1.1 -PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION)-$(PKG_XVERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MGETTY,mgetty,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/policy.h: $(PKG_BUILD_DIR)/.prepared - cp $(PKG_BUILD_DIR)/policy.h-dist $(PKG_BUILD_DIR)/policy.h - echo "#define AUTO_PPP" >> $(PKG_BUILD_DIR)/policy.h - echo "#undef FAX_NOTIFY_PROGRAM" >> $(PKG_BUILD_DIR)/policy.h - echo "#define FAX_NOTIFY_PROGRAM \"/usr/lib/mgetty+sendfax/new_fax\"" >> $(PKG_BUILD_DIR)/policy.h - echo "#undef DATA_FLOW" >> $(PKG_BUILD_DIR)/policy.h - echo "#define DATA_FLOW FLOW_HARD" >> $(PKG_BUILD_DIR)/policy.h - echo "#undef DEVICE_GROUP" >> $(PKG_BUILD_DIR)/policy.h - echo "#undef DEVICE_OWNER" >> $(PKG_BUILD_DIR)/policy.h - echo "#define DEVICE_OWNER \"root\"" >> $(PKG_BUILD_DIR)/policy.h - echo "#undef FAXREC_FLOW" >> $(PKG_BUILD_DIR)/policy.h - echo "#define FAXREC_FLOW FLOW_SOFT" >> $(PKG_BUILD_DIR)/policy.h - echo "#undef FAXSEND_FLOW" >> $(PKG_BUILD_DIR)/policy.h - echo "#define FAXSEND_FLOW FLOW_SOFT" >> $(PKG_BUILD_DIR)/policy.h - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/policy.h - touch $@ - -$(PKG_BUILD_DIR)/.built: - mkdir -p $(PKG_INSTALL_DIR)/usr/bin - mkdir -p $(PKG_INSTALL_DIR)/usr/sbin - mkdir -p $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax - mkdir -p $(PKG_INSTALL_DIR)/etc/mgetty+sendfax - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - prefix="$(PKG_INSTALL_DIR)/usr" \ - CONFDIR=/etc/mgetty+sendfax \ - bin-all - $(CP) $(PKG_BUILD_DIR)/mgetty $(PKG_INSTALL_DIR)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/sendfax $(PKG_INSTALL_DIR)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/fax/faxrunqd $(PKG_INSTALL_DIR)/usr/sbin - chmod 755 $(PKG_INSTALL_DIR)/usr/sbin/* - $(CP) $(PKG_BUILD_DIR)/fax/faxq-helper $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax - chmod u+s $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/faxq-helper - $(CP) $(PKG_BUILD_DIR)/fax/cour25n.pbm $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax - $(CP) $(PKG_BUILD_DIR)/fax/cour25.pbm $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax - $(CP) $(PKG_BUILD_DIR)/fax/faxq $(PKG_INSTALL_DIR)/usr/bin - $(CP) $(PKG_BUILD_DIR)/fax/faxrm $(PKG_INSTALL_DIR)/usr/bin - $(CP) $(PKG_BUILD_DIR)/fax/faxrunq $(PKG_INSTALL_DIR)/usr/bin - $(CP) $(PKG_BUILD_DIR)/fax/faxspool $(PKG_INSTALL_DIR)/usr/bin - $(CP) $(PKG_BUILD_DIR)/g3/g32pbm $(PKG_INSTALL_DIR)/usr/bin - (cd $(PKG_INSTALL_DIR)/usr/bin;\ - ln -snf g32pbm g3topbm;\ - ); - $(CP) $(PKG_BUILD_DIR)/g3/g3cat $(PKG_INSTALL_DIR)/usr/bin - $(CP) $(PKG_BUILD_DIR)/g3/pbm2g3 $(PKG_INSTALL_DIR)/usr/bin - $(CP) $(PKG_BUILD_DIR)/g3/sff2g3 $(PKG_INSTALL_DIR)/usr/bin - chmod 755 $(PKG_INSTALL_DIR)/usr/bin/* -# Installation into /etc - $(CP) $(PKG_BUILD_DIR)/dialin.config $(PKG_INSTALL_DIR)/etc/mgetty+sendfax - $(CP) $(PKG_BUILD_DIR)/fax/faxheader $(PKG_INSTALL_DIR)/etc/mgetty+sendfax - $(CP) $(PKG_BUILD_DIR)/faxrunq.config $(PKG_INSTALL_DIR)/etc/mgetty+sendfax - $(CP) $(PKG_BUILD_DIR)/fax/faxspool.rules $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxspool.rules.sample - $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/login.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/login.config - $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/mgetty.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/mgetty.config - $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/sendfax.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/sendfax.config - touch $@ - -ISBIN:=$(IDIR_MGETTY)/usr/sbin -IBIN:=$(IDIR_MGETTY)/usr/bin -ILIB:=$(IDIR_MGETTY)/usr/lib/mgetty+sendfax -IETC:=$(IDIR_MGETTY)/etc/mgetty+sendfax - -$(IPKG_MGETTY): - install -d -m0755 $(ISBIN) $(IBIN) $(ILIB) $(IETC) - install -m0755 \ - $(PKG_INSTALL_DIR)/usr/bin/faxq \ - $(PKG_INSTALL_DIR)/usr/bin/faxrm \ - $(PKG_INSTALL_DIR)/usr/bin/faxrunq \ - $(PKG_INSTALL_DIR)/usr/bin/faxspool \ - $(PKG_INSTALL_DIR)/usr/bin/g32pbm \ - $(PKG_INSTALL_DIR)/usr/bin/g3cat \ - $(PKG_INSTALL_DIR)/usr/bin/pbm2g3 \ - $(PKG_INSTALL_DIR)/usr/bin/sff2g3 \ - $(IBIN) - install -m0755 \ - $(PKG_INSTALL_DIR)/usr/sbin/mgetty \ - $(PKG_INSTALL_DIR)/usr/sbin/sendfax \ - $(PKG_INSTALL_DIR)/usr/sbin/faxrunqd \ - $(ISBIN) - install -m4755 \ - $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/faxq-helper \ - $(ILIB) - install -m644 \ - $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/cour25n.pbm \ - $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/cour25.pbm \ - $(ILIB) - install -m600 \ - $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/dialin.config \ - $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxheader \ - $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxrunq.config \ - $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxspool.rules.sample \ - $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/login.config \ - $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/mgetty.config \ - $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/sendfax.config \ - $(IETC) - $(RSTRIP) $(IDIR_MGETTY) - $(IPKG_BUILD) $(IDIR_MGETTY) $(PACKAGE_DIR) diff --git a/openwrt/package/mgetty/ipkg/mgetty.control b/openwrt/package/mgetty/ipkg/mgetty.control deleted file mode 100644 index c280295bee2..00000000000 --- a/openwrt/package/mgetty/ipkg/mgetty.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: mgetty -Priority: optional -Section: communications -Description: mgetty + sendfax diff --git a/openwrt/package/mgetty/patches/mgetty.patch b/openwrt/package/mgetty/patches/mgetty.patch deleted file mode 100644 index c5ffb6f2e69..00000000000 --- a/openwrt/package/mgetty/patches/mgetty.patch +++ /dev/null @@ -1,98 +0,0 @@ -Only in mgetty-1.1.31: .prepared -diff -ur mgetty-1.1.31-old/Makefile mgetty-1.1.31/Makefile ---- mgetty-1.1.31-old/Makefile 2006-01-02 00:37:56.000000000 +0000 -+++ mgetty-1.1.31/Makefile 2006-01-02 00:43:57.000000000 +0000 -@@ -164,7 +164,9 @@ - # - # if your systems doesn't have one, use the shell script that I provide - # in "inst.sh" (taken from X11R5). Needed on IRIX5.2 --INSTALL=install -c -o bin -g bin -+STRIP=$(STAGING_DIR)sstrip -+INSTALL=install -c -o root -g root -+#INSTALL=install -c -o bin -g bin - #INSTALL=install -c -o root -g wheel # NeXT/BSD - #INSTALL=/usr/ucb/install -c -o bin -g bin # AIX, Solaris 2.x - #INSTALL=installbsd -c -o bin -g bin # OSF/1, AIX 4.1, 4.2 -@@ -216,7 +218,7 @@ - # (it's possible to run faxrunq(d) as root, but the FAX_OUT_USER - # MUST NOT BE root or any other privileged account). - # --FAX_OUT_USER=fax -+FAX_OUT_USER=root - # - # - # Where section 1 manual pages should be placed -@@ -416,7 +418,12 @@ - ./mksed >sedscript - chmod 700 sedscript - --mksed: mksed.c policy.h Makefile -+REALGCC:=/usr/bin/gcc -+mksed: mksed.c policy.h Makefile -+ ( echo $(REALGCC); $(MAKE) "CC=$(REALGCC)" "CFLAGS=$(CFLAGS)" mksed-wrong;\ -+ ); -+ -+mksed-wrong: mksed.c policy.h Makefile - $(CC) $(CFLAGS) -DBINDIR=\"$(BINDIR)\" -DSBINDIR=\"$(SBINDIR)\" \ - -DLIBDIR=\"$(LIBDIR)\" \ - -DCONFDIR=\"$(CONFDIR)\" \ -@@ -590,8 +597,10 @@ - -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) ) - -mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old - -mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old -- $(INSTALL) -s -m 700 mgetty $(SBINDIR) -- $(INSTALL) -s -m 755 sendfax $(SBINDIR) -+ $(INSTALL) -m 700 mgetty $(SBINDIR) -+ $(STRIP) $(SBINDIR)/mgetty -+ $(INSTALL) -m 755 sendfax $(SBINDIR) -+ $(STRIP) $(SBINDIR)/sendfax - # - # data files + directories - # -@@ -653,7 +662,8 @@ - if [ ! -z "$(INSTALL_MECHO)" ] ; then \ - cd compat ; \ - $(CC) $(CFLAGS) -o mg.echo mg.echo.c && \ -- $(INSTALL) -s -m 755 mg.echo $(BINDIR) ; \ -+ $(INSTALL) -m 755 mg.echo $(BINDIR) && \ -+ $(STRIP) $(BINDIR)/mg.echo ; \ - fi - - # -Only in mgetty-1.1.31-old: Makefile.orig -Only in mgetty-1.1.31-old: Makefile.rej -diff -ur mgetty-1.1.31-old/g3/Makefile mgetty-1.1.31/g3/Makefile ---- mgetty-1.1.31-old/g3/Makefile 2006-01-02 00:37:56.000000000 +0000 -+++ mgetty-1.1.31/g3/Makefile 2006-01-02 00:42:17.000000000 +0000 -@@ -40,7 +40,8 @@ - # install programs - # - for f in $(G3_PROGRAMS) ; do \ -- $(INSTALL) -s -m 755 $$f $(BINDIR) ; \ -+ $(INSTALL) -m 755 $$f $(BINDIR) ; \ -+ $(STRIP) $(BINDIR)/$$f ; \ - done - # - # make symlink for "g3topbm" (so third-party fax viewers won't fail) -diff -ur mgetty-1.1.31-old/logfile.c mgetty-1.1.31/logfile.c ---- mgetty-1.1.31-old/logfile.c 2006-01-02 00:37:56.000000000 +0000 -+++ mgetty-1.1.31/logfile.c 2006-01-02 00:42:17.000000000 +0000 -@@ -327,12 +327,11 @@ - } - else /* ERROR or FATAL */ - { -- fprintf(log_fp, "\n%02d/%02d %02d:%02d:%02d %s %s: %s", -+ fprintf(log_fp, "\n%02d/%02d %02d:%02d:%02d %s %s: #%d", - tm->tm_mon+1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec, - log_infix, ws, -- ( errnr <= sys_nerr ) ? sys_errlist[errnr]: -- "" ); -+ errnr ); - #ifdef SYSLOG - syslog( level == L_FATAL? LOG_ALERT: LOG_ERR, "%s: %m", ws ); - #endif -Only in mgetty-1.1.31-old/voice/libutil: access.c.orig -Only in mgetty-1.1.31-old/voice/libvoice: Lucent.c.orig -Only in mgetty-1.1.31-old/voice/libvoice: V253modem.c.orig -Only in mgetty-1.1.31-old/voice/pvftools: pvftormd.c.orig diff --git a/openwrt/package/miau/Config.in b/openwrt/package/miau/Config.in deleted file mode 100644 index e3df15afcf4..00000000000 --- a/openwrt/package/miau/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_MIAU - prompt "miau.............................. Another IRC-bouncer/proxy" - tristate - default m if CONFIG_DEVEL - help - In short, miau is an IRC-bouncer/proxy. - Being more verbose, miau is small but quite featured - IRC-bouncer - a service bit like HTTP-proxy, but - for IRC-networks. - - http://sourceforge.net/projects/miau/ - diff --git a/openwrt/package/miau/Makefile b/openwrt/package/miau/Makefile deleted file mode 100644 index ecfb03d884e..00000000000 --- a/openwrt/package/miau/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=miau -PKG_VERSION:=0.6.0.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=1b78d219a03655399c165eeb021cddd8 - -PKG_SOURCE_URL:= @SF/miau -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MIAU,miau,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_func_malloc_0_nonnull=yes \ - ac_cv_func_realloc_0_nonnull=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --bindir=/usr/bin \ - --sysconfdir=/etc \ - --enable-automode \ - --enable-releasenick \ - --enable-uptime \ - --enable-privlog \ - --enable-onconnect \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $@ - -$(IPKG_MIAU): - install -d -m0755 $(IDIR_MIAU)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(IDIR_MIAU)/usr/bin/ - install -d -m0755 $(IDIR_MIAU)/etc/init.d - install -d -m0755 $(IDIR_MIAU)/etc/default - install -d -m0755 $(IDIR_MIAU)/etc/miau - install -m0755 ./files/S50miau $(IDIR_MIAU)/etc/init.d/S50miau - install -m0644 ./files/miau $(IDIR_MIAU)/etc/default/miau - install -m0644 ./files/miaurc $(IDIR_MIAU)/etc/miau/miaurc - $(RSTRIP) $(IDIR_MIAU) - $(IPKG_BUILD) $(IDIR_MIAU) $(PACKAGE_DIR) diff --git a/openwrt/package/miau/files/S50miau b/openwrt/package/miau/files/S50miau deleted file mode 100755 index beef3105ddc..00000000000 --- a/openwrt/package/miau/files/S50miau +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -DEFAULT="/etc/default/miau" -OPTIONS="-d /etc/miau/" -LOG_DIR="/var/log/miau" -ERR_LOG="$LOG_DIR/error.log" -OUT_LOG="$LOG_DIR/miau.log" - -[ -f $DEFAULT ] && . $DEFAULT -[ "$ENABLE_MIAU" = "yes" ] || exit 0 - -case $1 in - start) - [ -f /var/run/miau.pid ] && echo "[ERROR] miau is running" - [ -f /var/run/miau.pid ] && exit 0 - [ -d /var/run ] || mkdir -p /var/run - [ -d $LOG_DIR ] || mkdir -p $LOG_DIR - /usr/bin/miau -f $OPTIONS > $OUT_LOG 2> $ERR_LOG & - PID=$! - sleep 1 - [ -d /proc/$PID ] && echo $PID > /var/run/miau.pid - [ -d /proc/$PID ] || echo "[ERROR] Unable to run miau as a daemon" - ;; - stop) - [ -f /var/run/miau.pid ] && kill $(cat /var/run/miau.pid) >/dev/null 2>&1 && rm /var/run/miau.pid - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/miau/files/miau b/openwrt/package/miau/files/miau deleted file mode 100644 index 7d4f869ce22..00000000000 --- a/openwrt/package/miau/files/miau +++ /dev/null @@ -1,2 +0,0 @@ -ENABLE_MIAU="yes" -OPTIONS="-d /etc/miau" diff --git a/openwrt/package/miau/files/miaurc b/openwrt/package/miau/files/miaurc deleted file mode 100644 index c12e4ff114e..00000000000 --- a/openwrt/package/miau/files/miaurc +++ /dev/null @@ -1,587 +0,0 @@ -# -# miau 0.5.3 configuration file example -# (C) 2003-2004 Tommi Saviranta -# - -# About structure of this configuration file: -# -# - All parameters are written inside quotes (for example, "foobar") -# -# - Options are defined like: option = "parameter1"[:"parameter2"] ... -# -# - When entering multiparameter options, certain parameters have default -# values and can be left out. -# -# - When entering multiparameter options and, for example, user doesn't want -# to set parameter2 at all but he needs to set parameter3, parameter2 can -# be skipped with column (':') like: "parameter1"::"parameter3". -# -# - Empty lines and characters after '#' (hash) are ignored. -# -# - When setting permissions, switched etc. (switches (booleans) are described -# as "state"), everything beginning with "t", "r" and "1" are concidered as -# "true" or "yes" (positive). Everything else is "false" or "no" (negative). - - - -# Required settings -################################################################################ - - -# nicknames = { "nick" }: Your nickname (and secondary nicknames) on IRC. -# If the primary nick (first nick on the list) is already on use, -# miau will try the others on the list. -# -# Default: no default -# -# Example: -#nicknames = { -# "zak" -# "zakh" -#} - - -# realname = "realname": Your "real" name on IRC. -# -# Default: no default -# -# Example: -#realname = "Prokhor Zakharov" - - -# username = "username": Your ident (matters only if you don't have identd -# running). -# -# Default: no default -# -# Example: -#username = "zak" - - -# password = "password": The password miau will expect to receive from client -# when it's registering with nick. If this is 13 characters long, -# miau assumed it's crypted. -# -# If miau is compiled with ENABLE_MKPASSWD, miau can generate password-hashes -# (from command line) with -c -switch. -# -# Default: no default -# -# Example: -#password = "foobar" - - -# listenport = "port": The port miau will wait for incoming connections. -# -# Default: no default -# -# Example: -#listenport = "4096" - - -# servers = { "server":"port":"password":"timeout" }: miau's IRC-server-list. -# Each line represents one server, where timeout is delay in -# seconds before connectiong attempt times out. Only "server" -# parameter is required. -# -# Default: no default -# -# Example: -#servers = { -# "irc.net" -# "irc.foo.bar":"6662" -# "localhost"::"foobar" -# "127.0.0.1":"6670"::"5" -#} - - -# connhosts = { "host":"permitted" }: List of hosts that are allowed (or denied) -# to connect to miau. When boolean-value is left unset, it is -# assumed to be "true". This list will be processed as a chain -# which means latter rules can override previous ones. -# -# Default: no default -# -# Example: -#connhosts = { -# "*":"yes" -# "client*.evil.net":"no" -#} - - - -# Optional settings -################################################################################ - - -# listenhost = "host": Host miau uses to listen on. -# -# If you are compiled with IPV6 and need this to listen on an IPV4 port, you -# must use an IP in the form ::FFFF:127.0.0.1 -# -# Default: no default -# -# Example: -#listenhost = "127.0.0.1" - - -# bind = "host": Host/IP miau uses for outgoing connections. -# -# Default: none -# -# Example: -#bind = "172.16.1.1" - - -# maxclients = "number": Maximum number of clients connected to miau -# concurrently. Set to zero for unlimited clients. -# -# Default: 3 -# -#Example: -#maxclients = "1" - - -# stonedtimeout = "seconds": Time (in seconds) with no data from the server -# before it is declared stoned and being disconnected. Although -# minimum value is 30, this value has no upper limit. Watch out, -# though, if this value is set too high, death of servers may stay -# undetected for a very long time if you are idle. -# -# Default: 90 -# -# Example: -#stonedtimeout = "150" - - -# connecttimeout = "seconds": Time (in seconds) before connection attampt will -# time out. Note that while connecting to the server miau will not -# respond to clients. Minimum value is 5, and many systems define -# maximum value. -# -# Default: 30 -# -# Example: -#connecttimeout = "60" - - -# channels = { "channel":"keyword" }: List of channels to join. -# -# Default: none -# -# Example: -#channels = { -# "#foobar" -# "#miau":"cats" -#} - - -# rejoin = "state": Rejoin channels after disconnecting from the server. -# If rejoin is set to true, channels defined in "channels" are -# also joined when client first time connects to miau. -# -# Default: true -# -# Example: -#rejoin = "false" - - -# leave = "state": Leave channels when all clients have detached from miau. -# If "leave" is set to "false" and "rejoin" is set to "true", -# channels defined at "channels" will be joined at miau startup. -# If both "leave" and "rejoin" is set to "true", channels that -# are left at client detach, are rejoined when client attached -# back to miau. -# -# Default: false -# -# Example: -#leave = "false" - - -# leavemsg = "message": Message miau will either use as PART-message or as an -# ACTION when all clients have detached from miau. If unset or -# set to empty, no message will be shown. Note that many people -# dislike event-based messages (which happens when "leave" is set -# to "false" and "leavemsg" is set). Also see usequitmsg. -# -# Note: Note that commenting this option out and rehashing after leavemsg was -# set, this option is _not_ reverted. To disable leavemsg afterwards you -# need to write an empty string here and rehash. -# -# Default: none -# -# Example: -#leavemsg = "doh" - - -# awaymsg = "message": Text that will be set to miau's away-reason when all -# clients have detached from miau. If unset or set to empty, -# AWAY-status will be left untouched. When any client attaches -# back to miau, AWAY-status will be reset. Also see usequitmsg. -# -# Note: If user sets him/herself away, miau will not touch away-status nor -# message neither when connecting to or disconnecting from miau. -# -# Note: Note that commenting this option out and rehashing after awaymsg was -# set, this option is _not_ reverted. To disable awaymsg afterwards you -# need to write an empty string here and rehash. -# -# Default: none -# -# Example: -#awaymsg = "bouncing around - all private messages will be logged" - - -# usequitmsg = "state": Use last quit-reason as away-reason and/or leave-message -# (if respective options are enabled) when all clients have -# disconnected from miau. If quit-reason is empty, default values -# of awaymsg and leavemsg will be used, otherwise most recent -# quit-message overrides values in miaurc. -# -# Default: true -# -# Example: -# usequitmsg = "false" - - -# getnick = "selection": miau can try to reclaim your primary nick when it is -# lost. This option may be one of the following: "never", -# "detached", "attached", or "always". -# "never" ....... miau will not try to get your nick back. -# "detached" .... miau will try to get your nick when no -# clients are attached. -# "attached" .... miau will try to get your nick when -# there are one or more clients attached. -# "always" ...... miau will try to get your nick -# -# Note: Do _not_ use options "attached" and "always" with clients (like -# irc-II EPIC) that automatically change your nick when they receive -# NICKINUSE from the server - you might end up chaning your nick until -# server drops your connection due excess flood. -# -# Default: detached -# -# Example: -#getnick = "always" - - -# getnickinterval = "seconds": Time between tries (in seconds) to obtain -# currently (possibly) lost primary nick. Don't set it too low -# or you might get kicked out the server due to excess flood. -# -# Default: 60 -# -# Example: -#getnickinterval = "30" - - -# antiidle = "minutes": Time between idle-timer resets in minutes. Set to 0 to -# disable. -# -# Default: 0 -# -# Example: -#antiidle = "300" - - -# qloglength = "minutes": Age of oldest line in quicklog in minutes. Set to zero -# to disable quicklog. -# -# This option might not be compiled in. -# -# Default: 30 -# -# Example: -#qloglength = "30" - - -# timestamp = "option": Location of timestamp in quicklog events. This option -# may be one of the following "beginning", "end", or "none". -# -# This option might not be compiled in. -# -# Default: none -# -# Example: -#timestamp = "beginning" - - -# flushqlog = "state": If set to true, quicklog will be written only when no -# clients are connected and quicklog will be erased when client -# connects to miau. If you are running a single client, you -# probably want to leave this to "false. -# -# This option might not be compiled in. -# -# Default: true -# -# Example: -#flushqlog = "true" - - -# inbox = "state": Enables logging private messages when no clients are -# connected to miau. -# -# This option might not be compiled in. -# -# Default: true -# -# Example: -#inbox = "true" - - -# nevergiveup = "state": If set to true, miau will reset "working"-status of -# servers to working when all are set to dysfunctional. -# Respectively, if set to false, miau will quit when all servers -# on the list have been set to dysfunctional. -# -# Default: true -# -# Example: -#nevergiveup = "false" - - -# norestricted = "state": If set to true, miau will not stay on server that -# forces user to have restricted-status (+r). -# -# Default: true -# -# Example: -#norestricted = "false" - - -# reconnectdelay = "seconds": Time (in seconds) between connection attempts. -# Minumun value is set to 1. -# -# Default: 10 -# -# Example: -#reconnectdelay = "30" - - -# nickfillchar = "fill character": Character used to modify your primary nick -# when all defined nicks are already occupied. Note character is -# a single octet (byte) and if longer string is fed, only the -# first character is used. -# -# Example: When nickfillchar is set to '_', primary nick is "zak" and all -# defined nicks are occupied, next nicks tried are "zak_", "zak__", -# "zak___" and so on. When nick has grown too long, it will be shifted -# one characted to right (where shift is cyclic) - this means -# "zak______" will become "_zak_____", which, again, will become -# "__zak____". -# -# Default: _ -# -# Example: -#nickfillchar = "^" - - -# maxnicklen = "length": Maximum nick length, used with nickfillchar. -# -# Default: 9 -# -# Example: -#maxnicklen = 11 - - -# usermode = "usermode(s)": Usermode that miau will request (if no clients are -# attached at the moment) from the server when connection to the -# server is established. Leave unset or set to empty to disable -# this feature. -# -# Default: none -# -# Example: -#usermode = "+i" - - -# forwardmsg = "command": miau can collect the (private) messages within three -# (3) minutes and pipe them into the program specified. Leave this -# unset or set to empty to disable this feature. -# -# Default: none -# -# Example: -#forwardmsg = "mail user@host" - - -# ignore = { "mask":"ignored" }: List of users whose private messages (PRIVMSG) -# and noticies (NOTICE) are ignored when no clients are attached -# to miau. When "ignored" is left undefined, it is assumed to be -# "true". Setting "ignored" to "false" means that this user will -# _not_ be ignored. This list is processed as a chain. -# -# Default: none -# -# Example: -#ignore = { -# "*@localhost":"yes" -# "zak*":"no" -#} - - -# privlog = "mode": Whatever private messages should be logged in nick-specific -# files. Can be one of "never", "detached", "attached", and -# "always". -# -# This option might not be compiled in. -# -# Default: never -# -# Example: -#privlog = "always" - - -# chanlog = { "channel(s)":"options":"logfile" }: List of channel logfiles. -# -# When channel is set to "*", line represents global log. When logging, -# if channel doesn't have entry of it's own in this list, it will use settings -# of global log and write log to it's own file. When defining global log, -# "logfile" is ignored. Each line can have multiple channels -# (like "#foobar,#miau"). -# -# If logfile is left undefined, logfile will be named after the channel with -# possible postfix (see logpostfix). All lofiles are written in miau's work -# directory. -# -# Options consist of abritary set of following possibilities: -# j: log joins -# e: log parts (exits) -# q: log quits -# m: log messages (privmsg/notice) -# c: log mode changes (changes) -# n: log nick changes -# o: log misc events (other) -# b: log messages from miau (bouncer) -# a: log all of above -# A: log when a client is attached -# D: log when a client is detached -# C: log continuously (status of clients doesn't matter) -# -# This option might not be compiled in. -# -# Default: none -# -# Example: -#chanlog = { -# "#foobar":"a" # log everything on #foobar -# "#miau":"aD":"foo.log" # log everything to file "foo.log" when -# all clients are detached -# "*":"mjeq" # log only messages, joins, parts and quits -# by default -#} - - -# logpostfix = "postfix": When writing log to undefined logfile, each logfile -# consists of channel name followed by postfix. Postfix can be -# defined here. -# -# This option might not be compiled in. -# -# Default: no postfix -# -# Example: -#logpostfix = ".log" - - -# onconnect = { "mode":"target/data"(:"data") }: When miau connects and -# registers user to server, miau can send pre-defined messages. -# User can define miau to send normal messages (PRIVMSG), notices -# (NOTICE) or arbitrary messages. -# -# Mode can be one of the following: -# p: private message (PRIVMSG). -# n: notice (NOTICE). Should be used with services and automatons, but -# unfortunately some network services can't cope with notices. -# r: "raw" message. This means user must provide complete message to send -# to the server. Using raw message user has complete control over what -# is being sent. If you don't know what this is, you don't need this. -# When using modes "p" or "n", user must provide both message and target where -# as with raw messages only one parameter in addition to type should be given. -# -# This option might not be compiled in. -# -# Default: none -# -# Example: -#onconnect = { -# "p":"nickserv":"identify foobar" -# "n":"nickserv@services.host.net":"id raboof" -# "r":"OPER foo bar" -#} - - -# automodes = { "mask":"privilegded" }: List of people who are automatically -# given certain privilege on channel. Mask is given in form of -# "mode:nick!username@host/#channel" (where "mode" is a single -# character) and list is processed as a chain. -# -# This option might not be compiled in. -# -# Default: none -# -# Example: -#automodes = { -# "o:zak*!zak@client*-myisp.com/#channel":"yes" -# "o:zak*!*@evil.impersonator.net/#foobar":"no" -# "v:newbie*!*@ircnet.com/#newbie":"yes" -#} - - -# automodedelay = "seconds": Time (in seconds) after first queued mode change -# would take effect. During this period of time miau can collect -# more than one mode change and commit up to three at a time. -# Other situation reasonaly big value (like 30) here could prove -# useful is channel where there are stupid "auto-oping" bots. -# (Stupid bots do mode changes even if someone else did that -# already.) -# -# This option might not be compiled in. -# -# Default: 30 -# -# Example: -#automodedelay = "60" - - -# cmdpasswd = "password": Password for remote commands. If this is 13 characters -# long, miau assumes it's crypted. Comment this out or leave it -# empty to disable remote commands. When sending miau a remote -# command, password _always_ begins with column (':') (if -# cmdpasswd is set to "foobar" (or hash of it), you need to send -# miau a message beginning with ":foobar" to issue a remote -# command). -# -# This feature might not be compiled in. -# -# If miau is compiled with ENABLE_MKPASSWD, miau can generate password-hashes -# (from command line) with -c -switch. -# -# Default: disabled -# -# Example: -#cmdpasswd = "" - - -# dccbounce = "state": miau can bounce DCCs. Set to true to enable bouncing. -# You probably don't need this. -# -# This option might not be compiled in. -# -# Default: false -# -# Example: -#dccbounce = "true" - - -# dccbindhost = "host": If miau has separate IPs for IRC-network and clients, -# you should enter IP for clients here. -# -# This option might not be compiled in. -# -# Default: no default -# -# Example: -#dccbindhost = "10.0.0.1" diff --git a/openwrt/package/miau/ipkg/miau.conffiles b/openwrt/package/miau/ipkg/miau.conffiles deleted file mode 100644 index a6c7d70a44e..00000000000 --- a/openwrt/package/miau/ipkg/miau.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/default/miau -/etc/init.d/S50miau -/etc/miau/miaurc diff --git a/openwrt/package/miau/ipkg/miau.control b/openwrt/package/miau/ipkg/miau.control deleted file mode 100644 index 688407bb750..00000000000 --- a/openwrt/package/miau/ipkg/miau.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: miau -Version: 1 -Architecture: mipsel -Maintainer: Benjamin Binier benjamin.binier@gmail.com -Priority: optional -Section: net -Description: miau is an IRC-bouncer/proxy diff --git a/openwrt/package/miax/Config.in b/openwrt/package/miax/Config.in deleted file mode 100644 index 9cd66b1bbef..00000000000 --- a/openwrt/package/miax/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_MIAX - prompt "miax.............................. A console iax (asterisk) client" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_BLUEZ_LIBS - select BR2_PACKAGE_LIBPTHREAD - help - miax is a console iax (asterisk) client, it can work with - a soundcard as a normal voip phone, taking input/output from - keyboard, analog/gsm/isdn modem or bluetooth phones. - - http://www.eja.it/?l=gpl&testo=miax diff --git a/openwrt/package/miax/Makefile b/openwrt/package/miax/Makefile deleted file mode 100644 index e121f8df14d..00000000000 --- a/openwrt/package/miax/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=miax -PKG_VERSION:=1.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=44f0d2ef46ee2697d890b7b96846adc7 - -PKG_SOURCE_URL:=http://mesh.dl.sourceforge.net/sourceforge/miax/ -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MIAX,miax,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - CC="$(TARGET_CC)" \ - OFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - all - touch $@ - -$(IPKG_MIAX): - install -d -m0755 $(IDIR_MIAX)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/miax $(IDIR_MIAX)/usr/bin/ - $(RSTRIP) $(IDIR_MIAX) - $(IPKG_BUILD) $(IDIR_MIAX) $(PACKAGE_DIR) diff --git a/openwrt/package/miax/ipkg/miax.control b/openwrt/package/miax/ipkg/miax.control deleted file mode 100644 index 78e47f566d2..00000000000 --- a/openwrt/package/miax/ipkg/miax.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: miax -Priority: optional -Section: net -Description: A console iax (asterisk) client -Depends: kmod-bluetooth, bluez-libs, libpthread diff --git a/openwrt/package/miax/patches/01-cross.patch b/openwrt/package/miax/patches/01-cross.patch deleted file mode 100644 index f47c1101d9d..00000000000 --- a/openwrt/package/miax/patches/01-cross.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN miax-1.4-old/Makefile miax-1.4-new/Makefile ---- miax-1.4-old/Makefile 2005-04-27 18:56:13.000000000 +0200 -+++ miax-1.4-new/Makefile 2005-11-30 01:07:21.000000000 +0100 -@@ -1,4 +1,5 @@ --CFLAGS= -Iiax/ -Igsm/inc -DIAXC_IAX2 -DLIBIAX -g -DPOSIXSLEEP -DLINUX -O2 -+OFLAGS= -02 -g -+CFLAGS= -Iiax/ -Igsm/inc $(CPPFLAGS) -DIAXC_IAX2 -DLIBIAX -DPOSIXSLEEP -DLINUX $(OFLAGS) - SYSLIBS=-lpthread -lm -lbluetooth - - -@@ -32,11 +33,10 @@ - miax.o - - all: $(OBJS) -- gcc $(OBJS) $(CFLAGS) $(SYSLIBS) -o miax -- cp miax /bin/miax -+ $(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) $(SYSLIBS) -o miax - - static: $(OBJS) bluetooth.o -- gcc $(OBJS) $(CFLAGS) $(SYSLIBS) -static -o miax -+ $(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) $(SYSLIBS) -static -o miax - - clean: - rm -f $(OBJS) miax diff --git a/openwrt/package/microcom/Config.in b/openwrt/package/microcom/Config.in deleted file mode 100644 index a371156824b..00000000000 --- a/openwrt/package/microcom/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_MICROCOM - prompt "microcom.......................... Serial terminal" - tristate - default m if CONFIG_DEVEL - help - microcom is a minicom-like serial terminal emulator with scripting - support. - - http://microcomlinux.homestead.com/ - diff --git a/openwrt/package/microcom/Makefile b/openwrt/package/microcom/Makefile deleted file mode 100644 index ebd7ddffec5..00000000000 --- a/openwrt/package/microcom/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=microcom -PKG_VERSION:=1.02 -PKG_FILEVERSION:=102 -PKG_RELEASE:=1 -PKG_MD5SUM:=c7817035dc41cb02e7cfb565cf9b7401 - -PKG_SOURCE_URL:=http://microcom.port5.com/ -PKG_SOURCE:=m$(PKG_FILEVERSION).tar.gz - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MICROCOM,microcom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.prepared: - rm -rf $(PKG_BUILD_DIR) - mkdir -p $(PKG_BUILD_DIR) - # the .tar.gz is different - no subdirectory, so do this manually - zcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) - - touch $@ - -$(PKG_BUILD_DIR)/.configured: - $(CP) $(PKG_BUILD_DIR)/Makefile $(PKG_BUILD_DIR)/Makefile.tmp - sed 's~gcc~$$(CC)~' $(PKG_BUILD_DIR)/Makefile.tmp > $(PKG_BUILD_DIR)/Makefile - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC) - touch $@ - -$(IPKG_MICROCOM): - install -d -m0755 $(IDIR_MICROCOM)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/microcom $(IDIR_MICROCOM)/usr/bin - $(RSTRIP) $(IDIR_MICROCOM) - $(IPKG_BUILD) $(IDIR_MICROCOM) $(PACKAGE_DIR) - diff --git a/openwrt/package/microcom/ipkg/microcom.control b/openwrt/package/microcom/ipkg/microcom.control deleted file mode 100644 index 1a40157fc23..00000000000 --- a/openwrt/package/microcom/ipkg/microcom.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: microcom -Priority: optional -Section: console -Description: serial terminal diff --git a/openwrt/package/microperl/Config.in b/openwrt/package/microperl/Config.in deleted file mode 100644 index 2f49de0c1a7..00000000000 --- a/openwrt/package/microperl/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_MICROPERL - prompt "microperl......................... A really minimal perl" - tristate - default m if CONFIG_DEVEL - help - Perl without operating-specific functions such as readdir. - diff --git a/openwrt/package/microperl/Makefile b/openwrt/package/microperl/Makefile deleted file mode 100644 index 854d897ed1a..00000000000 --- a/openwrt/package/microperl/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=microperl -PKG_VERSION:=5.8.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=8d4aa4e061fd5bc0c39e4f0a63267880 - -PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \ - ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \ - ftp://ftp.gmd.de/mirrors/CPAN/src/5.0 \ - ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 -PKG_SOURCE:=perl-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MICROPERL,microperl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.micro \ - CC="$(TARGET_CC)" OPTIMIZE="$(TARGET_CFLAGS)" - touch $@ - -$(IPKG_MICROPERL): - install -d -m0755 $(IDIR_MICROPERL)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/microperl $(IDIR_MICROPERL)/usr/bin/ - $(RSTRIP) $(IDIR_MICROPERL) - $(IPKG_BUILD) $(IDIR_MICROPERL) $(PACKAGE_DIR) diff --git a/openwrt/package/microperl/ipkg/microperl.control b/openwrt/package/microperl/ipkg/microperl.control deleted file mode 100644 index 4e54b6326a9..00000000000 --- a/openwrt/package/microperl/ipkg/microperl.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: microperl -Priority: optional -Section: net -Description: Perl without operating-specific functions such as readdir. diff --git a/openwrt/package/mini_httpd/Config.in b/openwrt/package/mini_httpd/Config.in deleted file mode 100644 index 9946633761e..00000000000 --- a/openwrt/package/mini_httpd/Config.in +++ /dev/null @@ -1,96 +0,0 @@ -menu "mini-httpd........................ A small web server" - -config BR2_COMPILE_MINI_HTTPD - tristate - default n - depends BR2_PACKAGE_MINI_HTTPD || BR2_PACKAGE_MINI_HTTPD_MATRIXSSL || BR2_PACKAGE_MINI_HTTPD_OPENSSL - -config BR2_PACKAGE_MINI_HTTPD - prompt "mini-httpd........................ A small web server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_MINI_HTTPD - help - mini_httpd is a small HTTP server. Its performance is not great, but for - low or medium traffic sites it's quite adequate. It implements all the - basic features of an HTTP server, including: - - * GET, HEAD, and POST methods. - * CGI. - * Basic authentication. - * Security against ".." filename snooping. - * The common MIME types. - * Trailing-slash redirection. - * index.html, index.htm, index.cgi - * Directory listings. - * Multihoming / virtual hosting. - * Standard logging. - * Custom error pages. - - It can also be configured to do IPv6. - - http://www.acme.com/software/mini_httpd/ - -config BR2_PACKAGE_MINI_HTTPD_HTPASSWD - prompt "mini-httpd-htpasswd............... Utility to generate HTTP access files" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_MINI_HTTPD - help - This file generates .htaccess/.htpasswd files to use HTTP access authentication - -config BR2_PACKAGE_MINI_HTTPD_MATRIXSSL - prompt "mini-httpd-matrixssl.............. A small web server, built with SSL support using MatrixSSL" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_MINI_HTTPD - select BR2_PACKAGE_LIBMATRIXSSL - help - mini_httpd is a small HTTP server. Its performance is not great, but for - low or medium traffic sites it's quite adequate. It implements all the - basic features of an HTTP server, including: - - * GET, HEAD, and POST methods. - * CGI. - * Basic authentication. - * Security against ".." filename snooping. - * The common MIME types. - * Trailing-slash redirection. - * index.html, index.htm, index.cgi - * Directory listings. - * Multihoming / virtual hosting. - * Standard logging. - * Custom error pages. - - It can also be configured to do SSL/HTTPS and IPv6. - - http://www.acme.com/software/mini_httpd/ - -config BR2_PACKAGE_MINI_HTTPD_OPENSSL - prompt "mini-httpd-openssl................ A small web server, built with SSL support using OpenSSL" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_MINI_HTTPD - select BR2_PACKAGE_LIBOPENSSL - help - mini_httpd is a small HTTP server. Its performance is not great, but for - low or medium traffic sites it's quite adequate. It implements all the - basic features of an HTTP server, including: - - * GET, HEAD, and POST methods. - * CGI. - * Basic authentication. - * Security against ".." filename snooping. - * The common MIME types. - * Trailing-slash redirection. - * index.html, index.htm, index.cgi - * Directory listings. - * Multihoming / virtual hosting. - * Standard logging. - * Custom error pages. - - It can also be configured to do SSL/HTTPS and IPv6. - - http://www.acme.com/software/mini_httpd/ - -endmenu diff --git a/openwrt/package/mini_httpd/Makefile b/openwrt/package/mini_httpd/Makefile deleted file mode 100644 index da976ef36fc..00000000000 --- a/openwrt/package/mini_httpd/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mini-httpd -PKG_VERSION:=1.19 -PKG_RELEASE:=1 -PKG_MD5SUM:=792a529dfe974355aad8ba6c80e54e7a - -PKG_SOURCE_URL:=http://www.acme.com/software/mini_httpd/ -PKG_SOURCE:=mini_httpd-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/mini_httpd-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,MINI_HTTPD_MATRIXSSL,mini-httpd-matrixssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - - -$(PKG_BUILD_DIR)/.configured: - $(CP) ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/ - touch $@ - -$(PKG_BUILD_DIR)/.built: - # with MatrixSSL -ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - OFLAGS="$(TARGET_CFLAGS)" \ - SSL_DEFS="-DUSE_SSL -DHAVE_MATRIXSSL" \ - SSL_INC="-I$(STAGING_DIR)/usr/include" \ - SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lmatrixssl" \ - SSL_OBJS="matrixssl_helper.o" \ - all - (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-matrixssl; ) - $(MAKE) -C $(PKG_BUILD_DIR) clean -endif - # with OpenSSL -ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - OFLAGS="$(TARGET_CFLAGS)" \ - SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \ - SSL_INC="-I$(STAGING_DIR)/usr/include" \ - SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \ - all - (cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-openssl; ) - $(MAKE) -C $(PKG_BUILD_DIR) clean -endif - # without SSL -ifneq ($(BR2_PACKAGE_MINI_HTTPD),) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - OFLAGS="$(TARGET_CFLAGS)" \ - all -endif - touch $@ - -$(IPKG_MINI_HTTPD): - install -d -m0755 $(IDIR_MINI_HTTPD)/etc - install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/mini_httpd.conf - install -d -m0755 $(IDIR_MINI_HTTPD)/etc/default - install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD)/etc/default/mini_httpd - install -d -m0755 $(IDIR_MINI_HTTPD)/etc/init.d - install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD)/etc/init.d/mini_httpd - install -d -m0755 $(IDIR_MINI_HTTPD)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/mini_httpd $(IDIR_MINI_HTTPD)/usr/sbin/ - $(RSTRIP) $(IDIR_MINI_HTTPD) - $(IPKG_BUILD) $(IDIR_MINI_HTTPD) $(PACKAGE_DIR) - -$(IPKG_MINI_HTTPD_HTPASSWD): - install -d -m0755 $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/htpasswd $(IDIR_MINI_HTTPD_HTPASSWD)/usr/sbin/ - $(RSTRIP) $(IDIR_MINI_HTTPD_HTPASSWD) - $(IPKG_BUILD) $(IDIR_MINI_HTTPD_HTPASSWD) $(PACKAGE_DIR) - -$(IPKG_MINI_HTTPD_MATRIXSSL): - install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc - install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf - install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/ - install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default - install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd - install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d - install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd - install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd - $(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL) - $(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR) - -$(IPKG_MINI_HTTPD_OPENSSL): - install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc - install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf - install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/ - install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default - install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd - install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d - install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd - install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd - $(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL) - $(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR) diff --git a/openwrt/package/mini_httpd/files/matrixssl_helper.c b/openwrt/package/mini_httpd/files/matrixssl_helper.c deleted file mode 100644 index e3fe3346c2e..00000000000 --- a/openwrt/package/mini_httpd/files/matrixssl_helper.c +++ /dev/null @@ -1,455 +0,0 @@ -/* - * MatrixSSL helper functions - * - * Copyright (C) 2005 Nicolas Thill - * - * 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. - * - * Portions borrowed from MatrixSSL example code - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "matrixssl_helper.h" - -#define SSL_SOCKET_EOF 0x0001 -#define SSL_SOCKET_CLOSE_NOTIFY 0x0002 - -#define min(a, b) ( (a) < (b) ) ? (a) : (b) - -static int _ssl_read(SSL *ssl, char *buf, int len); -static int _ssl_write(SSL *ssl, char *buf, int len); -static void _ssl_setSocketBlock(int fd); -static void _ssl_setSocketNonblock(int fd); -static void _ssl_closeSocket(int fd); - - -SSL * SSL_new(sslKeys_t *keys) -{ - SSL * ssl; - ssl = (SSL *)malloc(sizeof(SSL)); - - if (!ssl) return 0; - - ssl->keys = keys; - if ( matrixSslNewSession(&(ssl->ssl), ssl->keys, NULL, SSL_FLAGS_SERVER) < 0 ) { - } - - ssl->insock.size = 1024; - ssl->insock.buf = ssl->insock.start = ssl->insock.end = - (unsigned char *)malloc(ssl->insock.size); - - ssl->outsock.size = 1024; - ssl->outsock.buf = ssl->outsock.start = ssl->outsock.end = - (unsigned char *)malloc(ssl->outsock.size); - - ssl->inbuf.size = 0; - ssl->inbuf.buf = ssl->inbuf.start = ssl->inbuf.end = NULL; - - return ssl; -} - - -int SSL_accept(SSL *ssl) { - - unsigned char buf[1024]; - int status, rc; - -readMore: - rc = _ssl_read(ssl, buf, sizeof(buf)); - if (rc == 0) { - if (ssl->status == SSL_SOCKET_EOF || ssl->status == SSL_SOCKET_CLOSE_NOTIFY) { - SSL_free(ssl); - return -1; - } - if (matrixSslHandshakeIsComplete(ssl->ssl) == 0) { - goto readMore; - } - } else if (rc > 0) { - return 0; - } else { - SSL_free(ssl); - return -1; - } - - return 1; -} - - -void SSL_set_fd(SSL *ssl, int fd) { - ssl->fd = fd; -} - - -int SSL_read(SSL *ssl, char *buf, int len) { - int rc; -readMore: - rc = _ssl_read(ssl, buf, len); - if (rc <= 0) { - if (rc < 0 || ssl->status == SSL_SOCKET_EOF || ssl->status == SSL_SOCKET_CLOSE_NOTIFY) { - _ssl_closeSocket(ssl->fd); - return rc; - } - goto readMore; - } - return rc; -} - - -int SSL_write(SSL *ssl, char *buf, int len) { - int rc; -writeMore: - rc = _ssl_write(ssl, buf, len); - if (rc <= 0) { - if (rc < 0) { - return rc; - } - goto writeMore; - } - return rc; -} - - -void SSL_free(SSL * ssl) -{ - matrixSslDeleteSession(ssl->ssl); - if (ssl->insock.buf) { - free(ssl->insock.buf); - } - if (ssl->outsock.buf) { - free(ssl->outsock.buf); - } - if (ssl->inbuf.buf) { - free(ssl->inbuf.buf); - } - free(ssl); -} - - - -static void _ssl_setSocketBlock(int fd) -{ - fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NONBLOCK); - fcntl(fd, F_SETFD, FD_CLOEXEC); -} - - -static void _ssl_setSocketNonblock(int fd) -{ - fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); -} - - -static void _ssl_closeSocket(int fd) -{ - char buf[32]; - - if (fd != -1) { - _ssl_setSocketNonblock(fd); - if (shutdown(fd, 1) >= 0) { - while (recv(fd, buf, sizeof(buf), 0) > 0); - } - close(fd); - } -} - - -static int _ssl_read(SSL *ssl, char *buf, int len) -{ - int bytes, rc, remaining; - unsigned char error, alertLevel, alertDescription, performRead; - - ssl->status = 0; - - if (ssl->ssl == NULL || len <= 0) { - return -1; - } -/* - If inbuf is valid, then we have previously decoded data that must be - returned, return as much as possible. Once all buffered data is - returned, free the inbuf. -*/ - if (ssl->inbuf.buf) { - if (ssl->inbuf.start < ssl->inbuf.end) { - remaining = (int)(ssl->inbuf.end - ssl->inbuf.start); - bytes = (int)min(len, remaining); - memcpy(buf, ssl->inbuf.start, bytes); - ssl->inbuf.start += bytes; - return bytes; - } - free(ssl->inbuf.buf); - ssl->inbuf.buf = NULL; - } -/* - Pack the buffered socket data (if any) so that start is at zero. -*/ - if (ssl->insock.buf < ssl->insock.start) { - if (ssl->insock.start == ssl->insock.end) { - ssl->insock.start = ssl->insock.end = ssl->insock.buf; - } else { - memmove(ssl->insock.buf, ssl->insock.start, ssl->insock.end - ssl->insock.start); - ssl->insock.end -= (ssl->insock.start - ssl->insock.buf); - ssl->insock.start = ssl->insock.buf; - } - } -/* - Read up to as many bytes as there are remaining in the buffer. We could - Have encrypted data already cached in conn->insock, but might as well read more - if we can. -*/ - performRead = 0; -readMore: - if (ssl->insock.end == ssl->insock.start || performRead) { - performRead = 1; - bytes = recv(ssl->fd, (char *)ssl->insock.end, - (int)((ssl->insock.buf + ssl->insock.size) - ssl->insock.end), MSG_NOSIGNAL); - if (bytes == -1) { - ssl->status = errno; - return -1; - } - if (bytes == 0) { - ssl->status = SSL_SOCKET_EOF; - return 0; - } - ssl->insock.end += bytes; - } -/* - Define a temporary sslBuf -*/ - ssl->inbuf.start = ssl->inbuf.end = ssl->inbuf.buf = (unsigned char *)malloc(len); - ssl->inbuf.size = len; -/* - Decode the data we just read from the socket -*/ -decodeMore: - error = 0; - alertLevel = 0; - alertDescription = 0; - - rc = matrixSslDecode(ssl->ssl, &ssl->insock, &ssl->inbuf, &error, &alertLevel, - &alertDescription); - switch (rc) { -/* - Successfully decoded a record that did not return data or require a response. -*/ - case SSL_SUCCESS: - return 0; -/* - Successfully decoded an application data record, and placed in tmp buf -*/ - case SSL_PROCESS_DATA: -/* - Copy as much as we can from the temp buffer into the caller's buffer - and leave the remainder in conn->inbuf until the next call to read - It is possible that len > data in buffer if the encoded record - was longer than len, but the decoded record isn't! -*/ - rc = (int)(ssl->inbuf.end - ssl->inbuf.start); - rc = min(rc, len); - memcpy(buf, ssl->inbuf.start, rc); - ssl->inbuf.start += rc; - return rc; -/* - We've decoded a record that requires a response into tmp - If there is no data to be flushed in the out buffer, we can write out - the contents of the tmp buffer. Otherwise, we need to append the data - to the outgoing data buffer and flush it out. -*/ - case SSL_SEND_RESPONSE: - bytes = send(ssl->fd, (char *)ssl->inbuf.start, - (int)(ssl->inbuf.end - ssl->inbuf.start), MSG_NOSIGNAL); - if (bytes == -1) { - ssl->status = errno; - if (ssl->status != EAGAIN) { - goto readError; - } - ssl->status = 0; - } - ssl->inbuf.start += bytes; - if (ssl->inbuf.start < ssl->inbuf.end) { -/* - This must be a non-blocking socket since it didn't all get sent - out and there was no error. We want to finish the send here - simply because we are likely in the SSL handshake. -*/ - _ssl_setSocketBlock(ssl->fd); - bytes = send(ssl->fd, (char *)ssl->inbuf.start, - (int)(ssl->inbuf.end - ssl->inbuf.start), MSG_NOSIGNAL); - if (bytes == -1) { - ssl->status = errno; - goto readError; - } - ssl->inbuf.start += bytes; -/* - Can safely set back to non-blocking because we wouldn't - have got here if this socket wasn't non-blocking to begin with. -*/ - _ssl_setSocketNonblock(ssl->fd); - } - ssl->inbuf.start = ssl->inbuf.end = ssl->inbuf.buf; - return 0; -/* - There was an error decoding the data, or encoding the out buffer. - There may be a response data in the out buffer, so try to send. - We try a single hail-mary send of the data, and then close the socket. - Since we're closing on error, we don't worry too much about a clean flush. -*/ - case SSL_ERROR: - if (ssl->inbuf.start < ssl->inbuf.end) { - _ssl_setSocketNonblock(ssl->fd); - bytes = send(ssl->fd, (char *)ssl->inbuf.start, - (int)(ssl->inbuf.end - ssl->inbuf.start), MSG_NOSIGNAL); - } - goto readError; -/* - We've decoded an alert. The level and description passed into - matrixSslDecode are filled in with the specifics. -*/ - case SSL_ALERT: - if (alertDescription == SSL_ALERT_CLOSE_NOTIFY) { - ssl->status = SSL_SOCKET_CLOSE_NOTIFY; - goto readZero; - } - goto readError; -/* - We have a partial record, we need to read more data off the socket. - If we have a completely full conn->insock buffer, we'll need to grow it - here so that we CAN read more data when called the next time. -*/ - case SSL_PARTIAL: - if (ssl->insock.start == ssl->insock.buf && ssl->insock.end == - (ssl->insock.buf + ssl->insock.size)) { - if (ssl->insock.size > SSL_MAX_BUF_SIZE) { - goto readError; - } - ssl->insock.size *= 2; - ssl->insock.start = ssl->insock.buf = - (unsigned char *)realloc(ssl->insock.buf, ssl->insock.size); - ssl->insock.end = ssl->insock.buf + (ssl->insock.size / 2); - } - if (!performRead) { - performRead = 1; - free(ssl->inbuf.buf); - ssl->inbuf.buf = NULL; - goto readMore; - } else { - goto readZero; - } -/* - The out buffer is too small to fit the decoded or response - data. Increase the size of the buffer and call decode again -*/ - case SSL_FULL: - ssl->inbuf.size *= 2; - if (ssl->inbuf.buf != (unsigned char*)buf) { - free(ssl->inbuf.buf); - ssl->inbuf.buf = NULL; - } - ssl->inbuf.start = ssl->inbuf.end = ssl->inbuf.buf = - (unsigned char *)malloc(ssl->inbuf.size); - goto decodeMore; - } -/* - We consolidated some of the returns here because we must ensure - that conn->inbuf is cleared if pointing at caller's buffer, otherwise - it will be freed later on. -*/ -readZero: - if (ssl->inbuf.buf == (unsigned char*)buf) { - ssl->inbuf.buf = NULL; - } - return 0; -readError: - if (ssl->inbuf.buf == (unsigned char*)buf) { - ssl->inbuf.buf = NULL; - } - return -1; -} - - -int _ssl_write(SSL *ssl, char *buf, int len) -{ - int rc; - - ssl->status = 0; -/* - Pack the buffered socket data (if any) so that start is at zero. -*/ - if (ssl->outsock.buf < ssl->outsock.start) { - if (ssl->outsock.start == ssl->outsock.end) { - ssl->outsock.start = ssl->outsock.end = ssl->outsock.buf; - } else { - memmove(ssl->outsock.buf, ssl->outsock.start, ssl->outsock.end - ssl->outsock.start); - ssl->outsock.end -= (ssl->outsock.start - ssl->outsock.buf); - ssl->outsock.start = ssl->outsock.buf; - } - } -/* - If there is buffered output data, the caller must be trying to - send the same amount of data as last time. We don't support - sending additional data until the original buffered request has - been completely sent. -*/ - if (ssl->outBufferCount > 0 && len != ssl->outBufferCount) { - return -1; - } -/* - If we don't have buffered data, encode the caller's data -*/ - if (ssl->outBufferCount == 0) { -retryEncode: - rc = matrixSslEncode(ssl->ssl, (unsigned char *)buf, len, &ssl->outsock); - switch (rc) { - case SSL_ERROR: - return -1; - case SSL_FULL: - if (ssl->outsock.size > SSL_MAX_BUF_SIZE) { - return -1; - } - ssl->outsock.size *= 2; - ssl->outsock.buf = - (unsigned char *)realloc(ssl->outsock.buf, ssl->outsock.size); - ssl->outsock.end = ssl->outsock.buf + (ssl->outsock.end - ssl->outsock.start); - ssl->outsock.start = ssl->outsock.buf; - goto retryEncode; - } - } -/* - We've got data to send. -*/ - rc = send(ssl->fd, (char *)ssl->outsock.start, - (int)(ssl->outsock.end - ssl->outsock.start), MSG_NOSIGNAL); - if (rc == -1) { - ssl->status = errno; - return -1; - } - ssl->outsock.start += rc; -/* - If we wrote it all return the length, otherwise remember the number of - bytes passed in, and return 0 to be called again later. -*/ - if (ssl->outsock.start == ssl->outsock.end) { - ssl->outBufferCount = 0; - return len; - } - ssl->outBufferCount = len; - return 0; -} - diff --git a/openwrt/package/mini_httpd/files/matrixssl_helper.h b/openwrt/package/mini_httpd/files/matrixssl_helper.h deleted file mode 100644 index e5854df64a5..00000000000 --- a/openwrt/package/mini_httpd/files/matrixssl_helper.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * MatrixSSL helper functions - * - * Copyright (C) 2005 Nicolas Thill - * - * 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. - */ - -#ifndef __MATRIXSSL_HELPER_H__ -#define __MATRIXSSL_HELPER_H__ - -#include - -typedef struct __SSL { - int fd; - ssl_t *ssl; - sslKeys_t *keys; - sslBuf_t insock, outsock, inbuf; - int outBufferCount; - int partial; - int status; -} SSL; - -SSL * SSL_new(sslKeys_t *keys); -void SSL_set_fd(SSL *ssl, int fd); -int SSL_accept(SSL *ssl); -int SSL_read(SSL *ssl, char *b, int len); -int SSL_write(SSL *ssl, char *buf, int len); -void SSL_free(SSL *ssl); - -#endif /* __MATRIXSSL_HELPER_H__ */ diff --git a/openwrt/package/mini_httpd/files/mini_httpd-ssl.conf b/openwrt/package/mini_httpd/files/mini_httpd-ssl.conf deleted file mode 100644 index 1cd7022d540..00000000000 --- a/openwrt/package/mini_httpd/files/mini_httpd-ssl.conf +++ /dev/null @@ -1,7 +0,0 @@ -cgipat=cgi-bin/**|**.sh -dir=/www -nochroot -pidfile=/var/run/mini_httpd.pid -user=root -ssl -certfile=/etc/mini_httpd.pem diff --git a/openwrt/package/mini_httpd/files/mini_httpd.conf b/openwrt/package/mini_httpd/files/mini_httpd.conf deleted file mode 100644 index d636a4378bd..00000000000 --- a/openwrt/package/mini_httpd/files/mini_httpd.conf +++ /dev/null @@ -1,5 +0,0 @@ -cgipat=cgi-bin/**|**.sh -dir=/www -nochroot -pidfile=/var/run/mini_httpd.pid -user=root diff --git a/openwrt/package/mini_httpd/files/mini_httpd.default b/openwrt/package/mini_httpd/files/mini_httpd.default deleted file mode 100644 index 85b229e8897..00000000000 --- a/openwrt/package/mini_httpd/files/mini_httpd.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="-C /etc/mini_httpd.conf" diff --git a/openwrt/package/mini_httpd/files/mini_httpd.init b/openwrt/package/mini_httpd/files/mini_httpd.init deleted file mode 100644 index 77bd6fd3b7c..00000000000 --- a/openwrt/package/mini_httpd/files/mini_httpd.init +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -BIN=mini_httpd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - $BIN $OPTIONS 2>/dev/null - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "usage: $0 (start|stop|restart)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/mini_httpd/files/mini_httpd.pem b/openwrt/package/mini_httpd/files/mini_httpd.pem deleted file mode 100644 index 8a1241a767b..00000000000 --- a/openwrt/package/mini_httpd/files/mini_httpd.pem +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXgIBAAKBgQC5rFJOQakwMmF9aoVnAXaQLOOPoYOEk19/ls9VZt1ZqfzQuTbG -GGrgMIDclB0kHMFvSbzeiVjMnrSdQTNe1gOQAGtHhHiqugrLqH9m3wqOerbf/Yir -hic9U6X9RaWC6BzNgcYU1QtPn1sDtbMNFAB6jzF3W76EIlHEobgMtfqtxwIDAQAB -AoGBAKJst9eToyDxgc1ICQlSA1kem7eDUF0C2xDvadLI2KxegzZIQD1NEPmsFJ5h -x5hWu3TSabG3LwJZd6D1b63vxE6QRMhcDG3idb7kXzhOOZyfnlnrBtJ3VJC/UH5H -O1pMMBxcu2fXrua+h7BW0gMoZhchvsArDoWaZPjNUNHiNRYBAkEA3Ngnge7njqlf -/UlLkQHHfxgorQ78GjOzrrUvz86pFtW8RKCjAv55HIqAhWrSgxWF4yXkPO2XOHC9 -KTeVKccjAQJBANc63r3M3yP817cPzyo/8BJQD9nAzmolrsBf1YMxML20UmEbObax -QdmxoYu/a8tOD4gT6EZDkauJU0yS69HGeMcCQQCvRmbkuuXQ1iC29+sfpVfeSSBP -aaswaIRdTrQprA2LcAtCNHPsNmeM/WfPe96j5vsiMrqYmMECLIgVJGYgiEoBAkEA -kzg1e+ZTC667bwBlWCT79crFzNDRYFH+QqBKz74p9NkPMFULGSgOPvX95jU9aocu -oInda5J0Zb09OTeWDpuPqQJAUIeY36WUst7NaW40mZXkMjjR2QtWi7P4cmv7nLp0 -WdPQzkUW1Bv4sSUQ7svQqpmZPaFiyhXL1VSa1M5MPd3tbA== ------END RSA PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICOTCCAaKgAwIBAgIJANRuTbnzy8ObMA0GCSqGSIb3DQEBBAUAMFMxCzAJBgNV -BAYTAkZSMQ4wDAYDVQQIEwVQYXJpczEOMAwGA1UEBxMFUGFyaXMxEDAOBgNVBAoT -B015IEhvbWUxEjAQBgNVBAMTCU15IFJvdXRlcjAeFw0wNTAxMTQwMjQzMjdaFw0w -NjAxMTQwMjQzMjdaMFMxCzAJBgNVBAYTAkZSMQ4wDAYDVQQIEwVQYXJpczEOMAwG -A1UEBxMFUGFyaXMxEDAOBgNVBAoTB015IEhvbWUxEjAQBgNVBAMTCU15IFJvdXRl -cjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuaxSTkGpMDJhfWqFZwF2kCzj -j6GDhJNff5bPVWbdWan80Lk2xhhq4DCA3JQdJBzBb0m83olYzJ60nUEzXtYDkABr -R4R4qroKy6h/Zt8Kjnq23/2Iq4YnPVOl/UWlgugczYHGFNULT59bA7WzDRQAeo8x -d1u+hCJRxKG4DLX6rccCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgZAMA0GCSqG -SIb3DQEBBAUAA4GBAErI3QmcZVzjxKcoPTO3z8cRJV87SVFp0qbIjbYCBDUWB1QY -/bMkQPr2zJyfJmUYLEs4iKgHrmlaUCMHy9NZKOg9ZxrW42BtQ5QnOtDm3UifwzJW -oCFC3uPWfTYsZn/FrUXlErds+xXXT63VJzBe6DdXwHcdcdxzl05oIyL9JIzI ------END CERTIFICATE----- diff --git a/openwrt/package/mini_httpd/ipkg/mini-httpd-htpasswd.control b/openwrt/package/mini_httpd/ipkg/mini-httpd-htpasswd.control deleted file mode 100644 index 6b80aa6d9b5..00000000000 --- a/openwrt/package/mini_httpd/ipkg/mini-httpd-htpasswd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: mini-httpd-htpasswd -Priority: optional -Section: net -Description: utility to generate HTTP access authentication files diff --git a/openwrt/package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles b/openwrt/package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles deleted file mode 100644 index 36a86b957c7..00000000000 --- a/openwrt/package/mini_httpd/ipkg/mini-httpd-matrixssl.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/default/mini_httpd -/etc/mini_httpd.conf -/etc/mini_httpd.pem diff --git a/openwrt/package/mini_httpd/ipkg/mini-httpd-matrixssl.control b/openwrt/package/mini_httpd/ipkg/mini-httpd-matrixssl.control deleted file mode 100644 index 5967ac7fb9b..00000000000 --- a/openwrt/package/mini_httpd/ipkg/mini-httpd-matrixssl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mini-httpd-matrixssl -Priority: optional -Section: net -Description: A small HTTP server, built with SSL support using MatrixSSL. -Depends: libmatrixssl diff --git a/openwrt/package/mini_httpd/ipkg/mini-httpd-openssl.conffiles b/openwrt/package/mini_httpd/ipkg/mini-httpd-openssl.conffiles deleted file mode 100644 index 36a86b957c7..00000000000 --- a/openwrt/package/mini_httpd/ipkg/mini-httpd-openssl.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/default/mini_httpd -/etc/mini_httpd.conf -/etc/mini_httpd.pem diff --git a/openwrt/package/mini_httpd/ipkg/mini-httpd-openssl.control b/openwrt/package/mini_httpd/ipkg/mini-httpd-openssl.control deleted file mode 100644 index 09bfb66821e..00000000000 --- a/openwrt/package/mini_httpd/ipkg/mini-httpd-openssl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mini-httpd-openssl -Priority: optional -Section: net -Description: A small HTTP server, built with SSL support using OpenSSL. -Depends: libopenssl diff --git a/openwrt/package/mini_httpd/ipkg/mini-httpd.conffiles b/openwrt/package/mini_httpd/ipkg/mini-httpd.conffiles deleted file mode 100644 index d1123c2a377..00000000000 --- a/openwrt/package/mini_httpd/ipkg/mini-httpd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/default/mini_httpd -/etc/mini_httpd.conf diff --git a/openwrt/package/mini_httpd/ipkg/mini-httpd.control b/openwrt/package/mini_httpd/ipkg/mini-httpd.control deleted file mode 100644 index 6466feed20f..00000000000 --- a/openwrt/package/mini_httpd/ipkg/mini-httpd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mini-httpd -Priority: optional -Section: net -Description: A small HTTP server, built with SSL support using MatrixSSL. -Depends: libmatrixssl diff --git a/openwrt/package/mini_httpd/patches/001-cgi_path.patch b/openwrt/package/mini_httpd/patches/001-cgi_path.patch deleted file mode 100644 index c847d948b47..00000000000 --- a/openwrt/package/mini_httpd/patches/001-cgi_path.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ruN mini_httpd-1.19-old/mini_httpd.c mini_httpd-1.19-new/mini_httpd.c ---- mini_httpd-1.19-old/mini_httpd.c 2005-10-19 01:11:24.000000000 +0200 -+++ mini_httpd-1.19-new/mini_httpd.c 2005-10-19 01:13:05.000000000 +0200 -@@ -138,10 +138,10 @@ - #define CGI_NICE 10 - #endif /* CGI_NICE */ - #ifndef CGI_PATH --#define CGI_PATH "/usr/local/bin:/usr/ucb:/bin:/usr/bin" -+#define CGI_PATH "/usr/bin:/bin:/usr/sbin:/sbin" - #endif /* CGI_PATH */ - #ifndef CGI_LD_LIBRARY_PATH --#define CGI_LD_LIBRARY_PATH "/usr/local/lib:/usr/lib" -+#define CGI_LD_LIBRARY_PATH "/usr/lib:/lib" - #endif /* CGI_LD_LIBRARY_PATH */ - #ifndef AUTH_FILE - #define AUTH_FILE ".htpasswd" diff --git a/openwrt/package/mini_httpd/patches/500-matrixssl.patch b/openwrt/package/mini_httpd/patches/500-matrixssl.patch deleted file mode 100644 index 0ab8d683311..00000000000 --- a/openwrt/package/mini_httpd/patches/500-matrixssl.patch +++ /dev/null @@ -1,161 +0,0 @@ -diff -ruN mini_httpd-1.19-orig/Makefile mini_httpd-1.19-3/Makefile ---- mini_httpd-1.19-orig/Makefile 2002-11-02 00:02:57.000000000 +0100 -+++ mini_httpd-1.19-3/Makefile 2005-03-09 08:52:21.000000000 +0100 -@@ -14,17 +14,30 @@ - # http://www.openssl.org/ Make sure the SSL_TREE definition points to the - # tree with your OpenSSL installation - depending on how you installed it, - # it may be in /usr/local instead of /usr/local/ssl. -+ -+# OpenSSL - #SSL_TREE = /usr/local/ssl - #SSL_DEFS = -DUSE_SSL - #SSL_INC = -I${SSL_TREE}/include - #SSL_LIBS = -L${SSL_TREE}/lib -lssl -lcrypto -+#SSL_OBJS = -+ -+# MatrixSSL -+#SSL_TREE = -+#SSL_DEFS = -DUSE_SSL -DHAVE_MATRIXSSL -+#SSL_INC = -+#SSL_LIBS = -lmatrixssl -+#SSL_OBJS = matrixssl_helper.o - - --BINDIR = /usr/local/sbin --MANDIR = /usr/local/man -+DESTDIR = -+ -+BINDIR = $(DESTDIR)/usr/sbin -+MANDIR = $(DESTDIR)/usr/share/man - CC = gcc - CDEFS = ${SSL_DEFS} ${SSL_INC} --CFLAGS = -O ${CDEFS} -+OFLAGS = -O -+CFLAGS = ${OFLAGS} ${CDEFS} - #CFLAGS = -g ${CDEFS} --LDFLAGS = -s -+LDFLAGS = - #LDFLAGS = -g -@@ -32,12 +45,15 @@ - - all: mini_httpd htpasswd - --mini_httpd: mini_httpd.o match.o tdate_parse.o -- ${CC} ${CFLAGS} ${LDFLAGS} mini_httpd.o match.o tdate_parse.o ${LDLIBS} -o mini_httpd -+mini_httpd: mini_httpd.o match.o tdate_parse.o ${SSL_OBJS} -+ ${CC} ${CFLAGS} ${LDFLAGS} mini_httpd.o match.o tdate_parse.o ${SSL_OBJS} ${LDLIBS} -o mini_httpd - - mini_httpd.o: mini_httpd.c version.h port.h match.h tdate_parse.h mime_encodings.h mime_types.h - ${CC} ${CFLAGS} -c mini_httpd.c - -+matrixssl_helper.o: matrixssl_helper.c -+ ${CC} ${CFLAGS} -c matrixssl_helper.c -+ - match.o: match.c match.h - ${CC} ${CFLAGS} -c match.c - -@@ -71,16 +87,18 @@ - chmod 600 mini_httpd.pem - - --install: all -- rm -f ${BINDIR}/mini_httpd ${BINDIR}/htpasswd -+install: all uninstall - -mkdir -p ${BINDIR} - cp mini_httpd htpasswd ${BINDIR} -- rm -f ${MANDIR}/man8/mini_httpd.8 ${MANDIR}/man1/htpasswd.1 - -mkdir -p ${MANDIR}/man8 - cp mini_httpd.8 ${MANDIR}/man8 - -mkdir -p ${MANDIR}/man1 - cp htpasswd.1 ${MANDIR}/man1 - -+uninstall: -+ rm -f ${BINDIR}/mini_httpd ${BINDIR}/htpasswd -+ rm -f ${MANDIR}/man8/mini_httpd.8 ${MANDIR}/man1/htpasswd.1 -+ - clean: - rm -f mini_httpd mime_encodings.h mime_types.h htpasswd mini_httpd.rnd *.o core core.* *.core - -diff -ruN mini_httpd-1.19-orig/mini_httpd.c mini_httpd-1.19-3/mini_httpd.c ---- mini_httpd-1.19-orig/mini_httpd.c 2003-12-03 19:27:22.000000000 +0100 -+++ mini_httpd-1.19-3/mini_httpd.c 2005-03-09 08:46:28.000000000 +0100 -@@ -66,8 +66,14 @@ - #endif /* HAVE_SENDFILE */ - - #ifdef USE_SSL -+# ifdef HAVE_OPENSSL - #include - #include -+# else /* HAVE_OPENSSL */ -+# ifdef HAVE_MATRIXSSL -+# include "matrixssl_helper.h" -+# endif /* HAVE_MATRIXSSL */ -+# endif /* HAVE_OPENSSL */ - #endif /* USE_SSL */ - - extern char* crypt( const char* key, const char* setting ); -@@ -193,7 +199,13 @@ - static int do_ssl; - static char* certfile; - static char* cipher; -+#ifdef HAVE_OPENSSL - static SSL_CTX* ssl_ctx; -+#else /* HAVE_OPENSSL */ -+ #ifdef HAVE_MATRIXSSL -+static sslKeys_t* keys; -+ #endif /* HAVE_MATRIXSSL */ -+#endif /* HAVE_OPENSSL */ - #endif /* USE_SSL */ - static char cwd[MAXPATHLEN]; - static int got_hup; -@@ -540,6 +552,7 @@ - #ifdef USE_SSL - if ( do_ssl ) - { -+# ifdef HAVE_OPENSSL - SSL_load_error_strings(); - SSLeay_add_ssl_algorithms(); - ssl_ctx = SSL_CTX_new( SSLv23_server_method() ); -@@ -559,6 +572,17 @@ - exit( 1 ); - } - } -+# else /* HAVE_OPENSSL */ -+# ifdef HAVE_MATRIXSSL -+ matrixSslOpen(); -+ if ( matrixSslReadKeys( &keys, certfile, certfile, NULL, NULL ) < 0 ) -+ { -+ syslog( LOG_CRIT, "can't load certificate and/or private key\n"); -+ (void) fprintf( stderr, "%s: can't load certificate and/or private key\n", argv0 ); -+ exit( 1 ); -+ } -+# endif /* HAVE_MATRIXSSL */ -+# endif /* HAVE_OPENSSL */ - } - #endif /* USE_SSL */ - -@@ -1174,6 +1198,7 @@ - #ifdef USE_SSL - if ( do_ssl ) - { -+# ifdef HAVE_OPENSSL - ssl = SSL_new( ssl_ctx ); - SSL_set_fd( ssl, conn_fd ); - if ( SSL_accept( ssl ) == 0 ) -@@ -1181,6 +1206,16 @@ - ERR_print_errors_fp( stderr ); - exit( 1 ); - } -+# else /* HAVE_OPENSSL */ -+# ifdef HAVE_MATRIXSSL -+ ssl = SSL_new(keys); -+ SSL_set_fd( ssl, conn_fd ); -+ if ( SSL_accept( ssl ) <= 0 ) -+ { -+ perror( "SSL_accept" ); -+ } -+# endif /* HAVE_MATRIXSSL */ -+# endif /* HAVE_OPENSSL */ - } - #endif /* USE_SSL */ - diff --git a/openwrt/package/mini_sendmail/Config.in b/openwrt/package/mini_sendmail/Config.in deleted file mode 100644 index 1b0a4ff329e..00000000000 --- a/openwrt/package/mini_sendmail/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_MINI_SENDMAIL - prompt "mini-sendmail..................... A small sendmail-compatible mail forwarder" - tristate - default m if CONFIG_DEVEL - help - mini_sendmail reads its standard input up to an end-of-file and sends a - copy of the message found there to all of the addresses listed. - The message is sent by connecting to a local SMTP server. This means - mini_sendmail can be used to send email from inside a chroot(2) area. - - http://www.acme.com/software/mini_sendmail/ - diff --git a/openwrt/package/mini_sendmail/Makefile b/openwrt/package/mini_sendmail/Makefile deleted file mode 100644 index 2d7b60fbe72..00000000000 --- a/openwrt/package/mini_sendmail/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mini-sendmail -PKG_VERSION:=1.3.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=fff344184e98cff0ea4d817da9d29383 - -PKG_SOURCE_URL:=http://www.acme.com/software/mini_sendmail/ -PKG_SOURCE:=mini_sendmail-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/mini_sendmail-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MINI_SENDMAIL,mini-sendmail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - OFLAGS="$(TARGET_CFLAGS)" \ - all - touch $@ - -$(IPKG_MINI_SENDMAIL): - install -d -m0755 $(IDIR_MINI_SENDMAIL)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/mini_sendmail $(IDIR_MINI_SENDMAIL)/usr/sbin/ - ln -sf mini_sendmail $(IDIR_MINI_SENDMAIL)/usr/sbin/sendmail - $(RSTRIP) $(IDIR_MINI_SENDMAIL) - $(IPKG_BUILD) $(IDIR_MINI_SENDMAIL) $(PACKAGE_DIR) diff --git a/openwrt/package/mini_sendmail/ipkg/mini-sendmail.control b/openwrt/package/mini_sendmail/ipkg/mini-sendmail.control deleted file mode 100644 index c08e16e1c6a..00000000000 --- a/openwrt/package/mini_sendmail/ipkg/mini-sendmail.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: mini-sendmail -Priority: optional -Section: net -Description: A small sendmail-compatible mail forwarder diff --git a/openwrt/package/mini_sendmail/patches/500-flags.patch b/openwrt/package/mini_sendmail/patches/500-flags.patch deleted file mode 100644 index eb5d65a1a9a..00000000000 --- a/openwrt/package/mini_sendmail/patches/500-flags.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- mini_sendmail-1.3.5/Makefile.orig 2002-01-04 07:05:25.000000000 +0100 -+++ mini_sendmail-1.3.5/Makefile 2005-06-17 01:57:06.000000000 +0200 -@@ -7,9 +7,10 @@ - BINDIR = /usr/local/sbin - MANDIR = /usr/local/man - CC = gcc --CFLAGS = -O -+OFLAGS = -O -+CFLAGS = $(OFLAGS) - #CFLAGS = -g --LDFLAGS = -s -static -+LDFLAGS = - #LDFLAGS = -g -static - LDLIBS = $(SYSV_LIBS) - diff --git a/openwrt/package/miredo/Config.in b/openwrt/package/miredo/Config.in deleted file mode 100644 index eadca0a6e5d..00000000000 --- a/openwrt/package/miredo/Config.in +++ /dev/null @@ -1,44 +0,0 @@ -config BR2_COMPILE_MIREDO - tristate - default n - depends BR2_PACKAGE_MIREDO || BR2_PACKAGE_MIREDO_SERVER - -config BR2_PACKAGE_MIREDO - prompt "miredo............................ Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_MIREDO - select BR2_PACKAGE_KMOD_IPV6 - select BR2_PACKAGE_KMOD_TUN - select BR2_PACKAGE_LIBPTHREAD - select BR2_PACKAGE_UCLIBCXX - help - A Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon. - - http://www.simphalempin.com/dev/miredo/ - - Depends: - - kmod-ipv6 - - kmod-tun - - libpthread - - uClibc++ - -config BR2_PACKAGE_MIREDO_SERVER - prompt "miredo-server..................... Teredo (IPv6 tunneling over UDP through NAT) server daemon" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_MIREDO - select BR2_PACKAGE_KMOD_IPV6 - select BR2_PACKAGE_KMOD_TUN - select BR2_PACKAGE_LIBPTHREAD - select BR2_PACKAGE_UCLIBCXX - help - A Teredo (IPv6 tunneling over UDP through NAT) server daemon. - - http://www.simphalempin.com/dev/miredo/ - - Depends: - - kmod-ipv6 - - kmod-tun - - libpthread - - uClibc++ diff --git a/openwrt/package/miredo/Makefile b/openwrt/package/miredo/Makefile deleted file mode 100644 index 4b9837663e5..00000000000 --- a/openwrt/package/miredo/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=miredo -PKG_VERSION:=0.5.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=bbbbf60db1346af0bbba6602067ed7ab - -PKG_SOURCE_URL:=http://people.via.ecp.fr/~rem/miredo/v0.5/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MIREDO,miredo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,MIREDO_SERVER,miredo-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - ( cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm" \ - ac_cv_file__proc_self_maps=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --disable-shared \ - --enable-static \ - --with-gnu-ld \ - --disable-rpath \ - --disable-chroot \ - --enable-teredo-client \ - --enable-teredo-relay \ - --enable-teredo-server \ - --enable-miredo-user=root \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CXXLINK="\$$(LINK)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_MIREDO): - install -d -m0755 $(IDIR_MIREDO)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/miredo.conf-dist $(IDIR_MIREDO)/etc/miredo.conf - install -d -m0755 $(IDIR_MIREDO)/etc/init.d - install -m0755 ./files/miredo.init $(IDIR_MIREDO)/etc/init.d/miredo - install -d -m0755 $(IDIR_MIREDO)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(IDIR_MIREDO)/usr/sbin/ - $(RSTRIP) $(IDIR_MIREDO) - $(IPKG_BUILD) $(IDIR_MIREDO) $(PACKAGE_DIR) - -$(IPKG_MIREDO_SERVER): - install -d -m0755 $(IDIR_MIREDO_SERVER)/etc/ - $(CP) $(PKG_INSTALL_DIR)/etc/miredo-server.conf-dist $(IDIR_MIREDO_SERVER)/etc/miredo-server.conf - install -d -m0755 $(IDIR_MIREDO_SERVER)/etc/init.d - install -m0755 ./files/miredo-server.init $(IDIR_MIREDO_SERVER)/etc/init.d/miredo-server - install -d -m0755 $(IDIR_MIREDO_SERVER)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(IDIR_MIREDO_SERVER)/usr/sbin/ - $(RSTRIP) $(IDIR_MIREDO_SERVER) - $(IPKG_BUILD) $(IDIR_MIREDO_SERVER) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/miredo/files/miredo-server.init b/openwrt/package/miredo/files/miredo-server.init deleted file mode 100644 index b41a86668e3..00000000000 --- a/openwrt/package/miredo/files/miredo-server.init +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -BIN=miredo-server -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - insmod ipv6 - insmod tun - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "usage: $0 (start|stop|restart)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/miredo/files/miredo.init b/openwrt/package/miredo/files/miredo.init deleted file mode 100644 index e305472acad..00000000000 --- a/openwrt/package/miredo/files/miredo.init +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -BIN=miredo -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - insmod ipv6 - insmod tun - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "usage: $0 (start|stop|restart)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/miredo/ipkg/miredo-server.conffiles b/openwrt/package/miredo/ipkg/miredo-server.conffiles deleted file mode 100644 index ca3424bdcfd..00000000000 --- a/openwrt/package/miredo/ipkg/miredo-server.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/miredo-server.conf diff --git a/openwrt/package/miredo/ipkg/miredo-server.control b/openwrt/package/miredo/ipkg/miredo-server.control deleted file mode 100644 index ebbc3cc5840..00000000000 --- a/openwrt/package/miredo/ipkg/miredo-server.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: miredo-server -Priority: optional -Section: net -Depends: kmod-ipv6, kmod-tun, libpthread, uclibc++ -Description: A Teredo (IPv6 tunneling over UDP through NAT) server daemon diff --git a/openwrt/package/miredo/ipkg/miredo.conffiles b/openwrt/package/miredo/ipkg/miredo.conffiles deleted file mode 100644 index f7428b788f4..00000000000 --- a/openwrt/package/miredo/ipkg/miredo.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/miredo.conf diff --git a/openwrt/package/miredo/ipkg/miredo.control b/openwrt/package/miredo/ipkg/miredo.control deleted file mode 100644 index 2794f3bdea9..00000000000 --- a/openwrt/package/miredo/ipkg/miredo.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: miredo -Priority: optional -Section: net -Depends: kmod-ipv6, kmod-tun, libpthread, uclibc++ -Description: A Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon diff --git a/openwrt/package/monit/Config.in b/openwrt/package/monit/Config.in deleted file mode 100644 index d8221ef59c1..00000000000 --- a/openwrt/package/monit/Config.in +++ /dev/null @@ -1,35 +0,0 @@ -#menu "monit............................. System services monitoring utility" - -config BR2_COMPILE_MONIT - tristate - default n - depends BR2_PACKAGE_MONIT || BR2_PACKAGE_MONIT_NOSSL - -config BR2_PACKAGE_MONIT - prompt "monit............................. System services monitoring utility, with SSL support" - tristate - select BR2_COMPILE_MONIT - select BR2_PACKAGE_LIBPTHREAD - select BR2_PACKAGE_LIBOPENSSL - default m if CONFIG_DEVEL - help - An utility for monitoring services on a Unix system - - This package is built with SSL support. - - http://www.tildeslash.com/monit/ - -config BR2_PACKAGE_MONIT_NOSSL - prompt "monit-nossl....................... System services monitoring utility, without SSL support" - tristate - select BR2_COMPILE_MONIT - select BR2_PACKAGE_LIBPTHREAD - default m if CONFIG_DEVEL - help - An utility for monitoring services on a Unix system. - - This package is built without SSL support. - - http://www.tildeslash.com/monit/ - -#endmenu diff --git a/openwrt/package/monit/Makefile b/openwrt/package/monit/Makefile deleted file mode 100644 index ce4b7389070..00000000000 --- a/openwrt/package/monit/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=monit -PKG_VERSION:=4.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=4e53aa44e4ca264e61c7c401cee4e697 - -PKG_SOURCE_URL:=http://www.tildeslash.com/monit/dist/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MONIT,monit,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,MONIT_NOSSL,monit-nossl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: -ifneq ($(BR2_PACKAGE_MONIT),) - ( cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/sbin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-ssl \ - --with-ssl-dir="$(STAGING_DIR)/usr" \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) - ( cd $(PKG_BUILD_DIR); mv monit monit-ssl; ) -endif -ifneq ($(BR2_PACKAGE_MONIT),) - ( cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/sbin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --without-ssl \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) - ( cd $(PKG_BUILD_DIR); mv monit monit-nossl; ) - $(MAKE) -C $(PKG_BUILD_DIR) clean -endif - touch $@ - -$(IPKG_MONIT): - install -d -m0755 $(IDIR_MONIT)/etc - install -m0600 $(PKG_BUILD_DIR)/monitrc $(IDIR_MONIT)/etc/ - install -d -m0755 $(IDIR_MONIT)/etc/init.d - install -m0755 ./files/monit.init $(IDIR_MONIT)/etc/init.d/monit - install -d -m0755 $(IDIR_MONIT)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/monit-ssl $(IDIR_MONIT)/usr/sbin/monit - $(RSTRIP) $(IDIR_MONIT) - $(IPKG_BUILD) $(IDIR_MONIT) $(PACKAGE_DIR) - -$(IPKG_MONIT_NOSSL): - install -d -m0755 $(IDIR_MONIT_NOSSL)/etc - install -m0600 $(PKG_BUILD_DIR)/monitrc $(IDIR_MONIT_NOSSL)/etc/ - install -d -m0755 $(IDIR_MONIT_NOSSL)/etc/init.d - install -m0755 ./files/monit.init $(IDIR_MONIT_NOSSL)/etc/init.d/monit - install -d -m0755 $(IDIR_MONIT_NOSSL)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/monit-nossl $(IDIR_MONIT_NOSSL)/usr/sbin/monit - $(RSTRIP) $(IDIR_MONIT_NOSSL) - $(IPKG_BUILD) $(IDIR_MONIT_NOSSL) $(PACKAGE_DIR) diff --git a/openwrt/package/monit/files/monit.init b/openwrt/package/monit/files/monit.init deleted file mode 100644 index 50b18de1495..00000000000 --- a/openwrt/package/monit/files/monit.init +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -BIN=monit -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "usage: $0 (start|stop|restart)" - exit 1 -esac -exit $? diff --git a/openwrt/package/monit/ipkg/monit-nossl.conffiles b/openwrt/package/monit/ipkg/monit-nossl.conffiles deleted file mode 100644 index 365679c6e78..00000000000 --- a/openwrt/package/monit/ipkg/monit-nossl.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/monitrc diff --git a/openwrt/package/monit/ipkg/monit-nossl.control b/openwrt/package/monit/ipkg/monit-nossl.control deleted file mode 100644 index d10b711daa1..00000000000 --- a/openwrt/package/monit/ipkg/monit-nossl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: monit-nossl -Priority: optional -Section: admin -Description: An utility for system services monitoring, without SSL support. -Depends: libpthread diff --git a/openwrt/package/monit/ipkg/monit.conffiles b/openwrt/package/monit/ipkg/monit.conffiles deleted file mode 100644 index 365679c6e78..00000000000 --- a/openwrt/package/monit/ipkg/monit.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/monitrc diff --git a/openwrt/package/monit/ipkg/monit.control b/openwrt/package/monit/ipkg/monit.control deleted file mode 100644 index 6c947d08fbc..00000000000 --- a/openwrt/package/monit/ipkg/monit.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: monit -Priority: optional -Section: admin -Description: An utility for system services monitoring, with SSL support. -Depends: libpthread, libopenssl diff --git a/openwrt/package/motion/Config.in b/openwrt/package/motion/Config.in deleted file mode 100644 index 7d5203691e1..00000000000 --- a/openwrt/package/motion/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_MOTION - prompt "motion............................ webcam motion sensing and logging" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBJPEG - help - Motion is a software motion detector - - http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome diff --git a/openwrt/package/motion/Makefile b/openwrt/package/motion/Makefile deleted file mode 100644 index dafe4877d4b..00000000000 --- a/openwrt/package/motion/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=motion -PKG_VERSION:=3.2.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=71e6bd13fcca70372e9b7c7806d62b30 - -PKG_SOURCE_URL:=@SF/motion -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MOTION,motion,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --without-ffmpeg \ - --without-jpeg-mmx \ - --without-mysql \ - --without-pgsql \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_MOTION): - install -d -m0755 $(IDIR_MOTION)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/motion $(IDIR_MOTION)/usr/bin/ - $(RSTRIP) $(IDIR_MOTION) - $(IPKG_BUILD) $(IDIR_MOTION) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/motion/ipkg/motion.control b/openwrt/package/motion/ipkg/motion.control deleted file mode 100644 index 44a0c2b9147..00000000000 --- a/openwrt/package/motion/ipkg/motion.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: motion -Priority: optional -Section: multimedia -Depends: libjpeg, libpthread -Description: Webcam motion sensing and logging diff --git a/openwrt/package/motion/patches/01-ffmpeg.patch b/openwrt/package/motion/patches/01-ffmpeg.patch deleted file mode 100644 index 1f4c73eafae..00000000000 --- a/openwrt/package/motion/patches/01-ffmpeg.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -ur motion-3.2.5.1-old/motion.c motion-3.2.5.1/motion.c ---- motion-3.2.5.1-old/motion.c 2006-03-17 10:05:13.490000000 -0800 -+++ motion-3.2.5.1/motion.c 2006-03-17 10:03:38.020000000 -0800 -@@ -1246,10 +1246,10 @@ - * Note: Negative value means SIGALRM snaps are enabled - * httpd-control snaps are always enabled. - */ -- -+#ifdef HAVE_FFMPEG - /* time_current_frame is used both for snapshot and timelapse features */ - time_current_frame = cnt->currenttime; -- -+ - if ( (cnt->conf.snapshot_interval > 0 && cnt->shots == 0 && - time_current_frame % cnt->conf.snapshot_interval <= time_last_frame % cnt->conf.snapshot_interval) || - cnt->snapshot) { -@@ -1257,7 +1257,7 @@ - cnt->snapshot = 0; - } - -- -+#endif /* HAVE_FFMPEG */ - /***** MOTION LOOP - TIMELAPSE FEATURE SECTION *****/ - - #ifdef HAVE_FFMPEG -@@ -1331,10 +1331,9 @@ - event(cnt, EVENT_TIMELAPSEEND, NULL, NULL, NULL, cnt->currenttime_tm); - - --#endif /* HAVE_FFMPEG */ - - time_last_frame = time_current_frame; -- -+#endif /* HAVE_FFMPEG */ - - /***** MOTION LOOP - VIDEO LOOPBACK SECTION *****/ - -Only in motion-3.2.5.1-old/: motion.c.orig diff --git a/openwrt/package/motion/patches/02-honor_cppflags.patch b/openwrt/package/motion/patches/02-honor_cppflags.patch deleted file mode 100644 index 322fb772d35..00000000000 --- a/openwrt/package/motion/patches/02-honor_cppflags.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ruN motion-3.2.5.1-old/Makefile.in motion-3.2.5.1-new/Makefile.in ---- motion-3.2.5.1-old/Makefile.in 2006-03-07 22:52:49.000000000 +0100 -+++ motion-3.2.5.1-new/Makefile.in 2006-03-27 22:04:34.000000000 +0200 -@@ -32,6 +32,7 @@ - ################################################################################ - CFLAGS = @CFLAGS@ -Wall -DVERSION=\"$(VERSION)\" -D_REENTRANT \ - -Dsysconfdir=\"$(sysconfdir)\" -+CPPFLAGS = @CPPFLAGS@ - LDFLAGS = @LDFLAGS@ - LIBS = @LIBS@ - VIDEO_OBJ = @VIDEO@ -@@ -115,7 +116,7 @@ - ################################################################################ - $(DEPEND_FILE): *.h $(SRC) - @echo "Generating dependencies, please wait..." -- @$(CC) $(CFLAGS) -M $(SRC) > .tmp -+ @$(CC) $(CFLAGS) $(CPPFLAGS) -M $(SRC) > .tmp - @mv -f .tmp $(DEPEND_FILE) - @echo - diff --git a/openwrt/package/mpd/Config.in b/openwrt/package/mpd/Config.in deleted file mode 100644 index 873b31085b7..00000000000 --- a/openwrt/package/mpd/Config.in +++ /dev/null @@ -1,42 +0,0 @@ -menu "mpd............................... Music Player Daemon" - -config BR2_PACKAGE_MPD - prompt "mpd............................... Music Player Daemon" - tristate - default m if CONFIG_DEVEL - help - MPD is a music player supporting flac, mp3 and ogg files. - It is typically controlled over a network using one of it's many - clients including mpc(console), gmpc(gnome), phpmp(php) etc. - - http://www.musicpd.org/ - -config BR2_COMPILE_MPD_WITH_MP3 - prompt "MP3 support" - bool - default y - depends BR2_PACKAGE_MPD - select BR2_PACKAGE_LIBMAD - select BR2_PACKAGE_LIBID3TAG - help - Enable mp3 support (libmad). - -config BR2_COMPILE_MPD_WITH_OGG - prompt "Ogg Support" - bool - default y - depends BR2_PACKAGE_MPD - select BR2_PACKAGE_LIBVORBISIDEC - help - Enable ogg support (tremor). - -config BR2_COMPILE_MPD_WITH_FLAC - prompt "FLAC Support" - bool - default y - depends BR2_PACKAGE_MPD - select BR2_PACKAGE_LIBFLAC - help - Enable flac support (libflac). - -endmenu diff --git a/openwrt/package/mpd/Makefile b/openwrt/package/mpd/Makefile deleted file mode 100644 index 1e97df4963f..00000000000 --- a/openwrt/package/mpd/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mpd -PKG_VERSION:=0.12.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=65e62cc813f2186dff0f96f164a853f8 - -PKG_SOURCE_URL:=http://users.tpg.com.au/davico/openwrt/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -PKG_CONFIGURE_OPTIONS := \ - --disable-alsa \ - --disable-shout \ - --disable-mod \ - --disable-audiofile \ - --disable-iconv \ - --disable-mpc \ - --disable-aac \ - -ifneq ($(BR2_COMPILE_MPD_WITH_MP3),) -PKG_DEPENDS += libid3tag libmad -PKG_CONFIGURE_OPTIONS += \ - --with-id3tag-includes=$(STAGING_DIR)/usr/include \ - --with-id3tag-libraries=$(STAGING_DIR)/usr/lib \ - --with-mad-includes=$(STAGING_DIR)/usr/include \ - --with-mad-libraries=$(STAGING_DIR)/usr/lib -else -PKG_CONFIGURE_OPTIONS += --disable-id3 --disable-mp3 -endif - -ifneq ($(BR2_COMPILE_MPD_WITH_OGG),) -PKG_DEPENDS += libvorbisidec -PKG_CONFIGURE_OPTIONS += \ - --with-tremor \ - --with-tremor-includes=$(STAGING_DIR)/usr/include \ - --with-tremor-libraries=$(STAGING_DIR)/usr/lib -else -PKG_CONFIGURE_OPTIONS += --disable-ogg -endif - -ifneq ($(BR2_COMPILE_MPD_WITH_FLAC),) -PKG_DEPENDS += libflac -PKG_CONFIGURE_OPTIONS += \ - --with-libFLAC-includes=$(STAGING_DIR)/usr/include \ - --with-libFLAC-libraries=$(STAGING_DIR)/usr/lib -else -PKG_CONFIGURE_OPTIONS += --disable-flac -endif - -COMMA:= , -EMPTY:= -SPACE:= $(EMPTY) $(EMPTY) -PKG_DEPENDS:=$(subst $(SPACE),$(COMMA)$(SPACE),$(sort $(PKG_DEPENDS))) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MPD,mpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(PKG_CONFIGURE_OPTIONS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_MPD): - install -d -m0755 $(IDIR_MPD)/usr/bin - install -d -m0755 $(IDIR_MPD)/etc - $(CP) $(PKG_INSTALL_DIR)/usr/bin/mpd $(IDIR_MPD)/usr/bin - $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(IDIR_MPD)/etc/mpd.conf - echo "Depends: $(PKG_DEPENDS)" >> $(IDIR_MPD)/CONTROL/control - $(RSTRIP) $(IDIR_MPD) - $(IPKG_BUILD) $(IDIR_MPD) $(PACKAGE_DIR) - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/mpd/ipkg/mpd.conffiles b/openwrt/package/mpd/ipkg/mpd.conffiles deleted file mode 100644 index a8d69760e19..00000000000 --- a/openwrt/package/mpd/ipkg/mpd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/mpd.conf diff --git a/openwrt/package/mpd/ipkg/mpd.control b/openwrt/package/mpd/ipkg/mpd.control deleted file mode 100644 index 3c1c4923469..00000000000 --- a/openwrt/package/mpd/ipkg/mpd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: mpd -Priority: optional -Section: net -Description: A music player for flac, mp3 and ogg. diff --git a/openwrt/package/mrd6/Config.in b/openwrt/package/mrd6/Config.in deleted file mode 100644 index cacebe2ac40..00000000000 --- a/openwrt/package/mrd6/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_MRD6 - prompt "mrd6.............................. IPv6 multicast routing daemon" - tristate - default m if CONFIG_DEVEL - help - Multicast is becoming a major component in next generation - networks, used in several scenarios, from video broadcasting - to multimedia conferencing. In order to be implemented, new - technology needs supporting hardware and software across a set - of devices and systems. MRD6 is an implementation of a modular - IPv6 Multicast Routing Framework for the Linux operating system - and provides MLDv2 (as well as MLDv1), PIM-SM and MBGP support. - - http://artemis.av.it.pt/mrd6/ diff --git a/openwrt/package/mrd6/Makefile b/openwrt/package/mrd6/Makefile deleted file mode 100644 index ea92943b3cf..00000000000 --- a/openwrt/package/mrd6/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mrd6 -PKG_VERSION:=0.9.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=24a08cf1407000d628a272b08a415dda - -PKG_SOURCE_URL:=http://hng.av.it.pt/mrd6/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MRD6,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - OPTIMIZE=yes \ - SPACE_OPTIMIZE=yes \ - FULL_STATIC=yes \ - CFLAGS="$(TARGET_CFLAGS) -DNO_INET6_OPTION" \ - CXX=$(TARGET_CROSS)g++ \ - CC=$(TARGET_CC) \ - STAGING_DIR=$(STAGING_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - PREFIX=/usr/ \ - install - install -d -m0755 $(PKG_INSTALL_DIR)/etc/init.d - install -m0644 files/$(PKG_NAME).conf $(PKG_INSTALL_DIR)/etc - install -m0755 files/$(PKG_NAME).init $(PKG_INSTALL_DIR)/etc/init.d/S60$(PKG_NAME) - touch $@ - -$(IPKG_MRD6): - mkdir -p $(IDIR_MRD6)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/ $(IDIR_MRD6)/ - $(RSTRIP) $(IDIR_MRD6)/ - $(IPKG_BUILD) $(IDIR_MRD6) $(PACKAGE_DIR) diff --git a/openwrt/package/mrd6/files/mrd6.conf b/openwrt/package/mrd6/files/mrd6.conf deleted file mode 100644 index 84ce923a34e..00000000000 --- a/openwrt/package/mrd6/files/mrd6.conf +++ /dev/null @@ -1,14 +0,0 @@ -log { - attach stderr normal; - attach default "/var/log/mrd6.log" message_err; -} - -interfaces br0 enable = false; // Should be vlan0 + eth1 but Linux bridge seems broken for multicast -interfaces eth0 enable = false; // Interface to internal bridge -handle-proper-bridge = true; // use ETH_P_ALL to see all packets on wrt54g - -// The default configured RP is m6bone's Renater RP. -// Change this according to your setup - -groups ff00::/8 pim rp = 2001:660:3007:300:1::; - diff --git a/openwrt/package/mrd6/files/mrd6.init b/openwrt/package/mrd6/files/mrd6.init deleted file mode 100755 index 886723f15e9..00000000000 --- a/openwrt/package/mrd6/files/mrd6.init +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -case $1 in -start) - /sbin/lsmod | grep ipv6 > /dev/null - if [ "$?" != "0" ] - then - echo -n "IPv6 stack required by mrd6. Loading ipv6 module: " - /sbin/insmod ipv6 - echo "Done." - fi - echo -n "Starting IPv6 multicast router (mrd6): " - /usr/sbin/mrd6 -f /etc/mrd6.conf -D - echo "Done." - ;; -stop) - echo -n "Stopping IPv6 multicast router (mrd6): " - killall mrd6 - echo "Done." - ;; -restart) - $0 stop - $0 start - ;; -*) - echo "Usage: $0 {start | stop | restart}" - ;; -esac -exit 0 diff --git a/openwrt/package/mrd6/ipkg/mrd6.control b/openwrt/package/mrd6/ipkg/mrd6.control deleted file mode 100644 index 3a50f171317..00000000000 --- a/openwrt/package/mrd6/ipkg/mrd6.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: mrd6 -Architecture: mipsel -Section: net -Priority: optional -Depends: kmod-ipv6, libnotimpl -Description: IPv6 multicast routing daemon diff --git a/openwrt/package/mrd6/patches/01-ceilf_replacement.patch b/openwrt/package/mrd6/patches/01-ceilf_replacement.patch deleted file mode 100644 index 1b4ac6213c7..00000000000 --- a/openwrt/package/mrd6/patches/01-ceilf_replacement.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -urN mrd6-0.9.5/src/Makefile mrd6-0.9.5.new/src/Makefile ---- mrd6-0.9.5/src/Makefile 2005-12-18 19:15:04.000000000 +0100 -+++ mrd6-0.9.5.new/src/Makefile 2006-02-11 18:30:44.000000000 +0100 -@@ -43,7 +43,7 @@ - CFLAGS += -DNO_INET6_OPTION - endif - --DEST_PREFIX = $(DESTDIR)$(PREFIX) -+DEST_PREFIX = $(DESTDIR)/$(PREFIX) - - ifeq ($(OPTIMIZE),yes) - ifeq ($(SPACE_OPTIMIZE),yes) -@@ -97,7 +97,7 @@ - endif - endif - --LDFLAGS += -lm -+LDFLAGS += -lm -lnotimpl -L$(STAGING_DIR)/usr/lib - ifeq ($(PLATFORM),OS_LINUX) - LDFLAGS += -ldl - endif diff --git a/openwrt/package/mt-daapd/Config.in b/openwrt/package/mt-daapd/Config.in deleted file mode 100644 index 3eae933fc9e..00000000000 --- a/openwrt/package/mt-daapd/Config.in +++ /dev/null @@ -1,31 +0,0 @@ -config BR2_PACKAGE_MT_DAAPD - prompt "mt-daapd.......................... A multi-threaded DAAP (Digital Audio Access Protocol) daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBGDBM - select BR2_PACKAGE_LIBHOWL - select BR2_PACKAGE_LIBID3TAG - help - mt-daapd is a program which acts as an iTunes (DAAP) server for Linux and - other POSIX unixes. It may eventually support Win32 as well. - - Some random features that it supports: - - * Supports the Roku SoundBridge (query/browse/index support) - * Supports periodic rescans of the database - * Can advertise shoutcast streams - * Supports password-protected shares - * Is web-configurable and managable - * Support dynamic playlists, like iTunes "Smart playlists" - * Probably other things I've forgotten - - All is not perfect, however. Currently, there are several drawbacks to it: - - * database is indexed by inode, so all music must be on one filesystem - * browse by artist is slow on Roku, times out (with large databases ~10K songs) - * Probably other things I've forgotten - - http://www.mt-daapd.org/ - - Depends: libgdbm, libhowl, libid3tag, libpthread - diff --git a/openwrt/package/mt-daapd/Makefile b/openwrt/package/mt-daapd/Makefile deleted file mode 100644 index 055a9699557..00000000000 --- a/openwrt/package/mt-daapd/Makefile +++ /dev/null @@ -1,81 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mt-daapd -PKG_VERSION:=0.2.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=2e1cdbe6b94ef153e915806f80a28dca - -PKG_SOURCE_URL:=@SF/mt-daapd -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MT_DAAPD,mt-daapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_func_setpgrp_void=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --enable-mdns \ - --enable-howl \ - --with-id3tag="$(STAGING_DIR)/usr" \ - --with-gdbm-includes="$(STAGING_DIR)/usr/include" \ - --with-gdbm-libs="$(STAGING_DIR)/usr/lib" \ - --with-howl-includes="$(STAGING_DIR)/usr/include/howl" \ - --with-howl-libs="$(STAGING_DIR)/usr/lib" \ - --without-static-libs \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_MT_DAAPD): - install -m0755 -d $(IDIR_MT_DAAPD)/etc - install -m0644 $(PKG_BUILD_DIR)/contrib/mt-daapd.conf $(IDIR_MT_DAAPD)/etc/ - install -m0644 $(PKG_BUILD_DIR)/contrib/mt-daapd.playlist $(IDIR_MT_DAAPD)/etc/ - install -m0755 -d $(IDIR_MT_DAAPD)/etc/init.d - install -m0755 ./files/mt-daapd.init $(IDIR_MT_DAAPD)/etc/init.d/mt-daapd - install -m0755 -d $(IDIR_MT_DAAPD)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/share/mt-daapd $(IDIR_MT_DAAPD)/usr/share/ - install -m0755 -d $(IDIR_MT_DAAPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mt-daapd $(IDIR_MT_DAAPD)/usr/sbin/ - $(RSTRIP) $(IDIR_MT_DAAPD) - $(IPKG_BUILD) $(IDIR_MT_DAAPD) $(PACKAGE_DIR) - diff --git a/openwrt/package/mt-daapd/files/mt-daapd.init b/openwrt/package/mt-daapd/files/mt-daapd.init deleted file mode 100644 index 2968769c782..00000000000 --- a/openwrt/package/mt-daapd/files/mt-daapd.init +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -BIN=mt-daapd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill -INT $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/mt-daapd/ipkg/mt-daapd.conffiles b/openwrt/package/mt-daapd/ipkg/mt-daapd.conffiles deleted file mode 100644 index 2e5ee2b4d40..00000000000 --- a/openwrt/package/mt-daapd/ipkg/mt-daapd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/mt-daapd.conf -/etc/mt-daapd.playlist diff --git a/openwrt/package/mt-daapd/ipkg/mt-daapd.control b/openwrt/package/mt-daapd/ipkg/mt-daapd.control deleted file mode 100644 index 0c7e6889c92..00000000000 --- a/openwrt/package/mt-daapd/ipkg/mt-daapd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mt-daapd -Priority: optional -Section: net -Depends: libgdbm, libhowl, libid3tag, libpthread -Description: a multi-threaded DAAP (Digital Audio Access Protocol) daemon diff --git a/openwrt/package/mtr/Config.in b/openwrt/package/mtr/Config.in deleted file mode 100644 index 8f0e461676b..00000000000 --- a/openwrt/package/mtr/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -config BR2_PACKAGE_MTR - prompt "mtr............................... Full screen ncurses traceroute tool" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - mtr combines the functionality of the 'traceroute' and 'ping' programs - in a single network diagnostic tool. - . - As mtr starts, it investigates the network connection between the host - mtr runs on and a user-specified destination host. After it - determines the address of each network hop between the machines, - it sends a sequence ICMP ECHO requests to each one to determine the - quality of the link to each machine. As it does this, it prints - running statistics about each machine. - . - http://www.bitwizard.nl/mtr/ - diff --git a/openwrt/package/mtr/Makefile b/openwrt/package/mtr/Makefile deleted file mode 100644 index f0885624bb7..00000000000 --- a/openwrt/package/mtr/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mtr -PKG_VERSION:=0.69 -PKG_RELEASE:=1 -PKG_MD5SUM:=58904d6d8d70114195cdeb653d56914c - -PKG_SOURCE_URL:=ftp://ftp.bitwizard.nl/mtr/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MTR,mtr,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - touch configure.in; \ - touch aclocal.m4; \ - touch Makefile.in; \ - touch img/Makefile.in; \ - touch stamp-h.in; \ - touch config.h.in; \ - touch configure; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_lib_resolv_res_mkquery=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --without-gtk \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - all install - touch $@ - -$(IPKG_MTR): - install -d -m0755 $(IDIR_MTR)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(IDIR_MTR)/usr/sbin/ - $(RSTRIP) $(IDIR_MTR) - $(IPKG_BUILD) $(IDIR_MTR) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/mtr/ipkg/mtr.control b/openwrt/package/mtr/ipkg/mtr.control deleted file mode 100644 index c5dad152caa..00000000000 --- a/openwrt/package/mtr/ipkg/mtr.control +++ /dev/null @@ -1,15 +0,0 @@ -Package: mtr -Priority: optional -Section: net -Depends: libncurses -Description: Full screen ncurses traceroute/ping tool - mtr combines the functionality of the 'traceroute' and 'ping' programs - in a single network diagnostic tool. - . - As mtr starts, it investigates the network connection between the host - mtr runs on and a user-specified destination host. After it - determines the address of each network hop between the machines, - it sends a sequence ICMP ECHO requests to each one to determine the - quality of the link to each machine. As it does this, it prints - running statistics about each machine. - diff --git a/openwrt/package/mtr/patches/501-dns.patch b/openwrt/package/mtr/patches/501-dns.patch deleted file mode 100644 index f1c915580d1..00000000000 --- a/openwrt/package/mtr/patches/501-dns.patch +++ /dev/null @@ -1,511 +0,0 @@ -diff -Naur mtr-0.69.old/dns.c mtr-0.69.new/dns.c ---- mtr-0.69.old/dns.c 2005-01-11 09:32:42.000000000 +0100 -+++ mtr-0.69.new/dns.c 2005-10-03 21:31:27.000000000 +0200 -@@ -853,6 +853,507 @@ - fputs("\r",stderr); - } - -+#ifdef __UCLIBC__ -+ -+static const char digits[] = "0123456789"; -+#define __set_errno(e) (errno = (e)) -+ -+#define NS_PUT16(s, cp) do { \ -+ register u_int16_t t_s = (u_int16_t)(s); \ -+ register u_char *t_cp = (u_char *)(cp); \ -+ *t_cp++ = t_s >> 8; \ -+ *t_cp = t_s; \ -+ (cp) += NS_INT16SZ; \ -+} while (0) -+ -+ -+ -+#define NS_PUT32(l, cp) do { \ -+ register u_int32_t t_l = (u_int32_t)(l); \ -+ register u_char *t_cp = (u_char *)(cp); \ -+ *t_cp++ = t_l >> 24; \ -+ *t_cp++ = t_l >> 16; \ -+ *t_cp++ = t_l >> 8; \ -+ *t_cp = t_l; \ -+ (cp) += NS_INT32SZ; \ -+} while (0) -+ -+ -+void -+ns_put16(u_int src, u_char *dst) { -+ NS_PUT16(src, dst); -+} -+ -+void -+ns_put32(u_long src, u_char *dst) { -+ NS_PUT32(src, dst); -+} -+ -+void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); } -+void __putlong(u_int32_t src, u_char *dst) { ns_put32(src, dst); } -+ -+int -+mklower(int ch) { -+ if (ch >= 0x41 && ch <= 0x5A) -+ return (ch + 0x20); -+ return (ch); -+} -+ -+ -+static int -+dn_find(const u_char *domain, const u_char *msg, -+ const u_char * const *dnptrs, -+ const u_char * const *lastdnptr) -+{ -+ const u_char *dn, *cp, *sp; -+ const u_char * const *cpp; -+ u_int n; -+ -+ for (cpp = dnptrs; cpp < lastdnptr; cpp++) { -+ sp = *cpp; -+ /* -+ * terminate search on: -+ * root label -+ * compression pointer -+ * unusable offset -+ */ -+ while (*sp != 0 && (*sp & NS_CMPRSFLGS) == 0 && -+ (sp - msg) < 0x4000) { -+ dn = domain; -+ cp = sp; -+ while ((n = *cp++) != 0) { -+ /* -+ * check for indirection -+ */ -+ switch (n & NS_CMPRSFLGS) { -+ case 0: /* normal case, n == len */ -+ if (n != *dn++) -+ goto next; -+ for ((void)NULL; n > 0; n--) -+ if (mklower(*dn++) != -+ mklower(*cp++)) -+ goto next; -+ /* Is next root for both ? */ -+ if (*dn == '\0' && *cp == '\0') -+ return (sp - msg); -+ if (*dn) -+ continue; -+ goto next; -+ -+ case NS_CMPRSFLGS: /* indirection */ -+ cp = msg + (((n & 0x3f) << 8) | *cp); -+ break; -+ -+ default: /* illegal type */ -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ } -+ next: -+ sp += *sp + 1; -+ } -+ } -+ __set_errno (ENOENT); -+ return (-1); -+} -+ -+ -+int -+ns_name_pack(const u_char *src, u_char *dst, int dstsiz, -+ const u_char **dnptrs, const u_char **lastdnptr) -+{ -+ u_char *dstp; -+ const u_char **cpp, **lpp, *eob, *msg; -+ const u_char *srcp; -+ int n, l, first = 1; -+ -+ srcp = src; -+ dstp = dst; -+ eob = dstp + dstsiz; -+ lpp = cpp = NULL; -+ if (dnptrs != NULL) { -+ if ((msg = *dnptrs++) != NULL) { -+ for (cpp = dnptrs; *cpp != NULL; cpp++) -+ (void)NULL; -+ lpp = cpp; /* end of list to search */ -+ } -+ } else -+ msg = NULL; -+ -+ /* make sure the domain we are about to add is legal */ -+ l = 0; -+ do { -+ n = *srcp; -+ if ((n & NS_CMPRSFLGS) != 0 && n != 0x41) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ if (n == 0x41) -+ n = *++srcp / 8; -+ l += n + 1; -+ if (l > MAXCDNAME) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ srcp += n + 1; -+ } while (n != 0); -+ -+ /* from here on we need to reset compression pointer array on error */ -+ srcp = src; -+ do { -+ /* Look to see if we can use pointers. */ -+ n = *srcp; -+ if (n != 0 && n != 0x41 && msg != NULL) { -+ l = dn_find(srcp, msg, (const u_char * const *)dnptrs, -+ (const u_char * const *)lpp); -+ if (l >= 0) { -+ if (dstp + 1 >= eob) { -+ goto cleanup; -+ } -+ *dstp++ = (l >> 8) | NS_CMPRSFLGS; -+ *dstp++ = l % 256; -+ return (dstp - dst); -+ } -+ /* Not found, save it. */ -+ if (lastdnptr != NULL && cpp < lastdnptr - 1 && -+ (dstp - msg) < 0x4000 && first) { -+ *cpp++ = dstp; -+ *cpp = NULL; -+ first = 0; -+ } -+ } -+ /* copy label to buffer */ -+ if ((n & NS_CMPRSFLGS) != 0 && n != 0x41) { /* Should not happen. */ -+ goto cleanup; -+ } -+ if (n == 0x41) { -+ n = *++srcp / 8; -+ if (dstp + 1 >= eob) -+ goto cleanup; -+ *dstp++ = 0x41; -+ } -+ if (dstp + 1 + n >= eob) { -+ goto cleanup; -+ } -+ memcpy(dstp, srcp, n + 1); -+ srcp += n + 1; -+ dstp += n + 1; -+ } while (n != 0); -+ -+ if (dstp > eob) { -+cleanup: -+ if (msg != NULL) -+ *lpp = NULL; -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ return (dstp - dst); -+} -+ -+ -+int -+ns_name_pton(const char *src, u_char *dst, size_t dstsiz) { -+ u_char *label, *bp, *eom; -+ int c, n, escaped; -+ char *cp; -+ -+ escaped = 0; -+ bp = dst; -+ eom = dst + dstsiz; -+ label = bp++; -+ -+ while ((c = *src++) != 0) { -+ if (escaped) { -+ if ((cp = strchr(digits, c)) != NULL) { -+ n = (cp - digits) * 100; -+ if ((c = *src++) == 0 || -+ (cp = strchr(digits, c)) == NULL) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ n += (cp - digits) * 10; -+ if ((c = *src++) == 0 || -+ (cp = strchr(digits, c)) == NULL) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ n += (cp - digits); -+ if (n > 255) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ c = n; -+ } else if (c == '[' && label == bp - 1 && *src == 'x') { -+ /* Theoretically we would have to handle \[o -+ as well but we do not since we do not need -+ it internally. */ -+ *label = 0x41; -+ label = bp++; -+ ++src; -+ while (isxdigit (*src)) { -+ n = *src > '9' ? *src - 'a' + 10 : *src - '0'; -+ ++src; -+ if (! isxdigit(*src)) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ n <<= 4; -+ n += *src > '9' ? *src - 'a' + 10 : *src - '0'; -+ if (bp + 1 >= eom) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ *bp++ = n; -+ ++src; -+ } -+ *label = (bp - label - 1) * 8; -+ if (*src++ != ']' || *src++ != '.') { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ escaped = 0; -+ label = bp++; -+ if (bp >= eom) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ continue; -+ } -+ escaped = 0; -+ } else if (c == '\\') { -+ escaped = 1; -+ continue; -+ } else if (c == '.') { -+ c = (bp - label - 1); -+ if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */ -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ if (label >= eom) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ *label = c; -+ /* Fully qualified ? */ -+ if (*src == '\0') { -+ if (c != 0) { -+ if (bp >= eom) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ *bp++ = '\0'; -+ } -+ if ((bp - dst) > MAXCDNAME) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ return (1); -+ } -+ if (c == 0 || *src == '.') { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ label = bp++; -+ continue; -+ } -+ if (bp >= eom) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ *bp++ = (u_char)c; -+ } -+ c = (bp - label - 1); -+ if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */ -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ if (label >= eom) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ *label = c; -+ if (c != 0) { -+ if (bp >= eom) { -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ *bp++ = 0; -+ } -+ if ((bp - dst) > MAXCDNAME) { /* src too big */ -+ __set_errno (EMSGSIZE); -+ return (-1); -+ } -+ return (0); -+} -+ -+ -+ -+int -+ns_name_compress(const char *src, u_char *dst, size_t dstsiz, -+ const u_char **dnptrs, const u_char **lastdnptr) -+{ -+ u_char tmp[NS_MAXCDNAME]; -+ -+ if (ns_name_pton(src, tmp, sizeof tmp) == -1) -+ return (-1); -+ return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr)); -+} -+ -+ -+int -+dn_comp(const char *src, u_char *dst, int dstsiz, -+ u_char **dnptrs, u_char **lastdnptr) -+{ -+ return (ns_name_compress(src, dst, (size_t)dstsiz, -+ (const u_char **)dnptrs, -+ (const u_char **)lastdnptr)); -+} -+ -+ -+ -+ -+int -+res_nmkquery(res_state statp, -+ int op, /* opcode of query */ -+ const char *dname, /* domain name */ -+ int class, int type, /* class and type of query */ -+ const u_char *data, /* resource record data */ -+ int datalen, /* length of data */ -+ const u_char *newrr_in, /* new rr for modify or append */ -+ u_char *buf, /* buffer to put query */ -+ int buflen) /* size of buffer */ -+{ -+ register HEADER *hp; -+ register u_char *cp; -+ register int n; -+ u_char *dnptrs[20], **dpp, **lastdnptr; -+ -+#ifdef DEBUG -+ if (statp->options & RES_DEBUG) -+ printf(";; res_nmkquery(%s, %s, %s, %s)\n", -+ _res_opcodes[op], dname, p_class(class), p_type(type)); -+#endif -+ /* -+ * Initialize header fields. -+ */ -+ if ((buf == NULL) || (buflen < HFIXEDSZ)) -+ return (-1); -+ memset(buf, 0, HFIXEDSZ); -+ hp = (HEADER *) buf; -+ /* We randomize the IDs every time. The old code just -+ incremented by one after the initial randomization which -+ still predictable if the application does multiple -+ requests. */ -+#if 0 -+ hp->id = htons(++statp->id); -+#else -+ hp->id = htons(statp->id); -+ int randombits; -+ do -+ { -+#ifdef RANDOM_BITS -+ RANDOM_BITS (randombits); -+#else -+ struct timeval tv; -+ gettimeofday (&tv, NULL); -+ randombits = (tv.tv_sec << 8) ^ tv.tv_usec; -+#endif -+ } -+ while ((randombits & 0xffff) == 0); -+ statp->id = (statp->id + randombits) & 0xffff; -+#endif -+ hp->opcode = op; -+ hp->rd = (statp->options & RES_RECURSE) != 0; -+ hp->rcode = NOERROR; -+ cp = buf + HFIXEDSZ; -+ buflen -= HFIXEDSZ; -+ dpp = dnptrs; -+ *dpp++ = buf; -+ *dpp++ = NULL; -+ lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0]; -+ /* -+ * perform opcode specific processing -+ */ -+ switch (op) { -+ case QUERY: /*FALLTHROUGH*/ -+ case NS_NOTIFY_OP: -+ if ((buflen -= QFIXEDSZ) < 0) -+ return (-1); -+ if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0) -+ return (-1); -+ cp += n; -+ buflen -= n; -+ __putshort(type, cp); -+ cp += INT16SZ; -+ __putshort(class, cp); -+ cp += INT16SZ; -+ hp->qdcount = htons(1); -+ if (op == QUERY || data == NULL) -+ break; -+ /* -+ * Make an additional record for completion domain. -+ */ -+ buflen -= RRFIXEDSZ; -+ n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr); -+ if (n < 0) -+ return (-1); -+ cp += n; -+ buflen -= n; -+ __putshort(T_NULL, cp); -+ cp += INT16SZ; -+ __putshort(class, cp); -+ cp += INT16SZ; -+ __putlong(0, cp); -+ cp += INT32SZ; -+ __putshort(0, cp); -+ cp += INT16SZ; -+ hp->arcount = htons(1); -+ break; -+ -+ case IQUERY: -+ /* -+ * Initialize answer section -+ */ -+ if (buflen < 1 + RRFIXEDSZ + datalen) -+ return (-1); -+ *cp++ = '\0'; /* no domain name */ -+ __putshort(type, cp); -+ cp += INT16SZ; -+ __putshort(class, cp); -+ cp += INT16SZ; -+ __putlong(0, cp); -+ cp += INT32SZ; -+ __putshort(datalen, cp); -+ cp += INT16SZ; -+ if (datalen) { -+ memcpy(cp, data, datalen); -+ cp += datalen; -+ } -+ hp->ancount = htons(1); -+ break; -+ -+ default: -+ return (-1); -+ } -+ return (cp - buf); -+} -+ -+int -+res_mkquery(int op, /* opcode of query */ -+ const char *dname, /* domain name */ -+ int class, int type, /* class and type of query */ -+ const u_char *data, /* resource record data */ -+ int datalen, /* length of data */ -+ const u_char *newrr_in, /* new rr for modify or append */ -+ u_char *buf, /* buffer to put query */ -+ int buflen) /* size of buffer */ -+{ -+ return (res_nmkquery(&_res, op, dname, class, type, -+ data, datalen, -+ newrr_in, buf, buflen)); -+} -+ -+#endif - - void dorequest(char *s,int type,word id) - { diff --git a/openwrt/package/mutt/Config.in b/openwrt/package/mutt/Config.in deleted file mode 100644 index 211d58c6e98..00000000000 --- a/openwrt/package/mutt/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_MUTT - prompt "mutt.............................. console mail client" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - select BR2_PACKAGE_LIBOPENSSL - help - Mail client for the text console - - http://www.mutt.org - diff --git a/openwrt/package/mutt/Makefile b/openwrt/package/mutt/Makefile deleted file mode 100644 index 16b7fa55967..00000000000 --- a/openwrt/package/mutt/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mutt -PKG_VERSION:=1.5.11 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=@SF/mutt -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=00e6f8f7c37d4840e5e30583ebee21ce -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,MUTT,mutt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_c_bigendian=no \ - ac_cv_sizeof_off_t=8 \ - ac_cv_sizeof_int=4 \ - ac_cv_sizeof_long=4 \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - --includedir=$(PKG_BUILD_DIR)/. \ - --oldincludedir=$(PKG_BUILD_DIR)/. \ - --enable-pop \ - --enable-imap \ - --with-ssl \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) - touch $@ - -$(IPKG_MUTT): - mkdir -p $(IDIR_MUTT)/usr/bin - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_MUTT)/usr/bin/ - $(RSTRIP) $(IDIR_MUTT) - $(IPKG_BUILD) $(IDIR_MUTT) $(PACKAGE_DIR) diff --git a/openwrt/package/mutt/ipkg/mutt.control b/openwrt/package/mutt/ipkg/mutt.control deleted file mode 100644 index 493074895fd..00000000000 --- a/openwrt/package/mutt/ipkg/mutt.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: mutt -Priority: optional -Section: text -Depends: libncurses, libopenssl -Description: Mail text client diff --git a/openwrt/package/mysql/Config.in b/openwrt/package/mysql/Config.in deleted file mode 100644 index bda7142ca94..00000000000 --- a/openwrt/package/mysql/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_MYSQL - tristate - default n - depends BR2_PACKAGE_LIBMYSQLCLIENT - -config BR2_PACKAGE_LIBMYSQLCLIENT - prompt "libmysqlclient.................... MySQL client library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_MYSQL - help - MySQL client library. - - http://dev.mysql.com/ - diff --git a/openwrt/package/mysql/Makefile b/openwrt/package/mysql/Makefile deleted file mode 100644 index ad6b5297be1..00000000000 --- a/openwrt/package/mysql/Makefile +++ /dev/null @@ -1,133 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mysql -PKG_VERSION:=5.0.18 -PKG_RELEASE:=1 -PKG_MD5SUM:=f18153b0239aaa03fc5a751f2d82cb71 - -PKG_SOURCE_URL:=\ - http://mysql.planetmirror.com/Downloads/MySQL-5.0/ \ - http://mysql.he.net/Downloads/MySQL-5.0/ \ - http://www.linorg.usp.br/mysql/Downloads/MySQL-5.0/ \ - http://mysql.holywar.net/Downloads/MySQL-5.0/ - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - touch configure.in; \ - touch aclocal.m4; \ - touch Makefile.in; \ - touch config.h.in; \ - touch configure; \ - $(TARGET_CONFIGURE_OPTS) \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - OPTIMIZE_CFLAGS="$(TARGET_CFLAGS)" \ - OPTIMIZE_CXXFLAGS="$(TARGET_CFLAGS)" \ - ac_atomic_add=yes \ - ac_atomic_sub=yes \ - ac_cv_sys_restartable_syscalls=yes \ - ac_cv_conv_longlong_to_float=yes \ - mysql_cv_compress=yes \ - mysql_cv_gethostname_style=glibc2 \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-assembler \ - --with-pthread \ - --without-raid \ - --with-unix-socket-path=/tmp \ - --without-libwrap \ - --without-pstack \ - --with-low-memory \ - --without-server \ - --without-embedded-server \ - --without-query-cache \ - --without-mysqlfs \ - --without-vio \ - --without-openssl \ - --without-docs \ - --without-bench \ - --without-readline \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="include" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - $(MAKE) -C "$(PKG_BUILD_DIR)/libmysql" \ - CC="$(HOSTCC)" \ - LINK="$(HOSTCC) -o conf_to_src -lc" \ - CFLAGS="" \ - conf_to_src - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="libmysql" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="scripts" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - bin_SCRIPTS="mysql_config" \ - install - touch $@ - -$(IPKG_LIBMYSQLCLIENT): - install -d -m0755 $(IDIR_LIBMYSQLCLIENT)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(IDIR_LIBMYSQLCLIENT)/usr/lib/ - $(RSTRIP) $(IDIR_LIBMYSQLCLIENT) - $(IPKG_BUILD) $(IDIR_LIBMYSQLCLIENT) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql $(STAGING_DIR)/usr/lib/ - rm -f $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.la - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/mysql_config \ - $(STAGING_DIR)/usr/include/mysql \ - $(STAGING_DIR)/usr/lib/mysql \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/mysql/ipkg/libmysqlclient.control b/openwrt/package/mysql/ipkg/libmysqlclient.control deleted file mode 100644 index 02f2395e484..00000000000 --- a/openwrt/package/mysql/ipkg/libmysqlclient.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libmysqlclient -Priority: optional -Section: libs -Depends: zlib -Description: MySQL client library diff --git a/openwrt/package/mysql/patches/500-cross_compile.patch b/openwrt/package/mysql/patches/500-cross_compile.patch deleted file mode 100644 index 9290ab8453b..00000000000 --- a/openwrt/package/mysql/patches/500-cross_compile.patch +++ /dev/null @@ -1,3301 +0,0 @@ ---- mysql.old/configure 2005-12-21 20:41:46.000000000 +0100 -+++ mysql.dev/configure 2006-01-10 23:48:27.302608500 +0100 -@@ -477,7 +477,7 @@ - #endif" - - ac_subdirs_all="$ac_subdirs_all innobase" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MYSQL_NO_DASH_VERSION MYSQL_BASE_VERSION MYSQL_VERSION_ID PROTOCOL_VERSION DOT_FRM_VERSION SHARED_LIB_VERSION AVAILABLE_LANGUAGES NDB_VERSION_MAJOR NDB_VERSION_MINOR NDB_VERSION_BUILD NDB_VERSION_STATUS SYSTEM_TYPE MACHINE_TYPE CONF_COMMAND SAVE_ASFLAGS SAVE_CFLAGS SAVE_CXXFLAGS SAVE_LDFLAGS SAVE_CXXLDFLAGS CXXLDFLAGS AR RANLIB DARWIN_MWCC_TRUE DARWIN_MWCC_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP CC_VERSION CXX_VERSION AS ac_ct_RANLIB EGREP LN_S ECHO ac_ct_AR CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL YACC PDFMANUAL DVIS uname_prog LD ARFLAGS MYSQLD_DEFAULT_SWITCHES TARGET_LINUX LN LN_CP_F MV RM CP SED CMP CHMOD HOSTNAME TAR PERL PERL5 DOXYGEN PDFLATEX MAKEINDEX PS FIND_PROC KILL CHECK_PID CCAS CCASFLAGS NOINST_LDFLAGS MYSQL_SERVER_SUFFIX ASSEMBLER_x86_TRUE ASSEMBLER_x86_FALSE ASSEMBLER_sparc32_TRUE ASSEMBLER_sparc32_FALSE ASSEMBLER_sparc64_TRUE ASSEMBLER_sparc64_FALSE ASSEMBLER_TRUE ASSEMBLER_FALSE MYSQL_UNIX_ADDR MYSQL_TCP_PORT MYSQL_TCP_PORT_DEFAULT MYSQLD_USER GETCONF ac_ct_GETCONF zlib_dir ZLIB_LIBS ZLIB_DEPS ZLIB_INCLUDES WRAPLIBS pstack_dirs pstack_libs COMPILE_PSTACK_TRUE COMPILE_PSTACK_FALSE LIBDL MYSQLD_EXTRA_LDFLAGS CLIENT_EXTRA_LDFLAGS LIB_EXTRA_CCFLAGS LM_CFLAGS COMPILATION_COMMENT ALLOCA MAKE_SHELL TERMCAP_LIB LIBEDIT_LOBJECTS tools_dirs openssl_libs openssl_includes yassl_taocrypt_extra_cxxflags yassl_libs yassl_libs_with_path yassl_includes yassl_dir HAVE_YASSL_TRUE HAVE_YASSL_FALSE libmysqld_dirs linked_libmysqld_targets docs_dirs man_dirs man1_files bench_dirs readline_dir readline_topdir readline_basedir readline_link readline_h_ln_cmd bdb_includes bdb_libs bdb_libs_with_path innodb_includes innodb_libs innodb_system_libs NDB_SCI_INCLUDES NDB_SCI_LIBS HAVE_NDBCLUSTER_DB_TRUE HAVE_NDBCLUSTER_DB_FALSE ndbcluster_includes ndbcluster_libs ndbcluster_system_libs ndb_mgmclient_libs CLIENT_LIBS NON_THREADED_LIBS STATIC_NSS_FLAGS sql_client_dirs linked_client_targets netware_dir linked_netware_sources HAVE_NETWARE_TRUE HAVE_NETWARE_FALSE THREAD_LOBJECTS subdirs sql_server_dirs thread_dirs server_scripts sql_union_dirs GXX NDB_DEFS ndb_cxxflags_fix ndb_port ndb_transporter_opt_objs ndb_bin_am_ldflags ndb_opt_subdirs NDB_SIZEOF_CHARP NDB_SIZEOF_CHAR NDB_SIZEOF_SHORT NDB_SIZEOF_INT NDB_SIZEOF_LONG NDB_SIZEOF_LONG_LONG MAKE_BINARY_DISTRIBUTION_OPTIONS LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MYSQL_NO_DASH_VERSION MYSQL_BASE_VERSION MYSQL_VERSION_ID PROTOCOL_VERSION DOT_FRM_VERSION SHARED_LIB_VERSION AVAILABLE_LANGUAGES NDB_VERSION_MAJOR NDB_VERSION_MINOR NDB_VERSION_BUILD NDB_VERSION_STATUS SYSTEM_TYPE MACHINE_TYPE CONF_COMMAND SAVE_ASFLAGS SAVE_CFLAGS SAVE_CXXFLAGS SAVE_LDFLAGS SAVE_CXXLDFLAGS CXXLDFLAGS AR RANLIB DARWIN_MWCC_TRUE DARWIN_MWCC_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP CC_VERSION CXX_VERSION AS ac_ct_RANLIB EGREP LN_S ECHO ac_ct_AR CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL YACC PDFMANUAL DVIS uname_prog LD ARFLAGS MYSQLD_DEFAULT_SWITCHES TARGET_LINUX LN LN_CP_F MV RM CP SED CMP CHMOD HOSTNAME TAR PERL PERL5 DOXYGEN PDFLATEX MAKEINDEX PS FIND_PROC KILL CHECK_PID CCAS CCASFLAGS NOINST_LDFLAGS MYSQL_SERVER_SUFFIX ASSEMBLER_x86_TRUE ASSEMBLER_x86_FALSE ASSEMBLER_sparc32_TRUE ASSEMBLER_sparc32_FALSE ASSEMBLER_sparc64_TRUE ASSEMBLER_sparc64_FALSE ASSEMBLER_TRUE ASSEMBLER_FALSE MYSQL_UNIX_ADDR MYSQL_TCP_PORT MYSQL_TCP_PORT_DEFAULT MYSQLD_USER GETCONF ac_ct_GETCONF zlib_dir ZLIB_LIBS ZLIB_DEPS ZLIB_INCLUDES WRAPLIBS COMPILE_PSTACK_TRUE COMPILE_PSTACK_FALSE LIBDL MYSQLD_EXTRA_LDFLAGS CLIENT_EXTRA_LDFLAGS LIB_EXTRA_CCFLAGS LM_CFLAGS COMPILATION_COMMENT ALLOCA MAKE_SHELL TERMCAP_LIB LIBEDIT_LOBJECTS tools_dirs openssl_libs openssl_includes yassl_taocrypt_extra_cxxflags yassl_libs yassl_libs_with_path yassl_includes yassl_dir HAVE_YASSL_TRUE HAVE_YASSL_FALSE libmysqld_dirs linked_libmysqld_targets docs_dirs man_dirs man1_files bench_dirs readline_dir readline_topdir readline_basedir readline_link readline_h_ln_cmd bdb_includes bdb_libs bdb_libs_with_path innodb_includes innodb_libs innodb_system_libs NDB_SCI_INCLUDES NDB_SCI_LIBS HAVE_NDBCLUSTER_DB_TRUE HAVE_NDBCLUSTER_DB_FALSE ndbcluster_includes ndbcluster_libs ndbcluster_system_libs ndb_mgmclient_libs CLIENT_LIBS NON_THREADED_LIBS STATIC_NSS_FLAGS sql_client_dirs linked_client_targets netware_dir linked_netware_sources HAVE_NETWARE_TRUE HAVE_NETWARE_FALSE THREAD_LOBJECTS subdirs sql_server_dirs thread_dirs server_scripts sql_union_dirs GXX NDB_DEFS ndb_cxxflags_fix ndb_port ndb_transporter_opt_objs ndb_bin_am_ldflags ndb_opt_subdirs NDB_SIZEOF_CHARP NDB_SIZEOF_CHAR NDB_SIZEOF_SHORT NDB_SIZEOF_INT NDB_SIZEOF_LONG NDB_SIZEOF_LONG_LONG MAKE_BINARY_DISTRIBUTION_OPTIONS LIBOBJS LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -1109,7 +1109,6 @@ - library. Given DIR, zlib binary is assumed to be in - $DIR/lib and header files in $DIR/include. - --with-libwrap=DIR Compile in libwrap (tcp_wrappers) support -- --with-pstack Use the pstack backtrace library - --without-debug Build a production version without debugging code - --with-mysqld-ldflags Extra linking arguments for mysqld - --with-client-ldflags Extra linking arguments for clients -@@ -1295,7 +1294,7 @@ - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi -- cd $ac_popdir -+ cd "$ac_popdir" - done - fi - -@@ -3885,8 +3884,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -3944,8 +3942,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4061,8 +4058,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4116,8 +4112,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4163,8 +4158,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4208,8 +4202,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4562,8 +4555,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4621,8 +4613,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4694,8 +4685,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4739,8 +4729,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5854,7 +5843,7 @@ - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 5857 "configure"' > conftest.$ac_ext -+ echo '#line 5846 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -5974,8 +5963,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6050,8 +6038,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6221,8 +6208,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6289,8 +6275,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6728,7 +6713,7 @@ - - - # Provide some information about the compiler. --echo "$as_me:6731:" \ -+echo "$as_me:6716:" \ - "checking for Fortran 77 compiler version" >&5 - ac_compiler=`set X $ac_compile; echo $2` - { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 -@@ -6774,8 +6759,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_f77_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6824,8 +6808,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_f77_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -7762,11 +7745,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7765: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:7748: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:7769: \$? = $ac_status" >&5 -+ echo "$as_me:7752: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -7995,11 +7978,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7998: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:7981: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:8002: \$? = $ac_status" >&5 -+ echo "$as_me:7985: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -8055,11 +8038,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:8058: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8041: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:8062: \$? = $ac_status" >&5 -+ echo "$as_me:8045: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -8446,8 +8429,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -8507,8 +8489,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9389,7 +9370,7 @@ - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) -- echo '#line 9392 "configure"' > conftest.$ac_ext -+ echo '#line 9373 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -9720,8 +9701,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9824,8 +9804,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9890,8 +9869,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9984,8 +9962,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -10050,8 +10027,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -10117,8 +10093,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -10184,8 +10159,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -10260,7 +10234,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -11492,8 +11465,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -12537,11 +12509,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:12540: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:12512: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:12544: \$? = $ac_status" >&5 -+ echo "$as_me:12516: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -12597,11 +12569,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:12600: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:12572: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:12604: \$? = $ac_status" >&5 -+ echo "$as_me:12576: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -13108,7 +13080,7 @@ - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) -- echo '#line 13111 "configure"' > conftest.$ac_ext -+ echo '#line 13083 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -13439,8 +13411,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13543,8 +13514,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13609,8 +13579,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13703,8 +13672,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13769,8 +13737,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13836,8 +13803,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13903,8 +13869,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13979,7 +13944,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <&5) -+ (eval echo "\"\$as_me:14872: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:14911: \$? = $ac_status" >&5 -+ echo "$as_me:14876: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -14964,11 +14929,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:14967: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:14932: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:14971: \$? = $ac_status" >&5 -+ echo "$as_me:14936: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -15345,8 +15310,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_f77_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -15396,8 +15360,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_f77_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -16278,7 +16241,7 @@ - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) -- echo '#line 16281 "configure"' > conftest.$ac_ext -+ echo '#line 16244 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -17019,11 +16982,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:17022: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16985: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:17026: \$? = $ac_status" >&5 -+ echo "$as_me:16989: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -17252,11 +17215,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:17255: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:17218: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:17259: \$? = $ac_status" >&5 -+ echo "$as_me:17222: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -17312,11 +17275,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:17315: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:17278: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:17319: \$? = $ac_status" >&5 -+ echo "$as_me:17282: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -17703,8 +17666,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -17764,8 +17726,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18646,7 +18607,7 @@ - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) -- echo '#line 18649 "configure"' > conftest.$ac_ext -+ echo '#line 18610 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -18977,8 +18938,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19081,8 +19041,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19147,8 +19106,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19241,8 +19199,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19307,8 +19264,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19374,8 +19330,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19441,8 +19396,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19517,7 +19471,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <&5 - echo $ECHO_N "checking \"return type of sprintf\"... $ECHO_C" >&6 - --#check the return type of sprintf --case $SYSTEM_TYPE in -- *netware*) -- cat >>confdefs.h <<\_ACEOF --#define SPRINTF_RETURNS_INT 1 --_ACEOF -- echo "$as_me:$LINENO: result: \"int\"" >&5 --echo "${ECHO_T}\"int\"" >&6 -- ;; -- *) --if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- -- int main() -- { -- char* s = "hello"; -- char buf[6]; -- if((int)sprintf(buf, s) == strlen(s)) -- return 0; -- -- return -1; -- } -- --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then - - cat >>confdefs.h <<\_ACEOF - #define SPRINTF_RETURNS_INT 1 - _ACEOF - -- echo "$as_me:$LINENO: result: \"int\"" >&5 -+echo "$as_me:$LINENO: result: \"int\"" >&5 - echo "${ECHO_T}\"int\"" >&6 --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- -- int main() -- { -- char* s = "hello"; -- char buf[6]; -- if((char*)sprintf(buf,s) == buf + strlen(s)) -- return 0; -- return -1; -- } --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --cat >>confdefs.h <<\_ACEOF --#define SPRINTF_RETURNS_PTR 1 --_ACEOF -- -- echo "$as_me:$LINENO: result: \"ptr\"" >&5 --echo "${ECHO_T}\"ptr\"" >&6 --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) -- --cat >>confdefs.h <<\_ACEOF --#define SPRINTF_RETURNS_GARBAGE 1 --_ACEOF -- -- echo "$as_me:$LINENO: result: \"garbage\"" >&5 --echo "${ECHO_T}\"garbage\"" >&6 --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- ;; --esac - - # Extract the first word of "uname", so it can be a program name with args. - set dummy uname; ac_word=$2 -@@ -22130,8 +21969,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22573,8 +22411,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22812,8 +22649,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22891,8 +22727,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22964,8 +22799,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23019,8 +22853,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23091,8 +22924,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23146,8 +22978,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23214,8 +23045,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23386,8 +23216,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23497,8 +23326,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23658,8 +23486,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23731,8 +23558,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23808,8 +23634,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23881,8 +23706,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23983,8 +23807,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24075,8 +23898,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24142,8 +23964,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24244,8 +24065,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24311,8 +24131,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24413,8 +24232,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24480,8 +24298,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24583,8 +24400,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24650,8 +24466,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24727,8 +24542,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24827,8 +24641,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24927,8 +24740,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24994,8 +24806,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25106,8 +24917,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25187,8 +24997,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25282,8 +25091,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25385,8 +25193,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25525,8 +25332,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25576,288 +25382,6 @@ - fi; - - --if test "$TARGET_LINUX" = "true"; then -- echo "$as_me:$LINENO: checking for atomic operations" >&5 --echo $ECHO_N "checking for atomic operations... $ECHO_C" >&6 -- -- atom_ops= -- if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#include --int main() --{ -- atomic_t v; -- -- atomic_set(&v, 23); -- atomic_add(5, &v); -- return atomic_read(&v) == 28 ? 0 : -1; --} -- --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_ATOMIC_ADD 1 --_ACEOF -- -- atom_ops="${atom_ops}atomic_add " --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#include --int main() --{ -- atomic_t v; -- -- atomic_set(&v, 23); -- atomic_sub(5, &v); -- return atomic_read(&v) == 18 ? 0 : -1; --} -- --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_ATOMIC_SUB 1 --_ACEOF -- -- atom_ops="${atom_ops}atomic_sub " --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- -- if test -z "$atom_ops"; then atom_ops="no"; fi -- echo "$as_me:$LINENO: result: $atom_ops" >&5 --echo "${ECHO_T}$atom_ops" >&6 -- -- --# Check whether --with-pstack or --without-pstack was given. --if test "${with_pstack+set}" = set; then -- withval="$with_pstack" -- USE_PSTACK=$withval --else -- USE_PSTACK=no --fi; -- pstack_libs= -- pstack_dirs= -- if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -- then -- have_libiberty= have_libbfd= -- my_save_LIBS="$LIBS" -- echo "$as_me:$LINENO: checking for fdmatch in -liberty" >&5 --echo $ECHO_N "checking for fdmatch in -liberty... $ECHO_C" >&6 --if test "${ac_cv_lib_iberty_fdmatch+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-liberty $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char fdmatch (); --int --main () --{ --fdmatch (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_iberty_fdmatch=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_iberty_fdmatch=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_iberty_fdmatch" >&5 --echo "${ECHO_T}$ac_cv_lib_iberty_fdmatch" >&6 --if test $ac_cv_lib_iberty_fdmatch = yes; then -- have_libiberty=yes -- echo "$as_me:$LINENO: checking for bfd_openr in -lbfd" >&5 --echo $ECHO_N "checking for bfd_openr in -lbfd... $ECHO_C" >&6 --if test "${ac_cv_lib_bfd_bfd_openr+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lbfd -liberty $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char bfd_openr (); --int --main () --{ --bfd_openr (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_bfd_bfd_openr=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_bfd_bfd_openr=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_bfd_bfd_openr" >&5 --echo "${ECHO_T}$ac_cv_lib_bfd_bfd_openr" >&6 --if test $ac_cv_lib_bfd_bfd_openr = yes; then -- have_libbfd=yes --fi -- --fi -- -- LIBS="$my_save_LIBS" -- -- if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes -- then -- pstack_dirs='$(top_srcdir)'/pstack -- pstack_libs="../pstack/libpstack.a -lbfd -liberty" -- # We must link staticly when using pstack -- with_mysqld_ldflags="-all-static" -- -- -- --cat >>confdefs.h <<\_ACEOF --#define USE_PSTACK 1 --_ACEOF -- -- else -- USE_PSTACK="no" -- fi -- else -- USE_PSTACK="no" -- fi --fi - - - if test "$USE_PSTACK" = "yes"; then -@@ -25941,8 +25465,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26008,8 +25531,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26054,78 +25576,9 @@ - - echo "$as_me:$LINENO: checking for int8" >&5 - echo $ECHO_N "checking for int8... $ECHO_C" >&6 --case $SYSTEM_TYPE in -- *netware) -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- ;; -- *) --if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#ifdef HAVE_STDLIB_H --#include --#endif -- --#ifdef HAVE_STDDEF_H --#include --#endif -- --#ifdef HAVE_SYS_TYPES_H --#include --#endif -- --int main() --{ -- int8 i; -- return 0; --} -- --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_INT_8_16_32 1 --_ACEOF -- --echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- ;; --esac -- - # - # Some system specific hacks - # -@@ -26519,8 +25972,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26590,8 +26042,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26903,8 +26354,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26957,8 +26407,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27010,8 +26459,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27064,8 +26512,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27137,8 +26584,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27214,8 +26660,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27324,8 +26769,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27427,8 +26871,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27508,8 +26951,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27585,8 +27027,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28023,8 +27464,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28084,8 +27524,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28158,8 +27597,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28224,8 +27662,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28268,8 +27705,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28341,8 +27777,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28404,8 +27839,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28474,8 +27908,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28549,8 +27982,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28612,8 +28044,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28653,8 +28084,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28710,8 +28140,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28751,8 +28180,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28816,8 +28244,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28848,10 +28275,8 @@ - esac - else - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF -@@ -28981,8 +28406,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29044,8 +28468,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29085,8 +28508,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29142,8 +28564,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29183,8 +28604,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29248,8 +28668,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29280,10 +28699,8 @@ - esac - else - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF -@@ -29395,8 +28812,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29458,8 +28874,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29499,8 +28914,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29556,8 +28970,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29597,8 +29010,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29662,8 +29074,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29694,10 +29105,8 @@ - esac - else - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF -@@ -29809,8 +29218,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29872,8 +29280,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29913,8 +29320,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29970,8 +29376,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30011,8 +29416,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30076,8 +29480,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30108,10 +29511,8 @@ - esac - else - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF -@@ -30229,8 +29630,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30292,8 +29692,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30333,8 +29732,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30390,8 +29788,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30431,8 +29828,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30496,8 +29892,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30528,10 +29923,8 @@ - esac - else - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF -@@ -30649,8 +30042,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30712,8 +30104,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30753,8 +30144,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30810,8 +30200,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30851,8 +30240,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30916,8 +30304,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30948,10 +30335,8 @@ - esac - else - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF -@@ -31187,8 +30572,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -31230,8 +30614,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -31288,8 +30671,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -31432,8 +30814,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -31483,8 +30864,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -31572,8 +30952,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -31711,8 +31090,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -31789,8 +31167,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -31930,8 +31307,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32009,8 +31385,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32078,8 +31453,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32451,8 +31825,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32601,8 +31974,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32666,8 +32038,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32732,8 +32103,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32797,8 +32167,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32867,8 +32236,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -32937,8 +32305,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -33012,8 +32379,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -33160,8 +32526,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -33242,8 +32607,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -33384,8 +32748,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -33577,8 +32940,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -33678,8 +33040,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -33742,8 +33103,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -33915,8 +33275,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34022,8 +33381,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34124,8 +33482,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34226,8 +33583,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34329,8 +33685,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34426,8 +33781,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34619,8 +33973,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34748,8 +34101,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34794,8 +34146,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34843,8 +34194,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34930,8 +34280,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -34993,8 +34342,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35056,8 +34404,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35119,8 +34466,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35204,8 +34550,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35289,8 +34634,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35359,8 +34703,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35426,8 +34769,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35576,8 +34918,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35726,8 +35067,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -35908,8 +35248,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36006,8 +35345,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36104,8 +35442,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36202,8 +35539,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36300,8 +35636,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36398,8 +35733,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36466,8 +35800,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36527,8 +35860,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36605,8 +35937,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36672,8 +36003,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36739,8 +36069,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36864,8 +36193,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -36960,8 +36288,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -37056,8 +36383,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -37152,8 +36478,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -37248,8 +36573,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -37394,8 +36718,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -37459,8 +36782,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -37631,8 +36953,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -37726,8 +37047,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -37937,8 +37257,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38050,8 +37369,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38113,8 +37431,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38212,8 +37529,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38320,8 +37636,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38409,8 +37724,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38498,8 +37812,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38595,8 +37908,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38689,8 +38001,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38765,8 +38076,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38835,8 +38145,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38906,8 +38215,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -38979,8 +38287,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -39053,8 +38360,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -39124,8 +38430,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -39190,8 +38495,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -39782,8 +39086,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -39852,8 +39155,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -39921,8 +39223,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_cxx_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -40184,8 +39485,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -40358,8 +39658,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -40608,8 +39907,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -40924,8 +40222,7 @@ - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -42602,8 +41899,6 @@ - s,@ZLIB_DEPS@,$ZLIB_DEPS,;t t - s,@ZLIB_INCLUDES@,$ZLIB_INCLUDES,;t t - s,@WRAPLIBS@,$WRAPLIBS,;t t --s,@pstack_dirs@,$pstack_dirs,;t t --s,@pstack_libs@,$pstack_libs,;t t - s,@COMPILE_PSTACK_TRUE@,$COMPILE_PSTACK_TRUE,;t t - s,@COMPILE_PSTACK_FALSE@,$COMPILE_PSTACK_FALSE,;t t - s,@LIBDL@,$LIBDL,;t t -@@ -42848,11 +42143,6 @@ - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - -- if test x"$ac_file" != x-; then -- { echo "$as_me:$LINENO: creating $ac_file" >&5 --echo "$as_me: creating $ac_file" >&6;} -- rm -f "$ac_file" -- fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ -@@ -42891,6 +42181,12 @@ - fi;; - esac - done` || { (exit 1); exit 1; } -+ -+ if test x"$ac_file" != x-; then -+ { echo "$as_me:$LINENO: creating $ac_file" >&5 -+echo "$as_me: creating $ac_file" >&6;} -+ rm -f "$ac_file" -+ fi - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -@@ -43576,7 +42872,7 @@ - { (exit 1); exit 1; }; } - fi - -- cd $ac_popdir -+ cd "$ac_popdir" - done - fi - ---- mysql.old/configure.in 2005-12-21 20:39:48.000000000 +0100 -+++ mysql.dev/configure.in 2006-01-10 23:48:12.369675250 +0100 -@@ -240,41 +240,8 @@ - - AC_MSG_CHECKING("return type of sprintf") - --#check the return type of sprintf --case $SYSTEM_TYPE in -- *netware*) -- AC_DEFINE(SPRINTF_RETURNS_INT, [1]) AC_MSG_RESULT("int") -- ;; -- *) --AC_TRY_RUN([ -- int main() -- { -- char* s = "hello"; -- char buf[6]; -- if((int)sprintf(buf, s) == strlen(s)) -- return 0; -- -- return -1; -- } -- ], -- [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) -- AC_MSG_RESULT("int")], -- [AC_TRY_RUN([ -- int main() -- { -- char* s = "hello"; -- char buf[6]; -- if((char*)sprintf(buf,s) == buf + strlen(s)) -- return 0; -- return -1; -- } ], -- [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf]) -- AC_MSG_RESULT("ptr")], -- [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf]) -- AC_MSG_RESULT("garbage")]) -- ]) -- ;; --esac -+AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) -+AC_MSG_RESULT("int") - - AC_PATH_PROG(uname_prog, uname, no) - -@@ -790,80 +757,6 @@ - ]) - AC_SUBST(WRAPLIBS) - --if test "$TARGET_LINUX" = "true"; then -- AC_MSG_CHECKING([for atomic operations]) -- -- atom_ops= -- AC_TRY_RUN([ --#include --int main() --{ -- atomic_t v; -- -- atomic_set(&v, 23); -- atomic_add(5, &v); -- return atomic_read(&v) == 28 ? 0 : -1; --} -- ], -- [AC_DEFINE([HAVE_ATOMIC_ADD], [1], -- [atomic_add() from (Linux only)]) -- atom_ops="${atom_ops}atomic_add "], -- ) -- AC_TRY_RUN([ --#include --int main() --{ -- atomic_t v; -- -- atomic_set(&v, 23); -- atomic_sub(5, &v); -- return atomic_read(&v) == 18 ? 0 : -1; --} -- ], -- [AC_DEFINE([HAVE_ATOMIC_SUB], [1], -- [atomic_sub() from (Linux only)]) -- atom_ops="${atom_ops}atomic_sub "], -- ) -- -- if test -z "$atom_ops"; then atom_ops="no"; fi -- AC_MSG_RESULT($atom_ops) -- -- AC_ARG_WITH(pstack, -- [ --with-pstack Use the pstack backtrace library], -- [ USE_PSTACK=$withval ], -- [ USE_PSTACK=no ]) -- pstack_libs= -- pstack_dirs= -- if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -- then -- have_libiberty= have_libbfd= -- my_save_LIBS="$LIBS" --dnl I have no idea if this is a good test - can not find docs for libiberty -- AC_CHECK_LIB([iberty], [fdmatch], -- [have_libiberty=yes -- AC_CHECK_LIB([bfd], [bfd_openr], [have_libbfd=yes], , [-liberty])]) -- LIBS="$my_save_LIBS" -- -- if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes -- then -- pstack_dirs='$(top_srcdir)'/pstack -- pstack_libs="../pstack/libpstack.a -lbfd -liberty" -- # We must link staticly when using pstack -- with_mysqld_ldflags="-all-static" -- AC_SUBST([pstack_dirs]) -- AC_SUBST([pstack_libs]) -- AC_DEFINE([USE_PSTACK], [1], [the pstack backtrace library]) --dnl This check isn't needed, but might be nice to give some feedback.... --dnl AC_CHECK_HEADER(libiberty.h, --dnl have_libiberty_h=yes, --dnl have_libiberty_h=no) -- else -- USE_PSTACK="no" -- fi -- else -- USE_PSTACK="no" -- fi --fi - AM_CONDITIONAL(COMPILE_PSTACK, test "$USE_PSTACK" = "yes") - AC_MSG_CHECKING([if we should use pstack]) - AC_MSG_RESULT([$USE_PSTACK]) -@@ -880,37 +773,7 @@ - NON_THREADED_LIBS="$LIBS" - - AC_MSG_CHECKING([for int8]) --case $SYSTEM_TYPE in -- *netware) -- AC_MSG_RESULT([no]) -- ;; -- *) --AC_TRY_RUN([ --#ifdef HAVE_STDLIB_H --#include --#endif -- --#ifdef HAVE_STDDEF_H --#include --#endif -- --#ifdef HAVE_SYS_TYPES_H --#include --#endif -- --int main() --{ -- int8 i; -- return 0; --} --], --[AC_DEFINE([HAVE_INT_8_16_32], [1], -- [whether int8, int16 and int32 types exist]) --AC_MSG_RESULT([yes])], --[AC_MSG_RESULT([no])] --) -- ;; --esac -+AC_MSG_RESULT([no]) - - # - # Some system specific hacks diff --git a/openwrt/package/nano/Config.in b/openwrt/package/nano/Config.in deleted file mode 100644 index 70cae553095..00000000000 --- a/openwrt/package/nano/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_NANO - prompt "nano.............................. An enhanced clone of the Pico text editor" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - GNU nano (Nano's ANOther editor, or Not ANOther editor) is an enhanced clone of the Pico text editor.. - - http://www.nano-editor.org/ - diff --git a/openwrt/package/nano/Makefile b/openwrt/package/nano/Makefile deleted file mode 100644 index aec6fa8e62a..00000000000 --- a/openwrt/package/nano/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nano -PKG_VERSION:=1.3.8 -PKG_RELEASE:=1 -PKG_MD5SUM:=20633397bf5d462255f37dfcc7cad4e7 - -PKG_SOURCE_URL:=http://www.ewtoo.org/~astyanax/nano/dist/v1.3 \ - http://www.nano-editor.org/dist/v1.3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,NANO,nano,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include " \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_header_regex_h=no \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --with-gnu-ld \ - --disable-rpath \ - --enable-tiny \ - --disable-glibtest \ - --disable-utf8 \ - --without-slang \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_NANO): - install -d -m0755 $(IDIR_NANO)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/nano $(IDIR_NANO)/usr/bin/ - $(RSTRIP) $(IDIR_NANO) - $(IPKG_BUILD) $(IDIR_NANO) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/nano/ipkg/nano.control b/openwrt/package/nano/ipkg/nano.control deleted file mode 100644 index e68daef6bd1..00000000000 --- a/openwrt/package/nano/ipkg/nano.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: nano -Priority: optional -Section: admin -Depends: libncurses -Description: An enhanced clone of the Pico text editor diff --git a/openwrt/package/ncurses/Config.in b/openwrt/package/ncurses/Config.in deleted file mode 100644 index 552a6ccd280..00000000000 --- a/openwrt/package/ncurses/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_COMPILE_NCURSES - tristate - depends BR2_PACKAGE_LIBNCURSES - -config BR2_PACKAGE_LIBNCURSES - prompt "libncurses........................ Terminal handling library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_NCURSES - help - A terminal handling library - - http://www.gnu.org/software/ncurses/ - diff --git a/openwrt/package/ncurses/Makefile b/openwrt/package/ncurses/Makefile deleted file mode 100644 index 4223b8033b4..00000000000 --- a/openwrt/package/ncurses/Makefile +++ /dev/null @@ -1,156 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ncurses -PKG_VERSION:=5.2 -PKG_RELEASE:=8 -PKG_MD5SUM:=464d6a49010cf2a6eb9ce59a264d4d47 - -PKG_SOURCE_URL:=@GNU/ncurses -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - ./configure \ - --target=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-echo \ - --enable-const \ - --enable-overwrite \ - --disable-rpath \ - --without-ada \ - --without-cxx \ - --without-cxx-binding \ - --without-debug \ - --without-profile \ - --with-progs \ - --with-normal \ - --without-shared \ - --with-terminfo-dirs=/usr/share/terminfo \ - --with-default-terminfo-dir=/usr/share/terminfo \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - libs install.progs - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_linux_vers="2" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-echo \ - --enable-const \ - --enable-overwrite \ - --disable-rpath \ - --without-ada \ - --without-cxx \ - --without-cxx-binding \ - --without-debug \ - --without-profile \ - --without-progs \ - --with-normal \ - --with-shared \ - --with-terminfo-dirs=/usr/share/terminfo \ - --with-default-terminfo-dir=/usr/share/terminfo \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - BUILD_CC="$(TARGET_CC)" \ - HOSTCC="$(HOSTCC)" \ - HOSTCCFLAGS="\$$(CPPFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - libs install.libs install.data - touch $@ - -$(IPKG_LIBNCURSES): - install -d -m0755 $(IDIR_LIBNCURSES)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}*.so.* $(IDIR_LIBNCURSES)/usr/lib/ - install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo - for f in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \ - install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \ - $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$${f} \ - $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \ - done - $(RSTRIP) $(IDIR_LIBNCURSES) - $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libncurses.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/panel.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/menu.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libncurses.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/curses.h \ - $(STAGING_DIR)/usr/include/{ncurses,panel}.h \ - $(STAGING_DIR)/usr/include/menu.h \ - $(STAGING_DIR)/usr/include/panel.h \ - $(STAGING_DIR)/usr/include/term{,cap}.h \ - $(STAGING_DIR)/usr/include/unctrl.h \ - $(STAGING_DIR)/usr/lib/libcurses.so \ - $(STAGING_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/ncurses/ipkg/libncurses.control b/openwrt/package/ncurses/ipkg/libncurses.control deleted file mode 100644 index 0eff1cea02a..00000000000 --- a/openwrt/package/ncurses/ipkg/libncurses.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libncurses -Priority: optional -Section: libs -Description: a terminal handling library and common terminal definitions diff --git a/openwrt/package/ncurses/patches/500-cross.patch b/openwrt/package/ncurses/patches/500-cross.patch deleted file mode 100644 index 95361914083..00000000000 --- a/openwrt/package/ncurses/patches/500-cross.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN ncurses-5.2-orig/aclocal.m4 ncurses-5.2-6/aclocal.m4 ---- ncurses-5.2-orig/aclocal.m4 2000-10-21 00:57:49.000000000 +0200 -+++ ncurses-5.2-6/aclocal.m4 2005-08-09 14:50:15.000000000 +0200 -@@ -1919,7 +1919,7 @@ - EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS" - fi - test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel -- MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $[@]' -+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION),-stats,$(LDFLAGS) -lc -o $[@]' - ;; - openbsd2*) - CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" -diff -ruN ncurses-5.2-orig/configure ncurses-5.2-6/configure ---- ncurses-5.2-orig/configure 2000-10-21 00:58:49.000000000 +0200 -+++ ncurses-5.2-6/configure 2005-08-09 14:50:25.000000000 +0200 -@@ -2660,7 +2660,7 @@ - EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS" - fi - test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel -- MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@' -+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,$(LDFLAGS) -lc -o $@' - ;; - openbsd2*) - CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" diff --git a/openwrt/package/ncurses/patches/501-cross-no_libdir.patch b/openwrt/package/ncurses/patches/501-cross-no_libdir.patch deleted file mode 100644 index b8b277fb18e..00000000000 --- a/openwrt/package/ncurses/patches/501-cross-no_libdir.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -ruN ncurses-5.2-old/configure ncurses-5.2-new/configure ---- ncurses-5.2-old/configure 2005-08-23 04:17:49.000000000 +0200 -+++ ncurses-5.2-new/configure 2005-08-23 04:18:39.000000000 +0200 -@@ -7191,11 +7191,11 @@ - fi - done - echo "$ac_t""$cf_cv_src_modules" 1>&6 --TEST_ARGS="-L${LIB_DIR} -L\$(libdir) $TEST_ARGS" -+TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" - - - --PROG_ARGS="-L${LIB_DIR} -L\$(libdir) $PROG_ARGS" -+PROG_ARGS="-L${LIB_DIR} $PROG_ARGS" - - - SRC_SUBDIRS="man include" -diff -ruN ncurses-5.2-old/form/Makefile.in ncurses-5.2-new/form/Makefile.in ---- ncurses-5.2-old/form/Makefile.in 2000-10-14 19:57:02.000000000 +0200 -+++ ncurses-5.2-new/form/Makefile.in 2005-08-23 04:22:08.000000000 +0200 -@@ -85,7 +85,7 @@ - LINK = $(LIBTOOL) $(CC) - LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ - --SHLIB_DIRS = -L../lib -L$(libdir) -+SHLIB_DIRS = -L../lib - SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@ - - MK_SHARED_LIB = @MK_SHARED_LIB@ -diff -ruN ncurses-5.2-old/menu/Makefile.in ncurses-5.2-new/menu/Makefile.in ---- ncurses-5.2-old/menu/Makefile.in 2000-10-14 19:57:02.000000000 +0200 -+++ ncurses-5.2-new/menu/Makefile.in 2005-08-23 04:22:18.000000000 +0200 -@@ -85,7 +85,7 @@ - LINK = $(LIBTOOL) $(CC) - LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ - --SHLIB_DIRS = -L../lib -L$(libdir) -+SHLIB_DIRS = -L../lib - SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@ - - MK_SHARED_LIB = @MK_SHARED_LIB@ -diff -ruN ncurses-5.2-old/ncurses/Makefile.in ncurses-5.2-new/ncurses/Makefile.in ---- ncurses-5.2-old/ncurses/Makefile.in 2000-10-15 00:55:35.000000000 +0200 -+++ ncurses-5.2-new/ncurses/Makefile.in 2005-08-23 04:21:53.000000000 +0200 -@@ -99,7 +99,7 @@ - LINK = $(LIBTOOL) $(CC) - LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ - --SHLIB_DIRS = -L../lib -L$(libdir) -+SHLIB_DIRS = -L../lib - SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@ - TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@ - -diff -ruN ncurses-5.2-old/panel/Makefile.in ncurses-5.2-new/panel/Makefile.in ---- ncurses-5.2-old/panel/Makefile.in 2000-10-14 19:57:02.000000000 +0200 -+++ ncurses-5.2-new/panel/Makefile.in 2005-08-23 04:22:30.000000000 +0200 -@@ -86,7 +86,7 @@ - LINK = $(LIBTOOL) $(CC) - LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ - --SHLIB_DIRS = -L../lib -L$(libdir) -+SHLIB_DIRS = -L../lib - SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@ - - MK_SHARED_LIB = @MK_SHARED_LIB@ diff --git a/openwrt/package/ndisc/Config.in b/openwrt/package/ndisc/Config.in deleted file mode 100644 index 5513edb0a61..00000000000 --- a/openwrt/package/ndisc/Config.in +++ /dev/null @@ -1,41 +0,0 @@ -menu "ndisc6............................ IPv6 discovery tools" - -config BR2_COMPILE_NDISC6 - tristate - default n - depends BR2_PACKAGE_NDISC6 || BR2_PACKAGE_RDISC6 || BR2_PACKAGE_TCPTRACEROUTE6 - -config BR2_PACKAGE_NDISC6 - prompt "ndisc6............................ An ICMPv6 neighbour discovery tool" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_NDISC6 - help - - An ICMPv6 neighbour discovery tools - - http://people.via.ecp.fr/~rem/ndisc6/ - -config BR2_PACKAGE_RDISC6 - prompt "rdisc6............................ An ICMPv6 router discovery tool" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_NDISC6 - help - - An ICMPv6 router discovery tool - - http://people.via.ecp.fr/~rem/ndisc6/ - -config BR2_PACKAGE_TCPTRACEROUTE6 - prompt "tcptraceroute6.................... A TCP/IPv6-based traceroute implementation" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_NDISC6 - help - - A TCP/IPv6-based traceroute implementation - - http://people.via.ecp.fr/~rem/ndisc6/ - -endmenu diff --git a/openwrt/package/ndisc/Makefile b/openwrt/package/ndisc/Makefile deleted file mode 100644 index cef5dc1da0a..00000000000 --- a/openwrt/package/ndisc/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ndisc6 -PKG_VERSION:=0.5.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=33487fe5505b195eb31468d88ba9ab56 - -PKG_SOURCE_URL:=http://people.via.ecp.fr/~rem/ndisc6/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,NDISC6,ndisc6,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,RDISC6,rdisc6,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,TCPTRACEROUTE6,tcptraceroute6,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - all - touch $@ - -$(IPKG_NDISC6): - install -d -m0755 $(IDIR_NDISC6)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ndisc6 $(IDIR_NDISC6)/usr/bin/ - $(RSTRIP) $(IDIR_NDISC6) - $(IPKG_BUILD) $(IDIR_NDISC6) $(PACKAGE_DIR) - -$(IPKG_RDISC6): - install -d -m0755 $(IDIR_RDISC6)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/rdisc6 $(IDIR_RDISC6)/usr/bin/ - $(RSTRIP) $(IDIR_RDISC6) - $(IPKG_BUILD) $(IDIR_RDISC6) $(PACKAGE_DIR) - -$(IPKG_TCPTRACEROUTE6): - install -d -m0755 $(IDIR_TCPTRACEROUTE6)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/tcptraceroute6 $(IDIR_TCPTRACEROUTE6)/usr/bin/ - $(RSTRIP) $(IDIR_TCPTRACEROUTE6) - $(IPKG_BUILD) $(IDIR_TCPTRACEROUTE6) $(PACKAGE_DIR) diff --git a/openwrt/package/ndisc/ipkg/ndisc6.control b/openwrt/package/ndisc/ipkg/ndisc6.control deleted file mode 100644 index 40b935e91ca..00000000000 --- a/openwrt/package/ndisc/ipkg/ndisc6.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ndisc6 -Priority: optional -Section: net -Description: ICMPv6 Neighbour Discovery tool diff --git a/openwrt/package/ndisc/ipkg/rdisc6.control b/openwrt/package/ndisc/ipkg/rdisc6.control deleted file mode 100644 index 4724d69149b..00000000000 --- a/openwrt/package/ndisc/ipkg/rdisc6.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: rdisc6 -Priority: optional -Section: net -Description: ICMPv6 Router Discovery tool diff --git a/openwrt/package/ndisc/ipkg/tcptraceroute6.control b/openwrt/package/ndisc/ipkg/tcptraceroute6.control deleted file mode 100644 index 625fe80c161..00000000000 --- a/openwrt/package/ndisc/ipkg/tcptraceroute6.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: tcptraceroute6 -Priority: optional -Section: net -Description: A TCP/IPv6-based traceroute implementation diff --git a/openwrt/package/ndisc/patches/100-license.patch b/openwrt/package/ndisc/patches/100-license.patch deleted file mode 100644 index 8ea76c5160d..00000000000 --- a/openwrt/package/ndisc/patches/100-license.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -urN ndisc6.old/Makefile ndisc6.dev/Makefile ---- ndisc6.old/Makefile 2005-12-01 15:34:08.000000000 +0100 -+++ ndisc6.dev/Makefile 2006-03-23 13:44:32.000000000 +0100 -@@ -31,7 +31,7 @@ - - sbin_PROGRAMS = ndisc6 rdisc6 traceroute6 - man8_MANS = $(sbin_PROGRAMS:%=%.8) --DOC = COPYING INSTALL NEWS README -+DOC = INSTALL NEWS README - - AM_CPPFLAGS = -DPACKAGE_VERSION=\"$(VERSION)\" $(CPPFLAGS) - ndisc6_CPPFLAGS = $(AM_CPPFLAGS) -@@ -52,9 +52,6 @@ - tcptraceroute6: traceroute6 - ln -sf traceroute6 $@ - --COPYING: /usr/share/common-licenses/GPL-2 -- ln -s $< $@ -- - install: all install-man install-links - mkdir -p $(DESTDIR)$(bindir) - @for f in $(sbin_PROGRAMS); do \ diff --git a/openwrt/package/net-snmp/Config.in b/openwrt/package/net-snmp/Config.in deleted file mode 100644 index e0a6d0387ef..00000000000 --- a/openwrt/package/net-snmp/Config.in +++ /dev/null @@ -1,75 +0,0 @@ -menu "net-snmp.......................... Open source SNMP (Simple Network Management Protocol) implementation" - -config BR2_COMPILE_NET_SNMP - tristate - default n - depends BR2_PACKAGE_LIBNETSNMP || BR2_PACKAGE_SNMPD_STATIC - -config BR2_PACKAGE_LIBNETSNMP - prompt "libnetsnmp........................ SNMP shared libraries" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_NET_SNMP - select BR2_PACKAGE_LIBELF - help - Simple Network Management Protocol (SNMP) is a widely used - protocol for monitoring the health and welfare of network - equipment (eg. routers), computer equipment and even devices - like UPSs. Net-SNMP is a suite of applications used to implement - SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6. - - http://www.net-snmp.org/ - - This package contains shared libraries, needed by other programs. - -config BR2_PACKAGE_SNMP_UTILS - prompt "snmp-utils...................... SNMP client utilities" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBNETSNMP - help - Simple Network Management Protocol (SNMP) is a widely used - protocol for monitoring the health and welfare of network - equipment (eg. routers), computer equipment and even devices - like UPSs. Net-SNMP is a suite of applications used to implement - SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6. - - http://www.net-snmp.org/ - - This package contains the SNMP client utilities. - -config BR2_PACKAGE_SNMPD - prompt "snmpd............................. SNMP agent" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_NET_SNMP - select BR2_PACKAGE_LIBNETSNMP - help - Simple Network Management Protocol (SNMP) is a widely used - protocol for monitoring the health and welfare of network - equipment (eg. routers), computer equipment and even devices - like UPSs. Net-SNMP is a suite of applications used to implement - SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6. - - http://www.net-snmp.org/ - - This package contains the SNMP agent, dynamically linked. - -config BR2_PACKAGE_SNMPD_STATIC - prompt "snmpd-static...................... SNMP agent (statically linked)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_NET_SNMP - select BR2_PACKAGE_LIBELF - help - Simple Network Management Protocol (SNMP) is a widely used - protocol for monitoring the health and welfare of network - equipment (eg. routers), computer equipment and even devices - like UPSs. Net-SNMP is a suite of applications used to implement - SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6. - - http://www.net-snmp.org/ - - This package contains the SNMP agent, statically linked. - -endmenu diff --git a/openwrt/package/net-snmp/Makefile b/openwrt/package/net-snmp/Makefile deleted file mode 100644 index 25a1cc6d1b3..00000000000 --- a/openwrt/package/net-snmp/Makefile +++ /dev/null @@ -1,205 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=net-snmp -PKG_VERSION:=5.1.2 -PKG_RELEASE:=2.1 -PKG_MD5SUM:=8080555ab3f90011f25d5122042d9a8d - -PKG_SOURCE_URL:=@SF/net-snmp -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -SNMP_MIB_MODULES_INCLUDED = \ - host/hr_device \ - host/hr_disk \ - host/hr_filesys \ - host/hr_network \ - host/hr_partition \ - host/hr_proc \ - host/hr_storage \ - host/hr_system \ - mibII/at \ - mibII/icmp \ - mibII/interfaces \ - mibII/ip \ - mibII/snmp_mib \ - mibII/sysORTable \ - mibII/system_mib \ - mibII/tcp \ - mibII/udp \ - mibII/vacm_context \ - mibII/vacm_vars \ - snmpv3/snmpEngine \ - snmpv3/snmpMPDStats \ - snmpv3/usmStats \ - snmpv3/usmUser \ - snmpv3mibs \ - tunnel \ - ucd-snmp/disk \ - ucd-snmp/dlmod \ - ucd-snmp/extensible \ - ucd-snmp/loadave \ - ucd-snmp/memory \ - ucd-snmp/pass \ - ucd-snmp/proc \ - ucd-snmp/vmstat \ - util_funcs \ - utilities/execute \ - -SNMP_MIB_MODULES_EXCLUDED = \ - agent_mibs \ - agentx \ - host \ - ieee802dot11 \ - mibII \ - notification \ - snmpv3mibs \ - target \ - ucd_snmp \ - utilities \ - -SNMP_TRANSPORTS_INCLUDED = Callback UDP - -SNMP_TRANSPORTS_EXCLUDED = TCP TCPv6 UDPv6 Unix - -PKG_CONFIGURE_OPTIONS = \ - --enable-shared \ - --enable-static \ - --with-endianness=little \ - --with-logfile=/var/log/snmpd.log \ - --with-persistent-directory=/usr/lib/snmp/ \ - --with-default-snmp-version=1 \ - --with-sys-contact=root@localhost \ - --with-sys-location=Unknown \ - --enable-applications \ - --disable-debugging \ - --disable-ipv6 \ - --disable-manuals \ - --disable-mib-loading \ - --disable-mibs \ - --disable-scripts \ - --with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \ - --with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \ - --with-out-transports="$(SNMP_TRANSPORTS_EXCLUDED)" \ - --with-transports="$(SNMP_TRANSPORTS_INCLUDED)" \ - --without-opaque-special-types \ - --without-openssl \ - --without-libwrap \ - --without-rpm \ - --without-zlib \ - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBNETSNMP,libnetsnmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNMPD,snmpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNMPD_STATIC,snmpd-static,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNMP_UTILS,snmp-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - ( cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_header_pcap_h=no \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - $(PKG_CONFIGURE_OPTIONS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - all install - ( cd $(PKG_INSTALL_DIR); mv ./usr/sbin/snmpd ./usr/sbin/snmpd-shared; ) -ifneq ($(BR2_PACKAGE_SNMPD_STATIC),) - ( cd $(PKG_BUILD_DIR); rm -f agent/snmpd; ) - $(MAKE) -C $(PKG_BUILD_DIR) \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -static" \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - all install - ( cd $(PKG_INSTALL_DIR); mv ./usr/sbin/snmpd ./usr/sbin/snmpd-static; ) -endif - touch $@ - -$(IPKG_LIBNETSNMP): - install -d -m0755 $(IDIR_LIBNETSNMP)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(IDIR_LIBNETSNMP)/usr/lib/ - $(RSTRIP) $(IDIR_LIBNETSNMP) - $(IPKG_BUILD) $(IDIR_LIBNETSNMP) $(PACKAGE_DIR) - -$(IPKG_SNMPD): - install -d -m0755 $(IDIR_SNMPD)/etc/snmp - install -m0644 ./files/snmpd.conf $(IDIR_SNMPD)/etc/snmp/snmpd.conf - install -d -m0755 $(IDIR_SNMPD)/etc/default - install -m0644 ./files/snmpd.default $(IDIR_SNMPD)/etc/default/snmpd - install -d -m0755 $(IDIR_SNMPD)/etc/init.d - install -m0755 ./files/snmpd.init $(IDIR_SNMPD)/etc/init.d/snmpd - install -d -m0755 $(IDIR_SNMPD)/usr/sbin - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/snmpd-shared $(IDIR_SNMPD)/usr/sbin/snmpd - $(RSTRIP) $(IDIR_SNMPD) - $(IPKG_BUILD) $(IDIR_SNMPD) $(PACKAGE_DIR) - -$(IPKG_SNMPD_STATIC): - install -d -m0755 $(IDIR_SNMPD_STATIC)/etc/snmp - install -m0644 ./files/snmpd.conf $(IDIR_SNMPD_STATIC)/etc/snmp/snmpd.conf - install -d -m0755 $(IDIR_SNMPD_STATIC)/etc/default - install -m0644 ./files/snmpd.default $(IDIR_SNMPD_STATIC)/etc/default/snmpd - install -d -m0755 $(IDIR_SNMPD_STATIC)/etc/init.d - install -m0755 ./files/snmpd.init $(IDIR_SNMPD_STATIC)/etc/init.d/snmpd - install -d -m0755 $(IDIR_SNMPD_STATIC)/usr/sbin - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/snmpd-static $(IDIR_SNMPD_STATIC)/usr/sbin/snmpd - $(RSTRIP) $(IDIR_SNMPD_STATIC) - $(IPKG_BUILD) $(IDIR_SNMPD_STATIC) $(PACKAGE_DIR) - -$(IPKG_SNMP_UTILS): - install -d -m0755 $(IDIR_SNMP_UTILS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(IDIR_SNMP_UTILS)/usr/bin/ - $(RSTRIP) $(IDIR_SNMP_UTILS) - $(IPKG_BUILD) $(IDIR_SNMP_UTILS) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libnetsnmp.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/net-snmp $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libnetsnmp.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/net-snmp-config \ - $(STAGING_DIR)/usr/include/net-snmp \ - $(STAGING_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/net-snmp/files/snmpd.conf b/openwrt/package/net-snmp/files/snmpd.conf deleted file mode 100644 index f6e872ab648..00000000000 --- a/openwrt/package/net-snmp/files/snmpd.conf +++ /dev/null @@ -1,14 +0,0 @@ -com2sec ro default public -com2sec rw localhost private - -group public v1 ro -group public v2c ro -group public usm ro -group private v1 rw -group private v2c rw -group private usm rw - -view all included .1 - -access public "" any noauth exact all none none -access private "" any noauth exact all all all diff --git a/openwrt/package/net-snmp/files/snmpd.default b/openwrt/package/net-snmp/files/snmpd.default deleted file mode 100644 index 758c8e44fe9..00000000000 --- a/openwrt/package/net-snmp/files/snmpd.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid" diff --git a/openwrt/package/net-snmp/files/snmpd.init b/openwrt/package/net-snmp/files/snmpd.init deleted file mode 100644 index 46b429760bf..00000000000 --- a/openwrt/package/net-snmp/files/snmpd.init +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/snmpd -LIB_D=/var/lib/snmp -LOG_D=/var/log -RUN_D=/var/run -PID_F=$RUN_D/snmpd.pid - -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $LIB_D ] || mkdir -p $LIB_D - [ -d $LOG_D ] || mkdir -p $LOG_D - [ -d $RUN_D ] || mkdir -p $RUN_D - snmpd $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac -exit $? diff --git a/openwrt/package/net-snmp/ipkg/libnetsnmp.control b/openwrt/package/net-snmp/ipkg/libnetsnmp.control deleted file mode 100644 index 7a28ef887c1..00000000000 --- a/openwrt/package/net-snmp/ipkg/libnetsnmp.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libnetsnmp -Priority: optional -Section: libs -Description: SNMP shared libraries diff --git a/openwrt/package/net-snmp/ipkg/snmp-utils.control b/openwrt/package/net-snmp/ipkg/snmp-utils.control deleted file mode 100644 index 42d9251c8a3..00000000000 --- a/openwrt/package/net-snmp/ipkg/snmp-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: snmp-utils -Priority: optional -Section: admin -Description: SNMP client utilities -Depends: libnetsnmp, libelf diff --git a/openwrt/package/net-snmp/ipkg/snmpd-static.conffiles b/openwrt/package/net-snmp/ipkg/snmpd-static.conffiles deleted file mode 100644 index 2864cc903ae..00000000000 --- a/openwrt/package/net-snmp/ipkg/snmpd-static.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/default/snmpd -/etc/snmp/snmpd.conf diff --git a/openwrt/package/net-snmp/ipkg/snmpd-static.control b/openwrt/package/net-snmp/ipkg/snmpd-static.control deleted file mode 100644 index 9281441ae47..00000000000 --- a/openwrt/package/net-snmp/ipkg/snmpd-static.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: snmpd-static -Priority: optional -Section: admin -Description: SNMP agent -Depends: libelf diff --git a/openwrt/package/net-snmp/ipkg/snmpd.conffiles b/openwrt/package/net-snmp/ipkg/snmpd.conffiles deleted file mode 100644 index 2864cc903ae..00000000000 --- a/openwrt/package/net-snmp/ipkg/snmpd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/default/snmpd -/etc/snmp/snmpd.conf diff --git a/openwrt/package/net-snmp/ipkg/snmpd.control b/openwrt/package/net-snmp/ipkg/snmpd.control deleted file mode 100644 index 986b19631b3..00000000000 --- a/openwrt/package/net-snmp/ipkg/snmpd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: snmpd -Priority: optional -Section: admin -Description: SNMP agent -Depends: libnetsnmp, libelf diff --git a/openwrt/package/net-snmp/patches/500-debian-subset-5.1.2-6.1.patch b/openwrt/package/net-snmp/patches/500-debian-subset-5.1.2-6.1.patch deleted file mode 100644 index fd99ed745cf..00000000000 --- a/openwrt/package/net-snmp/patches/500-debian-subset-5.1.2-6.1.patch +++ /dev/null @@ -1,7282 +0,0 @@ -diff -ruN net-snmp-5.1.2-orig/EXAMPLE-trap.conf net-snmp-5.1.2-5/EXAMPLE-trap.conf ---- net-snmp-5.1.2-orig/EXAMPLE-trap.conf 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/EXAMPLE-trap.conf 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,18 @@ -+############################################################################### -+# -+# EXAMPLE.conf: -+# An example configuration file for configuring the ucd-snmp snmptrapd agent. -+# -+############################################################################### -+# -+# This file is intended to only be an example. If, however, you want -+# to use it, it should be placed in /etc/snmp/snmptrapd.conf. -+# When the snmptrapd agent starts up, this is where it will look for it. -+# -+# All lines beginning with a '#' are comments and are intended for you -+# to read. All other lines are configuration commands for the agent. -+ -+# -+# PLEASE: read the snmptrapd.conf(5) manual page as well! -+# -+ -diff -ruN net-snmp-5.1.2-orig/EXAMPLE.conf.def net-snmp-5.1.2-5/EXAMPLE.conf.def ---- net-snmp-5.1.2-orig/EXAMPLE.conf.def 2003-02-25 15:04:06.000000000 +0100 -+++ net-snmp-5.1.2-5/EXAMPLE.conf.def 2005-03-13 16:17:21.000000000 +0100 -@@ -6,7 +6,7 @@ - ############################################################################### - # - # This file is intended to only be an example. If, however, you want --# to use it, it should be placed in SYSCONFDIR/share/snmp/snmpd.conf. -+# to use it, it should be placed in /etc/snmp/snmpd.conf. - # When the snmpd agent starts up, this is where it will look for it. - # - # You might be interested in generating your own snmpd.conf file using -@@ -58,31 +58,37 @@ - # from): - - # sec.name source community --com2sec local localhost COMMUNITY --com2sec mynetwork NETWORK/24 COMMUNITY -+com2sec paranoid default public -+#com2sec readonly default public -+#com2sec readwrite default private - - #### - # Second, map the security names into group names: - - # sec.model sec.name --group MyRWGroup v1 local --group MyRWGroup v2c local --group MyRWGroup usm local --group MyROGroup v1 mynetwork --group MyROGroup v2c mynetwork --group MyROGroup usm mynetwork -+group MyROSystem v1 paranoid -+group MyROSystem v2c paranoid -+group MyROSystem usm paranoid -+group MyROGroup v1 readonly -+group MyROGroup v2c readonly -+group MyROGroup usm readonly -+group MyRWGroup v1 readwrite -+group MyRWGroup v2c readwrite -+group MyRWGroup usm readwrite - - #### - # Third, create a view for us to let the groups have rights to: - - # incl/excl subtree mask - view all included .1 80 -+view system included .iso.org.dod.internet.mgmt.mib-2.system - - #### - # Finally, grant the 2 groups access to the 1 view with different - # write permissions: - - # context sec.model sec.level match read write notif -+access MyROSystem "" any noauth exact system none none - access MyROGroup "" any noauth exact all none none - access MyRWGroup "" any noauth exact all all none - -@@ -100,8 +106,8 @@ - # value of an object whose value is given here will fail with an error - # status of notWritable. - --syslocation Right here, right now. --syscontact Me -+syslocation Unknown (configure /etc/snmp/snmpd.local.conf) -+syscontact Root (configure /etc/snmp/snmpd.local.conf) - - # Example output of snmpwalk: - # % snmpwalk -v 1 -c public localhost system -@@ -135,13 +141,13 @@ - # - - # Make sure mountd is running --proc mountd -+#proc mountd - - # Make sure there are no more than 4 ntalkds running, but 0 is ok too. --proc ntalkd 4 -+#proc ntalkd 4 - - # Make sure at least one sendmail, but less than or equal to 10 are running. --proc sendmail 10 1 -+#proc sendmail 10 1 - - # A snmpwalk of the prTable would look something like this: - # -@@ -199,7 +205,7 @@ - # ARGS: optional arguments to be passed to the program - - # a simple hello world --exec echotest /bin/echo hello world -+#exec echotest /bin/echo hello world - - # Run a shell script containing: - # -@@ -250,7 +256,7 @@ - - # Check the / partition and make sure it contains at least 10 megs. - --disk / 10000 -+#disk / 10000 - - # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.DISKMIBNUM - # enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0 -@@ -279,7 +285,7 @@ - # 15MAX: Similar, but for 15 min average. - - # Check for loads: --load 12 14 14 -+#load 12 14 14 - - # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.LOADAVEMIBNUM - # enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1 -@@ -365,7 +371,7 @@ - # (commented out here since it requires that you place the - # script in the right location. (its not installed by default)) - --# pass .EXTENSIBLEDOTMIB.255 /bin/sh PREFIX/local/passtest -+# pass .EXTENSIBLEDOTMIB.255 /bin/sh /usr/local/passtest - - # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.255 - # enterprises.ucdavis.255.1 = "life the universe and everything" -diff -ruN net-snmp-5.1.2-orig/FAQ net-snmp-5.1.2-5/FAQ ---- net-snmp-5.1.2-orig/FAQ 2004-08-07 10:02:45.000000000 +0200 -+++ net-snmp-5.1.2-5/FAQ 2005-03-13 16:17:21.000000000 +0100 -@@ -104,7 +104,7 @@ - I don't understand the new access control stuff - what does it mean? - How do I configure SNMPv3 users? - The 'createUser' line disappears when I start the agent. Why? -- What's the difference between /var/ucd-snmp and /usr/local/share/snmp? -+ What's the difference between /var/ucd-snmp and /usr/share/snmp? - My new agent is ignoring the old snmpd.conf file. Why? - Why am I getting "Connection refused"? - I'm getting errors about "bad security model" - why? -@@ -620,7 +620,7 @@ - - Firstly, - -- cp MY-MIB.txt /usr/local/share/snmp/mibs -+ cp MY-MIB.txt /usr/share/snmp/mibs - - or - -@@ -639,7 +639,7 @@ - Note that you need *both* steps. - The first command copies the file defining the new MIB to a - expected location for MIB files. This defaults to -- /usr/local/share/snmp/mibs (or PREFIX/share/snmp/mibs if the the -+ /usr/share/snmp/mibs (or PREFIX/share/snmp/mibs if the the - suite was installed into a different base location). Some - ready-packaged distributions (such as Linux RPM packages) may look - for MIB files in a different location, such as /etc/snmp/mibs - put -@@ -1111,7 +1111,7 @@ - If this is the case, then you can specify this interpreter - explicitly as part of the trap handle directive: - -- traphandle default /usr/bin/perl /usr/local/bin/log_it -+ traphandle default /usr/bin/perl /usr/bin/log_it - - Note that in this case, it's almost certain that you'll also - need to give the full path to the traphandle script (as shown) -@@ -1263,7 +1263,7 @@ - (if appropriate) the community string to use. - - Some of these (such as the MIB file location), might belong in a -- shared snmp.conf file (typically /usr/local/share/snmp/snmp.conf or -+ shared snmp.conf file (typically /usr/share/snmp/snmp.conf or - /etc/snmp/snmp.conf) to apply to all users of the system. Others - (particularly the SNMPv3 security settings), are more likely to refer - to a particular user, and should go in a personal snmp.conf file -@@ -1522,7 +1522,7 @@ - - - Alternatively, the tools may be looking in the wrong place. -- The default location for the mib files is /usr/local/share/snmp/mibs. -+ The default location for the mib files is /usr/share/snmp/mibs. - Again, this is set when the suite is first configured and compiled. - This can be changed using the environmental variable 'MIBDIRS' - or the snmp.conf directive 'mibdirs'. -@@ -2507,11 +2507,11 @@ - - - --What's the difference between /var/ucd-snmp and /usr/local/share/snmp? -+What's the difference between /var/ucd-snmp and /usr/share/snmp? - --------------------------------------------------------------------- - - Most "static" agent configuration should go in the traditional location -- (typically /usr/local/share/snmp/snmpd.conf or /etc/snmp). The -+ (typically /usr/share/snmp/snmpd.conf or /etc/snmp). The - /var/ucd-snmp (or /var/net-snmp) location is used for information set during - the running of the agent, which needs to be persistent between one run of - the agent and the next. -@@ -2531,7 +2531,7 @@ - distribution), with the current release installed from the source. - - The default location for this file with the basic distribution is -- /usr/local/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf). -+ /usr/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf). - Ready-installed versions often look for the file as /etc/snmpd.conf, - or /etc/snmp/snmpd.conf. Try moving the old config file to the new - location, and restart the agent. -diff -ruN net-snmp-5.1.2-orig/Makefile.in net-snmp-5.1.2-5/Makefile.in ---- net-snmp-5.1.2-orig/Makefile.in 2004-08-04 14:48:14.000000000 +0200 -+++ net-snmp-5.1.2-5/Makefile.in 2005-03-13 16:17:21.000000000 +0100 -@@ -163,6 +163,11 @@ - ( cd perl ; $(MAKE) clean ) ; \ - fi - -+perlrealclean: -+ @if test -f perl/Makefile; then \ -+ ( cd perl ; $(MAKE) realclean ) ; \ -+ fi -+ - # - # make distclean completely removes all traces of building including - # any files generated by configure itself. -diff -ruN net-snmp-5.1.2-orig/Makefile.rules net-snmp-5.1.2-5/Makefile.rules ---- net-snmp-5.1.2-orig/Makefile.rules 2004-02-13 23:42:28.000000000 +0100 -+++ net-snmp-5.1.2-5/Makefile.rules 2005-03-13 16:17:21.000000000 +0100 -@@ -301,7 +301,7 @@ - # cleaning targets - # - clean: cleansubdirs $(OTHERCLEANTODOS) -- rm -f core ${OBJS} ${LOBJS} $(STANDARDCLEANTARGETS) $(OTHERCLEANTARGETS) -+ rm -f -- core ${OBJS} ${LOBJS} $(STANDARDCLEANTARGETS) $(OTHERCLEANTARGETS) - rm -rf .libs - - cleansubdirs: -diff -ruN net-snmp-5.1.2-orig/Makefile.top net-snmp-5.1.2-5/Makefile.top ---- net-snmp-5.1.2-orig/Makefile.top 2004-08-07 09:29:36.000000000 +0200 -+++ net-snmp-5.1.2-5/Makefile.top 2005-03-13 16:17:21.000000000 +0100 -@@ -27,6 +27,7 @@ - snmplibdir = $(datadir)/snmp - mibdir = $(snmplibdir)/mibs - persistentdir = @PERSISTENT_DIRECTORY@ -+sysconfdir = @sysconfdir@ - INSTALL_PREFIX = @INSTALL_PREFIX@ - - # -diff -ruN net-snmp-5.1.2-orig/acconfig.h net-snmp-5.1.2-5/acconfig.h ---- net-snmp-5.1.2-orig/acconfig.h 2004-06-28 20:54:17.000000000 +0200 -+++ net-snmp-5.1.2-5/acconfig.h 2005-03-13 16:17:21.000000000 +0100 -@@ -560,6 +560,9 @@ - /* define if you have getservbyname */ - #undef HAVE_GETSERVBYNAME - -+/* define if you have dlopen */ -+#undef HAVE_DLOPEN -+ - /* printing system */ - #undef HAVE_LPSTAT - #undef LPSTAT_PATH -diff -ruN net-snmp-5.1.2-orig/acinclude.m4 net-snmp-5.1.2-5/acinclude.m4 ---- net-snmp-5.1.2-orig/acinclude.m4 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/acinclude.m4 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,193 @@ -+dnl @synopsis AC_PROMPT_USER_NO_DEFINE(VARIABLENAME,QUESTION,[DEFAULT]) -+dnl -+dnl Asks a QUESTION and puts the results in VARIABLENAME with an optional -+dnl DEFAULT value if the user merely hits return. -+dnl -+dnl @version 1.15 -+dnl @author Wes Hardaker -+dnl -+AC_DEFUN([AC_PROMPT_USER_NO_DEFINE], -+dnl changequote(<<, >>) dnl -+dnl << -+[ -+if test "x$defaults" = "xno"; then -+echo $ac_n "$2 ($3): $ac_c" -+read tmpinput -+if test "$tmpinput" = "" -a "$3" != ""; then -+ tmpinput="$3" -+fi -+eval $1=\"$tmpinput\" -+else -+tmpinput="$3" -+eval $1=\"$tmpinput\" -+fi -+] -+dnl >> -+dnl changequote([, ]) -+) dnl done AC_PROMPT_USER -+ -+dnl @synopsis AC_PROMPT_USER(VARIABLENAME,QUESTION,[DEFAULT],QUOTED) -+dnl -+dnl Asks a QUESTION and puts the results in VARIABLENAME with an optional -+dnl DEFAULT value if the user merely hits return. Also calls -+dnl AC_DEFINE_UNQUOTED() on the VARIABLENAME for VARIABLENAMEs that should -+dnl be entered into the config.h file as well. If QUOTED is "quoted" then -+dnl the result will be defined within quotes. -+dnl -+dnl @version 1.15 -+dnl @author Wes Hardaker -+dnl -+AC_DEFUN([AC_PROMPT_USER], -+[ -+MSG_CHECK=`echo "$2" | tail -1` -+AC_CACHE_CHECK($MSG_CHECK, ac_cv_user_prompt_$1, -+[echo "" >&AC_FD_MSG -+AC_PROMPT_USER_NO_DEFINE($1,[$2],$3) -+eval ac_cv_user_prompt_$1=\$$1 -+echo $ac_n "setting $MSG_CHECK to... $ac_c" >&AC_FD_MSG -+]) -+if test "$ac_cv_user_prompt_$1" != "none"; then -+ if test "x$4" = "xquoted" -o "x$4" = "xQUOTED"; then -+ AC_DEFINE_UNQUOTED($1,"$ac_cv_user_prompt_$1") -+ else -+ AC_DEFINE_UNQUOTED($1,$ac_cv_user_prompt_$1) -+ fi -+fi -+]) dnl -+ -+dnl @synopsis AC_CHECK_STRUCT_FOR(INCLUDES,STRUCT,MEMBER,DEFINE,[no]) -+dnl -+dnl Checks STRUCT for MEMBER and defines DEFINE if found. -+dnl -+dnl @version 1.15 -+dnl @author Wes Hardaker -+dnl -+AC_DEFUN(AC_CHECK_STRUCT_FOR,[ -+ -+ac_safe_struct=`echo "$2" | sed 'y%./+-%__p_%'` -+ac_safe_member=`echo "$3" | sed 'y%./+-%__p_%'` -+ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}" -+changequote(, )dnl -+ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -+changequote([, ])dnl -+ -+AC_MSG_CHECKING([for $2.$3]) -+AC_CACHE_VAL($ac_safe_all, -+[ -+if test "x$4" = "x"; then -+ defineit="= 0" -+elif test "x$4" = "xno"; then -+ defineit="" -+else -+ defineit="$4" -+fi -+AC_TRY_COMPILE([ -+$1 -+],[ -+struct $2 testit; -+testit.$3 $defineit; -+], eval "${ac_safe_all}=yes", eval "${ac_safe_all}=no" ) -+]) -+ -+if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then -+ AC_MSG_RESULT(yes) -+ AC_DEFINE_UNQUOTED($ac_uc_define) -+else -+ AC_MSG_RESULT(no) -+fi -+ -+]) -+ -+dnl AC_CHECK_IFNET_FOR(SUBSTRUCT,[no]) -+AC_DEFUN(AC_CHECK_IFNET_FOR,[ -+dnl check for $1 in struct ifnet -+AC_CHECK_STRUCT_FOR([ -+#ifdef IFNET_NEEDS_KERNEL -+#define _KERNEL 1 -+#endif -+#include -+#include -+#ifdef HAVE_SYS_TIME_H -+#include -+#endif -+#include -+#ifdef HAVE_NET_IF_VAR_H -+#include -+#endif -+#ifdef HAVE_SYS_QUEUE_H -+#include -+#endif -+#ifdef linux -+struct ifnet { -+ char *if_name; /* name, e.g. "en" or "lo" */ -+ short if_unit; /* sub-unit for lower level driver */ -+ short if_mtu; /* maximum transmission unit */ -+ short if_flags; /* up/down, broadcast, etc. */ -+ int if_metric; /* routing metric (external only) */ -+ char if_hwaddr [6]; /* ethernet address */ -+ int if_type; /* interface type: 1=generic, -+ 28=slip, ether=6, loopback=24 */ -+ int if_speed; /* interface speed: in bits/sec */ -+ -+ struct sockaddr if_addr; /* interface's address */ -+ struct sockaddr ifu_broadaddr; /* broadcast address */ -+ struct sockaddr ia_subnetmask; /* interface's mask */ -+ -+ struct ifqueue { -+ int ifq_len; -+ int ifq_drops; -+ } if_snd; /* output queue */ -+ int if_ibytes; /* octets received on interface */ -+ int if_ipackets; /* packets received on interface */ -+ int if_ierrors; /* input errors on interface */ -+ int if_iqdrops; /* input queue overruns */ -+ int if_obytes; /* octets sent on interface */ -+ int if_opackets; /* packets sent on interface */ -+ int if_oerrors; /* output errors on interface */ -+ int if_collisions; /* collisions on csma interfaces */ -+/* end statistics */ -+ struct ifnet *if_next; -+}; -+#endif -+], ifnet, $1, $2) -+]) -+ -+dnl -+dnl Add a search path to the LIBS and CFLAGS variables -+dnl -+AC_DEFUN(AC_ADD_SEARCH_PATH,[ -+ if test "x$1" != x -a -d $1; then -+ if test -d $1/lib; then -+ LDFLAGS="-L$1/lib $LDFLAGS" -+ fi -+ if test -d $1/include; then -+ CPPFLAGS="-I$1/include $CPPFLAGS" -+ fi -+ fi -+]) -+ -+dnl -+dnl Store information for displaying later. -+dnl -+AC_DEFUN(AC_MSG_CACHE_INIT,[ -+ rm -f configure-summary -+]) -+ -+AC_DEFUN(AC_MSG_CACHE_ADD,[ -+ cat >> configure-summary << EOF -+ $1 -+EOF -+]) -+ -+AC_DEFUN(AC_MSG_CACHE_DISPLAY,[ -+ echo "" -+ echo "---------------------------------------------------------" -+ echo " Net-SNMP configuration summary:" -+ echo "---------------------------------------------------------" -+ echo "" -+ cat configure-summary -+ echo "" -+ echo "---------------------------------------------------------" -+ echo "" -+]) -+ -diff -ruN net-snmp-5.1.2-orig/agent/Makefile.in net-snmp-5.1.2-5/agent/Makefile.in ---- net-snmp-5.1.2-orig/agent/Makefile.in 2003-10-14 15:30:48.000000000 +0200 -+++ net-snmp-5.1.2-5/agent/Makefile.in 2005-03-13 16:17:21.000000000 +0100 -@@ -82,7 +82,7 @@ - # libnetsnmpagent objects - LIBAGENTOBJS=snmp_agent.o snmp_vars.o agent_read_config.o \ - agent_registry.o agent_index.o agent_trap.o kernel.o \ -- agent_handler.o @OTHERAGENTLIBOBJS@ -+ agent_handler.o @OTHERAGENTLIBOBJS@ @WRAPLIBS@ - LLIBAGENTOBJS=snmp_agent.lo snmp_vars.lo agent_read_config.lo \ - agent_registry.lo agent_index.lo agent_trap.lo kernel.lo \ - agent_handler.lo @OTHERAGENTLIBLOBJS@ -@@ -120,11 +120,11 @@ - - - libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) -- $(LIB_LD_CMD) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS} $(LIB_LD_LIBS) -+ $(LIB_LD_CMD) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS} $(LIB_LD_LIBS) $(AGENT_RELINK_LIBS) - $(RANLIB) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) - - libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} -- $(LIB_LD_CMD) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS} $(LIB_LD_LIBS) -+ $(LIB_LD_CMD) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS} $(LIB_LD_LIBS) $(MIBS_RELINK_LIBS) $(LIBSENSORS) - $(RANLIB) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) - - embedperlinstall: -diff -ruN net-snmp-5.1.2-orig/agent/helpers/Makefile.in net-snmp-5.1.2-5/agent/helpers/Makefile.in ---- net-snmp-5.1.2-orig/agent/helpers/Makefile.in 2004-03-01 06:26:12.000000000 +0100 -+++ net-snmp-5.1.2-5/agent/helpers/Makefile.in 2005-03-13 16:17:21.000000000 +0100 -@@ -68,5 +68,5 @@ - all: standardall - - libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION): ${LOBJS} -- $(LIB_LD_CMD) libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION) ${LOBJS} $(LIB_LD_LIBS) -+ $(LIB_LD_CMD) libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION) ${LOBJS} $(LIB_LD_LIBS) $(HELPERS_RELINK_LIBS) - $(RANLIB) libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION) -diff -ruN net-snmp-5.1.2-orig/agent/mibgroup/agentx/protocol.h net-snmp-5.1.2-5/agent/mibgroup/agentx/protocol.h ---- net-snmp-5.1.2-orig/agent/mibgroup/agentx/protocol.h 2002-04-20 09:30:01.000000000 +0200 -+++ net-snmp-5.1.2-5/agent/mibgroup/agentx/protocol.h 2005-03-13 16:17:21.000000000 +0100 -@@ -10,7 +10,7 @@ - */ - - #define AGENTX_PORT 705 --#define AGENTX_SOCKET "/var/agentx/master" -+#define AGENTX_SOCKET "/var/run/agentx" - - /* - * AgentX versions -diff -ruN net-snmp-5.1.2-orig/agent/mibgroup/mibII/interfaces.c net-snmp-5.1.2-5/agent/mibgroup/mibII/interfaces.c ---- net-snmp-5.1.2-orig/agent/mibgroup/mibII/interfaces.c 2004-07-23 02:55:41.000000000 +0200 -+++ net-snmp-5.1.2-5/agent/mibgroup/mibII/interfaces.c 2005-03-13 16:17:21.000000000 +0100 -@@ -1512,14 +1512,28 @@ - struct ifreq ifrq; - struct ifnet **ifnetaddr_ptr; - FILE *devin; -- unsigned long rec_pkt, rec_oct, rec_err, rec_drop; -- unsigned long snd_pkt, snd_oct, snd_err, snd_drop, coll; - int i, fd; - conf_if_list *if_ptr; -+#ifdef SCNuMAX -+ uintmax_t rec_pkt, rec_oct, rec_err, rec_drop, rec_mcast; -+ uintmax_t snd_pkt, snd_oct, snd_err, snd_drop, coll; -+ const char *scan_line_2_2 = -+ "%" SCNuMAX " %" SCNuMAX " %" SCNuMAX " %" SCNuMAX -+ " %*" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX -+ " %" SCNuMAX " %" SCNuMAX " %" SCNuMAX " %" SCNuMAX -+ " %*" SCNuMAX " %" SCNuMAX; -+ const char *scan_line_2_0 = -+ "%" SCNuMAX " %" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX -+ " %*" SCNuMAX " %" SCNuMAX " %" SCNuMAX " %*" SCNuMAX -+ " %*" SCNuMAX " %" SCNuMAX; -+#else -+ unsigned long rec_pkt, rec_oct, rec_err, rec_drop; -+ unsigned long snd_pkt, snd_oct, snd_err, snd_drop, coll; - const char *scan_line_2_2 = - "%lu %lu %lu %lu %*lu %*lu %*lu %*lu %lu %lu %lu %lu %*lu %lu"; - const char *scan_line_2_0 = - "%lu %lu %*lu %*lu %*lu %lu %lu %*lu %*lu %lu"; -+#endif - const char *scan_line_to_use; - struct timeval et; /* elapsed time */ - -@@ -1598,6 +1612,10 @@ - struct ifnet *nnew; - char *stats, *ifstart = line; - -+ /* Ignore interfaces with no statistics. */ -+ if (strstr(line, "No statistics available.")) -+ continue; -+ - if (line[strlen(line) - 1] == '\n') - line[strlen(line) - 1] = '\0'; - -@@ -1631,7 +1649,7 @@ - &coll) != 5)) { - if ((scan_line_to_use == scan_line_2_2) - && !strstr(line, "No statistics available")) -- snmp_log(LOG_ERR, -+ snmp_log(LOG_DEBUG, - "/proc/net/dev data format error, line ==|%s|", - line); - continue; -diff -ruN net-snmp-5.1.2-orig/agent/mibgroup/smux/smux.c net-snmp-5.1.2-5/agent/mibgroup/smux/smux.c ---- net-snmp-5.1.2-orig/agent/mibgroup/smux/smux.c 2004-02-04 12:25:20.000000000 +0100 -+++ net-snmp-5.1.2-5/agent/mibgroup/smux/smux.c 2005-03-13 16:17:21.000000000 +0100 -@@ -819,14 +819,14 @@ - passwd[string_len] = '\0'; - if (!smux_auth_peer(oid_name, oid_name_len, passwd, fd)) { - snmp_log(LOG_WARNING, -- "refused smux peer: oid %s, password %s, descr %s\n", -- oid_print, passwd, descr); -+ "refused smux peer: oid %s, descr %s\n", -+ oid_print, descr); - *fail = TRUE; - return ptr; - } - snmp_log(LOG_INFO, -- "accepted smux peer: oid %s, password %s, descr %s\n", -- oid_print, passwd, descr); -+ "accepted smux peer: oid %s, descr %s\n", -+ oid_print, descr); - *fail = FALSE; - return ptr; - } -diff -ruN net-snmp-5.1.2-orig/apps/Makefile.in net-snmp-5.1.2-5/apps/Makefile.in ---- net-snmp-5.1.2-orig/apps/Makefile.in 2004-03-09 16:51:28.000000000 +0100 -+++ net-snmp-5.1.2-5/apps/Makefile.in 2005-03-13 16:17:21.000000000 +0100 -@@ -129,7 +129,7 @@ - $(LINK) -o $@ snmpdf.$(OSUFFIX) $(LOCAL_LIBS) ${LDFLAGS} ${LIBS} - - libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION): $(LLIBTRAPD_OBJS) -- $(LIB_LD_CMD) libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBTRAPD_OBJS} $(LIB_LD_LIBS) -+ $(LIB_LD_CMD) libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBTRAPD_OBJS} $(LIB_LD_LIBS) $(TRAPD_RELINK_LIBS) - $(RANLIB) libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION) - - snmpinforminstall: -diff -ruN net-snmp-5.1.2-orig/apps/snmpnetstat/if.c net-snmp-5.1.2-5/apps/snmpnetstat/if.c ---- net-snmp-5.1.2-orig/apps/snmpnetstat/if.c 2002-04-20 09:30:10.000000000 +0200 -+++ net-snmp-5.1.2-5/apps/snmpnetstat/if.c 2005-03-13 16:17:21.000000000 +0100 -@@ -300,8 +300,9 @@ - case IFINDEX: - ifindex = *var->val.integer; - for (cur_if = if_table; -- cur_if->ifindex != ifindex && cur_if->ifindex != 0; -- cur_if++); -+ cur_if < (if_table + cfg_nnets) && -+ cur_if->ifindex != ifindex && -+ cur_if->ifindex != 0; cur_if++); - if (cur_if >= (if_table + cfg_nnets)) { - fprintf(stderr, - "Inconsistent reponse from server. Aborting\n"); -@@ -492,8 +493,14 @@ - case IPIFINDEX: - ifindex = *var->val.integer; - for (cur_if = if_table; -- cur_if->ifindex != ifindex && cur_if->ifindex != 0; -- cur_if++); -+ cur_if < (if_table + cfg_nnets) && -+ cur_if->ifindex != ifindex && -+ cur_if->ifindex != 0; cur_if++); -+ if (cur_if >= (if_table + cfg_nnets)) { -+ fprintf(stderr, -+ "Inconsistent reponse from server. Aborting.\n"); -+ exit(0); -+ } - cur_if->ifindex = ifindex; - break; - case IPADDR: -@@ -567,8 +574,14 @@ - case IFINDEX: - ifindex = *var->val.integer; - for (cur_if = if_table; -- cur_if->ifindex != ifindex && cur_if->ifindex != 0; -- cur_if++); -+ cur_if < (if_table + cfg_nnets) && -+ cur_if->ifindex != ifindex && -+ cur_if->ifindex != 0; cur_if++); -+ if (cur_if >= (if_table + cfg_nnets)) { -+ fprintf(stderr, -+ "Inconsistent reponse from server. Aborting.\n"); -+ exit(0); -+ } - cur_if->ifindex = ifindex; - break; - case INOCTETS: -diff -ruN net-snmp-5.1.2-orig/configure.in net-snmp-5.1.2-5/configure.in ---- net-snmp-5.1.2-orig/configure.in 2004-06-23 00:06:40.000000000 +0200 -+++ net-snmp-5.1.2-5/configure.in 2005-03-13 16:17:21.000000000 +0100 -@@ -161,6 +161,9 @@ - AC_DEFINE(SNMP_NO_DEBUGGING) - fi - -+AC_ARG_WITH(rpm, -+[ --without-rpm Don't use RPM even if available.]) -+ - AC_ARG_WITH(dmalloc, - [ --with-dmalloc=PATH Use dmalloc library (www.dmalloc.com)], - if test "x$withval" = "xyes"; then -@@ -1539,12 +1542,13 @@ - AC_CHECK_LIB(RSAglue, RSA_PKCS1_RSAref) - fi - -- AC_CHECK_LIB(crypto, EVP_md5) -+ AC_CHECK_LIB(crypto, EVP_md5, [CRYPTOLIBS=-lcrypto], , ) - AC_CHECK_FUNCS(AES_cfb128_encrypt) - fi - elif test "x$askedpkcs" = "xyes"; then - AC_CHECK_LIB(pkcs11, C_Initialize) - fi -+AC_SUBST(CRYPTOLIBS) - - # Check for libraries that the agent needs - # saving old libraries -@@ -1664,8 +1668,9 @@ - # Replace `main' with a function in -lkvm: - AC_CHECK_LIB(kvm, kvm_read) - # DYNAMIC MODULE SUPPORT --AC_CHECK_LIB(dl, dlopen) --AC_CHECK_FUNCS(dlopen) -+AC_CHECK_FUNC(dlopen, AC_DEFINE(HAVE_DLOPEN), -+ AC_CHECK_LIB(dl, dlopen, AC_DEFINE(HAVE_DLOPEN) -+ LIBS="${LIBS} -ldl")) - - AC_CHECK_FUNCS(kvm_openfiles nlist knlist kvm_getprocs) - echo "$with_mib_modules" | grep "ucd-snmp/diskio" >/dev/null -@@ -1979,7 +1984,7 @@ - - AC_MSG_RESULT([$ac_cv_type_ssize_t]) - if test $ac_cv_type_ssize_t = yes; then -- AC_DEFINE(HAVE_SSIZE_T) -+ AC_DEFINE(HAVE_SSIZE_T, 1, [Define if type ssize_t is available]) - fi - - # Check ps args -diff -ruN net-snmp-5.1.2-orig/debian/README.Debian net-snmp-5.1.2-5/debian/README.Debian -diff -ruN net-snmp-5.1.2-orig/debian/changelog net-snmp-5.1.2-5/debian/changelog -diff -ruN net-snmp-5.1.2-orig/debian/control net-snmp-5.1.2-5/debian/control -diff -ruN net-snmp-5.1.2-orig/debian/copyright net-snmp-5.1.2-5/debian/copyright -diff -ruN net-snmp-5.1.2-orig/debian/fixman net-snmp-5.1.2-5/debian/fixman -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp-base.dirs net-snmp-5.1.2-5/debian/libsnmp-base.dirs -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp-base.docs net-snmp-5.1.2-5/debian/libsnmp-base.docs -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp-base.files net-snmp-5.1.2-5/debian/libsnmp-base.files -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp-base.postrm net-snmp-5.1.2-5/debian/libsnmp-base.postrm -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp-base.prerm net-snmp-5.1.2-5/debian/libsnmp-base.prerm -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp-perl.docs net-snmp-5.1.2-5/debian/libsnmp-perl.docs -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp-perl.files net-snmp-5.1.2-5/debian/libsnmp-perl.files -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp5-dev.files net-snmp-5.1.2-5/debian/libsnmp5-dev.files -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp5-dev.manpages net-snmp-5.1.2-5/debian/libsnmp5-dev.manpages -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp5.dirs net-snmp-5.1.2-5/debian/libsnmp5.dirs -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp5.docs net-snmp-5.1.2-5/debian/libsnmp5.docs -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp5.files net-snmp-5.1.2-5/debian/libsnmp5.files -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp5.postinst net-snmp-5.1.2-5/debian/libsnmp5.postinst -diff -ruN net-snmp-5.1.2-orig/debian/libsnmp5.prerm net-snmp-5.1.2-5/debian/libsnmp5.prerm -diff -ruN net-snmp-5.1.2-orig/debian/manpages/encode_keychange.1 net-snmp-5.1.2-5/debian/manpages/encode_keychange.1 -diff -ruN net-snmp-5.1.2-orig/debian/manpages/net-snmp-config.1 net-snmp-5.1.2-5/debian/manpages/net-snmp-config.1 -diff -ruN net-snmp-5.1.2-orig/debian/manpages/snmpvacm.1 net-snmp-5.1.2-5/debian/manpages/snmpvacm.1 -diff -ruN net-snmp-5.1.2-orig/debian/manpages/tkmib.1 net-snmp-5.1.2-5/debian/manpages/tkmib.1 -diff -ruN net-snmp-5.1.2-orig/debian/rules net-snmp-5.1.2-5/debian/rules -diff -ruN net-snmp-5.1.2-orig/debian/snmp.files net-snmp-5.1.2-5/debian/snmp.files -diff -ruN net-snmp-5.1.2-orig/debian/snmp.manpages net-snmp-5.1.2-5/debian/snmp.manpages -diff -ruN net-snmp-5.1.2-orig/debian/snmp.preinst net-snmp-5.1.2-5/debian/snmp.preinst -diff -ruN net-snmp-5.1.2-orig/debian/snmpd.default net-snmp-5.1.2-5/debian/snmpd.default -diff -ruN net-snmp-5.1.2-orig/debian/snmpd.files net-snmp-5.1.2-5/debian/snmpd.files -diff -ruN net-snmp-5.1.2-orig/debian/snmpd.init net-snmp-5.1.2-5/debian/snmpd.init -diff -ruN net-snmp-5.1.2-orig/debian/snmpd.postinst net-snmp-5.1.2-5/debian/snmpd.postinst -diff -ruN net-snmp-5.1.2-orig/debian/snmpd.postrm net-snmp-5.1.2-5/debian/snmpd.postrm -diff -ruN net-snmp-5.1.2-orig/debian/tkmib.docs net-snmp-5.1.2-5/debian/tkmib.docs -diff -ruN net-snmp-5.1.2-orig/debian/tkmib.files net-snmp-5.1.2-5/debian/tkmib.files -diff -ruN net-snmp-5.1.2-orig/debian/tkmib.manpages net-snmp-5.1.2-5/debian/tkmib.manpages -diff -ruN net-snmp-5.1.2-orig/debian/watch net-snmp-5.1.2-5/debian/watch -diff -ruN net-snmp-5.1.2-orig/ipkg/libsnmp/CONTROL/control net-snmp-5.1.2-5/ipkg/libsnmp/CONTROL/control -diff -ruN net-snmp-5.1.2-orig/ipkg/libsnmp-dev/CONTROL/control net-snmp-5.1.2-5/ipkg/libsnmp-dev/CONTROL/control -diff -ruN net-snmp-5.1.2-orig/ipkg/rules net-snmp-5.1.2-5/ipkg/rules -diff -ruN net-snmp-5.1.2-orig/ipkg/snmp-utils/CONTROL/control net-snmp-5.1.2-5/ipkg/snmp-utils/CONTROL/control -diff -ruN net-snmp-5.1.2-orig/ipkg/snmpd/CONTROL/conffiles net-snmp-5.1.2-5/ipkg/snmpd/CONTROL/conffiles -diff -ruN net-snmp-5.1.2-orig/ipkg/snmpd/CONTROL/control net-snmp-5.1.2-5/ipkg/snmpd/CONTROL/control -diff -ruN net-snmp-5.1.2-orig/ipkg/snmpd/etc/default/snmpd net-snmp-5.1.2-5/ipkg/snmpd/etc/default/snmpd -diff -ruN net-snmp-5.1.2-orig/ipkg/snmpd/etc/init.d/snmpd net-snmp-5.1.2-5/ipkg/snmpd/etc/init.d/snmpd -diff -ruN net-snmp-5.1.2-orig/ipkg/snmpd/etc/snmp/snmpd.conf net-snmp-5.1.2-5/ipkg/snmpd/etc/snmp/snmpd.conf -diff -ruN net-snmp-5.1.2-orig/ipkg/snmpd-static/CONTROL/control net-snmp-5.1.2-5/ipkg/snmpd-static/CONTROL/control -diff -ruN net-snmp-5.1.2-orig/ipkg/version net-snmp-5.1.2-5/ipkg/version -diff -ruN net-snmp-5.1.2-orig/local/Makefile.in net-snmp-5.1.2-5/local/Makefile.in ---- net-snmp-5.1.2-orig/local/Makefile.in 2003-12-20 05:38:17.000000000 +0100 -+++ net-snmp-5.1.2-5/local/Makefile.in 2005-03-13 16:17:21.000000000 +0100 -@@ -58,7 +58,7 @@ - - mib2c.made: $(srcdir)/mib2c - if test "x$(PERLPROG)" != "x" ; then \ -- $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \ -+ $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%;s#/usr/local/share/snmp#$(snmplibdir)#;s#/usr/local/etc/snmp#$(SNMPCONFPATH)#;' ${srcdir}/mib2c > mib2c.made; \ - else \ - touch mib2c.made; \ - fi -diff -ruN net-snmp-5.1.2-orig/local/mib2c net-snmp-5.1.2-5/local/mib2c ---- net-snmp-5.1.2-orig/local/mib2c 2004-06-15 16:26:37.000000000 +0200 -+++ net-snmp-5.1.2-5/local/mib2c 2005-03-13 16:17:21.000000000 +0100 -@@ -56,7 +56,8 @@ - if($ENV{MIB2C_DIR}) { - push @def_search_dirs, $ENV{MIB2C_DIR}; - } --push @def_search_dirs, "/usr/local/share/snmp/"; -+push @def_search_dirs, "/etc/snmp/"; -+push @def_search_dirs, "/usr/share/snmp/"; - - - sub usage { -diff -ruN net-snmp-5.1.2-orig/man/mib2c.1.def net-snmp-5.1.2-5/man/mib2c.1.def ---- net-snmp-5.1.2-orig/man/mib2c.1.def 2003-10-02 20:04:19.000000000 +0200 -+++ net-snmp-5.1.2-5/man/mib2c.1.def 2005-03-13 16:17:21.000000000 +0100 -@@ -72,8 +72,9 @@ - .TP - .BI -c " CONFIGFILE" - Use CONFIGFILE when generating code. These files will be searched for --first in the current directory and then in the DATADIR directory --(which is where the default mib2c configuration files can be found). -+first in the current directory and then in /etc/snmp -+(which is where the default mib2c configuration files can be found) -+and finally in the DATADIR directory. - Running mib2c without the -c CONFIGFILE option will display - a description of the valid values for CONFIGFILE, that is, - the available config files, including new ones that you might -diff -ruN net-snmp-5.1.2-orig/man/mib_api.3.def net-snmp-5.1.2-5/man/mib_api.3.def ---- net-snmp-5.1.2-orig/man/mib_api.3.def 2004-04-15 00:41:32.000000000 +0200 -+++ net-snmp-5.1.2-5/man/mib_api.3.def 2005-03-13 16:17:21.000000000 +0100 -@@ -5,7 +5,7 @@ - add_module_replacement, - read_module, read_mib, read_all_mibs, - read_objid, read_module_node, --get_module_node, read_objid -+get_module_node - snmp_set_mib_warnings, snmp_set_save_descriptions, - shutdown_mib, - print_mib, -@@ -34,9 +34,9 @@ - .PP - .BI "void print_mib(FILE *" "fp" ); - .PP --.BI "int read_objid(char *" "input" ", oid *" "output" ", int *" "out_len" ); -+.BI "int read_objid(char *" "input" ", oid *" "output" ", size_t *" "out_len" ); - .br --.BI "int get_module_node(char *" "name" ", char *" "module" ", oid *" "objid" ", int *" "objidlen" ); -+.BI "int get_module_node(char *" "name" ", char *" "module" ", oid *" "objid" ", size_t *" "objidlen" ); - .PP - .BI "void print_variable(const oid *" "objid" ", size_t " "objidlen" ", struct variable_list *" "variable" ); - .br -diff -ruN net-snmp-5.1.2-orig/man/snmp_config.5.def net-snmp-5.1.2-5/man/snmp_config.5.def ---- net-snmp-5.1.2-orig/man/snmp_config.5.def 2003-12-10 11:41:41.000000000 +0100 -+++ net-snmp-5.1.2-5/man/snmp_config.5.def 2005-03-13 16:17:21.000000000 +0100 -@@ -11,7 +11,7 @@ - found and read from. By default, the applications look for - configuration files in the following 4 directories, in order: - SYSCONFDIR/snmp, --DATADIR/snmp, LIBDIR/snmp, and $HOME/.snmp. In each of these -+/etc/snmp, LIBDIR/snmp, and $HOME/.snmp. In each of these - directories, it looks for files with the extension of both - .IR conf " and " local.conf - (reading the second ones last). In this manner, there are -diff -ruN net-snmp-5.1.2-orig/man/snmp_trap_api.3.def net-snmp-5.1.2-5/man/snmp_trap_api.3.def ---- net-snmp-5.1.2-orig/man/snmp_trap_api.3.def 2003-09-29 04:58:18.000000000 +0200 -+++ net-snmp-5.1.2-5/man/snmp_trap_api.3.def 2005-03-13 16:17:21.000000000 +0100 -@@ -1,8 +1,7 @@ - .TH SNMP_TRAP_API 3 "7 Mar 2002" VVERSIONINFO "Net-SNMP" - .UC 5 - .SH NAME --send_easy_trap, send_trap_vars, send_v2trap - send TRAPs or INFORMs --from a Net-SNMP MIB module -+send_easy_trap, send_trap_vars, send_v2trap - send TRAPs or INFORMs from a Net-SNMP MIB module - .SH SYNOPSIS - .B #include - .PP -diff -ruN net-snmp-5.1.2-orig/mibs/BGP4-MIB.txt net-snmp-5.1.2-5/mibs/BGP4-MIB.txt ---- net-snmp-5.1.2-orig/mibs/BGP4-MIB.txt 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/mibs/BGP4-MIB.txt 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,929 @@ -+ BGP4-MIB DEFINITIONS ::= BEGIN -+ -+ IMPORTS -+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, -+ IpAddress, Integer32, Counter32, Gauge32, mib-2 -+ FROM SNMPv2-SMI -+ MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP -+ FROM SNMPv2-CONF; -+ -+ bgp MODULE-IDENTITY -+ LAST-UPDATED "9902100000Z" -+ ORGANIZATION "IETF IDR Working Group" -+ CONTACT-INFO "E-mail: idr@merit.net -+ -+ Susan Hares (Editor) -+ Merit Network -+ 4251 Plymouth Road -+ Suite C -+ Ann Arbor, MI 48105-2785 -+ Tel: +1 734 936 2095 -+ Fax: +1 734 647 3185 -+ E-mail: skh@merit.edu -+ -+ Jeff Johnson (Editor) -+ RedBack Networks, Inc. -+ 1389 Moffett Park Drive -+ Sunnyvale, CA 94089-1134 -+ Tel: +1 408 548 3516 -+ Fax: +1 408 548 3599 -+ E-mail: jeff@redback.com" -+ DESCRIPTION -+ "The MIB module for BGP-4." -+ REVISION "9902100000Z" -+ DESCRIPTION -+ "Corrected duplicate OBJECT IDENTIFIER -+ assignment in the conformance information." -+ REVISION "9601080000Z" -+ DESCRIPTION -+ "1) Fixed the definitions of the traps to -+ make them equivalent to their initial -+ definition in RFC 1269. -+ 2) Added compliance and conformance info." -+ ::= { mib-2 15 } -+ -+ bgpVersion OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (1..255)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Vector of supported BGP protocol version -+ numbers. Each peer negotiates the version -+ from this vector. Versions are identified -+ via the string of bits contained within this -+ object. The first octet contains bits 0 to -+ 7, the second octet contains bits 8 to 15, -+ and so on, with the most significant bit -+ referring to the lowest bit number in the -+ octet (e.g., the MSB of the first octet -+ refers to bit 0). If a bit, i, is present -+ and set, then the version (i+1) of the BGP -+ is supported." -+ ::= { bgp 1 } -+ -+ bgpLocalAs OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The local autonomous system number." -+ ::= { bgp 2 } -+ -+ -+ -+ -- BGP Peer table. This table contains, one entry per BGP -+ -- peer, information about the BGP peer. -+ -+ bgpPeerTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF BgpPeerEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "BGP peer table. This table contains, -+ one entry per BGP peer, information about the -+ connections with BGP peers." -+ ::= { bgp 3 } -+ -+ bgpPeerEntry OBJECT-TYPE -+ SYNTAX BgpPeerEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Entry containing information about the -+ connection with a BGP peer." -+ INDEX { bgpPeerRemoteAddr } -+ ::= { bgpPeerTable 1 } -+ -+ BgpPeerEntry ::= SEQUENCE { -+ bgpPeerIdentifier -+ IpAddress, -+ bgpPeerState -+ INTEGER, -+ bgpPeerAdminStatus -+ INTEGER, -+ bgpPeerNegotiatedVersion -+ Integer32, -+ bgpPeerLocalAddr -+ IpAddress, -+ bgpPeerLocalPort -+ INTEGER, -+ bgpPeerRemoteAddr -+ IpAddress, -+ bgpPeerRemotePort -+ INTEGER, -+ bgpPeerRemoteAs -+ INTEGER, -+ bgpPeerInUpdates -+ Counter32, -+ bgpPeerOutUpdates -+ Counter32, -+ bgpPeerInTotalMessages -+ Counter32, -+ bgpPeerOutTotalMessages -+ Counter32, -+ bgpPeerLastError -+ OCTET STRING, -+ bgpPeerFsmEstablishedTransitions -+ Counter32, -+ bgpPeerFsmEstablishedTime -+ Gauge32, -+ bgpPeerConnectRetryInterval -+ INTEGER, -+ bgpPeerHoldTime -+ INTEGER, -+ bgpPeerKeepAlive -+ INTEGER, -+ bgpPeerHoldTimeConfigured -+ INTEGER, -+ bgpPeerKeepAliveConfigured -+ INTEGER, -+ bgpPeerMinASOriginationInterval -+ INTEGER, -+ bgpPeerMinRouteAdvertisementInterval -+ INTEGER, -+ bgpPeerInUpdateElapsedTime -+ Gauge32 -+ } -+ -+ bgpPeerIdentifier OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The BGP Identifier of this entry's BGP peer." -+ ::= { bgpPeerEntry 1 } -+ -+ bgpPeerState OBJECT-TYPE -+ SYNTAX INTEGER { -+ idle(1), -+ connect(2), -+ active(3), -+ opensent(4), -+ openconfirm(5), -+ established(6) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The BGP peer connection state." -+ ::= { bgpPeerEntry 2 } -+ -+ bgpPeerAdminStatus OBJECT-TYPE -+ SYNTAX INTEGER { -+ stop(1), -+ start(2) -+ } -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The desired state of the BGP connection. A -+ transition from 'stop' to 'start' will cause -+ the BGP Start Event to be generated. A -+ transition from 'start' to 'stop' will cause -+ the BGP Stop Event to be generated. This -+ parameter can be used to restart BGP peer -+ connections. Care should be used in providing -+ write access to this object without adequate -+ authentication." -+ ::= { bgpPeerEntry 3 } -+ -+ bgpPeerNegotiatedVersion OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The negotiated version of BGP running between -+ the two peers." -+ ::= { bgpPeerEntry 4 } -+ -+ bgpPeerLocalAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The local IP address of this entry's BGP -+ connection." -+ ::= { bgpPeerEntry 5 } -+ -+ bgpPeerLocalPort OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The local port for the TCP connection between -+ the BGP peers." -+ ::= { bgpPeerEntry 6 } -+ -+ bgpPeerRemoteAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The remote IP address of this entry's BGP -+ peer." -+ ::= { bgpPeerEntry 7 } -+ -+ bgpPeerRemotePort OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The remote port for the TCP connection between -+ the BGP peers. Note that the objects -+ bgpPeerLocalAddr, bgpPeerLocalPort, -+ bgpPeerRemoteAddr and bgpPeerRemotePort -+ provide the appropriate reference to the -+ standard MIB TCP connection table." -+ ::= { bgpPeerEntry 8 } -+ -+ bgpPeerRemoteAs OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The remote autonomous system number." -+ ::= { bgpPeerEntry 9 } -+ -+ bgpPeerInUpdates OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of BGP UPDATE messages received on -+ this connection. This object should be -+ initialized to zero (0) when the connection is -+ established." -+ ::= { bgpPeerEntry 10 } -+ -+ bgpPeerOutUpdates OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of BGP UPDATE messages transmitted -+ on this connection. This object should be -+ initialized to zero (0) when the connection is -+ established." -+ ::= { bgpPeerEntry 11 } -+ -+ bgpPeerInTotalMessages OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of messages received from the -+ remote peer on this connection. This object -+ should be initialized to zero when the -+ connection is established." -+ ::= { bgpPeerEntry 12 } -+ -+ bgpPeerOutTotalMessages OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of messages transmitted to -+ the remote peer on this connection. This object -+ should be initialized to zero when the -+ connection is established." -+ ::= { bgpPeerEntry 13 } -+ -+ bgpPeerLastError OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (2)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The last error code and subcode seen by this -+ peer on this connection. If no error has -+ occurred, this field is zero. Otherwise, the -+ first byte of this two byte OCTET STRING -+ contains the error code, and the second byte -+ contains the subcode." -+ ::= { bgpPeerEntry 14 } -+ -+ bgpPeerFsmEstablishedTransitions OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of times the BGP FSM -+ transitioned into the established state." -+ ::= { bgpPeerEntry 15 } -+ -+ bgpPeerFsmEstablishedTime OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This timer indicates how long (in seconds) this -+ peer has been in the Established state or how long -+ since this peer was last in the Established state. -+ It is set to zero when a new peer is configured or -+ the router is booted." -+ ::= { bgpPeerEntry 16 } -+ -+ bgpPeerConnectRetryInterval OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the ConnectRetry -+ timer. The suggested value for this timer is -+ 120 seconds." -+ ::= { bgpPeerEntry 17 } -+ -+ bgpPeerHoldTime OBJECT-TYPE -+ SYNTAX INTEGER ( 0 | 3..65535 ) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the Hold Timer -+ established with the peer. The value of this -+ object is calculated by this BGP speaker by -+ using the smaller of the value in -+ bgpPeerHoldTimeConfigured and the Hold Time -+ received in the OPEN message. This value -+ must be at lease three seconds if it is not -+ zero (0) in which case the Hold Timer has -+ not been established with the peer, or, the -+ value of bgpPeerHoldTimeConfigured is zero (0)." -+ ::= { bgpPeerEntry 18 } -+ -+ bgpPeerKeepAlive OBJECT-TYPE -+ SYNTAX INTEGER ( 0 | 1..21845 ) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the KeepAlive -+ timer established with the peer. The value of -+ this object is calculated by this BGP speaker -+ such that, when compared with bgpPeerHoldTime, -+ it has the same proportion as what -+ bgpPeerKeepAliveConfigured has when compared -+ with bgpPeerHoldTimeConfigured. If the value -+ of this object is zero (0), it indicates that -+ the KeepAlive timer has not been established -+ with the peer, or, the value of -+ bgpPeerKeepAliveConfigured is zero (0)." -+ ::= { bgpPeerEntry 19 } -+ -+ bgpPeerHoldTimeConfigured OBJECT-TYPE -+ SYNTAX INTEGER ( 0 | 3..65535 ) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the Hold Time -+ configured for this BGP speaker with this peer. -+ This value is placed in an OPEN message sent to -+ this peer by this BGP speaker, and is compared -+ with the Hold Time field in an OPEN message -+ received from the peer when determining the Hold -+ Time (bgpPeerHoldTime) with the peer. This value -+ must not be less than three seconds if it is not -+ zero (0) in which case the Hold Time is NOT to be -+ established with the peer. The suggested value for -+ this timer is 90 seconds." -+ ::= { bgpPeerEntry 20 } -+ -+ bgpPeerKeepAliveConfigured OBJECT-TYPE -+ SYNTAX INTEGER ( 0 | 1..21845 ) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the KeepAlive timer -+ configured for this BGP speaker with this peer. -+ The value of this object will only determine the -+ KEEPALIVE messages' frequency relative to the value -+ specified in bgpPeerHoldTimeConfigured; the actual -+ time interval for the KEEPALIVE messages is -+ indicated by bgpPeerKeepAlive. A reasonable -+ maximum value for this timer would be configured to -+ be one third of that of bgpPeerHoldTimeConfigured. -+ If the value of this object is zero (0), no -+ periodical KEEPALIVE messages are sent to the peer -+ after the BGP connection has been established. The -+ suggested value for this timer is 30 seconds." -+ ::= { bgpPeerEntry 21 } -+ -+ bgpPeerMinASOriginationInterval OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the -+ MinASOriginationInterval timer. -+ The suggested value for this timer is 15 seconds." -+ ::= { bgpPeerEntry 22 } -+ -+ bgpPeerMinRouteAdvertisementInterval OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the -+ MinRouteAdvertisementInterval timer. -+ The suggested value for this timer is 30 seconds." -+ ::= { bgpPeerEntry 23 } -+ -+ bgpPeerInUpdateElapsedTime OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Elapsed time in seconds since the last BGP -+ UPDATE message was received from the peer. -+ Each time bgpPeerInUpdates is incremented, -+ the value of this object is set to zero (0)." -+ ::= { bgpPeerEntry 24 } -+ -+ -+ -+ bgpIdentifier OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The BGP Identifier of local system." -+ ::= { bgp 4 } -+ -+ -+ -+ -- Received Path Attribute Table. This table contains, -+ -- one entry per path to a network, path attributes -+ -- received from all peers running BGP version 3 or less. -+ -- This table is obsolete, having been replaced in -+ -- functionality with the bgp4PathAttrTable. -+ -+ bgpRcvdPathAttrTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF BgpPathAttrEntry -+ MAX-ACCESS not-accessible -+ STATUS obsolete -+ DESCRIPTION -+ "The BGP Received Path Attribute Table contains -+ information about paths to destination networks -+ received from all peers running BGP version 3 or -+ less." -+ ::= { bgp 5 } -+ -+ bgpPathAttrEntry OBJECT-TYPE -+ SYNTAX BgpPathAttrEntry -+ MAX-ACCESS not-accessible -+ STATUS obsolete -+ DESCRIPTION -+ "Information about a path to a network." -+ INDEX { bgpPathAttrDestNetwork, -+ bgpPathAttrPeer } -+ ::= { bgpRcvdPathAttrTable 1 } -+ -+ BgpPathAttrEntry ::= SEQUENCE { -+ bgpPathAttrPeer -+ IpAddress, -+ bgpPathAttrDestNetwork -+ IpAddress, -+ bgpPathAttrOrigin -+ INTEGER, -+ bgpPathAttrASPath -+ OCTET STRING, -+ bgpPathAttrNextHop -+ IpAddress, -+ bgpPathAttrInterASMetric -+ Integer32 -+ } -+ -+ bgpPathAttrPeer OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The IP address of the peer where the path -+ information was learned." -+ ::= { bgpPathAttrEntry 1 } -+ -+ bgpPathAttrDestNetwork OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The address of the destination network." -+ ::= { bgpPathAttrEntry 2 } -+ -+ bgpPathAttrOrigin OBJECT-TYPE -+ SYNTAX INTEGER { -+ igp(1),-- networks are interior -+ egp(2),-- networks learned via EGP -+ incomplete(3) -- undetermined -+ } -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The ultimate origin of the path information." -+ ::= { bgpPathAttrEntry 3 } -+ -+ bgpPathAttrASPath OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (2..255)) -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The set of ASs that must be traversed to reach -+ the network. This object is probably best -+ represented as SEQUENCE OF INTEGER. For SMI -+ compatibility, though, it is represented as -+ OCTET STRING. Each AS is represented as a pair -+ of octets according to the following algorithm: -+ -+ first-byte-of-pair = ASNumber / 256; -+ second-byte-of-pair = ASNumber & 255;" -+ ::= { bgpPathAttrEntry 4 } -+ -+ bgpPathAttrNextHop OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The address of the border router that should -+ be used for the destination network." -+ ::= { bgpPathAttrEntry 5 } -+ -+ bgpPathAttrInterASMetric OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The optional inter-AS metric. If this -+ attribute has not been provided for this route, -+ the value for this object is 0." -+ ::= { bgpPathAttrEntry 6 } -+ -+ -+ -+ -- BGP-4 Received Path Attribute Table. This table contains, -+ -- one entry per path to a network, path attributes -+ -- received from all peers running BGP-4. -+ -+ bgp4PathAttrTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Bgp4PathAttrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The BGP-4 Received Path Attribute Table contains -+ information about paths to destination networks -+ received from all BGP4 peers." -+ ::= { bgp 6 } -+ -+ bgp4PathAttrEntry OBJECT-TYPE -+ SYNTAX Bgp4PathAttrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information about a path to a network." -+ INDEX { bgp4PathAttrIpAddrPrefix, -+ bgp4PathAttrIpAddrPrefixLen, -+ bgp4PathAttrPeer } -+ ::= { bgp4PathAttrTable 1 } -+ -+ Bgp4PathAttrEntry ::= SEQUENCE { -+ bgp4PathAttrPeer -+ IpAddress, -+ bgp4PathAttrIpAddrPrefixLen -+ INTEGER, -+ bgp4PathAttrIpAddrPrefix -+ IpAddress, -+ bgp4PathAttrOrigin -+ INTEGER, -+ bgp4PathAttrASPathSegment -+ OCTET STRING, -+ bgp4PathAttrNextHop -+ IpAddress, -+ bgp4PathAttrMultiExitDisc -+ INTEGER, -+ bgp4PathAttrLocalPref -+ INTEGER, -+ bgp4PathAttrAtomicAggregate -+ INTEGER, -+ bgp4PathAttrAggregatorAS -+ INTEGER, -+ bgp4PathAttrAggregatorAddr -+ IpAddress, -+ bgp4PathAttrCalcLocalPref -+ INTEGER, -+ bgp4PathAttrBest -+ INTEGER, -+ bgp4PathAttrUnknown -+ OCTET STRING -+ } -+ -+ bgp4PathAttrPeer OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of the peer where the path -+ information was learned." -+ ::= { bgp4PathAttrEntry 1 } -+ bgp4PathAttrIpAddrPrefixLen OBJECT-TYPE -+ SYNTAX INTEGER (0..32) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Length in bits of the IP address prefix in the -+ Network Layer Reachability Information field." -+ ::= { bgp4PathAttrEntry 2 } -+ -+ bgp4PathAttrIpAddrPrefix OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "An IP address prefix in the Network Layer -+ Reachability Information field. This object -+ is an IP address containing the prefix with -+ length specified by bgp4PathAttrIpAddrPrefixLen. -+ Any bits beyond the length specified by -+ bgp4PathAttrIpAddrPrefixLen are zeroed." -+ ::= { bgp4PathAttrEntry 3 } -+ -+ bgp4PathAttrOrigin OBJECT-TYPE -+ SYNTAX INTEGER { -+ igp(1),-- networks are interior -+ egp(2),-- networks learned via EGP -+ incomplete(3) -- undetermined -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The ultimate origin of the path information." -+ ::= { bgp4PathAttrEntry 4 } -+ -+ bgp4PathAttrASPathSegment OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (2..255)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The sequence of AS path segments. Each AS -+ path segment is represented by a triple -+ . -+ -+ The type is a 1-octet field which has two -+ possible values: -+ 1 AS_SET: unordered set of ASs a -+ route in the UPDATE message -+ has traversed -+ 2 AS_SEQUENCE: ordered set of ASs -+ a route in the UPDATE message -+ has traversed. -+ -+ The length is a 1-octet field containing the -+ number of ASs in the value field. -+ -+ The value field contains one or more AS -+ numbers, each AS is represented in the octet -+ string as a pair of octets according to the -+ following algorithm: -+ -+ first-byte-of-pair = ASNumber / 256; -+ second-byte-of-pair = ASNumber & 255;" -+ ::= { bgp4PathAttrEntry 5 } -+ -+ bgp4PathAttrNextHop OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The address of the border router that should -+ be used for the destination network." -+ ::= { bgp4PathAttrEntry 6 } -+ -+ bgp4PathAttrMultiExitDisc OBJECT-TYPE -+ SYNTAX INTEGER (-1..2147483647) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This metric is used to discriminate between -+ multiple exit points to an adjacent autonomous -+ system. A value of -1 indicates the absence of -+ this attribute." -+ ::= { bgp4PathAttrEntry 7 } -+ -+ bgp4PathAttrLocalPref OBJECT-TYPE -+ SYNTAX INTEGER (-1..2147483647) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The originating BGP4 speaker's degree of -+ preference for an advertised route. A value of -+ -1 indicates the absence of this attribute." -+ ::= { bgp4PathAttrEntry 8 } -+ -+ bgp4PathAttrAtomicAggregate OBJECT-TYPE -+ SYNTAX INTEGER { -+ lessSpecificRrouteNotSelected(1), -+ lessSpecificRouteSelected(2) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Whether or not a system has selected -+ a less specific route without selecting a -+ more specific route." -+ ::= { bgp4PathAttrEntry 9 } -+ -+ bgp4PathAttrAggregatorAS OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The AS number of the last BGP4 speaker that -+ performed route aggregation. A value of zero (0) -+ indicates the absence of this attribute." -+ ::= { bgp4PathAttrEntry 10 } -+ -+ bgp4PathAttrAggregatorAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of the last BGP4 speaker that -+ performed route aggregation. A value of -+ 0.0.0.0 indicates the absence of this attribute." -+ ::= { bgp4PathAttrEntry 11 } -+ -+ bgp4PathAttrCalcLocalPref OBJECT-TYPE -+ SYNTAX INTEGER (-1..2147483647) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The degree of preference calculated by the -+ receiving BGP4 speaker for an advertised route. -+ A value of -1 indicates the absence of this -+ attribute." -+ ::= { bgp4PathAttrEntry 12 } -+ -+ bgp4PathAttrBest OBJECT-TYPE -+ SYNTAX INTEGER { -+ false(1),-- not chosen as best route -+ true(2) -- chosen as best route -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "An indication of whether or not this route -+ was chosen as the best BGP4 route." -+ ::= { bgp4PathAttrEntry 13 } -+ -+ bgp4PathAttrUnknown OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(0..255)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "One or more path attributes not understood -+ by this BGP4 speaker. Size zero (0) indicates -+ the absence of such attribute(s). Octets -+ beyond the maximum size, if any, are not -+ recorded by this object." -+ ::= { bgp4PathAttrEntry 14 } -+ -+ -+ -- Traps. -+ -+ -- note that in RFC 1657, bgpTraps was incorrectly -+ -- assigned a value of { bgp 7 }, and each of the -+ -- traps had the bgpPeerRemoteAddr object inappropriately -+ -- removed from their OBJECTS clause. The following -+ -- definitions restore the semantics of the traps as -+ -- they were initially defined in RFC 1269. -+ -+ -- { bgp 7 } is unused -+ -+ bgpTraps OBJECT IDENTIFIER ::= { bgp 0 } -+ -+ bgpEstablished NOTIFICATION-TYPE -+ OBJECTS { bgpPeerRemoteAddr, -+ bgpPeerLastError, -+ bgpPeerState } -+ STATUS current -+ DESCRIPTION -+ "The BGP Established event is generated when -+ the BGP FSM enters the ESTABLISHED state." -+ ::= { bgpTraps 1 } -+ -+ bgpBackwardTransition NOTIFICATION-TYPE -+ OBJECTS { bgpPeerRemoteAddr, -+ bgpPeerLastError, -+ bgpPeerState } -+ STATUS current -+ DESCRIPTION -+ "The BGPBackwardTransition Event is generated -+ when the BGP FSM moves from a higher numbered -+ state to a lower numbered state." -+ ::= { bgpTraps 2 } -+ -+ -- conformance information -+ -+ bgpMIBConformance OBJECT IDENTIFIER ::= { bgp 8 } -+ bgpMIBCompliances OBJECT IDENTIFIER ::= { bgpMIBConformance 1 } -+ bgpMIBGroups OBJECT IDENTIFIER ::= { bgpMIBConformance 2 } -+ -+ -- compliance statements -+ -+ bgpMIBCompliance MODULE-COMPLIANCE -+ STATUS current -+ DESCRIPTION -+ "The compliance statement for entities which -+ implement the BGP4 mib." -+ MODULE -- this module -+ MANDATORY-GROUPS { bgp4MIBGlobalsGroup, -+ bgp4MIBPeerGroup, -+ bgp4MIBPathAttrGroup, -+ bgp4MIBNotificationGroup } -+ ::= { bgpMIBCompliances 1 } -+ -+ -- units of conformance -+ -+ bgp4MIBGlobalsGroup OBJECT-GROUP -+ OBJECTS { bgpVersion, -+ bgpLocalAs, -+ bgpIdentifier } -+ STATUS current -+ DESCRIPTION -+ "A collection of objects providing information -+ on global BGP state." -+ ::= { bgpMIBGroups 1 } -+ -+ bgp4MIBPeerGroup OBJECT-GROUP -+ OBJECTS { bgpPeerIdentifier, -+ bgpPeerState, -+ bgpPeerAdminStatus, -+ bgpPeerNegotiatedVersion, -+ bgpPeerLocalAddr, -+ bgpPeerLocalPort, -+ bgpPeerRemoteAddr, -+ bgpPeerRemotePort, -+ bgpPeerRemoteAs, -+ bgpPeerInUpdates, -+ bgpPeerOutUpdates, -+ bgpPeerInTotalMessages, -+ bgpPeerOutTotalMessages, -+ bgpPeerLastError, -+ bgpPeerFsmEstablishedTransitions, -+ bgpPeerFsmEstablishedTime, -+ bgpPeerConnectRetryInterval, -+ bgpPeerHoldTime, -+ bgpPeerKeepAlive, -+ bgpPeerHoldTimeConfigured, -+ bgpPeerKeepAliveConfigured, -+ bgpPeerMinASOriginationInterval, -+ bgpPeerMinRouteAdvertisementInterval, -+ bgpPeerInUpdateElapsedTime } -+ STATUS current -+ DESCRIPTION -+ "A collection of objects for managing -+ BGP peers." -+ ::= { bgpMIBGroups 2 } -+ -+ bgp4MIBRcvdPathAttrGroup OBJECT-GROUP -+ OBJECTS { bgpPathAttrPeer, -+ bgpPathAttrDestNetwork, -+ bgpPathAttrOrigin, -+ bgpPathAttrASPath, -+ bgpPathAttrNextHop, -+ bgpPathAttrInterASMetric } -+ STATUS obsolete -+ DESCRIPTION -+ "A collection of objects for managing BGP -+ path entries. -+ -+ This conformance group is obsolete, -+ replaced by bgp4MIBPathAttrGroup." -+ ::= { bgpMIBGroups 3 } -+ -+ bgp4MIBPathAttrGroup OBJECT-GROUP -+ OBJECTS { bgp4PathAttrPeer, -+ bgp4PathAttrIpAddrPrefixLen, -+ bgp4PathAttrIpAddrPrefix, -+ bgp4PathAttrOrigin, -+ bgp4PathAttrASPathSegment, -+ bgp4PathAttrNextHop, -+ bgp4PathAttrMultiExitDisc, -+ bgp4PathAttrLocalPref, -+ bgp4PathAttrAtomicAggregate, -+ bgp4PathAttrAggregatorAS, -+ bgp4PathAttrAggregatorAddr, -+ bgp4PathAttrCalcLocalPref, -+ bgp4PathAttrBest, -+ bgp4PathAttrUnknown } -+ STATUS current -+ DESCRIPTION -+ "A collection of objects for managing -+ BGP path entries." -+ ::= { bgpMIBGroups 4 } -+ -+ bgp4MIBNotificationGroup NOTIFICATION-GROUP -+ NOTIFICATIONS { bgpEstablished, -+ bgpBackwardTransition } -+ STATUS current -+ DESCRIPTION -+ "A collection of notifications for signaling -+ changes in BGP peer relationships." -+ ::= { bgpMIBGroups 5 } -+ -+ END -diff -ruN net-snmp-5.1.2-orig/mibs/BRIDGE-MIB.txt net-snmp-5.1.2-5/mibs/BRIDGE-MIB.txt ---- net-snmp-5.1.2-orig/mibs/BRIDGE-MIB.txt 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/mibs/BRIDGE-MIB.txt 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,1075 @@ -+BRIDGE-MIB DEFINITIONS ::= BEGIN -+ -+IMPORTS -+ Counter, TimeTicks -+ FROM RFC1155-SMI -+ mib-2 -+ FROM RFC1213-MIB -+ OBJECT-TYPE -+ FROM RFC-1212 -+ TRAP-TYPE -+ FROM RFC-1215; -+ -+-- All representations of MAC addresses in this MIB Module -+-- use, as a textual convention (i.e. this convention does -+-- not affect their encoding), the data type: -+MacAddress ::= OCTET STRING (SIZE (6)) -- a 6 octet address -+ -- in the -+ -- "canonical" -+ -- order -+-- defined by IEEE 802.1a, i.e., as if it were transmitted -+-- least significant bit first, even though 802.5 (in -+-- contrast to other n802.x protocols) requires MAC -+-- addresses to be transmitted most significant bit first. -+-- -+-- 16-bit addresses, if needed, are represented by setting -+-- their upper 4 octets to all 0's, i.e., AAFF would be -+-- represented as 00000000AAFF. -+ -+-- Similarly, all representations of Bridge-Id in this MIB -+-- Module use, as a textual convention (i.e. this -+-- convention does not affect their encoding), the data -+-- type: -+BridgeId ::= OCTET STRING (SIZE (8)) -- the -+ -- Bridge-Identifier -+ -- as used in the -+ -- Spanning Tree -+-- Protocol to uniquely identify a bridge. Its first two -+-- octets (in network byte order) contain a priority -+-- value and its last 6 octets contain the MAC address -+-- used to refer to a bridge in a unique fashion -+-- (typically, the numerically smallest MAC address -+-- of all ports on the bridge). -+ -+-- Several objects in this MIB module represent values of -+-- timers used by the Spanning Tree Protocol. In this -+-- MIB, these timers have values in units of hundreths of -+-- a second (i.e. 1/100 secs). -+-- These timers, when stored in a Spanning Tree Protocol's -+-- BPDU, are in units of 1/256 seconds. Note, however, -+-- that 802.1D-1990 specifies a settable granularity of -+-- no more than 1 second for these timers. To avoid -+-- ambiguity, a data type is defined here as a textual -+-- convention and all representation of these timers -+-- in this MIB module are defined using this data type. An -+-- algorithm is also defined for converting between the -+-- different units, to ensure a timer's value is not -+-- distorted by multiple conversions. -+-- The data type is: -+ -+Timeout ::= INTEGER -- a STP timer in units of 1/100 seconds -+ -+-- To convert a Timeout value into a value in units of -+-- 1/256 seconds, the following algorithm should be used: -+-- -+-- b = floor( (n * 256) / 100) -+-- -+-- where: -+-- floor = quotient [ignore remainder] -+-- n is the value in 1/100 second units -+-- b is the value in 1/256 second units -+-- -+-- To convert the value from 1/256 second units back to -+-- 1/100 seconds, the following algorithm should be used: -+-- -+-- n = ceiling( (b * 100) / 256) -+-- -+-- where: -+-- ceiling = quotient [if remainder is 0], or -+-- quotient + 1 [if remainder is non-zero] -+-- n is the value in 1/100 second units -+-- b is the value in 1/256 second units -+-- -+-- Note: it is important that the arithmetic operations are -+-- done in the order specified (i.e., multiply first, divide -+-- second). -+ -+ dot1dBridge OBJECT IDENTIFIER ::= { mib-2 17 } -+ -+-- groups in the Bridge MIB -+ -+dot1dBase OBJECT IDENTIFIER ::= { dot1dBridge 1 } -+ -+dot1dStp OBJECT IDENTIFIER ::= { dot1dBridge 2 } -+ -+dot1dSr OBJECT IDENTIFIER ::= { dot1dBridge 3 } -+-- separately documented -+ -+dot1dTp OBJECT IDENTIFIER ::= { dot1dBridge 4 } -+ -+dot1dStatic OBJECT IDENTIFIER ::= { dot1dBridge 5 } -+ -+-- the dot1dBase group -+ -+-- Implementation of the dot1dBase group is mandatory for all -+-- bridges. -+ -+dot1dBaseBridgeAddress OBJECT-TYPE -+ SYNTAX MacAddress -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The MAC address used by this bridge when it must -+ be referred to in a unique fashion. It is -+ recommended that this be the numerically smallest -+ MAC address of all ports that belong to this -+ bridge. However it is only required to be unique. -+ When concatenated with dot1dStpPriority a unique -+ BridgeIdentifier is formed which is used in the -+ Spanning Tree Protocol." -+ REFERENCE -+ "IEEE 802.1D-1990: Sections 6.4.1.1.3 and 3.12.5" -+ ::= { dot1dBase 1 } -+ -+dot1dBaseNumPorts OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of ports controlled by this bridging -+ entity." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.4.1.1.3" -+ ::= { dot1dBase 2 } -+ -+dot1dBaseType OBJECT-TYPE -+ SYNTAX INTEGER { -+ unknown(1), -+ transparent-only(2), -+ sourceroute-only(3), -+ srt(4) -+ } -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "Indicates what type of bridging this bridge can -+ perform. If a bridge is actually performing a -+ certain type of bridging this will be indicated by -+ entries in the port table for the given type." -+ ::= { dot1dBase 3 } -+ -+-- The Generic Bridge Port Table -+ -+dot1dBasePortTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dBasePortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains generic information about -+ every port that is associated with this bridge. -+ Transparent, source-route, and srt ports are -+ included." -+ ::= { dot1dBase 4 } -+ -+dot1dBasePortEntry OBJECT-TYPE -+ SYNTAX Dot1dBasePortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information for each port of the -+ bridge." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.4.2, 6.6.1" -+ INDEX { dot1dBasePort } -+ ::= { dot1dBasePortTable 1 } -+ -+Dot1dBasePortEntry ::= -+ SEQUENCE { -+ dot1dBasePort -+ INTEGER, -+ dot1dBasePortIfIndex -+ INTEGER, -+ dot1dBasePortCircuit -+ -+ OBJECT IDENTIFIER, -+ dot1dBasePortDelayExceededDiscards -+ Counter, -+ dot1dBasePortMtuExceededDiscards -+ Counter -+ } -+ -+dot1dBasePort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port for which this entry -+ contains bridge management information." -+ ::= { dot1dBasePortEntry 1 } -+ -+dot1dBasePortIfIndex OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The value of the instance of the ifIndex object, -+ defined in MIB-II, for the interface corresponding -+ to this port." -+ ::= { dot1dBasePortEntry 2 } -+ -+dot1dBasePortCircuit OBJECT-TYPE -+ SYNTAX OBJECT IDENTIFIER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "For a port which (potentially) has the same value -+ of dot1dBasePortIfIndex as another port on the -+ same bridge, this object contains the name of an -+ object instance unique to this port. For example, -+ in the case where multiple ports correspond one- -+ to-one with multiple X.25 virtual circuits, this -+ value might identify an (e.g., the first) object -+ instance associated with the X.25 virtual circuit -+ corresponding to this port. -+ -+ For a port which has a unique value of -+ dot1dBasePortIfIndex, this object can have the -+ value { 0 0 }." -+ ::= { dot1dBasePortEntry 3 } -+ -+dot1dBasePortDelayExceededDiscards OBJECT-TYPE -+ SYNTAX Counter -+ -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames discarded by this port due -+ to excessive transit delay through the bridge. It -+ is incremented by both transparent and source -+ route bridges." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dBasePortEntry 4 } -+ -+dot1dBasePortMtuExceededDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames discarded by this port due -+ to an excessive size. It is incremented by both -+ transparent and source route bridges." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dBasePortEntry 5 } -+ -+-- the dot1dStp group -+ -+-- Implementation of the dot1dStp group is optional. It is -+-- implemented by those bridges that support the Spanning Tree -+-- Protocol. -+ -+dot1dStpProtocolSpecification OBJECT-TYPE -+ SYNTAX INTEGER { -+ unknown(1), -+ decLb100(2), -+ ieee8021d(3) -+ } -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "An indication of what version of the Spanning -+ Tree Protocol is being run. The value -+ 'decLb100(2)' indicates the DEC LANbridge 100 -+ Spanning Tree protocol. IEEE 802.1d -+ implementations will return 'ieee8021d(3)'. If -+ future versions of the IEEE Spanning Tree Protocol -+ are released that are incompatible with the -+ current version a new value will be defined." -+ -+ ::= { dot1dStp 1 } -+ -+dot1dStpPriority OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value of the write-able portion of the Bridge -+ ID, i.e., the first two octets of the (8 octet -+ long) Bridge ID. The other (last) 6 octets of the -+ Bridge ID are given by the value of -+ dot1dBaseBridgeAddress." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.7" -+ ::= { dot1dStp 2 } -+ -+dot1dStpTimeSinceTopologyChange OBJECT-TYPE -+ SYNTAX TimeTicks -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The time (in hundredths of a second) since the -+ last time a topology change was detected by the -+ bridge entity." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.8.1.1.3" -+ ::= { dot1dStp 3 } -+ -+dot1dStpTopChanges OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The total number of topology changes detected by -+ this bridge since the management entity was last -+ reset or initialized." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.8.1.1.3" -+ ::= { dot1dStp 4 } -+ -+dot1dStpDesignatedRoot OBJECT-TYPE -+ SYNTAX BridgeId -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The bridge identifier of the root of the spanning -+ tree as determined by the Spanning Tree Protocol -+ as executed by this node. This value is used as -+ -+ the Root Identifier parameter in all Configuration -+ Bridge PDUs originated by this node." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.1" -+ ::= { dot1dStp 5 } -+ -+dot1dStpRootCost OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The cost of the path to the root as seen from -+ this bridge." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.2" -+ ::= { dot1dStp 6 } -+ -+dot1dStpRootPort OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port which offers the -+ lowest cost path from this bridge to the root -+ bridge." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.3" -+ ::= { dot1dStp 7 } -+ -+dot1dStpMaxAge OBJECT-TYPE -+ SYNTAX Timeout -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The maximum age of Spanning Tree Protocol -+ information learned from the network on any port -+ before it is discarded, in units of hundredths of -+ a second. This is the actual value that this -+ bridge is currently using." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.4" -+ ::= { dot1dStp 8 } -+ -+dot1dStpHelloTime OBJECT-TYPE -+ SYNTAX Timeout -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ -+ "The amount of time between the transmission of -+ Configuration bridge PDUs by this node on any port -+ when it is the root of the spanning tree or trying -+ to become so, in units of hundredths of a second. -+ This is the actual value that this bridge is -+ currently using." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.5" -+ ::= { dot1dStp 9 } -+ -+dot1dStpHoldTime OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "This time value determines the interval length -+ during which no more than two Configuration bridge -+ PDUs shall be transmitted by this node, in units -+ of hundredths of a second." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.14" -+ ::= { dot1dStp 10 } -+ -+dot1dStpForwardDelay OBJECT-TYPE -+ SYNTAX Timeout -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "This time value, measured in units of hundredths -+ of a second, controls how fast a port changes its -+ spanning state when moving towards the Forwarding -+ state. The value determines how long the port -+ stays in each of the Listening and Learning -+ states, which precede the Forwarding state. This -+ value is also used, when a topology change has -+ been detected and is underway, to age all dynamic -+ entries in the Forwarding Database. [Note that -+ this value is the one that this bridge is -+ currently using, in contrast to -+ dot1dStpBridgeForwardDelay which is the value that -+ this bridge and all others would start using -+ if/when this bridge were to become the root.]" -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.6" -+ ::= { dot1dStp 11 } -+ -+dot1dStpBridgeMaxAge OBJECT-TYPE -+ SYNTAX Timeout (600..4000) -+ -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value that all bridges use for MaxAge when -+ this bridge is acting as the root. Note that -+ 802.1D-1990 specifies that the range for this -+ parameter is related to the value of -+ dot1dStpBridgeHelloTime. The granularity of this -+ timer is specified by 802.1D-1990 to be 1 second. -+ An agent may return a badValue error if a set is -+ attempted to a value which is not a whole number -+ of seconds." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.8" -+ ::= { dot1dStp 12 } -+ -+dot1dStpBridgeHelloTime OBJECT-TYPE -+ SYNTAX Timeout (100..1000) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value that all bridges use for HelloTime when -+ this bridge is acting as the root. The -+ granularity of this timer is specified by 802.1D- -+ 1990 to be 1 second. An agent may return a -+ badValue error if a set is attempted to a value -+ which is not a whole number of seconds." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.9" -+ ::= { dot1dStp 13 } -+ -+dot1dStpBridgeForwardDelay OBJECT-TYPE -+ SYNTAX Timeout (400..3000) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value that all bridges use for ForwardDelay -+ when this bridge is acting as the root. Note that -+ 802.1D-1990 specifies that the range for this -+ parameter is related to the value of -+ dot1dStpBridgeMaxAge. The granularity of this -+ timer is specified by 802.1D-1990 to be 1 second. -+ An agent may return a badValue error if a set is -+ attempted to a value which is not a whole number -+ of seconds." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.10" -+ ::= { dot1dStp 14 } -+ -+-- The Spanning Tree Port Table -+ -+dot1dStpPortTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dStpPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains port-specific information -+ for the Spanning Tree Protocol." -+ ::= { dot1dStp 15 } -+ -+dot1dStpPortEntry OBJECT-TYPE -+ SYNTAX Dot1dStpPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information maintained by every port -+ about the Spanning Tree Protocol state for that -+ port." -+ INDEX { dot1dStpPort } -+ ::= { dot1dStpPortTable 1 } -+ -+Dot1dStpPortEntry ::= -+ SEQUENCE { -+ dot1dStpPort -+ INTEGER, -+ dot1dStpPortPriority -+ INTEGER, -+ dot1dStpPortState -+ INTEGER, -+ dot1dStpPortEnable -+ INTEGER, -+ dot1dStpPortPathCost -+ INTEGER, -+ dot1dStpPortDesignatedRoot -+ BridgeId, -+ dot1dStpPortDesignatedCost -+ INTEGER, -+ dot1dStpPortDesignatedBridge -+ BridgeId, -+ dot1dStpPortDesignatedPort -+ OCTET STRING, -+ dot1dStpPortForwardTransitions -+ Counter -+ } -+ -+dot1dStpPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port for which this entry -+ contains Spanning Tree Protocol management -+ information." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.8.2.1.2" -+ ::= { dot1dStpPortEntry 1 } -+ -+dot1dStpPortPriority OBJECT-TYPE -+ SYNTAX INTEGER (0..255) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value of the priority field which is -+ contained in the first (in network byte order) -+ octet of the (2 octet long) Port ID. The other -+ octet of the Port ID is given by the value of -+ dot1dStpPort." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.1" -+ ::= { dot1dStpPortEntry 2 } -+ -+dot1dStpPortState OBJECT-TYPE -+ SYNTAX INTEGER { -+ disabled(1), -+ blocking(2), -+ listening(3), -+ learning(4), -+ forwarding(5), -+ broken(6) -+ } -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port's current state as defined by -+ application of the Spanning Tree Protocol. This -+ state controls what action a port takes on -+ reception of a frame. If the bridge has detected -+ a port that is malfunctioning it will place that -+ port into the broken(6) state. For ports which -+ are disabled (see dot1dStpPortEnable), this object -+ will have a value of disabled(1)." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.2" -+ ::= { dot1dStpPortEntry 3 } -+ -+dot1dStpPortEnable OBJECT-TYPE -+ SYNTAX INTEGER { -+ enabled(1), -+ disabled(2) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The enabled/disabled status of the port." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.2" -+ ::= { dot1dStpPortEntry 4 } -+ -+dot1dStpPortPathCost OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The contribution of this port to the path cost of -+ paths towards the spanning tree root which include -+ this port. 802.1D-1990 recommends that the -+ default value of this parameter be in inverse -+ proportion to the speed of the attached LAN." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.3" -+ ::= { dot1dStpPortEntry 5 } -+ -+dot1dStpPortDesignatedRoot OBJECT-TYPE -+ SYNTAX BridgeId -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The unique Bridge Identifier of the Bridge -+ recorded as the Root in the Configuration BPDUs -+ transmitted by the Designated Bridge for the -+ segment to which the port is attached." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.4" -+ ::= { dot1dStpPortEntry 6 } -+ -+dot1dStpPortDesignatedCost OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The path cost of the Designated Port of the -+ segment connected to this port. This value is -+ compared to the Root Path Cost field in received -+ -+ bridge PDUs." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.5" -+ ::= { dot1dStpPortEntry 7 } -+ -+dot1dStpPortDesignatedBridge OBJECT-TYPE -+ SYNTAX BridgeId -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The Bridge Identifier of the bridge which this -+ port considers to be the Designated Bridge for -+ this port's segment." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.6" -+ ::= { dot1dStpPortEntry 8 } -+ -+dot1dStpPortDesignatedPort OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (2)) -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The Port Identifier of the port on the Designated -+ Bridge for this port's segment." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.7" -+ ::= { dot1dStpPortEntry 9 } -+ -+dot1dStpPortForwardTransitions OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of times this port has transitioned -+ from the Learning state to the Forwarding state." -+ ::= { dot1dStpPortEntry 10 } -+ -+-- the dot1dTp group -+ -+-- Implementation of the dot1dTp group is optional. It is -+-- implemented by those bridges that support the transparent -+-- bridging mode. A transparent or SRT bridge will implement -+-- this group. -+ -+dot1dTpLearnedEntryDiscards OBJECT-TYPE -+ SYNTAX Counter -+ -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The total number of Forwarding Database entries, -+ which have been or would have been learnt, but -+ have been discarded due to a lack of space to -+ store them in the Forwarding Database. If this -+ counter is increasing, it indicates that the -+ Forwarding Database is regularly becoming full (a -+ condition which has unpleasant performance effects -+ on the subnetwork). If this counter has a -+ significant value but is not presently increasing, -+ it indicates that the problem has been occurring -+ but is not persistent." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.7.1.1.3" -+ ::= { dot1dTp 1 } -+ -+dot1dTpAgingTime OBJECT-TYPE -+ SYNTAX INTEGER (10..1000000) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The timeout period in seconds for aging out -+ dynamically learned forwarding information. -+ 802.1D-1990 recommends a default of 300 seconds." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.7.1.1.3" -+ ::= { dot1dTp 2 } -+ -+-- The Forwarding Database for Transparent Bridges -+ -+dot1dTpFdbTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dTpFdbEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains information about unicast -+ entries for which the bridge has forwarding and/or -+ filtering information. This information is used -+ by the transparent bridging function in -+ determining how to propagate a received frame." -+ ::= { dot1dTp 3 } -+ -+dot1dTpFdbEntry OBJECT-TYPE -+ SYNTAX Dot1dTpFdbEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "Information about a specific unicast MAC address -+ for which the bridge has some forwarding and/or -+ filtering information." -+ INDEX { dot1dTpFdbAddress } -+ ::= { dot1dTpFdbTable 1 } -+ -+Dot1dTpFdbEntry ::= -+ SEQUENCE { -+ dot1dTpFdbAddress -+ MacAddress, -+ dot1dTpFdbPort -+ INTEGER, -+ dot1dTpFdbStatus -+ INTEGER -+ } -+ -+dot1dTpFdbAddress OBJECT-TYPE -+ SYNTAX MacAddress -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "A unicast MAC address for which the bridge has -+ forwarding and/or filtering information." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 3.9.1, 3.9.2" -+ ::= { dot1dTpFdbEntry 1 } -+ -+dot1dTpFdbPort OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "Either the value '0', or the port number of the -+ port on which a frame having a source address -+ equal to the value of the corresponding instance -+ of dot1dTpFdbAddress has been seen. A value of -+ '0' indicates that the port number has not been -+ learned but that the bridge does have some -+ forwarding/filtering information about this -+ address (e.g. in the dot1dStaticTable). -+ Implementors are encouraged to assign the port -+ value to this object whenever it is learned even -+ for addresses for which the corresponding value of -+ dot1dTpFdbStatus is not learned(3)." -+ ::= { dot1dTpFdbEntry 2 } -+ -+dot1dTpFdbStatus OBJECT-TYPE -+ SYNTAX INTEGER { -+ other(1), -+ invalid(2), -+ learned(3), -+ self(4), -+ mgmt(5) -+ } -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The status of this entry. The meanings of the -+ values are: -+ other(1) : none of the following. This would -+ include the case where some other -+ MIB object (not the corresponding -+ instance of dot1dTpFdbPort, nor an -+ entry in the dot1dStaticTable) is -+ being used to determine if and how -+ frames addressed to the value of -+ the corresponding instance of -+ dot1dTpFdbAddress are being -+ forwarded. -+ invalid(2) : this entry is not longer valid -+ (e.g., it was learned but has since -+ aged-out), but has not yet been -+ flushed from the table. -+ learned(3) : the value of the corresponding -+ instance of dot1dTpFdbPort was -+ learned, and is being used. -+ self(4) : the value of the corresponding -+ instance of dot1dTpFdbAddress -+ represents one of the bridge's -+ addresses. The corresponding -+ instance of dot1dTpFdbPort -+ indicates which of the bridge's -+ ports has this address. -+ mgmt(5) : the value of the corresponding -+ instance of dot1dTpFdbAddress is -+ also the value of an existing -+ instance of dot1dStaticAddress." -+ ::= { dot1dTpFdbEntry 3 } -+ -+-- Port Table for Transparent Bridges -+ -+dot1dTpPortTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dTpPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains information about every -+ port that is associated with this transparent -+ bridge." -+ ::= { dot1dTp 4 } -+ -+dot1dTpPortEntry OBJECT-TYPE -+ SYNTAX Dot1dTpPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information for each port of a -+ transparent bridge." -+ INDEX { dot1dTpPort } -+ ::= { dot1dTpPortTable 1 } -+ -+Dot1dTpPortEntry ::= -+ SEQUENCE { -+ dot1dTpPort -+ INTEGER, -+ dot1dTpPortMaxInfo -+ INTEGER, -+ dot1dTpPortInFrames -+ Counter, -+ dot1dTpPortOutFrames -+ Counter, -+ dot1dTpPortInDiscards -+ Counter -+ } -+ -+dot1dTpPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port for which this entry -+ contains Transparent bridging management -+ information." -+ ::= { dot1dTpPortEntry 1 } -+ -+-- It would be nice if we could use ifMtu as the size of the -+-- largest INFO field, but we can't because ifMtu is defined -+-- to be the size that the (inter-)network layer can use which -+-- can differ from the MAC layer (especially if several layers -+-- of encapsulation are used). -+ -+dot1dTpPortMaxInfo OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The maximum size of the INFO (non-MAC) field that -+ this port will receive or transmit." -+ ::= { dot1dTpPortEntry 2 } -+ -+dot1dTpPortInFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames that have been received by -+ this port from its segment. Note that a frame -+ received on the interface corresponding to this -+ port is only counted by this object if and only if -+ it is for a protocol being processed by the local -+ bridging function, including bridge management -+ frames." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dTpPortEntry 3 } -+ -+dot1dTpPortOutFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames that have been transmitted -+ by this port to its segment. Note that a frame -+ transmitted on the interface corresponding to this -+ port is only counted by this object if and only if -+ it is for a protocol being processed by the local -+ bridging function, including bridge management -+ frames." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dTpPortEntry 4 } -+ -+dot1dTpPortInDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "Count of valid frames received which were -+ discarded (i.e., filtered) by the Forwarding -+ Process." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dTpPortEntry 5 } -+-- The Static (Destination-Address Filtering) Database -+ -+-- Implementation of this group is optional. -+ -+dot1dStaticTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dStaticEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table containing filtering information -+ configured into the bridge by (local or network) -+ management specifying the set of ports to which -+ frames received from specific ports and containing -+ specific destination addresses are allowed to be -+ forwarded. The value of zero in this table as the -+ port number from which frames with a specific -+ destination address are received, is used to -+ specify all ports for which there is no specific -+ entry in this table for that particular -+ destination address. Entries are valid for -+ unicast and for group/broadcast addresses." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.7.2" -+ ::= { dot1dStatic 1 } -+ -+dot1dStaticEntry OBJECT-TYPE -+ SYNTAX Dot1dStaticEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "Filtering information configured into the bridge -+ by (local or network) management specifying the -+ set of ports to which frames received from a -+ specific port and containing a specific -+ destination address are allowed to be forwarded." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.7.2" -+ INDEX { dot1dStaticAddress, dot1dStaticReceivePort } -+ ::= { dot1dStaticTable 1 } -+ -+Dot1dStaticEntry ::= -+ SEQUENCE { -+ dot1dStaticAddress -+ MacAddress, -+ dot1dStaticReceivePort -+ INTEGER, -+ dot1dStaticAllowedToGoTo -+ OCTET STRING, -+ dot1dStaticStatus -+ INTEGER -+ } -+ -+dot1dStaticAddress OBJECT-TYPE -+ SYNTAX MacAddress -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The destination MAC address in a frame to which -+ this entry's filtering information applies. This -+ object can take the value of a unicast address, a -+ group address or the broadcast address." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 3.9.1, 3.9.2" -+ ::= { dot1dStaticEntry 1 } -+ -+dot1dStaticReceivePort OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "Either the value '0', or the port number of the -+ port from which a frame must be received in order -+ for this entry's filtering information to apply. -+ A value of zero indicates that this entry applies -+ on all ports of the bridge for which there is no -+ other applicable entry." -+ ::= { dot1dStaticEntry 2 } -+ -+dot1dStaticAllowedToGoTo OBJECT-TYPE -+ SYNTAX OCTET STRING -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The set of ports to which frames received from a -+ specific port and destined for a specific MAC -+ -+ address, are allowed to be forwarded. Each octet -+ within the value of this object specifies a set of -+ eight ports, with the first octet specifying ports -+ 1 through 8, the second octet specifying ports 9 -+ through 16, etc. Within each octet, the most -+ significant bit represents the lowest numbered -+ port, and the least significant bit represents the -+ highest numbered port. Thus, each port of the -+ bridge is represented by a single bit within the -+ value of this object. If that bit has a value of -+ '1' then that port is included in the set of -+ ports; the port is not included if its bit has a -+ value of '0'. (Note that the setting of the bit -+ corresponding to the port from which a frame is -+ received is irrelevant.) The default value of -+ this object is a string of ones of appropriate -+ length." -+ ::= { dot1dStaticEntry 3 } -+ -+dot1dStaticStatus OBJECT-TYPE -+ SYNTAX INTEGER { -+ other(1), -+ invalid(2), -+ permanent(3), -+ deleteOnReset(4), -+ deleteOnTimeout(5) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "This object indicates the status of this entry. -+ The default value is permanent(3). -+ other(1) - this entry is currently in use but -+ the conditions under which it will -+ remain so are different from each of the -+ following values. -+ invalid(2) - writing this value to the object -+ removes the corresponding entry. -+ permanent(3) - this entry is currently in use -+ and will remain so after the next reset -+ of the bridge. -+ deleteOnReset(4) - this entry is currently in -+ use and will remain so until the next -+ reset of the bridge. -+ deleteOnTimeout(5) - this entry is currently -+ in use and will remain so until it is -+ aged out." -+ -+ ::= { dot1dStaticEntry 4 } -+ -+-- Traps for use by Bridges -+ -+-- Traps for the Spanning Tree Protocol -+ -+newRoot TRAP-TYPE -+ ENTERPRISE dot1dBridge -+ DESCRIPTION -+ "The newRoot trap indicates that the sending agent -+ has become the new root of the Spanning Tree; the -+ trap is sent by a bridge soon after its election -+ as the new root, e.g., upon expiration of the -+ Topology Change Timer immediately subsequent to -+ its election. Implementation of this trap is -+ optional." -+ ::= 1 -+ -+topologyChange TRAP-TYPE -+ ENTERPRISE dot1dBridge -+ DESCRIPTION -+ "A topologyChange trap is sent by a bridge when -+ any of its configured ports transitions from the -+ Learning state to the Forwarding state, or from -+ the Forwarding state to the Blocking state. The -+ trap is not sent if a newRoot trap is sent for the -+ same transition. Implementation of this trap is -+ optional." -+ ::= 2 -+ -+END -diff -ruN net-snmp-5.1.2-orig/mibs/GNOME-SMI.txt net-snmp-5.1.2-5/mibs/GNOME-SMI.txt ---- net-snmp-5.1.2-orig/mibs/GNOME-SMI.txt 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/mibs/GNOME-SMI.txt 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,72 @@ -+GNOME-SMI DEFINITIONS ::= BEGIN -+ -+IMPORTS -+ MODULE-IDENTITY, -+ OBJECT-IDENTITY, -+ enterprises -+ FROM SNMPv2-SMI; -+ -+gnome MODULE-IDENTITY -+ LAST-UPDATED "200312070000Z" -+ ORGANIZATION "GNOME project" -+ CONTACT-INFO -+ "GNU Network Object Model Environment project -+ -+ see http://www.gnome.org for contact persons of a particular -+ area or subproject of GNOME. -+ -+ Administrative contact for MIB module: -+ -+ Jochen Friedrich -+ Buedingerstr. 30b -+ 63546 Hammersbach -+ Germany -+ -+ email: jochen@scram.de" -+ DESCRIPTION -+ "The Structure of GNOME." -+ -+ -- revision history -+ -+ REVISION "9809010000Z" -- September 01, 1998 -+ DESCRIPTION -+ "Initial version." -+ -+ REVISION "200312070000Z" -- December 07, 2003 -+ DESCRIPTION -+ "Added gnomeSysadmin subtree for GNOME project system administration. -+ Updated contact info." -+ -+ ::= { enterprises 3317 } -- assigned by IANA -+ -+gnomeProducts OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeProducts is the root OBJECT IDENTIFIER from -+ which sysObjectID values are assigned." -+ ::= { gnome 1 } -+ -+gnomeMgmt OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeMgmt defines the subtree for production GNOME related -+ MIB registrations." -+ ::= { gnome 2 } -+ -+gnomeTest OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeTest defines the subtree for testing GNOME related -+ MIB registrations." -+ ::= { gnome 3 } -+ -+gnomeSysadmin OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeSysadmin defines the subtree for GNOME related Sysadmin -+ MIB registrations." -+ ::= { gnome 4 } -+ -+-- more to come if necessary. -+ -+END -diff -ruN net-snmp-5.1.2-orig/mibs/Makefile.in net-snmp-5.1.2-5/mibs/Makefile.in ---- net-snmp-5.1.2-orig/mibs/Makefile.in 2004-06-18 20:11:15.000000000 +0200 -+++ net-snmp-5.1.2-5/mibs/Makefile.in 2005-03-13 16:17:21.000000000 +0100 -@@ -43,11 +43,15 @@ - UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \ - UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt - -+EXTRAMIBS = BGP4-MIB.txt BRIDGE-MIB.txt GNOME-SMI.txt OSPF-MIB.txt \ -+ OSPF-TRAP-MIB.txt RIPv2-MIB.txt SOURCE-ROUTING-MIB.txt \ -+ LM-SENSORS-MIB.txt -+ - DEFAULTMIBS = @default_mibs_install@ - - MIBS = $(V1MIBS) $(V2MIBS) $(V3MIBS) $(RFCMIBS) \ - $(AGENTMIBS) $(IANAMIBS) \ -- $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) -+ $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) $(EXTRAMIBS) - - all: standardall - -diff -ruN net-snmp-5.1.2-orig/mibs/OSPF-MIB.txt net-snmp-5.1.2-5/mibs/OSPF-MIB.txt ---- net-snmp-5.1.2-orig/mibs/OSPF-MIB.txt 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/mibs/OSPF-MIB.txt 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,2723 @@ -+OSPF-MIB DEFINITIONS ::= BEGIN -+ -+ IMPORTS -+ MODULE-IDENTITY, OBJECT-TYPE, Counter32, Gauge32, -+ Integer32, IpAddress -+ FROM SNMPv2-SMI -+ TEXTUAL-CONVENTION, TruthValue, RowStatus -+ FROM SNMPv2-TC -+ MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF -+ mib-2 FROM RFC1213-MIB; -+ -+-- This MIB module uses the extended OBJECT-TYPE macro as -+-- defined in [9]. -+ -+ospf MODULE-IDENTITY -+ LAST-UPDATED "9501201225Z" -- Fri Jan 20 12:25:50 PST 1995 -+ ORGANIZATION "IETF OSPF Working Group" -+ CONTACT-INFO -+ " Fred Baker -+ Postal: Cisco Systems -+ 519 Lado Drive -+ Santa Barbara, California 93111 -+ Tel: +1 805 681 0115 -+ E-Mail: fred@cisco.com -+ -+ Rob Coltun -+ Postal: RainbowBridge Communications -+ Tel: (301) 340-9416 -+ E-Mail: rcoltun@rainbow-bridge.com" -+ DESCRIPTION -+ "The MIB module to describe the OSPF Version 2 -+ Protocol" -+ ::= { mib-2 14 } -+ -+-- The Area ID, in OSPF, has the same format as an IP Address, -+-- but has the function of defining a summarization point for -+-- Link State Advertisements -+ -+AreaID ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "An OSPF Area Identifier." -+ SYNTAX IpAddress -+ -+ -+-- The Router ID, in OSPF, has the same format as an IP Address, -+-- but identifies the router independent of its IP Address. -+ -+RouterID ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "A OSPF Router Identifier." -+ SYNTAX IpAddress -+ -+ -+-- The OSPF Metric is defined as an unsigned value in the range -+ -+Metric ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The OSPF Internal Metric." -+ SYNTAX Integer32 (0..'FFFF'h) -+ -+BigMetric ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The OSPF External Metric." -+ SYNTAX Integer32 (0..'FFFFFF'h) -+ -+-- Status Values -+ -+Status ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The status of an interface: 'enabled' indicates that -+ it is willing to communicate with other OSPF Routers, -+ while 'disabled' indicates that it is not." -+ SYNTAX INTEGER { enabled (1), disabled (2) } -+ -+-- Time Durations measured in seconds -+ -+PositiveInteger ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "A positive integer. Values in excess are precluded as -+ unnecessary and prone to interoperability issues." -+ SYNTAX Integer32 (0..'7FFFFFFF'h) -+ -+HelloRange ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The range of intervals on which hello messages are -+ exchanged." -+ SYNTAX Integer32 (1..'FFFF'h) -+ -+UpToMaxAge ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The values that one might find or configure for -+ variables bounded by the maximum age of an LSA." -+ SYNTAX Integer32 (0..3600) -+ -+ -+-- The range of ifIndex -+ -+InterfaceIndex ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The range of ifIndex." -+ SYNTAX Integer32 -+ -+ -+-- Potential Priorities for the Designated Router Election -+ -+DesignatedRouterPriority ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The values defined for the priority of a system for -+ becoming the designated router." -+ SYNTAX Integer32 (0..'FF'h) -+ -+TOSType ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "Type of Service is defined as a mapping to the IP Type of -+ Service Flags as defined in the IP Forwarding Table MIB -+ -+ +-----+-----+-----+-----+-----+-----+-----+-----+ -+ | | | | -+ | PRECEDENCE | TYPE OF SERVICE | 0 | -+ | | | | -+ +-----+-----+-----+-----+-----+-----+-----+-----+ -+ -+ IP TOS IP TOS -+ Field Policy Field Policy -+ -+ Contents Code Contents Code -+ 0 0 0 0 ==> 0 0 0 0 1 ==> 2 -+ 0 0 1 0 ==> 4 0 0 1 1 ==> 6 -+ 0 1 0 0 ==> 8 0 1 0 1 ==> 10 -+ 0 1 1 0 ==> 12 0 1 1 1 ==> 14 -+ 1 0 0 0 ==> 16 1 0 0 1 ==> 18 -+ 1 0 1 0 ==> 20 1 0 1 1 ==> 22 -+ 1 1 0 0 ==> 24 1 1 0 1 ==> 26 -+ 1 1 1 0 ==> 28 1 1 1 1 ==> 30 -+ -+ The remaining values are left for future definition." -+ SYNTAX Integer32 (0..30) -+ -+ -+-- OSPF General Variables -+ -+-- These parameters apply globally to the Router's -+-- OSPF Process. -+ -+ospfGeneralGroup OBJECT IDENTIFIER ::= { ospf 1 } -+ -+ -+ ospfRouterId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer uniquely identifying the -+ router in the Autonomous System. -+ -+ By convention, to ensure uniqueness, this -+ should default to the value of one of the -+ router's IP interface addresses." -+ REFERENCE -+ "OSPF Version 2, C.1 Global parameters" -+ ::= { ospfGeneralGroup 1 } -+ -+ -+ ospfAdminStat OBJECT-TYPE -+ SYNTAX Status -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The administrative status of OSPF in the -+ router. The value 'enabled' denotes that the -+ OSPF Process is active on at least one inter- -+ face; 'disabled' disables it on all inter- -+ faces." -+ ::= { ospfGeneralGroup 2 } -+ -+ ospfVersionNumber OBJECT-TYPE -+ SYNTAX INTEGER { version2 (2) } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The current version number of the OSPF proto- -+ col is 2." -+ REFERENCE -+ "OSPF Version 2, Title" -+ ::= { ospfGeneralGroup 3 } -+ -+ -+ ospfAreaBdrRtrStatus OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A flag to note whether this router is an area -+ border router." -+ REFERENCE -+ "OSPF Version 2, Section 3 Splitting the AS into -+ Areas" -+ ::= { ospfGeneralGroup 4 } -+ -+ -+ ospfASBdrRtrStatus OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "A flag to note whether this router is config- -+ ured as an Autonomous System border router." -+ REFERENCE -+ "OSPF Version 2, Section 3.3 Classification of -+ routers" -+ ::= { ospfGeneralGroup 5 } -+ -+ ospfExternLsaCount OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of external (LS type 5) link-state -+ advertisements in the link-state database." -+ REFERENCE -+ "OSPF Version 2, Appendix A.4.5 AS external link -+ advertisements" -+ ::= { ospfGeneralGroup 6 } -+ -+ -+ ospfExternLsaCksumSum OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32-bit unsigned sum of the LS checksums of -+ the external link-state advertisements con- -+ tained in the link-state database. This sum -+ can be used to determine if there has been a -+ change in a router's link state database, and -+ to compare the link-state database of two -+ routers." -+ ::= { ospfGeneralGroup 7 } -+ -+ -+ ospfTOSSupport OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The router's support for type-of-service rout- -+ ing." -+ REFERENCE -+ "OSPF Version 2, Appendix F.1.2 Optional TOS -+ support" -+ ::= { ospfGeneralGroup 8 } -+ -+ ospfOriginateNewLsas OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of new link-state advertisements -+ that have been originated. This number is in- -+ cremented each time the router originates a new -+ LSA." -+ ::= { ospfGeneralGroup 9 } -+ -+ -+ ospfRxNewLsas OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of link-state advertisements re- -+ ceived determined to be new instantiations. -+ This number does not include newer instantia- -+ tions of self-originated link-state advertise- -+ ments." -+ ::= { ospfGeneralGroup 10 } -+ -+ ospfExtLsdbLimit OBJECT-TYPE -+ SYNTAX Integer32 (-1..'7FFFFFFF'h) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The maximum number of non-default AS- -+ external-LSAs entries that can be stored in the -+ link-state database. If the value is -1, then -+ there is no limit. -+ -+ When the number of non-default AS-external-LSAs -+ in a router's link-state database reaches -+ ospfExtLsdbLimit, the router enters Overflow- -+ State. The router never holds more than -+ ospfExtLsdbLimit non-default AS-external-LSAs -+ in its database. OspfExtLsdbLimit MUST be set -+ identically in all routers attached to the OSPF -+ backbone and/or any regular OSPF area. (i.e., -+ OSPF stub areas and NSSAs are excluded)." -+ DEFVAL { -1 } -+ ::= { ospfGeneralGroup 11 } -+ -+ ospfMulticastExtensions OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "A Bit Mask indicating whether the router is -+ forwarding IP multicast (Class D) datagrams -+ based on the algorithms defined in the Multi- -+ cast Extensions to OSPF. -+ -+ Bit 0, if set, indicates that the router can -+ forward IP multicast datagrams in the router's -+ directly attached areas (called intra-area mul- -+ ticast routing). -+ -+ Bit 1, if set, indicates that the router can -+ forward IP multicast datagrams between OSPF -+ areas (called inter-area multicast routing). -+ -+ Bit 2, if set, indicates that the router can -+ forward IP multicast datagrams between Auto- -+ nomous Systems (called inter-AS multicast rout- -+ ing). -+ -+ Only certain combinations of bit settings are -+ allowed, namely: 0 (no multicast forwarding is -+ enabled), 1 (intra-area multicasting only), 3 -+ (intra-area and inter-area multicasting), 5 -+ (intra-area and inter-AS multicasting) and 7 -+ (multicasting everywhere). By default, no mul- -+ ticast forwarding is enabled." -+ DEFVAL { 0 } -+ ::= { ospfGeneralGroup 12 } -+ -+ ospfExitOverflowInterval OBJECT-TYPE -+ SYNTAX PositiveInteger -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The number of seconds that, after entering -+ OverflowState, a router will attempt to leave -+ OverflowState. This allows the router to again -+ originate non-default AS-external-LSAs. When -+ set to 0, the router will not leave Overflow- -+ State until restarted." -+ DEFVAL { 0 } -+ ::= { ospfGeneralGroup 13 } -+ -+ -+ ospfDemandExtensions OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The router's support for demand routing." -+ REFERENCE -+ "OSPF Version 2, Appendix on Demand Routing" -+ ::= { ospfGeneralGroup 14 } -+ -+ -+-- The OSPF Area Data Structure contains information -+-- regarding the various areas. The interfaces and -+-- virtual links are configured as part of these areas. -+-- Area 0.0.0.0, by definition, is the Backbone Area -+ -+ -+ ospfAreaTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfAreaEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information describing the configured parame- -+ ters and cumulative statistics of the router's -+ attached areas." -+ REFERENCE -+ "OSPF Version 2, Section 6 The Area Data Struc- -+ ture" -+ ::= { ospf 2 } -+ -+ -+ ospfAreaEntry OBJECT-TYPE -+ SYNTAX OspfAreaEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information describing the configured parame- -+ ters and cumulative statistics of one of the -+ router's attached areas." -+ INDEX { ospfAreaId } -+ ::= { ospfAreaTable 1 } -+ -+OspfAreaEntry ::= -+ SEQUENCE { -+ ospfAreaId -+ AreaID, -+ ospfAuthType -+ Integer32, -+ ospfImportAsExtern -+ INTEGER, -+ ospfSpfRuns -+ Counter32, -+ ospfAreaBdrRtrCount -+ Gauge32, -+ ospfAsBdrRtrCount -+ Gauge32, -+ ospfAreaLsaCount -+ Gauge32, -+ ospfAreaLsaCksumSum -+ Integer32, -+ ospfAreaSummary -+ INTEGER, -+ ospfAreaStatus -+ RowStatus -+ } -+ -+ ospfAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer uniquely identifying an area. -+ Area ID 0.0.0.0 is used for the OSPF backbone." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaEntry 1 } -+ -+ -+ ospfAuthType OBJECT-TYPE -+ SYNTAX Integer32 -+ -- none (0), -+ -- simplePassword (1) -+ -- md5 (2) -+ -- reserved for specification by IANA (> 2) -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "The authentication type specified for an area. -+ Additional authentication types may be assigned -+ locally on a per Area basis." -+ REFERENCE -+ "OSPF Version 2, Appendix E Authentication" -+ DEFVAL { 0 } -- no authentication, by default -+ ::= { ospfAreaEntry 2 } -+ -+ ospfImportAsExtern OBJECT-TYPE -+ SYNTAX INTEGER { -+ importExternal (1), -+ importNoExternal (2), -+ importNssa (3) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The area's support for importing AS external -+ link- state advertisements." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ DEFVAL { importExternal } -+ ::= { ospfAreaEntry 3 } -+ -+ -+ ospfSpfRuns OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of times that the intra-area route -+ table has been calculated using this area's -+ link-state database. This is typically done -+ using Dijkstra's algorithm." -+ ::= { ospfAreaEntry 4 } -+ -+ -+ ospfAreaBdrRtrCount OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of area border routers reach- -+ able within this area. This is initially zero, -+ and is calculated in each SPF Pass." -+ ::= { ospfAreaEntry 5 } -+ -+ ospfAsBdrRtrCount OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of Autonomous System border -+ routers reachable within this area. This is -+ initially zero, and is calculated in each SPF -+ Pass." -+ ::= { ospfAreaEntry 6 } -+ -+ -+ ospfAreaLsaCount OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of link-state advertisements -+ in this area's link-state database, excluding -+ AS External LSA's." -+ ::= { ospfAreaEntry 7 } -+ -+ -+ ospfAreaLsaCksumSum OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32-bit unsigned sum of the link-state ad- -+ vertisements' LS checksums contained in this -+ area's link-state database. This sum excludes -+ external (LS type 5) link-state advertisements. -+ The sum can be used to determine if there has -+ been a change in a router's link state data- -+ base, and to compare the link-state database of -+ two routers." -+ DEFVAL { 0 } -+ ::= { ospfAreaEntry 8 } -+ -+ ospfAreaSummary OBJECT-TYPE -+ SYNTAX INTEGER { -+ noAreaSummary (1), -+ sendAreaSummary (2) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The variable ospfAreaSummary controls the im- -+ port of summary LSAs into stub areas. It has -+ no effect on other areas. -+ -+ If it is noAreaSummary, the router will neither -+ originate nor propagate summary LSAs into the -+ stub area. It will rely entirely on its de- -+ fault route. -+ -+ If it is sendAreaSummary, the router will both -+ summarize and propagate summary LSAs." -+ DEFVAL { noAreaSummary } -+ ::= { ospfAreaEntry 9 } -+ -+ -+ ospfAreaStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfAreaEntry 10 } -+ -+ -+-- OSPF Area Default Metric Table -+ -+-- The OSPF Area Default Metric Table describes the metrics -+-- that a default Area Border Router will advertise into a -+-- Stub area. -+ -+ -+ ospfStubAreaTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfStubAreaEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The set of metrics that will be advertised by -+ a default Area Border Router into a stub area." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2, Area Parameters" -+ ::= { ospf 3 } -+ -+ -+ ospfStubAreaEntry OBJECT-TYPE -+ SYNTAX OspfStubAreaEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The metric for a given Type of Service that -+ will be advertised by a default Area Border -+ Router into a stub area." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2, Area Parameters" -+ INDEX { ospfStubAreaId, ospfStubTOS } -+ ::= { ospfStubAreaTable 1 } -+ -+OspfStubAreaEntry ::= -+ SEQUENCE { -+ ospfStubAreaId -+ AreaID, -+ ospfStubTOS -+ TOSType, -+ ospfStubMetric -+ BigMetric, -+ ospfStubStatus -+ RowStatus, -+ ospfStubMetricType -+ INTEGER -+ } -+ -+ ospfStubAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32 bit identifier for the Stub Area. On -+ creation, this can be derived from the in- -+ stance." -+ ::= { ospfStubAreaEntry 1 } -+ -+ -+ ospfStubTOS OBJECT-TYPE -+ SYNTAX TOSType -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Type of Service associated with the -+ metric. On creation, this can be derived from -+ the instance." -+ ::= { ospfStubAreaEntry 2 } -+ -+ -+ ospfStubMetric OBJECT-TYPE -+ SYNTAX BigMetric -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The metric value applied at the indicated type -+ of service. By default, this equals the least -+ metric at the type of service among the inter- -+ faces to other areas." -+ ::= { ospfStubAreaEntry 3 } -+ -+ -+ ospfStubStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfStubAreaEntry 4 } -+ -+ ospfStubMetricType OBJECT-TYPE -+ SYNTAX INTEGER { -+ ospfMetric (1), -- OSPF Metric -+ comparableCost (2), -- external type 1 -+ nonComparable (3) -- external type 2 -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the type of metric ad- -+ vertised as a default route." -+ DEFVAL { ospfMetric } -+ ::= { ospfStubAreaEntry 5 } -+ -+-- OSPF Link State Database -+ -+-- The Link State Database contains the Link State -+-- Advertisements from throughout the areas that the -+-- device is attached to. -+ -+ -+ ospfLsdbTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfLsdbEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The OSPF Process's Link State Database." -+ REFERENCE -+ "OSPF Version 2, Section 12 Link State Adver- -+ tisements" -+ ::= { ospf 4 } -+ -+ -+ ospfLsdbEntry OBJECT-TYPE -+ SYNTAX OspfLsdbEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A single Link State Advertisement." -+ INDEX { ospfLsdbAreaId, ospfLsdbType, -+ ospfLsdbLsid, ospfLsdbRouterId } -+ ::= { ospfLsdbTable 1 } -+ -+OspfLsdbEntry ::= -+ SEQUENCE { -+ ospfLsdbAreaId -+ AreaID, -+ ospfLsdbType -+ INTEGER, -+ ospfLsdbLsid -+ IpAddress, -+ ospfLsdbRouterId -+ RouterID, -+ ospfLsdbSequence -+ Integer32, -+ ospfLsdbAge -+ Integer32, -+ ospfLsdbChecksum -+ Integer32, -+ ospfLsdbAdvertisement -+ OCTET STRING -+ } -+ ospfLsdbAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32 bit identifier of the Area from which -+ the LSA was received." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfLsdbEntry 1 } -+ -+-- External Link State Advertisements are permitted -+-- for backward compatibility, but should be displayed in -+-- the ospfExtLsdbTable rather than here. -+ -+ ospfLsdbType OBJECT-TYPE -+ SYNTAX INTEGER { -+ routerLink (1), -+ networkLink (2), -+ summaryLink (3), -+ asSummaryLink (4), -+ asExternalLink (5), -- but see ospfExtLsdbTable -+ multicastLink (6), -+ nssaExternalLink (7) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The type of the link state advertisement. -+ Each link state type has a separate advertise- -+ ment format." -+ REFERENCE -+ "OSPF Version 2, Appendix A.4.1 The Link State -+ Advertisement header" -+ ::= { ospfLsdbEntry 2 } -+ -+ ospfLsdbLsid OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Link State ID is an LS Type Specific field -+ containing either a Router ID or an IP Address; -+ it identifies the piece of the routing domain -+ that is being described by the advertisement." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.4 Link State ID" -+ ::= { ospfLsdbEntry 3 } -+ ospfLsdbRouterId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32 bit number that uniquely identifies the -+ originating router in the Autonomous System." -+ REFERENCE -+ "OSPF Version 2, Appendix C.1 Global parameters" -+ ::= { ospfLsdbEntry 4 } -+ -+-- Note that the OSPF Sequence Number is a 32 bit signed -+-- integer. It starts with the value '80000001'h, -+-- or -'7FFFFFFF'h, and increments until '7FFFFFFF'h -+-- Thus, a typical sequence number will be very negative. -+ -+ ospfLsdbSequence OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The sequence number field is a signed 32-bit -+ integer. It is used to detect old and dupli- -+ cate link state advertisements. The space of -+ sequence numbers is linearly ordered. The -+ larger the sequence number the more recent the -+ advertisement." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.6 LS sequence -+ number" -+ ::= { ospfLsdbEntry 5 } -+ -+ -+ ospfLsdbAge OBJECT-TYPE -+ SYNTAX Integer32 -- Should be 0..MaxAge -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This field is the age of the link state adver- -+ tisement in seconds." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.1 LS age" -+ ::= { ospfLsdbEntry 6 } -+ -+ ospfLsdbChecksum OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This field is the checksum of the complete -+ contents of the advertisement, excepting the -+ age field. The age field is excepted so that -+ an advertisement's age can be incremented -+ without updating the checksum. The checksum -+ used is the same that is used for ISO connec- -+ tionless datagrams; it is commonly referred to -+ as the Fletcher checksum." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.7 LS checksum" -+ ::= { ospfLsdbEntry 7 } -+ -+ -+ ospfLsdbAdvertisement OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (1..65535)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The entire Link State Advertisement, including -+ its header." -+ REFERENCE -+ "OSPF Version 2, Section 12 Link State Adver- -+ tisements" -+ ::= { ospfLsdbEntry 8 } -+ -+ -+-- Address Range Table -+ -+-- The Address Range Table acts as an adjunct to the Area -+-- Table; It describes those Address Range Summaries that -+-- are configured to be propagated from an Area to reduce -+-- the amount of information about it which is known beyond -+-- its borders. -+ -+ ospfAreaRangeTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfAreaRangeEntry -+ MAX-ACCESS not-accessible -+ STATUS obsolete -+ DESCRIPTION -+ "A range if IP addresses specified by an IP -+ address/IP network mask pair. For example, -+ class B address range of X.X.X.X with a network -+ mask of 255.255.0.0 includes all IP addresses -+ from X.X.0.0 to X.X.255.255" -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospf 5 } -+ ospfAreaRangeEntry OBJECT-TYPE -+ SYNTAX OspfAreaRangeEntry -+ MAX-ACCESS not-accessible -+ STATUS obsolete -+ DESCRIPTION -+ "A range if IP addresses specified by an IP -+ address/IP network mask pair. For example, -+ class B address range of X.X.X.X with a network -+ mask of 255.255.0.0 includes all IP addresses -+ from X.X.0.0 to X.X.255.255" -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ INDEX { ospfAreaRangeAreaId, ospfAreaRangeNet } -+ ::= { ospfAreaRangeTable 1 } -+ -+OspfAreaRangeEntry ::= -+ SEQUENCE { -+ ospfAreaRangeAreaId -+ AreaID, -+ ospfAreaRangeNet -+ IpAddress, -+ ospfAreaRangeMask -+ IpAddress, -+ ospfAreaRangeStatus -+ RowStatus, -+ ospfAreaRangeEffect -+ INTEGER -+ } -+ -+ ospfAreaRangeAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The Area the Address Range is to be found -+ within." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaRangeEntry 1 } -+ -+ -+ ospfAreaRangeNet OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The IP Address of the Net or Subnet indicated -+ by the range." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaRangeEntry 2 } -+ -+ -+ ospfAreaRangeMask OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "The Subnet Mask that pertains to the Net or -+ Subnet." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaRangeEntry 3 } -+ -+ ospfAreaRangeStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfAreaRangeEntry 4 } -+ -+ -+ ospfAreaRangeEffect OBJECT-TYPE -+ SYNTAX INTEGER { -+ advertiseMatching (1), -+ doNotAdvertiseMatching (2) -+ } -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "Subnets subsumed by ranges either trigger the -+ advertisement of the indicated summary (adver- -+ tiseMatching), or result in the subnet's not -+ being advertised at all outside the area." -+ DEFVAL { advertiseMatching } -+ ::= { ospfAreaRangeEntry 5 } -+ -+ -+ -+-- OSPF Host Table -+ -+-- The Host/Metric Table indicates what hosts are directly -+-- attached to the Router, and what metrics and types of -+-- service should be advertised for them. -+ -+ ospfHostTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfHostEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The list of Hosts, and their metrics, that the -+ router will advertise as host routes." -+ REFERENCE -+ "OSPF Version 2, Appendix C.6 Host route param- -+ eters" -+ ::= { ospf 6 } -+ -+ -+ ospfHostEntry OBJECT-TYPE -+ SYNTAX OspfHostEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A metric to be advertised, for a given type of -+ service, when a given host is reachable." -+ INDEX { ospfHostIpAddress, ospfHostTOS } -+ ::= { ospfHostTable 1 } -+ -+OspfHostEntry ::= -+ SEQUENCE { -+ ospfHostIpAddress -+ IpAddress, -+ ospfHostTOS -+ TOSType, -+ ospfHostMetric -+ Metric, -+ ospfHostStatus -+ RowStatus, -+ ospfHostAreaID -+ AreaID -+ } -+ -+ ospfHostIpAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of the Host." -+ REFERENCE -+ "OSPF Version 2, Appendix C.6 Host route parame- -+ ters" -+ ::= { ospfHostEntry 1 } -+ -+ -+ ospfHostTOS OBJECT-TYPE -+ SYNTAX TOSType -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Type of Service of the route being config- -+ ured." -+ REFERENCE -+ "OSPF Version 2, Appendix C.6 Host route parame- -+ ters" -+ ::= { ospfHostEntry 2 } -+ -+ -+ ospfHostMetric OBJECT-TYPE -+ SYNTAX Metric -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The Metric to be advertised." -+ REFERENCE -+ "OSPF Version 2, Appendix C.6 Host route parame- -+ ters" -+ ::= { ospfHostEntry 3 } -+ -+ ospfHostStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfHostEntry 4 } -+ -+ -+ ospfHostAreaID OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Area the Host Entry is to be found within. -+ By default, the area that a subsuming OSPF in- -+ terface is in, or 0.0.0.0" -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfHostEntry 5 } -+ -+ -+-- OSPF Interface Table -+ -+-- The OSPF Interface Table augments the ipAddrTable -+-- with OSPF specific information. -+ -+ ospfIfTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfIfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The OSPF Interface Table describes the inter- -+ faces from the viewpoint of OSPF." -+ REFERENCE -+ "OSPF Version 2, Appendix C.3 Router interface -+ parameters" -+ ::= { ospf 7 } -+ -+ -+ ospfIfEntry OBJECT-TYPE -+ SYNTAX OspfIfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The OSPF Interface Entry describes one inter- -+ face from the viewpoint of OSPF." -+ INDEX { ospfIfIpAddress, ospfAddressLessIf } -+ ::= { ospfIfTable 1 } -+ -+OspfIfEntry ::= -+ SEQUENCE { -+ ospfIfIpAddress -+ IpAddress, -+ ospfAddressLessIf -+ Integer32, -+ ospfIfAreaId -+ AreaID, -+ ospfIfType -+ INTEGER, -+ ospfIfAdminStat -+ Status, -+ ospfIfRtrPriority -+ DesignatedRouterPriority, -+ ospfIfTransitDelay -+ UpToMaxAge, -+ ospfIfRetransInterval -+ UpToMaxAge, -+ ospfIfHelloInterval -+ HelloRange, -+ ospfIfRtrDeadInterval -+ PositiveInteger, -+ ospfIfPollInterval -+ PositiveInteger, -+ ospfIfState -+ INTEGER, -+ ospfIfDesignatedRouter -+ IpAddress, -+ ospfIfBackupDesignatedRouter -+ IpAddress, -+ ospfIfEvents -+ Counter32, -+ ospfIfAuthType -+ INTEGER, -+ ospfIfAuthKey -+ OCTET STRING, -+ ospfIfStatus -+ RowStatus, -+ ospfIfMulticastForwarding -+ INTEGER, -+ ospfIfDemand -+ TruthValue -+ } -+ -+ ospfIfIpAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of this OSPF interface." -+ ::= { ospfIfEntry 1 } -+ -+ ospfAddressLessIf OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "For the purpose of easing the instancing of -+ addressed and addressless interfaces; This -+ variable takes the value 0 on interfaces with -+ IP Addresses, and the corresponding value of -+ ifIndex for interfaces having no IP Address." -+ ::= { ospfIfEntry 2 } -+ ospfIfAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer uniquely identifying the area -+ to which the interface connects. Area ID -+ 0.0.0.0 is used for the OSPF backbone." -+ DEFVAL { '00000000'H } -- 0.0.0.0 -+ ::= { ospfIfEntry 3 } -+ -+ ospfIfType OBJECT-TYPE -+ SYNTAX INTEGER { -+ broadcast (1), -+ nbma (2), -+ pointToPoint (3), -+ pointToMultipoint (5) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The OSPF interface type. -+ -+ By way of a default, this field may be intuited -+ from the corresponding value of ifType. Broad- -+ cast LANs, such as Ethernet and IEEE 802.5, -+ take the value 'broadcast', X.25 and similar -+ technologies take the value 'nbma', and links -+ that are definitively point to point take the -+ value 'pointToPoint'." -+ ::= { ospfIfEntry 4 } -+ -+ -+ ospfIfAdminStat OBJECT-TYPE -+ SYNTAX Status -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The OSPF interface's administrative status. -+ The value formed on the interface, and the in- -+ terface will be advertised as an internal route -+ to some area. The value 'disabled' denotes -+ that the interface is external to OSPF." -+ DEFVAL { enabled } -+ ::= { ospfIfEntry 5 } -+ -+ ospfIfRtrPriority OBJECT-TYPE -+ SYNTAX DesignatedRouterPriority -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The priority of this interface. Used in -+ multi-access networks, this field is used in -+ the designated router election algorithm. The -+ value 0 signifies that the router is not eligi- -+ ble to become the designated router on this -+ particular network. In the event of a tie in -+ this value, routers will use their Router ID as -+ a tie breaker." -+ DEFVAL { 1 } -+ ::= { ospfIfEntry 6 } -+ -+ -+ ospfIfTransitDelay OBJECT-TYPE -+ SYNTAX UpToMaxAge -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The estimated number of seconds it takes to -+ transmit a link state update packet over this -+ interface." -+ DEFVAL { 1 } -+ ::= { ospfIfEntry 7 } -+ -+ -+ ospfIfRetransInterval OBJECT-TYPE -+ SYNTAX UpToMaxAge -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The number of seconds between link-state ad- -+ vertisement retransmissions, for adjacencies -+ belonging to this interface. This value is -+ also used when retransmitting database descrip- -+ tion and link-state request packets." -+ DEFVAL { 5 } -+ ::= { ospfIfEntry 8 } -+ -+ -+ ospfIfHelloInterval OBJECT-TYPE -+ SYNTAX HelloRange -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The length of time, in seconds, between the -+ Hello packets that the router sends on the in- -+ terface. This value must be the same for all -+ routers attached to a common network." -+ DEFVAL { 10 } -+ ::= { ospfIfEntry 9 } -+ -+ -+ ospfIfRtrDeadInterval OBJECT-TYPE -+ SYNTAX PositiveInteger -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The number of seconds that a router's Hello -+ packets have not been seen before it's neigh- -+ bors declare the router down. This should be -+ some multiple of the Hello interval. This -+ value must be the same for all routers attached -+ to a common network." -+ DEFVAL { 40 } -+ ::= { ospfIfEntry 10 } -+ -+ -+ ospfIfPollInterval OBJECT-TYPE -+ SYNTAX PositiveInteger -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The larger time interval, in seconds, between -+ the Hello packets sent to an inactive non- -+ broadcast multi- access neighbor." -+ DEFVAL { 120 } -+ ::= { ospfIfEntry 11 } -+ -+ -+ ospfIfState OBJECT-TYPE -+ SYNTAX INTEGER { -+ down (1), -+ loopback (2), -+ waiting (3), -+ pointToPoint (4), -+ designatedRouter (5), -+ backupDesignatedRouter (6), -+ otherDesignatedRouter (7) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The OSPF Interface State." -+ DEFVAL { down } -+ ::= { ospfIfEntry 12 } -+ -+ -+ ospfIfDesignatedRouter OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of the Designated Router." -+ DEFVAL { '00000000'H } -- 0.0.0.0 -+ ::= { ospfIfEntry 13 } -+ -+ -+ ospfIfBackupDesignatedRouter OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of the Backup Designated -+ Router." -+ DEFVAL { '00000000'H } -- 0.0.0.0 -+ ::= { ospfIfEntry 14 } -+ -+ ospfIfEvents OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of times this OSPF interface has -+ changed its state, or an error has occurred." -+ ::= { ospfIfEntry 15 } -+ -+ -+ ospfIfAuthKey OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (0..256)) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The Authentication Key. If the Area's Author- -+ ization Type is simplePassword, and the key -+ length is shorter than 8 octets, the agent will -+ left adjust and zero fill to 8 octets. -+ -+ Note that unauthenticated interfaces need no -+ authentication key, and simple password authen- -+ tication cannot use a key of more than 8 oc- -+ tets. Larger keys are useful only with authen- -+ tication mechanisms not specified in this docu- -+ ment. -+ -+ When read, ospfIfAuthKey always returns an Oc- -+ tet String of length zero." -+ REFERENCE -+ "OSPF Version 2, Section 9 The Interface Data -+ Structure" -+ DEFVAL { '0000000000000000'H } -- 0.0.0.0.0.0.0.0 -+ ::= { ospfIfEntry 16 } -+ -+ ospfIfStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfIfEntry 17 } -+ -+ -+ ospfIfMulticastForwarding OBJECT-TYPE -+ SYNTAX INTEGER { -+ blocked (1), -- no multicast forwarding -+ multicast (2), -- using multicast address -+ unicast (3) -- to each OSPF neighbor -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The way multicasts should forwarded on this -+ interface; not forwarded, forwarded as data -+ link multicasts, or forwarded as data link uni- -+ casts. Data link multicasting is not meaning- -+ ful on point to point and NBMA interfaces, and -+ setting ospfMulticastForwarding to 0 effective- -+ ly disables all multicast forwarding." -+ DEFVAL { blocked } -+ ::= { ospfIfEntry 18 } -+ -+ -+ ospfIfDemand OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "Indicates whether Demand OSPF procedures (hel- -+ lo supression to FULL neighbors and setting the -+ DoNotAge flag on proogated LSAs) should be per- -+ formed on this interface." -+ DEFVAL { false } -+ ::= { ospfIfEntry 19 } -+ -+ -+ ospfIfAuthType OBJECT-TYPE -+ SYNTAX INTEGER (0..255) -+ -- none (0), -+ -- simplePassword (1) -+ -- md5 (2) -+ -- reserved for specification by IANA (> 2) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The authentication type specified for an in- -+ terface. Additional authentication types may -+ be assigned locally." -+ REFERENCE -+ "OSPF Version 2, Appendix E Authentication" -+ DEFVAL { 0 } -- no authentication, by default -+ ::= { ospfIfEntry 20 } -+ -+ -+-- OSPF Interface Metric Table -+ -+-- The Metric Table describes the metrics to be advertised -+-- for a specified interface at the various types of service. -+-- As such, this table is an adjunct of the OSPF Interface -+-- Table. -+ -+-- Types of service, as defined by RFC 791, have the ability -+-- to request low delay, high bandwidth, or reliable linkage. -+ -+-- For the purposes of this specification, the measure of -+-- bandwidth -+ -+-- Metric = 10^8 / ifSpeed -+ -+-- is the default value. For multiple link interfaces, note -+-- that ifSpeed is the sum of the individual link speeds. -+-- This yields a number having the following typical values: -+ -+-- Network Type/bit rate Metric -+ -+-- >= 100 MBPS 1 -+-- Ethernet/802.3 10 -+-- E1 48 -+-- T1 (ESF) 65 -+-- 64 KBPS 1562 -+-- 56 KBPS 1785 -+-- 19.2 KBPS 5208 -+-- 9.6 KBPS 10416 -+ -+-- Routes that are not specified use the default (TOS 0) metric -+ -+ ospfIfMetricTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfIfMetricEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The TOS metrics for a non-virtual interface -+ identified by the interface index." -+ REFERENCE -+ "OSPF Version 2, Appendix C.3 Router interface -+ parameters" -+ ::= { ospf 8 } -+ -+ ospfIfMetricEntry OBJECT-TYPE -+ SYNTAX OspfIfMetricEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A particular TOS metric for a non-virtual in- -+ terface identified by the interface index." -+ REFERENCE -+ "OSPF Version 2, Appendix C.3 Router interface -+ parameters" -+ INDEX { ospfIfMetricIpAddress, -+ ospfIfMetricAddressLessIf, -+ ospfIfMetricTOS } -+ ::= { ospfIfMetricTable 1 } -+ -+OspfIfMetricEntry ::= -+ SEQUENCE { -+ ospfIfMetricIpAddress -+ IpAddress, -+ ospfIfMetricAddressLessIf -+ Integer32, -+ ospfIfMetricTOS -+ TOSType, -+ ospfIfMetricValue -+ Metric, -+ ospfIfMetricStatus -+ RowStatus -+ } -+ -+ ospfIfMetricIpAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of this OSPF interface. On row -+ creation, this can be derived from the in- -+ stance." -+ ::= { ospfIfMetricEntry 1 } -+ -+ ospfIfMetricAddressLessIf OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "For the purpose of easing the instancing of -+ addressed and addressless interfaces; This -+ variable takes the value 0 on interfaces with -+ IP Addresses, and the value of ifIndex for in- -+ terfaces having no IP Address. On row crea- -+ tion, this can be derived from the instance." -+ ::= { ospfIfMetricEntry 2 } -+ -+ -+ ospfIfMetricTOS OBJECT-TYPE -+ SYNTAX TOSType -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The type of service metric being referenced. -+ On row creation, this can be derived from the -+ instance." -+ ::= { ospfIfMetricEntry 3 } -+ -+ -+ ospfIfMetricValue OBJECT-TYPE -+ SYNTAX Metric -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The metric of using this type of service on -+ this interface. The default value of the TOS 0 -+ Metric is 10^8 / ifSpeed." -+ ::= { ospfIfMetricEntry 4 } -+ -+ ospfIfMetricStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfIfMetricEntry 5 } -+ -+ -+-- OSPF Virtual Interface Table -+ -+-- The Virtual Interface Table describes the virtual -+-- links that the OSPF Process is configured to -+-- carry on. -+ -+ ospfVirtIfTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfVirtIfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information about this router's virtual inter- -+ faces." -+ REFERENCE -+ "OSPF Version 2, Appendix C.4 Virtual link -+ parameters" -+ ::= { ospf 9 } -+ -+ -+ ospfVirtIfEntry OBJECT-TYPE -+ SYNTAX OspfVirtIfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information about a single Virtual Interface." -+ INDEX { ospfVirtIfAreaId, ospfVirtIfNeighbor } -+ ::= { ospfVirtIfTable 1 } -+ -+OspfVirtIfEntry ::= -+ SEQUENCE { -+ ospfVirtIfAreaId -+ AreaID, -+ ospfVirtIfNeighbor -+ RouterID, -+ ospfVirtIfTransitDelay -+ UpToMaxAge, -+ ospfVirtIfRetransInterval -+ UpToMaxAge, -+ ospfVirtIfHelloInterval -+ HelloRange, -+ ospfVirtIfRtrDeadInterval -+ PositiveInteger, -+ ospfVirtIfState -+ INTEGER, -+ ospfVirtIfEvents -+ Counter32, -+ ospfVirtIfAuthType -+ INTEGER, -+ ospfVirtIfAuthKey -+ OCTET STRING, -+ ospfVirtIfStatus -+ RowStatus -+ } -+ -+ ospfVirtIfAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Transit Area that the Virtual Link -+ traverses. By definition, this is not 0.0.0.0" -+ ::= { ospfVirtIfEntry 1 } -+ -+ -+ ospfVirtIfNeighbor OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Router ID of the Virtual Neighbor." -+ ::= { ospfVirtIfEntry 2 } -+ -+ -+ ospfVirtIfTransitDelay OBJECT-TYPE -+ SYNTAX UpToMaxAge -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The estimated number of seconds it takes to -+ transmit a link- state update packet over this -+ interface." -+ DEFVAL { 1 } -+ ::= { ospfVirtIfEntry 3 } -+ -+ -+ ospfVirtIfRetransInterval OBJECT-TYPE -+ SYNTAX UpToMaxAge -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The number of seconds between link-state ad- -+ vertisement retransmissions, for adjacencies -+ belonging to this interface. This value is -+ also used when retransmitting database descrip- -+ tion and link-state request packets. This -+ value should be well over the expected round- -+ trip time." -+ DEFVAL { 5 } -+ ::= { ospfVirtIfEntry 4 } -+ -+ -+ ospfVirtIfHelloInterval OBJECT-TYPE -+ SYNTAX HelloRange -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The length of time, in seconds, between the -+ Hello packets that the router sends on the in- -+ terface. This value must be the same for the -+ virtual neighbor." -+ DEFVAL { 10 } -+ ::= { ospfVirtIfEntry 5 } -+ -+ -+ ospfVirtIfRtrDeadInterval OBJECT-TYPE -+ SYNTAX PositiveInteger -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The number of seconds that a router's Hello -+ packets have not been seen before it's neigh- -+ bors declare the router down. This should be -+ some multiple of the Hello interval. This -+ value must be the same for the virtual neigh- -+ bor." -+ DEFVAL { 60 } -+ ::= { ospfVirtIfEntry 6 } -+ -+ -+ ospfVirtIfState OBJECT-TYPE -+ SYNTAX INTEGER { -+ down (1), -- these use the same encoding -+ pointToPoint (4) -- as the ospfIfTable -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "OSPF virtual interface states." -+ DEFVAL { down } -+ ::= { ospfVirtIfEntry 7 } -+ -+ -+ ospfVirtIfEvents OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of state changes or error events on -+ this Virtual Link" -+ ::= { ospfVirtIfEntry 8 } -+ -+ -+ ospfVirtIfAuthKey OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(0..256)) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "If Authentication Type is simplePassword, the -+ device will left adjust and zero fill to 8 oc- -+ tets. -+ -+ Note that unauthenticated interfaces need no -+ authentication key, and simple password authen- -+ tication cannot use a key of more than 8 oc- -+ tets. Larger keys are useful only with authen- -+ tication mechanisms not specified in this docu- -+ ment. -+ -+ When read, ospfVifAuthKey always returns a -+ string of length zero." -+ REFERENCE -+ "OSPF Version 2, Section 9 The Interface Data -+ Structure" -+ DEFVAL { '0000000000000000'H } -- 0.0.0.0.0.0.0.0 -+ ::= { ospfVirtIfEntry 9 } -+ -+ -+ ospfVirtIfStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfVirtIfEntry 10 } -+ -+ -+ ospfVirtIfAuthType OBJECT-TYPE -+ SYNTAX INTEGER (0..255) -+ -- none (0), -+ -- simplePassword (1) -+ -- md5 (2) -+ -- reserved for specification by IANA (> 2) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The authentication type specified for a virtu- -+ al interface. Additional authentication types -+ may be assigned locally." -+ REFERENCE -+ "OSPF Version 2, Appendix E Authentication" -+ DEFVAL { 0 } -- no authentication, by default -+ ::= { ospfVirtIfEntry 11 } -+ -+ -+-- OSPF Neighbor Table -+ -+-- The OSPF Neighbor Table describes all neighbors in -+-- the locality of the subject router. -+ -+ ospfNbrTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfNbrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A table of non-virtual neighbor information." -+ REFERENCE -+ "OSPF Version 2, Section 10 The Neighbor Data -+ Structure" -+ ::= { ospf 10 } -+ -+ -+ ospfNbrEntry OBJECT-TYPE -+ SYNTAX OspfNbrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The information regarding a single neighbor." -+ REFERENCE -+ "OSPF Version 2, Section 10 The Neighbor Data -+ Structure" -+ INDEX { ospfNbrIpAddr, ospfNbrAddressLessIndex } -+ ::= { ospfNbrTable 1 } -+ -+OspfNbrEntry ::= -+ SEQUENCE { -+ ospfNbrIpAddr -+ IpAddress, -+ ospfNbrAddressLessIndex -+ InterfaceIndex, -+ ospfNbrRtrId -+ RouterID, -+ ospfNbrOptions -+ Integer32, -+ ospfNbrPriority -+ DesignatedRouterPriority, -+ ospfNbrState -+ INTEGER, -+ ospfNbrEvents -+ Counter32, -+ ospfNbrLsRetransQLen -+ Gauge32, -+ ospfNbmaNbrStatus -+ RowStatus, -+ ospfNbmaNbrPermanence -+ INTEGER, -+ ospfNbrHelloSuppressed -+ TruthValue -+ } -+ -+ ospfNbrIpAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address this neighbor is using in its -+ IP Source Address. Note that, on addressless -+ links, this will not be 0.0.0.0, but the ad- -+ dress of another of the neighbor's interfaces." -+ ::= { ospfNbrEntry 1 } -+ -+ -+ ospfNbrAddressLessIndex OBJECT-TYPE -+ SYNTAX InterfaceIndex -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "On an interface having an IP Address, zero. -+ On addressless interfaces, the corresponding -+ value of ifIndex in the Internet Standard MIB. -+ On row creation, this can be derived from the -+ instance." -+ ::= { ospfNbrEntry 2 } -+ -+ -+ ospfNbrRtrId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer (represented as a type IpAd- -+ dress) uniquely identifying the neighboring -+ router in the Autonomous System." -+ DEFVAL { '00000000'H } -- 0.0.0.0 -+ ::= { ospfNbrEntry 3 } -+ -+ -+ ospfNbrOptions OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A Bit Mask corresponding to the neighbor's op- -+ tions field. -+ -+ Bit 0, if set, indicates that the system will -+ operate on Type of Service metrics other than -+ TOS 0. If zero, the neighbor will ignore all -+ metrics except the TOS 0 metric. -+ -+ Bit 1, if set, indicates that the associated -+ area accepts and operates on external informa- -+ tion; if zero, it is a stub area. -+ -+ Bit 2, if set, indicates that the system is ca- -+ pable of routing IP Multicast datagrams; i.e., -+ that it implements the Multicast Extensions to -+ OSPF. -+ -+ Bit 3, if set, indicates that the associated -+ area is an NSSA. These areas are capable of -+ carrying type 7 external advertisements, which -+ are translated into type 5 external advertise- -+ ments at NSSA borders." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.2 Options" -+ DEFVAL { 0 } -+ ::= { ospfNbrEntry 4 } -+ -+ -+ ospfNbrPriority OBJECT-TYPE -+ SYNTAX DesignatedRouterPriority -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The priority of this neighbor in the designat- -+ ed router election algorithm. The value 0 sig- -+ nifies that the neighbor is not eligible to be- -+ come the designated router on this particular -+ network." -+ DEFVAL { 1 } -+ ::= { ospfNbrEntry 5 } -+ -+ -+ ospfNbrState OBJECT-TYPE -+ SYNTAX INTEGER { -+ down (1), -+ attempt (2), -+ init (3), -+ twoWay (4), -+ exchangeStart (5), -+ exchange (6), -+ loading (7), -+ full (8) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The State of the relationship with this Neigh- -+ bor." -+ REFERENCE -+ "OSPF Version 2, Section 10.1 Neighbor States" -+ DEFVAL { down } -+ ::= { ospfNbrEntry 6 } -+ -+ -+ ospfNbrEvents OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of times this neighbor relationship -+ has changed state, or an error has occurred." -+ ::= { ospfNbrEntry 7 } -+ -+ -+ ospfNbrLsRetransQLen OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The current length of the retransmission -+ queue." -+ ::= { ospfNbrEntry 8 } -+ -+ -+ ospfNbmaNbrStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfNbrEntry 9 } -+ -+ -+ ospfNbmaNbrPermanence OBJECT-TYPE -+ SYNTAX INTEGER { -+ dynamic (1), -- learned through protocol -+ permanent (2) -- configured address -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. 'dynamic' and 'permanent' refer to how -+ the neighbor became known." -+ DEFVAL { permanent } -+ ::= { ospfNbrEntry 10 } -+ -+ -+ ospfNbrHelloSuppressed OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Indicates whether Hellos are being suppressed -+ to the neighbor" -+ ::= { ospfNbrEntry 11 } -+ -+ -+-- OSPF Virtual Neighbor Table -+ -+-- This table describes all virtual neighbors. -+-- Since Virtual Links are configured in the -+-- virtual interface table, this table is read-only. -+ -+ ospfVirtNbrTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfVirtNbrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A table of virtual neighbor information." -+ REFERENCE -+ "OSPF Version 2, Section 15 Virtual Links" -+ ::= { ospf 11 } -+ -+ -+ ospfVirtNbrEntry OBJECT-TYPE -+ SYNTAX OspfVirtNbrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Virtual neighbor information." -+ INDEX { ospfVirtNbrArea, ospfVirtNbrRtrId } -+ ::= { ospfVirtNbrTable 1 } -+ -+OspfVirtNbrEntry ::= -+ SEQUENCE { -+ ospfVirtNbrArea -+ AreaID, -+ ospfVirtNbrRtrId -+ RouterID, -+ ospfVirtNbrIpAddr -+ IpAddress, -+ ospfVirtNbrOptions -+ Integer32, -+ ospfVirtNbrState -+ INTEGER, -+ ospfVirtNbrEvents -+ Counter32, -+ ospfVirtNbrLsRetransQLen -+ Gauge32, -+ ospfVirtNbrHelloSuppressed -+ TruthValue -+ } -+ -+ ospfVirtNbrArea OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Transit Area Identifier." -+ ::= { ospfVirtNbrEntry 1 } -+ -+ -+ ospfVirtNbrRtrId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer uniquely identifying the -+ neighboring router in the Autonomous System." -+ ::= { ospfVirtNbrEntry 2 } -+ -+ -+ ospfVirtNbrIpAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address this Virtual Neighbor is us- -+ ing." -+ ::= { ospfVirtNbrEntry 3 } -+ -+ -+ ospfVirtNbrOptions OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A Bit Mask corresponding to the neighbor's op- -+ tions field. -+ -+ Bit 1, if set, indicates that the system will -+ operate on Type of Service metrics other than -+ TOS 0. If zero, the neighbor will ignore all -+ metrics except the TOS 0 metric. -+ -+ Bit 2, if set, indicates that the system is -+ Network Multicast capable; ie, that it imple- -+ ments OSPF Multicast Routing." -+ ::= { ospfVirtNbrEntry 4 } -+ ospfVirtNbrState OBJECT-TYPE -+ SYNTAX INTEGER { -+ down (1), -+ attempt (2), -+ init (3), -+ twoWay (4), -+ exchangeStart (5), -+ exchange (6), -+ loading (7), -+ full (8) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The state of the Virtual Neighbor Relation- -+ ship." -+ ::= { ospfVirtNbrEntry 5 } -+ -+ -+ ospfVirtNbrEvents OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of times this virtual link has -+ changed its state, or an error has occurred." -+ ::= { ospfVirtNbrEntry 6 } -+ -+ -+ ospfVirtNbrLsRetransQLen OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The current length of the retransmission -+ queue." -+ ::= { ospfVirtNbrEntry 7 } -+ -+ -+ ospfVirtNbrHelloSuppressed OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Indicates whether Hellos are being suppressed -+ to the neighbor" -+ ::= { ospfVirtNbrEntry 8 } -+ -+-- OSPF Link State Database, External -+ -+-- The Link State Database contains the Link State -+-- Advertisements from throughout the areas that the -+-- device is attached to. -+ -+-- This table is identical to the OSPF LSDB Table in -+-- format, but contains only External Link State -+-- Advertisements. The purpose is to allow external -+-- LSAs to be displayed once for the router rather -+-- than once in each non-stub area. -+ -+ ospfExtLsdbTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfExtLsdbEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The OSPF Process's Links State Database." -+ REFERENCE -+ "OSPF Version 2, Section 12 Link State Adver- -+ tisements" -+ ::= { ospf 12 } -+ -+ -+ ospfExtLsdbEntry OBJECT-TYPE -+ SYNTAX OspfExtLsdbEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A single Link State Advertisement." -+ INDEX { ospfExtLsdbType, ospfExtLsdbLsid, ospfExtLsdbRouterId } -+ ::= { ospfExtLsdbTable 1 } -+ -+OspfExtLsdbEntry ::= -+ SEQUENCE { -+ ospfExtLsdbType -+ INTEGER, -+ ospfExtLsdbLsid -+ IpAddress, -+ ospfExtLsdbRouterId -+ RouterID, -+ ospfExtLsdbSequence -+ Integer32, -+ ospfExtLsdbAge -+ Integer32, -+ ospfExtLsdbChecksum -+ Integer32, -+ ospfExtLsdbAdvertisement -+ OCTET STRING -+ } -+ -+ ospfExtLsdbType OBJECT-TYPE -+ SYNTAX INTEGER { -+ asExternalLink (5) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The type of the link state advertisement. -+ Each link state type has a separate advertise- -+ ment format." -+ REFERENCE -+ "OSPF Version 2, Appendix A.4.1 The Link State -+ Advertisement header" -+ ::= { ospfExtLsdbEntry 1 } -+ -+ -+ ospfExtLsdbLsid OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Link State ID is an LS Type Specific field -+ containing either a Router ID or an IP Address; -+ it identifies the piece of the routing domain -+ that is being described by the advertisement." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.4 Link State ID" -+ ::= { ospfExtLsdbEntry 2 } -+ -+ -+ ospfExtLsdbRouterId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32 bit number that uniquely identifies the -+ originating router in the Autonomous System." -+ REFERENCE -+ "OSPF Version 2, Appendix C.1 Global parameters" -+ ::= { ospfExtLsdbEntry 3 } -+ -+-- Note that the OSPF Sequence Number is a 32 bit signed -+-- integer. It starts with the value '80000001'h, -+-- or -'7FFFFFFF'h, and increments until '7FFFFFFF'h -+-- Thus, a typical sequence number will be very negative. -+ ospfExtLsdbSequence OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The sequence number field is a signed 32-bit -+ integer. It is used to detect old and dupli- -+ cate link state advertisements. The space of -+ sequence numbers is linearly ordered. The -+ larger the sequence number the more recent the -+ advertisement." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.6 LS sequence -+ number" -+ ::= { ospfExtLsdbEntry 4 } -+ -+ -+ ospfExtLsdbAge OBJECT-TYPE -+ SYNTAX Integer32 -- Should be 0..MaxAge -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This field is the age of the link state adver- -+ tisement in seconds." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.1 LS age" -+ ::= { ospfExtLsdbEntry 5 } -+ -+ -+ ospfExtLsdbChecksum OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This field is the checksum of the complete -+ contents of the advertisement, excepting the -+ age field. The age field is excepted so that -+ an advertisement's age can be incremented -+ without updating the checksum. The checksum -+ used is the same that is used for ISO connec- -+ tionless datagrams; it is commonly referred to -+ as the Fletcher checksum." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.7 LS checksum" -+ ::= { ospfExtLsdbEntry 6 } -+ -+ -+ ospfExtLsdbAdvertisement OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(36)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The entire Link State Advertisement, including -+ its header." -+ REFERENCE -+ "OSPF Version 2, Section 12 Link State Adver- -+ tisements" -+ ::= { ospfExtLsdbEntry 7 } -+ -+ -+-- OSPF Use of the CIDR Route Table -+ -+ospfRouteGroup OBJECT IDENTIFIER ::= { ospf 13 } -+ -+-- The IP Forwarding Table defines a number of objects for use by -+-- the routing protocol to externalize its information. Most of -+-- the variables (ipForwardDest, ipForwardMask, ipForwardPolicy, -+-- ipForwardNextHop, ipForwardIfIndex, ipForwardType, -+-- ipForwardProto, ipForwardAge, and ipForwardNextHopAS) are -+-- defined there. -+ -+-- Those that leave some discretion are defined here. -+ -+-- ipCidrRouteProto is, of course, ospf (13). -+ -+-- ipCidrRouteAge is the time since the route was first calculated, -+-- as opposed to the time since the last SPF run. -+ -+-- ipCidrRouteInfo is an OBJECT IDENTIFIER for use by the routing -+-- protocol. The following values shall be found there depending -+-- on the way the route was calculated. -+ -+ospfIntraArea OBJECT IDENTIFIER ::= { ospfRouteGroup 1 } -+ospfInterArea OBJECT IDENTIFIER ::= { ospfRouteGroup 2 } -+ospfExternalType1 OBJECT IDENTIFIER ::= { ospfRouteGroup 3 } -+ospfExternalType2 OBJECT IDENTIFIER ::= { ospfRouteGroup 4 } -+ -+-- ipCidrRouteMetric1 is, by definition, the primary routing -+-- metric. Therefore, it should be the metric that route -+-- selection is based on. For intra-area and inter-area routes, -+-- it is an OSPF metric. For External Type 1 (comparable value) -+-- routes, it is an OSPF metric plus the External Metric. For -+-- external Type 2 (non-comparable value) routes, it is the -+-- external metric. -+ -+-- ipCidrRouteMetric2 is, by definition, a secondary routing -+-- metric. Therefore, it should be the metric that breaks a tie -+-- among routes having equal metric1 values and the same -+-- calculation rule. For intra-area, inter-area routes, and -+-- External Type 1 (comparable value) routes, it is unused. For -+-- external Type 2 (non-comparable value) routes, it is the metric -+-- to the AS border router. -+ -+-- ipCidrRouteMetric3, ipCidrRouteMetric4, and ipCidrRouteMetric5 are -+-- unused. -+ -+-- -+-- The OSPF Area Aggregate Table -+-- -+-- This table replaces the OSPF Area Summary Table, being an -+-- extension of that for CIDR routers. -+ -+ ospfAreaAggregateTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfAreaAggregateEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A range of IP addresses specified by an IP -+ address/IP network mask pair. For example, -+ class B address range of X.X.X.X with a network -+ mask of 255.255.0.0 includes all IP addresses -+ from X.X.0.0 to X.X.255.255. Note that if -+ ranges are configured such that one range sub- -+ sumes another range (e.g., 10.0.0.0 mask -+ 255.0.0.0 and 10.1.0.0 mask 255.255.0.0), the -+ most specific match is the preferred one." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospf 14 } -+ -+ -+ ospfAreaAggregateEntry OBJECT-TYPE -+ SYNTAX OspfAreaAggregateEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A range of IP addresses specified by an IP -+ address/IP network mask pair. For example, -+ class B address range of X.X.X.X with a network -+ mask of 255.255.0.0 includes all IP addresses -+ from X.X.0.0 to X.X.255.255. Note that if -+ ranges are range configured such that one range -+ subsumes another range (e.g., 10.0.0.0 mask -+ 255.0.0.0 and 10.1.0.0 mask 255.255.0.0), the -+ most specific match is the preferred one." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ INDEX { ospfAreaAggregateAreaID, ospfAreaAggregateLsdbType, -+ ospfAreaAggregateNet, ospfAreaAggregateMask } -+ ::= { ospfAreaAggregateTable 1 } -+ -+ -+OspfAreaAggregateEntry ::= -+ SEQUENCE { -+ ospfAreaAggregateAreaID -+ AreaID, -+ ospfAreaAggregateLsdbType -+ INTEGER, -+ ospfAreaAggregateNet -+ IpAddress, -+ ospfAreaAggregateMask -+ IpAddress, -+ ospfAreaAggregateStatus -+ RowStatus, -+ ospfAreaAggregateEffect -+ INTEGER -+ } -+ -+ ospfAreaAggregateAreaID OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Area the Address Aggregate is to be found -+ within." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaAggregateEntry 1 } -+ -+ -+ ospfAreaAggregateLsdbType OBJECT-TYPE -+ SYNTAX INTEGER { -+ summaryLink (3), -+ nssaExternalLink (7) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The type of the Address Aggregate. This field -+ specifies the Lsdb type that this Address Ag- -+ gregate applies to." -+ REFERENCE -+ "OSPF Version 2, Appendix A.4.1 The Link State -+ Advertisement header" -+ ::= { ospfAreaAggregateEntry 2 } -+ -+ -+ ospfAreaAggregateNet OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of the Net or Subnet indicated -+ by the range." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaAggregateEntry 3 } -+ -+ -+ ospfAreaAggregateMask OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Subnet Mask that pertains to the Net or -+ Subnet." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaAggregateEntry 4 } -+ -+ -+ ospfAreaAggregateStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfAreaAggregateEntry 5 } -+ -+ -+ ospfAreaAggregateEffect OBJECT-TYPE -+ SYNTAX INTEGER { -+ advertiseMatching (1), -+ doNotAdvertiseMatching (2) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "Subnets subsumed by ranges either trigger the -+ advertisement of the indicated aggregate (ad- -+ vertiseMatching), or result in the subnet's not -+ being advertised at all outside the area." -+ DEFVAL { advertiseMatching } -+ ::= { ospfAreaAggregateEntry 6 } -+ -+ -+-- conformance information -+ -+ospfConformance OBJECT IDENTIFIER ::= { ospf 15 } -+ -+ospfGroups OBJECT IDENTIFIER ::= { ospfConformance 1 } -+ospfCompliances OBJECT IDENTIFIER ::= { ospfConformance 2 } -+ -+-- compliance statements -+ -+ ospfCompliance MODULE-COMPLIANCE -+ STATUS current -+ DESCRIPTION -+ "The compliance statement " -+ MODULE -- this module -+ MANDATORY-GROUPS { -+ ospfBasicGroup, -+ ospfAreaGroup, -+ ospfStubAreaGroup, -+ ospfIfGroup, -+ ospfIfMetricGroup, -+ ospfVirtIfGroup, -+ ospfNbrGroup, -+ ospfVirtNbrGroup, -+ ospfAreaAggregateGroup -+ } -+ ::= { ospfCompliances 1 } -+ -+ -+-- units of conformance -+ -+ ospfBasicGroup OBJECT-GROUP -+ OBJECTS { -+ ospfRouterId, -+ ospfAdminStat, -+ ospfVersionNumber, -+ ospfAreaBdrRtrStatus, -+ ospfASBdrRtrStatus, -+ ospfExternLsaCount, -+ ospfExternLsaCksumSum, -+ ospfTOSSupport, -+ ospfOriginateNewLsas, -+ ospfRxNewLsas, -+ ospfExtLsdbLimit, -+ ospfMulticastExtensions, -+ ospfExitOverflowInterval, -+ ospfDemandExtensions -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 1 } -+ -+ -+ ospfAreaGroup OBJECT-GROUP -+ OBJECTS { -+ ospfAreaId, -+ ospfImportAsExtern, -+ ospfSpfRuns, -+ ospfAreaBdrRtrCount, -+ ospfAsBdrRtrCount, -+ ospfAreaLsaCount, -+ ospfAreaLsaCksumSum, -+ ospfAreaSummary, -+ ospfAreaStatus -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ supporting areas." -+ ::= { ospfGroups 2 } -+ -+ -+ ospfStubAreaGroup OBJECT-GROUP -+ OBJECTS { -+ ospfStubAreaId, -+ ospfStubTOS, -+ ospfStubMetric, -+ ospfStubStatus, -+ ospfStubMetricType -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ supporting stub areas." -+ ::= { ospfGroups 3 } -+ -+ -+ ospfLsdbGroup OBJECT-GROUP -+ OBJECTS { -+ ospfLsdbAreaId, -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId, -+ ospfLsdbSequence, -+ ospfLsdbAge, -+ ospfLsdbChecksum, -+ ospfLsdbAdvertisement -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ that display their link state database." -+ ::= { ospfGroups 4 } -+ -+ -+ ospfAreaRangeGroup OBJECT-GROUP -+ OBJECTS { -+ ospfAreaRangeAreaId, -+ ospfAreaRangeNet, -+ ospfAreaRangeMask, -+ ospfAreaRangeStatus, -+ ospfAreaRangeEffect -+ } -+ STATUS obsolete -+ DESCRIPTION -+ "These objects are required for non-CIDR OSPF -+ systems that support multiple areas." -+ ::= { ospfGroups 5 } -+ -+ -+ ospfHostGroup OBJECT-GROUP -+ OBJECTS { -+ ospfHostIpAddress, -+ ospfHostTOS, -+ ospfHostMetric, -+ ospfHostStatus, -+ ospfHostAreaID -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ that support attached hosts." -+ ::= { ospfGroups 6 } -+ -+ -+ ospfIfGroup OBJECT-GROUP -+ OBJECTS { -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfIfAreaId, -+ ospfIfType, -+ ospfIfAdminStat, -+ ospfIfRtrPriority, -+ ospfIfTransitDelay, -+ ospfIfRetransInterval, -+ ospfIfHelloInterval, -+ ospfIfRtrDeadInterval, -+ ospfIfPollInterval, -+ ospfIfState, -+ ospfIfDesignatedRouter, -+ ospfIfBackupDesignatedRouter, -+ ospfIfEvents, -+ ospfIfAuthType, -+ ospfIfAuthKey, -+ ospfIfStatus, -+ ospfIfMulticastForwarding, -+ ospfIfDemand -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 7 } -+ -+ -+ ospfIfMetricGroup OBJECT-GROUP -+ OBJECTS { -+ ospfIfMetricIpAddress, -+ ospfIfMetricAddressLessIf, -+ ospfIfMetricTOS, -+ ospfIfMetricValue, -+ ospfIfMetricStatus -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 8 } -+ -+ -+ ospfVirtIfGroup OBJECT-GROUP -+ OBJECTS { -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfVirtIfTransitDelay, -+ ospfVirtIfRetransInterval, -+ ospfVirtIfHelloInterval, -+ ospfVirtIfRtrDeadInterval, -+ ospfVirtIfState, -+ ospfVirtIfEvents, -+ ospfVirtIfAuthType, -+ ospfVirtIfAuthKey, -+ ospfVirtIfStatus -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 9 } -+ -+ -+ ospfNbrGroup OBJECT-GROUP -+ OBJECTS { -+ ospfNbrIpAddr, -+ ospfNbrAddressLessIndex, -+ ospfNbrRtrId, -+ ospfNbrOptions, -+ ospfNbrPriority, -+ ospfNbrState, -+ ospfNbrEvents, -+ ospfNbrLsRetransQLen, -+ ospfNbmaNbrStatus, -+ ospfNbmaNbrPermanence, -+ ospfNbrHelloSuppressed -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 10 } -+ -+ -+ ospfVirtNbrGroup OBJECT-GROUP -+ OBJECTS { -+ ospfVirtNbrArea, -+ ospfVirtNbrRtrId, -+ ospfVirtNbrIpAddr, -+ ospfVirtNbrOptions, -+ ospfVirtNbrState, -+ ospfVirtNbrEvents, -+ ospfVirtNbrLsRetransQLen, -+ ospfVirtNbrHelloSuppressed -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 11 } -+ -+ -+ ospfExtLsdbGroup OBJECT-GROUP -+ OBJECTS { -+ ospfExtLsdbType, -+ ospfExtLsdbLsid, -+ ospfExtLsdbRouterId, -+ ospfExtLsdbSequence, -+ ospfExtLsdbAge, -+ ospfExtLsdbChecksum, -+ ospfExtLsdbAdvertisement -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ that display their link state database." -+ ::= { ospfGroups 12 } -+ -+ -+ ospfAreaAggregateGroup OBJECT-GROUP -+ OBJECTS { -+ ospfAreaAggregateAreaID, -+ ospfAreaAggregateLsdbType, -+ ospfAreaAggregateNet, -+ ospfAreaAggregateMask, -+ ospfAreaAggregateStatus, -+ ospfAreaAggregateEffect -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 13 } -+ -+END -diff -ruN net-snmp-5.1.2-orig/mibs/OSPF-TRAP-MIB.txt net-snmp-5.1.2-5/mibs/OSPF-TRAP-MIB.txt ---- net-snmp-5.1.2-orig/mibs/OSPF-TRAP-MIB.txt 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/mibs/OSPF-TRAP-MIB.txt 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,443 @@ -+OSPF-TRAP-MIB DEFINITIONS ::= BEGIN -+ -+ IMPORTS -+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, IpAddress -+ FROM SNMPv2-SMI -+ MODULE-COMPLIANCE, OBJECT-GROUP -+ FROM SNMPv2-CONF -+ ospfRouterId, ospfIfIpAddress, ospfAddressLessIf, ospfIfState, -+ ospfVirtIfAreaId, ospfVirtIfNeighbor, ospfVirtIfState, -+ ospfNbrIpAddr, ospfNbrAddressLessIndex, ospfNbrRtrId, -+ ospfNbrState, ospfVirtNbrArea, ospfVirtNbrRtrId, ospfVirtNbrState, -+ ospfLsdbType, ospfLsdbLsid, ospfLsdbRouterId, ospfLsdbAreaId, -+ ospfExtLsdbLimit, ospf -+ FROM OSPF-MIB; -+ -+ ospfTrap MODULE-IDENTITY -+ LAST-UPDATED "9501201225Z" -- Fri Jan 20 12:25:50 PST 1995 -+ ORGANIZATION "IETF OSPF Working Group" -+ CONTACT-INFO -+ " Fred Baker -+ Postal: Cisco Systems -+ 519 Lado Drive -+ Santa Barbara, California 93111 -+ Tel: +1 805 681 0115 -+ E-Mail: fred@cisco.com -+ -+ Rob Coltun -+ Postal: RainbowBridge Communications -+ Tel: (301) 340-9416 -+ E-Mail: rcoltun@rainbow-bridge.com" -+ DESCRIPTION -+ "The MIB module to describe traps for the OSPF -+ Version 2 Protocol." -+ ::= { ospf 16 } -+ -+-- Trap Support Objects -+ -+-- The following are support objects for the OSPF traps. -+ -+ospfTrapControl OBJECT IDENTIFIER ::= { ospfTrap 1 } -+ospfTraps OBJECT IDENTIFIER ::= { ospfTrap 2 } -+ -+ ospfSetTrap OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(4)) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "A four-octet string serving as a bit map for -+ the trap events defined by the OSPF traps. This -+ object is used to enable and disable specific -+ OSPF traps where a 1 in the bit field -+ represents enabled. The right-most bit (least -+ significant) represents trap 0." -+ ::= { ospfTrapControl 1 } -+ -+ -+ ospfConfigErrorType OBJECT-TYPE -+ SYNTAX INTEGER { -+ badVersion (1), -+ areaMismatch (2), -+ unknownNbmaNbr (3), -- Router is Dr eligible -+ unknownVirtualNbr (4), -+ authTypeMismatch(5), -+ authFailure (6), -+ netMaskMismatch (7), -+ helloIntervalMismatch (8), -+ deadIntervalMismatch (9), -+ optionMismatch (10) } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Potential types of configuration conflicts. -+ Used by the ospfConfigError and ospfConfigVir- -+ tError traps." -+ ::= { ospfTrapControl 2 } -+ -+ -+ ospfPacketType OBJECT-TYPE -+ SYNTAX INTEGER { -+ hello (1), -+ dbDescript (2), -+ lsReq (3), -+ lsUpdate (4), -+ lsAck (5) } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "OSPF packet types." -+ ::= { ospfTrapControl 3 } -+ -+ -+ ospfPacketSrc OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of an inbound packet that can- -+ not be identified by a neighbor instance." -+ ::= { ospfTrapControl 4 } -+ -+ -+-- Traps -+ -+ -+ ospfIfStateChange NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfIfState -- The new state -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfStateChange trap signifies that there -+ has been a change in the state of a non-virtual -+ OSPF interface. This trap should be generated -+ when the interface state regresses (e.g., goes -+ from Dr to Down) or progresses to a terminal -+ state (i.e., Point-to-Point, DR Other, Dr, or -+ Backup)." -+ ::= { ospfTraps 16 } -+ -+ -+ ospfVirtIfStateChange NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfVirtIfState -- The new state -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfStateChange trap signifies that there -+ has been a change in the state of an OSPF vir- -+ tual interface. -+ This trap should be generated when the inter- -+ face state regresses (e.g., goes from Point- -+ to-Point to Down) or progresses to a terminal -+ state (i.e., Point-to-Point)." -+ ::= { ospfTraps 1 } -+ -+ -+ ospfNbrStateChange NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfNbrIpAddr, -+ ospfNbrAddressLessIndex, -+ ospfNbrRtrId, -+ ospfNbrState -- The new state -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfNbrStateChange trap signifies that -+ there has been a change in the state of a non- -+ virtual OSPF neighbor. This trap should be -+ generated when the neighbor state regresses -+ (e.g., goes from Attempt or Full to 1-Way or -+ Down) or progresses to a terminal state (e.g., -+ 2-Way or Full). When an neighbor transitions -+ from or to Full on non-broadcast multi-access -+ and broadcast networks, the trap should be gen- -+ erated by the designated router. A designated -+ router transitioning to Down will be noted by -+ ospfIfStateChange." -+ ::= { ospfTraps 2 } -+ -+ -+ ospfVirtNbrStateChange NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtNbrArea, -+ ospfVirtNbrRtrId, -+ ospfVirtNbrState -- The new state -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfStateChange trap signifies that there -+ has been a change in the state of an OSPF vir- -+ tual neighbor. This trap should be generated -+ when the neighbor state regresses (e.g., goes -+ from Attempt or Full to 1-Way or Down) or -+ progresses to a terminal state (e.g., Full)." -+ ::= { ospfTraps 3 } -+ ospfIfConfigError NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfPacketSrc, -- The source IP address -+ ospfConfigErrorType, -- Type of error -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfConfigError trap signifies that a -+ packet has been received on a non-virtual in- -+ terface from a router whose configuration -+ parameters conflict with this router's confi- -+ guration parameters. Note that the event op- -+ tionMismatch should cause a trap only if it -+ prevents an adjacency from forming." -+ ::= { ospfTraps 4 } -+ -+ -+ ospfVirtIfConfigError NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfConfigErrorType, -- Type of error -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfConfigError trap signifies that a pack- -+ et has been received on a virtual interface -+ from a router whose configuration parameters -+ conflict with this router's configuration -+ parameters. Note that the event optionMismatch -+ should cause a trap only if it prevents an ad- -+ jacency from forming." -+ ::= { ospfTraps 5 } -+ -+ -+ ospfIfAuthFailure NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfPacketSrc, -- The source IP address -+ ospfConfigErrorType, -- authTypeMismatch or -+ -- authFailure -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfAuthFailure trap signifies that a -+ packet has been received on a non-virtual in- -+ terface from a router whose authentication key -+ or authentication type conflicts with this -+ router's authentication key or authentication -+ type." -+ ::= { ospfTraps 6 } -+ -+ -+ ospfVirtIfAuthFailure NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfConfigErrorType, -- authTypeMismatch or -+ -- authFailure -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfVirtIfAuthFailure trap signifies that a -+ packet has been received on a virtual interface -+ from a router whose authentication key or au- -+ thentication type conflicts with this router's -+ authentication key or authentication type." -+ ::= { ospfTraps 7 } -+ -+ -+ ospfIfRxBadPacket NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfPacketSrc, -- The source IP address -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfRxBadPacket trap signifies that an -+ OSPF packet has been received on a non-virtual -+ interface that cannot be parsed." -+ ::= { ospfTraps 8 } -+ -+ ospfVirtIfRxBadPacket NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfRxBadPacket trap signifies that an OSPF -+ packet has been received on a virtual interface -+ that cannot be parsed." -+ ::= { ospfTraps 9 } -+ -+ -+ ospfTxRetransmit NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfNbrRtrId, -- Destination -+ ospfPacketType, -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfTxRetransmit trap signifies than an -+ OSPF packet has been retransmitted on a non- -+ virtual interface. All packets that may be re- -+ transmitted are associated with an LSDB entry. -+ The LS type, LS ID, and Router ID are used to -+ identify the LSDB entry." -+ ::= { ospfTraps 10 } -+ -+ -+ ospfVirtIfTxRetransmit NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfPacketType, -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfTxRetransmit trap signifies than an -+ OSPF packet has been retransmitted on a virtual -+ interface. All packets that may be retransmit- -+ ted are associated with an LSDB entry. The LS -+ type, LS ID, and Router ID are used to identify -+ the LSDB entry." -+ ::= { ospfTraps 11 } -+ -+ -+ ospfOriginateLsa NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfLsdbAreaId, -- 0.0.0.0 for AS Externals -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfOriginateLsa trap signifies that a new -+ LSA has been originated by this router. This -+ trap should not be invoked for simple refreshes -+ of LSAs (which happesn every 30 minutes), but -+ instead will only be invoked when an LSA is -+ (re)originated due to a topology change. Addi- -+ tionally, this trap does not include LSAs that -+ are being flushed because they have reached -+ MaxAge." -+ ::= { ospfTraps 12 } -+ -+ -+ ospfMaxAgeLsa NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfLsdbAreaId, -- 0.0.0.0 for AS Externals -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfMaxAgeLsa trap signifies that one of -+ the LSA in the router's link-state database has -+ aged to MaxAge." -+ ::= { ospfTraps 13 } -+ -+ -+ ospfLsdbOverflow NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfExtLsdbLimit -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfLsdbOverflow trap signifies that the -+ number of LSAs in the router's link-state data- -+ base has exceeded ospfExtLsdbLimit." -+ ::= { ospfTraps 14 } -+ -+ -+ ospfLsdbApproachingOverflow NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfExtLsdbLimit -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfLsdbApproachingOverflow trap signifies -+ that the number of LSAs in the router's link- -+ state database has exceeded ninety percent of -+ ospfExtLsdbLimit." -+ ::= { ospfTraps 15 } -+ -+ -+-- conformance information -+ -+ospfTrapConformance OBJECT IDENTIFIER ::= { ospfTrap 3 } -+ -+ospfTrapGroups OBJECT IDENTIFIER ::= { ospfTrapConformance 1 } -+ospfTrapCompliances OBJECT IDENTIFIER ::= { ospfTrapConformance 2 } -+ -+-- compliance statements -+ -+ ospfTrapCompliance MODULE-COMPLIANCE -+ STATUS current -+ DESCRIPTION -+ "The compliance statement " -+ MODULE -- this module -+ MANDATORY-GROUPS { ospfTrapControlGroup } -+ -+ -+ GROUP ospfTrapControlGroup -+ DESCRIPTION -+ "This group is optional but recommended for all -+ OSPF systems" -+ ::= { ospfTrapCompliances 1 } -+ -+ -+-- units of conformance -+ -+ ospfTrapControlGroup OBJECT-GROUP -+ OBJECTS { -+ ospfSetTrap, -+ ospfConfigErrorType, -+ ospfPacketType, -+ ospfPacketSrc -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required to control traps -+ from OSPF systems." -+ ::= { ospfTrapGroups 1 } -+ -+ -+END -diff -ruN net-snmp-5.1.2-orig/mibs/RIPv2-MIB.txt net-snmp-5.1.2-5/mibs/RIPv2-MIB.txt ---- net-snmp-5.1.2-orig/mibs/RIPv2-MIB.txt 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/mibs/RIPv2-MIB.txt 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,530 @@ -+ RIPv2-MIB DEFINITIONS ::= BEGIN -+ -+ IMPORTS -+ MODULE-IDENTITY, OBJECT-TYPE, Counter32, -+ TimeTicks, IpAddress FROM SNMPv2-SMI -+ TEXTUAL-CONVENTION, RowStatus FROM SNMPv2-TC -+ MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF -+ mib-2 FROM RFC1213-MIB; -+ -+ -- This MIB module uses the extended OBJECT-TYPE macro as -+ -- defined in [9]. -+ -+ rip2 MODULE-IDENTITY -+ LAST-UPDATED "9407272253Z" -- Wed Jul 27 22:53:04 PDT 1994 -+ ORGANIZATION "IETF RIP-II Working Group" -+ CONTACT-INFO -+ " Fred Baker -+ Postal: Cisco Systems -+ 519 Lado Drive -+ Santa Barbara, California 93111 -+ Tel: +1 805 681 0115 -+ E-Mail: fbaker@cisco.com -+ -+ Postal: Gary Malkin -+ Xylogics, Inc. -+ 53 Third Avenue -+ Burlington, MA 01803 -+ -+ Phone: (617) 272-8140 -+ EMail: gmalkin@Xylogics.COM" -+ DESCRIPTION -+ "The MIB module to describe the RIP2 Version 2 Protocol" -+ ::= { mib-2 23 } -+ -+ -- RIP-2 Management Information Base -+ -+ -- the RouteTag type represents the contents of the -+ -- Route Domain field in the packet header or route entry. -+ -- The use of the Route Domain is deprecated. -+ -+ RouteTag ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "the RouteTag type represents the contents of the Route Domain -+ field in the packet header or route entry" -+ SYNTAX OCTET STRING (SIZE (2)) -+ -+--4.1 Global Counters -+ -+-- The RIP-2 Globals Group. -+-- Implementation of this group is mandatory for systems -+-- which implement RIP-2. -+ -+-- These counters are intended to facilitate debugging quickly -+-- changing routes or failing neighbors -+ -+rip2Globals OBJECT IDENTIFIER ::= { rip2 1 } -+ -+ rip2GlobalRouteChanges OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of route changes made to the IP Route -+ Database by RIP. This does not include the refresh -+ of a route's age." -+ ::= { rip2Globals 1 } -+ -+ rip2GlobalQueries OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of responses sent to RIP queries -+ from other systems." -+ ::= { rip2Globals 2 } -+ -+--4.2 RIP Interface Tables -+ -+-- RIP Interfaces Groups -+-- Implementation of these Groups is mandatory for systems -+-- which implement RIP-2. -+ -+-- The RIP Interface Status Table. -+ -+ rip2IfStatTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Rip2IfStatEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A list of subnets which require separate -+ status monitoring in RIP." -+ ::= { rip2 2 } -+ -+ rip2IfStatEntry OBJECT-TYPE -+ SYNTAX Rip2IfStatEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A Single Routing Domain in a single Subnet." -+ INDEX { rip2IfStatAddress } -+ ::= { rip2IfStatTable 1 } -+ -+ Rip2IfStatEntry ::= -+ SEQUENCE { -+ rip2IfStatAddress -+ IpAddress, -+ rip2IfStatRcvBadPackets -+ Counter32, -+ rip2IfStatRcvBadRoutes -+ Counter32, -+ rip2IfStatSentUpdates -+ Counter32, -+ rip2IfStatStatus -+ RowStatus -+ } -+ -+ rip2IfStatAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of this system on the indicated -+ subnet. For unnumbered interfaces, the value 0.0.0.N, -+ where the least significant 24 bits (N) is the ifIndex -+ for the IP Interface in network byte order." -+ ::= { rip2IfStatEntry 1 } -+ -+ rip2IfStatRcvBadPackets OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of RIP response packets received by -+ the RIP process which were subsequently discarded -+ for any reason (e.g. a version 0 packet, or an -+ unknown command type)." -+ ::= { rip2IfStatEntry 2 } -+ -+ rip2IfStatRcvBadRoutes OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of routes, in valid RIP packets, -+ which were ignored for any reason (e.g. unknown -+ address family, or invalid metric)." -+ ::= { rip2IfStatEntry 3 } -+ -+ rip2IfStatSentUpdates OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of triggered RIP updates actually -+ sent on this interface. This explicitly does -+ NOT include full updates sent containing new -+ information." -+ ::= { rip2IfStatEntry 4 } -+ -+ rip2IfStatStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "Writing invalid has the effect of deleting -+ this interface." -+ ::= { rip2IfStatEntry 5 } -+ -+-- The RIP Interface Configuration Table. -+ -+ rip2IfConfTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Rip2IfConfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A list of subnets which require separate -+ configuration in RIP." -+ ::= { rip2 3 } -+ -+ rip2IfConfEntry OBJECT-TYPE -+ SYNTAX Rip2IfConfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A Single Routing Domain in a single Subnet." -+ INDEX { rip2IfConfAddress } -+ ::= { rip2IfConfTable 1 } -+ -+ Rip2IfConfEntry ::= -+ SEQUENCE { -+ rip2IfConfAddress -+ IpAddress, -+ rip2IfConfDomain -+ RouteTag, -+ rip2IfConfAuthType -+ INTEGER, -+ rip2IfConfAuthKey -+ OCTET STRING (SIZE(0..16)), -+ rip2IfConfSend -+ INTEGER, -+ rip2IfConfReceive -+ INTEGER, -+ rip2IfConfDefaultMetric -+ INTEGER, -+ rip2IfConfStatus -+ RowStatus, -+ rip2IfConfSrcAddress -+ IpAddress -+ } -+ -+ rip2IfConfAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of this system on the indicated -+ subnet. For unnumbered interfaces, the value 0.0.0.N, -+ where the least significant 24 bits (N) is the ifIndex -+ for the IP Interface in network byte order." -+ ::= { rip2IfConfEntry 1 } -+ -+ rip2IfConfDomain OBJECT-TYPE -+ SYNTAX RouteTag -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "Value inserted into the Routing Domain field -+ of all RIP packets sent on this interface." -+ DEFVAL { '0000'h } -+ ::= { rip2IfConfEntry 2 } -+ -+ rip2IfConfAuthType OBJECT-TYPE -+ SYNTAX INTEGER { -+ noAuthentication (1), -+ simplePassword (2), -+ md5 (3) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The type of Authentication used on this -+ interface." -+ DEFVAL { noAuthentication } -+ ::= { rip2IfConfEntry 3 } -+ -+ rip2IfConfAuthKey OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(0..16)) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The value to be used as the Authentication Key -+ whenever the corresponding instance of -+ rip2IfConfAuthType has a value other than -+ noAuthentication. A modification of the corresponding -+ instance of rip2IfConfAuthType does not modify -+ the rip2IfConfAuthKey value. If a string shorter -+ than 16 octets is supplied, it will be left- -+ justified and padded to 16 octets, on the right, -+ with nulls (0x00). -+ -+ Reading this object always results in an OCTET -+ STRING of length zero; authentication may not -+ be bypassed by reading the MIB object." -+ DEFVAL { ''h } -+ ::= { rip2IfConfEntry 4 } -+ -+ rip2IfConfSend OBJECT-TYPE -+ SYNTAX INTEGER { -+ doNotSend (1), -+ ripVersion1 (2), -+ rip1Compatible (3), -+ ripVersion2 (4), -+ ripV1Demand (5), -+ ripV2Demand (6) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "What the router sends on this interface. -+ ripVersion1 implies sending RIP updates compliant -+ with RFC 1058. rip1Compatible implies -+ broadcasting RIP-2 updates using RFC 1058 route -+ subsumption rules. ripVersion2 implies -+ multicasting RIP-2 updates. ripV1Demand indicates -+ the use of Demand RIP on a WAN interface under RIP -+ Version 1 rules. ripV2Demand indicates the use of -+ Demand RIP on a WAN interface under Version 2 rules." -+ DEFVAL { rip1Compatible } -+ ::= { rip2IfConfEntry 5 } -+ -+ rip2IfConfReceive OBJECT-TYPE -+ SYNTAX INTEGER { -+ rip1 (1), -+ rip2 (2), -+ rip1OrRip2 (3), -+ doNotRecieve (4) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This indicates which version of RIP updates -+ are to be accepted. Note that rip2 and -+ rip1OrRip2 implies reception of multicast -+ packets." -+ DEFVAL { rip1OrRip2 } -+ ::= { rip2IfConfEntry 6 } -+ -+ rip2IfConfDefaultMetric OBJECT-TYPE -+ SYNTAX INTEGER ( 0..15 ) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable indicates the metric that is to -+ be used for the default route entry in RIP updates -+ originated on this interface. A value of zero -+ indicates that no default route should be -+ originated; in this case, a default route via -+ another router may be propagated." -+ ::= { rip2IfConfEntry 7 } -+ -+ rip2IfConfStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "Writing invalid has the effect of deleting -+ this interface." -+ ::= { rip2IfConfEntry 8 } -+ -+ rip2IfConfSrcAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The IP Address this system will use as a source -+ address on this interface. If it is a numbered -+ interface, this MUST be the same value as -+ rip2IfConfAddress. On unnumbered interfaces, -+ it must be the value of rip2IfConfAddress for -+ some interface on the system." -+ ::= { rip2IfConfEntry 9 } -+ -+--4.3 Peer Table -+ -+-- Peer Table -+ -+-- The RIP Peer Group -+-- Implementation of this Group is Optional -+ -+-- This group provides information about active peer -+-- relationships intended to assist in debugging. An -+-- active peer is a router from which a valid RIP -+-- updated has been heard in the last 180 seconds. -+ -+ rip2PeerTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Rip2PeerEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A list of RIP Peers." -+ ::= { rip2 4 } -+ -+ rip2PeerEntry OBJECT-TYPE -+ SYNTAX Rip2PeerEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information regarding a single routing peer." -+ INDEX { rip2PeerAddress, rip2PeerDomain } -+ ::= { rip2PeerTable 1 } -+ -+ Rip2PeerEntry ::= -+ SEQUENCE { -+ rip2PeerAddress -+ IpAddress, -+ rip2PeerDomain -+ RouteTag, -+ rip2PeerLastUpdate -+ TimeTicks, -+ rip2PeerVersion -+ INTEGER, -+ rip2PeerRcvBadPackets -+ Counter32, -+ rip2PeerRcvBadRoutes -+ Counter32 -+ } -+ -+ rip2PeerAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address that the peer is using as its source -+ address. Note that on an unnumbered link, this may -+ not be a member of any subnet on the system." -+ ::= { rip2PeerEntry 1 } -+ -+ rip2PeerDomain OBJECT-TYPE -+ SYNTAX RouteTag -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The value in the Routing Domain field in RIP -+ packets received from the peer. As domain suuport -+ is deprecated, this must be zero." -+ ::= { rip2PeerEntry 2 } -+ -+ rip2PeerLastUpdate OBJECT-TYPE -+ SYNTAX TimeTicks -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The value of sysUpTime when the most recent -+ RIP update was received from this system." -+ ::= { rip2PeerEntry 3 } -+ -+ rip2PeerVersion OBJECT-TYPE -+ SYNTAX INTEGER ( 0..255 ) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The RIP version number in the header of the -+ last RIP packet received." -+ ::= { rip2PeerEntry 4 } -+ -+ rip2PeerRcvBadPackets OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of RIP response packets from this -+ peer discarded as invalid." -+ ::= { rip2PeerEntry 5 } -+ -+ -+ rip2PeerRcvBadRoutes OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of routes from this peer that were -+ ignored because the entry format was invalid." -+ ::= { rip2PeerEntry 6 } -+ -+-- conformance information -+ -+rip2Conformance OBJECT IDENTIFIER ::= { rip2 5 } -+ -+rip2Groups OBJECT IDENTIFIER ::= { rip2Conformance 1 } -+rip2Compliances OBJECT IDENTIFIER ::= { rip2Conformance 2 } -+ -+-- compliance statements -+rip2Compliance MODULE-COMPLIANCE -+ STATUS current -+ DESCRIPTION -+ "The compliance statement " -+ MODULE -- this module -+ MANDATORY-GROUPS { -+ rip2GlobalGroup, -+ rip2IfStatGroup, -+ rip2IfConfGroup, -+ rip2PeerGroup -+ } -+ GROUP rip2GlobalGroup -+ DESCRIPTION -+ "This group defines global controls for RIP-II systems." -+ GROUP rip2IfStatGroup -+ DESCRIPTION -+ "This group defines interface statistics for RIP-II systems." -+ GROUP rip2IfConfGroup -+ DESCRIPTION -+ "This group defines interface configuration for RIP-II systems." -+ GROUP rip2PeerGroup -+ DESCRIPTION -+ "This group defines peer information for RIP-II systems." -+ ::= { rip2Compliances 1 } -+ -+-- units of conformance -+ -+rip2GlobalGroup OBJECT-GROUP -+ OBJECTS { -+ rip2GlobalRouteChanges, -+ rip2GlobalQueries -+ } -+ STATUS current -+ DESCRIPTION -+ "This group defines global controls for RIP-II systems." -+ ::= { rip2Groups 1 } -+rip2IfStatGroup OBJECT-GROUP -+ OBJECTS { -+ rip2IfStatAddress, -+ rip2IfStatRcvBadPackets, -+ rip2IfStatRcvBadRoutes, -+ rip2IfStatSentUpdates, -+ rip2IfStatStatus -+ } -+ STATUS current -+ DESCRIPTION -+ "This group defines interface statistics for RIP-II systems." -+ ::= { rip2Groups 2 } -+rip2IfConfGroup OBJECT-GROUP -+ OBJECTS { -+ rip2IfConfAddress, -+ rip2IfConfAuthType, -+ rip2IfConfAuthKey, -+ rip2IfConfSend, -+ rip2IfConfReceive, -+ rip2IfConfDefaultMetric, -+ rip2IfConfStatus, -+ rip2IfConfSrcAddress -+ } -+ STATUS current -+ DESCRIPTION -+ "This group defines interface configuration for RIP-II systems." -+ ::= { rip2Groups 3 } -+rip2PeerGroup OBJECT-GROUP -+ OBJECTS { -+ rip2PeerAddress, -+ rip2PeerDomain, -+ rip2PeerLastUpdate, -+ rip2PeerVersion, -+ rip2PeerRcvBadPackets, -+ rip2PeerRcvBadRoutes -+ } -+ STATUS current -+ DESCRIPTION -+ "This group defines peer information for RIP-II systems." -+ ::= { rip2Groups 4 } -+END -diff -ruN net-snmp-5.1.2-orig/mibs/SOURCE-ROUTING-MIB.txt net-snmp-5.1.2-5/mibs/SOURCE-ROUTING-MIB.txt ---- net-snmp-5.1.2-orig/mibs/SOURCE-ROUTING-MIB.txt 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/mibs/SOURCE-ROUTING-MIB.txt 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,452 @@ -+SOURCE-ROUTING-MIB DEFINITIONS ::= BEGIN -+ -+IMPORTS -+ Counter, Gauge -+ FROM RFC1155-SMI -+ dot1dBridge, dot1dSr -+ FROM BRIDGE-MIB -+ OBJECT-TYPE -+ FROM RFC-1212; -+ -+-- groups in the SR MIB -+ -+-- dot1dSr is imported from the Bridge MIB -+ -+dot1dPortPair OBJECT IDENTIFIER ::= { dot1dBridge 10 } -+ -+-- the dot1dSr group -+ -+-- this group is implemented by those bridges that -+-- support the source route bridging mode, including Source -+-- Routing and SRT bridges. -+ -+dot1dSrPortTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dSrPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains information about every -+ port that is associated with this source route -+ bridge." -+ ::= { dot1dSr 1 } -+ -+dot1dSrPortEntry OBJECT-TYPE -+ SYNTAX Dot1dSrPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information for each port of a source -+ route bridge." -+ INDEX { dot1dSrPort } -+ -+ ::= { dot1dSrPortTable 1 } -+ -+Dot1dSrPortEntry ::= -+ SEQUENCE { -+ dot1dSrPort -+ INTEGER, -+ dot1dSrPortHopCount -+ INTEGER, -+ dot1dSrPortLocalSegment -+ INTEGER, -+ dot1dSrPortBridgeNum -+ INTEGER, -+ dot1dSrPortTargetSegment -+ INTEGER, -+ dot1dSrPortLargestFrame -+ INTEGER, -+ dot1dSrPortSTESpanMode -+ INTEGER, -+ dot1dSrPortSpecInFrames -+ Counter, -+ dot1dSrPortSpecOutFrames -+ Counter, -+ dot1dSrPortApeInFrames -+ Counter, -+ dot1dSrPortApeOutFrames -+ Counter, -+ dot1dSrPortSteInFrames -+ Counter, -+ dot1dSrPortSteOutFrames -+ Counter, -+ dot1dSrPortSegmentMismatchDiscards -+ Counter, -+ dot1dSrPortDuplicateSegmentDiscards -+ Counter, -+ dot1dSrPortHopCountExceededDiscards -+ Counter, -+ dot1dSrPortDupLanIdOrTreeErrors -+ Counter, -+ dot1dSrPortLanIdMismatches -+ Counter -+ } -+ -+dot1dSrPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port for which this entry -+ -+ contains Source Route management information." -+ ::= { dot1dSrPortEntry 1 } -+ -+dot1dSrPortHopCount OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The maximum number of routing descriptors allowed -+ in an All Paths or Spanning Tree Explorer frames." -+ ::= { dot1dSrPortEntry 2 } -+ -+dot1dSrPortLocalSegment OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The segment number that uniquely identifies the -+ segment to which this port is connected. Current -+ source routing protocols limit this value to the -+ range: 0 through 4095. (The value 0 is used by -+ some management applications for special test -+ cases.) A value of 65535 signifies that no segment -+ number is assigned to this port." -+ ::= { dot1dSrPortEntry 3 } -+ -+dot1dSrPortBridgeNum OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "A bridge number uniquely identifies a bridge when -+ more than one bridge is used to span the same two -+ segments. Current source routing protocols limit -+ this value to the range: 0 through 15. A value of -+ 65535 signifies that no bridge number is assigned -+ to this bridge." -+ ::= { dot1dSrPortEntry 4 } -+ -+dot1dSrPortTargetSegment OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The segment number that corresponds to the target -+ segment this port is considered to be connected to -+ by the bridge. Current source routing protocols -+ limit this value to the range: 0 through 4095. -+ -+ (The value 0 is used by some management -+ applications for special test cases.) A value of -+ 65535 signifies that no target segment is assigned -+ to this port." -+ ::= { dot1dSrPortEntry 5 } -+ -+-- It would be nice if we could use ifMtu as the size of the -+-- largest frame, but we can't because ifMtu is defined to be -+-- the size that the (inter-)network layer can use which can -+-- differ from the MAC layer (especially if several layers of -+-- encapsulation are used). -+ -+dot1dSrPortLargestFrame OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The maximum size of the INFO field (LLC and -+ above) that this port can send/receive. It does -+ not include any MAC level (framing) octets. The -+ value of this object is used by this bridge to -+ determine whether a modification of the -+ LargestFrame (LF, see [14]) field of the Routing -+ Control field of the Routing Information Field is -+ necessary. -+ -+ 64 valid values are defined by the IEEE 802.5M SRT -+ Addendum: 516, 635, 754, 873, 993, 1112, 1231, -+ 1350, 1470, 1542, 1615, 1688, 1761, 1833, 1906, -+ 1979, 2052, 2345, 2638, 2932, 3225, 3518, 3812, -+ 4105, 4399, 4865, 5331, 5798, 6264, 6730, 7197, -+ 7663, 8130, 8539, 8949, 9358, 9768, 10178, 10587, -+ 10997, 11407, 12199, 12992, 13785, 14578, 15370, -+ 16163, 16956, 17749, 20730, 23711, 26693, 29674, -+ 32655, 35637, 38618, 41600, 44591, 47583, 50575, -+ 53567, 56559, 59551, and 65535. -+ -+ An illegal value will not be accepted by the -+ bridge." -+ ::= { dot1dSrPortEntry 6 } -+ -+dot1dSrPortSTESpanMode OBJECT-TYPE -+ SYNTAX INTEGER { -+ auto-span(1), -+ disabled(2), -+ forced(3) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "Determines how this port behaves when presented -+ with a Spanning Tree Explorer frame. The value -+ 'disabled(2)' indicates that the port will not -+ accept or send Spanning Tree Explorer packets; any -+ STE packets received will be silently discarded. -+ The value 'forced(3)' indicates the port will -+ always accept and propagate Spanning Tree Explorer -+ frames. This allows a manually configured -+ Spanning Tree for this class of packet to be -+ configured. Note that unlike transparent -+ bridging, this is not catastrophic to the network -+ if there are loops. The value 'auto-span(1)' can -+ only be returned by a bridge that both implements -+ the Spanning Tree Protocol and has use of the -+ protocol enabled on this port. The behavior of the -+ port for Spanning Tree Explorer frames is -+ determined by the state of dot1dStpPortState. If -+ the port is in the 'forwarding' state, the frame -+ will be accepted or propagated. Otherwise, it -+ will be silently discarded." -+ ::= { dot1dSrPortEntry 7 } -+ -+dot1dSrPortSpecInFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of Specifically Routed frames, also -+ referred to as Source Routed Frames, that have -+ been received from this port's segment." -+ ::= { dot1dSrPortEntry 8 } -+ -+dot1dSrPortSpecOutFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of Specifically Routed frames, also -+ referred to as Source Routed Frames, that this -+ port has transmitted on its segment." -+ ::= { dot1dSrPortEntry 9 } -+ -+dot1dSrPortApeInFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of All Paths Explorer frames, also -+ referred to as All Routes Explorer frames, that -+ have been received by this port from its segment." -+ ::= { dot1dSrPortEntry 10 } -+ -+dot1dSrPortApeOutFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of all Paths Explorer Frames, also -+ referred to as All Routes Explorer frames, that -+ have been transmitted by this port on its -+ segment." -+ ::= { dot1dSrPortEntry 11 } -+ -+dot1dSrPortSteInFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of spanning tree explorer frames that -+ have been received by this port from its segment." -+ ::= { dot1dSrPortEntry 12 } -+ -+dot1dSrPortSteOutFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of spanning tree explorer frames that -+ have been transmitted by this port on its -+ segment." -+ ::= { dot1dSrPortEntry 13 } -+ -+dot1dSrPortSegmentMismatchDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of explorer frames that have been -+ discarded by this port because the routing -+ descriptor field contained an invalid adjacent -+ segment value." -+ ::= { dot1dSrPortEntry 14 } -+ -+dot1dSrPortDuplicateSegmentDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames that have been discarded by -+ this port because the routing descriptor field -+ contained a duplicate segment identifier." -+ ::= { dot1dSrPortEntry 15 } -+ -+dot1dSrPortHopCountExceededDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of explorer frames that have been -+ discarded by this port because the Routing -+ Information Field has exceeded the maximum route -+ descriptor length." -+ ::= { dot1dSrPortEntry 16 } -+ -+dot1dSrPortDupLanIdOrTreeErrors OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of duplicate LAN IDs or Tree errors. -+ This helps in detection of problems in networks -+ containing older IBM Source Routing Bridges." -+ ::= { dot1dSrPortEntry 17 } -+ -+dot1dSrPortLanIdMismatches OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of ARE and STE frames that were -+ discarded because the last LAN ID in the routing -+ information field did not equal the LAN-in ID. -+ This error can occur in implementations which do -+ only a LAN-in ID and Bridge Number check instead -+ of a LAN-in ID, Bridge Number, and LAN-out ID -+ check before they forward broadcast frames." -+ ::= { dot1dSrPortEntry 18 } -+ -+-- scalar object in dot1dSr -+ -+dot1dSrBridgeLfMode OBJECT-TYPE -+ SYNTAX INTEGER { -+ mode3(1), -+ mode6(2) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "Indicates whether the bridge operates using older -+ 3 bit length negotiation fields or the newer 6 bit -+ length field in its RIF." -+ ::= { dot1dSr 2 } -+ -+-- The Port-Pair Database -+ -+-- Implementation of this group is optional. -+ -+-- This group is implemented by those bridges that support -+-- the direct multiport model of the source route bridging -+-- mode as defined in the IEEE 802.5 SRT Addendum to -+-- 802.1d. -+ -+-- Bridges implementing this group may report 65535 for -+-- dot1dSrPortBridgeNumber and dot1dSrPortTargetSegment, -+-- indicating that those objects are not applicable. -+ -+dot1dPortPairTableSize OBJECT-TYPE -+ SYNTAX Gauge -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The total number of entries in the Bridge Port -+ Pair Database." -+ ::= { dot1dPortPair 1 } -+ -+-- the Bridge Port-Pair table -+ -+-- this table represents port pairs within a bridge forming -+-- a unique bridge path, as defined in the IEEE 802.5M SRT -+-- Addendum. -+ -+dot1dPortPairTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dPortPairEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains information about every -+ -+ port pair database entity associated with this -+ source routing bridge." -+ ::= { dot1dPortPair 2 } -+ -+dot1dPortPairEntry OBJECT-TYPE -+ SYNTAX Dot1dPortPairEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information for each port pair entity -+ of a bridge." -+ INDEX { dot1dPortPairLowPort, dot1dPortPairHighPort } -+ ::= { dot1dPortPairTable 1 } -+ -+Dot1dPortPairEntry ::= -+ SEQUENCE { -+ dot1dPortPairLowPort -+ INTEGER, -+ dot1dPortPairHighPort -+ INTEGER, -+ dot1dPortPairBridgeNum -+ INTEGER, -+ dot1dPortPairBridgeState -+ INTEGER -+ } -+ -+dot1dPortPairLowPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the lower numbered port for -+ which this entry contains port pair database -+ information." -+ ::= { dot1dPortPairEntry 1 } -+ -+dot1dPortPairHighPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the higher numbered port for -+ which this entry contains port pair database -+ information." -+ ::= { dot1dPortPairEntry 2 } -+ -+dot1dPortPairBridgeNum OBJECT-TYPE -+ SYNTAX INTEGER -+ -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "A bridge number that uniquely identifies the path -+ provided by this source routing bridge between the -+ segments connected to dot1dPortPairLowPort and -+ dot1dPortPairHighPort. The purpose of bridge -+ number is to disambiguate between multiple paths -+ connecting the same two LANs." -+ ::= { dot1dPortPairEntry 3 } -+ -+dot1dPortPairBridgeState OBJECT-TYPE -+ SYNTAX INTEGER { -+ enabled(1), -+ disabled(2), -+ invalid(3) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The state of dot1dPortPairBridgeNum. Writing -+ 'invalid(3)' to this object removes the -+ corresponding entry." -+ ::= { dot1dPortPairEntry 4 } -+ -+END -diff -ruN net-snmp-5.1.2-orig/net-snmp-config.in net-snmp-5.1.2-5/net-snmp-config.in ---- net-snmp-5.1.2-orig/net-snmp-config.in 2004-06-17 15:39:28.000000000 +0200 -+++ net-snmp-5.1.2-5/net-snmp-config.in 2005-03-13 16:17:21.000000000 +0100 -@@ -113,13 +113,13 @@ - #################################################### client lib - --libs) - # use this one == --netsnmp-libs + --external-libs -- echo $NSC_LDFLAGS $NSC_LIBDIR -lnetsnmp $NSC_LIBS -+ echo $NSC_LDFLAGS $NSC_LIBDIR -lnetsnmp $NSC_LIBS @WRAPLIBS@ - ;; - --netsnmp-libs) - echo $NSC_LIBDIR -lnetsnmp - ;; - --external-libs) -- echo $NSC_LDFLAGS $NSC_LIBS -+ echo $NSC_LDFLAGS $NSC_LIBS @WRAPLIBS@ - ;; - #################################################### agent lib - --base-agent-libs) -@@ -130,13 +130,13 @@ - ;; - --agent-libs) - # use this one == --netsnmp-agent-libs + --external-libs -- echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS -+ echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS @WRAPLIBS@ - ;; - --netsnmp-agent-libs) - echo $NSC_LIBDIR $NSC_BASE_AGENT_LIBS - ;; - --external-agent-libs) -- echo $NSC_LDFLAGS $NSC_AGENTLIBS -+ echo $NSC_LDFLAGS $NSC_AGENTLIBS @WRAPLIBS@ - ;; - #################################################### - --version) -@@ -409,7 +409,7 @@ - echo "Ack. Can't create $tmpfile." - exit 1 - fi -- cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I@includedir@ -o $outname $tmpfile $cfiles $NSC_LDFLAGS -L$NSC_EXEC_PREFIX/lib -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp $NSC_AGENTLIBS $ldflags" -+ cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I@includedir@ -o $outname $tmpfile $cfiles $NSC_LDFLAGS -L$NSC_EXEC_PREFIX/lib -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp $NSC_AGENTLIBS @WRAPLIBS@ $ldflags" - echo "running: $cmd" - `$cmd` - if test "x$norm" != "x1" ; then -diff -ruN net-snmp-5.1.2-orig/perl/agent/netsnmp_request_infoPtr.pm net-snmp-5.1.2-5/perl/agent/netsnmp_request_infoPtr.pm ---- net-snmp-5.1.2-orig/perl/agent/netsnmp_request_infoPtr.pm 2002-09-19 22:38:24.000000000 +0200 -+++ net-snmp-5.1.2-5/perl/agent/netsnmp_request_infoPtr.pm 2005-03-13 16:17:21.000000000 +0100 -@@ -4,6 +4,7 @@ - - 1; - __END__ -+ - =head1 NAME - - NetSNMP::agent::netsnmp_request_infoPtr - Perl extension for request information -diff -ruN net-snmp-5.1.2-orig/snmplib/Makefile.in net-snmp-5.1.2-5/snmplib/Makefile.in ---- net-snmp-5.1.2-orig/snmplib/Makefile.in 2004-03-04 14:41:19.000000000 +0100 -+++ net-snmp-5.1.2-5/snmplib/Makefile.in 2005-03-13 16:17:21.000000000 +0100 -@@ -178,11 +178,11 @@ - - # how to build the libraries. - libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION): ${TOBJS} -- $(LIB_LD_CMD) libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS} -+ $(LIB_LD_CMD) libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS} @CRYPTOLIBS@ - $(RANLIB) libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) - - libsnmp.$(LIB_EXTENSION)$(LIB_VERSION): ${TOBJS} -- $(LIB_LD_CMD) libsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS} -+ $(LIB_LD_CMD) libsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS} @CRYPTOLIBS@ - $(RANLIB) libsnmp.$(LIB_EXTENSION)$(LIB_VERSION) - - # -diff -ruN net-snmp-5.1.2-orig/snmplib/snmpUDPDomain.c net-snmp-5.1.2-5/snmplib/snmpUDPDomain.c ---- net-snmp-5.1.2-orig/snmplib/snmpUDPDomain.c 2004-07-07 14:21:32.000000000 +0200 -+++ net-snmp-5.1.2-5/snmplib/snmpUDPDomain.c 2005-03-13 16:17:21.000000000 +0100 -@@ -233,18 +233,6 @@ - netsnmp_transport_free(t); - return NULL; - } --#ifdef SO_BSDCOMPAT -- /* -- * Patch for Linux. Without this, UDP packets that fail get an ICMP -- * response. Linux turns the failed ICMP response into an error message -- * and return value, unlike all other OS's. -- */ -- { -- int one = 1; -- setsockopt(t->sock, SOL_SOCKET, SO_BSDCOMPAT, (void *) &one, -- sizeof(one)); -- } --#endif /*SO_BSDCOMPAT */ - /* - * SO_REUSEADDR will allow multiple apps to open the same port at - * the same time. Only the last one to open the socket will get -diff -ruN net-snmp-5.1.2-orig/snmplib/snmpUDPIPv6Domain.c net-snmp-5.1.2-5/snmplib/snmpUDPIPv6Domain.c ---- net-snmp-5.1.2-orig/snmplib/snmpUDPIPv6Domain.c 2004-07-22 19:45:00.000000000 +0200 -+++ net-snmp-5.1.2-5/snmplib/snmpUDPIPv6Domain.c 2005-03-13 16:17:21.000000000 +0100 -@@ -249,17 +249,6 @@ - netsnmp_transport_free(t); - return NULL; - } --#ifdef SO_BSDCOMPAT -- /* -- * Patch for Linux. Without this, UDP packets that fail get an ICMP -- * response. Linux turns the failed ICMP response into an error message -- * and return value, unlike all other OS's. -- */ -- { -- int one = 1; -- setsockopt(t->sock, SOL_SOCKET, SO_BSDCOMPAT, &one, sizeof(one)); -- } --#endif /*SO_BSDCOMPAT */ - - /* - * Try to set the send and receive buffers to a reasonably large value, so -diff -ruN net-snmp-5.1.2-orig/snmplib/snmp_logging.c net-snmp-5.1.2-5/snmplib/snmp_logging.c ---- net-snmp-5.1.2-orig/snmplib/snmp_logging.c 2004-03-31 03:06:08.000000000 +0200 -+++ net-snmp-5.1.2-5/snmplib/snmp_logging.c 2005-03-13 16:17:21.000000000 +0100 -@@ -860,13 +860,14 @@ - } else { - strcpy(sbuf, ""); - } -- newline = string[strlen(string) - 1] == '\n'; /* XXX - Eh ? */ - - if (logh->imagic) - printf( "%s%s", sbuf, string); - else - fprintf(stderr, "%s%s", sbuf, string); - -+ newline = string[strlen(string) - 1] == '\n'; /* XXX - Eh ? */ -+ - return 1; - } - -diff -ruN net-snmp-5.1.2-orig/snmplib/winservice.mc net-snmp-5.1.2-5/snmplib/winservice.mc ---- net-snmp-5.1.2-orig/snmplib/winservice.mc 2002-04-20 09:30:21.000000000 +0200 -+++ net-snmp-5.1.2-5/snmplib/winservice.mc 2005-03-13 16:17:21.000000000 +0100 -@@ -1,11 +1,11 @@ --;//Message catalog for Windows Serivce Support routines --;//To support event logging functionality --;//By Raju Krishnappa(raju_krishnappa@yahoo.com) -- --;//Message ID descriptions -- --MessageId=100 --SymbolicName=DISPLAY_MSG --Language=English --%1. --. -+;//Message catalog for Windows Serivce Support routines -+;//To support event logging functionality -+;//By Raju Krishnappa(raju_krishnappa@yahoo.com) -+ -+;//Message ID descriptions -+ -+MessageId=100 -+SymbolicName=DISPLAY_MSG -+Language=English -+%1. -+. -diff -ruN net-snmp-5.1.2-orig/snmplib/winservice.rc net-snmp-5.1.2-5/snmplib/winservice.rc ---- net-snmp-5.1.2-orig/snmplib/winservice.rc 2002-04-20 09:30:21.000000000 +0200 -+++ net-snmp-5.1.2-5/snmplib/winservice.rc 2005-03-13 16:17:21.000000000 +0100 -@@ -1,2 +1,2 @@ --LANGUAGE 0x9,0x1 --1 11 MSG00001.bin -+LANGUAGE 0x9,0x1 -+1 11 MSG00001.bin diff --git a/openwrt/package/net-snmp/patches/750-ieee802dot11.patch b/openwrt/package/net-snmp/patches/750-ieee802dot11.patch deleted file mode 100644 index 8939a44f230..00000000000 --- a/openwrt/package/net-snmp/patches/750-ieee802dot11.patch +++ /dev/null @@ -1,6156 +0,0 @@ ---- net-snmp-5.1.2-orig/agent/mibgroup/ieee802dot11.c 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/agent/mibgroup/ieee802dot11.c 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,4915 @@ -+/**************************************************************************** -+* * -+* File Name: ieee802dot11.c * -+* Used By: * -+* * -+* Operating System: * -+* Purpose: * -+* * -+* Comments: * -+* * -+* Author: Larry Simmons * -+* lsimmons@avantcom.com * -+* www.avantcom.com * -+* * -+* Creation Date: 09/02/03 * -+* * -+* Ver Date Inits Modification * -+* ----- -------- ----- ------------ * -+* 0.0.1 09/02/03 LRS created * -+* 0.0.2 09/24/03 LRS wouldn't build after fresh ./configure * -+****************************************************************************/ -+/**************************************************************************** -+* Includes * -+****************************************************************************/ -+#include -+#include -+#include -+#include "ieee802dot11.h" -+#include "iwlib.h" -+ -+/**************************************************************************** -+* Defines * -+****************************************************************************/ -+#define DISPLAYWIEXT // display wireless ext info -+#define TABLE_SIZE 1 -+//#define MINLOADFREQ 15 // min reload frequency in seconds -+#define MINLOADFREQ 5 // min reload frequency in seconds // for testing -+#define PROC_NET_DEV "/proc/net/dev" -+#define PROC_NET_WIRELESS "/proc/net/wireless" -+ -+#ifndef UCHAR -+ typedef unsigned char UCHAR; -+#endif -+ -+/**************************************************************************** -+* Private Functions * -+****************************************************************************/ -+static void loadTables(); -+static void loadWiExt ( int, char *, struct wireless_info * ); -+static void load80211Structs ( int, char *, struct wireless_info * ); -+static void initStructs(); -+ -+// Wireless Extensions Specific Functions -+static void loadWiExtTo80211Structs ( int, char *, struct wireless_info * ); -+static void displayWiExt ( struct wireless_info ); -+ -+// Linked List Functions -+static void addList ( char *, char *, int ); -+static void initLists(); // initialize all the linked lists -+static void flushLists(); // flush all the linked lists -+static void flushList ( char * ); // flush a single linked list -+ -+// Utility Functions -+static int openSocket ( void ); -+static int mWatt2dbm ( int ); -+static char *htob ( char * ); -+static int hasChanged ( char *, int ); -+ -+/**************************************************************************** -+* Private Variables * -+****************************************************************************/ -+static unsigned long lastLoad = 0; // ET in secs at last table load -+ -+static struct avNode *lastNode, *newNode, *np; -+ -+/**************************************************************************** -+* External Functions * -+****************************************************************************/ -+ -+/**************************************************************************** -+* ieee802dot11_variables_oid: * -+* this is the top level oid that we want to register under. This * -+* is essentially a prefix, with the suffix appearing in the * -+* variable below. * -+****************************************************************************/ -+oid ieee802dot11_variables_oid[] = { 1,2,840,10036 }; -+ -+/**************************************************************************** -+* variable7 ieee802dot11_variables: * -+* this variable defines function callbacks and type return information * -+* for the ieee802dot11 mib section * -+****************************************************************************/ -+struct variable7 ieee802dot11_variables[] = { -+/* magic number , variable type , ro/rw , callback fn , L, oidsuffix */ -+#define DOT11STATIONID 3 -+ { DOT11STATIONID , ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,1 } }, -+#define DOT11MEDIUMOCCUPANCYLIMIT 4 -+ { DOT11MEDIUMOCCUPANCYLIMIT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,2 } }, -+#define DOT11CFPOLLABLE 5 -+ { DOT11CFPOLLABLE , ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,3 } }, -+#define DOT11CFPPERIOD 6 -+ { DOT11CFPPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,4 } }, -+#define DOT11CFPMAXDURATION 7 -+ { DOT11CFPMAXDURATION , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,5 } }, -+#define DOT11AUTHENTICATIONRESPONSETIMEOUT 8 -+ { DOT11AUTHENTICATIONRESPONSETIMEOUT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,6 } }, -+#define DOT11PRIVACYOPTIONIMPLEMENTED 9 -+ { DOT11PRIVACYOPTIONIMPLEMENTED, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,7 } }, -+#define DOT11POWERMANAGEMENTMODE 10 -+ { DOT11POWERMANAGEMENTMODE, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,8 } }, -+#define DOT11DESIREDSSID 11 -+ { DOT11DESIREDSSID , ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,9 } }, -+#define DOT11DESIREDBSSTYPE 12 -+ { DOT11DESIREDBSSTYPE , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,10 } }, -+#define DOT11OPERATIONALRATESET 13 -+ { DOT11OPERATIONALRATESET, ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,11 } }, -+#define DOT11BEACONPERIOD 14 -+ { DOT11BEACONPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,12 } }, -+#define DOT11DTIMPERIOD 15 -+ { DOT11DTIMPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,13 } }, -+#define DOT11ASSOCIATIONRESPONSETIMEOUT 16 -+ { DOT11ASSOCIATIONRESPONSETIMEOUT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,14 } }, -+#define DOT11DISASSOCIATEREASON 17 -+ { DOT11DISASSOCIATEREASON, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,15 } }, -+#define DOT11DISASSOCIATESTATION 18 -+ { DOT11DISASSOCIATESTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,16 } }, -+#define DOT11DEAUTHENTICATEREASON 19 -+ { DOT11DEAUTHENTICATEREASON, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,17 } }, -+#define DOT11DEAUTHENTICATESTATION 20 -+ { DOT11DEAUTHENTICATESTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,18 } }, -+#define DOT11AUTHENTICATEFAILSTATUS 21 -+ { DOT11AUTHENTICATEFAILSTATUS, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,19 } }, -+#define DOT11AUTHENTICATEFAILSTATION 22 -+ { DOT11AUTHENTICATEFAILSTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,20 } }, -+ -+#define DOT11AUTHENTICATIONALGORITHM 26 -+ { DOT11AUTHENTICATIONALGORITHM, ASN_INTEGER , RONLY , var_dot11AuthenticationAlgorithmsTable, 4, { 1,2,1,2 } }, -+#define DOT11AUTHENTICATIONALGORITHMSENABLE 27 -+ { DOT11AUTHENTICATIONALGORITHMSENABLE, ASN_INTEGER , RWRITE, var_dot11AuthenticationAlgorithmsTable, 4, { 1,2,1,3 } }, -+ -+#define DOT11WEPDEFAULTKEYVALUE 31 -+ { DOT11WEPDEFAULTKEYVALUE, ASN_OCTET_STR , RWRITE, var_dot11WEPDefaultKeysTable, 4, { 1,3,1,2 } }, -+ -+#define DOT11WEPKEYMAPPINGADDRESS 35 -+ { DOT11WEPKEYMAPPINGADDRESS, ASN_OCTET_STR , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,2 } }, -+#define DOT11WEPKEYMAPPINGWEPON 36 -+ { DOT11WEPKEYMAPPINGWEPON, ASN_INTEGER , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,3 } }, -+#define DOT11WEPKEYMAPPINGVALUE 37 -+ { DOT11WEPKEYMAPPINGVALUE, ASN_OCTET_STR , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,4 } }, -+#define DOT11WEPKEYMAPPINGSTATUS 38 -+ { DOT11WEPKEYMAPPINGSTATUS, ASN_INTEGER , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,5 } }, -+ -+#define DOT11PRIVACYINVOKED 41 -+ { DOT11PRIVACYINVOKED , ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,1 } }, -+#define DOT11WEPDEFAULTKEYID 42 -+ { DOT11WEPDEFAULTKEYID, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,2 } }, -+#define DOT11WEPKEYMAPPINGLENGTH 43 -+ { DOT11WEPKEYMAPPINGLENGTH, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,3 } }, -+#define DOT11EXCLUDEUNENCRYPTED 44 -+ { DOT11EXCLUDEUNENCRYPTED, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,4 } }, -+#define DOT11WEPICVERRORCOUNT 45 -+ { DOT11WEPICVERRORCOUNT, ASN_COUNTER , RONLY , var_dot11PrivacyTable, 4, { 1,5,1,5 } }, -+#define DOT11WEPEXCLUDEDCOUNT 46 -+ { DOT11WEPEXCLUDEDCOUNT, ASN_COUNTER , RONLY , var_dot11PrivacyTable, 4, { 1,5,1,6 } }, -+ -+#define DOT11MACADDRESS 49 -+ { DOT11MACADDRESS , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,1 } }, -+#define DOT11RTSTHRESHOLD 50 -+ { DOT11RTSTHRESHOLD , ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,2 } }, -+#define DOT11SHORTRETRYLIMIT 51 -+ { DOT11SHORTRETRYLIMIT, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,3 } }, -+#define DOT11LONGRETRYLIMIT 52 -+ { DOT11LONGRETRYLIMIT , ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,4 } }, -+#define DOT11FRAGMENTATIONTHRESHOLD 53 -+ { DOT11FRAGMENTATIONTHRESHOLD, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,5 } }, -+#define DOT11MAXTRANSMITMSDULIFETIME 54 -+ { DOT11MAXTRANSMITMSDULIFETIME, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,6 } }, -+#define DOT11MAXRECEIVELIFETIME 55 -+ { DOT11MAXRECEIVELIFETIME, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,7 } }, -+#define DOT11MANUFACTURERID 56 -+ { DOT11MANUFACTURERID , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,8 } }, -+#define DOT11PRODUCTID 57 -+ { DOT11PRODUCTID , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,9 } }, -+ -+#define DOT11TRANSMITTEDFRAGMENTCOUNT 60 -+ { DOT11TRANSMITTEDFRAGMENTCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,1 } }, -+#define DOT11MULTICASTTRANSMITTEDFRAMECOUNT 61 -+ { DOT11MULTICASTTRANSMITTEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,2 } }, -+#define DOT11FAILEDCOUNT 62 -+ { DOT11FAILEDCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,3 } }, -+#define DOT11RETRYCOUNT 63 -+ { DOT11RETRYCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,4 } }, -+#define DOT11MULTIPLERETRYCOUNT 64 -+ { DOT11MULTIPLERETRYCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,5 } }, -+#define DOT11FRAMEDUPLICATECOUNT 65 -+ { DOT11FRAMEDUPLICATECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,6 } }, -+#define DOT11RTSSUCCESSCOUNT 66 -+ { DOT11RTSSUCCESSCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,7 } }, -+#define DOT11RTSFAILURECOUNT 67 -+ { DOT11RTSFAILURECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,8 } }, -+#define DOT11ACKFAILURECOUNT 68 -+ { DOT11ACKFAILURECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,9 } }, -+#define DOT11RECEIVEDFRAGMENTCOUNT 69 -+ { DOT11RECEIVEDFRAGMENTCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,10 } }, -+#define DOT11MULTICASTRECEIVEDFRAMECOUNT 70 -+ { DOT11MULTICASTRECEIVEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,11 } }, -+#define DOT11FCSERRORCOUNT 71 -+ { DOT11FCSERRORCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,12 } }, -+#define DOT11TRANSMITTEDFRAMECOUNT 72 -+ { DOT11TRANSMITTEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,13 } }, -+#define DOT11WEPUNDECRYPTABLECOUNT 73 -+ { DOT11WEPUNDECRYPTABLECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,14 } }, -+ -+#define DOT11ADDRESS 77 -+ { DOT11ADDRESS , ASN_OCTET_STR , RWRITE, var_dot11GroupAddressesTable, 4, { 2,3,1,2 } }, -+#define DOT11GROUPADDRESSESSTATUS 78 -+ { DOT11GROUPADDRESSESSTATUS, ASN_INTEGER , RWRITE, var_dot11GroupAddressesTable, 4, { 2,3,1,3 } }, -+ -+#define DOT11RESOURCETYPEIDNAME 79 -+ { DOT11RESOURCETYPEIDNAME, ASN_OCTET_STR , RONLY , var_ieee802dot11, 3, { 3,1,1 } }, -+#define DOT11MANUFACTUREROUI 82 -+ { DOT11MANUFACTUREROUI, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,1 } }, -+#define DOT11MANUFACTURERNAME 83 -+ { DOT11MANUFACTURERNAME, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,2 } }, -+#define DOT11MANUFACTURERPRODUCTNAME 84 -+ { DOT11MANUFACTURERPRODUCTNAME, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,3 } }, -+#define DOT11MANUFACTURERPRODUCTVERSION 85 -+ { DOT11MANUFACTURERPRODUCTVERSION, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,4 } }, -+ -+#define DOT11PHYTYPE 88 -+ { DOT11PHYTYPE , ASN_INTEGER , RONLY , var_dot11PhyOperationTable, 4, { 4,1,1,1 } }, -+#define DOT11CURRENTREGDOMAIN 89 -+ { DOT11CURRENTREGDOMAIN, ASN_INTEGER , RWRITE, var_dot11PhyOperationTable, 4, { 4,1,1,2 } }, -+#define DOT11TEMPTYPE 90 -+ { DOT11TEMPTYPE , ASN_INTEGER , RONLY , var_dot11PhyOperationTable, 4, { 4,1,1,3 } }, -+#define DOT11CURRENTTXANTENNA 93 -+ { DOT11CURRENTTXANTENNA, ASN_INTEGER , RWRITE, var_dot11PhyAntennaTable, 4, { 4,2,1,1 } }, -+#define DOT11DIVERSITYSUPPORT 94 -+ { DOT11DIVERSITYSUPPORT, ASN_INTEGER , RONLY , var_dot11PhyAntennaTable, 4, { 4,2,1,2 } }, -+#define DOT11CURRENTRXANTENNA 95 -+ { DOT11CURRENTRXANTENNA, ASN_INTEGER , RWRITE, var_dot11PhyAntennaTable, 4, { 4,2,1,3 } }, -+#define DOT11NUMBERSUPPORTEDPOWERLEVELS 98 -+ { DOT11NUMBERSUPPORTEDPOWERLEVELS, ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,1 } }, -+#define DOT11TXPOWERLEVEL1 99 -+ { DOT11TXPOWERLEVEL1 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,2 } }, -+#define DOT11TXPOWERLEVEL2 100 -+ { DOT11TXPOWERLEVEL2 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,3 } }, -+#define DOT11TXPOWERLEVEL3 101 -+ { DOT11TXPOWERLEVEL3 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,4 } }, -+#define DOT11TXPOWERLEVEL4 102 -+ { DOT11TXPOWERLEVEL4 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,5 } }, -+#define DOT11TXPOWERLEVEL5 103 -+ { DOT11TXPOWERLEVEL5 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,6 } }, -+#define DOT11TXPOWERLEVEL6 104 -+ { DOT11TXPOWERLEVEL6 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,7 } }, -+#define DOT11TXPOWERLEVEL7 105 -+ { DOT11TXPOWERLEVEL7 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,8 } }, -+#define DOT11TXPOWERLEVEL8 106 -+ { DOT11TXPOWERLEVEL8 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,9 } }, -+#define DOT11CURRENTTXPOWERLEVEL 107 -+ { DOT11CURRENTTXPOWERLEVEL, ASN_INTEGER , RWRITE, var_dot11PhyTxPowerTable, 4, { 4,3,1,10 } }, -+ -+#define DOT11HOPTIME 110 -+ { DOT11HOPTIME , ASN_INTEGER , RONLY , var_dot11PhyFHSSTable, 4, { 4,4,1,1 } }, -+#define DOT11CURRENTCHANNELNUMBER 111 -+ { DOT11CURRENTCHANNELNUMBER, ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,2 } }, -+#define DOT11MAXDWELLTIME 112 -+ { DOT11MAXDWELLTIME , ASN_INTEGER , RONLY , var_dot11PhyFHSSTable, 4, { 4,4,1,3 } }, -+#define DOT11CURRENTDWELLTIME 113 -+ { DOT11CURRENTDWELLTIME, ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,4 } }, -+#define DOT11CURRENTSET 114 -+ { DOT11CURRENTSET , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,5 } }, -+#define DOT11CURRENTPATTERN 115 -+ { DOT11CURRENTPATTERN , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,6 } }, -+#define DOT11CURRENTINDEX 116 -+ { DOT11CURRENTINDEX , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,7 } }, -+ -+#define DOT11CURRENTCHANNEL 119 -+ { DOT11CURRENTCHANNEL , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,1 } }, -+#define DOT11CCAMODESUPPORTED 120 -+ { DOT11CCAMODESUPPORTED, ASN_INTEGER , RONLY , var_dot11PhyDSSSTable, 4, { 4,5,1,2 } }, -+#define DOT11CURRENTCCAMODE 121 -+ { DOT11CURRENTCCAMODE , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,3 } }, -+#define DOT11EDTHRESHOLD 122 -+ { DOT11EDTHRESHOLD , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,4 } }, -+ -+#define DOT11CCAWATCHDOGTIMERMAX 125 -+ { DOT11CCAWATCHDOGTIMERMAX, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,1 } }, -+#define DOT11CCAWATCHDOGCOUNTMAX 126 -+ { DOT11CCAWATCHDOGCOUNTMAX, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,2 } }, -+#define DOT11CCAWATCHDOGTIMERMIN 127 -+ { DOT11CCAWATCHDOGTIMERMIN, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,3 } }, -+#define DOT11CCAWATCHDOGCOUNTMIN 128 -+ { DOT11CCAWATCHDOGCOUNTMIN, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,4 } }, -+ -+#define DOT11REGDOMAINSSUPPORTVALUE 132 -+ { DOT11REGDOMAINSSUPPORTVALUE, ASN_INTEGER , RONLY , var_dot11RegDomainsSupportedTable, 4, { 4,7,1,2 } }, -+ -+#define DOT11SUPPORTEDTXANTENNA 136 -+ { DOT11SUPPORTEDTXANTENNA, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,2 } }, -+#define DOT11SUPPORTEDRXANTENNA 137 -+ { DOT11SUPPORTEDRXANTENNA, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,3 } }, -+#define DOT11DIVERSITYSELECTIONRX 138 -+ { DOT11DIVERSITYSELECTIONRX, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,4 } }, -+ -+#define DOT11SUPPORTEDDATARATESTXVALUE 142 -+ { DOT11SUPPORTEDDATARATESTXVALUE, ASN_INTEGER , RONLY , var_dot11SupportedDataRatesTxTable, 4, { 4,9,1,2 } }, -+ -+#define DOT11SUPPORTEDDATARATESRXVALUE 146 -+ { DOT11SUPPORTEDDATARATESRXVALUE, ASN_INTEGER , RONLY , var_dot11SupportedDataRatesRxTable, 4, { 4,10,1,2 } }, -+}; -+// ( L = length of the oidsuffix ) -+ -+/**************************************************************************** -+* * -+* init_ieee802dot11() - perform any required initialization * -+* * -+****************************************************************************/ -+void init_ieee802dot11 ( void ) { -+ -+ /* register ourselves with the agent to handle our mib tree */ -+ REGISTER_MIB("ieee802dot11", ieee802dot11_variables, variable7, -+ ieee802dot11_variables_oid); -+ -+ initLists(); -+} -+ -+/**************************************************************************** -+* * -+* shutdown_ieee802dot11() - perform any required cleanup @ shutdown * -+* * -+****************************************************************************/ -+void shutdown_ieee802dot11 ( void ) -+{ -+ flushLists(); -+} -+ -+/**************************************************************************** -+* * -+* var_ieee802dot11() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_ieee802dot11 ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ loadTables(); -+ -+ if ( header_generic ( vp, name, length, exact,var_len,write_method ) -+ == MATCH_FAILED ) -+ return NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11RESOURCETYPEIDNAME: -+ if ( !haveResourceTypeIDName ) -+ return NULL; -+ *var_len = strlen ( resourceTypeIDName ); -+ return ( UCHAR * ) resourceTypeIDName; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11StationConfigTable() - return a variable value from the table * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11StationConfigTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ static char MACWork[17]; -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &scList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ sc = ( struct scTbl_data * ) np->data; -+ rName[vp->namelen] = sc->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ -+ switch ( vp->magic ) { // found requested OID, now check for requested variable -+ case DOT11STATIONID: -+ if ( sc->haveStationID ) found = TRUE; break; -+ case DOT11MEDIUMOCCUPANCYLIMIT: -+ if ( sc->haveMediumOccupancyLimit ) found = TRUE; break; -+ case DOT11CFPOLLABLE: -+ if ( sc->haveCFPPollable ) found = TRUE; break; -+ case DOT11CFPPERIOD: -+ if ( sc->haveCFPPeriod ) found = TRUE; break; -+ case DOT11CFPMAXDURATION: -+ if ( sc->haveMaxDuration ) found = TRUE; break; -+ case DOT11AUTHENTICATIONRESPONSETIMEOUT: -+ if ( sc->haveAuthenticationResponseTimeOut ) found = TRUE; break; -+ case DOT11PRIVACYOPTIONIMPLEMENTED: -+ if ( sc->havePrivacyOptionImplemented ) found = TRUE; break; -+ case DOT11POWERMANAGEMENTMODE: -+ if ( sc->havePowerManagementMode ) found = TRUE; break; -+ case DOT11DESIREDSSID: -+ if ( sc->haveDesiredSSID ) found = TRUE; break; -+ case DOT11DESIREDBSSTYPE: -+ if ( sc->haveDesiredBSSType ) found = TRUE; break; -+ case DOT11OPERATIONALRATESET: -+ if ( sc->haveOperationalRateSet ) found = TRUE; break; -+ case DOT11BEACONPERIOD: -+ if ( sc->haveBeaconPeriod ) found = TRUE; break; -+ case DOT11DTIMPERIOD: -+ if ( sc->haveDTIMPeriod ) found = TRUE; break; -+ case DOT11ASSOCIATIONRESPONSETIMEOUT: -+ if ( sc->haveAssociationResponseTimeOut ) found = TRUE; break; -+ case DOT11DISASSOCIATEREASON: -+ if ( sc->disAssociationReason ) found = TRUE; break; -+ case DOT11DISASSOCIATESTATION: -+ if ( sc->haveDisAssociationStation ) found = TRUE; break; -+ case DOT11DEAUTHENTICATEREASON: -+ if ( sc->deAuthenticationReason ) found = TRUE; break; -+ case DOT11DEAUTHENTICATESTATION: -+ if ( sc->haveDeAuthenticationStation ) found = TRUE; break; -+ case DOT11AUTHENTICATEFAILSTATUS: -+ if ( sc->authenticateFailStatus ) found = TRUE; break; -+ case DOT11AUTHENTICATEFAILSTATION: -+ if ( sc->haveAuthenticateFailStation ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11STATIONID: -+// *write_method = write_dot11StationID; -+ MACWork[ 0] = sc->stationID [ 0]; -+ MACWork[ 1] = sc->stationID [ 1]; -+ MACWork[ 2] = sc->stationID [ 3]; -+ MACWork[ 3] = sc->stationID [ 4]; -+ MACWork[ 4] = sc->stationID [ 6]; -+ MACWork[ 5] = sc->stationID [ 7]; -+ MACWork[ 6] = sc->stationID [ 9]; -+ MACWork[ 7] = sc->stationID [10]; -+ MACWork[ 8] = sc->stationID [12]; -+ MACWork[ 9] = sc->stationID [13]; -+ MACWork[10] = sc->stationID [15]; -+ MACWork[11] = sc->stationID [16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11MEDIUMOCCUPANCYLIMIT: -+// *write_method = write_dot11MediumOccupancyLimit; -+ sc->mediumOccupancyLimit = 5; -+ return ( UCHAR * ) &sc->mediumOccupancyLimit; -+ -+ case DOT11CFPOLLABLE: -+ return ( UCHAR * ) &sc->CFPPollable; -+ -+ case DOT11CFPPERIOD: -+// *write_method = write_dot11CFPPeriod; -+ return ( UCHAR * ) &sc->CFPPeriod; -+ -+ case DOT11CFPMAXDURATION: -+// *write_method = write_dot11CFPMaxDuration; -+ return ( UCHAR * ) &sc->maxDuration; -+ -+ case DOT11AUTHENTICATIONRESPONSETIMEOUT: -+// *write_method = write_dot11AuthenticationResponseTimeOut; -+ return ( UCHAR * ) &sc->authenticationResponseTimeOut; -+ -+ case DOT11PRIVACYOPTIONIMPLEMENTED: -+ return ( UCHAR * ) &sc->privacyOptionImplemented; -+ -+ case DOT11POWERMANAGEMENTMODE: -+// *write_method = write_dot11PowerManagementMode; -+ return ( UCHAR * ) &sc->powerManagementMode; -+ -+ case DOT11DESIREDSSID: -+// *write_method = write_dot11DesiredSSID; -+ *var_len = strlen ( sc->desiredSSID ); -+ return ( UCHAR * ) sc->desiredSSID; -+ -+ case DOT11DESIREDBSSTYPE: -+// *write_method = write_dot11DesiredBSSType; -+ return ( UCHAR * ) &sc->desiredBSSType; -+ -+ case DOT11OPERATIONALRATESET: -+// *write_method = write_dot11OperationalRateSet; -+ *var_len = strlen ( sc->operationalRateSet ); -+ return ( UCHAR * ) sc->operationalRateSet; -+ -+ case DOT11BEACONPERIOD: -+// *write_method = write_dot11BeaconPeriod; -+ return ( UCHAR * ) &sc->beaconPeriod; -+ -+ case DOT11DTIMPERIOD: -+// *write_method = write_dot11DTIMPeriod; -+ return ( UCHAR * ) &sc->DTIMPeriod; -+ -+ case DOT11ASSOCIATIONRESPONSETIMEOUT: -+// *write_method = write_dot11AssociationResponseTimeOut; -+ return ( UCHAR * ) &sc->associationResponseTimeOut; -+ -+ case DOT11DISASSOCIATEREASON: -+ return ( UCHAR * ) &sc->disAssociationReason; -+ -+ case DOT11DISASSOCIATESTATION: -+ MACWork[ 0] = sc->disAssociationStation[ 0]; -+ MACWork[ 1] = sc->disAssociationStation[ 1]; -+ MACWork[ 2] = sc->disAssociationStation[ 3]; -+ MACWork[ 3] = sc->disAssociationStation[ 4]; -+ MACWork[ 4] = sc->disAssociationStation[ 6]; -+ MACWork[ 5] = sc->disAssociationStation[ 7]; -+ MACWork[ 6] = sc->disAssociationStation[ 9]; -+ MACWork[ 7] = sc->disAssociationStation[10]; -+ MACWork[ 8] = sc->disAssociationStation[12]; -+ MACWork[ 9] = sc->disAssociationStation[13]; -+ MACWork[10] = sc->disAssociationStation[15]; -+ MACWork[11] = sc->disAssociationStation[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11DEAUTHENTICATEREASON: -+ return ( UCHAR * ) &sc->deAuthenticationReason; -+ -+ case DOT11DEAUTHENTICATESTATION: -+ MACWork[ 0] = sc->deAuthenticationStation[ 0]; -+ MACWork[ 1] = sc->deAuthenticationStation[ 1]; -+ MACWork[ 2] = sc->deAuthenticationStation[ 3]; -+ MACWork[ 3] = sc->deAuthenticationStation[ 4]; -+ MACWork[ 4] = sc->deAuthenticationStation[ 6]; -+ MACWork[ 5] = sc->deAuthenticationStation[ 7]; -+ MACWork[ 6] = sc->deAuthenticationStation[ 9]; -+ MACWork[ 7] = sc->deAuthenticationStation[10]; -+ MACWork[ 8] = sc->deAuthenticationStation[12]; -+ MACWork[ 9] = sc->deAuthenticationStation[13]; -+ MACWork[10] = sc->deAuthenticationStation[15]; -+ MACWork[11] = sc->deAuthenticationStation[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11AUTHENTICATEFAILSTATUS: -+ return ( UCHAR * ) &sc->authenticateFailStatus; -+ -+ case DOT11AUTHENTICATEFAILSTATION: -+ MACWork[ 0] = sc->authenticateFailStation[ 0]; -+ MACWork[ 1] = sc->authenticateFailStation[ 1]; -+ MACWork[ 2] = sc->authenticateFailStation[ 3]; -+ MACWork[ 3] = sc->authenticateFailStation[ 4]; -+ MACWork[ 4] = sc->authenticateFailStation[ 6]; -+ MACWork[ 5] = sc->authenticateFailStation[ 7]; -+ MACWork[ 6] = sc->authenticateFailStation[ 9]; -+ MACWork[ 7] = sc->authenticateFailStation[10]; -+ MACWork[ 8] = sc->authenticateFailStation[12]; -+ MACWork[ 9] = sc->authenticateFailStation[13]; -+ MACWork[10] = sc->authenticateFailStation[15]; -+ MACWork[11] = sc->authenticateFailStation[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11AuthenticationAlgorithmsTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11AuthenticationAlgorithmsTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &aaList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ aa = ( struct aaTbl_data * ) np->data; -+ rName[vp->namelen + 0] = aa->ifIndex; -+ rName[vp->namelen + 1] = aa->authenticationAlgorithmsIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11AUTHENTICATIONALGORITHM: -+ if ( aa->haveAuthenticationAlgorithm ) found = TRUE; break; -+ case DOT11AUTHENTICATIONALGORITHMSENABLE: -+ if ( aa->authenticationAlgorithmsEnable ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11AUTHENTICATIONALGORITHM: -+ return ( UCHAR * ) &aa->authenticationAlgorithm; -+ -+ case DOT11AUTHENTICATIONALGORITHMSENABLE: -+// *write_method = write_dot11AuthenticationAlgorithmsEnable; -+ return ( UCHAR * ) &aa->authenticationAlgorithmsEnable; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11WEPDefaultKeysTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11WEPDefaultKeysTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &dfList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ df = ( struct dfTbl_data * ) np->data; -+ rName[vp->namelen + 0] = df->ifIndex; -+ rName[vp->namelen + 1] = df->WEPDefaultKeyIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11WEPDEFAULTKEYVALUE: -+ if ( df->haveWEPDefaultKeyValue ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11WEPDEFAULTKEYVALUE: -+// *write_method = write_dot11WEPDefaultKeyValue; -+ *var_len = strlen ( df->WEPDefaultKeyValue ); -+ return ( UCHAR * ) df->WEPDefaultKeyValue; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11WEPKeyMappingsTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11WEPKeyMappingsTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ static char MACWork[17]; -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &kmList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ km = ( struct kmTbl_data * ) np->data; -+ rName[vp->namelen + 0] = km->ifIndex; -+ rName[vp->namelen + 1] = km->WEPKeyMappingIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11WEPKEYMAPPINGADDRESS: -+ if ( km->haveWEPKeyMappingAddress ) found = TRUE; break; -+ case DOT11WEPKEYMAPPINGWEPON: -+ if ( km->haveWEPKeyMappingWEPOn ) found = TRUE; break; -+ case DOT11WEPKEYMAPPINGVALUE: -+ if ( km->haveWEPKeyMappingValue ) found = TRUE; break; -+ case DOT11WEPKEYMAPPINGSTATUS: -+ if ( km->haveWEPKeyMappingStatus ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11WEPKEYMAPPINGADDRESS: -+// *write_method = write_dot11WEPKeyMappingAddress; -+ MACWork[ 0] = km->WEPKeyMappingAddress[ 0]; -+ MACWork[ 1] = km->WEPKeyMappingAddress[ 1]; -+ MACWork[ 2] = km->WEPKeyMappingAddress[ 3]; -+ MACWork[ 3] = km->WEPKeyMappingAddress[ 4]; -+ MACWork[ 4] = km->WEPKeyMappingAddress[ 6]; -+ MACWork[ 5] = km->WEPKeyMappingAddress[ 7]; -+ MACWork[ 6] = km->WEPKeyMappingAddress[ 9]; -+ MACWork[ 7] = km->WEPKeyMappingAddress[10]; -+ MACWork[ 8] = km->WEPKeyMappingAddress[12]; -+ MACWork[ 9] = km->WEPKeyMappingAddress[13]; -+ MACWork[10] = km->WEPKeyMappingAddress[15]; -+ MACWork[11] = km->WEPKeyMappingAddress[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11WEPKEYMAPPINGWEPON: -+// *write_method = write_dot11WEPKeyMappingWEPOn; -+ return ( UCHAR * ) &km->WEPKeyMappingWEPOn; -+ -+ case DOT11WEPKEYMAPPINGVALUE: -+// *write_method = write_dot11WEPKeyMappingValue; -+ *var_len = strlen ( km->WEPKeyMappingValue ); -+ return ( UCHAR * ) km->WEPKeyMappingValue; -+ -+ case DOT11WEPKEYMAPPINGSTATUS: -+// *write_method = write_dot11WEPKeyMappingStatus; -+ return ( UCHAR * ) &km->WEPKeyMappingStatus; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PrivacyTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PrivacyTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &prList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pr = ( struct prTbl_data * ) np->data; -+ rName[vp->namelen] = pr->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11PRIVACYINVOKED: -+ if ( pr->havePrivacyInvoked ) found = TRUE; break; -+ case DOT11WEPDEFAULTKEYID: -+ if ( pr->haveWEPDefaultKeyID ) found = TRUE; break; -+ case DOT11WEPKEYMAPPINGLENGTH: -+ if ( pr->haveWEPKeyMappingLength ) found = TRUE; break; -+ case DOT11EXCLUDEUNENCRYPTED: -+ if ( pr->haveExcludeUnencrypted ) found = TRUE; break; -+ case DOT11WEPICVERRORCOUNT: -+ if ( pr->haveWEPICVErrorCount ) found = TRUE; break; -+ case DOT11WEPEXCLUDEDCOUNT: -+ if ( pr->haveWEPExcludedCount ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11PRIVACYINVOKED: -+// *write_method = write_dot11PrivacyInvoked; -+ return ( UCHAR * ) &pr->privacyInvoked; -+ -+ case DOT11WEPDEFAULTKEYID: -+// *write_method = write_dot11WEPDefaultKeyID; -+ return ( UCHAR * ) &pr->WEPDefaultKeyID; -+ -+ case DOT11WEPKEYMAPPINGLENGTH: -+// *write_method = write_dot11WEPKeyMappingLength; -+ return ( UCHAR * ) &pr->WEPKeyMappingLength; -+ -+ case DOT11EXCLUDEUNENCRYPTED: -+// *write_method = write_dot11ExcludeUnencrypted; -+ return ( UCHAR * ) &pr->excludeUnencrypted; -+ -+ case DOT11WEPICVERRORCOUNT: -+ return ( UCHAR * ) &pr->WEPICVErrorCount; -+ -+ case DOT11WEPEXCLUDEDCOUNT: -+ return ( UCHAR * ) &pr->WEPExcludedCount; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11OperationTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11OperationTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ static char MACWork[17]; -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &opList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ op = ( struct opTbl_data * ) np->data; -+ rName[vp->namelen] = op->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ -+ switch ( vp->magic ) { // found requested OID, now check for requested variable -+ case DOT11MACADDRESS: -+ if ( op->haveMACAddress ) found = TRUE; break; -+ case DOT11RTSTHRESHOLD: -+ if ( op->haveRTSThreshold ) found = TRUE; break; -+ case DOT11SHORTRETRYLIMIT: -+ if ( op->haveShortRetryLimit ) found = TRUE; break; -+ case DOT11LONGRETRYLIMIT: -+ if ( op->haveLongRetryLimit ) found = TRUE; break; -+ case DOT11FRAGMENTATIONTHRESHOLD: -+ if ( op->haveFragmentationThreshold ) found = TRUE; break; -+ case DOT11MAXTRANSMITMSDULIFETIME: -+ if ( op->haveMaxTransmitMSDULifetime ) found = TRUE; break; -+ case DOT11MAXRECEIVELIFETIME: -+ if ( op->haveMaxReceiveLifetime ) found = TRUE; break; -+ case DOT11MANUFACTURERID: -+ if ( op->haveManufacturerID ) found = TRUE; break; -+ case DOT11PRODUCTID: -+ if ( op->haveProductID ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11MACADDRESS: -+ MACWork[ 0] = op->MACAddress[ 0]; -+ MACWork[ 1] = op->MACAddress[ 1]; -+ MACWork[ 2] = op->MACAddress[ 3]; -+ MACWork[ 3] = op->MACAddress[ 4]; -+ MACWork[ 4] = op->MACAddress[ 6]; -+ MACWork[ 5] = op->MACAddress[ 7]; -+ MACWork[ 6] = op->MACAddress[ 9]; -+ MACWork[ 7] = op->MACAddress[10]; -+ MACWork[ 8] = op->MACAddress[12]; -+ MACWork[ 9] = op->MACAddress[13]; -+ MACWork[10] = op->MACAddress[15]; -+ MACWork[11] = op->MACAddress[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11RTSTHRESHOLD: -+// *write_method = write_dot11RTSThreshold; -+ return ( UCHAR * ) &op->RTSThreshold; -+ -+ case DOT11SHORTRETRYLIMIT: -+// *write_method = write_dot11ShortRetryLimit; -+ return ( UCHAR * ) &op->shortRetryLimit; -+ -+ case DOT11LONGRETRYLIMIT: -+// *write_method = write_dot11LongRetryLimit; -+ return ( UCHAR * ) &op->longRetryLimit; -+ -+ case DOT11FRAGMENTATIONTHRESHOLD: -+// *write_method = write_dot11FragmentationThreshold; -+ return ( UCHAR * ) &op->fragmentationThreshold; -+ -+ case DOT11MAXTRANSMITMSDULIFETIME: -+// *write_method = write_dot11MaxTransmitMSDULifetime; -+ return ( UCHAR * ) &op->maxTransmitMSDULifetime; -+ -+ case DOT11MAXRECEIVELIFETIME: -+// *write_method = write_dot11MaxReceiveLifetime; -+ return ( UCHAR * ) &op->maxReceiveLifetime; -+ -+ case DOT11MANUFACTURERID: -+ *var_len = strlen ( op->manufacturerID ); -+ return ( UCHAR * ) op->manufacturerID; -+ -+ case DOT11PRODUCTID: -+ *var_len = strlen ( op->productID ); -+ return ( UCHAR * ) op->productID; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11CountersTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11CountersTable(struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &coList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ co = ( struct coTbl_data * ) np->data; -+ rName[vp->namelen] = co->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11TRANSMITTEDFRAGMENTCOUNT: -+ if ( co->haveTransmittedFragmentCount ) found = TRUE; break; -+ case DOT11MULTICASTTRANSMITTEDFRAMECOUNT: -+ if ( co->haveTransmittedFrameCount ) found = TRUE; break; -+ case DOT11FAILEDCOUNT: -+ if ( co->haveFailedCount ) found = TRUE; break; -+ case DOT11RETRYCOUNT: -+ if ( co->haveRetryCount ) found = TRUE; break; -+ case DOT11MULTIPLERETRYCOUNT: -+ if ( co->haveMultipleRetryCount ) found = TRUE; break; -+ case DOT11FRAMEDUPLICATECOUNT: -+ if ( co->haveFrameDuplicateCount ) found = TRUE; break; -+ case DOT11RTSSUCCESSCOUNT: -+ if ( co->haveRTSSuccessCount ) found = TRUE; break; -+ case DOT11RTSFAILURECOUNT: -+ if ( co->haveRTSFailureCount ) found = TRUE; break; -+ case DOT11ACKFAILURECOUNT: -+ if ( co->haveACKFailureCount ) found = TRUE; break; -+ case DOT11RECEIVEDFRAGMENTCOUNT: -+ if ( co->haveReceivedFragmentCount ) found = TRUE; break; -+ case DOT11MULTICASTRECEIVEDFRAMECOUNT: -+ if ( co->haveMulticastReceivedFrameCount ) found = TRUE; break; -+ case DOT11FCSERRORCOUNT: -+ if ( co->haveFCSErrorCount ) found = TRUE; break; -+ case DOT11TRANSMITTEDFRAMECOUNT: -+ if ( co->haveTransmittedFrameCount ) found = TRUE; break; -+ case DOT11WEPUNDECRYPTABLECOUNT: -+ if ( co->haveWEPUndecryptableCount ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11TRANSMITTEDFRAGMENTCOUNT: return ( UCHAR * ) &co->transmittedFragmentCount; -+ case DOT11MULTICASTTRANSMITTEDFRAMECOUNT: return ( UCHAR * ) &co->transmittedFrameCount; -+ case DOT11FAILEDCOUNT: return ( UCHAR * ) &co->failedCount; -+ case DOT11RETRYCOUNT: return ( UCHAR * ) &co->retryCount; -+ case DOT11MULTIPLERETRYCOUNT: return ( UCHAR * ) &co->multipleRetryCount; -+ case DOT11FRAMEDUPLICATECOUNT: return ( UCHAR * ) &co->frameDuplicateCount; -+ case DOT11RTSSUCCESSCOUNT: return ( UCHAR * ) &co->RTSSuccessCount; -+ case DOT11RTSFAILURECOUNT: return ( UCHAR * ) &co->RTSFailureCount; -+ case DOT11ACKFAILURECOUNT: return ( UCHAR * ) &co->ACKFailureCount; -+ case DOT11RECEIVEDFRAGMENTCOUNT: return ( UCHAR * ) &co->receivedFragmentCount; -+ case DOT11MULTICASTRECEIVEDFRAMECOUNT: return ( UCHAR * ) &co->multicastReceivedFrameCount; -+ case DOT11FCSERRORCOUNT: return ( UCHAR * ) &co->FCSErrorCount; -+ case DOT11TRANSMITTEDFRAMECOUNT: return ( UCHAR * ) &co->transmittedFrameCount; -+ case DOT11WEPUNDECRYPTABLECOUNT: return ( UCHAR * ) &co->WEPUndecryptableCount; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11GroupAddressesTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11GroupAddressesTable(struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ static char MACWork[17]; -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &gaList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ ga = ( struct gaTbl_data * ) np->data; -+ rName[vp->namelen + 0] = ga->ifIndex; -+ rName[vp->namelen + 1] = ga->groupAddressesIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11ADDRESS: -+ if ( ga->haveAddress ) found = TRUE; break; -+ case DOT11GROUPADDRESSESSTATUS: -+ if ( ga->haveGroupAddressesStatus ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11ADDRESS: -+// *write_method = write_dot11Address; -+ MACWork[ 0] = ga->address[ 0]; -+ MACWork[ 1] = ga->address[ 1]; -+ MACWork[ 2] = ga->address[ 3]; -+ MACWork[ 3] = ga->address[ 4]; -+ MACWork[ 4] = ga->address[ 6]; -+ MACWork[ 5] = ga->address[ 7]; -+ MACWork[ 6] = ga->address[ 9]; -+ MACWork[ 7] = ga->address[10]; -+ MACWork[ 8] = ga->address[12]; -+ MACWork[ 9] = ga->address[13]; -+ MACWork[10] = ga->address[15]; -+ MACWork[11] = ga->address[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11GROUPADDRESSESSTATUS: -+// *write_method = write_dot11GroupAddressesStatus; -+ return ( UCHAR * ) &ga->groupAddressesStatus; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11ResourceInfoTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11ResourceInfoTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &riList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ ri = ( struct riTbl_data * ) np->data; -+ rName[vp->namelen] = ri->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11MANUFACTUREROUI: -+ if ( ri->haveManufacturerOUI ) found = TRUE; break; -+ case DOT11MANUFACTURERNAME: -+ if ( ri->haveManufacturerName ) found = TRUE; break; -+ case DOT11MANUFACTURERPRODUCTNAME: -+ if ( ri->haveManufacturerProductName ) found = TRUE; break; -+ case DOT11MANUFACTURERPRODUCTVERSION: -+ if ( ri->haveManufacturerProductVersion ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11MANUFACTUREROUI: -+ *var_len = strlen ( ri->manufacturerOUI ); -+ return ( UCHAR * ) ri->manufacturerOUI; -+ -+ case DOT11MANUFACTURERNAME: -+ *var_len = strlen ( ri->manufacturerName ); -+ return ( UCHAR * ) ri->manufacturerName; -+ -+ case DOT11MANUFACTURERPRODUCTNAME: -+ *var_len = strlen ( ri->manufacturerProductName ); -+ return ( UCHAR * ) ri->manufacturerProductName; -+ -+ case DOT11MANUFACTURERPRODUCTVERSION: -+ *var_len = strlen ( ri->manufacturerProductVersion ); -+ return ( UCHAR * ) ri->manufacturerProductVersion; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyOperationTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyOperationTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &poList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ po = ( struct poTbl_data * ) np->data; -+ rName[vp->namelen] = po->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11PHYTYPE: -+ if ( po->havePHYType ) found = TRUE; break; -+ case DOT11CURRENTREGDOMAIN: -+ if ( po->haveCurrentRegDomain ) found = TRUE; break; -+ case DOT11TEMPTYPE: -+ if ( po->haveTempType ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11PHYTYPE: -+ return ( UCHAR * ) &po->PHYType; -+ -+ case DOT11CURRENTREGDOMAIN: -+// *write_method = write_dot11CurrentRegDomain; -+ return ( UCHAR * ) &po->currentRegDomain; -+ -+ case DOT11TEMPTYPE: -+ return ( UCHAR * ) &po->tempType; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyAntennaTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyAntennaTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &paList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pa = ( struct paTbl_data * ) np->data; -+ rName[vp->namelen] = pa->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11CURRENTTXANTENNA: -+ if ( pa->haveCurrentTxAntenna ) found = TRUE; break; -+ case DOT11DIVERSITYSUPPORT: -+ if ( pa->haveDiversitySupport ) found = TRUE; break; -+ case DOT11CURRENTRXANTENNA: -+ if ( pa->haveCurrentRxAntenna ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11CURRENTTXANTENNA: -+// *write_method = write_dot11CurrentTxAntenna; -+ return ( UCHAR * ) &pa->currentTxAntenna; -+ -+ case DOT11DIVERSITYSUPPORT: -+ return ( UCHAR * ) &pa->diversitySupport; -+ -+ case DOT11CURRENTRXANTENNA: -+// *write_method = write_dot11CurrentRxAntenna; -+ return ( UCHAR * ) &pa->currentRxAntenna; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyTxPowerTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyTxPowerTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &ptList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pt = ( struct ptTbl_data * ) np->data; -+ rName[vp->namelen] = pt->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11NUMBERSUPPORTEDPOWERLEVELS: -+ if ( pt->haveNumberSupportedPowerLevels ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL1: -+ if ( pt->haveTxPowerLevel1 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL2: -+ if ( pt->haveTxPowerLevel2 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL3: -+ if ( pt->haveTxPowerLevel3 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL4: -+ if ( pt->haveTxPowerLevel4 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL5: -+ if ( pt->haveTxPowerLevel5 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL6: -+ if ( pt->haveTxPowerLevel6 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL7: -+ if ( pt->haveTxPowerLevel7 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL8: -+ if ( pt->haveTxPowerLevel8 ) found = TRUE; break; -+ case DOT11CURRENTTXPOWERLEVEL: -+ if ( pt->currentTxPowerLevel ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11NUMBERSUPPORTEDPOWERLEVELS: -+ return ( UCHAR * ) &pt->numberSupportedPowerLevels; -+ -+ case DOT11TXPOWERLEVEL1: return ( UCHAR * ) &pt->TxPowerLevel1; -+ case DOT11TXPOWERLEVEL2: return ( UCHAR * ) &pt->TxPowerLevel2; -+ case DOT11TXPOWERLEVEL3: return ( UCHAR * ) &pt->TxPowerLevel3; -+ case DOT11TXPOWERLEVEL4: return ( UCHAR * ) &pt->TxPowerLevel4; -+ case DOT11TXPOWERLEVEL5: return ( UCHAR * ) &pt->TxPowerLevel5; -+ case DOT11TXPOWERLEVEL6: return ( UCHAR * ) &pt->TxPowerLevel6; -+ case DOT11TXPOWERLEVEL7: return ( UCHAR * ) &pt->TxPowerLevel7; -+ case DOT11TXPOWERLEVEL8: return ( UCHAR * ) &pt->TxPowerLevel8; -+ -+ case DOT11CURRENTTXPOWERLEVEL: -+// *write_method = write_dot11CurrentTxPowerLevel; -+ return ( UCHAR * ) &pt->currentTxPowerLevel; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyFHSSTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyFHSSTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &pfList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pf = ( struct pfTbl_data * ) np->data; -+ rName[vp->namelen] = pf->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11HOPTIME: -+ if ( pf->haveHopTime ) found = TRUE; break; -+ case DOT11CURRENTCHANNELNUMBER: -+ if ( pf->haveCurrentChannelNumber ) found = TRUE; break; -+ case DOT11MAXDWELLTIME: -+ if ( pf->haveMaxDwellTime ) found = TRUE; break; -+ case DOT11CURRENTDWELLTIME: -+ if ( pf->haveCurrentDwellTime ) found = TRUE; break; -+ case DOT11CURRENTSET: -+ if ( pf->haveCurrentSet ) found = TRUE; break; -+ case DOT11CURRENTPATTERN: -+ if ( pf->haveCurrentPattern ) found = TRUE; break; -+ case DOT11CURRENTINDEX: -+ if ( pf->haveCurrentIndex ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11HOPTIME: -+ return ( UCHAR * ) &pf->hopTime; -+ -+ case DOT11CURRENTCHANNELNUMBER: -+// *write_method = write_dot11CurrentChannelNumber; -+ return ( UCHAR * ) &pf->currentChannelNumber; -+ -+ case DOT11MAXDWELLTIME: -+ return ( UCHAR * ) &pf->maxDwellTime; -+ -+ case DOT11CURRENTDWELLTIME: -+// *write_method = write_dot11CurrentDwellTime; -+ return ( UCHAR * ) &pf->currentDwellTime; -+ -+ case DOT11CURRENTSET: -+// *write_method = write_dot11CurrentSet; -+ return ( UCHAR * ) &pf->currentSet; -+ -+ case DOT11CURRENTPATTERN: -+// *write_method = write_dot11CurrentPattern; -+ return ( UCHAR * ) &pf->currentPattern; -+ -+ case DOT11CURRENTINDEX: -+// *write_method = write_dot11CurrentIndex; -+ return ( UCHAR * ) &pf->currentIndex; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyDSSSTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyDSSSTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &pdList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pd = ( struct pdTbl_data * ) np->data; -+ rName[vp->namelen] = pd->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11CURRENTCHANNEL: -+ if ( pd->haveCurrentChannel ) found = TRUE; break; -+ case DOT11CCAMODESUPPORTED: -+ if ( pd->haveCCAModeSupported ) found = TRUE; break; -+ case DOT11CURRENTCCAMODE: -+ if ( pd->haveCurrentCCAMode ) found = TRUE; break; -+ case DOT11EDTHRESHOLD: -+ if ( pd->haveEDThreshold ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11CURRENTCHANNEL: -+// *write_method = write_dot11CurrentChannel; -+ return ( UCHAR * ) &pd->currentChannel; -+ -+ case DOT11CCAMODESUPPORTED: -+ return ( UCHAR * ) &pd->CCAModeSupported; -+ -+ case DOT11CURRENTCCAMODE: -+// *write_method = write_dot11CurrentCCAMode; -+ return ( UCHAR * ) &pd->currentCCAMode; -+ -+ case DOT11EDTHRESHOLD: -+// *write_method = write_dot11EDThreshold; -+ return ( UCHAR * ) &pd->EDThreshold; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyIRTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyIRTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &piList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pi = ( struct piTbl_data * ) np->data; -+ rName[vp->namelen] = pi->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11CCAWATCHDOGTIMERMAX: -+ if ( pi->CCAWatchdogTimerMax ) found = TRUE; break; -+ case DOT11CCAWATCHDOGCOUNTMAX: -+ if ( pi->CCAWatchdogCountMax ) found = TRUE; break; -+ case DOT11CCAWATCHDOGTIMERMIN: -+ if ( pi->CCAWatchdogTimerMin ) found = TRUE; break; -+ case DOT11CCAWATCHDOGCOUNTMIN: -+ if ( pi->CCAWatchdogCountMin ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11CCAWATCHDOGTIMERMAX: -+// *write_method = write_dot11CCAWatchdogTimerMax; -+ return ( UCHAR * ) &pi->CCAWatchdogTimerMax; -+ -+ case DOT11CCAWATCHDOGCOUNTMAX: -+// *write_method = write_dot11CCAWatchdogCountMax; -+ return ( UCHAR * ) &pi->CCAWatchdogCountMax; -+ -+ case DOT11CCAWATCHDOGTIMERMIN: -+// *write_method = write_dot11CCAWatchdogTimerMin; -+ return ( UCHAR * ) &pi->CCAWatchdogTimerMin; -+ -+ case DOT11CCAWATCHDOGCOUNTMIN: -+// *write_method = write_dot11CCAWatchdogCountMin; -+ return ( UCHAR * ) &pi->CCAWatchdogCountMin; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11RegDomainsSupportedTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11RegDomainsSupportedTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &rdList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ rd = ( struct rdTbl_data * ) np->data; -+ rName[vp->namelen + 0] = rd->ifIndex; -+ rName[vp->namelen + 1] = rd->regDomainsSupportIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11REGDOMAINSSUPPORTVALUE: -+ if ( rd->haveRegDomainsSupportValue ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11REGDOMAINSSUPPORTVALUE: -+ return ( UCHAR * ) &rd->regDomainsSupportValue; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11AntennasListTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11AntennasListTable(struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &alList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ al = ( struct alTbl_data * ) np->data; -+ rName[vp->namelen + 0] = al->ifIndex; -+ rName[vp->namelen + 1] = al->antennaListIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11SUPPORTEDTXANTENNA: -+ if ( al->haveSupportedTxAntenna ) found = TRUE; break; -+ case DOT11SUPPORTEDRXANTENNA: -+ if ( al->haveSupportedRxAntenna ) found = TRUE; break; -+ case DOT11DIVERSITYSELECTIONRX: -+ if ( al->haveDiversitySelectionRx ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11SUPPORTEDTXANTENNA: -+// *write_method = write_dot11SupportedTxAntenna; -+ return ( UCHAR * ) &al->supportedTxAntenna; -+ -+ case DOT11SUPPORTEDRXANTENNA: -+// *write_method = write_dot11SupportedRxAntenna; -+ return ( UCHAR * ) &al->supportedRxAntenna; -+ -+ case DOT11DIVERSITYSELECTIONRX: -+// *write_method = write_dot11DiversitySelectionRx; -+ return ( UCHAR * ) &al->diversitySelectionRx; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11SupportedDataRatesTxTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11SupportedDataRatesTxTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &rtList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ rt = ( struct rtTbl_data * ) np->data; -+ rName[vp->namelen + 0] = rt->ifIndex; -+ rName[vp->namelen + 1] = rt->supportedDataRatesTxIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11SUPPORTEDDATARATESTXVALUE: -+ if ( rt->haveSupportedDataRatesTxValue ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11SUPPORTEDDATARATESTXVALUE: -+ return ( UCHAR * ) &rt->supportedDataRatesTxValue; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11SupportedDataRatesRxTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11SupportedDataRatesRxTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &rrList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ rr = ( struct rrTbl_data * ) np->data; -+ rName[vp->namelen + 0] = rr->ifIndex; -+ rName[vp->namelen + 1] = rr->supportedDataRatesRxIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11SUPPORTEDDATARATESRXVALUE: -+ if ( rr->haveSupportedDataRatesRxValue ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11SUPPORTEDDATARATESRXVALUE: -+ return ( UCHAR * ) &rr->supportedDataRatesRxValue; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11StationID(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11StationID not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )) { -+ fprintf ( stderr,"write to dot11StationID: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11MediumOccupancyLimit(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11MediumOccupancyLimit not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11MediumOccupancyLimit: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CFPPeriod(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CFPPeriod not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CFPPeriod: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CFPMaxDuration(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CFPMaxDuration not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CFPMaxDuration: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11AuthenticationResponseTimeOut(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11AuthenticationResponseTimeOut not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11AuthenticationResponseTimeOut: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11PowerManagementMode(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11PowerManagementMode not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )) { -+ fprintf ( stderr, "write to dot11PowerManagementMode: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11DesiredSSID(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11DesiredSSID not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )){ -+ fprintf ( stderr, "write to dot11DesiredSSID: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11DesiredBSSType(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11DesiredBSSType not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11DesiredBSSType: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11OperationalRateSet(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11OperationalRateSet not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )){ -+ fprintf ( stderr, "write to dot11OperationalRateSet: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11BeaconPeriod(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11BeaconPeriod not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11BeaconPeriod: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11DTIMPeriod(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11DTIMPeriod not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11DTIMPeriod: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11AssociationResponseTimeOut(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11AssociationResponseTimeOut not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )) { -+ fprintf ( stderr,"write to dot11AssociationResponseTimeOut: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11AuthenticationAlgorithmsEnable(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11AuthenticationAlgorithmsEnable not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11AuthenticationAlgorithmsEnable: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPDefaultKeyValue(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11WEPDefaultKeyValue not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )){ -+ fprintf ( stderr,"write to dot11WEPDefaultKeyValue: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingAddress(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingAddress not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )) { -+ fprintf ( stderr,"write to dot11WEPKeyMappingAddress: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingWEPOn(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingWEPOn not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11WEPKeyMappingWEPOn: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingValue(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingValue not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingValue: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingStatus(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingStatus not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11WEPKeyMappingStatus: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11PrivacyInvoked(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11PrivacyInvoked not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11PrivacyInvoked: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPDefaultKeyID(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11WEPDefaultKeyID not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11WEPDefaultKeyID: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingLength(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingLength not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11WEPKeyMappingLength: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11ExcludeUnencrypted(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11ExcludeUnencrypted not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11ExcludeUnencrypted: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11RTSThreshold(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ){ -+ fprintf ( stderr, "write to dot11RTSThreshold not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11RTSThreshold: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11ShortRetryLimit(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11ShortRetryLimit not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11ShortRetryLimit: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11LongRetryLimit(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11LongRetryLimit not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11LongRetryLimit: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11FragmentationThreshold(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11FragmentationThreshold not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11FragmentationThreshold: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11MaxTransmitMSDULifetime(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11MaxTransmitMSDULifetime not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11MaxTransmitMSDULifetime: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11MaxReceiveLifetime(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11MaxReceiveLifetime not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11MaxReceiveLifetime: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11Address(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11Address not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )){ -+ fprintf ( stderr, "write to dot11Address: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11GroupAddressesStatus(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11GroupAddressesStatus not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11GroupAddressesStatus: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentRegDomain(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentRegDomain not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentRegDomain: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentTxAntenna(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentTxAntenna not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentTxAntenna: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentRxAntenna(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentRxAntenna not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11CurrentRxAntenna: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentTxPowerLevel(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentTxPowerLevel not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentTxPowerLevel: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentChannelNumber(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentChannelNumber not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11CurrentChannelNumber: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentDwellTime(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentDwellTime not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentDwellTime: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentSet(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentSet not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentSet: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentPattern(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentPattern not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentPattern: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentIndex(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentIndex not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentIndex: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentChannel(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentChannel not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentChannel: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentCCAMode(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentCCAMode not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11CurrentCCAMode: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11EDThreshold(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11EDThreshold not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11EDThreshold: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CCAWatchdogTimerMax(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CCAWatchdogTimerMax not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CCAWatchdogTimerMax: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CCAWatchdogCountMax(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CCAWatchdogCountMax not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CCAWatchdogCountMax: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CCAWatchdogTimerMin(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CCAWatchdogTimerMin not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CCAWatchdogTimerMin: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CCAWatchdogCountMin(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CCAWatchdogCountMin not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CCAWatchdogCountMin: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11SupportedTxAntenna(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11SupportedTxAntenna not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11SupportedTxAntenna: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11SupportedRxAntenna(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11SupportedRxAntenna not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11SupportedRxAntenna: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11DiversitySelectionRx(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11DiversitySelectionRx not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11DiversitySelectionRx: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+* loadTables() - Load the Tables * -+* * -+****************************************************************************/ -+static void loadTables() -+{ -+ int skfd; // generic raw socket desc -+ struct iwreq wrq; // ioctl request structure -+ struct ifreq ifr; -+ struct timeval et; // elapsed time -+ struct wireless_info info; // workarea for wireless ioctl information -+ FILE *fp; -+ char bfr[1024], ifName[1024]; -+ char *s, *t; -+ -+ gettimeofday ( &et, ( struct timezone * ) 0 ); // get time-of-day -+ if ( et.tv_sec < lastLoad + MINLOADFREQ ) // only reload so often -+ return; -+ lastLoad = et.tv_sec; -+ -+ skfd = openSocket(); // open socket -+ if ( skfd < 0 ) { -+ syslog ( LOG_ERR, "SNMP ieee802dot11.loadTables() - %s\n", "socket open failure" ); -+ return; -+ } -+ -+ flushLists(); -+ -+ // find interfaces in /proc/net/dev and find the wireless interfaces -+ fp = fopen ( PROC_NET_DEV, "r" ); -+ if ( fp ) { -+ while ( fgets ( bfr, sizeof ( bfr ), fp )) { -+ if ( strstr ( bfr, ":" )) { -+ s = bfr; t = ifName; -+ while ( isspace ( *s )) // discard white space -+ *s++; -+ while ( *s != ':' ) // get interface name -+ *t++ = *s++; -+ *t = '\0'; -+ -+ // verify as a wireless device -+ memset (( char * ) &info, 0, sizeof ( struct wireless_info )); -+ strncpy ( wrq.ifr_name, ifName, IFNAMSIZ ); -+ if ( ioctl ( skfd, SIOCGIWNAME, &wrq ) >= 0 ) { -+ printf ( "%s ifName: %s\n", "loadTables() -", ifName ); -+ initStructs(); -+ loadWiExt( skfd, ifName, &info ); -+ displayWiExt ( info ); -+ load80211Structs ( skfd, ifName, &info ); -+ } -+ } -+ } -+ fclose ( fp ); -+ } -+ -+ close ( skfd ); -+} -+ -+/**************************************************************************** -+* * -+* load80211Structs() - load the 802.11 structures * -+* * -+****************************************************************************/ -+static void -+load80211Structs ( int skfd, char *ifName, struct wireless_info *wi ) -+{ -+ int rc, ifIndex = 0; -+ struct ifreq ifr; -+ char MACAddress [ MACADDR_LEN + 1 ]; -+ -+ strcpy ( ifr.ifr_name, ifName ); -+ rc = ioctl ( skfd, SIOCGIFHWADDR, &ifr ); -+ if ( rc >= 0 ) { -+ -+ sprintf ( MACAddress, "%02X:%02X:%02X:%02X:%02X:%02X\0", -+ ( UCHAR ) ifr.ifr_hwaddr.sa_data[0], ( UCHAR ) ifr.ifr_hwaddr.sa_data[1], -+ ( UCHAR ) ifr.ifr_hwaddr.sa_data[2], ( UCHAR ) ifr.ifr_hwaddr.sa_data[3], -+ ( UCHAR ) ifr.ifr_hwaddr.sa_data[4], ( UCHAR ) ifr.ifr_hwaddr.sa_data[5] ); -+ -+ nSc.haveStationID = TRUE; -+ strcpy ( nSc.stationID, MACAddress ); -+ nOp.haveMACAddress = TRUE; -+ strcpy ( nOp.MACAddress, MACAddress ); -+ nRi.haveManufacturerOUI = TRUE; -+ strncpy ( nRi.manufacturerOUI, MACAddress, MAN_OUI_LEN ); -+ -+ ifIndex = if_nametoindex ( ifName ); -+ if ( !ifIndex ) { -+ syslog ( LOG_ERR, "SNMP %s - %s %s\n", -+ "ieee802dot11.load80211Structs()", ifName, "has no ifIndex" ); -+ return; -+ } -+ -+ loadWiExtTo80211Structs ( ifIndex, ifName, wi ); -+ -+ if ( hasChanged (( char * ) &nSc, sizeof ( nSc ))) { -+ nSc.ifIndex = ifIndex; -+ sprintf ( nSc.UID, "%04d\0", nSc.ifIndex ); -+ strcpy ( nSc.ifName, ifName ); -+ addList (( char * ) &scList, ( char * ) &nSc, sizeof ( nSc )); -+ } -+ -+ if ( hasChanged (( char * ) &nPr, sizeof ( nPr ))) { -+ nPr.ifIndex = ifIndex; -+ sprintf ( nPr.UID, "%04d\0", nPr.ifIndex ); -+ strcpy ( nPr.ifName, ifName ); -+ addList (( char * ) &prList, ( char * ) &nPr, sizeof ( nPr )); -+ } -+ -+ if ( hasChanged (( char * ) &nOp, sizeof ( nOp ))) { -+ nOp.ifIndex = ifIndex; -+ sprintf ( nOp.UID, "%04d\0", nOp.ifIndex ); -+ strcpy ( nOp.ifName, ifName ); -+ addList (( char * ) &opList, ( char * ) &nOp, sizeof ( nOp )); -+ } -+ -+ if ( hasChanged (( char * ) &nCo, sizeof ( nCo ))) { -+ nCo.ifIndex = ifIndex; -+ sprintf ( nCo.UID, "%04d\0", nCo.ifIndex ); -+ strcpy ( nCo.ifName, ifName ); -+ addList (( char * ) &coList, ( char * ) &nCo, sizeof ( nCo )); -+ } -+ -+ if ( hasChanged (( char * ) &nRi, sizeof ( nRi ))) { -+ nRi.ifIndex = ifIndex; -+ sprintf ( nRi.UID, "%04d\0", nRi.ifIndex ); -+ strcpy ( nRi.ifName, ifName ); -+ addList (( char * ) &riList, ( char * ) &nRi, sizeof ( nRi )); -+ } -+ -+ if ( hasChanged (( char * ) &nPo, sizeof ( nPo ))) { -+ nPo.ifIndex = ifIndex; -+ sprintf ( nPo.UID, "%04d\0", nPo.ifIndex ); -+ strcpy ( nPo.ifName, ifName ); -+ addList (( char * ) &poList, ( char * ) &nPo, sizeof ( nPo )); -+ } -+ -+ if ( hasChanged (( char * ) &nPa, sizeof ( nPa ))) { -+ nPa.ifIndex = ifIndex; -+ sprintf ( nPa.UID, "%04d\0", nPa.ifIndex ); -+ strcpy ( nPa.ifName, ifName ); -+ addList (( char * ) &paList, ( char * ) &nPa, sizeof ( nPa )); -+ } -+ -+ if ( hasChanged (( char * ) &nPt, sizeof ( nPt ))) { -+ nPt.ifIndex = ifIndex; -+ sprintf ( nPt.UID, "%04d\0", nPt.ifIndex ); -+ strcpy ( nPt.ifName, ifName ); -+ addList (( char * ) &ptList, ( char * ) &nPt, sizeof ( nPt )); -+ } -+ -+ if ( hasChanged (( char * ) &nPf, sizeof ( nPf ))) { -+ nPf.ifIndex = ifIndex; -+ sprintf ( nPf.UID, "%04d\0", nPf.ifIndex ); -+ strcpy ( nPf.ifName, ifName ); -+ addList (( char * ) &pfList, ( char * ) &nPf, sizeof ( nPf )); -+ } -+ -+ if ( hasChanged (( char * ) &nPd, sizeof ( nPd ))) { -+ nPd.ifIndex = ifIndex; -+ sprintf ( nPd.UID, "%04d\0", nPd.ifIndex ); -+ strcpy ( nPd.ifName, ifName ); -+ addList (( char * ) &pdList, ( char * ) &nPd, sizeof ( nPd )); -+ } -+ -+ if ( hasChanged (( char * ) &nPi, sizeof ( nPi ))) { -+ nPi.ifIndex = ifIndex; -+ sprintf ( nPi.UID, "%04d\0", nPi.ifIndex ); -+ strcpy ( nPi.ifName, ifName ); -+ addList (( char * ) &piList, ( char * ) &nPi, sizeof ( nPi )); -+ } -+ } -+ -+//printf ( "%s - ifIndex: %d ifName: %s UID: %s\n", -+// "load80211Structs() - HASCHANGED", ifIndex, ifName, nSc.UID ); -+} -+ -+/**************************************************************************** -+* * -+* initStructs() - initialize structures * -+* * -+****************************************************************************/ -+static void initStructs() -+{ -+ int i; -+ -+ // 802.11 MIB Stuctures -+ memset (( char * ) &nSc, 0, sizeof ( nSc )); memset (( char * ) &nAa, 0, sizeof ( nAa )); -+ memset (( char * ) &nDf, 0, sizeof ( nDf )); memset (( char * ) &nKm, 0, sizeof ( nKm )); -+ memset (( char * ) &nPr, 0, sizeof ( nPr )); memset (( char * ) &nOp, 0, sizeof ( nOp )); -+ memset (( char * ) &nCo, 0, sizeof ( nCo )); memset (( char * ) &nGa, 0, sizeof ( nGa )); -+ memset (( char * ) &nRi, 0, sizeof ( nRi )); memset (( char * ) &nPo, 0, sizeof ( nPo )); -+ memset (( char * ) &nPa, 0, sizeof ( nPa )); memset (( char * ) &nPt, 0, sizeof ( nPt )); -+ memset (( char * ) &nPf, 0, sizeof ( nPf )); memset (( char * ) &nPd, 0, sizeof ( nPd )); -+ memset (( char * ) &nPi, 0, sizeof ( nPi )); memset (( char * ) &nRd, 0, sizeof ( nRd )); -+ memset (( char * ) &nAl, 0, sizeof ( nAl )); memset (( char * ) &nRt, 0, sizeof ( nRt )); -+ memset (( char * ) &nRr, 0, sizeof ( nRr )); -+ -+ // Wireless Extensions -+ wepCurrentKey = 0; -+ haveWepCurrentKey = FALSE; -+ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { -+ wep[i].len = 0; -+ wep[i].key[0] = '\0'; -+ wep[i].haveKey = FALSE; -+ } -+} -+ -+/**************************************************************************** -+* * -+* Wireless Extensions Specific Functions * -+* * -+****************************************************************************/ -+/**************************************************************************** -+* * -+* loadWiExtTo80211Structs() - load wireless extensions to 802.11 structures * -+* * -+****************************************************************************/ -+static void -+loadWiExtTo80211Structs ( int ifIndex, char *ifName, struct wireless_info *wi ) -+{ -+ int i, j = 0; -+ -+ // dot11Smt Group -+ // dot11StationConfigTable -+ nSc.havePrivacyOptionImplemented = TRUE; -+ nSc.privacyOptionImplemented = 1; // assume we support WEP -+ -+ if ( wi->has_power ) { -+ nSc.havePowerManagementMode = TRUE; -+ nSc.powerManagementMode = 1; // assume power is active -+ if ( !wi->power.disabled && -+ wi->power.flags & IW_POWER_MIN ) -+ nSc.powerManagementMode = 2; // power save mode -+ } -+ -+ if ( wi->has_essid && strlen ( wi->essid )) { -+ nSc.haveDesiredSSID = TRUE; -+ strcpy ( nSc.desiredSSID, wi->essid ); -+ } -+ -+ if ( wi->has_mode ) { -+ nSc.haveDesiredBSSType = TRUE; -+ if ( wi->mode == IW_MODE_ADHOC ) -+ nSc.desiredBSSType = 2; // independent -+ else if ( wi->has_ap_addr ) -+ nSc.desiredBSSType = 1; // infrastructure -+ else -+ nSc.desiredBSSType = 3; // any -+ } -+ -+ if ( wi->has_range ) { -+ for ( i = 0; i < wi->range.num_bitrates && j < 126; i++ ) { -+ nSc.haveOperationalRateSet = TRUE; -+ nSc.operationalRateSet[j++] = ( char ) ( wi->range.bitrate[i] / 500000L ); -+ } -+ } -+ -+ // dot11AuthenticationAlgorithmsTable -+ nAa.haveAuthenticationAlgorithm = TRUE; // it's a rule to always have -+ nAa.haveAuthenticationAlgorithmsEnable = TRUE; // 'open' supported -+ nAa.ifIndex = ifIndex; -+ nAa.authenticationAlgorithmsIndex = 1; // index number one -+ nAa.authenticationAlgorithm = 1; // 1 => open key -+ sprintf ( nAa.UID, "%04d%04d\0", nAa.ifIndex, nAa.authenticationAlgorithmsIndex ); -+ nAa.authenticationAlgorithmsEnable = 1; // enabled by default -+ if ( ( wi->has_key ) && -+ ( wi->key_size != 0 ) && -+ !( wi->key_flags & IW_ENCODE_DISABLED )) -+ nAa.authenticationAlgorithmsEnable = 2; -+ addList (( char * ) &aaList, ( char * ) &nAa, sizeof ( nAa )); -+ -+ nAa.haveAuthenticationAlgorithm = TRUE; // I'm gonna assume we always support WEP -+ nAa.haveAuthenticationAlgorithmsEnable = TRUE; -+ nAa.ifIndex = ifIndex; -+ nAa.authenticationAlgorithmsIndex = 2; // index number 2 -+ nAa.authenticationAlgorithm = 2; // 2 => shared key -+ sprintf ( nAa.UID, "%04d%04d\0", nAa.ifIndex, nAa.authenticationAlgorithmsIndex ); -+ nAa.authenticationAlgorithmsEnable = 2; -+ if ( ( wi->has_key ) && -+ ( wi->key_size != 0 ) && -+ !( wi->key_flags & IW_ENCODE_DISABLED )) -+ nAa.authenticationAlgorithmsEnable = 1; // disabled by default -+ addList (( char * ) &aaList, ( char * ) &nAa, sizeof ( nAa )); -+ -+ //dot11WEPDefaultKeysTable -+ if ( wi->has_range ) { -+ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { -+ nDf.haveWEPDefaultKeyValue = TRUE; -+ nDf.ifIndex = ifIndex; -+ nDf.WEPDefaultKeyIndex = i + 1; // index number -+ sprintf ( nDf.UID, "%04d%04d\0", nDf.ifIndex, nDf.WEPDefaultKeyIndex ); -+ if ( wep[i].haveKey ) -+ strcpy ( nDf.WEPDefaultKeyValue, "*****" ); -+ else -+ nDf.WEPDefaultKeyValue[0] = '\0'; -+ addList (( char * ) &dfList, ( char * ) &nDf, sizeof ( nDf )); -+ } -+ } -+ -+ // dot11PrivacyTable -+ nPr.havePrivacyInvoked = TRUE; -+ nPr.privacyInvoked = 2; // 2 => FALSE -+ nPr.haveWEPDefaultKeyID = TRUE; -+ nPr.WEPDefaultKeyID = 0; -+ nPr.haveExcludeUnencrypted = TRUE; -+ nPr.excludeUnencrypted = 2; // 2 => FALSE -+ if ( wi->has_range ) { -+ if ( ( wi->key_size != 0 ) && -+ !( wi->key_flags & IW_ENCODE_DISABLED )) { -+ nPr.privacyInvoked = 1; -+ if ( wi->key_flags & IW_ENCODE_RESTRICTED ) -+ nPr.excludeUnencrypted = 1; -+ nPr.WEPDefaultKeyID = wepCurrentKey; -+ } -+ } -+ -+ // dot11Mac Group -+ // dot11OperationTable -+ if ( wi->has_range ) { -+ nOp.haveRTSThreshold = TRUE; -+ nOp.RTSThreshold = wi->range.max_rts; -+ } -+ -+ if ( wi->has_frag && wi->frag.value ) { -+ nOp.haveFragmentationThreshold = TRUE; -+ nOp.fragmentationThreshold = wi->frag.value; -+ } -+ -+ // dot11Phy Group -+ // dot11PhyOperationTable -+ if ( strstr ( wi->name, "IEEE 802.11-FS" )) nPo.PHYType = 1; // So what if I -+ if ( strstr ( wi->name, "IEEE 802.11-DS" )) nPo.PHYType = 2; // made up a couple? -+ if ( strstr ( wi->name, "IEEE 802.11-IR" )) nPo.PHYType = 3; -+ if ( strstr ( wi->name, "IEEE 802.11-OFDM" )) nPo.PHYType = 4; // 802.11a -+ if ( strstr ( wi->name, "IEEE 802.11-OFDM/DS" )) nPo.PHYType = 5; // 802.11g -+ if ( strstr ( wi->name, "IEEE 802.11-TURBO" )) nPo.PHYType = 6; // Atheros TURBO mode -+ if ( nPo.PHYType ) nPo.havePHYType = TRUE; -+ -+ // dot11PhyDSSSTable -+ if ( wi->has_range ) { // && wi->freq <= ( double ) 2483000000 ) { // DSSS frequencies only -+ for ( i = 0; i < wi->range.num_frequency; i++ ) { -+ if ((( double ) ( wi->range.freq[i].e * 10 ) * ( double ) wi->range.freq[i].m ) == wi->freq ) { -+ nPd.haveCurrentChannel = TRUE; -+ nPd.currentChannel = wi->range.freq[i].i; -+ } -+ } -+ } -+ -+ // dot11SupportedDataRatesTxTable -+ if ( wi->has_range ) { -+ for ( i = 0; i < wi->range.num_bitrates; i++ ) { -+ nRt.ifIndex = ifIndex; -+ nRt.supportedDataRatesTxIndex = i + 1; -+ nRt.supportedDataRatesTxValue = wi->range.bitrate[i] / 500000L; -+ nRt.haveSupportedDataRatesTxValue = TRUE; -+ sprintf ( nRt.UID, "%04d%04d\0", nRt.ifIndex, nRt.supportedDataRatesTxIndex ); -+ strcpy ( nRt.ifName, ifName ); -+ addList (( char * ) &rtList, ( char * ) &nRt, sizeof ( nRt )); -+ } -+ } -+ -+ // dot11SupportedDataRatesRxTable -+ if ( wi->has_range ) { -+ for ( i = 0; i < wi->range.num_bitrates; i++ ) { -+ nRr.ifIndex = ifIndex; -+ nRr.supportedDataRatesRxIndex = i + 1; -+ nRr.supportedDataRatesRxValue = wi->range.bitrate[i] / 500000L; -+ nRr.haveSupportedDataRatesRxValue = TRUE; -+ sprintf ( nRr.UID, "%04d%04d\0", nRr.ifIndex, nRr.supportedDataRatesRxIndex ); -+ strcpy ( nRr.ifName, ifName ); -+ addList (( char * ) &rrList, ( char * ) &nRr, sizeof ( nRr )); -+ } -+ } -+ -+//printf ( "%s max_encoding_tokens: %d\n", -+// "loadWiExtTo80211Structs() - ", wi->range.max_encoding_tokens ); -+} -+ -+/**************************************************************************** -+* * -+* loadWiExt() - load wireless extensions structures; * -+* use ioctl calls and read /proc/net/wireless * -+* * -+****************************************************************************/ -+static void loadWiExt ( int skfd, char *ifname, struct wireless_info *wi ) -+{ -+ struct iwreq wrq; // ioctl request structure -+ FILE *fp; -+ char bfr[1024]; -+ char buffer[sizeof ( iwrange ) * 2]; /* Large enough */ -+ char *s, *t; -+ int i, j; -+ -+ strncpy ( wrq.ifr_name, ifname, IFNAMSIZ ); -+ -+ /* Get wireless name */ -+ if ( ioctl ( skfd, SIOCGIWNAME, &wrq ) >= 0 ) { -+ strncpy ( wi->name, wrq.u.name, IFNAMSIZ ); -+ wi->name[IFNAMSIZ] = '\0'; -+ } -+ -+ /* Get ranges */ // NOTE: some version checking in iwlib.c -+ memset ( buffer, 0, sizeof ( buffer )); -+ wrq.u.data.pointer = ( caddr_t ) &buffer; -+ wrq.u.data.length = sizeof ( buffer ); -+ wrq.u.data.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWRANGE, &wrq ) >= 0 ) { -+ memcpy (( char * ) &wi->range, buffer, sizeof ( iwrange )); -+ wi->has_range = 1; -+ } -+ -+ /* Get network ID */ -+ if ( ioctl ( skfd, SIOCGIWNWID, &wrq ) >= 0 ) { -+ memcpy ( &wi->nwid, &wrq.u.nwid, sizeof ( iwparam )); -+ wi->has_nwid = 1; -+ } -+ -+ /* Get frequency / channel */ // THIS NUMBER LOOKS FUNNY -+ if ( ioctl ( skfd, SIOCGIWFREQ, &wrq ) >= 0 ) { -+ wi->has_freq = 1; -+ wi->freq = (( double ) wrq.u.freq.m ) * pow ( 10, wrq.u.freq.e ); -+ } -+ -+ /* Get sensitivity */ -+ if ( ioctl ( skfd, SIOCGIWSENS, &wrq ) >= 0 ) { -+ wi->has_sens = 1; -+ memcpy ( &wi->sens, &wrq.u.sens, sizeof ( iwparam )); -+ } -+ -+ /* Get encryption information */ -+ wrq.u.data.pointer = ( caddr_t ) &wi->key; -+ wrq.u.data.length = IW_ENCODING_TOKEN_MAX; -+ wrq.u.data.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWENCODE, &wrq ) >= 0 ) { -+ wi->has_key = 1; -+ wi->key_size = wrq.u.data.length; -+ wi->key_flags = wrq.u.data.flags; -+ wepCurrentKey = wrq.u.data.flags & IW_ENCODE_INDEX; -+ } -+ -+ for ( i = 0; i < wi->range.max_encoding_tokens; i++ ) { -+ wrq.u.data.pointer = ( caddr_t ) &wi->key; -+ wrq.u.data.length = IW_ENCODING_TOKEN_MAX; -+ wrq.u.data.flags = i; -+ if ( ioctl ( skfd, SIOCGIWENCODE, &wrq ) >= 0 ) { -+ if ( ( wrq.u.data.length != 0 ) && -+ !( wrq.u.data.flags & IW_ENCODE_DISABLED )) { -+ wep[i].len = wrq.u.data.length; -+ wep[i].haveKey = TRUE; -+ t = wep[i].key; -+ for ( j = 0; j < wrq.u.data.length; j++ ) { -+ if (( j & 0x1 ) == 0 && j != 0 ) -+ strcpy ( t++, "-"); -+ sprintf ( t, "%.2X", wi->key[j] ); -+ t += 2; -+ } -+ t = '\0'; -+ } -+ } -+ } -+ -+ /* Get ESSID */ -+ wrq.u.essid.pointer = ( caddr_t ) &wi->essid; -+ wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; -+ wrq.u.essid.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWESSID, &wrq ) >= 0 ) { -+ wi->has_essid = 1; -+ wi->essid_on = wrq.u.data.flags; -+ } -+ -+ /* Get AP address */ -+ if ( ioctl ( skfd, SIOCGIWAP, &wrq ) >= 0 ) { -+ wi->has_ap_addr = 1; -+ memcpy ( &wi->ap_addr, &wrq.u.ap_addr, sizeof ( sockaddr )); -+ } -+ -+ /* Get NickName */ -+ wrq.u.essid.pointer = ( caddr_t ) &wi->nickname; -+ wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; -+ wrq.u.essid.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWNICKN, &wrq ) >= 0 ) { -+ if ( wrq.u.data.length > 1 ) -+ wi->has_nickname = 1; -+ } -+ -+ /* Get bit rate */ -+ if ( ioctl ( skfd, SIOCGIWRATE, &wrq ) >= 0 ) { -+ wi->has_bitrate = 1; -+ memcpy ( &wi->bitrate, &wrq.u.bitrate, sizeof ( iwparam )); -+ } -+ -+ /* Get RTS threshold */ -+ if ( ioctl ( skfd, SIOCGIWRTS, &wrq ) >= 0 ) { -+ wi->has_rts = 1; -+ memcpy ( &wi->rts, &wrq.u.rts, sizeof ( iwparam )); -+ } -+ -+ /* Get fragmentation threshold */ -+ if ( ioctl ( skfd, SIOCGIWFRAG, &wrq ) >= 0 ) { -+ wi->has_frag = 1; -+ memcpy ( &wi->frag, &wrq.u.frag, sizeof ( iwparam )); -+ } -+ -+ /* Get operation mode */ -+ if ( ioctl ( skfd, SIOCGIWMODE, &wrq ) >= 0 ) { -+ wi->mode = wrq.u.mode; -+ if ( wi->mode < IW_NUM_OPER_MODE && wi->mode >= 0 ) -+ wi->has_mode = 1; -+ } -+ -+ /* Get Power Management settings */ // #if WIRELESS_EXT > 9 -+ wrq.u.power.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWPOWER, &wrq ) >= 0 ) { -+ wi->has_power = 1; -+ memcpy ( &wi->power, &wrq.u.power, sizeof ( iwparam )); -+ } -+ -+ /* Get retry limit/lifetime */ // #if WIRELESS_EXT > 10 -+ if ( ioctl ( skfd, SIOCGIWRETRY, &wrq ) >= 0 ) { -+ wi->has_retry = 1; -+ memcpy ( &wi->retry, &wrq.u.retry, sizeof ( iwparam )); -+ } -+ -+ /* Get stats */ // #if WIRELESS_EXT > 11 -+ wrq.u.data.pointer = ( caddr_t ) &wi->stats; -+ wrq.u.data.length = 0; -+ wrq.u.data.flags = 1; /* Clear updated flag */ -+ if ( ioctl ( skfd, SIOCGIWSTATS, &wrq ) < 0 ) -+ wi->has_stats = 1; -+ -+ if ( !wi->has_stats ) { // no ioctl support, go to file -+ fp = fopen ( PROC_NET_WIRELESS, "r" ); -+ if ( fp ) { -+ while ( fgets ( bfr, sizeof ( bfr ), fp )) { -+ bfr [ sizeof ( bfr ) - 1 ] = '\0'; // no buffer overruns here! -+ strtok (( char * ) &bfr, "\n" ); // '\n' => '\0' -+ if ( strstr ( bfr, ifname ) && strstr ( bfr, ":" )) { -+ wi->has_stats = 1; -+ s = bfr; -+ s = strchr ( s, ':' ); s++; /* Skip ethX: */ -+ s = strtok ( s, " " ); /* ' ' => '\0' */ -+ sscanf ( s, "%X", &wi->stats.status ); // status -+ -+ s = strtok ( NULL, " " ); // link quality -+ if ( strchr ( s, '.' ) != NULL ) -+ wi->stats.qual.updated |= 1; -+ sscanf ( s, "%d", &wi->stats.qual.qual ); -+ -+ s = strtok ( NULL, " " ); // signal level -+ if ( strchr ( s,'.' ) != NULL ) -+ wi->stats.qual.updated |= 2; -+ sscanf ( s, "%d", &wi->stats.qual.level ); -+ -+ s = strtok ( NULL, " " ); // noise level -+ if ( strchr ( s, '.' ) != NULL ) -+ wi->stats.qual.updated += 4; -+ sscanf ( s, "%d", &wi->stats.qual.noise ); -+ -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.nwid ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.code ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.fragment ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.retries ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.misc ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.miss.beacon ); -+ } -+ } -+ fclose ( fp ); -+ } -+ } -+ -+// printf ( "%s bfr: %s\n", "loadTables()", bfr ); -+} -+ -+/**************************************************************************** -+* * -+* displayWiExt() - show what I got from Wireless Extensions * -+* * -+****************************************************************************/ -+static void displayWiExt ( struct wireless_info info ) -+{ -+#ifdef DISPLAYWIEXT -+ int i; -+ char title[] = "displayWiExt() -"; -+ -+ printf ( "========================================\n" ); -+ printf ( "===> Wireless Extension IOCTL calls <===\n" ); -+ printf ( "========================================\n" ); -+ -+ if ( strlen ( info.name )) -+ printf ( "%s name: %s\n", "SIOCGIWNAME", info.name ); -+ else -+ printf ( "%s\n", "no info.name support" ); -+ -+ if ( info.has_nickname = 1 ) -+ printf ( "%s nickname: %s\n", "SIOCGIWNICKN", info.nickname ); -+ else -+ printf ( "%s %s\n", "SIOCGIWNICKN", " ===> no info.nickname support" ); -+ -+ if ( info.has_essid ) -+ printf ( "%s essid_on: %d essid: %s\n", "SIOCGIWESSID", info.essid_on, info.essid ); -+ else -+ printf ( "%s %s\n", "SIOCGIWESSID", " ===> no info.essid support" ); -+ -+ if ( info.has_range ) { -+ printf ( "%s throughput: %d\n", "SIOCGIWRANGE", info.range.throughput ); -+ printf ( "%s min_nwid: %d\n", "SIOCGIWRANGE", info.range.min_nwid ); -+ printf ( "%s max_nwid: %d\n", "SIOCGIWRANGE", info.range.max_nwid ); -+ printf ( "%s sensitivity: %d\n", "SIOCGIWRANGE", info.range.sensitivity ); -+ printf ( "%s num_bitrates: %d\n", "SIOCGIWRANGE", info.range.num_bitrates ); -+ for ( i = 0; i < info.range.num_bitrates; i++ ) -+ printf ( "%s bitrate[%d]: %d\n", "SIOCGIWRANGE", i, info.range.bitrate[i] ); -+ printf ( "%s min_rts: %d\n", "SIOCGIWRANGE", info.range.min_rts ); -+ printf ( "%s max_rts: %d\n", "SIOCGIWRANGE", info.range.max_rts ); -+ printf ( "%s min_frag: %d\n", "SIOCGIWRANGE", info.range.min_frag ); -+ printf ( "%s max_frag: %d\n", "SIOCGIWRANGE", info.range.max_frag ); -+ printf ( "%s min_pmp: %d\n", "SIOCGIWRANGE", info.range.min_pmp ); -+ printf ( "%s max_pmp: %d\n", "SIOCGIWRANGE", info.range.max_pmp ); -+ printf ( "%s min_pmt: %d\n", "SIOCGIWRANGE", info.range.min_pmt ); -+ printf ( "%s max_pmt: %d\n", "SIOCGIWRANGE", info.range.max_pmt ); -+ printf ( "%s pmp_flags: %d\n", "SIOCGIWRANGE", info.range.pmp_flags ); -+ printf ( "%s pmt_flags: %d\n", "SIOCGIWRANGE", info.range.pmt_flags ); -+ printf ( "%s pm_capa: %d\n", "SIOCGIWRANGE", info.range.pm_capa ); -+ printf ( "%s num_encoding_sizes: %d\n", "SIOCGIWRANGE", info.range.num_encoding_sizes ); -+ for ( i = 0; i < info.range.num_encoding_sizes; i++ ) -+ printf ( "%s encoding_size[%d]: %d\n", "SIOCGIWRANGE", i, info.range.encoding_size[i] ); -+ printf ( "%s max_encoding_tokens: %d\n", "SIOCGIWRANGE", info.range.max_encoding_tokens ); -+// printf ( "%s encoding_login_index: %d\n", "SIOCGIWRANGE", info.range.encoding_login_index ); -+ printf ( "%s txpower_capa: %d\n", "SIOCGIWRANGE", info.range.txpower_capa ); -+ printf ( "%s num_txpower: %d dBm\n", "SIOCGIWRANGE", info.range.num_txpower ); -+ for ( i = 0; i < info.range.num_txpower; i++ ) -+ printf ( "%s txpower[%d]: %d\n", "SIOCGIWRANGE", i, info.range.txpower[i] ); -+ printf ( "%s we_version_compiled: %d\n", "SIOCGIWRANGE", info.range.we_version_compiled ); -+ printf ( "%s we_version_source: %d\n", "SIOCGIWRANGE", info.range.we_version_source ); -+ printf ( "%s retry_capa: %d\n", "SIOCGIWRANGE", info.range.retry_capa ); -+ printf ( "%s retry_flags: %d\n", "SIOCGIWRANGE", info.range.retry_flags ); -+ printf ( "%s r_time_flags: %d\n", "SIOCGIWRANGE", info.range.r_time_flags ); -+ printf ( "%s min_retry: %d\n", "SIOCGIWRANGE", info.range.min_retry ); -+ printf ( "%s max_retry: %d\n", "SIOCGIWRANGE", info.range.max_retry ); -+ printf ( "%s min_r_time: %d\n", "SIOCGIWRANGE", info.range.min_r_time ); -+ printf ( "%s max_r_time: %d\n", "SIOCGIWRANGE", info.range.max_r_time ); -+ printf ( "%s num_channels: %d\n", "SIOCGIWRANGE", info.range.num_channels ); -+ printf ( "%s num_frequency: %d\n", "SIOCGIWRANGE", info.range.num_frequency ); -+ for ( i = 0; i < info.range.num_frequency; i++ ) -+ printf ( "%s freq[%d].i: %d freq[%d].e: %d freq[%d].m: %d\n", "SIOCGIWRANGE", -+ i, info.range.freq[i].i, i, info.range.freq[i].e, i, info.range.freq[i].m ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWRANGE", " ===> no info.range support" ); -+ -+ if ( info.has_nwid ) -+ printf ( "%s nwid - disabled: %d value: %X\n", "SIOCGIWNWID", info.nwid.disabled, info.nwid.value ); -+ else -+ printf ( "%s %s\n", "SIOCGIWNWID", " ===> no info.nwid support" ); -+ -+ if ( info.has_freq ) { -+// printf ( "%s freq: %g\n", "SIOCGIWFREQ", info.freq / GIGA ); -+ printf ( "%s freq: %g\n", "SIOCGIWFREQ", info.freq ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWFREQ", " ===> no info.freq support" ); -+ -+ if ( info.has_sens ) -+ printf ( "%s sens: %d\n", "SIOCGIWSENS", info.sens ); -+ else -+ printf ( "%s %s\n", "SIOCGIWSENS", " ===> no info.sens support" ); -+ -+ if ( info.has_key ) { -+ printf ( "%s key_size: %d key_flags: %d wepCurrentKey: %d\n", -+ "SIOCGIWENCODE", info.key_size, info.key_flags, wepCurrentKey ); -+ printf ( "%s MODE: %d DISABLED: %d INDEX: %d OPEN: %d RESTRICTED: %d NOKEY: %d TEMP: %d\n", -+ "SIOCGIWENCODE", info.key_flags & IW_ENCODE_MODE, -+ info.key_flags & IW_ENCODE_DISABLED ? 1:0, info.key_flags & IW_ENCODE_INDEX, -+ info.key_flags & IW_ENCODE_OPEN ? 1:0, info.key_flags & IW_ENCODE_RESTRICTED ? 1:0, -+ info.key_flags & IW_ENCODE_NOKEY ? 1:0, info.key_flags & IW_ENCODE_TEMP ? 1:0 ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWENCODE", " ===> no info.key support" ); -+ -+ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { -+ if ( wep[i].haveKey ) -+ printf ( "%s wep[%d].len: %d wep[%d].key: %s\n", -+ "SIOCGIWENCODE", i, wep[i].len, i, wep[i].key ); -+ } -+ -+ if ( info.has_ap_addr ) -+ printf ( "%s ap_addr.sa_data: %02X:%02X:%02X:%02X:%02X:%02X ap_addr.sa_family: %d\n", -+ "SIOCGIWAP", ( UCHAR ) info.ap_addr.sa_data[0], ( UCHAR ) info.ap_addr.sa_data[1], -+ ( UCHAR ) info.ap_addr.sa_data[2], ( UCHAR ) info.ap_addr.sa_data[3], -+ ( UCHAR ) info.ap_addr.sa_data[4], ( UCHAR ) info.ap_addr.sa_data[5], -+ info.ap_addr.sa_family ); -+ else -+ printf ( "%s %s\n", "SIOCGIWAP", " ===> no ap_addr information" ); -+ -+ if ( info.has_bitrate ) -+ printf ( "%s bitrate: %d value: %d fixed: %d disabled: %d flags: %d\n", -+ "SIOCGIWRATE", info.bitrate, info.bitrate.value, info.bitrate.fixed, -+ info.bitrate.disabled, info.bitrate.flags ); -+ else -+ printf ( "%s %s\n", "SIOCGIWRATE", " ===> no info.bitrate support" ); -+ -+ if ( info.has_rts ) -+ printf ( "%s rts: %d\n", "SIOCGIWRTS", info.rts ); -+ else -+ printf ( "%s %s\n", "SIOCGIWRTS", " ===> no info.rts support" ); -+ -+ if ( info.has_frag ) -+ printf ( "%s frag: %d\n", "SIOCGIWFRAG", info.frag ); -+ else -+ printf ( "%s %s\n", "SIOCGIWFRAG", " ===> no info.frag support" ); -+ -+ if ( info.has_mode ) -+ printf ( "%s mode: %d\n", "SIOCGIWMODE", info.mode ); -+ else -+ printf ( "%s %s\n", "SIOCGIWMODE", " ===> no info.mode support" ); -+ -+ if ( info.has_power ) { -+ printf ( "%s power: %d\n", "SIOCGIWPOWER", info.power ); -+ printf ( "%s disabled: %d MIN: %d MAX: %d TIMEOUT: %d RELATIVE: %d\n", -+ "SIOCGIWPOWER", -+ info.power.disabled ? 1:0, -+ info.power.flags & IW_POWER_MIN ? 1:0, -+ info.power.flags & IW_POWER_MAX ? 1:0, -+ info.power.flags & IW_POWER_TIMEOUT ? 1:0, -+ info.power.flags & IW_POWER_RELATIVE ? 1:0 ); -+ printf ( "%s UNICAST: %d MULTICAST: %d ALL: %d FORCE: %d REPEATER: %d\n", -+ "SIOCGIWPOWER", -+ info.power.flags & IW_POWER_UNICAST_R ? 1:0, -+ info.power.flags & IW_POWER_MULTICAST_R ? 1:0, -+ info.power.flags & IW_POWER_ALL_R ? 1:0, -+ info.power.flags & IW_POWER_FORCE_S ? 1:0, -+ info.power.flags & IW_POWER_REPEATER ? 1:0 ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWPOWER", " ===> no info.power support" ); -+ -+ if ( info.has_retry ) -+ printf ( "%s retry: %d\n", "SIOCGIWRETRY", info.retry ); -+ else -+ printf ( "%s %s\n", "SIOCGIWRETRY", " ===> no info.retry support" ); -+ -+ if ( info.has_stats ) { -+ printf ( "%s status: %d\n", "SIOCGIWSTATS", info.stats.status ); -+ printf ( "%s qual.level: %d\n", "SIOCGIWSTATS", info.stats.qual.level ); -+ printf ( "%s qual.noise: %d\n", "SIOCGIWSTATS", info.stats.qual.noise ); -+ printf ( "%s qual.qual: %d\n", "SIOCGIWSTATS", info.stats.qual.qual ); -+ printf ( "%s qual.updated: %d\n", "SIOCGIWSTATS", info.stats.qual.updated ); -+ printf ( "%s discard.code: %d\n", "SIOCGIWSTATS", info.stats.discard.code ); -+ printf ( "%s discard.fragment: %d\n", "SIOCGIWSTATS", info.stats.discard.fragment ); -+ printf ( "%s discard.misc: %d\n", "SIOCGIWSTATS", info.stats.discard.misc ); -+ printf ( "%s discard.nwid: %d\n", "SIOCGIWSTATS", info.stats.discard.nwid ); -+ printf ( "%s discard.retries: %d\n", "SIOCGIWSTATS", info.stats.discard.retries ); -+ printf ( "%s miss.beacon: %d\n", "SIOCGIWSTATS", info.stats.miss.beacon ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWSTATS", " ===> no info.stats support" ); -+ -+ if ( info.txpower.flags & IW_TXPOW_MWATT ) -+ printf ( "%s txpower1: %d dBm disabled: %d fixed: %d flags: %d\n", "SIOCGIWRANGE", -+ mWatt2dbm ( info.txpower.value ), info.txpower.disabled, info.txpower.fixed, info.txpower.flags); -+ else -+ printf ( "%s txpower2: %d dBm disabled: %d fixed: %d flags: %d\n", "SIOCGIWRANGE", info.txpower.value, info.txpower.disabled, info.txpower.fixed, info.txpower.flags ); -+ -+ if ( info.has_range ) -+ if ( info.sens.value < 0 ) -+ printf ( "%s sens: %d dBm\n", "SIOCGIWRANGE", info.sens.value ); -+ else -+ printf ( "%s sens: %d/%d\n", "SIOCGIWRANGE", info.sens.value, info.range.sensitivity ); -+ -+ if ( info.has_range && ( info.stats.qual.level != 0 )) -+ if ( info.stats.qual.level > info.range.max_qual.level ) -+ /* Statistics are in dBm (absolute power measurement) */ -+ printf ( "%s Quality: %d/%d Signal level: %d dBm Noise level: %d dBm\n", -+ "SIOCGIWRANGE", -+ info.stats.qual.qual, info.range.max_qual.qual, -+ info.stats.qual.level - 0x100, -+ info.stats.qual.noise - 0x100 ); -+ else -+ printf ( "%s Quality: %d/%d Signal level: %d/%d Noise level: %d/%d", -+ "SIOCGIWRANGE", -+ info.stats.qual.qual, info.range.max_qual.qual, -+ info.stats.qual.level, info.range.max_qual.level, -+ info.stats.qual.noise, info.range.max_qual.noise ); -+ -+#endif // #ifdef DISPLAYWIEXT -+} -+ -+/**************************************************************************** -+* * -+* Linked List Functions * -+* * -+****************************************************************************/ -+/**************************************************************************** -+* * -+* addList() - add an entry to a linked list * -+* * -+****************************************************************************/ -+static void -+addList ( char *l, char *data, int len ) -+{ -+ char uid[256]; -+ LIST_HEAD ( , avNode ) *list; -+ -+ // NOTE: this assumes the UID is at the begining of the -+ // data structure and that UIDs are strings -+ -+ list = ( LIST_HEAD ( , avNode ) * ) l; // NOTE: don't know how to get -+ strcpy ( uid, data ); // rid of compiler warning on -+ // LISTHEAD typecast -+ // create a new node and the data that goes in it -+ newNode = malloc ( sizeof ( struct avNode )); -+ newNode->data = malloc ( len ); -+ memcpy ( newNode->data, data, len ); -+ -+ // this deals with an empty list -+ if ( LIST_EMPTY ( list )) { -+ LIST_INSERT_HEAD ( list, newNode, nodes ); -+ return; -+ } -+ -+ // this deals with UIDs that match -+ for ( np = LIST_FIRST ( list ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ if ( strncmp ( uid, np->data, strlen ( uid )) == 0 ) { // found matching UID -+ LIST_INSERT_AFTER ( np, newNode, nodes ); -+ if ( np->data ) -+ free ( np->data ); -+ LIST_REMOVE ( np, nodes ); -+ free ( np ); -+ return; -+ } -+ } -+ -+ // this deals with inserting a new UID in the list -+ for ( np = LIST_FIRST ( list ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ lastNode = np; -+ if ( strncmp ( np->data, uid, strlen ( uid )) > 0 ) { // old ID > new ID AND -+ LIST_INSERT_BEFORE ( np, newNode, nodes ); -+ return; -+ } -+ } -+ -+ // this deals with a UID that needs to go on the end of the list -+ LIST_INSERT_AFTER ( lastNode, newNode, nodes ); -+ -+ return; -+} -+ -+/**************************************************************************** -+* * -+* initLists() - initialize all the linked lists * -+* * -+****************************************************************************/ -+static void initLists() -+{ -+ LIST_INIT ( &scList ); LIST_INIT ( &aaList ); LIST_INIT ( &dfList ); -+ LIST_INIT ( &kmList ); LIST_INIT ( &prList ); -+ LIST_INIT ( &opList ); LIST_INIT ( &coList ); -+ LIST_INIT ( &gaList ); LIST_INIT ( &riList ); LIST_INIT ( &poList ); -+ LIST_INIT ( &paList ); LIST_INIT ( &ptList ); LIST_INIT ( &pfList ); -+ LIST_INIT ( &pdList ); LIST_INIT ( &piList ); LIST_INIT ( &rdList ); -+ LIST_INIT ( &alList ); LIST_INIT ( &rtList ); LIST_INIT ( &rrList ); -+} -+/**************************************************************************** -+* * -+* flushLists() - flush all linked lists * -+* * -+****************************************************************************/ -+static void flushLists() -+{ -+ flushList (( char * ) &scList ); flushList (( char * ) &aaList ); -+ flushList (( char * ) &dfList ); flushList (( char * ) &kmList ); -+ flushList (( char * ) &prList ); -+ flushList (( char * ) &opList ); flushList (( char * ) &coList ); -+ flushList (( char * ) &gaList ); flushList (( char * ) &riList ); -+ flushList (( char * ) &poList ); flushList (( char * ) &paList ); -+ flushList (( char * ) &ptList ); flushList (( char * ) &pfList ); -+ flushList (( char * ) &pdList ); flushList (( char * ) &piList ); -+ flushList (( char * ) &rdList ); flushList (( char * ) &alList ); -+ flushList (( char * ) &rtList ); flushList (( char * ) &rrList ); -+} -+ -+/**************************************************************************** -+* * -+* flushList() - flush a linked list * -+* * -+****************************************************************************/ -+static void flushList ( char *l ) -+{ -+ LIST_HEAD ( , avNode ) *list; -+ -+ list = ( LIST_HEAD ( , avNode ) * ) l; // NOTE: don't know how to get -+ while ( !LIST_EMPTY ( list )) { // rid of compiler warning on -+ np = LIST_FIRST ( list ); // LISTHEAD typecast -+ if ( np->data ) -+ free ( np->data ); -+ LIST_REMOVE ( np, nodes ); -+ free ( np ); -+ } -+} -+ -+/**************************************************************************** -+* * -+* Utility Functions * -+* * -+****************************************************************************/ -+/**************************************************************************** -+* * -+* The following two routines were taken directly from iwlib.c * -+* * -+****************************************************************************/ -+ /* -+ * Open a socket. -+ * Depending on the protocol present, open the right socket. The socket -+ * will allow us to talk to the driver. -+ */ -+static int openSocket ( void ) -+{ -+ static const int families[] = { -+ AF_INET, AF_IPX, AF_AX25, AF_APPLETALK -+ }; -+ unsigned int i; -+ int sock; -+ -+ /* -+ * Now pick any (exisiting) useful socket family for generic queries -+ * Note : don't open all the socket, only returns when one matches, -+ * all protocols might not be valid. -+ * Workaround by Jim Kaba -+ * Note : in 99% of the case, we will just open the inet_sock. -+ * The remaining 1% case are not fully correct... -+ */ -+ -+ /* Try all families we support */ -+ for(i = 0; i < sizeof(families)/sizeof(int); ++i) { -+ /* Try to open the socket, if success returns it */ -+ sock = socket(families[i], SOCK_DGRAM, 0); -+ if(sock >= 0) -+ return sock; -+ } -+ -+ return -1; -+} -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Convert a value in milliWatt to a value in dBm. -+ */ -+static int mWatt2dbm ( int in ) -+{ -+#ifdef WE_NOLIBM -+ /* Version without libm : slower */ -+ double fin = (double) in; -+ int res = 0; -+ -+ /* Split integral and floating part to avoid accumulating rounding errors */ -+ while(fin > 10.0) -+ { -+ res += 10; -+ fin /= 10.0; -+ } -+ while(fin > 1.000001) /* Eliminate rounding errors, take ceil */ -+ { -+ res += 1; -+ fin /= LOG10_MAGIC; -+ } -+ return(res); -+#else /* WE_NOLIBM */ -+ /* Version with libm : faster */ -+ return((int) (ceil(10.0 * log10((double) in)))); -+#endif /* WE_NOLIBM */ -+} -+ -+/**************************************************************************** -+* * -+* htob - converts hex string to binary * -+* * -+****************************************************************************/ -+static char *htob ( char *s ) -+{ -+ char nibl, *byt; -+ static char bin[20]; -+ -+ byt = bin; -+ -+ while ((nibl = *s++) && nibl != ' ') { /* While not end of string. */ -+ nibl -= ( nibl > '9') ? ('A' - 10): '0'; -+ *byt = nibl << 4; /* place high nibble */ -+ if((nibl = *s++) && nibl != ' ') { -+ nibl -= ( nibl > '9') ? ('A' - 10): '0'; -+ *byt |= nibl; /* place low nibble */ -+ } -+ else break; -+ ++byt; -+ } -+ *++byt = '\0'; -+ return ( bin ); -+} -+ -+/**************************************************************************** -+* * -+* hasChanged() - see if area has been changed from NULLs * -+* * -+****************************************************************************/ -+static int hasChanged ( char *loc, int len ) -+{ -+ char *wrk; -+ int changed = TRUE; -+ -+ wrk = malloc ( len ); -+ memset ( wrk, 0, len ); -+ if ( memcmp ( loc, wrk, len ) == 0 ) -+ changed = FALSE; -+ free ( wrk ); -+ -+ return ( changed ); -+} -+ ---- net-snmp-5.1.2-orig/agent/mibgroup/ieee802dot11.h 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/agent/mibgroup/ieee802dot11.h 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,730 @@ -+/**************************************************************************** -+* * -+* File Name: ieee802dot11.h * -+* Used By: * -+* * -+* Operating System: * -+* Purpose: * -+* * -+* Comments: * -+* * -+* Author: Larry Simmons * -+* lsimmons@avantcom.com * -+* www.avantcom.com * -+* * -+* Creation Date: 09/02/03 * -+* * -+* Ver Date Inits Modification * -+* ----- -------- ----- ------------ * -+* 0.0.1 09/02/03 LRS created * -+* 0.0.2 09/24/03 LRS wouldn't build after fresh ./configure * -+****************************************************************************/ -+/* This file was generated by mib2c and is intended for use as a mib module -+ for the ucd-snmp snmpd agent. */ -+#ifndef _MIBGROUP_IEEE802DOT11_H -+#define _MIBGROUP_IEEE802DOT11_H -+/* we may use header_generic and header_simple_table from the util_funcs module */ -+ -+/**************************************************************************** -+* Includes * -+****************************************************************************/ -+#include -+ -+/**************************************************************************** -+* Linked List Defines * -+****************************************************************************/ -+// here are some Linked List MACROS I wanted to use, -+// but curiously were not in /usr/includes/sys/queue.h -+ -+#ifndef LIST_EMPTY -+ #define LIST_EMPTY(head) ((head)->lh_first == NULL) -+#endif -+ -+#ifndef LIST_NEXT -+ #define LIST_NEXT(elm, field) ((elm)->field.le_next) -+#endif -+ -+#ifndef LIST_INSERT_BEFORE -+ #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ -+ (elm)->field.le_prev = (listelm)->field.le_prev; \ -+ LIST_NEXT((elm), field) = (listelm); \ -+ *(listelm)->field.le_prev = (elm); \ -+ (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ -+ } while (0) -+#endif -+ -+#ifndef LIST_FIRST -+ #define LIST_FIRST(head) ((head)->lh_first) -+#endif -+ -+/**************************************************************************** -+* 802.11 MIB Defines * -+****************************************************************************/ -+#define SYS_STRING_LEN 256 -+#define MACADDR_LEN ( 6 * 2 ) + 5 -+#define OPER_RATE_SET_LEN 126 -+#define MAN_OUI_LEN ( 3 * 2 ) + 2 -+#define WEP_STR_LEN 64 -+#define SNMP_STR_LEN 128 -+#define TEXT_LEN 80 -+#define IFINDEX_LEN 4 -+#define IFNAME_LEN 16 -+#define MAX_WEP_KEYS 4 -+ -+#define AUTHENICATION_ALGORITHMS_INDEX_LEN 4 -+#define WEP_DEFAULT_KEY_INDEX_LEN 4 -+#define WEP_KEY_MAPPING_INDEX_LEN 4 -+#define GROUP_ADDRESS_INDEX_LEN 4 -+#define REG_DOMAIN_SUPPORT_INDEX_LEN 4 -+#define ANTENNA_LIST_INDEX_LEN 4 -+#define SUPPORTED_DATA_RATES_TX_INDEX_LEN 4 -+#define SUPPORTED_DATA_RATES_RX_INDEX_LEN 4 -+ -+#define SC_UID_LEN IFINDEX_LEN -+#define AA_UID_LEN IFINDEX_LEN + AUTHENICATION_ALGORITHMS_INDEX_LEN -+#define DF_UID_LEN IFINDEX_LEN + WEP_DEFAULT_KEY_INDEX_LEN -+#define KM_UID_LEN IFINDEX_LEN + WEP_KEY_MAPPING_INDEX_LEN -+#define PR_UID_LEN IFINDEX_LEN -+#define OP_UID_LEN IFINDEX_LEN -+#define CO_UID_LEN IFINDEX_LEN -+#define GA_UID_LEN IFINDEX_LEN + GROUP_ADDRESS_INDEX_LEN -+#define RI_UID_LEN IFINDEX_LEN -+#define PO_UID_LEN IFINDEX_LEN -+#define PA_UID_LEN IFINDEX_LEN -+#define PT_UID_LEN IFINDEX_LEN -+#define PF_UID_LEN IFINDEX_LEN -+#define PD_UID_LEN IFINDEX_LEN -+#define PI_UID_LEN IFINDEX_LEN -+#define RD_UID_LEN IFINDEX_LEN + REG_DOMAIN_SUPPORT_INDEX_LEN -+#define AL_UID_LEN IFINDEX_LEN + ANTENNA_LIST_INDEX_LEN -+#define RT_UID_LEN IFINDEX_LEN + SUPPORTED_DATA_RATES_TX_INDEX_LEN -+#define RR_UID_LEN IFINDEX_LEN + SUPPORTED_DATA_RATES_RX_INDEX_LEN -+ -+/**************************************************************************** -+* Linked List Structure * -+****************************************************************************/ -+static struct avNode { -+ LIST_ENTRY ( avNode ) nodes; -+ char *data; // pointer to data -+}; -+ -+typedef LIST_HEAD ( , avNode ) avList_t; -+ -+/**************************************************************************** -+* 802.11 MIB structures * -+****************************************************************************/ -+/**************************************************************************** -+* dot11Smt Group * -+****************************************************************************/ -+/**************************************************************************** -+* dot11StationConfigTable * -+****************************************************************************/ -+static struct scTbl_data { -+ -+ char UID [ SC_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ char stationID [ MACADDR_LEN + 1 ]; // Default actual MacAddr -+ long mediumOccupancyLimit; -+ long CFPPollable; -+ long CFPPeriod; -+ long maxDuration; -+ long authenticationResponseTimeOut; -+ long privacyOptionImplemented; -+ long powerManagementMode; -+ char desiredSSID [ SNMP_STR_LEN + 1 ]; -+ long desiredBSSType; -+ char operationalRateSet [ OPER_RATE_SET_LEN + 1]; -+ long beaconPeriod; -+ long DTIMPeriod; -+ long associationResponseTimeOut; -+ long disAssociationReason; -+ char disAssociationStation [ MACADDR_LEN + 1 ]; -+ long deAuthenticationReason; -+ char deAuthenticationStation [ MACADDR_LEN + 1 ]; -+ long authenticateFailStatus; -+ char authenticateFailStation [ MACADDR_LEN + 1 ]; -+ -+ long haveStationID; -+ long haveMediumOccupancyLimit; -+ long haveCFPPollable; -+ long haveCFPPeriod; -+ long haveMaxDuration; -+ long haveAuthenticationResponseTimeOut; -+ long havePrivacyOptionImplemented; -+ long havePowerManagementMode; -+ long haveDesiredSSID; -+ long haveDesiredBSSType; -+ long haveOperationalRateSet; -+ long haveBeaconPeriod; -+ long haveDTIMPeriod; -+ long haveAssociationResponseTimeOut; -+ long haveDisAssociationReason; -+ long haveDisAssociationStation; -+ long haveDeAuthenticationReason; -+ long haveDeAuthenticationStation; -+ long haveAuthenticateFailStatus; -+ long haveAuthenticateFailStation; -+ -+} nSc, *sc = &nSc; -+ -+static avList_t scList; -+ -+/**************************************************************************** -+* dot11AuthenticationAlgorithmsTable * -+****************************************************************************/ -+static struct aaTbl_data { -+ -+ char UID [ AA_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ long authenticationAlgorithmsIndex; -+ -+ long authenticationAlgorithm; -+ long authenticationAlgorithmsEnable; -+ -+ long haveAuthenticationAlgorithm; -+ long haveAuthenticationAlgorithmsEnable; -+ -+} nAa, *aa = &nAa; -+ -+static avList_t aaList; -+ -+/**************************************************************************** -+* dot11WEPDefaultKeysTable * -+****************************************************************************/ -+static struct dfTbl_data { -+ -+ char UID [ DF_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long WEPDefaultKeyIndex; -+ -+ char WEPDefaultKeyValue [ WEP_STR_LEN + 1 ]; -+ long haveWEPDefaultKeyValue; -+ -+} nDf, *df = &nDf; -+ -+static avList_t dfList; -+ -+/**************************************************************************** -+* dot11WEPKeyMappingsTable * -+****************************************************************************/ -+static struct kmTbl_data { -+ -+ char UID [ KM_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; -+ long WEPKeyMappingIndex; -+ -+ char WEPKeyMappingAddress [ MACADDR_LEN + 1 ]; -+ long WEPKeyMappingWEPOn; -+ char WEPKeyMappingValue [ WEP_STR_LEN + 1 ]; -+ long WEPKeyMappingStatus; -+ -+ long haveWEPKeyMappingIndex; -+ long haveWEPKeyMappingAddress; -+ long haveWEPKeyMappingWEPOn; -+ long haveWEPKeyMappingValue; -+ long haveWEPKeyMappingStatus; -+ -+} nKm, *km = &nKm; -+ -+static avList_t kmList; -+ -+/**************************************************************************** -+* dot11PrivacyTable * -+****************************************************************************/ -+static struct prTbl_data { -+ -+ char UID [ PR_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; -+ -+ long privacyInvoked; -+ long WEPDefaultKeyID; -+ long WEPKeyMappingLength; -+ long excludeUnencrypted; -+ unsigned long WEPICVErrorCount; -+ unsigned long WEPExcludedCount; -+ -+ long havePrivacyInvoked; -+ long haveWEPDefaultKeyID; -+ long haveWEPKeyMappingLength; -+ long haveExcludeUnencrypted; -+ long haveWEPICVErrorCount; -+ long haveWEPExcludedCount; -+ -+} nPr, *pr = &nPr; -+ -+static avList_t prList; -+ -+/**************************************************************************** -+* dot11Mac Group * -+****************************************************************************/ -+/**************************************************************************** -+* dot11OperationTable * -+****************************************************************************/ -+static struct opTbl_data { -+ -+ char UID [ OP_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ char MACAddress [ MACADDR_LEN + 1 ]; -+ long RTSThreshold; -+ long shortRetryLimit; -+ long longRetryLimit; -+ long fragmentationThreshold; -+ long maxTransmitMSDULifetime; -+ long maxReceiveLifetime; -+ char manufacturerID [ SNMP_STR_LEN + 1 ]; -+ char productID [ SNMP_STR_LEN + 1 ]; -+ -+ long haveMACAddress; -+ long haveRTSThreshold; -+ long haveShortRetryLimit; -+ long haveLongRetryLimit; -+ long haveFragmentationThreshold; -+ long haveMaxTransmitMSDULifetime; -+ long haveMaxReceiveLifetime; -+ long haveManufacturerID; -+ long haveProductID; -+ -+} nOp, *op = &nOp; -+ -+static avList_t opList; -+ -+/**************************************************************************** -+* dot11CountersTable * -+****************************************************************************/ -+static struct coTbl_data { -+ -+ char UID [ CO_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ unsigned long transmittedFragmentCount; -+ unsigned long multicastTransmittedFrameCount; -+ unsigned long failedCount; -+ unsigned long retryCount; -+ unsigned long multipleRetryCount; -+ unsigned long frameDuplicateCount; -+ unsigned long RTSSuccessCount; -+ unsigned long RTSFailureCount; -+ unsigned long ACKFailureCount; -+ unsigned long receivedFragmentCount; -+ unsigned long multicastReceivedFrameCount; -+ unsigned long FCSErrorCount; -+ unsigned long transmittedFrameCount; -+ unsigned long WEPUndecryptableCount; -+ -+ long haveTransmittedFragmentCount; -+ long haveMulticastTransmittedFrameCount; -+ long haveFailedCount; -+ long haveRetryCount; -+ long haveMultipleRetryCount; -+ long haveFrameDuplicateCount; -+ long haveRTSSuccessCount; -+ long haveRTSFailureCount; -+ long haveACKFailureCount; -+ long haveReceivedFragmentCount; -+ long haveMulticastReceivedFrameCount; -+ long haveFCSErrorCount; -+ long haveTransmittedFrameCount; -+ long haveWEPUndecryptableCount; -+ -+} nCo, *co = &nCo; -+ -+static avList_t coList; -+ -+/**************************************************************************** -+* dot11GroupAddressesTable * -+****************************************************************************/ -+static struct gaTbl_data { -+ -+ char UID [ GA_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long groupAddressesIndex; -+ -+ char address [ MACADDR_LEN + 1 ]; -+ long groupAddressesStatus; -+ -+ long haveAddress; -+ long haveGroupAddressesStatus; -+ -+} nGa, *ga = &nGa; -+ -+static avList_t gaList; -+ -+/**************************************************************************** -+* dot11Res Group * -+****************************************************************************/ -+static char resourceTypeIDName[] = "RTID"; -+static long haveResourceTypeIDName = 1; -+ -+/**************************************************************************** -+* dot11ResourceInfoTable * -+****************************************************************************/ -+static struct riTbl_data { -+ -+ char UID [ RI_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ char manufacturerOUI [ MAN_OUI_LEN + 1 ]; -+ char manufacturerName [ SYS_STRING_LEN + 1 ]; -+ char manufacturerProductName [ SYS_STRING_LEN + 1 ]; -+ char manufacturerProductVersion [ SYS_STRING_LEN + 1 ]; -+ -+ char haveManufacturerOUI; -+ char haveManufacturerName; -+ char haveManufacturerProductName; -+ char haveManufacturerProductVersion; -+ -+} nRi, *ri = &nRi; -+ -+static avList_t riList; -+ -+/**************************************************************************** -+* dot11Phy Group * -+****************************************************************************/ -+/**************************************************************************** -+* dot11PhyOperationTable * -+****************************************************************************/ -+static struct poTbl_data { -+ -+ char UID [ PO_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long PHYType; -+ long currentRegDomain; -+ long tempType; -+ -+ long havePHYType; -+ long haveCurrentRegDomain; -+ long haveTempType; -+ -+} nPo, *po = &nPo; -+ -+static avList_t poList; -+ -+/**************************************************************************** -+* dot11PhyAntennaEntry * -+****************************************************************************/ -+static struct paTbl_data { -+ -+ char UID [ PA_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long currentTxAntenna; -+ long diversitySupport; -+ long currentRxAntenna; -+ -+ long haveCurrentTxAntenna; -+ long haveDiversitySupport; -+ long haveCurrentRxAntenna; -+ -+} nPa, *pa = &nPa; -+ -+static avList_t paList; -+ -+/**************************************************************************** -+* dot11PhyTxPowerTable * -+****************************************************************************/ -+static struct ptTbl_data { -+ -+ char UID [ PT_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long numberSupportedPowerLevels; -+ long TxPowerLevel1; -+ long TxPowerLevel2; -+ long TxPowerLevel3; -+ long TxPowerLevel4; -+ long TxPowerLevel5; -+ long TxPowerLevel6; -+ long TxPowerLevel7; -+ long TxPowerLevel8; -+ long currentTxPowerLevel; -+ -+ long haveNumberSupportedPowerLevels; -+ long haveTxPowerLevel1; -+ long haveTxPowerLevel2; -+ long haveTxPowerLevel3; -+ long haveTxPowerLevel4; -+ long haveTxPowerLevel5; -+ long haveTxPowerLevel6; -+ long haveTxPowerLevel7; -+ long haveTxPowerLevel8; -+ long haveCurrentTxPowerLevel ; -+ -+} nPt, *pt = &nPt; -+ -+static avList_t ptList; -+ -+/**************************************************************************** -+* dot11PhyFHSSTable * -+****************************************************************************/ -+static struct pfTbl_data { -+ -+ char UID [ PF_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long hopTime; -+ long currentChannelNumber; -+ long maxDwellTime; -+ long currentDwellTime; -+ long currentSet; -+ long currentPattern; -+ long currentIndex; -+ -+ long haveHopTime; -+ long haveCurrentChannelNumber; -+ long haveMaxDwellTime; -+ long haveCurrentDwellTime; -+ long haveCurrentSet; -+ long haveCurrentPattern; -+ long haveCurrentIndex; -+ -+} nPf, *pf = &nPf; -+ -+static avList_t pfList; -+ -+/**************************************************************************** -+* dot11PhyDSSSTable * -+****************************************************************************/ -+static struct pdTbl_data { -+ -+ char UID [ PD_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long currentChannel; -+ long CCAModeSupported; -+ long currentCCAMode; -+ long EDThreshold; -+ -+ long haveCurrentChannel; -+ long haveCCAModeSupported ; -+ long haveCurrentCCAMode; -+ long haveEDThreshold; -+ -+} nPd, *pd = &nPd; -+ -+static avList_t pdList; -+ -+/**************************************************************************** -+* dot11PhyIRTable * -+****************************************************************************/ -+static struct piTbl_data { -+ -+ char UID [ PI_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long CCAWatchdogTimerMax; -+ long CCAWatchdogCountMax; -+ long CCAWatchdogTimerMin; -+ long CCAWatchdogCountMin; -+ -+ long haveCCAWatchdogTimerMax; -+ long haveCCAWatchdogCountMax; -+ long haveCCAWatchdogTimerMin; -+ long haveCCAWatchdogCountMin; -+ -+} nPi, *pi = &nPi; -+ -+static avList_t piList; -+ -+/**************************************************************************** -+* dot11RegDomainsSupportedTable * -+****************************************************************************/ -+static struct rdTbl_data { -+ -+ char UID [ RD_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long regDomainsSupportIndex; -+ -+ long regDomainsSupportValue; -+ long haveRegDomainsSupportValue; -+ -+} nRd, *rd = &nRd; -+ -+static avList_t rdList; -+ -+/**************************************************************************** -+* dot11AntennasListTable * -+****************************************************************************/ -+static struct alTbl_data { -+ -+ char UID [ AL_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long antennaListIndex; -+ -+ long supportedTxAntenna; -+ long supportedRxAntenna; -+ long diversitySelectionRx ; -+ -+ long haveSupportedTxAntenna; -+ long haveSupportedRxAntenna; -+ long haveDiversitySelectionRx ; -+ -+} nAl, *al = &nAl; -+ -+static avList_t alList; -+ -+/**************************************************************************** -+* dot11SupportedDataRatesTxTable * -+****************************************************************************/ -+static struct rtTbl_data { -+ -+ char UID [ RT_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long supportedDataRatesTxIndex; -+ -+ long supportedDataRatesTxValue; -+ long haveSupportedDataRatesTxValue; -+ -+} nRt, *rt = &nRt; -+ -+static avList_t rtList; -+ -+/**************************************************************************** -+* dot11SupportedDataRatesRxTable * -+****************************************************************************/ -+static struct rrTbl_data { -+ -+ char UID [ RR_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long supportedDataRatesRxIndex; -+ -+ long supportedDataRatesRxValue; -+ long haveSupportedDataRatesRxValue; -+ -+} nRr, *rr = &nRr; -+ -+static avList_t rrList; -+ -+/**************************************************************************** -+* Wireless Extensions Structures * -+****************************************************************************/ -+static long wepCurrentKey; -+static long haveWepCurrentKey; -+static struct wepTbl_data { -+ -+ long len; -+ char key [ WEP_STR_LEN + 1 ]; -+ long haveKey; -+ -+} wep[4]; -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+config_require(util_funcs) -+ -+/* function prototypes */ -+ -+void init_ieee802dot11 ( void ); -+FindVarMethod var_ieee802dot11; -+FindVarMethod var_dot11StationConfigTable; -+FindVarMethod var_dot11AuthenticationAlgorithmsTable; -+FindVarMethod var_dot11WEPDefaultKeysTable; -+FindVarMethod var_dot11WEPKeyMappingsTable; -+FindVarMethod var_dot11PrivacyTable; -+FindVarMethod var_dot11OperationTable; -+FindVarMethod var_dot11CountersTable; -+FindVarMethod var_dot11GroupAddressesTable; -+FindVarMethod var_dot11ResourceInfoTable; -+FindVarMethod var_dot11PhyOperationTable; -+FindVarMethod var_dot11PhyAntennaTable; -+FindVarMethod var_dot11PhyTxPowerTable; -+FindVarMethod var_dot11PhyFHSSTable; -+FindVarMethod var_dot11PhyDSSSTable; -+FindVarMethod var_dot11PhyIRTable; -+FindVarMethod var_dot11RegDomainsSupportedTable; -+FindVarMethod var_dot11AntennasListTable; -+FindVarMethod var_dot11SupportedDataRatesTxTable; -+FindVarMethod var_dot11SupportedDataRatesRxTable; -+ -+WriteMethod write_dot11StationID; -+WriteMethod write_dot11MediumOccupancyLimit; -+WriteMethod write_dot11CFPPeriod; -+WriteMethod write_dot11CFPMaxDuration; -+WriteMethod write_dot11AuthenticationResponseTimeOut; -+WriteMethod write_dot11PowerManagementMode; -+WriteMethod write_dot11DesiredSSID; -+WriteMethod write_dot11DesiredBSSType; -+WriteMethod write_dot11OperationalRateSet; -+WriteMethod write_dot11BeaconPeriod; -+WriteMethod write_dot11DTIMPeriod; -+WriteMethod write_dot11AssociationResponseTimeOut; -+WriteMethod write_dot11AuthenticationAlgorithmsEnable; -+WriteMethod write_dot11WEPDefaultKeyValue; -+WriteMethod write_dot11WEPKeyMappingAddress; -+WriteMethod write_dot11WEPKeyMappingWEPOn; -+WriteMethod write_dot11WEPKeyMappingValue; -+WriteMethod write_dot11WEPKeyMappingStatus; -+WriteMethod write_dot11PrivacyInvoked; -+WriteMethod write_dot11WEPDefaultKeyID; -+WriteMethod write_dot11WEPKeyMappingLength; -+WriteMethod write_dot11ExcludeUnencrypted; -+WriteMethod write_dot11RTSThreshold; -+WriteMethod write_dot11ShortRetryLimit; -+WriteMethod write_dot11LongRetryLimit; -+WriteMethod write_dot11FragmentationThreshold; -+WriteMethod write_dot11MaxTransmitMSDULifetime; -+WriteMethod write_dot11MaxReceiveLifetime; -+WriteMethod write_dot11Address; -+WriteMethod write_dot11GroupAddressesStatus; -+WriteMethod write_dot11CurrentRegDomain; -+WriteMethod write_dot11CurrentTxAntenna; -+WriteMethod write_dot11CurrentRxAntenna; -+WriteMethod write_dot11CurrentTxPowerLevel; -+WriteMethod write_dot11CurrentChannelNumber; -+WriteMethod write_dot11CurrentDwellTime; -+WriteMethod write_dot11CurrentSet; -+WriteMethod write_dot11CurrentPattern; -+WriteMethod write_dot11CurrentIndex; -+WriteMethod write_dot11CurrentChannel; -+WriteMethod write_dot11CurrentCCAMode; -+WriteMethod write_dot11EDThreshold; -+WriteMethod write_dot11CCAWatchdogTimerMax; -+WriteMethod write_dot11CCAWatchdogCountMax; -+WriteMethod write_dot11CCAWatchdogTimerMin; -+WriteMethod write_dot11CCAWatchdogCountMin; -+WriteMethod write_dot11SupportedTxAntenna; -+WriteMethod write_dot11SupportedRxAntenna; -+WriteMethod write_dot11DiversitySelectionRx; -+ -+#endif /* _MIBGROUP_IEEE802DOT11_H */ ---- net-snmp-5.1.2-orig/agent/mibgroup/iwlib.h 1970-01-01 01:00:00.000000000 +0100 -+++ net-snmp-5.1.2-5/agent/mibgroup/iwlib.h 2005-03-13 16:17:21.000000000 +0100 -@@ -0,0 +1,502 @@ -+/* -+ * Wireless Tools -+ * -+ * Jean II - HPLB 97->99 - HPL 99->02 -+ * -+ * Common header for the Wireless Extension library... -+ * -+ * This file is released under the GPL license. -+ * Copyright (c) 1997-2002 Jean Tourrilhes -+ */ -+ -+#ifndef IWLIB_H -+#define IWLIB_H -+ -+/*#include "CHANGELOG.h"*/ -+ -+/***************************** INCLUDES *****************************/ -+ -+/* Standard headers */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include /* gethostbyname, getnetbyname */ -+#include /* struct ether_addr */ -+#include /* struct timeval */ -+#include -+ -+/* This is our header selection. Try to hide the mess and the misery :-( -+ * Don't look, you would go blind ;-) */ -+ -+#ifndef LINUX_VERSION_CODE -+#include -+#endif -+ -+/* Kernel headers 2.4.X + Glibc 2.2 - Mandrake 8.0, Debian 2.3, RH 7.1 -+ * Kernel headers 2.2.X + Glibc 2.2 - Slackware 8.0 */ -+#if defined(__GLIBC__) \ -+ && __GLIBC__ == 2 \ -+ && __GLIBC_MINOR__ >= 2 \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) -+//#define GLIBC22_HEADERS -+#define GENERIC_HEADERS -+ -+/* Kernel headers 2.4.X + Glibc 2.1 - Debian 2.2 upgraded, RH 7.0 -+ * Kernel headers 2.2.X + Glibc 2.1 - Debian 2.2, RH 6.1 */ -+#elif defined(__GLIBC__) \ -+ && __GLIBC__ == 2 \ -+ && __GLIBC_MINOR__ == 1 \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) -+//#define GLIBC_HEADERS -+#define GENERIC_HEADERS -+ -+/* Kernel headers 2.2.X + Glibc 2.0 - Debian 2.1 */ -+#elif defined(__GLIBC__) \ -+ && __GLIBC__ == 2 \ -+ && __GLIBC_MINOR__ == 0 \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) \ -+ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) -+#define GLIBC_HEADERS -+#define KLUDGE_HEADERS -+ -+/* Note : is it really worth supporting kernel 2.0.X, knowing that -+ * we require WE v9, which is only available in 2.2.X and higher ? -+ * I guess one could use 2.0.x with an upgraded wireless.h... */ -+ -+/* Kernel headers 2.0.X + Glibc 2.0 - Debian 2.0, RH 5 */ -+#elif defined(__GLIBC__) \ -+ && __GLIBC__ == 2 \ -+ && __GLIBC_MINOR__ == 0 \ -+ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) -+#define GLIBC_HEADERS -+ -+/* Kernel headers 2.0.X + libc5 - old systems */ -+#elif defined(_LINUX_C_LIB_VERSION_MAJOR) \ -+ && _LINUX_C_LIB_VERSION_MAJOR == 5 \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) \ -+ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) -+#define LIBC5_HEADERS -+ -+/* Unsupported combination */ -+#else -+#error "Your kernel/libc combination is not supported" -+#endif -+ -+#ifdef GENERIC_HEADERS -+/* Proposed by Dr. Michael Rietz , 27.3.2 */ -+/* If this works for all, it might be more stable on the long term - Jean II */ -+#include /* For ARPHRD_ETHER */ -+#include /* For AF_INET & struct sockaddr */ -+#include /* For struct sockaddr_in */ -+#include -+#endif /* GENERIC_HEADERS */ -+ -+#ifdef GLIBC22_HEADERS -+/* Added by Ross G. Miller , 3/28/01 */ -+#include /* For ARPHRD_ETHER */ -+#include /* For AF_INET & struct sockaddr */ -+#include -+#endif /* GLIBC22_HEADERS */ -+ -+#ifdef KLUDGE_HEADERS -+#include -+#endif /* KLUDGE_HEADERS */ -+ -+#ifdef GLIBC_HEADERS -+#include /* For ARPHRD_ETHER */ -+#include /* For AF_INET & struct sockaddr */ -+#include /* For struct sockaddr_in */ -+#endif /* KLUDGE_HEADERS || GLIBC_HEADERS */ -+ -+#ifdef LIBC5_HEADERS -+#include /* For AF_INET & struct sockaddr & socket() */ -+#include /* For ARPHRD_ETHER */ -+#include /* For struct sockaddr_in */ -+#endif /* LIBC5_HEADERS */ -+ -+/* Those 3 headers were previously included in wireless.h */ -+#include /* for "caddr_t" et al */ -+#include /* for "struct sockaddr" et al */ -+#include /* for IFNAMSIZ and co... */ -+ -+#ifdef WEXT_HEADER -+/* Private copy of Wireless extensions */ -+#include WEXT_HEADER -+#else /* !WEXT_HEADER */ -+/* System wide Wireless extensions */ -+#include -+#endif /* !WEXT_HEADER */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/****************************** DEBUG ******************************/ -+ -+ -+/************************ CONSTANTS & MACROS ************************/ -+ -+/* Paths */ -+#define PROC_NET_WIRELESS "/proc/net/wireless" -+#define PROC_NET_DEV "/proc/net/dev" -+ -+/* Some usefull constants */ -+#define KILO 1e3 -+#define MEGA 1e6 -+#define GIGA 1e9 -+/* For doing log10/exp10 without libm */ -+#define LOG10_MAGIC 1.25892541179 -+ -+/* Backward compatibility for Wireless Extension 9 */ -+#ifndef IW_POWER_MODIFIER -+#define IW_POWER_MODIFIER 0x000F /* Modify a parameter */ -+#define IW_POWER_MIN 0x0001 /* Value is a minimum */ -+#define IW_POWER_MAX 0x0002 /* Value is a maximum */ -+#define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */ -+#endif /* IW_POWER_MODIFIER */ -+ -+#ifndef IW_ENCODE_NOKEY -+#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not here */ -+#define IW_ENCODE_MODE 0xF000 /* Modes defined below */ -+#endif /* IW_ENCODE_NOKEY */ -+#ifndef IW_ENCODE_TEMP -+#define IW_ENCODE_TEMP 0x0400 /* Temporary key */ -+#endif /* IW_ENCODE_TEMP */ -+ -+/* More backward compatibility */ -+#ifndef SIOCSIWCOMMIT -+#define SIOCSIWCOMMIT SIOCSIWNAME -+#endif /* SIOCSIWCOMMIT */ -+ -+/****************************** TYPES ******************************/ -+ -+/* Shortcuts */ -+typedef struct iw_statistics iwstats; -+typedef struct iw_range iwrange; -+typedef struct iw_param iwparam; -+typedef struct iw_freq iwfreq; -+typedef struct iw_quality iwqual; -+typedef struct iw_priv_args iwprivargs; -+typedef struct sockaddr sockaddr; -+ -+/* Structure for storing all wireless information for each device -+ * This is pretty exhaustive... */ -+typedef struct wireless_info -+{ -+ char name[IFNAMSIZ + 1]; /* Wireless/protocol name */ -+ int has_nwid; -+ iwparam nwid; /* Network ID */ -+ int has_freq; -+ double freq; /* Frequency/channel */ -+ int has_sens; -+ iwparam sens; /* sensitivity */ -+ int has_key; -+ unsigned char key[IW_ENCODING_TOKEN_MAX]; /* Encoding key used */ -+ int key_size; /* Number of bytes */ -+ int key_flags; /* Various flags */ -+ int has_essid; -+ int essid_on; -+ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID (extended network) */ -+ int has_nickname; -+ char nickname[IW_ESSID_MAX_SIZE + 1]; /* NickName */ -+ int has_ap_addr; -+ sockaddr ap_addr; /* Access point address */ -+ int has_bitrate; -+ iwparam bitrate; /* Bit rate in bps */ -+ int has_rts; -+ iwparam rts; /* RTS threshold in bytes */ -+ int has_frag; -+ iwparam frag; /* Fragmentation threshold in bytes */ -+ int has_mode; -+ int mode; /* Operation mode */ -+ int has_power; -+ iwparam power; /* Power management parameters */ -+ int has_txpower; -+ iwparam txpower; /* Transmit Power in dBm */ -+ int has_retry; -+ iwparam retry; /* Retry limit or lifetime */ -+ -+ /* Stats */ -+ iwstats stats; -+ int has_stats; -+ iwrange range; -+ int has_range; -+} wireless_info; -+ -+/* Structure for storing all wireless information for each device -+ * This is a cut down version of the one above, containing only -+ * the things *truly* needed to configure a card. -+ * Don't add other junk, I'll remove it... */ -+typedef struct wireless_config -+{ -+ char name[IFNAMSIZ + 1]; /* Wireless/protocol name */ -+ int has_nwid; -+ iwparam nwid; /* Network ID */ -+ int has_freq; -+ double freq; /* Frequency/channel */ -+ int has_key; -+ unsigned char key[IW_ENCODING_TOKEN_MAX]; /* Encoding key used */ -+ int key_size; /* Number of bytes */ -+ int key_flags; /* Various flags */ -+ int has_essid; -+ int essid_on; -+ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID (extended network) */ -+ int has_mode; -+ int mode; /* Operation mode */ -+} wireless_config; -+ -+typedef struct stream_descr -+{ -+ char * end; /* End of the stream */ -+ char * current; /* Current event in stream of events */ -+ char * value; /* Current value in event */ -+} stream_descr; -+ -+/* Prototype for handling display of each single interface on the -+ * system - see iw_enum_devices() */ -+typedef int (*iw_enum_handler)(int skfd, -+ char * ifname, -+ char * args[], -+ int count); -+ -+/**************************** PROTOTYPES ****************************/ -+/* -+ * All the functions in iwcommon.c -+ */ -+ -+/* ---------------------- SOCKET SUBROUTINES -----------------------*/ -+int -+ iw_sockets_open(void); -+void -+ iw_enum_devices(int skfd, -+ iw_enum_handler fn, -+ char * args[], -+ int count); -+/* --------------------- WIRELESS SUBROUTINES ----------------------*/ -+int -+ iw_get_range_info(int skfd, -+ char * ifname, -+ iwrange * range); -+int -+ iw_print_version_info(char * toolname); -+int -+ iw_get_priv_info(int skfd, -+ char * ifname, -+ iwprivargs * priv, -+ int maxpriv); -+int -+ iw_get_basic_config(int skfd, -+ char * ifname, -+ wireless_config * info); -+int -+ iw_set_basic_config(int skfd, -+ char * ifname, -+ wireless_config * info); -+/* --------------------- PROTOCOL SUBROUTINES --------------------- */ -+int -+ iw_protocol_compare(char * protocol1, -+ char * protocol2); -+/* -------------------- FREQUENCY SUBROUTINES --------------------- */ -+void -+ iw_float2freq(double in, -+ iwfreq * out); -+double -+ iw_freq2float(iwfreq * in); -+void -+ iw_print_freq(char * buffer, -+ double freq); -+int -+ iw_freq_to_channel(double freq, -+ struct iw_range * range); -+void -+ iw_print_bitrate(char * buffer, -+ int bitrate); -+/* ---------------------- POWER SUBROUTINES ----------------------- */ -+int -+ iw_dbm2mwatt(int in); -+int -+ iw_mwatt2dbm(int in); -+/* -------------------- STATISTICS SUBROUTINES -------------------- */ -+int -+ iw_get_stats(int skfd, -+ char * ifname, -+ iwstats * stats); -+void -+ iw_print_stats(char * buffer, -+ iwqual * qual, -+ iwrange * range, -+ int has_range); -+/* --------------------- ENCODING SUBROUTINES --------------------- */ -+void -+ iw_print_key(char * buffer, -+ unsigned char * key, -+ int key_size, -+ int key_flags); -+int -+ iw_in_key(char * input, -+ unsigned char * key); -+int -+ iw_in_key_full(int skfd, -+ char * ifname, -+ char * input, -+ unsigned char * key, -+ __u16 * flags); -+/* ----------------- POWER MANAGEMENT SUBROUTINES ----------------- */ -+void -+ iw_print_pm_value(char * buffer, -+ int value, -+ int flags); -+void -+ iw_print_pm_mode(char * buffer, -+ int flags); -+/* --------------- RETRY LIMIT/LIFETIME SUBROUTINES --------------- */ -+#if WIRELESS_EXT > 10 -+void -+ iw_print_retry_value(char * buffer, -+ int value, -+ int flags); -+#endif -+/* ----------------------- TIME SUBROUTINES ----------------------- */ -+void -+ iw_print_timeval(char * buffer, -+ const struct timeval * time); -+/* --------------------- ADDRESS SUBROUTINES ---------------------- */ -+int -+ iw_check_mac_addr_type(int skfd, -+ char * ifname); -+int -+ iw_check_if_addr_type(int skfd, -+ char * ifname); -+#if 0 -+int -+ iw_check_addr_type(int skfd, -+ char * ifname); -+#endif -+void -+ iw_ether_ntop(const struct ether_addr* eth, char* buf); -+char* -+ iw_ether_ntoa(const struct ether_addr* eth); -+int -+ iw_ether_aton(const char* bufp, struct ether_addr* eth); -+int -+ iw_in_inet(char *bufp, struct sockaddr *sap); -+int -+ iw_in_addr(int skfd, -+ char * ifname, -+ char * bufp, -+ struct sockaddr * sap); -+/* ----------------------- MISC SUBROUTINES ------------------------ */ -+int -+ iw_get_priv_size(int args); -+ -+#if WIRELESS_EXT > 13 -+/* ---------------------- EVENT SUBROUTINES ---------------------- */ -+void -+ iw_init_event_stream(struct stream_descr * stream, -+ char * data, -+ int len); -+int -+ iw_extract_event_stream(struct stream_descr * stream, -+ struct iw_event * iwe); -+#endif /* WIRELESS_EXT > 13 */ -+ -+/**************************** VARIABLES ****************************/ -+ -+extern const char * const iw_operation_mode[]; -+#define IW_NUM_OPER_MODE 7 -+ -+/************************* INLINE FUNTIONS *************************/ -+/* -+ * Functions that are so simple that it's more efficient inlining them -+ */ -+ -+/* -+ * Note : I've defined wrapper for the ioctl request so that -+ * it will be easier to migrate to other kernel API if needed -+ */ -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Wrapper to push some Wireless Parameter in the driver -+ */ -+static inline int -+iw_set_ext(int skfd, /* Socket to the kernel */ -+ char * ifname, /* Device name */ -+ int request, /* WE ID */ -+ struct iwreq * pwrq) /* Fixed part of the request */ -+{ -+ /* Set device name */ -+ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); -+ /* Do the request */ -+ return(ioctl(skfd, request, pwrq)); -+} -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Wrapper to extract some Wireless Parameter out of the driver -+ */ -+static inline int -+iw_get_ext(int skfd, /* Socket to the kernel */ -+ char * ifname, /* Device name */ -+ int request, /* WE ID */ -+ struct iwreq * pwrq) /* Fixed part of the request */ -+{ -+ /* Set device name */ -+ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); -+ /* Do the request */ -+ return(ioctl(skfd, request, pwrq)); -+} -+ -+/*------------------------------------------------------------------*/ -+/* Backwards compatability -+ * Actually, those form are much easier to use when dealing with -+ * struct sockaddr... */ -+static inline char* -+iw_pr_ether(char* bufp, const unsigned char* addr) -+{ -+ iw_ether_ntop((const struct ether_addr *) addr, bufp); -+ return bufp; -+} -+/* Backwards compatability */ -+static inline int -+iw_in_ether(const char *bufp, struct sockaddr *sap) -+{ -+ sap->sa_family = ARPHRD_ETHER; -+ return iw_ether_aton(bufp, (struct ether_addr *) sap->sa_data) ? 0 : -1; -+} -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Create an Ethernet broadcast address -+ */ -+static inline void -+iw_broad_ether(struct sockaddr *sap) -+{ -+ sap->sa_family = ARPHRD_ETHER; -+ memset((char *) sap->sa_data, 0xFF, ETH_ALEN); -+} -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Create an Ethernet NULL address -+ */ -+static inline void -+iw_null_ether(struct sockaddr *sap) -+{ -+ sap->sa_family = ARPHRD_ETHER; -+ memset((char *) sap->sa_data, 0x00, ETH_ALEN); -+} -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* IWLIB_H */ diff --git a/openwrt/package/net-snmp/patches/901-ipsec-interfaces.patch b/openwrt/package/net-snmp/patches/901-ipsec-interfaces.patch deleted file mode 100644 index 886f37af75c..00000000000 --- a/openwrt/package/net-snmp/patches/901-ipsec-interfaces.patch +++ /dev/null @@ -1,44 +0,0 @@ -Date: Tue, 14 Jun 2005 00:39:54 +0200 -From: Alexander Holler -To: nthill@free.fr -Subject: Patch for libsnmp (openwrt) to work with ipsec-if -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 7bit - -Hello, - -I've a small patch for net-snmp (5.1.2) which is needed to work with -ipsec-interfaces. Otherwise snmpd will segfault which means snmp is not -really usable. - -The patch is from me, but the source for the fault is from: - -http://lists.openswan.org/pipermail/users/2004-August/001773.html - -It works, because this email is going out over ipsec using a -snmp-monitored wrt54g. ;) - - ---- net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c.orig 2005-06-14 00:41:16.000000000 +0200 -+++ net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c 2005-06-14 03:21:35.000000000 +0200 -@@ -1438,8 +1438,10 @@ - - if (ioctl(fd, 0x8947, &ifr) >= 0) { - new_ioctl_nums = 1; -+/* - } else if (ioctl(fd, SIOCDEVPRIVATE, &ifr) >= 0) { - new_ioctl_nums = 0; -+*/ - } else { - DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIPHY on %s failed\n", ifr.ifr_name)); - return retspeed; -@@ -1449,7 +1451,8 @@ - for (mii_reg = 0; mii_reg < 8; mii_reg++){ - data[0] = phy_id; - data[1] = mii_reg; -- if(ioctl(fd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) <0){ -+/* if(ioctl(fd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) <0){ */ -+ if(ioctl(fd, 0x8948, &ifr) <0){ - DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIREG on %s failed\n", ifr.ifr_name)); - } - mii_val[mii_reg] = data[3]; diff --git a/openwrt/package/netperf/Config.in b/openwrt/package/netperf/Config.in deleted file mode 100644 index 6d642fb0f76..00000000000 --- a/openwrt/package/netperf/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_NETPERF - prompt "netperf........................... network performance measurement tool" - tristate - default m if CONFIG_DEVEL - help - Program and service to do network performance measurement. diff --git a/openwrt/package/netperf/Makefile b/openwrt/package/netperf/Makefile deleted file mode 100644 index 59642f0d23b..00000000000 --- a/openwrt/package/netperf/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=netperf -PKG_VERSION:=2.3pl1 -PKG_RELEASE:=1 -PKG_MD5SUM:=b74314d78af31cb13516fb9a372d2e86 - -PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/archive/ \ - ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,NETPERF,netperf,$(PKG_VERSION)$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - TARGET_NETPERF_HOME="/etc/netperf.conf" \ - TARGET_CC=$(TARGET_CROSS)gcc \ - TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - TARGET_LIBS="" \ - all - touch $@ - -$(IPKG_NETPERF): - install -d -m0755 $(IDIR_NETPERF)/etc/init.d - install -m0755 ./files/netserver.init $(IDIR_NETPERF)/etc/init.d/S51netserver - install -d -m0755 $(IDIR_NETPERF)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/netperf $(IDIR_NETPERF)/usr/bin/ - install -m0755 $(PKG_BUILD_DIR)/netserver $(IDIR_NETPERF)/usr/bin/ - $(RSTRIP) $(IDIR_NETPERF) - $(IPKG_BUILD) $(IDIR_NETPERF) $(PACKAGE_DIR) diff --git a/openwrt/package/netperf/files/netserver.init b/openwrt/package/netperf/files/netserver.init deleted file mode 100644 index 2900b570ae7..00000000000 --- a/openwrt/package/netperf/files/netserver.init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -test -n "$FAILSAFE" && exit -/usr/bin/netserver diff --git a/openwrt/package/netperf/ipkg/netperf.control b/openwrt/package/netperf/ipkg/netperf.control deleted file mode 100644 index d34dd495db3..00000000000 --- a/openwrt/package/netperf/ipkg/netperf.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: netperf -Priority: optional -Version: 2.3pl1 -Section: network -Architecture: mipsel -Maintainer: Barnabas Kalman -Source: ftp://ftp.cup.hp.com/dist/networking/benchmarks/ -Description: Program and service to do network performance measurement. - diff --git a/openwrt/package/netperf/patches/01-netperf-2.3pl1-openwrt.patch b/openwrt/package/netperf/patches/01-netperf-2.3pl1-openwrt.patch deleted file mode 100644 index b83ca1167c5..00000000000 --- a/openwrt/package/netperf/patches/01-netperf-2.3pl1-openwrt.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- netperf-2.3pl1.orig/makefile 2004-09-21 23:33:40.000000000 +0200 -+++ netperf-2.3pl1/makefile 2005-12-30 15:35:08.924238576 +0100 -@@ -15,8 +15,7 @@ - # for the rest of the world, it is probably better to put the binaries - # in /usr/local/netperf or /opt/netperf - # --#NETPERF_HOME = /usr/local/netperf --NETPERF_HOME = /opt/netperf -+NETPERF_HOME = $(TARGET_NETPERF_HOME) - - # The compiler on your system might be somewhere else, and/or have - # a different name. -@@ -40,7 +39,7 @@ - # You may safely ignore that warning. - # - --CC = cc -+CC = $(TARGET_CC) - - # Adding flags to CFLAGS enables some non-mainline features. For - # more information, please consult the source code. -@@ -113,7 +112,7 @@ - # netserver via the netperf command line with -T - - LOG_FILE=DEBUG_LOG_FILE="\"/tmp/netperf.debug\"" --CFLAGS = -O -D$(LOG_FILE) -DNEED_MAKEFILE_EDIT -+CFLAGS = -D$(LOG_FILE) $(TARGET_CFLAGS) - - # Some platforms, and some options, require additional libraries. - # you can add to the "LIBS =" line to accomplish this. if you find -@@ -136,7 +135,7 @@ - # -lresolv - required for -DDO_DNS on RedHat 7.1 - # -lsocket -lbind - required for Zeta OS - --LIBS= -lm -+LIBS= -lm $(TARGET_LIBS) - - # --------------------------------------------------------------- - # it should not be the case that anything below this line needs to diff --git a/openwrt/package/netstat-nat/Config.in b/openwrt/package/netstat-nat/Config.in deleted file mode 100644 index 26a60cda58c..00000000000 --- a/openwrt/package/netstat-nat/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_NETSTAT_NAT - prompt "netstat-nat....................... A netstat variant for NAT connections" - tristate - default m if CONFIG_DEVEL - help - Netstat-nat is a small program written in C. - It displays NAT connections, managed by netfilter/iptables which comes - with the > 2.4.x linux kernels. - The program reads its information from '/proc/net/ip_conntrack', which - is the temporary conntrack-storage of netfilter. - - http://tweegy.demon.nl/projects/netstat-nat/ - diff --git a/openwrt/package/netstat-nat/Makefile b/openwrt/package/netstat-nat/Makefile deleted file mode 100644 index 3e0ab204c7e..00000000000 --- a/openwrt/package/netstat-nat/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=netstat-nat -PKG_VERSION:=1.4.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=ccf71a6cbd9a513ea3adec54b54ee770 - -PKG_SOURCE_URL:=http://tweegy.demon.nl/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,NETSTAT-NAT,netstat-nat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_NETSTAT-NAT): - install -d -m0755 $(IDIR_NETSTAT-NAT)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/netstat-nat $(IDIR_NETSTAT-NAT)/usr/bin/ - $(RSTRIP) $(IDIR_NETSTAT-NAT) - $(IPKG_BUILD) $(IDIR_NETSTAT-NAT) $(PACKAGE_DIR) - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/netstat-nat/ipkg/netstat-nat.control b/openwrt/package/netstat-nat/ipkg/netstat-nat.control deleted file mode 100644 index dea7d633dfa..00000000000 --- a/openwrt/package/netstat-nat/ipkg/netstat-nat.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: netstat-nat -Priority: optional -Section: net -Description: a netstat variant for NAT connections - Netstat-nat displays NAT connections, managed by netfilter/iptables which - comes with the > 2.4.x linux kernels. - diff --git a/openwrt/package/nfs-server/Config.in b/openwrt/package/nfs-server/Config.in deleted file mode 100644 index bbc90561b29..00000000000 --- a/openwrt/package/nfs-server/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_NFS_SERVER - prompt "nfs-server........................ User Space NFS server" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_PORTMAP - help - User Space NFS Server - diff --git a/openwrt/package/nfs-server/Makefile b/openwrt/package/nfs-server/Makefile deleted file mode 100644 index 32bad9b82a7..00000000000 --- a/openwrt/package/nfs-server/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nfs-server -PKG_VERSION:=2.2beta47 -PKG_RELEASE:=1 -PKG_MD5SUM:=79a29fe9f79b2f3241d4915767b8c511 - -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/n/nfs-user-server -PKG_SOURCE:=nfs-user-server_$(PKG_VERSION).orig.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,NFS_SERVER,nfs-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_NFS_SERVER): - install -d -m0755 $(IDIR_NFS_SERVER)/etc - install -m0644 ./files/nfsd.exports $(IDIR_NFS_SERVER)/etc/exports - install -d -m0755 $(IDIR_NFS_SERVER)/etc/init.d - install -m0755 ./files/nfsd.init $(IDIR_NFS_SERVER)/etc/init.d/S60nfsd - install -d -m0755 $(IDIR_NFS_SERVER)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/rpc.* $(IDIR_NFS_SERVER)/usr/sbin/ - $(RSTRIP) $(IDIR_NFS_SERVER) - $(IPKG_BUILD) $(IDIR_NFS_SERVER) $(PACKAGE_DIR) diff --git a/openwrt/package/nfs-server/files/nfsd.exports b/openwrt/package/nfs-server/files/nfsd.exports deleted file mode 100644 index 75a387a4874..00000000000 --- a/openwrt/package/nfs-server/files/nfsd.exports +++ /dev/null @@ -1 +0,0 @@ -/mnt (ro,all_squash,insecure) diff --git a/openwrt/package/nfs-server/files/nfsd.init b/openwrt/package/nfs-server/files/nfsd.init deleted file mode 100644 index 1b1e1bd3aad..00000000000 --- a/openwrt/package/nfs-server/files/nfsd.init +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -/usr/sbin/portmap -/usr/sbin/rpc.mountd -r -/usr/sbin/rpc.nfsd diff --git a/openwrt/package/nfs-server/ipkg/nfs-server.control b/openwrt/package/nfs-server/ipkg/nfs-server.control deleted file mode 100644 index 7ba86415833..00000000000 --- a/openwrt/package/nfs-server/ipkg/nfs-server.control +++ /dev/null @@ -1,14 +0,0 @@ -Package: nfs-server -Section: net -Priority: optional -Depends: portmap -Description: User space NFS server - This package contains all necessary programs to make your Linux machine act - as an NFS server, being an NFS daemon (rpc.nfsd), a mount daemon (rpc.mountd). - . - Unlike other NFS daemons, this NFS server runs entirely in user space. This - makes it a tad slower than other NFS implementations, and also introduces - some awkwardnesses in the semantics (for instance, moving a file to a - different directory will render its file handle invalid). - . - There is currently no support for file locking. diff --git a/openwrt/package/nfs-server/patches/build-config.patch b/openwrt/package/nfs-server/patches/build-config.patch deleted file mode 100644 index 5aa1cde636c..00000000000 --- a/openwrt/package/nfs-server/patches/build-config.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- nfs-server-2.2beta47.old/site.mk 1970-01-01 01:00:00.000000000 +0100 -+++ nfs-server-2.2beta47/site.mk 2005-03-24 22:42:20.000000000 +0100 -@@ -0,0 +1,11 @@ -+# -+# Site-specific make options generated by BUILD. Please do not edit. -+# -+ -+# ugidd support -+UGIDD_PROG= -+UGIDD_MAN= -+# Location of tcp_wrapper library -+LIBWRAP_DIR=-L/usr/share/stuff/src/openwrt/experimental/buildroot/build_mipsel/staging_dir/lib -+LIBWRAP_LIB=-lwrap -+DEVTAB_FILE= ---- nfs-server-2.2beta47.old/site.h 1970-01-01 01:00:00.000000000 +0100 -+++ nfs-server-2.2beta47/site.h 2005-03-24 22:44:19.000000000 +0100 -@@ -0,0 +1,50 @@ -+/* -+ * Site-specific configuration options generated by BUILD. -+ * Please do not edit. -+ */ -+ -+/* -+ * If ENABLE_DEVTAB is defined, nfsd will use the new inode -+ * number generation scheme for avoiding inode number clashes -+ * on big hard disks. -+ */ -+/* #undef ENABLE_DEVTAB */ -+ -+/* -+ * If MULTIPLE_SERVER_READWRITE is defined, you will be able -+ * to run several nfsd process in parallel servicing all NFS -+ * requests. -+ */ -+#define MULTIPLE_SERVERS_READWRITE -+ -+/* -+ * If ENABLE_UGID_DAEMON is defined, the real rpc.ugidd is built, -+ * nfsd is built to support ugidd queries. -+ * Otherwise, a dummy program is created -+ */ -+/* #undef ENABLE_UGID_DAEMON */ -+ -+/* -+ * If ENABLE_UGID_NIS is defined, nfsd will support user mapping -+ * vie the client's NIS server. -+ */ -+/* #undef ENABLE_UGID_NIS */ -+ -+/* -+ * if HOSTS_ACCESS is defined, ugidd uses host access control -+ * provided by libwrap.a from tcp_wrappers -+ */ -+#define HOSTS_ACCESS -+ -+/* -+ * Define correct ownership of export control file -+ */ -+#define EXPORTSOWNERUID ((uid_t) 0) -+#define EXPORTSOWNERGID ((gid_t) 0) -+ -+/* -+ * If WANT_LOG_MOUNTS is defined, every mount request will be logged -+ * to syslogd with the name of source site and a path that was -+ * it requested -+ */ -+#define WANT_LOG_MOUNTS diff --git a/openwrt/package/nfs-server/patches/cross-compile-fix.patch b/openwrt/package/nfs-server/patches/cross-compile-fix.patch deleted file mode 100644 index 646a34a9ab2..00000000000 --- a/openwrt/package/nfs-server/patches/cross-compile-fix.patch +++ /dev/null @@ -1,149 +0,0 @@ -diff -urN nfs-server-2.2beta47.old/configure nfs-server-2.2beta47/configure ---- nfs-server-2.2beta47.old/configure 1999-06-11 12:06:04.000000000 +0200 -+++ nfs-server-2.2beta47/configure 2005-03-24 22:24:39.000000000 +0100 -@@ -1960,7 +1960,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - else - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext < - - #ifdef HAVE_SYSLOG_H - #include ---- nfs-server-2.2beta47.old/fh.c 1999-11-10 10:41:14.000000000 +0100 -+++ nfs-server-2.2beta47/fh.c 2005-03-24 22:50:50.000000000 +0100 -@@ -50,6 +50,7 @@ - */ - - #include -+#include - #include "nfsd.h" - #include "rpcmisc.h" - #include "signals.h" -@@ -350,7 +351,7 @@ - #ifndef ENABLE_DEVTAB - psi_t dmajor, dminor; - --#if SIZEOF_DEV_T == 4 -+#if (SIZEOF_DEV_T == 4) - /* This folds the upper 16 bits into bits 8..15, and - * the lower 16 bits into bits 0..7 - */ ---- nfs-server-2.2beta47.old/ugid_map.c 2005-03-24 22:34:56.000000000 +0100 -+++ nfs-server-2.2beta47/ugid_map.c 2005-03-24 22:54:00.000000000 +0100 -@@ -34,14 +34,8 @@ - #define UGID_CHUNK0_BYTES (UGID_CHUNK * sizeof(idmap_t)) - #define UGID_EXPIRE 300 /* 5 minutes */ - --/* -- * Make sure we get the right size for ugid_t -- */ --#if SIZEOF_UID_T != SIZEOF_GID_T --#error Sorry, this code relies on sizeof(uid_t) == sizeof(gid_t) --#endif - --#define UGID_BITS (SIZEOF_UID_T * BITSPERBYTE) -+#define UGID_BITS (sizeof(uid_t) * BITSPERBYTE) - #define BITSTOLEVEL(b) ((UGID_BITS - (b)) / UGID_CHUNK_BITS - 1) - #define UGID_LOWER(id, b) ((id) & ~((1 << (b)) - 1)) - #define UGID_UPPER(id, b) (((id + (1 << (b))) & ~((1 << (b)) - 1))-1) diff --git a/openwrt/package/nfs-server/patches/debian-subset.patch b/openwrt/package/nfs-server/patches/debian-subset.patch deleted file mode 100644 index 2ac3f93d46f..00000000000 --- a/openwrt/package/nfs-server/patches/debian-subset.patch +++ /dev/null @@ -1,698 +0,0 @@ ---- nfs-user-server-2.2beta47.orig/BUILD -+++ nfs-user-server-2.2beta47/BUILD -@@ -48,7 +48,7 @@ - shift - done - --function read_yesno { -+read_yesno() { - ans="" - echo >&2 - default=$2 -@@ -84,7 +84,7 @@ - echo $ans - } - --function read_ugid { -+read_ugid() { - ans="" - prompt="$2 [default $3 $4] " - default=$3 -@@ -145,7 +145,7 @@ - - if ! $batch; then - echo -n "Please press return to continue" -- read -+ read ans - fi - - version=`cat .version` ---- nfs-user-server-2.2beta47.orig/Makefile.in -+++ nfs-user-server-2.2beta47/Makefile.in -@@ -95,20 +95,20 @@ - LIBSRCS = fileblocks.c fsusage.c realpath.c strerror.c \ - utimes.c mkdir.c rename.c getopt.c getopt_long.c \ - alloca.c mountlist.c xmalloc.c \ -- xstrdup.c strdup.c strstr.c nfsmounted.c faccess.c \ -+ xstrdup.c strdup.c strstr.c nfsmounted.c \ - haccess.c failsafe.c signals.c - XDRFILES = mount.x nfs_prot.x - GENFILES = mount.h mount_xdr.c mount_svc.c nfs_prot.h nfs_prot_xdr.c \ - ugid.h ugid_xdr.c ugid_clnt.c - HDRS = system.h nfsd.h auth.h fh.h logging.h fakefsuid.h \ -- rpcmisc.h faccess.h rquotad.h rquota.h haccess.h -+ rpcmisc.h rquotad.h rquota.h haccess.h - LIBHDRS = fsusage.h getopt.h mountlist.h failsafe.h signals.h - MANPAGES5 = exports - MANPAGES8p = mountd nfsd $(UGIDD_MAN) - MANPAGES8 = showmount - MANPAGES = $(MANPAGES5) $(MANPAGES8p) $(MANPAGES8) - LIBOBJS = version.o fsusage.o mountlist.o xmalloc.o xstrdup.o \ -- nfsmounted.o faccess.o haccess.o failsafe.o \ -+ nfsmounted.o haccess.o failsafe.o \ - signals.o @LIBOBJS@ @ALLOCA@ - OBJS = logging.o fh.o devtab.o auth_init.o auth_clnt.o auth.o - NFSD_OBJS = nfsd.o rpcmisc.o nfs_dispatch.o getattr.o setattr.o \ -@@ -116,7 +116,7 @@ - MOUNTD_OBJS = mountd.o rpcmisc.o mount_dispatch.o mount_xdr.o rmtab.o \ - $(OBJS) - SHOWMOUNT_OBJS = showmount.o mount_xdr.o --UGIDD_OBJS = ugidd.o ugid_xdr.o logging.o -+UGIDD_OBJS = ugidd.o ugid_xdr.o logging.o rpcmisc.o - DAEMONS = $(rpcprefix)mountd $(rpcprefix)nfsd $(UGIDD_PROG) - CLIENTS = showmount - ---- nfs-user-server-2.2beta47.orig/auth.c -+++ nfs-user-server-2.2beta47/auth.c -@@ -143,6 +143,21 @@ - return okay; - } - -+static inline int -+auth_atob(const char *name, struct in_addr *ap) -+{ -+ int m; -+ -+ if (!isdigit(*name)) -+ return 0; -+ for (m = 0; isdigit(*name); name++) -+ m = m * 10 + (unsigned char) *name - '0'; -+ if (m > 32) -+ return 0; -+ ap->s_addr = m ? ~((1 << (32 - m)) - 1) : 0; -+ return 1; -+} -+ - /* - * Get a client entry for a specific name or pattern. - * If necessary, this function performs a hostname lookup to -@@ -614,7 +629,9 @@ - if (auth_aton(hname, &haddr, &ename)) { - if (*ename == '\0') - is_hostaddr = 1; -- else if (*ename == '/' && auth_aton(ename+1, &hmask, NULL)) -+ else if (*ename == '/' && -+ (auth_aton(ename+1, &hmask, NULL) || -+ auth_atob(ename+1, &hmask))) - is_netmask = 1; - } - is_special = is_wildcard + is_netgroup + is_netmask; ---- nfs-user-server-2.2beta47.orig/auth_init.c -+++ nfs-user-server-2.2beta47/auth_init.c -@@ -23,6 +23,7 @@ - #define EXPORTSFILE "/etc/exports" - #endif - -+#if 0 - /* Support for file access control on /etc/exports by Alex Yuriev. */ - #include "faccess.h" - #ifndef EXPORTSOWNERUID -@@ -31,6 +32,7 @@ - #ifndef EXPORTSOWNERGID - #define EXPORTSOWNERGID ((gid_t) 0) - #endif -+#endif - - exportnode * export_list = NULL; - int allow_non_root = 0; -@@ -395,6 +397,7 @@ - auth_file = fname; /* Save for re-initialization */ - - /* Check protection of exports file. */ -+#if 0 /* A man's house is his castle. */ - switch(iCheckAccess(auth_file, EXPORTSOWNERUID, EXPORTSOWNERGID)) { - case FACCESSWRITABLE: - Dprintf(L_ERROR, -@@ -409,6 +412,7 @@ - Dprintf(L_ERROR, "exiting because of security violation.\n"); - exit(1); - } -+#endif - - if ((ef = fopen(fname, "r")) == NULL) { - Dprintf(L_ERROR, "Could not open exports file %s: %s\n", -@@ -468,7 +472,7 @@ - - /* Build the RPC mount export list data structure. */ - resex = (exportnode *) xmalloc(sizeof *resex); -- resex->ex_dir = mount_point; -+ resex->ex_dir = xstrdup(path); - resex->ex_groups = NULL; - - #ifndef NEW_STYLE_EXPORTS_FILE ---- nfs-user-server-2.2beta47.orig/configure.in -+++ nfs-user-server-2.2beta47/configure.in -@@ -53,7 +53,7 @@ - AC_CHECK_LIB(crypt, main) - AC_CHECK_LIB(nys, main) - AC_REPLACE_FUNCS(strerror realpath mkdir rename utimes strdup strstr getopt getopt_long) --AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred) -+AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred strsignal) - AC_AUTHDES_GETUCRED - AC_BROKEN_SETFSUID - AC_MOUNTLIST ---- nfs-user-server-2.2beta47.orig/exports.man -+++ nfs-user-server-2.2beta47/exports.man -@@ -8,7 +8,7 @@ - The file - .I /etc/exports - serves as the access control list for file systems which may be --exported to NFS clients. It it used by both the NFS mount daemon, -+exported to NFS clients. It is used by both the NFS mount daemon, - .IR mountd (8) - and the NFS file server daemon - .IR nfsd (8). -@@ -75,11 +75,12 @@ - off, specify - .IR insecure . - .TP -+.IR ro -+Disallow the client to modify files and directories. The client is only -+allowed to issue read-only requests. -+.TP - .IR rw --Allow the client to modify files and directories. The default is to --restrict the client to read-only request, which can be made explicit --by using the --.IR ro " option. -+Allow the client to modify files and directories. This is the default. - .TP - .I noaccess - This makes everything below the directory inaccessible for the named -@@ -98,6 +99,14 @@ - .TP - .IR link_absolute - Leave all symbolic link as they are. This is the default operation. -+.SS Anonymous Entries -+.PP -+Entries where hosts are not specified are known as anonymous entries. They -+have different default settings compared to normal entries. The differences -+include -+.IR all_squash , -+.IR no_secure ", and" -+.IR ro . - .SS User ID Mapping - .PP - .I nfsd ---- nfs-user-server-2.2beta47.orig/failsafe.c -+++ nfs-user-server-2.2beta47/failsafe.c -@@ -10,8 +10,12 @@ - #include "logging.h" - #include "signals.h" - #include -+#ifdef HAVE_STRSIGNAL -+#include -+#else - - static const char * get_signame(int signo); -+#endif - - void - failsafe(int level, int ncopies) -@@ -111,9 +115,17 @@ - pid, running? "Continue" : "Exit"); - } else { - Dprintf(L_WARNING, "failsafe: " -+#ifdef HAVE_STRSIGNAL -+ "child %d terminated by: %s. " -+#else - "child %d terminated by %s. " -+#endif - "Restarting.", -+#ifdef HAVE_STRSIGNAL -+ pid, strsignal(signo)); -+#else - pid, get_signame(signo)); -+#endif - child = -1; /* Restart */ - } - } else if (WIFEXITED(status)) { -@@ -159,6 +171,7 @@ - /* NOP */ - } - -+#ifndef HAVE_STRSIGNAL - static const char * - get_signame(int signo) - { -@@ -199,3 +212,4 @@ - sprintf(namebuf, "signal #%d", signo); - return namebuf; - } -+#endif ---- nfs-user-server-2.2beta47.orig/mount_dispatch.c -+++ nfs-user-server-2.2beta47/mount_dispatch.c -@@ -131,7 +131,7 @@ - dent = &dtbl[proc_index]; - - memset(&argument, 0, dent->arg_size); -- if (!svc_getargs(transp, (xdrproc_t) dent->xdr_argument, &argument)) { -+ if (!svc_getargs(transp, (xdrproc_t) dent->xdr_argument, (caddr_t) &argument)) { - svcerr_decode(transp); - goto done; - } -@@ -148,7 +148,7 @@ - if (!svc_sendreply(transp, dent->xdr_result, (caddr_t) resp)) { - svcerr_systemerr(transp); - } -- if (!svc_freeargs(transp, (xdrproc_t) dent->xdr_argument, &argument)) { -+ if (!svc_freeargs(transp, (xdrproc_t) dent->xdr_argument, (caddr_t) &argument)) { - Dprintf(L_ERROR, "unable to free RPC arguments, exiting\n"); - exit(1); - } ---- nfs-user-server-2.2beta47.orig/mount_xdr.c -+++ nfs-user-server-2.2beta47/mount_xdr.c -@@ -190,7 +190,7 @@ - xdr_ppathcnf(XDR *xdrs, ppathcnf *objp) - { - -- register long *buf=buf; -+ int32_t *buf=buf; - - int i=i; - ---- nfs-user-server-2.2beta47.orig/mountd.c -+++ nfs-user-server-2.2beta47/mountd.c -@@ -310,6 +310,7 @@ - int c; - - program_name = argv[0]; -+ chdir("/"); - - /* Parse the command line options and arguments. */ - opterr = 0; ---- nfs-user-server-2.2beta47.orig/nfs_dispatch.c -+++ nfs-user-server-2.2beta47/nfs_dispatch.c -@@ -147,7 +147,7 @@ - nfsclient = NULL; - - memset(&argument, 0, dent->arg_size); -- if (!svc_getargs(transp, (xdrproc_t) dent->xdr_argument, &argument)) { -+ if (!svc_getargs(transp, (xdrproc_t) dent->xdr_argument, (caddr_t) &argument)) { - svcerr_decode(transp); - goto done; - } -@@ -173,7 +173,7 @@ - svc_sendreply(transp, dent->xdr_result, (caddr_t) &result); - #endif - -- if (!svc_freeargs(transp, (xdrproc_t) dent->xdr_argument, &argument)) { -+ if (!svc_freeargs(transp, (xdrproc_t) dent->xdr_argument, (caddr_t) &argument)) { - Dprintf(L_ERROR, "unable to free RPC arguments, exiting\n"); - exit(1); - } ---- nfs-user-server-2.2beta47.orig/nfs_prot_xdr.c -+++ nfs-user-server-2.2beta47/nfs_prot_xdr.c -@@ -98,7 +98,7 @@ - xdr_fattr(XDR *xdrs, fattr *objp) - { - -- register long *buf=buf; -+ int32_t *buf=buf; - - - if (xdrs->x_op == XDR_ENCODE) { -@@ -273,7 +273,7 @@ - xdr_sattr(XDR *xdrs, sattr *objp) - { - -- register long *buf=buf; -+ int32_t *buf=buf; - - - if (xdrs->x_op == XDR_ENCODE) { -@@ -553,7 +553,7 @@ - xdr_writeargs(XDR *xdrs, writeargs *objp) - { - -- register long *buf = buf; -+ int32_t *buf = buf; - - - if (xdrs->x_op == XDR_ENCODE) { -@@ -777,7 +777,7 @@ - xdr_statfsokres(XDR *xdrs, statfsokres *objp) - { - -- register long *buf=buf; -+ int32_t *buf=buf; - - - if (xdrs->x_op == XDR_ENCODE) { ---- nfs-user-server-2.2beta47.orig/nfsd.c -+++ nfs-user-server-2.2beta47/nfsd.c -@@ -36,6 +36,7 @@ - #define CHK_READ 0 - #define CHK_WRITE 1 - #define CHK_NOACCESS 2 -+#define CHK_ROOT 4 - - /* Make larger reads possible. Without crashing the machine :-) */ - #undef NFS_MAXDATA -@@ -173,7 +174,8 @@ - return NULL; - } - -- auth_user(nfsmount, rqstp); -+ if (!(flags & CHK_ROOT) || strcmp(nfsmount->path, fhc->path)) -+ auth_user(nfsmount, rqstp); - - *statp = NFS_OK; - return fhc; -@@ -244,7 +246,7 @@ - nfsstat status; - fhcache *fhc; - -- fhc = auth_fh(rqstp, argp, &status, CHK_READ); -+ fhc = auth_fh(rqstp, argp, &status, CHK_READ | CHK_ROOT); - if (fhc == NULL) - return status; - -@@ -575,7 +577,12 @@ - #endif - - /* MvS: Some clients use chardev 0xFFFF for a FIFO. */ -+#if defined(major) && defined(minor) -+ if (S_ISCHR(argp->attributes.mode) && -+ major(dev) == 0xff && minor(dev) == 0xff) { -+#else - if (S_ISCHR(argp->attributes.mode) && dev == 0xFFFF) { -+#endif - is_borc = 0; - dev = 0; - argp->attributes.mode &= ~S_IFMT; -@@ -882,7 +889,9 @@ - - /* This code is from Mark Shand's version */ - errno = 0; -- if (efs_lstat(h->path, &sbuf) < 0 || !(S_ISDIR(sbuf.st_mode))) -+ if (efs_lstat(h->path, &sbuf) < 0) -+ return (NFSERR_ACCES); -+ if (!S_ISDIR(sbuf.st_mode)) - return (NFSERR_NOTDIR); - if ((dirp = efs_opendir(h->path)) == NULL) - return ((errno ? nfs_errno() : NFSERR_NAMETOOLONG)); -@@ -940,7 +949,7 @@ - char *path; - struct fs_usage fs; - -- fhc = auth_fh(rqstp, argp, &status, CHK_READ | CHK_NOACCESS); -+ fhc = auth_fh(rqstp, argp, &status, CHK_READ | CHK_NOACCESS | CHK_ROOT); - if (fhc == NULL) - return status; - path = fhc->path; ---- nfs-user-server-2.2beta47.orig/rpcmisc.c -+++ nfs-user-server-2.2beta47/rpcmisc.c -@@ -64,25 +64,25 @@ - asize = sizeof(saddr); - sock = 0; - if (getsockname(0, (struct sockaddr *) &saddr, &asize) == 0) { -- int ssize = sizeof (int); -+ int ssize = sizeof (i); - - if (saddr.sin_family != AF_INET) - goto not_inetd; -- if (getsockopt(0, SOL_SOCKET, SO_TYPE, &_rpcfdtype, &ssize) < 0) -+ if (getsockopt(0, SOL_SOCKET, SO_TYPE, &i, &ssize) < 0) - goto not_inetd; -+ _rpcfdtype = i; - background_logging(); /* no more logging to stderr */ - closedown = time(NULL) + _RPCSVC_CLOSEDOWN; - _rpcpmstart = 1; - } else { - not_inetd: -- _rpcfdtype = 0; - for (i = 0; (vers = verstbl[i]) != 0; i++) - pmap_unset(prog, vers); - sock = RPC_ANYSOCK; - } - - if ((_rpcfdtype == 0) || (_rpcfdtype == SOCK_DGRAM)) { -- if (_rpcfdtype == 0 && defport != 0) -+ if (_rpcpmstart == 0 && defport != 0) - sock = makesock(defport, IPPROTO_UDP, bufsiz); - transp = svcudp_create(sock); - if (transp == NULL) -@@ -97,7 +97,7 @@ - } - - if ((_rpcfdtype == 0) || (_rpcfdtype == SOCK_STREAM)) { -- if (_rpcfdtype == 0 && defport != 0) -+ if (_rpcpmstart == 0 && defport != 0) - sock = makesock(defport, IPPROTO_TCP, bufsiz); - transp = svctcp_create(sock, 0, 0); - if (transp == NULL) -@@ -220,11 +220,14 @@ - } - #endif /* SO_SNDBUF */ - -- if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) -- Dprintf(L_FATAL, "Could not bind %s socket to %s:%d: %s\n", -+ if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) { -+ Dprintf(L_ERROR, "Could not bind %s socket to %s:%d: %s\n", - prot_name, inet_ntoa(sin.sin_addr), - ntohs(sin.sin_port), - strerror(errno)); -+ close(s); -+ s = RPC_ANYSOCK; -+ } - - return (s); - } ---- nfs-user-server-2.2beta47.orig/showmount.c -+++ nfs-user-server-2.2beta47/showmount.c -@@ -200,7 +200,7 @@ - memset(&exportlist, '\0', sizeof(exportlist)); - clnt_stat = clnt_call(mclient, MOUNTPROC_EXPORT, - (xdrproc_t) xdr_void, NULL, -- (xdrproc_t) xdr_exports, &exportlist, -+ (xdrproc_t) xdr_exports, (caddr_t) &exportlist, - total_timeout); - if (clnt_stat != RPC_SUCCESS) { - clnt_perror(mclient, "rpc mount export"); -@@ -233,7 +233,7 @@ - memset(&dumplist, '\0', sizeof(dumplist)); - clnt_stat = clnt_call(mclient, MOUNTPROC_DUMP, - (xdrproc_t) xdr_void, NULL, -- (xdrproc_t) xdr_mountlist, &dumplist, -+ (xdrproc_t) xdr_mountlist, (caddr_t) &dumplist, - total_timeout); - if (clnt_stat != RPC_SUCCESS) { - clnt_perror(mclient, "rpc mount dump"); ---- nfs-user-server-2.2beta47.orig/ugid_clnt.c -+++ nfs-user-server-2.2beta47/ugid_clnt.c -@@ -16,7 +16,7 @@ - static int clnt_res; - - memset((char *)&clnt_res, 0, sizeof(clnt_res)); -- if (clnt_call(clnt, AUTHENTICATE, (xdrproc_t) xdr_int, argp, (xdrproc_t) xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS) { -+ if (clnt_call(clnt, AUTHENTICATE, (xdrproc_t) xdr_int, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -@@ -28,7 +28,7 @@ - static int clnt_res; - - memset((char *)&clnt_res, 0, sizeof(clnt_res)); -- if (clnt_call(clnt, NAME_UID, (xdrproc_t) xdr_ugname, argp, (xdrproc_t) xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS) { -+ if (clnt_call(clnt, NAME_UID, (xdrproc_t) xdr_ugname, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -@@ -40,7 +40,7 @@ - static int clnt_res; - - memset((char *)&clnt_res, 0, sizeof(clnt_res)); -- if (clnt_call(clnt, GROUP_GID, (xdrproc_t) xdr_ugname, argp, (xdrproc_t) xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS) { -+ if (clnt_call(clnt, GROUP_GID, (xdrproc_t) xdr_ugname, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -@@ -52,7 +52,7 @@ - static ugname clnt_res; - - memset((char *)&clnt_res, 0, sizeof(clnt_res)); -- if (clnt_call(clnt, UID_NAME, (xdrproc_t) xdr_int, argp, (xdrproc_t) xdr_ugname, &clnt_res, TIMEOUT) != RPC_SUCCESS) { -+ if (clnt_call(clnt, UID_NAME, (xdrproc_t) xdr_int, (caddr_t) argp, (xdrproc_t) xdr_ugname, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -@@ -64,7 +64,7 @@ - static ugname clnt_res; - - memset((char *)&clnt_res, 0, sizeof(clnt_res)); -- if (clnt_call(clnt, GID_GROUP, (xdrproc_t) xdr_int, argp, (xdrproc_t) xdr_ugname, &clnt_res, TIMEOUT) != RPC_SUCCESS) { -+ if (clnt_call(clnt, GID_GROUP, (xdrproc_t) xdr_int, (caddr_t) argp, (xdrproc_t) xdr_ugname, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); ---- nfs-user-server-2.2beta47.orig/ugid_map.c -+++ nfs-user-server-2.2beta47/ugid_map.c -@@ -602,7 +602,7 @@ - * the server's port after clntudp_create, so we fetch it - * explicitly. - */ -- clnt_control(clnt, CLGET_SERVER_ADDR, &addr); -+ clnt_control(clnt, CLGET_SERVER_ADDR, (caddr_t) &addr); - if (!SECURE_PORT(addr.sin_port)) { - Dprintf(L_ERROR, "%s on %s runs on unprivileged port.\n", - name, inet_ntoa(addr.sin_addr)); ---- nfs-user-server-2.2beta47.orig/ugidd.c -+++ nfs-user-server-2.2beta47/ugidd.c -@@ -20,6 +20,8 @@ - #include "ugid.h" - #include "logging.h" - #include "haccess.h" -+#include "rpcmisc.h" -+#include "signals.h" - #ifdef HAVE_LIBWRAP_BUG - #include - #endif -@@ -27,6 +29,8 @@ - - static void ugidprog_1(struct svc_req *rqstp, SVCXPRT *transp); - static void usage(void); -+static void terminate(void); -+static RETSIGTYPE sigterm(int sig); - - #ifndef HAVE_RPCGEN_C - #define authenticate_1_svc authenticate_1 -@@ -39,17 +43,23 @@ - - static struct option longopts[] = { - { "debug", 0, 0, 'd' }, -+ { "port", required_argument, 0, 'P' }, - { NULL, 0, 0, 0 } - }; - -+static int ugidd_versions[] = { -+ UGIDVERS, -+ 0 -+}; -+ - int - main(argc, argv) - int argc; - char **argv; - { -- SVCXPRT *transp; - int c, longind; - int foreground = 0; -+ int port = 0; - - #ifndef HOSTS_ACCESS - fprintf(stderr, -@@ -59,40 +69,34 @@ - sleep(1); - #endif - -- while ((c = getopt_long(argc, argv, "d", longopts, &longind)) != EOF) { -+ chdir("/"); -+ -+ while ((c = getopt_long(argc, argv, "dP:", longopts, &longind)) != EOF) { - switch (c) { - case 'd': - foreground = 1; - enable_logging("ugid"); - break; -+ case 'P': -+ port = atoi(optarg); -+ if (port <= 0 || port > 65535) { -+ fprintf(stderr, "ugidd: bad port number: %s\n", -+ optarg); -+ usage(); -+ } -+ break; - default: - usage(); - } - } - -- (void)pmap_unset(UGIDPROG, UGIDVERS); -+ log_open("ugidd", foreground); - -- transp = svcudp_create(RPC_ANYSOCK); -- if (transp == NULL) { -- (void)fprintf(stderr, "cannot create udp service.\n"); -- exit(1); -- } -- if (!svc_register(transp, UGIDPROG, UGIDVERS, ugidprog_1, IPPROTO_UDP)) { -- fprintf(stderr, "unable to register (UGIDPROG, UGIDVERS, UDP)\n"); -- exit(1); -- } -- -- transp = svctcp_create(RPC_ANYSOCK, 0, 0); -- if (transp == NULL) { -- fprintf(stderr, "cannot create tcp service.\n"); -- exit(1); -- } -- if (!svc_register(transp, UGIDPROG, UGIDVERS, ugidprog_1, IPPROTO_TCP)) { -- fprintf(stderr, "unable to register (UGIDPROG, UGIDVERS, TCP)\n"); -- exit(1); -- } -+ /* Create services and register with portmapper */ -+ _rpcfdtype = SOCK_DGRAM; -+ rpc_init("ugidd", UGIDPROG, ugidd_versions, ugidprog_1, port, 0); - -- if (!foreground) { -+ if (!foreground && !_rpcpmstart) { - if ((c = fork()) > 0) - exit(0); - if (c < 0) { -@@ -117,7 +121,8 @@ - #endif - } - -- log_open("ugidd", foreground); -+ install_signal_handler(SIGTERM, sigterm); -+ atexit(terminate); - - svc_run(); - Dprintf(L_ERROR, "svc_run returned\n"); -@@ -127,7 +132,7 @@ - static void - usage() - { -- fprintf(stderr, "rpc.ugidd: [-d]\n"); -+ fprintf(stderr, "rpc.ugidd: [-d] [-P port]\n"); - exit (2); - } - -@@ -188,7 +193,7 @@ - return; - } - bzero((char *)&argument, sizeof(argument)); -- if (!svc_getargs(transp, xdr_argument, &argument)) { -+ if (!svc_getargs(transp, xdr_argument, (caddr_t) &argument)) { - svcerr_decode(transp); - return; - } -@@ -196,7 +201,7 @@ - if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { - svcerr_systemerr(transp); - } -- if (!svc_freeargs(transp, xdr_argument, &argument)) { -+ if (!svc_freeargs(transp, xdr_argument, (caddr_t) &argument)) { - (void)fprintf(stderr, "unable to free arguments\n"); - exit(1); - } -@@ -321,6 +326,19 @@ - } - - -+static RETSIGTYPE -+sigterm(int sig) -+{ -+ exit(0); -+} -+ -+static void -+terminate(void) -+{ -+ rpc_exit(UGIDPROG, ugidd_versions); -+} -+ -+ - - #else /* ENABLE_UGID_DAEMON */ - diff --git a/openwrt/package/nfs-server/patches/gcc-3.4-fix.patch b/openwrt/package/nfs-server/patches/gcc-3.4-fix.patch deleted file mode 100644 index 21915ce4976..00000000000 --- a/openwrt/package/nfs-server/patches/gcc-3.4-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urN nfs-server-2.2beta47.old/fh.c nfs-server-2.2beta47.dev/fh.c ---- nfs-server-2.2beta47.old/fh.c 2005-04-29 00:37:48.000000000 +0200 -+++ nfs-server-2.2beta47.dev/fh.c 2005-04-29 00:39:44.000000000 +0200 -@@ -351,13 +351,13 @@ - #ifndef ENABLE_DEVTAB - psi_t dmajor, dminor; - --#if (SIZEOF_DEV_T == 4) -- /* This folds the upper 16 bits into bits 8..15, and -- * the lower 16 bits into bits 0..7 -- */ -- dev = (((dev >> 16) & 0xff00) ^ ((dev >> 8) & 0xff00)) | -- (((dev >> 8) & 0xff) ^ (dev & 0xff)); --#endif -+ if (sizeof(dev_t) == 4) { -+ /* This folds the upper 16 bits into bits 8..15, and -+ * the lower 16 bits into bits 0..7 -+ */ -+ dev = (((dev >> 16) & 0xff00) ^ ((dev >> 8) & 0xff00)) | -+ (((dev >> 8) & 0xff) ^ (dev & 0xff)); -+ } - - /* - * Assuming major and minor numbers are small integers, diff --git a/openwrt/package/nfs-server/patches/remove-warning.patch b/openwrt/package/nfs-server/patches/remove-warning.patch deleted file mode 100644 index 5484b792c2b..00000000000 --- a/openwrt/package/nfs-server/patches/remove-warning.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- nfs-server-2.2beta47.old/auth_clnt.c 1999-11-10 10:18:06.000000000 +0100 -+++ nfs-server-2.2beta47/auth_clnt.c 2005-03-24 23:44:16.000000000 +0100 -@@ -238,19 +238,23 @@ - - /* First, set the user ID. */ - if (auth_uid != cred_uid) { -- if (setfsuid(cred_uid) < 0) -+ if (setfsuid(cred_uid) < 0) { -+#if 0 - Dprintf(L_ERROR, "Unable to setfsuid %d: %s\n", - cred_uid, strerror(errno)); -- else -+#endif -+ } else - auth_uid = cred_uid; - } - - /* Next, the group ID. */ - if (auth_gid != cred_gid) { -- if (setfsgid(cred_gid) < 0) -+ if (setfsgid(cred_gid) < 0) { -+#if 0 - Dprintf(L_ERROR, "Unable to setfsgid %d: %s\n", - cred_gid, strerror(errno)); -- else -+#endif -+ } else - auth_gid = cred_gid; - } - diff --git a/openwrt/package/nmap/Config.in b/openwrt/package/nmap/Config.in deleted file mode 100644 index ed85f9ca08c..00000000000 --- a/openwrt/package/nmap/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_NMAP - prompt "nmap.............................. Network exploration and/or security auditing utility" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBDNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - select BR2_PACKAGE_UCLIBCXX - help - A free open source utility for network exploration or security auditing. - - http://www.insecure.org/nmap/ - diff --git a/openwrt/package/nmap/Makefile b/openwrt/package/nmap/Makefile deleted file mode 100644 index b60558f6fb0..00000000000 --- a/openwrt/package/nmap/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nmap -PKG_VERSION:=4.01 -PKG_RELEASE:=1 -PKG_MD5SUM:=09c259837b24f6c7385c2c1c49760a7c - -PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,NMAP,nmap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - libpcapdir="$(STAGING_DIR)/usr/lib" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm -lgcc" \ - ac_cv_prog_CXX="$(TARGET_CXX)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --without-openssl \ - --without-nmapfe \ - --with-libdnet="$(STAGING_DIR)/usr" \ - --with-libpcap="$(STAGING_DIR)/usr" \ - --with-libpcre="$(STAGING_DIR)/usr" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CCOPT="$(TARGET_CFLAGS) -fno-builtin -nostdinc++" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_NMAP): - install -d -m0755 $(IDIR_NMAP)/usr/share/nmap - for file in mac-prefixes os-fingerprints protocols rpc service-probes services; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$file $(IDIR_NMAP)/usr/share/nmap; \ - done - install -d -m0755 $(IDIR_NMAP)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/nmap $(IDIR_NMAP)/usr/bin/ - $(RSTRIP) $(IDIR_NMAP) - $(IPKG_BUILD) $(IDIR_NMAP) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/nmap/ipkg/nmap.control b/openwrt/package/nmap/ipkg/nmap.control deleted file mode 100644 index e5bedd47db8..00000000000 --- a/openwrt/package/nmap/ipkg/nmap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: nmap -Priority: optional -Section: net -Depends: libgcc, libdnet, libpcap, libpcre, uclibc++ -Description: Nmap is a free open source utility for network exploration or security auditing. diff --git a/openwrt/package/nmap/patches/cross-compile.patch b/openwrt/package/nmap/patches/cross-compile.patch deleted file mode 100644 index 5c3785c4b36..00000000000 --- a/openwrt/package/nmap/patches/cross-compile.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -urN nmap-4.01.old/configure nmap-4.01.dev/configure ---- nmap-4.01.old/configure 2006-02-01 19:18:42.000000000 -0700 -+++ nmap-4.01.dev/configure 2006-03-29 23:14:28.000000000 -0700 -@@ -1341,12 +1341,6 @@ - fi - fi - --libpcapdir=libpcap -- -- --pcredir=libpcre -- -- - ac_config_headers="$ac_config_headers config.h" - - -diff -urN nmap-4.01.old/Makefile.in nmap-4.01.dev/Makefile.in ---- nmap-4.01.old/Makefile.in 2006-02-09 19:22:27.000000000 -0700 -+++ nmap-4.01.dev/Makefile.in 2006-03-29 23:14:12.000000000 -0700 -@@ -29,7 +29,7 @@ - # CFLAGS = $(DEFS) $(INCLS) - STATIC = - LDFLAGS = @LDFLAGS@ $(STATIC) --LIBS = @LIBNBASE_LIBS@ @LIBNSOCK_LIBS@ @LIBPCRE_LIBS@ @LIBPCAP_LIBS@ @OPENSSL_LIBS@ @LIBDNET_LIBS@ @LIBS@ -+LIBS = @LIBNBASE_LIBS@ @LIBNSOCK_LIBS@ -lpcre -lpcap @OPENSSL_LIBS@ -ldnet @LIBS@ - # LIBS = -lefence @LIBS@ - # LIBS = -lrmalloc @LIBS@ - SHTOOL = ./shtool -@@ -68,15 +68,6 @@ - # all of the prerequisites (e.g. recursive makes and such) - FORCE: - --$(LIBPCREDIR)/libpcre.a: $(LIBPCREDIR)/Makefile FORCE -- @echo Compiling libpcre; cd $(LIBPCREDIR) && $(MAKE) -- --$(LIBDNETDIR)/src/.libs/libdnet.a: $(LIBDNETDIR)/Makefile FORCE -- @echo Compiling libdnet; cd $(LIBDNETDIR) && $(MAKE) -- --$(LIBPCAPDIR)/libpcap.a: $(LIBPCAPDIR)/Makefile FORCE -- @echo Compiling libpcap; cd $(LIBPCAPDIR) && $(MAKE) -- - $(NBASEDIR)/libnbase.a: $(NBASEDIR)/Makefile FORCE - @echo Compiling libnbase; - cd $(NBASEDIR) && $(MAKE) diff --git a/openwrt/package/nmap/patches/no_strip.patch b/openwrt/package/nmap/patches/no_strip.patch deleted file mode 100644 index ffe953e285c..00000000000 --- a/openwrt/package/nmap/patches/no_strip.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN nmap-4.01.old/Makefile.in nmap-4.01.dev/Makefile.in ---- nmap-4.01.old/Makefile.in 2006-02-09 19:22:27.000000000 -0700 -+++ nmap-4.01.dev/Makefile.in 2006-03-29 23:14:12.000000000 -0700 -@@ -144,7 +135,7 @@ - - install-nmap: $(TARGET) - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(nmapdatadir) -- $(INSTALL) -c -m 755 -s nmap $(DESTDIR)$(bindir)/nmap -+ $(INSTALL) -c -m 755 nmap $(DESTDIR)$(bindir)/nmap - $(INSTALL) -c -m 644 docs/$(TARGET).1 $(DESTDIR)$(mandir)/man1/$(TARGET).1 - $(INSTALL) -c -m 644 docs/nmap.xsl $(DESTDIR)$(nmapdatadir)/ - $(INSTALL) -c -m 644 docs/nmap.dtd $(DESTDIR)$(nmapdatadir)/ diff --git a/openwrt/package/nocatsplash/Config.in b/openwrt/package/nocatsplash/Config.in deleted file mode 100644 index 174f9e666e8..00000000000 --- a/openwrt/package/nocatsplash/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_NOCATSPLASH - prompt "nocatsplash....................... Open public network gateway daemon" - tristate - default m if CONFIG_DEVEL - help - NoCatSplash is an Open Public Network Gateway Daemon. - It performs as a [captive/open/active] portal. When run on a gateway/router - on a network, all web requests are redirected until the client either logs - in or clicks "I Accept" to an AUP. The gateway daemon then changes the - firewall rules on the gateway to pass traffic for that client (based on IP - address and MAC address). - diff --git a/openwrt/package/nocatsplash/Makefile b/openwrt/package/nocatsplash/Makefile deleted file mode 100644 index 4d2120e776c..00000000000 --- a/openwrt/package/nocatsplash/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nocatsplash -PKG_VERSION:=0.92 -PKG_RELEASE:=1 -PKG_MD5SUM:=e0fcc0effe52e63bc31070d16d0b4a81 - -PKG_SOURCE_URL:=http://wifi.rulez.org/~josephus/ -PKG_SOURCE:=NoCatSplash-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/NoCatSplash-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,NOCATSPLASH,nocatsplash,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --with-firewall=iptables \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-glib-prefix="$(STAGING_DIR)/usr" \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_NOCATSPLASH): - mkdir -p $(IDIR_NOCATSPLASH) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_NOCATSPLASH)/ - $(RSTRIP) $(IDIR_NOCATSPLASH) - $(IPKG_BUILD) $(IDIR_NOCATSPLASH) $(PACKAGE_DIR) - diff --git a/openwrt/package/nocatsplash/ipkg/nocatsplash.conffiles b/openwrt/package/nocatsplash/ipkg/nocatsplash.conffiles deleted file mode 100644 index a25777d9a4b..00000000000 --- a/openwrt/package/nocatsplash/ipkg/nocatsplash.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/nocat.conf diff --git a/openwrt/package/nocatsplash/ipkg/nocatsplash.control b/openwrt/package/nocatsplash/ipkg/nocatsplash.control deleted file mode 100644 index ec0bfc7e2f4..00000000000 --- a/openwrt/package/nocatsplash/ipkg/nocatsplash.control +++ /dev/null @@ -1,10 +0,0 @@ -Package: nocatsplash -Priority: optional -Section: net -Depends: iptables-extra, glib1 -Description: NoCatSplash is an Open Public Network Gateway Daemon. - It performs as a [captive/open/active] portal. When run on a gateway/router - on a network, all web requests are redirected until the client either logs - in or clicks "I Accept" to an AUP. The gateway daemon then changes the - firewall rules on the gateway to pass traffic for that client (based on IP - address and MAC address). diff --git a/openwrt/package/nocatsplash/patches/openwrt-firewall.patch b/openwrt/package/nocatsplash/patches/openwrt-firewall.patch deleted file mode 100644 index 055b57f24df..00000000000 --- a/openwrt/package/nocatsplash/patches/openwrt-firewall.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -urN NoCatSplash-0.92.old/libexec/iptables/initialize.fw NoCatSplash-0.92/libexec/iptables/initialize.fw ---- NoCatSplash-0.92.old/libexec/iptables/initialize.fw 2002-12-27 11:44:41.000000000 +0100 -+++ NoCatSplash-0.92/libexec/iptables/initialize.fw 2005-04-04 20:45:57.000000000 +0200 -@@ -28,13 +28,9 @@ - - # Load alllll the kernel modules we need. - # --rmmod ipchains > /dev/null 2>&1 # for RH 7.1 users. - --for module in ip_tables ipt_REDIRECT ipt_MASQUERADE ipt_MARK ipt_REJECT \ -- ipt_TOS ipt_LOG iptable_mangle iptable_filter iptable_nat ip_nat_ftp \ -- ip_conntrack ipt_mac ipt_state ipt_mark; do -- -- modprobe $module -+for module in ipt_TOS ipt_mac; do -+ insmod $module - done - - diff --git a/openwrt/package/ntpclient/Config.in b/openwrt/package/ntpclient/Config.in deleted file mode 100644 index 1e9ca925bda..00000000000 --- a/openwrt/package/ntpclient/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_NTPCLIENT - prompt "ntpclient......................... NTP (Network Time Protocol) client" - tristate - default m if CONFIG_DEVEL - help - NTP client for setting system time from NTP servers. - - http://doolittle.faludi.com/ntpclient/ - diff --git a/openwrt/package/ntpclient/Makefile b/openwrt/package/ntpclient/Makefile deleted file mode 100644 index 31fe5519472..00000000000 --- a/openwrt/package/ntpclient/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ntpclient -PKG_VERSION:=2003_194 -PKG_RELEASE:=2 -PKG_MD5SUM:=94e84d5c6023c5e1f3890b28d0a08c92 - -PKG_SOURCE_URL:=http://doolittle.faludi.com/ntpclient -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,NTPCLIENT,ntpclient,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" - touch $@ - -$(IPKG_NTPCLIENT): - install -d -m0755 $(IDIR_NTPCLIENT)/etc/hotplug.d/iface - install -m0755 ./files/ntpclient.init $(IDIR_NTPCLIENT)/etc/hotplug.d/iface/10-ntpclient - install -d -m0755 $(IDIR_NTPCLIENT)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/ntpclient $(IDIR_NTPCLIENT)/usr/sbin/ - $(RSTRIP) $(IDIR_NTPCLIENT) - $(IPKG_BUILD) $(IDIR_NTPCLIENT) $(PACKAGE_DIR) - diff --git a/openwrt/package/ntpclient/files/ntpclient.init b/openwrt/package/ntpclient/files/ntpclient.init deleted file mode 100644 index a8944c60eb9..00000000000 --- a/openwrt/package/ntpclient/files/ntpclient.init +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -case "$ACTION" in - ifup) - ps x | grep '[n]tpclient' >&- || { - route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${ntp_server:-pool.ntp.org} & - } - ;; - ifdown) - route -n 2>&- | grep '^0.0.0.0' >&- || killall ntpclient 2>&- >&- ;; -esac diff --git a/openwrt/package/ntpclient/ipkg/ntpclient.control b/openwrt/package/ntpclient/ipkg/ntpclient.control deleted file mode 100644 index 4194e617bed..00000000000 --- a/openwrt/package/ntpclient/ipkg/ntpclient.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ntpclient -Priority: optional -Section: net -Description: NTP client for setting system time from NTP servers. diff --git a/openwrt/package/olsrd/Config.in b/openwrt/package/olsrd/Config.in deleted file mode 100644 index 0d6ffa4a845..00000000000 --- a/openwrt/package/olsrd/Config.in +++ /dev/null @@ -1,54 +0,0 @@ -menu "olsrd............................. OLSR (Optimized Link State Routing) daemon" - -config BR2_PACKAGE_OLSRD - prompt "olsrd............................. OLSR (Optimized Link State Routing) daemon" - tristate - default m if CONFIG_DEVEL - help - The Optimized Link State Routing daemon - - http://www.olsr.org/ - -config BR2_PACKAGE_OLSRD_MOD_DOT_DRAW - prompt "olsrd-mod-dot-draw.............. Dot topology information plugin" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OLSRD - -config BR2_PACKAGE_OLSRD_MOD_DYN_GW - prompt "olsrd-mod-dyn-gw................ Dynamic internet gateway plugin" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OLSRD - -config BR2_PACKAGE_OLSRD_MOD_HTTPINFO - prompt "olsrd-mod-httpinfo.............. Small informative web server plugin" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OLSRD - -config BR2_PACKAGE_OLSRD_MOD_NAMESERVICE - prompt "olsrd-mod-nameservice........... Lightweight hostname resolver plugin" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OLSRD - -config BR2_PACKAGE_OLSRD_MOD_POWER - prompt "olsrd-mod-power................. Power status plugin" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OLSRD - -config BR2_PACKAGE_OLSRD_MOD_SECURE - prompt "olsrd-mod-secure................ Message signing plugin to secure olsrd routing domain" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OLSRD - -config BR2_PACKAGE_OLSRD_MOD_TAS - prompt "olsrd-mod-tas................... Tiny Application Server (TAS) plugin for olsrd" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OLSRD - -endmenu diff --git a/openwrt/package/olsrd/Makefile b/openwrt/package/olsrd/Makefile deleted file mode 100644 index a5092c87588..00000000000 --- a/openwrt/package/olsrd/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=olsrd -PKG_VERSION:=0.4.10 -PKG_RELEASE:=1 -PKG_MD5SUM:=9807d4451e65cb4ec385155eef7bf3cf - -PKG_SOURCE_URL:=http://www.olsr.org/releases/0.4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -define PKG_mod_template - -$$(IPKG_$(1)): - install -d -m0755 $$(IDIR_$(1))/usr/lib - install -m0755 $(PKG_INSTALL_DIR)/usr/lib/olsrd_$(2).so.* $$(IDIR_$(1))/usr/lib/ - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,OLSRD,olsrd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OLSRD_MOD_DOT_DRAW,olsrd-mod-dot-draw,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OLSRD_MOD_DYN_GW,olsrd-mod-dyn-gw,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OLSRD_MOD_HTTPINFO,olsrd-mod-httpinfo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OLSRD_MOD_NAMESERVICE,olsrd-mod-nameservice,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OLSRD_MOD_POWER,olsrd-mod-power,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OLSRD_MOD_SECURE,olsrd-mod-secure,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OLSRD_MOD_TAS,olsrd-mod-tas,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_mod_template,OLSRD_MOD_DOT_DRAW,dot_draw)) -$(eval $(call PKG_mod_template,OLSRD_MOD_DYN_GW,dyn_gw)) -$(eval $(call PKG_mod_template,OLSRD_MOD_HTTPINFO,httpinfo)) -$(eval $(call PKG_mod_template,OLSRD_MOD_NAMESERVICE,nameservice)) -$(eval $(call PKG_mod_template,OLSRD_MOD_POWER,power)) -$(eval $(call PKG_mod_template,OLSRD_MOD_SECURE,secure)) -$(eval $(call PKG_mod_template,OLSRD_MOD_TAS,tas)) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - $(TARGET_CONFIGURE_OPTS) \ - NODEBUG=1 \ - OFLAGS="$(TARGET_CFLAGS)" \ - OS="linux" \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - STRIP="/bin/true" \ - all libs install install_libs - touch $@ - -$(IPKG_OLSRD): - install -d -m0755 $(IDIR_OLSRD)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/olsrd.conf $(IDIR_OLSRD)/etc/ - install -d -m0755 $(IDIR_OLSRD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(IDIR_OLSRD)/usr/sbin/ - install -d -m0755 $(IDIR_OLSRD)/etc/init.d - install -m0755 ./files/olsrd.init $(IDIR_OLSRD)/etc/init.d/S60olsrd - $(RSTRIP) $(IDIR_OLSRD) - $(IPKG_BUILD) $(IDIR_OLSRD) $(PACKAGE_DIR) - -$(IPKG_OLSRD_MOD_SECURE): $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key - -$(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key: - install -d -m0755 $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d - $(CP) ./files/olsrd_secure_key $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/ diff --git a/openwrt/package/olsrd/files/olsrd.init b/openwrt/package/olsrd/files/olsrd.init deleted file mode 100644 index 1f1fdb95192..00000000000 --- a/openwrt/package/olsrd/files/olsrd.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/olsrd -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - olsrd $OPTIONS - ;; - *) - echo "usage: $0 (start)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/olsrd/files/olsrd_secure_key b/openwrt/package/olsrd/files/olsrd_secure_key deleted file mode 100644 index 4a7d7258f19..00000000000 --- a/openwrt/package/olsrd/files/olsrd_secure_key +++ /dev/null @@ -1 +0,0 @@ -1234567890123456 \ No newline at end of file diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-dot-draw.control b/openwrt/package/olsrd/ipkg/olsrd-mod-dot-draw.control deleted file mode 100644 index f0a3432825b..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd-mod-dot-draw.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: olsrd-mod-dot-draw -Priority: optional -Section: net -Description: a dot topology information plugin for olsrd -Depends: olsrd diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-dyn-gw.control b/openwrt/package/olsrd/ipkg/olsrd-mod-dyn-gw.control deleted file mode 100644 index 69a41a5b1ba..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd-mod-dyn-gw.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: olsrd-mod-dyn-gw -Priority: optional -Section: net -Description: a dynamic internet gateway plugin for olsrd -Depends: olsrd diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-httpinfo.control b/openwrt/package/olsrd/ipkg/olsrd-mod-httpinfo.control deleted file mode 100644 index 770dc0474e4..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd-mod-httpinfo.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: olsrd-mod-httpinfo -Priority: optional -Section: net -Description: a small informative web server plugin for olsrd -Depends: olsrd diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-nameservice.control b/openwrt/package/olsrd/ipkg/olsrd-mod-nameservice.control deleted file mode 100644 index 2caa8152b1f..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd-mod-nameservice.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: olsrd-mod-nameservice -Priority: optional -Section: net -Description: a lightweight hostname resolver plugin for olsrd -Depends: olsrd diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-power.control b/openwrt/package/olsrd/ipkg/olsrd-mod-power.control deleted file mode 100644 index 168126b3d8f..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd-mod-power.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: olsrd-mod-power -Priority: optional -Section: net -Description: a power status plugin for olsrd -Depends: olsrd diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-secure.conffiles b/openwrt/package/olsrd/ipkg/olsrd-mod-secure.conffiles deleted file mode 100644 index 34e90b80a66..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd-mod-secure.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/olsrd.d/olsrd_secure_key diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-secure.control b/openwrt/package/olsrd/ipkg/olsrd-mod-secure.control deleted file mode 100644 index ff2eb3a9ae0..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd-mod-secure.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: olsrd-mod-secure -Priority: optional -Section: net -Description: a message signing plugin to secure olsrd routing domain -Depends: olsrd diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-tas.control b/openwrt/package/olsrd/ipkg/olsrd-mod-tas.control deleted file mode 100644 index 91ad4c66500..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd-mod-tas.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: olsrd-mod-tas -Priority: optional -Section: net -Description: a Tiny Application Server (TAS) plugin for olsrd -Depends: olsrd diff --git a/openwrt/package/olsrd/ipkg/olsrd.conffiles b/openwrt/package/olsrd/ipkg/olsrd.conffiles deleted file mode 100644 index a0b5e8eaa76..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/olsrd.conf diff --git a/openwrt/package/olsrd/ipkg/olsrd.control b/openwrt/package/olsrd/ipkg/olsrd.control deleted file mode 100644 index 37cdf09085e..00000000000 --- a/openwrt/package/olsrd/ipkg/olsrd.control +++ /dev/null @@ -1,8 +0,0 @@ -Package: olsrd -Priority: optional -Section: net -Description: The olsr.org OLSR daemon - olsrd is an implementation of the Optimized Link State Routing protocol. - OLSR is a routing protocol for mobile ad-hoc networks. The protocol is - pro-active, table driven and utilizes a technique called multipoint - relaying for message flooding. diff --git a/openwrt/package/olsrd/patches/olsrd-0.4.10-opt-flags.diff b/openwrt/package/olsrd/patches/olsrd-0.4.10-opt-flags.diff deleted file mode 100644 index 02d1cc813ea..00000000000 --- a/openwrt/package/olsrd/patches/olsrd-0.4.10-opt-flags.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN olsrd-0.4.10-old/Makefile.inc olsrd-0.4.10-new/Makefile.inc ---- olsrd-0.4.10-old/Makefile.inc 2006-01-01 16:58:20.000000000 +0100 -+++ olsrd-0.4.10-new/Makefile.inc 2006-01-05 17:57:23.000000000 +0100 -@@ -21,7 +21,7 @@ - ifndef CFLAGS - CFLAGS += -Wall -Wmissing-prototypes -Wstrict-prototypes \ - -Wmissing-declarations -Wsign-compare --CFLAGS += -O2 -g -+CFLAGS += $(OFLAGS) - endif - - ifdef OLSRD_PLUGIN diff --git a/openwrt/package/olsrd/patches/olsrd-0.4.9-secure-key-path.path b/openwrt/package/olsrd/patches/olsrd-0.4.9-secure-key-path.path deleted file mode 100644 index fcae759862e..00000000000 --- a/openwrt/package/olsrd/patches/olsrd-0.4.9-secure-key-path.path +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN olsrd-0.4.9-orig/lib/secure/src/olsrd_secure.h olsrd-0.4.9-1/lib/secure/src/olsrd_secure.h ---- olsrd-0.4.9-orig/lib/secure/src/olsrd_secure.h 2005-03-10 20:57:48.000000000 +0100 -+++ olsrd-0.4.9-1/lib/secure/src/olsrd_secure.h 2005-04-05 00:51:40.000000000 +0200 -@@ -43,7 +43,7 @@ - - #include "olsrd_plugin.h" - --#define KEYFILE "/root/.olsr/olsrd_secure_key" -+#define KEYFILE "/etc/olsrd.d/olsrd_secure_key" - - /* Schemes */ - #define ONE_CHECKSUM 1 diff --git a/openwrt/package/opencdk/Config.in b/openwrt/package/opencdk/Config.in deleted file mode 100644 index 589b095196d..00000000000 --- a/openwrt/package/opencdk/Config.in +++ /dev/null @@ -1,21 +0,0 @@ -config BR2_PACKAGE_OPENCDK - tristate - default n - depends BR2_PACKAGE_LIBOPENCDK - -config BR2_PACKAGE_LIBOPENCDK - prompt "libopencdk........................ The Open Crypto Development Kit library" - tristate -# default m if CONFIG_DEVEL - default n - select BR2_PACKAGE_OPENCDK - select BR2_PACKAGE_LIBGCRYPT - help - This library provides basic parts of the OpenPGP message format. - For reference, please read the rfc2440.txt in the doc/ directory. - Due to some possible security problems, the library also implements - parts of draft-ietf-openpgp-rfc2440bis-08.txt. If you want to exchange - messages with earlier PGP version < 7, you should use the compat mode. - - ftp://ftp.gnutls.org/pub/gnutls/opencdk/ - diff --git a/openwrt/package/opencdk/Makefile b/openwrt/package/opencdk/Makefile deleted file mode 100644 index c40b0c24eb0..00000000000 --- a/openwrt/package/opencdk/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=opencdk -PKG_VERSION:=0.5.5 -PKG_RELEASE:=0 -PKG_MD5SUM:=aaff60107f0153873192ffda00699a96 - -PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/opencdk/ \ - ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/opencdk/ \ - http://www.mirrors.wiretapped.net/security/network-security/gnutls/opencdk/ \ - ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/opencdk/ \ - http://josefsson.org/gnutls/releases/opencdk/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBOPENCDK,libopencdk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - touch configure.ac ; \ - touch acinclude.m4 ; \ - touch aclocal.m4 ; \ - touch Makefile.in ; \ - touch config.h.in ; \ - touch configure ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-libgcrypt-prefix="$(STAGING_DIR)/usr" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBOPENCDK): - install -m0755 -d $(IDIR_LIBOPENCDK)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencdk.so.* $(IDIR_LIBOPENCDK)/usr/lib/ - $(RSTRIP) $(IDIR_LIBOPENCDK) - $(IPKG_BUILD) $(IDIR_LIBOPENCDK) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libopencdk.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/opencdk-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/opencdk.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencdk.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libopencdk.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/opencdk-config \ - $(STAGING_DIR)/usr/include/opencdk.h \ - $(STAGING_DIR)/usr/lib/libopencdk.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/opencdk/ipkg/libopencdk.control b/openwrt/package/opencdk/ipkg/libopencdk.control deleted file mode 100644 index 257bed1c639..00000000000 --- a/openwrt/package/opencdk/ipkg/libopencdk.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libopencdk -Priority: optional -Section: libs -Description: Open Crypto Development Kit library -Depends: libgcrypt, libgpg-error, zlib diff --git a/openwrt/package/opencdk/patches/500-cross-compile.patch b/openwrt/package/opencdk/patches/500-cross-compile.patch deleted file mode 100644 index e8b6707284f..00000000000 --- a/openwrt/package/opencdk/patches/500-cross-compile.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ruN opencdk-0.5.5-orig/configure opencdk-0.5.5-1/configure ---- opencdk-0.5.5-orig/configure 2004-06-20 15:54:29.000000000 +0200 -+++ opencdk-0.5.5-1/configure 2005-03-15 22:36:53.000000000 +0100 -@@ -19788,8 +19788,8 @@ - - - --LIBOPENCDK_LIBS="$LIBS -L${libdir} -lopencdk $LIBGCRYPT_LIBS" --LIBOPENCDK_CFLAGS="$LIBGCRYPT_CFLAGS -I${includedir}" -+LIBOPENCDK_LIBS="$LIBS -lopencdk $LIBGCRYPT_LIBS" -+LIBOPENCDK_CFLAGS="$LIBGCRYPT_CFLAGS" - - - -diff -ruN opencdk-0.5.5-orig/configure.ac opencdk-0.5.5-1/configure.ac ---- opencdk-0.5.5-orig/configure.ac 2004-06-05 19:46:31.000000000 +0200 -+++ opencdk-0.5.5-1/configure.ac 2005-03-15 22:36:26.000000000 +0100 -@@ -96,8 +96,8 @@ - *** - ]])) - --LIBOPENCDK_LIBS="$LIBS -L${libdir} -lopencdk $LIBGCRYPT_LIBS" --LIBOPENCDK_CFLAGS="$LIBGCRYPT_CFLAGS -I${includedir}" -+LIBOPENCDK_LIBS="$LIBS -lopencdk $LIBGCRYPT_LIBS" -+LIBOPENCDK_CFLAGS="$LIBGCRYPT_CFLAGS" - AC_SUBST(LIBOPENCDK_LIBS) - AC_SUBST(LIBOPENCDK_CFLAGS) - diff --git a/openwrt/package/openh323/Config.in b/openwrt/package/openh323/Config.in deleted file mode 100644 index 1aa3202e9c9..00000000000 --- a/openwrt/package/openh323/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_OPENH323 - prompt "openh323.......................... OpenH323 implementation" - tristate - select BR2_PACKAGE_PWLIB - default n - help diff --git a/openwrt/package/openh323/Makefile b/openwrt/package/openh323/Makefile deleted file mode 100644 index f9b8a514f97..00000000000 --- a/openwrt/package/openh323/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openh323 -PKG_VERSION:=cvs-20051230 -PKG_RELEASE:=1 -PKG_MD5SUM:=ba1ffd45016f533bec2bb1539b78e43a - -PKG_SOURCE_URL:=http://trash.uid0.hu/openwrt/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,OPENH323,openh323,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - rm -rf $(PKG_INSTALL_DIR); - mkdir -p $(PKG_INSTALL_DIR); - ln -s $(PKG_BUILD_DIR)/../pwlib-cvs-20051227 $(PKG_BUILD_DIR)/../pwlib; - cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PWLIBDIR="$(STAGING_DIR)" \ - ./configure \ - --prefix=$(STAGING_DIR) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - cd $(PKG_BUILD_DIR)/plugins; rm -rf config.{cache,status}; \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PWLIBDIR="$(STAGING_DIR)" \ - ./configure \ - --prefix=$(STAGING_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.built: - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PWLIBDIR="$(PKG_BUILD_DIR)/../pwlib-cvs-20051227/" \ - $(MAKE) -C $(PKG_BUILD_DIR)/plugins $(TARGET_CONFIGURE_OPTS) - - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - PWLIBDIR="$(PKG_BUILD_DIR)/../pwlib-cvs-20051227/" \ - $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) opt install - touch $@ diff --git a/openwrt/package/openh323/ipkg/openh323.control b/openwrt/package/openh323/ipkg/openh323.control deleted file mode 100644 index 5aab3682593..00000000000 --- a/openwrt/package/openh323/ipkg/openh323.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: openh323 -Priority: optional -Section: admin -Description: The OpenH323 project aims to create a full featured, - interoperable, Open Source implementation of the ITU-T H.323 - teleconferencing protocol that can be used by personal - developers and commercial users without charge. diff --git a/openwrt/package/openh323/patches/001-configure.patch b/openwrt/package/openh323/patches/001-configure.patch deleted file mode 100644 index 04ed8c5c1f8..00000000000 --- a/openwrt/package/openh323/patches/001-configure.patch +++ /dev/null @@ -1,122 +0,0 @@ ---- openh323-cvs-20051230.orig/configure 2005-08-30 03:12:38.000000000 +0200 -+++ openh323-cvs-20051230/configure 2005-12-30 11:29:57.000000000 +0100 -@@ -3080,10 +3080,10 @@ - if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- test "$cross_compiling" = yes && -- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 --echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -- { (exit 1); exit 1; }; } -+# test "$cross_compiling" = yes && -+# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -+#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -+# { (exit 1); exit 1; }; } - if test -r "${PWLIBDIR}/version.h"; then - eval "$as_ac_File=yes" - else -@@ -3104,10 +3104,10 @@ - if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- test "$cross_compiling" = yes && -- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 --echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -- { (exit 1); exit 1; }; } -+# test "$cross_compiling" = yes && -+# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -+#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -+# { (exit 1); exit 1; }; } - if test -r "${OPENH323DIR}/../pwlib/version.h"; then - eval "$as_ac_File=yes" - else -@@ -3129,10 +3129,10 @@ - if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- test "$cross_compiling" = yes && -- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 --echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -- { (exit 1); exit 1; }; } -+# test "$cross_compiling" = yes && -+# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -+#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -+# { (exit 1); exit 1; }; } - if test -r "${HOME}/pwlib/include/ptlib.h"; then - eval "$as_ac_File=yes" - else -@@ -3153,10 +3153,10 @@ - if test "${ac_cv_file__usr_local_include_ptlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- test "$cross_compiling" = yes && -- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 --echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -- { (exit 1); exit 1; }; } -+# test "$cross_compiling" = yes && -+# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -+#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -+# { (exit 1); exit 1; }; } - if test -r "/usr/local/include/ptlib.h"; then - ac_cv_file__usr_local_include_ptlib_h=yes - else -@@ -3215,10 +3215,10 @@ - if test "${ac_cv_file__usr_include_ptlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- test "$cross_compiling" = yes && -- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 --echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -- { (exit 1); exit 1; }; } -+# test "$cross_compiling" = yes && -+# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -+#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -+# { (exit 1); exit 1; }; } - if test -r "/usr/include/ptlib.h"; then - ac_cv_file__usr_include_ptlib_h=yes - else -@@ -3985,10 +3985,10 @@ - if test "${ac_cv_file__usr_local_include_ffmpeg_avcodec_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- test "$cross_compiling" = yes && -- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 --echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -- { (exit 1); exit 1; }; } -+# test "$cross_compiling" = yes && -+# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -+#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -+# { (exit 1); exit 1; }; } - if test -r "/usr/local/include/ffmpeg/avcodec.h"; then - ac_cv_file__usr_local_include_ffmpeg_avcodec_h=yes - else -@@ -4193,10 +4193,10 @@ - if test "${ac_cv_file__usr_local_lib_libvich263_so+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- test "$cross_compiling" = yes && -- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 --echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -- { (exit 1); exit 1; }; } -+# test "$cross_compiling" = yes && -+# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -+#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -+# { (exit 1); exit 1; }; } - if test -r "/usr/local/lib/libvich263.so"; then - ac_cv_file__usr_local_lib_libvich263_so=yes - else -@@ -4219,10 +4219,10 @@ - if test "${ac_cv_file__usr_local_include_vich263_encoder_h263_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- test "$cross_compiling" = yes && -- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 --echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -- { (exit 1); exit 1; }; } -+# test "$cross_compiling" = yes && -+# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -+#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} -+# { (exit 1); exit 1; }; } - if test -r "/usr/local/include/vich263/encoder-h263.h"; then - ac_cv_file__usr_local_include_vich263_encoder_h263_h=yes - else diff --git a/openwrt/package/openldap/Config.in b/openwrt/package/openldap/Config.in deleted file mode 100644 index ec04eb4bcd9..00000000000 --- a/openwrt/package/openldap/Config.in +++ /dev/null @@ -1,33 +0,0 @@ -config BR2_COMPILE_OPENLDAP - tristate - default n - depends BR2_PACKAGE_LIBOPENLDAP - -config BR2_PACKAGE_LIBOPENLDAP - prompt "libopenldap....................... Open source LDAP (Lightweight Directory Access Protocol) client libraries" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_OPENLDAP - help - - OpenLDAP Software is an open source implementation of the - Lightweight Directory Access Protocol (LDAP). - - http://www.openldap.org/ - - This package contains the shared LDAP client libraries, needed by other programs. - -config BR2_PACKAGE_OPENLDAP_UTILS - prompt "openldap-utils.................. OpenLDAP client utilities" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBOPENLDAP - help - - OpenLDAP Software is an open source implementation of the - Lightweight Directory Access Protocol (LDAP). - - http://www.openldap.org/ - - This package contains client programs required to access LDAP servers. - diff --git a/openwrt/package/openldap/Makefile b/openwrt/package/openldap/Makefile deleted file mode 100644 index 5eac5807e86..00000000000 --- a/openwrt/package/openldap/Makefile +++ /dev/null @@ -1,140 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openldap -PKG_VERSION:=2.2.29 -PKG_RELEASE:=1 -PKG_MD5SUM:=6c4c72a1336aa45b463e738034c078d6 - -PKG_SOURCE_URL:=ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \ - ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \ - ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \ - ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -PKG_CONFIGURE_OPTIONS = \ - --enable-shared \ - --enable-static \ - --disable-debug \ - --enable-dynamic \ - --enable-syslog \ - --disable-local \ - --disable-slapd \ - --disable-slurpd \ - --with-cyrus-sasl \ - --without-fetch \ - --with-threads \ - --with-tls \ - --with-yielding_select="yes" \ - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBOPENLDAP,libopenldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENLDAP_UTILS,openldap-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - ./configure \ - --target=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - $(PKG_CONFIGURE_OPTIONS) \ - --without-cyrus-sasl \ - --without-threads \ - --without-tls \ - ) - $(MAKE) -C $(PKG_BUILD_DIR) depend - $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblutil - $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblber - $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblunicode - $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblber clean - $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblutil clean - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ac_cv_func_memcmp_clean="yes" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - $(PKG_CONFIGURE_OPTIONS) \ - ) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - - -$(IPKG_LIBOPENLDAP): - mkdir -p $(IDIR_LIBOPENLDAP)/etc/openldap - $(CP) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(IDIR_LIBOPENLDAP)/etc/openldap/ - mkdir -p $(IDIR_LIBOPENLDAP)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(IDIR_LIBOPENLDAP)/usr/lib/ - mkdir -p $(IDIR_LIBOPENLDAP)/usr/share/openldap - $(CP) $(PKG_INSTALL_DIR)/usr/share/openldap/* $(IDIR_LIBOPENLDAP)/usr/share/openldap/ - $(RSTRIP) $(IDIR_LIBOPENLDAP) - $(IPKG_BUILD) $(IDIR_LIBOPENLDAP) $(PACKAGE_DIR) - -$(IPKG_OPENLDAP_UTILS): - mkdir -p $(IDIR_OPENLDAP_UTILS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(IDIR_OPENLDAP_UTILS)/usr/bin/ - $(RSTRIP) $(IDIR_OPENLDAP_UTILS) - $(IPKG_BUILD) $(IDIR_OPENLDAP_UTILS) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libldap.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libldap.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/{lber,ldap}*.h - rm -rf $(STAGING_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/openldap/ipkg/libopenldap.conffiles b/openwrt/package/openldap/ipkg/libopenldap.conffiles deleted file mode 100644 index 25f44c32299..00000000000 --- a/openwrt/package/openldap/ipkg/libopenldap.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/openldap/ldap.conf diff --git a/openwrt/package/openldap/ipkg/libopenldap.control b/openwrt/package/openldap/ipkg/libopenldap.control deleted file mode 100644 index 84b145f58bb..00000000000 --- a/openwrt/package/openldap/ipkg/libopenldap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libopenldap -Priority: optional -Section: libs -Description: OpenLDAP (Lightweight Directory Access Protocol) client libraries -Depends: libopenssl, libsasl2 diff --git a/openwrt/package/openldap/ipkg/openldap-utils.control b/openwrt/package/openldap/ipkg/openldap-utils.control deleted file mode 100644 index 3a515c69f50..00000000000 --- a/openwrt/package/openldap/ipkg/openldap-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openldap-utils -Priority: optional -Section: admin -Description: OpenLDAP (Lightweight Directory Access Protocol) client utilities -Depends: libopenldap, libopenssl, libsasl2 diff --git a/openwrt/package/openldap/patches/500-cross-compile.patch b/openwrt/package/openldap/patches/500-cross-compile.patch deleted file mode 100644 index d0aafdcd766..00000000000 --- a/openwrt/package/openldap/patches/500-cross-compile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN openldap-2.2.26-orig/libraries/liblunicode/Makefile.in openldap-2.2.26-1/libraries/liblunicode/Makefile.in ---- openldap-2.2.26-orig/libraries/liblunicode/Makefile.in 2005-01-20 18:01:03.000000000 +0100 -+++ openldap-2.2.26-1/libraries/liblunicode/Makefile.in 2005-05-08 15:47:08.000000000 +0200 -@@ -29,7 +29,7 @@ - LDAP_INCDIR= ../../include - LDAP_LIBDIR= ../../libraries - --ucgendat: $(XLIBS) ucgendat.o -+ucgendat: ucgendat.o - $(LTLINK) -o $@ ucgendat.o $(LIBS) - ./ucgendat $(srcdir)/UnicodeData.txt -x $(srcdir)/CompositionExclusions.txt - diff --git a/openwrt/package/openldap/patches/750-no-strip.patch b/openwrt/package/openldap/patches/750-no-strip.patch deleted file mode 100644 index d472fd87f1c..00000000000 --- a/openwrt/package/openldap/patches/750-no-strip.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -ruN openldap-2.2.26-orig/clients/tools/Makefile.in openldap-2.2.26-1/clients/tools/Makefile.in ---- openldap-2.2.26-orig/clients/tools/Makefile.in 2005-01-20 18:00:55.000000000 +0100 -+++ openldap-2.2.26-1/clients/tools/Makefile.in 2005-05-08 15:47:08.000000000 +0200 -@@ -98,7 +98,7 @@ - -$(MKDIR) $(DESTDIR)$(bindir) - @( \ - for prg in $(PROGRAMS); do \ -- $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 $$prg$(EXEEXT) \ -+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT) \ - $(DESTDIR)$(bindir); \ - done \ - ) -diff -ruN openldap-2.2.26-orig/servers/slapd/Makefile.in openldap-2.2.26-1/servers/slapd/Makefile.in ---- openldap-2.2.26-orig/servers/slapd/Makefile.in 2005-01-20 18:01:05.000000000 +0100 -+++ openldap-2.2.26-1/servers/slapd/Makefile.in 2005-05-08 15:47:08.000000000 +0200 -@@ -355,7 +355,7 @@ - install-slapd: FORCE - -$(MKDIR) $(DESTDIR)$(libexecdir) - -$(MKDIR) $(DESTDIR)$(localstatedir)/run -- $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \ -+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 \ - slapd$(EXEEXT) $(DESTDIR)$(libexecdir) - @for i in $(SUBDIRS); do \ - if test -d $$i -a -f $$i/Makefile ; then \ -diff -ruN openldap-2.2.26-orig/servers/slurpd/Makefile.in openldap-2.2.26-1/servers/slurpd/Makefile.in ---- openldap-2.2.26-orig/servers/slurpd/Makefile.in 2005-01-20 18:01:19.000000000 +0100 -+++ openldap-2.2.26-1/servers/slurpd/Makefile.in 2005-05-08 15:47:08.000000000 +0200 -@@ -60,7 +60,7 @@ - @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-slurp - @( \ - for prg in $(PROGRAMS); do \ -- $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 $$prg$(EXEEXT) \ -+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT) \ - $(DESTDIR)$(libexecdir); \ - done \ - ) diff --git a/openwrt/package/openntpd/Config.in b/openwrt/package/openntpd/Config.in deleted file mode 100644 index 696e04f7234..00000000000 --- a/openwrt/package/openntpd/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_OPENNTPD - prompt "openntpd.......................... A free and easy to use NTP (Network Time Protocol) implementation" - tristate - default m if CONFIG_DEVEL - help - NTP server - - http://www.openntpd.org/ - diff --git a/openwrt/package/openntpd/Makefile b/openwrt/package/openntpd/Makefile deleted file mode 100644 index 80c3af1b9a2..00000000000 --- a/openwrt/package/openntpd/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openntpd -PKG_VERSION:=3.7p1 -PKG_RELEASE:=1 -PKG_MD5SUM:=10ed8eefd760e5819efcf3277b118f47 - -# space separated list or special @SF for sourceforge projects -PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/ \ - ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenNTPD/ \ - ftp://ftp.fr.openbsd.org/pub/OpenBSD/OpenNTPD/ \ - ftp://ftp.sunet.se/pub/OpenBSD/OpenNTPD/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,OPENNTPD,openntpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-builtin-arc4random \ - --with-privsep-user=ntp \ - --with-adjtimex \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_OPENNTPD): - install -d -m0755 $(IDIR_OPENNTPD)/etc - install -m0644 ./files/ntpd.conf $(IDIR_OPENNTPD)/etc/ - install -d -m0755 $(IDIR_OPENNTPD)/etc/init.d - install -m0755 ./files/ntpd.init $(IDIR_OPENNTPD)/etc/init.d/S55ntpd - install -d -m0755 $(IDIR_OPENNTPD)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/ntpd $(IDIR_OPENNTPD)/usr/sbin/ - $(RSTRIP) $(IDIR_OPENNTPD) - $(IPKG_BUILD) $(IDIR_OPENNTPD) $(PACKAGE_DIR) - diff --git a/openwrt/package/openntpd/files/ntpd.conf b/openwrt/package/openntpd/files/ntpd.conf deleted file mode 100644 index 6993b8eba28..00000000000 --- a/openwrt/package/openntpd/files/ntpd.conf +++ /dev/null @@ -1,3 +0,0 @@ -# use a random selection of 8 public stratum 2 servers -# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers -servers pool.ntp.org diff --git a/openwrt/package/openntpd/files/ntpd.init b/openwrt/package/openntpd/files/ntpd.init deleted file mode 100644 index 8bac705b4ae..00000000000 --- a/openwrt/package/openntpd/files/ntpd.init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -mkdir -p `awk -F: '/^ntp:/{print $6}' /etc/passwd` -/usr/sbin/ntpd -s diff --git a/openwrt/package/openntpd/ipkg/openntpd.conffiles b/openwrt/package/openntpd/ipkg/openntpd.conffiles deleted file mode 100644 index 81306c3c97c..00000000000 --- a/openwrt/package/openntpd/ipkg/openntpd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ntpd.conf diff --git a/openwrt/package/openntpd/ipkg/openntpd.control b/openwrt/package/openntpd/ipkg/openntpd.control deleted file mode 100644 index 05e16a888d2..00000000000 --- a/openwrt/package/openntpd/ipkg/openntpd.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: openntpd -Priority: optional -Section: net -Description: OpenNTPD is a FREE, easy to use implementation of NTP - (the Network Time Protocol). It provides the ability to sync the - local clock to remote NTP servers and can act as NTP server itself, - redistributing the local clock. diff --git a/openwrt/package/openntpd/ipkg/openntpd.postinst b/openwrt/package/openntpd/ipkg/openntpd.postinst deleted file mode 100644 index 4b2ffe9df61..00000000000 --- a/openwrt/package/openntpd/ipkg/openntpd.postinst +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -name=ntp -id=50 - -# do not change below -# check if we are on real system -if [ -z "${IPKG_INSTROOT}" ]; then - # create copies of passwd and group, if we use squashfs - rootfs=`mount |awk '/root/ { print $5 }'` - if [ "$rootfs" = "squashfs" ]; then - if [ -h /etc/group ]; then - rm /etc/group - cp -p /rom/etc/group /etc/group - fi - if [ -h /etc/passwd ]; then - rm /etc/passwd - cp -p /rom/etc/passwd /etc/passwd - fi - fi -fi - -echo "" -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/group)" ]; then - echo "adding group $name to /etc/group" - echo "${name}:x:${id}:" >> ${IPKG_INSTROOT}/etc/group -fi - -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/passwd)" ]; then - echo "adding user $name to /etc/passwd" - echo "${name}:x:${id}:${id}:${name}:/tmp/.${name}:/bin/false" >> ${IPKG_INSTROOT}/etc/passwd -fi - -grep -q '^ntp[[:space:]]*123/udp' ${IPKG_INSTROOT}/etc/services 2>/dev/null -[ $? -ne 0 ] && echo "ntp 123/udp" >>${IPKG_INSTROOT}/etc/services diff --git a/openwrt/package/openntpd/patches/01-adjtimex_linux.patch b/openwrt/package/openntpd/patches/01-adjtimex_linux.patch deleted file mode 100644 index 4841e123fa1..00000000000 --- a/openwrt/package/openntpd/patches/01-adjtimex_linux.patch +++ /dev/null @@ -1,177 +0,0 @@ -diff -urN openntpd-3.7p1.orig/client.c openntpd-3.7p1/client.c ---- openntpd-3.7p1.orig/client.c 2005-03-13 13:36:38.000000000 +0100 -+++ openntpd-3.7p1/client.c 2006-02-23 16:27:53.686827824 +0100 -@@ -306,7 +306,7 @@ - priv_adjtime(); - - for (i = 0; i < OFFSET_ARRAY_SIZE; i++) -- if (p->reply[i].rcvd <= p->reply[best].rcvd) -+ /* if (p->reply[i].rcvd <= p->reply[best].rcvd) */ - p->reply[i].good = 0; - - return (0); -diff -urN openntpd-3.7p1.orig/configure.ac openntpd-3.7p1/configure.ac ---- openntpd-3.7p1.orig/configure.ac 2005-05-23 13:11:08.000000000 +0200 -+++ openntpd-3.7p1/configure.ac 2006-02-23 16:27:53.688827520 +0100 -@@ -466,6 +466,11 @@ - [ builtin_arc4random=$withval ] - ) - -+AC_ARG_WITH(adjtimex, -+ [ --with-adjtimex Use adjtimex to adjust kernel skew], -+ [ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ] -+) -+ - # Search for OpenSSL if required. - if test "$ac_cv_func_arc4random" != "yes" && test "x$builtin_arc4random" != "xyes"; then - saved_CPPFLAGS="$CPPFLAGS" -diff -urN openntpd-3.7p1.orig/defines.h openntpd-3.7p1/defines.h ---- openntpd-3.7p1.orig/defines.h 2005-05-23 02:16:33.000000000 +0200 -+++ openntpd-3.7p1/defines.h 2006-02-23 16:27:53.688827520 +0100 -@@ -20,6 +20,10 @@ - # define setproctitle(x) - #endif - -+#ifdef USE_ADJTIMEX -+# define adjtime(a,b) (_compat_adjtime((a),(b))) -+#endif -+ - #if !defined(SA_LEN) - # if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) - # define SA_LEN(x) ((x)->sa_len) -diff -urN openntpd-3.7p1.orig/openbsd-compat/Makefile.in openntpd-3.7p1/openbsd-compat/Makefile.in ---- openntpd-3.7p1.orig/openbsd-compat/Makefile.in 2004-12-20 00:41:36.000000000 +0100 -+++ openntpd-3.7p1/openbsd-compat/Makefile.in 2006-02-23 16:27:53.901795144 +0100 -@@ -9,7 +9,7 @@ - OPENBSD= asprintf.o daemon.o inet_pton.o strlcpy.o - COMPAT= atomicio.o bsd-arc4random.o bsd-misc.o bsd-poll.o \ - bsd-snprintf.o fake-rfc2553.o uidswap.o --PORT= port-qnx.o -+PORT= port-linux.o port-qnx.o - - VPATH=@srcdir@ - CC=@CC@ -diff -urN openntpd-3.7p1.orig/openbsd-compat/openbsd-compat.h openntpd-3.7p1/openbsd-compat/openbsd-compat.h ---- openntpd-3.7p1.orig/openbsd-compat/openbsd-compat.h 2004-12-19 04:04:22.000000000 +0100 -+++ openntpd-3.7p1/openbsd-compat/openbsd-compat.h 2006-02-23 16:27:53.948788000 +0100 -@@ -44,6 +44,11 @@ - __attribute__((__format__ (printf, 2, 3))); - #endif - -+#ifdef USE_ADJTIMEX -+# include -+int _compat_adjtime(const struct timeval *, struct timeval *); -+#endif -+ - #ifndef HAVE_INET_PTON - int inet_pton(int, const char *, void *); - #endif -diff -urN openntpd-3.7p1.orig/openbsd-compat/port-linux.c openntpd-3.7p1/openbsd-compat/port-linux.c ---- openntpd-3.7p1.orig/openbsd-compat/port-linux.c 1970-01-01 01:00:00.000000000 +0100 -+++ openntpd-3.7p1/openbsd-compat/port-linux.c 2006-02-23 16:27:53.996780704 +0100 -@@ -0,0 +1,105 @@ -+/* $Id$ */ -+ -+/* -+ * Copyright (c) 2004 Darren Tucker -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include "includes.h" -+ -+#ifdef USE_ADJTIMEX -+#include -+#include -+#ifdef adjtime -+# undef adjtime -+#endif -+ -+#include "ntpd.h" -+ -+/* scale factor used by adjtimex freq param. 1 ppm = 65536 */ -+#define ADJTIMEX_FREQ_SCALE 65536 -+ -+/* maximum change to skew per adjustment, in PPM */ -+#define MAX_SKEW_DELTA 5.0 -+ -+int -+_compat_adjtime(const struct timeval *delta, struct timeval *olddelta) -+{ -+ static struct timeval tlast = {0,0}; -+ static double tskew = 0; -+ static int synced = -1; -+ struct timeval tnow, tdelta; -+ double skew = 0, newskew, deltaskew, adjust, interval = 0; -+ struct timex tmx; -+ int result, saved_errno; -+ -+ gettimeofday(&tnow, NULL); -+ adjust = (double)delta->tv_sec; -+ adjust += (double)delta->tv_usec / 1000000; -+ -+ /* Even if the caller doesn't care about the olddelta, we do */ -+ if (olddelta == NULL) -+ olddelta = &tdelta; -+ -+ result = adjtime(delta, olddelta); -+ saved_errno = errno; -+ -+ if (olddelta->tv_sec == 0 && olddelta->tv_usec == 0 && -+ synced != INT_MAX) -+ synced++; -+ else -+ synced = 0; -+ -+ /* -+ * do skew calculations if we have synced -+ */ -+ if (synced == 0 ) { -+ tmx.modes = 0; -+ if (adjtimex(&tmx) == -1) -+ log_warn("adjtimex get failed"); -+ else -+ tskew = (double)tmx.freq / ADJTIMEX_FREQ_SCALE; -+ } else if (synced >= 1) { -+ interval = (double)(tnow.tv_sec - tlast.tv_sec); -+ interval += (double)(tnow.tv_usec - tlast.tv_usec) / 1000000; -+ -+ skew = (adjust * 1000000) / interval; -+ newskew = ((tskew * synced) + skew) / synced; -+ deltaskew = newskew - tskew; -+ -+ if (deltaskew > MAX_SKEW_DELTA) { -+ log_info("skew change %0.3lf exceeds limit", deltaskew); -+ tskew += MAX_SKEW_DELTA; -+ } else if (deltaskew < -MAX_SKEW_DELTA) { -+ log_info("skew change %0.3lf exceeds limit", deltaskew); -+ tskew -= MAX_SKEW_DELTA; -+ } else { -+ tskew = newskew; -+ } -+ -+ /* Adjust the kernel skew. */ -+ tmx.freq = (long)(tskew * ADJTIMEX_FREQ_SCALE); -+ tmx.modes = ADJ_FREQUENCY; -+ if (adjtimex(&tmx) == -1) -+ log_warn("adjtimex set freq failed"); -+ } -+ -+ log_debug("interval %0.3lf skew %0.3lf total skew %0.3lf", interval, -+ skew, tskew); -+ -+ tlast = tnow; -+ errno = saved_errno; -+ return result; -+} -+#endif diff --git a/openwrt/package/openser/Config.in b/openwrt/package/openser/Config.in deleted file mode 100644 index 26fc108da1f..00000000000 --- a/openwrt/package/openser/Config.in +++ /dev/null @@ -1,239 +0,0 @@ -menu "openser........................... Configurable, free SIP server" - -config BR2_PACKAGE_OPENSER - prompt "openser........................... Configurable, free SIP server" - tristate - default m if CONFIG_DEVEL - help - Open SIP Express Router (OpenSER) is a high-performance, - configurable, free SIP server. - -config BR2_PACKAGE_OPENSER_MOD_AUTH - prompt "openser-mod-auth................ Authentication support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable authentication support - -config BR2_PACKAGE_OPENSER_MOD_AUTH_DB - prompt "openser-mod-auth-db........... Authentication with database support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER_MOD_AUTH - help - Enable authentication with database support - -config BR2_PACKAGE_OPENSER_MOD_AUTH_RADIUS - prompt "openser-mod-auth-radius....... Authentication with RADIUS support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER_MOD_AUTH - select BR2_PACKAGE_LIBRADIUSCLIENT_NG - help - Authentication against RADIUS - -config BR2_PACKAGE_OPENSER_MOD_AVP_RADIUS - prompt "openser-mod-avp-radius.......... AVP with RADIUS support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - select BR2_PACKAGE_LIBRADIUSCLIENT_NG - help - Enable AVP with RADIUS support - -config BR2_PACKAGE_OPENSER_MOD_AVPOPS - prompt "openser-mod-avpops.............. AVP options support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable AVP options support - -config BR2_PACKAGE_OPENSER_MOD_DISPATCHER - prompt "openser-mod-dispatcher.......... dispatcher support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable dispatcher options support - -config BR2_PACKAGE_OPENSER_MOD_DIVERSION - prompt "openser-mod-diversion........... diversion support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable diversion options support - -config BR2_PACKAGE_OPENSER_MOD_FLATSTORE - prompt "openser-mod-flatstore........... flatstore support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable flatstore support - -config BR2_PACKAGE_OPENSER_MOD_GFLAGS - prompt "openser-mod-gflags.............. gflags support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable GFlags support - -config BR2_PACKAGE_OPENSER_MOD_GROUP - prompt "openser-mod-group............... group support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable group support - -config BR2_PACKAGE_OPENSER_MOD_GROUP_RADIUS - prompt "openser-mod-group-radius........ group with RADIUS support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable group with RADIUS support - -config BR2_PACKAGE_OPENSER_MOD_LCR - prompt "openser-mod-lcr................. Least Cost Routing support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - select BR2_PACKAGE_OPENSER_MOD_MYSQL - help - Enable Least Cost Routing support - -config BR2_PACKAGE_OPENSER_MOD_MEDIAPROXY - prompt "openser-mod-mediaproxy.......... Mediaproxy support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable mediaproxy support - -config BR2_PACKAGE_OPENSER_MOD_MSILO - prompt "openser-mod-msilo............... MSilo support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable msilo support - -config BR2_PACKAGE_OPENSER_MOD_MYSQL - prompt "openser-mod-mysql............... MySQL support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - select BR2_PACKAGE_LIBMYSQLCLIENT - help - Enable MySQL support - -config BR2_PACKAGE_OPENSER_MOD_NATHELPER - prompt "openser-mod-nathelper........... NAT helper support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - NAT helper support - -config BR2_PACKAGE_OPENSER_MOD_OPTIONS - prompt "openser-mod-options............. options support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable options support - -config BR2_PACKAGE_OPENSER_MOD_PDT - prompt "openser-mod-pdt................. PDT support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable pdt support - -config BR2_PACKAGE_OPENSER_MOD_PERMISSIONS - prompt "openser-mod-permissions......... Permissions support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable permissions support - -config BR2_PACKAGE_OPENSER_MOD_PIKE - prompt "openser-mod-pike................ PIKE support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable pike support - -config BR2_PACKAGE_OPENSER_MOD_SMS - prompt "openser-mod-sms................. SMS support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - SMS support - -config BR2_PACKAGE_OPENSER_MOD_SPEEDDIAL - prompt "openser-mod-speeddial........... Speed Dial support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Speed Dial support - -config BR2_PACKAGE_OPENSER_MOD_UAC - prompt "openser-mod-uac................. UAC support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable UAC support - -config BR2_PACKAGE_OPENSER_MOD_UAC_REDIRECT - prompt "openser-mod-uac................. UAC redirect support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable UAC redirect support - -config BR2_PACKAGE_OPENSER_MOD_URI - prompt "openser-mod-uri................. URI support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable URI support - -config BR2_PACKAGE_OPENSER_MOD_URI_DB - prompt "openser-mod-uri-db.............. URI database support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable URI database support - -config BR2_PACKAGE_OPENSER_MOD_URI_RADIUS - prompt "openser-mod-uri-radius.......... URI with RADIUS support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Enable URI with RADIUS support - -config BR2_PACKAGE_OPENSER_MOD_XLOG - prompt "openser-mod-xlog................ Logging support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSER - help - Logging support - -endmenu diff --git a/openwrt/package/openser/Makefile b/openwrt/package/openser/Makefile deleted file mode 100644 index 72a8fe3a43b..00000000000 --- a/openwrt/package/openser/Makefile +++ /dev/null @@ -1,127 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openser -PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=eebc16665003ee92daf96b216d6f9563 -# PKG_VARIANT:=-tls # for tls version -PKG_VARIANT:= - -PKG_SOURCE_URL:=http://openser.org/pub/openser/$(PKG_VERSION)/src -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -define PKG_mod_template - -$$(IPKG_$(1)): - [ -z "$(2)" ] || install -d -m 0755 $$(IDIR_$(1))/usr/lib/openser/modules/ - $(CP) $(PKG_BUILD_DIR)/modules/$(2)/$(2).so \ - $$(IDIR_$(1))/usr/lib/openser/modules/ ; \ - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,OPENSER,openser,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_ACCOUNTING,openser-mod-acc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_AUTH,openser-mod-auth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_AUTH_DB,openser-mod-auth-db,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_AUTH_RADIUS,openser-mod-auth-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_AVP_RADIUS,openser-mod-avp-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_AVPOPS,openser-mod-avpops,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_DISPATCHER,openser-mod-dispatcher,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_DIVERSION,openser-mod-diversion,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_FLATSTORE,openser-mod-flatstore,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_GFLAGS,openser-mod-gflags,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_GROUP,openser-mod-group,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_GROUP_RADIUS,openser-mod-group-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_LCR,openser-mod-lcr,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_MEDIAPROXY,openser-mod-mediaproxy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_MSILO,openser-mod-msilo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_MYSQL,openser-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_NATHELPER,openser-mod-nathelper,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_OPTIONS,openser-mod-options,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_PDT,openser-mod-pdt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_PERMISSIONS,openser-mod-permissions,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_PIKE,openser-mod-pike,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_SMS,openser-mod-sms,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_UAC,openser-mod-uac,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_UAC_REDIRECT,openser-mod-uac-redirect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_URI,openser-mod-uri,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_URI_DB,openser-mod-uri-db,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_URI_RADIUS,openser-mod-uri-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSER_MOD_XLOG,openser-mod-xlog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_mod_template,OPENSER_MOD_ACCOUNTING,acc)) -$(eval $(call PKG_mod_template,OPENSER_MOD_AUTH,auth)) -$(eval $(call PKG_mod_template,OPENSER_MOD_AUTH_DB,auth_db)) -$(eval $(call PKG_mod_template,OPENSER_MOD_AUTH_RADIUS,auth_radius)) -$(eval $(call PKG_mod_template,OPENSER_MOD_AVP_RADIUS,avp_radius)) -$(eval $(call PKG_mod_template,OPENSER_MOD_AVPOPS,avpops)) -$(eval $(call PKG_mod_template,OPENSER_MOD_DISPATCHER,dispatcher)) -$(eval $(call PKG_mod_template,OPENSER_MOD_DIVERSION,diversion)) -$(eval $(call PKG_mod_template,OPENSER_MOD_FLATSTORE,flatstore)) -$(eval $(call PKG_mod_template,OPENSER_MOD_GFLAGS,gflags)) -$(eval $(call PKG_mod_template,OPENSER_MOD_GROUP,group)) -$(eval $(call PKG_mod_template,OPENSER_MOD_GROUP_RADIUS,group_radius)) -$(eval $(call PKG_mod_template,OPENSER_MOD_LCR,lcr)) -$(eval $(call PKG_mod_template,OPENSER_MOD_MEDIAPROXY,mediaproxy)) -$(eval $(call PKG_mod_template,OPENSER_MOD_MSILO,msilo)) -$(eval $(call PKG_mod_template,OPENSER_MOD_MYSQL,mysql)) -$(eval $(call PKG_mod_template,OPENSER_MOD_NATHELPER,nathelper)) -$(eval $(call PKG_mod_template,OPENSER_MOD_OPTIONS,options)) -$(eval $(call PKG_mod_template,OPENSER_MOD_PDT,pdt)) -$(eval $(call PKG_mod_template,OPENSER_MOD_PERMISSIONS,permissions)) -$(eval $(call PKG_mod_template,OPENSER_MOD_PIKE,pike)) -$(eval $(call PKG_mod_template,OPENSER_MOD_SMS,sms)) -$(eval $(call PKG_mod_template,OPENSER_MOD_SPEEDIAL,speeddial)) -$(eval $(call PKG_mod_template,OPENSER_MOD_UAC,uac)) -$(eval $(call PKG_mod_template,OPENSER_MOD_UAC_REDIRECT,uac_redirect)) -$(eval $(call PKG_mod_template,OPENSER_MOD_URI,uri)) -$(eval $(call PKG_mod_template,OPENSER_MOD_URI_DB,uri_db)) -$(eval $(call PKG_mod_template,OPENSER_MOD_URI_RADIUS,uri_radius)) -$(eval $(call PKG_mod_template,OPENSER_MOD_XLOG,xlog)) - -# Select here the modules for the ipk package -OPENSER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops exec - -OPENSER_MODULE_FILES := $(foreach module,$(OPENSER_MODULES),modules/$(module)/$(module).so) -OPENSER_MODULES := $(patsubst %,modules/%,$(OPENSER_MODULES)) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - prefix=/ \ - extra_defs="-DUSE_PTHREAD_MUTEX " \ - CC="$(TARGET_CC)" \ - ARCH="$(ARCH)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LOCALBASE="$(STAGING_DIR)/usr" \ - all utils/gen_ha1/gen_ha1 - touch $@ - -$(IPKG_OPENSER): - mkdir -p $(IDIR_OPENSER)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_OPENSER)/usr/sbin/ - $(CP) $(PKG_BUILD_DIR)/utils/gen_ha1/gen_ha1 $(IDIR_OPENSER)/usr/sbin/openser_gen_ha1 - $(CP) $(PKG_BUILD_DIR)/scripts/sc $(IDIR_OPENSER)/usr/sbin/openserctl - chmod 744 $(IDIR_OPENSER)/usr/sbin/openserctl - $(CP) $(PKG_BUILD_DIR)/scripts/sc.dbtext $(IDIR_OPENSER)/usr/sbin/dbtextctl - chmod 744 $(IDIR_OPENSER)/usr/sbin/dbtextctl - mkdir -p $(IDIR_OPENSER)/usr/lib/openser/modules - (cd $(PKG_BUILD_DIR);\ - $(CP) $(OPENSER_MODULE_FILES) $(IDIR_OPENSER)/usr/lib/openser/modules/; \ - ) - mkdir -p $(IDIR_OPENSER)/etc/openser - $(CP) $(PKG_BUILD_DIR)/etc/openser.cfg $(IDIR_OPENSER)/etc/openser/ - $(RSTRIP) $(IDIR_OPENSER) - $(IPKG_BUILD) $(IDIR_OPENSER) $(PACKAGE_DIR) diff --git a/openwrt/package/openser/ipkg/openser-mod-acc.control b/openwrt/package/openser/ipkg/openser-mod-acc.control deleted file mode 100644 index 43b2e581c3e..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-acc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-acc -Depends: openser, libradiusclient-ng -Section: net -Priority: optional -Description: accounting support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-auth-db.control b/openwrt/package/openser/ipkg/openser-mod-auth-db.control deleted file mode 100644 index 9b6878903e8..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-auth-db.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-auth-db -Depends: openser, libmysqlclient -Section: net -Priority: optional -Description: authentication support against database for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-auth-radius.control b/openwrt/package/openser/ipkg/openser-mod-auth-radius.control deleted file mode 100644 index dbcdcabadbc..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-auth-radius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-auth-radius -Depends: openser, libradiusclient-ng -Section: net -Priority: optional -Description: authentication support against RADIUS for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-auth.control b/openwrt/package/openser/ipkg/openser-mod-auth.control deleted file mode 100644 index 4877347fa77..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-auth.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-auth -Depends: openser -Section: net -Priority: optional -Description: authentication support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-avp-radius.control b/openwrt/package/openser/ipkg/openser-mod-avp-radius.control deleted file mode 100644 index 1f0979791f7..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-avp-radius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-avp-radius -Depends: openser -Section: net -Priority: optional -Description: avp_radius support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-avp_radius.control b/openwrt/package/openser/ipkg/openser-mod-avp_radius.control deleted file mode 100644 index 5736697890c..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-avp_radius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-avp_radius -Depends: openser -Section: net -Priority: optional -Description: avp_radius support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-avpops.control b/openwrt/package/openser/ipkg/openser-mod-avpops.control deleted file mode 100644 index f88d54d4bcf..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-avpops.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-avpops -Depends: openser -Section: net -Priority: optional -Description: AVPOPS support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-dispatcher.control b/openwrt/package/openser/ipkg/openser-mod-dispatcher.control deleted file mode 100644 index eabfd6d0166..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-dispatcher.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-dispatcher -Depends: openser -Section: net -Priority: optional -Description: dispatcher support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-diversion.control b/openwrt/package/openser/ipkg/openser-mod-diversion.control deleted file mode 100644 index bcf40114736..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-diversion.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-diversion -Depends: openser -Section: net -Priority: optional -Description: diversion support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-flatstore.control b/openwrt/package/openser/ipkg/openser-mod-flatstore.control deleted file mode 100644 index 96e0835c11c..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-flatstore.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-flatstore -Depends: openser -Section: net -Priority: optional -Description: flatstore support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-gflags.control b/openwrt/package/openser/ipkg/openser-mod-gflags.control deleted file mode 100644 index ce994943482..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-gflags.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-gflags -Depends: openser -Section: net -Priority: optional -Description: gflags support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-group-radius.control b/openwrt/package/openser/ipkg/openser-mod-group-radius.control deleted file mode 100644 index bb5fbed30b1..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-group-radius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-group-radius -Depends: openser -Section: net -Priority: optional -Description: group_radius support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-group.control b/openwrt/package/openser/ipkg/openser-mod-group.control deleted file mode 100644 index b7c1130db9d..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-group.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-group -Depends: openser -Section: net -Priority: optional -Description: group support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-group_radius.control b/openwrt/package/openser/ipkg/openser-mod-group_radius.control deleted file mode 100644 index bf47826e572..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-group_radius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-group_radius -Depends: openser -Section: net -Priority: optional -Description: group_radius support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-lcr.control b/openwrt/package/openser/ipkg/openser-mod-lcr.control deleted file mode 100644 index 92541b9bd2b..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-lcr.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-lcr -Depends: openser -Section: net -Priority: optional -Description: Least Cost Routing support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-mediaproxy.control b/openwrt/package/openser/ipkg/openser-mod-mediaproxy.control deleted file mode 100644 index f5172ba7be7..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-mediaproxy.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-mediaproxy -Depends: openser -Section: net -Priority: optional -Description: mediaproxy support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-msilo.control b/openwrt/package/openser/ipkg/openser-mod-msilo.control deleted file mode 100644 index 215701e99c4..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-msilo.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-msilo -Depends: openser -Section: net -Priority: optional -Description: msilo support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-mysql.control b/openwrt/package/openser/ipkg/openser-mod-mysql.control deleted file mode 100644 index 5ca3fc3dd35..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-mysql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-mysql -Depends: openser, libmysqlclient -Section: net -Priority: optional -Description: MySQL support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-nathelper.control b/openwrt/package/openser/ipkg/openser-mod-nathelper.control deleted file mode 100644 index dccbb0e026e..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-nathelper.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-nathelper -Depends: openser -Section: net -Priority: optional -Description: NAT helper support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-options.control b/openwrt/package/openser/ipkg/openser-mod-options.control deleted file mode 100644 index b94da0be4ae..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-options.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-options -Depends: openser -Section: net -Priority: optional -Description: options support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-pdt.control b/openwrt/package/openser/ipkg/openser-mod-pdt.control deleted file mode 100644 index 953929110d0..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-pdt.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-pdt -Depends: openser -Section: net -Priority: optional -Description: pdt support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-permissions.control b/openwrt/package/openser/ipkg/openser-mod-permissions.control deleted file mode 100644 index 302abdb995a..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-permissions.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-permissions -Depends: openser -Section: net -Priority: optional -Description: permissions support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-pike.control b/openwrt/package/openser/ipkg/openser-mod-pike.control deleted file mode 100644 index c8a2111209f..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-pike.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-pike -Depends: openser -Section: net -Priority: optional -Description: pike support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-sms.control b/openwrt/package/openser/ipkg/openser-mod-sms.control deleted file mode 100644 index 4b8547292bf..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-sms.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-sms -Depends: openser -Section: net -Priority: optional -Description: SMS support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-speeddial.control b/openwrt/package/openser/ipkg/openser-mod-speeddial.control deleted file mode 100644 index 75b2f555ad5..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-speeddial.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-speeddial -Depends: openser -Section: net -Priority: optional -Description: Speed-dial support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-uac-redirect.control b/openwrt/package/openser/ipkg/openser-mod-uac-redirect.control deleted file mode 100644 index 9a4785f995f..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-uac-redirect.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-uac-redirect -Depends: openser -Section: net -Priority: optional -Description: uac_redirect support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-uac.control b/openwrt/package/openser/ipkg/openser-mod-uac.control deleted file mode 100644 index 957bbaaa1ce..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-uac.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-uac -Depends: openser -Section: net -Priority: optional -Description: uac support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-uac_redirect.control b/openwrt/package/openser/ipkg/openser-mod-uac_redirect.control deleted file mode 100644 index 1eb0569e1dd..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-uac_redirect.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-uac_redirect -Depends: openser -Section: net -Priority: optional -Description: uac_redirect support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-uri-db.control b/openwrt/package/openser/ipkg/openser-mod-uri-db.control deleted file mode 100644 index a48560babff..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-uri-db.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-uri-db -Depends: openser -Section: net -Priority: optional -Description: uri_db support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-uri-radius.control b/openwrt/package/openser/ipkg/openser-mod-uri-radius.control deleted file mode 100644 index 55f1b2a915b..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-uri-radius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-uri-radius -Depends: openser -Section: net -Priority: optional -Description: uri_radius support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-uri.control b/openwrt/package/openser/ipkg/openser-mod-uri.control deleted file mode 100644 index ab9e33d9861..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-uri.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-uri -Depends: openser -Section: net -Priority: optional -Description: uri support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-uri_db.control b/openwrt/package/openser/ipkg/openser-mod-uri_db.control deleted file mode 100644 index 1fa05d11fcc..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-uri_db.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-uri_db -Depends: openser -Section: net -Priority: optional -Description: uri_db support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-uri_radius.control b/openwrt/package/openser/ipkg/openser-mod-uri_radius.control deleted file mode 100644 index 070bd3087ec..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-uri_radius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-uri_radius -Depends: openser -Section: net -Priority: optional -Description: uri_radius support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser-mod-xlog.control b/openwrt/package/openser/ipkg/openser-mod-xlog.control deleted file mode 100644 index 81483d295f7..00000000000 --- a/openwrt/package/openser/ipkg/openser-mod-xlog.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openser-mod-xlog -Depends: openser -Section: net -Priority: optional -Description: Xlog targets support for OpenSER diff --git a/openwrt/package/openser/ipkg/openser.conffiles b/openwrt/package/openser/ipkg/openser.conffiles deleted file mode 100644 index edd06eb71ed..00000000000 --- a/openwrt/package/openser/ipkg/openser.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/openser/openser.cfg diff --git a/openwrt/package/openser/ipkg/openser.control b/openwrt/package/openser/ipkg/openser.control deleted file mode 100644 index 65a6a0f3897..00000000000 --- a/openwrt/package/openser/ipkg/openser.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: openser -Section: net -Priority: optional -Description: OpenSER is a high-performance, configurable, free SIP server. diff --git a/openwrt/package/openser/patches/Makefile.defs.patch b/openwrt/package/openser/patches/Makefile.defs.patch deleted file mode 100644 index a7275bdd06e..00000000000 --- a/openwrt/package/openser/patches/Makefile.defs.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- openser-1.0.0-tls.orig/Makefile.defs 2005-10-28 18:32:39.000000000 +0200 -+++ openser-1.0.0-tls/Makefile.defs 2006-01-15 23:40:18.391547040 +0100 -@@ -917,7 +917,7 @@ - endif - YACC_FLAGS=-d -b cfg - # on solaris add -lxnet (e.g. LIBS= -lxnet) --LIBS= -lfl -ldl -lresolv -+LIBS= -ldl -lresolv - - - #os specific stuff -@@ -955,7 +955,7 @@ - endif - OLD_SOLARIS= $(shell echo "$(OSREL)" | \ - sed -e 's/^5\.[0-6][^0-9]*$$/yes/' ) -- LIBS+= -L$(LOCALBASE)/lib -lfl -lxnet -lnsl -+ LIBS+= -L$(LOCALBASE)/lib -lxnet -lnsl - ifeq ($(OLD_SOLARIS), yes) - LIBS+=-lposix4 - else -@@ -970,9 +970,9 @@ - ifneq ($(found_lock_method), yes) - DEFS+= -DUSE_PTHREAD_MUTEX # try pthread sems - found_lock_method=yes -- LIBS= -pthread -lfl #dlopen is in libc -+ LIBS= -pthread #dlopen is in libc - else -- LIBS= -lfl #dlopen is in libc -+ LIBS= #dlopen is in libc - endif - YACC=yacc - endif -@@ -987,7 +987,7 @@ - # (symbols on openbsd are prefixed by "_") - YACC=yacc - # no sched_yield on openbsd unless linking with c_r (not recommended) -- LIBS= -lfl -+ LIBS= - OPENBSD_IS_AOUT= $(shell echo "$(OSREL)" | \ - sed -e 's/^3\.[0-3][^0-9]*$$/yes/' |sed -e 's/^[0-2]\..*/yes/') - # exception: on sparc openbsd 3.2 is elf and not aout -@@ -1014,7 +1014,7 @@ - found_lock_method=yes - endif - YACC=yacc -- LIBS= -lfl -+ LIBS= - endif - - # OS X support, same as freebsd -@@ -1028,9 +1028,9 @@ - ifneq ($(found_lock_method), yes) - DEFS+= -DUSE_PTHREAD_MUTEX # try pthread sems - found_lock_method=yes -- LIBS= -pthread -lfl -lresolv #dlopen is in libc -+ LIBS= -pthread -lresolv #dlopen is in libc - else -- LIBS= -lfl -lresolv #dlopen is in libc -+ LIBS= -lresolv #dlopen is in libc - endif - LDFLAGS= # darwin doesn't like -O2 or -E - MOD_LDFLAGS= -bundle -bundle_loader ../../$(MAIN_NAME) -@@ -1047,7 +1047,7 @@ - - #add libssl if needed - ifneq ($(TLS),) --DEFS+= -I$(LOCALBASE)/ssl/include -+DEFS+= -I$(LOCALBASE)/include - LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto - endif - diff --git a/openwrt/package/openser/patches/cfg.lex.patch b/openwrt/package/openser/patches/cfg.lex.patch deleted file mode 100644 index 39eacb2dec8..00000000000 --- a/openwrt/package/openser/patches/cfg.lex.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- openser-1.0.0-tls.orig/cfg.lex 2005-09-02 17:34:41.000000000 +0200 -+++ openser-1.0.0-tls/cfg.lex 2006-01-05 01:34:50.279630928 +0100 -@@ -85,6 +85,10 @@ - static char* addstr(struct str_buf *, char*, int); - static void count(); - -+ int yywrap(void) -+ { -+ return 1; -+ } - - %} - diff --git a/openwrt/package/openser/patches/config.h.patch b/openwrt/package/openser/patches/config.h.patch deleted file mode 100644 index 45af8f1f7a4..00000000000 --- a/openwrt/package/openser/patches/config.h.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- openser-1.0.0-tls.orig/config.h 2005-08-23 19:31:12.000000000 +0200 -+++ openser-1.0.0-tls/config.h 2006-01-05 01:42:14.101159800 +0100 -@@ -48,7 +48,7 @@ - #define MAX_LISTEN 16 - - /* default number of child processes started */ --#define CHILD_NO 8 -+#define CHILD_NO 4 - - #define RT_NO 40 /* routing tables number */ - #define FAILURE_RT_NO RT_NO /* on_failure routing tables number */ -@@ -68,10 +68,10 @@ - #define CONTENT_LENGTH "Content-Length: " - #define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) - --#define USER_AGENT "User-Agent: OpenSer (" VERSION " (" ARCH "/" OS"))" -+#define USER_AGENT "User-Agent: OpenSer " VERSION " (boozy.milkfish.org)" - #define USER_AGENT_LEN (sizeof(USER_AGENT)-1) - --#define SERVER_HDR "Server: OpenSer (" VERSION " (" ARCH "/" OS"))" -+#define SERVER_HDR "Server: OpenSer " VERSION " (boozy.milkfish.org)" - #define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) - - #define MAX_WARNING_LEN 256 -@@ -113,7 +113,7 @@ - #define PKG_MEM_POOL_SIZE 1024*1024 - - /*used if SH_MEM is defined*/ --#define SHM_MEM_SIZE 32 -+#define SHM_MEM_SIZE 8 - - #define TIMER_TICK 1 - diff --git a/openwrt/package/openser/patches/modules-build.patch b/openwrt/package/openser/patches/modules-build.patch deleted file mode 100644 index 6e6ee00c40a..00000000000 --- a/openwrt/package/openser/patches/modules-build.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- openser-1.0.1/Makefile 2006-02-15 20:52:21.000000000 +0100 -+++ openser-1.0.1.new/Makefile 2006-03-17 11:01:27.417488936 +0100 -@@ -46,8 +46,7 @@ - skip_modules?= - - # if not set on the cmd. line or the env, exclude this modules: --exclude_modules?= jabber cpl-c pa postgres mysql \ -- avp_radius auth_radius group_radius uri_radius -+exclude_modules?= jabber cpl-c pa - # always exclude the CVS dir - override exclude_modules+= CVS $(skip_modules) - -diff -urN openser-1.0.1/modules/acc/Makefile openser-1.0.1.new/modules/acc/Makefile ---- openser-1.0.1/modules/acc/Makefile 2005-09-05 21:32:02.000000000 +0200 -+++ openser-1.0.1.new/modules/acc/Makefile 2006-03-17 10:38:14.333269928 +0100 -@@ -14,8 +14,8 @@ - DEFS+=-DSQL_ACC - - # uncomment the next two lines if you wish to enable RADIUS accounting --#DEFS+=-DRAD_ACC -I$(LOCALBASE)/include --#LIBS=-L$(LOCALBASE)/lib -lradiusclient-ng -+DEFS+=-DRAD_ACC -I$(LOCALBASE)/include -+LIBS=-L$(LOCALBASE)/lib -lradiusclient-ng - - # uncomment the next two lines if you wish to enable DIAMETER accounting - #DEFS+=-DDIAM_ACC -diff -urN openser-1.0.1/modules/mysql/Makefile openser-1.0.1.new/modules/mysql/Makefile ---- openser-1.0.1/modules/mysql/Makefile 2005-06-13 18:47:40.000000000 +0200 -+++ openser-1.0.1.new/modules/mysql/Makefile 2006-03-17 11:12:16.218856136 +0100 -@@ -9,14 +9,12 @@ - # mysql.h locations (freebsd,openbsd solaris) - DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \ - -I$(LOCALBASE)/mysql/include \ -- -I/usr/include/mysql - - # libmysqlclient locations on RH/Suse, Solaris /OpenBSD, FreeBSD - # (Debian does the right thing and puts it in /usr/lib) - LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \ - -L$(LOCALBASE)/mysql/lib/mysql/ \ - -L$(LOCALBASE)/mysql/lib \ -- -L/usr/lib64/mysql \ - -lmysqlclient -lz - - include ../../Makefile.modules -diff -urN openser-1.0.1/modules/postgres/Makefile openser-1.0.1.new/modules/postgres/Makefile ---- openser-1.0.1/modules/postgres/Makefile 2005-07-01 16:52:34.000000000 +0200 -+++ openser-1.0.1.new/modules/postgres/Makefile 2006-03-17 11:13:22.150832952 +0100 -@@ -7,8 +7,7 @@ - NAME=postgres.so - - # libpq-fe.h locations --DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include \ -- -I/usr/include/postgresql -I/usr/include/postgresql/8.0 -+DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include -I$(LOCALBASE)/include/postgresql - LIBS=-L$(LOCALBASE)/lib -L$(LOCALBASE)/pgsql/lib -L$(LOCALBASE)/lib/pgsql \ - -lpq - diff --git a/openwrt/package/openser/patches/openser.cfg.patch b/openwrt/package/openser/patches/openser.cfg.patch deleted file mode 100644 index f26e79e731a..00000000000 --- a/openwrt/package/openser/patches/openser.cfg.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- openser-1.0.0-tls.orig/etc/openser.cfg 2005-10-28 21:45:33.000000000 +0200 -+++ openser-1.0.0-tls/etc/openser.cfg 2006-01-07 01:39:01.077134312 +0100 -@@ -36,20 +36,20 @@ - # ------------------ module loading ---------------------------------- - - # Uncomment this if you want to use SQL database --#loadmodule "/usr/local/lib/openser/modules/mysql.so" -+#loadmodule "/usr/lib/openser/modules/mysql.so" - --loadmodule "/usr/local/lib/openser/modules/sl.so" --loadmodule "/usr/local/lib/openser/modules/tm.so" --loadmodule "/usr/local/lib/openser/modules/rr.so" --loadmodule "/usr/local/lib/openser/modules/maxfwd.so" --loadmodule "/usr/local/lib/openser/modules/usrloc.so" --loadmodule "/usr/local/lib/openser/modules/registrar.so" --loadmodule "/usr/local/lib/openser/modules/textops.so" -+loadmodule "/usr/lib/openser/modules/sl.so" -+loadmodule "/usr/lib/openser/modules/tm.so" -+loadmodule "/usr/lib/openser/modules/rr.so" -+loadmodule "/usr/lib/openser/modules/maxfwd.so" -+loadmodule "/usr/lib/openser/modules/usrloc.so" -+loadmodule "/usr/lib/openser/modules/registrar.so" -+loadmodule "/usr/lib/openser/modules/textops.so" - - # Uncomment this if you want digest authentication - # mysql.so must be loaded ! --#loadmodule "/usr/local/lib/openser/modules/auth.so" --#loadmodule "/usr/local/lib/openser/modules/auth_db.so" -+#loadmodule "/usr/lib/openser/modules/auth.so" -+#loadmodule "/usr/lib/openser/modules/auth_db.so" - - # ----------------- setting module-specific parameters --------------- - diff --git a/openwrt/package/openser/patches/sc.dbtext.patch b/openwrt/package/openser/patches/sc.dbtext.patch deleted file mode 100644 index 2a1b7eab1b1..00000000000 --- a/openwrt/package/openser/patches/sc.dbtext.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- openser-1.0.0-tls.orig/scripts/sc.dbtext 2005-07-29 21:05:36.000000000 +0200 -+++ openser-1.0.0-tls/scripts/sc.dbtext 2006-01-29 02:30:31.795349688 +0100 -@@ -62,6 +62,10 @@ - ##### ----------------------------------------------- ##### - #### table names - -+if [ -z "$SIP_DOMAIN" ] ; then -+ SIP_DOMAIN=$(nvram get sip_domain) -+fi -+ - # UsrLoc Table - if [ -z "$UL_TABLE" ] ; then - UL_TABLE=location -@@ -247,7 +251,7 @@ - fi - - if [ -z "$SERDOMAIN" ] ; then -- echo -e "\nDomain unknown: use usernames with domain or set default domain in SIP_DOMAIN\n" -+ echo -e "\nDomain unknown: use usernames with domain or set default domain in SIP_DOMAIN (with 'nvram set sip_domain=YOUR_SIP_DOMAIN')\n" - exit 1 - fi - } diff --git a/openwrt/package/openser/patches/sc.patch b/openwrt/package/openser/patches/sc.patch deleted file mode 100644 index 52ef9a65549..00000000000 --- a/openwrt/package/openser/patches/sc.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- openser-1.0.0-tls.orig/scripts/sc 2005-08-11 14:08:02.000000000 +0200 -+++ openser-1.0.0-tls/scripts/sc 2006-01-29 02:18:43.319054456 +0100 -@@ -48,11 +48,15 @@ - STARTOPTIONS= # for example -dddd - fi - if [ -z "$DIR" ] ; then -- DIR=`dirname $0` -+ DIR=/usr/sbin - fi - if [ -z "$SERBIN" ] ; then - SERBIN=$DIR/openser - fi -+if [ -z "$SIP_DOMAIN" ] ; then -+ SIP_DOMAIN=$(nvram get sip_domain) -+fi -+ - - ##### ----------------------------------------------- ##### - ### openser's FIFO server -@@ -415,7 +419,7 @@ - fi - - if [ -z "$SERDOMAIN" ] ; then -- echo "domain unknown: use usernames with domain or set default domain in SIP_DOMAIN" -+ echo "domain unknown: use usernames with domain or set default domain in SIP_DOMAIN (with 'nvram set sip_domain=YOUR_SIP_DOMAIN')" - exit 1 - fi - } -@@ -671,11 +675,7 @@ - set_user $2 - fifo_cmd ul_show_contact $USRLOC_TABLE "$SERUSER@$SERDOMAIN" - elif [ $# -eq 1 ] ; then -- printf "Dumping all contacts may take long: are you sure you want to proceed? [Y|N] " > /dev/stderr -- read answer -- if [ "$answer" = "y" -o "$answer" = "Y" ] ; then -- fifo_cmd ul_dump -- fi -+ fifo_cmd ul_dump - else - echo "wrong number of params for usrloc show" - usage diff --git a/openwrt/package/openssh/Config.in b/openwrt/package/openssh/Config.in deleted file mode 100644 index 387ee51fc6a..00000000000 --- a/openwrt/package/openssh/Config.in +++ /dev/null @@ -1,117 +0,0 @@ -menu "openssh........................... A free implementation of the Secure Shell protocol" - -config BR2_COMPILE_OPENSSH - tristate - default n - depends BR2_PACKAGE_OPENSSH_CLIENT || BR2_PACKAGE_OPENSSH_SERVER || BR2_PACKAGE_OPENSSH_SFTP_CLIENT || BR2_PACKAGE_OPENSSH_SFTP_SERVER - -config BR2_PACKAGE_OPENSSH_CLIENT - prompt "openssh-client.................... OpenSSH client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_OPENSSH - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - OpenSSH is a FREE version of the SSH protocol suite of network - connectivity tools that increasing numbers of people on the Internet - are coming to rely on. Many users of telnet, rlogin, ftp, and other - such programs might not realize that their password is transmitted - across the Internet unencrypted, but it is. OpenSSH encrypts all - traffic (including passwords) to effectively eliminate eavesdropping, - connection hijacking, and other network-level attacks. Additionally, - OpenSSH provides a myriad of secure tunneling capabilities, as well - as a variety of authentication methods. - - http://www.openssh.com/ - - Depends: openssl - -config BR2_PACKAGE_OPENSSH_CLIENT_UTILS - prompt "openssh-client-utils............ OpenSSH client utilities" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_OPENSSH_CLIENT - help - OpenSSH is a FREE version of the SSH protocol suite of network - connectivity tools that increasing numbers of people on the Internet - are coming to rely on. Many users of telnet, rlogin, ftp, and other - such programs might not realize that their password is transmitted - across the Internet unencrypted, but it is. OpenSSH encrypts all - traffic (including passwords) to effectively eliminate eavesdropping, - connection hijacking, and other network-level attacks. Additionally, - OpenSSH provides a myriad of secure tunneling capabilities, as well - as a variety of authentication methods. - - http://www.openssh.com/ - - Depends: openssl - -config BR2_PACKAGE_OPENSSH_SERVER - prompt "openssh-server.................... OpenSSH server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_OPENSSH - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - OpenSSH is a FREE version of the SSH protocol suite of network - connectivity tools that increasing numbers of people on the Internet - are coming to rely on. Many users of telnet, rlogin, ftp, and other - such programs might not realize that their password is transmitted - across the Internet unencrypted, but it is. OpenSSH encrypts all - traffic (including passwords) to effectively eliminate eavesdropping, - connection hijacking, and other network-level attacks. Additionally, - OpenSSH provides a myriad of secure tunneling capabilities, as well - as a variety of authentication methods. - - http://www.openssh.com/ - - Depends: openssl - -config BR2_PACKAGE_OPENSSH_SFTP_CLIENT - prompt "openssh-sftp-client............... OpenSSH SFTP client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_OPENSSH - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - OpenSSH is a FREE version of the SSH protocol suite of network - connectivity tools that increasing numbers of people on the Internet - are coming to rely on. Many users of telnet, rlogin, ftp, and other - such programs might not realize that their password is transmitted - across the Internet unencrypted, but it is. OpenSSH encrypts all - traffic (including passwords) to effectively eliminate eavesdropping, - connection hijacking, and other network-level attacks. Additionally, - OpenSSH provides a myriad of secure tunneling capabilities, as well - as a variety of authentication methods. - - http://www.openssh.com/ - - Depends: openssl - - -config BR2_PACKAGE_OPENSSH_SFTP_SERVER - prompt "openssh-sftp-server............... OpenSSH SFTP server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_OPENSSH - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - OpenSSH is a FREE version of the SSH protocol suite of network - connectivity tools that increasing numbers of people on the Internet - are coming to rely on. Many users of telnet, rlogin, ftp, and other - such programs might not realize that their password is transmitted - across the Internet unencrypted, but it is. OpenSSH encrypts all - traffic (including passwords) to effectively eliminate eavesdropping, - connection hijacking, and other network-level attacks. Additionally, - OpenSSH provides a myriad of secure tunneling capabilities, as well - as a variety of authentication methods. - - http://www.openssh.com/ - - Depends: openssl - -endmenu diff --git a/openwrt/package/openssh/Makefile b/openwrt/package/openssh/Makefile deleted file mode 100644 index a720de7b871..00000000000 --- a/openwrt/package/openssh/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openssh -PKG_VERSION:=4.2p1 -PKG_RELEASE:=2 -PKG_MD5SUM:=df899194a340c933944b193477c628fa - -PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ - ftp://openbsd.wiretapped.net/pub/OpenBSD/OpenSSH/portable/ \ - ftp://ftp.belnet.be/packages/openbsd/OpenSSH/portable/ \ - ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -PKG_DEPEND:="openssl" - -$(eval $(call PKG_template,OPENSSH_CLIENT,openssh-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSSH_CLIENT_UTILS,openssh-client-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSSH_SERVER,openssh-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSSH_SFTP_CLIENT,openssh-sftp-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSSH_SFTP_SERVER,openssh-sftp-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LD="$(TARGET_CC)" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/ssh \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-debug \ - --disable-strip \ - --disable-etc-default-login \ - --disable-lastlog \ - --disable-utmp \ - --disable-utmpx \ - --disable-wtmp \ - --disable-wtmpx \ - --without-bsd-auth \ - --without-kerberos5 \ - --without-pam \ - --without-x \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_OPENSSH_CLIENT): - install -m0755 -d $(IDIR_OPENSSH_CLIENT)/etc/ssh - chmod 0700 $(IDIR_OPENSSH_CLIENT)/etc/ssh - $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(IDIR_OPENSSH_CLIENT)/etc/ssh/ - install -m0755 -d $(IDIR_OPENSSH_CLIENT)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh $(IDIR_OPENSSH_CLIENT)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/scp $(IDIR_OPENSSH_CLIENT)/usr/bin/ - $(RSTRIP) $(IDIR_OPENSSH_CLIENT) - $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT) $(PACKAGE_DIR) - -$(IPKG_OPENSSH_CLIENT_UTILS): - install -m0755 -d $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-add $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-agent $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keyscan $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ - $(RSTRIP) $(IDIR_OPENSSH_CLIENT_UTILS) - $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT_UTILS) $(PACKAGE_DIR) - -$(IPKG_OPENSSH_SERVER): - install -m0755 -d $(IDIR_OPENSSH_SERVER)/etc/ssh - chmod 0700 $(IDIR_OPENSSH_SERVER)/etc/ssh - $(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(IDIR_OPENSSH_SERVER)/etc/ssh/ - install -m0755 -d $(IDIR_OPENSSH_SERVER)/etc/init.d - install -m0755 ./files/S50sshd $(IDIR_OPENSSH_SERVER)/etc/init.d/ - install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH_SERVER)/usr/bin/ - install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(IDIR_OPENSSH_SERVER)/usr/sbin/ - $(RSTRIP) $(IDIR_OPENSSH_SERVER) - $(IPKG_BUILD) $(IDIR_OPENSSH_SERVER) $(PACKAGE_DIR) - -$(IPKG_OPENSSH_SFTP_CLIENT): - install -m0755 -d $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/sftp $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin/ - $(RSTRIP) $(IDIR_OPENSSH_SFTP_CLIENT) - $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_CLIENT) $(PACKAGE_DIR) - -$(IPKG_OPENSSH_SFTP_SERVER): - install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib/ - install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec - ln -sf ../lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec/sftp-server - $(RSTRIP) $(IDIR_OPENSSH_SFTP_SERVER) - $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_SERVER) $(PACKAGE_DIR) - diff --git a/openwrt/package/openssh/files/S50sshd b/openwrt/package/openssh/files/S50sshd deleted file mode 100755 index 2ea168394c5..00000000000 --- a/openwrt/package/openssh/files/S50sshd +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -for type in rsa dsa; do { - # check for keys - key=/etc/ssh/ssh_host_${type}_key - [ ! -f $key ] && { - # generate missing keys - [ -x /usr/bin/ssh-keygen ] && { - /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&- && exec $0 $* - } & - exit 0 - } -}; done -mkdir -p /var/empty -/usr/sbin/sshd diff --git a/openwrt/package/openssh/ipkg/openssh-client-utils.control b/openwrt/package/openssh/ipkg/openssh-client-utils.control deleted file mode 100644 index d34db0ddf23..00000000000 --- a/openwrt/package/openssh/ipkg/openssh-client-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openssh-client-utils -Priority: optional -Section: net -Depends: zlib, libopenssl -Description: OpenSSH client utilities diff --git a/openwrt/package/openssh/ipkg/openssh-client.conffiles b/openwrt/package/openssh/ipkg/openssh-client.conffiles deleted file mode 100644 index 489e8267f73..00000000000 --- a/openwrt/package/openssh/ipkg/openssh-client.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ssh/ssh_config \ No newline at end of file diff --git a/openwrt/package/openssh/ipkg/openssh-client.control b/openwrt/package/openssh/ipkg/openssh-client.control deleted file mode 100644 index 183b7f152cd..00000000000 --- a/openwrt/package/openssh/ipkg/openssh-client.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openssh-client -Priority: optional -Section: net -Depends: zlib, libopenssl -Description: OpenSSH client diff --git a/openwrt/package/openssh/ipkg/openssh-server.conffiles b/openwrt/package/openssh/ipkg/openssh-server.conffiles deleted file mode 100644 index 6f0cfbcbe2c..00000000000 --- a/openwrt/package/openssh/ipkg/openssh-server.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ssh/sshd_config \ No newline at end of file diff --git a/openwrt/package/openssh/ipkg/openssh-server.control b/openwrt/package/openssh/ipkg/openssh-server.control deleted file mode 100644 index d070f732d61..00000000000 --- a/openwrt/package/openssh/ipkg/openssh-server.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openssh-server -Priority: optional -Section: net -Depends: zlib, libopenssl -Description: OpenSSH server diff --git a/openwrt/package/openssh/ipkg/openssh-server.postinst b/openwrt/package/openssh/ipkg/openssh-server.postinst deleted file mode 100644 index b6e167f6962..00000000000 --- a/openwrt/package/openssh/ipkg/openssh-server.postinst +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -name=sshd -id=99 - -# do not change below -# check if we are on real system -if [ -z "${IPKG_INSTROOT}" ]; then - # create copies of passwd and group, if we use squashfs - rootfs=`mount |awk '/root/ { print $5 }'` - if [ "$rootfs" = "squashfs" ]; then - if [ -h /etc/group ]; then - rm /etc/group - cp /rom/etc/group /etc/group - fi - if [ -h /etc/passwd ]; then - rm /etc/passwd - cp /rom/etc/passwd /etc/passwd - fi - fi -fi - -echo "" -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/group)" ]; then - echo "adding group $name to /etc/group" - echo "${name}:x:${id}:" >> ${IPKG_INSTROOT}/etc/group -fi - -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/passwd)" ]; then - echo "adding user $name to /etc/passwd" - echo "${name}:x:${id}:${id}:${name}:/var/empty/.${name}:/bin/false" >> ${IPKG_INSTROOT}/etc/passwd -fi diff --git a/openwrt/package/openssh/ipkg/openssh-sftp-client.control b/openwrt/package/openssh/ipkg/openssh-sftp-client.control deleted file mode 100644 index 705a3854ac2..00000000000 --- a/openwrt/package/openssh/ipkg/openssh-sftp-client.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openssh-sftp-client -Priority: optional -Section: net -Depends: zlib, libopenssl -Description: OpenSSH SFTP client diff --git a/openwrt/package/openssh/ipkg/openssh-sftp-server.control b/openwrt/package/openssh/ipkg/openssh-sftp-server.control deleted file mode 100644 index 8c17fcc5b8a..00000000000 --- a/openwrt/package/openssh/ipkg/openssh-sftp-server.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openssh-sftp-server -Priority: optional -Section: net -Depends: zlib, libopenssl -Description: OpenSSH SFTP server diff --git a/openwrt/package/openssh/patches/100-openssl-cipher.patch b/openwrt/package/openssh/patches/100-openssl-cipher.patch deleted file mode 100644 index f8eb177c2d2..00000000000 --- a/openwrt/package/openssh/patches/100-openssl-cipher.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur openssh-4.2p1/cipher.c openssh-4.2p1.patched/cipher.c ---- openssh-4.2p1/cipher.c 2005-07-17 09:02:10.000000000 +0200 -+++ openssh-4.2p1.patched/cipher.c 2006-03-26 12:43:41.000000000 +0200 -@@ -67,7 +67,6 @@ - - { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, EVP_des_ede3_cbc }, - { "blowfish-cbc", SSH_CIPHER_SSH2, 8, 16, 0, EVP_bf_cbc }, -- { "cast128-cbc", SSH_CIPHER_SSH2, 8, 16, 0, EVP_cast5_cbc }, - { "arcfour", SSH_CIPHER_SSH2, 8, 16, 0, EVP_rc4 }, - { "arcfour128", SSH_CIPHER_SSH2, 8, 16, 1536, EVP_rc4 }, - { "arcfour256", SSH_CIPHER_SSH2, 8, 32, 1536, EVP_rc4 }, diff --git a/openwrt/package/openssh/patches/cross-compile.patch b/openwrt/package/openssh/patches/cross-compile.patch deleted file mode 100644 index 7178e32ac14..00000000000 --- a/openwrt/package/openssh/patches/cross-compile.patch +++ /dev/null @@ -1,103 +0,0 @@ -diff -Nur openssh-4.0p1/configure openssh-4.0p1.patched/configure ---- openssh-4.0p1/configure 2005-03-09 05:54:16.000000000 +0100 -+++ openssh-4.0p1.patched/configure 2005-06-02 13:35:06.000000000 +0200 -@@ -5524,7 +5524,7 @@ - *-*-linux*) - no_dev_ptmx=1 - check_for_libcrypt_later=1 -- check_for_openpty_ctty_bug=1 -+ check_for_openpty_ctty_bug=0 - cat >>confdefs.h <<\_ACEOF - #define DONT_TRY_OTHER_AF 1 - _ACEOF -@@ -12810,90 +12810,6 @@ - fi - fi - --if test ! -z "$check_for_openpty_ctty_bug"; then -- echo "$as_me:$LINENO: checking if openpty correctly handles controlling tty" >&5 --echo $ECHO_N "checking if openpty correctly handles controlling tty... $ECHO_C" >&6 -- if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#include --#include --#include --#include -- --int --main() --{ -- pid_t pid; -- int fd, ptyfd, ttyfd, status; -- -- pid = fork(); -- if (pid < 0) { /* failed */ -- exit(1); -- } else if (pid > 0) { /* parent */ -- waitpid(pid, &status, 0); -- if (WIFEXITED(status)) -- exit(WEXITSTATUS(status)); -- else -- exit(2); -- } else { /* child */ -- close(0); close(1); close(2); -- setsid(); -- openpty(&ptyfd, &ttyfd, NULL, NULL, NULL); -- fd = open("/dev/tty", O_RDWR | O_NOCTTY); -- if (fd >= 0) -- exit(3); /* Acquired ctty: broken */ -- else -- exit(0); /* Did not acquire ctty: OK */ -- } --} -- --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) -- -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -- cat >>confdefs.h <<\_ACEOF --#define SSHD_ACQUIRES_CTTY 1 --_ACEOF -- -- -- --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi --fi - - if test "x$ac_cv_func_getaddrinfo" = "xyes" -a "x$check_for_hpux_broken_getaddrinfo" = "x1"; then - echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 diff --git a/openwrt/package/openssl/Config.in b/openwrt/package/openssl/Config.in deleted file mode 100644 index e852c9f0f47..00000000000 --- a/openwrt/package/openssl/Config.in +++ /dev/null @@ -1,35 +0,0 @@ -config BR2_COMPILE_OPENSSL - tristate - default n - depends BR2_PACKAGE_LIBOPENSSL - -config BR2_PACKAGE_LIBOPENSSL - prompt "libopenssl........................ Open source SSL (Secure Socket Layer) libraries" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_OPENSSL - help - The OpenSSL Project is a collaborative effort to develop a robust, - commercial-grade, full-featured, and Open Source toolkit implementing - the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) - protocols as well as a full-strength general purpose cryptography library. - - http://www.openssl.org/ - - This package contains the shared SSL libraries, needed by other programs. - -config BR2_PACKAGE_OPENSSL_UTIL - prompt "openssl-util.................... OpenSSL command line tool" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBOPENSSL - help - The OpenSSL Project is a collaborative effort to develop a robust, - commercial-grade, full-featured, and Open Source toolkit implementing - the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) - protocols as well as a full-strength general purpose cryptography library. - - http://www.openssl.org/ - - This package contains the multi-purpose OpenSSL binary tool. - diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile deleted file mode 100644 index a1a197626f5..00000000000 --- a/openwrt/package/openssl/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openssl -PKG_VERSION:=0.9.8a -PKG_RELEASE:=3 -PKG_MD5SUM:=1d16c727c10185e4d694f87f5e424ee1 - -PKG_SOURCE_URL:=http://www.openssl.org/source/ \ - ftp://ftp.funet.fi/pub/crypt/cryptography/libs/openssl/source/ \ - ftp://ftp.webmonster.de/pub/openssl/source/ \ - ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192 -OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBOPENSSL,libopenssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - $(SED) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' $(PKG_BUILD_DIR)/Configure - $(SED) s/OPENWRT_OPTIMIZATION_FLAGS/$(BR2_TARGET_OPTIMIZATION)/g $(PKG_BUILD_DIR)/Configure - (cd $(PKG_BUILD_DIR); \ - PATH=$(TARGET_PATH) \ - ./Configure linux-openwrt \ - --prefix=/usr \ - --openssldir=/etc/ssl \ - -I$(STAGING_DIR)/usr/include \ - -L$(STAGING_DIR)/usr/lib -ldl \ - -DOPENSSL_SMALL_FOOTPRINT \ - $(OPENSSL_NO_CIPHERS) \ - $(OPENSSL_OPTIONS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ - MAKEDEPPROG="$(TARGET_CC)" \ - depend - $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ - CC="$(TARGET_CC)" \ - AR="$(TARGET_CROSS)ar r" \ - RANLIB="$(TARGET_CROSS)ranlib" \ - all build-shared - # Work around openssl build bug to link libssl.so with libcrypto.so. - -rm $(PKG_BUILD_DIR)/libssl.so.*.*.* - $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ - CC=$(TARGET_CC) \ - CCOPTS="$(TARGET_CFLAGS) -fomit-frame-pointer" \ - do_linux-shared - $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - install - touch $@ - -$(IPKG_LIBOPENSSL): - install -d -m0755 $(IDIR_LIBOPENSSL)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.so.* $(IDIR_LIBOPENSSL)/usr/lib/ - chmod 0644 $(IDIR_LIBOPENSSL)/usr/lib/* - $(RSTRIP) $(IDIR_LIBOPENSSL) - $(IPKG_BUILD) $(IDIR_LIBOPENSSL) $(PACKAGE_DIR) - -$(IPKG_OPENSSL_UTIL): - install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl - $(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(IDIR_OPENSSL_UTIL)/etc/ssl/ - install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl/certs - install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl/private - chmod 0700 $(IDIR_OPENSSL_UTIL)/etc/ssl/private - install -d -m0755 $(IDIR_OPENSSL_UTIL)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/openssl $(IDIR_OPENSSL_UTIL)/usr/bin/ - $(RSTRIP) $(IDIR_OPENSSL_UTIL) - $(IPKG_BUILD) $(IDIR_OPENSSL_UTIL) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libssl.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/openssl $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libssl.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/openssl \ - $(STAGING_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/openssl/ipkg/libopenssl.control b/openwrt/package/openssl/ipkg/libopenssl.control deleted file mode 100644 index 9cf48a804f2..00000000000 --- a/openwrt/package/openssl/ipkg/libopenssl.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libopenssl -Priority: optional -Section: libs -Description: OpenSSL (Secure Socket Layer) libraries diff --git a/openwrt/package/openssl/ipkg/openssl-util.conffiles b/openwrt/package/openssl/ipkg/openssl-util.conffiles deleted file mode 100644 index 6d068e66c4a..00000000000 --- a/openwrt/package/openssl/ipkg/openssl-util.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ssl/openssl.cnf diff --git a/openwrt/package/openssl/ipkg/openssl-util.control b/openwrt/package/openssl/ipkg/openssl-util.control deleted file mode 100644 index 4c14ab1aae6..00000000000 --- a/openwrt/package/openssl/ipkg/openssl-util.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openssl-util -Priority: optionnal -Section: admin -Description: OpenSSL (Secure Socket Layer) command line tool -Depends: libopenssl diff --git a/openwrt/package/openssl/patches/110-optimize-for-size.patch b/openwrt/package/openssl/patches/110-optimize-for-size.patch deleted file mode 100644 index 6031c25257c..00000000000 --- a/openwrt/package/openssl/patches/110-optimize-for-size.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur openssl-0.9.8a/Configure openssl-0.9.8a-owrt/Configure ---- openssl-0.9.8a/Configure 2005-08-02 12:59:42.000000000 +0200 -+++ openssl-0.9.8a-owrt/Configure 2006-03-23 14:16:35.000000000 +0100 -@@ -353,6 +353,8 @@ - "linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", - "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", -+# OpenWrt targets -+"linux-openwrt","gcc:-DTERMIO OPENWRT_OPTIMIZATION_FLAGS -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - - #### *BSD [do see comment about ${BSDthreads} above!] - "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", diff --git a/openwrt/package/openssl/patches/120-makedepend.patch b/openwrt/package/openssl/patches/120-makedepend.patch deleted file mode 100644 index c802fe4adc5..00000000000 --- a/openwrt/package/openssl/patches/120-makedepend.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ruN openssl-0.9.7g-old/util/domd openssl-0.9.7g-new/util/domd ---- openssl-0.9.7g-old/util/domd 2004-05-11 14:46:18.000000000 +0200 -+++ openssl-0.9.7g-new/util/domd 2005-05-30 20:20:04.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - # Do a makedepend, only leave out the standard headers - # Written by Ben Laurie 19 Jan 1999 - -@@ -14,7 +14,8 @@ - cp Makefile Makefile.save - # fake the presence of Kerberos - touch $TOP/krb5.h --if [ "$MAKEDEPEND" = "gcc" ]; then -+D=${MAKEDEPEND/%*gcc/gcc} -+if [ "$D" = "gcc" ]; then - args="" - while [ $# -gt 0 ]; do - if [ "$1" != "--" ]; then args="$args $1"; fi -@@ -22,7 +23,7 @@ - done - sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp - echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp -- gcc -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp -+ ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp - ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new - rm -f Makefile.tmp - else diff --git a/openwrt/package/openssl/patches/130-perl-path.patch b/openwrt/package/openssl/patches/130-perl-path.patch deleted file mode 100644 index 42467b83880..00000000000 --- a/openwrt/package/openssl/patches/130-perl-path.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -Nur openssl-0.9.7f/Configure openssl-0.9.7f.new/Configure ---- openssl-0.9.7f/Configure 2005-03-12 12:28:21.000000000 +0100 -+++ openssl-0.9.7f.new/Configure 2005-04-03 20:32:00.000000000 +0200 -@@ -1,4 +1,4 @@ --: -+#!/usr/bin/perl - eval 'exec perl -S $0 ${1+"$@"}' - if $running_under_some_shell; - ## -diff -Nur openssl-0.9.7f/tools/c_rehash.in openssl-0.9.7f.new/tools/c_rehash.in ---- openssl-0.9.7f/tools/c_rehash.in 2002-10-11 22:35:45.000000000 +0200 -+++ openssl-0.9.7f.new/tools/c_rehash.in 2005-04-03 20:41:17.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/perl -+#!/usr/bin/perl - - - # Perl c_rehash script, scan all files in a directory -diff -Nur openssl-0.9.7f/util/clean-depend.pl openssl-0.9.7f.new/util/clean-depend.pl ---- openssl-0.9.7f/util/clean-depend.pl 2001-10-10 10:27:28.000000000 +0200 -+++ openssl-0.9.7f.new/util/clean-depend.pl 2005-04-03 20:41:38.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/perl -w -+#!/usr/bin/perl -w - # Clean the dependency list in a makefile of standard includes... - # Written by Ben Laurie 19 Jan 1999 - -diff -Nur openssl-0.9.7f/util/mkdef.pl openssl-0.9.7f.new/util/mkdef.pl ---- openssl-0.9.7f/util/mkdef.pl 2005-02-05 18:19:23.000000000 +0100 -+++ openssl-0.9.7f.new/util/mkdef.pl 2005-04-03 20:42:49.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/perl -w -+#!/usr/bin/perl - # - # generate a .def file - # -diff -Nur openssl-0.9.7f/util/mkerr.pl openssl-0.9.7f.new/util/mkerr.pl ---- openssl-0.9.7f/util/mkerr.pl 2005-01-31 02:28:17.000000000 +0100 -+++ openssl-0.9.7f.new/util/mkerr.pl 2005-04-03 20:43:02.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/perl -w -+#!/usr/bin/perl - - my $config = "crypto/err/openssl.ec"; - my $debug = 0; -diff -Nur openssl-0.9.7f/util/mkstack.pl openssl-0.9.7f.new/util/mkstack.pl ---- openssl-0.9.7f/util/mkstack.pl 2004-10-04 18:27:36.000000000 +0200 -+++ openssl-0.9.7f.new/util/mkstack.pl 2005-04-03 20:43:18.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/perl -w -+#!/usr/bin/perl - - # This is a utility that searches out "DECLARE_STACK_OF()" - # declarations in .h and .c files, and updates/creates/replaces -diff -Nur openssl-0.9.7f/util/pod2man.pl openssl-0.9.7f.new/util/pod2man.pl ---- openssl-0.9.7f/util/pod2man.pl 2002-05-30 17:30:21.000000000 +0200 -+++ openssl-0.9.7f.new/util/pod2man.pl 2005-04-03 20:43:52.000000000 +0200 -@@ -1,4 +1,4 @@ --: #!/usr/bin/perl-5.005 -+#!/usr/bin/perl - eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' - if $running_under_some_shell; - -diff -Nur openssl-0.9.7f/util/selftest.pl openssl-0.9.7f.new/util/selftest.pl ---- openssl-0.9.7f/util/selftest.pl 2004-05-11 14:46:19.000000000 +0200 -+++ openssl-0.9.7f.new/util/selftest.pl 2005-04-03 20:44:10.000000000 +0200 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/perl -w -+#!/usr/bin/perl - # - # Run the test suite and generate a report - # diff --git a/openwrt/package/openssl/patches/140-makefile-dirs.patch b/openwrt/package/openssl/patches/140-makefile-dirs.patch deleted file mode 100644 index 89022e0c6cd..00000000000 --- a/openwrt/package/openssl/patches/140-makefile-dirs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- openssl-0.9.8a/Makefile.org 2006-02-21 20:57:45.000000000 -0800 -+++ openssl-0.9.8a-new/Makefile.org 2006-02-21 21:37:11.000000000 -0800 -@@ -100,7 +100,7 @@ - KRB5_INCLUDES= - LIBKRB5= - --DIRS= crypto ssl engines apps test tools -+DIRS= crypto ssl apps - SHLIBDIRS= crypto ssl - - # dirs in crypto to build diff --git a/openwrt/package/openssl/patches/150-no_engines.patch b/openwrt/package/openssl/patches/150-no_engines.patch deleted file mode 100644 index b928fbcc61d..00000000000 --- a/openwrt/package/openssl/patches/150-no_engines.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -udrNP openssl-0.9.8-stable-SNAP-20050703.orig/util/libeay.num openssl-0.9.8-stable-SNAP-20050703/util/libeay.num ---- openssl-0.9.8-stable-SNAP-20050703.orig/util/libeay.num 2005-07-04 00:27:14.653639088 +0200 -+++ openssl-0.9.8-stable-SNAP-20050703/util/libeay.num 2005-07-04 22:50:07.986576664 +0200 -@@ -2071,7 +2071,6 @@ - UI_add_error_string 2633 EXIST::FUNCTION: - KRB5_CHECKSUM_free 2634 EXIST::FUNCTION: - OCSP_REQUEST_get_ext 2635 EXIST::FUNCTION: --ENGINE_load_ubsec 2636 EXIST::FUNCTION:ENGINE,STATIC_ENGINE - ENGINE_register_all_digests 2637 EXIST::FUNCTION:ENGINE - PKEY_USAGE_PERIOD_it 2638 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: - PKEY_USAGE_PERIOD_it 2638 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: -@@ -2545,7 +2544,6 @@ - AES_set_encrypt_key 3024 EXIST::FUNCTION:AES - OCSP_resp_count 3025 EXIST::FUNCTION: - KRB5_CHECKSUM_new 3026 EXIST::FUNCTION: --ENGINE_load_cswift 3027 EXIST::FUNCTION:ENGINE,STATIC_ENGINE - OCSP_onereq_get0_id 3028 EXIST::FUNCTION: - ENGINE_set_default_ciphers 3029 EXIST::FUNCTION:ENGINE - NOTICEREF_it 3030 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: -@@ -2576,7 +2574,6 @@ - i2d_EXTENDED_KEY_USAGE 3052 EXIST::FUNCTION: - i2d_OCSP_SIGNATURE 3053 EXIST::FUNCTION: - asn1_enc_save 3054 EXIST::FUNCTION: --ENGINE_load_nuron 3055 EXIST::FUNCTION:ENGINE,STATIC_ENGINE - _ossl_old_des_pcbc_encrypt 3056 EXIST::FUNCTION:DES - PKCS12_MAC_DATA_it 3057 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: - PKCS12_MAC_DATA_it 3057 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: -@@ -2600,7 +2597,6 @@ - i2d_KRB5_CHECKSUM 3072 EXIST::FUNCTION: - ENGINE_set_table_flags 3073 EXIST::FUNCTION:ENGINE - AES_options 3074 EXIST::FUNCTION:AES --ENGINE_load_chil 3075 EXIST::FUNCTION:ENGINE,STATIC_ENGINE - OCSP_id_cmp 3076 EXIST::FUNCTION: - OCSP_BASICRESP_new 3077 EXIST::FUNCTION: - OCSP_REQUEST_get_ext_by_NID 3078 EXIST::FUNCTION: -@@ -2667,7 +2663,6 @@ - OCSP_CRLID_it 3127 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: - i2d_KRB5_AUTHENTBODY 3128 EXIST::FUNCTION: - OCSP_REQUEST_get_ext_count 3129 EXIST::FUNCTION: --ENGINE_load_atalla 3130 EXIST::FUNCTION:ENGINE,STATIC_ENGINE - X509_NAME_it 3131 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: - X509_NAME_it 3131 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: - USERNOTICE_it 3132 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: -@@ -2762,8 +2757,6 @@ - DES_read_password 3207 EXIST::FUNCTION:DES - UI_UTIL_read_pw 3208 EXIST::FUNCTION: - UI_UTIL_read_pw_string 3209 EXIST::FUNCTION: --ENGINE_load_aep 3210 EXIST::FUNCTION:ENGINE,STATIC_ENGINE --ENGINE_load_sureware 3211 EXIST::FUNCTION:ENGINE,STATIC_ENGINE - OPENSSL_add_all_algorithms_noconf 3212 EXIST:!VMS:FUNCTION: - OPENSSL_add_all_algo_noconf 3212 EXIST:VMS:FUNCTION: - OPENSSL_add_all_algorithms_conf 3213 EXIST:!VMS:FUNCTION: -@@ -2772,7 +2765,6 @@ - AES_ofb128_encrypt 3215 EXIST::FUNCTION:AES - AES_ctr128_encrypt 3216 EXIST::FUNCTION:AES - AES_cfb128_encrypt 3217 EXIST::FUNCTION:AES --ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE,STATIC_ENGINE - _ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES - EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES - EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES -@@ -3107,7 +3099,6 @@ - STORE_method_set_modify_function 3530 EXIST:!VMS:FUNCTION: - STORE_meth_set_modify_fn 3530 EXIST:VMS:FUNCTION: - STORE_parse_attrs_next 3531 EXIST::FUNCTION: --ENGINE_load_padlock 3532 EXIST::FUNCTION:ENGINE - EC_GROUP_set_curve_name 3533 EXIST::FUNCTION:EC - X509_CERT_PAIR_it 3534 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: - X509_CERT_PAIR_it 3534 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: -diff -udrNP openssl-0.9.8-stable-SNAP-20050703.orig/Configure openssl-0.9.8-stable-SNAP-20050703/Configure ---- openssl-0.9.8-stable-SNAP-20050703.orig/Configure 2005-07-04 00:27:11.169168808 +0200 -+++ openssl-0.9.8-stable-SNAP-20050703/Configure 2005-07-05 00:02:12.590136992 +0200 -@@ -1623,6 +1624,11 @@ - close(OUT); - } - -+# ugly hack to disable engines -+if($target eq "mingwx") { -+ system("sed -e s/^LIB/XLIB/g -i engines/Makefile"); -+} -+ - print <> /dev/null -+exit 0 -diff -Nur openswan-2.4.5rc5/programs/look/look.in openswan-2.4.5rc5.patched/programs/look/look.in ---- openswan-2.4.5rc5/programs/look/look.in 2005-08-18 16:10:09.000000000 +0200 -+++ openswan-2.4.5rc5.patched/programs/look/look.in 2006-03-29 01:20:44.000000000 +0200 -@@ -84,7 +84,7 @@ - then - pat="$pat|$defaultroutephys\$|$defaultroutevirt\$" - else -- for i in `echo "$IPSECinterfaces" | sed 's/=/ /'` -+ for i in `echo "$IPSECinterfaces" | tr '=' ' '` - do - pat="$pat|$i\$" - done -diff -Nur openswan-2.4.5rc5/programs/_plutorun/_plutorun.in openswan-2.4.5rc5.patched/programs/_plutorun/_plutorun.in ---- openswan-2.4.5rc5/programs/_plutorun/_plutorun.in 2006-01-06 00:45:00.000000000 +0100 -+++ openswan-2.4.5rc5.patched/programs/_plutorun/_plutorun.in 2006-03-29 01:20:44.000000000 +0200 -@@ -147,7 +147,7 @@ - exit 1 - fi - else -- if test ! -w "`dirname $stderrlog`" -+ if test ! -w "`echo $stderrlog | sed -r 's/(^.*\/)(.*$)/\1/'`" - then - echo Cannot write to directory to create \"$stderrlog\". - exit 1 -diff -Nur openswan-2.4.5rc5/programs/_realsetup/_realsetup.in openswan-2.4.5rc5.patched/programs/_realsetup/_realsetup.in ---- openswan-2.4.5rc5/programs/_realsetup/_realsetup.in 2005-07-28 02:23:48.000000000 +0200 -+++ openswan-2.4.5rc5.patched/programs/_realsetup/_realsetup.in 2006-03-29 01:20:44.000000000 +0200 -@@ -235,7 +235,7 @@ - - # misc pre-Pluto setup - -- perform test -d `dirname $subsyslock` "&&" touch $subsyslock -+ perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock - - if test " $IPSECforwardcontrol" = " yes" - then -@@ -347,7 +347,7 @@ - lsmod 2>&1 | grep "^xfrm_user" > /dev/null && rmmod -s xfrm_user - fi - -- perform test -d `dirname $subsyslock` "&&" rm -f $subsyslock -+ perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock "&&" rm -f $subsyslock - - perform rm -f $info $lock $plutopid - perform echo "...Openswan IPsec stopped" "|" $LOGONLY -diff -Nur openswan-2.4.5rc5/programs/send-pr/send-pr.in openswan-2.4.5rc5.patched/programs/send-pr/send-pr.in ---- openswan-2.4.5rc5/programs/send-pr/send-pr.in 2005-04-18 01:04:46.000000000 +0200 -+++ openswan-2.4.5rc5.patched/programs/send-pr/send-pr.in 2006-03-29 01:20:44.000000000 +0200 -@@ -402,7 +402,7 @@ - else - if [ "$fieldname" != "Category" ] - then -- values=`${BINDIR}/query-pr --valid-values $fieldname | sed ':a;N;$!ba;s/\n/ /g' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'` -+ values=`${BINDIR}/query-pr --valid-values $fieldname | tr '\n' ' ' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'` - valslen=`echo "$values" | wc -c` - else - values="choose from a category listed above" -@@ -414,7 +414,7 @@ - else - desc="<${values} (one line)>"; - fi -- dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'` -+ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'` - echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL - fi - echo "${fmtname}${desc}" >> $file -@@ -425,7 +425,7 @@ - desc=" $default_val"; - else - desc=" <`${BINDIR}/query-pr --field-description $fieldname` (multiple lines)>"; -- dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'` -+ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'` - echo "s/^${dpat}//" >> $FIXFIL - fi - echo "${fmtname}" >> $file; -@@ -437,7 +437,7 @@ - desc="${default_val}" - else - desc="<`${BINDIR}/query-pr --field-description $fieldname` (one line)>" -- dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'` -+ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'` - echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL - fi - echo "${fmtname}${desc}" >> $file -diff -Nur openswan-2.4.5rc5/programs/setup/setup.in openswan-2.4.5rc5.patched/programs/setup/setup.in ---- openswan-2.4.5rc5/programs/setup/setup.in 2005-07-25 21:17:03.000000000 +0200 -+++ openswan-2.4.5rc5.patched/programs/setup/setup.in 2006-03-29 01:20:44.000000000 +0200 -@@ -117,12 +117,22 @@ - # do it - case "$1" in - start|--start|stop|--stop|_autostop|_autostart) -- if test " `id -u`" != " 0" -+ if [ "x${USER}" != "xroot" ] - then - echo "permission denied (must be superuser)" | - logger -s -p $IPSECsyslog -t ipsec_setup 2>&1 - exit 1 - fi -+ -+ # make sure all required directories exist -+ if [ ! -d /var/run/pluto ] -+ then -+ mkdir -p /var/run/pluto -+ fi -+ if [ ! -d /var/lock/subsys ] -+ then -+ mkdir -p /var/lock/subsys -+ fi - tmp=/var/run/pluto/ipsec_setup.st - outtmp=/var/run/pluto/ipsec_setup.out - ( -diff -Nur openswan-2.4.5rc5/programs/showhostkey/showhostkey.in openswan-2.4.5rc5.patched/programs/showhostkey/showhostkey.in ---- openswan-2.4.5rc5/programs/showhostkey/showhostkey.in 2004-11-14 14:40:41.000000000 +0100 -+++ openswan-2.4.5rc5.patched/programs/showhostkey/showhostkey.in 2006-03-29 01:20:44.000000000 +0200 -@@ -63,7 +63,7 @@ - exit 1 - fi - --host="`hostname --fqdn`" -+host="`cat /proc/sys/kernel/hostname`" - - awk ' BEGIN { - inkey = 0 -diff -Nur openswan-2.4.5rc5/programs/_startklips/_startklips.in openswan-2.4.5rc5.patched/programs/_startklips/_startklips.in ---- openswan-2.4.5rc5/programs/_startklips/_startklips.in 2005-11-25 00:08:05.000000000 +0100 -+++ openswan-2.4.5rc5.patched/programs/_startklips/_startklips.in 2006-03-29 01:23:54.000000000 +0200 -@@ -262,15 +262,15 @@ - echo "FATAL ERROR: Both KLIPS and NETKEY IPsec code is present in kernel" - exit - fi --if test ! -f $ipsecversion && test ! -f $netkey && modprobe -qn ipsec -+if test ! -f $ipsecversion && test ! -f $netkey && insmod ipsec - then - # statically compiled KLIPS/NETKEY not found; try to load the module -- modprobe ipsec -+ insmod ipsec - fi - - if test ! -f $ipsecversion && test ! -f $netkey - then -- modprobe -v af_key -+ insmod -v af_key - fi - - if test -f $netkey -@@ -278,21 +278,21 @@ - klips=false - if test -f $modules - then -- modprobe -qv ah4 -- modprobe -qv esp4 -- modprobe -qv ipcomp -+ insmod -qv ah4 -+ insmod -qv esp4 -+ insmod -qv ipcomp - # xfrm4_tunnel is needed by ipip and ipcomp -- modprobe -qv xfrm4_tunnel -+ insmod -qv xfrm4_tunnel - # xfrm_user contains netlink support for IPsec -- modprobe -qv xfrm_user -- modprobe -qv hw_random -+ insmod -qv xfrm_user -+ insmod -qv hw_random - # padlock must load before aes module -- modprobe -qv padlock -+ insmod -qv padlock - # load the most common ciphers/algo's -- modprobe -qv sha1 -- modprobe -qv md5 -- modprobe -qv des -- modprobe -qv aes -+ insmod -qv sha1 -+ insmod -qv md5 -+ insmod -qv des -+ insmod -qv aes - fi - fi - -@@ -308,10 +308,10 @@ - fi - unset MODPATH MODULECONF # no user overrides! - depmod -a >/dev/null 2>&1 -- modprobe -qv hw_random -+ insmod -qv hw_random - # padlock must load before aes module -- modprobe -qv padlock -- modprobe -v ipsec -+ insmod -qv padlock -+ insmod -v ipsec - fi - if test ! -f $ipsecversion - then -diff -Nur openswan-2.4.5rc5/programs/_startklips/_startklips.in.orig openswan-2.4.5rc5.patched/programs/_startklips/_startklips.in.orig ---- openswan-2.4.5rc5/programs/_startklips/_startklips.in.orig 1970-01-01 01:00:00.000000000 +0100 -+++ openswan-2.4.5rc5.patched/programs/_startklips/_startklips.in.orig 2005-11-25 00:08:05.000000000 +0100 -@@ -0,0 +1,407 @@ -+#!/bin/sh -+# KLIPS startup script -+# Copyright (C) 1998, 1999, 2001, 2002 Henry Spencer. -+# -+# 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. See . -+# -+# 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. -+# -+# RCSID $Id$ -+ -+me='ipsec _startklips' # for messages -+ -+# KLIPS-related paths -+sysflags=/proc/sys/net/ipsec -+modules=/proc/modules -+# full rp_filter path is $rpfilter1/interface/$rpfilter2 -+rpfilter1=/proc/sys/net/ipv4/conf -+rpfilter2=rp_filter -+# %unchanged or setting (0, 1, or 2) -+rpfiltercontrol=0 -+ipsecversion=/proc/net/ipsec_version -+moduleplace=/lib/modules/`uname -r`/kernel/net/ipsec -+bareversion=`uname -r | sed -e 's/\.nptl//' | sed -e 's/^\(2\.[0-9]\.[1-9][0-9]*-[1-9][0-9]*\(\.[0-9][0-9]*\)*\(\.x\)*\).*$/\1/'` -+moduleinstplace=/lib/modules/$bareversion/kernel/net/ipsec -+case $bareversion in -+ 2.6*) -+ modulename=ipsec.ko -+ ;; -+ *) -+ modulename=ipsec.o -+ ;; -+esac -+ -+klips=true -+netkey=/proc/net/pfkey -+ -+info=/dev/null -+log=daemon.error -+for dummy -+do -+ case "$1" in -+ --log) log="$2" ; shift ;; -+ --info) info="$2" ; shift ;; -+ --debug) debug="$2" ; shift ;; -+ --omtu) omtu="$2" ; shift ;; -+ --fragicmp) fragicmp="$2" ; shift ;; -+ --hidetos) hidetos="$2" ; shift ;; -+ --rpfilter) rpfiltercontrol="$2" ; shift ;; -+ --) shift ; break ;; -+ -*) echo "$me: unknown option \`$1'" >&2 ; exit 2 ;; -+ *) break ;; -+ esac -+ shift -+done -+ -+ -+ -+# some shell functions, to clarify the actual code -+ -+# set up a system flag based on a variable -+# sysflag value shortname default flagname -+sysflag() { -+ case "$1" in -+ '') v="$3" ;; -+ *) v="$1" ;; -+ esac -+ if test ! -f $sysflags/$4 -+ then -+ if test " $v" != " $3" -+ then -+ echo "cannot do $2=$v, $sysflags/$4 does not exist" -+ exit 1 -+ else -+ return # can't set, but it's the default anyway -+ fi -+ fi -+ case "$v" in -+ yes|no) ;; -+ *) echo "unknown (not yes/no) $2 value \`$1'" -+ exit 1 -+ ;; -+ esac -+ case "$v" in -+ yes) echo 1 >$sysflags/$4 ;; -+ no) echo 0 >$sysflags/$4 ;; -+ esac -+} -+ -+# set up a Klips interface -+klipsinterface() { -+ # pull apart the interface spec -+ virt=`expr $1 : '\([^=]*\)=.*'` -+ phys=`expr $1 : '[^=]*=\(.*\)'` -+ case "$virt" in -+ ipsec[0-9]) ;; -+ *) echo "invalid interface \`$virt' in \`$1'" ; exit 1 ;; -+ esac -+ -+ # figure out ifconfig for interface -+ addr= -+ eval `ifconfig $phys | -+ awk '$1 == "inet" && $2 ~ /^addr:/ && $NF ~ /^Mask:/ { -+ gsub(/:/, " ", $0) -+ print "addr=" $3 -+ other = $5 -+ if ($4 == "Bcast") -+ print "type=broadcast" -+ else if ($4 == "P-t-P") -+ print "type=pointopoint" -+ else if (NF == 5) { -+ print "type=" -+ other = "" -+ } else -+ print "type=unknown" -+ print "otheraddr=" other -+ print "mask=" $NF -+ }'` -+ if test " $addr" = " " -+ then -+ echo "unable to determine address of \`$phys'" -+ exit 1 -+ fi -+ if test " $type" = " unknown" -+ then -+ echo "\`$phys' is of an unknown type" -+ exit 1 -+ fi -+ if test " $omtu" != " " -+ then -+ mtu="mtu $omtu" -+ else -+ mtu= -+ fi -+ echo "KLIPS $virt on $phys $addr/$mask $type $otheraddr $mtu" | logonly -+ -+ if $klips -+ then -+ # attach the interface and bring it up -+ ipsec tncfg --attach --virtual $virt --physical $phys -+ ifconfig $virt inet $addr $type $otheraddr netmask $mask $mtu -+ fi -+ -+ # if %defaultroute, note the facts -+ if test " $2" != " " -+ then -+ ( -+ echo "defaultroutephys=$phys" -+ echo "defaultroutevirt=$virt" -+ echo "defaultrouteaddr=$addr" -+ if test " $2" != " 0.0.0.0" -+ then -+ echo "defaultroutenexthop=$2" -+ fi -+ ) >>$info -+ else -+ echo '#dr: no default route' >>$info -+ fi -+ -+ # check for rp_filter trouble -+ checkif $phys # thought to be a problem only on phys -+} -+ -+# check an interface for problems -+checkif() { -+ $klips || return 0 -+ rpf=$rpfilter1/$1/$rpfilter2 -+ if test -f $rpf -+ then -+ r="`cat $rpf`" -+ if test " $r" != " 0" -+ then -+ case "$r-$rpfiltercontrol" in -+ 0-%unchanged|0-0|1-1|2-2) -+ # happy state -+ ;; -+ *-%unchanged) -+ echo "WARNING: $1 has route filtering turned on; KLIPS may not work ($rpf is $r)" -+ ;; -+ [012]-[012]) -+ echo "WARNING: changing route filtering on $1 (changing $rpf from $r to $rpfiltercontrol)" -+ echo "$rpfiltercontrol" >$rpf -+ ;; -+ [012]-*) -+ echo "ERROR: unknown rpfilter setting: $rpfiltercontrol" -+ ;; -+ *) -+ echo "ERROR: unknown $rpf value $r" -+ ;; -+ esac -+ fi -+ fi -+} -+ -+# interfaces=%defaultroute: put ipsec0 on top of default route's interface -+defaultinterface() { -+ phys=`netstat -nr | -+ awk '$1 == "0.0.0.0" && $3 == "0.0.0.0" { print $NF }'` -+ if test " $phys" = " " -+ then -+ echo "no default route, %defaultroute cannot cope!!!" -+ exit 1 -+ fi -+ if test `echo " $phys" | wc -l` -gt 1 -+ then -+ echo "multiple default routes, %defaultroute cannot cope!!!" -+ exit 1 -+ fi -+ next=`netstat -nr | -+ awk '$1 == "0.0.0.0" && $3 == "0.0.0.0" { print $2 }'` -+ klipsinterface "ipsec0=$phys" $next -+} -+ -+# log only to syslog, not to stdout/stderr -+logonly() { -+ logger -p $log -t ipsec_setup -+} -+ -+# sort out which module is appropriate, changing it if necessary -+setmodule() { -+ if [ -e /proc/kallsyms ] -+ then -+ kernelsymbols="/proc/kallsyms"; -+ echo "calcgoo: warning: 2.6 kernel with kallsyms not supported yet" -+ else -+ kernelsymbols="/proc/ksyms"; -+ fi -+ wantgoo="`ipsec calcgoo $kernelsymbols`" -+ module=$moduleplace/$modulename -+ if test -f $module -+ then -+ goo="`nm -ao $module | ipsec calcgoo`" -+ if test " $wantgoo" = " $goo" -+ then -+ return # looks right -+ fi -+ fi -+ if test -f $moduleinstplace/$wantgoo -+ then -+ echo "modprobe failed, but found matching template module $wantgoo." -+ echo "Copying $moduleinstplace/$wantgoo to $module." -+ rm -f $module -+ mkdir -p $moduleplace -+ cp -p $moduleinstplace/$wantgoo $module -+ # "depmod -a" gets done by caller -+ fi -+} -+ -+ -+ -+# main line -+ -+# load module if possible -+if test -f $ipsecversion && test -f $netkey -+then -+ # both KLIPS and NETKEY code detected, bail out -+ echo "FATAL ERROR: Both KLIPS and NETKEY IPsec code is present in kernel" -+ exit -+fi -+if test ! -f $ipsecversion && test ! -f $netkey && modprobe -qn ipsec -+then -+ # statically compiled KLIPS/NETKEY not found; try to load the module -+ modprobe ipsec -+fi -+ -+if test ! -f $ipsecversion && test ! -f $netkey -+then -+ modprobe -v af_key -+fi -+ -+if test -f $netkey -+then -+ klips=false -+ if test -f $modules -+ then -+ modprobe -qv ah4 -+ modprobe -qv esp4 -+ modprobe -qv ipcomp -+ # xfrm4_tunnel is needed by ipip and ipcomp -+ modprobe -qv xfrm4_tunnel -+ # xfrm_user contains netlink support for IPsec -+ modprobe -qv xfrm_user -+ modprobe -qv hw_random -+ # padlock must load before aes module -+ modprobe -qv padlock -+ # load the most common ciphers/algo's -+ modprobe -qv sha1 -+ modprobe -qv md5 -+ modprobe -qv des -+ modprobe -qv aes -+ fi -+fi -+ -+if test ! -f $ipsecversion && $klips -+then -+ if test -r $modules # kernel does have modules -+ then -+ if [ ! -e /proc/ksyms -a ! -e /proc/kallsyms ] -+ then -+ echo "Broken 2.6 kernel without kallsyms, skipping calcgoo (Fedora rpm?)" -+ else -+ setmodule -+ fi -+ unset MODPATH MODULECONF # no user overrides! -+ depmod -a >/dev/null 2>&1 -+ modprobe -qv hw_random -+ # padlock must load before aes module -+ modprobe -qv padlock -+ modprobe -v ipsec -+ fi -+ if test ! -f $ipsecversion -+ then -+ echo "kernel appears to lack IPsec support (neither CONFIG_KLIPS or CONFIG_NET_KEY are set)" -+ exit 1 -+ fi -+fi -+ -+# figure out debugging flags -+case "$debug" in -+'') debug=none ;; -+esac -+if test -r /proc/net/ipsec_klipsdebug -+then -+ echo "KLIPS debug \`$debug'" | logonly -+ case "$debug" in -+ none) ipsec klipsdebug --none ;; -+ all) ipsec klipsdebug --all ;; -+ *) ipsec klipsdebug --none -+ for d in $debug -+ do -+ ipsec klipsdebug --set $d -+ done -+ ;; -+ esac -+elif $klips -+then -+ if test " $debug" != " none" -+ then -+ echo "klipsdebug=\`$debug' ignored, KLIPS lacks debug facilities" -+ fi -+fi -+ -+# figure out misc. kernel config -+if test -d $sysflags -+then -+ sysflag "$fragicmp" "fragicmp" yes icmp -+ echo 1 >$sysflags/inbound_policy_check # no debate -+ sysflag no "no_eroute_pass" no no_eroute_pass # obsolete parm -+ sysflag no "opportunistic" no opportunistic # obsolete parm -+ sysflag "$hidetos" "hidetos" yes tos -+elif $klips -+then -+ echo "WARNING: cannot adjust KLIPS flags, no $sysflags directory!" -+ # carry on -+fi -+ -+if $klips -+then -+ # clear tables out in case dregs have been left over -+ ipsec eroute --clear -+ ipsec spi --clear -+elif test $netkey -+then -+ if ip xfrm state > /dev/null 2>&1 -+ then -+ ip xfrm state flush -+ ip xfrm policy flush -+ elif type setkey > /dev/null 2>&1 -+ then -+ # Check that the setkey command is available. -+ setkeycmd= -+ PATH=$PATH:/usr/local/sbin -+ for dir in `echo $PATH | tr ':' ' '` -+ do -+ if test -f $dir/setkey -a -x $dir/setkey -+ then -+ setkeycmd=$dir/setkey -+ break # NOTE BREAK OUT -+ fi -+ done -+ $setkeycmd -F -+ $setkeycmd -FP -+ else -+ -+ echo "WARNING: cannot flush state/policy database -- \`$1'. Install a newer version of iproute/iproute2 or install the ipsec-tools package to obtain the setkey command." | -+ logger -s -p daemon.error -t ipsec_setup -+ fi -+fi -+ -+# figure out interfaces -+for i -+do -+ case "$i" in -+ ipsec*=?*) klipsinterface "$i" ;; -+ %defaultroute) defaultinterface ;; -+ *) echo "interface \`$i' not understood" -+ exit 1 -+ ;; -+ esac -+done -+ -+exit 0 diff --git a/openwrt/package/openswan/patches/use-dev-urandom.patch b/openwrt/package/openswan/patches/use-dev-urandom.patch deleted file mode 100644 index 1a198845841..00000000000 --- a/openwrt/package/openswan/patches/use-dev-urandom.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -urN openswan-2.3.1dr6.old/programs/ranbits/ranbits.c openswan-2.3.1dr6.dev/programs/ranbits/ranbits.c ---- openswan-2.3.1dr6.old/programs/ranbits/ranbits.c 2004-04-04 03:50:56.000000000 +0200 -+++ openswan-2.3.1dr6.dev/programs/ranbits/ranbits.c 2005-04-05 17:37:16.000000000 +0200 -@@ -29,7 +29,7 @@ - #include - - #ifndef DEVICE --#define DEVICE "/dev/random" -+#define DEVICE "/dev/urandom" - #endif - #ifndef QDEVICE - #define QDEVICE "/dev/urandom" -diff -urN openswan-2.3.1dr6.old/programs/rsasigkey/rsasigkey.c openswan-2.3.1dr6.dev/programs/rsasigkey/rsasigkey.c ---- openswan-2.3.1dr6.old/programs/rsasigkey/rsasigkey.c 2004-05-23 23:32:03.000000000 +0200 -+++ openswan-2.3.1dr6.dev/programs/rsasigkey/rsasigkey.c 2005-04-05 17:38:00.000000000 +0200 -@@ -31,7 +31,7 @@ - #include - - #ifndef DEVICE --#define DEVICE "/dev/random" -+#define DEVICE "/dev/urandom" - #endif - #ifndef MAXBITS - #define MAXBITS 20000 -diff -urN openswan-2.3.1dr6.old/programs/starter/files.h openswan-2.3.1dr6.dev/programs/starter/files.h ---- openswan-2.3.1dr6.old/programs/starter/files.h 2005-01-11 18:52:51.000000000 +0100 -+++ openswan-2.3.1dr6.dev/programs/starter/files.h 2005-04-05 17:38:16.000000000 +0200 -@@ -36,7 +36,7 @@ - - #define MY_PID_FILE "/var/run/pluto/ipsec-starter.pid" - --#define DEV_RANDOM "/dev/random" -+#define DEV_RANDOM "/dev/urandom" - #define DEV_URANDOM "/dev/urandom" - - #define PROC_IPSECVERSION "/proc/net/ipsec_version" diff --git a/openwrt/package/openvpn/Config.in b/openwrt/package/openvpn/Config.in deleted file mode 100644 index 3feffa3016b..00000000000 --- a/openwrt/package/openvpn/Config.in +++ /dev/null @@ -1,53 +0,0 @@ -menu "openvpn........................... Open source VPN solution using SSL" - -config BR2_PACKAGE_OPENVPN - prompt "openvpn........................... Open source VPN solution using SSL" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_TUN - help - Open Source VPN solution using SSL - - http://openvpn.net/ - - Depends: kmod-tun, libpthread - -config BR2_COMPILE_OPENVPN_WITH_SERVER - prompt "Enable server support" - bool - default y - depends BR2_PACKAGE_OPENVPN - -config BR2_COMPILE_OPENVPN_WITH_HTTP - prompt "Enable http proxy support" - bool - default y - depends BR2_PACKAGE_OPENVPN - -config BR2_COMPILE_OPENVPN_WITH_OPENSSL - prompt "Enable openssl support" - bool - default y - depends BR2_PACKAGE_OPENVPN - select BR2_PACKAGE_LIBOPENSSL - -config BR2_COMPILE_OPENVPN_WITH_LZO - prompt "Enable transparent compression (lzo)" - bool - default y - depends BR2_PACKAGE_OPENVPN - select BR2_PACKAGE_LIBLZO - -config BR2_COMPILE_OPENVPN_WITH_PASSWORD_SAVE - prompt "Enable password saving" - bool - default y - depends BR2_PACKAGE_OPENVPN - -config BR2_COMPILE_OPENVPN_WITH_SMALL - prompt "Enable smaller executable size (disable OCC, usage message, and verb 4 parm list)" - bool - default n - depends BR2_PACKAGE_OPENVPN - -endmenu diff --git a/openwrt/package/openvpn/Makefile b/openwrt/package/openvpn/Makefile deleted file mode 100644 index caa19d21362..00000000000 --- a/openwrt/package/openvpn/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openvpn -PKG_VERSION:=2.0.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=8d2f95fa825e58363a676b25d4815aa7 - -PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,OPENVPN,openvpn,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -PKG_DEPEND:="kmod-tun" - -ifneq ($(BR2_COMPILE_OPENVPN_WITH_OPENSSL),y) -DISABLE_OPENSSL:=--disable-ssl --disable-crypto -else -PKG_DEPEND+=", libopenssl" -endif - -ifneq ($(BR2_COMPILE_OPENVPN_WITH_LZO),y) -DISABLE_LZO:=--disable-lzo -else -PKG_DEPEND+=", liblzo" -endif - -ifneq ($(BR2_COMPILE_OPENVPN_WITH_SERVER),y) -DISABLE_SERVER:=--disable-server -endif -ifneq ($(BR2_COMPILE_OPENVPN_WITH_HTTP),y) -DISABLE_HTTP:=--disable-http -endif -ifeq ($(BR2_COMPILE_OPENVPN_WITH_PASSWORD_SAVE),y) -ENABLE_PASSWORD_SAVE:=--enable-password-save -endif -ifeq ($(BR2_COMPILE_OPENVPN_WITH_SMALL),y) -ENABLE_SMALL:=--enable-small -endif - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-pthread \ - --disable-debug \ - --disable-plugins \ - --disable-management \ - --disable-socks \ - $(DISABLE_LZO) \ - $(DISABLE_OPENSSL) \ - $(DISABLE_SERVER) \ - $(DISABLE_HTTP) \ - $(ENABLE_PASSWORD_SAVE) \ - $(ENABLE_SMALL) \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $(PKG_BUILD_DIR)/.built - -$(IPKG_OPENVPN): - install -d -m0755 $(IDIR_OPENVPN)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/ - $(RSTRIP) $(IDIR_OPENVPN) - echo "Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN)/CONTROL/control - $(IPKG_BUILD) $(IDIR_OPENVPN) $(PACKAGE_DIR) - diff --git a/openwrt/package/openvpn/ipkg/openvpn.control b/openwrt/package/openvpn/ipkg/openvpn.control deleted file mode 100644 index 50f06bacb4e..00000000000 --- a/openwrt/package/openvpn/ipkg/openvpn.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: openvpn -Priority: optional -Section: net -Description: Open Source VPN solution using SSL diff --git a/openwrt/package/osiris/Config.in b/openwrt/package/osiris/Config.in deleted file mode 100644 index 69afb907781..00000000000 --- a/openwrt/package/osiris/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -config BR2_COMPILE_OSIRIS - tristate - default n - depends BR2_PACKAGE_OSIRISD - -config BR2_PACKAGE_OSIRISD - prompt "osirisd........................... Host integrity monitoring system (scanning agent)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_OSIRIS - select BR2_PACKAGE_LIBOPENSSL - help - An host integrity monitoring system (scanning agent) - - http://www.hostintegrity.com/osiris/ - - Depends: openssl - diff --git a/openwrt/package/osiris/Makefile b/openwrt/package/osiris/Makefile deleted file mode 100644 index 900a1491dc2..00000000000 --- a/openwrt/package/osiris/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=osiris -PKG_VERSION:=4.2.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=ad30995660e506ee6d1d6460601f6107 - -PKG_SOURCE_URL:=http://www.hostintegrity.com/osiris/data/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,OSIRISD,osirisd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ac_cv_openssldir="$(STAGING_DIR)/usr" \ - ac_cv_have_accrights_in_msghdr=no \ - ac_cv_have_control_in_msghdr=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-osiris-user=root \ - --with-root-dir=/var/lib/osiris \ - --with-readline=no \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - ar=$(TARGET_CROSS)ar \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - INTERACTIVE=0 \ - all install - touch $@ - -$(IPKG_OSIRISD): - install -d -m0755 $(IDIR_OSIRISD)/etc/init.d - install -m0755 ./files/osirisd.init $(IDIR_OSIRISD)/etc/init.d/osirisd - install -d -m0755 $(IDIR_OSIRISD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/osirisd $(IDIR_OSIRISD)/usr/sbin/ - $(RSTRIP) $(IDIR_OSIRISD) - $(IPKG_BUILD) $(IDIR_OSIRISD) $(PACKAGE_DIR) diff --git a/openwrt/package/osiris/files/osirisd.init b/openwrt/package/osiris/files/osirisd.init deleted file mode 100644 index 75904e34995..00000000000 --- a/openwrt/package/osiris/files/osirisd.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -BIN=osirisd -DEFAULT=/etc/default/$BIN -LIB_D=/var/lib/osiris -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $LIB_D - mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac -exit $? diff --git a/openwrt/package/osiris/ipkg/osirisd.control b/openwrt/package/osiris/ipkg/osirisd.control deleted file mode 100644 index defe7c35691..00000000000 --- a/openwrt/package/osiris/ipkg/osirisd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: osirisd -Priority: optional -Section: admin -Depends: libopenssl, libpthread -Description: an Host Integrity Monitoring System (scanning agent) diff --git a/openwrt/package/osiris/patches/01-configure-cross.patch b/openwrt/package/osiris/patches/01-configure-cross.patch deleted file mode 100644 index 025a3f84197..00000000000 --- a/openwrt/package/osiris/patches/01-configure-cross.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- osiris-4.1.8-orig/configure 2005-04-13 15:22:13.000000000 +0200 -+++ osiris-4.1.8-1/configure 2005-04-22 23:11:32.000000000 +0200 -@@ -3606,7 +3606,7 @@ - esac - - --DB_CONFIG_ARGS="--enable-shared=no --enable-static=yes" -+DB_CONFIG_ARGS="--target=${target_alias} --host=${host_alias} --build=${build_alias} --enable-shared=no --enable-static=yes" - - case "${OS_NAME}" in - MINGW32*) ---- osiris-4.1.8-orig/configure.ac 2005-04-13 15:22:13.000000000 +0200 -+++ osiris-4.1.8-1/configure.ac 2005-04-22 23:11:32.000000000 +0200 -@@ -270,7 +270,7 @@ - - dnl configure local copy of Berkely DB: - --DB_CONFIG_ARGS="--enable-shared=no --enable-static=yes" -+DB_CONFIG_ARGS="--target=${target_alias} --host=${host_alias} --build=${build_alias} --enable-shared=no --enable-static=yes" - - case "${OS_NAME}" in - MINGW32*) diff --git a/openwrt/package/osiris/patches/02-osirisd-pidfile.patch b/openwrt/package/osiris/patches/02-osirisd-pidfile.patch deleted file mode 100644 index 80c52dbf1a7..00000000000 --- a/openwrt/package/osiris/patches/02-osirisd-pidfile.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- osiris-4.1.8-orig/src/osirisd/osirisd.c 2005-04-14 01:00:55.000000000 +0200 -+++ osiris-4.1.8-1/src/osirisd/osirisd.c 2005-04-22 23:11:32.000000000 +0200 -@@ -218,6 +218,8 @@ - - #ifdef USE_PRIVSEP - rootpriv_setup_pidfile(); -+#else -+ setup_pidfile(); - #endif - - process(); ---- osiris-4.1.8-orig/src/osirisd/rootpriv.c 2005-04-14 00:55:59.000000000 +0200 -+++ osiris-4.1.8-1/src/osirisd/rootpriv.c 2005-04-22 23:25:10.000000000 +0200 -@@ -35,6 +35,10 @@ - #include "logging.h" - #include "rootpriv.h" - -+#ifndef WIN32 -+extern char pid_file[MAX_PATH_LENGTH]; -+#endif -+ - #ifdef USE_PRIVSEP - - /* this is defined in regex, and sometimes conflicts with stuff */ -@@ -80,10 +84,6 @@ - extern pid_t child_pid; - extern int rootpriv_pipe[2]; /* socketpair used for rootpriv comm. */ - --#ifndef WIN32 --extern char pid_file[MAX_PATH_LENGTH]; --#endif -- - #define INCOMING_ROOT_REQUEST() ( FD_ISSET( rootpriv_pipe[1], &root_read_set ) ) - - -@@ -292,17 +292,6 @@ - #endif - } - --void setup_pidfile() --{ -- FILE *pidfile = fopen( pid_file, "wb" ); -- -- if( pidfile != NULL ) -- { -- fprintf( pidfile, "%ld\n", (long)getpid() ); -- fclose( pidfile ); -- } --} -- - void handle_signals() - { - pid_t pid; -@@ -789,3 +778,14 @@ - - #endif /* USE_PRIVSEP */ - -+void setup_pidfile() -+{ -+ FILE *pidfile = fopen( pid_file, "wb" ); -+ -+ if( pidfile != NULL ) -+ { -+ fprintf( pidfile, "%ld\n", (long)getpid() ); -+ fclose( pidfile ); -+ } -+} -+ diff --git a/openwrt/package/osiris/patches/03-openssl-0.9.8+.patch b/openwrt/package/osiris/patches/03-openssl-0.9.8+.patch deleted file mode 100644 index 806cf3afe28..00000000000 --- a/openwrt/package/osiris/patches/03-openssl-0.9.8+.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ruN osiris-4.1.9-old/src/osirismd/md_control.c osiris-4.1.9-new/src/osirismd/md_control.c ---- osiris-4.1.9-old/src/osirismd/md_control.c 2005-03-24 16:36:07.000000000 +0100 -+++ osiris-4.1.9-new/src/osirismd/md_control.c 2006-03-28 01:32:32.000000000 +0200 -@@ -3262,9 +3262,9 @@ - int index; - char checksum[41]; - -- SHA_Init( &context ); -- SHA_Update( &context, key, (unsigned long)keysize ); -- SHA_Final( &( digest[0] ), &context ); -+ SHA1_Init( &context ); -+ SHA1_Update( &context, key, (unsigned long)keysize ); -+ SHA1_Final( &( digest[0] ), &context ); - - for ( index = 0; index < SHA_DIGEST_LENGTH; index++ ) - { diff --git a/openwrt/package/osiris/patches/mod_if.patch b/openwrt/package/osiris/patches/mod_if.patch deleted file mode 100644 index 751301f2ecc..00000000000 --- a/openwrt/package/osiris/patches/mod_if.patch +++ /dev/null @@ -1,392 +0,0 @@ -Description: The mod_if module monitors various aspects of network - interfaces for change, including IP, Hardware Address, - broadcast, MTU, metric, and promiscuous mode. -Version: 0.2 - -diff -ruN osiris-4.1.9-old/src/osirisd/modules/mod_if/Makefile osiris-4.1.9-new/src/osirisd/modules/mod_if/Makefile ---- osiris-4.1.9-old/src/osirisd/modules/mod_if/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.9-new/src/osirisd/modules/mod_if/Makefile 2005-10-07 02:19:17.000000000 +0200 -@@ -0,0 +1,16 @@ -+ -+include ../Makefile -+ -+SRCS=mod_if.c -+OBJS=$(SRCS:.c=.o) -+ -+module: ${SRCS} ${OBJS} -+ -+INCS=-I../.. -I../../../libosiris -I../../../libfileapi -I../../../.. -+ -+# meta-rule for compiling any "C" source file. -+$(OBJS): $(SRCS) -+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) ${INCLUDES} ${INCS} $(AM_CPPFLAGS) \ -+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $(SRCS) -+ cp $@ .. -+ -diff -ruN osiris-4.1.9-old/src/osirisd/modules/mod_if/README osiris-4.1.9-new/src/osirisd/modules/mod_if/README ---- osiris-4.1.9-old/src/osirisd/modules/mod_if/README 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.9-new/src/osirisd/modules/mod_if/README 2005-10-07 02:19:17.000000000 +0200 -@@ -0,0 +1,42 @@ -+ -+Module: mod_if -+Author: Brian Wotring (brian@hostintegrity.com) -+ -+ -+ -+DESCRIPTION: -+ -+The mod_if module is designed originally to monitor the promisc flag -+on network interfaces, but quickly turned into being able to monitor -+various aspects of network interfaces including hardware address, -+IP address, broadcast, MTU, and metric. -+ -+This module is somewhat different in that each record is an element -+about a network interface as opposed to one record per interface. This -+will make it easier to add more elements to be monitored, easier to -+filter, and easier to understand alerts. -+ -+USE: -+ -+To use this module, all that is needed is to include it in the Modules -+block of a scan configuration, e.g.: -+ -+ -+ ... -+ Include mod_if -+ ... -+ -+ -+ -+PARAMETERS: -+ -+There are no parameters for this module. -+ -+PLATFORMS: -+ -+Currently, this module is only implemented for Linux. -+ -+NOTES: -+ -+ -+ -diff -ruN osiris-4.1.9-old/src/osirisd/modules/mod_if/mod_if.c osiris-4.1.9-new/src/osirisd/modules/mod_if/mod_if.c ---- osiris-4.1.9-old/src/osirisd/modules/mod_if/mod_if.c 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.9-new/src/osirisd/modules/mod_if/mod_if.c 2005-10-07 02:19:17.000000000 +0200 -@@ -0,0 +1,317 @@ -+ -+/****************************************************************************** -+** -+** Copyright (C) 2005 Brian Wotring. -+** -+** This program is free software; you can redistribute it and/or -+** modify it, however, you cannot sell it. -+** -+** 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. -+** -+** You should have received a copy of the license attached to the -+** use of this software. If not, view a current copy of the license -+** file here: -+** -+** http://www.hostintegrity.com/osiris/LICENSE -+** -+******************************************************************************/ -+ -+/***************************************************************************** -+** -+** File: mod_if.c -+** Date: September 23, 2005 -+** -+** Author: Brian Wotring -+** Purpose: platform specific methods for monitoring network devices. -+** -+******************************************************************************/ -+ -+ -+/* CODE USED IN THIS MODULE WAS ORIGINALLY TAKEN FROM: -+* -+* http://mail.nl.linux.org/kernelnewbies/2003-05/msg00090.html -+*/ -+ -+static const char *MODULE_NAME = "mod_if"; -+ -+ -+#ifndef WIN32 -+#include "config.h" -+#endif -+ -+#include -+#include -+ -+#ifndef WIN32 -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#endif -+ -+#include -+#include -+#include -+ -+ -+#include "libosiris.h" -+#include "libfileapi.h" -+#include "rootpriv.h" -+#include "common.h" -+#include "version.h" -+ -+#include "scanner.h" -+#include "logging.h" -+ -+ -+#define inaddrr(x) (*(struct in_addr *) &ifr->x[sizeof sa.sin_port]) -+#define IFRSIZE ((int)(size * sizeof (struct ifreq))) -+ -+void process_if_unix( SCANNER *scanner ) -+{ -+ unsigned char*u; -+ int sockfd, size = 1; -+ struct ifreq *ifr; -+ struct ifconf ifc; -+ struct sockaddr_in sa; -+ -+ SCAN_RECORD_TEXT_1 record; -+ -+ /* Make sure we are able to create sockets */ -+ -+ if ( (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP)) < 0 ) -+ { -+ log_error( "mod_if unable to create socket!" ); -+ return; -+ } -+ -+ ifc.ifc_len = IFRSIZE; -+ ifc.ifc_req = NULL; -+ -+ do -+ { -+ ++size; -+ -+ /* realloc buffer size until no overflow occurs */ -+ -+ if ((ifc.ifc_req = realloc(ifc.ifc_req, IFRSIZE)) == NULL ) -+ { -+ log_error( "out of memory!!!" ); -+ return; -+ } -+ -+ ifc.ifc_len = IFRSIZE; -+ -+ if (ioctl(sockfd, SIOCGIFCONF, &ifc)) -+ { -+ log_error("ioctl failure: SIOCFIFCONF"); -+ return; -+ } -+ -+ } while (IFRSIZE <= ifc.ifc_len); -+ -+ ifr = ifc.ifc_req; -+ -+ for (;(char *) ifr < (char *) ifc.ifc_req + ifc.ifc_len; ++ifr) -+ { -+ if (ifr->ifr_addr.sa_data == (ifr+1)->ifr_addr.sa_data) -+ { -+ continue; /* duplicate, skip it */ -+ } -+ -+ if (ioctl(sockfd, SIOCGIFFLAGS, ifr)) -+ { -+ continue; /* failed to get flags, skip it */ -+ } -+ -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+ osi_snprintf( record.name, sizeof( record.name ), -+ "if:%s:IP", ifr->ifr_name ); -+ -+ osi_snprintf( record.data, sizeof( record.data ), -+ "%s", inet_ntoa(inaddrr(ifr_addr.sa_data))); -+ -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+ -+ /* -+ * This won't work on HP-UX 10.20 as there's no SIOCGIFHWADDR ioctl. You'll -+ * need to use DLPI or the NETSTAT ioctl on /dev/lan0, etc (and you'll need -+ * to be root to use the NETSTAT ioctl. Also this is deprecated and doesn't -+ * work on 11.00). -+ * -+ * On Digital Unix you can use the SIOCRPHYSADDR ioctl according to an old -+ * utility I have. Also on SGI I think you need to use a raw socket, e.g. s -+ * = socket(PF_RAW, SOCK_RAW, RAWPROTO_SNOOP) -+ * -+ * Dave -+ * -+ * From: David Peter -+ **/ -+ -+ if ( ioctl(sockfd, SIOCGIFHWADDR, ifr) == 0 ) -+ { -+ /* Select which hardware types to process. -+ ** -+ ** See list in system include file included from -+ ** /usr/include/net/if_arp.h (For example, on -+ ** Linux see file /usr/include/linux/if_arp.h to -+ ** get the list.) -+ **/ -+ -+ switch (ifr->ifr_hwaddr.sa_family) -+ { -+ default: -+ continue; -+ -+ case ARPHRD_NETROM: -+ case ARPHRD_ETHER: -+ case ARPHRD_PPP: -+ case ARPHRD_EETHER: -+ case ARPHRD_IEEE802: -+ break; -+ } -+ -+ u = (unsigned char *) &ifr->ifr_addr.sa_data; -+ -+ /* send record for MAC for this interface */ -+ -+ if (u[0] + u[1] + u[2] + u[3] + u[4] + u[5]) -+ { -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+ osi_snprintf( record.name, sizeof( record.name ), -+ "if:%s:MAC", ifr->ifr_name ); -+ -+ osi_snprintf( record.data, sizeof( record.data ), -+ "%2.2x.%2.2x.%2.2x.%2.2x.%2.2x.%2.2x", -+ u[0], u[1], u[2], u[3], u[4], u[5]); -+ -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+ } -+ } -+ -+ if ( ioctl(sockfd, SIOCGIFNETMASK, ifr) == 0 && -+ strcmp("255.255.255.255", inet_ntoa(inaddrr(ifr_addr.sa_data)))) -+ { -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+ osi_snprintf( record.name, sizeof( record.name ), -+ "if:%s:NETMASK", ifr->ifr_name ); -+ -+ osi_snprintf( record.data, sizeof( record.data ), -+ "%s", inet_ntoa(inaddrr(ifr_addr.sa_data))); -+ -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+ } -+ -+ if (ifr->ifr_flags & IFF_BROADCAST) -+ { -+ if ( ioctl(sockfd, SIOCGIFBRDADDR, ifr) == 0 && -+ strcmp("0.0.0.0", inet_ntoa(inaddrr(ifr_addr.sa_data)))) -+ { -+ -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+ osi_snprintf( record.name, sizeof( record.name ), -+ "if:%s:BROADCAST", ifr->ifr_name ); -+ -+ osi_snprintf( record.data, sizeof( record.data ), -+ "%s",inet_ntoa(inaddrr(ifr_addr.sa_data))); -+ -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+ } -+ } -+ -+ /* Added by David Vasil to check for Promiscuous mode */ -+ -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+ -+ osi_snprintf( record.name, sizeof( record.name ), -+ "if:%s:PROMISC", ifr->ifr_name ); -+ -+ if ( ioctl(sockfd, SIOCGIFFLAGS, ifr) == 0 && -+ ifr->ifr_flags & IFF_PROMISC) -+ { -+ osi_strlcpy( record.data, "ENABLED", sizeof( record.data ) ); -+ } -+ -+ else -+ { -+ osi_strlcpy( record.data, "DISABLED", sizeof( record.data ) ); -+ } -+ -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+ -+ -+ if ( ioctl(sockfd, SIOCGIFMTU, ifr) == 0 ) -+ { -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+ osi_snprintf( record.name, sizeof( record.name ), -+ "if:%s:MTU", ifr->ifr_name ); -+ -+ osi_snprintf( record.data, sizeof( record.data ), -+ "%u", ifr->ifr_mtu ); -+ -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+ } -+ -+ if ( ioctl(sockfd, SIOCGIFMETRIC, ifr) == 0 ) -+ { -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+ osi_snprintf( record.name, sizeof( record.name ), -+ "if:%s:METRIC", ifr->ifr_name ); -+ -+ osi_snprintf( record.data, sizeof( record.data ), -+ "%u", ifr->ifr_metric ); -+ -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+ } -+ } -+ -+ close(sockfd); -+} -+ -+void mod_if( SCANNER *scanner ) -+{ -+#if defined(SYSTEM_LINUX) -+ process_if_unix( scanner ); -+#endif -+ -+} diff --git a/openwrt/package/osiris/patches/mod_nvram.patch b/openwrt/package/osiris/patches/mod_nvram.patch deleted file mode 100644 index 69b6cd60992..00000000000 --- a/openwrt/package/osiris/patches/mod_nvram.patch +++ /dev/null @@ -1,213 +0,0 @@ -Description: The mod_nvram module was developed specifically to monitor - configuration settings stored in nvram on Linksys devices. - In the future, this module could be used to monitor other - attributes of similar devices. -Version: 0.1 - ---- osiris-4.1.8-orig/src/osirisd/modules/mod_nvram/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.8-1/src/osirisd/modules/mod_nvram/Makefile 2005-04-22 23:11:32.000000000 +0200 -@@ -0,0 +1,16 @@ -+ -+include ../Makefile -+ -+SRCS=mod_nvram.c -+OBJS=$(SRCS:.c=.o) -+ -+module: ${SRCS} ${OBJS} -+ -+INCS=-I../.. -I../../../libosiris -I../../../libfileapi -I../../../.. -+ -+# meta-rule for compiling any "C" source file. -+$(OBJS): $(SRCS) -+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) ${INCLUDES} ${INCS} $(AM_CPPFLAGS) \ -+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $(SRCS) -+ cp $@ .. -+ ---- osiris-4.1.8-orig/src/osirisd/modules/mod_nvram/README 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.8-1/src/osirisd/modules/mod_nvram/README 2005-04-22 23:11:32.000000000 +0200 -@@ -0,0 +1,40 @@ -+ -+Module: mod_nvram -+Author: Brian Wotring (brian@shmoo.com) -+ -+ -+ -+DESCRIPTION: -+ -+The mod_nvram module reads the key=value pairs stored in nvram. This -+is primarily for Linksys routers, but could be modified to run on -+other systems if necessary. On the routers like the WRT54G, the -+nvram settings hold sensitive information that needs to be monitored. -+The format for the record structure is as follows: -+ -+ name:value -+ -+USE: -+ -+To use this module, all that is needed is to include it in the System -+block of a scan configuration, e.g.: -+ -+ -+ ... -+ Include mod_nvram -+ ... -+ -+ -+ -+PARAMETERS: -+ -+There are no parameters for this module. -+ -+PLATFORMS: -+ -+Currently, only for the Linksys WRT54G and WRT54GS devices. -+ -+NOTES: -+ -+ -+ ---- osiris-4.1.8-orig/src/osirisd/modules/mod_nvram/mod_nvram.c 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.8-1/src/osirisd/modules/mod_nvram/mod_nvram.c 2005-04-22 23:11:32.000000000 +0200 -@@ -0,0 +1,142 @@ -+ -+/****************************************************************************** -+** -+** This program is free software; you can redistribute it and/or -+** modify it, however, you cannot sell it. -+** -+** 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. -+** -+** You should have received a copy of the license attached to the -+** use of this software. If not, visit www.shmoo.com/osiris for -+** details. -+** -+******************************************************************************/ -+ -+/***************************************************************************** -+** -+** File: mod_users.c -+** Date: January 1, 2004 -+** -+** Author: Brian Wotring -+** Purpose: platform specific methods for reading user file information. -+** -+******************************************************************************/ -+ -+#include "libosiris.h" -+#include "libfileapi.h" -+#include "rootpriv.h" -+#include "common.h" -+#include "version.h" -+ -+#include "scanner.h" -+#include "logging.h" -+ -+ -+#define NVRAM_PATH "/usr/sbin/nvram" -+#define NVRAM_ARG "show" -+ -+static const char *MODULE_NAME = "mod_nvram"; -+ -+ -+void mod_nvram( SCANNER *scanner ) -+{ -+ int pid; -+ int pc[2]; -+ int cp[2]; -+ char temp_line[4096]; -+ FILE *file; -+ SCAN_RECORD_TEXT_1 record; -+ -+ if( pipe(pc) < 0) -+ { -+ log_error( "mod_nvram: error creating pipe!" ); -+ return; -+ } -+ -+ if( pipe(cp) < 0) -+ { -+ log_error( "mod_nvram: error creating pipe!" ); -+ return; -+ } -+ -+ /* Create a child to run nvram command. */ -+ -+ switch( pid = fork() ) -+ { -+ case -1: -+ log_error( "nvram: fork error!" ); -+ return; -+ -+ case 0: -+ -+ /* child */ -+ -+ close(1); -+ dup( cp[1]); -+ close(0); -+ close( pc[1]); -+ close( cp[0]); -+ execl( NVRAM_PATH, NVRAM_PATH, NVRAM_ARG, NULL ); -+ exit(0); -+ -+ default: -+ -+ /* parent */ -+ -+ close(pc[1]); -+ close(cp[1]); -+ -+ file = fdopen( cp[0], "r" ); -+ -+ for(;;) -+ { -+ char *line; -+ char *key_end; -+ -+ line = fgets( temp_line, sizeof( temp_line ), file ); -+ -+ if( line == NULL) -+ { -+ break; -+ } -+ -+ line = trim_white_space( line ); -+ -+ /* skip commented and empty lines. */ -+ -+ if( ( line == NULL ) || ( line[0] == '#' ) ) -+ { -+ continue; -+ } -+ -+ /* locate the username, this is the first item in the colon list. */ -+ -+ if( ( key_end = strchr( line, '=' ) ) == NULL ) -+ { -+ continue; -+ } -+ -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+ /* user the key as a key/path for this record. */ -+ -+ (*key_end) = '\0'; -+ key_end++; -+ osi_strlcpy( record.name, "nvram:", sizeof( record.name ) ); -+ osi_strlcat( record.name, line, sizeof( record.name ) ); -+ -+ /* now copy in the value into the data portion. */ -+ /* and send this record on its way. */ -+ -+ osi_strlcpy( record.data, key_end, sizeof( record.data ) ); -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+ } -+ } -+} -+ diff --git a/openwrt/package/osiris/patches/mod_uptime.patch b/openwrt/package/osiris/patches/mod_uptime.patch deleted file mode 100644 index 2bfeec6b44d..00000000000 --- a/openwrt/package/osiris/patches/mod_uptime.patch +++ /dev/null @@ -1,243 +0,0 @@ -Description: The mod_uptime module obtains the system boot time value - for comparison with scans. -Version: 0.2 - ---- osiris-4.1.8-orig/src/osirisd/modules/mod_uptime/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.8-1/src/osirisd/modules/mod_uptime/Makefile 2005-04-22 23:11:32.000000000 +0200 -@@ -0,0 +1,16 @@ -+ -+include ../Makefile -+ -+SRCS=mod_uptime.c -+OBJS=$(SRCS:.c=.o) -+ -+module: ${SRCS} ${OBJS} -+ -+INCS=-I../.. -I../../../libosiris -I../../../libfileapi -I../../../.. -+ -+# meta-rule for compiling any "C" source file. -+$(OBJS): $(SRCS) -+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) ${INCLUDES} ${INCS} $(AM_CPPFLAGS) \ -+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $(SRCS) -+ cp $@ .. -+ ---- osiris-4.1.8-orig/src/osirisd/modules/mod_uptime/README 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.8-1/src/osirisd/modules/mod_uptime/README 2005-04-22 23:11:32.000000000 +0200 -@@ -0,0 +1,36 @@ -+ -+Module: mod_uptime -+Author: Brian Wotring (brian@shmoo.com) -+ -+ -+ -+DESCRIPTION: -+ -+The mod_uptime module obtains the system boot time value for comparison -+with scans. -+ -+USE: -+ -+To use this module, all that is needed is to include it in the System -+block of a scan configuration, e.g.: -+ -+ -+ ... -+ Include mod_uptime -+ ... -+ -+ -+ -+PARAMETERS: -+ -+There are no parameters for this module. -+ -+PLATFORMS: -+ -+Currently, this module is implemented for FreeBSD, OpenBSD, -+Linux, Solaris, and Mac OS X. -+ -+NOTES: -+ -+ -+ ---- osiris-4.1.8-orig/src/osirisd/modules/mod_uptime/mod_uptime.c 1970-01-01 01:00:00.000000000 +0100 -+++ osiris-4.1.8-1/src/osirisd/modules/mod_uptime/mod_uptime.c 2005-04-22 23:11:32.000000000 +0200 -@@ -0,0 +1,178 @@ -+ -+/****************************************************************************** -+** -+** This program is free software; you can redistribute it and/or -+** modify it, however, you cannot sell it. -+** -+** 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. -+** -+** You should have received a copy of the license attached to the -+** use of this software. If not, visit www.shmoo.com/osiris for -+** details. -+** -+******************************************************************************/ -+ -+/***************************************************************************** -+** -+** File: mod_uptime.c -+** Date: March 22, 2004 -+** -+** Author: Brian Wotring -+** Purpose: platform specific methods for obtaining the system boot time. -+** -+******************************************************************************/ -+ -+#include "libosiris.h" -+#include "libfileapi.h" -+#include "rootpriv.h" -+#include "common.h" -+#include "version.h" -+ -+#include "scanner.h" -+#include "logging.h" -+#include "config.h" -+ -+#ifdef HAVE_SYS_SYSCTL_H -+#include -+#endif -+ -+#ifdef SYSTEM_SUNOS -+#include -+#endif -+ -+#ifdef SYSTEM_LINUX -+#include -+#endif -+ -+#define PROC_FILE "/proc/uptime" -+#define OSI_WTMP_FILE "/var/log/wtmp" -+ -+static const char *MODULE_NAME = "mod_uptime"; -+ -+ -+void mod_uptime( SCANNER *scanner ) -+{ -+ SCAN_RECORD_TEXT_1 record; -+ char *time = NULL; -+ char *temp; -+ -+ initialize_scan_record( (SCAN_RECORD *)&record, -+ SCAN_RECORD_TYPE_TEXT_1 ); -+ -+ osi_strlcpy( record.module_name, MODULE_NAME, -+ sizeof( record.module_name ) ); -+ -+#if defined(SYSTEM_FREEBSD) || defined(SYSTEM_OPENBSD) || defined(SYSTEM_DARWIN) -+ { -+ time_t t; -+ struct timeval result; -+ -+ int request[2] = { CTL_KERN, KERN_BOOTTIME }; -+ size_t result_len = sizeof(result); -+ -+ if( sysctl( request, 2, &result, &result_len, NULL, 0 ) < 0) -+ { -+ log_error( "unable to obtain uptime value." ); -+ return; -+ } -+ -+ t = result.tv_sec; -+ time = ctime( &t ); -+ } -+ -+#elif defined(SYSTEM_SUNOS) -+ { -+ struct utmpx * ent; -+ time_t t; -+ -+ while( ( ent = getutxent() ) ) -+ { -+ if( !strcmp( "system boot", ent->ut_line ) ) -+ { -+ t = ent->ut_tv.tv_sec; -+ time = ctime( &t ); -+ } -+ } -+ } -+ -+#elif defined(SYSTEM_LINUX) -+ { -+ FILE *fp; -+ time_t t; -+ struct utmp ut; -+ -+ char buf[40]; -+ char buf2[10]; -+ int filecount = 0; -+ -+next_file: -+ -+ osi_strlcpy( buf, OSI_WTMP_FILE, sizeof( buf ) ); -+ -+ if( filecount > 0 ) -+ { -+ osi_snprintf( buf2, sizeof(buf2), "%d", filecount ); -+ osi_strlcat( buf, buf2, sizeof(buf) ); -+ } -+ -+ fp = osi_fopen( buf, "r", 0 ); -+ -+ if( fp == NULL ) -+ { -+ log_error( "unable to obtain uptime value." ); -+ return; -+ } -+ -+ while(1) -+ { -+ int rc = fread( &ut, 1, sizeof(ut), fp ); -+ -+ /* end of file, try next. */ -+ -+ if( rc == 0 ) -+ { -+ filecount++; -+ fclose( fp ); -+ -+ goto next_file; -+ } -+ -+ /* found restart event. */ -+ -+ if( ( strcmp( ut.ut_name, "reboot" ) == 0 ) || -+ ( strcmp( ut.ut_name, "shutdown" ) == 0 ) ) -+ { -+ -+ t = ut.ut_time; -+ time = ctime( &t ); -+ -+ break; -+ } -+ } -+ -+ fclose( fp ); -+ } -+#endif -+ -+ if( time == NULL ) -+ { -+ log_error( "unable to obtain uptime value." ); -+ return; -+ } -+ -+ /* remove any trailing newline from the ctime() calls. */ -+ -+ if( ( temp = strchr( time, '\n' ) ) ) -+ { -+ (*temp) = '\0'; -+ } -+ -+ osi_strlcpy( record.name, "uptime", sizeof( record.name ) ); -+ osi_strlcpy( record.data, time, sizeof( record.data ) ); -+ -+ send_scan_data( scanner, (SCAN_RECORD *)&record ); -+} -+ -+ diff --git a/openwrt/package/p910nd/Config.in b/openwrt/package/p910nd/Config.in deleted file mode 100644 index a94d030b124..00000000000 --- a/openwrt/package/p910nd/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_PACKAGE_P910ND - prompt "p910nd............................ A small non-spooling printer server" - tristate - default m if CONFIG_DEVEL - help - p910nd is a small daemon that copies any data received on - the port it is listening on to the corresponding printer - port. It is primarily intended for diskless Linux hosts - running as printer drivers but there is no reason why it - could not be used on diskful hosts. Port 9100 is copied - to /dev/lp0, 9101 to /dev/lp1 and 9102 to /dev/lp2. The - default is port 9100 to /dev/lp0. - - http://www.etherboot.org/p910nd/ - diff --git a/openwrt/package/p910nd/Makefile b/openwrt/package/p910nd/Makefile deleted file mode 100644 index 491e6e5193f..00000000000 --- a/openwrt/package/p910nd/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=p910nd -PKG_VERSION:=0.7 -PKG_RELEASE:=2 -PKG_MD5SUM:=7bf752532d26c9106f8039db95df3a6b - -PKG_SOURCE_URL:=http://www.etherboot.org/p910nd -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -PKG_INIT_PRIO=70 - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,P910ND,p910nd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -DLOCKFILE_DIR=\"\\\"/tmp\\\"\"" - touch $@ - -$(IPKG_P910ND): - install -d -m0755 $(IDIR_P910ND)/etc/default - install -m0644 ./files/p910nd.default $(IDIR_P910ND)/etc/default/p910nd - install -d -m0755 $(IDIR_P910ND)/etc/init.d - install -m0755 ./files/p910nd.init $(IDIR_P910ND)/etc/init.d/p910nd - install -d -m0755 $(IDIR_P910ND)/usr/sbin - ln -sf p910nd $(IDIR_P910ND)/etc/init.d/S$(PKG_INIT_PRIO)p910nd - $(CP) $(PKG_BUILD_DIR)/p910nd $(IDIR_P910ND)/usr/sbin - $(RSTRIP) $(IDIR_P910ND) - $(IPKG_BUILD) $(IDIR_P910ND) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -rf $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/p910nd/files/p910nd.default b/openwrt/package/p910nd/files/p910nd.default deleted file mode 100644 index 77317cfad3a..00000000000 --- a/openwrt/package/p910nd/files/p910nd.default +++ /dev/null @@ -1,9 +0,0 @@ -# printing port list, in the form "number [options]" -# where: -# - number is the port number in the range [0-9] -# the p910nd daemon will listen on tcp port 9100+number -# - options can be : -# -b to turn on bidirectional copying. -# -f to specify a different printer device. -# -0 -b -f /dev/usb/lp0 diff --git a/openwrt/package/p910nd/files/p910nd.init b/openwrt/package/p910nd/files/p910nd.init deleted file mode 100644 index 1a6c4f4a138..00000000000 --- a/openwrt/package/p910nd/files/p910nd.init +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/p910nd -RUN_D=/var/run - -_start() { - mkdir -p $RUN_D - [ -f $DEFAULT ] && ( - while read port options; do - case "$port" in - ""|\#*) - continue; - esac - p910nd $options $port - if [ $? -ne 0 ]; then - exit 1 - fi - done - ) < $DEFAULT - exit 0 -} - -_stop() { - [ -f $DEFAULT ] && ( - while read port options; do - case "$port" in - ""|\#*) - continue; - esac - PID_F=$RUN_D/p910${port}d.pid - [ -f $PID_F ] && kill $(cat $PID_F) - done - ) < $DEFAULT -} - -case $1 in - start) - _start - ;; - stop) - _stop - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac -exit $? diff --git a/openwrt/package/p910nd/ipkg/p910nd.conffiles b/openwrt/package/p910nd/ipkg/p910nd.conffiles deleted file mode 100644 index 65ed23d5d4b..00000000000 --- a/openwrt/package/p910nd/ipkg/p910nd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/p910nd diff --git a/openwrt/package/p910nd/ipkg/p910nd.control b/openwrt/package/p910nd/ipkg/p910nd.control deleted file mode 100644 index 9b917a86ffd..00000000000 --- a/openwrt/package/p910nd/ipkg/p910nd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: p910nd -Priority: optional -Section: net -Description: A small non-spooling printer server. diff --git a/openwrt/package/p910nd/patches/100-Makefile.patch b/openwrt/package/p910nd/patches/100-Makefile.patch deleted file mode 100644 index 83b4f6c67bd..00000000000 --- a/openwrt/package/p910nd/patches/100-Makefile.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- p910nd-0.7/Makefile.orig 2005-09-25 13:54:28.465506888 +0200 -+++ p910nd-0.7/Makefile 2005-09-25 13:54:46.928700056 +0200 -@@ -2,9 +2,9 @@ - # below if you don't want to use libwrap (hosts.{allow,deny} access control) - - # If you don't have it in /var/log/subsys, uncomment and define --#CFLAGS+=-DLOCKFILE_DIR=\"/var/log\" -+CFLAGS+=-DLOCKFILE_DIR=\"/tmp\" - LIBWRAP=-lwrap - - p910nd: p910nd.c --# $(CC) -Wall $(CFLAGS) -o $@ p910nd.c -- $(CC) -Wall $(CFLAGS) -DUSE_LIBWRAP -o $@ p910nd.c $(LIBWRAP) -+ $(CC) -Wall $(CFLAGS) -o $@ p910nd.c -+# $(CC) -Wall $(CFLAGS) -DUSE_LIBWRAP -o $@ p910nd.c $(LIBWRAP) diff --git a/openwrt/package/p910nd/patches/200-p910nd-0.7.patch b/openwrt/package/p910nd/patches/200-p910nd-0.7.patch deleted file mode 100644 index 9165498fe8d..00000000000 --- a/openwrt/package/p910nd/patches/200-p910nd-0.7.patch +++ /dev/null @@ -1,309 +0,0 @@ ---- p910nd-0.7/p910nd.c.orig 2005-09-29 11:31:02.442914400 +0200 -+++ p910nd-0.7/p910nd.c 2005-09-29 11:31:49.236800648 +0200 -@@ -73,8 +73,7 @@ - #else - #define LOCKFILE "/var/lock/subsys/p910%cd" - #endif --#define PRINTERFILE "/dev/lp%c" --#define LOGOPTS LOG_ERR -+#define PRINTERFILE "/dev/printers/%c" - - static char *progname; - static char version[] = "p910nd Version 0.7"; -@@ -93,9 +92,9 @@ - fprintf(stdout, "%s \n", version); - } - --FILE *open_printer(int lpnumber) -+int open_printer(int lpnumber) - { -- FILE *f; -+ int lp; - char lpname[sizeof(PRINTERFILE)]; - - #ifdef TESTING -@@ -105,12 +104,16 @@ - #endif - if (device == 0) - device = lpname; -- if ((f = fopen(device, bidir ? "w+" : "w")) == NULL) -+ if ((lp = open(device, bidir ? O_RDWR : O_WRONLY)) == -1) - { -- syslog(LOGOPTS, "%s: %m\n", device); -- exit(1); -+ syslog(LOG_ERR, "%s: %m\n", device); -+ -+ /* fallback to /dev/null if device is not available -+ * otherwise windows spooler will screw up -+ */ -+ lp = open("/dev/null", bidir ? O_RDWR : O_WRONLY); - } -- return (f); -+ return (lp); - } - - int get_lock(int lpnumber) -@@ -121,7 +124,7 @@ - (void)snprintf(lockname, sizeof(lockname), LOCKFILE, lpnumber); - if ((lockfd = open(lockname, O_CREAT|O_RDWR)) < 0) - { -- syslog(LOGOPTS, "%s: %m\n", lockname); -+ syslog(LOG_ERR, "%s: %m\n", lockname); - return (0); - } - memset(&lplock, 0, sizeof(lplock)); -@@ -129,7 +132,7 @@ - lplock.l_pid = getpid(); - if (fcntl(lockfd, F_SETLKW, &lplock) < 0) - { -- syslog(LOGOPTS, "%s: %m\n", lockname); -+ syslog(LOG_ERR, "%s: %m\n", lockname); - return (0); - } - return (1); -@@ -141,24 +144,36 @@ - (void)close(lockfd); - } - -+ssize_t safe_write(int fd, char *buf, size_t count) -+{ -+ size_t offset = 0; -+ -+ while (offset < count) { -+ ssize_t n = write(fd, buf + offset, count - offset); -+ -+ if (n < 0 && errno != EINTR) -+ return n; -+ -+ if (n > 0) -+ offset += n; -+ } -+ -+ return offset; -+} -+ - /* Copy network socket to FILE f until EOS */ --int copy_stream(int fd, FILE *f) -+int copy_stream(int fd, int lp) - { -- int nread; -+ int nread, rcvd = 0, sent = 0; - char buffer[8192]; - - if (bidir) { -- FILE *nf; -- -- if ((nf = fdopen(fd, "w")) == NULL) { -- syslog(LOGOPTS, "fdopen: %m\n"); -- } - for (;;) { - fd_set readfds; - int result; -- int maxfd = fileno(f) > fd ? fileno(f) : fd; -+ int maxfd = lp > fd ? lp : fd; - FD_ZERO(&readfds); -- FD_SET(fileno(f), &readfds); -+ FD_SET(lp, &readfds); - FD_SET(fd, &readfds); - result = select(maxfd + 1, &readfds, 0, 0, 0); - if (result < 0) -@@ -169,43 +184,54 @@ - nread = read(fd, buffer, sizeof(buffer)); - if (nread <= 0) - break; -- (void)fwrite(buffer, sizeof(char), nread, f); -+ if (safe_write(lp, buffer, nread) < 0) { -+ syslog(LOG_ERR, "write: %m\n"); -+ break; -+ } -+ rcvd += nread; - } -- if (FD_ISSET(fileno(f), &readfds)) { -- nread = read(fileno(f), buffer, sizeof(buffer)); -- if (nread > 0 && nf != NULL) { -- (void)fwrite(buffer, sizeof(char), nread, nf); -- (void)fflush(nf); -+ if (FD_ISSET(lp, &readfds)) { -+ nread = read(lp, buffer, sizeof(buffer)); -+ if (nread > 0) { -+ safe_write(fd, buffer, nread); -+ sent += nread; - } - } - } -- (void)fflush(f); -- (void)fclose(nf); -+ syslog(LOG_NOTICE, "Finished job: %d bytes received, %d bytes sent\n", -+ rcvd, sent); - return (0); - } else { -- while ((nread = read(fd, buffer, sizeof(buffer))) > 0) -- (void)fwrite(buffer, sizeof(char), nread, f); -- (void)fflush(f); -+ while ((nread = read(fd, buffer, sizeof(buffer))) > 0) { -+ if (safe_write(lp, buffer, nread) < 0) { -+ syslog(LOG_ERR, "write: %m\n"); -+ break; -+ } -+ rcvd += nread; -+ } -+ syslog(LOG_NOTICE, "Finished job: %d bytes received\n", rcvd); - return (nread); - } - } - - void one_job(int lpnumber) - { -- FILE *f; -+ int lp; - struct sockaddr_in client; - socklen_t clientlen = sizeof(client); - - if (getpeername(0, (struct sockaddr*) &client, &clientlen) >= 0) -- syslog(LOGOPTS, "Connection from %s port %hu\n", -+ syslog(LOG_NOTICE, "Connection from %s port %hu\n", - inet_ntoa(client.sin_addr), - ntohs(client.sin_port)); - if (get_lock(lpnumber) == 0) - return; -- f = open_printer(lpnumber); -- if (copy_stream(0, f) < 0) -- syslog(LOGOPTS, "copy_stream: %m\n"); -- fclose(f); -+ if ((lp = open_printer(lpnumber)) != -1) -+ { -+ if (copy_stream(0, lp) < 0) -+ syslog(LOG_ERR, "copy_stream: %m\n"); -+ close(lp); -+ } - free_lock(); - } - -@@ -215,7 +241,7 @@ - #ifdef USE_GETPROTOBYNAME - struct protoent *proto; - #endif -- int netfd, fd, one = 1; -+ int netfd, fd, lp, one = 1; - socklen_t clientlen; - struct sockaddr_in netaddr, client; - char pidfilename[sizeof(PIDFILE)]; -@@ -225,7 +251,7 @@ - switch (fork()) - { - case -1: -- syslog(LOGOPTS, "fork: %m\n"); -+ syslog(LOG_ERR, "fork: %m\n"); - exit (1); - case 0: /* child */ - break; -@@ -236,14 +262,14 @@ - resourcelimit.rlim_max = 0; - if (getrlimit(RLIMIT_NOFILE, &resourcelimit) < 0) - { -- syslog(LOGOPTS, "getrlimit: %m\n"); -+ syslog(LOG_ERR, "getrlimit: %m\n"); - exit(1); - } - for (fd = 0; fd < resourcelimit.rlim_max; ++fd) - (void)close(fd); - if (setsid() < 0) - { -- syslog(LOGOPTS, "setsid: %m\n"); -+ syslog(LOG_ERR, "setsid: %m\n"); - exit(1); - } - (void)chdir("/"); -@@ -254,7 +280,7 @@ - (void)snprintf(pidfilename, sizeof(pidfilename), PIDFILE, lpnumber); - if ((f = fopen(pidfilename, "w")) == NULL) - { -- syslog(LOGOPTS, "%s: %m\n", pidfilename); -+ syslog(LOG_ERR, "%s: %m\n", pidfilename); - exit(1); - } - (void)fprintf(f, "%d\n", getpid()); -@@ -262,11 +288,10 @@ - if (get_lock(lpnumber) == 0) - exit(1); - #endif -- f = open_printer(lpnumber); - #ifdef USE_GETPROTOBYNAME - if ((proto = getprotobyname("tcp")) == NULL) - { -- syslog(LOGOPTS, "Cannot find protocol for TCP!\n"); -+ syslog(LOG_ERR, "Cannot find protocol for TCP!\n"); - exit(1); - } - if ((netfd = socket(AF_INET, SOCK_STREAM, proto->p_proto)) < 0) -@@ -274,12 +299,12 @@ - if ((netfd = socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) < 0) - #endif - { -- syslog(LOGOPTS, "socket: %m\n"); -+ syslog(LOG_ERR, "socket: %m\n"); - exit(1); - } - if (setsockopt(netfd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) - { -- syslog(LOGOPTS, "setsocketopt: %m\n"); -+ syslog(LOG_ERR, "setsocketopt: %m\n"); - exit(1); - } - netaddr.sin_port = htons(BASEPORT + lpnumber - '0'); -@@ -287,12 +312,12 @@ - memset(netaddr.sin_zero, 0, sizeof(netaddr.sin_zero)); - if (bind(netfd, (struct sockaddr*) &netaddr, sizeof(netaddr)) < 0) - { -- syslog(LOGOPTS, "bind: %m\n"); -+ syslog(LOG_ERR, "bind: %m\n"); - exit(1); - } - if (listen(netfd, 5) < 0) - { -- syslog(LOGOPTS, "listen: %m\n"); -+ syslog(LOG_ERR, "listen: %m\n"); - exit(1); - } - clientlen = sizeof(client); -@@ -302,22 +327,26 @@ - #ifdef USE_LIBWRAP - if (hosts_ctl("p910nd", STRING_UNKNOWN, - inet_ntoa(client.sin_addr), STRING_UNKNOWN) == 0) { -- syslog(LOGOPTS, "Connection from %s port %hd rejected\n", -+ syslog(LOG_ERR, "Connection from %s port %hu rejected\n", - inet_ntoa(client.sin_addr), - ntohs(client.sin_port)); - close(fd); - continue; - } - #endif -- syslog(LOGOPTS, "Connection from %s port %hd accepted\n", -+ syslog(LOG_NOTICE, "Connection from %s port %hu accepted\n", - inet_ntoa(client.sin_addr), - ntohs(client.sin_port)); - /*write(fd, "Printing", 8);*/ -- if (copy_stream(fd, f) < 0) -- syslog(LOGOPTS, "copy_stream: %m\n"); -+ if ((lp = open_printer(lpnumber)) != -1) -+ { -+ if (copy_stream(fd, lp) < 0) -+ syslog(LOG_ERR, "copy_stream: %m\n"); -+ close(lp); -+ } - (void)close(fd); - } -- syslog(LOGOPTS, "accept: %m\n"); -+ syslog(LOG_ERR, "accept: %m\n"); - free_lock(); - exit(1); - } -@@ -338,7 +367,7 @@ - if (getsockname(0, (struct sockaddr*) &bind_addr, &ba_len) == 0) - return (0); /* under inetd */ - if (errno != ENOTSOCK) /* strange... */ -- syslog(LOGOPTS, "getsockname: %m\n"); -+ syslog(LOG_ERR, "getsockname: %m\n"); - return (1); - } - diff --git a/openwrt/package/palantir/Config.in b/openwrt/package/palantir/Config.in deleted file mode 100644 index dc99d095ee5..00000000000 --- a/openwrt/package/palantir/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_PALANTIR - prompt "palantir.......................... A multichannel interactive streaming solution" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBJPEG - help - Palantir is a Linux-based streaming system designed to transmit live - video, audio and data over a TCP/IP network, as well as to control - remote devices. - - http://www.fastpath.it/products/palantir/ - diff --git a/openwrt/package/palantir/Makefile b/openwrt/package/palantir/Makefile deleted file mode 100644 index 154dadc4eec..00000000000 --- a/openwrt/package/palantir/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=palantir -PKG_VERSION:=2.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=8e4d20e7f7fad26d7447483c68894ace - -PKG_SOURCE_URL:=http://www.fastpath.it/products/palantir/pub/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -export CPPFLAGS=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -export LDFLAGS=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PALANTIR,palantir,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR)/usr - $(MAKE) -C $(PKG_BUILD_DIR)/server/libgsm \ - $(TARGET_CONFIGURE_OPTS) \ - CCINC="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - lib/libgsm.a - $(MAKE) -C $(PKG_BUILD_DIR)/server \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="-Wall -D_REENTRANT $(TARGET_CFLAGS)" \ - palantir - touch $@ - -$(IPKG_PALANTIR): - install -d -m0755 $(IDIR_PALANTIR)/etc - install -m0644 $(PKG_BUILD_DIR)/server/palantir-mips.conf.sample $(IDIR_PALANTIR)/etc/palantir.conf - install -d -m0755 $(IDIR_PALANTIR)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/server/palantir $(IDIR_PALANTIR)/usr/sbin/ - $(RSTRIP) $(IDIR_PALANTIR) - $(IPKG_BUILD) $(IDIR_PALANTIR) $(PACKAGE_DIR) diff --git a/openwrt/package/palantir/ipkg/palantir.conffiles b/openwrt/package/palantir/ipkg/palantir.conffiles deleted file mode 100644 index a57f0c6fd71..00000000000 --- a/openwrt/package/palantir/ipkg/palantir.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/palantir.conf diff --git a/openwrt/package/palantir/ipkg/palantir.control b/openwrt/package/palantir/ipkg/palantir.control deleted file mode 100644 index 404a200c3c2..00000000000 --- a/openwrt/package/palantir/ipkg/palantir.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: palantir -Priority: optional -Section: net -Depends: libjpeg, libpthread -Description: A multichannel interactive streaming solution diff --git a/openwrt/package/parprouted/Config.in b/openwrt/package/parprouted/Config.in deleted file mode 100644 index edf4760316e..00000000000 --- a/openwrt/package/parprouted/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_PARPROUTED - prompt "parprouted........................ Proxy ARP daemon" - tristate - default m if CONFIG_DEVEL - help - parprouted is a daemon for transparent IP (Layer 3) proxy ARP bridging. - This is useful for creation of transparent firewalls and bridging networks - with different MAC protocols. Also, unlike standard bridging, proxy ARP - bridging allows to bridge Ethernet networks behind wireless nodes without - using WDS or layer 2 bridging. - - http://www.hazard.maks.net/ - diff --git a/openwrt/package/parprouted/Makefile b/openwrt/package/parprouted/Makefile deleted file mode 100644 index a06a15251d8..00000000000 --- a/openwrt/package/parprouted/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=parprouted -PKG_VERSION:=0.63 -PKG_RELEASE:=1 -PKG_MD5SUM:=12753098a22e82997d1941d6d2284750 - -PKG_SOURCE_URL:=http://www.hazard.maks.net/parprouted/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PARPROUTED,parprouted,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="" \ - all - touch $@ - -$(IPKG_PARPROUTED): - install -d -m0755 $(IDIR_PARPROUTED)/etc/default - install -m0755 ./files/parprouted.default $(IDIR_PARPROUTED)/etc/default/parprouted - install -d -m0755 $(IDIR_PARPROUTED)/etc/init.d - install -m0755 ./files/parprouted.init $(IDIR_PARPROUTED)/etc/init.d/parprouted - ln -sf parprouted $(IDIR_PARPROUTED)/etc/init.d/S50parpouted - install -d -m0755 $(IDIR_PARPROUTED)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/parprouted $(IDIR_PARPROUTED)/usr/sbin/ - $(RSTRIP) $(IDIR_PARPROUTED) - $(IPKG_BUILD) $(IDIR_PARPROUTED) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/parprouted/files/parprouted.default b/openwrt/package/parprouted/files/parprouted.default deleted file mode 100755 index 7128a56a748..00000000000 --- a/openwrt/package/parprouted/files/parprouted.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="$lan_ifname $wifi_ifname" diff --git a/openwrt/package/parprouted/files/parprouted.init b/openwrt/package/parprouted/files/parprouted.init deleted file mode 100755 index 2422657ee8a..00000000000 --- a/openwrt/package/parprouted/files/parprouted.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -BIN=parprouted -DEFAULT=/etc/default/$BIN -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - $BIN $OPTIONS - ;; - *) - echo "usage: $0 (start)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/parprouted/ipkg/parprouted.conffiles b/openwrt/package/parprouted/ipkg/parprouted.conffiles deleted file mode 100644 index 4446a8e9973..00000000000 --- a/openwrt/package/parprouted/ipkg/parprouted.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/parprouted diff --git a/openwrt/package/parprouted/ipkg/parprouted.control b/openwrt/package/parprouted/ipkg/parprouted.control deleted file mode 100644 index 9357ae58613..00000000000 --- a/openwrt/package/parprouted/ipkg/parprouted.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: parprouted -Priority: optional -Section: net -Description: a proxy ARP daemon -Depends: libpthread diff --git a/openwrt/package/parprouted/patches/parprouted.patch b/openwrt/package/parprouted/patches/parprouted.patch deleted file mode 100644 index 17fbdecec7c..00000000000 --- a/openwrt/package/parprouted/patches/parprouted.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -rupw parprouted-0.63/arp.c parprouted-0.63-1/arp.c ---- parprouted-0.63/arp.c 2004-05-23 14:06:31.000000000 +0200 -+++ parprouted-0.63-1/arp.c 2005-03-13 16:10:18.000000000 +0100 -@@ -366,7 +366,7 @@ void *arp(char *ifname) - do { - pthread_testcancel(); - /* Sleep a bit in order not to overload the system */ -- usleep(300); -+ usleep(3000); - - if (arp_recv(sock, &frame) <= 0) - continue; -diff -rupw parprouted-0.63/parprouted.c parprouted-0.63-1/parprouted.c ---- parprouted-0.63/parprouted.c 2004-01-30 02:45:43.000000000 +0100 -+++ parprouted-0.63-1/parprouted.c 2005-03-20 09:14:35.000000000 +0100 -@@ -93,7 +93,7 @@ void processarp(int cleanup) - - /* added route to the kernel */ - if (snprintf(routecmd_str, ROUTE_CMD_LEN-1, -- "/sbin/ip route add %s/32 metric 50 dev %s scope link", -+ "/sbin/route add -host %s metric 50 dev %s", - inet_ntoa(cur_entry->ipaddr_ia), cur_entry->ifname) > ROUTE_CMD_LEN-1) - { - syslog(LOG_INFO, "ip route command too large to fit in buffer!"); -@@ -112,7 +112,7 @@ void processarp(int cleanup) - - /* remove entry from arp table and remove route from kernel */ - if (snprintf(routecmd_str, ROUTE_CMD_LEN-1, -- "/sbin/ip route del %s/32 metric 50 dev %s scope link", -+ "/sbin/route del -host %s metric 50 dev %s", - inet_ntoa(cur_entry->ipaddr_ia), cur_entry->ifname) > ROUTE_CMD_LEN-1) - { - syslog(LOG_INFO, "ip route command too large to fit in buffer!"); diff --git a/openwrt/package/pciutils/Config.in b/openwrt/package/pciutils/Config.in deleted file mode 100644 index e76962f8228..00000000000 --- a/openwrt/package/pciutils/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_PCIUTILS - prompt "pciutils.......................... Linux PCI Utilities" - tristate - default m if CONFIG_DEVEL - help - This package contains various utilities for inspecting and setting of - devices connected to the PCI bus. diff --git a/openwrt/package/pciutils/Makefile b/openwrt/package/pciutils/Makefile deleted file mode 100644 index cdf2ab0eb89..00000000000 --- a/openwrt/package/pciutils/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pciutils -PKG_VERSION:=2.2.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=c18e2a5f04e9abae5a42439de294f086 - -PKG_SOURCE_URL:=http://www.kernel.org/pub/software/utils/pciutils/ \ - ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PCIUTILS,pciutils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" IDSDIR="/usr/share" HOST=$(GNU_TARGET_NAME) - touch $@ - -$(IPKG_PCIUTILS): - install -d -m0755 $(IDIR_PCIUTILS)/usr/sbin - install -d -m0755 $(IDIR_PCIUTILS)/usr/share - $(CP) $(PKG_BUILD_DIR)/{lspci,setpci} $(IDIR_PCIUTILS)/usr/sbin/ - $(CP) $(PKG_BUILD_DIR)/pci.ids $(IDIR_PCIUTILS)/usr/share/ - $(RSTRIP) $(IDIR_PCIUTILS)/ - $(IPKG_BUILD) $(IDIR_PCIUTILS) $(PACKAGE_DIR) diff --git a/openwrt/package/pciutils/ipkg/pciutils.control b/openwrt/package/pciutils/ipkg/pciutils.control deleted file mode 100644 index b3f0c4eead0..00000000000 --- a/openwrt/package/pciutils/ipkg/pciutils.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: pciutils -Priority: optional -Section: sys -Description: Linux PCI Utilities diff --git a/openwrt/package/pcre/Config.in b/openwrt/package/pcre/Config.in deleted file mode 100644 index 7bb2de69133..00000000000 --- a/openwrt/package/pcre/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_PCRE - tristate - default n - depends BR2_PACKAGE_LIBPCRE - -config BR2_PACKAGE_LIBPCRE - prompt "libpcre........................... A Perl Compatible Regular Expression library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_PCRE - help - A Perl Compatible Regular Expression library - - http://www.pcre.org/ - diff --git a/openwrt/package/pcre/Makefile b/openwrt/package/pcre/Makefile deleted file mode 100644 index 3cd030481be..00000000000 --- a/openwrt/package/pcre/Makefile +++ /dev/null @@ -1,92 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pcre -PKG_VERSION:=5.0 -PKG_RELEASE:=3 -PKG_MD5SUM:=813850808894d99fb5b1c41ec6335d4f - -PKG_SOURCE_URL:=@SF/pcre -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBPCRE,libpcre,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --enable-utf8 \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - CC_FOR_BUILD="$(HOSTCC)" \ - LINK_FOR_BUILD="$(HOSTCC)" \ - CFLAGS_FOR_BUILD="" \ - dftables - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBPCRE): - install -d -m0755 $(IDIR_LIBPCRE)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(IDIR_LIBPCRE)/usr/lib/ - $(RSTRIP) $(IDIR_LIBPCRE) - $(IPKG_BUILD) $(IDIR_LIBPCRE) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libpcre.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre{,posix}.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libpcre.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/pcre-config \ - $(STAGING_DIR)/usr/include/pcre{,posix}.h \ - $(STAGING_DIR)/usr/lib/libpcre{,posix}.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/pcre/ipkg/libpcre.control b/openwrt/package/pcre/ipkg/libpcre.control deleted file mode 100644 index 797453eabd6..00000000000 --- a/openwrt/package/pcre/ipkg/libpcre.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libpcre -Priority: optional -Section: libs -Description: a Perl Compatible Regular Expression library diff --git a/openwrt/package/pcre/patches/100-honor_cppflags_ldflags.patch b/openwrt/package/pcre/patches/100-honor_cppflags_ldflags.patch deleted file mode 100644 index 2d14b894990..00000000000 --- a/openwrt/package/pcre/patches/100-honor_cppflags_ldflags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN pcre-5.0-old/Makefile.in pcre-5.0-new/Makefile.in ---- pcre-5.0-old/Makefile.in 2004-09-13 16:20:00.000000000 +0200 -+++ pcre-5.0-new/Makefile.in 2006-03-15 08:28:12.000000000 +0100 -@@ -63,6 +63,7 @@ - CC = @CC@ - CFLAGS = @CFLAGS@ - CPPFLAGS = @CPPFLAGS@ -+LDFLAGS = @LDFLAGS@ - - CC_FOR_BUILD = @CC_FOR_BUILD@ - CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ -@@ -84,10 +85,10 @@ - # to do one or the other or both by ./configure. - - LIBTOOL = @LIBTOOL@ --LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) -I. -I$(top_srcdir) $(NEWLINE) $(LINK_SIZE) $(MATCH_LIMIT) $(NO_RECURSE) $(EBCDIC) -+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) -I. -I$(top_srcdir) $(CPPFLAGS) $(NEWLINE) $(LINK_SIZE) $(MATCH_LIMIT) $(NO_RECURSE) $(EBCDIC) - @ON_WINDOWS@LINK = $(CC) $(CFLAGS) -I. -I$(top_srcdir) -L.libs - @NOT_ON_WINDOWS@LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) --LINKLIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) -+LINKLIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) $(LDFLAGS) - LINK_FOR_BUILD = $(LIBTOOL) --mode=link $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -I$(top_srcdir) - - # These are the version numbers for the shared libraries diff --git a/openwrt/package/pcre/patches/750-pcre_config_cross.patch b/openwrt/package/pcre/patches/750-pcre_config_cross.patch deleted file mode 100644 index c61a7f5a1e3..00000000000 --- a/openwrt/package/pcre/patches/750-pcre_config_cross.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -ruN pcre-5.0-old/pcre-config.in pcre-5.0-new/pcre-config.in ---- pcre-5.0-old/pcre-config.in 2004-09-13 16:20:00.000000000 +0200 -+++ pcre-5.0-new/pcre-config.in 2005-09-04 16:34:39.000000000 +0200 -@@ -18,6 +18,10 @@ - libR=" -R@libdir@" - ;; - esac -+libS= -+if test @libdir@ != /usr/lib ; then -+ libS=-L@libdir@ -+fi - - while test $# -gt 0; do - case "$1" in -@@ -52,10 +56,10 @@ - echo $includes - ;; - --libs-posix) -- echo -L@libdir@$libR -lpcreposix -lpcre -+ echo $libS$libR -lpcreposix -lpcre - ;; - --libs) -- echo -L@libdir@$libR -lpcre -+ echo $libS$libR -lpcre - ;; - *) - echo "${usage}" 1>&2 diff --git a/openwrt/package/peercast/Config.in b/openwrt/package/peercast/Config.in deleted file mode 100644 index 802b4d7ef1e..00000000000 --- a/openwrt/package/peercast/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_PEERCAST - prompt "peercast.......................... P2P audio and video streaming server" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPTHREAD - select BR2_PACKAGE_UCLIBCXX - help - PeerCast is a fresh new P2P streaming server. It can stream music - and video from a broad variety of formats. Many audio players can - listen to peercast streams, as it's been built to remain compatible - with Nullsoft Shoutcast. - - http://www.peercast.org/ - diff --git a/openwrt/package/peercast/Makefile b/openwrt/package/peercast/Makefile deleted file mode 100644 index 36d78163d07..00000000000 --- a/openwrt/package/peercast/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=peercast -PKG_VERSION:=0.1214 -PKG_RELEASE:=1 -PKG_MD5SUM:=4e8449cde7135ad97f788e67e1bd64ee - -PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/peercast -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PEERCAST,peercast,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -nodefaultlibs" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-nodefaultlibs -luClibc++ -lpthread" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --with-gnu-ld \ - --enable-staticbin \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_PEERCAST): - install -m0755 -d $(IDIR_PEERCAST)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/peercast $(IDIR_PEERCAST)/usr/sbin/ - install -m0755 -d $(IDIR_PEERCAST)/usr/share/peercast/html - $(CP) $(PKG_INSTALL_DIR)/usr/share/peercast/html/en $(IDIR_PEERCAST)/usr/share/peercast/html/ - install -m0755 -d $(IDIR_PEERCAST)/etc - install -m0644 ./files/peercast.ini $(IDIR_PEERCAST)/etc/ - install -m0755 -d $(IDIR_PEERCAST)/etc/init.d - install -m0755 ./files/peercast.init $(IDIR_PEERCAST)/etc/init.d/peercast - ln -sf peercast $(IDIR_PEERCAST)/etc/init.d/S60peercast - $(RSTRIP) $(IDIR_PEERCAST) - $(IPKG_BUILD) $(IDIR_PEERCAST) $(PACKAGE_DIR) diff --git a/openwrt/package/peercast/files/peercast.ini b/openwrt/package/peercast/files/peercast.ini deleted file mode 100644 index f703c6ed1f6..00000000000 --- a/openwrt/package/peercast/files/peercast.ini +++ /dev/null @@ -1,81 +0,0 @@ - -[Server] -serverPort = 7144 -autoServe = Yes -forceIP = -isRoot = No -maxBitrateOut = 0 -maxRelays = 1 -maxDirect = 0 -maxRelaysPerChannel = 0 -firewallTimeout = 30 -forceNormal = No -rootMsg = -authType = cookie -cookiesExpire = session -htmlPath = html/en -minPGNUIncoming = 10 -maxPGNUIncoming = 20 -maxServIn = 50 -chanLog = -networkID = 00000000000000000000000000000000 - -[Broadcast] -broadcastMsgInterval = 10 -broadcastMsg = -icyMetaInterval = 8192 -broadcastID = 898145B5C0427118B595AF7D9E110000 -hostUpdateInterval = 180 -maxControlConnections = 3 -rootHost = yp.peercast.org - -[Client] -refreshHTML = 5 -relayBroadcast = 30 -minBroadcastTTL = 1 -maxBroadcastTTL = 7 -pushTries = 5 -pushTimeout = 60 -maxPushHops = 8 -autoQuery = 0 -queryTTL = 7 - -[Privacy] -password = hackme -maxUptime = 0 - -[Filter] -ip = 255.255.255.255 -private = No -ban = No -network = Yes -direct = Yes -[End] - -[Notify] -PeerCast = Yes -Broadcasters = Yes -TrackInfo = Yes -[End] - -[Server1] -allowHTML = Yes -allowBroadcast = Yes -allowNetwork = Yes -allowDirect = Yes -[End] - -[Server2] -allowHTML = No -allowBroadcast = Yes -allowNetwork = No -allowDirect = No -[End] - -[Debug] -logDebug = No -logErrors = No -logNetwork = No -logChannel = No -pauseLog = No -idleSleepTime = 10 diff --git a/openwrt/package/peercast/files/peercast.init b/openwrt/package/peercast/files/peercast.init deleted file mode 100644 index c61c31438d2..00000000000 --- a/openwrt/package/peercast/files/peercast.init +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -PID_F=/var/run/peercast.pid - -case $1 in - start) - peercast -d -i /etc/peercast.ini -l /var/log/peercast.log -p $PID_F - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? - diff --git a/openwrt/package/peercast/ipkg/peercast.conffiles b/openwrt/package/peercast/ipkg/peercast.conffiles deleted file mode 100644 index 0c554494ef5..00000000000 --- a/openwrt/package/peercast/ipkg/peercast.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/peercast.ini diff --git a/openwrt/package/peercast/ipkg/peercast.control b/openwrt/package/peercast/ipkg/peercast.control deleted file mode 100644 index a09a246fe94..00000000000 --- a/openwrt/package/peercast/ipkg/peercast.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: peercast -Priority: optional -Section: net -Description: P2P audio and video streaming server -Depends: libpthread, uclibc++ - diff --git a/openwrt/package/peerguardian/Config.in b/openwrt/package/peerguardian/Config.in deleted file mode 100755 index 564a9ccfe95..00000000000 --- a/openwrt/package/peerguardian/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_PEERGUARDIAN - prompt "peerguardian...................... PeerGuardian for Linux" - tristate - select BR2_PACKAGE_LIBPTHREAD - default m if CONFIG_DEVEL - help - PeerGuardian helps protect your privacy by blocking many ranges - of aggressive IPs while you use P2P. - - http://phoenixlabs.org/ diff --git a/openwrt/package/peerguardian/Makefile b/openwrt/package/peerguardian/Makefile deleted file mode 100755 index 1410494ae0c..00000000000 --- a/openwrt/package/peerguardian/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=peerguardian -PKG_VERSION:=1.5beta -PKG_RELEASE:=1 -PKG_MD5SUM:=0fb2bc5501b031604fc56eec3bd35fa4 - -PKG_SOURCE_URL:=@SF/peerguardian -PKG_SOURCE:=pglinux-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/pglinux-$(PKG_VERSION) -PKG_CAT:=zcat -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PEERGUARDIAN,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) STAGING_DIR=$(STAGING_DIR) DESTDIR=$(PKG_INSTALL_DIR) -C $(PKG_BUILD_DIR) - install -d -m0755 $(PKG_INSTALL_DIR)/usr/sbin $(PKG_INSTALL_DIR)/etc/init.d - install -m0755 $(PKG_BUILD_DIR)/peerguardnf $(PKG_INSTALL_DIR)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/pgtext $(PKG_INSTALL_DIR)/usr/sbin/ - install -m0644 $(PKG_BUILD_DIR)/PG.conf $(PKG_INSTALL_DIR)/etc/ - install -m0644 $(PKG_BUILD_DIR)/p2p.p2b.p2p $(PKG_INSTALL_DIR)/etc/ - install -m0644 files/$(PKG_NAME).init $(PKG_INSTALL_DIR)/etc/init.d/$(PKG_NAME) - -$(IPKG_PEERGUARDIAN): - mkdir -p $(IDIR_PEERGUARDIAN) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_PEERGUARDIAN)/ - $(RSTRIP) $(IDIR_PEERGUARDIAN)/ - $(IPKG_BUILD) $(IDIR_PEERGUARDIAN) $(PACKAGE_DIR) diff --git a/openwrt/package/peerguardian/files/peerguardian.init b/openwrt/package/peerguardian/files/peerguardian.init deleted file mode 100644 index 5807314c876..00000000000 --- a/openwrt/package/peerguardian/files/peerguardian.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -BIN=pgtext -DEFAULT=/etc/default/$BIN -[ -f $DEFAULT ] && . $DEFAULT -RUN_D=/var/run -PID_F=$RUN_D/$BIN_${IF}_${ID}.pid - -case $1 in - start) - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/peerguardian/ipkg/peerguardian.control b/openwrt/package/peerguardian/ipkg/peerguardian.control deleted file mode 100644 index edf1ec775d0..00000000000 --- a/openwrt/package/peerguardian/ipkg/peerguardian.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: peerguardian -Architecture: mipsel -Section: net -Depends: libpthread, libstdc++ -Description: PeerGuardian helps protect your privacy by blocking many ranges of aggressive IPs while you use P2P. -Priority: optional diff --git a/openwrt/package/peerguardian/patches/01-honor-libipq.patch b/openwrt/package/peerguardian/patches/01-honor-libipq.patch deleted file mode 100755 index 02bab148250..00000000000 --- a/openwrt/package/peerguardian/patches/01-honor-libipq.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urN pglinux-1.5beta/Makefile.in pglinux-1.5beta/Makefile.in ---- pglinux-1.5beta/Makefile.in 2005-03-31 09:40:29.000000000 +0200 -+++ pglinux-1.5beta/Makefile.in 2005-11-25 19:14:16.000000000 +0100 -@@ -83,10 +83,10 @@ - PROGRAMS = $(mybin_PROGRAMS) - - --DEFS = @DEFS@ -I. -I$(srcdir) -I. -+DEFS = @DEFS@ -I. -I$(srcdir) -I. -I$(STAGING_DIR)/usr/include - CPPFLAGS = @CPPFLAGS@ - LDFLAGS = @LDFLAGS@ --LIBS = @LIBS@ -+LIBS = @LIBS@ -L$(STAGING_DIR)/usr/lib - peerguardnf_OBJECTS = Main.o PeerGuard.o BlockList.o Blocker_Linux.o \ - Blocker_BSD.o HttpServer.o HttpRequest.o sha1.o - peerguardnf_DEPENDENCIES = diff --git a/openwrt/package/php4/Config.in b/openwrt/package/php4/Config.in deleted file mode 100644 index 087a62c39ba..00000000000 --- a/openwrt/package/php4/Config.in +++ /dev/null @@ -1,140 +0,0 @@ -menu "php4.............................. PHP4 Hypertext preprocessor" - -config BR2_COMPILE_PHP4 - tristate - default y - depends BR2_PACKAGE_PHP4_CLI || BR2_PACKAGE_PHP4_CGI || BR2_PACKAGE_PHP4_FASTCGI - -comment "Server API ---" - -config BR2_PACKAGE_PHP4_CLI - prompt "php4-cli.......................... PHP4 CLI (Command Line Interface)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - PHP is a widely-used general-purpose scripting language that is especially - suited for Web development and can be embedded into HTML. - - http://www.php.net/ - -config BR2_PACKAGE_PHP4_CGI - prompt "php4-cgi.......................... PHP4 built for CGI" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - PHP is a widely-used general-purpose scripting language that is especially - suited for Web development and can be embedded into HTML. - - http://www.php.net/ - -config BR2_PACKAGE_PHP4_FASTCGI - prompt "php4-fastcgi...................... PHP4 built for FastCGI" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - PHP is a widely-used general-purpose scripting language that is especially - suited for Web development and can be embedded into HTML. - - http://www.php.net/ - -comment "Extensions ---" - -config BR2_PACKAGE_PHP4_MOD_CURL - prompt "php4-mod-curl..................... cURL module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBCURL - -config BR2_PACKAGE_PHP4_MOD_FTP - prompt "php4-mod-ftp...................... FTP module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - -config BR2_PACKAGE_PHP4_MOD_GD - prompt "php4-mod-gd....................... GD graphics library module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBGD - select BR2_PACKAGE_LIBPNG - -config BR2_PACKAGE_PHP4_MOD_GMP - prompt "php4-mod-gmp...................... GMP module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBGMP - -config BR2_PACKAGE_PHP4_MOD_LDAP - prompt "php4-mod-ldap..................... LDAP module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBOPENLDAP - -config BR2_PACKAGE_PHP4_MOD_MYSQL - prompt "php4-mod-mysql.................... MySQL module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBMYSQLCLIENT - -config BR2_PACKAGE_PHP4_MOD_OPENSSL - prompt "php4-mod-openssl.................. OpenSSL module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBOPENSSL - -config BR2_PACKAGE_PHP4_MOD_PCRE - prompt "php4-mod-pcre..................... PCRE module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBPCRE - -config BR2_PACKAGE_PHP4_MOD_PGSQL - prompt "php4-mod-pgsql.................... PostgreSQL module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBPQ - -config BR2_PACKAGE_PHP4_MOD_SESSION - prompt "php4-mod-session.................. Sessions module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - -config BR2_PACKAGE_PHP4_MOD_SQLITE - prompt "php4-mod-sqlite................... SQLite module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBSQLITE2 - -config BR2_PACKAGE_PHP4_MOD_SOCKETS - prompt "php4-mod-sockets.................. Sockets module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - -config BR2_PACKAGE_PHP4_MOD_XML - prompt "php4-mod-xml...................... XML module" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_PHP4 - select BR2_PACKAGE_LIBEXPAT - -endmenu diff --git a/openwrt/package/php4/Makefile b/openwrt/package/php4/Makefile deleted file mode 100644 index 75664ad0b1b..00000000000 --- a/openwrt/package/php4/Makefile +++ /dev/null @@ -1,287 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=php -PKG_VERSION:=4.3.11 -PKG_RELEASE:=2 -PKG_MD5SUM:=fbc67d240812136a9842bc1f2a217b7a - -PKG_SOURCE_URL:=http://fr.php.net/distributions/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -define PKG_mod_template - -$$(IPKG_$(1)): - install -d -m0755 $$(IDIR_$(1))/usr/lib/php - install -m0755 $(PKG_BUILD_DIR)/modules/$(2).so $$(IDIR_$(1))/usr/lib/php - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -PKG_CONFIGURE_OPTS:= \ - --enable-shared \ - --disable-static \ - --disable-rpath \ - --disable-debug \ - --without-pear \ - \ - --with-config-file-path=/etc \ - --disable-ipv6 \ - --enable-magic-quotes \ - --enable-memory-limit \ - --disable-overload \ - --disable-short-tags \ - \ - --disable-ctype \ - --disable-dom \ - --enable-ftp=shared \ - --without-gettext \ - --without-iconv \ - --disable-mbstring \ - --disable-mbregex \ - --with-openssl=shared,"$(STAGING_DIR)/usr" \ - --with-kerberos=no \ - --with-openssl-dir="$(STAGING_DIR)/usr" \ - --enable-session=shared \ - --enable-sockets=shared \ - --disable-tokenizer \ - --with-zlib="$(STAGING_DIR)/usr" \ - --with-zlib-dir="$(STAGING_DIR)/usr" \ - -ifneq ($(BR2_PACKAGE_PHP4_MOD_CURL),) -PKG_CONFIGURE_OPTS+= --with-curl=shared,"$(STAGING_DIR)/usr" -else -PKG_CONFIGURE_OPTS+= --without-curl -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_GD),) -PKG_CONFIGURE_OPTS+= --with-gd=shared,"$(STAGING_DIR)/usr" \ - --without-freetype-dir \ - --with-jpeg-dir="$(STAGING_DIR)/usr" \ - --with-png-dir="$(STAGING_DIR)/usr" \ - --without-xpm-dir \ - --without-ttf \ - --without-t1lib \ - --enable-gd-native-ttf \ - --disable-gd-jis-conv -else -PKG_CONFIGURE_OPTS+= --without-gd -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_GMP),) -PKG_CONFIGURE_OPTS+= --with-gmp=shared,"$(STAGING_DIR)/usr" -else -PKG_CONFIGURE_OPTS+= --without-gmp -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_LDAP),) -PKG_CONFIGURE_OPTS+= --with-ldap=shared,"$(STAGING_DIR)/usr" - --with-ldap-sasl="$(STAGING_DIR)/usr" -else -PKG_CONFIGURE_OPTS+= --without-ldap -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_MYSQL),) -PKG_CONFIGURE_OPTS+= --with-mysql=shared,"$(STAGING_DIR)/usr" -else -PKG_CONFIGURE_OPTS+= --without-mysql -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_PCRE),) -PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr" -else -PKG_CONFIGURE_OPTS+= --without-pcre-regex -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_PGSQL),) -PKG_CONFIGURE_OPTS+= --with-pgsql=shared,"$(STAGING_DIR)/usr" -else -PKG_CONFIGURE_OPTS+= --without-pgsql -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_SQLITE),) -PKG_CONFIGURE_OPTS+= --with-sqlite=shared,"$(STAGING_DIR)/usr" -else -PKG_CONFIGURE_OPTS+= --without-sqlite -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_XML),) -PKG_CONFIGURE_OPTS+= --enable-xml=shared \ - --with-expat-dir="$(STAGING_DIR)/usr" -else -PKG_CONFIGURE_OPTS+= --disable-xml -endif - -$(eval $(call PKG_template,PHP4_CLI,php4-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_CGI,php4-cgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_FASTCGI,php4-fastcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_template,PHP4_MOD_CURL,php4-mod-curl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_FTP,php4-mod-ftp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_GD,php4-mod-gd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_GMP,php4-mod-gmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_LDAP,php4-mod-ldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_MYSQL,php4-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_OPENSSL,php4-mod-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_PCRE,php4-mod-pcre,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_PGSQL,php4-mod-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_SESSION,php4-mod-session,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_SOCKETS,php4-mod-sockets,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_SQLITE,php4-mod-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PHP4_MOD_XML,php4-mod-xml,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_mod_template,PHP4_MOD_CURL,curl)) -$(eval $(call PKG_mod_template,PHP4_MOD_FTP,ftp)) -$(eval $(call PKG_mod_template,PHP4_MOD_GD,gd)) -$(eval $(call PKG_mod_template,PHP4_MOD_GMP,gmp)) -$(eval $(call PKG_mod_template,PHP4_MOD_LDAP,ldap)) -$(eval $(call PKG_mod_template,PHP4_MOD_MYSQL,mysql)) -$(eval $(call PKG_mod_template,PHP4_MOD_OPENSSL,openssl)) -$(eval $(call PKG_mod_template,PHP4_MOD_PCRE,pcre)) -$(eval $(call PKG_mod_template,PHP4_MOD_PGSQL,pgsql)) -$(eval $(call PKG_mod_template,PHP4_MOD_SESSION,session)) -$(eval $(call PKG_mod_template,PHP4_MOD_SOCKETS,sockets)) -$(eval $(call PKG_mod_template,PHP4_MOD_SQLITE,sqlite)) -$(eval $(call PKG_mod_template,PHP4_MOD_XML,xml)) - - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - LIBS="-lcrypto -lssl" \ - php_cv_cc_rpath="no" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - $(PKG_CONFIGURE_OPTS) \ - --enable-cli \ - --disable-cgi \ - --disable-fastcgi \ - --enable-force-cgi-redirect \ - --enable-discard-path \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) - mv $(PKG_BUILD_DIR)/sapi/cli/php $(PKG_BUILD_DIR)/php-cli - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - LIBS="-lcrypto -lssl" \ - php_cv_cc_rpath="no" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - $(PKG_CONFIGURE_OPTS) \ - --disable-cli \ - --enable-cgi \ - --disable-fastcgi \ - --enable-force-cgi-redirect \ - --enable-discard-path \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) - mv $(PKG_BUILD_DIR)/sapi/cgi/php $(PKG_BUILD_DIR)/php-cgi - $(MAKE) -C $(PKG_BUILD_DIR) clean - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - LIBS="-lcrypto -lssl" \ - php_cv_cc_rpath="no" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/sbin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - $(PKG_CONFIGURE_OPTS) \ - --disable-cli \ - --enable-cgi \ - --enable-fastcgi \ - --enable-force-cgi-redirect \ - --enable-discard-path \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) - mv $(PKG_BUILD_DIR)/sapi/cgi/php $(PKG_BUILD_DIR)/php-fastcgi - touch $@ - -$(IPKG_PHP4_CLI): - install -m0755 -d $(IDIR_PHP4_CLI)/etc - install -m0644 ./files/php.ini $(IDIR_PHP4_CLI)/etc/ - install -m0755 -d $(IDIR_PHP4_CLI)/usr/bin - $(CP) $(PKG_BUILD_DIR)/php-cli $(IDIR_PHP4_CLI)/usr/bin/php - $(RSTRIP) $(IDIR_PHP4_CLI) - $(IPKG_BUILD) $(IDIR_PHP4_CLI) $(PACKAGE_DIR) - -$(IPKG_PHP4_CGI): - install -m0755 -d $(IDIR_PHP4_CGI)/etc - install -m0644 ./files/php.ini $(IDIR_PHP4_CGI)/etc/ - install -m0755 -d $(IDIR_PHP4_CGI)/usr/bin - $(CP) $(PKG_BUILD_DIR)/php-cgi $(IDIR_PHP4_CGI)/usr/bin/php - $(RSTRIP) $(IDIR_PHP4_CGI) - $(IPKG_BUILD) $(IDIR_PHP4_CGI) $(PACKAGE_DIR) - -$(IPKG_PHP4_FASTCGI): - install -m0755 -d $(IDIR_PHP4_FASTCGI)/etc - install -m0644 ./files/php.ini $(IDIR_PHP4_FASTCGI)/etc/ - install -m0755 -d $(IDIR_PHP4_FASTCGI)/etc/init.d - install -m0755 ./files/php.init $(IDIR_PHP4_FASTCGI)/etc/init.d/php - install -m0755 -d $(IDIR_PHP4_FASTCGI)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/php-fastcgi $(IDIR_PHP4_FASTCGI)/usr/sbin/php - $(RSTRIP) $(IDIR_PHP4_FASTCGI) - $(IPKG_BUILD) $(IDIR_PHP4_FASTCGI) $(PACKAGE_DIR) - diff --git a/openwrt/package/php4/files/php.ini b/openwrt/package/php4/files/php.ini deleted file mode 100644 index ae16d0b6176..00000000000 --- a/openwrt/package/php4/files/php.ini +++ /dev/null @@ -1,561 +0,0 @@ -[PHP] - -cgi.fix_pathinfo=1 - -zend.ze1_compatibility_mode = Off - -;short_open_tag = Off -asp_tags = Off -precision = 12 -y2k_compliance = On -output_buffering = Off - -zlib.output_compression = Off -;zlib.output_handler = -implicit_flush = Off - -unserialize_callback_func= -serialize_precision = 100 - -allow_call_time_pass_reference = On - -safe_mode = Off - -safe_mode_gid = Off - -safe_mode_include_dir = - -safe_mode_exec_dir = - -safe_mode_allowed_env_vars = PHP_ - -safe_mode_protected_env_vars = LD_LIBRARY_PATH - -;open_basedir = - -disable_functions = - -disable_classes = - -; Colors for Syntax Highlighting mode. Anything that's acceptable in -; would work. -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.bg = #FFFFFF -;highlight.default = #0000BB -;highlight.html = #000000 - -expose_php = On - - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -max_execution_time = 30 ; Maximum execution time of each script, in seconds -max_input_time = 60 ; Maximum amount of time each script may spend parsing request data -memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; error_reporting is a bit-field. Or each number up to get desired error -; reporting level -; E_ALL - All errors and warnings (doesn't include E_STRICT) -; E_ERROR - fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it's automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; -; Examples: -; -; - Show all errors, except for notices and coding standards warnings -; -;error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT -; -; - Show all errors, except for notices -; -;error_reporting = E_ALL & ~E_NOTICE -; -; - Show only errors -; -;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR -; -; - Show all errors except for notices and coding standards warnings -; -error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT - -; Print out errors (as a part of the output). For production web sites, -; you're strongly encouraged to turn this feature off, and use error logging -; instead (see below). Keeping display_errors enabled on a production web site -; may reveal security information to end users, such as file paths on your Web -; server, your database schema or other information. -display_errors = On - -; Even when display_errors is on, errors that occur during PHP's startup -; sequence are not displayed. It's strongly recommended to keep -; display_startup_errors off, except for when debugging. -display_startup_errors = Off - -; Log errors into a log file (server-specific log, stderr, or error_log (below)) -; As stated above, you're strongly advised to use error logging in place of -; error displaying on production web sites. -log_errors = Off - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line until ignore_repeated_source is set true. -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; sourcelines. -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This has only effect in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -report_memleaks = On - -; Store the last error/warning message in $php_errormsg (boolean). -track_errors = Off - -; Disable the inclusion of HTML tags in error messages. -; Note: Never use this feature for production boxes. -;html_errors = Off - -; If html_errors is set On PHP produces clickable error messages that direct -; to a page describing the error or function causing the error in detail. -; You can download a copy of the PHP manual from http://www.php.net/docs.php -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. -; Note: Never use this feature for production boxes. -;docref_root = "/phpmanual/" -;docref_ext = .html - -; String to output before an error message. -;error_prepend_string = "" - -; String to output after an error message. -;error_append_string = "" - -; Log errors to specified file. -;error_log = filename - -; Log errors to syslog (Event Log on NT, not valid in Windows 95). -;error_log = syslog - - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; -; -; Note - track_vars is ALWAYS enabled as of PHP 4.0.3 - -; The separator used in PHP generated URLs to separate arguments. -; Default is "&". -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; Default is "&". -; NOTE: Every character in this directive is considered as separator! -;arg_separator.input = ";&" - -; This directive describes the order in which PHP registers GET, POST, Cookie, -; Environment and Built-in variables (G, P, C, E & S respectively, often -; referred to as EGPCS or GPC). Registration is done from left to right, newer -; values override older values. -variables_order = "EGPCS" - -; Whether or not to register the EGPCS variables as global variables. You may -; want to turn this off if you don't want to clutter your scripts' global scope -; with user data. This makes most sense when coupled with track_vars - in which -; case you can access all of the GPC variables through the $HTTP_*_VARS[], -; variables. -; -; You should do your best to write your scripts so that they do not require -; register_globals to be on; Using form variables as globals can easily lead -; to possible security problems, if the code is not very well thought of. -register_globals = Off - -; Whether or not to register the old-style input arrays, HTTP_GET_VARS -; and friends. If you're not using them, it's recommended to turn them off, -; for performance reasons. -register_long_arrays = On - -; This directive tells PHP whether to declare the argv&argc variables (that -; would contain the GET information). If you don't use these variables, you -; should turn it off for increased performance. -register_argc_argv = On - -; Maximum size of POST data that PHP will accept. -post_max_size = 8M - -; Magic quotes -; - -; Magic quotes for incoming GET/POST/Cookie data. -magic_quotes_gpc = On - -; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. -magic_quotes_runtime = Off - -; Use Sybase-style magic quotes (escape ' with '' instead of \'). -magic_quotes_sybase = Off - -; Automatically add files before or after any PHP document. -auto_prepend_file = -auto_append_file = - -; As of 4.0b4, PHP always outputs a character encoding by default in -; the Content-type: header. To disable sending of the charset, simply -; set it to be empty. -; -; PHP's built-in default is text/html -default_mimetype = "text/html" -;default_charset = "iso-8859-1" - -; Always populate the $HTTP_RAW_POST_DATA variable. -;always_populate_raw_post_data = On - - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -doc_root = /www - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -user_dir = - -; Directory in which the loadable extensions (modules) reside. -extension_dir = "/usr/lib/php" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -enable_dl = On - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. -; cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; cgi.redirect_status_env = ; - -; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; fastcgi.impersonate = 1; - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If it's set 0 PHP sends Status: header that -; is supported by Apache. When this option is set to 1 PHP will send -; RFC2616 compliant header. -; Default is zero. -;cgi.rfc2616_headers = 0 - - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -upload_tmp_dir = /tmp - -; Maximum allowed size for uploaded files. -upload_max_filesize = 2M - - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -allow_url_fopen = On - -; Define the anonymous ftp password (your email address) -;from="john@doe.com" - -; Define the User-Agent string -; user_agent="PHP" - -; Default timeout for socket based streams (seconds) -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; auto_detect_line_endings = Off - - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; -; -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename.extension -; -; For example, on Windows: -; -; extension=msql.dll -; -; ... or under UNIX: -; -; extension=msql.so -; -; Note that it should be the name of the module only; no directory information -; needs to go here. Specify the location of the extension with the -; extension_dir directive above. - - -;Windows Extensions -;Note that ODBC support is built in, so no dll is needed for it. -; - -;extension=ftp.so -;extension=gd.so -;extension=mysql.so -;extension=pcre.so -;extension=session.so -;extension=sockets.so -;extension=xml.so - - - - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[SQL] -sql.safe_mode = Off - -[Session] -; Handler used to store/retrieve data. -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; As of PHP 4.0.1, you can define the path as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if you -; or your OS have problems with lots of files in one directory, and is -; a more efficient layout for servers that handle lots of sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -session.save_path = "/tmp" - -; Whether to use cookies. -session.use_cookies = 1 - -; This option enables administrators to make their users invulnerable to -; attacks which involve passing session ids in URLs; defaults to 0. -; session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -session.name = PHPSESSID - -; Initialize session on request startup. -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -session.cookie_lifetime = 0 - -; The path for which the cookie is valid. -session.cookie_path = / - -; The domain for which the cookie is valid. -session.cookie_domain = - -; Handler used to serialize data. php is the standard serializer of PHP. -session.serialize_handler = php - -; Define the probability that the 'garbage collection' process is started -; on every session initialization. -; The probability is calculated by using gc_probability/gc_divisor, -; e.g. 1/100 means there is a 1% chance that the GC process starts -; on each request. - -session.gc_probability = 1 -session.gc_divisor = 100 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -session.gc_maxlifetime = 1440 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script would is the equivalent of -; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; cd /path/to/sessions; find -cmin +24 | xargs rm - -; PHP 4.2 and less have an undocumented feature/bug that allows you to -; to initialize a session variable in the global scope, albeit register_globals -; is disabled. PHP 4.3 and later will warn you, if this feature is used. -; You can disable the feature and the warning separately. At this time, -; the warning is only displayed, if bug_compat_42 is enabled. - -session.bug_compat_42 = 1 -session.bug_compat_warn = 1 - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -session.referer_check = - -; How many bytes to read from the file. -session.entropy_length = 0 - -; Specified here to create the session id. -session.entropy_file = - -;session.entropy_length = 16 - -;session.entropy_file = /dev/urandom - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -session.cache_limiter = nocache - -; Document expires after n minutes. -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publically accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -session.use_trans_sid = 0 - -; Select a hash function -; 0: MD5 (128 bits) -; 1: SHA-1 (160 bits) -session.hash_function = 0 - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; -; 4 bits: 0-9, a-f -; 5 bits: 0-9, a-v -; 6 bits: 0-9, a-z, A-Z, "-", "," -session.hash_bits_per_character = 4 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; form/fieldset are special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. If you want XHTML conformity, remove the form entry. -; Note that all valid entries require a "=", even if no value follows. -url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" - - -[Assertion] -; Assert(expr); active by default. -;assert.active = On - -; Issue a PHP warning for each failed assertion. -;assert.warning = On - -; Don't bail out by default. -;assert.bail = Off - -; User-function to be called if an assertion fails. -;assert.callback = 0 - -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -;assert.quiet_eval = 0 - - - - - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -;exif.encode_unicode = ISO-8859-15 -;exif.decode_unicode_motorola = UCS-2BE -;exif.decode_unicode_intel = UCS-2LE -;exif.encode_jis = -;exif.decode_jis_motorola = JIS -;exif.decode_jis_intel = JIS - diff --git a/openwrt/package/php4/files/php.init b/openwrt/package/php4/files/php.init deleted file mode 100644 index b29387bd745..00000000000 --- a/openwrt/package/php4/files/php.init +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -export PHP_FCGI_CHILDREN='' -PORT=1026 -BIN=/usr/sbin/php - -case $1 in - start) - $BIN -b $PORT & - ;; - stop) - kill `pidof php` - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/php4/ipkg/php4-cgi.conffiles b/openwrt/package/php4/ipkg/php4-cgi.conffiles deleted file mode 100644 index f1b6b5fc945..00000000000 --- a/openwrt/package/php4/ipkg/php4-cgi.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/php.ini diff --git a/openwrt/package/php4/ipkg/php4-cgi.control b/openwrt/package/php4/ipkg/php4-cgi.control deleted file mode 100644 index 11b566baaf3..00000000000 --- a/openwrt/package/php4/ipkg/php4-cgi.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: php4-cgi -Priority: optional -Section: net -Provides: php4 -Depends: libopenssl, zlib -Description: PHP4 compiled as for CGI diff --git a/openwrt/package/php4/ipkg/php4-cli.conffiles b/openwrt/package/php4/ipkg/php4-cli.conffiles deleted file mode 100644 index f1b6b5fc945..00000000000 --- a/openwrt/package/php4/ipkg/php4-cli.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/php.ini diff --git a/openwrt/package/php4/ipkg/php4-cli.control b/openwrt/package/php4/ipkg/php4-cli.control deleted file mode 100644 index 25b6a5d1bd1..00000000000 --- a/openwrt/package/php4/ipkg/php4-cli.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: php4-cli -Priority: optional -Section: net -Provides: php4 -Depends: libopenssl, zlib -Description: PHP4 CLI (Command Line Interface) diff --git a/openwrt/package/php4/ipkg/php4-fastcgi.conffiles b/openwrt/package/php4/ipkg/php4-fastcgi.conffiles deleted file mode 100644 index 6d0835326cd..00000000000 --- a/openwrt/package/php4/ipkg/php4-fastcgi.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/php.ini -/etc/init.d/php diff --git a/openwrt/package/php4/ipkg/php4-fastcgi.control b/openwrt/package/php4/ipkg/php4-fastcgi.control deleted file mode 100644 index 05886125360..00000000000 --- a/openwrt/package/php4/ipkg/php4-fastcgi.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: php4-fastcgi -Priority: optional -Section: net -Provides: php4 -Depends: libopenssl, zlib -Description: PHP4 compiled for FastCGI (for use with libhttpd-fastcgi) diff --git a/openwrt/package/php4/ipkg/php4-mod-curl.control b/openwrt/package/php4/ipkg/php4-mod-curl.control deleted file mode 100644 index 5d67bd3f494..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-curl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-curl -Priority: optional -Section: net -Depends: php4, libcurl -Description: cURL module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-ftp.control b/openwrt/package/php4/ipkg/php4-mod-ftp.control deleted file mode 100644 index 5e31a26b236..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-ftp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-ftp -Priority: optional -Section: net -Depends: php4 -Description: FTP module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-gd.control b/openwrt/package/php4/ipkg/php4-mod-gd.control deleted file mode 100644 index 3648fe6863c..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-gd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-gd -Priority: optional -Section: net -Depends: php4, libgd, libpng -Description: GD module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-gmp.control b/openwrt/package/php4/ipkg/php4-mod-gmp.control deleted file mode 100644 index c7fae341eb9..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-gmp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-gmp -Priority: optional -Section: net -Depends: php4, libgmp -Description: GMP (GNU MP) module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-ldap.control b/openwrt/package/php4/ipkg/php4-mod-ldap.control deleted file mode 100644 index 4183e8c4088..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-ldap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-ldap -Priority: optional -Section: net -Depends: php4, libopenldap -Description: LDAP module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-mysql.control b/openwrt/package/php4/ipkg/php4-mod-mysql.control deleted file mode 100644 index bcf64d6f573..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-mysql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-mysql -Priority: optional -Section: net -Depends: php4, libmysqlclient -Description: MySQL module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-openssl.control b/openwrt/package/php4/ipkg/php4-mod-openssl.control deleted file mode 100644 index 96d9b7d44c5..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-openssl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-openssl -Priority: optional -Section: net -Depends: php4, libopenssl -Description: OpenSSL module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-pcre.control b/openwrt/package/php4/ipkg/php4-mod-pcre.control deleted file mode 100644 index 13c92ab4e10..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-pcre.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-pcre -Priority: optional -Section: net -Depends: php4, libpcre -Description: PCRE module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-pgsql.control b/openwrt/package/php4/ipkg/php4-mod-pgsql.control deleted file mode 100644 index f90af963ae5..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-pgsql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-pgsql -Priority: optional -Section: net -Depends: php4, libpq -Description: PostgreSQL module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-session.control b/openwrt/package/php4/ipkg/php4-mod-session.control deleted file mode 100644 index abf9c4e936d..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-session.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-session -Priority: optional -Section: net -Depends: php4 -Description: Sessions module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-sockets.control b/openwrt/package/php4/ipkg/php4-mod-sockets.control deleted file mode 100644 index fd286f4338f..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-sockets.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-sockets -Priority: optional -Section: net -Depends: php4 -Description: Sockets module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-sqlite.control b/openwrt/package/php4/ipkg/php4-mod-sqlite.control deleted file mode 100644 index dbff3679e19..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-sqlite.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-sqlite -Priority: optional -Section: net -Depends: php4, libsqlite2 -Description: SQLite module for PHP4 diff --git a/openwrt/package/php4/ipkg/php4-mod-xml.control b/openwrt/package/php4/ipkg/php4-mod-xml.control deleted file mode 100644 index d948c738b2e..00000000000 --- a/openwrt/package/php4/ipkg/php4-mod-xml.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php4-mod-xml -Priority: optional -Section: net -Depends: php4, libexpat -Description: XML module for PHP4 diff --git a/openwrt/package/php4/patches/php-4.3.11-sqlite-1.0.patch b/openwrt/package/php4/patches/php-4.3.11-sqlite-1.0.patch deleted file mode 100644 index e1b11ef4ea2..00000000000 --- a/openwrt/package/php4/patches/php-4.3.11-sqlite-1.0.patch +++ /dev/null @@ -1,17705 +0,0 @@ -diff -ruN php-4.3.11-old/configure php-4.3.11-new/configure ---- php-4.3.11-old/configure 2005-03-30 16:35:34.000000000 +0200 -+++ php-4.3.11-new/configure 2005-07-04 17:29:33.000000000 +0200 -@@ -827,6 +827,8 @@ - ac_help="$ac_help - --enable-sockets Enable sockets support" - ac_help="$ac_help -+ --with-sqlite Include sqlite support" -+ac_help="$ac_help - --with-regex=TYPE regex library type: system, apache, php. Default: php - WARNING: Do NOT use unless you know what you are doing!" - ac_help="$ac_help -@@ -1649,7 +1651,7 @@ - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 --echo "configure:1653: checking host system type" >&5 -+echo "configure:1655: checking host system type" >&5 - - host_alias=$host - case "$host_alias" in -@@ -1749,7 +1751,7 @@ - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1753: checking for $ac_word" >&5 -+echo "configure:1755: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1779,7 +1781,7 @@ - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1783: checking for $ac_word" >&5 -+echo "configure:1785: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1830,7 +1832,7 @@ - # Extract the first word of "cl", so it can be a program name with args. - set dummy cl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1834: checking for $ac_word" >&5 -+echo "configure:1836: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1862,7 +1864,7 @@ - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 --echo "configure:1866: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 -+echo "configure:1868: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -@@ -1873,12 +1875,12 @@ - - cat > conftest.$ac_ext << EOF - --#line 1877 "configure" -+#line 1879 "configure" - #include "confdefs.h" - - main(){return(0);} - EOF --if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then -@@ -1904,12 +1906,12 @@ - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 --echo "configure:1908: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -+echo "configure:1910: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 --echo "configure:1913: checking whether we are using GNU C" >&5 -+echo "configure:1915: checking whether we are using GNU C" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1918,7 +1920,7 @@ - yes; - #endif - EOF --if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then -+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no -@@ -1937,7 +1939,7 @@ - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 --echo "configure:1941: checking whether ${CC-cc} accepts -g" >&5 -+echo "configure:1943: checking whether ${CC-cc} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1970,10 +1972,10 @@ - - if test "x$CC" != xcc; then - echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 --echo "configure:1974: checking whether $CC and cc understand -c and -o together" >&5 -+echo "configure:1976: checking whether $CC and cc understand -c and -o together" >&5 - else - echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 --echo "configure:1977: checking whether cc understands -c and -o together" >&5 -+echo "configure:1979: checking whether cc understands -c and -o together" >&5 - fi - set dummy $CC; ac_cc="`echo $2 | - sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" -@@ -1985,16 +1987,16 @@ - # We do the test twice because some compilers refuse to overwrite an - # existing .o file with -o, though they will create one. - ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' --if { (eval echo configure:1989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && -- test -f conftest.o && { (eval echo configure:1990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; -+if { (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && -+ test -f conftest.o && { (eval echo configure:1992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; - then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. -- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then -+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then - ac_try='cc -c conftest.c -o conftest.o 1>&5' -- if { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && -- test -f conftest.o && { (eval echo configure:1998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; -+ if { (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && -+ test -f conftest.o && { (eval echo configure:2000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; - then - # cc works too. - : -@@ -2021,7 +2023,7 @@ - fi - - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 --echo "configure:2025: checking how to run the C preprocessor" >&5 -+echo "configure:2027: checking how to run the C preprocessor" >&5 - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= -@@ -2036,13 +2038,13 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -@@ -2053,13 +2055,13 @@ - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:2065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -@@ -2070,13 +2072,13 @@ - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:2082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -@@ -2102,9 +2104,9 @@ - - - echo $ac_n "checking for AIX""... $ac_c" 1>&6 --echo "configure:2106: checking for AIX" >&5 -+echo "configure:2108: checking for AIX" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:2133: checking if compiler supports -R" >&5 -+echo "configure:2135: checking if compiler supports -R" >&5 - if eval "test \"`echo '$''{'php_cv_cc_dashr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2137,14 +2139,14 @@ - SAVE_LIBS=$LIBS - LIBS="-R /usr/lib $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - php_cv_cc_dashr=yes - else -@@ -2162,7 +2164,7 @@ - ld_runpath_switch=-R - else - echo $ac_n "checking if compiler supports -Wl,-rpath,""... $ac_c" 1>&6 --echo "configure:2166: checking if compiler supports -Wl,-rpath," >&5 -+echo "configure:2168: checking if compiler supports -Wl,-rpath," >&5 - if eval "test \"`echo '$''{'php_cv_cc_rpath'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2170,14 +2172,14 @@ - SAVE_LIBS=$LIBS - LIBS="-Wl,-rpath,/usr/lib $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - php_cv_cc_rpath=yes - else -@@ -2203,7 +2205,7 @@ - # Extract the first word of "re2c", so it can be a program name with args. - set dummy re2c; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:2207: checking for $ac_word" >&5 -+echo "configure:2209: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RE2C'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2232,7 +2234,7 @@ - - - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 --echo "configure:2236: checking whether ln -s works" >&5 -+echo "configure:2238: checking whether ln -s works" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2257,7 +2259,7 @@ - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:2261: checking for $ac_word" >&5 -+echo "configure:2263: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2291,7 +2293,7 @@ - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:2295: checking for $ac_word" >&5 -+echo "configure:2297: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2325,7 +2327,7 @@ - echo "configure: warning: You will need bison if you want to regenerate the PHP parsers." 1>&2 - else - echo $ac_n "checking bison version""... $ac_c" 1>&6 --echo "configure:2329: checking bison version" >&5 -+echo "configure:2331: checking bison version" >&5 - set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'|tr -d a-z` - if test "${1}" -ne "1" -o "(" "${2}" != "28" -a "${2}" != "35" -a "${2}" != "75" -a "${2}" != "875" ")"; then - echo "configure: warning: You will need bison 1.28" 1>&2 -@@ -2335,7 +2337,7 @@ - # Extract the first word of "flex", so it can be a program name with args. - set dummy flex; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:2339: checking for $ac_word" >&5 -+echo "configure:2341: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2369,7 +2371,7 @@ - *) ac_lib=l ;; - esac - echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 --echo "configure:2373: checking for yywrap in -l$ac_lib" >&5 -+echo "configure:2375: checking for yywrap in -l$ac_lib" >&5 - ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -2377,7 +2379,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$ac_lib $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -2412,7 +2414,7 @@ - - if test -n "$LEX"; then - echo $ac_n "checking lex output file root""... $ac_c" 1>&6 --echo "configure:2416: checking lex output file root" >&5 -+echo "configure:2418: checking lex output file root" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2433,7 +2435,7 @@ - LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - - echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 --echo "configure:2437: checking whether yytext is a pointer" >&5 -+echo "configure:2439: checking whether yytext is a pointer" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2445,14 +2447,14 @@ - ac_save_LIBS="$LIBS" - LIBS="$LIBS $LEXLIB" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_prog_lex_yytext_pointer=yes - else -@@ -2476,12 +2478,12 @@ - : - fi - echo $ac_n "checking for working const""... $ac_c" 1>&6 --echo "configure:2480: checking for working const" >&5 -+echo "configure:2482: checking for working const" >&5 - if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:2536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else -@@ -2555,7 +2557,7 @@ - fi - - echo $ac_n "checking flex version""... $ac_c" 1>&6 --echo "configure:2559: checking flex version" >&5 -+echo "configure:2561: checking flex version" >&5 - if test "$LEX" ;then - flexvers=`echo "" | $LEX -V -v --version 2>/dev/null | - sed -e 's/^.* //' -e 's/\./ /g'` -@@ -2571,7 +2573,7 @@ - fi - - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 --echo "configure:2575: checking whether byte ordering is bigendian" >&5 -+echo "configure:2577: checking whether byte ordering is bigendian" >&5 - if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2581,7 +2583,7 @@ - ac_cv_c_bigendian_php=unknown - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_bigendian_php=yes - else -@@ -2654,7 +2656,7 @@ - # Disable PIC mode by default where it is known to be safe to do so, - # to avoid the performance hit from the lost register - echo $ac_n "checking whether to force non-PIC code in shared modules""... $ac_c" 1>&6 --echo "configure:2658: checking whether to force non-PIC code in shared modules" >&5 -+echo "configure:2660: checking whether to force non-PIC code in shared modules" >&5 - case $host_alias in - i?86-*-linux*|i?86-*-freebsd*) - if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then -@@ -2753,7 +2755,7 @@ - pthreads_working=no - else - cat > conftest.$ac_ext < -@@ -2771,7 +2773,7 @@ - return pthread_create(&thd, NULL, thread_routine, &data); - } - EOF --if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - pthreads_working=yes -@@ -2791,7 +2793,7 @@ - CFLAGS=$save_CFLAGS - - echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6 --echo "configure:2795: checking for pthreads_cflags" >&5 -+echo "configure:2797: checking for pthreads_cflags" >&5 - if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2806,7 +2808,7 @@ - pthreads_working=no - else - cat > conftest.$ac_ext < -@@ -2824,7 +2826,7 @@ - return pthread_create(&thd, NULL, thread_routine, &data); - } - EOF --if { (eval echo configure:2828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:2830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - pthreads_working=yes -@@ -2854,7 +2856,7 @@ - echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6 - - echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6 --echo "configure:2858: checking for pthreads_lib" >&5 -+echo "configure:2860: checking for pthreads_lib" >&5 - if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2869,7 +2871,7 @@ - pthreads_working=no - else - cat > conftest.$ac_ext < -@@ -2887,7 +2889,7 @@ - return pthread_create(&thd, NULL, thread_routine, &data); - } - EOF --if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - pthreads_working=yes -@@ -2985,7 +2987,7 @@ - - - echo $ac_n "checking for AOLserver support""... $ac_c" 1>&6 --echo "configure:2989: checking for AOLserver support" >&5 -+echo "configure:2991: checking for AOLserver support" >&5 - # Check whether --with-aolserver or --without-aolserver was given. - if test "${with_aolserver+set}" = set; then - withval="$with_aolserver" -@@ -3226,7 +3228,7 @@ - - - echo $ac_n "checking for Apache 1.x module support via DSO through APXS""... $ac_c" 1>&6 --echo "configure:3230: checking for Apache 1.x module support via DSO through APXS" >&5 -+echo "configure:3232: checking for Apache 1.x module support via DSO through APXS" >&5 - # Check whether --with-apxs or --without-apxs was given. - if test "${with_apxs+set}" = set; then - withval="$with_apxs" -@@ -3529,7 +3531,7 @@ - - if test "$PHP_SAPI" != "apache"; then - echo $ac_n "checking for Apache 1.x module support""... $ac_c" 1>&6 --echo "configure:3533: checking for Apache 1.x module support" >&5 -+echo "configure:3535: checking for Apache 1.x module support" >&5 - # Check whether --with-apache or --without-apache was given. - if test "${with_apache+set}" = set; then - withval="$with_apache" -@@ -4364,7 +4366,7 @@ - fi - - echo $ac_n "checking for mod_charset compatibility option""... $ac_c" 1>&6 --echo "configure:4368: checking for mod_charset compatibility option" >&5 -+echo "configure:4370: checking for mod_charset compatibility option" >&5 - # Check whether --with-mod_charset or --without-mod_charset was given. - if test "${with_mod_charset+set}" = set; then - withval="$with_mod_charset" -@@ -4388,7 +4390,7 @@ - - gcc_arg_name=ac_cv_gcc_arg_rdynamic - echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6 --echo "configure:4392: checking whether $CC supports -rdynamic" >&5 -+echo "configure:4394: checking whether $CC supports -rdynamic" >&5 - if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -4431,7 +4433,7 @@ - - - echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6 --echo "configure:4435: checking for member fd in BUFF *" >&5 -+echo "configure:4437: checking for member fd in BUFF *" >&5 - if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -4443,14 +4445,14 @@ - CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE" - fi - cat > conftest.$ac_ext < - int main() { - conn_rec *c; int fd = c->client->fd; - ; return 0; } - EOF --if { (eval echo configure:4454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - ac_cv_php_fd_in_buff=yes -@@ -4501,7 +4503,7 @@ - - - echo $ac_n "checking for Apache 2.0 filter-module support via DSO through APXS""... $ac_c" 1>&6 --echo "configure:4505: checking for Apache 2.0 filter-module support via DSO through APXS" >&5 -+echo "configure:4507: checking for Apache 2.0 filter-module support via DSO through APXS" >&5 - # Check whether --with-apxs2filter or --without-apxs2filter was given. - if test "${with_apxs2filter+set}" = set; then - withval="$with_apxs2filter" -@@ -5323,7 +5325,7 @@ - - - echo $ac_n "checking for Apache 2.0 handler-module support via DSO through APXS""... $ac_c" 1>&6 --echo "configure:5327: checking for Apache 2.0 handler-module support via DSO through APXS" >&5 -+echo "configure:5329: checking for Apache 2.0 handler-module support via DSO through APXS" >&5 - # Check whether --with-apxs2 or --without-apxs2 was given. - if test "${with_apxs2+set}" = set; then - withval="$with_apxs2" -@@ -6146,7 +6148,7 @@ - - RESULT=no - echo $ac_n "checking for Caudium support""... $ac_c" 1>&6 --echo "configure:6150: checking for Caudium support" >&5 -+echo "configure:6152: checking for Caudium support" >&5 - # Check whether --with-caudium or --without-caudium was given. - if test "${with_caudium+set}" = set; then - withval="$with_caudium" -@@ -6218,7 +6220,7 @@ - PIKE_C_INCLUDE=/usr/local/include/`basename $PIKE` - fi - echo $ac_n "checking for C includes in $PIKE_C_INCLUDE""... $ac_c" 1>&6 --echo "configure:6222: checking for C includes in $PIKE_C_INCLUDE" >&5 -+echo "configure:6224: checking for C includes in $PIKE_C_INCLUDE" >&5 - if test -f $PIKE_C_INCLUDE/version.h; then - PIKE_TEST_VER=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'` - ###### VERSION MATCH CHECK ####### -@@ -6476,7 +6478,7 @@ - - - echo $ac_n "checking for CLI build""... $ac_c" 1>&6 --echo "configure:6480: checking for CLI build" >&5 -+echo "configure:6482: checking for CLI build" >&5 - - # Check whether --enable-cli or --disable-cli was given. - if test "${enable_cli+set}" = set; then -@@ -6536,7 +6538,7 @@ - - - echo $ac_n "checking for embedded SAPI library support""... $ac_c" 1>&6 --echo "configure:6540: checking for embedded SAPI library support" >&5 -+echo "configure:6542: checking for embedded SAPI library support" >&5 - - # Check whether --enable-embed or --disable-embed was given. - if test "${enable_embed+set}" = set; then -@@ -6739,7 +6741,7 @@ - - RESULT=no - echo $ac_n "checking for Zeus ISAPI support""... $ac_c" 1>&6 --echo "configure:6743: checking for Zeus ISAPI support" >&5 -+echo "configure:6745: checking for Zeus ISAPI support" >&5 - # Check whether --with-isapi or --without-isapi was given. - if test "${with_isapi+set}" = set; then - withval="$with_isapi" -@@ -6969,7 +6971,7 @@ - - - echo $ac_n "checking for NSAPI support""... $ac_c" 1>&6 --echo "configure:6973: checking for NSAPI support" >&5 -+echo "configure:6975: checking for NSAPI support" >&5 - # Check whether --with-nsapi or --without-nsapi was given. - if test "${with_nsapi+set}" = set; then - withval="$with_nsapi" -@@ -6989,7 +6991,7 @@ - { echo "configure: error: Please specify the path to the root of your Netscape/iPlanet/SunONE server using --with-nsapi=DIR" 1>&2; exit 1; } - fi - echo $ac_n "checking for NSAPI include files""... $ac_c" 1>&6 --echo "configure:6993: checking for NSAPI include files" >&5 -+echo "configure:6995: checking for NSAPI include files" >&5 - if test -d $PHP_NSAPI/include ; then - NSAPI_INCLUDE=$PHP_NSAPI/include - echo "$ac_t""Netscape-Enterprise 3.x style" 1>&6 -@@ -6997,17 +6999,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:7001: checking for $ac_hdr" >&5 -+echo "configure:7003: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:7011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -7042,17 +7044,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:7046: checking for $ac_hdr" >&5 -+echo "configure:7048: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:7056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:7058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -7310,7 +7312,7 @@ - - RESULT=no - echo $ac_n "checking for PHTTPD support""... $ac_c" 1>&6 --echo "configure:7314: checking for PHTTPD support" >&5 -+echo "configure:7316: checking for PHTTPD support" >&5 - # Check whether --with-phttpd or --without-phttpd was given. - if test "${with_phttpd+set}" = set; then - withval="$with_phttpd" -@@ -7539,7 +7541,7 @@ - - RESULT=no - echo $ac_n "checking for Pi3Web support""... $ac_c" 1>&6 --echo "configure:7543: checking for Pi3Web support" >&5 -+echo "configure:7545: checking for Pi3Web support" >&5 - - # Check whether --with-pi3web or --without-pi3web was given. - if test "${with_pi3web+set}" = set; then -@@ -7868,7 +7870,7 @@ - - RESULT=no - echo $ac_n "checking for Roxen/Pike support""... $ac_c" 1>&6 --echo "configure:7872: checking for Roxen/Pike support" >&5 -+echo "configure:7874: checking for Roxen/Pike support" >&5 - # Check whether --with-roxen or --without-roxen was given. - if test "${with_roxen+set}" = set; then - withval="$with_roxen" -@@ -8110,7 +8112,7 @@ - if test "$RESULT" != "no" ; then - RESULT=no - echo $ac_n "checking if Roxen should use ZTS""... $ac_c" 1>&6 --echo "configure:8114: checking if Roxen should use ZTS" >&5 -+echo "configure:8116: checking if Roxen should use ZTS" >&5 - # Check whether --enable-roxen-zts or --disable-roxen-zts was given. - if test "${enable_roxen_zts+set}" = set; then - enableval="$enable_roxen_zts" -@@ -8137,7 +8139,7 @@ - - - echo $ac_n "checking for Servlet support""... $ac_c" 1>&6 --echo "configure:8141: checking for Servlet support" >&5 -+echo "configure:8143: checking for Servlet support" >&5 - # Check whether --with-servlet or --without-servlet was given. - if test "${with_servlet+set}" = set; then - withval="$with_servlet" -@@ -8448,7 +8450,7 @@ - - gcc_arg_name=ac_cv_gcc_arg_rdynamic - echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6 --echo "configure:8452: checking whether $CC supports -rdynamic" >&5 -+echo "configure:8454: checking whether $CC supports -rdynamic" >&5 - if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -8655,7 +8657,7 @@ - - - echo $ac_n "checking for thttpd""... $ac_c" 1>&6 --echo "configure:8659: checking for thttpd" >&5 -+echo "configure:8661: checking for thttpd" >&5 - echo "$ac_t""$PHP_THTTPD" 1>&6 - - -@@ -8670,17 +8672,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:8674: checking for $ac_hdr" >&5 -+echo "configure:8676: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:8684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:8686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -8881,7 +8883,7 @@ - - - echo $ac_n "checking for TUX""... $ac_c" 1>&6 --echo "configure:8885: checking for TUX" >&5 -+echo "configure:8887: checking for TUX" >&5 - echo "$ac_t""$PHP_TUX" 1>&6 - - unset PHP_TUX -@@ -9115,7 +9117,7 @@ - - - echo $ac_n "checking for webjames""... $ac_c" 1>&6 --echo "configure:9119: checking for webjames" >&5 -+echo "configure:9121: checking for webjames" >&5 - echo "$ac_t""$PHP_WEBJAMES" 1>&6 - - -@@ -9189,7 +9191,7 @@ - - if test "$PHP_SAPI" = "default"; then - echo $ac_n "checking for CGI build""... $ac_c" 1>&6 --echo "configure:9193: checking for CGI build" >&5 -+echo "configure:9195: checking for CGI build" >&5 - if test "$PHP_SAPI_CGI" != "no"; then - echo "$ac_t""yes" 1>&6 - -@@ -9213,7 +9215,7 @@ - - - echo $ac_n "checking whether writing to stdout works""... $ac_c" 1>&6 --echo "configure:9217: checking whether writing to stdout works" >&5 -+echo "configure:9219: checking whether writing to stdout works" >&5 - if eval "test \"`echo '$''{'ac_cv_write_stdout'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -9224,7 +9226,7 @@ - - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:9248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_write_stdout=yes -@@ -9271,7 +9273,7 @@ - - - echo $ac_n "checking whether to force Apache CGI redirect""... $ac_c" 1>&6 --echo "configure:9275: checking whether to force Apache CGI redirect" >&5 -+echo "configure:9277: checking whether to force Apache CGI redirect" >&5 - if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then - REDIRECT=1 - else -@@ -9285,7 +9287,7 @@ - - - echo $ac_n "checking whether to discard path_info + path_translated""... $ac_c" 1>&6 --echo "configure:9289: checking whether to discard path_info + path_translated" >&5 -+echo "configure:9291: checking whether to discard path_info + path_translated" >&5 - if test "$PHP_DISCARD_PATH" = "yes"; then - DISCARD_PATH=1 - else -@@ -9298,7 +9300,7 @@ - echo "$ac_t""$PHP_DISCARD_PATH" 1>&6 - - echo $ac_n "checking whether to enable path info checking""... $ac_c" 1>&6 --echo "configure:9302: checking whether to enable path info checking" >&5 -+echo "configure:9304: checking whether to enable path info checking" >&5 - if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then - ENABLE_PATHINFO_CHECK=1 - else -@@ -9311,7 +9313,7 @@ - echo "$ac_t""$PHP_ENABLE_PATHINFO_CHECK" 1>&6 - - echo $ac_n "checking whether to enable fastcgi support""... $ac_c" 1>&6 --echo "configure:9315: checking whether to enable fastcgi support" >&5 -+echo "configure:9317: checking whether to enable fastcgi support" >&5 - PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" - if test -z $PHP_LIBFCGI_DIR; then - echo "$PHP_LIBFCGI_DIR does not exist" -@@ -9536,7 +9538,7 @@ - - - echo $ac_n "checking for chosen SAPI module""... $ac_c" 1>&6 --echo "configure:9540: checking for chosen SAPI module" >&5 -+echo "configure:9542: checking for chosen SAPI module" >&5 - echo "$ac_t""$PHP_SAPI" 1>&6 - - if test "$enable_experimental_zts" = "yes"; then -@@ -9639,7 +9641,7 @@ - #AC_LANG([C]) - - echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 --echo "configure:9643: checking for gethostbyname in -lnsl" >&5 -+echo "configure:9645: checking for gethostbyname in -lnsl" >&5 - ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -9647,7 +9649,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:9664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -9686,7 +9688,7 @@ - fi - - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 --echo "configure:9690: checking for socket in -lsocket" >&5 -+echo "configure:9692: checking for socket in -lsocket" >&5 - ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -9694,7 +9696,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:9711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -9741,17 +9743,17 @@ - # If it isn't, don't bother looking for the threads libraries. - ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 --echo "configure:9745: checking for pthread.h" >&5 -+echo "configure:9747: checking for pthread.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:9755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:9757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -9788,9 +9790,9 @@ - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - echo $ac_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS""... $ac_c" 1>&6 --echo "configure:9792: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -+echo "configure:9794: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:9807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - acx_pthread_ok=yes - else -@@ -9863,18 +9865,18 @@ - case $flag in - none) - echo $ac_n "checking whether pthreads work without any flags""... $ac_c" 1>&6 --echo "configure:9867: checking whether pthreads work without any flags" >&5 -+echo "configure:9869: checking whether pthreads work without any flags" >&5 - ;; - - -*) - echo $ac_n "checking whether pthreads work with $flag""... $ac_c" 1>&6 --echo "configure:9872: checking whether pthreads work with $flag" >&5 -+echo "configure:9874: checking whether pthreads work with $flag" >&5 - PTHREAD_CFLAGS="$flag" - ;; - - *) - echo $ac_n "checking for the pthreads library -l$flag""... $ac_c" 1>&6 --echo "configure:9878: checking for the pthreads library -l$flag" >&5 -+echo "configure:9880: checking for the pthreads library -l$flag" >&5 - PTHREAD_LIBS="-l$flag" - ;; - esac -@@ -9894,7 +9896,7 @@ - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat > conftest.$ac_ext < - int main() { -@@ -9903,7 +9905,7 @@ - pthread_create(0,0,0,0); pthread_cleanup_pop(0); - ; return 0; } - EOF --if { (eval echo configure:9907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:9909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - acx_pthread_ok=yes - else -@@ -9935,16 +9937,16 @@ - # Detect AIX lossage: threads are created detached by default - # and the JOINABLE attribute has a nonstandard name (UNDETACHED). - echo $ac_n "checking for joinable pthread attribute""... $ac_c" 1>&6 --echo "configure:9939: checking for joinable pthread attribute" >&5 -+echo "configure:9941: checking for joinable pthread attribute" >&5 - cat > conftest.$ac_ext < - int main() { - int attr=PTHREAD_CREATE_JOINABLE; - ; return 0; } - EOF --if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:9950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ok=PTHREAD_CREATE_JOINABLE - else -@@ -9956,14 +9958,14 @@ - rm -f conftest* - if test x"$ok" = xunknown; then - cat > conftest.$ac_ext < - int main() { - int attr=PTHREAD_CREATE_UNDETACHED; - ; return 0; } - EOF --if { (eval echo configure:9967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:9969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ok=PTHREAD_CREATE_UNDETACHED - else -@@ -9986,7 +9988,7 @@ - fi - - echo $ac_n "checking if more special flags are required for pthreads""... $ac_c" 1>&6 --echo "configure:9990: checking if more special flags are required for pthreads" >&5 -+echo "configure:9992: checking if more special flags are required for pthreads" >&5 - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; -@@ -10004,7 +10006,7 @@ - # Extract the first word of "cc_r", so it can be a program name with args. - set dummy cc_r; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:10008: checking for $ac_word" >&5 -+echo "configure:10010: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_PTHREAD_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -10053,9 +10055,9 @@ - - - echo $ac_n "checking for sun_len in sys/un.h""... $ac_c" 1>&6 --echo "configure:10057: checking for sun_len in sys/un.h" >&5 -+echo "configure:10059: checking for sun_len in sys/un.h" >&5 - cat > conftest.$ac_ext < - EOF -@@ -10075,9 +10077,9 @@ - - - echo $ac_n "checking for fpos_t in stdio.h""... $ac_c" 1>&6 --echo "configure:10079: checking for fpos_t in stdio.h" >&5 -+echo "configure:10081: checking for fpos_t in stdio.h" >&5 - cat > conftest.$ac_ext < - EOF -@@ -10100,17 +10102,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:10104: checking for $ac_hdr" >&5 -+echo "configure:10106: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:10114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:10116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -10140,17 +10142,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:10144: checking for $ac_hdr" >&5 -+echo "configure:10146: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:10154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:10156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -10178,9 +10180,9 @@ - - - echo $ac_n "checking for a fileno() prototype in stdio.h""... $ac_c" 1>&6 --echo "configure:10182: checking for a fileno() prototype in stdio.h" >&5 -+echo "configure:10184: checking for a fileno() prototype in stdio.h" >&5 - cat > conftest.$ac_ext < - EOF -@@ -10201,9 +10203,9 @@ - - if test "$HAVE_SYS_SOCKET_H"; then - echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6 --echo "configure:10205: checking for socklen_t in sys/socket.h" >&5 -+echo "configure:10207: checking for socklen_t in sys/socket.h" >&5 - cat > conftest.$ac_ext < - EOF -@@ -10227,7 +10229,7 @@ - # Do we need cross-process locking on this platform? - #-------------------------------------------------------------------- - echo $ac_n "checking whether cross-process locking is required by accept()""... $ac_c" 1>&6 --echo "configure:10231: checking whether cross-process locking is required by accept()" >&5 -+echo "configure:10233: checking whether cross-process locking is required by accept()" >&5 - case "`uname -sr`" in - IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0) - echo "$ac_t""yes" 1>&6 -@@ -10246,16 +10248,16 @@ - # hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler) - #-------------------------------------------------------------------- - echo $ac_n "checking whether va_arg(arg, long double) crashes the compiler""... $ac_c" 1>&6 --echo "configure:10250: checking whether va_arg(arg, long double) crashes the compiler" >&5 -+echo "configure:10252: checking whether va_arg(arg, long double) crashes the compiler" >&5 - cat > conftest.$ac_ext < - int main() { - long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double); - ; return 0; } - EOF --if { (eval echo configure:10259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:10261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 - else -@@ -10271,12 +10273,12 @@ - rm -f conftest* - - echo $ac_n "checking for working const""... $ac_c" 1>&6 --echo "configure:10275: checking for working const" >&5 -+echo "configure:10277: checking for working const" >&5 - if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:10331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else -@@ -10350,12 +10352,12 @@ - for ac_func in strerror - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:10354: checking for $ac_func" >&5 -+echo "configure:10356: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:10384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -10441,16 +10443,16 @@ - - - echo $ac_n "checking for missing declarations of reentrant functions""... $ac_c" 1>&6 --echo "configure:10445: checking for missing declarations of reentrant functions" >&5 -+echo "configure:10447: checking for missing declarations of reentrant functions" >&5 - cat > conftest.$ac_ext < - int main() { - struct tm *(*func)() = localtime_r - ; return 0; } - EOF --if { (eval echo configure:10454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:10456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - : -@@ -10468,14 +10470,14 @@ - fi - rm -f conftest* - cat > conftest.$ac_ext < - int main() { - struct tm *(*func)() = gmtime_r - ; return 0; } - EOF --if { (eval echo configure:10479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:10481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - : -@@ -10493,14 +10495,14 @@ - fi - rm -f conftest* - cat > conftest.$ac_ext < - int main() { - char *(*func)() = asctime_r - ; return 0; } - EOF --if { (eval echo configure:10504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:10506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - : -@@ -10518,14 +10520,14 @@ - fi - rm -f conftest* - cat > conftest.$ac_ext < - int main() { - char *(*func)() = ctime_r - ; return 0; } - EOF --if { (eval echo configure:10529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:10531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - : -@@ -10543,14 +10545,14 @@ - fi - rm -f conftest* - cat > conftest.$ac_ext < - int main() { - char *(*func)() = strtok_r - ; return 0; } - EOF --if { (eval echo configure:10554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:10556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - : -@@ -10574,7 +10576,7 @@ - # Extract the first word of "sendmail", so it can be a program name with args. - set dummy sendmail; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:10578: checking for $ac_word" >&5 -+echo "configure:10580: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PROG_SENDMAIL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -10615,7 +10617,7 @@ - - - echo $ac_n "checking whether system uses EBCDIC""... $ac_c" 1>&6 --echo "configure:10619: checking whether system uses EBCDIC" >&5 -+echo "configure:10621: checking whether system uses EBCDIC" >&5 - if eval "test \"`echo '$''{'ac_cv_ebcdic'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -10626,7 +10628,7 @@ - - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:10640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_ebcdic=yes -@@ -10707,12 +10709,12 @@ - unset found - - echo $ac_n "checking for socket""... $ac_c" 1>&6 --echo "configure:10711: checking for socket" >&5 -+echo "configure:10713: checking for socket" >&5 - if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:10741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_socket=yes" - else -@@ -10753,12 +10755,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __socket""... $ac_c" 1>&6 --echo "configure:10757: checking for __socket" >&5 -+echo "configure:10759: checking for __socket" >&5 - if eval "test \"`echo '$''{'ac_cv_func___socket'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:10787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___socket=yes" - else -@@ -10819,7 +10821,7 @@ - unset ac_cv_lib_socket___socket - unset found - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 --echo "configure:10823: checking for socket in -lsocket" >&5 -+echo "configure:10825: checking for socket in -lsocket" >&5 - ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -10827,7 +10829,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -10858,7 +10860,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __socket in -lsocket""... $ac_c" 1>&6 --echo "configure:10862: checking for __socket in -lsocket" >&5 -+echo "configure:10864: checking for __socket in -lsocket" >&5 - ac_lib_var=`echo socket'_'__socket | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -10866,7 +10868,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:10883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -10909,11 +10911,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:10919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -10964,12 +10966,12 @@ - unset found - - echo $ac_n "checking for htonl""... $ac_c" 1>&6 --echo "configure:10968: checking for htonl" >&5 -+echo "configure:10970: checking for htonl" >&5 - if eval "test \"`echo '$''{'ac_cv_func_htonl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:10998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_htonl=yes" - else -@@ -11010,12 +11012,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __htonl""... $ac_c" 1>&6 --echo "configure:11014: checking for __htonl" >&5 -+echo "configure:11016: checking for __htonl" >&5 - if eval "test \"`echo '$''{'ac_cv_func___htonl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___htonl=yes" - else -@@ -11076,7 +11078,7 @@ - unset ac_cv_lib_socket___htonl - unset found - echo $ac_n "checking for htonl in -lsocket""... $ac_c" 1>&6 --echo "configure:11080: checking for htonl in -lsocket" >&5 -+echo "configure:11082: checking for htonl in -lsocket" >&5 - ac_lib_var=`echo socket'_'htonl | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11084,7 +11086,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -11115,7 +11117,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __htonl in -lsocket""... $ac_c" 1>&6 --echo "configure:11119: checking for __htonl in -lsocket" >&5 -+echo "configure:11121: checking for __htonl in -lsocket" >&5 - ac_lib_var=`echo socket'_'__htonl | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11123,7 +11125,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -11166,11 +11168,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:11176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -11221,12 +11223,12 @@ - unset found - - echo $ac_n "checking for gethostname""... $ac_c" 1>&6 --echo "configure:11225: checking for gethostname" >&5 -+echo "configure:11227: checking for gethostname" >&5 - if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_gethostname=yes" - else -@@ -11267,12 +11269,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __gethostname""... $ac_c" 1>&6 --echo "configure:11271: checking for __gethostname" >&5 -+echo "configure:11273: checking for __gethostname" >&5 - if eval "test \"`echo '$''{'ac_cv_func___gethostname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___gethostname=yes" - else -@@ -11333,7 +11335,7 @@ - unset ac_cv_lib_nsl___gethostname - unset found - echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 --echo "configure:11337: checking for gethostname in -lnsl" >&5 -+echo "configure:11339: checking for gethostname in -lnsl" >&5 - ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11341,7 +11343,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -11372,7 +11374,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __gethostname in -lnsl""... $ac_c" 1>&6 --echo "configure:11376: checking for __gethostname in -lnsl" >&5 -+echo "configure:11378: checking for __gethostname in -lnsl" >&5 - ac_lib_var=`echo nsl'_'__gethostname | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11380,7 +11382,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -11423,11 +11425,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -11478,12 +11480,12 @@ - unset found - - echo $ac_n "checking for gethostbyaddr""... $ac_c" 1>&6 --echo "configure:11482: checking for gethostbyaddr" >&5 -+echo "configure:11484: checking for gethostbyaddr" >&5 - if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_gethostbyaddr=yes" - else -@@ -11524,12 +11526,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __gethostbyaddr""... $ac_c" 1>&6 --echo "configure:11528: checking for __gethostbyaddr" >&5 -+echo "configure:11530: checking for __gethostbyaddr" >&5 - if eval "test \"`echo '$''{'ac_cv_func___gethostbyaddr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___gethostbyaddr=yes" - else -@@ -11590,7 +11592,7 @@ - unset ac_cv_lib_nsl___gethostbyaddr - unset found - echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6 --echo "configure:11594: checking for gethostbyaddr in -lnsl" >&5 -+echo "configure:11596: checking for gethostbyaddr in -lnsl" >&5 - ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11598,7 +11600,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -11629,7 +11631,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __gethostbyaddr in -lnsl""... $ac_c" 1>&6 --echo "configure:11633: checking for __gethostbyaddr in -lnsl" >&5 -+echo "configure:11635: checking for __gethostbyaddr in -lnsl" >&5 - ac_lib_var=`echo nsl'_'__gethostbyaddr | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11637,7 +11639,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -11680,11 +11682,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:11690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -11735,12 +11737,12 @@ - unset found - - echo $ac_n "checking for yp_get_default_domain""... $ac_c" 1>&6 --echo "configure:11739: checking for yp_get_default_domain" >&5 -+echo "configure:11741: checking for yp_get_default_domain" >&5 - if eval "test \"`echo '$''{'ac_cv_func_yp_get_default_domain'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_yp_get_default_domain=yes" - else -@@ -11781,12 +11783,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __yp_get_default_domain""... $ac_c" 1>&6 --echo "configure:11785: checking for __yp_get_default_domain" >&5 -+echo "configure:11787: checking for __yp_get_default_domain" >&5 - if eval "test \"`echo '$''{'ac_cv_func___yp_get_default_domain'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___yp_get_default_domain=yes" - else -@@ -11847,7 +11849,7 @@ - unset ac_cv_lib_nsl___yp_get_default_domain - unset found - echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 --echo "configure:11851: checking for yp_get_default_domain in -lnsl" >&5 -+echo "configure:11853: checking for yp_get_default_domain in -lnsl" >&5 - ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11855,7 +11857,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -11886,7 +11888,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __yp_get_default_domain in -lnsl""... $ac_c" 1>&6 --echo "configure:11890: checking for __yp_get_default_domain in -lnsl" >&5 -+echo "configure:11892: checking for __yp_get_default_domain in -lnsl" >&5 - ac_lib_var=`echo nsl'_'__yp_get_default_domain | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11894,7 +11896,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:11911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -11937,11 +11939,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:11947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -11993,12 +11995,12 @@ - unset found - - echo $ac_n "checking for dlopen""... $ac_c" 1>&6 --echo "configure:11997: checking for dlopen" >&5 -+echo "configure:11999: checking for dlopen" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" - else -@@ -12039,12 +12041,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __dlopen""... $ac_c" 1>&6 --echo "configure:12043: checking for __dlopen" >&5 -+echo "configure:12045: checking for __dlopen" >&5 - if eval "test \"`echo '$''{'ac_cv_func___dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___dlopen=yes" - else -@@ -12105,7 +12107,7 @@ - unset ac_cv_lib_dl___dlopen - unset found - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 --echo "configure:12109: checking for dlopen in -ldl" >&5 -+echo "configure:12111: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12113,7 +12115,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12144,7 +12146,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __dlopen in -ldl""... $ac_c" 1>&6 --echo "configure:12148: checking for __dlopen in -ldl" >&5 -+echo "configure:12150: checking for __dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'__dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12152,7 +12154,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12195,11 +12197,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:12205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -12251,7 +12253,7 @@ - - fi - echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 --echo "configure:12255: checking for sin in -lm" >&5 -+echo "configure:12257: checking for sin in -lm" >&5 - ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12259,7 +12261,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lm $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12304,12 +12306,12 @@ - unset found - - echo $ac_n "checking for res_search""... $ac_c" 1>&6 --echo "configure:12308: checking for res_search" >&5 -+echo "configure:12310: checking for res_search" >&5 - if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_res_search=yes" - else -@@ -12350,12 +12352,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __res_search""... $ac_c" 1>&6 --echo "configure:12354: checking for __res_search" >&5 -+echo "configure:12356: checking for __res_search" >&5 - if eval "test \"`echo '$''{'ac_cv_func___res_search'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___res_search=yes" - else -@@ -12416,7 +12418,7 @@ - unset ac_cv_lib_resolv___res_search - unset found - echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 --echo "configure:12420: checking for res_search in -lresolv" >&5 -+echo "configure:12422: checking for res_search in -lresolv" >&5 - ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12424,7 +12426,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lresolv $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12455,7 +12457,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __res_search in -lresolv""... $ac_c" 1>&6 --echo "configure:12459: checking for __res_search in -lresolv" >&5 -+echo "configure:12461: checking for __res_search in -lresolv" >&5 - ac_lib_var=`echo resolv'_'__res_search | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12463,7 +12465,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lresolv $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12506,11 +12508,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:12516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -12552,7 +12554,7 @@ - unset ac_cv_lib_bind___res_search - unset found - echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6 --echo "configure:12556: checking for res_search in -lbind" >&5 -+echo "configure:12558: checking for res_search in -lbind" >&5 - ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12560,7 +12562,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lbind $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12591,7 +12593,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6 --echo "configure:12595: checking for __res_search in -lbind" >&5 -+echo "configure:12597: checking for __res_search in -lbind" >&5 - ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12599,7 +12601,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lbind $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12642,11 +12644,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:12652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -12688,7 +12690,7 @@ - unset ac_cv_lib_socket___res_search - unset found - echo $ac_n "checking for res_search in -lsocket""... $ac_c" 1>&6 --echo "configure:12692: checking for res_search in -lsocket" >&5 -+echo "configure:12694: checking for res_search in -lsocket" >&5 - ac_lib_var=`echo socket'_'res_search | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12696,7 +12698,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12727,7 +12729,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __res_search in -lsocket""... $ac_c" 1>&6 --echo "configure:12731: checking for __res_search in -lsocket" >&5 -+echo "configure:12733: checking for __res_search in -lsocket" >&5 - ac_lib_var=`echo socket'_'__res_search | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12735,7 +12737,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12778,11 +12780,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:12788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -12840,12 +12842,12 @@ - unset found - - echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 --echo "configure:12844: checking for inet_aton" >&5 -+echo "configure:12846: checking for inet_aton" >&5 - if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_inet_aton=yes" - else -@@ -12886,12 +12888,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __inet_aton""... $ac_c" 1>&6 --echo "configure:12890: checking for __inet_aton" >&5 -+echo "configure:12892: checking for __inet_aton" >&5 - if eval "test \"`echo '$''{'ac_cv_func___inet_aton'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___inet_aton=yes" - else -@@ -12952,7 +12954,7 @@ - unset ac_cv_lib_resolv___inet_aton - unset found - echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 --echo "configure:12956: checking for inet_aton in -lresolv" >&5 -+echo "configure:12958: checking for inet_aton in -lresolv" >&5 - ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12960,7 +12962,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lresolv $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -12991,7 +12993,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __inet_aton in -lresolv""... $ac_c" 1>&6 --echo "configure:12995: checking for __inet_aton in -lresolv" >&5 -+echo "configure:12997: checking for __inet_aton in -lresolv" >&5 - ac_lib_var=`echo resolv'_'__inet_aton | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -12999,7 +13001,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lresolv $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13042,11 +13044,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:13052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -13088,7 +13090,7 @@ - unset ac_cv_lib_bind___inet_aton - unset found - echo $ac_n "checking for inet_aton in -lbind""... $ac_c" 1>&6 --echo "configure:13092: checking for inet_aton in -lbind" >&5 -+echo "configure:13094: checking for inet_aton in -lbind" >&5 - ac_lib_var=`echo bind'_'inet_aton | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -13096,7 +13098,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lbind $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13127,7 +13129,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __inet_aton in -lbind""... $ac_c" 1>&6 --echo "configure:13131: checking for __inet_aton in -lbind" >&5 -+echo "configure:13133: checking for __inet_aton in -lbind" >&5 - ac_lib_var=`echo bind'_'__inet_aton | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -13135,7 +13137,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lbind $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13178,11 +13180,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:13188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -13236,12 +13238,12 @@ - unset found - - echo $ac_n "checking for dn_skipname""... $ac_c" 1>&6 --echo "configure:13240: checking for dn_skipname" >&5 -+echo "configure:13242: checking for dn_skipname" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dn_skipname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dn_skipname=yes" - else -@@ -13282,12 +13284,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __dn_skipname""... $ac_c" 1>&6 --echo "configure:13286: checking for __dn_skipname" >&5 -+echo "configure:13288: checking for __dn_skipname" >&5 - if eval "test \"`echo '$''{'ac_cv_func___dn_skipname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func___dn_skipname=yes" - else -@@ -13348,7 +13350,7 @@ - unset ac_cv_lib_resolv___dn_skipname - unset found - echo $ac_n "checking for dn_skipname in -lresolv""... $ac_c" 1>&6 --echo "configure:13352: checking for dn_skipname in -lresolv" >&5 -+echo "configure:13354: checking for dn_skipname in -lresolv" >&5 - ac_lib_var=`echo resolv'_'dn_skipname | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -13356,7 +13358,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lresolv $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13387,7 +13389,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __dn_skipname in -lresolv""... $ac_c" 1>&6 --echo "configure:13391: checking for __dn_skipname in -lresolv" >&5 -+echo "configure:13393: checking for __dn_skipname in -lresolv" >&5 - ac_lib_var=`echo resolv'_'__dn_skipname | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -13395,7 +13397,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lresolv $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13438,11 +13440,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:13448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -13484,7 +13486,7 @@ - unset ac_cv_lib_bind___dn_skipname - unset found - echo $ac_n "checking for dn_skipname in -lbind""... $ac_c" 1>&6 --echo "configure:13488: checking for dn_skipname in -lbind" >&5 -+echo "configure:13490: checking for dn_skipname in -lbind" >&5 - ac_lib_var=`echo bind'_'dn_skipname | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -13492,7 +13494,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lbind $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13523,7 +13525,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for __dn_skipname in -lbind""... $ac_c" 1>&6 --echo "configure:13527: checking for __dn_skipname in -lbind" >&5 -+echo "configure:13529: checking for __dn_skipname in -lbind" >&5 - ac_lib_var=`echo bind'_'__dn_skipname | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -13531,7 +13533,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lbind $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13574,11 +13576,11 @@ - found=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:13584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - found=yes - else -@@ -13630,12 +13632,12 @@ - - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 --echo "configure:13634: checking for ANSI C header files" >&5 -+echo "configure:13636: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -13643,7 +13645,7 @@ - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:13647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:13649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -13660,7 +13662,7 @@ - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -13678,7 +13680,7 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -13699,7 +13701,7 @@ - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -@@ -13710,7 +13712,7 @@ - exit (0); } - - EOF --if { (eval echo configure:13714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:13716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else -@@ -13738,12 +13740,12 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 --echo "configure:13742: checking for $ac_hdr that defines DIR" >&5 -+echo "configure:13744: checking for $ac_hdr that defines DIR" >&5 - if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include <$ac_hdr> -@@ -13751,7 +13753,7 @@ - DIR *dirp = 0; - ; return 0; } - EOF --if { (eval echo configure:13755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:13757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" - else -@@ -13776,7 +13778,7 @@ - # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. - if test $ac_header_dirent = dirent.h; then - echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 --echo "configure:13780: checking for opendir in -ldir" >&5 -+echo "configure:13782: checking for opendir in -ldir" >&5 - ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -13784,7 +13786,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldir $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13817,7 +13819,7 @@ - - else - echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 --echo "configure:13821: checking for opendir in -lx" >&5 -+echo "configure:13823: checking for opendir in -lx" >&5 - ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -13825,7 +13827,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lx $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:13842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -13861,16 +13863,16 @@ - - - echo $ac_n "checking for fclose declaration""... $ac_c" 1>&6 --echo "configure:13865: checking for fclose declaration" >&5 -+echo "configure:13867: checking for fclose declaration" >&5 - cat > conftest.$ac_ext < - int main() { - int (*func)() = fclose - ; return 0; } - EOF --if { (eval echo configure:13874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:13876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -13947,17 +13949,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:13951: checking for $ac_hdr" >&5 -+echo "configure:13953: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:13961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:13963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -13986,12 +13988,12 @@ - - - echo $ac_n "checking for fopencookie""... $ac_c" 1>&6 --echo "configure:13990: checking for fopencookie" >&5 -+echo "configure:13992: checking for fopencookie" >&5 - if eval "test \"`echo '$''{'ac_cv_func_fopencookie'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:14020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_fopencookie=yes" - else -@@ -14036,7 +14038,7 @@ - - if test "$have_glibc_fopencookie" = "yes" ; then - cat > conftest.$ac_ext < -@@ -14045,7 +14047,7 @@ - cookie_io_functions_t cookie; - ; return 0; } - EOF --if { (eval echo configure:14049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - have_cookie_io_functions_t=yes - else -@@ -14065,7 +14067,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:14103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - cookie_io_functions_use_off64_t=yes - else -@@ -14112,7 +14114,7 @@ - - else - cat > conftest.$ac_ext < -@@ -14121,7 +14123,7 @@ - _IO_cookie_io_functions_t cookie; - ; return 0; } - EOF --if { (eval echo configure:14125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - have_IO_cookie_io_functions_t=yes - else -@@ -14158,7 +14160,7 @@ - - - echo $ac_n "checking for broken getcwd""... $ac_c" 1>&6 --echo "configure:14162: checking for broken getcwd" >&5 -+echo "configure:14164: checking for broken getcwd" >&5 - os=`uname -sr 2>/dev/null` - case $os in - SunOS*) -@@ -14173,14 +14175,14 @@ - - - echo $ac_n "checking for broken libc stdio""... $ac_c" 1>&6 --echo "configure:14177: checking for broken libc stdio" >&5 -+echo "configure:14179: checking for broken libc stdio" >&5 - if eval "test \"`echo '$''{'have_broken_glibc_fopen_append'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - - if test "$cross_compiling" = yes; then - cat > conftest.$ac_ext < -@@ -14193,7 +14195,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:14197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - have_broken_glibc_fopen_append=yes - else -@@ -14206,7 +14208,7 @@ - - else - cat > conftest.$ac_ext < -@@ -14234,7 +14236,7 @@ - } - - EOF --if { (eval echo configure:14238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:14240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - have_broken_glibc_fopen_append=no - else -@@ -14262,12 +14264,12 @@ - - - echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 --echo "configure:14266: checking whether struct tm is in sys/time.h or time.h" >&5 -+echo "configure:14268: checking whether struct tm is in sys/time.h or time.h" >&5 - if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -14275,7 +14277,7 @@ - struct tm *tp; tp->tm_sec; - ; return 0; } - EOF --if { (eval echo configure:14279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm=time.h - else -@@ -14296,12 +14298,12 @@ - fi - - echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 --echo "configure:14300: checking for tm_zone in struct tm" >&5 -+echo "configure:14302: checking for tm_zone in struct tm" >&5 - if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include <$ac_cv_struct_tm> -@@ -14309,7 +14311,7 @@ - struct tm tm; tm.tm_zone; - ; return 0; } - EOF --if { (eval echo configure:14313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm_zone=yes - else -@@ -14329,12 +14331,12 @@ - - else - echo $ac_n "checking for tzname""... $ac_c" 1>&6 --echo "configure:14333: checking for tzname" >&5 -+echo "configure:14335: checking for tzname" >&5 - if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #ifndef tzname /* For SGI. */ -@@ -14344,7 +14346,7 @@ - atoi(*tzname); - ; return 0; } - EOF --if { (eval echo configure:14348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:14350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_var_tzname=yes - else -@@ -14368,12 +14370,12 @@ - - - echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 --echo "configure:14372: checking for tm_gmtoff in struct tm" >&5 -+echo "configure:14374: checking for tm_gmtoff in struct tm" >&5 - if eval "test \"`echo '$''{'ac_cv_struct_tm_gmtoff'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include <$ac_cv_struct_tm> -@@ -14381,7 +14383,7 @@ - struct tm tm; tm.tm_gmtoff; - ; return 0; } - EOF --if { (eval echo configure:14385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm_gmtoff=yes - else -@@ -14404,12 +14406,12 @@ - - - echo $ac_n "checking for struct flock""... $ac_c" 1>&6 --echo "configure:14408: checking for struct flock" >&5 -+echo "configure:14410: checking for struct flock" >&5 - if eval "test \"`echo '$''{'ac_cv_struct_flock'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < -@@ -14419,7 +14421,7 @@ - struct flock x; - ; return 0; } - EOF --if { (eval echo configure:14423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - ac_cv_struct_flock=yes -@@ -14446,12 +14448,12 @@ - - - echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 --echo "configure:14450: checking for socklen_t" >&5 -+echo "configure:14452: checking for socklen_t" >&5 - if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < -@@ -14463,7 +14465,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:14467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - ac_cv_socklen_t=yes -@@ -14489,7 +14491,7 @@ - - - echo $ac_n "checking size of long""... $ac_c" 1>&6 --echo "configure:14493: checking size of long" >&5 -+echo "configure:14495: checking size of long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -14497,9 +14499,10 @@ - ac_cv_sizeof_long=8 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -14508,7 +14511,7 @@ - exit(0); - } - EOF --if { (eval echo configure:14512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:14515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long=`cat conftestval` - else -@@ -14528,7 +14531,7 @@ - - - echo $ac_n "checking size of int""... $ac_c" 1>&6 --echo "configure:14532: checking size of int" >&5 -+echo "configure:14535: checking size of int" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -14536,9 +14539,10 @@ - ac_cv_sizeof_int=4 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -14547,7 +14551,7 @@ - exit(0); - } - EOF --if { (eval echo configure:14551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:14555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_int=`cat conftestval` - else -@@ -14568,12 +14572,12 @@ - - - echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 --echo "configure:14572: checking for st_blksize in struct stat" >&5 -+echo "configure:14576: checking for st_blksize in struct stat" >&5 - if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -14581,7 +14585,7 @@ - struct stat s; s.st_blksize; - ; return 0; } - EOF --if { (eval echo configure:14585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blksize=yes - else -@@ -14603,12 +14607,12 @@ - - if test "`uname -s 2>/dev/null`" != "QNX"; then - echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 --echo "configure:14607: checking for st_blocks in struct stat" >&5 -+echo "configure:14611: checking for st_blocks in struct stat" >&5 - if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -14616,7 +14620,7 @@ - struct stat s; s.st_blocks; - ; return 0; } - EOF --if { (eval echo configure:14620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blocks=yes - else -@@ -14643,12 +14647,12 @@ - WARNING_LEVEL=0 - fi - echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 --echo "configure:14647: checking for st_rdev in struct stat" >&5 -+echo "configure:14651: checking for st_rdev in struct stat" >&5 - if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -14656,7 +14660,7 @@ - struct stat s; s.st_rdev; - ; return 0; } - EOF --if { (eval echo configure:14660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_rdev=yes - else -@@ -14678,12 +14682,12 @@ - - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 --echo "configure:14682: checking for size_t" >&5 -+echo "configure:14686: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -14711,12 +14715,12 @@ - fi - - echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 --echo "configure:14715: checking for uid_t in sys/types.h" >&5 -+echo "configure:14719: checking for uid_t in sys/types.h" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF -@@ -14746,12 +14750,12 @@ - - - echo $ac_n "checking for struct sockaddr_storage""... $ac_c" 1>&6 --echo "configure:14750: checking for struct sockaddr_storage" >&5 -+echo "configure:14754: checking for struct sockaddr_storage" >&5 - if eval "test \"`echo '$''{'ac_cv_sockaddr_storage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -14759,7 +14763,7 @@ - struct sockaddr_storage s; s - ; return 0; } - EOF --if { (eval echo configure:14763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sockaddr_storage=yes - else -@@ -14781,7 +14785,7 @@ - - - cat > conftest.$ac_ext < -@@ -14791,7 +14795,7 @@ - static struct sockaddr sa; int n = (int) sa.sa_len; return n - ; return 0; } - EOF --if { (eval echo configure:14795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:14799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - cat >> confdefs.h <<\EOF - #define HAVE_SOCKADDR_LEN 1 -@@ -14804,12 +14808,12 @@ - rm -f conftest* - - echo $ac_n "checking for IPv6 support""... $ac_c" 1>&6 --echo "configure:14808: checking for IPv6 support" >&5 -+echo "configure:14812: checking for IPv6 support" >&5 - if eval "test \"`echo '$''{'ac_cv_ipv6_support'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -14818,7 +14822,7 @@ - struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0; - ; return 0; } - EOF --if { (eval echo configure:14822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:14826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_ipv6_support=yes - else -@@ -14836,12 +14840,12 @@ - - - echo $ac_n "checking for vprintf""... $ac_c" 1>&6 --echo "configure:14840: checking for vprintf" >&5 -+echo "configure:14844: checking for vprintf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:14872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vprintf=yes" - else -@@ -14888,12 +14892,12 @@ - - if test "$ac_cv_func_vprintf" != yes; then - echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 --echo "configure:14892: checking for _doprnt" >&5 -+echo "configure:14896: checking for _doprnt" >&5 - if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:14924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func__doprnt=yes" - else -@@ -15008,12 +15012,12 @@ - - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:15012: checking for $ac_func" >&5 -+echo "configure:15016: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:15044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -15062,25 +15066,25 @@ - - - echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 --echo "configure:15066: checking for getaddrinfo" >&5 -+echo "configure:15070: checking for getaddrinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - int main() { - struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g); - ; return 0; } - EOF --if { (eval echo configure:15078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:15082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -15120,7 +15124,7 @@ - } - - EOF --if { (eval echo configure:15124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:15128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_func_getaddrinfo=yes - else -@@ -15152,12 +15156,12 @@ - for ac_func in strlcat strlcpy getopt - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:15156: checking for $ac_func" >&5 -+echo "configure:15160: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:15188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -15207,7 +15211,7 @@ - - - echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 --echo "configure:15211: checking whether utime accepts a null argument" >&5 -+echo "configure:15215: checking whether utime accepts a null argument" >&5 - if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -15217,7 +15221,7 @@ - ac_cv_func_utime_null=no - else - cat > conftest.$ac_ext < - #include -@@ -15228,7 +15232,7 @@ - && t.st_mtime - s.st_mtime < 120)); - } - EOF --if { (eval echo configure:15232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:15236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_func_utime_null=yes - else -@@ -15254,19 +15258,19 @@ - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works - # for constant arguments. Useless! - echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 --echo "configure:15258: checking for working alloca.h" >&5 -+echo "configure:15262: checking for working alloca.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - int main() { - char *p = alloca(2 * sizeof(int)); - ; return 0; } - EOF --if { (eval echo configure:15270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:15274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_header_alloca_h=yes - else -@@ -15287,12 +15291,12 @@ - fi - - echo $ac_n "checking for alloca""... $ac_c" 1>&6 --echo "configure:15291: checking for alloca" >&5 -+echo "configure:15295: checking for alloca" >&5 - if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:15328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_alloca_works=yes - else -@@ -15352,12 +15356,12 @@ - - - echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 --echo "configure:15356: checking whether alloca needs Cray hooks" >&5 -+echo "configure:15360: checking whether alloca needs Cray hooks" >&5 - if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 --echo "configure:15386: checking for $ac_func" >&5 -+echo "configure:15390: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:15418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -15437,7 +15441,7 @@ - fi - - echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 --echo "configure:15441: checking stack direction for C alloca" >&5 -+echo "configure:15445: checking stack direction for C alloca" >&5 - if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -15445,7 +15449,7 @@ - ac_cv_c_stack_direction=0 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:15472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_stack_direction=1 - else -@@ -15487,13 +15491,13 @@ - - - echo $ac_n "checking for declared timezone""... $ac_c" 1>&6 --echo "configure:15491: checking for declared timezone" >&5 -+echo "configure:15495: checking for declared timezone" >&5 - if eval "test \"`echo '$''{'ac_cv_declared_timezone'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - - cat > conftest.$ac_ext < -@@ -15508,7 +15512,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:15512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:15516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - ac_cv_declared_timezone=yes -@@ -15534,7 +15538,7 @@ - - - echo $ac_n "checking for type of reentrant time-related functions""... $ac_c" 1>&6 --echo "configure:15538: checking for type of reentrant time-related functions" >&5 -+echo "configure:15542: checking for type of reentrant time-related functions" >&5 - if eval "test \"`echo '$''{'ac_cv_time_r_type'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -15545,7 +15549,7 @@ - - else - cat > conftest.$ac_ext < -@@ -15563,7 +15567,7 @@ - } - - EOF --if { (eval echo configure:15567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:15571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_time_r_type=hpux -@@ -15577,7 +15581,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -15593,7 +15597,7 @@ - } - - EOF --if { (eval echo configure:15597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:15601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_time_r_type=irix -@@ -15631,12 +15635,12 @@ - - - echo $ac_n "checking for readdir_r""... $ac_c" 1>&6 --echo "configure:15635: checking for readdir_r" >&5 -+echo "configure:15639: checking for readdir_r" >&5 - if eval "test \"`echo '$''{'ac_cv_func_readdir_r'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:15667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_readdir_r=yes" - else -@@ -15681,7 +15685,7 @@ - - if test "$ac_cv_func_readdir_r" = "yes"; then - echo $ac_n "checking for type of readdir_r""... $ac_c" 1>&6 --echo "configure:15685: checking for type of readdir_r" >&5 -+echo "configure:15689: checking for type of readdir_r" >&5 - if eval "test \"`echo '$''{'ac_cv_what_readdir_r'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -15692,7 +15696,7 @@ - - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:15725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_what_readdir_r=POSIX -@@ -15728,7 +15732,7 @@ - rm -fr conftest* - - cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:15746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -15783,7 +15787,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -15835,7 +15839,7 @@ - - - echo $ac_n "checking whether to include debugging symbols""... $ac_c" 1>&6 --echo "configure:15839: checking whether to include debugging symbols" >&5 -+echo "configure:15843: checking whether to include debugging symbols" >&5 - # Check whether --enable-debug or --disable-debug was given. - if test "${enable_debug+set}" = set; then - enableval="$enable_debug" -@@ -15868,7 +15872,7 @@ - - - echo $ac_n "checking layout of installed files""... $ac_c" 1>&6 --echo "configure:15872: checking layout of installed files" >&5 -+echo "configure:15876: checking layout of installed files" >&5 - # Check whether --with-layout or --without-layout was given. - if test "${with_layout+set}" = set; then - withval="$with_layout" -@@ -15902,7 +15906,7 @@ - - - echo $ac_n "checking path to configuration file""... $ac_c" 1>&6 --echo "configure:15906: checking path to configuration file" >&5 -+echo "configure:15910: checking path to configuration file" >&5 - # Check whether --with-config-file-path or --without-config-file-path was given. - if test "${with_config_file_path+set}" = set; then - withval="$with_config_file_path" -@@ -15938,7 +15942,7 @@ - - - echo $ac_n "checking directory to be scanned for configuration files""... $ac_c" 1>&6 --echo "configure:15942: checking directory to be scanned for configuration files" >&5 -+echo "configure:15946: checking directory to be scanned for configuration files" >&5 - # Check whether --with-config-file-scan-dir or --without-config-file-scan-dir was given. - if test "${with_config_file_scan_dir+set}" = set; then - withval="$with_config_file_scan_dir" -@@ -15968,7 +15972,7 @@ - - - echo $ac_n "checking whether to enable safe mode by default""... $ac_c" 1>&6 --echo "configure:15972: checking whether to enable safe mode by default" >&5 -+echo "configure:15976: checking whether to enable safe mode by default" >&5 - # Check whether --enable-safe-mode or --disable-safe-mode was given. - if test "${enable_safe_mode+set}" = set; then - enableval="$enable_safe_mode" -@@ -16003,7 +16007,7 @@ - fi - - echo $ac_n "checking for safe mode exec dir""... $ac_c" 1>&6 --echo "configure:16007: checking for safe mode exec dir" >&5 -+echo "configure:16011: checking for safe mode exec dir" >&5 - # Check whether --with-exec-dir or --without-exec-dir was given. - if test "${with_exec_dir+set}" = set; then - withval="$with_exec_dir" -@@ -16044,7 +16048,7 @@ - - - echo $ac_n "checking whether to enable PHP's own SIGCHLD handler""... $ac_c" 1>&6 --echo "configure:16048: checking whether to enable PHP's own SIGCHLD handler" >&5 -+echo "configure:16052: checking whether to enable PHP's own SIGCHLD handler" >&5 - # Check whether --enable-sigchild or --disable-sigchild was given. - if test "${enable_sigchild+set}" = set; then - enableval="$enable_sigchild" -@@ -16081,7 +16085,7 @@ - - - echo $ac_n "checking whether to enable magic quotes by default""... $ac_c" 1>&6 --echo "configure:16085: checking whether to enable magic quotes by default" >&5 -+echo "configure:16089: checking whether to enable magic quotes by default" >&5 - # Check whether --enable-magic-quotes or --disable-magic-quotes was given. - if test "${enable_magic_quotes+set}" = set; then - enableval="$enable_magic_quotes" -@@ -16118,7 +16122,7 @@ - - - echo $ac_n "checking whether to enable runpaths""... $ac_c" 1>&6 --echo "configure:16122: checking whether to enable runpaths" >&5 -+echo "configure:16126: checking whether to enable runpaths" >&5 - # Check whether --enable-rpath or --disable-rpath was given. - if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" -@@ -16143,7 +16147,7 @@ - - - echo $ac_n "checking whether to explicitly link against libgcc""... $ac_c" 1>&6 --echo "configure:16147: checking whether to explicitly link against libgcc" >&5 -+echo "configure:16151: checking whether to explicitly link against libgcc" >&5 - # Check whether --enable-libgcc or --disable-libgcc was given. - if test "${enable_libgcc+set}" = set; then - enableval="$enable_libgcc" -@@ -16222,7 +16226,7 @@ - - - echo $ac_n "checking whether to enable short tags by default""... $ac_c" 1>&6 --echo "configure:16226: checking whether to enable short tags by default" >&5 -+echo "configure:16230: checking whether to enable short tags by default" >&5 - # Check whether --enable-short-tags or --disable-short-tags was given. - if test "${enable_short_tags+set}" = set; then - enableval="$enable_short_tags" -@@ -16259,7 +16263,7 @@ - - - echo $ac_n "checking whether to enable dmalloc""... $ac_c" 1>&6 --echo "configure:16263: checking whether to enable dmalloc" >&5 -+echo "configure:16267: checking whether to enable dmalloc" >&5 - # Check whether --enable-dmalloc or --disable-dmalloc was given. - if test "${enable_dmalloc+set}" = set; then - enableval="$enable_dmalloc" -@@ -16284,7 +16288,7 @@ - if test "$PHP_DMALLOC" = "yes"; then - - echo $ac_n "checking for dmalloc_error in -ldmalloc""... $ac_c" 1>&6 --echo "configure:16288: checking for dmalloc_error in -ldmalloc" >&5 -+echo "configure:16292: checking for dmalloc_error in -ldmalloc" >&5 - ac_lib_var=`echo dmalloc'_'dmalloc_error | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -16292,7 +16296,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldmalloc $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:16311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -16347,7 +16351,7 @@ - - - echo $ac_n "checking whether to enable IPv6 support""... $ac_c" 1>&6 --echo "configure:16351: checking whether to enable IPv6 support" >&5 -+echo "configure:16355: checking whether to enable IPv6 support" >&5 - # Check whether --enable-ipv6 or --disable-ipv6 was given. - if test "${enable_ipv6+set}" = set; then - enableval="$enable_ipv6" -@@ -16377,7 +16381,7 @@ - fi - - echo $ac_n "checking whether to enable versioning""... $ac_c" 1>&6 --echo "configure:16381: checking whether to enable versioning" >&5 -+echo "configure:16385: checking whether to enable versioning" >&5 - # Check whether --enable-versioning or --disable-versioning was given. - if test "${enable_versioning+set}" = set; then - enableval="$enable_versioning" -@@ -16429,7 +16433,7 @@ - - - echo $ac_n "checking for OpenSSL support""... $ac_c" 1>&6 --echo "configure:16433: checking for OpenSSL support" >&5 -+echo "configure:16437: checking for OpenSSL support" >&5 - # Check whether --with-openssl or --without-openssl was given. - if test "${with_openssl+set}" = set; then - withval="$with_openssl" -@@ -16475,7 +16479,7 @@ - - - echo $ac_n "checking for Kerberos support""... $ac_c" 1>&6 --echo "configure:16479: checking for Kerberos support" >&5 -+echo "configure:16483: checking for Kerberos support" >&5 - # Check whether --with-kerberos or --without-kerberos was given. - if test "${with_kerberos+set}" = set; then - withval="$with_kerberos" -@@ -16733,7 +16737,7 @@ - # Extract the first word of "krb5-config", so it can be a program name with args. - set dummy krb5-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:16737: checking for $ac_word" >&5 -+echo "configure:16741: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -17089,7 +17093,7 @@ - # Extract the first word of "pkg-config", so it can be a program name with args. - set dummy pkg-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:17093: checking for $ac_word" >&5 -+echo "configure:17097: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -17277,9 +17281,9 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$OPENSSL_INCDIR - echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 --echo "configure:17281: checking for OpenSSL version" >&5 -+echo "configure:17285: checking for OpenSSL version" >&5 - cat > conftest.$ac_ext < -@@ -17417,7 +17421,7 @@ - done - - echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 --echo "configure:17421: checking for CRYPTO_free in -lcrypto" >&5 -+echo "configure:17425: checking for CRYPTO_free in -lcrypto" >&5 - ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -17425,7 +17429,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcrypto $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:17444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -17576,7 +17580,7 @@ - done - - echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 --echo "configure:17580: checking for SSL_CTX_set_ssl_version in -lssl" >&5 -+echo "configure:17584: checking for SSL_CTX_set_ssl_version in -lssl" >&5 - ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -17584,7 +17588,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lssl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:17603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -17721,7 +17725,7 @@ - - - echo $ac_n "checking for ZLIB support""... $ac_c" 1>&6 --echo "configure:17725: checking for ZLIB support" >&5 -+echo "configure:17729: checking for ZLIB support" >&5 - # Check whether --with-zlib or --without-zlib was given. - if test "${with_zlib+set}" = set; then - withval="$with_zlib" -@@ -17767,7 +17771,7 @@ - - - echo $ac_n "checking if the location of ZLIB install directory is defined""... $ac_c" 1>&6 --echo "configure:17771: checking if the location of ZLIB install directory is defined" >&5 -+echo "configure:17775: checking if the location of ZLIB install directory is defined" >&5 - # Check whether --with-zlib-dir or --without-zlib-dir was given. - if test "${with_zlib_dir+set}" = set; then - withval="$with_zlib_dir" -@@ -18120,7 +18124,7 @@ - done - - echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6 --echo "configure:18124: checking for gzgets in -lz" >&5 -+echo "configure:18128: checking for gzgets in -lz" >&5 - ac_lib_var=`echo z'_'gzgets | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -18128,7 +18132,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lz $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:18147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -18277,7 +18281,7 @@ - - - echo $ac_n "checking whether to enable bc style precision math functions""... $ac_c" 1>&6 --echo "configure:18281: checking whether to enable bc style precision math functions" >&5 -+echo "configure:18285: checking whether to enable bc style precision math functions" >&5 - # Check whether --enable-bcmath or --disable-bcmath was given. - if test "${enable_bcmath+set}" = set; then - enableval="$enable_bcmath" -@@ -18571,7 +18575,7 @@ - - - echo $ac_n "checking for BZip2 support""... $ac_c" 1>&6 --echo "configure:18575: checking for BZip2 support" >&5 -+echo "configure:18579: checking for BZip2 support" >&5 - # Check whether --with-bz2 or --without-bz2 was given. - if test "${with_bz2+set}" = set; then - withval="$with_bz2" -@@ -18619,7 +18623,7 @@ - BZIP_DIR=$PHP_BZ2 - else - echo $ac_n "checking for BZip2 in default path""... $ac_c" 1>&6 --echo "configure:18623: checking for BZip2 in default path" >&5 -+echo "configure:18627: checking for BZip2 in default path" >&5 - for i in /usr/local /usr; do - if test -r $i/include/bzlib.h; then - BZIP_DIR=$i -@@ -18715,7 +18719,7 @@ - done - - echo $ac_n "checking for BZ2_bzerror in -lbz2""... $ac_c" 1>&6 --echo "configure:18719: checking for BZ2_bzerror in -lbz2" >&5 -+echo "configure:18723: checking for BZ2_bzerror in -lbz2" >&5 - ac_lib_var=`echo bz2'_'BZ2_bzerror | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -18723,7 +18727,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lbz2 $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:18742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -19129,7 +19133,7 @@ - - - echo $ac_n "checking whether to enable calendar conversion support""... $ac_c" 1>&6 --echo "configure:19133: checking whether to enable calendar conversion support" >&5 -+echo "configure:19137: checking whether to enable calendar conversion support" >&5 - # Check whether --enable-calendar or --disable-calendar was given. - if test "${enable_calendar+set}" = set; then - enableval="$enable_calendar" -@@ -19408,7 +19412,7 @@ - - - echo $ac_n "checking for cpdflib support""... $ac_c" 1>&6 --echo "configure:19412: checking for cpdflib support" >&5 -+echo "configure:19416: checking for cpdflib support" >&5 - # Check whether --with-cpdflib or --without-cpdflib was given. - if test "${with_cpdflib+set}" = set; then - withval="$with_cpdflib" -@@ -19771,7 +19775,7 @@ - done - - echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 --echo "configure:19775: checking for jpeg_read_header in -ljpeg" >&5 -+echo "configure:19779: checking for jpeg_read_header in -ljpeg" >&5 - ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -19779,7 +19783,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ljpeg $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:19798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -20018,7 +20022,7 @@ - done - - echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6 --echo "configure:20022: checking for TIFFOpen in -ltiff" >&5 -+echo "configure:20026: checking for TIFFOpen in -ltiff" >&5 - ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -20026,7 +20030,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ltiff $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:20045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -20256,7 +20260,7 @@ - done - - echo $ac_n "checking for cpdf_open in -lcpdf""... $ac_c" 1>&6 --echo "configure:20260: checking for cpdf_open in -lcpdf" >&5 -+echo "configure:20264: checking for cpdf_open in -lcpdf" >&5 - ac_lib_var=`echo cpdf'_'cpdf_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -20264,7 +20268,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcpdf $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:20283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -20385,7 +20389,7 @@ - done - - echo $ac_n "checking for cpdf_open in -lcpdfm""... $ac_c" 1>&6 --echo "configure:20389: checking for cpdf_open in -lcpdfm" >&5 -+echo "configure:20393: checking for cpdf_open in -lcpdfm" >&5 - ac_lib_var=`echo cpdfm'_'cpdf_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -20393,7 +20397,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcpdfm $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:20412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -20587,7 +20591,7 @@ - - - echo $ac_n "checking for CRACKlib support""... $ac_c" 1>&6 --echo "configure:20591: checking for CRACKlib support" >&5 -+echo "configure:20595: checking for CRACKlib support" >&5 - # Check whether --with-crack or --without-crack was given. - if test "${with_crack+set}" = set; then - withval="$with_crack" -@@ -21011,7 +21015,7 @@ - - - echo $ac_n "checking whether to enable ctype functions""... $ac_c" 1>&6 --echo "configure:21015: checking whether to enable ctype functions" >&5 -+echo "configure:21019: checking whether to enable ctype functions" >&5 - # Check whether --enable-ctype or --disable-ctype was given. - if test "${enable_ctype+set}" = set; then - enableval="$enable_ctype" -@@ -21286,7 +21290,7 @@ - - - echo $ac_n "checking for CURL support""... $ac_c" 1>&6 --echo "configure:21290: checking for CURL support" >&5 -+echo "configure:21294: checking for CURL support" >&5 - # Check whether --with-curl or --without-curl was given. - if test "${with_curl+set}" = set; then - withval="$with_curl" -@@ -21335,7 +21339,7 @@ - CURL_DIR=$PHP_CURL - else - echo $ac_n "checking for CURL in default path""... $ac_c" 1>&6 --echo "configure:21339: checking for CURL in default path" >&5 -+echo "configure:21343: checking for CURL in default path" >&5 - for i in /usr/local /usr; do - if test -r $i/include/curl/easy.h; then - CURL_DIR=$i -@@ -21353,7 +21357,7 @@ - - CURL_CONFIG="curl-config" - echo $ac_n "checking for cURL 7.9.8 or greater""... $ac_c" 1>&6 --echo "configure:21357: checking for cURL 7.9.8 or greater" >&5 -+echo "configure:21361: checking for cURL 7.9.8 or greater" >&5 - - if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then - CURL_CONFIG=${CURL_DIR}/bin/curl-config -@@ -21653,7 +21657,7 @@ - done - - echo $ac_n "checking for curl_easy_perform in -lcurl""... $ac_c" 1>&6 --echo "configure:21657: checking for curl_easy_perform in -lcurl" >&5 -+echo "configure:21661: checking for curl_easy_perform in -lcurl" >&5 - ac_lib_var=`echo curl'_'curl_easy_perform | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -21661,7 +21665,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcurl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:21680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -21791,7 +21795,7 @@ - done - - echo $ac_n "checking for curl_version_info in -lcurl""... $ac_c" 1>&6 --echo "configure:21795: checking for curl_version_info in -lcurl" >&5 -+echo "configure:21799: checking for curl_version_info in -lcurl" >&5 - ac_lib_var=`echo curl'_'curl_version_info | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -21799,7 +21803,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcurl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:21818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -22077,7 +22081,7 @@ - - - echo $ac_n "checking for cyrus imap support""... $ac_c" 1>&6 --echo "configure:22081: checking for cyrus imap support" >&5 -+echo "configure:22085: checking for cyrus imap support" >&5 - # Check whether --with-cyrus or --without-cyrus was given. - if test "${with_cyrus+set}" = set; then - withval="$with_cyrus" -@@ -22263,7 +22267,7 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$CYRUS_INCPATH - cat > conftest.$ac_ext < - #include -@@ -22271,7 +22275,7 @@ - imclient_connect(0,0,0,0) - ; return 0; } - EOF --if { (eval echo configure:22275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:22279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : - else - echo "configure: failed program was:" >&5 -@@ -23002,7 +23006,7 @@ - - - echo $ac_n "checking for xDBM support""... $ac_c" 1>&6 --echo "configure:23006: checking for xDBM support" >&5 -+echo "configure:23010: checking for xDBM support" >&5 - # Check whether --with-db or --without-db was given. - if test "${with_db+set}" = set; then - withval="$with_db" -@@ -23049,7 +23053,7 @@ - - - echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 --echo "configure:23053: checking for gdbm_open in -lgdbm" >&5 -+echo "configure:23057: checking for gdbm_open in -lgdbm" >&5 - ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -23057,7 +23061,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgdbm $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:23076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -23090,7 +23094,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dbm_open in -lc""... $ac_c" 1>&6 --echo "configure:23094: checking for dbm_open in -lc" >&5 -+echo "configure:23098: checking for dbm_open in -lc" >&5 - ac_lib_var=`echo c'_'dbm_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -23098,7 +23102,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lc $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:23117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -23131,7 +23135,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 --echo "configure:23135: checking for dbm_open in -ldbm" >&5 -+echo "configure:23139: checking for dbm_open in -ldbm" >&5 - ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -23139,7 +23143,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldbm $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:23158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -23172,7 +23176,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dbm_open in -ldb""... $ac_c" 1>&6 --echo "configure:23176: checking for dbm_open in -ldb" >&5 -+echo "configure:23180: checking for dbm_open in -ldb" >&5 - ac_lib_var=`echo db'_'dbm_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -23180,7 +23184,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldb $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:23199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -23225,7 +23229,7 @@ - fi - - echo $ac_n "checking preferred dbm library""... $ac_c" 1>&6 --echo "configure:23229: checking preferred dbm library" >&5 -+echo "configure:23233: checking preferred dbm library" >&5 - if test "a$DBM_TYPE" = a; then - echo "$ac_t""none found" 1>&6 - echo "configure: warning: No dbm library found - using built-in flatfile support" 1>&2 -@@ -23243,17 +23247,17 @@ - if test "$DBM_LIB" = "-lgdbm"; then - ac_safe=`echo "gdbm.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for gdbm.h""... $ac_c" 1>&6 --echo "configure:23247: checking for gdbm.h" >&5 -+echo "configure:23251: checking for gdbm.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:23257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:23261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -23276,17 +23280,17 @@ - echo "$ac_t"""Try /usr/local/include/gdbm.h"" 1>&6; - ac_safe=`echo "/usr/local/include/gdbm.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for /usr/local/include/gdbm.h""... $ac_c" 1>&6 --echo "configure:23280: checking for /usr/local/include/gdbm.h" >&5 -+echo "configure:23284: checking for /usr/local/include/gdbm.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:23290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:23294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -23309,17 +23313,17 @@ - echo "$ac_t"""Try /opt/local/include/gdbm.h"" 1>&6; - ac_safe=`echo "/opt/local/include/gdbm.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for /opt/local/include/gdbm.h""... $ac_c" 1>&6 --echo "configure:23313: checking for /opt/local/include/gdbm.h" >&5 -+echo "configure:23317: checking for /opt/local/include/gdbm.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:23323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:23327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -23342,17 +23346,17 @@ - echo "$ac_t"""Try /usr/pkg/include/gdbm.h"" 1>&6; - ac_safe=`echo "/usr/pkg/include/gdbm.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for /usr/pkg/include/gdbm.h""... $ac_c" 1>&6 --echo "configure:23346: checking for /usr/pkg/include/gdbm.h" >&5 -+echo "configure:23350: checking for /usr/pkg/include/gdbm.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:23356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:23360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -23633,7 +23637,7 @@ - - - echo $ac_n "checking whether to enable DBA""... $ac_c" 1>&6 --echo "configure:23637: checking whether to enable DBA" >&5 -+echo "configure:23641: checking whether to enable DBA" >&5 - # Check whether --enable-dba or --disable-dba was given. - if test "${enable_dba+set}" = set; then - enableval="$enable_dba" -@@ -23772,7 +23776,7 @@ - done - - echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 --echo "configure:23776: checking for gdbm_open in -lgdbm" >&5 -+echo "configure:23780: checking for gdbm_open in -lgdbm" >&5 - ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -23780,7 +23784,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgdbm $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:23799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -23958,7 +23962,7 @@ - THIS_FULL_NAME="$THIS_NAME" - fi - echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 --echo "configure:23962: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:23966: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -24073,7 +24077,7 @@ - done - - echo $ac_n "checking for dbm_open in -l$LIB""... $ac_c" 1>&6 --echo "configure:24077: checking for dbm_open in -l$LIB" >&5 -+echo "configure:24081: checking for dbm_open in -l$LIB" >&5 - ac_lib_var=`echo $LIB'_'dbm_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -24081,7 +24085,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$LIB $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:24100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -24263,7 +24267,7 @@ - THIS_FULL_NAME="$THIS_NAME" - fi - echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 --echo "configure:24267: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:24271: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -24320,7 +24324,7 @@ - LIBS="-l$LIB $LIBS" - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:24339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat > conftest.$ac_ext <&6 --echo "configure:24372: checking for db4 major version" >&5 -+echo "configure:24376: checking for db4 major version" >&5 - { echo "configure: error: Header contains different version" 1>&2; exit 1; } - fi - if test "4" = "4"; then - echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6 --echo "configure:24377: checking for db4 minor version and patch level" >&5 -+echo "configure:24381: checking for db4 minor version and patch level" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:24405: checking if dba can be used as shared extension" >&5 -+echo "configure:24409: checking if dba can be used as shared extension" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:24569: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:24573: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -24596,7 +24600,7 @@ - THIS_FULL_NAME="$THIS_NAME" - fi - echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 --echo "configure:24600: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:24604: checking for $THIS_FULL_NAME support" >&5 - if test -n "You cannot combine --with-db3 with --with-db4"; then - { echo "configure: error: You cannot combine --with-db3 with --with-db4" 1>&2; exit 1; } - fi -@@ -24643,7 +24647,7 @@ - LIBS="-l$LIB $LIBS" - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:24662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat > conftest.$ac_ext <&6 --echo "configure:24695: checking for db3 major version" >&5 -+echo "configure:24699: checking for db3 major version" >&5 - { echo "configure: error: Header contains different version" 1>&2; exit 1; } - fi - if test "3" = "4"; then - echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6 --echo "configure:24700: checking for db4 minor version and patch level" >&5 -+echo "configure:24704: checking for db4 minor version and patch level" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:24728: checking if dba can be used as shared extension" >&5 -+echo "configure:24732: checking if dba can be used as shared extension" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:24892: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:24896: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -24919,7 +24923,7 @@ - THIS_FULL_NAME="$THIS_NAME" - fi - echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 --echo "configure:24923: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:24927: checking for $THIS_FULL_NAME support" >&5 - if test -n "You cannot combine --with-db2 with --with-db3 or --with-db4"; then - { echo "configure: error: You cannot combine --with-db2 with --with-db3 or --with-db4" 1>&2; exit 1; } - fi -@@ -24966,7 +24970,7 @@ - LIBS="-l$LIB $LIBS" - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:24985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - cat > conftest.$ac_ext <&6 --echo "configure:25018: checking for db2 major version" >&5 -+echo "configure:25022: checking for db2 major version" >&5 - { echo "configure: error: Header contains different version" 1>&2; exit 1; } - fi - if test "2" = "4"; then - echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6 --echo "configure:25023: checking for db4 minor version and patch level" >&5 -+echo "configure:25027: checking for db4 minor version and patch level" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:25051: checking if dba can be used as shared extension" >&5 -+echo "configure:25055: checking if dba can be used as shared extension" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:25215: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:25219: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -25326,7 +25330,7 @@ - done - - echo $ac_n "checking for dbminit in -l$LIB""... $ac_c" 1>&6 --echo "configure:25330: checking for dbminit in -l$LIB" >&5 -+echo "configure:25334: checking for dbminit in -l$LIB" >&5 - ac_lib_var=`echo $LIB'_'dbminit | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -25334,7 +25338,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$LIB $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:25353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -25365,7 +25369,7 @@ - ext_shared=$save_ext_shared - - echo $ac_n "checking for DBM using GDBM""... $ac_c" 1>&6 --echo "configure:25369: checking for DBM using GDBM" >&5 -+echo "configure:25373: checking for DBM using GDBM" >&5 - cat >> confdefs.h <&6 --echo "configure:25535: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:25539: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -25661,7 +25665,7 @@ - done - - echo $ac_n "checking for cdb_read in -l$LIB""... $ac_c" 1>&6 --echo "configure:25665: checking for cdb_read in -l$LIB" >&5 -+echo "configure:25669: checking for cdb_read in -l$LIB" >&5 - ac_lib_var=`echo $LIB'_'cdb_read | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -25669,7 +25673,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$LIB $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:25688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -25872,7 +25876,7 @@ - THIS_FULL_NAME="$THIS_NAME" - fi - echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 --echo "configure:25876: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:25880: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -25926,7 +25930,7 @@ - THIS_FULL_NAME="$THIS_NAME" - fi - echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 --echo "configure:25930: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:25934: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -25980,7 +25984,7 @@ - THIS_FULL_NAME="$THIS_NAME" - fi - echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 --echo "configure:25984: checking for $THIS_FULL_NAME support" >&5 -+echo "configure:25988: checking for $THIS_FULL_NAME support" >&5 - if test -n ""; then - { echo "configure: error: " 1>&2; exit 1; } - fi -@@ -25995,7 +25999,7 @@ - - - echo $ac_n "checking whether to enable DBA interface""... $ac_c" 1>&6 --echo "configure:25999: checking whether to enable DBA interface" >&5 -+echo "configure:26003: checking whether to enable DBA interface" >&5 - if test "$HAVE_DBA" = "1"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -@@ -26250,7 +26254,7 @@ - - - echo $ac_n "checking whether to enable dbase support""... $ac_c" 1>&6 --echo "configure:26254: checking whether to enable dbase support" >&5 -+echo "configure:26258: checking whether to enable dbase support" >&5 - # Check whether --enable-dbase or --disable-dbase was given. - if test "${enable_dbase+set}" = set; then - enableval="$enable_dbase" -@@ -26525,7 +26529,7 @@ - - - echo $ac_n "checking whether to enable dbx support""... $ac_c" 1>&6 --echo "configure:26529: checking whether to enable dbx support" >&5 -+echo "configure:26533: checking whether to enable dbx support" >&5 - # Check whether --enable-dbx or --disable-dbx was given. - if test "${enable_dbx+set}" = set; then - enableval="$enable_dbx" -@@ -26796,7 +26800,7 @@ - - - echo $ac_n "checking whether to enable direct I/O support""... $ac_c" 1>&6 --echo "configure:26800: checking whether to enable direct I/O support" >&5 -+echo "configure:26804: checking whether to enable direct I/O support" >&5 - # Check whether --enable-dio or --disable-dio was given. - if test "${enable_dio+set}" = set; then - enableval="$enable_dio" -@@ -27069,7 +27073,7 @@ - - - echo $ac_n "checking for DOM support""... $ac_c" 1>&6 --echo "configure:27073: checking for DOM support" >&5 -+echo "configure:27077: checking for DOM support" >&5 - # Check whether --with-dom or --without-dom was given. - if test "${with_dom+set}" = set; then - withval="$with_dom" -@@ -27116,7 +27120,7 @@ - - - echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 --echo "configure:27120: checking for the location of libz" >&5 -+echo "configure:27124: checking for the location of libz" >&5 - # Check whether --with-zlib-dir or --without-zlib-dir was given. - if test "${with_zlib_dir+set}" = set; then - withval="$with_zlib_dir" -@@ -27163,9 +27167,9 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$DOMXML_DIR/include$DOMXML_DIR_ADD - echo $ac_n "checking for libxml version""... $ac_c" 1>&6 --echo "configure:27167: checking for libxml version" >&5 -+echo "configure:27171: checking for libxml version" >&5 - cat > conftest.$ac_ext < -@@ -27742,7 +27746,7 @@ - - - echo $ac_n "checking for DOM XSLT support""... $ac_c" 1>&6 --echo "configure:27746: checking for DOM XSLT support" >&5 -+echo "configure:27750: checking for DOM XSLT support" >&5 - # Check whether --with-dom-xslt or --without-dom-xslt was given. - if test "${with_dom_xslt+set}" = set; then - withval="$with_dom_xslt" -@@ -27767,7 +27771,7 @@ - - - echo $ac_n "checking for DOM EXSLT support""... $ac_c" 1>&6 --echo "configure:27771: checking for DOM EXSLT support" >&5 -+echo "configure:27775: checking for DOM EXSLT support" >&5 - # Check whether --with-dom-exslt or --without-dom-exslt was given. - if test "${with_dom_exslt+set}" = set; then - withval="$with_dom_exslt" -@@ -27808,9 +27812,9 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$DOMXSLT_DIR/include - echo $ac_n "checking for libxslt version""... $ac_c" 1>&6 --echo "configure:27812: checking for libxslt version" >&5 -+echo "configure:27816: checking for libxslt version" >&5 - cat > conftest.$ac_ext < -@@ -28238,9 +28242,9 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$DOMEXSLT_DIR/include - echo $ac_n "checking for libexslt version""... $ac_c" 1>&6 --echo "configure:28242: checking for libexslt version" >&5 -+echo "configure:28246: checking for libexslt version" >&5 - cat > conftest.$ac_ext < -@@ -28410,7 +28414,7 @@ - - - echo $ac_n "checking whether to enable EXIF (metadata from images) support""... $ac_c" 1>&6 --echo "configure:28414: checking whether to enable EXIF (metadata from images) support" >&5 -+echo "configure:28418: checking whether to enable EXIF (metadata from images) support" >&5 - # Check whether --enable-exif or --disable-exif was given. - if test "${enable_exif+set}" = set; then - enableval="$enable_exif" -@@ -28685,7 +28689,7 @@ - - - echo $ac_n "checking for FrontBase SQL92 (fbsql) support""... $ac_c" 1>&6 --echo "configure:28689: checking for FrontBase SQL92 (fbsql) support" >&5 -+echo "configure:28693: checking for FrontBase SQL92 (fbsql) support" >&5 - # Check whether --with-fbsql or --without-fbsql was given. - if test "${with_fbsql+set}" = set; then - withval="$with_fbsql" -@@ -29119,7 +29123,7 @@ - - - echo $ac_n "checking for FDF support""... $ac_c" 1>&6 --echo "configure:29123: checking for FDF support" >&5 -+echo "configure:29127: checking for FDF support" >&5 - # Check whether --with-fdftk or --without-fdftk was given. - if test "${with_fdftk+set}" = set; then - withval="$with_fdftk" -@@ -29320,7 +29324,7 @@ - done - - echo $ac_n "checking for FDFOpen in -l$file""... $ac_c" 1>&6 --echo "configure:29324: checking for FDFOpen in -l$file" >&5 -+echo "configure:29328: checking for FDFOpen in -l$file" >&5 - ac_lib_var=`echo $file'_'FDFOpen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -29328,7 +29332,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$file $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:29347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -29449,7 +29453,7 @@ - done - - echo $ac_n "checking for FDFGetFDFVersion in -l$file""... $ac_c" 1>&6 --echo "configure:29453: checking for FDFGetFDFVersion in -l$file" >&5 -+echo "configure:29457: checking for FDFGetFDFVersion in -l$file" >&5 - ac_lib_var=`echo $file'_'FDFGetFDFVersion | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -29457,7 +29461,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$file $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:29476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -29843,7 +29847,7 @@ - - - echo $ac_n "checking whether to enable the bundled filePro support""... $ac_c" 1>&6 --echo "configure:29847: checking whether to enable the bundled filePro support" >&5 -+echo "configure:29851: checking whether to enable the bundled filePro support" >&5 - # Check whether --enable-filepro or --disable-filepro was given. - if test "${enable_filepro+set}" = set; then - enableval="$enable_filepro" -@@ -30118,7 +30122,7 @@ - - - echo $ac_n "checking for FriBidi support""... $ac_c" 1>&6 --echo "configure:30122: checking for FriBidi support" >&5 -+echo "configure:30126: checking for FriBidi support" >&5 - # Check whether --with-fribidi or --without-fribidi was given. - if test "${with_fribidi+set}" = set; then - withval="$with_fribidi" -@@ -30167,7 +30171,7 @@ - # Extract the first word of "fribidi-config", so it can be a program name with args. - set dummy fribidi-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:30171: checking for $ac_word" >&5 -+echo "configure:30175: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_FRIBIDI_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -30204,7 +30208,7 @@ - fi - - echo $ac_n "checking for FriBidi version""... $ac_c" 1>&6 --echo "configure:30208: checking for FriBidi version" >&5 -+echo "configure:30212: checking for FriBidi version" >&5 - - if test ! -x "$FRIBIDI_CONFIG"; then - { echo "configure: error: fribidi-config not found." 1>&2; exit 1; } -@@ -30573,7 +30577,7 @@ - - - echo $ac_n "checking whether to enable FTP support""... $ac_c" 1>&6 --echo "configure:30577: checking whether to enable FTP support" >&5 -+echo "configure:30581: checking whether to enable FTP support" >&5 - # Check whether --enable-ftp or --disable-ftp was given. - if test "${enable_ftp+set}" = set; then - enableval="$enable_ftp" -@@ -30849,7 +30853,7 @@ - - - echo $ac_n "checking for GD support""... $ac_c" 1>&6 --echo "configure:30853: checking for GD support" >&5 -+echo "configure:30857: checking for GD support" >&5 - # Check whether --with-gd or --without-gd was given. - if test "${with_gd+set}" = set; then - withval="$with_gd" -@@ -30896,7 +30900,7 @@ - - - echo $ac_n "checking for the location of libjpeg""... $ac_c" 1>&6 --echo "configure:30900: checking for the location of libjpeg" >&5 -+echo "configure:30904: checking for the location of libjpeg" >&5 - # Check whether --with-jpeg-dir or --without-jpeg-dir was given. - if test "${with_jpeg_dir+set}" = set; then - withval="$with_jpeg_dir" -@@ -30923,7 +30927,7 @@ - - - echo $ac_n "checking for the location of libpng""... $ac_c" 1>&6 --echo "configure:30927: checking for the location of libpng" >&5 -+echo "configure:30931: checking for the location of libpng" >&5 - # Check whether --with-png-dir or --without-png-dir was given. - if test "${with_png_dir+set}" = set; then - withval="$with_png_dir" -@@ -30950,7 +30954,7 @@ - - - echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 --echo "configure:30954: checking for the location of libz" >&5 -+echo "configure:30958: checking for the location of libz" >&5 - # Check whether --with-zlib-dir or --without-zlib-dir was given. - if test "${with_zlib_dir+set}" = set; then - withval="$with_zlib_dir" -@@ -30976,7 +30980,7 @@ - - - echo $ac_n "checking for the location of libXpm""... $ac_c" 1>&6 --echo "configure:30980: checking for the location of libXpm" >&5 -+echo "configure:30984: checking for the location of libXpm" >&5 - # Check whether --with-xpm-dir or --without-xpm-dir was given. - if test "${with_xpm_dir+set}" = set; then - withval="$with_xpm_dir" -@@ -31001,7 +31005,7 @@ - - - echo $ac_n "checking for FreeType 1.x support""... $ac_c" 1>&6 --echo "configure:31005: checking for FreeType 1.x support" >&5 -+echo "configure:31009: checking for FreeType 1.x support" >&5 - # Check whether --with-ttf or --without-ttf was given. - if test "${with_ttf+set}" = set; then - withval="$with_ttf" -@@ -31026,7 +31030,7 @@ - - - echo $ac_n "checking for FreeType 2""... $ac_c" 1>&6 --echo "configure:31030: checking for FreeType 2" >&5 -+echo "configure:31034: checking for FreeType 2" >&5 - # Check whether --with-freetype-dir or --without-freetype-dir was given. - if test "${with_freetype_dir+set}" = set; then - withval="$with_freetype_dir" -@@ -31051,7 +31055,7 @@ - - - echo $ac_n "checking for T1lib support""... $ac_c" 1>&6 --echo "configure:31055: checking for T1lib support" >&5 -+echo "configure:31059: checking for T1lib support" >&5 - # Check whether --with-t1lib or --without-t1lib was given. - if test "${with_t1lib+set}" = set; then - withval="$with_t1lib" -@@ -31076,7 +31080,7 @@ - - - echo $ac_n "checking whether to enable truetype string function in GD""... $ac_c" 1>&6 --echo "configure:31080: checking whether to enable truetype string function in GD" >&5 -+echo "configure:31084: checking whether to enable truetype string function in GD" >&5 - # Check whether --enable-gd-native-ttf or --disable-gd-native-ttf was given. - if test "${enable_gd_native_ttf+set}" = set; then - enableval="$enable_gd_native_ttf" -@@ -31101,7 +31105,7 @@ - - - echo $ac_n "checking whether to enable JIS-mapped Japanese font support in GD""... $ac_c" 1>&6 --echo "configure:31105: checking whether to enable JIS-mapped Japanese font support in GD" >&5 -+echo "configure:31109: checking whether to enable JIS-mapped Japanese font support in GD" >&5 - # Check whether --enable-gd-jis-conv or --disable-gd-jis-conv was given. - if test "${enable_gd_jis_conv+set}" = set; then - enableval="$enable_gd_jis_conv" -@@ -31155,12 +31159,12 @@ - for ac_func in fabsf floorf - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:31159: checking for $ac_func" >&5 -+echo "configure:31163: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:31191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -31315,7 +31319,7 @@ - done - - echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 --echo "configure:31319: checking for jpeg_read_header in -ljpeg" >&5 -+echo "configure:31323: checking for jpeg_read_header in -ljpeg" >&5 - ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -31323,7 +31327,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ljpeg $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:31342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -31598,7 +31602,7 @@ - done - - echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6 --echo "configure:31602: checking for png_write_image in -lpng" >&5 -+echo "configure:31606: checking for png_write_image in -lpng" >&5 - ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -31606,7 +31610,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpng $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:31625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -31978,7 +31982,7 @@ - done - - echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6 --echo "configure:31982: checking for XpmFreeXpmImage in -lXpm" >&5 -+echo "configure:31986: checking for XpmFreeXpmImage in -lXpm" >&5 - ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -31986,7 +31990,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lXpm $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:32005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -32695,7 +32699,7 @@ - done - - echo $ac_n "checking for T1_LoadFont in -lt1""... $ac_c" 1>&6 --echo "configure:32699: checking for T1_LoadFont in -lt1" >&5 -+echo "configure:32703: checking for T1_LoadFont in -lt1" >&5 - ac_lib_var=`echo t1'_'T1_LoadFont | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -32703,7 +32707,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lt1 $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:32722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -33107,7 +33111,7 @@ - done - - echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 --echo "configure:33111: checking for jpeg_read_header in -ljpeg" >&5 -+echo "configure:33115: checking for jpeg_read_header in -ljpeg" >&5 - ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -33115,7 +33119,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ljpeg $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:33134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -33390,7 +33394,7 @@ - done - - echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6 --echo "configure:33394: checking for png_write_image in -lpng" >&5 -+echo "configure:33398: checking for png_write_image in -lpng" >&5 - ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -33398,7 +33402,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpng $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:33417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -33770,7 +33774,7 @@ - done - - echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6 --echo "configure:33774: checking for XpmFreeXpmImage in -lXpm" >&5 -+echo "configure:33778: checking for XpmFreeXpmImage in -lXpm" >&5 - ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -33778,7 +33782,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lXpm $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:33797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -34487,7 +34491,7 @@ - done - - echo $ac_n "checking for T1_LoadFont in -lt1""... $ac_c" 1>&6 --echo "configure:34491: checking for T1_LoadFont in -lt1" >&5 -+echo "configure:34495: checking for T1_LoadFont in -lt1" >&5 - ac_lib_var=`echo t1'_'T1_LoadFont | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -34495,7 +34499,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lt1 $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:34514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -34862,7 +34866,7 @@ - done - - echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6 --echo "configure:34866: checking for gdImageString16 in -lgd" >&5 -+echo "configure:34870: checking for gdImageString16 in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageString16 | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -34870,7 +34874,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:34889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -34993,7 +34997,7 @@ - done - - echo $ac_n "checking for gdImagePaletteCopy in -lgd""... $ac_c" 1>&6 --echo "configure:34997: checking for gdImagePaletteCopy in -lgd" >&5 -+echo "configure:35001: checking for gdImagePaletteCopy in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImagePaletteCopy | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -35001,7 +35005,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:35020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -35124,7 +35128,7 @@ - done - - echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6 --echo "configure:35128: checking for gdImageCreateFromPng in -lgd" >&5 -+echo "configure:35132: checking for gdImageCreateFromPng in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -35132,7 +35136,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:35151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -35255,7 +35259,7 @@ - done - - echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6 --echo "configure:35259: checking for gdImageCreateFromGif in -lgd" >&5 -+echo "configure:35263: checking for gdImageCreateFromGif in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageCreateFromGif | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -35263,7 +35267,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:35282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -35386,7 +35390,7 @@ - done - - echo $ac_n "checking for gdImageGif in -lgd""... $ac_c" 1>&6 --echo "configure:35390: checking for gdImageGif in -lgd" >&5 -+echo "configure:35394: checking for gdImageGif in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageGif | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -35394,7 +35398,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:35413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -35517,7 +35521,7 @@ - done - - echo $ac_n "checking for gdImageWBMP in -lgd""... $ac_c" 1>&6 --echo "configure:35521: checking for gdImageWBMP in -lgd" >&5 -+echo "configure:35525: checking for gdImageWBMP in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageWBMP | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -35525,7 +35529,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:35544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -35648,7 +35652,7 @@ - done - - echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6 --echo "configure:35652: checking for gdImageCreateFromJpeg in -lgd" >&5 -+echo "configure:35656: checking for gdImageCreateFromJpeg in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageCreateFromJpeg | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -35656,7 +35660,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:35675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -35779,7 +35783,7 @@ - done - - echo $ac_n "checking for gdImageCreateFromXpm in -lgd""... $ac_c" 1>&6 --echo "configure:35783: checking for gdImageCreateFromXpm in -lgd" >&5 -+echo "configure:35787: checking for gdImageCreateFromXpm in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageCreateFromXpm | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -35787,7 +35791,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:35806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -35910,7 +35914,7 @@ - done - - echo $ac_n "checking for gdImageCreateFromGd2 in -lgd""... $ac_c" 1>&6 --echo "configure:35914: checking for gdImageCreateFromGd2 in -lgd" >&5 -+echo "configure:35918: checking for gdImageCreateFromGd2 in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageCreateFromGd2 | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -35918,7 +35922,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:35937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -36041,7 +36045,7 @@ - done - - echo $ac_n "checking for gdImageCreateTrueColor in -lgd""... $ac_c" 1>&6 --echo "configure:36045: checking for gdImageCreateTrueColor in -lgd" >&5 -+echo "configure:36049: checking for gdImageCreateTrueColor in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageCreateTrueColor | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -36049,7 +36053,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:36068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -36172,7 +36176,7 @@ - done - - echo $ac_n "checking for gdImageSetTile in -lgd""... $ac_c" 1>&6 --echo "configure:36176: checking for gdImageSetTile in -lgd" >&5 -+echo "configure:36180: checking for gdImageSetTile in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageSetTile | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -36180,7 +36184,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:36199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -36303,7 +36307,7 @@ - done - - echo $ac_n "checking for gdImageEllipse in -lgd""... $ac_c" 1>&6 --echo "configure:36307: checking for gdImageEllipse in -lgd" >&5 -+echo "configure:36311: checking for gdImageEllipse in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageEllipse | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -36311,7 +36315,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:36330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -36434,7 +36438,7 @@ - done - - echo $ac_n "checking for gdImageSetBrush in -lgd""... $ac_c" 1>&6 --echo "configure:36438: checking for gdImageSetBrush in -lgd" >&5 -+echo "configure:36442: checking for gdImageSetBrush in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageSetBrush | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -36442,7 +36446,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:36461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -36565,7 +36569,7 @@ - done - - echo $ac_n "checking for gdImageStringTTF in -lgd""... $ac_c" 1>&6 --echo "configure:36569: checking for gdImageStringTTF in -lgd" >&5 -+echo "configure:36573: checking for gdImageStringTTF in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageStringTTF | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -36573,7 +36577,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:36592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -36696,7 +36700,7 @@ - done - - echo $ac_n "checking for gdImageStringFT in -lgd""... $ac_c" 1>&6 --echo "configure:36700: checking for gdImageStringFT in -lgd" >&5 -+echo "configure:36704: checking for gdImageStringFT in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageStringFT | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -36704,7 +36708,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:36723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -36827,7 +36831,7 @@ - done - - echo $ac_n "checking for gdImageStringFTEx in -lgd""... $ac_c" 1>&6 --echo "configure:36831: checking for gdImageStringFTEx in -lgd" >&5 -+echo "configure:36835: checking for gdImageStringFTEx in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageStringFTEx | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -36835,7 +36839,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:36854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -36958,7 +36962,7 @@ - done - - echo $ac_n "checking for gdImageColorClosestHWB in -lgd""... $ac_c" 1>&6 --echo "configure:36962: checking for gdImageColorClosestHWB in -lgd" >&5 -+echo "configure:36966: checking for gdImageColorClosestHWB in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageColorClosestHWB | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -36966,7 +36970,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:36985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -37089,7 +37093,7 @@ - done - - echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6 --echo "configure:37093: checking for gdImageColorResolve in -lgd" >&5 -+echo "configure:37097: checking for gdImageColorResolve in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageColorResolve | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -37097,7 +37101,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:37116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -37220,7 +37224,7 @@ - done - - echo $ac_n "checking for gdImageGifCtx in -lgd""... $ac_c" 1>&6 --echo "configure:37224: checking for gdImageGifCtx in -lgd" >&5 -+echo "configure:37228: checking for gdImageGifCtx in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageGifCtx | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -37228,7 +37232,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:37247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -37351,7 +37355,7 @@ - done - - echo $ac_n "checking for gdCacheCreate in -lgd""... $ac_c" 1>&6 --echo "configure:37355: checking for gdCacheCreate in -lgd" >&5 -+echo "configure:37359: checking for gdCacheCreate in -lgd" >&5 - ac_lib_var=`echo gd'_'gdCacheCreate | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -37359,7 +37363,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:37378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -37482,7 +37486,7 @@ - done - - echo $ac_n "checking for gdFontCacheShutdown in -lgd""... $ac_c" 1>&6 --echo "configure:37486: checking for gdFontCacheShutdown in -lgd" >&5 -+echo "configure:37490: checking for gdFontCacheShutdown in -lgd" >&5 - ac_lib_var=`echo gd'_'gdFontCacheShutdown | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -37490,7 +37494,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:37509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -37613,7 +37617,7 @@ - done - - echo $ac_n "checking for gdFreeFontCache in -lgd""... $ac_c" 1>&6 --echo "configure:37617: checking for gdFreeFontCache in -lgd" >&5 -+echo "configure:37621: checking for gdFreeFontCache in -lgd" >&5 - ac_lib_var=`echo gd'_'gdFreeFontCache | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -37621,7 +37625,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:37640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -37744,7 +37748,7 @@ - done - - echo $ac_n "checking for gdNewDynamicCtxEx in -lgd""... $ac_c" 1>&6 --echo "configure:37748: checking for gdNewDynamicCtxEx in -lgd" >&5 -+echo "configure:37752: checking for gdNewDynamicCtxEx in -lgd" >&5 - ac_lib_var=`echo gd'_'gdNewDynamicCtxEx | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -37752,7 +37756,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:37771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -37818,7 +37822,7 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$GD_INCLUDE - cat > conftest.$ac_ext < -@@ -37832,7 +37836,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:37836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:37840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -38191,7 +38195,7 @@ - done - - echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6 --echo "configure:38195: checking for gdImageCreate in -lgd" >&5 -+echo "configure:38199: checking for gdImageCreate in -lgd" >&5 - ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -38199,7 +38203,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgd $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:38218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -38256,7 +38260,7 @@ - - - echo $ac_n "checking for GNU gettext support""... $ac_c" 1>&6 --echo "configure:38260: checking for GNU gettext support" >&5 -+echo "configure:38264: checking for GNU gettext support" >&5 - # Check whether --with-gettext or --without-gettext was given. - if test "${with_gettext+set}" = set; then - withval="$with_gettext" -@@ -38314,7 +38318,7 @@ - O_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR" - echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 --echo "configure:38318: checking for bindtextdomain in -lintl" >&5 -+echo "configure:38322: checking for bindtextdomain in -lintl" >&5 - ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -38322,7 +38326,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lintl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:38341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -38355,7 +38359,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for bindtextdomain in -lc""... $ac_c" 1>&6 --echo "configure:38359: checking for bindtextdomain in -lc" >&5 -+echo "configure:38363: checking for bindtextdomain in -lc" >&5 - ac_lib_var=`echo c'_'bindtextdomain | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -38363,7 +38367,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lc $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:38382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -38766,7 +38770,7 @@ - - - echo $ac_n "checking for ngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 --echo "configure:38770: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 -+echo "configure:38774: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 - ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'ngettext | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -38774,7 +38778,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:38793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -38809,7 +38813,7 @@ - fi - - echo $ac_n "checking for dngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 --echo "configure:38813: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 -+echo "configure:38817: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 - ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dngettext | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -38817,7 +38821,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:38836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -38852,7 +38856,7 @@ - fi - - echo $ac_n "checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 --echo "configure:38856: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 -+echo "configure:38860: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 - ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dcngettext | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -38860,7 +38864,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:38879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -38895,7 +38899,7 @@ - fi - - echo $ac_n "checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 --echo "configure:38899: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5 -+echo "configure:38903: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5 - ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'bind_textdomain_codeset | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -38903,7 +38907,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:38922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -38944,7 +38948,7 @@ - - - echo $ac_n "checking for GNU MP support""... $ac_c" 1>&6 --echo "configure:38948: checking for GNU MP support" >&5 -+echo "configure:38952: checking for GNU MP support" >&5 - # Check whether --with-gmp or --without-gmp was given. - if test "${with_gmp+set}" = set; then - withval="$with_gmp" -@@ -39078,7 +39082,7 @@ - done - - echo $ac_n "checking for __gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6 --echo "configure:39082: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5 -+echo "configure:39086: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5 - ac_lib_var=`echo gmp'_'__gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -39086,7 +39090,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgmp $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:39105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -39205,7 +39209,7 @@ - done - - echo $ac_n "checking for gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6 --echo "configure:39209: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5 -+echo "configure:39213: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5 - ac_lib_var=`echo gmp'_'gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -39213,7 +39217,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgmp $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:39232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -39623,7 +39627,7 @@ - - - echo $ac_n "checking for hwapi support""... $ac_c" 1>&6 --echo "configure:39627: checking for hwapi support" >&5 -+echo "configure:39631: checking for hwapi support" >&5 - # Check whether --with-hwapi or --without-hwapi was given. - if test "${with_hwapi+set}" = set; then - withval="$with_hwapi" -@@ -39671,7 +39675,7 @@ - HWAPI_DIR=$PHP_HWAPI - else - echo $ac_n "checking for HWAPI in default path""... $ac_c" 1>&6 --echo "configure:39675: checking for HWAPI in default path" >&5 -+echo "configure:39679: checking for HWAPI in default path" >&5 - for i in /usr/local /usr; do - if test -r $i/include/hwapi/sdk/api/object.h; then - HWAPI_DIR=$i -@@ -39827,7 +39831,7 @@ - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:39831: checking for $ac_word" >&5 -+echo "configure:39835: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -39859,7 +39863,7 @@ - - - echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 --echo "configure:39863: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 -+echo "configure:39867: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 - - ac_ext=C - # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -@@ -39870,12 +39874,12 @@ - - cat > conftest.$ac_ext << EOF - --#line 39874 "configure" -+#line 39878 "configure" - #include "confdefs.h" - - int main(){return(0);} - EOF --if { (eval echo configure:39879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:39883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cxx_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then -@@ -39901,12 +39905,12 @@ - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 --echo "configure:39905: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 -+echo "configure:39909: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 - cross_compiling=$ac_cv_prog_cxx_cross - - echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 --echo "configure:39910: checking whether we are using GNU C++" >&5 -+echo "configure:39914: checking whether we are using GNU C++" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -39915,7 +39919,7 @@ - yes; - #endif - EOF --if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:39919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then -+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:39923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gxx=yes - else - ac_cv_prog_gxx=no -@@ -39934,7 +39938,7 @@ - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS= - echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 --echo "configure:39938: checking whether ${CXX-g++} accepts -g" >&5 -+echo "configure:39942: checking whether ${CXX-g++} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -39966,7 +39970,7 @@ - fi - - echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 --echo "configure:39970: checking how to run the C++ preprocessor" >&5 -+echo "configure:39974: checking how to run the C++ preprocessor" >&5 - if test -z "$CXXCPP"; then - if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -39979,12 +39983,12 @@ - cross_compiling=$ac_cv_prog_cxx_cross - CXXCPP="${CXX-g++} -E" - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:39988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:39992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -@@ -40297,7 +40301,7 @@ - - - echo $ac_n "checking for Hyperwave support""... $ac_c" 1>&6 --echo "configure:40301: checking for Hyperwave support" >&5 -+echo "configure:40305: checking for Hyperwave support" >&5 - # Check whether --with-hyperwave or --without-hyperwave was given. - if test "${with_hyperwave+set}" = set; then - withval="$with_hyperwave" -@@ -40552,7 +40556,7 @@ - - - echo $ac_n "checking for iconv support""... $ac_c" 1>&6 --echo "configure:40556: checking for iconv support" >&5 -+echo "configure:40560: checking for iconv support" >&5 - # Check whether --with-iconv or --without-iconv was given. - if test "${with_iconv+set}" = set; then - withval="$with_iconv" -@@ -40615,12 +40619,12 @@ - - if test "$PHP_ICONV" = "yes"; then - echo $ac_n "checking for iconv""... $ac_c" 1>&6 --echo "configure:40619: checking for iconv" >&5 -+echo "configure:40623: checking for iconv" >&5 - if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:40651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_iconv=yes" - else -@@ -40667,12 +40671,12 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for libiconv""... $ac_c" 1>&6 --echo "configure:40671: checking for libiconv" >&5 -+echo "configure:40675: checking for libiconv" >&5 - if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:40703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_libiconv=yes" - else -@@ -40830,7 +40834,7 @@ - done - - echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6 --echo "configure:40834: checking for libiconv in -l$iconv_lib_name" >&5 -+echo "configure:40838: checking for libiconv in -l$iconv_lib_name" >&5 - ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -40838,7 +40842,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$iconv_lib_name $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:40857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -40962,7 +40966,7 @@ - done - - echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6 --echo "configure:40966: checking for iconv in -l$iconv_lib_name" >&5 -+echo "configure:40970: checking for iconv in -l$iconv_lib_name" >&5 - ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -40970,7 +40974,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$iconv_lib_name $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:40989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -41187,16 +41191,16 @@ - - if test -z "$iconv_lib_name"; then - echo $ac_n "checking if iconv is glibc's""... $ac_c" 1>&6 --echo "configure:41191: checking if iconv is glibc's" >&5 -+echo "configure:41195: checking if iconv is glibc's" >&5 - cat > conftest.$ac_ext < - int main() { - gnu_get_libc_version(); - ; return 0; } - EOF --if { (eval echo configure:41200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:41204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - echo "$ac_t""yes" 1>&6 -@@ -41215,16 +41219,16 @@ - case "$iconv_lib_name" in - iconv ) - echo $ac_n "checking if iconv is Konstantin Chuguev's""... $ac_c" 1>&6 --echo "configure:41219: checking if iconv is Konstantin Chuguev's" >&5 -+echo "configure:41223: checking if iconv is Konstantin Chuguev's" >&5 - cat > conftest.$ac_ext < - int main() { - iconv_ccs_init(NULL, NULL); - ; return 0; } - EOF --if { (eval echo configure:41228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:41232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - echo "$ac_t""yes" 1>&6 -@@ -41302,12 +41306,12 @@ - esac - - echo $ac_n "checking if iconv supports errno""... $ac_c" 1>&6 --echo "configure:41306: checking if iconv supports errno" >&5 -+echo "configure:41310: checking if iconv supports errno" >&5 - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -41328,7 +41332,7 @@ - } - - EOF --if { (eval echo configure:41332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:41336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - echo "$ac_t""yes" 1>&6 -@@ -41360,9 +41364,9 @@ - - - echo $ac_n "checking if your cpp allows macro usage in include lines""... $ac_c" 1>&6 --echo "configure:41364: checking if your cpp allows macro usage in include lines" >&5 -+echo "configure:41368: checking if your cpp allows macro usage in include lines" >&5 - cat > conftest.$ac_ext < -@@ -41372,7 +41376,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:41376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:41380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""yes" 1>&6 -@@ -41641,7 +41645,7 @@ - - - echo $ac_n "checking for IMAP support""... $ac_c" 1>&6 --echo "configure:41645: checking for IMAP support" >&5 -+echo "configure:41649: checking for IMAP support" >&5 - # Check whether --with-imap or --without-imap was given. - if test "${with_imap+set}" = set; then - withval="$with_imap" -@@ -41687,7 +41691,7 @@ - - - echo $ac_n "checking for IMAP Kerberos support""... $ac_c" 1>&6 --echo "configure:41691: checking for IMAP Kerberos support" >&5 -+echo "configure:41695: checking for IMAP Kerberos support" >&5 - # Check whether --with-kerberos or --without-kerberos was given. - if test "${with_kerberos+set}" = set; then - withval="$with_kerberos" -@@ -41712,7 +41716,7 @@ - - - echo $ac_n "checking for IMAP SSL support""... $ac_c" 1>&6 --echo "configure:41716: checking for IMAP SSL support" >&5 -+echo "configure:41720: checking for IMAP SSL support" >&5 - # Check whether --with-imap-ssl or --without-imap-ssl was given. - if test "${with_imap_ssl+set}" = set; then - withval="$with_imap_ssl" -@@ -42048,7 +42052,7 @@ - done - - cat > conftest.$ac_ext < - EOF -@@ -42068,7 +42072,7 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$IMAP_INC_DIR - cat > conftest.$ac_ext <&6 --echo "configure:42174: checking for pam_start in -lpam" >&5 -+echo "configure:42178: checking for pam_start in -lpam" >&5 - ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -42178,7 +42182,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpam $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:42197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -42327,7 +42331,7 @@ - done - - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 --echo "configure:42331: checking for crypt in -lcrypt" >&5 -+echo "configure:42335: checking for crypt in -lcrypt" >&5 - ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -42335,7 +42339,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcrypt $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:42354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -42549,7 +42553,7 @@ - # Extract the first word of "krb5-config", so it can be a program name with args. - set dummy krb5-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:42553: checking for $ac_word" >&5 -+echo "configure:42557: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -42900,7 +42904,7 @@ - - else - cat > conftest.$ac_ext < - EOF -@@ -42935,7 +42939,7 @@ - # Extract the first word of "pkg-config", so it can be a program name with args. - set dummy pkg-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:42939: checking for $ac_word" >&5 -+echo "configure:42943: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -43123,9 +43127,9 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$OPENSSL_INCDIR - echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 --echo "configure:43127: checking for OpenSSL version" >&5 -+echo "configure:43131: checking for OpenSSL version" >&5 - cat > conftest.$ac_ext < -@@ -43263,7 +43267,7 @@ - done - - echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 --echo "configure:43267: checking for CRYPTO_free in -lcrypto" >&5 -+echo "configure:43271: checking for CRYPTO_free in -lcrypto" >&5 - ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -43271,7 +43275,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcrypto $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:43290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -43422,7 +43426,7 @@ - done - - echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 --echo "configure:43426: checking for SSL_CTX_set_ssl_version in -lssl" >&5 -+echo "configure:43430: checking for SSL_CTX_set_ssl_version in -lssl" >&5 - ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -43430,7 +43434,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lssl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:43449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -43559,7 +43563,7 @@ - - elif test -f "$IMAP_INC_DIR/linkage.c"; then - cat > conftest.$ac_ext < - EOF -@@ -43587,7 +43591,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:43620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - LIBS=$old_LIBS -@@ -43638,7 +43642,7 @@ - - - echo $ac_n "checking whether IMAP works""... $ac_c" 1>&6 --echo "configure:43642: checking whether IMAP works" >&5 -+echo "configure:43646: checking whether IMAP works" >&5 - - old_LIBS=$LIBS - LIBS="$TST_LIBS $LIBS" -@@ -43646,7 +43650,7 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:43679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - LIBS=$old_LIBS -@@ -43701,7 +43705,7 @@ - - - echo $ac_n "checking for Informix support""... $ac_c" 1>&6 --echo "configure:43705: checking for Informix support" >&5 -+echo "configure:43709: checking for Informix support" >&5 - # Check whether --with-informix or --without-informix was given. - if test "${with_informix+set}" = set; then - withval="$with_informix" -@@ -43923,7 +43927,7 @@ - esac - - echo $ac_n "checking Informix version""... $ac_c" 1>&6 --echo "configure:43927: checking Informix version" >&5 -+echo "configure:43931: checking Informix version" >&5 - IFX_VERSION=`$INFORMIXDIR/bin/esql -V | grep "ESQL Version" | sed -ne '1 s/\(.*\)ESQL Version \([0-9]*\)\.\([0-9]*\).*/\2\3/p'` - echo "$ac_t""$IFX_VERSION" 1>&6 - cat >> confdefs.h <&6 --echo "configure:44305: checking for Ingres II support" >&5 -+echo "configure:44309: checking for Ingres II support" >&5 - # Check whether --with-ingres or --without-ingres was given. - if test "${with_ingres+set}" = set; then - withval="$with_ingres" -@@ -44821,7 +44825,7 @@ - - - echo $ac_n "checking for InterBase support""... $ac_c" 1>&6 --echo "configure:44825: checking for InterBase support" >&5 -+echo "configure:44829: checking for InterBase support" >&5 - # Check whether --with-interbase or --without-interbase was given. - if test "${with_interbase+set}" = set; then - withval="$with_interbase" -@@ -44954,7 +44958,7 @@ - done - - echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6 --echo "configure:44958: checking for isc_detach_database in -lgds" >&5 -+echo "configure:44962: checking for isc_detach_database in -lgds" >&5 - ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -44962,7 +44966,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lgds $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:44981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -45083,7 +45087,7 @@ - done - - echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6 --echo "configure:45087: checking for isc_detach_database in -lib_util" >&5 -+echo "configure:45091: checking for isc_detach_database in -lib_util" >&5 - ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -45091,7 +45095,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lib_util $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:45110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -45502,7 +45506,7 @@ - - - echo $ac_n "checking for IRCG support""... $ac_c" 1>&6 --echo "configure:45506: checking for IRCG support" >&5 -+echo "configure:45510: checking for IRCG support" >&5 - # Check whether --with-ircg or --without-ircg was given. - if test "${with_ircg+set}" = set; then - withval="$with_ircg" -@@ -45995,7 +45999,7 @@ - - - echo $ac_n "checking for Java support""... $ac_c" 1>&6 --echo "configure:45999: checking for Java support" >&5 -+echo "configure:46003: checking for Java support" >&5 - # Check whether --with-java or --without-java was given. - if test "${with_java+set}" = set; then - withval="$with_java" -@@ -46048,7 +46052,7 @@ - esac - - echo $ac_n "checking Java Jar location""... $ac_c" 1>&6 --echo "configure:46052: checking Java Jar location" >&5 -+echo "configure:46056: checking Java Jar location" >&5 - if test "$PHP_JAVA" = "yes"; then - if JAVA_JAR=`which jar 2>/dev/null`; then - JAVA_JAR="$JAVA_JAR cf" -@@ -46074,7 +46078,7 @@ - - - echo $ac_n "checking Java C location""... $ac_c" 1>&6 --echo "configure:46078: checking Java C location" >&5 -+echo "configure:46082: checking Java C location" >&5 - if test "$PHP_JAVA" = "yes"; then - JAVA_C=`which javac` - else -@@ -46101,17 +46105,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:46105: checking for $ac_hdr" >&5 -+echo "configure:46109: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:46115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:46119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -46141,17 +46145,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:46145: checking for $ac_hdr" >&5 -+echo "configure:46149: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:46155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:46159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -46181,7 +46185,7 @@ - save_old_LDFLAGS=$LDFLAGS - LDFLAGS="-framework "JavaVM" $LDFLAGS" - echo $ac_n "checking for JNI_CreateJavaVM in -lc""... $ac_c" 1>&6 --echo "configure:46185: checking for JNI_CreateJavaVM in -lc" >&5 -+echo "configure:46189: checking for JNI_CreateJavaVM in -lc" >&5 - ac_lib_var=`echo c'_'JNI_CreateJavaVM | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -46189,7 +46193,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lc $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:46208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -46253,7 +46257,7 @@ - else - - echo $ac_n "checking Checking for libjava""... $ac_c" 1>&6 --echo "configure:46257: checking Checking for libjava" >&5 -+echo "configure:46261: checking Checking for libjava" >&5 - if test -d $PHP_JAVA/lib/kaffe; then - - if test "$PHP_JAVA/lib" != "/usr/lib"; then -@@ -46791,7 +46795,7 @@ - - - echo $ac_n "checking for LDAP support""... $ac_c" 1>&6 --echo "configure:46795: checking for LDAP support" >&5 -+echo "configure:46799: checking for LDAP support" >&5 - # Check whether --with-ldap or --without-ldap was given. - if test "${with_ldap+set}" = set; then - withval="$with_ldap" -@@ -49062,19 +49066,19 @@ - LDFLAGS="$LDFLAGS $LDAP_SHARED_LIBADD" - - echo $ac_n "checking for 3 arg ldap_set_rebind_proc""... $ac_c" 1>&6 --echo "configure:49066: checking for 3 arg ldap_set_rebind_proc" >&5 -+echo "configure:49070: checking for 3 arg ldap_set_rebind_proc" >&5 - if eval "test \"`echo '$''{'ac_cv_3arg_setrebindproc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - int main() { - ldap_set_rebind_proc(0,0,0) - ; return 0; } - EOF --if { (eval echo configure:49078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:49082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_3arg_setrebindproc=yes - else -@@ -49098,12 +49102,12 @@ - for ac_func in ldap_parse_reference ldap_start_tls_s - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:49102: checking for $ac_func" >&5 -+echo "configure:49106: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:49134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -49174,7 +49178,7 @@ - - - echo $ac_n "checking whether to enable multibyte string support""... $ac_c" 1>&6 --echo "configure:49178: checking whether to enable multibyte string support" >&5 -+echo "configure:49182: checking whether to enable multibyte string support" >&5 - # Check whether --enable-mbstring or --disable-mbstring was given. - if test "${enable_mbstring+set}" = set; then - enableval="$enable_mbstring" -@@ -49220,7 +49224,7 @@ - - - echo $ac_n "checking whether to enable multibyte regex support""... $ac_c" 1>&6 --echo "configure:49224: checking whether to enable multibyte regex support" >&5 -+echo "configure:49228: checking whether to enable multibyte regex support" >&5 - # Check whether --enable-mbregex or --disable-mbregex was given. - if test "${enable_mbregex+set}" = set; then - enableval="$enable_mbregex" -@@ -49245,7 +49249,7 @@ - - - echo $ac_n "checking for external libmbfl""... $ac_c" 1>&6 --echo "configure:49249: checking for external libmbfl" >&5 -+echo "configure:49253: checking for external libmbfl" >&5 - # Check whether --with-libmbfl or --without-libmbfl was given. - if test "${with_libmbfl+set}" = set; then - withval="$with_libmbfl" -@@ -49525,7 +49529,7 @@ - done - - echo $ac_n "checking for mbfl_buffer_converter_new in -lmbfl""... $ac_c" 1>&6 --echo "configure:49529: checking for mbfl_buffer_converter_new in -lmbfl" >&5 -+echo "configure:49533: checking for mbfl_buffer_converter_new in -lmbfl" >&5 - ac_lib_var=`echo mbfl'_'mbfl_buffer_converter_new | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -49533,7 +49537,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmbfl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:49552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -49966,7 +49970,7 @@ - - - echo $ac_n "checking for MCAL support""... $ac_c" 1>&6 --echo "configure:49970: checking for MCAL support" >&5 -+echo "configure:49974: checking for MCAL support" >&5 - # Check whether --with-mcal or --without-mcal was given. - if test "${with_mcal+set}" = set; then - withval="$with_mcal" -@@ -50375,7 +50379,7 @@ - - - echo $ac_n "checking for mcrypt support""... $ac_c" 1>&6 --echo "configure:50379: checking for mcrypt support" >&5 -+echo "configure:50383: checking for mcrypt support" >&5 - # Check whether --with-mcrypt or --without-mcrypt was given. - if test "${with_mcrypt+set}" = set; then - withval="$with_mcrypt" -@@ -50508,7 +50512,7 @@ - done - - echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6 --echo "configure:50512: checking for mcrypt_module_open in -lmcrypt" >&5 -+echo "configure:50516: checking for mcrypt_module_open in -lmcrypt" >&5 - ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -50516,7 +50520,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmcrypt $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:50535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -50655,7 +50659,7 @@ - done - - echo $ac_n "checking for mcrypt_generic_deinit in -lmcrypt""... $ac_c" 1>&6 --echo "configure:50659: checking for mcrypt_generic_deinit in -lmcrypt" >&5 -+echo "configure:50663: checking for mcrypt_generic_deinit in -lmcrypt" >&5 - ac_lib_var=`echo mcrypt'_'mcrypt_generic_deinit | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -50663,7 +50667,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmcrypt $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:50682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -50800,7 +50804,7 @@ - done - - echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6 --echo "configure:50804: checking for mcrypt_module_open in -lmcrypt" >&5 -+echo "configure:50808: checking for mcrypt_module_open in -lmcrypt" >&5 - ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -50808,7 +50812,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmcrypt $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:50827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -50924,7 +50928,7 @@ - done - - echo $ac_n "checking for mcrypt_generic_deinit in -lmcrypt""... $ac_c" 1>&6 --echo "configure:50928: checking for mcrypt_generic_deinit in -lmcrypt" >&5 -+echo "configure:50932: checking for mcrypt_generic_deinit in -lmcrypt" >&5 - ac_lib_var=`echo mcrypt'_'mcrypt_generic_deinit | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -50932,7 +50936,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmcrypt $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:50951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -51068,7 +51072,7 @@ - done - - echo $ac_n "checking for init_mcrypt in -lmcrypt""... $ac_c" 1>&6 --echo "configure:51072: checking for init_mcrypt in -lmcrypt" >&5 -+echo "configure:51076: checking for init_mcrypt in -lmcrypt" >&5 - ac_lib_var=`echo mcrypt'_'init_mcrypt | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -51076,7 +51080,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmcrypt $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:51095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -51495,7 +51499,7 @@ - - - echo $ac_n "checking for MCVE support""... $ac_c" 1>&6 --echo "configure:51499: checking for MCVE support" >&5 -+echo "configure:51503: checking for MCVE support" >&5 - # Check whether --with-mcve or --without-mcve was given. - if test "${with_mcve+set}" = set; then - withval="$with_mcve" -@@ -51541,7 +51545,7 @@ - - - echo $ac_n "checking OpenSSL dir for MCVE""... $ac_c" 1>&6 --echo "configure:51545: checking OpenSSL dir for MCVE" >&5 -+echo "configure:51549: checking OpenSSL dir for MCVE" >&5 - # Check whether --with-openssl-dir or --without-openssl-dir was given. - if test "${with_openssl_dir+set}" = set; then - withval="$with_openssl_dir" -@@ -51567,7 +51571,7 @@ - # Extract the first word of "egrep", so it can be a program name with args. - set dummy egrep; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:51571: checking for $ac_word" >&5 -+echo "configure:51575: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_EGREP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -51612,7 +51616,7 @@ - # Extract the first word of "pkg-config", so it can be a program name with args. - set dummy pkg-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:51616: checking for $ac_word" >&5 -+echo "configure:51620: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -51800,9 +51804,9 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$OPENSSL_INCDIR - echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 --echo "configure:51804: checking for OpenSSL version" >&5 -+echo "configure:51808: checking for OpenSSL version" >&5 - cat > conftest.$ac_ext < -@@ -51940,7 +51944,7 @@ - done - - echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 --echo "configure:51944: checking for CRYPTO_free in -lcrypto" >&5 -+echo "configure:51948: checking for CRYPTO_free in -lcrypto" >&5 - ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -51948,7 +51952,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcrypto $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:51967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -52099,7 +52103,7 @@ - done - - echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 --echo "configure:52103: checking for SSL_CTX_set_ssl_version in -lssl" >&5 -+echo "configure:52107: checking for SSL_CTX_set_ssl_version in -lssl" >&5 - ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -52107,7 +52111,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lssl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:52126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -52250,9 +52254,9 @@ - - saved_CPPFLAGS=$CPPFLAGS - echo $ac_n "checking for correct libmcve version""... $ac_c" 1>&6 --echo "configure:52254: checking for correct libmcve version" >&5 -+echo "configure:52258: checking for correct libmcve version" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:52281: checking for correct libmonetra 4.2 or higher" >&5 -+echo "configure:52285: checking for correct libmonetra 4.2 or higher" >&5 - cat > conftest.$ac_ext <&6 --echo "configure:52524: checking for MCVE_DestroyEngine in -lmcve" >&5 -+echo "configure:52528: checking for MCVE_DestroyEngine in -lmcve" >&5 - ac_lib_var=`echo mcve'_'MCVE_DestroyEngine | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -52528,7 +52532,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmcve $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:52547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -52656,7 +52660,7 @@ - done - - echo $ac_n "checking for M_DestroyEngine in -lmcve""... $ac_c" 1>&6 --echo "configure:52660: checking for M_DestroyEngine in -lmcve" >&5 -+echo "configure:52664: checking for M_DestroyEngine in -lmcve" >&5 - ac_lib_var=`echo mcve'_'M_DestroyEngine | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -52664,7 +52668,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmcve $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:52683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -52950,7 +52954,7 @@ - - - echo $ac_n "checking for mhash support""... $ac_c" 1>&6 --echo "configure:52954: checking for mhash support" >&5 -+echo "configure:52958: checking for mhash support" >&5 - # Check whether --with-mhash or --without-mhash was given. - if test "${with_mhash+set}" = set; then - withval="$with_mhash" -@@ -53364,7 +53368,7 @@ - - - echo $ac_n "checking whether to include mime_magic support""... $ac_c" 1>&6 --echo "configure:53368: checking whether to include mime_magic support" >&5 -+echo "configure:53372: checking whether to include mime_magic support" >&5 - # Check whether --with-mime-magic or --without-mime-magic was given. - if test "${with_mime_magic+set}" = set; then - withval="$with_mime_magic" -@@ -53661,7 +53665,7 @@ - - - echo $ac_n "checking for MING support""... $ac_c" 1>&6 --echo "configure:53665: checking for MING support" >&5 -+echo "configure:53669: checking for MING support" >&5 - # Check whether --with-ming or --without-ming was given. - if test "${with_ming+set}" = set; then - withval="$with_ming" -@@ -53706,7 +53710,7 @@ - - if test "$PHP_MING" != "no"; then - echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 --echo "configure:53710: checking for sin in -lm" >&5 -+echo "configure:53714: checking for sin in -lm" >&5 - ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -53714,7 +53718,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lm $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:53733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -53854,7 +53858,7 @@ - done - - echo $ac_n "checking for Ming_useSWFVersion in -lming""... $ac_c" 1>&6 --echo "configure:53858: checking for Ming_useSWFVersion in -lming" >&5 -+echo "configure:53862: checking for Ming_useSWFVersion in -lming" >&5 - ac_lib_var=`echo ming'_'Ming_useSWFVersion | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -53862,7 +53866,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lming $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:53881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -54040,14 +54044,14 @@ - - - echo $ac_n "checking for destroySWFBlock""... $ac_c" 1>&6 --echo "configure:54044: checking for destroySWFBlock" >&5 -+echo "configure:54048: checking for destroySWFBlock" >&5 - if test "$cross_compiling" = yes; then - - echo "$ac_t""unknown" 1>&6 - - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:54067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - echo "$ac_t""missing" 1>&6 -@@ -54083,7 +54087,7 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$MING_INC_DIR - cat > conftest.$ac_ext < -@@ -54340,7 +54344,7 @@ - - - echo $ac_n "checking for mnoGoSearch support""... $ac_c" 1>&6 --echo "configure:54344: checking for mnoGoSearch support" >&5 -+echo "configure:54348: checking for mnoGoSearch support" >&5 - # Check whether --with-mnogosearch or --without-mnogosearch was given. - if test "${with_mnogosearch+set}" = set; then - withval="$with_mnogosearch" -@@ -54396,7 +54400,7 @@ - fi - - echo $ac_n "checking for mnoGoSearch version""... $ac_c" 1>&6 --echo "configure:54400: checking for mnoGoSearch version" >&5 -+echo "configure:54404: checking for mnoGoSearch version" >&5 - - if test -x "$MNOGOSEARCH_BINDIR/udm-config"; then - MNOGOSEARCH_VERSION=`$MNOGOSEARCH_BINDIR/udm-config --version` -@@ -54758,7 +54762,7 @@ - - - echo $ac_n "checking for msession support""... $ac_c" 1>&6 --echo "configure:54762: checking for msession support" >&5 -+echo "configure:54766: checking for msession support" >&5 - # Check whether --with-msession or --without-msession was given. - if test "${with_msession+set}" = set; then - withval="$with_msession" -@@ -54806,7 +54810,7 @@ - PHOENIX_DIR=$PHP_MSESSION - else - echo $ac_n "checking for msession in default path""... $ac_c" 1>&6 --echo "configure:54810: checking for msession in default path" >&5 -+echo "configure:54814: checking for msession in default path" >&5 - for i in /usr/local/phoenix /usr/local /usr; do - if test -r $i/lib/libphoenix.a; then - PHOENIX_DIR=$i -@@ -55156,7 +55160,7 @@ - - - echo $ac_n "checking for mSQL support""... $ac_c" 1>&6 --echo "configure:55160: checking for mSQL support" >&5 -+echo "configure:55164: checking for mSQL support" >&5 - # Check whether --with-msql or --without-msql was given. - if test "${with_msql+set}" = set; then - withval="$with_msql" -@@ -55564,11 +55568,11 @@ - - - echo $ac_n "checking mSQL version""... $ac_c" 1>&6 --echo "configure:55568: checking mSQL version" >&5 -+echo "configure:55572: checking mSQL version" >&5 - ac_php_oldcppflags=$CPPFLAGS - CPPFLAGS="$INCLUDES $CPPFLAGS" - cat > conftest.$ac_ext < - #include "msql.h" -@@ -55576,7 +55580,7 @@ - int i = IDX_TYPE - ; return 0; } - EOF --if { (eval echo configure:55580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:55584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF -@@ -55607,7 +55611,7 @@ - - - echo $ac_n "checking for MSSQL support via FreeTDS""... $ac_c" 1>&6 --echo "configure:55611: checking for MSSQL support via FreeTDS" >&5 -+echo "configure:55615: checking for MSSQL support via FreeTDS" >&5 - # Check whether --with-mssql or --without-mssql was given. - if test "${with_mssql+set}" = set; then - withval="$with_mssql" -@@ -56032,7 +56036,7 @@ - - - echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6 --echo "configure:56036: checking for dnet_addr in -ldnet_stub" >&5 -+echo "configure:56040: checking for dnet_addr in -ldnet_stub" >&5 - ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -56040,7 +56044,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldnet_stub $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:56059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -56233,7 +56237,7 @@ - - - echo $ac_n "checking for MySQL support""... $ac_c" 1>&6 --echo "configure:56237: checking for MySQL support" >&5 -+echo "configure:56241: checking for MySQL support" >&5 - # Check whether --with-mysql or --without-mysql was given. - if test "${with_mysql+set}" = set; then - withval="$with_mysql" -@@ -56279,7 +56283,7 @@ - - - echo $ac_n "checking for specified location of the MySQL UNIX socket""... $ac_c" 1>&6 --echo "configure:56283: checking for specified location of the MySQL UNIX socket" >&5 -+echo "configure:56287: checking for specified location of the MySQL UNIX socket" >&5 - # Check whether --with-mysql-sock or --without-mysql-sock was given. - if test "${with_mysql_sock+set}" = set; then - withval="$with_mysql_sock" -@@ -56305,7 +56309,7 @@ - - - echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 --echo "configure:56309: checking for the location of libz" >&5 -+echo "configure:56313: checking for the location of libz" >&5 - # Check whether --with-zlib-dir or --without-zlib-dir was given. - if test "${with_zlib_dir+set}" = set; then - withval="$with_zlib_dir" -@@ -56336,7 +56340,7 @@ - - - echo $ac_n "checking for MySQL UNIX socket location""... $ac_c" 1>&6 --echo "configure:56340: checking for MySQL UNIX socket location" >&5 -+echo "configure:56344: checking for MySQL UNIX socket location" >&5 - if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then - MYSQL_SOCK=$PHP_MYSQL_SOCK - cat >> confdefs.h <&6 --echo "configure:56387: checking for $ac_word" >&5 -+echo "configure:56391: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -56411,21 +56415,21 @@ - fi - - echo $ac_n "checking for inline""... $ac_c" 1>&6 --echo "configure:56415: checking for inline" >&5 -+echo "configure:56419: checking for inline" >&5 - if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:56433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break - else -@@ -56451,12 +56455,12 @@ - esac - - echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 --echo "configure:56455: checking return type of signal handlers" >&5 -+echo "configure:56459: checking return type of signal handlers" >&5 - if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -56473,7 +56477,7 @@ - int i; - ; return 0; } - EOF --if { (eval echo configure:56477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:56481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void - else -@@ -56504,12 +56508,12 @@ - - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 --echo "configure:56508: checking for ANSI C header files" >&5 -+echo "configure:56512: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -56517,7 +56521,7 @@ - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:56521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:56525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -56534,7 +56538,7 @@ - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -56552,7 +56556,7 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -56573,7 +56577,7 @@ - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -@@ -56584,7 +56588,7 @@ - exit (0); } - - EOF --if { (eval echo configure:56588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:56592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else -@@ -56617,17 +56621,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:56621: checking for $ac_hdr" >&5 -+echo "configure:56625: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:56631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:56635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -56659,7 +56663,7 @@ - - - echo $ac_n "checking size of char""... $ac_c" 1>&6 --echo "configure:56663: checking size of char" >&5 -+echo "configure:56667: checking size of char" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -56667,9 +56671,10 @@ - ac_cv_sizeof_char=1 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -56678,7 +56683,7 @@ - exit(0); - } - EOF --if { (eval echo configure:56682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:56687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_char=`cat conftestval` - else -@@ -56699,7 +56704,7 @@ - - - echo $ac_n "checking size of int""... $ac_c" 1>&6 --echo "configure:56703: checking size of int" >&5 -+echo "configure:56708: checking size of int" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -56707,9 +56712,10 @@ - ac_cv_sizeof_int=4 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -56718,7 +56724,7 @@ - exit(0); - } - EOF --if { (eval echo configure:56722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:56728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_int=`cat conftestval` - else -@@ -56738,7 +56744,7 @@ - - - echo $ac_n "checking size of long""... $ac_c" 1>&6 --echo "configure:56742: checking size of long" >&5 -+echo "configure:56748: checking size of long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -56746,9 +56752,10 @@ - ac_cv_sizeof_long=4 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -56757,7 +56764,7 @@ - exit(0); - } - EOF --if { (eval echo configure:56761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:56768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long=`cat conftestval` - else -@@ -56777,7 +56784,7 @@ - - - echo $ac_n "checking size of long long""... $ac_c" 1>&6 --echo "configure:56781: checking size of long long" >&5 -+echo "configure:56788: checking size of long long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -56785,9 +56792,10 @@ - ac_cv_sizeof_long_long=8 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -56796,7 +56804,7 @@ - exit(0); - } - EOF --if { (eval echo configure:56800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:56808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long_long=`cat conftestval` - else -@@ -56816,12 +56824,12 @@ - - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 --echo "configure:56820: checking for size_t" >&5 -+echo "configure:56828: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -56849,12 +56857,12 @@ - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 --echo "configure:56853: checking whether time.h and sys/time.h may both be included" >&5 -+echo "configure:56861: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -56863,7 +56871,7 @@ - struct tm *tp; - ; return 0; } - EOF --if { (eval echo configure:56867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:56875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else -@@ -56884,12 +56892,12 @@ - fi - - echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 --echo "configure:56888: checking for uid_t in sys/types.h" >&5 -+echo "configure:56896: checking for uid_t in sys/types.h" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF -@@ -56919,7 +56927,7 @@ - - - echo $ac_n "checking for type ulong""... $ac_c" 1>&6 --echo "configure:56923: checking for type ulong" >&5 -+echo "configure:56931: checking for type ulong" >&5 - if eval "test \"`echo '$''{'ac_cv_ulong'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -56927,7 +56935,7 @@ - ac_cv_ulong=no - else - cat > conftest.$ac_ext < - #include -@@ -56938,7 +56946,7 @@ - exit(0); - } - EOF --if { (eval echo configure:56942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:56950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_ulong=yes - else -@@ -56962,7 +56970,7 @@ - fi - - echo $ac_n "checking for type uchar""... $ac_c" 1>&6 --echo "configure:56966: checking for type uchar" >&5 -+echo "configure:56974: checking for type uchar" >&5 - if eval "test \"`echo '$''{'ac_cv_uchar'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -56970,7 +56978,7 @@ - ac_cv_uchar=no - else - cat > conftest.$ac_ext < - #include -@@ -56981,7 +56989,7 @@ - exit(0); - } - EOF --if { (eval echo configure:56985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:56993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_uchar=yes - else -@@ -57005,7 +57013,7 @@ - fi - - echo $ac_n "checking for type uint""... $ac_c" 1>&6 --echo "configure:57009: checking for type uint" >&5 -+echo "configure:57017: checking for type uint" >&5 - if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -57013,7 +57021,7 @@ - ac_cv_uint=no - else - cat > conftest.$ac_ext < - #include -@@ -57024,7 +57032,7 @@ - exit(0); - } - EOF --if { (eval echo configure:57028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:57036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_uint=yes - else -@@ -57048,7 +57056,7 @@ - fi - - echo $ac_n "checking for type ushort""... $ac_c" 1>&6 --echo "configure:57052: checking for type ushort" >&5 -+echo "configure:57060: checking for type ushort" >&5 - if eval "test \"`echo '$''{'ac_cv_ushort'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -57056,7 +57064,7 @@ - ac_cv_ushort=no - else - cat > conftest.$ac_ext < - #include -@@ -57067,7 +57075,7 @@ - exit(0); - } - EOF --if { (eval echo configure:57071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:57079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_ushort=yes - else -@@ -57091,7 +57099,7 @@ - fi - - echo $ac_n "checking for int8""... $ac_c" 1>&6 --echo "configure:57095: checking for int8" >&5 -+echo "configure:57103: checking for int8" >&5 - if eval "test \"`echo '$''{'ac_cv_int8'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -57099,7 +57107,7 @@ - ac_cv_int8=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:57133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_int8=yes - else -@@ -57147,7 +57155,7 @@ - - ac_save_CXXFLAGS="$CXXFLAGS" - echo $ac_n "checking base type of last arg to accept""... $ac_c" 1>&6 --echo "configure:57151: checking base type of last arg to accept" >&5 -+echo "configure:57159: checking base type of last arg to accept" >&5 - if eval "test \"`echo '$''{'mysql_cv_btype_last_arg_accept'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -57165,7 +57173,7 @@ - fi - mysql_cv_btype_last_arg_accept=none - cat > conftest.$ac_ext < - #include -@@ -57175,7 +57183,7 @@ - int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0); - ; return 0; } - EOF --if { (eval echo configure:57179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:57187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_btype_last_arg_accept=socklen_t - else -@@ -57185,7 +57193,7 @@ - rm -f conftest* - if test $mysql_cv_btype_last_arg_accept = none; then - cat > conftest.$ac_ext < - #include -@@ -57195,7 +57203,7 @@ - int a = accept(1, (struct sockaddr *) 0, (size_t *) 0); - ; return 0; } - EOF --if { (eval echo configure:57199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:57207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_btype_last_arg_accept=size_t - else -@@ -57224,12 +57232,12 @@ - CXXFLAGS="$ac_save_CXXFLAGS" - - echo $ac_n "checking return type of qsort""... $ac_c" 1>&6 --echo "configure:57228: checking return type of qsort" >&5 -+echo "configure:57236: checking return type of qsort" >&5 - if eval "test \"`echo '$''{'mysql_cv_type_qsort'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #ifdef __cplusplus -@@ -57242,7 +57250,7 @@ - int i; - ; return 0; } - EOF --if { (eval echo configure:57246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:57254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_type_qsort=void - else -@@ -57292,12 +57300,12 @@ - crypt dlopen dlerror fchmod getpass getpassphrase - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:57296: checking for $ac_func" >&5 -+echo "configure:57304: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:57332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -57349,12 +57357,12 @@ - for ac_func in strtok_r - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:57353: checking for $ac_func" >&5 -+echo "configure:57361: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:57389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -57406,7 +57414,7 @@ - # Check definition of gethostbyname_r (glibc2.0.100 is different from Solaris) - ac_save_CXXFLAGS="$CXXFLAGS" - echo $ac_n "checking style of gethostname_r routines""... $ac_c" 1>&6 --echo "configure:57410: checking style of gethostname_r routines" >&5 -+echo "configure:57418: checking style of gethostname_r routines" >&5 - if eval "test \"`echo '$''{'mysql_cv_gethostname_style'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -57423,7 +57431,7 @@ - CXXFLAGS="$CXXFLAGS -Werror" - fi - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:57453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_gethostname_style=glibc2 - else -@@ -57473,7 +57481,7 @@ - # Check 3rd argument of getthostbyname_r - ac_save_CXXFLAGS="$CXXFLAGS" - echo $ac_n "checking 3 argument to gethostname_r routines""... $ac_c" 1>&6 --echo "configure:57477: checking 3 argument to gethostname_r routines" >&5 -+echo "configure:57485: checking 3 argument to gethostname_r routines" >&5 - if eval "test \"`echo '$''{'mysql_cv_gethostname_arg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -57490,7 +57498,7 @@ - CXXFLAGS="$CXXFLAGS -Werror" - fi - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:57519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_gethostname_arg=hostent_data - else -@@ -57540,12 +57548,12 @@ - - # Check definition of pthread_getspecific - echo $ac_n "checking "args to pthread_getspecific"""... $ac_c" 1>&6 --echo "configure:57544: checking "args to pthread_getspecific"" >&5 -+echo "configure:57552: checking "args to pthread_getspecific"" >&5 - if eval "test \"`echo '$''{'mysql_cv_getspecific_args'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:57569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_getspecific_args=POSIX - else -@@ -57581,12 +57589,12 @@ - - # Check definition of pthread_mutex_init - echo $ac_n "checking "args to pthread_mutex_init"""... $ac_c" 1>&6 --echo "configure:57585: checking "args to pthread_mutex_init"" >&5 -+echo "configure:57593: checking "args to pthread_mutex_init"" >&5 - if eval "test \"`echo '$''{'mysql_cv_mutex_init_args'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:57612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_mutex_init_args=POSIX - else -@@ -57624,12 +57632,12 @@ - - # Check definition of readdir_r - echo $ac_n "checking "args to readdir_r"""... $ac_c" 1>&6 --echo "configure:57628: checking "args to readdir_r"" >&5 -+echo "configure:57636: checking "args to readdir_r"" >&5 - if eval "test \"`echo '$''{'mysql_cv_readdir_r'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:57654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - mysql_cv_readdir_r=POSIX - else -@@ -57666,12 +57674,12 @@ - - # Check definition av posix sigwait() - echo $ac_n "checking "style of sigwait"""... $ac_c" 1>&6 --echo "configure:57670: checking "style of sigwait"" >&5 -+echo "configure:57678: checking "style of sigwait"" >&5 - if eval "test \"`echo '$''{'mysql_cv_sigwait'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:57699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - mysql_cv_sigwait=POSIX - else -@@ -57713,12 +57721,12 @@ - unset mysql_cv_sigwait - # Check definition av posix sigwait() - echo $ac_n "checking "style of sigwait"""... $ac_c" 1>&6 --echo "configure:57717: checking "style of sigwait"" >&5 -+echo "configure:57725: checking "style of sigwait"" >&5 - if eval "test \"`echo '$''{'mysql_cv_sigwait'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:57744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - mysql_cv_sigwait=NONPOSIX - else -@@ -58000,7 +58008,7 @@ - - - echo $ac_n "checking size of char""... $ac_c" 1>&6 --echo "configure:58004: checking size of char" >&5 -+echo "configure:58012: checking size of char" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58008,9 +58016,10 @@ - ac_cv_sizeof_char=1 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -58019,7 +58028,7 @@ - exit(0); - } - EOF --if { (eval echo configure:58023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_char=`cat conftestval` - else -@@ -58040,7 +58049,7 @@ - - - echo $ac_n "checking size of int""... $ac_c" 1>&6 --echo "configure:58044: checking size of int" >&5 -+echo "configure:58053: checking size of int" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58048,9 +58057,10 @@ - ac_cv_sizeof_int=4 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -58059,7 +58069,7 @@ - exit(0); - } - EOF --if { (eval echo configure:58063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_int=`cat conftestval` - else -@@ -58079,7 +58089,7 @@ - - - echo $ac_n "checking size of long""... $ac_c" 1>&6 --echo "configure:58083: checking size of long" >&5 -+echo "configure:58093: checking size of long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58087,9 +58097,10 @@ - ac_cv_sizeof_long=4 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -58098,7 +58109,7 @@ - exit(0); - } - EOF --if { (eval echo configure:58102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long=`cat conftestval` - else -@@ -58118,7 +58129,7 @@ - - - echo $ac_n "checking size of long long""... $ac_c" 1>&6 --echo "configure:58122: checking size of long long" >&5 -+echo "configure:58133: checking size of long long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58126,9 +58137,10 @@ - ac_cv_sizeof_long_long=8 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -58137,7 +58149,7 @@ - exit(0); - } - EOF --if { (eval echo configure:58141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long_long=`cat conftestval` - else -@@ -58157,12 +58169,12 @@ - - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 --echo "configure:58161: checking for size_t" >&5 -+echo "configure:58173: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -58190,12 +58202,12 @@ - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 --echo "configure:58194: checking whether time.h and sys/time.h may both be included" >&5 -+echo "configure:58206: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -58204,7 +58216,7 @@ - struct tm *tp; - ; return 0; } - EOF --if { (eval echo configure:58208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:58220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else -@@ -58225,12 +58237,12 @@ - fi - - echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 --echo "configure:58229: checking for uid_t in sys/types.h" >&5 -+echo "configure:58241: checking for uid_t in sys/types.h" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF -@@ -58260,7 +58272,7 @@ - - - echo $ac_n "checking for type ulong""... $ac_c" 1>&6 --echo "configure:58264: checking for type ulong" >&5 -+echo "configure:58276: checking for type ulong" >&5 - if eval "test \"`echo '$''{'ac_cv_ulong'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58268,7 +58280,7 @@ - ac_cv_ulong=no - else - cat > conftest.$ac_ext < - #include -@@ -58279,7 +58291,7 @@ - exit(0); - } - EOF --if { (eval echo configure:58283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_ulong=yes - else -@@ -58303,7 +58315,7 @@ - fi - - echo $ac_n "checking for type uchar""... $ac_c" 1>&6 --echo "configure:58307: checking for type uchar" >&5 -+echo "configure:58319: checking for type uchar" >&5 - if eval "test \"`echo '$''{'ac_cv_uchar'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58311,7 +58323,7 @@ - ac_cv_uchar=no - else - cat > conftest.$ac_ext < - #include -@@ -58322,7 +58334,7 @@ - exit(0); - } - EOF --if { (eval echo configure:58326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_uchar=yes - else -@@ -58346,7 +58358,7 @@ - fi - - echo $ac_n "checking for type uint""... $ac_c" 1>&6 --echo "configure:58350: checking for type uint" >&5 -+echo "configure:58362: checking for type uint" >&5 - if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58354,7 +58366,7 @@ - ac_cv_uint=no - else - cat > conftest.$ac_ext < - #include -@@ -58365,7 +58377,7 @@ - exit(0); - } - EOF --if { (eval echo configure:58369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_uint=yes - else -@@ -58389,7 +58401,7 @@ - fi - - echo $ac_n "checking for type ushort""... $ac_c" 1>&6 --echo "configure:58393: checking for type ushort" >&5 -+echo "configure:58405: checking for type ushort" >&5 - if eval "test \"`echo '$''{'ac_cv_ushort'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58397,7 +58409,7 @@ - ac_cv_ushort=no - else - cat > conftest.$ac_ext < - #include -@@ -58408,7 +58420,7 @@ - exit(0); - } - EOF --if { (eval echo configure:58412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_ushort=yes - else -@@ -58432,7 +58444,7 @@ - fi - - echo $ac_n "checking for int8""... $ac_c" 1>&6 --echo "configure:58436: checking for int8" >&5 -+echo "configure:58448: checking for int8" >&5 - if eval "test \"`echo '$''{'ac_cv_int8'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58440,7 +58452,7 @@ - ac_cv_int8=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:58478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_int8=yes - else -@@ -58488,7 +58500,7 @@ - - ac_save_CXXFLAGS="$CXXFLAGS" - echo $ac_n "checking base type of last arg to accept""... $ac_c" 1>&6 --echo "configure:58492: checking base type of last arg to accept" >&5 -+echo "configure:58504: checking base type of last arg to accept" >&5 - if eval "test \"`echo '$''{'mysql_cv_btype_last_arg_accept'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -58506,7 +58518,7 @@ - fi - mysql_cv_btype_last_arg_accept=none - cat > conftest.$ac_ext < - #include -@@ -58516,7 +58528,7 @@ - int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0); - ; return 0; } - EOF --if { (eval echo configure:58520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:58532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_btype_last_arg_accept=socklen_t - else -@@ -58526,7 +58538,7 @@ - rm -f conftest* - if test $mysql_cv_btype_last_arg_accept = none; then - cat > conftest.$ac_ext < - #include -@@ -58536,7 +58548,7 @@ - int a = accept(1, (struct sockaddr *) 0, (size_t *) 0); - ; return 0; } - EOF --if { (eval echo configure:58540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:58552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_btype_last_arg_accept=size_t - else -@@ -58565,12 +58577,12 @@ - CXXFLAGS="$ac_save_CXXFLAGS" - - echo $ac_n "checking return type of qsort""... $ac_c" 1>&6 --echo "configure:58569: checking return type of qsort" >&5 -+echo "configure:58581: checking return type of qsort" >&5 - if eval "test \"`echo '$''{'mysql_cv_type_qsort'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #ifdef __cplusplus -@@ -58583,7 +58595,7 @@ - int i; - ; return 0; } - EOF --if { (eval echo configure:58587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:58599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - mysql_cv_type_qsort=void - else -@@ -58947,7 +58959,7 @@ - done - - echo $ac_n "checking for mysql_close in -lmysqlclient""... $ac_c" 1>&6 --echo "configure:58951: checking for mysql_close in -lmysqlclient" >&5 -+echo "configure:58963: checking for mysql_close in -lmysqlclient" >&5 - ac_lib_var=`echo mysqlclient'_'mysql_close | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -58955,7 +58967,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmysqlclient $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:58982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -59171,7 +59183,7 @@ - done - - echo $ac_n "checking for mysql_error in -lmysqlclient""... $ac_c" 1>&6 --echo "configure:59175: checking for mysql_error in -lmysqlclient" >&5 -+echo "configure:59187: checking for mysql_error in -lmysqlclient" >&5 - ac_lib_var=`echo mysqlclient'_'mysql_error | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -59179,7 +59191,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmysqlclient $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:59206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -59328,7 +59340,7 @@ - done - - echo $ac_n "checking for mysql_errno in -lmysqlclient""... $ac_c" 1>&6 --echo "configure:59332: checking for mysql_errno in -lmysqlclient" >&5 -+echo "configure:59344: checking for mysql_errno in -lmysqlclient" >&5 - ac_lib_var=`echo mysqlclient'_'mysql_errno | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -59336,7 +59348,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lmysqlclient $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:59363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -59547,7 +59559,7 @@ - - - echo $ac_n "checking for ncurses support""... $ac_c" 1>&6 --echo "configure:59551: checking for ncurses support" >&5 -+echo "configure:59563: checking for ncurses support" >&5 - # Check whether --with-ncurses or --without-ncurses was given. - if test "${with_ncurses+set}" = set; then - withval="$with_ncurses" -@@ -59737,7 +59749,7 @@ - done - - echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6 --echo "configure:59741: checking for $LIBSYMBOL in -l$LIBNAME" >&5 -+echo "configure:59753: checking for $LIBSYMBOL in -l$LIBNAME" >&5 - ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -59745,7 +59757,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$LIBNAME $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:59772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -59957,7 +59969,7 @@ - done - - echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6 --echo "configure:59961: checking for new_panel in -lpanel" >&5 -+echo "configure:59973: checking for new_panel in -lpanel" >&5 - ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -59965,7 +59977,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpanel $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:59992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -60123,7 +60135,7 @@ - - - echo $ac_n "checking for color_set in -l$LIBNAME""... $ac_c" 1>&6 --echo "configure:60127: checking for color_set in -l$LIBNAME" >&5 -+echo "configure:60139: checking for color_set in -l$LIBNAME" >&5 - ac_lib_var=`echo $LIBNAME'_'color_set | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -60131,7 +60143,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$LIBNAME $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:60158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -60166,7 +60178,7 @@ - fi - - echo $ac_n "checking for slk_color in -l$LIBNAME""... $ac_c" 1>&6 --echo "configure:60170: checking for slk_color in -l$LIBNAME" >&5 -+echo "configure:60182: checking for slk_color in -l$LIBNAME" >&5 - ac_lib_var=`echo $LIBNAME'_'slk_color | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -60174,7 +60186,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$LIBNAME $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:60201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -60209,7 +60221,7 @@ - fi - - echo $ac_n "checking for assume_default_colors in -l$LIBNAME""... $ac_c" 1>&6 --echo "configure:60213: checking for assume_default_colors in -l$LIBNAME" >&5 -+echo "configure:60225: checking for assume_default_colors in -l$LIBNAME" >&5 - ac_lib_var=`echo $LIBNAME'_'assume_default_colors | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -60217,7 +60229,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$LIBNAME $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:60244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -60252,7 +60264,7 @@ - fi - - echo $ac_n "checking for use_extended_names in -l$LIBNAME""... $ac_c" 1>&6 --echo "configure:60256: checking for use_extended_names in -l$LIBNAME" >&5 -+echo "configure:60268: checking for use_extended_names in -l$LIBNAME" >&5 - ac_lib_var=`echo $LIBNAME'_'use_extended_names | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -60260,7 +60272,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$LIBNAME $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:60287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -60532,7 +60544,7 @@ - - - echo $ac_n "checking for Oracle (OCI8) support using ORACLE_HOME installation""... $ac_c" 1>&6 --echo "configure:60536: checking for Oracle (OCI8) support using ORACLE_HOME installation" >&5 -+echo "configure:60548: checking for Oracle (OCI8) support using ORACLE_HOME installation" >&5 - # Check whether --with-oci8 or --without-oci8 was given. - if test "${with_oci8+set}" = set; then - withval="$with_oci8" -@@ -60579,7 +60591,7 @@ - - - echo $ac_n "checking for Oracle (OCI8) support using Oracle Instant Client""... $ac_c" 1>&6 --echo "configure:60583: checking for Oracle (OCI8) support using Oracle Instant Client" >&5 -+echo "configure:60595: checking for Oracle (OCI8) support using Oracle Instant Client" >&5 - # Check whether --with-oci8-instant-client or --without-oci8-instant-client was given. - if test "${with_oci8_instant_client+set}" = set; then - withval="$with_oci8_instant_client" -@@ -60632,7 +60644,7 @@ - fi - - echo $ac_n "checking Oracle Install Directory""... $ac_c" 1>&6 --echo "configure:60636: checking Oracle Install Directory" >&5 -+echo "configure:60648: checking Oracle Install Directory" >&5 - if test "$PHP_OCI8" = "yes"; then - OCI8_DIR=$ORACLE_HOME - else -@@ -60927,7 +60939,7 @@ - - - echo $ac_n "checking Oracle version""... $ac_c" 1>&6 --echo "configure:60931: checking Oracle version" >&5 -+echo "configure:60943: checking Oracle version" >&5 - if test -s "$OCI8_DIR/orainst/unix.rgs"; then - OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | sed 's/ */:/g' | cut -d: -f 6 | cut -c 2-4` - test -z "$OCI8_VERSION" && OCI8_VERSION=7.3 -@@ -61404,7 +61416,7 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=$OCI8_INCLUDES - cat > conftest.$ac_ext < -@@ -61581,7 +61593,7 @@ - done - - echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6 --echo "configure:61585: checking for OCIEnvNlsCreate in -lclntsh" >&5 -+echo "configure:61597: checking for OCIEnvNlsCreate in -lclntsh" >&5 - ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -61589,7 +61601,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lclntsh $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:61616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -61700,7 +61712,7 @@ - done - - echo $ac_n "checking for OCINlsCharSetNameToId in -lclntsh""... $ac_c" 1>&6 --echo "configure:61704: checking for OCINlsCharSetNameToId in -lclntsh" >&5 -+echo "configure:61716: checking for OCINlsCharSetNameToId in -lclntsh" >&5 - ac_lib_var=`echo clntsh'_'OCINlsCharSetNameToId | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -61708,7 +61720,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lclntsh $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:61735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -61934,7 +61946,7 @@ - done - - echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6 --echo "configure:61938: checking for OCILobIsTemporary in -lclntsh" >&5 -+echo "configure:61950: checking for OCILobIsTemporary in -lclntsh" >&5 - ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -61942,7 +61954,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lclntsh $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:61969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -62066,7 +62078,7 @@ - done - - echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6 --echo "configure:62070: checking for OCILobIsTemporary in -locijdbc8" >&5 -+echo "configure:62082: checking for OCILobIsTemporary in -locijdbc8" >&5 - ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -62074,7 +62086,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-locijdbc8 $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:62101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -62229,7 +62241,7 @@ - done - - echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6 --echo "configure:62233: checking for OCICollAssign in -lclntsh" >&5 -+echo "configure:62245: checking for OCICollAssign in -lclntsh" >&5 - ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -62237,7 +62249,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lclntsh $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:62264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -62533,7 +62545,7 @@ - elif test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then - - echo $ac_n "checking Oracle Instant Client directory""... $ac_c" 1>&6 --echo "configure:62537: checking Oracle Instant Client directory" >&5 -+echo "configure:62549: checking Oracle Instant Client directory" >&5 - if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then - PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib 2> /dev/null | tail -1` - if test -z "$PHP_OCI8_INSTANT_CLIENT"; then -@@ -62545,7 +62557,7 @@ - OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT - - echo $ac_n "checking Oracle Instant Client SDK header directory""... $ac_c" 1>&6 --echo "configure:62549: checking Oracle Instant Client SDK header directory" >&5 -+echo "configure:62561: checking Oracle Instant Client SDK header directory" >&5 - - OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | sed -e 's!^/usr/lib/oracle/\(.*\)/client/lib[/]*$!/usr/include/oracle/\1/client!'` - -@@ -62701,7 +62713,7 @@ - - - echo $ac_n "checking Oracle Instant Client version""... $ac_c" 1>&6 --echo "configure:62705: checking Oracle Instant Client version" >&5 -+echo "configure:62717: checking Oracle Instant Client version" >&5 - if test -f $PHP_OCI8_INSTANT_CLIENT/libociei.$SHLIB_SUFFIX_NAME; then - if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then - if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then -@@ -63063,7 +63075,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for Adabas support""... $ac_c" 1>&6 --echo "configure:63067: checking for Adabas support" >&5 -+echo "configure:63079: checking for Adabas support" >&5 - # Check whether --with-adabas or --without-adabas was given. - if test "${with_adabas+set}" = set; then - withval="$with_adabas" -@@ -63256,7 +63268,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for SAP DB support""... $ac_c" 1>&6 --echo "configure:63260: checking for SAP DB support" >&5 -+echo "configure:63272: checking for SAP DB support" >&5 - # Check whether --with-sapdb or --without-sapdb was given. - if test "${with_sapdb+set}" = set; then - withval="$with_sapdb" -@@ -63386,7 +63398,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for Solid support""... $ac_c" 1>&6 --echo "configure:63390: checking for Solid support" >&5 -+echo "configure:63402: checking for Solid support" >&5 - # Check whether --with-solid or --without-solid was given. - if test "${with_solid+set}" = set; then - withval="$with_solid" -@@ -63444,7 +63456,7 @@ - echo "$ac_t""yes" 1>&6 - - echo $ac_n "checking Solid library file""... $ac_c" 1>&6 --echo "configure:63448: checking Solid library file" >&5 -+echo "configure:63460: checking Solid library file" >&5 - ac_solid_uname_r=`uname -r 2>/dev/null` - ac_solid_uname_s=`uname -s 2>/dev/null` - case $ac_solid_uname_s in -@@ -63530,7 +63542,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for IBM DB2 support""... $ac_c" 1>&6 --echo "configure:63534: checking for IBM DB2 support" >&5 -+echo "configure:63546: checking for IBM DB2 support" >&5 - # Check whether --with-ibm-db2 or --without-ibm-db2 was given. - if test "${with_ibm_db2+set}" = set; then - withval="$with_ibm_db2" -@@ -63602,7 +63614,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for Empress support""... $ac_c" 1>&6 --echo "configure:63606: checking for Empress support" >&5 -+echo "configure:63618: checking for Empress support" >&5 - # Check whether --with-empress or --without-empress was given. - if test "${with_empress+set}" = set; then - withval="$with_empress" -@@ -63651,7 +63663,7 @@ - echo "$ac_t""yes" 1>&6 - - echo $ac_n "checking Empress library file""... $ac_c" 1>&6 --echo "configure:63655: checking Empress library file" >&5 -+echo "configure:63667: checking Empress library file" >&5 - ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1` - if test ! -f $ODBC_LIBS; then - ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1` -@@ -63672,7 +63684,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for Empress local access support""... $ac_c" 1>&6 --echo "configure:63676: checking for Empress local access support" >&5 -+echo "configure:63688: checking for Empress local access support" >&5 - # Check whether --with-empress-bcs or --without-empress-bcs was given. - if test "${with_empress_bcs+set}" = set; then - withval="$with_empress_bcs" -@@ -63737,7 +63749,7 @@ - echo "$ac_t""yes" 1>&6 - - echo $ac_n "checking Empress local access library file""... $ac_c" 1>&6 --echo "configure:63741: checking Empress local access library file" >&5 -+echo "configure:63753: checking Empress local access library file" >&5 - ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1` - if test ! -f $ODBCBCS_LIBS; then - ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1` -@@ -63758,7 +63770,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for Birdstep support""... $ac_c" 1>&6 --echo "configure:63762: checking for Birdstep support" >&5 -+echo "configure:63774: checking for Birdstep support" >&5 - # Check whether --with-birdstep or --without-birdstep was given. - if test "${with_birdstep+set}" = set; then - withval="$with_birdstep" -@@ -63822,7 +63834,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for a custom ODBC support""... $ac_c" 1>&6 --echo "configure:63826: checking for a custom ODBC support" >&5 -+echo "configure:63838: checking for a custom ODBC support" >&5 - # Check whether --with-custom-odbc or --without-custom-odbc was given. - if test "${with_custom_odbc+set}" = set; then - withval="$with_custom_odbc" -@@ -63856,7 +63868,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for iODBC support""... $ac_c" 1>&6 --echo "configure:63860: checking for iODBC support" >&5 -+echo "configure:63872: checking for iODBC support" >&5 - # Check whether --with-iodbc or --without-iodbc was given. - if test "${with_iodbc+set}" = set; then - withval="$with_iodbc" -@@ -63998,7 +64010,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for Easysoft ODBC-ODBC Bridge support""... $ac_c" 1>&6 --echo "configure:64002: checking for Easysoft ODBC-ODBC Bridge support" >&5 -+echo "configure:64014: checking for Easysoft ODBC-ODBC Bridge support" >&5 - # Check whether --with-esoob or --without-esoob was given. - if test "${with_esoob+set}" = set; then - withval="$with_esoob" -@@ -64058,7 +64070,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for unixODBC support""... $ac_c" 1>&6 --echo "configure:64062: checking for unixODBC support" >&5 -+echo "configure:64074: checking for unixODBC support" >&5 - # Check whether --with-unixODBC or --without-unixODBC was given. - if test "${with_unixODBC+set}" = set; then - withval="$with_unixODBC" -@@ -64118,7 +64130,7 @@ - - if test -z "$ODBC_TYPE"; then - echo $ac_n "checking for DBMaker support""... $ac_c" 1>&6 --echo "configure:64122: checking for DBMaker support" >&5 -+echo "configure:64134: checking for DBMaker support" >&5 - # Check whether --with-dbmaker or --without-dbmaker was given. - if test "${with_dbmaker+set}" = set; then - withval="$with_dbmaker" -@@ -64636,7 +64648,7 @@ - - - echo $ac_n "checking for Oracle-ORACLE support""... $ac_c" 1>&6 --echo "configure:64640: checking for Oracle-ORACLE support" >&5 -+echo "configure:64652: checking for Oracle-ORACLE support" >&5 - # Check whether --with-oracle or --without-oracle was given. - if test "${with_oracle+set}" = set; then - withval="$with_oracle" -@@ -64681,7 +64693,7 @@ - - if test "$PHP_ORACLE" != "no"; then - echo $ac_n "checking Oracle Install-Dir""... $ac_c" 1>&6 --echo "configure:64685: checking Oracle Install-Dir" >&5 -+echo "configure:64697: checking Oracle Install-Dir" >&5 - if test "$PHP_ORACLE" = "yes"; then - ORACLE_DIR=$ORACLE_HOME - else -@@ -64972,7 +64984,7 @@ - - - echo $ac_n "checking Oracle version""... $ac_c" 1>&6 --echo "configure:64976: checking Oracle version" >&5 -+echo "configure:64988: checking Oracle version" >&5 - if test -s "$ORACLE_DIR/orainst/unix.rgs"; then - ORACLE_VERSION=`grep '"ocommon"' $ORACLE_DIR/orainst/unix.rgs | sed 's/ */:/g' | cut -d: -f 6 | cut -c 2-4` - test -z "$ORACLE_VERSION" && ORACLE_VERSION=7.3 -@@ -69669,7 +69681,7 @@ - - - echo $ac_n "checking whether to enable user-space object overloading support""... $ac_c" 1>&6 --echo "configure:69673: checking whether to enable user-space object overloading support" >&5 -+echo "configure:69685: checking whether to enable user-space object overloading support" >&5 - # Check whether --enable-overload or --disable-overload was given. - if test "${enable_overload+set}" = set; then - enableval="$enable_overload" -@@ -69944,7 +69956,7 @@ - - - echo $ac_n "checking for Ovrimos SQL Server support""... $ac_c" 1>&6 --echo "configure:69948: checking for Ovrimos SQL Server support" >&5 -+echo "configure:69960: checking for Ovrimos SQL Server support" >&5 - # Check whether --with-ovrimos or --without-ovrimos was given. - if test "${with_ovrimos+set}" = set; then - withval="$with_ovrimos" -@@ -70029,7 +70041,7 @@ - - LDFLAGS="$LDFLAGS $ld_runpath_switch$OVRIMOS_DIR/lib -L$OVRIMOS_DIR/lib" - echo $ac_n "checking for main in -lsqlcli""... $ac_c" 1>&6 --echo "configure:70033: checking for main in -lsqlcli" >&5 -+echo "configure:70045: checking for main in -lsqlcli" >&5 - ac_lib_var=`echo sqlcli'_'main | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -70037,14 +70049,14 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsqlcli $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:70060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -70403,7 +70415,7 @@ - - - echo $ac_n "checking whether to enable pcntl support""... $ac_c" 1>&6 --echo "configure:70407: checking whether to enable pcntl support" >&5 -+echo "configure:70419: checking whether to enable pcntl support" >&5 - # Check whether --enable-pcntl or --disable-pcntl was given. - if test "${enable_pcntl+set}" = set; then - enableval="$enable_pcntl" -@@ -70451,12 +70463,12 @@ - for ac_func in fork - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:70455: checking for $ac_func" >&5 -+echo "configure:70467: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:70495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -70510,12 +70522,12 @@ - for ac_func in waitpid - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:70514: checking for $ac_func" >&5 -+echo "configure:70526: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:70554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -70569,12 +70581,12 @@ - for ac_func in sigaction - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:70573: checking for $ac_func" >&5 -+echo "configure:70585: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:70613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -70854,7 +70866,7 @@ - - - echo $ac_n "checking for PCRE support""... $ac_c" 1>&6 --echo "configure:70858: checking for PCRE support" >&5 -+echo "configure:70870: checking for PCRE support" >&5 - # Check whether --with-pcre-regex or --without-pcre-regex was given. - if test "${with_pcre_regex+set}" = set; then - withval="$with_pcre_regex" -@@ -71520,7 +71532,7 @@ - - - echo $ac_n "checking for PDFlib support""... $ac_c" 1>&6 --echo "configure:71524: checking for PDFlib support" >&5 -+echo "configure:71536: checking for PDFlib support" >&5 - # Check whether --with-pdflib or --without-pdflib was given. - if test "${with_pdflib+set}" = set; then - withval="$with_pdflib" -@@ -71567,7 +71579,7 @@ - - - echo $ac_n "checking for the location of libjpeg""... $ac_c" 1>&6 --echo "configure:71571: checking for the location of libjpeg" >&5 -+echo "configure:71583: checking for the location of libjpeg" >&5 - # Check whether --with-jpeg-dir or --without-jpeg-dir was given. - if test "${with_jpeg_dir+set}" = set; then - withval="$with_jpeg_dir" -@@ -71594,7 +71606,7 @@ - - - echo $ac_n "checking for the location of libpng""... $ac_c" 1>&6 --echo "configure:71598: checking for the location of libpng" >&5 -+echo "configure:71610: checking for the location of libpng" >&5 - # Check whether --with-png-dir or --without-png-dir was given. - if test "${with_png_dir+set}" = set; then - withval="$with_png_dir" -@@ -71621,7 +71633,7 @@ - - - echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 --echo "configure:71625: checking for the location of libz" >&5 -+echo "configure:71637: checking for the location of libz" >&5 - # Check whether --with-zlib-dir or --without-zlib-dir was given. - if test "${with_zlib_dir+set}" = set; then - withval="$with_zlib_dir" -@@ -71647,7 +71659,7 @@ - - - echo $ac_n "checking for the location of libtiff""... $ac_c" 1>&6 --echo "configure:71651: checking for the location of libtiff" >&5 -+echo "configure:71663: checking for the location of libtiff" >&5 - # Check whether --with-tiff-dir or --without-tiff-dir was given. - if test "${with_tiff_dir+set}" = set; then - withval="$with_tiff_dir" -@@ -71979,7 +71991,7 @@ - done - - echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 --echo "configure:71983: checking for jpeg_read_header in -ljpeg" >&5 -+echo "configure:71995: checking for jpeg_read_header in -ljpeg" >&5 - ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -71987,7 +71999,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ljpeg $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:72014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -72213,7 +72225,7 @@ - done - - echo $ac_n "checking for png_create_info_struct in -lpng""... $ac_c" 1>&6 --echo "configure:72217: checking for png_create_info_struct in -lpng" >&5 -+echo "configure:72229: checking for png_create_info_struct in -lpng" >&5 - ac_lib_var=`echo png'_'png_create_info_struct | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -72221,7 +72233,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpng $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:72248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -72447,7 +72459,7 @@ - done - - echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6 --echo "configure:72451: checking for TIFFOpen in -ltiff" >&5 -+echo "configure:72463: checking for TIFFOpen in -ltiff" >&5 - ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -72455,7 +72467,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ltiff $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:72482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -72600,7 +72612,7 @@ - fi - - echo $ac_n "checking for the location of zlib""... $ac_c" 1>&6 --echo "configure:72604: checking for the location of zlib" >&5 -+echo "configure:72616: checking for the location of zlib" >&5 - if test "$PHP_ZLIB_DIR" = "no"; then - echo "$ac_t""no. If configure fails, try --with-zlib-dir=" 1>&6 - else -@@ -72748,7 +72760,7 @@ - case $PHP_PDFLIB in - yes) - echo $ac_n "checking for PDF_show_boxed in -lpdf""... $ac_c" 1>&6 --echo "configure:72752: checking for PDF_show_boxed in -lpdf" >&5 -+echo "configure:72764: checking for PDF_show_boxed in -lpdf" >&5 - ac_lib_var=`echo pdf'_'PDF_show_boxed | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -72756,7 +72768,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpdf $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:72783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -72907,7 +72919,7 @@ - done - - echo $ac_n "checking for PDF_show_boxed in -lpdf""... $ac_c" 1>&6 --echo "configure:72911: checking for PDF_show_boxed in -lpdf" >&5 -+echo "configure:72923: checking for PDF_show_boxed in -lpdf" >&5 - ac_lib_var=`echo pdf'_'PDF_show_boxed | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -72915,7 +72927,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpdf $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:72942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -73105,7 +73117,7 @@ - - - echo $ac_n "checking for Verisign Payflow Pro support""... $ac_c" 1>&6 --echo "configure:73109: checking for Verisign Payflow Pro support" >&5 -+echo "configure:73121: checking for Verisign Payflow Pro support" >&5 - # Check whether --with-pfpro or --without-pfpro was given. - if test "${with_pfpro+set}" = set; then - withval="$with_pfpro" -@@ -73265,7 +73277,7 @@ - done - - echo $ac_n "checking for pfproInit in -lpfpro""... $ac_c" 1>&6 --echo "configure:73269: checking for pfproInit in -lpfpro" >&5 -+echo "configure:73281: checking for pfproInit in -lpfpro" >&5 - ac_lib_var=`echo pfpro'_'pfproInit | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -73273,7 +73285,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpfpro $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:73300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -73394,7 +73406,7 @@ - done - - echo $ac_n "checking for PNInit in -lpfpro""... $ac_c" 1>&6 --echo "configure:73398: checking for PNInit in -lpfpro" >&5 -+echo "configure:73410: checking for PNInit in -lpfpro" >&5 - ac_lib_var=`echo pfpro'_'PNInit | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -73402,7 +73414,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpfpro $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:73429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -73818,7 +73830,7 @@ - - - echo $ac_n "checking for PostgreSQL support""... $ac_c" 1>&6 --echo "configure:73822: checking for PostgreSQL support" >&5 -+echo "configure:73834: checking for PostgreSQL support" >&5 - # Check whether --with-pgsql or --without-pgsql was given. - if test "${with_pgsql+set}" = set; then - withval="$with_pgsql" -@@ -73921,7 +73933,7 @@ - old_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR" - echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6 --echo "configure:73925: checking for PQescapeString in -lpq" >&5 -+echo "configure:73937: checking for PQescapeString in -lpq" >&5 - ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -73929,7 +73941,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpq $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:73956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -73964,7 +73976,7 @@ - fi - - echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6 --echo "configure:73968: checking for PQsetnonblocking in -lpq" >&5 -+echo "configure:73980: checking for PQsetnonblocking in -lpq" >&5 - ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -73972,7 +73984,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpq $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:73999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -74007,7 +74019,7 @@ - fi - - echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6 --echo "configure:74011: checking for PQcmdTuples in -lpq" >&5 -+echo "configure:74023: checking for PQcmdTuples in -lpq" >&5 - ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -74015,7 +74027,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpq $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:74042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -74050,7 +74062,7 @@ - fi - - echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6 --echo "configure:74054: checking for PQoidValue in -lpq" >&5 -+echo "configure:74066: checking for PQoidValue in -lpq" >&5 - ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -74058,7 +74070,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpq $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:74085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -74093,7 +74105,7 @@ - fi - - echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6 --echo "configure:74097: checking for PQclientEncoding in -lpq" >&5 -+echo "configure:74109: checking for PQclientEncoding in -lpq" >&5 - ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -74101,7 +74113,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpq $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:74128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -74136,7 +74148,7 @@ - fi - - echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6 --echo "configure:74140: checking for pg_encoding_to_char in -lpq" >&5 -+echo "configure:74152: checking for pg_encoding_to_char in -lpq" >&5 - ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -74144,7 +74156,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lpq $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:74171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -74542,7 +74554,7 @@ - - - echo $ac_n "checking whether to enable POSIX-like functions""... $ac_c" 1>&6 --echo "configure:74546: checking whether to enable POSIX-like functions" >&5 -+echo "configure:74558: checking whether to enable POSIX-like functions" >&5 - # Check whether --enable-posix or --disable-posix was given. - if test "${enable_posix+set}" = set; then - enableval="$enable_posix" -@@ -74815,12 +74827,12 @@ - for ac_func in seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo getrlimit - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:74819: checking for $ac_func" >&5 -+echo "configure:74831: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:74859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -74873,7 +74885,7 @@ - - - echo $ac_n "checking for PSPELL support""... $ac_c" 1>&6 --echo "configure:74877: checking for PSPELL support" >&5 -+echo "configure:74889: checking for PSPELL support" >&5 - # Check whether --with-pspell or --without-pspell was given. - if test "${with_pspell+set}" = set; then - withval="$with_pspell" -@@ -75337,7 +75349,7 @@ - done - - echo $ac_n "checking for new_aspell_config in -laspell""... $ac_c" 1>&6 --echo "configure:75341: checking for new_aspell_config in -laspell" >&5 -+echo "configure:75353: checking for new_aspell_config in -laspell" >&5 - ac_lib_var=`echo aspell'_'new_aspell_config | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -75345,7 +75357,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-laspell $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:75372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -75528,7 +75540,7 @@ - - - echo $ac_n "checking for QtDOM support""... $ac_c" 1>&6 --echo "configure:75532: checking for QtDOM support" >&5 -+echo "configure:75544: checking for QtDOM support" >&5 - # Check whether --with-qtdom or --without-qtdom was given. - if test "${with_qtdom+set}" = set; then - withval="$with_qtdom" -@@ -75956,7 +75968,7 @@ - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:75960: checking for $ac_word" >&5 -+echo "configure:75972: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -75988,7 +76000,7 @@ - - - echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 --echo "configure:75992: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 -+echo "configure:76004: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 - - ac_ext=C - # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -@@ -75999,12 +76011,12 @@ - - cat > conftest.$ac_ext << EOF - --#line 76003 "configure" -+#line 76015 "configure" - #include "confdefs.h" - - int main(){return(0);} - EOF --if { (eval echo configure:76008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:76020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cxx_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then -@@ -76030,12 +76042,12 @@ - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 --echo "configure:76034: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 -+echo "configure:76046: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 - cross_compiling=$ac_cv_prog_cxx_cross - - echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 --echo "configure:76039: checking whether we are using GNU C++" >&5 -+echo "configure:76051: checking whether we are using GNU C++" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -76044,7 +76056,7 @@ - yes; - #endif - EOF --if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:76048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then -+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:76060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gxx=yes - else - ac_cv_prog_gxx=no -@@ -76063,7 +76075,7 @@ - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS= - echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 --echo "configure:76067: checking whether ${CXX-g++} accepts -g" >&5 -+echo "configure:76079: checking whether ${CXX-g++} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -76095,7 +76107,7 @@ - fi - - echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 --echo "configure:76099: checking how to run the C++ preprocessor" >&5 -+echo "configure:76111: checking how to run the C++ preprocessor" >&5 - if test -z "$CXXCPP"; then - if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -76108,12 +76120,12 @@ - cross_compiling=$ac_cv_prog_cxx_cross - CXXCPP="${CXX-g++} -E" - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:76117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:76129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -@@ -76146,7 +76158,7 @@ - - - echo $ac_n "checking for libedit readline replacement""... $ac_c" 1>&6 --echo "configure:76150: checking for libedit readline replacement" >&5 -+echo "configure:76162: checking for libedit readline replacement" >&5 - # Check whether --with-libedit or --without-libedit was given. - if test "${with_libedit+set}" = set; then - withval="$with_libedit" -@@ -76192,7 +76204,7 @@ - - - echo $ac_n "checking for readline support""... $ac_c" 1>&6 --echo "configure:76196: checking for readline support" >&5 -+echo "configure:76208: checking for readline support" >&5 - # Check whether --with-readline or --without-readline was given. - if test "${with_readline+set}" = set; then - withval="$with_readline" -@@ -76277,7 +76289,7 @@ - - - echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 --echo "configure:76281: checking for tgetent in -lncurses" >&5 -+echo "configure:76293: checking for tgetent in -lncurses" >&5 - ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -76285,7 +76297,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lncurses $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:76312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -76340,7 +76352,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 --echo "configure:76344: checking for tgetent in -ltermcap" >&5 -+echo "configure:76356: checking for tgetent in -ltermcap" >&5 - ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -76348,7 +76360,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ltermcap $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:76375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -76488,7 +76500,7 @@ - done - - echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 --echo "configure:76492: checking for readline in -lreadline" >&5 -+echo "configure:76504: checking for readline in -lreadline" >&5 - ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -76496,7 +76508,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lreadline $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:76523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -76718,7 +76730,7 @@ - done - - echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6 --echo "configure:76722: checking for add_history in -lhistory" >&5 -+echo "configure:76734: checking for add_history in -lhistory" >&5 - ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -76726,7 +76738,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lhistory $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:76753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -77139,7 +77151,7 @@ - - - echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 --echo "configure:77143: checking for tgetent in -lncurses" >&5 -+echo "configure:77155: checking for tgetent in -lncurses" >&5 - ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -77147,7 +77159,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lncurses $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:77174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -77202,7 +77214,7 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 --echo "configure:77206: checking for tgetent in -ltermcap" >&5 -+echo "configure:77218: checking for tgetent in -ltermcap" >&5 - ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -77210,7 +77222,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ltermcap $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:77237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -77350,7 +77362,7 @@ - done - - echo $ac_n "checking for readline in -ledit""... $ac_c" 1>&6 --echo "configure:77354: checking for readline in -ledit" >&5 -+echo "configure:77366: checking for readline in -ledit" >&5 - ac_lib_var=`echo edit'_'readline | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -77358,7 +77370,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ledit $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:77385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -77733,7 +77745,7 @@ - - - echo $ac_n "checking for recode support""... $ac_c" 1>&6 --echo "configure:77737: checking for recode support" >&5 -+echo "configure:77749: checking for recode support" >&5 - # Check whether --with-recode or --without-recode was given. - if test "${with_recode+set}" = set; then - withval="$with_recode" -@@ -77883,7 +77895,7 @@ - done - - echo $ac_n "checking for recode_format_table in -lrecode""... $ac_c" 1>&6 --echo "configure:77887: checking for recode_format_table in -lrecode" >&5 -+echo "configure:77899: checking for recode_format_table in -lrecode" >&5 - ac_lib_var=`echo recode'_'recode_format_table | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -77891,7 +77903,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lrecode $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:77918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -78031,7 +78043,7 @@ - LDFLAGS="$LDFLAGS -L$RECODE_DIR/$RECODE_LIB" - LIBS="$LIBS -lrecode" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:78058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - -@@ -78204,17 +78216,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:78208: checking for $ac_hdr" >&5 -+echo "configure:78220: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:78218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:78230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -78467,7 +78479,7 @@ - - - echo $ac_n "checking whether to enable PHP sessions""... $ac_c" 1>&6 --echo "configure:78471: checking whether to enable PHP sessions" >&5 -+echo "configure:78483: checking whether to enable PHP sessions" >&5 - # Check whether --enable-session or --disable-session was given. - if test "${enable_session+set}" = set; then - enableval="$enable_session" -@@ -78513,7 +78525,7 @@ - - - echo $ac_n "checking for mm support""... $ac_c" 1>&6 --echo "configure:78517: checking for mm support" >&5 -+echo "configure:78529: checking for mm support" >&5 - # Check whether --with-mm or --without-mm was given. - if test "${with_mm+set}" = set; then - withval="$with_mm" -@@ -78538,7 +78550,7 @@ - if test "$PHP_SESSION" != "no"; then - - echo $ac_n "checking whether pwrite works""... $ac_c" 1>&6 --echo "configure:78542: checking whether pwrite works" >&5 -+echo "configure:78554: checking whether pwrite works" >&5 - if eval "test \"`echo '$''{'ac_cv_pwrite'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -78550,7 +78562,7 @@ - - else - cat > conftest.$ac_ext < -@@ -78571,7 +78583,7 @@ - - - EOF --if { (eval echo configure:78575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:78587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_pwrite=yes -@@ -78596,7 +78608,7 @@ - - else - cat > conftest.$ac_ext < -@@ -78617,7 +78629,7 @@ - - - EOF --if { (eval echo configure:78621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:78633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_pwrite=yes -@@ -78658,7 +78670,7 @@ - - - echo $ac_n "checking whether pread works""... $ac_c" 1>&6 --echo "configure:78662: checking whether pread works" >&5 -+echo "configure:78674: checking whether pread works" >&5 - if eval "test \"`echo '$''{'ac_cv_pread'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -78671,7 +78683,7 @@ - - else - cat > conftest.$ac_ext < -@@ -78691,7 +78703,7 @@ - } - - EOF --if { (eval echo configure:78695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:78707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_pread=yes -@@ -78718,7 +78730,7 @@ - - else - cat > conftest.$ac_ext < -@@ -78738,7 +78750,7 @@ - } - - EOF --if { (eval echo configure:78742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:78754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_pread=yes -@@ -79153,7 +79165,7 @@ - - - echo $ac_n "checking whether to enable shmop support""... $ac_c" 1>&6 --echo "configure:79157: checking whether to enable shmop support" >&5 -+echo "configure:79169: checking whether to enable shmop support" >&5 - # Check whether --enable-shmop or --disable-shmop was given. - if test "${enable_shmop+set}" = set; then - enableval="$enable_shmop" -@@ -79428,7 +79440,7 @@ - - - echo $ac_n "checking for SNMP support""... $ac_c" 1>&6 --echo "configure:79432: checking for SNMP support" >&5 -+echo "configure:79444: checking for SNMP support" >&5 - # Check whether --with-snmp or --without-snmp was given. - if test "${with_snmp+set}" = set; then - withval="$with_snmp" -@@ -79474,7 +79486,7 @@ - - - echo $ac_n "checking OpenSSL dir for SNMP""... $ac_c" 1>&6 --echo "configure:79478: checking OpenSSL dir for SNMP" >&5 -+echo "configure:79490: checking OpenSSL dir for SNMP" >&5 - # Check whether --with-openssl-dir or --without-openssl-dir was given. - if test "${with_openssl_dir+set}" = set; then - withval="$with_openssl_dir" -@@ -79502,7 +79514,7 @@ - # Extract the first word of "net-snmp-config", so it can be a program name with args. - set dummy net-snmp-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:79506: checking for $ac_word" >&5 -+echo "configure:79518: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_SNMP_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -79686,17 +79698,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:79690: checking for $ac_hdr" >&5 -+echo "configure:79702: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:79700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:79712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -79724,9 +79736,9 @@ - - if test "$ac_cv_header_default_store_h" = "yes"; then - echo $ac_n "checking for OpenSSL support in SNMP libraries""... $ac_c" 1>&6 --echo "configure:79728: checking for OpenSSL support in SNMP libraries" >&5 -+echo "configure:79740: checking for OpenSSL support in SNMP libraries" >&5 - cat > conftest.$ac_ext < -@@ -79778,7 +79790,7 @@ - # Extract the first word of "pkg-config", so it can be a program name with args. - set dummy pkg-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:79782: checking for $ac_word" >&5 -+echo "configure:79794: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -79966,9 +79978,9 @@ - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$OPENSSL_INCDIR - echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 --echo "configure:79970: checking for OpenSSL version" >&5 -+echo "configure:79982: checking for OpenSSL version" >&5 - cat > conftest.$ac_ext < -@@ -80106,7 +80118,7 @@ - done - - echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 --echo "configure:80110: checking for CRYPTO_free in -lcrypto" >&5 -+echo "configure:80122: checking for CRYPTO_free in -lcrypto" >&5 - ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -80114,7 +80126,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcrypto $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:80141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -80265,7 +80277,7 @@ - done - - echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 --echo "configure:80269: checking for SSL_CTX_set_ssl_version in -lssl" >&5 -+echo "configure:80281: checking for SSL_CTX_set_ssl_version in -lssl" >&5 - ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -80273,7 +80285,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lssl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:80300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -80396,7 +80408,7 @@ - fi - - echo $ac_n "checking for kstat_read in -lkstat""... $ac_c" 1>&6 --echo "configure:80400: checking for kstat_read in -lkstat" >&5 -+echo "configure:80412: checking for kstat_read in -lkstat" >&5 - ac_lib_var=`echo kstat'_'kstat_read | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -80404,7 +80416,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lkstat $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:80431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -80668,7 +80680,7 @@ - done - - echo $ac_n "checking for snmp_parse_oid in -l$SNMP_LIBNAME""... $ac_c" 1>&6 --echo "configure:80672: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5 -+echo "configure:80684: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5 - ac_lib_var=`echo $SNMP_LIBNAME'_'snmp_parse_oid | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -80676,7 +80688,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$SNMP_LIBNAME $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:80703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -80804,7 +80816,7 @@ - done - - echo $ac_n "checking for init_snmp in -l$SNMP_LIBNAME""... $ac_c" 1>&6 --echo "configure:80808: checking for init_snmp in -l$SNMP_LIBNAME" >&5 -+echo "configure:80820: checking for init_snmp in -l$SNMP_LIBNAME" >&5 - ac_lib_var=`echo $SNMP_LIBNAME'_'init_snmp | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -80812,7 +80824,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$SNMP_LIBNAME $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:80839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -81089,7 +81101,7 @@ - - - echo $ac_n "checking whether to enable UCD SNMP hack""... $ac_c" 1>&6 --echo "configure:81093: checking whether to enable UCD SNMP hack" >&5 -+echo "configure:81105: checking whether to enable UCD SNMP hack" >&5 - # Check whether --enable-ucd-snmp-hack or --disable-ucd-snmp-hack was given. - if test "${enable_ucd_snmp_hack+set}" = set; then - enableval="$enable_ucd_snmp_hack" -@@ -81115,7 +81127,7 @@ - - - echo $ac_n "checking whether to enable sockets support""... $ac_c" 1>&6 --echo "configure:81119: checking whether to enable sockets support" >&5 -+echo "configure:81131: checking whether to enable sockets support" >&5 - # Check whether --enable-sockets or --disable-sockets was given. - if test "${enable_sockets+set}" = set; then - enableval="$enable_sockets" -@@ -81160,13 +81172,13 @@ - - if test "$PHP_SOCKETS" != "no"; then - echo $ac_n "checking for struct cmsghdr""... $ac_c" 1>&6 --echo "configure:81164: checking for struct cmsghdr" >&5 -+echo "configure:81176: checking for struct cmsghdr" >&5 - if eval "test \"`echo '$''{'ac_cv_cmsghdr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - - cat > conftest.$ac_ext < -@@ -81175,7 +81187,7 @@ - struct cmsghdr s; s - ; return 0; } - EOF --if { (eval echo configure:81179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:81191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cmsghdr=yes - else -@@ -81200,12 +81212,12 @@ - for ac_func in hstrerror set_h_errno - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:81204: checking for $ac_func" >&5 -+echo "configure:81216: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:81244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -81256,17 +81268,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:81260: checking for $ac_hdr" >&5 -+echo "configure:81272: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:81270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:81282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -81293,7 +81305,7 @@ - done - - cat > conftest.$ac_ext < -@@ -81303,7 +81315,7 @@ - static struct msghdr tp; int n = (int) tp.msg_flags; return n - ; return 0; } - EOF --if { (eval echo configure:81307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:81319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : - else - echo "configure: failed program was:" >&5 -@@ -81547,18 +81559,1049 @@ - - - -+echo $ac_n "checking for sqlite support""... $ac_c" 1>&6 -+echo "configure:81564: checking for sqlite support" >&5 -+# Check whether --with-sqlite or --without-sqlite was given. -+if test "${with_sqlite+set}" = set; then -+ withval="$with_sqlite" -+ PHP_SQLITE=$withval -+else -+ -+ PHP_SQLITE=no -+ -+ if test "$PHP_ENABLE_ALL" && test "yes" = "yes"; then -+ PHP_SQLITE=$PHP_ENABLE_ALL -+ fi -+ -+fi -+ -+ -+ -+ext_output="yes, shared" -+ext_shared=yes -+case $PHP_SQLITE in -+shared,*) -+ PHP_SQLITE=`echo "$PHP_SQLITE"|sed 's/^shared,//'` -+ ;; -+shared) -+ PHP_SQLITE=yes -+ ;; -+no) -+ ext_output=no -+ ext_shared=no -+ ;; -+*) -+ ext_output=yes -+ ext_shared=no -+ ;; -+esac -+ -+ -+ -+echo "$ac_t""$ext_output" 1>&6 -+ -+ -+ -+ -+if test "$PHP_SQLITE" != "no"; then -+ -+ if test "$PHP_SQLITE" != "yes"; then -+ SEARCH_PATH="/usr/local /usr" -+ SEARCH_FOR="/include/sqlite.h" -+ if test -r $PHP_SQLITE/; then # path given as parameter -+ SQLITE_DIR=$PHP_SQLITE -+ else # search default path list -+ echo $ac_n "checking for sqlite files in default path""... $ac_c" 1>&6 -+echo "configure:81616: checking for sqlite files in default path" >&5 -+ for i in $SEARCH_PATH ; do -+ if test -r $i/$SEARCH_FOR; then -+ SQLITE_DIR=$i -+ echo "$ac_t""found in $i" 1>&6 -+ fi -+ done -+ fi -+ -+ if test -z "$SQLITE_DIR"; then -+ echo "$ac_t""not found" 1>&6 -+ { echo "configure: error: Please reinstall the sqlite distribution from http://www.sqlite.org" 1>&2; exit 1; } -+ fi -+ -+ -+ if test "$SQLITE_DIR/include" != "/usr/include"; then -+ -+ if test -z "$SQLITE_DIR/include" || echo "$SQLITE_DIR/include" | grep '^/' >/dev/null ; then -+ ai_p=$SQLITE_DIR/include -+ else -+ -+ ep_dir="`echo $SQLITE_DIR/include|sed 's%/*[^/][^/]*/*$%%'`" -+ -+ ep_realdir="`(cd \"$ep_dir\" && pwd)`" -+ ai_p="$ep_realdir/`basename \"$SQLITE_DIR/include\"`" -+ fi -+ -+ -+ -+ unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'` -+ -+ cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\"" -+ if test -n "$unique" && test "`eval $cmd`" = "" ; then -+ eval "INCLUDEPATH$unique=set" -+ -+ if test ""; then -+ INCLUDES="-I$ai_p $INCLUDES" -+ else -+ INCLUDES="$INCLUDES -I$ai_p" -+ fi -+ -+ fi -+ -+ fi -+ -+ -+ LIBNAME=sqlite -+ LIBSYMBOL=sqlite_open -+ -+ -+ save_old_LDFLAGS=$LDFLAGS -+ ac_stuff=" -+ -L$SQLITE_DIR/lib -lm -ldl -+ " -+ -+ save_ext_shared=$ext_shared -+ ext_shared=yes -+ -+ for ac_i in $ac_stuff; do -+ case $ac_i in -+ -l*) -+ ac_ii=`echo $ac_i|cut -c 3-` -+ -+ -+ case $ac_ii in -+ c|c_r|pthread*) ;; -+ *) -+ if test "$ext_shared" = "yes"; then -+ LDFLAGS="$LDFLAGS -l$ac_ii" -+ else -+ -+ -+ case $ac_ii in -+ c|c_r|pthread*) ;; -+ *) -+ LIBS="$LIBS -l$ac_ii" -+ ;; -+ esac -+ -+ -+ fi -+ ;; -+ esac -+ -+ -+ ;; -+ -L*) -+ ac_ii=`echo $ac_i|cut -c 3-` -+ -+ if test "$ac_ii" != "/usr/lib"; then -+ -+ if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then -+ ai_p=$ac_ii -+ else -+ -+ ep_dir="`echo $ac_ii|sed 's%/*[^/][^/]*/*$%%'`" -+ -+ ep_realdir="`(cd \"$ep_dir\" && pwd)`" -+ ai_p="$ep_realdir/`basename \"$ac_ii\"`" -+ fi -+ -+ -+ if test "$ext_shared" = "yes"; then -+ LDFLAGS="$ld_runpath_switch$ai_p -L$ai_p $LDFLAGS" -+ else -+ -+ -+ -+ unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'` -+ -+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" -+ if test -n "$unique" && test "`eval $cmd`" = "" ; then -+ eval "LIBPATH$unique=set" -+ -+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" -+ LDFLAGS="$LDFLAGS -L$ai_p" -+ PHP_RPATHS="$PHP_RPATHS $ai_p" -+ -+ fi -+ -+ -+ fi -+ -+ fi -+ -+ ;; -+ esac -+ done -+ -+ echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6 -+echo "configure:81746: checking for $LIBSYMBOL in -l$LIBNAME" >&5 -+ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'` -+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ ac_save_LIBS="$LIBS" -+LIBS="-l$LIBNAME $LIBS" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=no" -+fi -+rm -f conftest* -+LIBS="$ac_save_LIBS" -+ -+fi -+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ -+ LDFLAGS=$save_old_LDFLAGS -+ ext_shared=$save_ext_shared -+ -+ -+ -+ if test "$ext_shared" = "yes"; then -+ SQLITE_SHARED_LIBADD="-l$LIBNAME $SQLITE_SHARED_LIBADD" -+ if test -n "$SQLITE_DIR/lib"; then -+ -+ if test "$SQLITE_DIR/lib" != "/usr/lib"; then -+ -+ if test -z "$SQLITE_DIR/lib" || echo "$SQLITE_DIR/lib" | grep '^/' >/dev/null ; then -+ ai_p=$SQLITE_DIR/lib -+ else -+ -+ ep_dir="`echo $SQLITE_DIR/lib|sed 's%/*[^/][^/]*/*$%%'`" -+ -+ ep_realdir="`(cd \"$ep_dir\" && pwd)`" -+ ai_p="$ep_realdir/`basename \"$SQLITE_DIR/lib\"`" -+ fi -+ -+ -+ if test "$ext_shared" = "yes"; then -+ SQLITE_SHARED_LIBADD="$ld_runpath_switch$ai_p -L$ai_p $SQLITE_SHARED_LIBADD" -+ else -+ -+ -+ -+ unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'` -+ -+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" -+ if test -n "$unique" && test "`eval $cmd`" = "" ; then -+ eval "LIBPATH$unique=set" -+ -+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" -+ LDFLAGS="$LDFLAGS -L$ai_p" -+ PHP_RPATHS="$PHP_RPATHS $ai_p" -+ -+ fi -+ -+ -+ fi -+ -+ fi -+ -+ fi -+ else -+ -+ -+ if test -n "$SQLITE_DIR/lib"; then -+ -+ if test "$SQLITE_DIR/lib" != "/usr/lib"; then -+ -+ if test -z "$SQLITE_DIR/lib" || echo "$SQLITE_DIR/lib" | grep '^/' >/dev/null ; then -+ ai_p=$SQLITE_DIR/lib -+ else -+ -+ ep_dir="`echo $SQLITE_DIR/lib|sed 's%/*[^/][^/]*/*$%%'`" -+ -+ ep_realdir="`(cd \"$ep_dir\" && pwd)`" -+ ai_p="$ep_realdir/`basename \"$SQLITE_DIR/lib\"`" -+ fi -+ -+ -+ -+ -+ -+ unique=`echo $ai_p|sed 's/[^a-zA-Z0-9]/_/g'` -+ -+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" -+ if test -n "$unique" && test "`eval $cmd`" = "" ; then -+ eval "LIBPATH$unique=set" -+ -+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" -+ LDFLAGS="$LDFLAGS -L$ai_p" -+ PHP_RPATHS="$PHP_RPATHS $ai_p" -+ -+ fi -+ -+ -+ -+ fi -+ -+ fi -+ -+ -+ case $LIBNAME in -+ c|c_r|pthread*) ;; -+ *) -+ LIBS="-l$LIBNAME $LIBS" -+ ;; -+ esac -+ -+ -+ -+ -+ fi -+ -+ -+ cat >> confdefs.h <<\EOF -+#define HAVE_SQLITELIB 1 -+EOF -+ -+ -+ -+else -+ echo "$ac_t""no" 1>&6 -+ -+ LDFLAGS=$save_old_LDFLAGS -+ ext_shared=$save_ext_shared -+ unset ac_cv_lib_$LIBNAME_$LIBSYMBOL -+ -+ { echo "configure: error: wrong sqlite lib version or lib not found" 1>&2; exit 1; } -+ -+ -+fi -+ -+ -+ -+ PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_SHARED_LIBADD" -+ -+ -+ ext_builddir=ext/sqlite -+ ext_srcdir=$abs_srcdir/ext/sqlite -+ -+ ac_extra= -+ -+ if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then -+ -+ -+ -+ case ext/sqlite in -+ "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; -+ /*) ac_srcdir=`echo "ext/sqlite"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; -+ *) ac_srcdir="$abs_srcdir/ext/sqlite/"; ac_bdir="ext/sqlite/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; -+ esac -+ -+ -+ -+ b_c_pre=$php_c_pre -+ b_cxx_pre=$php_cxx_pre -+ b_c_meta=$php_c_meta -+ b_cxx_meta=$php_cxx_meta -+ b_c_post=$php_c_post -+ b_cxx_post=$php_cxx_post -+ b_lo=$php_lo -+ -+ -+ old_IFS=$IFS -+ for ac_src in sqlite.c; do -+ -+ IFS=. -+ set $ac_src -+ ac_obj=$1 -+ IFS=$old_IFS -+ -+ PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" -+ -+ case $ac_src in -+ *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; -+ *.cpp) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; -+ esac -+ -+ cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<&6 -+echo "configure:82369: checking size of char *" >&5 -+if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$cross_compiling" = yes; then -+ ac_cv_sizeof_char_p=4 -+else -+ cat > conftest.$ac_ext < -+#include -+main() -+{ -+ FILE *f=fopen("conftestval", "w"); -+ if (!f) exit(1); -+ fprintf(f, "%d\n", sizeof(char *)); -+ exit(0); -+} -+EOF -+if { (eval echo configure:82389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+then -+ ac_cv_sizeof_char_p=`cat conftestval` -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -fr conftest* -+ ac_cv_sizeof_char_p=0 -+fi -+rm -fr conftest* -+fi -+ -+fi -+echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6 -+cat >> confdefs.h <> confdefs.h <<\EOF -+#define SQLITE_PTR_SZ SIZEOF_CHAR_P -+EOF -+ -+ cat >> confdefs.h <<\EOF -+#define OS_UNIX 1 -+EOF -+ -+ cat >> confdefs.h <<\EOF -+#define OS_WIN 0 -+EOF -+ -+ SQLITE_ENCODING="ISO8859" -+ -+ PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_ENCODING" -+ -+ -+ # Extract the first word of "lemon", so it can be a program name with args. -+set dummy lemon; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:82428: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_path_LEMON'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ case "$LEMON" in -+ /*) -+ ac_cv_path_LEMON="$LEMON" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ ac_cv_path_LEMON="$LEMON" # Let the user override the test with a dos path. -+ ;; -+ *) -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/$ac_word; then -+ ac_cv_path_LEMON="$ac_dir/$ac_word" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ test -z "$ac_cv_path_LEMON" && ac_cv_path_LEMON="no" -+ ;; -+esac -+fi -+LEMON="$ac_cv_path_LEMON" -+if test -n "$LEMON"; then -+ echo "$ac_t""$LEMON" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ -+ PHP_VAR_SUBST="$PHP_VAR_SUBST LEMON" -+ -+ -+ SQLITE_VERSION=`cat $ext_srcdir/libsqlite/VERSION` -+ -+ PHP_VAR_SUBST="$PHP_VAR_SUBST SQLITE_VERSION" -+ -+ -+ if test "$ext_shared" = "no"; then -+ echo '#include "php_config.h"' > $ext_srcdir/libsqlite/src/config.h -+ else -+ echo "#include \"$abs_builddir/config.h\"" > $ext_srcdir/libsqlite/src/config.h -+ fi -+ -+ cat >> $ext_srcdir/libsqlite/src/config.h <> Makefile.fragments -+ -+ -+ fi -+ -+ for ac_func in usleep nanosleep -+do -+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+echo "configure:82497: checking for $ac_func" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+/* Override any gcc2 internal prototype to avoid an error. */ -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char $ac_func(); -+ -+int main() { -+ -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -+choke me -+#else -+$ac_func(); -+#endif -+ -+; return 0; } -+EOF -+if { (eval echo configure:82525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_$ac_func=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_$ac_func=no" -+fi -+rm -f conftest* -+fi -+ -+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` -+ cat >> confdefs.h <&6 -+fi -+done -+ -+ for ac_hdr in time.h -+do -+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -+echo "configure:82553: checking for $ac_hdr" >&5 -+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+EOF -+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+{ (eval echo configure:82563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -+if test -z "$ac_err"; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" -+else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=no" -+fi -+rm -f conftest* -+fi -+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -+ cat >> confdefs.h <&6 -+fi -+done -+ -+fi -+ -+ -+ -+ - - - - for ac_func in getcwd getwd asinh acosh atanh log1p hypot - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:81557: checking for $ac_func" >&5 -+echo "configure:82600: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:82628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -81610,7 +82653,7 @@ - - if test "$ac_cv_func_crypt" = "no"; then - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 --echo "configure:81614: checking for crypt in -lcrypt" >&5 -+echo "configure:82657: checking for crypt in -lcrypt" >&5 - ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -81618,7 +82661,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lcrypt $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:82676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -81658,7 +82701,7 @@ - fi - - echo $ac_n "checking for standard DES crypt""... $ac_c" 1>&6 --echo "configure:81662: checking for standard DES crypt" >&5 -+echo "configure:82705: checking for standard DES crypt" >&5 - if eval "test \"`echo '$''{'ac_cv_crypt_des'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -81669,7 +82712,7 @@ - - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:82735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_crypt_des=yes -@@ -81719,7 +82762,7 @@ - - - echo $ac_n "checking for extended DES crypt""... $ac_c" 1>&6 --echo "configure:81723: checking for extended DES crypt" >&5 -+echo "configure:82766: checking for extended DES crypt" >&5 - if eval "test \"`echo '$''{'ac_cv_crypt_ext_des'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -81730,7 +82773,7 @@ - - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:82796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_crypt_ext_des=yes -@@ -81780,7 +82823,7 @@ - - - echo $ac_n "checking for MD5 crypt""... $ac_c" 1>&6 --echo "configure:81784: checking for MD5 crypt" >&5 -+echo "configure:82827: checking for MD5 crypt" >&5 - if eval "test \"`echo '$''{'ac_cv_crypt_md5'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -81791,7 +82834,7 @@ - - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:82866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_crypt_md5=yes -@@ -81879,7 +82922,7 @@ - - - echo $ac_n "checking for Blowfish crypt""... $ac_c" 1>&6 --echo "configure:81883: checking for Blowfish crypt" >&5 -+echo "configure:82926: checking for Blowfish crypt" >&5 - if eval "test \"`echo '$''{'ac_cv_crypt_blowfish'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -81890,7 +82933,7 @@ - - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:82962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_crypt_blowfish=yes -@@ -81947,7 +82990,7 @@ - - - echo $ac_n "checking whether flush should be called explicitly after a buffered io""... $ac_c" 1>&6 --echo "configure:81951: checking whether flush should be called explicitly after a buffered io" >&5 -+echo "configure:82994: checking whether flush should be called explicitly after a buffered io" >&5 - if eval "test \"`echo '$''{'ac_cv_flush_io'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -81958,7 +83001,7 @@ - - else - cat > conftest.$ac_ext < -@@ -81996,7 +83039,7 @@ - } - - EOF --if { (eval echo configure:82000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:83043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_flush_io=no -@@ -82115,12 +83158,12 @@ - fi - - echo $ac_n "checking which regex library to use""... $ac_c" 1>&6 --echo "configure:82119: checking which regex library to use" >&5 -+echo "configure:83162: checking which regex library to use" >&5 - echo "$ac_t""$REGEX_TYPE" 1>&6 - - - echo $ac_n "checking whether rounding works as expected""... $ac_c" 1>&6 --echo "configure:82124: checking whether rounding works as expected" >&5 -+echo "configure:83167: checking whether rounding works as expected" >&5 - if test "$cross_compiling" = yes; then - - PHP_ROUND_FUZZ=0.50000000001 -@@ -82128,7 +83171,7 @@ - - else - cat > conftest.$ac_ext < -@@ -82137,7 +83180,7 @@ - } - - EOF --if { (eval echo configure:82141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:83184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - PHP_ROUND_FUZZ=0.5 -@@ -82161,7 +83204,7 @@ - - - echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6 --echo "configure:82165: checking for working fnmatch" >&5 -+echo "configure:83208: checking for working fnmatch" >&5 - if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -82172,11 +83215,11 @@ - ac_cv_func_fnmatch_works=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:83223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_func_fnmatch_works=yes - else -@@ -82203,12 +83246,12 @@ - for ac_func in glob strfmon - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:82207: checking for $ac_func" >&5 -+echo "configure:83250: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:83278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -82266,12 +83309,12 @@ - for ac_func in fpclass isinf isnan - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:82270: checking for $ac_func" >&5 -+echo "configure:83313: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:83341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -82320,7 +83363,7 @@ - - - echo $ac_n "checking whether atof() accepts NAN""... $ac_c" 1>&6 --echo "configure:82324: checking whether atof() accepts NAN" >&5 -+echo "configure:83367: checking whether atof() accepts NAN" >&5 - if eval "test \"`echo '$''{'ac_cv_atof_accept_nan'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -82331,7 +83374,7 @@ - - else - cat > conftest.$ac_ext < -@@ -82351,7 +83394,7 @@ - } - - EOF --if { (eval echo configure:82355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:83398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_atof_accept_nan=yes -@@ -82379,7 +83422,7 @@ - fi - - echo $ac_n "checking whether atof() accepts INF""... $ac_c" 1>&6 --echo "configure:82383: checking whether atof() accepts INF" >&5 -+echo "configure:83426: checking whether atof() accepts INF" >&5 - if eval "test \"`echo '$''{'ac_cv_atof_accept_inf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -82390,7 +83433,7 @@ - - else - cat > conftest.$ac_ext < -@@ -82413,7 +83456,7 @@ - } - - EOF --if { (eval echo configure:82417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:83460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_atof_accept_inf=yes -@@ -82441,7 +83484,7 @@ - fi - - echo $ac_n "checking whether HUGE_VAL == INF""... $ac_c" 1>&6 --echo "configure:82445: checking whether HUGE_VAL == INF" >&5 -+echo "configure:83488: checking whether HUGE_VAL == INF" >&5 - if eval "test \"`echo '$''{'ac_cv_huge_val_inf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -82452,7 +83495,7 @@ - - else - cat > conftest.$ac_ext < -@@ -82475,7 +83518,7 @@ - } - - EOF --if { (eval echo configure:82479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:83522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_huge_val_inf=yes -@@ -82503,7 +83546,7 @@ - fi - - echo $ac_n "checking whether HUGE_VAL + -HUGEVAL == NAN""... $ac_c" 1>&6 --echo "configure:82507: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5 -+echo "configure:83550: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5 - if eval "test \"`echo '$''{'ac_cv_huge_val_nan'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -82514,7 +83557,7 @@ - - else - cat > conftest.$ac_ext < -@@ -82539,7 +83582,7 @@ - } - - EOF --if { (eval echo configure:82543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:83586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - ac_cv_huge_val_nan=yes -@@ -82835,7 +83878,7 @@ - - - echo $ac_n "checking for libswf support""... $ac_c" 1>&6 --echo "configure:82839: checking for libswf support" >&5 -+echo "configure:83882: checking for libswf support" >&5 - # Check whether --with-swf or --without-swf was given. - if test "${with_swf+set}" = set; then - withval="$with_swf" -@@ -82883,7 +83926,7 @@ - SWF_DIR=$PHP_SWF - else - echo $ac_n "checking for libswf in default path""... $ac_c" 1>&6 --echo "configure:82887: checking for libswf in default path" >&5 -+echo "configure:83930: checking for libswf in default path" >&5 - for i in /usr/local /usr; do - if test -r $i/lib/libswf.a; then - SWF_DIR=$i -@@ -83262,7 +84305,7 @@ - - - echo $ac_n "checking for Sybase support""... $ac_c" 1>&6 --echo "configure:83266: checking for Sybase support" >&5 -+echo "configure:84309: checking for Sybase support" >&5 - # Check whether --with-sybase or --without-sybase was given. - if test "${with_sybase+set}" = set; then - withval="$with_sybase" -@@ -83663,7 +84706,7 @@ - - - echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6 --echo "configure:83667: checking for dnet_addr in -ldnet_stub" >&5 -+echo "configure:84710: checking for dnet_addr in -ldnet_stub" >&5 - ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -83671,7 +84714,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldnet_stub $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:84729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -83807,7 +84850,7 @@ - EOF - - echo $ac_n "checking for tdsdbopen in -lsybdb""... $ac_c" 1>&6 --echo "configure:83811: checking for tdsdbopen in -lsybdb" >&5 -+echo "configure:84854: checking for tdsdbopen in -lsybdb" >&5 - ac_lib_var=`echo sybdb'_'tdsdbopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -83815,7 +84858,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsybdb $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:84873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -83863,7 +84906,7 @@ - - - echo $ac_n "checking for Sybase-CT support""... $ac_c" 1>&6 --echo "configure:83867: checking for Sybase-CT support" >&5 -+echo "configure:84910: checking for Sybase-CT support" >&5 - # Check whether --with-sybase-ct or --without-sybase-ct was given. - if test "${with_sybase_ct+set}" = set; then - withval="$with_sybase_ct" -@@ -84424,7 +85467,7 @@ - done - - echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6 --echo "configure:84428: checking for netg_errstr in -ltcl" >&5 -+echo "configure:85471: checking for netg_errstr in -ltcl" >&5 - ac_lib_var=`echo tcl'_'netg_errstr | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -84432,7 +85475,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ltcl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:85490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -84601,7 +85644,7 @@ - done - - echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6 --echo "configure:84605: checking for insck__getVdate in -linsck" >&5 -+echo "configure:85648: checking for insck__getVdate in -linsck" >&5 - ac_lib_var=`echo insck'_'insck__getVdate | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -84609,7 +85652,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-linsck $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:85667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -84751,7 +85794,7 @@ - done - - echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6 --echo "configure:84755: checking for bsd_tcp in -linsck" >&5 -+echo "configure:85798: checking for bsd_tcp in -linsck" >&5 - ac_lib_var=`echo insck'_'bsd_tcp | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -84759,7 +85802,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-linsck $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:85817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -84829,7 +85872,7 @@ - - - echo $ac_n "checking whether to enable System V IPC support""... $ac_c" 1>&6 --echo "configure:84833: checking whether to enable System V IPC support" >&5 -+echo "configure:85876: checking whether to enable System V IPC support" >&5 - # Check whether --enable-sysvmsg or --disable-sysvmsg was given. - if test "${enable_sysvmsg+set}" = set; then - enableval="$enable_sysvmsg" -@@ -85104,7 +86147,7 @@ - - - echo $ac_n "checking whether to enable System V semaphore support""... $ac_c" 1>&6 --echo "configure:85108: checking whether to enable System V semaphore support" >&5 -+echo "configure:86151: checking whether to enable System V semaphore support" >&5 - # Check whether --enable-sysvsem or --disable-sysvsem was given. - if test "${enable_sysvsem+set}" = set; then - enableval="$enable_sysvsem" -@@ -85374,12 +86417,12 @@ - EOF - - echo $ac_n "checking for union semun""... $ac_c" 1>&6 --echo "configure:85378: checking for union semun" >&5 -+echo "configure:86421: checking for union semun" >&5 - if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < -@@ -85390,7 +86433,7 @@ - union semun x; - ; return 0; } - EOF --if { (eval echo configure:85394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:86437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - php_cv_semun=yes -@@ -85425,7 +86468,7 @@ - - - echo $ac_n "checking whether to enable System V shared memory support""... $ac_c" 1>&6 --echo "configure:85429: checking whether to enable System V shared memory support" >&5 -+echo "configure:86472: checking whether to enable System V shared memory support" >&5 - # Check whether --enable-sysvshm or --disable-sysvshm was given. - if test "${enable_sysvshm+set}" = set; then - enableval="$enable_sysvshm" -@@ -85701,7 +86744,7 @@ - - - echo $ac_n "checking whether to enable tokenizer support""... $ac_c" 1>&6 --echo "configure:85705: checking whether to enable tokenizer support" >&5 -+echo "configure:86748: checking whether to enable tokenizer support" >&5 - # Check whether --enable-tokenizer or --disable-tokenizer was given. - if test "${enable_tokenizer+set}" = set; then - enableval="$enable_tokenizer" -@@ -85978,7 +87021,7 @@ - - - echo $ac_n "checking whether to enable WDDX support""... $ac_c" 1>&6 --echo "configure:85982: checking whether to enable WDDX support" >&5 -+echo "configure:87025: checking whether to enable WDDX support" >&5 - # Check whether --enable-wddx or --disable-wddx was given. - if test "${enable_wddx+set}" = set; then - enableval="$enable_wddx" -@@ -86255,7 +87298,7 @@ - - - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 --echo "configure:86259: checking whether byte ordering is bigendian" >&5 -+echo "configure:87302: checking whether byte ordering is bigendian" >&5 - if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -86265,7 +87308,7 @@ - ac_cv_c_bigendian_php=unknown - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:87328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_bigendian_php=yes - else -@@ -86314,7 +87357,7 @@ - - - echo $ac_n "checking whether to enable XML support""... $ac_c" 1>&6 --echo "configure:86318: checking whether to enable XML support" >&5 -+echo "configure:87361: checking whether to enable XML support" >&5 - # Check whether --enable-xml or --disable-xml was given. - if test "${enable_xml+set}" = set; then - enableval="$enable_xml" -@@ -86360,7 +87403,7 @@ - - - echo $ac_n "checking external libexpat install dir""... $ac_c" 1>&6 --echo "configure:86364: checking external libexpat install dir" >&5 -+echo "configure:87407: checking external libexpat install dir" >&5 - # Check whether --with-expat-dir or --without-expat-dir was given. - if test "${with_expat_dir+set}" = set; then - withval="$with_expat_dir" -@@ -87043,7 +88086,7 @@ - - - echo $ac_n "checking for XMLRPC-EPI support""... $ac_c" 1>&6 --echo "configure:87047: checking for XMLRPC-EPI support" >&5 -+echo "configure:88090: checking for XMLRPC-EPI support" >&5 - # Check whether --with-xmlrpc or --without-xmlrpc was given. - if test "${with_xmlrpc+set}" = set; then - withval="$with_xmlrpc" -@@ -87089,7 +88132,7 @@ - - - echo $ac_n "checking libexpat dir for XMLRPC-EPI""... $ac_c" 1>&6 --echo "configure:87093: checking libexpat dir for XMLRPC-EPI" >&5 -+echo "configure:88136: checking libexpat dir for XMLRPC-EPI" >&5 - # Check whether --with-expat-dir or --without-expat-dir was given. - if test "${with_expat_dir+set}" = set; then - withval="$with_expat_dir" -@@ -87114,7 +88157,7 @@ - - - echo $ac_n "checking iconv dir for XMLRPC-EPI""... $ac_c" 1>&6 --echo "configure:87118: checking iconv dir for XMLRPC-EPI" >&5 -+echo "configure:88161: checking iconv dir for XMLRPC-EPI" >&5 - # Check whether --with-iconv-dir or --without-iconv-dir was given. - if test "${with_iconv_dir+set}" = set; then - withval="$with_iconv_dir" -@@ -87315,12 +88358,12 @@ - - if test "$PHP_ICONV" = "yes"; then - echo $ac_n "checking for iconv""... $ac_c" 1>&6 --echo "configure:87319: checking for iconv" >&5 -+echo "configure:88362: checking for iconv" >&5 - if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:88390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_iconv=yes" - else -@@ -87367,12 +88410,12 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for libiconv""... $ac_c" 1>&6 --echo "configure:87371: checking for libiconv" >&5 -+echo "configure:88414: checking for libiconv" >&5 - if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:88442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_libiconv=yes" - else -@@ -87530,7 +88573,7 @@ - done - - echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6 --echo "configure:87534: checking for libiconv in -l$iconv_lib_name" >&5 -+echo "configure:88577: checking for libiconv in -l$iconv_lib_name" >&5 - ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -87538,7 +88581,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$iconv_lib_name $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:88596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -87662,7 +88705,7 @@ - done - - echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6 --echo "configure:87666: checking for iconv in -l$iconv_lib_name" >&5 -+echo "configure:88709: checking for iconv in -l$iconv_lib_name" >&5 - ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -87670,7 +88713,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$iconv_lib_name $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:88728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -87880,12 +88923,12 @@ - - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 --echo "configure:87884: checking for ANSI C header files" >&5 -+echo "configure:88927: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -87893,7 +88936,7 @@ - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:87897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:88940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -87910,7 +88953,7 @@ - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -87928,7 +88971,7 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -@@ -87949,7 +88992,7 @@ - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -@@ -87960,7 +89003,7 @@ - exit (0); } - - EOF --if { (eval echo configure:87964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:89007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else -@@ -87987,17 +89030,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:87991: checking for $ac_hdr" >&5 -+echo "configure:89034: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:88001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:89044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -88029,7 +89072,7 @@ - - - echo $ac_n "checking size of char""... $ac_c" 1>&6 --echo "configure:88033: checking size of char" >&5 -+echo "configure:89076: checking size of char" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -88037,9 +89080,10 @@ - ac_cv_sizeof_char=1 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -88048,7 +89092,7 @@ - exit(0); - } - EOF --if { (eval echo configure:88052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:89096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_char=`cat conftestval` - else -@@ -88069,7 +89113,7 @@ - - - echo $ac_n "checking size of int""... $ac_c" 1>&6 --echo "configure:88073: checking size of int" >&5 -+echo "configure:89117: checking size of int" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -88077,9 +89121,10 @@ - ac_cv_sizeof_int=4 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -88088,7 +89133,7 @@ - exit(0); - } - EOF --if { (eval echo configure:88092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:89137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_int=`cat conftestval` - else -@@ -88108,7 +89153,7 @@ - - - echo $ac_n "checking size of long""... $ac_c" 1>&6 --echo "configure:88112: checking size of long" >&5 -+echo "configure:89157: checking size of long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -88116,9 +89161,10 @@ - ac_cv_sizeof_long=4 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -88127,7 +89173,7 @@ - exit(0); - } - EOF --if { (eval echo configure:88131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:89177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long=`cat conftestval` - else -@@ -88147,7 +89193,7 @@ - - - echo $ac_n "checking size of long long""... $ac_c" 1>&6 --echo "configure:88151: checking size of long long" >&5 -+echo "configure:89197: checking size of long long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -88155,9 +89201,10 @@ - ac_cv_sizeof_long_long=8 - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -88166,7 +89213,7 @@ - exit(0); - } - EOF --if { (eval echo configure:88170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:89217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_long_long=`cat conftestval` - else -@@ -88186,12 +89233,12 @@ - - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 --echo "configure:88190: checking for size_t" >&5 -+echo "configure:89237: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -88219,12 +89266,12 @@ - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 --echo "configure:88223: checking whether time.h and sys/time.h may both be included" >&5 -+echo "configure:89270: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -88233,7 +89280,7 @@ - struct tm *tp; - ; return 0; } - EOF --if { (eval echo configure:88237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:89284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else -@@ -88254,12 +89301,12 @@ - fi - - echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 --echo "configure:88258: checking for uid_t in sys/types.h" >&5 -+echo "configure:89305: checking for uid_t in sys/types.h" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF -@@ -88299,12 +89346,12 @@ - memcpy memmove - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:88303: checking for $ac_func" >&5 -+echo "configure:89350: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:89378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -88608,7 +89655,7 @@ - XMLRPC_DIR=$PHP_XMLRPC/include/xmlrpc-epi - else - echo $ac_n "checking for XMLRPC-EPI in default path""... $ac_c" 1>&6 --echo "configure:88612: checking for XMLRPC-EPI in default path" >&5 -+echo "configure:89659: checking for XMLRPC-EPI in default path" >&5 - for i in /usr/local /usr; do - if test -r $i/include/xmlrpc.h; then - XMLRPC_DIR=$i/include -@@ -88756,7 +89803,7 @@ - - - echo $ac_n "checking whether to enable xslt support""... $ac_c" 1>&6 --echo "configure:88760: checking whether to enable xslt support" >&5 -+echo "configure:89807: checking whether to enable xslt support" >&5 - # Check whether --enable-xslt or --disable-xslt was given. - if test "${enable_xslt+set}" = set; then - enableval="$enable_xslt" -@@ -88802,7 +89849,7 @@ - - - echo $ac_n "checking for XSLT Sablotron backend""... $ac_c" 1>&6 --echo "configure:88806: checking for XSLT Sablotron backend" >&5 -+echo "configure:89853: checking for XSLT Sablotron backend" >&5 - # Check whether --with-xslt-sablot or --without-xslt-sablot was given. - if test "${with_xslt_sablot+set}" = set; then - withval="$with_xslt_sablot" -@@ -88827,7 +89874,7 @@ - - - echo $ac_n "checking for libexpat dir for Sablotron XSL support""... $ac_c" 1>&6 --echo "configure:88831: checking for libexpat dir for Sablotron XSL support" >&5 -+echo "configure:89878: checking for libexpat dir for Sablotron XSL support" >&5 - # Check whether --with-expat-dir or --without-expat-dir was given. - if test "${with_expat_dir+set}" = set; then - withval="$with_expat_dir" -@@ -88852,7 +89899,7 @@ - - - echo $ac_n "checking for iconv dir for Sablotron XSL support""... $ac_c" 1>&6 --echo "configure:88856: checking for iconv dir for Sablotron XSL support" >&5 -+echo "configure:89903: checking for iconv dir for Sablotron XSL support" >&5 - # Check whether --with-iconv-dir or --without-iconv-dir was given. - if test "${with_iconv_dir+set}" = set; then - withval="$with_iconv_dir" -@@ -88877,7 +89924,7 @@ - - - echo $ac_n "checking for JavaScript for Sablotron XSL support""... $ac_c" 1>&6 --echo "configure:88881: checking for JavaScript for Sablotron XSL support" >&5 -+echo "configure:89928: checking for JavaScript for Sablotron XSL support" >&5 - # Check whether --with-sablot-js or --without-sablot-js was given. - if test "${with_sablot_js+set}" = set; then - withval="$with_sablot_js" -@@ -89144,7 +90191,7 @@ - XSLT_DIR=$XSLT_CHECK_DIR - else - echo $ac_n "checking for $XSLT_BACKEND_NAME libraries in the default path""... $ac_c" 1>&6 --echo "configure:89148: checking for $XSLT_BACKEND_NAME libraries in the default path" >&5 -+echo "configure:90195: checking for $XSLT_BACKEND_NAME libraries in the default path" >&5 - for i in /usr/local /usr; do - condition="$i$XSLT_TEST_FILE" - if test -r $condition; then -@@ -89161,7 +90208,7 @@ - - if test "$PHP_XSLT_SABLOT" != "no"; then - echo $ac_n "checking for sablot-config""... $ac_c" 1>&6 --echo "configure:89165: checking for sablot-config" >&5 -+echo "configure:90212: checking for sablot-config" >&5 - if test -x $XSLT_DIR/bin/sablot-config ; then - echo "$ac_t""found" 1>&6 - cat >> confdefs.h <<\EOF -@@ -89179,14 +90226,14 @@ - echo "$ac_t""not found" 1>&6 - fi - echo $ac_n "checking for Sablotron version""... $ac_c" 1>&6 --echo "configure:89183: checking for Sablotron version" >&5 -+echo "configure:90230: checking for Sablotron version" >&5 - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$XSLT_DIR/include" - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -@@ -89204,7 +90251,7 @@ - } - - EOF --if { (eval echo configure:89208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:90255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - echo "$ac_t"">= 0.96" 1>&6 -@@ -89391,12 +90438,12 @@ - - if test "$PHP_ICONV" = "yes"; then - echo $ac_n "checking for iconv""... $ac_c" 1>&6 --echo "configure:89395: checking for iconv" >&5 -+echo "configure:90442: checking for iconv" >&5 - if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:90470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_iconv=yes" - else -@@ -89443,12 +90490,12 @@ - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for libiconv""... $ac_c" 1>&6 --echo "configure:89447: checking for libiconv" >&5 -+echo "configure:90494: checking for libiconv" >&5 - if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:90522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_libiconv=yes" - else -@@ -89606,7 +90653,7 @@ - done - - echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6 --echo "configure:89610: checking for libiconv in -l$iconv_lib_name" >&5 -+echo "configure:90657: checking for libiconv in -l$iconv_lib_name" >&5 - ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -89614,7 +90661,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$iconv_lib_name $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:90676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -89738,7 +90785,7 @@ - done - - echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6 --echo "configure:89742: checking for iconv in -l$iconv_lib_name" >&5 -+echo "configure:90789: checking for iconv in -l$iconv_lib_name" >&5 - ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -89746,7 +90793,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-l$iconv_lib_name $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:90808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -90029,7 +91076,7 @@ - done - - echo $ac_n "checking for JS_GetRuntime in -ljs""... $ac_c" 1>&6 --echo "configure:90033: checking for JS_GetRuntime in -ljs" >&5 -+echo "configure:91080: checking for JS_GetRuntime in -ljs" >&5 - ac_lib_var=`echo js'_'JS_GetRuntime | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -90037,7 +91084,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ljs $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:91099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -90261,7 +91308,7 @@ - done - - echo $ac_n "checking for SablotSetEncoding in -lsablot""... $ac_c" 1>&6 --echo "configure:90265: checking for SablotSetEncoding in -lsablot" >&5 -+echo "configure:91312: checking for SablotSetEncoding in -lsablot" >&5 - ac_lib_var=`echo sablot'_'SablotSetEncoding | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -90269,7 +91316,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsablot $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:91331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -90397,7 +91444,7 @@ - done - - echo $ac_n "checking for SablotGetOptions in -lsablot""... $ac_c" 1>&6 --echo "configure:90401: checking for SablotGetOptions in -lsablot" >&5 -+echo "configure:91448: checking for SablotGetOptions in -lsablot" >&5 - ac_lib_var=`echo sablot'_'SablotGetOptions | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -90405,7 +91452,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsablot $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:91467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -90596,7 +91643,7 @@ - - - echo $ac_n "checking for YAZ support""... $ac_c" 1>&6 --echo "configure:90600: checking for YAZ support" >&5 -+echo "configure:91647: checking for YAZ support" >&5 - # Check whether --with-yaz or --without-yaz was given. - if test "${with_yaz+set}" = set; then - withval="$with_yaz" -@@ -90646,7 +91693,7 @@ - # Extract the first word of "yaz-config", so it can be a program name with args. - set dummy yaz-config; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:90650: checking for $ac_word" >&5 -+echo "configure:91697: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_yazconfig'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -90695,7 +91742,7 @@ - . $yazconfig - - echo $ac_n "checking for YAZ version""... $ac_c" 1>&6 --echo "configure:90699: checking for YAZ version" >&5 -+echo "configure:91746: checking for YAZ version" >&5 - yaz_version=`echo $YAZVERSION | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - if test "$yaz_version" -ge 1009000; then - echo "$ac_t""$YAZVERSION" 1>&6 -@@ -91120,7 +92167,7 @@ - - - echo $ac_n "checking whether to include YP support""... $ac_c" 1>&6 --echo "configure:91124: checking whether to include YP support" >&5 -+echo "configure:92171: checking whether to include YP support" >&5 - # Check whether --enable-yp or --disable-yp was given. - if test "${enable_yp+set}" = set; then - enableval="$enable_yp" -@@ -91166,7 +92213,7 @@ - if test "$PHP_YP" != "no"; then - - echo $ac_n "checking for yp_match in -lnsl""... $ac_c" 1>&6 --echo "configure:91170: checking for yp_match in -lnsl" >&5 -+echo "configure:92217: checking for yp_match in -lnsl" >&5 - ac_lib_var=`echo nsl'_'yp_match | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -91174,7 +92221,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:92236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -91207,7 +92254,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for yp_match in -lc""... $ac_c" 1>&6 --echo "configure:91211: checking for yp_match in -lc" >&5 -+echo "configure:92258: checking for yp_match in -lc" >&5 - ac_lib_var=`echo c'_'yp_match | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -91215,7 +92262,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lc $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:92277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -91601,7 +92648,7 @@ - - - echo $ac_n "checking for ZIP support""... $ac_c" 1>&6 --echo "configure:91605: checking for ZIP support" >&5 -+echo "configure:92652: checking for ZIP support" >&5 - # Check whether --with-zip or --without-zip was given. - if test "${with_zip+set}" = set; then - withval="$with_zip" -@@ -91749,7 +92796,7 @@ - done - - echo $ac_n "checking for zzip_open in -lzzip""... $ac_c" 1>&6 --echo "configure:91753: checking for zzip_open in -lzzip" >&5 -+echo "configure:92800: checking for zzip_open in -lzzip" >&5 - ac_lib_var=`echo zzip'_'zzip_open | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -91757,7 +92804,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lzzip $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:92819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -92226,7 +93273,7 @@ - - - echo $ac_n "checking whether to install PEAR""... $ac_c" 1>&6 --echo "configure:92230: checking whether to install PEAR" >&5 -+echo "configure:93277: checking whether to install PEAR" >&5 - # Check whether --with-pear or --without-pear was given. - if test "${with_pear+set}" = set; then - withval="$with_pear" -@@ -92332,7 +93379,7 @@ - echo "configure: warning: You will need bison if you want to regenerate the Zend parser." 1>&2 - else - echo $ac_n "checking bison version""... $ac_c" 1>&6 --echo "configure:92336: checking bison version" >&5 -+echo "configure:93383: checking bison version" >&5 - set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /' | tr -d 'a-z'` - if test "${1}" = "1" -a "${2}" -lt "28"; then - echo "configure: warning: You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2})." 1>&2 -@@ -92367,17 +93414,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:92371: checking for $ac_hdr" >&5 -+echo "configure:93418: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:92381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:93428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -92405,12 +93452,12 @@ - - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 --echo "configure:92409: checking for size_t" >&5 -+echo "configure:93456: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -92438,12 +93485,12 @@ - fi - - echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 --echo "configure:92442: checking return type of signal handlers" >&5 -+echo "configure:93489: checking return type of signal handlers" >&5 - if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -@@ -92460,7 +93507,7 @@ - int i; - ; return 0; } - EOF --if { (eval echo configure:92464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:93511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void - else -@@ -92480,12 +93527,12 @@ - - - echo $ac_n "checking for uint""... $ac_c" 1>&6 --echo "configure:92484: checking for uint" >&5 -+echo "configure:93531: checking for uint" >&5 - if eval "test \"`echo '$''{'ac_cv_type_uint'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -92513,12 +93560,12 @@ - fi - - echo $ac_n "checking for ulong""... $ac_c" 1>&6 --echo "configure:92517: checking for ulong" >&5 -+echo "configure:93564: checking for ulong" >&5 - if eval "test \"`echo '$''{'ac_cv_type_ulong'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -@@ -92548,9 +93595,9 @@ - - - echo $ac_n "checking for int32_t""... $ac_c" 1>&6 --echo "configure:92552: checking for int32_t" >&5 -+echo "configure:93599: checking for int32_t" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:93620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - cat >> confdefs.h <&6 --echo "configure:92592: checking for uint32_t" >&5 -+echo "configure:93639: checking for uint32_t" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:93660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - cat >> confdefs.h <&6 --echo "configure:92632: checking for vprintf" >&5 -+echo "configure:93679: checking for vprintf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:93707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vprintf=yes" - else -@@ -92680,12 +93727,12 @@ - - if test "$ac_cv_func_vprintf" != yes; then - echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 --echo "configure:92684: checking for _doprnt" >&5 -+echo "configure:93731: checking for _doprnt" >&5 - if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:93759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func__doprnt=yes" - else -@@ -92733,7 +93780,7 @@ - fi - - echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 --echo "configure:92737: checking for 8-bit clean memcmp" >&5 -+echo "configure:93784: checking for 8-bit clean memcmp" >&5 - if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -92741,7 +93788,7 @@ - ac_cv_func_memcmp_clean=no - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:93802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_func_memcmp_clean=yes - else -@@ -92771,19 +93818,19 @@ - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works - # for constant arguments. Useless! - echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 --echo "configure:92775: checking for working alloca.h" >&5 -+echo "configure:93822: checking for working alloca.h" >&5 - if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - int main() { - char *p = alloca(2 * sizeof(int)); - ; return 0; } - EOF --if { (eval echo configure:92787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:93834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_header_alloca_h=yes - else -@@ -92804,12 +93851,12 @@ - fi - - echo $ac_n "checking for alloca""... $ac_c" 1>&6 --echo "configure:92808: checking for alloca" >&5 -+echo "configure:93855: checking for alloca" >&5 - if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:93888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_alloca_works=yes - else -@@ -92869,12 +93916,12 @@ - - - echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 --echo "configure:92873: checking whether alloca needs Cray hooks" >&5 -+echo "configure:93920: checking whether alloca needs Cray hooks" >&5 - if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 --echo "configure:92903: checking for $ac_func" >&5 -+echo "configure:93950: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:93978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -92954,7 +94001,7 @@ - fi - - echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 --echo "configure:92958: checking stack direction for C alloca" >&5 -+echo "configure:94005: checking stack direction for C alloca" >&5 - if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -92962,7 +94009,7 @@ - ac_cv_c_stack_direction=0 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:94032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_stack_direction=1 - else -@@ -93005,12 +94052,12 @@ - for ac_func in memcpy strdup getpid kill strtod strtol finite fpclass - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:93009: checking for $ac_func" >&5 -+echo "configure:94056: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:94084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -93061,12 +94108,12 @@ - for ac_func in finite isfinite isinf isnan - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:93065: checking for $ac_func" >&5 -+echo "configure:94112: checking for $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:94140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else -@@ -93116,13 +94163,13 @@ - - - echo $ac_n "checking whether fp_except is defined""... $ac_c" 1>&6 --echo "configure:93120: checking whether fp_except is defined" >&5 -+echo "configure:94167: checking whether fp_except is defined" >&5 - if eval "test \"`echo '$''{'ac_cv_type_fp_except'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - - cat > conftest.$ac_ext < -@@ -93133,7 +94180,7 @@ - - ; return 0; } - EOF --if { (eval echo configure:93137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:94184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - ac_cv_type_fp_except=yes -@@ -93163,17 +94210,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:93167: checking for $ac_hdr" >&5 -+echo "configure:94214: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:93177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:94224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -93202,14 +94249,14 @@ - - - echo $ac_n "checking whether dlsym() requires a leading underscore in symbol names""... $ac_c" 1>&6 --echo "configure:93206: checking whether dlsym() requires a leading underscore in symbol names" >&5 -+echo "configure:94253: checking whether dlsym() requires a leading underscore in symbol names" >&5 - if test "$cross_compiling" = yes; then : - - else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ if { (eval echo configure:94321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in -@@ -93353,23 +94400,23 @@ - - - echo $ac_n "checking whether to enable thread-safety""... $ac_c" 1>&6 --echo "configure:93357: checking whether to enable thread-safety" >&5 -+echo "configure:94404: checking whether to enable thread-safety" >&5 - echo "$ac_t""$ZEND_EXPERIMENTAL_ZTS" 1>&6 - - echo $ac_n "checking whether to enable inline optimization for GCC""... $ac_c" 1>&6 --echo "configure:93361: checking whether to enable inline optimization for GCC" >&5 -+echo "configure:94408: checking whether to enable inline optimization for GCC" >&5 - echo "$ac_t""$ZEND_INLINE_OPTIMIZATION" 1>&6 - - echo $ac_n "checking whether to enable a memory limit""... $ac_c" 1>&6 --echo "configure:93365: checking whether to enable a memory limit" >&5 -+echo "configure:94412: checking whether to enable a memory limit" >&5 - echo "$ac_t""$ZEND_MEMORY_LIMIT" 1>&6 - - echo $ac_n "checking whether to enable Zend debugging""... $ac_c" 1>&6 --echo "configure:93369: checking whether to enable Zend debugging" >&5 -+echo "configure:94416: checking whether to enable Zend debugging" >&5 - echo "$ac_t""$ZEND_DEBUG" 1>&6 - - echo $ac_n "checking whether to enable Zend multibyte""... $ac_c" 1>&6 --echo "configure:93373: checking whether to enable Zend multibyte" >&5 -+echo "configure:94420: checking whether to enable Zend multibyte" >&5 - echo "$ac_t""$ZEND_MULTIBYTE" 1>&6 - - if test "$ZEND_DEBUG" = "yes"; then -@@ -93429,21 +94476,21 @@ - - - echo $ac_n "checking for inline""... $ac_c" 1>&6 --echo "configure:93433: checking for inline" >&5 -+echo "configure:94480: checking for inline" >&5 - if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:94494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break - else -@@ -93513,17 +94560,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:93517: checking for $ac_hdr" >&5 -+echo "configure:94564: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:93527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:94574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -93600,7 +94647,7 @@ - - - echo $ac_n "checking for GNU Pth""... $ac_c" 1>&6 --echo "configure:93604: checking for GNU Pth" >&5 -+echo "configure:94651: checking for GNU Pth" >&5 - PTH_PREFIX="`$TSRM_PTH --prefix`" - if test -z "$PTH_PREFIX"; then - echo "$ac_t""Please check your Pth installation" 1>&6 -@@ -93630,17 +94677,17 @@ - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:93634: checking for $ac_hdr" >&5 -+echo "configure:94681: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:93644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+{ (eval echo configure:94691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -@@ -93670,7 +94717,7 @@ - - LIBS="$LIBS -lst" - echo $ac_n "checking for SGI's State Threads""... $ac_c" 1>&6 --echo "configure:93674: checking for SGI's State Threads" >&5 -+echo "configure:94721: checking for SGI's State Threads" >&5 - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF - #define TSRM_ST 1 -@@ -93702,7 +94749,7 @@ - pthreads_working=no - else - cat > conftest.$ac_ext < -@@ -93720,7 +94767,7 @@ - return pthread_create(&thd, NULL, thread_routine, &data); - } - EOF --if { (eval echo configure:93724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:94771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - pthreads_working=yes -@@ -93740,7 +94787,7 @@ - CFLAGS=$save_CFLAGS - - echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6 --echo "configure:93744: checking for pthreads_cflags" >&5 -+echo "configure:94791: checking for pthreads_cflags" >&5 - if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -93755,7 +94802,7 @@ - pthreads_working=no - else - cat > conftest.$ac_ext < -@@ -93773,7 +94820,7 @@ - return pthread_create(&thd, NULL, thread_routine, &data); - } - EOF --if { (eval echo configure:93777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:94824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - pthreads_working=yes -@@ -93803,7 +94850,7 @@ - echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6 - - echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6 --echo "configure:93807: checking for pthreads_lib" >&5 -+echo "configure:94854: checking for pthreads_lib" >&5 - if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -93818,7 +94865,7 @@ - pthreads_working=no - else - cat > conftest.$ac_ext < -@@ -93836,7 +94883,7 @@ - return pthread_create(&thd, NULL, thread_routine, &data); - } - EOF --if { (eval echo configure:93840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:94887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - - pthreads_working=yes -@@ -93887,7 +94934,7 @@ - - - echo $ac_n "checking for POSIX threads""... $ac_c" 1>&6 --echo "configure:93891: checking for POSIX threads" >&5 -+echo "configure:94938: checking for POSIX threads" >&5 - echo "$ac_t""yes" 1>&6 - fi - -@@ -94412,12 +95459,12 @@ - fi - - echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 --echo "configure:94416: checking for Cygwin environment" >&5 -+echo "configure:95463: checking for Cygwin environment" >&5 - if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:95479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes - else -@@ -94445,19 +95492,19 @@ - CYGWIN= - test "$ac_cv_cygwin" = yes && CYGWIN=yes - echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 --echo "configure:94449: checking for mingw32 environment" >&5 -+echo "configure:95496: checking for mingw32 environment" >&5 - if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:95508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes - else -@@ -94543,7 +95590,7 @@ - fi - - echo $ac_n "checking build system type""... $ac_c" 1>&6 --echo "configure:94547: checking build system type" >&5 -+echo "configure:95594: checking build system type" >&5 - - build_alias=$build - case "$build_alias" in -@@ -94572,7 +95619,7 @@ - if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 --echo "configure:94576: checking for ld used by GCC" >&5 -+echo "configure:95623: checking for ld used by GCC" >&5 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw -@@ -94602,10 +95649,10 @@ - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 --echo "configure:94606: checking for GNU ld" >&5 -+echo "configure:95653: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 --echo "configure:94609: checking for non-GNU ld" >&5 -+echo "configure:95656: checking for non-GNU ld" >&5 - fi - if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -94640,7 +95687,7 @@ - fi - test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 --echo "configure:94644: checking if the linker ($LD) is GNU ld" >&5 -+echo "configure:95691: checking if the linker ($LD) is GNU ld" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -94657,7 +95704,7 @@ - - - echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 --echo "configure:94661: checking for $LD option to reload object files" >&5 -+echo "configure:95708: checking for $LD option to reload object files" >&5 - if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -94669,7 +95716,7 @@ - test -n "$reload_flag" && reload_flag=" $reload_flag" - - echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 --echo "configure:94673: checking for BSD-compatible nm" >&5 -+echo "configure:95720: checking for BSD-compatible nm" >&5 - if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -94707,7 +95754,7 @@ - echo "$ac_t""$NM" 1>&6 - - echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6 --echo "configure:94711: checking for a sed that does not truncate output" >&5 -+echo "configure:95758: checking for a sed that does not truncate output" >&5 - if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -94791,7 +95838,7 @@ - echo "$ac_t""$SED" 1>&6 - - echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6 --echo "configure:94795: checking how to recognise dependent libraries" >&5 -+echo "configure:95842: checking how to recognise dependent libraries" >&5 - if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -94978,13 +96025,13 @@ - deplibs_check_method=$lt_cv_deplibs_check_method - - echo $ac_n "checking for object suffix""... $ac_c" 1>&6 --echo "configure:94982: checking for object suffix" >&5 -+echo "configure:96029: checking for object suffix" >&5 - if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - rm -f conftest* - echo 'int i = 1;' > conftest.$ac_ext --if { (eval echo configure:94988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:96035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; -@@ -95004,7 +96051,7 @@ - - - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 --echo "configure:95008: checking for executable suffix" >&5 -+echo "configure:96055: checking for executable suffix" >&5 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95014,10 +96061,10 @@ - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= -- if { (eval echo configure:95018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then -+ if { (eval echo configure:96065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in -- *.c | *.o | *.obj) ;; -+ *.$ac_ext | *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done -@@ -95045,7 +96092,7 @@ - - # Check for command to grab the raw symbol name followed by C symbol from nm. - echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 --echo "configure:95049: checking command to parse $NM output" >&5 -+echo "configure:96096: checking command to parse $NM output" >&5 - if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95128,10 +96175,10 @@ - int main(){nm_test_var='a';nm_test_func();return(0);} - EOF - -- if { (eval echo configure:95132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ if { (eval echo configure:96179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - # Now try to grab the symbols. - nlist=conftest.nm -- if { (eval echo configure:95135: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then -+ if { (eval echo configure:96182: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" -@@ -95182,7 +96229,7 @@ - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$no_builtin_flag" -- if { (eval echo configure:95186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then -+ if { (eval echo configure:96233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS="$save_LIBS" -@@ -95236,7 +96283,7 @@ - file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 --echo "configure:95240: checking for ${ac_tool_prefix}file" >&5 -+echo "configure:96287: checking for ${ac_tool_prefix}file" >&5 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95298,7 +96345,7 @@ - if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - echo $ac_n "checking for file""... $ac_c" 1>&6 --echo "configure:95302: checking for file" >&5 -+echo "configure:96349: checking for file" >&5 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95369,7 +96416,7 @@ - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. - set dummy ${ac_tool_prefix}ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:95373: checking for $ac_word" >&5 -+echo "configure:96420: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95401,7 +96448,7 @@ - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:95405: checking for $ac_word" >&5 -+echo "configure:96452: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95436,7 +96483,7 @@ - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:95440: checking for $ac_word" >&5 -+echo "configure:96487: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95468,7 +96515,7 @@ - # Extract the first word of "strip", so it can be a program name with args. - set dummy strip; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:95472: checking for $ac_word" >&5 -+echo "configure:96519: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95517,8 +96564,8 @@ - case $host in - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 95521 "configure"' > conftest.$ac_ext -- if { (eval echo configure:95522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ echo '#line 96568 "configure"' > conftest.$ac_ext -+ if { (eval echo configure:96569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" -@@ -95539,7 +96586,7 @@ - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 --echo "configure:95543: checking whether the C compiler needs -belf" >&5 -+echo "configure:96590: checking whether the C compiler needs -belf" >&5 - if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95552,14 +96599,14 @@ - cross_compiling=$ac_cv_prog_cc_cross - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:96610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_needs_belf=yes - else -@@ -95681,7 +96728,7 @@ - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking for objdir""... $ac_c" 1>&6 --echo "configure:95685: checking for objdir" >&5 -+echo "configure:96732: checking for objdir" >&5 - rm -f .libs 2>/dev/null - mkdir .libs 2>/dev/null - if test -d .libs; then -@@ -95712,7 +96759,7 @@ - # in isolation, and that seeing it set (from the cache) indicates that - # the associated values are set (in the cache) correctly too. - echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 --echo "configure:95716: checking for $compiler option to produce PIC" >&5 -+echo "configure:96763: checking for $compiler option to produce PIC" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95860,21 +96907,21 @@ - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 --echo "configure:95864: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 -+echo "configure:96911: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:96925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - case $host_os in - hpux9* | hpux10* | hpux11*) -@@ -95930,7 +96977,7 @@ - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 --echo "configure:95934: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 -+echo "configure:96981: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95938,14 +96985,14 @@ - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:96996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_prog_cc_static_works=yes - else -@@ -95976,7 +97023,7 @@ - ## - # Check to see if options -o and -c are simultaneously supported by compiler - echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 --echo "configure:95980: checking if $compiler supports -c -o file.$ac_objext" >&5 -+echo "configure:97027: checking if $compiler supports -c -o file.$ac_objext" >&5 - if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -95995,7 +97042,7 @@ - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" - compiler_c_o=no --if { (eval echo configure:95999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then -+if { (eval echo configure:97046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then -@@ -96024,7 +97071,7 @@ - if test x"$compiler_c_o" = x"yes"; then - # Check to see if we can write to a .lo - echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 --echo "configure:96028: checking if $compiler supports -c -o file.lo" >&5 -+echo "configure:97075: checking if $compiler supports -c -o file.lo" >&5 - if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -96035,14 +97082,14 @@ - save_objext="$ac_objext" - ac_objext=lo - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:97093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -96077,7 +97124,7 @@ - if test "$compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 --echo "configure:96081: checking if we can lock with hard links" >&5 -+echo "configure:97128: checking if we can lock with hard links" >&5 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no -@@ -96100,20 +97147,20 @@ - if test "$GCC" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 --echo "configure:96104: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -+echo "configure:97151: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - echo "int some_variable = 0;" > conftest.$ac_ext - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" - compiler_rtti_exceptions=no - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+if { (eval echo configure:97164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -96144,7 +97191,7 @@ - ## - # See if the linker supports building shared libraries. - echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 --echo "configure:96148: checking whether the linker ($LD) supports shared libraries" >&5 -+echo "configure:97195: checking whether the linker ($LD) supports shared libraries" >&5 - - allow_undefined_flag= - no_undefined_flag= -@@ -96835,7 +97882,7 @@ - ## - # Check hardcoding attributes. - echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 --echo "configure:96839: checking how to hardcode library paths into programs" >&5 -+echo "configure:97886: checking how to hardcode library paths into programs" >&5 - hardcode_action= - if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then -@@ -96867,7 +97914,7 @@ - striplib= - old_striplib= - echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 --echo "configure:96871: checking whether stripping libraries is possible" >&5 -+echo "configure:97918: checking whether stripping libraries is possible" >&5 - if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" -@@ -96885,7 +97932,7 @@ - ## - # PORTME Fill in your ld.so characteristics - echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 --echo "configure:96889: checking dynamic linker characteristics" >&5 -+echo "configure:97936: checking dynamic linker characteristics" >&5 - library_names_spec= - libname_spec='lib$name' - soname_spec= -@@ -97144,8 +98191,8 @@ - libsuff= - case "$host_cpu" in - x86_64*|s390x*) -- echo '#line 97148 "configure"' > conftest.$ac_ext -- if { (eval echo configure:97149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ echo '#line 98195 "configure"' > conftest.$ac_ext -+ if { (eval echo configure:98196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 -@@ -97320,7 +98367,7 @@ - ## - # Report the final consequences. - echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 --echo "configure:97324: checking if libtool supports shared libraries" >&5 -+echo "configure:98371: checking if libtool supports shared libraries" >&5 - echo "$ac_t""$can_build_shared" 1>&6 - ## - ## END FIXME -@@ -97328,7 +98375,7 @@ - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 --echo "configure:97332: checking whether to build shared libraries" >&5 -+echo "configure:98379: checking whether to build shared libraries" >&5 - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and -@@ -97355,7 +98402,7 @@ - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 --echo "configure:97359: checking whether to build static libraries" >&5 -+echo "configure:98406: checking whether to build static libraries" >&5 - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - echo "$ac_t""$enable_static" 1>&6 -@@ -97398,12 +98445,12 @@ - - *) - echo $ac_n "checking for shl_load""... $ac_c" 1>&6 --echo "configure:97402: checking for shl_load" >&5 -+echo "configure:98449: checking for shl_load" >&5 - if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:98477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shl_load=yes" - else -@@ -97444,7 +98491,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 --echo "configure:97448: checking for shl_load in -ldld" >&5 -+echo "configure:98495: checking for shl_load in -ldld" >&5 - ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -97452,7 +98499,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:98514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -97482,12 +98529,12 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen""... $ac_c" 1>&6 --echo "configure:97486: checking for dlopen" >&5 -+echo "configure:98533: checking for dlopen" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:98561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" - else -@@ -97528,7 +98575,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 --echo "configure:97532: checking for dlopen in -ldl" >&5 -+echo "configure:98579: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -97536,7 +98583,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:98598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -97566,7 +98613,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 --echo "configure:97570: checking for dlopen in -lsvld" >&5 -+echo "configure:98617: checking for dlopen in -lsvld" >&5 - ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -97574,7 +98621,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-lsvld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:98636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -97604,7 +98651,7 @@ - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 --echo "configure:97608: checking for dld_link in -ldld" >&5 -+echo "configure:98655: checking for dld_link in -ldld" >&5 - ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -97612,7 +98659,7 @@ - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+if { (eval echo configure:98674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -@@ -97679,7 +98726,7 @@ - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 --echo "configure:97683: checking whether a program can dlopen itself" >&5 -+echo "configure:98730: checking whether a program can dlopen itself" >&5 - if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -97689,7 +98736,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ if { (eval echo configure:98801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in -@@ -97773,7 +98820,7 @@ - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 --echo "configure:97777: checking whether a statically linked program can dlopen itself" >&5 -+echo "configure:98824: checking whether a statically linked program can dlopen itself" >&5 - if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -97783,7 +98830,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ if { (eval echo configure:98895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in -@@ -97895,14 +98942,14 @@ - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 --echo "configure:97899: checking whether -lc should be explicitly linked in" >&5 -+echo "configure:98946: checking whether -lc should be explicitly linked in" >&5 - if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - $rm conftest* - echo 'static int dummy;' > conftest.$ac_ext - -- if { (eval echo configure:97906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ if { (eval echo configure:98953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext -@@ -97915,7 +98962,7 @@ - libname=conftest - save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= -- if { (eval echo configure:97919: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } -+ if { (eval echo configure:98966: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } - then - lt_cv_archive_cmds_need_lc=no - else -@@ -99147,6 +100194,7 @@ - s%@ORACLE_DIR@%$ORACLE_DIR%g - s%@ORACLE_VERSION@%$ORACLE_VERSION%g - s%@SNMP_CONFIG@%$SNMP_CONFIG%g -+s%@LEMON@%$LEMON%g - s%@yazconfig@%$yazconfig%g - s%@INLINE_CFLAGS@%$INLINE_CFLAGS%g - s%@INCLUDE_PATH@%$INCLUDE_PATH%g -diff -ruN php-4.3.11-old/ext/sqlite/CREDITS php-4.3.11-new/ext/sqlite/CREDITS ---- php-4.3.11-old/ext/sqlite/CREDITS 1970-01-01 01:00:00.000000000 +0100 -+++ php-4.3.11-new/ext/sqlite/CREDITS 2003-05-13 17:52:16.000000000 +0200 -@@ -0,0 +1,2 @@ -+sqlite -+Wez Furlong, Tal Peer, Marcus Börger -diff -ruN php-4.3.11-old/ext/sqlite/README php-4.3.11-new/ext/sqlite/README ---- php-4.3.11-old/ext/sqlite/README 1970-01-01 01:00:00.000000000 +0100 -+++ php-4.3.11-new/ext/sqlite/README 2003-04-17 03:33:52.000000000 +0200 -@@ -0,0 +1,14 @@ -+This is an extension for the SQLite Embeddable SQL Database Engine. -+http://www.sqlite.org/ -+ -+SQLite is a C library that implements an embeddable SQL database engine. -+Programs that link with the SQLite library can have SQL database access -+without running a separate RDBMS process. -+ -+SQLite is not a client library used to connect to a big database server. -+SQLite is the server. The SQLite library reads and writes directly to and from -+the database files on disk -+ -+ -+ -+vim:tw=78:et -diff -ruN php-4.3.11-old/ext/sqlite/TODO php-4.3.11-new/ext/sqlite/TODO ---- php-4.3.11-old/ext/sqlite/TODO 1970-01-01 01:00:00.000000000 +0100 -+++ php-4.3.11-new/ext/sqlite/TODO 2003-04-20 17:11:15.000000000 +0200 -@@ -0,0 +1,22 @@ -+- Transparent binary encoding of return values from PHP callback functions. -+ -+- Add user-space callback for the authorizer function (this is potentially -+ very slow, so it needs to be implemented carefully). -+ -+- Add user-space callback to handle busy databases. -+ -+- Test-suite -+ -+ o Test how robust we are when a user-space function is registered as -+ a callback for a persistent connection in script A, then script B is -+ called that doesn't register the callback but does make use of the -+ function in an SQL query. -+ --> Our test suite doesn't allow us to test persistent connections -+ at this time :/ -+ -+- If building a ZTS build, -DTHREADSAFE while compiling libsqlite -+ -+- If building a non-debug build, -DNDEBUG will disable the expensive -+ asserts in the inner loop. (and double performance) -+ -+vim:tw=78 -diff -ruN php-4.3.11-old/ext/sqlite/config.m4 php-4.3.11-new/ext/sqlite/config.m4 ---- php-4.3.11-old/ext/sqlite/config.m4 1970-01-01 01:00:00.000000000 +0100 -+++ php-4.3.11-new/ext/sqlite/config.m4 2005-07-04 17:22:39.000000000 +0200 -@@ -0,0 +1,106 @@ -+dnl $Id$ -+dnl config.m4 for extension sqlite -+dnl vim:et:ts=2:sw=2 -+ -+PHP_ARG_WITH(sqlite, for sqlite support, -+[ --with-sqlite Include sqlite support]) -+ -+if test "$PHP_SQLITE" != "no"; then -+ -+ if test "$PHP_SQLITE" != "yes"; then -+ SEARCH_PATH="/usr/local /usr" -+ SEARCH_FOR="/include/sqlite.h" -+ if test -r $PHP_SQLITE/; then # path given as parameter -+ SQLITE_DIR=$PHP_SQLITE -+ else # search default path list -+ AC_MSG_CHECKING([for sqlite files in default path]) -+ for i in $SEARCH_PATH ; do -+ if test -r $i/$SEARCH_FOR; then -+ SQLITE_DIR=$i -+ AC_MSG_RESULT(found in $i) -+ fi -+ done -+ fi -+ -+ if test -z "$SQLITE_DIR"; then -+ AC_MSG_RESULT([not found]) -+ AC_MSG_ERROR([Please reinstall the sqlite distribution from http://www.sqlite.org]) -+ fi -+ -+ PHP_ADD_INCLUDE($SQLITE_DIR/include) -+ -+ LIBNAME=sqlite -+ LIBSYMBOL=sqlite_open -+ -+ PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, -+ [ -+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SQLITE_DIR/lib, SQLITE_SHARED_LIBADD) -+ AC_DEFINE(HAVE_SQLITELIB,1,[ ]) -+ ],[ -+ AC_MSG_ERROR([wrong sqlite lib version or lib not found]) -+ ],[ -+ -L$SQLITE_DIR/lib -lm -ldl -+ ]) -+ -+ PHP_SUBST(SQLITE_SHARED_LIBADD) -+ PHP_NEW_EXTENSION(sqlite, sqlite.c, $ext_shared) -+ else -+ # use bundled library -+ -+ PHP_SQLITE_CFLAGS="-I@ext_srcdir@/libsqlite/src" -+ -+ sources="libsqlite/src/opcodes.c -+ libsqlite/src/parse.c libsqlite/src/encode.c \ -+ libsqlite/src/auth.c libsqlite/src/btree.c libsqlite/src/build.c \ -+ libsqlite/src/delete.c libsqlite/src/expr.c libsqlite/src/func.c \ -+ libsqlite/src/hash.c libsqlite/src/insert.c libsqlite/src/main.c \ -+ libsqlite/src/os.c libsqlite/src/pager.c \ -+ libsqlite/src/printf.c libsqlite/src/random.c \ -+ libsqlite/src/select.c libsqlite/src/table.c libsqlite/src/tokenize.c \ -+ libsqlite/src/update.c libsqlite/src/util.c libsqlite/src/vdbe.c \ -+ libsqlite/src/attach.c libsqlite/src/btree_rb.c libsqlite/src/pragma.c \ -+ libsqlite/src/vacuum.c libsqlite/src/copy.c \ -+ libsqlite/src/where.c libsqlite/src/trigger.c" -+ -+ PHP_NEW_EXTENSION(sqlite, sqlite.c $sources, $ext_shared,,$PHP_SQLITE_CFLAGS) -+ PHP_ADD_BUILD_DIR($ext_builddir/libsqlite) -+ PHP_ADD_BUILD_DIR($ext_builddir/libsqlite/src) -+ AC_CHECK_SIZEOF(char *,4) -+ AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Size of a pointer]) -+ AC_DEFINE(OS_UNIX, 1, [if this is unix]) -+ AC_DEFINE(OS_WIN, 0, [if this is windows]) -+ dnl use latin 1 for now; the utf-8 handling in funcs.c uses assert(), -+ dnl which is a bit silly and something we want to avoid -+ SQLITE_ENCODING="ISO8859" -+ dnl SQLITE_ENCODING="UTF-8" -+ dnl AC_DEFINE(SQLITE_UTF8,1,[if SQLite should use utf-8 encoding]) -+ PHP_SUBST(SQLITE_ENCODING) -+ -+ AC_PATH_PROG(LEMON,lemon,no) -+ PHP_SUBST(LEMON) -+ -+ SQLITE_VERSION=`cat $ext_srcdir/libsqlite/VERSION` -+ PHP_SUBST(SQLITE_VERSION) -+ -+ if test "$ext_shared" = "no"; then -+ echo '#include "php_config.h"' > $ext_srcdir/libsqlite/src/config.h -+ else -+ echo "#include \"$abs_builddir/config.h\"" > $ext_srcdir/libsqlite/src/config.h -+ fi -+ -+ cat >> $ext_srcdir/libsqlite/src/config.h < | -+ | Tal Peer | -+ | Marcus Boerger | -+ +----------------------------------------------------------------------+ -+ -+ $Id$ -+*/ -+ -+#ifndef PHP_SQLITE_H -+#define PHP_SQLITE_H -+ -+extern zend_module_entry sqlite_module_entry; -+#define phpext_sqlite_ptr &sqlite_module_entry -+ -+#ifdef PHP_WIN32 -+#define PHP_SQLITE_API __declspec(dllexport) -+#else -+#define PHP_SQLITE_API -+#endif -+ -+#ifdef ZTS -+#include "TSRM.h" -+#endif -+ -+PHP_MINIT_FUNCTION(sqlite); -+PHP_MSHUTDOWN_FUNCTION(sqlite); -+PHP_RINIT_FUNCTION(sqlite); -+PHP_RSHUTDOWN_FUNCTION(sqlite); -+PHP_MINFO_FUNCTION(sqlite); -+ -+PHP_FUNCTION(sqlite_open); -+PHP_FUNCTION(sqlite_popen); -+PHP_FUNCTION(sqlite_close); -+PHP_FUNCTION(sqlite_query); -+PHP_FUNCTION(sqlite_unbuffered_query); -+PHP_FUNCTION(sqlite_array_query); -+ -+PHP_FUNCTION(sqlite_fetch_array); -+PHP_FUNCTION(sqlite_fetch_string); -+PHP_FUNCTION(sqlite_fetch_all); -+PHP_FUNCTION(sqlite_current); -+PHP_FUNCTION(sqlite_column); -+ -+PHP_FUNCTION(sqlite_num_rows); -+PHP_FUNCTION(sqlite_num_fields); -+PHP_FUNCTION(sqlite_field_name); -+PHP_FUNCTION(sqlite_seek); -+PHP_FUNCTION(sqlite_rewind); -+PHP_FUNCTION(sqlite_next); -+PHP_FUNCTION(sqlite_has_more); -+ -+PHP_FUNCTION(sqlite_libversion); -+PHP_FUNCTION(sqlite_libencoding); -+ -+PHP_FUNCTION(sqlite_changes); -+PHP_FUNCTION(sqlite_last_insert_rowid); -+ -+PHP_FUNCTION(sqlite_escape_string); -+ -+PHP_FUNCTION(sqlite_busy_timeout); -+ -+PHP_FUNCTION(sqlite_last_error); -+PHP_FUNCTION(sqlite_error_string); -+ -+PHP_FUNCTION(sqlite_create_aggregate); -+PHP_FUNCTION(sqlite_create_function); -+PHP_FUNCTION(sqlite_udf_decode_binary); -+PHP_FUNCTION(sqlite_udf_encode_binary); -+ -+ZEND_BEGIN_MODULE_GLOBALS(sqlite) -+ long assoc_case; -+ZEND_END_MODULE_GLOBALS(sqlite) -+ -+#ifdef ZTS -+#define SQLITE_G(v) TSRMG(sqlite_globals_id, zend_sqlite_globals *, v) -+#else -+#define SQLITE_G(v) (sqlite_globals.v) -+#endif -+ -+#endif -+ -+ -+/* -+ * Local variables: -+ * tab-width: 4 -+ * c-basic-offset: 4 -+ * indent-tabs-mode: t -+ * End: -+ */ -diff -ruN php-4.3.11-old/ext/sqlite/sqlite.c php-4.3.11-new/ext/sqlite/sqlite.c ---- php-4.3.11-old/ext/sqlite/sqlite.c 1970-01-01 01:00:00.000000000 +0100 -+++ php-4.3.11-new/ext/sqlite/sqlite.c 2003-06-21 15:29:26.000000000 +0200 -@@ -0,0 +1,1879 @@ -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 4 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 1997-2003 The PHP Group | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 of the PHP license, | -+ | that is bundled with this package in the file LICENSE, and is | -+ | available through the world-wide-web at the following url: | -+ | http://www.php.net/license/3_0.txt. | -+ | If you did not receive a copy of the PHP license and are unable to | -+ | obtain it through the world-wide-web, please send a note to | -+ | license@php.net so we can mail you a copy immediately. | -+ +----------------------------------------------------------------------+ -+ | Authors: Wez Furlong | -+ | Tal Peer | -+ | Marcus Boerger | -+ +----------------------------------------------------------------------+ -+ -+ $Id$ -+*/ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#define PHP_SQLITE_MODULE_VERSION "1.0" -+ -+#include "php.h" -+#include "php_ini.h" -+#include "ext/standard/info.h" -+#include "php_sqlite.h" -+ -+#if HAVE_TIME_H -+# include -+#endif -+#include -+ -+#include -+ -+#ifndef safe_emalloc -+# define safe_emalloc(a,b,c) emalloc((a)*(b)+(c)) -+#endif -+ -+#ifndef ZEND_ENGINE_2 -+# define OnUpdateLong OnUpdateInt -+#endif -+ -+ZEND_DECLARE_MODULE_GLOBALS(sqlite) -+ -+extern int sqlite_encode_binary(const unsigned char *in, int n, unsigned char *out); -+extern int sqlite_decode_binary(const unsigned char *in, unsigned char *out); -+ -+static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; -+ -+static int le_sqlite_db, le_sqlite_result, le_sqlite_pdb; -+ -+static inline void php_sqlite_strtoupper(char *s) -+{ -+ while (*s!='\0') { -+ *s = toupper(*s); -+ s++; -+ } -+} -+ -+static inline void php_sqlite_strtolower(char *s) -+{ -+ while (*s!='\0') { -+ *s = tolower(*s); -+ s++; -+ } -+} -+ -+/* {{{ PHP_INI -+ */ -+PHP_INI_BEGIN() -+STD_PHP_INI_ENTRY_EX("sqlite.assoc_case", "0", PHP_INI_ALL, OnUpdateLong, assoc_case, zend_sqlite_globals, sqlite_globals, display_link_numbers) -+PHP_INI_END() -+/* }}} */ -+ -+ -+#define DB_FROM_ZVAL(db, zv) ZEND_FETCH_RESOURCE2(db, struct php_sqlite_db *, zv, -1, "sqlite database", le_sqlite_db, le_sqlite_pdb) -+ -+struct php_sqlite_result { -+ struct php_sqlite_db *db; -+ sqlite_vm *vm; -+ int buffered; -+ int ncolumns; -+ int nrows; -+ int curr_row; -+ char **col_names; -+ int alloc_rows; -+ char **table; -+ int mode; -+}; -+ -+struct php_sqlite_db { -+ sqlite *db; -+ int last_err_code; -+ int is_persistent; -+ int rsrc_id; -+ -+ HashTable callbacks; -+}; -+ -+struct php_sqlite_agg_functions { -+ struct php_sqlite_db *db; -+ int is_valid; -+ zval *step; -+ zval *fini; -+}; -+ -+ -+enum { PHPSQLITE_ASSOC = 1, PHPSQLITE_NUM = 2, PHPSQLITE_BOTH = PHPSQLITE_ASSOC|PHPSQLITE_NUM }; -+ -+function_entry sqlite_functions[] = { -+ PHP_FE(sqlite_open, arg3_force_ref) -+ PHP_FE(sqlite_popen, arg3_force_ref) -+ PHP_FE(sqlite_close, NULL) -+ PHP_FE(sqlite_query, NULL) -+ PHP_FE(sqlite_array_query, NULL) -+ PHP_FE(sqlite_fetch_array, NULL) -+ PHP_FE(sqlite_fetch_string, NULL) -+ PHP_FE(sqlite_fetch_all, NULL) -+ PHP_FE(sqlite_current, NULL) -+ PHP_FE(sqlite_column, NULL) -+ PHP_FE(sqlite_libversion, NULL) -+ PHP_FE(sqlite_libencoding, NULL) -+ PHP_FE(sqlite_changes, NULL) -+ PHP_FE(sqlite_last_insert_rowid, NULL) -+ PHP_FE(sqlite_num_rows, NULL) -+ PHP_FE(sqlite_num_fields, NULL) -+ PHP_FE(sqlite_field_name, NULL) -+ PHP_FE(sqlite_seek, NULL) -+ PHP_FE(sqlite_rewind, NULL) -+ PHP_FE(sqlite_next, NULL) -+ PHP_FE(sqlite_has_more, NULL) -+ PHP_FE(sqlite_escape_string, NULL) -+ PHP_FE(sqlite_busy_timeout, NULL) -+ PHP_FE(sqlite_last_error, NULL) -+ PHP_FE(sqlite_error_string, NULL) -+ PHP_FE(sqlite_unbuffered_query, NULL) -+ PHP_FE(sqlite_create_aggregate, NULL) -+ PHP_FE(sqlite_create_function, NULL) -+ PHP_FE(sqlite_udf_encode_binary, NULL) -+ PHP_FE(sqlite_udf_decode_binary, NULL) -+ {NULL, NULL, NULL} -+}; -+ -+ -+zend_module_entry sqlite_module_entry = { -+#if ZEND_MODULE_API_NO >= 20010901 -+ STANDARD_MODULE_HEADER, -+#endif -+ "sqlite", -+ sqlite_functions, -+ PHP_MINIT(sqlite), -+ NULL, -+ NULL, -+ PHP_RSHUTDOWN(sqlite), -+ PHP_MINFO(sqlite), -+#if ZEND_MODULE_API_NO >= 20010901 -+ PHP_SQLITE_MODULE_VERSION, -+#endif -+ STANDARD_MODULE_PROPERTIES -+}; -+ -+ -+#ifdef COMPILE_DL_SQLITE -+ZEND_GET_MODULE(sqlite) -+#endif -+ -+static int php_sqlite_callback_invalidator(struct php_sqlite_agg_functions *funcs TSRMLS_DC) -+{ -+ if (!funcs->is_valid) { -+ return 0; -+ } -+ -+ if (funcs->step) { -+ zval_ptr_dtor(&funcs->step); -+ funcs->step = NULL; -+ } -+ -+ if (funcs->fini) { -+ zval_ptr_dtor(&funcs->fini); -+ funcs->fini = NULL; -+ } -+ -+ funcs->is_valid = 0; -+ -+ return 0; -+} -+ -+ -+static void php_sqlite_callback_dtor(void *pDest) -+{ -+ struct php_sqlite_agg_functions *funcs = (struct php_sqlite_agg_functions*)pDest; -+ -+ if (funcs->is_valid) { -+ TSRMLS_FETCH(); -+ -+ php_sqlite_callback_invalidator(funcs TSRMLS_CC); -+ } -+} -+ -+static ZEND_RSRC_DTOR_FUNC(php_sqlite_db_dtor) -+{ -+ if (rsrc->ptr) { -+ struct php_sqlite_db *db = (struct php_sqlite_db*)rsrc->ptr; -+ sqlite_close(db->db); -+ -+ zend_hash_destroy(&db->callbacks); -+ -+ pefree(db, db->is_persistent); -+ -+ rsrc->ptr = NULL; -+ } -+} -+ -+static void real_result_dtor(struct php_sqlite_result *res TSRMLS_DC) -+{ -+ int i, j, base; -+ -+ if (res->vm) { -+ sqlite_finalize(res->vm, NULL); -+ } -+ -+ if (res->table) { -+ if (!res->buffered && res->nrows) { -+ res->nrows = 1; /* only one row is stored */ -+ } -+ for (i = 0; i < res->nrows; i++) { -+ base = i * res->ncolumns; -+ for (j = 0; j < res->ncolumns; j++) { -+ if (res->table[base + j] != NULL) { -+ efree(res->table[base + j]); -+ } -+ } -+ } -+ efree(res->table); -+ } -+ if (res->col_names) { -+ for (j = 0; j < res->ncolumns; j++) { -+ efree(res->col_names[j]); -+ } -+ efree(res->col_names); -+ } -+ -+ zend_list_delete(res->db->rsrc_id); -+ efree(res); -+} -+ -+static ZEND_RSRC_DTOR_FUNC(php_sqlite_result_dtor) -+{ -+ struct php_sqlite_result *res = (struct php_sqlite_result *)rsrc->ptr; -+ real_result_dtor(res TSRMLS_CC); -+} -+ -+static int php_sqlite_forget_persistent_id_numbers(zend_rsrc_list_entry *rsrc TSRMLS_DC) -+{ -+ struct php_sqlite_db *db; -+ -+ if (Z_TYPE_P(rsrc) != le_sqlite_pdb) { -+ return 0; -+ } -+ -+ db = (struct php_sqlite_db*)rsrc->ptr; -+ -+ db->rsrc_id = FAILURE; -+ -+ /* don't leave pending commits hanging around */ -+ sqlite_exec(db->db, "ROLLBACK", NULL, NULL, NULL); -+ -+ /* prevent bad mojo if someone tries to use a previously registered function in the next request */ -+ zend_hash_apply(&db->callbacks, (apply_func_t)php_sqlite_callback_invalidator TSRMLS_CC); -+ -+ return 0; -+} -+ -+PHP_RSHUTDOWN_FUNCTION(sqlite) -+{ -+ zend_hash_apply(&EG(persistent_list), (apply_func_t)php_sqlite_forget_persistent_id_numbers TSRMLS_CC); -+ return SUCCESS; -+} -+ -+/* {{{ PHP Function interface */ -+static void php_sqlite_generic_function_callback(sqlite_func *func, int argc, const char **argv) -+{ -+ zval *retval = NULL; -+ zval ***zargs = NULL; -+ zval funcname; -+ int i, res; -+ char *callable = NULL, *errbuf=NULL; -+ TSRMLS_FETCH(); -+ -+ /* sanity check the args */ -+ if (argc == 0) { -+ sqlite_set_result_error(func, "not enough parameters", -1); -+ return; -+ } -+ -+ ZVAL_STRING(&funcname, (char*)argv[0], 0); -+ -+ if (!zend_is_callable(&funcname, 0, &callable)) { -+ spprintf(&errbuf, 0, "function `%s' is not callable", callable); -+ sqlite_set_result_error(func, errbuf, -1); -+ efree(errbuf); -+ efree(callable); -+ return; -+ } -+ efree(callable); -+ -+ if (argc > 1) { -+ zargs = (zval ***)safe_emalloc((argc - 1), sizeof(zval **), 0); -+ -+ for (i = 0; i < argc-1; i++) { -+ zargs[i] = emalloc(sizeof(zval *)); -+ MAKE_STD_ZVAL(*zargs[i]); -+ ZVAL_STRING(*zargs[i], (char*)argv[i+1], 1); -+ } -+ } -+ -+ res = call_user_function_ex(EG(function_table), -+ NULL, -+ &funcname, -+ &retval, -+ argc-1, -+ zargs, -+ 0, NULL TSRMLS_CC); -+ -+ if (res == SUCCESS) { -+ if (retval == NULL) { -+ sqlite_set_result_string(func, NULL, 0); -+ } else { -+ switch (Z_TYPE_P(retval)) { -+ case IS_STRING: -+ sqlite_set_result_string(func, Z_STRVAL_P(retval), Z_STRLEN_P(retval)); -+ break; -+ case IS_LONG: -+ case IS_BOOL: -+ sqlite_set_result_int(func, Z_LVAL_P(retval)); -+ break; -+ case IS_DOUBLE: -+ sqlite_set_result_double(func, Z_DVAL_P(retval)); -+ break; -+ case IS_NULL: -+ default: -+ sqlite_set_result_string(func, NULL, 0); -+ } -+ } -+ } else { -+ sqlite_set_result_error(func, "call_user_function_ex failed", -1); -+ } -+ -+ if (retval) { -+ zval_ptr_dtor(&retval); -+ } -+ -+ if (zargs) { -+ for (i = 0; i < argc-1; i++) { -+ zval_ptr_dtor(zargs[i]); -+ efree(zargs[i]); -+ } -+ efree(zargs); -+ } -+} -+/* }}} */ -+ -+/* {{{ callback for sqlite_create_function */ -+static void php_sqlite_function_callback(sqlite_func *func, int argc, const char **argv) -+{ -+ zval *retval = NULL; -+ zval ***zargs = NULL; -+ int i, res; -+ struct php_sqlite_agg_functions *funcs = sqlite_user_data(func); -+ TSRMLS_FETCH(); -+ -+ if (!funcs->is_valid) { -+ sqlite_set_result_error(func, "this function has not been correctly defined for this request", -1); -+ return; -+ } -+ -+ if (argc > 0) { -+ zargs = (zval ***)safe_emalloc(argc, sizeof(zval **), 0); -+ -+ for (i = 0; i < argc; i++) { -+ zargs[i] = emalloc(sizeof(zval *)); -+ MAKE_STD_ZVAL(*zargs[i]); -+ -+ if (argv[i] == NULL) { -+ ZVAL_NULL(*zargs[i]); -+ } else { -+ ZVAL_STRING(*zargs[i], (char*)argv[i], 1); -+ } -+ } -+ } -+ -+ res = call_user_function_ex(EG(function_table), -+ NULL, -+ funcs->step, -+ &retval, -+ argc, -+ zargs, -+ 0, NULL TSRMLS_CC); -+ -+ if (res == SUCCESS) { -+ if (retval == NULL) { -+ sqlite_set_result_string(func, NULL, 0); -+ } else { -+ switch (Z_TYPE_P(retval)) { -+ case IS_STRING: -+ /* TODO: for binary results, need to encode the string */ -+ sqlite_set_result_string(func, Z_STRVAL_P(retval), Z_STRLEN_P(retval)); -+ break; -+ case IS_LONG: -+ case IS_BOOL: -+ sqlite_set_result_int(func, Z_LVAL_P(retval)); -+ break; -+ case IS_DOUBLE: -+ sqlite_set_result_double(func, Z_DVAL_P(retval)); -+ break; -+ case IS_NULL: -+ default: -+ sqlite_set_result_string(func, NULL, 0); -+ } -+ } -+ } else { -+ sqlite_set_result_error(func, "call_user_function_ex failed", -1); -+ } -+ -+ if (retval) { -+ zval_ptr_dtor(&retval); -+ } -+ -+ if (zargs) { -+ for (i = 0; i < argc; i++) { -+ zval_ptr_dtor(zargs[i]); -+ efree(zargs[i]); -+ } -+ efree(zargs); -+ } -+} -+/* }}} */ -+ -+/* {{{ callback for sqlite_create_aggregate: step function */ -+static void php_sqlite_agg_step_function_callback(sqlite_func *func, int argc, const char **argv) -+{ -+ zval *retval = NULL; -+ zval ***zargs; -+ zval **context_p; -+ int i, res, zargc; -+ struct php_sqlite_agg_functions *funcs = sqlite_user_data(func); -+ TSRMLS_FETCH(); -+ -+ if (!funcs->is_valid) { -+ sqlite_set_result_error(func, "this function has not been correctly defined for this request", -1); -+ return; -+ } -+ -+ /* sanity check the args */ -+ if (argc < 1) { -+ return; -+ } -+ -+ zargc = argc + 1; -+ zargs = (zval ***)safe_emalloc(zargc, sizeof(zval **), 0); -+ -+ /* first arg is always the context zval */ -+ context_p = (zval **)sqlite_aggregate_context(func, sizeof(*context_p)); -+ -+ if (*context_p == NULL) { -+ MAKE_STD_ZVAL(*context_p); -+ (*context_p)->is_ref = 1; -+ Z_TYPE_PP(context_p) = IS_NULL; -+ } -+ -+ zargs[0] = context_p; -+ -+ /* copy the other args */ -+ for (i = 0; i < argc; i++) { -+ zargs[i+1] = emalloc(sizeof(zval *)); -+ MAKE_STD_ZVAL(*zargs[i+1]); -+ if (argv[i] == NULL) { -+ ZVAL_NULL(*zargs[i+1]); -+ } else { -+ ZVAL_STRING(*zargs[i+1], (char*)argv[i], 1); -+ } -+ } -+ -+ res = call_user_function_ex(EG(function_table), -+ NULL, -+ funcs->step, -+ &retval, -+ zargc, -+ zargs, -+ 0, NULL TSRMLS_CC); -+ -+ if (res != SUCCESS) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "call_user_function_ex failed"); -+ } -+ -+ if (retval) { -+ zval_ptr_dtor(&retval); -+ } -+ -+ if (zargs) { -+ for (i = 1; i < zargc; i++) { -+ zval_ptr_dtor(zargs[i]); -+ efree(zargs[i]); -+ } -+ efree(zargs); -+ } -+} -+/* }}} */ -+ -+/* {{{ callback for sqlite_create_aggregate: finalize function */ -+static void php_sqlite_agg_fini_function_callback(sqlite_func *func) -+{ -+ zval *retval = NULL; -+ int res; -+ struct php_sqlite_agg_functions *funcs = sqlite_user_data(func); -+ zval **context_p; -+ TSRMLS_FETCH(); -+ -+ if (!funcs->is_valid) { -+ sqlite_set_result_error(func, "this function has not been correctly defined for this request", -1); -+ return; -+ } -+ -+ context_p = (zval **)sqlite_aggregate_context(func, sizeof(*context_p)); -+ -+ res = call_user_function_ex(EG(function_table), -+ NULL, -+ funcs->fini, -+ &retval, -+ 1, -+ &context_p, -+ 0, NULL TSRMLS_CC); -+ -+ if (res == SUCCESS) { -+ if (retval == NULL) { -+ sqlite_set_result_string(func, NULL, 0); -+ } else { -+ switch (Z_TYPE_P(retval)) { -+ case IS_STRING: -+ /* TODO: for binary results, need to encode the string */ -+ sqlite_set_result_string(func, Z_STRVAL_P(retval), Z_STRLEN_P(retval)); -+ break; -+ case IS_LONG: -+ case IS_BOOL: -+ sqlite_set_result_int(func, Z_LVAL_P(retval)); -+ break; -+ case IS_DOUBLE: -+ sqlite_set_result_double(func, Z_DVAL_P(retval)); -+ break; -+ case IS_NULL: -+ default: -+ sqlite_set_result_string(func, NULL, 0); -+ } -+ } -+ } else { -+ sqlite_set_result_error(func, "call_user_function_ex failed", -1); -+ } -+ -+ if (retval) { -+ zval_ptr_dtor(&retval); -+ } -+ -+ zval_ptr_dtor(context_p); -+} -+/* }}} */ -+ -+/* {{{ Authorization Callback */ -+static int php_sqlite_authorizer(void *autharg, int access_type, const char *arg3, const char *arg4, -+ const char *arg5, const char *arg6) -+{ -+ switch (access_type) { -+ case SQLITE_COPY: -+ { -+ TSRMLS_FETCH(); -+ if (PG(safe_mode) && (!php_checkuid(arg4, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { -+ return SQLITE_DENY; -+ } -+ -+ if (php_check_open_basedir(arg4 TSRMLS_CC)) { -+ return SQLITE_DENY; -+ } -+ } -+ return SQLITE_OK; -+#ifdef SQLITE_ATTACH -+ case SQLITE_ATTACH: -+ { -+ TSRMLS_FETCH(); -+ if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { -+ return SQLITE_DENY; -+ } -+ -+ if (php_check_open_basedir(arg3 TSRMLS_CC)) { -+ return SQLITE_DENY; -+ } -+ } -+ return SQLITE_OK; -+#endif -+ -+ default: -+ /* access allowed */ -+ return SQLITE_OK; -+ } -+} -+/* }}} */ -+ -+static int init_sqlite_globals(zend_sqlite_globals *g) -+{ -+ g->assoc_case = 0; -+ return SUCCESS; -+} -+ -+PHP_MINIT_FUNCTION(sqlite) -+{ -+ ZEND_INIT_MODULE_GLOBALS(sqlite, init_sqlite_globals, NULL); -+ -+ REGISTER_INI_ENTRIES(); -+ -+ le_sqlite_db = zend_register_list_destructors_ex(php_sqlite_db_dtor, NULL, "sqlite database", module_number); -+ le_sqlite_pdb = zend_register_list_destructors_ex(NULL, php_sqlite_db_dtor, "sqlite database (persistent)", module_number); -+ le_sqlite_result = zend_register_list_destructors_ex(php_sqlite_result_dtor, NULL, "sqlite result", module_number); -+ -+ REGISTER_LONG_CONSTANT("SQLITE_BOTH", PHPSQLITE_BOTH, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_NUM", PHPSQLITE_NUM, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_ASSOC", PHPSQLITE_ASSOC, CONST_CS|CONST_PERSISTENT); -+ -+ REGISTER_LONG_CONSTANT("SQLITE_OK", SQLITE_OK, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_ERROR", SQLITE_ERROR, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_INTERNAL", SQLITE_INTERNAL, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_PERM", SQLITE_PERM, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_ABORT", SQLITE_ABORT, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_BUSY", SQLITE_BUSY, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_LOCKED", SQLITE_LOCKED, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_NOMEM", SQLITE_NOMEM, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_READONLY", SQLITE_READONLY, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_INTERRUPT", SQLITE_INTERRUPT, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_IOERR", SQLITE_IOERR, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_CORRUPT", SQLITE_CORRUPT, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_NOTFOUND", SQLITE_NOTFOUND, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_FULL", SQLITE_FULL, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_CANTOPEN", SQLITE_CANTOPEN, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_PROTOCOL", SQLITE_PROTOCOL, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_EMPTY", SQLITE_EMPTY, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_SCHEMA", SQLITE_SCHEMA, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_TOOBIG", SQLITE_TOOBIG, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_CONSTRAINT", SQLITE_CONSTRAINT, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_MISMATCH", SQLITE_MISMATCH, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_MISUSE", SQLITE_MISUSE, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_NOLFS", SQLITE_NOLFS, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_AUTH", SQLITE_AUTH, CONST_CS|CONST_PERSISTENT); -+#ifdef SQLITE_FORMAT -+ REGISTER_LONG_CONSTANT("SQLITE_FORMAT", SQLITE_FORMAT, CONST_CS|CONST_PERSISTENT); -+#endif -+ REGISTER_LONG_CONSTANT("SQLITE_ROW", SQLITE_ROW, CONST_CS|CONST_PERSISTENT); -+ REGISTER_LONG_CONSTANT("SQLITE_DONE", SQLITE_DONE, CONST_CS|CONST_PERSISTENT); -+ -+ return SUCCESS; -+} -+ -+PHP_MINFO_FUNCTION(sqlite) -+{ -+ php_info_print_table_start(); -+ php_info_print_table_header(2, "SQLite support", "enabled"); -+ php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id$"); -+ php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); -+ php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); -+ php_info_print_table_end(); -+ -+ DISPLAY_INI_ENTRIES(); -+} -+ -+static struct php_sqlite_db *php_sqlite_open(char *filename, int mode, char *persistent_id, zval *return_value, zval *errmsg TSRMLS_DC) -+{ -+ char *errtext = NULL; -+ sqlite *sdb = NULL; -+ struct php_sqlite_db *db = NULL; -+ -+ sdb = sqlite_open(filename, mode, &errtext); -+ -+ if (sdb == NULL) { -+ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errtext); -+ -+ if (errmsg) { -+ ZVAL_STRING(errmsg, errtext, 1); -+ } -+ -+ sqlite_freemem(errtext); -+ -+ RETVAL_FALSE; -+ return NULL; -+ } -+ -+ db = (struct php_sqlite_db *)pemalloc(sizeof(struct php_sqlite_db), persistent_id ? 1 : 0); -+ db->is_persistent = persistent_id ? 1 : 0; -+ db->last_err_code = SQLITE_OK; -+ db->db = sdb; -+ -+ zend_hash_init(&db->callbacks, 0, NULL, php_sqlite_callback_dtor, db->is_persistent); -+ -+ /* register the PHP functions */ -+ sqlite_create_function(sdb, "php", -1, php_sqlite_generic_function_callback, 0); -+ -+ /* set default busy handler; keep retrying up until 1 minute has passed, -+ * then fail with a busy status code */ -+ sqlite_busy_timeout(sdb, 60000); -+ -+ /* authorizer hook so we can enforce safe mode -+ * Note: the declaration of php_sqlite_authorizer is correct for 2.8.2 of libsqlite, -+ * and IS backwards binary compatible with earlier versions */ -+ sqlite_set_authorizer(sdb, php_sqlite_authorizer, NULL); -+ -+ db->rsrc_id = ZEND_REGISTER_RESOURCE(return_value, db, persistent_id ? le_sqlite_pdb : le_sqlite_db); -+ -+ if (persistent_id) { -+ list_entry le; -+ -+ Z_TYPE(le) = le_sqlite_pdb; -+ le.ptr = db; -+ -+ if (FAILURE == zend_hash_update(&EG(persistent_list), persistent_id, -+ strlen(persistent_id)+1, -+ (void *)&le, sizeof(le), NULL)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to register persistent resource"); -+ } -+ } -+ -+ return db; -+} -+ -+/* {{{ proto resource sqlite_popen(string filename [, int mode, string &errmessage]) -+ Opens a persistent handle to an SQLite database. Will create the database if it does not exist */ -+PHP_FUNCTION(sqlite_popen) -+{ -+ int mode = 0666; -+ char *filename, *fullpath, *hashkey; -+ long filename_len, hashkeylen; -+ zval *errmsg = NULL; -+ struct php_sqlite_db *db = NULL; -+ list_entry *le; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", -+ &filename, &filename_len, &mode, &errmsg)) { -+ return; -+ } -+ -+ if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { -+ /* resolve the fully-qualified path name to use as the hash key */ -+ fullpath = expand_filepath(filename, NULL TSRMLS_CC); -+ -+ if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { -+ RETURN_FALSE; -+ } -+ -+ if (php_check_open_basedir(fullpath TSRMLS_CC)) { -+ RETURN_FALSE; -+ } -+ } else { -+ fullpath = estrndup(filename, filename_len); -+ } -+ -+ hashkeylen = spprintf(&hashkey, 0, "sqlite_pdb_%s:%d", fullpath, mode); -+ -+ /* do we have an existing persistent connection ? */ -+ if (SUCCESS == zend_hash_find(&EG(persistent_list), hashkey, hashkeylen+1, (void*)&le)) { -+ if (Z_TYPE_P(le) == le_sqlite_pdb) { -+ db = (struct php_sqlite_db*)le->ptr; -+ -+ if (db->rsrc_id == FAILURE) { -+ /* give it a valid resource id for this request */ -+ db->rsrc_id = ZEND_REGISTER_RESOURCE(return_value, db, le_sqlite_pdb); -+ } else { -+ /* already accessed this request; map it */ -+ ZVAL_RESOURCE(return_value, db->rsrc_id); -+ } -+ -+ /* all set */ -+ efree(fullpath); -+ efree(hashkey); -+ return; -+ } -+ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Some other type of persistent resource is using this hash key!?"); -+ RETURN_FALSE; -+ } -+ -+ /* now we need to open the database */ -+ php_sqlite_open(fullpath, mode, hashkey, return_value, errmsg TSRMLS_CC); -+ -+ efree(fullpath); -+ efree(hashkey); -+} -+/* }}} */ -+ -+/* {{{ proto resource sqlite_open(string filename [, int mode, string &errmessage]) -+ Opens an SQLite database. Will create the database if it does not exist */ -+PHP_FUNCTION(sqlite_open) -+{ -+ int mode = 0666; -+ char *filename; -+ long filename_len; -+ zval *errmsg = NULL; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", -+ &filename, &filename_len, &mode, &errmsg)) { -+ return; -+ } -+ -+ if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { -+ if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { -+ RETURN_FALSE; -+ } -+ -+ if (php_check_open_basedir(filename TSRMLS_CC)) { -+ RETURN_FALSE; -+ } -+ } -+ -+ php_sqlite_open(filename, mode, NULL, return_value, errmsg TSRMLS_CC); -+} -+/* }}} */ -+ -+/* {{{ proto void sqlite_busy_timeout(resource db, int ms) -+ Set busy timeout duration. If ms <= 0, all busy handlers are disabled */ -+PHP_FUNCTION(sqlite_busy_timeout) -+{ -+ zval *zdb; -+ struct php_sqlite_db *db; -+ long ms; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zdb, &ms)) { -+ return; -+ } -+ -+ DB_FROM_ZVAL(db, &zdb); -+ -+ sqlite_busy_timeout(db->db, ms); -+} -+/* }}} */ -+ -+/* {{{ proto void sqlite_close(resource db) -+ Closes an open sqlite database */ -+PHP_FUNCTION(sqlite_close) -+{ -+ zval *zdb; -+ struct php_sqlite_db *db; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zdb)) { -+ return; -+ } -+ DB_FROM_ZVAL(db, &zdb); -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zdb)) { -+ return; -+ } -+ -+ DB_FROM_ZVAL(db, &zdb); -+ -+ zend_list_delete(Z_RESVAL_P(zdb)); -+} -+/* }}} */ -+ -+/* {{{ php_sqlite_fetch */ -+int php_sqlite_fetch(struct php_sqlite_result *rres TSRMLS_DC) -+{ -+ const char **rowdata, **colnames; -+ int ret, i, base; -+ char *errtext = NULL, *colname; -+ -+next_row: -+ ret = sqlite_step(rres->vm, &rres->ncolumns, &rowdata, &colnames); -+ if (!rres->nrows) { -+ /* first row - lets copy the column names */ -+ rres->col_names = safe_emalloc(rres->ncolumns, sizeof(char *), 0); -+ for (i = 0; i < rres->ncolumns; i++) { -+ colname = strchr(colnames[i], '.'); -+ if (!colname++) { -+ colname = (char*)colnames[i]; -+ } -+ if (SQLITE_G(assoc_case) == 1) { -+ php_sqlite_strtoupper(colname); -+ } else if (SQLITE_G(assoc_case) == 2) { -+ php_sqlite_strtolower(colname); -+ } -+ rres->col_names[i] = estrdup(colname); -+ } -+ if (!rres->buffered) { -+ /* non buffered mode - also fetch memory for on single row */ -+ rres->table = safe_emalloc(rres->ncolumns, sizeof(char *), 0); -+ } -+ } -+ -+ switch (ret) { -+ case SQLITE_ROW: -+ if (rres->buffered) { -+ /* add the row to our collection */ -+ if (rres->nrows + 1 >= rres->alloc_rows) { -+ rres->alloc_rows = rres->alloc_rows ? rres->alloc_rows * 2 : 16; -+ rres->table = erealloc(rres->table, rres->alloc_rows * rres->ncolumns * sizeof(char *)); -+ } -+ base = rres->nrows * rres->ncolumns; -+ for (i = 0; i < rres->ncolumns; i++) { -+ if (rowdata[i]) { -+ rres->table[base + i] = estrdup(rowdata[i]); -+ } else { -+ rres->table[base + i] = NULL; -+ } -+ } -+ rres->nrows++; -+ goto next_row; -+ } else { -+ /* non buffered: only fetch one row but first free data if not first row */ -+ if (rres->nrows++) { -+ for (i = 0; i < rres->ncolumns; i++) { -+ if (rres->table[i]) { -+ efree(rres->table[i]); -+ } -+ } -+ } -+ for (i = 0; i < rres->ncolumns; i++) { -+ if (rowdata[i]) { -+ rres->table[i] = estrdup(rowdata[i]); -+ } else { -+ rres->table[i] = NULL; -+ } -+ } -+ } -+ ret = SQLITE_OK; -+ break; -+ -+ case SQLITE_BUSY: -+ case SQLITE_ERROR: -+ case SQLITE_MISUSE: -+ case SQLITE_DONE: -+ default: -+ if (rres->vm) { -+ ret = sqlite_finalize(rres->vm, &errtext); -+ } -+ rres->vm = NULL; -+ if (ret != SQLITE_OK) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errtext); -+ sqlite_freemem(errtext); -+ } -+ break; -+ } -+ rres->db->last_err_code = ret; -+ -+ return ret; -+} -+/* }}} */ -+ -+/* {{{ sqlite_query */ -+void sqlite_query(struct php_sqlite_db *db, char *sql, long sql_len, int mode, int buffered, zval *return_value, struct php_sqlite_result *rres TSRMLS_DC) -+{ -+ struct php_sqlite_result res; -+ int ret; -+ char *errtext = NULL; -+ const char *tail; -+ -+ memset(&res, 0, sizeof(res)); -+ res.buffered = buffered; -+ res.mode = mode; -+ -+ ret = sqlite_compile(db->db, sql, &tail, &res.vm, &errtext); -+ db->last_err_code = ret; -+ -+ if (ret != SQLITE_OK) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errtext); -+ sqlite_freemem(errtext); -+ -+ RETURN_FALSE; -+ } -+ -+ if (!rres) { -+ rres = (struct php_sqlite_result*)emalloc(sizeof(*rres)); -+ } -+ memcpy(rres, &res, sizeof(*rres)); -+ rres->db = db; -+ zend_list_addref(db->rsrc_id); -+ -+ -+ /* now the result set is ready for stepping: get first row */ -+ if (php_sqlite_fetch(rres TSRMLS_CC) != SQLITE_OK) { -+ real_result_dtor(rres TSRMLS_CC); -+ RETURN_FALSE; -+ } -+ -+ rres->curr_row = 0; -+ -+ if (return_value) { -+ ZEND_REGISTER_RESOURCE(return_value, rres, le_sqlite_result); -+ } -+} -+/* }}} */ -+ -+/* {{{ proto resource sqlite_unbuffered_query(string query, resource db [ , int result_type ]) -+ Execute a query that does not prefetch and buffer all data */ -+PHP_FUNCTION(sqlite_unbuffered_query) -+{ -+ zval *zdb; -+ struct php_sqlite_db *db; -+ char *sql; -+ long sql_len; -+ int mode = PHPSQLITE_BOTH; -+ char *errtext = NULL; -+ -+ if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, -+ ZEND_NUM_ARGS() TSRMLS_CC, "sr|l", &sql, &sql_len, &zdb, &mode) && -+ FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &zdb, &sql, &sql_len, &mode)) { -+ return; -+ } -+ -+ DB_FROM_ZVAL(db, &zdb); -+ -+ /* avoid doing work if we can */ -+ if (!return_value_used) { -+ db->last_err_code = sqlite_exec(db->db, sql, NULL, NULL, &errtext); -+ -+ if (db->last_err_code != SQLITE_OK) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errtext); -+ sqlite_freemem(errtext); -+ } -+ return; -+ } -+ -+ sqlite_query(db, sql, sql_len, mode, 0, return_value, NULL TSRMLS_CC); -+} -+/* }}} */ -+ -+/* {{{ proto resource sqlite_query(string query, resource db [ , int result_type ]) -+ Executes a query against a given database and returns a result handle */ -+PHP_FUNCTION(sqlite_query) -+{ -+ zval *zdb; -+ struct php_sqlite_db *db; -+ char *sql; -+ long sql_len; -+ int mode = PHPSQLITE_BOTH; -+ char *errtext = NULL; -+ -+ if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, -+ ZEND_NUM_ARGS() TSRMLS_CC, "sr|l", &sql, &sql_len, &zdb, &mode) && -+ FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &zdb, &sql, &sql_len, &mode)) { -+ return; -+ } -+ DB_FROM_ZVAL(db, &zdb); -+ -+ /* avoid doing work if we can */ -+ if (!return_value_used) { -+ db->last_err_code = sqlite_exec(db->db, sql, NULL, NULL, &errtext); -+ -+ if (db->last_err_code != SQLITE_OK) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errtext); -+ sqlite_freemem(errtext); -+ } -+ return; -+ } -+ -+ sqlite_query(db, sql, sql_len, mode, 1, return_value, NULL TSRMLS_CC); -+} -+/* }}} */ -+ -+/* {{{ php_sqlite_fetch_array */ -+static void php_sqlite_fetch_array(struct php_sqlite_result *res, int mode, zend_bool decode_binary, int move_next, zval *return_value TSRMLS_DC) -+{ -+ int j, buffered = res->buffered; -+ const char **rowdata, **colnames; -+ -+ /* check range of the row */ -+ if (res->curr_row >= res->nrows) { -+ /* no more */ -+ RETURN_FALSE; -+ } -+ colnames = (const char**)res->col_names; -+ if (res->buffered) { -+ rowdata = (const char**)&res->table[res->curr_row * res->ncolumns]; -+ } else { -+ rowdata = (const char**)res->table; -+ } -+ -+ /* now populate the result */ -+ array_init(return_value); -+ -+ for (j = 0; j < res->ncolumns; j++) { -+ zval *decoded; -+ MAKE_STD_ZVAL(decoded); -+ -+ if (rowdata[j] == NULL) { -+ ZVAL_NULL(decoded); -+ } else if (decode_binary && rowdata[j][0] == '\x01') { -+ Z_STRVAL_P(decoded) = emalloc(strlen(rowdata[j])); -+ Z_STRLEN_P(decoded) = sqlite_decode_binary(rowdata[j]+1, Z_STRVAL_P(decoded)); -+ Z_STRVAL_P(decoded)[Z_STRLEN_P(decoded)] = '\0'; -+ Z_TYPE_P(decoded) = IS_STRING; -+ if (!buffered) { -+ efree((char*)rowdata[j]); -+ rowdata[j] = NULL; -+ } -+ } else { -+ ZVAL_STRING(decoded, (char*)rowdata[j], buffered); -+ if (!buffered) { -+ rowdata[j] = NULL; -+ } -+ } -+ -+ if (mode & PHPSQLITE_NUM) { -+ if (mode & PHPSQLITE_ASSOC) { -+ add_index_zval(return_value, j, decoded); -+ ZVAL_ADDREF(decoded); -+ add_assoc_zval(return_value, (char*)colnames[j], decoded); -+ } else { -+ add_next_index_zval(return_value, decoded); -+ } -+ } else { -+ add_assoc_zval(return_value, (char*)colnames[j], decoded); -+ } -+ } -+ -+ if (move_next) { -+ if (!res->buffered) { -+ /* non buffered: fetch next row */ -+ php_sqlite_fetch(res TSRMLS_CC); -+ } -+ /* advance the row pointer */ -+ res->curr_row++; -+ } -+} -+/* }}} */ -+ -+/* {{{ php_sqlite_fetch_column */ -+static void php_sqlite_fetch_column(struct php_sqlite_result *res, zval *which, zend_bool decode_binary, zval *return_value TSRMLS_DC) -+{ -+ int j; -+ const char **rowdata, **colnames; -+ -+ /* check range of the row */ -+ if (res->curr_row >= res->nrows) { -+ /* no more */ -+ RETURN_FALSE; -+ } -+ colnames = (const char**)res->col_names; -+ -+ if (Z_TYPE_P(which) == IS_LONG) { -+ j = Z_LVAL_P(which); -+ } else { -+ convert_to_string_ex(&which); -+ for (j = 0; j < res->ncolumns; j++) { -+ if (!strcasecmp((char*)colnames[j], Z_STRVAL_P(which))) { -+ break; -+ } -+ } -+ } -+ if (j < 0 || j >= res->ncolumns) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "No such column %d", j); -+ RETURN_FALSE; -+ } -+ -+ if (res->buffered) { -+ rowdata = (const char**)&res->table[res->curr_row * res->ncolumns]; -+ } else { -+ rowdata = (const char**)res->table; -+ } -+ -+ if (rowdata[j] == NULL) { -+ RETURN_NULL(); -+ } else if (decode_binary && rowdata[j][0] == '\x01') { -+ int l = strlen(rowdata[j]); -+ char *decoded = emalloc(l); -+ l = sqlite_decode_binary(rowdata[j]+1, decoded); -+ decoded[l] = '\0'; -+ RETVAL_STRINGL(decoded, l, 0); -+ if (!res->buffered) { -+ efree((char*)rowdata[j]); -+ rowdata[j] = NULL; -+ } -+ } else { -+ RETVAL_STRING((char*)rowdata[j], res->buffered); -+ if (!res->buffered) { -+ rowdata[j] = NULL; -+ } -+ } -+} -+/* }}} */ -+ -+/* {{{ proto array sqlite_fetch_all(resource result [, int result_type, bool decode_binary]) -+ Fetches all rows from a result set as an array */ -+PHP_FUNCTION(sqlite_fetch_all) -+{ -+ zval *zres, *ent; -+ int mode = PHPSQLITE_BOTH; -+ zend_bool decode_binary = 1; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|lb", &zres, &mode, &decode_binary)) { -+ return; -+ } -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ if (ZEND_NUM_ARGS() < 2) { -+ mode = res->mode; -+ } -+ -+ if (res->curr_row >= res->nrows && res->nrows) { -+ if (!res->buffered) { -+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "One or more rowsets were already returned"); -+ } else { -+ res->curr_row = 0; -+ } -+ } -+ -+ array_init(return_value); -+ -+ while (res->curr_row < res->nrows) { -+ MAKE_STD_ZVAL(ent); -+ php_sqlite_fetch_array(res, mode, decode_binary, 1, ent TSRMLS_CC); -+ add_next_index_zval(return_value, ent); -+ } -+} -+/* }}} */ -+ -+/* {{{ proto array sqlite_fetch_array(resource result [, int result_type, bool decode_binary]) -+ Fetches the next row from a result set as an array */ -+PHP_FUNCTION(sqlite_fetch_array) -+{ -+ zval *zres; -+ int mode = PHPSQLITE_BOTH; -+ zend_bool decode_binary = 1; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|lb", &zres, &mode, &decode_binary)) { -+ return; -+ } -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ if (ZEND_NUM_ARGS() < 2) { -+ mode = res->mode; -+ } -+ -+ php_sqlite_fetch_array(res, mode, decode_binary, 1, return_value TSRMLS_CC); -+} -+/* }}} */ -+ -+/* {{{ proto array sqlite_array_query(resource db, string query [ , int result_type, bool decode_binary ]) -+ Executes a query against a given database and returns an array */ -+PHP_FUNCTION(sqlite_array_query) -+{ -+ zval *zdb, *ent; -+ struct php_sqlite_db *db; -+ struct php_sqlite_result *rres; -+ char *sql; -+ long sql_len; -+ int mode = PHPSQLITE_BOTH; -+ char *errtext = NULL; -+ zend_bool decode_binary = 1; -+ -+ if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, -+ ZEND_NUM_ARGS() TSRMLS_CC, "sr|l", &sql, &sql_len, &zdb, &mode, &decode_binary) && -+ FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &zdb, &sql, &sql_len, &mode, &decode_binary)) { -+ return; -+ } -+ DB_FROM_ZVAL(db, &zdb); -+ -+ /* avoid doing work if we can */ -+ if (!return_value_used) { -+ db->last_err_code = sqlite_exec(db->db, sql, NULL, NULL, &errtext); -+ -+ if (db->last_err_code != SQLITE_OK) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errtext); -+ sqlite_freemem(errtext); -+ } -+ return; -+ } -+ -+ rres = (struct php_sqlite_result *)emalloc(sizeof(*rres)); -+ sqlite_query(db, sql, sql_len, mode, 0, NULL, rres TSRMLS_CC); -+ -+ array_init(return_value); -+ -+ while (rres->curr_row < rres->nrows) { -+ MAKE_STD_ZVAL(ent); -+ php_sqlite_fetch_array(rres, mode, decode_binary, 1, ent TSRMLS_CC); -+ add_next_index_zval(return_value, ent); -+ } -+ real_result_dtor(rres TSRMLS_CC); -+} -+/* }}} */ -+ -+/* {{{ proto string sqlite_fetch_array(resource result [, bool decode_binary]) -+ Fetches first column of a result set as a string */ -+PHP_FUNCTION(sqlite_fetch_string) -+{ -+ zval *zres; -+ zend_bool decode_binary = 1; -+ struct php_sqlite_result *res; -+ char *decoded = NULL; -+ int decoded_len; -+ const char **rowdata; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|b", &zres, &decode_binary)) { -+ return; -+ } -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ /* check if there are any more rows on the cursor */ -+ if (res->curr_row >= res->nrows) { -+ RETURN_FALSE; -+ } -+ -+ if (res->buffered) { -+ rowdata = (const char**)&res->table[res->curr_row * res->ncolumns]; -+ } else { -+ rowdata = (const char**)res->table; -+ } -+ -+ if (decode_binary && rowdata[0] != NULL && rowdata[0][0] == '\x01') { -+ decoded = emalloc(strlen(rowdata[0])); -+ decoded_len = sqlite_decode_binary(rowdata[0]+1, decoded); -+ if (!res->buffered) { -+ efree((char*)rowdata[0]); -+ rowdata[0] = NULL; -+ } -+ } else { -+ if (rowdata[0]) { -+ decoded_len = strlen((char*)rowdata[0]); -+ if (res->buffered) { -+ decoded = estrndup((char*)rowdata[0], decoded_len); -+ } else { -+ decoded = (char*)rowdata[0]; -+ rowdata[0] = NULL; -+ } -+ } else { -+ decoded_len = 0; -+ decoded = NULL; -+ } -+ } -+ -+ if (!res->buffered) { -+ /* non buffered: fetch next row */ -+ php_sqlite_fetch(res TSRMLS_CC); -+ } -+ /* advance the row pointer */ -+ res->curr_row++; -+ -+ if (decoded == NULL) { -+ RETURN_NULL(); -+ } else { -+ RETURN_STRINGL(decoded, decoded_len, 0); -+ } -+} -+/* }}} */ -+ -+/* {{{ proto array sqlite_fetch_array(resource result [, int result_type, bool decode_binary]) -+ Fetches the current row from a result set as an array */ -+PHP_FUNCTION(sqlite_current) -+{ -+ zval *zres; -+ int mode = PHPSQLITE_BOTH; -+ zend_bool decode_binary = 1; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|lb", &zres, &mode, &decode_binary)) { -+ return; -+ } -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ if (ZEND_NUM_ARGS() < 2) { -+ mode = res->mode; -+ } -+ -+ php_sqlite_fetch_array(res, mode, decode_binary, 0, return_value TSRMLS_CC); -+} -+/* }}} */ -+ -+/* {{{ proto mixed sqlite_column(resource result, mixed index_or_name [, bool decode_binary]) -+ Fetches a column from the current row of a result set */ -+PHP_FUNCTION(sqlite_column) -+{ -+ zval *zres; -+ zval *which; -+ zend_bool decode_binary = 1; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz|b", &zres, &which, &decode_binary)) { -+ return; -+ } -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ php_sqlite_fetch_column(res, which, decode_binary, return_value TSRMLS_CC); -+} -+/* }}} */ -+ -+/* {{{ proto string sqlite_libversion() -+ Returns the version of the linked SQLite library */ -+PHP_FUNCTION(sqlite_libversion) -+{ -+ if (ZEND_NUM_ARGS() != 0) { -+ WRONG_PARAM_COUNT; -+ } -+ RETURN_STRING((char*)sqlite_libversion(), 1); -+} -+/* }}} */ -+ -+/* {{{ proto string sqlite_libencoding() -+ Returns the encoding (iso8859 or UTF-8) of the linked SQLite library */ -+PHP_FUNCTION(sqlite_libencoding) -+{ -+ if (ZEND_NUM_ARGS() != 0) { -+ WRONG_PARAM_COUNT; -+ } -+ RETURN_STRING((char*)sqlite_libencoding(), 1); -+} -+/* }}} */ -+ -+/* {{{ proto int sqlite_changes(resource db) -+ Returns the number of rows that were changed by the most recent SQL statement */ -+PHP_FUNCTION(sqlite_changes) -+{ -+ zval *zdb; -+ struct php_sqlite_db *db; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zdb)) { -+ return; -+ } -+ -+ DB_FROM_ZVAL(db, &zdb); -+ -+ RETURN_LONG(sqlite_changes(db->db)); -+} -+/* }}} */ -+ -+/* {{{ proto int sqlite_last_insert_rowid(resource db) -+ Returns the rowid of the most recently inserted row */ -+PHP_FUNCTION(sqlite_last_insert_rowid) -+{ -+ zval *zdb; -+ struct php_sqlite_db *db; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zdb)) { -+ return; -+ } -+ -+ DB_FROM_ZVAL(db, &zdb); -+ -+ RETURN_LONG(sqlite_last_insert_rowid(db->db)); -+} -+/* }}} */ -+ -+/* {{{ proto int sqlite_num_rows(resource result) -+ Returns the number of rows in a result set */ -+PHP_FUNCTION(sqlite_num_rows) -+{ -+ zval *zres; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zres)) { -+ return; -+ } -+ -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ if (res->buffered) { -+ RETURN_LONG(res->nrows); -+ } else { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Row count is not available for unbuffered queries"); -+ RETURN_FALSE; -+ } -+} -+/* }}} */ -+ -+/* {{{ proto bool sqlite_has_more(resource result) -+ Returns whether or not more rows are available */ -+PHP_FUNCTION(sqlite_has_more) -+{ -+ zval *zres; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zres)) { -+ return; -+ } -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ RETURN_BOOL(res->nrows && res->curr_row < res->nrows); /* curr_row may be -1 */ -+} -+/* }}} */ -+ -+/* {{{ proto int sqlite_num_fields(resource result) -+ Returns the number of fields in a result set */ -+PHP_FUNCTION(sqlite_num_fields) -+{ -+ zval *zres; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zres)) { -+ return; -+ } -+ -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ RETURN_LONG(res->ncolumns); -+} -+/* }}} */ -+ -+/* {{{ proto string sqlite_field_name(resource result, int field) -+ Returns the name of a particular field */ -+PHP_FUNCTION(sqlite_field_name) -+{ -+ zval *zres; -+ struct php_sqlite_result *res; -+ int field; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zres, &field)) { -+ return; -+ } -+ -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ if (field < 0 || field >= res->ncolumns) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "field %d out of range", field); -+ RETURN_FALSE; -+ } -+ -+ RETURN_STRING(res->col_names[field], 1); -+} -+/* }}} */ -+ -+/* {{{ proto bool sqlite_seek(resource result, int row) -+ Seek to a particular row number */ -+PHP_FUNCTION(sqlite_seek) -+{ -+ zval *zres; -+ struct php_sqlite_result *res; -+ int row; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zres, &row)) { -+ return; -+ } -+ -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ if (!res->buffered) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot seek an unbuffered result set"); -+ RETURN_FALSE; -+ } -+ -+ if (row < 1 || row >= res->nrows) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "row %d out of range", row); -+ RETURN_FALSE; -+ } -+ -+ res->curr_row = row; -+ RETURN_TRUE; -+} -+/* }}} */ -+ -+/* {{{ proto bool sqlite_rewind(resource result) -+ Seek to first row number */ -+PHP_FUNCTION(sqlite_rewind) -+{ -+ zval *zres; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zres)) { -+ return; -+ } -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ if (!res->buffered) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot seek an unbuffered result set"); -+ RETURN_FALSE; -+ } -+ -+ if (!res->nrows) { -+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "no rows received"); -+ RETURN_FALSE; -+ } -+ -+ res->curr_row = 0; -+ RETURN_TRUE; -+} -+/* }}} */ -+ -+/* {{{ proto bool sqlite_next(resource result) -+ Seek to next row number */ -+PHP_FUNCTION(sqlite_next) -+{ -+ zval *zres; -+ struct php_sqlite_result *res; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zres)) { -+ return; -+ } -+ ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); -+ -+ if (!res->buffered && res->vm) { -+ php_sqlite_fetch(res TSRMLS_CC); -+ } -+ -+ if (res->curr_row >= res->nrows) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "no more rows available"); -+ RETURN_FALSE; -+ } -+ -+ res->curr_row++; -+ -+ RETURN_TRUE; -+} -+/* }}} */ -+ -+/* {{{ proto string sqlite_escape_string(string item) -+ Escapes a string for use as a query parameter */ -+PHP_FUNCTION(sqlite_escape_string) -+{ -+ char *string = NULL; -+ long stringlen; -+ char *ret; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &string, &stringlen)) { -+ return; -+ } -+ -+ if (stringlen && (string[0] == '\x01' || memchr(string, '\0', stringlen) != NULL)) { -+ /* binary string */ -+ int enclen; -+ -+ ret = emalloc( 1 + ((256 * stringlen + 1262) / 253) ); -+ ret[0] = '\x01'; -+ enclen = sqlite_encode_binary((const unsigned char*)string, stringlen, ret+1); -+ RETVAL_STRINGL(ret, enclen+1, 0); -+ -+ } else { -+ ret = sqlite_mprintf("%q", string); -+ if (ret) { -+ RETVAL_STRING(ret, 1); -+ sqlite_freemem(ret); -+ } -+ } -+} -+/* }}} */ -+ -+/* {{{ proto int sqlite_last_error(resource db) -+ Returns the error code of the last error for a database */ -+PHP_FUNCTION(sqlite_last_error) -+{ -+ zval *zdb; -+ struct php_sqlite_db *db; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zdb)) { -+ return; -+ } -+ -+ DB_FROM_ZVAL(db, &zdb); -+ -+ RETURN_LONG(db->last_err_code); -+} -+/* }}} */ -+ -+/* {{{ proto string sqlite_error_string(int error_code) -+ Returns the textual description of an error code */ -+PHP_FUNCTION(sqlite_error_string) -+{ -+ long code; -+ const char *msg; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &code)) { -+ return; -+ } -+ -+ msg = sqlite_error_string(code); -+ -+ if (msg) { -+ RETURN_STRING((char*)msg, 1); -+ } else { -+ RETURN_NULL(); -+ } -+} -+/* }}} */ -+ -+/* manages duplicate registrations of a particular function, and -+ * also handles the case where the db is using a persistent connection */ -+enum callback_prep_t { DO_REG, SKIP_REG, ERR }; -+ -+static enum callback_prep_t prep_callback_struct(struct php_sqlite_db *db, int is_agg, -+ char *funcname, -+ zval *step, zval *fini, struct php_sqlite_agg_functions **funcs) -+{ -+ struct php_sqlite_agg_functions *alloc_funcs, func_tmp; -+ char *hashkey; -+ int hashkeylen; -+ enum callback_prep_t ret; -+ -+ hashkeylen = spprintf(&hashkey, 0, "%s-%s", is_agg ? "agg" : "reg", funcname); -+ -+ /* is it already registered ? */ -+ if (SUCCESS == zend_hash_find(&db->callbacks, hashkey, hashkeylen+1, (void*)&alloc_funcs)) { -+ /* override the previous definition */ -+ -+ if (alloc_funcs->is_valid) { -+ /* release these */ -+ -+ if (alloc_funcs->step) { -+ zval_ptr_dtor(&alloc_funcs->step); -+ alloc_funcs->step = NULL; -+ } -+ -+ if (alloc_funcs->fini) { -+ zval_ptr_dtor(&alloc_funcs->fini); -+ alloc_funcs->fini = NULL; -+ } -+ } -+ -+ ret = SKIP_REG; -+ } else { -+ /* add a new one */ -+ func_tmp.db = db; -+ -+ ret = SUCCESS == zend_hash_update(&db->callbacks, hashkey, hashkeylen+1, -+ (void*)&func_tmp, sizeof(func_tmp), (void**)&alloc_funcs) ? DO_REG : ERR; -+ } -+ -+ efree(hashkey); -+ -+ MAKE_STD_ZVAL(alloc_funcs->step); -+ *(alloc_funcs->step) = *step; -+ zval_copy_ctor(alloc_funcs->step); -+ -+ if (is_agg) { -+ MAKE_STD_ZVAL(alloc_funcs->fini); -+ *(alloc_funcs->fini) = *fini; -+ zval_copy_ctor(alloc_funcs->fini); -+ } else { -+ alloc_funcs->fini = NULL; -+ } -+ alloc_funcs->is_valid = 1; -+ *funcs = alloc_funcs; -+ -+ return ret; -+} -+ -+ -+/* {{{ proto bool sqlite_create_aggregate(resource db, string funcname, mixed step_func, mixed finalize_func[, long num_args]) -+ Registers an aggregated function for queries*/ -+PHP_FUNCTION(sqlite_create_aggregate) -+{ -+ char *funcname = NULL; -+ long funcname_len; -+ zval *zstep, *zfinal, *zdb; -+ struct php_sqlite_db *db; -+ struct php_sqlite_agg_functions *funcs; -+ char *callable = NULL; -+ long num_args = -1; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rszz|l", &zdb, &funcname, &funcname_len, &zstep, &zfinal, &num_args)) { -+ return; -+ } -+ DB_FROM_ZVAL(db, &zdb); -+ -+ if (!zend_is_callable(zstep, 0, &callable)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "step function `%s' is not callable", callable); -+ efree(callable); -+ return; -+ } -+ efree(callable); -+ -+ if (!zend_is_callable(zfinal, 0, &callable)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "finalize function `%s' is not callable", callable); -+ efree(callable); -+ return; -+ } -+ efree(callable); -+ -+ if (prep_callback_struct(db, 1, funcname, zstep, zfinal, &funcs) == DO_REG) { -+ sqlite_create_aggregate(db->db, funcname, num_args, -+ php_sqlite_agg_step_function_callback, -+ php_sqlite_agg_fini_function_callback, funcs); -+ } -+ -+ -+} -+/* }}} */ -+ -+/* {{{ proto bool sqlite_create_function(resource db, string funcname, mixed callback[, long num_args]) -+ Registers a "regular" function for queries */ -+PHP_FUNCTION(sqlite_create_function) -+{ -+ char *funcname = NULL; -+ long funcname_len; -+ zval *zcall, *zdb; -+ struct php_sqlite_db *db; -+ struct php_sqlite_agg_functions *funcs; -+ char *callable = NULL; -+ long num_args = -1; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsz|l", &zdb, &funcname, &funcname_len, &zcall, &num_args)) { -+ return; -+ } -+ DB_FROM_ZVAL(db, &zdb); -+ -+ if (!zend_is_callable(zcall, 0, &callable)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "function `%s' is not callable", callable); -+ efree(callable); -+ return; -+ } -+ efree(callable); -+ -+ if (prep_callback_struct(db, 0, funcname, zcall, NULL, &funcs) == DO_REG) { -+ sqlite_create_function(db->db, funcname, num_args, php_sqlite_function_callback, funcs); -+ } -+} -+/* }}} */ -+ -+/* {{{ proto string sqlite_udf_encode_binary(string data) -+ Apply binary encoding (if required) to a string to return from an UDF */ -+PHP_FUNCTION(sqlite_udf_encode_binary) -+{ -+ char *data = NULL; -+ long datalen; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!", &data, &datalen)) { -+ return; -+ } -+ -+ if (data == NULL) { -+ RETURN_NULL(); -+ } -+ if (datalen && (data[0] == '\x01' || memchr(data, '\0', datalen) != NULL)) { -+ /* binary string */ -+ int enclen; -+ char *ret; -+ -+ ret = emalloc( 1 + ((256 * datalen + 1262) / 253) ); -+ ret[0] = '\x01'; -+ enclen = sqlite_encode_binary((const unsigned char*)data, datalen, ret+1); -+ RETVAL_STRINGL(ret, enclen+1, 0); -+ } else { -+ RETVAL_STRINGL(data, datalen, 1); -+ } -+} -+/* }}} */ -+ -+/* {{{ proto string sqlite_udf_decode_binary(string data) -+ Decode binary encoding on a string parameter passed to an UDF */ -+PHP_FUNCTION(sqlite_udf_decode_binary) -+{ -+ char *data = NULL; -+ long datalen; -+ -+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!", &data, &datalen)) { -+ return; -+ } -+ -+ if (data == NULL) { -+ RETURN_NULL(); -+ } -+ if (datalen && data[0] == '\x01') { -+ /* encoded string */ -+ int enclen; -+ char *ret; -+ -+ ret = emalloc(datalen); -+ enclen = sqlite_decode_binary((const unsigned char*)data+1, ret); -+ ret[enclen] = '\0'; -+ RETVAL_STRINGL(ret, enclen, 0); -+ } else { -+ RETVAL_STRINGL(data, datalen, 1); -+ } -+} -+/* }}} */ -+ -+ -+/* -+ * Local variables: -+ * tab-width: 4 -+ * c-basic-offset: 4 -+ * End: -+ * vim600: sw=4 ts=4 fdm=marker -+ * vim<600: sw=4 ts=4 -+ */ -diff -ruN php-4.3.11-old/ext/sqlite/sqlite.dsp php-4.3.11-new/ext/sqlite/sqlite.dsp ---- php-4.3.11-old/ext/sqlite/sqlite.dsp 1970-01-01 01:00:00.000000000 +0100 -+++ php-4.3.11-new/ext/sqlite/sqlite.dsp 2003-06-16 16:13:58.000000000 +0200 -@@ -0,0 +1,331 @@ -+# Microsoft Developer Studio Project File - Name="sqlite" - Package Owner=<4> -+# Microsoft Developer Studio Generated Build File, Format Version 6.00 -+# ** DO NOT EDIT ** -+ -+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 -+ -+CFG=sqlite - Win32 Debug_TS -+!MESSAGE This is not a valid makefile. To build this project using NMAKE, -+!MESSAGE use the Export Makefile command and run -+!MESSAGE -+!MESSAGE NMAKE /f "sqlite.mak". -+!MESSAGE -+!MESSAGE You can specify a configuration when running NMAKE -+!MESSAGE by defining the macro CFG on the command line. For example: -+!MESSAGE -+!MESSAGE NMAKE /f "sqlite.mak" CFG="sqlite - Win32 Debug_TS" -+!MESSAGE -+!MESSAGE Possible choices for configuration are: -+!MESSAGE -+!MESSAGE "sqlite - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library") -+!MESSAGE "sqlite - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library") -+!MESSAGE -+ -+# Begin Project -+# PROP AllowPerConfigDependencies 0 -+# PROP Scc_ProjName "" -+# PROP Scc_LocalPath "" -+CPP=cl.exe -+MTL=midl.exe -+RSC=rc.exe -+ -+!IF "$(CFG)" == "sqlite - Win32 Release_TS" -+ -+# PROP BASE Use_MFC 0 -+# PROP BASE Use_Debug_Libraries 0 -+# PROP BASE Output_Dir "Release_TS" -+# PROP BASE Intermediate_Dir "Release_TS" -+# PROP BASE Ignore_Export_Lib 0 -+# PROP BASE Target_Dir "" -+# PROP Use_MFC 0 -+# PROP Use_Debug_Libraries 0 -+# PROP Output_Dir "Release_TS" -+# PROP Intermediate_Dir "Release_TS" -+# PROP Ignore_Export_Lib 0 -+# PROP Target_Dir "" -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SQLITE_EXPORTS" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\php4" /I "..\..\..\php4\main" /I "..\..\..\php4\Zend" /I "..\..\..\php4\TSRM" /I "..\..\..\php4\win32" /I "..\..\..\php_build" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_SQLITE" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_SQLITE=1 /D "PHP_SQLITE_EXPORTS" /FR /YX /FD /c -+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -+# ADD BASE RSC /l 0x407 /d "NDEBUG" -+# ADD RSC /l 0x407 /d "NDEBUG" -+BSC32=bscmake.exe -+# ADD BASE BSC32 /nologo -+# ADD BSC32 /nologo -+LINK32=link.exe -+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -+# ADD LINK32 php4ts.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS\php_sqlite.dll" /libpath:"..\..\..\php4\Release_TS" /libpath:"..\..\..\php4\Release_TS_Inline" /libpath:"..\..\..\php_build\release" -+ -+!ELSEIF "$(CFG)" == "sqlite - Win32 Debug_TS" -+ -+# PROP BASE Use_MFC 0 -+# PROP BASE Use_Debug_Libraries 1 -+# PROP BASE Output_Dir "Debug_TS" -+# PROP BASE Intermediate_Dir "Debug_TS" -+# PROP BASE Target_Dir "" -+# PROP Use_MFC 0 -+# PROP Use_Debug_Libraries 1 -+# PROP Output_Dir "Debug_TS" -+# PROP Intermediate_Dir "Debug_TS" -+# PROP Ignore_Export_Lib 0 -+# PROP Target_Dir "" -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SQLITE_EXPORTS" /YX /FD /GZ /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\php4" /I "..\..\..\php4\main" /I "..\..\..\php4\Zend" /I "..\..\..\php4\TSRM" /I "..\..\..\php4\win32" /I "..\..\..\php_build" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_SQLITE" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_SQLITE=1 /D "PHP_SQLITE_EXPORTS" /YX /FD /GZ /c -+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -+# ADD BASE RSC /l 0x407 /d "_DEBUG" -+# ADD RSC /l 0x407 /d "_DEBUG" -+BSC32=bscmake.exe -+# ADD BASE BSC32 /nologo -+# ADD BSC32 /nologo -+LINK32=link.exe -+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -+# ADD LINK32 php4ts_debug.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS\php_sqlite.dll" /pdbtype:sept /libpath:"..\..\..\php4\Debug_TS" /libpath:"..\..\..\php_build\release" -+ -+!ENDIF -+ -+# Begin Target -+ -+# Name "sqlite - Win32 Release_TS" -+# Name "sqlite - Win32 Debug_TS" -+# Begin Group "Source Files" -+ -+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -+# Begin Group "libsqlite" -+ -+# PROP Default_Filter "" -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\attach.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\auth.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\btree.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\btree.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\btree_rb.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\build.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\config.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\copy.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\delete.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\encode.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\expr.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\func.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\hash.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\hash.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\insert.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\main.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\opcodes.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\opcodes.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\os.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\os.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\pager.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\pager.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\parse.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\parse.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\pragma.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\printf.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\random.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\select.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\sqlite.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\sqlite.w32.h -+ -+!IF "$(CFG)" == "sqlite - Win32 Release_TS" -+ -+# Begin Custom Build -+InputDir=.\libsqlite\src -+InputPath=.\libsqlite\src\sqlite.w32.h -+ -+"$(InputDir)\sqlite.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" -+ copy $(InputPath) $(InputDir)\sqlite.h -+ -+# End Custom Build -+ -+!ELSEIF "$(CFG)" == "sqlite - Win32 Debug_TS" -+ -+# Begin Custom Build -+InputDir=.\libsqlite\src -+InputPath=.\libsqlite\src\sqlite.w32.h -+ -+"$(InputDir)\sqlite.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" -+ copy $(InputPath) $(InputDir)\sqlite.h -+ -+# End Custom Build -+ -+!ENDIF -+ -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\sqlite_config.w32.h -+ -+!IF "$(CFG)" == "sqlite - Win32 Release_TS" -+ -+# Begin Custom Build -+InputDir=.\libsqlite\src -+InputPath=.\libsqlite\src\sqlite_config.w32.h -+ -+"$(InputDir)\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" -+ copy $(InputPath) $(InputDir)\config.h -+ -+# End Custom Build -+ -+!ELSEIF "$(CFG)" == "sqlite - Win32 Debug_TS" -+ -+# Begin Custom Build -+InputDir=.\libsqlite\src -+InputPath=.\libsqlite\src\sqlite_config.w32.h -+ -+"$(InputDir)\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" -+ copy $(InputPath) $(InputDir)\config.h -+ -+# End Custom Build -+ -+!ENDIF -+ -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\sqliteInt.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\table.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\tokenize.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\trigger.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\update.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\util.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\vacuum.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\vdbe.c -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\vdbe.h -+# End Source File -+# Begin Source File -+ -+SOURCE=.\libsqlite\src\where.c -+# End Source File -+# End Group -+# Begin Source File -+ -+SOURCE=.\php_sqlite.def -+# End Source File -+# Begin Source File -+ -+SOURCE=.\sqlite.c -+# ADD CPP /I "libsqlite\src" -+# End Source File -+# End Group -+# Begin Group "Header Files" -+ -+# PROP Default_Filter "h;hpp;hxx;hm;inl" -+# Begin Source File -+ -+SOURCE=.\php_sqlite.h -+# End Source File -+# End Group -+# End Target -+# End Project -diff -ruN php-4.3.11-old/ext/sqlite/sqlite.php php-4.3.11-new/ext/sqlite/sqlite.php ---- php-4.3.11-old/ext/sqlite/sqlite.php 1970-01-01 01:00:00.000000000 +0100 -+++ php-4.3.11-new/ext/sqlite/sqlite.php 2003-04-17 22:01:35.000000000 +0200 -@@ -0,0 +1,33 @@ -+ -diff -ruN php-4.3.11-old/generated_lists php-4.3.11-new/generated_lists ---- php-4.3.11-old/generated_lists 2005-03-30 16:35:19.000000000 +0200 -+++ php-4.3.11-new/generated_lists 2005-07-04 17:29:27.000000000 +0200 -@@ -1,3 +1,3 @@ - makefile_am_files = Zend/Makefile.am TSRM/Makefile.am - config_h_files = Zend/acconfig.h TSRM/acconfig.h --config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 Zend/acinclude.m4 ext/bcmath/config.m4 ext/bz2/config.m4 ext/calendar/config.m4 ext/cpdf/config.m4 ext/crack/config.m4 ext/ctype/config.m4 ext/curl/config.m4 ext/cyrus/config.m4 ext/db/config.m4 ext/dba/config.m4 ext/dbase/config.m4 ext/dbx/config.m4 ext/dio/config.m4 ext/domxml/config.m4 ext/exif/config.m4 ext/fbsql/config.m4 ext/fdf/config.m4 ext/filepro/config.m4 ext/fribidi/config.m4 ext/ftp/config.m4 ext/gd/config.m4 ext/gettext/config.m4 ext/gmp/config.m4 ext/hwapi/config.m4 ext/hyperwave/config.m4 ext/iconv/config.m4 ext/imap/config.m4 ext/informix/config.m4 ext/ingres_ii/config.m4 ext/interbase/config.m4 ext/ircg/config.m4 ext/java/config.m4 ext/ldap/config.m4 ext/mbstring/config.m4 ext/mcal/config.m4 ext/mcrypt/config.m4 ext/mcve/config.m4 ext/mhash/config.m4 ext/mime_magic/config.m4 ext/ming/config.m4 ext/mnogosearch/config.m4 ext/msession/config.m4 ext/msql/config.m4 ext/mssql/config.m4 ext/mysql/config.m4 ext/ncurses/config.m4 ext/oci8/config.m4 ext/odbc/config.m4 ext/openssl/config0.m4 ext/oracle/config.m4 ext/overload/config.m4 ext/ovrimos/config.m4 ext/pcntl/config.m4 ext/pcre/config.m4 ext/pdf/config.m4 ext/pfpro/config.m4 ext/pgsql/config.m4 ext/posix/config.m4 ext/pspell/config.m4 ext/qtdom/config.m4 ext/readline/config.m4 ext/recode/config.m4 ext/session/config.m4 ext/shmop/config.m4 ext/snmp/config.m4 ext/sockets/config.m4 ext/standard/config.m4 ext/swf/config.m4 ext/sybase/config.m4 ext/sybase_ct/config.m4 ext/sysvmsg/config.m4 ext/sysvsem/config.m4 ext/sysvshm/config.m4 ext/tokenizer/config.m4 ext/wddx/config.m4 ext/xml/config.m4 ext/xmlrpc/config.m4 ext/xslt/config.m4 ext/yaz/config.m4 ext/yp/config.m4 ext/zip/config.m4 ext/zlib/config0.m4 sapi/aolserver/config.m4 sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 sapi/caudium/config.m4 sapi/cli/config.m4 sapi/embed/config.m4 sapi/isapi/config.m4 sapi/nsapi/config.m4 sapi/phttpd/config.m4 sapi/pi3web/config.m4 sapi/roxen/config.m4 sapi/servlet/config.m4 sapi/thttpd/config.m4 sapi/tux/config.m4 sapi/webjames/config.m4 -+config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 Zend/acinclude.m4 ext/bcmath/config.m4 ext/bz2/config.m4 ext/calendar/config.m4 ext/cpdf/config.m4 ext/crack/config.m4 ext/ctype/config.m4 ext/curl/config.m4 ext/cyrus/config.m4 ext/db/config.m4 ext/dba/config.m4 ext/dbase/config.m4 ext/dbx/config.m4 ext/dio/config.m4 ext/domxml/config.m4 ext/exif/config.m4 ext/fbsql/config.m4 ext/fdf/config.m4 ext/filepro/config.m4 ext/fribidi/config.m4 ext/ftp/config.m4 ext/gd/config.m4 ext/gettext/config.m4 ext/gmp/config.m4 ext/hwapi/config.m4 ext/hyperwave/config.m4 ext/iconv/config.m4 ext/imap/config.m4 ext/informix/config.m4 ext/ingres_ii/config.m4 ext/interbase/config.m4 ext/ircg/config.m4 ext/java/config.m4 ext/ldap/config.m4 ext/mbstring/config.m4 ext/mcal/config.m4 ext/mcrypt/config.m4 ext/mcve/config.m4 ext/mhash/config.m4 ext/mime_magic/config.m4 ext/ming/config.m4 ext/mnogosearch/config.m4 ext/msession/config.m4 ext/msql/config.m4 ext/mssql/config.m4 ext/mysql/config.m4 ext/ncurses/config.m4 ext/oci8/config.m4 ext/odbc/config.m4 ext/openssl/config0.m4 ext/oracle/config.m4 ext/overload/config.m4 ext/ovrimos/config.m4 ext/pcntl/config.m4 ext/pcre/config.m4 ext/pdf/config.m4 ext/pfpro/config.m4 ext/pgsql/config.m4 ext/posix/config.m4 ext/pspell/config.m4 ext/qtdom/config.m4 ext/readline/config.m4 ext/recode/config.m4 ext/session/config.m4 ext/shmop/config.m4 ext/snmp/config.m4 ext/sockets/config.m4 ext/sqlite/config.m4 ext/standard/config.m4 ext/swf/config.m4 ext/sybase/config.m4 ext/sybase_ct/config.m4 ext/sysvmsg/config.m4 ext/sysvsem/config.m4 ext/sysvshm/config.m4 ext/tokenizer/config.m4 ext/wddx/config.m4 ext/xml/config.m4 ext/xmlrpc/config.m4 ext/xslt/config.m4 ext/yaz/config.m4 ext/yp/config.m4 ext/zip/config.m4 ext/zlib/config0.m4 sapi/aolserver/config.m4 sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 sapi/caudium/config.m4 sapi/cli/config.m4 sapi/embed/config.m4 sapi/isapi/config.m4 sapi/nsapi/config.m4 sapi/phttpd/config.m4 sapi/pi3web/config.m4 sapi/roxen/config.m4 sapi/servlet/config.m4 sapi/thttpd/config.m4 sapi/tux/config.m4 sapi/webjames/config.m4 -diff -ruN php-4.3.11-old/main/php_config.h.in php-4.3.11-new/main/php_config.h.in ---- php-4.3.11-old/main/php_config.h.in 2005-03-30 16:35:47.000000000 +0200 -+++ php-4.3.11-new/main/php_config.h.in 2005-07-04 17:29:44.000000000 +0200 -@@ -1,4 +1,4 @@ --/* main/php_config.h.in. Generated automatically from configure.in by autoheader. */ -+/* main/php_config.h.in. Generated automatically from configure.in by autoheader 2.13. */ - /* Leave this file alone */ - #define ZEND_API - #define ZEND_DLEXPORT -@@ -101,6 +101,9 @@ - /* The number of bytes in a char. */ - #undef SIZEOF_CHAR - -+/* The number of bytes in a char *. */ -+#undef SIZEOF_CHAR_P -+ - /* The number of bytes in a int. */ - #undef SIZEOF_INT - -@@ -353,6 +356,9 @@ - /* Define if you have the mmap function. */ - #undef HAVE_MMAP - -+/* Define if you have the nanosleep function. */ -+#undef HAVE_NANOSLEEP -+ - /* Define if you have the nl_langinfo function. */ - #undef HAVE_NL_LANGINFO - -@@ -803,6 +809,9 @@ - /* Define if you have the header file. */ - #undef HAVE_TERMIOS_H - -+/* Define if you have the header file. */ -+#undef HAVE_TIME_H -+ - /* Define if you have the header file. */ - #undef HAVE_TUXMODULE_H - -@@ -2302,6 +2311,24 @@ - #undef COMPILE_DL_SOCKETS - - /* */ -+#undef HAVE_SQLITELIB -+ -+/* Whether to build sqlite as dynamic module */ -+#undef COMPILE_DL_SQLITE -+ -+/* Whether to build sqlite as dynamic module */ -+#undef COMPILE_DL_SQLITE -+ -+/* Size of a pointer */ -+#undef SQLITE_PTR_SZ -+ -+/* if this is unix */ -+#undef OS_UNIX -+ -+/* if this is windows */ -+#undef OS_WIN -+ -+/* */ - #undef HAVE_CRYPT - - /* Whether the system supports standard DES salt */ diff --git a/openwrt/package/php4/patches/php4_configure.patch b/openwrt/package/php4/patches/php4_configure.patch deleted file mode 100644 index 94bba0a3686..00000000000 --- a/openwrt/package/php4/patches/php4_configure.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- php-4.3.11/configure 2005-03-30 16:35:34.000000000 +0200 -+++ php-4.3.11-patched/configure 2005-06-22 23:34:35.000000000 +0200 -@@ -12192,7 +12192,7 @@ - ac_libs=$LIBS - LIBS="$LIBS -ldl" - if test "$cross_compiling" = yes; then -- found=no -+ found=yes - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - echo "configure:41306: checking if iconv supports errno" >&5 - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext < would work. -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.bg = #FFFFFF -;highlight.default = #0000BB -;highlight.html = #000000 - -expose_php = On - - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -max_execution_time = 30 ; Maximum execution time of each script, in seconds -max_input_time = 60 ; Maximum amount of time each script may spend parsing request data -memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; error_reporting is a bit-field. Or each number up to get desired error -; reporting level -; E_ALL - All errors and warnings (doesn't include E_STRICT) -; E_ERROR - fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it's automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; -; Examples: -; -; - Show all errors, except for notices and coding standards warnings -; -;error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT -; -; - Show all errors, except for notices -; -;error_reporting = E_ALL & ~E_NOTICE -; -; - Show only errors -; -;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR -; -; - Show all errors except for notices and coding standards warnings -; -error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT - -; Print out errors (as a part of the output). For production web sites, -; you're strongly encouraged to turn this feature off, and use error logging -; instead (see below). Keeping display_errors enabled on a production web site -; may reveal security information to end users, such as file paths on your Web -; server, your database schema or other information. -display_errors = On - -; Even when display_errors is on, errors that occur during PHP's startup -; sequence are not displayed. It's strongly recommended to keep -; display_startup_errors off, except for when debugging. -display_startup_errors = Off - -; Log errors into a log file (server-specific log, stderr, or error_log (below)) -; As stated above, you're strongly advised to use error logging in place of -; error displaying on production web sites. -log_errors = Off - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line until ignore_repeated_source is set true. -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; sourcelines. -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This has only effect in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -report_memleaks = On - -; Store the last error/warning message in $php_errormsg (boolean). -track_errors = Off - -; Disable the inclusion of HTML tags in error messages. -; Note: Never use this feature for production boxes. -;html_errors = Off - -; If html_errors is set On PHP produces clickable error messages that direct -; to a page describing the error or function causing the error in detail. -; You can download a copy of the PHP manual from http://www.php.net/docs.php -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. -; Note: Never use this feature for production boxes. -;docref_root = "/phpmanual/" -;docref_ext = .html - -; String to output before an error message. -;error_prepend_string = "" - -; String to output after an error message. -;error_append_string = "" - -; Log errors to specified file. -;error_log = filename - -; Log errors to syslog (Event Log on NT, not valid in Windows 95). -;error_log = syslog - - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; -; -; Note - track_vars is ALWAYS enabled as of PHP 4.0.3 - -; The separator used in PHP generated URLs to separate arguments. -; Default is "&". -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; Default is "&". -; NOTE: Every character in this directive is considered as separator! -;arg_separator.input = ";&" - -; This directive describes the order in which PHP registers GET, POST, Cookie, -; Environment and Built-in variables (G, P, C, E & S respectively, often -; referred to as EGPCS or GPC). Registration is done from left to right, newer -; values override older values. -variables_order = "EGPCS" - -; Whether or not to register the EGPCS variables as global variables. You may -; want to turn this off if you don't want to clutter your scripts' global scope -; with user data. This makes most sense when coupled with track_vars - in which -; case you can access all of the GPC variables through the $HTTP_*_VARS[], -; variables. -; -; You should do your best to write your scripts so that they do not require -; register_globals to be on; Using form variables as globals can easily lead -; to possible security problems, if the code is not very well thought of. -register_globals = Off - -; Whether or not to register the old-style input arrays, HTTP_GET_VARS -; and friends. If you're not using them, it's recommended to turn them off, -; for performance reasons. -register_long_arrays = On - -; This directive tells PHP whether to declare the argv&argc variables (that -; would contain the GET information). If you don't use these variables, you -; should turn it off for increased performance. -register_argc_argv = On - -; Maximum size of POST data that PHP will accept. -post_max_size = 8M - -; Magic quotes -; - -; Magic quotes for incoming GET/POST/Cookie data. -magic_quotes_gpc = On - -; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. -magic_quotes_runtime = Off - -; Use Sybase-style magic quotes (escape ' with '' instead of \'). -magic_quotes_sybase = Off - -; Automatically add files before or after any PHP document. -auto_prepend_file = -auto_append_file = - -; As of 4.0b4, PHP always outputs a character encoding by default in -; the Content-type: header. To disable sending of the charset, simply -; set it to be empty. -; -; PHP's built-in default is text/html -default_mimetype = "text/html" -;default_charset = "iso-8859-1" - -; Always populate the $HTTP_RAW_POST_DATA variable. -;always_populate_raw_post_data = On - - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -doc_root = /www - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -user_dir = - -; Directory in which the loadable extensions (modules) reside. -extension_dir = "/usr/lib/php" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -enable_dl = On - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. -; cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; cgi.redirect_status_env = ; - -; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; fastcgi.impersonate = 1; - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If it's set 0 PHP sends Status: header that -; is supported by Apache. When this option is set to 1 PHP will send -; RFC2616 compliant header. -; Default is zero. -;cgi.rfc2616_headers = 0 - - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -upload_tmp_dir = /tmp - -; Maximum allowed size for uploaded files. -upload_max_filesize = 2M - - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -allow_url_fopen = On - -; Define the anonymous ftp password (your email address) -;from="john@doe.com" - -; Define the User-Agent string -; user_agent="PHP" - -; Default timeout for socket based streams (seconds) -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; auto_detect_line_endings = Off - - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; -; -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename.extension -; -; For example, on Windows: -; -; extension=msql.dll -; -; ... or under UNIX: -; -; extension=msql.so -; -; Note that it should be the name of the module only; no directory information -; needs to go here. Specify the location of the extension with the -; extension_dir directive above. - - -;Windows Extensions -;Note that ODBC support is built in, so no dll is needed for it. -; - -;extension=ftp.so -;extension=gd.so -;extension=mysql.so -;extension=pcre.so -;extension=session.so -;extension=sockets.so -;extension=xml.so - - - - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[SQL] -sql.safe_mode = Off - -[Session] -; Handler used to store/retrieve data. -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; As of PHP 4.0.1, you can define the path as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if you -; or your OS have problems with lots of files in one directory, and is -; a more efficient layout for servers that handle lots of sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -session.save_path = "/tmp" - -; Whether to use cookies. -session.use_cookies = 1 - -; This option enables administrators to make their users invulnerable to -; attacks which involve passing session ids in URLs; defaults to 0. -; session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -session.name = PHPSESSID - -; Initialize session on request startup. -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -session.cookie_lifetime = 0 - -; The path for which the cookie is valid. -session.cookie_path = / - -; The domain for which the cookie is valid. -session.cookie_domain = - -; Handler used to serialize data. php is the standard serializer of PHP. -session.serialize_handler = php - -; Define the probability that the 'garbage collection' process is started -; on every session initialization. -; The probability is calculated by using gc_probability/gc_divisor, -; e.g. 1/100 means there is a 1% chance that the GC process starts -; on each request. - -session.gc_probability = 1 -session.gc_divisor = 100 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -session.gc_maxlifetime = 1440 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script would is the equivalent of -; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; cd /path/to/sessions; find -cmin +24 | xargs rm - -; PHP 4.2 and less have an undocumented feature/bug that allows you to -; to initialize a session variable in the global scope, albeit register_globals -; is disabled. PHP 4.3 and later will warn you, if this feature is used. -; You can disable the feature and the warning separately. At this time, -; the warning is only displayed, if bug_compat_42 is enabled. - -session.bug_compat_42 = 1 -session.bug_compat_warn = 1 - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -session.referer_check = - -; How many bytes to read from the file. -session.entropy_length = 0 - -; Specified here to create the session id. -session.entropy_file = - -;session.entropy_length = 16 - -;session.entropy_file = /dev/urandom - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -session.cache_limiter = nocache - -; Document expires after n minutes. -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publically accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -session.use_trans_sid = 0 - -; Select a hash function -; 0: MD5 (128 bits) -; 1: SHA-1 (160 bits) -session.hash_function = 0 - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; -; 4 bits: 0-9, a-f -; 5 bits: 0-9, a-v -; 6 bits: 0-9, a-z, A-Z, "-", "," -session.hash_bits_per_character = 4 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; form/fieldset are special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. If you want XHTML conformity, remove the form entry. -; Note that all valid entries require a "=", even if no value follows. -url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" - - -[Assertion] -; Assert(expr); active by default. -;assert.active = On - -; Issue a PHP warning for each failed assertion. -;assert.warning = On - -; Don't bail out by default. -;assert.bail = Off - -; User-function to be called if an assertion fails. -;assert.callback = 0 - -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -;assert.quiet_eval = 0 - - - - - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -;exif.encode_unicode = ISO-8859-15 -;exif.decode_unicode_motorola = UCS-2BE -;exif.decode_unicode_intel = UCS-2LE -;exif.encode_jis = -;exif.decode_jis_motorola = JIS -;exif.decode_jis_intel = JIS - diff --git a/openwrt/package/php5/files/php.init b/openwrt/package/php5/files/php.init deleted file mode 100644 index b29387bd745..00000000000 --- a/openwrt/package/php5/files/php.init +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -export PHP_FCGI_CHILDREN='' -PORT=1026 -BIN=/usr/sbin/php - -case $1 in - start) - $BIN -b $PORT & - ;; - stop) - kill `pidof php` - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/php5/ipkg/php5-cgi.conffiles b/openwrt/package/php5/ipkg/php5-cgi.conffiles deleted file mode 100644 index f1b6b5fc945..00000000000 --- a/openwrt/package/php5/ipkg/php5-cgi.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/php.ini diff --git a/openwrt/package/php5/ipkg/php5-cgi.control b/openwrt/package/php5/ipkg/php5-cgi.control deleted file mode 100644 index a28d4da7673..00000000000 --- a/openwrt/package/php5/ipkg/php5-cgi.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: php5-cgi -Priority: optional -Section: net -Provides: php5 -Depends: libopenssl, zlib -Description: PHP5 compiled as for CGI diff --git a/openwrt/package/php5/ipkg/php5-cli.conffiles b/openwrt/package/php5/ipkg/php5-cli.conffiles deleted file mode 100644 index f1b6b5fc945..00000000000 --- a/openwrt/package/php5/ipkg/php5-cli.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/php.ini diff --git a/openwrt/package/php5/ipkg/php5-cli.control b/openwrt/package/php5/ipkg/php5-cli.control deleted file mode 100644 index 1c18c241e30..00000000000 --- a/openwrt/package/php5/ipkg/php5-cli.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: php5-cli -Priority: optional -Section: net -Provides: php5 -Depends: libopenssl, zlib -Description: PHP5 CLI (Command Line Interface) diff --git a/openwrt/package/php5/ipkg/php5-fastcgi.conffiles b/openwrt/package/php5/ipkg/php5-fastcgi.conffiles deleted file mode 100644 index 6d0835326cd..00000000000 --- a/openwrt/package/php5/ipkg/php5-fastcgi.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/php.ini -/etc/init.d/php diff --git a/openwrt/package/php5/ipkg/php5-fastcgi.control b/openwrt/package/php5/ipkg/php5-fastcgi.control deleted file mode 100644 index d2cc4372f24..00000000000 --- a/openwrt/package/php5/ipkg/php5-fastcgi.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: php5-fastcgi -Priority: optional -Section: net -Provides: php5 -Depends: libopenssl, zlib -Description: PHP5 compiled for FastCGI (for use with libhttpd-fastcgi) diff --git a/openwrt/package/php5/ipkg/php5-mod-curl.control b/openwrt/package/php5/ipkg/php5-mod-curl.control deleted file mode 100644 index 421490c8e65..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-curl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-curl -Priority: optional -Section: net -Depends: php5, libcurl -Description: cURL module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-ftp.control b/openwrt/package/php5/ipkg/php5-mod-ftp.control deleted file mode 100644 index a8f4eda4b0d..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-ftp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-ftp -Priority: optional -Section: net -Depends: php5 -Description: FTP module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-gd.control b/openwrt/package/php5/ipkg/php5-mod-gd.control deleted file mode 100644 index 7558408713f..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-gd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-gd -Priority: optional -Section: net -Depends: php5, libgd, libpng -Description: GD module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-gmp.control b/openwrt/package/php5/ipkg/php5-mod-gmp.control deleted file mode 100644 index 9572610b3c4..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-gmp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-gmp -Priority: optional -Section: net -Depends: php5, libgmp -Description: GMP (GNU MP) module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-ldap.control b/openwrt/package/php5/ipkg/php5-mod-ldap.control deleted file mode 100644 index 450e18405e7..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-ldap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-ldap -Priority: optional -Section: net -Depends: php5, libopenldap -Description: LDAP module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-mysql.control b/openwrt/package/php5/ipkg/php5-mod-mysql.control deleted file mode 100644 index faecf9106fc..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-mysql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-mysql -Priority: optional -Section: net -Depends: php5, libmysqlclient -Description: MySQL module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-openssl.control b/openwrt/package/php5/ipkg/php5-mod-openssl.control deleted file mode 100644 index 1c62ad15571..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-openssl.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-openssl -Priority: optional -Section: net -Depends: php5, libopenssl -Description: OpenSSL module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-pcre.control b/openwrt/package/php5/ipkg/php5-mod-pcre.control deleted file mode 100644 index 15afde22f92..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-pcre.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-pcre -Priority: optional -Section: net -Depends: php5, libpcre -Description: PCRE module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-pgsql.control b/openwrt/package/php5/ipkg/php5-mod-pgsql.control deleted file mode 100644 index 7bc3dcae00b..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-pgsql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-pgsql -Priority: optional -Section: net -Depends: php5, libpq -Description: PostgreSQL module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-session.control b/openwrt/package/php5/ipkg/php5-mod-session.control deleted file mode 100644 index 02900186e29..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-session.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-session -Priority: optional -Section: net -Depends: php5 -Description: Sessions module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-sockets.control b/openwrt/package/php5/ipkg/php5-mod-sockets.control deleted file mode 100644 index ad6abd2a901..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-sockets.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-sockets -Priority: optional -Section: net -Depends: php5 -Description: Sockets module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-sqlite.control b/openwrt/package/php5/ipkg/php5-mod-sqlite.control deleted file mode 100644 index 16f7d44846a..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-sqlite.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-sqlite -Priority: optional -Section: net -Depends: php5, libsqlite2 -Description: SQLite module for PHP5 diff --git a/openwrt/package/php5/ipkg/php5-mod-xml.control b/openwrt/package/php5/ipkg/php5-mod-xml.control deleted file mode 100644 index 9395fd80104..00000000000 --- a/openwrt/package/php5/ipkg/php5-mod-xml.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: php5-mod-xml -Priority: optional -Section: net -Depends: php5, libexpat -Description: XML module for PHP5 diff --git a/openwrt/package/php5/patches/php-5.0.4-configure-cross.patch b/openwrt/package/php5/patches/php-5.0.4-configure-cross.patch deleted file mode 100644 index d4c423b3b0f..00000000000 --- a/openwrt/package/php5/patches/php-5.0.4-configure-cross.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- php-5.0.4/configure 2005-06-16 19:23:10.000000000 +0200 -+++ php-5.0.4-patched/configure 2005-07-01 23:52:04.000000000 +0200 -@@ -13851,7 +13851,7 @@ - ac_libs=$LIBS - LIBS="$LIBS -ldl" - if test "$cross_compiling" = yes; then -- found=no -+ found=yes - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext <&6 - echo "configure:41407: checking if iconv supports errno" >&5 - if test "$cross_compiling" = yes; then -- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -+ { echo "configure: error: can not run test program while cross compiling" 1>&2; } - else - cat > conftest.$ac_ext < -#include -#include -#include -//#include -#include "parser.h" - -#define printit - -extern BOOL bFilter; -extern int iline; -extern char * author; -extern char myipname[]; -extern int justheader; -extern int gre,sortbysize,fromip,toip; -int nomac=1; -int mostird=0; -char mypbuff[2048]; -// accounting variables -#define MAXHASH 0xffff -#define MAXTCPPORT 4096 -unsigned long *iph=NULL; //[MAXHASH]; - -typedef struct { - unsigned short from; - unsigned short to; - unsigned long byte; - unsigned short pkt; - unsigned short sport; - unsigned short dport; -} ta; - -ta *acc = NULL; -unsigned long tcppb[MAXTCPPORT]; -unsigned long tcppp[MAXTCPPORT]; -unsigned long typp[255]; -unsigned long typb[255]; -unsigned long udpb,tcpb,udpp,tcpp; -time_t elapsed=0; -int iCycle=10; -int iScreen=1; -int iFile=0; -long lNum=0; -char filename[128]; -char intlist[128]; -int iRun=1; -int iDetail=0; -FILE *f=NULL; -int iProto=0; -int iSum=0; -char execname[255]; -char pbuf[8196]; -char str[255]; -extern char pattern[]; -#ifndef LINUX -int iLnxplus=0; // Windows buffer without the MAC frame ! -#else -int iLnxplus=14; // Linux plus IP header len =14 !!! -#endif -// -// A list of protocol types in the IP protocol header -// -char *szProto[255] = {"IP", // 0 - "ICMP", // 1 - "IGMP", // 2 - "GGP", // 3 - "IP", // 4 - "ST", // 5 - "TCP", // 6 - "UCL", // 7 - "EGP", // 8 - "IGP", // 9 - "BBN-RCC-MON", // 10 - "NVP-II", // 11 - "PUP", // 12 - "ARGUS", // 13 - "EMCON", // 14 - "XNET", // 15 - "CHAOS", // 16 - "UDP", // 17 - "MUX", // 18 - "DCN-MEAS", // 19 - "HMP", // 20 - "PRM", // 21 - "XNS-IDP", // 22 - "TRUNK-1", // 23 - "TRUNK-2", // 24 - "LEAF-1", // 25 - "LEAF-2", // 26 - "RDP", // 27 - "IRTP", // 28 - "ISO-TP4", // 29 - "NETBLT", // 30 - "MFE-NSP", // 31 - "MERIT-INP", // 32 - "SEP", // 33 - "3PC", // 34 - "IDPR", // 35 - "XTP", // 36 - "DDP", // 37 - "IDPR-CMTP", // 38 - "TP++", // 39 - "IL", // 40 - "SIP", // 41 - "SDRP", // 42 - "SIP-SR", // 43 - "SIP-FRAG", // 44 - "IDRP", // 45 - "RSVP", // 46 - "GRE", // 47 - "MHRP", // 48 - "BNA", // 49 - "IPSEC-ESP", // 50 - "IPSEC-AH", // 51 - "I-NLSP", // 52 - "SWIPE", // 53 - "NHRP", // 54 - "?55?", // 55 - "?56?", // 56 - "SKIO", // 57 - "V6ICMP", // 58 - "V6NoNXT", // 59 - "V6OPT", // 60 - "int.host", // 61 - "CFTP", // 62 - "loc.net", // 63 - "SAT-EXPAK", // 64 - "KRYPTOLAN", // 65 - "RVD", // 66 - "IPPC", // 67 - "dist.fs", // 68 - "SAT-MON", // 69 - "VISA", // 70 - "IPCV", // 71 - "CPNX", // 72 - "CPHB", // 73 - "WSN", // 74 - "PVP", // 75 - "BR-SAT-MON", // 76 - "SUN-ND", // 77 - "WB-MON", // 78 - "WB-EXPAK", // 79 - "ISO-IP", // 80 - "VMTP", // 81 - "SECURE-VMTP",// 82 - "VINES", // 83 - "TTP", // 84 - "NSFNET-IGP", // 85 - "DGP", // 86 - "TCF", // 87 - "IGRP", // 88 - "OSPF", // 89 - "Sprite-RPC", // 90 - "LARP", // 91 - "MTP", // 92 - "AX.25", // 93 - "IPIP", // 94 - "MICP", // 95 - "SCC-SP", // 96 - "ETHERIP", // 97 - "ENCAP", // 98 - "priv.enc", // 99 - "GMTP" // 99 - }; -// -// The types of IGMP messages -// -char *szIgmpType[] = {"", - "Host Membership Query", - "HOst Membership Report", - "", - "", - "", - "Version 2 Membership Report", - "Leave Group", - "", - "" - }; - -// -// Function: PrintRawBytes -// -// Description: -// This function simply prints out a series of bytes -// as hexadecimal digits. -// -void PrintRawBytes(BYTE *ptr, DWORD len) -{ - int i,j; -// if (! iFile) { -*(ptr+len)=0; -if ((*pattern==0) || strstr(ptr,pattern) ) { - fprintf(iFile?f:stdout,"%s",pbuf); - fprintf(iFile?f:stdout," " ); - while (len > 0) { - for(i=0; i < 16; i++) { - fprintf(iFile?f:stdout,"%x%x ", HI_WORD(*ptr), LO_WORD(*ptr)); - len--; - ptr++; - if (len == 0) {j=i++; while(++j < 16) fprintf(iFile?f:stdout," "); break; } - } - fprintf(iFile?f:stdout," "); - for(j=0; j < i; j++) fprintf(iFile?f:stdout,"%c",isprint(*(ptr-i+j))?*(ptr-i+j):'.'); - if (len) fprintf(iFile?f:stdout,"\n "); - } -// } else { -// fwrite(ptr,sizeof(BYTE),len,f); -// } -} -} - -static char *ICMPTypeTable[]={ - "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable","SrcQuench", "Redirect", "6", "7","Echo Request","9","10", - "Time Exceed", "ParamPrblm", "Timestamp", "Timestamp reply","InfoRqst", "InfoRply" -}; -static char *Dstunreach[]={ -"net unreach.","host unreach.","protocol unreach.","port unreach.", -"frag needed","source route?","","" -}; -int DecodeICMPHeader(WSABUF *wsabuf, DWORD iphdrlen) { - BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus ); - unsigned short type,code,chksum, - id, - seq; - unsigned long resptime,r1,r2; - BYTE *hhh; - SOCKADDR_IN addr; - type=*hdr++; code=*hdr++; - sprintf(str," Type:%-12s Code:%3d,",ICMPTypeTable[type],code); - - strcat(pbuf,str); - memcpy(&chksum, hdr, 2); - hdr += 2; hhh=hdr; - memcpy(&id, hdr, 2); - hdr += 2; - memcpy(&seq, hdr, 2); - hdr+=2; -// memcpy(&resptime, hdr, 4); -// hdr+=4; - switch (type) { - case 3: - memcpy(&addr.sin_addr.s_addr, hdr+16, 4); - if (code==4 ) sprintf(str,"frag needed-Max MTU:%u at %-15s\n",ntohs(seq), inet_ntoa(addr.sin_addr)); - else sprintf(str,"%s at %-15s\n",Dstunreach[code&7],inet_ntoa(addr.sin_addr)); - hdr+=iphdrlen; - break; - case 11: - memcpy(&addr.sin_addr.s_addr, hdr+16, 4); - sprintf(str,"%s at %-15s\n",code?"frag reass. exceed":"ttl exceed",inet_ntoa(addr.sin_addr)); - hdr+=iphdrlen; - break; - case 12: - memcpy(&addr.sin_addr.s_addr, hdr+16, 4); - sprintf(str," err:%d at %-15s\n",id,inet_ntoa(addr.sin_addr)); - hdr+=iphdrlen; - break; - case 4: - memcpy(&addr.sin_addr.s_addr, hdr+16, 4); - sprintf(str," wait for %-15s\n",ntohs(id),inet_ntoa(addr.sin_addr)); - hdr+=iphdrlen; - break; - case 5: - memcpy(&addr.sin_addr.s_addr, hhh, 4); - sprintf(str," from gw: %-15s\n",inet_ntoa(addr.sin_addr)); - hdr+=iphdrlen; - break; - case 0: - case 8: - sprintf(str," Id:%3u Seq:%3u\n",ntohs(id),ntohs(seq)); - break; - case 13: - case 14: - memcpy(&resptime, hdr, 4); - hdr+=4; - memcpy(&r1, hdr, 4); - hdr+=4; - memcpy(&r2, hdr, 4); - hdr+=4; - sprintf(str," Id:%3u Seq:%3d Rec/Tr %ld/%ld ms\n",ntohs(id),ntohs(seq),ntohl(r1)-ntohl(resptime),ntohl(r2)-ntohl(resptime)); - break; - case 15: - case 16: - sprintf(str," Id:%3u Seq:%3d\n",ntohs(id),ntohs(seq)); - break; - } - strcat(pbuf,str); - return hdr-(BYTE *)(wsabuf->buf + iphdrlen + iLnxplus); -} - -// -// Function: DecodeIGMPHeader -// -// Description: -// This function takes a pointer to a buffer containing -// an IGMP packet and prints it out in a readable form. -// - -int DecodeIGMPHeader(WSABUF *wsabuf, DWORD iphdrlen) { - BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus); - unsigned short chksum, - version, - type, - maxresptime; - SOCKADDR_IN addr; - version = HI_WORD(*hdr); - type = LO_WORD(*hdr); - - hdr++; - maxresptime = *hdr; - hdr++; - - memcpy(&chksum, hdr, 2); - chksum = ntohs(chksum); - hdr += 2; - - memcpy(&(addr.sin_addr.s_addr), hdr, 4); - sprintf(str," IGMP HEADER:\n"); - strcat(pbuf,str); - if ((type == 1) || (type == 2)) version = 1; - else version = 2; - sprintf(str," IGMP Version = %d\n IGMP Type = %s\n",version, szIgmpType[type]); - strcat(pbuf,str); - if (version == 2) { - sprintf(str," Max Resp Time = %d\n", maxresptime); - strcat(pbuf,str); - } - sprintf(str," IGMP Grp Addr = %s\n", inet_ntoa(addr.sin_addr)); - strcat(pbuf,str); - - return 8; -} - -// -// Function: DecodeUDPHeader -// -// Description: -// This function takes a buffer which points to a UDP -// header and prints it out in a readable form. -// -int DecodeUDPHeader(WSABUF *wsabuf, DWORD iphdrlen) { - BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus); - unsigned short shortval, - udp_src_port, - udp_dest_port, - udp_len, - udp_chksum; - memcpy(&shortval, hdr, 2); - udp_src_port = ntohs(shortval); - hdr += 2; - - memcpy(&shortval, hdr, 2); - udp_dest_port = ntohs(shortval); - hdr += 2; - - memcpy(&shortval, hdr, 2); - udp_len = ntohs(shortval); - hdr += 2; - - memcpy(&shortval, hdr, 2); - udp_chksum = ntohs(shortval); - hdr += 2; - - sprintf(str," UDP: SPort: %-05d | DPort: %-05d",udp_src_port, udp_dest_port); - strcat(pbuf,str); - sprintf(str," | Len: %-05d | CSum: 0x%08x\n",udp_len, udp_chksum); - strcat(pbuf,str); - return hdr-(BYTE *)(wsabuf->buf + iphdrlen + iLnxplus); -} - -// -// Function: DecodeTCPHeader -// -// Description: -// This function takes a buffer pointing to a TCP header -// and prints it out in a readable form. -// -int DecodeTCPHeader(WSABUF *wsabuf, DWORD iphdrlen) { - BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus); - unsigned short shortval; - unsigned long longval; - - memcpy(&shortval, hdr, 2); - shortval = ntohs(shortval); - sprintf(str," TCP: SPort: %u", shortval); - strcat(pbuf,str); - hdr += 2; - - memcpy(&shortval, hdr, 2); - shortval = ntohs(shortval); - sprintf(str," DPort: %u", shortval); - strcat(pbuf,str); - hdr += 2; - - memcpy(&longval, hdr, 4); - longval = ntohl(longval); - sprintf(str," Seq: %lX", longval); - strcat(pbuf,str); - hdr += 4; - - memcpy(&longval, hdr, 4); - longval = ntohl(longval); - sprintf(str," ACK: %lX", longval); - strcat(pbuf,str); - hdr += 4; -// printf(" Header Len : %d (bytes %d)\n", HI_WORD(*hdr), (HI_WORD(*hdr) * 4)); - - memcpy(&shortval, hdr, 2); - shortval = ntohs(shortval) & 0x3F; - sprintf(str," Flags: "); - strcat(pbuf,str); - if (shortval & 0x20) strcat(pbuf,"URG "); - if (shortval & 0x10) strcat(pbuf,"ACK "); - if (shortval & 0x08) strcat(pbuf,"PSH "); - if (shortval & 0x04) strcat(pbuf,"RST "); - if (shortval & 0x02) strcat(pbuf,"SYN "); - if (shortval & 0x01) strcat(pbuf,"FIN "); - strcat(pbuf,"\n"); - hdr += 2; - - memcpy(&shortval, hdr, 2); - shortval = ntohs(shortval); -// printf(" Window size: %d\n", shortval); - hdr += 2; - - memcpy(&shortval, hdr, 2); - shortval = ntohs(shortval); -// printf(" TCP Chksum : %d\n", shortval); - hdr += 2; - - memcpy(&shortval, hdr, 2); - shortval = ntohs(shortval); - hdr += 2; -// printf(" Urgent ptr : %d\n", shortval); - - return hdr-(BYTE *)(wsabuf->buf + iphdrlen + iLnxplus); -} - -int DecodeGREHeader(WSABUF *wsabuf, DWORD iphdrlen,DWORD bytesret, - unsigned int srcip, unsigned short srcport, unsigned long srcnet,unsigned int destip, unsigned short destport, unsigned long destnet, - unsigned short xport,unsigned int xip, unsigned long xnet) - { - BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus); - unsigned short shortval; - unsigned long longval; - int ipe; - BYTE *orihdr; - char *sstr; - SOCKADDR_IN srcaddr; - - orihdr=hdr; - memcpy(&shortval, hdr, 2); - shortval = ntohs(shortval); - sprintf(str," GRE Flag: %u Prot:", shortval); - strcat(mypbuff,str); - hdr += 2; - - memcpy(&shortval, hdr, 2); - shortval = ntohs(shortval); - ipe=0; - sstr=str; -// sprintf(str," Prot: %u", shortval); - switch ( shortval ) { - case 4: sstr="SNA"; - break; - case 0xfe: sstr="OSI"; - break; - case 0x200: sstr="PUP"; - break; - case 0x600: sstr="XNS"; - break; - case 0x800: sstr="IP"; - ipe=1; - break; - case 0x804: sstr="Chaos"; - break; - case 0x806: sstr="ARP"; - break; - case 0x6558: sstr="Tr.bridge"; - break; - default: sprintf(str,"%u", shortval); - break; - } - hdr += 2; - strcat(mypbuff,sstr); - if (ipe && gre) { - int plusment,jj,protoment; - plusment=iLnxplus; - protoment=iProto; - if (iProto==47) iProto=0; - iLnxplus+=4; - nomac=0; - iLnxplus=plusment+24; - DecodeIPHeader(wsabuf,srcip,srcport,srcnet,destip,destport,destnet,bytesret,xport,xip,xnet); - nomac=1; - iLnxplus=plusment; - iProto=protoment; - } -return -1; -// return hdr-(BYTE *)(wsabuf->buf + iphdrlen + iLnxplus); -} - - -int ClearIPAcc() { - unsigned long i; - ta *tai; - for(i=0;ifrom=tai->to=0; tai++; } - for (i=0;ibyte > d2->byte) return -1; - if (d1->byte < d2->byte) return 1; - return 0; -} -int countsort(const void *s1, const void *s2) { // sorting tale in packet count order - ta *d1; - ta *d2; - d1= (ta *)s1; d2=(ta *)s2; - if (d1->pkt > d2->pkt) return -1; - if (d1->pkt < d2->pkt) return 1; - return 0; -} -int CloseIPAcc( long ti) { - unsigned long i; - ta *tai; - SOCKADDR_IN srcaddr; - SOCKADDR_IN dstaddr; - float ff; - char str[16]; - unsigned long j,k,l; - int lin=0; - int linn; - - time(&elapsed); - if (iFile) f=fopen(filename,"w+"); - k=0; - if (sortbysize) qsort(acc,MAXHASH,sizeof(ta),bytesort); - else qsort(acc,MAXHASH,sizeof(ta),countsort); - ff=0.0; - for (i=0;i<255;i++) ff+=typb[i]; - for (i=0; ifrom!=0) && (tai->to!=0)) ++k; - } - if (iScreen) { -#ifndef LINUX - system("cls"); -#else - system("clear"); -// printf("\033[1~"); -#endif - printf("%-16s Speed: %5.2f Kbit/s , %ld IP pairs / %ld secs. %s@%s.hu",myipname,ff/ti/1024*8,k,ti,author,author); - printf("\nProt:"); j=0; ++lin; - while (1) { - l=k=0; - for (i=0;i<100;i++) if ( typb[i]>k) { k=typb[i]; l=i; } - if (k==0) break; - if ((j>0) && ((j%3)==0)) { printf("\n "); ++lin; } - if (k>1024*1024) printf(" %-8.8s:%5.1fk/%-6.1f M",szProto[l],(float)typp[l]/1024,(float)k/(1024*1024)); - else if (k>1024) printf(" %-8.8s:%5ld/%-6.1f k",szProto[l],typp[l],(float)k/1024); - else printf(" %-8.8s:%5ld/%-8ld",szProto[l],typp[l],k); - typb[l]=0; - ++j; - } - printf("\nPort:"); j=0; ++lin; - k=0; linn=lin; - while (1) { - l=k=0; - for (i=0;ik) { k=tcppb[i]; l=i; } - if (k==0) break; - if (j && (j%4)==0) { - if (lin >= linn+1) break; - printf("\n "); - ++lin; - } - if (k>1024*1024) printf(" %04d:%4.1fk/%-5.1f M",l,(float)tcppp[l]/1024,(float)k/(1024*1024)); - else if (k>1024) printf(" %04d:%4ld/%-5.1f k",l,tcppp[l],(float)k/1024); - else printf(" %04d:%4ld/%-7ld",l,tcppp[l],k); - tcppb[l]=0; - ++j; - } - } else if (f) { - fprintf(f,"%-16s Speed: %5.2f Kbit/s , %ld IP pairs / %ld secs. %s@%s.hu",myipname,ff/ti/1024*8,k,ti,author,author); - fprintf(f,"\nProt:"); j=0; - while (1) { - l=k=0; - for (i=0;i<100;i++) if ( typb[i]>k) { k=typb[i]; l=i; } - if (k==0) break; - if (k>1024*1024) fprintf(f," %-8.8s:%5.1fk/%-6.1f M",szProto[l],(float)typp[l]/1024,(float)k/(1024*1024)); - else if (k>1024) fprintf(f," %-8.8s:%5ld/%-6.1f k",szProto[l],typp[l],(float)k/1024); - else fprintf(f," %-8.8s:%5ld/%-8ld",szProto[l],typp[l],k); - typb[l]=0; - ++j; - } - printf("\nPort:"); j=0; - k=0; linn=lin; - while (1) { - l=k=0; - for (i=0;ik) { k=tcppb[i]; l=i; } - if (k==0) break; - if (k>1024*1024) fprintf(f," %04d:%4.1fk/%-5.1f M",l,(float)tcppp[l]/1024,(float)k/(1024*1024)); - else if (k>1024) fprintf(f," %04d:%4ld/%-5.1f k",l,tcppp[l],(float)k/1024); - else fprintf(f," %04d:%4ld/%-7ld",l,tcppp[l],k); - tcppb[l]=0; - ++j; - } - } - - for (i=0; ifrom!=0) && (tai->to!=0)) { ++k; - if (!iSum) { - dstaddr.sin_addr.s_addr = htonl(*(iph+tai->from)); - srcaddr.sin_addr.s_addr = htonl(*(iph+(tai->to))); - strcpy(str,inet_ntoa(dstaddr.sin_addr)); - if (iScreen && (++linpkt,tai->byte,((float)tai->byte)/ti/1024*8); - if (f) fprintf(f,"%-15s\t%-15s\t%d\t%ld\n",str,inet_ntoa(srcaddr.sin_addr),tai->pkt,tai->byte); - } - } - } - if (iScreen) printf("\n"); -#ifdef LINUX - if (iScreen) fflush(stdout); -#endif - ClearIPAcc(); - if (f) { - char cmdline[255]; - fclose(f); -// if (*execname) _spawnle(_P_NOWAIT,execname,execname,filename); -// if (*execname) _execl(execname,execname); - if (*execname) { -#ifndef LINUX - sprintf(cmdline,"%s %s",execname,filename); -#else - sprintf(cmdline,"%s %s",execname,filename); -#endif - system(cmdline); -// iRun=0; - } - } - f=NULL; - return 0; -} - -unsigned short FindIPHash( unsigned long ip ) { - unsigned short hashval; - unsigned long *ipt; - - hashval = (unsigned short)(((ip&0xFFFF0000)>>16) ^ (ip&0x0000FFFF)); - ipt=iph + hashval; - while (*ipt != 0 && (*ipt!=ip)) { ipt++; hashval++; } - if (*ipt==0) *ipt=ip; - return hashval; -} - -unsigned short SetIPAcc( unsigned long src, unsigned long dst, unsigned long byte, unsigned short typ, unsigned short sport, unsigned short dport) { - unsigned short from,to,hash; - ta *tai; - hash=0; - if (src) { - - if (fromip) from=FindIPHash(src); else from=-1; - if (toip) to=FindIPHash(dst); else to=-1; - hash=from^to; - tai=acc + hash; - while ( ((tai->from!=from) && (tai->to!=to)) && ((tai->from!=0) && (tai->to!=0)) ) {tai++; hash++; } - if ((tai->from==0)&&(tai->to==0)) { - tai->byte=byte; tai->from=from; tai->to=to; tai->pkt=1; - } else { tai->byte+=byte; tai->pkt++; } - - typp[typ]++; - typb[typ]+=byte; - if ((sport>0) && (sport0) && (dportbuf, - *nexthdr = NULL, - *ohdr; - unsigned short shortval; - SOCKADDR_IN srcaddr, - destaddr; - - unsigned short ip_version, - ip_hdr_len, - ip_tos, - ip_total_len, - ip_id, - ip_flags, - ip_ttl, - ip_frag_offset, - ip_proto, - ip_hdr_chksum, - ip_src_port, - ip_dest_port; - unsigned int ip_src, - ip_dest; - BOOL bPrint = FALSE; - char ip_prtype=0; - int j; - time_t tt; - struct tm *tmm; - - ohdr=hdr; - if (iLnxplus) ip_prtype=*(hdr+iLnxplus-1); - if (ip_prtype) return 0; - hdr += iLnxplus; - ip_version = HI_WORD(*hdr); - ip_hdr_len = LO_WORD(*hdr) * 4; - nexthdr = (BYTE *)((BYTE *)hdr + ip_hdr_len); - hdr++; - - ip_tos = *hdr; - hdr++; - - memcpy(&shortval, hdr, 2); - ip_total_len = ntohs(shortval); - hdr += 2; - - memcpy(&shortval, hdr, 2); - ip_id = ntohs(shortval); - hdr += 2; - - ip_flags = ((*hdr) >> 5); - - memcpy(&shortval, hdr, 2); - ip_frag_offset = ((ntohs(shortval)) & 0x1FFF); - hdr += 2; - - ip_ttl = *hdr; - hdr++; - - ip_proto = *hdr; - hdr++; - - memcpy(&shortval, hdr, 2); - ip_hdr_chksum = ntohs(shortval); - hdr += 2; - - memcpy(&srcaddr.sin_addr.s_addr, hdr, 4); - ip_src = ntohl(srcaddr.sin_addr.s_addr); - hdr += 4; - - memcpy(&destaddr.sin_addr.s_addr, hdr, 4); - ip_dest = ntohl(destaddr.sin_addr.s_addr); - hdr += 4; - // - // If packet is UDP, TCP, or IGMP read ahead and - // get the port values. - // - ip_src_port=ip_dest_port=0; - if (((ip_proto == 2) || - (ip_proto == 6) || - (ip_proto == 17)) ) //&& bFilter) - { - memcpy(&ip_src_port, nexthdr, 2); - ip_src_port = ntohs(ip_src_port); - memcpy(&ip_dest_port, nexthdr+2, 2); - ip_dest_port = ntohs(ip_dest_port); - - }; - bPrint = 0; -// xaok= (xip!=0) && (((xip&xnet)==(ip_src&xnet))||((xip&xnet)==(ip_dest&xnet))); -// saok= ((srcip==0)||((srcip&srcnet)==(ip_src&srcnet))); -// daok = ((destip==0)||((destip&destnet)==(ip_dest&destnet))); -// xpok=(xport!=0) && ((xport==ip_src_port)||(xport==ip_dest_port)); -// spok=((srcport==0)||(srcport == ip_src_port)); -// dpok=((destport==0)||(destport == ip_dest_port)); -//printf("\nf:%d xa:%d sa:%d da:%d xp:%d sp:%d dp:%d",bFilter,xaok,saok,daok,xpok,spok,dpok); -// if (!bFilter || ( (xaok||(saok&&daok)) && (xpok||(spok&&dpok)))) { -if ((!bFilter) || ((ip_proto==47)&&gre) || - ( - ((iProto==0)||(ip_proto==iProto)) && - ( - ((xip!=0) && (((xip&xnet)==(ip_src&xnet))||((xip&xnet)==(ip_dest&xnet))) - ) || ( - ((srcip==0) || ((srcip&srcnet)==(ip_src&srcnet))) && ((destip==0)||((destip&destnet)==(ip_dest&destnet))) - ) - ) - && - ( - ((xport!=0) && ((xport==ip_src_port)||(xport==ip_dest_port)) - ) || ( - ((srcport==0)||(srcport == ip_src_port))&&((destport==0)||(destport == ip_dest_port)) - ) - ) - ) - ) { - if (! iDetail) { - if ((ip_proto==47)&&gre) { - *mypbuff=0; - DecodeGREHeader(wsabuf, ip_hdr_len, bytesret, - srcip,srcport,srcnet,destip,destport,destnet,xport,xip,xnet); -// SetIPAcc(0,0,0,0,0,0); - return ip_hdr_len; - } - SetIPAcc(ip_src,ip_dest,ip_total_len,ip_proto,ip_src_port,ip_dest_port); - } - else bPrint=TRUE; -// printf("%d %ld %ld %ld %ld",ip_proto,xip,xip&xnet,ip_src&xnet,ip_dest&xnet); - } else { - if (! iDetail) SetIPAcc(0,0,0,0,0,0); -// else bPrint=TRUE; - } - time(&tt); - if ((!iSum && ( tt-elapsed > iCycle)) || !iRun || mostird) { - mostird=0; - if (! iDetail) CloseIPAcc(tt-elapsed-1); - else { - time(&elapsed); - if (f) fclose(f); - if (iFile) f=fopen(filename,"a"); - } - } - if (lNum) { if (--lNum <= 0) iRun=0; } - - // - *pbuf=0; - if (bPrint) { - tmm=localtime(&tt); -if (! nomac ) { - strcpy(pbuf,mypbuff); -} else { - sprintf(str,"\n%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d ", - tmm->tm_year+1900,tmm->tm_mon+1,tmm->tm_mday,tmm->tm_hour,tmm->tm_min,tmm->tm_sec); - strcat(pbuf,str); -#ifdef LINUX - sprintf(str,"%x:%x:%x:%x:%x:%x > %x:%x:%x:%x:%x:%x",*ohdr,*(ohdr+1),*(ohdr+2),*(ohdr+3),*(ohdr+4),*(ohdr+5), - *(ohdr+6),*(ohdr+7),*(ohdr+8),*(ohdr+9),*(ohdr+10),*(ohdr+11)); - strcat(pbuf,str); -#endif -} - sprintf(str," %d bytes\n%-15s>", ip_total_len, inet_ntoa(srcaddr.sin_addr)); - strcat(pbuf,str); - sprintf(str,"%-15s", inet_ntoa(destaddr.sin_addr)); - strcat(pbuf,str); - sprintf(str," TTL:%-3d Proto:%-6s F:%d/%d TOS:%X%X\n", - ip_ttl, szProto[ip_proto],ip_flags,ip_frag_offset,HI_WORD(ip_tos), LO_WORD(ip_tos)); - strcat(pbuf,str); - if (iFile) strcat(pbuf,"."); - strcpy(mypbuff,pbuf); - - } - else return ip_hdr_len; - - if (justheader) { if (*pbuf) fprintf(iFile?f:stdout,"%s",pbuf); return ip_hdr_len; } - if (iDetail) { - switch (ip_proto) { - case 1: // ICMP - j=DecodeICMPHeader(wsabuf, ip_hdr_len); - break; - case 2: // IGMP - j=DecodeIGMPHeader(wsabuf, ip_hdr_len); - break; - case 6: // TCP - j=DecodeTCPHeader(wsabuf, ip_hdr_len); - break; - case 17: // UDP - j=DecodeUDPHeader(wsabuf, ip_hdr_len); - break; - case 47: // UDP - j=DecodeGREHeader(wsabuf, ip_hdr_len, bytesret, - srcip,srcport,srcnet,destip,destport,destnet,xport,xip,xnet); - break; - default: - j=0; hdr=(BYTE *)wsabuf->buf; - sprintf(str," No decoder installed for protocol\n"); - strcat(pbuf,str); - break; - } - if (j>=0) PrintRawBytes(hdr+j,bytesret-j-ip_hdr_len-12); //(hdr-(BYTE *)(wsabuf->buf + iLnxplus))); - } - else if (*pbuf) fprintf(iFile?f:stdout,"%s",pbuf); - - return ip_hdr_len; -} diff --git a/openwrt/package/pipacs/src/parser.h b/openwrt/package/pipacs/src/parser.h deleted file mode 100644 index aedaeafc2ec..00000000000 --- a/openwrt/package/pipacs/src/parser.h +++ /dev/null @@ -1,60 +0,0 @@ -#define LINUX 1 -#ifdef LINUX -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#define BYTE unsigned char -#define DWORD unsigned long -#define BOOL char -#define TRUE 1 -#define FALSE 0 -#define WSADATA int -#define SOCKET int -#define SOCKADDR struct sockaddr -#define SOCKADDR_IN struct sockaddr_in -typedef struct _WSABUF { - unsigned long len; - unsigned char *buf; -} WSABUF; -#define SIO_RCVALL 0 -#define SIO_RCVALL_IGMPMCAST 0 -#define SIO_RCVALL_MCAST 0 -#define ETH_P_ALL 0x0003 -#else // WINDOWS - -#include -#include - -#endif - -#ifndef _RCVALL_H_ -#define _RCVALL_H_ - - -#define MAX_IP_SIZE 65535 -#define MIN_IP_HDR_SIZE 20 - -#define HI_WORD(byte) (((byte) >> 4) & 0x0F) -#define LO_WORD(byte) ((byte) & 0x0F) - -extern char *szProto[]; - - - -void PrintRawBytes (BYTE *ptr, DWORD len); -int DecodeIGMPHeader(WSABUF *wsabuf, DWORD iphdrlen); -int DecodeUDPHeader (WSABUF *wsabuf, DWORD iphdrlen); -int DecodeTCPHeader (WSABUF *wsabuf, DWORD iphdrlenz); -int DecodeIPHeader (WSABUF *wasbuf, unsigned int srcaddr, unsigned short srcport, unsigned long srcnet, - unsigned int destaddr, unsigned short destport, unsigned long destnet, DWORD bytesret, - unsigned short xport, unsigned int xip, unsigned long xnet); - -#endif diff --git a/openwrt/package/pipacs/src/pipacs.c b/openwrt/package/pipacs/src/pipacs.c deleted file mode 100644 index 4087cd32962..00000000000 --- a/openwrt/package/pipacs/src/pipacs.c +++ /dev/null @@ -1,589 +0,0 @@ -// http://www.phj.hu/freesoft.asp -#include -#include -#include "parser.h" - -#ifndef LINUX -#include -#include -#else -#include -struct promisc_device -{ - char name[16]; /* name (e.g. eth0) */ - - int reset; /* do we have to reset it on exit ? */ - struct ifreq oldifr; /* old settings */ - - struct promisc_device *next; -}; - -#endif - -DWORD dwIoControlCode=SIO_RCVALL; -DWORD dwProtocol=IPPROTO_IP, dwInterface=0; - -#define MAXVER 2 -#define MINVER 6 -SOCKET s; - -// -// Filters (Globals) -// -unsigned int uiSourceAddr=0, uiDestAddr=0, uiXAddr=0; -unsigned short usSourcePort = 0, usDestPort = 0, usXPort = 0; -unsigned short usSourceNet = 32, usDestNet = 32, usXNet = 32; -unsigned long ulDestNet=0xffffffff, ulSourceNet=0xffffffff, ulXNet=0xffffffff; -BOOL bFilter=FALSE; -int iline=25; -char myipname[64]; -char pattern[1024]; -int justheader=0; -int gre=0; -int sortbysize,fromip,toip; -int skipvlan=0; - -extern char filename[128]; - -extern char intlist[128]; - -#ifndef LINUX -void PrintInterfaceList( void ); -int GetInterface(SOCKET , SOCKADDR_IN *, int ); -#endif -extern int InitIPAcc( void ); -extern int CloseIPAcc( void ); -extern int iCycle; -extern int iScreen; -extern int iFile; -extern int iDetail; -extern int iRun; -extern long lNum; -extern FILE *f; -extern int iProto; -extern int iSum; -extern char execname[]; -extern int mostird; -extern int iLnxplus; - -int set_raw_mode(void) -{ - int fd = STDIN_FILENO; - struct termios t; - - if (tcgetattr(fd, &t) < 0) { perror("tcgetattr"); return -1; } - t.c_lflag &= ~ICANON; - if (tcsetattr(fd, TCSANOW, &t) < 0) { perror("tcsetattr"); return -1; } - setbuf(stdin, NULL); - return 0; -}// -// Function: usage -// -// Description: -// Prints usage information. -// -char *author = "phj"; - -void usage(char *progname) -{ - printf(" usage: %s options\n where options:\n", progname); - printf(" [-c:sec] Dump cycle in sec (10)\n"); - printf(" [-f:file[-e:program]] Results into a file [and exec program](-)\n"); - printf(" [-n:db] Execute just db cycle (0)\n"); - printf(" [-l:lineno] Print lineno lines of hosts(25)\n"); - printf(" [-k] Sort result by packet count (size)\n"); - printf(" [-1] Ignore source IP (don't ignore)\n"); - printf(" [-2] Ignore destination IP (don't ignore)\n"); - printf(" [-h] Print just the header(use -a!)\n"); - printf(" [-a] Print packet info&data (-)\n"); - printf(" [-p] Print just summary info (-)\n"); - printf(" Otherwise print sum&ip pairs\n"); -//#ifndef LINUX - printf(" [-t:[tcp|udp|icmp|....|number]] Filter on IP protocoll (ALL)\n"); -//#endif - printf(" [-g] Make GRE encapsulation trasparent (-)\n"); - printf(" [-v] Skip VLAN headers (-)\n"); - printf(" [-sa:IP[/Net]] Filter on source address (-)/net\n"); - printf(" [-sp:Port] Filter on source port (-)\n"); - printf(" [-da:IP[/Net]] Filter on dest address/net (-)\n"); - printf(" [-dp:Port] Filter on dest port(-)\n"); - printf(" [-xa:IP[/Net]] Filter on src|dest address/net (-)\n"); - printf(" [-xp:Port] Filter on src|dest port (-)\n"); - printf(" [-pa:pattern] String match (0), last param!!!\n"); -#ifndef LINUX - printf(" [-i:int] Capture on this interface (0)\n"); - printf(" Available interfaces:\n"); - PrintInterfaceList(); -#else - printf(" [-i:int[,int]] Capture on this interface (eth0)\n"); -#endif - printf(" Filtering rules: t && (sa|da|xa) && (sp|dp|xp)"); - printf("\nVer. %d.%d (c):2000-2006, P l¢czi-Horv th J nos\n",MAXVER,MINVER); -#ifndef LINUX - WSACleanup(); - ExitProcess(-1); -#else - exit(5); -#endif -} - -// -// Function: ValidateArgs -// -// Description: -// This function parses the command line arguments and -// sets global variables to indicate how the app should act. -// -void ValidateArgs(int argc, char **argv) -{ - int i,j; - char *ptr; - - sortbysize=1; fromip=1; toip=1; - - if (argc <2) { usage(argv[0]); return; } - if (*(author+2) != 'j') { usage(argv[0]); return; } - for(i=1; i < argc ;i++) { - if ((argv[i][0] == '-') || (argv[i][0] == '/')) { - switch (tolower(argv[i][1])) { - case 't': // traffic type - ptr = &argv[i][2]; - while (*++ptr) *ptr = toupper(*ptr); - ptr = &argv[i][3]; - for ( j=0;j<134;j++) { - if (!strcmp(ptr, szProto[j])) { -// dwIoControlCode = SIO_RCVALL; -#ifdef LINUX - dwProtocol = j; -#endif - iProto=j; - break; - } - } - if ((j>133) && atoi(&argv[i][3])) { -// dwIoControlCode = SIO_RCVALL; -#ifdef LINUX - dwProtocol = atoi(&argv[i][3]); -#endif - iProto=atoi(&argv[i][3]); - } else if (j>133) usage(argv[0]); - break; - case 'i': // interface number -#ifndef LINUX - dwInterface = atoi(&argv[i][3]); -#else - strcpy(intlist,&argv[i][3]); - ptr=strchr(intlist,' '); - if (ptr) *ptr=0; -#endif - break; - case 'g': // gre - gre=1; - break; - case 'c': // cycle time - iCycle = atoi(&argv[i][3]); - break; - case 'a': // cycle time - iDetail = 1; - break; - case 'h': // cycle time - iDetail = justheader = 1; - break; - case 'n': // just n cycle - lNum = atol(&argv[i][3]); - break; - case 'l': // lineno lines - iline = atoi(&argv[i][3]); - break; - case 'p': // just summary - if ((tolower(argv[i][2]) == 'a')) { - strcpy(pattern,&argv[i][4]); printf("\n Pattern: \'%s",&argv[i][4]); - while (++iiAddressCount ;i++) { - printf(" %-2d ........ [%s]\n", i, - inet_ntoa(((SOCKADDR_IN *)slist->Address[i].lpSockaddr)->sin_addr)); - } - closesocket(s); - return; -} - -// -// Function: GetInterface -// -// Description: -// This function retrieves a zero based index and returns -// the IP interface corresponding to that. -// -int GetInterface(SOCKET s, SOCKADDR_IN *ifx, int num) -{ - SOCKET_ADDRESS_LIST *slist=NULL; - char buf[2048]; - DWORD dwBytesRet; - int ret; - - ret = WSAIoctl(s, SIO_ADDRESS_LIST_QUERY, NULL, 0, buf, 2048,&dwBytesRet, NULL, NULL); - if (ret == SOCKET_ERROR) { - printf("WSAIoctl(SIO_ADDRESS_LIST_QUERY) failed: %d\n",WSAGetLastError()); - return -1; - } - slist = (SOCKET_ADDRESS_LIST *)buf; - if (num >= slist->iAddressCount) return -1; - ifx->sin_addr.s_addr = ((SOCKADDR_IN *)slist->Address[num].lpSockaddr)->sin_addr.s_addr; - if (*author != 'p') return -1; - return 0; -} -#endif -#ifdef LINUX -struct promisc_device *prom; - -void init_capture( void ) -/* - * 1) Open our capture socket - * 2) Set all the promisc devices to promiscous mode - */ -{ - struct ifreq ifr; - struct promisc_device *p,*pp; - struct protoent *pr; - char *p1,*p2; - - if ((s = socket (AF_INET, SOCK_PACKET, htons (ETH_P_ALL))) < 0) - { - printf(" can't get socket: \n"); - exit(1); - } - strcpy(myipname,intlist); - p1=intlist; p=NULL; - while (p1) { - pp=p; - p = malloc(sizeof(struct promisc_device)); - if (pp) pp->next=p; else prom=p; - if ( (p2=strchr(p1,','))) *p2++=0; - strcpy(&p->name,p1); p->next=NULL; - printf(" %s",p->name); fflush(stdout); - p1=p2; -// while(p!=NULL) { - strcpy (p -> oldifr.ifr_name, p -> name); - - if (ioctl (s, SIOCGIFFLAGS, &(p -> oldifr)) < 0) { - printf(" can't get flags: \n"); - exit(2); - } - p -> reset = 1; - ifr = p -> oldifr; - if (ifr.ifr_flags & IFF_PROMISC) printf(" already promisc! \n"); - ifr.ifr_flags |= IFF_PROMISC; - if (ioctl (s, SIOCSIFFLAGS, &ifr) < 0) { - printf(" can't set flags: \n"); - exit(3); - } -// p = p -> next; - } -} - -void exit_capture(void) -{ - struct promisc_device *p; - - /* do we have to check (capture_sd >= 0) ? */ - - p = prom; - - while(p != NULL) { - if (ioctl (s, SIOCSIFFLAGS, &(p -> oldifr)) < 0) { - printf("can't reset flags: \n"); - } - - p = p -> next; - } - - close (s); -} -#endif -// -// Function: main -// -int main(int argc, char **argv) { - WSADATA wsd; - SOCKADDR_IN if0; - int ret,count; - unsigned int optval; - DWORD dwBytesRet, - dwFlags, - nproc; - char rcvbuf[MAX_IP_SIZE]; - WSABUF wbuf; - unsigned long i; -#ifndef LINUX - // Load Winsock - // - if (WSAStartup(MAKEWORD(2,2), &wsd) != 0) { - printf(" WSAStartup() failed: %d\n", GetLastError()); - return -1; - } -#else - SOCKADDR ssaddr; - struct promisc_device *p; - fd_set ready; - struct timeval tv; -#endif - char Key; - int status; - FILE *input; -// Parse the command line -// - strcpy(intlist,"eth0"); - for(i=100;i<255;i++) szProto[i]="?!?"; - szProto[103]="PIM"; - szProto[108]="IPCOMP"; - szProto[112]="VRRP"; - szProto[115]="L2TP"; - szProto[124]="ISIS"; - szProto[132]="SCTP"; - szProto[133]="FC"; - *execname=0; - ValidateArgs(argc, argv); - if (bFilter) { - i=uiSourceAddr; - if ( i || usSourcePort) - printf(" Source: %03d.%03d.%03d.%03d/%d:%d\n",(i&0xff000000)>>24,(i&0x00ff0000)>>16,(i&0x0000ff00)>>8,i&0xff,uiSourceAddr?usSourceNet:0, usSourcePort); - i=uiDestAddr; - if ( i || usDestPort) - printf(" Dest. : %03d.%03d.%03d.%03d/%d:%d\n",(i&0xff000000)>>24,(i&0x00ff0000)>>16,(i&0x0000ff00)>>8,i&0xff,uiDestAddr?usDestNet:0, usDestPort); - i=uiXAddr; - if ( i || usXPort) - printf(" IP. : %03d.%03d.%03d.%03d/%d:%d\n",(i&0xff000000)>>24,(i&0x00ff0000)>>16,(i&0x0000ff00)>>8,i&0xff,uiXAddr?usXNet:0, usXPort); - } - if (iFile) printf(" To file : %s\n",filename); - if (iProto) printf(" Protocol: %s (%d)\n",szProto[iProto],iProto); - // Create a raw socket for receiving IP datagrams - // -#ifndef LINUX - s = WSASocket(AF_INET, SOCK_RAW, dwProtocol, NULL, 0, WSA_FLAG_OVERLAPPED); - if (s == INVALID_SOCKET) - { - printf("WSASocket() failed: %d\n", WSAGetLastError()); - return -1; - } - // Get an interface to read IP packets on - // - memset(&if0,0,sizeof(if0)); - if0.sin_family = AF_INET; - if0.sin_port = htons(0); - if (GetInterface(s, &if0, dwInterface) != 0) - { - printf("Unable to obtain an interface\n"); - return -1; - } - sprintf(myipname,"%-16s",inet_ntoa(if0.sin_addr)); -#else - printf("starting capture ...."); fflush(stdout); - init_capture(); - printf(" capture started ....\n"); fflush(stdout); -#endif - printf(" Binding to IF: %s\n", myipname); -#ifndef LINUX -// -// This socket MUST be bound before calling the ioctl -// - - if (bind(s, (SOCKADDR *)&if0, sizeof(if0)) == SOCKET_ERROR) { - printf("bind() failed: %d\n", WSAGetLastError()); - return -1; - } -// -// Set the SIO_RCVALLxxx ioctl -// - optval = 1; - if (WSAIoctl(s, dwIoControlCode, &optval, sizeof(optval), - NULL, 0, &dwBytesRet, NULL, NULL) == SOCKET_ERROR) { - printf("WSAIotcl() set raw socket failed; %d\n", WSAGetLastError()); -// return -1; - optval = 2; - if (WSAIoctl(s, dwIoControlCode, &optval, sizeof(optval), - NULL, 0, &dwBytesRet, NULL, NULL) == SOCKET_ERROR) { - printf("WSAIotcl() set raw socket only failed; %d\n", WSAGetLastError()); - return -1; - } - } - system("cls"); -#else - tv.tv_sec=0; tv.tv_usec=0; - set_raw_mode(); - FD_ZERO(&ready); - FD_SET(STDIN_FILENO,&ready); -#endif - input = fopen("/dev/tty", "r"); //open the terminal keyboard - if (uiSourceAddr==0) ulSourceNet=0; - else for ( i=0; i<32-usSourceNet; i++) ulSourceNet <<= 1; - if (uiDestAddr==0) ulDestNet=0; - else for ( i=0; i<32-usDestNet; i++) ulDestNet <<= 1; - if (uiXAddr==0) ulXNet=0; - else for ( i=0; i<32-usXNet; i++) ulXNet <<= 1; - if (uiXAddr) uiSourceAddr=uiDestAddr=uiXAddr; - if (usXPort) usSourcePort=usDestPort=usXPort; - if (ulXNet) ulSourceNet=ulDestNet=ulXNet; - InitIPAcc(); -// Start receiving IP datagrams until interrupted -// - count = 0; - if (iFile && iDetail) f=fopen(filename,"w+"); - if (iProto) bFilter=1; - if (*(author+1) != 'h') iRun=0; - while (iRun) { - rcvbuf[MAX_IP_SIZE]=0; - wbuf.len = MAX_IP_SIZE; - wbuf.buf = rcvbuf; -#ifndef LINUX - dwFlags = 0; - ret = WSARecv(s, &wbuf, 1, &dwBytesRet, &dwFlags, NULL, NULL); - if (ret == SOCKET_ERROR) { - printf("WSARecv() failed: %d\n", WSAGetLastError()); - return -1; - } - if (kbhit()) { -#else - dwFlags = sizeof(ssaddr); - - ret = recvfrom (s, wbuf.buf, MAX_IP_SIZE, 0, &ssaddr, (int *) &dwFlags); - if (ret == -1) continue; - dwBytesRet=wbuf.len=ret; - p=prom; - while(p!=NULL) { - if (!strcmp(p -> name, ssaddr.sa_data)) break; - p=p->next; - } - if (!p) { -// printf("\n%s: ignored",ssaddr.sa_data); fflush(stdout); - continue; - } - FD_ZERO(&ready); - FD_SET(STDIN_FILENO,&ready); - if (select(STDIN_FILENO+1,&ready,NULL,NULL,&tv)>0) { -// if (FD_ISSET(STDIN_FILENO,&ready)) { -#endif - switch (getchar()) { /* branch to appropiate key handler */ - case 0x1b: /* Esc */ - iRun=0; - break; - default: - mostird=1; - break; - } //end of switch key - } - -// Deccode the IP header -// - if (!(nproc = DecodeIPHeader(&wbuf, uiSourceAddr, usSourcePort, ulSourceNet, - uiDestAddr, usDestPort, ulDestNet, dwBytesRet,usXPort,uiXAddr,ulXNet))) - { -// printf("Error decoding IP header!\n"); -// break; - } - } - // Cleanup - // - if (iRun && !iDetail) CloseIPAcc(); - if (f) fclose(f); -#ifndef LINUX - closesocket(s); - WSACleanup(); -#else - exit_capture(); -#endif - return 0; -} diff --git a/openwrt/package/pmacct/Config.in b/openwrt/package/pmacct/Config.in deleted file mode 100644 index 2c6289113c1..00000000000 --- a/openwrt/package/pmacct/Config.in +++ /dev/null @@ -1,215 +0,0 @@ -menu "pmacct............................ IPv4/IPv6 accounting and aggregation tools" - -config BR2_COMPILE_PMACCT - tristate - default n - depends BR2_COMPILE_PMACCT_BASIC || BR2_COMPILE_PMACCT_MYSQL || BR2_COMPILE_PMACCT_PGSQL || BR2_COMPILE_PMACCT_SQLITE || BR2_COMPILE_PMACCT_CUSTOM - -config BR2_COMPILE_PMACCT_BASIC - tristate - default n - depends BR2_PACKAGE_NFACCTD_BASIC || BR2_PACKAGE_PMACCTD_BASIC - select BR2_COMPILE_PMACCT - -config BR2_COMPILE_PMACCT_MYSQL - tristate - default n - depends BR2_PACKAGE_NFACCTD_MYSQL || BR2_PACKAGE_PMACCTD_MYSQL - select BR2_COMPILE_PMACCT - -config BR2_COMPILE_PMACCT_PGSQL - tristate - default n - depends BR2_PACKAGE_NFACCTD_PGSQL || BR2_PACKAGE_PMACCTD_PGSQL - select BR2_COMPILE_PMACCT - -config BR2_COMPILE_PMACCT_SQLITE - tristate - default n - depends BR2_PACKAGE_NFACCTD_SQLITE || BR2_PACKAGE_PMACCTD_SQLITE - select BR2_COMPILE_PMACCT - -config BR2_COMPILE_PMACCT_CUSTOM - tristate - default n - depends BR2_PACKAGE_NFACCTD_CUSTOM || BR2_PACKAGE_PMACCTD_CUSTOM - select BR2_COMPILE_PMACCT - -choice - prompt "nfacctd......................... NetFlow accounting daemon" - tristate - default m if CONFIG_DEVEL - optional - help - - An IPv4/IPv6 Netflow accounting and aggregation daemon - - http://www.ba.cnr.it/~paolo/pmacct/ - - Depends: - - libmysqlclient (for MySQL database logging support) - - libpq (for PostgreSQL database logging support) - - libsqlite (for SQLite database logging support) - - - config BR2_PACKAGE_NFACCTD_BASIC - prompt "nfacctd....................... built without database support" - tristate - select BR2_COMPILE_PMACCT_BASIC - select BR2_PACKAGE_LIBPCAP - - config BR2_PACKAGE_NFACCTD_MYSQL - prompt "nfacctd-mysql................. built with MySQL database support" - tristate - select BR2_COMPILE_PMACCT_MYSQL - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBMYSQLCLIENT - - config BR2_PACKAGE_NFACCTD_PGSQL - prompt "nfacctd-pgsql................. built with PostgreSQL database support" - tristate - select BR2_COMPILE_PMACCT_PGSQL - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPQ - - config BR2_PACKAGE_NFACCTD_SQLITE - prompt "nfacctd-sqlite................ built with SQLite database support" - tristate - select BR2_COMPILE_PMACCT_SQLITE - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBSQLITE - - config BR2_PACKAGE_NFACCTD_CUSTOM - prompt "nfacctd-custom................ customized to your needs" - tristate - select BR2_COMPILE_PMACCT_CUSTOM - select BR2_PACKAGE_LIBPCAP - - config BR2_COMPILE_NFACCTD_ENABLE_DEBUG - prompt "debug (enable debugging options, useful for bugreports)" - bool - default n - depends BR2_PACKAGE_NFACCTD_CUSTOM - - config BR2_COMPILE_NFACCTD_ENABLE_IPV6 - prompt "IPv6 support" - bool - default n - depends BR2_PACKAGE_NFACCTD_CUSTOM - - config BR2_COMPILE_NFACCTD_WITH_MYSQL - prompt "MySQL database support" - bool - default n - depends BR2_PACKAGE_NFACCTD_CUSTOM - select BR2_PACKAGE_LIBMYSQLCLIENT - - config BR2_COMPILE_NFACCTD_WITH_PGSQL - prompt "PostgreSQL database support" - bool - default n - depends BR2_PACKAGE_NFACCTD_CUSTOM - select BR2_PACKAGE_LIBPQ - - config BR2_COMPILE_NFACCTD_WITH_SQLITE - prompt "SQLite database support" - bool - default n - depends BR2_PACKAGE_NFACCTD_CUSTOM - select BR2_PACKAGE_LIBSQLITE - -endchoice - -choice - prompt "pmacctd......................... IP accounting daemon (libpcap based)" - tristate - default m if CONFIG_DEVEL - optional - help - - An IPv4/IPv6 libpcap-based accounting and aggregation daemon - - http://www.ba.cnr.it/~paolo/pmacct/ - - Depends: - - libpcap - - libmysqlclient (for MySQL database logging support) - - libpq (for PostgreSQL database logging support) - - libsqlite (for SQLite database logging support) - - - config BR2_PACKAGE_PMACCTD_BASIC - prompt "pmacctd....................... built without database support" - tristate - select BR2_COMPILE_PMACCT_BASIC - select BR2_PACKAGE_LIBPCAP - - config BR2_PACKAGE_PMACCTD_MYSQL - prompt "pmacctd-mysql................. built with MySQL database support" - tristate - select BR2_COMPILE_PMACCT_MYSQL - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBMYSQLCLIENT - - config BR2_PACKAGE_PMACCTD_PGSQL - prompt "pmacctd-pgsql................. built with PostgreSQL database support" - tristate - select BR2_COMPILE_PMACCT_PGSQL - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPQ - - config BR2_PACKAGE_PMACCTD_SQLITE - prompt "pmacctd-sqlite................ built with SQLite database support" - tristate - select BR2_COMPILE_PMACCT_SQLITE - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBSQLITE - - config BR2_PACKAGE_PMACCTD_CUSTOM - prompt "pmacctd-custom................ customized to your needs" - tristate - select BR2_COMPILE_PMACCT_CUSTOM - select BR2_PACKAGE_LIBPCAP - - config BR2_COMPILE_PMACCTD_ENABLE_DEBUG - prompt "debug (enable debugging options, useful for bugreports)" - bool - default n - depends BR2_PACKAGE_PMACCTD_CUSTOM - - config BR2_COMPILE_PMACCTD_ENABLE_IPV6 - prompt "IPv6 support" - bool - default n - depends BR2_PACKAGE_PMACCTD_CUSTOM - - config BR2_COMPILE_PMACCTD_WITH_MYSQL - prompt "MySQL database support" - bool - default n - depends BR2_PACKAGE_PMACCTD_CUSTOM - select BR2_PACKAGE_LIBMYSQLCLIENT - - config BR2_COMPILE_PMACCTD_WITH_PGSQL - prompt "PostgreSQL database support" - bool - default n - depends BR2_PACKAGE_PMACCTD_CUSTOM - select BR2_PACKAGE_LIBPQ - - config BR2_COMPILE_PMACCTD_WITH_SQLITE - prompt "SQLite database support" - bool - default n - depends BR2_PACKAGE_PMACCTD_CUSTOM - select BR2_PACKAGE_LIBSQLITE - -endchoice - -config BR2_PACKAGE_PMACCT_CLIENT - prompt "pmacct-client................... Command-line client to gather data from the IMT plugin" - tristate - default n - select BR2_COMPILE_PMACCT - -endmenu diff --git a/openwrt/package/pmacct/Makefile b/openwrt/package/pmacct/Makefile deleted file mode 100644 index a9bd44b52b9..00000000000 --- a/openwrt/package/pmacct/Makefile +++ /dev/null @@ -1,184 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pmacct -PKG_VERSION:=0.10.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=ed510e7ee2130d1f37f27901b89e985a - -PKG_SOURCE_URL:=http://www.ba.cnr.it/~paolo/pmacct/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)rc2.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -PMACCT_BASIC_CONFIGURE_OPTS := \ - -PMACCT_MYSQL_CONFIGURE_OPTS := \ - --enable-mysql \ - --with-mysql-includes="$(STAGING_DIR)/usr/include" \ - --with-mysql-libs="$(STAGING_DIR)/usr/lib/mysql" - -PMACCT_PGSQL_CONFIGURE_OPTS := \ - --enable-pgsql \ - --with-pgsql-includes="$(STAGING_DIR)/usr/include" \ - --with-pgsql-libs="$(STAGING_DIR)/usr/lib" - -PMACCT_SQLITE_CONFIGURE_OPTS := \ - --enable-sqlite3 \ - --with-sqlite3-includes="$(STAGING_DIR)/usr/include" \ - --with-sqlite3-libs="$(STAGING_DIR)/usr/lib" - -NFACCTD_CUSTOM_CONFIGURE_OPTS := \ - -ifeq ($(BR2_PACKAGE_NFACCTD_ENABLE_DEBUG),y) -NFACCTD_CUSTOM_CONFIGURE_OPTS += --enable-debug -endif - -ifeq ($(BR2_PACKAGE_NFACCTD_ENABLE_IPV6),y) -NFACCTD_CUSTOM_CONFIGURE_OPTS += --enable-ipv6 -endif - -ifeq ($(BR2_PACKAGE_NFACCTD_WITH_MYSQL),y) -NFACCTD_CUSTOM_CONFIGURE_OPTS += $(PMACCT_MYSQL_CONFIGURE_OPTS) -endif - -ifeq ($(BR2_PACKAGE_NFACCTD_WITH_PGSQL),y) -NFACCTD_CUSTOM_CONFIGURE_OPTS += $(PMACCT_PGSQL_CONFIGURE_OPTS) -endif - -ifeq ($(BR2_PACKAGE_NFACCTD_WITH_SQLITE),y) -NFACCTD_CUSTOM_CONFIGURE_OPTS += $(PMACCT_SQLITE_CONFIGURE_OPTS) -endif - -PMACCTD_CUSTOM_CONFIGURE_OPTS := \ - -ifeq ($(BR2_PACKAGE_PMACCTD_ENABLE_DEBUG),y) -PMACCTD_CUSTOM_CONFIGURE_OPTS += --enable-debug -endif - -ifeq ($(BR2_PACKAGE_PMACCTD_ENABLE_IPV6),y) -PMACCTD_CUSTOM_CONFIGURE_OPTS += --enable-ipv6 -endif - -ifeq ($(BR2_PACKAGE_PMACCTD_WITH_MYSQL),y) -PMACCTD_CUSTOM_CONFIGURE_OPTS += $(PMACCT_MYSQL_CONFIGURE_OPTS) -endif - -ifeq ($(BR2_PACKAGE_PMACCTD_WITH_PGSQL),y) -PMACCTD_CUSTOM_CONFIGURE_OPTS += $(PMACCT_PGSQL_CONFIGURE_OPTS) -endif - -ifeq ($(BR2_PACKAGE_PMACCTD_WITH_SQLITE),y) -PMACCTD_CUSTOM_CONFIGURE_OPTS += $(PMACCT_SQLITE_CONFIGURE_OPTS) -endif - -define PKG_build - -ifneq ($(BR2_PACKAGE_$(1)),) -BUILD_TARGETS += $(PKG_BUILD_DIR)/$(2) -BUILD_TARGETS += $(PKG_BUILD_DIR)/$(3) -endif - -$(PKG_BUILD_DIR)/$(2) $(PKG_BUILD_DIR)/$(3): $(PKG_BUILD_DIR)/.prepared - -$(MAKE) -C $(PKG_BUILD_DIR) distclean - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/sbin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib/locate \ - --localstatedir=/var/lib \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --with-pcap-includes="$(STAGING_DIR)/usr/include" \ - --with-pcap-libs="$(STAGING_DIR)/usr/lib" \ - $$($(1)_CONFIGURE_OPTS) \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" - mv -f $(PKG_BUILD_DIR)/nfacctd $(PKG_BUILD_DIR)/$(2) - mv -f $(PKG_BUILD_DIR)/pmacctd $(PKG_BUILD_DIR)/$(3) - -endef - -define PKG_package - -$$(IPKG_$(1)): $(PKG_BUILD_DIR)/$(2) - install -d -m0755 $$(IDIR_$(1))/etc - install -m0644 ./files/$(3).conf $$(IDIR_$(1))/etc/ - install -d -m0755 $$(IDIR_$(1))/etc/default - install -m0644 ./files/$(3).default $$(IDIR_$(1))/etc/default/$(3) - install -d -m0755 $$(IDIR_$(1))/etc/init.d - install -m0755 ./files/$(3).init $$(IDIR_$(1))/etc/init.d/$(3) - install -d -m0755 $$(IDIR_$(1))/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/$(2) $$(IDIR_$(1))/usr/sbin/$(3) - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,NFACCTD_BASIC,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,NFACCTD_MYSQL,nfacctd-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,NFACCTD_PGSQL,nfacctd-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,NFACCTD_SQLITE,nfacctd-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,NFACCTD_CUSTOM,nfacctd-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PMACCTD_BASIC,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PMACCTD_MYSQL,pmacctd-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PMACCTD_PGSQL,pmacctd-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PMACCTD_SQLITE,pmacctd-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PMACCTD_CUSTOM,pmacctd-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PMACCT_CLIENT,pmacct-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_build,PMACCT_BASIC,nfacctd-basic,pmacctd-basic,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,PMACCT_MYSQL,nfacctd-mysql,pmacctd-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,PMACCT_PGSQL,nfacctd-pgsql,pmacctd-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,PMACCT_SQLITE,nfacctd-sqlite,pmacctd-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,NFACCTD_CUSTOM,nfacctd-custom,pmacctd-dummy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,PMACCTD_CUSTOM,nfacctd-dummy,pmacctd-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_package,NFACCTD_BASIC,nfacctd-basic,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,NFACCTD_MYSQL,nfacctd-mysql,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,NFACCTD_PGSQL,nfacctd-pgsql,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,NFACCTD_SQLITE,nfacctd-sqlite,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,NFACCTD_CUSTOM,nfacctd-custom,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,PMACCTD_BASIC,pmacctd-basic,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,PMACCTD_MYSQL,pmacctd-mysql,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,PMACCTD_PGSQL,pmacctd-pgsql,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,PMACCTD_SQLITE,pmacctd-sqlite,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_package,PMACCTD_CUSTOM,pmacctd-custom,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS) - touch $@ - -$(IPKG_PMACCT_CLIENT): - install -d -m0755 $(IDIR_PMACCT_CLIENT)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/pmacct $(IDIR_PMACCT_CLIENT)/usr/sbin/ - $(RSTRIP) $(IDIR_PMACCT_CLIENT) - $(IPKG_BUILD) $(IDIR_PMACCT_CLIENT) $(PACKAGE_DIR) diff --git a/openwrt/package/pmacct/files/nfacctd.conf b/openwrt/package/pmacct/files/nfacctd.conf deleted file mode 100644 index a9817b21853..00000000000 --- a/openwrt/package/pmacct/files/nfacctd.conf +++ /dev/null @@ -1,28 +0,0 @@ -! -! nfacctd configuration example -! -! debug: true -daemonize: true -pidfile: /var/run/nfacctd.pid -! aggregate_filter[dummy]: src net 192.168.0.0/16 -aggregate: src_host, dst_host -! plugin_buffer_size: 1024 -! nfacctd_port: 5678 -! nfacctd_time_secs: true -! nfacctd_time_new: true -plugins: memory -imt_buckets: 65537 -imt_mem_pools_size: 65536 -! imt_mem_pools_number: 0 -! plugins: mysql -! plugins: pgsql -! sql_db: pmacct -! sql_table: acct -! sql_table_version: 2 -! sql_passwd: arealsmartpwd -! sql_user: pmacct -! sql_refresh_time: 90 -! sql_optimize_clauses: true -! sql_history: 10m -! sql_history_roundoff: mh -! networks_file: ./networks.example diff --git a/openwrt/package/pmacct/files/nfacctd.default b/openwrt/package/pmacct/files/nfacctd.default deleted file mode 100644 index 9315b280c9e..00000000000 --- a/openwrt/package/pmacct/files/nfacctd.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="-f /etc/nfacctd.conf" diff --git a/openwrt/package/pmacct/files/nfacctd.init b/openwrt/package/pmacct/files/nfacctd.init deleted file mode 100644 index c38c7f14b26..00000000000 --- a/openwrt/package/pmacct/files/nfacctd.init +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -BIN=nfacctd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill -INT $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/pmacct/files/pmacctd.conf b/openwrt/package/pmacct/files/pmacctd.conf deleted file mode 100644 index 65c6387ea38..00000000000 --- a/openwrt/package/pmacct/files/pmacctd.conf +++ /dev/null @@ -1,26 +0,0 @@ -! -! pmacctd configuration example -! -! debug: true -interface: vlan1 -daemonize: true -pidfile: /var/run/pmacctd.pid -pmacctd_id: 1 -aggregate: src_host,dst_host -! aggregate: src_net,dst_net -plugins: memory -imt_buckets: 65537 -imt_mem_pools_size: 65536 -! imt_mem_pools_number: 0 -! plugins: mysql -! plugins: pgsql -! sql_db: pmacct -! sql_table: acct -! sql_table_version: 2 -! sql_passwd: arealsmartpwd -! sql_user: pmacct -! sql_refresh_time: 90 -! sql_optimize_clauses: true -! sql_history: 10m -! sql_history_roundoff: mh -! networks_file: ./networks.example diff --git a/openwrt/package/pmacct/files/pmacctd.default b/openwrt/package/pmacct/files/pmacctd.default deleted file mode 100644 index 3c06f085f67..00000000000 --- a/openwrt/package/pmacct/files/pmacctd.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="-f /etc/pmacctd.conf" diff --git a/openwrt/package/pmacct/files/pmacctd.init b/openwrt/package/pmacct/files/pmacctd.init deleted file mode 100644 index 0af1095000c..00000000000 --- a/openwrt/package/pmacct/files/pmacctd.init +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -BIN=pmacctd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill -INT $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/pmacct/ipkg/nfacctd-custom.control b/openwrt/package/pmacct/ipkg/nfacctd-custom.control deleted file mode 100644 index 096be7e04a9..00000000000 --- a/openwrt/package/pmacct/ipkg/nfacctd-custom.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: nfacctd-custom -Priority: optional -Section: net -Description: a NetFlow accounting daemon, - built with custom options -Depends: libpcap diff --git a/openwrt/package/pmacct/ipkg/nfacctd-mysql.control b/openwrt/package/pmacct/ipkg/nfacctd-mysql.control deleted file mode 100644 index e030db8fcc5..00000000000 --- a/openwrt/package/pmacct/ipkg/nfacctd-mysql.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: nfacctd-mysql -Priority: optional -Section: net -Description: a NetFlow accounting daemon, - built with MySQL database support -Depends: libmysqlclient, libpcap diff --git a/openwrt/package/pmacct/ipkg/nfacctd-pgsql.control b/openwrt/package/pmacct/ipkg/nfacctd-pgsql.control deleted file mode 100644 index 8500ff3426b..00000000000 --- a/openwrt/package/pmacct/ipkg/nfacctd-pgsql.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: nfacctd-pgsql -Priority: optional -Section: net -Description: a NetFlow accounting daemon, - built with PostgreSQL database support -Depends: libpq, libpcap diff --git a/openwrt/package/pmacct/ipkg/nfacctd-sqlite.control b/openwrt/package/pmacct/ipkg/nfacctd-sqlite.control deleted file mode 100644 index add839416b6..00000000000 --- a/openwrt/package/pmacct/ipkg/nfacctd-sqlite.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: nfacctd-sqlite -Priority: optional -Section: net -Description: a NetFlow accounting daemon, - built with SQLite database support -Depends: libsqlite, libpcap diff --git a/openwrt/package/pmacct/ipkg/nfacctd.conffiles b/openwrt/package/pmacct/ipkg/nfacctd.conffiles deleted file mode 100644 index dec6203510e..00000000000 --- a/openwrt/package/pmacct/ipkg/nfacctd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/default/nfacctd -/etc/nfacctd.conf diff --git a/openwrt/package/pmacct/ipkg/nfacctd.control b/openwrt/package/pmacct/ipkg/nfacctd.control deleted file mode 100644 index e5afbf68d3c..00000000000 --- a/openwrt/package/pmacct/ipkg/nfacctd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: nfacctd -Priority: optional -Section: net -Description: a NetFlow accounting daemon, - built without database support -Depends: libpcap diff --git a/openwrt/package/pmacct/ipkg/pmacct-client.control b/openwrt/package/pmacct/ipkg/pmacct-client.control deleted file mode 100644 index c943e731e54..00000000000 --- a/openwrt/package/pmacct/ipkg/pmacct-client.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pmacct-client -Priority: optional -Section: net -Description: a command-line client for pmacctd or nfacctd, - used to retrieve data from an active memory plugin diff --git a/openwrt/package/pmacct/ipkg/pmacctd-custom.control b/openwrt/package/pmacct/ipkg/pmacctd-custom.control deleted file mode 100644 index 0278df14269..00000000000 --- a/openwrt/package/pmacct/ipkg/pmacctd-custom.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: pmacctd-custom -Priority: optional -Section: net -Description: an IP accounting daemon, - built with custom options -Depends: libpcap diff --git a/openwrt/package/pmacct/ipkg/pmacctd-mysql.control b/openwrt/package/pmacct/ipkg/pmacctd-mysql.control deleted file mode 100644 index 2ea345fcb63..00000000000 --- a/openwrt/package/pmacct/ipkg/pmacctd-mysql.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: pmacctd-mysql -Priority: optional -Section: net -Description: an IP accounting daemon, - built with MySQL database support -Depends: libmysqlclient, libpcap diff --git a/openwrt/package/pmacct/ipkg/pmacctd-pgsql.control b/openwrt/package/pmacct/ipkg/pmacctd-pgsql.control deleted file mode 100644 index 7018c735095..00000000000 --- a/openwrt/package/pmacct/ipkg/pmacctd-pgsql.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: pmacctd-pgsql -Priority: optional -Section: net -Description: an IP accounting daemon, - built with PostgreSQL database support -Depends: libpq, libpcap diff --git a/openwrt/package/pmacct/ipkg/pmacctd-sqlite.control b/openwrt/package/pmacct/ipkg/pmacctd-sqlite.control deleted file mode 100644 index ad8f7c96f01..00000000000 --- a/openwrt/package/pmacct/ipkg/pmacctd-sqlite.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: pmacctd-sqlite -Priority: optional -Section: net -Description: an IP accounting daemon, - built with SQLite database support -Depends: libsqlite, libpcap diff --git a/openwrt/package/pmacct/ipkg/pmacctd.conffiles b/openwrt/package/pmacct/ipkg/pmacctd.conffiles deleted file mode 100644 index fa81c14cb86..00000000000 --- a/openwrt/package/pmacct/ipkg/pmacctd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/default/pmacctd -/etc/pmacctd.conf diff --git a/openwrt/package/pmacct/ipkg/pmacctd.control b/openwrt/package/pmacct/ipkg/pmacctd.control deleted file mode 100644 index 5d2cc7c4e16..00000000000 --- a/openwrt/package/pmacct/ipkg/pmacctd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: pmacctd -Priority: optional -Section: net -Description: an IP accounting daemon, - built without database support -Depends: libpcap diff --git a/openwrt/package/popt/Config.in b/openwrt/package/popt/Config.in deleted file mode 100644 index a24882b6c3e..00000000000 --- a/openwrt/package/popt/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_COMPILE_POPT - tristate - depends BR2_PACKAGE_LIBPOPT - -config BR2_PACKAGE_LIBPOPT - prompt "libpopt........................... Command line option parsing library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_POPT - help - A command line option parsing library - - ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/ - diff --git a/openwrt/package/popt/Makefile b/openwrt/package/popt/Makefile deleted file mode 100644 index 75ea1a082d2..00000000000 --- a/openwrt/package/popt/Makefile +++ /dev/null @@ -1,81 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=popt -PKG_VERSION:=1.7 -PKG_RELEASE:=4 -PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9 - -PKG_SOURCE_URL:=ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBPOPT,libpopt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBPOPT): - install -d -m0755 $(IDIR_LIBPOPT)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(IDIR_LIBPOPT)/usr/lib/ - $(RSTRIP) $(IDIR_LIBPOPT) - $(IPKG_BUILD) $(IDIR_LIBPOPT) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libpopt.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $(STAGING_DIR)/usr/lib/libpopt.so - -install-dev: $(STAGING_DIR)/usr/lib/libpopt.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/popt.h \ - $(STAGING_DIR)/usr/lib/libpopt.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/popt/ipkg/libpopt.control b/openwrt/package/popt/ipkg/libpopt.control deleted file mode 100644 index 280d67344f5..00000000000 --- a/openwrt/package/popt/ipkg/libpopt.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libpopt -Priority: optional -Section: libs -Description: a command line option parsing library diff --git a/openwrt/package/portmap/Config.in b/openwrt/package/portmap/Config.in deleted file mode 100644 index 63b73789b80..00000000000 --- a/openwrt/package/portmap/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_PORTMAP - prompt "portmap........................... RPC Portmapper" - tristate - default m if CONFIG_DEVEL - help - The RPC Portmapper (used by the NFS Server) - diff --git a/openwrt/package/portmap/Makefile b/openwrt/package/portmap/Makefile deleted file mode 100644 index 20bba966dcb..00000000000 --- a/openwrt/package/portmap/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=portmap -PKG_VERSION:=5beta -PKG_RELEASE:=2 -PKG_MD5SUM:=781e16ed4487c4caa082c6fef09ead4f - -# space separated list or special @SF for sourceforge projects -PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PORTMAP,portmap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \ - WRAP_LIB="-L$(STAGING_DIR)/usr/lib -lwrap" \ - all - touch $@ - -$(IPKG_PORTMAP): - install -d -m0755 $(IDIR_PORTMAP)/etc/init.d - install -m0755 ./files/portmap.init $(IDIR_PORTMAP)/etc/init.d/portmap - ln -sf portmap $(IDIR_PORTMAP)/etc/init.d/S59portmap - install -d -m0755 $(IDIR_PORTMAP)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/portmap $(IDIR_PORTMAP)/usr/sbin/ - $(RSTRIP) $(IDIR_PORTMAP) - $(IPKG_BUILD) $(IDIR_PORTMAP) $(PACKAGE_DIR) diff --git a/openwrt/package/portmap/files/portmap.init b/openwrt/package/portmap/files/portmap.init deleted file mode 100644 index 31a3399e93c..00000000000 --- a/openwrt/package/portmap/files/portmap.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -BIN=portmap -DEFAULT=/etc/default/$BIN -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - $BIN $OPTIONS - ;; - *) - echo "usage: $0 start" - exit 1 -esac - -exit $? diff --git a/openwrt/package/portmap/ipkg/portmap.control b/openwrt/package/portmap/ipkg/portmap.control deleted file mode 100644 index 5d19907506f..00000000000 --- a/openwrt/package/portmap/ipkg/portmap.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: portmap -Priority: optional -Section: net -Description: The RPC Portmapper - Portmap is a server that converts RPC (Remote Procedure Call) program - numbers into DARPA protocol port numbers. It must be running in order - to make RPC calls. - . - Services that use RPC include NFS and NIS. diff --git a/openwrt/package/portmap/patches/debian-subset.patch b/openwrt/package/portmap/patches/debian-subset.patch deleted file mode 100644 index c5fecf7c4cb..00000000000 --- a/openwrt/package/portmap/patches/debian-subset.patch +++ /dev/null @@ -1,531 +0,0 @@ ---- portmap-5.orig/Makefile -+++ portmap-5/Makefile -@@ -8,7 +8,7 @@ - # if you disagree. See `man 3 syslog' for examples. Some syslog versions - # do not provide this flexibility. - # --FACILITY=LOG_MAIL -+FACILITY=LOG_DAEMON - - # To disable tcp-wrapper style access control, comment out the following - # macro definitions. Access control can also be turned off by providing -@@ -16,7 +16,8 @@ - # daemon, is always treated as an authorized host. - - HOSTS_ACCESS= -DHOSTS_ACCESS --WRAP_LIB = $(WRAP_DIR)/libwrap.a -+#WRAP_LIB = $(WRAP_DIR)/libwrap.a -+WRAP_LIB = -lwrap - - # Comment out if your RPC library does not allocate privileged ports for - # requests from processes with root privilege, or the new portmap will -@@ -71,7 +72,7 @@ - # With verbose logging on, HP-UX 9.x and AIX 4.1 leave zombies behind when - # SIGCHLD is not ignored. Enable next macro for a fix. - # --# ZOMBIES = -DIGNORE_SIGCHLD # AIX 4.x, HP-UX 9.x -+ZOMBIES = -DIGNORE_SIGCHLD # AIX 4.x, HP-UX 9.x - - # Uncomment the following macro if your system does not have u_long. - # -@@ -81,11 +82,14 @@ - # libwrap.a object library. WRAP_DIR should specify the directory with - # that library. - --WRAP_DIR= ../tcp_wrappers -+WRAP_DIR= $(TCPD_DIR) - - # Auxiliary object files that may be missing from your C library. - # --AUX = daemon.o strerror.o -+#AUX = daemon.o strerror.o -+ -+# glibc has strerror() (it's POSIX) and daemon() (when compiling -D_BSD_SOURCE) -+AUX = - - # NEXTSTEP is a little different. The following seems to work with NS 3.2 - # -@@ -99,22 +103,31 @@ - - # Comment out if your compiler talks ANSI and understands const - # --CONST = -Dconst= -+#CONST = -Dconst= - - ### End of configurable stuff. - ############################## - -+GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h) -+ -+ifeq ($(GLIBC),0) -+LIBS += # -lbsd -+else -+LIBS += -lnsl -+endif -+ -+ - SHELL = /bin/sh - --COPT = $(CONST) -Dperror=xperror $(HOSTS_ACCESS) $(CHECK_PORT) \ -+COPT = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \ - $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) \ - $(LOOPBACK) $(SETPGRP) --CFLAGS = $(COPT) -O $(NSARCHS) -+CFLAGS = -Wall $(COPT) -O2 $(NSARCHS) - OBJECTS = portmap.o pmap_check.o from_local.o $(AUX) - - all: portmap pmap_dump pmap_set - --portmap: $(OBJECTS) $(WRAP_DIR)/libwrap.a -+portmap: $(OBJECTS) # $(WRAP_DIR)/libwrap.a - $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS) - - pmap_dump: pmap_dump.c -@@ -129,6 +142,17 @@ - get_myaddress: get_myaddress.c - cc $(CFLAGS) -DTEST -o $@ get_myaddress.c $(LIBS) - -+install: all -+ install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin -+ install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin -+ install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin -+ install -o root -g root -m 0644 portmap.8 ${BASEDIR}/usr/share/man/man8 -+ install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8 -+ install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8 -+ cat BLURB >${BASEDIR}/usr/share/doc/portmap/portmapper.txt -+ gzip -9f ${BASEDIR}/usr/share/doc/portmap/portmapper.txt -+ -+ - lint: - lint $(COPT) $(OBJECTS:%.o=%.c) - ---- portmap-5.orig/daemon.c -+++ portmap-5/daemon.c -@@ -36,11 +36,8 @@ - #endif /* LIBC_SCCS and not lint */ - - #include -- --/* From unistd.h */ --#define STDIN_FILENO 0 --#define STDOUT_FILENO 1 --#define STDERR_FILENO 2 -+#include -+#include - - /* From paths.h */ - #define _PATH_DEVNULL "/dev/null" ---- portmap-5.orig/pmap_check.c -+++ portmap-5/pmap_check.c -@@ -41,10 +41,14 @@ - #include - #include - #include -+#include - #ifdef SYSV40 - #include - #include - #endif -+#include -+#include -+#include - - extern char *inet_ntoa(); - -@@ -101,15 +105,25 @@ - * Give up root privileges so that we can never allocate a privileged - * port when forwarding an rpc request. - */ -+ if (setgid(1) == -1) { -+ syslog(LOG_ERR, "setgid(1) failed: %m"); -+ exit(1); -+ } -+ if (setgroups(0, 0) == -1) { -+ syslog(LOG_ERR, "setgroups(0, 0) failed: %m"); -+ exit(1); -+ } - if (setuid(1) == -1) { - syslog(LOG_ERR, "setuid(1) failed: %m"); - exit(1); - } -+ - (void) signal(SIGINT, toggle_verboselog); - } - - /* check_default - additional checks for NULL, DUMP, GETPORT and unknown */ - -+int - check_default(addr, proc, prog) - struct sockaddr_in *addr; - u_long proc; -@@ -128,6 +142,7 @@ - - /* check_privileged_port - additional checks for privileged-port updates */ - -+int - check_privileged_port(addr, proc, prog, port) - struct sockaddr_in *addr; - u_long proc; -@@ -173,6 +188,7 @@ - - #else - -+int - check_setunset(addr, proc, prog, port) - struct sockaddr_in *addr; - u_long proc; -@@ -197,6 +213,7 @@ - - /* check_callit - additional checks for forwarded requests */ - -+int - check_callit(addr, proc, prog, aproc) - struct sockaddr_in *addr; - u_long proc; -@@ -249,13 +266,13 @@ - }; - struct proc_map *procp; - static struct proc_map procmap[] = { -- PMAPPROC_CALLIT, "callit", -- PMAPPROC_DUMP, "dump", -- PMAPPROC_GETPORT, "getport", -- PMAPPROC_NULL, "null", -- PMAPPROC_SET, "set", -- PMAPPROC_UNSET, "unset", -- 0, 0, -+ {PMAPPROC_CALLIT, "callit"}, -+ {PMAPPROC_DUMP, "dump"}, -+ {PMAPPROC_GETPORT, "getport"}, -+ {PMAPPROC_NULL, "null"}, -+ {PMAPPROC_SET, "set"}, -+ {PMAPPROC_UNSET, "unset"}, -+ {0, 0}, - }; - - /* -@@ -269,7 +286,7 @@ - - if (prognum == 0) { - progname = ""; -- } else if (rpc = getrpcbynumber((int) prognum)) { -+ } else if ((rpc = getrpcbynumber((int) prognum))) { - progname = rpc->r_name; - } else { - sprintf(progname = progbuf, "%lu", prognum); ---- portmap-5.orig/from_local.c -+++ portmap-5/from_local.c -@@ -51,6 +51,9 @@ - #include - #include - #include -+#include -+#include -+#include - - #ifndef TRUE - #define TRUE 1 -@@ -96,6 +99,7 @@ - - /* find_local - find all IP addresses for this host */ - -+int - find_local() - { - struct ifconf ifc; -@@ -154,6 +158,7 @@ - - /* from_local - determine whether request comes from the local system */ - -+int - from_local(addr) - struct sockaddr_in *addr; - { ---- portmap-5.orig/pmap_dump.c -+++ portmap-5/pmap_dump.c -@@ -23,6 +23,20 @@ - - static char *protoname(); - -+#ifndef INADDR_LOOPBACK -+#define INADDR_LOOPBACK ntohl(inet_addr("127.0.0.1")) -+#endif -+ -+static void get_myloopaddress(addrp) -+struct sockaddr_in *addrp; -+{ -+ memset((char *) addrp, 0, sizeof(*addrp)); -+ addrp->sin_family = AF_INET; -+ addrp->sin_port = htons(PMAPPORT); -+ addrp->sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+} -+ -+int - main(argc, argv) - int argc; - char **argv; -@@ -31,7 +45,7 @@ - register struct pmaplist *list; - register struct rpcent *rpc; - -- get_myaddress(&addr); -+ get_myloopaddress(&addr); - - for (list = pmap_getmaps(&addr); list; list = list->pml_next) { - rpc = getrpcbynumber((int) list->pml_map.pm_prog); ---- portmap-5.orig/pmap_set.c -+++ portmap-5/pmap_set.c -@@ -17,6 +17,10 @@ - #include - #include - -+int parse_line(char *buf, u_long *prog, u_long *vers, int *prot, -+ unsigned *port); -+ -+int - main(argc, argv) - int argc; - char **argv; -@@ -40,6 +44,7 @@ - - /* parse_line - convert line to numbers */ - -+int - parse_line(buf, prog, vers, prot, port) - char *buf; - u_long *prog; -@@ -47,9 +52,9 @@ - int *prot; - unsigned *port; - { -- char proto_name[BUFSIZ]; -+ char proto_name[256]; - -- if (sscanf(buf, "%lu %lu %s %u", prog, vers, proto_name, port) != 4) { -+ if (sscanf(buf, "%lu %lu %255s %u", prog, vers, proto_name, port) != 4) { - return (0); - } - if (strcmp(proto_name, "tcp") == 0) { -@@ -65,3 +70,4 @@ - } - return (0); - } -+ ---- portmap-5.orig/portmap.c -+++ portmap-5/portmap.c -@@ -80,6 +80,10 @@ - * Mountain View, California 94043 - */ - -+#if defined(__GLIBC__) -+#define _BSD_SOURCE 1 /* for daemon(3) */ -+#include -+#endif /* __GLIBC__ */ - #include - #include - #include -@@ -91,11 +95,13 @@ - #include - #include - #include --#ifdef SYSV40 - #include --#endif -+#include -+#include -+#include -+#include -+#include - --extern char *strerror(); - #include - - #ifndef LOG_PERROR -@@ -124,7 +130,6 @@ - static void callit(); - struct pmaplist *pmaplist; - int debugging = 0; --extern int errno; - - #include "pmap_check.h" - -@@ -148,6 +153,7 @@ - #endif - #endif - -+int - main(argc, argv) - int argc; - char **argv; -@@ -157,22 +163,31 @@ - struct sockaddr_in addr; - int len = sizeof(struct sockaddr_in); - register struct pmaplist *pml; -+ char *chroot_path = NULL; -+ struct in_addr bindaddr; -+ int have_bindaddr = 0; - -- while ((c = getopt(argc, argv, "dv")) != EOF) { -+ while ((c = getopt(argc, argv, "dt:vi:")) != EOF) { - switch (c) { - - case 'd': - debugging = 1; - break; -- -+ case 't': -+ chroot_path = optarg; -+ break; - case 'v': - verboselog = 1; - break; -- -+ case 'i': -+ have_bindaddr = inet_aton(optarg, &bindaddr); -+ break; - default: -- (void) fprintf(stderr, "usage: %s [-dv]\n", argv[0]); -+ (void) fprintf(stderr, "usage: %s [-dv] [-t path] [-i address]\n", argv[0]); - (void) fprintf(stderr, "-d: debugging mode\n"); -+ (void) fprintf(stderr, "-t path: chroot into path\n"); - (void) fprintf(stderr, "-v: verbose logging\n"); -+ (void) fprintf(stderr, "-i address: bind to address\n"); - exit(1); - } - } -@@ -201,6 +216,9 @@ - addr.sin_addr.s_addr = 0; - addr.sin_family = AF_INET; - addr.sin_port = htons(PMAPPORT); -+ if (have_bindaddr) -+ memcpy(&addr.sin_addr, &bindaddr, sizeof(bindaddr)); -+ - if (bind(sock, (struct sockaddr *)&addr, len) != 0) { - syslog(LOG_ERR, "cannot bind udp: %m"); - exit(1); -@@ -227,7 +245,7 @@ - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof on); - #endif - if (bind(sock, (struct sockaddr *)&addr, len) != 0) { -- syslog(LOG_ERR, "cannot bind udp: %m"); -+ syslog(LOG_ERR, "cannot bind tcp: %m"); - exit(1); - } - if ((xprt = svctcp_create(sock, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE)) -@@ -280,6 +298,14 @@ - (void)svc_register(xprt, PMAPPROG, PMAPVERS, reg_service, FALSE); - - /* additional initializations */ -+ if (chroot_path) -+ { -+ if (-1 == chroot(chroot_path)) -+ { -+ syslog(LOG_ERR, "couldn't do chroot"); -+ exit(1); -+ } -+ } - check_startup(); - #ifdef IGNORE_SIGCHLD /* Lionel Cons */ - (void)signal(SIGCHLD, SIG_IGN); -@@ -350,7 +376,7 @@ - */ - /* remote host authorization check */ - check_default(svc_getcaller(xprt), rqstp->rq_proc, (u_long) 0); -- if (!svc_sendreply(xprt, xdr_void, (caddr_t)0) && debugging) { -+ if (!svc_sendreply(xprt, (xdrproc_t) xdr_void, (caddr_t)0) && debugging) { - abort(); - } - break; -@@ -359,7 +385,7 @@ - /* - * Set a program,version to port mapping - */ -- if (!svc_getargs(xprt, xdr_pmap, ®)) -+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) ®)) - svcerr_decode(xprt); - else { - /* reject non-local requests, protect priv. ports */ -@@ -401,7 +427,7 @@ - ans = 1; - } - done: -- if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) && -+ if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&ans)) && - debugging) { - (void) fprintf(stderr, "svc_sendreply\n"); - abort(); -@@ -413,7 +439,7 @@ - /* - * Remove a program,version to port mapping. - */ -- if (!svc_getargs(xprt, xdr_pmap, ®)) -+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) ®)) - svcerr_decode(xprt); - else { - ans = 0; -@@ -447,7 +473,7 @@ - prevpml->pml_next = pml; - free(t); - } -- if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) && -+ if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&ans)) && - debugging) { - (void) fprintf(stderr, "svc_sendreply\n"); - abort(); -@@ -459,7 +485,7 @@ - /* - * Lookup the mapping for a program,version and return its port - */ -- if (!svc_getargs(xprt, xdr_pmap, ®)) -+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) ®)) - svcerr_decode(xprt); - else { - /* remote host authorization check */ -@@ -474,7 +500,7 @@ - port = fnd->pml_map.pm_port; - else - port = 0; -- if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&port)) && -+ if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&port)) && - debugging) { - (void) fprintf(stderr, "svc_sendreply\n"); - abort(); -@@ -486,7 +512,7 @@ - /* - * Return the current set of mapped program,version - */ -- if (!svc_getargs(xprt, xdr_void, NULL)) -+ if (!svc_getargs(xprt, (xdrproc_t) xdr_void, (caddr_t) NULL)) - svcerr_decode(xprt); - else { - /* remote host authorization check */ -@@ -497,7 +523,7 @@ - } else { - p = pmaplist; - } -- if ((!svc_sendreply(xprt, xdr_pmaplist, -+ if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist, - (caddr_t)&p)) && debugging) { - (void) fprintf(stderr, "svc_sendreply\n"); - abort(); -@@ -645,7 +671,7 @@ - timeout.tv_sec = 5; - timeout.tv_usec = 0; - a.rmt_args.args = buf; -- if (!svc_getargs(xprt, xdr_rmtcall_args, &a)) -+ if (!svc_getargs(xprt, (xdrproc_t) xdr_rmtcall_args, (caddr_t) &a)) - return; - /* host and service access control */ - if (!check_callit(svc_getcaller(xprt), -@@ -674,9 +700,9 @@ - au->aup_uid, au->aup_gid, au->aup_len, au->aup_gids); - } - a.rmt_port = (u_long)port; -- if (clnt_call(client, a.rmt_proc, xdr_opaque_parms, &a, -- xdr_len_opaque_parms, &a, timeout) == RPC_SUCCESS) { -- svc_sendreply(xprt, xdr_rmtcall_result, (caddr_t)&a); -+ if (clnt_call(client, a.rmt_proc, (xdrproc_t) xdr_opaque_parms, (char*) &a, -+ (xdrproc_t) xdr_len_opaque_parms, (char*) &a, timeout) == RPC_SUCCESS) { -+ svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (caddr_t)&a); - } - AUTH_DESTROY(client->cl_auth); - clnt_destroy(client); diff --git a/openwrt/package/portsentry/Config.in b/openwrt/package/portsentry/Config.in deleted file mode 100644 index f7acc185349..00000000000 --- a/openwrt/package/portsentry/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_PORTSENTRY - prompt "portsentry........................ Portscan protection utility" - tristate - default m if CONFIG_DEVEL - help - Software for protection against port scans - - http://sourceforge.net/projects/sentrytools - diff --git a/openwrt/package/portsentry/Makefile b/openwrt/package/portsentry/Makefile deleted file mode 100644 index 18cfec71e6b..00000000000 --- a/openwrt/package/portsentry/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=portsentry -PKG_VERSION:=1.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=3ebd3618ba9abfea2525e236bd44cebd - -PKG_SOURCE_URL:=@SF/sentrytools -PKG_SOURCE:=$(PKG_NAME)-1.2.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_beta - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PORTSENTRY,portsentry,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) linux - touch $@ - -$(IPKG_PORTSENTRY): - mkdir -p $(IDIR_PORTSENTRY)/usr/bin - mkdir -p $(IDIR_PORTSENTRY)/etc - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(IDIR_PORTSENTRY)/etc/ - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_PORTSENTRY)/usr/bin/ - $(STRIP) $(IDIR_PORTSENTRY)/usr/bin/* - $(IPKG_BUILD) $(IDIR_PORTSENTRY) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/portsentry/ipkg/portsentry.conffiles b/openwrt/package/portsentry/ipkg/portsentry.conffiles deleted file mode 100644 index 9c0810ccbe4..00000000000 --- a/openwrt/package/portsentry/ipkg/portsentry.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/portsentry.conf diff --git a/openwrt/package/portsentry/ipkg/portsentry.control b/openwrt/package/portsentry/ipkg/portsentry.control deleted file mode 100644 index f05b282df01..00000000000 --- a/openwrt/package/portsentry/ipkg/portsentry.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: portsentry -Priority: optional -Section: net -Description: Software for protection against port scans diff --git a/openwrt/package/portsentry/patches/100-conf_location.patch b/openwrt/package/portsentry/patches/100-conf_location.patch deleted file mode 100644 index 457c9c827ba..00000000000 --- a/openwrt/package/portsentry/patches/100-conf_location.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- portsentry/portsentry_config.h 2003-05-23 20:10:13.000000000 +0200 -+++ portsentry.old/portsentry_config.h 2005-07-09 21:21:15.000000000 +0200 -@@ -22,7 +22,7 @@ - - /* These are probably ok. Be sure you change the Makefile if you */ - /* change the path */ --#define CONFIG_FILE "/usr/local/psionic/portsentry/portsentry.conf" -+#define CONFIG_FILE "/etc/portsentry.conf" - - /* The location of Wietse Venema's TCP Wrapper hosts.deny file */ - #define WRAPPER_HOSTS_DENY "/etc/hosts.deny" diff --git a/openwrt/package/portsentry/patches/101-postsentry_c.patch b/openwrt/package/portsentry/patches/101-postsentry_c.patch deleted file mode 100644 index e36bb2a123b..00000000000 --- a/openwrt/package/portsentry/patches/101-postsentry_c.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- portsentry/portsentry.c 2003-05-23 20:10:13.000000000 +0200 -+++ portsentry.old/portsentry.c 2005-07-09 21:57:24.000000000 +0200 -@@ -1581,8 +1581,7 @@ - Usage (void) - { - printf ("PortSentry - Port Scan Detector.\n"); -- printf ("Copyright 1997-2003 Craig H. Rowland \n"); -+ printf ("Copyright 1997-2003 Craig H. Rowland \n"); - printf ("Licensing restrictions apply. Please see documentation\n"); - printf ("Version: %s\n\n", VERSION); - #ifdef SUPPORT_STEALTH diff --git a/openwrt/package/postgresql/Config.in b/openwrt/package/postgresql/Config.in deleted file mode 100644 index 776dccc4e80..00000000000 --- a/openwrt/package/postgresql/Config.in +++ /dev/null @@ -1,61 +0,0 @@ -config BR2_COMPILE_POSTGRESQL - tristate - default n - depends BR2_PACKAGE_LIBPQ - -config BR2_PACKAGE_LIBPQ - prompt "libpq............................. PostgreSQL client library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_POSTGRESQL - help - PostgreSQL is an object-relational database management system (ORDBMS) - based on POSTGRES, Version 4.2, developed at the University of - California at Berkeley Computer Science Department. POSTGRES pioneered - many concepts that only became available in some commercial database - systems much later. - - PostgreSQL is an open-source descendant of this original Berkeley code. - It supports SQL92 and SQL99 and offers many modern features: - - * complex queries - * foreign keys - * triggers - * views - * transactional integrity - * multiversion concurrency control - - http://www.postgresql.org/ - - This package contains the shared client library, needed by other programs. - -config BR2_PACKAGE_PGSQL_CLI - prompt "pgsql-cli....................... Command Line Interface (CLI) to PostgreSQL databases" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBPQ - help - PostgreSQL is an object-relational database management system (ORDBMS) - based on POSTGRES, Version 4.2, developed at the University of - California at Berkeley Computer Science Department. POSTGRES pioneered - many concepts that only became available in some commercial database - systems much later. - - PostgreSQL is an open-source descendant of this original Berkeley code. - It supports SQL92 and SQL99 and offers many modern features: - - * complex queries - * foreign keys - * triggers - * views - * transactional integrity - * multiversion concurrency control - - http://www.postgresql.org/ - - This package contains a terminal-based front-end to PostgreSQL. It enables - you to type in queries interactively, issue them to PostgreSQL, and see the - query results. Alternatively, input can be from a file. In addition, it - provides a number of meta-commands and various shell-like features to - facilitate writing scripts and automating a wide variety of tasks. - diff --git a/openwrt/package/postgresql/Makefile b/openwrt/package/postgresql/Makefile deleted file mode 100644 index 2cb3f6d0e37..00000000000 --- a/openwrt/package/postgresql/Makefile +++ /dev/null @@ -1,127 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=postgresql -PKG_VERSION:=7.4.9 -PKG_RELEASE:=1 -PKG_MD5SUM:=d7cf0f0a0e1dda19268f55cb1e124c77 - -PKG_SOURCE_URL:=\ - ftp://ftp3.us.postgresql.org/pub/postgresql/source/v$(PKG_VERSION)/ \ - ftp://ftp.br.postgresql.org/pub/PostgreSQL/source/v$(PKG_VERSION)/ \ - ftp://ftp.au.postgresql.org/pub/postgresql/source/v$(PKG_VERSION)/ \ - ftp://ftp.tw.postgresql.org/pub/postgresql/source/v$(PKG_VERSION)/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBPQ,libpq,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PGSQL_CLI,pgsql-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -# ./configure advertise "--infodir", but does not support it, replaced with "--docdir" -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ - CPPFLAGS="$$CPPFLAGS -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --docdir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - --disable-integer-datetimes \ - --disable-rpath \ - --without-java \ - --without-krb4 \ - --without-krb5 \ - --without-openssl \ - --without-pam \ - --without-perl \ - --without-python \ - --without-readline \ - --without-rendezvous \ - --without-tcl \ - --without-tk \ - --with-zlib="yes" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C "$(PKG_BUILD_DIR)/src/include" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - $(MAKE) -C "$(PKG_BUILD_DIR)/src/interfaces/libpq" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - $(MAKE) -C "$(PKG_BUILD_DIR)/src/bin/pg_config" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - includedir="$(STAGING_DIR)/usr/include" \ - libdir="$(STAGING_DIR)/usr/lib" \ - all install - $(MAKE) -C "$(PKG_BUILD_DIR)/src/bin/psql" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBPQ): - install -d -m0755 $(IDIR_LIBPQ)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.so.* $(IDIR_LIBPQ)/usr/lib/ - $(RSTRIP) $(IDIR_LIBPQ) - $(IPKG_BUILD) $(IDIR_LIBPQ) $(PACKAGE_DIR) - -$(IPKG_PGSQL_CLI): - install -d -m0755 $(IDIR_PGSQL_CLI)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/psql $(IDIR_PGSQL_CLI)/usr/bin/ - $(RSTRIP) $(IDIR_PGSQL_CLI) - $(IPKG_BUILD) $(IDIR_PGSQL_CLI) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libpq.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/pg_config $(STAGING_DIR)/usr/bin/ - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libpq $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/libpq-fe.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/postgres_ext.h $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/postgresql $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libpq.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/bin/pg_config \ - $(STAGING_DIR)/usr/include/libpq \ - $(STAGING_DIR)/usr/include/libpq-fe.h \ - $(STAGING_DIR)/usr/include/pg_config.h \ - $(STAGING_DIR)/usr/include/postgres_ext.h \ - $(STAGING_DIR)/usr/include/postgresql \ - $(STAGING_DIR)/usr/lib/libpq.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/postgresql/ipkg/libpq.control b/openwrt/package/postgresql/ipkg/libpq.control deleted file mode 100644 index ff669c6cb99..00000000000 --- a/openwrt/package/postgresql/ipkg/libpq.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libpq -Priority: optional -Section: libs -Description: PostgreSQL client library diff --git a/openwrt/package/postgresql/ipkg/pgsql-cli.control b/openwrt/package/postgresql/ipkg/pgsql-cli.control deleted file mode 100644 index 4ce03e45cc5..00000000000 --- a/openwrt/package/postgresql/ipkg/pgsql-cli.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pgsql-cli -Priority: optional -Section: libs -Description: Command Line Interface (CLI) to PostgreSQL databases -Depends: libpq diff --git a/openwrt/package/postgresql/patches/100-debian-12asmconstraints b/openwrt/package/postgresql/patches/100-debian-12asmconstraints deleted file mode 100644 index f43eedc80a9..00000000000 --- a/openwrt/package/postgresql/patches/100-debian-12asmconstraints +++ /dev/null @@ -1,21 +0,0 @@ -diff -ruN postgresql-7.4.7-old/src/include/storage/s_lock.h postgresql-7.4.7/src/include/storage/s_lock.h ---- postgresql-7.4.7-old/src/include/storage/s_lock.h 2004-06-15 16:09:30.000000000 +0200 -+++ postgresql-7.4.7/src/include/storage/s_lock.h 2004-06-15 16:19:02.000000000 +0200 -@@ -125,7 +125,7 @@ - __asm__ __volatile__( - " xchg4 %0=%1,%2 \n" - : "=r"(ret), "=m"(*lock) --: "r"(1), "1"(*lock) -+: "r"(1), "m"(*lock) - : "memory"); - - return (int) ret; -@@ -294,7 +294,7 @@ - " tas %1 \n" - " sne %0 \n" - : "=d"(rv), "=m"(*lock) --: "1"(*lock) -+: "m"(*lock) - : "cc"); - - return rv; diff --git a/openwrt/package/postgresql/patches/101-debian-27dbf2pg-textfield b/openwrt/package/postgresql/patches/101-debian-27dbf2pg-textfield deleted file mode 100644 index a4507710f0c..00000000000 --- a/openwrt/package/postgresql/patches/101-debian-27dbf2pg-textfield +++ /dev/null @@ -1,14 +0,0 @@ -diff -ruN postgresql-7.4.7-old/contrib/dbase/dbf2pg.c postgresql-7.4.7/contrib/dbase/dbf2pg.c ---- postgresql-7.4.7-old/contrib/dbase/dbf2pg.c 2004-10-31 20:09:10.923855000 +0100 -+++ postgresql-7.4.7/contrib/dbase/dbf2pg.c 2004-10-31 20:11:24.676521696 +0100 -@@ -324,6 +324,10 @@ - case 'L': - strcat(query, " char"); - break; -+ -+ case 'M': -+ strcat(query, " text"); -+ break; - } - } - diff --git a/openwrt/package/postgresql/patches/102-debian-30libpq b/openwrt/package/postgresql/patches/102-debian-30libpq deleted file mode 100644 index 245b97fac77..00000000000 --- a/openwrt/package/postgresql/patches/102-debian-30libpq +++ /dev/null @@ -1,33 +0,0 @@ -diff -ruN postgresql-7.4.7-old/src/interfaces/libpq/Makefile postgresql-7.4.7/src/interfaces/libpq/Makefile ---- postgresql-7.4.7-old/src/interfaces/libpq/Makefile 2003-08-23 05:21:59.000000000 +0100 -+++ postgresql-7.4.7/src/interfaces/libpq/Makefile 2003-08-29 18:35:25.000000000 +0100 -@@ -32,7 +32,7 @@ - SHLIB_LINK += $(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl, $(LIBS)) $(THREAD_LIBS) - - --all: all-lib -+all: all-lib libpq3-config - - # Shared library stuff - include $(top_srcdir)/src/Makefile.shlib -@@ -58,6 +58,8 @@ - encnames.c wchar.c : % : $(backend_src)/utils/mb/% - rm -f $@ && $(LN_S) $< . - -+libpq3-config: -+ sed -e "s|%LIBRARIES%|$(SHLIB_LINK)|" libpq3-config - - install: all installdirs install-lib - $(INSTALL_DATA) $(srcdir)/libpq-fe.h $(DESTDIR)$(includedir) -@@ -73,3 +75,4 @@ - - clean distclean maintainer-clean: clean-lib - rm -f $(OBJS) crypt.c getaddrinfo.c inet_aton.c snprintf.c strerror.c path.c thread.c dllist.c md5.c ip.c encnames.c wchar.c -+ rm -f libpq3-config -diff -ruN postgresql-7.4.7-old/src/interfaces/libpq/libpq3-config.in postgresql-7.4.7/src/interfaces/libpq/libpq3-config.in ---- postgresql-7.4.7-old/src/interfaces/libpq/libpq3-config.in 1970-01-01 01:00:00.000000000 +0100 -+++ postgresql-7.4.7/src/interfaces/libpq/libpq3-config.in 2003-08-29 18:34:25.000000000 +0100 -@@ -0,0 +1,3 @@ -+#!/bin/bash -+ -+echo %LIBRARIES% diff --git a/openwrt/package/postgresql/patches/750-configure-honor-cppflags.patch b/openwrt/package/postgresql/patches/750-configure-honor-cppflags.patch deleted file mode 100644 index 897c6c05a9d..00000000000 --- a/openwrt/package/postgresql/patches/750-configure-honor-cppflags.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -ruN postgresql-7.4.6-old/src/template/linux postgresql-7.4.6-new/src/template/linux ---- postgresql-7.4.6-old/src/template/linux 2003-10-09 18:52:45.000000000 +0200 -+++ postgresql-7.4.6-new/src/template/linux 2005-04-13 03:12:49.000000000 +0200 -@@ -1,5 +1,5 @@ - # Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise --CPPFLAGS="-D_GNU_SOURCE" -+CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - - THREAD_SUPPORT=yes - NEED_REENTRANT_FUNCS=yes # Debian kernel 2.2 2003-09-27 diff --git a/openwrt/package/pptpd/Config.in b/openwrt/package/pptpd/Config.in deleted file mode 100644 index e75d71a0330..00000000000 --- a/openwrt/package/pptpd/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_PPTPD - prompt "pptpd............................. PPTP (Point-to-Point Tunneling Protocol) server" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_GRE - select BR2_PACKAGE_PPP - help - A Point-to-Point Tunneling Protocol server - - http://poptop.sourceforge.net/ - diff --git a/openwrt/package/pptpd/Makefile b/openwrt/package/pptpd/Makefile deleted file mode 100644 index 32e301d75d9..00000000000 --- a/openwrt/package/pptpd/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pptpd -PKG_VERSION:=1.2.3 -PKG_RELEASE:=2 -PKG_MD5SUM:=a521e40ca304b0c125cc25f9b9d03324 - -PKG_SOURCE_URL:=@SF/poptop -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PPTPD,pptpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-pppd-ip-alloc \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - CFLAGS="$(TARGET_CFLAGS) -DSBINDIR=\\\"/usr/sbin\\\"" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - INSTALL="install" \ - all install - touch $@ - -$(IPKG_PPTPD): - install -d -m0755 $(IDIR_PPTPD)/etc - install -m0644 ./files/pptpd.conf $(IDIR_PPTPD)/etc/ - install -d -m0755 $(IDIR_PPTPD)/etc/init.d - install -m0755 ./files/pptpd.init $(IDIR_PPTPD)/etc/init.d/pptpd - install -d -m0755 $(IDIR_PPTPD)/etc/ppp - install -m0644 ./files/options.pptpd $(IDIR_PPTPD)/etc/ppp/ - install -d -m0755 $(IDIR_PPTPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpd $(IDIR_PPTPD)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpctrl $(IDIR_PPTPD)/usr/sbin/ - $(RSTRIP) $(IDIR_PPTPD) - $(IPKG_BUILD) $(IDIR_PPTPD) $(PACKAGE_DIR) diff --git a/openwrt/package/pptpd/files/options.pptpd b/openwrt/package/pptpd/files/options.pptpd deleted file mode 100644 index 5dd2daf7974..00000000000 --- a/openwrt/package/pptpd/files/options.pptpd +++ /dev/null @@ -1,23 +0,0 @@ -#debug -#logfile /tmp/pptp-server.log -172.16.1.1: -auth -name "pptp-server" -lcp-echo-failure 3 -lcp-echo-interval 60 -default-asyncmap -mtu 1482 -mru 1482 -nobsdcomp -nodeflate -#noproxyarp -#nomppc -mppe required,no40,no56,stateless -require-mschap-v2 -refuse-chap -refuse-mschap -refuse-eap -refuse-pap -#ms-dns 172.16.1.1 -#plugin radius.so -#radius-config-file /etc/radius.conf diff --git a/openwrt/package/pptpd/files/pptpd.conf b/openwrt/package/pptpd/files/pptpd.conf deleted file mode 100644 index 354745f592f..00000000000 --- a/openwrt/package/pptpd/files/pptpd.conf +++ /dev/null @@ -1,5 +0,0 @@ -#debug -option /etc/ppp/options.pptpd -speed 115200 -stimeout 10 -#localip & remoteip are not needed, ip management is done by pppd diff --git a/openwrt/package/pptpd/files/pptpd.init b/openwrt/package/pptpd/files/pptpd.init deleted file mode 100644 index a76f739fd4a..00000000000 --- a/openwrt/package/pptpd/files/pptpd.init +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -BIN=pptpd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - for m in arc4 sha1 slhc ppp_generic ppp_async ppp_mppe_mppc; do - insmod $m >/dev/null 2>&1 - done - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/pptpd/ipkg/pptpd.conffiles b/openwrt/package/pptpd/ipkg/pptpd.conffiles deleted file mode 100644 index c5afda91fb7..00000000000 --- a/openwrt/package/pptpd/ipkg/pptpd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/ppp/options.pptpd -/etc/pptpd.conf diff --git a/openwrt/package/pptpd/ipkg/pptpd.control b/openwrt/package/pptpd/ipkg/pptpd.control deleted file mode 100644 index 135fa944c50..00000000000 --- a/openwrt/package/pptpd/ipkg/pptpd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pptpd -Priority: optional -Section: net -Description: a Point-to-Point Tunneling Protocol (PPTP) server -Depends: ppp, kmod-crypto, kmod-mppe, kmod-ppp diff --git a/openwrt/package/privoxy/Config.in b/openwrt/package/privoxy/Config.in deleted file mode 100644 index ba1e4b061e5..00000000000 --- a/openwrt/package/privoxy/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_PRIVOXY - prompt "privoxy........................... web proxy with advanced filtering capabilities" - tristate - default m if CONFIG_DEVEL - help - - Privoxy is a web proxy with advanced filtering capabilities for - protecting privacy, modifying web page content, managing cookies, - controlling access, and removing ads, banners, pop-ups and other - obnoxious Internet junk. Privoxy has a very flexible configuration - and can be customized to suit individual needs and tastes. Privoxy - has application for both stand-alone systems and multi-user networks. - - http://www.privoxy.org/ diff --git a/openwrt/package/privoxy/Makefile b/openwrt/package/privoxy/Makefile deleted file mode 100644 index 24c05252465..00000000000 --- a/openwrt/package/privoxy/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=privoxy -PKG_VERSION:=3.0.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=b0710be8af09409bfb03f52523a17010 - -PKG_SOURCE_URL:=@SF/ijbswa -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable-src.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-stable -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PRIVOXY,privoxy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - autoheader && autoconf && \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - --disable-static \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - SPECIAL_CFLAGS="-pthread -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $(PKG_BUILD_DIR)/.built - -$(IPKG_PRIVOXY): - install -d -m0755 $(IDIR_PRIVOXY)/usr/sbin $(IDIR_PRIVOXY)/etc/privoxy - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/privoxy $(IDIR_PRIVOXY)/usr/sbin/ - $(RSTRIP) $(IDIR_PRIVOXY) - $(IPKG_BUILD) $(IDIR_PRIVOXY) $(PACKAGE_DIR) diff --git a/openwrt/package/privoxy/ipkg/privoxy.control b/openwrt/package/privoxy/ipkg/privoxy.control deleted file mode 100644 index 2d6ba8a773b..00000000000 --- a/openwrt/package/privoxy/ipkg/privoxy.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: privoxy -Version: 3.0.3 -Section: net -Description: web proxy with advanced filtering capabilities -Priority: optional diff --git a/openwrt/package/privoxy/patches/100-crosscompile.patch b/openwrt/package/privoxy/patches/100-crosscompile.patch deleted file mode 100644 index c2b6738b2ff..00000000000 --- a/openwrt/package/privoxy/patches/100-crosscompile.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nur privoxy-3.0.3-stable/configure.in privoxy-3.0.3-stable.patched/configure.in ---- privoxy-3.0.3-stable/configure.in 2004-01-30 10:26:03.000000000 +0100 -+++ privoxy-3.0.3-stable.patched/configure.in 2006-03-13 20:50:57.000000000 +0100 -@@ -1092,7 +1092,8 @@ - AC_PROG_GCC_TRADITIONAL - dnl uncommenting does not work for swa. suse linux - dnl AC_FUNC_MALLOC --AC_FUNC_SETPGRP -+dnl uncommenting does not work for openwrt -+dnl AC_FUNC_SETPGRP - AC_TYPE_SIGNAL - dnl uncommenting does not work for swa. suse linux - dnl AC_FUNC_STAT diff --git a/openwrt/package/privoxy/patches/101-destdir.patch b/openwrt/package/privoxy/patches/101-destdir.patch deleted file mode 100644 index 9e22ab670d0..00000000000 --- a/openwrt/package/privoxy/patches/101-destdir.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -Nur privoxy-3.0.3-stable/GNUmakefile.in privoxy-3.0.3-stable.patched/GNUmakefile.in ---- privoxy-3.0.3-stable/GNUmakefile.in 2004-01-31 02:15:33.000000000 +0100 -+++ privoxy-3.0.3-stable.patched/GNUmakefile.in 2006-03-13 21:39:29.000000000 +0100 -@@ -55,17 +55,17 @@ - USER = @USER@ - GROUP = @GROUP@ - --prefix = @prefix@ --exec_prefix = @exec_prefix@ --CONF_BASE = @sysconfdir@ --SBIN_DEST = @sbindir@ --MAN_DIR = @mandir@ --MAN_DEST = $(MAN_DIR)/man1 --SHARE_DEST = @datadir@ --DOC_DEST = $(SHARE_DEST)/doc/privoxy --VAR_DEST = @localstatedir@ --LOGS_DEST = $(VAR_DEST)/log/privoxy --PIDS_DEST = $(VAR_DEST)/run -+prefix = $(DESTDIR)@prefix@ -+exec_prefix = $(DESTDIR)@exec_prefix@ -+CONF_BASE = $(DESTDIR)@sysconfdir@ -+SBIN_DEST = $(DESTDIR)@sbindir@ -+MAN_DIR = $(DESTDIR)@mandir@ -+MAN_DEST = $(DESTDIR)$(MAN_DIR)/man1 -+SHARE_DEST = $(DESTDIR)@datadir@ -+DOC_DEST = $(DESTDIR)$(SHARE_DEST)/doc/privoxy -+VAR_DEST = $(DESTDIR)@localstatedir@ -+LOGS_DEST = $(DESTDIR)$(VAR_DEST)/log/privoxy -+PIDS_DEST = $(DESTDIR)$(VAR_DEST)/run - - # if $prefix = /usr/local then the default CONFDEST change from - # CONF_DEST = $(CONF_BASE) to CONF_DEST = $(CONF_BASE)/privoxy diff --git a/openwrt/package/procmail/Config.in b/openwrt/package/procmail/Config.in deleted file mode 100644 index 548b8e6001d..00000000000 --- a/openwrt/package/procmail/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_PROCMAIL - prompt "procmail.......................... mail processing tool" - tristate - default n - help - Procmail is able to process and classify incoming mail into - different mail boxes. - - Very useful in conjunction with mutt. - - http://www.procmail.org diff --git a/openwrt/package/procmail/Makefile b/openwrt/package/procmail/Makefile deleted file mode 100644 index ace0a0bf7b3..00000000000 --- a/openwrt/package/procmail/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=procmail -PKG_VERSION:=3.22 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.procmail.org/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=1678ea99b973eb77eda4ecf6acae53f1 -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PROCMAIL,procmail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR)/src -f ../Makefile.openwrt \ - CC=$(TARGET_CC) - - touch $@ - -$(IPKG_PROCMAIL): - mkdir -p $(IDIR_PROCMAIL)/usr/bin - $(CP) $(PKG_BUILD_DIR)/src/procmail $(IDIR_PROCMAIL)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/src/formail $(IDIR_PROCMAIL)/usr/bin/ - $(RSTRIP) $(IDIR_PROCMAIL) - $(IPKG_BUILD) $(IDIR_PROCMAIL) $(PACKAGE_DIR) diff --git a/openwrt/package/procmail/ipkg/procmail.control b/openwrt/package/procmail/ipkg/procmail.control deleted file mode 100644 index 6a87f9ff5e3..00000000000 --- a/openwrt/package/procmail/ipkg/procmail.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: procmail -Priority: optional -Section: text -Description: Mail processing tool diff --git a/openwrt/package/procmail/patches/promail_openwrt.patch b/openwrt/package/procmail/patches/promail_openwrt.patch deleted file mode 100644 index c33d8260534..00000000000 --- a/openwrt/package/procmail/patches/promail_openwrt.patch +++ /dev/null @@ -1,51 +0,0 @@ -This patch is required to make procmail cross compile - it tries to run some automatic tests which -obviously do not work in a cross compiled environment. - - -diff -Naur procmail-3.22_orig/autoconf.h procmail-3.22/autoconf.h ---- procmail-3.22_orig/autoconf.h 1970-01-01 10:00:00.000000000 +1000 -+++ procmail-3.22/autoconf.h 2006-03-23 12:15:36.000000000 +1100 -@@ -0,0 +1,21 @@ -+/* This file was automagically generated by autoconf */ -+ -+/* 5 moves in 64 steps of size 16384 when reallocing */ -+#define NOpw_class -+#define NOstrlcat -+#define NOsetrgid -+#define MAX_argc 7588 -+/* Your system's strstr() is 1.12 times FASTER than my C-routine */ -+#define UDP_protocolno 17 -+#define BIFF_serviceport "512" -+#define IP_localhost {127,0,0,1} -+#define MAILSPOOLDIR "/var/spool/mail/" -+#define SENDMAIL "/usr/sbin/sendmail" -+#define CF_no_procmail_yet -+#define buggy_SENDMAIL -+#define defPATH "PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11" -+#define defSPATH "PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11" -+#define PM_VERSION "3.22" -+/* Hotwire LOCKINGTEST=100 */ -+/* Procmail will lock via: dotlocking, fcntl() */ -+/* autoconf completed */ -diff -Naur procmail-3.22_orig/Makefile.openwrt procmail-3.22/Makefile.openwrt ---- procmail-3.22_orig/Makefile.openwrt 1970-01-01 10:00:00.000000000 +1000 -+++ procmail-3.22/Makefile.openwrt 2006-03-23 12:15:36.000000000 +1100 -@@ -0,0 +1,18 @@ -+PM_OBJ=cstdio.o common.o exopen.o goodies.o locking.o \ -+ mailfold.o foldinfo.o misc.o pipes.o regexp.o robust.o \ -+ sublib.o acommon.o mcommon.o lastdirsep.o authenticate.o \ -+ lmtp.o memblk.o variables.o from.o comsat.o -+ -+FM_OBJ=common.o fields.o formisc.o sublib.o ecommon.o \ -+ acommon.o -+ -+LDFLAGS = -lm -lnsl -ldl -lc -+CFLAGS = -Os -DPROCMAIL -+ -+all: procmail formail -+ -+procmail: procmail.o $(PM_OBJ) -+ $(CC) $(CFLAGS) $@.o $(PM_OBJ) -o $@ $(LDFLAGS) -+ -+formail: formail.o $(FM_OBJ) -+ $(CC) $(CFLAGS) $@.o $(FM_OBJ) -o $@ $(LDFLAGS) diff --git a/openwrt/package/psybnc/Config.in b/openwrt/package/psybnc/Config.in deleted file mode 100644 index 6c76b68e1e8..00000000000 --- a/openwrt/package/psybnc/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_PSYBNC - prompt "psybnc............................ An IRC-Bouncer with many features" - tristate - default m if CONFIG_DEVEL - help - psyBNC is an easy-to-use, multi-user, permanent - IRC-Bouncer with many features. Some of its features - vhost- and relay support to connected bouncers and an - extensive online help system. Many other helpful - functions are included. - - http://www.psybnc.info/ - diff --git a/openwrt/package/psybnc/Makefile b/openwrt/package/psybnc/Makefile deleted file mode 100644 index b4f9b284c1f..00000000000 --- a/openwrt/package/psybnc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=psybnc -PKG_VERSION:=2.3.2-7 -PKG_RELEASE:=1 -PKG_MD5SUM:=4b893a92f914813450e0921b2894ad6c - -PKG_SOURCE_URL:=http://www.psybnc.info/download/beta/ -PKG_SOURCE:=psyBNC-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PSYBNC,psybnc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - HOSTCC="$(HOSTCC)" \ - all - touch $@ - -$(IPKG_PSYBNC): - install -d -m0755 $(IDIR_PSYBNC)/usr/share/psybnc/lang/ - install -d -m0755 $(IDIR_PSYBNC)/usr/share/psybnc/log/ - install -d -m0755 $(IDIR_PSYBNC)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/psybnc $(IDIR_PSYBNC)/usr/share/psybnc/ - install -m0600 $(PKG_BUILD_DIR)/psybnc.conf $(IDIR_PSYBNC)/usr/share/psybnc/ - install -m0644 $(PKG_BUILD_DIR)/lang/english.lng $(IDIR_PSYBNC)/usr/share/psybnc/lang/ - install -m0755 $(PKG_BUILD_DIR)/psybnc.sh $(IDIR_PSYBNC)/usr/sbin/psybnc - $(RSTRIP) $(IDIR_PSYBNC) - $(IPKG_BUILD) $(IDIR_PSYBNC) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/psybnc/ipkg/psybnc.control b/openwrt/package/psybnc/ipkg/psybnc.control deleted file mode 100644 index 92e92ce7cf4..00000000000 --- a/openwrt/package/psybnc/ipkg/psybnc.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: psybnc -Priority: optional -Section: net -Description: IRC-Bouncer with many features diff --git a/openwrt/package/psybnc/patches/Makefile.patch b/openwrt/package/psybnc/patches/Makefile.patch deleted file mode 100644 index 2db956072c3..00000000000 --- a/openwrt/package/psybnc/patches/Makefile.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- psybnc/Makefile 2005-06-04 20:22:45.000000000 +0200 -+++ psybnc_patched/Makefile 2005-11-04 11:50:28.879157626 +0100 -@@ -1,16 +1,16 @@ --CC = gcc -+HOSTCC = gcc - CCFLAGS = - - all: $(OBJS) - @echo Initializing bouncer compilation - @echo [*] Running Conversion Tool for older psyBNC Data. -- @$(CC) tools/convconf.c -o tools/convconf -+ @$(HOSTCC) tools/convconf.c -o tools/convconf - @tools/convconf - @echo [*] Running Autoconfig. -- @$(CC) -I. tools/autoconf.c -o tools/autoconf -+ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf - @tools/autoconf - @echo [*] Compiling MakeSalt for Encryption.. -- @$(CC) -I. -o makesalt tools/makesalt.c -+ @$(HOSTCC) -I. -o makesalt tools/makesalt.c - @./makesalt - @echo [*] Compiling Bouncer.. - @make -f makefile.out -@@ -20,14 +20,14 @@ - menuconfig: - @echo Initializing Menu-Configuration - @echo [*] Running Conversion Tool for older psyBNC Data. -- @$(CC) tools/convconf.c -o tools/convconf -+ @$(HOSTCC) tools/convconf.c -o tools/convconf - @tools/convconf - @echo [*] Running Autoconfig. -- @$(CC) -I. tools/autoconf.c -o tools/autoconf -+ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf - @tools/autoconf - @echo [*] Creating Menu, please wait. - @echo This needs the 'ncurses' library. If it is not available, menuconf wont work. If you are using 'curses', use make menuconfig-curses instead. -- @$(CC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -I. -lncurses -lm -o menuconf/menuconf 2>/dev/null -+ @$(HOSTCC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -I. -lncurses -lm -o menuconf/menuconf 2>/dev/null - @menuconf/menuconf - @clear - @echo Now compile psyBNC using make, if not yet compiled, or if Options were changed. -@@ -36,14 +36,14 @@ - menuconfig-curses: - @echo Initializing Menu-Configuration using Curses - @echo [*] Running Conversion Tool for older psyBNC Data. -- @$(CC) tools/convconf.c -o tools/convconf -+ @$(HOSTCC) tools/convconf.c -o tools/convconf - @tools/convconf - @echo [*] Running Autoconfig. -- @$(CC) -I. tools/autoconf.c -o tools/autoconf -+ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf - @tools/autoconf - @echo [*] Creating Menu, please wait. - @echo This needs the 'curses' library. If it is not available, menuconf wont work. -- @$(CC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -DNONCURSES -I. -lcurses -lm -o menuconf/menuconf 2>/dev/null -+ @$(HOSTCC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -DNONCURSES -I. -lcurses -lm -o menuconf/menuconf 2>/dev/null - @menuconf/menuconf - @clear - @echo Now compile psyBNC using make, if not yet compiled, or if Options were changed. diff --git a/openwrt/package/psybnc/patches/psybnc.conf.patch b/openwrt/package/psybnc/patches/psybnc.conf.patch deleted file mode 100644 index 98e9ad5a9ba..00000000000 --- a/openwrt/package/psybnc/patches/psybnc.conf.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Naur psybnc/psybnc.conf psybnc_finish/psybnc.conf ---- psybnc/psybnc.conf 1970-01-01 01:00:00.000000000 +0100 -+++ psybnc_finish/psybnc.conf 2005-11-03 18:27:44.726264185 +0100 -@@ -0,0 +1,10 @@ -+PSYBNC.SYSTEM.PORT1=50001 -+PSYBNC.SYSTEM.ME=psybnc_mipsel -+PSYBNC.SYSTEM.HOST1=* -+PSYBNC.HOSTALLOWS.ENTRY0=*;* -+USER1.USER.NICK=change_me -+USER1.USER.USER=psybnc_admin -+USER1.USER.PASS=change_me -+USER1.USER.RIGHTS=1 -+USER1.USER.VLINK=0 -+USER1.USER.LOGIN=psybnc_admin diff --git a/openwrt/package/psybnc/patches/psybnc.patch b/openwrt/package/psybnc/patches/psybnc.patch deleted file mode 100644 index 32f2165ea06..00000000000 --- a/openwrt/package/psybnc/patches/psybnc.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff -ur psybnc/config.h psybnc_finish/config.h ---- psybnc/config.h 2005-06-04 20:22:45.000000000 +0200 -+++ psybnc_finish/config.h 2005-11-03 17:05:40.802998216 +0100 -@@ -1,40 +1,7 @@ --/* $Id: config.h,v 1.2 2005/06/04 18:05:33 hisi Exp $ */ - /* - * Configuration file for psyBNC, created by menuconf - */ - --/* Encryption */ -- --#define CRYPT -- --/* Encryption Type*/ -- --#define BLOWFISH -- --/* Allow Translation */ -- --#define TRANSLATE -- --/* Allow internal network */ -- --#define INTNET -- --/* Allow traffic logging */ -- --#define TRAFFICLOG -- --/* Allow linkage of bouncers */ -- --#define LINKAGE -- --/* Allow the dcc File-Functions */ -- --#define DCCFILES -- --/* Pipe dcc Chats */ -- --#define DCCCHAT -- - /* Allow to add more users */ - - #define MULTIUSER -@@ -47,28 +14,27 @@ - - #define MAXCONN 99 - --/* Allow the usage of scripts */ -+/* Use blocking DNS */ - --#define SCRIPTING -+#define BLOCKDNS - - /* Allow multiple irc connections per user */ - - #define NETWORK - --/* Allow Proxy Support */ -+/* The logging level */ - --#define PROXYS -+#define LOGLEVEL 2 - --/* The logging level */ -+/* The ctcp Version reply */ - --#define LOGLEVEL 0 -+#define CTCPVERSION "psyBNC 2.3.2-7 running on mipsel, ported by piie visit www.linuX-gamers.net" - --/* SSL-Security */ -+/* The Path to SSL */ - --#define SSLSEC 2 -+#define SSLPATH "/tmp/" - --/* Blocking DNS is preferred. Non Blocking DNS is experimental */ -+/* SSL-Security */ -+ -+#define SSLSEC 0 - --#ifndef BLOCKDNS --#define BLOCKDNS --#endif -diff -ur psybnc/tools/autoconf.c psybnc_finish/tools/autoconf.c ---- psybnc/tools/autoconf.c 2005-06-04 20:22:45.000000000 +0200 -+++ psybnc_finish/tools/autoconf.c 2005-10-29 14:46:49.000000000 +0200 -@@ -425,7 +425,7 @@ - printf("Can't create makefile.out .. aborting\n"); - exit(0x1); - } -- fprintf(makefile,"CC = gcc\n"); -+ fprintf(makefile,"CC = mipsel-linux-gcc\n"); - fprintf(makefile,"SRC = src/\n"); - #ifdef BOUNDCHECK - fprintf(makefile,"CFLAGS = -O -fbounds-checking -fno-builtin\n"); -@@ -450,7 +450,7 @@ - fprintf(makefile,"\n"); - fprintf(makefile,"all: $(OBJS)\n"); - fprintf(makefile," $(CC) -o $(TARGET) $(CFLAGS) $(OBJS) $(LIBS)\n"); -- fprintf(makefile," @strip $(TARGET)\n"); -+ /*fprintf(makefile," @strip $(TARGET)\n");*/ - if(ssl==0) - { - if(!fexists("key/psybnc.cert.pem")) /* only create, if not exist */ diff --git a/openwrt/package/psybnc/patches/startscript.patch b/openwrt/package/psybnc/patches/startscript.patch deleted file mode 100644 index 635213db7bb..00000000000 --- a/openwrt/package/psybnc/patches/startscript.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur psybnc/psybnc.sh psybnc_patched/psybnc.sh ---- psybnc/psybnc.sh 1970-01-01 01:00:00.000000000 +0100 -+++ psybnc_finish/psybnc.sh 2005-11-04 12:51:26.478557377 +0100 -@@ -0,0 +1,12 @@ -+#!/bin/sh -+ -+PDIR=$(pwd); -+cd /usr/share/psybnc; -+./psybnc "$@"; -+cd "$PDIR"; -+ -+echo; -+echo; -+echo "Configuration is located at /usr/share/psybnc/psybnc.conf"; -+echo "everything can be configured within your chatclient,"; -+echo "after logging in as psybnc_admin ( /bhelp shows bnc help )"; diff --git a/openwrt/package/ptunnel/Config.in b/openwrt/package/ptunnel/Config.in deleted file mode 100644 index bea6e010e75..00000000000 --- a/openwrt/package/ptunnel/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_PTUNNEL - prompt "ptunnel........................... Tunnel TCP connections over ICMP packets" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPTHREAD - help - ptunnel is an application that allows you to reliably tunnel TCP connections to - a remote host using ICMP echo request and reply packets, commonly known as ping - requests and replies. It acts as a proxy and can handle sockets and secured - identification. - - http://www.cs.uit.no/~daniels/PingTunnel/ - diff --git a/openwrt/package/ptunnel/Makefile b/openwrt/package/ptunnel/Makefile deleted file mode 100644 index 4a2a3fe63ff..00000000000 --- a/openwrt/package/ptunnel/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ptunnel -PKG_VERSION:=0.61 -PKG_RELEASE:=1 -PKG_MD5SUM:=b45f73875f2af48f101816672f83a5fe - -PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/ptunnel/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PTUNNEL,ptunnel,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - BUILD_CC=$(TARGET_CC) \ - HOSTCC=$(HOSTCC) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_linux_vers=2 \ - td_cv_buggygetaddrinfo="no" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_PTUNNEL): - install -m0755 -d $(IDIR_PTUNNEL)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(IDIR_PTUNNEL)/usr/sbin/ - $(RSTRIP) $(IDIR_PTUNNEL) - $(IPKG_BUILD) $(IDIR_PTUNNEL) $(PACKAGE_DIR) diff --git a/openwrt/package/ptunnel/ipkg/ptunnel.control b/openwrt/package/ptunnel/ipkg/ptunnel.control deleted file mode 100644 index 0020f1377cc..00000000000 --- a/openwrt/package/ptunnel/ipkg/ptunnel.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ptunnel -Priority: optional -Section: net -Description: Tunnel TCP connections over ICMP packets -Depends: libpcap, libpthread diff --git a/openwrt/package/pwlib/Config.in b/openwrt/package/pwlib/Config.in deleted file mode 100644 index 1ad54294356..00000000000 --- a/openwrt/package/pwlib/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_PWLIB - prompt "pwlib............................. Portable Windows library" - tristate - select BR2_PACKAGE_LIBPTHREAD - default n - help - Portable Windows library diff --git a/openwrt/package/pwlib/Makefile b/openwrt/package/pwlib/Makefile deleted file mode 100644 index cb933e1db9c..00000000000 --- a/openwrt/package/pwlib/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pwlib -PKG_VERSION:=cvs-20051227 -PKG_RELEASE:=1 -PKG_MD5SUM:=7d5b8e9ab61a05658a5630f91505420d - -PKG_SOURCE_URL:=http://trash.uid0.hu/openwrt -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PWLIB,pwlib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - $(TARGET_CONFIGURE_OPTS) \ - ./configure \ - --prefix=$(STAGING_DIR) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --enable-openh323 \ - --disable-openldap \ - --disable-openssl \ - --disable-ftp \ - --disable-qos \ - --disable-expat \ - --disable-jabber \ - --disable-xmlrpc \ - --disable-ipv6 \ - --disable-sdl \ - --disable-video \ - --disable-socks \ - --disable-ftp \ - --disable-snmp \ - --disable-telnet \ - --disable-serial - --disable-pop3smtp \ - --disable-http \ - --disable-httpsvc - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - all install - touch $@ diff --git a/openwrt/package/pwlib/ipkg/pwlib.control b/openwrt/package/pwlib/ipkg/pwlib.control deleted file mode 100644 index b573a956b1c..00000000000 --- a/openwrt/package/pwlib/ipkg/pwlib.control +++ /dev/null @@ -1,11 +0,0 @@ -Package: pwlib -Priority: optional -Section: admin -Description: Portable Windows Library - "PWLib is a moderately large class library that has its genesis - many years ago asa method to product applications to run on both M - icrosoft Windows and Unix X-Windows systems. - [...] - Classes for I/O portability, multi-threading portability, aid in - producing unix daemons and NT services portably and all - sorts of internet protocols were added over the years." \ No newline at end of file diff --git a/openwrt/package/pwlib/patches/002-lib_mak.patch b/openwrt/package/pwlib/patches/002-lib_mak.patch deleted file mode 100644 index 43018bdd60c..00000000000 --- a/openwrt/package/pwlib/patches/002-lib_mak.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- pwlib-cvs-20051227/make/lib.mak.orig 2005-09-25 12:51:23.000000000 +0200 -+++ pwlib-cvs-20051227/make/lib.mak 2005-12-30 01:18:21.000000000 +0100 -@@ -201,7 +201,7 @@ - LDSOOPTS += -Wl,--kill-at - else - ifneq ($(OSTYPE),Darwin) -- LDSOOPTS += -Wl,-soname,$(LIB_SONAME) -+ LDSOOPTS += -soname,$(LIB_SONAME) - endif - endif - LD = $(CPLUS) diff --git a/openwrt/package/quagga/Config.in b/openwrt/package/quagga/Config.in deleted file mode 100644 index 758faebf346..00000000000 --- a/openwrt/package/quagga/Config.in +++ /dev/null @@ -1,66 +0,0 @@ -menu "quagga............................ The Quagga Software Routing Suite" - -config BR2_PACKAGE_QUAGGA - prompt "quagga............................ The Quagga Software Routing Suite" - tristate - default m if CONFIG_DEVEL - help - A routing software package that provides TCP/IP based routing services - with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2, - OSPFv3, BGP-4, and BGP-4+ - - http://www.quagga.net/ - -config BR2_PACKAGE_QUAGGA_BGPD - prompt "quagga-bgpd..................... BGPv4, BGPv4+, BGPv4- routing engine" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_QUAGGA - help - A BGPv4, BGPv4+, BGPv4- routing engine for use with Quagga routing - software. - -config BR2_PACKAGE_QUAGGA_OSPFD - prompt "quagga-ospfd.................... OSPFv2 routing engine" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_QUAGGA - help - An OSPFv2 (IPv4) routing engine for use with Quagga routing software. - -config BR2_PACKAGE_QUAGGA_OSPF6D - prompt "quagga-ospf6d................... OSPFv3 routing engine" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_QUAGGA - help - An OSPFv3 (IPv6) routing engine for use with Quagga routing software. - -config BR2_PACKAGE_QUAGGA_RIPD - prompt "quagga-ripd..................... RIP routing engine" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_QUAGGA - help - A RIP (IPv4) routing engine for use with Quagga routing software. - -config BR2_PACKAGE_QUAGGA_RIPNGD - prompt "quagga-ripngd................... RIPNG routing engine" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_QUAGGA - help - A RIPNG (IPv6) routing engine for use with Quagga routing software. - -config BR2_PACKAGE_QUAGGA_VTYSH - prompt "quagga-vtysh.................... integrated shell for Quagga routing software" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_QUAGGA - select BR2_PACKAGE_LIBREADLINE - select BR2_PACKAGE_LIBNCURSES - help - vtysh lets you interact with all the Quagga routing daemons - at once in an integrated shell. - -endmenu diff --git a/openwrt/package/quagga/Makefile b/openwrt/package/quagga/Makefile deleted file mode 100644 index 8b855558070..00000000000 --- a/openwrt/package/quagga/Makefile +++ /dev/null @@ -1,125 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=quagga -PKG_VERSION:=0.98.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=ec09c1ec624aea98e18aa19282666784 - -PKG_SOURCE_URL:=http://www.quagga.net/download/ \ - http://www.de.quagga.net/download/ \ - http://www.uk.quagga.net/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,QUAGGA,quagga,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,QUAGGA_BGPD,quagga-bgpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,QUAGGA_OSPFD,quagga-ospfd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,QUAGGA_OSPF6D,quagga-ospf6d,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,QUAGGA_RIPD,quagga-ripd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,QUAGGA_RIPNGD,quagga-ripngd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,QUAGGA_VTYSH,quagga-vtysh,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var/run/quagga \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/quagga \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --disable-static \ - --enable-ipv6 \ - --enable-vtysh \ - --enable-user=quagga \ - --enable-group=quagga \ - --enable-multipath=8 \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - all install - touch $@ - -$(IPKG_QUAGGA): - install -d -m0755 $(IDIR_QUAGGA)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(IDIR_QUAGGA)/usr/lib/ - install -d -m0755 $(IDIR_QUAGGA)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(IDIR_QUAGGA)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(IDIR_QUAGGA)/usr/sbin/ - # avoid /etc being set to 0750 - install -d -m0755 $(IDIR_QUAGGA)/etc/quagga/ - chmod 0750 $(IDIR_QUAGGA)/etc/quagga/ - install -d -m0755 $(IDIR_QUAGGA)/etc/init.d/ - install -m0755 ./files/quagga.init $(IDIR_QUAGGA)/etc/init.d/quagga - ln -sf quagga $(IDIR_QUAGGA)/etc/init.d/S49quagga - install -d -m0755 $(IDIR_QUAGGA)/var/run/quagga - $(RSTRIP) $(IDIR_QUAGGA) - $(IPKG_BUILD) $(IDIR_QUAGGA) $(PACKAGE_DIR) - -$(IPKG_QUAGGA_BGPD): - install -d -m0755 $(IDIR_QUAGGA_BGPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(IDIR_QUAGGA_BGPD)/usr/sbin/ - $(RSTRIP) $(IDIR_QUAGGA_BGPD) - $(IPKG_BUILD) $(IDIR_QUAGGA_BGPD) $(PACKAGE_DIR) - -$(IPKG_QUAGGA_OSPFD): - install -d -m0755 $(IDIR_QUAGGA_OSPFD)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(IDIR_QUAGGA_OSPFD)/usr/lib/ - install -d -m0755 $(IDIR_QUAGGA_OSPFD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(IDIR_QUAGGA_OSPFD)/usr/sbin/ - $(RSTRIP) $(IDIR_QUAGGA_OSPFD) - $(IPKG_BUILD) $(IDIR_QUAGGA_OSPFD) $(PACKAGE_DIR) - -$(IPKG_QUAGGA_OSPF6D): - install -d -m0755 $(IDIR_QUAGGA_OSPF6D)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(IDIR_QUAGGA_OSPF6D)/usr/sbin/ - $(RSTRIP) $(IDIR_QUAGGA_OSPF6D) - $(IPKG_BUILD) $(IDIR_QUAGGA_OSPF6D) $(PACKAGE_DIR) - -$(IPKG_QUAGGA_RIPD): - install -d -m0755 $(IDIR_QUAGGA_RIPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(IDIR_QUAGGA_RIPD)/usr/sbin/ - $(RSTRIP) $(IDIR_QUAGGA_RIPD) - $(IPKG_BUILD) $(IDIR_QUAGGA_RIPD) $(PACKAGE_DIR) - -$(IPKG_QUAGGA_RIPNGD): - install -d -m0755 $(IDIR_QUAGGA_RIPNGD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(IDIR_QUAGGA_RIPNGD)/usr/sbin/ - $(RSTRIP) $(IDIR_QUAGGA_RIPNGD) - $(IPKG_BUILD) $(IDIR_QUAGGA_RIPNGD) $(PACKAGE_DIR) - -$(IPKG_QUAGGA_VTYSH): - install -d -m0755 $(IDIR_QUAGGA_VTYSH)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(IDIR_QUAGGA_VTYSH)/usr/bin/ - $(RSTRIP) $(IDIR_QUAGGA_VTYSH) - $(IPKG_BUILD) $(IDIR_QUAGGA_VTYSH) $(PACKAGE_DIR) diff --git a/openwrt/package/quagga/files/quagga.init b/openwrt/package/quagga/files/quagga.init deleted file mode 100644 index 01f8d7137d1..00000000000 --- a/openwrt/package/quagga/files/quagga.init +++ /dev/null @@ -1,333 +0,0 @@ -#!/bin/sh -# -# quagga Starts/stops quagga daemons and watchquagga. -# Create a daemon.conf file to have that routing daemon -# started/stopped automagically when using this script -# without any daemon names as args. -# If watchquagga is available, it will also be -# started/stopped if the script is called without -# any daemon names. -# - -ME=$(basename $0) - -usage() { - echo "Usage: ${ME} {start|stop|restart} [daemon ...]" - exit 2 -} - -if [ -z "$1" ] -then - usage -else - COMMAND=$1 -fi -shift -ARG_DAEMONS=$* -BINDIR=/usr/sbin -CONFDIR=/etc/quagga -STATEDIR=/var/run/quagga -DAEMONS="zebra ripd ripngd ospfd ospf6d bgpd" -DAEMON_FLAGS=-d -WATCHQUAGGA_FLAGS="-d -z -T 60 -R" -WATCHQUAGGA_CMD="$0 watchrestart" -if [ ${COMMAND} != "watchrestart" ] -then - DAEMONS="${DAEMONS} watchquagga" -fi -DAEMONS_STARTSEQ=${DAEMONS} - -reverse() -{ - local revlist r - revlist= - for r - do - revlist="$r $revlist" - done - echo $revlist -} - -DAEMONS_STOPSEQ=$(reverse ${DAEMONS_STARTSEQ}) - -#pidof() { -# ps ax | awk 'match($5, "(^|/)'"$1"'$") > 0 { printf " %s", $1 }' -#} - -quit() { - echo "${ME}: $1" - exit 0 -} - -die() { - echo "${ME}: $1" - exit 1 -} - -is_in() { - local i - for i in $2 - do - [ "$1" = "$i" ] && return 0 - done - return 1 -} - -select_subset() { - local unknown i j - unknown= - RESULT= - for i in $1 - do - is_in $i "$2" || unknown="$unknown $i" - done - if [ -n "$unknown" ] - then - RESULT=$unknown - return 1 - else - for j in $2 - do - is_in $j "$1" && RESULT="$RESULT $j" - done - return 0 - fi -} - -# check command - -case ${COMMAND} -in - start|stop|restart) - ;; - watchrestart) - if [ -n "$ARG_DAEMONS" ] - then - echo "${ME}: watchrestart mode is only for use by watchquagga" - exit 2 - fi - ;; - *) - usage - ;; -esac - -# select daemons to start - -case ${COMMAND} -in - start|restart|watchrestart) - START_DAEMONS= - for d in ${DAEMONS_STARTSEQ} - do - [ -x "${BINDIR}/${d}" -a -f "${CONFDIR}/${d}.conf" ] \ - && START_DAEMONS="${START_DAEMONS}${d} " - done - WATCHQUAGGA_DAEMONS=${START_DAEMONS} - if is_in watchquagga "${DAEMONS_STARTSEQ}" - then - START_DAEMONS="${START_DAEMONS} watchquagga" - fi - if [ -n "${ARG_DAEMONS}" ] - then - if select_subset "${ARG_DAEMONS}" "${DAEMONS}" - then - if select_subset "${ARG_DAEMONS}" "${START_DAEMONS}" - then - START_DAEMONS=${RESULT} - else - die "these daemons are not startable:${RESULT}." - fi - else - die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." - fi - fi - ;; -esac - -# select daemons to stop - -case ${COMMAND} -in - stop|restart|watchrestart) - STOP_DAEMONS=${DAEMONS_STOPSEQ} - if [ -n "${ARG_DAEMONS}" ] - then - if select_subset "${ARG_DAEMONS}" "${STOP_DAEMONS}" - then - STOP_DAEMONS=${RESULT} - else - die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." - fi - fi - stop_daemons= - for d in ${STOP_DAEMONS} - do - pidfile=${STATEDIR}/${d}.pid - if [ -f "${pidfile}" -o -n "$(pidof ${d})" ] - then - stop_daemons="${stop_daemons}${d} " - elif [ -n "${ARG_DAEMONS}" ] - then - echo "${ME}: found no ${d} process running." - fi - done - STOP_DAEMONS=${stop_daemons} - ;; -esac - -# stop daemons - -for d in $STOP_DAEMONS -do - echo -n "${ME}: Stopping ${d} ... " - pidfile=${STATEDIR}/${d}.pid - if [ -f "${pidfile}" ] - then - file_pid=$(cat ${pidfile}) - if [ -z "${file_pid}" ] - then - echo -n "no pid file entry found ... " - fi - else - file_pid= - echo -n "no pid file found ... " - fi - proc_pid=$(pidof ${d}) - if [ -z "${proc_pid}" ] - then - echo -n "found no ${d} process running ... " - else - count=0 - notinpidfile= - for p in ${proc_pid} - do - count=$((${count}+1)) - if kill ${p} - then - echo -n "killed ${p} ... " - else - echo -n "failed to kill ${p} ... " - fi - [ "${p}" = "${file_pid}" ] \ - || notinpidfile="${notinpidfile} ${p}" - done - [ ${count} -le 1 ] \ - || echo -n "WARNING: ${count} ${d} processes were found running ... " - for n in ${notinpidfile} - do - echo -n "WARNING: process ${n} was not in pid file ... " - done - fi - count=0 - survivors=$(pidof ${d}) - while [ -n "${survivors}" ] - do - sleep 1 - count=$((${count}+1)) - survivors=$(pidof ${d}) - [ -z "${survivors}" -o ${count} -gt 5 ] && break - for p in ${survivors} - do - sleep 1 - echo -n "${p} " - kill ${p} - done - done - survivors=$(pidof ${d}) - [ -n "${survivors}" ] && \ - if kill -KILL ${survivors} - then - echo -n "KILLed ${survivors} ... " - else - echo -n "failed to KILL ${survivors} ... " - fi - sleep 1 - survivors=$(pidof ${d}) - if [ -z "${survivors}" ] - then - echo -n "done." - if [ -f "${pidfile}" ] - then - rm -f ${pidfile} \ - || echo -n " Failed to remove pidfile." - fi - else - echo -n "failed to stop ${survivors} - giving up." - if [ "${survivors}" != "${file_pid}" ] - then - if echo "${survivors}" > ${pidfile} - then - chown quagga:quagga ${pidfile} - echo -n " Wrote ${survivors} to pidfile." - else - echo -n " Failed to write ${survivors} to pidfile." - fi - fi - fi - echo -done - -# start daemons - -if [ -n "$START_DAEMONS" ] -then - [ -d ${CONFDIR} ] \ - || quit "${ME}: no config directory ${CONFDIR} - exiting." - chown -R quagga:quagga ${CONFDIR} - [ -d ${STATEDIR} ] || mkdir -p ${STATEDIR} \ - || die "${ME}: could not create state directory ${STATEDIR} - exiting." - chown -R quagga:quagga ${STATEDIR} - - for d in $START_DAEMONS - do - echo -n "${ME}: Starting ${d} ... " - proc_pid=$(pidof ${d}) - pidfile=${STATEDIR}/${d}.pid - file_pid= - if [ -f "${pidfile}" ] - then - file_pid=$(cat ${pidfile}) - if [ -n "${file_pid}" ] - then - echo -n "found old pid file entry ${file_pid} ... " - fi - fi - if [ -n "${proc_pid}" ] - then - echo -n "found ${d} running (${proc_pid}) - skipping ${d}." - if [ "${proc_pid}" != "${file_pid}" ] - then - if echo "${proc_pid}" > ${pidfile} - then - chown quagga:quagga ${pidfile} - echo -n " Wrote ${proc_pid} to pidfile." - else - echo -n " Failed to write ${proc_pid} to pidfile." - fi - fi - elif rm -f "${pidfile}" - then - if [ "${d}" = "watchquagga" ] - then - $("${BINDIR}/${d}" \ - ${WATCHQUAGGA_FLAGS} \ - "${WATCHQUAGGA_CMD}" \ - ${WATCHQUAGGA_DAEMONS}) - status=$? - else - $("${BINDIR}/${d}" ${DAEMON_FLAGS}) - status=$? - fi - if [ $status -eq 0 ] - then - echo -n "done." - else - echo -n "failed." - fi - else - echo -n " failed to remove pidfile." - fi - echo - done -fi diff --git a/openwrt/package/quagga/ipkg/quagga-bgpd.control b/openwrt/package/quagga/ipkg/quagga-bgpd.control deleted file mode 100644 index d8e9b80b2c4..00000000000 --- a/openwrt/package/quagga/ipkg/quagga-bgpd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-bgpd -Priority: optional -Section: net -Depends: quagga -Description: A BGPv4, BGPv4+, BGPv4- routing engine for use with Quagga - routing software diff --git a/openwrt/package/quagga/ipkg/quagga-ospf6d.control b/openwrt/package/quagga/ipkg/quagga-ospf6d.control deleted file mode 100644 index 07cf20582b2..00000000000 --- a/openwrt/package/quagga/ipkg/quagga-ospf6d.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-ospf6d -Priority: optional -Section: net -Depends: quagga -Description: An OSPFv3 routing engine for use with Quagga - routing software diff --git a/openwrt/package/quagga/ipkg/quagga-ospfd.control b/openwrt/package/quagga/ipkg/quagga-ospfd.control deleted file mode 100644 index c9fc77ce81c..00000000000 --- a/openwrt/package/quagga/ipkg/quagga-ospfd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-ospfd -Priority: optional -Section: net -Depends: quagga -Description: An OSPFv2 routing engine for use with Quagga - routing software diff --git a/openwrt/package/quagga/ipkg/quagga-ripd.control b/openwrt/package/quagga/ipkg/quagga-ripd.control deleted file mode 100644 index e7ff899523a..00000000000 --- a/openwrt/package/quagga/ipkg/quagga-ripd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-ripd -Priority: optional -Section: net -Depends: quagga -Description: A RIP routing engine for use with Quagga - routing software diff --git a/openwrt/package/quagga/ipkg/quagga-ripngd.control b/openwrt/package/quagga/ipkg/quagga-ripngd.control deleted file mode 100644 index f6b2804c24a..00000000000 --- a/openwrt/package/quagga/ipkg/quagga-ripngd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-ripngd -Priority: optional -Section: net -Depends: quagga -Description: A RIPNG routing engine for use with Quagga - routing software diff --git a/openwrt/package/quagga/ipkg/quagga-vtysh.control b/openwrt/package/quagga/ipkg/quagga-vtysh.control deleted file mode 100644 index b26d11df333..00000000000 --- a/openwrt/package/quagga/ipkg/quagga-vtysh.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-vtysh -Priority: optional -Section: net -Depends: quagga, libncurses, libreadline -Description: integrated shell for interacting with Quagga - routing software diff --git a/openwrt/package/quagga/ipkg/quagga.control b/openwrt/package/quagga/ipkg/quagga.control deleted file mode 100644 index 303f299e812..00000000000 --- a/openwrt/package/quagga/ipkg/quagga.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga -Priority: optional -Section: net -Description: A routing software package that provides TCP/IP - based routing services with routing protocols support such - as RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, BGP-4, and BGP-4+. diff --git a/openwrt/package/quagga/ipkg/quagga.postinst b/openwrt/package/quagga/ipkg/quagga.postinst deleted file mode 100644 index 90ffe61e282..00000000000 --- a/openwrt/package/quagga/ipkg/quagga.postinst +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -name=quagga -id=51 -dir=/var/run/quagga - -# do not change below -# check if we are on real system -if [ -z "${IPKG_INSTROOT}" ]; then - # create copies of passwd and group, if we use squashfs - rootfs=`mount |awk '/root/ { print $5 }'` - if [ "$rootfs" = "squashfs" ]; then - if [ -h /etc/group ]; then - rm /etc/group - cp /rom/etc/group /etc/group - fi - if [ -h /etc/passwd ]; then - rm /etc/passwd - cp /rom/etc/passwd /etc/passwd - fi - fi -fi - -echo "" -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/group)" ]; then - echo "adding group $name to /etc/group" - echo "${name}:x:${id}:" >> ${IPKG_INSTROOT}/etc/group -fi - -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/passwd)" ]; then - echo "adding user $name to /etc/passwd" - echo "${name}:x:${id}:${id}:${name}:/tmp/.${name}:/bin/false" >> ${IPKG_INSTROOT}/etc/passwd -fi - -grep -q '^zebra[[:space:]]*2601/tcp' ${IPKG_INSTROOT}/etc/services 2>/dev/null -if [ $? -ne 0 ]; then -echo "zebrasrv 2600/tcp" >>${IPKG_INSTROOT}/etc/services -echo "zebra 2601/tcp" >>${IPKG_INSTROOT}/etc/services -echo "ripd 2602/tcp" >>${IPKG_INSTROOT}/etc/services -echo "ripngd 2603/tcp" >>${IPKG_INSTROOT}/etc/services -echo "ospfd 2604/tcp" >>${IPKG_INSTROOT}/etc/services -echo "bgpd 2605/tcp" >>${IPKG_INSTROOT}/etc/services -echo "ospf6d 2606/tcp" >>${IPKG_INSTROOT}/etc/services -echo "ospfapi 2607/tcp" >>${IPKG_INSTROOT}/etc/services -echo "isisd 2608/tcp" >>${IPKG_INSTROOT}/etc/services -fi - -chown -R $name:$name $dir diff --git a/openwrt/package/quagga/patches/quagga-cross.patch b/openwrt/package/quagga/patches/quagga-cross.patch deleted file mode 100644 index 5b8276bcc12..00000000000 --- a/openwrt/package/quagga/patches/quagga-cross.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- quagga-0.98.4/configure.orig Mon Jun 27 19:05:31 2005 -+++ quagga-0.98.4/configure Mon Jul 11 20:32:07 2005 -@@ -12623,69 +12623,6 @@ - - - --echo "$as_me:$LINENO: checking for broken CMSG_FIRSTHDR" >&5 --echo $ECHO_N "checking for broken CMSG_FIRSTHDR... $ECHO_C" >&6 --if test "$cross_compiling" = yes; then -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#ifdef SUNOS_5 --#define _XPG4_2 --#define __EXTENSIONS__ --#endif --#include --#include --#include -- --main() --{ -- struct msghdr msg; -- char buf[4]; -- -- msg.msg_control = buf; -- msg.msg_controllen = 0; -- -- if (CMSG_FIRSTHDR(&msg) != NULL) -- exit(0); -- exit (1); --} --_ACEOF --rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- echo "$as_me:$LINENO: result: yes - using workaround" >&5 --echo "${ECHO_T}yes - using workaround" >&6 --cat >>confdefs.h <<\_ACEOF --#define HAVE_BROKEN_CMSG_FIRSTHDR --_ACEOF -- --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --fi --rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- - echo "$as_me:$LINENO: checking route read method check" >&5 - echo $ECHO_N "checking route read method check... $ECHO_C" >&6 - if test "${zebra_rtread+set}" = set; then -@@ -12783,10 +12720,7 @@ - if test "${zebra_ipforward_path+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null; --do -- test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break --done -+ zebra_ipforward_path="/proc/net/snmp" - case $zebra_ipforward_path in - "/proc/net/snmp") IPFORWARD=ipforward_proc.o - zebra_ipforward_path="proc";; diff --git a/openwrt/package/quagga/patches/quagga-readline.patch b/openwrt/package/quagga/patches/quagga-readline.patch deleted file mode 100644 index 8e3b8056219..00000000000 --- a/openwrt/package/quagga/patches/quagga-readline.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- quagga-0.98.4/configure.orig Mon Jun 27 19:05:31 2005 -+++ quagga-0.98.4/configure Thu Jul 28 07:02:12 2005 -@@ -10937,7 +10937,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lcurses $LIBS" -+#LIBS="-lcurses $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -11071,7 +11071,8 @@ - #define HAVE_LIBNCURSES 1 - _ACEOF - -- LIBS="-lncurses $LIBS" -+# LIBS="-lncurses $LIBS" -+CURSES=-lncurses - - fi - -@@ -11088,7 +11089,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lreadline $LIBS" -+LIBS="-lreadline $CURSES $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -11144,7 +11145,8 @@ - #define HAVE_LIBREADLINE 1 - _ACEOF - -- LIBS="-lreadline $LIBS" -+# LIBS="-lreadline $LIBS" -+CURSES="$CURSES -lreadline" - - fi - -@@ -11303,7 +11305,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lreadline $LIBS" -+LIBS="-lreadline $CURSES $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -11365,7 +11367,7 @@ - #define HAVE_LIBREADLINE 1 - _ACEOF - -- LIBS="-lreadline $LIBS" -+# LIBS="-lreadline $LIBS" - - fi - diff --git a/openwrt/package/raddump/Config.in b/openwrt/package/raddump/Config.in deleted file mode 100755 index 68f391d52a9..00000000000 --- a/openwrt/package/raddump/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_RADDUMP - prompt "raddump........................... raddump interprets captured RADIUS packets." - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_LIBPCAP - help - raddump interprets captured RADIUS packets to print a - timestamp, packet length, RADIUS packet type, source and - destination hosts and ports, and included attribute names and - values for each packet. diff --git a/openwrt/package/raddump/Makefile b/openwrt/package/raddump/Makefile deleted file mode 100755 index 1526ea80a88..00000000000 --- a/openwrt/package/raddump/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=raddump -PKG_VERSION:=0.3.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=f8c29c67141ea78bb6ae8b97d5149480 -PKG_SOURCE_URL:=@SF/raddump -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,RADDUMP,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - ac_cv_c_bigendian=no \ - ac_cv_func_malloc_0_nonnull=yes \ - ac_cv_func_realloc_0_nonnull=yes \ - $(DISABLE_NLS) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) DESTDIR=$(PKG_INSTALL_DIR) -C $(PKG_BUILD_DIR) install - touch $@ - -$(IPKG_RADDUMP): - mkdir -p $(IDIR_RADDUMP) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_RADDUMP)/ - $(RSTRIP) $(IDIR_RADDUMP) - $(IPKG_BUILD) $(IDIR_RADDUMP) $(PACKAGE_DIR) diff --git a/openwrt/package/raddump/ipkg/raddump.control b/openwrt/package/raddump/ipkg/raddump.control deleted file mode 100755 index 2d31b0221a7..00000000000 --- a/openwrt/package/raddump/ipkg/raddump.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: raddump -Depends: libpcap, libopenssl -Section: net -Architecture: mipsel -Priority: optional -Description: raddump interprets captured RADIUS packets to print a timestamp, packet length, RADIUS packet type, source and destination hosts and ports, and included attribute names and values for each packet. diff --git a/openwrt/package/radiusclient-ng/Config.in b/openwrt/package/radiusclient-ng/Config.in deleted file mode 100644 index 7a2c1712805..00000000000 --- a/openwrt/package/radiusclient-ng/Config.in +++ /dev/null @@ -1,27 +0,0 @@ -config BR2_COMPILE_RADIUSCLIENT_NG - tristate - default n - depends BR2_PACKAGE_LIBRADIUSCLIENT_NG - -config BR2_PACKAGE_RADIUSCLIENT_NG - prompt "radiusclient-ng................... RADIUS client" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_LIBRADIUSCLIENT_NG - help - Purpose of this project is to build portable, easy-to-use and standard compliant - library suitable for developing free and commercial software that need support - for a RADIUS protocol (RFCs 2128 and 2139). - - http://developer.berlios.de/projects/radiusclient-ng/ - - Depends: libopenssl - -config BR2_PACKAGE_LIBRADIUSCLIENT_NG - prompt "libradiusclient-ng................ RADIUS client library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_RADIUSCLIENT_NG - help - Developpment library from radiusclient-ng diff --git a/openwrt/package/radiusclient-ng/Makefile b/openwrt/package/radiusclient-ng/Makefile deleted file mode 100644 index 5814202aa2b..00000000000 --- a/openwrt/package/radiusclient-ng/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=radiusclient-ng -PKG_VERSION:=0.5.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=c54eb70e964bdd22dd44b39a9b4df8ca - -PKG_SOURCE_URL:=http://download.berlios.de/radiusclient-ng/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,RADIUSCLIENT_NG,radiusclient-ng,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LIBRADIUSCLIENT_NG,libradiusclient-ng,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_func_getdomainname=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - install-exec install-data - touch $@ - -$(IPKG_RADIUSCLIENT_NG): - mkdir -p $(IDIR_RADIUSCLIENT_NG)/usr - $(CP) $(PKG_INSTALL_DIR)/usr/sbin $(IDIR_RADIUSCLIENT_NG)/usr/ - $(CP) $(PKG_INSTALL_DIR)/etc $(IDIR_RADIUSCLIENT_NG)/ - $(RSTRIP) $(IDIR_RADIUSCLIENT_NG)/ - $(IPKG_BUILD) $(IDIR_RADIUSCLIENT_NG) $(PACKAGE_DIR) - -$(IPKG_LIBRADIUSCLIENT_NG): - mkdir -p $(IDIR_LIBRADIUSCLIENT_NG)/usr - $(CP) $(PKG_INSTALL_DIR)/usr/lib $(IDIR_LIBRADIUSCLIENT_NG)/usr/ - $(RSTRIP) $(IDIR_LIBRADIUSCLIENT_NG)/ - $(IPKG_BUILD) $(IDIR_LIBRADIUSCLIENT_NG) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libradiusclient-ng.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(STAGING_DIR)/usr/ - mkdir -p $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng{a,la,so}* $(STAGING_DIR)/usr/lib/ - touch $@ - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/radiusclient-ng/ipkg/libradiusclient-ng.control b/openwrt/package/radiusclient-ng/ipkg/libradiusclient-ng.control deleted file mode 100644 index 8b8726cd225..00000000000 --- a/openwrt/package/radiusclient-ng/ipkg/libradiusclient-ng.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libradiusclient-ng -Section: libs -Description: RADIUS client library -Priority: optional diff --git a/openwrt/package/radiusclient-ng/ipkg/radiusclient-ng.control b/openwrt/package/radiusclient-ng/ipkg/radiusclient-ng.control deleted file mode 100644 index d11a837bdcd..00000000000 --- a/openwrt/package/radiusclient-ng/ipkg/radiusclient-ng.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: radiusclient-ng -Section: net -Description: RADIUS client -Priority: optional -Depends: libopenssl diff --git a/openwrt/package/radiusclient-ng/patches/01-cross_compile.patch b/openwrt/package/radiusclient-ng/patches/01-cross_compile.patch deleted file mode 100644 index fa45afb12d8..00000000000 --- a/openwrt/package/radiusclient-ng/patches/01-cross_compile.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -urN radiusclient-ng-0.5.2/configure radiusclient-ng-0.5.2.new/configure ---- radiusclient-ng-0.5.2/configure 2005-11-07 22:18:59.000000000 +0100 -+++ radiusclient-ng-0.5.2.new/configure 2006-03-10 01:51:59.489383320 +0100 -@@ -23791,8 +23791,7 @@ - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+See \`config.log' for more details." >&2;} } - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ -diff -urN radiusclient-ng-0.5.2/etc/Makefile.in radiusclient-ng-0.5.2.new/etc/Makefile.in ---- radiusclient-ng-0.5.2/etc/Makefile.in 2005-11-08 00:15:35.000000000 +0100 -+++ radiusclient-ng-0.5.2.new/etc/Makefile.in 2006-03-10 01:58:29.345116240 +0100 -@@ -376,9 +376,9 @@ - <$(srcdir)/radiusclient.conf.in >radiusclient.conf - - install-data-local: servers -- $(mkinstalldirs) $(pkgsysconfdir); \ -- echo " $(INSTALL) -m 600 $(srcdir)/servers $(pkgsysconfdir)/servers"; \ -- $(INSTALL) -m 600 $(srcdir)/servers $(pkgsysconfdir)/servers -+ $(mkinstalldirs) $(DESTDIR)/$(pkgsysconfdir); \ -+ echo " $(INSTALL) -m 600 $(srcdir)/servers $(DESTDIR)/$(pkgsysconfdir)/servers"; \ -+ $(INSTALL) -m 600 $(srcdir)/servers $(DESTDIR)/$(pkgsysconfdir)/servers - - uninstall-local: - rm -f $(pkgsysconfdir)/servers diff --git a/openwrt/package/radvd/Config.in b/openwrt/package/radvd/Config.in deleted file mode 100644 index 46bc355dbe5..00000000000 --- a/openwrt/package/radvd/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_RADVD - prompt "radvd............................. IPv6 Routing Advertisement Daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_IPV6 - help - Routing Advertisement Daemon for IPv6 - - http://v6web.litech.org/radvd/ - diff --git a/openwrt/package/radvd/Makefile b/openwrt/package/radvd/Makefile deleted file mode 100644 index e31264b0284..00000000000 --- a/openwrt/package/radvd/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=radvd -PKG_VERSION:=0.7.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=56ce3f8cbf5966a0d531c21813320423 - -PKG_SOURCE_URL:=http://v6web.litech.org/radvd/dist \ - http://download.sourcemage.org/mirror -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,RADVD,radvd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-configfile=/etc/radvd.conf \ - --with-logfile=/var/log/radvd.log \ - --with-pidfile=/var/run/radvd.pid \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - radvd_LDADD="" - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $@ - -$(IPKG_RADVD): - install -d -m0755 $(IDIR_RADVD)/etc - install -m0644 ./files/radvd.conf $(IDIR_RADVD)/etc/radvd.conf - install -d -m0755 $(IDIR_RADVD)/etc/init.d - install -m0755 ./files/radvd.init $(IDIR_RADVD)/etc/init.d/S51radvd - install -d -m0755 $(IDIR_RADVD)/usr/sbin - install -m 755 $(PKG_INSTALL_DIR)/usr/sbin/radvd $(IDIR_RADVD)/usr/sbin/ - install -m 755 $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(IDIR_RADVD)/usr/sbin/ - $(RSTRIP) $(IDIR_RADVD) - $(IPKG_BUILD) $(IDIR_RADVD) $(PACKAGE_DIR) diff --git a/openwrt/package/radvd/files/radvd.conf b/openwrt/package/radvd/files/radvd.conf deleted file mode 100644 index 06d8357041a..00000000000 --- a/openwrt/package/radvd/files/radvd.conf +++ /dev/null @@ -1,22 +0,0 @@ -# For more examples, see the radvd documentation. - -interface br0 -{ - AdvSendAdvert off; - -# -# Disable Mobile IPv6 support -# - AdvHomeAgentFlag off; - -# -# example of a standard prefix -# - prefix fec0:0:0:1::/64 - { - AdvOnLink on; - AdvAutonomous on; - AdvRouterAddr off; - }; - -}; diff --git a/openwrt/package/radvd/files/radvd.init b/openwrt/package/radvd/files/radvd.init deleted file mode 100644 index 2d9e5000906..00000000000 --- a/openwrt/package/radvd/files/radvd.init +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -case "$1" in - start) - echo 1 > /proc/sys/net/ipv6/conf/all/forwarding - mkdir -p /var/log - mkdir -p /var/run - /usr/sbin/radvd - ;; - - stop) - killall radvd - echo 0 > /proc/sys/net/ipv6/conf/all/forwarding - ;; - - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 - ;; -esac diff --git a/openwrt/package/radvd/ipkg/radvd.conffiles b/openwrt/package/radvd/ipkg/radvd.conffiles deleted file mode 100644 index a1418c0a1cd..00000000000 --- a/openwrt/package/radvd/ipkg/radvd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/radvd.conf diff --git a/openwrt/package/radvd/ipkg/radvd.control b/openwrt/package/radvd/ipkg/radvd.control deleted file mode 100644 index 67df96e7318..00000000000 --- a/openwrt/package/radvd/ipkg/radvd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: radvd -Priority: optional -Section: net -Depends: kmod-ipv6 -Description: Routing Advertisement Daemon for IPv6 diff --git a/openwrt/package/radvd/patches/no-libfl.patch b/openwrt/package/radvd/patches/no-libfl.patch deleted file mode 100644 index e17a127c950..00000000000 --- a/openwrt/package/radvd/patches/no-libfl.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN radvd-0.7.3.old/scanner.l radvd-0.7.3/scanner.l ---- radvd-0.7.3.old/scanner.l 2004-10-26 07:30:34.000000000 +0200 -+++ radvd-0.7.3/scanner.l 2005-04-05 00:01:42.000000000 +0200 -@@ -21,6 +21,8 @@ - - extern char *conf_file; - -+int yywrap(void) { return 1; } -+ - int num_lines = 1; - %} - diff --git a/openwrt/package/rarpd/Config.in b/openwrt/package/rarpd/Config.in deleted file mode 100644 index 648866938dc..00000000000 --- a/openwrt/package/rarpd/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_RARPD - prompt "rarpd............................. Reverse ARP Daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNET - help - Rarpd is a daemon which responds to RARP requests. - RARP is used by some machines at boot time to discover their - IP address. They provide their Ethernet address and rarpd - responds with their IP address if it finds it in the ethers - database. - - ftp://ftp.dementia.org/pub/net-tools/ - diff --git a/openwrt/package/rarpd/Makefile b/openwrt/package/rarpd/Makefile deleted file mode 100644 index b91cd83a437..00000000000 --- a/openwrt/package/rarpd/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rarpd -PKG_VERSION:=1.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=04e2ca849e758d0b88c8281775ec3b58 - -PKG_SOURCE_URL:=ftp://ftp.dementia.org/pub/net-tools -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -# Hack Alert! -# The configure script for rarpd, when used with the --with-libnet option -# doesn't correctly detect and set -DNEW_LIBNET_INTERFACE. -EXTRA_CFLAGS = -DNEW_LIBNET_INTERFACE - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,RARPD,rarpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-I$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-libnet="$(STAGING_DIR)/usr" \ - --with-pcap="$(STAGING_DIR)/usr" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_RARPD): - install -d -m0755 $(IDIR_RARPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rarpd $(IDIR_RARPD)/usr/sbin/ - install -d -m0755 $(IDIR_RARPD)/etc/default - install -m644 ./files/rarpd.default $(IDIR_RARPD)/etc/default/rarpd - install -d -m0755 $(IDIR_RARPD)/etc/init.d - install -m755 ./files/rarpd.init $(IDIR_RARPD)/etc/init.d/rarpd - ln -sf rarpd $(IDIR_RARPD)/etc/init.d/S50rarpd - $(RSTRIP) $(IDIR_RARPD) - $(IPKG_BUILD) $(IDIR_RARPD) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/rarpd/files/rarpd.default b/openwrt/package/rarpd/files/rarpd.default deleted file mode 100644 index 1dd41e9b37d..00000000000 --- a/openwrt/package/rarpd/files/rarpd.default +++ /dev/null @@ -1,4 +0,0 @@ -# /etc/default/rarpd -# -# Only listen on vlan0 -#OPTIONS="-i vlan0" diff --git a/openwrt/package/rarpd/files/rarpd.init b/openwrt/package/rarpd/files/rarpd.init deleted file mode 100644 index 04ca0b4f380..00000000000 --- a/openwrt/package/rarpd/files/rarpd.init +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -RARPD=/usr/sbin/rarpd -DEFAULT=/etc/default/rarpd -[ -f $DEFAULT ] && . $DEFAULT - -$RARPD $OPTIONS diff --git a/openwrt/package/rarpd/ipkg/rarpd.conffiles b/openwrt/package/rarpd/ipkg/rarpd.conffiles deleted file mode 100644 index 067611849b5..00000000000 --- a/openwrt/package/rarpd/ipkg/rarpd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/rarpd diff --git a/openwrt/package/rarpd/ipkg/rarpd.control b/openwrt/package/rarpd/ipkg/rarpd.control deleted file mode 100644 index 221e869af21..00000000000 --- a/openwrt/package/rarpd/ipkg/rarpd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: rarpd -Priority: optional -Section: net -Depends: libnet -Description: Reverse ARP Daemon diff --git a/openwrt/package/readline/Config.in b/openwrt/package/readline/Config.in deleted file mode 100644 index 9c5519b4d9f..00000000000 --- a/openwrt/package/readline/Config.in +++ /dev/null @@ -1,20 +0,0 @@ -config BR2_COMPILE_READLINE - tristate - default n - depends BR2_PACKAGE_LIBREADLINE - -config BR2_PACKAGE_LIBREADLINE - prompt "libreadline....................... Command lines edition library" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_READLINE - help - The Readline library provides a set of functions for use by applications - that allow users to edit command lines as they are typed in. Both Emacs - and vi editing modes are available. The Readline library includes - additional functions to maintain a list of previously-entered command - lines, to recall and perhaps reedit those lines, and perform csh-like - history expansion on previous commands. - - http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html - diff --git a/openwrt/package/readline/Makefile b/openwrt/package/readline/Makefile deleted file mode 100644 index 2e044a1844f..00000000000 --- a/openwrt/package/readline/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=readline -PKG_VERSION:=5.0 -PKG_RELEASE:=1 -PKG_MD5SUM:= - -PKG_SOURCE_URL:=@GNU/readline -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBREADLINE,libreadline,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --with-curses \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBREADLINE): - install -m0755 -d $(IDIR_LIBREADLINE)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so.* $(IDIR_LIBREADLINE)/usr/lib/ - $(RSTRIP) $(IDIR_LIBREADLINE) - $(IPKG_BUILD) $(IDIR_LIBREADLINE) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libreadline.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libreadline.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/readline \ - $(STAGING_DIR)/usr/lib/lib{history,readline}.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/readline/ipkg/libreadline.control b/openwrt/package/readline/ipkg/libreadline.control deleted file mode 100644 index d1c71e4b85b..00000000000 --- a/openwrt/package/readline/ipkg/libreadline.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libreadline -Priority: optional -Section: libs -Description: Command lines edition library diff --git a/openwrt/package/reaim/Config.in b/openwrt/package/reaim/Config.in deleted file mode 100644 index 02cda070d44..00000000000 --- a/openwrt/package/reaim/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_REAIM - prompt "reaim............................. A transparent AIM / MSN proxy" - tristate - default m if CONFIG_DEVEL - help - ReAIM is a proxy for file transfers with MSN/AIM. - - http://reaim.sourceforge.net/ - diff --git a/openwrt/package/reaim/Makefile b/openwrt/package/reaim/Makefile deleted file mode 100644 index 959e0de91d3..00000000000 --- a/openwrt/package/reaim/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=reaim -PKG_VERSION:=0.8 -PKG_RELEASE:=1 -PKG_MD5SUM:=647d2ab72ec454f89294accfb3182c09 - -PKG_SOURCE_URL:=@SF/reaim -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,REAIM,reaim,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_REAIM): - install -d -m0755 $(IDIR_REAIM)/etc/init.d - install -m0755 ./files/reaim.init $(IDIR_REAIM)/etc/init.d/reaim - ln -sf reaim $(IDIR_REAIM)/etc/init.d/S63reaim - install -d -m0755 $(IDIR_REAIM)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/reaim $(IDIR_REAIM)/usr/sbin/ - $(RSTRIP) $(IDIR_REAIM) - $(IPKG_BUILD) $(IDIR_REAIM) $(PACKAGE_DIR) - diff --git a/openwrt/package/reaim/files/reaim.init b/openwrt/package/reaim/files/reaim.init deleted file mode 100644 index 93ceea3d42b..00000000000 --- a/openwrt/package/reaim/files/reaim.init +++ /dev/null @@ -1,62 +0,0 @@ -#! /bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -NAME=reaim -DESC="Transparent proxy for IM behind NAT" -. /etc/functions.sh -WAN=$(nvram get wan_ifname) -IPT=/usr/sbin/iptables -case "$1" in - start) - if [ -e /var/run/$NAME.pid ]; then - echo "$DESC: $NAME already started." - exit 0 - fi - echo -n "Starting $DESC: $NAME" - $IPT -A input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT - $IPT -A input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT - $IPT -A input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT - $IPT -A input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT - - test -e /var/run/$NAME.pid || touch /var/run/$NAME.pid - /usr/sbin/$NAME - echo "." - ;; - - stop) - if [ ! -e /var/run/$NAME.pid ]; then - echo "$DESC: $NAME is not running." - exit 0 - fi - echo -n "Stopping $DESC: $NAME" - killall $NAME - rm -f /var/run/$NAME.pid - - echo "." - ;; - - restart|force-reload) - if [ ! -e /var/run/$NAME.pid ]; then - $0 start - exit 0 - fi - echo -n "Restarting $DESC: $NAME" - $IPT -A input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT - $IPT -A input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT - $IPT -A input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT - $IPT -A input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT - killall $NAME - sleep 1 - /usr/sbin/$NAME - echo "." - ;; - - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; - -esac - -exit 0 diff --git a/openwrt/package/reaim/ipkg/reaim.control b/openwrt/package/reaim/ipkg/reaim.control deleted file mode 100644 index a0a1afc67c5..00000000000 --- a/openwrt/package/reaim/ipkg/reaim.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: reaim -Priority: optional -Section: net -Depends: -Description: A transparent AIM / MSN proxy diff --git a/openwrt/package/reaim/patches/501-cross_compile-install.patch b/openwrt/package/reaim/patches/501-cross_compile-install.patch deleted file mode 100644 index 9e88f617e68..00000000000 --- a/openwrt/package/reaim/patches/501-cross_compile-install.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urN reaim-0.8/Makefile reaim-0.8/Makefile ---- reaim-0.8/Makefile 2002-11-28 06:10:38.000000000 +0100 -+++ reaim-0.8/Makefile 2005-10-07 12:07:43.000000000 +0200 -@@ -11,7 +11,10 @@ - endif - - reaim: reaim.c -- gcc -o reaim reaim.c -g -Wall $(FW_FLAGS) -- -+ $(CC) $(CFLAGS) -o reaim reaim.c -Wall $(FW_FLAGS) - clean: - -rm reaim -+ -+install: -+ install -d -m 0755 $(DESTDIR)/usr/sbin -+ install -m 0755 reaim $(DESTDIR)/usr/sbin/ diff --git a/openwrt/package/rp-pppoe/Config.in b/openwrt/package/rp-pppoe/Config.in deleted file mode 100644 index a88b09b0cf3..00000000000 --- a/openwrt/package/rp-pppoe/Config.in +++ /dev/null @@ -1,50 +0,0 @@ -#menu "rp-pppoe.......................... Roaring Penguin PPPoE (PPP over Ethernet) implementation" - -config BR2_COMPILE_RP_PPPOE - tristate - default n - depends BR2_PACKAGE_PPPOE_CLIENT || BR2_PACKAGE_PPPOE_RELAY || BR2_PACKAGE_PPPOE_SERVER || BR2_PACKAGE_PPPOE_SNIFF - -config BR2_PACKAGE_PPPOE_CLIENT - prompt "pppoe-client...................... PPPoE (PPP over Ethernet) client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_RP_PPPOE - select BR2_PACKAGE_PPP - help - PPPoE (PPP over Ethernet) client - - http://roaringpenguin.com/penguin/open_source_rp-pppoe.php - -config BR2_PACKAGE_PPPOE_RELAY - prompt "pppoe-relay....................... PPPoE (PPP over Ethernet) relay" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_RP_PPPOE - help - PPPoE (PPP over Ethernet) relay - - http://roaringpenguin.com/penguin/open_source_rp-pppoe.php - -config BR2_PACKAGE_PPPOE_SERVER - prompt "pppoe-server...................... PPPoE (PPP over Ethernet) server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_RP_PPPOE - select BR2_PACKAGE_PPP - help - PPPoE (PPP over Ethernet) server - - http://roaringpenguin.com/penguin/open_source_rp-pppoe.php - -config BR2_PACKAGE_PPPOE_SNIFF - prompt "pppoe-sniff....................... PPPoE (PPP over Ethernet) frame sniffer" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_RP_PPPOE - help - PPPoE (PPP over Ethernet) frame sniffer - - http://roaringpenguin.com/penguin/open_source_rp-pppoe.php - -#endmenu diff --git a/openwrt/package/rp-pppoe/Makefile b/openwrt/package/rp-pppoe/Makefile deleted file mode 100644 index 1b829d83637..00000000000 --- a/openwrt/package/rp-pppoe/Makefile +++ /dev/null @@ -1,101 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rp-pppoe -PKG_VERSION:=3.5 -PKG_RELEASE:=1 -PKG_MD5SUM:= - -PKG_SOURCE_URL:=http://roaringpenguin.com/penguin/pppoe/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,PPPOE_CLIENT,pppoe-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PPPOE_RELAY,pppoe-relay,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PPPOE_SERVER,pppoe-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PPPOE_SNIFF,pppoe-sniff,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR)/src ; rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ac_cv_func_setvbuf_reversed=no \ - ac_cv_sizeof_unsigned_short=2 \ - ac_cv_sizeof_unsigned_int=4 \ - ac_cv_sizeof_unsigned_long=4 \ - ac_cv_linux_kernel_pppoe=yes \ - ac_cv_pack_bitfields_reversed=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_PPPOE_CLIENT): - install -d -m0755 $(IDIR_PPPOE_CLIENT)/etc/init.d - install -m0755 ./files/pppoe-client.init $(IDIR_PPPOE_CLIENT)/etc/init.d/pppoe-client - install -d -m0755 $(IDIR_PPPOE_CLIENT)/etc/ppp - install -m0644 $(PKG_INSTALL_DIR)/etc/pppoe.conf $(IDIR_PPPOE_CLIENT)/etc/ - install -d -m0755 $(IDIR_PPPOE_CLIENT)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(IDIR_PPPOE_CLIENT)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/adsl-* $(IDIR_PPPOE_CLIENT)/usr/sbin/ - $(RSTRIP) $(IDIR_PPPOE_CLIENT) - $(IPKG_BUILD) $(IDIR_PPPOE_CLIENT) $(PACKAGE_DIR) - -$(IPKG_PPPOE_RELAY): - install -d -m0755 $(IDIR_PPPOE_RELAY)/etc/default - install -m0755 ./files/pppoe-relay.default $(IDIR_PPPOE_RELAY)/etc/default/pppoe-relay - install -d -m0755 $(IDIR_PPPOE_RELAY)/etc/init.d - install -m0755 ./files/pppoe-relay.init $(IDIR_PPPOE_RELAY)/etc/init.d/pppoe-relay - install -d -m0755 $(IDIR_PPPOE_RELAY)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(IDIR_PPPOE_RELAY)/usr/sbin/ - $(RSTRIP) $(IDIR_PPPOE_RELAY) - $(IPKG_BUILD) $(IDIR_PPPOE_RELAY) $(PACKAGE_DIR) - -$(IPKG_PPPOE_SERVER): - install -d -m0755 $(IDIR_PPPOE_SERVER)/etc/default - install -m0755 ./files/pppoe-server.default $(IDIR_PPPOE_SERVER)/etc/default/pppoe-server - install -d -m0755 $(IDIR_PPPOE_SERVER)/etc/init.d - install -m0755 ./files/pppoe-server.init $(IDIR_PPPOE_SERVER)/etc/init.d/pppoe-server - install -d -m0755 $(IDIR_PPPOE_SERVER)/etc/ppp - install -m0644 $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(IDIR_PPPOE_SERVER)/etc/ppp/ - install -d -m0755 $(IDIR_PPPOE_SERVER)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(IDIR_PPPOE_SERVER)/usr/sbin/ - $(RSTRIP) $(IDIR_PPPOE_SERVER) - $(IPKG_BUILD) $(IDIR_PPPOE_SERVER) $(PACKAGE_DIR) - -$(IPKG_PPPOE_SNIFF): - install -d -m0755 $(IDIR_PPPOE_SNIFF)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(IDIR_PPPOE_SNIFF)/usr/sbin/ - $(RSTRIP) $(IDIR_PPPOE_SNIFF) - $(IPKG_BUILD) $(IDIR_PPPOE_SNIFF) $(PACKAGE_DIR) - diff --git a/openwrt/package/rp-pppoe/files/pppoe-client.init b/openwrt/package/rp-pppoe/files/pppoe-client.init deleted file mode 100644 index fb3f4ca3e83..00000000000 --- a/openwrt/package/rp-pppoe/files/pppoe-client.init +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -case "$1" in - start|stop) - adsl-$1 - ;; - *) - echo "usage: $0 {start|stop}" - exit 1 -esac - -exit $? diff --git a/openwrt/package/rp-pppoe/files/pppoe-relay.default b/openwrt/package/rp-pppoe/files/pppoe-relay.default deleted file mode 100644 index 47a3892c4c5..00000000000 --- a/openwrt/package/rp-pppoe/files/pppoe-relay.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="-C eth2 -S vlan1" diff --git a/openwrt/package/rp-pppoe/files/pppoe-relay.init b/openwrt/package/rp-pppoe/files/pppoe-relay.init deleted file mode 100644 index d8212f25883..00000000000 --- a/openwrt/package/rp-pppoe/files/pppoe-relay.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/pppoe-relay -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - pppoe-relay $OPTIONS - ;; - *) - echo "usage: $0 (start)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/rp-pppoe/files/pppoe-server.default b/openwrt/package/rp-pppoe/files/pppoe-server.default deleted file mode 100644 index 72a8c01990b..00000000000 --- a/openwrt/package/rp-pppoe/files/pppoe-server.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="-C MyRouter -I eth2" diff --git a/openwrt/package/rp-pppoe/files/pppoe-server.init b/openwrt/package/rp-pppoe/files/pppoe-server.init deleted file mode 100644 index 2768895de0f..00000000000 --- a/openwrt/package/rp-pppoe/files/pppoe-server.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/pppoe-server -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - pppoe-server $OPTIONS - ;; - *) - echo "usage: $0 (start)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/rp-pppoe/ipkg/pppoe-client.conffiles b/openwrt/package/rp-pppoe/ipkg/pppoe-client.conffiles deleted file mode 100644 index 95004e5cd9a..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/pppoe-client.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/pppoe.conf diff --git a/openwrt/package/rp-pppoe/ipkg/pppoe-client.control b/openwrt/package/rp-pppoe/ipkg/pppoe-client.control deleted file mode 100644 index dd64953c319..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/pppoe-client.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pppoe-client -Priority: optional -Section: net -Description: PPPoE (PPP over Ethernet) client -Depends: ppp diff --git a/openwrt/package/rp-pppoe/ipkg/pppoe-relay.conffiles b/openwrt/package/rp-pppoe/ipkg/pppoe-relay.conffiles deleted file mode 100644 index 9bcce348afa..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/pppoe-relay.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/pppoe-relay diff --git a/openwrt/package/rp-pppoe/ipkg/pppoe-relay.control b/openwrt/package/rp-pppoe/ipkg/pppoe-relay.control deleted file mode 100644 index de64b0becc4..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/pppoe-relay.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: pppoe-relay -Priority: optional -Section: net -Description: PPPoE (PPP over Ethernet) relay diff --git a/openwrt/package/rp-pppoe/ipkg/pppoe-server.conffiles b/openwrt/package/rp-pppoe/ipkg/pppoe-server.conffiles deleted file mode 100644 index e2ffe554511..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/pppoe-server.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/default/pppoe-server -/etc/ppp/pppoe-server-options diff --git a/openwrt/package/rp-pppoe/ipkg/pppoe-server.control b/openwrt/package/rp-pppoe/ipkg/pppoe-server.control deleted file mode 100644 index 530017b9657..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/pppoe-server.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pppoe-server -Priority: optional -Section: net -Description: PPPoE (PPP over Ethernet) server -Depends: ppp diff --git a/openwrt/package/rp-pppoe/ipkg/pppoe-sniff.control b/openwrt/package/rp-pppoe/ipkg/pppoe-sniff.control deleted file mode 100644 index df7b95cf271..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/pppoe-sniff.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: pppoe-sniff -Priority: optional -Section: net -Description: PPPoE (PPP over Ethernet) frame sniffer diff --git a/openwrt/package/rp-pppoe/ipkg/rules b/openwrt/package/rp-pppoe/ipkg/rules deleted file mode 100644 index dc8444704a9..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/rules +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/make -f - -ifneq ($(strip ${IPKG_RULES_INC}),) - include $(IPKG_RULES_INC) -endif - -## - -PKG_VERSION := $(shell cat ./ipkg/version) -CURRENT_DIR := $(shell pwd) -INSTALL_DIR ?= $(CURRENT_DIR)/ipkg-install - -unexport INSTALL_DIR - -I_PPPOE_SERVER := ipkg/pppoe-server -I_PPPOE_RELAY := ipkg/pppoe-relay -I_PPPOE_SNIFF := ipkg/pppoe-sniff -I_PPPOE_CLIENT := ipkg/pppoe-client - -BUILD_DEPS = \ - -CONFIGURE_OPTS = \ - -## - -all: package - - -.stamp-configured: $(BUILD_DEPS) - - cd src ; \ - rm -rf config.cache ; \ - $(TARGET_CONFIGURE_OPTS) \ - ac_cv_func_setvbuf_reversed=no \ - ac_cv_sizeof_unsigned_short=2 \ - ac_cv_sizeof_unsigned_int=4 \ - ac_cv_sizeof_unsigned_long=4 \ - ac_cv_linux_kernel_pppoe=yes \ - ac_cv_pack_bitfields_reversed=yes \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - $(CONFIGURE_OPTS) \ - - touch .stamp-configured - - -.stamp-built: .stamp-configured - - $(MAKE) -C src \ - $(TARGET_CONFIGURE_OPTS) \ - - touch .stamp-built - - -$(INSTALL_DIR)/usr/sbin/pppoe: .stamp-built - - mkdir -p $(INSTALL_DIR) - - $(MAKE) -C src \ - DESTDIR="$(INSTALL_DIR)" \ - install - - -configure: .stamp-configured - - -build: .stamp-built - - -install: $(INSTALL_DIR)/usr/sbin/pppoe - - -package: $(INSTALL_DIR)/usr/sbin/pppoe - - mkdir -p $(I_PPPOE_SERVER)/etc/ppp - cp -fpR $(INSTALL_DIR)/etc/ppp/pppoe-server-options $(I_PPPOE_SERVER)/etc/ppp/ - mkdir -p $(I_PPPOE_SERVER)/usr/sbin - cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-server $(I_PPPOE_SERVER)/usr/sbin/ - $(STRIP) $(I_PPPOE_SERVER)/usr/sbin/* - - mkdir -p $(I_PPPOE_RELAY)/usr/sbin - cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-relay $(I_PPPOE_RELAY)/usr/sbin/ - $(STRIP) $(I_PPPOE_RELAY)/usr/sbin/* - - mkdir -p $(I_PPPOE_SNIFF)/usr/sbin - cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-sniff $(I_PPPOE_SNIFF)/usr/sbin/ - $(STRIP) $(I_PPPOE_SNIFF)/usr/sbin/* - - mkdir -p $(I_PPPOE_CLIENT)/etc - cp -fpR $(INSTALL_DIR)/etc/pppoe.conf $(I_PPPOE_CLIENT)/etc/ - mkdir -p $(I_PPPOE_CLIENT)/usr/sbin - cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe $(I_PPPOE_CLIENT)/usr/sbin/ - $(STRIP) $(I_PPPOE_CLIENT)/usr/sbin/* - cp -fpR $(INSTALL_DIR)/usr/sbin/adsl-* $(I_PPPOE_CLIENT)/usr/sbin/ - - chmod 0755 ipkg/*/etc/ - chmod 0755 ipkg/*/etc/default/ - chmod 0644 ipkg/*/etc/default/* - chmod 0755 ipkg/*/etc/init.d/ - chmod 0755 ipkg/*/etc/init.d/* - - chmod 0755 ipkg/*/CONTROL/ - chmod 0644 ipkg/*/CONTROL/control - -chmod 0644 ipkg/*/CONTROL/conffiles - - perl -pi -e "s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg/*/CONTROL/control -ifneq ($(strip $(PKG_VERSION)),) - perl -pi -e "s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg/*/CONTROL/control -endif - - $(IPKG_BUILD) $(I_PPPOE_SERVER) $(IPKG_TARGET_DIR) - $(IPKG_BUILD) $(I_PPPOE_RELAY) $(IPKG_TARGET_DIR) - $(IPKG_BUILD) $(I_PPPOE_SNIFF) $(IPKG_TARGET_DIR) - $(IPKG_BUILD) $(I_PPPOE_CLIENT) $(IPKG_TARGET_DIR) - - -clean: - - -$(MAKE) -C src \ - clean - - rm -rf .stamp-* \ - $(INSTALL_DIR)/etc/pppoe.conf \ - $(INSTALL_DIR)/etc/ppp/pppoe-server-options \ - $(INSTALL_DIR)/usr/doc/rp-pppoe* \ - $(INSTALL_DIR)/usr/sbin/adsl-* \ - $(INSTALL_DIR)/usr/sbin/pppoe* \ - $(INSTALL_DIR)/usr/share/man/man5/pppoe.conf.5* \ - $(INSTALL_DIR)/usr/share/man/man8/adsl-*.8* \ - $(INSTALL_DIR)/usr/share/man/man8/pppoe*.8* \ - $(I_PPPOE_SERVER)/etc/ppp \ - $(I_PPPOE_SERVER)/usr \ - $(I_PPPOE_RELAY)/usr \ - $(I_PPPOE_SNIFF)/usr \ - $(I_PPPOE_CLIENT)/etc/ppp* \ - $(I_PPPOE_CLIENT)/usr \ - - -control: - - @cat $(I_PPPOE_SERVER)/CONTROL/control - @echo - @cat $(I_PPPOE_RELAY)/CONTROL/control - @echo - @cat $(I_PPPOE_SNIFF)/CONTROL/control - @echo - @cat $(I_PPPOE_CLIENT)/CONTROL/control - @echo - - -.PHONY: configure build install package clean control diff --git a/openwrt/package/rp-pppoe/ipkg/version b/openwrt/package/rp-pppoe/ipkg/version deleted file mode 100644 index 99d9948ce5e..00000000000 --- a/openwrt/package/rp-pppoe/ipkg/version +++ /dev/null @@ -1 +0,0 @@ -3.5-4 diff --git a/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-Makefile.patch b/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-Makefile.patch deleted file mode 100644 index 188a0e11cfc..00000000000 --- a/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-Makefile.patch +++ /dev/null @@ -1,217 +0,0 @@ -diff -ruN rp-pppoe-3.5-orig/src/Makefile.in rp-pppoe-3.5-4/src/Makefile.in ---- rp-pppoe-3.5-orig/src/Makefile.in 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/src/Makefile.in 2005-03-09 16:37:38.000000000 +0100 -@@ -62,21 +62,23 @@ - TARGETS=@TARGETS@ - PPPOE_SERVER_LIBS=$(LIC_LIBDIR) $(LIC_LIB) - -+LIBS="-lc" -+ - all: $(TARGETS) - @echo "" - @echo "Type 'make install' as root to install the software." - - pppoe-sniff: pppoe-sniff.o if.o common.o debug.o -- @CC@ -o pppoe-sniff pppoe-sniff.o if.o common.o debug.o -+ @CC@ $(CFLAGS) -o pppoe-sniff pppoe-sniff.o if.o common.o debug.o $(LIBS) - - pppoe-server: pppoe-server.o if.o debug.o common.o md5.o libevent/libevent.a @PPPOE_SERVER_DEPS@ -- @CC@ -o pppoe-server @RDYNAMIC@ pppoe-server.o if.o debug.o common.o md5.o $(PPPOE_SERVER_LIBS) -Llibevent -levent -+ @CC@ $(CFLAGS) -o pppoe-server @RDYNAMIC@ pppoe-server.o if.o debug.o common.o md5.o $(PPPOE_SERVER_LIBS) -Llibevent -levent $(LIBS) - - pppoe: pppoe.o if.o debug.o common.o ppp.o discovery.o -- @CC@ -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o -+ @CC@ $(CFLAGS) -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o $(LIBS) - - pppoe-relay: relay.o if.o debug.o common.o -- @CC@ -o pppoe-relay relay.o if.o debug.o common.o -+ @CC@ $(CFLAGS) -o pppoe-relay relay.o if.o debug.o common.o $(LIBS) - - pppoe.o: pppoe.c pppoe.h - @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe.o pppoe.c -@@ -119,7 +121,7 @@ - @CC@ '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I$(PPPD_INCDIR) -c -o plugin/plugin.o -fPIC plugin.c - - plugin/libplugin.a: plugin/discovery.o plugin/if.o plugin/common.o plugin/debug.o -- ar -rc $@ $^ -+ $(AR) -rc $@ $^ - - plugin/discovery.o: discovery.c - @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o plugin/discovery.o -fPIC discovery.c -@@ -134,78 +136,78 @@ - @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o plugin/common.o -fPIC common.c - - install: all -- -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir) -- $(install) -m 755 -s pppoe $(RPM_INSTALL_ROOT)$(sbindir) -- $(install) -m 755 -s pppoe-server $(RPM_INSTALL_ROOT)$(sbindir) -- if test -x licensed-only/pppoe-server-control ; then $(install) -m 755 -s licensed-only/pppoe-server-control $(RPM_INSTALL_ROOT)$(sbindir); fi -- if test -x pppoe-relay ; then $(install) -m 755 -s pppoe-relay $(RPM_INSTALL_ROOT)$(sbindir); fi -- if test -x pppoe-sniff; then $(install) -m 755 -s pppoe-sniff $(RPM_INSTALL_ROOT)$(sbindir); fi -- $(install) -m 755 ../scripts/adsl-connect $(RPM_INSTALL_ROOT)$(sbindir) -- $(install) -m 755 ../scripts/adsl-start $(RPM_INSTALL_ROOT)$(sbindir) -- $(install) -m 755 ../scripts/adsl-status $(RPM_INSTALL_ROOT)$(sbindir) -- $(install) -m 755 ../scripts/adsl-stop $(RPM_INSTALL_ROOT)$(sbindir) -- $(install) -m 755 ../scripts/adsl-setup $(RPM_INSTALL_ROOT)$(sbindir) -- -mkdir -p $(RPM_INSTALL_ROOT)$(docdir) -- $(install) -m 644 ../doc/CHANGES $(RPM_INSTALL_ROOT)$(docdir) -- $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(docdir) -- $(install) -m 644 ../doc/HOW-TO-CONNECT $(RPM_INSTALL_ROOT)$(docdir) -- $(install) -m 644 ../doc/LICENSE $(RPM_INSTALL_ROOT)$(docdir) -- $(install) -m 644 ../README $(RPM_INSTALL_ROOT)$(docdir) -- $(install) -m 644 ../SERVPOET $(RPM_INSTALL_ROOT)$(docdir) -- $(install) -m 644 ../configs/pap-secrets $(RPM_INSTALL_ROOT)$(docdir) -- -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man8 -+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) -+ $(install) -m 755 pppoe $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) -+ $(install) -m 755 pppoe-server $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) -+ if test -x licensed-only/pppoe-server-control ; then $(install) -m 755 licensed-only/pppoe-server-control $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi -+ if test -x pppoe-relay ; then $(install) -m 755 pppoe-relay $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi -+ if test -x pppoe-sniff; then $(install) -m 755 pppoe-sniff $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi -+ $(install) -m 755 ../scripts/adsl-connect $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) -+ $(install) -m 755 ../scripts/adsl-start $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) -+ $(install) -m 755 ../scripts/adsl-status $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) -+ $(install) -m 755 ../scripts/adsl-stop $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) -+ $(install) -m 755 ../scripts/adsl-setup $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) -+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) -+ $(install) -m 644 ../doc/CHANGES $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) -+ $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) -+ $(install) -m 644 ../doc/HOW-TO-CONNECT $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) -+ $(install) -m 644 ../doc/LICENSE $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) -+ $(install) -m 644 ../README $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) -+ $(install) -m 644 ../SERVPOET $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) -+ $(install) -m 644 ../configs/pap-secrets $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir) -+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 - for i in $(TARGETS) ; do \ - if test -f ../man/$$i.8 ; then \ -- $(install) -m 644 ../man/$$i.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 || exit 1; \ -+ $(install) -m 644 ../man/$$i.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 || exit 1; \ - fi; \ - done -- $(install) -m 644 ../man/adsl-start.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 -- $(install) -m 644 ../man/adsl-stop.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 -- $(install) -m 644 ../man/adsl-status.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 -- $(install) -m 644 ../man/adsl-connect.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 -- $(install) -m 644 ../man/adsl-setup.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 -- -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man5 -- $(install) -m 644 ../man/pppoe.conf.5 $(RPM_INSTALL_ROOT)$(mandir)/man5 -- -mkdir -p $(RPM_INSTALL_ROOT)/etc/ppp -- -mkdir -p $(RPM_INSTALL_ROOT)$(PLUGIN_DIR) -- -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(PLUGIN_DIR)/README -- @if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(PLUGIN_DIR); fi -- @for i in pppoe.conf firewall-standalone firewall-masq ; do \ -- if [ ! -f $(RPM_INSTALL_ROOT)/etc/ppp/$$i ] ; then \ -- $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ -+ $(install) -m 644 ../man/adsl-start.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 -+ $(install) -m 644 ../man/adsl-stop.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 -+ $(install) -m 644 ../man/adsl-status.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 -+ $(install) -m 644 ../man/adsl-connect.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 -+ $(install) -m 644 ../man/adsl-setup.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 -+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5 -+ $(install) -m 644 ../man/pppoe.conf.5 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5 -+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/ppp -+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR) -+ -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR)/README -+ @if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR); fi -+ @for i in pppoe.conf; do \ -+ if [ ! -f $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i ] ; then \ -+ $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)$(DESTDIR)/etc ; \ - else \ -- echo "NOT overwriting existing $(RPM_INSTALL_ROOT)/etc/ppp/$$i" ;\ -- $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ -+ echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i" ;\ -+ $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i-$(VERSION) ;\ - fi ;\ - done -- @if [ ! -f $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) ] ; then \ -- $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) ; \ -+ @if [ ! -f $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS) ] ; then \ -+ $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS) ; \ - else \ -- echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS)"; \ -- $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS)-example ; \ -+ echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS)"; \ -+ $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS)-example ; \ - fi - @if [ -f /etc/redhat-release ] ; then \ -- echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ -- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ -- $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ -+ echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \ -+ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\ -+ $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \ - fi - @if [ -f /etc/turbolinux-release ] ; then \ -- echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ -- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ -- $(install) -m 755 ../scripts/adsl-init-turbolinux $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ -+ echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \ -+ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\ -+ $(install) -m 755 ../scripts/adsl-init-turbolinux $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \ - fi - @if [ -f /etc/SuSE-release ] ; then \ -- echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ -- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ -- $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ -+ echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \ -+ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\ -+ $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \ - fi - - # L2TP - @if [ -f l2tp/handlers/sync-pppd.so ] ; then \ -- mkdir -p $(RPM_INSTALL_ROOT)/usr/lib/l2tp/plugins ; \ -- $(install) -m 755 l2tp/handlers/sync-pppd.so $(RPM_INSTALL_ROOT)/usr/lib/l2tp/plugins ; \ -- mkdir -p $(RPM_INSTALL_ROOT)/etc/l2tp ; \ -- $(install) -m 600 l2tp/l2tp.conf $(RPM_INSTALL_ROOT)/etc/l2tp/l2tp.conf.example ; \ -+ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/usr/lib/l2tp/plugins ; \ -+ $(install) -m 755 l2tp/handlers/sync-pppd.so $(RPM_INSTALL_ROOT)$(DESTDIR)/usr/lib/l2tp/plugins ; \ -+ mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp ; \ -+ $(install) -m 600 l2tp/l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp/l2tp.conf.example ; \ - fi - @echo "" - @echo "Type 'adsl-setup' to configure the software." -@@ -288,7 +290,7 @@ - cd .. && rpm -ba servpoet.spec - - clean: -- rm -f *.o pppoe pppoe-sniff pppoe-server core rp-pppoe.so plugin/*.o plugin/libplugin.a *~ -+ rm -f *.o pppoe pppoe-relay pppoe-sniff pppoe-server core rp-pppoe.so plugin/*.o plugin/libplugin.a *~ - test -f licensed-only/Makefile && $(MAKE) -C licensed-only clean || true - test -f libevent/Makefile && $(MAKE) -C libevent clean || true - test -f l2tp/Makefile && $(MAKE) -C l2tp clean || true -diff -ruN rp-pppoe-3.5-orig/src/libevent/Makefile.in rp-pppoe-3.5-4/src/libevent/Makefile.in ---- rp-pppoe-3.5-orig/src/libevent/Makefile.in 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/src/libevent/Makefile.in 2005-03-09 16:37:38.000000000 +0100 -@@ -18,24 +18,24 @@ - - libevent.a: $(OBJS) - rm -f libevent.a -- ar -cq libevent.a $(OBJS) -+ $(AR) r libevent.a $(OBJS) - @RANLIB@ libevent.a - - event.o: event.c $(HDRS) -- gcc $(CFLAGS) -c -o event.o event.c -+ @CC@ $(CFLAGS) -c -o event.o event.c - - hash.o: hash.c $(HDRS) -- gcc $(CFLAGS) -c -o hash.o hash.c -+ @CC@ $(CFLAGS) -c -o hash.o hash.c - - event_sig.o: event_sig.c $(HDRS) -- gcc $(CFLAGS) -c -o event_sig.o event_sig.c -+ @CC@ $(CFLAGS) -c -o event_sig.o event_sig.c - - event_tcp.o: event_tcp.c $(HDRS) -- gcc $(CFLAGS) -c -o event_tcp.o event_tcp.c -+ @CC@ $(CFLAGS) -c -o event_tcp.o event_tcp.c - - clean: FORCE - rm -f *.a *.o *~ - - FORCE: - --.phony: FORCE -\ No newline at end of file -+.phony: FORCE diff --git a/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-configure.patch b/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-configure.patch deleted file mode 100644 index d50e467969c..00000000000 --- a/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-configure.patch +++ /dev/null @@ -1,241 +0,0 @@ -diff -ruN rp-pppoe-3.5-orig/src/configure rp-pppoe-3.5-4/src/configure ---- rp-pppoe-3.5-orig/src/configure 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/src/configure 2005-03-09 16:37:38.000000000 +0100 -@@ -1707,6 +1707,7 @@ - #line 1708 "configure" - #include "confdefs.h" - #include -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -1715,7 +1716,7 @@ - exit(0); - } - EOF --if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_unsigned_short=`cat conftestval` - else -@@ -1735,7 +1736,7 @@ - - - echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6 --echo "configure:1739: checking size of unsigned int" >&5 -+echo "configure:1740: checking size of unsigned int" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1743,9 +1744,10 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -1754,7 +1756,7 @@ - exit(0); - } - EOF --if { (eval echo configure:1758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_unsigned_int=`cat conftestval` - else -@@ -1774,7 +1776,7 @@ - - - echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6 --echo "configure:1778: checking size of unsigned long" >&5 -+echo "configure:1780: checking size of unsigned long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1782,9 +1784,10 @@ - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -+#include - main() - { - FILE *f=fopen("conftestval", "w"); -@@ -1793,7 +1796,7 @@ - exit(0); - } - EOF --if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_sizeof_unsigned_long=`cat conftestval` - else -@@ -1816,7 +1819,7 @@ - # Extract the first word of "pppd", so it can be a program name with args. - set dummy pppd; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1820: checking for $ac_word" >&5 -+echo "configure:1823: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PPPD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1853,7 +1856,7 @@ - # Extract the first word of "setsid", so it can be a program name with args. - set dummy setsid; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1857: checking for $ac_word" >&5 -+echo "configure:1860: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_SETSID'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1890,7 +1893,7 @@ - # Extract the first word of "id", so it can be a program name with args. - set dummy id; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1894: checking for $ac_word" >&5 -+echo "configure:1897: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_ID'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -1925,14 +1928,11 @@ - - - echo $ac_n "checking for Linux 2.4.X kernel-mode PPPoE support""... $ac_c" 1>&6 --echo "configure:1929: checking for Linux 2.4.X kernel-mode PPPoE support" >&5 --if test "`uname -s`" = "Linux" ; then --modprobe ppp_generic > /dev/null 2>&1 --modprobe ppp_async > /dev/null 2>&1 --modprobe n_hdlc > /dev/null 2>&1 --modprobe ppp_synctty > /dev/null 2>&1 --modprobe pppoe > /dev/null 2>&1 --if test "$cross_compiling" = yes; then -+echo "configure:1932: checking for Linux 2.4.X kernel-mode PPPoE support" >&5 -+if eval "test \"`echo '$''{'ac_cv_linux_kernel_pppoe'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&6 -+ - $ECHO $ac_cv_linux_kernel_pppoe - if test "$ac_cv_linux_kernel_pppoe" != yes ; then - if test "$LINUX_KERNELMODE_PLUGIN" = rp-pppoe.so; then -@@ -2018,11 +2018,14 @@ - - echo $ac_n "checking packing order of bit fields""... $ac_c" 1>&6 - echo "configure:2021: checking packing order of bit fields" >&5 --if test "$cross_compiling" = yes; then -+if eval "test \"`echo '$''{'ac_cv_pack_bitfields_reversed'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then -- PACK=normal -+ ac_cv_pack_bitfields_reversed=no - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* -- PACK=rev -+ ac_cv_pack_bitfields_reversed=yes - fi - rm -fr conftest* - fi - -+fi -+ -+echo "$ac_t""$ac_cv_pack_bitfields_reversed" 1>&6 - --if test "$PACK" = "rev" ; then -+if test "$ac_cv_pack_bitfields_reversed" = "yes" ; then - $ECHO "reversed" - cat >> confdefs.h <<\EOF - #define PACK_BITFIELDS_REVERSED 1 -diff -ruN rp-pppoe-3.5-orig/src/configure.in rp-pppoe-3.5-4/src/configure.in ---- rp-pppoe-3.5-orig/src/configure.in 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/src/configure.in 2005-03-09 16:37:38.000000000 +0100 -@@ -130,15 +130,8 @@ - AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH) - - dnl Check for Linux-specific kernel support for PPPoE --AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support) --if test "`uname -s`" = "Linux" ; then --dnl Do a bunch of modprobes. Can't hurt; might help. --modprobe ppp_generic > /dev/null 2>&1 --modprobe ppp_async > /dev/null 2>&1 --modprobe n_hdlc > /dev/null 2>&1 --modprobe ppp_synctty > /dev/null 2>&1 --modprobe pppoe > /dev/null 2>&1 --AC_TRY_RUN([#include -+AC_CACHE_CHECK([for Linux 2.4.X kernel-mode PPPoE support], ac_cv_linux_kernel_pppoe, -+[AC_TRY_RUN([#include - #include - #include - #include -@@ -146,10 +139,7 @@ - { - if (socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OE) >= 0) return 0; else return 1; - } --], ac_cv_linux_kernel_pppoe=yes, ac_cv_linux_kernel_pppoe=no) --else -- ac_cv_linux_kernel_pppoe=no --fi -+], ac_cv_linux_kernel_pppoe=yes, ac_cv_linux_kernel_pppoe=no)]) - - $ECHO $ac_cv_linux_kernel_pppoe - if test "$ac_cv_linux_kernel_pppoe" != yes ; then -@@ -208,8 +198,8 @@ - esac - - dnl Figure out packing order of structures --AC_MSG_CHECKING(packing order of bit fields) --AC_TRY_RUN([ -+AC_CACHE_CHECK([packing order of bit fields], ac_cv_pack_bitfields_reversed, -+[AC_TRY_RUN([ - union foo { - struct bar { - unsigned int ver:4; -@@ -231,9 +221,9 @@ - } else { - return 2; - } --}], PACK=normal, PACK=rev) -+}], ac_cv_pack_bitfields_reversed=no, ac_cv_pack_bitfields_reversed=yes)]) - --if test "$PACK" = "rev" ; then -+if test "$ac_cv_pack_bitfields_reversed" = "yes" ; then - $ECHO "reversed" - AC_DEFINE(PACK_BITFIELDS_REVERSED) - else diff --git a/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-scripts-fixes.patch b/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-scripts-fixes.patch deleted file mode 100644 index 7a86abbcb48..00000000000 --- a/openwrt/package/rp-pppoe/patches/rp-pppoe-3.5-scripts-fixes.patch +++ /dev/null @@ -1,227 +0,0 @@ -diff -ruN rp-pppoe-3.5-orig/scripts/adsl-connect.in rp-pppoe-3.5-4/scripts/adsl-connect.in ---- rp-pppoe-3.5-orig/scripts/adsl-connect.in 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/scripts/adsl-connect.in 2005-03-10 01:01:15.000000000 +0100 -@@ -18,7 +18,7 @@ - # Usage: adsl-connect [config_file] - # adsl-connect interface user [config_file] - # Second form overrides USER and ETH from config file. --# If config_file is omitted, defaults to /etc//ppp/pppoe.conf -+# If config_file is omitted, defaults to /etc/pppoe.conf - # - #*********************************************************************** - -@@ -30,25 +30,22 @@ - # Paths to programs - IFCONFIG=/sbin/ifconfig - PPPD=@PPPD@ --SETSID=@SETSID@ -+SETSID= - PPPOE=@sbindir@/pppoe - LOGGER="/usr/bin/logger -t `basename $0`" - -+#MODPROBE=modprobe -+MODPROBE=insmod -+ - # Set to "C" locale so we can parse messages from commands - LANG=C - export LANG - --# Must be root --if test "`@ID@ -u`" != 0 ; then -- echo "$0: You must be root to run this script" >& 2 -- exit 1 --fi -- - if test "$SETSID" != "" -a ! -x "$SETSID"; then - SETSID="" - fi - --CONFIG=/etc//ppp/pppoe.conf -+CONFIG=/etc/pppoe.conf - USER="" - ETH="" - -@@ -117,12 +114,12 @@ - if test `uname -s` = Linux ; then - $IFCONFIG $ETH up mtu 1500 - # For 2.4 kernels. Will fail on 2.2.x, but who cares? -- modprobe ppp_generic > /dev/null 2>&1 -- modprobe ppp_async > /dev/null 2>&1 -- modprobe ppp_synctty > /dev/null 2>&1 -+ $MODPROBE ppp_generic > /dev/null 2>&1 -+ $MODPROBE ppp_async > /dev/null 2>&1 -+ $MODPROBE ppp_synctty > /dev/null 2>&1 - if test -n "$LINUX_PLUGIN" ; then -- modprobe pppox > /dev/null 2>&1 -- modprobe pppoe > /dev/null 2>&1 -+ $MODPROBE pppox > /dev/null 2>&1 -+ $MODPROBE pppoe > /dev/null 2>&1 - fi - fi - -@@ -131,7 +128,7 @@ - PPPD_SYNC=sync - # Increase the chances of it working on Linux... - if test `uname -s` = Linux ; then -- modprobe n_hdlc > /dev/null 2>&1 -+ $MODPROBE n_hdlc > /dev/null 2>&1 - fi - else - PPPOE_SYNC="" -@@ -204,7 +201,7 @@ - - # Interface name MUST BE LAST!! - PLUGIN_OPTS="$PLUGIN_OPTS $ETH" -- modprobe pppoe > /dev/null 2>&1 -+ $MODPROBE pppoe > /dev/null 2>&1 - fi - - if test "$DEFAULTROUTE" != "no" ; then -diff -ruN rp-pppoe-3.5-orig/scripts/adsl-setup.in rp-pppoe-3.5-4/scripts/adsl-setup.in ---- rp-pppoe-3.5-orig/scripts/adsl-setup.in 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/scripts/adsl-setup.in 2005-03-09 17:24:02.000000000 +0100 -@@ -27,7 +27,7 @@ - LANG=C - export LANG - --CONFIG=/etc/ppp/pppoe.conf -+CONFIG=/etc/pppoe.conf - - # Protect created files - umask 077 -@@ -46,12 +46,6 @@ - $ECHO "properly..." - $ECHO "" - --# Must be root --if [ "`@ID@ -u`" != 0 ] ; then -- $ECHO "$0: Sorry, you must be root to run this script" -- exit 1 --fi -- - # Prototype config file must exist - if [ ! -r "$CONFIG" ] ; then - $ECHO "Oh, dear, I don't see the file '$CONFIG' anywhere. Please" -@@ -280,12 +274,7 @@ - fi - fi - --# Where is pppd likely to put its pid? --if [ -d /var/run ] ; then -- VARRUN=/var/run --else -- VARRUN=/etc/ppp --fi -+VARRUN=/var/run - - # Some #$(*& ISP's use a slash in the user name... - sed -e "s&^USER=.*&USER='$U'&" \ -diff -ruN rp-pppoe-3.5-orig/scripts/adsl-start.in rp-pppoe-3.5-4/scripts/adsl-start.in ---- rp-pppoe-3.5-orig/scripts/adsl-start.in 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/scripts/adsl-start.in 2005-03-10 00:53:13.000000000 +0100 -@@ -18,7 +18,7 @@ - # Usage: adsl-start [config_file] - # adsl-start interface user [config_file] - # Second form overrides USER and ETH from config file. --# If config_file is omitted, defaults to /etc/ppp/pppoe.conf -+# If config_file is omitted, defaults to /etc/pppoe.conf - # - #*********************************************************************** - -@@ -36,15 +36,13 @@ - export LANG - - # Defaults --CONFIG=/etc/ppp/pppoe.conf -+CONFIG=/etc/pppoe.conf - USER="" - ETH="" - ME=`basename $0` --# Must be root --if [ "`@ID@ -u`" != 0 ] ; then -- $ECHO "$ME: You must be root to run this script" >& 2 -- exit 1 --fi -+ -+#TTY_S="tty -s" -+TTY_S=/bin/true - - # Debugging - if [ "$DEBUG" = "1" ] ; then -@@ -139,6 +137,8 @@ - fi - # Delete bogus PIDFILE - rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start" -+else -+ mkdir -p /var/run - fi - - echo $$ > $PIDFILE.start -@@ -169,14 +169,14 @@ - # Looks like the interface came up - if [ $? = 0 ] ; then - # Print newline if standard input is a TTY -- tty -s && $ECHO " Connected!" -+ $TTY_S && $ECHO " Connected!" - exit 0 - fi - - if test -n "$FORCEPING" ; then - $ECHO -n "$FORCEPING" - else -- tty -s && $ECHO -n "$PING" -+ $TTY_S && $ECHO -n "$PING" - fi - sleep $CONNECT_POLL - TIME=`expr $TIME + $CONNECT_POLL` -diff -ruN rp-pppoe-3.5-orig/scripts/adsl-status rp-pppoe-3.5-4/scripts/adsl-status ---- rp-pppoe-3.5-orig/scripts/adsl-status 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/scripts/adsl-status 2005-03-10 01:01:17.000000000 +0100 -@@ -15,12 +15,12 @@ - # LIC: GPL - # - # Usage: adsl-status [config_file] --# If config_file is omitted, defaults to /etc/ppp/pppoe.conf -+# If config_file is omitted, defaults to /etc/pppoe.conf - # - #*********************************************************************** - - # Defaults --CONFIG=/etc/ppp/pppoe.conf -+CONFIG=/etc/pppoe.conf - - case "$#" in - 1) -@@ -58,10 +58,7 @@ - - PPPD_PID=`cat "$PPPD_PIDFILE"` - --# Sigh. Some versions of pppd put PID files in /var/run; others put them --# in /etc/ppp. Since it's too messy to figure out what pppd does, we --# try both locations. --for i in /etc/ppp/ppp*.pid /var/run/ppp*.pid ; do -+for i in /var/run/ppp*.pid ; do - if [ -r $i ] ; then - PID=`cat $i` - if [ "$PID" = "$PPPD_PID" ] ; then -diff -ruN rp-pppoe-3.5-orig/scripts/adsl-stop.in rp-pppoe-3.5-4/scripts/adsl-stop.in ---- rp-pppoe-3.5-orig/scripts/adsl-stop.in 2002-07-08 16:38:24.000000000 +0200 -+++ rp-pppoe-3.5-4/scripts/adsl-stop.in 2005-03-09 16:37:38.000000000 +0100 -@@ -16,7 +16,7 @@ - # LIC: GPL - # - # Usage: adsl-stop [config_file] --# If config_file is omitted, defaults to /etc/ppp/pppoe.conf -+# If config_file is omitted, defaults to /etc/pppoe.conf - # - #*********************************************************************** - -@@ -28,7 +28,7 @@ - LOGGER="/usr/bin/logger -t $ME" - CONFIG="$1" - if [ "$CONFIG" = "" ] ; then -- CONFIG=/etc/ppp/pppoe.conf -+ CONFIG=/etc/pppoe.conf - fi - - if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then diff --git a/openwrt/package/rrdcollect/Config.in b/openwrt/package/rrdcollect/Config.in deleted file mode 100644 index 62add2e9623..00000000000 --- a/openwrt/package/rrdcollect/Config.in +++ /dev/null @@ -1,33 +0,0 @@ -config BR2_PACKAGE_RRDCOLLECT - prompt "rrdcollect........................ Round-Robin Database (RRD) collecting daemon" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBRRD || BR2_PACKAGE_LIBRRD1 - help - RRDcollect is a daemon which polls ceratin files in /proc/ - directory, gathering data and storing it inside RRDtool's - database files. Being written in C should be both fast - and resources-friendly. Supports both scanf(3)-style - pattern matches and perl compatible regular expressions. - - http://rrdcollect.sourceforge.net/ - - This package contains only the deamon program. - -config BR2_PACKAGE_RRDCOLLECT_EXAMPLE - prompt "rrdcollect-example.............. Example setup for RRD collecting daemon above" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_RRDCOLLECT - help - RRDcollect is a daemon which polls ceratin files in /proc/ - directory, gathering data and storing it inside RRDtool's - database files. Being written in C should be both fast - and resources-friendly. Supports both scanf(3)-style - pattern matches and perl compatible regular expressions. - - http://rrdcollect.sourceforge.net/ - - This packages contains programs and configuration files to - start graphing a basic set of ressources on your router. - diff --git a/openwrt/package/rrdcollect/Makefile b/openwrt/package/rrdcollect/Makefile deleted file mode 100644 index 9f105dbe093..00000000000 --- a/openwrt/package/rrdcollect/Makefile +++ /dev/null @@ -1,92 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rrdcollect -PKG_VERSION:=0.2.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=5e4305c612bc3cccbaf802c275c81a11 - -PKG_SOURCE_URL:=@SF/rrdcollect -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -ifneq ($(BR2_PACKAGE_LIBRRD),) -RRDTOOL_LIBS:=-lart_lgpl_2 -lfreetype -lpng -endif - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,RRDCOLLECT,rrdcollect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,RRDCOLLECT_EXAMPLE,rrdcollect-example,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="$(RRDTOOL_LIBS) -lz" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - ac_cv_func_malloc_0_nonnull=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --disable-static \ - --disable-rpath \ - --with-gnu-ld \ - --enable-exec \ - --without-rrdtool \ - --with-librrd \ - --without-libpcre \ - --without-libpcap \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_RRDCOLLECT): - install -d -m0755 $(IDIR_RRDCOLLECT)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(IDIR_RRDCOLLECT)/usr/sbin/ - $(RSTRIP) $(IDIR_RRDCOLLECT) - $(IPKG_BUILD) $(IDIR_RRDCOLLECT) $(PACKAGE_DIR) - -$(IPKG_RRDCOLLECT_EXAMPLE): - install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/etc - install -m0644 ./files/rrd.conf $(IDIR_RRDCOLLECT_EXAMPLE)/etc/ - install -m0644 ./files/rrdcollect.conf $(IDIR_RRDCOLLECT_EXAMPLE)/etc/ - install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/etc/init.d - install -m0755 ./files/rrdcollect.init $(IDIR_RRDCOLLECT_EXAMPLE)/etc/init.d/S98rrdcollect - install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/usr/bin - install -m0755 ./files/rrd.sh $(IDIR_RRDCOLLECT_EXAMPLE)/usr/bin/ - install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/www/cgi-bin - ln -sf /var/lib/rrdcollect/rrd.cgi $(IDIR_RRDCOLLECT_EXAMPLE)/www/cgi-bin/rrd.cgi - ln -sf /var/lib/rrdcollect/img $(IDIR_RRDCOLLECT_EXAMPLE)/www/img - $(RSTRIP) $(IDIR_RRDCOLLECT_EXAMPLE) - $(IPKG_BUILD) $(IDIR_RRDCOLLECT_EXAMPLE) $(PACKAGE_DIR) - diff --git a/openwrt/package/rrdcollect/files/rrd.conf b/openwrt/package/rrdcollect/files/rrd.conf deleted file mode 100644 index 4ee13ce94f9..00000000000 --- a/openwrt/package/rrdcollect/files/rrd.conf +++ /dev/null @@ -1,381 +0,0 @@ -# -# Author: Christian Rost (chr@baltic-online.de) -# Purpose: Shell-Interface to rrdtool -# -# Configuration-File for rrd.sh -# -DATADIR=/var/lib/rrdcollect -# Location of *.rrd-data-files -RRDDIR=$DATADIR/rrd -# Location of *.png-files -IMGDIR=$DATADIR/img -# Hostname used in title of png-images -HOSTNAME="WRT54GS" -# Location of rrdtool -RRDTOOL=/usr/bin/rrdtool -# Location of rrdcgi -RRDCGI=/usr/bin/rrdcgi -# Location of generated cgi-script -RRDCGISCRIPT=$DATADIR/rrd.cgi -# Image-Path relative to webserver-root -RRDCGIIMGPATH="/img" -# Location of netcat (used for fetching data from rrdcollect-daemon) -NETCAT=/usr/bin/nc - -# Alternative settings for use on external machines -#RRDDIR=/home/webm/htdocs/stats/rrd/rrd -#IMGDIR=/home/webm/htdocs/stats/rrd/web -#RRDTOOL=/opt/rrd/bin/rrdtool -#RRDCGI=/opt/rrd/bin/rrdcgi -#RRDCGISCRIPT=/home/webm/cgi-bin/rrd.cgi -#RRDCGIIMGPATH="/stats/rrd/web" -#NETCAT=/opt/bin/nc - - -#################################################################################### -# Configuration of statistic sources: -# -# Column 1: Time-periods -# I'm interrested in last-24hour-, last-week- and last-month-plots. -# Column 2: Define precision/resolution of above three intervalls -# These values have an impact on the size of your rrd-files, -# and on the sharpness of your plots -# RES=1 means maximum precision (every pixel in the plot is individual) -# RES=4 -> 4 pixel represents one interval - -# Optimized values for storing rather small rrd-files on the openwrt-box -HOURS=24;H_RES=2;DAYS=7;D_RES=4;WEEKS=4;W_RES=4; -# Measure-Step (Same value should be in the rrdcollect.conf) Optimal: STEP=$HOURS / $PIXWIDTH * 3600 * $H_RES -STEP=360; MAXSTEP=`expr $STEP \* 2` - -# Values for storing rrd-files externally outside the router allowing better resolution -#HOURS=24;H_RES=1;DAYS=32;D_RES=2;WEEKS=50;W_RES=2; -#STEP=180; MAXSTEP=`expr $STEP \* 2` -# Even better resolution -#HOURS=8;H_RES=1;DAYS=32;D_RES=2;WEEKS=50;W_RES=2; -#STEP=60; MAXSTEP=`expr $STEP \* 2` - -# Format and size of the plots PIXWIDTH will be used in -# calculating rrd-data-file dimensions during init of rrd-files -# If you change the size you must change NCGIPIXWIDTH too -PIXWIDTH=480 -PIXHEIGHT=120 -PIXFORMAT=PNG - -# Image-Size of the thumbnail for rrdcgi -SCGIPIXWIDTH=400 -# Normal Image-Size for rrdcgi (480px plotsize in rrd) -NCGIPIXWIDTH=571 - -# Predefined colors -RED0=#ff0000; RED1=#ff5555; -GRN0=#009828; GRN1=#81ffa2; -ORG0=#ff9900; ORG1=#ffc571; -BLU0=#0030ff; BLU1=#8ba1ff; -CYA0=#ff00FF; CYA1=#ffbcfe; -YEL0=#ffff00; YEL1=#e0df76; -BLK0=#000000; BLK1=#7d7d7d; -WHI0=#FFFFFF; WHI1=#c1c1c1; - -# Date-String used when creating images with rrd.sh -DATE=`/bin/date "+%d.%m.%Y %H:%M:%S"` - -# Max-Values bytes/second and packets/second for WAN/Wifi/LAN Interfaces -MAXWANB=130000 -MAXWANP=500 -MAXWIFB=600000 -MAXWIFP=800 -MAXLANB=1200000 -MAXLANP=1000 - -# RRD-Types: -# GAUGE=save the value itself, no calculations at all -# COUNTER=continuously increasing value. difference between last 2 values must be positive ! (Traffic-Counter) -# DERIVE=like counter but can store negative values (rate of change in free disk-space) -# -# General syntax: PREFIX_POSTFIX=[-]|Legend|RRD-Type|Maximum|Color|RRD-Plot-Type|Printf-Precision|Optional rrdgraph def-arguments - -################ -# Sys-Statistics -################ -SYS_L01=" l1|System Load (1 min)|GAUGE|U|$YEL0|AREA|%6.2lf" -SYS_L05=" l2|System Load (5 min)|GAUGE|U|$ORG0|STACK|%6.2lf" -SYS_L15=" l3|System Load (15 min)|GAUGE|U|$RED0|STACK|%6.2lf" - -SYS_CPN=" cn|CPU nice |COUNTER|U|$YEL0|AREA|%6.2lf%%" -SYS_CPU=" cu|CPU user |COUNTER|U|$ORG0|STACK|%6.2lf%%" -SYS_CPS=" cs|CPU system |COUNTER|U|$RED0|STACK|%6.2lf%%" -SYS_CPI=" ci|CPU idle |COUNTER|U|$GRN0|STACK|%6.2lf%%" - -SYS_MEU=" mu|Memory used |GAUGE|U|$BLU0|AREA" -SYS_MEF=" mf|Memory free |GAUGE|U|$GRN0|STACK" -#SYS_MES=" ms|Memory shared |GAUGE|U|$BLK0|LINE1" -SYS_MEB=" mb|Memory buffer |GAUGE|U|$YEL0|LINE1" -SYS_MEC=" mc|Memory cached |GAUGE|U|$RED0|LINE1" - -SYS_FUS=" us|Flash Disk Used |GAUGE|U|$BLU0|AREA|%6.2lf%s|CDEF:usC=us,1024,* CDEF:MAXusC=us,1024,*" -SYS_FAV=" av|Flash Disk Available|GAUGE|U|$GRN0|STACK|%6.2lf%s|CDEF:avC=av,1024,* CDEF:MAXavC=av,1024,*" - -SYS_IRA="ira|Interrupts total |COUNTER|U|$RED0|AREA" -SYS_IRE="ire|Interrupts eth0 |COUNTER|U|$ORG0|AREA" -SYS_IRW="irw|Interrupts wifi |COUNTER|U|$YEL0|STACK" - -SYS_PRT=" pt|Processes total |GAUGE|U|$BLU0|AREA|%6.0lf" -SYS_CTX=" ct|Context switches |COUNTER|U|$RED0|LINE2|%6.0lf" -SYS_PRR=" pr|Processes active |GAUGE|U|$ORG0|AREA|%6.0lf" -SYS_ARP="arp|Arp Entries |GAUGE|U|$YEL0|LINE2|%6.0lf" -SYS_PFK=" fk|Forks |COUNTER|U|$GRN0|LINE2|%6.0lf" -SYS_CON="con|NAT-Connections |GAUGE|U|$CYA0|LINE2|%6.0lf" - -# Plot-Titles -MISC_STATS="Misc ($HOSTNAME)" -DSK_STATS="Flash Disk Usage ($HOSTNAME)" -USG_STATS="System Load ($HOSTNAME)" -MEM_STATS="Memory Usage ($HOSTNAME)" -CPU_STATS="CPU Usage ($HOSTNAME)" -IRQ_STATS="Interrupts ($HOSTNAME)" - -# Plot-Definitions (sort-order is relevant) -SYS_CPU_STATS="CPN CPU CPS CPI" -#SYS_MEM_STATS="MEU MEF MES MEB MEC" -SYS_MEM_STATS="MEU MEF MEB MEC" -SYS_USG_STATS="L01 L05 L15" -SYS_DSK_STATS="FUS FAV" -SYS_MISC_STATS="PRT PRR ARP PFK CTX CON" -SYS_IRQ_STATS="IRA IRE IRW" - -# Data-Definition needed by init() -SYS_ALL="$SYS_CPU_STATS $SYS_MEM_STATS $SYS_USG_STATS $SYS_DSK_STATS $SYS_MISC_STATS $SYS_IRQ_STATS" - -################################################################################################# -# Wifi Traffic & Wan Traffic & Tunnel Traffic Statistics ; # LAN: vlan0 , WAN: vlan1 , eth1: WIFI -################################################################################################# -IF_WLOBY="Wibo |Outgoing Traffic Wifi |COUNTER|$MAXWIFB|$GRN1|AREA" -IF_WLIBY="-Wibi|Incoming Traffic Wifi |COUNTER|$MAXWIFB|$RED0|AREA" -IF_WLOPK="Wipo |Outgoing Packets Wifi |COUNTER|$MAXWIFP|$GRN1|AREA|%6.0lf" -IF_WLIPK="-Wipi|Incoming Packets Wifi |COUNTER|$MAXWIFP|$RED0|AREA|%6.0lf" - -IF_WAIBY="-Wabi|Incoming Traffic Wan |COUNTER|$MAXWANB|$BLU0|AREA" -IF_WAOBY="Wabo |Outgoing Traffic Wan |COUNTER|$MAXWANB|$ORG1|AREA" -IF_WAIPK="-Wapi|Incoming Packets Wan |COUNTER|$MAXWANP|$BLU0|AREA|%6.0lf" -IF_WAOPK="Wapo |Outgoing Packets Wan |COUNTER|$MAXWANP|$ORG1|AREA|%6.0lf" - -IF_LAIBY="-Labi|Incoming Traffic Lan |COUNTER|$MAXLANB|$BLU0|AREA" -IF_LAOBY="Labo |Outgoing Traffic Lan |COUNTER|$MAXLANB|$ORG1|AREA" -IF_LAIPK="-Lapi|Incoming Packets Lan |COUNTER|$MAXLANP|$BLU0|AREA|%6.0lf" -IF_LAOPK="Lapo |Outgoing Packets Lan |COUNTER|$MAXLANP|$ORG1|AREA|%6.0lf" - -#IF_TUIBY="-tbi|Incoming Traffic VPN-Tunnel|COUNTER|$MAXWANB|$CYA0|AREA" -#IF_TUOBY="tbo |Outgoing Traffic VPN-Tunnel|COUNTER|$MAXWANB|$YEL1|AREA" -#IF_TUIPK="-tpi|Incoming Packets VPN-Tunnel|COUNTER|$MAXWANP|$CYA0|AREA|%6.0lf" -#IF_TUOPK="tpo |Outgoing Packets VPN-Tunnel|COUNTER|$MAXWANP|$YEL1|AREA|%6.0lf" - -# Plot-Titles -WIFI_TRAFFIC="Wifi Interface Traffic Statistics ($HOSTNAME)" -WIFI_PACKETS="Wifi Interface Packets Statistics ($HOSTNAME)" -WAN_TRAFFIC="Wan Interface Traffic Statistics ($HOSTNAME)" -WAN_PACKETS="Wan Interface Packets Statistics ($HOSTNAME)" -LAN_TRAFFIC="Lan Interface Traffic Statistics ($HOSTNAME)" -LAN_PACKETS="Lan Interface Packets Statistics ($HOSTNAME)" - -#TUN_TRAFFIC="VPN-Tunnel Interface Traffic Statistics ($HOSTNAME)" -#TUN_PACKETS="VPN-Tunnel Interface Packets Statistics ($HOSTNAME)" - -# Plot-Definitions (sort-order is relevant) -IF_WIFI_TRAFFIC="WLOBY WLIBY" -IF_WIFI_PACKETS="WLOPK WLIPK" -IF_WAN_TRAFFIC="WAIBY WAOBY" -IF_WAN_PACKETS="WAIPK WAOPK" -IF_LAN_TRAFFIC="LAIBY LAOBY" -IF_LAN_PACKETS="LAIPK LAOPK" -#IF_TUN_TRAFFIC="TUIBY TUOBY" -#IF_TUN_PACKETS="TUIPK TUOPK" - -# Data-Definition needed by init() -#IF_ALL="$IF_WIFI_TRAFFIC $IF_WIFI_PACKETS $IF_WAN_TRAFFIC $IF_WAN_PACKETS $IF_TUN_TRAFFIC $IF_TUN_PACKETS" -IF_ALL="$IF_LAN_TRAFFIC $IF_LAN_PACKETS $IF_WAN_TRAFFIC $IF_WAN_PACKETS $IF_WIFI_TRAFFIC $IF_WIFI_PACKETS" - -############################################## -# Port Traffic Statistics for Port 1 - Port 4 -############################################## -#PT_OPK1="po1 |Port 1 Outgoing Packets |COUNTER|U|$ORG1|AREA|%6.0lf" -#PT_IPK1="-pi1|Port 1 Incoming Packets |COUNTER|U|$GRN0|AREA|%6.0lf" -#PT_COL1="cl1 |Port 1 Collisions |COUNTER|U|$BLU0|AREA|%6.0lf" -#PT_ERR1="er1 |Port 1 Errors |COUNTER|U|$CYA0|AREA|%6.0lf" -#PT_OBY1="bo1 |Port 1 Outgoing Traffic |COUNTER|U|$ORG1|AREA" -#PT_IBY1="-bi1|Port 1 Incoming Traffic |COUNTER|U|$GRN0|AREA" -#PT_OPK2="po2 |Port 2 Outgoing Packets |COUNTER|U|$RED1|AREA|%6.0lf" -#PT_IPK2="-pi2|Port 2 Incoming Packets |COUNTER|U|$BLK0|AREA|%6.0lf" -#PT_COL2="cl2 |Port 2 Collisions |COUNTER|U|$GRN0|AREA|%6.0lf" -#PT_ERR2="er2 |Port 2 Errors |COUNTER|U|$ORG0|AREA|%6.0lf" -#PT_OBY2="bo2 |Port 2 Outgoing Traffic |COUNTER|U|$RED1|AREA" -#PT_IBY2="-bi2|Port 2 Incoming Traffic |COUNTER|U|$BLK0|AREA" -#PT_OPK3="po3 |Port 3 Outgoing Packets |COUNTER|U|$BLU1|AREA|%6.0lf" -#PT_IPK3="-pi3|Port 3 Incoming Packets |COUNTER|U|$CYA0|AREA|%6.0lf" -#PT_COL3="cl3 |Port 3 Collisions |COUNTER|U|$GRN0|AREA|%6.0lf" -#PT_ERR3="er3 |Port 3 Errors |COUNTER|U|$ORG0|AREA|%6.0lf" -#PT_OBY3="bo3 |Port 3 Outgoing Traffic |COUNTER|U|$BLU1|AREA" -#PT_IBY3="-bi3|Port 3 Incoming Traffic |COUNTER|U|$CYA0|AREA" -#PT_OPK4="po4 |Port 4 Outgoing Packets |COUNTER|U|$YEL1|AREA|%6.0lf" -#PT_IPK4="-pi4|Port 4 Incoming Packets |COUNTER|U|$CYA0|AREA|%6.0lf" -#PT_COL4="cl4 |Port 4 Collisions |COUNTER|U|$BLK0|AREA|%6.0lf" -#PT_ERR4="er4 |Port 4 Errors |COUNTER|U|$RED0|AREA|%6.0lf" -#PT_OBY4="bo4 |Port 4 Outgoing Traffic |COUNTER|U|$YEL1|AREA" -#PT_IBY4="-bi4|Port 4 Incoming Traffic |COUNTER|U|$CYA0|AREA" - -# Plot-Titles -#TRAFFIC_1="Traffic Statistics Port 1 ($HOSTNAME)" -#TRAFFIC_2="Traffic Statistics Port 2 ($HOSTNAME)" -#TRAFFIC_3="Traffic Statistics Port 3 ($HOSTNAME)" -#TRAFFIC_4="Traffic Statistics Port 4 ($HOSTNAME)" -#PACKETS_1="Packet Statistics Port 1 ($HOSTNAME)" -#PACKETS_2="Packet Statistics Port 2 ($HOSTNAME)" -#PACKETS_3="Packet Statistics Port 3 ($HOSTNAME)" -#PACKETS_4="Packet Statistics Port 4 ($HOSTNAME)" - -# Plot-Definitions (sort-order is relevant) -#PT_TRAFFIC_1="OBY1 IBY1" -#PT_TRAFFIC_2="OBY2 IBY2" -#PT_TRAFFIC_3="OBY3 IBY3" -#PT_TRAFFIC_4="OBY4 IBY4" -#PT_PACKETS_1="OPK1 IPK1 COL1 ERR1" -#PT_PACKETS_2="OPK2 IPK2 COL2 ERR2" -#PT_PACKETS_3="OPK3 IPK3 COL3 ERR3" -#PT_PACKETS_4="OPK4 IPK4 COL4 ERR4" -#PT_PACKETS_1="OPK1 IPK1" -#PT_PACKETS_2="OPK2 IPK2" -#PT_PACKETS_3="OPK3 IPK3" -#PT_PACKETS_4="OPK4 IPK4" - -# Data Definition needed by init() -#PT_ALL="$PT_TRAFFIC_1 $PT_TRAFFIC_2 $PT_TRAFFIC_3 $PT_TRAFFIC_4 $PT_PACKETS_1 $PT_PACKETS_2 $PT_PACKETS_3 $PT_PACKETS_4" - -################################# -# Traffic Priorisation Statistics -################################# -#TC_APRIB="bwa|Ack Priority Queue Bandwidth |COUNTER|$MAXWANB|$YEL0|AREA" -#TC_DPRIB="bwd|Default Priority Queue Bandwidth |COUNTER|$MAXWANB|$ORG0|STACK" -#TC_HPRIB="bwh|High Priority Queue Bandwidth |COUNTER|$MAXWANB|$RED0|STACK" -#TC_LPRIB="bwl|Low Priority Queue Bandwidth |COUNTER|$MAXWANB|$GRN0|STACK" -#TC_APRID="dra|Ack Priority Queue Packet Dropped |COUNTER|100|$YEL0|AREA" -#TC_DPRID="drd|Default Priority Queue Packet Dropped|COUNTER|100|$ORG0|STACK" -#TC_HPRID="drh|High Priority Queue Packet Dropped |COUNTER|100|$RED0|STACK" -#TC_LPRID="drl|Low Priority Queue Packet Dropped |COUNTER|100|$GRN0|STACK" - -# Plot-Titles -#TRAFFIC="Traffic Priorisation Stats" -#PACKETS="Packet Priorisation Stats" - -# Plot-Definitions (sort-order is relevant) -#TC_TRAFFIC="APRIB DPRIB HPRIB LPRIB" -#TC_PACKETS="APRID DPRID HPRID LPRID" - -# Data Definition needed by init() -#TC_ALL="$TC_TRAFFIC $TC_PACKETS" - -################################# -# Firewall Packet Drop Statistics -################################# -#PC_WIN="win|Windows Traffic |COUNTER|U|$YEL0|AREA" -#PC_INV="inv|Invalid State Traffic |COUNTER|U|$ORG0|STACK" -#PC_TCP="tcp|TCP Packets |COUNTER|U|$RED0|STACK" -#PC_OTH="oth|Other Packets |COUNTER|U|$BLU0|STACK" - -# Plot-Titles -#DROPPED="Firewall Packet Drop Statistics" - -# Plot-Definitions (sort-order is relevant) -#PC_DROPPED="WIN INV TCP OTH" - -# Data Definition needed by init() -#PC_ALL="$PC_DROPPED" - -########################## -# Traffic Accounting Stats -########################## -#ACI="Incoming for "; ACO="Outgoing for " -#IP14="notebook"; COL14=$ORG0; COL_14=$ORG1 -#IP15="saugi "; COL15=$RED0; COL_15=$RED1 -#IP20="aplink "; COL20=$GRN0; COL_20=$GRN1 -#IP50="sunny "; COL50=$BLU0; COL_50=$BLU1 - -#TYPE=AREA -#for i in 15 50 20 14 -#do -# # Packet-Statistics -# eval AC_TIP$i='-TIP$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL$i\|$TYPE" -# eval AC_TOP$i='TOP$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL_$i\|$TYPE" -# eval AC_UIP$i='-UIP$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL$i\|$TYPE" -# eval AC_UOP$i='UOP$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL_$i\|$TYPE" -# eval AC_IIP$i='-IIP$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL$i\|$TYPE" -# eval AC_IOP$i='IOP$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL_$i\|$TYPE" -# # Traffic Statistics -# eval AC_TIB$i='-TIB$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL$i\|$TYPE" -# eval AC_TOB$i='TOB$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL_$i\|$TYPE" -# eval AC_UIB$i='-UIB$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL$i\|$TYPE" -# eval AC_UOB$i='UOB$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL_$i\|$TYPE" -# eval AC_IIB$i='-IIB$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL$i\|$TYPE" -# eval AC_IOB$i='IOB$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL_$i\|$TYPE" -# # Plot-Definitions (sort-order is relevant) -# AC_TB_O="$AC_TB_O TOB$i"; AC_TB_I="$AC_TB_I TIB$i" -# AC_TP_O="$AC_TP_O TOP$i"; AC_TP_I="$AC_TP_I TIP$i" -# AC_UB_O="$AC_UB_O UOB$i"; AC_UB_I="$AC_UB_I UIB$i" -# AC_UP_O="$AC_UP_O UOP$i"; AC_UP_I="$AC_UP_I UIP$i" -# AC_IB_O="$AC_IB_O IOB$i"; AC_IB_I="$AC_IB_I IIB$i" -# AC_IP_O="$AC_IP_O IOP$i"; AC_IP_I="$AC_IP_I IIP$i" -# TYPE=STACK -#done -#AC_TB="$AC_TB_O $AC_TB_I"; AC_TP="$AC_TP_O $AC_TP_I" -#AC_UB="$AC_UB_O $AC_UB_I"; AC_UP="$AC_UP_O $AC_UP_I" -#AC_IB="$AC_IB_O $AC_IB_I"; AC_IP="$AC_IP_O $AC_IP_I"; - -# Plot-Titles -#TB="TCP Traffic Accounting Stats ($HOSTNAME)"; TP="TCP Packet Accounting Stats ($HOSTNAME)" -#UB="UDP Traffic Accounting Stats ($HOSTNAME)"; UP="UDP Packet Accounting Stats ($HOSTNAME)" -#IB="ICMP Traffic Accounting Stats ($HOSTNAME)";IP="ICMP Packet Accounting Stats ($HOSTNAME)" - -# Data Definition needed by init() -#AC_ALL="$AC_TB $AC_TP $AC_UB $AC_UP $AC_IB $AC_IP" - - -# System Statistics -GRAPH_1="SYS|USG_STATS|$USG_STATS|Load" -GRAPH_2="SYS|CPU_STATS|$CPU_STATS|CPU-Time_in_%|1000|--upper-limit 100 --rigid --logarithmic --lower-limit 0.1" -GRAPH_3="SYS|MEM_STATS|$MEM_STATS|Bytes|1024" -GRAPH_4="SYS|DSK_STATS|$DSK_STATS|Bytes|1024" -GRAPH_5="SYS|MISC_STATS|$MISC_STATS|_|1000|--logarithmic" -GRAPH_6="SYS|IRQ_STATS|$IRQ_STATS|IRQ_per_second|1000" -# Interface Traffic Statistics -GRAPH_7="IF|LAN_TRAFFIC|$LAN_TRAFFIC|Bytes_per_second" -GRAPH_8="IF|LAN_PACKETS|$LAN_PACKETS|Packets_per_second" -GRAPH_9="IF|WAN_TRAFFIC|$WAN_TRAFFIC|Bytes_per_second" -GRAPH_10="IF|WAN_PACKETS|$WAN_PACKETS|Packets_per_second" -GRAPH_11="IF|WIFI_TRAFFIC|$WIFI_TRAFFIC|Bytes_per_second" -GRAPH_12="IF|WIFI_PACKETS|$WIFI_PACKETS|Packets_per_second" -#GRAPH_11="IF|TUN_TRAFFIC|$TUN_TRAFFIC|Bytes_per_second" -#GRAPH_12="IF|TUN_PACKETS|$TUN_PACKETS|Packets_per_second" -# Port Traffic Statistics -#GRAPH_13="PT|TRAFFIC_1|$TRAFFIC_1|Bytes_per_second" -#GRAPH_14="PT|PACKETS_1|$PACKETS_1|Packets_per_second" -#GRAPH_15="PT|TRAFFIC_2|$TRAFFIC_2|Bytes_per_second" -#GRAPH_16="PT|PACKETS_2|$PACKETS_2|Packets_per_second" -#GRAPH_17="PT|TRAFFIC_3|$TRAFFIC_3|Bytes_per_second" -#GRAPH_18="PT|PACKETS_3|$PACKETS_3|Packets_per_second" -#GRAPH_19="PT|TRAFFIC_4|$TRAFFIC_4|Bytes_per_second" -#GRAPH_20="PT|PACKETS_4|$PACKETS_4|Packets_per_second" -# Traffic Priorisation Statistics -# GRAPH_21="TC|TRAFFIC|$TRAFFIC|Bytes_per_second|1000|--logarithmic" -# GRAPH_22="TC|PACKETS|$PACKETS|Packets_per_second" -# Accounting Statistics -#GRAPH_23="AC|TB|$TB|Bytes_per_second" -#GRAPH_24="AC|TP|$TP|Packets_per_second" -#GRAPH_25="AC|UB|$UB|Bytes_per_second" -#GRAPH_26="AC|UP|$UP|Packets_per_second" -#GRAPH_27="AC|IB|$IB|Bytes_per_second" -#GRAPH_28="AC|IP|$IP|Packets_per_second" -# Firewall Drop Statistics -#GRAPH_29="PC|DROPPED|$DROPPED|Packets_per_second" - -#ALL_PRAEFIXES="SYS IF PT TC AC PC" -ALL_PRAEFIXES="SYS IF" -GRAPH_MAX=12 diff --git a/openwrt/package/rrdcollect/files/rrd.sh b/openwrt/package/rrdcollect/files/rrd.sh deleted file mode 100644 index 3faa4fb8d74..00000000000 --- a/openwrt/package/rrdcollect/files/rrd.sh +++ /dev/null @@ -1,288 +0,0 @@ -#!/bin/sh -# -# Author: Christian Rost (chr@baltic-online.de) -# Purpose: Shell-Interface to rrdtool -# -RRDCNF=/etc/rrd.conf -. $RRDCNF - -###################################### -# init() function to create .rrd-file -# $1=VAR-PRAEFIX $2=VAR-POSTFIX -###################################### -init() -{ - # Calculate optimal step by assuming highest precision on the last-xhour plot - OPTSTEP=`expr $HOURS \* 3600 \/ $PIXWIDTH \* $H_RES` - [ $OPTSTEP != $STEP ] && echo "WARNING: Your optimal step is: $OPTSTEP. But you are using: $STEP" - - ARH_AVG=`expr $HOURS \* 3600 \/ $PIXWIDTH \* $H_RES \/ $STEP`; ARH_CNT=`expr $HOURS \* 3600 \/ $ARH_AVG \/ $STEP` - ARD_AVG=`expr $DAYS \* 86400 \/ $PIXWIDTH \* $D_RES \/ $STEP`; ARD_CNT=`expr $DAYS \* 86400 \/ $ARD_AVG \/ $STEP` - ARW_AVG=`expr $WEEKS \* 604800 \/ $PIXWIDTH \* $W_RES \/ $STEP`; ARW_CNT=`expr $WEEKS \* 604800 \/ $ARW_AVG \/ $STEP` - - PRAEFIX=$1; POSTFIX=$2 - DSOURCE="" - - echo "Init storage for $HOURS hours on averages: $ARH_AVG x $STEP seconds ($ARH_CNT total values)" - echo "Init storage for $DAYS days on averages: $ARD_AVG x $STEP seconds ($ARD_CNT total values)" - echo "Init storage for $WEEKS weeks on averages: $ARW_AVG x $STEP seconds ($ARW_CNT total values)" - - eval SOURCE=\$${PRAEFIX}_${POSTFIX} - for i in $SOURCE - do - eval var=\$${PRAEFIX}_${i} - ifs="$IFS"; IFS="|"; set -- $var - if [ "`echo ${1} | cut -b1`" = "-" ] - then - VAR="`echo ${1} | cut -b2-`" - else - VAR=`echo $1 | sed "s/ //g"` - fi - DSOURCE="$DSOURCE DS:${VAR}:${3}:$MAXSTEP:0:${4}" - IFS="$ifs" - done - $DEBUG $RRDTOOL create $RRDDIR/$PRAEFIX.rrd \ - --step ${STEP} \ - $DSOURCE \ - RRA:AVERAGE:0.5:$ARH_AVG:$ARH_CNT \ - RRA:AVERAGE:0.5:$ARD_AVG:$ARD_CNT \ - RRA:AVERAGE:0.5:$ARW_AVG:$ARW_CNT \ - RRA:MAX:0.5:$ARH_AVG:$ARH_CNT \ - RRA:MAX:0.5:$ARD_AVG:$ARD_CNT \ - RRA:MAX:0.5:$ARW_AVG:$ARW_CNT - return $? -} - -################################################################################################################# -# graph() function to create png-graphics -# $1=IMG-DIR $2=VAR-PRAEFIX, $3=VAR-POSTFIX, $4=Headline, $5=end, $6=start, $7=base, -# $8=DEFS/ENTRIES $9=other rrdgraph options (Vertlabel,...) -################################################################################################################# -# COMMENT:"$DATE\c" -do_rrdgraph() -{ - $DEBUG $NICE $RRDTOOL graph "$1/$2_$3.png" \ - --title "$4" \ - --imgformat $PIXFORMAT \ - --width $PIXWIDTH \ - --height $PIXHEIGHT \ - --end "$5" \ - --start "$6" \ - --base "$7" \ - $8 $9 -} - -################################################################################################################# -# graph() function to create png-graphics -# $1=IMG-DIR $2=VAR-PRAEFIX, $3=VAR-POSTFIX, $4=Headline, $5=end, $6=start, $7=base, -# $8=DEFS/ENTRIES $9=other rrdgraph options (Vertlabel,...) -################################################################################################################# -# COMMENT:"\c" -do_rrdcgi() -{ - cat << EOF > $1/$2_$3.def - -$2_$3.png \ ---title "$4" \ ---imgformat $PIXFORMAT \ ---width $PIXWIDTH \ ---height $PIXHEIGHT \ ---end "$5" \ ---start \ ---base $7 \ ---imginfo "" \ ---lazy \ -$8 $9 > -EOF - - cat << EOF >> $RRDCGISCRIPT -$NEWLINE $4
- - -EOF -} - - - -gen_cgi_header() -{ - cat << EOF > $RRDCGISCRIPT -#!$RRDCGI -RRDCGI Router Statistics - - -

RRDCGI Router Statistics ()

-
- ${HOURS} hours ago - ${DAYS} days ago - ${WEEKS} weeks ago - -
-

- -EOF -} - -gen_cgi_footer() -{ - cat << EOF >> $RRDCGISCRIPT -
-

- - -EOF - chmod +x $RRDCGISCRIPT -} - -################################################################################################################# -# $1=mode $2=VAR-PRAEFIX, $3=VAR-POSTFIX, $4=Headline, $5=Vertlabel, $6=start, $7=end, $8=base, $9=other rrdgraph options -################################################################################################################# -do_graph() -{ - MODE=$1; PRAEFIX=$2; POSTFIX=$3; HEADLINE=$4; VERTLABEL=$5; START=$6; END=$7; BASE=$8; SRC=${RRDDIR}/${PRAEFIX}.rrd - if [ ! -r "$SRC" ] - then - echo "$SRC not found. Aborting all operations now..." - exit 1 - fi - - # For Graphing Memory BASE should be set to 1024, default is 1000 - [ -n "$8" ] && BASE=$8 || BASE=1000 - [ -n "$9" ] && OPTS=$9 || OPTS="--lower-limit 0" - DEFS=""; ENTRIES="" - eval SOURCE=\$${PRAEFIX}_${POSTFIX} - for i in $SOURCE - do - eval var=\$${PRAEFIX}_${i} - ifs="$IFS"; IFS="|"; set -- $var - if [ "`echo ${1} | cut -b1`" = "-" ] - then - VAR="`echo ${1} | cut -b2-`" - NEG=1 - else - VAR=`echo $1 | sed "s/ //g"` - NEG=0 - fi - - if [ "$NEG" = 1 ] - then - [ -n "${8}" ] && DEFS="$DEFS DEF:${VAR}=$SRC:${VAR}:AVERAGE DEF:MAX${VAR}=$SRC:${VAR}:MAX ${8} CDEF:N${VAR}C=${VAR}C,-1,* " \ - || DEFS="$DEFS DEF:${VAR}=$SRC:${VAR}:AVERAGE DEF:MAX${VAR}=$SRC:${VAR}:MAX CDEF:N${VAR}=${VAR},-1,*" - else - [ -n "${8}" ] && DEFS="$DEFS DEF:${VAR}=$SRC:${VAR}:AVERAGE DEF:MAX${VAR}=$SRC:${VAR}:MAX ${8}" \ - || DEFS="$DEFS DEF:${VAR}=$SRC:${VAR}:AVERAGE DEF:MAX${VAR}=$SRC:${VAR}:MAX" - fi - # Now this is a bit ugly, but i don't know how to escape the blanks in a proper way. - # If you know any better way to keep the blanks in the legend of the graphics please inform me. - #L=`echo ${2} | tr -s "[= =]" '\014'` - #L=`echo ${2} | tr -s "[= =]" '_'` - L=`echo ${2} | sed "s/ /_/g"` - if [ -n "${7}" ] - then - if [ -n "${8}" ] - then - [ "$NEG" = 1 ] && ENTRIES="$ENTRIES ${6}:N${VAR}C${5}:${L}: GPRINT:${VAR}C:AVERAGE:Average\:${7} GPRINT:MAX${VAR}C:MAX:Max\:${7} GPRINT:${VAR}C:LAST:Last\:${7}\\j" \ - || ENTRIES="$ENTRIES ${6}:${VAR}C${5}:${L}: GPRINT:${VAR}C:AVERAGE:Average\:${7} GPRINT:MAX${VAR}C:MAX:Max\:${7} GPRINT:${VAR}C:LAST:Last\:${7}\\j" - else - [ "$NEG" = 1 ] && ENTRIES="$ENTRIES ${6}:N${VAR}${5}:${L}: GPRINT:${VAR}:AVERAGE:Average\:${7} GPRINT:MAX${VAR}:MAX:Max\:${7} GPRINT:${VAR}:LAST:Last\:${7}\\j" \ - || ENTRIES="$ENTRIES ${6}:${VAR}${5}:${L}: GPRINT:${VAR}:AVERAGE:Average\:${7} GPRINT:MAX${VAR}:MAX:Max\:${7} GPRINT:${VAR}:LAST:Last\:${7}\\j" - fi - else - [ "$NEG" = 1 ] && ENTRIES="$ENTRIES ${6}:N${VAR}${5}:${L}: GPRINT:${VAR}:AVERAGE:Average\:%6.2lf%s GPRINT:MAX${VAR}:MAX:Max\:%6.0lf%s GPRINT:${VAR}:LAST:Last\:%6.2lf%s\\j" \ - || ENTRIES="$ENTRIES ${6}:${VAR}${5}:${L}: GPRINT:${VAR}:AVERAGE:Average\:%6.2lf%s GPRINT:MAX${VAR}:MAX:Max\:%6.0lf%s GPRINT:${VAR}:LAST:Last\:%6.2lf%s\\j" - fi - IFS="$ifs" - done - - #[ "$POSTFIX" = "CPU_STATS" ] && (echo $OPTS; echo $DEFS ; echo $ENTRIES; echo $OPTS) - - $MODE "$IMGDIR" "$PRAEFIX" "$POSTFIX" "$HEADLINE" "$END" "$START" "$BASE" "$DEFS $ENTRIES" "--vertical-label $VERTLABEL $OPTS" -} - -# Check if all rrd-files are present -# and create them if not -init_loop() -{ - for j in $ALL_PRAEFIXES - do - if [ ! -f $RRDDIR/$j.rrd ] - then - echo "Creating $RRDDIR/$j.rrd ..." - init $j ALL - [ ! -f $RRDDIR/$j.rrd ] && EXIT=1 - fi - done - [ "$EXIT" = 1 ] && return 1 || return 0 -} - - -graph_loop() -{ - mode=$1; start=$2; end=$3; c=1 - while [ $c -le $GRAPH_MAX ] - do - eval var=\$GRAPH_${c} - # $1=VAR-PRAEFIX $2=VAR-POSTFIX $3=Headline $4=Vertlabel $5=base $6=other rrdgraph options - ifs="$IFS"; IFS="|"; set -- $var - IFS="$ifs" - [ "$1" != "$OLD" -o "`expr \( $c - 1 \) % 2`" = 0 ] && NEWLINE="" || NEWLINE="" - do_graph $mode $1 $2 "$3" "$4" $start $end $5 "$6" - c=`expr $c + 1`; OLD=$1 - done -} - - -case "$1" in - init) - if init_loop - then - exit 0 - else - echo "Initialisation of rrd-database-files failed" - exit 1 - fi - ;; - cgi) - echo "Updating $RRDCGISCRIPT and $IMGDIR/*.def" - gen_cgi_header - # The start-time will be not used - graph_loop do_rrdcgi end now - gen_cgi_footer - ;; - images) - # Create the graphs - [ -n "$2" ] && STH=$2 || STH=24h - echo "Updating Graphs ($STH ago -> now) for $RRDDIR/*.rrd" - graph_loop do_rrdgraph "end-${STH}" now - ;; - fetch) - # Fetch data from rrdcollect daemon - if [ ! -n "$3" ] - then - echo "Usage: $0 fetch " - exit 1 - else - echo "Fetching ascii-logs from rrdcollect daemon" - (cd $RRDDIR && $NETCAT $2 $3 | sed -n "s:^\(update .*\):$RRDTOOL \1:p" | sh -x ) 2>&1 | wc -l #>/dev/null - exit 0 - fi - ;; - *) echo "Usage: $0 " - echo " init: Initialize rrd-datafiles if neeeded" - echo " cgi: Creates cgi-script for use with rrdcgi" - echo " fetch: Fetching data from rrdcollect via netcat" - echo " images: Generates images" - exit 1 - ;; -esac -exit 0 diff --git a/openwrt/package/rrdcollect/files/rrdcollect.conf b/openwrt/package/rrdcollect/files/rrdcollect.conf deleted file mode 100644 index e34c9bff7b6..00000000000 --- a/openwrt/package/rrdcollect/files/rrdcollect.conf +++ /dev/null @@ -1,33 +0,0 @@ -step = 360 -directory = /var/lib/rrdcollect/rrd - -file:///proc/stat -"cpu0 %d %d %d %d" SYS.rrd:cu,cn,cs,ci -"ctxt %u" SYS.rrd:ct -"processes %u" SYS.rrd:fk -"intr %u" SYS.rrd:ira - -file:///proc/meminfo -#"Mem: %*d %d %d %d %d %d" SYS.rrd:mu,mf,ms,mb,mc -"Mem: %*d %d %d %*d %d %d" SYS.rrd:mu,mf,mb,mc - -file:///proc/loadavg -"%f %f %f %d/%d %*d" SYS.rrd:l1,l2,l3,pr,pt - -exec:///bin/df -"/dev/mtdblock/4 %*d %d %d" SYS.rrd:us,av - -# LAN: vlan0, WAN: vlan1, WIFI: eth1 -file:///proc/net/dev -" vlan0:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Labi,Lapi,Labo,Lapo -" vlan1:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wabi,Wapi,Wabo,Wapo -" eth1:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wibi,Wipi,Wibo,Wipo -#" tun0:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:tbi,tpi,tbo,tpo - -file:///proc/slabinfo -"ip_conntrack %d %*d %*d %*d %*d %*d" SYS.rrd:con -"arp_cache %d %*d %*d %*d %*d %*d" SYS.rrd:arp - -file:///proc/interrupts -" 4: %d MIPS eth1" SYS.rrd:irw -" 5: %d MIPS eth0" SYS.rrd:ire diff --git a/openwrt/package/rrdcollect/files/rrdcollect.init b/openwrt/package/rrdcollect/files/rrdcollect.init deleted file mode 100644 index f9ee8bcaabd..00000000000 --- a/openwrt/package/rrdcollect/files/rrdcollect.init +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -BIN=rrdcollect -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -LIB_D=/var/lib/rrdcollect -CGI_S=$LIB_D/rrd.cgi -IMG_D=$LIB_D/img -RRD_D=$LIB_D/rrd -RRD_F=$(find $RRD_D -name "*.rrd" 2>/dev/null) -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - mkdir -p $IMG_D - mkdir -p $RRD_D - [ -n "$RRD_F" ] || /usr/bin/rrd.sh init - [ -x $CGI_S ] || /usr/bin/rrd.sh cgi - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/rrdcollect/ipkg/rrdcollect-example.conffiles b/openwrt/package/rrdcollect/ipkg/rrdcollect-example.conffiles deleted file mode 100644 index 9e9a33a22a0..00000000000 --- a/openwrt/package/rrdcollect/ipkg/rrdcollect-example.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/rrd.conf -/etc/rrdcollect.conf diff --git a/openwrt/package/rrdcollect/ipkg/rrdcollect-example.control b/openwrt/package/rrdcollect/ipkg/rrdcollect-example.control deleted file mode 100644 index ab4c68e5a2d..00000000000 --- a/openwrt/package/rrdcollect/ipkg/rrdcollect-example.control +++ /dev/null @@ -1,10 +0,0 @@ -Package: rrdcollect-example -Priority: optional -Section: admin -Depends: rrdcgi, rrdtool, rrdcollect -Description: Example setup for Round-Robin Database (RRD) collecting daemon - RRDcollect is a daemon which polls certain files in /proc/ - directory, gathering data and storing it inside RRDtool's - database files. Being written in C should be both fast - and resources-friendly. Supports both scanf(3)-style - pattern matches and perl compatible regular expressions. diff --git a/openwrt/package/rrdcollect/ipkg/rrdcollect.control b/openwrt/package/rrdcollect/ipkg/rrdcollect.control deleted file mode 100644 index effe8b13c96..00000000000 --- a/openwrt/package/rrdcollect/ipkg/rrdcollect.control +++ /dev/null @@ -1,10 +0,0 @@ -Package: rrdcollect -Priority: optional -Section: admin -Depends: librrd | librrd1 -Description: Round-Robin Database (RRD) collecting daemon - RRDcollect is a daemon which polls certain files in /proc/ - directory, gathering data and storing it inside RRDtool's - database files. Being written in C should be both fast - and resources-friendly. Supports both scanf(3)-style - pattern matches and perl compatible regular expressions. diff --git a/openwrt/package/rrdcollect/patches/rrdcollect-scan.patch b/openwrt/package/rrdcollect/patches/rrdcollect-scan.patch deleted file mode 100644 index f47301ed13e..00000000000 --- a/openwrt/package/rrdcollect/patches/rrdcollect-scan.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -ruN rrdcollect-0.2.3.orig/src/scan.c rrdcollect-0.2.3/src/scan.c ---- rrdcollect-0.2.3.orig/src/scan.c 2005-01-20 18:42:17.000000000 +0100 -+++ rrdcollect-0.2.3/src/scan.c 2006-01-22 00:51:52.000000000 +0100 -@@ -74,6 +74,11 @@ - } while (isdigit(*fmt)); - } - -+ /* skip white spaces like scanf does */ -+ if (strchr("difuoxX", *fmt)) -+ while (isspace(*buf)) -+ buf++; -+ - /* FIXME: we should check afterward: - * if (start == buf || start == '-' && buf-start == 1) - * die("WTF??? zero-length number???"); -@@ -150,27 +155,22 @@ - buf++, length--; - } - -- /* ignore if value not found */ -- if(value == 0) -- return 0; -- - if (!ignore) -- counter[i++]->value = valuedup(value); -+ counter[i++]->value = strndup(start, buf - start); - break; - - case 'c': -+ if (length < 0) -+ length = 1; // default length is 1 -+ - while (*buf && length > 0) { - buf++, length--; - } - if (length > 0) - return 2; - -- /* ignore if value not found */ -- if(value == 0) -- return 0; -- - if (!ignore) -- counter[i++]->value = valuedup(value); -+ counter[i++]->value = strndup(start, buf - start); - break; - - -@@ -192,7 +192,7 @@ - case '\f': - case '\v': - /* don't match if not at least one space */ -- if(!isspace(*(buf))) -+ if(!isspace(*buf)) - return 0; - else - buf++; -@@ -208,7 +208,7 @@ - case '\v': - break; - default: -- while (isspace(*(buf))) -+ while (isspace(*buf)) - buf++; - } - fmt++; diff --git a/openwrt/package/rrdtool/Config.in b/openwrt/package/rrdtool/Config.in deleted file mode 100644 index 6993c4e0e3d..00000000000 --- a/openwrt/package/rrdtool/Config.in +++ /dev/null @@ -1,67 +0,0 @@ -config BR2_COMPILE_RRDTOOL - prompt "rrdtool........................... Round Robin Database (RRD) tools (v1.2.x)" - bool - default n - -config BR2_PACKAGE_LIBRRD - prompt "librrd.......................... Round Robin Database (RRD) management library (v1.2.x)" - tristate - default n - depends BR2_COMPILE_RRDTOOL - select BR2_PACKAGE_LIBART - select BR2_PACKAGE_LIBFREETYPE - select BR2_PACKAGE_LIBPNG - select BR2_PACKAGE_ZLIB - help - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ - - This package contains command line tools used to manage RRDs. - -config BR2_PACKAGE_RRDCGI - prompt "rrdcgi.......................... Round Robin Database (RRD) CGI graphing tool (v1.2.x)" - tristate - default n - depends BR2_COMPILE_RRDTOOL - select BR2_PACKAGE_LIBRRD - select BR2_PACKAGE_CGILIB - help - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ - - This package contains the rrdcgi tool used to create web pages containing - RRD graphs based on templates. - -config BR2_PACKAGE_RRDTOOL - prompt "rrdtool......................... Round Robin Database (RRD) management tools (v1.2.x)" - tristate - default n - depends BR2_COMPILE_RRDTOOL - select BR2_PACKAGE_LIBRRD - help - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ - - This package contains command line tools used to manage RRDs. - diff --git a/openwrt/package/rrdtool/Makefile b/openwrt/package/rrdtool/Makefile deleted file mode 100644 index 3bea4aa9a61..00000000000 --- a/openwrt/package/rrdtool/Makefile +++ /dev/null @@ -1,111 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rrdtool -PKG_VERSION:=1.2.11 -PKG_RELEASE:=1 -PKG_MD5SUM:=d61c5755cb77207f9ad3584b26e8bf08 - -PKG_SOURCE_URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBRRD,librrd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,RRDCGI,rrdcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,RRDTOOL,rrdtool,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/freetype2 -I$(STAGING_DIR)/usr/include/libart-2.0" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib " \ - LIBS="-lnotimpl" \ - PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - rd_cv_ieee_works=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared=yes \ - --enable-static=yes \ - --disable-rpath \ - --with-gnu-ld \ - --enable-rrdcgi \ - --disable-mmap \ - --disable-perl \ - --disable-tcl \ - --disable-python \ - --without-x \ - --with-rrd-default-font=/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_RRDTOOL): - install -d -m0755 $(IDIR_RRDTOOL)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(IDIR_RRDTOOL)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(IDIR_RRDTOOL)/usr/bin/ - $(RSTRIP) $(IDIR_RRDTOOL) - $(IPKG_BUILD) $(IDIR_RRDTOOL) $(PACKAGE_DIR) - -$(IPKG_RRDCGI): - install -d -m0755 $(IDIR_RRDCGI)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(IDIR_RRDCGI)/usr/bin/ - $(RSTRIP) $(IDIR_RRDCGI) - $(IPKG_BUILD) $(IDIR_RRDCGI) $(PACKAGE_DIR) - -$(IPKG_LIBRRD): - install -d -m0755 $(IDIR_LIBRRD)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(IDIR_LIBRRD)/usr/lib/ - install -d -m0755 $(IDIR_LIBRRD)/usr/share/rrdtool/fonts - $(CP) $(PKG_BUILD_DIR)/src/DejaVuSansMono-Roman.ttf \ - $(IDIR_LIBRRD)/usr/share/rrdtool/fonts/ - $(RSTRIP) $(IDIR_LIBRRD) - $(IPKG_BUILD) $(IDIR_LIBRRD) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/librrd.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/librrd.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/rrd.h \ - $(STAGING_DIR)/usr/lib/librrd.a \ - $(STAGING_DIR)/usr/lib/librrd.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/rrdtool/ipkg/librrd.control b/openwrt/package/rrdtool/ipkg/librrd.control deleted file mode 100644 index fe34716ba12..00000000000 --- a/openwrt/package/rrdtool/ipkg/librrd.control +++ /dev/null @@ -1,14 +0,0 @@ -Package: librrd -Priority: optional -Section: libs -Depends: libart, libfreetype, libpng, zlib -Description: Round Robin Database (RRD) management library. - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - . - This package contains the shared library used to manage RRDs. diff --git a/openwrt/package/rrdtool/ipkg/rrdcgi.control b/openwrt/package/rrdtool/ipkg/rrdcgi.control deleted file mode 100644 index ca0f7cacd9c..00000000000 --- a/openwrt/package/rrdtool/ipkg/rrdcgi.control +++ /dev/null @@ -1,15 +0,0 @@ -Package: rrdcgi -Priority: optional -Section: web -Depends: cgilib, librrd -Description: Round Robin Database (RRD) CGI graphing tool. - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - . - This package contains the rrdcgi tool used to create web pages containing - RRD graphs based on templates. diff --git a/openwrt/package/rrdtool/ipkg/rrdtool.control b/openwrt/package/rrdtool/ipkg/rrdtool.control deleted file mode 100644 index 6e273331b40..00000000000 --- a/openwrt/package/rrdtool/ipkg/rrdtool.control +++ /dev/null @@ -1,14 +0,0 @@ -Package: rrdtool -Priority: optional -Section: admin -Depends: librrd -Description: Round Robin Database (RRD) management tools. - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - . - This package contains command line tools used to manage RRDs. diff --git a/openwrt/package/rrdtool1/Config.in b/openwrt/package/rrdtool1/Config.in deleted file mode 100644 index e79df5b4aac..00000000000 --- a/openwrt/package/rrdtool1/Config.in +++ /dev/null @@ -1,75 +0,0 @@ -config BR2_COMPILE_RRDTOOL1 - prompt "rrdtool1.......................... Round Robin Database (RRD) tools (v1.0.x)" - tristate - default m if CONFIG_DEVEL - -config BR2_PACKAGE_LIBRRD1 - prompt "librrd1......................... Round Robin Database (RRD) management library (v1.0.x)" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_RRDTOOL1 - select BR2_PACKAGE_ZLIB - help - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ - - This package contains command line tools used to manage RRDs. - - This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into - librrd.so. The library is much smaller compared to the 1.2.x version with - separate dynamic linked libraries. - -config BR2_PACKAGE_RRDCGI1 - prompt "rrdcgi1......................... Round Robin Database (RRD) CGI graphing tool (v1.0.x)" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_RRDTOOL1 - select BR2_PACKAGE_LIBRRD1 - help - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ - - This package contains the rrdcgi tool used to create web pages containing - RRD graphs based on templates. - - This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into - librrd.so. The library is much smaller compared to the 1.2.x version with - separate dynamic linked libraries. - -config BR2_PACKAGE_RRDTOOL1 - prompt "rrdtool1........................ Round Robin Database (RRD) management tools (v1.0.x)" - tristate - default m if CONFIG_DEVEL - depends BR2_COMPILE_RRDTOOL1 - select BR2_PACKAGE_LIBRRD1 - help - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ - - This package contains command line tools used to manage RRDs. - - This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into - librrd.so. The library is much smaller compared to the 1.2.x version with - separate dynamic linked libraries. - diff --git a/openwrt/package/rrdtool1/Makefile b/openwrt/package/rrdtool1/Makefile deleted file mode 100644 index b0eb9fcc71f..00000000000 --- a/openwrt/package/rrdtool1/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rrdtool1 -PKG_VERSION:=1.0.50 -PKG_RELEASE:=1 -PKG_MD5SUM:=c466e2e7df95fa8e318e46437da87686 - -PKG_SOURCE_URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBRRD1,librrd1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,RRDCGI1,rrdcgi1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,RRDTOOL1,rrdtool1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{status,cache} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_path_PERL=no \ - rd_cv_ieee_works=yes \ - shrext_cmds=".so" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared=yes \ - --enable-static=yes \ - --disable-rpath \ - --with-gnu-ld \ - --enable-local-zlib \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - shrext_cmds=".so" \ - all install - touch $@ - -$(IPKG_RRDTOOL1): - install -d -m0755 $(IDIR_RRDTOOL1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(IDIR_RRDTOOL1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(IDIR_RRDTOOL1)/usr/bin/ - $(RSTRIP) $(IDIR_RRDTOOL1) - $(IPKG_BUILD) $(IDIR_RRDTOOL1) $(PACKAGE_DIR) - -$(IPKG_RRDCGI1): - install -d -m0755 $(IDIR_RRDCGI1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(IDIR_RRDCGI1)/usr/bin/ - $(RSTRIP) $(IDIR_RRDCGI1) - $(IPKG_BUILD) $(IDIR_RRDCGI1) $(PACKAGE_DIR) - -$(IPKG_LIBRRD1): - install -d -m0755 $(IDIR_LIBRRD1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(IDIR_LIBRRD1)/usr/lib/ - $(RSTRIP) $(IDIR_LIBRRD1) - $(IPKG_BUILD) $(IDIR_LIBRRD1) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/librrd.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/librrd.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/rrd.h \ - $(STAGING_DIR)/usr/lib/librrd.a \ - $(STAGING_DIR)/usr/lib/librrd.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/rrdtool1/ipkg/librrd1.control b/openwrt/package/rrdtool1/ipkg/librrd1.control deleted file mode 100644 index 1c0494c90a8..00000000000 --- a/openwrt/package/rrdtool1/ipkg/librrd1.control +++ /dev/null @@ -1,18 +0,0 @@ -Package: librrd1 -Priority: optional -Section: libs -Depends: zlib -Description: Round Robin Database (RRD) management library. - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - . - This package contains the shared library used to manage RRDs. - . - This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into - librrd.so. The library is much smaller compared to the 1.2.x version with - separate dynamic linked libraries. diff --git a/openwrt/package/rrdtool1/ipkg/rrdcgi1.control b/openwrt/package/rrdtool1/ipkg/rrdcgi1.control deleted file mode 100644 index 330f77a3ad2..00000000000 --- a/openwrt/package/rrdtool1/ipkg/rrdcgi1.control +++ /dev/null @@ -1,19 +0,0 @@ -Package: rrdcgi1 -Priority: optional -Section: web -Depends: librrd1 -Description: Round Robin Database (RRD) CGI graphing tool. - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - . - This package contains the rrdcgi tool used to create web pages containing - RRD graphs based on templates. - . - This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into - librrd.so. The library is much smaller compared to the 1.2.x version with - separate dynamic linked libraries. diff --git a/openwrt/package/rrdtool1/ipkg/rrdtool1.control b/openwrt/package/rrdtool1/ipkg/rrdtool1.control deleted file mode 100644 index 1bf7eaec3f6..00000000000 --- a/openwrt/package/rrdtool1/ipkg/rrdtool1.control +++ /dev/null @@ -1,18 +0,0 @@ -Package: rrdtool1 -Priority: optional -Section: admin -Depends: librrd1 -Description: Round Robin Database (RRD) management tools. - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - . - This package contains command line tools used to manage RRDs. - . - This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into - librrd.so. The library is much smaller compared to the 1.2.x version with - separate dynamic linked libraries. diff --git a/openwrt/package/rrs/Config.in b/openwrt/package/rrs/Config.in deleted file mode 100644 index 28a3f0bde22..00000000000 --- a/openwrt/package/rrs/Config.in +++ /dev/null @@ -1,31 +0,0 @@ -#menu "rrs............................... A reverse (connecting) remote shell" - -config BR2_COMPILE_RRS - tristate - default n - depends BR2_PACKAGE_RRS || BR2_PACKAGE_RRS_NOSSL - -config BR2_PACKAGE_RRS - prompt "rrs............................... A reverse (connecting) remote shell, with SSL support" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_RRS - select BR2_PACKAGE_UCLIBCXX - select BR2_PACKAGE_LIBOPENSSL - help - A reverse (connecting) remote shell, built with SSL support. - - http://www.cycom.se/dl/rrs/ - -config BR2_PACKAGE_RRS_NOSSL - prompt "rrs-nossl......................... A reverse (connecting) remote shell, without SSL support" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_RRS - select BR2_PACKAGE_UCLIBCXX - help - A reverse (connecting) remote shell, built without SSL support. - - http://www.cycom.se/dl/rrs/ - -#endmenu diff --git a/openwrt/package/rrs/Makefile b/openwrt/package/rrs/Makefile deleted file mode 100644 index 0024f513fce..00000000000 --- a/openwrt/package/rrs/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rrs -PKG_VERSION:=1.70 -PKG_RELEASE:=1 -PKG_MD5SUM:=b400d03c0e39e3e78a7327ba78f789f0 - -PKG_SOURCE_URL:=http://www.cycom.se/uploads/36/19 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,RRS,rrs,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,RRS_NOSSL,rrs-nossl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured -ifneq ($(BR2_PACKAGE_RRS),) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -fno-builtin -fno-rtti -nostdinc++" \ - LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -luClibc++ -lc -lm -lutil -lssl -lcrypto" \ - generic - ( cd $(PKG_BUILD_DIR); mv rrs rrs-ssl; ) - -$(MAKE) -C $(PKG_BUILD_DIR) \ - clean -endif -ifneq ($(BR2_PACKAGE_RRS_NOSSL),) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -fno-builtin -fno-rtti -nostdinc++" \ - LDFLAGSNOSSL="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -luClibc++ -lc -lm -lutil" \ - generic-nossl - ( cd $(PKG_BUILD_DIR); mv rrs rrs-nossl; ) -endif - touch $@ - -$(IPKG_RRS): - install -d -m0755 $(IDIR_RRS)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/rrs-ssl $(IDIR_RRS)/usr/bin/rrs - $(RSTRIP) $(IDIR_RRS) - $(IPKG_BUILD) $(IDIR_RRS) $(PACKAGE_DIR) - -$(IPKG_RRS_NOSSL): - install -d -m0755 $(IDIR_RRS_NOSSL)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/rrs-nossl $(IDIR_RRS_NOSSL)/usr/bin/rrs - $(RSTRIP) $(IDIR_RRS_NOSSL) - $(IPKG_BUILD) $(IDIR_RRS_NOSSL) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/rrs/ipkg/rrs-nossl.control b/openwrt/package/rrs/ipkg/rrs-nossl.control deleted file mode 100644 index f69f0832f48..00000000000 --- a/openwrt/package/rrs/ipkg/rrs-nossl.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: rrs-nossl -Priority: optional -Section: net -Depends: uclibc++ -Description: A reverse (connecting) remote shell, without SSL support. - diff --git a/openwrt/package/rrs/ipkg/rrs.control b/openwrt/package/rrs/ipkg/rrs.control deleted file mode 100644 index adddb163f4b..00000000000 --- a/openwrt/package/rrs/ipkg/rrs.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: rrs -Priority: optional -Section: net -Depends: uclibc++, libopenssl -Description: A reverse (connecting) remote shell, with SSL support. - diff --git a/openwrt/package/rrs/patches/rrs-1.70-shell.patch b/openwrt/package/rrs/patches/rrs-1.70-shell.patch deleted file mode 100644 index 822ce7c18e6..00000000000 --- a/openwrt/package/rrs/patches/rrs-1.70-shell.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN rrs-1.70-old/rrs.c rrs-1.70-new/rrs.c ---- rrs-1.70-old/rrs.c 2004-05-30 02:32:03.000000000 +0200 -+++ rrs-1.70-new/rrs.c 2005-10-12 12:41:24.000000000 +0200 -@@ -920,7 +920,7 @@ - close(slave_fd); - signal(SIGHUP, SIG_DFL); - signal(SIGCHLD, SIG_DFL); -- execl("/bin/sh", "", NULL); -+ execl("/bin/sh", "/bin/sh", NULL); - /* should not return */ - exit(1); - } else if (pid > 0) { diff --git a/openwrt/package/rsync/Config.in b/openwrt/package/rsync/Config.in deleted file mode 100644 index f9f02bfdb60..00000000000 --- a/openwrt/package/rsync/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_RSYNC - prompt "rsync............................. file transfer utility" - tristate - select BR2_PACKAGE_LIBPOPT - default m if CONFIG_DEVEL - help - An utility that provides fast incremental file transfer - - http://rsync.samba.org - diff --git a/openwrt/package/rsync/Makefile b/openwrt/package/rsync/Makefile deleted file mode 100644 index 0089326e318..00000000000 --- a/openwrt/package/rsync/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rsync -PKG_VERSION:=2.6.5 -PKG_RELEASE:=0 -PKG_MD5SUM:=3691cdf1540d0649ba679edce6bae8fc - -PKG_SOURCE_URL:=http://rsync.samba.org/ftp/rsync/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,RSYNC,rsync,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_RSYNC): - install -d -m0755 $(IDIR_RSYNC)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_RSYNC)/usr/bin - $(RSTRIP) $(IDIR_RSYNC) - $(IPKG_BUILD) $(IDIR_RSYNC) $(PACKAGE_DIR) diff --git a/openwrt/package/rsync/ipkg/rsync.control b/openwrt/package/rsync/ipkg/rsync.control deleted file mode 100644 index 5cfa16dc8e5..00000000000 --- a/openwrt/package/rsync/ipkg/rsync.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: rsync -Priority: optional -Section: net -Depends: libpopt -Description: utility that provides fast incremental file transfer diff --git a/openwrt/package/sablevm-classpath/Config.in b/openwrt/package/sablevm-classpath/Config.in deleted file mode 100644 index 4aef84db33a..00000000000 --- a/openwrt/package/sablevm-classpath/Config.in +++ /dev/null @@ -1,59 +0,0 @@ -config BR2_COMPILE_SABLEVM_CLASSPATH - tristate - default n - depends BR2_PACKAGE_LIBSABLEVM_CLASSPATH - -config BR2_PACKAGE_LIBSABLEVM_CLASSPATH - prompt "libsablevm-classpath.............. Essential native libraries for Java" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_SABLEVM_CLASSPATH - help - GNU Classpath, Essential Libraries for Java, is a GNU project to create - free core class libraries for use with virtual machines and compilers for - the java programming language. - - This is a modified version for use with SableVM. - - http://www.gnu.org/software/classpath/ - - This package contains the native shared libraries, needed by other packages. - -choice - prompt "sablevm-classpath............... Essential classes for Java" - tristate - depends BR2_PACKAGE_LIBSABLEVM_CLASSPATH - optional - -config BR2_PACKAGE_SABLEVM_CLASSPATH_FULL - prompt "sablevm-classpath-full........ Full set" - tristate - help - GNU Classpath, Essential Libraries for Java, is a GNU project to create - free core class libraries for use with virtual machines and compilers for - the java programming language. - - This is a modified version for use with SableVM. - - http://www.gnu.org/software/classpath/ - - This package contains the full set of Java compiled classes. - It will unlikely fit on your router as-is. - -config BR2_PACKAGE_SABLEVM_CLASSPATH_MINI - prompt "sablevm-classpath-mini........ Minimal set" - tristate - help - - GNU Classpath, Essential Libraries for Java, is a GNU project to create - free core class libraries for use with virtual machines and compilers for - the java programming language. - - This is a modified version for use with SableVM. - - http://www.gnu.org/software/classpath/ - - This package contains only a minimal set of Java compiled classes, just - enough to run the famous "Hello World !" test program. - -endchoice diff --git a/openwrt/package/sablevm-classpath/Makefile b/openwrt/package/sablevm-classpath/Makefile deleted file mode 100644 index cbe76340289..00000000000 --- a/openwrt/package/sablevm-classpath/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sablevm-classpath -PKG_VERSION:=1.11.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=0aed850f5583199b3d1adb41ac2043ed - -PKG_SOURCE_URL:=http://sablevm.org/download/release/$(PKG_VERSION)/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -BR2_PACKAGE_LIBSABLEVM_CLASSPATH=m -BR2_PACKAGE_SABLEVM_CLASSPATH_FULL=m -BR2_PACKAGE_SABLEVM_CLASSPATH_MINI=m - -$(eval $(call PKG_template,LIBSABLEVM_CLASSPATH,libsablevm-classpath,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SABLEVM_CLASSPATH_FULL,sablevm-classpath-full,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SABLEVM_CLASSPATH_MINI,sablevm-classpath-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-gtk-peer \ - --disable-gtk-cairo \ - --without-x \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - $(CP) ./files/mini.classlist $(PKG_BUILD_DIR)/lib/ - cd $(PKG_BUILD_DIR)/lib ; fastjar -Mcf mini.jar -@ < mini.classlist - touch $@ - -$(IPKG_LIBSABLEVM_CLASSPATH): - install -d -m0755 $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/sablevm-classpath - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sablevm-classpath/libjava*.so $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/sablevm-classpath/ - install -d -m0755 $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/security - $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/classpath.security $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/security/ - $(RSTRIP) $(IDIR_LIBSABLEVM_CLASSPATH) - $(IPKG_BUILD) $(IDIR_LIBSABLEVM_CLASSPATH) $(PACKAGE_DIR) - -$(IPKG_SABLEVM_CLASSPATH_FULL): - install -d -m0755 $(IDIR_SABLEVM_CLASSPATH_FULL)/usr/share/sablevm-classpath - $(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm-classpath/{libclasspath,resources}.jar \ - $(IDIR_SABLEVM_CLASSPATH_FULL)/usr/share/sablevm-classpath/ - $(IPKG_BUILD) $(IDIR_SABLEVM_CLASSPATH_FULL) $(PACKAGE_DIR) - -$(IPKG_SABLEVM_CLASSPATH_MINI): - install -d -m0755 $(IDIR_SABLEVM_CLASSPATH_MINI)/usr/share/sablevm-classpath - install -m0755 $(PKG_BUILD_DIR)/lib/mini.jar \ - $(IDIR_SABLEVM_CLASSPATH_MINI)/usr/share/sablevm-classpath/libclasspath.jar - $(IPKG_BUILD) $(IDIR_SABLEVM_CLASSPATH_MINI) $(PACKAGE_DIR) diff --git a/openwrt/package/sablevm-classpath/files/mini.classlist b/openwrt/package/sablevm-classpath/files/mini.classlist deleted file mode 100644 index 1186d6f6f67..00000000000 --- a/openwrt/package/sablevm-classpath/files/mini.classlist +++ /dev/null @@ -1,180 +0,0 @@ -./gnu/classpath/SystemProperties.class -./gnu/classpath/VMStackWalker.class -./gnu/classpath/VMSystemProperties.class -./gnu/java/io/decode/Decoder.class -./gnu/java/io/decode/Decoder8859_1.class -./gnu/java/io/decode/DecoderEightBitLookup.class -./gnu/java/io/encode/Encoder.class -./gnu/java/io/encode/Encoder8859_1.class -./gnu/java/io/encode/EncoderEightBitLookup.class -./gnu/java/io/EncodingManager.class -./gnu/java/net/protocol/file/Handler.class -./gnu/java/nio/channels/FileChannelImpl.class -./gnu/java/security/provider/DefaultPolicy.class -./java/io/BufferedInputStream.class -./java/io/BufferedOutputStream.class -./java/io/File.class -./java/io/FileDescriptor.class -./java/io/FileInputStream.class -./java/io/FileOutputStream.class -./java/io/FilePermission.class -./java/io/FilterInputStream.class -./java/io/FilterOutputStream.class -./java/io/InputStream.class -./java/io/OutputStream.class -./java/io/OutputStreamWriter.class -./java/io/PrintStream.class -./java/io/PrintStream$ForwardStream.class -./java/io/PrintWriter.class -./java/io/Reader.class -./java/io/Serializable.class -./java/io/VMFile.class -./java/io/Writer.class -./java/lang/AbstractMethodError.class -./java/lang/ArithmeticException.class -./java/lang/ArrayIndexOutOfBoundsException.class -./java/lang/ArrayStoreException.class -./java/lang/Character.class -./java/lang/CharSequence.class -./java/lang/Class.class -./java/lang/ClassCastException.class -./java/lang/ClassCircularityError.class -./java/lang/ClassFormatError.class -./java/lang/ClassLoader.class -./java/lang/ClassLoader$1.class -./java/lang/ClassLoader$StaticData.class -./java/lang/ClassNotFoundException.class -./java/lang/Cloneable.class -./java/lang/Comparable.class -./java/lang/Error.class -./java/lang/Exception.class -./java/lang/ExceptionInInitializerError.class -./java/lang/IllegalMonitorStateException.class -./java/lang/IncompatibleClassChangeError.class -./java/lang/IndexOutOfBoundsException.class -./java/lang/Integer.class -./java/lang/InternalError.class -./java/lang/InterruptedException.class -./java/lang/LinkageError.class -./java/lang/Math.class -./java/lang/NegativeArraySizeException.class -./java/lang/NoClassDefFoundError.class -./java/lang/NoSuchFieldError.class -./java/lang/NoSuchFieldException.class -./java/lang/NoSuchMethodError.class -./java/lang/NoSuchMethodException.class -./java/lang/NullPointerException.class -./java/lang/Number.class -./java/lang/Object.class -./java/lang/OutOfMemoryError.class -./java/lang/ref/Reference.class -./java/lang/ref/ReferenceQueue.class -./java/lang/ref/WeakReference.class -./java/lang/reflect/AccessibleObject.class -./java/lang/reflect/Constructor.class -./java/lang/reflect/Field.class -./java/lang/reflect/InvocationTargetException.class -./java/lang/reflect/Member.class -./java/lang/reflect/Method.class -./java/lang/reflect/Modifier.class -./java/lang/reflect/ReflectUtil.class -./java/lang/Runnable.class -./java/lang/Runtime.class -./java/lang/RuntimeException.class -./java/lang/SecurityManager.class -./java/lang/StackTraceElement.class -./java/lang/String.class -./java/lang/String$CaseInsensitiveComparator.class -./java/lang/StringBuffer.class -./java/lang/StringCreator.class -./java/lang/System.class -./java/lang/Thread.class -./java/lang/ThreadGroup.class -./java/lang/ThreadLocal.class -./java/lang/ThreadLocal$Key.class -./java/lang/Throwable.class -./java/lang/UnsatisfiedLinkError.class -./java/lang/UnsupportedClassVersionError.class -./java/lang/VerifyError.class -./java/lang/VirtualMachine.class -./java/lang/VirtualMachineError.class -./java/lang/VMClass.class -./java/lang/VMClassLoader.class -./java/lang/VMObject.class -./java/lang/VMRuntime.class -./java/lang/VMString.class -./java/lang/VMSystem.class -./java/lang/VMThread.class -./java/net/URL.class -./java/net/URL$1.class -./java/net/URLClassLoader.class -./java/net/URLClassLoader$FileResource.class -./java/net/URLClassLoader$FileURLLoader.class -./java/net/URLClassLoader$Resource.class -./java/net/URLClassLoader$URLLoader.class -./java/net/URLStreamHandler.class -./java/nio/ByteBuffer$vm.class -./java/nio/channels/ByteChannel.class -./java/nio/channels/Channel.class -./java/nio/channels/FileChannel.class -./java/nio/channels/GatheringByteChannel.class -./java/nio/channels/InterruptibleChannel.class -./java/nio/channels/ReadableByteChannel.class -./java/nio/channels/ScatteringByteChannel.class -./java/nio/channels/spi/AbstractInterruptibleChannel.class -./java/nio/channels/WritableByteChannel.class -./java/security/AccessControlContext.class -./java/security/AccessController.class -./java/security/AllPermission.class -./java/security/AllPermission$AllPermissionCollection.class -./java/security/CodeSource.class -./java/security/Guard.class -./java/security/Permission.class -./java/security/PermissionCollection.class -./java/security/Permissions.class -./java/security/Permissions$PermissionsHash.class -./java/security/Policy.class -./java/security/Principal.class -./java/security/PrivilegedAction.class -./java/security/ProtectionDomain.class -./java/security/SecureClassLoader.class -./java/security/VMAccessController.class -./java/util/AbstractCollection.class -./java/util/AbstractList.class -./java/util/AbstractMap.class -./java/util/AbstractMap$BasicMapEntry.class -./java/util/AbstractSequentialList.class -./java/util/AbstractSet.class -./java/util/ArrayList.class -./java/util/Collection.class -./java/util/Collections$SynchronizedCollection.class -./java/util/Collections$SynchronizedIterator.class -./java/util/Collections$SynchronizedSet.class -./java/util/Comparator.class -./java/util/Dictionary.class -./java/util/Enumeration.class -./java/util/HashMap.class -./java/util/HashMap$HashEntry.class -./java/util/HashMap$HashIterator.class -./java/util/HashSet.class -./java/util/Hashtable.class -./java/util/Hashtable$3.class -./java/util/Hashtable$HashEntry.class -./java/util/Hashtable$HashIterator.class -./java/util/Iterator.class -./java/util/LinkedList.class -./java/util/LinkedList$Entry.class -./java/util/List.class -./java/util/Locale.class -./java/util/Map.class -./java/util/Map$Entry.class -./java/util/Properties.class -./java/util/RandomAccess.class -./java/util/Set.class -./java/util/StringTokenizer.class -./java/util/Vector.class -./java/util/WeakHashMap.class -./java/util/WeakHashMap$1.class -./java/util/WeakHashMap$WeakBucket.class -./java/util/WeakHashMap$WeakBucket$WeakEntry.class -./java/util/WeakHashMap$WeakEntrySet.class diff --git a/openwrt/package/sablevm-classpath/ipkg/libsablevm-classpath.control b/openwrt/package/sablevm-classpath/ipkg/libsablevm-classpath.control deleted file mode 100644 index 2788fc15af2..00000000000 --- a/openwrt/package/sablevm-classpath/ipkg/libsablevm-classpath.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libsablevm-classpath -Priority: optional -Section: libs -Description: Essential native libraries for Java -Depends: sablevm diff --git a/openwrt/package/sablevm-classpath/ipkg/sablevm-classpath-full.control b/openwrt/package/sablevm-classpath/ipkg/sablevm-classpath-full.control deleted file mode 100644 index 3798800c033..00000000000 --- a/openwrt/package/sablevm-classpath/ipkg/sablevm-classpath-full.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: sablevm-classpath-full -Priority: optional -Section: libs -Description: Essential classes for Java (full set) -Depends: sablevm, libsablevm-classpath diff --git a/openwrt/package/sablevm-classpath/ipkg/sablevm-classpath-mini.control b/openwrt/package/sablevm-classpath/ipkg/sablevm-classpath-mini.control deleted file mode 100644 index 81f53d31518..00000000000 --- a/openwrt/package/sablevm-classpath/ipkg/sablevm-classpath-mini.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: sablevm-classpath-mini -Priority: optional -Section: libs -Description: Essential classes for Java (minimal set) -Depends: sablevm, libsablevm-classpath diff --git a/openwrt/package/sablevm/Config.in b/openwrt/package/sablevm/Config.in deleted file mode 100644 index d387b75d40e..00000000000 --- a/openwrt/package/sablevm/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config BR2_PACKAGE_SABLEVM - prompt "sablevm........................... A Java Virtual Machine (JVM) implementation" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBFFI_SABLE - select BR2_PACKAGE_LIBLTDL - select BR2_PACKAGE_LIBPOPT - select BR2_PACKAGE_ZLIB - help - SableVM is a robust, extremely portable, efficient, and specifications- - -compliant Java virtual machine that aims to be easy to maintain and to - extend. It features a state-of-the-art and efficient interpreter engine. - Its source code is very accessible and easy to understand. It also has - many robustness features that have been the object of careful design. - - http://sablevm.org/ - diff --git a/openwrt/package/sablevm/Makefile b/openwrt/package/sablevm/Makefile deleted file mode 100644 index 7eec3f49245..00000000000 --- a/openwrt/package/sablevm/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sablevm -PKG_VERSION:=1.11.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=aea6e808c5f2e3646a60971485220bff - -PKG_SOURCE_URL:=http://sablevm.org/download/release/$(PKG_VERSION)/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -BR2_PACKAGE_SABLEVM=m - -$(eval $(call PKG_template,SABLEVM,sablevm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -lffi -lltdl -lpopt -lz" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_SABLEVM): - install -m0755 -d $(IDIR_SABLEVM)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/{java-,}sablevm $(IDIR_SABLEVM)/usr/bin/ - install -m0755 -d $(IDIR_SABLEVM)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsablevm-*.so $(IDIR_SABLEVM)/usr/lib/ - $(RSTRIP) $(IDIR_SABLEVM) - $(IPKG_BUILD) $(IDIR_SABLEVM) $(PACKAGE_DIR) diff --git a/openwrt/package/sablevm/ipkg/sablevm.control b/openwrt/package/sablevm/ipkg/sablevm.control deleted file mode 100644 index 2460e419cee..00000000000 --- a/openwrt/package/sablevm/ipkg/sablevm.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: sablevm -Priority: optional -Section: misc -Description: A Java Virtual Machine (JVM) implementation -Depends: libffi-sable, libltdl, libpopt, zlib diff --git a/openwrt/package/samba/Config.in b/openwrt/package/samba/Config.in deleted file mode 100644 index fba7de31b1b..00000000000 --- a/openwrt/package/samba/Config.in +++ /dev/null @@ -1,40 +0,0 @@ -#menu "samba............................. A NetBIOS/SMB implementation" - -config BR2_COMPILE_SAMBA - tristate - default n - depends BR2_PACKAGE_SAMBA || BR2_PACKAGE_SAMBA_CLIENT || BR2_PACKAGE_SMBFS - -config BR2_PACKAGE_SAMBA - prompt "samba............................. NetBIOS/SMB file and print server" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_SAMBA - select BR2_PACKAGE_LIBGCC - help - The Samba software suite is a collection of programs that implements the - SMB protocol for unix systems, allowing you to serve files and printers to - Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred - to as the LanManager or Netbios protocol. - - http://www.samba.org/ - - This package contains the SMB file and print server daemons. - -config BR2_PACKAGE_SAMBA_CLIENT - prompt "samba-client...................... NetBIOS/SMB simple client" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_SAMBA - select BR2_PACKAGE_LIBGCC - help - The Samba software suite is a collection of programs that implements the - SMB protocol for unix systems, allowing you to serve files and printers to - Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred - to as the LanManager or Netbios protocol. - - http://www.samba.org/ - - This package contains a simple command-line SMB client. - -#endmenu diff --git a/openwrt/package/samba/Makefile b/openwrt/package/samba/Makefile deleted file mode 100644 index 2d9defc3433..00000000000 --- a/openwrt/package/samba/Makefile +++ /dev/null @@ -1,177 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=samba -PKG_VERSION:=2.0.10 -PKG_RELEASE:=2 -PKG_MD5SUM:=54870482fe036b7e69dd48c90661eec6 - -PKG_SOURCE_URL:=ftp://se.samba.org/pub/samba/stable \ - ftp://ftp.easynet.be/samba/stable -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SAMBA,samba,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SAMBA_CLIENT,samba-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - (cd $(PKG_BUILD_DIR)/source ; rm -rf config.{cache,status} ; \ - ./configure \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var/log/samba \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/samba \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-lockdir=/var/run/samba \ - --with-privatedir=/etc/samba \ - ); - $(MAKE) -C $(PKG_BUILD_DIR)/source \ - bin/make_smbcodepage bin/make_unicodemap - (cd $(PKG_BUILD_DIR)/source/bin ; \ - mv -f make_smbcodepage make_smbcodepage.old ; \ - mv -f make_unicodemap make_unicodemap.old ; \ - ); - - $(MAKE) -C $(PKG_BUILD_DIR)/source \ - clean - - (cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-lgcc_s -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ac_cv_lib_cups_httpConnect=no \ - ac_cv_sizeof_int=4 \ - ac_cv_sizeof_long=4 \ - ac_cv_sizeof_short=2 \ - samba_cv_FTRUNCATE_NEEDS_ROOT=no \ - samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \ - samba_cv_HAVE_BROKEN_GETGROUPS=no \ - samba_cv_HAVE_BROKEN_READDIR=no \ - samba_cv_HAVE_FCNTL_LOCK=yes \ - samba_cv_HAVE_FNMATCH=yes \ - samba_cv_HAVE_FTRUNCATE_EXTEND=no \ - samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ - samba_cv_HAVE_IFACE_AIX=no \ - samba_cv_HAVE_IFACE_IFCONF=yes \ - samba_cv_HAVE_IFACE_IFREQ=yes \ - samba_cv_HAVE_INO64_T=yes \ - samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no \ - samba_cv_HAVE_OFF64_T=yes \ - samba_cv_HAVE_ROOT=yes \ - samba_cv_HAVE_SECURE_MKSTEMP=yes \ - samba_cv_HAVE_SHARED_MMAP=yes \ - samba_cv_HAVE_STRUCT_FLOCK64=yes \ - samba_cv_HAVE_SYSV_IPC=no \ - samba_cv_HAVE_TRUNCATED_SALT=no \ - samba_cv_HAVE_UNION_SEMUN=no \ - samba_cv_HAVE_UNSIGNED_CHAR=yes \ - samba_cv_NEED_SGI_SEMUN_HACK=no \ - samba_cv_REPLACE_INET_NTOA=no \ - samba_cv_SIZEOF_INO_T=4 \ - samba_cv_SIZEOF_OFF_T=4 \ - samba_cv_SYSCONF_SC_NGROUPS_MAX=yes \ - samba_cv_USE_SETEUID=yes \ - samba_cv_USE_SETRESUID=no \ - samba_cv_USE_SETREUID=yes \ - samba_cv_USE_SETUIDX=no \ - samba_cv_have_longlong=yes \ - samba_cv_have_setresgid=no \ - samba_cv_have_setresuid=no \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var/log/samba \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/samba \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-lockdir=/var/run/samba \ - --with-privatedir=/etc/samba \ - --with-syslog \ - ); - $(MAKE) -C $(PKG_BUILD_DIR)/source \ - $(TARGET_CONFIGURE_OPTS) \ - CODEPAGEDIR="/usr/share/samba" \ - all shared - (cd $(PKG_BUILD_DIR)/source/bin ; \ - mv -f make_smbcodepage.old make_smbcodepage ; touch make_smbcodepage ; \ - mv -f make_unicodemap.old make_unicodemap ; touch make_unicodemap ; \ - ); - mkdir -p $(PKG_INSTALL_DIR)/usr/share/samba - mkdir -p $(PKG_INSTALL_DIR)/var/log - $(MAKE) -C $(PKG_BUILD_DIR)/source \ - BASEDIR="$(PKG_INSTALL_DIR)/usr" \ - BINDIR="$(PKG_INSTALL_DIR)/usr/bin" \ - SBINDIR="$(PKG_INSTALL_DIR)/usr/bin" \ - LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \ - VARDIR="$(PKG_INSTALL_DIR)/var/log/samba" \ - MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \ - CONFIGDIR="$(PKG_INSTALL_DIR)/etc/samba" \ - PRIVATEDIR="$(PKG_INSTALL_DIR)/etc/samba" \ - SWATDIR="$(PKG_INSTALL_DIR)/usr/swat" \ - LOCKDIR="$(PKG_INSTALL_DIR)/var/run/samba" \ - SAMBABOOK="$(PKG_INSTALL_DIR)/usr/swat/using_samba" \ - CODEPAGEDIR="$(PKG_INSTALL_DIR)/usr/share/samba" \ - install - touch $@ - -$(IPKG_SAMBA): - install -d -m0755 $(IDIR_SAMBA)/etc/init.d - install -m0755 ./files/samba.init $(IDIR_SAMBA)/etc/init.d/samba - install -d -m0755 $(IDIR_SAMBA)/etc/samba - install -m0644 ./files/smb.conf $(IDIR_SAMBA)/etc/samba/smb.conf - install -d -m0755 $(IDIR_SAMBA)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/source/bin/smbpasswd.shared $(IDIR_SAMBA)/usr/bin/smbpasswd - install -d -m0755 $(IDIR_SAMBA)/usr/lib - install -m0755 $(PKG_BUILD_DIR)/source/bin/libsmb.so $(IDIR_SAMBA)/usr/lib/ - install -d -m0755 $(IDIR_SAMBA)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/source/bin/nmbd.shared $(IDIR_SAMBA)/usr/sbin/nmbd - install -m0755 $(PKG_BUILD_DIR)/source/bin/smbd.shared $(IDIR_SAMBA)/usr/sbin/smbd - install -d -m0755 $(IDIR_SAMBA)/usr/share/samba - install -m0644 $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{437,850} $(IDIR_SAMBA)/usr/share/samba/ - install -m0644 $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{437,850} $(IDIR_SAMBA)/usr/share/samba/ - $(RSTRIP) $(IDIR_SAMBA) - $(IPKG_BUILD) $(IDIR_SAMBA) $(PACKAGE_DIR) - -$(IPKG_SAMBA_CLIENT): - install -d -m0755 $(IDIR_SAMBA_CLIENT)/usr/bin - install -m0755 $(PKG_INSTALL_DIR)/usr/bin/smbclient $(IDIR_SAMBA_CLIENT)/usr/bin/ - $(RSTRIP) $(IDIR_SAMBA_CLIENT) - $(IPKG_BUILD) $(IDIR_SAMBA_CLIENT) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/samba/files/samba.init b/openwrt/package/samba/files/samba.init deleted file mode 100644 index c3c600ae3eb..00000000000 --- a/openwrt/package/samba/files/samba.init +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/samba -RUN_D=/var/run/samba -NMBD_PID_F=$RUN_D/nmbd.pid -SMBD_PID_F=$RUN_D/smbd.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - nmbd -D $NMBD_OPTIONS - smbd -D $SMBD_OPTIONS - ;; - stop) - [ -f $SMBD_PID_F ] && kill $(cat $SMBD_PID_F) - [ -f $NMBD_PID_F ] && kill $(cat $NMBD_PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/samba/files/smb.conf b/openwrt/package/samba/files/smb.conf deleted file mode 100644 index c52d6dd1b03..00000000000 --- a/openwrt/package/samba/files/smb.conf +++ /dev/null @@ -1,18 +0,0 @@ -[global] - syslog = 0 - syslog only = yes - workgroup = OpenWrt - server string = OpenWrt Samba Server - security = share - encrypt passwords = yes - guest account = nobody - local master = yes - name resolve order = lmhosts hosts bcast - -[tmp] - comment = /tmp - path = /tmp - browseable = yes - public = yes - writeable = no - diff --git a/openwrt/package/samba/ipkg/samba-client.control b/openwrt/package/samba/ipkg/samba-client.control deleted file mode 100644 index c9d71b0029f..00000000000 --- a/openwrt/package/samba/ipkg/samba-client.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: samba-client -Priority: optional -Section: net -Depends: -Description: NetBIOS/SMB client diff --git a/openwrt/package/samba/ipkg/samba.conffiles b/openwrt/package/samba/ipkg/samba.conffiles deleted file mode 100644 index 5c10c50ad09..00000000000 --- a/openwrt/package/samba/ipkg/samba.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/samba/smb.conf diff --git a/openwrt/package/samba/ipkg/samba.control b/openwrt/package/samba/ipkg/samba.control deleted file mode 100644 index c1cf603c4d5..00000000000 --- a/openwrt/package/samba/ipkg/samba.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: samba -Priority: optional -Section: net -Depends: libgcc -Description: NetBIOS/SMB file and print server diff --git a/openwrt/package/samba/patches/100-samba.patch b/openwrt/package/samba/patches/100-samba.patch deleted file mode 100644 index 3bfeed35968..00000000000 --- a/openwrt/package/samba/patches/100-samba.patch +++ /dev/null @@ -1,489 +0,0 @@ -diff -ruN samba-2.0.10.orig/source/include/smb.h samba-2.0.10/source/include/smb.h ---- samba-2.0.10.orig/source/include/smb.h 2001-06-23 10:52:20.000000000 +0200 -+++ samba-2.0.10/source/include/smb.h 2006-03-06 22:21:12.000000000 +0100 -@@ -115,6 +115,22 @@ - * Usage: - * DEBUGADD( 2, ("Some additional text.\n") ); - */ -+ -+#ifdef NDEBUG -+ -+#define DEBUGLVL( level ) \ -+ ( (0 == (level)) \ -+ && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) -+ -+#define DEBUG( level, body ) \ -+ (void)( (0 == (level)) \ -+ && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \ -+ && (dbgtext body) ) -+ -+#define DEBUGADD( level, body ) \ -+ (void)( (0 == (level)) && (dbgtext body) ) -+ -+#else - #define DEBUGLVL( level ) \ - ( (DEBUGLEVEL >= (level)) \ - && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) -@@ -140,7 +156,7 @@ - (void)( (DEBUGLEVEL >= (level)) && (dbgtext body) ) - - #endif -- -+#endif - /* End Debugging code section. - * -------------------------------------------------------------------------- ** - */ -@@ -1612,7 +1628,9 @@ - #define CAP_LOCK_AND_READ 0x0100 - #define CAP_NT_FIND 0x0200 - #define CAP_DFS 0x1000 -+#define CAP_W2K_SMBS 0x2000 - #define CAP_LARGE_READX 0x4000 -+#define CAP_LARGE_WRITEX 0x8000 - #define CAP_EXTENDED_SECURITY 0x80000000 - - /* protocol types. It assumes that higher protocols include lower protocols -diff -ruN samba-2.0.10.orig/source/Makefile.in samba-2.0.10/source/Makefile.in ---- samba-2.0.10.orig/source/Makefile.in 2000-03-16 23:57:08.000000000 +0100 -+++ samba-2.0.10/source/Makefile.in 2006-03-06 22:21:12.000000000 +0100 -@@ -37,8 +37,8 @@ - # set these to where to find various files - # These can be overridden by command line switches (see smbd(8)) - # or in smb.conf (see smb.conf(5)) --SMBLOGFILE = $(VARDIR)/log.smb --NMBLOGFILE = $(VARDIR)/log.nmb -+SMBLOGFILE = $(VARDIR)/smb -+NMBLOGFILE = $(VARDIR)/nmb - CONFIGFILE = $(LIBDIR)/smb.conf - LMHOSTSFILE = $(LIBDIR)/lmhosts - DRIVERFILE = $(LIBDIR)/printers.def -@@ -55,7 +55,7 @@ - LOCKDIR = @lockdir@ - - # The directory where code page definition files go --CODEPAGEDIR = $(LIBDIR)/codepages -+CODEPAGEDIR = $(BASEDIR)/codepages - - # The current codepage definition list. - CODEPAGELIST= 437 737 775 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R -@@ -82,6 +82,7 @@ - PROGS2 = bin/rpcclient bin/smbpasswd bin/make_smbcodepage bin/make_unicodemap @WRAP@ @WRAP32@ - MPROGS = @MPROGS@ - PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup bin/make_printerdef -+SHAREDPROGS = bin/smbd.shared bin/nmbd.shared bin/smbpasswd.shared - - SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd - -@@ -159,6 +160,8 @@ - $(RPC_SERVER_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \ - $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) - -+SMBDSHARED_OBJ = $(SMBD_OBJ1) $(RPC_SERVER_OBJ) \ -+ $(LOCKING_OBJ) $(PROFILE_OBJ) #$(PRINTING_OBJ) - - NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ - nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \ -@@ -176,6 +179,8 @@ - NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ - $(LIB_OBJ) - -+NMBDSHARED_OBJ = $(NMBD_OBJ1) -+ - SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \ - web/swat.o $(LIBSMB_OBJ) $(LOCKING_OBJ) \ - $(PARAM_OBJ) $(PASSDB_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \ -@@ -207,6 +212,8 @@ - SMBPASSWD_OBJ = utils/smbpasswd.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \ - $(UBIQX_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(LIB_OBJ) - -+SMBPASSWDSHARED_OBJ = utils/smbpasswd.o -+ - RPCCLIENT_OBJ = rpcclient/rpcclient.o \ - rpcclient/display.o \ - rpcclient/cmd_lsarpc.o \ -@@ -265,6 +272,11 @@ - PROTO_OBJ = $(SMBD_OBJ) $(NMBD_OBJ) $(SWAT_OBJ) $(CLIENT_OBJ) \ - $(RPCCLIENT_OBJ) $(SMBWRAPPER_OBJ) $(SMBTORTURE_OBJ) - -+LIBSMBSHARED_OBJ = $(LIB_OBJ) $(LIBSMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ) \ -+ $(PASSDB_OBJ) $(RPC_PARSE_OBJ) #$(RPC_CLIENT_OBJ) -+ -+LIBSMB_PICOBJS = $(LIBSMBSHARED_OBJ:.o=.po) -+ - PICOBJS = $(SMBWRAPPER_OBJ:.o=.po) - PICOBJS32 = $(SMBWRAPPER_OBJ:.o=.po32) - -@@ -274,6 +286,8 @@ - - all : CHECK $(SPROGS) $(PROGS) - -+shared : CHECK $(SHAREDPROGS) -+ - smbwrapper : CHECK bin/smbsh bin/smbwrapper.@SHLIBEXT@ @WRAP32@ - - smbtorture : CHECK bin/smbtorture -@@ -359,10 +373,18 @@ - @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) - -+bin/smbd.shared: $(SMBDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy -+ @echo Linking $@ -+ @$(CC) $(FLAGS) -o $@ $(SMBDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb -+ - bin/nmbd: $(NMBD_OBJ) bin/.dummy - @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(LIBS) - -+bin/nmbd.shared: $(NMBDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy -+ @echo Linking $@ -+ @$(CC) $(FLAGS) -o $@ $(NMBDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb -+ - bin/swat: $(SWAT_OBJ) bin/.dummy - @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS) -@@ -411,6 +433,10 @@ - @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS) - -+bin/smbpasswd.shared: $(SMBPASSWDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy -+ @echo Linking $@ -+ @$(CC) $(FLAGS) -o $@ $(SMBPASSWDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb -+ - bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ) bin/.dummy - @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(MAKE_SMBCODEPAGE_OBJ) $(LDFLAGS) $(LIBS) -@@ -459,6 +485,10 @@ - @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS) - -+bin/libsmb.@SHLIBEXT@: $(LIBSMB_PICOBJS) bin/.dummy -+ @echo Linking shared library $@ -+ @$(LD) @LDSHFLAGS@ -o $@ $(LIBSMB_PICOBJS) $(LIBS) -+ - install: installbin installman installscripts installcp installswat - - installdirs: -@@ -518,7 +548,7 @@ - ctags `find . -name "*.[ch]" | grep -v /CVS/` - - realclean: clean -- -rm -f config.log $(PROGS) $(SPROGS) bin/.dummy -+ -rm -f config.log $(PROGS) $(SPROGS) $(SHAREDPROGS) bin/.dummy - -rmdir bin - - distclean: realclean -diff -ruN samba-2.0.10.orig/source/nmbd/nmbd_mynames.c samba-2.0.10/source/nmbd/nmbd_mynames.c ---- samba-2.0.10.orig/source/nmbd/nmbd_mynames.c 2000-03-16 23:59:24.000000000 +0100 -+++ samba-2.0.10/source/nmbd/nmbd_mynames.c 2006-03-06 22:21:12.000000000 +0100 -@@ -215,8 +215,8 @@ - */ - if( !is_refresh_already_queued( subrec, namerec) ) - refresh_name( subrec, namerec, NULL, NULL, NULL ); -- namerec->data.death_time += lp_max_ttl(); -- namerec->data.refresh_time += MIN(lp_max_ttl(), MAX_REFRESH_TIME); -+ namerec->data.death_time = t + lp_max_ttl(); -+ namerec->data.refresh_time = t + MIN(lp_max_ttl(), MAX_REFRESH_TIME); - } - } - } -diff -ruN samba-2.0.10.orig/source/smbd/close.c samba-2.0.10/source/smbd/close.c ---- samba-2.0.10.orig/source/smbd/close.c 2000-04-21 19:43:13.000000000 +0200 -+++ samba-2.0.10/source/smbd/close.c 2006-03-06 22:21:12.000000000 +0100 -@@ -122,11 +122,11 @@ - last_reference = True; - - fsp->fd_ptr = NULL; -- -+#ifdef PRINTING - /* NT uses smbclose to start a print - weird */ - if (normal_close && fsp->print_file) - print_file(conn, fsp); -- -+#endif - /* check for magic scripts */ - if (normal_close) { - check_magic(fsp,conn); -diff -ruN samba-2.0.10.orig/source/smbd/ipc.c samba-2.0.10/source/smbd/ipc.c ---- samba-2.0.10.orig/source/smbd/ipc.c 2000-03-30 00:20:06.000000000 +0200 -+++ samba-2.0.10/source/smbd/ipc.c 2006-03-06 22:21:12.000000000 +0100 -@@ -472,7 +472,7 @@ - PACK(desc,t,v); - } - -- -+#ifdef PRINTING - /**************************************************************************** - get a print queue - ****************************************************************************/ -@@ -1004,7 +1004,7 @@ - - return True; - } -- -+#endif - /**************************************************************************** - get info level for a server list query - ****************************************************************************/ -@@ -1834,7 +1834,7 @@ - - return(True); - } -- -+#ifdef PRINTING - /**************************************************************************** - delete a print job - Form: <> -@@ -2091,7 +2091,7 @@ - - return(True); - } -- -+#endif - - /**************************************************************************** - get info about the server -@@ -2756,7 +2756,7 @@ - - return(True); - } -- -+#ifdef PRINTING - /**************************************************************************** - api_WPrintJobEnumerate - ****************************************************************************/ -@@ -3189,7 +3189,7 @@ - DEBUG(4,("WPrintPortEnum: errorcode %d\n",desc.errcode)); - return(True); - } -- -+#endif - /**************************************************************************** - Start the first part of an RPC reply which began with an SMBtrans request. - ****************************************************************************/ -@@ -3407,6 +3407,7 @@ - {"RNetUserGetInfo", 56, api_RNetUserGetInfo,0}, - {"NetUserGetGroups", 59, api_NetUserGetGroups,0}, - {"NetWkstaGetInfo", 63, api_NetWkstaGetInfo,0}, -+#ifdef PRINTING - {"DosPrintQEnum", 69, api_DosPrintQEnum,0}, - {"DosPrintQGetInfo", 70, api_DosPrintQGetInfo,0}, - {"WPrintQueuePause", 74, api_WPrintQueuePurge,0}, -@@ -3418,16 +3419,21 @@ - {"RDosPrintJobResume",83, api_RDosPrintJobDel,0}, - {"WPrintDestEnum", 84, api_WPrintDestEnum,0}, - {"WPrintDestGetInfo", 85, api_WPrintDestGetInfo,0}, -+#endif - {"NetRemoteTOD", 91, api_NetRemoteTOD,0}, -+#ifdef PRINTING - {"WPrintQueuePurge", 103, api_WPrintQueuePurge,0}, -+#endif - {"NetServerEnum", 104, api_RNetServerEnum,0}, - {"WAccessGetUserPerms",105, api_WAccessGetUserPerms,0}, - {"SetUserPassword", 115, api_SetUserPassword,0}, - {"WWkstaUserLogon", 132, api_WWkstaUserLogon,0}, -+#ifdef PRINTING - {"PrintJobInfo", 147, api_PrintJobInfo,0}, - {"WPrintDriverEnum", 205, api_WPrintDriverEnum,0}, - {"WPrintQProcEnum", 206, api_WPrintQProcEnum,0}, - {"WPrintPortEnum", 207, api_WPrintPortEnum,0}, -+#endif - {"SamOEMChangePassword", 214, api_SamOEMChangePassword,0}, - {NULL, -1, api_Unsupported,0}}; - -diff -ruN samba-2.0.10.orig/source/smbd/negprot.c samba-2.0.10/source/smbd/negprot.c ---- samba-2.0.10.orig/source/smbd/negprot.c 2000-03-16 23:59:47.000000000 +0100 -+++ samba-2.0.10/source/smbd/negprot.c 2006-03-06 22:21:12.000000000 +0100 -@@ -160,7 +160,7 @@ - /* dual names + lock_and_read + nt SMBs + remote API calls */ - int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ| - (lp_nt_smb_support() ? CAP_NT_SMBS | CAP_RPC_REMOTE_APIS : 0) | -- (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES : 0); -+ (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES | CAP_LARGE_READX | CAP_LARGE_WRITEX /*| CAP_W2K_SMBS*/ : 0); - - - /* -diff -ruN samba-2.0.10.orig/source/smbd/password.c samba-2.0.10/source/smbd/password.c ---- samba-2.0.10.orig/source/smbd/password.c 2000-03-16 23:59:48.000000000 +0100 -+++ samba-2.0.10/source/smbd/password.c 2006-03-06 22:21:12.000000000 +0100 -@@ -1149,7 +1149,7 @@ - - return(True); - } -- -+#ifdef RPCCLIENT - /*********************************************************************** - Connect to a remote machine for domain security authentication - given a name or IP address. -@@ -1504,3 +1504,4 @@ - cli_shutdown(&cli); - return True; - } -+#endif -diff -ruN samba-2.0.10.orig/source/smbd/process.c samba-2.0.10/source/smbd/process.c ---- samba-2.0.10.orig/source/smbd/process.c 2000-04-15 02:21:27.000000000 +0200 -+++ samba-2.0.10/source/smbd/process.c 2006-03-06 22:21:12.000000000 +0100 -@@ -343,10 +343,12 @@ - {SMBlseek,"SMBlseek",reply_lseek,AS_USER}, - {SMBflush,"SMBflush",reply_flush,AS_USER}, - {SMBctemp,"SMBctemp",reply_ctemp,AS_USER | QUEUE_IN_OPLOCK }, -+#ifdef PRINTING - {SMBsplopen,"SMBsplopen",reply_printopen,AS_USER | QUEUE_IN_OPLOCK }, - {SMBsplclose,"SMBsplclose",reply_printclose,AS_USER}, - {SMBsplretq,"SMBsplretq",reply_printqueue,AS_USER}, - {SMBsplwr,"SMBsplwr",reply_printwrite,AS_USER}, -+#endif - {SMBlock,"SMBlock",reply_lock,AS_USER}, - {SMBunlock,"SMBunlock",reply_unlock,AS_USER}, - -@@ -908,7 +910,7 @@ - DEBUG(2,("Closing idle connection 2.\n")); - return False; - } -- -+#ifdef RPCLIENT - if(global_machine_password_needs_changing) - { - unsigned char trust_passwd_hash[16]; -@@ -954,7 +956,7 @@ - trust_password_unlock(); - global_machine_password_needs_changing = False; - } -- -+#endif - /* - * Check to see if we have any blocking locks - * outstanding on the queue. -diff -ruN samba-2.0.10.orig/source/smbd/reply.c samba-2.0.10/source/smbd/reply.c ---- samba-2.0.10.orig/source/smbd/reply.c 2001-06-23 10:51:24.000000000 +0200 -+++ samba-2.0.10/source/smbd/reply.c 2006-03-06 22:21:12.000000000 +0100 -@@ -597,12 +597,12 @@ - - if (!check_domain_match(orig_user, domain)) - return False; -- -+#ifdef RPCCLIENT - ret = domain_client_validate(orig_user, domain, - smb_apasswd, smb_apasslen, - smb_ntpasswd, smb_ntpasslen, - &user_exists); -- -+#endif - if(ret) { - /* - * User validated ok against Domain controller. -@@ -2991,7 +2991,7 @@ - return -1; - } - -- -+#ifdef PRINTING - /**************************************************************************** - reply to a printopen - ****************************************************************************/ -@@ -3176,7 +3176,7 @@ - - return(outsize); - } -- -+#endif - - /**************************************************************************** - reply to a mkdir -diff -ruN samba-2.0.10.orig/source/smbd/server.c samba-2.0.10/source/smbd/server.c ---- samba-2.0.10.orig/source/smbd/server.c 2000-03-16 23:59:52.000000000 +0100 -+++ samba-2.0.10/source/smbd/server.c 2006-03-06 22:21:12.000000000 +0100 -@@ -300,9 +300,9 @@ - lp_killunused(conn_snum_used); - - ret = lp_load(servicesf,False,False,True); -- -+#ifdef PRINTING - load_printers(); -- -+#endif - /* perhaps the config filename is now set */ - if (!test) - reload_services(True); -diff -ruN samba-2.0.10.orig/source/smbd/service.c samba-2.0.10/source/smbd/service.c ---- samba-2.0.10.orig/source/smbd/service.c 2000-03-16 23:59:52.000000000 +0100 -+++ samba-2.0.10/source/smbd/service.c 2006-03-06 22:21:12.000000000 +0100 -@@ -121,7 +121,7 @@ - } - } - } -- -+#ifdef PRINTING - /* If we still don't have a service, attempt to add it as a printer. */ - if (iService < 0) - { -@@ -146,7 +146,7 @@ - DEBUG(3,("%s is not a valid printer name\n", service)); - } - } -- -+#endif - /* just possibly it's a default service? */ - if (iService < 0) - { -diff -ruN samba-2.0.10.orig/source/utils/smbpasswd.c samba-2.0.10/source/utils/smbpasswd.c ---- samba-2.0.10.orig/source/utils/smbpasswd.c 2000-03-16 23:59:57.000000000 +0100 -+++ samba-2.0.10/source/utils/smbpasswd.c 2006-03-06 22:21:12.000000000 +0100 -@@ -71,7 +71,7 @@ - } - exit(1); - } -- -+#ifdef RPCCLIENT - /********************************************************* - Join a domain. - **********************************************************/ -@@ -143,7 +143,7 @@ - - return (int)ret; - } -- -+#endif - - static void set_line_buffering(FILE *f) - { -@@ -335,13 +335,13 @@ - if((local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER)) && ((remote_machine != NULL) || joining_domain)) { - usage(); - } -- -+#ifdef RPCCLIENT - if(joining_domain) { - if (argc != 0) - usage(); - return join_domain(new_domain, remote_machine); - } -- -+#endif - /* - * Deal with root - can add a user, but only locally. - */ -diff -ruN samba-2.0.10.orig/source/web/swat.c samba-2.0.10/source/web/swat.c ---- samba-2.0.10.orig/source/web/swat.c 2000-04-11 19:36:36.000000000 +0200 -+++ samba-2.0.10/source/web/swat.c 2006-03-06 22:21:12.000000000 +0100 -@@ -357,8 +357,9 @@ - return 0; - } - iNumNonAutoPrintServices = lp_numservices(); -+#ifdef PRINTING - load_printers(); -- -+#endif - return 1; - } - -@@ -997,8 +998,9 @@ - charset_initialise(); - load_config(True); - iNumNonAutoPrintServices = lp_numservices(); -+#ifdef PRINTING - load_printers(); -- -+#endif - cgi_setup(SWATDIR, !demo_mode); - - print_header(); diff --git a/openwrt/package/samba/patches/200-security.patch b/openwrt/package/samba/patches/200-security.patch deleted file mode 100644 index 8e51549e1a6..00000000000 --- a/openwrt/package/samba/patches/200-security.patch +++ /dev/null @@ -1,606 +0,0 @@ -diff -ruN samba-2.0.10.orig/source/include/smb.h samba-2.0.10/source/include/smb.h ---- samba-2.0.10.orig/source/include/smb.h 2006-03-06 22:25:08.000000000 +0100 -+++ samba-2.0.10/source/include/smb.h 2006-03-06 22:25:53.000000000 +0100 -@@ -272,6 +272,7 @@ - #define ERRlock 33 /* Lock request conflicts with existing lock */ - #define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */ - #define ERRfilexists 80 /* File in operation already exists */ -+#define ERRinvalidparam 87 - #define ERRcannotopen 110 /* Cannot open the file specified */ - #define ERRunknownlevel 124 - #define ERRrename 183 -@@ -1911,4 +1912,7 @@ - - #define SAFE_NETBIOS_CHARS ". -_" - -+#ifndef SAFE_FREE -+#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) -+#endif - #endif /* _SMB_H */ -diff -ruN samba-2.0.10.orig/source/include/version.h samba-2.0.10/source/include/version.h ---- samba-2.0.10.orig/source/include/version.h 2001-06-23 15:23:59.000000000 +0200 -+++ samba-2.0.10/source/include/version.h 2006-03-06 22:25:53.000000000 +0100 -@@ -1 +1 @@ --#define VERSION "2.0.10" -+#define VERSION "2.0.10-security-rollup" -diff -ruN samba-2.0.10.orig/source/smbd/filename.c samba-2.0.10/source/smbd/filename.c ---- samba-2.0.10.orig/source/smbd/filename.c 2000-03-16 23:59:44.000000000 +0100 -+++ samba-2.0.10/source/smbd/filename.c 2006-03-06 22:25:53.000000000 +0100 -@@ -172,7 +172,7 @@ - * StrnCpy always null terminates. - */ - -- StrnCpy(orig_name, full_orig_name, namelen); -+ StrnCpy(orig_name, full_orig_name, MIN(namelen, sizeof(orig_name)-1)); - if(!case_sensitive) - strupper( orig_name ); - -diff -ruN samba-2.0.10.orig/source/smbd/ipc.c samba-2.0.10/source/smbd/ipc.c ---- samba-2.0.10.orig/source/smbd/ipc.c 2006-03-06 22:25:08.000000000 +0100 -+++ samba-2.0.10/source/smbd/ipc.c 2006-03-06 22:25:53.000000000 +0100 -@@ -3556,18 +3556,18 @@ - uint16 *setup=NULL; - int outsize = 0; - uint16 vuid = SVAL(inbuf,smb_uid); -- int tpscnt = SVAL(inbuf,smb_vwv0); -- int tdscnt = SVAL(inbuf,smb_vwv1); -- int mprcnt = SVAL(inbuf,smb_vwv2); -- int mdrcnt = SVAL(inbuf,smb_vwv3); -- int msrcnt = CVAL(inbuf,smb_vwv4); -+ unsigned int tpscnt = SVAL(inbuf,smb_vwv0); -+ unsigned int tdscnt = SVAL(inbuf,smb_vwv1); -+ unsigned int mprcnt = SVAL(inbuf,smb_vwv2); -+ unsigned int mdrcnt = SVAL(inbuf,smb_vwv3); -+ unsigned int msrcnt = CVAL(inbuf,smb_vwv4); - BOOL close_on_completion = BITSETW(inbuf+smb_vwv5,0); - BOOL one_way = BITSETW(inbuf+smb_vwv5,1); -- int pscnt = SVAL(inbuf,smb_vwv9); -- int psoff = SVAL(inbuf,smb_vwv10); -- int dscnt = SVAL(inbuf,smb_vwv11); -- int dsoff = SVAL(inbuf,smb_vwv12); -- int suwcnt = CVAL(inbuf,smb_vwv13); -+ unsigned int pscnt = SVAL(inbuf,smb_vwv9); -+ unsigned int psoff = SVAL(inbuf,smb_vwv10); -+ unsigned int dscnt = SVAL(inbuf,smb_vwv11); -+ unsigned int dsoff = SVAL(inbuf,smb_vwv12); -+ unsigned int suwcnt = CVAL(inbuf,smb_vwv13); - - memset(name, '\0',sizeof(name)); - fstrcpy(name,smb_buf(inbuf)); -@@ -3578,26 +3578,44 @@ - - if (tdscnt) { - if((data = (char *)malloc(tdscnt)) == NULL) { -- DEBUG(0,("reply_trans: data malloc fail for %d bytes !\n", tdscnt)); -+ DEBUG(0,("reply_trans: data malloc fail for %u bytes !\n", tdscnt)); - return(ERROR(ERRDOS,ERRnomem)); - } -+ if ((dsoff+dscnt < dsoff) || (dsoff+dscnt < dscnt)) -+ goto bad_param; -+ if (smb_base(inbuf)+dsoff+dscnt > inbuf + size) -+ goto bad_param; -+ - memcpy(data,smb_base(inbuf)+dsoff,dscnt); - } - - if (tpscnt) { - if((params = (char *)malloc(tpscnt)) == NULL) { -- DEBUG(0,("reply_trans: param malloc fail for %d bytes !\n", tpscnt)); -+ DEBUG(0,("reply_trans: param malloc fail for %u bytes !\n", tpscnt)); -+ SAFE_FREE(data); - return(ERROR(ERRDOS,ERRnomem)); - } -+ if ((psoff+pscnt < psoff) || (psoff+pscnt < pscnt)) -+ goto bad_param; -+ if (smb_base(inbuf)+psoff+pscnt > inbuf + size) -+ goto bad_param; -+ - memcpy(params,smb_base(inbuf)+psoff,pscnt); - } - - if (suwcnt) { - int i; - if((setup = (uint16 *)malloc(suwcnt*sizeof(uint16))) == NULL) { -- DEBUG(0,("reply_trans: setup malloc fail for %d bytes !\n", (int)(suwcnt * sizeof(uint16)))); -- return(ERROR(ERRDOS,ERRnomem)); -- } -+ DEBUG(0,("reply_trans: setup malloc fail for %u bytes !\n", (unsigned int)(suwcnt * sizeof(uint16)))); -+ SAFE_FREE(data); -+ SAFE_FREE(params); -+ return(ERROR(ERRDOS,ERRnomem)); -+ } -+ if (inbuf+smb_vwv14+(suwcnt*SIZEOFWORD) > inbuf + size) -+ goto bad_param; -+ if ((smb_vwv14+(suwcnt*SIZEOFWORD) < smb_vwv14) || (smb_vwv14+(suwcnt*SIZEOFWORD) < (suwcnt*SIZEOFWORD))) -+ goto bad_param; -+ - for (i=0;i tdscnt || pscnt > tpscnt) { -- exit_server("invalid trans parameters\n"); -- } -+ if (dscnt > tdscnt || pscnt > tpscnt) -+ goto bad_param; - -- if (pcnt) -+ if (pcnt) { -+ if (pdisp+pcnt >= tpscnt) -+ goto bad_param; -+ if ((pdisp+pcnt < pdisp) || (pdisp+pcnt < pcnt)) -+ goto bad_param; -+ if (smb_base(inbuf) + poff + pcnt >= inbuf + bufsize) -+ goto bad_param; -+ if (params + pdisp < params) -+ goto bad_param; -+ - memcpy(params+pdisp,smb_base(inbuf)+poff,pcnt); -- if (dcnt) -+ } -+ -+ if (dcnt) { -+ if (ddisp+dcnt >= tdscnt) -+ goto bad_param; -+ if ((ddisp+dcnt < ddisp) || (ddisp+dcnt < dcnt)) -+ goto bad_param; -+ if (smb_base(inbuf) + doff + dcnt >= inbuf + bufsize) -+ goto bad_param; -+ if (data + ddisp < data) -+ goto bad_param; -+ - memcpy(data+ddisp,smb_base(inbuf)+doff,dcnt); -+ } - } -- -- -+ - DEBUG(3,("trans <%s> data=%d params=%d setup=%d\n", - name,tdscnt,tpscnt,suwcnt)); - -@@ -3700,4 +3737,12 @@ - return(ERROR(ERRSRV,ERRnosupport)); - - return(outsize); -+ -+ bad_param: -+ -+ DEBUG(0,("reply_trans: invalid trans parameters\n")); -+ SAFE_FREE(data); -+ SAFE_FREE(params); -+ SAFE_FREE(setup); -+ return(ERROR(ERRSRV,ERRerror)); - } -diff -ruN samba-2.0.10.orig/source/smbd/nttrans.c samba-2.0.10/source/smbd/nttrans.c ---- samba-2.0.10.orig/source/smbd/nttrans.c 2000-04-24 19:27:30.000000000 +0200 -+++ samba-2.0.10/source/smbd/nttrans.c 2006-03-06 22:25:53.000000000 +0100 -@@ -2575,11 +2575,14 @@ - params = (char *)malloc(total_parameter_count); - if (total_data_count > 0) - data = (char *)malloc(total_data_count); -- -+ - if ((total_parameter_count && !params) || (total_data_count && !data) || - (setup_count && !setup)) { -+ SAFE_FREE(setup); -+ SAFE_FREE(params); -+ SAFE_FREE(data); - DEBUG(0,("reply_nttrans : Out of memory\n")); -- return(ERROR(ERRDOS,ERRnomem)); -+ return ERROR(ERRDOS,ERRnomem); - } - - /* Copy the param and data bytes sent with this request into -@@ -2588,64 +2591,112 @@ - num_data_sofar = data_count; - - if (parameter_count > total_parameter_count || data_count > total_data_count) -- exit_server("reply_nttrans: invalid sizes in packet.\n"); -+ goto bad_param; - - if(setup) { -- memcpy( setup, &inbuf[smb_nt_SetupStart], setup_count); - DEBUG(10,("reply_nttrans: setup_count = %d\n", setup_count)); -- dump_data(10, setup, setup_count); -+ if ((smb_nt_SetupStart + setup_count < smb_nt_SetupStart) || -+ (smb_nt_SetupStart + setup_count < setup_count)) -+ goto bad_param; -+ if (smb_nt_SetupStart + setup_count > length) -+ goto bad_param; -+ -+ memcpy( setup, &inbuf[smb_nt_SetupStart], setup_count); - } - if(params) { -- memcpy( params, smb_base(inbuf) + parameter_offset, parameter_count); - DEBUG(10,("reply_nttrans: parameter_count = %d\n", parameter_count)); -- dump_data(10, params, parameter_count); -+ if ((parameter_offset + parameter_count < parameter_offset) || -+ (parameter_offset + parameter_count < parameter_count)) -+ goto bad_param; -+ if (smb_base(inbuf) + parameter_offset + parameter_count > inbuf + length) -+ goto bad_param; -+ -+ memcpy( params, smb_base(inbuf) + parameter_offset, parameter_count); - } - if(data) { -- memcpy( data, smb_base(inbuf) + data_offset, data_count); - DEBUG(10,("reply_nttrans: data_count = %d\n",data_count)); -- dump_data(10, data, data_count); -+ if ((data_offset + data_count < data_offset) || (data_offset + data_count < data_count)) -+ goto bad_param; -+ if (smb_base(inbuf) + data_offset + data_count > inbuf + length) -+ goto bad_param; -+ -+ memcpy( data, smb_base(inbuf) + data_offset, data_count); -+ - } - - if(num_data_sofar < total_data_count || num_params_sofar < total_parameter_count) { - /* We need to send an interim response then receive the rest - of the parameter/data bytes */ - outsize = set_message(outbuf,0,0,True); -- send_smb(Client,outbuf); -+ if (!send_smb(Client,outbuf)) -+ exit_server("reply_nttrans: send_smb failed."); - - while( num_data_sofar < total_data_count || num_params_sofar < total_parameter_count) { - BOOL ret; -- -+ uint32 parameter_displacement; -+ uint32 data_displacement; -+ - ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); -- -+ - if((ret && (CVAL(inbuf, smb_com) != SMBnttranss)) || !ret) { -- outsize = set_message(outbuf,0,0,True); -- if(ret) { -- DEBUG(0,("reply_nttrans: Invalid secondary nttrans packet\n")); -- } else { -- DEBUG(0,("reply_nttrans: %s in getting secondary nttrans response.\n", -- (smb_read_error == READ_ERROR) ? "error" : "timeout" )); -+ outsize = set_message(outbuf,0,0,True); -+ if(ret) { -+ DEBUG(0,("reply_nttrans: Invalid secondary nttrans packet\n")); -+ } else { -+ DEBUG(0,("reply_nttrans: %s in getting secondary nttrans response.\n", -+ (smb_read_error == READ_ERROR) ? "error" : "timeout" )); - } -- if(params) -- free(params); -- if(data) -- free(data); -- if(setup) -- free(setup); -- return(ERROR(ERRSRV,ERRerror)); -+ goto bad_param; - } - - /* Revise total_params and total_data in case they have changed downwards */ -- total_parameter_count = IVAL(inbuf, smb_nts_TotalParameterCount); -- total_data_count = IVAL(inbuf, smb_nts_TotalDataCount); -- num_params_sofar += (parameter_count = IVAL(inbuf,smb_nts_ParameterCount)); -- num_data_sofar += ( data_count = IVAL(inbuf, smb_nts_DataCount)); -- if (num_params_sofar > total_parameter_count || num_data_sofar > total_data_count) -- exit_server("reply_nttrans2: data overflow in secondary nttrans packet\n"); -- -- memcpy( ¶ms[ IVAL(inbuf, smb_nts_ParameterDisplacement)], -- smb_base(inbuf) + IVAL(inbuf, smb_nts_ParameterOffset), parameter_count); -- memcpy( &data[IVAL(inbuf, smb_nts_DataDisplacement)], -- smb_base(inbuf)+ IVAL(inbuf, smb_nts_DataOffset), data_count); -+ if (IVAL(inbuf, smb_nts_TotalParameterCount) < total_parameter_count) -+ total_parameter_count = IVAL(inbuf, smb_nts_TotalParameterCount); -+ if (IVAL(inbuf, smb_nts_TotalDataCount) < total_data_count) -+ total_data_count = IVAL(inbuf, smb_nts_TotalDataCount); -+ -+ parameter_count = IVAL(inbuf,smb_nts_ParameterCount); -+ parameter_offset = IVAL(inbuf, smb_nts_ParameterOffset); -+ parameter_displacement = IVAL(inbuf, smb_nts_ParameterDisplacement); -+ num_params_sofar += parameter_count; -+ -+ data_count = IVAL(inbuf, smb_nts_DataCount); -+ data_displacement = IVAL(inbuf, smb_nts_DataDisplacement); -+ data_offset = IVAL(inbuf, smb_nts_DataOffset); -+ num_data_sofar += data_count; -+ -+ if (num_params_sofar > total_parameter_count || num_data_sofar > total_data_count) { -+ DEBUG(0,("reply_nttrans2: data overflow in secondary nttrans packet")); -+ goto bad_param; -+ } -+ -+ if (parameter_count) { -+ if (parameter_displacement + parameter_count >= total_parameter_count) -+ goto bad_param; -+ if ((parameter_displacement + parameter_count < parameter_displacement) || -+ (parameter_displacement + parameter_count < parameter_count)) -+ goto bad_param; -+ if (smb_base(inbuf) + parameter_offset + parameter_count >= inbuf + bufsize) -+ goto bad_param; -+ if (params + parameter_displacement < params) -+ goto bad_param; -+ -+ memcpy( ¶ms[parameter_displacement], smb_base(inbuf) + parameter_offset, parameter_count); -+ } -+ -+ if (data_count) { -+ if (data_displacement + data_count >= total_data_count) -+ goto bad_param; -+ if ((data_displacement + data_count < data_displacement) || -+ (data_displacement + data_count < data_count)) -+ goto bad_param; -+ if (smb_base(inbuf) + data_offset + data_count >= inbuf + bufsize) -+ goto bad_param; -+ if (data + data_displacement < data) -+ goto bad_param; -+ -+ memcpy( &data[data_displacement], smb_base(inbuf)+ data_offset, data_count); -+ } - } - } - -@@ -2714,4 +2765,10 @@ - return outsize; /* If a correct response was needed the call_nt_transact_xxxx - calls have already sent it. If outsize != -1 then it is - returning an error packet. */ -+ bad_param: -+ -+ SAFE_FREE(params); -+ SAFE_FREE(data); -+ SAFE_FREE(setup); -+ return ERROR(ERRDOS,ERRinvalidparam); - } -diff -ruN samba-2.0.10.orig/source/smbd/password.c samba-2.0.10/source/smbd/password.c ---- samba-2.0.10.orig/source/smbd/password.c 2006-03-06 22:25:08.000000000 +0100 -+++ samba-2.0.10/source/smbd/password.c 2006-03-06 22:25:53.000000000 +0100 -@@ -770,7 +770,7 @@ - if (!ok && lp_username(snum)) { - char *auser; - pstring user_list; -- StrnCpy(user_list,lp_username(snum),sizeof(pstring)); -+ StrnCpy(user_list,lp_username(snum),sizeof(pstring)-1); - - pstring_sub(user_list,"%S",lp_servicename(snum)); - -diff -ruN samba-2.0.10.orig/source/smbd/reply.c samba-2.0.10/source/smbd/reply.c ---- samba-2.0.10.orig/source/smbd/reply.c 2006-03-06 22:25:08.000000000 +0100 -+++ samba-2.0.10/source/smbd/reply.c 2006-03-06 22:25:53.000000000 +0100 -@@ -1413,6 +1413,9 @@ - - for (i=numentries;(i BUFFER_SIZE ) -+ break; - finished = - !get_dir_entry(conn,mask,dirtype,fname,&size,&mode,&date,check_descend); - if (!finished) -@@ -3122,6 +3125,9 @@ - - - for (i=first;i BUFFER_SIZE ) -+ break; - put_dos_date2(p,0,queue[i].time); - CVAL(p,4) = (queue[i].status==LPQ_PRINTING?2:3); - SSVAL(p,5,printjob_encode(SNUM(conn), -diff -ruN samba-2.0.10.orig/source/smbd/trans2.c samba-2.0.10/source/smbd/trans2.c ---- samba-2.0.10.orig/source/smbd/trans2.c 2000-04-24 19:27:31.000000000 +0200 -+++ samba-2.0.10/source/smbd/trans2.c 2006-03-06 22:25:53.000000000 +0100 -@@ -201,7 +201,6 @@ - int16 open_ofun = SVAL(params,12); - int32 open_size = IVAL(params,14); - char *pname = ¶ms[28]; -- int16 namelen = strlen(pname)+1; - - pstring fname; - mode_t unixmode; -@@ -213,7 +212,7 @@ - BOOL bad_path = False; - files_struct *fsp; - -- StrnCpy(fname,pname,namelen); -+ pstrcpy(fname,pname); - - DEBUG(3,("trans2open %s mode=%d attr=%d ofun=%d size=%d\n", - fname,open_mode, open_attr, open_ofun, open_size)); -@@ -2185,7 +2184,7 @@ - unsigned int suwcnt = SVAL(inbuf, smb_suwcnt); - unsigned int tran_call = SVAL(inbuf, smb_setup0); - char *params = NULL, *data = NULL; -- int num_params, num_params_sofar, num_data, num_data_sofar; -+ unsigned int num_params, num_params_sofar, num_data, num_data_sofar; - - if(global_oplock_break && (tran_call == TRANSACT2_OPEN)) { - /* Queue this open message as we are the process of an -@@ -2203,8 +2202,9 @@ - /* All trans2 messages we handle have smb_sucnt == 1 - ensure this - is so as a sanity check */ - if (suwcnt != 1) { -- DEBUG(2,("Invalid smb_sucnt in trans2 call\n")); -- return(ERROR(ERRSRV,ERRerror)); -+ DEBUG(2,("Invalid smb_sucnt in trans2 call(%u)\n",suwcnt)); -+ DEBUG(2,("Transaction is %d\n",tran_call)); -+ ERROR(ERRDOS,ERRinvalidparam); - } - - /* Allocate the space for the maximum needed parameters and data */ -@@ -2215,11 +2215,9 @@ - - if ((total_params && !params) || (total_data && !data)) { - DEBUG(2,("Out of memory in reply_trans2\n")); -- if(params) -- free(params); -- if(data) -- free(data); -- return(ERROR(ERRDOS,ERRnomem)); -+ SAFE_FREE(params); -+ SAFE_FREE(data); -+ return ERROR(ERRDOS,ERRnomem); - } - - /* Copy the param and data bytes sent with this request into -@@ -2230,20 +2228,37 @@ - if (num_params > total_params || num_data > total_data) - exit_server("invalid params in reply_trans2"); - -- if(params) -- memcpy( params, smb_base(inbuf) + SVAL(inbuf, smb_psoff), num_params); -- if(data) -- memcpy( data, smb_base(inbuf) + SVAL(inbuf, smb_dsoff), num_data); -+ if(params) { -+ unsigned int psoff = SVAL(inbuf, smb_psoff); -+ if ((psoff + num_params < psoff) || (psoff + num_params < num_params)) -+ goto bad_param; -+ if (smb_base(inbuf) + psoff + num_params > inbuf + length) -+ goto bad_param; -+ memcpy( params, smb_base(inbuf) + psoff, num_params); -+ } -+ if(data) { -+ unsigned int dsoff = SVAL(inbuf, smb_dsoff); -+ if ((dsoff + num_data < dsoff) || (dsoff + num_data < num_data)) -+ goto bad_param; -+ if (smb_base(inbuf) + dsoff + num_data > inbuf + length) -+ goto bad_param; -+ memcpy( data, smb_base(inbuf) + dsoff, num_data); -+ } - - if(num_data_sofar < total_data || num_params_sofar < total_params) { - /* We need to send an interim response then receive the rest - of the parameter/data bytes */ - outsize = set_message(outbuf,0,0,True); -- send_smb(Client,outbuf); -+ if (!send_smb(Client,outbuf)) -+ exit_server("reply_trans2: send_smb failed."); - - while (num_data_sofar < total_data || - num_params_sofar < total_params) { - BOOL ret; -+ unsigned int param_disp; -+ unsigned int param_off; -+ unsigned int data_disp; -+ unsigned int data_off; - - ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); - -@@ -2255,26 +2270,55 @@ - else - DEBUG(0,("reply_trans2: %s in getting secondary trans2 response.\n", - (smb_read_error == READ_ERROR) ? "error" : "timeout" )); -- if(params) -- free(params); -- if(data) -- free(data); -- return(ERROR(ERRSRV,ERRerror)); -+ goto bad_param; - } - - /* Revise total_params and total_data in case - they have changed downwards */ -- total_params = SVAL(inbuf, smb_tpscnt); -- total_data = SVAL(inbuf, smb_tdscnt); -- num_params_sofar += (num_params = SVAL(inbuf,smb_spscnt)); -- num_data_sofar += ( num_data = SVAL(inbuf, smb_sdscnt)); -+ if (SVAL(inbuf, smb_tpscnt) < total_params) -+ total_params = SVAL(inbuf, smb_tpscnt); -+ if (SVAL(inbuf, smb_tdscnt) < total_data) -+ total_data = SVAL(inbuf, smb_tdscnt); -+ -+ num_params = SVAL(inbuf,smb_spscnt); -+ param_off = SVAL(inbuf, smb_spsoff); -+ param_disp = SVAL(inbuf, smb_spsdisp); -+ num_params_sofar += num_params; -+ -+ num_data = SVAL(inbuf, smb_sdscnt); -+ data_off = SVAL(inbuf, smb_sdsoff); -+ data_disp = SVAL(inbuf, smb_sdsdisp); -+ num_data_sofar += num_data; -+ - if (num_params_sofar > total_params || num_data_sofar > total_data) -- exit_server("data overflow in trans2"); -+ goto bad_param; - -- memcpy( ¶ms[ SVAL(inbuf, smb_spsdisp)], -- smb_base(inbuf) + SVAL(inbuf, smb_spsoff), num_params); -- memcpy( &data[SVAL(inbuf, smb_sdsdisp)], -- smb_base(inbuf)+ SVAL(inbuf, smb_sdsoff), num_data); -+ if (num_params) { -+ if (param_disp + num_params >= total_params) -+ goto bad_param; -+ if ((param_disp + num_params < param_disp) || -+ (param_disp + num_params < num_params)) -+ goto bad_param; -+ if (smb_base(inbuf) + param_off + num_params >= inbuf + bufsize) -+ goto bad_param; -+ if (params + param_disp < params) -+ goto bad_param; -+ -+ memcpy( ¶ms[param_disp], smb_base(inbuf) + param_off, num_params); -+ } -+ if (num_data) { -+ if (data_disp + num_data >= total_data) -+ goto bad_param; -+ if ((data_disp + num_data < data_disp) || -+ (data_disp + num_data < num_data)) -+ goto bad_param; -+ if (smb_base(inbuf) + data_off + num_data >= inbuf + bufsize) -+ goto bad_param; -+ if (data + data_disp < data) -+ goto bad_param; -+ -+ memcpy( &data[data_disp], smb_base(inbuf) + data_off, num_data); -+ } - } - } - -@@ -2367,4 +2411,10 @@ - return outsize; /* If a correct response was needed the - call_trans2xxx calls have already sent - it. If outsize != -1 then it is returning */ -+ -+ bad_param: -+ -+ SAFE_FREE(params); -+ SAFE_FREE(data); -+ return (ERROR(ERRDOS,ERRinvalidparam)); - } diff --git a/openwrt/package/samba/patches/250-writex.patch b/openwrt/package/samba/patches/250-writex.patch deleted file mode 100644 index ed0495e92bc..00000000000 --- a/openwrt/package/samba/patches/250-writex.patch +++ /dev/null @@ -1,152 +0,0 @@ -diff -ruN samba-2.0.10.orig/source/include/smb.h samba-2.0.10/source/include/smb.h ---- samba-2.0.10.orig/source/include/smb.h 2006-03-06 22:25:53.000000000 +0100 -+++ samba-2.0.10/source/include/smb.h 2006-03-06 22:27:31.000000000 +0100 -@@ -24,8 +24,14 @@ - #ifndef _SMB_H - #define _SMB_H - -+#if defined(LARGE_SMB_OFF_T) -+#define BUFFER_SIZE (128*1024) -+#else /* no large readwrite possible */ - #define BUFFER_SIZE (0xFFFF) -+#endif -+ - #define SAFETY_MARGIN 1024 -+#define LARGE_WRITEX_HDR_SIZE 65 - - #define NMB_PORT 137 - #define DGRAM_PORT 138 -diff -ruN samba-2.0.10.orig/source/lib/util_sock.c samba-2.0.10/source/lib/util_sock.c ---- samba-2.0.10.orig/source/lib/util_sock.c 2000-03-16 23:59:18.000000000 +0100 -+++ samba-2.0.10/source/lib/util_sock.c 2006-03-06 22:27:31.000000000 +0100 -@@ -649,19 +649,21 @@ - memset(buffer,'\0',smb_size + 100); - - len = read_smb_length_return_keepalive(fd,buffer,timeout); -- if (len < 0) -- { -+ if (len < 0) { - DEBUG(10,("receive_smb: length < 0!\n")); - return(False); - } - -- if (len > BUFFER_SIZE) { -+ /* -+ * A WRITEX with CAP_LARGE_WRITEX can be 64k worth of data plus 65 bytes -+ * of header. Don't print the error if this fits.... JRA. -+ */ -+ -+ if (len > (BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) { - DEBUG(0,("Invalid packet length! (%d bytes).\n",len)); - if (len > BUFFER_SIZE + (SAFETY_MARGIN/2)) -- { - exit(1); - } -- } - - if(len > 0) { - ret = read_socket_data(fd,buffer+4,len); -diff -ruN samba-2.0.10.orig/source/smbd/oplock.c samba-2.0.10/source/smbd/oplock.c ---- samba-2.0.10.orig/source/smbd/oplock.c 2000-04-25 04:32:14.000000000 +0200 -+++ samba-2.0.10/source/smbd/oplock.c 2006-03-06 22:27:31.000000000 +0100 -@@ -887,13 +887,13 @@ - messages crossing on the wire. - */ - -- if((inbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN))==NULL) -+ if((inbuf = (char *)malloc(BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE + SAFETY_MARGIN))==NULL) - { - DEBUG(0,("oplock_break: malloc fail for input buffer.\n")); - return False; - } - -- if((outbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN))==NULL) -+ if((outbuf = (char *)malloc(BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE + SAFETY_MARGIN))==NULL) - { - DEBUG(0,("oplock_break: malloc fail for output buffer.\n")); - free(inbuf); -diff -ruN samba-2.0.10.orig/source/smbd/process.c samba-2.0.10/source/smbd/process.c ---- samba-2.0.10.orig/source/smbd/process.c 2006-03-06 22:25:28.000000000 +0100 -+++ samba-2.0.10/source/smbd/process.c 2006-03-06 22:27:31.000000000 +0100 -@@ -995,8 +995,8 @@ - time_t last_timeout_processing_time = time(NULL); - unsigned int num_smbs = 0; - -- InBuffer = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN); -- OutBuffer = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN); -+ InBuffer = (char *)malloc(BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE + SAFETY_MARGIN); -+ OutBuffer = (char *)malloc(BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE + SAFETY_MARGIN); - if ((InBuffer == NULL) || (OutBuffer == NULL)) - return; - -@@ -1027,7 +1027,7 @@ - /* free up temporary memory */ - lp_talloc_free(); - -- while(!receive_message_or_smb(InBuffer,BUFFER_SIZE,select_timeout,&got_smb)) -+ while(!receive_message_or_smb(InBuffer,BUFFER_SIZE+LARGE_WRITEX_HDR_SIZE,select_timeout,&got_smb)) - { - if(!timeout_processing( deadtime, &select_timeout, &last_timeout_processing_time)) - return; -diff -ruN samba-2.0.10.orig/source/smbd/reply.c samba-2.0.10/source/smbd/reply.c ---- samba-2.0.10.orig/source/smbd/reply.c 2006-03-06 22:25:53.000000000 +0100 -+++ samba-2.0.10/source/smbd/reply.c 2006-03-06 22:27:31.000000000 +0100 -@@ -2551,17 +2551,28 @@ - size_t numtowrite = SVAL(inbuf,smb_vwv10); - BOOL write_through = BITSETW(inbuf+smb_vwv7,0); - ssize_t nwritten = -1; -- int smb_doff = SVAL(inbuf,smb_vwv11); -+ unsigned int smb_doff = SVAL(inbuf,smb_vwv11); -+ unsigned int smblen = smb_len(inbuf); - char *data; -+ BOOL large_writeX = ((CVAL(inbuf,smb_wct) == 14) && (smblen > 0xFFFF)); - - /* If it's an IPC, pass off the pipe handler. */ -- if (IS_IPC(conn)) -+ if (IS_IPC(conn)) { - return reply_pipe_write_and_X(inbuf,outbuf,length,bufsize); -+ } - - CHECK_FSP(fsp,conn); - CHECK_WRITE(fsp); - CHECK_ERROR(fsp); - -+ /* Deal with possible LARGE_WRITEX */ -+ if (large_writeX) -+ numtowrite |= ((((size_t)SVAL(inbuf,smb_vwv9)) & 1 )<<16); -+ -+ if(smb_doff > smblen || (smb_doff + numtowrite > smblen)) { -+ return(ERROR(ERRDOS,ERRbadmem)); -+ } -+ - data = smb_base(inbuf) + smb_doff; - - if(CVAL(inbuf,smb_wct) == 14) { -@@ -2586,8 +2597,9 @@ - #endif /* LARGE_SMB_OFF_T */ - } - -- if (is_locked(fsp,conn,numtowrite,startpos, F_WRLCK)) -+ if (is_locked(fsp,conn,(SMB_BIG_UINT)numtowrite,(SMB_BIG_UINT)startpos, WRITE_LOCK)) { - return(ERROR(ERRDOS,ERRlock)); -+ } - - /* X/Open SMB protocol says that, unlike SMBwrite - if the length is zero then NO truncation is -@@ -2598,12 +2610,15 @@ - else - nwritten = write_file(fsp,data,startpos,numtowrite); - -- if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) -+ if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) { - return(UNIXERROR(ERRDOS,ERRnoaccess)); -+ } - - set_message(outbuf,6,0,True); - - SSVAL(outbuf,smb_vwv2,nwritten); -+ if (large_writeX) -+ SSVAL(outbuf,smb_vwv4,(nwritten>>16)&1); - - if (nwritten < (ssize_t)numtowrite) { - CVAL(outbuf,smb_rcls) = ERRHRD; diff --git a/openwrt/package/samba/patches/300-shared_lib_ldflags_fix.patch b/openwrt/package/samba/patches/300-shared_lib_ldflags_fix.patch deleted file mode 100644 index 7428facc42e..00000000000 --- a/openwrt/package/samba/patches/300-shared_lib_ldflags_fix.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- samba-2.0.10/source/Makefile.in.orig 2005-08-20 20:34:44.000000000 +0200 -+++ samba-2.0.10/source/Makefile.in 2005-08-20 20:36:27.000000000 +0200 -@@ -475,11 +475,11 @@ - - bin/smbwrapper.@SHLIBEXT@: $(PICOBJS) - @echo Linking shared library $@ -- @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS) -+ @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LDFLAGS) $(LIBS) - - bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) - @echo Linking shared library $@ -- @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS) -+ @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LDFLAGS) $(LIBS) - - bin/smbsh: $(SMBSH_OBJ) bin/.dummy - @echo Linking $@ -@@ -487,7 +487,7 @@ - - bin/libsmb.@SHLIBEXT@: $(LIBSMB_PICOBJS) bin/.dummy - @echo Linking shared library $@ -- @$(LD) @LDSHFLAGS@ -o $@ $(LIBSMB_PICOBJS) $(LIBS) -+ @$(LD) @LDSHFLAGS@ -o $@ $(LIBSMB_PICOBJS) $(LDFLAGS) $(LIBS) - - install: installbin installman installscripts installcp installswat - diff --git a/openwrt/package/samba/patches/301-config_files_path.patch b/openwrt/package/samba/patches/301-config_files_path.patch deleted file mode 100644 index 089d9f6ef56..00000000000 --- a/openwrt/package/samba/patches/301-config_files_path.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ruN samba-2.0.10-old/source/Makefile.in samba-2.0.10-new/source/Makefile.in ---- samba-2.0.10-old/source/Makefile.in 2005-08-22 03:03:17.000000000 +0200 -+++ samba-2.0.10-new/source/Makefile.in 2005-08-22 03:08:23.000000000 +0200 -@@ -31,6 +31,8 @@ - MANDIR = @mandir@ - SAMBABOOK = @sambabook@ - -+CONFIGDIR = @sysconfdir@ -+ - # The permissions to give the executables - INSTALLPERMS = 0755 - -@@ -39,9 +41,9 @@ - # or in smb.conf (see smb.conf(5)) - SMBLOGFILE = $(VARDIR)/smb - NMBLOGFILE = $(VARDIR)/nmb --CONFIGFILE = $(LIBDIR)/smb.conf --LMHOSTSFILE = $(LIBDIR)/lmhosts --DRIVERFILE = $(LIBDIR)/printers.def -+CONFIGFILE = $(CONFIGDIR)/smb.conf -+LMHOSTSFILE = $(CONFIGDIR)/lmhosts -+DRIVERFILE = $(CONFIGDIR)/printers.def - PASSWD_PROGRAM = /bin/passwd - # This is where smbpasswd et al go - PRIVATEDIR = @privatedir@ diff --git a/openwrt/package/sane-backends/Config.in b/openwrt/package/sane-backends/Config.in deleted file mode 100644 index f927413d2e5..00000000000 --- a/openwrt/package/sane-backends/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_SANE_BACKENDS - prompt "sane-backends..................... Scanner Access Now Easy (backends)" - tristate - default m if CONFIG_DEVEL - help - SANE (Scanner Access Now Easy) is a universal scanner interface. - - http://www.sane-project.org diff --git a/openwrt/package/sane-backends/Makefile b/openwrt/package/sane-backends/Makefile deleted file mode 100644 index 31ac6869394..00000000000 --- a/openwrt/package/sane-backends/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sane-backends -PKG_VERSION:=1.0.17 -PKG_RELEASE:=1 -PKG_MD5SUM:=b51c10da8a81a04e1bae88c9e6556df2 - -PKG_SOURCE_URL:=ftp://ftp.sane-project.org/pub/sane/$(PKG_NAME)-$(PKG_VERSION)/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SANE_BACKENDS,sane-backends,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-ipv6 \ - --disable-translations \ - --without-gphoto2 \ - --disable-debug \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $(PKG_BUILD_DIR)/.built - -$(IPKG_SANE_BACKENDS): - install -d -m0755 $(IDIR_SANE_BACKENDS)/etc/sane.d - $(CP) $(PKG_INSTALL_DIR)/etc/sane.d/*.conf $(IDIR_SANE_BACKENDS)/etc/sane.d/ - install -d -m0755 $(IDIR_SANE_BACKENDS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/saned $(IDIR_SANE_BACKENDS)/usr/sbin/ - $(RSTRIP) $(IDIR_SANE_BACKENDS) - $(IPKG_BUILD) $(IDIR_SANE_BACKENDS) $(PACKAGE_DIR) diff --git a/openwrt/package/sane-backends/ipkg/sane-backends.conffiles b/openwrt/package/sane-backends/ipkg/sane-backends.conffiles deleted file mode 100644 index a1a6a0b82f5..00000000000 --- a/openwrt/package/sane-backends/ipkg/sane-backends.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/sane.d/saned.conf diff --git a/openwrt/package/sane-backends/ipkg/sane-backends.control b/openwrt/package/sane-backends/ipkg/sane-backends.control deleted file mode 100644 index e6f4be1954b..00000000000 --- a/openwrt/package/sane-backends/ipkg/sane-backends.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: sane-backends -Priority: optional -Section: misc -Description: Scanner access now easy diff --git a/openwrt/package/sane-backends/patches/001-remove-unneeded.patch b/openwrt/package/sane-backends/patches/001-remove-unneeded.patch deleted file mode 100644 index f398984d1ef..00000000000 --- a/openwrt/package/sane-backends/patches/001-remove-unneeded.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur sane-backends-1.0.16/Makefile.in sane-backends-1.0.16.patched/Makefile.in ---- sane-backends-1.0.16/Makefile.in 2005-07-17 13:52:54.000000000 +0200 -+++ sane-backends-1.0.16.patched/Makefile.in 2005-12-17 00:28:38.144022500 +0100 -@@ -33,7 +33,7 @@ - - @SET_MAKE@ - --SUBDIRS = include lib sanei backend frontend tools doc po -+SUBDIRS = include lib sanei backend frontend - - DISTFILES = AUTHORS COPYING ChangeLog ChangeLog-1.0.0 ChangeLog-1.0.1 \ - ChangeLog-1.0.2 ChangeLog-1.0.3 ChangeLog-1.0.4 ChangeLog-1.0.5 \ diff --git a/openwrt/package/scanlogd/Config.in b/openwrt/package/scanlogd/Config.in deleted file mode 100644 index 024308edc51..00000000000 --- a/openwrt/package/scanlogd/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_SCANLOGD - prompt "scanlogd.......................... a port scan detection tool" - tristate - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBNIDS - default m if CONFIG_DEVEL - help - Scanlogd is a TCP port scan detection tool, originally designed - to illustrate various attacks an IDS developer has to deal with. - Thus, unlike some of the other port scan detection tools out there, - scanlogd is designed to be totally safe to use. - - http://www.openwall.com/scanlogd diff --git a/openwrt/package/scanlogd/Makefile b/openwrt/package/scanlogd/Makefile deleted file mode 100644 index afde5939959..00000000000 --- a/openwrt/package/scanlogd/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=scanlogd -PKG_VERSION:=2.2.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=7b8187ea718ebe47f22805b921b909ab - -PKG_SOURCE_URL:=http://www.openwall.com/scanlogd/ \ - ftp://ftp.wiretapped.net/pub/openwall/ \ - http://distro.ibiblio.org/pub/linux/distributions/openwall/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SCANLOGD,scanlogd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - $(SED) "s,/var/empty,/tmp/.scanlogd," $(PKG_BUILD_DIR)/params.h - $(SED) "s,#undef SCANLOGD_DEVICE,#define SCANLOGD_DEVICE \"all\"," $(PKG_BUILD_DIR)/params.h - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CC=$(TARGET_CC) LD=$(TARGET_CC) CFLAGS="-c $(TARGET_CFLAGS)" \ - LDFLAGS= \ - PCAP_H="-I$(STAGING_DIR)/usr/include" \ - NIDS_H="-I$(STAGING_DIR)/usr/include" \ - NIDS_L="-L$(STAGING_DIR)/usr/lib -lnids -lnet -lpcap" \ - libnids - touch $@ - -$(IPKG_SCANLOGD): - install -d -m0755 $(IDIR_SCANLOGD)/etc/init.d - install -m0755 ./files/scanlogd.init $(IDIR_SCANLOGD)/etc/init.d/S60scanlogd - install -d -m0755 $(IDIR_SCANLOGD)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_SCANLOGD)/usr/sbin/ - $(RSTRIP) $(IDIR_SCANLOGD) - $(IPKG_BUILD) $(IDIR_SCANLOGD) $(PACKAGE_DIR) diff --git a/openwrt/package/scanlogd/files/scanlogd.init b/openwrt/package/scanlogd/files/scanlogd.init deleted file mode 100755 index 762d55e8cde..00000000000 --- a/openwrt/package/scanlogd/files/scanlogd.init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -mkdir -p `grep "^scanlogd:" /etc/passwd | cut -d: -f6` -/usr/sbin/scanlogd diff --git a/openwrt/package/scanlogd/ipkg/scanlogd.control b/openwrt/package/scanlogd/ipkg/scanlogd.control deleted file mode 100644 index 307a8dd570e..00000000000 --- a/openwrt/package/scanlogd/ipkg/scanlogd.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: scanlogd -Priority: optional -Section: net -Version: [TBDL] -Architecture: [TBDL] -Maintainer: OpenWrt Developer -Description: Port scan logger. -Source: http://www.openwall.com/scanlogd/ -Depends: libpcap, libnet, libnids diff --git a/openwrt/package/scanlogd/ipkg/scanlogd.postinst b/openwrt/package/scanlogd/ipkg/scanlogd.postinst deleted file mode 100644 index ab720092c7b..00000000000 --- a/openwrt/package/scanlogd/ipkg/scanlogd.postinst +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -name=scanlogd -id=53 - -# do not change below -# check if we are on real system -if [ -z "${IPKG_INSTROOT}" ]; then - # create copies of passwd and group, if we use squashfs - rootfs=`mount |awk '/root/ { print $5 }'` - if [ "$rootfs" = "squashfs" ]; then - if [ -h /etc/group ]; then - rm /etc/group - cp /rom/etc/group /etc/group - fi - if [ -h /etc/passwd ]; then - rm /etc/passwd - cp /rom/etc/passwd /etc/passwd - fi - fi -fi - -echo "" -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/group)" ]; then - echo "adding group $name to /etc/group" - echo "${name}:x:${id}:" >> ${IPKG_INSTROOT}/etc/group -fi - -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/passwd)" ]; then - echo "adding user $name to /etc/passwd" - echo "${name}:x:${id}:${id}:${name}:/tmp/.${name}:/bin/false" >> ${IPKG_INSTROOT}/etc/passwd -fi - diff --git a/openwrt/package/scdp/Config.in b/openwrt/package/scdp/Config.in deleted file mode 100644 index 789a8bb8d32..00000000000 --- a/openwrt/package/scdp/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_SCDP - prompt "scdp.............................. An utility to send CDP (Cisco Discovery Protocol) packets" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNET - help - This program sends CDP (Cisco Discovery Protocol) packets out on - selected interfaces and tells the connected switch (cisco only) - where the host is connected. - - http://sourceforge.net/projects/scdp - diff --git a/openwrt/package/scdp/Makefile b/openwrt/package/scdp/Makefile deleted file mode 100644 index c8909c6fef0..00000000000 --- a/openwrt/package/scdp/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=scdp -PKG_VERSION:=1.0b -PKG_RELEASE:=1 -PKG_MD5SUM:=7eafaf5a422e37d04715613993ed5d95 - -PKG_SOURCE_URL:=@SF/scdp -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SCDP,scdp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --with-gnu-ld \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR)/ - mkdir -p $(PKG_INSTALL_DIR)/ - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - all install - touch $@ - -$(IPKG_SCDP): - install -d -m0755 $(IDIR_SCDP)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/scdp $(IDIR_SCDP)/usr/bin/ - $(RSTRIP) $(IDIR_SCDP) - $(IPKG_BUILD) $(IDIR_SCDP) $(PACKAGE_DIR) diff --git a/openwrt/package/scdp/ipkg/scdp.control b/openwrt/package/scdp/ipkg/scdp.control deleted file mode 100644 index 3cb61a06117..00000000000 --- a/openwrt/package/scdp/ipkg/scdp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: scdp -Priority: optional -Section: net -Depends: libnet -Description: An utility to send CDP (Cisco Discovery Protocol) packets. diff --git a/openwrt/package/screen/Config.in b/openwrt/package/screen/Config.in deleted file mode 100644 index de25fe09b08..00000000000 --- a/openwrt/package/screen/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_SCREEN - prompt "screen............................ Full-screen terminal window manager" - tristate - default m if CONFIG_DEVEL - help - Screen is a full-screen window manager that multiplexes a physical - terminal between several processes, typically interactive shells. - - http://www.gnu.org/software/screen/ - diff --git a/openwrt/package/screen/Makefile b/openwrt/package/screen/Makefile deleted file mode 100644 index 7bc25482cf3..00000000000 --- a/openwrt/package/screen/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=screen -PKG_VERSION:=4.0.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=ed68ea9b43d9fba0972cb017a24940a1 - -PKG_SOURCE_URL:=@GNU/screen -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SCREEN,screen,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - $(foreach flag,rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime,ac_cv_func_$(flag)=yes ) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_SCREEN): - install -d -m0755 $(IDIR_SCREEN)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/screen $(IDIR_SCREEN)/usr/sbin/ - $(RSTRIP) $(IDIR_SCREEN) - $(IPKG_BUILD) $(IDIR_SCREEN) $(PACKAGE_DIR) diff --git a/openwrt/package/screen/ipkg/screen.control b/openwrt/package/screen/ipkg/screen.control deleted file mode 100644 index cb19298a818..00000000000 --- a/openwrt/package/screen/ipkg/screen.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: screen -Priority: optional -Section: misc -Depends: libncurses -Description: A 'window manager' for the terminal session diff --git a/openwrt/package/screen/patches/100-cross_compile_fix.patch b/openwrt/package/screen/patches/100-cross_compile_fix.patch deleted file mode 100644 index a05459f1de9..00000000000 --- a/openwrt/package/screen/patches/100-cross_compile_fix.patch +++ /dev/null @@ -1,509 +0,0 @@ -Binary files screen-4.0.2.old/.configure.swp and screen-4.0.2.dev/.configure.swp differ -diff -urN screen-4.0.2.old/configure screen-4.0.2.dev/configure ---- screen-4.0.2.old/configure 2003-12-05 14:46:53.000000000 +0100 -+++ screen-4.0.2.dev/configure 2005-05-05 12:13:03.000000000 +0200 -@@ -124,7 +124,7 @@ - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 -- { (exit 1); exit 1; }; } -+ } - fi - case $CONFIG_SHELL in - '') -@@ -174,7 +174,7 @@ - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -- { (exit 1); exit 1; }; } -+ } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the -@@ -397,7 +397,7 @@ - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 -- { (exit 1); exit 1; }; } -+ } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - -@@ -406,7 +406,7 @@ - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 -- { (exit 1); exit 1; }; } -+ } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; -@@ -588,7 +588,7 @@ - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 -- { (exit 1); exit 1; }; } -+ } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; -@@ -601,7 +601,7 @@ - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 -- { (exit 1); exit 1; }; } -+ } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; - -@@ -625,7 +625,7 @@ - - -*) { echo "$as_me: error: unrecognized option: $ac_option - Try \`$0 --help' for more information." >&2 -- { (exit 1); exit 1; }; } -+ } - ;; - - *=*) -@@ -633,7 +633,7 @@ - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 -- { (exit 1); exit 1; }; } -+ } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; -@@ -652,7 +652,7 @@ - if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 -- { (exit 1); exit 1; }; } -+ } - fi - - # Be sure to have absolute paths. -@@ -662,7 +662,7 @@ - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -- { (exit 1); exit 1; }; };; -+ };; - esac - done - -@@ -674,7 +674,7 @@ - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -- { (exit 1); exit 1; }; };; -+ };; - esac - done - -@@ -728,15 +728,15 @@ - if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 -- { (exit 1); exit 1; }; } -+ } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 -- { (exit 1); exit 1; }; } -+ } - fi - fi - (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 -- { (exit 1); exit 1; }; } -+ } - srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` - ac_env_build_alias_set=${build_alias+set} - ac_env_build_alias_value=$build_alias -@@ -1243,7 +1243,7 @@ - echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 - echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - - ac_ext=c -@@ -1734,7 +1734,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: no acceptable C compiler found in \$PATH - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - - # Provide some information about the compiler. - echo "$as_me:$LINENO:" \ -@@ -1856,7 +1856,7 @@ - echo "$as_me: error: cannot run C compiled programs. - If you meant to cross compile, use \`--host'. - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - fi - fi -@@ -1898,7 +1898,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot compute suffix of executables: cannot compile and link - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - - rm -f conftest$ac_cv_exeext -@@ -1950,7 +1950,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot compute suffix of object files: cannot compile - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - - rm -f conftest.$ac_cv_objext conftest.$ac_ext -@@ -2514,7 +2514,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - - ac_ext=c -@@ -2704,7 +2704,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -2753,7 +2753,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -2790,7 +2790,7 @@ - - { { echo "$as_me:$LINENO: error: Can't run the compiler - sorry" >&5 - echo "$as_me: error: Can't run the compiler - sorry" >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -@@ -2800,7 +2800,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -2830,7 +2830,7 @@ - (exit $ac_status); }; }; then - { { echo "$as_me:$LINENO: error: Your compiler does not set the exit status - sorry" >&5 - echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;} -- { (exit 1); exit 1; }; } -+ } - else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 -@@ -2900,7 +2900,7 @@ - if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 - echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - ac_config_guess="$SHELL $ac_aux_dir/config.guess" - ac_config_sub="$SHELL $ac_aux_dir/config.sub" -@@ -4149,7 +4149,7 @@ - - { { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5 - echo "$as_me: error: !!! no select - no screen" >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -@@ -4163,7 +4163,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -4272,7 +4272,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -4365,7 +4365,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -4460,7 +4460,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -4562,7 +4562,7 @@ - else - { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5 - echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - - -@@ -4573,7 +4573,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -4898,7 +4898,7 @@ - - { { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5 - echo "$as_me: error: !!! no tgetent - no screen" >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi -@@ -4915,7 +4915,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -5359,7 +5356,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -6206,7 +6203,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -6482,7 +6479,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -7004,7 +7001,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -7056,7 +7053,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -7110,7 +7107,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -7951,7 +7948,7 @@ - See \`config.log' for more details." >&5 - echo "$as_me: error: cannot run test program while cross compiling - See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ } - else - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" -@@ -7982,7 +7979,7 @@ - ( exit $ac_status ) - { { echo "$as_me:$LINENO: error: Can't run the compiler - internal error. Sorry." >&5 - echo "$as_me: error: Can't run the compiler - internal error. Sorry." >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -@@ -8251,7 +8248,7 @@ - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 - echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} -- { (exit 1); exit 1; }; } -+ } - fi - case $CONFIG_SHELL in - '') -@@ -8302,7 +8299,7 @@ - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 - echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} -- { (exit 1); exit 1; }; } -+ } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the -@@ -8494,7 +8491,7 @@ - Try \`$0 --help' for more information." >&5 - echo "$as_me: error: ambiguous option: $1 - Try \`$0 --help' for more information." >&2;} -- { (exit 1); exit 1; }; };; -+ };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) -@@ -8516,7 +8513,7 @@ - Try \`$0 --help' for more information." >&5 - echo "$as_me: error: unrecognized option: $1 - Try \`$0 --help' for more information." >&2;} -- { (exit 1); exit 1; }; } ;; -+ } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - -@@ -8555,7 +8552,7 @@ - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 - echo "$as_me: error: invalid argument: $ac_config_target" >&2;} -- { (exit 1); exit 1; }; };; -+ };; - esac - done - -@@ -8750,7 +8747,7 @@ - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 - echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} -- { (exit 1); exit 1; }; }; } -+ }; } - - ac_builddir=. - -@@ -8816,7 +8813,7 @@ - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} -- { (exit 1); exit 1; }; } -+ } - echo $f;; - *) # Relative - if test -f "$f"; then -@@ -8829,7 +8826,7 @@ - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} -- { (exit 1); exit 1; }; } -+ } - fi;; - esac - done` || { (exit 1); exit 1; } -@@ -8907,7 +8904,7 @@ - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} -- { (exit 1); exit 1; }; } -+ } - echo $f;; - *) # Relative - if test -f "$f"; then -@@ -8920,7 +8917,7 @@ - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} -- { (exit 1); exit 1; }; } -+ } - fi;; - esac - done` || { (exit 1); exit 1; } -@@ -9073,7 +9070,7 @@ - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 - echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} -- { (exit 1); exit 1; }; }; } -+ }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file -diff -urN screen-4.0.2.old/pty.c screen-4.0.2.dev/pty.c ---- screen-4.0.2.old/pty.c 2003-09-08 16:26:18.000000000 +0200 -+++ screen-4.0.2.dev/pty.c 2005-05-05 12:32:20.000000000 +0200 -@@ -34,9 +34,9 @@ - #endif - - /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ --#ifdef HAVE_SVR4_PTYS --# include --#endif -+//#ifdef HAVE_SVR4_PTYS -+//# include -+//#endif - - #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) - # include ---- screen-4.0.2/configure.old 2005-05-24 18:49:30.000000000 +0200 -+++ screen-4.0.2/configure 2005-05-24 18:49:54.000000000 +0200 -@@ -6598,8 +6598,6 @@ - LIBS="$oldlibs" - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" --test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" - oldlibs="$LIBS" - LIBS="$LIBS -lsun" - { echo "$as_me:$LINENO: checking IRIX sun library..." >&5 diff --git a/openwrt/package/ser2net/Config.in b/openwrt/package/ser2net/Config.in deleted file mode 100644 index b52c26bb685..00000000000 --- a/openwrt/package/ser2net/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_SER2NET - prompt "ser2net........................... Serial port TCP/IP redirector" - tristate - default m if CONFIG_DEVEL - help - This is ser2net, a program for allowing network connections to serial - ports. See the man page for information about using the program. Note - that ser2net supports RFC 2217 (remote control of serial port parameters), - but you must have a complient client. - diff --git a/openwrt/package/ser2net/Makefile b/openwrt/package/ser2net/Makefile deleted file mode 100644 index 3651155ea1c..00000000000 --- a/openwrt/package/ser2net/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ser2net -PKG_VERSION:=2.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=5f83a3e8aec18331cb61069dccdfba47 - -PKG_SOURCE_URL:=@SF/ser2net/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SER2NET,ser2net,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --sysconfdir=/etc \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_SER2NET): - install -d -m0755 $(IDIR_SER2NET)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ser2net $(IDIR_SER2NET)/usr/sbin - install -d -m0755 $(IDIR_SER2NET)/etc - cp -fpR $(PKG_BUILD_DIR)/ser2net.conf $(IDIR_SER2NET)/etc - $(RSTRIP) $(IDIR_SER2NET) - $(IPKG_BUILD) $(IDIR_SER2NET) $(PACKAGE_DIR) diff --git a/openwrt/package/ser2net/ipkg/ser2net.conffiles b/openwrt/package/ser2net/ipkg/ser2net.conffiles deleted file mode 100644 index 16bb67f2073..00000000000 --- a/openwrt/package/ser2net/ipkg/ser2net.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ser2net.conf diff --git a/openwrt/package/ser2net/ipkg/ser2net.control b/openwrt/package/ser2net/ipkg/ser2net.control deleted file mode 100644 index 0b1b22ad43e..00000000000 --- a/openwrt/package/ser2net/ipkg/ser2net.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ser2net -Priority: optional -Section: net -Source: http://jaist.dl.sourceforge.net/sourceforge/ser2net/ -Description: a program for allowing network connections to serial ports diff --git a/openwrt/package/serdisplib/Config.in b/openwrt/package/serdisplib/Config.in deleted file mode 100644 index c5181a5c57c..00000000000 --- a/openwrt/package/serdisplib/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_SERDISPLIB - prompt "serdisplib........................ a library for controlling displays" - tristate - default m if CONFIG_DEVEL - help - serdisplib is a library to drive serial and parallel displays - with built-in controllers. - - http://serdisplib.sourceforge.net/ - diff --git a/openwrt/package/serdisplib/Makefile b/openwrt/package/serdisplib/Makefile deleted file mode 100644 index f28b26913ed..00000000000 --- a/openwrt/package/serdisplib/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=serdisplib -PKG_VERSION:=1.96 -PKG_RELEASE:=1 -PKG_MD5SUM:=b074e02d8d63f34cba8ec45c23f63f78 - -PKG_SOURCE_URL:=@SF/serdisplib -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SERDISPLIB,serdisplib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_func_malloc_0_nonnull=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) all - touch $@ - -$(IPKG_SERDISPLIB): - install -d -m0755 $(IDIR_SERDISPLIB)/usr/lib - $(CP) $(PKG_BUILD_DIR)/lib/libserdisp.so.* $(IDIR_SERDISPLIB)/usr/lib - $(RSTRIP) $(IDIR_SERDISPLIB) - $(IPKG_BUILD) $(IDIR_SERDISPLIB) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libserdisp.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_BUILD_DIR)/include/serdisplib $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_BUILD_DIR)/lib/libserdisp.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libserdisp.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/serdisplib \ - $(STAGING_DIR)/usr/lib/libserdisp.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/serdisplib/ipkg/serdisplib.control b/openwrt/package/serdisplib/ipkg/serdisplib.control deleted file mode 100644 index 3fcddcc70aa..00000000000 --- a/openwrt/package/serdisplib/ipkg/serdisplib.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: serdisplib -Priority: optional -Section: libs -Description: A library for controlling displays diff --git a/openwrt/package/serdisplib/patches/100-io.patch b/openwrt/package/serdisplib/patches/100-io.patch deleted file mode 100644 index 5b78e10f2ab..00000000000 --- a/openwrt/package/serdisplib/patches/100-io.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -ru serdisplib-1.96.orig/src/serdisp_connect.c serdisplib-1.96/src/serdisp_connect.c ---- serdisplib-1.96.orig/src/serdisp_connect.c 2005-10-07 20:40:50.000000000 +0200 -+++ serdisplib-1.96/src/serdisp_connect.c 2005-12-12 18:48:58.000000000 +0200 -@@ -60,6 +60,7 @@ - /* directIO only with linux and i386 */ - #if defined(__linux__) && (defined(__i386__) || defined(__x86_64__)) - #define __sd_linux_use_directIO__ 1 -+ #include - #endif - - -@@ -67,7 +68,6 @@ - #if defined(__linux__) - #include - #include -- #include - #include - #define OUTB(_d, _p) outb( (_d), (_p) ) - #define INB(_p) inb( (_p) ) diff --git a/openwrt/package/serdisplib/patches/101-test_shared.patch b/openwrt/package/serdisplib/patches/101-test_shared.patch deleted file mode 100644 index af0cd5d3875..00000000000 --- a/openwrt/package/serdisplib/patches/101-test_shared.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ru serdisplib-1.96.orig/src/Makefile.in serdisplib-1.96/src/Makefile.in ---- serdisplib-1.96.orig/src/Makefile.in 2005-10-19 01:12:42.000000000 +0200 -+++ serdisplib-1.96/src/Makefile.in 2005-12-12 19:18:12.000000000 +0200 -@@ -73,8 +73,8 @@ - $(CC) -fPIC -shared -o $(LIB_DIR)/$(LIB_SHARED) $(LIB_OBJECTS) - cd $(LIB_DIR) && $(LN_S) -f $(LIB_SHARED) $(LIB_NAME).so - --testserdisp: $(LIB_DIR)/$(LIB_STATIC) $(OBJECTS) -- $(CC) -o testserdisp $(OBJECTS) $(LIB_DIR)/$(LIB_STATIC) -+testserdisp: $(LIB_DIR)/$(LIB_SHARED) $(OBJECTS) -+ $(CC) -o testserdisp $(OBJECTS) $(LIB_DIR)/$(LIB_SHARED) - - clean: - /bin/rm -f $(OBJECTS) $(LIB_OBJECTS) $(LIB_DIR)/*.a $(LIB_DIR)/*.so* diff --git a/openwrt/package/setpwc/Config.in b/openwrt/package/setpwc/Config.in deleted file mode 100644 index 19f32c641c4..00000000000 --- a/openwrt/package/setpwc/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_SETPWC - prompt "setpwc............................ Philips (and compatibles) WebCams (PWC) control utility" - tristate - default m if CONFIG_DEVEL - help - Philips (and compatibles) WebCams (PWC) control utility. - - http://www.vanheusden.com/setpwc/ - diff --git a/openwrt/package/setpwc/Makefile b/openwrt/package/setpwc/Makefile deleted file mode 100644 index dbd41c5bc7d..00000000000 --- a/openwrt/package/setpwc/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=setpwc -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=a125d76f630c4aab940df5912f161965 - -PKG_SOURCE_URL:=http://www.vanheusden.com/setpwc/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SETPWC,setpwc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) $(TARGET_CFLAGS) -DVERSION=\"$(PKG_VERSION)\" -o $(PKG_BUILD_DIR)/setpwc $(PKG_BUILD_DIR)/setpwc.c - touch $@ - -$(IPKG_SETPWC): - install -d -m0755 $(IDIR_SETPWC)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/setpwc $(IDIR_SETPWC)/usr/bin/ - $(RSTRIP) $(IDIR_SETPWC) - $(IPKG_BUILD) $(IDIR_SETPWC) $(PACKAGE_DIR) diff --git a/openwrt/package/setpwc/ipkg/setpwc.control b/openwrt/package/setpwc/ipkg/setpwc.control deleted file mode 100644 index 1d7299a8d57..00000000000 --- a/openwrt/package/setpwc/ipkg/setpwc.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: setpwc -Priority: optional -Section: admin -Description: Philips (and compatibles) WebCams (PWC) control utility diff --git a/openwrt/package/setserial/Config.in b/openwrt/package/setserial/Config.in deleted file mode 100644 index e13502a97eb..00000000000 --- a/openwrt/package/setserial/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_SETSERIAL - prompt "setserial......................... Serial port configuration utility" - tristate - default m if CONFIG_DEVEL - help - setserial is a program designed to set and/or report the - configuration information associated with a serial port. This - information includes what I/O port and IRQ a particular - serial port is using, and whether or not the break key should - be interpreted as the Secure Attention Key, and so on. - - http://setserial.sourceforge.net/ - diff --git a/openwrt/package/setserial/Makefile b/openwrt/package/setserial/Makefile deleted file mode 100644 index 5c3565a2f3d..00000000000 --- a/openwrt/package/setserial/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=setserial -PKG_VERSION:=2.17 -PKG_RELEASE:=1 -PKG_MD5SUM:=c4867d72c41564318e0107745eb7a0f2 - -PKG_SOURCE_URL:=@SF/setserial -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SETSERIAL,setserial,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - all - touch $@ - -$(IPKG_SETSERIAL): - install -d -m0755 $(IDIR_SETSERIAL)/etc/init.d - install -m0755 ./files/serial.init $(IDIR_SETSERIAL)/etc/init.d/S15serial - install -d -m0755 $(IDIR_SETSERIAL)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/setserial $(IDIR_SETSERIAL)/usr/sbin/ - $(RSTRIP) $(IDIR_SETSERIAL) - $(IPKG_BUILD) $(IDIR_SETSERIAL) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) \ - clean - rm -f $(PKG_BUILD_DIR)/.built - diff --git a/openwrt/package/setserial/files/serial.init b/openwrt/package/setserial/files/serial.init deleted file mode 100644 index ffd729e1e7b..00000000000 --- a/openwrt/package/setserial/files/serial.init +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/usr/sbin/setserial /dev/tts/1 irq 3 diff --git a/openwrt/package/setserial/ipkg/setserial.control b/openwrt/package/setserial/ipkg/setserial.control deleted file mode 100644 index 9a0860b5851..00000000000 --- a/openwrt/package/setserial/ipkg/setserial.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: setserial -Priority: optional -Section: console -Description: configuration utility for serial ports diff --git a/openwrt/package/shat/Config.in b/openwrt/package/shat/Config.in deleted file mode 100644 index 50b226a32d8..00000000000 --- a/openwrt/package/shat/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_SHAT - prompt "shat.............................. Source Hardware Address Translation" - tristate - default m if CONFIG_DEVEL - help - A tool which allows hosts with arbitrary IP configuration - to connect to the internet over a SHAT gateway. - - http://www.teddy-net.com/cvs/Maxina/128gw/service/arpcatch/shat/ - diff --git a/openwrt/package/shat/Makefile b/openwrt/package/shat/Makefile deleted file mode 100644 index dac308cd4dc..00000000000 --- a/openwrt/package/shat/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=shat -PKG_VERSION:=0.9.7 -PKG_RELEASE:=1 -PKG_MD5SUM:= da06846f35838b14d1513523dad84d24 - -PKG_SOURCE_URL:=http://world.maxina.de/src/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SHAT,shat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ - CFLAGS="$(TARGET_CFLAGS) -Wall -I$(PKG_BUILD_DIR)/include/linux/include -I$(PKG_BUILD_DIR)/include -DVERSION=\\\"$(PKG_VERSION)\\\" -DDROP_NETBIOS" - touch $@ - -$(IPKG_SHAT): - install -d -m0755 $(IDIR_SHAT)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/src/shatd $(IDIR_SHAT)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/src/shatc $(IDIR_SHAT)/usr/sbin/ - $(RSTRIP) $(IDIR_SHAT) - $(IPKG_BUILD) $(IDIR_SHAT) $(PACKAGE_DIR) diff --git a/openwrt/package/shat/ipkg/shat.control b/openwrt/package/shat/ipkg/shat.control deleted file mode 100644 index 8143c73a66d..00000000000 --- a/openwrt/package/shat/ipkg/shat.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: shat -Priority: optional -Section: net -Description: Source Hardware Address Translation - a tool for "nomadic routing" diff --git a/openwrt/package/shfs/Config.in b/openwrt/package/shfs/Config.in deleted file mode 100644 index b7c7cfa8590..00000000000 --- a/openwrt/package/shfs/Config.in +++ /dev/null @@ -1,32 +0,0 @@ -config BR2_COMPILE_SHFS - tristate - default n - depends BR2_PACKAGE_SHFS_UTILS - -config BR2_PACKAGE_SHFS_UTILS - prompt "shfs-utils........................ ShFS mount/umount utilities" - tristate - select BR2_COMPILE_SHFS - select BR2_PACKAGE_KMOD_SHFS - default m if CONFIG_DEVEL - help - ShFS is a simple and easy to use Linux kernel module which - allows you to mount remote filesystems using a plain shell - (SSH) connection. When using ShFS, you can access all remote - files just like the local ones, only the access is governed - through the transport security of SSH. - - ShFS supports some nice features: - - * file cache for access speedup - * perl and shell code for the remote (server) side - * could preserve uid/gid (root connection) - * number of remote host platforms (Linux, Solaris, Cygwin, ...) - * Linux kernel 2.4.10+ and 2.6 - * arbitrary command used for connection (instead of SSH) - * persistent connection (reconnect after SSH dies) - - http://shfs.sourceforge.net/ - - This package contains the shfs mount/umount utilities. - diff --git a/openwrt/package/shfs/Makefile b/openwrt/package/shfs/Makefile deleted file mode 100644 index b1509a7c4a9..00000000000 --- a/openwrt/package/shfs/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=shfs -PKG_VERSION:=0.35 -PKG_RELEASE:=2 -PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe - -PKG_SOURCE_URL:=@SF/shfs -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SHFS_UTILS,shfs-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - OFLAGS="$(TARGET_CFLAGS)" \ - CC="$(TARGET_CC)" \ - LINKER="$(TARGET_CC)" \ - KERNEL_SOURCES="$(LINUX_DIR)" \ - ROOT="$(PKG_INSTALL_DIR)" \ - utils utils-install - touch $@ - -$(IPKG_SHFS_UTILS): - install -m0755 -d $(IDIR_SHFS_UTILS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shfs{,u}mount $(IDIR_SHFS_UTILS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mount.shfs $(IDIR_SHFS_UTILS)/usr/sbin/ - $(RSTRIP) $(IDIR_SHFS_UTILS) - $(IPKG_BUILD) $(IDIR_SHFS_UTILS) $(PACKAGE_DIR) - diff --git a/openwrt/package/shfs/ipkg/shfs-utils.control b/openwrt/package/shfs/ipkg/shfs-utils.control deleted file mode 100644 index 869a5d699ac..00000000000 --- a/openwrt/package/shfs/ipkg/shfs-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: shfs-utils -Priority: optional -Section: net -Description: SHell FileSystem Linux mount/umount utilities -Depends: kmod-shfs diff --git a/openwrt/package/shfs/patches/101-kmod-build.patch b/openwrt/package/shfs/patches/101-kmod-build.patch deleted file mode 100644 index 635900472d6..00000000000 --- a/openwrt/package/shfs/patches/101-kmod-build.patch +++ /dev/null @@ -1,103 +0,0 @@ ---- shfs-0.35-orig/shfs/Linux-2.4/Makefile 2004-06-01 15:16:19.000000000 +0200 -+++ shfs-0.35-2/shfs/Linux-2.4/Makefile 2005-04-09 02:34:35.000000000 +0200 -@@ -1,3 +1,17 @@ -+# -+# the original Makefile was trashed and replaced by this one -+# The main reason is that loadable modules should be built with -+# the same compile flags the kernel was built with, so we'd better -+# let the kernel tree build the module for us, like that : -+# -+# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules -+# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules_install -+# -+# -+# $(TOPDIR)/lib/string.o is needed at link time because the memchr function -+# is not exported on mips (insmod: unresolved symbol memchr) -+# -+ - ifndef KERNEL - KERNEL=$(shell uname -r) - endif -@@ -10,67 +24,30 @@ - KERNEL_SOURCES=${MODULESDIR}/build - endif - --ifeq (${MODVERSIONS},detect) -- ifeq ($(shell test -e ${KERNEL_SOURCES}/include/linux/modversions.h; echo $$?),0) -- MODVERSIONS=yes -- endif --endif -- --ifeq (${MODVERSIONS},yes) --MVER=-DMODVERSIONS -DEXPORT_SYMTAB --endif -- --LINVER=linux-${KERNEL} -- --ALL_TARGETS := shfs.o -- --SEARCHDIRS := -I- -I. -I${KERNEL_SOURCES}/include #-I/usr/src/linux/include/ -+all: all-y - --CC := gcc --CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX --LINKER := ld --LDFLAGS = -r --LOADLIBES := -+O_TARGET := shfs.o - --all: ${ALL_TARGETS} -+shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o - --%.o: %.c $(wildcard *.h) -- ${CC} ${CFLAGS} -c $< -o $@ -+obj-y := $(shfs-objs) -+obj-m := $(O_TARGET) - --shfs.o: dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o -- ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES} -- --tidy: -- ${RM} core dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o -- --clean: tidy patch-clean -- ${RM} shfs.o -+-include $(TOPDIR)/Rules.make - -+all-y: -+ make -C ${KERNEL_SOURCES} TOPDIR="${KERNEL_SOURCES}" SUBDIRS="$(shell pwd)" modules -+ - install: shfs.o - rm -f ${MODULESDIR}/kernel/fs/shfs/shfs.o - install -m644 -b -D shfs.o ${MODULESDIR}/kernel/fs/shfs/shfs.o -- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi - - uninstall: - rm -rf ${MODULESDIR}/kernel/fs/shfs -- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi - --patch: -- rm -rf ${LINVER} ${LINVER}.orig; mkdir ${LINVER}; -- for i in Documentation fs/shfs include/linux; do \ -- mkdir -p ${LINVER}/$$i; \ -- done -- cp ${KERNEL_SOURCES}/Documentation/Configure.help ${LINVER}/Documentation -- cp ${KERNEL_SOURCES}/fs/{Makefile,Config.in} ${LINVER}/fs -- cp -r ${LINVER} ${LINVER}.orig -- cp ../../Changelog *.c shfs_debug.h proc.h ${LINVER}/fs/shfs/ -- cp shfs.h shfs_fs* ${LINVER}/include/linux/ -- (cd ${LINVER}; patch -p1 <../kernel-config.diff) -- find . -type f -name "*.orig" -print | xargs rm -f -- diff -urN ${LINVER}.orig ${LINVER} >${LINVER}.diff; true -- --patch-clean: -- rm -rf ${LINVER} ${LINVER}.orig; -- rm -f ${LINVER}.diff -- --.PHONY : all tidy clean install uninstall patch patch-clean -+clean: -+ rm -f core *.o *.a *.s -+ -+shfs.o: $(shfs-objs) -+ $(LD) -r -o $@ $(shfs-objs) $(TOPDIR)/lib/string.o -+ diff --git a/openwrt/package/shfs/patches/102-utils-build-fixes.patch b/openwrt/package/shfs/patches/102-utils-build-fixes.patch deleted file mode 100644 index affce435704..00000000000 --- a/openwrt/package/shfs/patches/102-utils-build-fixes.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- shfs-0.35-orig/shfsmount/Makefile 2004-06-01 15:16:19.000000000 +0200 -+++ shfs-0.35-2/shfsmount/Makefile 2005-04-09 01:27:22.000000000 +0200 -@@ -2,15 +2,16 @@ - SHFS_VERSION=unknown - endif - --SHFSMOUNT := /usr/bin/shfsmount --SHFSUMOUNT := /usr/bin/shfsumount -+SHFSMOUNT := /usr/sbin/shfsmount -+SHFSUMOUNT := /usr/sbin/shfsumount - - ALL_TARGETS := shfsmount shfsumount - - SEARCHDIRS := -I- -I. -I../shfs/Linux-2.4/ - - CC := gcc --CFLAGS = -g -Wall ${SEARCHDIRS} -DSHFS_VERSION=\"${SHFS_VERSION}\" -+OFLAGS = -g -+CFLAGS = $(OFLAGS) -Wall ${SEARCHDIRS} -DSHFS_VERSION=\"${SHFS_VERSION}\" - - LINKER := gcc - LDFLAGS = -@@ -40,12 +41,12 @@ - - - install: shfsmount shfsumount -- install -m755 -b -D shfsmount ${ROOT}${SHFSMOUNT} -- install -m755 -b -D shfsumount ${ROOT}${SHFSUMOUNT} -- if [ ! -d ${ROOT}/sbin ]; then mkdir ${ROOT}/sbin; fi -- ln -fs ${SHFSMOUNT} ${ROOT}/sbin/mount.shfs -+ install -m755 -D shfsmount ${ROOT}${SHFSMOUNT} -+ install -m755 -D shfsumount ${ROOT}${SHFSUMOUNT} -+ if [ ! -d ${ROOT}/usr/sbin ]; then mkdir ${ROOT}/usr/sbin; fi -+ ln -fs ${SHFSMOUNT} ${ROOT}/usr/sbin/mount.shfs - - uninstall: -- rm -f ${ROOT}${SHFSMOUNT} ${ROOT}${SHFSUMOUNT} ${ROOT}/sbin/mount.shfs -+ rm -f ${ROOT}${SHFSMOUNT} ${ROOT}${SHFSUMOUNT} ${ROOT}/usr/sbin/mount.shfs - - .PHONY : all tidy clean install uninstall diff --git a/openwrt/package/sipp/Config.in b/openwrt/package/sipp/Config.in deleted file mode 100644 index 1792b1d2bdc..00000000000 --- a/openwrt/package/sipp/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_SIPP - prompt "sipp.............................. test tool / traffic generator for the SIP protocol" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_UCLIBCXX - select BR2_PACKAGE_LIBPTHREAD - select BR2_PACKAGE_LIBNCURSES - help - SIPp is a free Open Source test tool / traffic generator for the SIP protocol. - It includes a few basic SipStone user agent scenarios (UAC and UAS) and - establishes and releases multiple calls with the INVITE and BYE methods. - - http://sipp.sourceforge.net diff --git a/openwrt/package/sipp/Makefile b/openwrt/package/sipp/Makefile deleted file mode 100644 index 544d2efac10..00000000000 --- a/openwrt/package/sipp/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sipp -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=8866e9af0d3bc29e91ebb6eab89a7f1f - -PKG_SOURCE_URL:=@SF/sipp -PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SIPP,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - CC_linux=$(TARGET_CC) \ - CPP_linux=$(TARGET_CC) \ - CCLINK_linux=$(TARGET_CC) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS_linux="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -fno-builtin -nostdinc++" \ - LFLAGS_linux="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm -lgcc -lpthread -ldl -lncurses" \ - STAGING_DIR=$(STAGING_DIR) \ - all - touch $@ - -$(IPKG_SIPP): - mkdir -p $(IDIR_SIPP)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_SIPP)/usr/sbin/ - $(STRIP) $(IDIR_SIPP)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_SIPP) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/sipp/ipkg/sipp.control b/openwrt/package/sipp/ipkg/sipp.control deleted file mode 100644 index 3e1b2579066..00000000000 --- a/openwrt/package/sipp/ipkg/sipp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: sipp -Section: net -Priority: optional -Description: traffic generator for the SIP protocol -Depends: uclibc++, libpthread, libncurses diff --git a/openwrt/package/siproxd/Config.in b/openwrt/package/siproxd/Config.in deleted file mode 100644 index 2d48badcbce..00000000000 --- a/openwrt/package/siproxd/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_SIPROXD - prompt "siproxd........................... SIP (Session Initiation Protocol) proxy" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOSIP2 - help - A SIP (Session Initiation Protocol) proxy - - http://siproxd.sourceforge.net/ - - Depends: libosip2 - diff --git a/openwrt/package/siproxd/Makefile b/openwrt/package/siproxd/Makefile deleted file mode 100644 index 78571a621f1..00000000000 --- a/openwrt/package/siproxd/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=siproxd -PKG_VERSION:=0.5.11 -PKG_RELEASE:=2 -PKG_MD5SUM:=a614f60683f9ea9423573bc5d646c525 - -PKG_SOURCE_URL:=@SF/siproxd -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SIPROXD,siproxd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_SIPROXD): - install -d -m0755 $(IDIR_SIPROXD)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/siproxd.conf.example $(IDIR_SIPROXD)/etc/siproxd.conf - $(CP) $(PKG_INSTALL_DIR)/etc/siproxd_passwd.cfg $(IDIR_SIPROXD)/etc/ - install -d -m0755 $(IDIR_SIPROXD)/etc/init.d - install -m0755 files/siproxd.init $(IDIR_SIPROXD)/etc/init.d/siproxd - install -d -m0755 $(IDIR_SIPROXD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(IDIR_SIPROXD)/usr/sbin/ - $(RSTRIP) $(IDIR_SIPROXD) - $(IPKG_BUILD) $(IDIR_SIPROXD) $(PACKAGE_DIR) diff --git a/openwrt/package/siproxd/files/siproxd.init b/openwrt/package/siproxd/files/siproxd.init deleted file mode 100644 index f8739d43f0a..00000000000 --- a/openwrt/package/siproxd/files/siproxd.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -BIN=siproxd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac -exit $? diff --git a/openwrt/package/siproxd/ipkg/siproxd.conffiles b/openwrt/package/siproxd/ipkg/siproxd.conffiles deleted file mode 100644 index abb4ba5a13e..00000000000 --- a/openwrt/package/siproxd/ipkg/siproxd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/siproxd.conf -/etc/siproxd_passwd.cfg diff --git a/openwrt/package/siproxd/ipkg/siproxd.control b/openwrt/package/siproxd/ipkg/siproxd.control deleted file mode 100644 index 96f73e21ce1..00000000000 --- a/openwrt/package/siproxd/ipkg/siproxd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: siproxd -Priority: optional -Section: net -Description: a SIP (Session Initiation Protocol) proxy -Depends: libosip2, libpthread diff --git a/openwrt/package/sipsak/Config.in b/openwrt/package/sipsak/Config.in deleted file mode 100644 index dd4976cf282..00000000000 --- a/openwrt/package/sipsak/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_SIPSAK - prompt "sipsak............................ SIP (Session Initiation Protocol) stress and diagnostics utility" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - help - A SIP (Session Initiation Protocol) stress and diagnostics utility - - http://www.sipsak.org/ - - Depends: openssl - diff --git a/openwrt/package/sipsak/Makefile b/openwrt/package/sipsak/Makefile deleted file mode 100644 index c0dd1c13502..00000000000 --- a/openwrt/package/sipsak/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sipsak -PKG_VERSION:=0.9.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=5f6d8df044984061425fdbedea61a64e - -PKG_SOURCE_URL:=http://download.berlios.de/sipsak/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SIPSAK,sipsak,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_func_malloc_0_nonnull=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-gnutls \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_SIPSAK): - install -d -m0755 $(IDIR_SIPSAK)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/sipsak $(IDIR_SIPSAK)/usr/bin/ - $(RSTRIP) $(IDIR_SIPSAK) - $(IPKG_BUILD) $(IDIR_SIPSAK) $(PACKAGE_DIR) diff --git a/openwrt/package/sipsak/ipkg/sipsak.control b/openwrt/package/sipsak/ipkg/sipsak.control deleted file mode 100644 index 790629f78e3..00000000000 --- a/openwrt/package/sipsak/ipkg/sipsak.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: sipsak -Priority: optional -Section: net -Depends: libopenssl -Description: a SIP (Session Initiation Protocol) stress and diagnostics utility diff --git a/openwrt/package/slurm/Config.in b/openwrt/package/slurm/Config.in deleted file mode 100644 index caf5e033285..00000000000 --- a/openwrt/package/slurm/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_PACKAGE_SLURM - prompt "slurm............................. A realtime network interface monitor" - tristate - default m if CONFIG_DEVEL - help - A realtime network interface monitor with the following features: - - * realtime traffic statistics divided into incoming and outgoing - * optional combined view - * can monitor any kind of network interface - * shows detailed statistics about the interface. - * it's themeable - - http://www.wormulon.net/projects/slurm - diff --git a/openwrt/package/slurm/Makefile b/openwrt/package/slurm/Makefile deleted file mode 100644 index 91467adfb8c..00000000000 --- a/openwrt/package/slurm/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=slurm -PKG_VERSION:=0.3.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=e68d09202b835c644f7f6b7f070f29a2 - -PKG_SOURCE_URL:=http://www.wormulon.net/files/code/slurm/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SLURM,slurm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - touch configure.in; \ - touch aclocal.m4; \ - touch Makefile.in; \ - touch config.h.in; \ - touch configure; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-lncurses" \ - ac_cv_func_malloc_0_nonnull=yes \ - ac_cv_lib_ncurses_use_default_colors=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_SLURM): - install -d -m0755 $(IDIR_SLURM)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/slurm $(IDIR_SLURM)/usr/bin/ - $(RSTRIP) $(IDIR_SLURM) - $(IPKG_BUILD) $(IDIR_SLURM) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/slurm/ipkg/slurm.control b/openwrt/package/slurm/ipkg/slurm.control deleted file mode 100644 index 7f83d77b1cf..00000000000 --- a/openwrt/package/slurm/ipkg/slurm.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: slurm -Priority: standard -Section: net -Depends: libncurses -Description: Realtime network interface monitor - diff --git a/openwrt/package/slurm/patches/no_host_ncurses.patch b/openwrt/package/slurm/patches/no_host_ncurses.patch deleted file mode 100644 index ce97478d6b6..00000000000 --- a/openwrt/package/slurm/patches/no_host_ncurses.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -ruN slurm-0.3.3-old/configure slurm-0.3.3-new/configure ---- slurm-0.3.3-old/configure 2004-09-28 16:34:56.000000000 +0200 -+++ slurm-0.3.3-new/configure 2005-11-06 22:08:53.000000000 +0100 -@@ -4762,35 +4762,35 @@ - _ACEOF - - --for cursespath in /usr/include/ncurses.h /usr/local/include/ncurses.h /usr/local/include/ncurses/ncurses.h /opt/include/ncurses.h /opt/include/curses.h /usr/include/curses.h /usr/local/include/curses.h /dev/null --do -- test -f "${cursespath}" && break --done --case ${cursespath} in -- /usr/include/*) -- CFLAGS="$CFLAGS -I/usr/include" -- LDFLAGS="" -- ;; -- /usr/local/include/ncurses/*) -- CFLAGS="${CFLAGS} -I/usr/local/include/ncurses" -- LDFLAGS="-L/usr/local/lib" -- SOLLDFLAGS="-R/usr/local/lib" -- ;; -- /usr/local/include/*) -- CFLAGS="${CFLAGS} -I/usr/local/include" -- LDFLAGS="-L/usr/local/lib" -- SOLLDFLAGS="-R/usr/local/lib" -- ;; -- /opt/include/*) -- CFLAGS="${CFLAGS} -I/opt/include" -- LDFLAGS="-L/opt/lib" -- SOLLDFLAGS="-R/opt/lib" -- ;; --esac -+#for cursespath in /usr/include/ncurses.h /usr/local/include/ncurses.h /usr/local/include/ncurses/ncurses.h /opt/include/ncurses.h /opt/include/curses.h /usr/include/curses.h /usr/local/include/curses.h /dev/null -+#do -+# test -f "${cursespath}" && break -+#done -+#case ${cursespath} in -+# /usr/include/*) -+# CFLAGS="$CFLAGS -I/usr/include" -+# LDFLAGS="" -+# ;; -+# /usr/local/include/ncurses/*) -+# CFLAGS="${CFLAGS} -I/usr/local/include/ncurses" -+# LDFLAGS="-L/usr/local/lib" -+# SOLLDFLAGS="-R/usr/local/lib" -+# ;; -+# /usr/local/include/*) -+# CFLAGS="${CFLAGS} -I/usr/local/include" -+# LDFLAGS="-L/usr/local/lib" -+# SOLLDFLAGS="-R/usr/local/lib" -+# ;; -+# /opt/include/*) -+# CFLAGS="${CFLAGS} -I/opt/include" -+# LDFLAGS="-L/opt/lib" -+# SOLLDFLAGS="-R/opt/lib" -+# ;; -+#esac - # add Slowlaris -R and libraries to LDFLAGS --if test ${OSTYPE} = "solaris" ; then -- LDFLAGS="${LDFLAGS} ${SOLLDFLAGS} -lnsl -lsocket -lkstat" --fi -+#if test ${OSTYPE} = "solaris" ; then -+# LDFLAGS="${LDFLAGS} ${SOLLDFLAGS} -lnsl -lsocket -lkstat" -+#fi - - echo "$as_me:$LINENO: checking for vanilla_coke in -lfridge" >&5 - echo $ECHO_N "checking for vanilla_coke in -lfridge... $ECHO_C" >&6 diff --git a/openwrt/package/snort-wireless/Config.in b/openwrt/package/snort-wireless/Config.in deleted file mode 100644 index 059b4b1ebc5..00000000000 --- a/openwrt/package/snort-wireless/Config.in +++ /dev/null @@ -1,89 +0,0 @@ -menu "snort-wireless.................... Ligthweight Wireless Network Intrusion Detection System (NIDS)" - -config BR2_COMPILE_SNORT_WIRELESS - tristate - default n - depends BR2_PACKAGE_SNORT_WIRELESS_BASIC || BR2_PACKAGE_SNORT_WIRELESS_MYSQL || BR2_PACKAGE_SNORT_WIRELESS_PGSQL || BR2_PACKAGE_SNORT_WIRELESS_CUSTOM - -choice - prompt "snort-wireless.................... Ligthweight Wireless Network Intrusion Detection System (NIDS)" - tristate - optional - help - - A ligthweight Wireless Network Intrusion Detection System (NIDS) - - http://www.snort-wireless.org/ - - Depends: - - libmysqlclient (for MySQL database logging support) - - libnet - - libpcap - - libpcre - - libpq (for PostgreSQL database logging support) - - - config BR2_PACKAGE_SNORT_WIRELESS_BASIC - prompt "snort-wireless.................. without database support" - tristate - select BR2_COMPILE_SNORT_WIRELESS - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - - config BR2_PACKAGE_SNORT_WIRELESS_MYSQL - prompt "snort-wireless-mysql............ with MySQL database support" - tristate - select BR2_COMPILE_SNORT_WIRELESS - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - select BR2_PACKAGE_LIBMYSQLCLIENT - - config BR2_PACKAGE_SNORT_WIRELESS_PGSQL - prompt "snort-wireless-pgsql............ with PostgreSQL database support" - tristate - select BR2_COMPILE_SNORT_WIRELESS - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - select BR2_PACKAGE_LIBPQ - - config BR2_PACKAGE_SNORT_WIRELESS_CUSTOM - prompt "snort-wireless-custom........... customized to your needs" - tristate - select BR2_COMPILE_SNORT_WIRELESS - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - - config BR2_PACKAGE_SNORT_WIRELESS_ENABLE_DEBUG - prompt "enable debug (enable debugging options, useful for bugreports)" - bool - default n - depends BR2_PACKAGE_SNORT_WIRELESS_CUSTOM - - config BR2_PACKAGE_SNORT_WIRELESS_ENABLE_INLINE - prompt "enable inline mode (read packets from iptables instead of libpcap)" - bool - default n - depends BR2_PACKAGE_SNORT_WIRELESS_CUSTOM - select BR2_PACKAGE_IPTABLES - - config BR2_PACKAGE_SNORT_WIRELESS_WITH_MYSQL - prompt "with MySQL database support" - bool - default n - depends BR2_PACKAGE_SNORT_WIRELESS_CUSTOM - select BR2_PACKAGE_LIBMYSQLCLIENT - - config BR2_PACKAGE_SNORT_WIRELESS_WITH_PGSQL - prompt "with PostgreSQL database support" - bool - default n - depends BR2_PACKAGE_SNORT_WIRELESS_CUSTOM - select BR2_PACKAGE_LIBPQ - -endchoice - -endmenu diff --git a/openwrt/package/snort-wireless/Makefile b/openwrt/package/snort-wireless/Makefile deleted file mode 100644 index ebb9a3a6615..00000000000 --- a/openwrt/package/snort-wireless/Makefile +++ /dev/null @@ -1,155 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=snort-wireless -PKG_VERSION:=2.4.3-alpha04 -PKG_RELEASE:=1 -PKG_MD5SUM:=1aa699ae279bf7a1140cf6cca02f9999 - -PKG_SOURCE_URL:=http://www.snort-wireless.org/files/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -PKG_CONFIGURE_OPTS := \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/sbin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib/locate \ - --localstatedir=/var/lib \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --enable-flexresp \ - --with-libnet-includes="$(STAGING_DIR)/usr/include" \ - --with-libnet-libraries="$(STAGING_DIR)/usr/lib" \ - --with-libpcap-includes="$(STAGING_DIR)/usr/include" \ - --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \ - --with-libpcre-includes="$(STAGING_DIR)/usr/include" \ - --with-libpcre-libraries="$(STAGING_DIR)/usr/lib" \ - -SNORT_WIRELESS_BASIC_CONFIGURE_OPTS := \ - --without-mysql \ - --without-postgresql \ - -SNORT_WIRELESS_MYSQL_CONFIGURE_OPTS := \ - --with-mysql=$(STAGING_DIR)/usr \ - --without-postgresql \ - -SNORT_WIRELESS_PGSQL_CONFIGURE_OPTS := \ - --without-mysql \ - --with-postgresql=$(STAGING_DIR)/usr \ - -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS := \ - -ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_DEBUG),y) -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --enable-debug -else -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --disable-debug -endif - -ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_INLINE),y) -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --enable-inline -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --with-libipq-includes="$(STAGING_DIR)/include/libipq" -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --with-libipq-libraries="$(STAGING_DIR)/lib" -else -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --disable-inline -endif - -ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_MYSQL),y) -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --with-mysql="$(STAGING_DIR)/usr" -else -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --without-mysql -endif - -ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_PGSQL),y) -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --with-postgresql="$(STAGING_DIR)/usr" -else -SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --without-postgresql -endif - -define PKG_build - -ifneq ($(BR2_PACKAGE_$(1)),) -BUILD_TARGETS += $(PKG_BUILD_DIR)/$(2) -endif - -$(PKG_BUILD_DIR)/$(2): $(PKG_BUILD_DIR)/.prepared - touch -r $(PKG_BUILD_DIR)/Makefile.am $(PKG_BUILD_DIR)/configure.in - touch -r $(PKG_BUILD_DIR)/Makefile.in $(PKG_BUILD_DIR)/configure - -$(MAKE) -C $(PKG_BUILD_DIR) distclean - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/mysql" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/mysql" \ - ./configure \ - $(PKG_CONFIGURE_OPTS) \ - $$($(1)_CONFIGURE_OPTS) \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) - mv $(PKG_BUILD_DIR)/src/snort $(PKG_BUILD_DIR)/$(2) - -$$(IPKG_$(1)): $(PKG_BUILD_DIR)/.installed $(PKG_BUILD_DIR)/$(2) - install -m0644 ./ipkg/snort-wireless.conffiles $$(IDIR_$(1))/CONTROL/conffiles - install -d -m0755 $$(IDIR_$(1))/etc/default - install -m0644 ./files/snort-wireless.default $$(IDIR_$(1))/etc/default/snort - install -d -m0755 $$(IDIR_$(1))/etc/init.d - install -m0755 ./files/snort-wireless.init $$(IDIR_$(1))/etc/init.d/snort - install -d -m0755 $$(IDIR_$(1))/etc/snort - install -m0644 $(PKG_BUILD_DIR)/etc/snort.conf $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/classification.config $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/gen-msg.map $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/reference.config $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/sid-msg.map $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/threshold.conf $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/unicode.map $$(IDIR_$(1))/etc/snort/ - install -d -m0755 $$(IDIR_$(1))/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/$(2) $$(IDIR_$(1))/usr/sbin/snort - $(RSTRIP) $$(IDIR_$(1)) - mkdir -p $(PACKAGE_DIR) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,SNORT_WIRELESS_BASIC,snort-wireless,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNORT_WIRELESS_MYSQL,snort-wireless-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNORT_WIRELESS_PGSQL,snort-wireless-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNORT_WIRELESS_CUSTOM,snort-wireless-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_build,SNORT_WIRELESS_BASIC,snort-wireless,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,SNORT_WIRELESS_MYSQL,snort-wireless-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,SNORT_WIRELESS_PGSQL,snort-wireless-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,SNORT_WIRELESS_CUSTOM,snort-wireless-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS) - touch $@ - -$(PKG_BUILD_DIR)/.installed: $(PKG_BUILD_DIR)/.built - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $@ - diff --git a/openwrt/package/snort-wireless/files/snort-wireless.default b/openwrt/package/snort-wireless/files/snort-wireless.default deleted file mode 100644 index 796a893b02c..00000000000 --- a/openwrt/package/snort-wireless/files/snort-wireless.default +++ /dev/null @@ -1,2 +0,0 @@ -INTERFACE="vlan1" # WAN -OPTIONS="-i $INTERFACE -c /etc/snort/snort.conf -D -N -q -s" diff --git a/openwrt/package/snort-wireless/files/snort-wireless.init b/openwrt/package/snort-wireless/files/snort-wireless.init deleted file mode 100644 index 8c019c41d46..00000000000 --- a/openwrt/package/snort-wireless/files/snort-wireless.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/snort -LOG_D=/var/log/snort -RUN_D=/var/run -[ -f $DEFAULT ] && . $DEFAULT -PID_F=$RUN_D/snort_$INTERFACE.pid - -case $1 in - start) - [ -d $LOG_D ] || mkdir -p $LOG_D - [ -d $RUN_D ] || mkdir -p $RUN_D - snort $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/snort-wireless/ipkg/snort-wireless-custom.control b/openwrt/package/snort-wireless/ipkg/snort-wireless-custom.control deleted file mode 100644 index 121b837e6b8..00000000000 --- a/openwrt/package/snort-wireless/ipkg/snort-wireless-custom.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: snort-wireless-custom -Priority: optional -Section: net -Description: a flexible Wireless Network Intrusion Detection System (NIDS), - built with custom options -Depends: libnet, libpcap, libpcre diff --git a/openwrt/package/snort-wireless/ipkg/snort-wireless-mysql.control b/openwrt/package/snort-wireless/ipkg/snort-wireless-mysql.control deleted file mode 100644 index 30104168ddb..00000000000 --- a/openwrt/package/snort-wireless/ipkg/snort-wireless-mysql.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: snort-wireless-mysql -Priority: optional -Section: net -Description: a flexible Wireless Network Intrusion Detection System (NIDS), - built with MySQL database logging support -Depends: libnet, libpcap, libpcre, libmysqlclient diff --git a/openwrt/package/snort-wireless/ipkg/snort-wireless-pgsql.control b/openwrt/package/snort-wireless/ipkg/snort-wireless-pgsql.control deleted file mode 100644 index ffb9d5b22c6..00000000000 --- a/openwrt/package/snort-wireless/ipkg/snort-wireless-pgsql.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: snort-wireless-pgsql -Priority: optional -Section: net -Description: a flexible Wireless Network Intrusion Detection System (NIDS), - built with PostgreSQL database logging support -Depends: libnet, libpcap, libpcre, libpq diff --git a/openwrt/package/snort-wireless/ipkg/snort-wireless.conffiles b/openwrt/package/snort-wireless/ipkg/snort-wireless.conffiles deleted file mode 100644 index c3876724865..00000000000 --- a/openwrt/package/snort-wireless/ipkg/snort-wireless.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/default/snort -/etc/snort/snort.conf -/etc/snort/threshold.conf diff --git a/openwrt/package/snort-wireless/ipkg/snort-wireless.control b/openwrt/package/snort-wireless/ipkg/snort-wireless.control deleted file mode 100644 index 6a5cb26b33b..00000000000 --- a/openwrt/package/snort-wireless/ipkg/snort-wireless.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: snort-wireless -Priority: optional -Section: net -Description: a flexible Wireless Network Intrusion Detection System (NIDS), - built without database logging support -Depends: libnet, libpcap, libpcre diff --git a/openwrt/package/snort-wireless/patches/500-no-config-search.patch b/openwrt/package/snort-wireless/patches/500-no-config-search.patch deleted file mode 100644 index d674ba66aae..00000000000 --- a/openwrt/package/snort-wireless/patches/500-no-config-search.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- snort-2.3.2-orig/src/snort.c 2005-01-13 21:36:20.000000000 +0100 -+++ snort-2.3.2-1/src/snort.c 2005-04-04 20:03:34.000000000 +0200 -@@ -1949,7 +1949,7 @@ - { - struct stat st; - int i; -- char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL}; -+ char *conf_files[]={"/etc/snort/snort.conf", NULL}; - char *fname = NULL; - char *home_dir = NULL; - char *rval = NULL; -@@ -1970,23 +1970,6 @@ - i++; - } - -- /* search for .snortrc in the HOMEDIR */ -- if(!rval) -- { -- if((home_dir = getenv("HOME"))) -- { -- /* create the full path */ -- fname = (char *)malloc(strlen(home_dir) + strlen("/.snortrc") + 1); -- if(!fname) -- FatalError("Out of memory searching for config file\n"); -- -- if(stat(fname, &st) != -1) -- rval = fname; -- else -- free(fname); -- } -- } -- - return rval; - } - diff --git a/openwrt/package/snort-wireless/patches/750-lightweight-config.patch b/openwrt/package/snort-wireless/patches/750-lightweight-config.patch deleted file mode 100644 index daea3be5ac1..00000000000 --- a/openwrt/package/snort-wireless/patches/750-lightweight-config.patch +++ /dev/null @@ -1,178 +0,0 @@ ---- snort-wireless-2.4.3-alpha04/etc/snort.conf 2005-10-21 09:41:01.000000000 +0200 -+++ /Users/florian/telechargements/snort.conf 2005-10-30 13:20:17.000000000 +0100 -@@ -6,6 +6,7 @@ - # - ################################################### - # This file contains a sample snort configuration. -+# Most preprocessors and rules were disabled to save memory. - # You can take the following steps to create your own custom configuration: - # - # 1) Set the variables for your network -@@ -42,10 +43,10 @@ - # or you can specify the variable to be any IP address - # like this: - --var HOME_NET any -+var HOME_NET 192.168.1.0/24 - - # Set up the external network addresses as well. A good start may be "any" --var EXTERNAL_NET any -+var EXTERNAL_NET !$HOME_NET - - # Configure your wireless AP lists. This allows snort to look for attacks - # against your wireless network, such as rogue access points or adhoc wireless -@@ -137,7 +138,7 @@ - # Path to your rules files (this can be a relative path) - # Note for Windows users: You are advised to make this an absolute path, - # such as: c:\snort\rules --var RULE_PATH ../rules -+var RULE_PATH /etc/snort/rules - - # Configure the snort decoder - # ============================ -@@ -413,11 +414,11 @@ - # lots of options available here. See doc/README.http_inspect. - # unicode.map should be wherever your snort.conf lives, or given - # a full path to where snort can find it. --preprocessor http_inspect: global \ -- iis_unicode_map unicode.map 1252 -+#preprocessor http_inspect: global \ -+# iis_unicode_map unicode.map 1252 - --preprocessor http_inspect_server: server default \ -- profile all ports { 80 8080 8180 } oversize_dir_length 500 -+#preprocessor http_inspect_server: server default \ -+# profile all ports { 80 8080 8180 } oversize_dir_length 500 - - # - # Example unique server configuration -@@ -451,7 +452,7 @@ - # no_alert_incomplete - don't alert when a single segment - # exceeds the current packet size - --preprocessor rpc_decode: 111 32771 -+#preprocessor rpc_decode: 111 32771 - - # bo: Back Orifice detector - # ------------------------- -@@ -474,7 +475,7 @@ - # 3 Back Orifice Server Traffic Detected - # 4 Back Orifice Snort Buffer Attack - --preprocessor bo -+#preprocessor bo - - # telnet_decode: Telnet negotiation string normalizer - # --------------------------------------------------- -@@ -486,7 +487,7 @@ - # This preprocessor requires no arguments. - # Portscan uses Generator ID 109 and does not generate any SID currently. - --preprocessor telnet_decode -+#preprocessor telnet_decode - - # sfPortscan - # ---------- -@@ -537,9 +538,9 @@ - # are still watched as scanner hosts. The 'ignore_scanned' option is - # used to tune alerts from very active hosts such as syslog servers, etc. - # --preprocessor sfportscan: proto { all } \ -- memcap { 10000000 } \ -- sense_level { low } -+#preprocessor sfportscan: proto { all } \ -+# memcap { 10000000 } \ -+# sense_level { low } - - # arpspoof - #---------------------------------------- -@@ -814,41 +815,41 @@ - include $RULE_PATH/bad-traffic.rules - include $RULE_PATH/exploit.rules - include $RULE_PATH/scan.rules --include $RULE_PATH/finger.rules --include $RULE_PATH/ftp.rules --include $RULE_PATH/telnet.rules --include $RULE_PATH/rpc.rules --include $RULE_PATH/rservices.rules --include $RULE_PATH/dos.rules --include $RULE_PATH/ddos.rules --include $RULE_PATH/dns.rules --include $RULE_PATH/tftp.rules -- --include $RULE_PATH/web-cgi.rules --include $RULE_PATH/web-coldfusion.rules --include $RULE_PATH/web-iis.rules --include $RULE_PATH/web-frontpage.rules --include $RULE_PATH/web-misc.rules --include $RULE_PATH/web-client.rules --include $RULE_PATH/web-php.rules -- --include $RULE_PATH/sql.rules --include $RULE_PATH/x11.rules --include $RULE_PATH/icmp.rules --include $RULE_PATH/netbios.rules --include $RULE_PATH/misc.rules --include $RULE_PATH/attack-responses.rules --include $RULE_PATH/oracle.rules --include $RULE_PATH/mysql.rules --include $RULE_PATH/snmp.rules -- --include $RULE_PATH/smtp.rules --include $RULE_PATH/imap.rules --include $RULE_PATH/pop2.rules --include $RULE_PATH/pop3.rules -+#include $RULE_PATH/finger.rules -+#include $RULE_PATH/ftp.rules -+#include $RULE_PATH/telnet.rules -+#include $RULE_PATH/rpc.rules -+#include $RULE_PATH/rservices.rules -+#include $RULE_PATH/dos.rules -+#include $RULE_PATH/ddos.rules -+#include $RULE_PATH/dns.rules -+#include $RULE_PATH/tftp.rules -+ -+#include $RULE_PATH/web-cgi.rules -+#include $RULE_PATH/web-coldfusion.rules -+#include $RULE_PATH/web-iis.rules -+#include $RULE_PATH/web-frontpage.rules -+#include $RULE_PATH/web-misc.rules -+#include $RULE_PATH/web-client.rules -+#include $RULE_PATH/web-php.rules -+ -+#include $RULE_PATH/sql.rules -+#include $RULE_PATH/x11.rules -+#include $RULE_PATH/icmp.rules -+#include $RULE_PATH/netbios.rules -+#include $RULE_PATH/misc.rules -+#include $RULE_PATH/attack-responses.rules -+#include $RULE_PATH/oracle.rules -+#include $RULE_PATH/mysql.rules -+#include $RULE_PATH/snmp.rules -+ -+#include $RULE_PATH/smtp.rules -+#include $RULE_PATH/imap.rules -+#include $RULE_PATH/pop2.rules -+#include $RULE_PATH/pop3.rules - --include $RULE_PATH/nntp.rules --include $RULE_PATH/other-ids.rules -+#include $RULE_PATH/nntp.rules -+#include $RULE_PATH/other-ids.rules - # include $RULE_PATH/web-attacks.rules - # include $RULE_PATH/backdoor.rules - # include $RULE_PATH/shellcode.rules -@@ -856,11 +857,11 @@ - # include $RULE_PATH/porn.rules - # include $RULE_PATH/info.rules - # include $RULE_PATH/icmp-info.rules -- include $RULE_PATH/virus.rules -+# include $RULE_PATH/virus.rules - # include $RULE_PATH/chat.rules - # include $RULE_PATH/multimedia.rules - # include $RULE_PATH/p2p.rules --include $RULE_PATH/experimental.rules -+#include $RULE_PATH/experimental.rules - #include $RULE_PATH/wifi.rules - - # Include any thresholding or suppression commands. See threshold.conf in the diff --git a/openwrt/package/snort/Config.in b/openwrt/package/snort/Config.in deleted file mode 100644 index b3e9d4fe9c0..00000000000 --- a/openwrt/package/snort/Config.in +++ /dev/null @@ -1,88 +0,0 @@ -menu "snort............................. Ligthweight Network Intrusion Detection System (NIDS)" - -config BR2_COMPILE_SNORT - tristate - default n - depends BR2_PACKAGE_SNORT_BASIC || BR2_PACKAGE_SNORT_MYSQL || BR2_PACKAGE_SNORT_PGSQL || BR2_PACKAGE_SNORT_CUSTOM - -choice - prompt "snort............................. Ligthweight Network Intrusion Detection System (NIDS)" - tristate - optional - help - - A ligthweight Network Intrusion Detection System (NIDS) - - http://www.snort.org/ - - Depends: - - libmysqlclient (for MySQL database logging support) - - libnet - - libpcap - - libpcre - - libpq (for PostgreSQL database logging support) - - config BR2_PACKAGE_SNORT_BASIC - prompt "snort........................... without database support" - tristate - select BR2_COMPILE_SNORT - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - - config BR2_PACKAGE_SNORT_MYSQL - prompt "snort-mysql..................... with MySQL database support" - tristate - select BR2_COMPILE_SNORT - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - select BR2_PACKAGE_LIBMYSQLCLIENT - - config BR2_PACKAGE_SNORT_PGSQL - prompt "snort-pgsql..................... with PostgreSQL database support" - tristate - select BR2_COMPILE_SNORT - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - select BR2_PACKAGE_LIBPQ - - config BR2_PACKAGE_SNORT_CUSTOM - prompt "snort-custom.................... customized to your needs" - tristate - select BR2_COMPILE_SNORT - select BR2_PACKAGE_LIBNET - select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBPCRE - - config BR2_PACKAGE_SNORT_ENABLE_DEBUG - prompt "debug (enable debugging options, useful for bugreports)" - bool - default n - depends BR2_PACKAGE_SNORT_CUSTOM - - config BR2_PACKAGE_SNORT_ENABLE_INLINE - prompt "Inline mode (read packets from iptables instead of libpcap)" - bool - default n - depends BR2_PACKAGE_SNORT_CUSTOM - select BR2_PACKAGE_IPTABLES - - config BR2_PACKAGE_SNORT_WITH_MYSQL - prompt "MySQL database support" - bool - default n - depends BR2_PACKAGE_SNORT_CUSTOM - select BR2_PACKAGE_LIBMYSQLCLIENT - - config BR2_PACKAGE_SNORT_WITH_PGSQL - prompt "PostgreSQL database support" - bool - default n - depends BR2_PACKAGE_SNORT_CUSTOM - select BR2_PACKAGE_LIBPQ - -endchoice - -endmenu diff --git a/openwrt/package/snort/Makefile b/openwrt/package/snort/Makefile deleted file mode 100644 index 04a6efc37e4..00000000000 --- a/openwrt/package/snort/Makefile +++ /dev/null @@ -1,155 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=snort -PKG_VERSION:=2.4.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=9dc9060d1f2e248663eceffadfc45e7e - -PKG_SOURCE_URL:=http://www.snort.org/dl/current/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -PKG_CONFIGURE_OPTS := \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/sbin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib/locate \ - --localstatedir=/var/lib \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --enable-flexresp \ - --with-libnet-includes="$(STAGING_DIR)/usr/include" \ - --with-libnet-libraries="$(STAGING_DIR)/usr/lib" \ - --with-libpcap-includes="$(STAGING_DIR)/usr/include" \ - --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \ - --with-libpcre-includes="$(STAGING_DIR)/usr/include" \ - --with-libpcre-libraries="$(STAGING_DIR)/usr/lib" \ - -SNORT_BASIC_CONFIGURE_OPTS := \ - --without-mysql \ - --without-postgresql \ - -SNORT_MYSQL_CONFIGURE_OPTS := \ - --with-mysql=$(STAGING_DIR)/usr \ - --without-postgresql \ - -SNORT_PGSQL_CONFIGURE_OPTS := \ - --without-mysql \ - --with-postgresql=$(STAGING_DIR)/usr \ - -SNORT_CUSTOM_CONFIGURE_OPTS := \ - -ifeq ($(BR2_PACKAGE_SNORT_ENABLE_DEBUG),y) -SNORT_CUSTOM_CONFIGURE_OPTS += --enable-debug -else -SNORT_CUSTOM_CONFIGURE_OPTS += --disable-debug -endif - -ifeq ($(BR2_PACKAGE_SNORT_ENABLE_INLINE),y) -SNORT_CUSTOM_CONFIGURE_OPTS += --enable-inline -SNORT_CUSTOM_CONFIGURE_OPTS += --with-libipq-includes="$(STAGING_DIR)/include/libipq" -SNORT_CUSTOM_CONFIGURE_OPTS += --with-libipq-libraries="$(STAGING_DIR)/lib" -else -SNORT_CUSTOM_CONFIGURE_OPTS += --disable-inline -endif - -ifeq ($(BR2_PACKAGE_SNORT_WITH_MYSQL),y) -SNORT_CUSTOM_CONFIGURE_OPTS += --with-mysql="$(STAGING_DIR)/usr" -else -SNORT_CUSTOM_CONFIGURE_OPTS += --without-mysql -endif - -ifeq ($(BR2_PACKAGE_SNORT_WITH_PGSQL),y) -SNORT_CUSTOM_CONFIGURE_OPTS += --with-postgresql="$(STAGING_DIR)/usr" -else -SNORT_CUSTOM_CONFIGURE_OPTS += --without-postgresql -endif - -define PKG_build - -ifneq ($(BR2_PACKAGE_$(1)),) -BUILD_TARGETS += $(PKG_BUILD_DIR)/$(2) -endif - -$(PKG_BUILD_DIR)/$(2): $(PKG_BUILD_DIR)/.prepared - touch -r $(PKG_BUILD_DIR)/Makefile.am $(PKG_BUILD_DIR)/configure.in - touch -r $(PKG_BUILD_DIR)/Makefile.in $(PKG_BUILD_DIR)/configure - -$(MAKE) -C $(PKG_BUILD_DIR) distclean - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/mysql" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib/mysql" \ - ./configure \ - $(PKG_CONFIGURE_OPTS) \ - $$($(1)_CONFIGURE_OPTS) \ - ); - $(MAKE) -C $(PKG_BUILD_DIR) - mv $(PKG_BUILD_DIR)/src/snort $(PKG_BUILD_DIR)/$(2) - -$$(IPKG_$(1)): $(PKG_BUILD_DIR)/.installed $(PKG_BUILD_DIR)/$(2) - install -m0644 ./ipkg/snort.conffiles $$(IDIR_$(1))/CONTROL/conffiles - install -d -m0755 $$(IDIR_$(1))/etc/default - install -m0644 ./files/snort.default $$(IDIR_$(1))/etc/default/snort - install -d -m0755 $$(IDIR_$(1))/etc/init.d - install -m0755 ./files/snort.init $$(IDIR_$(1))/etc/init.d/snort - install -d -m0755 $$(IDIR_$(1))/etc/snort - install -m0644 $(PKG_BUILD_DIR)/etc/snort.conf $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/classification.config $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/gen-msg.map $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/reference.config $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/sid-msg.map $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/threshold.conf $$(IDIR_$(1))/etc/snort/ - install -m0644 $(PKG_BUILD_DIR)/etc/unicode.map $$(IDIR_$(1))/etc/snort/ - install -d -m0755 $$(IDIR_$(1))/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/$(2) $$(IDIR_$(1))/usr/sbin/snort - $(RSTRIP) $$(IDIR_$(1)) - mkdir -p $(PACKAGE_DIR) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,SNORT_BASIC,snort,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNORT_MYSQL,snort-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNORT_PGSQL,snort-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SNORT_CUSTOM,snort-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_build,SNORT_BASIC,snort,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,SNORT_MYSQL,snort-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,SNORT_PGSQL,snort-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_build,SNORT_CUSTOM,snort-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS) - touch $@ - -$(PKG_BUILD_DIR)/.installed: $(PKG_BUILD_DIR)/.built - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $(PKG_BUILD_DIR)/.installed - diff --git a/openwrt/package/snort/files/snort.default b/openwrt/package/snort/files/snort.default deleted file mode 100644 index 796a893b02c..00000000000 --- a/openwrt/package/snort/files/snort.default +++ /dev/null @@ -1,2 +0,0 @@ -INTERFACE="vlan1" # WAN -OPTIONS="-i $INTERFACE -c /etc/snort/snort.conf -D -N -q -s" diff --git a/openwrt/package/snort/files/snort.init b/openwrt/package/snort/files/snort.init deleted file mode 100644 index 8c019c41d46..00000000000 --- a/openwrt/package/snort/files/snort.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/snort -LOG_D=/var/log/snort -RUN_D=/var/run -[ -f $DEFAULT ] && . $DEFAULT -PID_F=$RUN_D/snort_$INTERFACE.pid - -case $1 in - start) - [ -d $LOG_D ] || mkdir -p $LOG_D - [ -d $RUN_D ] || mkdir -p $RUN_D - snort $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/snort/ipkg/snort-custom.control b/openwrt/package/snort/ipkg/snort-custom.control deleted file mode 100644 index b3a9f3c5230..00000000000 --- a/openwrt/package/snort/ipkg/snort-custom.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: snort-custom -Priority: optional -Section: net -Description: a flexible Network Intrusion Detection System (NIDS), - built with custom options -Depends: libnet, libpcap, libpcre diff --git a/openwrt/package/snort/ipkg/snort-mysql.control b/openwrt/package/snort/ipkg/snort-mysql.control deleted file mode 100644 index d7390bf655d..00000000000 --- a/openwrt/package/snort/ipkg/snort-mysql.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: snort-mysql -Priority: optional -Section: net -Description: a flexible Network Intrusion Detection System (NIDS), - built with MySQL database logging support -Depends: libnet, libpcap, libpcre, libmysqlclient diff --git a/openwrt/package/snort/ipkg/snort-pgsql.control b/openwrt/package/snort/ipkg/snort-pgsql.control deleted file mode 100644 index fa7bbbc8620..00000000000 --- a/openwrt/package/snort/ipkg/snort-pgsql.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: snort-pgsql -Priority: optional -Section: net -Description: a flexible Network Intrusion Detection System (NIDS), - built with PostgreSQL database logging support -Depends: libnet, libpcap, libpcre, libpq diff --git a/openwrt/package/snort/ipkg/snort.conffiles b/openwrt/package/snort/ipkg/snort.conffiles deleted file mode 100644 index c3876724865..00000000000 --- a/openwrt/package/snort/ipkg/snort.conffiles +++ /dev/null @@ -1,3 +0,0 @@ -/etc/default/snort -/etc/snort/snort.conf -/etc/snort/threshold.conf diff --git a/openwrt/package/snort/ipkg/snort.control b/openwrt/package/snort/ipkg/snort.control deleted file mode 100644 index 23ed58724af..00000000000 --- a/openwrt/package/snort/ipkg/snort.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: snort -Priority: optional -Section: net -Description: a flexible Network Intrusion Detection System (NIDS), - built without database logging support -Depends: libnet, libpcap, libpcre diff --git a/openwrt/package/snort/patches/500-no-config-search.patch b/openwrt/package/snort/patches/500-no-config-search.patch deleted file mode 100644 index d674ba66aae..00000000000 --- a/openwrt/package/snort/patches/500-no-config-search.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- snort-2.3.2-orig/src/snort.c 2005-01-13 21:36:20.000000000 +0100 -+++ snort-2.3.2-1/src/snort.c 2005-04-04 20:03:34.000000000 +0200 -@@ -1949,7 +1949,7 @@ - { - struct stat st; - int i; -- char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL}; -+ char *conf_files[]={"/etc/snort/snort.conf", NULL}; - char *fname = NULL; - char *home_dir = NULL; - char *rval = NULL; -@@ -1970,23 +1970,6 @@ - i++; - } - -- /* search for .snortrc in the HOMEDIR */ -- if(!rval) -- { -- if((home_dir = getenv("HOME"))) -- { -- /* create the full path */ -- fname = (char *)malloc(strlen(home_dir) + strlen("/.snortrc") + 1); -- if(!fname) -- FatalError("Out of memory searching for config file\n"); -- -- if(stat(fname, &st) != -1) -- rval = fname; -- else -- free(fname); -- } -- } -- - return rval; - } - diff --git a/openwrt/package/snort/patches/750-lightweight-config.patch b/openwrt/package/snort/patches/750-lightweight-config.patch deleted file mode 100644 index c8bde27f51b..00000000000 --- a/openwrt/package/snort/patches/750-lightweight-config.patch +++ /dev/null @@ -1,178 +0,0 @@ ---- snort-2.3.2-orig/etc/snort.conf 2005-03-10 23:04:38.000000000 +0100 -+++ snort-2.3.2-1/etc/snort.conf 2005-04-04 20:01:41.000000000 +0200 -@@ -6,6 +6,7 @@ - # - ################################################### - # This file contains a sample snort configuration. -+# Most preprocessors and rules were disabled to save memory. - # You can take the following steps to create your own custom configuration: - # - # 1) Set the network variables for your network -@@ -41,10 +42,10 @@ - # or you can specify the variable to be any IP address - # like this: - --var HOME_NET any -+var HOME_NET 192.168.1.0/24 - - # Set up the external network addresses as well. A good start may be "any" --var EXTERNAL_NET any -+var EXTERNAL_NET !$HOME_NET - - # Configure your server lists. This allows snort to only look for attacks to - # systems that have a service up. Why look for HTTP attacks if you are not -@@ -106,7 +107,7 @@ - # Path to your rules files (this can be a relative path) - # Note for Windows users: You are advised to make this an absolute path, - # such as: c:\snort\rules --var RULE_PATH ../rules -+var RULE_PATH /etc/snort/rules - - # Configure the snort decoder - # ============================ -@@ -297,11 +298,11 @@ - # lots of options available here. See doc/README.http_inspect. - # unicode.map should be wherever your snort.conf lives, or given - # a full path to where snort can find it. --preprocessor http_inspect: global \ -- iis_unicode_map unicode.map 1252 -+#preprocessor http_inspect: global \ -+# iis_unicode_map unicode.map 1252 - --preprocessor http_inspect_server: server default \ -- profile all ports { 80 8080 8180 } oversize_dir_length 500 -+#preprocessor http_inspect_server: server default \ -+# profile all ports { 80 8080 8180 } oversize_dir_length 500 - - # - # Example unique server configuration -@@ -335,7 +336,7 @@ - # no_alert_incomplete - don't alert when a single segment - # exceeds the current packet size - --preprocessor rpc_decode: 111 32771 -+#preprocessor rpc_decode: 111 32771 - - # bo: Back Orifice detector - # ------------------------- -@@ -347,7 +348,7 @@ - # ----- ------------------- - # 1 Back Orifice traffic detected - --preprocessor bo -+#preprocessor bo - - # telnet_decode: Telnet negotiation string normalizer - # --------------------------------------------------- -@@ -359,7 +360,7 @@ - # This preprocessor requires no arguments. - # Portscan uses Generator ID 109 and does not generate any SID currently. - --preprocessor telnet_decode -+#preprocessor telnet_decode - - # Flow-Portscan: detect a variety of portscans - # --------------------------------------- -@@ -455,9 +456,9 @@ - # are still watched as scanner hosts. The 'ignore_scanned' option is - # used to tune alerts from very active hosts such as syslog servers, etc. - # --preprocessor sfportscan: proto { all } \ -- memcap { 10000000 } \ -- sense_level { low } -+#preprocessor sfportscan: proto { all } \ -+# memcap { 10000000 } \ -+# sense_level { low } - - # arpspoof - #---------------------------------------- -@@ -642,41 +643,41 @@ - include $RULE_PATH/bad-traffic.rules - include $RULE_PATH/exploit.rules - include $RULE_PATH/scan.rules --include $RULE_PATH/finger.rules --include $RULE_PATH/ftp.rules --include $RULE_PATH/telnet.rules --include $RULE_PATH/rpc.rules --include $RULE_PATH/rservices.rules --include $RULE_PATH/dos.rules --include $RULE_PATH/ddos.rules --include $RULE_PATH/dns.rules --include $RULE_PATH/tftp.rules -- --include $RULE_PATH/web-cgi.rules --include $RULE_PATH/web-coldfusion.rules --include $RULE_PATH/web-iis.rules --include $RULE_PATH/web-frontpage.rules --include $RULE_PATH/web-misc.rules --include $RULE_PATH/web-client.rules --include $RULE_PATH/web-php.rules -- --include $RULE_PATH/sql.rules --include $RULE_PATH/x11.rules --include $RULE_PATH/icmp.rules --include $RULE_PATH/netbios.rules --include $RULE_PATH/misc.rules --include $RULE_PATH/attack-responses.rules --include $RULE_PATH/oracle.rules --include $RULE_PATH/mysql.rules --include $RULE_PATH/snmp.rules -- --include $RULE_PATH/smtp.rules --include $RULE_PATH/imap.rules --include $RULE_PATH/pop2.rules --include $RULE_PATH/pop3.rules -+#include $RULE_PATH/finger.rules -+#include $RULE_PATH/ftp.rules -+#include $RULE_PATH/telnet.rules -+#include $RULE_PATH/rpc.rules -+#include $RULE_PATH/rservices.rules -+#include $RULE_PATH/dos.rules -+#include $RULE_PATH/ddos.rules -+#include $RULE_PATH/dns.rules -+#include $RULE_PATH/tftp.rules -+ -+#include $RULE_PATH/web-cgi.rules -+#include $RULE_PATH/web-coldfusion.rules -+#include $RULE_PATH/web-iis.rules -+#include $RULE_PATH/web-frontpage.rules -+#include $RULE_PATH/web-misc.rules -+#include $RULE_PATH/web-client.rules -+#include $RULE_PATH/web-php.rules -+ -+#include $RULE_PATH/sql.rules -+#include $RULE_PATH/x11.rules -+#include $RULE_PATH/icmp.rules -+#include $RULE_PATH/netbios.rules -+#include $RULE_PATH/misc.rules -+#include $RULE_PATH/attack-responses.rules -+#include $RULE_PATH/oracle.rules -+#include $RULE_PATH/mysql.rules -+#include $RULE_PATH/snmp.rules -+ -+#include $RULE_PATH/smtp.rules -+#include $RULE_PATH/imap.rules -+#include $RULE_PATH/pop2.rules -+#include $RULE_PATH/pop3.rules - --include $RULE_PATH/nntp.rules --include $RULE_PATH/other-ids.rules -+#include $RULE_PATH/nntp.rules -+#include $RULE_PATH/other-ids.rules - # include $RULE_PATH/web-attacks.rules - # include $RULE_PATH/backdoor.rules - # include $RULE_PATH/shellcode.rules -@@ -684,11 +685,11 @@ - # include $RULE_PATH/porn.rules - # include $RULE_PATH/info.rules - # include $RULE_PATH/icmp-info.rules -- include $RULE_PATH/virus.rules -+# include $RULE_PATH/virus.rules - # include $RULE_PATH/chat.rules - # include $RULE_PATH/multimedia.rules - # include $RULE_PATH/p2p.rules --include $RULE_PATH/experimental.rules -+#include $RULE_PATH/experimental.rules - - # Include any thresholding or suppression commands. See threshold.conf in the - # /etc directory for details. Commands don't necessarily need to be diff --git a/openwrt/package/socat/Config.in b/openwrt/package/socat/Config.in deleted file mode 100644 index d66693dc1b2..00000000000 --- a/openwrt/package/socat/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -config BR2_PACKAGE_SOCAT - prompt "socat............................. A multipurpose relay (SOcket CAT)" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_LIBPTHREAD - help - SoCat (for SOcket CAT) establishes two bidirectional byte streams and - transfers data between them. - Data channels may be files, pipes, devices (terminal or modem, etc.), or - sockets (Unix, IPv4, IPv6, raw, UDP, TCP, SSL). It provides forking, - logging and tracing, different modes for interprocess communication and - many more options. - - http://www.dest-unreach.org/socat/ - - Depends: openssl - diff --git a/openwrt/package/socat/Makefile b/openwrt/package/socat/Makefile deleted file mode 100644 index 034a6186a4d..00000000000 --- a/openwrt/package/socat/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=socat -PKG_VERSION:=1.4.3.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=ce574e75c2fda4456e8efd4efb86ec5e - -PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.4 -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SOCAT,socat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - sc_cv_termios_ispeed="no" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --disable-libwrap \ - --disable-readline \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_SOCAT): - install -d -m0755 $(IDIR_SOCAT)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/socat $(IDIR_SOCAT)/usr/bin/ - $(RSTRIP) $(IDIR_SOCAT) - $(IPKG_BUILD) $(IDIR_SOCAT) $(PACKAGE_DIR) - diff --git a/openwrt/package/socat/ipkg/socat.control b/openwrt/package/socat/ipkg/socat.control deleted file mode 100644 index 7c079a92073..00000000000 --- a/openwrt/package/socat/ipkg/socat.control +++ /dev/null @@ -1,11 +0,0 @@ -Package: socat -Priority: optional -Section: net -Depends: libpthread, libopenssl -Description: A multipurpose relay (SOcket CAT). - SoCat (for SOcket CAT) establishes two bidirectional byte streams and - transfers data between them. - Data channels may be files, pipes, devices (terminal or modem, etc.), or - sockets (Unix, IPv4, IPv6, raw, UDP, TCP, SSL). It provides forking, - logging and tracing, different modes for interprocess communication and - many more options. diff --git a/openwrt/package/socat/patches/501-honor_ldflags.patch b/openwrt/package/socat/patches/501-honor_ldflags.patch deleted file mode 100644 index a41a929f1e8..00000000000 --- a/openwrt/package/socat/patches/501-honor_ldflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ruN socat-1.4-old/Makefile.in socat-1.4-new/Makefile.in ---- socat-1.4-old/Makefile.in 2005-09-10 22:09:11.000000000 +0200 -+++ socat-1.4-new/Makefile.in 2005-10-08 17:12:45.000000000 +0200 -@@ -36,7 +36,8 @@ - - #0 CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(INCLS) - CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(CPPFLAGS) --CLIBS = $(LIBS) -+LDFLAGS = @LDFLAGS@ -+CLIBS = $(LDFLAGS) $(LIBS) - #CLIBS = $(LIBS) -lm -lefence - XIOSRCS = xioinitialize.c xiohelp.c xioparam.c xiodiag.c xioopen.c xioopts.c \ - xiosignal.c xiosigchld.c xioread.c xiowrite.c \ diff --git a/openwrt/package/speex/Config.in b/openwrt/package/speex/Config.in deleted file mode 100644 index 2a51044650d..00000000000 --- a/openwrt/package/speex/Config.in +++ /dev/null @@ -1,23 +0,0 @@ -config BR2_COMPILE_SPEEX - tristate - default n - depends BR2_PACKAGE_LIBSPEEX - -config BR2_PACKAGE_LIBSPEEX - prompt "libspeex.......................... Open source patent-free speech compression codec" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_SPEEX - help - - Speex is an Open Source/Free Software patent-free audio compression - format designed for speech. The Speex Project aims to lower the - barrier of entry for voice applications by providing a free - alternative to expensive proprietary speech codecs. Moreover, Speex - is well-adapted to Internet applications and provides useful features - that are not present in most other codecs. - - http://www.speex.org/ - - This package contains the shared codec library, needed by other programs. - diff --git a/openwrt/package/speex/Makefile b/openwrt/package/speex/Makefile deleted file mode 100644 index 87a3de96793..00000000000 --- a/openwrt/package/speex/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=speex -PKG_VERSION:=1.1.8 -PKG_RELEASE:=1 -PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc - -PKG_SOURCE_URL:=http://us.speex.org/download -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBSPEEX,libspeex,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-oggtest \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - bin_PROGRAMS="" \ - all install - touch $@ - -$(IPKG_LIBSPEEX): - install -d -m0755 $(IDIR_LIBSPEEX)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(IDIR_LIBSPEEX)/usr/lib/ - $(RSTRIP) $(IDIR_LIBSPEEX) - $(IPKG_BUILD) $(IDIR_LIBSPEEX) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libspeex.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/speex $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libspeex.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/speex \ - $(STAGING_DIR)/usr/lib/libspeex.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/speex/ipkg/libspeex.control b/openwrt/package/speex/ipkg/libspeex.control deleted file mode 100644 index 5dc542eeee2..00000000000 --- a/openwrt/package/speex/ipkg/libspeex.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libspeex -Priority: optional -Section: libs -Description: an open source patent-free speech compression codec diff --git a/openwrt/package/sqlite/Config.in b/openwrt/package/sqlite/Config.in deleted file mode 100644 index 600a05e1544..00000000000 --- a/openwrt/package/sqlite/Config.in +++ /dev/null @@ -1,75 +0,0 @@ -config BR2_COMPILE_SQLITE - tristate - default n - depends BR2_PACKAGE_LIBSQLITE - -config BR2_PACKAGE_LIBSQLITE - prompt "libsqlite......................... Self-contained, embeddable, zero-configuration SQL database engine" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_SQLITE - select BR2_PACKAGE_LIBNCURSES - select BR2_PACKAGE_LIBREADLINE - help - SQLite is a small C library that implements a self-contained, embeddable, - zero-configuration SQL database engine. Features include: - - * Transactions are atomic, consistent, isolated, and durable (ACID) - even after system crashes and power failures. - * Zero-configuration - no setup or administration needed. - * Implements most of SQL92. (Features not supported) - * A complete database is stored in a single disk file. - * Database files can be freely shared between machines with different - byte orders. - * Supports databases up to 2 terabytes (241 bytes) in size. - * Sizes of strings and BLOBs limited only by available memory. - * Small code footprint: less than 30K lines of C code, less than 250KB - code space (gcc on i486) - * Faster than popular client/server database engines for most common - operations. - * Simple, easy to use API. - * TCL bindings included. Bindings for many other languages available - separately. - * Well-commented source code with over 95% test coverage. - * Self-contained: no external dependencies. - * Sources are in the public domain. Use for any purpose. - - http://www.sqlite.org/ - - This package contains the shared library, needed by other programs. - -config BR2_PACKAGE_SQLITE_CLI - prompt "sqlite-cli...................... Command line interface for SQLite" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBSQLITE - help - SQLite is a small C library that implements a self-contained, embeddable, - zero-configuration SQL database engine. Features include: - - * Transactions are atomic, consistent, isolated, and durable (ACID) - even after system crashes and power failures. - * Zero-configuration - no setup or administration needed. - * Implements most of SQL92. (Features not supported) - * A complete database is stored in a single disk file. - * Database files can be freely shared between machines with different - byte orders. - * Supports databases up to 2 terabytes (241 bytes) in size. - * Sizes of strings and BLOBs limited only by available memory. - * Small code footprint: less than 30K lines of C code, less than 250KB - code space (gcc on i486) - * Faster than popular client/server database engines for most common - operations. - * Simple, easy to use API. - * TCL bindings included. Bindings for many other languages available - separately. - * Well-commented source code with over 95% test coverage. - * Self-contained: no external dependencies. - * Sources are in the public domain. Use for any purpose. - - http://www.sqlite.org/ - - This package contains a terminal-based front-end to the SQLite library - that can evaluate queries interactively and display the results in - multiple formats. - diff --git a/openwrt/package/sqlite/Makefile b/openwrt/package/sqlite/Makefile deleted file mode 100644 index b505bd95663..00000000000 --- a/openwrt/package/sqlite/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sqlite -PKG_VERSION:=3.3.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=eb5d9d7e7853b3af78e767d709b7fced - -PKG_SOURCE_URL:=http://www.sqlite.org/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBSQLITE,libsqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SQLITE_CLI,sqlite-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - config_BUILD_CC="$(HOSTCC)" \ - config_BUILD_CFLAGS="-O2" \ - config_TARGET_CC="$(TARGET_CC)" \ - config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - config_TARGET_READLINE_INC="-I$(STAGING_DIR)/usr/include" \ - config_TARGET_READLINE_LIBS="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-tcl \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBSQLITE): - install -d -m0755 $(IDIR_LIBSQLITE)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(IDIR_LIBSQLITE)/usr/lib/ - $(RSTRIP) $(IDIR_LIBSQLITE) - $(IPKG_BUILD) $(IDIR_LIBSQLITE) $(PACKAGE_DIR) - -$(IPKG_SQLITE_CLI): - install -d -m0755 $(IDIR_SQLITE_CLI)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(IDIR_SQLITE_CLI)/usr/bin/ - $(RSTRIP) $(IDIR_SQLITE_CLI) - $(IPKG_BUILD) $(IDIR_SQLITE_CLI) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libsqlite3.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libsqlite3.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/sqlite3.h \ - $(STAGING_DIR)/usr/lib/libsqlite3.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/sqlite3.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/sqlite/ipkg/libsqlite.control b/openwrt/package/sqlite/ipkg/libsqlite.control deleted file mode 100644 index 4b192704262..00000000000 --- a/openwrt/package/sqlite/ipkg/libsqlite.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libsqlite -Priority: optional -Section: libs -Description: Self-contained, embeddable, zero-configuration SQL database engine diff --git a/openwrt/package/sqlite/ipkg/sqlite-cli.control b/openwrt/package/sqlite/ipkg/sqlite-cli.control deleted file mode 100644 index b70c9cf5b2a..00000000000 --- a/openwrt/package/sqlite/ipkg/sqlite-cli.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: sqlite-cli -Priority: optional -Section: libs -Description: Command Line Interface (CLI) for SQLite -Depends: libsqlite, libncurses, libreadline diff --git a/openwrt/package/sqlite2/Config.in b/openwrt/package/sqlite2/Config.in deleted file mode 100644 index 99ba351c8ac..00000000000 --- a/openwrt/package/sqlite2/Config.in +++ /dev/null @@ -1,74 +0,0 @@ -config BR2_COMPILE_SQLITE2 - tristate - default n - depends BR2_PACKAGE_LIBSQLITE2 - -config BR2_PACKAGE_LIBSQLITE2 - prompt "libsqlite2........................ Self-contained, embeddable, zero-configuration SQL database engine (v2.x)" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_SQLITE2 - select BR2_PACKAGE_LIBNCURSES - select BR2_PACKAGE_LIBREADLINE - help - SQLite is a small C library that implements a self-contained, embeddable, - zero-configuration SQL database engine. Features include: - - * Transactions are atomic, consistent, isolated, and durable (ACID) - even after system crashes and power failures. - * Zero-configuration - no setup or administration needed. - * Implements most of SQL92. (Features not supported) - * A complete database is stored in a single disk file. - * Database files can be freely shared between machines with different - byte orders. - * Supports databases up to 2 terabytes (241 bytes) in size. - * Sizes of strings and BLOBs limited only by available memory. - * Small code footprint: less than 30K lines of C code, less than 250KB - code space (gcc on i486) - * Faster than popular client/server database engines for most common - operations. - * Simple, easy to use API. - * TCL bindings included. Bindings for many other languages available - separately. - * Well-commented source code with over 95% test coverage. - * Self-contained: no external dependencies. - * Sources are in the public domain. Use for any purpose. - - http://www.sqlite.org/ - - This package contains the shared library, needed by other programs. - -config BR2_PACKAGE_SQLITE2_CLI - prompt "sqlite2-cli..................... Command line interface for SQLite (v2.x)" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBSQLITE2 - help - SQLite is a small C library that implements a self-contained, embeddable, - zero-configuration SQL database engine. Features include: - - * Transactions are atomic, consistent, isolated, and durable (ACID) - even after system crashes and power failures. - * Zero-configuration - no setup or administration needed. - * Implements most of SQL92. (Features not supported) - * A complete database is stored in a single disk file. - * Database files can be freely shared between machines with different - byte orders. - * Supports databases up to 2 terabytes (241 bytes) in size. - * Sizes of strings and BLOBs limited only by available memory. - * Small code footprint: less than 30K lines of C code, less than 250KB - code space (gcc on i486) - * Faster than popular client/server database engines for most common - operations. - * Simple, easy to use API. - * TCL bindings included. Bindings for many other languages available - separately. - * Well-commented source code with over 95% test coverage. - * Self-contained: no external dependencies. - * Sources are in the public domain. Use for any purpose. - - http://www.sqlite.org/ - - This package contains a terminal-based front-end to the SQLite library - that can evaluate queries interactively and display the results in - multiple formats. diff --git a/openwrt/package/sqlite2/Makefile b/openwrt/package/sqlite2/Makefile deleted file mode 100644 index 41a7382c960..00000000000 --- a/openwrt/package/sqlite2/Makefile +++ /dev/null @@ -1,101 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sqlite2 -PKG_VERSION:=2.8.17 -PKG_RELEASE:=1 -PKG_MD5SUM:=838dbac20b56d2c4292e98848505a05b - -PKG_SOURCE_URL:=http://www.sqlite.org/ -PKG_SOURCE:=sqlite-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/sqlite-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LIBSQLITE2,libsqlite2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SQLITE2_CLI,sqlite2-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - config_BUILD_CC="$(HOSTCC)" \ - config_BUILD_CFLAGS="-O2" \ - config_TARGET_CC="$(TARGET_CC)" \ - config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - config_TARGET_READLINE_INC="-I$(STAGING_DIR)/usr/include" \ - config_TARGET_READLINE_LIBS="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \ - config_TARGET_TCL_INC="-DNO_TCL=1" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --enable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LIBSQLITE2): - install -d -m0755 $(IDIR_LIBSQLITE2)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.so.* $(IDIR_LIBSQLITE2)/usr/lib/ - $(RSTRIP) $(IDIR_LIBSQLITE2) - $(IPKG_BUILD) $(IDIR_LIBSQLITE2) $(PACKAGE_DIR) - -$(IPKG_SQLITE2_CLI): - install -d -m0755 $(IDIR_SQLITE2_CLI)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/sqlite $(IDIR_SQLITE2_CLI)/usr/bin/ - $(RSTRIP) $(IDIR_SQLITE2_CLI) - $(IPKG_BUILD) $(IDIR_SQLITE2_CLI) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libsqlite.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.{a,so*} $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libsqlite.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/sqlite.h \ - $(STAGING_DIR)/usr/lib/libsqlite.{a,so*} \ - $(STAGING_DIR)/usr/lib/pkgconfig/sqlite.pc \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/sqlite2/ipkg/libsqlite2.control b/openwrt/package/sqlite2/ipkg/libsqlite2.control deleted file mode 100644 index 9e20474b8b9..00000000000 --- a/openwrt/package/sqlite2/ipkg/libsqlite2.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libsqlite2 -Priority: optional -Section: libs -Description: Self-contained, embeddable, zero-configuration SQL database engine (v2.x) diff --git a/openwrt/package/sqlite2/ipkg/sqlite2-cli.control b/openwrt/package/sqlite2/ipkg/sqlite2-cli.control deleted file mode 100644 index 40ea238f590..00000000000 --- a/openwrt/package/sqlite2/ipkg/sqlite2-cli.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: sqlite2-cli -Priority: optional -Section: libs -Description: Command Line Interface (CLI) for SQLite (v2.x) -Depends: libsqlite2, libncurses, libreadline diff --git a/openwrt/package/srelay/Config.in b/openwrt/package/srelay/Config.in deleted file mode 100644 index b33a47ecb40..00000000000 --- a/openwrt/package/srelay/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_SRELAY - prompt "srelay............................ A socks 4/5 proxy server" - tristate - default m if CONFIG_DEVEL - help - A socks 4/5 protocol proxy server - - http://www.c-wind.com/srelay/ - diff --git a/openwrt/package/srelay/Makefile b/openwrt/package/srelay/Makefile deleted file mode 100644 index 9dc0b9545b7..00000000000 --- a/openwrt/package/srelay/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=srelay -PKG_VERSION:=0.4.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=4a9f3298b38d8588f0ffde31b946a47f - -PKG_SOURCE_URL:=@SF/socks-relay -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -PKG_INIT_LEVEL:=60 - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SRELAY,srelay,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --disable-thread \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - all - $(CP) $(PKG_BUILD_DIR)/srelay $(PKG_INSTALL_DIR) - touch $@ - -$(IPKG_SRELAY): - install -m0755 -d $(IDIR_SRELAY)/usr/bin - install -m0755 -d $(IDIR_SRELAY)/etc/init.d - $(CP) $(PKG_INSTALL_DIR)/srelay $(IDIR_SRELAY)/usr/bin/ - $(CP) files/srelay.init $(IDIR_SRELAY)/etc/init.d/S$(PKG_INIT_LEVEL)srelay - $(CP) files/srelay.conf $(IDIR_SRELAY)/etc - chmod 755 $(IDIR_SRELAY)/etc/init.d/S$(PKG_INIT_LEVEL)srelay - $(RSTRIP) $(IDIR_SRELAY) - $(IPKG_BUILD) $(IDIR_SRELAY) $(PACKAGE_DIR) diff --git a/openwrt/package/srelay/files/srelay.conf b/openwrt/package/srelay/files/srelay.conf deleted file mode 100644 index e5d53ec966a..00000000000 --- a/openwrt/package/srelay/files/srelay.conf +++ /dev/null @@ -1,2 +0,0 @@ -# allow local subnet to access socks proxy -192.168.1.0/24 any - diff --git a/openwrt/package/srelay/files/srelay.init b/openwrt/package/srelay/files/srelay.init deleted file mode 100755 index 9e5a5f5654d..00000000000 --- a/openwrt/package/srelay/files/srelay.init +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ -f /etc/srelay.conf ];then - srelay -c /etc/srelay.conf -r -s -fi diff --git a/openwrt/package/srelay/ipkg/srelay.conffiles b/openwrt/package/srelay/ipkg/srelay.conffiles deleted file mode 100644 index d821cfd26c2..00000000000 --- a/openwrt/package/srelay/ipkg/srelay.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/srelay.conf diff --git a/openwrt/package/srelay/ipkg/srelay.control b/openwrt/package/srelay/ipkg/srelay.control deleted file mode 100644 index fdc21c86497..00000000000 --- a/openwrt/package/srelay/ipkg/srelay.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: srelay -Priority: optional -Section: net -Description: A socks 4/5 proxy server diff --git a/openwrt/package/srelay/patches/01-cross_compile.patch b/openwrt/package/srelay/patches/01-cross_compile.patch deleted file mode 100644 index cda32e6aa7b..00000000000 --- a/openwrt/package/srelay/patches/01-cross_compile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN srelay-0.4.6/configure srelay-0.4.6.new/configure ---- srelay-0.4.6/configure 2003-04-14 07:36:15.000000000 +0200 -+++ srelay-0.4.6.new/configure 2006-03-28 15:11:42.000000000 +0200 -@@ -1395,7 +1395,7 @@ - ;; - linux*) - case "$build_cpu" in -- i*86) -+ i*86 | mips* | powerpc* | sparc*) - OS=LINUX - cat >>confdefs.h <<\_ACEOF - #define LINUX 1 diff --git a/openwrt/package/ssltunnel/Config.in b/openwrt/package/ssltunnel/Config.in deleted file mode 100644 index 169c5c528c6..00000000000 --- a/openwrt/package/ssltunnel/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_SSLTUNNEL - prompt "ssltunnel ........................ A PPP over SSL vpn tool" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_PPP - help - A PPP over SSL vpn tool - - http://www.hsc.fr/ressources/outils/ssltunnel/index.html - diff --git a/openwrt/package/ssltunnel/Makefile b/openwrt/package/ssltunnel/Makefile deleted file mode 100644 index a880bd411cb..00000000000 --- a/openwrt/package/ssltunnel/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ssltunnel -PKG_VERSION:=1.15 -PKG_RELEASE:=1 -PKG_MD5SUM:=bfe529edb9b6c97bc03d213676b1f35d - -PKG_SOURCE_URL:=http://www.hsc.fr/ressources/outils/ssltunnel/download -PKG_SOURCE:=${PKG_NAME}-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SSLTUNNEL,ssltunnel,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CCOPT="$(TARGET_CFLAGS)" INCLS="-I. -I$(STAGING_DIR)/usr/include" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_SSLTUNNEL): - install -m0755 -d $(IDIR_SSLTUNNEL)/usr/bin - install -m0755 -d $(IDIR_SSLTUNNEL)/usr/sbin - install -m0755 -d $(IDIR_SSLTUNNEL)/usr/lib - install -m0755 $(PKG_INSTALL_DIR)/usr/bin/pppclient $(IDIR_SSLTUNNEL)/usr/bin/ - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppwho $(IDIR_SSLTUNNEL)/usr/sbin/ - install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppserver $(IDIR_SSLTUNNEL)/usr/lib/ - $(RSTRIP) $(IDIR_SSLTUNNEL) - $(IPKG_BUILD) $(IDIR_SSLTUNNEL) $(PACKAGE_DIR) - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/ssltunnel/ipkg/ssltunnel.control b/openwrt/package/ssltunnel/ipkg/ssltunnel.control deleted file mode 100644 index 84fb8b68a73..00000000000 --- a/openwrt/package/ssltunnel/ipkg/ssltunnel.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ssltunnel -Priority: optional -Section: net -Description: A PPP over SSL vpn tool -Depends: libopenssl, ppp diff --git a/openwrt/package/ssmtp/Config.in b/openwrt/package/ssmtp/Config.in deleted file mode 100644 index a85cc090eca..00000000000 --- a/openwrt/package/ssmtp/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_SSMTP - prompt "ssmtp............................. A minimal and secure mail sender" - tristate - default m if CONFIG_DEVEL - help - A secure, effective and simple way of getting mail off a system to your - mail hub. It contains no suid-binaries or other dangerous things - no - mail spool to poke around in, and no daemons running in the background. - Mail is simply forwarded to the configured mailhost. Extremely easy - configuration. - - http://packages.debian.org/stable/mail/ssmtp - diff --git a/openwrt/package/ssmtp/Makefile b/openwrt/package/ssmtp/Makefile deleted file mode 100644 index 3204ca8786b..00000000000 --- a/openwrt/package/ssmtp/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ssmtp -PKG_VERSION:=2.61 -PKG_RELEASE:=1 -PKG_MD5SUM:=957e6fff08625fe34f4fc33d0925bbc9 - -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/s/ssmtp/ -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -BR2_PACKAGE_SSMTP=m - -$(eval $(call PKG_template,SSMTP,ssmtp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - all - touch $@ - -$(IPKG_SSMTP): - install -m0755 -d $(IDIR_SSMTP)/etc/ssmtp - install -m0644 $(PKG_BUILD_DIR)/ssmtp.conf $(IDIR_SSMTP)/etc/ssmtp/ - install -m0644 $(PKG_BUILD_DIR)/revaliases $(IDIR_SSMTP)/etc/ssmtp/ - install -m0755 -d $(IDIR_SSMTP)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/ssmtp $(IDIR_SSMTP)/usr/sbin/ - ln -sf ssmtp $(IDIR_SSMTP)/usr/sbin/sendmail - $(RSTRIP) $(IDIR_SSMTP) - $(IPKG_BUILD) $(IDIR_SSMTP) $(PACKAGE_DIR) - diff --git a/openwrt/package/ssmtp/ipkg/ssmtp.conffiles b/openwrt/package/ssmtp/ipkg/ssmtp.conffiles deleted file mode 100644 index d1da3e17927..00000000000 --- a/openwrt/package/ssmtp/ipkg/ssmtp.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/ssmtp/ssmtp.conf -/etc/ssmtp/revaliases diff --git a/openwrt/package/ssmtp/ipkg/ssmtp.control b/openwrt/package/ssmtp/ipkg/ssmtp.control deleted file mode 100644 index ec93600595a..00000000000 --- a/openwrt/package/ssmtp/ipkg/ssmtp.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ssmtp -Priority: optional -Section: net -Description: A minimal and secure mail sender diff --git a/openwrt/package/ssmtp/patches/500-debian-subset-2.61-2.patch b/openwrt/package/ssmtp/patches/500-debian-subset-2.61-2.patch deleted file mode 100644 index f682c97a131..00000000000 --- a/openwrt/package/ssmtp/patches/500-debian-subset-2.61-2.patch +++ /dev/null @@ -1,248 +0,0 @@ ---- ssmtp-2.61.orig/ssmtp.conf -+++ ssmtp-2.61/ssmtp.conf -@@ -36,3 +36,8 @@ - - # Use this RSA certificate. - #TLSCert=/etc/ssl/certs/ssmtp.pem -+ -+# Get enhanced (*really* enhanced) debugging information in the logs -+# If you want to have debugging of the config file parsing, move this option -+# to the top of the config file and uncomment -+#Debug=YES ---- ssmtp-2.61.orig/ssmtp.c -+++ ssmtp-2.61/ssmtp.c -@@ -93,6 +93,7 @@ - static char hextab[]="0123456789abcdef"; - #endif - -+ssize_t outbytes; - - /* - log_event() -- Write event to syslog (or log file if defined) -@@ -129,7 +130,7 @@ - #endif - } - --void smtp_write(int fd, char *format, ...); -+ssize_t smtp_write(int fd, char *format, ...); - int smtp_read(int fd, char *response); - int smtp_read_all(int fd, char *response); - int smtp_okay(int fd, char *response); -@@ -150,7 +151,7 @@ - if(isatty(fileno(stdin))) { - if(log_level > 0) { - log_event(LOG_ERR, -- "stdin is a TTY - not saving to %s/dead.letter, pw->pw_dir"); -+ "stdin is a TTY - not saving to %s/dead.letter", pw->pw_dir); - } - return; - } -@@ -964,6 +965,17 @@ - log_event(LOG_INFO, "Set AuthMethod=\"%s\"\n", auth_method); - } - } -+ else if (strcasecmp(p, "Debug") == 0) -+ { -+ if (strcasecmp(q, "YES") == 0) -+ { -+ log_level = 1; -+ } -+ else -+ { -+ log_level = 0; -+ } -+ } - else { - log_event(LOG_INFO, "Unable to set %s=\"%s\"\n", p, q); - } -@@ -1232,10 +1244,11 @@ - /* - smtp_write() -- A printf to an fd and append - */ --void smtp_write(int fd, char *format, ...) -+ssize_t smtp_write(int fd, char *format, ...) - { - char buf[(BUF_SZ + 1)]; - va_list ap; -+ ssize_t outbytes = 0; - - va_start(ap, format); - if(vsnprintf(buf, (BUF_SZ - 2), format, ap) == -1) { -@@ -1252,7 +1265,9 @@ - } - (void)strcat(buf, "\r\n"); - -- (void)fd_puts(fd, buf, strlen(buf)); -+ outbytes = fd_puts(fd, buf, strlen(buf)); -+ -+ return (outbytes >= 0) ? outbytes : 0; - } - - /* -@@ -1282,6 +1297,8 @@ - int i, sock; - uid_t uid; - -+ outbytes = 0; -+ - uid = getuid(); - if((pw = getpwuid(uid)) == (struct passwd *)NULL) { - die("Could not find password entry for UID %d", uid); -@@ -1335,10 +1352,10 @@ - - /* If user supplied username and password, then try ELHO */ - if(auth_user) { -- smtp_write(sock, "EHLO %s", hostname); -+ outbytes += smtp_write(sock, "EHLO %s", hostname); - } - else { -- smtp_write(sock, "HELO %s", hostname); -+ outbytes += smtp_write(sock, "HELO %s", hostname); - } - (void)alarm((unsigned) MEDWAIT); - -@@ -1354,7 +1371,7 @@ - } - - if(strcasecmp(auth_method, "cram-md5") == 0) { -- smtp_write(sock, "AUTH CRAM-MD5"); -+ outbytes += smtp_write(sock, "AUTH CRAM-MD5"); - (void)alarm((unsigned) MEDWAIT); - - if(smtp_read(sock, buf) != 3) { -@@ -1369,7 +1386,7 @@ - #endif - memset(buf, 0, sizeof(buf)); - to64frombits(buf, auth_user, strlen(auth_user)); -- smtp_write(sock, "AUTH LOGIN %s", buf); -+ outbytes += smtp_write(sock, "AUTH LOGIN %s", buf); - - (void)alarm((unsigned) MEDWAIT); - if(smtp_read(sock, buf) != 3) { -@@ -1381,7 +1398,7 @@ - #ifdef MD5AUTH - } - #endif -- smtp_write(sock, "%s", buf); -+ outbytes += smtp_write(sock, "%s", buf); - (void)alarm((unsigned) MEDWAIT); - - if(smtp_okay(sock, buf) == False) { -@@ -1390,7 +1407,7 @@ - } - - /* Send "MAIL FROM:" line */ -- smtp_write(sock, "MAIL FROM:<%s>", uad); -+ outbytes += smtp_write(sock, "MAIL FROM:<%s>", uad); - - (void)alarm((unsigned) MEDWAIT); - -@@ -1408,7 +1425,7 @@ - - while(rt->next) { - p = rcpt_remap(rt->string); -- smtp_write(sock, "RCPT TO:<%s>", p); -+ outbytes += smtp_write(sock, "RCPT TO:<%s>", p); - - (void)alarm((unsigned)MEDWAIT); - -@@ -1425,7 +1442,7 @@ - while(p) { - /* RFC822 Address -> "foo@bar" */ - q = rcpt_remap(addr_parse(p)); -- smtp_write(sock, "RCPT TO:<%s>", q); -+ outbytes += smtp_write(sock, "RCPT TO:<%s>", q); - - (void)alarm((unsigned) MEDWAIT); - -@@ -1439,7 +1456,7 @@ - } - - /* Send DATA */ -- smtp_write(sock, "DATA"); -+ outbytes += smtp_write(sock, "DATA"); - (void)alarm((unsigned) MEDWAIT); - - if(smtp_read(sock, buf) != 3) { -@@ -1447,45 +1464,45 @@ - die("%s", buf); - } - -- smtp_write(sock, -+ outbytes += smtp_write(sock, - "Received: by %s (sSMTP sendmail emulation); %s", hostname, arpadate); - - if(have_from == False) { -- smtp_write(sock, "From: %s", from); -+ outbytes += smtp_write(sock, "From: %s", from); - } - - if(have_date == False) { -- smtp_write(sock, "Date: %s", arpadate); -+ outbytes += smtp_write(sock, "Date: %s", arpadate); - } - - #ifdef HASTO_OPTION - if(have_to == False) { -- smtp_write(sock, "To: postmaster"); -+ outbytes += smtp_write(sock, "To: postmaster"); - } - #endif - - ht = &headers; - while(ht->next) { -- smtp_write(sock, "%s", ht->string); -+ outbytes += smtp_write(sock, "%s", ht->string); - ht = ht->next; - } - - (void)alarm((unsigned) MEDWAIT); - - /* End of headers, start body */ -- smtp_write(sock, ""); -+ outbytes += smtp_write(sock, ""); - - while(fgets(buf, sizeof(buf), stdin)) { - /* Trim off \n, double leading .'s */ - standardise(buf); - -- smtp_write(sock, "%s", buf); -+ outbytes += smtp_write(sock, "%s", buf); - - (void)alarm((unsigned) MEDWAIT); - } - /* End of body */ - -- smtp_write(sock, "."); -+ outbytes += smtp_write(sock, "."); - (void)alarm((unsigned) MAXWAIT); - - if(smtp_okay(sock, buf) == 0) { -@@ -1495,11 +1512,12 @@ - /* Close conection */ - (void)signal(SIGALRM, SIG_IGN); - -- smtp_write(sock, "QUIT"); -+ outbytes += smtp_write(sock, "QUIT"); - (void)smtp_okay(sock, buf); - (void)close(sock); - -- log_event(LOG_INFO, "Sent mail for %s (%s)", from_strip(uad), buf); -+ log_event(LOG_INFO, "Sent mail for %s (%s) uid=%d username=%s outbytes=%d", -+ from_strip(uad), buf, uid, pw->pw_name, outbytes); - - return(0); - } ---- ssmtp-2.61.orig/configure.in -+++ ssmtp-2.61/configure.in -@@ -24,8 +24,8 @@ - AC_STRUCT_TM - - dnl Checks for libraries. --AC_CHECK_LIB(nsl, gethostname) --AC_CHECK_LIB(socket, socket) -+AC_SEARCH_LIBS(gethostname, nsl) -+AC_SEARCH_LIBS(socket, socket) - - dnl Checks for library functions. - AC_TYPE_SIGNAL diff --git a/openwrt/package/ssmtp/patches/901-strftime_space_padding.patch b/openwrt/package/ssmtp/patches/901-strftime_space_padding.patch deleted file mode 100644 index dd0b9b116a7..00000000000 --- a/openwrt/package/ssmtp/patches/901-strftime_space_padding.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ssmtp-2.60-old/arpadate.c ssmtp-2.60-new/arpadate.c ---- ssmtp-2.60-old/arpadate.c 2002-12-08 18:30:11.000000000 +0100 -+++ ssmtp-2.60-new/arpadate.c 2004-05-23 18:54:32.000000000 +0200 -@@ -79,7 +79,7 @@ - time_t now; - - /* RFC822 format string borrowed from GNU shellutils date.c */ -- const char *format = "%a, %_d %b %Y %H:%M:%S %z"; -+ const char *format = "%a, %d %b %Y %H:%M:%S %z"; - - now = time(NULL); - diff --git a/openwrt/package/strace/Config.in b/openwrt/package/strace/Config.in deleted file mode 100644 index 708e41aba8e..00000000000 --- a/openwrt/package/strace/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_STRACE - prompt "strace............................ System call tracer" - tristate - default m if CONFIG_DEVEL - help - A useful diagnostic, instructional, and debugging tool. - Allows you to track what system calls a program makes - while it is running. - - http://sourceforge.net/projects/strace/ - diff --git a/openwrt/package/strace/Makefile b/openwrt/package/strace/Makefile deleted file mode 100644 index d356f918add..00000000000 --- a/openwrt/package/strace/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=strace -PKG_VERSION:=4.5.11 -PKG_RELEASE:=1 -PKG_MD5SUM:=28335e15c83456a3db055a0a0efcb4fe - -PKG_SOURCE_URL:=@SF/strace -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,STRACE,strace,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) - touch $@ - -$(IPKG_STRACE): - mkdir -p $(IDIR_STRACE)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_STRACE)/usr/sbin/ - $(STRIP) $(IDIR_STRACE)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_STRACE) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/strace/ipkg/strace.control b/openwrt/package/strace/ipkg/strace.control deleted file mode 100644 index 8561e55b48e..00000000000 --- a/openwrt/package/strace/ipkg/strace.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: strace -Priority: optional -Section: net -Description: System call trace program diff --git a/openwrt/package/syslog-ng/Config.in b/openwrt/package/syslog-ng/Config.in deleted file mode 100644 index 726586142a8..00000000000 --- a/openwrt/package/syslog-ng/Config.in +++ /dev/null @@ -1,31 +0,0 @@ -config BR2_PACKAGE_SYSLOG_NG - prompt "syslog-ng......................... A powerful syslog daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOL - help - syslog-ng reads and logs messages to the system console, log - files, other machines and/or users as specified by its - configuration file. - - The configuration file is read at startup and is reread after - receipt of a hangup (HUP) signal. When reloading the - configuration file, all destination files are closed and - reopened as appropriate. For more information about the - configuration file, see syslog-ng.conf(5). - - Typically messages are sent to syslog-ng via a Unix domain - socket (/dev/log) or via UDP, to port 514 or to whatever - syslog/udp is defined to be in /etc/services. To receive - messages from the kernel, /dev/klog is opened for reading. - - Messages sent to syslog-ng should be an entire line, prefixed - by a pri- ority code in between '<' and '>'. Definititions - of the recognised values can be found in the include file - . - - syslog-ng can be configured to pass messages on to other - syslog-ng's and when doing so, it sends the message on with the - priority as a pre- fix. - - http://www.balabit.com/products/syslog_ng/ diff --git a/openwrt/package/syslog-ng/Makefile b/openwrt/package/syslog-ng/Makefile deleted file mode 100644 index 72045ae06d9..00000000000 --- a/openwrt/package/syslog-ng/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=syslog-ng -PKG_VERSION:=1.6.9 -PKG_RELEASE:=1 -PKG_MD5SUM:=5280a86b4f5c25b2ba157c8cea302cf0 - -PKG_SOURCE_URL:=http://www.balabit.com/downloads/syslog-ng/stable/src \ - http://www.balabit.com/downloads/syslog-ng/1.6/src -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -PKG_INIT_LEVEL:=60 - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,SYSLOG_NG,syslog-ng,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/libol" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libol" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --disable-dependency-tracking \ - --disable-full-static \ - --enable-tcp-wrapper \ - --with-libol="$(STAGING_DIR)/usr/bin" \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_SYSLOG_NG): - install -d -m0755 $(IDIR_SYSLOG_NG)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/syslog-ng $(IDIR_SYSLOG_NG)/usr/sbin/ - install -d -m0755 $(IDIR_SYSLOG_NG)/etc/init.d - install -m0755 ./files/syslog-ng.init $(IDIR_SYSLOG_NG)/etc/init.d/S$(PKG_INIT_LEVEL)syslog-ng - install -d -m0755 $(IDIR_SYSLOG_NG)/etc/syslog-ng - install -m0644 ./files/syslog-ng.conf $(IDIR_SYSLOG_NG)/etc/syslog-ng/ - $(RSTRIP) $(IDIR_SYSLOG_NG) - $(IPKG_BUILD) $(IDIR_SYSLOG_NG) $(PACKAGE_DIR) - diff --git a/openwrt/package/syslog-ng/files/syslog-ng.conf b/openwrt/package/syslog-ng/files/syslog-ng.conf deleted file mode 100644 index 658abead21f..00000000000 --- a/openwrt/package/syslog-ng/files/syslog-ng.conf +++ /dev/null @@ -1,16 +0,0 @@ -options { - chain_hostnames(off); - sync(0); - - # The default action of syslog-ng 1.6.0 is to log a STATS line - # to the file every 10 minutes. That's pretty ugly after a while. - # Change it to every 12 hours so you get a nice daily update of - # how many messages syslog-ng missed (0). - stats(43200); -}; - -source src { unix-stream("/dev/log"); internal(); }; - -destination messages { file("/var/log/messages"); }; - -log { source(src); destination(messages); }; diff --git a/openwrt/package/syslog-ng/files/syslog-ng.init b/openwrt/package/syslog-ng/files/syslog-ng.init deleted file mode 100755 index 40472ed3b99..00000000000 --- a/openwrt/package/syslog-ng/files/syslog-ng.init +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -syslog_start() { - [ -f /etc/syslog-ng/syslog-ng.conf ] || { - echo "/etc/syslog-ng/syslog-ng.conf does not exist !"; - exit 0; - }; - [ -d /var/run ] || mkdir -p /var/run - [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng -} - -syslog_stop() { - killall syslog-ng -} - -case "$1" in - start) - syslog_start - ;; - stop) - syslog_stop - ;; - restart) - syslog_stop - sleep 1s - syslog_start - ;; - reload) - kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null - ;; - *) - echo "Usage: $0 " - ;; -esac diff --git a/openwrt/package/syslog-ng/ipkg/syslog-ng.conffiles b/openwrt/package/syslog-ng/ipkg/syslog-ng.conffiles deleted file mode 100644 index 453ebbe668f..00000000000 --- a/openwrt/package/syslog-ng/ipkg/syslog-ng.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/syslog-ng/syslog-ng.conf diff --git a/openwrt/package/syslog-ng/ipkg/syslog-ng.control b/openwrt/package/syslog-ng/ipkg/syslog-ng.control deleted file mode 100644 index 074fff18989..00000000000 --- a/openwrt/package/syslog-ng/ipkg/syslog-ng.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: syslog-ng -Priority: optional -Section: admin -Description: A powerful syslog daemon diff --git a/openwrt/package/syslog-ng/patches/01-no_lfl.patch b/openwrt/package/syslog-ng/patches/01-no_lfl.patch deleted file mode 100644 index e17a5c6af23..00000000000 --- a/openwrt/package/syslog-ng/patches/01-no_lfl.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -urN syslog-ng-1.6.9/Makefile.in syslog-ng-1.6.9.new/Makefile.in ---- syslog-ng-1.6.9/Makefile.in 2005-11-23 09:58:28.000000000 +0100 -+++ syslog-ng-1.6.9.new/Makefile.in 2006-03-23 19:02:04.000000000 +0100 -@@ -64,7 +64,7 @@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ - LEX = @LEX@ --LEXLIB = @LEXLIB@ -+LEXLIB = - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ - LIBOBJS = @LIBOBJS@ - LIBOL_DIR = @LIBOL_DIR@ -diff -urN syslog-ng-1.6.9/configure syslog-ng-1.6.9.new/configure ---- syslog-ng-1.6.9/configure 2005-11-23 09:58:29.000000000 +0100 -+++ syslog-ng-1.6.9.new/configure 2006-03-23 21:56:43.000000000 +0100 -@@ -3160,7 +3160,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lfl $LIBS" -+LIBS="$LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -diff -urN syslog-ng-1.6.9/src/Makefile.in syslog-ng-1.6.9.new/src/Makefile.in ---- syslog-ng-1.6.9/src/Makefile.in 2005-11-23 09:58:37.000000000 +0100 -+++ syslog-ng-1.6.9.new/src/Makefile.in 2006-03-23 19:02:27.000000000 +0100 -@@ -64,7 +64,7 @@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ - LEX = @LEX@ --LEXLIB = @LEXLIB@ -+LEXLIB = - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ - LIBOBJS = @LIBOBJS@ - LIBOL_DIR = @LIBOL_DIR@ -diff -urN syslog-ng-1.6.9/src/cfg-lex.c syslog-ng-1.6.9.new/src/cfg-lex.c ---- syslog-ng-1.6.9/src/cfg-lex.c 2005-11-15 19:41:46.000000000 +0100 -+++ syslog-ng-1.6.9.new/src/cfg-lex.c 2006-03-23 19:03:25.000000000 +0100 -@@ -666,7 +666,9 @@ - #ifdef __cplusplus - extern "C" int yywrap (void ); - #else --extern int yywrap (void ); -+int yywrap (void ) { -+ return 1; -+} - #endif - #endif - diff --git a/openwrt/package/tcp_wrappers/Config.in b/openwrt/package/tcp_wrappers/Config.in deleted file mode 100644 index 455a9bc8707..00000000000 --- a/openwrt/package/tcp_wrappers/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_TCP_WRAPPERS - bool - default n - depends BR2_PACKAGE_LIBWRAP - -config BR2_PACKAGE_LIBWRAP - prompt "libwrap........................... Security wrapper library for TCP services" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_TCP_WRAPPERS - help - Security wrapper library for TCP services. - - ftp://ftp.porcupine.org/pub/security/index.html - diff --git a/openwrt/package/tcp_wrappers/Makefile b/openwrt/package/tcp_wrappers/Makefile deleted file mode 100644 index 9eb1d775334..00000000000 --- a/openwrt/package/tcp_wrappers/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tcp_wrappers -PKG_VERSION:=7.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=e6fa25f71226d090f34de3f6b122fb5a - -PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -#$(eval $(call PKG_template,LIBWRAP,libwrap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -.NOTPARALLEL: - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -j1 -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - OPT_CFLAGS="$(TARGET_CFLAGS)" \ - LIBS=-lnsl \ - NETGROUP= \ - VSYSLOG= \ - BUGS= \ - EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 \ - -Dss_family=__ss_family -Dss_len=__ss_len" \ - FACILITY=LOG_DAEMON \ - SEVERITY=LOG_INFO \ - REAL_DAEMON_DIR=/usr/sbin \ - STYLE="-DPROCESS_OPTIONS" \ - tidy all - touch $@ - -$(IPKG_LIBWRAP): - install -d -m0755 $(IDIR_LIBWRAP)/usr/lib - $(CP) $(PKG_BUILD_DIR)/shared/libwrap.so.* $(IDIR_LIBWRAP)/usr/lib/ - $(RSTRIP) $(IDIR_LIBWRAP) - $(IPKG_BUILD) $(IDIR_LIBWRAP) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libwrap.a: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_BUILD_DIR)/tcpd.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libwrap.a $(STAGING_DIR)/usr/lib/ -# $(CP) $(PKG_BUILD_DIR)/shared/libwrap.so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libwrap.a - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/tcpd.h \ - $(STAGING_DIR)/usr/lib/libwrap.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/tcp_wrappers/patches/debian-subset.patch b/openwrt/package/tcp_wrappers/patches/debian-subset.patch deleted file mode 100644 index c0c37501d51..00000000000 --- a/openwrt/package/tcp_wrappers/patches/debian-subset.patch +++ /dev/null @@ -1,936 +0,0 @@ ---- tcp-wrappers-7.6.orig/hosts_access.c -+++ tcp-wrappers-7.6/hosts_access.c -@@ -240,6 +240,26 @@ - } - } - -+/* hostfile_match - look up host patterns from file */ -+ -+static int hostfile_match(path, host) -+char *path; -+struct hosts_info *host; -+{ -+ char tok[BUFSIZ]; -+ int match = NO; -+ FILE *fp; -+ -+ if ((fp = fopen(path, "r")) != 0) { -+ while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host))) -+ /* void */ ; -+ fclose(fp); -+ } else if (errno != ENOENT) { -+ tcpd_warn("open %s: %m", path); -+ } -+ return (match); -+} -+ - /* host_match - match host name and/or address against pattern */ - - static int host_match(tok, host) -@@ -267,6 +287,8 @@ - tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */ - return (NO); - #endif -+ } else if (tok[0] == '/') { /* /file hack */ -+ return (hostfile_match(tok, host)); - } else if (STR_EQ(tok, "KNOWN")) { /* check address and name */ - char *name = eval_hostname(host); - return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name)); ---- tcp-wrappers-7.6.orig/tcpd.h -+++ tcp-wrappers-7.6/tcpd.h -@@ -4,6 +4,25 @@ - * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. - */ - -+#ifndef _TCPWRAPPERS_TCPD_H -+#define _TCPWRAPPERS_TCPD_H -+ -+/* someone else may have defined this */ -+#undef __P -+ -+/* use prototypes if we have an ANSI C compiler or are using C++ */ -+#if defined(__STDC__) || defined(__cplusplus) -+#define __P(args) args -+#else -+#define __P(args) () -+#endif -+ -+/* Need definitions of struct sockaddr_in and FILE. */ -+#include -+#include -+ -+__BEGIN_DECLS -+ - /* Structure to describe one communications endpoint. */ - - #define STRING_LENGTH 128 /* hosts, users, processes */ -@@ -25,10 +44,10 @@ - char pid[10]; /* access via eval_pid(request) */ - struct host_info client[1]; /* client endpoint info */ - struct host_info server[1]; /* server endpoint info */ -- void (*sink) (); /* datagram sink function or 0 */ -- void (*hostname) (); /* address to printable hostname */ -- void (*hostaddr) (); /* address to printable address */ -- void (*cleanup) (); /* cleanup function or 0 */ -+ void (*sink) __P((int)); /* datagram sink function or 0 */ -+ void (*hostname) __P((struct host_info *)); /* address to printable hostname */ -+ void (*hostaddr) __P((struct host_info *)); /* address to printable address */ -+ void (*cleanup) __P((struct request_info *)); /* cleanup function or 0 */ - struct netconfig *config; /* netdir handle */ - }; - -@@ -61,25 +80,30 @@ - /* Global functions. */ - - #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) --extern void fromhost(); /* get/validate client host info */ -+extern void fromhost __P((struct request_info *)); /* get/validate client host info */ - #else - #define fromhost sock_host /* no TLI support needed */ - #endif - --extern int hosts_access(); /* access control */ --extern void shell_cmd(); /* execute shell command */ --extern char *percent_x(); /* do % expansion */ --extern void rfc931(); /* client name from RFC 931 daemon */ --extern void clean_exit(); /* clean up and exit */ --extern void refuse(); /* clean up and exit */ --extern char *xgets(); /* fgets() on steroids */ --extern char *split_at(); /* strchr() and split */ --extern unsigned long dot_quad_addr(); /* restricted inet_addr() */ -+extern void shell_cmd __P((char *)); /* execute shell command */ -+extern char *percent_x __P((char *, int, char *, struct request_info *)); /* do % expansion */ -+extern void rfc931 __P((struct sockaddr_in *, struct sockaddr_in *, char *)); /* client name from RFC 931 daemon */ -+extern void clean_exit __P((struct request_info *)); /* clean up and exit */ -+extern void refuse __P((struct request_info *)); /* clean up and exit */ -+extern char *xgets __P((char *, int, FILE *)); /* fgets() on steroids */ -+extern char *split_at __P((char *, int)); /* strchr() and split */ -+extern unsigned long dot_quad_addr __P((char *)); /* restricted inet_addr() */ - - /* Global variables. */ - -+#ifdef HAVE_WEAKSYMS -+extern int allow_severity __attribute__ ((weak)); /* for connection logging */ -+extern int deny_severity __attribute__ ((weak)); /* for connection logging */ -+#else - extern int allow_severity; /* for connection logging */ - extern int deny_severity; /* for connection logging */ -+#endif -+ - extern char *hosts_allow_table; /* for verification mode redirection */ - extern char *hosts_deny_table; /* for verification mode redirection */ - extern int hosts_access_verbose; /* for verbose matching mode */ -@@ -92,9 +116,14 @@ - */ - - #ifdef __STDC__ -+extern int hosts_access(struct request_info *request); -+extern int hosts_ctl(char *daemon, char *client_name, char *client_addr, -+ char *client_user); - extern struct request_info *request_init(struct request_info *,...); - extern struct request_info *request_set(struct request_info *,...); - #else -+extern int hosts_access(); -+extern int hosts_ctl(); - extern struct request_info *request_init(); /* initialize request */ - extern struct request_info *request_set(); /* update request structure */ - #endif -@@ -117,27 +146,31 @@ - * host_info structures serve as caches for the lookup results. - */ - --extern char *eval_user(); /* client user */ --extern char *eval_hostname(); /* printable hostname */ --extern char *eval_hostaddr(); /* printable host address */ --extern char *eval_hostinfo(); /* host name or address */ --extern char *eval_client(); /* whatever is available */ --extern char *eval_server(); /* whatever is available */ -+extern char *eval_user __P((struct request_info *)); /* client user */ -+extern char *eval_hostname __P((struct host_info *)); /* printable hostname */ -+extern char *eval_hostaddr __P((struct host_info *)); /* printable host address */ -+extern char *eval_hostinfo __P((struct host_info *)); /* host name or address */ -+extern char *eval_client __P((struct request_info *)); /* whatever is available */ -+extern char *eval_server __P((struct request_info *)); /* whatever is available */ - #define eval_daemon(r) ((r)->daemon) /* daemon process name */ - #define eval_pid(r) ((r)->pid) /* process id */ - - /* Socket-specific methods, including DNS hostname lookups. */ - --extern void sock_host(); /* look up endpoint addresses */ --extern void sock_hostname(); /* translate address to hostname */ --extern void sock_hostaddr(); /* address to printable address */ -+/* look up endpoint addresses */ -+extern void sock_host __P((struct request_info *)); -+/* translate address to hostname */ -+extern void sock_hostname __P((struct host_info *)); -+/* address to printable address */ -+extern void sock_hostaddr __P((struct host_info *)); -+ - #define sock_methods(r) \ - { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } - - /* The System V Transport-Level Interface (TLI) interface. */ - - #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) --extern void tli_host(); /* look up endpoint addresses etc. */ -+extern void tli_host __P((struct request_info *)); /* look up endpoint addresses etc. */ - #endif - - /* -@@ -178,7 +211,7 @@ - * behavior. - */ - --extern void process_options(); /* execute options */ -+extern void process_options __P((char *, struct request_info *)); /* execute options */ - extern int dry_run; /* verification flag */ - - /* Bug workarounds. */ -@@ -217,3 +250,7 @@ - #define strtok my_strtok - extern char *my_strtok(); - #endif -+ -+__END_DECLS -+ -+#endif /* tcpd.h */ ---- tcp-wrappers-7.6.orig/Makefile -+++ tcp-wrappers-7.6/Makefile -@@ -1,5 +1,10 @@ -+GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h) -+ - # @(#) Makefile 1.23 97/03/21 19:27:20 - -+# unset the HOSTNAME environment variable -+HOSTNAME = -+ - what: - @echo - @echo "Usage: edit the REAL_DAEMON_DIR definition in the Makefile then:" -@@ -19,7 +24,7 @@ - @echo " generic (most bsd-ish systems with sys5 compatibility)" - @echo " 386bsd aix alpha apollo bsdos convex-ultranet dell-gcc dgux dgux543" - @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix" -- @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211" -+ @echo " linux gnu machten mips(untested) ncrsvr4 netbsd next osf power_unix_211" - @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4" - @echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2" - @echo " uts215 uxp" -@@ -43,8 +48,8 @@ - # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx - #REAL_DAEMON_DIR=/usr/etc - # --# SysV.4 Solaris 2.x OSF AIX --#REAL_DAEMON_DIR=/usr/sbin -+# SysV.4 Solaris 2.x OSF AIX Linux -+REAL_DAEMON_DIR=/usr/sbin - # - # BSD 4.4 - #REAL_DAEMON_DIR=/usr/libexec -@@ -141,10 +146,21 @@ - LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ - EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all - -+ifneq ($(GLIBC),0) -+MYLIB=-lnsl -+endif -+ - linux: - @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ -- LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ -- NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all -+ LIBS=$(MYLIB) RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \ -+ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= all \ -+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_WEAKSYMS -D_REENTRANT" -+ -+gnu: -+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ -+ LIBS=$(MYLIB) RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \ -+ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= all \ -+ EXTRA_CFLAGS="-DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT" - - # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x. - hpux hpux8 hpux9 hpux10: -@@ -391,7 +407,7 @@ - # the ones provided with this source distribution. The environ.c module - # implements setenv(), getenv(), and putenv(). - --AUX_OBJ= setenv.o -+#AUX_OBJ= setenv.o - #AUX_OBJ= environ.o - #AUX_OBJ= environ.o strcasecmp.o - -@@ -454,7 +470,8 @@ - # host name aliases. Compile with -DSOLARIS_24_GETHOSTBYNAME_BUG to work - # around this. The workaround does no harm on other Solaris versions. - --BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK -+BUGS = -+#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK - #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG - #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DSOLARIS_24_GETHOSTBYNAME_BUG - -@@ -464,7 +481,7 @@ - # If your system supports NIS or YP-style netgroups, enable the following - # macro definition. Netgroups are used only for host access control. - # --#NETGROUP= -DNETGROUP -+NETGROUP= -DNETGROUP - - ############################################################### - # System dependencies: whether or not your system has vsyslog() -@@ -491,7 +508,7 @@ - # Uncomment the next definition to turn on the language extensions - # (examples: allow, deny, banners, twist and spawn). - # --#STYLE = -DPROCESS_OPTIONS # Enable language extensions. -+STYLE = -DPROCESS_OPTIONS # Enable language extensions. - - ################################################################ - # Optional: Changing the default disposition of logfile records -@@ -514,7 +531,7 @@ - # - # The LOG_XXX names below are taken from the /usr/include/syslog.h file. - --FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use -+FACILITY= LOG_DAEMON # LOG_MAIL is what most sendmail daemons use - - # The syslog priority at which successful connections are logged. - -@@ -610,7 +627,7 @@ - # Paranoid mode implies hostname lookup. In order to disable hostname - # lookups altogether, see the next section. - --PARANOID= -DPARANOID -+#PARANOID= -DPARANOID - - ######################################## - # Optional: turning off hostname lookups -@@ -623,7 +640,7 @@ - # In order to perform selective hostname lookups, disable paranoid - # mode (see previous section) and comment out the following definition. - --HOSTNAME= -DALWAYS_HOSTNAME -+#HOSTNAME= -DALWAYS_HOSTNAME - - ############################################# - # Optional: Turning on host ADDRESS checking -@@ -649,28 +666,46 @@ - # source-routed traffic in the kernel. Examples: 4.4BSD derivatives, - # Solaris 2.x, and Linux. See your system documentation for details. - # --# KILL_OPT= -DKILL_IP_OPTIONS -+KILL_OPT= -DKILL_IP_OPTIONS - - ## End configuration options - ############################ - - # Protection against weird shells or weird make programs. - -+CC = gcc - SHELL = /bin/sh --.c.o:; $(CC) $(CFLAGS) -c $*.c -+.c.o:; $(CC) $(CFLAGS) -o $*.o -c $*.c -+ -+SOMAJOR = 0 -+SOMINOR = 7.6 -+ -+LIB = libwrap.a -+SHLIB = shared/libwrap.so.$(SOMAJOR).$(SOMINOR) -+SHLIBSOMAJ= shared/libwrap.so.$(SOMAJOR) -+SHLIBSO = shared/libwrap.so -+SHLIBFLAGS = -Lshared -lwrap - --CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ -+shared/%.o: %.c -+ $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@ -+ -+CFLAGS = -O2 -g -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ - $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ - -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ - -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ - $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ - $(VSYSLOG) $(HOSTNAME) - -+SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS) -+SHCFLAGS = -fPIC -shared -D_REENTRANT -+ - LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \ - hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \ - $(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \ - update.o misc.o diag.o percent_m.o myvsyslog.o - -+SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ)); -+ - FROM_OBJ= fromhost.o - - KIT = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \ -@@ -684,46 +719,78 @@ - refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \ - scaffold.h tcpdmatch.8 README.NIS - --LIB = libwrap.a -- --all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk -+all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB) - - # Invalidate all object files when the compiler options (CFLAGS) have changed. - - config-check: - @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; } -- @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \ -- if cmp cflags /tmp/cflags.$$$$ ; \ -- then rm /tmp/cflags.$$$$ ; \ -- else mv /tmp/cflags.$$$$ cflags ; \ -+ @set +e; echo $(CFLAGS) >cflags.new ; \ -+ if cmp cflags cflags.new ; \ -+ then rm cflags.new ; \ -+ else mv cflags.new cflags ; \ - fi >/dev/null 2>/dev/null -+ @if [ ! -d shared ]; then mkdir shared; fi - - $(LIB): $(LIB_OBJ) - rm -f $(LIB) - $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ) - -$(RANLIB) $(LIB) - --tcpd: tcpd.o $(LIB) -- $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS) -+$(SHLIB): $(SHLIB_OBJ) -+ rm -f $(SHLIB) -+ $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) -+ ln -s $(notdir $(SHLIB)) $(SHLIBSOMAJ) -+ ln -s $(notdir $(SHLIBSOMAJ)) $(SHLIBSO) -+ -+tcpd: tcpd.o $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS) - --miscd: miscd.o $(LIB) -- $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS) -+miscd: miscd.o $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ miscd.o $(SHLIBFLAGS) - --safe_finger: safe_finger.o $(LIB) -- $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS) -+safe_finger: safe_finger.o $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS) - - TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o - --tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) -- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS) -+tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS) - --try-from: try-from.o fakelog.o $(LIB) -- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS) -+try-from: try-from.o fakelog.o $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS) - - TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o - --tcpdchk: $(TCPDCHK_OBJ) $(LIB) -- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS) -+tcpdchk: $(TCPDCHK_OBJ) $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS) -+ -+install: install-lib install-bin install-dev -+ -+install-lib: -+ install -o root -g root -m 0644 $(SHLIB) ${DESTDIR}/lib/ -+ ln -s $(notdir $(SHLIB)) ${DESTDIR}/lib/$(notdir $(SHLIBSOMAJ)) -+ -+install-bin: -+ install -o root -g root -m 0755 tcpd ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0755 tcpdchk ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0755 tcpdmatch ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0755 try-from ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0755 safe_finger ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0644 tcpd.8 ${DESTDIR}/usr/share/man/man8/ -+ install -o root -g root -m 0644 tcpdchk.8 ${DESTDIR}/usr/share/man/man8/ -+ install -o root -g root -m 0644 tcpdmatch.8 ${DESTDIR}/usr/share/man/man8/ -+ install -o root -g root -m 0644 hosts_access.5 ${DESTDIR}/usr/share/man/man5/ -+ install -o root -g root -m 0644 hosts_options.5 ${DESTDIR}/usr/share/man/man5/ -+ -+install-dev: -+ ln -s /lib/$(notdir $(SHLIBSOMAJ)) ${DESTDIR}/usr/lib/$(notdir $(SHLIBSO)) -+ install -o root -g root -m 0644 hosts_access.3 ${DESTDIR}/usr/share/man/man3/ -+ install -o root -g root -m 0644 tcpd.h ${DESTDIR}/usr/include/ -+ install -o root -g root -m 0644 $(LIB) ${DESTDIR}/usr/lib/ -+ ln -s hosts_access.3 ${DESTDIR}/usr/share/man/man3/hosts_ctl.3 -+ ln -s hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_init.3 -+ ln -s hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_set.3 - - shar: $(KIT) - @shar $(KIT) -@@ -739,7 +806,8 @@ - - clean: - rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \ -- cflags -+ cflags libwrap*.so* -+ rm -rf shared - - tidy: clean - chmod -R a+r . -@@ -885,5 +953,6 @@ - update.o: mystdarg.h - update.o: tcpd.h - vfprintf.o: cflags -+weak_symbols.o: tcpd.h - workarounds.o: cflags - workarounds.o: tcpd.h ---- tcp-wrappers-7.6.orig/hosts_access.5 -+++ tcp-wrappers-7.6/hosts_access.5 -@@ -8,9 +8,9 @@ - impatient reader is encouraged to skip to the EXAMPLES section for a - quick introduction. - .PP --An extended version of the access control language is described in the --\fIhosts_options\fR(5) document. The extensions are turned on at --program build time by building with -DPROCESS_OPTIONS. -+The extended version of the access control language is described in the -+\fIhosts_options\fR(5) document. \fBNote that this language supersedes -+the meaning of \fIshell_command\fB as documented below.\fR - .PP - In the following text, \fIdaemon\fR is the the process name of a - network daemon process, and \fIclient\fR is the name and/or address of -@@ -40,7 +40,7 @@ - character. This permits you to break up long lines so that they are - easier to edit. - .IP \(bu --Blank lines or lines that begin with a `#\' character are ignored. -+Blank lines or lines that begin with a `#' character are ignored. - This permits you to insert comments and whitespace so that the tables - are easier to read. - .IP \(bu -@@ -69,26 +69,33 @@ - .SH PATTERNS - The access control language implements the following patterns: - .IP \(bu --A string that begins with a `.\' character. A host name is matched if -+A string that begins with a `.' character. A host name is matched if - the last components of its name match the specified pattern. For --example, the pattern `.tue.nl\' matches the host name --`wzv.win.tue.nl\'. -+example, the pattern `.tue.nl' matches the host name -+`wzv.win.tue.nl'. - .IP \(bu --A string that ends with a `.\' character. A host address is matched if -+A string that ends with a `.' character. A host address is matched if - its first numeric fields match the given string. For example, the --pattern `131.155.\' matches the address of (almost) every host on the -+pattern `131.155.' matches the address of (almost) every host on the - Eind\%hoven University network (131.155.x.x). - .IP \(bu --A string that begins with an `@\' character is treated as an NIS -+A string that begins with an `@' character is treated as an NIS - (formerly YP) netgroup name. A host name is matched if it is a host - member of the specified netgroup. Netgroup matches are not supported - for daemon process names or for client user names. - .IP \(bu --An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a --`net/mask\' pair. A host address is matched if `net\' is equal to the --bitwise AND of the address and the `mask\'. For example, the net/mask --pattern `131.155.72.0/255.255.254.0\' matches every address in the --range `131.155.72.0\' through `131.155.73.255\'. -+An expression of the form `n.n.n.n/m.m.m.m' is interpreted as a -+`net/mask' pair. A host address is matched if `net' is equal to the -+bitwise AND of the address and the `mask'. For example, the net/mask -+pattern `131.155.72.0/255.255.254.0' matches every address in the -+range `131.155.72.0' through `131.155.73.255'. -+.IP \(bu -+A string that begins with a `/' character is treated as a file -+name. A host name or address is matched if it matches any host name -+or address pattern listed in the named file. The file format is -+zero or more lines with zero or more host name or address patterns -+separated by whitespace. A file name pattern can be used anywhere -+a host name or address pattern can be used. - .SH WILDCARDS - The access control language supports explicit wildcards: - .IP ALL -@@ -115,19 +122,19 @@ - .ne 6 - .SH OPERATORS - .IP EXCEPT --Intended use is of the form: `list_1 EXCEPT list_2\'; this construct -+Intended use is of the form: `list_1 EXCEPT list_2'; this construct - matches anything that matches \fIlist_1\fR unless it matches - \fIlist_2\fR. The EXCEPT operator can be used in daemon_lists and in - client_lists. The EXCEPT operator can be nested: if the control --language would permit the use of parentheses, `a EXCEPT b EXCEPT c\' --would parse as `(a EXCEPT (b EXCEPT c))\'. -+language would permit the use of parentheses, `a EXCEPT b EXCEPT c' -+would parse as `(a EXCEPT (b EXCEPT c))'. - .br - .ne 6 - .SH SHELL COMMANDS - If the first-matched access control rule contains a shell command, that - command is subjected to % substitutions (see next section). - The result is executed by a \fI/bin/sh\fR child process with standard --input, output and error connected to \fI/dev/null\fR. Specify an `&\' -+input, output and error connected to \fI/dev/null\fR. Specify an `&' - at the end of the command if you do not want to wait until it has - completed. - .PP -@@ -159,7 +166,7 @@ - .IP %u - The client user name (or "unknown"). - .IP %% --Expands to a single `%\' character. -+Expands to a single `%' character. - .PP - Characters in % expansions that may confuse the shell are replaced by - underscores. -@@ -243,9 +250,9 @@ - less trustworthy. It is possible for an intruder to spoof both the - client connection and the IDENT lookup, although doing so is much - harder than spoofing just a client connection. It may also be that --the client\'s IDENT server is lying. -+the client's IDENT server is lying. - .PP --Note: IDENT lookups don\'t work with UDP services. -+Note: IDENT lookups don't work with UDP services. - .SH EXAMPLES - The language is flexible enough that different types of access control - policy can be expressed with a minimum of fuss. Although the language -@@ -285,7 +292,7 @@ - .br - ALL: .foobar.edu EXCEPT terminalserver.foobar.edu - .PP --The first rule permits access from hosts in the local domain (no `.\' -+The first rule permits access from hosts in the local domain (no `.' - in the host name) and from members of the \fIsome_netgroup\fP - netgroup. The second rule permits access from all hosts in the - \fIfoobar.edu\fP domain (notice the leading dot), with the exception of -@@ -322,8 +329,8 @@ - /etc/hosts.deny: - .in +3 - .nf --in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\ -- /usr/ucb/mail -s %d-%h root) & -+in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\ -+ /usr/bin/mail -s %d-%h root) & - .fi - .PP - The safe_finger command comes with the tcpd wrapper and should be -@@ -349,7 +356,7 @@ - capacity of an internal buffer; when an access control rule is not - terminated by a newline character; when the result of % - expansion would overflow an internal buffer; when a system call fails --that shouldn\'t. All problems are reported via the syslog daemon. -+that shouldn't. All problems are reported via the syslog daemon. - .SH FILES - .na - .nf ---- tcp-wrappers-7.6.orig/rfc931.c -+++ tcp-wrappers-7.6/rfc931.c -@@ -33,7 +33,7 @@ - - int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */ - --static jmp_buf timebuf; -+static sigjmp_buf timebuf; - - /* fsocket - open stdio stream on top of socket */ - -@@ -62,7 +62,7 @@ - static void timeout(sig) - int sig; - { -- longjmp(timebuf, sig); -+ siglongjmp(timebuf, sig); - } - - /* rfc931 - return remote user name, given socket structures */ -@@ -99,7 +99,7 @@ - * Set up a timer so we won't get stuck while waiting for the server. - */ - -- if (setjmp(timebuf) == 0) { -+ if (sigsetjmp(timebuf,1) == 0) { - signal(SIGALRM, timeout); - alarm(rfc931_timeout); - ---- tcp-wrappers-7.6.orig/tcpd.8 -+++ tcp-wrappers-7.6/tcpd.8 -@@ -94,7 +94,7 @@ - .PP - The example assumes that the network daemons live in /usr/etc. On some - systems, network daemons live in /usr/sbin or in /usr/libexec, or have --no `in.\' prefix to their name. -+no `in.' prefix to their name. - .SH EXAMPLE 2 - This example applies when \fItcpd\fR expects that the network daemons - are left in their original place. -@@ -110,26 +110,26 @@ - becomes: - .sp - .ti +5 --finger stream tcp nowait nobody /some/where/tcpd in.fingerd -+finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd - .sp - .fi - .PP - The example assumes that the network daemons live in /usr/etc. On some - systems, network daemons live in /usr/sbin or in /usr/libexec, the --daemons have no `in.\' prefix to their name, or there is no userid -+daemons have no `in.' prefix to their name, or there is no userid - field in the inetd configuration file. - .PP - Similar changes will be needed for the other services that are to be --covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8) -+covered by \fItcpd\fR. Send a `kill -HUP' to the \fIinetd\fR(8) - process to make the changes effective. AIX users may also have to --execute the `inetimp\' command. -+execute the `inetimp' command. - .SH EXAMPLE 3 - In the case of daemons that do not live in a common directory ("secret" - or otherwise), edit the \fIinetd\fR configuration file so that it - specifies an absolute path name for the process name field. For example: - .nf - .sp -- ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd -+ ntalk dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.ntalkd - .sp - .fi - .PP ---- tcp-wrappers-7.6.orig/hosts_access.3 -+++ tcp-wrappers-7.6/hosts_access.3 -@@ -3,7 +3,7 @@ - hosts_access, hosts_ctl, request_init, request_set \- access control library - .SH SYNOPSIS - .nf --#include "tcpd.h" -+#include - - extern int allow_severity; - extern int deny_severity; ---- tcp-wrappers-7.6.orig/options.c -+++ tcp-wrappers-7.6/options.c -@@ -473,6 +473,9 @@ - #ifdef LOG_CRON - "cron", LOG_CRON, - #endif -+#ifdef LOG_FTP -+ "ftp", LOG_FTP, -+#endif - #ifdef LOG_LOCAL0 - "local0", LOG_LOCAL0, - #endif ---- tcp-wrappers-7.6.orig/fix_options.c -+++ tcp-wrappers-7.6/fix_options.c -@@ -35,7 +35,12 @@ - #ifdef IP_OPTIONS - unsigned char optbuf[BUFFER_SIZE / 3], *cp; - char lbuf[BUFFER_SIZE], *lp; -+#if !defined(__GLIBC__) - int optsize = sizeof(optbuf), ipproto; -+#else /* __GLIBC__ */ -+ size_t optsize = sizeof(optbuf); -+ int ipproto; -+#endif /* __GLIBC__ */ - struct protoent *ip; - int fd = request->fd; - unsigned int opt; ---- tcp-wrappers-7.6.orig/workarounds.c -+++ tcp-wrappers-7.6/workarounds.c -@@ -163,7 +163,11 @@ - int fix_getpeername(sock, sa, len) - int sock; - struct sockaddr *sa; -+#if !defined(__GLIBC__) - int *len; -+#else /* __GLIBC__ */ -+size_t *len; -+#endif /* __GLIBC__ */ - { - int ret; - struct sockaddr_in *sin = (struct sockaddr_in *) sa; ---- tcp-wrappers-7.6.orig/socket.c -+++ tcp-wrappers-7.6/socket.c -@@ -76,7 +76,11 @@ - { - static struct sockaddr_in client; - static struct sockaddr_in server; -+#if !defined (__GLIBC__) - int len; -+#else /* __GLIBC__ */ -+ size_t len; -+#endif /* __GLIBC__ */ - char buf[BUFSIZ]; - int fd = request->fd; - -@@ -224,7 +228,11 @@ - { - char buf[BUFSIZ]; - struct sockaddr_in sin; -+#if !defined(__GLIBC__) - int size = sizeof(sin); -+#else /* __GLIBC__ */ -+ size_t size = sizeof(sin); -+#endif /* __GLIBC__ */ - - /* - * Eat up the not-yet received datagram. Some systems insist on a ---- tcp-wrappers-7.6.orig/safe_finger.c -+++ tcp-wrappers-7.6/safe_finger.c -@@ -26,21 +26,24 @@ - #include - #include - #include -+#include - - extern void exit(); - - /* Local stuff */ - --char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin"; -+char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin"; - - #define TIME_LIMIT 60 /* Do not keep listinging forever */ - #define INPUT_LENGTH 100000 /* Do not keep listinging forever */ - #define LINE_LENGTH 128 /* Editors can choke on long lines */ - #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */ - #define UNPRIV_NAME "nobody" /* Preferred privilege level */ --#define UNPRIV_UGID 32767 /* Default uid and gid */ -+#define UNPRIV_UGID 65534 /* Default uid and gid */ - - int finger_pid; -+int allow_severity = SEVERITY; -+int deny_severity = LOG_WARNING; - - void cleanup(sig) - int sig; ---- tcp-wrappers-7.6.orig/hosts_options.5 -+++ tcp-wrappers-7.6/hosts_options.5 -@@ -58,12 +58,12 @@ - Execute, in a child process, the specified shell command, after - performing the % expansions described in the hosts_access(5) - manual page. The command is executed with stdin, stdout and stderr --connected to the null device, so that it won\'t mess up the -+connected to the null device, so that it won't mess up the - conversation with the client host. Example: - .sp - .nf - .ti +3 --spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) & -+spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) & - .fi - .sp - executes, in a background child process, the shell command "safe_finger ---- tcp-wrappers-7.6.orig/tcpdchk.c -+++ tcp-wrappers-7.6/tcpdchk.c -@@ -350,6 +350,8 @@ - { - if (pat[0] == '@') { - tcpd_warn("%s: daemon name begins with \"@\"", pat); -+ } else if (pat[0] == '/') { -+ tcpd_warn("%s: daemon name begins with \"/\"", pat); - } else if (pat[0] == '.') { - tcpd_warn("%s: daemon name begins with dot", pat); - } else if (pat[strlen(pat) - 1] == '.') { -@@ -382,6 +384,8 @@ - { - if (pat[0] == '@') { /* @netgroup */ - tcpd_warn("%s: user name begins with \"@\"", pat); -+ } else if (pat[0] == '/') { -+ tcpd_warn("%s: user name begins with \"/\"", pat); - } else if (pat[0] == '.') { - tcpd_warn("%s: user name begins with dot", pat); - } else if (pat[strlen(pat) - 1] == '.') { -@@ -402,8 +406,13 @@ - static int check_host(pat) - char *pat; - { -+ char buf[BUFSIZ]; - char *mask; - int addr_count = 1; -+ FILE *fp; -+ struct tcpd_context saved_context; -+ char *cp; -+ char *wsp = " \t\r\n"; - - if (pat[0] == '@') { /* @netgroup */ - #ifdef NO_NETGRENT -@@ -422,6 +431,21 @@ - tcpd_warn("netgroup support disabled"); - #endif - #endif -+ } else if (pat[0] == '/') { /* /path/name */ -+ if ((fp = fopen(pat, "r")) != 0) { -+ saved_context = tcpd_context; -+ tcpd_context.file = pat; -+ tcpd_context.line = 0; -+ while (fgets(buf, sizeof(buf), fp)) { -+ tcpd_context.line++; -+ for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp)) -+ check_host(cp); -+ } -+ tcpd_context = saved_context; -+ fclose(fp); -+ } else if (errno != ENOENT) { -+ tcpd_warn("open %s: %m", pat); -+ } - } else if (mask = split_at(pat, '/')) { /* network/netmask */ - if (dot_quad_addr(pat) == INADDR_NONE - || dot_quad_addr(mask) == INADDR_NONE) ---- tcp-wrappers-7.6.orig/percent_m.c -+++ tcp-wrappers-7.6/percent_m.c -@@ -13,7 +13,7 @@ - #include - - extern int errno; --#ifndef SYS_ERRLIST_DEFINED -+#if !defined(SYS_ERRLIST_DEFINED) && !defined(HAVE_STRERROR) - extern char *sys_errlist[]; - extern int sys_nerr; - #endif -@@ -29,11 +29,15 @@ - - while (*bp = *cp) - if (*cp == '%' && cp[1] == 'm') { -+#ifdef HAVE_STRERROR -+ strcpy(bp, strerror(errno)); -+#else - if (errno < sys_nerr && errno > 0) { - strcpy(bp, sys_errlist[errno]); - } else { - sprintf(bp, "Unknown error %d", errno); - } -+#endif - bp += strlen(bp); - cp += 2; - } else { ---- tcp-wrappers-7.6.orig/scaffold.c -+++ tcp-wrappers-7.6/scaffold.c -@@ -180,10 +180,12 @@ - - /* ARGSUSED */ - --void rfc931(request) --struct request_info *request; -+void rfc931(rmt_sin, our_sin, dest) -+struct sockaddr_in *rmt_sin; -+struct sockaddr_in *our_sin; -+char *dest; - { -- strcpy(request->user, unknown); -+ strcpy(dest, unknown); - } - - /* check_path - examine accessibility */ ---- tcp-wrappers-7.6.orig/weak_symbols.c -+++ tcp-wrappers-7.6/weak_symbols.c -@@ -0,0 +1,11 @@ -+ /* -+ * @(#) weak_symbols.h 1.5 99/12/29 23:50 -+ * -+ * Author: Anthony Towns -+ */ -+ -+#ifdef HAVE_WEAKSYMS -+#include -+int deny_severity = LOG_WARNING; -+int allow_severity = SEVERITY; -+#endif diff --git a/openwrt/package/tcp_wrappers/patches/opt_cflags.patch b/openwrt/package/tcp_wrappers/patches/opt_cflags.patch deleted file mode 100644 index 7b763339385..00000000000 --- a/openwrt/package/tcp_wrappers/patches/opt_cflags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- tcp_wrappers_7.6/Makefile.orig 2005-05-21 18:11:32.000000000 +0200 -+++ tcp_wrappers_7.6/Makefile 2005-05-21 18:14:28.000000000 +0200 -@@ -689,7 +689,8 @@ - shared/%.o: %.c - $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@ - --CFLAGS = -O2 -g -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ -+OPT_CFLAGS = -O2 -g -+CFLAGS = $(OPT_CFLAGS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ - $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ - -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ - -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ diff --git a/openwrt/package/tcpdump/Config.in b/openwrt/package/tcpdump/Config.in deleted file mode 100644 index 1e32c604f5d..00000000000 --- a/openwrt/package/tcpdump/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_TCPDUMP - prompt "tcpdump........................... Network monitoring and data acquisition tool" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPCAP - help - A tool for network monitoring and data acquisition. - - http://www.tcpdump.org/ - diff --git a/openwrt/package/tcpdump/Makefile b/openwrt/package/tcpdump/Makefile deleted file mode 100644 index b19c0efe4ed..00000000000 --- a/openwrt/package/tcpdump/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tcpdump -PKG_VERSION:=3.9.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=4b64755bbc8ba1af49c747271a6df5b8 - -PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \ - http://ftp.gwdg.de/pub/misc/tcpdump/ \ - http://www.at.tcpdump.org/ \ - http://www.br.tcpdump.org/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,TCPDUMP,tcpdump,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_linux_vers=2 \ - td_cv_buggygetaddrinfo="no" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --enable-shared \ - --disable-static \ - --enable-ipv6 \ - --without-crypto \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CCOPT="$(TARGET_CFLAGS)" INCLS="-I. -I$(STAGING_DIR)/usr/include" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_TCPDUMP): - install -m0755 -d $(IDIR_TCPDUMP)/usr/sbin - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(IDIR_TCPDUMP)/usr/sbin/ - $(RSTRIP) $(IDIR_TCPDUMP) - $(IPKG_BUILD) $(IDIR_TCPDUMP) $(PACKAGE_DIR) diff --git a/openwrt/package/tcpdump/ipkg/tcpdump.control b/openwrt/package/tcpdump/ipkg/tcpdump.control deleted file mode 100644 index ca3616976fb..00000000000 --- a/openwrt/package/tcpdump/ipkg/tcpdump.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: tcpdump -Priority: optional -Section: net -Description: A tool for network monitoring and data acquisition. -Depends: libpcap diff --git a/openwrt/package/tcpdump/patches/remove-pcap-debug.patch b/openwrt/package/tcpdump/patches/remove-pcap-debug.patch deleted file mode 100644 index d8993f057aa..00000000000 --- a/openwrt/package/tcpdump/patches/remove-pcap-debug.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urN tcpdump-3.9.4.orig/tcpdump.c tcpdump-3.9.4/tcpdump.c ---- tcpdump-3.9.4.orig/tcpdump.c 2005-08-23 12:29:41.000000000 +0200 -+++ tcpdump-3.9.4/tcpdump.c 2006-02-05 17:52:37.000000000 +0100 -@@ -762,20 +762,6 @@ - error("invalid data link type %s", gndo->ndo_dltname); - break; - --#if defined(HAVE_PCAP_DEBUG) || defined(HAVE_YYDEBUG) -- case 'Y': -- { -- /* Undocumented flag */ --#ifdef HAVE_PCAP_DEBUG -- extern int pcap_debug; -- pcap_debug = 1; --#else -- extern int yydebug; -- yydebug = 1; --#endif -- } -- break; --#endif - case 'Z': - if (optarg) { - username = strdup(optarg); diff --git a/openwrt/package/tinc/Config.in b/openwrt/package/tinc/Config.in deleted file mode 100644 index 59c245fe130..00000000000 --- a/openwrt/package/tinc/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_TINC - prompt "tinc.............................. VPN tunneling daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_TUN - select BR2_PACKAGE_LIBLZO - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - A VPN tunneling daemon - - http://www.tinc-vpn.org/ - diff --git a/openwrt/package/tinc/Makefile b/openwrt/package/tinc/Makefile deleted file mode 100644 index 912fcc3db00..00000000000 --- a/openwrt/package/tinc/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tinc -PKG_VERSION:=1.0.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=63887373dd763f8d90cecc5a3616c363 - -PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages \ - http://ftp.yi.se/pub/tinc/ \ - http://www.mirrors.wiretapped.net/security/network-security/tinc/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,TINC,tinc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --with-kernel=$(LINUX_DIR) \ - --with-zlib=$(STAGING_DIR)/usr/ \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_TINC): - install -m0755 -d $(IDIR_TINC)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tincd $(IDIR_TINC)/usr/sbin/ - $(RSTRIP) $(IDIR_TINC) - $(IPKG_BUILD) $(IDIR_TINC) $(PACKAGE_DIR) - diff --git a/openwrt/package/tinc/ipkg/tinc.control b/openwrt/package/tinc/ipkg/tinc.control deleted file mode 100644 index df0d1386181..00000000000 --- a/openwrt/package/tinc/ipkg/tinc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: tinc -Priority: optional -Section: net -Description: VPN tunnel daemon -Depends: zlib, liblzo, libopenssl, kmod-tun diff --git a/openwrt/package/tinyproxy/Config.in b/openwrt/package/tinyproxy/Config.in deleted file mode 100644 index 53c0176ce02..00000000000 --- a/openwrt/package/tinyproxy/Config.in +++ /dev/null @@ -1,30 +0,0 @@ -menu "tinyproxy......................... Tinyproxy is a lightweight HTTP and HTTPS proxy." - -config BR2_PACKAGE_TINYPROXY - prompt "tinyproxy......................... Tinyproxy is a lightweight HTTP and HTTPS proxy" - tristate - default m if CONFIG_DEVEL - help - Tinyproxy is a lightweight HTTP and HTTPS proxy. - - http://tinyproxy.sourceforge.net - -config BR2_COMPILE_TINYPROXY_WITH_TRANSPARENT_PROXY - prompt "Enable transparent proxying" - bool - default y - depends BR2_PACKAGE_TINYPROXY - -config BR2_COMPILE_TINYPROXY_WITH_FILTER - prompt "Enable filtering support" - bool - default y - depends BR2_PACKAGE_TINYPROXY - -config BR2_COMPILE_TINYPROXY_WITH_UPSTREAM - prompt "Enable upstream support" - bool - default y - depends BR2_PACKAGE_TINYPROXY - -endmenu diff --git a/openwrt/package/tinyproxy/Makefile b/openwrt/package/tinyproxy/Makefile deleted file mode 100644 index 3f2173ac486..00000000000 --- a/openwrt/package/tinyproxy/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tinyproxy -PKG_VERSION:=1.6.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=bd14d029b12621bcfd7ee71b2f4893da - -PKG_SOURCE_URL:=@SF/tinyproxy -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,TINYPROXY,tinyproxy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -ifeq ($(BR2_COMPILE_TINYPROXY_WITH_TRANSPARENT_PROXY),y) -ENABLE_TRANSPARENT:=--enable-transparent-proxy -endif -ifneq ($(BR2_COMPILE_TINYPROXY_WITH_UPSTREAM),y) -DISABLE_UPSTREAM:=--disable-upstream -endif -ifneq ($(BR2_COMPILE_TINYPROXY_WITH_FILTER),y) -DISABLE_FILTER:=--disable-filter -endif - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - --disable-static \ - $(ENABLE_TRANSPARENT) \ - $(DISABLE_UPSTREAM) \ - $(DISABLE_FILTER) \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - find $(PKG_INSTALL_DIR) -name '*dist' | xargs rm -f - touch $(PKG_BUILD_DIR)/.built - -$(IPKG_TINYPROXY): - install -d -m0755 $(IDIR_TINYPROXY)/usr/sbin \ - $(IDIR_TINYPROXY)/etc/tinyproxy \ - $(IDIR_TINYPROXY)/etc/init.d \ - $(IDIR_TINYPROXY)/var/log \ - $(IDIR_TINYPROXY)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tinyproxy $(IDIR_TINYPROXY)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/tinyproxy $(IDIR_TINYPROXY)/usr/share/ - $(CP) $(PKG_INSTALL_DIR)/etc/tinyproxy $(IDIR_TINYPROXY)/etc/ - $(CP) files/$(PKG_NAME).init $(IDIR_TINYPROXY)/etc/init.d/$(PKG_NAME) - $(RSTRIP) $(IDIR_TINYPROXY) - $(IPKG_BUILD) $(IDIR_TINYPROXY) $(PACKAGE_DIR) diff --git a/openwrt/package/tinyproxy/files/tinyproxy.init b/openwrt/package/tinyproxy/files/tinyproxy.init deleted file mode 100755 index 3830d95a4d4..00000000000 --- a/openwrt/package/tinyproxy/files/tinyproxy.init +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -NAME=tinyproxy -DESC="Tiny HTTP and HTTPS proxy" -case "$1" in - start) - if [ -e /var/run/$NAME.pid ]; then - echo "$DESC: $NAME already started." - exit 0 - fi - echo -n "Starting $DESC: $NAME" - test -e /var/run/$NAME.pid || touch /var/run/$NAME.pid - /usr/sbin/$NAME - echo "." - ;; - - stop) - if [ ! -e /var/run/$NAME.pid ]; then - echo "$DESC: $NAME is not running." - exit 0 - fi - echo -n "Stopping $DESC: $NAME" - killall $NAME - rm -f /var/run/$NAME.pid - - echo "." - ;; - - restart|force-reload) - if [ ! -e /var/run/$NAME.pid ]; then - $0 start - exit 0 - fi - echo -n "Restarting $DESC: $NAME" - killall $NAME - sleep 1 -/usr/sbin/$NAME - echo "." - ;; - - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; - -esac - -exit 0 \ No newline at end of file diff --git a/openwrt/package/tinyproxy/ipkg/tinyproxy.control b/openwrt/package/tinyproxy/ipkg/tinyproxy.control deleted file mode 100644 index 821b927e4c3..00000000000 --- a/openwrt/package/tinyproxy/ipkg/tinyproxy.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: tinyproxy -Version: 1.6.3 -Section: net -Description: Tinyproxy is a lightweight HTTP and HTTPS proxy. -Priority: optional diff --git a/openwrt/package/tmsnc/Config.in b/openwrt/package/tmsnc/Config.in deleted file mode 100644 index 0ebe5135efa..00000000000 --- a/openwrt/package/tmsnc/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_TMSNC - tristate "tmsnc............................. text-based MSN client" - default m if CONFIG_DEVEL - help - TMSNC is a textbased (console) MSN client written in C. - - http://tmsnc.sourceforge.net diff --git a/openwrt/package/tmsnc/Makefile b/openwrt/package/tmsnc/Makefile deleted file mode 100644 index 32098d00014..00000000000 --- a/openwrt/package/tmsnc/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=tmsnc -PKG_VERSION:=0.3.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=3b30e5dab0b1b679d2b945c3a5713636 -PKG_SOURCE_URL:=@SF/tmsnc -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,TMSNC,tmsnc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - ac_cv_func_malloc_0_nonnull=yes \ - ac_cv_func_realloc_0_nonnull=yes \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - --with-libiconv-prefix=$(STAGING_DIR)/usr \ - --with-openssl=$(STAGING_DIR)/usr \ - --with-ncurses=$(STAGING_DIR) \ - --with-gnu-ld \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - rm -rf $(PKG_INSTALL_DIR)/usr/man - touch $@ - -$(IPKG_TMSNC): - mkdir -p $(IDIR_TMSNC) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_TMSNC)/ - $(RSTRIP) $(IDIR_TMSNC) - $(IPKG_BUILD) $(IDIR_TMSNC) $(PACKAGE_DIR) diff --git a/openwrt/package/tmsnc/ipkg/tmsnc.control b/openwrt/package/tmsnc/ipkg/tmsnc.control deleted file mode 100644 index 065ed43f88f..00000000000 --- a/openwrt/package/tmsnc/ipkg/tmsnc.control +++ /dev/null @@ -1,9 +0,0 @@ -Package: tmsnc -Priority: optional -Section: net -Maintainer: Florian Fainelli -Source: http://tmsnc.sourceforge.net -Priority: optional -Section: net -Description: TMSNC is a textbased (console) MSN client written in C. TMSNC should work on most Unix (Linux, BSD, MacOS) compatible operating systems. The goal of this project is to create a client like MSN Messenger (with sound, webcam and file transfer support), but without any graphical features. -Depends: libncurses, libopenssl diff --git a/openwrt/package/tor/Config.in b/openwrt/package/tor/Config.in deleted file mode 100644 index aa0ac5c9d2b..00000000000 --- a/openwrt/package/tor/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -config BR2_PACKAGE_TOR - prompt "tor............................... An anonymous Internet communication system" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBEVENT - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_LIBPTHREAD - select BR2_PACKAGE_ZLIB - help - Tor is a toolset for a wide range of organizations and people that want - to improve their safety and security on the Internet. Using Tor can - help you anonymize web browsing and publishing, instant messaging, - IRC, SSH, and more. Tor also provides a platform on which software - developers can build new applications with built-in anonymity, safety, - and privacy features. - - http://tor.eff.org/ - diff --git a/openwrt/package/tor/Makefile b/openwrt/package/tor/Makefile deleted file mode 100644 index 40d239b28d5..00000000000 --- a/openwrt/package/tor/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tor -PKG_VERSION:=0.1.0.17 -PKG_RELEASE:=1 -PKG_MD5SUM:=83c4afe29fa82473afcb2ec7e17771b9 - -PKG_SOURCE_URL:=http://tor.eff.org/dist/ \ - http://ftp.se.linux.org/crypto/tor/ \ - http://tor.meulie.net/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,TOR,tor,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_libevent_normal=yes \ - ac_cv_openssldir="$(STAGING_DIR)/usr" \ - tor_cv_null_is_zero=yes \ - tor_cv_unaligned_ok=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/sbin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS) -Wall" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_TOR): - install -d -m0755 $(IDIR_TOR)/etc/init.d - install -m0755 ./files/tor.init $(IDIR_TOR)/etc/init.d/tor - install -d -m0755 $(IDIR_TOR)/etc/tor - install -m0644 ./files/torrc $(IDIR_TOR)/etc/tor/torrc - install -d -m0755 $(IDIR_TOR)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tor $(IDIR_TOR)/usr/sbin/ - $(RSTRIP) $(IDIR_TOR) - $(IPKG_BUILD) $(IDIR_TOR) $(PACKAGE_DIR) - diff --git a/openwrt/package/tor/files/tor.init b/openwrt/package/tor/files/tor.init deleted file mode 100644 index 8eb2db49f99..00000000000 --- a/openwrt/package/tor/files/tor.init +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -BIN=tor -DEFAULT=/etc/default/$BIN -LOG_D=/var/log/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - mkdir -p $LOG_D - mkdir -p $RUN_D - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/tor/files/torrc b/openwrt/package/tor/files/torrc deleted file mode 100644 index e5cf75b6e12..00000000000 --- a/openwrt/package/tor/files/torrc +++ /dev/null @@ -1,136 +0,0 @@ -## Configuration file for a typical tor user -## Built for Tor version 0.1.0.8-rc -## (May or may not work for older or newer versions of Tor.) -# -# On Unix, Tor will look for this file in someplace like "~/.tor/torrc" or -# "/etc/torrc" -# -# On Windows, Tor will look for the configuration file in someplace like -# "Application Data\tor\torrc" or "Application Data\\tor\torrc" -# -# With the default Mac OS X installer, Tor will look in ~/.tor/torrc or -# /Library/Tor/torrc - - -## Replace this with "SocksPort 0" if you plan to run Tor only as a -## server, and not make any local application connections yourself. -SocksPort 9050 # what port to open for local application connections -SocksBindAddress 127.0.0.1 # accept connections only from localhost -#SocksBindAddress 192.168.0.1:9100 # listen on a chosen IP/port too - -## Entry policies to allow/deny SOCKS requests based on IP address. -## First entry that matches wins. If no SocksPolicy is set, we accept -## all (and only) requests from SocksBindAddress. -#SocksPolicy accept 192.168.0.1/16 -#SocksPolicy reject * - -## Allow no-name routers (ones that the dirserver operators don't -## know anything about) in only these positions in your circuits. -## Other choices (not advised) are entry,exit,introduction. -AllowUnverifiedNodes middle,rendezvous - -## Logs go to stdout at level "notice" unless redirected by something -## else, like one of the below lines. You can have as many log lines as -## you want. -## -## Send all messages of level 'notice' or higher to /var/log/tor/notices.log -#Log notice file /var/log/tor/notices.log -## Send only debug and info messages to /var/log/tor/debug.log -#Log debug-info file /var/log/tor/debug.log -## Send ONLY debug messages to /var/log/tor/debug.log -#Log debug-debug file /var/log/tor/debug.log -## To use the system log instead of Tor's logfiles, uncomment these lines: -#Log notice syslog -## To send all messages to stderr: -#Log debug stderr - -## Uncomment this to start the process in the background... or use -## --runasdaemon 1 on the command line. -RunAsDaemon 1 - -## Tor only trusts directories signed with one of these keys, and -## uses the given addresses to connect to the trusted directory -## servers. If no DirServer lines are specified, Tor uses the built-in -## defaults (moria1, moria2, tor26), so you can leave this alone unless -## you need to change it. -#DirServer 18.244.0.188:9031 FFCB 46DB 1339 DA84 674C 70D7 CB58 6434 C437 0441 -#DirServer 18.244.0.114:80 719B E45D E224 B607 C537 07D0 E214 3E2D 423E 74CF -#DirServer 62.116.124.106:9030 847B 1F85 0344 D787 6491 A548 92F9 0493 4E4E B85D - -## The directory for keeping all the keys/etc. By default, we store -## things in $HOME/.tor on Unix, and in Application Data\tor on Windows. -#DataDirectory /var/lib/tor - -## The port on which Tor will listen for local connections from Tor controller -## applications, as documented in control-spec.txt. NB: this feature is -## currently experimental. -#ControlPort 9051 - -############### This section is just for location-hidden services ### - -## Look in .../hidden_service/hostname for the address to tell people. -## HiddenServicePort x y:z says to redirect a port x request from the -## client to y:z. - -#HiddenServiceDir /var/lib/tor/hidden_service/ -#HiddenServicePort 80 127.0.0.1:80 - -#HiddenServiceDir /var/lib/tor/other_hidden_service/ -#HiddenServicePort 80 127.0.0.1:80 -#HiddenServicePort 22 127.0.0.1:22 -#HiddenServiceNodes moria1,moria2 -#HiddenServiceExcludeNodes bad,otherbad - -################ This section is just for servers ##################### - -## NOTE: If you enable these, you should consider mailing your identity -## key fingerprint to the tor-ops, so we can add you to the list of -## servers that clients will trust. See -## http://tor.eff.org/doc/tor-doc.html#server for details. - -## Required: A unique handle for this server -#Nickname ididnteditheconfig - -## The IP or fqdn for this server. Leave blank and Tor will guess. -#Address noname.example.com - -## Contact info that will be published in the directory, so we can -## contact you if you need to upgrade or if something goes wrong. -## This is optional but recommended. -#ContactInfo Random Person -## You might also include your PGP or GPG fingerprint if you have one: -#ContactInfo 1234D/FFFFFFFF Random Person - -## Required: what port to advertise for tor connections -#ORPort 9001 -## If you want to listen on a port other than the one advertised -## in ORPort (e.g. to advertise 443 but bind to 9090), uncomment -## the line below. You'll need to do ipchains or other port forwarding -## yourself to make this work. -#ORBindAddress 0.0.0.0:9090 - -## Uncomment this to mirror the directory for others (please do) -#DirPort 9030 # what port to advertise for directory connections -## If you want to listen on a port other than the one advertised -## in DirPort (e.g. to advertise 80 but bind 9091), uncomment the line -## below. You'll need to do ipchains or other port forwarding yourself -## to make this work. -#DirBindAddress 0.0.0.0:9091 - -## A comma-separated list of exit policies. They're considered first -## to last, and the first match wins. If you want to *replace* -## the default exit policy, end this with either a reject *:* or an -## accept *:*. Otherwise, you're *augmenting* (prepending to) the -## default exit policy. Leave commented to just use the default, which is -## available in the man page or at http://tor.eff.org/documentation.html -## -## Look at http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#Abuse -## for issues you might encounter if you use the default exit policy. -## -#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports but no more -#ExitPolicy accept *:119 # accept nntp as well as default exit policy -#ExitPolicy reject *:* # middleman only -- no exits allowed - -User tor -Group tor -PidFile /var/run/tor.pid diff --git a/openwrt/package/tor/ipkg/tor.conffiles b/openwrt/package/tor/ipkg/tor.conffiles deleted file mode 100644 index 2954287e676..00000000000 --- a/openwrt/package/tor/ipkg/tor.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/tor/torrc diff --git a/openwrt/package/tor/ipkg/tor.control b/openwrt/package/tor/ipkg/tor.control deleted file mode 100644 index bd1f79cbed5..00000000000 --- a/openwrt/package/tor/ipkg/tor.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: tor -Priority: optional -Section: net -Description: An anonymous Internet communication system -Depends: libevent, libopenssl, libpthread, zlib diff --git a/openwrt/package/tor/ipkg/tor.postinst b/openwrt/package/tor/ipkg/tor.postinst deleted file mode 100644 index e52e8a5596e..00000000000 --- a/openwrt/package/tor/ipkg/tor.postinst +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -name=tor -id=52 - -# do not change below -# check if we are on real system -if [ -z "${IPKG_INSTROOT}" ]; then - # create copies of passwd and group, if we use squashfs - rootfs=`mount |awk '/root/ { print $5 }'` - if [ "$rootfs" = "squashfs" ]; then - if [ -h /etc/group ]; then - rm /etc/group - cp /rom/etc/group /etc/group - fi - if [ -h /etc/passwd ]; then - rm /etc/passwd - cp /rom/etc/passwd /etc/passwd - fi - fi -fi - -echo "" -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/group)" ]; then - echo "adding group $name to /etc/group" - echo "${name}:x:${id}:" >> ${IPKG_INSTROOT}/etc/group -fi - -if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/passwd)" ]; then - echo "adding user $name to /etc/passwd" - echo "${name}:x:${id}:${id}:${name}:/tmp/.${name}:/bin/false" >> ${IPKG_INSTROOT}/etc/passwd -fi - diff --git a/openwrt/package/ttcp/Config.in b/openwrt/package/ttcp/Config.in deleted file mode 100644 index d4b81a1989d..00000000000 --- a/openwrt/package/ttcp/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_TTCP - prompt "ttcp.............................. A TCP connection performance tester" - tristate - default m if CONFIG_DEVEL - help - A small utility to test TCP connection performance - diff --git a/openwrt/package/ttcp/Makefile b/openwrt/package/ttcp/Makefile deleted file mode 100644 index 6591482e97f..00000000000 --- a/openwrt/package/ttcp/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ttcp -PKG_VERSION:=3.8 -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/ttcp - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,TTCP,ttcp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/ttcp ttcp.c - touch $@ - -$(IPKG_TTCP): - install -d -m0755 $(IDIR_TTCP)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ttcp $(IDIR_TTCP)/usr/bin/ - $(RSTRIP) $(IDIR_TTCP) - $(IPKG_BUILD) $(IDIR_TTCP) $(PACKAGE_DIR) diff --git a/openwrt/package/ttcp/ipkg/ttcp.control b/openwrt/package/ttcp/ipkg/ttcp.control deleted file mode 100644 index ebcbbbdf4a9..00000000000 --- a/openwrt/package/ttcp/ipkg/ttcp.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ttcp -Priority: optional -Section: net -Description: A small utility to test TCP connection performance diff --git a/openwrt/package/ttcp/ttcp.c b/openwrt/package/ttcp/ttcp.c deleted file mode 100644 index 7233ace9907..00000000000 --- a/openwrt/package/ttcp/ttcp.c +++ /dev/null @@ -1,2374 +0,0 @@ -/* - * T T C P . C - * - * Test TCP connection. Makes a connection on port 5010 - * and transfers fabricated buffers or data copied from stdin. - * - * Usable on 4.2, 4.3, and 4.1a systems by defining one of - * BSD42 BSD43 (BSD41a) - * Machines using System V with BSD sockets should define SYSV. - * - * Modified for operation under 4.2BSD, 18 Dec 84 - * T.C. Slattery, USNA - * Minor improvements, Mike Muuss and Terry Slattery, 16-Oct-85. - * Modified in 1989 at Silicon Graphics, Inc. - * catch SIGPIPE to be able to print stats when receiver has died - * for tcp, don't look for sentinel during reads to allow small transfers - * increased default buffer size to 8K, nbuf to 2K to transfer 16MB - * moved default port to 5001, beyond IPPORT_USERRESERVED - * make sinkmode default because it is more popular, - * -s now means don't sink/source - * count number of read/write system calls to see effects of - * blocking from full socket buffers - * for tcp, -D option turns off buffered writes (sets TCP_NODELAY sockopt) - * buffer alignment options, -A and -O - * print stats in a format that's a bit easier to use with grep & awk - * for SYSV, mimic BSD routines to use most of the existing timing code - * Modified by Steve Miller of the University of Maryland, College Park - * -b sets the socket buffer size (SO_SNDBUF/SO_RCVBUF) - * Modified Sept. 1989 at Silicon Graphics, Inc. - * restored -s sense at request of tcs@brl - * Modified Oct. 1991 at Silicon Graphics, Inc. - * use getopt(3) for option processing, add -f and -T options. - * SGI IRIX 3.3 and 4.0 releases don't need #define SYSV. - * - * Modified --> Nov 1996 at CERN (Daniel DAVIDS) - * printout of the Socket-Buffer-Sizes - * configured for HP-UX 9000 OS - * configured for Windows NT OS - * Modified Dec 1996 at CERN (Jacques ROCHEZ) - * severe cleanup - * addaptation to the gcc compiler (ANSI) - * configured for Lynx OS - * automatic format for the rate display (G/M/K/)bytes/sec - * added log (L) and more help (h) options. - * Modified May 1997 at CERN (Jacques ROCHEZ) - * removed the mes() function following err() function. - * changed the default port to 5010 - * Modified jul 1997 at CERN (Jacques ROCHEZ) - * adapted the timing calculation in microseconds - * addapted the code for Vsisual C++ under NT4.0 - * Modified aug 1997 at CERN (Jacques ROCHEZ) - * initialise to 0 the variables nbytes, numcalls - * moved the buffer pre-load outside the measured timed area - * Distribution Status - - * Public Domain. Distribution Unlimited. - * Modified jun 1998 at Epigram - * - print hash marks to indicate prograss on transmitting side - * - sleep between bursts of buffers - * - set number of buffers/burst - * Modified jul 1998 at Epigram - * - send random size buffers - * Modified jan 1999 at Epigram (WES) - * - added start and end patterns to UDP start and end packets - * - added handling of missed start, end, or data packets for UDP tests - */ -#ifndef lint -static char RCSid[] = "ttcp.c $- CERN Revision: 3.8 (dev level) -$"; -#endif - -static char VersDate[] = "Epigram 15-jul-98"; - -/* system dependent setting - * ------------------------ - * uname -a,gcc -v a.c are the tools used - * - * Platform/OS #define MACRO predefined - * ----------- ------- --------------------------------------------------- - * SunOS OS BSD43 __unix__ __sun__ __sparc__ - * SUN Solaris SYSV __unix__ __sun__ __sparc__ __svr4__ - * SGI-IRIX < 3.3 SYSV set as #define sgi - * HP-UX 9000 SYSV __unix__ __hpux__ __hp9k8__ - * OSF/1 V3.2 SYSV __unix__ __osf__ __alpha__ - * OSF/1 V4.0 SYSV __unix__ __osf__ __alpha__ _CFE - * LynxOS SYSV __unix__ __lynx__ __powerpc__ - * Windows NT SYSV __WINNT__ __i386__ __M_COFF__ - * AIX SYSV _AIX _AIX32 _POWER _IBMR2 _ARCH_PWR - - - * Micosoft Visual C++ compiler under WindowNT 4.0 - * Windows NT _WINDOWS WIN32 - - * Unix BSD 41a BSD41a - * 42 BSD42 - * 43 BSD43 - - * Machines using System V with BSD sockets should define SYSV. - * - * Compiler commands - * ----------------- - * LynxOS : gcc -c ttcp.c -o ttcp.o | gcc -o ttcp -O ttcp.o -lnetinet -lc_p -lc - */ - -/* -------------attempt to set an automatic UNIX OS family detection -------*/ - -#if defined(__hp9k8__) || defined(__osf__) || defined(__srv4__) -#define SYSV -#endif -#if defined(__lynx__) -#define SYSV -#endif -/* for solaris (__srv4__) the parameters SYSV is already set */ - -/* version A.09.01 'key words' differs from A.09.05 A */ -#if defined(__hpux) -#define __hpux__ -#endif - -#if defined(__sun__)&&!defined(__srv4__) -#define BSD43 /* changed by BSD42 if necessary */ -#endif - -#if defined(_WIN32) /* Window NT 4.0 compiled with VisualC++ 4 */ -#define __NTVIS__ -#define SYSV -#endif - -#if defined(__FreeBSD__) -#define BSD43 -#endif - -#if defined(__linux__) -#define BSD43 -#endif -/*--------------------------------------------------------------------------*/ - -#if !defined(UNDER_CE) -#include -#include -#include -#include -#endif - -#if defined(SYSV) - -#if defined(__osf__) -#include -#include -#include -#include -#include -#include /* struct timeval */ -#include /* definition of struct rusage */ - -#else /* else of __osf__ */ -#if defined(__NTVIS__) -#include -#include /* required for all Windows applications */ -#include -#include -#include -#if !defined(UNDER_CE) -#include -#include -#endif -#include -#include -struct rusage { struct timeval ru_utime, ru_stime; }; -#define RUSAGE_SELF 0 -#else /* else of __NTVIS__ */ -#if defined(__lynx__) -#include /* located in /usr/include/..... */ -#include -#include -#include -#include -#include -#include /* definition of struct rusage */ -#include -#define RUSAGE_SELF 0 -#include /* definition of TICKSPERSEC (HZ) */ -#include - -#else /* else of __Lynx__ */ -#if defined(__svr4__) -#include -#include -#include -#include -#include -#include -#include /* struct timeval */ -#include /* definition of struct rusage */ -#include -#define RUSAGE_SELF 0 -#include - -#else /* else of __svr4__ all SYSV cases except those mentionned before */ -#include -#include -#include -#include -#include -#include /* struct timeval */ -#include /* definition of struct rusage */ -#include -#define RUSAGE_SELF 0 -#include - -#endif /* __svr4__ */ -#endif /* __lynx__ */ -#endif /* __NTVIS__ */ -#endif /* __osf__ */ - -#else /* else of SYSV it is a BSD OS */ -#include -#include -#include -#include -#include -#include -#include -#if defined(__linux__) -#include /* struct timeval */ -#else -#include /* struct timeval */ -#endif -#include /* definition of struct rusage */ -#include /* for usleep() - henry */ -#define SOCKET_ERROR -1 - -#endif /* SYSV */ - -#if defined(__NTVIS__) - -#if defined(_DEBUG) /* usual debug symbol for VC++ */ -#define DEBUG 1 -#endif - -void usleep(unsigned int microseconds); - -#define bcopy(a,b,n) memcpy((b), (a), (n)) -#define bzero(a,n) memset((a), 0, (n)) - -#ifndef _GETOPT_ -#define _GETOPT_ -int getopt(int argc, char **argv, char *optstring); - -extern char *optarg; // returned arg to go with this option -extern int optind; // index to next argv element to process -extern int opterr; // should error messages be printed? -extern int optopt; // - -#define BADCH ('?') -#endif // _GETOPT - -/* get option letter from argument vector */ -int - opterr = 1, // should error messages be printed? - optind = 1, // index into parent argv vector - optopt; // character checked for validity -char *optarg; // argument associated with option - -#define EMSG "" -char *progname; // may also be defined elsewhere -#endif /*__NTVIS__*/ - -/* sockaddr_in == file server address structure - * - * Socket address, internet style. declared in : /netinet/in.h - * struct sockaddr_in {short sin_family; - * u_short sin_port; - * struct in_addr sin_addr; - * char sin_zero[8]; - * }; - * - * Structure used by kernel to store most addresses. declared in ./sys/socket.h - * struct sockaddr{u_short sa_family; address family - * char sa_data[14]; up to 14 bytes of direct address - * }; - * PS : sin stand for "socket internet number" - */ - -#ifndef __NTVIS__ -#define FAR -#endif - -#if defined(__CONST_SOCKADDR_ARG) -#define SOCKADDR_CAST (__CONST_SOCKADDR_ARG) -#elif defined(__lynx__) || defined(__sun__) || defined(_AIX) || defined(__FreeBSD__) || defined(__NTVIS__) -#define SOCKADDR_CAST (struct sockaddr FAR *) -#else -#define SOCKADDR_CAST -#endif - -#if defined(__sun__) -struct sockaddr_in sockaddr; /* done in ./X11/Xdmcp.h */ -#endif - -struct sockaddr_in sinme; /* is the socket struct. in the local host */ -struct sockaddr_in sinhim; /* is the socket struc. in the remote host */ - -#if defined(__lynx__) || defined(__svr4__) || defined(_AIX) -struct sockaddr frominet; -#else -struct sockaddr_in frominet; -#endif /* __lynx__ */ - -int domain, fromlen; - -#if !defined(__NTVIS__) -#define SOCKET int -#endif /* __NTVIS__ */ -SOCKET fd; /* fd of network socket */ - -#if !defined(__lynx__) -extern int errno; -#endif - -#include - -FILE *fplog = NULL; /* file pointer for the log file */ -char logfile[100]; /* file name for the log */ -static char logfile_head[] ="ttcp_log"; /* header name for the log */ -int buflen = 8 * 1024; /* length of buffer */ -char *buf; /* ptr to dynamic buffer */ -int nbuf = 2 * 1024; /* number of buffers to send in sinkmode */ - -#define START_PKT_LEN 4 -#define START_PATTERN_LEN 4 -#define END_PKT_LEN 8 -#define END_PATTERN_LEN 4 -#define MIN_UDP_LEN 5 - -char start_pattern[START_PATTERN_LEN] = {1, 2, 3, 4}; -char end_pattern[END_PATTERN_LEN] = {2, 2, 2, 2}; - -int bufoffset = 0; /* align buffer to this */ -int bufalign = 16*1024; /* modulo this */ - -int udp = 0; /* 0 = tcp, !0 = udp */ -int options = 0; /* socket options */ -int one = 1; /* for 4.3 BSD style setsockopt() */ -short port = 5010; /* TCP port number */ -char *host; /* ptr to name of host */ -int rndm = 0; /* 0="normal", !0=random data */ -int trans; /* 0=receive, !0=transmit mode */ -int timeout; /* read timeout in millisec */ -int debug = 0; /* 0=No-Debug, 1=Debug-Set-On */ -int sinkmode = 0; /* 0=normal I/O, !0=sink/source mode */ -int verbose = 0; /* 0=print basic info, 1=print cpu rate, - * proc resource usage. */ -int nodelay = 0; /* set TCP_NODELAY socket option */ -int pri = 0; /* link layer priority */ -int b_flag = 0; /* use mread() */ -int log_cnt = 0; /* append result to a log */ -int sockbufsize = 0; /* socket buffer size to use */ -char fmt = 'A'; /* output format: - * b = bits, B = bytes, - * k = kilobits, K = kilobytes, - * m = megabits, M = megabytes, - * g = gigabits, G = gigabytes, - * A = automatic Xbytes (default) */ -int touchdata = 0; /* access data after reading */ -int seq_info = 0; /* report out of order seq nums */ - -int hash = 0; /* print hash marks for each buffer */ -int udpsleep = 0; /* sleep in between udp buffers */ -int burstn = 1; /* number of buffers per burst */ -int bufmin = -1; /* minimum buffer size to use when - sending random-size buffers */ -unsigned int seed = 1; /* seed for random number generator - used for random buffer lengths */ -int no_start = 0; /* skip the start frames for UDP */ -int no_data = 0; /* skip all data frames for UDP */ -int no_end = 0; /* skip the end frames for UDP */ - -double nbytes; /* bytes on net */ -unsigned long numCalls; /* # of I/O system calls */ - -struct hostent *addr; -extern int optind; -extern char *optarg; - -#if defined(UNDER_CE) -static int errno; -static char *weekday[] ={"Sun", "Mon","Tues", "Wed", "Thurs", "Fri", "Sat"}; -static char *month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sep", "Oct", "Nov", "Dec"}; -#define perror printf -#endif - -/*--------------------------------------------------------------------------*/ -static struct timeval time0; /* Time at which timing started */ -static struct timeval time1; -static struct rusage ru0; /* Resource utilization at the start */ -static struct rusage ru1; -static struct tm *tms; /* system time structure */ - - -/*-----------Prototype functions definitions -------------------------------*/ -/*--------------------------------------------------------------------------*/ - - /* ANSI input/output functions (stdio.h) */ - -#if defined(__lynx__) -int getopt(int, char**, char*); -int gettimeofday(struct timeval *tp, struct timezone *tzp); - -#else -#if defined(__svr4__) - -#else -#if defined(_AIX) - -#else -#if defined(__hpux__) -#else -#if defined(__NTVIS__) -#else -#if defined(BSD42) || defined(BSD43) -#else - -int printf( char*, ...); -int fprintf(FILE*,char*, ...); -void perror(char*); -int getopt(int, char**, char*); -int gettimeofday(struct timeval *tp, struct timezone *tzp); -#endif /* BSD42 || BSD43 */ -#endif /* __NTVIS__ */ -#endif /* __hpux__ */ -#endif /* _AIX */ -#endif /* __svr4__ */ -#endif /* __lynx__ */ - -int main(int argc, char* argv[]); -#if ( (!(defined(BSD42))) && (!(defined(BSD43))) && (!(defined(__NTVIS__))) ) -int read(int, char*, int); -int write(int, char*, int); -int close(int); -#endif /* !(BSD42) && !(BSD43) */ -int fclose(FILE *stream); - -#if !defined(BSD43) && !defined(__NTVIS__) -void bzero(char*,int); -void bcopy(char*, char*, int); -char strncpy(char *s1,char *s2,size_t n); -int atoi(char*); -int malloc(int); -#endif - - - /* ANSI socket functions prototype /sys/socket.h */ -#if defined(__lynx__) -int select(int, fd_set*, fd_set*, fd_set*, struct timeval*); - -#else -#if defined(__svr4__) && !defined(sparc) - -/* informations in : /usr/include/sys/socket.h */ -int socket(int, int, int); -int connect(int, struct sockaddr *, int); -int bind(int, struct sockaddr *, int); -int listen(int, int); -int accept(int, struct sockaddr *, int *); -int sendto(int, const char *, int, int, const struct sockaddr *, int); -int recvfrom(int, char *, int, int, struct sockaddr *, int *); -int getpeername(int, struct sockaddr *, int *); -int getsockopt(int, int, int, char *, int *); -int select(int, fd_set*, fd_set*, fd_set*, struct timeval*); - -#else -#if defined(_AIX) -int select(unsigned long, void *, void *, void *, struct timeval *); - -#else -#if defined(__hpux__) -int getrusage(int who,struct rusage *rusage); - -#else -#if defined(__NTVIS__) - -#else -#if defined(BSD42) || defined(BSD43) - -#else - -int socket(int, int, int); -int connect(int s,struct sockaddr_in *name, int namelen); -int bind(int s,struct sockaddr *name,int namelen); -int listen(int, int); -int accept(int, struct sockaddr_in *, int *); -int sendto(int, char *, int, int, struct sockaddr_in *, int); -int recvfrom(int, char *, int, int, struct sockaddr_in *, int *); -int getpeername(int, struct sockaddr *, int *); -int setsockopt(int, int, int, char *, int); - -int getsockopt(int, int, int, char*, int*); -int select(int, fd_set*, fd_set*, fd_set*, struct timeval*); - -#endif /* BSD42 || BSD43 */ -#endif /* __hpux__ */ -#endif /* _AIX */ -#endif /* __svr4__ */ -#endif /* __lynx__ */ -#endif /* __NTVIS__ */ - -/* ttcp prototype functions */ -void udp_rcv_test(void); -double calc_cpu_time(struct rusage *r0, struct rusage *r1); -double calc_real_time(struct timeval *t0, struct timeval *t1); -int getrusage(int who,struct rusage *rusage); -void sockets_err(char*); -void err(char *); -void mes(char *); -void pattern(char *, int); -int Nread(SOCKET, void *, int); -int Nwrite(int, void *, int); -void delay(int); -int mread(int, char *,unsigned); -char *outfmt(char format, double b); -void prep_timer(void); -void read_timer(void); -void result_summary(void); -void prusage(struct rusage*, struct rusage*, - struct timeval*, struct timeval*); -void tvadd(struct timeval *tsum, struct timeval *t0,struct timeval *t1); -void tvsub(struct timeval *tdiff, struct timeval *t1, struct timeval *t0); -void psecs(int); -void open_log(void); -void close_log(void); -void do_Usage(void); -void do_help(void); - -/*--------------------------------------------------------------------------*/ -#if !defined(__NTVIS__) -void -sigpipe() -{; -} -#endif -/*--------------------------------------------------------------------------*/ -/*--------------------------------------------------------------------------*/ -int -main(int argc, char **argv) -{ - unsigned long addr_tmp; - int c,k; - int sockbufsndsize,sockbufrcvsize; - int sockbuflen; - struct sockaddr_in peer; - int peerlen = sizeof(peer); - -#if defined(__NTVIS__) - extern char *optarg; - WSADATA WSAData; - WSAStartup(MAKEWORD(1,1), &WSAData); -#endif /* __NTVIS__ */ - - if (argc < 2) { do_Usage(); exit(1); } - - while (1) { - while ((c=getopt(argc, argv, "hidrstuvxHVBDTLb:f:l:n:p:A:O:S:N:P:R:I:w:")) != -1) { - switch (c) { - case 'w': - timeout = atoi(optarg); - break; - case 'I': - seed = atoi(optarg); - break; - case 'N': - burstn = atoi(optarg); - break; - case 'P': -#if defined(__linux__) - pri = atoi(optarg); - break; -#else - fprintf(stderr, "ttcp: -P option not supported on this OS\n"); - exit(1); -#endif - case 'R': - bufmin = atoi(optarg); - break; - case 'S': - udpsleep = atoi(optarg); - if (udpsleep < 0) udpsleep = 0; - /* convert msec arg to usec for usleep, minimum 10ms */ - udpsleep = udpsleep * 1000; - break; - case 'H': - hash = 1; - break; - case 'V': - fprintf(stdout,"%s %s\n" , RCSid , VersDate ); - exit(0); - case 'B': - b_flag = 1; - break; - case 'L': - log_cnt = 1; - break; - case 'h': - do_help(); - exit(1); - break; - case 't': - trans = 1; - break; - case 'r': - trans = 0; - break; - case 'x': - rndm = 1; - break; - case 'd': - options |= SO_DEBUG; - break; - case 'D': -#ifdef TCP_NODELAY - nodelay = 1; -#else - fprintf(stderr, - "ttcp: -D option ignored: TCP_NODELAY socket option not supported\n"); -#endif - break; - case 'n': - nbuf = atoi(optarg); - break; - case 'l': - buflen = atoi(optarg); - break; - case 's': - sinkmode = !sinkmode; - break; - case 'p': - port = atoi(optarg); - break; - case 'u': - udp = 1; - break; - case 'v': - verbose = 1; - break; - case 'A': - bufalign = atoi(optarg); - break; - case 'O': - bufoffset = atoi(optarg); - break; - case 'b': -#if defined(SO_SNDBUF) || defined(SO_RCVBUF) - sockbufsize = atoi(optarg); -#else - fprintf(stderr, -"ttcp: -b option ignored: SO_SNDBUF/SO_RCVBUF socket options not supported\n"); -#endif - break; - case 'f': - fmt = *optarg; - break; - case 'T': - touchdata = 1; - break; - case 'i': - seq_info = 1; - break; - - default: - {do_Usage(); exit(1);} - }/*switch */ - }/* while getopt() */ - - argc -= optind; - argv += optind; - optind = 0; - - /* check for '--' args */ - if (argc == 0) { - /* no more args */ - break; /* while (1) */ -#if defined(DEBUG) - } else if (!strcmp(argv[0], "--nostart")) { - no_start = 1; - argc--; argv++; - } else if (!strcmp(argv[0], "--nodata")) { - no_data = 1; - argc--; argv++; - } else if (!strcmp(argv[0], "--noend")) { - no_end = 1; - argc--; argv++; - } else if (!strcmp(argv[0], "--debug")) { - debug = 1; - argc--; argv++; -#endif /* DEBUG */ - } else if (!strncmp(argv[0], "--", 2)) { - fprintf(stderr, "ttcp: illegal option: %s\n", argv[0]); - do_Usage(); exit(1); - } else { - /* the arg was not a '--' arg */ - break; /* while (1) */ - } - } /* while (1) */ - - - /* ----------------------- main part ----------------------- */ - -#if defined(__NTVIS__) && !defined(UNDER_CE) - /* Set "stdin" to have binary mode: */ - if (_setmode(_fileno(stdin), _O_BINARY) == -1) - perror("%s: Error setting stdin to binary mode"); - /* Set "stdout" to have binary mode: */ - if (_setmode(_fileno(stdout), _O_BINARY) == -1) - perror("%s: Error setting stdout to binary mode"); -#endif /* __NTVIS__ */ - -if (log_cnt) open_log(); - -/* input error checking */ -if (burstn > nbuf) { - fprintf(stderr, "ttcp: buffers per burst must be less than or equal to " - "total number of buffers\n"); - exit(1); -} -if (bufmin < -1) { - fprintf(stderr, "ttcp: minimum buffer size specified with -R option must " - "be non-negative\n"); - exit(1); -} -if (buflen > 65535) { - fprintf(stderr, "ttcp: maximum buffer size specified with -l option must " - "be <= 65536\n"); - exit(1); -} -if (bufmin > buflen) { - fprintf(stderr, "ttcp: minimum buffer size specified with -R option must " - "be less than or equal to (maximum) buffer size specified with -l\n"); - exit(1); -} - -/* buffer allocation */ - - if (udp && buflen < MIN_UDP_LEN) - buflen = MIN_UDP_LEN; /* send more than the sentinel size */ - - if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL) - err("malloc"); - if (bufalign != 0) - buf +=(bufalign - ((int)buf % bufalign) + bufoffset) % bufalign; - - fprintf(stderr,"ttcp%s: buflen=%d, nbuf=%d, align=%d/%d, port=%d\n", - trans?"-t":"-r",buflen, nbuf, bufalign, bufoffset, port); - if (log_cnt)fprintf(fplog," %6d %6d %6d %6d %4d", - buflen, nbuf, bufalign, bufoffset, port); - - /* preload the buffer for the transmit condition */ - pattern( buf, buflen ); - - /* seed the random number generator */ - if ((bufmin != -1) || (rndm != 0)) { -#if defined(__NTVIS__) - srand(seed); -#else /* ! __NTVIS__ */ - srandom(seed); -#endif /* __NTVIS__ */ - } - - if(trans) - {/* xmitr */ - if (argc == 0) { - fprintf(stderr, "ttcp: missing destination host arg\n"); - do_Usage(); exit(1); - } - - bzero((char *)&sinhim, sizeof(sinhim)); - host = argv[0]; - if (atoi(host) > 0 ) - {/* Numeric */ - sinhim.sin_family = AF_INET; - sinhim.sin_addr.s_addr = inet_addr(host); - } - else - {if ((addr=gethostbyname(host)) == NULL) sockets_err("bad hostname"); - sinhim.sin_family = addr->h_addrtype; - bcopy(addr->h_addr,(char*)&addr_tmp, addr->h_length); - sinhim.sin_addr.s_addr = addr_tmp; - } - sinhim.sin_port = htons(port); - sinme.sin_port = 0; /* free choice */ - } - else - {/* rcvr */ - sinme.sin_port = htons(port); - } -#if defined(__NTVIS__) - sinme.sin_family = AF_INET; -#endif - - fd = socket(AF_INET, udp?SOCK_DGRAM:SOCK_STREAM, 0); - -#if defined(__NTVIS__) - if (fd == INVALID_SOCKET) sockets_err("socket"); -#else - if (fd < 0) sockets_err("socket"); -#endif - - if (verbose) { - char *label = trans?"ttcp-t":"ttcp-r"; -#if defined(UNDER_CE) - SYSTEMTIME SystemTime; - char time_str[30]; - - GetLocalTime(&SystemTime); - sprintf(time_str, "%s %s %d %02d:%02d:%02d %d\n", weekday[SystemTime.wDayOfWeek], month[SystemTime.wMonth - 1], - SystemTime.wDay, SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond, SystemTime.wYear); -#else - time_t now; - char *time_str; - - time(&now); - time_str = ctime(&now); -#endif - fprintf(stdout,"%s: start time %s", label, time_str); - fprintf(stdout,"%s: File-Descriptor 0x%x Opened\n", label, fd ); - } - -#if defined(__NTVIS__) - if (bind(fd, (struct sockaddr FAR *)&sinme, sizeof(sinme)) == SOCKET_ERROR) - sockets_err("bind"); -#else - if (bind(fd, SOCKADDR_CAST &sinme, sizeof(sinme)) < 0) - sockets_err("bind"); -#endif /* __NTVIS__ */ - - -#if defined(SO_SNDBUF) || defined(SO_RCVBUF) - if (sockbufsize) - { -#if defined(__lynx__) || defined(__sun__) || defined(__NTVIS__) - if (trans) - {if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *)&sockbufsize, - sizeof sockbufsize) < 0) - sockets_err("setsockopt: sndbuf"); - } - else - {if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&sockbufsize, - sizeof sockbufsize) < 0) - sockets_err("setsockopt: rcvbuf"); - } - -#else - if (trans) - - {if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sockbufsize, - sizeof sockbufsize) < 0) - sockets_err("setsockopt: sndbuf"); - } - else - {if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &sockbufsize, - sizeof sockbufsize) < 0) - sockets_err("setsockopt: rcvbuf"); - } -#endif /* __lynx__ __sun__ __NTVIS__ */ - } - else - {/* - ** Added by Daniel Davids to Know Socket-Buffer-Sizes - */ - sockbuflen = sizeof sockbufsndsize; -#if defined(__lynx__) || defined(__sun__) || defined(__NTVIS__) - getsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *)&sockbufsndsize, - &sockbuflen); - sockbuflen = sizeof sockbufrcvsize; - getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&sockbufrcvsize, - &sockbuflen); -#else - getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sockbufsndsize, &sockbuflen); - sockbuflen = sizeof sockbufrcvsize; - getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &sockbufrcvsize, &sockbuflen); -#endif /* __lynx__ __sun__ __NTVIS__ */ - sockbufsize = ( sockbufsndsize + sockbufrcvsize ) / 2; - - if ( sockbufsndsize != sockbufrcvsize ) - {fprintf(stderr, "sockbufsndsize=%d, ", sockbufsndsize ); - fprintf(stderr, "sockbufrcvsize=%d, ", sockbufrcvsize ); - } - } -#endif /* defined(SO_SNDBUF) || defined(SO_RCVBUF) */ - - if (sockbufsize) fprintf(stderr, "sockbufsize=%d, \n", sockbufsize); - - if (log_cnt) - {if (sockbufsize)fprintf(fplog," %6d",sockbufsize); - else fprintf(fplog," 0"); - } - -#if defined(__linux__) - if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, (char *)&pri, sizeof pri) < 0) - sockets_err("setsockopt: priority"); -#endif - - - if (trans) fprintf(stderr, "# %s sender -> %s #\n", udp?"udp":"tcp", host); - else fprintf(stderr, "# %s receiver #\n", udp?"udp":"tcp"); - - if (!udp) - { -#if !defined(__NTVIS__) - signal(SIGPIPE, sigpipe); -#endif /* !__NTVIS__ */ - - if (trans) - {/* We are the client if transmitting */ - if (options) - { -#if defined(BSD42) - if( setsockopt(fd, SOL_SOCKET, options, 0, 0) < 0) -#else /* BSD43 */ - if( setsockopt(fd, SOL_SOCKET, options, (char *)&one, sizeof(one)) < 0) -#endif /* BDS42 */ - sockets_err("setsockopt"); - } -#ifdef TCP_NODELAY - if (nodelay) - {struct protoent *p; - p = getprotobyname("tcp"); -#if defined(__lynx__) || defined(__sun__) || defined(__NTVIS__) - if( p && setsockopt(fd, p->p_proto, TCP_NODELAY, - (char *) &one, sizeof(one)) < 0) -#else - if( p && setsockopt(fd, p->p_proto, TCP_NODELAY, - &one, sizeof(one)) < 0) -#endif /* __lynx__ __sun__ __NTVIS__ */ - sockets_err("setsockopt: nodelay"); - } -#endif /* TCP_NODELAY */ - if (connect(fd, SOCKADDR_CAST &sinhim, sizeof(sinhim) ) < 0) - sockets_err("connect"); - }/* if (trans) */ - else - {/* otherwise, we are the server and should listen for connections */ - -errno = 0; - -#if defined(sgi) || ( defined(__osf__) && !defined(_CFE) ) - if( listen(fd,1) <0 ) -#else - if( listen(fd,0) <0 ) /* allow a queue of 0 */ -#endif - sockets_err("listen"); - - if(options) { - int err; -#if defined(BSD42) - err = setsockopt(fd, SOL_SOCKET, options, 0, 0); -#elif defined(__lynx__) || defined(__sun__) || defined(__NTVIS__) - err = setsockopt(fd, SOL_SOCKET, options, (char *) &one, sizeof(one)); -#else - err = setsockopt(fd, SOL_SOCKET, options, &one, sizeof(one)); -#endif /* BSD42 */ - if (err < 0) - sockets_err("setsockopt"); - } - fromlen = sizeof(frominet); - domain = AF_INET; - if (timeout > 0) { - fd_set readfds, exceptfds; - struct timeval tv_timeout; - int n; - - tv_timeout.tv_sec = timeout/1000; - tv_timeout.tv_usec = (timeout%1000)*1000; - - FD_ZERO(&readfds); - FD_ZERO(&exceptfds); - FD_SET(fd, &readfds); - FD_SET(fd, &exceptfds); - - n = select( fd+1, &readfds, NULL, &exceptfds, &tv_timeout ); - if (n == 0 || n == SOCKET_ERROR) { - sockets_err("select listen"); - return 0; - } - } - if((fd=accept(fd, SOCKADDR_CAST &frominet, &fromlen) ) < 0) - sockets_err("accept"); - - if (getpeername(fd, SOCKADDR_CAST &peer, &peerlen) < 0) - sockets_err("getpeername"); - - fprintf(stderr,"ttcp-r: accept from %s\n",inet_ntoa(peer.sin_addr)); - - } /* otherwise we are ... */ - } - - prep_timer(); - errno = 0; - nbytes = 0.0; - numCalls = 0; - - { - register int cnt,multi; - char *pb; - int nb = 0; - unsigned long rbuflen = 0; - multi = nbuf; - - if (trans) { -#if !defined(BSD43) - if(udp) { - int err; - int nochecksum_opt = 0; - err = setsockopt(fd, IPPROTO_UDP, UDP_NOCHECKSUM, - (char *)&nochecksum_opt, sizeof(nochecksum_opt)); - if (err < 0) - sockets_err("setsockopt"); - } -#endif - - if(udp && !no_start) { - int start_count = 2; - char start_pkt[START_PKT_LEN]; - memset(start_pkt, 0, START_PKT_LEN); - memcpy(start_pkt, start_pattern, START_PATTERN_LEN); - - while (start_count-- > 0) { - (void)Nwrite( fd, start_pkt, START_PKT_LEN ); /* rcvr start */ - if (udpsleep) { - usleep(udpsleep); - /* clear errno (see man page for errno(3), definition of - EINTR. usleep() uses SIGCONT? ) */ - if (errno == EINTR) errno = 0; - } /* udpsleep */ - } - } - - /* initial seqence num for UDP */ - if (udp) buf[0] = 0; - k = burstn; - - if (sinkmode) { - while (multi-- > 0 && !no_data) { - - if (bufmin == -1) { - rbuflen = buflen; - } else { - /* set rbuflen to a random value evenly distributed in - [bufmin, buflen]. As long as buflen is < 2^16, we can - fit the calculation in 32 bits */ -#if defined(__NTVIS__) - rbuflen = (( (unsigned long)rand() * - ((unsigned long)(buflen-bufmin+1)) ) >> 15) + bufmin; -#else /* ! __NTVIS__ */ - rbuflen = (( ((unsigned long)random() >> 15) * - ((unsigned long)(buflen-bufmin+1)) ) >> 16) + bufmin; -#endif /* __NTVIS__ */ - } - - if (rndm) { - unsigned int i, j, l; - unsigned long data; - - if (udp) - l = 1; - else - l = 0; - - for (i = l; i < rbuflen; /* null */) { -#if defined(__NTVIS__) - data = (unsigned long)rand(); -#else /* ! __NTVIS__ */ - data = (unsigned long)random(); -#endif /* __NTVIS__ */ - /*fprintf(stderr, "%08x\n",data);*/ /* DEBUG */ - /* The NT rand() function returns only 16 useful bits! */ - for (j = 0; (j < 2/*4*/) && (i < rbuflen) ; j++) { - buf[i++] = (unsigned char)(data & 0xff); - data >>= 8; - } - } - } - - if ((cnt=Nwrite(fd,buf,rbuflen)) != (int)rbuflen) - sockets_err("error from the socket write"); - /* increment sequence num if UDP */ - if (udp) buf[0] = (char)(((unsigned char)(buf[0])+1) & 0xFF); - - if (debug) - fprintf(stdout,"ttcp-t: %5d | %d Bytes Written in %d write commands \n", - ++nb, cnt, nbuf ); - - nbytes += rbuflen; - - /* hashes */ - if (hash) { - fprintf(stderr,"#"); - } - - /* Check for the end of a burst */ - if (--k <= 0) { - k = burstn; - - /* sleep to avoid overrunning slower receivers - henry */ - if (udpsleep) { - usleep(udpsleep); - /* clear errno (see man page for errno(3), definition of - EINTR. usleep() uses SIGCONT? ) */ - if (errno == EINTR) errno = 0; - } /* udpsleep */ - } - } /* while */ - - } /* if (sinkmode) */ - else - { - - nbuf = 0; - - if (bufmin == -1) { - rbuflen = buflen; - } else { - /* set rbuflen to a random value evenly distributed in - [bufmin, buflen]. As long as buflen is < 2^16, we can - fit the calculation in 32 bits */ -#if defined(__NTVIS__) - rbuflen = (( (unsigned long)rand() * - ((unsigned long)(buflen-bufmin+1)) ) >> 15) + bufmin; -#else /* ! __NTVIS__ */ - rbuflen = (( ((unsigned long)random() >> 15) * - ((unsigned long)(buflen-bufmin+1)) ) >> 16) + bufmin; -#endif /* __NTVIS__ */ - } - - if (udp) - pb = &(buf[1]); - else - pb = &(buf[0]); - -#if !defined(__NTVIS__) /* else case specific to WINNT */ - while((cnt=read(0,pb,rbuflen)) > 0) -#else /* __NTVIS__ */ - while((cnt=(int)fread(pb,1,rbuflen,stdin)) > 0) -#endif /* __NTVIS__ */ - { - - if (udp) - multi = cnt+1; /* don't include seq. num. in count of data */ - else - multi = cnt; - if ((cnt=Nwrite(fd,buf,multi)) != (int)multi) - sockets_err("error from the socket write"); - /* increment seqence num if UDP */ - if (udp) buf[0] = (char)(((unsigned char)(buf[0])+1) & 0xFF); - nbuf++; - - if (debug) - fprintf(stdout,"ttcp-t: %5d | %d Bytes Written in %d write commands \n", - ++nb, cnt, nbuf ); - - nbytes += multi; - - /* hashes */ - if (hash) { - fprintf(stderr,"#"); - } - - /* Check for the end of a burst */ - if (--k <= 0) { - k = burstn; - - /* sleep to avoid overrunning slower receivers - henry */ - if (udpsleep) { - usleep(udpsleep); - /* clear errno (see man page for errno(3), definition of - EINTR. usleep() uses SIGCONT? ) */ - if (errno == EINTR) errno = 0; - } /* udpsleep */ - } - - if (bufmin == -1) { - rbuflen = buflen; - } else { - /* set rbuflen to a random value evenly distributed in - [bufmin, buflen]. As long as buflen is < 2^16, we can - fit the calculation in 32 bits */ -#if defined(__NTVIS__) - rbuflen = (( (unsigned long)rand() * - ((unsigned long)(buflen-bufmin+1)) ) >> 15) + bufmin; -#else /* ! __NTVIS__ */ - rbuflen = (( ((unsigned long)random() >> 15) * - ((unsigned long)(buflen-bufmin+1)) ) >> 16) + bufmin; -#endif /* __NTVIS__ */ - } - - } /* while */ - - } /* if (sinkmode) */ - - if (hash) { - fprintf(stderr,"\n"); - fflush(stderr); - } - -#if defined(UNDER_CE) - errno = WSAGetLastError(); -#endif - if (!errno) { - read_timer(); - if(udp && !no_end) { - int end_count = 4; - int data_count = nbuf; - char end_pkt[END_PKT_LEN]; - unsigned char* net_byte = &end_pkt[END_PATTERN_LEN]; - memset(end_pkt, 0, END_PKT_LEN); - memcpy(end_pkt, end_pattern, END_PATTERN_LEN); - net_byte[3] = data_count & 0xFF; data_count >>= 8; - net_byte[2] = data_count & 0xFF; data_count >>= 8; - net_byte[1] = data_count & 0xFF; data_count >>= 8; - net_byte[0] = data_count & 0xFF; - - while (end_count-- > 0) { - Nwrite( fd, end_pkt, END_PKT_LEN ); /* rcvr end */ - if (udpsleep && end_count>0) usleep(udpsleep); - } - } - result_summary(); - } - } /* trans */ - else - { - if (udp) { - udp_rcv_test(); - } - else - {/* not udp received transfer */ - while ((cnt=Nread(fd,buf,buflen)) > 0) - {if(debug)fprintf(stdout, - "ttcp%s: %5d | %d Bytes Read\n", - trans?"-t":"-r", ++nb, cnt ); - nbytes += cnt; - if (!sinkmode) { -#if !defined(__NTVIS__) /* else case specific to WINNT */ - if (write(1,buf,cnt) != cnt) err("write"); -#else /* __NTVIS__ */ - if ((int)fwrite(buf,1,cnt,stdout) != cnt) err("fwrite"); -#endif /* __NTVIS__ */ - } - } -#if defined(UNDER_CE) - errno = WSAGetLastError(); -#endif - if (!errno) { - read_timer(); - result_summary(); - } - } - } - } - - if(errno) err("IO"); - -#if defined(__NTVIS__) - closesocket ( fd ); -#else - close ( fd ); -#endif /* __NTVIS__ */ - - if (verbose) fprintf(stdout,"ttcp%s: File-Descriptor fd 0x%x Closed\n" , - trans?"-t":"-r", fd ); - - if (log_cnt) close_log(); - - fprintf(stderr,"ttcp done.\n"); - fflush(stdout); - - exit(0); -} -/*--------------------------------------------------------------------------*/ -void -udp_rcv_test(void) -{ - enum {START_WAIT, DATA_WAIT, DATA_RCV, END_TEST} rcv_state; - enum {START_PKT_TYPE, END_PKT_TYPE, DATA_PKT_TYPE} pkt_type; - int cnt; - int nbuffers = 0; - unsigned int start_pkt_cnt = 0; - unsigned int end_pkt_cnt = 0; - unsigned int data_pkt_cnt = 0; - unsigned int expected_pkt_cnt = 0; - unsigned char seq = 0; - unsigned char buf_seq; - - rcv_state = START_WAIT; - while (rcv_state != END_TEST && (cnt=Nread(fd,buf,buflen)) > 0) { - /* Determine the type of packet received */ - if (!memcmp(buf, start_pattern, START_PATTERN_LEN)) { - pkt_type = START_PKT_TYPE; - start_pkt_cnt++; - } else if (!memcmp(buf, end_pattern, END_PATTERN_LEN)) { - /* read the expected data packet count from the end packet */ - unsigned char* net_byte = buf; - net_byte += END_PATTERN_LEN; - expected_pkt_cnt = ((net_byte[0] << 24) + (net_byte[1] << 16) + - (net_byte[2] << 8) + net_byte[3]); - pkt_type = END_PKT_TYPE; - end_pkt_cnt++; - } else { - data_pkt_cnt++; - pkt_type = DATA_PKT_TYPE; - } - - if (rcv_state == START_WAIT) { - /* Wait until we see a vaild start packet */ - if (pkt_type == START_PKT_TYPE) { - prep_timer(); - rcv_state = DATA_WAIT; - } else if (pkt_type == DATA_PKT_TYPE) { - fprintf(stderr, "ERROR: Missed UDP start packet.\n"); - prep_timer(); - rcv_state = DATA_RCV; - } else if (pkt_type == END_PKT_TYPE) { - fprintf(stderr, "ERROR: Found UDP end packet before start packet or data.\n"); - rcv_state = END_TEST; - } - } else if (rcv_state == DATA_WAIT) { - /* Skip any extra start packets until we see data */ - if (pkt_type == START_PKT_TYPE) { - prep_timer(); - } else if (pkt_type == DATA_PKT_TYPE) { - rcv_state = DATA_RCV; - } else if (pkt_type == END_PKT_TYPE) { - fprintf(stderr, "ERROR: Found UDP end packet without receiving " - "any data packets.\n"); - rcv_state = END_TEST; - } - } else { /* DATA_RCV */ - /* Collect data packets until we see a vaild end packet */ - if (pkt_type == START_PKT_TYPE) { - /* We missed the end packets and now a new test is - * starting. Report the results of this test then start - * another. */ - read_timer(); - result_summary(); - fprintf(stderr, "ERROR: Found UDP start packet while receiving data.\n" - "ERROR: Expected more data packets or an end packet.\n"); - nbytes = 0.0; - nbuffers = 0; - numCalls = 0; - prep_timer(); - rcv_state = DATA_WAIT; - } else if (pkt_type == DATA_PKT_TYPE) { - /* loop in this state */ - } else if (pkt_type == END_PKT_TYPE) { - /* we used to print results here but now we do when the loop ends */ - rcv_state = END_TEST; - } - } - - /* tally data packets the same way from whatever state we are in */ - if (pkt_type == DATA_PKT_TYPE) { - if (debug) - fprintf(stderr, "ttcp-r: %5d | %d Bytes Read\n", ++nbuffers, cnt); - nbytes += cnt; - if (seq_info) { - /* check seqence num */ - buf_seq = (unsigned char)(buf[0]); - if (buf_seq != seq) { - fprintf(stderr, "ERROR: Out of sequence. " - "Buffer %u, seq %u, expected %u\n", - data_pkt_cnt, buf_seq, seq); - seq = buf_seq; - } - seq++; - } - if (!sinkmode) { -#if !defined(__NTVIS__) /* else case specific to WINNT */ - if (write(1,&(buf[1]),cnt-1) != cnt-1) err("write"); -#else /* __NTVIS__ */ - if ((int)fwrite(&(buf[1]),1,cnt-1,stdout) != cnt-1) err("fwrite"); -#endif /* __NTVIS__ */ - } - } - } /* end-while */ - - /* normal end of test */ - read_timer(); - result_summary(); - fprintf(stderr, "ttcp-r: packets %u data, %u start, %u end\n", - data_pkt_cnt, start_pkt_cnt, end_pkt_cnt); - if (expected_pkt_cnt != 0) { - int lost_cnt = expected_pkt_cnt - data_pkt_cnt; - - fprintf(stderr, "ttcp-r: %g%% (%u/%u) packet loss\n", - 100.0 * (double)lost_cnt/(double)expected_pkt_cnt, - lost_cnt, expected_pkt_cnt); - } -} - -/*--------------------------------------------------------------------------*/ -/* calc_cpu_time(): Time difference, in usecs, of the combined user and - * sys times of the given start and end usage info */ -double -calc_cpu_time( - struct rusage *r0, - struct rusage *r1 -) -{ - double time; - time_t ms; - struct timeval tdiff, tend, tstart; - - /* total user delta time + total system delta time */ - tvadd( &tend, &r1->ru_utime, &r1->ru_stime ); /* user + sys time @ end */ - tvadd( &tstart, &r0->ru_utime, &r0->ru_stime ); /* user + sys time @ start*/ - tvsub( &tdiff, &tend, &tstart ); - - /* useconds */ - time = ((double)tdiff.tv_sec)*1e6 + (double)tdiff.tv_usec; - - /* debug mseconds */ - ms = tdiff.tv_sec*(time_t)1000 + tdiff.tv_usec/(time_t)1000; - if (ms != (time_t)(time/1000.0)) { - fprintf(stderr, "ERROR: time calc mismatch of msec (%d) to usec (%f)\n", - (int)ms, time/1000.0); - } - - return time; -} - -/*--------------------------------------------------------------------------*/ -/* calc_real_time(): Time difference in usecs of the given times */ -double -calc_real_time( - struct timeval *t0, - struct timeval *t1 -) -{ - double time; - time_t ms; - struct timeval tdiff; - - tvsub(&tdiff, t1 ,t0); - - /* useconds */ - time = ((double)tdiff.tv_sec)*1e6 + (double)tdiff.tv_usec; - - /* debug mseconds */ - ms = tdiff.tv_sec*(time_t)1000 + tdiff.tv_usec/(time_t)1000; - if (ms != (time_t)(time/1000.0)) { - fprintf(stderr, "ERROR: time calc mismatch of msec (%d) to usec (%f)\n", - (int)ms, time/1000.0); - } - - return time; -} -/*--------------------------------------------------------------------------*/ -void -result_summary(void) -{ - char* label = trans ? "ttcp-t" : "ttcp-r"; - double cput = calc_cpu_time(&ru0, &ru1); - double realt = calc_real_time(&time0, &time1); - double t_min; - double bytes_per_sec; - - /* lower end boundary conditions */ - t_min = 10.0; /* 10 usec */ -#if defined(__NTVIS__) - t_min = 1000.0; /* 1 msec */ -#endif - if (cput <= t_min) { /* value in usec */ - cput = t_min; - fprintf(stderr,"%s: cpu time too short set at %.0f usec, NOT accurate result.\n", - label,t_min); - } - if (realt <= t_min) { /* value in usec */ - realt = t_min; - fprintf(stderr,"%s: real time too short, set at %.0f usec, NOT accurate result.\n", - label,t_min); - } - - bytes_per_sec = (nbytes/realt)*1e6; - - fprintf(stderr,"%s: %.0f bytes in %.06f real seconds = %s/sec +++\n", - label, nbytes, realt/1e6, outfmt(fmt, bytes_per_sec)); - - if (verbose) - fprintf(stderr,"%s: %.0f bytes in %.06f cpu seconds = %s/cpu sec\n", - label, nbytes,cput/1e6, outfmt(fmt, (nbytes/cput)*1e6)); - - fprintf(stderr,"%s: %ld I/O calls, %.3f msec(real)/call, %.3f msec(cpu)/call\n", - label, numCalls, - (numCalls>0)?(realt/(double)numCalls)/1000.0:0.0, - (numCalls>0)?(cput /(double)numCalls)/1000.0:0.0); - - fprintf(stderr,"%s: ", label); - prusage(&ru0, &ru1, &time0, &time1); - fprintf(stderr,"\n"); - - if (verbose) - printf("%s: buffer address %#x\n", label, (unsigned int)buf); - - if (fplog) { - struct timeval tdiff; - /* User time */ - tvsub(&tdiff, &ru1.ru_utime, &ru0.ru_utime); - fprintf(fplog," %ld.%06ld", (long)tdiff.tv_sec, (long)tdiff.tv_usec); - /* System time */ - tvsub(&tdiff, &ru1.ru_stime, &ru0.ru_stime); - fprintf(fplog," %ld.%06ld", (long)tdiff.tv_sec, (long)tdiff.tv_usec); - /* Percent of cput usage */ - fprintf(fplog," %.1f", 100.0 * (cput/realt)); - /* validity of real time mesurment */ - fprintf(fplog, (realt == t_min)?" 0":" 1"); - /* bytes, seconds, MBytes/sec, IO calls */ - fprintf(fplog," %10.0f %4.06f %4.3f %6ld", - nbytes, realt/1e6, bytes_per_sec/(1024.0*1024.0), numCalls); - } -} -/*--------------------------------------------------------------------------*/ -void -sockets_err(char* s) -{ -#if defined(__NTVIS__) - int err = WSAGetLastError(); - char* prefix = trans?"ttcp-t":"ttcp-r"; - fprintf(stderr,"%s: %s\n", prefix, s); - fprintf(stderr,"%s: errno=%d\n", prefix, err); - exit(1); -#else - err(s); -#endif /* __NTVIS__ */ -} - -/*--------------------------------------------------------------------------*/ -void -err(char *s) -{ - char* prefix = trans?"ttcp-t":"ttcp-r"; - fprintf(stderr,"%s: ", prefix); - perror(s); - fprintf(stderr,"%s: errno=%d\n", prefix, errno); - exit(1); -} -/*--------------------------------------------------------------------------*/ -void -mes(char *s) -{ - fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", s); -} -/*--------------------------------------------------------------------------*/ -void -pattern( char *cp, int cnt ) -{ - register char c; - register int cnt1; - cnt1 = cnt; - c = 0; - while( cnt1-- > 0 ) { - while( !isprint((c&0x7F)) ) c++; - *cp++ = (c++&0x7F); - } -} -/*--------------------------------------------------------------------------*/ -char * -outfmt(char format, double b) -{ - static char obuf[50]; - double giga = 1024.0 * 1024.0 * 1024.0; - double mega = 1024.0 * 1024.0; - double kilo = 1024.0; - - if (format == 'A') { - if (b >= giga) - format = 'G'; - else if (b >= mega) - format = 'M'; - else if (b >= kilo) - format = 'K'; - else - format = 'B'; - } - - switch (format) { - case 'G': - sprintf(obuf, "%.3f GB", b / giga); - break; - case 'M': - sprintf(obuf, "%.3f MB", b / mega); - break; - case 'K': - sprintf(obuf, "%.3f KB", b / kilo); - break; - case 'B': - sprintf(obuf, "%4f B", b); - break; - case 'g': - sprintf(obuf, "%.3f Gbit", b * 8.0 / giga); - break; - case 'm': - sprintf(obuf, "%.3f Mbit", b * 8.0 / mega); - break; - case 'k': - sprintf(obuf, "%.3f Kbit", b * 8.0 / kilo); - break; - case 'b': - sprintf(obuf, "%4f b", b * 8.0); - break; - default: - sprintf(obuf, "default.........."); - } - return obuf; -} -/*--------------------------------------------------------------------------*/ -#if defined(SYSV) - -/*ARGSUSED*/ - -#if defined(__osf__) -/* getrusage defined in the system lib */ -#else -#if defined(__lynx__) -/* getrusage defined in the system lib */ -#else -#if defined(__sun__) -/* getrusage defined in the system lib */ -#else - -int -getrusage(ignored, ru) - int ignored; - register struct rusage *ru; -{ - - -#if defined(__NTVIS__) - HANDLE phd; - FILETIME CreateTime, ExitTime, KernelTime, UserTime; - SYSTEMTIME SysTime; -#if defined(UNDER_CE) - phd = GetCurrentThread(); - if( GetThreadTimes(phd, &CreateTime, &ExitTime, &KernelTime, &UserTime) - != TRUE) -#else - phd = GetCurrentProcess(); - if( GetProcessTimes(phd, &CreateTime, &ExitTime, &KernelTime, &UserTime) - != TRUE) -#endif - {ru->ru_stime.tv_sec = 0; - ru->ru_stime.tv_usec = 0; - ru->ru_utime.tv_sec = 0; - ru->ru_utime.tv_usec = 0; - } - else - { - (void) FileTimeToSystemTime(&KernelTime, &SysTime); - /* - * fprintf(stdout, - * "System sec=%d, msec=%d\n", SysTime.wSecond, SysTime.wMilliseconds); - */ - ru->ru_stime.tv_sec = SysTime.wSecond; - ru->ru_stime.tv_usec = SysTime.wMilliseconds * 1000; - (void) FileTimeToSystemTime(&UserTime, &SysTime); - /* - * fprintf(stdout, - * " User sec=%d, msec=%d\n", SysTime.wSecond, SysTime.wMilliseconds); - */ - ru->ru_utime.tv_sec = SysTime.wSecond; - ru->ru_utime.tv_usec = SysTime.wMilliseconds * 1000; - } - -#else /* __NTVIS__ */ - - struct tms buftime; - times(&buftime); - /* Assumption: HZ <= 2147 (LONG_MAX/1000000) */ - /* info : in lynxOS HZ is called TICKSPERSEC () */ - - ru->ru_stime.tv_sec = buftime.tms_stime / HZ; - ru->ru_stime.tv_usec = ((buftime.tms_stime % HZ) * 1000000) / HZ; - ru->ru_utime.tv_sec = buftime.tms_utime / HZ; - ru->ru_utime.tv_usec = ((buftime.tms_utime % HZ) * 1000000) / HZ; -#endif /* __NTVIS__ */ -return(0); - -} /* static getrusage */ - -#endif /* __sun__ */ -#endif /* __lynx__ */ -#endif /* __osf__ */ -#endif /* SYSV */ -/*--------------------------------------------------------------------------*/ -#if defined(SYSV) -#if defined(__hpux__) || defined(_AIX) || defined(__sun__) -/* gettimeofday defined in the system lib */ -#else -# if defined (__osf__) ||defined (__lynx__) -/* gettimeofday defined in the system lib */ -#else -/*ARGSUSED*/ -static -gettimeofday(tp, zp) -struct timeval *tp; -struct timezone *zp; -{ -#if defined(__NTVIS__) -#if defined(UNDER_CE) - SYSTEMTIME SystemTime; - - GetLocalTime(&SystemTime); - tp->tv_sec = SystemTime.wSecond; - tp->tv_usec = SystemTime.wMilliseconds * 1000; -#else - struct _timeb timeptr; - - _ftime(&timeptr); - tp->tv_sec = timeptr.time; - tp->tv_usec = timeptr.millitm * 1000; -#endif -#else /* all cases */ - tp->tv_sec = time(0); - tp->tv_usec = 0; -#endif /* __NTVIS__ */ -return(1); -} /* static gettimeofday */ - -#endif /*__osf__ || __lynx__ */ -#endif /* __hpux__ || _AIX || __sun__ || __osf__*/ -#endif /* SYSV */ -/*--------------------------------------------------------------------------*/ -/* - * P R E P _ T I M E R - */ -void -prep_timer(void) -{ - gettimeofday(&time0, (struct timezone *)0); - getrusage(RUSAGE_SELF, &ru0); -} -/*--------------------------------------------------------------------------*/ -/* - * R E A D _ T I M E R - * - */ -void -read_timer(void) -{ - getrusage(RUSAGE_SELF, &ru1); - gettimeofday(&time1, (struct timezone *)0); -} -/*--------------------------------------------------------------------------*/ -/* Print the process usage calculated from timers values extracted - * before and after the transfer execution. - */ -void -prusage( - struct rusage *r0, struct rusage *r1, - struct timeval *t0, struct timeval *t1 -) -{ - struct timeval tdiff; - int t, ms; - register char *cp; - double cput = calc_cpu_time(r0, r1); - double realt = calc_real_time(t0, t1); - - /* t == total user delta time + total system delta time */ - if (debug) - { - printf("timers : end startup\n"); - printf("user (sec) : %9ld %9ld\n",r1->ru_utime.tv_sec, - r0->ru_utime.tv_sec); - printf("user (usec): %9ld %9ld\n",r1->ru_utime.tv_usec, - r0->ru_utime.tv_usec); - printf("sys (sec) : %9ld %9ld\n",r1->ru_stime.tv_sec, - r0->ru_stime.tv_sec); - printf("sys (usec): %9ld %9ld\n",r1->ru_stime.tv_usec, - r0->ru_stime.tv_usec); - printf("time (sec) : %9ld %9ld\n",t1->tv_sec,t0->tv_sec); - printf("time (usec): %9ld %9ld\n",t1->tv_usec,t0->tv_usec); - } - /* for the AIX debug, most counters are outside a good range - printf(" r0 r1\n"); - printf("ru_ixrss %20ld %20ld \n", r0->ru_ixrss ,r1->ru_ixrss ); - printf("ru_idrss %20ld %20ld \n", r0->ru_idrss ,r1->ru_idrss ); - printf("ru_isrss %20ld %20ld \n", r0->ru_isrss ,r1->ru_isrss ); - printf("ru_minflt %20ld %20ld \n", r0->ru_minflt ,r1->ru_minflt ); - printf("ru_majflt %20ld %20ld \n", r0->ru_majflt ,r1->ru_majflt ); - printf("ru_nswap %20ld %20ld \n", r0->ru_nswap ,r1->ru_nswap ); - printf("ru_inblock %20ld %20ld \n", r0->ru_inblock ,r1->ru_inblock ); - printf("ru_oublock %20ld %20ld \n", r0->ru_oublock ,r1->ru_oublock ); - printf("ru_msgsnd %20ld %20ld \n", r0->ru_msgsnd ,r1->ru_msgsnd ); - printf("ru_msgrcv %20ld %20ld \n", r0->ru_msgrcv ,r1->ru_msgrcv ); - printf("ru_nsignals %20ld %20ld \n", r0->ru_nsignals ,r1->ru_nsignals); - printf("ru_nvcsw %20ld %20ld \n", r0->ru_nvcsw ,r1->ru_nvcsw ); - printf("ru_nivcsw %20ld %20ld \n", r0->ru_nivcsw ,r1->ru_nivcsw ); - */ - - /* cpu time in mseconds */ - t = (int)(cput / 1000.0); - - /* ms == value of the internal clock at the end of the xfer */ - /* also called real time. */ - /* real time in mseconds */ - ms = (int)(realt / 1000.0); - - /* The display is based on variables provided by the function getrusage - Info located in : /usr/include/sys/resource.h - */ -#if defined(SYSV) - -#if defined(_AIX) - /* with AIX cernsp most counters are wrong - * cp = "%Uuser %Ssys %Ereal %P %Xi+%Dd %Mmaxrss %F+%Rpf %Ccsw\0"; - */ - cp = "%Uuser %Ssys %Ereal %P\0"; - -#else -#if defined(__osf__) - cp = "%Uuser %Ssys %Ereal %P %Xi+%Dd %Mmaxrss %F+%Rpf %Ccsw\0"; -#else -#if defined(sgi) /* IRIX 3.3 will show 0 for %M,%F,%R,%C */ - cp = "%Uuser %Ssys %Ereal %P %Mmaxrss %F+%Rpf %Ccsw\0"; -#else -#if defined(__Lynx__) - cp = "%Uuser %Ssys %Ereal %P\0"; -#else - cp = "%Uuser %Ssys %Ereal %P\0"; /* all SYSV except those mentionned */ -#endif /*__lynx__ */ -#endif /* sgi */ -#endif /*__osf__ */ -#endif /* _AIX */ - -#else /* BSD system */ - cp = "%Uuser %Ssys %Ereal %P %Xi+%Dd %Mmaxrss %F+%Rpf %Ccsw\0"; - -#endif /* SYSV */ - - for (; *cp; cp++) { - if (*cp != '%') { - putc(*cp, stderr); - /* *outp++ = *cp; */ - } else if (cp[1]) - switch(*++cp) { - case 'U': - tvsub(&tdiff, &r1->ru_utime, &r0->ru_utime); - fprintf(stderr,"%ld.%06ld", (long)tdiff.tv_sec, (long)tdiff.tv_usec); - break; - - case 'S': - tvsub(&tdiff, &r1->ru_stime, &r0->ru_stime); - fprintf(stderr,"%ld.%06ld", (long)tdiff.tv_sec, (long)tdiff.tv_usec); - break; - - case 'E': - psecs( ms / 1000); - break; - - case 'P': - fprintf(stderr,"%.1f%%", (cput*100.0 / (realt ? realt : 1.0)) ); - break; - -#if !defined(SYSV) || defined(__osf__) || defined(_AIX) - case 'W': - { - int i = r1->ru_nswap - r0->ru_nswap; - fprintf(stderr,"%d", i); - break; - } - - case 'X': - fprintf(stderr,"%ld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t); - break; - - case 'D': - fprintf(stderr,"%ld", t == 0 ? 0 : - (r1->ru_idrss+r1->ru_isrss - (r0->ru_idrss+r0->ru_isrss))/t); - break; - - case 'K': - fprintf(stderr,"%ld", t == 0 ? 0 : - ((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) - - (r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t); - break; - - case 'M': - fprintf(stderr,"%ld", r1->ru_maxrss/2); - break; - - case 'F': - fprintf(stderr,"%ld", r1->ru_majflt-r0->ru_majflt); - break; - - case 'R': - fprintf(stderr,"%ld", r1->ru_minflt-r0->ru_minflt); - break; - - case 'I': - fprintf(stderr,"%ld", r1->ru_inblock-r0->ru_inblock); - break; - - case 'O': - fprintf(stderr,"%ld", r1->ru_oublock-r0->ru_oublock); - break; - - case 'C': - fprintf(stderr,"%ld+%ld", - r1->ru_nvcsw-r0->ru_nvcsw, r1->ru_nivcsw-r0->ru_nivcsw); - break; -#endif /* !SYSV || __osf__ */ - default: - putc(*cp, stderr); - break; - } /* switch */ - } /* for */ -} -/*--------------------------------------------------------------------------*/ -/* add 2 times structure and move usec bigger than 1000000 to sec */ -void -tvadd(tsum, t0, t1) - struct timeval *tsum, *t0, *t1; -{ - tsum->tv_sec = t0->tv_sec + t1->tv_sec; - tsum->tv_usec = t0->tv_usec + t1->tv_usec; - if (tsum->tv_usec > 1000000) tsum->tv_sec++, tsum->tv_usec -= 1000000; -} -/*--------------------------------------------------------------------------*/ -/* substract 2 time structure (t1 > t0) */ -void -tvsub(tdiff, t1, t0) - struct timeval *tdiff, *t1, *t0; -{ - tdiff->tv_sec = t1->tv_sec - t0->tv_sec; - tdiff->tv_usec = t1->tv_usec - t0->tv_usec; - if (tdiff->tv_usec < 0) tdiff->tv_sec--, tdiff->tv_usec += 1000000; -} - -/*--------------------------------------------------------------------------*/ -void -psecs(int l) -{ - int i = (int)l/3600; - - if (i) { - /* hours:min:sec */ - fprintf(stderr,"%d:", i); - i = (int)l % 3600; - fprintf(stderr,"%.2d:%.2d", i/60, i%60); - } else { - /* min:sec */ - i = (int)l; - fprintf(stderr,"%d:%.2d", i/60, i%60); - } -} -/*--------------------------------------------------------------------------*/ -/* N R E A D */ - -int -Nread(SOCKET s, void* bufp, int count ) -{ -#if defined(__lynx__) || defined(__svr4__) || defined(_AIX) || defined(__NTVIS__) || defined(__FreeBSD__) - struct sockaddr from; -#else - struct sockaddr_in from; -#endif - int len = sizeof(from); - register int cnt; - - if (timeout > 0) { - fd_set readfds, exceptfds; - struct timeval tv_timeout; - int n; - - tv_timeout.tv_sec = timeout/1000; - tv_timeout.tv_usec = (timeout%1000)*1000; - - FD_ZERO(&readfds); - FD_ZERO(&exceptfds); - FD_SET(s, &readfds); - FD_SET(s, &exceptfds); - - n = select( s+1, &readfds, NULL, &exceptfds, &tv_timeout ); - if (n == SOCKET_ERROR) { - sockets_err("select read"); - } else if (n == 0) { - return (0); - } - - } - - if( udp ) - {cnt = recvfrom( s, bufp, count, 0, SOCKADDR_CAST &from, &len ); - numCalls++; - } - else - {if( b_flag ) cnt = mread( s, bufp, count ); /* fill bufp */ - else - { -#if defined(__NTVIS__) - cnt = recv( s, bufp, count, 0 ); -#else - cnt = read( s, bufp, count ); -#endif /* __NTVIS__ */ - numCalls++; - } - if (touchdata && cnt > 0) - {register int c = cnt, sum = 0; - register char *b = bufp; - while (c--) sum += *b++; - } - } - /* rchrch printf (" numcall %d read buffer %d bytes \n",numCalls,cnt); */ - return(cnt); -} -/*--------------------------------------------------------------------------*/ -/* N W R I T E */ - -int -Nwrite( int s, void* bufp, int count ) -{ - register int cnt; - if( udp ) - { - again: - cnt = sendto( s, bufp, count, 0, SOCKADDR_CAST &sinhim, - sizeof(sinhim) ); - - numCalls++; - -#if defined(__NTVIS__) - if( cnt<0 && WSAENOBUFS == WSAGetLastError()) -#else - if( cnt<0 && errno == ENOBUFS ) -#endif /* __NTVIS__ */ - - { delay(18000); errno = 0; goto again; } - } else /* if (udp) */ - { - -#if defined(__NTVIS__) - cnt = send( s, bufp, count, 0 ); - numCalls++; -#else - cnt = write( s, bufp, count ); - numCalls++; -#endif /* __NTVIS__ */ - } - return(cnt); -} -/*--------------------------------------------------------------------------*/ -void -delay(us) -int us; -{ - struct timeval tv; - - tv.tv_sec = 0; - tv.tv_usec = (time_t)us; - -#if defined(__hpux__) - select(1, 0, 0, 0, &tv); -#else - select(1, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv); -#endif -} -/*--------------------------------------------------------------------------*/ -/* M R E A D - * - * This function performs the function of a read(II) but will - * call read(II) multiple times in order to get the requested - * number of characters. This can be necessary because - * network connections don't deliver data with the same - * grouping as it is written with. Written by Robert S. Miles, BRL. - */ -int -mread(int s, char* bufp, unsigned n) -{ - register unsigned count = 0; - register int nread; - - do - { -#if defined(__NTVIS__) - nread = recv(s, bufp, n-count, 0); -#else - nread = read(s, bufp, n-count); -#endif /* __NTVIS__ */ - numCalls++; - if(nread < 0) {perror("ttcp_mread"); return(-1); } - if(nread == 0) return((int)count); - count += (unsigned)nread; - bufp += nread; - }while(count < n); - return((int)count); -} - -/*--------------------------------------------------------------------------*/ -void -open_log() -{static long sysTicks; -#if defined(UNDER_CE) - SYSTEMTIME SystemTime; -#endif - sprintf(logfile,"%s_%s",logfile_head,trans?"t":"r"); - - fprintf(stderr,"open the log file >%s<\n",logfile); - if ((fplog = fopen(logfile,"r")) == NULL) - - {if ((fplog = fopen(logfile,"a+")) == NULL) - {fprintf(stderr,"Failure : creation of the file >%s< \n",logfile ); - exit(1); - } - else - {fprintf(fplog," creation date : "); - /* get date */ -#if defined(UNDER_CE) - GetLocalTime(&SystemTime); - sprintf(fplog,"%02d-%02d-%02d %02d:%02d\n", SystemTime.wDay, month[SystemTime.wMonth - 1], - SystemTime.wYear, SystemTime.wHour, SystemTime.wMinute); -#else - time(&sysTicks); - tms = localtime(&sysTicks); - fprintf(fplog,"%02d-%02d-%02d %02d:%02d\n", - tms->tm_mday, tms->tm_mon, tms->tm_year,tms->tm_hour, tms->tm_min); -#endif - - /* An other version will produce : Mon Aug 4 16:32:16 1997 - * long lDxcomsTicks; char *pDateTime; - * time(&lDxcomsTicks); - * pDateTime = ctime(&lDxcomsTicks); *(pDateTime+24) = '\0'; - * fprintf(fplog," ttcp called : %s", pDateTime); - */ - fprintf(fplog,"format\n"); - fprintf(fplog,",buflen, nbuf(byte), bufalign(byte), bufoffset(byte)"); - fprintf(fplog,", port, sockbufsize(byte), UserTime(sec), SysTime(sec)\n"); - fprintf(fplog,", CPUusage(%%), Validity, nbytes(byte), realt(sec)"); - fprintf(fplog,", rate(MB/sec), I/O call, hours*3600+min*60+sec\n\n"); - /* day-month-year, hour:minute\n\n"); */ - } - } /* file already exist */ - else - {fclose (fplog); - if ((fplog = fopen(logfile,"a+")) == NULL) - {fprintf(stderr,"Failure : access of the file >%s< \n",logfile ); - exit(1); - } - } -} -/*--------------------------------------------------------------------------*/ -void -close_log() -{ -#if defined(UNDER_CE) - SYSTEMTIME SystemTime; - - GetLocalTime(&SystemTime); - fprintf(fplog," %d\n", SystemTime.wHour * 3600 + SystemTime.wMinute * 60 + SystemTime.wSecond); -#else - static long sysTicks; - time(&sysTicks); - tms = localtime(&sysTicks); - fprintf(fplog," %d\n",((tms->tm_hour)*3600 + (tms->tm_min)*60 + tms->tm_sec)); -#endif - fclose(fplog); - fflush(fplog); -} -/*--------------------------------------------------------------------------*/ -/* routine emulating UNIX function under NT */ -#if defined(__NTVIS__) - -/*---------------------------------------------------------------------------*/ -static void -error(char *pch) -{ - if (!opterr) { - return; // without printing - } - fprintf(stderr, "%s: %s: %c\n", - (NULL != progname) ? progname : "getopt", pch, optopt); -} -/*---------------------------------------------------------------------------*/ -int -getopt(int argc, char **argv, char *ostr) -{ - static char *place = EMSG; /* option letter processing */ - register char *oli; /* option letter list index */ - - if (!*place) { - // update scanning pointer - if (optind >= argc || *(place = argv[optind]) != '-' || !*++place) { - place = EMSG; - return -1; - } - // place now points to the first char past the initial '-' - if (place[0] == '-') { - // found "--" - // Was the word just a '--'? - if (place[1] == '\0') - ++optind; // yes, so consume the word - // otherwise, the '--' was the start of a longer word, - // so do not consume it. - place = EMSG; - return -1; - } - } - - /* option letter okay? */ - if ((optopt = (int)*place++) == (int)':' - || !(oli = strchr(ostr, optopt))) { - if (!*place) { - ++optind; - } - error("illegal option"); - return BADCH; - } - if (*++oli != ':') { - /* don't need argument */ - optarg = NULL; - if (!*place) - ++optind; - } else { - /* need an argument */ - if (*place) { - optarg = place; /* no white space */ - } else if (argc <= ++optind) { - /* no arg */ - place = EMSG; - error("option requires an argument"); - return BADCH; - } else { - optarg = argv[optind]; /* white space */ - } - place = EMSG; - ++optind; - } - return optopt; // return option letter -} - -void -usleep(unsigned int microseconds) -{ - Sleep(microseconds/1000); -} -#endif /* __NTVIS__ */ -/*--------------------------------------------------------------------------*/ -/*--------------------------------------------------------------------------*/ -void -do_help() -{ -char More_help[] = -" Details about the reply: \n" -" Example: \n" -" ttcp-t: buflen=8192, nbuf=100, align=16384/0, port=5010\n" -" ttcp-t: File-Descriptor 0x4 Opened\n" -" # tcp sender -> #\n" -" ttcp-t: 819200 bytes in 1.152557 real seconds = 694.109 KB/sec +++\n" -" ttcp-t: 100 I/O calls, 11.526 msec(real)/call, 0.213 msec(cpu)/call\n" -" ttcp-t: 0.001914user 0.019388sys 0:01real 1% 9i+58d 190maxrss 1+2pf 177+180csw\n" -" ttcp-t: buffer address 0x28000\n" -" ttcp-t: File-Descriptor fd 0x4 Closed\n" -" ttcp done.\n\n" -"cpu seconds == (sec) elapse ru_utime + elapse ru_stime.\n" -" ru_utime == The total amount of time running in user mode.\n" -" ru_stime == The total amount of time spent in the system.\n" -" executing on behalf of the process.\n" -"real seconds == elapse time calculated by the system timer (date).\n" -"I/O calls == I/O call to the driver.\n" -"msec/call == average elapse time (Real seconds) between each I/O.\n" -"calls/sec == invert of msec/call.\n" -"user == (sec.msec) elaspe ru_utime.\n" -"sys == (sec.msec) elapse ru_stime.\n" -"real == (min:sec) CPU seconds.\n" -"%% == Real seconds / CPU seconds.\n" -"(ru_ixrss)i+(ru_idrss)d\n" -" ru_ixrss == An integral value indicating the amount of memory \n" -" used by the text segment that was also shared among\n" -" other processes. This value is expressed in units of\n" -" kilobytes * seconds-of-execution and is calculated \n" -" by adding the number of shared memory pages in use \n" -" each time the internal system clock ticks, and then\n" -" averaging over one-second intervals.\n" -" ru_idrss == An integral value of the amount of unshared memory \n" -" in the data segment of a process (expressed in \n" -" units of kilobytes * seconds-of-execution).\n"; - -char More_help1[] = -" (ru_maxrss/2)maxrss.\n" -" ru_maxrss == The maximum size, in kilobytes, of the used\n" -" resident set size. \n" -" (ru_majflt)+(ru_minflt)pf : Page fault\n" -" ru_majflt == The number of page faults serviced that required\n" -" I/O activity.\n" -" ru_minflt == The number of page faults serviced without any\n" -" I/O activity. In this case, I/O activity is \n" -" avoided by reclaiming a page frame from the list \n" -" of pages awaiting reallocation. \n" -"(ru_nvcsw)+(ru_nivcsw)csw : context switch\n" -" ru_nvcsw == The number of times a context switch resulted \n" -" because a process voluntarily gave up the \n" -" processor before its time slice was completed. \n" -" This usually occurs while the process waits \n" -" for availability of a resource.\n" -" ru_nivcsw == The number of times a context switch resulted \n" -" because a higher priority process ran or because\n" -" the current process exceeded its time slice.\n\n"; - -char More_help2[] = -"log file format :\n" -" buflen, nbuf(byte), bufalign(byte), bufoffset(byte)\n" -" port, sockbufsize(byte), UserTime(sec), SysTime(sec), CPUusage(%)\n" -" nbytes(byte), realt(sec), rate(MB/sec), I/O call,\n" -" hours*3600+min*60+sec\n\n"; - - fprintf(stderr,More_help); - fprintf(stderr,More_help1); - fprintf(stderr,More_help2); -} -/*---------------------------------------------------------------------------*/ -void -do_Usage() -{ -char Usage[] = -" Usage: ttcp -t [-options] host [ < in ] ttcp -r [-options > out]\n" -"Example: ttcp -t -s -v -n100 host ttcp -r -s -v -n100\n" -"Common options:\n" -" -V prints version number and date of last modification\n" -" -L create and append all results to a file named ttcp_log\n" -" -h more help\n" -" -l ## length of bufs read from or written to network (default 8192,\n" -" max 65535)\n" -" -u use UDP instead of TCP\n" -" -p ## port number to send to or listen at (default 5010)\n" -#if defined(__linux__) -" -P ## link-layer priority (default 0)\n" -#endif -" -s (ttcp -t) : source a pattern to network\n" -" (ttcp -r) : sink (discard) all data from network\n" -" -A ## align the start of buffers to this modulus (default 16384)\n" -" -O ## start buffers at this offset from the modulus (default 0)\n" -" -v verbose: print more statistics\n" -" -d set SO_DEBUG socket option\n" -" -b ## set socket buffer size (if supported)\n" -" -f X format for rate: b,B = bits, bytes k,K = kilo{bits,bytes};\n" -" m,M = mega{bits,bytes}; g,G = giga{bits,bytes}\n" -" -w ## set timeout value (in milliseconds) to exit if no receive data or tcp connect\n" -"Options specific to (ttcp -t) :\n" -" -n ## number of source bufs written to network (default 2048)\n" -" -x use random data in tcp/udp frames (-I provides seed)\n" -" -D don't buffer TCP writes (sets TCP_NODELAY socket option)\n" -" -H print hash marks to indicate progress, one per buffer\n" -" -I init/seed value for RNG when sending random size bufs (default 1)\n" -" -N ## number of source bufs per burst, i.e between sleeps (default 1)\n" -" -R ## send random size buffers with minimum size specified, max size\n" -" is value of -l option\n" -" -S ## millisecs between bursts (only used for udp, 10ms resolution)\n" -"Options specific to (ttcp -r) :\n" -" -B for -s, only output full blocks as specified by -l (for TAR)\n" -" -T \"touch\": access each byte as it's read\n" -" -i report information on out of order sequence numbers\n" -#if defined(DEBUG) -"Options for debug:\n" -" --nostart do not send UDP start packets\n" -" --noend do not send UDP end packets\n" -" --nodata do not send UDP data packets\n" -" --debug print extra debug outputs\n" -#endif /* DEBUG */ -; - - fprintf(stderr,Usage); -} - -/* Define automatic Emacs variables for consistent code formatting */ -/* Local Variables: */ -/* c-basic-offset:2 */ -/* indent-tabs-mode:nil */ -/* End: */ diff --git a/openwrt/package/uclibc++/Config.in b/openwrt/package/uclibc++/Config.in deleted file mode 100644 index 48c5b6b4774..00000000000 --- a/openwrt/package/uclibc++/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_UCLIBCXX - prompt "uClibc++.......................... C++ library for embedded systems" - tristate - default m if CONFIG_DEVEL - help - A standard C++ library for embedded systems - diff --git a/openwrt/package/uclibc++/Makefile b/openwrt/package/uclibc++/Makefile deleted file mode 100644 index bb085473218..00000000000 --- a/openwrt/package/uclibc++/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=uClibc++ -PKG_VERSION:=0.1.11 -PKG_RELEASE:=1 -PKG_MD5SUM:=8a8e0ee8fefef150c08a649fd7da04aa - -PKG_SOURCE_URL:=http://cxx.uclibc.org/src/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tbz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,UCLIBCXX,uclibc++,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ - -e 's/i.86/i386/' \ - -e 's/sparc.*/sparc/' \ - -e 's/arm.*/arm/g' \ - -e 's/m68k.*/m68k/' \ - -e 's/ppc/powerpc/g' \ - -e 's/v850.*/v850/g' \ - -e 's/sh64/sh/' \ - -e 's/sh[234].*/sh/' \ - -e 's/mips.*/mips/' \ - -e 's/mipsel.*/mips/' \ - -e 's/cris.*/cris/' \ -) - -$(PKG_BUILD_DIR)/.configured: - $(CP) ./files/config.$(UCLIBC_TARGET_ARCH) $(PKG_BUILD_DIR)/.config - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - TOPDIR="$(PKG_BUILD_DIR)/" \ - $(TARGET_CONFIGURE_OPTS) \ - ARCH_CFLAGS="$(TARGET_CFLAGS)" \ - CROSS="$(TARGET_CROSS)" \ - all - touch $@ - -$(IPKG_UCLIBCXX): - install -d -m0755 $(IDIR_UCLIBCXX)/usr/lib - $(CP) $(PKG_BUILD_DIR)/src/libuClibc++*.so* $(IDIR_UCLIBCXX)/usr/lib/ - $(STRIP) $(IDIR_UCLIBCXX)/usr/lib/*.so* - mkdir -p $(PACKAGE_DIR) - $(IPKG_BUILD) $(IDIR_UCLIBCXX) $(PACKAGE_DIR) - -compile-targets: install-dev -install-dev: $(PKG_BUILD_DIR)/.built - $(MAKE) -C $(PKG_BUILD_DIR) \ - TOPDIR="$(PKG_BUILD_DIR)/" \ - $(TARGET_CONFIGURE_OPTS) \ - ARCH_CFLAGS="$(TARGET_CFLAGS)" \ - CROSS="$(TARGET_CROSS)" \ - DESTDIR="$(STAGING_DIR)" \ - install diff --git a/openwrt/package/uclibc++/files/config.i386 b/openwrt/package/uclibc++/files/config.i386 deleted file mode 100644 index 4db0e36efde..00000000000 --- a/openwrt/package/uclibc++/files/config.i386 +++ /dev/null @@ -1,76 +0,0 @@ -# -# Automatically generated make config: don't edit -# -# TARGET_arm is not set -TARGET_i386=y -# TARGET_mips is not set -# TARGET_powerpc is not set - -# -# Target Architecture Features and Options -# -HAVE_ELF=y -TARGET_ARCH="i386" -# CONFIG_GENERIC_386 is not set -# CONFIG_386 is not set -CONFIG_486=y -# CONFIG_586 is not set -# CONFIG_586MMX is not set -# CONFIG_686 is not set -# CONFIG_PENTIUMIII is not set -# CONFIG_PENTIUM4 is not set -# CONFIG_K6 is not set -# CONFIG_K7 is not set -# CONFIG_CRUSOE is not set -# CONFIG_WINCHIPC6 is not set -# CONFIG_WINCHIP2 is not set -# CONFIG_CYRIXIII is not set -ARCH_LITTLE_ENDIAN=y -# ARCH_BIG_ENDIAN is not set -UCLIBCXX_HAS_FLOATS=y -WARNINGS="-Wall" -HAVE_DOT_CONFIG=y - -# -# String and I/O Stream Support -# -UCLIBCXX_HAS_WCHAR=y -UCLIBCXX_IOSTREAM_BUFSIZE=32 -UCLIBCXX_HAS_LFS=y -UCLIBCXX_SUPPORT_CDIR=y -UCLIBCXX_SUPPORT_CIN=y -UCLIBCXX_SUPPORT_COUT=y -UCLIBCXX_SUPPORT_CERR=y -# UCLIBCXX_SUPPORT_CLOG is not set -# UCLIBCXX_SUPPORT_WCIN is not set -# UCLIBCXX_SUPPORT_WCOUT is not set -# UCLIBCXX_SUPPORT_WCERR is not set -# UCLIBCXX_SUPPORT_WCLOG is not set - -# -# STL and Code Expansion -# -UCLIBCXX_STL_BUFFER_SIZE=32 -UCLIBCXX_CODE_EXPANSION=y -# UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS is not set -UCLIBCXX_EXPAND_STRING_CHAR=y -UCLIBCXX_EXPAND_VECTOR_BASIC=y -# UCLIBCXX_EXPAND_IOS_CHAR is not set -# UCLIBCXX_EXPAND_STREAMBUF_CHAR is not set -UCLIBCXX_EXPAND_ISTREAM_CHAR=y -UCLIBCXX_EXPAND_OSTREAM_CHAR=y -UCLIBCXX_EXPAND_FSTREAM_CHAR=y -# UCLIBCXX_EXPAND_SSTREAM_CHAR is not set - -# -# Library Installation Options -# -UCLIBCXX_RUNTIME_PREFIX="" -UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include" -UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib" -UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin" -UCLIBCXX_EXCEPTION_SUPPORT=y -IMPORT_LIBSUP=y -# IMPORT_LIBGCC_EH is not set -# BUILD_STATIC_LIB is not set -# DODEBUG is not set diff --git a/openwrt/package/uclibc++/files/config.mips b/openwrt/package/uclibc++/files/config.mips deleted file mode 100644 index cc9eb49fc48..00000000000 --- a/openwrt/package/uclibc++/files/config.mips +++ /dev/null @@ -1,69 +0,0 @@ -# -# Automatically generated make config: don't edit -# -# TARGET_arm is not set -# TARGET_i386 is not set -TARGET_mips=y -# TARGET_powerpc is not set - -# -# Target Architecture Features and Options -# -HAVE_ELF=y -TARGET_ARCH="mips" -ARCH_CFLAGS="-mno-split-addresses" -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -CONFIG_MIPS_ISA_MIPS32=y -# CONFIG_MIPS_ISA_MIPS64 is not set -ARCH_LITTLE_ENDIAN=y -# ARCH_BIG_ENDIAN is not set -UCLIBCXX_HAS_FLOATS=y -WARNINGS="-Wall" -HAVE_DOT_CONFIG=y - -# -# String and I/O Stream Support -# -UCLIBCXX_HAS_WCHAR=y -UCLIBCXX_IOSTREAM_BUFSIZE=32 -UCLIBCXX_HAS_LFS=y -UCLIBCXX_SUPPORT_CDIR=y -UCLIBCXX_SUPPORT_CIN=y -UCLIBCXX_SUPPORT_COUT=y -UCLIBCXX_SUPPORT_CERR=y -# UCLIBCXX_SUPPORT_CLOG is not set -# UCLIBCXX_SUPPORT_WCIN is not set -# UCLIBCXX_SUPPORT_WCOUT is not set -# UCLIBCXX_SUPPORT_WCERR is not set -# UCLIBCXX_SUPPORT_WCLOG is not set - -# -# STL and Code Expansion -# -UCLIBCXX_STL_BUFFER_SIZE=32 -UCLIBCXX_CODE_EXPANSION=y -# UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS is not set -UCLIBCXX_EXPAND_STRING_CHAR=y -UCLIBCXX_EXPAND_VECTOR_BASIC=y -# UCLIBCXX_EXPAND_IOS_CHAR is not set -# UCLIBCXX_EXPAND_STREAMBUF_CHAR is not set -UCLIBCXX_EXPAND_ISTREAM_CHAR=y -UCLIBCXX_EXPAND_OSTREAM_CHAR=y -UCLIBCXX_EXPAND_FSTREAM_CHAR=y -# UCLIBCXX_EXPAND_SSTREAM_CHAR is not set - -# -# Library Installation Options -# -UCLIBCXX_RUNTIME_PREFIX="" -UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include" -UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib" -UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin" -UCLIBCXX_EXCEPTION_SUPPORT=y -IMPORT_LIBSUP=y -# IMPORT_LIBGCC_EH is not set -# BUILD_STATIC_LIB is not set -# DODEBUG is not set diff --git a/openwrt/package/uclibc++/ipkg/uclibc++.control b/openwrt/package/uclibc++/ipkg/uclibc++.control deleted file mode 100644 index 5919e20c26d..00000000000 --- a/openwrt/package/uclibc++/ipkg/uclibc++.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: uclibc++ -Priority: optional -Section: libs -Description: A standard c++ library for embedded systems diff --git a/openwrt/package/uclibc++/patches/cross-compile.patch b/openwrt/package/uclibc++/patches/cross-compile.patch deleted file mode 100644 index bd149502781..00000000000 --- a/openwrt/package/uclibc++/patches/cross-compile.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN uClibc++.old/extra/Configs/Config.in uClibc++.dev/extra/Configs/Config.in ---- uClibc++.old/extra/Configs/Config.in 2005-01-14 22:47:46.000000000 +0100 -+++ uClibc++.dev/extra/Configs/Config.in 2005-04-25 21:12:01.000000000 +0200 -@@ -38,8 +38,8 @@ - #config TARGET_microblaze - # bool "microblaze" - --#config TARGET_mips --# bool "mips" -+config TARGET_mips -+ bool "mips" - - config TARGET_powerpc - bool "powerpc" diff --git a/openwrt/package/udp-broadcast-relay/Config.in b/openwrt/package/udp-broadcast-relay/Config.in deleted file mode 100644 index da3c2241fea..00000000000 --- a/openwrt/package/udp-broadcast-relay/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_UDP_BROADCAST_RELAY - prompt "udp-broadcast-relay............... listens for packets on a specified UDP broadcast port." - tristate - default m if CONFIG_DEVEL - help - This program listens for packets on a specified UDP broadcast port. When a packet is received, it sends that packet to all specified interfaces but the one it came from as though it originated from the original sender. - - The primary purpose of this is to allow games on machines on separated local networks (Ethernet, WLAN) that use udp broadcasts to find each other to do so. - - It also works on ppp links, so you can log in from windows boxes (e.g. using pptp) and play LAN-based games together. Currently, you have to care about upcoming or downgoing interfaces yourself. - - http://www.joachim-breitner.de/udp-broadcast-relay/ diff --git a/openwrt/package/udp-broadcast-relay/Makefile b/openwrt/package/udp-broadcast-relay/Makefile deleted file mode 100644 index e96d1d2ac45..00000000000 --- a/openwrt/package/udp-broadcast-relay/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=udp-broadcast-relay -PKG_VERSION:=0.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=a32f983b7063d6ac670e6b22be9b9d24 - -PKG_SOURCE_URL:=http://www.joachim-breitner.de/udp-broadcast-relay/files/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,UDP_BROADCAST_RELAY,udp-broadcast-relay,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) $(PKG_BUILD_DIR)/main.c -o $(PKG_BUILD_DIR)/$(PKG_NAME) - touch $@ - -$(IPKG_UDP_BROADCAST_RELAY): - mkdir -p $(IDIR_UDP_BROADCAST_RELAY)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_UDP_BROADCAST_RELAY)/usr/sbin/ - $(STRIP) $(IDIR_UDP_BROADCAST_RELAY)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_UDP_BROADCAST_RELAY) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/udp-broadcast-relay/ipkg/udp-broadcast-relay.control b/openwrt/package/udp-broadcast-relay/ipkg/udp-broadcast-relay.control deleted file mode 100644 index f83247ac706..00000000000 --- a/openwrt/package/udp-broadcast-relay/ipkg/udp-broadcast-relay.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: udp-broadcast-relay -Priority: optional -Section: net -Description: This program listens for packets on a specified UDP broadcast port. When a packet is received, it sends that packet to all specified interfaces but the one it came from as though it originated from the original sender. diff --git a/openwrt/package/ulogd/Config.in b/openwrt/package/ulogd/Config.in deleted file mode 100644 index 81142d92f88..00000000000 --- a/openwrt/package/ulogd/Config.in +++ /dev/null @@ -1,33 +0,0 @@ -menu "ulogd............................. Netfilter userspace logging daemon" - -config BR2_PACKAGE_ULOGD - prompt "ulogd............................. Netfilter userspace logging daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_IPTABLES - help - The netfilter userspace logging daemon - - http://gnumonks.org/projects/ulogd - -config BR2_PACKAGE_ULOGD_MOD_MYSQL - prompt "ulogd-mod-mysql................. Output plugin for logging into a MySQL database" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ULOGD - select BR2_PACKAGE_LIBMYSQLCLIENT - -config BR2_PACKAGE_ULOGD_MOD_PGSQL - prompt "ulogd-mod-pgsql................. Output plugin for logging into a PostgreSQL database" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ULOGD - select BR2_PACKAGE_LIBPQ - -config BR2_PACKAGE_ULOGD_MOD_EXTRA - prompt "ulogd-mod-extra................. All other plugins" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_ULOGD - -endmenu diff --git a/openwrt/package/ulogd/Makefile b/openwrt/package/ulogd/Makefile deleted file mode 100644 index 893fd5b8f99..00000000000 --- a/openwrt/package/ulogd/Makefile +++ /dev/null @@ -1,106 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ulogd -PKG_VERSION:=1.23 -PKG_RELEASE:=2.1 -PKG_MD5SUM:=fa3dfcaacf31855626d5b731b04a077f - -PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \ - ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \ - ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \ - ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL),) -ULOGD_MYSQL_OPTION:=--with-mysql=$(STAGING_DIR)/usr -endif - -ifneq ($(BR2_PACKAGE_ULOGD_MOD_PGSQL),) -ULOGD_PGSQL_OPTION:=--with-pgsql=$(STAGING_DIR)/usr -endif - -define IPKG_plugin_template - -$$(IPKG_$(1)): - install -m0755 -d $$(IDIR_$(1))/usr/lib/ulogd - for m in $(2); do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$$$${m}.so $$(IDIR_$(1))/usr/lib/ulogd/ ; \ - done - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,ULOGD,ulogd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,ULOGD_MOD_EXTRA,ulogd-mod-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call IPKG_plugin_template,ULOGD_MOD_MYSQL,MYSQL)) -$(eval $(call IPKG_plugin_template,ULOGD_MOD_PGSQL,PGSQL)) -$(eval $(call IPKG_plugin_template,ULOGD_MOD_EXTRA,LOCAL LOGEMU OPRINT PWSNIFF SYSLOG)) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_header_pcap_h=no \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - $(ULOGD_MYSQL_OPTION) \ - $(ULOGD_PGSQL_OPTION) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_ULOGD): - install -d -m0755 $(IDIR_ULOGD)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/ulogd.conf $(IDIR_ULOGD)/etc/ - install -d -m0755 $(IDIR_ULOGD)/etc/default - install -m0644 ./files/ulogd.default $(IDIR_ULOGD)/etc/default/ulogd - install -d -m0755 $(IDIR_ULOGD)/etc/init.d - install -m0755 ./files/ulogd.init $(IDIR_ULOGD)/etc/init.d/ulogd - ln -sf ulogd $(IDIR_ULOGD)/etc/init.d/S49ulogd - install -d -m0755 $(IDIR_ULOGD)/usr/lib/ulogd - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_BASE.so $(IDIR_ULOGD)/usr/lib/ulogd/ - install -d -m0755 $(IDIR_ULOGD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(IDIR_ULOGD)/usr/sbin/ - $(RSTRIP) $(IDIR_ULOGD) - $(IPKG_BUILD) $(IDIR_ULOGD) $(PACKAGE_DIR) diff --git a/openwrt/package/ulogd/files/ulogd.default b/openwrt/package/ulogd/files/ulogd.default deleted file mode 100644 index 86bf4448065..00000000000 --- a/openwrt/package/ulogd/files/ulogd.default +++ /dev/null @@ -1 +0,0 @@ -OPTIONS="-d" \ No newline at end of file diff --git a/openwrt/package/ulogd/files/ulogd.init b/openwrt/package/ulogd/files/ulogd.init deleted file mode 100644 index d3863c5f2ac..00000000000 --- a/openwrt/package/ulogd/files/ulogd.init +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -BIN=ulogd -DEFAULT=/etc/default/$BIN -LOG_D=/var/log -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - $BIN $OPTIONS - ;; - *) - echo "usage: $0 (start)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/ulogd/ipkg/ulogd-mod-extra.control b/openwrt/package/ulogd/ipkg/ulogd-mod-extra.control deleted file mode 100644 index 95332ba34ed..00000000000 --- a/openwrt/package/ulogd/ipkg/ulogd-mod-extra.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ulogd-mod-extra -Priority: optional -Section: net -Description: Netfilter userspace logging daemon (extra plugins) -Depends: ulogd diff --git a/openwrt/package/ulogd/ipkg/ulogd-mod-mysql.control b/openwrt/package/ulogd/ipkg/ulogd-mod-mysql.control deleted file mode 100644 index 3556bb1558f..00000000000 --- a/openwrt/package/ulogd/ipkg/ulogd-mod-mysql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ulogd-mod-mysql -Priority: optional -Section: net -Description: Netfilter userspace logging daemon (MySQL plugin) -Depends: libmysqlclient, ulogd diff --git a/openwrt/package/ulogd/ipkg/ulogd-mod-pgsql.control b/openwrt/package/ulogd/ipkg/ulogd-mod-pgsql.control deleted file mode 100644 index dbc97765d5f..00000000000 --- a/openwrt/package/ulogd/ipkg/ulogd-mod-pgsql.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ulogd-mod-pgsql -Priority: optional -Section: net -Description: Netfilter userspace logging daemon (PostgreSQL plugin) -Depends: libpq, ulogd diff --git a/openwrt/package/ulogd/ipkg/ulogd.conffiles b/openwrt/package/ulogd/ipkg/ulogd.conffiles deleted file mode 100644 index 4d41604a91e..00000000000 --- a/openwrt/package/ulogd/ipkg/ulogd.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/default/ulogd -/etc/ulogd.conf diff --git a/openwrt/package/ulogd/ipkg/ulogd.control b/openwrt/package/ulogd/ipkg/ulogd.control deleted file mode 100644 index 48eda41f30e..00000000000 --- a/openwrt/package/ulogd/ipkg/ulogd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ulogd -Priority: optional -Section: net -Description: Netfilter userspace logging daemon diff --git a/openwrt/package/ulogd/patches/ulogd-1.23-gcc4.patch b/openwrt/package/ulogd/patches/ulogd-1.23-gcc4.patch deleted file mode 100644 index 2e2a398f3e8..00000000000 --- a/openwrt/package/ulogd/patches/ulogd-1.23-gcc4.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ur ulogd-1.23/extensions/ulogd_SYSLOG.c ulogd-1.23-owrt/extensions/ulogd_SYSLOG.c ---- ulogd-1.23/extensions/ulogd_SYSLOG.c 2005-02-12 22:17:41.000000000 +0100 -+++ ulogd-1.23-owrt/extensions/ulogd_SYSLOG.c 2006-01-29 19:58:43.000000000 +0100 -@@ -136,7 +136,7 @@ - .name = "syslog", - .init = &syslog_init, - .fini = &syslog_fini, -- .output &_output_syslog -+ .output = &_output_syslog - }; - - -diff -ur ulogd-1.23/include/ulogd/ulogd.h ulogd-1.23-owrt/include/ulogd/ulogd.h ---- ulogd-1.23/include/ulogd/ulogd.h 2004-04-25 00:40:54.000000000 +0200 -+++ ulogd-1.23-owrt/include/ulogd/ulogd.h 2006-01-29 19:58:40.000000000 +0100 -@@ -56,8 +56,6 @@ - #define ULOGD_ERROR 7 /* error condition, requires user action */ - #define ULOGD_FATAL 8 /* fatal, program aborted */ - --extern FILE *logfile; -- - typedef struct ulog_iret { - /* next interpreter return (key) in the global list */ - struct ulog_iret *next; diff --git a/openwrt/package/ulogd/patches/ulogd-1.23-inc-patch.patch b/openwrt/package/ulogd/patches/ulogd-1.23-inc-patch.patch deleted file mode 100644 index b4721121f61..00000000000 --- a/openwrt/package/ulogd/patches/ulogd-1.23-inc-patch.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN ulogd-1.23-old/Rules.make.in ulogd-1.23-new/Rules.make.in ---- ulogd-1.23-old/Rules.make.in 2005-02-19 22:32:40.000000000 +0100 -+++ ulogd-1.23-new/Rules.make.in 2005-05-27 07:45:18.000000000 +0200 -@@ -22,7 +22,7 @@ - CFLAGS+=-DULOGD_CONFIGFILE=\"$(ULOGD_CONFIGFILE)\" - # doesn't work for subdirs - #CFLAGS+=$(INCIPULOG) $(INCCONFFILE) --CFLAGS+=-I/lib/modules/`uname -r`/build/include -+#CFLAGS+=-I/lib/modules/`uname -r`/build/include - #CFLAGS+=@DEFS@ - #CFLAGS+=-g -DDEBUG -DDEBUG_MYSQL -DDEBUG_PGSQL - -diff -ruN ulogd-1.23-old/libipulog/Makefile.in ulogd-1.23-new/libipulog/Makefile.in ---- ulogd-1.23-old/libipulog/Makefile.in 2004-03-23 23:36:06.000000000 +0100 -+++ ulogd-1.23-new/libipulog/Makefile.in 2005-05-27 07:44:21.000000000 +0200 -@@ -1,7 +1,7 @@ - # - - include @top_srcdir@/Rules.make --CFLAGS+=-Iinclude -I/usr/src/linux/include -+CFLAGS+=-Iinclude - - libipulog.a: libipulog.o - $(LD) -i $< -o $@ diff --git a/openwrt/package/ulogd/patches/ulogd-1.23-no-rej.patch b/openwrt/package/ulogd/patches/ulogd-1.23-no-rej.patch deleted file mode 100644 index dd464917fb3..00000000000 --- a/openwrt/package/ulogd/patches/ulogd-1.23-no-rej.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ruN ulogd-1.23-old/ulogd.conf.in.rej ulogd-1.23-new/ulogd.conf.in.rej ---- ulogd-1.23-old/ulogd.conf.in.rej 2005-04-18 16:19:06.000000000 +0200 -+++ ulogd-1.23-new/ulogd.conf.in.rej 1970-01-01 01:00:00.000000000 +0100 -@@ -1,16 +0,0 @@ --*************** --*** 62,68 **** -- user="laforge" -- db="ulogd" -- host="localhost" --- use_ssl=0 -- -- [PGSQL] -- table="ulog" ----- 62,67 ---- -- user="laforge" -- db="ulogd" -- host="localhost" -- -- [PGSQL] -- table="ulog" diff --git a/openwrt/package/updatedd/Config.in b/openwrt/package/updatedd/Config.in deleted file mode 100644 index 77bda5e192d..00000000000 --- a/openwrt/package/updatedd/Config.in +++ /dev/null @@ -1,73 +0,0 @@ -menu "updatedd.......................... A tool to update dynamic dns services" - -config BR2_PACKAGE_UPDATEDD - prompt "updatedd.......................... A tool to update dynamic DNS services" - tristate - default m if CONFIG_DEVEL - help - Updatedd is a small tool that will update one of many dynamic - dns services on boot. - - Please look at the /etc/init.d/S50ddns script for more info. - - http://www.philipp-benner.de/updatedd/ - -if BR2_PACKAGE_UPDATEDD -comment "Plugin Dynamic DNS service" -endif - -config BR2_PACKAGE_UPDATEDD_MOD_CHANGEIP - prompt "updatedd-mod-changeip........... changeip.com" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -config BR2_PACKAGE_UPDATEDD_MOD_DYNDNS - prompt "updatedd-mod-dyndns............. dyndns.org" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -config BR2_PACKAGE_UPDATEDD_MOD_EURODYNDNS - prompt "updatedd-mod-eurodyndns......... eurodyndns.org" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -config BR2_PACKAGE_UPDATEDD_MOD_HN - prompt "updatedd-mod-hn................. hn.org" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -config BR2_PACKAGE_UPDATEDD_MOD_NOIP - prompt "updatedd-mod-noip............... no-ip.com" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -config BR2_PACKAGE_UPDATEDD_MOD_ODS - prompt "updatedd-mod-ods................ ods.org" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -config BR2_PACKAGE_UPDATEDD_MOD_OVH - prompt "updatedd-mod-ovh................ ovh.com" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -config BR2_PACKAGE_UPDATEDD_MOD_REGFISH - prompt "updatedd-mod-regfish............ regfish.com" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -config BR2_PACKAGE_UPDATEDD_MOD_TZO - prompt "updatedd-mod-tzo................ tzo.com" - tristate - depends on BR2_PACKAGE_UPDATEDD - default m if CONFIG_DEVEL - -endmenu diff --git a/openwrt/package/updatedd/Makefile b/openwrt/package/updatedd/Makefile deleted file mode 100644 index 1edc3dd4e84..00000000000 --- a/openwrt/package/updatedd/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=updatedd -PKG_VERSION:=2.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=2957496de0c8e08e9c6492fabf1a88be - -PKG_SOURCE_URL:=http://savannah.nongnu.org/download/updatedd/ -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -define PKG_mod_template - -$$(IPKG_$(1)): - install -d -m0755 $$(IDIR_$(1))/usr/lib/updatedd - install -m0755 $(PKG_INSTALL_DIR)/usr/lib/updatedd/$(2).so $$(IDIR_$(1))/usr/lib/updatedd/ - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef - -$(eval $(call PKG_template,UPDATEDD,updatedd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_CHANGEIP,updatedd-mod-changeip,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_DYNDNS,updatedd-mod-dyndns,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_EURODYNDNS,updatedd-mod-eurodyndns,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_HN,updatedd-mod-hn,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_NOIP,updatedd-mod-noip,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_ODS,updatedd-mod-ods,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_OVH,updatedd-mod-ovh,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_REGFISH,updatedd-mod-regfish,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,UPDATEDD_MOD_TZO,updatedd-mod-tzo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(eval $(call PKG_mod_template,UPDATEDD_MOD_CHANGEIP,changeip)) -$(eval $(call PKG_mod_template,UPDATEDD_MOD_DYNDNS,dyndns)) -$(eval $(call PKG_mod_template,UPDATEDD_MOD_EURODYNDNS,eurodyndns)) -$(eval $(call PKG_mod_template,UPDATEDD_MOD_HN,hn)) -$(eval $(call PKG_mod_template,UPDATEDD_MOD_NOIP,noip)) -$(eval $(call PKG_mod_template,UPDATEDD_MOD_ODS,ods)) -$(eval $(call PKG_mod_template,UPDATEDD_MOD_OVH,ovh)) -$(eval $(call PKG_mod_template,UPDATEDD_MOD_REGFISH,regfish)) -$(eval $(call PKG_mod_template,UPDATEDD_MOD_TZO,tzo)) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --sysconfdir=/etc \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(TARGET_CONFIGURE_OPTS) \ - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_UPDATEDD): - install -d -m0755 $(IDIR_UPDATEDD)/etc/init.d - install -m0755 ./files/S55ddns $(IDIR_UPDATEDD)/etc/init.d/ - install -d -m0755 $(IDIR_UPDATEDD)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/updatedd $(IDIR_UPDATEDD)/usr/bin/ - install -d -m0755 $(IDIR_UPDATEDD)/usr/lib/updatedd - $(RSTRIP) $(IDIR_UPDATEDD) - $(IPKG_BUILD) $(IDIR_UPDATEDD) $(PACKAGE_DIR) diff --git a/openwrt/package/updatedd/files/S55ddns b/openwrt/package/updatedd/files/S55ddns deleted file mode 100644 index b02d5791783..00000000000 --- a/openwrt/package/updatedd/files/S55ddns +++ /dev/null @@ -1,10 +0,0 @@ -ddnsupdate=$(nvram get ddns_update) -[ "$ddnsupdate" = 1 ]&& { - service=$(nvram get ddns_service) - uname=$(nvram get ddns_user) - passwd=$(nvram get ddns_password) - host=$(nvram get ddns_host) - - /usr/bin/updatedd -Y $service -- $uname:$passwd $host -} - diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-changeip.control b/openwrt/package/updatedd/ipkg/updatedd-mod-changeip.control deleted file mode 100644 index 986752b77da..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-changeip.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-changeip -Priority: optional -Section: net -Description: Plugin for updatedd, support for changeip.com dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-dyndns.control b/openwrt/package/updatedd/ipkg/updatedd-mod-dyndns.control deleted file mode 100644 index 93c62fd47b8..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-dyndns.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-dyndns -Priority: optional -Section: net -Description: Plugin for updatedd, support for dyndns.org dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-eurodyndns.control b/openwrt/package/updatedd/ipkg/updatedd-mod-eurodyndns.control deleted file mode 100644 index f29e59810cd..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-eurodyndns.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-eurodyndns -Priority: optional -Section: net -Description: Plugin for updatedd, support for eurodyndns.org dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-hn.control b/openwrt/package/updatedd/ipkg/updatedd-mod-hn.control deleted file mode 100644 index d5b57c076a8..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-hn.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-hn -Priority: optional -Section: net -Description: Plugin for updatedd, support for hn.org dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-noip.control b/openwrt/package/updatedd/ipkg/updatedd-mod-noip.control deleted file mode 100644 index 925bd7685b0..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-noip.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-noip -Priority: optional -Section: net -Description: Plugin for updatedd, support for no-ip.org dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-ods.control b/openwrt/package/updatedd/ipkg/updatedd-mod-ods.control deleted file mode 100644 index e47b4a6e361..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-ods.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-ods -Priority: optional -Section: net -Description: Plugin for updatedd, support for ods.org dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-ovh.control b/openwrt/package/updatedd/ipkg/updatedd-mod-ovh.control deleted file mode 100644 index d1eb9f219a0..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-ovh.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-ovh -Priority: optional -Section: net -Description: Plugin for updatedd, support for ovh.com dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-regfish.control b/openwrt/package/updatedd/ipkg/updatedd-mod-regfish.control deleted file mode 100644 index f17fffe875d..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-regfish.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-regfish -Priority: optional -Section: net -Description: Plugin for updatedd, support for regfish.com dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd-mod-tzo.control b/openwrt/package/updatedd/ipkg/updatedd-mod-tzo.control deleted file mode 100644 index 089dfde077c..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd-mod-tzo.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd-mod-tzo -Priority: optional -Section: net -Description: Plugin for updatedd, support for tzo.com dynamic DNS service. diff --git a/openwrt/package/updatedd/ipkg/updatedd.control b/openwrt/package/updatedd/ipkg/updatedd.control deleted file mode 100644 index f3eafcb48bc..00000000000 --- a/openwrt/package/updatedd/ipkg/updatedd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: updatedd -Priority: optional -Section: net -Description: A tool to update dynamic dns services. diff --git a/openwrt/package/usbutils/Config.in b/openwrt/package/usbutils/Config.in deleted file mode 100644 index c9f525be5bd..00000000000 --- a/openwrt/package/usbutils/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_COMPILE_USBUTILS - tristate - depends BR2_PACKAGE_LSUSB - -config BR2_PACKAGE_LSUSB - prompt "lsusb............................. USB devices listing program" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_USBUTILS - select BR2_PACKAGE_LIBUSB - help - A program to list Linux USB devices - - http://linux-usb.sourceforge.net/ - diff --git a/openwrt/package/usbutils/Makefile b/openwrt/package/usbutils/Makefile deleted file mode 100644 index 5ce35bcfb52..00000000000 --- a/openwrt/package/usbutils/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=usbutils -PKG_VERSION:=0.71 -PKG_RELEASE:=1 -PKG_MD5SUM:=479d7c7098ef44cc95e7978fd71c712c - -PKG_SOURCE_URL:=@SF/linux-usb -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,LSUSB,lsusb,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_func_malloc_0_nonnull=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_LSUSB): - install -d -m0755 $(IDIR_LSUSB)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(IDIR_LSUSB)/usr/share/ - install -d -m0755 $(IDIR_LSUSB)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lsusb $(IDIR_LSUSB)/usr/sbin/ - $(RSTRIP) $(IDIR_LSUSB) - $(IPKG_BUILD) $(IDIR_LSUSB) $(PACKAGE_DIR) diff --git a/openwrt/package/usbutils/ipkg/lsusb.control b/openwrt/package/usbutils/ipkg/lsusb.control deleted file mode 100644 index e9c6dbcc459..00000000000 --- a/openwrt/package/usbutils/ipkg/lsusb.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: lsusb -Priority: optional -Section: net -Depends: libusb -Description: A program to list USB devices diff --git a/openwrt/package/ustl/Config.in b/openwrt/package/ustl/Config.in deleted file mode 100644 index b08bc791dc5..00000000000 --- a/openwrt/package/ustl/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_USTL - prompt "ustl.............................. C++ Standard Template Library for embedded systems" - tristate - default m if CONFIG_DEVEL - help - uSTL is a partial implementation of the STL (Standard Template - Library) that reduces code size by factoring memory management - code into a non-template base class and deriving containers - from it. - - http://ustl.sourceforge.net/ - diff --git a/openwrt/package/ustl/Makefile b/openwrt/package/ustl/Makefile deleted file mode 100644 index f211f812d60..00000000000 --- a/openwrt/package/ustl/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ustl -PKG_VERSION:=0.8 -PKG_RELEASE:=1 -PKG_MD5SUM:=dd59483c327f1bd1356273bc5ae4dde0 - -PKG_SOURCE_URL:=@SF/ustl -PKG_SOURCE:=$(PKG_NAME)-0.8-0.tar.bz2 -PKG_CAT:=bzcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -BR2_PACKAGE_USTL:=m - -$(eval $(call PKG_template,USTL,ustl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - $(CP) ./files/config.h $(PKG_BUILD_DIR)/ - $(CP) ./files/Common.mk $(PKG_BUILD_DIR)/ - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CROSS="$(TARGET_CROSS)" \ - OPTFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_USTL): - install -d -m0755 $(IDIR_USTL)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.so.* $(IDIR_USTL)/usr/lib/ - $(RSTRIP) $(IDIR_USTL) - $(IPKG_BUILD) $(IDIR_USTL) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/lib/libustl.so: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ustl* $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.so* $(STAGING_DIR)/usr/lib/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/lib/libustl.so - -uninstall-dev: - rm -rf \ - $(STAGING_DIR)/usr/include/ustl* \ - $(STAGING_DIR)/usr/lib/libustl.a \ - $(STAGING_DIR)/usr/lib/libustl.so* \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/ustl/files/Common.mk b/openwrt/package/ustl/files/Common.mk deleted file mode 100644 index 88e62329d9f..00000000000 --- a/openwrt/package/ustl/files/Common.mk +++ /dev/null @@ -1,74 +0,0 @@ -LIBNAME = ustl -MAJOR = 0 -MINOR = 8 -BUILD = 0 - -CC = $(CROSS)gcc -CXX = $(CROSS)g++ -LD = $(CROSS)gcc -AR = $(CROSS)ar -RANLIB = $(CROSS)ranlib -DOXYGEN = echo -INSTALL = install -RM = rm -f -LN = ln -sf - -prefix = /usr -exec_prefix = /usr -BINDIR = /usr/bin -INCDIR = /usr/include -LIBDIR = /usr/lib - -DESTDIR = - -INSTALLDIR = ${INSTALL} -d -INSTALLLIB = ${INSTALL} -p -m 644 -INSTALLEXE = ${INSTALL} -p -m 755 -INSTALLDATA = ${INSTALL} -p -m 644 - -CWARNOPTS = -Wall -W -Wpointer-arith -Wno-cast-align \ - -Wcast-qual -Wwrite-strings -Wredundant-decls -CXXWARNOPTS = ${CWARNOPTS} -Wconversion -Wsign-promo -Wsynth -Woverloaded-virtual -PROCESSOR_OPTS = -INLINE_OPTS = -finline-limit=65535 -CUSTOMINCDIR = -CUSTOMLIBDIR = - -BUILD_SHARED = 1 -BUILD_STATIC = 1 -#DEBUG = 1 -#PROFILE = 1 -STANDALONE = -nodefaultlibs - -CFLAGS = \ - ${CUSTOMINCDIR} ${OPTFLAGS} ${CWARNOPTS} ${STANDALONE} -CXXFLAGS = \ - ${CUSTOMINCDIR} ${OPTFLAGS} ${INLINE_OPTS} \ - ${CXXWARNOPTS} ${STANDALONE} -fno-builtin -LDFLAGS = ${CUSTOMLIBDIR} ${STANDALONE} -OPTFLAGS = ${PROCESSOR_OPTS} -ifdef DEBUG - OPTFLAGS += -O0 -g -else - OPTFLAGS += -O3 -DNDEBUG=1 -endif -ifdef PROFILE - OPTFLAGS += -pg -endif -ifdef STANDALONE - LIBS += -lsupc++ -lgcc_eh -lgcc -lc -endif -ifdef BUILD_SHARED - CFLAGS += -fPIC - CXXFLAGS += -fPIC -endif -SHBLDFL = -shared - -LIBA = lib${LIBNAME}.a -LIBSO = lib${LIBNAME}.so -ifdef MAJOR -LIBSOLNK = ${LIBSO}.${MAJOR}.${MINOR} -LIBSOBLD = ${LIBSO}.${MAJOR}.${MINOR}.${BUILD} -endif -TOCLEAN += ${LIBSO} ${LIBA} ${LIBSOBLD} - diff --git a/openwrt/package/ustl/files/config.h b/openwrt/package/ustl/files/config.h deleted file mode 100644 index 348649678a7..00000000000 --- a/openwrt/package/ustl/files/config.h +++ /dev/null @@ -1,286 +0,0 @@ -// config.h -// -// Autogenerated from config.h.in by bsconf. -// - -#ifndef CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F -#define CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F - -// Define to the one symbol short name of this package. -#define USTL_NAME "ustl" -// Define to the full name and version of this package. -#define USTL_STRING "ustl 0.8" -// Define to the version of this package. -#define USTL_VERSION 0x080 -// Define to the address where bug reports for this package should be sent. -#define USTL_BUGREPORT "Mike Sharov " - -/// Define to 1 if you want stream operations to throw exceptions on -/// insufficient data or insufficient space. All these errors should -/// be preventable in output code; the input code should verify the -/// data in a separate step. It slows down stream operations a lot, -/// but it's your call. By default only debug builds throw. -/// -#undef WANT_STREAM_BOUNDS_CHECKING - -#if !defined(WANT_STREAM_BOUNDS_CHECKING) && !defined(NDEBUG) - #define WANT_STREAM_BOUNDS_CHECKING 1 -#endif - -/// Define to 1 if you want to build without libstdc++ -#define WITHOUT_LIBSTDCPP 1 - -/// Define to 1 if you don't want the standard streams. -/// You will not be able to run bvt tests if you do this. -/// -#undef WITHOUT_CIN_COUT_CERR - -/// Define GNU extensions if unavailable. -#ifndef __GNUC__ - /// GCC (and some other compilers) define '__attribute__'; ustl is using this - /// macro to alert the compiler to flag inconsistencies in printf/scanf-like - /// function calls. Just in case '__attribute__' isn't defined, make a dummy. - /// - #ifndef __attribute__ - #define __attribute__(p) - #endif -#endif -#if defined(__GNUC__) && (__GNUC__ >= 4) - #define DLL_EXPORT __attribute__((visibility("default"))) - #define DLL_LOCAL __attribute__((visibility("hidden"))) -#else - #define DLL_EXPORT - #define DLL_LOCAL -#endif -#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(__i386__) - /// GCC 3+ supports the prefetch directive, which some CPUs use to improve caching - #define prefetch(p,rw,loc) __builtin_prefetch(p,rw,loc) -#else - #define prefetch(p,rw,loc) -#endif -#if !defined(__GNUC__) || (__GNUC__ < 3) - /// __alignof__ returns the recommended alignment for the type - #define __alignof__(v) min(sizeof(v), sizeof(void*)) -#endif - -/// Define to 1 if you have the `atexit' function. -#define HAVE_ATEXIT 1 - -/// Define to 1 if you have the header file. -#define HAVE_ASSERT_H 1 - -/// Define to 1 if you have the header file. -#define HAVE_CTYPE_H 1 - -/// Define to 1 if you have the header file. -#define HAVE_ERRNO_H 1 - -/// Define to 1 if you have the header file. -#define HAVE_FCNTL_H 1 - -/// Define to 1 if you have the header file. -#define HAVE_FLOAT_H 1 - -/// Define to 1 if you have the header file. -#define HAVE_INTTYPES_H 1 - -/// Define to 1 if you have the header file. -#define HAVE_LIMITS_H 1 - -/// Define to 1 if you have the header file. -#define HAVE_LOCALE_H 1 - -/// Define to 1 if your system has a working `malloc' function. -#define HAVE_MALLOC 1 - -// Define to 1 if you have the header file. -#define HAVE_MALLOC_H 1 - -// Define to 1 if you have the header file. -#define HAVE_ALLOCA_H 1 - -// Define to 1 if you have the `memchr' function. -#define HAVE_MEMCHR 1 - -// Define to 1 if you have the `memmove' function. -#define HAVE_MEMMOVE 1 - -// Define to 1 if you have the header file. -#define HAVE_MEMORY_H 1 - -// Define to 1 if you have the `memset' function. -#define HAVE_MEMSET 1 - -// Define to 1 if the system has the type `ptrdiff_t'. -#define HAVE_PTRDIFF_T 1 - -// Define to 1 if you have the header file. -#define HAVE_SIGNAL_H 1 - -// Define to 1 if you have the __va_copy function -#define HAVE_VA_COPY 1 - -// Define to 1 if `stat' has the bug that it succeeds when given the -// zero-length file name argument. -/* #undef HAVE_STAT_EMPTY_STRING_BUG */ - -// Define to 1 if you have the header file. -#define HAVE_STDARG_H 1 - -// Define to 1 if you have the header file. -#define HAVE_STDDEF_H 1 - -// Define to 1 if you have the header file. -#define HAVE_STDINT_H 1 - -// Define to 1 if you have the header file. -#define HAVE_STDIO_H 1 - -// Define to 1 if you have the header file. -#define HAVE_STDLIB_H 1 - -// Define to 1 if you have the `strerror' function. -#define HAVE_STRERROR 1 - -// Define to 1 if you have the header file. -#define HAVE_STRINGS_H 1 - -// Define to 1 if you have the header file. -#define HAVE_STRING_H 1 - -// Define to 1 if you have the `strrchr' function. -#define HAVE_STRRCHR 1 - -// Define to 1 if you have the `strsignal' function. -#define HAVE_STRSIGNAL 1 - -// Define to 1 if you have the `strtol' function. -#define HAVE_STRTOL 1 - -// Define to 1 if you have the header file. -#define HAVE_SYS_STAT_H 1 - -// Define to 1 if you have the header file. -#define HAVE_SYS_TYPES_H 1 - -// Define to 1 if you have that is POSIX.1 compatible. -#define HAVE_SYS_WAIT_H 1 - -// Define to 1 if you have the header file. -#define HAVE_TIME_H 1 - -// Define to 1 if you have the header file. -#define HAVE_UNISTD_H 1 - -// Define to 1 if you have the header file. -#define HAVE_MATH_H 1 - -// Define to 1 if you have the rintf function. Will use rint otherwise. -#undef HAVE_RINTF - -// STDC_HEADERS is defined to 1 on sane systems. -#if defined(HAVE_ASSERT_H) && defined(HAVE_CTYPE_H) &&\ - defined(HAVE_ERRNO_H) && defined(HAVE_FLOAT_H) &&\ - defined(HAVE_LIMITS_H) && defined(HAVE_LOCALE_H) &&\ - defined(HAVE_MATH_H) && defined(HAVE_SIGNAL_H) &&\ - defined(HAVE_STDARG_H) && defined(HAVE_STDDEF_H) &&\ - defined(HAVE_STDIO_H) && defined(HAVE_STDLIB_H) &&\ - defined(HAVE_STRING_H) && defined(HAVE_TIME_H) -#define STDC_HEADERS 1 -#endif - -// STDC_HEADERS is defined to 1 on unix systems. -#if defined(HAVE_FCNTL_H) && defined(HAVE_SYS_STAT_H) && defined(HAVE_UNISTD_H) -#define STDUNIX_HEADERS 1 -#endif - -// Define to 1 if you have the header file. -#if (__GNUC__ >= 3) // gcc 2.95 somehow doesn't recognize 'asm volatile' in libc byteswap.h -#define HAVE_BYTESWAP_H 1 -#endif - -// Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 - -// Define to 1 if your compiler treats char as a separate type along with -// signed char and unsigned char. This will create overloads for char. -#define HAVE_THREE_CHAR_TYPES 1 - -// Define as the return type of signal handlers (`int' or `void'). -#define RETSIGTYPE void - -// Define to 1 if you have 64 bit types available -#define HAVE_INT64_T 1 - -// Define to 1 if you have the long long type -#define HAVE_LONG_LONG 1 - -// Define to 1 if you want unrolled specializations for fill and copy -#undef WANT_UNROLLED_COPY - -// Define to 1 if you want to use MMX/SSE/3dNow! processor instructions -#undef WANT_MMX - -// Define to byte sizes of types -#define SIZE_OF_CHAR 1 -#define SIZE_OF_SHORT 2 -#define SIZE_OF_INT 4 -#define SIZE_OF_LONG 4 -#define SIZE_OF_LONG_LONG 8 -#define SIZE_OF_POINTER 4 -#define SIZE_OF_SIZE_T 4 -#define SIZE_OF_BOOL SIZE_OF_CHAR -#undef SIZE_T_IS_LONG - -// Byte order macros, converted in utypes.h -#define USTL_LITTLE_ENDIAN 4321 -#define USTL_BIG_ENDIAN 1234 -#define USTL_BYTE_ORDER USTL_LITTLE_ENDIAN - -// Extended CPU capabilities -#define CPU_HAS_FPU 1 -#define CPU_HAS_EXT_DEBUG 1 -#define CPU_HAS_TIMESTAMPC 1 -#define CPU_HAS_MSR 1 -#define CPU_HAS_CMPXCHG8 1 -#define CPU_HAS_APIC 1 -#define CPU_HAS_SYSCALL 1 -#define CPU_HAS_MTRR 1 -#define CPU_HAS_CMOV 1 -#define CPU_HAS_FCMOV 1 -#if WANT_MMX -#undef CPU_HAS_MMX 1 -#undef CPU_HAS_FXSAVE -#undef CPU_HAS_SSE 1 -#undef CPU_HAS_SSE2 1 -#undef CPU_HAS_SSE3 -#undef CPU_HAS_EXT_3DNOW -#undef CPU_HAS_3DNOW -#endif - -// GCC vector extensions -#if defined(CPU_HAS_MMX) || defined(CPU_HAS_SSE) - #undef HAVE_VECTOR_EXTENSIONS -#endif - -#if CPU_HAS_SSE && defined(__GNUC__) - #define __sse_align __attribute__((aligned(16))) -#else - #define __sse_align -#endif - -// Define to empty if `const' does not conform to ANSI C. -/* #define const */ - -// Define as `__inline' if that's what the C compiler calls it, or to nothing -// if it is not supported. -/* #define inline __inline */ - -// Define to `long' if does not define. -/* typedef long off_t; */ - -// Define to `unsigned' if does not define. -/* typedef long size_t; */ - -#endif // CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F - diff --git a/openwrt/package/ustl/ipkg/ustl.control b/openwrt/package/ustl/ipkg/ustl.control deleted file mode 100644 index 210877d62f4..00000000000 --- a/openwrt/package/ustl/ipkg/ustl.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ustl -Priority: optional -Section: libs -Description: An STL (Standard Template Library) for embedded systems diff --git a/openwrt/package/ustl/patches/01-install-DESTDIR.patch b/openwrt/package/ustl/patches/01-install-DESTDIR.patch deleted file mode 100644 index ec3a959d3f9..00000000000 --- a/openwrt/package/ustl/patches/01-install-DESTDIR.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -ruN ustl-0.8-old/Makefile ustl-0.8-new/Makefile ---- ustl-0.8-old/Makefile 2005-11-10 21:06:53.000000000 +0100 -+++ ustl-0.8-new/Makefile 2005-12-08 13:57:07.000000000 +0100 -@@ -39,35 +39,35 @@ - .PHONY: install-static install-shared uninstall-static uninstall-shared - - install-shared: ${LIBSOBLD} install-incs -- @echo "Installing ${LIBSOBLD} to ${LIBDIR} ..." -- @${INSTALLDIR} ${LIBDIR} -- @${INSTALLLIB} ${LIBSOBLD} ${LIBDIR} -- @(cd ${LIBDIR}; ${RM} ${LIBSO} ${LIBSOLNK}; ${LN} -sf ${LIBSOBLD} ${LIBSO}; ${LN} -sf ${LIBSOBLD} ${LIBSOLNK}) -+ @echo "Installing ${LIBSOBLD} to ${DESTDIR}${LIBDIR} ..." -+ @${INSTALLDIR} ${DESTDIR}${LIBDIR} -+ @${INSTALLLIB} ${LIBSOBLD} ${DESTDIR}${LIBDIR} -+ @(cd ${DESTDIR}${LIBDIR}; ${RM} ${LIBSO} ${LIBSOLNK}; ${LN} -sf ${LIBSOBLD} ${LIBSO}; ${LN} -sf ${LIBSOBLD} ${LIBSOLNK}) - - uninstall-shared: uninstall-incs -- @echo "Removing ${LIBSOBLD} from ${LIBDIR} ..." -- @${RM} -f ${LIBDIR}/${LIBSO} ${LIBDIR}/${LIBSOLNK} ${LIBDIR}/${LIBSOBLD} -+ @echo "Removing ${LIBSOBLD} from ${DESTDIR}${LIBDIR} ..." -+ @${RM} -f ${DESTDIR}${LIBDIR}/${LIBSO} ${DESTDIR}${LIBDIR}/${LIBSOLNK} ${DESTDIR}${LIBDIR}/${LIBSOBLD} - - install-static: ${LIBA} install-incs -- @echo "Installing ${LIBA} to ${LIBDIR} ..." -- @${INSTALLDIR} ${LIBDIR} -- @${INSTALLLIB} ${LIBA} ${LIBDIR} -+ @echo "Installing ${LIBA} to ${DESTDIR}${LIBDIR} ..." -+ @${INSTALLDIR} ${DESTDIR}${LIBDIR} -+ @${INSTALLLIB} ${LIBA} ${DESTDIR}${LIBDIR} - - uninstall-static: uninstall-incs -- @echo "Removing ${LIBA} from ${LIBDIR} ..." -- @${RM} -f ${LIBDIR}/${LIBA} -+ @echo "Removing ${LIBA} from ${DESTDIR}${LIBDIR} ..." -+ @${RM} -f ${DESTDIR}${LIBDIR}/${LIBA} - - install-incs: ${INCS} -- @echo "Installing headers to ${INCDIR} ..." -- @${INSTALLDIR} ${INCDIR}/${LIBNAME} -+ @echo "Installing headers to ${DESTDIR}${INCDIR} ..." -+ @${INSTALLDIR} ${DESTDIR}${INCDIR}/${LIBNAME} - @for i in $(filter-out ${LIBNAME}.h,${INCS}); do \ -- ${INSTALLDATA} $$i ${INCDIR}/${LIBNAME}/$$i; \ -+ ${INSTALLDATA} $$i ${DESTDIR}${INCDIR}/${LIBNAME}/$$i; \ - done; -- @${INSTALLDATA} ${LIBNAME}.h ${INCDIR} -+ @${INSTALLDATA} ${LIBNAME}.h ${DESTDIR}${INCDIR} - - uninstall-incs: -- @echo "Removing headers from ${INCDIR} ..." -- @${RM} -rf ${INCDIR}/${LIBNAME} ${INCDIR}/${LIBNAME}.h -+ @echo "Removing headers from ${DESTDIR}${INCDIR} ..." -+ @${RM} -rf ${DESTDIR}${INCDIR}/${LIBNAME} ${DESTDIR}${INCDIR}/${LIBNAME}.h - - - %.o: %.cc diff --git a/openwrt/package/ustl/patches/02-install_path.patch b/openwrt/package/ustl/patches/02-install_path.patch deleted file mode 100644 index 3a7cf8a05d4..00000000000 --- a/openwrt/package/ustl/patches/02-install_path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN ustl.old/Common.mk.in ustl.dev/Common.mk.in ---- ustl.old/Common.mk.in 2005-11-10 21:06:53.000000000 +0100 -+++ ustl.dev/Common.mk.in 2006-03-23 16:12:05.000000000 +0100 -@@ -9,7 +9,7 @@ - AR = @AR@ - RANLIB = @RANLIB@ - DOXYGEN = @DOXYGEN@ --INSTALL = @INSTALL@ -+INSTALL = install - RM = @RM@ - LN = @LN@ - diff --git a/openwrt/package/util-linux/Config.in b/openwrt/package/util-linux/Config.in deleted file mode 100644 index 8faceb6e7cc..00000000000 --- a/openwrt/package/util-linux/Config.in +++ /dev/null @@ -1,42 +0,0 @@ -menu "util-linux" - -config BR2_COMPILE_UTIL_LINUX - tristate - default n - depends BR2_PACKAGE_FDISK || BR2_PACKAGE_SWAP_UTILS - -config BR2_PACKAGE_FDISK - prompt "fdisk............................. Partition table manipulation utility" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_UTIL_LINUX - help - A partition table manipulation utility - - http://www.kernel.org/pub/linux/utils/util-linux/ - -config BR2_PACKAGE_LOSETUP - prompt "losetup........................... Loop devices setup and control utility" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_UTIL_LINUX - select BR2_PACKAGE_KMOD_LOOP - help - A loop devices setup and control utility - - http://www.kernel.org/pub/linux/utils/util-linux/ - -config BR2_PACKAGE_SWAP_UTILS - prompt "swap-utils........................ Swap space management utilities" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_UTIL_LINUX - help - A collection of tools to manage swap space : - * mkswap - * swapon - * swapoff - - http://www.kernel.org/pub/linux/utils/util-linux/ - -endmenu diff --git a/openwrt/package/util-linux/Makefile b/openwrt/package/util-linux/Makefile deleted file mode 100644 index 6e8f5abd7ff..00000000000 --- a/openwrt/package/util-linux/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fdisk -PKG_VERSION:=2.12r -PKG_RELEASE:=1 -PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3 - -PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/util-linux/ \ - http://ftp.kernel.org/pub/linux/utils/util-linux/ \ - ftp://ftp.de.kernel.org/pub/linux/utils/util-linux/ \ - http://ftp.de.kernel.org/pub/linux/utils/util-linux/ -PKG_SOURCE:=util-linux-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/util-linux-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,FDISK,fdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,LOSETUP,losetup,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,SWAP_UTILS,swap-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - OPT="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - INSTALLSUID="install -m 4755" \ - all install - touch $@ - -$(IPKG_FDISK): - install -d -m0755 $(IDIR_FDISK)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/fdisk $(IDIR_FDISK)/usr/sbin/ - $(RSTRIP) $(IDIR_FDISK) - $(IPKG_BUILD) $(IDIR_FDISK) $(PACKAGE_DIR) - -$(IPKG_LOSETUP): - install -d -m0755 $(IDIR_LOSETUP)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/losetup $(IDIR_LOSETUP)/usr/sbin/ - $(RSTRIP) $(IDIR_LOSETUP) - $(IPKG_BUILD) $(IDIR_LOSETUP) $(PACKAGE_DIR) - -$(IPKG_SWAP_UTILS): - install -d -m0755 $(IDIR_SWAP_UTILS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/mkswap $(IDIR_SWAP_UTILS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/swap{on,off} $(IDIR_SWAP_UTILS)/usr/sbin/ - $(RSTRIP) $(IDIR_SWAP_UTILS) - $(IPKG_BUILD) $(IDIR_SWAP_UTILS) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/util-linux/ipkg/fdisk.control b/openwrt/package/util-linux/ipkg/fdisk.control deleted file mode 100644 index cf73e98df3e..00000000000 --- a/openwrt/package/util-linux/ipkg/fdisk.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: fdisk -Priority: optional -Section: admin -Depends: -Description: Partition table manipulation utility diff --git a/openwrt/package/util-linux/ipkg/losetup.control b/openwrt/package/util-linux/ipkg/losetup.control deleted file mode 100644 index 50230505850..00000000000 --- a/openwrt/package/util-linux/ipkg/losetup.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: losetup -Priority: optional -Section: admin -Depends: kmod-loop -Description: Loop devices setup and control utility diff --git a/openwrt/package/util-linux/ipkg/swap-utils.control b/openwrt/package/util-linux/ipkg/swap-utils.control deleted file mode 100644 index c888251f637..00000000000 --- a/openwrt/package/util-linux/ipkg/swap-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: swap-utils -Priority: optional -Section: admin -Depends: -Description: Swap space management utilities diff --git a/openwrt/package/util-linux/patches/501-mconfig.patch b/openwrt/package/util-linux/patches/501-mconfig.patch deleted file mode 100644 index 67e6530de9e..00000000000 --- a/openwrt/package/util-linux/patches/501-mconfig.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- util-linux-2.12r-orig/MCONFIG 2004-12-13 00:15:48.000000000 +0100 -+++ util-linux-2.12r/MCONFIG 2005-10-03 17:54:15.945049312 +0200 -@@ -16,8 +16,8 @@ - # Select for ARCH one of intel, alpha, sparc, arm, m68k, mips - # Select for CPU i386 if the binaries must be able to run on an intel 386 - # (by default i486 code is generated, see below) --CPU=$(shell uname -m) --ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') -+CPU= -+ARCH=mips - - # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp - # will use PAM for authentication. Additionally, passwd will not be -@@ -64,12 +64,12 @@ - # If HAVE_WRITE is set to "yes", then write will not be built or - # installed from the misc-utils subdirectory. - # (There is a network aware write in netwrite from NetKit 0.16 or later.) --HAVE_WRITE=no -+HAVE_WRITE=yes - - # If HAVE_GETTY is set to "yes", then agetty will not be built or - # installed from the login-utils subdirectory. Note that agetty can - # co-exist with other gettys, so this option should never be used. --HAVE_GETTY=no -+HAVE_GETTY=yes - - # If USE_TTY_GROUP is set to "yes", then wall and write will be installed - # setgid to the "tty" group, and mesg will only set the group write bit. -@@ -82,13 +82,13 @@ - # If HAVE_KILL is set to "yes", then kill will not be built or - # installed from the misc-utils subdirectory. - # (There is also a kill in the procps package.) --HAVE_KILL=no -+HAVE_KILL=yes - - # If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN - # to the current user, allowing her to make a screendump and do other - # nifty things on the console, but also allowing him to keep an open - # file descriptor after logging out to trick the next user. --ALLOW_VCS_USE=yes -+ALLOW_VCS_USE=no - - # If DO_STAT_MAIL is set to "yes", then login will stat() the mailbox - # and tell the user that she has new mail. This can hang the login if -@@ -102,19 +102,19 @@ - # If HAVE_SLN is set to "yes", then sln won't be installed - # (but the man page sln.8 will be installed anyway). - # sln also comes with libc and glibc. --HAVE_SLN=no -+HAVE_SLN=yes - - # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed. --HAVE_FDUTILS=no -+HAVE_FDUTILS=yes - - # If SILENT_PG is set to "yes", then pg will not ring the bell - # when an invalid key is pressed --SILENT_PG=no -+SILENT_PG=yes - - # If configure decides that Native Language Support (NLS) is available, - # it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set - # DISABLE_NLS to "yes". --DISABLE_NLS=no -+DISABLE_NLS=yes - - # Different optimizations for different cpus. - # Before gcc 2.8.0 only -m486 diff --git a/openwrt/package/vgp/Config.in b/openwrt/package/vgp/Config.in deleted file mode 100755 index db543c3451f..00000000000 --- a/openwrt/package/vgp/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_VGP - prompt "vgp............................... a daemon working like Cisco(c) HSRP" - tristate - default m if CONFIG_DEVEL - help - VGP (Virtual Gateway Protocol)is a very simple protocol able to - work in a way similar to Cisco(c) HSRP. It implements the idea - of Virtual Gateway to provide fault tollerance (and load - balancing) on your net. Each client on your net has as its - default gateway the virtual gateway and not the real router. - - http://vgpd.freaknet.org/ diff --git a/openwrt/package/vgp/Makefile b/openwrt/package/vgp/Makefile deleted file mode 100755 index 29fd8711ec4..00000000000 --- a/openwrt/package/vgp/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vgp -PKG_VERSION:=0.2.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=b8c25b5dfcb944f78bbc584be9c230c7 -PKG_SOURCE_URL:=http://vgpd.freaknet.org/files/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VGP,vgp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) DESTDIR=$(PKG_INSTALL_DIR) -C $(PKG_BUILD_DIR) install - touch $@ - -$(IPKG_VGP): - mkdir -p $(IDIR_VGP) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_VGP)/ - $(RSTRIP) $(IDIR_VGP) - $(IPKG_BUILD) $(IDIR_VGP) $(PACKAGE_DIR) diff --git a/openwrt/package/vgp/ipkg/vgp.control b/openwrt/package/vgp/ipkg/vgp.control deleted file mode 100755 index 18fdc91ee92..00000000000 --- a/openwrt/package/vgp/ipkg/vgp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: vgp -Section: net -Architecture: mipsel -Priority: optional -Description: vgp is a daemon working like Cisco(c) HSRP diff --git a/openwrt/package/vim/Config.in b/openwrt/package/vim/Config.in deleted file mode 100644 index b7b0a249aa2..00000000000 --- a/openwrt/package/vim/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_VIM - prompt "vim............................... VI Improved" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - An improved version of VI. - - http://www.vim.org - diff --git a/openwrt/package/vim/Makefile b/openwrt/package/vim/Makefile deleted file mode 100644 index a769373b5c1..00000000000 --- a/openwrt/package/vim/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vim -PKG_VERSION:=5.8 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=ftp://ftp.vim.org/pub/vim/unix/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz -PKG_MD5SUM:= -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VIM,vim,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR)/src; rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ac_cv_c_bigendian=no \ - ac_cv_sizeof_off_t=8 \ - ac_cv_sizeof_int=4 \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --program-prefix="" \ - $(DISABLE_NLS) \ - --enable-min-features \ - --disable-gui \ - --without-x \ - --disable-multibyte \ - --disable-cscope \ - --disable-gpm \ - --with-tlib=ncurses \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) - touch $@ - -$(IPKG_VIM): - mkdir -p $(IDIR_VIM)/usr/bin - mkdir -p $(IDIR_VIM)//usr/share/vim - $(CP) ./files/vimrc $(IDIR_VIM)//usr/share/vim - $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(IDIR_VIM)/usr/bin/ - $(RSTRIP) $(IDIR_VIM) - $(IPKG_BUILD) $(IDIR_VIM) $(PACKAGE_DIR) diff --git a/openwrt/package/vim/files/vimrc b/openwrt/package/vim/files/vimrc deleted file mode 100644 index 792d68076ac..00000000000 --- a/openwrt/package/vim/files/vimrc +++ /dev/null @@ -1,13 +0,0 @@ -set showcmd " Show (partial) command in status line. -set showmatch " Show matching brackets. -set ignorecase " Do case insensitive matching -set incsearch " Incremental search -set autowrite " Automatically save before commands like :next and :make -set nocompatible " Use Vim defaults instead of 100% vi compatibility -set backspace=indent,eol,start " more powerful backspacing -set autoindent " always set autoindenting on -set linebreak " Don't wrap words by default -set textwidth=0 " Don't wrap lines by default -set ruler " show the cursor position all the time - - diff --git a/openwrt/package/vim/ipkg/vim.control b/openwrt/package/vim/ipkg/vim.control deleted file mode 100644 index 2b5d9284315..00000000000 --- a/openwrt/package/vim/ipkg/vim.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: vim -Priority: optional -Section: text -Depends: libncurses -Description: Vi Improved diff --git a/openwrt/package/vim/patches/vim_configure.patch b/openwrt/package/vim/patches/vim_configure.patch deleted file mode 100644 index c8ae5c8f284..00000000000 --- a/openwrt/package/vim/patches/vim_configure.patch +++ /dev/null @@ -1,248 +0,0 @@ -This patch is required to stop vim's configure script from insisting on -compiling test programs which obviously do not work in a cross compiled -environment. - ---- vim-5.8_original/src/configure 2001-05-11 04:59:18.000000000 +1000 -+++ vim-5.8/src/configure 2006-03-24 01:04:55.000000000 +1100 -@@ -995,10 +995,6 @@ - - test "$GCC" = yes && CFLAGS="$CFLAGS -Wall" - --if test "$cross_compiling" = yes; then -- { echo "configure: error: cannot compile a simple program, check CC and CFLAGS" 1>&2; exit 1; } --fi -- - test "$GCC" = yes && CPP_MM=M; - - if test -f ./toolcheck; then -@@ -3365,29 +3361,7 @@ - - echo $ac_n "checking quality of toupper""... $ac_c" 1>&6 - echo "configure:3368: checking quality of toupper" >&5 --if test "$cross_compiling" = yes; then -- { echo "configure: error: failed to compile test program" 1>&2; exit 1; } --else -- cat > conftest.$ac_ext < --main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); } --EOF --if { (eval echo configure:3378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF --#define BROKEN_TOUPPER 1 --EOF -- echo "$ac_t""bad" 1>&6 --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""good" 1>&6 --fi --rm -fr conftest* --fi -+echo "$ac_t""good" 1>&6 - - - echo $ac_n "checking whether __DATE__ and __TIME__ work""... $ac_c" 1>&6 -@@ -4340,34 +4314,10 @@ - if test "x$olibs" != "x$LIBS"; then - echo $ac_n "checking whether we talk terminfo""... $ac_c" 1>&6 - echo "configure:4343: checking whether we talk terminfo" >&5 -- if test "$cross_compiling" = yes; then -- { echo "configure: error: failed to compile test program." 1>&2; exit 1; } --else -- cat > conftest.$ac_ext < --#endif --main() --{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); } --EOF --if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- echo "$ac_t""no -- we are in termcap land" 1>&6 --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF -+echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF - #define TERMINFO 1 - EOF - --fi --rm -fr conftest* --fi -- - else - echo "$ac_t""none found" 1>&6 - fi -@@ -4600,70 +4550,14 @@ - - echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6 - echo "configure:4603: checking for struct sigcontext" >&5 --cat > conftest.$ac_ext < --test_sig() --{ -- struct sigcontext *scont; -- scont = (struct sigcontext *)0; -- return 1; --} --int main() { -- --; return 0; } --EOF --if { (eval echo configure:4619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- rm -rf conftest* -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+cat >> confdefs.h <<\EOF - #define HAVE_SIGCONTEXT 1 - EOF - --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- echo "$ac_t""no" 1>&6 --fi --rm -f conftest* -- - echo $ac_n "checking getcwd implementation""... $ac_c" 1>&6 - echo "configure:4635: checking getcwd implementation" >&5 --if test "$cross_compiling" = yes; then -- { echo "configure: error: failed to compile test program" 1>&2; exit 1; } --else -- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- echo "$ac_t""it is usable" 1>&6 --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""it stinks" 1>&6 -- cat >> confdefs.h <<\EOF --#define BAD_GETCWD 1 --EOF -- --fi --rm -fr conftest* --fi -- -+echo "$ac_t""it is usable" 1>&6 - - for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpwnam getpwuid \ - gettimeofday getwd lstat memcmp memset nanosleep opendir putenv qsort \ -@@ -4872,89 +4766,11 @@ - - echo $ac_n "checking whether memmove/bcopy/memcpy handle overlaps""... $ac_c" 1>&6 - echo "configure:4875: checking whether memmove/bcopy/memcpy handle overlaps" >&5 --bcopy_test_prog=' --main() { -- char buf[10]; -- strcpy(buf, "abcdefghi"); -- mch_memmove(buf, buf + 2, 3); -- if (strncmp(buf, "ababcf", 6)) -- exit(1); -- strcpy(buf, "abcdefghi"); -- mch_memmove(buf + 2, buf, 3); -- if (strncmp(buf, "cdedef", 6)) -- exit(1); -- exit(0); /* libc version works properly. */ --}' -- -- --if test "$cross_compiling" = yes; then -- { echo "configure: error: failed to compile test program" 1>&2; exit 1; } --else -- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF -+cat >> confdefs.h <<\EOF - #define USEMEMMOVE 1 --EOF -- echo "$ac_t""memmove does" 1>&6 --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- if test "$cross_compiling" = yes; then -- { echo "configure: error: failed to compile test program" 1>&2; exit 1; } --else -- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF - #define USEBCOPY 1 --EOF -- echo "$ac_t""bcopy does" 1>&6 --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- if test "$cross_compiling" = yes; then -- { echo "configure: error: failed to compile test program" 1>&2; exit 1; } --else -- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF - #define USEMEMCPY 1 - EOF -- echo "$ac_t""memcpy does" 1>&6 --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""no" 1>&6 --fi --rm -fr conftest* --fi -- --fi --rm -fr conftest* --fi -- --fi --rm -fr conftest* --fi -- -- - - if test "$enable_multibyte" = "yes"; then - cflags_save=$CFLAGS diff --git a/openwrt/package/vnc-reflector/Config.in b/openwrt/package/vnc-reflector/Config.in deleted file mode 100755 index 22679fcedfe..00000000000 --- a/openwrt/package/vnc-reflector/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_VNC_REFLECTOR - prompt "vnc-reflector..................... VNC proxy for multiple clients" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBJPEG - select BR2_PACKAGE_ZLIB - help - VNC Reflector is a specialized VNC server which acts as - a proxy sitting between real VNC server (a host) and a - number of VNC clients. It was designed to work efficiently - with large number of clients. - - http://sourceforge.net/projects/vnc-reflector - diff --git a/openwrt/package/vnc-reflector/Makefile b/openwrt/package/vnc-reflector/Makefile deleted file mode 100644 index 00d1cbad0f9..00000000000 --- a/openwrt/package/vnc-reflector/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vnc-reflector -PKG_VERSION:=1.2.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=c3f88bc62f228b335c25c07f9744ab0c - -PKG_SOURCE_URL:=@SF/vnc-reflector -PKG_SOURCE:=vnc_reflector-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/vnc_reflector - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VNC_REFLECTOR,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - OFLAGS="$(TARGET_CFLAGS)" \ - STAGING_DIR=$(STAGING_DIR) \ - default - touch $@ - -$(IPKG_VNC_REFLECTOR): - install -d -m0755 $(IDIR_VNC_REFLECTOR)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/vncreflector $(IDIR_VNC_REFLECTOR)/usr/sbin/ - $(RSTRIP) $(IDIR_VNC_REFLECTOR) - $(IPKG_BUILD) $(IDIR_VNC_REFLECTOR) $(PACKAGE_DIR) diff --git a/openwrt/package/vnc-reflector/ipkg/vnc-reflector.control b/openwrt/package/vnc-reflector/ipkg/vnc-reflector.control deleted file mode 100755 index 293a0a07016..00000000000 --- a/openwrt/package/vnc-reflector/ipkg/vnc-reflector.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: vnc-reflector -Depends: jpeg, zlib -Section: net -Architecture: mipsel -Priority: optional -Description: VNC Reflector is a specialized VNC server which acts as a proxy sitting between real VNC server (a host) and a number of VNC clients. It was designed to work efficiently with large number of clients. diff --git a/openwrt/package/vnc-reflector/patches/01-honor_include_lib_path.patch b/openwrt/package/vnc-reflector/patches/01-honor_include_lib_path.patch deleted file mode 100644 index fb409ac43f3..00000000000 --- a/openwrt/package/vnc-reflector/patches/01-honor_include_lib_path.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- vnc_reflector/Makefile.orig 2005-12-14 01:25:53.000000000 +0100 -+++ vnc_reflector/Makefile 2005-12-14 01:28:05.000000000 +0100 -@@ -14,10 +14,11 @@ - # - # Variables you might want to edit: CFLAGS, CONFFLAGS - --IFLAGS = -I. -+IFLAGS = -I. -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -+OFLAGS = -O2 - - # Production --CFLAGS = -O2 $(IFLAGS) -+CFLAGS = $(OFLAGS) $(IFLAGS) - # Debug (strict) - #CFLAGS = -g -pedantic -Wall $(IFLAGS) - # Debug (profiling) -@@ -29,7 +30,7 @@ - CONFFLAGS = -DUSE_POLL - - # Link with zlib and JPEG libraries --LDFLAGS = -L/usr/local/lib -lz -ljpeg -+LDFLAGS = -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lz -ljpeg - - PROG = vncreflector - diff --git a/openwrt/package/vncrepeater/Config.in b/openwrt/package/vncrepeater/Config.in deleted file mode 100644 index 418f48509a7..00000000000 --- a/openwrt/package/vncrepeater/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config BR2_PACKAGE_VNCREPEATER - prompt "vncrepeater....................... UltraVNC repeater for Linux" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_UCLIBCXX - help - Viewer can be behind Nat router or directly connected to the internet - - Instead of forwarding serveral ports, you only need to forward 1 port - - If the PC that runs the Repeater has access to the local DNS server, - you can use your local DNS names instead of 10.10.10.12. - - This could be handy when you have a dynamic DHCP server allocating - ip adresses for your PC. - - http://ultravnc.sourceforge.net/addons/repeater.html diff --git a/openwrt/package/vncrepeater/Makefile b/openwrt/package/vncrepeater/Makefile deleted file mode 100644 index c41c4a24c72..00000000000 --- a/openwrt/package/vncrepeater/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id: Makefile 3112 2006-02-01 23:53:19Z mbm $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vncrepeater -PKG_VERSION:=0.12 -PKG_RELEASE:=1 -PKG_MD5SUM:=bf89c31d7cb51a267a8d5ac388e0508d - -PKG_SOURCE_URL:=http://www.rit.edu/~reh5586/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VNCREPEATER,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - repeater - touch $@ - -$(IPKG_VNCREPEATER): - install -d -m0755 $(IDIR_VNCREPEATER)/usr/sbin $(IDIR_VNCREPEATER)/etc - $(CP) $(PKG_BUILD_DIR)/repeater $(IDIR_VNCREPEATER)/usr/sbin/$(PKG_NAME) - $(CP) $(PKG_BUILD_DIR)/u$(PKG_NAME).ini $(IDIR_VNCREPEATER)/etc/ - $(RSTRIP) $(IDIR_VNCREPEATER) - $(IPKG_BUILD) $(IDIR_VNCREPEATER) $(PACKAGE_DIR) - diff --git a/openwrt/package/vncrepeater/ipkg/vncrepeater.control b/openwrt/package/vncrepeater/ipkg/vncrepeater.control deleted file mode 100644 index 3996c860759..00000000000 --- a/openwrt/package/vncrepeater/ipkg/vncrepeater.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: vncrepeater -Section: net -Depends: uclibc++ -Priority: optional -Description: UltraVNC repeater for Linux diff --git a/openwrt/package/vncrepeater/patches/01-uclibcxx_linking.patch b/openwrt/package/vncrepeater/patches/01-uclibcxx_linking.patch deleted file mode 100644 index 06020eeba51..00000000000 --- a/openwrt/package/vncrepeater/patches/01-uclibcxx_linking.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urN vncrepeater-0.12/Makefile vncrepeater-0.12.new/Makefile ---- vncrepeater-0.12/Makefile 2006-03-31 07:40:14.000000000 +0200 -+++ vncrepeater-0.12.new/Makefile 2006-04-11 10:26:06.345879104 +0200 -@@ -1,21 +1,21 @@ --CFLAGS=-Wall -+CFLAGS=-Wall - repeater: repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o -- g++ $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o -+ $(CC) $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o -nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -luClibc++ - - repeater.o: repeater.cpp -- g++ $(CFLAGS) -c repeater.cpp -+ $(CC) $(CFLAGS) -c repeater.cpp - - repeaterproc.o: repeaterproc.cpp -- g++ $(CFLAGS) -c repeaterproc.cpp -+ $(CC) $(CFLAGS) -c repeaterproc.cpp - - openbsd_stringfuncs.o: openbsd_stringfuncs.cpp -- g++ $(CFLAGS) -c openbsd_stringfuncs.cpp -+ $(CC) $(CFLAGS) -c openbsd_stringfuncs.cpp - - iniparser.o: iniparser.cpp -- g++ $(CFLAGS) -c iniparser.cpp -+ $(CC) $(CFLAGS) -c iniparser.cpp - - readini.o: readini.cpp -- g++ $(CFLAGS) -c readini.cpp -+ $(CC) $(CFLAGS) -c readini.cpp - - clean: - rm -f *.o repeater diff --git a/openwrt/package/vrrpd/Config.in b/openwrt/package/vrrpd/Config.in deleted file mode 100644 index 767e2dd0ecd..00000000000 --- a/openwrt/package/vrrpd/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_VRRPD - prompt "vrrpd............................. Virtual Router Redundancy Protocol daemon" - tristate - default m if CONFIG_DEVEL - help - VRRPd is an implementation of Virtual Router Redundancy - Protocol as specified in rfc2338. VRRPd is interoperable with - other RFC-based VRRP implementations, including Cisco and - Juniper, and is included as a standard feature on ImageStream - routers. - - http://www.sourceforge.net/projects/vrrpd - diff --git a/openwrt/package/vrrpd/Makefile b/openwrt/package/vrrpd/Makefile deleted file mode 100644 index 8805450c643..00000000000 --- a/openwrt/package/vrrpd/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vrrpd -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=6d5066ea1a6ced817376ca0f54765447 - -PKG_SOURCE_URL:=@SF/vrrpd -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VRRPD,vrrpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - DBG_OPT="" \ - MAIN_OPT="$(TARGET_CFLAGS)" \ - vrrpd - touch $@ - -$(IPKG_VRRPD): - install -d -m0755 $(IDIR_VRRPD)/etc/default - install -m0644 ./files/vrrpd.default $(IDIR_VRRPD)/etc/default/vrrpd - install -d -m0755 $(IDIR_VRRPD)/etc/init.d - install -m0755 ./files/vrrpd.init $(IDIR_VRRPD)/etc/init.d/vrrpd - install -d -m0755 $(IDIR_VRRPD)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/vrrpd $(IDIR_VRRPD)/usr/sbin/ - $(RSTRIP) $(IDIR_VRRPD) - $(IPKG_BUILD) $(IDIR_VRRPD) $(PACKAGE_DIR) diff --git a/openwrt/package/vrrpd/files/vrrpd.default b/openwrt/package/vrrpd/files/vrrpd.default deleted file mode 100644 index 0dfee0cfb91..00000000000 --- a/openwrt/package/vrrpd/files/vrrpd.default +++ /dev/null @@ -1,4 +0,0 @@ -ID=1 -IF=vlan1 -IP=10.0.0.1 -OPTIONS="-i $IF -v $ID $IP" diff --git a/openwrt/package/vrrpd/files/vrrpd.init b/openwrt/package/vrrpd/files/vrrpd.init deleted file mode 100644 index 5afc7343818..00000000000 --- a/openwrt/package/vrrpd/files/vrrpd.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -BIN=vrrpd -DEFAULT=/etc/default/$BIN -[ -f $DEFAULT ] && . $DEFAULT -RUN_D=/var/run -PID_F=$RUN_D/$BIN_${IF}_${ID}.pid - -case $1 in - start) - $BIN $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/vrrpd/ipkg/vrrpd.conffiles b/openwrt/package/vrrpd/ipkg/vrrpd.conffiles deleted file mode 100644 index 9680ca3c051..00000000000 --- a/openwrt/package/vrrpd/ipkg/vrrpd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/vrrpd diff --git a/openwrt/package/vrrpd/ipkg/vrrpd.control b/openwrt/package/vrrpd/ipkg/vrrpd.control deleted file mode 100644 index 435dda18f55..00000000000 --- a/openwrt/package/vrrpd/ipkg/vrrpd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: vrrpd -Priority: optional -Section: net -Description: An implementation of the Virtual Router Redundancy Protocol diff --git a/openwrt/package/vsftpd/Config.in b/openwrt/package/vsftpd/Config.in deleted file mode 100644 index 2db92870987..00000000000 --- a/openwrt/package/vsftpd/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_VSFTPD - prompt "vsftpd............................ Fast and secure FTP server" - tristate - default m if CONFIG_DEVEL - help - A fast and secure FTP server - - http://vsftpd.beasts.org/ - diff --git a/openwrt/package/vsftpd/Makefile b/openwrt/package/vsftpd/Makefile deleted file mode 100644 index d3c72c85983..00000000000 --- a/openwrt/package/vsftpd/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vsftpd -PKG_VERSION:=2.0.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=c0bf8c7b8e15ab15827172786fc56115 - -PKG_SOURCE_URL:=ftp://vsftpd.beasts.org/users/cevans/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VSFTPD,vsftpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - vsftpd install - touch $@ - -$(IPKG_VSFTPD): - install -d -m0755 $(IDIR_VSFTPD)/etc - install -m0644 ./files/vsftpd.conf $(IDIR_VSFTPD)/etc/vsftpd.conf - install -d -m0755 $(IDIR_VSFTPD)/etc/init.d - install -m0755 ./files/vsftpd.init $(IDIR_VSFTPD)/etc/init.d/vsftpd - install -d -m0755 $(IDIR_VSFTPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vsftpd $(IDIR_VSFTPD)/usr/sbin/ - $(RSTRIP) $(IDIR_VSFTPD) - $(IPKG_BUILD) $(IDIR_VSFTPD) $(PACKAGE_DIR) diff --git a/openwrt/package/vsftpd/files/vsftpd.conf b/openwrt/package/vsftpd/files/vsftpd.conf deleted file mode 100644 index f3ba34f507b..00000000000 --- a/openwrt/package/vsftpd/files/vsftpd.conf +++ /dev/null @@ -1,17 +0,0 @@ -background=YES -listen=YES -anonymous_enable=NO -local_enable=YES -write_enable=YES -local_umask=022 -check_shell=NO -#dirmessage_enable=YES -#ftpd_banner=Welcome to blah FTP service. -session_support=NO -#syslog_enable=YES -#userlist_enable=YES -#userlist_deny=NO -#userlist_file=/etc/vsftpd.users -#xferlog_enable=YES -#xferlog_file=/var/log/vsftpd.log -#xferlog_std_format=YES diff --git a/openwrt/package/vsftpd/files/vsftpd.init b/openwrt/package/vsftpd/files/vsftpd.init deleted file mode 100644 index 4d4f4f240dd..00000000000 --- a/openwrt/package/vsftpd/files/vsftpd.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -RUN_D=/var/run/vsftpd - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - vsftpd - ;; - *) - echo "usage: $0 (start)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/vsftpd/ipkg/vsftpd.conffiles b/openwrt/package/vsftpd/ipkg/vsftpd.conffiles deleted file mode 100644 index 45632cf3117..00000000000 --- a/openwrt/package/vsftpd/ipkg/vsftpd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/vsftpd.conf diff --git a/openwrt/package/vsftpd/ipkg/vsftpd.control b/openwrt/package/vsftpd/ipkg/vsftpd.control deleted file mode 100644 index 6c7e49039b3..00000000000 --- a/openwrt/package/vsftpd/ipkg/vsftpd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: vsftpd -Priority: optional -Section: net -Description: a fast and secure FTP server diff --git a/openwrt/package/vsftpd/patches/chroot.patch b/openwrt/package/vsftpd/patches/chroot.patch deleted file mode 100644 index e80d1377b31..00000000000 --- a/openwrt/package/vsftpd/patches/chroot.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- vsftpd-2.0.4-orig/tunables.c 2006-01-07 20:32:44.000000000 +0100 -+++ vsftpd-2.0.4/tunables.c 2006-01-11 18:25:15.000000000 +0100 -@@ -92,7 +92,7 @@ - unsigned int tunable_max_per_ip = 0; - unsigned int tunable_trans_chunk_size = 0; - --const char* tunable_secure_chroot_dir = "/usr/share/empty"; -+const char* tunable_secure_chroot_dir = "/var/run/vsftpd"; - const char* tunable_ftp_username = "ftp"; - const char* tunable_chown_username = "root"; - const char* tunable_xferlog_file = "/var/log/xferlog"; diff --git a/openwrt/package/vsftpd/patches/destdir.patch b/openwrt/package/vsftpd/patches/destdir.patch deleted file mode 100644 index 13f39547535..00000000000 --- a/openwrt/package/vsftpd/patches/destdir.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- vsftpd-2.0.4-orig/Makefile 2005-06-29 00:24:03.000000000 +0200 -+++ vsftpd-2.0.4/Makefile 2006-01-11 18:29:12.000000000 +0100 -@@ -17,6 +17,8 @@ - ssl.o sysutil.o sysdeputil.o - - -+DESTDIR = -+ - .c.o: - $(CC) -c $*.c $(CFLAGS) $(IFLAGS) - -@@ -24,21 +26,20 @@ - $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS) $(LDFLAGS) - - install: -- if [ -x /usr/local/sbin ]; then \ -- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \ -- else \ -- $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi -- if [ -x /usr/local/man ]; then \ -- $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \ -- $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \ -- elif [ -x /usr/share/man ]; then \ -- $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \ -- $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \ -- else \ -- $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \ -- $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi -- if [ -x /etc/xinetd.d ]; then \ -- $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi -+ mkdir -p $(DESTDIR)/usr/sbin -+ $(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/ -+ mkdir -p $(DESTDIR)/usr/share/man/man8 -+ $(INSTALL) -m 644 vsftpd.8 $(DESTDIR)/usr/share/man/man8/ -+ mkdir -p $(DESTDIR)/usr/share/man/man5 -+ $(INSTALL) -m 644 vsftpd.conf.5 $(DESTDIR)/usr/share/man/man5/ -+ mkdir -p $(DESTDIR)/etc/xinetd.d -+ $(INSTALL) -m 644 xinetd.d/vsftpd $(DESTDIR)/etc/xinetd.d/ -+ -+uninstall: -+ rm -f $(DESTDIR)/usr/sbin/vsftpd -+ rm -f $(DESTDIR)/usr/share/man/man8/vsftpd.8 -+ rm -f $(DESTDIR)/usr/share/man/man5/vsftpd.conf.5 -+ rm -f $(DESTDIR)/etc/xinetd.d/vsftpd - - clean: - rm -f *.o *.swp vsftpd diff --git a/openwrt/package/vsftpd/patches/find-libs.patch b/openwrt/package/vsftpd/patches/find-libs.patch deleted file mode 100644 index ae8e9f7dbf9..00000000000 --- a/openwrt/package/vsftpd/patches/find-libs.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ruN vsftpd-1.2.2-orig/Makefile vsftpd-1.2.2-3/Makefile ---- vsftpd-1.2.2-orig/Makefile 2003-09-15 13:41:58.000000000 +0200 -+++ vsftpd-1.2.2-3/Makefile 2005-03-09 22:23:12.000000000 +0100 -@@ -5,8 +5,8 @@ - #CFLAGS = -g - CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion - --LIBS = `./vsf_findlibs.sh` --LINK = -Wl,-s -+LIBS = -lcrypt -lnsl -+LINK = - - OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ - tunables.o ftpdataio.o secbuf.o ls.o \ diff --git a/openwrt/package/vtun/Config.in b/openwrt/package/vtun/Config.in deleted file mode 100644 index c2fa9f50b04..00000000000 --- a/openwrt/package/vtun/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_VTUN - prompt "vtun.............................. VPN tunneling daemon" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBLZO - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_ZLIB - help - A VPN tunneling daemon - - http://vtun.sourceforge.net - diff --git a/openwrt/package/vtun/Makefile b/openwrt/package/vtun/Makefile deleted file mode 100644 index 306c25d3fe0..00000000000 --- a/openwrt/package/vtun/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vtun -PKG_VERSION:=2.6 -PKG_RELEASE:=1 -PKG_MD5SUM:=309534fd03c5d13a19c43916f61f4bbf - -PKG_SOURCE_URL:=@SF/vtun -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VTUN,vtun,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR) ; rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LIBS="-L$(STAGING_DIR)/usr/lib" \ - BLOWFISH_HDR_DIR="$(STAGING_DIR)/usr/include/openssl" \ - LZO_HDR_DIR="$(STAGING_DIR)/usr/include" \ - SSL_HDR_DIR="$(STAGING_DIR)/usr/include/openssl" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - vtund - touch $@ - -$(IPKG_VTUN): - install -m0755 -d $(IDIR_VTUN)/etc - install -m0600 $(PKG_BUILD_DIR)/vtund.conf $(IDIR_VTUN)/etc/ - install -m0755 -d $(IDIR_VTUN)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/vtund $(IDIR_VTUN)/usr/sbin/ - $(RSTRIP) $(IDIR_VTUN) - $(IPKG_BUILD) $(IDIR_VTUN) $(PACKAGE_DIR) diff --git a/openwrt/package/vtun/ipkg/vtun.conffiles b/openwrt/package/vtun/ipkg/vtun.conffiles deleted file mode 100644 index 1195041c56c..00000000000 --- a/openwrt/package/vtun/ipkg/vtun.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/vtund.conf diff --git a/openwrt/package/vtun/ipkg/vtun.control b/openwrt/package/vtun/ipkg/vtun.control deleted file mode 100644 index 6d823de1e4b..00000000000 --- a/openwrt/package/vtun/ipkg/vtun.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: vtun -Priority: optional -Section: net -Description: A VPN tunnel daemon -Depends: libopenssl, liblzo, zlib, kmod-tun diff --git a/openwrt/package/watchdog/Config.in b/openwrt/package/watchdog/Config.in deleted file mode 100644 index 5827fda9951..00000000000 --- a/openwrt/package/watchdog/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_WATCHDOG - prompt "watchdog.......................... configurable watchdog" - tristate - default m if CONFIG_DEVEL - help - watchdog - diff --git a/openwrt/package/watchdog/Makefile b/openwrt/package/watchdog/Makefile deleted file mode 100644 index 415fc40ca7a..00000000000 --- a/openwrt/package/watchdog/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=watchdog -PKG_VERSION:=5.2.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=c6ac132d92110eb2c4670d4f684105c3 - -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/w/watchdog -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WATCHDOG,watchdog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CCOPT="$(TARGET_CFLAGS)" \ - INCLS="-I. -I$(STAGING_DIR)/usr/include" \ - LIBS="-L$(STAGING_DIR)/usr/lib" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_WATCHDOG): - install -d -m0755 $(IDIR_WATCHDOG)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/watchdog.conf $(IDIR_WATCHDOG)/etc/ - install -d -m0755 $(IDIR_WATCHDOG)/etc/init.d - install -m0755 ./files/watchdog.init $(IDIR_WATCHDOG)/etc/init.d/watchdog - ln -sf watchdog $(IDIR_WATCHDOG)/etc/init.d/S90watchdog - install -d -m0755 $(IDIR_WATCHDOG)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/watchdog $(IDIR_WATCHDOG)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/wd_keepalive $(IDIR_WATCHDOG)/usr/sbin/ - $(RSTRIP) $(IDIR_WATCHDOG) - $(IPKG_BUILD) $(IDIR_WATCHDOG) $(PACKAGE_DIR) diff --git a/openwrt/package/watchdog/files/watchdog.init b/openwrt/package/watchdog/files/watchdog.init deleted file mode 100644 index 8a45df92d01..00000000000 --- a/openwrt/package/watchdog/files/watchdog.init +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -RUN_D=/var/run -PID_F=$RUN_D/watchdog.pid - -case $1 in - start) - /usr/sbin/watchdog - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/watchdog/ipkg/watchdog.conffiles b/openwrt/package/watchdog/ipkg/watchdog.conffiles deleted file mode 100644 index 3ef13592a04..00000000000 --- a/openwrt/package/watchdog/ipkg/watchdog.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/watchdog.conf diff --git a/openwrt/package/watchdog/ipkg/watchdog.control b/openwrt/package/watchdog/ipkg/watchdog.control deleted file mode 100644 index 1cde1974e62..00000000000 --- a/openwrt/package/watchdog/ipkg/watchdog.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: watchdog -Priority: opt -Section: sys -Description: watchdog diff --git a/openwrt/package/watchdog/patches/01-fstab-sys_siglist.patch b/openwrt/package/watchdog/patches/01-fstab-sys_siglist.patch deleted file mode 100644 index a71ca5951c0..00000000000 --- a/openwrt/package/watchdog/patches/01-fstab-sys_siglist.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- watchdog-5.2.4.orig.orig/src/fstab.c 2003-01-28 07:47:38.000000000 +0100 -+++ watchdog-5.2.4.orig/src/fstab.c 2005-12-29 20:05:47.859043112 +0100 -@@ -237,7 +237,7 @@ - /* Ensure that the lock is released if we are interrupted. */ - static void - handler (int sig) { -- die (EX_USER, "%s", sys_siglist[sig]); -+ die (EX_USER, "%s", "sys_siglist[sig]"); - } - - static void diff --git a/openwrt/package/wccpd/Config.in b/openwrt/package/wccpd/Config.in deleted file mode 100644 index ed219ed5f7d..00000000000 --- a/openwrt/package/wccpd/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_WCCPD - prompt "wccpd............................. a Web Cache Coordination daemon" - tristate - default m if CONFIG_DEVEL - help - wccpd is a WCCP (Web Cache Coordination Protocol) server daemon - It allows a router (running Linux) to redirect web traffic to a - group of Squid servers using WCCP as the monitoring/controling - protocol. - - http://wccpd.sourceforge.net/ diff --git a/openwrt/package/wccpd/Makefile b/openwrt/package/wccpd/Makefile deleted file mode 100644 index 0ecb34e1b49..00000000000 --- a/openwrt/package/wccpd/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wccpd -PKG_VERSION:=0.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=5f15c274de61dfb88e0dbfc1ccbe6b67 - -PKG_SOURCE_URL:=@SF/wccpd -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WCCPD,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAAGING_DIR)/lib" \ - ac_cv_func_setpgrp_void=yes \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --with-gnu-ld \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - all install - touch $@ - -$(IPKG_WCCPD): - install -d -m0755 $(IDIR_WCCPD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/wccpd $(IDIR_WCCPD)/usr/sbin/ - $(RSTRIP) $(IDIR_WCCPD) - $(IPKG_BUILD) $(IDIR_WCCPD) $(PACKAGE_DIR) diff --git a/openwrt/package/wccpd/ipkg/wccpd.control b/openwrt/package/wccpd/ipkg/wccpd.control deleted file mode 100644 index e62539a7d52..00000000000 --- a/openwrt/package/wccpd/ipkg/wccpd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: wccpd -Priority: optional -Section: net -Description: A WCCP (Web Cache Coordination Protocol) server daemon diff --git a/openwrt/package/weechat/Config.in b/openwrt/package/weechat/Config.in deleted file mode 100644 index 810345a3b28..00000000000 --- a/openwrt/package/weechat/Config.in +++ /dev/null @@ -1,25 +0,0 @@ -menu "weechat........................... Lightweight IRC client" - -config BR2_PACKAGE_WEECHAT - prompt "weechat.......................... Lightweight IRC client" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBNCURSES - help - Fast, light & extensible IRC client - - http://weechat.flashtux.org - -config BR2_COMPILE_WEECHAT_WITH_TLS - prompt "Enable TLS support" - bool - select BR2_PACKAGE_GNUTLS - depends BR2_PACKAGE_WEECHAT - -config BR2_COMPILE_WEECHAT_WITH_LUA - prompt "Enable LUA scripting" - bool - select BR2_PACKAGE_LIBLUA - depends BR2_PACKAGE_WEECHAT - -endmenu diff --git a/openwrt/package/weechat/Makefile b/openwrt/package/weechat/Makefile deleted file mode 100644 index 35ddae5706c..00000000000 --- a/openwrt/package/weechat/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# $Id: buildroot-documentation.html,v 1.7.4.3 2005/09/04 10:44:06 wbx Exp $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=weechat -PKG_VERSION:=0.1.8 -PKG_RELEASE:=1 -PKG_MD5SUM:=73d6bc211ac32c597f0d278506480a20 - -PKG_SOURCE_URL:=http://weechat.flashtux.org/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WEECHAT,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -PKG_DEPEND:=libncurses - -ifeq ($(BR2_COMPILE_WEECHAT_WITH_TLS),y) -ENABLE_TLS:=--with-libgnutls-prefix=$(STAGING_DIR)/usr -PKG_DEPEND += , gnutls -else -ENABLE_TLS:=--disable-gnutls -endif - -ifneq ($(BR2_COMPILE_WEECHAT_WITH_LUA),y) -DISABLE_LUA:=--disable-lua -else -PKG_DEPEND+=, liblua -endif - - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --sysconfdir=/etc \ - --disable-nls \ - $(ENABLE_TLS) \ - --with-debug=0 \ - --disable-perl \ - --disable-python \ - --disable-ruby \ - $(DISABLE_LUA) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_WEECHAT): - install -d -m0755 $(IDIR_WEECHAT)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/weechat-curses $(IDIR_WEECHAT)/usr/bin - echo "Depends: $(PKG_DEPEND)" >> $(IDIR_WEECHAT)/CONTROL/control - $(RSTRIP) $(IDIR_WEECHAT) - $(IPKG_BUILD) $(IDIR_WEECHAT) $(PACKAGE_DIR) - -mostlyclean: - make -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/weechat/ipkg/weechat.control b/openwrt/package/weechat/ipkg/weechat.control deleted file mode 100644 index 81a2bec6cae..00000000000 --- a/openwrt/package/weechat/ipkg/weechat.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: weechat -Section: net -Priority: optional -Description: Lightweight IRC client diff --git a/openwrt/package/wifidog/Config.in b/openwrt/package/wifidog/Config.in deleted file mode 100644 index 9a51eca9c0b..00000000000 --- a/openwrt/package/wifidog/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_WIFIDOG - prompt "wifidog........................... A wireless captive portal solution" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_IPTABLES_EXTRA - help - The Wifidog project is a complete and embeddable captive - portal solution for wireless community groups or individuals - who wish to open a free Hotspot while still preventing abuse - of their Internet connection. - - http://www.wifidog.org/ - diff --git a/openwrt/package/wifidog/Makefile b/openwrt/package/wifidog/Makefile deleted file mode 100644 index 094c7c41c34..00000000000 --- a/openwrt/package/wifidog/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wifidog -PKG_VERSION:=1.1.3_beta2 -PKG_RELEASE:=1 -PKG_MD5SUM:=ba1611c7eb959f9c6f93e12b97d70b82 - -PKG_SOURCE_URL:= @SF/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WIFIDOG,wifidog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ac_cv_func_malloc_0_nonnull=yes \ - ac_cv_func_memcmp_working=yes \ - ac_cv_func_setvbuf_reversed=no \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $(PKG_BUILD_DIR)/.configured - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $(PKG_BUILD_DIR)/.built - -$(IPKG_WIFIDOG): - install -m0755 -d $(IDIR_WIFIDOG)/etc/init.d - install -m0755 ./files/$(PKG_NAME).init $(IDIR_WIFIDOG)/etc/init.d/S65wifidog - install -m0644 ./files/wifidog.conf $(IDIR_WIFIDOG)/etc/ - install -m0755 -d $(IDIR_WIFIDOG)/usr/bin - install -m0755 -d $(IDIR_WIFIDOG)/usr/lib - install -m0755 $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(IDIR_WIFIDOG)/usr/bin/wifidog-init - $(CP) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(IDIR_WIFIDOG)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(IDIR_WIFIDOG)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(IDIR_WIFIDOG)/usr/lib/ - $(RSTRIP) $(IDIR_WIFIDOG) - $(IPKG_BUILD) $(IDIR_WIFIDOG) $(PACKAGE_DIR) - diff --git a/openwrt/package/wifidog/files/wifidog.conf b/openwrt/package/wifidog/files/wifidog.conf deleted file mode 100644 index 10b173a9a2f..00000000000 --- a/openwrt/package/wifidog/files/wifidog.conf +++ /dev/null @@ -1,177 +0,0 @@ -# $Header$ -# WiFiDog Configuration file - -# Parameter: GatewayID -# Default: default -# Optional but essential for monitoring purposes -# -# Set this to the template ID on the auth server -# this is used to give a customized login page to the clients -# If none is supplied, the default login page will be used. - -GatewayID default - -# Parameter: ExternalInterface -# Default: NONE -# Optional -# -# Set this to the external interface. Typically vlan1 for OpenWrt, and eth0 or ppp0 otherwise - -# ExternalInterface eth0 - -# Parameter: GatewayInterface -# Default: NONE -# Mandatory -# -# Set this to the internal interface. Typically br0 for OpenWrt, and eth1 otherwise - -GatewayInterface br0 - -# Parameter: GatewayAddress -# Default: Find it from GatewayInterface -# Optional -# -# Set this to the internal IP address of the gateway - -# GatewayAddress 192.168.1.1 - -# Parameter: AuthServMaxTries -# Default: 1 -# Optional -# -# Sets the number of auth servers the gateway will attempt to contact when a request fails. -# this number should be equal to the number of AuthServer lines in this -# configuration but it should probably not exceed 3. - -# AuthServMaxTries 3 - -# Parameter: AuthServer -# Default: NONE -# Mandatory -# -# Set this to the hostname or IP of your auth server, the path where -# WiFiDog-auth resides and optionally as a second argument, the port it -# listens on. -#AuthServer { -# Hostname (Mandatory; Default: NONE) -# SSLAvailable (Optional; Default: no; Possible values: yes, no) -# SSLPort 443 (Optional; Default: 443) -# HTTPPort 80 (Optional; Default: 80) -# Path wifidog/ (Optional; Default: /wifidog/ Note: The path must be both prefixed and suffixed by /. Use a single / for server root.) -#} - -#AuthServer { -# Hostname auth.ilesansfil.org -# SSLAvailable yes -# Path / -#} - -#AuthServer { -# Hostname auth2.ilesansfil.org -# SSLAvailable yes -# Path / -#} - -#AuthServer { -# Hostname auth3.ilesansfil.org -# SSLAvailable yes -# Path / -#} - -# Parameter: Daemon -# Default: 1 -# Optional -# -# Set this to true if you want to run as a daemon -# Daemon 1 - -# Parameter: GatewayPort -# Default: 2060 -# Optional -# -# Listen on this port -# GatewayPort 2060 - -# Parameter: HTTPDName -# Default: WiFiDog -# Optional -# -# Define what name the HTTPD server will respond -# HTTPDName WiFiDog - -# Parameter: HTTPDMaxConn -# Default: 10 -# Optional -# -# How many sockets to listen to -# HTTPDMaxConn 10 - -# Parameter: CheckInterval -# Default: 60 -# Optional -# -# How many seconds should we wait between timeout checks -CheckInterval 60 - -# Parameter: ClientTimeout -# Default: 5 -# Optional -# -# Set this to the desired of number of CheckInterval of inactivity before a client is logged out -# The timeout will be INTERVAL * TIMEOUT -ClientTimeout 5 - -# Parameter: FirewallRuleSet -# Default: none -# Mandatory -# -# Groups a number of FirewallRule statements together. - -# Parameter: FirewallRule -# Default: none -# -# Define one firewall rule in a rule set. - -# Rule Set: global -# -# Used for rules to be applied to all other rulesets except locked. -# This is the default config for the Teliphone service. -FirewallRuleSet global { - FirewallRule allow udp to 69.90.89.192/27 - FirewallRule allow udp to 69.90.85.0/27 - FirewallRule allow tcp port 80 to 69.90.89.205 -} - -# Rule Set: validating-users -# -# Used for new users validating their account -FirewallRuleSet validating-users { - FirewallRule block tcp port 25 - FirewallRule allow to 0.0.0.0/0 -} - -# Rule Set: known-users -# -# Used for normal validated users. -FirewallRuleSet known-users { - FirewallRule allow to 0.0.0.0/0 -} - -# Rule Set: unknown-users -# -# Used for unvalidated users, this is the ruleset that gets redirected. -# -# XXX The redirect code adds the Default DROP clause. -FirewallRuleSet unknown-users { - FirewallRule allow udp port 53 - FirewallRule allow tcp port 53 - FirewallRule allow udp port 67 - FirewallRule allow tcp port 67 -} - -# Rule Set: locked-users -# -# Used for users that have been locked out. -FirewallRuleSet locked-users { - FirewallRule block to 0.0.0.0/0 -} diff --git a/openwrt/package/wifidog/files/wifidog.init b/openwrt/package/wifidog/files/wifidog.init deleted file mode 100644 index 03e2ea22176..00000000000 --- a/openwrt/package/wifidog/files/wifidog.init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/usr/bin/wifidog-init start - diff --git a/openwrt/package/wifidog/ipkg/wifidog.conffiles b/openwrt/package/wifidog/ipkg/wifidog.conffiles deleted file mode 100644 index aaa3dd140c3..00000000000 --- a/openwrt/package/wifidog/ipkg/wifidog.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/wifidog.conf diff --git a/openwrt/package/wifidog/ipkg/wifidog.control b/openwrt/package/wifidog/ipkg/wifidog.control deleted file mode 100644 index 18d498552e9..00000000000 --- a/openwrt/package/wifidog/ipkg/wifidog.control +++ /dev/null @@ -1,8 +0,0 @@ -Package: wifidog -Priority: optional -Section: net -Depends: iptables, iptables-extra, kmod-iptables-extra -Description: WiFiDog is a complete and embeddable captive portal - solution for wireless community groups or individuals who - wish to open a free Hotspot while still preventing abuse - of their Internet connection. diff --git a/openwrt/package/wiviz/Config.in b/openwrt/package/wiviz/Config.in deleted file mode 100644 index 5778e0e7195..00000000000 --- a/openwrt/package/wiviz/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_WIVIZ - prompt "wiviz............................. Wireless Network Visualization" - tristate - default m if CONFIG_DEVEL - help - Wireless Network Visualization - - http://students.washington.edu/natetrue/wiviz/ - diff --git a/openwrt/package/wiviz/Makefile b/openwrt/package/wiviz/Makefile deleted file mode 100644 index d5317f1ba67..00000000000 --- a/openwrt/package/wiviz/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wiviz -PKG_VERSION:=1.0 -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WIVIZ,wiviz,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CCOPTS="$(TARGET_CFLAGS)" \ - INCLUDE="-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" - touch $@ - -$(IPKG_WIVIZ): - mkdir -p $(IDIR_WIVIZ)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_WIVIZ)/usr/sbin/ - $(RSTRIP) $(IDIR_WIVIZ) - $(CP) ./files/* $(IDIR_WIVIZ) - find $(IDIR_WIVIZ) -name CVS | xargs rm -rf - find $(IDIR_WIVIZ) -name .svn | xargs rm -rf - $(IPKG_BUILD) $(IDIR_WIVIZ) $(PACKAGE_DIR) - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/wiviz/files/www/cgi-bin/wiviz/get.cgi b/openwrt/package/wiviz/files/www/cgi-bin/wiviz/get.cgi deleted file mode 100755 index 161fc75ee19..00000000000 --- a/openwrt/package/wiviz/files/www/cgi-bin/wiviz/get.cgi +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -WIVIZ_PATH=wiviz - -echo Content-type: text/html -echo -killall -USR1 wiviz >/dev/null 2>&1 -if [ 0 -ne $? ] - then #### Wi-Viz daemon not running, start it - $WIVIZ_PATH >/dev/null &1 & - killall -USR1 wiviz > /dev/null - fi -echo "" diff --git a/openwrt/package/wiviz/files/www/cgi-bin/wiviz/set.cgi b/openwrt/package/wiviz/files/www/cgi-bin/wiviz/set.cgi deleted file mode 100755 index 17b47873ae2..00000000000 --- a/openwrt/package/wiviz/files/www/cgi-bin/wiviz/set.cgi +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -httpd -d $QUERY_STRING > /tmp/wiviz-cfg -killall -USR2 wiviz diff --git a/openwrt/package/wiviz/files/www/wiviz/adhoc-idle.gif b/openwrt/package/wiviz/files/www/wiviz/adhoc-idle.gif deleted file mode 100755 index 05e479f78bed9f924ccdc093afe0ee94158d44ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 332 zcmV-S0ki%`Nk%w1VKM+R0K@hY%Z-IFWY}8JstsRTLJYHejSl z7!#;At4a?Y5U(|{Nfa2iHL8&h91?JWqz@XWSW2~25*!!2l?@Ob9U2wa6&f26&^k{K e6WA5p-EmaIP3h|E?CtLF@bU8V^!4^SApkpU)sKz< diff --git a/openwrt/package/wiviz/files/www/wiviz/adhoc-idle.png b/openwrt/package/wiviz/files/www/wiviz/adhoc-idle.png deleted file mode 100755 index b10b102ec9fc7e6ad2fadb6de7a27e4ca51064ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 730 zcmV<00ww*4P)l&H6vzLsVoa1uW=R$^WlEH;u#}06DnR(!O z-Zzu^OA+Gx{sj?Du(6FC$3d-DOWR=>B97y2ZaO9_V=N>Hf+J?W%Wfyvb!0_>v$>UoBmdR$aRreDn*Pm&(F`DY`b2suk}AYJwXV8D2jIW$;=%9Kk~+6 zv?9#h)X$FNpjxe_eNsw{$KzZggb*O2TEE|S^TuK%gov8@St$jjRN8lce~-mtk;|V> z1WA(A^2TDcwX)3Ta}0;WH03@%KIXEQQsUs?pz!>q3DLxH{MNf-D^kk8X1ZN5O}{fk z`;<72)AXDqNp8QUhyBjPKFf4EO@(-#_dBn>>5AMM+5=c7iYSV3a&l7Gr;(6KrBaHJ zhldBauB*?;zZY_Kbrmu5z{H1A3PK2+pPz%7!=i<{!KdS)NGR=E+)pR<=Xf%T3IJ!RT6glLY(k@onJBgGMqtOV!>pKasyq74Y z&}y|%tyX8u+%ypZ?B}Z6)1`}23Sk&xKA*3Rb6r>0Wp~VMv=W-Ve0;dMx%te@*8rM$ z{qX^-Gu0!a!D?$7vlk(nAPA0#=u`H$BuQpvtboO0u~;k?i^Y!|NnnuV`Cu6Km(xolZBCiL771ZWH!i83~Ub$Of2xwk?KFO zr08Uh)%*)9O1#!at-rCR?DX5J{SP)&_~`kwH#SPy8gMhd{vqYicKZFRk5P#)TmDHG zF(zgUD%5w#mN&V4}hN;6Q85e*+th2Wc%0CWU^cb38UK WI@&E^oOS2K#>L0`6=nndYYhO(uccxD diff --git a/openwrt/package/wiviz/files/www/wiviz/adhoc.png b/openwrt/package/wiviz/files/www/wiviz/adhoc.png deleted file mode 100755 index 57db25c28a95ebefeaebb9ffe5c44bd081caf14d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 714 zcmV;*0yX`KP)W7!zoT&%kg+*%f7VJ4Bq?RAmq zg&L1Uv=l&NhLT0w2T=)WXMMjX6{yu2km*DJxXIpZy^;6+anaeJ=k@4x+|Q=F{m z&cjHEE7keVjr|VK#2vugq^wTq7~U`&SBgn=&fr`aP67J>_=Fd`YDTahq1tZ0kE{9K@xQ(J~*}iWm_cwL^>1TUsu( zh3u%;1D`Ax62zw(ZdTj3>59}Z@6rc;7?*AiIuh(4m~g!pyHih?v{|19qRhLb^FPK4^ocp*@wpC;oE^{G24 zl?er#s&SBKc{@&WNq*?W$-s;QPsi)0>D$GB>Z#jF9BNV&RN?%e4-miA6{-wunyy5` wl?X|2r8?GqZ%T!_uRx2%VzF2(7K_D*UmNVr>*VI!-v9sr07*qoM6N<$f|Dp!RR910 diff --git a/openwrt/package/wiviz/files/www/wiviz/ap-idle.gif b/openwrt/package/wiviz/files/www/wiviz/ap-idle.gif deleted file mode 100755 index a9296961126dba336d6d7497a0046391ce7bc904..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 812 zcmZ?wbhEHbG-5Dfc*ejmefsoi)22;H#N7kwzYS3c6Imk_VrJg zIBD{fsne#WQeCvTU73%Ajg^g)S4do5OLu*%Iv+bT z0|O%qC!eUa(w==y+Jc;ij~rp;7Lrg<)79ChD|e9T$`NKRfnBP1_Gybge9Z9lx%^9m zed=QTm)>8yaZA^5uiMlE3W<%4na3uCUQl2<$}M%*ZSI2v#zRajtXX$YJ#B31lCV%J z^I~*rZsp(;(@9wHiiurNJ?6p<#Yw{4Lh@!YD-0GcXXTM`+A^u}u=@c&osbC}7ZaP? zc%&?91QL^2d8BPBDvB3AV&N22Jk+Pr*u>f+W!-S1;2M)#x2Q&^-yDaDO-H#U&C34V zc<2+*EoqdnM?xmqtyjjj;f=+s*Oz%^%yMk5U3~05VL~nE#*T@H+xz7m>Rwb#{3)#v^|v%C2Hg@fMW{&V+~KAOVB$Y2cs(m)5Y diff --git a/openwrt/package/wiviz/files/www/wiviz/ap-idle.png b/openwrt/package/wiviz/files/www/wiviz/ap-idle.png deleted file mode 100755 index a6e6fb3202556994679a960597c983ac8d135397..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 814 zcmV+}1JV46P)3`ER47LQ(Iu)V)D2;GiA5r8j7S z43hZQp`l_29*R&wgn}-Em!IL7YoF5)Ao|^*!CvZ%ZaE-kD5*f?-jIk5O7_`<+ zQc6K7)zq=pLP`mxR8z+RxumrQ5uN#X@!o#j8R6D|d#AN-K(y8yFfMl>>)7vDSX`@#3{cT)b4* z^+u|y3T0VtK^G2!#A7rtD~jT$kB?TO-;0Zj4@9)A>l#GVoZe3B zTkZOk5<(zN(?wAfAALQv5;Wf3-TfGiM*C3|y(`NSN~vZ#ts8fvptVMlBuLZrswj$2 zZFp$)K9XhGB@taoDN&Xsq?7=#5%CHku(!8&Pejw3o13p~_1*dnG0*e9wRQ|(OhhNo z%dNFjB3iU{p>leatFBX?=XSMPHP5G~r;H#N7kwzYS3c6Imk_VrJg zIBD{fsne#WQeCvTU73%Ajg^g)S4do5OLu*%Iv+bT z0|O%qC!eUa(w==y+Jc;ij~rp;7Lrg<)79ChD|e9T$`NKRfnBP1_Gybge9Z9lx%^9m zed=QTm)>8yaZA^5uiMlE3W<%4na3uCUQl2<$}M%*ZSI2v#zRajtXX$YJ#B31lCV%J z^I~*rZsp(;(@9wHiiurNJ?6p<#Yw{4Lh@!YD-0GcXXTM`+A^u}u=@c&osbC}7ZaP? zc%&?91QL^2d8BPBDvB3AV&N22Jk+Pr*u>f+W!-S1;2M)#x2Q&^-yDaDO-H#U&C34V zc<2+*EoqdnM?xmqtyjjj;f=+s*Oz%^%yMk5U3~05VL~nE#*T@H+xz7m>Rwb#{3)#v^|v%C2Hg@fMW{&V+~KAOVB$Y2cs(m)5Y diff --git a/openwrt/package/wiviz/files/www/wiviz/ap-wep-idle.png b/openwrt/package/wiviz/files/www/wiviz/ap-wep-idle.png deleted file mode 100755 index a6e6fb3202556994679a960597c983ac8d135397..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 814 zcmV+}1JV46P)3`ER47LQ(Iu)V)D2;GiA5r8j7S z43hZQp`l_29*R&wgn}-Em!IL7YoF5)Ao|^*!CvZ%ZaE-kD5*f?-jIk5O7_`<+ zQc6K7)zq=pLP`mxR8z+RxumrQ5uN#X@!o#j8R6D|d#AN-K(y8yFfMl>>)7vDSX`@#3{cT)b4* z^+u|y3T0VtK^G2!#A7rtD~jT$kB?TO-;0Zj4@9)A>l#GVoZe3B zTkZOk5<(zN(?wAfAALQv5;Wf3-TfGiM*C3|y(`NSN~vZ#ts8fvptVMlBuLZrswj$2 zZFp$)K9XhGB@taoDN&Xsq?7=#5%CHku(!8&Pejw3o13p~_1*dnG0*e9wRQ|(OhhNo z%dNFjB3iU{p>leatFBX?=XSMPHP5G~rLh1t?N)UMJavJmaWw_xnyinl#J9Rgm{TI z(IVbX2yMzjl4BPmBa%i+5wEk%lyD;iVWmxPH(URS{j|?N@Z3Gmea>Hq2n2>>G4--~?vHrn#;;-)ETdn@M6n{NyTidam3 z|6aDRApB$S!k8o`^V>TXi)DX*e{XMZcXxMZXJ>nRduwZJb92*VGHq;Z7>&lYwYAmN z)s>Z%<>h6A!LYQnw79tV`t|FDg$2D{KQ}iwJ3Bi)Jv}uwH90vsF)^Xj>Bh&$$HvA+ zM@L`1dNndKGCVx2)oO=^hBO+DTCG;8R7$0?zrSChQ1tcn_4fAm^z_K(^6u{LuC6Yb zOeU2|B@#(zXJ_Uzfyr%zj3TU%OMghF9+b8}NulRzM7 zY;0_3XsEBRudA!8t*x!8sp0ea)z#HiRaKRhm5(1kuBfQs@pz9OJ$m@?VR?Buhr=l= zD=R4}DK0K%v)L>bD?dM<$z(DZjJ&+O2M-?5>Ga&(+?<>o8jY5not>4Hm6@5Dk&%&} zo=&AwQ&Uq@Qc@@s3YknMkw`=$@#M*q2M7OF`G5a~0h|Q}0e}sBKEOVF0w4~64bq(; z5hx1~cK9T%q)Ej_AB(IHv;{8;9WghP(rj@<9Moz28qF+JmBT_JV1h|6%{g}~87GL# z9jyyEf+y(WAtTkth#m;MIo8cLG-*H-5_SN%X(%c^mneFuH0s#`+}|0Y9(|6mm&pmse0(7igJE`ArD= z^QnS}vfe=I`iVhxsp~xT;_6qCpS*nXJB|!^=TN?)U@aVd${Y;0MW?InZWKeXSD~(2 zJ{_v?W7!00&4+M~fjR)Szaob@Bt4Nfk*^_HSJR+-_tfYwOblo#UgoXD#ND+$>{jqA zVVQb^>5ax+!^VZ76K``3rS{Q_haGS69%y6~}+qj-0$CO`M332Fk>UGGRJW#uXA0gVeZ4Sc!Q9fc!P6yBN=%ej?N&t#TbL%+}T%zN;i^0B#YlnjO0Be zlF#^nD2trrz1PQb6Nqw(D7TQDLh>b&?yu)aavjMTqFhJiT%E1^>pN~b-$s8?ZlQ9< z=F$Y7mpDBE1UW+v2mtAk8h!KrACy4`blI(TZ27w%ZCc{4nI&G?|b}NdK*|lp|sK39TJ$v@Bd-rat)hd-r zg@uI$?%cV$1@(M~oE@ktB!24`epj{zL)DIYf-? z+_^J8IyxHg`~4`2LPtjj9UUFCx3{Ax3azcJ_FeHAnlk_EyDvKwrFG5<5So5$mcA3l88-`3V<6ST-)xpIZ8 zSFdvI+BK%9r@49aCLWImkH>=$0wDzZ_wNUYjg5^Bnv4=an1ac{2}zcDLcnajt&xx* z|00LLPt763xLN(CkPH~f?eqB}LqkLMFd>Yz%jfgt^LY*(I>gztXYu>}JbwIm!(@u0 zuw%y#JRXlhY@FLbj=$N9x(;JugJA!CsSrOoGqjVglObd}2w0KQbv@MI-;b{A_EW7^ zsaC7_d_Dm7?b}DST4iWxi23<>dz_Tgep*{w-J~U1J|pK?KWZZJ;^*w#d6SPnUbMy6YBk#1+Z)or$b}%7mt&G5s?E=ZdLah+Uf|#E z(9s~Ax~|WbN+p*FDJ9iv6@YK|R%mZ;L6@K?l5cf&Q!X37wZvP3n!t~9L9KGA*TL0< zJ4XaY*>D69?qtGR9l3r0c)i}-!omWYrco-DD3waAuCB7Wy4s8w`Mg9?6f{k<#gs}V zq?GQhyq?(W@1@D@7i|%1Yir!SdzY@( z#;g4K=aPYe0W?iR(=^KEGA~}dKnRg>3=8tEz2Z5CxPZ;0E+UO`B+J|QkreO}0=qoP z0s%(Ik|hpCp(v$H-@ku9GCVwNZZ6TVbkZ%=o>kpLpRV^+n$hhR4bsYx|W-CFbYnSzKI9 zr&6i&j%bAW9kXB-juw8!2LOBs7?E zwOTE4@7_J0J$vRN-blpK(h_rXa})}NL@Je9?=2)521u}n1V#Z_bj)oy}iA3b#>Xdx324~tgNuSyv*|Q za;{pf#wI2voXyh+f&k-$FbmX@__n$Z?Vak{~IEW25q% z#pvWNIe(_AYPXa!0z`xm^+z~T%9s!$Z8uczInQCN_&QNzyXBBXNRgnvPkAM*FDMTf zu|EK~?XT?BRaKP-4<581RaNCC=5_mxa-Ap_?Jp@!(EQ_rkxVhZOPY7g4*<@4r7pCu z4Nku*CjdXcB@JeI-vo_ot#zm8k%ak(2!fv1!}Kd4$t5HijH5PQe^NQoJR<8bI>tAP zSLVgbBLY^a&%biqe+!$Oe=`yJpTM?|t%hwOTMgSnwi>pDY&C2P*=pDpvemFHWUFCY f$X3JujgbEUE)R2=gkRs*00000NkvXXu0mjf(9*hj diff --git a/openwrt/package/wiviz/files/www/wiviz/ap.gif b/openwrt/package/wiviz/files/www/wiviz/ap.gif deleted file mode 100755 index 7eb5b3a6bb5234b9822b2a01e0eddb3169cd1cf4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1468 zcmeH`c{AI20EfQ_rA0#Psw<&ut!itvW7%yrLC{ub!y0y4x~Z8MmKkx3?FuH5#4(bV zsyf2>MZ|r@vF?&Y4p+sI4pntm)RmZVuBqL=iT!IoZ{V4Ep85FP^LBN6>I|I0ApqbE z03`ss0LTFl0MG(J1puW0&;UpSARGV!I6XZ*IXO8#K0Z1+Iy^i)I5^nf-{0HYQ>j!+ zrE+(7cV}m3dwY9pYio0Jb7Nyep-`-^udl7Gt*)-FtgI|AFE1@EEiNuDEG&Hd_;G%I zer|5={rmT`v$HcZGwuYfDQDkH>3nZfPD|>N9J}A#%>$5NHBDCWM^%U;0>_k_ zUAaZR#`1M~Tqhmt4vorYeOqM}am)C=|uCFLA42Op&GVgEhWgaCZyWG!c{1#~Qe zPu06oPgXzwT{BWc|1MGmGsZ(~c0`a4O-|HMv0(;x7I9Qv=TSUWA8j$=WfYpD660Ma zO+$jL&)>>4eqdohgWuj75W+o?OE9CynYm(1^+&-gq)-u7YWd4;Hq6l5G}g<|5ACmM z@)S~OAvJ0a=Zah$(1DTZ2!Yrr&`V8J9uSyIHwlB5(yg|6A`}H@Y>z`mKjYDjp*R)R zG`w1sZsk`SjD#X8FL6;W{31-cX&3_|Hv7E|t3T%z8s5sZPN?U5o5xJ^GLXTR z;##JX`zHeBy78%&JDxZrL(&tX8hrZgDr-DGB#q!Yvj|rS9rWbvobHSHbJy=#4sBlV zgU@E)z@F?}_3!`U0V59R>-jl(YFYbT?>Tfx#tHQAjuHp8fA&)eK0PTx3|?+x#Y(hd TKk%fN^OAW(mpJt}H2CQswVNTv diff --git a/openwrt/package/wiviz/files/www/wiviz/ap.png b/openwrt/package/wiviz/files/www/wiviz/ap.png deleted file mode 100755 index ccfc86431c5669cdf583f9be708d23b37a5384c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1825 zcmV++2j2LJP) z|DJo!J!fEuA>JS)*WcjWlSpQdLeUbEd(1QQ{gr)7XiOrRL9+S%$VlErBKd;%NV3TS z?;f3%hd`1=lH5bGh~z6Iliy8|WEII0NmkLg(IcDu?urM_w^v`1duS{M0<577S8IQhZ4PNF)1iaWPP_)0X{)7{8?iL=ZeZ43Sl!!~zM6$ZeObMwLGi z1LEYl1CUH67cXACn3|iLi%d*R;PrYDLLj9?*LB+MHqB;}Mx#NkR^#s7yR5CPmGk-h zFBGpVA&HSA0u&JZ)#Vkyl9gOC`o)O3;xTemkc5Ha9@!^Ufr>(6_SC6U>AAVNNH`oO z6bdmmHpbZ47^9=3ghC;L!61P^fIuL?*w`3XuU_TSrAyIdGI>kWG&{~R2x9z`5|HSz ztN_G$MX`^pZ?MOKGXEh46v)-F`(Ql>qjKYf2kk{V<<$-lQnD+DS{c?fj}T};lc&yF(HKO_aKBq zAx@k)fyd)94a;&LsPGSK;Z&Fl8wKZgUm{^DmTOmBnIUE=h}fR$cDu3Z>1n#%t}{BF zjx%&!$1n^!oeqX!xSo?zIwKeix{a2U_=1XcJ*)g*0U|&ZEF1e0v0wTZASv%52vr0z zOCcVQCptMf=`!5TPOVmpR;%S)x7%%WU3W;?#0OpmsSlrP$h+ zh~PdFxC(sk4kpaii6M6rfY(`BBFwr^T`6VZ(W6H+ z8V!epJ=8eqN5)PF8yg!{!!Qbf-Au)J->M$eno2rnh@FBDAYvYd1=N&iDlGDQE1M+E z4A<>;)6btjuReSB%n9;-B>ItQwOYJ-^@?`8onBd4u?On!AcU))5zC?;Z zgkM{yr@P@*V*11E!~3ZNOe4=E|4&9Z@T=Q;O^kQ04(6p%)^HddGX?f z%kX|AwzjrdTU(=At!DE1{BCa{De_}7oF#)D}#i+1c4)dwZMh?d?jZ(@8BaFRRVd zEP@DGVwg$gSB^~MI+6?@k>(_6ORg5P`*w({K!pXWNTTEw#b)JM#_Z&7tFLLAHYue{ z00|*PZwg0BnG!-2oQBFh=MBsi-!;_SZWSa6@?_}kQx1gv1?4fb&IbUu{J>sa(=>Vc z@?~denkEl1uUl`DRg&CtzN8Gm;ExYxFs1kz1>Uwk0I26mk86(%s$PxjK$s6HfK}cP zKyQiCtMn$4I3JKe@S~%#^jjduZ6rmoPWhfprDCv0c42mmZx#o}#r_@v+toJ@eC~(B zA?H7gNB$=;By!v^By!v^By!v^By!v^By!v^By!v^By!v^By!yFe?#OOx4X)2eI!jG P00000NkvXXu0mjf4Ax%f diff --git a/openwrt/package/wiviz/files/www/wiviz/pip-idle.gif b/openwrt/package/wiviz/files/www/wiviz/pip-idle.gif deleted file mode 100755 index fa923bdf162888c0df687cfd53cc96ef0b9ba2a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 190 zcmZ?wbhEHbnkfO%gf74OG}H2it_XGb8>PrGc*7H z|IdH~6o0ZXGB8Lp=zzpPb~3P9KTzvSIjQsF&=id%8O@y{jS5E|6*06-T+r+8XXvm* kY=ZZ@8MAz*ondt|>hdx&Vn3RB(Zy?a*Jn<>ZYKt70J>FCssI20 diff --git a/openwrt/package/wiviz/files/www/wiviz/pip-idle.png b/openwrt/package/wiviz/files/www/wiviz/pip-idle.png deleted file mode 100755 index 3fe25fe333553b289a11a54d04a9a4c7f5b51e78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 331 zcmV-R0kr;!P)aCk08sqFf1hxm`?9 zNCN$)^XEI~eCHhaC&bZ6lH|@9vl2qQPYK4DjSwRAeg7BWc9Po&AzmEEK}w0%n!2tT z8{7l0rwK`tya5}}^RR6jtu+8?nocK$K@fc1jDG04F0SjMl%gz4@;pD0hhab|6;35R zDy3+ehN`OA@AtDs`@W|v%ZJ$xUDuIi+1bmqZHsN&030Q4&oW0eO@owjdnz!-#Fxms z-43laj^o5I|HJ3ua0siaLP`mMQi`tYST2{VD2hI21pw>y`l%?2*s`qWG4!)oEMnjH dzpqKYia)m{a|fqo=sf@c002ovPDHLkV1lhjlN0~| diff --git a/openwrt/package/wiviz/files/www/wiviz/pip.gif b/openwrt/package/wiviz/files/www/wiviz/pip.gif deleted file mode 100755 index 1c566e9aa2d2085ed1c5f71a544fe470c39e19ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 190 zcmZ?wbhEHb-|G|I(2`K(# zVPs&CX3znNf$U^pwSJ)1mm-Gv$S`kff80i(xBdH?_b diff --git a/openwrt/package/wiviz/files/www/wiviz/pip.png b/openwrt/package/wiviz/files/www/wiviz/pip.png deleted file mode 100755 index 5c05a737ae4ac87ecadf78df815281fc6663e270..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 323 zcmV-J0lfZ+P)(3`2IR2+|(_KcIi$E=$0ys;V_C zfm}mF#zoMUE*Sz|b@SfmocEl2;g6E);F_RqFhfDSCSWk3Aik2`8^CJgE)?YCkPbF2 zGBl4Qlnpk3(>lR5!37ZBbB2QjK!)assF~#}xxB3s{ByQ(ueNY-CiV36bar;Owzf7kHPzSGS5{V*mX;P373JsW=j7yMW@e_P zr6naL#mC1-Mn(n&1^M{+czSxexw+Zf+gn;%8XFrM85#Zm|DS;xK=CIFBLjm5gAT|r zke?XX{yR)5@X(R!Ke43fWRBJR3oA;z)<&(rv8L?w+p7H!HdOfN&EC0u^2;2PsdiI^ zqG!k@DoOFC=a$v0iOQ=rixnl8mP@HL_b65;)-^QsOi^o%>!|3SI#oqNJ$ho}oF&Z? zDp6_*0?U`Ko3|iRRX}y!HklQXYE|3TsY-2(P}#C~sf==zy2Rw8bLK}W3Z7jeuXu9t z<*DZ*6+~~|y0%MD@%}1N0r{+hA?osCH{}Hdn-s-GrQ{T6*92_-y;RlWgz%T;huHX} z3_=zNG&-^JUCrW+N@`+m3zty{QTTqGiJg^|iASS=;UE*AjGRTp%LPsDogQ8m6Fg2% zX69C8^7}9&!J*;*dN^PBjt4`jmNcj)0F@wmzJq(7tAo&HQD*| z^NY)~<0BhcIM3+1pGh;SvpxOk`9kmeKeC^;2z)jzbmEXJNSIOkq>`nHQ?9|ZzbM4O niK&t8(Dr*3ovbrXDRk9t;GfUD`-)M!z?2M&N1YMCLQ zH`#^W(yqLzvWZr&?aO%M0n-V&Xi}lcbs`~0(~PDI+Y^7uaa`4KLBEYg8qGQHb3R_3 z8Npa%jWyO-V~sV|SYwU#Gm|nZL*;ULPEnLa;E|#z8&b-ulgUg@PU8Fi$eehd$E{npa9wxa zvaCOQp4T6l@qHc62#TUCJC1`8V$^={JP*sVGEo#Qj@&rMK!9h>W^5$LoN9xFN zoCBMS`#-oN)e#UW<$GY+w(XIF9O(a*m5JjY%*@QVA3l6o6hh$p{z$gsY&OfCJ9n@w zi&m?J@B8zXW&PGP&3VhRels&ObHy}G-oAbN{-QokowX{J%3lhF!joJs$Li|pg#q&U zeB5tRN*u?*G)-n_XGx_}_`Xl4(}`dAgSG+eL{U^%6vZ7325use*x0X@uLCKU%X3$* zT-jJySm4Er7hjbXRaGgKN^xl(0Oa%ec=TztT7+SUs;a1}il%8yOiYkUrReo~gkgy1 zd2~9R7&Hh1fcie<#$YhmP!wh7;5K3C7%znQrx2o+PN&Z`Z>7^|3WWm2ViDi>ky7G$ zUJTIfcJY0mow=+0``$0<7Btj$AJq@goDLJckkpSoG-oepb8~Y{PEH>2(QGyef&kz5 zv2FVRZbM30KG7ownwgn#-@SYH0W)hc)I-X#bE8jS{u-b z$L8iH0JU0;?d|Ou&-4Cx=8aXQQu$Y{R?Bs}U8Iyp&Y7l3sZ=7D%dxe!6`wB@3S_g{ zz37L#_*I?Oz0Zq3F8x&-^B*2sXRj=SARr7wW@l$fCO==(>2!GY>J^^nQ7V<<-dkB& zK}xAio@#wxilQt@DW5%l{5Vc!Hk+kXDxvE-j^ptB`Evk-5a_y&=Xq?mex!A8n%2GR zgsIbAoB$xePX>68O{U)LqBgdEmHm&>uRun+^b+wIS5JqrY&QmOp( z@ZrOZs;VTDNmNyh4ePqj_3PJ}o}S)oP7S=@nfSMjq4rM8!13#*-t;K_$zf`03MnO; zrXhsDvaBQ7ab0%@SYBIOJG->@LB6#tYpGVNVcRy2q(M+KL#*O6T>iYUH8+7!%Uwf{{K|+W~2tm8uj<-==*GZ?-7={raCzDCS zFr?S(5d;DK{@#$Q>pF%pJX^4L-y)^NG)->bzKy170P#lB?RM*f!C-0FhGCG)2%_8CW@jZMNyW&G+%u+NV#0j0=YyYF&{-yMp2X+kOAh?=`@
`t$z}fiFxF-1zv-!< UzT-5&xc~qF07*qoM6N<$f;oeKE&u=k diff --git a/openwrt/package/wiviz/files/www/wiviz/station.gif b/openwrt/package/wiviz/files/www/wiviz/station.gif deleted file mode 100755 index c8a075f4200ea05bbffbe1ebddfb65ab61c4227e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 929 zcmV;S177?`Nk%w1VKM+R0M!5h05kssGx7#ARlatt%f4>P|RGnpJS zj2|<9CNpL!Gg&M%OfNG(VsB|P|Cu)Rl{xE@KiG^$#f40=e^01`2^ASJ`d%mV0E&nPj58EIW01K4+Lxk~uFZF)=fgk3^!Gn<^|eJPZ#lo_!ugid3biF**+l0ssj(tArtk zB%?~2HnOw~1OV0m0k^rlhp$b)sKUh8g=XyM@G0Rud2pg=(jhYJ=lYT(epqpp;OI^xYkz+lIWwX~wKkTE013l=L- ztY9&t=Z?CplJJ=EqO3du4s^^o!2(BG6)k3Dpb%jK1q&B6%$Q-KgzFM4LO%w}u*8l7 z)&eBR{Gvn)9DYI1z%U_#@#7UZ#8C12HH#cNT0}0=FrXoOq4mhF{myi;#Sb^hB_8Dq=veAfdc@07HHQ`u87t8A^b@0cASiz=CV-(N=^_HB`vLU>j7RVFc&7AfSs8SO5VHIqcBe zfwY)dL|r<>;93hW5T-!}7F0mNdCY~j+G;U)w%LIRI>^rqH{`%W4mZruf`lo=_QDIy zHTPN!JKTVRYxYxx)DGyZcu&5W1RcJ$@CGdb|ri=&y84shjD(kF81OWg$ DNjHN2 diff --git a/openwrt/package/wiviz/files/www/wiviz/station.png b/openwrt/package/wiviz/files/www/wiviz/station.png deleted file mode 100755 index 8daf8df35abb3d9d3fa957748a0846dafb6e93cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2476 zcmV;d2~+loP)?{99XTghf$3_ZV-oV zZ!7g+538UgeOLm6Qg_LdVT-Z{>t)w*kjJnf%?%B@t)?40k+7?~N@ovNR4bDI#ctAv zd|xczd+zW2KEL1jo%=f%p6j`u>)Ais$rECX-;e;UDrG;6Y^z@o!o?U0SpbHZ<{kV% z7C48(Cr`zXebpPBCBq#ixz4|sK(dVF{Ihneza%3_LR*f>aGpt)`6F*3xryZBQ}S*X zlDya6tz^5%PxKx424|UMncsF`-g?TOZlet6$uQC0vEFJ!UGJNvHyL4)Wj^UFv;NTA z$hBvuHhjJ#nO zC;J+hEo!XnocH@C;Dauruc#x9x%foS>VEkdoxrRV||A^fkMCMd$esvwu*kSSY)LRHfN|X zj)P8+93prXUDvnHN`{XSm}E$!knCJv@5>g*aS2#K>4Mx;eKWGt=-a%F&6%!eD~$7* zb(wfvLsivuB9S<|u&~gtDV)Jz3P*~54cN)6&5jxk=_YJ56GkFODTJzKRY|S zA^Ly7LGNp@i4Thmb8|UHM@Px$^V86$yKR!k#Wauy63_+#keK`%h!NfuNHUo`;c~gA zcN_i9RN?0g)vo~H^ZCL;hzY|mKI|Iw0e6|i#K4ar(FLopz(4TwGZMQ3ak*UCP$-m0 zr_;NN{#LTcU>NTrgdm^KPXQnH8MZ))a2sT!R(3m|3!v3%O-A1ndIl+&JOsesbv?%ga$JC&*GOmA5<*-b9UVYh(9&saPx$i^b5?B8OPoi(LTf2y7>g<2VEY zfp997>OBc6JlHD)z`&y)mSx@2H0_+<@An@#aDe-^#e|ehR5T9jtTN`+>#iK?oo zs*2C&V_;wakH^F6>MG4<6U(xw)oLA3$8li2FI$mPF0@*$1w~O-9zkx}#tR{?3n9{8 zub0^yrA@Py{pK3>s7B?~*UtB3bgoM9nuV_hs;c5R4$WqhW51#2dDK-DWy&y&ORvBFI>q7@e9lh@g+j#RX*5lvR4Q@#@?`*o5NMi)Wm(*= z+@o@8h{~y>G(G*N=mEgNb~{+F2RZcF8fxJ-FTeaUjYfmT#YKw6BH?hD@$vBvV6|HP z+Sjc>+F4mXbLNa+RaM+>H>#?33~QRk(W6Hh8X8(JP9Io54q_h-BuA)tcJm^U|)qYjyp<5o&2^X-mMZAj;)3`FtLL)2B~&>Y!XMQz#Uu zR;y-v)9H6q-aW|U3IqZK0s+F|@Dl;5s)}J4*tU%jqO)A9)hdNTfpWRrDde5_v!kVz zN~M-{UH5C6hTH8X7!0DS>bA>eGr(%K%H6wniN#_FA#l6h)M~X(J0qo>QWRx+yZ&m| zAjxDh1cY5KS3*kZR}>}9`UiuA*XzaS^RW>U=q!=Vl*{GFWHMca+-Ni|NhzluFXVj# z*-D#00;E+{Mbk8VK3@k`RaJCdCzo6QfM*y6j^k`u$WH}iD+wV6Tdh{Y<#L6klwn0t q60B!34Irg7rIhFP0`OelR{bBXvzd#1Uw6p>0000 - - -Wi-viz wireless network environment visualization - - - - -

OpenWRT Wi-viz network visualization

-
-Status: Monitoring
- -

-Channel setting: -
-
-
-
-
-
- - -
-
-
- - - - - diff --git a/openwrt/package/wiviz/files/www/wiviz/wiviz.js b/openwrt/package/wiviz/files/www/wiviz/wiviz.js deleted file mode 100755 index dc67d8f0119..00000000000 --- a/openwrt/package/wiviz/files/www/wiviz/wiviz.js +++ /dev/null @@ -1,291 +0,0 @@ -/* -This file is part of Wi-viz (http://wiviz.natetrue.com). - -Wi-viz is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License v2 as published by -the Free Software Foundation. - -Wi-viz 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 Wi-viz; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -var mv = 353; -var stupid = eval('window.attachEvent') ? 1 : 0; -var hosts; -var idle_timeout = 20; -var erase_timeout = 35; -var skew_x = 0; skew_y = 0; -var listening = 1; -var wiviz_cgi_url = "/cgi-bin/wiviz/get.cgi"; - -//What? You mean the POSIX thread API hasn't been ported to Javascript? Bugger. -function scan_thread() { - var loc = document.getElementById('wivizGetFrame').contentWindow.location; - if (!listening) return; - if (loc.href != wiviz_cgi_url) { - loc.replace(wiviz_cgi_url); - } - else { - loc.reload(true); - } - setTimeout("scan_thread()", 5000); -} - -function toggleListen() { - statusel = document.getElementById('status'); - statusbutton = document.getElementById('togglelisten'); - listening = 1 - listening; - if (listening) { - statusel.innerHTML = "Monitoring"; - statusbutton.value = "Stop monitoring"; - document.getElementById('content').innerHTML = ''; - scan_thread(); - } - else { - statusel.innerHTML = "Stopped"; - statusbutton.value = "Start monitoring"; - } -} - -function channelSet() { - channelset = document.getElementById('channelsel').value; - if (channelset == 'hop') { - document.getElementById('hopoptions').style.display = 'inline'; - } - else { - document.getElementById('hopoptions').style.display = 'none'; - if (channelset != 'nochange') document.forms[0].submit(); - } -} - -function mousenter(e) { - if (stupid) e = event; - el = stupid ? e.srcElement : e.currentTarget; - el.parentNode.parentNode.className = 'hostdiv_hov'; - el.nextSibling.nextSibling.nextSibling.style.visibility = 'visible'; -} - -function mouseout(e) { - if (stupid) e = event; - el = stupid ? e.srcElement : e.currentTarget; - el.parentNode.parentNode.className = 'hostdiv'; - el.nextSibling.nextSibling.nextSibling.style.visibility = 'hidden'; -} - -function generate_mnemonic(hash) { - c = new Array('b','c','d','f','g','h','j','k','l','m','n','p','qu','r','s', - 't','v','w','y','z','th','ch','sh','cc','rr'); - v = new Array('a','e','i','o','u','ae','ai','ao','au','eo','ei','eu','iu','oa','oe'); - var i, a; - var p = hash & 1; - var n = ''; - for (i = 0; i < 4; i++) { - a = p ? c : v; - n += a[hash % a.length]; - hash += a.length << 3 + a.length / 2; - hash *= hash; - p = 1 - p; - } - return n; -} - -function mkhash(mac) { - var macarr = mac.split(/:/); - var hash = 0; - for (j = 0; j < 6; j++) { - hash += parseInt(macarr[j]) * j << j; - hash += 11; - } - if (hash < 0) hash = -hash; - return hash; -} - -function wiviz_callback(mhosts, cfgstring) { - var nh = ''; - hosts = mhosts; - for (i = 0; i < hosts.length; i++) { - hs = hosts[i]; - if (hs.length == 0) break; - hs.mac = hs[0]; - hs.rssi = hs[1]; - hs.desc = hs[2]; - hs.descarr = hs.desc.split(/-/) - hs.age = hs[3]; - hs.hash = mkhash(hs.mac); - hs.mnem = generate_mnemonic(hs.hash) - hs.name = hs.mnem; - el = document.getElementById(hs.mnem); - if (el) { - if (hs.age > erase_timeout) { - el.parentNode.removeChild(el); - continue; - } - el.innerHTML = genHTML(hs); - } - else { - if (hs.age > erase_timeout) continue; - hs.x = Math.sin(hs.hash / mv) * hs.rssi * 2 - 67; - hs.y = Math.cos(hs.hash / mv) * hs.rssi * 2; - nh += "
"; - nh += genHTML(hs) + "
"; - } - } - document.getElementById('content').innerHTML += nh; - - cfgarr = cfgstring.split(/-/); - if (cfgarr[1]) { - if (cfgarr[1] == 'hopping') cfgarr[1] = 'hop'; - document.getElementById('channelsel').value = cfgarr[1]; - if (cfgarr[1] == 'hop') channelSet(); - } - - //repip(); - setTimeout("declump(); repip();", 250); -} - -function repip() { - var nh = ""; - if (!hosts) return; - for (i = 0; i < hosts.length; i++) { - hs = hosts[i]; - if (hs.length == 0) break; - mac = hs[0]; - rssi = hs[1]; - desc = hs[2].split(/-/); - if (desc[0] == 'sta' && desc[1] == 'assoc') { - bss = desc[2]; - hs.apmnem = generate_mnemonic(mkhash(bss)); - ap = document.getElementById(hs.apmnem); - sta = document.getElementById(hs.mnem); - if (ap && sta) { - x = parseInt(sta.style.left); - y = parseInt(sta.style.top); - dx = parseInt(ap.style.left) - x; - dy = parseInt(ap.style.top) - y; - x += 67; - y += 10; - d = Math.sqrt(dx*dx+dy*dy); - for (j = 0; j < d; j += 15) { - nh += ""; - } - } - } - } - document.getElementById('pips').innerHTML = nh; -} - -function declump() { - var c = 0; - var top = 30000,left = 30000,right = -30000,bottom = -30000; - for (i = 0; i < hosts.length; i++) { - for (j = 0; j < hosts.length; j++) { - if (i == j) continue; - e1 = document.getElementById(hosts[i].mnem); - e2 = document.getElementById(hosts[j].mnem); - if (!e1 || !e2) continue; - x1 = parseInt(e1.style.left); - x2 = parseInt(e2.style.left); - y1 = parseInt(e1.style.top); - y2 = parseInt(e2.style.top); - if (x1 < left) left = x1; - if (y1 < top) top = y1; - if (x1 > right) right = x1; - if (y1 > bottom) bottom = y1; - ox = x2; - oy = y2; - dist = Math.sqrt(Math.pow((x1-x2), 2) + Math.pow((y1-y2), 2)); - if (dist == 0) { - x2 += Math.random() * 5; - y2 += Math.random() * 5; - dist = 10; - } - if (dist < 100) { - cx = (x1-x2) * 5 / (dist / 3); - cy = (y1-y2) * 5 / (dist / 3); - x2 -= cx; - y2 -= cy; - } - if (hosts[j].apmnem == hosts[i].mnem - || hosts[i].apmnem == hosts[j].mnem) { - cx = (x1-x2) * 5 / (dist / 3); - cy = (y1-y2) * 5 / (dist / 3); - if (dist > 150) { - x2 += cx; - y2 += cy; - } - } - if (Math.abs(ox-x2) > 2 || Math.abs(oy-y2) > 2) { - e2.style.left = parseInt(x2); - e2.style.top = parseInt(y2); - c++; - } - } - } - if (top < bottom && left < right) { - document.getElementById('debug').innerHTML = left + "," + right + "," + top + "," +bottom; - document.getElementById('content').style.left = - document.getElementById('pips').style.left = - -(right - left) / 2 - left - 67; - document.getElementById('content').style.top = - document.getElementById('pips').style.top = - -(bottom - top) / 2 - top - 25; - } - repip(); - if (c) setTimeout("declump()", 100); -} - -function genHTML(hs) { - var nh = ''; - nh += "

" + hs.mac + "
'" + hs.name; - nh += "'"; - if (hs.channel) { - nh += " ch" + hs.channel; - } - nh += "

"; - if (a[0] == 'ap') nh += "Access point"; - if (a[0] == 'sta') nh += "Station"; - if (a[0] == 'adhoc') nh += "Logical ad-hoc entity"; - if (a[0] == 'ap' || a[0] == 'adhoc') { - nh += "
"; - if (a[5] == '?enc') nh += "Encryption unknown"; - if (a[5] == 'enc') nh += "Encrypted"; - if (a[5] == 'unenc') nh += "Unencrypted"; - if (a[6] == 'wep') nh += "-WEP"; - if (a[6] == 'wpa') nh += "-WPA"; - } - nh += "
RSSI: " + hs.rssi + " dBm
" - + "Seen " + hs.age + " seconds ago
"; - nh += "
"; - return nh; -} diff --git a/openwrt/package/wiviz/ipkg/wiviz.control b/openwrt/package/wiviz/ipkg/wiviz.control deleted file mode 100644 index 5b1adb12932..00000000000 --- a/openwrt/package/wiviz/ipkg/wiviz.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: wiviz -Priority: optional -Section: net -Depends: libpcap -Description: Wireless Network Visualization diff --git a/openwrt/package/wiviz/src/Makefile b/openwrt/package/wiviz/src/Makefile deleted file mode 100644 index 6f230359dfc..00000000000 --- a/openwrt/package/wiviz/src/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## Wi-viz makefile -# Supply your own C cross-compiler; I recommend the one from the OpenWRT buildroot -# Also requires a libpcap to link with, use libpcap.a for static, .so for shared -CC=~/buildroot/staging_dir_mipsel/bin/mipsel-linux-gcc -LDFLAGS=-L~/buildroot/staging_dir_mipsel/lib -LIBS=-lpcap - -CCOPTS=-O2 -Os -pipe -mips32 -mtune=mips32 -INCLUDE=-I~/buildroot/staging_dir_mipsel/include -SOURCES=wiviz.c wl_access.c channelhopper.c -OBJS=wiviz.o wl_access.o channelhopper.o -TARGET=wiviz - -wiviz: ${OBJS} - ${CC} ${CCOPTS} ${INCLUDE} -o ${TARGET} ${OBJS} ${LDFLAGS} ${LIBS} - -wiviz.o: wiviz.c - ${CC} ${CCOPTS} ${INCLUDE} -c ${SOURCES} -wl_access.o: wl_access.c - ${CC} ${CCOPTS} ${INCLUDE} -c ${SOURCES} -channelhopper.o: channelhopper.c - ${CC} ${CCOPTS} ${INCLUDE} -c ${SOURCES} - -remake: - touch wiviz.c wl_access.c channelhopper.c diff --git a/openwrt/package/wiviz/src/channelhopper.c b/openwrt/package/wiviz/src/channelhopper.c deleted file mode 100644 index 0a3e6feb085..00000000000 --- a/openwrt/package/wiviz/src/channelhopper.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -This file is part of Wi-viz (http://wiviz.natetrue.com). - -Wi-viz is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License v2 as published by -the Free Software Foundation. - -Wi-viz 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 Wi-viz; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -#include -#include -#include -#include -#include "wl_access.h" -#include "channelhopper.h" -#include "structs.h" - -void ch_sig_handler(int i) { - - } - -void channelHopper(wiviz_cfg * cfg) { - int hopPos; - int nc; - - //Turn off signal handling from parent process - signal(SIGUSR1, &ch_sig_handler); - signal(SIGUSR2, &ch_sig_handler); - - //Start hoppin'! - hopPos = 0; - while (1) { - nc = cfg->channelHopSeq[hopPos]; - hopPos = (hopPos + 1) % cfg->channelHopSeqLen; - //Set the channel - fprintf(stderr, "It sets the channel to %i\n", nc); - wl_ioctl(WL_DEVICE, WLC_SET_CHANNEL, &nc, 4); - //Sleep - usleep(cfg->channelDwellTime * 1000); - } - } diff --git a/openwrt/package/wiviz/src/channelhopper.h b/openwrt/package/wiviz/src/channelhopper.h deleted file mode 100644 index 6ab63af0883..00000000000 --- a/openwrt/package/wiviz/src/channelhopper.h +++ /dev/null @@ -1,19 +0,0 @@ -/* -This file is part of Wi-viz (http://wiviz.natetrue.com). - -Wi-viz is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License v2 as published by -the Free Software Foundation. - -Wi-viz 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 Wi-viz; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -// Channel hopper definition - -void channelHopper(); diff --git a/openwrt/package/wiviz/src/structs.h b/openwrt/package/wiviz/src/structs.h deleted file mode 100644 index 10f80f336e9..00000000000 --- a/openwrt/package/wiviz/src/structs.h +++ /dev/null @@ -1,169 +0,0 @@ -/* -This file is part of Wi-viz (http://wiviz.natetrue.com). - -Wi-viz is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License v2 as published by -the Free Software Foundation. - -Wi-viz 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 Wi-viz; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -//Structure definitions for wireless packets - -#define MAX_HOSTS 257 - -#ifdef DEFINE_TYPES -typedef unsigned short u_short; -typedef unsigned char u_char; -typedef unsigned int u_int; -#endif - -typedef enum { - mgt_assocRequest = 0, - mgt_assocResponse = 1, - mgt_reassocRequest = 2, - mgt_reassocResponse = 3, - mgt_probeRequest = 4, - mgt_probeResponse = 5, - mgt_beacon = 8, - mgt_disassoc = 10, - mgt_auth = 11, - mgt_deauth = 12 - } wifi_frametype; - -typedef struct ieee802_11_hdr { - u_char frame_control; - u_char flags; -#define IEEE80211_TO_DS 0x01 -#define IEEE80211_FROM_DS 0x02 -#define IEEE80211_MORE_FRAG 0x04 -#define IEEE80211_RETRY 0x08 -#define IEEE80211_PWR_MGT 0x10 -#define IEEE80211_MORE_DATA 0x20 -#define IEEE80211_WEP_FLAG 0x40 -#define IEEE80211_ORDER_FLAG 0x80 - u_short duration; - u_char addr1[6]; - u_char addr2[6]; - u_char addr3[6]; - u_short frag_and_seq; - } ieee802_11_hdr; - -typedef struct { - u_char timestamp[8]; - u_short bcn_interval; - u_short caps; -#define MGT_CAPS_AP 0x1 -#define MGT_CAPS_IBSS 0x2 -#define MGT_CAPS_WEP 0x10 - } ieee_802_11_mgt_frame; - -typedef struct { - u_char tag; - u_char length; - } ieee_802_11_tag; - -typedef enum { - tagSSID = 0, - tagRates = 1, - tagChannel = 3, - tagVendorSpecific = 0xDD - } i81tag; - -typedef struct prism_hdr { - u_int msg_code; - u_int msg_length; - char cap_device[16]; - //char dids[0]; - } prism_hdr; - -typedef struct prism_did { - u_short did; - u_short status1; - u_short status2; - u_short length; - //int value[0]; - } prism_did; - -typedef enum prism_did_num { - pdn_host_time = 0x1041, - pdn_mac_time = 0x2041, - pdn_rssi = 0x4041, - pdn_sq = 0x5041, - pdn_datarate = 0x8041, - pdn_framelen = 0xa041 - } prism_did_num; - - - -//Structure definitions for data collection - -typedef enum { - typeUnknown, - typeAP, - typeSta, - typeAdhocHub - } host_type; - -typedef enum { - ssUnknown, - ssUnassociated, - ssAssociated - } sta_state; - -typedef enum { - aetUnknown, - aetUnencrypted, - aetEncUnknown, - aetEncWEP, - aetEncWPA - } ap_enc_type; - -typedef struct { - u_char bssid[6]; - char * ssid[32]; - u_char ssidlen; - u_char channel; - u_short flags; - ap_enc_type encryption; - } ap_info; - -typedef struct { - sta_state state; - u_char connectedBSSID[6]; - } sta_info; - -typedef struct { - u_char occupied; - u_char mac[6]; - host_type type; - time_t lastSeen; - int RSSI; - ap_info * apInfo; - sta_info * staInfo; - } wiviz_host; - -//Primary config struct -typedef struct { - wiviz_host hosts[MAX_HOSTS]; - int numHosts; - int readFromWl; - time_t lastKeepAlive; - int channelHopping; - int channelDwellTime; - int channelHopSeq[14]; - int channelHopSeqLen; - int curChannel; - int channelHopperPID; - } wiviz_cfg; - - - - - diff --git a/openwrt/package/wiviz/src/wiviz.c b/openwrt/package/wiviz/src/wiviz.c deleted file mode 100644 index d2ad9f2ee4a..00000000000 --- a/openwrt/package/wiviz/src/wiviz.c +++ /dev/null @@ -1,572 +0,0 @@ -/* -This file is part of Wi-viz (http://wiviz.natetrue.com). - -Wi-viz is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License v2 as published by -the Free Software Foundation. - -Wi-viz 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 Wi-viz; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -#include -#include -#include - -#define HOST_TIMEOUT 300 - -#include "wl_access.h" -#include "structs.h" -#include "channelhopper.h" - -#ifdef WIN32 -#define OFFLINE -#endif -#ifndef __cplusplus -#define __cdecl -#endif - -#define nonzeromac(x) memcmp(x, "\0\0\0\0\0\0", 6) - -void dealWithPacket(wiviz_cfg * cfg, struct pcap_pkthdr * header, const u_char * packet); -wiviz_host * gotHost(wiviz_cfg * cfg, u_char * mac, host_type type); -void fprint_mac(FILE * outf, u_char * mac, char * extra); -void print_mac(u_char * mac, char * extra); -void print_host(FILE * outf, wiviz_host * host); -void __cdecl signal_handler(int); -void readWL(wiviz_cfg * cfg); -void reloadConfig(); - -wiviz_cfg * global_cfg; - -//////////////////////////////////////////////////////////////////////////////// -int main(int argc, char * * argv) { - pcap_t *handle; - char *dev; - char errbuf[PCAP_ERRBUF_SIZE]; - int stop = 0; - int oldMonitor, newMonitor; - struct pcap_pkthdr header; - const u_char *packet; - wiviz_cfg cfg; - int i; - int defaultHopSeq[] = { 1, 3, 6, 8, 11 }; - - global_cfg = &cfg; - signal(SIGUSR1, &signal_handler); - signal(SIGUSR2, &signal_handler); - - fprintf(stderr, "Wi-Viz infogathering daemon by Nathan True\n"); - - memset(&cfg, 0, sizeof(wiviz_cfg)); - cfg.numHosts = 0; - cfg.lastKeepAlive = time(NULL); - cfg.channelHopping = 0; - cfg.channelDwellTime = 1000; - cfg.channelHopSeqLen = 5; - memcpy(cfg.channelHopSeq, defaultHopSeq, sizeof(defaultHopSeq)); - - wl_ioctl(WL_DEVICE, WLC_GET_MAGIC, &i, 4); - if (i != WLC_IOCTL_MAGIC) { - fprintf(stderr, "Wireless magic not correct, not querying wl for info\n"); - cfg.readFromWl = 0; - } - else { - cfg.readFromWl = 1; - wl_ioctl(WL_DEVICE, WLC_GET_MONITOR, &oldMonitor, 4); - newMonitor = 1; - wl_ioctl(WL_DEVICE, WLC_SET_MONITOR, &newMonitor, 4); - } - - reloadConfig(); - -#ifndef OFFLINE - dev = "prism0"; - handle = pcap_open_live(dev, BUFSIZ, 1, 0, errbuf); -#else - dev = "c:\\cifsroot\\wdump2.pcap"; - handle = pcap_open_offline(dev, errbuf); -#endif - - if (cfg.readFromWl) { - readWL(&cfg); - } - - if (!handle) { - fprintf(stderr, "Failure to open pcap!\nErr=%s\n", errbuf); - return -1; - } - while (!stop) { - packet = pcap_next(handle, &header); - if (!packet) break; - dealWithPacket(&cfg, &header, packet); - if (time(NULL) - cfg.lastKeepAlive > 30) stop = 1; - } - - signal_handler(SIGUSR1); - - if (cfg.channelHopperPID) kill(cfg.channelHopperPID, SIGKILL); - - for (i = 0; i < MAX_HOSTS; i++) { - print_host(stderr, cfg.hosts + i); - if (cfg.hosts[i].occupied) printf("\n"); - if (cfg.hosts[i].apInfo) free(cfg.hosts[i].apInfo); - if (cfg.hosts[i].staInfo) free(cfg.hosts[i].staInfo); - } - - wl_ioctl(WL_DEVICE, WLC_SET_MONITOR, &oldMonitor, 4); - - pcap_close(handle); - return 0; - } - -//////////////////////////////////////////////////////////////////////////////// -void writeJavascript() { - int i; - FILE * outf; - wiviz_host * h; - - outf = fopen("/tmp/wiviz-pipe", "w"); - if (!outf) { - fprintf(stderr, "Failure to open output file\n"); - return; - } - - global_cfg->lastKeepAlive = time(NULL); - - if(global_cfg->readFromWl) readWL(global_cfg); - - fprintf(outf, "top.hosts = new Array(\n"); - for (i = 0; i < MAX_HOSTS; i++) { - h = global_cfg->hosts + i; - if (h->occupied == 0) continue; - if (time(NULL) - h->lastSeen > HOST_TIMEOUT) { - h->occupied = 0; - } - fprintf(outf, " new Array("); - print_host(outf, h); - fprintf(outf, "),\n"); - } - fprintf(outf, "new Array());\n"); - fprintf(outf, "var cfg_string = 'channel-"); - if (global_cfg->channelHopping) { - fprintf(outf, "hopping"); - } - else { - fprintf(outf, "%i", global_cfg->curChannel); - } - fprintf(outf, "';\ntop.wiviz_callback(top.hosts, cfg_string);\n"); - fclose(outf); - } - -//////////////////////////////////////////////////////////////////////////////// -void reloadConfig() { - FILE * cnf; - wiviz_cfg * cfg = global_cfg; - char filebuffer[512]; - char * fbptr, * p, * v, * vv; - int fblen, val; - int hopCfgChanged = 0; - int newHopSeq[12]; - int newHopSeqLen = 0; - - fprintf(stderr, "Loading config file\n"); - - cnf = fopen("/tmp/wiviz-cfg", "r"); - if (!cnf) { - fprintf(stderr, "Wiviz: No config file (/tmp/wiviz-cfg) present, using defaults\n"); - return; - } - - fblen = fread(filebuffer, 1, 512, cnf); - fclose(cnf); - if (fblen >= 512) { - fprintf(stderr, "Error reading config file\n"); - return; - } - filebuffer[fblen] = 0; - fprintf(stderr, "Read %i bytes from config file\n", fblen); - - fbptr = filebuffer; - - while (fbptr < filebuffer + fblen && *fbptr != 0) { - p = fbptr; - //Find end of parameter - for (; *fbptr != '=' && *fbptr != 0; fbptr++); - *fbptr = 0; - v = ++fbptr; - //Find end of value - for (; *fbptr != '&' && *fbptr != 0; fbptr++); - *(fbptr++) = 0; - fprintf(stderr, "Config: %s=%s\n", p, v); - //Apply configuration - if (!strcmp(p, "channelsel")) { - //Channel selector - cfg->channelHopping = 0; - if (!strcmp(v, "hop")) { - //Set channel hopping - cfg->channelHopping = 1; - hopCfgChanged = 1; - } - else if (!strcmp(v, "nochange")) { - //Don't change anything, read channel from wireless card - readWL(cfg); - } - else { - val = atoi(v); - if (val < 1 || val > 14) { - fprintf(stderr, "Channel setting in config file invalid (%i)\n", cfg->curChannel); - } - else { - cfg->curChannel = val; - if (cfg->readFromWl) { - if (wl_ioctl(WL_DEVICE, WLC_SET_CHANNEL, &cfg->curChannel, 4) < 0) { - fprintf(stderr, "Channel set to %i failed\n", cfg->curChannel); - } - } - else { - fprintf(stderr, "Can't set channel, no Broadcom wireless device present\n"); - } - } - } - } - if (!strcmp(p, "hopdwell")) { - val = atoi(v); - if (val < 100) val = 100; - if (val > 30000) val = 30000; - if (cfg->channelDwellTime != val) hopCfgChanged = 1; - cfg->channelDwellTime = val; - } - if (!strcmp(p, "hopseq")) { - cfg->channelHopSeqLen = 0; - while (v < fbptr) { - for (vv = v; *vv != ',' && *vv != 0; vv++); - if (*vv == 0) { - cfg->channelHopSeq[cfg->channelHopSeqLen++] = atoi(v); - break; - } - *vv = 0; - cfg->channelHopSeq[cfg->channelHopSeqLen++] = atoi(v); - v = vv + 1; - } - } - /* - if (!strcmp(p, "")) { - } - */ - } - //Apply channel hopper settings - if (cfg->channelHopping == 0 && cfg->channelHopperPID) { - kill(cfg->channelHopperPID, SIGKILL); - cfg->channelHopperPID = 0; - } - if (cfg->channelHopping == 1 && hopCfgChanged) { - if (cfg->channelHopperPID) kill(cfg->channelHopperPID, SIGKILL); - if ((cfg->channelHopperPID = fork()) == 0) { - channelHopper(cfg); - } - } - } - -//////////////////////////////////////////////////////////////////////////////// -void __cdecl signal_handler(int signum) { - if (signum == SIGUSR1) writeJavascript(); - if (signum == SIGUSR2) reloadConfig(); - } - -//////////////////////////////////////////////////////////////////////////////// -void dealWithPacket(wiviz_cfg * cfg, struct pcap_pkthdr * header, const u_char * packet) { - ieee802_11_hdr * hWifi; - prism_hdr * hPrism; - wiviz_host * host; - wiviz_host * emergebss; - host_type type = typeUnknown; - int wfType; - int rssi = 0; - int to_ds, from_ds; - prism_did * i; - ieee_802_11_tag * e; - ieee_802_11_mgt_frame * m; - char * src = "\0\0\0\0\0\0"; - char * dst = "\0\0\0\0\0\0"; - char * bss = "\0\0\0\0\0\0"; - char * ssid = ""; - int channel = 0; - int adhocbeacon = 0; - u_char ssidlen = 0; - ap_enc_type encType = aetUnknown; - - if (!packet) return; - if (header->len < sizeof(prism_hdr) + sizeof(ieee802_11_hdr)) return; - hPrism = (prism_hdr *) packet; - hWifi = (ieee802_11_hdr *) (packet + (hPrism->msg_length)); - - //Parse the prism DIDs - i = (prism_did *)((char *)hPrism + sizeof(prism_hdr)); - while ((int)i < (int)hWifi) { - if (i->did == pdn_rssi) rssi = *(int *)(i+1); - i = (prism_did *) ((int)(i+1) + i->length); - } - - //Establish the frame type - wfType = ((hWifi->frame_control & 0xF0) >> 4) + ((hWifi->frame_control & 0xC) << 2); - switch (wfType) { - case mgt_assocRequest: - case mgt_reassocRequest: - case mgt_probeRequest: - type = typeSta; - src=hWifi->addr2; - dst=hWifi->addr1; - break; - case mgt_assocResponse: - case mgt_reassocResponse: - case mgt_probeResponse: - case mgt_beacon: - src=hWifi->addr2; - dst=hWifi->addr1; - bss=hWifi->addr3; - type = typeAP; - break; - } - to_ds = hWifi->flags & IEEE80211_TO_DS; - from_ds = hWifi->flags & IEEE80211_FROM_DS; - if ((wfType & 0xF0) == 0x20 && (wfType & 0xF) < 4) { - //Data frame - src=hWifi->addr2; - dst=hWifi->addr1; - if (!from_ds) type = typeSta; - else type = typeAP; - if (!to_ds && !from_ds) bss = hWifi->addr3; - if (to_ds && !from_ds) bss = hWifi->addr1; - if (!to_ds && from_ds) bss = hWifi->addr2; - } - if (type == typeUnknown) return; - - //Parse the 802.11 tags - if (wfType == mgt_probeResponse || wfType == mgt_beacon) { - m = (ieee_802_11_mgt_frame *) (hWifi + 1); - if (m->caps & MGT_CAPS_IBSS) { - type = typeSta; - adhocbeacon = 1; - } - if (m->caps & MGT_CAPS_WEP) encType = aetEncWEP; - else encType = aetUnencrypted; - e = (ieee_802_11_tag *) ((int) m + sizeof(ieee_802_11_mgt_frame)); - while ((u_int)e < (u_int)packet + header->len) { - if (e->tag == tagSSID) { - ssidlen = e->length; - ssid = (char *)(e + 1); - } - if (e->tag == tagChannel) { - channel = *(char *)(e + 1); - } - if (e->tag == tagVendorSpecific) { - if (e->length >= 4 && memcmp(e + 1, "\x00\x50\xf2\x01", 4) == 0) { - //WPA encryption - encType = aetEncWPA; - } - } - e = (ieee_802_11_tag *) ((int)(e + 1) + e->length); - } - } - - //Look up the host in the hash table - host = gotHost(cfg, src, type); - - //Add any info we received - if (host->RSSI) { - host->RSSI = host->RSSI * 9 / 10 + (-rssi * 10); - } - else { - host->RSSI = -rssi * 100; - } - if (type == typeSta) { - if (nonzeromac(bss)) { - memcpy(host->staInfo->connectedBSSID, bss, 6); - host->staInfo->state = ssAssociated; - emergebss = gotHost(cfg, bss, typeAP); - if (emergebss->RSSI == 0) emergebss->RSSI = 10000; - memcpy(emergebss->apInfo->bssid, bss, 6); - if (adhocbeacon) { - emergebss->type = typeAdhocHub; - if (ssidlen > 0 && ssidlen <= 32) { - memcpy(emergebss->apInfo->ssid, ssid, ssidlen); - emergebss->apInfo->ssidlen = ssidlen; - } - if (channel) emergebss->apInfo->channel = channel; - emergebss->apInfo->flags = hWifi->flags; - emergebss->RSSI = host->RSSI; - if (encType != aetUnknown) emergebss->apInfo->encryption = encType; - } - } - if (wfType == mgt_probeRequest && host->staInfo->state == ssUnknown) host->staInfo->state = ssUnassociated; - } - if (type == typeAP) { - if (nonzeromac(bss)) { - memcpy(host->apInfo->bssid, bss, 6); - } - if (ssidlen > 0 && ssidlen <= 32) { - memcpy(host->apInfo->ssid, ssid, ssidlen); - host->apInfo->ssidlen = ssidlen; - } - if (channel) host->apInfo->channel = channel; - host->apInfo->flags = hWifi->flags; - if (encType != aetUnknown) host->apInfo->encryption = encType; - } - } - -//////////////////////////////////////////////////////////////////////////////// -void print_mac(u_char * mac, char * extra) { - fprint_mac(stdout, mac, extra); - } - -//////////////////////////////////////////////////////////////////////////////// -void fprint_mac(FILE * outf, u_char * mac, char * extra) { - fprintf(outf, "%02X:%02X:%02X:%02X:%02X:%02X%s", - mac[0] & 0xFF, - mac[1] & 0xFF, - mac[2] & 0xFF, - mac[3] & 0xFF, - mac[4] & 0xFF, - mac[5] & 0xFF, - extra); - } - -//////////////////////////////////////////////////////////////////////////////// -#define MAX_PROBES MAX_HOSTS/2 -wiviz_host * gotHost(wiviz_cfg * cfg, u_char * mac, host_type type) { - int i = (mac[5] + (mac[4] << 8)) % MAX_HOSTS; - int c = 0; - wiviz_host * h = cfg->hosts + i; - while (h->occupied && memcmp(h->mac, mac, 6)) { - i++; h++; c++; - if (i >= MAX_HOSTS) { - i = 0; - h = cfg->hosts; - } - if (c > MAX_PROBES) break; - } - if (!h->occupied) { - fprintf(stderr, "New host, "); - fprint_mac(stderr, mac, ", type="); - fprintf(stderr, "%s\n", (type==typeAP) ? "AP" : ((type==typeSta) ? "Sta" : "Unk")); - } - h->occupied = 1; - h->lastSeen = time(NULL); - h->type = type; - memcpy(h->mac, mac, 6); - if (h->type == typeAP && !h->apInfo) { - h->apInfo = (ap_info *) malloc(sizeof(ap_info)); - memset(h->apInfo, 0, sizeof(ap_info)); - } - if (h->type == typeSta && !h->staInfo) { - h->staInfo = (sta_info *) malloc(sizeof(sta_info)); - memset(h->staInfo, 0, sizeof(sta_info)); - } - return h; - } - -//////////////////////////////////////////////////////////////////////////////// -void print_host(FILE * outf, wiviz_host * host) { - int i; - - if (!host->occupied) return; - fprintf(outf, "'"); - fprint_mac(outf, host->mac, "'"); - fprintf(outf, ", -%i, '", host->RSSI / 100); - switch (host->type) { - case typeAP: fprintf(outf, "ap"); break; - case typeSta: fprintf(outf, "sta"); break; - case typeAdhocHub: fprintf(outf, "adhoc"); break; - } - if (host->type == typeSta) { - switch(host->staInfo->state) { - case ssAssociated: - fprintf(outf, "-assoc-"); - fprint_mac(outf, host->staInfo->connectedBSSID, ""); - break; - case ssUnassociated: - fprintf(outf, "-unassoc"); - } - } - if (host->type == typeAP || host->type == typeAdhocHub) { - fprintf(outf, "-channel-%i-ssid-", host->apInfo->channel & 0xFF); - for (i = 0; i < host->apInfo->ssidlen; i++) { - fprintf(outf, "\\x%02X", *((char *)host->apInfo->ssid + i) & 0xFF); - } - switch (host->apInfo->encryption) { - case aetUnknown: fprintf(outf, "-?enc-?alg"); break; - case aetUnencrypted: fprintf(outf, "-unenc-na"); break; - case aetEncUnknown: fprintf(outf, "-enc-unknown"); break; - case aetEncWEP: fprintf(outf, "-enc-wep"); break; - case aetEncWPA: fprintf(outf, "-enc-wpa"); break; - } - } - fprintf(outf, "', %i", time(0) - host->lastSeen); - } - -//////////////////////////////////////////////////////////////////////////////// -#define MAX_STA_COUNT 64 -void readWL(wiviz_cfg * cfg) { - int ap, i; - wiviz_host * host, * sta; - uchar mac[6]; - wlc_ssid_t ssid; - channel_info_t channel; - maclist_t * macs; - sta_rssi_t starssi; - - get_mac(WL_DEVICE, mac); - printf("AP mac: "); - print_mac(mac, "\n"); - if (!nonzeromac(mac)) return; - wl_ioctl(WL_DEVICE, WLC_GET_AP, &ap, 4); - if (ap) { - host = gotHost(cfg, mac, typeAP); - wl_ioctl(WL_DEVICE, WLC_GET_BSSID, host->apInfo->bssid, 6); - wl_ioctl(WL_DEVICE, WLC_GET_SSID, &ssid, sizeof(wlc_ssid_t)); - memcpy(host->apInfo->ssid, ssid.SSID, 32); - host->apInfo->ssidlen = ssid.SSID_len; - host->RSSI = 0; - wl_ioctl(WL_DEVICE, WLC_GET_CHANNEL, &channel, sizeof(channel_info_t)); - host->apInfo->channel = channel.hw_channel; - macs = (maclist_t *) malloc(4 + MAX_STA_COUNT * sizeof(ether_addr_t)); - macs->count = MAX_STA_COUNT; - if (wl_ioctl(WL_DEVICE, WLC_GET_ASSOCLIST, macs, 4 + MAX_STA_COUNT * sizeof(ether_addr_t)) > -1) { - for (i = 0; i < macs->count; i++) { - sta = gotHost(cfg, (char *)&macs->ea[i], typeSta); - memcpy(starssi.mac, &macs->ea[i], 6); - starssi.RSSI = 3000; - starssi.zero_ex_forty_one = 0x41; - if (wl_ioctl(WL_DEVICE, WLC_GET_RSSI, &starssi, 12) < 0) printf("rssifail\n"); - sta->RSSI = -starssi.RSSI * 100; - sta->staInfo->state = ssAssociated; - memcpy(sta->staInfo->connectedBSSID, host->apInfo->bssid, 6); - } - } - } - else { - host = gotHost(cfg, mac, typeSta); - host->RSSI = 0; - if (wl_ioctl(WL_DEVICE, WLC_GET_BSSID, &host->staInfo->connectedBSSID, 6) < 0) { - host->staInfo->state = ssUnassociated; - } - else { - host->staInfo->state = ssAssociated; - } - } - if (wl_ioctl(WL_DEVICE, WLC_GET_CHANNEL, &channel, sizeof(channel_info_t)) >= 0) { - cfg->curChannel = channel.hw_channel; - fprintf(stderr, "Current channel is %i\n", cfg->curChannel); - } -} - - - - - diff --git a/openwrt/package/wiviz/src/wl_access.c b/openwrt/package/wiviz/src/wl_access.c deleted file mode 100644 index a5172c36652..00000000000 --- a/openwrt/package/wiviz/src/wl_access.c +++ /dev/null @@ -1,73 +0,0 @@ -/* -This file is part of Wi-viz (http://wiviz.natetrue.com). - -Wi-viz is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License v2 as published by -the Free Software Foundation. - -Wi-viz 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 Wi-viz; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -#include -#include -#include -#include -#include -#include - -#include "wl_access.h" - -int wl_ioctl(char *name, int cmd, void *buf, int len) -{ - struct ifreq ifr; - wl_ioctl_t ioc; - int ret = 0; - int s; - - /* open socket to kernel */ - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - perror("socket"); - return errno; - } - - /* do it */ - ioc.cmd = cmd; - ioc.buf = buf; - ioc.len = len; - strncpy(ifr.ifr_name, name, IFNAMSIZ); - ifr.ifr_data = (caddr_t) &ioc; - ret = ioctl(s, SIOCDEVPRIVATE, &ifr); - - /* cleanup */ - close(s); - return ret; -} - -int get_mac(char *name, void *buf) -{ - struct ifreq ifr; - int ret = 0; - int s; - - /* open socket to kernel */ - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - perror("socket"); - return errno; - } - - strncpy(ifr.ifr_name, name, IFNAMSIZ); - //ifr.ifr_data = (caddr_t) buf; - if ((ret = ioctl(s, SIOCGIFHWADDR, &ifr)) < 0) - perror(ifr.ifr_name); - - /* cleanup */ - close(s); - memcpy(buf, &ifr.ifr_hwaddr.sa_data, 6); - return ret; -} diff --git a/openwrt/package/wiviz/src/wl_access.h b/openwrt/package/wiviz/src/wl_access.h deleted file mode 100644 index 96f239d9b77..00000000000 --- a/openwrt/package/wiviz/src/wl_access.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -This file is part of Wi-viz (http://wiviz.natetrue.com). - -Wi-viz is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License v2 as published by -the Free Software Foundation. - -Wi-viz 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 Wi-viz; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -//wl_access.h - functions for accessing broadcom crap - -#define WL_DEVICE "eth1" - -typedef unsigned int uint32; -typedef unsigned char uchar; -typedef int bool; - -typedef struct ether_addr { - uchar addr[6]; -} ether_addr_t; - -typedef struct wlc_ssid { - uint32 SSID_len; - uchar SSID[32]; -} wlc_ssid_t; -/* For ioctls that take a list of MAC addresses */ -typedef struct maclist { - uint count; /* number of MAC addresses */ - struct ether_addr ea[1]; /* variable length array of MAC addresses */ -} maclist_t; -/* Linux network driver ioctl encoding */ -typedef struct wl_ioctl { - uint cmd; /* common ioctl definition */ - void *buf; /* pointer to user buffer */ - uint len; /* length of user buffer */ - bool set; /* get or set request (optional) */ - uint used; /* bytes read or written (optional) */ - uint needed; /* bytes needed (optional) */ -} wl_ioctl_t; -/* channel encoding */ -typedef struct channel_info { - int hw_channel; - int target_channel; - int scan_channel; -} channel_info_t; -/* RSSI info for sta */ -typedef struct sta_rssi { - int RSSI; - char mac[6]; - u_short zero_ex_forty_one; - } sta_rssi_t; -/* check this magic number */ -#define WLC_IOCTL_MAGIC 0x14e46c77 - -#define WLC_GET_MAGIC 0 -#define WLC_GET_BSSID 23 -#define WLC_SET_BSSID 24 -#define WLC_GET_SSID 25 -#define WLC_SET_SSID 26 -#define WLC_GET_CHANNEL 29 -#define WLC_SET_CHANNEL 30 -#define WLC_GET_MONITOR 107 /* discovered by nbd */ -#define WLC_SET_MONITOR 108 /* discovered by nbd */ -#define WLC_GET_AP 117 -#define WLC_SET_AP 118 -#define WLC_GET_RSSI 127 -#define WLC_GET_ASSOCLIST 159 - - -int wl_ioctl(char *name, int cmd, void *buf, int len); diff --git a/openwrt/package/wknock/Config.in b/openwrt/package/wknock/Config.in deleted file mode 100644 index 106068da3fc..00000000000 --- a/openwrt/package/wknock/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_WKNOCK - prompt "wknock............................ A tool to hide your Access Point against opportunistic attackers." - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPCAP - help - A tool to hide your Access Point against opportunistic attackers. - - http://www.rstack.org/oudot/wknock/ - diff --git a/openwrt/package/wknock/Makefile b/openwrt/package/wknock/Makefile deleted file mode 100644 index de5d0ea9c3c..00000000000 --- a/openwrt/package/wknock/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wknock -PKG_VERSION:=1 -PKG_RELEASE:=1 -PKG_MD5SUM:=6b7a1f3cbb0af88da02e5d30cefd8e7f - -PKG_SOURCE_URL:=http://blackhat.com/presentations/bh-europe-05/BH_EU_05-Oudot/ -PKG_SOURCE:=$(PKG_NAME).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WKNOCK,wknock,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lpcap" \ - all - touch $@ - -$(IPKG_WKNOCK): - install -d -m0755 $(IDIR_WKNOCK)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/wknock $(IDIR_WKNOCK)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/wknock-ng $(IDIR_WKNOCK)/usr/sbin/ - $(RSTRIP) $(IDIR_WKNOCK)/ - $(IPKG_BUILD) $(IDIR_WKNOCK) $(PACKAGE_DIR) diff --git a/openwrt/package/wknock/ipkg/wknock.control b/openwrt/package/wknock/ipkg/wknock.control deleted file mode 100644 index e781daebb65..00000000000 --- a/openwrt/package/wknock/ipkg/wknock.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: wknock -Section: net -Priority: optional -Depends: libpcap, wl -Description: A tool to hide your Access Point against opportunistic attackers. diff --git a/openwrt/package/wol/Config.in b/openwrt/package/wol/Config.in deleted file mode 100644 index 1413d6b9885..00000000000 --- a/openwrt/package/wol/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_WOL - prompt "wol............................... Wake On LAN client" - tristate - default m if CONFIG_DEVEL - help - wol implements Wake On LAN functionality in a small program. - It wakes up hardware that is Magic Packet compliant. - - http://ahh.sourceforge.net/wol/ - diff --git a/openwrt/package/wol/Makefile b/openwrt/package/wol/Makefile deleted file mode 100644 index efdb670378f..00000000000 --- a/openwrt/package/wol/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wol -PKG_VERSION:=0.7.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=c2fa9d7e771134ac8c89d56b8197d4ca - -PKG_SOURCE_URL:=@SF/ahh -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WOL,wol,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - ac_cv_func_malloc_0_nonnull=yes \ - ac_cv_func_realloc_0_nonnull=yes \ - ac_cv_func_mmap_fixed_mapped=yes \ - jm_cv_func_working_malloc=yes \ - ac_cv_func_alloca_works=yes \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_WOL): - install -m0755 -d $(IDIR_WOL)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/wol $(IDIR_WOL)/usr/bin/ - $(RSTRIP) $(IDIR_WOL) - $(IPKG_BUILD) $(IDIR_WOL) $(PACKAGE_DIR) diff --git a/openwrt/package/wol/ipkg/wol.control b/openwrt/package/wol/ipkg/wol.control deleted file mode 100644 index 179ba7c86c3..00000000000 --- a/openwrt/package/wol/ipkg/wol.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: wol -Priority: optional -Section: net -Description: A Program to send magic Wake-on-LAN packets diff --git a/openwrt/package/wondershaper/Config.in b/openwrt/package/wondershaper/Config.in deleted file mode 100644 index 8e5adfdf8e5..00000000000 --- a/openwrt/package/wondershaper/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_WONDERSHAPER - prompt "wondershaper...................... The Wonder Shaper" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_TC - help - WonderShaper is a tc based traffic shaping tool. - - Depends: tc - diff --git a/openwrt/package/wondershaper/Makefile b/openwrt/package/wondershaper/Makefile deleted file mode 100644 index 44533c64df7..00000000000 --- a/openwrt/package/wondershaper/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wondershaper -PKG_VERSION:=1.1a -PKG_RELEASE:=1 -PKG_MD5SUM:=bbc5a3a4485ab286e337ce8550e7b990 - -PKG_SOURCE_URL:=http://lartc.org/wondershaper/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WONDERSHAPER,wondershaper,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - mkdir -p $(PKG_INSTALL_DIR) - touch $@ - -$(IPKG_WONDERSHAPER): - install -d -m0755 $(IDIR_WONDERSHAPER)/usr/sbin - install -d -m0755 $(IDIR_WONDERSHAPER)/etc/init.d - $(CP) $(PKG_BUILD_DIR)/wshaper.htb $(IDIR_WONDERSHAPER)/usr/sbin/wshaper - $(CP) $(PKG_BUILD_DIR)/wshaper.conf $(IDIR_WONDERSHAPER)/etc/wshaper.conf - ln -fs /usr/sbin/wshaper $(IDIR_WONDERSHAPER)/etc/init.d/S60wondershaper - $(IPKG_BUILD) $(IDIR_WONDERSHAPER) $(PACKAGE_DIR) - diff --git a/openwrt/package/wondershaper/ipkg/wondershaper.conffiles b/openwrt/package/wondershaper/ipkg/wondershaper.conffiles deleted file mode 100644 index 14e366cc99a..00000000000 --- a/openwrt/package/wondershaper/ipkg/wondershaper.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/wshaper.conf diff --git a/openwrt/package/wondershaper/ipkg/wondershaper.control b/openwrt/package/wondershaper/ipkg/wondershaper.control deleted file mode 100644 index d90c7bb6ffa..00000000000 --- a/openwrt/package/wondershaper/ipkg/wondershaper.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: wondershaper -Priority: optional -Section: net -Depends: tc -Description: WonderShaper is a tc based traffic shaping tool. diff --git a/openwrt/package/wondershaper/patches/wondershaper-OpenWrt.patch b/openwrt/package/wondershaper/patches/wondershaper-OpenWrt.patch deleted file mode 100644 index 43d7fb115ce..00000000000 --- a/openwrt/package/wondershaper/patches/wondershaper-OpenWrt.patch +++ /dev/null @@ -1,217 +0,0 @@ -diff -Nur wondershaper-1.1a/wshaper.conf wondershaper-1.1a_openwrt/wshaper.conf ---- wondershaper-1.1a/wshaper.conf 1970-01-01 01:00:00.000000000 +0100 -+++ wondershaper-1.1a_openwrt/wshaper.conf 2005-09-09 00:31:54.239340744 +0200 -@@ -0,0 +1,27 @@ -+# Wonder Shaper -+# please read the README before filling out these values -+# -+# Set the following values to somewhat less than your actual download -+# and uplink speed. In kilobits. -+DOWNLINK=1000 -+UPLINK=220 -+ -+# low priority OUTGOING traffic - you can leave this blank if you want -+# low priority source netmasks -+NOPRIOHOSTSRC=80 -+ -+# low priority destination netmasks -+NOPRIOHOSTDST= -+ -+# low priority source ports -+NOPRIOPORTSRC= -+ -+# low priority destination ports -+NOPRIOPORTDST= -+ -+# WAN device -+DEV=$(nvram get wan_ifname) -+ -+# tc location -+TC=/usr/sbin/tc -+ -diff -Nur wondershaper-1.1a/wshaper.htb wondershaper-1.1a_openwrt/wshaper.htb ---- wondershaper-1.1a/wshaper.htb 2002-04-16 16:26:51.000000000 +0200 -+++ wondershaper-1.1a_openwrt/wshaper.htb 2005-09-11 13:24:56.143626544 +0200 -@@ -1,44 +1,22 @@ --#!/bin/bash -+#!/bin/ash - # Wonder Shaper --# please read the README before filling out these values --# --# Set the following values to somewhat less than your actual download --# and uplink speed. In kilobits. Also set the device that is to be shaped. -- --DOWNLINK=800 --UPLINK=220 --DEV=ppp0 -- --# low priority OUTGOING traffic - you can leave this blank if you want --# low priority source netmasks --NOPRIOHOSTSRC= -- --# low priority destination netmasks --NOPRIOHOSTDST= -+. /etc/functions.sh -+. /etc/wshaper.conf - --# low priority source ports --NOPRIOPORTSRC= - --# low priority destination ports --NOPRIOPORTDST= -- -- --# Now remove the following two lines :-) -- --echo Please read the documentation in 'README' first --exit -+# do the magic - - if [ "$1" = "status" ] - then -- tc -s qdisc ls dev $DEV -- tc -s class ls dev $DEV -+ $TC -s qdisc ls dev $DEV -+ $TC -s class ls dev $DEV - exit - fi - - - # clean existing down- and uplink qdiscs, hide errors --tc qdisc del dev $DEV root 2> /dev/null > /dev/null --tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null -+$TC qdisc del dev $DEV root 2> /dev/null > /dev/null -+$TC qdisc del dev $DEV ingress 2> /dev/null > /dev/null - - if [ "$1" = "stop" ] - then -@@ -46,50 +24,66 @@ - fi - - -+# wondershaper must be executed everytime an interface comes up -+# if we have dynamic interface ppp0 add wondershaper to ip-up -+if [ $DEV = "ppp0" ] && ! grep -q wshaper /etc/ppp/ip-up -+then -+ echo "/usr/sbin/wshaper" >> /etc/ppp/ip-up -+ chmod 755 /etc/ppp/ip-up -+fi -+ -+ -+ -+# load the needed kernel modules -+for module in sch_prio sch_htb sch_sfq sch_ingress cls_tcindex cls_fw cls_route cls_u32 -+do -+ insmod $module 2> /dev/null > /dev/null -+done -+ - ###### uplink - - # install root HTB, point default traffic to 1:20: - --tc qdisc add dev $DEV root handle 1: htb default 20 -+$TC qdisc add dev $DEV root handle 1: htb default 20 - - # shape everything at $UPLINK speed - this prevents huge queues in your - # DSL modem which destroy latency: - --tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k -+$TC class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k - - # high prio class 1:10: - --tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \ -+$TC class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \ - burst 6k prio 1 - - # bulk & default class 1:20 - gets slightly less traffic, - # and a lower priority: - --tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[9*$UPLINK/10]kbit \ -+$TC class add dev $DEV parent 1:1 classid 1:20 htb rate $((9*$UPLINK/10))kbit \ - burst 6k prio 2 - --tc class add dev $DEV parent 1:1 classid 1:30 htb rate $[8*$UPLINK/10]kbit \ -+$TC class add dev $DEV parent 1:1 classid 1:30 htb rate $((8*$UPLINK/10))kbit \ - burst 6k prio 2 - - # all get Stochastic Fairness: --tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 --tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 --tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 -+$TC qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 -+$TC qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 -+$TC qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 - - # TOS Minimum Delay (ssh, NOT scp) in 1:10: - --tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ -+$TC filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ - match ip tos 0x10 0xff flowid 1:10 - - # ICMP (ip protocol 1) in the interactive class 1:10 so we - # can do measurements & impress our friends: --tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ -+$TC filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ - match ip protocol 1 0xff flowid 1:10 - - # To speed up downloads while an upload is going on, put ACK packets in - # the interactive class: - --tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ -+$TC filter add dev $DEV parent 1: protocol ip prio 10 u32 \ - match ip protocol 6 0xff \ - match u8 0x05 0x0f at 0 \ - match u16 0x0000 0xffc0 at 2 \ -@@ -101,31 +95,31 @@ - # some traffic however suffers a worse fate - for a in $NOPRIOPORTDST - do -- tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \ -+ $TC filter add dev $DEV parent 1: protocol ip prio 14 u32 \ - match ip dport $a 0xffff flowid 1:30 - done - - for a in $NOPRIOPORTSRC - do -- tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \ -+ $TC filter add dev $DEV parent 1: protocol ip prio 15 u32 \ - match ip sport $a 0xffff flowid 1:30 - done - - for a in $NOPRIOHOSTSRC - do -- tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ -+ $TC filter add dev $DEV parent 1: protocol ip prio 16 u32 \ - match ip src $a flowid 1:30 - done - - for a in $NOPRIOHOSTDST - do -- tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \ -+ $TC filter add dev $DEV parent 1: protocol ip prio 17 u32 \ - match ip dst $a flowid 1:30 - done - - # rest is 'non-interactive' ie 'bulk' and ends up in 1:20 - --tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \ -+$TC filter add dev $DEV parent 1: protocol ip prio 18 u32 \ - match ip dst 0.0.0.0/0 flowid 1:20 - - -@@ -136,12 +130,12 @@ - # - # attach ingress policer: - --tc qdisc add dev $DEV handle ffff: ingress -+$TC qdisc add dev $DEV handle ffff: ingress - - # filter *everything* to it (0.0.0.0/0), drop everything that's - # coming in too fast: - --tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ -+$TC filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ - 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 - - diff --git a/openwrt/package/wpa_supplicant/Config.in b/openwrt/package/wpa_supplicant/Config.in deleted file mode 100644 index 00a756b4c43..00000000000 --- a/openwrt/package/wpa_supplicant/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_PACKAGE_WPA_SUPPLICANT - prompt "wpa_supplicant.................... WPA Supplicant with support for WPA and WPA2" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - help - WPA Supplicant with support for WPA and WPA2 (IEEE 802.11i / RSN). - Supplicant is the IEEE 802.1X/WPA component that is used in the client - stations. It implements key negotiation with a WPA Authenticator and it - controls the roaming and IEEE 802.11 authentication/association. - - http://hostap.epitest.fi/wpa_supplicant/ - - Depends: openssl - diff --git a/openwrt/package/wpa_supplicant/Makefile b/openwrt/package/wpa_supplicant/Makefile deleted file mode 100644 index b1a9bd1b339..00000000000 --- a/openwrt/package/wpa_supplicant/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wpa_supplicant -PKG_VERSION:=0.4.7 -PKG_RELEASE:=1 -PKG_MD5SUM:=1345730f15d5f93f2f083096ddc903eb - -PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WPA_SUPPLICANT,wpa-supplicant,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - $(CP) ./files/config $(PKG_BUILD_DIR)/.config - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - OPT_FLAGS="$(TARGET_CFLAGS)" \ - KERNEL=$(LINUX_DIR) \ - all - touch $@ - -$(IPKG_WPA_SUPPLICANT): - install -m0755 -d $(IDIR_WPA_SUPPLICANT)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/wpa_cli $(IDIR_WPA_SUPPLICANT)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/wpa_passphrase $(IDIR_WPA_SUPPLICANT)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/wpa_supplicant $(IDIR_WPA_SUPPLICANT)/usr/sbin/ - $(RSTRIP) $(IDIR_WPA_SUPPLICANT) - $(IPKG_BUILD) $(IDIR_WPA_SUPPLICANT) $(PACKAGE_DIR) diff --git a/openwrt/package/wpa_supplicant/files/config b/openwrt/package/wpa_supplicant/files/config deleted file mode 100644 index 19a0fd32942..00000000000 --- a/openwrt/package/wpa_supplicant/files/config +++ /dev/null @@ -1,17 +0,0 @@ -# rather important -CONFIG_DRIVER_BROADCOM=y -CONFIG_DRIVER_HOSTAP=y -CONFIG_DRIVER_MADWIFI=y -CONFIG_DRIVER_WEXT=y -CONFIG_IEEE8021X_EAPOL=y -CONFIG_CTRL_IFACE=y - -# default -CONFIG_EAP_PSK=y -CONFIG_EAP_MD5=y - -# optional -CONFIG_MSCHAPV2=y -CONFIG_EAP_TLS=y -CONFIG_EAP_PEAP=y -CONFIG_EAP_TTLS=y diff --git a/openwrt/package/wpa_supplicant/ipkg/wpa-supplicant.control b/openwrt/package/wpa_supplicant/ipkg/wpa-supplicant.control deleted file mode 100644 index ea4f7f8ed6d..00000000000 --- a/openwrt/package/wpa_supplicant/ipkg/wpa-supplicant.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: wpa-supplicant -Priority: optional -Section: net -Description: WPA Supplicant with support for WPA and WPA2 -Depends: libopenssl diff --git a/openwrt/package/wpa_supplicant/patches/101-ldflags.patch b/openwrt/package/wpa_supplicant/patches/101-ldflags.patch deleted file mode 100644 index b8b6f66610a..00000000000 --- a/openwrt/package/wpa_supplicant/patches/101-ldflags.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- wpa_supplicant-0.3.8/Makefile.orig 2005-05-22 12:37:28.000000000 +0200 -+++ wpa_supplicant-0.3.8/Makefile 2005-05-22 12:40:04.000000000 +0200 -@@ -304,7 +304,7 @@ - OBJS += wpa_supplicant.o wpa.o l2_packet.o drivers.o - - wpa_supplicant: .config $(OBJS) -- $(CC) -o wpa_supplicant $(OBJS) $(LIBS) -+ $(CC) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) - - eapol_test: .config $(OBJS_t) - $(CC) -o eapol_test $(OBJS_t) $(LIBS) -@@ -313,10 +313,10 @@ - $(CC) -o preauth_test $(OBJS_t2) $(LIBS) - - wpa_passphrase: $(OBJS_p) -- $(CC) -o wpa_passphrase $(OBJS_p) $(LIBS_p) -+ $(CC) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p) - - wpa_cli: $(OBJS_c) -- $(CC) -o wpa_cli $(OBJS_c) $(LIBS_c) -+ $(CC) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c) - - win_if_list: win_if_list.c - $(CC) -o $@ win_if_list.c $(CFLAGS) $(LIBS_w) diff --git a/openwrt/package/wpa_supplicant/patches/102-opt_cflags.patch b/openwrt/package/wpa_supplicant/patches/102-opt_cflags.patch deleted file mode 100644 index ec38b733e9b..00000000000 --- a/openwrt/package/wpa_supplicant/patches/102-opt_cflags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- wpa_supplicant-0.3.8/Makefile.orig 2005-02-14 02:55:47.000000000 +0100 -+++ wpa_supplicant-0.3.8/Makefile 2005-05-21 21:06:03.000000000 +0200 -@@ -3,7 +3,8 @@ - endif - - ifndef CFLAGS --CFLAGS = -MMD -O2 -Wall -g -+OPT_FLAGS = -O2 -g -+CFLAGS = -MMD $(OPT_FLAGS) -Wall - endif - - # Include directories for CVS version diff --git a/openwrt/package/wput/Config.in b/openwrt/package/wput/Config.in deleted file mode 100644 index e1e7b7ab774..00000000000 --- a/openwrt/package/wput/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_WPUT - prompt "wput.............................. A wget-like command-line FTP client" - tristate - default m if CONFIG_DEVEL - help - A wget-like command-line FTP client. - - http://itooktheredpill.dyndns.org/wput/ - diff --git a/openwrt/package/wput/Makefile b/openwrt/package/wput/Makefile deleted file mode 100644 index 5c70c331d20..00000000000 --- a/openwrt/package/wput/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wput -PKG_VERSION:=0.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=441b2e07219f78167b29a7ac33488fff - -PKG_SOURCE_URL:=@SF/wput -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WPUT,wput,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --disable-g-switch \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ - -$(IPKG_WPUT): - install -d -m0755 $(IDIR_WPUT)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/wput $(IDIR_WPUT)/usr/bin/ - $(RSTRIP) $(IDIR_WPUT) - $(IPKG_BUILD) $(IDIR_WPUT) $(PACKAGE_DIR) - diff --git a/openwrt/package/wput/ipkg/wput.control b/openwrt/package/wput/ipkg/wput.control deleted file mode 100644 index 06d51ad7615..00000000000 --- a/openwrt/package/wput/ipkg/wput.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: wput -Priority: optional -Section: net -Description: a wget-like command-line FTP client diff --git a/openwrt/package/wrt-radauth/Config.in b/openwrt/package/wrt-radauth/Config.in deleted file mode 100644 index 38222bf7be5..00000000000 --- a/openwrt/package/wrt-radauth/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_WRT_RADAUTH - prompt "wrt-radauth....................... A Radius MAC authenticator for Broadcom based access points" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_NVRAM - help - This software watches the stations associating to a broadcom based - AccessPoint (e.g. Linksys WRT54G) and sends an authentication request - to the radius-server specified in nvram. - - http://www.zerfleddert.de/wrt54g/ - diff --git a/openwrt/package/wrt-radauth/Makefile b/openwrt/package/wrt-radauth/Makefile deleted file mode 100644 index cb11737c795..00000000000 --- a/openwrt/package/wrt-radauth/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wrt-radauth -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=f941e3139175dc6b87f6c89ba8848a07 - -PKG_SOURCE_URL:=http://www.zerfleddert.de/wrt54g/ -PKG_SOURCE:=$(PKG_NAME).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -BR2_PACKAGE_WRT_RADAUTH:=m - -$(eval $(call PKG_template,WRT_RADAUTH,wrt-radauth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - clean all - touch $@ - -$(IPKG_WRT_RADAUTH): - install -d -m0755 $(IDIR_WRT_RADAUTH)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/radius-client $(IDIR_WRT_RADAUTH)/usr/sbin/ - install -m0755 $(PKG_BUILD_DIR)/wrt-radauth $(IDIR_WRT_RADAUTH)/usr/sbin/ - $(RSTRIP) $(IDIR_WRT_RADAUTH) - $(IPKG_BUILD) $(IDIR_WRT_RADAUTH) $(PACKAGE_DIR) diff --git a/openwrt/package/wrt-radauth/ipkg/wrt-radauth.control b/openwrt/package/wrt-radauth/ipkg/wrt-radauth.control deleted file mode 100644 index 8f1bd64ff89..00000000000 --- a/openwrt/package/wrt-radauth/ipkg/wrt-radauth.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: wrt-radauth -Priority: optional -Section: net -Description: A RADIUS MAC authenticator for Broadcom based access points. diff --git a/openwrt/package/wx200d/Config.in b/openwrt/package/wx200d/Config.in deleted file mode 100644 index f9c5b6b66c5..00000000000 --- a/openwrt/package/wx200d/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_WX200D - prompt "wx200d............................ weather station data collector" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBPQ - help - wx200d is a weather station data collector and server daemon - for the WX200, WM918, WMR918 and WMR968 weather station - hardware. - - http://wx200d.sourceforge.net/ diff --git a/openwrt/package/wx200d/Makefile b/openwrt/package/wx200d/Makefile deleted file mode 100644 index 4673e83f281..00000000000 --- a/openwrt/package/wx200d/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wx200d -PKG_VERSION:=1.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=0f90c099dddcdd46ac568d707822ec4c - -PKG_SOURCE_URL:=@SF/wx200d -PKG_SOURCE:=wx200d-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,WX200D,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - --without-libiconv-prefix \ - --without-libintl-prefix \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_WX200D): - install -d -m0755 $(IDIR_WX200D)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/wx200 \ - $(PKG_INSTALL_DIR)/usr/bin/wxstdout \ - $(PKG_INSTALL_DIR)/usr/bin/wxfilter \ - $(PKG_INSTALL_DIR)/usr/bin/wxdebug $(IDIR_WX200D)/usr/bin/ - install -d -m0755 $(IDIR_WX200D)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/wx200d \ - $(PKG_INSTALL_DIR)/usr/sbin/wxread $(IDIR_WX200D)/usr/sbin/ - $(RSTRIP) $(IDIR_WX200D) - $(IPKG_BUILD) $(IDIR_WX200D) $(PACKAGE_DIR) diff --git a/openwrt/package/wx200d/ipkg/wx200d.control b/openwrt/package/wx200d/ipkg/wx200d.control deleted file mode 100644 index 717e50b58df..00000000000 --- a/openwrt/package/wx200d/ipkg/wx200d.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: wx200d -Priority: optional -Section: misc -Maintainer: Name -Source: http:// -Description:Utils for Oregon Scientific wx* and related weather stations -Depends: libpq diff --git a/openwrt/package/xinetd/Config.in b/openwrt/package/xinetd/Config.in deleted file mode 100644 index f833c5d7007..00000000000 --- a/openwrt/package/xinetd/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_XINETD - prompt "xinetd............................ Powerful and secure superserver" - tristate - default m if CONFIG_DEVEL - help - A powerful and secure superserver - - http://www.xinetd.org/ - diff --git a/openwrt/package/xinetd/Makefile b/openwrt/package/xinetd/Makefile deleted file mode 100644 index a3e5d59e6a0..00000000000 --- a/openwrt/package/xinetd/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=xinetd -PKG_VERSION:=2.3.13 -PKG_RELEASE:=2 -PKG_MD5SUM:=4295b5fe12350f09b5892b363348ac8b - -PKG_SOURCE_URL:=http://www.xinetd.org/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,XINETD,xinetd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --disable-static \ - --without-libwrap \ - --with-loadavg \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - build install - touch $@ - -$(IPKG_XINETD): - install -d -m0755 $(IDIR_XINETD)/etc - install -m0644 ./files/xinetd.conf $(IDIR_XINETD)/etc/xinetd.conf - install -d -m0755 $(IDIR_XINETD)/etc/xinetd.d - install -d -m0755 $(IDIR_XINETD)/etc/init.d - install -m0755 ./files/xinetd.init $(IDIR_XINETD)/etc/init.d/xinetd - install -d -m0755 $(IDIR_XINETD)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xinetd $(IDIR_XINETD)/usr/sbin/ - $(RSTRIP) $(IDIR_XINETD) - $(IPKG_BUILD) $(IDIR_XINETD) $(PACKAGE_DIR) diff --git a/openwrt/package/xinetd/files/xinetd.conf b/openwrt/package/xinetd/files/xinetd.conf deleted file mode 100644 index bd473ed3dbf..00000000000 --- a/openwrt/package/xinetd/files/xinetd.conf +++ /dev/null @@ -1,6 +0,0 @@ -defaults -{ - -} - -includedir /etc/xinetd.d diff --git a/openwrt/package/xinetd/files/xinetd.init b/openwrt/package/xinetd/files/xinetd.init deleted file mode 100644 index 2df7a8196c6..00000000000 --- a/openwrt/package/xinetd/files/xinetd.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -DEFAULT=/etc/default/xinetd -RUN_D=/var/run -PID_F=$RUN_D/xinetd.pid -[ -f $DEFAULT ] && . $DEFAULT - -case $1 in - start) - [ -d $RUN_D ] || mkdir -p $RUN_D - xinetd $OPTIONS - ;; - stop) - [ -f $PID_F ] && kill $(cat $PID_F) - ;; - *) - echo "usage: $0 (start|stop)" - exit 1 -esac - -exit $? diff --git a/openwrt/package/xinetd/ipkg/xinetd.conffiles b/openwrt/package/xinetd/ipkg/xinetd.conffiles deleted file mode 100644 index f49d840c4df..00000000000 --- a/openwrt/package/xinetd/ipkg/xinetd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/xinetd.conf diff --git a/openwrt/package/xinetd/ipkg/xinetd.control b/openwrt/package/xinetd/ipkg/xinetd.control deleted file mode 100644 index 34cefb59a9d..00000000000 --- a/openwrt/package/xinetd/ipkg/xinetd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: xinetd -Priority: optional -Section: net -Description: a powerful and secure superserver diff --git a/openwrt/package/xinetd/patches/ar.patch b/openwrt/package/xinetd/patches/ar.patch deleted file mode 100644 index f0d4f0dea50..00000000000 --- a/openwrt/package/xinetd/patches/ar.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -ruN xinetd-2.3.13-orig/libs/src/misc/Makefile.in xinetd-2.3.13-6/libs/src/misc/Makefile.in ---- xinetd-2.3.13-orig/libs/src/misc/Makefile.in 2003-02-19 18:29:27.000000000 +0100 -+++ xinetd-2.3.13-6/libs/src/misc/Makefile.in 2005-03-09 22:53:15.000000000 +0100 -@@ -62,7 +62,7 @@ - - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) -diff -ruN xinetd-2.3.13-orig/libs/src/portable/Makefile.in xinetd-2.3.13-6/libs/src/portable/Makefile.in ---- xinetd-2.3.13-orig/libs/src/portable/Makefile.in 2003-02-19 18:29:27.000000000 +0100 -+++ xinetd-2.3.13-6/libs/src/portable/Makefile.in 2005-03-09 22:53:15.000000000 +0100 -@@ -57,7 +57,7 @@ - - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) -diff -ruN xinetd-2.3.13-orig/libs/src/pset/Makefile.in xinetd-2.3.13-6/libs/src/pset/Makefile.in ---- xinetd-2.3.13-orig/libs/src/pset/Makefile.in 2003-02-19 18:29:27.000000000 +0100 -+++ xinetd-2.3.13-6/libs/src/pset/Makefile.in 2005-03-09 22:53:15.000000000 +0100 -@@ -53,7 +53,7 @@ - mv $(LIBNAME) $(LIBDIR)/optimized - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) -diff -ruN xinetd-2.3.13-orig/libs/src/sio/Makefile.in xinetd-2.3.13-6/libs/src/sio/Makefile.in ---- xinetd-2.3.13-orig/libs/src/sio/Makefile.in 2003-02-19 18:29:27.000000000 +0100 -+++ xinetd-2.3.13-6/libs/src/sio/Makefile.in 2005-03-09 22:53:15.000000000 +0100 -@@ -52,7 +52,7 @@ - $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) -diff -ruN xinetd-2.3.13-orig/libs/src/str/Makefile.in xinetd-2.3.13-6/libs/src/str/Makefile.in ---- xinetd-2.3.13-orig/libs/src/str/Makefile.in 2003-02-19 18:29:27.000000000 +0100 -+++ xinetd-2.3.13-6/libs/src/str/Makefile.in 2005-03-09 22:53:15.000000000 +0100 -@@ -63,7 +63,7 @@ - $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - LINT_IGNORE=possible pointer alignment|RCSid unused -diff -ruN xinetd-2.3.13-orig/libs/src/xlog/Makefile.in xinetd-2.3.13-6/libs/src/xlog/Makefile.in ---- xinetd-2.3.13-orig/libs/src/xlog/Makefile.in 2003-02-19 18:29:27.000000000 +0100 -+++ xinetd-2.3.13-6/libs/src/xlog/Makefile.in 2005-03-09 22:53:15.000000000 +0100 -@@ -58,7 +58,7 @@ - $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) diff --git a/openwrt/package/xinetd/patches/destdir.patch b/openwrt/package/xinetd/patches/destdir.patch deleted file mode 100644 index 91fd8166069..00000000000 --- a/openwrt/package/xinetd/patches/destdir.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ruN xinetd-2.3.13-orig/Makefile.in xinetd-2.3.13-6/Makefile.in ---- xinetd-2.3.13-orig/Makefile.in 2003-08-15 16:00:45.000000000 +0200 -+++ xinetd-2.3.13-6/Makefile.in 2005-03-09 22:53:15.000000000 +0100 -@@ -75,15 +75,15 @@ - - install: build - for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \ -- test -d $$i || mkdir -p $$i ; done -- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR) -- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) -- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 -+ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done -+ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR) -+ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR) -+ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR) -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8 -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8 -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8 - @echo "You must put your xinetd.conf in /etc/xinetd.conf" - @echo "There is a sample config file in xinetd/sample.conf and you can" - @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format" diff --git a/openwrt/package/xinetd/patches/xinetd-2.3.13-gcc4-1.patch b/openwrt/package/xinetd/patches/xinetd-2.3.13-gcc4-1.patch deleted file mode 100644 index 49ac327bc19..00000000000 --- a/openwrt/package/xinetd/patches/xinetd-2.3.13-gcc4-1.patch +++ /dev/null @@ -1,33 +0,0 @@ -Submitted By: Randy McMurchy -Date: 2005-08-07 -Initial Package Version: 2.3.13 -Upstream Status: Not submitted -Origin: Fedora Development CVS -Description: Fixes compilation error if using GCC-4.x - - -diff -Naur xinetd-2.3.13-orig/xinetd/service.c xinetd-2.3.13/xinetd/service.c ---- xinetd-2.3.13-orig/xinetd/service.c 2003-11-16 12:44:10.000000000 +0000 -+++ xinetd-2.3.13/xinetd/service.c 2005-08-07 18:37:33.395942648 +0000 -@@ -764,8 +764,8 @@ - return FAILED; - - if ( last == NULL ) { -- last = SAIN( SVC_LAST_DGRAM_ADDR(sp) ) = -- SAIN( calloc( 1, sizeof(union xsockaddr) ) ); -+ SVC_LAST_DGRAM_ADDR(sp) = calloc( 1, sizeof(union xsockaddr) ); -+ last = SAIN(SVC_LAST_DGRAM_ADDR(sp)); - } - - (void) time( ¤t_time ) ; -@@ -791,8 +791,8 @@ - return FAILED; - - if( last == NULL ) { -- last = SAIN6(SVC_LAST_DGRAM_ADDR(sp)) = -- SAIN6(calloc( 1, sizeof(union xsockaddr) ) ); -+ SVC_LAST_DGRAM_ADDR(sp) = calloc( 1, sizeof(union xsockaddr) ); -+ last = SAIN6( SVC_LAST_DGRAM_ADDR(sp) ); - } - - (void) time( ¤t_time ) ; diff --git a/openwrt/package/xsupplicant/Config.in b/openwrt/package/xsupplicant/Config.in deleted file mode 100644 index f9746d0b4d5..00000000000 --- a/openwrt/package/xsupplicant/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_XSUPPLICANT - prompt "xsupplicant....................... A fully compliant 802.1x authenticator" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_LIBOPENSSL - select BR2_PACKAGE_WIRELESS_TOOLS - help - This software allows a GNU/Linux or BSD workstation to authenticate with - a RADIUS server using 802.1x and various EAP protocols. - - http://open1x.sourceforge.net/ - diff --git a/openwrt/package/xsupplicant/Makefile b/openwrt/package/xsupplicant/Makefile deleted file mode 100644 index 2dcf371d077..00000000000 --- a/openwrt/package/xsupplicant/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=xsupplicant -PKG_VERSION:=1.2.3 -PKG_RELEASE:=1 -PKG_MD5SUM:=c9b17b2e1879bac85c583980338fed85 - -PKG_SOURCE_URL:=@SF/open1x -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,XSUPPLICANT,xsupplicant,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - touch configure.in; \ - touch aclocal.m4; \ - touch Makefile.in; \ - touch configure; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \ - -I$(PKG_BUILD_DIR)/lib/libxsupconfig/ \ - -I$(STAGING_DIR)/usr/include/madwifi" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-openssl="$(STAGING_DIR)/usr" \ - --with-madwifi-path="$(STAGING_DIR)/usr/include/madwifi" \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - all install - touch $@ - -$(IPKG_XSUPPLICANT): - install -d -m0755 $(IDIR_XSUPPLICANT)/etc - install -m0644 $(PKG_BUILD_DIR)/etc/xsupplicant.conf $(IDIR_XSUPPLICANT)/etc/ - install -d -m0755 $(IDIR_XSUPPLICANT)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/xsup_* $(IDIR_XSUPPLICANT)/usr/bin/ - install -d -m0755 $(IDIR_XSUPPLICANT)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xsupplicant $(IDIR_XSUPPLICANT)/usr/sbin/ - $(RSTRIP) $(IDIR_XSUPPLICANT) - $(IPKG_BUILD) $(IDIR_XSUPPLICANT) $(PACKAGE_DIR) diff --git a/openwrt/package/xsupplicant/ipkg/xsupplicant.conffiles b/openwrt/package/xsupplicant/ipkg/xsupplicant.conffiles deleted file mode 100644 index 8503d2bd496..00000000000 --- a/openwrt/package/xsupplicant/ipkg/xsupplicant.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/xsupplicant.conf diff --git a/openwrt/package/xsupplicant/ipkg/xsupplicant.control b/openwrt/package/xsupplicant/ipkg/xsupplicant.control deleted file mode 100644 index 36ae6afa9cb..00000000000 --- a/openwrt/package/xsupplicant/ipkg/xsupplicant.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: xsupplicant -Priority: optional -Section: net -Depends: libopenssl, wireless-tools -Description: A fully compliant 802.1x authenticator - diff --git a/openwrt/package/xsupplicant/patches/001-no-lfl.patch b/openwrt/package/xsupplicant/patches/001-no-lfl.patch deleted file mode 100644 index 9f0ed94456c..00000000000 --- a/openwrt/package/xsupplicant/patches/001-no-lfl.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ruN xsupplicant-1.2.2-old/configure xsupplicant-1.2.2-new/configure ---- xsupplicant-1.2.2-old/configure 2005-09-14 05:34:54.000000000 +0200 -+++ xsupplicant-1.2.2-new/configure 2005-10-20 06:24:23.000000000 +0200 -@@ -3316,7 +3316,7 @@ - fi - if test -n "$LEX"; then - LFLAGS="$LFLAGS -i" -- MORELIBS="${MORELIBS} -lfl" -+ - fi - - echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -diff -ruN xsupplicant-1.2.2-old/configure.in xsupplicant-1.2.2-new/configure.in ---- xsupplicant-1.2.2-old/configure.in 2005-09-14 05:34:54.000000000 +0200 -+++ xsupplicant-1.2.2-new/configure.in 2005-10-20 06:23:38.000000000 +0200 -@@ -17,7 +17,7 @@ - AM_PROG_LEX - if test -n "$LEX"; then - LFLAGS="$LFLAGS -i" -- MORELIBS="${MORELIBS} -lfl" -+ - fi - - AC_C_BIGENDIAN([big_endian=true;AC_DEFINE(BIGENDIAN)],[big_endian=false;AC_DEFINE(LILENDIAN)]) diff --git a/openwrt/package/xsupplicant/patches/002-cardif_madwifi_driver_h.patch b/openwrt/package/xsupplicant/patches/002-cardif_madwifi_driver_h.patch deleted file mode 100644 index 4333d346bef..00000000000 --- a/openwrt/package/xsupplicant/patches/002-cardif_madwifi_driver_h.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ruN xsupplicant-1.2.2-old/src/cardif/linux/cardif_madwifi_driver.h xsupplicant-1.2.2-new/src/cardif/linux/cardif_madwifi_driver.h ---- xsupplicant-1.2.2-old/src/cardif/linux/cardif_madwifi_driver.h 2005-04-06 04:21:53.000000000 +0200 -+++ xsupplicant-1.2.2-new/src/cardif/linux/cardif_madwifi_driver.h 2005-10-17 22:03:19.000000000 +0200 -@@ -21,6 +21,7 @@ - int cardif_madwifi_driver_set_key(char *, int, unsigned char *, int, int, - char *, int, char *, int); - int cardif_madwifi_driver_wpa_state(struct interface_data *, char); -+void cardif_madwifi_driver_associate(struct interface_data *, char *); - int cardif_madwifi_driver_disassociate(struct interface_data *, int); - - #endif // _CARDIF_MADWIFI_DRIVER_H_ diff --git a/openwrt/package/xsupplicant/patches/004-madwifi-ng.patch b/openwrt/package/xsupplicant/patches/004-madwifi-ng.patch deleted file mode 100644 index 7c009bc7ce6..00000000000 --- a/openwrt/package/xsupplicant/patches/004-madwifi-ng.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ruN xsupplicant-1.2.2-old/src/cardif/linux/cardif_madwifi_driver.c xsupplicant-1.2.2-new/src/cardif/linux/cardif_madwifi_driver.c ---- xsupplicant-1.2.2-old/src/cardif/linux/cardif_madwifi_driver.c 2005-10-13 20:57:28.000000000 +0200 -+++ xsupplicant-1.2.2-new/src/cardif/linux/cardif_madwifi_driver.c 2005-10-23 19:28:46.000000000 +0200 -@@ -140,19 +140,19 @@ - "ioctl[IEEE80211_IOCTL_SETKEY]", - "ioctl[IEEE80211_IOCTL_GETKEY]", - "ioctl[IEEE80211_IOCTL_DELKEY]", -- NULL, -+ "ioctl[IEEE80211_IOCTL_SETWMMPARAMS]", - "ioctl[IEEE80211_IOCTL_SETMLME]", -- NULL, -+ "ioctl[IEEE80211_IOCTL_GETCHANINFO]", - "ioctl[IEEE80211_IOCTL_SETOPTIE]", - "ioctl[IEEE80211_IOCTL_GETOPTIE]", - "ioctl[IEEE80211_IOCTL_ADDMAC]", - NULL, - "ioctl[IEEE80211_IOCTL_DELMAC]", -- NULL, -- "ioctl[IEEE80211_IOCTL_CHANLIST]", -+ "ioctl[IEEE80211_IOCTL_GETCHANLIST]", -+ "ioctl[IEEE80211_IOCTL_SETCHANLIST]", - }; - if (IEEE80211_IOCTL_SETPARAM <= op && -- op <= IEEE80211_IOCTL_CHANLIST) -+ op <= IEEE80211_IOCTL_SETCHANLIST) - debug_printf(DEBUG_NORMAL, "%s\n", opnames[op - SIOCIWFIRSTPRIV]); - else - debug_printf(DEBUG_NORMAL, "ioctl[unknown???]"); diff --git a/openwrt/package/xsupplicant/patches/005-disable-procfs-check.patch b/openwrt/package/xsupplicant/patches/005-disable-procfs-check.patch deleted file mode 100644 index b9dab9caa1b..00000000000 --- a/openwrt/package/xsupplicant/patches/005-disable-procfs-check.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Nur xsupplicant-1.2.2/configure xsupplicant-1.2.2.patched/configure ---- xsupplicant-1.2.2/configure 2005-09-14 05:34:54.000000000 +0200 -+++ xsupplicant-1.2.2.patched/configure 2005-12-23 23:51:47.031541500 +0100 -@@ -4809,19 +4809,6 @@ - FRAMER="generic" - fi - --if test $FRAMER = "linux"; then -- echo "$as_me:$LINENO: checking for procfs support" >&5 --echo $ECHO_N "checking for procfs support... $ECHO_C" >&6 -- if test -r /proc/net/dev; then -- echo "$as_me:$LINENO: result: okay" >&5 --echo "${ECHO_T}okay" >&6 -- else -- { { echo "$as_me:$LINENO: error: You must have ProcFS enabled in your kernel!" >&5 --echo "$as_me: error: You must have ProcFS enabled in your kernel!" >&2;} -- { (exit 1); exit 1; }; }; -- fi --fi -- - if test "$MADWIFI_PATH" != ""; then - echo "$as_me:$LINENO: result: Adding MADWIFI WPA support." >&5 - echo "${ECHO_T}Adding MADWIFI WPA support." >&6 From f3ad97146306d78834489e1cb7975aabccffde06 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 13 Apr 2006 22:20:48 +0000 Subject: [PATCH 002/757] remove more packages SVN-Revision: 3642 --- openwrt/package/vnstat/Config.in | 11 ------ openwrt/package/vnstat/Makefile | 33 ---------------- openwrt/package/vnstat/ipkg/vnstat.control | 4 -- openwrt/package/vpnc/Config.in | 9 ----- openwrt/package/vpnc/Makefile | 40 ------------------- openwrt/package/vpnc/ipkg/vpnc.conffiles | 2 - openwrt/package/vpnc/ipkg/vpnc.control | 6 --- openwrt/package/vpnc/patches/01-cross.patch | 44 --------------------- 8 files changed, 149 deletions(-) delete mode 100644 openwrt/package/vnstat/Config.in delete mode 100644 openwrt/package/vnstat/Makefile delete mode 100644 openwrt/package/vnstat/ipkg/vnstat.control delete mode 100755 openwrt/package/vpnc/Config.in delete mode 100644 openwrt/package/vpnc/Makefile delete mode 100644 openwrt/package/vpnc/ipkg/vpnc.conffiles delete mode 100755 openwrt/package/vpnc/ipkg/vpnc.control delete mode 100644 openwrt/package/vpnc/patches/01-cross.patch diff --git a/openwrt/package/vnstat/Config.in b/openwrt/package/vnstat/Config.in deleted file mode 100644 index ab6a8dee352..00000000000 --- a/openwrt/package/vnstat/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_VNSTAT - prompt "vnstat............................ Console-based network traffic monitor" - tristate - default m if CONFIG_DEVEL - help - vnStat is a network traffic monitor for Linux that keeps a log of daily - network traffic for the selected interface(s). vnStat isn't a packet - sniffer. The traffic information is analyzed from the /proc -filesystem, - so vnStat can be used without root permissions. - . - http://humdi.net/vnstat/ diff --git a/openwrt/package/vnstat/Makefile b/openwrt/package/vnstat/Makefile deleted file mode 100644 index 009388e208e..00000000000 --- a/openwrt/package/vnstat/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vnstat -PKG_VERSION:=1.4 -PKG_RELEASE:=1 -PKG_MD5SUM:=9184f79b5e60499bc059f670032291e5 - -PKG_SOURCE_URL:=http://humdi.net/vnstat -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VNSTAT,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) - touch $@ - -$(IPKG_VNSTAT): - install -d -m0755 $(IDIR_VNSTAT)/usr/bin - $(CP) $(PKG_BUILD_DIR)/src/vnstat $(IDIR_VNSTAT)/usr/bin/ - $(STRIP) $(IDIR_VNSTAT)/usr/bin/* - $(IPKG_BUILD) $(IDIR_VNSTAT) $(PACKAGE_DIR) diff --git a/openwrt/package/vnstat/ipkg/vnstat.control b/openwrt/package/vnstat/ipkg/vnstat.control deleted file mode 100644 index 9d7ba790723..00000000000 --- a/openwrt/package/vnstat/ipkg/vnstat.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: vnstat -Priority: optional -Section: net -Description: Console-based network traffic monitor diff --git a/openwrt/package/vpnc/Config.in b/openwrt/package/vpnc/Config.in deleted file mode 100755 index 6e360a1b909..00000000000 --- a/openwrt/package/vpnc/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_VPNC - prompt "vpnc.............................. VPN client for Cisco 3000" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_TUN - select BR2_PACKAGE_LIBGPG_ERROR - select BR2_PACKAGE_LIBGCRYPT - help - Client for cisco3000 VPN Concentrator. diff --git a/openwrt/package/vpnc/Makefile b/openwrt/package/vpnc/Makefile deleted file mode 100644 index eb21240c07e..00000000000 --- a/openwrt/package/vpnc/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vpnc -PKG_VERSION:=0.3.3 -PKG_RELEASE:=1 - -PKG_MD5SUM:=e7518cff21326fe7eb9795b60c25ae6a -PKG_SOURCE_URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/ - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,VPNC,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - OFLAGS="$(TARGET_CFLAGS)" \ - OS="Linux" \ - STAGING_DIR=$(STAGING_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - PREFIX=/usr \ - all install - touch $@ - -$(IPKG_VPNC): - install -d -m0755 $(IDIR_VPNC) - $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_VPNC)/ - $(RSTRIP) $(IDIR_VPNC) - $(IPKG_BUILD) $(IDIR_VPNC) $(PACKAGE_DIR) diff --git a/openwrt/package/vpnc/ipkg/vpnc.conffiles b/openwrt/package/vpnc/ipkg/vpnc.conffiles deleted file mode 100644 index 8185af9cbb3..00000000000 --- a/openwrt/package/vpnc/ipkg/vpnc.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/vpnc/vpnc.conf -/etc/vpnc/vpnc-script diff --git a/openwrt/package/vpnc/ipkg/vpnc.control b/openwrt/package/vpnc/ipkg/vpnc.control deleted file mode 100755 index 5087af9b297..00000000000 --- a/openwrt/package/vpnc/ipkg/vpnc.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: vpnc -Section: net -Architecture: mipsel -Priority: optional -Description: client for cisco3000 VPN Concentrator. -Depends: libgpg-error libgcrypt kmod-tun diff --git a/openwrt/package/vpnc/patches/01-cross.patch b/openwrt/package/vpnc/patches/01-cross.patch deleted file mode 100644 index ff96a836525..00000000000 --- a/openwrt/package/vpnc/patches/01-cross.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -Nur vpnc-0.3.3/Makefile vpnc-0.3.3.patched/Makefile ---- vpnc-0.3.3/Makefile 2005-05-01 22:30:35.000000000 +0200 -+++ vpnc-0.3.3.patched/Makefile 2005-12-23 23:43:55.222055250 +0100 -@@ -17,31 +17,32 @@ - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - DESTDIR= --PREFIX=/usr/local -+PREFIX=/usr - ETCDIR=/etc/vpnc - SBINDIR=$(PREFIX)/sbin - MANDIR=$(PREFIX)/share/man - - CC=gcc --CFLAGS=-W -Wall -O -g '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags) --LDFLAGS=-g $(shell libgcrypt-config --libs) -+CFLAGS=-W -Wall -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include $(OFLAGS) '-DVERSION="$(shell cat VERSION)"' -+LDFLAGS=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lgcrypt -lgpg-error - --ifeq ($(shell uname -s), Linux) -+OS=$(shell uname -s) -+ifeq ($(OS), Linux) - SYSDEP=sysdep-linux.o - endif --ifeq ($(shell uname -s), FreeBSD) -+ifeq ($(OS), FreeBSD) - CFLAGS += -DSOCKADDR_IN_SIN_LEN -DHAVE_SA_LEN - SYSDEP=sysdep-bsd.o - endif --ifeq ($(shell uname -s), NetBSD) -+ifeq ($(OS), NetBSD) - CFLAGS += -DSOCKADDR_IN_SIN_LEN -DHAVE_SA_LEN - SYSDEP=sysdep-bsd.o - endif --ifeq ($(shell uname -s), OpenBSD) -+ifeq ($(OS), OpenBSD) - CFLAGS += -DSOCKADDR_IN_SIN_LEN -DHAVE_SA_LEN -DNEED_IPLEN_FIX -DNEW_TUN - SYSDEP=sysdep-bsd.o - endif --ifeq ($(shell uname -s), SunOS) -+ifeq ($(OS), SunOS) - CFLAGS += -DNEED_IPLEN_FIX - LDFLAGS += -lnsl -lresolv -lsocket - SYSDEP=sysdep-svr4.o From bea2a5bd9de89a02daaa878233de0cdb7c415e61 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Apr 2006 01:22:55 +0000 Subject: [PATCH 003/757] remove some more stuff, change package makefile format in rules.mk, port busybox over to the new format SVN-Revision: 3643 --- openwrt/package/Config.in | 320 ------------------ openwrt/package/Makefile | 292 ---------------- openwrt/package/busybox/Makefile | 18 +- openwrt/package/busybox/ipkg/busybox.control | 4 - openwrt/package/depend.mk | 277 --------------- openwrt/package/gdbserver/Config.in | 8 - openwrt/package/gdbserver/Makefile | 62 ---- .../package/gdbserver/ipkg/gdbserver.control | 4 - openwrt/package/iptables-snmp/Config.in | 11 - openwrt/package/iptables-snmp/Makefile | 65 ---- .../iptables-snmp/ipkg/iptables-snmp.control | 5 - openwrt/package/rules.mk | 53 ++- 12 files changed, 56 insertions(+), 1063 deletions(-) delete mode 100644 openwrt/package/busybox/ipkg/busybox.control delete mode 100644 openwrt/package/depend.mk delete mode 100644 openwrt/package/gdbserver/Config.in delete mode 100644 openwrt/package/gdbserver/Makefile delete mode 100644 openwrt/package/gdbserver/ipkg/gdbserver.control delete mode 100644 openwrt/package/iptables-snmp/Config.in delete mode 100644 openwrt/package/iptables-snmp/Makefile delete mode 100644 openwrt/package/iptables-snmp/ipkg/iptables-snmp.control diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in index 3a123aa8f96..17e15275f94 100644 --- a/openwrt/package/Config.in +++ b/openwrt/package/Config.in @@ -14,325 +14,5 @@ source "package/mtd/Config.in" source "package/nvram/Config.in" endmenu -menu "Applications" -source "package/autossh/Config.in" -source "package/bitchx/Config.in" -source "package/collectd/Config.in" -source "package/cbtt/Config.in" -source "package/ctorrent/Config.in" -source "package/deco/Config.in" -source "package/elinks/Config.in" -source "package/fetchmail/Config.in" -source "package/gpsd/Config.in" -source "package/gpg/Config.in" -source "package/haserl/Config.in" -source "package/irssi/Config.in" -source "package/jamvm/Config.in" -source "package/lcd4linux/Config.in" -source "package/less/Config.in" -source "package/lua/Config.in" -source "package/microperl/Config.in" -source "package/monit/Config.in" -source "package/motion/Config.in" -source "package/mgetty/Config.in" -source "package/mutt/Config.in" -source "package/nano/Config.in" -source "package/osiris/Config.in" -source "package/php4/Config.in" -source "package/php5/Config.in" -source "package/procmail/Config.in" -source "package/psybnc/Config.in" -menu "sablevm........................... A Java Virtual Machine (JVM) implementation" -source "package/sablevm/Config.in" -source "package/sablevm-classpath/Config.in" -source "package/libffi-sable/Config.in" -endmenu -source "package/sane-backends/Config.in" -source "package/screen/Config.in" -source "package/ser2net/Config.in" -source "package/syslog-ng/Config.in" -menu "rrdtool........................... Round-Robin Database (RRD) libraries and tools" -source "package/rrdtool/Config.in" -source "package/rrdtool1/Config.in" -source "package/rrdcollect/Config.in" -endmenu -source "package/vim/Config.in" -endmenu - -menu "Networking" -source "package/aircrack/Config.in" -source "package/amwall/Config.in" -source "package/arpd/Config.in" -source "package/arptables/Config.in" -source "package/arpwatch/Config.in" -source "package/asterisk/Config.in" -source "package/atftp/Config.in" -source "package/avahi/Config.in" -source "package/bind/Config.in" -source "package/bitlbee/Config.in" -source "package/bwm/Config.in" -source "package/chillispot/Config.in" -source "package/cifsmount/Config.in" -source "package/click/Config.in" -source "package/cups/Config.in" -source "package/cutter/Config.in" -source "package/dhcp/Config.in" -source "package/dhcp-forwarder/Config.in" -source "package/dropbear/Config.in" -source "package/dsniff/Config.in" -source "package/ebtables/Config.in" -source "package/elhttp/Config.in" -source "package/ether-wake/Config.in" -source "package/ethtool/Config.in" -source "package/ez-ipupdate/Config.in" -source "package/fakeidentd/Config.in" -source "package/fping/Config.in" -source "package/fprobe/Config.in" -source "package/fprobe-ulog/Config.in" -source "package/freeradius/Config.in" -source "package/frickin/Config.in" -source "package/howl/Config.in" -source "package/hostap-utils/Config.in" -source "package/hostapd/Config.in" -source "package/htpdate/Config.in" -source "package/httping/Config.in" -source "package/iftop/Config.in" -source "package/igmpproxy/Config.in" -source "package/ipcad/Config.in" -source "package/iproute2/Config.in" -source "package/iperf/Config.in" -source "package/ipsec-tools/Config.in" -source "package/ipset/Config.in" -source "package/iptables-snmp/Config.in" -source "package/iptraf/Config.in" -source "package/kismet/Config.in" -source "package/knock/Config.in" -source "package/l2tpd/Config.in" -source "package/l2tpns/Config.in" -source "package/lighttpd/Config.in" -source "package/linux-atm/Config.in" -source "package/macchanger/Config.in" -source "package/maradns/Config.in" -source "package/miau/Config.in" -source "package/mini_httpd/Config.in" -source "package/mini_sendmail/Config.in" -source "package/mtr/Config.in" -source "package/net-snmp/Config.in" -source "package/netperf/Config.in" -source "package/netstat-nat/Config.in" -source "package/nfs-server/Config.in" -source "package/nmap/Config.in" -source "package/nocatsplash/Config.in" -source "package/ntpclient/Config.in" -source "package/olsrd/Config.in" -source "package/openntpd/Config.in" -source "package/openser/Config.in" -source "package/openssh/Config.in" -source "package/openswan/Config.in" -source "package/openvpn/Config.in" -source "package/p910nd/Config.in" -source "package/parprouted/Config.in" -source "package/pipacs/Config.in" -source "package/pmacct/Config.in" -source "package/portmap/Config.in" -source "package/portsentry/Config.in" -source "package/ppp/Config.in" -source "package/pptp/Config.in" -source "package/pptpd/Config.in" -source "package/privoxy/Config.in" -source "package/ptunnel/Config.in" -source "package/quagga/Config.in" -source "package/raddump/Config.in" -source "package/rarpd/Config.in" -source "package/reaim/Config.in" -source "package/robocfg/Config.in" -source "package/rp-pppoe/Config.in" -source "package/rrs/Config.in" -source "package/rsync/Config.in" -source "package/samba/Config.in" -source "package/scanlogd/Config.in" -source "package/scdp/Config.in" -source "package/shat/Config.in" -source "package/sipp/Config.in" -source "package/siproxd/Config.in" -source "package/sipsak/Config.in" -source "package/slurm/Config.in" -source "package/snort/Config.in" -source "package/snort-wireless/Config.in" -source "package/socat/Config.in" -source "package/ssltunnel/Config.in" -source "package/ssmtp/Config.in" -source "package/srelay/Config.in" -source "package/tmsnc/Config.in" -source "package/tcpdump/Config.in" -source "package/tinc/Config.in" -source "package/tinyproxy/Config.in" -source "package/tor/Config.in" -source "package/ttcp/Config.in" -source "package/udp-broadcast-relay/Config.in" -source "package/ulogd/Config.in" -source "package/updatedd/Config.in" -source "package/vgp/Config.in" -source "package/vncrepeater/Config.in" -source "package/vnc-reflector/Config.in" -source "package/vnstat/Config.in" -source "package/vpnc/Config.in" -source "package/vrrpd/Config.in" -source "package/vsftpd/Config.in" -source "package/vtun/Config.in" -source "package/wccpd/Config.in" -source "package/weechat/Config.in" -source "package/wificonf/Config.in" -source "package/wifidog/Config.in" -source "package/wireless-tools/Config.in" -source "package/wiviz/Config.in" -source "package/wknock/Config.in" -source "package/wol/Config.in" -source "package/wondershaper/Config.in" -source "package/wpa_supplicant/Config.in" -source "package/wput/Config.in" -source "package/wrt-radauth/Config.in" -source "package/wx200d/Config.in" -source "package/xinetd/Config.in" -source "package/xsupplicant/Config.in" -endmenu - -menu "IPv6" -source "package/6tunnel/Config.in" -source "package/aiccu/Config.in" -source "package/dhcp6/Config.in" -source "package/miredo/Config.in" -source "package/mrd6/Config.in" -source "package/ndisc/Config.in" -source "package/radvd/Config.in" -endmenu - -menu "Libraries" -source "package/cgilib/Config.in" -source "package/glib/Config.in" -source "package/id3lib/Config.in" -source "package/libamsel/Config.in" -source "package/libao/Config.in" -source "package/libart/Config.in" -source "package/libcli/Config.in" -source "package/clinkc/Config.in" -source "package/curl/Config.in" # libcurl -source "package/libdaemon/Config.in" -source "package/libdb/Config.in" -source "package/libdnet/Config.in" -source "package/libelf/Config.in" -source "package/libevent/Config.in" -source "package/expat/Config.in" # libexpat -source "package/flac/Config.in" # libflac -source "package/freetype/Config.in" # libfreetype -source "package/base-files/Config.in" # libgcc -source "package/libgcrypt/Config.in" -source "package/libgd/Config.in" -source "package/libgdbm/Config.in" -source "package/gmp/Config.in" # libgmp -source "package/gnutls/Config.in" ## libgnutls -source "package/libgpg-error/Config.in" -source "package/gsm/Config.in" # libgsm -source "package/libiconv/Config.in" -source "package/libid3tag/Config.in" -source "package/jpeg/Config.in" # libjpeg -source "package/libtool/Config.in" # libltdl -source "package/liblzo/Config.in" -source "package/libmad/Config.in" -source "package/matrixssl/Config.in" # libmatrixssl -source "package/mysql/Config.in" # limysqlclient -source "package/ncurses/Config.in" # libncurses -source "package/libnet/Config.in" -source "package/libnids/Config.in" -source "package/libogg/Config.in" -source "package/libol/Config.in" -source "package/opencdk/Config.in" # libopencdk -source "package/openh323/Config.in" -source "package/openldap/Config.in" # libopenldap -source "package/openssl/Config.in" # libopenssl -source "package/libosip2/Config.in" -source "package/libpcap/Config.in" -source "package/pcre/Config.in" # libpcre -source "package/pwlib/Config.in" -source "package/libpng/Config.in" -source "package/popt/Config.in" # libpopt -source "package/postgresql/Config.in" # libpq -source "package/libpthread/Config.in" -source "package/radiusclient-ng/Config.in" #libradiusclient-ng -source "package/readline/Config.in" # libreadline -source "package/cyrus-sasl/Config.in" # libsasl2 -source "package/speex/Config.in" # libspeex -source "package/sqlite/Config.in" # libsqlite -source "package/sqlite2/Config.in" # libsqlite2 -source "package/libtasn1/Config.in" -source "package/libupnp/Config.in" -source "package/libusb/Config.in" -source "package/libvorbis/Config.in" -source "package/libvorbisidec/Config.in" -source "package/libxml2/Config.in" -source "package/libxslt/Config.in" -source "package/uclibc++/Config.in" -source "package/ustl/Config.in" -source "package/zlib/Config.in" -endmenu - -menu "Multimedia" -source "package/gmediaserver/Config.in" -source "package/icecast/Config.in" -source "package/madplay/Config.in" -source "package/mpd/Config.in" -source "package/mt-daapd/Config.in" -source "package/palantir/Config.in" -source "package/peercast/Config.in" -source "package/setpwc/Config.in" -endmenu - -menu "Serial communications & terminal emulation" -source "package/heyu/Config.in" -source "package/lrzsz/Config.in" -source "package/microcom/Config.in" -source "package/picocom/Config.in" -source "package/serdisplib/Config.in" -source "package/setserial/Config.in" -endmenu - -menu "Utilities" -source "package/bc/Config.in" -source "package/gdbserver/Config.in" -source "package/hdparm/Config.in" -source "package/pcmcia-cs/Config.in" # pcmcia-utils -source "package/usbutils/Config.in" # lsusb -source "package/pciutils/Config.in" -source "package/strace/Config.in" -source "package/udev/Config.in" -source "package/watchdog/Config.in" -endmenu - -menu "FileSystems related" -source "package/dosfstools/Config.in" -source "package/e2fsprogs/Config.in" -source "package/fuse/Config.in" -source "package/shfs/Config.in" -source "package/util-linux/Config.in" -endmenu - -menu "Bluetooth" -source "package/bluez-libs/Config.in" -source "package/bluez-utils/Config.in" -source "package/miax/Config.in" -endmenu - -comment "Extra stuff" -source "package/sdk/Config.in" - -config BR2_PACKAGE_IMAGEBUILDER - bool "OpenWrt Image Builder" - default y if CONFIG_DEVEL - help - Build an OpenWrt Image Builder. - This package contains the necessary (precompiled) tools and all packages to generate - firmware images from package lists, without having to use the full buildroot. - Useful for building images with custom scripts or extra packages. - endmenu diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 4d0f0046f50..d213200156f 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -1,295 +1,5 @@ # Main makefile for the packages include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/depend.mk - -package-$(BR2_PACKAGE_6TUNNEL) += 6tunnel -package-$(BR2_PACKAGE_AICCU) += aiccu -package-$(BR2_PACKAGE_AIRCRACK) += aircrack -package-$(BR2_PACKAGE_AMWALL) += amwall -package-$(BR2_PACKAGE_ARPD) += arpd -package-$(BR2_PACKAGE_ARPTABLES) += arptables -package-$(BR2_PACKAGE_ARPWATCH) += arpwatch -package-$(BR2_PACKAGE_ASTERISK) += asterisk -package-$(BR2_COMPILE_ATFTP) += atftp -package-$(BR2_PACKAGE_AUTOSSH) += autossh -package-$(BR2_COMPILE_AVAHI) += avahi -package-$(BR2_COMPILE_BC) += bc -package-$(BR2_COMPILE_BIND) += bind -package-$(BR2_PACKAGE_BITCHX) += bitchx -package-$(BR2_PACKAGE_BITLBEE) += bitlbee -package-$(BR2_PACKAGE_BLUEZ_LIBS) += bluez-libs -package-$(BR2_PACKAGE_BLUEZ_UTILS) += bluez-utils -package-$(BR2_PACKAGE_BRIDGE) += bridge -package-$(BR2_PACKAGE_BUSYBOX) += busybox -package-$(BR2_PACKAGE_BWM) += bwm -package-$(BR2_PACKAGE_CBTT) += cbtt -package-$(BR2_PACKAGE_CGILIB) += cgilib -package-$(BR2_PACKAGE_CHILLISPOT) += chillispot -package-$(BR2_PACKAGE_CIFSMOUNT) += cifsmount -package-$(BR2_PACKAGE_CLICK) += click -package-$(BR2_PACKAGE_CLINKC) += clinkc -package-$(BR2_PACKAGE_COLLECTD) += collectd -package-$(BR2_PACKAGE_CTORRENT) += ctorrent -package-$(BR2_PACKAGE_CUPS) += cups -package-$(BR2_COMPILE_CURL) += curl -package-$(BR2_PACKAGE_CUTTER) += cutter -package-$(BR2_COMPILE_CYRUS_SASL) += cyrus-sasl -package-$(BR2_COMPILE_DB) += libdb -package-$(BR2_PACKAGE_DECO) += deco -package-$(BR2_COMPILE_DHCP) += dhcp -package-$(BR2_PACKAGE_DHCP6) += dhcp6 -package-$(BR2_PACKAGE_DHCP_FORWARDER) += dhcp-forwarder -package-$(BR2_PACKAGE_DNSMASQ) += dnsmasq -package-$(BR2_PACKAGE_DOSFSTOOLS) += dosfstools -package-$(BR2_PACKAGE_DROPBEAR) += dropbear -package-$(BR2_PACKAGE_DSNIFF) += dsniff -package-$(BR2_PACKAGE_E2FSPROGS) += e2fsprogs -package-$(BR2_PACKAGE_EBTABLES) += ebtables -package-$(BR2_PACKAGE_ELINKS) += elinks -package-$(BR2_PACKAGE_ETHER_WAKE) += ether-wake -package-$(BR2_COMPILE_EXPAT) += expat -package-$(BR2_PACKAGE_EZIPUPDATE) += ez-ipupdate -package-$(BR2_PACKAGE_FAKEIDENTD) += fakeidentd -package-$(BR2_PACKAGE_FETCHMAIL) += fetchmail -package-$(BR2_COMPILE_FLAC) += flac -package-$(BR2_PACKAGE_FPING) += fping -package-$(BR2_PACKAGE_FPROBE) += fprobe -package-$(BR2_PACKAGE_FPROBE_ULOG) += fprobe-ulog -package-$(BR2_PACKAGE_FREERADIUS) += freeradius -package-$(BR2_COMPILE_FREETYPE) += freetype -package-$(BR2_PACKAGE_FRICKIN) += frickin -package-$(BR2_COMPILE_FUSE) += fuse -package-$(BR2_PACKAGE_GDBSERVER) += gdbserver -package-$(BR2_COMPILE_GLIB) += glib -package-$(BR2_PACKAGE_GMEDIASERVER) += gmediaserver -package-$(BR2_COMPILE_GMP) += gmp -package-$(BR2_COMPILE_GNUTLS) += gnutls -package-$(BR2_PACKAGE_GPSD) += gpsd -package-$(BR2_PACKAGE_GPG) += gpg -package-$(BR2_COMPILE_GSM) += gsm -package-$(BR2_PACKAGE_HASERL) += haserl -package-$(BR2_PACKAGE_HDPARM) += hdparm -package-$(BR2_PACKAGE_HEYU) += heyu -package-$(BR2_PACKAGE_HOSTAP_UTILS) += hostap-utils -package-$(BR2_COMPILE_HOSTAPD) += hostapd -package-$(BR2_COMPILE_HOWL) += howl -package-$(BR2_PACKAGE_HTPDATE) += htpdate -package-$(BR2_PACKAGE_HTTPING) += httping -package-$(BR2_PACKAGE_ICECAST) += icecast -package-$(BR2_PACKAGE_ID3LIB) += id3lib -package-$(BR2_PACKAGE_IFTOP) += iftop -package-$(BR2_PACKAGE_IGMPPROXY) += igmpproxy -package-$(BR2_PACKAGE_IPCAD) += ipcad -package-$(BR2_PACKAGE_IPERF) += iperf -package-$(BR2_PACKAGE_IPKG) += ipkg -package-$(BR2_COMPILE_IPROUTE2) += iproute2 -package-$(BR2_PACKAGE_IPSEC_TOOLS) += ipsec-tools -package-$(BR2_PACKAGE_IPSET) += ipset -package-$(BR2_COMPILE_IPTABLES) += iptables -package-$(BR2_PACKAGE_IPTABLES_SNMP) += iptables-snmp -package-$(BR2_PACKAGE_IPTRAF) += iptraf -package-$(BR2_PACKAGE_IRSSI) += irssi -package-$(BR2_PACKAGE_JAMVM) += jamvm -package-$(BR2_COMPILE_JPEG) += jpeg -package-$(BR2_COMPILE_KISMET) += kismet -package-$(BR2_COMPILE_KNOCK) += knock -package-$(BR2_PACKAGE_L2TPD) += l2tpd -package-$(BR2_PACKAGE_L2TPNS) += l2tpns -package-$(BR2_PACKAGE_LCD4LINUX) += lcd4linux -package-$(BR2_PACKAGE_LESS) += less -package-$(BR2_PACKAGE_LIBAMSEL) += libamsel -package-$(BR2_PACKAGE_LIBAO) += libao -package-$(BR2_PACKAGE_LIBART) += libart -package-$(BR2_PACKAGE_LIBCLI) += libcli -package-$(BR2_PACKAGE_LIBDAEMON) += libdaemon -package-$(BR2_PACKAGE_LIBDNET) += libdnet -package-$(BR2_PACKAGE_LIBELF) += libelf -package-$(BR2_PACKAGE_LIBEVENT) += libevent -package-$(BR2_PACKAGE_LIBFFI_SABLE) += libffi-sable -package-$(BR2_PACKAGE_LIBGCRYPT) += libgcrypt -package-$(BR2_PACKAGE_LIBGD) += libgd -package-$(BR2_PACKAGE_LIBGDBM) += libgdbm -package-$(BR2_PACKAGE_LIBGPG_ERROR) += libgpg-error -package-$(BR2_PACKAGE_LIBICONV) += libiconv -package-$(BR2_PACKAGE_LIBID3TAG) += libid3tag -package-$(BR2_PACKAGE_LIBLZO) += liblzo -package-$(BR2_PACKAGE_LIBMAD) += libmad -package-$(BR2_PACKAGE_LIBNET) += libnet -package-$(BR2_PACKAGE_LIBNIDS) += libnids -package-$(BR2_PACKAGE_LIBOGG) += libogg -package-$(BR2_PACAKGE_LIBOL) += libol -package-$(BR2_PACKAGE_LIBOSIP2) += libosip2 -package-$(BR2_PACKAGE_LIBPCAP) += libpcap -package-$(BR2_PACKAGE_LIBPNG) += libpng -package-$(BR2_PACKAGE_LIBPTHREAD) += libpthread -package-$(BR2_PACKAGE_LIBTASN1) += libtasn1 -package-$(BR2_COMPILE_LIBTOOL) += libtool -package-$(BR2_PACKAGE_LIBUPNP) += libupnp -package-$(BR2_PACKAGE_LIBUSB) += libusb -package-$(BR2_PACKAGE_LIBVORBIS) += libvorbis -package-$(BR2_PACKAGE_LIBVORBISIDEC) += libvorbisidec -package-$(BR2_PACKAGE_LIBWRAP) += tcp_wrappers -package-$(BR2_PACKAGE_LIBXML2) += libxml2 -package-$(BR2_PACKAGE_LIBXSLT) += libxslt -package-$(BR2_PACKAGE_LIGHTTPD) += lighttpd -package-$(BR2_PACKAGE_LINUX_ATM) += linux-atm -package-$(BR2_PACKAGE_LOGROTATE) += logrotate -package-$(BR2_PACKAGE_LRZSZ) += lrzsz -package-$(BR2_COMPILE_LUA) += lua -package-$(BR2_PACKAGE_MACCHANGER) += macchanger -package-$(BR2_PACKAGE_MADPLAY) += madplay -package-$(BR2_PACKAGE_MARADNS) += maradns -package-$(BR2_COMPILE_MATRIXSSL) += matrixssl -package-$(BR2_PACKAGE_MGETTY) += mgetty -package-$(BR2_PACKAGE_MIAU) += miau -package-$(BR2_PACKAGE_MIAX) += miax -package-$(BR2_PACKAGE_MICROCOM) += microcom -package-$(BR2_PACKAGE_MICROPERL) += microperl -package-$(BR2_COMPILE_MINI_HTTPD) += mini_httpd -package-$(BR2_PACKAGE_MINI_SENDMAIL) += mini_sendmail -package-$(BR2_COMPILE_MIREDO) += miredo -package-$(BR2_COMPILE_MONIT) += monit -package-$(BR2_PACKAGE_MOTION) += motion -package-$(BR2_PACKAGE_MPD) += mpd -package-$(BR2_PACKAGE_MRD6) += mrd6 -package-$(BR2_PACKAGE_MT_DAAPD) += mt-daapd -package-$(BR2_PACKAGE_MTD) += mtd -package-$(BR2_PACKAGE_MTR) += mtr -package-$(BR2_PACKAGE_MUTT) += mutt -package-$(BR2_COMPILE_MYSQL) += mysql -package-$(BR2_PACKAGE_NANO) += nano -package-$(BR2_COMPILE_NCURSES) += ncurses -package-$(BR2_COMPILE_NDISC6) += ndisc -package-$(BR2_COMPILE_NET_SNMP) += net-snmp -package-$(BR2_PACKAGE_NETPERF) += netperf -package-$(BR2_PACKAGE_NETSTAT_NAT) += netstat-nat -package-$(BR2_PACKAGE_NFS_SERVER) += nfs-server -package-$(BR2_PACKAGE_NMAP) += nmap -package-$(BR2_PACKAGE_NOCATSPLASH) += nocatsplash -package-$(BR2_PACKAGE_NTPCLIENT) += ntpclient -package-$(BR2_PACKAGE_NVRAM) += nvram -package-$(BR2_PACKAGE_OLSRD) += olsrd -package-$(BR2_COMPILE_OPENCDK) += opencdk -package-$(BR2_PACKAGE_OPENH323) += openh323 -package-$(BR2_COMPILE_OPENLDAP) += openldap -package-$(BR2_PACKAGE_OPENNTPD) += openntpd -package-$(BR2_PACKAGE_OPENSER) += openser -package-$(BR2_COMPILE_OPENSSH) += openssh -package-$(BR2_COMPILE_OPENSSL) += openssl -package-$(BR2_PACKAGE_OPENSWAN) += openswan -package-$(BR2_PACKAGE_OPENVPN) += openvpn -package-$(BR2_COMPILE_OSIRIS) += osiris -package-$(BR2_PACKAGE_PALANTIR) += palantir -package-$(BR2_PACKAGE_P910ND) += p910nd -package-$(BR2_PACKAGE_PARPROUTED) += parprouted -package-$(BR2_PACKAGE_PCIUTILS) += pciutils -package-$(BR2_COMPILE_PCMCIA_CS) += pcmcia-cs -package-$(BR2_COMPILE_PCRE) += pcre -package-$(BR2_PACKAGE_PEERCAST) += peercast -package-$(BR2_PACKAGE_PEERGUARDIAN) += peerguardian -package-$(BR2_COMPILE_PHP4) += php4 -package-$(BR2_COMPILE_PHP5) += php5 -package-$(BR2_PACKAGE_PICOCOM) += picocom -package-$(BR2_PACKAGE_PIPACS) += pipacs -package-$(BR2_COMPILE_PMACCT) += pmacct -package-$(BR2_COMPILE_POPT) += popt -package-$(BR2_PACKAGE_PORTMAP) += portmap -package-$(BR2_PACKAGE_PORTSENTRY) += portsentry -package-$(BR2_COMPILE_POSTGRESQL) += postgresql -package-$(BR2_PACKAGE_PPP) += ppp -package-$(BR2_PACKAGE_PPTP) += pptp -package-$(BR2_PACKAGE_PPTPD) += pptpd -package-$(BR2_PACKAGE_PRIVOXY) += privoxy -package-$(BR2_PACKAGE_PROCMAIL) += procmail -package-$(BR2_PACKAGE_PSYBNC) += psybnc -package-$(BR2_PACKAGE_PTUNNEL) += ptunnel -package-$(BR2_PACKAGE_PWLIB) += pwlib -package-$(BR2_PACKAGE_QUAGGA) += quagga -package-$(BR2_COMPILE_RADIUSCLIENT_NG) += radiusclient-ng -package-$(BR2_PACKAGE_RADVD) += radvd -package-$(BR2_PACKAGE_RARPD) += rarpd -package-$(BR2_COMPILE_READLINE) += readline -package-$(BR2_PACKAGE_REAIM) += reaim -package-$(BR2_PACKAGE_ROBOCFG) += robocfg -package-$(BR2_COMPILE_RP_PPPOE) += rp-pppoe -package-$(BR2_PACKAGE_RRDCOLLECT) += rrdcollect -package-$(BR2_COMPILE_RRDTOOL) += rrdtool -package-$(BR2_COMPILE_RRDTOOL1) += rrdtool1 -package-$(BR2_COMPILE_RRS) += rrs -package-$(BR2_PACKAGE_RSYNC) += rsync -package-$(BR2_PACKAGE_SABLEVM) += sablevm -package-$(BR2_COMPILE_SABLEVM_CLASSPATH) += sablevm-classpath -package-$(BR2_COMPILE_SAMBA) += samba -package-$(BR2_PACKAGE_SANE_BACKENDS) += sane-backends -package-$(BR2_PACKAGE_SCANLOGD) += scanlogd -package-$(BR2_PACKAGE_SCDP) += scdp -package-$(BR2_PACKAGE_SCREEN) += screen -package-$(BR2_PACKAGE_SDK) += sdk -package-$(BR2_PACKAGE_SER2NET) += ser2net -package-$(BR2_PACKAGE_SERDISPLIB) += serdisplib -package-$(BR2_PACKAGE_SETPWC) += setpwc -package-$(BR2_PACKAGE_SETSERIAL) += setserial -package-$(BR2_PACKAGE_SHAT) += shat -package-$(BR2_COMPILE_SHFS) += shfs -package-$(BR2_PACKAGE_SIPP) += sipp -package-$(BR2_PACKAGE_SIPROXD) += siproxd -package-$(BR2_PACKAGE_SIPSAK) += sipsak -package-$(BR2_PACKAGE_SLURM) += slurm -package-$(BR2_COMPILE_SNORT) += snort -package-$(BR2_COMPILE_SNORT_WIRELESS) += snort-wireless -package-$(BR2_PACKAGE_SOCAT) += socat -package-$(BR2_COMPILE_SPEEX) += speex -package-$(BR2_COMPILE_SQLITE) += sqlite -package-$(BR2_COMPILE_SQLITE2) += sqlite2 -package-$(BR2_PACKAGE_SSMTP) += ssmtp -package-$(BR2_PACKAGE_SSLTUNNEL) += ssltunnel -package-$(BR2_PACKAGE_SRELAY) += srelay -package-$(BR2_PACKAGE_STRACE) += strace -package-$(BR2_PACKAGE_SYSLOG_NG) += syslog-ng -package-$(BR2_PACKAGE_TCPDUMP) += tcpdump -package-$(BR2_PACKAGE_TINC) += tinc -package-$(BR2_PACKAGE_TINYPROXY) += tinyproxy -package-$(BR2_PACKAGE_TOR) += tor -package-$(BR2_PACKAGE_TTCP) += ttcp -package-$(BR2_PACKAGE_UCLIBCXX) += uclibc++ -package-$(BR2_PACKAGE_UDP_BROADCAST_RELAY) += udp-broadcast-relay -package-$(BR2_PACKAGE_ULOGD) += ulogd -package-$(BR2_PACKAGE_UPDATEDD) += updatedd -package-$(BR2_COMPILE_USBUTILS) += usbutils -package-$(BR2_PACKAGE_USTL) += ustl -package-$(BR2_COMPILE_UTIL_LINUX) += util-linux -package-$(BR2_PACKAGE_UDEV) += udev -package-$(BR2_PACKAGE_VIM) += vim -package-$(BR2_PACKAGE_VGP) += vgp -package-$(BR2_PACKAGE_VNCREPEATER) += vncrepeater -package-$(BR2_PACKAGE_VNC_REFLECTOR) += vnc-reflector -package-$(BR2_PACKAGE_VNSTAT) += vnstat -package-$(BR2_PACKAGE_VPNC) += vpnc -package-$(BR2_PACKAGE_VRRPD) += vrrpd -package-$(BR2_PACKAGE_VTUN) += vtun -package-$(BR2_PACKAGE_VSFTPD) += vsftpd -package-$(BR2_PACKAGE_WATCHDOG) += watchdog -package-$(BR2_PACKAGE_WCCPD) += wccpd -package-$(BR2_PACKAGE_WEECHAT) += weechat -package-$(BR2_PACKAGE_WIFICONF) += wificonf -package-$(BR2_PACKAGE_WIFIDOG) += wifidog -package-$(BR2_PACKAGE_WIVIZ) += wiviz -package-$(BR2_PACKAGE_WIRELESS_TOOLS) += wireless-tools -package-$(BR2_PACKAGE_WKNOCK) += wknock -package-$(BR2_PACKAGE_WOL) += wol -package-$(BR2_PACKAGE_WONDERSHAPER) += wondershaper -package-$(BR2_PACKAGE_WPA_SUPPLICANT) += wpa_supplicant -package-$(BR2_PACKAGE_WPUT) += wput -package-$(BR2_PACKAGE_WRT_RADAUTH) += wrt-radauth -package-$(BR2_PACKAGE_WX200D) += wx200d -package-$(BR2_PACKAGE_XINETD) += xinetd -package-$(BR2_PACKAGE_XSUPPLICANT) += xsupplicant -package-$(BR2_PACKAGE_ZLIB) += zlib - -DEV_LIBS:=tcp_wrappers glib ncurses openssl pcre popt zlib libnet libpcap mysql postgresql iptables matrixssl liblzo gmp fuse portmap libelf uclibc++ speex libpng libgd wireless-tools nvram linux-atm libamsel libao libart libdaemon libdb libdnet libevent libffi-sable libgcrypt libgdbm libgpg-error libid3tag libmad libnet libnids libogg libol libosip2 libpcap radiusclient-ng libtasn1 libupnp libusb libvorbis libvorbisidec libxml2 libxslt id3lib net-snmp -DEV_LIBS_COMPILE:=$(patsubst %,%-compile,$(DEV_LIBS)) -SDK_DEFAULT_PACKAGES:=busybox dnsmasq iptables wireless-tools dropbear bridge ipkg ppp -SDK_DEFAULT_COMPILE:=$(patsubst %,%-compile,$(SDK_DEFAULT_PACKAGES)) COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) @@ -301,8 +11,6 @@ install: base-files-install $(INSTALL_PACKAGES) $(COMPILE_PACKAGES): base-files-compile $(INSTALL_PACKAGES): base-files-install -sdk-compile: $(DEV_LIBS_COMPILE) $(SDK_DEFAULT_COMPILE) - $(STAMP_DIR): mkdir -p $@ diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 35f954b931e..3ada74532e9 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -5,25 +5,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_RELEASE:=1 -ifeq ($(strip $(BR2_PACKAGE_BUSYBOX_SNAPSHOT)),y) -# Be aware that this changes daily.... -PKG_VERSION:=0.${shell date +"%G%m%d"} -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-snapshot.tar.bz2 -PKG_SOURCE_URL:=http://www.busybox.net/downloads/snapshots -PKG_MD5SUM:=x -else PKG_VERSION:=1.1.2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads PKG_MD5SUM:=0b5d78072302fe687407956537bdb9e3 -endif PKG_CAT:=bzcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,BUSYBOX,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/busybox +CONFIGFILE:=config/Config.in +SECTION:=base +CATEGORY:=Base system +TITLE:=Core utilities +DESCRIPTION:=Core utilities for embedded Linux systems +endef +$(eval $(call BuildPackage,BUSYBOX,busybox)) $(PKG_BUILD_DIR)/.configured: $(SCRIPT_DIR)/gen_busybox_config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/.config diff --git a/openwrt/package/busybox/ipkg/busybox.control b/openwrt/package/busybox/ipkg/busybox.control deleted file mode 100644 index e7fc84a2903..00000000000 --- a/openwrt/package/busybox/ipkg/busybox.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: busybox -Priority: optional -Section: net -Description: Core utilities for embedded Linux systems diff --git a/openwrt/package/depend.mk b/openwrt/package/depend.mk deleted file mode 100644 index cbf75d44716..00000000000 --- a/openwrt/package/depend.mk +++ /dev/null @@ -1,277 +0,0 @@ -amwall-compile: libamsel-compile -arpd-compile: libpcap-compile libdnet-compile libevent-compile -arpwatch-compile: libpcap-compile -atftp-compile: readline-compile ncurses-compile -avahi-compile: libdaemon-compile expat-compile libgdbm-compile -bind-compile: openssl-compile -bitchx-compile: ncurses-compile -bitlbee-compile: libiconv-compile openssl-compile glib-compile -cbtt-compile: mysql-compile zlib-compile -clinkc-compile: expat-compile -curl-compile: openssl-compile zlib-compile -cyrus-sasl-compile: openssl-compile -deco-compile: ncurses-compile -dhcp6-compile: ncurses-compile -dsniff-compile: libnids-compile openssl-compile libgdbm-compile -freetype-compile: zlib-compile -fprobe-compile: libpcap-compile -gdbserver-compile: ncurses-compile -gmediaserver-compile: id3lib-compile libupnp-compile -gnutls-compile: libgcrypt-compile opencdk-compile libtasn1-compile -gpsd-compile: uclibc++-compile -icecast-compile: curl-compile libvorbisidec-compile libxml2-compile libxslt-compile -id3lib-compile: uclibc++-compile zlib-compile -iftop-compile: libpcap-compile libpthread-compile ncurses-compile -ipcad-compile: libpcap-compile -irssi-compile: glib-compile ncurses-compile -iperf-compile: uclibc++-compile -iptables-snmp-compile: net-snmp-compile -iptraf-compile: ncurses-compile -ipsec-tools-compile: openssl-compile -jamvm-compile: libffi-sable-compile zlib-compile sablevm-classpath-compile -httping-compile: openssl-compile -kismet-compile: uclibc++-compile libpcap-compile ncurses-compile -l2tpns-compile: libcli-compile -less-compile: ncurses-compile -lcd4linux-compile: ncurses-compile -libgcrypt-compile: libgpg-error-compile -libgd-compile: libpng-compile jpeg-compile -libid3tag-compile: zlib-compile -libnet-compile: libpcap-compile -libnids-compile: libnet-compile -libvorbis-compile: libogg-compile -libxml2-compile: zlib-compile -libxslt-compile: libxml2-compile -lighttpd-compile: openssl-compile pcre-compile -logrotate-compile: popt-compile -madplay-compile: libid3tag-compile libmad-compile -miax-compile: bluez-libs-compile -miredo-compile: uclibc++-compile -monit-compile: openssl-compile -mt-daapd-compile: howl-compile libgdbm-compile libid3tag-compile -mtr-compile: ncurses-compile -mutt-compile: ncurses-compile openssl-compile -mysql-compile: ncurses-compile zlib-compile readline-compile -nano-compile: ncurses-compile -net-snmp-compile: libelf-compile -nfs-server-compile: portmap-compile -nmap-compile: uclibc++-compile pcre-compile libpcap-compile -nocatsplash-compile: glib-compile -opencdk-compile: libgcrypt-compile -openh323-compile: pwlib-compile -openldap-compile: cyrus-sasl-compile openssl-compile -openssh-compile: zlib-compile openssl-compile -openssl-compile: zlib-compile -openswan-compile: gmp-compile -osiris-compile: openssl-compile -palantir-compile: jpeg-compile -peercast-compile: uclibc++-compile -peerguardian-compile: libpthread-compile -portmap-compile: tcp_wrappers-compile -postgresql-compile: zlib-compile -ppp-compile: linux-atm-compile libpcap-compile -privoxy-compile: pcre-compile -ptunnel-compile: libpcap-compile -pwlib-compile: libpthread-compile -quagga-compile: readline-compile ncurses-compile -raddump-compile: openssl-compile libpcap-compile -radiusclient-ng-compile: openssl-compile -rarpd-compile: libnet-compile -ifneq ($(BR2_PACKAGE_LIBRRD),) -rrdcollect-compile: rrdtool-compile -endif -ifneq ($(BR2_PACKAGE_LIBRRD1),) -rrdcollect-compile: rrdtool1-compile -endif -rrdtool-compile: cgilib-compile freetype-compile libart-compile libpng-compile -rrdtool1-compile: zlib-compile -rsync-compile: popt-compile -scanlogd-compile: libpcap-compile libnids-compile libnet-compile -scdp-compile: libnet-compile -screen-compile: ncurses-compile -sipp-compile: ncurses-compile uclibc++-compile libpthread-compile -siproxd-compile: libosip2-compile -sipsak-compile: openssl-compile -socat-compile: openssl-compile -sqlite-compile: ncurses-compile readline-compile -sqlite2-compile: ncurses-compile readline-compile -ssltunnel-compile: openssl-compile ppp-compile -syslog-ng-compile: libol-compile -tcpdump-compile: libpcap-compile -tinc-compile: zlib-compile openssl-compile liblzo-compile -tor-compile: libevent-compile openssl-compile zlib-compile -usbutils-compile: libusb-compile -vim-compile: ncurses-compile -vncrepeater-compile: uclibc++-compile -vnc-reflector-compile: jpeg-compile zlib-compile -vpnc-compile: libgcrypt-compile libgpg-error-compile -vtun-compile: zlib-compile openssl-compile liblzo-compile -weechat-compile: ncurses-compile gnutls-compile lua-compile -wificonf-compile: wireless-tools-compile nvram-compile -wiviz-compile: libpcap-compile -wknock-compile: libpcap-compile -wpa_supplicant-compile: openssl-compile -wx200d-compile: postgresql-compile -xsupplicant-compile: openssl-compile - -asterisk-compile: bluez-libs-compile ncurses-compile openssl-compile openh323-compile -ifneq ($(BR2_PACKAGE_ASTERISK_CODEC_SPEEX),) -asterisk-compile: speex-compile -endif -ifneq ($(BR2_PACKAGE_ASTERISK_PGSQL),) -asterisk-compile: postgresql-compile -endif -ifneq ($(BR2_PACKAGE_ASTERISK_MYSQL),) -asterisk-compile: mysql-compile -endif -ifneq ($(BR2_PACKAGE_ASTERISK_SQLITE),) -asterisk-compile: sqlite2-compile -endif - -freeradius-compile: libtool-compile openssl-compile -ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_LDAP),) -freeradius-compile: openldap-compile -endif -ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL),) -freeradius-compile: mysql-compile -endif -ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL),) -freeradius-compile: postgresql-compile -endif - -hostapd-compile: wireless-tools-compile -ifneq ($(BR2_PACKAGE_HOSTAPD),) -hostapd-compile: openssl-compile -endif - -ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),) -mini_httpd-compile: matrixssl-compile -endif -ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),) -mini_httpd-compile: openssl-compile -endif - -ifneq ($(BR2_PACKAGE_MOTION),) -motion-compile: jpeg-compile -endif - -ifneq ($(BR2_PACKAGE_MPD_MP3),) -mpd-compile: libid3tag-compile libmad-compile -endif -ifneq ($(BR2_PACKAGE_MPD_OGG),) -mpd-compile: libvorbisidec-compile -endif -ifneq ($(BR2_PACKAGE_MPD_FLAC),) -mpd-compile: flac-compile -endif - -ifeq ($(BR2_PACKAGE_LIBOPENSSL),y) -openvpn-compile: openssl-compile -endif -ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y) -openvpn-compile: liblzo-compile -endif - -php4-compile: openssl-compile zlib-compile -ifneq ($(BR2_PACKAGE_PHP4_MOD_CURL),) -php4-compile: curl-compile -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_GD),) -php4-compile: libgd-compile libpng-compile -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_GMP),) -php4-compile: gmp-compile -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_LDAP),) -php4-compile: openldap-compile -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_MYSQL),) -php4-compile: mysql-compile -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_PCRE),) -php4-compile: pcre-compile -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_PGSQL),) -php4-compile: postgresql-compile -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_SQLITE),) -php4-compile: sqlite2-compile -endif -ifneq ($(BR2_PACKAGE_PHP4_MOD_XML),) -php4-compile: expat-compile -endif - -php5-compile: openssl-compile zlib-compile -ifneq ($(BR2_PACKAGE_PHP5_MOD_CURL),) -php5-compile: curl-compile -endif -ifneq ($(BR2_PACKAGE_PHP5_MOD_GD),) -php5-compile: libgd-compile libpng-compile -endif -ifneq ($(BR2_PACKAGE_PHP5_MOD_GMP),) -php5-compile: gmp-compile -endif -ifneq ($(BR2_PACKAGE_PHP5_MOD_LDAP),) -php5-compile: openldap-compile -endif -ifneq ($(BR2_PACKAGE_PHP5_MOD_MYSQL),) -php5-compile: mysql-compile -endif -ifneq ($(BR2_PACKAGE_PHP5_MOD_PCRE),) -php5-compile: pcre-compile -endif -ifneq ($(BR2_PACKAGE_PHP5_MOD_PGSQL),) -php5-compile: postgresql-compile -endif -ifneq ($(BR2_PACKAGE_PHP5_MOD_SQLITE),) -php5-compile: sqlite2-compile -endif -ifneq ($(BR2_PACKAGE_PHP5_MOD_XML),) -php5-compile: expat-compile -endif - -pmacct-compile: libpcap-compile -ifneq ($(BR2_COMPILE_PMACCT_MYSQL),) -pmacct-compile: mysql-compile -endif -ifneq ($(BR2_COMPILE_PMACCT_PGSQL),) -pmacct-compile: postgresql-compile -endif -ifneq ($(BR2_COMPILE_PMACCT_SQLITE),) -pmacct-compile: sqlite-compile -endif - -rrs-compile: uclibc++-compile -ifneq ($(BR2_PACKAGE_RRS),) -rrs-compile: openssl-compile -endif - -snort-compile: libnet-compile libpcap-compile pcre-compile -ifeq ($(BR2_PACKAGE_SNORT_WITH_MYSQL),y) -snort-compile: mysql-compile -endif -ifeq ($(BR2_PACKAGE_SNORT_WITH_PGSQL),y) -snort-compile: postgresql-compile -endif -ifeq ($(BR2_PACKAGE_SNORT_ENABLE_INLINE),y) -snort-compile: iptables-compile -endif - -snort-wireless-compile: libnet-compile libpcap-compile pcre-compile -ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_MYSQL),y) -snort-wireless-compile: mysql-compile -endif -ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_PGSQL),y) -snort-wireless-compile: postgresql-compile -endif -ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_INLINE),y) -snort-wireless-compile: iptables-compile -endif - -ulogd-compile: iptables-compile -ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL),) -ulogd-compile: mysql-compile -endif -ifneq ($(BR2_PACKAGE_ULOGD_MOD_PGSQL),) -ulogd-compile: postgresql-compile -endif diff --git a/openwrt/package/gdbserver/Config.in b/openwrt/package/gdbserver/Config.in deleted file mode 100644 index df74ff61430..00000000000 --- a/openwrt/package/gdbserver/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_GDBSERVER - prompt "gdbserver......................... Remote Server for the GNU Debugger" - tristate - default m if CONFIG_DEVEL - help - GDBSERVER is a program that allows you to run GDB on a different machine - than the one which is running the program being debugged. - diff --git a/openwrt/package/gdbserver/Makefile b/openwrt/package/gdbserver/Makefile deleted file mode 100644 index 922e6312304..00000000000 --- a/openwrt/package/gdbserver/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gdbserver -PKG_VERSION:=6.3 -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(PKG_VERSION) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,GDBSERVER,gdbserver,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - - -$(PKG_BUILD_DIR)/.prepared: - rm -rf $(PKG_BUILD_DIR) - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - $(GDB_DIR)/gdb/gdbserver/configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $@ - -$(IPKG_GDBSERVER): - install -m0755 -d $(IDIR_GDBSERVER)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(IDIR_GDBSERVER)/usr/bin/ - $(RSTRIP) $(IDIR_GDBSERVER) - $(IPKG_BUILD) $(IDIR_GDBSERVER) $(PACKAGE_DIR) - diff --git a/openwrt/package/gdbserver/ipkg/gdbserver.control b/openwrt/package/gdbserver/ipkg/gdbserver.control deleted file mode 100644 index f12eebe1cc6..00000000000 --- a/openwrt/package/gdbserver/ipkg/gdbserver.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: gdbserver -Priority: optional -Section: devel -Description: Remote Server for the GNU Debugger diff --git a/openwrt/package/iptables-snmp/Config.in b/openwrt/package/iptables-snmp/Config.in deleted file mode 100644 index 7232abb14f9..00000000000 --- a/openwrt/package/iptables-snmp/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_IPTABLES_SNMP - prompt "iptables-snmp..................... An snmpd plugin to access iptables rules" - tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_SNMPD - help - This is a plugin that makes iptables rules accessable from snmpd. - - http://www.nobiscuit.com/iptables-snmp/ - diff --git a/openwrt/package/iptables-snmp/Makefile b/openwrt/package/iptables-snmp/Makefile deleted file mode 100644 index dbf35c8f94a..00000000000 --- a/openwrt/package/iptables-snmp/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=iptables-snmp -PKG_VERSION:=0.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=8370d2f0c899461a053da491400119d1 - -PKG_SOURCE_URL:=http://www.nobiscuit.com/iptables-snmp -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,IPTABLES_SNMP,iptables-snmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); rm -f config.{cache,status}; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) " \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_IPTABLES_SNMP): - install -d -m0755 $(IDIR_IPTABLES_SNMP)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables-snmp.so $(IDIR_IPTABLES_SNMP)/usr/lib - $(RSTRIP) $(IDIR_IPTABLES_SNMP) - $(IPKG_BUILD) $(IDIR_IPTABLES_SNMP) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm $(PKG_BUILD_DIR)/.built \ No newline at end of file diff --git a/openwrt/package/iptables-snmp/ipkg/iptables-snmp.control b/openwrt/package/iptables-snmp/ipkg/iptables-snmp.control deleted file mode 100644 index cd92ffeb58d..00000000000 --- a/openwrt/package/iptables-snmp/ipkg/iptables-snmp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-snmp -Priority: optional -Section: net -Depends: snmpd -Description: An snmpd plugin to access iptables rules \ No newline at end of file diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 9bbf4fa48f8..775c34906a3 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -1,7 +1,41 @@ # invoke ipkg with configuration in $(STAGING_DIR)/etc/ipkg.conf -define PKG_template -IPKG_$(1):=$(PACKAGE_DIR)/$(2)_$(3)_$(4).ipk +define BuildPackage +CONFIGFILE:= +NAME:=$(PKG_NAME) +SECTION:=opt +CATEGORY:=Extra packages +DEPENDS:= +MAINTAINER:=OpenWrt Developers Team +SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) +VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) +PKGARCH:=$(ARCH) +PRIORITY:=optional +TITLE:= +DESCRIPTION:= + +$$(eval $$(call Package/$(2))) + +ifeq ($$(NAME),) +$$(error Package $(2) has no NAME) +endif +ifeq ($$(TITLE),) +$$(error Package $(2) has no TITLE) +endif +ifeq ($$(CATEGORY),) +$$(error Package $(2) has no CATEGORY) +endif +ifeq ($$(PRIORITY),) +$$(error Package $(2) has no PRIORITY) +endif +ifeq ($$(VERSION),) +$$(error Package $(2) has no VERSION) +endif +ifeq ($$(PKGARCH),) +PKGARCH:=$(ARCH) +endif + +IPKG_$(1):=$(PACKAGE_DIR)/$(2)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(2) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(2).list @@ -15,11 +49,20 @@ ifeq ($(BR2_PACKAGE_$(1)),y) install-targets: $$(INFO_$(1)) endif -IDEPEND_$(1):=$$(strip $(5)) +IDEPEND_$(1):=$$(strip $$(DEPENDS)) $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared - $(SCRIPT_DIR)/make-ipkg-dir.sh $$(IDIR_$(1)) ./ipkg/$(2).control $(3) $(4) - if [ "$$(IDEPEND_$(1))" != "" ]; then echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control; fi + mkdir -p $$(IDIR_$(1))/CONTROL + echo "Package: $(2)" > $$(IDIR_$(1))/CONTROL/control + echo "Version: $$(VERSION)" >> $$(IDIR_$(1))/CONTROL/control + echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control + echo "Source: $$(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control + echo "Section: $$(SECTION)" >> $$(IDIR_$(1))/CONTROL/control + echo "Priority: $$(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control + echo "Maintainer: $$(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control + echo "Architecture: $$(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control + echo "Description: $$(DESCRIPTION)" >> $$(IDIR_$(1))/CONTROL/control + chmod 644 $$(IDIR_$(1))/CONTROL/control for file in conffiles preinst postinst prerm postrm; do \ [ -f ./ipkg/$(2).$$$$file ] && cp ./ipkg/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ done From 4f78882c2f24facdecd0497ad0d6dd41d4e84e16 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Apr 2006 01:26:27 +0000 Subject: [PATCH 004/757] remove make-ipkg-dir.sh SVN-Revision: 3644 --- openwrt/scripts/make-ipkg-dir.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100755 openwrt/scripts/make-ipkg-dir.sh diff --git a/openwrt/scripts/make-ipkg-dir.sh b/openwrt/scripts/make-ipkg-dir.sh deleted file mode 100755 index 236cb6feb4b..00000000000 --- a/openwrt/scripts/make-ipkg-dir.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -BASE=http://svn.openwrt.org/openwrt/trunk/openwrt -TARGET=$1 -CONTROL=$2 -VERSION=$3 -ARCH=$4 - -WD=$(pwd) - -mkdir -p "$TARGET/CONTROL" -grep '^[^(Version|Architecture)]' "$CONTROL" > "$TARGET/CONTROL/control" -grep '^Maintainer' "$CONTROL" 2>&1 >/dev/null || \ - echo "Maintainer: OpenWrt Developers Team " >> "$TARGET/CONTROL/control" -grep '^Source' "$CONTROL" 2>&1 >/dev/null || { - pkgbase=$(echo "$WD" | sed -e "s|^$TOPDIR/||g") - [ "$pkgbase" = "$WD" ] && src="N/A" || src="$BASE/$pkgbase" - echo "Source: $src" >> "$TARGET/CONTROL/control" -} -echo "Version: $VERSION" >> "$TARGET/CONTROL/control" -echo "Architecture: $ARCH" >> "$TARGET/CONTROL/control" -chmod 644 "$TARGET/CONTROL/control" From 5795d42588a3cbaa267c5a7e4a745318ab03d8b5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Apr 2006 03:03:32 +0000 Subject: [PATCH 005/757] new package makefile syntax SVN-Revision: 3645 --- openwrt/package/busybox/Makefile | 27 ++++++---- openwrt/package/rules.mk | 89 ++++++++++++++++++++++---------- 2 files changed, 79 insertions(+), 37 deletions(-) diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 3ada74532e9..009a64a2121 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -21,20 +21,25 @@ CATEGORY:=Base system TITLE:=Core utilities DESCRIPTION:=Core utilities for embedded Linux systems endef -$(eval $(call BuildPackage,BUSYBOX,busybox)) -$(PKG_BUILD_DIR)/.configured: +define Build/Configure $(SCRIPT_DIR)/gen_busybox_config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/.config yes '' | $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" -C $(PKG_BUILD_DIR) oldconfig - touch $@ +endef -$(PKG_BUILD_DIR)/.built: - $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(IDIR_BUSYBOX)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" ARCH="$(ARCH)" -C $(PKG_BUILD_DIR) - touch $@ +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) \ + CROSS="$(TARGET_CROSS)" \ + PREFIX="$(IDIR_BUSYBOX)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + ARCH="$(ARCH)" +endef -$(IPKG_BUSYBOX): - $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(IDIR_BUSYBOX)" \ +define Package/busybox/install + $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(1)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install - $(STRIP) $(IDIR_BUSYBOX)/bin/busybox - $(IPKG_BUILD) $(IDIR_BUSYBOX) $(PACKAGE_DIR) + $(STRIP) $(1)/bin/busybox +endef + +$(eval $(call BuildPackage,busybox)) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 775c34906a3..1e5a761d344 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -1,8 +1,27 @@ -# invoke ipkg with configuration in $(STAGING_DIR)/etc/ipkg.conf +# default target +all: compile + +define Build/DefaultTargets +$(PKG_BUILD_DIR)/.prepared: + rm -rf $(PKG_BUILD_DIR) + mkdir -p $(PKG_BUILD_DIR) + $(call Build/Prepare) + touch $$@ + +$(PKG_BUILD_DIR)/.configured: + $(call Build/Configure) + touch $$@ + +$(PKG_BUILD_DIR)/.built: + $(call Build/Compile) + touch $$@ + +DEFAULT_TARGETS:=1 +endef + define BuildPackage CONFIGFILE:= -NAME:=$(PKG_NAME) SECTION:=opt CATEGORY:=Extra packages DEPENDS:= @@ -14,30 +33,27 @@ PRIORITY:=optional TITLE:= DESCRIPTION:= -$$(eval $$(call Package/$(2))) +$$(eval $$(call Package/$(1))) -ifeq ($$(NAME),) -$$(error Package $(2) has no NAME) -endif ifeq ($$(TITLE),) -$$(error Package $(2) has no TITLE) +$$(error Package $(1) has no TITLE) endif ifeq ($$(CATEGORY),) -$$(error Package $(2) has no CATEGORY) +$$(error Package $(1) has no CATEGORY) endif ifeq ($$(PRIORITY),) -$$(error Package $(2) has no PRIORITY) +$$(error Package $(1) has no PRIORITY) endif ifeq ($$(VERSION),) -$$(error Package $(2) has no VERSION) +$$(error Package $(1) has no VERSION) endif ifeq ($$(PKGARCH),) PKGARCH:=$(ARCH) endif -IPKG_$(1):=$(PACKAGE_DIR)/$(2)_$(VERSION)_$(PKGARCH).ipk -IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(2) -INFO_$(1):=$(IPKG_STATE_DIR)/info/$(2).list +IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk +IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) +INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list ifneq ($(BR2_PACKAGE_$(1)),) compile-targets: $$(IPKG_$(1)) @@ -53,7 +69,7 @@ IDEPEND_$(1):=$$(strip $$(DEPENDS)) $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL - echo "Package: $(2)" > $$(IDIR_$(1))/CONTROL/control + echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $$(VERSION)" >> $$(IDIR_$(1))/CONTROL/control echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control echo "Source: $$(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control @@ -64,30 +80,36 @@ $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared echo "Description: $$(DESCRIPTION)" >> $$(IDIR_$(1))/CONTROL/control chmod 644 $$(IDIR_$(1))/CONTROL/control for file in conffiles preinst postinst prerm postrm; do \ - [ -f ./ipkg/$(2).$$$$file ] && cp ./ipkg/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ + [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ done $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(PACKAGE_DIR) + $(call Package/$(1)/install,$$(IDIR_$(1))) + $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) $$(INFO_$(1)): $$(IPKG_$(1)) $(IPKG) install $$(IPKG_$(1)) -$(2)-clean: +$(1)-clean: rm -f $$(IPKG_$(1)) -clean: $(2)-clean -endef +clean: $(1)-clean +ifneq ($(__DEFAULT_TARGETS),1) +$(eval $(call Build/DefaultTargets)) +endif + +endef ifneq ($(strip $(PKG_SOURCE)),) $(DL_DIR)/$(PKG_SOURCE): @$(CMD_TRACE) "downloading... " $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) $(MAKE_TRACE) + +$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) endif ifneq ($(strip $(PKG_CAT)),) -$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) - rm -rf $(PKG_BUILD_DIR) - mkdir -p $(PKG_BUILD_DIR) +define Build/Prepare/Default if [ "$(PKG_CAT)" = "unzip" ]; then \ unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \ else \ @@ -96,10 +118,28 @@ $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) if [ -d ./patches ]; then \ $(PATCH) $(PKG_BUILD_DIR) ./patches ; \ fi - touch $(PKG_BUILD_DIR)/.prepared +endef endif -all: compile +define Build/Prepare +$(call Build/Prepare/Default) +endef + +define Build/Configure/Default +# TODO: add configurable default command +endef + +define Build/Configure +$(call Build/Configure/Default) +endef + +define Build/Compile/Default +# TODO: add configurable default command +endef + +define Build/Compile +$(call Build/Compile/Default) +endef source: $(DL_DIR)/$(PKG_SOURCE) prepare: source @@ -133,9 +173,6 @@ rebuild: fi $(MAKE) compile $(MAKE_TRACE) -$(PKG_BUILD_DIR)/.configured: -$(PKG_BUILD_DIR)/.built: - $(PACKAGE_DIR): mkdir -p $@ From a5992a14cb003f3672f20460cb3afa0c230e10fe Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Apr 2006 03:11:20 +0000 Subject: [PATCH 006/757] fix default targets for multiple packges SVN-Revision: 3646 --- openwrt/package/rules.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 1e5a761d344..0920f7bcf30 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -16,7 +16,8 @@ $(PKG_BUILD_DIR)/.built: $(call Build/Compile) touch $$@ -DEFAULT_TARGETS:=1 +define Build/DefaultTargets +endef endef From 5a4980a72bf26150aa8c83f11b34bfd7ee4c7dd2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Apr 2006 04:27:05 +0000 Subject: [PATCH 007/757] port iptables to new config format, change handling of TITLE and DESCRIPTION SVN-Revision: 3647 --- openwrt/package/busybox/Makefile | 3 +- openwrt/package/iptables/Makefile | 242 +++++++++++++----- .../package/iptables/ipkg/ip6tables.control | 5 - .../iptables/ipkg/iptables-extra.control | 5 - .../ipkg/iptables-mod-conntrack.control | 5 - .../iptables/ipkg/iptables-mod-extra.control | 5 - .../iptables/ipkg/iptables-mod-filter.control | 5 - .../iptables/ipkg/iptables-mod-imq.control | 5 - .../iptables/ipkg/iptables-mod-ipopt.control | 5 - .../iptables/ipkg/iptables-mod-ipsec.control | 5 - .../iptables/ipkg/iptables-mod-nat.control | 5 - .../iptables/ipkg/iptables-mod-ulog.control | 5 - .../iptables/ipkg/iptables-utils.control | 5 - .../package/iptables/ipkg/iptables.control | 4 - openwrt/package/rules.mk | 7 +- 15 files changed, 177 insertions(+), 134 deletions(-) delete mode 100644 openwrt/package/iptables/ipkg/ip6tables.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-extra.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-mod-conntrack.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-mod-extra.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-mod-filter.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-mod-imq.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-mod-ipopt.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-mod-ipsec.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-mod-nat.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-mod-ulog.control delete mode 100644 openwrt/package/iptables/ipkg/iptables-utils.control delete mode 100644 openwrt/package/iptables/ipkg/iptables.control diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 009a64a2121..d1ce2893542 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -18,8 +18,7 @@ define Package/busybox CONFIGFILE:=config/Config.in SECTION:=base CATEGORY:=Base system -TITLE:=Core utilities -DESCRIPTION:=Core utilities for embedded Linux systems +TITLE:=Core utilities for embedded Linux endef define Build/Configure diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index f16ac8be481..ded4816b211 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -17,50 +17,129 @@ PKG_CAT:=bzcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -define IPKG_plugin_template - -$$(IPKG_$(1)): - install -m0755 -d $$(IDIR_$(1))/usr/lib/iptables - for m in $$(patsubst xt_%,ipt_%,$(2)); do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so $$(IDIR_$(1))/usr/lib/iptables/ ; \ - done - @[ -z "$(3)" ] || $(MAKE) $(3) - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - -endef +PKG_MENU:=IPv4 / IPv6 firewall administration include $(TOPDIR)/package/rules.mk include $(LINUX_DIR)/.config include $(TOPDIR)/target/linux/netfilter.mk -$(eval $(call PKG_template,IPTABLES,iptables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_EXTRA,iptables-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_UTILS,iptables-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IP6TABLES,ip6tables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/iptables +SECTION:=net +CATEGORY:=Base system +TITLE:=IPv4 firewall administration tool +endef -$(eval $(call PKG_template,IPTABLES_MOD_CONNTRACK,iptables-mod-conntrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_MOD_EXTRA,iptables-mod-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_MOD_FILTER,iptables-mod-filter,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_MOD_IMQ,iptables-mod-imq,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_MOD_IPOPT,iptables-mod-ipopt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_MOD_IPSEC,iptables-mod-ipsec,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_MOD_NAT,iptables-mod-nat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,IPTABLES_MOD_ULOG,iptables-mod-ulog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/iptables-mod-conntrack +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=iptables extensions for connection tracking +DESCRIPTION:=Includes: \\\ + * libipt_conntrack \\\ + * libipt_helper \\\ + * libipt_connmark/CONNMARK -$(eval $(call IPKG_plugin_template,IPTABLES_MOD_CONNTRACK,$(IPT_CONNTRACK-m))) -$(eval $(call IPKG_plugin_template,IPTABLES_MOD_EXTRA,$(IPT_EXTRA-m))) -$(eval $(call IPKG_plugin_template,IPTABLES_MOD_FILTER,$(IPT_FILTER-m),layer7-install)) -$(eval $(call IPKG_plugin_template,IPTABLES_MOD_IMQ,$(IPT_IMQ-m))) -$(eval $(call IPKG_plugin_template,IPTABLES_MOD_IPOPT,$(IPT_IPOPT-m))) -$(eval $(call IPKG_plugin_template,IPTABLES_MOD_IPSEC,$(IPT_IPSEC-m))) -$(eval $(call IPKG_plugin_template,IPTABLES_MOD_NAT,$(IPT_NAT-m))) -$(eval $(call IPKG_plugin_template,IPTABLES_MOD_ULOG,$(IPT_ULOG-m))) +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ +define Package/iptables-mod-filter +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=iptables extensions for packet content inspection +DESCRIPTION:=Includes: \\\ + * libipt_ipp2p \\\ + * libipt_layer7 + +endef -$(PKG_BUILD_DIR)/.built: +define Package/iptables-mod-imq +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=iptables extension for IMQ support +DESCRIPTION:=Includes: \\\ + * libipt_IMQ + +endef + +define Package/iptables-mod-ipopt +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=iptables extensions for matching/changing IP packet options +DESCRIPTION:=Includes: \\\ + * libipt_dscp/DSCP \\\ + * libipt_ecn/ECN \\\ + * libipt_length \\\ + * libipt_mac \\\ + * libipt_tos/TOS \\\ + * libipt_tcpmms \\\ + * libipt_ttl/TTL \\\ + * libipt_unclean + +endef + +define Package/iptables-mod-ipsec +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=iptables extensions for matching ipsec traffic +DESCRIPTION:=Includes: \\\ + * libipt_ah \\\ + * libipt_esp + +endef + +define Package/iptables-mod-nat +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=iptables extensions for different NAT targets +DESCRIPTION:=Includes: \\\ + * libipt_REDIRECT +endef + +define Package/iptables-mod-ulog +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=iptables extensions for user-space packet logging +DESCRIPTION:=Includes: \\\ + * libipt_ULOG +endef + +define Package/iptables-mod-extra +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=other extra iptables extensions +DESCRIPTION:=Includes: \\\ + * libipt_limit \\\ + * libipt_owner \\\ + * libipt_physdev \\\ + * libipt_pkttype \\\ + * libipt_recent + +endef + +define Package/iptables-utils +SECTION:=net +CATEGORY:=Base system +DEPENDS:=iptables +TITLE:=iptables save and restore utilities +endef + +define Package/ip6tables +SECTION:=net +CATEGORY:=Base system +TITLE:=IPv6 firewall administration tool +endef + + +define Build/Configure +endef + +define Build/Compile chmod a+x $(PKG_BUILD_DIR)/extensions/.*-test* mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -69,43 +148,70 @@ $(PKG_BUILD_DIR)/.built: KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install install-devel - touch $@ +endef -$(IPKG_IPTABLES): - install -d -m0755 $(IDIR_IPTABLES)/etc/config - install -m0644 ./files/firewall.config $(IDIR_IPTABLES)/etc/config/firewall - install -d -m0755 $(IDIR_IPTABLES)/etc/init.d - install -m0755 ./files/firewall.init $(IDIR_IPTABLES)/etc/init.d/S45firewall - install -m0755 ./files/firewall.user $(IDIR_IPTABLES)/etc/ - install -d -m0755 $(IDIR_IPTABLES)/usr/lib - install -m0644 ./files/firewall.awk $(IDIR_IPTABLES)/usr/lib - install -d -m0755 $(IDIR_IPTABLES)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/ - install -d -m0755 $(IDIR_IPTABLES)/usr/lib/iptables +define Package/iptables/install + install -d -m0755 $(1)/etc/config + install -m0644 ./files/firewall.config $(1)/etc/config/firewall + install -d -m0755 $(1)/etc/init.d + install -m0755 ./files/firewall.init $(1)/etc/init.d/S45firewall + install -m0755 ./files/firewall.user $(1)/etc/ + install -d -m0755 $(1)/usr/lib + install -m0644 ./files/firewall.awk $(1)/usr/lib + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(1)/usr/sbin/ + install -d -m0755 $(1)/usr/lib/iptables (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ - $(CP) $(patsubst %,lib%.so,$(IPT_BUILTIN:xt_%=ipt_%)) $(IDIR_IPTABLES)/usr/lib/iptables/ \ + $(CP) $(patsubst %,lib%.so,$(IPT_BUILTIN:xt_%=ipt_%)) $(1)/usr/lib/iptables/ \ ) - $(RSTRIP) $(IDIR_IPTABLES) - $(IPKG_BUILD) $(IDIR_IPTABLES) $(PACKAGE_DIR) + $(RSTRIP) $(1) +endef -$(IPKG_IPTABLES_EXTRA): - $(IPKG_BUILD) $(IDIR_IPTABLES_EXTRA) $(PACKAGE_DIR) +define Package/iptables-utils/install + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables-{save,restore} $(1)/usr/sbin/ + $(RSTRIP) $(1) +endef -$(IPKG_IPTABLES_UTILS): - install -d -m0755 $(IDIR_IPTABLES_UTILS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables-{save,restore} $(IDIR_IPTABLES_UTILS)/usr/sbin/ - $(RSTRIP) $(IDIR_IPTABLES_UTILS) - $(IPKG_BUILD) $(IDIR_IPTABLES_UTILS) $(PACKAGE_DIR) - -$(IPKG_IP6TABLES): - install -d -m0755 $(IDIR_IP6TABLES)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(IDIR_IP6TABLES)/usr/sbin/ - install -d -m0755 $(IDIR_IP6TABLES)/usr/lib/iptables +define Package/ip6tables/install + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(1)/usr/sbin/ + install -d -m0755 $(1)/usr/lib/iptables (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ - $(CP) libip6t_*.so $(IDIR_IP6TABLES)/usr/lib/iptables/ \ + $(CP) libip6t_*.so $(1)/usr/lib/iptables/ \ ) - $(RSTRIP) $(IDIR_IP6TABLES) - $(IPKG_BUILD) $(IDIR_IP6TABLES) $(PACKAGE_DIR) + $(RSTRIP) $(1) +endef + +$(eval $(call BuildPackage,iptables)) +$(eval $(call BuildPackage,iptables-utils)) +$(eval $(call BuildPackage,ip6tables)) + +define BuildPlugin +define Package/$(1)/install + install -m0755 -d $$(1)/usr/lib/iptables + for m in $$(patsubst xt_%,ipt_%,$(2)); do \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so $$(1)/usr/lib/iptables/ ; \ + done + $(3) + $(RSTRIP) $$(1) +endef + +$$(eval $$(call BuildPackage,$(1))) +endef + +L7_INSTALL:=mkdir -p $$(1)/etc/l7-protocols; \ + $(CP) files/l7/*.pat $$(1)/etc/l7-protocols/ + +$(eval $(call BuildPlugin,iptables-mod-conntrack,$(IPT_CONNTRACK-m))) +$(eval $(call BuildPlugin,iptables-mod-extra,$(IPT_EXTRA-m))) +$(eval $(call BuildPlugin,iptables-mod-filter,$(IPT_FILTER-m),$(L7_INSTALL))) +$(eval $(call BuildPlugin,iptables-mod-imq,$(IPT_IMQ-m))) +$(eval $(call BuildPlugin,iptables-mod-ipopt,$(IPT_IPOPT-m))) +$(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m))) +$(eval $(call BuildPlugin,iptables-mod-nat,$(IPT_NAT-m))) +$(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m))) + $(STAGING_DIR)/usr/lib/libipq.a: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include @@ -113,15 +219,11 @@ $(STAGING_DIR)/usr/lib/libipq.a: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipq.a $(STAGING_DIR)/usr/lib/ -layer7-install: - mkdir -p $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols - $(CP) files/l7/*.pat $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols/ - install-dev: $(STAGING_DIR)/usr/lib/libipq.a - uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/libipq.h rm -rf $(STAGING_DIR)/usr/lib/libipq.a compile-targets: install-dev clean-targets: uninstall-dev + diff --git a/openwrt/package/iptables/ipkg/ip6tables.control b/openwrt/package/iptables/ipkg/ip6tables.control deleted file mode 100644 index c6d63936e3e..00000000000 --- a/openwrt/package/iptables/ipkg/ip6tables.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ip6tables -Priority: optional -Depends: kmod-ip6tables -Section: net -Description: The netfilter firewalling software for IPv6 diff --git a/openwrt/package/iptables/ipkg/iptables-extra.control b/openwrt/package/iptables/ipkg/iptables-extra.control deleted file mode 100644 index afd4235c42e..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-extra.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-extra -Priority: optional -Section: net -Depends: iptables, iptables-mod-conntrack, iptables-mod-extra, iptables-mod-filter, iptables-mod-ipopt, iptables-mod-ipsec, iptables-mod-nat, iptables-mod-ulog -Description: Other extra Iptables extensions (meta-package) diff --git a/openwrt/package/iptables/ipkg/iptables-mod-conntrack.control b/openwrt/package/iptables/ipkg/iptables-mod-conntrack.control deleted file mode 100644 index 840992e677f..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-mod-conntrack.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-mod-conntrack -Priority: optional -Section: net -Depends: iptables, kmod-ipt-conntrack -Description: Iptables (IPv4) extensions for connection tracking diff --git a/openwrt/package/iptables/ipkg/iptables-mod-extra.control b/openwrt/package/iptables/ipkg/iptables-mod-extra.control deleted file mode 100644 index f26b4a45829..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-mod-extra.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-mod-extra -Priority: optional -Section: net -Depends: iptables, kmod-ipt-extra -Description: Other extra Iptables (IPv4) extensions diff --git a/openwrt/package/iptables/ipkg/iptables-mod-filter.control b/openwrt/package/iptables/ipkg/iptables-mod-filter.control deleted file mode 100644 index 43ec799557c..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-mod-filter.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-mod-filter -Priority: optional -Section: net -Depends: iptables, kmod-ipt-filter -Description: Iptables (IPv4) extension for packet content inspection diff --git a/openwrt/package/iptables/ipkg/iptables-mod-imq.control b/openwrt/package/iptables/ipkg/iptables-mod-imq.control deleted file mode 100644 index d1e46d28a01..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-mod-imq.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-mod-imq -Priority: optional -Section: net -Depends: kmod-imq -Description: Iptables (IPv4) extensions for Intermediate Queuing Device QoS-support diff --git a/openwrt/package/iptables/ipkg/iptables-mod-ipopt.control b/openwrt/package/iptables/ipkg/iptables-mod-ipopt.control deleted file mode 100644 index 51ec6b20ab3..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-mod-ipopt.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-mod-ipopt -Priority: optional -Section: net -Depends: iptables, kmod-ipt-ipopt -Description: Iptables (IPv4) extensions for matching/changing IP packet options diff --git a/openwrt/package/iptables/ipkg/iptables-mod-ipsec.control b/openwrt/package/iptables/ipkg/iptables-mod-ipsec.control deleted file mode 100644 index 4b4d2e63838..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-mod-ipsec.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-mod-ipsec -Priority: optional -Section: net -Depends: iptables, kmod-ipt-ipsec -Description: Iptables (IPv4) extensions for matching special IPsec packets diff --git a/openwrt/package/iptables/ipkg/iptables-mod-nat.control b/openwrt/package/iptables/ipkg/iptables-mod-nat.control deleted file mode 100644 index 2ebbb1cf772..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-mod-nat.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-mod-nat -Priority: optional -Section: net -Depends: iptables, kmod-ipt-nat -Description: Iptables (IPv4) extensions for different NAT targets diff --git a/openwrt/package/iptables/ipkg/iptables-mod-ulog.control b/openwrt/package/iptables/ipkg/iptables-mod-ulog.control deleted file mode 100644 index 3fcd26fedf8..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-mod-ulog.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-mod-ulog -Priority: optional -Section: net -Depends: iptables, kmod-ipt-ulog -Description: Iptables (IPv4) extension for user-space packet logging diff --git a/openwrt/package/iptables/ipkg/iptables-utils.control b/openwrt/package/iptables/ipkg/iptables-utils.control deleted file mode 100644 index aff5f4d7787..00000000000 --- a/openwrt/package/iptables/ipkg/iptables-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: iptables-utils -Priority: optional -Section: net -Depends: iptables -Description: iptables-save and iptables-restore for Iptables (IPv4) diff --git a/openwrt/package/iptables/ipkg/iptables.control b/openwrt/package/iptables/ipkg/iptables.control deleted file mode 100644 index 40a6523b75b..00000000000 --- a/openwrt/package/iptables/ipkg/iptables.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: iptables -Priority: optional -Section: net -Description: The netfilter firewalling software for IPv4 diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 0920f7bcf30..c2f0a345112 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -56,13 +56,13 @@ IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list -ifneq ($(BR2_PACKAGE_$(1)),) +ifneq ($(PACKAGE_$(1)),) compile-targets: $$(IPKG_$(1)) endif ifneq ($(DEVELOPER),) compile-targets: $$(IPKG_$(1)) endif -ifeq ($(BR2_PACKAGE_$(1)),y) +ifeq ($(PACKAGE_$(1)),y) install-targets: $$(INFO_$(1)) endif @@ -78,7 +78,8 @@ $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared echo "Priority: $$(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control echo "Maintainer: $$(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control echo "Architecture: $$(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control - echo "Description: $$(DESCRIPTION)" >> $$(IDIR_$(1))/CONTROL/control + echo "Description: $$(TITLE)" >> $$(IDIR_$(1))/CONTROL/control + echo "$$(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control chmod 644 $$(IDIR_$(1))/CONTROL/control for file in conffiles preinst postinst prerm postrm; do \ [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ From 1726e20c08bcf73eed02342670086df137ad12ce Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 19 Apr 2006 23:14:13 +0000 Subject: [PATCH 008/757] bugfix in package/rules.mk, add support for dumping package information with make DUMP=1 SVN-Revision: 3674 --- openwrt/package/busybox/Config.in | 32 ------------------------- openwrt/package/busybox/Makefile | 3 +++ openwrt/package/iptables/Makefile | 3 +++ openwrt/package/rules.mk | 40 ++++++++++++++++++++++++------- 4 files changed, 37 insertions(+), 41 deletions(-) delete mode 100644 openwrt/package/busybox/Config.in diff --git a/openwrt/package/busybox/Config.in b/openwrt/package/busybox/Config.in deleted file mode 100644 index e79aef7d31a..00000000000 --- a/openwrt/package/busybox/Config.in +++ /dev/null @@ -1,32 +0,0 @@ -menu "busybox........................... The Swiss Army Knife of embedded Linux" - -config BR2_PACKAGE_BUSYBOX - prompt "busybox........................... The Swiss Army Knife of embedded Linux" - bool - default y - help - The Swiss Army Knife of embedded Linux. It slices, it dices, it - makes Julian Fries. - - http://busybox.net/ - - Most people will answer Y. - -config BR2_PACKAGE_BUSYBOX_SNAPSHOT - bool "Use the daily snapshot of busybox?" - depends BR2_PACKAGE_BUSYBOX - depends CONFIG_DEVEL - default n - help - Use the latest busybox CVS snapshot instead of release. - - For fun, you should say Y. - -menu "Busybox Configuration" - depends BR2_PACKAGE_BUSYBOX - -source package/busybox/config/Config.in - -endmenu - -endmenu diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index d1ce2893542..aa6093eab72 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -19,6 +19,9 @@ CONFIGFILE:=config/Config.in SECTION:=base CATEGORY:=Base system TITLE:=Core utilities for embedded Linux +DESCRIPTION:=The Swiss Army Knife of embedded Linux. It slices, it dices, it\\\ +makes Julian Fries. +URL:=http://busybox.net endef define Build/Configure diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index ded4816b211..56ab594174b 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -20,13 +20,16 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_MENU:=IPv4 / IPv6 firewall administration include $(TOPDIR)/package/rules.mk +ifeq ($(DUMP),) include $(LINUX_DIR)/.config include $(TOPDIR)/target/linux/netfilter.mk +endif define Package/iptables SECTION:=net CATEGORY:=Base system TITLE:=IPv4 firewall administration tool +URL:=http://netfilter.org/ endef define Package/iptables-mod-conntrack diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index c2f0a345112..9f52f17c464 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -1,5 +1,9 @@ # default target +ifneq ($(DUMP),) +all: dumpinfo +else all: compile +endif define Build/DefaultTargets $(PKG_BUILD_DIR)/.prepared: @@ -71,15 +75,15 @@ IDEPEND_$(1):=$$(strip $$(DEPENDS)) $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control - echo "Version: $$(VERSION)" >> $$(IDIR_$(1))/CONTROL/control + echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control - echo "Source: $$(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control - echo "Section: $$(SECTION)" >> $$(IDIR_$(1))/CONTROL/control - echo "Priority: $$(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control - echo "Maintainer: $$(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control - echo "Architecture: $$(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control - echo "Description: $$(TITLE)" >> $$(IDIR_$(1))/CONTROL/control - echo "$$(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control + echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control + echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control + echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control + echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control + echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control + echo "Description: $(TITLE)" >> $$(IDIR_$(1))/CONTROL/control + echo "$(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control chmod 644 $$(IDIR_$(1))/CONTROL/control for file in conffiles preinst postinst prerm postrm; do \ [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ @@ -96,6 +100,18 @@ $(1)-clean: rm -f $$(IPKG_$(1)) clean: $(1)-clean +DUMPINFO += \ + echo "Package: $(1)"; \ + echo "Version: $(VERSION)"; \ + echo "Depends: $(IDEPEND_$(1))"; \ + echo "Title: $(TITLE)"; \ + echo "$(DESCRIPTION)" | sed -e 's,\\,\n,g'; \ + echo; \ + echo "$(URL)"; \ + echo "@@"; + +PACKAGES += $(1) + ifneq ($(__DEFAULT_TARGETS),1) $(eval $(call Build/DefaultTargets)) endif @@ -143,6 +159,11 @@ define Build/Compile $(call Build/Compile/Default) endef +ifneq ($(DUMP),) +dumpinfo: + $(DUMPINFO) +else + source: $(DL_DIR)/$(PKG_SOURCE) prepare: source @[ -f $(PKG_BUILD_DIR)/.prepared ] || { \ @@ -183,5 +204,6 @@ clean: @$(CMD_TRACE) "cleaning... " @$(MAKE) clean-targets $(MAKE_TRACE) rm -rf $(PKG_BUILD_DIR) +endif -.PHONY: all source prepare compile install clean +.PHONY: all source prepare compile install clean dumpinfo From 97458d0a8ec26c222a79d5869d796751faa63b2a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 19 Apr 2006 23:56:04 +0000 Subject: [PATCH 009/757] more buildroot-ng bugfixes SVN-Revision: 3675 --- openwrt/package/busybox/Makefile | 4 ++-- openwrt/package/rules.mk | 37 ++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index aa6093eab72..a5830764e5f 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -3,9 +3,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox +PKG_VERSION:=1.1.2 PKG_RELEASE:=1 -PKG_VERSION:=1.1.2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads @@ -21,7 +21,7 @@ CATEGORY:=Base system TITLE:=Core utilities for embedded Linux DESCRIPTION:=The Swiss Army Knife of embedded Linux. It slices, it dices, it\\\ makes Julian Fries. -URL:=http://busybox.net +URL:=http://busybox.net/ endef define Build/Configure diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 9f52f17c464..d40d692aa5d 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -25,7 +25,7 @@ endef endef -define BuildPackage +define Package/Default CONFIGFILE:= SECTION:=opt CATEGORY:=Extra packages @@ -37,7 +37,10 @@ PKGARCH:=$(ARCH) PRIORITY:=optional TITLE:= DESCRIPTION:= +endef +define BuildPackage +$$(eval $$(call Package/Default)) $$(eval $$(call Package/$(1))) ifeq ($$(TITLE),) @@ -71,19 +74,21 @@ install-targets: $$(INFO_$(1)) endif IDEPEND_$(1):=$$(strip $$(DEPENDS)) +CONTROLINFO_$(1) = \ + echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control; \ + echo "Version: $$(VERSION)" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "Source: $$(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "Section: $$(SECTION)" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "Priority: $$(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "Maintainer: $$(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "Architecture: $$(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "Description: $$(TITLE)" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "$$(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control; $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL - echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control - echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control - echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control - echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control - echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control - echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control - echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control - echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control - echo "Description: $(TITLE)" >> $$(IDIR_$(1))/CONTROL/control - echo "$(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control + $$(CONTROLINFO_$(1)) chmod 644 $$(IDIR_$(1))/CONTROL/control for file in conffiles preinst postinst prerm postrm; do \ [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ @@ -102,12 +107,12 @@ clean: $(1)-clean DUMPINFO += \ echo "Package: $(1)"; \ - echo "Version: $(VERSION)"; \ - echo "Depends: $(IDEPEND_$(1))"; \ - echo "Title: $(TITLE)"; \ - echo "$(DESCRIPTION)" | sed -e 's,\\,\n,g'; \ + echo "Version: $$(VERSION)"; \ + echo "Depends: $$(IDEPEND_$(1))"; \ + echo "Title: $$(TITLE)"; \ + echo "$$(DESCRIPTION)" | sed -e 's,\\,\n,g'; \ echo; \ - echo "$(URL)"; \ + echo "$$(URL)"; \ echo "@@"; PACKAGES += $(1) From e3199bd4d60038d10945b0182a834ff9a051eeec Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 20 Apr 2006 00:03:19 +0000 Subject: [PATCH 010/757] revert some previous changes and add another bugfix SVN-Revision: 3676 --- openwrt/package/rules.mk | 47 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index d40d692aa5d..8bf769d8898 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -40,8 +40,8 @@ DESCRIPTION:= endef define BuildPackage -$$(eval $$(call Package/Default)) -$$(eval $$(call Package/$(1))) +$(eval $(call Package/Default)) +$(eval $(call Package/$(1))) ifeq ($$(TITLE),) $$(error Package $(1) has no TITLE) @@ -74,21 +74,30 @@ install-targets: $$(INFO_$(1)) endif IDEPEND_$(1):=$$(strip $$(DEPENDS)) -CONTROLINFO_$(1) = \ - echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control; \ - echo "Version: $$(VERSION)" >> $$(IDIR_$(1))/CONTROL/control; \ - echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control; \ - echo "Source: $$(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control; \ - echo "Section: $$(SECTION)" >> $$(IDIR_$(1))/CONTROL/control; \ - echo "Priority: $$(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control; \ - echo "Maintainer: $$(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control; \ - echo "Architecture: $$(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control; \ - echo "Description: $$(TITLE)" >> $$(IDIR_$(1))/CONTROL/control; \ - echo "$$(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control; + +DUMPINFO += \ + echo "Package: $(1)"; \ + echo "Version: $(VERSION)"; \ + echo "Depends: $(IDEPEND_$(1))"; \ + echo "Title: $(TITLE)"; \ + echo "$(DESCRIPTION)" | sed -e 's,\\,\n,g'; \ + echo; \ + echo "$(URL)"; \ + echo "@@"; + $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL - $$(CONTROLINFO_$(1)) + echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control + echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control + echo "Depends: $(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control + echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control + echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control + echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control + echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control + echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control + echo "Description: $(TITLE)" >> $$(IDIR_$(1))/CONTROL/control + echo "$(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control chmod 644 $$(IDIR_$(1))/CONTROL/control for file in conffiles preinst postinst prerm postrm; do \ [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ @@ -105,16 +114,6 @@ $(1)-clean: rm -f $$(IPKG_$(1)) clean: $(1)-clean -DUMPINFO += \ - echo "Package: $(1)"; \ - echo "Version: $$(VERSION)"; \ - echo "Depends: $$(IDEPEND_$(1))"; \ - echo "Title: $$(TITLE)"; \ - echo "$$(DESCRIPTION)" | sed -e 's,\\,\n,g'; \ - echo; \ - echo "$$(URL)"; \ - echo "@@"; - PACKAGES += $(1) ifneq ($(__DEFAULT_TARGETS),1) From 6d35e9d0f580f95aa7a97366cf5a325543494f2d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 20 Apr 2006 00:25:17 +0000 Subject: [PATCH 011/757] add timestamp check script SVN-Revision: 3677 --- openwrt/scripts/timestamp.pl | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 openwrt/scripts/timestamp.pl diff --git a/openwrt/scripts/timestamp.pl b/openwrt/scripts/timestamp.pl new file mode 100755 index 00000000000..f6b06bc7f39 --- /dev/null +++ b/openwrt/scripts/timestamp.pl @@ -0,0 +1,40 @@ +#!/usr/bin/perl +use strict; + +sub get_ts($) { + my $path = shift; + my $ts = 0; + open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* |"; + while () { + open FILE, "<$_"; + my @stat = stat FILE; + close FILE; + $ts = $stat[9] if ($stat[9] > $ts); + } + close FIND; + return $ts; +} + +(@ARGV > 0) or push @ARGV, "."; +my $ts = 0; +my $n = "."; +my %options; +foreach my $path (@ARGV) { + if ($path =~ /^-/) { + $options{$path} = 1; + } else { + my $tmp = get_ts($path); + if ($tmp > $ts) { + $n = $path; + $ts = $tmp; + } + } +} + +if ($options{"-p"}) { + print "$n\n"; +} elsif ($options{"-t"}) { + print "$ts\n"; +} else { + print "$n\t$ts\n"; +} From 6336817a13f2b3dd95232fbbbebe513985a20294 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 20 Apr 2006 00:33:40 +0000 Subject: [PATCH 012/757] redirect find stderr to /dev/null in timestamp.pl SVN-Revision: 3678 --- openwrt/scripts/timestamp.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/scripts/timestamp.pl b/openwrt/scripts/timestamp.pl index f6b06bc7f39..10892219196 100755 --- a/openwrt/scripts/timestamp.pl +++ b/openwrt/scripts/timestamp.pl @@ -4,7 +4,7 @@ use strict; sub get_ts($) { my $path = shift; my $ts = 0; - open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* |"; + open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* 2>/dev/null |"; while () { open FILE, "<$_"; my @stat = stat FILE; From 20bd5e2b12a600298b676ed780b0017a7d65cad0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 20 Apr 2006 03:45:03 +0000 Subject: [PATCH 013/757] add proper package dependency handling SVN-Revision: 3679 --- openwrt/package/rules.mk | 55 ++++++++++++++++++++++++------------ openwrt/rules.mk | 3 ++ openwrt/scripts/timestamp.pl | 34 ++++++++++++++++------ 3 files changed, 65 insertions(+), 27 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 8bf769d8898..f64e96945b3 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -3,7 +3,6 @@ ifneq ($(DUMP),) all: dumpinfo else all: compile -endif define Build/DefaultTargets $(PKG_BUILD_DIR)/.prepared: @@ -12,18 +11,31 @@ $(PKG_BUILD_DIR)/.prepared: $(call Build/Prepare) touch $$@ -$(PKG_BUILD_DIR)/.configured: +$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared $(call Build/Configure) touch $$@ -$(PKG_BUILD_DIR)/.built: +ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) +$(PKG_BUILD_DIR)/.prepared: clean +endif + +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(call Build/Compile) touch $$@ +package-clean: + $(call Build/Clean) + rm -f $(PKG_BUILD_DIR)/.built + +package-recompile: + rm -f $(PKG_BUILD_DIR)/.built + +.PHONY: package-clean package-recompile + define Build/DefaultTargets endef endef - +endif define Package/Default CONFIGFILE:= @@ -64,15 +76,24 @@ IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list ifneq ($(PACKAGE_$(1)),) -compile-targets: $$(IPKG_$(1)) +COMPILE_$(1):=1 endif ifneq ($(DEVELOPER),) -compile-targets: $$(IPKG_$(1)) +COMPILE_$(1):=1 endif ifeq ($(PACKAGE_$(1)),y) install-targets: $$(INFO_$(1)) endif +ifneq ($$(COMPILE_$(1)),) +ifeq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$(PKG_BUILD_DIR)) +$(PKG_BUILD_DIR)/.built: package-recompile +endif + +compile-targets: $$(IPKG_$(1)) +endif + + IDEPEND_$(1):=$$(strip $$(DEPENDS)) DUMPINFO += \ @@ -97,25 +118,24 @@ $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control echo "Description: $(TITLE)" >> $$(IDIR_$(1))/CONTROL/control - echo "$(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control + echo " $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control chmod 644 $$(IDIR_$(1))/CONTROL/control for file in conffiles preinst postinst prerm postrm; do \ [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ done -$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(PACKAGE_DIR) +$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(call Package/$(1)/install,$$(IDIR_$(1))) + mkdir -p $(PACKAGE_DIR) $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) $$(INFO_$(1)): $$(IPKG_$(1)) $(IPKG) install $$(IPKG_$(1)) $(1)-clean: - rm -f $$(IPKG_$(1)) + rm -f $(PACKAGE_DIR)/$(1)_* clean: $(1)-clean -PACKAGES += $(1) - ifneq ($(__DEFAULT_TARGETS),1) $(eval $(call Build/DefaultTargets)) endif @@ -163,6 +183,10 @@ define Build/Compile $(call Build/Compile/Default) endef +define Build/Clean + $(MAKE) clean +endef + ifneq ($(DUMP),) dumpinfo: $(DUMPINFO) @@ -191,14 +215,9 @@ install: @$(CMD_TRACE) "installing... " @$(MAKE) install-targets $(MAKE_TRACE) -mostlyclean: rebuild: $(CMD_TRACE) "rebuilding... " - @-$(MAKE) mostlyclean 2>&1 >/dev/null - if [ -f $(PKG_BUILD_DIR)/.built ]; then \ - $(MAKE) clean $(MAKE_TRACE); \ - fi - $(MAKE) compile $(MAKE_TRACE) + $(MAKE) package-clean compile $(MAKE_TRACE) $(PACKAGE_DIR): mkdir -p $@ @@ -210,4 +229,4 @@ clean: rm -rf $(PKG_BUILD_DIR) endif -.PHONY: all source prepare compile install clean dumpinfo +.PHONY: all source prepare compile install clean rebuild dumpinfo compile-targets install-targets clean-targets diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 9d924a5b405..4f0f49e11ff 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -1,4 +1,7 @@ +ifeq ($(DUMP),) include $(TOPDIR)/.config +endif + SHELL=/bin/bash export SHELL diff --git a/openwrt/scripts/timestamp.pl b/openwrt/scripts/timestamp.pl index 10892219196..a4bb7ecda09 100755 --- a/openwrt/scripts/timestamp.pl +++ b/openwrt/scripts/timestamp.pl @@ -1,31 +1,47 @@ #!/usr/bin/perl use strict; -sub get_ts($) { +sub get_ts($$) { my $path = shift; + my $options = shift; my $ts = 0; - open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* 2>/dev/null |"; + my $fn = ""; + -d "$path" and $path .= "/*"; + open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* $options 2>/dev/null |"; while () { - open FILE, "<$_"; + chomp; + my $file = $_; + open FILE, "<$file"; my @stat = stat FILE; close FILE; - $ts = $stat[9] if ($stat[9] > $ts); + if ($stat[9] > $ts) { + $ts = $stat[9]; + $fn = $file; + } } close FIND; - return $ts; + return ($ts, $fn); } (@ARGV > 0) or push @ARGV, "."; my $ts = 0; my $n = "."; my %options; -foreach my $path (@ARGV) { - if ($path =~ /^-/) { +while (@ARGV > 0) { + my $path = shift @ARGV; + if ($path =~ /^-x/) { + my $str = shift @ARGV; + $options{"-x"} .= " -and -not -path \\*".$str."\\*" + } elsif ($path =~ /^-/) { $options{$path} = 1; } else { - my $tmp = get_ts($path); + my ($tmp, $fname) = get_ts($path, $options{"-x"}); if ($tmp > $ts) { - $n = $path; + if ($options{'-f'}) { + $n = $fname; + } else { + $n = $path; + } $ts = $tmp; } } From 4870d7e8876b6aef4590571315dc5a9b7b1af6ea Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 20 Apr 2006 03:53:28 +0000 Subject: [PATCH 014/757] work around a make bug in define/endef handling SVN-Revision: 3680 --- openwrt/package/rules.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index f64e96945b3..ac9b98d74c4 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -1,8 +1,8 @@ -# default target ifneq ($(DUMP),) all: dumpinfo else all: compile +endif define Build/DefaultTargets $(PKG_BUILD_DIR)/.prepared: @@ -35,7 +35,6 @@ package-recompile: define Build/DefaultTargets endef endef -endif define Package/Default CONFIGFILE:= From 43ebd5a027a96bc548c03ca308df05a6926d5e91 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 20 Apr 2006 20:17:34 +0000 Subject: [PATCH 015/757] add kconfig from linux 2.6 to scripts/config SVN-Revision: 3682 --- openwrt/scripts/config/Makefile | 49 + openwrt/scripts/config/conf.c | 626 +++++ openwrt/scripts/config/confdata.c | 530 ++++ openwrt/scripts/config/expr.c | 1099 ++++++++ openwrt/scripts/config/expr.h | 194 ++ openwrt/scripts/config/kconfig_load.c | 35 + openwrt/scripts/config/lex.backup | 1 + openwrt/scripts/config/lex.zconf.c_shipped | 2317 +++++++++++++++++ openwrt/scripts/config/lkc.h | 147 ++ openwrt/scripts/config/lkc_proto.h | 41 + .../scripts/config/lxdialog/BIG.FAT.WARNING | 4 + openwrt/scripts/config/lxdialog/Makefile | 20 + .../scripts/config/lxdialog/check-lxdialog.sh | 84 + openwrt/scripts/config/lxdialog/checklist.c | 334 +++ openwrt/scripts/config/lxdialog/colors.h | 154 ++ openwrt/scripts/config/lxdialog/dialog.h | 177 ++ openwrt/scripts/config/lxdialog/inputbox.c | 224 ++ openwrt/scripts/config/lxdialog/lxdialog.c | 204 ++ openwrt/scripts/config/lxdialog/menubox.c | 425 +++ openwrt/scripts/config/lxdialog/msgbox.c | 71 + openwrt/scripts/config/lxdialog/textbox.c | 533 ++++ openwrt/scripts/config/lxdialog/util.c | 362 +++ openwrt/scripts/config/lxdialog/yesno.c | 102 + openwrt/scripts/config/mconf.c | 1098 ++++++++ openwrt/scripts/config/menu.c | 397 +++ openwrt/scripts/config/symbol.c | 882 +++++++ openwrt/scripts/config/util.c | 109 + openwrt/scripts/config/zconf.gperf | 43 + openwrt/scripts/config/zconf.hash.c_shipped | 231 ++ openwrt/scripts/config/zconf.l | 350 +++ openwrt/scripts/config/zconf.tab.c_shipped | 2146 +++++++++++++++ openwrt/scripts/config/zconf.y | 681 +++++ 32 files changed, 13670 insertions(+) create mode 100644 openwrt/scripts/config/Makefile create mode 100644 openwrt/scripts/config/conf.c create mode 100644 openwrt/scripts/config/confdata.c create mode 100644 openwrt/scripts/config/expr.c create mode 100644 openwrt/scripts/config/expr.h create mode 100644 openwrt/scripts/config/kconfig_load.c create mode 100644 openwrt/scripts/config/lex.backup create mode 100644 openwrt/scripts/config/lex.zconf.c_shipped create mode 100644 openwrt/scripts/config/lkc.h create mode 100644 openwrt/scripts/config/lkc_proto.h create mode 100644 openwrt/scripts/config/lxdialog/BIG.FAT.WARNING create mode 100644 openwrt/scripts/config/lxdialog/Makefile create mode 100644 openwrt/scripts/config/lxdialog/check-lxdialog.sh create mode 100644 openwrt/scripts/config/lxdialog/checklist.c create mode 100644 openwrt/scripts/config/lxdialog/colors.h create mode 100644 openwrt/scripts/config/lxdialog/dialog.h create mode 100644 openwrt/scripts/config/lxdialog/inputbox.c create mode 100644 openwrt/scripts/config/lxdialog/lxdialog.c create mode 100644 openwrt/scripts/config/lxdialog/menubox.c create mode 100644 openwrt/scripts/config/lxdialog/msgbox.c create mode 100644 openwrt/scripts/config/lxdialog/textbox.c create mode 100644 openwrt/scripts/config/lxdialog/util.c create mode 100644 openwrt/scripts/config/lxdialog/yesno.c create mode 100644 openwrt/scripts/config/mconf.c create mode 100644 openwrt/scripts/config/menu.c create mode 100644 openwrt/scripts/config/symbol.c create mode 100644 openwrt/scripts/config/util.c create mode 100644 openwrt/scripts/config/zconf.gperf create mode 100644 openwrt/scripts/config/zconf.hash.c_shipped create mode 100644 openwrt/scripts/config/zconf.l create mode 100644 openwrt/scripts/config/zconf.tab.c_shipped create mode 100644 openwrt/scripts/config/zconf.y diff --git a/openwrt/scripts/config/Makefile b/openwrt/scripts/config/Makefile new file mode 100644 index 00000000000..04e8330a01d --- /dev/null +++ b/openwrt/scripts/config/Makefile @@ -0,0 +1,49 @@ +# =========================================================================== +# Kernel configuration targets +# These targets are used from top-level makefile + +# =========================================================================== +# Shared Makefile for the various kconfig executables: +# conf: Used for defconfig, oldconfig and related targets +# mconf: Used for the mconfig target. +# Utilizes the lxdialog package +# object files used by all kconfig flavours + +conf-objs := conf.o zconf.tab.o +mconf-objs := mconf.o zconf.tab.o + +clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ + .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c + +all: conf mconf lxdialog + +.PHONY: lxdialog +lxdialog: + $(MAKE) -C lxdialog + +conf: $(conf-objs) +mconf: $(mconf-objs) + +clean: + rm -f *.o $(clean-files) conf mconf + $(MAKE) -C lxdialog clean + +zconf.tab.o: lex.zconf.c zconf.hash.c + +kconfig_load.o: lkc_defs.h + +lkc_defs.h: $(src)/lkc_proto.h + sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' + +zconf.tab.c: zconf.y +lex.zconf.c: zconf.l +zconf.hash.c: zconf.gperf + +%.tab.c: %.y + bison -l -b $* -p $(notdir $*) $< && cp $@ $@_shipped || cp $@_shipped $@ + +lex.%.c: %.l + flex -L -P$(notdir $*) -o$@ $< && cp $@ $@_shipped || cp $@_shipped $@ + +%.hash.c: %.gperf + gperf < $< > $@ && cp $@ $@_shipped || cp $@_shipped $@ diff --git a/openwrt/scripts/config/conf.c b/openwrt/scripts/config/conf.c new file mode 100644 index 00000000000..10eeae53d82 --- /dev/null +++ b/openwrt/scripts/config/conf.c @@ -0,0 +1,626 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +static void conf(struct menu *menu); +static void check_conf(struct menu *menu); + +enum { + ask_all, + ask_new, + ask_silent, + set_default, + set_yes, + set_mod, + set_no, + set_random +} input_mode = ask_all; +char *defconfig_file; + +static int indent = 1; +static int valid_stdin = 1; +static int conf_cnt; +static char line[128]; +static struct menu *rootEntry; + +static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); + +static void strip(char *str) +{ + char *p = str; + int l; + + while ((isspace(*p))) + p++; + l = strlen(p); + if (p != str) + memmove(str, p, l + 1); + if (!l) + return; + p = str + l - 1; + while ((isspace(*p))) + *p-- = 0; +} + +static void check_stdin(void) +{ + if (!valid_stdin && input_mode == ask_silent) { + printf(_("aborted!\n\n")); + printf(_("Console input/output is redirected. ")); + printf(_("Run 'make oldconfig' to update configuration.\n\n")); + exit(1); + } +} + +static char *fgets_check_stream(char *s, int size, FILE *stream) +{ + char *ret = fgets(s, size, stream); + + if (ret == NULL && feof(stream)) { + printf(_("aborted!\n\n")); + printf(_("Console input is closed. ")); + printf(_("Run 'make oldconfig' to update configuration.\n\n")); + exit(1); + } + + return ret; +} + +static void conf_askvalue(struct symbol *sym, const char *def) +{ + enum symbol_type type = sym_get_type(sym); + tristate val; + + if (!sym_has_value(sym)) + printf("(NEW) "); + + line[0] = '\n'; + line[1] = 0; + + if (!sym_is_changable(sym)) { + printf("%s\n", def); + line[0] = '\n'; + line[1] = 0; + return; + } + + switch (input_mode) { + case set_no: + case set_mod: + case set_yes: + case set_random: + if (sym_has_value(sym)) { + printf("%s\n", def); + return; + } + break; + case ask_new: + case ask_silent: + if (sym_has_value(sym)) { + printf("%s\n", def); + return; + } + check_stdin(); + case ask_all: + fflush(stdout); + fgets_check_stream(line, 128, stdin); + return; + case set_default: + printf("%s\n", def); + return; + default: + break; + } + + switch (type) { + case S_INT: + case S_HEX: + case S_STRING: + printf("%s\n", def); + return; + default: + ; + } + switch (input_mode) { + case set_yes: + if (sym_tristate_within_range(sym, yes)) { + line[0] = 'y'; + line[1] = '\n'; + line[2] = 0; + break; + } + case set_mod: + if (type == S_TRISTATE) { + if (sym_tristate_within_range(sym, mod)) { + line[0] = 'm'; + line[1] = '\n'; + line[2] = 0; + break; + } + } else { + if (sym_tristate_within_range(sym, yes)) { + line[0] = 'y'; + line[1] = '\n'; + line[2] = 0; + break; + } + } + case set_no: + if (sym_tristate_within_range(sym, no)) { + line[0] = 'n'; + line[1] = '\n'; + line[2] = 0; + break; + } + case set_random: + do { + val = (tristate)(random() % 3); + } while (!sym_tristate_within_range(sym, val)); + switch (val) { + case no: line[0] = 'n'; break; + case mod: line[0] = 'm'; break; + case yes: line[0] = 'y'; break; + } + line[1] = '\n'; + line[2] = 0; + break; + default: + break; + } + printf("%s", line); +} + +int conf_string(struct menu *menu) +{ + struct symbol *sym = menu->sym; + const char *def, *help; + + while (1) { + printf("%*s%s ", indent - 1, "", menu->prompt->text); + printf("(%s) ", sym->name); + def = sym_get_string_value(sym); + if (sym_get_string_value(sym)) + printf("[%s] ", def); + conf_askvalue(sym, def); + switch (line[0]) { + case '\n': + break; + case '?': + /* print help */ + if (line[1] == '\n') { + help = nohelp_text; + if (menu->sym->help) + help = menu->sym->help; + printf("\n%s\n", menu->sym->help); + def = NULL; + break; + } + default: + line[strlen(line)-1] = 0; + def = line; + } + if (def && sym_set_string_value(sym, def)) + return 0; + } +} + +static int conf_sym(struct menu *menu) +{ + struct symbol *sym = menu->sym; + int type; + tristate oldval, newval; + const char *help; + + while (1) { + printf("%*s%s ", indent - 1, "", menu->prompt->text); + if (sym->name) + printf("(%s) ", sym->name); + type = sym_get_type(sym); + putchar('['); + oldval = sym_get_tristate_value(sym); + switch (oldval) { + case no: + putchar('N'); + break; + case mod: + putchar('M'); + break; + case yes: + putchar('Y'); + break; + } + if (oldval != no && sym_tristate_within_range(sym, no)) + printf("/n"); + if (oldval != mod && sym_tristate_within_range(sym, mod)) + printf("/m"); + if (oldval != yes && sym_tristate_within_range(sym, yes)) + printf("/y"); + if (sym->help) + printf("/?"); + printf("] "); + conf_askvalue(sym, sym_get_string_value(sym)); + strip(line); + + switch (line[0]) { + case 'n': + case 'N': + newval = no; + if (!line[1] || !strcmp(&line[1], "o")) + break; + continue; + case 'm': + case 'M': + newval = mod; + if (!line[1]) + break; + continue; + case 'y': + case 'Y': + newval = yes; + if (!line[1] || !strcmp(&line[1], "es")) + break; + continue; + case 0: + newval = oldval; + break; + case '?': + goto help; + default: + continue; + } + if (sym_set_tristate_value(sym, newval)) + return 0; +help: + help = nohelp_text; + if (sym->help) + help = sym->help; + printf("\n%s\n", help); + } +} + +static int conf_choice(struct menu *menu) +{ + struct symbol *sym, *def_sym; + struct menu *child; + int type; + bool is_new; + + sym = menu->sym; + type = sym_get_type(sym); + is_new = !sym_has_value(sym); + if (sym_is_changable(sym)) { + conf_sym(menu); + sym_calc_value(sym); + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + return 0; + case yes: + break; + } + } else { + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); + return 0; + case yes: + break; + } + } + + while (1) { + int cnt, def; + + printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); + def_sym = sym_get_choice_value(sym); + cnt = def = 0; + line[0] = '0'; + line[1] = 0; + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + if (!child->sym) { + printf("%*c %s\n", indent, '*', menu_get_prompt(child)); + continue; + } + cnt++; + if (child->sym == def_sym) { + def = cnt; + printf("%*c", indent, '>'); + } else + printf("%*c", indent, ' '); + printf(" %d. %s", cnt, menu_get_prompt(child)); + if (child->sym->name) + printf(" (%s)", child->sym->name); + if (!sym_has_value(child->sym)) + printf(" (NEW)"); + printf("\n"); + } + printf("%*schoice", indent - 1, ""); + if (cnt == 1) { + printf("[1]: 1\n"); + goto conf_childs; + } + printf("[1-%d", cnt); + if (sym->help) + printf("?"); + printf("]: "); + switch (input_mode) { + case ask_new: + case ask_silent: + if (!is_new) { + cnt = def; + printf("%d\n", cnt); + break; + } + check_stdin(); + case ask_all: + fflush(stdout); + fgets_check_stream(line, 128, stdin); + strip(line); + if (line[0] == '?') { + printf("\n%s\n", menu->sym->help ? + menu->sym->help : nohelp_text); + continue; + } + if (!line[0]) + cnt = def; + else if (isdigit(line[0])) + cnt = atoi(line); + else + continue; + break; + case set_random: + def = (random() % cnt) + 1; + case set_default: + case set_yes: + case set_mod: + case set_no: + cnt = def; + printf("%d\n", cnt); + break; + } + + conf_childs: + for (child = menu->list; child; child = child->next) { + if (!child->sym || !menu_is_visible(child)) + continue; + if (!--cnt) + break; + } + if (!child) + continue; + if (line[strlen(line) - 1] == '?') { + printf("\n%s\n", child->sym->help ? + child->sym->help : nohelp_text); + continue; + } + sym_set_choice_value(sym, child->sym); + if (child->list) { + indent += 2; + conf(child->list); + indent -= 2; + } + return 1; + } +} + +static void conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + prop = menu->prompt; + if (prop) { + const char *prompt; + + switch (prop->type) { + case P_MENU: + if (input_mode == ask_silent && rootEntry != menu) { + check_conf(menu); + return; + } + case P_COMMENT: + prompt = menu_get_prompt(menu); + if (prompt) + printf("%*c\n%*c %s\n%*c\n", + indent, '*', + indent, '*', prompt, + indent, '*'); + default: + ; + } + } + + if (!sym) + goto conf_childs; + + if (sym_is_choice(sym)) { + conf_choice(menu); + if (sym->curr.tri != mod) + return; + goto conf_childs; + } + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + conf_string(menu); + break; + default: + conf_sym(menu); + break; + } + +conf_childs: + if (sym) + indent += 2; + for (child = menu->list; child; child = child->next) + conf(child); + if (sym) + indent -= 2; +} + +static void check_conf(struct menu *menu) +{ + struct symbol *sym; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + if (sym && !sym_has_value(sym)) { + if (sym_is_changable(sym) || + (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { + if (!conf_cnt++) + printf(_("*\n* Restart config...\n*\n")); + rootEntry = menu_get_parent_menu(menu); + conf(rootEntry); + } + } + + for (child = menu->list; child; child = child->next) + check_conf(child); +} + +int main(int ac, char **av) +{ + int i = 1; + const char *name; + struct stat tmpstat; + + if (ac > i && av[i][0] == '-') { + switch (av[i++][1]) { + case 'o': + input_mode = ask_new; + break; + case 's': + input_mode = ask_silent; + valid_stdin = isatty(0) && isatty(1) && isatty(2); + break; + case 'd': + input_mode = set_default; + break; + case 'D': + input_mode = set_default; + defconfig_file = av[i++]; + if (!defconfig_file) { + printf(_("%s: No default config file specified\n"), + av[0]); + exit(1); + } + break; + case 'n': + input_mode = set_no; + break; + case 'm': + input_mode = set_mod; + break; + case 'y': + input_mode = set_yes; + break; + case 'r': + input_mode = set_random; + srandom(time(NULL)); + break; + case 'h': + case '?': + printf("%s [-o|-s] config\n", av[0]); + exit(0); + } + } + name = av[i]; + if (!name) { + printf(_("%s: Kconfig file missing\n"), av[0]); + } + conf_parse(name); + //zconfdump(stdout); + switch (input_mode) { + case set_default: + if (!defconfig_file) + defconfig_file = conf_get_default_confname(); + if (conf_read(defconfig_file)) { + printf("***\n" + "*** Can't find default configuration \"%s\"!\n" + "***\n", defconfig_file); + exit(1); + } + break; + case ask_silent: + if (stat(".config", &tmpstat)) { + printf(_("***\n" + "*** You have not yet configured your kernel!\n" + "***\n" + "*** Please run some configurator (e.g. \"make oldconfig\" or\n" + "*** \"make menuconfig\" or \"make xconfig\").\n" + "***\n")); + exit(1); + } + case ask_all: + case ask_new: + conf_read(NULL); + break; + case set_no: + case set_mod: + case set_yes: + case set_random: + name = getenv("KCONFIG_ALLCONFIG"); + if (name && !stat(name, &tmpstat)) { + conf_read_simple(name); + break; + } + switch (input_mode) { + case set_no: name = "allno.config"; break; + case set_mod: name = "allmod.config"; break; + case set_yes: name = "allyes.config"; break; + case set_random: name = "allrandom.config"; break; + default: break; + } + if (!stat(name, &tmpstat)) + conf_read_simple(name); + else if (!stat("all.config", &tmpstat)) + conf_read_simple("all.config"); + break; + default: + break; + } + + if (input_mode != ask_silent) { + rootEntry = &rootmenu; + conf(&rootmenu); + if (input_mode == ask_all) { + input_mode = ask_silent; + valid_stdin = 1; + } + } + do { + conf_cnt = 0; + check_conf(&rootmenu); + } while (conf_cnt); + if (conf_write(NULL)) { + fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); + return 1; + } + return 0; +} diff --git a/openwrt/scripts/config/confdata.c b/openwrt/scripts/config/confdata.c new file mode 100644 index 00000000000..b0cbbe2e41b --- /dev/null +++ b/openwrt/scripts/config/confdata.c @@ -0,0 +1,530 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +static void conf_warning(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); + +static const char *conf_filename; +static int conf_lineno, conf_warnings, conf_unsaved; + +const char conf_def_filename[] = ".config"; + +const char conf_defname[] = "arch/$ARCH/defconfig"; + +const char *conf_confnames[] = { + ".config", + "/lib/modules/$UNAME_RELEASE/.config", + "/etc/kernel-config", + "/boot/config-$UNAME_RELEASE", + conf_defname, + NULL, +}; + +static void conf_warning(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", conf_filename, conf_lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); + conf_warnings++; +} + +static char *conf_expand_value(const char *in) +{ + struct symbol *sym; + const char *src; + static char res_value[SYMBOL_MAXLENGTH]; + char *dst, name[SYMBOL_MAXLENGTH]; + + res_value[0] = 0; + dst = name; + while ((src = strchr(in, '$'))) { + strncat(res_value, in, src - in); + src++; + dst = name; + while (isalnum(*src) || *src == '_') + *dst++ = *src++; + *dst = 0; + sym = sym_lookup(name, 0); + sym_calc_value(sym); + strcat(res_value, sym_get_string_value(sym)); + in = src; + } + strcat(res_value, in); + + return res_value; +} + +char *conf_get_default_confname(void) +{ + struct stat buf; + static char fullname[PATH_MAX+1]; + char *env, *name; + + name = conf_expand_value(conf_defname); + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + if (!stat(fullname, &buf)) + return fullname; + } + return name; +} + +int conf_read_simple(const char *name) +{ + FILE *in = NULL; + char line[1024]; + char *p, *p2; + struct symbol *sym; + int i; + + if (name) { + in = zconf_fopen(name); + } else { + const char **names = conf_confnames; + while ((name = *names++)) { + name = conf_expand_value(name); + in = zconf_fopen(name); + if (in) { + printf(_("#\n" + "# using defaults found in %s\n" + "#\n"), name); + break; + } + } + } + if (!in) + return 1; + + conf_filename = name; + conf_lineno = 0; + conf_warnings = 0; + conf_unsaved = 0; + + for_all_symbols(i, sym) { + sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED; + if (sym_is_choice(sym)) + sym->flags &= ~SYMBOL_NEW; + sym->flags &= ~SYMBOL_VALID; + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + if (sym->user.val) + free(sym->user.val); + default: + sym->user.val = NULL; + sym->user.tri = no; + } + } + + while (fgets(line, sizeof(line), in)) { + conf_lineno++; + sym = NULL; + switch (line[0]) { + case '#': + if (memcmp(line + 2, "CONFIG_", 7)) + continue; + p = strchr(line + 9, ' '); + if (!p) + continue; + *p++ = 0; + if (strncmp(p, "is not set", 10)) + continue; + sym = sym_find(line + 9); + if (!sym) { + conf_warning("trying to assign nonexistent symbol %s", line + 9); + break; + } else if (!(sym->flags & SYMBOL_NEW)) { + conf_warning("trying to reassign symbol %s", sym->name); + break; + } + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + sym->user.tri = no; + sym->flags &= ~SYMBOL_NEW; + break; + default: + ; + } + break; + case 'C': + if (memcmp(line, "CONFIG_", 7)) { + conf_warning("unexpected data"); + continue; + } + p = strchr(line + 7, '='); + if (!p) + continue; + *p++ = 0; + p2 = strchr(p, '\n'); + if (p2) + *p2 = 0; + sym = sym_find(line + 7); + if (!sym) { + conf_warning("trying to assign nonexistent symbol %s", line + 7); + break; + } else if (!(sym->flags & SYMBOL_NEW)) { + conf_warning("trying to reassign symbol %s", sym->name); + break; + } + switch (sym->type) { + case S_TRISTATE: + if (p[0] == 'm') { + sym->user.tri = mod; + sym->flags &= ~SYMBOL_NEW; + break; + } + case S_BOOLEAN: + if (p[0] == 'y') { + sym->user.tri = yes; + sym->flags &= ~SYMBOL_NEW; + break; + } + if (p[0] == 'n') { + sym->user.tri = no; + sym->flags &= ~SYMBOL_NEW; + break; + } + conf_warning("symbol value '%s' invalid for %s", p, sym->name); + break; + case S_STRING: + if (*p++ != '"') + break; + for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { + if (*p2 == '"') { + *p2 = 0; + break; + } + memmove(p2, p2 + 1, strlen(p2)); + } + if (!p2) { + conf_warning("invalid string found"); + continue; + } + case S_INT: + case S_HEX: + if (sym_string_valid(sym, p)) { + sym->user.val = strdup(p); + sym->flags &= ~SYMBOL_NEW; + } else { + conf_warning("symbol value '%s' invalid for %s", p, sym->name); + continue; + } + break; + default: + ; + } + break; + case '\n': + break; + default: + conf_warning("unexpected data"); + continue; + } + if (sym && sym_is_choice_value(sym)) { + struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); + switch (sym->user.tri) { + case no: + break; + case mod: + if (cs->user.tri == yes) { + conf_warning("%s creates inconsistent choice state", sym->name); + cs->flags |= SYMBOL_NEW; + } + break; + case yes: + if (cs->user.tri != no) { + conf_warning("%s creates inconsistent choice state", sym->name); + cs->flags |= SYMBOL_NEW; + } else + cs->user.val = sym; + break; + } + cs->user.tri = E_OR(cs->user.tri, sym->user.tri); + } + } + fclose(in); + + if (modules_sym) + sym_calc_value(modules_sym); + return 0; +} + +int conf_read(const char *name) +{ + struct symbol *sym; + struct property *prop; + struct expr *e; + int i; + + if (conf_read_simple(name)) + return 1; + + for_all_symbols(i, sym) { + sym_calc_value(sym); + if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO)) + goto sym_ok; + if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { + /* check that calculated value agrees with saved value */ + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym->user.tri != sym_get_tristate_value(sym)) + break; + if (!sym_is_choice(sym)) + goto sym_ok; + default: + if (!strcmp(sym->curr.val, sym->user.val)) + goto sym_ok; + break; + } + } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE)) + /* no previous value and not saved */ + goto sym_ok; + conf_unsaved++; + /* maybe print value in verbose mode... */ + sym_ok: + if (sym_has_value(sym) && !sym_is_choice_value(sym)) { + if (sym->visible == no) + sym->flags |= SYMBOL_NEW; + switch (sym->type) { + case S_STRING: + case S_INT: + case S_HEX: + if (!sym_string_within_range(sym, sym->user.val)) { + sym->flags |= SYMBOL_NEW; + sym->flags &= ~SYMBOL_VALID; + } + default: + break; + } + } + if (!sym_is_choice(sym)) + continue; + prop = sym_get_choice_prop(sym); + for (e = prop->expr; e; e = e->left.expr) + if (e->right.sym->visible != no) + sym->flags |= e->right.sym->flags & SYMBOL_NEW; + } + + sym_change_count = conf_warnings && conf_unsaved; + + return 0; +} + +int conf_write(const char *name) +{ + FILE *out, *out_h; + struct symbol *sym; + struct menu *menu; + const char *basename; + char dirname[128], tmpname[128], newname[128]; + int type, l; + const char *str; + time_t now; + int use_timestamp = 1; + char *env; + + dirname[0] = 0; + if (name && name[0]) { + struct stat st; + char *slash; + + if (!stat(name, &st) && S_ISDIR(st.st_mode)) { + strcpy(dirname, name); + strcat(dirname, "/"); + basename = conf_def_filename; + } else if ((slash = strrchr(name, '/'))) { + int size = slash - name + 1; + memcpy(dirname, name, size); + dirname[size] = 0; + if (slash[1]) + basename = slash + 1; + else + basename = conf_def_filename; + } else + basename = name; + } else + basename = conf_def_filename; + + sprintf(newname, "%s.tmpconfig.%d", dirname, (int)getpid()); + out = fopen(newname, "w"); + if (!out) + return 1; + out_h = NULL; + if (!name) { + out_h = fopen(".tmpconfig.h", "w"); + if (!out_h) + return 1; + } + sym = sym_lookup("KERNELVERSION", 0); + sym_calc_value(sym); + time(&now); + env = getenv("KCONFIG_NOTIMESTAMP"); + if (env && *env) + use_timestamp = 0; + + fprintf(out, _("#\n" + "# Automatically generated make config: don't edit\n" + "# Linux kernel version: %s\n" + "%s%s" + "#\n"), + sym_get_string_value(sym), + use_timestamp ? "# " : "", + use_timestamp ? ctime(&now) : ""); + if (out_h) + fprintf(out_h, "/*\n" + " * Automatically generated C config: don't edit\n" + " * Linux kernel version: %s\n" + "%s%s" + " */\n" + "#define AUTOCONF_INCLUDED\n", + sym_get_string_value(sym), + use_timestamp ? " * " : "", + use_timestamp ? ctime(&now) : ""); + + if (!sym_change_count) + sym_clear_all_valid(); + + menu = rootmenu.list; + while (menu) { + sym = menu->sym; + if (!sym) { + if (!menu_is_visible(menu)) + goto next; + str = menu_get_prompt(menu); + fprintf(out, "\n" + "#\n" + "# %s\n" + "#\n", str); + if (out_h) + fprintf(out_h, "\n" + "/*\n" + " * %s\n" + " */\n", str); + } else if (!(sym->flags & SYMBOL_CHOICE)) { + sym_calc_value(sym); + if (!(sym->flags & SYMBOL_WRITE)) + goto next; + sym->flags &= ~SYMBOL_WRITE; + type = sym->type; + if (type == S_TRISTATE) { + sym_calc_value(modules_sym); + if (modules_sym->curr.tri == no) + type = S_BOOLEAN; + } + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + switch (sym_get_tristate_value(sym)) { + case no: + fprintf(out, "# CONFIG_%s is not set\n", sym->name); + if (out_h) + fprintf(out_h, "#undef CONFIG_%s\n", sym->name); + break; + case mod: + fprintf(out, "CONFIG_%s=m\n", sym->name); + if (out_h) + fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name); + break; + case yes: + fprintf(out, "CONFIG_%s=y\n", sym->name); + if (out_h) + fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); + break; + } + break; + case S_STRING: + // fix me + str = sym_get_string_value(sym); + fprintf(out, "CONFIG_%s=\"", sym->name); + if (out_h) + fprintf(out_h, "#define CONFIG_%s \"", sym->name); + do { + l = strcspn(str, "\"\\"); + if (l) { + fwrite(str, l, 1, out); + if (out_h) + fwrite(str, l, 1, out_h); + } + str += l; + while (*str == '\\' || *str == '"') { + fprintf(out, "\\%c", *str); + if (out_h) + fprintf(out_h, "\\%c", *str); + str++; + } + } while (*str); + fputs("\"\n", out); + if (out_h) + fputs("\"\n", out_h); + break; + case S_HEX: + str = sym_get_string_value(sym); + if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { + fprintf(out, "CONFIG_%s=%s\n", sym->name, str); + if (out_h) + fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str); + break; + } + case S_INT: + str = sym_get_string_value(sym); + fprintf(out, "CONFIG_%s=%s\n", sym->name, str); + if (out_h) + fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str); + break; + } + } + + next: + if (menu->list) { + menu = menu->list; + continue; + } + if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->next) { + menu = menu->next; + break; + } + } + } + fclose(out); + if (out_h) { + fclose(out_h); + rename(".tmpconfig.h", "include/linux/autoconf.h"); + file_write_dep(NULL); + } + if (!name || basename != conf_def_filename) { + if (!name) + name = conf_def_filename; + sprintf(tmpname, "%s.old", name); + rename(name, tmpname); + } + sprintf(tmpname, "%s%s", dirname, basename); + if (rename(newname, tmpname)) + return 1; + + sym_change_count = 0; + + return 0; +} diff --git a/openwrt/scripts/config/expr.c b/openwrt/scripts/config/expr.c new file mode 100644 index 00000000000..30e4f9d69c2 --- /dev/null +++ b/openwrt/scripts/config/expr.c @@ -0,0 +1,1099 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +#define DEBUG_EXPR 0 + +struct expr *expr_alloc_symbol(struct symbol *sym) +{ + struct expr *e = malloc(sizeof(*e)); + memset(e, 0, sizeof(*e)); + e->type = E_SYMBOL; + e->left.sym = sym; + return e; +} + +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) +{ + struct expr *e = malloc(sizeof(*e)); + memset(e, 0, sizeof(*e)); + e->type = type; + e->left.expr = ce; + return e; +} + +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) +{ + struct expr *e = malloc(sizeof(*e)); + memset(e, 0, sizeof(*e)); + e->type = type; + e->left.expr = e1; + e->right.expr = e2; + return e; +} + +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) +{ + struct expr *e = malloc(sizeof(*e)); + memset(e, 0, sizeof(*e)); + e->type = type; + e->left.sym = s1; + e->right.sym = s2; + return e; +} + +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2) +{ + if (!e1) + return e2; + return e2 ? expr_alloc_two(E_AND, e1, e2) : e1; +} + +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2) +{ + if (!e1) + return e2; + return e2 ? expr_alloc_two(E_OR, e1, e2) : e1; +} + +struct expr *expr_copy(struct expr *org) +{ + struct expr *e; + + if (!org) + return NULL; + + e = malloc(sizeof(*org)); + memcpy(e, org, sizeof(*org)); + switch (org->type) { + case E_SYMBOL: + e->left = org->left; + break; + case E_NOT: + e->left.expr = expr_copy(org->left.expr); + break; + case E_EQUAL: + case E_UNEQUAL: + e->left.sym = org->left.sym; + e->right.sym = org->right.sym; + break; + case E_AND: + case E_OR: + case E_CHOICE: + e->left.expr = expr_copy(org->left.expr); + e->right.expr = expr_copy(org->right.expr); + break; + default: + printf("can't copy type %d\n", e->type); + free(e); + e = NULL; + break; + } + + return e; +} + +void expr_free(struct expr *e) +{ + if (!e) + return; + + switch (e->type) { + case E_SYMBOL: + break; + case E_NOT: + expr_free(e->left.expr); + return; + case E_EQUAL: + case E_UNEQUAL: + break; + case E_OR: + case E_AND: + expr_free(e->left.expr); + expr_free(e->right.expr); + break; + default: + printf("how to free type %d?\n", e->type); + break; + } + free(e); +} + +static int trans_count; + +#define e1 (*ep1) +#define e2 (*ep2) + +static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ + if (e1->type == type) { + __expr_eliminate_eq(type, &e1->left.expr, &e2); + __expr_eliminate_eq(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + __expr_eliminate_eq(type, &e1, &e2->left.expr); + __expr_eliminate_eq(type, &e1, &e2->right.expr); + return; + } + if (e1->type == E_SYMBOL && e2->type == E_SYMBOL && + e1->left.sym == e2->left.sym && (e1->left.sym->flags & (SYMBOL_YES|SYMBOL_NO))) + return; + if (!expr_eq(e1, e2)) + return; + trans_count++; + expr_free(e1); expr_free(e2); + switch (type) { + case E_OR: + e1 = expr_alloc_symbol(&symbol_no); + e2 = expr_alloc_symbol(&symbol_no); + break; + case E_AND: + e1 = expr_alloc_symbol(&symbol_yes); + e2 = expr_alloc_symbol(&symbol_yes); + break; + default: + ; + } +} + +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2) +{ + if (!e1 || !e2) + return; + switch (e1->type) { + case E_OR: + case E_AND: + __expr_eliminate_eq(e1->type, ep1, ep2); + default: + ; + } + if (e1->type != e2->type) switch (e2->type) { + case E_OR: + case E_AND: + __expr_eliminate_eq(e2->type, ep1, ep2); + default: + ; + } + e1 = expr_eliminate_yn(e1); + e2 = expr_eliminate_yn(e2); +} + +#undef e1 +#undef e2 + +int expr_eq(struct expr *e1, struct expr *e2) +{ + int res, old_count; + + if (e1->type != e2->type) + return 0; + switch (e1->type) { + case E_EQUAL: + case E_UNEQUAL: + return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; + case E_SYMBOL: + return e1->left.sym == e2->left.sym; + case E_NOT: + return expr_eq(e1->left.expr, e2->left.expr); + case E_AND: + case E_OR: + e1 = expr_copy(e1); + e2 = expr_copy(e2); + old_count = trans_count; + expr_eliminate_eq(&e1, &e2); + res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL && + e1->left.sym == e2->left.sym); + expr_free(e1); + expr_free(e2); + trans_count = old_count; + return res; + case E_CHOICE: + case E_RANGE: + case E_NONE: + /* panic */; + } + + if (DEBUG_EXPR) { + expr_fprint(e1, stdout); + printf(" = "); + expr_fprint(e2, stdout); + printf(" ?\n"); + } + + return 0; +} + +struct expr *expr_eliminate_yn(struct expr *e) +{ + struct expr *tmp; + + if (e) switch (e->type) { + case E_AND: + e->left.expr = expr_eliminate_yn(e->left.expr); + e->right.expr = expr_eliminate_yn(e->right.expr); + if (e->left.expr->type == E_SYMBOL) { + if (e->left.expr->left.sym == &symbol_no) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.expr = NULL; + return e; + } else if (e->left.expr->left.sym == &symbol_yes) { + free(e->left.expr); + tmp = e->right.expr; + *e = *(e->right.expr); + free(tmp); + return e; + } + } + if (e->right.expr->type == E_SYMBOL) { + if (e->right.expr->left.sym == &symbol_no) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.expr = NULL; + return e; + } else if (e->right.expr->left.sym == &symbol_yes) { + free(e->right.expr); + tmp = e->left.expr; + *e = *(e->left.expr); + free(tmp); + return e; + } + } + break; + case E_OR: + e->left.expr = expr_eliminate_yn(e->left.expr); + e->right.expr = expr_eliminate_yn(e->right.expr); + if (e->left.expr->type == E_SYMBOL) { + if (e->left.expr->left.sym == &symbol_no) { + free(e->left.expr); + tmp = e->right.expr; + *e = *(e->right.expr); + free(tmp); + return e; + } else if (e->left.expr->left.sym == &symbol_yes) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.expr = NULL; + return e; + } + } + if (e->right.expr->type == E_SYMBOL) { + if (e->right.expr->left.sym == &symbol_no) { + free(e->right.expr); + tmp = e->left.expr; + *e = *(e->left.expr); + free(tmp); + return e; + } else if (e->right.expr->left.sym == &symbol_yes) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.expr = NULL; + return e; + } + } + break; + default: + ; + } + return e; +} + +/* + * bool FOO!=n => FOO + */ +struct expr *expr_trans_bool(struct expr *e) +{ + if (!e) + return NULL; + switch (e->type) { + case E_AND: + case E_OR: + case E_NOT: + e->left.expr = expr_trans_bool(e->left.expr); + e->right.expr = expr_trans_bool(e->right.expr); + break; + case E_UNEQUAL: + // FOO!=n -> FOO + if (e->left.sym->type == S_TRISTATE) { + if (e->right.sym == &symbol_no) { + e->type = E_SYMBOL; + e->right.sym = NULL; + } + } + break; + default: + ; + } + return e; +} + +/* + * e1 || e2 -> ? + */ +struct expr *expr_join_or(struct expr *e1, struct expr *e2) +{ + struct expr *tmp; + struct symbol *sym1, *sym2; + + if (expr_eq(e1, e2)) + return expr_copy(e1); + if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) + return NULL; + if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) + return NULL; + if (e1->type == E_NOT) { + tmp = e1->left.expr; + if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) + return NULL; + sym1 = tmp->left.sym; + } else + sym1 = e1->left.sym; + if (e2->type == E_NOT) { + if (e2->left.expr->type != E_SYMBOL) + return NULL; + sym2 = e2->left.expr->left.sym; + } else + sym2 = e2->left.sym; + if (sym1 != sym2) + return NULL; + if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) + return NULL; + if (sym1->type == S_TRISTATE) { + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { + // (a='y') || (a='m') -> (a!='n') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no); + } + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) { + // (a='y') || (a='n') -> (a!='m') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod); + } + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) { + // (a='m') || (a='n') -> (a!='y') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); + } + } + if (sym1->type == S_BOOLEAN && sym1 == sym2) { + if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) || + (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL)) + return expr_alloc_symbol(&symbol_yes); + } + + if (DEBUG_EXPR) { + printf("optimize ("); + expr_fprint(e1, stdout); + printf(") || ("); + expr_fprint(e2, stdout); + printf(")?\n"); + } + return NULL; +} + +struct expr *expr_join_and(struct expr *e1, struct expr *e2) +{ + struct expr *tmp; + struct symbol *sym1, *sym2; + + if (expr_eq(e1, e2)) + return expr_copy(e1); + if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) + return NULL; + if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) + return NULL; + if (e1->type == E_NOT) { + tmp = e1->left.expr; + if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) + return NULL; + sym1 = tmp->left.sym; + } else + sym1 = e1->left.sym; + if (e2->type == E_NOT) { + if (e2->left.expr->type != E_SYMBOL) + return NULL; + sym2 = e2->left.expr->left.sym; + } else + sym2 = e2->left.sym; + if (sym1 != sym2) + return NULL; + if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) + return NULL; + + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) + // (a) && (a='y') -> (a='y') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no)) + // (a) && (a!='n') -> (a) + return expr_alloc_symbol(sym1); + + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod)) + // (a) && (a!='m') -> (a='y') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if (sym1->type == S_TRISTATE) { + if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) { + // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' + sym2 = e1->right.sym; + if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) + return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) + : expr_alloc_symbol(&symbol_no); + } + if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) { + // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' + sym2 = e2->right.sym; + if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) + return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) + : expr_alloc_symbol(&symbol_no); + } + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) + // (a!='y') && (a!='n') -> (a='m') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod); + + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) + // (a!='y') && (a!='m') -> (a='n') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_no); + + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) + // (a!='m') && (a!='n') -> (a='m') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) || + (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes)) + return NULL; + } + + if (DEBUG_EXPR) { + printf("optimize ("); + expr_fprint(e1, stdout); + printf(") && ("); + expr_fprint(e2, stdout); + printf(")?\n"); + } + return NULL; +} + +static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + struct expr *tmp; + + if (e1->type == type) { + expr_eliminate_dups1(type, &e1->left.expr, &e2); + expr_eliminate_dups1(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_eliminate_dups1(type, &e1, &e2->left.expr); + expr_eliminate_dups1(type, &e1, &e2->right.expr); + return; + } + if (e1 == e2) + return; + + switch (e1->type) { + case E_OR: case E_AND: + expr_eliminate_dups1(e1->type, &e1, &e1); + default: + ; + } + + switch (type) { + case E_OR: + tmp = expr_join_or(e1, e2); + if (tmp) { + expr_free(e1); expr_free(e2); + e1 = expr_alloc_symbol(&symbol_no); + e2 = tmp; + trans_count++; + } + break; + case E_AND: + tmp = expr_join_and(e1, e2); + if (tmp) { + expr_free(e1); expr_free(e2); + e1 = expr_alloc_symbol(&symbol_yes); + e2 = tmp; + trans_count++; + } + break; + default: + ; + } +#undef e1 +#undef e2 +} + +static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + struct expr *tmp, *tmp1, *tmp2; + + if (e1->type == type) { + expr_eliminate_dups2(type, &e1->left.expr, &e2); + expr_eliminate_dups2(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_eliminate_dups2(type, &e1, &e2->left.expr); + expr_eliminate_dups2(type, &e1, &e2->right.expr); + } + if (e1 == e2) + return; + + switch (e1->type) { + case E_OR: + expr_eliminate_dups2(e1->type, &e1, &e1); + // (FOO || BAR) && (!FOO && !BAR) -> n + tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); + tmp2 = expr_copy(e2); + tmp = expr_extract_eq_and(&tmp1, &tmp2); + if (expr_is_yes(tmp1)) { + expr_free(e1); + e1 = expr_alloc_symbol(&symbol_no); + trans_count++; + } + expr_free(tmp2); + expr_free(tmp1); + expr_free(tmp); + break; + case E_AND: + expr_eliminate_dups2(e1->type, &e1, &e1); + // (FOO && BAR) || (!FOO || !BAR) -> y + tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); + tmp2 = expr_copy(e2); + tmp = expr_extract_eq_or(&tmp1, &tmp2); + if (expr_is_no(tmp1)) { + expr_free(e1); + e1 = expr_alloc_symbol(&symbol_yes); + trans_count++; + } + expr_free(tmp2); + expr_free(tmp1); + expr_free(tmp); + break; + default: + ; + } +#undef e1 +#undef e2 +} + +struct expr *expr_eliminate_dups(struct expr *e) +{ + int oldcount; + if (!e) + return e; + + oldcount = trans_count; + while (1) { + trans_count = 0; + switch (e->type) { + case E_OR: case E_AND: + expr_eliminate_dups1(e->type, &e, &e); + expr_eliminate_dups2(e->type, &e, &e); + default: + ; + } + if (!trans_count) + break; + e = expr_eliminate_yn(e); + } + trans_count = oldcount; + return e; +} + +struct expr *expr_transform(struct expr *e) +{ + struct expr *tmp; + + if (!e) + return NULL; + switch (e->type) { + case E_EQUAL: + case E_UNEQUAL: + case E_SYMBOL: + case E_CHOICE: + break; + default: + e->left.expr = expr_transform(e->left.expr); + e->right.expr = expr_transform(e->right.expr); + } + + switch (e->type) { + case E_EQUAL: + if (e->left.sym->type != S_BOOLEAN) + break; + if (e->right.sym == &symbol_no) { + e->type = E_NOT; + e->left.expr = expr_alloc_symbol(e->left.sym); + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_mod) { + printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_yes) { + e->type = E_SYMBOL; + e->right.sym = NULL; + break; + } + break; + case E_UNEQUAL: + if (e->left.sym->type != S_BOOLEAN) + break; + if (e->right.sym == &symbol_no) { + e->type = E_SYMBOL; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_mod) { + printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_yes) { + e->type = E_NOT; + e->left.expr = expr_alloc_symbol(e->left.sym); + e->right.sym = NULL; + break; + } + break; + case E_NOT: + switch (e->left.expr->type) { + case E_NOT: + // !!a -> a + tmp = e->left.expr->left.expr; + free(e->left.expr); + free(e); + e = tmp; + e = expr_transform(e); + break; + case E_EQUAL: + case E_UNEQUAL: + // !a='x' -> a!='x' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; + break; + case E_OR: + // !(a || b) -> !a && !b + tmp = e->left.expr; + e->type = E_AND; + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); + tmp->type = E_NOT; + tmp->right.expr = NULL; + e = expr_transform(e); + break; + case E_AND: + // !(a && b) -> !a || !b + tmp = e->left.expr; + e->type = E_OR; + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); + tmp->type = E_NOT; + tmp->right.expr = NULL; + e = expr_transform(e); + break; + case E_SYMBOL: + if (e->left.expr->left.sym == &symbol_yes) { + // !'y' -> 'n' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + break; + } + if (e->left.expr->left.sym == &symbol_mod) { + // !'m' -> 'm' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_mod; + break; + } + if (e->left.expr->left.sym == &symbol_no) { + // !'n' -> 'y' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + break; + } + break; + default: + ; + } + break; + default: + ; + } + return e; +} + +int expr_contains_symbol(struct expr *dep, struct symbol *sym) +{ + if (!dep) + return 0; + + switch (dep->type) { + case E_AND: + case E_OR: + return expr_contains_symbol(dep->left.expr, sym) || + expr_contains_symbol(dep->right.expr, sym); + case E_SYMBOL: + return dep->left.sym == sym; + case E_EQUAL: + case E_UNEQUAL: + return dep->left.sym == sym || + dep->right.sym == sym; + case E_NOT: + return expr_contains_symbol(dep->left.expr, sym); + default: + ; + } + return 0; +} + +bool expr_depends_symbol(struct expr *dep, struct symbol *sym) +{ + if (!dep) + return false; + + switch (dep->type) { + case E_AND: + return expr_depends_symbol(dep->left.expr, sym) || + expr_depends_symbol(dep->right.expr, sym); + case E_SYMBOL: + return dep->left.sym == sym; + case E_EQUAL: + if (dep->left.sym == sym) { + if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod) + return true; + } + break; + case E_UNEQUAL: + if (dep->left.sym == sym) { + if (dep->right.sym == &symbol_no) + return true; + } + break; + default: + ; + } + return false; +} + +struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) +{ + struct expr *tmp = NULL; + expr_extract_eq(E_AND, &tmp, ep1, ep2); + if (tmp) { + *ep1 = expr_eliminate_yn(*ep1); + *ep2 = expr_eliminate_yn(*ep2); + } + return tmp; +} + +struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2) +{ + struct expr *tmp = NULL; + expr_extract_eq(E_OR, &tmp, ep1, ep2); + if (tmp) { + *ep1 = expr_eliminate_yn(*ep1); + *ep2 = expr_eliminate_yn(*ep2); + } + return tmp; +} + +void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + if (e1->type == type) { + expr_extract_eq(type, ep, &e1->left.expr, &e2); + expr_extract_eq(type, ep, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_extract_eq(type, ep, ep1, &e2->left.expr); + expr_extract_eq(type, ep, ep1, &e2->right.expr); + return; + } + if (expr_eq(e1, e2)) { + *ep = *ep ? expr_alloc_two(type, *ep, e1) : e1; + expr_free(e2); + if (type == E_AND) { + e1 = expr_alloc_symbol(&symbol_yes); + e2 = expr_alloc_symbol(&symbol_yes); + } else if (type == E_OR) { + e1 = expr_alloc_symbol(&symbol_no); + e2 = expr_alloc_symbol(&symbol_no); + } + } +#undef e1 +#undef e2 +} + +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym) +{ + struct expr *e1, *e2; + + if (!e) { + e = expr_alloc_symbol(sym); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + } + switch (e->type) { + case E_AND: + e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); + e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); + if (sym == &symbol_yes) + e = expr_alloc_two(E_AND, e1, e2); + if (sym == &symbol_no) + e = expr_alloc_two(E_OR, e1, e2); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + case E_OR: + e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); + e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); + if (sym == &symbol_yes) + e = expr_alloc_two(E_OR, e1, e2); + if (sym == &symbol_no) + e = expr_alloc_two(E_AND, e1, e2); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + case E_NOT: + return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym); + case E_UNEQUAL: + case E_EQUAL: + if (type == E_EQUAL) { + if (sym == &symbol_yes) + return expr_copy(e); + if (sym == &symbol_mod) + return expr_alloc_symbol(&symbol_no); + if (sym == &symbol_no) + return expr_alloc_one(E_NOT, expr_copy(e)); + } else { + if (sym == &symbol_yes) + return expr_alloc_one(E_NOT, expr_copy(e)); + if (sym == &symbol_mod) + return expr_alloc_symbol(&symbol_yes); + if (sym == &symbol_no) + return expr_copy(e); + } + break; + case E_SYMBOL: + return expr_alloc_comp(type, e->left.sym, sym); + case E_CHOICE: + case E_RANGE: + case E_NONE: + /* panic */; + } + return NULL; +} + +tristate expr_calc_value(struct expr *e) +{ + tristate val1, val2; + const char *str1, *str2; + + if (!e) + return yes; + + switch (e->type) { + case E_SYMBOL: + sym_calc_value(e->left.sym); + return e->left.sym->curr.tri; + case E_AND: + val1 = expr_calc_value(e->left.expr); + val2 = expr_calc_value(e->right.expr); + return E_AND(val1, val2); + case E_OR: + val1 = expr_calc_value(e->left.expr); + val2 = expr_calc_value(e->right.expr); + return E_OR(val1, val2); + case E_NOT: + val1 = expr_calc_value(e->left.expr); + return E_NOT(val1); + case E_EQUAL: + sym_calc_value(e->left.sym); + sym_calc_value(e->right.sym); + str1 = sym_get_string_value(e->left.sym); + str2 = sym_get_string_value(e->right.sym); + return !strcmp(str1, str2) ? yes : no; + case E_UNEQUAL: + sym_calc_value(e->left.sym); + sym_calc_value(e->right.sym); + str1 = sym_get_string_value(e->left.sym); + str2 = sym_get_string_value(e->right.sym); + return !strcmp(str1, str2) ? no : yes; + default: + printf("expr_calc_value: %d?\n", e->type); + return no; + } +} + +int expr_compare_type(enum expr_type t1, enum expr_type t2) +{ +#if 0 + return 1; +#else + if (t1 == t2) + return 0; + switch (t1) { + case E_EQUAL: + case E_UNEQUAL: + if (t2 == E_NOT) + return 1; + case E_NOT: + if (t2 == E_AND) + return 1; + case E_AND: + if (t2 == E_OR) + return 1; + case E_OR: + if (t2 == E_CHOICE) + return 1; + case E_CHOICE: + if (t2 == 0) + return 1; + default: + return -1; + } + printf("[%dgt%d?]", t1, t2); + return 0; +#endif +} + +void expr_print(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken) +{ + if (!e) { + fn(data, "y"); + return; + } + + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, "("); + switch (e->type) { + case E_SYMBOL: + if (e->left.sym->name) + fn(data, e->left.sym->name); + else + fn(data, ""); + break; + case E_NOT: + fn(data, "!"); + expr_print(e->left.expr, fn, data, E_NOT); + break; + case E_EQUAL: + fn(data, e->left.sym->name); + fn(data, "="); + fn(data, e->right.sym->name); + break; + case E_UNEQUAL: + fn(data, e->left.sym->name); + fn(data, "!="); + fn(data, e->right.sym->name); + break; + case E_OR: + expr_print(e->left.expr, fn, data, E_OR); + fn(data, " || "); + expr_print(e->right.expr, fn, data, E_OR); + break; + case E_AND: + expr_print(e->left.expr, fn, data, E_AND); + fn(data, " && "); + expr_print(e->right.expr, fn, data, E_AND); + break; + case E_CHOICE: + fn(data, e->right.sym->name); + if (e->left.expr) { + fn(data, " ^ "); + expr_print(e->left.expr, fn, data, E_CHOICE); + } + break; + case E_RANGE: + fn(data, "["); + fn(data, e->left.sym->name); + fn(data, " "); + fn(data, e->right.sym->name); + fn(data, "]"); + break; + default: + { + char buf[32]; + sprintf(buf, "", e->type); + fn(data, buf); + break; + } + } + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, ")"); +} + +static void expr_print_file_helper(void *data, const char *str) +{ + fwrite(str, strlen(str), 1, data); +} + +void expr_fprint(struct expr *e, FILE *out) +{ + expr_print(e, expr_print_file_helper, out, E_NONE); +} + +static void expr_print_gstr_helper(void *data, const char *str) +{ + str_append((struct gstr*)data, str); +} + +void expr_gstr_print(struct expr *e, struct gstr *gs) +{ + expr_print(e, expr_print_gstr_helper, gs, E_NONE); +} diff --git a/openwrt/scripts/config/expr.h b/openwrt/scripts/config/expr.h new file mode 100644 index 00000000000..1b36ef18c48 --- /dev/null +++ b/openwrt/scripts/config/expr.h @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#ifndef EXPR_H +#define EXPR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#ifndef __cplusplus +#include +#endif + +struct file { + struct file *next; + struct file *parent; + char *name; + int lineno; + int flags; +}; + +#define FILE_BUSY 0x0001 +#define FILE_SCANNED 0x0002 +#define FILE_PRINTED 0x0004 + +typedef enum tristate { + no, mod, yes +} tristate; + +enum expr_type { + E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL, E_RANGE +}; + +union expr_data { + struct expr *expr; + struct symbol *sym; +}; + +struct expr { + enum expr_type type; + union expr_data left, right; +}; + +#define E_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2)) +#define E_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2)) +#define E_NOT(dep) (2-(dep)) + +struct expr_value { + struct expr *expr; + tristate tri; +}; + +struct symbol_value { + void *val; + tristate tri; +}; + +enum symbol_type { + S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER +}; + +struct symbol { + struct symbol *next; + char *name; + char *help; + enum symbol_type type; + struct symbol_value curr, user; + tristate visible; + int flags; + struct property *prop; + struct expr *dep, *dep2; + struct expr_value rev_dep; +}; + +#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) + +#define SYMBOL_YES 0x0001 +#define SYMBOL_MOD 0x0002 +#define SYMBOL_NO 0x0004 +#define SYMBOL_CONST 0x0007 +#define SYMBOL_CHECK 0x0008 +#define SYMBOL_CHOICE 0x0010 +#define SYMBOL_CHOICEVAL 0x0020 +#define SYMBOL_PRINTED 0x0040 +#define SYMBOL_VALID 0x0080 +#define SYMBOL_OPTIONAL 0x0100 +#define SYMBOL_WRITE 0x0200 +#define SYMBOL_CHANGED 0x0400 +#define SYMBOL_NEW 0x0800 +#define SYMBOL_AUTO 0x1000 +#define SYMBOL_CHECKED 0x2000 +#define SYMBOL_WARNED 0x8000 + +#define SYMBOL_MAXLENGTH 256 +#define SYMBOL_HASHSIZE 257 +#define SYMBOL_HASHMASK 0xff + +enum prop_type { + P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_RANGE +}; + +struct property { + struct property *next; + struct symbol *sym; + enum prop_type type; + const char *text; + struct expr_value visible; + struct expr *expr; + struct menu *menu; + struct file *file; + int lineno; +}; + +#define for_all_properties(sym, st, tok) \ + for (st = sym->prop; st; st = st->next) \ + if (st->type == (tok)) +#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT) +#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE) +#define for_all_prompts(sym, st) \ + for (st = sym->prop; st; st = st->next) \ + if (st->text) + +struct menu { + struct menu *next; + struct menu *parent; + struct menu *list; + struct symbol *sym; + struct property *prompt; + struct expr *dep; + unsigned int flags; + //char *help; + struct file *file; + int lineno; + void *data; +}; + +#define MENU_CHANGED 0x0001 +#define MENU_ROOT 0x0002 + +#ifndef SWIG + +extern struct file *file_list; +extern struct file *current_file; +struct file *lookup_file(const char *name); + +extern struct symbol symbol_yes, symbol_no, symbol_mod; +extern struct symbol *modules_sym; +extern int cdebug; +struct expr *expr_alloc_symbol(struct symbol *sym); +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2); +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2); +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2); +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); +struct expr *expr_copy(struct expr *org); +void expr_free(struct expr *e); +int expr_eq(struct expr *e1, struct expr *e2); +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); +tristate expr_calc_value(struct expr *e); +struct expr *expr_eliminate_yn(struct expr *e); +struct expr *expr_trans_bool(struct expr *e); +struct expr *expr_eliminate_dups(struct expr *e); +struct expr *expr_transform(struct expr *e); +int expr_contains_symbol(struct expr *dep, struct symbol *sym); +bool expr_depends_symbol(struct expr *dep, struct symbol *sym); +struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2); +struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2); +void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2); +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym); + +void expr_fprint(struct expr *e, FILE *out); +struct gstr; /* forward */ +void expr_gstr_print(struct expr *e, struct gstr *gs); + +static inline int expr_is_yes(struct expr *e) +{ + return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes); +} + +static inline int expr_is_no(struct expr *e) +{ + return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); +} +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* EXPR_H */ diff --git a/openwrt/scripts/config/kconfig_load.c b/openwrt/scripts/config/kconfig_load.c new file mode 100644 index 00000000000..dbdcaad8232 --- /dev/null +++ b/openwrt/scripts/config/kconfig_load.c @@ -0,0 +1,35 @@ +#include +#include +#include + +#include "lkc.h" + +#define P(name,type,arg) type (*name ## _p) arg +#include "lkc_proto.h" +#undef P + +void kconfig_load(void) +{ + void *handle; + char *error; + + handle = dlopen("./libkconfig.so", RTLD_LAZY); + if (!handle) { + handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY); + if (!handle) { + fprintf(stderr, "%s\n", dlerror()); + exit(1); + } + } + +#define P(name,type,arg) \ +{ \ + name ## _p = dlsym(handle, #name); \ + if ((error = dlerror())) { \ + fprintf(stderr, "%s\n", error); \ + exit(1); \ + } \ +} +#include "lkc_proto.h" +#undef P +} diff --git a/openwrt/scripts/config/lex.backup b/openwrt/scripts/config/lex.backup new file mode 100644 index 00000000000..afb1b53c7bc --- /dev/null +++ b/openwrt/scripts/config/lex.backup @@ -0,0 +1 @@ +No backing up. diff --git a/openwrt/scripts/config/lex.zconf.c_shipped b/openwrt/scripts/config/lex.zconf.c_shipped new file mode 100644 index 00000000000..2712384f6e8 --- /dev/null +++ b/openwrt/scripts/config/lex.zconf.c_shipped @@ -0,0 +1,2317 @@ + +#line 3 "lex.zconf.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 31 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE zconfrestart(zconfin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int zconfleng; + +extern FILE *zconfin, *zconfout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up zconftext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up zconftext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via zconfrestart()), so that the user can continue scanning by + * just pointing zconfin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when zconftext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int zconfleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow zconfwrap()'s to do buffer switches + * instead of setting up a fresh zconfin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void zconfrestart (FILE *input_file ); +void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size ); +void zconf_delete_buffer (YY_BUFFER_STATE b ); +void zconf_flush_buffer (YY_BUFFER_STATE b ); +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ); +void zconfpop_buffer_state (void ); + +static void zconfensure_buffer_stack (void ); +static void zconf_load_buffer_state (void ); +static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len ); + +void *zconfalloc (yy_size_t ); +void *zconfrealloc (void *,yy_size_t ); +void zconffree (void * ); + +#define yy_new_buffer zconf_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + zconfensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + zconfensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define zconfwrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0; + +typedef int yy_state_type; + +extern int zconflineno; + +int zconflineno = 1; + +extern char *zconftext; +#define yytext_ptr zconftext +static yyconst flex_int16_t yy_nxt[][17] = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 + }, + + { + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12 + }, + + { + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12 + }, + + { + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 18, 16, 16, 16 + }, + + { + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 18, 16, 16, 16 + + }, + + { + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19 + }, + + { + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19 + }, + + { + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, + 22, 22, 22, 22, 22, 25, 22 + }, + + { + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, + 22, 22, 22, 22, 22, 25, 22 + }, + + { + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, + 33, 34, 35, 35, 36, 37, 38 + + }, + + { + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, + 33, 34, 35, 35, 36, 37, 38 + }, + + { + -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, + -11, -11, -11, -11, -11, -11, -11 + }, + + { + 11, -12, -12, -12, -12, -12, -12, -12, -12, -12, + -12, -12, -12, -12, -12, -12, -12 + }, + + { + 11, -13, 39, 40, -13, -13, 41, -13, -13, -13, + -13, -13, -13, -13, -13, -13, -13 + }, + + { + 11, -14, -14, -14, -14, -14, -14, -14, -14, -14, + -14, -14, -14, -14, -14, -14, -14 + + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, -16, -16, -16, -16, -16, -16, -16, -16, -16, + -16, -16, -16, -16, -16, -16, -16 + }, + + { + 11, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17 + }, + + { + 11, -18, -18, -18, -18, -18, -18, -18, -18, -18, + -18, -18, -18, 44, -18, -18, -18 + }, + + { + 11, 45, 45, -19, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45 + + }, + + { + 11, -20, 46, 47, -20, -20, -20, -20, -20, -20, + -20, -20, -20, -20, -20, -20, -20 + }, + + { + 11, 48, -21, -21, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48 + }, + + { + 11, 49, 49, 50, 49, -22, 49, 49, -22, 49, + 49, 49, 49, 49, 49, -22, 49 + }, + + { + 11, -23, -23, -23, -23, -23, -23, -23, -23, -23, + -23, -23, -23, -23, -23, -23, -23 + }, + + { + 11, -24, -24, -24, -24, -24, -24, -24, -24, -24, + -24, -24, -24, -24, -24, -24, -24 + + }, + + { + 11, 51, 51, 52, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51 + }, + + { + 11, -26, -26, -26, -26, -26, -26, -26, -26, -26, + -26, -26, -26, -26, -26, -26, -26 + }, + + { + 11, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27 + }, + + { + 11, -28, -28, -28, -28, -28, -28, -28, -28, -28, + -28, -28, -28, -28, 53, -28, -28 + }, + + { + 11, -29, -29, -29, -29, -29, -29, -29, -29, -29, + -29, -29, -29, -29, -29, -29, -29 + + }, + + { + 11, 54, 54, -30, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54 + }, + + { + 11, -31, -31, -31, -31, -31, -31, 55, -31, -31, + -31, -31, -31, -31, -31, -31, -31 + }, + + { + 11, -32, -32, -32, -32, -32, -32, -32, -32, -32, + -32, -32, -32, -32, -32, -32, -32 + }, + + { + 11, -33, -33, -33, -33, -33, -33, -33, -33, -33, + -33, -33, -33, -33, -33, -33, -33 + }, + + { + 11, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, 56, 57, 57, -34, -34, -34 + + }, + + { + 11, -35, -35, -35, -35, -35, -35, -35, -35, -35, + -35, 57, 57, 57, -35, -35, -35 + }, + + { + 11, -36, -36, -36, -36, -36, -36, -36, -36, -36, + -36, -36, -36, -36, -36, -36, -36 + }, + + { + 11, -37, -37, 58, -37, -37, -37, -37, -37, -37, + -37, -37, -37, -37, -37, -37, -37 + }, + + { + 11, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, 59 + }, + + { + 11, -39, 39, 40, -39, -39, 41, -39, -39, -39, + -39, -39, -39, -39, -39, -39, -39 + + }, + + { + 11, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, -40, -40, -40, -40, -40 + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, -43, -43, -43, -43, -43, -43, -43, -43, -43, + -43, -43, -43, -43, -43, -43, -43 + }, + + { + 11, -44, -44, -44, -44, -44, -44, -44, -44, -44, + -44, -44, -44, 44, -44, -44, -44 + + }, + + { + 11, 45, 45, -45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45 + }, + + { + 11, -46, 46, 47, -46, -46, -46, -46, -46, -46, + -46, -46, -46, -46, -46, -46, -46 + }, + + { + 11, 48, -47, -47, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48 + }, + + { + 11, -48, -48, -48, -48, -48, -48, -48, -48, -48, + -48, -48, -48, -48, -48, -48, -48 + }, + + { + 11, 49, 49, 50, 49, -49, 49, 49, -49, 49, + 49, 49, 49, 49, 49, -49, 49 + + }, + + { + 11, -50, -50, -50, -50, -50, -50, -50, -50, -50, + -50, -50, -50, -50, -50, -50, -50 + }, + + { + 11, -51, -51, 52, -51, -51, -51, -51, -51, -51, + -51, -51, -51, -51, -51, -51, -51 + }, + + { + 11, -52, -52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52, -52, -52, -52, -52 + }, + + { + 11, -53, -53, -53, -53, -53, -53, -53, -53, -53, + -53, -53, -53, -53, -53, -53, -53 + }, + + { + 11, 54, 54, -54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54 + + }, + + { + 11, -55, -55, -55, -55, -55, -55, -55, -55, -55, + -55, -55, -55, -55, -55, -55, -55 + }, + + { + 11, -56, -56, -56, -56, -56, -56, -56, -56, -56, + -56, 60, 57, 57, -56, -56, -56 + }, + + { + 11, -57, -57, -57, -57, -57, -57, -57, -57, -57, + -57, 57, 57, 57, -57, -57, -57 + }, + + { + 11, -58, -58, -58, -58, -58, -58, -58, -58, -58, + -58, -58, -58, -58, -58, -58, -58 + }, + + { + 11, -59, -59, -59, -59, -59, -59, -59, -59, -59, + -59, -59, -59, -59, -59, -59, -59 + + }, + + { + 11, -60, -60, -60, -60, -60, -60, -60, -60, -60, + -60, 57, 57, 57, -60, -60, -60 + }, + + } ; + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up zconftext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + zconfleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 33 +#define YY_END_OF_BUFFER 34 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[61] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 34, 5, 4, 2, 3, 7, 8, 6, 32, 29, + 31, 24, 28, 27, 26, 22, 17, 13, 16, 20, + 22, 11, 12, 19, 19, 14, 22, 22, 4, 2, + 3, 3, 1, 6, 32, 29, 31, 30, 24, 23, + 26, 25, 15, 20, 9, 19, 19, 21, 10, 18 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 6, 1, 1, 7, 8, 9, + 10, 1, 1, 1, 11, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, + 14, 1, 1, 1, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 1, 15, 1, 1, 13, 1, 13, 13, 13, 13, + + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 1, 16, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +extern int zconf_flex_debug; +int zconf_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *zconftext; + +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#define LKC_DIRECT_LINK +#include "lkc.h" + +#define START_STRSIZE 16 + +static struct { + struct file *file; + int lineno; +} current_pos; + +static char *text; +static int text_size, text_asize; + +struct buffer { + struct buffer *parent; + YY_BUFFER_STATE state; +}; + +struct buffer *current_buf; + +static int last_ts, first_ts; + +static void zconf_endhelp(void); +static void zconf_endfile(void); + +void new_string(void) +{ + text = malloc(START_STRSIZE); + text_asize = START_STRSIZE; + text_size = 0; + *text = 0; +} + +void append_string(const char *str, int size) +{ + int new_size = text_size + size + 1; + if (new_size > text_asize) { + new_size += START_STRSIZE - 1; + new_size &= -START_STRSIZE; + text = realloc(text, new_size); + text_asize = new_size; + } + memcpy(text + text_size, str, size); + text_size += size; + text[text_size] = 0; +} + +void alloc_string(const char *str, int size) +{ + text = malloc(size + 1); + memcpy(text, str, size); + text[size] = 0; +} + +#define INITIAL 0 +#define COMMAND 1 +#define HELP 2 +#define STRING 3 +#define PARAM 4 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int zconfwrap (void ); +#else +extern int zconfwrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( zconftext, zconfleng, 1, zconfout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + errno=0; \ + while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(zconfin); \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int zconflex (void); + +#define YY_DECL int zconflex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after zconftext and zconfleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + int str = 0; + int ts, i; + + if ( (yy_init) ) + { + (yy_init) = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! zconfin ) + zconfin = stdin; + + if ( ! zconfout ) + zconfout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + zconfensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + zconf_create_buffer(zconfin,YY_BUF_SIZE ); + } + + zconf_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of zconftext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 ) + ++yy_cp; + + yy_current_state = -yy_current_state; + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +/* rule 1 can match eol */ +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +{ + current_file->lineno++; + return T_EOL; +} + YY_BREAK +case 3: +YY_RULE_SETUP + + YY_BREAK +case 4: +YY_RULE_SETUP +{ + BEGIN(COMMAND); +} + YY_BREAK +case 5: +YY_RULE_SETUP +{ + unput(zconftext[0]); + BEGIN(COMMAND); +} + YY_BREAK + +case 6: +YY_RULE_SETUP +{ + struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); + BEGIN(PARAM); + current_pos.file = current_file; + current_pos.lineno = current_file->lineno; + if (id && id->flags & TF_COMMAND) { + zconflval.id = id; + return id->token; + } + alloc_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD; + } + YY_BREAK +case 7: +YY_RULE_SETUP + + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +{ + BEGIN(INITIAL); + current_file->lineno++; + return T_EOL; + } + YY_BREAK + +case 9: +YY_RULE_SETUP +return T_AND; + YY_BREAK +case 10: +YY_RULE_SETUP +return T_OR; + YY_BREAK +case 11: +YY_RULE_SETUP +return T_OPEN_PAREN; + YY_BREAK +case 12: +YY_RULE_SETUP +return T_CLOSE_PAREN; + YY_BREAK +case 13: +YY_RULE_SETUP +return T_NOT; + YY_BREAK +case 14: +YY_RULE_SETUP +return T_EQUAL; + YY_BREAK +case 15: +YY_RULE_SETUP +return T_UNEQUAL; + YY_BREAK +case 16: +YY_RULE_SETUP +{ + str = zconftext[0]; + new_string(); + BEGIN(STRING); + } + YY_BREAK +case 17: +/* rule 17 can match eol */ +YY_RULE_SETUP +BEGIN(INITIAL); current_file->lineno++; return T_EOL; + YY_BREAK +case 18: +YY_RULE_SETUP +/* ignore */ + YY_BREAK +case 19: +YY_RULE_SETUP +{ + struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); + if (id && id->flags & TF_PARAM) { + zconflval.id = id; + return id->token; + } + alloc_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD; + } + YY_BREAK +case 20: +YY_RULE_SETUP +/* comment */ + YY_BREAK +case 21: +/* rule 21 can match eol */ +YY_RULE_SETUP +current_file->lineno++; + YY_BREAK +case 22: +YY_RULE_SETUP + + YY_BREAK +case YY_STATE_EOF(PARAM): +{ + BEGIN(INITIAL); + } + YY_BREAK + +case 23: +/* rule 23 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + append_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD_QUOTE; + } + YY_BREAK +case 24: +YY_RULE_SETUP +{ + append_string(zconftext, zconfleng); + } + YY_BREAK +case 25: +/* rule 25 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + append_string(zconftext + 1, zconfleng - 1); + zconflval.string = text; + return T_WORD_QUOTE; + } + YY_BREAK +case 26: +YY_RULE_SETUP +{ + append_string(zconftext + 1, zconfleng - 1); + } + YY_BREAK +case 27: +YY_RULE_SETUP +{ + if (str == zconftext[0]) { + BEGIN(PARAM); + zconflval.string = text; + return T_WORD_QUOTE; + } else + append_string(zconftext, 1); + } + YY_BREAK +case 28: +/* rule 28 can match eol */ +YY_RULE_SETUP +{ + printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); + current_file->lineno++; + BEGIN(INITIAL); + return T_EOL; + } + YY_BREAK +case YY_STATE_EOF(STRING): +{ + BEGIN(INITIAL); + } + YY_BREAK + +case 29: +YY_RULE_SETUP +{ + ts = 0; + for (i = 0; i < zconfleng; i++) { + if (zconftext[i] == '\t') + ts = (ts & ~7) + 8; + else + ts++; + } + last_ts = ts; + if (first_ts) { + if (ts < first_ts) { + zconf_endhelp(); + return T_HELPTEXT; + } + ts -= first_ts; + while (ts > 8) { + append_string(" ", 8); + ts -= 8; + } + append_string(" ", ts); + } + } + YY_BREAK +case 30: +/* rule 30 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + current_file->lineno++; + zconf_endhelp(); + return T_HELPTEXT; + } + YY_BREAK +case 31: +/* rule 31 can match eol */ +YY_RULE_SETUP +{ + current_file->lineno++; + append_string("\n", 1); + } + YY_BREAK +case 32: +YY_RULE_SETUP +{ + append_string(zconftext, zconfleng); + if (!first_ts) + first_ts = last_ts; + } + YY_BREAK +case YY_STATE_EOF(HELP): +{ + zconf_endhelp(); + return T_HELPTEXT; + } + YY_BREAK + +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(COMMAND): +{ + if (current_file) { + zconf_endfile(); + return T_EOL; + } + fclose(zconfin); + yyterminate(); +} + YY_BREAK +case 33: +YY_RULE_SETUP +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed zconfin at a new source and called + * zconflex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( zconfwrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * zconftext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of zconflex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + zconfrestart(zconfin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + + yy_current_state = yy_nxt[yy_current_state][1]; + yy_is_jam = (yy_current_state <= 0); + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up zconftext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + zconfrestart(zconfin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( zconfwrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve zconftext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void zconfrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + zconfensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + zconf_create_buffer(zconfin,YY_BUF_SIZE ); + } + + zconf_init_buffer(YY_CURRENT_BUFFER,input_file ); + zconf_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * zconfpop_buffer_state(); + * zconfpush_buffer_state(new_buffer); + */ + zconfensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + zconf_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (zconfwrap()) processing, but the only time this flag + * is looked at is after zconfwrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void zconf_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + zconf_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with zconf_create_buffer() + * + */ + void zconf_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + zconffree((void *) b->yy_ch_buf ); + + zconffree((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a zconfrestart() or at EOF. + */ + static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + zconf_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then zconf_init_buffer was _probably_ + * called from zconfrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void zconf_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + zconf_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + zconfensure_buffer_stack(); + + /* This block is copied from zconf_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from zconf_switch_to_buffer. */ + zconf_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void zconfpop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + zconf_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + zconf_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void zconfensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + zconf_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to zconflex() will + * scan from a @e copy of @a str. + * @param str a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * zconf_scan_bytes() instead. + */ +YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str ) +{ + + return zconf_scan_bytes(yy_str,strlen(yy_str) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) zconfalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = zconf_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up zconftext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + zconftext[zconfleng] = (yy_hold_char); \ + (yy_c_buf_p) = zconftext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + zconfleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int zconfget_lineno (void) +{ + + return zconflineno; +} + +/** Get the input stream. + * + */ +FILE *zconfget_in (void) +{ + return zconfin; +} + +/** Get the output stream. + * + */ +FILE *zconfget_out (void) +{ + return zconfout; +} + +/** Get the length of the current token. + * + */ +int zconfget_leng (void) +{ + return zconfleng; +} + +/** Get the current token. + * + */ + +char *zconfget_text (void) +{ + return zconftext; +} + +/** Set the current line number. + * @param line_number + * + */ +void zconfset_lineno (int line_number ) +{ + + zconflineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see zconf_switch_to_buffer + */ +void zconfset_in (FILE * in_str ) +{ + zconfin = in_str ; +} + +void zconfset_out (FILE * out_str ) +{ + zconfout = out_str ; +} + +int zconfget_debug (void) +{ + return zconf_flex_debug; +} + +void zconfset_debug (int bdebug ) +{ + zconf_flex_debug = bdebug ; +} + +/* zconflex_destroy is for both reentrant and non-reentrant scanners. */ +int zconflex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + zconf_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + zconfpop_buffer_state(); + } + + /* Destroy the stack itself. */ + zconffree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *zconfalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *zconfrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void zconffree (void * ptr ) +{ + free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +void zconf_starthelp(void) +{ + new_string(); + last_ts = first_ts = 0; + BEGIN(HELP); +} + +static void zconf_endhelp(void) +{ + zconflval.string = text; + BEGIN(INITIAL); +} + +/* + * Try to open specified file with following names: + * ./name + * $(srctree)/name + * The latter is used when srctree is separate from objtree + * when compiling the kernel. + * Return NULL if file is not found. + */ +FILE *zconf_fopen(const char *name) +{ + char *env, fullname[PATH_MAX+1]; + FILE *f; + + f = fopen(name, "r"); + if (!f && name[0] != '/') { + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + f = fopen(fullname, "r"); + } + } + return f; +} + +void zconf_initscan(const char *name) +{ + zconfin = zconf_fopen(name); + if (!zconfin) { + printf("can't find file %s\n", name); + exit(1); + } + + current_buf = malloc(sizeof(*current_buf)); + memset(current_buf, 0, sizeof(*current_buf)); + + current_file = file_lookup(name); + current_file->lineno = 1; + current_file->flags = FILE_BUSY; +} + +void zconf_nextfile(const char *name) +{ + struct file *file = file_lookup(name); + struct buffer *buf = malloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + + current_buf->state = YY_CURRENT_BUFFER; + zconfin = zconf_fopen(name); + if (!zconfin) { + printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); + exit(1); + } + zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + if (file->flags & FILE_BUSY) { + printf("recursive scan (%s)?\n", name); + exit(1); + } + if (file->flags & FILE_SCANNED) { + printf("file %s already scanned?\n", name); + exit(1); + } + file->flags |= FILE_BUSY; + file->lineno = 1; + file->parent = current_file; + current_file = file; +} + +static void zconf_endfile(void) +{ + struct buffer *parent; + + current_file->flags |= FILE_SCANNED; + current_file->flags &= ~FILE_BUSY; + current_file = current_file->parent; + + parent = current_buf->parent; + if (parent) { + fclose(zconfin); + zconf_delete_buffer(YY_CURRENT_BUFFER); + zconf_switch_to_buffer(parent->state); + } + free(current_buf); + current_buf = parent; +} + +int zconf_lineno(void) +{ + return current_pos.lineno; +} + +char *zconf_curname(void) +{ + return current_pos.file ? current_pos.file->name : ""; +} + diff --git a/openwrt/scripts/config/lkc.h b/openwrt/scripts/config/lkc.h new file mode 100644 index 00000000000..527f60c99c5 --- /dev/null +++ b/openwrt/scripts/config/lkc.h @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#ifndef LKC_H +#define LKC_H + +#include "expr.h" + +#ifndef KBUILD_NO_NLS +# include +#else +# define gettext(Msgid) ((const char *) (Msgid)) +# define textdomain(Domainname) ((const char *) (Domainname)) +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LKC_DIRECT_LINK +#define P(name,type,arg) extern type name arg +#else +#include "lkc_defs.h" +#define P(name,type,arg) extern type (*name ## _p) arg +#endif +#include "lkc_proto.h" +#undef P + +#define SRCTREE "srctree" + +#define PACKAGE "linux" +#define LOCALEDIR "/usr/share/locale" + +#define _(text) gettext(text) +#define N_(text) (text) + + +#define TF_COMMAND 0x0001 +#define TF_PARAM 0x0002 + +struct kconf_id { + int name; + int token; + unsigned int flags; + enum symbol_type stype; +}; + +int zconfparse(void); +void zconfdump(FILE *out); + +extern int zconfdebug; +void zconf_starthelp(void); +FILE *zconf_fopen(const char *name); +void zconf_initscan(const char *name); +void zconf_nextfile(const char *name); +int zconf_lineno(void); +char *zconf_curname(void); + +/* confdata.c */ +extern const char conf_def_filename[]; + +char *conf_get_default_confname(void); + +/* kconfig_load.c */ +void kconfig_load(void); + +/* menu.c */ +void menu_init(void); +struct menu *menu_add_menu(void); +void menu_end_menu(void); +void menu_add_entry(struct symbol *sym); +void menu_end_entry(void); +void menu_add_dep(struct expr *dep); +struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); +void menu_finalize(struct menu *parent); +void menu_set_type(int type); + +/* util.c */ +struct file *file_lookup(const char *name); +int file_write_dep(const char *name); + +struct gstr { + size_t len; + char *s; +}; +struct gstr str_new(void); +struct gstr str_assign(const char *s); +void str_free(struct gstr *gs); +void str_append(struct gstr *gs, const char *s); +void str_printf(struct gstr *gs, const char *fmt, ...); +const char *str_get(struct gstr *gs); + +/* symbol.c */ +void sym_init(void); +void sym_clear_all_valid(void); +void sym_set_changed(struct symbol *sym); +struct symbol *sym_check_deps(struct symbol *sym); +struct property *prop_alloc(enum prop_type type, struct symbol *sym); +struct symbol *prop_get_symbol(struct property *prop); + +static inline tristate sym_get_tristate_value(struct symbol *sym) +{ + return sym->curr.tri; +} + + +static inline struct symbol *sym_get_choice_value(struct symbol *sym) +{ + return (struct symbol *)sym->curr.val; +} + +static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval) +{ + return sym_set_tristate_value(chval, yes); +} + +static inline bool sym_is_choice(struct symbol *sym) +{ + return sym->flags & SYMBOL_CHOICE ? true : false; +} + +static inline bool sym_is_choice_value(struct symbol *sym) +{ + return sym->flags & SYMBOL_CHOICEVAL ? true : false; +} + +static inline bool sym_is_optional(struct symbol *sym) +{ + return sym->flags & SYMBOL_OPTIONAL ? true : false; +} + +static inline bool sym_has_value(struct symbol *sym) +{ + return sym->flags & SYMBOL_NEW ? false : true; +} + +#ifdef __cplusplus +} +#endif + +#endif /* LKC_H */ diff --git a/openwrt/scripts/config/lkc_proto.h b/openwrt/scripts/config/lkc_proto.h new file mode 100644 index 00000000000..b6a389c5fcb --- /dev/null +++ b/openwrt/scripts/config/lkc_proto.h @@ -0,0 +1,41 @@ + +/* confdata.c */ +P(conf_parse,void,(const char *name)); +P(conf_read,int,(const char *name)); +P(conf_read_simple,int,(const char *name)); +P(conf_write,int,(const char *name)); + +/* menu.c */ +P(rootmenu,struct menu,); + +P(menu_is_visible,bool,(struct menu *menu)); +P(menu_get_prompt,const char *,(struct menu *menu)); +P(menu_get_root_menu,struct menu *,(struct menu *menu)); +P(menu_get_parent_menu,struct menu *,(struct menu *menu)); + +/* symbol.c */ +P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); +P(sym_change_count,int,); + +P(sym_lookup,struct symbol *,(const char *name, int isconst)); +P(sym_find,struct symbol *,(const char *name)); +P(sym_re_search,struct symbol **,(const char *pattern)); +P(sym_type_name,const char *,(enum symbol_type type)); +P(sym_calc_value,void,(struct symbol *sym)); +P(sym_get_type,enum symbol_type,(struct symbol *sym)); +P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); +P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); +P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); +P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); +P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); +P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); +P(sym_is_changable,bool,(struct symbol *sym)); +P(sym_get_choice_prop,struct property *,(struct symbol *sym)); +P(sym_get_default_prop,struct property *,(struct symbol *sym)); +P(sym_get_string_value,const char *,(struct symbol *sym)); + +P(prop_get_type_name,const char *,(enum prop_type type)); + +/* expr.c */ +P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); +P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)); diff --git a/openwrt/scripts/config/lxdialog/BIG.FAT.WARNING b/openwrt/scripts/config/lxdialog/BIG.FAT.WARNING new file mode 100644 index 00000000000..a8999d82bdb --- /dev/null +++ b/openwrt/scripts/config/lxdialog/BIG.FAT.WARNING @@ -0,0 +1,4 @@ +This is NOT the official version of dialog. This version has been +significantly modified from the original. It is for use by the Linux +kernel configuration script. Please do not bother Savio Lam with +questions about this program. diff --git a/openwrt/scripts/config/lxdialog/Makefile b/openwrt/scripts/config/lxdialog/Makefile new file mode 100644 index 00000000000..a82b2bac993 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/Makefile @@ -0,0 +1,20 @@ +# Makefile to build lxdialog package +# + +all: lxdialog + +# Use reursively expanded variables so we do not call gcc unless +# we really need to do so. (Do not call gcc as part of make mrproper) +CFLAGS := $(shell sh check-lxdialog.sh -ccflags) +LIBS := $(shell sh check-lxdialog.sh -ldflags gcc) + +always := $(hostprogs-y) dochecklxdialog + +%.o: %.c + $(CC) -c $(CFLAGS) -o $@ $< + +lxdialog: checklist.o menubox.o textbox.o yesno.o inputbox.o util.o lxdialog.o msgbox.o + $(CC) -o $@ $^ $(LIBS) + +clean: + rm -f *.o lxdialog diff --git a/openwrt/scripts/config/lxdialog/check-lxdialog.sh b/openwrt/scripts/config/lxdialog/check-lxdialog.sh new file mode 100644 index 00000000000..120d624e672 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/check-lxdialog.sh @@ -0,0 +1,84 @@ +#!/bin/sh +# Check ncurses compatibility + +# What library to link +ldflags() +{ + $cc -print-file-name=libncursesw.so | grep -q / + if [ $? -eq 0 ]; then + echo '-lncursesw' + exit + fi + $cc -print-file-name=libncurses.so | grep -q / + if [ $? -eq 0 ]; then + echo '-lncurses' + exit + fi + $cc -print-file-name=libcurses.so | grep -q / + if [ $? -eq 0 ]; then + echo '-lcurses' + exit + fi + exit 1 +} + +# Where is ncurses.h? +ccflags() +{ + if [ -f /usr/include/ncurses/ncurses.h ]; then + echo '-I/usr/include/ncurses -DCURSES_LOC=""' + elif [ -f /usr/include/ncurses/curses.h ]; then + echo '-I/usr/include/ncurses -DCURSES_LOC=""' + elif [ -f /usr/include/ncurses.h ]; then + echo '-DCURSES_LOC=""' + else + echo '-DCURSES_LOC=""' + fi +} + +# Temp file, try to clean up after us +tmp=.lxdialog.tmp +trap "rm -f $tmp" 0 1 2 3 15 + +# Check if we can link to ncurses +check() { + echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null + if [ $? != 0 ]; then + echo " *** Unable to find the ncurses libraries." 1>&2 + echo " *** make menuconfig require the ncurses libraries" 1>&2 + echo " *** " 1>&2 + echo " *** Install ncurses (ncurses-devel) and try again" 1>&2 + echo " *** " 1>&2 + exit 1 + fi +} + +usage() { + printf "Usage: $0 [-check compiler options|-header|-library]\n" +} + +if [ $# == 0 ]; then + usage + exit 1 +fi + +cc="" +case "$1" in + "-check") + shift + cc="$@" + check + ;; + "-ccflags") + ccflags + ;; + "-ldflags") + shift + cc="$@" + ldflags + ;; + "*") + usage + exit 1 + ;; +esac diff --git a/openwrt/scripts/config/lxdialog/checklist.c b/openwrt/scripts/config/lxdialog/checklist.c new file mode 100644 index 00000000000..db07ae73e05 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/checklist.c @@ -0,0 +1,334 @@ +/* + * checklist.c -- implements the checklist box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension + * Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static int list_width, check_x, item_x; + +/* + * Print list item + */ +static void print_item(WINDOW * win, const char *item, int status, int choice, + int selected) +{ + int i; + + /* Clear 'residue' of last item */ + wattrset(win, menubox_attr); + wmove(win, choice, 0); + for (i = 0; i < list_width; i++) + waddch(win, ' '); + + wmove(win, choice, check_x); + wattrset(win, selected ? check_selected_attr : check_attr); + wprintw(win, "(%c)", status ? 'X' : ' '); + + wattrset(win, selected ? tag_selected_attr : tag_attr); + mvwaddch(win, choice, item_x, item[0]); + wattrset(win, selected ? item_selected_attr : item_attr); + waddstr(win, (char *)item + 1); + if (selected) { + wmove(win, choice, check_x + 1); + wrefresh(win); + } +} + +/* + * Print the scroll indicators. + */ +static void print_arrows(WINDOW * win, int choice, int item_no, int scroll, + int y, int x, int height) +{ + wmove(win, y, x); + + if (scroll > 0) { + wattrset(win, uarrow_attr); + waddch(win, ACS_UARROW); + waddstr(win, "(-)"); + } else { + wattrset(win, menubox_attr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + y = y + height + 1; + wmove(win, y, x); + + if ((height < item_no) && (scroll + choice < item_no - 1)) { + wattrset(win, darrow_attr); + waddch(win, ACS_DARROW); + waddstr(win, "(+)"); + } else { + wattrset(win, menubox_border_attr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } +} + +/* + * Display the termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button(dialog, "Select", y, x, selected == 0); + print_button(dialog, " Help ", y, x + 14, selected == 1); + + wmove(dialog, y, x + 1 + 14 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box with a list of options that can be turned on or off + * in the style of radiolist (only one option turned on at a time). + */ +int dialog_checklist(const char *title, const char *prompt, int height, + int width, int list_height, int item_no, + const char *const *items) +{ + int i, x, y, box_x, box_y; + int key = 0, button = 0, choice = 0, scroll = 0, max_choice, *status; + WINDOW *dialog, *list; + + /* Allocate space for storing item on/off status */ + if ((status = malloc(sizeof(int) * item_no)) == NULL) { + endwin(); + fprintf(stderr, + "\nCan't allocate memory in dialog_checklist().\n"); + exit(-1); + } + + /* Initializes status */ + for (i = 0; i < item_no; i++) { + status[i] = !strcasecmp(items[i * 3 + 2], "on"); + if ((!choice && status[i]) + || !strcasecmp(items[i * 3 + 2], "selected")) + choice = i + 1; + } + if (choice) + choice--; + + max_choice = MIN(list_height, item_no); + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); + wattrset(dialog, border_attr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dialog_attr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dialog_attr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + list_width = width - 6; + box_y = height - list_height - 5; + box_x = (width - list_width) / 2 - 1; + + /* create new window for the list */ + list = subwin(dialog, list_height, list_width, y + box_y + 1, + x + box_x + 1); + + keypad(list, TRUE); + + /* draw a box around the list items */ + draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, + menubox_border_attr, menubox_attr); + + /* Find length of longest item in order to center checklist */ + check_x = 0; + for (i = 0; i < item_no; i++) + check_x = MAX(check_x, +strlen(items[i * 3 + 1]) + 4); + + check_x = (list_width - check_x) / 2; + item_x = check_x + 4; + + if (choice >= list_height) { + scroll = choice - list_height + 1; + choice -= scroll; + } + + /* Print the list */ + for (i = 0; i < max_choice; i++) { + print_item(list, items[(scroll + i) * 3 + 1], + status[i + scroll], i, i == choice); + } + + print_arrows(dialog, choice, item_no, scroll, + box_y, box_x + check_x + 5, list_height); + + print_buttons(dialog, height, width, 0); + + wnoutrefresh(list); + wnoutrefresh(dialog); + doupdate(); + + while (key != ESC) { + key = wgetch(dialog); + + for (i = 0; i < max_choice; i++) + if (toupper(key) == + toupper(items[(scroll + i) * 3 + 1][0])) + break; + + if (i < max_choice || key == KEY_UP || key == KEY_DOWN || + key == '+' || key == '-') { + if (key == KEY_UP || key == '-') { + if (!choice) { + if (!scroll) + continue; + /* Scroll list down */ + if (list_height > 1) { + /* De-highlight current first item */ + print_item(list, items[scroll * 3 + 1], + status[scroll], 0, FALSE); + scrollok(list, TRUE); + wscrl(list, -1); + scrollok(list, FALSE); + } + scroll--; + print_item(list, items[scroll * 3 + 1], status[scroll], 0, TRUE); + wnoutrefresh(list); + + print_arrows(dialog, choice, item_no, + scroll, box_y, box_x + check_x + 5, list_height); + + wrefresh(dialog); + + continue; /* wait for another key press */ + } else + i = choice - 1; + } else if (key == KEY_DOWN || key == '+') { + if (choice == max_choice - 1) { + if (scroll + choice >= item_no - 1) + continue; + /* Scroll list up */ + if (list_height > 1) { + /* De-highlight current last item before scrolling up */ + print_item(list, items[(scroll + max_choice - 1) * 3 + 1], + status[scroll + max_choice - 1], + max_choice - 1, FALSE); + scrollok(list, TRUE); + wscrl(list, 1); + scrollok(list, FALSE); + } + scroll++; + print_item(list, items[(scroll + max_choice - 1) * 3 + 1], + status[scroll + max_choice - 1], max_choice - 1, TRUE); + wnoutrefresh(list); + + print_arrows(dialog, choice, item_no, + scroll, box_y, box_x + check_x + 5, list_height); + + wrefresh(dialog); + + continue; /* wait for another key press */ + } else + i = choice + 1; + } + if (i != choice) { + /* De-highlight current item */ + print_item(list, items[(scroll + choice) * 3 + 1], + status[scroll + choice], choice, FALSE); + /* Highlight new item */ + choice = i; + print_item(list, items[(scroll + choice) * 3 + 1], + status[scroll + choice], choice, TRUE); + wnoutrefresh(list); + wrefresh(dialog); + } + continue; /* wait for another key press */ + } + switch (key) { + case 'H': + case 'h': + case '?': + fprintf(stderr, "%s", items[(scroll + choice) * 3]); + delwin(dialog); + free(status); + return 1; + case TAB: + case KEY_LEFT: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 1 : (button > 1 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(dialog); + break; + case 'S': + case 's': + case ' ': + case '\n': + if (!button) { + if (!status[scroll + choice]) { + for (i = 0; i < item_no; i++) + status[i] = 0; + status[scroll + choice] = 1; + for (i = 0; i < max_choice; i++) + print_item(list, items[(scroll + i) * 3 + 1], + status[scroll + i], i, i == choice); + } + wnoutrefresh(list); + wrefresh(dialog); + + for (i = 0; i < item_no; i++) + if (status[i]) + fprintf(stderr, "%s", items[i * 3]); + } else + fprintf(stderr, "%s", items[(scroll + choice) * 3]); + delwin(dialog); + free(status); + return button; + case 'X': + case 'x': + key = ESC; + case ESC: + break; + } + + /* Now, update everything... */ + doupdate(); + } + + delwin(dialog); + free(status); + return -1; /* ESC pressed */ +} diff --git a/openwrt/scripts/config/lxdialog/colors.h b/openwrt/scripts/config/lxdialog/colors.h new file mode 100644 index 00000000000..db071df12bb --- /dev/null +++ b/openwrt/scripts/config/lxdialog/colors.h @@ -0,0 +1,154 @@ +/* + * colors.h -- color attribute definitions + * + * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * Default color definitions + * + * *_FG = foreground + * *_BG = background + * *_HL = highlight? + */ +#define SCREEN_FG COLOR_CYAN +#define SCREEN_BG COLOR_BLUE +#define SCREEN_HL TRUE + +#define SHADOW_FG COLOR_BLACK +#define SHADOW_BG COLOR_BLACK +#define SHADOW_HL TRUE + +#define DIALOG_FG COLOR_BLACK +#define DIALOG_BG COLOR_WHITE +#define DIALOG_HL FALSE + +#define TITLE_FG COLOR_YELLOW +#define TITLE_BG COLOR_WHITE +#define TITLE_HL TRUE + +#define BORDER_FG COLOR_WHITE +#define BORDER_BG COLOR_WHITE +#define BORDER_HL TRUE + +#define BUTTON_ACTIVE_FG COLOR_WHITE +#define BUTTON_ACTIVE_BG COLOR_BLUE +#define BUTTON_ACTIVE_HL TRUE + +#define BUTTON_INACTIVE_FG COLOR_BLACK +#define BUTTON_INACTIVE_BG COLOR_WHITE +#define BUTTON_INACTIVE_HL FALSE + +#define BUTTON_KEY_ACTIVE_FG COLOR_WHITE +#define BUTTON_KEY_ACTIVE_BG COLOR_BLUE +#define BUTTON_KEY_ACTIVE_HL TRUE + +#define BUTTON_KEY_INACTIVE_FG COLOR_RED +#define BUTTON_KEY_INACTIVE_BG COLOR_WHITE +#define BUTTON_KEY_INACTIVE_HL FALSE + +#define BUTTON_LABEL_ACTIVE_FG COLOR_YELLOW +#define BUTTON_LABEL_ACTIVE_BG COLOR_BLUE +#define BUTTON_LABEL_ACTIVE_HL TRUE + +#define BUTTON_LABEL_INACTIVE_FG COLOR_BLACK +#define BUTTON_LABEL_INACTIVE_BG COLOR_WHITE +#define BUTTON_LABEL_INACTIVE_HL TRUE + +#define INPUTBOX_FG COLOR_BLACK +#define INPUTBOX_BG COLOR_WHITE +#define INPUTBOX_HL FALSE + +#define INPUTBOX_BORDER_FG COLOR_BLACK +#define INPUTBOX_BORDER_BG COLOR_WHITE +#define INPUTBOX_BORDER_HL FALSE + +#define SEARCHBOX_FG COLOR_BLACK +#define SEARCHBOX_BG COLOR_WHITE +#define SEARCHBOX_HL FALSE + +#define SEARCHBOX_TITLE_FG COLOR_YELLOW +#define SEARCHBOX_TITLE_BG COLOR_WHITE +#define SEARCHBOX_TITLE_HL TRUE + +#define SEARCHBOX_BORDER_FG COLOR_WHITE +#define SEARCHBOX_BORDER_BG COLOR_WHITE +#define SEARCHBOX_BORDER_HL TRUE + +#define POSITION_INDICATOR_FG COLOR_YELLOW +#define POSITION_INDICATOR_BG COLOR_WHITE +#define POSITION_INDICATOR_HL TRUE + +#define MENUBOX_FG COLOR_BLACK +#define MENUBOX_BG COLOR_WHITE +#define MENUBOX_HL FALSE + +#define MENUBOX_BORDER_FG COLOR_WHITE +#define MENUBOX_BORDER_BG COLOR_WHITE +#define MENUBOX_BORDER_HL TRUE + +#define ITEM_FG COLOR_BLACK +#define ITEM_BG COLOR_WHITE +#define ITEM_HL FALSE + +#define ITEM_SELECTED_FG COLOR_WHITE +#define ITEM_SELECTED_BG COLOR_BLUE +#define ITEM_SELECTED_HL TRUE + +#define TAG_FG COLOR_YELLOW +#define TAG_BG COLOR_WHITE +#define TAG_HL TRUE + +#define TAG_SELECTED_FG COLOR_YELLOW +#define TAG_SELECTED_BG COLOR_BLUE +#define TAG_SELECTED_HL TRUE + +#define TAG_KEY_FG COLOR_YELLOW +#define TAG_KEY_BG COLOR_WHITE +#define TAG_KEY_HL TRUE + +#define TAG_KEY_SELECTED_FG COLOR_YELLOW +#define TAG_KEY_SELECTED_BG COLOR_BLUE +#define TAG_KEY_SELECTED_HL TRUE + +#define CHECK_FG COLOR_BLACK +#define CHECK_BG COLOR_WHITE +#define CHECK_HL FALSE + +#define CHECK_SELECTED_FG COLOR_WHITE +#define CHECK_SELECTED_BG COLOR_BLUE +#define CHECK_SELECTED_HL TRUE + +#define UARROW_FG COLOR_GREEN +#define UARROW_BG COLOR_WHITE +#define UARROW_HL TRUE + +#define DARROW_FG COLOR_GREEN +#define DARROW_BG COLOR_WHITE +#define DARROW_HL TRUE + +/* End of default color definitions */ + +#define C_ATTR(x,y) ((x ? A_BOLD : 0) | COLOR_PAIR((y))) +#define COLOR_NAME_LEN 10 +#define COLOR_COUNT 8 + +/* + * Global variables + */ + +extern int color_table[][3]; diff --git a/openwrt/scripts/config/lxdialog/dialog.h b/openwrt/scripts/config/lxdialog/dialog.h new file mode 100644 index 00000000000..af3cf716e21 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/dialog.h @@ -0,0 +1,177 @@ +/* + * dialog.h -- common declarations for all dialog modules + * + * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include + +#ifdef __sun__ +#define CURS_MACROS +#endif +#include CURSES_LOC + +/* + * Colors in ncurses 1.9.9e do not work properly since foreground and + * background colors are OR'd rather than separately masked. This version + * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible + * with standard curses. The simplest fix (to make this work with standard + * curses) uses the wbkgdset() function, not used in the original hack. + * Turn it off if we're building with 1.9.9e, since it just confuses things. + */ +#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE) +#define OLD_NCURSES 1 +#undef wbkgdset +#define wbkgdset(w,p) /*nothing */ +#else +#define OLD_NCURSES 0 +#endif + +#define TR(params) _tracef params + +#define ESC 27 +#define TAB 9 +#define MAX_LEN 2048 +#define BUF_SIZE (10*1024) +#define MIN(x,y) (x < y ? x : y) +#define MAX(x,y) (x > y ? x : y) + +#ifndef ACS_ULCORNER +#define ACS_ULCORNER '+' +#endif +#ifndef ACS_LLCORNER +#define ACS_LLCORNER '+' +#endif +#ifndef ACS_URCORNER +#define ACS_URCORNER '+' +#endif +#ifndef ACS_LRCORNER +#define ACS_LRCORNER '+' +#endif +#ifndef ACS_HLINE +#define ACS_HLINE '-' +#endif +#ifndef ACS_VLINE +#define ACS_VLINE '|' +#endif +#ifndef ACS_LTEE +#define ACS_LTEE '+' +#endif +#ifndef ACS_RTEE +#define ACS_RTEE '+' +#endif +#ifndef ACS_UARROW +#define ACS_UARROW '^' +#endif +#ifndef ACS_DARROW +#define ACS_DARROW 'v' +#endif + +/* + * Attribute names + */ +#define screen_attr attributes[0] +#define shadow_attr attributes[1] +#define dialog_attr attributes[2] +#define title_attr attributes[3] +#define border_attr attributes[4] +#define button_active_attr attributes[5] +#define button_inactive_attr attributes[6] +#define button_key_active_attr attributes[7] +#define button_key_inactive_attr attributes[8] +#define button_label_active_attr attributes[9] +#define button_label_inactive_attr attributes[10] +#define inputbox_attr attributes[11] +#define inputbox_border_attr attributes[12] +#define searchbox_attr attributes[13] +#define searchbox_title_attr attributes[14] +#define searchbox_border_attr attributes[15] +#define position_indicator_attr attributes[16] +#define menubox_attr attributes[17] +#define menubox_border_attr attributes[18] +#define item_attr attributes[19] +#define item_selected_attr attributes[20] +#define tag_attr attributes[21] +#define tag_selected_attr attributes[22] +#define tag_key_attr attributes[23] +#define tag_key_selected_attr attributes[24] +#define check_attr attributes[25] +#define check_selected_attr attributes[26] +#define uarrow_attr attributes[27] +#define darrow_attr attributes[28] + +/* number of attributes */ +#define ATTRIBUTE_COUNT 29 + +/* + * Global variables + */ +extern bool use_colors; +extern bool use_shadow; + +extern chtype attributes[]; + +extern const char *backtitle; + +/* + * Function prototypes + */ +extern void create_rc(const char *filename); +extern int parse_rc(void); + +void init_dialog(void); +void end_dialog(void); +void attr_clear(WINDOW * win, int height, int width, chtype attr); +void dialog_clear(void); +void color_setup(void); +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x); +void print_button(WINDOW * win, const char *label, int y, int x, int selected); +void print_title(WINDOW *dialog, const char *title, int width); +void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box, + chtype border); +void draw_shadow(WINDOW * win, int y, int x, int height, int width); + +int first_alpha(const char *string, const char *exempt); +int dialog_yesno(const char *title, const char *prompt, int height, int width); +int dialog_msgbox(const char *title, const char *prompt, int height, + int width, int pause); +int dialog_textbox(const char *title, const char *file, int height, int width); +int dialog_menu(const char *title, const char *prompt, int height, int width, + int menu_height, const char *choice, int item_no, + const char *const *items); +int dialog_checklist(const char *title, const char *prompt, int height, + int width, int list_height, int item_no, + const char *const *items); +extern char dialog_input_result[]; +int dialog_inputbox(const char *title, const char *prompt, int height, + int width, const char *init); + +/* + * This is the base for fictitious keys, which activate + * the buttons. + * + * Mouse-generated keys are the following: + * -- the first 32 are used as numbers, in addition to '0'-'9' + * -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o') + * -- uppercase chars are used to invoke the button (M_EVENT + 'O') + */ +#define M_EVENT (KEY_MAX+1) diff --git a/openwrt/scripts/config/lxdialog/inputbox.c b/openwrt/scripts/config/lxdialog/inputbox.c new file mode 100644 index 00000000000..779503726b0 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/inputbox.c @@ -0,0 +1,224 @@ +/* + * inputbox.c -- implements the input box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +char dialog_input_result[MAX_LEN + 1]; + +/* + * Print the termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button(dialog, " Ok ", y, x, selected == 0); + print_button(dialog, " Help ", y, x + 14, selected == 1); + + wmove(dialog, y, x + 1 + 14 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box for inputing a string + */ +int dialog_inputbox(const char *title, const char *prompt, int height, int width, + const char *init) +{ + int i, x, y, box_y, box_x, box_width; + int input_x = 0, scroll = 0, key = 0, button = -1; + char *instr = dialog_input_result; + WINDOW *dialog; + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); + wattrset(dialog, border_attr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dialog_attr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dialog_attr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + /* Draw the input field box */ + box_width = width - 6; + getyx(dialog, y, x); + box_y = y + 2; + box_x = (width - box_width) / 2; + draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2, border_attr, dialog_attr); + + print_buttons(dialog, height, width, 0); + + /* Set up the initial value */ + wmove(dialog, box_y, box_x); + wattrset(dialog, inputbox_attr); + + if (!init) + instr[0] = '\0'; + else + strcpy(instr, init); + + input_x = strlen(instr); + + if (input_x >= box_width) { + scroll = input_x - box_width + 1; + input_x = box_width - 1; + for (i = 0; i < box_width - 1; i++) + waddch(dialog, instr[scroll + i]); + } else { + waddstr(dialog, instr); + } + + wmove(dialog, box_y, box_x + input_x); + + wrefresh(dialog); + + while (key != ESC) { + key = wgetch(dialog); + + if (button == -1) { /* Input box selected */ + switch (key) { + case TAB: + case KEY_UP: + case KEY_DOWN: + break; + case KEY_LEFT: + continue; + case KEY_RIGHT: + continue; + case KEY_BACKSPACE: + case 127: + if (input_x || scroll) { + wattrset(dialog, inputbox_attr); + if (!input_x) { + scroll = scroll < box_width - 1 ? 0 : scroll - (box_width - 1); + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) + waddch(dialog, + instr[scroll + input_x + i] ? + instr[scroll + input_x + i] : ' '); + input_x = strlen(instr) - scroll; + } else + input_x--; + instr[scroll + input_x] = '\0'; + mvwaddch(dialog, box_y, input_x + box_x, ' '); + wmove(dialog, box_y, input_x + box_x); + wrefresh(dialog); + } + continue; + default: + if (key < 0x100 && isprint(key)) { + if (scroll + input_x < MAX_LEN) { + wattrset(dialog, inputbox_attr); + instr[scroll + input_x] = key; + instr[scroll + input_x + 1] = '\0'; + if (input_x == box_width - 1) { + scroll++; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width - 1; i++) + waddch(dialog, instr [scroll + i]); + } else { + wmove(dialog, box_y, input_x++ + box_x); + waddch(dialog, key); + } + wrefresh(dialog); + } else + flash(); /* Alarm user about overflow */ + continue; + } + } + } + switch (key) { + case 'O': + case 'o': + delwin(dialog); + return 0; + case 'H': + case 'h': + delwin(dialog); + return 1; + case KEY_UP: + case KEY_LEFT: + switch (button) { + case -1: + button = 1; /* Indicates "Cancel" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 0: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove(dialog, box_y, box_x + input_x); + wrefresh(dialog); + break; + case 1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + } + break; + case TAB: + case KEY_DOWN: + case KEY_RIGHT: + switch (button) { + case -1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + case 0: + button = 1; /* Indicates "Cancel" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 1: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove(dialog, box_y, box_x + input_x); + wrefresh(dialog); + break; + } + break; + case ' ': + case '\n': + delwin(dialog); + return (button == -1 ? 0 : button); + case 'X': + case 'x': + key = ESC; + case ESC: + break; + } + } + + delwin(dialog); + return -1; /* ESC pressed */ +} diff --git a/openwrt/scripts/config/lxdialog/lxdialog.c b/openwrt/scripts/config/lxdialog/lxdialog.c new file mode 100644 index 00000000000..79f6c5fb5ce --- /dev/null +++ b/openwrt/scripts/config/lxdialog/lxdialog.c @@ -0,0 +1,204 @@ +/* + * dialog - Display simple dialog boxes from shell scripts + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static void Usage(const char *name); + +typedef int (jumperFn) (const char *title, int argc, const char *const *argv); + +struct Mode { + char *name; + int argmin, argmax, argmod; + jumperFn *jumper; +}; + +jumperFn j_menu, j_radiolist, j_yesno, j_textbox, j_inputbox; +jumperFn j_msgbox, j_infobox; + +static struct Mode modes[] = { + {"--menu", 9, 0, 3, j_menu}, + {"--radiolist", 9, 0, 3, j_radiolist}, + {"--yesno", 5, 5, 1, j_yesno}, + {"--textbox", 5, 5, 1, j_textbox}, + {"--inputbox", 5, 6, 1, j_inputbox}, + {"--msgbox", 5, 5, 1, j_msgbox}, + {"--infobox", 5, 5, 1, j_infobox}, + {NULL, 0, 0, 0, NULL} +}; + +static struct Mode *modePtr; + +#ifdef LOCALE +#include +#endif + +int main(int argc, const char *const *argv) +{ + int offset = 0, opt_clear = 0, end_common_opts = 0, retval; + const char *title = NULL; + +#ifdef LOCALE + (void)setlocale(LC_ALL, ""); +#endif + +#ifdef TRACE + trace(TRACE_CALLS | TRACE_UPDATE); +#endif + if (argc < 2) { + Usage(argv[0]); + exit(-1); + } + + while (offset < argc - 1 && !end_common_opts) { /* Common options */ + if (!strcmp(argv[offset + 1], "--title")) { + if (argc - offset < 3 || title != NULL) { + Usage(argv[0]); + exit(-1); + } else { + title = argv[offset + 2]; + offset += 2; + } + } else if (!strcmp(argv[offset + 1], "--backtitle")) { + if (backtitle != NULL) { + Usage(argv[0]); + exit(-1); + } else { + backtitle = argv[offset + 2]; + offset += 2; + } + } else if (!strcmp(argv[offset + 1], "--clear")) { + if (opt_clear) { /* Hey, "--clear" can't appear twice! */ + Usage(argv[0]); + exit(-1); + } else if (argc == 2) { /* we only want to clear the screen */ + init_dialog(); + refresh(); /* init_dialog() will clear the screen for us */ + end_dialog(); + return 0; + } else { + opt_clear = 1; + offset++; + } + } else /* no more common options */ + end_common_opts = 1; + } + + if (argc - 1 == offset) { /* no more options */ + Usage(argv[0]); + exit(-1); + } + /* use a table to look for the requested mode, to avoid code duplication */ + + for (modePtr = modes; modePtr->name; modePtr++) /* look for the mode */ + if (!strcmp(argv[offset + 1], modePtr->name)) + break; + + if (!modePtr->name) + Usage(argv[0]); + if (argc - offset < modePtr->argmin) + Usage(argv[0]); + if (modePtr->argmax && argc - offset > modePtr->argmax) + Usage(argv[0]); + + init_dialog(); + retval = (*(modePtr->jumper)) (title, argc - offset, argv + offset); + + if (opt_clear) { /* clear screen before exit */ + attr_clear(stdscr, LINES, COLS, screen_attr); + refresh(); + } + end_dialog(); + + exit(retval); +} + +/* + * Print program usage + */ +static void Usage(const char *name) +{ + fprintf(stderr, "\ +\ndialog, by Savio Lam (lam836@cs.cuhk.hk).\ +\n patched by Stuart Herbert (S.Herbert@shef.ac.uk)\ +\n modified/gutted for use as a Linux kernel config tool by \ +\n William Roadcap (roadcapw@cfw.com)\ +\n\ +\n* Display dialog boxes from shell scripts *\ +\n\ +\nUsage: %s --clear\ +\n %s [--title ] [--backtitle <backtitle>] --clear <Box options>\ +\n\ +\nBox options:\ +\n\ +\n --menu <text> <height> <width> <menu height> <tag1> <item1>...\ +\n --radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>...\ +\n --textbox <file> <height> <width>\ +\n --inputbox <text> <height> <width> [<init>]\ +\n --yesno <text> <height> <width>\ +\n", name, name); + exit(-1); +} + +/* + * These are the program jumpers + */ + +int j_menu(const char *t, int ac, const char *const *av) +{ + return dialog_menu(t, av[2], atoi(av[3]), atoi(av[4]), + atoi(av[5]), av[6], (ac - 6) / 2, av + 7); +} + +int j_radiolist(const char *t, int ac, const char *const *av) +{ + return dialog_checklist(t, av[2], atoi(av[3]), atoi(av[4]), + atoi(av[5]), (ac - 6) / 3, av + 6); +} + +int j_textbox(const char *t, int ac, const char *const *av) +{ + return dialog_textbox(t, av[2], atoi(av[3]), atoi(av[4])); +} + +int j_yesno(const char *t, int ac, const char *const *av) +{ + return dialog_yesno(t, av[2], atoi(av[3]), atoi(av[4])); +} + +int j_inputbox(const char *t, int ac, const char *const *av) +{ + int ret = dialog_inputbox(t, av[2], atoi(av[3]), atoi(av[4]), + ac == 6 ? av[5] : (char *)NULL); + if (ret == 0) + fprintf(stderr, dialog_input_result); + return ret; +} + +int j_msgbox(const char *t, int ac, const char *const *av) +{ + return dialog_msgbox(t, av[2], atoi(av[3]), atoi(av[4]), 1); +} + +int j_infobox(const char *t, int ac, const char *const *av) +{ + return dialog_msgbox(t, av[2], atoi(av[3]), atoi(av[4]), 0); +} diff --git a/openwrt/scripts/config/lxdialog/menubox.c b/openwrt/scripts/config/lxdialog/menubox.c new file mode 100644 index 00000000000..09512b54437 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/menubox.c @@ -0,0 +1,425 @@ +/* + * menubox.c -- implements the menu box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * Changes by Clifford Wolf (god@clifford.at) + * + * [ 1998-06-13 ] + * + * *) A bugfix for the Page-Down problem + * + * *) Formerly when I used Page Down and Page Up, the cursor would be set + * to the first position in the menu box. Now lxdialog is a bit + * smarter and works more like other menu systems (just have a look at + * it). + * + * *) Formerly if I selected something my scrolling would be broken because + * lxdialog is re-invoked by the Menuconfig shell script, can't + * remember the last scrolling position, and just sets it so that the + * cursor is at the bottom of the box. Now it writes the temporary file + * lxdialog.scrltmp which contains this information. The file is + * deleted by lxdialog if the user leaves a submenu or enters a new + * one, but it would be nice if Menuconfig could make another "rm -f" + * just to be sure. Just try it out - you will recognise a difference! + * + * [ 1998-06-14 ] + * + * *) Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files + * and menus change their size on the fly. + * + * *) If for some reason the last scrolling position is not saved by + * lxdialog, it sets the scrolling so that the selected item is in the + * middle of the menu box, not at the bottom. + * + * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net) + * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus. + * This fixes a bug in Menuconfig where using ' ' to descend into menus + * would leave mis-synchronized lxdialog.scrltmp files lying around, + * fscanf would read in 'scroll', and eventually that value would get used. + */ + +#include "dialog.h" + +#define ITEM_IDENT 1 /* Indent of menu entries. Fixed for all menus */ +static int menu_width; + +/* + * Print menu item + */ +static void do_print_item(WINDOW * win, const char *item, int choice, + int selected, int hotkey) +{ + int j; + char *menu_item = malloc(menu_width + 1); + + strncpy(menu_item, item, menu_width - ITEM_IDENT); + menu_item[menu_width] = 0; + j = first_alpha(menu_item, "YyNnMmHh"); + + /* Clear 'residue' of last item */ + wattrset(win, menubox_attr); + wmove(win, choice, 0); +#if OLD_NCURSES + { + int i; + for (i = 0; i < menu_width; i++) + waddch(win, ' '); + } +#else + wclrtoeol(win); +#endif + wattrset(win, selected ? item_selected_attr : item_attr); + mvwaddstr(win, choice, ITEM_IDENT, menu_item); + if (hotkey) { + wattrset(win, selected ? tag_key_selected_attr : tag_key_attr); + mvwaddch(win, choice, ITEM_IDENT + j, menu_item[j]); + } + if (selected) { + wmove(win, choice, ITEM_IDENT + 1); + } + free(menu_item); + wrefresh(win); +} + +#define print_item(index, choice, selected) \ +do {\ + int hotkey = (items[(index) * 2][0] != ':'); \ + do_print_item(menu, items[(index) * 2 + 1], choice, selected, hotkey); \ +} while (0) + +/* + * Print the scroll indicators. + */ +static void print_arrows(WINDOW * win, int item_no, int scroll, int y, int x, + int height) +{ + int cur_y, cur_x; + + getyx(win, cur_y, cur_x); + + wmove(win, y, x); + + if (scroll > 0) { + wattrset(win, uarrow_attr); + waddch(win, ACS_UARROW); + waddstr(win, "(-)"); + } else { + wattrset(win, menubox_attr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + y = y + height + 1; + wmove(win, y, x); + wrefresh(win); + + if ((height < item_no) && (scroll + height < item_no)) { + wattrset(win, darrow_attr); + waddch(win, ACS_DARROW); + waddstr(win, "(+)"); + } else { + wattrset(win, menubox_border_attr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + wmove(win, cur_y, cur_x); + wrefresh(win); +} + +/* + * Display the termination buttons. + */ +static void print_buttons(WINDOW * win, int height, int width, int selected) +{ + int x = width / 2 - 16; + int y = height - 2; + + print_button(win, "Select", y, x, selected == 0); + print_button(win, " Exit ", y, x + 12, selected == 1); + print_button(win, " Help ", y, x + 24, selected == 2); + + wmove(win, y, x + 1 + 12 * selected); + wrefresh(win); +} + +/* scroll up n lines (n may be negative) */ +static void do_scroll(WINDOW *win, int *scroll, int n) +{ + /* Scroll menu up */ + scrollok(win, TRUE); + wscrl(win, n); + scrollok(win, FALSE); + *scroll = *scroll + n; + wrefresh(win); +} + +/* + * Display a menu for choosing among a number of options + */ +int dialog_menu(const char *title, const char *prompt, int height, int width, + int menu_height, const char *current, int item_no, + const char *const *items) +{ + int i, j, x, y, box_x, box_y; + int key = 0, button = 0, scroll = 0, choice = 0; + int first_item = 0, max_choice; + WINDOW *dialog, *menu; + FILE *f; + + max_choice = MIN(menu_height, item_no); + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); + wattrset(dialog, border_attr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dialog_attr); + wbkgdset(dialog, dialog_attr & A_COLOR); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dialog_attr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + menu_width = width - 6; + box_y = height - menu_height - 5; + box_x = (width - menu_width) / 2 - 1; + + /* create new window for the menu */ + menu = subwin(dialog, menu_height, menu_width, + y + box_y + 1, x + box_x + 1); + keypad(menu, TRUE); + + /* draw a box around the menu items */ + draw_box(dialog, box_y, box_x, menu_height + 2, menu_width + 2, + menubox_border_attr, menubox_attr); + + /* Set choice to default item */ + for (i = 0; i < item_no; i++) + if (strcmp(current, items[i * 2]) == 0) + choice = i; + + /* get the scroll info from the temp file */ + if ((f = fopen("lxdialog.scrltmp", "r")) != NULL) { + if ((fscanf(f, "%d\n", &scroll) == 1) && (scroll <= choice) && + (scroll + max_choice > choice) && (scroll >= 0) && + (scroll + max_choice <= item_no)) { + first_item = scroll; + choice = choice - scroll; + fclose(f); + } else { + scroll = 0; + remove("lxdialog.scrltmp"); + fclose(f); + f = NULL; + } + } + if ((choice >= max_choice) || (f == NULL && choice >= max_choice / 2)) { + if (choice >= item_no - max_choice / 2) + scroll = first_item = item_no - max_choice; + else + scroll = first_item = choice - max_choice / 2; + choice = choice - scroll; + } + + /* Print the menu */ + for (i = 0; i < max_choice; i++) { + print_item(first_item + i, i, i == choice); + } + + wnoutrefresh(menu); + + print_arrows(dialog, item_no, scroll, + box_y, box_x + ITEM_IDENT + 1, menu_height); + + print_buttons(dialog, height, width, 0); + wmove(menu, choice, ITEM_IDENT + 1); + wrefresh(menu); + + while (key != ESC) { + key = wgetch(menu); + + if (key < 256 && isalpha(key)) + key = tolower(key); + + if (strchr("ynmh", key)) + i = max_choice; + else { + for (i = choice + 1; i < max_choice; i++) { + j = first_alpha(items[(scroll + i) * 2 + 1], "YyNnMmHh"); + if (key == tolower(items[(scroll + i) * 2 + 1][j])) + break; + } + if (i == max_choice) + for (i = 0; i < max_choice; i++) { + j = first_alpha(items [(scroll + i) * 2 + 1], "YyNnMmHh"); + if (key == tolower(items[(scroll + i) * 2 + 1][j])) + break; + } + } + + if (i < max_choice || + key == KEY_UP || key == KEY_DOWN || + key == '-' || key == '+' || + key == KEY_PPAGE || key == KEY_NPAGE) { + /* Remove highligt of current item */ + print_item(scroll + choice, choice, FALSE); + + if (key == KEY_UP || key == '-') { + if (choice < 2 && scroll) { + /* Scroll menu down */ + do_scroll(menu, &scroll, -1); + + print_item(scroll, 0, FALSE); + } else + choice = MAX(choice - 1, 0); + + } else if (key == KEY_DOWN || key == '+') { + print_item(scroll+choice, choice, FALSE); + + if ((choice > max_choice - 3) && + (scroll + max_choice < item_no)) { + /* Scroll menu up */ + do_scroll(menu, &scroll, 1); + + print_item(scroll+max_choice - 1, + max_choice - 1, FALSE); + } else + choice = MIN(choice + 1, max_choice - 1); + + } else if (key == KEY_PPAGE) { + scrollok(menu, TRUE); + for (i = 0; (i < max_choice); i++) { + if (scroll > 0) { + do_scroll(menu, &scroll, -1); + print_item(scroll, 0, FALSE); + } else { + if (choice > 0) + choice--; + } + } + + } else if (key == KEY_NPAGE) { + for (i = 0; (i < max_choice); i++) { + if (scroll + max_choice < item_no) { + do_scroll(menu, &scroll, 1); + print_item(scroll+max_choice-1, + max_choice - 1, FALSE); + } else { + if (choice + 1 < max_choice) + choice++; + } + } + } else + choice = i; + + print_item(scroll + choice, choice, TRUE); + + print_arrows(dialog, item_no, scroll, + box_y, box_x + ITEM_IDENT + 1, menu_height); + + wnoutrefresh(dialog); + wrefresh(menu); + + continue; /* wait for another key press */ + } + + switch (key) { + case KEY_LEFT: + case TAB: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 2 : (button > 2 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(menu); + break; + case ' ': + case 's': + case 'y': + case 'n': + case 'm': + case '/': + /* save scroll info */ + if ((f = fopen("lxdialog.scrltmp", "w")) != NULL) { + fprintf(f, "%d\n", scroll); + fclose(f); + } + delwin(dialog); + fprintf(stderr, "%s\n", items[(scroll + choice) * 2]); + switch (key) { + case 's': + return 3; + case 'y': + return 3; + case 'n': + return 4; + case 'm': + return 5; + case ' ': + return 6; + case '/': + return 7; + } + return 0; + case 'h': + case '?': + button = 2; + case '\n': + delwin(dialog); + if (button == 2) + fprintf(stderr, "%s \"%s\"\n", + items[(scroll + choice) * 2], + items[(scroll + choice) * 2 + 1] + + first_alpha(items [(scroll + choice) * 2 + 1], "")); + else + fprintf(stderr, "%s\n", + items[(scroll + choice) * 2]); + + remove("lxdialog.scrltmp"); + return button; + case 'e': + case 'x': + key = ESC; + case ESC: + break; + } + } + + delwin(dialog); + remove("lxdialog.scrltmp"); + return -1; /* ESC pressed */ +} diff --git a/openwrt/scripts/config/lxdialog/msgbox.c b/openwrt/scripts/config/lxdialog/msgbox.c new file mode 100644 index 00000000000..7323f5471f6 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/msgbox.c @@ -0,0 +1,71 @@ +/* + * msgbox.c -- implements the message box and info box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +/* + * Display a message box. Program will pause and display an "OK" button + * if the parameter 'pause' is non-zero. + */ +int dialog_msgbox(const char *title, const char *prompt, int height, int width, + int pause) +{ + int i, x, y, key = 0; + WINDOW *dialog; + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); + + print_title(dialog, title, width); + + wattrset(dialog, dialog_attr); + print_autowrap(dialog, prompt, width - 2, 1, 2); + + if (pause) { + wattrset(dialog, border_attr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dialog_attr); + waddch(dialog, ACS_RTEE); + + print_button(dialog, " Ok ", height - 2, width / 2 - 4, TRUE); + + wrefresh(dialog); + while (key != ESC && key != '\n' && key != ' ' && + key != 'O' && key != 'o' && key != 'X' && key != 'x') + key = wgetch(dialog); + } else { + key = '\n'; + wrefresh(dialog); + } + + delwin(dialog); + return key == ESC ? -1 : 0; +} diff --git a/openwrt/scripts/config/lxdialog/textbox.c b/openwrt/scripts/config/lxdialog/textbox.c new file mode 100644 index 00000000000..77848bb8e07 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/textbox.c @@ -0,0 +1,533 @@ +/* + * textbox.c -- implements the text box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static void back_lines(int n); +static void print_page(WINDOW * win, int height, int width); +static void print_line(WINDOW * win, int row, int width); +static char *get_line(void); +static void print_position(WINDOW * win, int height, int width); + +static int hscroll, fd, file_size, bytes_read; +static int begin_reached = 1, end_reached, page_length; +static char *buf, *page; + +/* + * Display text from a file in a dialog box. + */ +int dialog_textbox(const char *title, const char *file, int height, int width) +{ + int i, x, y, cur_x, cur_y, fpos, key = 0; + int passed_end; + char search_term[MAX_LEN + 1]; + WINDOW *dialog, *text; + + search_term[0] = '\0'; /* no search term entered yet */ + + /* Open input file for reading */ + if ((fd = open(file, O_RDONLY)) == -1) { + endwin(); + fprintf(stderr, "\nCan't open input file in dialog_textbox().\n"); + exit(-1); + } + /* Get file size. Actually, 'file_size' is the real file size - 1, + since it's only the last byte offset from the beginning */ + if ((file_size = lseek(fd, 0, SEEK_END)) == -1) { + endwin(); + fprintf(stderr, "\nError getting file size in dialog_textbox().\n"); + exit(-1); + } + /* Restore file pointer to beginning of file after getting file size */ + if (lseek(fd, 0, SEEK_SET) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in dialog_textbox().\n"); + exit(-1); + } + /* Allocate space for read buffer */ + if ((buf = malloc(BUF_SIZE + 1)) == NULL) { + endwin(); + fprintf(stderr, "\nCan't allocate memory in dialog_textbox().\n"); + exit(-1); + } + if ((bytes_read = read(fd, buf, BUF_SIZE)) == -1) { + endwin(); + fprintf(stderr, "\nError reading file in dialog_textbox().\n"); + exit(-1); + } + buf[bytes_read] = '\0'; /* mark end of valid data */ + page = buf; /* page is pointer to start of page to be displayed */ + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + /* Create window for text region, used for scrolling text */ + text = subwin(dialog, height - 4, width - 2, y + 1, x + 1); + wattrset(text, dialog_attr); + wbkgdset(text, dialog_attr & A_COLOR); + + keypad(text, TRUE); + + /* register the new window, along with its borders */ + draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); + + wattrset(dialog, border_attr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dialog_attr); + wbkgdset(dialog, dialog_attr & A_COLOR); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + print_button(dialog, " Exit ", height - 2, width / 2 - 4, TRUE); + wnoutrefresh(dialog); + getyx(dialog, cur_y, cur_x); /* Save cursor position */ + + /* Print first page of text */ + attr_clear(text, height - 4, width - 2, dialog_attr); + print_page(text, height - 4, width - 2); + print_position(dialog, height, width); + wmove(dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh(dialog); + + while ((key != ESC) && (key != '\n')) { + key = wgetch(dialog); + switch (key) { + case 'E': /* Exit */ + case 'e': + case 'X': + case 'x': + delwin(dialog); + free(buf); + close(fd); + return 0; + case 'g': /* First page */ + case KEY_HOME: + if (!begin_reached) { + begin_reached = 1; + /* First page not in buffer? */ + if ((fpos = lseek(fd, 0, SEEK_CUR)) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in dialog_textbox().\n"); + exit(-1); + } + if (fpos > bytes_read) { /* Yes, we have to read it in */ + if (lseek(fd, 0, SEEK_SET) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in " + "dialog_textbox().\n"); + exit(-1); + } + if ((bytes_read = + read(fd, buf, BUF_SIZE)) == -1) { + endwin(); + fprintf(stderr, "\nError reading file in dialog_textbox().\n"); + exit(-1); + } + buf[bytes_read] = '\0'; + } + page = buf; + print_page(text, height - 4, width - 2); + print_position(dialog, height, width); + wmove(dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh(dialog); + } + break; + case 'G': /* Last page */ + case KEY_END: + + end_reached = 1; + /* Last page not in buffer? */ + if ((fpos = lseek(fd, 0, SEEK_CUR)) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in dialog_textbox().\n"); + exit(-1); + } + if (fpos < file_size) { /* Yes, we have to read it in */ + if (lseek(fd, -BUF_SIZE, SEEK_END) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in dialog_textbox().\n"); + exit(-1); + } + if ((bytes_read = + read(fd, buf, BUF_SIZE)) == -1) { + endwin(); + fprintf(stderr, "\nError reading file in dialog_textbox().\n"); + exit(-1); + } + buf[bytes_read] = '\0'; + } + page = buf + bytes_read; + back_lines(height - 4); + print_page(text, height - 4, width - 2); + print_position(dialog, height, width); + wmove(dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh(dialog); + break; + case 'K': /* Previous line */ + case 'k': + case KEY_UP: + if (!begin_reached) { + back_lines(page_length + 1); + + /* We don't call print_page() here but use scrolling to ensure + faster screen update. However, 'end_reached' and + 'page_length' should still be updated, and 'page' should + point to start of next page. This is done by calling + get_line() in the following 'for' loop. */ + scrollok(text, TRUE); + wscrl(text, -1); /* Scroll text region down one line */ + scrollok(text, FALSE); + page_length = 0; + passed_end = 0; + for (i = 0; i < height - 4; i++) { + if (!i) { + /* print first line of page */ + print_line(text, 0, width - 2); + wnoutrefresh(text); + } else + /* Called to update 'end_reached' and 'page' */ + get_line(); + if (!passed_end) + page_length++; + if (end_reached && !passed_end) + passed_end = 1; + } + + print_position(dialog, height, width); + wmove(dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh(dialog); + } + break; + case 'B': /* Previous page */ + case 'b': + case KEY_PPAGE: + if (begin_reached) + break; + back_lines(page_length + height - 4); + print_page(text, height - 4, width - 2); + print_position(dialog, height, width); + wmove(dialog, cur_y, cur_x); + wrefresh(dialog); + break; + case 'J': /* Next line */ + case 'j': + case KEY_DOWN: + if (!end_reached) { + begin_reached = 0; + scrollok(text, TRUE); + scroll(text); /* Scroll text region up one line */ + scrollok(text, FALSE); + print_line(text, height - 5, width - 2); + wnoutrefresh(text); + print_position(dialog, height, width); + wmove(dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh(dialog); + } + break; + case KEY_NPAGE: /* Next page */ + case ' ': + if (end_reached) + break; + + begin_reached = 0; + print_page(text, height - 4, width - 2); + print_position(dialog, height, width); + wmove(dialog, cur_y, cur_x); + wrefresh(dialog); + break; + case '0': /* Beginning of line */ + case 'H': /* Scroll left */ + case 'h': + case KEY_LEFT: + if (hscroll <= 0) + break; + + if (key == '0') + hscroll = 0; + else + hscroll--; + /* Reprint current page to scroll horizontally */ + back_lines(page_length); + print_page(text, height - 4, width - 2); + wmove(dialog, cur_y, cur_x); + wrefresh(dialog); + break; + case 'L': /* Scroll right */ + case 'l': + case KEY_RIGHT: + if (hscroll >= MAX_LEN) + break; + hscroll++; + /* Reprint current page to scroll horizontally */ + back_lines(page_length); + print_page(text, height - 4, width - 2); + wmove(dialog, cur_y, cur_x); + wrefresh(dialog); + break; + case ESC: + break; + } + } + + delwin(dialog); + free(buf); + close(fd); + return -1; /* ESC pressed */ +} + +/* + * Go back 'n' lines in text file. Called by dialog_textbox(). + * 'page' will be updated to point to the desired line in 'buf'. + */ +static void back_lines(int n) +{ + int i, fpos; + + begin_reached = 0; + /* We have to distinguish between end_reached and !end_reached + since at end of file, the line is not ended by a '\n'. + The code inside 'if' basically does a '--page' to move one + character backward so as to skip '\n' of the previous line */ + if (!end_reached) { + /* Either beginning of buffer or beginning of file reached? */ + if (page == buf) { + if ((fpos = lseek(fd, 0, SEEK_CUR)) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in " + "back_lines().\n"); + exit(-1); + } + if (fpos > bytes_read) { /* Not beginning of file yet */ + /* We've reached beginning of buffer, but not beginning of + file yet, so read previous part of file into buffer. + Note that we only move backward for BUF_SIZE/2 bytes, + but not BUF_SIZE bytes to avoid re-reading again in + print_page() later */ + /* Really possible to move backward BUF_SIZE/2 bytes? */ + if (fpos < BUF_SIZE / 2 + bytes_read) { + /* No, move less then */ + if (lseek(fd, 0, SEEK_SET) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in " + "back_lines().\n"); + exit(-1); + } + page = buf + fpos - bytes_read; + } else { /* Move backward BUF_SIZE/2 bytes */ + if (lseek (fd, -(BUF_SIZE / 2 + bytes_read), SEEK_CUR) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer " + "in back_lines().\n"); + exit(-1); + } + page = buf + BUF_SIZE / 2; + } + if ((bytes_read = + read(fd, buf, BUF_SIZE)) == -1) { + endwin(); + fprintf(stderr, "\nError reading file in back_lines().\n"); + exit(-1); + } + buf[bytes_read] = '\0'; + } else { /* Beginning of file reached */ + begin_reached = 1; + return; + } + } + if (*(--page) != '\n') { /* '--page' here */ + /* Something's wrong... */ + endwin(); + fprintf(stderr, "\nInternal error in back_lines().\n"); + exit(-1); + } + } + /* Go back 'n' lines */ + for (i = 0; i < n; i++) + do { + if (page == buf) { + if ((fpos = lseek(fd, 0, SEEK_CUR)) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in back_lines().\n"); + exit(-1); + } + if (fpos > bytes_read) { + /* Really possible to move backward BUF_SIZE/2 bytes? */ + if (fpos < BUF_SIZE / 2 + bytes_read) { + /* No, move less then */ + if (lseek(fd, 0, SEEK_SET) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer " + "in back_lines().\n"); + exit(-1); + } + page = buf + fpos - bytes_read; + } else { /* Move backward BUF_SIZE/2 bytes */ + if (lseek (fd, -(BUF_SIZE / 2 + bytes_read), SEEK_CUR) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer" + " in back_lines().\n"); + exit(-1); + } + page = buf + BUF_SIZE / 2; + } + if ((bytes_read = + read(fd, buf, BUF_SIZE)) == -1) { + endwin(); + fprintf(stderr, "\nError reading file in " + "back_lines().\n"); + exit(-1); + } + buf[bytes_read] = '\0'; + } else { /* Beginning of file reached */ + begin_reached = 1; + return; + } + } + } while (*(--page) != '\n'); + page++; +} + +/* + * Print a new page of text. Called by dialog_textbox(). + */ +static void print_page(WINDOW * win, int height, int width) +{ + int i, passed_end = 0; + + page_length = 0; + for (i = 0; i < height; i++) { + print_line(win, i, width); + if (!passed_end) + page_length++; + if (end_reached && !passed_end) + passed_end = 1; + } + wnoutrefresh(win); +} + +/* + * Print a new line of text. Called by dialog_textbox() and print_page(). + */ +static void print_line(WINDOW * win, int row, int width) +{ + int y, x; + char *line; + + line = get_line(); + line += MIN(strlen(line), hscroll); /* Scroll horizontally */ + wmove(win, row, 0); /* move cursor to correct line */ + waddch(win, ' '); + waddnstr(win, line, MIN(strlen(line), width - 2)); + + getyx(win, y, x); + /* Clear 'residue' of previous line */ +#if OLD_NCURSES + { + int i; + for (i = 0; i < width - x; i++) + waddch(win, ' '); + } +#else + wclrtoeol(win); +#endif +} + +/* + * Return current line of text. Called by dialog_textbox() and print_line(). + * 'page' should point to start of current line before calling, and will be + * updated to point to start of next line. + */ +static char *get_line(void) +{ + int i = 0, fpos; + static char line[MAX_LEN + 1]; + + end_reached = 0; + while (*page != '\n') { + if (*page == '\0') { + /* Either end of file or end of buffer reached */ + if ((fpos = lseek(fd, 0, SEEK_CUR)) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in " + "get_line().\n"); + exit(-1); + } + if (fpos < file_size) { /* Not end of file yet */ + /* We've reached end of buffer, but not end of file yet, + so read next part of file into buffer */ + if ((bytes_read = + read(fd, buf, BUF_SIZE)) == -1) { + endwin(); + fprintf(stderr, "\nError reading file in get_line().\n"); + exit(-1); + } + buf[bytes_read] = '\0'; + page = buf; + } else { + if (!end_reached) + end_reached = 1; + break; + } + } else if (i < MAX_LEN) + line[i++] = *(page++); + else { + /* Truncate lines longer than MAX_LEN characters */ + if (i == MAX_LEN) + line[i++] = '\0'; + page++; + } + } + if (i <= MAX_LEN) + line[i] = '\0'; + if (!end_reached) + page++; /* move pass '\n' */ + + return line; +} + +/* + * Print current position + */ +static void print_position(WINDOW * win, int height, int width) +{ + int fpos, percent; + + if ((fpos = lseek(fd, 0, SEEK_CUR)) == -1) { + endwin(); + fprintf(stderr, "\nError moving file pointer in print_position().\n"); + exit(-1); + } + wattrset(win, position_indicator_attr); + wbkgdset(win, position_indicator_attr & A_COLOR); + percent = !file_size ? + 100 : ((fpos - bytes_read + page - buf) * 100) / file_size; + wmove(win, height - 3, width - 9); + wprintw(win, "(%3d%%)", percent); +} diff --git a/openwrt/scripts/config/lxdialog/util.c b/openwrt/scripts/config/lxdialog/util.c new file mode 100644 index 00000000000..f82cebb9ff0 --- /dev/null +++ b/openwrt/scripts/config/lxdialog/util.c @@ -0,0 +1,362 @@ +/* + * util.c + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +/* use colors by default? */ +bool use_colors = 1; + +const char *backtitle = NULL; + +/* + * Attribute values, default is for mono display + */ +chtype attributes[] = { + A_NORMAL, /* screen_attr */ + A_NORMAL, /* shadow_attr */ + A_NORMAL, /* dialog_attr */ + A_BOLD, /* title_attr */ + A_NORMAL, /* border_attr */ + A_REVERSE, /* button_active_attr */ + A_DIM, /* button_inactive_attr */ + A_REVERSE, /* button_key_active_attr */ + A_BOLD, /* button_key_inactive_attr */ + A_REVERSE, /* button_label_active_attr */ + A_NORMAL, /* button_label_inactive_attr */ + A_NORMAL, /* inputbox_attr */ + A_NORMAL, /* inputbox_border_attr */ + A_NORMAL, /* searchbox_attr */ + A_BOLD, /* searchbox_title_attr */ + A_NORMAL, /* searchbox_border_attr */ + A_BOLD, /* position_indicator_attr */ + A_NORMAL, /* menubox_attr */ + A_NORMAL, /* menubox_border_attr */ + A_NORMAL, /* item_attr */ + A_REVERSE, /* item_selected_attr */ + A_BOLD, /* tag_attr */ + A_REVERSE, /* tag_selected_attr */ + A_BOLD, /* tag_key_attr */ + A_REVERSE, /* tag_key_selected_attr */ + A_BOLD, /* check_attr */ + A_REVERSE, /* check_selected_attr */ + A_BOLD, /* uarrow_attr */ + A_BOLD /* darrow_attr */ +}; + +#include "colors.h" + +/* + * Table of color values + */ +int color_table[][3] = { + {SCREEN_FG, SCREEN_BG, SCREEN_HL}, + {SHADOW_FG, SHADOW_BG, SHADOW_HL}, + {DIALOG_FG, DIALOG_BG, DIALOG_HL}, + {TITLE_FG, TITLE_BG, TITLE_HL}, + {BORDER_FG, BORDER_BG, BORDER_HL}, + {BUTTON_ACTIVE_FG, BUTTON_ACTIVE_BG, BUTTON_ACTIVE_HL}, + {BUTTON_INACTIVE_FG, BUTTON_INACTIVE_BG, BUTTON_INACTIVE_HL}, + {BUTTON_KEY_ACTIVE_FG, BUTTON_KEY_ACTIVE_BG, BUTTON_KEY_ACTIVE_HL}, + {BUTTON_KEY_INACTIVE_FG, BUTTON_KEY_INACTIVE_BG, + BUTTON_KEY_INACTIVE_HL}, + {BUTTON_LABEL_ACTIVE_FG, BUTTON_LABEL_ACTIVE_BG, + BUTTON_LABEL_ACTIVE_HL}, + {BUTTON_LABEL_INACTIVE_FG, BUTTON_LABEL_INACTIVE_BG, + BUTTON_LABEL_INACTIVE_HL}, + {INPUTBOX_FG, INPUTBOX_BG, INPUTBOX_HL}, + {INPUTBOX_BORDER_FG, INPUTBOX_BORDER_BG, INPUTBOX_BORDER_HL}, + {SEARCHBOX_FG, SEARCHBOX_BG, SEARCHBOX_HL}, + {SEARCHBOX_TITLE_FG, SEARCHBOX_TITLE_BG, SEARCHBOX_TITLE_HL}, + {SEARCHBOX_BORDER_FG, SEARCHBOX_BORDER_BG, SEARCHBOX_BORDER_HL}, + {POSITION_INDICATOR_FG, POSITION_INDICATOR_BG, POSITION_INDICATOR_HL}, + {MENUBOX_FG, MENUBOX_BG, MENUBOX_HL}, + {MENUBOX_BORDER_FG, MENUBOX_BORDER_BG, MENUBOX_BORDER_HL}, + {ITEM_FG, ITEM_BG, ITEM_HL}, + {ITEM_SELECTED_FG, ITEM_SELECTED_BG, ITEM_SELECTED_HL}, + {TAG_FG, TAG_BG, TAG_HL}, + {TAG_SELECTED_FG, TAG_SELECTED_BG, TAG_SELECTED_HL}, + {TAG_KEY_FG, TAG_KEY_BG, TAG_KEY_HL}, + {TAG_KEY_SELECTED_FG, TAG_KEY_SELECTED_BG, TAG_KEY_SELECTED_HL}, + {CHECK_FG, CHECK_BG, CHECK_HL}, + {CHECK_SELECTED_FG, CHECK_SELECTED_BG, CHECK_SELECTED_HL}, + {UARROW_FG, UARROW_BG, UARROW_HL}, + {DARROW_FG, DARROW_BG, DARROW_HL}, +}; /* color_table */ + +/* + * Set window to attribute 'attr' + */ +void attr_clear(WINDOW * win, int height, int width, chtype attr) +{ + int i, j; + + wattrset(win, attr); + for (i = 0; i < height; i++) { + wmove(win, i, 0); + for (j = 0; j < width; j++) + waddch(win, ' '); + } + touchwin(win); +} + +void dialog_clear(void) +{ + attr_clear(stdscr, LINES, COLS, screen_attr); + /* Display background title if it exists ... - SLH */ + if (backtitle != NULL) { + int i; + + wattrset(stdscr, screen_attr); + mvwaddstr(stdscr, 0, 1, (char *)backtitle); + wmove(stdscr, 1, 1); + for (i = 1; i < COLS - 1; i++) + waddch(stdscr, ACS_HLINE); + } + wnoutrefresh(stdscr); +} + +/* + * Do some initialization for dialog + */ +void init_dialog(void) +{ + initscr(); /* Init curses */ + keypad(stdscr, TRUE); + cbreak(); + noecho(); + + if (use_colors) /* Set up colors */ + color_setup(); + + dialog_clear(); +} + +/* + * Setup for color display + */ +void color_setup(void) +{ + int i; + + if (has_colors()) { /* Terminal supports color? */ + start_color(); + + /* Initialize color pairs */ + for (i = 0; i < ATTRIBUTE_COUNT; i++) + init_pair(i + 1, color_table[i][0], color_table[i][1]); + + /* Setup color attributes */ + for (i = 0; i < ATTRIBUTE_COUNT; i++) + attributes[i] = C_ATTR(color_table[i][2], i + 1); + } +} + +/* + * End using dialog functions. + */ +void end_dialog(void) +{ + endwin(); +} + +/* Print the title of the dialog. Center the title and truncate + * tile if wider than dialog (- 2 chars). + **/ +void print_title(WINDOW *dialog, const char *title, int width) +{ + if (title) { + int tlen = MIN(width - 2, strlen(title)); + wattrset(dialog, title_attr); + mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); + mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); + waddch(dialog, ' '); + } +} + +/* + * Print a string of text in a window, automatically wrap around to the + * next line if the string is too long to fit on one line. Newline + * characters '\n' are replaced by spaces. We start on a new line + * if there is no room for at least 4 nonblanks following a double-space. + */ +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) +{ + int newl, cur_x, cur_y; + int i, prompt_len, room, wlen; + char tempstr[MAX_LEN + 1], *word, *sp, *sp2; + + strcpy(tempstr, prompt); + + prompt_len = strlen(tempstr); + + /* + * Remove newlines + */ + for (i = 0; i < prompt_len; i++) { + if (tempstr[i] == '\n') + tempstr[i] = ' '; + } + + if (prompt_len <= width - x * 2) { /* If prompt is short */ + wmove(win, y, (width - prompt_len) / 2); + waddstr(win, tempstr); + } else { + cur_x = x; + cur_y = y; + newl = 1; + word = tempstr; + while (word && *word) { + sp = index(word, ' '); + if (sp) + *sp++ = 0; + + /* Wrap to next line if either the word does not fit, + or it is the first word of a new sentence, and it is + short, and the next word does not fit. */ + room = width - cur_x; + wlen = strlen(word); + if (wlen > room || + (newl && wlen < 4 && sp + && wlen + 1 + strlen(sp) > room + && (!(sp2 = index(sp, ' ')) + || wlen + 1 + (sp2 - sp) > room))) { + cur_y++; + cur_x = x; + } + wmove(win, cur_y, cur_x); + waddstr(win, word); + getyx(win, cur_y, cur_x); + cur_x++; + if (sp && *sp == ' ') { + cur_x++; /* double space */ + while (*++sp == ' ') ; + newl = 1; + } else + newl = 0; + word = sp; + } + } +} + +/* + * Print a button + */ +void print_button(WINDOW * win, const char *label, int y, int x, int selected) +{ + int i, temp; + + wmove(win, y, x); + wattrset(win, selected ? button_active_attr : button_inactive_attr); + waddstr(win, "<"); + temp = strspn(label, " "); + label += temp; + wattrset(win, selected ? button_label_active_attr + : button_label_inactive_attr); + for (i = 0; i < temp; i++) + waddch(win, ' '); + wattrset(win, selected ? button_key_active_attr + : button_key_inactive_attr); + waddch(win, label[0]); + wattrset(win, selected ? button_label_active_attr + : button_label_inactive_attr); + waddstr(win, (char *)label + 1); + wattrset(win, selected ? button_active_attr : button_inactive_attr); + waddstr(win, ">"); + wmove(win, y, x + temp + 1); +} + +/* + * Draw a rectangular box with line drawing characters + */ +void +draw_box(WINDOW * win, int y, int x, int height, int width, + chtype box, chtype border) +{ + int i, j; + + wattrset(win, 0); + for (i = 0; i < height; i++) { + wmove(win, y + i, x); + for (j = 0; j < width; j++) + if (!i && !j) + waddch(win, border | ACS_ULCORNER); + else if (i == height - 1 && !j) + waddch(win, border | ACS_LLCORNER); + else if (!i && j == width - 1) + waddch(win, box | ACS_URCORNER); + else if (i == height - 1 && j == width - 1) + waddch(win, box | ACS_LRCORNER); + else if (!i) + waddch(win, border | ACS_HLINE); + else if (i == height - 1) + waddch(win, box | ACS_HLINE); + else if (!j) + waddch(win, border | ACS_VLINE); + else if (j == width - 1) + waddch(win, box | ACS_VLINE); + else + waddch(win, box | ' '); + } +} + +/* + * Draw shadows along the right and bottom edge to give a more 3D look + * to the boxes + */ +void draw_shadow(WINDOW * win, int y, int x, int height, int width) +{ + int i; + + if (has_colors()) { /* Whether terminal supports color? */ + wattrset(win, shadow_attr); + wmove(win, y + height, x + 2); + for (i = 0; i < width; i++) + waddch(win, winch(win) & A_CHARTEXT); + for (i = y + 1; i < y + height + 1; i++) { + wmove(win, i, x + width); + waddch(win, winch(win) & A_CHARTEXT); + waddch(win, winch(win) & A_CHARTEXT); + } + wnoutrefresh(win); + } +} + +/* + * Return the position of the first alphabetic character in a string. + */ +int first_alpha(const char *string, const char *exempt) +{ + int i, in_paren = 0, c; + + for (i = 0; i < strlen(string); i++) { + c = tolower(string[i]); + + if (strchr("<[(", c)) + ++in_paren; + if (strchr(">])", c) && in_paren > 0) + --in_paren; + + if ((!in_paren) && isalpha(c) && strchr(exempt, c) == 0) + return i; + } + + return 0; +} diff --git a/openwrt/scripts/config/lxdialog/yesno.c b/openwrt/scripts/config/lxdialog/yesno.c new file mode 100644 index 00000000000..cb2568aae3e --- /dev/null +++ b/openwrt/scripts/config/lxdialog/yesno.c @@ -0,0 +1,102 @@ +/* + * yesno.c -- implements the yes/no box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +/* + * Display termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 10; + int y = height - 2; + + print_button(dialog, " Yes ", y, x, selected == 0); + print_button(dialog, " No ", y, x + 13, selected == 1); + + wmove(dialog, y, x + 1 + 13 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box with two buttons - Yes and No + */ +int dialog_yesno(const char *title, const char *prompt, int height, int width) +{ + int i, x, y, key = 0, button = 0; + WINDOW *dialog; + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); + wattrset(dialog, border_attr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dialog_attr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dialog_attr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + print_buttons(dialog, height, width, 0); + + while (key != ESC) { + key = wgetch(dialog); + switch (key) { + case 'Y': + case 'y': + delwin(dialog); + return 0; + case 'N': + case 'n': + delwin(dialog); + return 1; + + case TAB: + case KEY_LEFT: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(dialog); + break; + case ' ': + case '\n': + delwin(dialog); + return button; + case ESC: + break; + } + } + + delwin(dialog); + return -1; /* ESC pressed */ +} diff --git a/openwrt/scripts/config/mconf.c b/openwrt/scripts/config/mconf.c new file mode 100644 index 00000000000..bb82bbe49fc --- /dev/null +++ b/openwrt/scripts/config/mconf.c @@ -0,0 +1,1098 @@ +/* + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> + * Released under the terms of the GNU GPL v2.0. + * + * Introduced single menu mode (show all sub-menus in one large tree). + * 2002-11-06 Petr Baudis <pasky@ucw.cz> + * + * i18n, 2005, Arnaldo Carvalho de Melo <acme@conectiva.com.br> + */ + +#include <sys/ioctl.h> +#include <sys/wait.h> +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <limits.h> +#include <signal.h> +#include <stdarg.h> +#include <stdlib.h> +#include <string.h> +#include <termios.h> +#include <unistd.h> +#include <locale.h> + +#define LKC_DIRECT_LINK +#include "lkc.h" + +static char menu_backtitle[128]; +static const char mconf_readme[] = N_( +"Overview\n" +"--------\n" +"Some kernel features may be built directly into the kernel.\n" +"Some may be made into loadable runtime modules. Some features\n" +"may be completely removed altogether. There are also certain\n" +"kernel parameters which are not really features, but must be\n" +"entered in as decimal or hexadecimal numbers or possibly text.\n" +"\n" +"Menu items beginning with [*], <M> or [ ] represent features\n" +"configured to be built in, modularized or removed respectively.\n" +"Pointed brackets <> represent module capable features.\n" +"\n" +"To change any of these features, highlight it with the cursor\n" +"keys and press <Y> to build it in, <M> to make it a module or\n" +"<N> to removed it. You may also press the <Space Bar> to cycle\n" +"through the available options (ie. Y->N->M->Y).\n" +"\n" +"Some additional keyboard hints:\n" +"\n" +"Menus\n" +"----------\n" +"o Use the Up/Down arrow keys (cursor keys) to highlight the item\n" +" you wish to change or submenu wish to select and press <Enter>.\n" +" Submenus are designated by \"--->\".\n" +"\n" +" Shortcut: Press the option's highlighted letter (hotkey).\n" +" Pressing a hotkey more than once will sequence\n" +" through all visible items which use that hotkey.\n" +"\n" +" You may also use the <PAGE UP> and <PAGE DOWN> keys to scroll\n" +" unseen options into view.\n" +"\n" +"o To exit a menu use the cursor keys to highlight the <Exit> button\n" +" and press <ENTER>.\n" +"\n" +" Shortcut: Press <ESC><ESC> or <E> or <X> if there is no hotkey\n" +" using those letters. You may press a single <ESC>, but\n" +" there is a delayed response which you may find annoying.\n" +"\n" +" Also, the <TAB> and cursor keys will cycle between <Select>,\n" +" <Exit> and <Help>\n" +"\n" +"o To get help with an item, use the cursor keys to highlight <Help>\n" +" and Press <ENTER>.\n" +"\n" +" Shortcut: Press <H> or <?>.\n" +"\n" +"\n" +"Radiolists (Choice lists)\n" +"-----------\n" +"o Use the cursor keys to select the option you wish to set and press\n" +" <S> or the <SPACE BAR>.\n" +"\n" +" Shortcut: Press the first letter of the option you wish to set then\n" +" press <S> or <SPACE BAR>.\n" +"\n" +"o To see available help for the item, use the cursor keys to highlight\n" +" <Help> and Press <ENTER>.\n" +"\n" +" Shortcut: Press <H> or <?>.\n" +"\n" +" Also, the <TAB> and cursor keys will cycle between <Select> and\n" +" <Help>\n" +"\n" +"\n" +"Data Entry\n" +"-----------\n" +"o Enter the requested information and press <ENTER>\n" +" If you are entering hexadecimal values, it is not necessary to\n" +" add the '0x' prefix to the entry.\n" +"\n" +"o For help, use the <TAB> or cursor keys to highlight the help option\n" +" and press <ENTER>. You can try <TAB><H> as well.\n" +"\n" +"\n" +"Text Box (Help Window)\n" +"--------\n" +"o Use the cursor keys to scroll up/down/left/right. The VI editor\n" +" keys h,j,k,l function here as do <SPACE BAR> and <B> for those\n" +" who are familiar with less and lynx.\n" +"\n" +"o Press <E>, <X>, <Enter> or <Esc><Esc> to exit.\n" +"\n" +"\n" +"Alternate Configuration Files\n" +"-----------------------------\n" +"Menuconfig supports the use of alternate configuration files for\n" +"those who, for various reasons, find it necessary to switch\n" +"between different kernel configurations.\n" +"\n" +"At the end of the main menu you will find two options. One is\n" +"for saving the current configuration to a file of your choosing.\n" +"The other option is for loading a previously saved alternate\n" +"configuration.\n" +"\n" +"Even if you don't use alternate configuration files, but you\n" +"find during a Menuconfig session that you have completely messed\n" +"up your settings, you may use the \"Load Alternate...\" option to\n" +"restore your previously saved settings from \".config\" without\n" +"restarting Menuconfig.\n" +"\n" +"Other information\n" +"-----------------\n" +"If you use Menuconfig in an XTERM window make sure you have your\n" +"$TERM variable set to point to a xterm definition which supports color.\n" +"Otherwise, Menuconfig will look rather bad. Menuconfig will not\n" +"display correctly in a RXVT window because rxvt displays only one\n" +"intensity of color, bright.\n" +"\n" +"Menuconfig will display larger menus on screens or xterms which are\n" +"set to display more than the standard 25 row by 80 column geometry.\n" +"In order for this to work, the \"stty size\" command must be able to\n" +"display the screen's current row and column geometry. I STRONGLY\n" +"RECOMMEND that you make sure you do NOT have the shell variables\n" +"LINES and COLUMNS exported into your environment. Some distributions\n" +"export those variables via /etc/profile. Some ncurses programs can\n" +"become confused when those variables (LINES & COLUMNS) don't reflect\n" +"the true screen size.\n" +"\n" +"Optional personality available\n" +"------------------------------\n" +"If you prefer to have all of the kernel options listed in a single\n" +"menu, rather than the default multimenu hierarchy, run the menuconfig\n" +"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n" +"\n" +"make MENUCONFIG_MODE=single_menu menuconfig\n" +"\n" +"<Enter> will then unroll the appropriate category, or enfold it if it\n" +"is already unrolled.\n" +"\n" +"Note that this mode can eventually be a little more CPU expensive\n" +"(especially with a larger number of unrolled categories) than the\n" +"default mode.\n"), +menu_instructions[] = N_( + "Arrow keys navigate the menu. " + "<Enter> selects submenus --->. " + "Highlighted letters are hotkeys. " + "Pressing <Y> includes, <N> excludes, <M> modularizes features. " + "Press <Esc><Esc> to exit, <?> for Help, </> for Search. " + "Legend: [*] built-in [ ] excluded <M> module < > module capable"), +radiolist_instructions[] = N_( + "Use the arrow keys to navigate this window or " + "press the hotkey of the item you wish to select " + "followed by the <SPACE BAR>. " + "Press <?> for additional information about this option."), +inputbox_instructions_int[] = N_( + "Please enter a decimal value. " + "Fractions will not be accepted. " + "Use the <TAB> key to move from the input field to the buttons below it."), +inputbox_instructions_hex[] = N_( + "Please enter a hexadecimal value. " + "Use the <TAB> key to move from the input field to the buttons below it."), +inputbox_instructions_string[] = N_( + "Please enter a string value. " + "Use the <TAB> key to move from the input field to the buttons below it."), +setmod_text[] = N_( + "This feature depends on another which has been configured as a module.\n" + "As a result, this feature will be built as a module."), +nohelp_text[] = N_( + "There is no help available for this kernel option.\n"), +load_config_text[] = N_( + "Enter the name of the configuration file you wish to load. " + "Accept the name shown to restore the configuration you " + "last retrieved. Leave blank to abort."), +load_config_help[] = N_( + "\n" + "For various reasons, one may wish to keep several different kernel\n" + "configurations available on a single machine.\n" + "\n" + "If you have saved a previous configuration in a file other than the\n" + "kernel's default, entering the name of the file here will allow you\n" + "to modify that configuration.\n" + "\n" + "If you are uncertain, then you have probably never used alternate\n" + "configuration files. You should therefor leave this blank to abort.\n"), +save_config_text[] = N_( + "Enter a filename to which this configuration should be saved " + "as an alternate. Leave blank to abort."), +save_config_help[] = N_( + "\n" + "For various reasons, one may wish to keep different kernel\n" + "configurations available on a single machine.\n" + "\n" + "Entering a file name here will allow you to later retrieve, modify\n" + "and use the current configuration as an alternate to whatever\n" + "configuration options you have selected at that time.\n" + "\n" + "If you are uncertain what all this means then you should probably\n" + "leave this blank.\n"), +search_help[] = N_( + "\n" + "Search for CONFIG_ symbols and display their relations.\n" + "Regular expressions are allowed.\n" + "Example: search for \"^FOO\"\n" + "Result:\n" + "-----------------------------------------------------------------\n" + "Symbol: FOO [=m]\n" + "Prompt: Foo bus is used to drive the bar HW\n" + "Defined at drivers/pci/Kconfig:47\n" + "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" + "Location:\n" + " -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n" + " -> PCI support (PCI [=y])\n" + " -> PCI access mode (<choice> [=y])\n" + "Selects: LIBCRC32\n" + "Selected by: BAR\n" + "-----------------------------------------------------------------\n" + "o The line 'Prompt:' shows the text used in the menu structure for\n" + " this CONFIG_ symbol\n" + "o The 'Defined at' line tell at what file / line number the symbol\n" + " is defined\n" + "o The 'Depends on:' line tell what symbols needs to be defined for\n" + " this symbol to be visible in the menu (selectable)\n" + "o The 'Location:' lines tell where in the menu structure this symbol\n" + " is located\n" + " A location followed by a [=y] indicate that this is a selectable\n" + " menu item - and current value is displayed inside brackets.\n" + "o The 'Selects:' line tell what symbol will be automatically\n" + " selected if this symbol is selected (y or m)\n" + "o The 'Selected by' line tell what symbol has selected this symbol\n" + "\n" + "Only relevant lines are shown.\n" + "\n\n" + "Search examples:\n" + "Examples: USB => find all CONFIG_ symbols containing USB\n" + " ^USB => find all CONFIG_ symbols starting with USB\n" + " USB$ => find all CONFIG_ symbols ending with USB\n" + "\n"); + +static char buf[4096], *bufptr = buf; +static char input_buf[4096]; +static char filename[PATH_MAX+1] = ".config"; +static char *args[1024], **argptr = args; +static int indent; +static struct termios ios_org; +static int rows = 0, cols = 0; +static struct menu *current_menu; +static int child_count; +static int do_resize; +static int single_menu_mode; + +static void conf(struct menu *menu); +static void conf_choice(struct menu *menu); +static void conf_string(struct menu *menu); +static void conf_load(void); +static void conf_save(void); +static void show_textbox(const char *title, const char *text, int r, int c); +static void show_helptext(const char *title, const char *text); +static void show_help(struct menu *menu); +static void show_file(const char *filename, const char *title, int r, int c); + +static void cprint_init(void); +static int cprint1(const char *fmt, ...); +static void cprint_done(void); +static int cprint(const char *fmt, ...); + +static void init_wsize(void) +{ + struct winsize ws; + char *env; + + if (!ioctl(STDIN_FILENO, TIOCGWINSZ, &ws)) { + rows = ws.ws_row; + cols = ws.ws_col; + } + + if (!rows) { + env = getenv("LINES"); + if (env) + rows = atoi(env); + if (!rows) + rows = 24; + } + if (!cols) { + env = getenv("COLUMNS"); + if (env) + cols = atoi(env); + if (!cols) + cols = 80; + } + + if (rows < 19 || cols < 80) { + fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); + fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n")); + exit(1); + } + + rows -= 4; + cols -= 5; +} + +static void cprint_init(void) +{ + bufptr = buf; + argptr = args; + memset(args, 0, sizeof(args)); + indent = 0; + child_count = 0; + cprint("./scripts/config/lxdialog/lxdialog"); + cprint("--backtitle"); + cprint(menu_backtitle); +} + +static int cprint1(const char *fmt, ...) +{ + va_list ap; + int res; + + if (!*argptr) + *argptr = bufptr; + va_start(ap, fmt); + res = vsprintf(bufptr, fmt, ap); + va_end(ap); + bufptr += res; + + return res; +} + +static void cprint_done(void) +{ + *bufptr++ = 0; + argptr++; +} + +static int cprint(const char *fmt, ...) +{ + va_list ap; + int res; + + *argptr++ = bufptr; + va_start(ap, fmt); + res = vsprintf(bufptr, fmt, ap); + va_end(ap); + bufptr += res; + *bufptr++ = 0; + + return res; +} + +static void get_prompt_str(struct gstr *r, struct property *prop) +{ + int i, j; + struct menu *submenu[8], *menu; + + str_printf(r, "Prompt: %s\n", prop->text); + str_printf(r, " Defined at %s:%d\n", prop->menu->file->name, + prop->menu->lineno); + if (!expr_is_yes(prop->visible.expr)) { + str_append(r, " Depends on: "); + expr_gstr_print(prop->visible.expr, r); + str_append(r, "\n"); + } + menu = prop->menu->parent; + for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) + submenu[i++] = menu; + if (i > 0) { + str_printf(r, " Location:\n"); + for (j = 4; --i >= 0; j += 2) { + menu = submenu[i]; + str_printf(r, "%*c-> %s", j, ' ', menu_get_prompt(menu)); + if (menu->sym) { + str_printf(r, " (%s [=%s])", menu->sym->name ? + menu->sym->name : "<choice>", + sym_get_string_value(menu->sym)); + } + str_append(r, "\n"); + } + } +} + +static void get_symbol_str(struct gstr *r, struct symbol *sym) +{ + bool hit; + struct property *prop; + + str_printf(r, "Symbol: %s [=%s]\n", sym->name, + sym_get_string_value(sym)); + for_all_prompts(sym, prop) + get_prompt_str(r, prop); + hit = false; + for_all_properties(sym, prop, P_SELECT) { + if (!hit) { + str_append(r, " Selects: "); + hit = true; + } else + str_printf(r, " && "); + expr_gstr_print(prop->expr, r); + } + if (hit) + str_append(r, "\n"); + if (sym->rev_dep.expr) { + str_append(r, " Selected by: "); + expr_gstr_print(sym->rev_dep.expr, r); + str_append(r, "\n"); + } + str_append(r, "\n\n"); +} + +static struct gstr get_relations_str(struct symbol **sym_arr) +{ + struct symbol *sym; + struct gstr res = str_new(); + int i; + + for (i = 0; sym_arr && (sym = sym_arr[i]); i++) + get_symbol_str(&res, sym); + if (!i) + str_append(&res, "No matches found.\n"); + return res; +} + +pid_t pid; + +static void winch_handler(int sig) +{ + if (!do_resize) { + kill(pid, SIGINT); + do_resize = 1; + } +} + +static int exec_conf(void) +{ + int pipefd[2], stat, size; + struct sigaction sa; + sigset_t sset, osset; + + sigemptyset(&sset); + sigaddset(&sset, SIGINT); + sigprocmask(SIG_BLOCK, &sset, &osset); + + signal(SIGINT, SIG_DFL); + + sa.sa_handler = winch_handler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_RESTART; + sigaction(SIGWINCH, &sa, NULL); + + *argptr++ = NULL; + + pipe(pipefd); + pid = fork(); + if (pid == 0) { + sigprocmask(SIG_SETMASK, &osset, NULL); + dup2(pipefd[1], 2); + close(pipefd[0]); + close(pipefd[1]); + execv(args[0], args); + _exit(EXIT_FAILURE); + } + + close(pipefd[1]); + bufptr = input_buf; + while (1) { + size = input_buf + sizeof(input_buf) - bufptr; + size = read(pipefd[0], bufptr, size); + if (size <= 0) { + if (size < 0) { + if (errno == EINTR || errno == EAGAIN) + continue; + perror("read"); + } + break; + } + bufptr += size; + } + *bufptr++ = 0; + close(pipefd[0]); + waitpid(pid, &stat, 0); + + if (do_resize) { + init_wsize(); + do_resize = 0; + sigprocmask(SIG_SETMASK, &osset, NULL); + return -1; + } + if (WIFSIGNALED(stat)) { + printf("\finterrupted(%d)\n", WTERMSIG(stat)); + exit(1); + } +#if 0 + printf("\fexit state: %d\nexit data: '%s'\n", WEXITSTATUS(stat), input_buf); + sleep(1); +#endif + sigpending(&sset); + if (sigismember(&sset, SIGINT)) { + printf("\finterrupted\n"); + exit(1); + } + sigprocmask(SIG_SETMASK, &osset, NULL); + + return WEXITSTATUS(stat); +} + +static void search_conf(void) +{ + struct symbol **sym_arr; + int stat; + struct gstr res; + +again: + cprint_init(); + cprint("--title"); + cprint(_("Search Configuration Parameter")); + cprint("--inputbox"); + cprint(_("Enter CONFIG_ (sub)string to search for (omit CONFIG_)")); + cprint("10"); + cprint("75"); + cprint(""); + stat = exec_conf(); + if (stat < 0) + goto again; + switch (stat) { + case 0: + break; + case 1: + show_helptext(_("Search Configuration"), search_help); + goto again; + default: + return; + } + + sym_arr = sym_re_search(input_buf); + res = get_relations_str(sym_arr); + free(sym_arr); + show_textbox(_("Search Results"), str_get(&res), 0, 0); + str_free(&res); +} + +static void build_conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + int type, tmp, doint = 2; + tristate val; + char ch; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + prop = menu->prompt; + if (!sym) { + if (prop && menu != current_menu) { + const char *prompt = menu_get_prompt(menu); + switch (prop->type) { + case P_MENU: + child_count++; + cprint("m%p", menu); + + if (single_menu_mode) { + cprint1("%s%*c%s", + menu->data ? "-->" : "++>", + indent + 1, ' ', prompt); + } else + cprint1(" %*c%s --->", indent + 1, ' ', prompt); + + cprint_done(); + if (single_menu_mode && menu->data) + goto conf_childs; + return; + default: + if (prompt) { + child_count++; + cprint(":%p", menu); + cprint("---%*c%s", indent + 1, ' ', prompt); + } + } + } else + doint = 0; + goto conf_childs; + } + + type = sym_get_type(sym); + if (sym_is_choice(sym)) { + struct symbol *def_sym = sym_get_choice_value(sym); + struct menu *def_menu = NULL; + + child_count++; + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child) && child->sym == def_sym) + def_menu = child; + } + + val = sym_get_tristate_value(sym); + if (sym_is_changable(sym)) { + cprint("t%p", menu); + switch (type) { + case S_BOOLEAN: + cprint1("[%c]", val == no ? ' ' : '*'); + break; + case S_TRISTATE: + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; + } + cprint1("<%c>", ch); + break; + } + } else { + cprint("%c%p", def_menu ? 't' : ':', menu); + cprint1(" "); + } + + cprint1("%*c%s", indent + 1, ' ', menu_get_prompt(menu)); + if (val == yes) { + if (def_menu) { + cprint1(" (%s)", menu_get_prompt(def_menu)); + cprint1(" --->"); + cprint_done(); + if (def_menu->list) { + indent += 2; + build_conf(def_menu); + indent -= 2; + } + } else + cprint_done(); + return; + } + cprint_done(); + } else { + if (menu == current_menu) { + cprint(":%p", menu); + cprint("---%*c%s", indent + 1, ' ', menu_get_prompt(menu)); + goto conf_childs; + } + child_count++; + val = sym_get_tristate_value(sym); + if (sym_is_choice_value(sym) && val == yes) { + cprint(":%p", menu); + cprint1(" "); + } else { + switch (type) { + case S_BOOLEAN: + cprint("t%p", menu); + if (sym_is_changable(sym)) + cprint1("[%c]", val == no ? ' ' : '*'); + else + cprint1("---"); + break; + case S_TRISTATE: + cprint("t%p", menu); + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; + } + if (sym_is_changable(sym)) + cprint1("<%c>", ch); + else + cprint1("---"); + break; + default: + cprint("s%p", menu); + tmp = cprint1("(%s)", sym_get_string_value(sym)); + tmp = indent - tmp + 4; + if (tmp < 0) + tmp = 0; + cprint1("%*c%s%s", tmp, ' ', menu_get_prompt(menu), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : " (NEW)"); + cprint_done(); + goto conf_childs; + } + } + cprint1("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : " (NEW)"); + if (menu->prompt->type == P_MENU) { + cprint1(" --->"); + cprint_done(); + return; + } + cprint_done(); + } + +conf_childs: + indent += doint; + for (child = menu->list; child; child = child->next) + build_conf(child); + indent -= doint; +} + +static void conf(struct menu *menu) +{ + struct menu *submenu; + const char *prompt = menu_get_prompt(menu); + struct symbol *sym; + char active_entry[40]; + int stat, type, i; + + unlink("lxdialog.scrltmp"); + active_entry[0] = 0; + while (1) { + cprint_init(); + cprint("--title"); + cprint("%s", prompt ? prompt : _("Main Menu")); + cprint("--menu"); + cprint(_(menu_instructions)); + cprint("%d", rows); + cprint("%d", cols); + cprint("%d", rows - 10); + cprint("%s", active_entry); + current_menu = menu; + build_conf(menu); + if (!child_count) + break; + if (menu == &rootmenu) { + cprint(":"); + cprint("--- "); + cprint("L"); + cprint(_(" Load an Alternate Configuration File")); + cprint("S"); + cprint(_(" Save Configuration to an Alternate File")); + } + stat = exec_conf(); + if (stat < 0) + continue; + + if (stat == 1 || stat == 255) + break; + + type = input_buf[0]; + if (!type) + continue; + + for (i = 0; input_buf[i] && !isspace(input_buf[i]); i++) + ; + if (i >= sizeof(active_entry)) + i = sizeof(active_entry) - 1; + input_buf[i] = 0; + strcpy(active_entry, input_buf); + + sym = NULL; + submenu = NULL; + if (sscanf(input_buf + 1, "%p", &submenu) == 1) + sym = submenu->sym; + + switch (stat) { + case 0: + switch (type) { + case 'm': + if (single_menu_mode) + submenu->data = (void *) (long) !submenu->data; + else + conf(submenu); + break; + case 't': + if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes) + conf_choice(submenu); + else if (submenu->prompt->type == P_MENU) + conf(submenu); + break; + case 's': + conf_string(submenu); + break; + case 'L': + conf_load(); + break; + case 'S': + conf_save(); + break; + } + break; + case 2: + if (sym) + show_help(submenu); + else + show_helptext("README", _(mconf_readme)); + break; + case 3: + if (type == 't') { + if (sym_set_tristate_value(sym, yes)) + break; + if (sym_set_tristate_value(sym, mod)) + show_textbox(NULL, setmod_text, 6, 74); + } + break; + case 4: + if (type == 't') + sym_set_tristate_value(sym, no); + break; + case 5: + if (type == 't') + sym_set_tristate_value(sym, mod); + break; + case 6: + if (type == 't') + sym_toggle_tristate_value(sym); + else if (type == 'm') + conf(submenu); + break; + case 7: + search_conf(); + break; + } + } +} + +static void show_textbox(const char *title, const char *text, int r, int c) +{ + int fd; + + fd = creat(".help.tmp", 0777); + write(fd, text, strlen(text)); + close(fd); + show_file(".help.tmp", title, r, c); + unlink(".help.tmp"); +} + +static void show_helptext(const char *title, const char *text) +{ + show_textbox(title, text, 0, 0); +} + +static void show_help(struct menu *menu) +{ + struct gstr help = str_new(); + struct symbol *sym = menu->sym; + + if (sym->help) + { + if (sym->name) { + str_printf(&help, "CONFIG_%s:\n\n", sym->name); + str_append(&help, _(sym->help)); + str_append(&help, "\n"); + } + } else { + str_append(&help, nohelp_text); + } + get_symbol_str(&help, sym); + show_helptext(menu_get_prompt(menu), str_get(&help)); + str_free(&help); +} + +static void show_file(const char *filename, const char *title, int r, int c) +{ + do { + cprint_init(); + if (title) { + cprint("--title"); + cprint("%s", title); + } + cprint("--textbox"); + cprint("%s", filename); + cprint("%d", r ? r : rows); + cprint("%d", c ? c : cols); + } while (exec_conf() < 0); +} + +static void conf_choice(struct menu *menu) +{ + const char *prompt = menu_get_prompt(menu); + struct menu *child; + struct symbol *active; + int stat; + + active = sym_get_choice_value(menu->sym); + while (1) { + cprint_init(); + cprint("--title"); + cprint("%s", prompt ? prompt : _("Main Menu")); + cprint("--radiolist"); + cprint(_(radiolist_instructions)); + cprint("15"); + cprint("70"); + cprint("6"); + + current_menu = menu; + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + cprint("%p", child); + cprint("%s", menu_get_prompt(child)); + if (child->sym == sym_get_choice_value(menu->sym)) + cprint("ON"); + else if (child->sym == active) + cprint("SELECTED"); + else + cprint("OFF"); + } + + stat = exec_conf(); + switch (stat) { + case 0: + if (sscanf(input_buf, "%p", &child) != 1) + break; + sym_set_tristate_value(child->sym, yes); + return; + case 1: + if (sscanf(input_buf, "%p", &child) == 1) { + show_help(child); + active = child->sym; + } else + show_help(menu); + break; + case 255: + return; + } + } +} + +static void conf_string(struct menu *menu) +{ + const char *prompt = menu_get_prompt(menu); + int stat; + + while (1) { + cprint_init(); + cprint("--title"); + cprint("%s", prompt ? prompt : _("Main Menu")); + cprint("--inputbox"); + switch (sym_get_type(menu->sym)) { + case S_INT: + cprint(_(inputbox_instructions_int)); + break; + case S_HEX: + cprint(_(inputbox_instructions_hex)); + break; + case S_STRING: + cprint(_(inputbox_instructions_string)); + break; + default: + /* panic? */; + } + cprint("10"); + cprint("75"); + cprint("%s", sym_get_string_value(menu->sym)); + stat = exec_conf(); + switch (stat) { + case 0: + if (sym_set_string_value(menu->sym, input_buf)) + return; + show_textbox(NULL, _("You have made an invalid entry."), 5, 43); + break; + case 1: + show_help(menu); + break; + case 255: + return; + } + } +} + +static void conf_load(void) +{ + int stat; + + while (1) { + cprint_init(); + cprint("--inputbox"); + cprint(load_config_text); + cprint("11"); + cprint("55"); + cprint("%s", filename); + stat = exec_conf(); + switch(stat) { + case 0: + if (!input_buf[0]) + return; + if (!conf_read(input_buf)) + return; + show_textbox(NULL, _("File does not exist!"), 5, 38); + break; + case 1: + show_helptext(_("Load Alternate Configuration"), load_config_help); + break; + case 255: + return; + } + } +} + +static void conf_save(void) +{ + int stat; + + while (1) { + cprint_init(); + cprint("--inputbox"); + cprint(save_config_text); + cprint("11"); + cprint("55"); + cprint("%s", filename); + stat = exec_conf(); + switch(stat) { + case 0: + if (!input_buf[0]) + return; + if (!conf_write(input_buf)) + return; + show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60); + break; + case 1: + show_helptext(_("Save Alternate Configuration"), save_config_help); + break; + case 255: + return; + } + } +} + +static void conf_cleanup(void) +{ + tcsetattr(1, TCSAFLUSH, &ios_org); + unlink(".help.tmp"); + unlink("lxdialog.scrltmp"); +} + +int main(int ac, char **av) +{ + struct symbol *sym; + char *mode; + int stat; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + conf_parse(av[1]); + conf_read(NULL); + + sym = sym_lookup("KERNELVERSION", 0); + sym_calc_value(sym); + sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"), + sym_get_string_value(sym)); + + mode = getenv("MENUCONFIG_MODE"); + if (mode) { + if (!strcasecmp(mode, "single_menu")) + single_menu_mode = 1; + } + + tcgetattr(1, &ios_org); + atexit(conf_cleanup); + init_wsize(); + conf(&rootmenu); + + do { + cprint_init(); + cprint("--yesno"); + cprint(_("Do you wish to save your new kernel configuration?")); + cprint("5"); + cprint("60"); + stat = exec_conf(); + } while (stat < 0); + + if (stat == 0) { + if (conf_write(NULL)) { + fprintf(stderr, _("\n\n" + "Error during writing of the kernel configuration.\n" + "Your kernel configuration changes were NOT saved." + "\n\n")); + return 1; + } + printf(_("\n\n" + "*** End of Linux kernel configuration.\n" + "*** Execute 'make' to build the kernel or try 'make help'." + "\n\n")); + } else { + fprintf(stderr, _("\n\n" + "Your kernel configuration changes were NOT saved." + "\n\n")); + } + + return 0; +} diff --git a/openwrt/scripts/config/menu.c b/openwrt/scripts/config/menu.c new file mode 100644 index 00000000000..0fce20cb7f3 --- /dev/null +++ b/openwrt/scripts/config/menu.c @@ -0,0 +1,397 @@ +/* + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> + * Released under the terms of the GNU GPL v2.0. + */ + +#include <stdlib.h> +#include <string.h> + +#define LKC_DIRECT_LINK +#include "lkc.h" + +struct menu rootmenu; +static struct menu **last_entry_ptr; + +struct file *file_list; +struct file *current_file; + +static void menu_warn(struct menu *menu, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +static void prop_warn(struct property *prop, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +void menu_init(void) +{ + current_entry = current_menu = &rootmenu; + last_entry_ptr = &rootmenu.list; +} + +void menu_add_entry(struct symbol *sym) +{ + struct menu *menu; + + menu = malloc(sizeof(*menu)); + memset(menu, 0, sizeof(*menu)); + menu->sym = sym; + menu->parent = current_menu; + menu->file = current_file; + menu->lineno = zconf_lineno(); + + *last_entry_ptr = menu; + last_entry_ptr = &menu->next; + current_entry = menu; +} + +void menu_end_entry(void) +{ +} + +struct menu *menu_add_menu(void) +{ + menu_end_entry(); + last_entry_ptr = ¤t_entry->list; + return current_menu = current_entry; +} + +void menu_end_menu(void) +{ + last_entry_ptr = ¤t_menu->next; + current_menu = current_menu->parent; +} + +struct expr *menu_check_dep(struct expr *e) +{ + if (!e) + return e; + + switch (e->type) { + case E_NOT: + e->left.expr = menu_check_dep(e->left.expr); + break; + case E_OR: + case E_AND: + e->left.expr = menu_check_dep(e->left.expr); + e->right.expr = menu_check_dep(e->right.expr); + break; + case E_SYMBOL: + /* change 'm' into 'm' && MODULES */ + if (e->left.sym == &symbol_mod) + return expr_alloc_and(e, expr_alloc_symbol(modules_sym)); + break; + default: + break; + } + return e; +} + +void menu_add_dep(struct expr *dep) +{ + current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); +} + +void menu_set_type(int type) +{ + struct symbol *sym = current_entry->sym; + + if (sym->type == type) + return; + if (sym->type == S_UNKNOWN) { + sym->type = type; + return; + } + menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'\n", + sym->name ? sym->name : "<choice>", + sym_type_name(sym->type), sym_type_name(type)); +} + +struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) +{ + struct property *prop = prop_alloc(type, current_entry->sym); + + prop->menu = current_entry; + prop->text = prompt; + prop->expr = expr; + prop->visible.expr = menu_check_dep(dep); + + if (prompt) { + if (current_entry->prompt) + menu_warn(current_entry, "prompt redefined\n"); + current_entry->prompt = prop; + } + + return prop; +} + +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) +{ + return menu_add_prop(type, prompt, NULL, dep); +} + +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) +{ + menu_add_prop(type, NULL, expr, dep); +} + +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) +{ + menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); +} + +static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2) +{ + return sym2->type == S_INT || sym2->type == S_HEX || + (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); +} + +void sym_check_prop(struct symbol *sym) +{ + struct property *prop; + struct symbol *sym2; + for (prop = sym->prop; prop; prop = prop->next) { + switch (prop->type) { + case P_DEFAULT: + if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) && + prop->expr->type != E_SYMBOL) + prop_warn(prop, + "default for config symbol '%'" + " must be a single symbol", sym->name); + break; + case P_SELECT: + sym2 = prop_get_symbol(prop); + if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) + prop_warn(prop, + "config symbol '%s' uses select, but is " + "not boolean or tristate", sym->name); + else if (sym2->type == S_UNKNOWN) + prop_warn(prop, + "'select' used by config symbol '%s' " + "refer to undefined symbol '%s'", + sym->name, sym2->name); + else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE) + prop_warn(prop, + "'%s' has wrong type. 'select' only " + "accept arguments of boolean and " + "tristate type", sym2->name); + break; + case P_RANGE: + if (sym->type != S_INT && sym->type != S_HEX) + prop_warn(prop, "range is only allowed " + "for int or hex symbols"); + if (!menu_range_valid_sym(sym, prop->expr->left.sym) || + !menu_range_valid_sym(sym, prop->expr->right.sym)) + prop_warn(prop, "range is invalid"); + break; + default: + ; + } + } +} + +void menu_finalize(struct menu *parent) +{ + struct menu *menu, *last_menu; + struct symbol *sym; + struct property *prop; + struct expr *parentdep, *basedep, *dep, *dep2, **ep; + + sym = parent->sym; + if (parent->list) { + if (sym && sym_is_choice(sym)) { + /* find the first choice value and find out choice type */ + for (menu = parent->list; menu; menu = menu->next) { + if (menu->sym) { + current_entry = parent; + menu_set_type(menu->sym->type); + current_entry = menu; + menu_set_type(sym->type); + break; + } + } + parentdep = expr_alloc_symbol(sym); + } else if (parent->prompt) + parentdep = parent->prompt->visible.expr; + else + parentdep = parent->dep; + + for (menu = parent->list; menu; menu = menu->next) { + basedep = expr_transform(menu->dep); + basedep = expr_alloc_and(expr_copy(parentdep), basedep); + basedep = expr_eliminate_dups(basedep); + menu->dep = basedep; + if (menu->sym) + prop = menu->sym->prop; + else + prop = menu->prompt; + for (; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + dep = expr_transform(prop->visible.expr); + dep = expr_alloc_and(expr_copy(basedep), dep); + dep = expr_eliminate_dups(dep); + if (menu->sym && menu->sym->type != S_TRISTATE) + dep = expr_trans_bool(dep); + prop->visible.expr = dep; + if (prop->type == P_SELECT) { + struct symbol *es = prop_get_symbol(prop); + es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, + expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); + } + } + } + for (menu = parent->list; menu; menu = menu->next) + menu_finalize(menu); + } else if (sym) { + basedep = parent->prompt ? parent->prompt->visible.expr : NULL; + basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); + basedep = expr_eliminate_dups(expr_transform(basedep)); + last_menu = NULL; + for (menu = parent->next; menu; menu = menu->next) { + dep = menu->prompt ? menu->prompt->visible.expr : menu->dep; + if (!expr_contains_symbol(dep, sym)) + break; + if (expr_depends_symbol(dep, sym)) + goto next; + dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no); + dep = expr_eliminate_dups(expr_transform(dep)); + dep2 = expr_copy(basedep); + expr_eliminate_eq(&dep, &dep2); + expr_free(dep); + if (!expr_is_yes(dep2)) { + expr_free(dep2); + break; + } + expr_free(dep2); + next: + menu_finalize(menu); + menu->parent = parent; + last_menu = menu; + } + if (last_menu) { + parent->list = parent->next; + parent->next = last_menu->next; + last_menu->next = NULL; + } + } + for (menu = parent->list; menu; menu = menu->next) { + if (sym && sym_is_choice(sym) && menu->sym) { + menu->sym->flags |= SYMBOL_CHOICEVAL; + if (!menu->prompt) + menu_warn(menu, "choice value must have a prompt"); + for (prop = menu->sym->prop; prop; prop = prop->next) { + if (prop->type == P_PROMPT && prop->menu != menu) { + prop_warn(prop, "choice values " + "currently only support a " + "single prompt"); + } + if (prop->type == P_DEFAULT) + prop_warn(prop, "defaults for choice " + "values not supported"); + } + current_entry = menu; + menu_set_type(sym->type); + menu_add_symbol(P_CHOICE, sym, NULL); + prop = sym_get_choice_prop(sym); + for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) + ; + *ep = expr_alloc_one(E_CHOICE, NULL); + (*ep)->right.sym = menu->sym; + } + if (menu->list && (!menu->prompt || !menu->prompt->text)) { + for (last_menu = menu->list; ; last_menu = last_menu->next) { + last_menu->parent = parent; + if (!last_menu->next) + break; + } + last_menu->next = menu->next; + menu->next = menu->list; + menu->list = NULL; + } + } + + if (sym && !(sym->flags & SYMBOL_WARNED)) { + if (sym->type == S_UNKNOWN) + menu_warn(parent, "config symbol defined " + "without type\n"); + + if (sym_is_choice(sym) && !parent->prompt) + menu_warn(parent, "choice must have a prompt\n"); + + /* Check properties connected to this symbol */ + sym_check_prop(sym); + sym->flags |= SYMBOL_WARNED; + } + + if (sym && !sym_is_optional(sym) && parent->prompt) { + sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, + expr_alloc_and(parent->prompt->visible.expr, + expr_alloc_symbol(&symbol_mod))); + } +} + +bool menu_is_visible(struct menu *menu) +{ + struct menu *child; + struct symbol *sym; + tristate visible; + + if (!menu->prompt) + return false; + sym = menu->sym; + if (sym) { + sym_calc_value(sym); + visible = menu->prompt->visible.tri; + } else + visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); + + if (visible != no) + return true; + if (!sym || sym_get_tristate_value(menu->sym) == no) + return false; + + for (child = menu->list; child; child = child->next) + if (menu_is_visible(child)) + return true; + return false; +} + +const char *menu_get_prompt(struct menu *menu) +{ + if (menu->prompt) + return _(menu->prompt->text); + else if (menu->sym) + return _(menu->sym->name); + return NULL; +} + +struct menu *menu_get_root_menu(struct menu *menu) +{ + return &rootmenu; +} + +struct menu *menu_get_parent_menu(struct menu *menu) +{ + enum prop_type type; + + for (; menu != &rootmenu; menu = menu->parent) { + type = menu->prompt ? menu->prompt->type : 0; + if (type == P_MENU) + break; + } + return menu; +} + diff --git a/openwrt/scripts/config/symbol.c b/openwrt/scripts/config/symbol.c new file mode 100644 index 00000000000..3d7877afccd --- /dev/null +++ b/openwrt/scripts/config/symbol.c @@ -0,0 +1,882 @@ +/* + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> + * Released under the terms of the GNU GPL v2.0. + */ + +#include <ctype.h> +#include <stdlib.h> +#include <string.h> +#include <regex.h> +#include <sys/utsname.h> + +#define LKC_DIRECT_LINK +#include "lkc.h" + +struct symbol symbol_yes = { + .name = "y", + .curr = { "y", yes }, + .flags = SYMBOL_YES|SYMBOL_VALID, +}, symbol_mod = { + .name = "m", + .curr = { "m", mod }, + .flags = SYMBOL_MOD|SYMBOL_VALID, +}, symbol_no = { + .name = "n", + .curr = { "n", no }, + .flags = SYMBOL_NO|SYMBOL_VALID, +}, symbol_empty = { + .name = "", + .curr = { "", no }, + .flags = SYMBOL_VALID, +}; + +int sym_change_count; +struct symbol *modules_sym; +tristate modules_val; + +void sym_add_default(struct symbol *sym, const char *def) +{ + struct property *prop = prop_alloc(P_DEFAULT, sym); + + prop->expr = expr_alloc_symbol(sym_lookup(def, 1)); +} + +void sym_init(void) +{ + struct symbol *sym; + struct utsname uts; + char *p; + static bool inited = false; + + if (inited) + return; + inited = true; + + uname(&uts); + + sym = sym_lookup("ARCH", 0); + sym->type = S_STRING; + sym->flags |= SYMBOL_AUTO; + p = getenv("ARCH"); + if (p) + sym_add_default(sym, p); + + sym = sym_lookup("KERNELVERSION", 0); + sym->type = S_STRING; + sym->flags |= SYMBOL_AUTO; + p = getenv("KERNELVERSION"); + if (p) + sym_add_default(sym, p); + + sym = sym_lookup("UNAME_RELEASE", 0); + sym->type = S_STRING; + sym->flags |= SYMBOL_AUTO; + sym_add_default(sym, uts.release); +} + +enum symbol_type sym_get_type(struct symbol *sym) +{ + enum symbol_type type = sym->type; + + if (type == S_TRISTATE) { + if (sym_is_choice_value(sym) && sym->visible == yes) + type = S_BOOLEAN; + else if (modules_val == no) + type = S_BOOLEAN; + } + return type; +} + +const char *sym_type_name(enum symbol_type type) +{ + switch (type) { + case S_BOOLEAN: + return "boolean"; + case S_TRISTATE: + return "tristate"; + case S_INT: + return "integer"; + case S_HEX: + return "hex"; + case S_STRING: + return "string"; + case S_UNKNOWN: + return "unknown"; + case S_OTHER: + break; + } + return "???"; +} + +struct property *sym_get_choice_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_choices(sym, prop) + return prop; + return NULL; +} + +struct property *sym_get_default_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_defaults(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri != no) + return prop; + } + return NULL; +} + +struct property *sym_get_range_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_properties(sym, prop, P_RANGE) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri != no) + return prop; + } + return NULL; +} + +static int sym_get_range_val(struct symbol *sym, int base) +{ + sym_calc_value(sym); + switch (sym->type) { + case S_INT: + base = 10; + break; + case S_HEX: + base = 16; + break; + default: + break; + } + return strtol(sym->curr.val, NULL, base); +} + +static void sym_validate_range(struct symbol *sym) +{ + struct property *prop; + int base, val, val2; + char str[64]; + + switch (sym->type) { + case S_INT: + base = 10; + break; + case S_HEX: + base = 16; + break; + default: + return; + } + prop = sym_get_range_prop(sym); + if (!prop) + return; + val = strtol(sym->curr.val, NULL, base); + val2 = sym_get_range_val(prop->expr->left.sym, base); + if (val >= val2) { + val2 = sym_get_range_val(prop->expr->right.sym, base); + if (val <= val2) + return; + } + if (sym->type == S_INT) + sprintf(str, "%d", val2); + else + sprintf(str, "0x%x", val2); + sym->curr.val = strdup(str); +} + +static void sym_calc_visibility(struct symbol *sym) +{ + struct property *prop; + tristate tri; + + /* any prompt visible? */ + tri = no; + for_all_prompts(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + tri = E_OR(tri, prop->visible.tri); + } + if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) + tri = yes; + if (sym->visible != tri) { + sym->visible = tri; + sym_set_changed(sym); + } + if (sym_is_choice_value(sym)) + return; + tri = no; + if (sym->rev_dep.expr) + tri = expr_calc_value(sym->rev_dep.expr); + if (tri == mod && sym_get_type(sym) == S_BOOLEAN) + tri = yes; + if (sym->rev_dep.tri != tri) { + sym->rev_dep.tri = tri; + sym_set_changed(sym); + } +} + +static struct symbol *sym_calc_choice(struct symbol *sym) +{ + struct symbol *def_sym; + struct property *prop; + struct expr *e; + + /* is the user choice visible? */ + def_sym = sym->user.val; + if (def_sym) { + sym_calc_visibility(def_sym); + if (def_sym->visible != no) + return def_sym; + } + + /* any of the defaults visible? */ + for_all_defaults(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri == no) + continue; + def_sym = prop_get_symbol(prop); + sym_calc_visibility(def_sym); + if (def_sym->visible != no) + return def_sym; + } + + /* just get the first visible value */ + prop = sym_get_choice_prop(sym); + for (e = prop->expr; e; e = e->left.expr) { + def_sym = e->right.sym; + sym_calc_visibility(def_sym); + if (def_sym->visible != no) + return def_sym; + } + + /* no choice? reset tristate value */ + sym->curr.tri = no; + return NULL; +} + +void sym_calc_value(struct symbol *sym) +{ + struct symbol_value newval, oldval; + struct property *prop; + struct expr *e; + + if (!sym) + return; + + if (sym->flags & SYMBOL_VALID) + return; + sym->flags |= SYMBOL_VALID; + + oldval = sym->curr; + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + newval = symbol_empty.curr; + break; + case S_BOOLEAN: + case S_TRISTATE: + newval = symbol_no.curr; + break; + default: + sym->curr.val = sym->name; + sym->curr.tri = no; + return; + } + if (!sym_is_choice_value(sym)) + sym->flags &= ~SYMBOL_WRITE; + + sym_calc_visibility(sym); + + /* set default if recursively called */ + sym->curr = newval; + + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym_is_choice_value(sym) && sym->visible == yes) { + prop = sym_get_choice_prop(sym); + newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; + } else if (E_OR(sym->visible, sym->rev_dep.tri) != no) { + sym->flags |= SYMBOL_WRITE; + if (sym_has_value(sym)) + newval.tri = sym->user.tri; + else if (!sym_is_choice(sym)) { + prop = sym_get_default_prop(sym); + if (prop) + newval.tri = expr_calc_value(prop->expr); + } + newval.tri = E_OR(E_AND(newval.tri, sym->visible), sym->rev_dep.tri); + } else if (!sym_is_choice(sym)) { + prop = sym_get_default_prop(sym); + if (prop) { + sym->flags |= SYMBOL_WRITE; + newval.tri = expr_calc_value(prop->expr); + } + } + if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) + newval.tri = yes; + break; + case S_STRING: + case S_HEX: + case S_INT: + if (sym->visible != no) { + sym->flags |= SYMBOL_WRITE; + if (sym_has_value(sym)) { + newval.val = sym->user.val; + break; + } + } + prop = sym_get_default_prop(sym); + if (prop) { + struct symbol *ds = prop_get_symbol(prop); + if (ds) { + sym->flags |= SYMBOL_WRITE; + sym_calc_value(ds); + newval.val = ds->curr.val; + } + } + break; + default: + ; + } + + sym->curr = newval; + if (sym_is_choice(sym) && newval.tri == yes) + sym->curr.val = sym_calc_choice(sym); + sym_validate_range(sym); + + if (memcmp(&oldval, &sym->curr, sizeof(oldval))) + sym_set_changed(sym); + if (modules_sym == sym) + modules_val = modules_sym->curr.tri; + + if (sym_is_choice(sym)) { + int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE); + prop = sym_get_choice_prop(sym); + for (e = prop->expr; e; e = e->left.expr) { + e->right.sym->flags |= flags; + if (flags & SYMBOL_CHANGED) + sym_set_changed(e->right.sym); + } + } +} + +void sym_clear_all_valid(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym->flags &= ~SYMBOL_VALID; + sym_change_count++; + if (modules_sym) + sym_calc_value(modules_sym); +} + +void sym_set_changed(struct symbol *sym) +{ + struct property *prop; + + sym->flags |= SYMBOL_CHANGED; + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu) + prop->menu->flags |= MENU_CHANGED; + } +} + +void sym_set_all_changed(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym_set_changed(sym); +} + +bool sym_tristate_within_range(struct symbol *sym, tristate val) +{ + int type = sym_get_type(sym); + + if (sym->visible == no) + return false; + + if (type != S_BOOLEAN && type != S_TRISTATE) + return false; + + if (type == S_BOOLEAN && val == mod) + return false; + if (sym->visible <= sym->rev_dep.tri) + return false; + if (sym_is_choice_value(sym) && sym->visible == yes) + return val == yes; + return val >= sym->rev_dep.tri && val <= sym->visible; +} + +bool sym_set_tristate_value(struct symbol *sym, tristate val) +{ + tristate oldval = sym_get_tristate_value(sym); + + if (oldval != val && !sym_tristate_within_range(sym, val)) + return false; + + if (sym->flags & SYMBOL_NEW) { + sym->flags &= ~SYMBOL_NEW; + sym_set_changed(sym); + } + /* + * setting a choice value also resets the new flag of the choice + * symbol and all other choice values. + */ + if (sym_is_choice_value(sym) && val == yes) { + struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); + struct property *prop; + struct expr *e; + + cs->user.val = sym; + cs->flags &= ~SYMBOL_NEW; + prop = sym_get_choice_prop(cs); + for (e = prop->expr; e; e = e->left.expr) { + if (e->right.sym->visible != no) + e->right.sym->flags &= ~SYMBOL_NEW; + } + } + + sym->user.tri = val; + if (oldval != val) { + sym_clear_all_valid(); + if (sym == modules_sym) + sym_set_all_changed(); + } + + return true; +} + +tristate sym_toggle_tristate_value(struct symbol *sym) +{ + tristate oldval, newval; + + oldval = newval = sym_get_tristate_value(sym); + do { + switch (newval) { + case no: + newval = mod; + break; + case mod: + newval = yes; + break; + case yes: + newval = no; + break; + } + if (sym_set_tristate_value(sym, newval)) + break; + } while (oldval != newval); + return newval; +} + +bool sym_string_valid(struct symbol *sym, const char *str) +{ + signed char ch; + + switch (sym->type) { + case S_STRING: + return true; + case S_INT: + ch = *str++; + if (ch == '-') + ch = *str++; + if (!isdigit(ch)) + return false; + if (ch == '0' && *str != 0) + return false; + while ((ch = *str++)) { + if (!isdigit(ch)) + return false; + } + return true; + case S_HEX: + if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + str += 2; + ch = *str++; + do { + if (!isxdigit(ch)) + return false; + } while ((ch = *str++)); + return true; + case S_BOOLEAN: + case S_TRISTATE: + switch (str[0]) { + case 'y': case 'Y': + case 'm': case 'M': + case 'n': case 'N': + return true; + } + return false; + default: + return false; + } +} + +bool sym_string_within_range(struct symbol *sym, const char *str) +{ + struct property *prop; + int val; + + switch (sym->type) { + case S_STRING: + return sym_string_valid(sym, str); + case S_INT: + if (!sym_string_valid(sym, str)) + return false; + prop = sym_get_range_prop(sym); + if (!prop) + return true; + val = strtol(str, NULL, 10); + return val >= sym_get_range_val(prop->expr->left.sym, 10) && + val <= sym_get_range_val(prop->expr->right.sym, 10); + case S_HEX: + if (!sym_string_valid(sym, str)) + return false; + prop = sym_get_range_prop(sym); + if (!prop) + return true; + val = strtol(str, NULL, 16); + return val >= sym_get_range_val(prop->expr->left.sym, 16) && + val <= sym_get_range_val(prop->expr->right.sym, 16); + case S_BOOLEAN: + case S_TRISTATE: + switch (str[0]) { + case 'y': case 'Y': + return sym_tristate_within_range(sym, yes); + case 'm': case 'M': + return sym_tristate_within_range(sym, mod); + case 'n': case 'N': + return sym_tristate_within_range(sym, no); + } + return false; + default: + return false; + } +} + +bool sym_set_string_value(struct symbol *sym, const char *newval) +{ + const char *oldval; + char *val; + int size; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + switch (newval[0]) { + case 'y': case 'Y': + return sym_set_tristate_value(sym, yes); + case 'm': case 'M': + return sym_set_tristate_value(sym, mod); + case 'n': case 'N': + return sym_set_tristate_value(sym, no); + } + return false; + default: + ; + } + + if (!sym_string_within_range(sym, newval)) + return false; + + if (sym->flags & SYMBOL_NEW) { + sym->flags &= ~SYMBOL_NEW; + sym_set_changed(sym); + } + + oldval = sym->user.val; + size = strlen(newval) + 1; + if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) { + size += 2; + sym->user.val = val = malloc(size); + *val++ = '0'; + *val++ = 'x'; + } else if (!oldval || strcmp(oldval, newval)) + sym->user.val = val = malloc(size); + else + return true; + + strcpy(val, newval); + free((void *)oldval); + sym_clear_all_valid(); + + return true; +} + +const char *sym_get_string_value(struct symbol *sym) +{ + tristate val; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + val = sym_get_tristate_value(sym); + switch (val) { + case no: + return "n"; + case mod: + return "m"; + case yes: + return "y"; + } + break; + default: + ; + } + return (const char *)sym->curr.val; +} + +bool sym_is_changable(struct symbol *sym) +{ + return sym->visible > sym->rev_dep.tri; +} + +struct symbol *sym_lookup(const char *name, int isconst) +{ + struct symbol *symbol; + const char *ptr; + char *new_name; + int hash = 0; + + if (name) { + if (name[0] && !name[1]) { + switch (name[0]) { + case 'y': return &symbol_yes; + case 'm': return &symbol_mod; + case 'n': return &symbol_no; + } + } + for (ptr = name; *ptr; ptr++) + hash += *ptr; + hash &= 0xff; + + for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { + if (!strcmp(symbol->name, name)) { + if ((isconst && symbol->flags & SYMBOL_CONST) || + (!isconst && !(symbol->flags & SYMBOL_CONST))) + return symbol; + } + } + new_name = strdup(name); + } else { + new_name = NULL; + hash = 256; + } + + symbol = malloc(sizeof(*symbol)); + memset(symbol, 0, sizeof(*symbol)); + symbol->name = new_name; + symbol->type = S_UNKNOWN; + symbol->flags = SYMBOL_NEW; + if (isconst) + symbol->flags |= SYMBOL_CONST; + + symbol->next = symbol_hash[hash]; + symbol_hash[hash] = symbol; + + return symbol; +} + +struct symbol *sym_find(const char *name) +{ + struct symbol *symbol = NULL; + const char *ptr; + int hash = 0; + + if (!name) + return NULL; + + if (name[0] && !name[1]) { + switch (name[0]) { + case 'y': return &symbol_yes; + case 'm': return &symbol_mod; + case 'n': return &symbol_no; + } + } + for (ptr = name; *ptr; ptr++) + hash += *ptr; + hash &= 0xff; + + for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { + if (!strcmp(symbol->name, name) && + !(symbol->flags & SYMBOL_CONST)) + break; + } + + return symbol; +} + +struct symbol **sym_re_search(const char *pattern) +{ + struct symbol *sym, **sym_arr = NULL; + int i, cnt, size; + regex_t re; + + cnt = size = 0; + /* Skip if empty */ + if (strlen(pattern) == 0) + return NULL; + if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB|REG_ICASE)) + return NULL; + + for_all_symbols(i, sym) { + if (sym->flags & SYMBOL_CONST || !sym->name) + continue; + if (regexec(&re, sym->name, 0, NULL, 0)) + continue; + if (cnt + 1 >= size) { + void *tmp = sym_arr; + size += 16; + sym_arr = realloc(sym_arr, size * sizeof(struct symbol *)); + if (!sym_arr) { + free(tmp); + return NULL; + } + } + sym_arr[cnt++] = sym; + } + if (sym_arr) + sym_arr[cnt] = NULL; + regfree(&re); + + return sym_arr; +} + + +struct symbol *sym_check_deps(struct symbol *sym); + +static struct symbol *sym_check_expr_deps(struct expr *e) +{ + struct symbol *sym; + + if (!e) + return NULL; + switch (e->type) { + case E_OR: + case E_AND: + sym = sym_check_expr_deps(e->left.expr); + if (sym) + return sym; + return sym_check_expr_deps(e->right.expr); + case E_NOT: + return sym_check_expr_deps(e->left.expr); + case E_EQUAL: + case E_UNEQUAL: + sym = sym_check_deps(e->left.sym); + if (sym) + return sym; + return sym_check_deps(e->right.sym); + case E_SYMBOL: + return sym_check_deps(e->left.sym); + default: + break; + } + printf("Oops! How to check %d?\n", e->type); + return NULL; +} + +struct symbol *sym_check_deps(struct symbol *sym) +{ + struct symbol *sym2; + struct property *prop; + + if (sym->flags & SYMBOL_CHECK) { + printf("Warning! Found recursive dependency: %s", sym->name); + return sym; + } + if (sym->flags & SYMBOL_CHECKED) + return NULL; + + sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); + sym2 = sym_check_expr_deps(sym->rev_dep.expr); + if (sym2) + goto out; + + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->type == P_CHOICE || prop->type == P_SELECT) + continue; + sym2 = sym_check_expr_deps(prop->visible.expr); + if (sym2) + goto out; + if (prop->type != P_DEFAULT || sym_is_choice(sym)) + continue; + sym2 = sym_check_expr_deps(prop->expr); + if (sym2) + goto out; + } +out: + if (sym2) { + printf(" %s", sym->name); + if (sym2 == sym) { + printf("\n"); + sym2 = NULL; + } + } + sym->flags &= ~SYMBOL_CHECK; + return sym2; +} + +struct property *prop_alloc(enum prop_type type, struct symbol *sym) +{ + struct property *prop; + struct property **propp; + + prop = malloc(sizeof(*prop)); + memset(prop, 0, sizeof(*prop)); + prop->type = type; + prop->sym = sym; + prop->file = current_file; + prop->lineno = zconf_lineno(); + + /* append property to the prop list of symbol */ + if (sym) { + for (propp = &sym->prop; *propp; propp = &(*propp)->next) + ; + *propp = prop; + } + + return prop; +} + +struct symbol *prop_get_symbol(struct property *prop) +{ + if (prop->expr && (prop->expr->type == E_SYMBOL || + prop->expr->type == E_CHOICE)) + return prop->expr->left.sym; + return NULL; +} + +const char *prop_get_type_name(enum prop_type type) +{ + switch (type) { + case P_PROMPT: + return "prompt"; + case P_COMMENT: + return "comment"; + case P_MENU: + return "menu"; + case P_DEFAULT: + return "default"; + case P_CHOICE: + return "choice"; + case P_SELECT: + return "select"; + case P_RANGE: + return "range"; + case P_UNKNOWN: + break; + } + return "unknown"; +} diff --git a/openwrt/scripts/config/util.c b/openwrt/scripts/config/util.c new file mode 100644 index 00000000000..656d2c87d66 --- /dev/null +++ b/openwrt/scripts/config/util.c @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2002-2005 Roman Zippel <zippel@linux-m68k.org> + * Copyright (C) 2002-2005 Sam Ravnborg <sam@ravnborg.org> + * + * Released under the terms of the GNU GPL v2.0. + */ + +#include <string.h> +#include "lkc.h" + +/* file already present in list? If not add it */ +struct file *file_lookup(const char *name) +{ + struct file *file; + + for (file = file_list; file; file = file->next) { + if (!strcmp(name, file->name)) + return file; + } + + file = malloc(sizeof(*file)); + memset(file, 0, sizeof(*file)); + file->name = strdup(name); + file->next = file_list; + file_list = file; + return file; +} + +/* write a dependency file as used by kbuild to track dependencies */ +int file_write_dep(const char *name) +{ + struct file *file; + FILE *out; + + if (!name) + name = ".kconfig.d"; + out = fopen("..config.tmp", "w"); + if (!out) + return 1; + fprintf(out, "deps_config := \\\n"); + for (file = file_list; file; file = file->next) { + if (file->next) + fprintf(out, "\t%s \\\n", file->name); + else + fprintf(out, "\t%s\n", file->name); + } + fprintf(out, "\n.config include/linux/autoconf.h: $(deps_config)\n\n$(deps_config):\n"); + fclose(out); + rename("..config.tmp", name); + return 0; +} + + +/* Allocate initial growable sting */ +struct gstr str_new(void) +{ + struct gstr gs; + gs.s = malloc(sizeof(char) * 64); + gs.len = 16; + strcpy(gs.s, "\0"); + return gs; +} + +/* Allocate and assign growable string */ +struct gstr str_assign(const char *s) +{ + struct gstr gs; + gs.s = strdup(s); + gs.len = strlen(s) + 1; + return gs; +} + +/* Free storage for growable string */ +void str_free(struct gstr *gs) +{ + if (gs->s) + free(gs->s); + gs->s = NULL; + gs->len = 0; +} + +/* Append to growable string */ +void str_append(struct gstr *gs, const char *s) +{ + size_t l = strlen(gs->s) + strlen(s) + 1; + if (l > gs->len) { + gs->s = realloc(gs->s, l); + gs->len = l; + } + strcat(gs->s, s); +} + +/* Append printf formatted string to growable string */ +void str_printf(struct gstr *gs, const char *fmt, ...) +{ + va_list ap; + char s[10000]; /* big enough... */ + va_start(ap, fmt); + vsnprintf(s, sizeof(s), fmt, ap); + str_append(gs, s); + va_end(ap); +} + +/* Retrieve value of growable string */ +const char *str_get(struct gstr *gs) +{ + return gs->s; +} + diff --git a/openwrt/scripts/config/zconf.gperf b/openwrt/scripts/config/zconf.gperf new file mode 100644 index 00000000000..b03220600b3 --- /dev/null +++ b/openwrt/scripts/config/zconf.gperf @@ -0,0 +1,43 @@ +%language=ANSI-C +%define hash-function-name kconf_id_hash +%define lookup-function-name kconf_id_lookup +%define string-pool-name kconf_id_strings +%compare-strncmp +%enum +%pic +%struct-type + +struct kconf_id; + +%% +mainmenu, T_MAINMENU, TF_COMMAND +menu, T_MENU, TF_COMMAND +endmenu, T_ENDMENU, TF_COMMAND +source, T_SOURCE, TF_COMMAND +choice, T_CHOICE, TF_COMMAND +endchoice, T_ENDCHOICE, TF_COMMAND +comment, T_COMMENT, TF_COMMAND +config, T_CONFIG, TF_COMMAND +menuconfig, T_MENUCONFIG, TF_COMMAND +help, T_HELP, TF_COMMAND +if, T_IF, TF_COMMAND|TF_PARAM +endif, T_ENDIF, TF_COMMAND +depends, T_DEPENDS, TF_COMMAND +requires, T_REQUIRES, TF_COMMAND +optional, T_OPTIONAL, TF_COMMAND +default, T_DEFAULT, TF_COMMAND, S_UNKNOWN +prompt, T_PROMPT, TF_COMMAND +tristate, T_TYPE, TF_COMMAND, S_TRISTATE +def_tristate, T_DEFAULT, TF_COMMAND, S_TRISTATE +bool, T_TYPE, TF_COMMAND, S_BOOLEAN +boolean, T_TYPE, TF_COMMAND, S_BOOLEAN +def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN +def_boolean, T_DEFAULT, TF_COMMAND, S_BOOLEAN +int, T_TYPE, TF_COMMAND, S_INT +hex, T_TYPE, TF_COMMAND, S_HEX +string, T_TYPE, TF_COMMAND, S_STRING +select, T_SELECT, TF_COMMAND +enable, T_SELECT, TF_COMMAND +range, T_RANGE, TF_COMMAND +on, T_ON, TF_PARAM +%% diff --git a/openwrt/scripts/config/zconf.hash.c_shipped b/openwrt/scripts/config/zconf.hash.c_shipped new file mode 100644 index 00000000000..345f0fc07ca --- /dev/null +++ b/openwrt/scripts/config/zconf.hash.c_shipped @@ -0,0 +1,231 @@ +/* ANSI-C code produced by gperf version 3.0.1 */ +/* Command-line: gperf */ +/* Computed positions: -k'1,3' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + +struct kconf_id; +/* maximum key range = 45, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +kconf_id_hash (register const char *str, register unsigned int len) +{ + static unsigned char asso_values[] = + { + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 25, 10, 15, + 0, 0, 5, 47, 0, 0, 47, 47, 0, 10, + 0, 20, 20, 20, 5, 0, 0, 20, 47, 47, + 20, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47 + }; + register int hval = len; + + switch (hval) + { + default: + hval += asso_values[(unsigned char)str[2]]; + /*FALLTHROUGH*/ + case 2: + case 1: + hval += asso_values[(unsigned char)str[0]]; + break; + } + return hval; +} + +struct kconf_id_strings_t + { + char kconf_id_strings_str2[sizeof("if")]; + char kconf_id_strings_str3[sizeof("int")]; + char kconf_id_strings_str4[sizeof("help")]; + char kconf_id_strings_str5[sizeof("endif")]; + char kconf_id_strings_str6[sizeof("select")]; + char kconf_id_strings_str7[sizeof("endmenu")]; + char kconf_id_strings_str8[sizeof("tristate")]; + char kconf_id_strings_str9[sizeof("endchoice")]; + char kconf_id_strings_str10[sizeof("range")]; + char kconf_id_strings_str11[sizeof("string")]; + char kconf_id_strings_str12[sizeof("default")]; + char kconf_id_strings_str13[sizeof("def_bool")]; + char kconf_id_strings_str14[sizeof("menu")]; + char kconf_id_strings_str16[sizeof("def_boolean")]; + char kconf_id_strings_str17[sizeof("def_tristate")]; + char kconf_id_strings_str18[sizeof("mainmenu")]; + char kconf_id_strings_str20[sizeof("menuconfig")]; + char kconf_id_strings_str21[sizeof("config")]; + char kconf_id_strings_str22[sizeof("on")]; + char kconf_id_strings_str23[sizeof("hex")]; + char kconf_id_strings_str26[sizeof("source")]; + char kconf_id_strings_str27[sizeof("depends")]; + char kconf_id_strings_str28[sizeof("optional")]; + char kconf_id_strings_str31[sizeof("enable")]; + char kconf_id_strings_str32[sizeof("comment")]; + char kconf_id_strings_str33[sizeof("requires")]; + char kconf_id_strings_str34[sizeof("bool")]; + char kconf_id_strings_str37[sizeof("boolean")]; + char kconf_id_strings_str41[sizeof("choice")]; + char kconf_id_strings_str46[sizeof("prompt")]; + }; +static struct kconf_id_strings_t kconf_id_strings_contents = + { + "if", + "int", + "help", + "endif", + "select", + "endmenu", + "tristate", + "endchoice", + "range", + "string", + "default", + "def_bool", + "menu", + "def_boolean", + "def_tristate", + "mainmenu", + "menuconfig", + "config", + "on", + "hex", + "source", + "depends", + "optional", + "enable", + "comment", + "requires", + "bool", + "boolean", + "choice", + "prompt" + }; +#define kconf_id_strings ((const char *) &kconf_id_strings_contents) +#ifdef __GNUC__ +__inline +#endif +struct kconf_id * +kconf_id_lookup (register const char *str, register unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 30, + MIN_WORD_LENGTH = 2, + MAX_WORD_LENGTH = 12, + MIN_HASH_VALUE = 2, + MAX_HASH_VALUE = 46 + }; + + static struct kconf_id wordlist[] = + { + {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str4, T_HELP, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_SELECT, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_TYPE, TF_COMMAND, S_STRING}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_MENU, TF_COMMAND}, + {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_MAINMENU, TF_COMMAND}, + {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_MENUCONFIG, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CONFIG, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ON, TF_PARAM}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_HEX}, + {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SOURCE, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_DEPENDS, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPTIONAL, TF_COMMAND}, + {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_REQUIRES, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN}, + {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN}, + {-1}, {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_CHOICE, TF_COMMAND}, + {-1}, {-1}, {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_PROMPT, TF_COMMAND} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register int key = kconf_id_hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) + { + register int o = wordlist[key].name; + if (o >= 0) + { + register const char *s = o + kconf_id_strings; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') + return &wordlist[key]; + } + } + } + return 0; +} + diff --git a/openwrt/scripts/config/zconf.l b/openwrt/scripts/config/zconf.l new file mode 100644 index 00000000000..cfa46077c6b --- /dev/null +++ b/openwrt/scripts/config/zconf.l @@ -0,0 +1,350 @@ +%option backup nostdinit noyywrap never-interactive full ecs +%option 8bit backup nodefault perf-report perf-report +%x COMMAND HELP STRING PARAM +%{ +/* + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> + * Released under the terms of the GNU GPL v2.0. + */ + +#include <limits.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#define LKC_DIRECT_LINK +#include "lkc.h" + +#define START_STRSIZE 16 + +static struct { + struct file *file; + int lineno; +} current_pos; + +static char *text; +static int text_size, text_asize; + +struct buffer { + struct buffer *parent; + YY_BUFFER_STATE state; +}; + +struct buffer *current_buf; + +static int last_ts, first_ts; + +static void zconf_endhelp(void); +static void zconf_endfile(void); + +void new_string(void) +{ + text = malloc(START_STRSIZE); + text_asize = START_STRSIZE; + text_size = 0; + *text = 0; +} + +void append_string(const char *str, int size) +{ + int new_size = text_size + size + 1; + if (new_size > text_asize) { + new_size += START_STRSIZE - 1; + new_size &= -START_STRSIZE; + text = realloc(text, new_size); + text_asize = new_size; + } + memcpy(text + text_size, str, size); + text_size += size; + text[text_size] = 0; +} + +void alloc_string(const char *str, int size) +{ + text = malloc(size + 1); + memcpy(text, str, size); + text[size] = 0; +} +%} + +ws [ \n\t] +n [A-Za-z0-9_] + +%% + int str = 0; + int ts, i; + +[ \t]*#.*\n | +[ \t]*\n { + current_file->lineno++; + return T_EOL; +} +[ \t]*#.* + + +[ \t]+ { + BEGIN(COMMAND); +} + +. { + unput(yytext[0]); + BEGIN(COMMAND); +} + + +<COMMAND>{ + {n}+ { + struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + BEGIN(PARAM); + current_pos.file = current_file; + current_pos.lineno = current_file->lineno; + if (id && id->flags & TF_COMMAND) { + zconflval.id = id; + return id->token; + } + alloc_string(yytext, yyleng); + zconflval.string = text; + return T_WORD; + } + . + \n { + BEGIN(INITIAL); + current_file->lineno++; + return T_EOL; + } +} + +<PARAM>{ + "&&" return T_AND; + "||" return T_OR; + "(" return T_OPEN_PAREN; + ")" return T_CLOSE_PAREN; + "!" return T_NOT; + "=" return T_EQUAL; + "!=" return T_UNEQUAL; + \"|\' { + str = yytext[0]; + new_string(); + BEGIN(STRING); + } + \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; + --- /* ignore */ + ({n}|[-/.])+ { + struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + if (id && id->flags & TF_PARAM) { + zconflval.id = id; + return id->token; + } + alloc_string(yytext, yyleng); + zconflval.string = text; + return T_WORD; + } + #.* /* comment */ + \\\n current_file->lineno++; + . + <<EOF>> { + BEGIN(INITIAL); + } +} + +<STRING>{ + [^'"\\\n]+/\n { + append_string(yytext, yyleng); + zconflval.string = text; + return T_WORD_QUOTE; + } + [^'"\\\n]+ { + append_string(yytext, yyleng); + } + \\.?/\n { + append_string(yytext + 1, yyleng - 1); + zconflval.string = text; + return T_WORD_QUOTE; + } + \\.? { + append_string(yytext + 1, yyleng - 1); + } + \'|\" { + if (str == yytext[0]) { + BEGIN(PARAM); + zconflval.string = text; + return T_WORD_QUOTE; + } else + append_string(yytext, 1); + } + \n { + printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); + current_file->lineno++; + BEGIN(INITIAL); + return T_EOL; + } + <<EOF>> { + BEGIN(INITIAL); + } +} + +<HELP>{ + [ \t]+ { + ts = 0; + for (i = 0; i < yyleng; i++) { + if (yytext[i] == '\t') + ts = (ts & ~7) + 8; + else + ts++; + } + last_ts = ts; + if (first_ts) { + if (ts < first_ts) { + zconf_endhelp(); + return T_HELPTEXT; + } + ts -= first_ts; + while (ts > 8) { + append_string(" ", 8); + ts -= 8; + } + append_string(" ", ts); + } + } + [ \t]*\n/[^ \t\n] { + current_file->lineno++; + zconf_endhelp(); + return T_HELPTEXT; + } + [ \t]*\n { + current_file->lineno++; + append_string("\n", 1); + } + [^ \t\n].* { + append_string(yytext, yyleng); + if (!first_ts) + first_ts = last_ts; + } + <<EOF>> { + zconf_endhelp(); + return T_HELPTEXT; + } +} + +<<EOF>> { + if (current_file) { + zconf_endfile(); + return T_EOL; + } + fclose(yyin); + yyterminate(); +} + +%% +void zconf_starthelp(void) +{ + new_string(); + last_ts = first_ts = 0; + BEGIN(HELP); +} + +static void zconf_endhelp(void) +{ + zconflval.string = text; + BEGIN(INITIAL); +} + + +/* + * Try to open specified file with following names: + * ./name + * $(srctree)/name + * The latter is used when srctree is separate from objtree + * when compiling the kernel. + * Return NULL if file is not found. + */ +FILE *zconf_fopen(const char *name) +{ + char *env, fullname[PATH_MAX+1]; + FILE *f; + + f = fopen(name, "r"); + if (!f && name[0] != '/') { + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + f = fopen(fullname, "r"); + } + } + return f; +} + +void zconf_initscan(const char *name) +{ + yyin = zconf_fopen(name); + if (!yyin) { + printf("can't find file %s\n", name); + exit(1); + } + + current_buf = malloc(sizeof(*current_buf)); + memset(current_buf, 0, sizeof(*current_buf)); + + current_file = file_lookup(name); + current_file->lineno = 1; + current_file->flags = FILE_BUSY; +} + +void zconf_nextfile(const char *name) +{ + struct file *file = file_lookup(name); + struct buffer *buf = malloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + + current_buf->state = YY_CURRENT_BUFFER; + yyin = zconf_fopen(name); + if (!yyin) { + printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); + exit(1); + } + yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + if (file->flags & FILE_BUSY) { + printf("recursive scan (%s)?\n", name); + exit(1); + } + if (file->flags & FILE_SCANNED) { + printf("file %s already scanned?\n", name); + exit(1); + } + file->flags |= FILE_BUSY; + file->lineno = 1; + file->parent = current_file; + current_file = file; +} + +static void zconf_endfile(void) +{ + struct buffer *parent; + + current_file->flags |= FILE_SCANNED; + current_file->flags &= ~FILE_BUSY; + current_file = current_file->parent; + + parent = current_buf->parent; + if (parent) { + fclose(yyin); + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(parent->state); + } + free(current_buf); + current_buf = parent; +} + +int zconf_lineno(void) +{ + return current_pos.lineno; +} + +char *zconf_curname(void) +{ + return current_pos.file ? current_pos.file->name : "<none>"; +} diff --git a/openwrt/scripts/config/zconf.tab.c_shipped b/openwrt/scripts/config/zconf.tab.c_shipped new file mode 100644 index 00000000000..dbf1e039edb --- /dev/null +++ b/openwrt/scripts/config/zconf.tab.c_shipped @@ -0,0 +1,2146 @@ +/* A Bison parser, made by GNU Bison 1.875d. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + 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, 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. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* If NAME_PREFIX is specified substitute the variables and functions + names. */ +#define yyparse zconfparse +#define yylex zconflex +#define yyerror zconferror +#define yylval zconflval +#define yychar zconfchar +#define yydebug zconfdebug +#define yynerrs zconfnerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_MAINMENU = 258, + T_MENU = 259, + T_ENDMENU = 260, + T_SOURCE = 261, + T_CHOICE = 262, + T_ENDCHOICE = 263, + T_COMMENT = 264, + T_CONFIG = 265, + T_MENUCONFIG = 266, + T_HELP = 267, + T_HELPTEXT = 268, + T_IF = 269, + T_ENDIF = 270, + T_DEPENDS = 271, + T_REQUIRES = 272, + T_OPTIONAL = 273, + T_PROMPT = 274, + T_TYPE = 275, + T_DEFAULT = 276, + T_SELECT = 277, + T_RANGE = 278, + T_ON = 279, + T_WORD = 280, + T_WORD_QUOTE = 281, + T_UNEQUAL = 282, + T_CLOSE_PAREN = 283, + T_OPEN_PAREN = 284, + T_EOL = 285, + T_OR = 286, + T_AND = 287, + T_EQUAL = 288, + T_NOT = 289 + }; +#endif +#define T_MAINMENU 258 +#define T_MENU 259 +#define T_ENDMENU 260 +#define T_SOURCE 261 +#define T_CHOICE 262 +#define T_ENDCHOICE 263 +#define T_COMMENT 264 +#define T_CONFIG 265 +#define T_MENUCONFIG 266 +#define T_HELP 267 +#define T_HELPTEXT 268 +#define T_IF 269 +#define T_ENDIF 270 +#define T_DEPENDS 271 +#define T_REQUIRES 272 +#define T_OPTIONAL 273 +#define T_PROMPT 274 +#define T_TYPE 275 +#define T_DEFAULT 276 +#define T_SELECT 277 +#define T_RANGE 278 +#define T_ON 279 +#define T_WORD 280 +#define T_WORD_QUOTE 281 +#define T_UNEQUAL 282 +#define T_CLOSE_PAREN 283 +#define T_OPEN_PAREN 284 +#define T_EOL 285 +#define T_OR 286 +#define T_AND 287 +#define T_EQUAL 288 +#define T_NOT 289 + + + + +/* Copy the first part of user declarations. */ + + +/* + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> + * Released under the terms of the GNU GPL v2.0. + */ + +#include <ctype.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdbool.h> + +#define LKC_DIRECT_LINK +#include "lkc.h" + +#include "zconf.hash.c" + +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) + +#define PRINTD 0x0001 +#define DEBUG_PARSE 0x0002 + +int cdebug = PRINTD; + +extern int zconflex(void); +static void zconfprint(const char *err, ...); +static void zconf_error(const char *err, ...); +static void zconferror(const char *err); +static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); + +struct symbol *symbol_hash[257]; + +static struct menu *current_menu, *current_entry; + +#define YYDEBUG 0 +#if YYDEBUG +#define YYERROR_VERBOSE +#endif + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) + +typedef union YYSTYPE { + char *string; + struct file *file; + struct symbol *symbol; + struct expr *expr; + struct menu *menu; + struct kconf_id *id; +} YYSTYPE; +/* Line 191 of yacc.c. */ + +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 214 of yacc.c. */ + + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +# ifndef YYFREE +# define YYFREE free +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# endif + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif +# else +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short int yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined (__GNUC__) && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 3 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 264 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 35 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 42 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 104 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 175 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 289 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned char yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned short int yyprhs[] = +{ + 0, 0, 3, 5, 6, 9, 12, 15, 20, 23, + 28, 33, 37, 39, 41, 43, 45, 47, 49, 51, + 53, 55, 57, 59, 61, 63, 67, 70, 74, 77, + 81, 84, 85, 88, 91, 94, 97, 100, 104, 109, + 114, 119, 125, 128, 131, 133, 137, 138, 141, 144, + 147, 150, 153, 158, 162, 165, 170, 171, 174, 178, + 180, 184, 185, 188, 191, 194, 198, 201, 203, 207, + 208, 211, 214, 217, 221, 225, 228, 231, 234, 235, + 238, 241, 244, 249, 253, 257, 258, 261, 263, 265, + 268, 271, 274, 276, 279, 280, 283, 285, 289, 293, + 297, 300, 304, 308, 310 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = +{ + 36, 0, -1, 37, -1, -1, 37, 39, -1, 37, + 50, -1, 37, 61, -1, 37, 3, 71, 73, -1, + 37, 72, -1, 37, 25, 1, 30, -1, 37, 38, + 1, 30, -1, 37, 1, 30, -1, 16, -1, 19, + -1, 20, -1, 22, -1, 18, -1, 23, -1, 21, + -1, 30, -1, 56, -1, 65, -1, 42, -1, 44, + -1, 63, -1, 25, 1, 30, -1, 1, 30, -1, + 10, 25, 30, -1, 41, 45, -1, 11, 25, 30, + -1, 43, 45, -1, -1, 45, 46, -1, 45, 69, + -1, 45, 67, -1, 45, 40, -1, 45, 30, -1, + 20, 70, 30, -1, 19, 71, 74, 30, -1, 21, + 75, 74, 30, -1, 22, 25, 74, 30, -1, 23, + 76, 76, 74, 30, -1, 7, 30, -1, 47, 51, + -1, 72, -1, 48, 53, 49, -1, -1, 51, 52, + -1, 51, 69, -1, 51, 67, -1, 51, 30, -1, + 51, 40, -1, 19, 71, 74, 30, -1, 20, 70, + 30, -1, 18, 30, -1, 21, 25, 74, 30, -1, + -1, 53, 39, -1, 14, 75, 73, -1, 72, -1, + 54, 57, 55, -1, -1, 57, 39, -1, 57, 61, + -1, 57, 50, -1, 4, 71, 30, -1, 58, 68, + -1, 72, -1, 59, 62, 60, -1, -1, 62, 39, + -1, 62, 61, -1, 62, 50, -1, 6, 71, 30, + -1, 9, 71, 30, -1, 64, 68, -1, 12, 30, + -1, 66, 13, -1, -1, 68, 69, -1, 68, 30, + -1, 68, 40, -1, 16, 24, 75, 30, -1, 16, + 75, 30, -1, 17, 75, 30, -1, -1, 71, 74, + -1, 25, -1, 26, -1, 5, 30, -1, 8, 30, + -1, 15, 30, -1, 30, -1, 73, 30, -1, -1, + 14, 75, -1, 76, -1, 76, 33, 76, -1, 76, + 27, 76, -1, 29, 75, 28, -1, 34, 75, -1, + 75, 31, 75, -1, 75, 32, 75, -1, 25, -1, + 26, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned short int yyrline[] = +{ + 0, 103, 103, 105, 107, 108, 109, 110, 111, 112, + 113, 117, 121, 121, 121, 121, 121, 121, 121, 125, + 126, 127, 128, 129, 130, 134, 135, 141, 149, 155, + 163, 173, 175, 176, 177, 178, 179, 182, 190, 196, + 206, 212, 220, 229, 234, 242, 245, 247, 248, 249, + 250, 251, 254, 260, 271, 277, 287, 289, 294, 302, + 310, 313, 315, 316, 317, 322, 329, 334, 342, 345, + 347, 348, 349, 352, 360, 367, 374, 380, 387, 389, + 390, 391, 394, 399, 404, 412, 414, 419, 420, 423, + 424, 425, 429, 430, 433, 434, 437, 438, 439, 440, + 441, 442, 443, 446, 447 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", + "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", + "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", + "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", + "T_SELECT", "T_RANGE", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", + "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", + "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt", + "option_error", "config_entry_start", "config_stmt", + "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", + "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", + "choice_option_list", "choice_option", "choice_block", "if_entry", + "if_end", "if_stmt", "if_block", "menu", "menu_entry", "menu_end", + "menu_stmt", "menu_block", "source_stmt", "comment", "comment_stmt", + "help_start", "help", "depends_list", "depends", "prompt_stmt_opt", + "prompt", "end", "nl", "if_expr", "expr", "symbol", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short int yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 35, 36, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 38, 38, 38, 38, 38, 38, 38, 39, + 39, 39, 39, 39, 39, 40, 40, 41, 42, 43, + 44, 45, 45, 45, 45, 45, 45, 46, 46, 46, + 46, 46, 47, 48, 49, 50, 51, 51, 51, 51, + 51, 51, 52, 52, 52, 52, 53, 53, 54, 55, + 56, 57, 57, 57, 57, 58, 59, 60, 61, 62, + 62, 62, 62, 63, 64, 65, 66, 67, 68, 68, + 68, 68, 69, 69, 69, 70, 70, 71, 71, 72, + 72, 72, 73, 73, 74, 74, 75, 75, 75, 75, + 75, 75, 75, 76, 76 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 1, 0, 2, 2, 2, 4, 2, 4, + 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 2, 3, 2, 3, + 2, 0, 2, 2, 2, 2, 2, 3, 4, 4, + 4, 5, 2, 2, 1, 3, 0, 2, 2, 2, + 2, 2, 4, 3, 2, 4, 0, 2, 3, 1, + 3, 0, 2, 2, 2, 3, 2, 1, 3, 0, + 2, 2, 2, 3, 3, 2, 2, 2, 0, 2, + 2, 2, 4, 3, 3, 0, 2, 1, 1, 2, + 2, 2, 1, 2, 0, 2, 1, 3, 3, 3, + 2, 3, 3, 1, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned char yydefact[] = +{ + 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 12, 16, 13, 14, + 18, 15, 17, 0, 19, 0, 4, 31, 22, 31, + 23, 46, 56, 5, 61, 20, 78, 69, 6, 24, + 78, 21, 8, 11, 87, 88, 0, 0, 89, 0, + 42, 90, 0, 0, 0, 103, 104, 0, 0, 0, + 96, 91, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 7, 65, 73, 74, 27, 29, 0, + 100, 0, 0, 58, 0, 0, 9, 10, 0, 0, + 0, 0, 0, 85, 0, 0, 0, 0, 36, 35, + 32, 0, 34, 33, 0, 0, 85, 0, 50, 51, + 47, 49, 48, 57, 45, 44, 62, 64, 60, 63, + 59, 80, 81, 79, 70, 72, 68, 71, 67, 93, + 99, 101, 102, 98, 97, 26, 76, 0, 0, 0, + 94, 0, 94, 94, 94, 0, 0, 77, 54, 94, + 0, 94, 0, 83, 84, 0, 0, 37, 86, 0, + 0, 94, 25, 0, 53, 0, 82, 95, 38, 39, + 40, 0, 52, 55, 41 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const short int yydefgoto[] = +{ + -1, 1, 2, 25, 26, 99, 27, 28, 29, 30, + 64, 100, 31, 32, 114, 33, 66, 110, 67, 34, + 118, 35, 68, 36, 37, 126, 38, 70, 39, 40, + 41, 101, 102, 69, 103, 141, 142, 42, 73, 156, + 59, 60 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -78 +static const short int yypact[] = +{ + -78, 2, 159, -78, -21, 0, 0, -12, 0, 1, + 4, 0, 27, 38, 60, 58, -78, -78, -78, -78, + -78, -78, -78, 100, -78, 104, -78, -78, -78, -78, + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, + -78, -78, -78, -78, -78, -78, 86, 113, -78, 114, + -78, -78, 125, 127, 128, -78, -78, 60, 60, 210, + 65, -78, 141, 142, 39, 103, 182, 200, 6, 66, + 6, 131, -78, 146, -78, -78, -78, -78, -78, 196, + -78, 60, 60, 146, 40, 40, -78, -78, 155, 156, + -2, 60, 0, 0, 60, 105, 40, 194, -78, -78, + -78, 206, -78, -78, 183, 0, 0, 195, -78, -78, + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, + -78, 197, -78, -78, -78, -78, -78, 60, 213, 216, + 212, 203, 212, 190, 212, 40, 208, -78, -78, 212, + 222, 212, 219, -78, -78, 60, 223, -78, -78, 224, + 225, 212, -78, 226, -78, 227, -78, 47, -78, -78, + -78, 228, -78, -78, -78 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const short int yypgoto[] = +{ + -78, -78, -78, -78, 164, -36, -78, -78, -78, -78, + 230, -78, -78, -78, -78, 29, -78, -78, -78, -78, + -78, -78, -78, -78, -78, -78, 59, -78, -78, -78, + -78, -78, 198, 220, 24, 157, -5, 169, 202, 74, + -53, -77 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -76 +static const short int yytable[] = +{ + 46, 47, 3, 49, 79, 80, 52, 133, 134, 43, + 6, 7, 8, 9, 10, 11, 12, 13, 48, 145, + 14, 15, 137, 55, 56, 44, 45, 57, 131, 132, + 109, 50, 58, 122, 51, 122, 24, 138, 139, -28, + 88, 143, -28, -28, -28, -28, -28, -28, -28, -28, + -28, 89, 53, -28, -28, 90, 91, -28, 92, 93, + 94, 95, 96, 54, 97, 55, 56, 88, 161, 98, + -66, -66, -66, -66, -66, -66, -66, -66, 81, 82, + -66, -66, 90, 91, 152, 55, 56, 140, 61, 57, + 112, 97, 84, 123, 58, 123, 121, 117, 85, 125, + 149, 62, 167, -30, 88, 63, -30, -30, -30, -30, + -30, -30, -30, -30, -30, 89, 72, -30, -30, 90, + 91, -30, 92, 93, 94, 95, 96, 119, 97, 127, + 144, -75, 88, 98, -75, -75, -75, -75, -75, -75, + -75, -75, -75, 74, 75, -75, -75, 90, 91, -75, + -75, -75, -75, -75, -75, 76, 97, 77, 78, -2, + 4, 121, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 86, 87, 14, 15, 16, 129, 17, 18, 19, + 20, 21, 22, 88, 23, 135, 136, -43, -43, 24, + -43, -43, -43, -43, 89, 146, -43, -43, 90, 91, + 104, 105, 106, 107, 155, 7, 8, 97, 10, 11, + 12, 13, 108, 148, 14, 15, 158, 159, 160, 147, + 151, 81, 82, 163, 130, 165, 155, 81, 82, 82, + 24, 113, 116, 157, 124, 171, 115, 120, 162, 128, + 72, 81, 82, 153, 81, 82, 154, 81, 82, 166, + 81, 82, 164, 168, 169, 170, 172, 173, 174, 65, + 71, 83, 0, 150, 111 +}; + +static const short int yycheck[] = +{ + 5, 6, 0, 8, 57, 58, 11, 84, 85, 30, + 4, 5, 6, 7, 8, 9, 10, 11, 30, 96, + 14, 15, 24, 25, 26, 25, 26, 29, 81, 82, + 66, 30, 34, 69, 30, 71, 30, 90, 91, 0, + 1, 94, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 25, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 25, 25, 25, 26, 1, 145, 30, + 4, 5, 6, 7, 8, 9, 10, 11, 31, 32, + 14, 15, 16, 17, 137, 25, 26, 92, 30, 29, + 66, 25, 27, 69, 34, 71, 30, 68, 33, 70, + 105, 1, 155, 0, 1, 1, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 30, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 68, 25, 70, + 25, 0, 1, 30, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 30, 30, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 30, 25, 30, 30, 0, + 1, 30, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 30, 30, 14, 15, 16, 30, 18, 19, 20, + 21, 22, 23, 1, 25, 30, 30, 5, 6, 30, + 8, 9, 10, 11, 12, 1, 14, 15, 16, 17, + 18, 19, 20, 21, 14, 5, 6, 25, 8, 9, + 10, 11, 30, 30, 14, 15, 142, 143, 144, 13, + 25, 31, 32, 149, 28, 151, 14, 31, 32, 32, + 30, 67, 68, 30, 70, 161, 67, 68, 30, 70, + 30, 31, 32, 30, 31, 32, 30, 31, 32, 30, + 31, 32, 30, 30, 30, 30, 30, 30, 30, 29, + 40, 59, -1, 106, 66 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 36, 37, 0, 1, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, + 21, 22, 23, 25, 30, 38, 39, 41, 42, 43, + 44, 47, 48, 50, 54, 56, 58, 59, 61, 63, + 64, 65, 72, 30, 25, 26, 71, 71, 30, 71, + 30, 30, 71, 25, 25, 25, 26, 29, 34, 75, + 76, 30, 1, 1, 45, 45, 51, 53, 57, 68, + 62, 68, 30, 73, 30, 30, 30, 30, 30, 75, + 75, 31, 32, 73, 27, 33, 30, 30, 1, 12, + 16, 17, 19, 20, 21, 22, 23, 25, 30, 40, + 46, 66, 67, 69, 18, 19, 20, 21, 30, 40, + 52, 67, 69, 39, 49, 72, 39, 50, 55, 61, + 72, 30, 40, 69, 39, 50, 60, 61, 72, 30, + 28, 75, 75, 76, 76, 30, 30, 24, 75, 75, + 71, 70, 71, 75, 25, 76, 1, 13, 30, 71, + 70, 25, 75, 30, 30, 14, 74, 30, 74, 74, + 74, 76, 30, 74, 30, 74, 30, 75, 30, 30, + 30, 74, 30, 30, 30 +}; + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up");\ + YYERROR; \ + } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) +#endif + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) + +# define YYDSYMPRINTF(Title, Token, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Token, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short int *bottom, short int *top) +#else +static void +yy_stack_print (bottom, top) + short int *bottom; + short int *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (/* Nothing. */; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; +#endif +{ + int yyi; + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YYDSYMPRINT(Args) +# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +#endif /* !YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + { + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + } + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yytype, yyvaluep) + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + switch (yytype) + { + case 48: /* choice_entry */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + yyvaluep->menu->file->name, yyvaluep->menu->lineno); + if (current_menu == yyvaluep->menu) + menu_end_menu(); +}; + + break; + case 54: /* if_entry */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + yyvaluep->menu->file->name, yyvaluep->menu->lineno); + if (current_menu == yyvaluep->menu) + menu_end_menu(); +}; + + break; + case 59: /* menu_entry */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + yyvaluep->menu->file->name, yyvaluep->menu->lineno); + if (current_menu == yyvaluep->menu) + menu_end_menu(); +}; + + break; + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM); +# else +int yyparse (); +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + register short int *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + + + +#define YYPOPSTACK (yyvsp--, yyssp--) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short int *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyoverflowlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + short int *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyoverflowlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 8: + + { zconf_error("unexpected end statement"); ;} + break; + + case 9: + + { zconf_error("unknown statement \"%s\"", yyvsp[-2].string); ;} + break; + + case 10: + + { + zconf_error("unexpected option \"%s\"", kconf_id_strings + yyvsp[-2].id->name); +;} + break; + + case 11: + + { zconf_error("invalid statement"); ;} + break; + + case 25: + + { zconf_error("unknown option \"%s\"", yyvsp[-2].string); ;} + break; + + case 26: + + { zconf_error("invalid option"); ;} + break; + + case 27: + + { + struct symbol *sym = sym_lookup(yyvsp[-1].string, 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); +;} + break; + + case 28: + + { + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 29: + + { + struct symbol *sym = sym_lookup(yyvsp[-1].string, 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); +;} + break; + + case 30: + + { + if (current_entry->prompt) + current_entry->prompt->type = P_MENU; + else + zconfprint("warning: menuconfig statement without prompt"); + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 37: + + { + menu_set_type(yyvsp[-2].id->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + yyvsp[-2].id->stype); +;} + break; + + case 38: + + { + menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 39: + + { + menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr); + if (yyvsp[-3].id->stype != S_UNKNOWN) + menu_set_type(yyvsp[-3].id->stype); + printd(DEBUG_PARSE, "%s:%d:default(%u)\n", + zconf_curname(), zconf_lineno(), + yyvsp[-3].id->stype); +;} + break; + + case 40: + + { + menu_add_symbol(P_SELECT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr); + printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 41: + + { + menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,yyvsp[-3].symbol, yyvsp[-2].symbol), yyvsp[-1].expr); + printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 42: + + { + struct symbol *sym = sym_lookup(NULL, 0); + sym->flags |= SYMBOL_CHOICE; + menu_add_entry(sym); + menu_add_expr(P_CHOICE, NULL, NULL); + printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 43: + + { + yyval.menu = menu_add_menu(); +;} + break; + + case 44: + + { + if (zconf_endtoken(yyvsp[0].id, T_CHOICE, T_ENDCHOICE)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); + } +;} + break; + + case 52: + + { + menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 53: + + { + if (yyvsp[-2].id->stype == S_BOOLEAN || yyvsp[-2].id->stype == S_TRISTATE) { + menu_set_type(yyvsp[-2].id->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + yyvsp[-2].id->stype); + } else + YYERROR; +;} + break; + + case 54: + + { + current_entry->sym->flags |= SYMBOL_OPTIONAL; + printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 55: + + { + if (yyvsp[-3].id->stype == S_UNKNOWN) { + menu_add_symbol(P_DEFAULT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr); + printd(DEBUG_PARSE, "%s:%d:default\n", + zconf_curname(), zconf_lineno()); + } else + YYERROR; +;} + break; + + case 58: + + { + printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); + menu_add_entry(NULL); + menu_add_dep(yyvsp[-1].expr); + yyval.menu = menu_add_menu(); +;} + break; + + case 59: + + { + if (zconf_endtoken(yyvsp[0].id, T_IF, T_ENDIF)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); + } +;} + break; + + case 65: + + { + menu_add_entry(NULL); + menu_add_prompt(P_MENU, yyvsp[-1].string, NULL); + printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 66: + + { + yyval.menu = menu_add_menu(); +;} + break; + + case 67: + + { + if (zconf_endtoken(yyvsp[0].id, T_MENU, T_ENDMENU)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); + } +;} + break; + + case 73: + + { + printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); + zconf_nextfile(yyvsp[-1].string); +;} + break; + + case 74: + + { + menu_add_entry(NULL); + menu_add_prompt(P_COMMENT, yyvsp[-1].string, NULL); + printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 75: + + { + menu_end_entry(); +;} + break; + + case 76: + + { + printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); + zconf_starthelp(); +;} + break; + + case 77: + + { + current_entry->sym->help = yyvsp[0].string; +;} + break; + + case 82: + + { + menu_add_dep(yyvsp[-1].expr); + printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 83: + + { + menu_add_dep(yyvsp[-1].expr); + printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 84: + + { + menu_add_dep(yyvsp[-1].expr); + printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); +;} + break; + + case 86: + + { + menu_add_prompt(P_PROMPT, yyvsp[-1].string, yyvsp[0].expr); +;} + break; + + case 89: + + { yyval.id = yyvsp[-1].id; ;} + break; + + case 90: + + { yyval.id = yyvsp[-1].id; ;} + break; + + case 91: + + { yyval.id = yyvsp[-1].id; ;} + break; + + case 94: + + { yyval.expr = NULL; ;} + break; + + case 95: + + { yyval.expr = yyvsp[0].expr; ;} + break; + + case 96: + + { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;} + break; + + case 97: + + { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;} + break; + + case 98: + + { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;} + break; + + case 99: + + { yyval.expr = yyvsp[-1].expr; ;} + break; + + case 100: + + { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;} + break; + + case 101: + + { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;} + break; + + case 102: + + { yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;} + break; + + case 103: + + { yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;} + break; + + case 104: + + { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;} + break; + + + } + +/* Line 1010 of yacc.c. */ + + + yyvsp -= yylen; + yyssp -= yylen; + + + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + const char* yyprefix; + char *yymsg; + int yyx; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 0; + + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) + { + yysize = 0; + break; + } + } + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); + + if (yycount < 5) + { + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yyp = yystpcpy (yyp, yyprefix); + yyp = yystpcpy (yyp, yytname[yyx]); + yyprefix = " or "; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("syntax error; also virtual memory exhausted"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror ("syntax error"); + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ + if (yychar == YYEOF) + for (;;) + { + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[*yyssp], yyvsp); + } + } + else + { + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); + yydestruct (yytoken, &yylval); + yychar = YYEMPTY; + + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + +#ifdef __GNUC__ + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ + if (0) + goto yyerrorlab; +#endif + + yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + YYDPRINTF ((stderr, "Shifting error token, ")); + + *++yyvsp = yylval; + + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + return yyresult; +} + + + + + +void conf_parse(const char *name) +{ + struct symbol *sym; + int i; + + zconf_initscan(name); + + sym_init(); + menu_init(); + modules_sym = sym_lookup("MODULES", 0); + rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); + +#if YYDEBUG + if (getenv("ZCONF_DEBUG")) + zconfdebug = 1; +#endif + zconfparse(); + if (zconfnerrs) + exit(1); + menu_finalize(&rootmenu); + for_all_symbols(i, sym) { + sym_check_deps(sym); + } + + sym_change_count = 1; +} + +const char *zconf_tokenname(int token) +{ + switch (token) { + case T_MENU: return "menu"; + case T_ENDMENU: return "endmenu"; + case T_CHOICE: return "choice"; + case T_ENDCHOICE: return "endchoice"; + case T_IF: return "if"; + case T_ENDIF: return "endif"; + case T_DEPENDS: return "depends"; + } + return "<token>"; +} + +static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) +{ + if (id->token != endtoken) { + zconf_error("unexpected '%s' within %s block", + kconf_id_strings + id->name, zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + if (current_menu->file != current_file) { + zconf_error("'%s' in different file than '%s'", + kconf_id_strings + id->name, zconf_tokenname(starttoken)); + fprintf(stderr, "%s:%d: location of the '%s'\n", + current_menu->file->name, current_menu->lineno, + zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + return true; +} + +static void zconfprint(const char *err, ...) +{ + va_list ap; + + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconf_error(const char *err, ...) +{ + va_list ap; + + zconfnerrs++; + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconferror(const char *err) +{ +#if YYDEBUG + fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); +#endif +} + +void print_quoted_string(FILE *out, const char *str) +{ + const char *p; + int len; + + putc('"', out); + while ((p = strchr(str, '"'))) { + len = p - str; + if (len) + fprintf(out, "%.*s", len, str); + fputs("\\\"", out); + str = p + 1; + } + fputs(str, out); + putc('"', out); +} + +void print_symbol(FILE *out, struct menu *menu) +{ + struct symbol *sym = menu->sym; + struct property *prop; + + if (sym_is_choice(sym)) + fprintf(out, "choice\n"); + else + fprintf(out, "config %s\n", sym->name); + switch (sym->type) { + case S_BOOLEAN: + fputs(" boolean\n", out); + break; + case S_TRISTATE: + fputs(" tristate\n", out); + break; + case S_STRING: + fputs(" string\n", out); + break; + case S_INT: + fputs(" integer\n", out); + break; + case S_HEX: + fputs(" hex\n", out); + break; + default: + fputs(" ???\n", out); + break; + } + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + switch (prop->type) { + case P_PROMPT: + fputs(" prompt ", out); + print_quoted_string(out, prop->text); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_DEFAULT: + fputs( " default ", out); + expr_fprint(prop->expr, out); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_CHOICE: + fputs(" #choice value\n", out); + break; + default: + fprintf(out, " unknown prop %d!\n", prop->type); + break; + } + } + if (sym->help) { + int len = strlen(sym->help); + while (sym->help[--len] == '\n') + sym->help[len] = 0; + fprintf(out, " help\n%s\n", sym->help); + } + fputc('\n', out); +} + +void zconfdump(FILE *out) +{ + struct property *prop; + struct symbol *sym; + struct menu *menu; + + menu = rootmenu.list; + while (menu) { + if ((sym = menu->sym)) + print_symbol(out, menu); + else if ((prop = menu->prompt)) { + switch (prop->type) { + case P_COMMENT: + fputs("\ncomment ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + case P_MENU: + fputs("\nmenu ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + default: + ; + } + if (!expr_is_yes(prop->visible.expr)) { + fputs(" depends ", out); + expr_fprint(prop->visible.expr, out); + fputc('\n', out); + } + fputs("\n", out); + } + + if (menu->list) + menu = menu->list; + else if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->prompt && menu->prompt->type == P_MENU) + fputs("\nendmenu\n", out); + if (menu->next) { + menu = menu->next; + break; + } + } + } +} + +#include "lex.zconf.c" +#include "util.c" +#include "confdata.c" +#include "expr.c" +#include "symbol.c" +#include "menu.c" + + diff --git a/openwrt/scripts/config/zconf.y b/openwrt/scripts/config/zconf.y new file mode 100644 index 00000000000..1f61fba6aa2 --- /dev/null +++ b/openwrt/scripts/config/zconf.y @@ -0,0 +1,681 @@ +%{ +/* + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> + * Released under the terms of the GNU GPL v2.0. + */ + +#include <ctype.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdbool.h> + +#define LKC_DIRECT_LINK +#include "lkc.h" + +#include "zconf.hash.c" + +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) + +#define PRINTD 0x0001 +#define DEBUG_PARSE 0x0002 + +int cdebug = PRINTD; + +extern int zconflex(void); +static void zconfprint(const char *err, ...); +static void zconf_error(const char *err, ...); +static void zconferror(const char *err); +static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); + +struct symbol *symbol_hash[257]; + +static struct menu *current_menu, *current_entry; + +#define YYDEBUG 0 +#if YYDEBUG +#define YYERROR_VERBOSE +#endif +%} +%expect 26 + +%union +{ + char *string; + struct file *file; + struct symbol *symbol; + struct expr *expr; + struct menu *menu; + struct kconf_id *id; +} + +%token <id>T_MAINMENU +%token <id>T_MENU +%token <id>T_ENDMENU +%token <id>T_SOURCE +%token <id>T_CHOICE +%token <id>T_ENDCHOICE +%token <id>T_COMMENT +%token <id>T_CONFIG +%token <id>T_MENUCONFIG +%token <id>T_HELP +%token <string> T_HELPTEXT +%token <id>T_IF +%token <id>T_ENDIF +%token <id>T_DEPENDS +%token <id>T_REQUIRES +%token <id>T_OPTIONAL +%token <id>T_PROMPT +%token <id>T_TYPE +%token <id>T_DEFAULT +%token <id>T_SELECT +%token <id>T_RANGE +%token <id>T_ON +%token <string> T_WORD +%token <string> T_WORD_QUOTE +%token T_UNEQUAL +%token T_CLOSE_PAREN +%token T_OPEN_PAREN +%token T_EOL + +%left T_OR +%left T_AND +%left T_EQUAL T_UNEQUAL +%nonassoc T_NOT + +%type <string> prompt +%type <symbol> symbol +%type <expr> expr +%type <expr> if_expr +%type <id> end +%type <id> option_name +%type <menu> if_entry menu_entry choice_entry + +%destructor { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + $$->file->name, $$->lineno); + if (current_menu == $$) + menu_end_menu(); +} if_entry menu_entry choice_entry + +%% +input: stmt_list; + +stmt_list: + /* empty */ + | stmt_list common_stmt + | stmt_list choice_stmt + | stmt_list menu_stmt + | stmt_list T_MAINMENU prompt nl + | stmt_list end { zconf_error("unexpected end statement"); } + | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } + | stmt_list option_name error T_EOL +{ + zconf_error("unexpected option \"%s\"", kconf_id_strings + $2->name); +} + | stmt_list error T_EOL { zconf_error("invalid statement"); } +; + +option_name: + T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT +; + +common_stmt: + T_EOL + | if_stmt + | comment_stmt + | config_stmt + | menuconfig_stmt + | source_stmt +; + +option_error: + T_WORD error T_EOL { zconf_error("unknown option \"%s\"", $1); } + | error T_EOL { zconf_error("invalid option"); } +; + + +/* config/menuconfig entry */ + +config_entry_start: T_CONFIG T_WORD T_EOL +{ + struct symbol *sym = sym_lookup($2, 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2); +}; + +config_stmt: config_entry_start config_option_list +{ + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +}; + +menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL +{ + struct symbol *sym = sym_lookup($2, 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2); +}; + +menuconfig_stmt: menuconfig_entry_start config_option_list +{ + if (current_entry->prompt) + current_entry->prompt->type = P_MENU; + else + zconfprint("warning: menuconfig statement without prompt"); + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +}; + +config_option_list: + /* empty */ + | config_option_list config_option + | config_option_list depends + | config_option_list help + | config_option_list option_error + | config_option_list T_EOL +; + +config_option: T_TYPE prompt_stmt_opt T_EOL +{ + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); +}; + +config_option: T_PROMPT prompt if_expr T_EOL +{ + menu_add_prompt(P_PROMPT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_DEFAULT expr if_expr T_EOL +{ + menu_add_expr(P_DEFAULT, $2, $3); + if ($1->stype != S_UNKNOWN) + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:default(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); +}; + +config_option: T_SELECT T_WORD if_expr T_EOL +{ + menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3); + printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_RANGE symbol symbol if_expr T_EOL +{ + menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); + printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); +}; + +/* choice entry */ + +choice: T_CHOICE T_EOL +{ + struct symbol *sym = sym_lookup(NULL, 0); + sym->flags |= SYMBOL_CHOICE; + menu_add_entry(sym); + menu_add_expr(P_CHOICE, NULL, NULL); + printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); +}; + +choice_entry: choice choice_option_list +{ + $$ = menu_add_menu(); +}; + +choice_end: end +{ + if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); + } +}; + +choice_stmt: choice_entry choice_block choice_end +; + +choice_option_list: + /* empty */ + | choice_option_list choice_option + | choice_option_list depends + | choice_option_list help + | choice_option_list T_EOL + | choice_option_list option_error +; + +choice_option: T_PROMPT prompt if_expr T_EOL +{ + menu_add_prompt(P_PROMPT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_TYPE prompt_stmt_opt T_EOL +{ + if ($1->stype == S_BOOLEAN || $1->stype == S_TRISTATE) { + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); + } else + YYERROR; +}; + +choice_option: T_OPTIONAL T_EOL +{ + current_entry->sym->flags |= SYMBOL_OPTIONAL; + printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_DEFAULT T_WORD if_expr T_EOL +{ + if ($1->stype == S_UNKNOWN) { + menu_add_symbol(P_DEFAULT, sym_lookup($2, 0), $3); + printd(DEBUG_PARSE, "%s:%d:default\n", + zconf_curname(), zconf_lineno()); + } else + YYERROR; +}; + +choice_block: + /* empty */ + | choice_block common_stmt +; + +/* if entry */ + +if_entry: T_IF expr nl +{ + printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); + menu_add_entry(NULL); + menu_add_dep($2); + $$ = menu_add_menu(); +}; + +if_end: end +{ + if (zconf_endtoken($1, T_IF, T_ENDIF)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); + } +}; + +if_stmt: if_entry if_block if_end +; + +if_block: + /* empty */ + | if_block common_stmt + | if_block menu_stmt + | if_block choice_stmt +; + +/* menu entry */ + +menu: T_MENU prompt T_EOL +{ + menu_add_entry(NULL); + menu_add_prompt(P_MENU, $2, NULL); + printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); +}; + +menu_entry: menu depends_list +{ + $$ = menu_add_menu(); +}; + +menu_end: end +{ + if (zconf_endtoken($1, T_MENU, T_ENDMENU)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); + } +}; + +menu_stmt: menu_entry menu_block menu_end +; + +menu_block: + /* empty */ + | menu_block common_stmt + | menu_block menu_stmt + | menu_block choice_stmt +; + +source_stmt: T_SOURCE prompt T_EOL +{ + printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); + zconf_nextfile($2); +}; + +/* comment entry */ + +comment: T_COMMENT prompt T_EOL +{ + menu_add_entry(NULL); + menu_add_prompt(P_COMMENT, $2, NULL); + printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); +}; + +comment_stmt: comment depends_list +{ + menu_end_entry(); +}; + +/* help option */ + +help_start: T_HELP T_EOL +{ + printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); + zconf_starthelp(); +}; + +help: help_start T_HELPTEXT +{ + current_entry->sym->help = $2; +}; + +/* depends option */ + +depends_list: + /* empty */ + | depends_list depends + | depends_list T_EOL + | depends_list option_error +; + +depends: T_DEPENDS T_ON expr T_EOL +{ + menu_add_dep($3); + printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); +} + | T_DEPENDS expr T_EOL +{ + menu_add_dep($2); + printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); +} + | T_REQUIRES expr T_EOL +{ + menu_add_dep($2); + printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); +}; + +/* prompt statement */ + +prompt_stmt_opt: + /* empty */ + | prompt if_expr +{ + menu_add_prompt(P_PROMPT, $1, $2); +}; + +prompt: T_WORD + | T_WORD_QUOTE +; + +end: T_ENDMENU T_EOL { $$ = $1; } + | T_ENDCHOICE T_EOL { $$ = $1; } + | T_ENDIF T_EOL { $$ = $1; } +; + +nl: + T_EOL + | nl T_EOL +; + +if_expr: /* empty */ { $$ = NULL; } + | T_IF expr { $$ = $2; } +; + +expr: symbol { $$ = expr_alloc_symbol($1); } + | symbol T_EQUAL symbol { $$ = expr_alloc_comp(E_EQUAL, $1, $3); } + | symbol T_UNEQUAL symbol { $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } + | T_OPEN_PAREN expr T_CLOSE_PAREN { $$ = $2; } + | T_NOT expr { $$ = expr_alloc_one(E_NOT, $2); } + | expr T_OR expr { $$ = expr_alloc_two(E_OR, $1, $3); } + | expr T_AND expr { $$ = expr_alloc_two(E_AND, $1, $3); } +; + +symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } + | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); } +; + +%% + +void conf_parse(const char *name) +{ + struct symbol *sym; + int i; + + zconf_initscan(name); + + sym_init(); + menu_init(); + modules_sym = sym_lookup("MODULES", 0); + rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); + +#if YYDEBUG + if (getenv("ZCONF_DEBUG")) + zconfdebug = 1; +#endif + zconfparse(); + if (zconfnerrs) + exit(1); + menu_finalize(&rootmenu); + for_all_symbols(i, sym) { + sym_check_deps(sym); + } + + sym_change_count = 1; +} + +const char *zconf_tokenname(int token) +{ + switch (token) { + case T_MENU: return "menu"; + case T_ENDMENU: return "endmenu"; + case T_CHOICE: return "choice"; + case T_ENDCHOICE: return "endchoice"; + case T_IF: return "if"; + case T_ENDIF: return "endif"; + case T_DEPENDS: return "depends"; + } + return "<token>"; +} + +static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) +{ + if (id->token != endtoken) { + zconf_error("unexpected '%s' within %s block", + kconf_id_strings + id->name, zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + if (current_menu->file != current_file) { + zconf_error("'%s' in different file than '%s'", + kconf_id_strings + id->name, zconf_tokenname(starttoken)); + fprintf(stderr, "%s:%d: location of the '%s'\n", + current_menu->file->name, current_menu->lineno, + zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + return true; +} + +static void zconfprint(const char *err, ...) +{ + va_list ap; + + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconf_error(const char *err, ...) +{ + va_list ap; + + zconfnerrs++; + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconferror(const char *err) +{ +#if YYDEBUG + fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); +#endif +} + +void print_quoted_string(FILE *out, const char *str) +{ + const char *p; + int len; + + putc('"', out); + while ((p = strchr(str, '"'))) { + len = p - str; + if (len) + fprintf(out, "%.*s", len, str); + fputs("\\\"", out); + str = p + 1; + } + fputs(str, out); + putc('"', out); +} + +void print_symbol(FILE *out, struct menu *menu) +{ + struct symbol *sym = menu->sym; + struct property *prop; + + if (sym_is_choice(sym)) + fprintf(out, "choice\n"); + else + fprintf(out, "config %s\n", sym->name); + switch (sym->type) { + case S_BOOLEAN: + fputs(" boolean\n", out); + break; + case S_TRISTATE: + fputs(" tristate\n", out); + break; + case S_STRING: + fputs(" string\n", out); + break; + case S_INT: + fputs(" integer\n", out); + break; + case S_HEX: + fputs(" hex\n", out); + break; + default: + fputs(" ???\n", out); + break; + } + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + switch (prop->type) { + case P_PROMPT: + fputs(" prompt ", out); + print_quoted_string(out, prop->text); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_DEFAULT: + fputs( " default ", out); + expr_fprint(prop->expr, out); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_CHOICE: + fputs(" #choice value\n", out); + break; + default: + fprintf(out, " unknown prop %d!\n", prop->type); + break; + } + } + if (sym->help) { + int len = strlen(sym->help); + while (sym->help[--len] == '\n') + sym->help[len] = 0; + fprintf(out, " help\n%s\n", sym->help); + } + fputc('\n', out); +} + +void zconfdump(FILE *out) +{ + struct property *prop; + struct symbol *sym; + struct menu *menu; + + menu = rootmenu.list; + while (menu) { + if ((sym = menu->sym)) + print_symbol(out, menu); + else if ((prop = menu->prompt)) { + switch (prop->type) { + case P_COMMENT: + fputs("\ncomment ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + case P_MENU: + fputs("\nmenu ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + default: + ; + } + if (!expr_is_yes(prop->visible.expr)) { + fputs(" depends ", out); + expr_fprint(prop->visible.expr, out); + fputc('\n', out); + } + fputs("\n", out); + } + + if (menu->list) + menu = menu->list; + else if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->prompt && menu->prompt->type == P_MENU) + fputs("\nendmenu\n", out); + if (menu->next) { + menu = menu->next; + break; + } + } + } +} + +#include "lex.zconf.c" +#include "util.c" +#include "confdata.c" +#include "expr.c" +#include "symbol.c" +#include "menu.c" From 6890e33a69b848932fe979b24fe54d397981cd1e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 20 Apr 2006 21:00:14 +0000 Subject: [PATCH 016/757] modify the kconfig system for openwrt SVN-Revision: 3683 --- openwrt/scripts/config/Makefile | 8 ++--- openwrt/scripts/config/README | 2 ++ openwrt/scripts/config/conf.c | 4 +-- openwrt/scripts/config/confdata.c | 14 ++++---- openwrt/scripts/config/mconf.c | 38 ++++++++++------------ openwrt/scripts/config/menu.c | 3 ++ openwrt/scripts/config/symbol.c | 13 ++++++-- openwrt/scripts/config/zconf.tab.c_shipped | 2 +- openwrt/scripts/config/zconf.y | 2 +- 9 files changed, 49 insertions(+), 37 deletions(-) create mode 100644 openwrt/scripts/config/README diff --git a/openwrt/scripts/config/Makefile b/openwrt/scripts/config/Makefile index 04e8330a01d..a731a40e7cf 100644 --- a/openwrt/scripts/config/Makefile +++ b/openwrt/scripts/config/Makefile @@ -1,5 +1,5 @@ # =========================================================================== -# Kernel configuration targets +# OpenWrt configuration targets # These targets are used from top-level makefile # =========================================================================== @@ -40,10 +40,10 @@ lex.zconf.c: zconf.l zconf.hash.c: zconf.gperf %.tab.c: %.y - bison -l -b $* -p $(notdir $*) $< && cp $@ $@_shipped || cp $@_shipped $@ + cp $@_shipped $@ || bison -l -b $* -p $(notdir $*) $< lex.%.c: %.l - flex -L -P$(notdir $*) -o$@ $< && cp $@ $@_shipped || cp $@_shipped $@ + cp $@_shipped $@ || flex -L -P$(notdir $*) -o$@ $< %.hash.c: %.gperf - gperf < $< > $@ && cp $@ $@_shipped || cp $@_shipped $@ + cp $@_shipped $@ || gperf < $< > $@ diff --git a/openwrt/scripts/config/README b/openwrt/scripts/config/README new file mode 100644 index 00000000000..54aaefb5982 --- /dev/null +++ b/openwrt/scripts/config/README @@ -0,0 +1,2 @@ +These files were taken from the Linux 2.6.16.7 Kernel +Configuration System and modified for the OpenWrt Buildroot. diff --git a/openwrt/scripts/config/conf.c b/openwrt/scripts/config/conf.c index 10eeae53d82..cb2093691e3 100644 --- a/openwrt/scripts/config/conf.c +++ b/openwrt/scripts/config/conf.c @@ -570,7 +570,7 @@ int main(int ac, char **av) case ask_silent: if (stat(".config", &tmpstat)) { printf(_("***\n" - "*** You have not yet configured your kernel!\n" + "*** You have not yet configured your build!\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n" @@ -619,7 +619,7 @@ int main(int ac, char **av) check_conf(&rootmenu); } while (conf_cnt); if (conf_write(NULL)) { - fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); + fprintf(stderr, _("\n*** Error during writing of the build configuration.\n\n")); return 1; } return 0; diff --git a/openwrt/scripts/config/confdata.c b/openwrt/scripts/config/confdata.c index b0cbbe2e41b..a1abdeb0873 100644 --- a/openwrt/scripts/config/confdata.c +++ b/openwrt/scripts/config/confdata.c @@ -22,13 +22,10 @@ static int conf_lineno, conf_warnings, conf_unsaved; const char conf_def_filename[] = ".config"; -const char conf_defname[] = "arch/$ARCH/defconfig"; +const char conf_defname[] = "scripts/config/defconfig"; const char *conf_confnames[] = { ".config", - "/lib/modules/$UNAME_RELEASE/.config", - "/etc/kernel-config", - "/boot/config-$UNAME_RELEASE", conf_defname, NULL, }; @@ -375,7 +372,7 @@ int conf_write(const char *name) if (!out_h) return 1; } - sym = sym_lookup("KERNELVERSION", 0); + sym = sym_lookup("OPENWRTVERSION", 0); sym_calc_value(sym); time(&now); env = getenv("KCONFIG_NOTIMESTAMP"); @@ -384,7 +381,7 @@ int conf_write(const char *name) fprintf(out, _("#\n" "# Automatically generated make config: don't edit\n" - "# Linux kernel version: %s\n" + "# OpenWrt version: %s\n" "%s%s" "#\n"), sym_get_string_value(sym), @@ -393,7 +390,7 @@ int conf_write(const char *name) if (out_h) fprintf(out_h, "/*\n" " * Automatically generated C config: don't edit\n" - " * Linux kernel version: %s\n" + " * OpenWrt version: %s\n" "%s%s" " */\n" "#define AUTOCONF_INCLUDED\n", @@ -428,8 +425,11 @@ int conf_write(const char *name) type = sym->type; if (type == S_TRISTATE) { sym_calc_value(modules_sym); +/* tristate always enabled */ +#if 0 if (modules_sym->curr.tri == no) type = S_BOOLEAN; +#endif } switch (type) { case S_BOOLEAN: diff --git a/openwrt/scripts/config/mconf.c b/openwrt/scripts/config/mconf.c index bb82bbe49fc..69cd56f1389 100644 --- a/openwrt/scripts/config/mconf.c +++ b/openwrt/scripts/config/mconf.c @@ -29,11 +29,9 @@ static char menu_backtitle[128]; static const char mconf_readme[] = N_( "Overview\n" "--------\n" -"Some kernel features may be built directly into the kernel.\n" -"Some may be made into loadable runtime modules. Some features\n" -"may be completely removed altogether. There are also certain\n" -"kernel parameters which are not really features, but must be\n" -"entered in as decimal or hexadecimal numbers or possibly text.\n" +"Some OpenWrt features may be built directly into the image.\n" +"Some may be made into installable ipkg packages. Some features\n" +"may be completely removed altogether.\n" "\n" "Menu items beginning with [*], <M> or [ ] represent features\n" "configured to be built in, modularized or removed respectively.\n" @@ -115,7 +113,7 @@ static const char mconf_readme[] = N_( "-----------------------------\n" "Menuconfig supports the use of alternate configuration files for\n" "those who, for various reasons, find it necessary to switch\n" -"between different kernel configurations.\n" +"between different OpenWrt configurations.\n" "\n" "At the end of the main menu you will find two options. One is\n" "for saving the current configuration to a file of your choosing.\n" @@ -148,7 +146,7 @@ static const char mconf_readme[] = N_( "\n" "Optional personality available\n" "------------------------------\n" -"If you prefer to have all of the kernel options listed in a single\n" +"If you prefer to have all of the build options listed in a single\n" "menu, rather than the default multimenu hierarchy, run the menuconfig\n" "with MENUCONFIG_MODE environment variable set to single_menu. Example:\n" "\n" @@ -186,18 +184,18 @@ setmod_text[] = N_( "This feature depends on another which has been configured as a module.\n" "As a result, this feature will be built as a module."), nohelp_text[] = N_( - "There is no help available for this kernel option.\n"), + "There is no help available for this config option.\n"), load_config_text[] = N_( "Enter the name of the configuration file you wish to load. " "Accept the name shown to restore the configuration you " "last retrieved. Leave blank to abort."), load_config_help[] = N_( "\n" - "For various reasons, one may wish to keep several different kernel\n" + "For various reasons, one may wish to keep several different OpenWrt\n" "configurations available on a single machine.\n" "\n" - "If you have saved a previous configuration in a file other than the\n" - "kernel's default, entering the name of the file here will allow you\n" + "If you have saved a previous configuration in a file other than\n" + "OpenWrt's default, entering the name of the file here will allow you\n" "to modify that configuration.\n" "\n" "If you are uncertain, then you have probably never used alternate\n" @@ -207,7 +205,7 @@ save_config_text[] = N_( "as an alternate. Leave blank to abort."), save_config_help[] = N_( "\n" - "For various reasons, one may wish to keep different kernel\n" + "For various reasons, one may wish to keep different OpenWrt\n" "configurations available on a single machine.\n" "\n" "Entering a file name here will allow you to later retrieve, modify\n" @@ -1051,9 +1049,9 @@ int main(int ac, char **av) conf_parse(av[1]); conf_read(NULL); - sym = sym_lookup("KERNELVERSION", 0); + sym = sym_lookup("OPENWRTVERSION", 0); sym_calc_value(sym); - sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"), + sprintf(menu_backtitle, _("OpenWrt %s Configuration"), sym_get_string_value(sym)); mode = getenv("MENUCONFIG_MODE"); @@ -1070,7 +1068,7 @@ int main(int ac, char **av) do { cprint_init(); cprint("--yesno"); - cprint(_("Do you wish to save your new kernel configuration?")); + cprint(_("Do you wish to save your new OpenWrt configuration?")); cprint("5"); cprint("60"); stat = exec_conf(); @@ -1079,18 +1077,18 @@ int main(int ac, char **av) if (stat == 0) { if (conf_write(NULL)) { fprintf(stderr, _("\n\n" - "Error during writing of the kernel configuration.\n" - "Your kernel configuration changes were NOT saved." + "Error during writing of the OpenWrt configuration.\n" + "Your configuration changes were NOT saved." "\n\n")); return 1; } printf(_("\n\n" - "*** End of Linux kernel configuration.\n" - "*** Execute 'make' to build the kernel or try 'make help'." + "*** End of OpenWrt configuration.\n" + "*** Execute 'make' to build the OpenWrt or try 'make help'." "\n\n")); } else { fprintf(stderr, _("\n\n" - "Your kernel configuration changes were NOT saved." + "Your configuration changes were NOT saved." "\n\n")); } diff --git a/openwrt/scripts/config/menu.c b/openwrt/scripts/config/menu.c index 0fce20cb7f3..20fda9b2fc5 100644 --- a/openwrt/scripts/config/menu.c +++ b/openwrt/scripts/config/menu.c @@ -88,11 +88,14 @@ struct expr *menu_check_dep(struct expr *e) e->left.expr = menu_check_dep(e->left.expr); e->right.expr = menu_check_dep(e->right.expr); break; +/* tristate always enabled */ +#if 0 case E_SYMBOL: /* change 'm' into 'm' && MODULES */ if (e->left.sym == &symbol_mod) return expr_alloc_and(e, expr_alloc_symbol(modules_sym)); break; +#endif default: break; } diff --git a/openwrt/scripts/config/symbol.c b/openwrt/scripts/config/symbol.c index 3d7877afccd..b79d81ac137 100644 --- a/openwrt/scripts/config/symbol.c +++ b/openwrt/scripts/config/symbol.c @@ -61,10 +61,10 @@ void sym_init(void) if (p) sym_add_default(sym, p); - sym = sym_lookup("KERNELVERSION", 0); + sym = sym_lookup("OPENWRTVERSION", 0); sym->type = S_STRING; sym->flags |= SYMBOL_AUTO; - p = getenv("KERNELVERSION"); + p = getenv("OPENWRTVERSION"); if (p) sym_add_default(sym, p); @@ -81,8 +81,11 @@ enum symbol_type sym_get_type(struct symbol *sym) if (type == S_TRISTATE) { if (sym_is_choice_value(sym) && sym->visible == yes) type = S_BOOLEAN; +/* tristate always enabled */ +#if 0 else if (modules_val == no) type = S_BOOLEAN; +#endif } return type; } @@ -201,7 +204,12 @@ static void sym_calc_visibility(struct symbol *sym) prop->visible.tri = expr_calc_value(prop->visible.expr); tri = E_OR(tri, prop->visible.tri); } +/* tristate always enabled */ +#if 0 if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) +#else + if (tri == mod && (sym->type != S_TRISTATE)) +#endif tri = yes; if (sym->visible != tri) { sym->visible = tri; @@ -354,6 +362,7 @@ void sym_calc_value(struct symbol *sym) if (memcmp(&oldval, &sym->curr, sizeof(oldval))) sym_set_changed(sym); + if (modules_sym == sym) modules_val = modules_sym->curr.tri; diff --git a/openwrt/scripts/config/zconf.tab.c_shipped b/openwrt/scripts/config/zconf.tab.c_shipped index dbf1e039edb..8060dc6a065 100644 --- a/openwrt/scripts/config/zconf.tab.c_shipped +++ b/openwrt/scripts/config/zconf.tab.c_shipped @@ -1922,7 +1922,7 @@ void conf_parse(const char *name) sym_init(); menu_init(); modules_sym = sym_lookup("MODULES", 0); - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); + rootmenu.prompt = menu_add_prompt(P_MENU, "OpenWrt Configuration", NULL); #if YYDEBUG if (getenv("ZCONF_DEBUG")) diff --git a/openwrt/scripts/config/zconf.y b/openwrt/scripts/config/zconf.y index 1f61fba6aa2..83243f5efe6 100644 --- a/openwrt/scripts/config/zconf.y +++ b/openwrt/scripts/config/zconf.y @@ -459,7 +459,7 @@ void conf_parse(const char *name) sym_init(); menu_init(); modules_sym = sym_lookup("MODULES", 0); - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); + rootmenu.prompt = menu_add_prompt(P_MENU, "OpenWrt Configuration", NULL); #if YYDEBUG if (getenv("ZCONF_DEBUG")) From 0ae1ce202cd3b70d5dc881701d8d3a0a5879259a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 20 Apr 2006 23:03:42 +0000 Subject: [PATCH 017/757] menuconfig cleanup SVN-Revision: 3684 --- openwrt/Config.in | 110 +- openwrt/Makefile | 179 +- openwrt/package/Config.in | 7 - openwrt/package/config/.cvsignore | 8 - openwrt/package/config/Config.in | 8 - openwrt/package/config/Kconfig-language.txt | 255 -- openwrt/package/config/Makefile | 113 - openwrt/package/config/Makefile.in | 3 - openwrt/package/config/checklist.c | 372 -- openwrt/package/config/colors.h | 161 - openwrt/package/config/conf.c | 583 --- openwrt/package/config/confdata.c | 447 --- openwrt/package/config/dialog.h | 196 - openwrt/package/config/expr.c | 1089 ------ openwrt/package/config/expr.h | 193 - openwrt/package/config/inputbox.c | 240 -- openwrt/package/config/lex.zconf.c_shipped | 3709 ------------------- openwrt/package/config/lkc.h | 113 - openwrt/package/config/lkc_proto.h | 39 - openwrt/package/config/mconf.c | 719 ---- openwrt/package/config/menu.c | 431 --- openwrt/package/config/menubox.c | 436 --- openwrt/package/config/msgbox.c | 85 - openwrt/package/config/symbol.c | 771 ---- openwrt/package/config/textbox.c | 556 --- openwrt/package/config/util.c | 375 -- openwrt/package/config/yesno.c | 118 - openwrt/package/config/zconf.l | 387 -- openwrt/package/config/zconf.tab.c_shipped | 2127 ----------- openwrt/package/config/zconf.tab.h_shipped | 125 - openwrt/package/config/zconf.y | 687 ---- openwrt/scripts/config/mconf.c | 16 +- openwrt/target/Config.in | 187 +- openwrt/target/linux/Config.in | 8 - openwrt/toolchain/Config.in | 42 +- openwrt/toolchain/Config.in.devel | 56 - openwrt/toolchain/binutils/Config.in | 38 +- openwrt/toolchain/gcc/Config.in | 78 +- openwrt/toolchain/uClibc/Config.in | 18 - 39 files changed, 278 insertions(+), 14807 deletions(-) delete mode 100644 openwrt/package/config/.cvsignore delete mode 100644 openwrt/package/config/Config.in delete mode 100644 openwrt/package/config/Kconfig-language.txt delete mode 100644 openwrt/package/config/Makefile delete mode 100644 openwrt/package/config/Makefile.in delete mode 100644 openwrt/package/config/checklist.c delete mode 100644 openwrt/package/config/colors.h delete mode 100644 openwrt/package/config/conf.c delete mode 100644 openwrt/package/config/confdata.c delete mode 100644 openwrt/package/config/dialog.h delete mode 100644 openwrt/package/config/expr.c delete mode 100644 openwrt/package/config/expr.h delete mode 100644 openwrt/package/config/inputbox.c delete mode 100644 openwrt/package/config/lex.zconf.c_shipped delete mode 100644 openwrt/package/config/lkc.h delete mode 100644 openwrt/package/config/lkc_proto.h delete mode 100644 openwrt/package/config/mconf.c delete mode 100644 openwrt/package/config/menu.c delete mode 100644 openwrt/package/config/menubox.c delete mode 100644 openwrt/package/config/msgbox.c delete mode 100644 openwrt/package/config/symbol.c delete mode 100644 openwrt/package/config/textbox.c delete mode 100644 openwrt/package/config/util.c delete mode 100644 openwrt/package/config/yesno.c delete mode 100644 openwrt/package/config/zconf.l delete mode 100644 openwrt/package/config/zconf.tab.c_shipped delete mode 100644 openwrt/package/config/zconf.tab.h_shipped delete mode 100644 openwrt/package/config/zconf.y delete mode 100644 openwrt/toolchain/Config.in.devel delete mode 100644 openwrt/toolchain/uClibc/Config.in diff --git a/openwrt/Config.in b/openwrt/Config.in index 99f9c9c34ed..7e4d29e7d7d 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -2,91 +2,37 @@ mainmenu "OpenWrt Configuration" -config MODULES +config HAVE_DOT_CONFIG bool default y -config BR2_HAVE_DOT_CONFIG - bool - default y - -# Supported architectures - -config BR2_i386 - tristate - -config BR2_mips - tristate - -config BR2_mipsel - tristate - -# Unsupported architectures - -if CONFIG_DEVEL - -config BR2_arm - tristate - -config BR2_armeb - tristate - -config BR2_cris - tristate - -config BR2_m68k - tristate - -config BR2_powerpc - tristate - -config BR2_sh3 - tristate - -config BR2_sh3eb - tristate - -config BR2_sh4 - tristate - -config BR2_sh4eb - tristate - -config BR2_sparc - tristate - -endif - -config BR2_ARCH - string - default "arm" if BR2_arm - default "armeb" if BR2_armeb - default "cris" if BR2_cris - default "i386" if BR2_i386 - default "m68k" if BR2_m68k - default "mips" if BR2_mips - default "mipsel" if BR2_mipsel || !CONFIG_DEVEL - default "powerpc" if BR2_powerpc - default "sh3" if BR2_sh3 - default "sh3eb" if BR2_sh3eb - default "sh4" if BR2_sh4 - default "sh4eb" if BR2_sh4eb - default "sparc" if BR2_sparc - - -config BR2_WGET - string - default "wget --passive-ftp -nd" - -config BR2_TAR_VERBOSITY - bool - default n - -config BR2_JLEVEL - int - default "1" - source "target/Config.in" + +config DEVEL + bool "Advanced configuration options (for developers)" + default n + select BUILDOPTS + select TOOLCHAINOPTS + +config ALL + bool "Select all packages by default" + default n + +menuconfig BUILDOPTS + bool "Build Options" if DEVEL + +config TAR_VERBOSITY + bool + prompt "Tar verbose" if BUILDOPTS + default n + +config JLEVEL + int + prompt "Number of jobs to run simultaneously" if BUILDOPTS + default "1" + help + Number of jobs to run simultanesouly + source "toolchain/Config.in" source "package/Config.in" -source "target/linux/Config.in" + diff --git a/openwrt/Makefile b/openwrt/Makefile index abc9dfee275..d82d6180e32 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -1,7 +1,6 @@ # Makefile for OpenWrt # -# Copyright (C) 2005 by Felix Fietkau <openwrt@nbd.name> -# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 2006 by Felix Fietkau <openwrt@nbd.name> # # 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 @@ -18,6 +17,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +RELEASE:=Kamikaze +#VERSION:=2.0 # uncomment for final release + #-------------------------------------------------------------- # Just run 'make menuconfig', configure stuff, then run 'make'. # You shouldn't need to mess with anything beyond this point... @@ -25,159 +27,48 @@ TOPDIR=${shell pwd} export TOPDIR -ifneq ($(DEVELOPER),) -CONFIG_CONFIG_IN = Config.in.devel +OPENWRTVERSION:=$(RELEASE) +ifneq ($(VERSION),) +OPENWRTVERSION:=$(VERSION) ($(OPENWRTVERSION)) else -CONFIG_CONFIG_IN = Config.in +REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) +ifneq ($(REV),) +OPENWRTVERSION:=$(OPENWRTVERSION)/r$(REV) endif -CONFIG_DEFCONFIG = .defconfig -CONFIG = package/config +endif +export OPENWRTVERSION -noconfig_targets := menuconfig config oldconfig randconfig \ - defconfig allyesconfig allnoconfig release tags - -# Pull in the user's configuration file -ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) --include $(TOPDIR)/.config +ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package) +.pkginfo: pkginfo-clean endif -ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) -include $(TOPDIR)/rules.mk +.pkginfo: + @echo Collecting package info... + @-for makefile in package/*/Makefile; do \ + echo Source-Makefile: $$makefile; \ + $(MAKE) DUMP=1 -f $$makefile 2>&- || true; \ + done > $@ + +.config.in: .pkginfo -all: world +pkginfo-clean: + -rm -f .pkginfo .config.in -.NOTPARALLEL: +scripts/config/mconf: .config.in + $(MAKE) -C scripts/config all -############################################################# -# -# You should probably leave this stuff alone unless you know -# what you are doing. -# -############################################################# +scripts/config/conf: .config.in + $(MAKE) -C scripts/config conf -# In this section, we need .config -include .config.cmd +menuconfig: scripts/config/mconf + $< Config.in -world: $(DL_DIR) $(BUILD_DIR) configtest - $(MAKE) toolchain/install target/compile package/compile root_clean package/install target/install package_index - @$(TRACE) Build complete. +config: scripts/config/mconf + $< Config.in -.PHONY: all world clean dirclean distclean image_clean target_clean source configtest +config-clean: + $(MAKE) -C scripts/config clean -configtest: - -cp .config .config.test - -scripts/configtest.pl +.PHONY: pkginfo-clean -package_index: - (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages) - -$(DL_DIR): - @mkdir -p $(DL_DIR) - -$(BUILD_DIR): - @mkdir -p $(BUILD_DIR) - -source: toolchain/source package/source target/source - -package/%: - @$(TRACE) $@ - $(MAKE) -C package $(patsubst package/%,%,$@) - -target/%: - @$(TRACE) $@ - $(MAKE) -C target $(patsubst target/%,%,$@) - -toolchain/%: - @$(TRACE) $@ - $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) - -############################################################# -# -# Cleanup and misc junk -# -############################################################# -root_clean: - @$(TRACE) root_clean - rm -rf $(BUILD_DIR)/linux-*/root $(BUILD_DIR)/root - -target_clean: root_clean - rm -f $(STAMP_DIR)/.*-compile - rm -f $(STAMP_DIR)/.*-install - rm -rf $(BIN_DIR) - -clean: dirclean - -dirclean: - @$(TRACE) dirclean - @$(MAKE) -C $(CONFIG) clean - rm -rf $(BUILD_DIR) - -distclean: dirclean - rm -rf $(STAMP_DIR) $(DL_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR) - rm -f .config* .tmpconfig.h - -else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) - -all: menuconfig - -# configuration -# --------------------------------------------------------------------------- - -$(CONFIG)/conf: - $(MAKE) -C $(CONFIG) conf - -@if [ ! -f .config ] ; then \ - cp $(CONFIG_DEFCONFIG) .config; \ - fi -$(CONFIG)/mconf: - $(MAKE) -C $(CONFIG) - -@if [ ! -f .config ] ; then \ - cp $(CONFIG_DEFCONFIG) .config; \ - fi - -menuconfig: $(CONFIG)/mconf - -touch .config - -cp .config .config.test - @$(CONFIG)/mconf $(CONFIG_CONFIG_IN) - -./scripts/configtest.pl - -config: $(CONFIG)/conf - -touch .config - -cp .config .config.test - @$(CONFIG)/conf $(CONFIG_CONFIG_IN) - -./scripts/configtest.pl - -oldconfig: $(CONFIG)/conf - -touch .config - -cp .config .config.test - @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN) - -./scripts/configtest.pl - -randconfig: $(CONFIG)/conf - -touch .config - -cp .config .config.test - @$(CONFIG)/conf -r $(CONFIG_CONFIG_IN) - -./scripts/configtest.pl - -allyesconfig: $(CONFIG)/conf - -touch .config - -cp .config .config.test - @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN) - -./scripts/configtest.pl - -allnoconfig: $(CONFIG)/conf - -touch .config - -cp .config .config.test - @$(CONFIG)/conf -n $(CONFIG_CONFIG_IN) - -./scripts/configtest.pl - -defconfig: $(CONFIG)/conf - -touch .config - -cp .config .config.test - @$(CONFIG)/conf -d $(CONFIG_CONFIG_IN) - -./scripts/configtest.pl - -endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) - -.PHONY: dummy subdirs release distclean clean config oldconfig \ - menuconfig tags check test depend diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in index 17e15275f94..a0961bf6672 100644 --- a/openwrt/package/Config.in +++ b/openwrt/package/Config.in @@ -5,13 +5,6 @@ menu "OpenWrt Package Selection" comment "Package categories" menu "Base system" -source "package/busybox/Config.in" -source "package/bridge/Config.in" -source "package/dnsmasq/Config.in" -source "package/ipkg/Config.in" -source "package/iptables/Config.in" -source "package/mtd/Config.in" -source "package/nvram/Config.in" endmenu endmenu diff --git a/openwrt/package/config/.cvsignore b/openwrt/package/config/.cvsignore deleted file mode 100644 index e8bf7a75ba1..00000000000 --- a/openwrt/package/config/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -conf -mconf -lkc_defs.h -lex.zconf.c -zconf.tab.h -zconf.tab.c -lex.backup -zconf.output diff --git a/openwrt/package/config/Config.in b/openwrt/package/config/Config.in deleted file mode 100644 index 7b114d9dd57..00000000000 --- a/openwrt/package/config/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -# - -config BR2_PACKAGE_CONFIG - bool"config" - default n - help - Add help text here. - diff --git a/openwrt/package/config/Kconfig-language.txt b/openwrt/package/config/Kconfig-language.txt deleted file mode 100644 index 493749b32ab..00000000000 --- a/openwrt/package/config/Kconfig-language.txt +++ /dev/null @@ -1,255 +0,0 @@ -Introduction ------------- - -The configuration database is collection of configuration options -organized in a tree structure: - - +- Code maturity level options - | +- Prompt for development and/or incomplete code/drivers - +- General setup - | +- Networking support - | +- System V IPC - | +- BSD Process Accounting - | +- Sysctl support - +- Loadable module support - | +- Enable loadable module support - | +- Set version information on all module symbols - | +- Kernel module loader - +- ... - -Every entry has its own dependencies. These dependencies are used -to determine the visible of an entry. Any child entry is only -visible if its parent entry is also visible. - -Menu entries ------------- - -Most entries define a config option, all other entries help to organize -them. A single configuration option is defined like this: - -config MODVERSIONS - bool "Set version information on all module symbols" - depends MODULES - help - Usually, modules have to be recompiled whenever you switch to a new - kernel. ... - -Every line starts with a key word and can be followed by multiple -arguments. "config" starts a new config entry. The following lines -define attributes for this config option. Attributes can be the type of -the config option, input prompt, dependencies, help text and default -values. A config option can be defined multiple times with the same -name, but every definition can have only a single input prompt and the -type must not conflict. - -Menu attributes ---------------- - -A menu entry can have a number of attributes. Not all of them are -applicable everywhere (see syntax). - -- type definition: "bool"/"tristate"/"string"/"hex"/"integer" - Every config option must have a type. There are only two basic types: - tristate and string, the other types base on these two. The type - definition optionally accepts an input prompt, so these two examples - are equivalent: - - bool "Networking support" - and - bool - prompt "Networking support" - -- input prompt: "prompt" <prompt> ["if" <expr>] - Every menu entry can have at most one prompt, which is used to display - to the user. Optionally dependencies only for this prompt can be added - with "if". - -- default value: "default" <symbol> ["if" <expr>] - A config option can have any number of default values. If multiple - default values are visible, only the first defined one is active. - Default values are not limited to the menu entry, where they are - defined, this means the default can be defined somewhere else or be - overriden by an earlier definition. - The default value is only assigned to the config symbol if no other - value was set by the user (via the input prompt above). If an input - prompt is visible the default value is presented to the user and can - be overridden by him. - Optionally dependencies only for this default value can be added with - "if". - -- dependencies: "depends on"/"requires" <expr> - This defines a dependency for this menu entry. If multiple - dependencies are defined they are connected with '&&'. Dependencies - are applied to all other options within this menu entry (which also - accept "if" expression), so these two examples are equivalent: - - bool "foo" if BAR - default y if BAR - and - depends on BAR - bool "foo" - default y - -- help text: "help" - This defines a help text. The end of the help text is determined by - the level indentation, this means it ends at the first line which has - a smaller indentation than the first line of the help text. - - -Menu dependencies ------------------ - -Dependencies define the visibility of a menu entry and can also reduce -the input range of tristate symbols. The tristate logic used in the -expressions uses one more state than normal boolean logic to express the -module state. Dependency expressions have the following syntax: - -<expr> ::= <symbol> (1) - <symbol> '=' <symbol> (2) - <symbol> '!=' <symbol> (3) - '(' <expr> ')' (4) - '!' <expr> (5) - <expr> '||' <expr> (6) - <expr> '&&' <expr> (7) - -Expressions are listed in decreasing order of precedence. - -(1) Convert the symbol into an expression. Boolean and tristate symbols - are simply converted into the respective expression values. All - other symbol types result in 'n'. -(2) If the values of both symbols are equal, it returns 'y', - otherwise 'n'. -(3) If the values of both symbols are equal, it returns 'n', - otherwise 'y'. -(4) Returns the value of the expression. Used to override precedence. -(5) Returns the result of (2-/expr/). -(6) Returns the result of min(/expr/, /expr/). -(7) Returns the result of max(/expr/, /expr/). - -An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 -respectively for calculations). A menu entry becomes visible when it's -expression evaluates to 'm' or 'y'. - -There are two type of symbols: constant and nonconstant symbols. -Nonconstant symbols are the most common ones and are defined with the -'config' statement. Nonconstant symbols consist entirely of alphanumeric -characters or underscores. -Constant symbols are only part of expressions. Constant symbols are -always surrounded by single or double quotes. Within the quote any -other character is allowed and the quotes can be escaped using '\'. - -Menu structure --------------- - -The position of a menu entry in the tree is determined in two ways. First -it can be specified explicitely: - -menu "Network device support" - depends NET - -config NETDEVICES - ... - -endmenu - -All entries within the "menu" ... "endmenu" block become a submenu of -"Network device support". All subentries inherit the dependencies from -the menu entry, e.g. this means the dependency "NET" is added to the -dependency list of the config option NETDEVICES. - -The other way to generate the menu structure is done by analyzing the -dependencies. If a menu entry somehow depends on the previous entry, it -can be made a submenu of it. First the the previous (parent) symbol must -be part of the dependency list and then one of these two condititions -must be true: -- the child entry must become invisible, if the parent is set to 'n' -- the child entry must only be visible, if the parent is visible - -config MODULES - bool "Enable loadable module support" - -config MODVERSIONS - bool "Set version information on all module symbols" - depends MODULES - -comment "module support disabled" - depends !MODULES - -MODVERSIONS directly depends on MODULES, this means it's only visible if -MODULES is different from 'n'. The comment on the other hand is always -visible when MODULES it's visible (the (empty) dependency of MODULES is -also part of the comment dependencies). - - -Kconfig syntax --------------- - -The configuration file describes a series of menu entries, where every -line starts with a keyword (except help texts). The following keywords -end a menu entry: -- config -- choice/endchoice -- comment -- menu/endmenu -- if/endif -- source -The first four also start the definition of a menu entry. - -config: - - "config" <symbol> - <config options> - -This defines a config symbol <symbol> and accepts any of above -attributes as options. - -choices: - - "choice" - <choice options> - <choice block> - "endchoice" - -This defines a choice group and accepts any of above attributes as -options. A choice can only be of type bool or tristate, while a boolean -choice only allows a single config entry to be selected, a tristate -choice also allows any number of config entries to be set to 'm'. This -can be used if multiple drivers for a single hardware exists and only a -single driver can be compiled/loaded into the kernel, but all drivers -can be compiled as modules. -A choice accepts another option "optional", which allows to set the -choice to 'n' and no entry needs to be selected. - -comment: - - "comment" <prompt> - <comment options> - -This defines a comment which is displayed to the user during the -configuration process and is also echoed to the output files. The only -possible options are dependencies. - -menu: - - "menu" <prompt> - <menu options> - <menu block> - "endmenu" - -This defines a menu block, see "Menu structure" above for more -information. The only possible options are dependencies. - -if: - - "if" <expr> - <if block> - "endif" - -This defines an if block. The dependency expression <expr> is appended -to all enclosed menu entries. - -source: - - "source" <prompt> - -This reads the specified configuration file. This file is always parsed. diff --git a/openwrt/package/config/Makefile b/openwrt/package/config/Makefile deleted file mode 100644 index 9e841d998ec..00000000000 --- a/openwrt/package/config/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -# Makefile for buildroot2 -# -# Copyright (C) 2002-2004 Erik Andersen <andersen@codepoet.org> - -CP=cp -fpR - -# Select the compiler needed to build binaries for your development system -HOSTCC = gcc -HOSTCFLAGS= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc. -LC_ALL:= C - - -all: ncurses conf mconf - -LIBS = -lncurses -ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) - HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" -else -ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) - HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" -else -ifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h)) - HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses.h>" -else -ifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h)) - HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" -else -ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) - HOSTNCURSES += -DCURSES_LOC="<ncurses.h>" -else - HOSTNCURSES += -DCURSES_LOC="<curses.h>" -endif -endif -endif -endif -endif - -CONF_SRC =conf.c -MCONF_SRC =mconf.c checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c -SHARED_SRC=zconf.tab.c -SHARED_DEPS:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h -CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) -MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) -SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC)) - -conf: $(CONF_OBJS) $(SHARED_OBJS) - $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ - -mconf: $(MCONF_OBJS) $(SHARED_OBJS) - $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) - -$(CONF_OBJS): %.o : %.c $(SHARED_DEPS) - $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ - -$(MCONF_OBJS): %.o : %.c $(SHARED_DEPS) - $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@ - -lkc_defs.h: lkc_proto.h - @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' - -### -# The following requires flex/bison -# By default we use the _shipped versions, uncomment the -# following line if you are modifying the flex/bison src. -#LKC_GENPARSER := 1 - -ifdef LKC_GENPARSER - -%.tab.c %.tab.h: %.y - bison -t -d -v -b $* -p $(notdir $*) $< - -lex.%.c: %.l - flex -P$(notdir $*) -o$@ $< -else - -lex.zconf.o: lex.zconf.c $(SHARED_DEPS) - $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ - -lex.zconf.c: lex.zconf.c_shipped - $(CP) lex.zconf.c_shipped lex.zconf.c - -zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) - $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ - -zconf.tab.c: zconf.tab.c_shipped - $(CP) zconf.tab.c_shipped zconf.tab.c - -zconf.tab.h: zconf.tab.h_shipped - $(CP) zconf.tab.h_shipped zconf.tab.h -endif - -.PHONY: ncurses - -ncurses: - @echo "main() {}" > lxtemp.c - @if $(HOSTCC) lxtemp.c $(LIBS) ; then \ - rm -f lxtemp.c a.out; \ - else \ - rm -f lxtemp.c; \ - echo -e "\007" ;\ - echo ">> Unable to find the Ncurses libraries." ;\ - echo ">>" ;\ - echo ">> You must have Ncurses installed in order" ;\ - echo ">> to use 'make menuconfig'" ;\ - echo ;\ - exit 1 ;\ - fi - -clean: - rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \ - conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h - diff --git a/openwrt/package/config/Makefile.in b/openwrt/package/config/Makefile.in deleted file mode 100644 index addf1b98199..00000000000 --- a/openwrt/package/config/Makefile.in +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(strip $(BR2_PACKAGE_CONFIG)),y) -TARGETS+=config -endif diff --git a/openwrt/package/config/checklist.c b/openwrt/package/config/checklist.c deleted file mode 100644 index 4dbd16616d4..00000000000 --- a/openwrt/package/config/checklist.c +++ /dev/null @@ -1,372 +0,0 @@ -/* - * checklist.c -- implements the checklist box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension - * Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -static int list_width, check_x, item_x, checkflag; - -/* - * Print list item - */ -static void -print_item (WINDOW * win, const char *item, int status, - int choice, int selected) -{ - int i; - - /* Clear 'residue' of last item */ - wattrset (win, menubox_attr); - wmove (win, choice, 0); - for (i = 0; i < list_width; i++) - waddch (win, ' '); - - wmove (win, choice, check_x); - wattrset (win, selected ? check_selected_attr : check_attr); - if (checkflag == FLAG_CHECK) - wprintw (win, "[%c]", status ? 'X' : ' '); - else - wprintw (win, "(%c)", status ? 'X' : ' '); - - wattrset (win, selected ? tag_selected_attr : tag_attr); - mvwaddch(win, choice, item_x, item[0]); - wattrset (win, selected ? item_selected_attr : item_attr); - waddstr (win, (char *)item+1); - if (selected) { - wmove (win, choice, check_x+1); - wrefresh (win); - } -} - -/* - * Print the scroll indicators. - */ -static void -print_arrows (WINDOW * win, int choice, int item_no, int scroll, - int y, int x, int height) -{ - wmove(win, y, x); - - if (scroll > 0) { - wattrset (win, uarrow_attr); - waddch (win, ACS_UARROW); - waddstr (win, "(-)"); - } - else { - wattrset (win, menubox_attr); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - } - - y = y + height + 1; - wmove(win, y, x); - - if ((height < item_no) && (scroll + choice < item_no - 1)) { - wattrset (win, darrow_attr); - waddch (win, ACS_DARROW); - waddstr (win, "(+)"); - } - else { - wattrset (win, menubox_border_attr); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - } -} - -/* - * Display the termination buttons - */ -static void -print_buttons( WINDOW *dialog, int height, int width, int selected) -{ - int x = width / 2 - 11; - int y = height - 2; - - print_button (dialog, "Select", y, x, selected == 0); - print_button (dialog, " Help ", y, x + 14, selected == 1); - - wmove(dialog, y, x+1 + 14*selected); - wrefresh (dialog); -} - -/* - * Display a dialog box with a list of options that can be turned on or off - * The `flag' parameter is used to select between radiolist and checklist. - */ -int -dialog_checklist (const char *title, const char *prompt, int height, int width, - int list_height, int item_no, struct dialog_list_item ** items, - int flag) - -{ - int i, x, y, box_x, box_y; - int key = 0, button = 0, choice = 0, scroll = 0, max_choice, *status; - WINDOW *dialog, *list; - - checkflag = flag; - - /* Allocate space for storing item on/off status */ - if ((status = malloc (sizeof (int) * item_no)) == NULL) { - endwin (); - fprintf (stderr, - "\nCan't allocate memory in dialog_checklist().\n"); - exit (-1); - } - - /* Initializes status */ - for (i = 0; i < item_no; i++) { - status[i] = (items[i]->selected == 1); /* ON */ - if ((!choice && status[i]) || items[i]->selected == 2) /* SELECTED */ - choice = i + 1; - } - if (choice) - choice--; - - max_choice = MIN (list_height, item_no); - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow (stdscr, y, x, height, width); - - dialog = newwin (height, width, y, x); - keypad (dialog, TRUE); - - draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); - wattrset (dialog, border_attr); - mvwaddch (dialog, height-3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch (dialog, ACS_HLINE); - wattrset (dialog, dialog_attr); - waddch (dialog, ACS_RTEE); - - if (title != NULL && strlen(title) >= width-2 ) { - /* truncate long title -- mec */ - char * title2 = malloc(width-2+1); - memcpy( title2, title, width-2 ); - title2[width-2] = '\0'; - title = title2; - } - - if (title != NULL) { - wattrset (dialog, title_attr); - mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); - waddstr (dialog, (char *)title); - waddch (dialog, ' '); - } - - wattrset (dialog, dialog_attr); - print_autowrap (dialog, prompt, width - 2, 1, 3); - - list_width = width - 6; - box_y = height - list_height - 5; - box_x = (width - list_width) / 2 - 1; - - /* create new window for the list */ - list = subwin (dialog, list_height, list_width, y+box_y+1, x+box_x+1); - - keypad (list, TRUE); - - /* draw a box around the list items */ - draw_box (dialog, box_y, box_x, list_height + 2, list_width + 2, - menubox_border_attr, menubox_attr); - - /* Find length of longest item in order to center checklist */ - check_x = 0; - for (i = 0; i < item_no; i++) - check_x = MAX (check_x, + strlen (items[i]->name) + 4); - - check_x = (list_width - check_x) / 2; - item_x = check_x + 4; - - if (choice >= list_height) { - scroll = choice - list_height + 1; - choice -= scroll; - } - - /* Print the list */ - for (i = 0; i < max_choice; i++) { - print_item (list, items[scroll + i]->name, - status[i+scroll], i, i == choice); - } - - print_arrows(dialog, choice, item_no, scroll, - box_y, box_x + check_x + 5, list_height); - - print_buttons(dialog, height, width, 0); - - wnoutrefresh (list); - wnoutrefresh (dialog); - doupdate (); - - while (key != ESC) { - key = wgetch (dialog); - - for (i = 0; i < max_choice; i++) - if (toupper(key) == toupper(items[scroll + i]->name[0])) - break; - - - if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || - key == '+' || key == '-' ) { - if (key == KEY_UP || key == '-') { - if (!choice) { - if (!scroll) - continue; - /* Scroll list down */ - if (list_height > 1) { - /* De-highlight current first item */ - print_item (list, items[scroll]->name, - status[scroll], 0, FALSE); - scrollok (list, TRUE); - wscrl (list, -1); - scrollok (list, FALSE); - } - scroll--; - print_item (list, items[scroll]->name, - status[scroll], 0, TRUE); - wnoutrefresh (list); - - print_arrows(dialog, choice, item_no, scroll, - box_y, box_x + check_x + 5, list_height); - - wrefresh (dialog); - - continue; /* wait for another key press */ - } else - i = choice - 1; - } else if (key == KEY_DOWN || key == '+') { - if (choice == max_choice - 1) { - if (scroll + choice >= item_no - 1) - continue; - /* Scroll list up */ - if (list_height > 1) { - /* De-highlight current last item before scrolling up */ - print_item (list, items[scroll + max_choice - 1]->name, - status[scroll + max_choice - 1], - max_choice - 1, FALSE); - scrollok (list, TRUE); - scroll (list); - scrollok (list, FALSE); - } - scroll++; - print_item (list, items[scroll + max_choice - 1]->name, - status[scroll + max_choice - 1], - max_choice - 1, TRUE); - wnoutrefresh (list); - - print_arrows(dialog, choice, item_no, scroll, - box_y, box_x + check_x + 5, list_height); - - wrefresh (dialog); - - continue; /* wait for another key press */ - } else - i = choice + 1; - } - if (i != choice) { - /* De-highlight current item */ - print_item (list, items[scroll + choice]->name, - status[scroll + choice], choice, FALSE); - /* Highlight new item */ - choice = i; - print_item (list, items[scroll + choice]->name, - status[scroll + choice], choice, TRUE); - wnoutrefresh (list); - wrefresh (dialog); - } - continue; /* wait for another key press */ - } - switch (key) { - case 'H': - case 'h': - case '?': - for (i = 0; i < item_no; i++) - items[i]->selected = 0; - items[scroll + choice]->selected = 1; - delwin (dialog); - free (status); - return 1; - case TAB: - case KEY_LEFT: - case KEY_RIGHT: - button = ((key == KEY_LEFT ? --button : ++button) < 0) - ? 1 : (button > 1 ? 0 : button); - - print_buttons(dialog, height, width, button); - wrefresh (dialog); - break; - case 'S': - case 's': - case ' ': - case '\n': - if (!button) { - if (flag == FLAG_CHECK) { - status[scroll + choice] = !status[scroll + choice]; - wmove (list, choice, check_x); - wattrset (list, check_selected_attr); - wprintw (list, "[%c]", status[scroll + choice] ? 'X' : ' '); - } else { - if (!status[scroll + choice]) { - for (i = 0; i < item_no; i++) - status[i] = 0; - status[scroll + choice] = 1; - for (i = 0; i < max_choice; i++) - print_item (list, items[scroll + i]->name, - status[scroll + i], i, i == choice); - } - } - wnoutrefresh (list); - wrefresh (dialog); - - for (i = 0; i < item_no; i++) { - items[i]->selected = status[i]; - } - } else { - for (i = 0; i < item_no; i++) - items[i]->selected = 0; - items[scroll + choice]->selected = 1; - } - delwin (dialog); - free (status); - return button; - case 'X': - case 'x': - key = ESC; - case ESC: - break; - } - - /* Now, update everything... */ - doupdate (); - } - - - delwin (dialog); - free (status); - return -1; /* ESC pressed */ -} diff --git a/openwrt/package/config/colors.h b/openwrt/package/config/colors.h deleted file mode 100644 index d34dd37c6f7..00000000000 --- a/openwrt/package/config/colors.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * colors.h -- color attribute definitions - * - * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * Default color definitions - * - * *_FG = foreground - * *_BG = background - * *_HL = highlight? - */ -#define SCREEN_FG COLOR_CYAN -#define SCREEN_BG COLOR_BLUE -#define SCREEN_HL TRUE - -#define SHADOW_FG COLOR_BLACK -#define SHADOW_BG COLOR_BLACK -#define SHADOW_HL TRUE - -#define DIALOG_FG COLOR_BLACK -#define DIALOG_BG COLOR_WHITE -#define DIALOG_HL FALSE - -#define TITLE_FG COLOR_YELLOW -#define TITLE_BG COLOR_WHITE -#define TITLE_HL TRUE - -#define BORDER_FG COLOR_WHITE -#define BORDER_BG COLOR_WHITE -#define BORDER_HL TRUE - -#define BUTTON_ACTIVE_FG COLOR_WHITE -#define BUTTON_ACTIVE_BG COLOR_BLUE -#define BUTTON_ACTIVE_HL TRUE - -#define BUTTON_INACTIVE_FG COLOR_BLACK -#define BUTTON_INACTIVE_BG COLOR_WHITE -#define BUTTON_INACTIVE_HL FALSE - -#define BUTTON_KEY_ACTIVE_FG COLOR_WHITE -#define BUTTON_KEY_ACTIVE_BG COLOR_BLUE -#define BUTTON_KEY_ACTIVE_HL TRUE - -#define BUTTON_KEY_INACTIVE_FG COLOR_RED -#define BUTTON_KEY_INACTIVE_BG COLOR_WHITE -#define BUTTON_KEY_INACTIVE_HL FALSE - -#define BUTTON_LABEL_ACTIVE_FG COLOR_YELLOW -#define BUTTON_LABEL_ACTIVE_BG COLOR_BLUE -#define BUTTON_LABEL_ACTIVE_HL TRUE - -#define BUTTON_LABEL_INACTIVE_FG COLOR_BLACK -#define BUTTON_LABEL_INACTIVE_BG COLOR_WHITE -#define BUTTON_LABEL_INACTIVE_HL TRUE - -#define INPUTBOX_FG COLOR_BLACK -#define INPUTBOX_BG COLOR_WHITE -#define INPUTBOX_HL FALSE - -#define INPUTBOX_BORDER_FG COLOR_BLACK -#define INPUTBOX_BORDER_BG COLOR_WHITE -#define INPUTBOX_BORDER_HL FALSE - -#define SEARCHBOX_FG COLOR_BLACK -#define SEARCHBOX_BG COLOR_WHITE -#define SEARCHBOX_HL FALSE - -#define SEARCHBOX_TITLE_FG COLOR_YELLOW -#define SEARCHBOX_TITLE_BG COLOR_WHITE -#define SEARCHBOX_TITLE_HL TRUE - -#define SEARCHBOX_BORDER_FG COLOR_WHITE -#define SEARCHBOX_BORDER_BG COLOR_WHITE -#define SEARCHBOX_BORDER_HL TRUE - -#define POSITION_INDICATOR_FG COLOR_YELLOW -#define POSITION_INDICATOR_BG COLOR_WHITE -#define POSITION_INDICATOR_HL TRUE - -#define MENUBOX_FG COLOR_BLACK -#define MENUBOX_BG COLOR_WHITE -#define MENUBOX_HL FALSE - -#define MENUBOX_BORDER_FG COLOR_WHITE -#define MENUBOX_BORDER_BG COLOR_WHITE -#define MENUBOX_BORDER_HL TRUE - -#define ITEM_FG COLOR_BLACK -#define ITEM_BG COLOR_WHITE -#define ITEM_HL FALSE - -#define ITEM_SELECTED_FG COLOR_WHITE -#define ITEM_SELECTED_BG COLOR_BLUE -#define ITEM_SELECTED_HL TRUE - -#define TAG_FG COLOR_YELLOW -#define TAG_BG COLOR_WHITE -#define TAG_HL TRUE - -#define TAG_SELECTED_FG COLOR_YELLOW -#define TAG_SELECTED_BG COLOR_BLUE -#define TAG_SELECTED_HL TRUE - -#define TAG_KEY_FG COLOR_YELLOW -#define TAG_KEY_BG COLOR_WHITE -#define TAG_KEY_HL TRUE - -#define TAG_KEY_SELECTED_FG COLOR_YELLOW -#define TAG_KEY_SELECTED_BG COLOR_BLUE -#define TAG_KEY_SELECTED_HL TRUE - -#define CHECK_FG COLOR_BLACK -#define CHECK_BG COLOR_WHITE -#define CHECK_HL FALSE - -#define CHECK_SELECTED_FG COLOR_WHITE -#define CHECK_SELECTED_BG COLOR_BLUE -#define CHECK_SELECTED_HL TRUE - -#define UARROW_FG COLOR_GREEN -#define UARROW_BG COLOR_WHITE -#define UARROW_HL TRUE - -#define DARROW_FG COLOR_GREEN -#define DARROW_BG COLOR_WHITE -#define DARROW_HL TRUE - -/* End of default color definitions */ - -#define C_ATTR(x,y) ((x ? A_BOLD : 0) | COLOR_PAIR((y))) -#define COLOR_NAME_LEN 10 -#define COLOR_COUNT 8 - -/* - * Global variables - */ - -typedef struct { - char name[COLOR_NAME_LEN]; - int value; -} color_names_st; - -extern color_names_st color_names[]; -extern int color_table[][3]; diff --git a/openwrt/package/config/conf.c b/openwrt/package/config/conf.c deleted file mode 100644 index 46b7e08f7f5..00000000000 --- a/openwrt/package/config/conf.c +++ /dev/null @@ -1,583 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <ctype.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <time.h> -#include <sys/stat.h> - -#define LKC_DIRECT_LINK -#include "lkc.h" - -static void conf(struct menu *menu); -static void check_conf(struct menu *menu); - -enum { - ask_all, - ask_new, - ask_silent, - set_default, - set_yes, - set_mod, - set_no, - set_random -} input_mode = ask_all; -char *defconfig_file; - -static int indent = 1; -static int valid_stdin = 1; -static int conf_cnt; -static char line[128]; -static struct menu *rootEntry; - -static char nohelp_text[] = "Sorry, no help available for this option yet.\n"; - -static void strip(char *str) -{ - char *p = str; - int l; - - while ((isspace(*p))) - p++; - l = strlen(p); - if (p != str) - memmove(str, p, l + 1); - if (!l) - return; - p = str + l - 1; - while ((isspace(*p))) - *p-- = 0; -} - -static void check_stdin(void) -{ - if (!valid_stdin && input_mode == ask_silent) { - printf("aborted!\n\n"); - printf("Console input/output is redirected. "); - printf("Run 'make oldconfig' to update configuration.\n\n"); - exit(1); - } -} - -static void conf_askvalue(struct symbol *sym, const char *def) -{ - enum symbol_type type = sym_get_type(sym); - tristate val; - - if (!sym_has_value(sym)) - printf("(NEW) "); - - line[0] = '\n'; - line[1] = 0; - - if (!sym_is_changable(sym)) { - printf("%s\n", def); - line[0] = '\n'; - line[1] = 0; - return; - } - - switch (input_mode) { - case ask_new: - case ask_silent: - if (sym_has_value(sym)) { - printf("%s\n", def); - return; - } - check_stdin(); - case ask_all: - fflush(stdout); - fgets(line, 128, stdin); - return; - case set_default: - printf("%s\n", def); - return; - default: - break; - } - - switch (type) { - case S_INT: - case S_HEX: - case S_STRING: - printf("%s\n", def); - return; - default: - ; - } - switch (input_mode) { - case set_yes: - if (sym_tristate_within_range(sym, yes)) { - line[0] = 'y'; - line[1] = '\n'; - line[2] = 0; - break; - } - case set_mod: - if (type == S_TRISTATE) { - if (sym_tristate_within_range(sym, mod)) { - line[0] = 'm'; - line[1] = '\n'; - line[2] = 0; - break; - } - } else { - if (sym_tristate_within_range(sym, yes)) { - line[0] = 'y'; - line[1] = '\n'; - line[2] = 0; - break; - } - } - case set_no: - if (sym_tristate_within_range(sym, no)) { - line[0] = 'n'; - line[1] = '\n'; - line[2] = 0; - break; - } - case set_random: - do { - val = (tristate)(random() % 3); - } while (!sym_tristate_within_range(sym, val)); - switch (val) { - case no: line[0] = 'n'; break; - case mod: line[0] = 'm'; break; - case yes: line[0] = 'y'; break; - } - line[1] = '\n'; - line[2] = 0; - break; - default: - break; - } - printf("%s", line); -} - -int conf_string(struct menu *menu) -{ - struct symbol *sym = menu->sym; - const char *def, *help; - - while (1) { - printf("%*s%s ", indent - 1, "", menu->prompt->text); - printf("(%s) ", sym->name); - def = sym_get_string_value(sym); - if (sym_get_string_value(sym)) - printf("[%s] ", def); - conf_askvalue(sym, def); - switch (line[0]) { - case '\n': - break; - case '?': - /* print help */ - if (line[1] == '\n') { - help = nohelp_text; - if (menu->sym->help) - help = menu->sym->help; - printf("\n%s\n", menu->sym->help); - def = NULL; - break; - } - default: - line[strlen(line)-1] = 0; - def = line; - } - if (def && sym_set_string_value(sym, def)) - return 0; - } -} - -static int conf_sym(struct menu *menu) -{ - struct symbol *sym = menu->sym; - int type; - tristate oldval, newval; - const char *help; - - while (1) { - printf("%*s%s ", indent - 1, "", menu->prompt->text); - if (sym->name) - printf("(%s) ", sym->name); - type = sym_get_type(sym); - putchar('['); - oldval = sym_get_tristate_value(sym); - switch (oldval) { - case no: - putchar('N'); - break; - case mod: - putchar('M'); - break; - case yes: - putchar('Y'); - break; - } - if (oldval != no && sym_tristate_within_range(sym, no)) - printf("/n"); - if (oldval != mod && sym_tristate_within_range(sym, mod)) - printf("/m"); - if (oldval != yes && sym_tristate_within_range(sym, yes)) - printf("/y"); - if (sym->help) - printf("/?"); - printf("] "); - conf_askvalue(sym, sym_get_string_value(sym)); - strip(line); - - switch (line[0]) { - case 'n': - case 'N': - newval = no; - if (!line[1] || !strcmp(&line[1], "o")) - break; - continue; - case 'm': - case 'M': - newval = mod; - if (!line[1]) - break; - continue; - case 'y': - case 'Y': - newval = yes; - if (!line[1] || !strcmp(&line[1], "es")) - break; - continue; - case 0: - newval = oldval; - break; - case '?': - goto help; - default: - continue; - } - if (sym_set_tristate_value(sym, newval)) - return 0; -help: - help = nohelp_text; - if (sym->help) - help = sym->help; - printf("\n%s\n", help); - } -} - -static int conf_choice(struct menu *menu) -{ - struct symbol *sym, *def_sym; - struct menu *child; - int type; - bool is_new; - - sym = menu->sym; - type = sym_get_type(sym); - is_new = !sym_has_value(sym); - if (sym_is_changable(sym)) { - conf_sym(menu); - sym_calc_value(sym); - switch (sym_get_tristate_value(sym)) { - case no: - return 1; - case mod: - return 0; - case yes: - break; - } - } else { - switch (sym_get_tristate_value(sym)) { - case no: - return 1; - case mod: - printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); - return 0; - case yes: - break; - } - } - - while (1) { - int cnt, def; - - printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); - def_sym = sym_get_choice_value(sym); - cnt = def = 0; - line[0] = '0'; - line[1] = 0; - for (child = menu->list; child; child = child->next) { - if (!menu_is_visible(child)) - continue; - if (!child->sym) { - printf("%*c %s\n", indent, '*', menu_get_prompt(child)); - continue; - } - cnt++; - if (child->sym == def_sym) { - def = cnt; - printf("%*c", indent, '>'); - } else - printf("%*c", indent, ' '); - printf(" %d. %s", cnt, menu_get_prompt(child)); - if (child->sym->name) - printf(" (%s)", child->sym->name); - if (!sym_has_value(child->sym)) - printf(" (NEW)"); - printf("\n"); - } - printf("%*schoice", indent - 1, ""); - if (cnt == 1) { - printf("[1]: 1\n"); - goto conf_childs; - } - printf("[1-%d", cnt); - if (sym->help) - printf("?"); - printf("]: "); - switch (input_mode) { - case ask_new: - case ask_silent: - if (!is_new) { - cnt = def; - printf("%d\n", cnt); - break; - } - check_stdin(); - case ask_all: - fflush(stdout); - fgets(line, 128, stdin); - strip(line); - if (line[0] == '?') { - printf("\n%s\n", menu->sym->help ? - menu->sym->help : nohelp_text); - continue; - } - if (!line[0]) - cnt = def; - else if (isdigit(line[0])) - cnt = atoi(line); - else - continue; - break; - case set_random: - def = (random() % cnt) + 1; - case set_default: - case set_yes: - case set_mod: - case set_no: - cnt = def; - printf("%d\n", cnt); - break; - } - - conf_childs: - for (child = menu->list; child; child = child->next) { - if (!child->sym || !menu_is_visible(child)) - continue; - if (!--cnt) - break; - } - if (!child) - continue; - if (line[strlen(line) - 1] == '?') { - printf("\n%s\n", child->sym->help ? - child->sym->help : nohelp_text); - continue; - } - sym_set_choice_value(sym, child->sym); - if (child->list) { - indent += 2; - conf(child->list); - indent -= 2; - } - return 1; - } -} - -static void conf(struct menu *menu) -{ - struct symbol *sym; - struct property *prop; - struct menu *child; - - if (!menu_is_visible(menu)) - return; - - sym = menu->sym; - prop = menu->prompt; - if (prop) { - const char *prompt; - - switch (prop->type) { - case P_MENU: - if (input_mode == ask_silent && rootEntry != menu) { - check_conf(menu); - return; - } - case P_COMMENT: - prompt = menu_get_prompt(menu); - if (prompt) - printf("%*c\n%*c %s\n%*c\n", - indent, '*', - indent, '*', prompt, - indent, '*'); - default: - ; - } - } - - if (!sym) - goto conf_childs; - - if (sym_is_choice(sym)) { - conf_choice(menu); - if (sym->curr.tri != mod) - return; - goto conf_childs; - } - - switch (sym->type) { - case S_INT: - case S_HEX: - case S_STRING: - conf_string(menu); - break; - default: - conf_sym(menu); - break; - } - -conf_childs: - if (sym) - indent += 2; - for (child = menu->list; child; child = child->next) - conf(child); - if (sym) - indent -= 2; -} - -static void check_conf(struct menu *menu) -{ - struct symbol *sym; - struct menu *child; - - if (!menu_is_visible(menu)) - return; - - sym = menu->sym; - if (sym) { - if (sym_is_changable(sym) && !sym_has_value(sym)) { - if (!conf_cnt++) - printf("*\n* Restart config...\n*\n"); - rootEntry = menu_get_parent_menu(menu); - conf(rootEntry); - } - if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod) - return; - } - - for (child = menu->list; child; child = child->next) - check_conf(child); -} - -int main(int ac, char **av) -{ - int i = 1; - const char *name; - struct stat tmpstat; - - if (ac > i && av[i][0] == '-') { - switch (av[i++][1]) { - case 'o': - input_mode = ask_new; - break; - case 's': - input_mode = ask_silent; - valid_stdin = isatty(0) && isatty(1) && isatty(2); - break; - case 'd': - input_mode = set_default; - break; - case 'D': - input_mode = set_default; - defconfig_file = av[i++]; - if (!defconfig_file) { - printf("%s: No default config file specified\n", - av[0]); - exit(1); - } - break; - case 'n': - input_mode = set_no; - break; - case 'm': - input_mode = set_mod; - break; - case 'y': - input_mode = set_yes; - break; - case 'r': - input_mode = set_random; - srandom(time(NULL)); - break; - case 'h': - case '?': - printf("%s [-o|-s] config\n", av[0]); - exit(0); - } - } - name = av[i]; - if (!name) { - printf("%s: configuration file missing\n", av[0]); - } - conf_parse(name); - //zconfdump(stdout); - switch (input_mode) { - case set_default: - if (!defconfig_file) - defconfig_file = conf_get_default_confname(); - if (conf_read(defconfig_file)) { - printf("***\n" - "*** Can't find default configuration \"%s\"!\n" - "***\n", defconfig_file); - exit(1); - } - break; - case ask_silent: - if (stat(".config", &tmpstat)) { - printf("***\n" - "*** You have not yet configured Buildroot!\n" - "***\n" - "*** Please run some configurator (e.g. \"make oldconfig\" or\n" - "*** \"make menuconfig\" or \"make config\").\n" - "***\n"); - exit(1); - } - case ask_all: - case ask_new: - conf_read(NULL); - break; - default: - break; - } - - if (input_mode != ask_silent) { - rootEntry = &rootmenu; - conf(&rootmenu); - if (input_mode == ask_all) { - input_mode = ask_silent; - valid_stdin = 1; - } - } - do { - conf_cnt = 0; - check_conf(&rootmenu); - } while (conf_cnt); - if (conf_write(NULL)) { - fprintf(stderr, "\n*** Error during writing of the Buildroot configuration.\n\n"); - return 1; - } - return 0; -} diff --git a/openwrt/package/config/confdata.c b/openwrt/package/config/confdata.c deleted file mode 100644 index e24206ffd2e..00000000000 --- a/openwrt/package/config/confdata.c +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <sys/stat.h> -#include <ctype.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#define LKC_DIRECT_LINK -#include "lkc.h" - -const char conf_def_filename[] = ".config"; - -const char conf_defname[] = "sysdeps/linux/defconfig"; - -const char *conf_confnames[] = { - ".config", - conf_defname, - NULL, -}; - -static char *conf_expand_value(const char *in) -{ - struct symbol *sym; - const char *src; - static char res_value[SYMBOL_MAXLENGTH]; - char *dst, name[SYMBOL_MAXLENGTH]; - - res_value[0] = 0; - dst = name; - while ((src = strchr(in, '$'))) { - strncat(res_value, in, src - in); - src++; - dst = name; - while (isalnum(*src) || *src == '_') - *dst++ = *src++; - *dst = 0; - sym = sym_lookup(name, 0); - sym_calc_value(sym); - strcat(res_value, sym_get_string_value(sym)); - in = src; - } - strcat(res_value, in); - - return res_value; -} - -char *conf_get_default_confname(void) -{ - struct stat buf; - static char fullname[PATH_MAX+1]; - char *env, *name; - - name = conf_expand_value(conf_defname); - env = getenv(SRCTREE); - if (env) { - sprintf(fullname, "%s/%s", env, name); - if (!stat(fullname, &buf)) - return fullname; - } - return name; -} - -int conf_read(const char *name) -{ - FILE *in = NULL; - char line[1024]; - char *p, *p2; - int lineno = 0; - struct symbol *sym; - struct property *prop; - struct expr *e; - int i; - - if (name) { - in = zconf_fopen(name); - } else { - const char **names = conf_confnames; - while ((name = *names++)) { - name = conf_expand_value(name); - in = zconf_fopen(name); - if (in) { - printf("#\n" - "# using defaults found in %s\n" - "#\n", name); - break; - } - } - } - - if (!in) - return 1; - - for_all_symbols(i, sym) { - sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED; - sym->flags &= ~SYMBOL_VALID; - switch (sym->type) { - case S_INT: - case S_HEX: - case S_STRING: - if (sym->user.val) - free(sym->user.val); - default: - sym->user.val = NULL; - sym->user.tri = no; - } - } - - while (fgets(line, sizeof(line), in)) { - lineno++; - sym = NULL; - switch (line[0]) { - case '#': - if (line[1]!=' ') - continue; - p = strchr(line + 2, ' '); - if (!p) - continue; - *p++ = 0; - if (strncmp(p, "is not set", 10)) - continue; - sym = sym_find(line + 2); - if (!sym) { - fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 2); - break; - } - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - sym->user.tri = no; - sym->flags &= ~SYMBOL_NEW; - break; - default: - ; - } - break; - - case 'A' ... 'Z': - p = strchr(line, '='); - if (!p) - continue; - *p++ = 0; - p2 = strchr(p, '\n'); - if (p2) - *p2 = 0; - sym = sym_find(line); - if (!sym) { - fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line); - break; - } - switch (sym->type) { - case S_TRISTATE: - if (p[0] == 'm') { - sym->user.tri = mod; - sym->flags &= ~SYMBOL_NEW; - break; - } - case S_BOOLEAN: - if (p[0] == 'y') { - sym->user.tri = yes; - sym->flags &= ~SYMBOL_NEW; - break; - } - if (p[0] == 'n') { - sym->user.tri = no; - sym->flags &= ~SYMBOL_NEW; - break; - } - break; - case S_STRING: - if (*p++ != '"') - break; - for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { - if (*p2 == '"') { - *p2 = 0; - break; - } - memmove(p2, p2 + 1, strlen(p2)); - } - if (!p2) { - fprintf(stderr, "%s:%d: invalid string found\n", name, lineno); - exit(1); - } - case S_INT: - case S_HEX: - if (sym_string_valid(sym, p)) { - sym->user.val = strdup(p); - sym->flags &= ~SYMBOL_NEW; - } else { - fprintf(stderr, "%s:%d: symbol value '%s' invalid for %s\n", name, lineno, p, sym->name); - exit(1); - } - break; - default: - ; - } - break; - case '\n': - break; - default: - continue; - } - if (sym && sym_is_choice_value(sym)) { - struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); - switch (sym->user.tri) { - case no: - break; - case mod: - if (cs->user.tri == yes) - /* warn? */; - break; - case yes: - if (cs->user.tri != no) - /* warn? */; - cs->user.val = sym; - break; - } - cs->user.tri = E_OR(cs->user.tri, sym->user.tri); - cs->flags &= ~SYMBOL_NEW; - } - } - fclose(in); - - if (modules_sym) - sym_calc_value(modules_sym); - for_all_symbols(i, sym) { - sym_calc_value(sym); - if (sym_has_value(sym) && !sym_is_choice_value(sym)) { - if (sym->visible == no) - sym->flags |= SYMBOL_NEW; - switch (sym->type) { - case S_STRING: - case S_INT: - case S_HEX: - if (!sym_string_within_range(sym, sym->user.val)) - sym->flags |= SYMBOL_NEW; - default: - break; - } - } - if (!sym_is_choice(sym)) - continue; - prop = sym_get_choice_prop(sym); - for (e = prop->expr; e; e = e->left.expr) - if (e->right.sym->visible != no) - sym->flags |= e->right.sym->flags & SYMBOL_NEW; - } - - sym_change_count = 1; - - return 0; -} - -int conf_write(const char *name) -{ - FILE *out, *out_h; - struct symbol *sym; - struct menu *menu; - const char *basename; - char dirname[128], tmpname[128], newname[128]; - int type, l; - const char *str; - - dirname[0] = 0; - if (name && name[0]) { - struct stat st; - char *slash; - - if (!stat(name, &st) && S_ISDIR(st.st_mode)) { - strcpy(dirname, name); - strcat(dirname, "/"); - basename = conf_def_filename; - } else if ((slash = strrchr(name, '/'))) { - int size = slash - name + 1; - memcpy(dirname, name, size); - dirname[size] = 0; - if (slash[1]) - basename = slash + 1; - else - basename = conf_def_filename; - } else - basename = name; - } else - basename = conf_def_filename; - - sprintf(newname, "%s.tmpconfig.%d", dirname, getpid()); - out = fopen(newname, "w"); - if (!out) - return 1; - out_h = NULL; - if (!name) { - out_h = fopen(".tmpconfig.h", "w"); - if (!out_h) - return 1; - } - fprintf(out, "#\n" - "# Automatically generated make config: don't edit\n" - "#\n"); - if (out_h) { - fprintf(out_h, "/*\n" - " * Automatically generated header file: don't edit\n" - " */\n\n" - "#define AUTOCONF_INCLUDED\n\n" - "/* Version Number */\n" - "#define BB_VER \"%s\"\n" - "#define BB_BT \"%s\"\n", - getenv("VERSION"), - getenv("BUILDTIME")); - if (getenv("EXTRA_VERSION")) - fprintf(out_h, "#define BB_EXTRA_VERSION \"%s\"\n", - getenv("EXTRA_VERSION")); - fprintf(out_h, "\n"); - } - - if (!sym_change_count) - sym_clear_all_valid(); - - menu = rootmenu.list; - while (menu) { - sym = menu->sym; - if (!sym) { - if (!menu_is_visible(menu)) - goto next; - str = menu_get_prompt(menu); - fprintf(out, "\n" - "#\n" - "# %s\n" - "#\n", str); - if (out_h) - fprintf(out_h, "\n" - "/*\n" - " * %s\n" - " */\n", str); - } else if (!(sym->flags & SYMBOL_CHOICE)) { - sym_calc_value(sym); - if (!(sym->flags & SYMBOL_WRITE)) - goto next; - sym->flags &= ~SYMBOL_WRITE; - type = sym->type; - if (type == S_TRISTATE) { - sym_calc_value(modules_sym); - if (modules_sym->curr.tri == no) - type = S_BOOLEAN; - } - switch (type) { - case S_BOOLEAN: - case S_TRISTATE: - switch (sym_get_tristate_value(sym)) { - case no: - fprintf(out, "# %s is not set\n", sym->name); - if (out_h) - fprintf(out_h, "#undef %s\n", sym->name); - break; - case mod: - fprintf(out, "%s=m\n", sym->name); -#if 0 - if (out_h) - fprintf(out_h, "#define %s_MODULE 1\n", sym->name); -#endif - break; - case yes: - fprintf(out, "%s=y\n", sym->name); - if (out_h) - fprintf(out_h, "#define %s 1\n", sym->name); - break; - } - break; - case S_STRING: - // fix me - str = sym_get_string_value(sym); - fprintf(out, "%s=\"", sym->name); - if (out_h) - fprintf(out_h, "#define %s \"", sym->name); - do { - l = strcspn(str, "\"\\"); - if (l) { - fwrite(str, l, 1, out); - if (out_h) - fwrite(str, l, 1, out_h); - } - str += l; - while (*str == '\\' || *str == '"') { - fprintf(out, "\\%c", *str); - if (out_h) - fprintf(out_h, "\\%c", *str); - str++; - } - } while (*str); - fputs("\"\n", out); - if (out_h) - fputs("\"\n", out_h); - break; - case S_HEX: - str = sym_get_string_value(sym); - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { - fprintf(out, "%s=%s\n", sym->name, str); - if (out_h) - fprintf(out_h, "#define %s 0x%s\n", sym->name, str); - break; - } - case S_INT: - str = sym_get_string_value(sym); - fprintf(out, "%s=%s\n", sym->name, str); - if (out_h) - fprintf(out_h, "#define %s %s\n", sym->name, str); - break; - } - } - - next: - if (menu->list) { - menu = menu->list; - continue; - } - if (menu->next) - menu = menu->next; - else while ((menu = menu->parent)) { - if (menu->next) { - menu = menu->next; - break; - } - } - } - fclose(out); - if (out_h) { - fclose(out_h); - rename(".tmpconfig.h", "include/config.h"); - file_write_dep(NULL); - } - if (!name || basename != conf_def_filename) { - if (!name) - name = conf_def_filename; - sprintf(tmpname, "%s.old", name); - rename(name, tmpname); - } - sprintf(tmpname, "%s%s", dirname, basename); - if (rename(newname, tmpname)) - return 1; - - sym_change_count = 0; - - return 0; -} diff --git a/openwrt/package/config/dialog.h b/openwrt/package/config/dialog.h deleted file mode 100644 index 6486cc8f779..00000000000 --- a/openwrt/package/config/dialog.h +++ /dev/null @@ -1,196 +0,0 @@ - -/* - * dialog.h -- common declarations for all dialog modules - * - * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <sys/types.h> -#include <fcntl.h> -#include <unistd.h> -#include <ctype.h> -#include <stdlib.h> -#include <string.h> - -#ifdef CURSES_LOC -#include CURSES_LOC - -/* - * Colors in ncurses 1.9.9e do not work properly since foreground and - * background colors are OR'd rather than separately masked. This version - * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible - * with standard curses. The simplest fix (to make this work with standard - * curses) uses the wbkgdset() function, not used in the original hack. - * Turn it off if we're building with 1.9.9e, since it just confuses things. - */ -#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE) -#define OLD_NCURSES 1 -#undef wbkgdset -#define wbkgdset(w,p) /*nothing*/ -#else -#define OLD_NCURSES 0 -#endif - -#define TR(params) _tracef params - -#define ESC 27 -#define TAB 9 -#define MAX_LEN 2048 -#define BUF_SIZE (10*1024) -#define MIN(x,y) (x < y ? x : y) -#define MAX(x,y) (x > y ? x : y) - - -#ifndef ACS_ULCORNER -#define ACS_ULCORNER '+' -#endif -#ifndef ACS_LLCORNER -#define ACS_LLCORNER '+' -#endif -#ifndef ACS_URCORNER -#define ACS_URCORNER '+' -#endif -#ifndef ACS_LRCORNER -#define ACS_LRCORNER '+' -#endif -#ifndef ACS_HLINE -#define ACS_HLINE '-' -#endif -#ifndef ACS_VLINE -#define ACS_VLINE '|' -#endif -#ifndef ACS_LTEE -#define ACS_LTEE '+' -#endif -#ifndef ACS_RTEE -#define ACS_RTEE '+' -#endif -#ifndef ACS_UARROW -#define ACS_UARROW '^' -#endif -#ifndef ACS_DARROW -#define ACS_DARROW 'v' -#endif - -/* - * Attribute names - */ -#define screen_attr attributes[0] -#define shadow_attr attributes[1] -#define dialog_attr attributes[2] -#define title_attr attributes[3] -#define border_attr attributes[4] -#define button_active_attr attributes[5] -#define button_inactive_attr attributes[6] -#define button_key_active_attr attributes[7] -#define button_key_inactive_attr attributes[8] -#define button_label_active_attr attributes[9] -#define button_label_inactive_attr attributes[10] -#define inputbox_attr attributes[11] -#define inputbox_border_attr attributes[12] -#define searchbox_attr attributes[13] -#define searchbox_title_attr attributes[14] -#define searchbox_border_attr attributes[15] -#define position_indicator_attr attributes[16] -#define menubox_attr attributes[17] -#define menubox_border_attr attributes[18] -#define item_attr attributes[19] -#define item_selected_attr attributes[20] -#define tag_attr attributes[21] -#define tag_selected_attr attributes[22] -#define tag_key_attr attributes[23] -#define tag_key_selected_attr attributes[24] -#define check_attr attributes[25] -#define check_selected_attr attributes[26] -#define uarrow_attr attributes[27] -#define darrow_attr attributes[28] - -/* number of attributes */ -#define ATTRIBUTE_COUNT 29 - -/* - * Global variables - */ -extern bool use_colors; - -extern chtype attributes[]; -#endif - -extern char *backtitle; - -struct dialog_list_item { - char *name; - int namelen; - char *tag; - int selected; /* Set to 1 by dialog_*() function. */ -}; - -/* - * Function prototypes - */ - -void init_dialog (void); -void end_dialog (void); -void dialog_clear (void); -#ifdef CURSES_LOC -void attr_clear (WINDOW * win, int height, int width, chtype attr); -void color_setup (void); -void print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x); -void print_button (WINDOW * win, const char *label, int y, int x, int selected); -void draw_box (WINDOW * win, int y, int x, int height, int width, chtype box, - chtype border); -void draw_shadow (WINDOW * win, int y, int x, int height, int width); -#endif - -int first_alpha (const char *string, const char *exempt); -int dialog_yesno (const char *title, const char *prompt, int height, int width); -int dialog_msgbox (const char *title, const char *prompt, int height, - int width, int pause); -int dialog_textbox (const char *title, const char *file, int height, int width); -int dialog_menu (const char *title, const char *prompt, int height, int width, - int menu_height, const char *choice, int item_no, - struct dialog_list_item ** items); -int dialog_checklist (const char *title, const char *prompt, int height, - int width, int list_height, int item_no, - struct dialog_list_item ** items, int flag); -extern unsigned char dialog_input_result[]; -int dialog_inputbox (const char *title, const char *prompt, int height, - int width, const char *init); - -struct dialog_list_item *first_sel_item(int item_no, - struct dialog_list_item ** items); - -/* - * This is the base for fictitious keys, which activate - * the buttons. - * - * Mouse-generated keys are the following: - * -- the first 32 are used as numbers, in addition to '0'-'9' - * -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o') - * -- uppercase chars are used to invoke the button (M_EVENT + 'O') - */ -#ifdef CURSES_LOC -#define M_EVENT (KEY_MAX+1) -#endif - - -/* - * The `flag' parameter in checklist is used to select between - * radiolist and checklist - */ -#define FLAG_CHECK 1 -#define FLAG_RADIO 0 diff --git a/openwrt/package/config/expr.c b/openwrt/package/config/expr.c deleted file mode 100644 index 10f45232b4c..00000000000 --- a/openwrt/package/config/expr.c +++ /dev/null @@ -1,1089 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define DEBUG_EXPR 0 - -struct expr *expr_alloc_symbol(struct symbol *sym) -{ - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); - e->type = E_SYMBOL; - e->left.sym = sym; - return e; -} - -struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) -{ - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); - e->type = type; - e->left.expr = ce; - return e; -} - -struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) -{ - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); - e->type = type; - e->left.expr = e1; - e->right.expr = e2; - return e; -} - -struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) -{ - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); - e->type = type; - e->left.sym = s1; - e->right.sym = s2; - return e; -} - -struct expr *expr_alloc_and(struct expr *e1, struct expr *e2) -{ - if (!e1) - return e2; - return e2 ? expr_alloc_two(E_AND, e1, e2) : e1; -} - -struct expr *expr_alloc_or(struct expr *e1, struct expr *e2) -{ - if (!e1) - return e2; - return e2 ? expr_alloc_two(E_OR, e1, e2) : e1; -} - -struct expr *expr_copy(struct expr *org) -{ - struct expr *e; - - if (!org) - return NULL; - - e = malloc(sizeof(*org)); - memcpy(e, org, sizeof(*org)); - switch (org->type) { - case E_SYMBOL: - e->left = org->left; - break; - case E_NOT: - e->left.expr = expr_copy(org->left.expr); - break; - case E_EQUAL: - case E_UNEQUAL: - e->left.sym = org->left.sym; - e->right.sym = org->right.sym; - break; - case E_AND: - case E_OR: - case E_CHOICE: - e->left.expr = expr_copy(org->left.expr); - e->right.expr = expr_copy(org->right.expr); - break; - default: - printf("can't copy type %d\n", e->type); - free(e); - e = NULL; - break; - } - - return e; -} - -void expr_free(struct expr *e) -{ - if (!e) - return; - - switch (e->type) { - case E_SYMBOL: - break; - case E_NOT: - expr_free(e->left.expr); - return; - case E_EQUAL: - case E_UNEQUAL: - break; - case E_OR: - case E_AND: - expr_free(e->left.expr); - expr_free(e->right.expr); - break; - default: - printf("how to free type %d?\n", e->type); - break; - } - free(e); -} - -static int trans_count; - -#define e1 (*ep1) -#define e2 (*ep2) - -static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2) -{ - if (e1->type == type) { - __expr_eliminate_eq(type, &e1->left.expr, &e2); - __expr_eliminate_eq(type, &e1->right.expr, &e2); - return; - } - if (e2->type == type) { - __expr_eliminate_eq(type, &e1, &e2->left.expr); - __expr_eliminate_eq(type, &e1, &e2->right.expr); - return; - } - if (e1->type == E_SYMBOL && e2->type == E_SYMBOL && - e1->left.sym == e2->left.sym && (e1->left.sym->flags & (SYMBOL_YES|SYMBOL_NO))) - return; - if (!expr_eq(e1, e2)) - return; - trans_count++; - expr_free(e1); expr_free(e2); - switch (type) { - case E_OR: - e1 = expr_alloc_symbol(&symbol_no); - e2 = expr_alloc_symbol(&symbol_no); - break; - case E_AND: - e1 = expr_alloc_symbol(&symbol_yes); - e2 = expr_alloc_symbol(&symbol_yes); - break; - default: - ; - } -} - -void expr_eliminate_eq(struct expr **ep1, struct expr **ep2) -{ - if (!e1 || !e2) - return; - switch (e1->type) { - case E_OR: - case E_AND: - __expr_eliminate_eq(e1->type, ep1, ep2); - default: - ; - } - if (e1->type != e2->type) switch (e2->type) { - case E_OR: - case E_AND: - __expr_eliminate_eq(e2->type, ep1, ep2); - default: - ; - } - e1 = expr_eliminate_yn(e1); - e2 = expr_eliminate_yn(e2); -} - -#undef e1 -#undef e2 - -int expr_eq(struct expr *e1, struct expr *e2) -{ - int res, old_count; - - if (e1->type != e2->type) - return 0; - switch (e1->type) { - case E_EQUAL: - case E_UNEQUAL: - return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; - case E_SYMBOL: - return e1->left.sym == e2->left.sym; - case E_NOT: - return expr_eq(e1->left.expr, e2->left.expr); - case E_AND: - case E_OR: - e1 = expr_copy(e1); - e2 = expr_copy(e2); - old_count = trans_count; - expr_eliminate_eq(&e1, &e2); - res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL && - e1->left.sym == e2->left.sym); - expr_free(e1); - expr_free(e2); - trans_count = old_count; - return res; - case E_CHOICE: - case E_RANGE: - case E_NONE: - /* panic */; - } - - if (DEBUG_EXPR) { - expr_fprint(e1, stdout); - printf(" = "); - expr_fprint(e2, stdout); - printf(" ?\n"); - } - - return 0; -} - -struct expr *expr_eliminate_yn(struct expr *e) -{ - struct expr *tmp; - - if (e) switch (e->type) { - case E_AND: - e->left.expr = expr_eliminate_yn(e->left.expr); - e->right.expr = expr_eliminate_yn(e->right.expr); - if (e->left.expr->type == E_SYMBOL) { - if (e->left.expr->left.sym == &symbol_no) { - expr_free(e->left.expr); - expr_free(e->right.expr); - e->type = E_SYMBOL; - e->left.sym = &symbol_no; - e->right.expr = NULL; - return e; - } else if (e->left.expr->left.sym == &symbol_yes) { - free(e->left.expr); - tmp = e->right.expr; - *e = *(e->right.expr); - free(tmp); - return e; - } - } - if (e->right.expr->type == E_SYMBOL) { - if (e->right.expr->left.sym == &symbol_no) { - expr_free(e->left.expr); - expr_free(e->right.expr); - e->type = E_SYMBOL; - e->left.sym = &symbol_no; - e->right.expr = NULL; - return e; - } else if (e->right.expr->left.sym == &symbol_yes) { - free(e->right.expr); - tmp = e->left.expr; - *e = *(e->left.expr); - free(tmp); - return e; - } - } - break; - case E_OR: - e->left.expr = expr_eliminate_yn(e->left.expr); - e->right.expr = expr_eliminate_yn(e->right.expr); - if (e->left.expr->type == E_SYMBOL) { - if (e->left.expr->left.sym == &symbol_no) { - free(e->left.expr); - tmp = e->right.expr; - *e = *(e->right.expr); - free(tmp); - return e; - } else if (e->left.expr->left.sym == &symbol_yes) { - expr_free(e->left.expr); - expr_free(e->right.expr); - e->type = E_SYMBOL; - e->left.sym = &symbol_yes; - e->right.expr = NULL; - return e; - } - } - if (e->right.expr->type == E_SYMBOL) { - if (e->right.expr->left.sym == &symbol_no) { - free(e->right.expr); - tmp = e->left.expr; - *e = *(e->left.expr); - free(tmp); - return e; - } else if (e->right.expr->left.sym == &symbol_yes) { - expr_free(e->left.expr); - expr_free(e->right.expr); - e->type = E_SYMBOL; - e->left.sym = &symbol_yes; - e->right.expr = NULL; - return e; - } - } - break; - default: - ; - } - return e; -} - -/* - * bool FOO!=n => FOO - */ -struct expr *expr_trans_bool(struct expr *e) -{ - if (!e) - return NULL; - switch (e->type) { - case E_AND: - case E_OR: - case E_NOT: - e->left.expr = expr_trans_bool(e->left.expr); - e->right.expr = expr_trans_bool(e->right.expr); - break; - case E_UNEQUAL: - // FOO!=n -> FOO - if (e->left.sym->type == S_TRISTATE) { - if (e->right.sym == &symbol_no) { - e->type = E_SYMBOL; - e->right.sym = NULL; - } - } - break; - default: - ; - } - return e; -} - -/* - * e1 || e2 -> ? - */ -struct expr *expr_join_or(struct expr *e1, struct expr *e2) -{ - struct expr *tmp; - struct symbol *sym1, *sym2; - - if (expr_eq(e1, e2)) - return expr_copy(e1); - if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) - return NULL; - if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) - return NULL; - if (e1->type == E_NOT) { - tmp = e1->left.expr; - if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) - return NULL; - sym1 = tmp->left.sym; - } else - sym1 = e1->left.sym; - if (e2->type == E_NOT) { - if (e2->left.expr->type != E_SYMBOL) - return NULL; - sym2 = e2->left.expr->left.sym; - } else - sym2 = e2->left.sym; - if (sym1 != sym2) - return NULL; - if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) - return NULL; - if (sym1->type == S_TRISTATE) { - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || - (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { - // (a='y') || (a='m') -> (a!='n') - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no); - } - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) { - // (a='y') || (a='n') -> (a!='m') - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod); - } - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) { - // (a='m') || (a='n') -> (a!='y') - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); - } - } - if (sym1->type == S_BOOLEAN && sym1 == sym2) { - if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) || - (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL)) - return expr_alloc_symbol(&symbol_yes); - } - - if (DEBUG_EXPR) { - printf("optimize ("); - expr_fprint(e1, stdout); - printf(") || ("); - expr_fprint(e2, stdout); - printf(")?\n"); - } - return NULL; -} - -struct expr *expr_join_and(struct expr *e1, struct expr *e2) -{ - struct expr *tmp; - struct symbol *sym1, *sym2; - - if (expr_eq(e1, e2)) - return expr_copy(e1); - if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) - return NULL; - if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) - return NULL; - if (e1->type == E_NOT) { - tmp = e1->left.expr; - if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) - return NULL; - sym1 = tmp->left.sym; - } else - sym1 = e1->left.sym; - if (e2->type == E_NOT) { - if (e2->left.expr->type != E_SYMBOL) - return NULL; - sym2 = e2->left.expr->left.sym; - } else - sym2 = e2->left.sym; - if (sym1 != sym2) - return NULL; - if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) - return NULL; - - if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || - (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) - // (a) && (a='y') -> (a='y') - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) || - (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no)) - // (a) && (a!='n') -> (a) - return expr_alloc_symbol(sym1); - - if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) || - (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod)) - // (a) && (a!='m') -> (a='y') - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if (sym1->type == S_TRISTATE) { - if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) { - // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' - sym2 = e1->right.sym; - if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) - return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) - : expr_alloc_symbol(&symbol_no); - } - if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) { - // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' - sym2 = e2->right.sym; - if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) - return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) - : expr_alloc_symbol(&symbol_no); - } - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) - // (a!='y') && (a!='n') -> (a='m') - return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod); - - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || - (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) - // (a!='y') && (a!='m') -> (a='n') - return expr_alloc_comp(E_EQUAL, sym1, &symbol_no); - - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) - // (a!='m') && (a!='n') -> (a='m') - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || - (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) || - (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) || - (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes)) - return NULL; - } - - if (DEBUG_EXPR) { - printf("optimize ("); - expr_fprint(e1, stdout); - printf(") && ("); - expr_fprint(e2, stdout); - printf(")?\n"); - } - return NULL; -} - -static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2) -{ -#define e1 (*ep1) -#define e2 (*ep2) - struct expr *tmp; - - if (e1->type == type) { - expr_eliminate_dups1(type, &e1->left.expr, &e2); - expr_eliminate_dups1(type, &e1->right.expr, &e2); - return; - } - if (e2->type == type) { - expr_eliminate_dups1(type, &e1, &e2->left.expr); - expr_eliminate_dups1(type, &e1, &e2->right.expr); - return; - } - if (e1 == e2) - return; - - switch (e1->type) { - case E_OR: case E_AND: - expr_eliminate_dups1(e1->type, &e1, &e1); - default: - ; - } - - switch (type) { - case E_OR: - tmp = expr_join_or(e1, e2); - if (tmp) { - expr_free(e1); expr_free(e2); - e1 = expr_alloc_symbol(&symbol_no); - e2 = tmp; - trans_count++; - } - break; - case E_AND: - tmp = expr_join_and(e1, e2); - if (tmp) { - expr_free(e1); expr_free(e2); - e1 = expr_alloc_symbol(&symbol_yes); - e2 = tmp; - trans_count++; - } - break; - default: - ; - } -#undef e1 -#undef e2 -} - -static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2) -{ -#define e1 (*ep1) -#define e2 (*ep2) - struct expr *tmp, *tmp1, *tmp2; - - if (e1->type == type) { - expr_eliminate_dups2(type, &e1->left.expr, &e2); - expr_eliminate_dups2(type, &e1->right.expr, &e2); - return; - } - if (e2->type == type) { - expr_eliminate_dups2(type, &e1, &e2->left.expr); - expr_eliminate_dups2(type, &e1, &e2->right.expr); - } - if (e1 == e2) - return; - - switch (e1->type) { - case E_OR: - expr_eliminate_dups2(e1->type, &e1, &e1); - // (FOO || BAR) && (!FOO && !BAR) -> n - tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); - tmp2 = expr_copy(e2); - tmp = expr_extract_eq_and(&tmp1, &tmp2); - if (expr_is_yes(tmp1)) { - expr_free(e1); - e1 = expr_alloc_symbol(&symbol_no); - trans_count++; - } - expr_free(tmp2); - expr_free(tmp1); - expr_free(tmp); - break; - case E_AND: - expr_eliminate_dups2(e1->type, &e1, &e1); - // (FOO && BAR) || (!FOO || !BAR) -> y - tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); - tmp2 = expr_copy(e2); - tmp = expr_extract_eq_or(&tmp1, &tmp2); - if (expr_is_no(tmp1)) { - expr_free(e1); - e1 = expr_alloc_symbol(&symbol_yes); - trans_count++; - } - expr_free(tmp2); - expr_free(tmp1); - expr_free(tmp); - break; - default: - ; - } -#undef e1 -#undef e2 -} - -struct expr *expr_eliminate_dups(struct expr *e) -{ - int oldcount; - if (!e) - return e; - - oldcount = trans_count; - while (1) { - trans_count = 0; - switch (e->type) { - case E_OR: case E_AND: - expr_eliminate_dups1(e->type, &e, &e); - expr_eliminate_dups2(e->type, &e, &e); - default: - ; - } - if (!trans_count) - break; - e = expr_eliminate_yn(e); - } - trans_count = oldcount; - return e; -} - -struct expr *expr_transform(struct expr *e) -{ - struct expr *tmp; - - if (!e) - return NULL; - switch (e->type) { - case E_EQUAL: - case E_UNEQUAL: - case E_SYMBOL: - case E_CHOICE: - break; - default: - e->left.expr = expr_transform(e->left.expr); - e->right.expr = expr_transform(e->right.expr); - } - - switch (e->type) { - case E_EQUAL: - if (e->left.sym->type != S_BOOLEAN) - break; - if (e->right.sym == &symbol_no) { - e->type = E_NOT; - e->left.expr = expr_alloc_symbol(e->left.sym); - e->right.sym = NULL; - break; - } - if (e->right.sym == &symbol_mod) { - printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name); - e->type = E_SYMBOL; - e->left.sym = &symbol_no; - e->right.sym = NULL; - break; - } - if (e->right.sym == &symbol_yes) { - e->type = E_SYMBOL; - e->right.sym = NULL; - break; - } - break; - case E_UNEQUAL: - if (e->left.sym->type != S_BOOLEAN) - break; - if (e->right.sym == &symbol_no) { - e->type = E_SYMBOL; - e->right.sym = NULL; - break; - } - if (e->right.sym == &symbol_mod) { - printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name); - e->type = E_SYMBOL; - e->left.sym = &symbol_yes; - e->right.sym = NULL; - break; - } - if (e->right.sym == &symbol_yes) { - e->type = E_NOT; - e->left.expr = expr_alloc_symbol(e->left.sym); - e->right.sym = NULL; - break; - } - break; - case E_NOT: - switch (e->left.expr->type) { - case E_NOT: - // !!a -> a - tmp = e->left.expr->left.expr; - free(e->left.expr); - free(e); - e = tmp; - e = expr_transform(e); - break; - case E_EQUAL: - case E_UNEQUAL: - // !a='x' -> a!='x' - tmp = e->left.expr; - free(e); - e = tmp; - e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; - break; - case E_OR: - // !(a || b) -> !a && !b - tmp = e->left.expr; - e->type = E_AND; - e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); - tmp->type = E_NOT; - tmp->right.expr = NULL; - e = expr_transform(e); - break; - case E_AND: - // !(a && b) -> !a || !b - tmp = e->left.expr; - e->type = E_OR; - e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); - tmp->type = E_NOT; - tmp->right.expr = NULL; - e = expr_transform(e); - break; - case E_SYMBOL: - if (e->left.expr->left.sym == &symbol_yes) { - // !'y' -> 'n' - tmp = e->left.expr; - free(e); - e = tmp; - e->type = E_SYMBOL; - e->left.sym = &symbol_no; - break; - } - if (e->left.expr->left.sym == &symbol_mod) { - // !'m' -> 'm' - tmp = e->left.expr; - free(e); - e = tmp; - e->type = E_SYMBOL; - e->left.sym = &symbol_mod; - break; - } - if (e->left.expr->left.sym == &symbol_no) { - // !'n' -> 'y' - tmp = e->left.expr; - free(e); - e = tmp; - e->type = E_SYMBOL; - e->left.sym = &symbol_yes; - break; - } - break; - default: - ; - } - break; - default: - ; - } - return e; -} - -int expr_contains_symbol(struct expr *dep, struct symbol *sym) -{ - if (!dep) - return 0; - - switch (dep->type) { - case E_AND: - case E_OR: - return expr_contains_symbol(dep->left.expr, sym) || - expr_contains_symbol(dep->right.expr, sym); - case E_SYMBOL: - return dep->left.sym == sym; - case E_EQUAL: - case E_UNEQUAL: - return dep->left.sym == sym || - dep->right.sym == sym; - case E_NOT: - return expr_contains_symbol(dep->left.expr, sym); - default: - ; - } - return 0; -} - -bool expr_depends_symbol(struct expr *dep, struct symbol *sym) -{ - if (!dep) - return false; - - switch (dep->type) { - case E_AND: - return expr_depends_symbol(dep->left.expr, sym) || - expr_depends_symbol(dep->right.expr, sym); - case E_SYMBOL: - return dep->left.sym == sym; - case E_EQUAL: - if (dep->left.sym == sym) { - if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod) - return true; - } - break; - case E_UNEQUAL: - if (dep->left.sym == sym) { - if (dep->right.sym == &symbol_no) - return true; - } - break; - default: - ; - } - return false; -} - -struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) -{ - struct expr *tmp = NULL; - expr_extract_eq(E_AND, &tmp, ep1, ep2); - if (tmp) { - *ep1 = expr_eliminate_yn(*ep1); - *ep2 = expr_eliminate_yn(*ep2); - } - return tmp; -} - -struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2) -{ - struct expr *tmp = NULL; - expr_extract_eq(E_OR, &tmp, ep1, ep2); - if (tmp) { - *ep1 = expr_eliminate_yn(*ep1); - *ep2 = expr_eliminate_yn(*ep2); - } - return tmp; -} - -void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2) -{ -#define e1 (*ep1) -#define e2 (*ep2) - if (e1->type == type) { - expr_extract_eq(type, ep, &e1->left.expr, &e2); - expr_extract_eq(type, ep, &e1->right.expr, &e2); - return; - } - if (e2->type == type) { - expr_extract_eq(type, ep, ep1, &e2->left.expr); - expr_extract_eq(type, ep, ep1, &e2->right.expr); - return; - } - if (expr_eq(e1, e2)) { - *ep = *ep ? expr_alloc_two(type, *ep, e1) : e1; - expr_free(e2); - if (type == E_AND) { - e1 = expr_alloc_symbol(&symbol_yes); - e2 = expr_alloc_symbol(&symbol_yes); - } else if (type == E_OR) { - e1 = expr_alloc_symbol(&symbol_no); - e2 = expr_alloc_symbol(&symbol_no); - } - } -#undef e1 -#undef e2 -} - -struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym) -{ - struct expr *e1, *e2; - - if (!e) { - e = expr_alloc_symbol(sym); - if (type == E_UNEQUAL) - e = expr_alloc_one(E_NOT, e); - return e; - } - switch (e->type) { - case E_AND: - e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); - e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); - if (sym == &symbol_yes) - e = expr_alloc_two(E_AND, e1, e2); - if (sym == &symbol_no) - e = expr_alloc_two(E_OR, e1, e2); - if (type == E_UNEQUAL) - e = expr_alloc_one(E_NOT, e); - return e; - case E_OR: - e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); - e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); - if (sym == &symbol_yes) - e = expr_alloc_two(E_OR, e1, e2); - if (sym == &symbol_no) - e = expr_alloc_two(E_AND, e1, e2); - if (type == E_UNEQUAL) - e = expr_alloc_one(E_NOT, e); - return e; - case E_NOT: - return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym); - case E_UNEQUAL: - case E_EQUAL: - if (type == E_EQUAL) { - if (sym == &symbol_yes) - return expr_copy(e); - if (sym == &symbol_mod) - return expr_alloc_symbol(&symbol_no); - if (sym == &symbol_no) - return expr_alloc_one(E_NOT, expr_copy(e)); - } else { - if (sym == &symbol_yes) - return expr_alloc_one(E_NOT, expr_copy(e)); - if (sym == &symbol_mod) - return expr_alloc_symbol(&symbol_yes); - if (sym == &symbol_no) - return expr_copy(e); - } - break; - case E_SYMBOL: - return expr_alloc_comp(type, e->left.sym, sym); - case E_CHOICE: - case E_RANGE: - case E_NONE: - /* panic */; - } - return NULL; -} - -tristate expr_calc_value(struct expr *e) -{ - tristate val1, val2; - const char *str1, *str2; - - if (!e) - return yes; - - switch (e->type) { - case E_SYMBOL: - sym_calc_value(e->left.sym); - return e->left.sym->curr.tri; - case E_AND: - val1 = expr_calc_value(e->left.expr); - val2 = expr_calc_value(e->right.expr); - return E_AND(val1, val2); - case E_OR: - val1 = expr_calc_value(e->left.expr); - val2 = expr_calc_value(e->right.expr); - return E_OR(val1, val2); - case E_NOT: - val1 = expr_calc_value(e->left.expr); - return E_NOT(val1); - case E_EQUAL: - sym_calc_value(e->left.sym); - sym_calc_value(e->right.sym); - str1 = sym_get_string_value(e->left.sym); - str2 = sym_get_string_value(e->right.sym); - return !strcmp(str1, str2) ? yes : no; - case E_UNEQUAL: - sym_calc_value(e->left.sym); - sym_calc_value(e->right.sym); - str1 = sym_get_string_value(e->left.sym); - str2 = sym_get_string_value(e->right.sym); - return !strcmp(str1, str2) ? no : yes; - default: - printf("expr_calc_value: %d?\n", e->type); - return no; - } -} - -int expr_compare_type(enum expr_type t1, enum expr_type t2) -{ -#if 0 - return 1; -#else - if (t1 == t2) - return 0; - switch (t1) { - case E_EQUAL: - case E_UNEQUAL: - if (t2 == E_NOT) - return 1; - case E_NOT: - if (t2 == E_AND) - return 1; - case E_AND: - if (t2 == E_OR) - return 1; - case E_OR: - if (t2 == E_CHOICE) - return 1; - case E_CHOICE: - if (t2 == 0) - return 1; - default: - return -1; - } - printf("[%dgt%d?]", t1, t2); - return 0; -#endif -} - -void expr_print(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken) -{ - if (!e) { - fn(data, "y"); - return; - } - - if (expr_compare_type(prevtoken, e->type) > 0) - fn(data, "("); - switch (e->type) { - case E_SYMBOL: - if (e->left.sym->name) - fn(data, e->left.sym->name); - else - fn(data, "<choice>"); - break; - case E_NOT: - fn(data, "!"); - expr_print(e->left.expr, fn, data, E_NOT); - break; - case E_EQUAL: - fn(data, e->left.sym->name); - fn(data, "="); - fn(data, e->right.sym->name); - break; - case E_UNEQUAL: - fn(data, e->left.sym->name); - fn(data, "!="); - fn(data, e->right.sym->name); - break; - case E_OR: - expr_print(e->left.expr, fn, data, E_OR); - fn(data, " || "); - expr_print(e->right.expr, fn, data, E_OR); - break; - case E_AND: - expr_print(e->left.expr, fn, data, E_AND); - fn(data, " && "); - expr_print(e->right.expr, fn, data, E_AND); - break; - case E_CHOICE: - fn(data, e->right.sym->name); - if (e->left.expr) { - fn(data, " ^ "); - expr_print(e->left.expr, fn, data, E_CHOICE); - } - break; - case E_RANGE: - fn(data, "["); - fn(data, e->left.sym->name); - fn(data, " "); - fn(data, e->right.sym->name); - fn(data, "]"); - break; - default: - { - char buf[32]; - sprintf(buf, "<unknown type %d>", e->type); - fn(data, buf); - break; - } - } - if (expr_compare_type(prevtoken, e->type) > 0) - fn(data, ")"); -} - -static void expr_print_file_helper(void *data, const char *str) -{ - fwrite(str, strlen(str), 1, data); -} - -void expr_fprint(struct expr *e, FILE *out) -{ - expr_print(e, expr_print_file_helper, out, E_NONE); -} diff --git a/openwrt/package/config/expr.h b/openwrt/package/config/expr.h deleted file mode 100644 index cac51f6a86e..00000000000 --- a/openwrt/package/config/expr.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#ifndef EXPR_H -#define EXPR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdio.h> -#ifndef __cplusplus -#include <stdbool.h> -#endif - -struct file { - struct file *next; - struct file *parent; - char *name; - int lineno; - int flags; -}; - -#define FILE_BUSY 0x0001 -#define FILE_SCANNED 0x0002 -#define FILE_PRINTED 0x0004 - -typedef enum tristate { - no, mod, yes -} tristate; - -enum expr_type { - E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL, E_RANGE -}; - -union expr_data { - struct expr *expr; - struct symbol *sym; -}; - -struct expr { - enum expr_type type; - union expr_data left, right; -}; - -#define E_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2)) -#define E_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2)) -#define E_NOT(dep) (2-(dep)) - -struct expr_value { - struct expr *expr; - tristate tri; -}; - -struct symbol_value { - void *val; - tristate tri; -}; - -enum symbol_type { - S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER -}; - -struct symbol { - struct symbol *next; - char *name; - char *help; - enum symbol_type type; - struct symbol_value curr, user; - tristate visible; - int flags; - struct property *prop; - struct expr *dep, *dep2; - struct expr_value rev_dep; -}; - -#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) - -#define SYMBOL_YES 0x0001 -#define SYMBOL_MOD 0x0002 -#define SYMBOL_NO 0x0004 -#define SYMBOL_CONST 0x0007 -#define SYMBOL_CHECK 0x0008 -#define SYMBOL_CHOICE 0x0010 -#define SYMBOL_CHOICEVAL 0x0020 -#define SYMBOL_PRINTED 0x0040 -#define SYMBOL_VALID 0x0080 -#define SYMBOL_OPTIONAL 0x0100 -#define SYMBOL_WRITE 0x0200 -#define SYMBOL_CHANGED 0x0400 -#define SYMBOL_NEW 0x0800 -#define SYMBOL_AUTO 0x1000 -#define SYMBOL_CHECKED 0x2000 -#define SYMBOL_CHECK_DONE 0x4000 -#define SYMBOL_WARNED 0x8000 - -#define SYMBOL_MAXLENGTH 256 -#define SYMBOL_HASHSIZE 257 -#define SYMBOL_HASHMASK 0xff - -enum prop_type { - P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_RANGE -}; - -struct property { - struct property *next; - struct symbol *sym; - enum prop_type type; - const char *text; - struct expr_value visible; - struct expr *expr; - struct menu *menu; - struct file *file; - int lineno; -}; - -#define for_all_properties(sym, st, tok) \ - for (st = sym->prop; st; st = st->next) \ - if (st->type == (tok)) -#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT) -#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE) -#define for_all_prompts(sym, st) \ - for (st = sym->prop; st; st = st->next) \ - if (st->text) - -struct menu { - struct menu *next; - struct menu *parent; - struct menu *list; - struct symbol *sym; - struct property *prompt; - struct expr *dep; - unsigned int flags; - //char *help; - struct file *file; - int lineno; - void *data; -}; - -#define MENU_CHANGED 0x0001 -#define MENU_ROOT 0x0002 - -#ifndef SWIG - -extern struct file *file_list; -extern struct file *current_file; -struct file *lookup_file(const char *name); - -extern struct symbol symbol_yes, symbol_no, symbol_mod; -extern struct symbol *modules_sym; -extern int cdebug; -struct expr *expr_alloc_symbol(struct symbol *sym); -struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); -struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2); -struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2); -struct expr *expr_alloc_and(struct expr *e1, struct expr *e2); -struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); -struct expr *expr_copy(struct expr *org); -void expr_free(struct expr *e); -int expr_eq(struct expr *e1, struct expr *e2); -void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); -tristate expr_calc_value(struct expr *e); -struct expr *expr_eliminate_yn(struct expr *e); -struct expr *expr_trans_bool(struct expr *e); -struct expr *expr_eliminate_dups(struct expr *e); -struct expr *expr_transform(struct expr *e); -int expr_contains_symbol(struct expr *dep, struct symbol *sym); -bool expr_depends_symbol(struct expr *dep, struct symbol *sym); -struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2); -struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2); -void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2); -struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym); - -void expr_fprint(struct expr *e, FILE *out); - -static inline int expr_is_yes(struct expr *e) -{ - return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes); -} - -static inline int expr_is_no(struct expr *e) -{ - return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); -} -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* EXPR_H */ diff --git a/openwrt/package/config/inputbox.c b/openwrt/package/config/inputbox.c deleted file mode 100644 index fa7bebc693b..00000000000 --- a/openwrt/package/config/inputbox.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * inputbox.c -- implements the input box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -unsigned char dialog_input_result[MAX_LEN + 1]; - -/* - * Print the termination buttons - */ -static void -print_buttons(WINDOW *dialog, int height, int width, int selected) -{ - int x = width / 2 - 11; - int y = height - 2; - - print_button (dialog, " Ok ", y, x, selected==0); - print_button (dialog, " Help ", y, x + 14, selected==1); - - wmove(dialog, y, x+1+14*selected); - wrefresh(dialog); -} - -/* - * Display a dialog box for inputing a string - */ -int -dialog_inputbox (const char *title, const char *prompt, int height, int width, - const char *init) -{ - int i, x, y, box_y, box_x, box_width; - int input_x = 0, scroll = 0, key = 0, button = -1; - unsigned char *instr = dialog_input_result; - WINDOW *dialog; - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - - draw_shadow (stdscr, y, x, height, width); - - dialog = newwin (height, width, y, x); - keypad (dialog, TRUE); - - draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); - wattrset (dialog, border_attr); - mvwaddch (dialog, height-3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch (dialog, ACS_HLINE); - wattrset (dialog, dialog_attr); - waddch (dialog, ACS_RTEE); - - if (title != NULL && strlen(title) >= width-2 ) { - /* truncate long title -- mec */ - char * title2 = malloc(width-2+1); - memcpy( title2, title, width-2 ); - title2[width-2] = '\0'; - title = title2; - } - - if (title != NULL) { - wattrset (dialog, title_attr); - mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); - waddstr (dialog, (char *)title); - waddch (dialog, ' '); - } - - wattrset (dialog, dialog_attr); - print_autowrap (dialog, prompt, width - 2, 1, 3); - - /* Draw the input field box */ - box_width = width - 6; - getyx (dialog, y, x); - box_y = y + 2; - box_x = (width - box_width) / 2; - draw_box (dialog, y + 1, box_x - 1, 3, box_width + 2, - border_attr, dialog_attr); - - print_buttons(dialog, height, width, 0); - - /* Set up the initial value */ - wmove (dialog, box_y, box_x); - wattrset (dialog, inputbox_attr); - - if (!init) - instr[0] = '\0'; - else - strcpy (instr, init); - - input_x = strlen (instr); - - if (input_x >= box_width) { - scroll = input_x - box_width + 1; - input_x = box_width - 1; - for (i = 0; i < box_width - 1; i++) - waddch (dialog, instr[scroll + i]); - } else - waddstr (dialog, instr); - - wmove (dialog, box_y, box_x + input_x); - - wrefresh (dialog); - - while (key != ESC) { - key = wgetch (dialog); - - if (button == -1) { /* Input box selected */ - switch (key) { - case TAB: - case KEY_UP: - case KEY_DOWN: - break; - case KEY_LEFT: - continue; - case KEY_RIGHT: - continue; - case KEY_BACKSPACE: - case 127: - if (input_x || scroll) { - wattrset (dialog, inputbox_attr); - if (!input_x) { - scroll = scroll < box_width - 1 ? - 0 : scroll - (box_width - 1); - wmove (dialog, box_y, box_x); - for (i = 0; i < box_width; i++) - waddch (dialog, instr[scroll + input_x + i] ? - instr[scroll + input_x + i] : ' '); - input_x = strlen (instr) - scroll; - } else - input_x--; - instr[scroll + input_x] = '\0'; - mvwaddch (dialog, box_y, input_x + box_x, ' '); - wmove (dialog, box_y, input_x + box_x); - wrefresh (dialog); - } - continue; - default: - if (key < 0x100 && isprint (key)) { - if (scroll + input_x < MAX_LEN) { - wattrset (dialog, inputbox_attr); - instr[scroll + input_x] = key; - instr[scroll + input_x + 1] = '\0'; - if (input_x == box_width - 1) { - scroll++; - wmove (dialog, box_y, box_x); - for (i = 0; i < box_width - 1; i++) - waddch (dialog, instr[scroll + i]); - } else { - wmove (dialog, box_y, input_x++ + box_x); - waddch (dialog, key); - } - wrefresh (dialog); - } else - flash (); /* Alarm user about overflow */ - continue; - } - } - } - switch (key) { - case 'O': - case 'o': - delwin (dialog); - return 0; - case 'H': - case 'h': - delwin (dialog); - return 1; - case KEY_UP: - case KEY_LEFT: - switch (button) { - case -1: - button = 1; /* Indicates "Cancel" button is selected */ - print_buttons(dialog, height, width, 1); - break; - case 0: - button = -1; /* Indicates input box is selected */ - print_buttons(dialog, height, width, 0); - wmove (dialog, box_y, box_x + input_x); - wrefresh (dialog); - break; - case 1: - button = 0; /* Indicates "OK" button is selected */ - print_buttons(dialog, height, width, 0); - break; - } - break; - case TAB: - case KEY_DOWN: - case KEY_RIGHT: - switch (button) { - case -1: - button = 0; /* Indicates "OK" button is selected */ - print_buttons(dialog, height, width, 0); - break; - case 0: - button = 1; /* Indicates "Cancel" button is selected */ - print_buttons(dialog, height, width, 1); - break; - case 1: - button = -1; /* Indicates input box is selected */ - print_buttons(dialog, height, width, 0); - wmove (dialog, box_y, box_x + input_x); - wrefresh (dialog); - break; - } - break; - case ' ': - case '\n': - delwin (dialog); - return (button == -1 ? 0 : button); - case 'X': - case 'x': - key = ESC; - case ESC: - break; - } - } - - delwin (dialog); - return -1; /* ESC pressed */ -} diff --git a/openwrt/package/config/lex.zconf.c_shipped b/openwrt/package/config/lex.zconf.c_shipped deleted file mode 100644 index 83026dfaa43..00000000000 --- a/openwrt/package/config/lex.zconf.c_shipped +++ /dev/null @@ -1,3709 +0,0 @@ - -#line 3 "lex.zconf.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 31 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <stdlib.h> -#include <glob.h> - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ - -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -#include <inttypes.h> -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE zconfrestart(zconfin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -extern int zconfleng; - -extern FILE *zconfin, *zconfout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up zconftext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up zconftext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef unsigned int yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via zconfrestart()), so that the user can continue scanning by - * just pointing zconfin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when zconftext is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int zconfleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow zconfwrap()'s to do buffer switches - * instead of setting up a fresh zconfin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void zconfrestart (FILE *input_file ); -void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size ); -void zconf_delete_buffer (YY_BUFFER_STATE b ); -void zconf_flush_buffer (YY_BUFFER_STATE b ); -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ); -void zconfpop_buffer_state (void ); - -static void zconfensure_buffer_stack (void ); -static void zconf_load_buffer_state (void ); -static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len ); - -void *zconfalloc (yy_size_t ); -void *zconfrealloc (void *,yy_size_t ); -void zconffree (void * ); - -#define yy_new_buffer zconf_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - zconfensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - zconfensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define zconfwrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0; - -typedef int yy_state_type; - -extern int zconflineno; - -int zconflineno = 1; - -extern char *zconftext; -#define yytext_ptr zconftext -static yyconst flex_int16_t yy_nxt[][38] = - { - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 - }, - - { - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12 - }, - - { - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12 - }, - - { - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 18, 16, 16, 18, 18, 19, 20, - 21, 22, 18, 18, 23, 24, 18, 25, 18, 26, - 27, 18, 28, 29, 30, 18, 18, 16 - }, - - { - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 18, 16, 16, 18, 18, 19, 20, - 21, 22, 18, 18, 23, 24, 18, 25, 18, 26, - 27, 18, 28, 29, 30, 18, 18, 16 - - }, - - { - 11, 31, 32, 33, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31 - }, - - { - 11, 31, 32, 33, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31 - }, - - { - 11, 34, 34, 35, 34, 36, 34, 34, 36, 34, - 34, 34, 34, 34, 34, 37, 34, 34, 34, 34, - - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34 - }, - - { - 11, 34, 34, 35, 34, 36, 34, 34, 36, 34, - 34, 34, 34, 34, 34, 37, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34 - }, - - { - 11, 38, 38, 39, 40, 41, 42, 43, 41, 44, - 45, 46, 47, 47, 48, 49, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 50, 47, 47, 47, 51, - 47, 47, 47, 47, 47, 47, 47, 52 - - }, - - { - 11, 38, 38, 39, 40, 41, 42, 43, 41, 44, - 45, 46, 47, 47, 48, 49, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 50, 47, 47, 47, 51, - 47, 47, 47, 47, 47, 47, 47, 52 - }, - - { - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11 - }, - - { - 11, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12 - }, - - { - 11, -13, 53, 54, -13, -13, 55, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13 - }, - - { - 11, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14 - - }, - - { - 11, 56, 56, 57, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56 - }, - - { - 11, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16 - }, - - { - 11, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17 - }, - - { - 11, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, 58, -18, -18, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -18 - }, - - { - 11, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, 58, -19, -19, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, - 58, 58, 58, 58, 58, 58, 58, -19 - - }, - - { - 11, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, 58, -20, -20, 58, 58, 58, 58, - 58, 58, 58, 58, 60, 58, 58, 58, 58, 61, - 58, 58, 58, 58, 58, 58, 58, -20 - }, - - { - 11, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, 58, -21, -21, 58, 58, 58, 58, - 58, 62, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -21 - }, - - { - 11, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, 58, -22, -22, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 63, 58, - 58, 58, 58, 58, 58, 58, 58, -22 - }, - - { - 11, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, 58, -23, -23, 58, 58, 58, 58, - 58, 64, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -23 - }, - - { - 11, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, 58, -24, -24, 58, 58, 58, 58, - 58, 58, 65, 58, 58, 58, 58, 58, 66, 58, - 58, 58, 58, 58, 58, 58, 58, -24 - - }, - - { - 11, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, 58, -25, -25, 58, 67, 58, 58, - 58, 68, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -25 - }, - - { - 11, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, 58, -26, -26, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 69, 58, 58, 58, 58, 58, 58, -26 - }, - - { - 11, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, 58, -27, -27, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 70, 58, 58, 58, 58, -27 - }, - - { - 11, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, 58, -28, -28, 58, 71, 58, 58, - 58, 72, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -28 - }, - - { - 11, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, 58, -29, -29, 58, 58, 58, 58, - 58, 73, 58, 58, 58, 58, 58, 58, 58, 74, - 58, 58, 58, 58, 75, 58, 58, -29 - - }, - - { - 11, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, 58, -30, -30, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 76, 58, 58, 58, 58, -30 - }, - - { - 11, 77, 77, -31, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77 - }, - - { - 11, -32, 78, 79, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32 - }, - - { - 11, 80, -33, -33, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80 - }, - - { - 11, 81, 81, 82, 81, -34, 81, 81, -34, 81, - 81, 81, 81, 81, 81, -34, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81 - - }, - - { - 11, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35 - }, - - { - 11, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36 - }, - - { - 11, 83, 83, 84, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83 - }, - - { - 11, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38 - }, - - { - 11, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39 - - }, - - { - 11, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, 85, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40 - }, - - { - 11, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41 - }, - - { - 11, 86, 86, -42, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86 - }, - - { - 11, -43, -43, -43, -43, -43, -43, 87, -43, -43, - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43, -43 - }, - - { - 11, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44 - - }, - - { - 11, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45 - }, - - { - 11, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, 88, 89, 89, -46, -46, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, -46 - }, - - { - 11, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, 89, 89, 89, -47, -47, 89, 89, 89, 89, - - 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, -47 - }, - - { - 11, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48 - }, - - { - 11, -49, -49, 90, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49 - - }, - - { - 11, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, 89, 89, 89, -50, -50, 89, 89, 89, 89, - 89, 89, 91, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, -50 - }, - - { - 11, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, 89, 89, 89, -51, -51, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 92, 89, - 89, 89, 89, 89, 89, 89, 89, -51 - }, - - { - 11, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, 93 - }, - - { - 11, -53, 53, 54, -53, -53, 55, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53 - }, - - { - 11, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54 - - }, - - { - 11, 56, 56, 57, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56 - }, - - { - 11, 56, 56, 57, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56 - }, - - { - 11, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57 - }, - - { - 11, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, 58, -58, -58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -58 - }, - - { - 11, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, 58, -59, -59, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 94, - 58, 58, 58, 58, 58, 58, 58, -59 - - }, - - { - 11, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, 58, -60, -60, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 95, - 58, 58, 58, 58, 58, 58, 58, -60 - }, - - { - 11, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, 58, -61, -61, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 96, 97, 58, - 58, 58, 58, 58, 58, 58, 58, -61 - }, - - { - 11, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, 58, -62, -62, 58, 58, 58, 58, - - 58, 58, 98, 58, 58, 58, 58, 58, 58, 58, - 99, 58, 58, 58, 58, 58, 58, -62 - }, - - { - 11, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, 58, -63, -63, 58, 100, 58, 58, - 101, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -63 - }, - - { - 11, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, 58, -64, -64, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 102, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 103, -64 - - }, - - { - 11, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, 58, -65, -65, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -65 - }, - - { - 11, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, 58, -66, -66, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 104, 58, 58, -66 - }, - - { - 11, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, 58, -67, -67, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 105, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -67 - }, - - { - 11, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, 58, -68, -68, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 106, 58, - 58, 58, 58, 58, 58, 58, 58, -68 - }, - - { - 11, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, 58, -69, -69, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 107, 58, 58, -69 - - }, - - { - 11, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, 58, -70, -70, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 108, - 58, 58, 58, 58, 58, 58, 58, -70 - }, - - { - 11, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, 58, -71, -71, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 109, 58, - 58, 58, 58, 58, 58, 58, 58, -71 - }, - - { - 11, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, 58, -72, -72, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 110, 58, 58, 58, 58, 58, -72 - }, - - { - 11, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, 58, -73, -73, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 111, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -73 - }, - - { - 11, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, 58, -74, -74, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 112, 58, -74 - - }, - - { - 11, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, 58, -75, -75, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 113, 58, 58, 58, 58, -75 - }, - - { - 11, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, 58, -76, -76, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 114, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -76 - }, - - { - 11, 77, 77, -77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77 - }, - - { - 11, -78, 78, 79, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78 - }, - - { - 11, 80, -79, -79, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80 - - }, - - { - 11, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80 - }, - - { - 11, 81, 81, 82, 81, -81, 81, 81, -81, 81, - 81, 81, 81, 81, 81, -81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81 - }, - - { - 11, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82 - }, - - { - 11, -83, -83, 84, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83 - }, - - { - 11, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84 - - }, - - { - 11, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85 - }, - - { - 11, 86, 86, -86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86 - }, - - { - 11, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87 - }, - - { - 11, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, 115, 89, 89, -88, -88, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, -88 - }, - - { - 11, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, 89, 89, 89, -89, -89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, -89 - - }, - - { - 11, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90 - }, - - { - 11, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, 89, 89, 89, -91, -91, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, -91 - }, - - { - 11, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, 89, 89, 89, -92, -92, 89, 89, 89, 89, - - 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, -92 - }, - - { - 11, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93 - }, - - { - 11, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, 58, -94, -94, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 116, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -94 - - }, - - { - 11, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, 58, -95, -95, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 117, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -95 - }, - - { - 11, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, 58, -96, -96, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 118, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -96 - }, - - { - 11, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, 58, -97, -97, 58, 58, 58, 58, - - 58, 58, 119, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -97 - }, - - { - 11, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, 58, -98, -98, 120, 121, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -98 - }, - - { - 11, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, 58, -99, -99, 58, 58, 58, 58, - 58, 122, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -99 - - }, - - { - 11, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, 58, -100, -100, 58, 58, 123, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -100 - }, - - { - 11, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, 58, -101, -101, 58, 58, 58, 124, - 58, 58, 58, 58, 58, 125, 58, 126, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -101 - }, - - { - 11, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, 58, -102, -102, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 127, 58, 58, 58, 58, 58, 58, -102 - }, - - { - 11, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, 58, -103, -103, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -103 - }, - - { - 11, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, 58, -104, -104, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -104 - - }, - - { - 11, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, 58, -105, -105, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 128, 58, - 58, 58, 58, 58, 58, 58, 58, -105 - }, - - { - 11, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, 58, -106, -106, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 129, 58, -106 - }, - - { - 11, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, 58, -107, -107, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 130, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -107 - }, - - { - 11, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, 58, -108, -108, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 131, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -108 - }, - - { - 11, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, 58, -109, -109, 58, 58, 58, 58, - 58, 58, 58, 132, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -109 - - }, - - { - 11, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, 58, -110, -110, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 133, 58, -110 - }, - - { - 11, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, 58, -111, -111, 58, 58, 58, 58, - 58, 134, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -111 - }, - - { - 11, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, 58, -112, -112, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 135, 58, 58, 58, 58, -112 - }, - - { - 11, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, 58, -113, -113, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 136, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -113 - }, - - { - 11, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, 58, -114, -114, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 137, 58, 58, 58, -114 - - }, - - { - 11, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, 89, 89, 89, -115, -115, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, -115 - }, - - { - 11, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, 58, -116, -116, 58, 58, 58, 58, - 58, 138, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -116 - }, - - { - 11, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, 58, -117, -117, 58, 58, 58, 139, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -117 - }, - - { - 11, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, 58, -118, -118, 58, 58, 58, 58, - 58, 140, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -118 - }, - - { - 11, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, 58, -119, -119, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 141, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -119 - - }, - - { - 11, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, 58, -120, -120, 58, 58, 142, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 143, 58, 58, -120 - }, - - { - 11, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, 58, -121, -121, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 144, 58, -121 - }, - - { - 11, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, 58, -122, -122, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 145, 58, - 58, 58, 58, 58, 58, 58, 58, -122 - }, - - { - 11, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, 58, -123, -123, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 146, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -123 - }, - - { - 11, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, 58, -124, -124, 58, 58, 58, 58, - 58, 58, 58, 58, 147, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -124 - - }, - - { - 11, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, 58, -125, -125, 58, 58, 58, 58, - 58, 58, 148, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -125 - }, - - { - 11, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, 58, -126, -126, 58, 58, 58, 58, - 58, 149, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -126 - }, - - { - 11, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, 58, -127, -127, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -127 - }, - - { - 11, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, 58, -128, -128, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 150, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -128 - }, - - { - 11, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, 58, -129, -129, 58, 58, 58, 151, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -129 - - }, - - { - 11, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, 58, -130, -130, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 152, - 58, 58, 58, 58, 58, 58, 58, -130 - }, - - { - 11, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, 58, -131, -131, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 153, 58, 58, 58, 58, 58, 58, -131 - }, - - { - 11, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, 58, -132, -132, 58, 58, 58, 58, - - 58, 154, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -132 - }, - - { - 11, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, 58, -133, -133, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 155, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -133 - }, - - { - 11, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, 58, -134, -134, 58, 58, 58, 156, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -134 - - }, - - { - 11, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, 58, -135, -135, 58, 58, 58, 157, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -135 - }, - - { - 11, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, 58, -136, -136, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 158, 58, - 58, 58, 58, 58, 58, 58, 58, -136 - }, - - { - 11, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, 58, -137, -137, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 159, 58, 58, -137 - }, - - { - 11, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, 58, -138, -138, 58, 160, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -138 - }, - - { - 11, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, 58, -139, -139, 58, 58, 58, 58, - 58, 161, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -139 - - }, - - { - 11, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, 58, -140, -140, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 162, 58, - 58, 58, 58, 58, 58, 58, 58, -140 - }, - - { - 11, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, 58, -141, -141, 58, 58, 58, 58, - 58, 58, 58, 163, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -141 - }, - - { - 11, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, 58, -142, -142, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 164, - 58, 58, 58, 58, 58, 58, 58, -142 - }, - - { - 11, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, 58, -143, -143, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 165, 58, 58, 58, 58, -143 - }, - - { - 11, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, 58, -144, -144, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 166, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -144 - - }, - - { - 11, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, 58, -145, -145, 58, 58, 58, 58, - 167, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -145 - }, - - { - 11, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, 58, -146, -146, 58, 58, 58, 58, - 58, 168, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -146 - }, - - { - 11, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, 58, -147, -147, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 169, - 58, 58, 58, 58, 58, 58, 58, -147 - }, - - { - 11, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, 58, -148, -148, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -148 - }, - - { - 11, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, 58, -149, -149, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 170, 58, - 58, 58, 58, 58, 58, 58, 58, -149 - - }, - - { - 11, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, 58, -150, -150, 58, 58, 58, 58, - 58, 171, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -150 - }, - - { - 11, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, 58, -151, -151, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 172, - 58, 58, 58, 58, 58, 58, 58, -151 - }, - - { - 11, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, 58, -152, -152, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 173, 58, - 58, 58, 58, 58, 58, 58, 58, -152 - }, - - { - 11, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, 58, -153, -153, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 174, 58, 58, -153 - }, - - { - 11, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, 58, -154, -154, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -154 - - }, - - { - 11, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, 58, -155, -155, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 175, 58, 58, 58, 58, -155 - }, - - { - 11, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, 58, -156, -156, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 176, 58, 58, -156 - }, - - { - 11, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, 58, -157, -157, 58, 58, 58, 58, - - 58, 177, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -157 - }, - - { - 11, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, 58, -158, -158, 58, 58, 58, 58, - 58, 58, 58, 178, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -158 - }, - - { - 11, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, 58, -159, -159, 58, 179, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -159 - - }, - - { - 11, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, 58, -160, -160, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 180, 58, - 58, 58, 58, 58, 58, 58, 58, -160 - }, - - { - 11, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, 58, -161, -161, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -161 - }, - - { - 11, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, 58, -162, -162, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 181, 58, 58, -162 - }, - - { - 11, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, 58, -163, -163, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -163 - }, - - { - 11, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, 58, -164, -164, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 182, - 58, 58, 58, 58, 58, 58, 58, -164 - - }, - - { - 11, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, 58, -165, -165, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 183, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -165 - }, - - { - 11, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, 58, -166, -166, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 184, 58, 58, -166 - }, - - { - 11, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, 58, -167, -167, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 185, 58, 58, 58, -167 - }, - - { - 11, -168, -168, -168, -168, -168, -168, -168, -168, -168, - -168, -168, -168, 58, -168, -168, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -168 - }, - - { - 11, -169, -169, -169, -169, -169, -169, -169, -169, -169, - -169, -169, -169, 58, -169, -169, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 186, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -169 - - }, - - { - 11, -170, -170, -170, -170, -170, -170, -170, -170, -170, - -170, -170, -170, 58, -170, -170, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 187, 58, -170 - }, - - { - 11, -171, -171, -171, -171, -171, -171, -171, -171, -171, - -171, -171, -171, 58, -171, -171, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 188, 58, - 58, 58, 58, 58, 58, 58, 58, -171 - }, - - { - 11, -172, -172, -172, -172, -172, -172, -172, -172, -172, - -172, -172, -172, 58, -172, -172, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 189, 58, - 58, 58, 58, 58, 58, 58, 58, -172 - }, - - { - 11, -173, -173, -173, -173, -173, -173, -173, -173, -173, - -173, -173, -173, 58, -173, -173, 58, 190, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -173 - }, - - { - 11, -174, -174, -174, -174, -174, -174, -174, -174, -174, - -174, -174, -174, 58, -174, -174, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -174 - - }, - - { - 11, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, 58, -175, -175, 58, 58, 58, 58, - 58, 191, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -175 - }, - - { - 11, -176, -176, -176, -176, -176, -176, -176, -176, -176, - -176, -176, -176, 58, -176, -176, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -176 - }, - - { - 11, -177, -177, -177, -177, -177, -177, -177, -177, -177, - -177, -177, -177, 58, -177, -177, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -177 - }, - - { - 11, -178, -178, -178, -178, -178, -178, -178, -178, -178, - -178, -178, -178, 58, -178, -178, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -178 - }, - - { - 11, -179, -179, -179, -179, -179, -179, -179, -179, -179, - -179, -179, -179, 58, -179, -179, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 192, 58, 58, -179 - - }, - - { - 11, -180, -180, -180, -180, -180, -180, -180, -180, -180, - -180, -180, -180, 58, -180, -180, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -180 - }, - - { - 11, -181, -181, -181, -181, -181, -181, -181, -181, -181, - -181, -181, -181, 58, -181, -181, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -181 - }, - - { - 11, -182, -182, -182, -182, -182, -182, -182, -182, -182, - -182, -182, -182, 58, -182, -182, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 193, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -182 - }, - - { - 11, -183, -183, -183, -183, -183, -183, -183, -183, -183, - -183, -183, -183, 58, -183, -183, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 194, 58, 58, 58, -183 - }, - - { - 11, -184, -184, -184, -184, -184, -184, -184, -184, -184, - -184, -184, -184, 58, -184, -184, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -184 - - }, - - { - 11, -185, -185, -185, -185, -185, -185, -185, -185, -185, - -185, -185, -185, 58, -185, -185, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -185 - }, - - { - 11, -186, -186, -186, -186, -186, -186, -186, -186, -186, - -186, -186, -186, 58, -186, -186, 58, 58, 58, 195, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -186 - }, - - { - 11, -187, -187, -187, -187, -187, -187, -187, -187, -187, - -187, -187, -187, 58, -187, -187, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -187 - }, - - { - 11, -188, -188, -188, -188, -188, -188, -188, -188, -188, - -188, -188, -188, 58, -188, -188, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 196, 58, -188 - }, - - { - 11, -189, -189, -189, -189, -189, -189, -189, -189, -189, - -189, -189, -189, 58, -189, -189, 58, 58, 58, 58, - 58, 58, 197, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -189 - - }, - - { - 11, -190, -190, -190, -190, -190, -190, -190, -190, -190, - -190, -190, -190, 58, -190, -190, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 198, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -190 - }, - - { - 11, -191, -191, -191, -191, -191, -191, -191, -191, -191, - -191, -191, -191, 58, -191, -191, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 199, 58, 58, 58, -191 - }, - - { - 11, -192, -192, -192, -192, -192, -192, -192, -192, -192, - -192, -192, -192, 58, -192, -192, 58, 58, 58, 58, - - 58, 200, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -192 - }, - - { - 11, -193, -193, -193, -193, -193, -193, -193, -193, -193, - -193, -193, -193, 58, -193, -193, 58, 58, 58, 58, - 58, 201, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -193 - }, - - { - 11, -194, -194, -194, -194, -194, -194, -194, -194, -194, - -194, -194, -194, 58, -194, -194, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 202, 58, 58, -194 - - }, - - { - 11, -195, -195, -195, -195, -195, -195, -195, -195, -195, - -195, -195, -195, 58, -195, -195, 58, 58, 58, 58, - 58, 203, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -195 - }, - - { - 11, -196, -196, -196, -196, -196, -196, -196, -196, -196, - -196, -196, -196, 58, -196, -196, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -196 - }, - - { - 11, -197, -197, -197, -197, -197, -197, -197, -197, -197, - -197, -197, -197, 58, -197, -197, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 204, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -197 - }, - - { - 11, -198, -198, -198, -198, -198, -198, -198, -198, -198, - -198, -198, -198, 58, -198, -198, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -198 - }, - - { - 11, -199, -199, -199, -199, -199, -199, -199, -199, -199, - -199, -199, -199, 58, -199, -199, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -199 - - }, - - { - 11, -200, -200, -200, -200, -200, -200, -200, -200, -200, - -200, -200, -200, 58, -200, -200, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -200 - }, - - { - 11, -201, -201, -201, -201, -201, -201, -201, -201, -201, - -201, -201, -201, 58, -201, -201, 58, 205, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -201 - }, - - { - 11, -202, -202, -202, -202, -202, -202, -202, -202, -202, - -202, -202, -202, 58, -202, -202, 58, 206, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -202 - }, - - { - 11, -203, -203, -203, -203, -203, -203, -203, -203, -203, - -203, -203, -203, 58, -203, -203, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -203 - }, - - { - 11, -204, -204, -204, -204, -204, -204, -204, -204, -204, - -204, -204, -204, 58, -204, -204, 58, 58, 58, 58, - 58, 58, 58, 207, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -204 - - }, - - { - 11, -205, -205, -205, -205, -205, -205, -205, -205, -205, - -205, -205, -205, 58, -205, -205, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 208, 58, - 58, 58, 58, 58, 58, 58, 58, -205 - }, - - { - 11, -206, -206, -206, -206, -206, -206, -206, -206, -206, - -206, -206, -206, 58, -206, -206, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 209, 58, 58, -206 - }, - - { - 11, -207, -207, -207, -207, -207, -207, -207, -207, -207, - -207, -207, -207, 58, -207, -207, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -207 - }, - - { - 11, -208, -208, -208, -208, -208, -208, -208, -208, -208, - -208, -208, -208, 58, -208, -208, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -208 - }, - - { - 11, -209, -209, -209, -209, -209, -209, -209, -209, -209, - -209, -209, -209, 58, -209, -209, 58, 58, 58, 58, - 58, 210, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -209 - - }, - - { - 11, -210, -210, -210, -210, -210, -210, -210, -210, -210, - -210, -210, -210, 58, -210, -210, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -210 - }, - - } ; - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up zconftext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - zconfleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 64 -#define YY_END_OF_BUFFER 65 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[211] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 65, 5, 4, 3, 2, 36, 37, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 63, 60, 62, 55, 59, 58, 57, 53, 48, 42, - 47, 51, 53, 40, 41, 50, 50, 43, 53, 50, - 50, 53, 4, 3, 2, 2, 1, 35, 35, 35, - 35, 35, 35, 35, 16, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 63, 60, 62, 61, - 55, 54, 57, 56, 44, 51, 38, 50, 50, 52, - 45, 46, 39, 35, 35, 35, 35, 35, 35, 35, - - 35, 35, 30, 29, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 49, 25, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 15, 35, 7, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 17, 35, 35, - 35, 35, 35, 34, 35, 35, 35, 35, 35, 35, - 10, 35, 13, 35, 35, 35, 35, 33, 35, 35, - 35, 35, 35, 22, 35, 32, 9, 31, 35, 26, - 12, 35, 35, 21, 18, 35, 8, 35, 35, 35, - 35, 35, 27, 35, 35, 6, 35, 20, 19, 23, - - 35, 35, 11, 35, 35, 35, 14, 28, 35, 24 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 6, 1, 1, 7, 8, 9, - 10, 1, 1, 1, 11, 12, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, - 14, 1, 1, 1, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 1, 15, 1, 1, 16, 1, 17, 18, 19, 20, - - 21, 22, 23, 24, 25, 13, 13, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 13, 13, 36, - 13, 13, 1, 37, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -extern int zconf_flex_debug; -int zconf_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *zconftext; - -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define START_STRSIZE 16 - -char *text; -static char *text_ptr; -static int text_size, text_asize; - -struct buffer { - struct buffer *parent; - YY_BUFFER_STATE state; -}; - -struct buffer *current_buf; - -static int last_ts, first_ts; - -static void zconf_endhelp(void); -static struct buffer *zconf_endfile(void); - -void new_string(void) -{ - text = malloc(START_STRSIZE); - text_asize = START_STRSIZE; - text_ptr = text; - text_size = 0; - *text_ptr = 0; -} - -void append_string(const char *str, int size) -{ - int new_size = text_size + size + 1; - if (new_size > text_asize) { - text = realloc(text, new_size); - text_asize = new_size; - text_ptr = text + text_size; - } - memcpy(text_ptr, str, size); - text_ptr += size; - text_size += size; - *text_ptr = 0; -} - -void alloc_string(const char *str, int size) -{ - text = malloc(size + 1); - memcpy(text, str, size); - text[size] = 0; -} - -#define INITIAL 0 -#define COMMAND 1 -#define HELP 2 -#define STRING 3 -#define PARAM 4 - -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include <unistd.h> - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int zconfwrap (void ); -#else -extern int zconfwrap (void ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( zconftext, zconfleng, 1, zconfout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - errno=0; \ - while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(zconfin); \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int zconflex (void); - -#define YY_DECL int zconflex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after zconftext and zconfleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - - int str = 0; - int ts, i; - - if ( (yy_init) ) - { - (yy_init) = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! zconfin ) - zconfin = stdin; - - if ( ! zconfout ) - zconfout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - zconfensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - zconf_create_buffer(zconfin,YY_BUF_SIZE ); - } - - zconf_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of zconftext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 ) - ++yy_cp; - - yy_current_state = -yy_current_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ -case 1: -/* rule 1 can match eol */ -YY_RULE_SETUP -current_file->lineno++; - YY_BREAK -case 2: -YY_RULE_SETUP - - YY_BREAK -case 3: -/* rule 3 can match eol */ -YY_RULE_SETUP -current_file->lineno++; return T_EOL; - YY_BREAK -case 4: -YY_RULE_SETUP -{ - BEGIN(COMMAND); -} - YY_BREAK -case 5: -YY_RULE_SETUP -{ - unput(zconftext[0]); - BEGIN(COMMAND); -} - YY_BREAK - -case 6: -YY_RULE_SETUP -BEGIN(PARAM); return T_MAINMENU; - YY_BREAK -case 7: -YY_RULE_SETUP -BEGIN(PARAM); return T_MENU; - YY_BREAK -case 8: -YY_RULE_SETUP -BEGIN(PARAM); return T_ENDMENU; - YY_BREAK -case 9: -YY_RULE_SETUP -BEGIN(PARAM); return T_SOURCE; - YY_BREAK -case 10: -YY_RULE_SETUP -BEGIN(PARAM); return T_CHOICE; - YY_BREAK -case 11: -YY_RULE_SETUP -BEGIN(PARAM); return T_ENDCHOICE; - YY_BREAK -case 12: -YY_RULE_SETUP -BEGIN(PARAM); return T_COMMENT; - YY_BREAK -case 13: -YY_RULE_SETUP -BEGIN(PARAM); return T_CONFIG; - YY_BREAK -case 14: -YY_RULE_SETUP -BEGIN(PARAM); return T_MENUCONFIG; - YY_BREAK -case 15: -YY_RULE_SETUP -BEGIN(PARAM); return T_HELP; - YY_BREAK -case 16: -YY_RULE_SETUP -BEGIN(PARAM); return T_IF; - YY_BREAK -case 17: -YY_RULE_SETUP -BEGIN(PARAM); return T_ENDIF; - YY_BREAK -case 18: -YY_RULE_SETUP -BEGIN(PARAM); return T_DEPENDS; - YY_BREAK -case 19: -YY_RULE_SETUP -BEGIN(PARAM); return T_REQUIRES; - YY_BREAK -case 20: -YY_RULE_SETUP -BEGIN(PARAM); return T_OPTIONAL; - YY_BREAK -case 21: -YY_RULE_SETUP -BEGIN(PARAM); return T_DEFAULT; - YY_BREAK -case 22: -YY_RULE_SETUP -BEGIN(PARAM); return T_PROMPT; - YY_BREAK -case 23: -YY_RULE_SETUP -BEGIN(PARAM); return T_TRISTATE; - YY_BREAK -case 24: -YY_RULE_SETUP -BEGIN(PARAM); return T_DEF_TRISTATE; - YY_BREAK -case 25: -YY_RULE_SETUP -BEGIN(PARAM); return T_BOOLEAN; - YY_BREAK -case 26: -YY_RULE_SETUP -BEGIN(PARAM); return T_BOOLEAN; - YY_BREAK -case 27: -YY_RULE_SETUP -BEGIN(PARAM); return T_DEF_BOOLEAN; - YY_BREAK -case 28: -YY_RULE_SETUP -BEGIN(PARAM); return T_DEF_BOOLEAN; - YY_BREAK -case 29: -YY_RULE_SETUP -BEGIN(PARAM); return T_INT; - YY_BREAK -case 30: -YY_RULE_SETUP -BEGIN(PARAM); return T_HEX; - YY_BREAK -case 31: -YY_RULE_SETUP -BEGIN(PARAM); return T_STRING; - YY_BREAK -case 32: -YY_RULE_SETUP -BEGIN(PARAM); return T_SELECT; - YY_BREAK -case 33: -YY_RULE_SETUP -BEGIN(PARAM); return T_SELECT; - YY_BREAK -case 34: -YY_RULE_SETUP -BEGIN(PARAM); return T_RANGE; - YY_BREAK -case 35: -YY_RULE_SETUP -{ - alloc_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD; - } - YY_BREAK -case 36: -YY_RULE_SETUP - - YY_BREAK -case 37: -/* rule 37 can match eol */ -YY_RULE_SETUP -current_file->lineno++; BEGIN(INITIAL); - YY_BREAK - -case 38: -YY_RULE_SETUP -return T_AND; - YY_BREAK -case 39: -YY_RULE_SETUP -return T_OR; - YY_BREAK -case 40: -YY_RULE_SETUP -return T_OPEN_PAREN; - YY_BREAK -case 41: -YY_RULE_SETUP -return T_CLOSE_PAREN; - YY_BREAK -case 42: -YY_RULE_SETUP -return T_NOT; - YY_BREAK -case 43: -YY_RULE_SETUP -return T_EQUAL; - YY_BREAK -case 44: -YY_RULE_SETUP -return T_UNEQUAL; - YY_BREAK -case 45: -YY_RULE_SETUP -return T_IF; - YY_BREAK -case 46: -YY_RULE_SETUP -return T_ON; - YY_BREAK -case 47: -YY_RULE_SETUP -{ - str = zconftext[0]; - new_string(); - BEGIN(STRING); - } - YY_BREAK -case 48: -/* rule 48 can match eol */ -YY_RULE_SETUP -BEGIN(INITIAL); current_file->lineno++; return T_EOL; - YY_BREAK -case 49: -YY_RULE_SETUP -/* ignore */ - YY_BREAK -case 50: -YY_RULE_SETUP -{ - alloc_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD; - } - YY_BREAK -case 51: -YY_RULE_SETUP -/* comment */ - YY_BREAK -case 52: -/* rule 52 can match eol */ -YY_RULE_SETUP -current_file->lineno++; - YY_BREAK -case 53: -YY_RULE_SETUP - - YY_BREAK -case YY_STATE_EOF(PARAM): -{ - BEGIN(INITIAL); - } - YY_BREAK - -case 54: -/* rule 54 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - append_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD_QUOTE; - } - YY_BREAK -case 55: -YY_RULE_SETUP -{ - append_string(zconftext, zconfleng); - } - YY_BREAK -case 56: -/* rule 56 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - append_string(zconftext + 1, zconfleng - 1); - zconflval.string = text; - return T_WORD_QUOTE; - } - YY_BREAK -case 57: -YY_RULE_SETUP -{ - append_string(zconftext + 1, zconfleng - 1); - } - YY_BREAK -case 58: -YY_RULE_SETUP -{ - if (str == zconftext[0]) { - BEGIN(PARAM); - zconflval.string = text; - return T_WORD_QUOTE; - } else - append_string(zconftext, 1); - } - YY_BREAK -case 59: -/* rule 59 can match eol */ -YY_RULE_SETUP -{ - printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); - current_file->lineno++; - BEGIN(INITIAL); - return T_EOL; - } - YY_BREAK -case YY_STATE_EOF(STRING): -{ - BEGIN(INITIAL); - } - YY_BREAK - -case 60: -YY_RULE_SETUP -{ - ts = 0; - for (i = 0; i < zconfleng; i++) { - if (zconftext[i] == '\t') - ts = (ts & ~7) + 8; - else - ts++; - } - last_ts = ts; - if (first_ts) { - if (ts < first_ts) { - zconf_endhelp(); - return T_HELPTEXT; - } - ts -= first_ts; - while (ts > 8) { - append_string(" ", 8); - ts -= 8; - } - append_string(" ", ts); - } - } - YY_BREAK -case 61: -/* rule 61 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - current_file->lineno++; - zconf_endhelp(); - return T_HELPTEXT; - } - YY_BREAK -case 62: -/* rule 62 can match eol */ -YY_RULE_SETUP -{ - current_file->lineno++; - append_string("\n", 1); - } - YY_BREAK -case 63: -YY_RULE_SETUP -{ - append_string(zconftext, zconfleng); - if (!first_ts) - first_ts = last_ts; - } - YY_BREAK -case YY_STATE_EOF(HELP): -{ - zconf_endhelp(); - return T_HELPTEXT; - } - YY_BREAK - -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(COMMAND): -{ - if (current_buf) { - zconf_endfile(); - return T_EOF; - } - fclose(zconfin); - yyterminate(); -} - YY_BREAK -case 64: -YY_RULE_SETUP -YY_FATAL_ERROR( "flex scanner jammed" ); - YY_BREAK - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed zconfin at a new source and called - * zconflex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( zconfwrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * zconftext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of zconflex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - zconfrestart(zconfin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - - yy_current_state = yy_nxt[yy_current_state][1]; - yy_is_jam = (yy_current_state <= 0); - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp ) -{ - register char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up zconftext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - zconfrestart(zconfin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( zconfwrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve zconftext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void zconfrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - zconfensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - zconf_create_buffer(zconfin,YY_BUF_SIZE ); - } - - zconf_init_buffer(YY_CURRENT_BUFFER,input_file ); - zconf_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * zconfpop_buffer_state(); - * zconfpush_buffer_state(new_buffer); - */ - zconfensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - zconf_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (zconfwrap()) processing, but the only time this flag - * is looked at is after zconfwrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void zconf_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - zconf_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with zconf_create_buffer() - * - */ - void zconf_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - zconffree((void *) b->yy_ch_buf ); - - zconffree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a zconfrestart() or at EOF. - */ - static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - zconf_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then zconf_init_buffer was _probably_ - * called from zconfrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void zconf_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - zconf_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - zconfensure_buffer_stack(); - - /* This block is copied from zconf_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from zconf_switch_to_buffer. */ - zconf_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void zconfpop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - zconf_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - zconf_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void zconfensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - zconf_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to zconflex() will - * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * zconf_scan_bytes() instead. - */ -YY_BUFFER_STATE zconf_scan_string (yyconst char * str ) -{ - - return zconf_scan_bytes(str,strlen(str) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) zconfalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = zconf_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up zconftext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - zconftext[zconfleng] = (yy_hold_char); \ - (yy_c_buf_p) = zconftext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - zconfleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int zconfget_lineno (void) -{ - - return zconflineno; -} - -/** Get the input stream. - * - */ -FILE *zconfget_in (void) -{ - return zconfin; -} - -/** Get the output stream. - * - */ -FILE *zconfget_out (void) -{ - return zconfout; -} - -/** Get the length of the current token. - * - */ -int zconfget_leng (void) -{ - return zconfleng; -} - -/** Get the current token. - * - */ - -char *zconfget_text (void) -{ - return zconftext; -} - -/** Set the current line number. - * @param line_number - * - */ -void zconfset_lineno (int line_number ) -{ - - zconflineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see zconf_switch_to_buffer - */ -void zconfset_in (FILE * in_str ) -{ - zconfin = in_str ; -} - -void zconfset_out (FILE * out_str ) -{ - zconfout = out_str ; -} - -int zconfget_debug (void) -{ - return zconf_flex_debug; -} - -void zconfset_debug (int bdebug ) -{ - zconf_flex_debug = bdebug ; -} - -/* zconflex_destroy is for both reentrant and non-reentrant scanners. */ -int zconflex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - zconf_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - zconfpop_buffer_state(); - } - - /* Destroy the stack itself. */ - zconffree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *zconfalloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *zconfrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void zconffree (void * ptr ) -{ - free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#undef YY_NEW_FILE -#undef YY_FLUSH_BUFFER -#undef yy_set_bol -#undef yy_new_buffer -#undef yy_set_interactive -#undef yytext_ptr -#undef YY_DO_BEFORE_ACTION - -#ifdef YY_DECL_IS_OURS -#undef YY_DECL_IS_OURS -#undef YY_DECL -#endif - -void zconf_starthelp(void) -{ - new_string(); - last_ts = first_ts = 0; - BEGIN(HELP); -} - -static void zconf_endhelp(void) -{ - zconflval.string = text; - BEGIN(INITIAL); -} - -/* - * Try to open specified file with following names: - * ./name - * $(srctree)/name - * The latter is used when srctree is separate from objtree - * when compiling the kernel. - * Return NULL if file is not found. - */ -FILE *zconf_fopen(const char *name) -{ - char *env, fullname[PATH_MAX+1]; - FILE *f; - - f = fopen(name, "r"); - if (!f && name[0] != '/') { - env = getenv(SRCTREE); - if (env) { - sprintf(fullname, "%s/%s", env, name); - f = fopen(fullname, "r"); - } - } - return f; -} - -void zconf_initscan(const char *name) -{ - zconfin = zconf_fopen(name); - if (!zconfin) { - printf("can't find file %s\n", name); - exit(1); - } - - current_buf = malloc(sizeof(*current_buf)); - memset(current_buf, 0, sizeof(*current_buf)); - - current_file = file_lookup(name); - current_file->lineno = 1; - current_file->flags = FILE_BUSY; -} - -void zconf_nextfile(const char *name) -{ - size_t i; - int retval; - glob_t files; - char *filename; - struct file *file; - struct buffer *buf; - - retval = glob(name, GLOB_ERR | GLOB_MARK, NULL, &files); - if (retval == GLOB_NOSPACE || retval == GLOB_ABORTED || retval == GLOB_NOMATCH) { - printf("%s:%d: glob failed: %s \"%s\"\n", zconf_curname(), zconf_lineno(), - retval == GLOB_NOSPACE ? "failed to allocate memory" : - retval == GLOB_ABORTED ? "read error" : "no match", - name); - exit(1); - } - - for (i = files.gl_pathc-1; i != (size_t)-1; --i) { - filename = files.gl_pathv[i]; - - file = file_lookup(filename); - buf = malloc(sizeof(*buf)); - memset(buf, 0, sizeof(*buf)); - current_buf->state = YY_CURRENT_BUFFER; - zconfin = zconf_fopen(filename); - if (!zconfin) { - printf("%s:%d: can't open file \"%s\"\n", - zconf_curname(), zconf_lineno(), filename); - exit(1); - } - zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); - buf->parent = current_buf; - current_buf = buf; - - if (file->flags & FILE_BUSY) { - printf("recursive scan (%s)?\n", filename); - exit(1); - } - if (file->flags & FILE_SCANNED) { - printf("file %s already scanned?\n", filename); - exit(1); - } - file->flags |= FILE_BUSY; - file->lineno = 1; - file->parent = current_file; - current_file = file; - } -} - -static struct buffer *zconf_endfile(void) -{ - struct buffer *parent; - - current_file->flags |= FILE_SCANNED; - current_file->flags &= ~FILE_BUSY; - current_file = current_file->parent; - - parent = current_buf->parent; - if (parent) { - fclose(zconfin); - zconf_delete_buffer(YY_CURRENT_BUFFER); - zconf_switch_to_buffer(parent->state); - } - free(current_buf); - current_buf = parent; - - return parent; -} - -int zconf_lineno(void) -{ - if (current_buf) - return current_file->lineno - 1; - else - return 0; -} - -char *zconf_curname(void) -{ - if (current_buf) - return current_file->name; - else - return "<none>"; -} - diff --git a/openwrt/package/config/lkc.h b/openwrt/package/config/lkc.h deleted file mode 100644 index dd040f7a862..00000000000 --- a/openwrt/package/config/lkc.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#ifndef LKC_H -#define LKC_H - -#include "expr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef LKC_DIRECT_LINK -#define P(name,type,arg) extern type name arg -#else -#include "lkc_defs.h" -#define P(name,type,arg) extern type (*name ## _p) arg -#endif -#include "lkc_proto.h" -#undef P - -#define SRCTREE "srctree" - -int zconfparse(void); -void zconfdump(FILE *out); - -extern int zconfdebug; -void zconf_starthelp(void); -FILE *zconf_fopen(const char *name); -void zconf_initscan(const char *name); -void zconf_nextfile(const char *name); -int zconf_lineno(void); -char *zconf_curname(void); - -/* confdata.c */ -extern const char conf_def_filename[]; -extern char conf_filename[]; - -char *conf_get_default_confname(void); - -/* kconfig_load.c */ -void kconfig_load(void); - -/* menu.c */ -void menu_init(void); -void menu_add_menu(void); -void menu_end_menu(void); -void menu_add_entry(struct symbol *sym); -void menu_end_entry(void); -void menu_add_dep(struct expr *dep); -struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); -void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); -void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); -void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); -void menu_finalize(struct menu *parent); -void menu_set_type(int type); -struct file *file_lookup(const char *name); -int file_write_dep(const char *name); - -extern struct menu *current_entry; -extern struct menu *current_menu; - -/* symbol.c */ -void sym_init(void); -void sym_clear_all_valid(void); -void sym_set_changed(struct symbol *sym); -struct symbol *sym_check_deps(struct symbol *sym); -struct property *prop_alloc(enum prop_type type, struct symbol *sym); -struct symbol *prop_get_symbol(struct property *prop); - -static inline tristate sym_get_tristate_value(struct symbol *sym) -{ - return sym->curr.tri; -} - - -static inline struct symbol *sym_get_choice_value(struct symbol *sym) -{ - return (struct symbol *)sym->curr.val; -} - -static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval) -{ - return sym_set_tristate_value(chval, yes); -} - -static inline bool sym_is_choice(struct symbol *sym) -{ - return sym->flags & SYMBOL_CHOICE ? true : false; -} - -static inline bool sym_is_choice_value(struct symbol *sym) -{ - return sym->flags & SYMBOL_CHOICEVAL ? true : false; -} - -static inline bool sym_is_optional(struct symbol *sym) -{ - return sym->flags & SYMBOL_OPTIONAL ? true : false; -} - -static inline bool sym_has_value(struct symbol *sym) -{ - return sym->flags & SYMBOL_NEW ? false : true; -} - -#ifdef __cplusplus -} -#endif - -#endif /* LKC_H */ diff --git a/openwrt/package/config/lkc_proto.h b/openwrt/package/config/lkc_proto.h deleted file mode 100644 index 97c79178ee3..00000000000 --- a/openwrt/package/config/lkc_proto.h +++ /dev/null @@ -1,39 +0,0 @@ - -/* confdata.c */ -P(conf_parse,void,(const char *name)); -P(conf_read,int,(const char *name)); -P(conf_write,int,(const char *name)); - -/* menu.c */ -P(rootmenu,struct menu,); - -P(menu_is_visible,bool,(struct menu *menu)); -P(menu_get_prompt,const char *,(struct menu *menu)); -P(menu_get_root_menu,struct menu *,(struct menu *menu)); -P(menu_get_parent_menu,struct menu *,(struct menu *menu)); - -/* symbol.c */ -P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); -P(sym_change_count,int,); - -P(sym_lookup,struct symbol *,(const char *name, int isconst)); -P(sym_find,struct symbol *,(const char *name)); -P(sym_type_name,const char *,(enum symbol_type type)); -P(sym_calc_value,void,(struct symbol *sym)); -P(sym_get_type,enum symbol_type,(struct symbol *sym)); -P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); -P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); -P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); -P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); -P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); -P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); -P(sym_is_changable,bool,(struct symbol *sym)); -P(sym_get_choice_prop,struct property *,(struct symbol *sym)); -P(sym_get_default_prop,struct property *,(struct symbol *sym)); -P(sym_get_string_value,const char *,(struct symbol *sym)); - -P(prop_get_type_name,const char *,(enum prop_type type)); - -/* expr.c */ -P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); -P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)); diff --git a/openwrt/package/config/mconf.c b/openwrt/package/config/mconf.c deleted file mode 100644 index 00580bd666a..00000000000 --- a/openwrt/package/config/mconf.c +++ /dev/null @@ -1,719 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - * - * Introduced single menu mode (show all sub-menus in one large tree). - * 2002-11-06 Petr Baudis <pasky@ucw.cz> - * - * Directly use liblxdialog library routines. - * 2002-11-14 Petr Baudis <pasky@ucw.cz> - */ - -#include <sys/ioctl.h> -#include <sys/wait.h> -#include <sys/termios.h> -#include <ctype.h> -#include <errno.h> -#include <fcntl.h> -#include <limits.h> -#include <signal.h> -#include <stdarg.h> -#include <stdlib.h> -#include <string.h> -#include <termios.h> -#include <unistd.h> - -#include "dialog.h" - -#define LKC_DIRECT_LINK -#include "lkc.h" - -static char menu_backtitle[128]; -static const char menu_instructions[] = - "Arrow keys navigate the menu. " - "<Enter> selects submenus --->. " - "Highlighted letters are hotkeys. " - "Pressing <Y> selectes a feature, while <N> will exclude a feature. " - "Press <Esc><Esc> to exit, <?> for Help. " - "Legend: [*] feature is selected [ ] feature is excluded", -radiolist_instructions[] = - "Use the arrow keys to navigate this window or " - "press the hotkey of the item you wish to select " - "followed by the <SPACE BAR>. " - "Press <?> for additional information about this option.", -inputbox_instructions_int[] = - "Please enter a decimal value. " - "Fractions will not be accepted. " - "Use the <TAB> key to move from the input field to the buttons below it.", -inputbox_instructions_hex[] = - "Please enter a hexadecimal value. " - "Use the <TAB> key to move from the input field to the buttons below it.", -inputbox_instructions_string[] = - "Please enter a string value. " - "Use the <TAB> key to move from the input field to the buttons below it.", -setmod_text[] = - "This feature depends on another which has been configured as a module.\n" - "As a result, this feature will be built as a module.", -nohelp_text[] = - "There is no help available for this option.\n", -load_config_text[] = - "Enter the name of the configuration file you wish to load. " - "Accept the name shown to restore the configuration you " - "last retrieved. Leave blank to abort.", -load_config_help[] = - "\n" - "For various reasons, one may wish to keep several different Buildroot\n" - "configurations available on a single machine.\n" - "\n" - "If you have saved a previous configuration in a file other than the\n" - "Buildroot's default, entering the name of the file here will allow you\n" - "to modify that configuration.\n" - "\n" - "If you are uncertain, then you have probably never used alternate\n" - "configuration files. You should therefor leave this blank to abort.\n", -save_config_text[] = - "Enter a filename to which this configuration should be saved " - "as an alternate. Leave blank to abort.", -save_config_help[] = - "\n" - "For various reasons, one may wish to keep different Buildroot\n" - "configurations available on a single machine.\n" - "\n" - "Entering a file name here will allow you to later retrieve, modify\n" - "and use the current configuration as an alternate to whatever\n" - "configuration options you have selected at that time.\n" - "\n" - "If you are uncertain what all this means then you should probably\n" - "leave this blank.\n", -top_menu_help[] = - "\n" - "Use the Up/Down arrow keys (cursor keys) to highlight the item\n" - "you wish to change or submenu wish to select and press <Enter>.\n" - "Submenus are designated by \"--->\".\n" - "\n" - "Shortcut: Press the option's highlighted letter (hotkey).\n" - "\n" - "You may also use the <PAGE UP> and <PAGE DOWN> keys to scroll\n" - "unseen options into view.\n" -; - -static char filename[PATH_MAX+1] = ".config"; -static int indent = 0; -static struct termios ios_org; -static int rows, cols; -struct menu *current_menu; -static int child_count; -static int single_menu_mode; - -static struct dialog_list_item *items[16384]; /* FIXME: This ought to be dynamic. */ -static int item_no; - -static void conf(struct menu *menu); -static void conf_choice(struct menu *menu); -static void conf_string(struct menu *menu); -static void conf_load(void); -static void conf_save(void); -static void show_textbox(const char *title, const char *text, int r, int c); -static void show_helptext(const char *title, const char *text); -static void show_help(struct menu *menu); -static void show_readme(void); - -static void init_wsize(void) -{ - struct winsize ws; - char *env; - - if (ioctl(1, TIOCGWINSZ, &ws) == -1) { - rows = 24; - cols = 80; - } else { - rows = ws.ws_row; - cols = ws.ws_col; - if (!rows) { - env = getenv("LINES"); - if (env) - rows = atoi(env); - if (!rows) - rows = 24; - } - if (!cols) { - env = getenv("COLUMNS"); - if (env) - cols = atoi(env); - if (!cols) - cols = 80; - } - } - - if (rows < 19 || cols < 80) { - fprintf(stderr, "Your display is too small to run Menuconfig!\n"); - fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); - exit(1); - } - - rows -= 4; - cols -= 5; -} - -static void cinit(void) -{ - item_no = 0; -} - -static void cmake(void) -{ - items[item_no] = malloc(sizeof(struct dialog_list_item)); - memset(items[item_no], 0, sizeof(struct dialog_list_item)); - items[item_no]->tag = malloc(32); items[item_no]->tag[0] = 0; - items[item_no]->name = malloc(512); items[item_no]->name[0] = 0; - items[item_no]->namelen = 0; - item_no++; -} - -static int cprint_name(const char *fmt, ...) -{ - va_list ap; - int res; - - if (!item_no) - cmake(); - va_start(ap, fmt); - res = vsnprintf(items[item_no - 1]->name + items[item_no - 1]->namelen, - 512 - items[item_no - 1]->namelen, fmt, ap); - if (res > 0) - items[item_no - 1]->namelen += res; - va_end(ap); - - return res; -} - -static int cprint_tag(const char *fmt, ...) -{ - va_list ap; - int res; - - if (!item_no) - cmake(); - va_start(ap, fmt); - res = vsnprintf(items[item_no - 1]->tag, 32, fmt, ap); - va_end(ap); - - return res; -} - -static void cdone(void) -{ - int i; - - for (i = 0; i < item_no; i++) { - free(items[i]->tag); - free(items[i]->name); - free(items[i]); - } - - item_no = 0; -} - -static void build_conf(struct menu *menu) -{ - struct symbol *sym; - struct property *prop; - struct menu *child; - int type, tmp, doint = 2; - tristate val; - char ch; - - if (!menu_is_visible(menu)) - return; - - sym = menu->sym; - prop = menu->prompt; - if (!sym) { - if (prop && menu != current_menu) { - const char *prompt = menu_get_prompt(menu); - switch (prop->type) { - case P_MENU: - child_count++; - cmake(); - cprint_tag("m%p", menu); - - if (single_menu_mode) { - cprint_name("%s%*c%s", - menu->data ? "-->" : "++>", - indent + 1, ' ', prompt); - } else { - cprint_name(" %*c%s --->", indent + 1, ' ', prompt); - } - - if (single_menu_mode && menu->data) - goto conf_childs; - return; - default: - if (prompt) { - child_count++; - cmake(); - cprint_tag(":%p", menu); - cprint_name("---%*c%s", indent + 1, ' ', prompt); - } - } - } else - doint = 0; - goto conf_childs; - } - - cmake(); - type = sym_get_type(sym); - if (sym_is_choice(sym)) { - struct symbol *def_sym = sym_get_choice_value(sym); - struct menu *def_menu = NULL; - - child_count++; - for (child = menu->list; child; child = child->next) { - if (menu_is_visible(child) && child->sym == def_sym) - def_menu = child; - } - - val = sym_get_tristate_value(sym); - if (sym_is_changable(sym)) { - cprint_tag("t%p", menu); - switch (type) { - case S_BOOLEAN: - cprint_name("[%c]", val == no ? ' ' : '*'); - break; - case S_TRISTATE: - switch (val) { - case yes: ch = '*'; break; - case mod: ch = 'M'; break; - default: ch = ' '; break; - } - cprint_name("<%c>", ch); - break; - } - } else { - cprint_tag("%c%p", def_menu ? 't' : ':', menu); - cprint_name(" "); - } - - cprint_name("%*c%s", indent + 1, ' ', menu_get_prompt(menu)); - if (val == yes) { - if (def_menu) { - cprint_name(" (%s)", menu_get_prompt(def_menu)); - cprint_name(" --->"); - if (def_menu->list) { - indent += 2; - build_conf(def_menu); - indent -= 2; - } - } - return; - } - } else { - if (menu == current_menu) { - cprint_tag(":%p", menu); - cprint_name("---%*c%s", indent + 1, ' ', menu_get_prompt(menu)); - goto conf_childs; - } - - child_count++; - val = sym_get_tristate_value(sym); - if (sym_is_choice_value(sym) && val == yes) { - cprint_tag(":%p", menu); - cprint_name(" "); - } else { - switch (type) { - case S_BOOLEAN: - cprint_tag("t%p", menu); - if (sym_is_changable(sym)) - cprint_name("[%c]", val == no ? ' ' : '*'); - else - cprint_name("---"); - break; - case S_TRISTATE: - cprint_tag("t%p", menu); - switch (val) { - case yes: ch = '*'; break; - case mod: ch = 'M'; break; - default: ch = ' '; break; - } - if (sym_is_changable(sym)) - cprint_name("<%c>", ch); - else - cprint_name("---"); - break; - default: - cprint_tag("s%p", menu); - tmp = cprint_name("(%s)", sym_get_string_value(sym)); - tmp = indent - tmp + 4; - if (tmp < 0) - tmp = 0; - cprint_name("%*c%s%s", tmp, ' ', menu_get_prompt(menu), - (sym_has_value(sym) || !sym_is_changable(sym)) ? - "" : " (NEW)"); - goto conf_childs; - } - } - cprint_name("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu), - (sym_has_value(sym) || !sym_is_changable(sym)) ? - "" : " (NEW)"); - if (menu->prompt->type == P_MENU) { - cprint_name(" --->"); - return; - } - } - -conf_childs: - indent += doint; - for (child = menu->list; child; child = child->next) - build_conf(child); - indent -= doint; -} - -static void conf(struct menu *menu) -{ - struct dialog_list_item *active_item = NULL; - struct menu *submenu; - const char *prompt = menu_get_prompt(menu); - struct symbol *sym; - char active_entry[40]; - int stat, type; - - unlink("lxdialog.scrltmp"); - active_entry[0] = 0; - while (1) { - indent = 0; - child_count = 0; - current_menu = menu; - cdone(); cinit(); - build_conf(menu); - if (!child_count) - break; - if (menu == &rootmenu) { - cmake(); cprint_tag(":"); cprint_name("--- "); - cmake(); cprint_tag("L"); cprint_name("Load an Alternate Configuration File"); - cmake(); cprint_tag("S"); cprint_name("Save Configuration to an Alternate File"); - } - dialog_clear(); - stat = dialog_menu(prompt ? prompt : "Main Menu", - menu_instructions, rows, cols, rows - 10, - active_entry, item_no, items); - if (stat < 0) - return; - - if (stat == 1 || stat == 255) - break; - - active_item = first_sel_item(item_no, items); - if (!active_item) - continue; - active_item->selected = 0; - strncpy(active_entry, active_item->tag, sizeof(active_entry)); - active_entry[sizeof(active_entry)-1] = 0; - type = active_entry[0]; - if (!type) - continue; - - sym = NULL; - submenu = NULL; - if (sscanf(active_entry + 1, "%p", &submenu) == 1) - sym = submenu->sym; - - switch (stat) { - case 0: - switch (type) { - case 'm': - if (single_menu_mode) - submenu->data = (void *) (long) !submenu->data; - else - conf(submenu); - break; - case 't': - if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes) - conf_choice(submenu); - else if (submenu->prompt->type == P_MENU) - conf(submenu); - break; - case 's': - conf_string(submenu); - break; - case 'L': - conf_load(); - break; - case 'S': - conf_save(); - break; - } - break; - case 2: - if (sym) - show_help(submenu); - else - show_readme(); - break; - case 3: - if (type == 't') { - if (sym_set_tristate_value(sym, yes)) - break; - if (sym_set_tristate_value(sym, mod)) - show_textbox(NULL, setmod_text, 6, 74); - } - break; - case 4: - if (type == 't') - sym_set_tristate_value(sym, no); - break; - case 5: - if (type == 't') - sym_set_tristate_value(sym, mod); - break; - case 6: - if (type == 't') - sym_toggle_tristate_value(sym); - else if (type == 'm') - conf(submenu); - break; - } - } -} - -static void show_textbox(const char *title, const char *text, int r, int c) -{ - int fd; - - fd = creat(".help.tmp", 0777); - write(fd, text, strlen(text)); - close(fd); - while (dialog_textbox(title, ".help.tmp", r, c) < 0) - ; - unlink(".help.tmp"); -} - -static void show_helptext(const char *title, const char *text) -{ - show_textbox(title, text, rows, cols); -} - -static void show_help(struct menu *menu) -{ - const char *help; - char *helptext; - struct symbol *sym = menu->sym; - - help = sym->help; - if (!help) - help = nohelp_text; - if (sym->name) { - helptext = malloc(strlen(sym->name) + strlen(help) + 16); - sprintf(helptext, "%s:\n\n%s", sym->name, help); - show_helptext(menu_get_prompt(menu), helptext); - free(helptext); - } else - show_helptext(menu_get_prompt(menu), help); -} - -static void show_readme(void) -{ - show_helptext("Help", top_menu_help); -} - -static void conf_choice(struct menu *menu) -{ - const char *prompt = menu_get_prompt(menu); - struct menu *child; - struct symbol *active; - - active = sym_get_choice_value(menu->sym); - while (1) { - current_menu = menu; - cdone(); cinit(); - for (child = menu->list; child; child = child->next) { - if (!menu_is_visible(child)) - continue; - cmake(); - cprint_tag("%p", child); - cprint_name("%s", menu_get_prompt(child)); - if (child->sym == sym_get_choice_value(menu->sym)) - items[item_no - 1]->selected = 1; /* ON */ - else if (child->sym == active) - items[item_no - 1]->selected = 2; /* SELECTED */ - else - items[item_no - 1]->selected = 0; /* OFF */ - } - - switch (dialog_checklist(prompt ? prompt : "Main Menu", - radiolist_instructions, 15, 70, 6, - item_no, items, FLAG_RADIO)) { - case 0: - if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) != 1) - break; - sym_set_tristate_value(child->sym, yes); - return; - case 1: - if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) == 1) { - show_help(child); - active = child->sym; - } else - show_help(menu); - break; - case 255: - return; - } - } -} - -static void conf_string(struct menu *menu) -{ - const char *prompt = menu_get_prompt(menu); - - while (1) { - char *heading; - - switch (sym_get_type(menu->sym)) { - case S_INT: - heading = (char *) inputbox_instructions_int; - break; - case S_HEX: - heading = (char *) inputbox_instructions_hex; - break; - case S_STRING: - heading = (char *) inputbox_instructions_string; - break; - default: - heading = "Internal mconf error!"; - /* panic? */; - } - - switch (dialog_inputbox(prompt ? prompt : "Main Menu", - heading, 10, 75, - sym_get_string_value(menu->sym))) { - case 0: - if (sym_set_string_value(menu->sym, dialog_input_result)) - return; - show_textbox(NULL, "You have made an invalid entry.", 5, 43); - break; - case 1: - show_help(menu); - break; - case 255: - return; - } - } -} - -static void conf_load(void) -{ - while (1) { - switch (dialog_inputbox(NULL, load_config_text, 11, 55, - filename)) { - case 0: - if (!dialog_input_result[0]) - return; - if (!conf_read(dialog_input_result)) - return; - show_textbox(NULL, "File does not exist!", 5, 38); - break; - case 1: - show_helptext("Load Alternate Configuration", load_config_help); - break; - case 255: - return; - } - } -} - -static void conf_save(void) -{ - while (1) { - switch (dialog_inputbox(NULL, save_config_text, 11, 55, - filename)) { - case 0: - if (!dialog_input_result[0]) - return; - if (!conf_write(dialog_input_result)) - return; - show_textbox(NULL, "Can't create file! Probably a nonexistent directory.", 5, 60); - break; - case 1: - show_helptext("Save Alternate Configuration", save_config_help); - break; - case 255: - return; - } - } -} - -static void conf_cleanup(void) -{ - tcsetattr(1, TCSAFLUSH, &ios_org); - unlink(".help.tmp"); -} - -static void winch_handler(int sig) -{ - struct winsize ws; - - if (ioctl(1, TIOCGWINSZ, &ws) == -1) { - rows = 24; - cols = 80; - } else { - rows = ws.ws_row; - cols = ws.ws_col; - } - - if (rows < 19 || cols < 80) { - end_dialog(); - fprintf(stderr, "Your display is too small to run Menuconfig!\n"); - fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); - exit(1); - } - - rows -= 4; - cols -= 5; - -} - -int main(int ac, char **av) -{ - int stat; - char *mode; - struct symbol *sym; - - conf_parse(av[1]); - conf_read(NULL); - - sym = sym_lookup("VERSION", 0); - sym_calc_value(sym); - snprintf(menu_backtitle, 128, "Buildroot v%s Configuration", - sym_get_string_value(sym)); - - mode = getenv("MENUCONFIG_MODE"); - if (mode) { - if (!strcasecmp(mode, "single_menu")) - single_menu_mode = 1; - } - - tcgetattr(1, &ios_org); - atexit(conf_cleanup); - init_wsize(); - init_dialog(); - signal(SIGWINCH, winch_handler); - conf(&rootmenu); - end_dialog(); - - /* Restart dialog to act more like when lxdialog was still separate */ - init_dialog(); - do { - stat = dialog_yesno(NULL, - "Do you wish to save your new Buildroot configuration?", 5, 60); - } while (stat < 0); - end_dialog(); - - if (stat == 0) { - conf_write(NULL); - printf("\n\n" - "*** End of Buildroot configuration.\n" - "*** Check the top-level Makefile for additional configuration options.\n\n"); - } else - printf("\n\nYour Buildroot configuration changes were NOT saved.\n\n"); - - return 0; -} diff --git a/openwrt/package/config/menu.c b/openwrt/package/config/menu.c deleted file mode 100644 index 6425296fc33..00000000000 --- a/openwrt/package/config/menu.c +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <stdlib.h> -#include <string.h> - -#define LKC_DIRECT_LINK -#include "lkc.h" - -struct menu rootmenu; -struct menu *current_menu, *current_entry; -static struct menu **last_entry_ptr; - -struct file *file_list; -struct file *current_file; - -static void menu_warn(struct menu *menu, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - va_end(ap); -} - -static void prop_warn(struct property *prop, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - va_end(ap); -} - -void menu_init(void) -{ - current_entry = current_menu = &rootmenu; - last_entry_ptr = &rootmenu.list; -} - -void menu_add_entry(struct symbol *sym) -{ - struct menu *menu; - - menu = malloc(sizeof(*menu)); - memset(menu, 0, sizeof(*menu)); - menu->sym = sym; - menu->parent = current_menu; - menu->file = current_file; - menu->lineno = zconf_lineno(); - - *last_entry_ptr = menu; - last_entry_ptr = &menu->next; - current_entry = menu; -} - -void menu_end_entry(void) -{ -} - -void menu_add_menu(void) -{ - current_menu = current_entry; - last_entry_ptr = ¤t_entry->list; -} - -void menu_end_menu(void) -{ - last_entry_ptr = ¤t_menu->next; - current_menu = current_menu->parent; -} - -struct expr *menu_check_dep(struct expr *e) -{ - if (!e) - return e; - - switch (e->type) { - case E_NOT: - e->left.expr = menu_check_dep(e->left.expr); - break; - case E_OR: - case E_AND: - e->left.expr = menu_check_dep(e->left.expr); - e->right.expr = menu_check_dep(e->right.expr); - break; - case E_SYMBOL: - /* change 'm' into 'm' && MODULES */ - if (e->left.sym == &symbol_mod) - return expr_alloc_and(e, expr_alloc_symbol(modules_sym)); - break; - default: - break; - } - return e; -} - -void menu_add_dep(struct expr *dep) -{ - current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); -} - -void menu_set_type(int type) -{ - struct symbol *sym = current_entry->sym; - - if (sym->type == type) - return; - if (sym->type == S_UNKNOWN) { - sym->type = type; - return; - } - menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'\n", - sym->name ? sym->name : "<choice>", - sym_type_name(sym->type), sym_type_name(type)); -} - -struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) -{ - struct property *prop = prop_alloc(type, current_entry->sym); - - prop->menu = current_entry; - prop->text = prompt; - prop->expr = expr; - prop->visible.expr = menu_check_dep(dep); - - if (prompt) { - if (current_entry->prompt) - menu_warn(current_entry, "prompt redefined\n"); - current_entry->prompt = prop; - } - - return prop; -} - -void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) -{ - menu_add_prop(type, prompt, NULL, dep); -} - -void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) -{ - menu_add_prop(type, NULL, expr, dep); -} - -void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) -{ - menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); -} - -void sym_check_prop(struct symbol *sym) -{ - struct property *prop; - struct symbol *sym2; - for (prop = sym->prop; prop; prop = prop->next) { - switch (prop->type) { - case P_DEFAULT: - if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) && - prop->expr->type != E_SYMBOL) - prop_warn(prop, - "default for config symbol '%'" - " must be a single symbol", sym->name); - break; - case P_SELECT: - sym2 = prop_get_symbol(prop); - if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) - prop_warn(prop, - "config symbol '%s' uses select, but is " - "not boolean or tristate", sym->name); - else if (sym2->type == S_UNKNOWN) - prop_warn(prop, - "'select' used by config symbol '%s' " - "refer to undefined symbol '%s'", - sym->name, sym2->name); - else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE) - prop_warn(prop, - "'%s' has wrong type. 'select' only " - "accept arguments of boolean and " - "tristate type", sym2->name); - break; - case P_RANGE: - if (sym->type != S_INT && sym->type != S_HEX) - prop_warn(prop, "range is only allowed " - "for int or hex symbols"); - if (!sym_string_valid(sym, prop->expr->left.sym->name) || - !sym_string_valid(sym, prop->expr->right.sym->name)) - prop_warn(prop, "range is invalid"); - break; - default: - ; - } - } -} - -void menu_finalize(struct menu *parent) -{ - struct menu *menu, *last_menu; - struct symbol *sym; - struct property *prop; - struct expr *parentdep, *basedep, *dep, *dep2, **ep; - - sym = parent->sym; - if (parent->list) { - if (sym && sym_is_choice(sym)) { - /* find the first choice value and find out choice type */ - for (menu = parent->list; menu; menu = menu->next) { - if (menu->sym) { - current_entry = parent; - menu_set_type(menu->sym->type); - current_entry = menu; - menu_set_type(sym->type); - break; - } - } - parentdep = expr_alloc_symbol(sym); - } else if (parent->prompt) - parentdep = parent->prompt->visible.expr; - else - parentdep = parent->dep; - - for (menu = parent->list; menu; menu = menu->next) { - basedep = expr_transform(menu->dep); - basedep = expr_alloc_and(expr_copy(parentdep), basedep); - basedep = expr_eliminate_dups(basedep); - menu->dep = basedep; - if (menu->sym) - prop = menu->sym->prop; - else - prop = menu->prompt; - for (; prop; prop = prop->next) { - if (prop->menu != menu) - continue; - dep = expr_transform(prop->visible.expr); - dep = expr_alloc_and(expr_copy(basedep), dep); - dep = expr_eliminate_dups(dep); - if (menu->sym && menu->sym->type != S_TRISTATE) - dep = expr_trans_bool(dep); - prop->visible.expr = dep; - if (prop->type == P_SELECT) { - struct symbol *es = prop_get_symbol(prop); - es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, - expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); - } - } - } - for (menu = parent->list; menu; menu = menu->next) - menu_finalize(menu); - } else if (sym) { - basedep = parent->prompt ? parent->prompt->visible.expr : NULL; - basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); - basedep = expr_eliminate_dups(expr_transform(basedep)); - last_menu = NULL; - for (menu = parent->next; menu; menu = menu->next) { - dep = menu->prompt ? menu->prompt->visible.expr : menu->dep; - if (!expr_contains_symbol(dep, sym)) - break; - if (expr_depends_symbol(dep, sym)) - goto next; - dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no); - dep = expr_eliminate_dups(expr_transform(dep)); - dep2 = expr_copy(basedep); - expr_eliminate_eq(&dep, &dep2); - expr_free(dep); - if (!expr_is_yes(dep2)) { - expr_free(dep2); - break; - } - expr_free(dep2); - next: - menu_finalize(menu); - menu->parent = parent; - last_menu = menu; - } - if (last_menu) { - parent->list = parent->next; - parent->next = last_menu->next; - last_menu->next = NULL; - } - } - for (menu = parent->list; menu; menu = menu->next) { - if (sym && sym_is_choice(sym) && menu->sym) { - menu->sym->flags |= SYMBOL_CHOICEVAL; - if (!menu->prompt) - menu_warn(menu, "choice value must have a prompt"); - for (prop = menu->sym->prop; prop; prop = prop->next) { - if (prop->type == P_PROMPT && prop->menu != menu) { - prop_warn(prop, "choice values " - "currently only support a " - "single prompt"); - } - if (prop->type == P_DEFAULT) - prop_warn(prop, "defaults for choice " - "values not supported"); - } - current_entry = menu; - menu_set_type(sym->type); - menu_add_symbol(P_CHOICE, sym, NULL); - prop = sym_get_choice_prop(sym); - for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) - ; - *ep = expr_alloc_one(E_CHOICE, NULL); - (*ep)->right.sym = menu->sym; - } - if (menu->list && (!menu->prompt || !menu->prompt->text)) { - for (last_menu = menu->list; ; last_menu = last_menu->next) { - last_menu->parent = parent; - if (!last_menu->next) - break; - } - last_menu->next = menu->next; - menu->next = menu->list; - menu->list = NULL; - } - } - - if (sym && !(sym->flags & SYMBOL_WARNED)) { - if (sym->type == S_UNKNOWN) - menu_warn(parent, "config symbol defined " - "without type\n"); - - if (sym_is_choice(sym) && !parent->prompt) - menu_warn(parent, "choice must have a prompt\n"); - - /* Check properties connected to this symbol */ - sym_check_prop(sym); - sym->flags |= SYMBOL_WARNED; - } - - if (sym && !sym_is_optional(sym) && parent->prompt) { - sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, - expr_alloc_and(parent->prompt->visible.expr, - expr_alloc_symbol(&symbol_mod))); - } -} - -bool menu_is_visible(struct menu *menu) -{ - struct menu *child; - struct symbol *sym; - tristate visible; - - if (!menu->prompt) - return false; - sym = menu->sym; - if (sym) { - sym_calc_value(sym); - visible = menu->prompt->visible.tri; - } else - visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); - - if (visible != no) - return true; - if (!sym || sym_get_tristate_value(menu->sym) == no) - return false; - - for (child = menu->list; child; child = child->next) - if (menu_is_visible(child)) - return true; - return false; -} - -const char *menu_get_prompt(struct menu *menu) -{ - if (menu->prompt) - return menu->prompt->text; - else if (menu->sym) - return menu->sym->name; - return NULL; -} - -struct menu *menu_get_root_menu(struct menu *menu) -{ - return &rootmenu; -} - -struct menu *menu_get_parent_menu(struct menu *menu) -{ - enum prop_type type; - - for (; menu != &rootmenu; menu = menu->parent) { - type = menu->prompt ? menu->prompt->type : 0; - if (type == P_MENU) - break; - } - return menu; -} - -struct file *file_lookup(const char *name) -{ - struct file *file; - - for (file = file_list; file; file = file->next) { - if (!strcmp(name, file->name)) - return file; - } - - file = malloc(sizeof(*file)); - memset(file, 0, sizeof(*file)); - file->name = strdup(name); - file->next = file_list; - file_list = file; - return file; -} - -int file_write_dep(const char *name) -{ - struct file *file; - FILE *out; - - if (!name) - name = ".config.cmd"; - out = fopen(".config.tmp", "w"); - if (!out) - return 1; - fprintf(out, "deps_config := \\\n"); - for (file = file_list; file; file = file->next) { - if (file->next) - fprintf(out, "\t%s \\\n", file->name); - else - fprintf(out, "\t%s\n", file->name); - } - fprintf(out, "\n.config include/config.h: $(deps_config)\n\n$(deps_config):\n"); - fclose(out); - rename(".config.tmp", name); - return 0; -} - diff --git a/openwrt/package/config/menubox.c b/openwrt/package/config/menubox.c deleted file mode 100644 index 431f09fc991..00000000000 --- a/openwrt/package/config/menubox.c +++ /dev/null @@ -1,436 +0,0 @@ -/* - * menubox.c -- implements the menu box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * Changes by Clifford Wolf (god@clifford.at) - * - * [ 1998-06-13 ] - * - * *) A bugfix for the Page-Down problem - * - * *) Formerly when I used Page Down and Page Up, the cursor would be set - * to the first position in the menu box. Now lxdialog is a bit - * smarter and works more like other menu systems (just have a look at - * it). - * - * *) Formerly if I selected something my scrolling would be broken because - * lxdialog is re-invoked by the Menuconfig shell script, can't - * remember the last scrolling position, and just sets it so that the - * cursor is at the bottom of the box. Now it writes the temporary file - * lxdialog.scrltmp which contains this information. The file is - * deleted by lxdialog if the user leaves a submenu or enters a new - * one, but it would be nice if Menuconfig could make another "rm -f" - * just to be sure. Just try it out - you will recognise a difference! - * - * [ 1998-06-14 ] - * - * *) Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files - * and menus change their size on the fly. - * - * *) If for some reason the last scrolling position is not saved by - * lxdialog, it sets the scrolling so that the selected item is in the - * middle of the menu box, not at the bottom. - * - * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net) - * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus. - * This fixes a bug in Menuconfig where using ' ' to descend into menus - * would leave mis-synchronized lxdialog.scrltmp files lying around, - * fscanf would read in 'scroll', and eventually that value would get used. - */ - -#include "dialog.h" - -static int menu_width, item_x; - -/* - * Print menu item - */ -static void -print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey) -{ - int j; - char menu_item[menu_width+1]; - - strncpy(menu_item, item, menu_width); - menu_item[menu_width] = 0; - j = first_alpha(menu_item, "YyNnMm"); - - /* Clear 'residue' of last item */ - wattrset (win, menubox_attr); - wmove (win, choice, 0); -#if OLD_NCURSES - { - int i; - for (i = 0; i < menu_width; i++) - waddch (win, ' '); - } -#else - wclrtoeol(win); -#endif - wattrset (win, selected ? item_selected_attr : item_attr); - mvwaddstr (win, choice, item_x, menu_item); - if (hotkey) { - wattrset (win, selected ? tag_key_selected_attr : tag_key_attr); - mvwaddch(win, choice, item_x+j, menu_item[j]); - } - if (selected) { - wmove (win, choice, item_x+1); - wrefresh (win); - } -} - -/* - * Print the scroll indicators. - */ -static void -print_arrows (WINDOW * win, int item_no, int scroll, - int y, int x, int height) -{ - int cur_y, cur_x; - - getyx(win, cur_y, cur_x); - - wmove(win, y, x); - - if (scroll > 0) { - wattrset (win, uarrow_attr); - waddch (win, ACS_UARROW); - waddstr (win, "(-)"); - } - else { - wattrset (win, menubox_attr); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - } - - y = y + height + 1; - wmove(win, y, x); - - if ((height < item_no) && (scroll + height < item_no)) { - wattrset (win, darrow_attr); - waddch (win, ACS_DARROW); - waddstr (win, "(+)"); - } - else { - wattrset (win, menubox_border_attr); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - waddch (win, ACS_HLINE); - } - - wmove(win, cur_y, cur_x); -} - -/* - * Display the termination buttons. - */ -static void -print_buttons (WINDOW *win, int height, int width, int selected) -{ - int x = width / 2 - 16; - int y = height - 2; - - print_button (win, "Select", y, x, selected == 0); - print_button (win, " Exit ", y, x + 12, selected == 1); - print_button (win, " Help ", y, x + 24, selected == 2); - - wmove(win, y, x+1+12*selected); - wrefresh (win); -} - -/* - * Display a menu for choosing among a number of options - */ -int -dialog_menu (const char *title, const char *prompt, int height, int width, - int menu_height, const char *current, int item_no, - struct dialog_list_item ** items) -{ - int i, j, x, y, box_x, box_y; - int key = 0, button = 0, scroll = 0, choice = 0, first_item = 0, max_choice; - WINDOW *dialog, *menu; - FILE *f; - - max_choice = MIN (menu_height, item_no); - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow (stdscr, y, x, height, width); - - dialog = newwin (height, width, y, x); - keypad (dialog, TRUE); - - draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); - wattrset (dialog, border_attr); - mvwaddch (dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch (dialog, ACS_HLINE); - wattrset (dialog, dialog_attr); - wbkgdset (dialog, dialog_attr & A_COLOR); - waddch (dialog, ACS_RTEE); - - if (title != NULL && strlen(title) >= width-2 ) { - /* truncate long title -- mec */ - char * title2 = malloc(width-2+1); - memcpy( title2, title, width-2 ); - title2[width-2] = '\0'; - title = title2; - } - - if (title != NULL) { - wattrset (dialog, title_attr); - mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); - waddstr (dialog, (char *)title); - waddch (dialog, ' '); - } - - wattrset (dialog, dialog_attr); - print_autowrap (dialog, prompt, width - 2, 1, 3); - - menu_width = width - 6; - box_y = height - menu_height - 5; - box_x = (width - menu_width) / 2 - 1; - - /* create new window for the menu */ - menu = subwin (dialog, menu_height, menu_width, - y + box_y + 1, x + box_x + 1); - keypad (menu, TRUE); - - /* draw a box around the menu items */ - draw_box (dialog, box_y, box_x, menu_height + 2, menu_width + 2, - menubox_border_attr, menubox_attr); - - /* - * Find length of longest item in order to center menu. - * Set 'choice' to default item. - */ - item_x = 0; - for (i = 0; i < item_no; i++) { - item_x = MAX (item_x, MIN(menu_width, strlen (items[i]->name) + 2)); - if (strcmp(current, items[i]->tag) == 0) choice = i; - } - - item_x = (menu_width - item_x) / 2; - - /* get the scroll info from the temp file */ - if ( (f=fopen("lxdialog.scrltmp","r")) != NULL ) { - if ( (fscanf(f,"%d\n",&scroll) == 1) && (scroll <= choice) && - (scroll+max_choice > choice) && (scroll >= 0) && - (scroll+max_choice <= item_no) ) { - first_item = scroll; - choice = choice - scroll; - fclose(f); - } else { - scroll=0; - remove("lxdialog.scrltmp"); - fclose(f); - f=NULL; - } - } - if ( (choice >= max_choice) || (f==NULL && choice >= max_choice/2) ) { - if (choice >= item_no-max_choice/2) - scroll = first_item = item_no-max_choice; - else - scroll = first_item = choice - max_choice/2; - choice = choice - scroll; - } - - /* Print the menu */ - for (i=0; i < max_choice; i++) { - print_item (menu, items[first_item + i]->name, i, i == choice, - (items[first_item + i]->tag[0] != ':')); - } - - wnoutrefresh (menu); - - print_arrows(dialog, item_no, scroll, - box_y, box_x+item_x+1, menu_height); - - print_buttons (dialog, height, width, 0); - wmove (menu, choice, item_x+1); - wrefresh (menu); - - while (key != ESC) { - key = wgetch(menu); - - if (key < 256 && isalpha(key)) key = tolower(key); - - if (strchr("ynm", key)) - i = max_choice; - else { - for (i = choice+1; i < max_choice; i++) { - j = first_alpha(items[scroll + i]->name, "YyNnMm>"); - if (key == tolower(items[scroll + i]->name[j])) - break; - } - if (i == max_choice) - for (i = 0; i < max_choice; i++) { - j = first_alpha(items[scroll + i]->name, "YyNnMm>"); - if (key == tolower(items[scroll + i]->name[j])) - break; - } - } - - if (i < max_choice || - key == KEY_UP || key == KEY_DOWN || - key == '-' || key == '+' || - key == KEY_PPAGE || key == KEY_NPAGE) { - - print_item (menu, items[scroll + choice]->name, choice, FALSE, - (items[scroll + choice]->tag[0] != ':')); - - if (key == KEY_UP || key == '-') { - if (choice < 2 && scroll) { - /* Scroll menu down */ - scrollok (menu, TRUE); - wscrl (menu, -1); - scrollok (menu, FALSE); - - scroll--; - - print_item (menu, items[scroll]->name, 0, FALSE, - (items[scroll]->tag[0] != ':')); - } else - choice = MAX(choice - 1, 0); - - } else if (key == KEY_DOWN || key == '+') { - - print_item (menu, items[scroll + choice]->name, choice, FALSE, - (items[scroll + choice]->tag[0] != ':')); - - if ((choice > max_choice-3) && - (scroll + max_choice < item_no) - ) { - /* Scroll menu up */ - scrollok (menu, TRUE); - scroll (menu); - scrollok (menu, FALSE); - - scroll++; - - print_item (menu, items[scroll + max_choice - 1]->name, - max_choice-1, FALSE, - (items[scroll + max_choice - 1]->tag[0] != ':')); - } else - choice = MIN(choice+1, max_choice-1); - - } else if (key == KEY_PPAGE) { - scrollok (menu, TRUE); - for (i=0; (i < max_choice); i++) { - if (scroll > 0) { - wscrl (menu, -1); - scroll--; - print_item (menu, items[scroll]->name, 0, FALSE, - (items[scroll]->tag[0] != ':')); - } else { - if (choice > 0) - choice--; - } - } - scrollok (menu, FALSE); - - } else if (key == KEY_NPAGE) { - for (i=0; (i < max_choice); i++) { - if (scroll+max_choice < item_no) { - scrollok (menu, TRUE); - scroll(menu); - scrollok (menu, FALSE); - scroll++; - print_item (menu, items[scroll + max_choice - 1]->name, - max_choice-1, FALSE, - (items[scroll + max_choice - 1]->tag[0] != ':')); - } else { - if (choice+1 < max_choice) - choice++; - } - } - - } else - choice = i; - - print_item (menu, items[scroll + choice]->name, choice, TRUE, - (items[scroll + choice]->tag[0] != ':')); - - print_arrows(dialog, item_no, scroll, - box_y, box_x+item_x+1, menu_height); - - wnoutrefresh (dialog); - wrefresh (menu); - - continue; /* wait for another key press */ - } - - switch (key) { - case KEY_LEFT: - case TAB: - case KEY_RIGHT: - button = ((key == KEY_LEFT ? --button : ++button) < 0) - ? 2 : (button > 2 ? 0 : button); - - print_buttons(dialog, height, width, button); - wrefresh (menu); - break; - case ' ': - case 's': - case 'y': - case 'n': - case 'm': - /* save scroll info */ - if ( (f=fopen("lxdialog.scrltmp","w")) != NULL ) { - fprintf(f,"%d\n",scroll); - fclose(f); - } - delwin (dialog); - items[scroll + choice]->selected = 1; - switch (key) { - case 's': return 3; - case 'y': return 3; - case 'n': return 4; - case 'm': return 5; - case ' ': return 6; - } - return 0; - case 'h': - case '?': - button = 2; - case '\n': - delwin (dialog); - items[scroll + choice]->selected = 1; - - remove("lxdialog.scrltmp"); - return button; - case 'e': - case 'x': - key = ESC; - case ESC: - break; - } - } - - delwin (dialog); - remove("lxdialog.scrltmp"); - return -1; /* ESC pressed */ -} diff --git a/openwrt/package/config/msgbox.c b/openwrt/package/config/msgbox.c deleted file mode 100644 index 93692e1fbcc..00000000000 --- a/openwrt/package/config/msgbox.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * msgbox.c -- implements the message box and info box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -/* - * Display a message box. Program will pause and display an "OK" button - * if the parameter 'pause' is non-zero. - */ -int -dialog_msgbox (const char *title, const char *prompt, int height, int width, - int pause) -{ - int i, x, y, key = 0; - WINDOW *dialog; - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow (stdscr, y, x, height, width); - - dialog = newwin (height, width, y, x); - keypad (dialog, TRUE); - - draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); - - if (title != NULL && strlen(title) >= width-2 ) { - /* truncate long title -- mec */ - char * title2 = malloc(width-2+1); - memcpy( title2, title, width-2 ); - title2[width-2] = '\0'; - title = title2; - } - - if (title != NULL) { - wattrset (dialog, title_attr); - mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); - waddstr (dialog, (char *)title); - waddch (dialog, ' '); - } - wattrset (dialog, dialog_attr); - print_autowrap (dialog, prompt, width - 2, 1, 2); - - if (pause) { - wattrset (dialog, border_attr); - mvwaddch (dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch (dialog, ACS_HLINE); - wattrset (dialog, dialog_attr); - waddch (dialog, ACS_RTEE); - - print_button (dialog, " Ok ", - height - 2, width / 2 - 4, TRUE); - - wrefresh (dialog); - while (key != ESC && key != '\n' && key != ' ' && - key != 'O' && key != 'o' && key != 'X' && key != 'x') - key = wgetch (dialog); - } else { - key = '\n'; - wrefresh (dialog); - } - - delwin (dialog); - return key == ESC ? -1 : 0; -} diff --git a/openwrt/package/config/symbol.c b/openwrt/package/config/symbol.c deleted file mode 100644 index a9fae9c13af..00000000000 --- a/openwrt/package/config/symbol.c +++ /dev/null @@ -1,771 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <ctype.h> -#include <stdlib.h> -#include <string.h> -#include <sys/utsname.h> - -#define LKC_DIRECT_LINK -#include "lkc.h" - -struct symbol symbol_yes = { - .name = "y", - .curr = { "y", yes }, - .flags = SYMBOL_YES|SYMBOL_VALID, -}, symbol_mod = { - .name = "m", - .curr = { "m", mod }, - .flags = SYMBOL_MOD|SYMBOL_VALID, -}, symbol_no = { - .name = "n", - .curr = { "n", no }, - .flags = SYMBOL_NO|SYMBOL_VALID, -}, symbol_empty = { - .name = "", - .curr = { "", no }, - .flags = SYMBOL_VALID, -}; - -int sym_change_count; -struct symbol *modules_sym; -tristate modules_val; - -void sym_add_default(struct symbol *sym, const char *def) -{ - struct property *prop = prop_alloc(P_DEFAULT, sym); - - prop->expr = expr_alloc_symbol(sym_lookup(def, 1)); -} - -void sym_init(void) -{ - struct symbol *sym; - char *p; - static bool inited = false; - - if (inited) - return; - inited = true; - - sym = sym_lookup("VERSION", 0); - sym->type = S_STRING; - sym->flags |= SYMBOL_AUTO; - p = getenv("VERSION"); - if (p) - sym_add_default(sym, p); - - sym = sym_lookup("TARGET_ARCH", 0); - sym->type = S_STRING; - sym->flags |= SYMBOL_AUTO; - p = getenv("TARGET_ARCH"); - if (p) - sym_add_default(sym, p); - -} - -enum symbol_type sym_get_type(struct symbol *sym) -{ - enum symbol_type type = sym->type; - - if (type == S_TRISTATE) { - if (sym_is_choice_value(sym) && sym->visible == yes) - type = S_BOOLEAN; - else if (modules_val == no) - type = S_BOOLEAN; - } - return type; -} - -const char *sym_type_name(enum symbol_type type) -{ - switch (type) { - case S_BOOLEAN: - return "boolean"; - case S_TRISTATE: - return "tristate"; - case S_INT: - return "integer"; - case S_HEX: - return "hex"; - case S_STRING: - return "string"; - case S_UNKNOWN: - return "unknown"; - case S_OTHER: - break; - } - return "???"; -} - -struct property *sym_get_choice_prop(struct symbol *sym) -{ - struct property *prop; - - for_all_choices(sym, prop) - return prop; - return NULL; -} - -struct property *sym_get_default_prop(struct symbol *sym) -{ - struct property *prop; - - for_all_defaults(sym, prop) { - prop->visible.tri = expr_calc_value(prop->visible.expr); - if (prop->visible.tri != no) - return prop; - } - return NULL; -} - -struct property *sym_get_range_prop(struct symbol *sym) -{ - struct property *prop; - - for_all_properties(sym, prop, P_RANGE) { - prop->visible.tri = expr_calc_value(prop->visible.expr); - if (prop->visible.tri != no) - return prop; - } - return NULL; -} - -static void sym_calc_visibility(struct symbol *sym) -{ - struct property *prop; - tristate tri; - - /* any prompt visible? */ - tri = no; - for_all_prompts(sym, prop) { - prop->visible.tri = expr_calc_value(prop->visible.expr); - tri = E_OR(tri, prop->visible.tri); - } - if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) - tri = yes; - if (sym->visible != tri) { - sym->visible = tri; - sym_set_changed(sym); - } - if (sym_is_choice_value(sym)) - return; - tri = no; - if (sym->rev_dep.expr) - tri = expr_calc_value(sym->rev_dep.expr); - if (tri == mod && sym_get_type(sym) == S_BOOLEAN) - tri = yes; - if (sym->rev_dep.tri != tri) { - sym->rev_dep.tri = tri; - sym_set_changed(sym); - } -} - -static struct symbol *sym_calc_choice(struct symbol *sym) -{ - struct symbol *def_sym; - struct property *prop; - struct expr *e; - - /* is the user choice visible? */ - def_sym = sym->user.val; - if (def_sym) { - sym_calc_visibility(def_sym); - if (def_sym->visible != no) - return def_sym; - } - - /* any of the defaults visible? */ - for_all_defaults(sym, prop) { - prop->visible.tri = expr_calc_value(prop->visible.expr); - if (prop->visible.tri == no) - continue; - def_sym = prop_get_symbol(prop); - sym_calc_visibility(def_sym); - if (def_sym->visible != no) - return def_sym; - } - - /* just get the first visible value */ - prop = sym_get_choice_prop(sym); - for (e = prop->expr; e; e = e->left.expr) { - def_sym = e->right.sym; - sym_calc_visibility(def_sym); - if (def_sym->visible != no) - return def_sym; - } - - /* no choice? reset tristate value */ - sym->curr.tri = no; - return NULL; -} - -void sym_calc_value(struct symbol *sym) -{ - struct symbol_value newval, oldval; - struct property *prop; - struct expr *e; - - if (!sym) - return; - - if (sym->flags & SYMBOL_VALID) - return; - sym->flags |= SYMBOL_VALID; - - oldval = sym->curr; - - switch (sym->type) { - case S_INT: - case S_HEX: - case S_STRING: - newval = symbol_empty.curr; - break; - case S_BOOLEAN: - case S_TRISTATE: - newval = symbol_no.curr; - break; - default: - sym->curr.val = sym->name; - sym->curr.tri = no; - return; - } - if (!sym_is_choice_value(sym)) - sym->flags &= ~SYMBOL_WRITE; - - sym_calc_visibility(sym); - - /* set default if recursively called */ - sym->curr = newval; - - switch (sym_get_type(sym)) { - case S_BOOLEAN: - case S_TRISTATE: - if (sym_is_choice_value(sym) && sym->visible == yes) { - prop = sym_get_choice_prop(sym); - newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; - } else if (E_OR(sym->visible, sym->rev_dep.tri) != no) { - sym->flags |= SYMBOL_WRITE; - if (sym_has_value(sym)) - newval.tri = sym->user.tri; - else if (!sym_is_choice(sym)) { - prop = sym_get_default_prop(sym); - if (prop) - newval.tri = expr_calc_value(prop->expr); - } - newval.tri = E_OR(E_AND(newval.tri, sym->visible), sym->rev_dep.tri); - } else if (!sym_is_choice(sym)) { - prop = sym_get_default_prop(sym); - if (prop) { - sym->flags |= SYMBOL_WRITE; - newval.tri = expr_calc_value(prop->expr); - } - } - if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) - newval.tri = yes; - break; - case S_STRING: - case S_HEX: - case S_INT: - if (sym->visible != no) { - sym->flags |= SYMBOL_WRITE; - if (sym_has_value(sym)) { - newval.val = sym->user.val; - break; - } - } - prop = sym_get_default_prop(sym); - if (prop) { - struct symbol *ds = prop_get_symbol(prop); - if (ds) { - sym->flags |= SYMBOL_WRITE; - sym_calc_value(ds); - newval.val = ds->curr.val; - } - } - break; - default: - ; - } - - sym->curr = newval; - if (sym_is_choice(sym) && newval.tri == yes) - sym->curr.val = sym_calc_choice(sym); - - if (memcmp(&oldval, &sym->curr, sizeof(oldval))) - sym_set_changed(sym); - if (modules_sym == sym) - modules_val = modules_sym->curr.tri; - - if (sym_is_choice(sym)) { - int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE); - prop = sym_get_choice_prop(sym); - for (e = prop->expr; e; e = e->left.expr) { - e->right.sym->flags |= flags; - if (flags & SYMBOL_CHANGED) - sym_set_changed(e->right.sym); - } - } -} - -void sym_clear_all_valid(void) -{ - struct symbol *sym; - int i; - - for_all_symbols(i, sym) - sym->flags &= ~SYMBOL_VALID; - sym_change_count++; - if (modules_sym) - sym_calc_value(modules_sym); -} - -void sym_set_changed(struct symbol *sym) -{ - struct property *prop; - - sym->flags |= SYMBOL_CHANGED; - for (prop = sym->prop; prop; prop = prop->next) { - if (prop->menu) - prop->menu->flags |= MENU_CHANGED; - } -} - -void sym_set_all_changed(void) -{ - struct symbol *sym; - int i; - - for_all_symbols(i, sym) - sym_set_changed(sym); -} - -bool sym_tristate_within_range(struct symbol *sym, tristate val) -{ - int type = sym_get_type(sym); - - if (sym->visible == no) - return false; - - if (type != S_BOOLEAN && type != S_TRISTATE) - return false; - - if (type == S_BOOLEAN && val == mod) - return false; - if (sym->visible <= sym->rev_dep.tri) - return false; - if (sym_is_choice_value(sym) && sym->visible == yes) - return val == yes; - return val >= sym->rev_dep.tri && val <= sym->visible; -} - -bool sym_set_tristate_value(struct symbol *sym, tristate val) -{ - tristate oldval = sym_get_tristate_value(sym); - - if (oldval != val && !sym_tristate_within_range(sym, val)) - return false; - - if (sym->flags & SYMBOL_NEW) { - sym->flags &= ~SYMBOL_NEW; - sym_set_changed(sym); - } - if (sym_is_choice_value(sym) && val == yes) { - struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); - - cs->user.val = sym; - cs->flags &= ~SYMBOL_NEW; - } - - sym->user.tri = val; - if (oldval != val) { - sym_clear_all_valid(); - if (sym == modules_sym) - sym_set_all_changed(); - } - - return true; -} - -tristate sym_toggle_tristate_value(struct symbol *sym) -{ - tristate oldval, newval; - - oldval = newval = sym_get_tristate_value(sym); - do { - switch (newval) { - case no: - newval = mod; - break; - case mod: - newval = yes; - break; - case yes: - newval = no; - break; - } - if (sym_set_tristate_value(sym, newval)) - break; - } while (oldval != newval); - return newval; -} - -bool sym_string_valid(struct symbol *sym, const char *str) -{ - char ch; - - switch (sym->type) { - case S_STRING: - return true; - case S_INT: - ch = *str++; - if (ch == '-') - ch = *str++; - if (!isdigit(ch)) - return false; - if (ch == '0' && *str != 0) - return false; - while ((ch = *str++)) { - if (!isdigit(ch)) - return false; - } - return true; - case S_HEX: - if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) - str += 2; - ch = *str++; - do { - if (!isxdigit(ch)) - return false; - } while ((ch = *str++)); - return true; - case S_BOOLEAN: - case S_TRISTATE: - switch (str[0]) { - case 'y': case 'Y': - case 'm': case 'M': - case 'n': case 'N': - return true; - } - return false; - default: - return false; - } -} - -bool sym_string_within_range(struct symbol *sym, const char *str) -{ - struct property *prop; - int val; - - switch (sym->type) { - case S_STRING: - return sym_string_valid(sym, str); - case S_INT: - if (!sym_string_valid(sym, str)) - return false; - prop = sym_get_range_prop(sym); - if (!prop) - return true; - val = strtol(str, NULL, 10); - return val >= strtol(prop->expr->left.sym->name, NULL, 10) && - val <= strtol(prop->expr->right.sym->name, NULL, 10); - case S_HEX: - if (!sym_string_valid(sym, str)) - return false; - prop = sym_get_range_prop(sym); - if (!prop) - return true; - val = strtol(str, NULL, 16); - return val >= strtol(prop->expr->left.sym->name, NULL, 16) && - val <= strtol(prop->expr->right.sym->name, NULL, 16); - case S_BOOLEAN: - case S_TRISTATE: - switch (str[0]) { - case 'y': case 'Y': - return sym_tristate_within_range(sym, yes); - case 'm': case 'M': - return sym_tristate_within_range(sym, mod); - case 'n': case 'N': - return sym_tristate_within_range(sym, no); - } - return false; - default: - return false; - } -} - -bool sym_set_string_value(struct symbol *sym, const char *newval) -{ - const char *oldval; - char *val; - int size; - - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - switch (newval[0]) { - case 'y': case 'Y': - return sym_set_tristate_value(sym, yes); - case 'm': case 'M': - return sym_set_tristate_value(sym, mod); - case 'n': case 'N': - return sym_set_tristate_value(sym, no); - } - return false; - default: - ; - } - - if (!sym_string_within_range(sym, newval)) - return false; - - if (sym->flags & SYMBOL_NEW) { - sym->flags &= ~SYMBOL_NEW; - sym_set_changed(sym); - } - - oldval = sym->user.val; - size = strlen(newval) + 1; - if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) { - size += 2; - sym->user.val = val = malloc(size); - *val++ = '0'; - *val++ = 'x'; - } else if (!oldval || strcmp(oldval, newval)) - sym->user.val = val = malloc(size); - else - return true; - - strcpy(val, newval); - free((void *)oldval); - sym_clear_all_valid(); - - return true; -} - -const char *sym_get_string_value(struct symbol *sym) -{ - tristate val; - - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - val = sym_get_tristate_value(sym); - switch (val) { - case no: - return "n"; - case mod: - return "m"; - case yes: - return "y"; - } - break; - default: - ; - } - return (const char *)sym->curr.val; -} - -bool sym_is_changable(struct symbol *sym) -{ - return sym->visible > sym->rev_dep.tri; -} - -struct symbol *sym_lookup(const char *name, int isconst) -{ - struct symbol *symbol; - const char *ptr; - char *new_name; - int hash = 0; - - if (name) { - if (name[0] && !name[1]) { - switch (name[0]) { - case 'y': return &symbol_yes; - case 'm': return &symbol_mod; - case 'n': return &symbol_no; - } - } - for (ptr = name; *ptr; ptr++) - hash += *ptr; - hash &= 0xff; - - for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { - if (!strcmp(symbol->name, name)) { - if ((isconst && symbol->flags & SYMBOL_CONST) || - (!isconst && !(symbol->flags & SYMBOL_CONST))) - return symbol; - } - } - new_name = strdup(name); - } else { - new_name = NULL; - hash = 256; - } - - symbol = malloc(sizeof(*symbol)); - memset(symbol, 0, sizeof(*symbol)); - symbol->name = new_name; - symbol->type = S_UNKNOWN; - symbol->flags = SYMBOL_NEW; - if (isconst) - symbol->flags |= SYMBOL_CONST; - - symbol->next = symbol_hash[hash]; - symbol_hash[hash] = symbol; - - return symbol; -} - -struct symbol *sym_find(const char *name) -{ - struct symbol *symbol = NULL; - const char *ptr; - int hash = 0; - - if (!name) - return NULL; - - if (name[0] && !name[1]) { - switch (name[0]) { - case 'y': return &symbol_yes; - case 'm': return &symbol_mod; - case 'n': return &symbol_no; - } - } - for (ptr = name; *ptr; ptr++) - hash += *ptr; - hash &= 0xff; - - for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { - if (!strcmp(symbol->name, name) && - !(symbol->flags & SYMBOL_CONST)) - break; - } - - return symbol; -} - -struct symbol *sym_check_deps(struct symbol *sym); - -static struct symbol *sym_check_expr_deps(struct expr *e) -{ - struct symbol *sym; - - if (!e) - return NULL; - switch (e->type) { - case E_OR: - case E_AND: - sym = sym_check_expr_deps(e->left.expr); - if (sym) - return sym; - return sym_check_expr_deps(e->right.expr); - case E_NOT: - return sym_check_expr_deps(e->left.expr); - case E_EQUAL: - case E_UNEQUAL: - sym = sym_check_deps(e->left.sym); - if (sym) - return sym; - return sym_check_deps(e->right.sym); - case E_SYMBOL: - return sym_check_deps(e->left.sym); - default: - break; - } - printf("Oops! How to check %d?\n", e->type); - return NULL; -} - -struct symbol *sym_check_deps(struct symbol *sym) -{ - struct symbol *sym2; - struct property *prop; - - if (sym->flags & SYMBOL_CHECK_DONE) - return NULL; - if (sym->flags & SYMBOL_CHECK) { - printf("Warning! Found recursive dependency: %s", sym->name); - return sym; - } - - sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); - sym2 = sym_check_expr_deps(sym->rev_dep.expr); - if (sym2) - goto out; - - for (prop = sym->prop; prop; prop = prop->next) { - if (prop->type == P_CHOICE || prop->type == P_SELECT) - continue; - sym2 = sym_check_expr_deps(prop->visible.expr); - if (sym2) - goto out; - if (prop->type != P_DEFAULT || sym_is_choice(sym)) - continue; - sym2 = sym_check_expr_deps(prop->expr); - if (sym2) - goto out; - } -out: - if (sym2) - printf(" %s", sym->name); - sym->flags &= ~SYMBOL_CHECK; - return sym2; -} - -struct property *prop_alloc(enum prop_type type, struct symbol *sym) -{ - struct property *prop; - struct property **propp; - - prop = malloc(sizeof(*prop)); - memset(prop, 0, sizeof(*prop)); - prop->type = type; - prop->sym = sym; - prop->file = current_file; - prop->lineno = zconf_lineno(); - - /* append property to the prop list of symbol */ - if (sym) { - for (propp = &sym->prop; *propp; propp = &(*propp)->next) - ; - *propp = prop; - } - - return prop; -} - -struct symbol *prop_get_symbol(struct property *prop) -{ - if (prop->expr && (prop->expr->type == E_SYMBOL || - prop->expr->type == E_CHOICE)) - return prop->expr->left.sym; - return NULL; -} - -const char *prop_get_type_name(enum prop_type type) -{ - switch (type) { - case P_PROMPT: - return "prompt"; - case P_COMMENT: - return "comment"; - case P_MENU: - return "menu"; - case P_DEFAULT: - return "default"; - case P_CHOICE: - return "choice"; - case P_SELECT: - return "select"; - case P_RANGE: - return "range"; - case P_UNKNOWN: - break; - } - return "unknown"; -} diff --git a/openwrt/package/config/textbox.c b/openwrt/package/config/textbox.c deleted file mode 100644 index a5a460b5cc6..00000000000 --- a/openwrt/package/config/textbox.c +++ /dev/null @@ -1,556 +0,0 @@ -/* - * textbox.c -- implements the text box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -static void back_lines (int n); -static void print_page (WINDOW * win, int height, int width); -static void print_line (WINDOW * win, int row, int width); -static char *get_line (void); -static void print_position (WINDOW * win, int height, int width); - -static int hscroll, fd, file_size, bytes_read; -static int begin_reached = 1, end_reached, page_length; -static char *buf, *page; - -/* - * Display text from a file in a dialog box. - */ -int -dialog_textbox (const char *title, const char *file, int height, int width) -{ - int i, x, y, cur_x, cur_y, fpos, key = 0; - int passed_end; - char search_term[MAX_LEN + 1]; - WINDOW *dialog, *text; - - search_term[0] = '\0'; /* no search term entered yet */ - - /* Open input file for reading */ - if ((fd = open (file, O_RDONLY)) == -1) { - endwin (); - fprintf (stderr, - "\nCan't open input file in dialog_textbox().\n"); - exit (-1); - } - /* Get file size. Actually, 'file_size' is the real file size - 1, - since it's only the last byte offset from the beginning */ - if ((file_size = lseek (fd, 0, SEEK_END)) == -1) { - endwin (); - fprintf (stderr, "\nError getting file size in dialog_textbox().\n"); - exit (-1); - } - /* Restore file pointer to beginning of file after getting file size */ - if (lseek (fd, 0, SEEK_SET) == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer in dialog_textbox().\n"); - exit (-1); - } - /* Allocate space for read buffer */ - if ((buf = malloc (BUF_SIZE + 1)) == NULL) { - endwin (); - fprintf (stderr, "\nCan't allocate memory in dialog_textbox().\n"); - exit (-1); - } - if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { - endwin (); - fprintf (stderr, "\nError reading file in dialog_textbox().\n"); - exit (-1); - } - buf[bytes_read] = '\0'; /* mark end of valid data */ - page = buf; /* page is pointer to start of page to be displayed */ - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - - draw_shadow (stdscr, y, x, height, width); - - dialog = newwin (height, width, y, x); - keypad (dialog, TRUE); - - /* Create window for text region, used for scrolling text */ - text = subwin (dialog, height - 4, width - 2, y + 1, x + 1); - wattrset (text, dialog_attr); - wbkgdset (text, dialog_attr & A_COLOR); - - keypad (text, TRUE); - - /* register the new window, along with its borders */ - draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); - - wattrset (dialog, border_attr); - mvwaddch (dialog, height-3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch (dialog, ACS_HLINE); - wattrset (dialog, dialog_attr); - wbkgdset (dialog, dialog_attr & A_COLOR); - waddch (dialog, ACS_RTEE); - - if (title != NULL && strlen(title) >= width-2 ) { - /* truncate long title -- mec */ - char * title2 = malloc(width-2+1); - memcpy( title2, title, width-2 ); - title2[width-2] = '\0'; - title = title2; - } - - if (title != NULL) { - wattrset (dialog, title_attr); - mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); - waddstr (dialog, (char *)title); - waddch (dialog, ' '); - } - print_button (dialog, " Exit ", height - 2, width / 2 - 4, TRUE); - wnoutrefresh (dialog); - getyx (dialog, cur_y, cur_x); /* Save cursor position */ - - /* Print first page of text */ - attr_clear (text, height - 4, width - 2, dialog_attr); - print_page (text, height - 4, width - 2); - print_position (dialog, height, width); - wmove (dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh (dialog); - - while ((key != ESC) && (key != '\n')) { - key = wgetch (dialog); - switch (key) { - case 'E': /* Exit */ - case 'e': - case 'X': - case 'x': - delwin (dialog); - free (buf); - close (fd); - return 0; - case 'g': /* First page */ - case KEY_HOME: - if (!begin_reached) { - begin_reached = 1; - /* First page not in buffer? */ - if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { - endwin (); - fprintf (stderr, - "\nError moving file pointer in dialog_textbox().\n"); - exit (-1); - } - if (fpos > bytes_read) { /* Yes, we have to read it in */ - if (lseek (fd, 0, SEEK_SET) == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer in " - "dialog_textbox().\n"); - exit (-1); - } - if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { - endwin (); - fprintf (stderr, - "\nError reading file in dialog_textbox().\n"); - exit (-1); - } - buf[bytes_read] = '\0'; - } - page = buf; - print_page (text, height - 4, width - 2); - print_position (dialog, height, width); - wmove (dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh (dialog); - } - break; - case 'G': /* Last page */ - case KEY_END: - - end_reached = 1; - /* Last page not in buffer? */ - if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { - endwin (); - fprintf (stderr, - "\nError moving file pointer in dialog_textbox().\n"); - exit (-1); - } - if (fpos < file_size) { /* Yes, we have to read it in */ - if (lseek (fd, -BUF_SIZE, SEEK_END) == -1) { - endwin (); - fprintf (stderr, - "\nError moving file pointer in dialog_textbox().\n"); - exit (-1); - } - if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { - endwin (); - fprintf (stderr, - "\nError reading file in dialog_textbox().\n"); - exit (-1); - } - buf[bytes_read] = '\0'; - } - page = buf + bytes_read; - back_lines (height - 4); - print_page (text, height - 4, width - 2); - print_position (dialog, height, width); - wmove (dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh (dialog); - break; - case 'K': /* Previous line */ - case 'k': - case KEY_UP: - if (!begin_reached) { - back_lines (page_length + 1); - - /* We don't call print_page() here but use scrolling to ensure - faster screen update. However, 'end_reached' and - 'page_length' should still be updated, and 'page' should - point to start of next page. This is done by calling - get_line() in the following 'for' loop. */ - scrollok (text, TRUE); - wscrl (text, -1); /* Scroll text region down one line */ - scrollok (text, FALSE); - page_length = 0; - passed_end = 0; - for (i = 0; i < height - 4; i++) { - if (!i) { - /* print first line of page */ - print_line (text, 0, width - 2); - wnoutrefresh (text); - } else - /* Called to update 'end_reached' and 'page' */ - get_line (); - if (!passed_end) - page_length++; - if (end_reached && !passed_end) - passed_end = 1; - } - - print_position (dialog, height, width); - wmove (dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh (dialog); - } - break; - case 'B': /* Previous page */ - case 'b': - case KEY_PPAGE: - if (begin_reached) - break; - back_lines (page_length + height - 4); - print_page (text, height - 4, width - 2); - print_position (dialog, height, width); - wmove (dialog, cur_y, cur_x); - wrefresh (dialog); - break; - case 'J': /* Next line */ - case 'j': - case KEY_DOWN: - if (!end_reached) { - begin_reached = 0; - scrollok (text, TRUE); - scroll (text); /* Scroll text region up one line */ - scrollok (text, FALSE); - print_line (text, height - 5, width - 2); - wnoutrefresh (text); - print_position (dialog, height, width); - wmove (dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh (dialog); - } - break; - case KEY_NPAGE: /* Next page */ - case ' ': - if (end_reached) - break; - - begin_reached = 0; - print_page (text, height - 4, width - 2); - print_position (dialog, height, width); - wmove (dialog, cur_y, cur_x); - wrefresh (dialog); - break; - case '0': /* Beginning of line */ - case 'H': /* Scroll left */ - case 'h': - case KEY_LEFT: - if (hscroll <= 0) - break; - - if (key == '0') - hscroll = 0; - else - hscroll--; - /* Reprint current page to scroll horizontally */ - back_lines (page_length); - print_page (text, height - 4, width - 2); - wmove (dialog, cur_y, cur_x); - wrefresh (dialog); - break; - case 'L': /* Scroll right */ - case 'l': - case KEY_RIGHT: - if (hscroll >= MAX_LEN) - break; - hscroll++; - /* Reprint current page to scroll horizontally */ - back_lines (page_length); - print_page (text, height - 4, width - 2); - wmove (dialog, cur_y, cur_x); - wrefresh (dialog); - break; - case ESC: - break; - } - } - - delwin (dialog); - free (buf); - close (fd); - return 1; /* ESC pressed */ -} - -/* - * Go back 'n' lines in text file. Called by dialog_textbox(). - * 'page' will be updated to point to the desired line in 'buf'. - */ -static void -back_lines (int n) -{ - int i, fpos; - - begin_reached = 0; - /* We have to distinguish between end_reached and !end_reached - since at end of file, the line is not ended by a '\n'. - The code inside 'if' basically does a '--page' to move one - character backward so as to skip '\n' of the previous line */ - if (!end_reached) { - /* Either beginning of buffer or beginning of file reached? */ - if (page == buf) { - if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer in " - "back_lines().\n"); - exit (-1); - } - if (fpos > bytes_read) { /* Not beginning of file yet */ - /* We've reached beginning of buffer, but not beginning of - file yet, so read previous part of file into buffer. - Note that we only move backward for BUF_SIZE/2 bytes, - but not BUF_SIZE bytes to avoid re-reading again in - print_page() later */ - /* Really possible to move backward BUF_SIZE/2 bytes? */ - if (fpos < BUF_SIZE / 2 + bytes_read) { - /* No, move less then */ - if (lseek (fd, 0, SEEK_SET) == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer in " - "back_lines().\n"); - exit (-1); - } - page = buf + fpos - bytes_read; - } else { /* Move backward BUF_SIZE/2 bytes */ - if (lseek (fd, -(BUF_SIZE / 2 + bytes_read), SEEK_CUR) - == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer " - "in back_lines().\n"); - exit (-1); - } - page = buf + BUF_SIZE / 2; - } - if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { - endwin (); - fprintf (stderr, "\nError reading file in back_lines().\n"); - exit (-1); - } - buf[bytes_read] = '\0'; - } else { /* Beginning of file reached */ - begin_reached = 1; - return; - } - } - if (*(--page) != '\n') { /* '--page' here */ - /* Something's wrong... */ - endwin (); - fprintf (stderr, "\nInternal error in back_lines().\n"); - exit (-1); - } - } - /* Go back 'n' lines */ - for (i = 0; i < n; i++) - do { - if (page == buf) { - if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { - endwin (); - fprintf (stderr, - "\nError moving file pointer in back_lines().\n"); - exit (-1); - } - if (fpos > bytes_read) { - /* Really possible to move backward BUF_SIZE/2 bytes? */ - if (fpos < BUF_SIZE / 2 + bytes_read) { - /* No, move less then */ - if (lseek (fd, 0, SEEK_SET) == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer " - "in back_lines().\n"); - exit (-1); - } - page = buf + fpos - bytes_read; - } else { /* Move backward BUF_SIZE/2 bytes */ - if (lseek (fd, -(BUF_SIZE / 2 + bytes_read), - SEEK_CUR) == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer" - " in back_lines().\n"); - exit (-1); - } - page = buf + BUF_SIZE / 2; - } - if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { - endwin (); - fprintf (stderr, "\nError reading file in " - "back_lines().\n"); - exit (-1); - } - buf[bytes_read] = '\0'; - } else { /* Beginning of file reached */ - begin_reached = 1; - return; - } - } - } while (*(--page) != '\n'); - page++; -} - -/* - * Print a new page of text. Called by dialog_textbox(). - */ -static void -print_page (WINDOW * win, int height, int width) -{ - int i, passed_end = 0; - - page_length = 0; - for (i = 0; i < height; i++) { - print_line (win, i, width); - if (!passed_end) - page_length++; - if (end_reached && !passed_end) - passed_end = 1; - } - wnoutrefresh (win); -} - -/* - * Print a new line of text. Called by dialog_textbox() and print_page(). - */ -static void -print_line (WINDOW * win, int row, int width) -{ - int y, x; - char *line; - - line = get_line (); - line += MIN (strlen (line), hscroll); /* Scroll horizontally */ - wmove (win, row, 0); /* move cursor to correct line */ - waddch (win, ' '); - waddnstr (win, line, MIN (strlen (line), width - 2)); - - getyx (win, y, x); - /* Clear 'residue' of previous line */ -#if OLD_NCURSES - { - int i; - for (i = 0; i < width - x; i++) - waddch (win, ' '); - } -#else - wclrtoeol(win); -#endif -} - -/* - * Return current line of text. Called by dialog_textbox() and print_line(). - * 'page' should point to start of current line before calling, and will be - * updated to point to start of next line. - */ -static char * -get_line (void) -{ - int i = 0, fpos; - static char line[MAX_LEN + 1]; - - end_reached = 0; - while (*page != '\n') { - if (*page == '\0') { - /* Either end of file or end of buffer reached */ - if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer in " - "get_line().\n"); - exit (-1); - } - if (fpos < file_size) { /* Not end of file yet */ - /* We've reached end of buffer, but not end of file yet, - so read next part of file into buffer */ - if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { - endwin (); - fprintf (stderr, "\nError reading file in get_line().\n"); - exit (-1); - } - buf[bytes_read] = '\0'; - page = buf; - } else { - if (!end_reached) - end_reached = 1; - break; - } - } else if (i < MAX_LEN) - line[i++] = *(page++); - else { - /* Truncate lines longer than MAX_LEN characters */ - if (i == MAX_LEN) - line[i++] = '\0'; - page++; - } - } - if (i <= MAX_LEN) - line[i] = '\0'; - if (!end_reached) - page++; /* move pass '\n' */ - - return line; -} - -/* - * Print current position - */ -static void -print_position (WINDOW * win, int height, int width) -{ - int fpos, percent; - - if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) { - endwin (); - fprintf (stderr, "\nError moving file pointer in print_position().\n"); - exit (-1); - } - wattrset (win, position_indicator_attr); - wbkgdset (win, position_indicator_attr & A_COLOR); - percent = !file_size ? - 100 : ((fpos - bytes_read + page - buf) * 100) / file_size; - wmove (win, height - 3, width - 9); - wprintw (win, "(%3d%%)", percent); -} diff --git a/openwrt/package/config/util.c b/openwrt/package/config/util.c deleted file mode 100644 index 0a2f8275700..00000000000 --- a/openwrt/package/config/util.c +++ /dev/null @@ -1,375 +0,0 @@ -/* - * util.c - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - - -/* use colors by default? */ -bool use_colors = 1; - -char *backtitle = NULL; - -const char *dialog_result; - -/* - * Attribute values, default is for mono display - */ -chtype attributes[] = -{ - A_NORMAL, /* screen_attr */ - A_NORMAL, /* shadow_attr */ - A_NORMAL, /* dialog_attr */ - A_BOLD, /* title_attr */ - A_NORMAL, /* border_attr */ - A_REVERSE, /* button_active_attr */ - A_DIM, /* button_inactive_attr */ - A_REVERSE, /* button_key_active_attr */ - A_BOLD, /* button_key_inactive_attr */ - A_REVERSE, /* button_label_active_attr */ - A_NORMAL, /* button_label_inactive_attr */ - A_NORMAL, /* inputbox_attr */ - A_NORMAL, /* inputbox_border_attr */ - A_NORMAL, /* searchbox_attr */ - A_BOLD, /* searchbox_title_attr */ - A_NORMAL, /* searchbox_border_attr */ - A_BOLD, /* position_indicator_attr */ - A_NORMAL, /* menubox_attr */ - A_NORMAL, /* menubox_border_attr */ - A_NORMAL, /* item_attr */ - A_REVERSE, /* item_selected_attr */ - A_BOLD, /* tag_attr */ - A_REVERSE, /* tag_selected_attr */ - A_BOLD, /* tag_key_attr */ - A_REVERSE, /* tag_key_selected_attr */ - A_BOLD, /* check_attr */ - A_REVERSE, /* check_selected_attr */ - A_BOLD, /* uarrow_attr */ - A_BOLD /* darrow_attr */ -}; - - -#include "colors.h" - -/* - * Table of color values - */ -int color_table[][3] = -{ - {SCREEN_FG, SCREEN_BG, SCREEN_HL}, - {SHADOW_FG, SHADOW_BG, SHADOW_HL}, - {DIALOG_FG, DIALOG_BG, DIALOG_HL}, - {TITLE_FG, TITLE_BG, TITLE_HL}, - {BORDER_FG, BORDER_BG, BORDER_HL}, - {BUTTON_ACTIVE_FG, BUTTON_ACTIVE_BG, BUTTON_ACTIVE_HL}, - {BUTTON_INACTIVE_FG, BUTTON_INACTIVE_BG, BUTTON_INACTIVE_HL}, - {BUTTON_KEY_ACTIVE_FG, BUTTON_KEY_ACTIVE_BG, BUTTON_KEY_ACTIVE_HL}, - {BUTTON_KEY_INACTIVE_FG, BUTTON_KEY_INACTIVE_BG, BUTTON_KEY_INACTIVE_HL}, - {BUTTON_LABEL_ACTIVE_FG, BUTTON_LABEL_ACTIVE_BG, BUTTON_LABEL_ACTIVE_HL}, - {BUTTON_LABEL_INACTIVE_FG, BUTTON_LABEL_INACTIVE_BG, - BUTTON_LABEL_INACTIVE_HL}, - {INPUTBOX_FG, INPUTBOX_BG, INPUTBOX_HL}, - {INPUTBOX_BORDER_FG, INPUTBOX_BORDER_BG, INPUTBOX_BORDER_HL}, - {SEARCHBOX_FG, SEARCHBOX_BG, SEARCHBOX_HL}, - {SEARCHBOX_TITLE_FG, SEARCHBOX_TITLE_BG, SEARCHBOX_TITLE_HL}, - {SEARCHBOX_BORDER_FG, SEARCHBOX_BORDER_BG, SEARCHBOX_BORDER_HL}, - {POSITION_INDICATOR_FG, POSITION_INDICATOR_BG, POSITION_INDICATOR_HL}, - {MENUBOX_FG, MENUBOX_BG, MENUBOX_HL}, - {MENUBOX_BORDER_FG, MENUBOX_BORDER_BG, MENUBOX_BORDER_HL}, - {ITEM_FG, ITEM_BG, ITEM_HL}, - {ITEM_SELECTED_FG, ITEM_SELECTED_BG, ITEM_SELECTED_HL}, - {TAG_FG, TAG_BG, TAG_HL}, - {TAG_SELECTED_FG, TAG_SELECTED_BG, TAG_SELECTED_HL}, - {TAG_KEY_FG, TAG_KEY_BG, TAG_KEY_HL}, - {TAG_KEY_SELECTED_FG, TAG_KEY_SELECTED_BG, TAG_KEY_SELECTED_HL}, - {CHECK_FG, CHECK_BG, CHECK_HL}, - {CHECK_SELECTED_FG, CHECK_SELECTED_BG, CHECK_SELECTED_HL}, - {UARROW_FG, UARROW_BG, UARROW_HL}, - {DARROW_FG, DARROW_BG, DARROW_HL}, -}; /* color_table */ - -/* - * Set window to attribute 'attr' - */ -void -attr_clear (WINDOW * win, int height, int width, chtype attr) -{ - int i, j; - - wattrset (win, attr); - for (i = 0; i < height; i++) { - wmove (win, i, 0); - for (j = 0; j < width; j++) - waddch (win, ' '); - } - touchwin (win); -} - -void dialog_clear (void) -{ - attr_clear (stdscr, LINES, COLS, screen_attr); - /* Display background title if it exists ... - SLH */ - if (backtitle != NULL) { - int i; - - wattrset (stdscr, screen_attr); - mvwaddstr (stdscr, 0, 1, (char *)backtitle); - wmove (stdscr, 1, 1); - for (i = 1; i < COLS - 1; i++) - waddch (stdscr, ACS_HLINE); - } - wnoutrefresh (stdscr); -} - -/* - * Do some initialization for dialog - */ -void -init_dialog (void) -{ - initscr (); /* Init curses */ - keypad (stdscr, TRUE); - cbreak (); - noecho (); - - - if (use_colors) /* Set up colors */ - color_setup (); - - - dialog_clear (); -} - -/* - * Setup for color display - */ -void -color_setup (void) -{ - int i; - - if (has_colors ()) { /* Terminal supports color? */ - start_color (); - - /* Initialize color pairs */ - for (i = 0; i < ATTRIBUTE_COUNT; i++) - init_pair (i + 1, color_table[i][0], color_table[i][1]); - - /* Setup color attributes */ - for (i = 0; i < ATTRIBUTE_COUNT; i++) - attributes[i] = C_ATTR (color_table[i][2], i + 1); - } -} - -/* - * End using dialog functions. - */ -void -end_dialog (void) -{ - endwin (); -} - - -/* - * Print a string of text in a window, automatically wrap around to the - * next line if the string is too long to fit on one line. Newline - * characters '\n' are replaced by spaces. We start on a new line - * if there is no room for at least 4 nonblanks following a double-space. - */ -void -print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x) -{ - int newl, cur_x, cur_y; - int i, prompt_len, room, wlen; - char tempstr[MAX_LEN + 1], *word, *sp, *sp2; - - strcpy (tempstr, prompt); - - prompt_len = strlen(tempstr); - - /* - * Remove newlines - */ - for(i=0; i<prompt_len; i++) { - if(tempstr[i] == '\n') tempstr[i] = ' '; - } - - if (prompt_len <= width - x * 2) { /* If prompt is short */ - wmove (win, y, (width - prompt_len) / 2); - waddstr (win, tempstr); - } else { - cur_x = x; - cur_y = y; - newl = 1; - word = tempstr; - while (word && *word) { - sp = index(word, ' '); - if (sp) - *sp++ = 0; - - /* Wrap to next line if either the word does not fit, - or it is the first word of a new sentence, and it is - short, and the next word does not fit. */ - room = width - cur_x; - wlen = strlen(word); - if (wlen > room || - (newl && wlen < 4 && sp && wlen+1+strlen(sp) > room - && (!(sp2 = index(sp, ' ')) || wlen+1+(sp2-sp) > room))) { - cur_y++; - cur_x = x; - } - wmove (win, cur_y, cur_x); - waddstr (win, word); - getyx (win, cur_y, cur_x); - cur_x++; - if (sp && *sp == ' ') { - cur_x++; /* double space */ - while (*++sp == ' '); - newl = 1; - } else - newl = 0; - word = sp; - } - } -} - -/* - * Print a button - */ -void -print_button (WINDOW * win, const char *label, int y, int x, int selected) -{ - int i, temp; - - wmove (win, y, x); - wattrset (win, selected ? button_active_attr : button_inactive_attr); - waddstr (win, "<"); - temp = strspn (label, " "); - label += temp; - wattrset (win, selected ? button_label_active_attr - : button_label_inactive_attr); - for (i = 0; i < temp; i++) - waddch (win, ' '); - wattrset (win, selected ? button_key_active_attr - : button_key_inactive_attr); - waddch (win, label[0]); - wattrset (win, selected ? button_label_active_attr - : button_label_inactive_attr); - waddstr (win, (char *)label + 1); - wattrset (win, selected ? button_active_attr : button_inactive_attr); - waddstr (win, ">"); - wmove (win, y, x + temp + 1); -} - -/* - * Draw a rectangular box with line drawing characters - */ -void -draw_box (WINDOW * win, int y, int x, int height, int width, - chtype box, chtype border) -{ - int i, j; - - wattrset (win, 0); - for (i = 0; i < height; i++) { - wmove (win, y + i, x); - for (j = 0; j < width; j++) - if (!i && !j) - waddch (win, border | ACS_ULCORNER); - else if (i == height - 1 && !j) - waddch (win, border | ACS_LLCORNER); - else if (!i && j == width - 1) - waddch (win, box | ACS_URCORNER); - else if (i == height - 1 && j == width - 1) - waddch (win, box | ACS_LRCORNER); - else if (!i) - waddch (win, border | ACS_HLINE); - else if (i == height - 1) - waddch (win, box | ACS_HLINE); - else if (!j) - waddch (win, border | ACS_VLINE); - else if (j == width - 1) - waddch (win, box | ACS_VLINE); - else - waddch (win, box | ' '); - } -} - -/* - * Draw shadows along the right and bottom edge to give a more 3D look - * to the boxes - */ -void -draw_shadow (WINDOW * win, int y, int x, int height, int width) -{ - int i; - - if (has_colors ()) { /* Whether terminal supports color? */ - wattrset (win, shadow_attr); - wmove (win, y + height, x + 2); - for (i = 0; i < width; i++) - waddch (win, winch (win) & A_CHARTEXT); - for (i = y + 1; i < y + height + 1; i++) { - wmove (win, i, x + width); - waddch (win, winch (win) & A_CHARTEXT); - waddch (win, winch (win) & A_CHARTEXT); - } - wnoutrefresh (win); - } -} - -/* - * Return the position of the first alphabetic character in a string. - */ -int -first_alpha(const char *string, const char *exempt) -{ - int i, in_paren=0, c; - - for (i = 0; i < strlen(string); i++) { - c = tolower(string[i]); - - if (strchr("<[(", c)) ++in_paren; - if (strchr(">])", c) && in_paren > 0) --in_paren; - - if ((! in_paren) && isalpha(c) && - strchr(exempt, c) == 0) - return i; - } - - return 0; -} - -/* - * Get the first selected item in the dialog_list_item list. - */ -struct dialog_list_item * -first_sel_item(int item_no, struct dialog_list_item ** items) -{ - int i; - - for (i = 0; i < item_no; i++) { - if (items[i]->selected) - return items[i]; - } - - return NULL; -} diff --git a/openwrt/package/config/yesno.c b/openwrt/package/config/yesno.c deleted file mode 100644 index 11fcc25f515..00000000000 --- a/openwrt/package/config/yesno.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * yesno.c -- implements the yes/no box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -/* - * Display termination buttons - */ -static void -print_buttons(WINDOW *dialog, int height, int width, int selected) -{ - int x = width / 2 - 10; - int y = height - 2; - - print_button (dialog, " Yes ", y, x, selected == 0); - print_button (dialog, " No ", y, x + 13, selected == 1); - - wmove(dialog, y, x+1 + 13*selected ); - wrefresh (dialog); -} - -/* - * Display a dialog box with two buttons - Yes and No - */ -int -dialog_yesno (const char *title, const char *prompt, int height, int width) -{ - int i, x, y, key = 0, button = 0; - WINDOW *dialog; - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow (stdscr, y, x, height, width); - - dialog = newwin (height, width, y, x); - keypad (dialog, TRUE); - - draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr); - wattrset (dialog, border_attr); - mvwaddch (dialog, height-3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch (dialog, ACS_HLINE); - wattrset (dialog, dialog_attr); - waddch (dialog, ACS_RTEE); - - if (title != NULL && strlen(title) >= width-2 ) { - /* truncate long title -- mec */ - char * title2 = malloc(width-2+1); - memcpy( title2, title, width-2 ); - title2[width-2] = '\0'; - title = title2; - } - - if (title != NULL) { - wattrset (dialog, title_attr); - mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); - waddstr (dialog, (char *)title); - waddch (dialog, ' '); - } - - wattrset (dialog, dialog_attr); - print_autowrap (dialog, prompt, width - 2, 1, 3); - - print_buttons(dialog, height, width, 0); - - while (key != ESC) { - key = wgetch (dialog); - switch (key) { - case 'Y': - case 'y': - delwin (dialog); - return 0; - case 'N': - case 'n': - delwin (dialog); - return 1; - - case TAB: - case KEY_LEFT: - case KEY_RIGHT: - button = ((key == KEY_LEFT ? --button : ++button) < 0) - ? 1 : (button > 1 ? 0 : button); - - print_buttons(dialog, height, width, button); - wrefresh (dialog); - break; - case ' ': - case '\n': - delwin (dialog); - return button; - case ESC: - break; - } - } - - delwin (dialog); - return -1; /* ESC pressed */ -} diff --git a/openwrt/package/config/zconf.l b/openwrt/package/config/zconf.l deleted file mode 100644 index 3a4947a88af..00000000000 --- a/openwrt/package/config/zconf.l +++ /dev/null @@ -1,387 +0,0 @@ -%option backup nostdinit noyywrap never-interactive full ecs -%option 8bit backup nodefault perf-report perf-report -%x COMMAND HELP STRING PARAM -%{ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <glob.h> - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define START_STRSIZE 16 - -char *text; -static char *text_ptr; -static int text_size, text_asize; - -struct buffer { - struct buffer *parent; - YY_BUFFER_STATE state; -}; - -struct buffer *current_buf; - -static int last_ts, first_ts; - -static void zconf_endhelp(void); -static struct buffer *zconf_endfile(void); - -void new_string(void) -{ - text = malloc(START_STRSIZE); - text_asize = START_STRSIZE; - text_ptr = text; - text_size = 0; - *text_ptr = 0; -} - -void append_string(const char *str, int size) -{ - int new_size = text_size + size + 1; - if (new_size > text_asize) { - text = realloc(text, new_size); - text_asize = new_size; - text_ptr = text + text_size; - } - memcpy(text_ptr, str, size); - text_ptr += size; - text_size += size; - *text_ptr = 0; -} - -void alloc_string(const char *str, int size) -{ - text = malloc(size + 1); - memcpy(text, str, size); - text[size] = 0; -} -%} - -ws [ \n\t] -n [A-Za-z0-9_] - -%% - int str = 0; - int ts, i; - -[ \t]*#.*\n current_file->lineno++; -[ \t]*#.* - -[ \t]*\n current_file->lineno++; return T_EOL; - -[ \t]+ { - BEGIN(COMMAND); -} - -. { - unput(yytext[0]); - BEGIN(COMMAND); -} - - -<COMMAND>{ - "mainmenu" BEGIN(PARAM); return T_MAINMENU; - "menu" BEGIN(PARAM); return T_MENU; - "endmenu" BEGIN(PARAM); return T_ENDMENU; - "source" BEGIN(PARAM); return T_SOURCE; - "choice" BEGIN(PARAM); return T_CHOICE; - "endchoice" BEGIN(PARAM); return T_ENDCHOICE; - "comment" BEGIN(PARAM); return T_COMMENT; - "config" BEGIN(PARAM); return T_CONFIG; - "menuconfig" BEGIN(PARAM); return T_MENUCONFIG; - "help" BEGIN(PARAM); return T_HELP; - "if" BEGIN(PARAM); return T_IF; - "endif" BEGIN(PARAM); return T_ENDIF; - "depends" BEGIN(PARAM); return T_DEPENDS; - "requires" BEGIN(PARAM); return T_REQUIRES; - "optional" BEGIN(PARAM); return T_OPTIONAL; - "default" BEGIN(PARAM); return T_DEFAULT; - "prompt" BEGIN(PARAM); return T_PROMPT; - "tristate" BEGIN(PARAM); return T_TRISTATE; - "def_tristate" BEGIN(PARAM); return T_DEF_TRISTATE; - "bool" BEGIN(PARAM); return T_BOOLEAN; - "boolean" BEGIN(PARAM); return T_BOOLEAN; - "def_bool" BEGIN(PARAM); return T_DEF_BOOLEAN; - "def_boolean" BEGIN(PARAM); return T_DEF_BOOLEAN; - "int" BEGIN(PARAM); return T_INT; - "hex" BEGIN(PARAM); return T_HEX; - "string" BEGIN(PARAM); return T_STRING; - "select" BEGIN(PARAM); return T_SELECT; - "enable" BEGIN(PARAM); return T_SELECT; - "range" BEGIN(PARAM); return T_RANGE; - {n}+ { - alloc_string(yytext, yyleng); - zconflval.string = text; - return T_WORD; - } - . - \n current_file->lineno++; BEGIN(INITIAL); -} - -<PARAM>{ - "&&" return T_AND; - "||" return T_OR; - "(" return T_OPEN_PAREN; - ")" return T_CLOSE_PAREN; - "!" return T_NOT; - "=" return T_EQUAL; - "!=" return T_UNEQUAL; - "if" return T_IF; - "on" return T_ON; - \"|\' { - str = yytext[0]; - new_string(); - BEGIN(STRING); - } - \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; - --- /* ignore */ - ({n}|[-/.])+ { - alloc_string(yytext, yyleng); - zconflval.string = text; - return T_WORD; - } - #.* /* comment */ - \\\n current_file->lineno++; - . - <<EOF>> { - BEGIN(INITIAL); - } -} - -<STRING>{ - [^'"\\\n]+/\n { - append_string(yytext, yyleng); - zconflval.string = text; - return T_WORD_QUOTE; - } - [^'"\\\n]+ { - append_string(yytext, yyleng); - } - \\.?/\n { - append_string(yytext + 1, yyleng - 1); - zconflval.string = text; - return T_WORD_QUOTE; - } - \\.? { - append_string(yytext + 1, yyleng - 1); - } - \'|\" { - if (str == yytext[0]) { - BEGIN(PARAM); - zconflval.string = text; - return T_WORD_QUOTE; - } else - append_string(yytext, 1); - } - \n { - printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); - current_file->lineno++; - BEGIN(INITIAL); - return T_EOL; - } - <<EOF>> { - BEGIN(INITIAL); - } -} - -<HELP>{ - [ \t]+ { - ts = 0; - for (i = 0; i < yyleng; i++) { - if (yytext[i] == '\t') - ts = (ts & ~7) + 8; - else - ts++; - } - last_ts = ts; - if (first_ts) { - if (ts < first_ts) { - zconf_endhelp(); - return T_HELPTEXT; - } - ts -= first_ts; - while (ts > 8) { - append_string(" ", 8); - ts -= 8; - } - append_string(" ", ts); - } - } - [ \t]*\n/[^ \t\n] { - current_file->lineno++; - zconf_endhelp(); - return T_HELPTEXT; - } - [ \t]*\n { - current_file->lineno++; - append_string("\n", 1); - } - [^ \t\n].* { - append_string(yytext, yyleng); - if (!first_ts) - first_ts = last_ts; - } - <<EOF>> { - zconf_endhelp(); - return T_HELPTEXT; - } -} - -<<EOF>> { - if (current_buf) { - zconf_endfile(); - return T_EOF; - } - fclose(yyin); - yyterminate(); -} - -%% -void zconf_starthelp(void) -{ - new_string(); - last_ts = first_ts = 0; - BEGIN(HELP); -} - -static void zconf_endhelp(void) -{ - zconflval.string = text; - BEGIN(INITIAL); -} - - -/* - * Try to open specified file with following names: - * ./name - * $(srctree)/name - * The latter is used when srctree is separate from objtree - * when compiling the kernel. - * Return NULL if file is not found. - */ -FILE *zconf_fopen(const char *name) -{ - char *env, fullname[PATH_MAX+1]; - FILE *f; - - f = fopen(name, "r"); - if (!f && name[0] != '/') { - env = getenv(SRCTREE); - if (env) { - sprintf(fullname, "%s/%s", env, name); - f = fopen(fullname, "r"); - } - } - return f; -} - -void zconf_initscan(const char *name) -{ - yyin = zconf_fopen(name); - if (!yyin) { - printf("can't find file %s\n", name); - exit(1); - } - - current_buf = malloc(sizeof(*current_buf)); - memset(current_buf, 0, sizeof(*current_buf)); - - current_file = file_lookup(name); - current_file->lineno = 1; - current_file->flags = FILE_BUSY; -} - -void zconf_nextfile(const char *name) -{ - size_t i; - int retval; - glob_t files; - char *filename; - struct file *file; - struct buffer *buf; - - retval = glob(name, GLOB_ERR | GLOB_MARK, NULL, &files); - if (retval == GLOB_NOSPACE || retval == GLOB_ABORTED || retval == GLOB_NOMATCH) { - printf("%s:%d: glob failed: %s \"%s\"\n", zconf_curname(), zconf_lineno(), - retval == GLOB_NOSPACE ? "failed to allocate memory" : - retval == GLOB_ABORTED ? "read error" : "no match", - name); - exit(1); - } - - for (i = files.gl_pathc-1; i != (size_t)-1; --i) { - filename = files.gl_pathv[i]; - - file = file_lookup(filename); - buf = malloc(sizeof(*buf)); - memset(buf, 0, sizeof(*buf)); - current_buf->state = YY_CURRENT_BUFFER; - zconfin = zconf_fopen(filename); - if (!zconfin) { - printf("%s:%d: can't open file \"%s\"\n", - zconf_curname(), zconf_lineno(), filename); - exit(1); - } - zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); - buf->parent = current_buf; - current_buf = buf; - - if (file->flags & FILE_BUSY) { - printf("recursive scan (%s)?\n", filename); - exit(1); - } - if (file->flags & FILE_SCANNED) { - printf("file %s already scanned?\n", filename); - exit(1); - } - file->flags |= FILE_BUSY; - file->lineno = 1; - file->parent = current_file; - current_file = file; - } -} - -static struct buffer *zconf_endfile(void) -{ - struct buffer *parent; - - current_file->flags |= FILE_SCANNED; - current_file->flags &= ~FILE_BUSY; - current_file = current_file->parent; - - parent = current_buf->parent; - if (parent) { - fclose(yyin); - yy_delete_buffer(YY_CURRENT_BUFFER); - yy_switch_to_buffer(parent->state); - } - free(current_buf); - current_buf = parent; - - return parent; -} - -int zconf_lineno(void) -{ - if (current_buf) - return current_file->lineno - 1; - else - return 0; -} - -char *zconf_curname(void) -{ - if (current_buf) - return current_file->name; - else - return "<none>"; -} diff --git a/openwrt/package/config/zconf.tab.c_shipped b/openwrt/package/config/zconf.tab.c_shipped deleted file mode 100644 index 83dbf9ed57b..00000000000 --- a/openwrt/package/config/zconf.tab.c_shipped +++ /dev/null @@ -1,2127 +0,0 @@ -/* A Bison parser, made by GNU Bison 1.875a. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - - 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, 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. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* If NAME_PREFIX is specified substitute the variables and functions - names. */ -#define yyparse zconfparse -#define yylex zconflex -#define yyerror zconferror -#define yylval zconflval -#define yychar zconfchar -#define yydebug zconfdebug -#define yynerrs zconfnerrs - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_MAINMENU = 258, - T_MENU = 259, - T_ENDMENU = 260, - T_SOURCE = 261, - T_CHOICE = 262, - T_ENDCHOICE = 263, - T_COMMENT = 264, - T_CONFIG = 265, - T_MENUCONFIG = 266, - T_HELP = 267, - T_HELPTEXT = 268, - T_IF = 269, - T_ENDIF = 270, - T_DEPENDS = 271, - T_REQUIRES = 272, - T_OPTIONAL = 273, - T_PROMPT = 274, - T_DEFAULT = 275, - T_TRISTATE = 276, - T_DEF_TRISTATE = 277, - T_BOOLEAN = 278, - T_DEF_BOOLEAN = 279, - T_STRING = 280, - T_INT = 281, - T_HEX = 282, - T_WORD = 283, - T_WORD_QUOTE = 284, - T_UNEQUAL = 285, - T_EOF = 286, - T_EOL = 287, - T_CLOSE_PAREN = 288, - T_OPEN_PAREN = 289, - T_ON = 290, - T_SELECT = 291, - T_RANGE = 292, - T_OR = 293, - T_AND = 294, - T_EQUAL = 295, - T_NOT = 296 - }; -#endif -#define T_MAINMENU 258 -#define T_MENU 259 -#define T_ENDMENU 260 -#define T_SOURCE 261 -#define T_CHOICE 262 -#define T_ENDCHOICE 263 -#define T_COMMENT 264 -#define T_CONFIG 265 -#define T_MENUCONFIG 266 -#define T_HELP 267 -#define T_HELPTEXT 268 -#define T_IF 269 -#define T_ENDIF 270 -#define T_DEPENDS 271 -#define T_REQUIRES 272 -#define T_OPTIONAL 273 -#define T_PROMPT 274 -#define T_DEFAULT 275 -#define T_TRISTATE 276 -#define T_DEF_TRISTATE 277 -#define T_BOOLEAN 278 -#define T_DEF_BOOLEAN 279 -#define T_STRING 280 -#define T_INT 281 -#define T_HEX 282 -#define T_WORD 283 -#define T_WORD_QUOTE 284 -#define T_UNEQUAL 285 -#define T_EOF 286 -#define T_EOL 287 -#define T_CLOSE_PAREN 288 -#define T_OPEN_PAREN 289 -#define T_ON 290 -#define T_SELECT 291 -#define T_RANGE 292 -#define T_OR 293 -#define T_AND 294 -#define T_EQUAL 295 -#define T_NOT 296 - - - - -/* Copy the first part of user declarations. */ - - -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <ctype.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdbool.h> - -#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) - -#define PRINTD 0x0001 -#define DEBUG_PARSE 0x0002 - -int cdebug = PRINTD; - -extern int zconflex(void); -static void zconfprint(const char *err, ...); -static void zconferror(const char *err); -static bool zconf_endtoken(int token, int starttoken, int endtoken); - -struct symbol *symbol_hash[257]; - -#define YYERROR_VERBOSE - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) - -typedef union YYSTYPE { - int token; - char *string; - struct symbol *symbol; - struct expr *expr; - struct menu *menu; -} YYSTYPE; -/* Line 191 of yacc.c. */ - -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -/* Copy the second part of user declarations. */ - - -#define LKC_DIRECT_LINK -#include "lkc.h" - - -/* Line 214 of yacc.c. */ - - -#if ! defined (yyoverflow) || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -# define YYSTACK_ALLOC malloc -# define YYSTACK_FREE free -# endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ - - -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - short yyss; - YYSTYPE yyvs; - }; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - register YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 2 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 201 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 42 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 41 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 104 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 182 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 296 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned short yyprhs[] = -{ - 0, 0, 3, 4, 7, 9, 11, 13, 17, 19, - 21, 23, 26, 28, 30, 32, 34, 36, 38, 42, - 45, 49, 52, 53, 56, 59, 62, 65, 69, 74, - 78, 83, 87, 91, 95, 100, 105, 110, 116, 119, - 122, 124, 128, 131, 132, 135, 138, 141, 144, 149, - 153, 157, 160, 165, 166, 169, 173, 175, 179, 182, - 183, 186, 189, 192, 196, 199, 201, 205, 208, 209, - 212, 215, 218, 222, 226, 228, 232, 235, 238, 241, - 242, 245, 248, 253, 257, 261, 262, 265, 267, 269, - 272, 275, 278, 280, 282, 283, 286, 288, 292, 296, - 300, 303, 307, 311, 313 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = -{ - 43, 0, -1, -1, 43, 44, -1, 45, -1, 55, - -1, 66, -1, 3, 77, 79, -1, 5, -1, 15, - -1, 8, -1, 1, 79, -1, 61, -1, 71, -1, - 47, -1, 49, -1, 69, -1, 79, -1, 10, 28, - 32, -1, 46, 50, -1, 11, 28, 32, -1, 48, - 50, -1, -1, 50, 51, -1, 50, 75, -1, 50, - 73, -1, 50, 32, -1, 21, 76, 32, -1, 22, - 81, 80, 32, -1, 23, 76, 32, -1, 24, 81, - 80, 32, -1, 26, 76, 32, -1, 27, 76, 32, - -1, 25, 76, 32, -1, 19, 77, 80, 32, -1, - 20, 81, 80, 32, -1, 36, 28, 80, 32, -1, - 37, 82, 82, 80, 32, -1, 7, 32, -1, 52, - 56, -1, 78, -1, 53, 58, 54, -1, 53, 58, - -1, -1, 56, 57, -1, 56, 75, -1, 56, 73, - -1, 56, 32, -1, 19, 77, 80, 32, -1, 21, - 76, 32, -1, 23, 76, 32, -1, 18, 32, -1, - 20, 28, 80, 32, -1, -1, 58, 45, -1, 14, - 81, 32, -1, 78, -1, 59, 62, 60, -1, 59, - 62, -1, -1, 62, 45, -1, 62, 66, -1, 62, - 55, -1, 4, 77, 32, -1, 63, 74, -1, 78, - -1, 64, 67, 65, -1, 64, 67, -1, -1, 67, - 45, -1, 67, 66, -1, 67, 55, -1, 67, 1, - 32, -1, 6, 77, 32, -1, 68, -1, 9, 77, - 32, -1, 70, 74, -1, 12, 32, -1, 72, 13, - -1, -1, 74, 75, -1, 74, 32, -1, 16, 35, - 81, 32, -1, 16, 81, 32, -1, 17, 81, 32, - -1, -1, 77, 80, -1, 28, -1, 29, -1, 5, - 79, -1, 8, 79, -1, 15, 79, -1, 32, -1, - 31, -1, -1, 14, 81, -1, 82, -1, 82, 40, - 82, -1, 82, 30, 82, -1, 34, 81, 33, -1, - 41, 81, -1, 81, 38, 81, -1, 81, 39, 81, - -1, 28, -1, 29, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short yyrline[] = -{ - 0, 94, 94, 95, 98, 99, 100, 101, 102, 103, - 104, 105, 109, 110, 111, 112, 113, 114, 120, 128, - 134, 142, 152, 154, 155, 156, 157, 160, 166, 173, - 179, 186, 192, 198, 204, 210, 216, 222, 230, 239, - 245, 254, 255, 261, 263, 264, 265, 266, 269, 275, - 281, 287, 293, 299, 301, 306, 315, 324, 325, 331, - 333, 334, 335, 340, 347, 353, 362, 363, 369, 371, - 372, 373, 374, 377, 383, 390, 397, 404, 410, 417, - 418, 419, 422, 427, 432, 440, 442, 447, 448, 451, - 452, 453, 457, 457, 459, 460, 463, 464, 465, 466, - 467, 468, 469, 472, 473 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", - "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", - "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", - "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE", - "T_DEF_TRISTATE", "T_BOOLEAN", "T_DEF_BOOLEAN", "T_STRING", "T_INT", - "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", "T_EOF", "T_EOL", - "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_SELECT", "T_RANGE", "T_OR", - "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block", - "common_block", "config_entry_start", "config_stmt", - "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", - "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", - "choice_option_list", "choice_option", "choice_block", "if", "if_end", - "if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt", - "menu_block", "source", "source_stmt", "comment", "comment_stmt", - "help_start", "help", "depends_list", "depends", "prompt_stmt_opt", - "prompt", "end", "nl_or_eof", "if_expr", "expr", "symbol", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 42, 43, 43, 44, 44, 44, 44, 44, 44, - 44, 44, 45, 45, 45, 45, 45, 45, 46, 47, - 48, 49, 50, 50, 50, 50, 50, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 52, 53, - 54, 55, 55, 56, 56, 56, 56, 56, 57, 57, - 57, 57, 57, 58, 58, 59, 60, 61, 61, 62, - 62, 62, 62, 63, 64, 65, 66, 66, 67, 67, - 67, 67, 67, 68, 69, 70, 71, 72, 73, 74, - 74, 74, 75, 75, 75, 76, 76, 77, 77, 78, - 78, 78, 79, 79, 80, 80, 81, 81, 81, 81, - 81, 81, 81, 82, 82 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = -{ - 0, 2, 0, 2, 1, 1, 1, 3, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, - 3, 2, 0, 2, 2, 2, 2, 3, 4, 3, - 4, 3, 3, 3, 4, 4, 4, 5, 2, 2, - 1, 3, 2, 0, 2, 2, 2, 2, 4, 3, - 3, 2, 4, 0, 2, 3, 1, 3, 2, 0, - 2, 2, 2, 3, 2, 1, 3, 2, 0, 2, - 2, 2, 3, 3, 1, 3, 2, 2, 2, 0, - 2, 2, 4, 3, 3, 0, 2, 1, 1, 2, - 2, 2, 1, 1, 0, 2, 1, 3, 3, 3, - 2, 3, 3, 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = -{ - 2, 0, 1, 0, 0, 0, 8, 0, 0, 10, - 0, 0, 0, 0, 9, 93, 92, 3, 4, 22, - 14, 22, 15, 43, 53, 5, 59, 12, 79, 68, - 6, 74, 16, 79, 13, 17, 11, 87, 88, 0, - 0, 0, 38, 0, 0, 0, 103, 104, 0, 0, - 0, 96, 19, 21, 39, 42, 58, 64, 0, 76, - 7, 63, 73, 75, 18, 20, 0, 100, 55, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, - 85, 0, 85, 85, 85, 26, 0, 0, 23, 0, - 25, 24, 0, 0, 0, 85, 85, 47, 44, 46, - 45, 0, 0, 0, 54, 41, 40, 60, 62, 57, - 61, 56, 81, 80, 0, 69, 71, 66, 70, 65, - 99, 101, 102, 98, 97, 77, 0, 0, 0, 94, - 94, 0, 94, 94, 0, 94, 0, 0, 0, 94, - 0, 78, 51, 94, 94, 0, 0, 89, 90, 91, - 72, 0, 83, 84, 0, 0, 0, 27, 86, 0, - 29, 0, 33, 31, 32, 0, 94, 0, 0, 49, - 50, 82, 95, 34, 35, 28, 30, 36, 0, 48, - 52, 37 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const short yydefgoto[] = -{ - -1, 1, 17, 18, 19, 20, 21, 22, 52, 88, - 23, 24, 105, 25, 54, 98, 55, 26, 109, 27, - 56, 28, 29, 117, 30, 58, 31, 32, 33, 34, - 89, 90, 57, 91, 131, 132, 106, 35, 155, 50, - 51 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -99 -static const short yypact[] = -{ - -99, 48, -99, 38, 46, 46, -99, 46, -29, -99, - 46, -17, -3, -11, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, 38, - 12, 15, -99, 18, 51, 62, -99, -99, -11, -11, - 4, -24, 138, 138, 160, 121, 110, -4, 81, -4, - -99, -99, -99, -99, -99, -99, -19, -99, -99, -11, - -11, 70, 70, 73, 32, -11, 46, -11, 46, -11, - 46, -11, 46, 46, 46, -99, 36, 70, -99, 95, - -99, -99, 96, 46, 106, 46, 46, -99, -99, -99, - -99, 38, 38, 38, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, 112, -99, -99, -99, -99, -99, - -99, 117, -99, -99, -99, -99, -11, 33, 65, 131, - 1, 119, 131, 1, 136, 1, 153, 154, 155, 131, - 70, -99, -99, 131, 131, 156, 157, -99, -99, -99, - -99, 101, -99, -99, -11, 158, 159, -99, -99, 161, - -99, 162, -99, -99, -99, 163, 131, 164, 165, -99, - -99, -99, 99, -99, -99, -99, -99, -99, 166, -99, - -99, -99 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const short yypgoto[] = -{ - -99, -99, -99, 111, -99, -99, -99, -99, 178, -99, - -99, -99, -99, 91, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, 115, -99, -99, -99, -99, -99, - -99, 146, 168, 89, 27, 0, 126, -1, -98, -48, - -63 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -68 -static const short yytable[] = -{ - 66, 67, 36, 42, 39, 40, 71, 41, 123, 124, - 43, 44, 74, 75, 120, 154, 72, 46, 47, 69, - 70, 121, 122, 48, 140, 45, 127, 128, 112, 130, - 49, 133, 156, 135, 158, 159, 68, 161, 60, 69, - 70, 165, 69, 70, 61, 167, 168, 62, 2, 3, - 63, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 46, 47, 13, 14, 139, 152, 48, 126, 178, 15, - 16, 69, 70, 49, 37, 38, 129, 166, 151, 15, - 16, -67, 114, 64, -67, 5, 101, 7, 8, 102, - 10, 11, 12, 143, 65, 13, 103, 153, 46, 47, - 147, 148, 149, 69, 70, 125, 172, 134, 141, 136, - 137, 138, 15, 16, 5, 101, 7, 8, 102, 10, - 11, 12, 145, 146, 13, 103, 101, 7, 142, 102, - 10, 11, 12, 171, 144, 13, 103, 69, 70, 69, - 70, 15, 16, 100, 150, 154, 113, 108, 113, 116, - 73, 157, 15, 16, 74, 75, 70, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 104, 107, 160, 115, - 85, 110, 73, 118, 86, 87, 74, 75, 92, 93, - 94, 95, 111, 96, 119, 162, 163, 164, 169, 170, - 173, 174, 97, 175, 176, 177, 179, 180, 181, 53, - 99, 59 -}; - -static const unsigned char yycheck[] = -{ - 48, 49, 3, 32, 4, 5, 30, 7, 71, 72, - 10, 28, 16, 17, 33, 14, 40, 28, 29, 38, - 39, 69, 70, 34, 87, 28, 74, 75, 32, 77, - 41, 79, 130, 81, 132, 133, 32, 135, 39, 38, - 39, 139, 38, 39, 32, 143, 144, 32, 0, 1, - 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 28, 29, 14, 15, 28, 32, 34, 35, 166, 31, - 32, 38, 39, 41, 28, 29, 76, 140, 126, 31, - 32, 0, 1, 32, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 93, 32, 14, 15, 32, 28, 29, - 101, 102, 103, 38, 39, 32, 154, 80, 13, 82, - 83, 84, 31, 32, 4, 5, 6, 7, 8, 9, - 10, 11, 95, 96, 14, 15, 5, 6, 32, 8, - 9, 10, 11, 32, 28, 14, 15, 38, 39, 38, - 39, 31, 32, 54, 32, 14, 57, 56, 59, 58, - 12, 32, 31, 32, 16, 17, 39, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 55, 56, 32, 58, - 32, 56, 12, 58, 36, 37, 16, 17, 18, 19, - 20, 21, 56, 23, 58, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 21, - 54, 33 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = -{ - 0, 43, 0, 1, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 14, 15, 31, 32, 44, 45, 46, - 47, 48, 49, 52, 53, 55, 59, 61, 63, 64, - 66, 68, 69, 70, 71, 79, 79, 28, 29, 77, - 77, 77, 32, 77, 28, 28, 28, 29, 34, 41, - 81, 82, 50, 50, 56, 58, 62, 74, 67, 74, - 79, 32, 32, 32, 32, 32, 81, 81, 32, 38, - 39, 30, 40, 12, 16, 17, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 32, 36, 37, 51, 72, - 73, 75, 18, 19, 20, 21, 23, 32, 57, 73, - 75, 5, 8, 15, 45, 54, 78, 45, 55, 60, - 66, 78, 32, 75, 1, 45, 55, 65, 66, 78, - 33, 81, 81, 82, 82, 32, 35, 81, 81, 77, - 81, 76, 77, 81, 76, 81, 76, 76, 76, 28, - 82, 13, 32, 77, 28, 76, 76, 79, 79, 79, - 32, 81, 32, 32, 14, 80, 80, 32, 80, 80, - 32, 80, 32, 32, 32, 80, 82, 80, 80, 32, - 32, 32, 81, 32, 32, 32, 32, 32, 80, 32, - 32, 32 -}; - -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror ("syntax error: cannot back up");\ - YYERROR; \ - } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current.first_line = Rhs[1].first_line; \ - Current.first_column = Rhs[1].first_column; \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; -#endif - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) - -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (cinluded). | -`------------------------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_stack_print (short *bottom, short *top) -#else -static void -yy_stack_print (bottom, top) - short *bottom; - short *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else -static void -yy_reduce_print (yyrule) - int yyrule; -#endif -{ - int yyi; - unsigned int yylineno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylineno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#if YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - register const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# endif -# endif - -# ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif -{ - register char *yyd = yydest; - register const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -#endif /* !YYERROR_VERBOSE */ - - - -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yydestruct (int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - register int yystate; - register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; - - - -#define YYPOPSTACK (yyvsp--, yyssp--) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyoverflowlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - short *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - yystate = yyn; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 8: - - { zconfprint("unexpected 'endmenu' statement"); ;} - break; - - case 9: - - { zconfprint("unexpected 'endif' statement"); ;} - break; - - case 10: - - { zconfprint("unexpected 'endchoice' statement"); ;} - break; - - case 11: - - { zconfprint("syntax error"); yyerrok; ;} - break; - - case 18: - - { - struct symbol *sym = sym_lookup(yyvsp[-1].string, 0); - sym->flags |= SYMBOL_OPTIONAL; - menu_add_entry(sym); - printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); -;} - break; - - case 19: - - { - menu_end_entry(); - printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 20: - - { - struct symbol *sym = sym_lookup(yyvsp[-1].string, 0); - sym->flags |= SYMBOL_OPTIONAL; - menu_add_entry(sym); - printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); -;} - break; - - case 21: - - { - if (current_entry->prompt) - current_entry->prompt->type = P_MENU; - else - zconfprint("warning: menuconfig statement without prompt"); - menu_end_entry(); - printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 27: - - { - menu_set_type(S_TRISTATE); - printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 28: - - { - menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr); - menu_set_type(S_TRISTATE); - printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 29: - - { - menu_set_type(S_BOOLEAN); - printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 30: - - { - menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr); - menu_set_type(S_BOOLEAN); - printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 31: - - { - menu_set_type(S_INT); - printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 32: - - { - menu_set_type(S_HEX); - printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 33: - - { - menu_set_type(S_STRING); - printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 34: - - { - menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 35: - - { - menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 36: - - { - menu_add_symbol(P_SELECT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 37: - - { - menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,yyvsp[-3].symbol, yyvsp[-2].symbol), yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 38: - - { - struct symbol *sym = sym_lookup(NULL, 0); - sym->flags |= SYMBOL_CHOICE; - menu_add_entry(sym); - menu_add_expr(P_CHOICE, NULL, NULL); - printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 39: - - { - menu_end_entry(); - menu_add_menu(); -;} - break; - - case 40: - - { - if (zconf_endtoken(yyvsp[0].token, T_CHOICE, T_ENDCHOICE)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); - } -;} - break; - - case 42: - - { - printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno); - zconfnerrs++; -;} - break; - - case 48: - - { - menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 49: - - { - menu_set_type(S_TRISTATE); - printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 50: - - { - menu_set_type(S_BOOLEAN); - printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 51: - - { - current_entry->sym->flags |= SYMBOL_OPTIONAL; - printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 52: - - { - menu_add_symbol(P_DEFAULT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 55: - - { - printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); - menu_add_entry(NULL); - menu_add_dep(yyvsp[-1].expr); - menu_end_entry(); - menu_add_menu(); -;} - break; - - case 56: - - { - if (zconf_endtoken(yyvsp[0].token, T_IF, T_ENDIF)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); - } -;} - break; - - case 58: - - { - printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno); - zconfnerrs++; -;} - break; - - case 63: - - { - menu_add_entry(NULL); - menu_add_prop(P_MENU, yyvsp[-1].string, NULL, NULL); - printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 64: - - { - menu_end_entry(); - menu_add_menu(); -;} - break; - - case 65: - - { - if (zconf_endtoken(yyvsp[0].token, T_MENU, T_ENDMENU)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); - } -;} - break; - - case 67: - - { - printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno); - zconfnerrs++; -;} - break; - - case 72: - - { zconfprint("invalid menu option"); yyerrok; ;} - break; - - case 73: - - { - yyval.string = yyvsp[-1].string; - printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); -;} - break; - - case 74: - - { - zconf_nextfile(yyvsp[0].string); -;} - break; - - case 75: - - { - menu_add_entry(NULL); - menu_add_prop(P_COMMENT, yyvsp[-1].string, NULL, NULL); - printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 76: - - { - menu_end_entry(); -;} - break; - - case 77: - - { - printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); - zconf_starthelp(); -;} - break; - - case 78: - - { - current_entry->sym->help = yyvsp[0].string; -;} - break; - - case 82: - - { - menu_add_dep(yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 83: - - { - menu_add_dep(yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 84: - - { - menu_add_dep(yyvsp[-1].expr); - printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 86: - - { - menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr); -;} - break; - - case 89: - - { yyval.token = T_ENDMENU; ;} - break; - - case 90: - - { yyval.token = T_ENDCHOICE; ;} - break; - - case 91: - - { yyval.token = T_ENDIF; ;} - break; - - case 94: - - { yyval.expr = NULL; ;} - break; - - case 95: - - { yyval.expr = yyvsp[0].expr; ;} - break; - - case 96: - - { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;} - break; - - case 97: - - { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;} - break; - - case 98: - - { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;} - break; - - case 99: - - { yyval.expr = yyvsp[-1].expr; ;} - break; - - case 100: - - { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;} - break; - - case 101: - - { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;} - break; - - case 102: - - { yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;} - break; - - case 103: - - { yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;} - break; - - case 104: - - { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;} - break; - - - } - -/* Line 999 of yacc.c. */ - - - yyvsp -= yylen; - yyssp -= yylen; - - - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - char *yymsg; - int yyx, yycount; - - yycount = 0; - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - yysize += yystrlen (yytname[yyx]) + 15, yycount++; - yysize += yystrlen ("syntax error, unexpected ") + 1; - yysize += yystrlen (yytname[yytype]); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yycount = 0; - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); - yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - const char *yyq = ! yycount ? ", expecting " : " or "; - yyp = yystpcpy (yyp, yyq); - yyp = yystpcpy (yyp, yytname[yyx]); - yycount++; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - /* Return failure if at end of input. */ - if (yychar == YYEOF) - { - /* Pop the error token. */ - YYPOPSTACK; - /* Pop the rest of the stack. */ - while (yyss < yyssp) - { - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - YYPOPSTACK; - } - YYABORT; - } - - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); - yychar = YYEMPTY; - - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*----------------------------------------------------. -| yyerrlab1 -- error raised explicitly by an action. | -`----------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - yyvsp--; - yystate = *--yyssp; - - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - YYDPRINTF ((stderr, "Shifting error token, ")); - - *++yyvsp = yylval; - - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif - return yyresult; -} - - - - - -void conf_parse(const char *name) -{ - struct symbol *sym; - int i; - - zconf_initscan(name); - - sym_init(); - menu_init(); - modules_sym = sym_lookup("MODULES", 0); - rootmenu.prompt = menu_add_prop(P_MENU, "Buildroot Configuration", NULL, NULL); - - //zconfdebug = 1; - zconfparse(); - if (zconfnerrs) - exit(1); - menu_finalize(&rootmenu); - for_all_symbols(i, sym) { - if (!(sym->flags & SYMBOL_CHECKED) && sym_check_deps(sym)) - printf("\n"); - else - sym->flags |= SYMBOL_CHECK_DONE; - } - - sym_change_count = 1; -} - -const char *zconf_tokenname(int token) -{ - switch (token) { - case T_MENU: return "menu"; - case T_ENDMENU: return "endmenu"; - case T_CHOICE: return "choice"; - case T_ENDCHOICE: return "endchoice"; - case T_IF: return "if"; - case T_ENDIF: return "endif"; - } - return "<token>"; -} - -static bool zconf_endtoken(int token, int starttoken, int endtoken) -{ - if (token != endtoken) { - zconfprint("unexpected '%s' within %s block", zconf_tokenname(token), zconf_tokenname(starttoken)); - zconfnerrs++; - return false; - } - if (current_menu->file != current_file) { - zconfprint("'%s' in different file than '%s'", zconf_tokenname(token), zconf_tokenname(starttoken)); - zconfprint("location of the '%s'", zconf_tokenname(starttoken)); - zconfnerrs++; - return false; - } - return true; -} - -static void zconfprint(const char *err, ...) -{ - va_list ap; - - fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno() + 1); - va_start(ap, err); - vfprintf(stderr, err, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - -static void zconferror(const char *err) -{ - fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); -} - -void print_quoted_string(FILE *out, const char *str) -{ - const char *p; - int len; - - putc('"', out); - while ((p = strchr(str, '"'))) { - len = p - str; - if (len) - fprintf(out, "%.*s", len, str); - fputs("\\\"", out); - str = p + 1; - } - fputs(str, out); - putc('"', out); -} - -void print_symbol(FILE *out, struct menu *menu) -{ - struct symbol *sym = menu->sym; - struct property *prop; - - if (sym_is_choice(sym)) - fprintf(out, "choice\n"); - else - fprintf(out, "config %s\n", sym->name); - switch (sym->type) { - case S_BOOLEAN: - fputs(" boolean\n", out); - break; - case S_TRISTATE: - fputs(" tristate\n", out); - break; - case S_STRING: - fputs(" string\n", out); - break; - case S_INT: - fputs(" integer\n", out); - break; - case S_HEX: - fputs(" hex\n", out); - break; - default: - fputs(" ???\n", out); - break; - } - for (prop = sym->prop; prop; prop = prop->next) { - if (prop->menu != menu) - continue; - switch (prop->type) { - case P_PROMPT: - fputs(" prompt ", out); - print_quoted_string(out, prop->text); - if (!expr_is_yes(prop->visible.expr)) { - fputs(" if ", out); - expr_fprint(prop->visible.expr, out); - } - fputc('\n', out); - break; - case P_DEFAULT: - fputs( " default ", out); - expr_fprint(prop->expr, out); - if (!expr_is_yes(prop->visible.expr)) { - fputs(" if ", out); - expr_fprint(prop->visible.expr, out); - } - fputc('\n', out); - break; - case P_CHOICE: - fputs(" #choice value\n", out); - break; - default: - fprintf(out, " unknown prop %d!\n", prop->type); - break; - } - } - if (sym->help) { - int len = strlen(sym->help); - while (sym->help[--len] == '\n') - sym->help[len] = 0; - fprintf(out, " help\n%s\n", sym->help); - } - fputc('\n', out); -} - -void zconfdump(FILE *out) -{ - struct property *prop; - struct symbol *sym; - struct menu *menu; - - menu = rootmenu.list; - while (menu) { - if ((sym = menu->sym)) - print_symbol(out, menu); - else if ((prop = menu->prompt)) { - switch (prop->type) { - case P_COMMENT: - fputs("\ncomment ", out); - print_quoted_string(out, prop->text); - fputs("\n", out); - break; - case P_MENU: - fputs("\nmenu ", out); - print_quoted_string(out, prop->text); - fputs("\n", out); - break; - default: - ; - } - if (!expr_is_yes(prop->visible.expr)) { - fputs(" depends ", out); - expr_fprint(prop->visible.expr, out); - fputc('\n', out); - } - fputs("\n", out); - } - - if (menu->list) - menu = menu->list; - else if (menu->next) - menu = menu->next; - else while ((menu = menu->parent)) { - if (menu->prompt && menu->prompt->type == P_MENU) - fputs("\nendmenu\n", out); - if (menu->next) { - menu = menu->next; - break; - } - } - } -} - -#include "lex.zconf.c" -#include "confdata.c" -#include "expr.c" -#include "symbol.c" -#include "menu.c" - - diff --git a/openwrt/package/config/zconf.tab.h_shipped b/openwrt/package/config/zconf.tab.h_shipped deleted file mode 100644 index 3b191ef5998..00000000000 --- a/openwrt/package/config/zconf.tab.h_shipped +++ /dev/null @@ -1,125 +0,0 @@ -/* A Bison parser, made from zconf.y, by GNU bison 1.75. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. - - 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, 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. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -#ifndef BISON_ZCONF_TAB_H -# define BISON_ZCONF_TAB_H - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_MAINMENU = 258, - T_MENU = 259, - T_ENDMENU = 260, - T_SOURCE = 261, - T_CHOICE = 262, - T_ENDCHOICE = 263, - T_COMMENT = 264, - T_CONFIG = 265, - T_HELP = 266, - T_HELPTEXT = 267, - T_IF = 268, - T_ENDIF = 269, - T_DEPENDS = 270, - T_REQUIRES = 271, - T_OPTIONAL = 272, - T_PROMPT = 273, - T_DEFAULT = 274, - T_TRISTATE = 275, - T_BOOLEAN = 276, - T_INT = 277, - T_HEX = 278, - T_WORD = 279, - T_STRING = 280, - T_UNEQUAL = 281, - T_EOF = 282, - T_EOL = 283, - T_CLOSE_PAREN = 284, - T_OPEN_PAREN = 285, - T_ON = 286, - T_OR = 287, - T_AND = 288, - T_EQUAL = 289, - T_NOT = 290 - }; -#endif -#define T_MAINMENU 258 -#define T_MENU 259 -#define T_ENDMENU 260 -#define T_SOURCE 261 -#define T_CHOICE 262 -#define T_ENDCHOICE 263 -#define T_COMMENT 264 -#define T_CONFIG 265 -#define T_HELP 266 -#define T_HELPTEXT 267 -#define T_IF 268 -#define T_ENDIF 269 -#define T_DEPENDS 270 -#define T_REQUIRES 271 -#define T_OPTIONAL 272 -#define T_PROMPT 273 -#define T_DEFAULT 274 -#define T_TRISTATE 275 -#define T_BOOLEAN 276 -#define T_INT 277 -#define T_HEX 278 -#define T_WORD 279 -#define T_STRING 280 -#define T_UNEQUAL 281 -#define T_EOF 282 -#define T_EOL 283 -#define T_CLOSE_PAREN 284 -#define T_OPEN_PAREN 285 -#define T_ON 286 -#define T_OR 287 -#define T_AND 288 -#define T_EQUAL 289 -#define T_NOT 290 - - - - -#ifndef YYSTYPE -#line 33 "zconf.y" -typedef union { - int token; - char *string; - struct symbol *symbol; - struct expr *expr; - struct menu *menu; -} yystype; -/* Line 1281 of /usr/share/bison/yacc.c. */ -#line 118 "zconf.tab.h" -# define YYSTYPE yystype -#endif - -extern YYSTYPE zconflval; - - -#endif /* not BISON_ZCONF_TAB_H */ - diff --git a/openwrt/package/config/zconf.y b/openwrt/package/config/zconf.y deleted file mode 100644 index f354c89e6c5..00000000000 --- a/openwrt/package/config/zconf.y +++ /dev/null @@ -1,687 +0,0 @@ -%{ -/* - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> - * Released under the terms of the GNU GPL v2.0. - */ - -#include <ctype.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdbool.h> - -#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) - -#define PRINTD 0x0001 -#define DEBUG_PARSE 0x0002 - -int cdebug = PRINTD; - -extern int zconflex(void); -static void zconfprint(const char *err, ...); -static void zconferror(const char *err); -static bool zconf_endtoken(int token, int starttoken, int endtoken); - -struct symbol *symbol_hash[257]; - -#define YYERROR_VERBOSE -%} -%expect 40 - -%union -{ - int token; - char *string; - struct symbol *symbol; - struct expr *expr; - struct menu *menu; -} - -%token T_MAINMENU -%token T_MENU -%token T_ENDMENU -%token T_SOURCE -%token T_CHOICE -%token T_ENDCHOICE -%token T_COMMENT -%token T_CONFIG -%token T_MENUCONFIG -%token T_HELP -%token <string> T_HELPTEXT -%token T_IF -%token T_ENDIF -%token T_DEPENDS -%token T_REQUIRES -%token T_OPTIONAL -%token T_PROMPT -%token T_DEFAULT -%token T_TRISTATE -%token T_DEF_TRISTATE -%token T_BOOLEAN -%token T_DEF_BOOLEAN -%token T_STRING -%token T_INT -%token T_HEX -%token <string> T_WORD -%token <string> T_WORD_QUOTE -%token T_UNEQUAL -%token T_EOF -%token T_EOL -%token T_CLOSE_PAREN -%token T_OPEN_PAREN -%token T_ON -%token T_SELECT -%token T_RANGE - -%left T_OR -%left T_AND -%left T_EQUAL T_UNEQUAL -%nonassoc T_NOT - -%type <string> prompt -%type <string> source -%type <symbol> symbol -%type <expr> expr -%type <expr> if_expr -%type <token> end - -%{ -#define LKC_DIRECT_LINK -#include "lkc.h" -%} -%% -input: /* empty */ - | input block -; - -block: common_block - | choice_stmt - | menu_stmt - | T_MAINMENU prompt nl_or_eof - | T_ENDMENU { zconfprint("unexpected 'endmenu' statement"); } - | T_ENDIF { zconfprint("unexpected 'endif' statement"); } - | T_ENDCHOICE { zconfprint("unexpected 'endchoice' statement"); } - | error nl_or_eof { zconfprint("syntax error"); yyerrok; } -; - -common_block: - if_stmt - | comment_stmt - | config_stmt - | menuconfig_stmt - | source_stmt - | nl_or_eof -; - - -/* config/menuconfig entry */ - -config_entry_start: T_CONFIG T_WORD T_EOL -{ - struct symbol *sym = sym_lookup($2, 0); - sym->flags |= SYMBOL_OPTIONAL; - menu_add_entry(sym); - printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2); -}; - -config_stmt: config_entry_start config_option_list -{ - menu_end_entry(); - printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); -}; - -menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL -{ - struct symbol *sym = sym_lookup($2, 0); - sym->flags |= SYMBOL_OPTIONAL; - menu_add_entry(sym); - printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2); -}; - -menuconfig_stmt: menuconfig_entry_start config_option_list -{ - if (current_entry->prompt) - current_entry->prompt->type = P_MENU; - else - zconfprint("warning: menuconfig statement without prompt"); - menu_end_entry(); - printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); -}; - -config_option_list: - /* empty */ - | config_option_list config_option - | config_option_list depends - | config_option_list help - | config_option_list T_EOL -; - -config_option: T_TRISTATE prompt_stmt_opt T_EOL -{ - menu_set_type(S_TRISTATE); - printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_DEF_TRISTATE expr if_expr T_EOL -{ - menu_add_expr(P_DEFAULT, $2, $3); - menu_set_type(S_TRISTATE); - printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_BOOLEAN prompt_stmt_opt T_EOL -{ - menu_set_type(S_BOOLEAN); - printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_DEF_BOOLEAN expr if_expr T_EOL -{ - menu_add_expr(P_DEFAULT, $2, $3); - menu_set_type(S_BOOLEAN); - printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_INT prompt_stmt_opt T_EOL -{ - menu_set_type(S_INT); - printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_HEX prompt_stmt_opt T_EOL -{ - menu_set_type(S_HEX); - printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_STRING prompt_stmt_opt T_EOL -{ - menu_set_type(S_STRING); - printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_PROMPT prompt if_expr T_EOL -{ - menu_add_prompt(P_PROMPT, $2, $3); - printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_DEFAULT expr if_expr T_EOL -{ - menu_add_expr(P_DEFAULT, $2, $3); - printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_SELECT T_WORD if_expr T_EOL -{ - menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3); - printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_RANGE symbol symbol if_expr T_EOL -{ - menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); - printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); -}; - -/* choice entry */ - -choice: T_CHOICE T_EOL -{ - struct symbol *sym = sym_lookup(NULL, 0); - sym->flags |= SYMBOL_CHOICE; - menu_add_entry(sym); - menu_add_expr(P_CHOICE, NULL, NULL); - printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); -}; - -choice_entry: choice choice_option_list -{ - menu_end_entry(); - menu_add_menu(); -}; - -choice_end: end -{ - if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); - } -}; - -choice_stmt: - choice_entry choice_block choice_end - | choice_entry choice_block -{ - printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno); - zconfnerrs++; -}; - -choice_option_list: - /* empty */ - | choice_option_list choice_option - | choice_option_list depends - | choice_option_list help - | choice_option_list T_EOL -; - -choice_option: T_PROMPT prompt if_expr T_EOL -{ - menu_add_prompt(P_PROMPT, $2, $3); - printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); -}; - -choice_option: T_TRISTATE prompt_stmt_opt T_EOL -{ - menu_set_type(S_TRISTATE); - printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); -}; - -choice_option: T_BOOLEAN prompt_stmt_opt T_EOL -{ - menu_set_type(S_BOOLEAN); - printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); -}; - -choice_option: T_OPTIONAL T_EOL -{ - current_entry->sym->flags |= SYMBOL_OPTIONAL; - printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); -}; - -choice_option: T_DEFAULT T_WORD if_expr T_EOL -{ - menu_add_symbol(P_DEFAULT, sym_lookup($2, 0), $3); - printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); -}; - -choice_block: - /* empty */ - | choice_block common_block -; - -/* if entry */ - -if: T_IF expr T_EOL -{ - printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); - menu_add_entry(NULL); - menu_add_dep($2); - menu_end_entry(); - menu_add_menu(); -}; - -if_end: end -{ - if (zconf_endtoken($1, T_IF, T_ENDIF)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); - } -}; - -if_stmt: - if if_block if_end - | if if_block -{ - printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno); - zconfnerrs++; -}; - -if_block: - /* empty */ - | if_block common_block - | if_block menu_stmt - | if_block choice_stmt -; - -/* menu entry */ - -menu: T_MENU prompt T_EOL -{ - menu_add_entry(NULL); - menu_add_prop(P_MENU, $2, NULL, NULL); - printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); -}; - -menu_entry: menu depends_list -{ - menu_end_entry(); - menu_add_menu(); -}; - -menu_end: end -{ - if (zconf_endtoken($1, T_MENU, T_ENDMENU)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); - } -}; - -menu_stmt: - menu_entry menu_block menu_end - | menu_entry menu_block -{ - printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno); - zconfnerrs++; -}; - -menu_block: - /* empty */ - | menu_block common_block - | menu_block menu_stmt - | menu_block choice_stmt - | menu_block error T_EOL { zconfprint("invalid menu option"); yyerrok; } -; - -source: T_SOURCE prompt T_EOL -{ - $$ = $2; - printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); -}; - -source_stmt: source -{ - zconf_nextfile($1); -}; - -/* comment entry */ - -comment: T_COMMENT prompt T_EOL -{ - menu_add_entry(NULL); - menu_add_prop(P_COMMENT, $2, NULL, NULL); - printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); -}; - -comment_stmt: comment depends_list -{ - menu_end_entry(); -}; - -/* help option */ - -help_start: T_HELP T_EOL -{ - printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); - zconf_starthelp(); -}; - -help: help_start T_HELPTEXT -{ - current_entry->sym->help = $2; -}; - -/* depends option */ - -depends_list: /* empty */ - | depends_list depends - | depends_list T_EOL -; - -depends: T_DEPENDS T_ON expr T_EOL -{ - menu_add_dep($3); - printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); -} - | T_DEPENDS expr T_EOL -{ - menu_add_dep($2); - printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); -} - | T_REQUIRES expr T_EOL -{ - menu_add_dep($2); - printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); -}; - -/* prompt statement */ - -prompt_stmt_opt: - /* empty */ - | prompt if_expr -{ - menu_add_prop(P_PROMPT, $1, NULL, $2); -}; - -prompt: T_WORD - | T_WORD_QUOTE -; - -end: T_ENDMENU nl_or_eof { $$ = T_ENDMENU; } - | T_ENDCHOICE nl_or_eof { $$ = T_ENDCHOICE; } - | T_ENDIF nl_or_eof { $$ = T_ENDIF; } -; - -nl_or_eof: - T_EOL | T_EOF; - -if_expr: /* empty */ { $$ = NULL; } - | T_IF expr { $$ = $2; } -; - -expr: symbol { $$ = expr_alloc_symbol($1); } - | symbol T_EQUAL symbol { $$ = expr_alloc_comp(E_EQUAL, $1, $3); } - | symbol T_UNEQUAL symbol { $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } - | T_OPEN_PAREN expr T_CLOSE_PAREN { $$ = $2; } - | T_NOT expr { $$ = expr_alloc_one(E_NOT, $2); } - | expr T_OR expr { $$ = expr_alloc_two(E_OR, $1, $3); } - | expr T_AND expr { $$ = expr_alloc_two(E_AND, $1, $3); } -; - -symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } - | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); } -; - -%% - -void conf_parse(const char *name) -{ - struct symbol *sym; - int i; - - zconf_initscan(name); - - sym_init(); - menu_init(); - modules_sym = sym_lookup("MODULES", 0); - rootmenu.prompt = menu_add_prop(P_MENU, "Buildroot Configuration", NULL, NULL); - - //zconfdebug = 1; - zconfparse(); - if (zconfnerrs) - exit(1); - menu_finalize(&rootmenu); - for_all_symbols(i, sym) { - if (!(sym->flags & SYMBOL_CHECKED) && sym_check_deps(sym)) - printf("\n"); - else - sym->flags |= SYMBOL_CHECK_DONE; - } - - sym_change_count = 1; -} - -const char *zconf_tokenname(int token) -{ - switch (token) { - case T_MENU: return "menu"; - case T_ENDMENU: return "endmenu"; - case T_CHOICE: return "choice"; - case T_ENDCHOICE: return "endchoice"; - case T_IF: return "if"; - case T_ENDIF: return "endif"; - } - return "<token>"; -} - -static bool zconf_endtoken(int token, int starttoken, int endtoken) -{ - if (token != endtoken) { - zconfprint("unexpected '%s' within %s block", zconf_tokenname(token), zconf_tokenname(starttoken)); - zconfnerrs++; - return false; - } - if (current_menu->file != current_file) { - zconfprint("'%s' in different file than '%s'", zconf_tokenname(token), zconf_tokenname(starttoken)); - zconfprint("location of the '%s'", zconf_tokenname(starttoken)); - zconfnerrs++; - return false; - } - return true; -} - -static void zconfprint(const char *err, ...) -{ - va_list ap; - - fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno() + 1); - va_start(ap, err); - vfprintf(stderr, err, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - -static void zconferror(const char *err) -{ - fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); -} - -void print_quoted_string(FILE *out, const char *str) -{ - const char *p; - int len; - - putc('"', out); - while ((p = strchr(str, '"'))) { - len = p - str; - if (len) - fprintf(out, "%.*s", len, str); - fputs("\\\"", out); - str = p + 1; - } - fputs(str, out); - putc('"', out); -} - -void print_symbol(FILE *out, struct menu *menu) -{ - struct symbol *sym = menu->sym; - struct property *prop; - - if (sym_is_choice(sym)) - fprintf(out, "choice\n"); - else - fprintf(out, "config %s\n", sym->name); - switch (sym->type) { - case S_BOOLEAN: - fputs(" boolean\n", out); - break; - case S_TRISTATE: - fputs(" tristate\n", out); - break; - case S_STRING: - fputs(" string\n", out); - break; - case S_INT: - fputs(" integer\n", out); - break; - case S_HEX: - fputs(" hex\n", out); - break; - default: - fputs(" ???\n", out); - break; - } - for (prop = sym->prop; prop; prop = prop->next) { - if (prop->menu != menu) - continue; - switch (prop->type) { - case P_PROMPT: - fputs(" prompt ", out); - print_quoted_string(out, prop->text); - if (!expr_is_yes(prop->visible.expr)) { - fputs(" if ", out); - expr_fprint(prop->visible.expr, out); - } - fputc('\n', out); - break; - case P_DEFAULT: - fputs( " default ", out); - expr_fprint(prop->expr, out); - if (!expr_is_yes(prop->visible.expr)) { - fputs(" if ", out); - expr_fprint(prop->visible.expr, out); - } - fputc('\n', out); - break; - case P_CHOICE: - fputs(" #choice value\n", out); - break; - default: - fprintf(out, " unknown prop %d!\n", prop->type); - break; - } - } - if (sym->help) { - int len = strlen(sym->help); - while (sym->help[--len] == '\n') - sym->help[len] = 0; - fprintf(out, " help\n%s\n", sym->help); - } - fputc('\n', out); -} - -void zconfdump(FILE *out) -{ - struct property *prop; - struct symbol *sym; - struct menu *menu; - - menu = rootmenu.list; - while (menu) { - if ((sym = menu->sym)) - print_symbol(out, menu); - else if ((prop = menu->prompt)) { - switch (prop->type) { - case P_COMMENT: - fputs("\ncomment ", out); - print_quoted_string(out, prop->text); - fputs("\n", out); - break; - case P_MENU: - fputs("\nmenu ", out); - print_quoted_string(out, prop->text); - fputs("\n", out); - break; - default: - ; - } - if (!expr_is_yes(prop->visible.expr)) { - fputs(" depends ", out); - expr_fprint(prop->visible.expr, out); - fputc('\n', out); - } - fputs("\n", out); - } - - if (menu->list) - menu = menu->list; - else if (menu->next) - menu = menu->next; - else while ((menu = menu->parent)) { - if (menu->prompt && menu->prompt->type == P_MENU) - fputs("\nendmenu\n", out); - if (menu->next) { - menu = menu->next; - break; - } - } - } -} - -#include "lex.zconf.c" -#include "confdata.c" -#include "expr.c" -#include "symbol.c" -#include "menu.c" diff --git a/openwrt/scripts/config/mconf.c b/openwrt/scripts/config/mconf.c index 69cd56f1389..2ef24aa5b69 100644 --- a/openwrt/scripts/config/mconf.c +++ b/openwrt/scripts/config/mconf.c @@ -34,12 +34,12 @@ static const char mconf_readme[] = N_( "may be completely removed altogether.\n" "\n" "Menu items beginning with [*], <M> or [ ] represent features\n" -"configured to be built in, modularized or removed respectively.\n" -"Pointed brackets <> represent module capable features.\n" +"configured to be included, built as package or removed respectively.\n" +"Pointed brackets <> represent packaging capable features.\n" "\n" "To change any of these features, highlight it with the cursor\n" -"keys and press <Y> to build it in, <M> to make it a module or\n" -"<N> to removed it. You may also press the <Space Bar> to cycle\n" +"keys and press <Y> to include it, <M> to make it a package or\n" +"<N> to remove it. You may also press the <Space Bar> to cycle\n" "through the available options (ie. Y->N->M->Y).\n" "\n" "Some additional keyboard hints:\n" @@ -162,9 +162,9 @@ menu_instructions[] = N_( "Arrow keys navigate the menu. " "<Enter> selects submenus --->. " "Highlighted letters are hotkeys. " - "Pressing <Y> includes, <N> excludes, <M> modularizes features. " + "Pressing <Y> includes, <N> excludes, <M> builds as package. " "Press <Esc><Esc> to exit, <?> for Help, </> for Search. " - "Legend: [*] built-in [ ] excluded <M> module < > module capable"), + "Legend: [*] built-in [ ] excluded <M> package < > package capable"), radiolist_instructions[] = N_( "Use the arrow keys to navigate this window or " "press the hotkey of the item you wish to select " @@ -181,8 +181,8 @@ inputbox_instructions_string[] = N_( "Please enter a string value. " "Use the <TAB> key to move from the input field to the buttons below it."), setmod_text[] = N_( - "This feature depends on another which has been configured as a module.\n" - "As a result, this feature will be built as a module."), + "This feature depends on another which has been configured as a package.\n" + "As a result, this feature will be built as a package."), nohelp_text[] = N_( "There is no help available for this config option.\n"), load_config_text[] = N_( diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 2c486eec766..80e9847d625 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -1,25 +1,28 @@ choice prompt "Target System" - default BR2_LINUX_2_4_BRCM + default LINUX_2_4_BRCM -config BR2_LINUX_2_6_ARUBA +config LINUX_2_6_ARUBA bool "Aruba [2.6]" - select BR2_mips - select BR2_LINUX_2_6 + select mips + select LINUX_2_6 + select PCI_SUPPORT help Build firmware images for Aruba boards -config BR2_LINUX_2_4_AR531X +config LINUX_2_4_AR531X bool "Atheros AR531x [2.4]" - select BR2_mips + select mips + select LINUX_2_4 help Build firmware images for Atheros AR531x based boards (e.g. Netgear WGT624, Linksys WRT55AG) -config BR2_LINUX_2_4_BRCM +config LINUX_2_4_BRCM bool "Broadcom BCM47xx/53xx [2.4]" - select BR2_mipsel - select BR2_LINUX_PCMCIA_SUPPORT + select mipsel + select PCI_SUPPORT + select PCMCIA_SUPPORT help Build firmware images for Broadcom based routers (e.g. Linksys WRT54G(S), Asus WL-500g, Motorola WR850G) @@ -28,100 +31,176 @@ config BR2_LINUX_2_4_BRCM options below for creating device specific files for use with TFTP client too. -config BR2_LINUX_2_6_BRCM +config LINUX_2_6_BRCM bool "Broadcom BCM47xx/53xx [2.6]" - select BR2_mipsel - select BR2_LINUX_2_6 - select BR2_LINUX_PCMCIA_SUPPORT + select mipsel + select LINUX_2_6 + select PCI_SUPPORT + #select PCMCIA_SUPPORT help Build firmware images for Broadcom based routers (e.g. Netgear WGT634u) -config BR2_LINUX_2_4_AR7 +config LINUX_2_4_AR7 bool "TI AR7 [2.4]" - select BR2_mipsel + select mipsel help Build firmware images for TI AR7 based routers (w.g. Linksys WAG54G v2) -config BR2_LINUX_2_4_X86 +config LINUX_2_4_X86 bool "x86 [2.4]" - select BR2_i386 - select BR2_LINUX_PCMCIA_SUPPORT + select i386 + select LINUX_2_4 + select PCMCIA_SUPPORT help Build firmware images for x86 based boards (e.g. Soekris net4521 and net4801, PC Engines WRAP...) -config BR2_LINUX_2_6_X86 +config LINUX_2_6_X86 bool "x86 [2.6]" - select BR2_i386 - select BR2_LINUX_2_6 - select BR2_LINUX_PCMCIA_SUPPORT + select i386 + select LINUX_2_6 + select PCMCIA_SUPPORT help Build firmware images for x86 based boards (e.g. Soekris net4521 and net4801, PC Engines WRAP...) -config BR2_LINUX_2_6_AU1000 +config LINUX_2_6_AU1000 bool "au1000 [2.6]" - select BR2_mipsel - select BR2_LINUX_2_6 - select BR2_LINUX_PCMCIA_SUPPORT + select mipsel + select LINUX_2_6 + select LINUX_PCMCIA_SUPPORT help Build firmware for AMD Alchemy 1500 boards (e.g. 4G-Systems Mesh/Access Cube ...) if CONFIG_DEVEL -config BR2_LINUX_2_6_ARM +config LINUX_2_6_ARM bool "UNSUPPORTED little-endian arm platform" - select BR2_arm + select LINUX_2_6 + select arm -config BR2_LINUX_2_6_ARMEB +config LINUX_2_6_ARMEB bool "UNSUPPORTED big-endian arm platform" - select BR2_armeb + select LINUX_2_6 + select armeb -config BR2_LINUX_2_6_CRIS +config LINUX_2_6_CRIS bool "UNSUPPORTED cris platform" - select BR2_cris + select LINUX_2_6 + select cris -config BR2_LINUX_2_6_M68K +config LINUX_2_6_M68K bool "UNSUPPORTED m68k platform" - select BR2_m68k + select LINUX_2_6 + select m68k -config BR2_LINUX_2_6_PPC +config LINUX_2_6_PPC bool "UNSUPPORTED powerpc platform" - select BR2_powerpc + select LINUX_2_6 + select powerpc -config BR2_LINUX_2_6_SH3 +config LINUX_2_6_SH3 bool "UNSUPPORTED little-endian sh3 platform" - select BR2_sh3 + select LINUX_2_6 + select sh3 -config BR2_LINUX_2_6_SH3EB +config LINUX_2_6_SH3EB bool "UNSUPPORTED big-endian sh3 platform" - select BR2_sh3eb + select LINUX_2_6 + select sh3eb -config BR2_LINUX_2_6_SH4 +config LINUX_2_6_SH4 bool "UNSUPPORTED little-endian sh4 platform" - select BR2_sh4 + select LINUX_2_6 + select sh4 -config BR2_LINUX_2_6_SH4EB +config LINUX_2_6_SH4EB bool "UNSUPPORTED big-endian sh4 platform" - select BR2_sh4eb + select LINUX_2_6 + select sh4eb -config BR2_LINUX_2_6_SPARC +config LINUX_2_6_SPARC bool "UNSUPPORTED sparc platform" - select BR2_sparc + select LINUX_2_6 + select sparc endif endchoice -config BR2_LINUX_2_6 - bool - default n - depends BR2_LINUX_2_6_X86 || BR2_LINUX_2_6_BRCM || BR2_LINUX_2_6_ARUBA -config BR2_LINUX_PCMCIA_SUPPORT - bool - default n - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_X86 || BR2_LINUX_2_6_BRCM +# Kernel/Hardware features + +config LINUX_2_4 + bool + +config LINUX_2_6 + bool + +config PCI_SUPPORT + bool + +config PCMCIA_SUPPORT + bool + + +# Architecture selection + +config i386 + bool + +config mips + bool + +config mipsel + bool + +config arm + bool + +config armeb + bool + +config cris + bool + +config m68k + bool + +config powerpc + bool + +config sh3 + bool + +config sh3eb + bool + +config sh4 + bool + +config sh4eb + bool + +config sparc + bool + +config ARCH + string + default "arm" if arm + default "armeb" if armeb + default "cris" if cris + default "i386" if i386 + default "m68k" if m68k + default "mips" if mips + default "mipsel" if mipsel || !CONFIG_DEVEL + default "powerpc" if powerpc + default "sh3" if sh3 + default "sh3eb" if sh3eb + default "sh4" if sh4 + default "sh4eb" if sh4eb + default "sparc" if sparc + diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 65d9a3e0b04..6c7f5385e92 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -25,8 +25,6 @@ menu "Kernel Configuration / Device Support" comment "Device specific configuration" -source "target/linux/*-2.[46]/Config.in" - comment "Kernel modules" menu "Networking modules" @@ -763,10 +761,4 @@ config BR2_PACKAGE_KMOD_WD1100 endmenu -menu "Additional kernel modules" - -source "target/linux/package/Config.in" - -endmenu - endmenu diff --git a/openwrt/toolchain/Config.in b/openwrt/toolchain/Config.in index 080d87761fd..d376c146256 100644 --- a/openwrt/toolchain/Config.in +++ b/openwrt/toolchain/Config.in @@ -1,29 +1,45 @@ # -source "toolchain/uClibc/Config.in" +menuconfig TOOLCHAINOPTS + bool "Toolchain Options" if DEVEL + source "toolchain/binutils/Config.in" source "toolchain/gcc/Config.in" -if CONFIG_DEVEL - comment "Common Toolchain Options" -endif - -config BR2_ENABLE_MULTILIB +config ENABLE_MULTILIB bool + prompt "Enable multilib support?" if TOOLCHAINOPTS default n + help + If you want multilib enabled, enable this... -config BR2_LARGEFILE +config LARGEFILE bool - depends on !BR2_cris + prompt "Enable large file (files > 2 GB) support?" if TOOLCHAINOPTS + depends on !cris default y + help + Enable large file (files > 2 GB) support -config BR2_SOFT_FLOAT +config SOFT_FLOAT bool + prompt "Use software floating point by default" if TOOLCHAINOPTS default n - depends on BR2_arm || BR2_mips || BR2_powerpc + depends on arm || mips || powerpc + help + If your target CPU does not have a Floating Point Unit (FPU) or a + kernel FPU emulator, but you still wish to support floating point + functions, then everything will need to be compiled with soft floating + point support (-msoft-float). -config BR2_TARGET_OPTIMIZATION + Most people will answer N. + +config TARGET_OPTIMIZATION string - default "-Os -pipe -march=i486 -funit-at-a-time" if BR2_i386 - default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" if BR2_mipsel || BR2_mips + prompt "Target Optimizations" if TOOLCHAINOPTS + default "-Os -pipe -march=i486 -funit-at-a-time" if i386 + default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" if mipsel || mips default "-Os -pipe -funit-at-a-time" + help + Optimizations to use when building for the target host. + diff --git a/openwrt/toolchain/Config.in.devel b/openwrt/toolchain/Config.in.devel deleted file mode 100644 index d9223fbcd3e..00000000000 --- a/openwrt/toolchain/Config.in.devel +++ /dev/null @@ -1,56 +0,0 @@ -# - -menu "Toolchain Options" - -source "toolchain/uClibc/Config.in" -source "toolchain/binutils/Config.in" -source "toolchain/gcc/Config.in" - - -comment "Common Toolchain Options" - -config BR2_ENABLE_MULTILIB - bool "Enable multilib support?" - default n - help - If you want multilib enabled, enable this... - -config BR2_LARGEFILE - bool "Enable large file (files > 2 GB) support?" - depends on !BR2_cris - default y - help - Enable large file (files > 2 GB) support - -config BR2_SOFT_FLOAT - bool "Use software floating point by default" - default n - depends on BR2_arm || BR2_mips || BR2_powerpc - help - If your target CPU does not have a Floating Point Unit (FPU) or a - kernel FPU emulator, but you still wish to support floating point - functions, then everything will need to be compiled with soft floating - point support (-msoft-float). - - Most people will answer N. - -config BR2_TARGET_OPTIMIZATION - string "Target Optimizations" - default "-Os -pipe -march=i486 -funit-at-a-time" if BR2_i386 - default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" if BR2_mipsel || BR2_mips - default "-Os -pipe -funit-at-a-time" - help - Optimizations to use when building for the target host. - -# Might be worth experimenting with for gcc 3.4.x. -#GCC_WITH_CPU:= -#GCC_WITH_ARCH:= -#GCC_WITH_TUNE:= - -#GCC_WITH_CPU:=--with-cpu= -#GCC_WITH_ARCH:=--with-arch= -#GCC_WITH_TUNE:=--with-tune= - - -endmenu - diff --git a/openwrt/toolchain/binutils/Config.in b/openwrt/toolchain/binutils/Config.in index 78746388416..56b29c3ec11 100644 --- a/openwrt/toolchain/binutils/Config.in +++ b/openwrt/toolchain/binutils/Config.in @@ -1,40 +1,40 @@ # Choose binutils version. -if CONFIG_DEVEL - comment "Binutils Options" -endif - choice - prompt "Binutils Version" if CONFIG_DEVEL - default BR2_BINUTILS_VERSION_2_16_1 + prompt "Binutils Version" if TOOLCHAINOPTS + default BINUTILS_VERSION_2_16_1 help Select the version of binutils you wish to use. - config BR2_BINUTILS_VERSION_2_15_94_0_2 + config BINUTILS_VERSION_2_15_94_0_2 bool "binutils 2.15.94.0.2" - config BR2_BINUTILS_VERSION_2_16_1 + config BINUTILS_VERSION_2_16_1 bool "binutils 2.16.1" - config BR2_BINUTILS_VERSION_2_16_90_0_3 + config BINUTILS_VERSION_2_16_90_0_3 bool "binutils 2.16.90.0.3" - config BR2_BINUTILS_VERSION_2_16_91_0_1 + config BINUTILS_VERSION_2_16_91_0_1 bool "binutils 2.16.91.0.1" - config BR2_BINUTILS_VERSION_2_16_91_0_2 + config BINUTILS_VERSION_2_16_91_0_2 bool "binutils 2.16.91.0.2" - config BR2_BINUTILS_VERSION_2_16_91_0_6 + config BINUTILS_VERSION_2_16_91_0_6 bool "binutils 2.16.91.0.6" endchoice -config BR2_BINUTILS_VERSION +config BINUTILS_VERSION string - default "2.15.94.0.2" if BR2_BINUTILS_VERSION_2_15_94_0_2 - default "2.16.1" if BR2_BINUTILS_VERSION_2_16_1 || !CONFIG_DEVEL - default "2.16.90.0.3" if BR2_BINUTILS_VERSION_2_16_90_0_3 - default "2.16.91.0.1" if BR2_BINUTILS_VERSION_2_16_91_0_1 - default "2.16.91.0.2" if BR2_BINUTILS_VERSION_2_16_91_0_2 - default "2.16.91.0.6" if BR2_BINUTILS_VERSION_2_16_91_0_6 + prompt "Binutils Version" if (TOOLCHAINOPTS && NULL) + default "2.15.94.0.2" if BINUTILS_VERSION_2_15_94_0_2 + default "2.16.1" if BINUTILS_VERSION_2_16_1 + default "2.16.90.0.3" if BINUTILS_VERSION_2_16_90_0_3 + default "2.16.91.0.1" if BINUTILS_VERSION_2_16_91_0_1 + default "2.16.91.0.2" if BINUTILS_VERSION_2_16_91_0_2 + default "2.16.91.0.6" if BINUTILS_VERSION_2_16_91_0_6 + default "2.16.1" + + diff --git a/openwrt/toolchain/gcc/Config.in b/openwrt/toolchain/gcc/Config.in index 5d525bd8bc7..0835b5c8a13 100644 --- a/openwrt/toolchain/gcc/Config.in +++ b/openwrt/toolchain/gcc/Config.in @@ -1,88 +1,62 @@ # Choose gcc version. -# WARNING -- 2.95 currently only builds for i386, arm, mips*, and powerpc. -# WARNING -- 2.95 does not currently build natively for the target. - -if CONFIG_DEVEL - comment "Gcc Options" -endif - - -# the choice option below is completely ignored -# if CONFIG_DEVEL isn't set, so we have to set -# these manually ... annoying. -config BR2_GCC_VERSION_3_4_4 - bool - default y if BR2_LINUX_2_4_BRCM - -config BR2_GCC_VERSION_4_0_3 - bool - default y if BR2_LINUX_2_6_ARUBA choice - prompt "GCC compiler Version" if CONFIG_DEVEL - default BR2_GCC_VERSION_4_0_3 if BR2_LINUX_2_6_ARUBA - default BR2_GCC_VERSION_3_4_4 if BR2_LINUX_2_4_BRCM - default BR2_GCC_VERSION_3_4_6 + prompt "GCC compiler Version" if TOOLCHAINOPTS + default GCC_VERSION_4_0_3 if LINUX_2_6_ARUBA + default GCC_VERSION_3_4_4 if LINUX_2_4_BRCM + default GCC_VERSION_3_4_6 help Select the version of gcc you wish to use. - config BR2_GCC_VERSION_3_4_4 + config GCC_VERSION_3_4_4 bool "gcc 3.4.4" - config BR2_GCC_VERSION_3_4_5 + config GCC_VERSION_3_4_5 bool "gcc 3.4.5" - config BR2_GCC_VERSION_3_4_6 + config GCC_VERSION_3_4_6 bool "gcc 3.4.6" - config BR2_GCC_VERSION_4_0_2 + config GCC_VERSION_4_0_2 bool "gcc 4.0.2" - config BR2_GCC_VERSION_4_0_3 + config GCC_VERSION_4_0_3 bool "gcc 4.0.3" - config BR2_GCC_VERSION_4_1_0 + config GCC_VERSION_4_1_0 bool "gcc 4.1.0" endchoice -# more nasty hacks -config BR2_PACKAGE_LIBGCC +config PACKAGE_LIBGCC tristate - default y if BR2_GCC_VERSION_4_0_2 || BR2_GCC_VERSION_4_0_3 || BR2_GCC_VERSION_4_1_0 - default m if CONFIG_DEVEL - default n + prompt "libgcc package" if TOOLCHAINOPTS + default y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0 + default m -config BR2_GCC_VERSION +config GCC_VERSION string - default "3.4.4" if BR2_GCC_VERSION_3_4_4 - default "3.4.5" if BR2_GCC_VERSION_3_4_5 - default "3.4.6" if BR2_GCC_VERSION_3_4_6 - default "4.0.2" if BR2_GCC_VERSION_4_0_2 - default "4.0.3" if BR2_GCC_VERSION_4_0_3 - default "4.1.0" if BR2_GCC_VERSION_4_1_0 + prompt "GCC compiler Version" if (TOOLCHAINOPTS && NULL) + default "3.4.4" if GCC_VERSION_3_4_4 || LINUX_2_4_BRCM + default "3.4.5" if GCC_VERSION_3_4_5 + default "3.4.6" if GCC_VERSION_3_4_6 + default "4.0.2" if GCC_VERSION_4_0_2 + default "4.0.3" if GCC_VERSION_4_0_3 || LINUX_2_6_ARUBA + default "4.1.0" if GCC_VERSION_4_1_0 default "3.4.6" -config BR2_GCC_USE_SJLJ_EXCEPTIONS +config EXTRA_GCC_CONFIG_OPTIONS string -# default "--enable-sjlj-exceptions" - default "" - help - Currently the unwind stuff seems to work for staticly linked apps - but not dynamic. So use setjmp/longjmp exceptions by default. - -config BR2_EXTRA_GCC_CONFIG_OPTIONS - string - prompt "Additional gcc options" if CONFIG_DEVEL + prompt "Additional gcc options" if TOOLCHAINOPTS default "" help Any additional gcc options you may want to include.... -config BR2_INSTALL_LIBSTDCPP +config INSTALL_LIBSTDCPP bool - prompt "Build/install c++ compiler and libstdc++?" if CONFIG_DEVEL + prompt "Build/install c++ compiler and libstdc++?" if TOOLCHAINOPTS default y help Build/install c++ compiler and libstdc++? diff --git a/openwrt/toolchain/uClibc/Config.in b/openwrt/toolchain/uClibc/Config.in deleted file mode 100644 index 4b016c951f7..00000000000 --- a/openwrt/toolchain/uClibc/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -# Choose uClibc options -# -if CONFIG_DEVEL - comment "uClibc Options" -endif - -config BR2_UCLIBC_VERSION_SNAPSHOT - bool - prompt "Use the daily snapshot of uClibc?" if CONFIG_DEVEL - default n - help - Would you like to use the latest daily snapshot? - -config BR2_USE_UCLIBC_SNAPSHOT - string - default "snapshot" - depends on BR2_UCLIBC_VERSION_SNAPSHOT - From cdd74416bc3e33e3f234859674747595631d092a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Apr 2006 00:12:18 +0000 Subject: [PATCH 018/757] more cleanups and a new menuconfig generator SVN-Revision: 3685 --- openwrt/Config.in | 2 +- openwrt/Makefile | 3 +- openwrt/package/Config.in | 11 ----- openwrt/package/busybox/Makefile | 1 + openwrt/package/iptables/Makefile | 9 ++-- openwrt/package/rules.mk | 20 ++++++-- openwrt/scripts/gen_menuconfig.pl | 82 +++++++++++++++++++++++++++++++ openwrt/target/Config.in | 2 +- 8 files changed, 108 insertions(+), 22 deletions(-) delete mode 100644 openwrt/package/Config.in create mode 100755 openwrt/scripts/gen_menuconfig.pl diff --git a/openwrt/Config.in b/openwrt/Config.in index 7e4d29e7d7d..71f05689770 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -34,5 +34,5 @@ config JLEVEL Number of jobs to run simultanesouly source "toolchain/Config.in" -source "package/Config.in" +source ".config.in" diff --git a/openwrt/Makefile b/openwrt/Makefile index d82d6180e32..b938c241f9f 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -50,6 +50,7 @@ endif done > $@ .config.in: .pkginfo + ./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ pkginfo-clean: -rm -f .pkginfo .config.in @@ -63,7 +64,7 @@ scripts/config/conf: .config.in menuconfig: scripts/config/mconf $< Config.in -config: scripts/config/mconf +config: scripts/config/conf $< Config.in config-clean: diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in deleted file mode 100644 index a0961bf6672..00000000000 --- a/openwrt/package/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -# - -menu "OpenWrt Package Selection" - -comment "Package categories" - -menu "Base system" -endmenu - -endmenu - diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index a5830764e5f..5ccbe225144 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -18,6 +18,7 @@ define Package/busybox CONFIGFILE:=config/Config.in SECTION:=base CATEGORY:=Base system +DEFAULT:=y TITLE:=Core utilities for embedded Linux DESCRIPTION:=The Swiss Army Knife of embedded Linux. It slices, it dices, it\\\ makes Julian Fries. diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 56ab594174b..cc7c84a0d57 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -28,6 +28,8 @@ endif define Package/iptables SECTION:=net CATEGORY:=Base system +MENU:=1 +DEFAULT:=y TITLE:=IPv4 firewall administration tool URL:=http://netfilter.org/ endef @@ -186,10 +188,6 @@ define Package/ip6tables/install $(RSTRIP) $(1) endef -$(eval $(call BuildPackage,iptables)) -$(eval $(call BuildPackage,iptables-utils)) -$(eval $(call BuildPackage,ip6tables)) - define BuildPlugin define Package/$(1)/install install -m0755 -d $$(1)/usr/lib/iptables @@ -206,6 +204,8 @@ endef L7_INSTALL:=mkdir -p $$(1)/etc/l7-protocols; \ $(CP) files/l7/*.pat $$(1)/etc/l7-protocols/ +$(eval $(call BuildPackage,iptables)) +$(eval $(call BuildPackage,iptables-utils)) $(eval $(call BuildPlugin,iptables-mod-conntrack,$(IPT_CONNTRACK-m))) $(eval $(call BuildPlugin,iptables-mod-extra,$(IPT_EXTRA-m))) $(eval $(call BuildPlugin,iptables-mod-filter,$(IPT_FILTER-m),$(L7_INSTALL))) @@ -214,6 +214,7 @@ $(eval $(call BuildPlugin,iptables-mod-ipopt,$(IPT_IPOPT-m))) $(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m))) $(eval $(call BuildPlugin,iptables-mod-nat,$(IPT_NAT-m))) $(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m))) +$(eval $(call BuildPackage,ip6tables)) $(STAGING_DIR)/usr/lib/libipq.a: $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index ac9b98d74c4..2ff710ac847 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -46,6 +46,8 @@ SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) PKGARCH:=$(ARCH) PRIORITY:=optional +DEFAULT:= +MENU:= TITLE:= DESCRIPTION:= endef @@ -96,11 +98,21 @@ endif IDEPEND_$(1):=$$(strip $$(DEPENDS)) DUMPINFO += \ - echo "Package: $(1)"; \ + echo "Package: $(1)"; +ifneq ($(MENU),) +DUMPINFO += \ + echo "Menu: $(MENU)"; +endif +ifneq ($(DEFAULT),) +DUMPINFO += \ + echo "Default: $(DEFAULT)"; +endif +DUMPINFO += \ echo "Version: $(VERSION)"; \ - echo "Depends: $(IDEPEND_$(1))"; \ + echo "Depends: $$(IDEPEND_$(1))"; \ + echo "Category: $(CATEGORY)"; \ echo "Title: $(TITLE)"; \ - echo "$(DESCRIPTION)" | sed -e 's,\\,\n,g'; \ + echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; \ echo; \ echo "$(URL)"; \ echo "@@"; @@ -110,7 +122,7 @@ $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control - echo "Depends: $(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control + echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl new file mode 100755 index 00000000000..70e31a45f5b --- /dev/null +++ b/openwrt/scripts/gen_menuconfig.pl @@ -0,0 +1,82 @@ +#!/usr/bin/perl +use strict; + +my $src; +my $makefile; +my $pkg; +my %category; + +sub print_category($) { + my $cat = shift; + + return unless $category{$cat}; + + print "menu \"$cat\"\n\n"; + my %spkg = %{$category{$cat}}; + foreach my $spkg (sort {uc($a) cmp uc($b)} keys %spkg) { + foreach my $pkg (@{$spkg{$spkg}}) { + my $title = $pkg->{name}; + my $c = (72 - length($pkg->{name}) - length($pkg->{title})); + if ($c > 0) { + $title .= ("." x $c). " ". $pkg->{title}; + } + print "\t"; + $pkg->{menu} and print "menu"; + print "config PACKAGE_".$pkg->{name}."\n"; + print "\t\ttristate \"$title\"\n"; + print "\t\tdefault ".$pkg->{default}."\n"; + foreach my $depend (@{$pkg->{depends}}) { + print "\t\tdepends PACKAGE_$depend\n"; + } + print "\n" + } + } + print "endmenu\n\n"; + + undef $category{$cat}; +} + +my $line; +while ($line = <>) { + chomp $line; + $line =~ /^Source-Makefile: \s*(.+\/([^\/]+)\/Makefile)\s*$/ and do { + $makefile = $1; + $src = $2; + undef $pkg; + }; + $line =~ /^Package: \s*(.+)\s*$/ and do { + $pkg = {}; + $pkg->{src} = $src; + $pkg->{makefile} = $makefile; + $pkg->{name} = $1; + $pkg->{default} = "m if ALL"; + }; + $line =~ /^Version: \s*(.+)\s*$/ and $pkg->{version} = $1; + $line =~ /^Title: \s*(.+)\s*$/ and $pkg->{title} = $1; + $line =~ /^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1; + $line =~ /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1; + $line =~ /^Depends: \s*(.+)\s*$/ and do { + my @dep = split /,\s*/, $1; + $pkg->{depends} = \@dep; + }; + $line =~ /^Category: \s*(.+)\s*$/ and do { + $pkg->{category} = $1; + defined $category{$1} or $category{$1} = {}; + defined $category{$1}->{$src} or $category{$1}->{$src} = []; + push @{$category{$1}->{$src}}, $pkg; + }; + $line =~ /^Description: \s*(.*)\s*$/ and do { + my $desc = $1; + my $line; + while (<>) { + last if /^@@/; + $desc .= $1; + } + $pkg->{description} = $desc; + } +} + +print_category 'Base system'; +foreach my $cat (keys %category) { + print_category $cat; +} diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 80e9847d625..7f07ff0ac10 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -69,7 +69,7 @@ config LINUX_2_6_AU1000 bool "au1000 [2.6]" select mipsel select LINUX_2_6 - select LINUX_PCMCIA_SUPPORT + select PCMCIA_SUPPORT help Build firmware for AMD Alchemy 1500 boards (e.g. 4G-Systems Mesh/Access Cube ...) From 519c9c34e7ac20ccd86e6618eefe69f1eb2ef242 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Apr 2006 00:37:58 +0000 Subject: [PATCH 019/757] clean up package titles/descriptions SVN-Revision: 3686 --- openwrt/package/busybox/Makefile | 4 ++-- openwrt/package/iptables/Makefile | 38 +++++++++++++++++++------------ openwrt/package/rules.mk | 18 +++++++++------ 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 5ccbe225144..812e12a8935 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -20,8 +20,8 @@ SECTION:=base CATEGORY:=Base system DEFAULT:=y TITLE:=Core utilities for embedded Linux -DESCRIPTION:=The Swiss Army Knife of embedded Linux. It slices, it dices, it\\\ -makes Julian Fries. +DESCRIPTION:=The Swiss Army Knife of embedded Linux. \\\ +It slices, it dices, it makes Julian Fries. URL:=http://busybox.net/ endef diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index cc7c84a0d57..bca0610614a 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -38,8 +38,9 @@ define Package/iptables-mod-conntrack SECTION:=net CATEGORY:=Base system DEPENDS:=iptables -TITLE:=iptables extensions for connection tracking -DESCRIPTION:=Includes: \\\ +TITLE:=connection tracking modules +DESCRIPTION:=iptables extensions for connection tracking \\\ +Includes: \\\ * libipt_conntrack \\\ * libipt_helper \\\ * libipt_connmark/CONNMARK @@ -50,8 +51,9 @@ define Package/iptables-mod-filter SECTION:=net CATEGORY:=Base system DEPENDS:=iptables -TITLE:=iptables extensions for packet content inspection -DESCRIPTION:=Includes: \\\ +TITLE:=filter modules +DESCRIPTION:=iptables extensions for packet content inspection\\\ +Includes: \\\ * libipt_ipp2p \\\ * libipt_layer7 @@ -61,8 +63,9 @@ define Package/iptables-mod-imq SECTION:=net CATEGORY:=Base system DEPENDS:=iptables -TITLE:=iptables extension for IMQ support -DESCRIPTION:=Includes: \\\ +TITLE:=IMQ support +DESCRIPTION:=iptables extension for IMQ support\\\ +Includes: \\\ * libipt_IMQ endef @@ -71,8 +74,9 @@ define Package/iptables-mod-ipopt SECTION:=net CATEGORY:=Base system DEPENDS:=iptables -TITLE:=iptables extensions for matching/changing IP packet options -DESCRIPTION:=Includes: \\\ +TITLE:=IP/Packet option modules +DESCRIPTION:=iptables extensions for matching/changing IP packet options\\\ +Includes: \\\ * libipt_dscp/DSCP \\\ * libipt_ecn/ECN \\\ * libipt_length \\\ @@ -88,8 +92,9 @@ define Package/iptables-mod-ipsec SECTION:=net CATEGORY:=Base system DEPENDS:=iptables -TITLE:=iptables extensions for matching ipsec traffic -DESCRIPTION:=Includes: \\\ +TITLE:=IPSec extensions +DESCRIPTION:=iptables extensions for matching ipsec traffic\\\ +Includes: \\\ * libipt_ah \\\ * libipt_esp @@ -99,8 +104,9 @@ define Package/iptables-mod-nat SECTION:=net CATEGORY:=Base system DEPENDS:=iptables -TITLE:=iptables extensions for different NAT targets -DESCRIPTION:=Includes: \\\ +TITLE:=extra NAT targets +DESCRIPTION:=iptables extensions for different NAT targets\\\ +Includes: \\\ * libipt_REDIRECT endef @@ -108,8 +114,9 @@ define Package/iptables-mod-ulog SECTION:=net CATEGORY:=Base system DEPENDS:=iptables -TITLE:=iptables extensions for user-space packet logging -DESCRIPTION:=Includes: \\\ +TITLE:=user-space packet logging +DESCRIPTION:=iptables extensions for user-space packet logging\\\ +Includes: \\\ * libipt_ULOG endef @@ -118,7 +125,8 @@ SECTION:=net CATEGORY:=Base system DEPENDS:=iptables TITLE:=other extra iptables extensions -DESCRIPTION:=Includes: \\\ +DESCRIPTION:=other extra iptables extensions\\\ +Includes: \\\ * libipt_limit \\\ * libipt_owner \\\ * libipt_physdev \\\ diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 2ff710ac847..5316debca34 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -56,21 +56,26 @@ define BuildPackage $(eval $(call Package/Default)) $(eval $(call Package/$(1))) -ifeq ($$(TITLE),) +ifeq ($(TITLE),) $$(error Package $(1) has no TITLE) endif -ifeq ($$(CATEGORY),) +ifeq ($(CATEGORY),) $$(error Package $(1) has no CATEGORY) endif -ifeq ($$(PRIORITY),) +ifeq ($(PRIORITY),) $$(error Package $(1) has no PRIORITY) endif -ifeq ($$(VERSION),) +ifeq ($(VERSION),) $$(error Package $(1) has no VERSION) endif -ifeq ($$(PKGARCH),) +ifeq ($(PKGARCH),) PKGARCH:=$(ARCH) endif +$(eval +ifeq ($(DESCRIPTION),) +DESCRIPTION:=$(TITLE) +endif +) IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) @@ -128,8 +133,7 @@ $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control - echo "Description: $(TITLE)" >> $$(IDIR_$(1))/CONTROL/control - echo " $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control + echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control chmod 644 $$(IDIR_$(1))/CONTROL/control for file in conffiles preinst postinst prerm postrm; do \ [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ From 6a795b4d7bf446f21b4d8daea2d4aa83b6815c52 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Apr 2006 00:50:48 +0000 Subject: [PATCH 020/757] include package description in menuconfig help SVN-Revision: 3687 --- openwrt/package/rules.mk | 8 ++++++-- openwrt/scripts/gen_menuconfig.pl | 10 ++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 5316debca34..230b9669bdc 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -117,9 +117,13 @@ DUMPINFO += \ echo "Depends: $$(IDEPEND_$(1))"; \ echo "Category: $(CATEGORY)"; \ echo "Title: $(TITLE)"; \ - echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; \ + echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; +ifneq ($(URL),) +DUMPINFO += \ echo; \ - echo "$(URL)"; \ + echo "$(URL)"; +endif +DUMPINFO += \ echo "@@"; diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index 70e31a45f5b..3f4476a2c6a 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -28,6 +28,8 @@ sub print_category($) { foreach my $depend (@{$pkg->{depends}}) { print "\t\tdepends PACKAGE_$depend\n"; } + print "\t\thelp\n"; + print $pkg->{description}; print "\n" } } @@ -66,11 +68,11 @@ while ($line = <>) { push @{$category{$1}->{$src}}, $pkg; }; $line =~ /^Description: \s*(.*)\s*$/ and do { - my $desc = $1; + my $desc = "\t\t$1\n\n"; my $line; - while (<>) { - last if /^@@/; - $desc .= $1; + while ($line = <>) { + last if $line =~ /^@@/; + $desc .= "\t\t$line"; } $pkg->{description} = $desc; } From 3c5805165b45dae30c506ede25e7654e29ef8c27 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Apr 2006 02:19:38 +0000 Subject: [PATCH 021/757] fix detection of removed packages SVN-Revision: 3688 --- openwrt/scripts/timestamp.pl | 1 - 1 file changed, 1 deletion(-) diff --git a/openwrt/scripts/timestamp.pl b/openwrt/scripts/timestamp.pl index a4bb7ecda09..dc47e24aae4 100755 --- a/openwrt/scripts/timestamp.pl +++ b/openwrt/scripts/timestamp.pl @@ -6,7 +6,6 @@ sub get_ts($$) { my $options = shift; my $ts = 0; my $fn = ""; - -d "$path" and $path .= "/*"; open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* $options 2>/dev/null |"; while (<FIND>) { chomp; From ebb58643eb864c2d26c2a47fbf87ee96a8580495 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 21 Apr 2006 08:39:19 +0000 Subject: [PATCH 022/757] convert bridge package to buildroot-ng SVN-Revision: 3689 --- openwrt/package/bridge/Config.in | 10 ------- openwrt/package/bridge/Makefile | 34 +++++++++++++++------- openwrt/package/bridge/ipkg/bridge.control | 4 --- 3 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 openwrt/package/bridge/Config.in delete mode 100644 openwrt/package/bridge/ipkg/bridge.control diff --git a/openwrt/package/bridge/Config.in b/openwrt/package/bridge/Config.in deleted file mode 100644 index b7f7babc686..00000000000 --- a/openwrt/package/bridge/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_BRIDGE - prompt "bridge............................ Ethernet bridging configuration utility" - tristate - default y - help - Manage ethernet bridging; a way to connect networks together to - form a larger network. - - http://bridge.sourceforge.net/ - diff --git a/openwrt/package/bridge/Makefile b/openwrt/package/bridge/Makefile index 601373b9949..be52b2a9754 100644 --- a/openwrt/package/bridge/Makefile +++ b/openwrt/package/bridge/Makefile @@ -5,18 +5,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bridge PKG_VERSION:=1.0.6 PKG_RELEASE:=1 -PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd -PKG_SOURCE_URL:=@SF/bridge -PKG_SOURCE:=bridge-utils-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/bridge-utils-$(PKG_VERSION) +PKG_SOURCE:=bridge-utils-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/bridge +PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,BRIDGE,bridge,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ +define Package/bridge +SECTION:=base +CATEGORY:=Network +DEFAULT:=y +TITLE:=Ethernet bridging configuration utility +DESCRIPTION:=Manage ethernet bridging; a way to connect networks together to\\\ +form a larger network. +URL:=http://bridge.sourceforge.net/ +endef + +define Build/Configure $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ ./configure \ @@ -34,16 +42,20 @@ $(PKG_BUILD_DIR)/.configured: --mandir=/usr/man \ --infodir=/usr/info \ $(DISABLE_NLS) \ - --with-linux-headers=$(LINUX_DIR) \ - ); - touch $@ + --with-linux-headers=$(LINUX_DIR) +endef -$(PKG_BUILD_DIR)/.built: + +define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) touch $@ +endef -$(IPKG_BRIDGE): +define Package/busybox/install mkdir -p $(IDIR_BRIDGE)/usr/sbin $(CP) $(PKG_BUILD_DIR)/brctl/brctl $(IDIR_BRIDGE)/usr/sbin/ $(STRIP) $(IDIR_BRIDGE)/usr/sbin/brctl $(IPKG_BUILD) $(IDIR_BRIDGE) $(PACKAGE_DIR) +endef + +$(eval $(call BuildPackage,bridge)) diff --git a/openwrt/package/bridge/ipkg/bridge.control b/openwrt/package/bridge/ipkg/bridge.control deleted file mode 100644 index cc7c9d9c835..00000000000 --- a/openwrt/package/bridge/ipkg/bridge.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: bridge -Priority: essential -Section: net -Description: Ethernet bridging tools From 5606b2216603d2539af73cf2b23f1bfaa2212490 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Apr 2006 09:55:30 +0000 Subject: [PATCH 023/757] fix bridge build and description, add default configure command to rules.mk, use CONFIG_ as prefix for package selction variables SVN-Revision: 3690 --- openwrt/package/bridge/Makefile | 24 +++--------------------- openwrt/package/rules.mk | 25 ++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/openwrt/package/bridge/Makefile b/openwrt/package/bridge/Makefile index be52b2a9754..18ea1dd2caf 100644 --- a/openwrt/package/bridge/Makefile +++ b/openwrt/package/bridge/Makefile @@ -19,36 +19,18 @@ SECTION:=base CATEGORY:=Network DEFAULT:=y TITLE:=Ethernet bridging configuration utility -DESCRIPTION:=Manage ethernet bridging; a way to connect networks together to\\\ +DESCRIPTION:=Ethernet bridging configuration utility\\\ +Manage ethernet bridging; a way to connect networks together to\\\ form a larger network. URL:=http://bridge.sourceforge.net/ endef define Build/Configure - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - --with-linux-headers=$(LINUX_DIR) +$(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR)) endef - define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) - touch $@ endef define Package/busybox/install diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 230b9669bdc..4faf9ffcd36 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -81,13 +81,13 @@ IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list -ifneq ($(PACKAGE_$(1)),) +ifneq ($(CONFIG_PACKAGE_$(1)),) COMPILE_$(1):=1 endif ifneq ($(DEVELOPER),) COMPILE_$(1):=1 endif -ifeq ($(PACKAGE_$(1)),y) +ifeq ($(CONFIG_PACKAGE_$(1)),y) install-targets: $$(INFO_$(1)) endif @@ -188,10 +188,29 @@ endef define Build/Configure/Default # TODO: add configurable default command + (cd $(PKG_BUILD_DIR); \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(1); \ + ) endef define Build/Configure -$(call Build/Configure/Default) endef define Build/Compile/Default From 8347d5939a8e657dddaa5dc2913103fae27aa583 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 21 Apr 2006 09:56:20 +0000 Subject: [PATCH 024/757] fix more BR2 crap SVN-Revision: 3691 --- openwrt/rules.mk | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 4f0f49e11ff..c23d41803b6 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -1,6 +1,4 @@ -ifeq ($(DUMP),) include $(TOPDIR)/.config -endif SHELL=/bin/bash export SHELL @@ -43,17 +41,17 @@ endif CP=cp -fpR MAKE1=make -MAKEFLAGS=-j$(BR2_JLEVEL) V=$(V) $(EXTRA_MAKEFLAGS) +MAKEFLAGS=-j$(CONFIG_JLEVEL) V=$(V) $(EXTRA_MAKEFLAGS) # Strip off the annoying quoting -ARCH:=$(strip $(subst ",, $(BR2_ARCH))) -WGET:=$(strip $(subst ",, $(BR2_WGET))) -GCC_VERSION:=$(strip $(subst ",, $(BR2_GCC_VERSION))) -GCC_USE_SJLJ_EXCEPTIONS:=$(strip $(subst ",, $(BR2_GCC_USE_SJLJ_EXCEPTIONS))) -TARGET_OPTIMIZATION:=$(strip $(subst ",, $(BR2_TARGET_OPTIMIZATION))) +ARCH:=$(strip $(subst ",, $(CONFIG_ARCH))) +WGET:=$(strip $(subst ",, $(CONFIG_WGET))) +GCC_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION))) +GCC_USE_SJLJ_EXCEPTIONS:=$(strip $(subst ",, $(CONFIG_GCC_USE_SJLJ_EXCEPTIONS))) +TARGET_OPTIMIZATION:=$(strip $(subst ",, $(CONFIG_TARGET_OPTIMIZATION))) #"))"))"))"))")) # for vim's broken syntax highlighting :) -ifeq ($(BR2_SOFT_FLOAT),y) +ifeq ($(CONFIG_SOFT_FLOAT),y) # gcc 3.4.x soft float configuration is different than previous versions. ifeq ($(findstring 3.4.,$(GCC_VERSION)),3.4.) SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft @@ -69,13 +67,13 @@ ARCH_FPU_SUFFIX:= endif -ifeq ($(BR2_TAR_VERBOSITY),y) +ifeq ($(CONFIG_TAR_VERBOSITY),y) TAR_OPTIONS=-xvf else TAR_OPTIONS=-xf endif -ifneq ($(BR2_LARGEFILE),y) +ifneq ($(CONFIG_LARGEFILE),y) DISABLE_LARGEFILE= --disable-largefile endif TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) @@ -136,7 +134,7 @@ else DISABLE_NLS:=--disable-nls endif -ifeq ($(BR2_ENABLE_MULTILIB),y) +ifeq ($(CONFIG_ENABLE_MULTILIB),y) MULTILIB:=--enable-multilib endif From ac2bee9082803a381cda32c87f1d7151f67fa6d5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Apr 2006 09:59:15 +0000 Subject: [PATCH 025/757] remove todo message SVN-Revision: 3692 --- openwrt/package/rules.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 4faf9ffcd36..916bb0f277f 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -187,7 +187,6 @@ $(call Build/Prepare/Default) endef define Build/Configure/Default -# TODO: add configurable default command (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ From 170f0e635c21e459495016d7acb5da00c9634363 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 21 Apr 2006 10:03:46 +0000 Subject: [PATCH 026/757] Add default compile target & use it for bridge and busybox SVN-Revision: 3693 --- openwrt/package/bridge/Makefile | 4 ---- openwrt/package/busybox/Makefile | 9 --------- openwrt/package/rules.mk | 8 +++++++- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/openwrt/package/bridge/Makefile b/openwrt/package/bridge/Makefile index 18ea1dd2caf..bd71165b6d2 100644 --- a/openwrt/package/bridge/Makefile +++ b/openwrt/package/bridge/Makefile @@ -29,10 +29,6 @@ define Build/Configure $(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR)) endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) -endef - define Package/busybox/install mkdir -p $(IDIR_BRIDGE)/usr/sbin $(CP) $(PKG_BUILD_DIR)/brctl/brctl $(IDIR_BRIDGE)/usr/sbin/ diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 812e12a8935..3f061b82dbb 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -30,15 +30,6 @@ define Build/Configure yes '' | $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" -C $(PKG_BUILD_DIR) oldconfig endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - CROSS="$(TARGET_CROSS)" \ - PREFIX="$(IDIR_BUSYBOX)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ - ARCH="$(ARCH)" -endef - define Package/busybox/install $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(1)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 916bb0f277f..17f6c61ef39 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -213,7 +213,13 @@ define Build/Configure endef define Build/Compile/Default -# TODO: add configurable default command + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) \ + CROSS="$(TARGET_CROSS)" \ + PREFIX="$$(IDIR_$(1))" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + ARCH="$(ARCH)" \ + DESTDIR="$$(IDIR_$(1))" endef define Build/Compile From 53e0adc43d634c00ebbe22676e6eebde415528ae Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Apr 2006 10:06:31 +0000 Subject: [PATCH 027/757] fix menuconfig SVN-Revision: 3694 --- openwrt/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index c23d41803b6..a7167ca0253 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -1,4 +1,6 @@ +ifeq ($(DUMP),) include $(TOPDIR)/.config +endif SHELL=/bin/bash export SHELL From 2e8ae650fe965145c428812a298854b57f55a690 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Apr 2006 10:08:47 +0000 Subject: [PATCH 028/757] move package/sdk to target/sdk SVN-Revision: 3695 --- openwrt/{package => target}/sdk/Config.in | 0 openwrt/{package => target}/sdk/Makefile | 0 openwrt/{package => target}/sdk/files/Makefile.sdk | 0 openwrt/{package => target}/sdk/files/README.SDK | 0 openwrt/{package => target}/sdk/files/depend.mk | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename openwrt/{package => target}/sdk/Config.in (100%) rename openwrt/{package => target}/sdk/Makefile (100%) rename openwrt/{package => target}/sdk/files/Makefile.sdk (100%) rename openwrt/{package => target}/sdk/files/README.SDK (100%) rename openwrt/{package => target}/sdk/files/depend.mk (100%) diff --git a/openwrt/package/sdk/Config.in b/openwrt/target/sdk/Config.in similarity index 100% rename from openwrt/package/sdk/Config.in rename to openwrt/target/sdk/Config.in diff --git a/openwrt/package/sdk/Makefile b/openwrt/target/sdk/Makefile similarity index 100% rename from openwrt/package/sdk/Makefile rename to openwrt/target/sdk/Makefile diff --git a/openwrt/package/sdk/files/Makefile.sdk b/openwrt/target/sdk/files/Makefile.sdk similarity index 100% rename from openwrt/package/sdk/files/Makefile.sdk rename to openwrt/target/sdk/files/Makefile.sdk diff --git a/openwrt/package/sdk/files/README.SDK b/openwrt/target/sdk/files/README.SDK similarity index 100% rename from openwrt/package/sdk/files/README.SDK rename to openwrt/target/sdk/files/README.SDK diff --git a/openwrt/package/sdk/files/depend.mk b/openwrt/target/sdk/files/depend.mk similarity index 100% rename from openwrt/package/sdk/files/depend.mk rename to openwrt/target/sdk/files/depend.mk From 46c52a3d5aee153a286c873839d6a65bb5e0e8b2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 29 Apr 2006 21:43:26 +0000 Subject: [PATCH 029/757] install more iptables development stuff into the staging dir SVN-Revision: 3713 --- openwrt/package/iptables/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index bca0610614a..fc57f9c701f 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -226,10 +226,12 @@ $(eval $(call BuildPackage,ip6tables)) $(STAGING_DIR)/usr/lib/libipq.a: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libipq.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipq.a $(STAGING_DIR)/usr/lib/ + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \ + KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ + DESTDIR="$(STAGING_DIR)" \ + install install-devel install-dev: $(STAGING_DIR)/usr/lib/libipq.a uninstall-dev: From 8656643c6aa90bda01e8718bb634b1ce9f5befe5 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 9 May 2006 23:19:52 +0000 Subject: [PATCH 030/757] convert to new template SVN-Revision: 3744 --- openwrt/package/dnsmasq/Config.in | 10 ------ openwrt/package/dnsmasq/Makefile | 33 ++++++++++--------- .../package/dnsmasq/ipkg/dnsmasq.conffiles | 1 - openwrt/package/dnsmasq/ipkg/dnsmasq.control | 4 --- 4 files changed, 17 insertions(+), 31 deletions(-) delete mode 100644 openwrt/package/dnsmasq/Config.in delete mode 100644 openwrt/package/dnsmasq/ipkg/dnsmasq.conffiles delete mode 100644 openwrt/package/dnsmasq/ipkg/dnsmasq.control diff --git a/openwrt/package/dnsmasq/Config.in b/openwrt/package/dnsmasq/Config.in deleted file mode 100644 index b20bf73620c..00000000000 --- a/openwrt/package/dnsmasq/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_DNSMASQ - prompt "dnsmasq........................... Lightweight DNS and DHCP server" - tristate - default y - help - A lightweight DNS and DHCP server. It is intended to provide - coupled DNS and DHCP service to a LAN. - - http://www.thekelleys.org.uk/dnsmasq/ - diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index 88bd9f21b9d..19c6d35627b 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -5,32 +5,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_VERSION:=2.27 PKG_RELEASE:=1 -PKG_MD5SUM:=489198ec87101087043adc98bbe062dc -PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq +PKG_MD5SUM:=489198ec87101087043adc98bbe062dc PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,DNSMASQ,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/dnsmasq +SECTION:=base +CATEGORY:=Network +DEFAULT:=y +TITLE:=A lightweight DNS and DHCP server +DESCRIPTION:=A lightweight DNS and DHCP server. It is intended to provide \\\ +coupled DNS and DHCP service to a LAN. +URL:=http://www.thekelleys.org.uk/dnsmasq/ +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" \ - BINDIR=/usr/sbin MANDIR=/usr/man - touch $@ - -$(IPKG_DNSMASQ): +define Package/dnsmasq/install install -d -m0755 $(IDIR_DNSMASQ)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(IDIR_DNSMASQ)/usr/sbin/ - $(STRIP) $(IDIR_DNSMASQ)/usr/sbin/* install -d -m0755 $(IDIR_DNSMASQ)/etc/init.d/ + install -m0755 $(PKG_BUILD_DIR)/src/dnsmasq $(IDIR_DNSMASQ)/usr/sbin/ install -m0644 ./files/dnsmasq.conf $(IDIR_DNSMASQ)/etc/dnsmasq.conf install -m0755 ./files/dnsmasq.init $(IDIR_DNSMASQ)/etc/init.d/S50dnsmasq + $(RSTRIP) $(IDIR_DNSMASQ) $(IPKG_BUILD) $(IDIR_DNSMASQ) $(PACKAGE_DIR) +endef +$(eval $(call BuildPackage,dnsmasq)) diff --git a/openwrt/package/dnsmasq/ipkg/dnsmasq.conffiles b/openwrt/package/dnsmasq/ipkg/dnsmasq.conffiles deleted file mode 100644 index e30eba8f66f..00000000000 --- a/openwrt/package/dnsmasq/ipkg/dnsmasq.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/dnsmasq.conf diff --git a/openwrt/package/dnsmasq/ipkg/dnsmasq.control b/openwrt/package/dnsmasq/ipkg/dnsmasq.control deleted file mode 100644 index 6f61edc656c..00000000000 --- a/openwrt/package/dnsmasq/ipkg/dnsmasq.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: dnsmasq -Priority: essential -Section: net -Description: A lightweight DNS and DHCP server From 0f89b02a930b75cc83aad2d7197f41b95782b562 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 9 May 2006 23:20:58 +0000 Subject: [PATCH 031/757] Convert to new template SVN-Revision: 3745 --- openwrt/package/ebtables/Config.in | 9 ----- openwrt/package/ebtables/Makefile | 33 ++++++++++--------- .../package/ebtables/ipkg/ebtables.control | 5 --- 3 files changed, 17 insertions(+), 30 deletions(-) delete mode 100644 openwrt/package/ebtables/Config.in delete mode 100644 openwrt/package/ebtables/ipkg/ebtables.control diff --git a/openwrt/package/ebtables/Config.in b/openwrt/package/ebtables/Config.in deleted file mode 100644 index e8fb884f750..00000000000 --- a/openwrt/package/ebtables/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_EBTABLES - prompt "ebtables.......................... Ethernet bridge firewall administration utility" - tristate - default m if CONFIG_DEVEL - help - Ethernet Bridge Firewalling (ebtables) - - http://ebtables.sourceforge.net/ - diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index 9abd93a93a2..04adbf6e825 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -5,28 +5,29 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ebtables PKG_VERSION:=2.0.6 PKG_RELEASE:=1 -PKG_MD5SUM:=c4559af2366c764c6c42a3fdd40d60d3 -PKG_SOURCE_URL:=@SF/ebtables -PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/ebtables-v$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ebtables +PKG_MD5SUM:=c4559af2366c764c6c42a3fdd40d60d3 PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,EBTABLES,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/ebtables +SECTION:=base +CATEGORY:=Network +DEFAULT:=y +TITLE:=Ethernet bridge firewall administration utility +DESCRIPTION:=Ethernet Bridge Firewalling (ebtables) +URL:=http://ebtables.sourceforge.net/ +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ - CFLAGS="$(TARGET_CFLAGS) -Wall" - touch $@ - -$(IPKG_EBTABLES): - mkdir -p $(IDIR_EBTABLES)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/ebtables $(IDIR_EBTABLES)/usr/sbin/ +define Package/ebtables/install + install -d -m0755 $(IDIR_DNSMASQ)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/ebtables $(IDIR_EBTABLES)/usr/sbin/ebtables + $(RSTRIP) $(IDIR_EBTABLES) $(IPKG_BUILD) $(IDIR_EBTABLES) $(PACKAGE_DIR) +ended +$(eval $(call BuildPackage,ebtables)) diff --git a/openwrt/package/ebtables/ipkg/ebtables.control b/openwrt/package/ebtables/ipkg/ebtables.control deleted file mode 100644 index 5dc6a141758..00000000000 --- a/openwrt/package/ebtables/ipkg/ebtables.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ebtables -Priority: optional -Section: net -Description: Ethernet bridge firewalling software -Depends: kmod-ebtables From 453f6d160f7a131503551520a1dd2e97591f2343 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 9 May 2006 23:21:48 +0000 Subject: [PATCH 032/757] Convert to new template SVN-Revision: 3746 --- openwrt/package/ipset/Config.in | 9 -------- openwrt/package/ipset/Makefile | 28 ++++++++++++------------ openwrt/package/ipset/ipkg/ipset.control | 5 ----- 3 files changed, 14 insertions(+), 28 deletions(-) delete mode 100644 openwrt/package/ipset/Config.in delete mode 100644 openwrt/package/ipset/ipkg/ipset.control diff --git a/openwrt/package/ipset/Config.in b/openwrt/package/ipset/Config.in deleted file mode 100644 index 293292cfeab..00000000000 --- a/openwrt/package/ipset/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_IPSET - prompt "ipset............................. Netfilter ip sets administration utility" - tristate - default m if CONFIG_DEVEL - help - Netfilter ip sets administration utility - - http://ipset.netfilter.org/ - diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index 8369b29bfd0..ffaabc6fe9f 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -7,28 +7,28 @@ PKG_VERSION:=2.2.3 PKG_RELEASE:=1 PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 -PKG_SOURCE_URL:=http://ipset.netfilter.org -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-20050914.tar.bz2 PKG_BUILD_DIR:=$(BUILD_DIR)/ipset-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-20050914.tar.bz2 +PKG_SOURCE_URL:=http://ipset.netfilter.org PKG_CAT:=bzcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,IPSET,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/ipset +SECTION:=base +CATEGORY:=Network +DEFAULT:=y +DEPENDS:=kmod-iptables-extra +TITLE:=Netfilter ip sets administration utility +DESCRIPTION:=Netfilter ip sets administration utility +URL:=http://ipset.netfilter.org/ +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ - CFLAGS="$(TARGET_CFLAGS) -Wall -I$(LINUX_DIR)/include -I." \ - KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr - touch $@ - -$(IPKG_IPSET): +define Package/ipset/install $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR=$(IDIR_IPSET) PREFIX=/usr install rm -rf $(IDIR_IPSET)/usr/man $(IPKG_BUILD) $(IDIR_IPSET) $(PACKAGE_DIR) +endef +$(eval $(call BuildPackage,ipset)) diff --git a/openwrt/package/ipset/ipkg/ipset.control b/openwrt/package/ipset/ipkg/ipset.control deleted file mode 100644 index f7f6ae0e63f..00000000000 --- a/openwrt/package/ipset/ipkg/ipset.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ipset -Priority: optional -Section: net -Description: Netfilter ip sets administration utility -Depends: kmod-iptables-extra From ff9c62ed834952fd2bd6a8cd698c33ae817c0567 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 9 May 2006 23:32:56 +0000 Subject: [PATCH 033/757] change defaults to check for configure script (avoids defining a null rule otherwise) SVN-Revision: 3747 --- openwrt/package/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 17f6c61ef39..3f79b9f6be1 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -188,6 +188,7 @@ endef define Build/Configure/Default (cd $(PKG_BUILD_DIR); \ + [ -x configure ] && \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ ./configure \ From bcee262e7ae1e35ff83fbf6e12b1dbd0251b8700 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 9 May 2006 23:36:57 +0000 Subject: [PATCH 034/757] enable configure target by default SVN-Revision: 3748 --- openwrt/package/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 3f79b9f6be1..2acc2b80fd4 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -211,6 +211,7 @@ define Build/Configure/Default endef define Build/Configure +$(call Build/Configure/Default) endef define Build/Compile/Default From 49003208ab2d0ec414faefe2079c97e0a72e394c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 10 May 2006 18:17:12 +0000 Subject: [PATCH 035/757] add common functions for the new config file format SVN-Revision: 3751 --- .../base-files/default/etc/functions.sh | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 526ca52dda0..858dc286ad3 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -11,3 +11,53 @@ if_valid () ( hotplug_dev() { env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net } + +config_cb() { + return 0 +} +option_cb() { + return 0 +} + +config () { + config_cb "$@" + _C=$((${_C:-0} + 1)) + export CONFIG_SECTION="${2:-cfg${_C}}" + export CONFIG_${CONFIG_SECTION}_TYPE="$1" +} + +option () { + local varname="$1" ; shift + export CONFIG_${CONFIG_SECTION}_${varname}="$*" + option_cb "$varname" "$*" +} + +config_clear() { + [ -z "$CONFIG_SECTION" ] && return + for oldsetting in `set | grep ^CONFIG_${CONFIG_SECTION}_ | \ + sed -e 's/\(.*\)=.*$/\1/'` ; do + unset $oldsetting + done + unset CONFIG_SECTION +} + +config_load() { + local CD="" + if [ \! -e "$1" -a -e "/etc/config/$1" ]; then + cd /etc/config && local CD=1 + fi + [ -e "$1" ] && . $1 + ${CD:+cd - >/dev/null} + ${CONFIG_SECTION:+config_cb} +} + +config_get() { + case "$3" in + "") eval "echo \${CONFIG_${1}_${2}}";; + *) eval "$1=\"\${CONFIG_${2}_${3}}\"";; + esac +} + +config_set() { + export CONFIG_${1}_${2}="${3}" +} From 07425d330063f606ad4c2f351d790389b65e6847 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 10 May 2006 19:06:22 +0000 Subject: [PATCH 036/757] Convert packages to new template SVN-Revision: 3752 --- openwrt/package/bridge/Makefile | 6 +- openwrt/package/busybox/Makefile | 1 - openwrt/package/dnsmasq/Makefile | 6 +- openwrt/package/dropbear/Config.in | 14 -- openwrt/package/dropbear/Makefile | 55 +++--- .../package/dropbear/ipkg/dropbear.control | 4 - .../dropbear/ipkg/dropbearconvert.control | 5 - openwrt/package/ebtables/Makefile | 2 - openwrt/package/haserl/Config.in | 9 - openwrt/package/haserl/Makefile | 61 ++----- openwrt/package/haserl/ipkg/haserl.control | 4 - openwrt/package/ipkg/Config.in | 18 -- openwrt/package/ipkg/Makefile | 67 ------- openwrt/package/ipkg/ipkg/ipkg.control | 16 -- openwrt/package/iproute2/Config.in | 21 --- openwrt/package/iproute2/Makefile | 58 ++++-- openwrt/package/iproute2/ipkg/ip.control | 4 - openwrt/package/iproute2/ipkg/tc.control | 5 - openwrt/package/ipsec-tools/Config.in | 11 -- openwrt/package/ipsec-tools/Makefile | 43 +++-- .../ipsec-tools/ipkg/ipsec-tools.conffiles | 1 - .../ipsec-tools/ipkg/ipsec-tools.control | 5 - openwrt/package/ipset/Makefile | 1 - openwrt/package/iptables/Config.in | 167 ------------------ .../package/iptables/ipkg/iptables.conffiles | 2 - openwrt/package/mtd/Config.in | 15 -- openwrt/package/mtd/Makefile | 33 ++-- openwrt/package/mtd/ipkg/mtd-static.control | 4 - openwrt/package/mtd/ipkg/mtd.control | 4 - openwrt/package/nvram/Config.in | 8 - openwrt/package/nvram/Makefile | 32 ++-- openwrt/package/nvram/ipkg/nvram.control | 5 - openwrt/package/pcmcia-cs/Config.in | 17 -- openwrt/package/pcmcia-cs/Makefile | 43 +++-- .../pcmcia-cs/ipkg/pcmcia-utils.conffiles | 10 -- .../pcmcia-cs/ipkg/pcmcia-utils.control | 5 - openwrt/package/pptp/Makefile | 38 ++-- openwrt/package/robocfg/Config.in | 7 - openwrt/package/robocfg/Makefile | 24 +-- openwrt/package/robocfg/ipkg/robocfg.control | 4 - openwrt/package/rules.mk | 1 + openwrt/package/udev/Config.in | 11 -- openwrt/package/udev/Makefile | 46 ++--- openwrt/package/udev/ipkg/udev.conffiles | 1 - openwrt/package/udev/ipkg/udev.control | 4 - openwrt/package/wificonf/Makefile | 24 ++- openwrt/package/wireless-tools/Config.in | 7 - openwrt/package/wireless-tools/Makefile | 42 +++-- .../ipkg/wireless-tools.control | 4 - openwrt/package/zlib/Config.in | 9 - openwrt/package/zlib/Makefile | 37 ++-- openwrt/package/zlib/ipkg/zlib.control | 4 - 52 files changed, 259 insertions(+), 766 deletions(-) delete mode 100644 openwrt/package/dropbear/Config.in delete mode 100644 openwrt/package/dropbear/ipkg/dropbear.control delete mode 100644 openwrt/package/dropbear/ipkg/dropbearconvert.control delete mode 100644 openwrt/package/haserl/Config.in delete mode 100644 openwrt/package/haserl/ipkg/haserl.control delete mode 100644 openwrt/package/ipkg/Config.in delete mode 100644 openwrt/package/ipkg/Makefile delete mode 100644 openwrt/package/ipkg/ipkg/ipkg.control delete mode 100644 openwrt/package/iproute2/Config.in delete mode 100644 openwrt/package/iproute2/ipkg/ip.control delete mode 100644 openwrt/package/iproute2/ipkg/tc.control delete mode 100644 openwrt/package/ipsec-tools/Config.in delete mode 100644 openwrt/package/ipsec-tools/ipkg/ipsec-tools.conffiles delete mode 100644 openwrt/package/ipsec-tools/ipkg/ipsec-tools.control delete mode 100644 openwrt/package/iptables/Config.in delete mode 100644 openwrt/package/iptables/ipkg/iptables.conffiles delete mode 100644 openwrt/package/mtd/Config.in delete mode 100644 openwrt/package/mtd/ipkg/mtd-static.control delete mode 100644 openwrt/package/mtd/ipkg/mtd.control delete mode 100644 openwrt/package/nvram/Config.in delete mode 100644 openwrt/package/nvram/ipkg/nvram.control delete mode 100644 openwrt/package/pcmcia-cs/Config.in delete mode 100644 openwrt/package/pcmcia-cs/ipkg/pcmcia-utils.conffiles delete mode 100644 openwrt/package/pcmcia-cs/ipkg/pcmcia-utils.control delete mode 100644 openwrt/package/robocfg/Config.in delete mode 100644 openwrt/package/robocfg/ipkg/robocfg.control delete mode 100644 openwrt/package/udev/Config.in delete mode 100644 openwrt/package/udev/ipkg/udev.conffiles delete mode 100644 openwrt/package/udev/ipkg/udev.control delete mode 100644 openwrt/package/wireless-tools/Config.in delete mode 100644 openwrt/package/wireless-tools/ipkg/wireless-tools.control delete mode 100644 openwrt/package/zlib/Config.in delete mode 100644 openwrt/package/zlib/ipkg/zlib.control diff --git a/openwrt/package/bridge/Makefile b/openwrt/package/bridge/Makefile index bd71165b6d2..44856c9f166 100644 --- a/openwrt/package/bridge/Makefile +++ b/openwrt/package/bridge/Makefile @@ -30,10 +30,8 @@ $(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR)) endef define Package/busybox/install - mkdir -p $(IDIR_BRIDGE)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/brctl/brctl $(IDIR_BRIDGE)/usr/sbin/ - $(STRIP) $(IDIR_BRIDGE)/usr/sbin/brctl - $(IPKG_BUILD) $(IDIR_BRIDGE) $(PACKAGE_DIR) + install -m0755 -d $(IDIR_DNSMASQ)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/brctl/brctl $(IDIR_BRIDGE)/usr/sbin/ endef $(eval $(call BuildPackage,bridge)) diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 3f061b82dbb..23dcc1cf8dc 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -33,7 +33,6 @@ endef define Package/busybox/install $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(1)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install - $(STRIP) $(1)/bin/busybox endef $(eval $(call BuildPackage,busybox)) diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index 19c6d35627b..76b1ac0d990 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -25,13 +25,11 @@ URL:=http://www.thekelleys.org.uk/dnsmasq/ endef define Package/dnsmasq/install - install -d -m0755 $(IDIR_DNSMASQ)/usr/sbin - install -d -m0755 $(IDIR_DNSMASQ)/etc/init.d/ + install -m0755 -d $(IDIR_DNSMASQ)/usr/sbin + install -m0755 -d $(IDIR_DNSMASQ)/etc/init.d/ install -m0755 $(PKG_BUILD_DIR)/src/dnsmasq $(IDIR_DNSMASQ)/usr/sbin/ install -m0644 ./files/dnsmasq.conf $(IDIR_DNSMASQ)/etc/dnsmasq.conf install -m0755 ./files/dnsmasq.init $(IDIR_DNSMASQ)/etc/init.d/S50dnsmasq - $(RSTRIP) $(IDIR_DNSMASQ) - $(IPKG_BUILD) $(IDIR_DNSMASQ) $(PACKAGE_DIR) endef $(eval $(call BuildPackage,dnsmasq)) diff --git a/openwrt/package/dropbear/Config.in b/openwrt/package/dropbear/Config.in deleted file mode 100644 index efdc70b1a6b..00000000000 --- a/openwrt/package/dropbear/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_DROPBEAR - prompt "dropbear.......................... Small SSH 2 client/server" - tristate - default y - help - A small SSH 2 server/client designed for small memory environments. - - http://matt.ucc.asn.au/dropbear/ - -config BR2_PACKAGE_DBCONVERT - prompt "dropbearconvert................. Utility for converting SSH keys" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_DROPBEAR diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index 75eaf6e44c6..ea452f2f622 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -5,20 +5,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dropbear PKG_VERSION:=0.48.1 PKG_RELEASE:=1 -PKG_MD5SUM:=ca8e53a766faec831882831364568421 - -PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/ +PKG_MD5SUM:=ca8e53a766faec831882831364568421 +PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/dropbear +SECTION:=base +CATEGORY:=Base system +DEFAULT:=y +TITLE:=Small SSH 2 client/server +DESCRIPTION:=A small SSH 2 server/client designed for small memory environments. +URL:=http://matt.ucc.asn.au/dropbear/ +endef -$(PKG_BUILD_DIR)/.configured: +define Package/dropbearconvert +$(call Package/dropbear) +DEFAULT:=m +TITLE:=Utility for converting SSH keys +DESCRIPTION:=Utility for converting SSH keys +DEPENDS:=zlib +endef + +define Build/Configure $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ @@ -61,9 +74,9 @@ $(PKG_BUILD_DIR)/.configured: --disable-pututxline \ --disable-zlib \ ); - touch $@ +endef -$(PKG_BUILD_DIR)/.built: +define Buid/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ LD=$(TARGET_CC) \ PROGRAMS="dropbear dbclient dropbearkey scp" \ @@ -71,24 +84,26 @@ $(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ LD=$(TARGET_CC) \ PROGRAMS="dropbearconvert" - touch $@ +endef -$(IPKG_DBCONVERT): - mkdir -p $(IDIR_DBCONVERT)/usr/bin - install -m 755 $(PKG_BUILD_DIR)/dropbearconvert \ - $(IDIR_DBCONVERT)/usr/bin/dropbearconvert - $(IPKG_BUILD) $(IDIR_DBCONVERT) $(PACKAGE_DIR) - -$(IPKG_DROPBEAR): +define Package/dropbear/install mkdir -p $(IDIR_DROPBEAR)/usr/bin mkdir -p $(IDIR_DROPBEAR)/usr/sbin install -m 755 $(PKG_BUILD_DIR)/dropbearmulti \ $(IDIR_DROPBEAR)/usr/sbin/dropbear - $(STRIP) $(IDIR_DROPBEAR)/usr/sbin/dropbear ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey mkdir -p $(IDIR_DROPBEAR)/etc/init.d install -m 755 ./files/S50dropbear $(IDIR_DROPBEAR)/etc/init.d/ - $(IPKG_BUILD) $(IDIR_DROPBEAR) $(PACKAGE_DIR) +endef + +define Package/dropbearconvert/install + mkdir -p $(IDIR_DBCONVERT)/usr/bin + install -m 755 $(PKG_BUILD_DIR)/dropbearconvert \ + $(IDIR_DBCONVERT)/usr/bin/dropbearconvert +endef + +$(eval $(call BuildPackage,dropbear)) +$(eval $(call BuildPackage,dropbearconvert)) diff --git a/openwrt/package/dropbear/ipkg/dropbear.control b/openwrt/package/dropbear/ipkg/dropbear.control deleted file mode 100644 index 0aa8cc5b82e..00000000000 --- a/openwrt/package/dropbear/ipkg/dropbear.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: dropbear -Priority: optional -Section: net -Description: a small SSH 2 server/client designed for small memory environments. diff --git a/openwrt/package/dropbear/ipkg/dropbearconvert.control b/openwrt/package/dropbear/ipkg/dropbearconvert.control deleted file mode 100644 index 9dd5ecd1aad..00000000000 --- a/openwrt/package/dropbear/ipkg/dropbearconvert.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: dropbearconvert -Priority: optional -Depends: zlib -Section: net -Description: Utility for converting SSH keys diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index 04adbf6e825..e672ac13c1a 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -26,8 +26,6 @@ endef define Package/ebtables/install install -d -m0755 $(IDIR_DNSMASQ)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/ebtables $(IDIR_EBTABLES)/usr/sbin/ebtables - $(RSTRIP) $(IDIR_EBTABLES) - $(IPKG_BUILD) $(IDIR_EBTABLES) $(PACKAGE_DIR) ended $(eval $(call BuildPackage,ebtables)) diff --git a/openwrt/package/haserl/Config.in b/openwrt/package/haserl/Config.in deleted file mode 100644 index a766be73ffe..00000000000 --- a/openwrt/package/haserl/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_HASERL - prompt "haserl............................ A CGI wrapper to embed shell scripts in HTML documents" - tristate - default m if CONFIG_DEVEL - help - A CGI wrapper to embed shell scripts in HTML documents. - - http://haserl.sourceforge.net/ - diff --git a/openwrt/package/haserl/Makefile b/openwrt/package/haserl/Makefile index 05c6b47b1ee..8f35fbf6237 100644 --- a/openwrt/package/haserl/Makefile +++ b/openwrt/package/haserl/Makefile @@ -5,57 +5,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=haserl PKG_VERSION:=0.8.0 PKG_RELEASE:=1 -PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea - -PKG_SOURCE_URL:=@SF/haserl -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/haserl +PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea +PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,HASERL,haserl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/haserl +SECTION:=base +# CATEGORY:=FIXME +TITLE:=A CGI wrapper to embed shell scripts in HTML documents +DESCRIPTION:=A CGI wrapper to embed shell scripts in HTML documents. +URL:=http://haserl.sourceforge.net/ +endef -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -DMAX_UPLOAD_KB=8192" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_HASERL): +define Package/haserl/install install -m0755 -d $(IDIR_HASERL)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/haserl $(IDIR_HASERL)/usr/bin/ - $(RSTRIP) $(IDIR_HASERL) - $(IPKG_BUILD) $(IDIR_HASERL) $(PACKAGE_DIR) + install -m0755 $(PKG_INSTALL_DIR)/usr/bin/haserl $(IDIR_HASERL)/usr/bin/ +endef +$(eval $(call BuildPackage,haserl)) diff --git a/openwrt/package/haserl/ipkg/haserl.control b/openwrt/package/haserl/ipkg/haserl.control deleted file mode 100644 index 0243b6d7544..00000000000 --- a/openwrt/package/haserl/ipkg/haserl.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: haserl -Priority: optional -Section: web -Description: a CGI wrapper to embed shell scripts in HTML documents diff --git a/openwrt/package/ipkg/Config.in b/openwrt/package/ipkg/Config.in deleted file mode 100644 index 4cbd295001f..00000000000 --- a/openwrt/package/ipkg/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -config BR2_PACKAGE_IPKG - prompt "ipkg.............................. The itsy package management system" - tristate - default n if BUSYBOX_CONFIG_IPKG - default y if ! BUSYBOX_CONFIG_IPKG - help - Lightweight package management system - ipkg is the Itsy Package Management System, for handling - installation and removal of packages on a system. It can - recursively follow dependencies and download all packages - necessary to install a particular package. - - ipkg knows how to install both .ipk and .deb packages. - - ipkg is intended to serve the same functions (and more) for - Familiar that dpkg and apt serve for Debian, (while taking - up much less space). - diff --git a/openwrt/package/ipkg/Makefile b/openwrt/package/ipkg/Makefile deleted file mode 100644 index 3dddcc5556f..00000000000 --- a/openwrt/package/ipkg/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ipkg -PKG_VERSION:=0.99.154 -PKG_RELEASE:=1 -PKG_MD5SUM:=b60aeea3b86cecf0eb26b161d122fbcc - -PKG_SOURCE_URL:=http://www.handhelds.org/packages/ipkg \ - http://www.gtlib.gatech.edu/pub/handhelds.org/packages/ipkg \ - http://ftp.gwdg.de/pub/linux/handhelds/packages/ipkg -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,IPKG,ipkg,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ) - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_IPKG): - install -d -m0755 $(IDIR_IPKG)/bin - $(CP) $(PKG_INSTALL_DIR)/bin/ipkg-cl $(IDIR_IPKG)/bin/ipkg - install -d -m0755 $(IDIR_IPKG)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipkg.so.* $(IDIR_IPKG)/usr/lib/ - $(RSTRIP) $(IDIR_IPKG) - $(IPKG_BUILD) $(IDIR_IPKG) $(PACKAGE_DIR) diff --git a/openwrt/package/ipkg/ipkg/ipkg.control b/openwrt/package/ipkg/ipkg/ipkg.control deleted file mode 100644 index 7bf87d1dd61..00000000000 --- a/openwrt/package/ipkg/ipkg/ipkg.control +++ /dev/null @@ -1,16 +0,0 @@ -Package: ipkg -Section: base -Priority: required -Essential: yes -Description: lightweight package management system - ipkg is the Itsy Package Management System, for handling - installation and removal of packages on a system. It can - recursively follow dependencies and download all packages - necessary to install a particular package. - . - ipkg knows how to install both .ipk and .deb packages. - . - ipkg is intended to serve the same functions (and more) for - Familiar that dpkg and apt serve for Debian, (while taking - up much less space). - diff --git a/openwrt/package/iproute2/Config.in b/openwrt/package/iproute2/Config.in deleted file mode 100644 index 349e3b7df2f..00000000000 --- a/openwrt/package/iproute2/Config.in +++ /dev/null @@ -1,21 +0,0 @@ -menu "iproute2.......................... A collection of utilites for controlling TCP/IP networking and Traffic Control" - -config BR2_COMPILE_IPROUTE2 - tristate - default n - depends BR2_PACKAGE_IPROUTE2_IP || BR2_PACKAGE_IPROUTE2_TC - -config BR2_PACKAGE_IP - prompt "ip.............................. A routing control utility" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_IPROUTE2 - -config BR2_PACKAGE_TC - prompt "tc.............................. A traffic control utility" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_IPROUTE2 - select BR2_PACKAGE_KMOD_SCHED - -endmenu diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index f829293f4a7..0fe03bc8258 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -5,19 +5,38 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 PKG_VERSION:=2.6.15-060110 PKG_RELEASE:=1 -PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5 -PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/ +PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5 PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,IP,ip,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,TC,tc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +# define Package/iproute2 +# SECTION:=base +# CATEGORY:=Network +# DEFAULT:=n +# MENU:=1 +# TITLE:=A collection of utilites for controlling TCP/IP networking and Traffic Control +# endef -$(PKG_BUILD_DIR)/.configured: +define Package/ip +SECTION:=base +CATEGORY:=Network +DEFAULT:=n +DEPENDS:=iproute2 +TITLE:=A routing control utility +endef + +define Package/tc +$(call Package/ip) +# DEPENDS:=kmod-sched +TITLE:=A traffic control utility +endef + +define Build/Configure $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \ @@ -27,22 +46,23 @@ $(PKG_BUILD_DIR)/.configured: # For now disable compiling of the misc directory because it seems to fail rm -rf $(PKG_BUILD_DIR)/misc $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile - touch $@ +endef -$(PKG_BUILD_DIR)/.built: +define Build/Compile $(MAKE) -j1 -C $(PKG_BUILD_DIR)/netem HOSTCC=$(HOSTCC) CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES" $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip - touch $@ +endef -$(IPKG_IP): - mkdir -p $(IDIR_IP)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/ip/ip $(IDIR_IP)/usr/sbin/ - $(STRIP) $(IDIR_IP)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_IP) $(PACKAGE_DIR) +define Package/ip/install + install -d -m0755 $(IDIR_IP)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/ip/ip $(IDIR_IP)/usr/sbin/ +endef -$(IPKG_TC): - mkdir -p $(IDIR_TC)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/tc/tc $(IDIR_TC)/usr/sbin/ - $(STRIP) $(IDIR_TC)/usr/sbin/* - $(IPKG_BUILD) $(IDIR_TC) $(PACKAGE_DIR) +define Package/tc/install + install -d -m0755 $(IDIR_TC)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/tc/tc $(IDIR_TC)/usr/sbin/ +endef +# $(eval $(call BuildPackage,iproute2)) +# $(eval $(call BuildPackage,ip)) +# $(eval $(call BuildPackage,tc)) diff --git a/openwrt/package/iproute2/ipkg/ip.control b/openwrt/package/iproute2/ipkg/ip.control deleted file mode 100644 index 8206dd37a0b..00000000000 --- a/openwrt/package/iproute2/ipkg/ip.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ip -Section: net -Priority: optional -Description: iproute2 routing control utility diff --git a/openwrt/package/iproute2/ipkg/tc.control b/openwrt/package/iproute2/ipkg/tc.control deleted file mode 100644 index 8950da394d0..00000000000 --- a/openwrt/package/iproute2/ipkg/tc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: tc -Section: net -Priority: optional -Description: iproute2 traffic control utility -Depends: kmod-sched diff --git a/openwrt/package/ipsec-tools/Config.in b/openwrt/package/ipsec-tools/Config.in deleted file mode 100644 index bdd3e210f6a..00000000000 --- a/openwrt/package/ipsec-tools/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_IPSEC_TOOLS - prompt "ipsec-tools....................... IPsec management tools" - tristate - depends BR2_LINUX_2_6 - select BR2_PACKAGE_LIBOPENSSL - default m if CONFIG_DEVEL - help - IPsec management tools - - http://ipsec-tools.sourceforge.net/ - diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 06d49e96869..6d27397c0f4 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -5,20 +5,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ipsec-tools PKG_VERSION:=0.6.4 PKG_RELEASE:=1 -PKG_MD5SUM:=d0242a943c82c0cbf28005966ff35e21 - -PKG_SOURCE_URL:=@SF/ipsec-tools -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/ipsec-tools +PKG_MD5SUM:=d0242a943c82c0cbf28005966ff35e21 +PKG_CAT:=bzcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,IPSEC_TOOLS,ipsec-tools,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/ipsec-tools +SECTION:=base +CATEGORY:=Network +DEFAULT:=y +TITLE:=IPsec management tools +DESCRIPTION:=IPsec management tools +URL:=http://ipsec-tools.sourceforge.net/ +endef -$(PKG_BUILD_DIR)/.configured: +define Build/Configure (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ touch configure.ac; \ touch aclocal.m4; \ @@ -59,27 +64,19 @@ $(PKG_BUILD_DIR)/.configured: --without-libradius \ --without-libpam \ ); - touch $@ +endef -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS) -Wall" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_IPSEC_TOOLS): +define Package/ipsec-tools/install install -d -m0755 $(IDIR_IPSEC_TOOLS)/etc - $(CP) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(IDIR_IPSEC_TOOLS)/etc/ install -d -m0755 $(IDIR_IPSEC_TOOLS)/usr/lib/ + install -d -m0755 $(IDIR_IPSEC_TOOLS)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(IDIR_IPSEC_TOOLS)/etc/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(IDIR_IPSEC_TOOLS)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(IDIR_IPSEC_TOOLS)/usr/lib/ - install -d -m0755 $(IDIR_IPSEC_TOOLS)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(IDIR_IPSEC_TOOLS)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(IDIR_IPSEC_TOOLS)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(IDIR_IPSEC_TOOLS)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(IDIR_IPSEC_TOOLS)/usr/sbin/ - $(RSTRIP) $(IDIR_IPSEC_TOOLS) - $(IPKG_BUILD) $(IDIR_IPSEC_TOOLS) $(PACKAGE_DIR) +endef + +$(eval $(call BuildPackage,ipsec-tools)) diff --git a/openwrt/package/ipsec-tools/ipkg/ipsec-tools.conffiles b/openwrt/package/ipsec-tools/ipkg/ipsec-tools.conffiles deleted file mode 100644 index 434045463ae..00000000000 --- a/openwrt/package/ipsec-tools/ipkg/ipsec-tools.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/racoon.conf diff --git a/openwrt/package/ipsec-tools/ipkg/ipsec-tools.control b/openwrt/package/ipsec-tools/ipkg/ipsec-tools.control deleted file mode 100644 index c1cade10bd3..00000000000 --- a/openwrt/package/ipsec-tools/ipkg/ipsec-tools.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ipsec-tools -Priority: optional -Section: net -Depends: libopenssl -Description: IPsec management tools diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index ffaabc6fe9f..c9388197996 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -28,7 +28,6 @@ define Package/ipset/install $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR=$(IDIR_IPSET) PREFIX=/usr install rm -rf $(IDIR_IPSET)/usr/man - $(IPKG_BUILD) $(IDIR_IPSET) $(PACKAGE_DIR) endef $(eval $(call BuildPackage,ipset)) diff --git a/openwrt/package/iptables/Config.in b/openwrt/package/iptables/Config.in deleted file mode 100644 index 6a2a85616b8..00000000000 --- a/openwrt/package/iptables/Config.in +++ /dev/null @@ -1,167 +0,0 @@ -menu "iptables.......................... IPv4 / IPv6 firewall administration" - -config BR2_COMPILE_IPTABLES - bool - default n - depends BR2_PACKAGE_IPTABLES || BR2_PACKAGE_IP6TABLES - -config BR2_PACKAGE_IPTABLES - prompt "iptables.......................... IPv4 firewall administration tool" - tristate - default y - select BR2_COMPILE_IPTABLES - help - IPv4 firewall, NAT, and packet mangling tools. - - http://www.iptables.org/ - -config BR2_PACKAGE_IPTABLES_EXTRA - prompt "iptables-extra.................. Extra Iptables extensions for IPv4 firewalling (meta-package)" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IPTABLES_EXTRA - select BR2_PACKAGE_IPTABLES_MOD_CONNTRACK - select BR2_PACKAGE_IPTABLES_MOD_EXTRA - select BR2_PACKAGE_IPTABLES_MOD_FILTER - select BR2_PACKAGE_IPTABLES_MOD_IMQ - select BR2_PACKAGE_IPTABLES_MOD_IPOPT - select BR2_PACKAGE_IPTABLES_MOD_IPSEC - select BR2_PACKAGE_IPTABLES_MOD_NAT - select BR2_PACKAGE_IPTABLES_MOD_ULOG - help - Extra Iptables extensions for IPv4 firewalling (meta-package) - -config BR2_PACKAGE_IPTABLES_MOD_CONNTRACK - prompt "iptables-mod-conntrack.......... Iptables extensions for connection tracking" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IPT_CONNTRACK - help - Iptables (IPv4) extensions for connection tracking - - Includes: - * libipt_conntrack - * libipt_helper - * libipt_connmark/CONNMARK - -config BR2_PACKAGE_IPTABLES_MOD_FILTER - prompt "iptables-mod-filter............. Iptables extension for packet content inspection" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IPT_FILTER - help - Iptables (IPv4) extension for packet content inspection - - Includes: - * libipt_ipp2p - * libipt_layer7 - -config BR2_PACKAGE_IPTABLES_MOD_IMQ - prompt "iptables-mod-imq................ Iptables extensions for Intermediate Queuing Device QoS-support" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IMQ - help - Iptables (IPv4) extensions for Intermediate Queuing Device QoS-support - - Includes: - * libipt_IMQ - -config BR2_PACKAGE_IPTABLES_MOD_IPOPT - prompt "iptables-mod-ipopt.............. Iptables extensions for matching/changing IP packet options" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IPT_IPOPT - help - Extra Iptables (IPv4) extensions for matching/changing IP packet options - - Includes: - * libipt_dscp/DSCP - * libipt_ecn/ECN - * libipt_length - * libipt_mac - * libipt_tos/TOS - * libipt_tcpmms - * libipt_ttl/TTL - * libipt_unclean - -config BR2_PACKAGE_IPTABLES_MOD_IPSEC - prompt "iptables-mod-ipsec.............. Iptables extensions for matching special IPsec packets" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IPT_IPSEC - help - Iptables (IPv4) extensions for matching special IPsec packets - - Includes: - * libipt_ah - * libipt_esp - -config BR2_PACKAGE_IPTABLES_MOD_NAT - prompt "iptables-mod-nat................ Iptables extensions for different NAT targets" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IPT_NAT - help - Iptables (IPv4) extensions for different NAT targets - - Includes: - * libipt_REDIRECT - -config BR2_PACKAGE_IPTABLES_MOD_ULOG - prompt "iptables-mod-ulog............... Iptables extensions for user-space packet logging" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IPT_ULOG - help - Iptables (IPv4) extensions for user-space packet logging - - Includes: - * libipt_ULOG - -config BR2_PACKAGE_IPTABLES_MOD_EXTRA - prompt "iptables-mod-extra.............. Other extra Iptables extensions" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - select BR2_PACKAGE_KMOD_IPT_EXTRA - help - Other extra Iptables (IPv4) extensions - - Includes: - * libipt_limit - * libipt_owner - * libipt_physdev - * libipt_pkttype - * libipt_recent - -config BR2_PACKAGE_IPTABLES_UTILS - prompt "iptables-utils.................. Save and restore utilities" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_IPTABLES - help - iptables-save and iptables-restore for Iptables (IPv4) - - http://www.iptables.org/ - -config BR2_PACKAGE_IP6TABLES - prompt "ip6tables......................... IPv6 firewall administration tool" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_IPTABLES - select BR2_PACKAGE_KMOD_IPV6 - help - IPv6 firewall, NAT, and packet mangling tools. - - http://www.iptables.org/ - -endmenu diff --git a/openwrt/package/iptables/ipkg/iptables.conffiles b/openwrt/package/iptables/ipkg/iptables.conffiles deleted file mode 100644 index 06194ca679b..00000000000 --- a/openwrt/package/iptables/ipkg/iptables.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/config/firewall -/etc/firewall.user diff --git a/openwrt/package/mtd/Config.in b/openwrt/package/mtd/Config.in deleted file mode 100644 index 5420dff5611..00000000000 --- a/openwrt/package/mtd/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_PACKAGE_MTD - prompt "mtd............................... Update utility for trx firmware images" - tristate - default y - help - Update utility for trx firmware images. - -config BR2_PACKAGE_MTD_STATIC - prompt "mtd-static........................ Update utility for trx firmware images (statically linked)" - tristate - default n - help - Update utility for trx firmware images (statically linked). To update - from other firmware or older OpenWrt releases. - diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index 61e7e74c232..381184b1d3e 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -9,29 +9,20 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,MTD,$(PKG_NAME),$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,MTD_STATIC,mtd-static,$(PKG_RELEASE),$(ARCH))) +define Package/mtd +SECTION:=base +CATEGORY:=Util +DEFAULT:=y +TITLE:=Update utility for trx firmware images +DESCRIPTION:=Update utility for trx firmware images. To update \\\ +from other firmware or older OpenWrt releases. +endef -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: +define Build/Compile $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/mtd mtd.c - $(TARGET_CC) -static $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/mtd-static mtd.c - touch $@ +endef -$(IPKG_MTD): +define Package/mtd/install install -d -m0755 $(IDIR_MTD)/sbin install -m0755 $(PKG_BUILD_DIR)/mtd $(IDIR_MTD)/sbin - $(RSTRIP) $(IDIR_MTD)/sbin/* - $(IPKG_BUILD) $(IDIR_MTD) $(PACKAGE_DIR) - -$(IPKG_MTD_STATIC): - install -d -m0755 $(IDIR_MTD_STATIC)/sbin - install -m0755 $(PKG_BUILD_DIR)/mtd-static $(IDIR_MTD_STATIC)/sbin - $(RSTRIP) $(IDIR_MTD_STATIC)/sbin/* - $(IPKG_BUILD) $(IDIR_MTD_STATIC) $(PACKAGE_DIR) +endef diff --git a/openwrt/package/mtd/ipkg/mtd-static.control b/openwrt/package/mtd/ipkg/mtd-static.control deleted file mode 100644 index ded243a8bcd..00000000000 --- a/openwrt/package/mtd/ipkg/mtd-static.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: mtd-static -Priority: optional -Section: sys -Description: Tool for modifying the flash chip (statically linked) diff --git a/openwrt/package/mtd/ipkg/mtd.control b/openwrt/package/mtd/ipkg/mtd.control deleted file mode 100644 index 3145581c9b2..00000000000 --- a/openwrt/package/mtd/ipkg/mtd.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: mtd -Priority: optional -Section: sys -Description: Tool for modifying the flash chip diff --git a/openwrt/package/nvram/Config.in b/openwrt/package/nvram/Config.in deleted file mode 100644 index be4138275f1..00000000000 --- a/openwrt/package/nvram/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_NVRAM - prompt "nvram............................. Broadcom config utility" - tristate - default y - depends BR2_LINUX_2_4_BRCM - help - control utility for broadcom's 'nvram' config area - diff --git a/openwrt/package/nvram/Makefile b/openwrt/package/nvram/Makefile index dd460fc06d1..762eb581839 100644 --- a/openwrt/package/nvram/Makefile +++ b/openwrt/package/nvram/Makefile @@ -9,30 +9,26 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,NVRAM,nvram,$(PKG_RELEASE),$(ARCH))) +define Package/nvram +SECTION:=base +# CATEGORY:=FIXME +DEFAULT:=n +TITLE:=Broadcom config utility +DESCRIPTION:=control utility for broadcom's 'nvram' config area +endef -$(PKG_BUILD_DIR)/.prepared: +define Build/Prepare mkdir -p $(PKG_BUILD_DIR) $(CP) ./src/* $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include" - touch $@ +endef $(IPKG_NVRAM): - mkdir -p $(IDIR_NVRAM)/usr/lib +define Package/nvram/install + install -d -m0755 $(IDIR_NVRAM)/usr/lib + install -d -m0755 $(IDIR_NVRAM)/usr/sbin $(CP) $(PKG_BUILD_DIR)/*.so $(IDIR_NVRAM)/usr/lib - mkdir -p $(IDIR_NVRAM)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/nvram $(IDIR_NVRAM)/usr/sbin - $(RSTRIP) $(IDIR_NVRAM) - $(IPKG_BUILD) $(IDIR_NVRAM) $(PACKAGE_DIR) - + install -m0755 $(PKG_BUILD_DIR)/nvram $(IDIR_NVRAM)/usr/sbin +endef compile-targets: install-dev install-dev: $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/nvram/ipkg/nvram.control b/openwrt/package/nvram/ipkg/nvram.control deleted file mode 100644 index c7ea64d19c4..00000000000 --- a/openwrt/package/nvram/ipkg/nvram.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: nvram -Priority: optional -Section: sys -Description: NVRAM utility and libraries for Broadcom hardware - diff --git a/openwrt/package/pcmcia-cs/Config.in b/openwrt/package/pcmcia-cs/Config.in deleted file mode 100644 index afcfa39ffd4..00000000000 --- a/openwrt/package/pcmcia-cs/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config BR2_COMPILE_PCMCIA_CS - tristate - default n - depends BR2_PACKAGE_PCMCIA_UTILS - -config BR2_PACKAGE_PCMCIA_UTILS - prompt "pcmcia-utils...................... PCMCIA/Cardbus management utilities" - tristate - depends BR2_LINUX_PCMCIA_SUPPORT - select BR2_COMPILE_PCMCIA_CS - select BR2_PACKAGE_KMOD_PCMCIA_CORE - default m if CONFIG_DEVEL - help - PCMCIA/Cardbus management utilities - - http://pcmcia-cs.sourceforge.net/ - diff --git a/openwrt/package/pcmcia-cs/Makefile b/openwrt/package/pcmcia-cs/Makefile index b99633a5fad..a9c7ba8001b 100644 --- a/openwrt/package/pcmcia-cs/Makefile +++ b/openwrt/package/pcmcia-cs/Makefile @@ -5,20 +5,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcmcia-cs PKG_VERSION:=3.2.8 PKG_RELEASE:=1 -PKG_MD5SUM:=0d6d65be8896eff081aee996049afaa5 - -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=0d6d65be8896eff081aee996049afaa5 +PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,PCMCIA_UTILS,pcmcia-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/pcmcia-cs +SECTION:=base +# CATEGORY:=FIXME +DEFAULT:=n +TITLE:=PCMCIA/Cardbus management utilities +DESCRIPTION:=PCMCIA/Cardbus management utilities +URL:=http://pcmcia-cs.sourceforge.net/ +endef -$(PKG_BUILD_DIR)/.configured: +define Build/Configure ( cd $(PKG_BUILD_DIR); \ ./Configure \ --noprompt \ @@ -35,22 +40,14 @@ $(PKG_BUILD_DIR)/.configured: --nox11 \ --sysv --rcdir="/etc" \ ) - touch $@ +endef -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS)" \ - all install - touch $@ - -$(IPKG_PCMCIA_UTILS): +define Package/pcmcia-cs/install install -m0755 -d $(IDIR_PCMCIA_UTILS)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/pcmcia $(IDIR_PCMCIA_UTILS)/etc/ install -m0755 -d $(IDIR_PCMCIA_UTILS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/cardctl $(IDIR_PCMCIA_UTILS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/cardmgr $(IDIR_PCMCIA_UTILS)/usr/sbin/ - $(RSTRIP) $(IDIR_PCMCIA_UTILS) - $(IPKG_BUILD) $(IDIR_PCMCIA_UTILS) $(PACKAGE_DIR) + install -m0644 $(PKG_INSTALL_DIR)/etc/pcmcia $(IDIR_PCMCIA_UTILS)/etc/ + install -m0755 $(PKG_INSTALL_DIR)/sbin/cardctl $(IDIR_PCMCIA_UTILS)/usr/sbin/ + install -m0755 $(PKG_INSTALL_DIR)/sbin/cardmgr $(IDIR_PCMCIA_UTILS)/usr/sbin/ +endef +$(eval $(call BuildPackage,pcmcia-cs)) diff --git a/openwrt/package/pcmcia-cs/ipkg/pcmcia-utils.conffiles b/openwrt/package/pcmcia-cs/ipkg/pcmcia-utils.conffiles deleted file mode 100644 index 04ca2047999..00000000000 --- a/openwrt/package/pcmcia-cs/ipkg/pcmcia-utils.conffiles +++ /dev/null @@ -1,10 +0,0 @@ -/etc/pcmcia/config.opts -/etc/pcmcia/ftl.opts -/etc/pcmcia/ide.opts -/etc/pcmcia/ieee1394.opts -/etc/pcmcia/memory.opts -/etc/pcmcia/network.opts -/etc/pcmcia/parport.opts -/etc/pcmcia/scsi.opts -/etc/pcmcia/serial.opts -/etc/pcmcia/wireless.opts diff --git a/openwrt/package/pcmcia-cs/ipkg/pcmcia-utils.control b/openwrt/package/pcmcia-cs/ipkg/pcmcia-utils.control deleted file mode 100644 index ba760a61ba5..00000000000 --- a/openwrt/package/pcmcia-cs/ipkg/pcmcia-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pcmcia-utils -Priority: optional -Section: sys -Depends: kmod-pcmcia-core -Description: PCMCIA/Cardbus management utilities diff --git a/openwrt/package/pptp/Makefile b/openwrt/package/pptp/Makefile index 870341c87d2..de7c50c2d44 100644 --- a/openwrt/package/pptp/Makefile +++ b/openwrt/package/pptp/Makefile @@ -5,34 +5,30 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pptp PKG_VERSION:=1.6.0 PKG_RELEASE:=3 -PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631 - -PKG_SOURCE_URL:=@SF/pptpclient -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/pptpclient +PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631 +PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,PPTP,pptp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/pptp +SECTION:=base +# CATEGORY:=FIXME +TITLE:=PPTP (Point-to-Point Tunneling Protocol) client +DESCRIPTION:=A Point-to-Point Tunneling Protocol Client +URL:=http://pptpclient.sourceforge.net/ +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - CFLAGS="$(TARGET_CFLAGS)" \ - all - touch $@ - -$(IPKG_PPTP): +define Package/pptp/install install -d -m0755 $(IDIR_PPTP)/sbin - install -m0755 ./files/ifup.pptp $(IDIR_PPTP)/sbin/ifup.pptp install -d -m0755 $(IDIR_PPTP)/etc/ppp - install -m0644 ./files/options.pptp $(IDIR_PPTP)/etc/ppp/ install -d -m0755 $(IDIR_PPTP)/usr/sbin + install -m0755 ./files/ifup.pptp $(IDIR_PPTP)/sbin/ifup.pptp + install -m0644 ./files/options.pptp $(IDIR_PPTP)/etc/ppp/ install -m0755 $(PKG_BUILD_DIR)/pptp $(IDIR_PPTP)/usr/sbin/ - $(RSTRIP) $(IDIR_PPTP) - $(IPKG_BUILD) $(IDIR_PPTP) $(PACKAGE_DIR) +endef + +$(eval $(call BuildPackage,pptp)) diff --git a/openwrt/package/robocfg/Config.in b/openwrt/package/robocfg/Config.in deleted file mode 100644 index db90c8b1134..00000000000 --- a/openwrt/package/robocfg/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_ROBOCFG - prompt "robocfg........................... BCM5325E/536x switch configuration utility" - tristate - default m if CONFIG_DEVEL - help - Broadcom BCM5325E/536x switch configuration utility - diff --git a/openwrt/package/robocfg/Makefile b/openwrt/package/robocfg/Makefile index 54daea8e862..194c022a415 100644 --- a/openwrt/package/robocfg/Makefile +++ b/openwrt/package/robocfg/Makefile @@ -10,21 +10,23 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/robocfg include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,ROBOCFG,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/robocfg +SECTION:=base +# CATEGORY:=FIXME +DEFAULT:=n +TITLE:=BCM5325E/536x switch configuration utility +DESCRIPTION:=Broadcom BCM5325E/536x switch configuration utility +endef -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: +define Build/Compile $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/robocfg robocfg.c - touch $@ +endef -$(IPKG_ROBOCFG): +define Package/robocfg/install install -d -m0755 $(IDIR_ROBOCFG)/sbin install -m0755 $(PKG_BUILD_DIR)/robocfg $(IDIR_ROBOCFG)/sbin/ $(RSTRIP) $(IDIR_ROBOCFG) $(IPKG_BUILD) $(IDIR_ROBOCFG) $(PACKAGE_DIR) +endef + +$(eval $(call BuildPackage,robocfg)) diff --git a/openwrt/package/robocfg/ipkg/robocfg.control b/openwrt/package/robocfg/ipkg/robocfg.control deleted file mode 100644 index 0d8b54c975e..00000000000 --- a/openwrt/package/robocfg/ipkg/robocfg.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: robocfg -Priority: optional -Section: net -Description: Broadcom BCM5325E/536x switch configuration utility diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 2acc2b80fd4..fe68b077070 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -146,6 +146,7 @@ $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(call Package/$(1)/install,$$(IDIR_$(1))) mkdir -p $(PACKAGE_DIR) + $(RSTRIP) $$(IDIR_$(1)) $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) $$(INFO_$(1)): $$(IPKG_$(1)) diff --git a/openwrt/package/udev/Config.in b/openwrt/package/udev/Config.in deleted file mode 100644 index e9601d10c67..00000000000 --- a/openwrt/package/udev/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_UDEV - prompt "udev.............................. Dynamic device management subsystem" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_UTIL_LINUX - help - udev provides a dynamic device directory containing only the files for - actually present devices. It creates or removes device node files in - the /dev directory, or it renames network interfaces. - - http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html diff --git a/openwrt/package/udev/Makefile b/openwrt/package/udev/Makefile index 39d79b4c01e..9b7c9171ae1 100644 --- a/openwrt/package/udev/Makefile +++ b/openwrt/package/udev/Makefile @@ -7,54 +7,44 @@ PKG_VERSION:=077 PKG_RELEASE:=1 PKG_MD5SUM:=61ec646daf7795e9777e8f33975408fe +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \ http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \ ftp://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \ http://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \ ftp://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/ \ http://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_CAT:=bzcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,UDEV,udev,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/udev +SECTION:=base +# CATEGORY:=FIXME +DEFAULT:=n +TITLE:=Dynamic device management subsystem +DESCRIPTION:=udev provides a dynamic device directory containing only the files for \\\ +actually present devices. It creates or removes device node files in \\\ +the /dev directory, or it renames network interfaces. \\\ +URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CROSS="$(TARGET_CROSS)" \ - STRIP="/bin/true" \ - OPTFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - INSTALL="install -c" \ - all install - touch $@ - -$(IPKG_UDEV): +define Package/udev/install install -d -m0775 $(IDIR_UDEV)/etc/udev - $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(IDIR_UDEV)/etc/udev/ install -d -m0775 $(IDIR_UDEV)/lib/udev install -d -m0775 $(IDIR_UDEV)/sbin/ + install -d -m0775 $(IDIR_UDEV)/usr/bin/ + install -d -m0775 $(IDIR_UDEV)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(IDIR_UDEV)/etc/udev/ $(CP) $(PKG_INSTALL_DIR)/sbin/udev $(IDIR_UDEV)/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(IDIR_UDEV)/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/udevd $(IDIR_UDEV)/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/udevsend $(IDIR_UDEV)/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/udevstart $(IDIR_UDEV)/sbin/ - install -d -m0775 $(IDIR_UDEV)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(IDIR_UDEV)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(IDIR_UDEV)/usr/bin/ - install -d -m0775 $(IDIR_UDEV)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(IDIR_UDEV)/usr/sbin/ - $(RSTRIP) $(IDIR_UDEV) - $(IPKG_BUILD) $(IDIR_UDEV) $(PACKAGE_DIR) +endef -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built +$(eval $(call BuildPackage,udev)) diff --git a/openwrt/package/udev/ipkg/udev.conffiles b/openwrt/package/udev/ipkg/udev.conffiles deleted file mode 100644 index 50a5fb88913..00000000000 --- a/openwrt/package/udev/ipkg/udev.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/udev/udev.conf diff --git a/openwrt/package/udev/ipkg/udev.control b/openwrt/package/udev/ipkg/udev.control deleted file mode 100644 index 7ca98a0aab6..00000000000 --- a/openwrt/package/udev/ipkg/udev.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: udev -Priority: optional -Section: base -Description: Dynamic device management subsystem diff --git a/openwrt/package/wificonf/Makefile b/openwrt/package/wificonf/Makefile index 5f8c9a03a66..5e5c667af41 100644 --- a/openwrt/package/wificonf/Makefile +++ b/openwrt/package/wificonf/Makefile @@ -9,21 +9,19 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/wificonf include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,WIFICONF,$(PKG_NAME),$(PKG_RELEASE),$(ARCH))) +define Package/wificonf +SECTION:=base +CATEGORY:=Network +DEFAULT:=y +TITLE:=replacement utility for wlconf +DESCRIPTION:=Replacement utility for wlconf +endef -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $@ - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: +define Build/Compile $(TARGET_CC) $(TARGET_CFLAGS) -Iinclude/ -I$(STAGING_DIR)/usr/include -o $(PKG_BUILD_DIR)/wifi wificonf.c -L$(STAGING_DIR)/usr/lib -lnvram -lshared $(STAGING_DIR)/usr/lib/libiw.so - touch $@ +endef -$(IPKG_WIFICONF): +define Package/wificonf/install install -d -m0755 $(IDIR_WIFICONF)/sbin install -m0755 $(PKG_BUILD_DIR)/wifi $(IDIR_WIFICONF)/sbin/ - $(RSTRIP) $(IDIR_WIFICONF) - $(IPKG_BUILD) $(IDIR_WIFICONF) $(PACKAGE_DIR) +endef diff --git a/openwrt/package/wireless-tools/Config.in b/openwrt/package/wireless-tools/Config.in deleted file mode 100644 index deed30fda04..00000000000 --- a/openwrt/package/wireless-tools/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_WIRELESS_TOOLS - prompt "wireless-tools.................... Tools for manipulating Linux Wireless Extensions" - tristate - default y - help - Tools for configuring Wireless Adapters implementing the "Wireless Extension" - diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index 8d1da1990a1..f981f7b5b64 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -5,23 +5,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wireless-tools PKG_VERSION:=28 PKG_RELEASE:=1 -PKG_MD5SUM:=599c94497f9c9073c7b052d3dcb7cd16 - -PKG_SOURCE_URL:=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux -PKG_SOURCE:=wireless_tools.$(PKG_VERSION).tar.gz -PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/wireless_tools.28 -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PKG_SOURCE:=wireless_tools.$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux +PKG_MD5SUM:=599c94497f9c9073c7b052d3dcb7cd16 +PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,WIRELESS_TOOLS,wireless-tools,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/wireless-tools +SECTION:=base +CATEGORY:=Network +DEFAULT:=y +TITLE:=Tools for manipulating Linux Wireless Extensions +DESCRIPTION:=Tools for configuring Wireless Adapters implementing the "Wireless Extension" +URL:=http://hplabs.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -I." \ libiw.so.28 iwmulticall @@ -31,15 +33,14 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured INSTALL_DIR="$(PKG_INSTALL_DIR)/usr/sbin" \ INSTALL_LIB="$(PKG_INSTALL_DIR)/usr/lib" \ install-iwmulticall - touch $@ +endef -$(IPKG_WIRELESS_TOOLS): - mkdir -p $(IDIR_WIRELESS_TOOLS)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libiw.so.28 $(IDIR_WIRELESS_TOOLS)/usr/lib/ - mkdir -p $(IDIR_WIRELESS_TOOLS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(IDIR_WIRELESS_TOOLS)/usr/sbin/ - $(RSTRIP) $(IDIR_WIRELESS_TOOLS) - $(IPKG_BUILD) $(IDIR_WIRELESS_TOOLS) $(PACKAGE_DIR) +define Package/wireless-tools/install + install -d -m0755 $(IDIR_WIRELESS_TOOLS)/usr/lib + install -d -m0755 $(IDIR_WIRELESS_TOOLS)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/libiw.so.28 $(IDIR_WIRELESS_TOOLS)/usr/lib/ + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(IDIR_WIRELESS_TOOLS)/usr/sbin/ +endef install-dev: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/{lib,include} @@ -50,6 +51,3 @@ install-dev: $(PKG_BUILD_DIR)/.built uninstall-dev: rm -f $(STAGING_DIR)/usr/lib/libiw.* rm -f $(STAGING_DIR)/usr/include/{iwlib,wireless}.h - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/wireless-tools/ipkg/wireless-tools.control b/openwrt/package/wireless-tools/ipkg/wireless-tools.control deleted file mode 100644 index 5f472d958d3..00000000000 --- a/openwrt/package/wireless-tools/ipkg/wireless-tools.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: wireless-tools -Priority: optional -Section: net -Description: Tools for setting up WiFi cards using the Wireless Extension diff --git a/openwrt/package/zlib/Config.in b/openwrt/package/zlib/Config.in deleted file mode 100644 index 4b96d94153e..00000000000 --- a/openwrt/package/zlib/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_ZLIB - prompt "zlib.............................. Library implementing the deflate compression method" - tristate - default m if CONFIG_DEVEL - help - A library implementing the 'deflate' compression method - - http://www.zlib.net/ - diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index cfd82800a80..aaa3f4d4296 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -5,21 +5,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zlib PKG_VERSION:=1.2.3 PKG_RELEASE:=3 -PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6 - -PKG_SOURCE_URL:=http://www.zlib.net \ - @SF/zlib -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.zlib.net \ + @SF/zlib +PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6 +PKG_CAT:=bzcat + PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/zlib +SECTION:=base +CATEGORY:=Libraries +DEFAULT:=n +TITLE:=Library implementing the deflate compression method +DESCRIPTION:=A library implementing the 'deflate' compression method +URL:=http://www.zlib.net/ +endef -$(PKG_BUILD_DIR)/.configured: +define Build/Configure (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ LDSHARED="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \ @@ -28,9 +35,9 @@ $(PKG_BUILD_DIR)/.configured: --prefix=/usr \ --shared \ ); - touch $@ +endef -$(PKG_BUILD_DIR)/.built: +define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \ @@ -39,13 +46,12 @@ $(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ install - touch $@ +endef -$(IPKG_ZLIB): +define Package/zlib/install install -m0755 -d $(IDIR_ZLIB)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(IDIR_ZLIB)/usr/lib/ - $(RSTRIP) $(IDIR_ZLIB) - $(IPKG_BUILD) $(IDIR_ZLIB) $(PACKAGE_DIR) +endef $(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include @@ -60,6 +66,3 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/zconf.h rm -rf $(STAGING_DIR)/usr/include/zlib.h rm -rf $(STAGING_DIR)/usr/lib/libz.* - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/package/zlib/ipkg/zlib.control b/openwrt/package/zlib/ipkg/zlib.control deleted file mode 100644 index 35fcac26e52..00000000000 --- a/openwrt/package/zlib/ipkg/zlib.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: zlib -Priority: optional -Section: libs -Description: an implementation of the deflate compression method (library) From 80e0fabe446f8b46137994a07b712790b758c7dc Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 10 May 2006 19:16:02 +0000 Subject: [PATCH 037/757] typos SVN-Revision: 3753 --- openwrt/package/ebtables/Makefile | 2 +- openwrt/package/zlib/Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index e672ac13c1a..4ee6833882c 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -26,6 +26,6 @@ endef define Package/ebtables/install install -d -m0755 $(IDIR_DNSMASQ)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/ebtables $(IDIR_EBTABLES)/usr/sbin/ebtables -ended +endef $(eval $(call BuildPackage,ebtables)) diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index aaa3f4d4296..d3c8714bac3 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -66,3 +66,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/zconf.h rm -rf $(STAGING_DIR)/usr/include/zlib.h rm -rf $(STAGING_DIR)/usr/lib/libz.* + +$(eval $(call BuildPackage,zlib)) From f243e1cc49e00cac0abf6317467a0fccc67773eb Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 10 May 2006 19:21:15 +0000 Subject: [PATCH 038/757] Fix issue with $(1) in Build/Configure/Default SVN-Revision: 3754 --- openwrt/package/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index fe68b077070..81bac08b925 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -212,7 +212,7 @@ define Build/Configure/Default endef define Build/Configure -$(call Build/Configure/Default) +$(call Build/Configure/Default,) endef define Build/Compile/Default From d3f5fda543262af3e786142fdcc854509334251a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 10 May 2006 20:32:22 +0000 Subject: [PATCH 039/757] remove old trace/verbose junk SVN-Revision: 3755 --- openwrt/Makefile | 8 ++-- openwrt/package/Makefile | 50 +++--------------------- openwrt/package/rules.mk | 47 +++++++--------------- openwrt/rules.mk | 32 --------------- openwrt/target/Makefile | 6 --- openwrt/target/linux/Makefile | 9 ----- openwrt/target/linux/ar531x-2.4/Makefile | 4 +- openwrt/target/linux/ar7-2.4/Makefile | 6 +-- openwrt/target/linux/au1000-2.6/Makefile | 6 +-- openwrt/target/linux/brcm-2.4/Makefile | 6 +-- openwrt/target/linux/image/Makefile | 11 ++---- openwrt/target/linux/image/jffs2.mk | 12 +++--- openwrt/target/linux/image/squashfs.mk | 9 ++--- openwrt/target/linux/kernel.mk | 40 +++++++++---------- openwrt/target/linux/package/Makefile | 12 ------ openwrt/target/linux/rules.mk | 2 +- openwrt/target/linux/x86-2.4/Makefile | 6 +-- openwrt/target/linux/x86-2.6/Makefile | 6 +-- openwrt/target/lzma/Makefile | 12 +++--- 19 files changed, 79 insertions(+), 205 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index b938c241f9f..ec1e3677ab8 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -38,10 +38,6 @@ endif endif export OPENWRTVERSION -ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package) -.pkginfo: pkginfo-clean -endif - .pkginfo: @echo Collecting package info... @-for makefile in package/*/Makefile; do \ @@ -49,6 +45,10 @@ endif $(MAKE) DUMP=1 -f $$makefile 2>&- || true; \ done > $@ +ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package) +.pkginfo: pkginfo-clean +endif + .config.in: .pkginfo ./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index d213200156f..e0bd23c7ecb 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -8,53 +8,15 @@ clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) compile: $(COMPILE_PACKAGES) install: base-files-install $(INSTALL_PACKAGES) -$(COMPILE_PACKAGES): base-files-compile -$(INSTALL_PACKAGES): base-files-install - -$(STAMP_DIR): +$(STAMP_DIR) $(TARGET_DIR): mkdir -p $@ -$(TARGET_DIR): - mkdir -p $(TARGET_DIR) - %-prepare: $(STAMP_DIR) $(TARGET_DIR) - @[ -f $(STAMP_DIR)/.$@ ] || { \ - $(START_TRACE) "package/$(patsubst %-prepare,%,$@)-prepare: "; \ - $(MAKE) -C $(patsubst %-prepare,%,$@) prepare && { \ - touch $(STAMP_DIR)/.$@; \ - $(CMD_TRACE) " done"; \ - $(END_TRACE); \ - } \ - } + $(MAKE) -C $(patsubst %-prepare,%,$@) prepare -%-compile: - @[ -f $(STAMP_DIR)/.$@ ] || { \ - $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile: "; \ - $(MAKE) -C $(patsubst %-compile,%,$@) compile && { \ - touch $(STAMP_DIR)/.$(patsubst %-compile,%,$@)-prepare; \ - touch $(STAMP_DIR)/.$@; \ - $(CMD_TRACE) " done"; \ - $(END_TRACE); \ - } \ - } +%-compile: $(STAMP_DIR) $(TARGET_DIR) + $(MAKE) -C $(patsubst %-compile,%,$@) compile -%-install: %-compile - @$(START_TRACE) "package/$(patsubst %-install,%,$@)-install: " - @$(MAKE) -C $(patsubst %-install,%,$@) install - @$(CMD_TRACE) " done" - @$(END_TRACE) - -%-rebuild: - @$(START_TRACE) "package/$(patsubst %-rebuild,%,$@)-rebuild: " - @rm -f $(STAMP_DIR)/.$(patsubst %-rebuild,%,$@)-* - $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild - @$(CMD_TRACE) " done" - @$(END_TRACE) - -%-clean: - @$(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: " - @$(MAKE) -C $(patsubst %-clean,%,$@) clean - @rm -f $(STAMP_DIR)/.$(patsubst %-clean,%,$@)-* - @$(CMD_TRACE) " done" - @$(END_TRACE) +%-clean: $(STAMP_DIR) $(TARGET_DIR) + $(MAKE) -C $(patsubst %-clean,%,$@) clean diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 81bac08b925..540b14f63a2 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -164,8 +164,7 @@ endef ifneq ($(strip $(PKG_SOURCE)),) $(DL_DIR)/$(PKG_SOURCE): - @$(CMD_TRACE) "downloading... " - $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) $(MAKE_TRACE) + $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) endif @@ -237,42 +236,24 @@ ifneq ($(DUMP),) dumpinfo: $(DUMPINFO) else - -source: $(DL_DIR)/$(PKG_SOURCE) -prepare: source - @[ -f $(PKG_BUILD_DIR)/.prepared ] || { \ - $(CMD_TRACE) "preparing... "; \ - $(MAKE) $(PKG_BUILD_DIR)/.prepared $(MAKE_TRACE); \ - } - -configure: prepare - @[ -f $(PKG_BUILD_DIR)/.configured ] || { \ - $(CMD_TRACE) "configuring... "; \ - $(MAKE) $(PKG_BUILD_DIR)/.configured $(MAKE_TRACE); \ - } - -compile-targets: -compile: configure - @$(CMD_TRACE) "compiling... " - @$(MAKE) compile-targets $(MAKE_TRACE) - -install-targets: -install: - @$(CMD_TRACE) "installing... " - @$(MAKE) install-targets $(MAKE_TRACE) - -rebuild: - $(CMD_TRACE) "rebuilding... " - $(MAKE) package-clean compile $(MAKE_TRACE) - + $(PACKAGE_DIR): mkdir -p $@ +source: $(DL_DIR)/$(PKG_SOURCE) +prepare: $(PKG_BUILD_DIR)/.prepared +configure: $(PKG_BUILD_DIR)/.configured + +compile-targets: +compile: compile-targets + +install-targets: +install: install-targets + clean-targets: clean: - @$(CMD_TRACE) "cleaning... " - @$(MAKE) clean-targets $(MAKE_TRACE) + @$(MAKE) clean-targets rm -rf $(PKG_BUILD_DIR) endif -.PHONY: all source prepare compile install clean rebuild dumpinfo compile-targets install-targets clean-targets +.PHONY: all source prepare compile install clean dumpinfo compile-targets install-targets clean-targets diff --git a/openwrt/rules.mk b/openwrt/rules.mk index a7167ca0253..417dae7de08 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -9,38 +9,6 @@ ifeq ($(V),) V=5 endif - -ifneq ($(V),0) -TRACE:=echo "---> " -START_TRACE:=echo -n "---> " -END_TRACE:=echo -else -START_TRACE:=: -END_TRACE:=: -TRACE:=: -endif - -ifeq (${shell [ "$(V)" -ge 5 ] && echo 1},) -CMD_TRACE:=: -PKG_TRACE:=: -else -CMD_TRACE:=echo -n -PKG_TRACE:=echo "------> " -endif - -ifeq (${shell [ "$(V)" -ge 10 ] && echo 1},) -EXTRA_MAKEFLAGS:=-s -MAKE_TRACE:=2>&1 >&/dev/null || { echo "Build failed. Please re-run make with V=99 to see what's going on"; /bin/false; } -else -MAKE_TRACE:= -EXTRA_MAKEFLAGS:= -TRACE:=: -PKG_TRACE:=: -CMD_TRACE:=: -START_TRACE:=: -END_TRACE:=: -endif - CP=cp -fpR MAKE1=make MAKEFLAGS=-j$(CONFIG_JLEVEL) V=$(V) $(EXTRA_MAKEFLAGS) diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 24c34036de3..b039214860e 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -20,22 +20,16 @@ linux/package/%: $(MAKE) -C $(TOPDIR)/target/linux $(patsubst linux/%,%,$@) %-clean: - @$(TRACE) target/$(patsubst %-clean,%,$@)-clean $(MAKE) -C $(patsubst %-clean,%,$@) clean %-prepare: - @$(TRACE) target/$(patsubst %-prepare,%,$@)-prepare $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: %-prepare - @$(TRACE) target/$(patsubst %-compile,%,$@)-compile $(MAKE) -C $(patsubst %-compile,%,$@) compile %-rebuild: - @$(TRACE) target/$(patsubst %-rebuild,%,$@)-rebuild $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild %-install: %-compile - @$(TRACE) target/$(patsubst %-install,%,$@)-install $(MAKE) -C $(patsubst %-install,%,$@) install linux-imagebuilder: - @$(TRACE) target/linux/imagebuilder $(MAKE) -C linux imagebuilder diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index 9f25fd721e7..7922de91341 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -9,31 +9,24 @@ IB_DIR:=$(BUILD_DIR)/$(IB_NAME) define kernel_template $(1)/$(2)-clean: - @$(TRACE) target/linux/$(2)-$(1)-clean $(MAKE) -C $(2)-$(1) BOARD="$(2)" clean $(1)/$(2)-prepare: - @$(TRACE) target/linux/$(2)-$(1)-prepare $(MAKE) -C $(2)-$(1) BOARD="$(2)" prepare $(1)/$(2)-compile: - @$(TRACE) target/linux/$(2)-$(1)-compile $(MAKE) -C $(2)-$(1) BOARD="$(2)" compile $(1)/$(2)-rebuild: - @$(TRACE) target/linux/$(2)-$(1)-rebuild $(MAKE) -C $(2)-$(1) BOARD="$(2)" rebuild $(1)/$(2)-install: - @$(TRACE) target/linux/$(2)-$(1)-install $(MAKE) -C $(2)-$(1) BOARD="$(2)" install $(1)/$(2)-image: $(1)/$(2)-install - @$(TRACE) target/linux/image-install $(MAKE) -C image KERNEL="$(1)" BOARD="$(2)" install $(1)/$(2)-install-ib: - @$(TRACE) target/linux/image-install-ib $(MAKE) -C image KERNEL="$(1)" BOARD="$(2)" IB_DIR="$(IB_DIR)" install-ib echo '$$$$(eval $$$$(call image_template,$(2),$(1)))' >> $(IB_DIR)/kernel.mk @@ -76,10 +69,8 @@ install: $(BIN_DIR)/$(IB_NAME).tar.bz2 endif prepare: - @$(TRACE) target/linux/image-prepare $(MAKE) -C image prepare compile: - @$(TRACE) target/linux/image-compile $(MAKE) -C image compile install: rebuild: diff --git a/openwrt/target/linux/ar531x-2.4/Makefile b/openwrt/target/linux/ar531x-2.4/Makefile index 6e6551b193d..3abb30d4877 100644 --- a/openwrt/target/linux/ar531x-2.4/Makefile +++ b/openwrt/target/linux/ar531x-2.4/Makefile @@ -10,8 +10,8 @@ include ../generic-$(KERNEL)/modules.mk include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches @$(CP) config $(LINUX_DIR)/.config touch $@ diff --git a/openwrt/target/linux/ar7-2.4/Makefile b/openwrt/target/linux/ar7-2.4/Makefile index 10be12117bc..207d95d9afe 100644 --- a/openwrt/target/linux/ar7-2.4/Makefile +++ b/openwrt/target/linux/ar7-2.4/Makefile @@ -31,8 +31,8 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches @$(CP) config $(LINUX_DIR)/.config touch $@ @@ -47,7 +47,7 @@ ATM_FIRMWARE_FILE=$(ATM_FIRMWARE_DIR).tar.gz ATM_FIRMWARE_MD5SUM=8bfcb31109796502d66b11baaeb2fba6 $(DL_DIR)/$(ATM_FIRMWARE_FILE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(ATM_FIRMWARE_FILE) $(ATM_FIRMWARE_MD5SUM) $(DOWNLOAD_SITE) $(MAKE_TRACE) + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(ATM_FIRMWARE_FILE) $(ATM_FIRMWARE_MD5SUM) $(DOWNLOAD_SITE) $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(ATM_FIRMWARE_FILE) $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.drivers-unpacked diff --git a/openwrt/target/linux/au1000-2.6/Makefile b/openwrt/target/linux/au1000-2.6/Makefile index ff84f664ac4..8c1c67d1833 100644 --- a/openwrt/target/linux/au1000-2.6/Makefile +++ b/openwrt/target/linux/au1000-2.6/Makefile @@ -12,13 +12,13 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches @$(CP) config $(LINUX_DIR)/.config touch $@ $(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux - $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(CP) $(LINUX_DIR)/vmlinux $@ touch $@ diff --git a/openwrt/target/linux/brcm-2.4/Makefile b/openwrt/target/linux/brcm-2.4/Makefile index 17473be323f..06da0ac010f 100644 --- a/openwrt/target/linux/brcm-2.4/Makefile +++ b/openwrt/target/linux/brcm-2.4/Makefile @@ -28,8 +28,8 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches @$(CP) config $(LINUX_DIR)/.config touch $@ @@ -44,7 +44,7 @@ LINUX_BINARY_WL_DRIVER=kernel-binary-wl-0.6.tar.gz LINUX_BINARY_WL_MD5SUM=4fc1d5b46bcb7a17d6d5dd31da9c8d7f $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_BINARY_WL_DRIVER) $(LINUX_BINARY_WL_MD5SUM) $(LINUX_BINARY_DRIVER_SITE) $(MAKE_TRACE) + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_BINARY_WL_DRIVER) $(LINUX_BINARY_WL_MD5SUM) $(LINUX_BINARY_DRIVER_SITE) $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.drivers-unpacked diff --git a/openwrt/target/linux/image/Makefile b/openwrt/target/linux/image/Makefile index e64efbf3575..af7cd0e8d57 100644 --- a/openwrt/target/linux/image/Makefile +++ b/openwrt/target/linux/image/Makefile @@ -15,22 +15,19 @@ include ./tgz.mk endif prepare: - $(MAKE) prepare-targets $(MAKE_TRACE) + $(MAKE) prepare-targets compile: - $(MAKE) compile-targets $(MAKE_TRACE) + $(MAKE) compile-targets install: - $(MAKE) install-targets $(MAKE_TRACE) + $(MAKE) install-targets .PHONY: prepare compile install $(BOARD)-compile: - @$(TRACE) target/linux/image/$(BOARD)-prepare $(MAKE) -C $(BOARD) prepare - @$(TRACE) target/linux/image/$(BOARD)-compile $(MAKE) -C $(BOARD) compile install-ib: - @$(TRACE) target/linux/image/$(BOARD)-install-ib -$(MAKE) -C $(BOARD) IB_DIR="$(IB_DIR)" install-ib mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) $(CP) $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ @@ -44,4 +41,4 @@ install-prepare: rebuild: clean prepare compile install clean: - $(MAKE) clean-targets $(MAKE_TRACE) + $(MAKE) clean-targets diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk index c7d4335d8c0..1b0c3a778f3 100644 --- a/openwrt/target/linux/image/jffs2.mk +++ b/openwrt/target/linux/image/jffs2.mk @@ -7,31 +7,29 @@ endif #JFFS2OPTS += -Xlzo -msize -Xlzari jffs2-prepare: - $(MAKE) -C jffs2 prepare $(MAKE_TRACE) + $(MAKE) -C jffs2 prepare jffs2-compile: prepare-targets - $(MAKE) -C jffs2 compile $(MAKE_TRACE) + $(MAKE) -C jffs2 compile jffs2-clean: - $(MAKE) -C jffs2 clean $(MAKE_TRACE) + $(MAKE) -C jffs2 clean rm -f $(KDIR)/root.jffs2* $(KDIR)/root.jffs2-4MB: install-prepare @rm -rf $(KDIR)/root/jffs - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $@ -d $(KDIR)/root $(MAKE_TRACE) + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $@ -d $(KDIR)/root $(KDIR)/root.jffs2-8MB: install-prepare @rm -rf $(KDIR)/root/jffs - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $@ -d $(KDIR)/root $(MAKE_TRACE) + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $@ -d $(KDIR)/root ifeq ($(IB),) jffs2-install: compile-targets $(BOARD)-compile endif jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB - $(TRACE) target/linux/image/$(BOARD)/install $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-4MB" - $(TRACE) target/linux/image/$(BOARD)/install $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-8MB" jffs2-install-ib: compile-targets diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk index 0b39aa1611c..29ce5522d51 100644 --- a/openwrt/target/linux/image/squashfs.mk +++ b/openwrt/target/linux/image/squashfs.mk @@ -5,25 +5,24 @@ ifeq ($(ARCH),mips) endif squashfs-prepare: - $(MAKE) -C squashfs prepare $(MAKE_TRACE) + $(MAKE) -C squashfs prepare squashfs-compile: prepare-targets - $(MAKE) -C squashfs compile $(MAKE_TRACE) + $(MAKE) -C squashfs compile squashfs-clean: - $(MAKE) -C squashfs clean $(MAKE_TRACE) + $(MAKE) -C squashfs clean rm -f $(KDIR)/root.squashfs $(KDIR)/root.squashfs: install-prepare @mkdir -p $(KDIR)/root/jffs - $(STAGING_DIR)/bin/mksquashfs-lzma $(KDIR)/root $@ -nopad -noappend -root-owned -$(endian) $(MAKE_TRACE) + $(STAGING_DIR)/bin/mksquashfs-lzma $(KDIR)/root $@ -nopad -noappend -root-owned -$(endian) ifeq ($(IB),) squashfs-install: compile-targets $(BOARD)-compile endif squashfs-install: $(KDIR)/root.squashfs - $(TRACE) target/linux/image/$(BOARD)/install $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="squashfs" squashfs-install-ib: compile-targets diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index 56817dbab87..00ff102d583 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -13,7 +13,7 @@ $(PACKAGE_DIR): $(DL_DIR)/$(LINUX_SOURCE): -mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) $(MAKE_TRACE) + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) -mkdir -p $(LINUX_BUILD_DIR) @@ -28,37 +28,36 @@ $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched $(LINUX_DIR)/Makefile \ $(LINUX_DIR)/arch/*/Makefile $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h touch $@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) dep $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) dep touch $@ $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done else $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts touch $@ endif $(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux - $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ $(MAKE_TRACE) + $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ touch -c $(LINUX_KERNEL) $(LINUX_DIR)/.modules_done: rm -rf $(LINUX_BUILD_DIR)/modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules $(MAKE_TRACE) - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install $(MAKE_TRACE) + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done $(STAMP_DIR)/.linux-compile: - @$(MAKE) $(LINUX_DIR)/.modules_done $(TARGETS) $(KERNEL_IPKG) $(MAKE_TRACE) - ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux $(MAKE_TRACE) - @$(TRACE) target/linux/package-compile + @$(MAKE) $(LINUX_DIR)/.modules_done $(TARGETS) $(KERNEL_IPKG) + ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux $(MAKE) -C $(TOPDIR)/target/linux/package \ $(KPKG_MAKEOPTS) \ compile @@ -73,7 +72,7 @@ pkg-install: $(MAKE) -C $(TOPDIR)/target/linux/package \ $(KPKG_MAKEOPTS) \ install - @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true; } $(MAKE_TRACE) + [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) $(KERNEL_IPKG): rm -rf $(KERNEL_IDIR) @@ -82,33 +81,30 @@ $(KERNEL_IPKG): if [ -f ./config/$(BOARD).modules ]; then \ cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \ fi - $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) $(MAKE_TRACE) + $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) source: $(DL_DIR)/$(LINUX_SOURCE) prepare: @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) - @$(MAKE) $(LINUX_DIR)/.configured $(MAKE_TRACE) + @$(MAKE) $(LINUX_DIR)/.configured compile: prepare $(STAMP_DIR)/.linux-compile install: compile - @$(TRACE) target/linux/package-install - $(MAKE) $(KPKG_MAKEOPTS) pkg-install $(MAKE_TRACE) - $(MAKE) $(KPKG_MAKEOPTS) $(LINUX_KERNEL) $(MAKE_TRACE) + $(MAKE) $(KPKG_MAKEOPTS) pkg-install + $(MAKE) $(KPKG_MAKEOPTS) $(LINUX_KERNEL) mostlyclean: rm -f $(STAMP_DIR)/.linux-compile rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked - $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean $(MAKE_TRACE) + $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean rm -f $(LINUX_KERNEL) rebuild: -$(MAKE) mostlyclean - if [ -f $(LINUX_KERNEL) ]; then \ - $(MAKE) clean $(MAKE_TRACE); \ - fi - $(MAKE) compile $(MAKE_TRACE) + @[ -f $(LINUX_KERNEL) ] && $(MAKE) clean + $(MAKE) compile clean: rm -f $(STAMP_DIR)/.linux-compile diff --git a/openwrt/target/linux/package/Makefile b/openwrt/target/linux/package/Makefile index 09a50e76d82..45211c1c8b0 100644 --- a/openwrt/target/linux/package/Makefile +++ b/openwrt/target/linux/package/Makefile @@ -32,34 +32,22 @@ install: $(patsubst %,%-install,$(package-y)) KPKG_MAKEOPTS += BUILD_DIR="$(LINUX_BUILD_DIR)" %-prepare: - @$(START_TRACE) "target/linux/package/$(patsubst %-prepare,%,$@)/prepare: " $(MAKE) -C $(patsubst %-prepare,%,$@) \ $(KPKG_MAKEOPTS) \ prepare - @$(CMD_TRACE) " done" - @$(END_TRACE) %-compile: - @$(START_TRACE) "target/linux/package/$(patsubst %-compile,%,$@)-compile: " $(MAKE) -C $(patsubst %-compile,%,$@) \ $(KPKG_MAKEOPTS) \ compile - @$(CMD_TRACE) " done" - @$(END_TRACE) %-install: - @$(START_TRACE) "target/linux/package/$(patsubst %-install,%,$@)-install: " $(MAKE) -C $(patsubst %-install,%,$@) \ $(KPKG_MAKEOPTS) \ install - @$(CMD_TRACE) " done" - @$(END_TRACE) %-clean: - @$(START_TRACE) "target/linux/package/$(patsubst %-clean,%,$@)-clean: " @$(MAKE) -C $(patsubst %-clean,%,$@) \ $(KPKG_MAKEOPTS) \ clean - @$(CMD_TRACE) " done" - @$(END_TRACE) diff --git a/openwrt/target/linux/rules.mk b/openwrt/target/linux/rules.mk index f0f2e72dbba..1ebe28b6ac5 100644 --- a/openwrt/target/linux/rules.mk +++ b/openwrt/target/linux/rules.mk @@ -77,7 +77,7 @@ ifneq ($(6),) done endif $(8) - $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) $(MAKE_TRACE) + $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) endef diff --git a/openwrt/target/linux/x86-2.4/Makefile b/openwrt/target/linux/x86-2.4/Makefile index 5f20f1e406a..bcc8bd05d28 100644 --- a/openwrt/target/linux/x86-2.4/Makefile +++ b/openwrt/target/linux/x86-2.4/Makefile @@ -17,13 +17,13 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches @$(CP) config $(LINUX_DIR)/.config touch $@ $(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux - $(MAKE) -C $(LINUX_DIR) TOPDIR=$(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) TOPDIR=$(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $@ touch $@ diff --git a/openwrt/target/linux/x86-2.6/Makefile b/openwrt/target/linux/x86-2.6/Makefile index d7be454c656..48417d20c84 100644 --- a/openwrt/target/linux/x86-2.6/Makefile +++ b/openwrt/target/linux/x86-2.6/Makefile @@ -12,13 +12,13 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches @$(CP) config $(LINUX_DIR)/.config touch $@ $(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux - $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE) + $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $@ touch $@ diff --git a/openwrt/target/lzma/Makefile b/openwrt/target/lzma/Makefile index 0225844d308..d68a5d4b793 100644 --- a/openwrt/target/lzma/Makefile +++ b/openwrt/target/lzma/Makefile @@ -17,18 +17,18 @@ LZMA_ALONE_DIR=$(LZMA_DIR)/C/7zip/Compress/LZMA_Alone TARGETS=$(LZMA_LIB_DIR)/liblzma.a $(LZMA_ALONE_DIR)/lzma $(DL_DIR)/$(LZMA_SOURCE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LZMA_SOURCE) $(LZMA_MD5) $(LZMA_SITE) $(MAKE_TRACE) + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LZMA_SOURCE) $(LZMA_MD5) $(LZMA_SITE) $(LZMA_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE) @rm -rf $(LZMA_DIR) && mkdir -p $(LZMA_DIR) tar xjf $^ -C $(LZMA_DIR) - patch -d $(LZMA_DIR) -p1 < lzma-zlib.patch $(MAKE_TRACE) + patch -d $(LZMA_DIR) -p1 < lzma-zlib.patch touch $(LZMA_DIR)/.unpacked $(LZMA_ALONE_DIR)/lzma $(LZMA_LIB_DIR)/liblzma.a: $(LZMA_DIR)/.built $(LZMA_DIR)/.built: $(LZMA_DIR)/.unpacked - $(MAKE) -C $(LZMA_LIB_DIR) $(MAKE_TRACE) - $(MAKE) -f makefile.gcc -C $(LZMA_ALONE_DIR) $(MAKE_TRACE) + $(MAKE) -C $(LZMA_LIB_DIR) + $(MAKE) -f makefile.gcc -C $(LZMA_ALONE_DIR) touch $@ lzma: $(TARGETS) @@ -37,8 +37,8 @@ lzma: $(TARGETS) lzma-source: $(DL_DIR)/$(LZMA_SOURCE) lzma-clean: - -$(MAKE) -C $(LZMA_LIB_DIR) clean $(MAKE_TRACE) - -$(MAKE) -C $(LZMA_ALONE_DIR) clean $(MAKE_TRACE) + -$(MAKE) -C $(LZMA_LIB_DIR) clean + -$(MAKE) -C $(LZMA_ALONE_DIR) clean rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma lzma-dirclean: From a5b8312036b11480bc91777399f3998f437b8dfa Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 10 May 2006 20:33:38 +0000 Subject: [PATCH 040/757] remove more junk SVN-Revision: 3756 --- openwrt/toolchain/Makefile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index c99116db6c4..8a39def3744 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -31,27 +31,23 @@ $(TOOL_BUILD_DIR): %-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \ - $(TRACE) toolchain/$(patsubst %-prepare,%,$@)/prepare; \ - $(MAKE) -C $(patsubst %-prepare,%,$@) prepare $(MAKE_TRACE); \ + $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \ } @touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ %-compile: %-prepare @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \ - $(TRACE) toolchain/$(patsubst %-compile,%,$@)/compile; \ - $(MAKE) -C $(patsubst %-compile,%,$@) compile $(MAKE_TRACE); \ + $(MAKE) -C $(patsubst %-compile,%,$@) compile; \ } @touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ %-install: %-compile @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \ - $(TRACE) toolchain/$(patsubst %-install,%,$@)/install; \ - $(MAKE) -C $(patsubst %-install,%,$@) install $(MAKE_TRACE); \ + $(MAKE) -C $(patsubst %-install,%,$@) install; \ } @touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ %-clean: - $(TRACE) toolchain/$(patsubst %-clean,%,$@)/clean - @$(MAKE) -C $(patsubst %-clean,%,$@) clean $(MAKE_TRACE) + @$(MAKE) -C $(patsubst %-clean,%,$@) clean @rm -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-* From 043df621505fb501fb61e838c96cb40ef7a825ca Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 10 May 2006 20:57:35 +0000 Subject: [PATCH 041/757] change phony targets to FORCE (easier to read) SVN-Revision: 3757 --- openwrt/Makefile | 13 +++++-------- openwrt/package/rules.mk | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index ec1e3677ab8..c323a9c24c4 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -38,21 +38,19 @@ endif endif export OPENWRTVERSION -.pkginfo: +.pkginfo: FORCE +ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package) @echo Collecting package info... @-for makefile in package/*/Makefile; do \ echo Source-Makefile: $$makefile; \ $(MAKE) DUMP=1 -f $$makefile 2>&- || true; \ done > $@ - -ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package) -.pkginfo: pkginfo-clean endif .config.in: .pkginfo ./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ -pkginfo-clean: +pkginfo-clean: FORCE -rm -f .pkginfo .config.in scripts/config/mconf: .config.in @@ -70,6 +68,5 @@ config: scripts/config/conf config-clean: $(MAKE) -C scripts/config clean -.PHONY: pkginfo-clean - - +.PHONY: FORCE +FORCE: diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 540b14f63a2..3d2f957d3ba 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -240,20 +240,21 @@ else $(PACKAGE_DIR): mkdir -p $@ -source: $(DL_DIR)/$(PKG_SOURCE) -prepare: $(PKG_BUILD_DIR)/.prepared -configure: $(PKG_BUILD_DIR)/.configured +source: FORCE $(DL_DIR)/$(PKG_SOURCE) +prepare: FORCE $(PKG_BUILD_DIR)/.prepared +configure: FORCE $(PKG_BUILD_DIR)/.configured -compile-targets: -compile: compile-targets +compile-targets: FORCE +compile: FORCE compile-targets -install-targets: -install: install-targets +install-targets: FORCE +install: FORCE install-targets -clean-targets: -clean: +clean-targets: FORCE +clean: FORCE @$(MAKE) clean-targets rm -rf $(PKG_BUILD_DIR) endif -.PHONY: all source prepare compile install clean dumpinfo compile-targets install-targets clean-targets +.PHONY: FORCE +FORCE: From 3ee6ad0404860f63249e729d3842ff7260fb1600 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 11 May 2006 00:18:12 +0000 Subject: [PATCH 042/757] partial cleanup SVN-Revision: 3758 --- openwrt/Makefile | 2 ++ openwrt/package/rules.mk | 46 +++++++++++++++++----------------------- openwrt/rules.mk | 18 ++++++++++++++-- 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index c323a9c24c4..06288de6b86 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -38,6 +38,8 @@ endif endif export OPENWRTVERSION +all: + .pkginfo: FORCE ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package) @echo Collecting package info... diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 3d2f957d3ba..20fa5d4c82f 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -5,20 +5,18 @@ all: compile endif define Build/DefaultTargets -$(PKG_BUILD_DIR)/.prepared: - rm -rf $(PKG_BUILD_DIR) - mkdir -p $(PKG_BUILD_DIR) +$(PKG_BUILD_DIR)/.prepared: FORCE $(DL_DIR)/$(PKG_SOURCE) +ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) + @-rm -rf $(PKG_BUILD_DIR) + @mkdir -p $(PKG_BUILD_DIR) $(call Build/Prepare) - touch $$@ + @touch $$@ +endif $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared $(call Build/Configure) touch $$@ -ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) -$(PKG_BUILD_DIR)/.prepared: clean -endif - $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(call Build/Compile) touch $$@ @@ -32,8 +30,8 @@ package-recompile: .PHONY: package-clean package-recompile -define Build/DefaultTargets -endef +# define Build/DefaultTargets +# endef endef define Package/Default @@ -52,22 +50,18 @@ TITLE:= DESCRIPTION:= endef +define RequiredField +ifeq ($$($(1)),) +$$(error Package/$$(1) is missing the $(1) field) +endif +endef + define BuildPackage $(eval $(call Package/Default)) $(eval $(call Package/$(1))) -ifeq ($(TITLE),) -$$(error Package $(1) has no TITLE) -endif -ifeq ($(CATEGORY),) -$$(error Package $(1) has no CATEGORY) -endif -ifeq ($(PRIORITY),) -$$(error Package $(1) has no PRIORITY) -endif -ifeq ($(VERSION),) -$$(error Package $(1) has no VERSION) -endif +$(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, $(eval $(call RequiredField,$(FIELD)))) + ifeq ($(PKGARCH),) PKGARCH:=$(ARCH) endif @@ -165,18 +159,16 @@ endef ifneq ($(strip $(PKG_SOURCE)),) $(DL_DIR)/$(PKG_SOURCE): $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) - -$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) endif ifneq ($(strip $(PKG_CAT)),) define Build/Prepare/Default - if [ "$(PKG_CAT)" = "unzip" ]; then \ + @if [ "$(PKG_CAT)" = "unzip" ]; then \ unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \ else \ $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - ; \ fi - if [ -d ./patches ]; then \ + @if [ -d ./patches ]; then \ $(PATCH) $(PKG_BUILD_DIR) ./patches ; \ fi endef @@ -187,7 +179,7 @@ $(call Build/Prepare/Default) endef define Build/Configure/Default - (cd $(PKG_BUILD_DIR); \ + @(cd $(PKG_BUILD_DIR); \ [ -x configure ] && \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 417dae7de08..d94a818441c 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -5,9 +5,23 @@ endif SHELL=/bin/bash export SHELL -ifeq ($(V),) -V=5 +ifdef V + ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) + endif endif +ifndef KBUILD_VERBOSE + KBUILD_VERBOSE = 0 +endif + +ifneq ($(KBUILD_VERBOSE),0) + quiet = + Q = +else + quiet=quiet_ + Q = @ +endif + CP=cp -fpR MAKE1=make From 02be4b6759d15d57d29af24a06856ff2d072f6c3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 11 May 2006 16:00:43 +0000 Subject: [PATCH 043/757] replace $(IDIR_*) with $(1) SVN-Revision: 3759 --- openwrt/package/bridge/Makefile | 6 +++--- openwrt/package/dnsmasq/Makefile | 10 ++++----- openwrt/package/dropbear/Makefile | 22 +++++++++---------- openwrt/package/ebtables/Makefile | 4 ++-- openwrt/package/haserl/Makefile | 4 ++-- openwrt/package/iproute2/Makefile | 8 +++---- openwrt/package/ipsec-tools/Makefile | 20 +++++++++--------- openwrt/package/ipset/Makefile | 4 ++-- openwrt/package/mtd/Makefile | 4 ++-- openwrt/package/nvram/Makefile | 9 ++++---- openwrt/package/pcmcia-cs/Makefile | 10 ++++----- openwrt/package/pptp/Makefile | 12 +++++------ openwrt/package/robocfg/Makefile | 8 +++---- openwrt/package/udev/Makefile | 28 ++++++++++++------------- openwrt/package/wificonf/Makefile | 4 ++-- openwrt/package/wireless-tools/Makefile | 8 +++---- openwrt/package/zlib/Makefile | 4 ++-- 17 files changed, 82 insertions(+), 83 deletions(-) diff --git a/openwrt/package/bridge/Makefile b/openwrt/package/bridge/Makefile index 44856c9f166..65fd8358e86 100644 --- a/openwrt/package/bridge/Makefile +++ b/openwrt/package/bridge/Makefile @@ -29,9 +29,9 @@ define Build/Configure $(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR)) endef -define Package/busybox/install - install -m0755 -d $(IDIR_DNSMASQ)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/brctl/brctl $(IDIR_BRIDGE)/usr/sbin/ +define Package/bridge/install + install -m0755 -d $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin/ endef $(eval $(call BuildPackage,bridge)) diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index 76b1ac0d990..d3ce64736b7 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -25,11 +25,11 @@ URL:=http://www.thekelleys.org.uk/dnsmasq/ endef define Package/dnsmasq/install - install -m0755 -d $(IDIR_DNSMASQ)/usr/sbin - install -m0755 -d $(IDIR_DNSMASQ)/etc/init.d/ - install -m0755 $(PKG_BUILD_DIR)/src/dnsmasq $(IDIR_DNSMASQ)/usr/sbin/ - install -m0644 ./files/dnsmasq.conf $(IDIR_DNSMASQ)/etc/dnsmasq.conf - install -m0755 ./files/dnsmasq.init $(IDIR_DNSMASQ)/etc/init.d/S50dnsmasq + install -m0755 -d $(1)/usr/sbin + install -m0755 -d $(1)/etc/init.d/ + install -m0755 $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/ + install -m0644 ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf + install -m0755 ./files/dnsmasq.init $(1)/etc/init.d/S50dnsmasq endef $(eval $(call BuildPackage,dnsmasq)) diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index ea452f2f622..133e67a9fa1 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -87,22 +87,22 @@ define Buid/Compile endef define Package/dropbear/install - mkdir -p $(IDIR_DROPBEAR)/usr/bin - mkdir -p $(IDIR_DROPBEAR)/usr/sbin + mkdir -p $(1)/usr/bin + mkdir -p $(1)/usr/sbin install -m 755 $(PKG_BUILD_DIR)/dropbearmulti \ - $(IDIR_DROPBEAR)/usr/sbin/dropbear - ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp - ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh - ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient - ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey - mkdir -p $(IDIR_DROPBEAR)/etc/init.d - install -m 755 ./files/S50dropbear $(IDIR_DROPBEAR)/etc/init.d/ + $(1)/usr/sbin/dropbear + ln -sf ../sbin/dropbear $(1)/usr/bin/scp + ln -sf ../sbin/dropbear $(1)/usr/bin/ssh + ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient + ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey + mkdir -p $(1)/etc/init.d + install -m 755 ./files/S50dropbear $(1)/etc/init.d/ endef define Package/dropbearconvert/install - mkdir -p $(IDIR_DBCONVERT)/usr/bin + mkdir -p $(1)/usr/bin install -m 755 $(PKG_BUILD_DIR)/dropbearconvert \ - $(IDIR_DBCONVERT)/usr/bin/dropbearconvert + $(1)/usr/bin/dropbearconvert endef $(eval $(call BuildPackage,dropbear)) diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index 4ee6833882c..df551154e2c 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -24,8 +24,8 @@ URL:=http://ebtables.sourceforge.net/ endef define Package/ebtables/install - install -d -m0755 $(IDIR_DNSMASQ)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/ebtables $(IDIR_EBTABLES)/usr/sbin/ebtables + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/ebtables endef $(eval $(call BuildPackage,ebtables)) diff --git a/openwrt/package/haserl/Makefile b/openwrt/package/haserl/Makefile index 8f35fbf6237..2bb9fc93198 100644 --- a/openwrt/package/haserl/Makefile +++ b/openwrt/package/haserl/Makefile @@ -23,8 +23,8 @@ URL:=http://haserl.sourceforge.net/ endef define Package/haserl/install - install -m0755 -d $(IDIR_HASERL)/usr/bin - install -m0755 $(PKG_INSTALL_DIR)/usr/bin/haserl $(IDIR_HASERL)/usr/bin/ + install -m0755 -d $(1)/usr/bin + install -m0755 $(PKG_INSTALL_DIR)/usr/bin/haserl $(1)/usr/bin/ endef $(eval $(call BuildPackage,haserl)) diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index 0fe03bc8258..c670ee5dac3 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -54,13 +54,13 @@ define Build/Compile endef define Package/ip/install - install -d -m0755 $(IDIR_IP)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/ip/ip $(IDIR_IP)/usr/sbin/ + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/ endef define Package/tc/install - install -d -m0755 $(IDIR_TC)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/tc/tc $(IDIR_TC)/usr/sbin/ + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/ endef # $(eval $(call BuildPackage,iproute2)) diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 6d27397c0f4..9e14b400750 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -67,16 +67,16 @@ define Build/Configure endef define Package/ipsec-tools/install - install -d -m0755 $(IDIR_IPSEC_TOOLS)/etc - install -d -m0755 $(IDIR_IPSEC_TOOLS)/usr/lib/ - install -d -m0755 $(IDIR_IPSEC_TOOLS)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(IDIR_IPSEC_TOOLS)/etc/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(IDIR_IPSEC_TOOLS)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(IDIR_IPSEC_TOOLS)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(IDIR_IPSEC_TOOLS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(IDIR_IPSEC_TOOLS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(IDIR_IPSEC_TOOLS)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(IDIR_IPSEC_TOOLS)/usr/sbin/ + install -d -m0755 $(1)/etc + install -d -m0755 $(1)/usr/lib/ + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/ endef $(eval $(call BuildPackage,ipsec-tools)) diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index c9388197996..3b65a7d37df 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -26,8 +26,8 @@ endef define Package/ipset/install $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR=$(IDIR_IPSET) PREFIX=/usr install - rm -rf $(IDIR_IPSET)/usr/man + DESTDIR=$(1) PREFIX=/usr install + rm -rf $(1)/usr/man endef $(eval $(call BuildPackage,ipset)) diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index 381184b1d3e..0d684b8f492 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -23,6 +23,6 @@ define Build/Compile endef define Package/mtd/install - install -d -m0755 $(IDIR_MTD)/sbin - install -m0755 $(PKG_BUILD_DIR)/mtd $(IDIR_MTD)/sbin + install -d -m0755 $(1)/sbin + install -m0755 $(PKG_BUILD_DIR)/mtd $(1)/sbin endef diff --git a/openwrt/package/nvram/Makefile b/openwrt/package/nvram/Makefile index 762eb581839..3b9f82dbe05 100644 --- a/openwrt/package/nvram/Makefile +++ b/openwrt/package/nvram/Makefile @@ -22,12 +22,11 @@ define Build/Prepare $(CP) ./src/* $(PKG_BUILD_DIR) endef -$(IPKG_NVRAM): define Package/nvram/install - install -d -m0755 $(IDIR_NVRAM)/usr/lib - install -d -m0755 $(IDIR_NVRAM)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/*.so $(IDIR_NVRAM)/usr/lib - install -m0755 $(PKG_BUILD_DIR)/nvram $(IDIR_NVRAM)/usr/sbin + install -d -m0755 $(1)/usr/lib + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib + install -m0755 $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin endef compile-targets: install-dev diff --git a/openwrt/package/pcmcia-cs/Makefile b/openwrt/package/pcmcia-cs/Makefile index a9c7ba8001b..c89ce2913f5 100644 --- a/openwrt/package/pcmcia-cs/Makefile +++ b/openwrt/package/pcmcia-cs/Makefile @@ -43,11 +43,11 @@ define Build/Configure endef define Package/pcmcia-cs/install - install -m0755 -d $(IDIR_PCMCIA_UTILS)/etc - install -m0755 -d $(IDIR_PCMCIA_UTILS)/usr/sbin - install -m0644 $(PKG_INSTALL_DIR)/etc/pcmcia $(IDIR_PCMCIA_UTILS)/etc/ - install -m0755 $(PKG_INSTALL_DIR)/sbin/cardctl $(IDIR_PCMCIA_UTILS)/usr/sbin/ - install -m0755 $(PKG_INSTALL_DIR)/sbin/cardmgr $(IDIR_PCMCIA_UTILS)/usr/sbin/ + install -m0755 -d $(1)/etc + install -m0755 -d $(1)/usr/sbin + install -m0644 $(PKG_INSTALL_DIR)/etc/pcmcia $(1)/etc/ + install -m0755 $(PKG_INSTALL_DIR)/sbin/cardctl $(1)/usr/sbin/ + install -m0755 $(PKG_INSTALL_DIR)/sbin/cardmgr $(1)/usr/sbin/ endef $(eval $(call BuildPackage,pcmcia-cs)) diff --git a/openwrt/package/pptp/Makefile b/openwrt/package/pptp/Makefile index de7c50c2d44..776a6686400 100644 --- a/openwrt/package/pptp/Makefile +++ b/openwrt/package/pptp/Makefile @@ -23,12 +23,12 @@ URL:=http://pptpclient.sourceforge.net/ endef define Package/pptp/install - install -d -m0755 $(IDIR_PPTP)/sbin - install -d -m0755 $(IDIR_PPTP)/etc/ppp - install -d -m0755 $(IDIR_PPTP)/usr/sbin - install -m0755 ./files/ifup.pptp $(IDIR_PPTP)/sbin/ifup.pptp - install -m0644 ./files/options.pptp $(IDIR_PPTP)/etc/ppp/ - install -m0755 $(PKG_BUILD_DIR)/pptp $(IDIR_PPTP)/usr/sbin/ + install -d -m0755 $(1)/sbin + install -d -m0755 $(1)/etc/ppp + install -d -m0755 $(1)/usr/sbin + install -m0755 ./files/ifup.pptp $(1)/sbin/ifup.pptp + install -m0644 ./files/options.pptp $(1)/etc/ppp/ + install -m0755 $(PKG_BUILD_DIR)/pptp $(1)/usr/sbin/ endef $(eval $(call BuildPackage,pptp)) diff --git a/openwrt/package/robocfg/Makefile b/openwrt/package/robocfg/Makefile index 194c022a415..8f89e753878 100644 --- a/openwrt/package/robocfg/Makefile +++ b/openwrt/package/robocfg/Makefile @@ -23,10 +23,10 @@ define Build/Compile endef define Package/robocfg/install - install -d -m0755 $(IDIR_ROBOCFG)/sbin - install -m0755 $(PKG_BUILD_DIR)/robocfg $(IDIR_ROBOCFG)/sbin/ - $(RSTRIP) $(IDIR_ROBOCFG) - $(IPKG_BUILD) $(IDIR_ROBOCFG) $(PACKAGE_DIR) + install -d -m0755 $(1)/sbin + install -m0755 $(PKG_BUILD_DIR)/robocfg $(1)/sbin/ + $(RSTRIP) $(1) + $(IPKG_BUILD) $(1) $(PACKAGE_DIR) endef $(eval $(call BuildPackage,robocfg)) diff --git a/openwrt/package/udev/Makefile b/openwrt/package/udev/Makefile index 9b7c9171ae1..620aa1aedd2 100644 --- a/openwrt/package/udev/Makefile +++ b/openwrt/package/udev/Makefile @@ -31,20 +31,20 @@ URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html endef define Package/udev/install - install -d -m0775 $(IDIR_UDEV)/etc/udev - install -d -m0775 $(IDIR_UDEV)/lib/udev - install -d -m0775 $(IDIR_UDEV)/sbin/ - install -d -m0775 $(IDIR_UDEV)/usr/bin/ - install -d -m0775 $(IDIR_UDEV)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(IDIR_UDEV)/etc/udev/ - $(CP) $(PKG_INSTALL_DIR)/sbin/udev $(IDIR_UDEV)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(IDIR_UDEV)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/udevd $(IDIR_UDEV)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/udevsend $(IDIR_UDEV)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/udevstart $(IDIR_UDEV)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(IDIR_UDEV)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(IDIR_UDEV)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(IDIR_UDEV)/usr/sbin/ + install -d -m0775 $(1)/etc/udev + install -d -m0775 $(1)/lib/udev + install -d -m0775 $(1)/sbin/ + install -d -m0775 $(1)/usr/bin/ + install -d -m0775 $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udev $(1)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udevsend $(1)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udevstart $(1)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(1)/usr/sbin/ endef $(eval $(call BuildPackage,udev)) diff --git a/openwrt/package/wificonf/Makefile b/openwrt/package/wificonf/Makefile index 5e5c667af41..5fbaf052312 100644 --- a/openwrt/package/wificonf/Makefile +++ b/openwrt/package/wificonf/Makefile @@ -22,6 +22,6 @@ define Build/Compile endef define Package/wificonf/install - install -d -m0755 $(IDIR_WIFICONF)/sbin - install -m0755 $(PKG_BUILD_DIR)/wifi $(IDIR_WIFICONF)/sbin/ + install -d -m0755 $(1)/sbin + install -m0755 $(PKG_BUILD_DIR)/wifi $(1)/sbin/ endef diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index f981f7b5b64..39a4ee6b66c 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -36,10 +36,10 @@ define Build/Compile endef define Package/wireless-tools/install - install -d -m0755 $(IDIR_WIRELESS_TOOLS)/usr/lib - install -d -m0755 $(IDIR_WIRELESS_TOOLS)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/libiw.so.28 $(IDIR_WIRELESS_TOOLS)/usr/lib/ - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(IDIR_WIRELESS_TOOLS)/usr/sbin/ + install -d -m0755 $(1)/usr/lib + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/libiw.so.28 $(1)/usr/lib/ + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(1)/usr/sbin/ endef install-dev: $(PKG_BUILD_DIR)/.built diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index d3c8714bac3..56c0381f562 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -49,8 +49,8 @@ define Build/Compile endef define Package/zlib/install - install -m0755 -d $(IDIR_ZLIB)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(IDIR_ZLIB)/usr/lib/ + install -m0755 -d $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/ endef $(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built From d5e5f06d86beee8327e9fcaa7c8b0124d1af5599 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 11 May 2006 16:54:14 +0000 Subject: [PATCH 044/757] remove extra targets SVN-Revision: 3760 --- openwrt/package/rules.mk | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 20fa5d4c82f..22f7e261e5c 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -17,21 +17,18 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared $(call Build/Configure) touch $$@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: FORCE $(PKG_BUILD_DIR)/.configured +ifeq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$(PKG_BUILD_DIR)) $(call Build/Compile) touch $$@ +endif -package-clean: +package-clean: FORCE $(call Build/Clean) rm -f $(PKG_BUILD_DIR)/.built -package-recompile: - rm -f $(PKG_BUILD_DIR)/.built - -.PHONY: package-clean package-recompile - -# define Build/DefaultTargets -# endef +define Build/DefaultTargets +endef endef define Package/Default @@ -75,25 +72,17 @@ IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list -ifneq ($(CONFIG_PACKAGE_$(1)),) -COMPILE_$(1):=1 -endif -ifneq ($(DEVELOPER),) +ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) COMPILE_$(1):=1 endif + ifeq ($(CONFIG_PACKAGE_$(1)),y) install-targets: $$(INFO_$(1)) endif -ifneq ($$(COMPILE_$(1)),) -ifeq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$(PKG_BUILD_DIR)) -$(PKG_BUILD_DIR)/.built: package-recompile -endif - compile-targets: $$(IPKG_$(1)) endif - IDEPEND_$(1):=$$(strip $$(DEPENDS)) DUMPINFO += \ From 079603b9e05c745d0ce1a82c6ecfeb6d9b03ea02 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 11 May 2006 17:18:59 +0000 Subject: [PATCH 045/757] fix error SVN-Revision: 3761 --- openwrt/package/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 22f7e261e5c..f3a1287b156 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -80,6 +80,7 @@ ifeq ($(CONFIG_PACKAGE_$(1)),y) install-targets: $$(INFO_$(1)) endif +ifneq ($$(COMPILE_$(1)),) compile-targets: $$(IPKG_$(1)) endif From a94c4640f29eeaf834d6037eb0542af1ad8e89c9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 11 May 2006 17:33:51 +0000 Subject: [PATCH 046/757] fix typo SVN-Revision: 3762 --- openwrt/package/dropbear/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index 133e67a9fa1..4a732ee831f 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -76,7 +76,7 @@ define Build/Configure ); endef -define Buid/Compile +define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ LD=$(TARGET_CC) \ PROGRAMS="dropbear dbclient dropbearkey scp" \ From be9cc65a9546cada03e647d78709c70b459d759f Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 11 May 2006 21:41:44 +0000 Subject: [PATCH 047/757] fix rules.mk SVN-Revision: 3763 --- openwrt/package/rules.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index f3a1287b156..571193373de 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -18,6 +18,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared touch $$@ $(PKG_BUILD_DIR)/.built: FORCE $(PKG_BUILD_DIR)/.configured +#$#$#(error $$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR))) ifeq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$(PKG_BUILD_DIR)) $(call Build/Compile) touch $$@ @@ -62,11 +63,10 @@ $(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, $(eval $(call RequiredField,$( ifeq ($(PKGARCH),) PKGARCH:=$(ARCH) endif -$(eval + ifeq ($(DESCRIPTION),) -DESCRIPTION:=$(TITLE) +$(eval DESCRIPTION:=$(TITLE)) endif -) IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) @@ -80,8 +80,8 @@ ifeq ($(CONFIG_PACKAGE_$(1)),y) install-targets: $$(INFO_$(1)) endif -ifneq ($$(COMPILE_$(1)),) -compile-targets: $$(IPKG_$(1)) +ifneq ($(COMPILE_$(1)),) +compile-targets: $(IPKG_$(1)) endif IDEPEND_$(1):=$$(strip $$(DEPENDS)) @@ -141,7 +141,7 @@ $(1)-clean: clean: $(1)-clean ifneq ($(__DEFAULT_TARGETS),1) -$(eval $(call Build/DefaultTargets)) +$$(eval $$(call Build/DefaultTargets,$(1))) endif endef From 3b1260256e6390404239df879f3ff0ff70ce65ca Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 11 May 2006 22:36:20 +0000 Subject: [PATCH 048/757] cleanup & add whitespace SVN-Revision: 3764 --- openwrt/package/rules.mk | 189 +++++++++++++++++++-------------------- 1 file changed, 94 insertions(+), 95 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 571193373de..3f22cf642a6 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -1,117 +1,115 @@ ifneq ($(DUMP),) -all: dumpinfo + all: dumpinfo else -all: compile + all: compile endif define Build/DefaultTargets -$(PKG_BUILD_DIR)/.prepared: FORCE $(DL_DIR)/$(PKG_SOURCE) -ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) + prepared: FORCE $(DL_DIR)/$(PKG_SOURCE) + ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) @-rm -rf $(PKG_BUILD_DIR) @mkdir -p $(PKG_BUILD_DIR) $(call Build/Prepare) - @touch $$@ -endif + endif -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared + $(PKG_BUILD_DIR)/.configured: prepared $(call Build/Configure) touch $$@ -$(PKG_BUILD_DIR)/.built: FORCE $(PKG_BUILD_DIR)/.configured -#$#$#(error $$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR))) -ifeq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$(PKG_BUILD_DIR)) + built: FORCE $(PKG_BUILD_DIR)/.configured + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) $(call Build/Compile) - touch $$@ -endif + endif -package-clean: FORCE + package-clean: FORCE $(call Build/Clean) - rm -f $(PKG_BUILD_DIR)/.built -define Build/DefaultTargets -endef + define Build/DefaultTargets + endef endef define Package/Default -CONFIGFILE:= -SECTION:=opt -CATEGORY:=Extra packages -DEPENDS:= -MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org> -SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) -VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) -PKGARCH:=$(ARCH) -PRIORITY:=optional -DEFAULT:= -MENU:= -TITLE:= -DESCRIPTION:= -endef - -define RequiredField -ifeq ($$($(1)),) -$$(error Package/$$(1) is missing the $(1) field) -endif + CONFIGFILE:= + SECTION:=opt + CATEGORY:=Extra packages + DEPENDS:= + MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org> + SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) + VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) + PKGARCH:=$(ARCH) + PRIORITY:=optional + DEFAULT:= + MENU:= + TITLE:= + DESCRIPTION:= endef define BuildPackage -$(eval $(call Package/Default)) -$(eval $(call Package/$(1))) + $(eval $(call Package/Default)) + $(eval $(call Package/$(1))) -$(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, $(eval $(call RequiredField,$(FIELD)))) + $(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, + ifeq ($($(FIELD)),) + $$(error Package/$(1) is missing the $(FIELD) field) + endif + ) -ifeq ($(PKGARCH),) -PKGARCH:=$(ARCH) -endif + ifeq ($(PKGARCH),) + PKGARCH:=$(ARCH) + endif -ifeq ($(DESCRIPTION),) -$(eval DESCRIPTION:=$(TITLE)) -endif + ifeq ($(DESCRIPTION),) + $(eval DESCRIPTION:=$(TITLE)) + endif -IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk -IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) -INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list + IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk + IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) + INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list -ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) -COMPILE_$(1):=1 -endif + ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) + COMPILE_$(1):=1 + endif -ifeq ($(CONFIG_PACKAGE_$(1)),y) -install-targets: $$(INFO_$(1)) -endif + ifeq ($(CONFIG_PACKAGE_$(1)),y) + install-targets: $$(INFO_$(1)) + endif -ifneq ($(COMPILE_$(1)),) -compile-targets: $(IPKG_$(1)) -endif + ifneq ($(COMPILE_$(1)),) + compile-targets: $(IPKG_$(1)) + endif -IDEPEND_$(1):=$$(strip $$(DEPENDS)) + IDEPEND_$(1):=$$(strip $$(DEPENDS)) -DUMPINFO += \ + DUMPINFO += \ echo "Package: $(1)"; -ifneq ($(MENU),) -DUMPINFO += \ + + ifneq ($(MENU),) + DUMPINFO += \ echo "Menu: $(MENU)"; -endif -ifneq ($(DEFAULT),) -DUMPINFO += \ + endif + + ifneq ($(DEFAULT),) + DUMPINFO += \ echo "Default: $(DEFAULT)"; -endif -DUMPINFO += \ + endif + + DUMPINFO += \ echo "Version: $(VERSION)"; \ echo "Depends: $$(IDEPEND_$(1))"; \ echo "Category: $(CATEGORY)"; \ echo "Title: $(TITLE)"; \ echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; -ifneq ($(URL),) -DUMPINFO += \ + + ifneq ($(URL),) + DUMPINFO += \ echo; \ echo "$(URL)"; -endif -DUMPINFO += \ + endif + + DUMPINFO += \ echo "@@"; - -$$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared + $$(IDIR_$(1))/CONTROL/control: prepared mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control @@ -127,32 +125,33 @@ $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ done -$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built + $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control built $(call Package/$(1)/install,$$(IDIR_$(1))) mkdir -p $(PACKAGE_DIR) $(RSTRIP) $$(IDIR_$(1)) $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) -$$(INFO_$(1)): $$(IPKG_$(1)) + $$(INFO_$(1)): $$(IPKG_$(1)) $(IPKG) install $$(IPKG_$(1)) -$(1)-clean: + $(1)-clean: rm -f $(PACKAGE_DIR)/$(1)_* -clean: $(1)-clean -ifneq ($(__DEFAULT_TARGETS),1) -$$(eval $$(call Build/DefaultTargets,$(1))) -endif + clean: $(1)-clean + + ifneq ($(__DEFAULT_TARGETS),1) + $$(eval $$(call Build/DefaultTargets,$(1))) + endif endef ifneq ($(strip $(PKG_SOURCE)),) -$(DL_DIR)/$(PKG_SOURCE): + $(DL_DIR)/$(PKG_SOURCE): $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) endif ifneq ($(strip $(PKG_CAT)),) -define Build/Prepare/Default + define Build/Prepare/Default @if [ "$(PKG_CAT)" = "unzip" ]; then \ unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \ else \ @@ -161,11 +160,11 @@ define Build/Prepare/Default @if [ -d ./patches ]; then \ $(PATCH) $(PKG_BUILD_DIR) ./patches ; \ fi -endef + endef endif define Build/Prepare -$(call Build/Prepare/Default) + $(call Build/Prepare/Default) endef define Build/Configure/Default @@ -193,7 +192,7 @@ define Build/Configure/Default endef define Build/Configure -$(call Build/Configure/Default,) + $(call Build/Configure/Default,) endef define Build/Compile/Default @@ -207,7 +206,7 @@ define Build/Compile/Default endef define Build/Compile -$(call Build/Compile/Default) + $(call Build/Compile/Default) endef define Build/Clean @@ -215,25 +214,25 @@ define Build/Clean endef ifneq ($(DUMP),) -dumpinfo: + dumpinfo: $(DUMPINFO) else -$(PACKAGE_DIR): + $(PACKAGE_DIR): mkdir -p $@ -source: FORCE $(DL_DIR)/$(PKG_SOURCE) -prepare: FORCE $(PKG_BUILD_DIR)/.prepared -configure: FORCE $(PKG_BUILD_DIR)/.configured + source: FORCE $(DL_DIR)/$(PKG_SOURCE) + prepare: FORCE prepared + configure: FORCE $(PKG_BUILD_DIR)/.configured -compile-targets: FORCE -compile: FORCE compile-targets + compile-targets: FORCE + compile: FORCE compile-targets -install-targets: FORCE -install: FORCE install-targets + install-targets: FORCE + install: FORCE install-targets -clean-targets: FORCE -clean: FORCE + clean-targets: FORCE + clean: FORCE @$(MAKE) clean-targets rm -rf $(PKG_BUILD_DIR) endif From c73e647148d663f3d3a82599901ca283d9981273 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 11 May 2006 23:14:04 +0000 Subject: [PATCH 049/757] revert .prepared handling SVN-Revision: 3765 --- openwrt/package/rules.mk | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 3f22cf642a6..e5df61e1774 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -5,14 +5,18 @@ else endif define Build/DefaultTargets - prepared: FORCE $(DL_DIR)/$(PKG_SOURCE) - ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) + + ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) + $(PKG_BUILD_DIR)/.prepared: package-clean + endif + + $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) @-rm -rf $(PKG_BUILD_DIR) @mkdir -p $(PKG_BUILD_DIR) $(call Build/Prepare) - endif + touch $$@ - $(PKG_BUILD_DIR)/.configured: prepared + $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared $(call Build/Configure) touch $$@ @@ -109,7 +113,7 @@ define BuildPackage DUMPINFO += \ echo "@@"; - $$(IDIR_$(1))/CONTROL/control: prepared + $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control @@ -221,17 +225,17 @@ else $(PACKAGE_DIR): mkdir -p $@ - source: FORCE $(DL_DIR)/$(PKG_SOURCE) - prepare: FORCE prepared - configure: FORCE $(PKG_BUILD_DIR)/.configured + source: $(DL_DIR)/$(PKG_SOURCE) + prepare: $(PKG_BUILD_DIR)/.prepared + configure: $(PKG_BUILD_DIR)/.configured - compile-targets: FORCE - compile: FORCE compile-targets + compile-targets: + compile: compile-targets - install-targets: FORCE - install: FORCE install-targets + install-targets: + install: install-targets - clean-targets: FORCE + clean-targets: clean: FORCE @$(MAKE) clean-targets rm -rf $(PKG_BUILD_DIR) From 2f7773adbc1027c90e55d46fb92dd8e9ab6e09b8 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 11 May 2006 23:43:45 +0000 Subject: [PATCH 050/757] BR2_ -> CONFIG_ SVN-Revision: 3766 --- openwrt/target/linux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index 7922de91341..d7744f56e08 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -31,7 +31,7 @@ $(1)/$(2)-install-ib: echo '$$$$(eval $$$$(call image_template,$(2),$(1)))' >> $(IB_DIR)/kernel.mk -ifeq ($(BR2_LINUX_$(3)),y) +ifeq ($(CONFIG_LINUX_$(3)),y) clean: $(1)/$(2)-clean prepare: $(1)/$(2)-prepare compile: $(1)/$(2)-compile @@ -64,7 +64,7 @@ $(BIN_DIR)/$(IB_NAME).tar.bz2: find $(IB_DIR) -name CVS | xargs rm -rf (cd $(BUILD_DIR); tar c $(IB_NAME) | bzip2 -c > $(BIN_DIR)/$(IB_NAME).tar.bz2) -ifeq ($(BR2_PACKAGE_IMAGEBUILDER),y) +ifeq ($(CONFIG_PACKAGE_IMAGEBUILDER),y) install: $(BIN_DIR)/$(IB_NAME).tar.bz2 endif From 95c94007503f7044d0d220964c52fa291c8903c7 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 12 May 2006 18:47:57 +0000 Subject: [PATCH 051/757] add wildcard support to menuconfig (again) SVN-Revision: 3768 --- openwrt/scripts/config/lex.zconf.c_shipped | 63 ++++++++++++++-------- openwrt/scripts/config/zconf.l | 63 ++++++++++++++-------- 2 files changed, 84 insertions(+), 42 deletions(-) diff --git a/openwrt/scripts/config/lex.zconf.c_shipped b/openwrt/scripts/config/lex.zconf.c_shipped index 2712384f6e8..5e01ee5318c 100644 --- a/openwrt/scripts/config/lex.zconf.c_shipped +++ b/openwrt/scripts/config/lex.zconf.c_shipped @@ -20,6 +20,7 @@ #include <string.h> #include <errno.h> #include <stdlib.h> +#include <glob.h> /* end standard C headers. */ @@ -2259,32 +2260,52 @@ void zconf_initscan(const char *name) void zconf_nextfile(const char *name) { - struct file *file = file_lookup(name); - struct buffer *buf = malloc(sizeof(*buf)); - memset(buf, 0, sizeof(*buf)); + size_t i; + int retval; + glob_t files; + char *filename; + struct file *file; + struct buffer *buf; - current_buf->state = YY_CURRENT_BUFFER; - zconfin = zconf_fopen(name); - if (!zconfin) { - printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); + retval = glob(name, GLOB_ERR | GLOB_MARK, NULL, &files); + if (retval == GLOB_NOSPACE || retval == GLOB_ABORTED || retval == GLOB_NOMATCH) { + printf("%s:%d: glob failed: %s \"%s\"\n", zconf_curname(), zconf_lineno(), + retval == GLOB_NOSPACE ? "failed to allocate memory" : + retval == GLOB_ABORTED ? "read error" : "no match", + name); exit(1); } - zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); - buf->parent = current_buf; - current_buf = buf; - if (file->flags & FILE_BUSY) { - printf("recursive scan (%s)?\n", name); - exit(1); + for (i = files.gl_pathc-1; i != (size_t)-1; --i) { + filename = files.gl_pathv[i]; + + file = file_lookup(filename); + buf = malloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + current_buf->state = YY_CURRENT_BUFFER; + zconfin = zconf_fopen(filename); + if (!zconfin) { + printf("%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), filename); + exit(1); + } + zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + if (file->flags & FILE_BUSY) { + printf("recursive scan (%s)?\n", filename); + exit(1); + } + if (file->flags & FILE_SCANNED) { + printf("file %s already scanned?\n", filename); + exit(1); + } + file->flags |= FILE_BUSY; + file->lineno = 1; + file->parent = current_file; + current_file = file; } - if (file->flags & FILE_SCANNED) { - printf("file %s already scanned?\n", name); - exit(1); - } - file->flags |= FILE_BUSY; - file->lineno = 1; - file->parent = current_file; - current_file = file; } static void zconf_endfile(void) diff --git a/openwrt/scripts/config/zconf.l b/openwrt/scripts/config/zconf.l index cfa46077c6b..7acb60f8e70 100644 --- a/openwrt/scripts/config/zconf.l +++ b/openwrt/scripts/config/zconf.l @@ -12,6 +12,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <glob.h> #define LKC_DIRECT_LINK #include "lkc.h" @@ -293,32 +294,52 @@ void zconf_initscan(const char *name) void zconf_nextfile(const char *name) { - struct file *file = file_lookup(name); - struct buffer *buf = malloc(sizeof(*buf)); - memset(buf, 0, sizeof(*buf)); + size_t i; + int retval; + glob_t files; + char *filename; + struct file *file; + struct buffer *buf; - current_buf->state = YY_CURRENT_BUFFER; - yyin = zconf_fopen(name); - if (!yyin) { - printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); + retval = glob(name, GLOB_ERR | GLOB_MARK, NULL, &files); + if (retval == GLOB_NOSPACE || retval == GLOB_ABORTED || retval == GLOB_NOMATCH) { + printf("%s:%d: glob failed: %s \"%s\"\n", zconf_curname(), zconf_lineno(), + retval == GLOB_NOSPACE ? "failed to allocate memory" : + retval == GLOB_ABORTED ? "read error" : "no match", + name); exit(1); } - yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); - buf->parent = current_buf; - current_buf = buf; - if (file->flags & FILE_BUSY) { - printf("recursive scan (%s)?\n", name); - exit(1); + for (i = files.gl_pathc-1; i != (size_t)-1; --i) { + filename = files.gl_pathv[i]; + + file = file_lookup(filename); + buf = malloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + current_buf->state = YY_CURRENT_BUFFER; + zconfin = zconf_fopen(filename); + if (!zconfin) { + printf("%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), filename); + exit(1); + } + zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + if (file->flags & FILE_BUSY) { + printf("recursive scan (%s)?\n", filename); + exit(1); + } + if (file->flags & FILE_SCANNED) { + printf("file %s already scanned?\n", filename); + exit(1); + } + file->flags |= FILE_BUSY; + file->lineno = 1; + file->parent = current_file; + current_file = file; } - if (file->flags & FILE_SCANNED) { - printf("file %s already scanned?\n", name); - exit(1); - } - file->flags |= FILE_BUSY; - file->lineno = 1; - file->parent = current_file; - current_file = file; } static void zconf_endfile(void) From 7e8b5f9c557000110be7911811f144002cce2a29 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 12 May 2006 19:08:03 +0000 Subject: [PATCH 052/757] fix BR2_ and CONFIG_ issues SVN-Revision: 3769 --- openwrt/Config.in | 1 + openwrt/target/Config.in | 4 +- openwrt/target/linux/Config.in | 296 +++++++++--------- openwrt/target/linux/ar7-2.4/Config.in | 16 +- openwrt/target/linux/aruba-2.6/Config.in | 4 +- openwrt/target/linux/aruba-2.6/Makefile | 2 +- openwrt/target/linux/brcm-2.4/Config.in | 8 +- openwrt/target/linux/image/Makefile | 6 +- openwrt/target/linux/image/aruba/Makefile | 2 +- openwrt/target/linux/image/jffs2.mk | 2 +- openwrt/target/linux/package/Makefile | 32 +- openwrt/target/linux/package/alsa/Config.in | 10 +- .../package/bcm43xx-standalone/Config.in | 6 +- openwrt/target/linux/package/diag/Config.in | 4 +- openwrt/target/linux/package/fuse/Config.in | 4 +- openwrt/target/linux/package/hostap/Config.in | 18 +- .../linux/package/ieee80211-dscape/Config.in | 4 +- .../linux/package/madwifi-old/Config.in | 4 +- .../target/linux/package/madwifi-old/Makefile | 4 +- .../target/linux/package/madwifi/Config.in | 6 +- openwrt/target/linux/package/madwifi/Makefile | 4 +- .../target/linux/package/mini_fo/Config.in | 4 +- .../target/linux/package/openswan/Config.in | 4 +- openwrt/target/linux/package/shfs/Config.in | 4 +- .../target/linux/package/spca5xx/Config.in | 4 +- openwrt/target/linux/package/switch/Config.in | 6 +- .../target/linux/package/ueagle-atm/Config.in | 6 +- .../target/linux/package/wlcompat/Config.in | 8 +- openwrt/target/linux/package/zd1211/Config.in | 6 +- openwrt/target/linux/rules.mk | 4 +- openwrt/target/sdk/Config.in | 4 +- openwrt/target/sdk/Makefile | 2 +- openwrt/toolchain/binutils/Makefile | 2 +- openwrt/toolchain/gcc/Makefile | 8 +- openwrt/toolchain/gdb/Config.in | 2 +- openwrt/toolchain/uClibc/Makefile | 8 +- 36 files changed, 256 insertions(+), 253 deletions(-) diff --git a/openwrt/Config.in b/openwrt/Config.in index 71f05689770..71db916c6e6 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -34,5 +34,6 @@ config JLEVEL Number of jobs to run simultanesouly source "toolchain/Config.in" +source "target/linux/Config.in" source ".config.in" diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 7f07ff0ac10..f20504031cc 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -74,7 +74,7 @@ config LINUX_2_6_AU1000 Build firmware for AMD Alchemy 1500 boards (e.g. 4G-Systems Mesh/Access Cube ...) -if CONFIG_DEVEL +if DEVEL config LINUX_2_6_ARM bool "UNSUPPORTED little-endian arm platform" @@ -195,7 +195,7 @@ config ARCH default "i386" if i386 default "m68k" if m68k default "mips" if mips - default "mipsel" if mipsel || !CONFIG_DEVEL + default "mipsel" if mipsel || !DEVEL default "powerpc" if powerpc default "sh3" if sh3 default "sh3eb" if sh3eb diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 6c7f5385e92..5257c78ad0b 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -1,19 +1,19 @@ menu "Target Root Filesystem" - config BR2_TARGET_ROOTFS_JFFS2 + config TARGET_ROOTFS_JFFS2 bool "jffs2" default y help Build a jffs2 root filesystem - config BR2_TARGET_ROOTFS_SQUASHFS_LZMA + config TARGET_ROOTFS_SQUASHFS_LZMA bool "squashfs-lzma" default y - depends !BR2_LINUX_2_6_ARUBA + depends !LINUX_2_6_ARUBA help Build a squashfs-lzma root filesystem - config BR2_TARGET_ROOTFS_TGZ + config TARGET_ROOTFS_TGZ bool "tgz" default y help @@ -25,88 +25,90 @@ menu "Kernel Configuration / Device Support" comment "Device specific configuration" +source "target/linux/*-2.[46]/Config.in" + comment "Kernel modules" menu "Networking modules" -config BR2_PACKAGE_KMOD_ATM +config PACKAGE_KMOD_ATM prompt "kmod-atm.......................... ATM support" tristate - default y if BR2_LINUX_2_4_AR7 + default y if LINUX_2_4_AR7 default m help ATM support -config BR2_PACKAGE_KMOD_GRE +config PACKAGE_KMOD_GRE prompt "kmod-gre.......................... GRE tunneling driver" tristate default m help Kernel support for GRE tunnels -config BR2_PACKAGE_KMOD_IMQ +config PACKAGE_KMOD_IMQ prompt "kmod-imq.......................... Intermediate Queueing device" tristate default m help Kernel support for the Intermediate Queueing device -config BR2_PACKAGE_KMOD_IPV6 +config PACKAGE_KMOD_IPV6 prompt "kmod-ipv6......................... IPv6 support" tristate default m help Kernel modules for IPv6 protocol support -config BR2_PACKAGE_KMOD_PPP +config PACKAGE_KMOD_PPP prompt "kmod-ppp.......................... PPP support" tristate default m help Kernel support for PPP -config BR2_PACKAGE_KMOD_MPPE +config PACKAGE_KMOD_MPPE prompt "kmod-mppe....................... PPP MPPE/MPPC module" tristate default m - depends BR2_PACKAGE_KMOD_PPP - select BR2_PACKAGE_KMOD_CRYPTO + depends PACKAGE_KMOD_PPP + select PACKAGE_KMOD_CRYPTO help Support for Microsoft PPP Encryption/Compression -config BR2_PACKAGE_KMOD_PPPOATM +config PACKAGE_KMOD_PPPOATM prompt "kmod-pppoatm.................... PPPoA (PPP over ATM) kernel support" tristate - default y if BR2_LINUX_2_4_AR7 + default y if LINUX_2_4_AR7 default m - depends BR2_PACKAGE_KMOD_PPP - select BR2_PACKAGE_KMOD_ATM + depends PACKAGE_KMOD_PPP + select PACKAGE_KMOD_ATM help Support for PPP over ATM -config BR2_PACKAGE_KMOD_PPPOE +config PACKAGE_KMOD_PPPOE prompt "kmod-pppoe...................... PPPoE (PPP over Ethernet) kernel support" tristate default m - depends BR2_PACKAGE_KMOD_PPP + depends PACKAGE_KMOD_PPP help Support for PPP over Ethernet -config BR2_PACKAGE_KMOD_RING +config PACKAGE_KMOD_RING prompt "kmod-ring......................... PF Ring" tristate default m help PF Ring -config BR2_PACKAGE_KMOD_SCHED +config PACKAGE_KMOD_SCHED prompt "kmod-sched........................ Traffic schedulers" tristate default m help Kernel schedulers for IP traffic -config BR2_PACKAGE_KMOD_TUN +config PACKAGE_KMOD_TUN prompt "kmod-tun.......................... Universal TUN/TAP driver" tristate default m @@ -117,44 +119,44 @@ endmenu menu "Filtering/Firewalling" -config BR2_PACKAGE_KMOD_ARPTABLES +config PACKAGE_KMOD_ARPTABLES prompt "kmod-arptables.................... ARP firewalling support" tristate default m help Kernel modules for ARP firewalling -config BR2_PACKAGE_KMOD_EBTABLES +config PACKAGE_KMOD_EBTABLES prompt "kmod-ebtables..................... Ethernet Bridge firewalling support" tristate default m help Kernel modules for bridge firewalling -config BR2_PACKAGE_KMOD_IPTABLES +config PACKAGE_KMOD_IPTABLES prompt "kmod-iptables..................... Core Netfilter modules for IPv4 firewalling" tristate default y help Kernel modules for IPv4 firewalling -config BR2_PACKAGE_KMOD_IPTABLES_EXTRA +config PACKAGE_KMOD_IPTABLES_EXTRA prompt "kmod-iptables-extra............... Extra Netfilter modules for IPv4 firewalling (meta-package)" tristate default m - select BR2_PACKAGE_KMOD_IPT_CONNTRACK - select BR2_PACKAGE_KMOD_IPT_FILTER - select BR2_PACKAGE_KMOD_IPT_IPOPT - select BR2_PACKAGE_KMOD_IPT_IPSEC - select BR2_PACKAGE_KMOD_IPT_NAT - select BR2_PACKAGE_KMOD_IPT_NAT_EXTRA - select BR2_PACKAGE_KMOD_IPT_QUEUE - select BR2_PACKAGE_KMOD_IPT_ULOG - select BR2_PACKAGE_KMOD_IPT_EXTRA + select PACKAGE_KMOD_IPT_CONNTRACK + select PACKAGE_KMOD_IPT_FILTER + select PACKAGE_KMOD_IPT_IPOPT + select PACKAGE_KMOD_IPT_IPSEC + select PACKAGE_KMOD_IPT_NAT + select PACKAGE_KMOD_IPT_NAT_EXTRA + select PACKAGE_KMOD_IPT_QUEUE + select PACKAGE_KMOD_IPT_ULOG + select PACKAGE_KMOD_IPT_EXTRA help Extra Netfilter kernel modules for IPv4 firewalling (meta-package) -config BR2_PACKAGE_KMOD_IPT_CONNTRACK +config PACKAGE_KMOD_IPT_CONNTRACK prompt "kmod-ipt-conntrack................ Netfilter modules for connection tracking" tristate default m @@ -166,7 +168,7 @@ config BR2_PACKAGE_KMOD_IPT_CONNTRACK * ipt_helper * ipt_connmark/CONNMARK -config BR2_PACKAGE_KMOD_IPT_FILTER +config PACKAGE_KMOD_IPT_FILTER prompt "kmod-ipt-filter................... Netfilter modules for packet content inspection" tristate default m @@ -177,7 +179,7 @@ config BR2_PACKAGE_KMOD_IPT_FILTER * ipt_ipp2p * ipt_layer7 -config BR2_PACKAGE_KMOD_IPT_IPOPT +config PACKAGE_KMOD_IPT_IPOPT prompt "kmod-ipt-ipopt.................... Netfilter modules for matching/changing IP packet options" tristate default m @@ -194,7 +196,7 @@ config BR2_PACKAGE_KMOD_IPT_IPOPT * ipt_ttl/TTL * ipt_unclean -config BR2_PACKAGE_KMOD_IPT_IPSEC +config PACKAGE_KMOD_IPT_IPSEC prompt "kmod-ipt-ipsec.................... Netfilter modules for matching IPsec packets" tristate default m @@ -205,7 +207,7 @@ config BR2_PACKAGE_KMOD_IPT_IPSEC * ipt_ah * ipt_esp -config BR2_PACKAGE_KMOD_IPT_NAT +config PACKAGE_KMOD_IPT_NAT prompt "kmod-ipt-nat...................... Netfilter modules for different NAT targets" tristate default m @@ -215,7 +217,7 @@ config BR2_PACKAGE_KMOD_IPT_NAT Includes: * ipt_REDIRECT -config BR2_PACKAGE_KMOD_IPT_NAT_EXTRA +config PACKAGE_KMOD_IPT_NAT_EXTRA prompt "kmod-ipt-nat-extra................ Extra Netfilter NAT modules for special protocols" tristate default m @@ -233,7 +235,7 @@ config BR2_PACKAGE_KMOD_IPT_NAT_EXTRA * ip_nat_snmp_basic * ip_conntrack_tftp -config BR2_PACKAGE_KMOD_IPT_QUEUE +config PACKAGE_KMOD_IPT_QUEUE prompt "kmod-ipt-queue.................... Netfilter module for user-space packet queueing" tristate default m @@ -243,7 +245,7 @@ config BR2_PACKAGE_KMOD_IPT_QUEUE Includes: * ipt_QUEUE -config BR2_PACKAGE_KMOD_IPT_ULOG +config PACKAGE_KMOD_IPT_ULOG prompt "kmod-ipt-ulog..................... Netfilter module for user-space packet logging" tristate default m @@ -253,7 +255,7 @@ config BR2_PACKAGE_KMOD_IPT_ULOG Includes: * ipt_ULOG -config BR2_PACKAGE_KMOD_IPT_EXTRA +config PACKAGE_KMOD_IPT_EXTRA prompt "kmod-ipt-extra.................... Other extra Netfilter modules" tristate default m @@ -267,11 +269,11 @@ config BR2_PACKAGE_KMOD_IPT_EXTRA * ipt_pkttype * ipt_recent -config BR2_PACKAGE_KMOD_IP6TABLES +config PACKAGE_KMOD_IP6TABLES prompt "kmod-ip6tables.................... Kernel modules for ip6tables" tristate default m - depends BR2_PACKAGE_KMOD_IPV6 + depends PACKAGE_KMOD_IPV6 help IPv6 firewalling support @@ -279,11 +281,11 @@ endmenu menu "Block devices support" -config BR2_PACKAGE_KMOD_IDE +config PACKAGE_KMOD_IDE prompt "kmod-ide.......................... IDE support" tristate default m - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_BRCM + depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM help Kernel modules for IDE support useful for usb mass storage devices (e.g. on WL-HDD) @@ -292,16 +294,16 @@ config BR2_PACKAGE_KMOD_IDE - ide-core - ide-detect - ide-disk - - pdc202xx_old + - pdc202old -config BR2_PACKAGE_KMOD_LOOP +config PACKAGE_KMOD_LOOP prompt "kmod-loop......................... Loop mount support" tristate default m help Kernel module for loop mount support -config BR2_PACKAGE_KMOD_NBD +config PACKAGE_KMOD_NBD prompt "kmod-nbd.......................... Network Block Device" tristate default m @@ -310,45 +312,45 @@ config BR2_PACKAGE_KMOD_NBD endmenu -config BR2_PACKAGE_KMOD_CRYPTO +config PACKAGE_KMOD_CRYPTO prompt "CryptoAPI modules" tristate default m - select BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE + select BUSYBOX_FEATURE_CHECK_TAINTED_MODULE help Kernel modules for cryptographic algorithms menu "Filesystems support" -config BR2_PACKAGE_KMOD_FS_CIFS +config PACKAGE_KMOD_FS_CIFS prompt "kmod-fs-cifs...................... CIFS support" tristate default m help Kernel modules for CIFS support -config BR2_PACKAGE_KMOD_FS_EXT2 +config PACKAGE_KMOD_FS_EXT2 prompt "kmod-fs-ext2...................... EXT2 filesystem support" tristate default m help Kernel modules for EXT2 filesystem support -config BR2_PACKAGE_KMOD_FS_EXT3 +config PACKAGE_KMOD_FS_EXT3 prompt "kmod-fs-ext3...................... EXT3 filesystem support" tristate default m help Kernel modules for EXT3 filesystem support -config BR2_PACKAGE_KMOD_FS_HFSPLUS +config PACKAGE_KMOD_FS_HFSPLUS prompt "kmod-fs-hfsplus................... HFS+ filesystem support" tristate default m help Kernel modules for HFS+ filesystem support -config BR2_PACKAGE_KMOD_FS_NFS +config PACKAGE_KMOD_FS_NFS prompt "kmod-fs-nfs....................... NFS support" tristate default m @@ -356,7 +358,7 @@ config BR2_PACKAGE_KMOD_FS_NFS Kernel modules for NFS support Includes lockd, nfs and sunrpc -config BR2_PACKAGE_KMOD_FS_VFAT +config PACKAGE_KMOD_FS_VFAT prompt "kmod-fs-vfat...................... VFAT filesystem support" tristate default m @@ -364,7 +366,7 @@ config BR2_PACKAGE_KMOD_FS_VFAT Kernel modules for VFAT filesystem support useful for usb mass storage devices -config BR2_PACKAGE_KMOD_FS_XFS +config PACKAGE_KMOD_FS_XFS prompt "kmod-fs-xfs....................... XFS filesystem support" tristate default m @@ -375,13 +377,13 @@ endmenu menu "Multimedia devices support" -config BR2_PACKAGE_KMOD_PWC +config PACKAGE_KMOD_PWC prompt "kmod-pwc.......................... Kernel driver for USB Philips Cameras" tristate - depends BR2_PACKAGE_KMOD_USB + depends PACKAGE_KMOD_USB default m -config BR2_PACKAGE_KMOD_SOUNDCORE +config PACKAGE_KMOD_SOUNDCORE prompt "kmod-soundcore.................... Soundcard support" tristate default n @@ -389,7 +391,7 @@ config BR2_PACKAGE_KMOD_SOUNDCORE Base support for soundcards Requires either USB soundcard support (OSS) or ALSA package to be useful -config BR2_PACKAGE_KMOD_VIDEODEV +config PACKAGE_KMOD_VIDEODEV prompt "kmod-videodev..................... Video (For Linux) kernel support" tristate default m @@ -398,62 +400,62 @@ endmenu menu "Native Language support" -config BR2_PACKAGE_KMOD_NLS_BASE +config PACKAGE_KMOD_NLS_BASE prompt "kmod-nls-base..................... Native Language support" tristate default m help Kernel native language support -config BR2_PACKAGE_KMOD_NLS_CP437 +config PACKAGE_KMOD_NLS_CP437 prompt "kmod-nls-cp437.................. Codepage 437 (United States, Canada)" tristate default m - depends BR2_PACKAGE_KMOD_NLS_BASE + depends PACKAGE_KMOD_NLS_BASE help Kernel native language support -config BR2_PACKAGE_KMOD_NLS_CP850 +config PACKAGE_KMOD_NLS_CP850 prompt "kmod-nls-cp850.................. Codepage 850 (Europe)" tristate default m - depends BR2_PACKAGE_KMOD_NLS_BASE + depends PACKAGE_KMOD_NLS_BASE help Kernel native language support -config BR2_PACKAGE_KMOD_NLS_ISO8859_1 +config PACKAGE_KMOD_NLS_ISO8859_1 prompt "kmod-nls-iso8859-1.............. NLS ISO 8859-1 (Latin 1; Western European Languages)" tristate default m - depends BR2_PACKAGE_KMOD_NLS_BASE + depends PACKAGE_KMOD_NLS_BASE help Kernel native language support -config BR2_PACKAGE_KMOD_NLS_ISO8859_15 +config PACKAGE_KMOD_NLS_ISO8859_15 prompt "kmod-nls-iso8859-15............. NLS ISO 8859-15 (Latin 15; Western European Languages with Euro)" tristate default m - depends BR2_PACKAGE_KMOD_NLS_BASE + depends PACKAGE_KMOD_NLS_BASE help Kernel native language support -config BR2_PACKAGE_KMOD_NLS_UTF8 +config PACKAGE_KMOD_NLS_UTF8 prompt "kmod-nls-utf8................... NLS UTF8" tristate default m - depends BR2_PACKAGE_KMOD_NLS_BASE + depends PACKAGE_KMOD_NLS_BASE help Kernel native language support endmenu menu "Network devices support" - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 + depends LINUX_2_4_X86 || LINUX_2_6_X86 -config BR2_PACKAGE_KMOD_NET_3C59X +config PACKAGE_KMOD_NET_3C59X prompt "kmod-net-3c59x.................... 3Com 3c590/3c900 series (592/595/597) \"Vortex/Boomerang\" Ethernet kernel support" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 + depends LINUX_2_4_X86 || LINUX_2_6_X86 default m help This option enables driver support for a large number of 10mbps and @@ -465,19 +467,19 @@ config BR2_PACKAGE_KMOD_NET_3C59X * "Tornado" (3c905) PCI * "Hurricane" (3c555/3cSOHO) PCI -config BR2_PACKAGE_KMOD_NET_8139TOO +config PACKAGE_KMOD_NET_8139TOO prompt "kmod-net-8139too.................. RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 + depends LINUX_2_4_X86 || LINUX_2_6_X86 default m help This is a driver for the Fast Ethernet PCI network cards based on the RTL8139 chips. -config BR2_PACKAGE_KMOD_NET_AIRO +config PACKAGE_KMOD_NET_AIRO prompt "kmod-net-airo..................... Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards kernel support" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 + depends LINUX_2_4_X86 || LINUX_2_6_X86 default m help This is the standard Linux driver to support Cisco/Aironet ISA and @@ -490,18 +492,18 @@ config BR2_PACKAGE_KMOD_NET_AIRO and Cisco proprietary API, so both the Linux Wireless Tools and the Cisco Linux utilities can be used to configure the card. -config BR2_PACKAGE_KMOD_NET_E100 +config PACKAGE_KMOD_NET_E100 prompt "kmod-net-e100..................... Intel(R) PRO/100+ cards kernel support" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 + depends LINUX_2_4_X86 || LINUX_2_6_X86 default m help Intel(R) PRO/100+ cards kernel support -config BR2_PACKAGE_KMOD_NET_HERMES +config PACKAGE_KMOD_NET_HERMES prompt "kmod-net-hermes................... Hermes chipset 802.11b support (Orinoco/Prism2/Symbol) kernel support" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 + depends LINUX_2_4_X86 || LINUX_2_6_X86 default m help A driver for 802.11b wireless cards based based on the "Hermes" or @@ -514,11 +516,11 @@ config BR2_PACKAGE_KMOD_NET_HERMES MA401, LinkSys WPC-11, D-Link DWL-650, 3Com AirConnect, Intel PRO/Wireless, and Symbol Spectrum24 High Rate amongst others. -config BR2_PACKAGE_KMOD_NET_HERMES_PCI +config PACKAGE_KMOD_NET_HERMES_PCI prompt "kmod-net-hermes-pci............. Intersil Prism 2.5 PCI 802.11b adaptor support" tristate default m - depends BR2_PACKAGE_KMOD_NET_HERMES + depends PACKAGE_KMOD_NET_HERMES help Enable support for PCI and mini-PCI 802.11b wireless NICs based on the Prism 2.5 chipset. These are true PCI cards, not the 802.11b @@ -526,11 +528,11 @@ config BR2_PACKAGE_KMOD_NET_HERMES_PCI common. Some of the built-in wireless adaptors in laptops are of this variety. -config BR2_PACKAGE_KMOD_NET_HERMES_PLX +config PACKAGE_KMOD_NET_HERMES_PLX prompt "kmod-net-hermes-plx............. Hermes in PLX9052 based PCI adaptor (Netgear MA301, etc.) kernel support" tristate default m - depends BR2_PACKAGE_KMOD_NET_HERMES + depends PACKAGE_KMOD_NET_HERMES help Enable support for PCMCIA cards supported by the "Hermes" (aka orinoco_cs) driver when used in PLX9052 based PCI adaptors. These @@ -539,20 +541,20 @@ config BR2_PACKAGE_KMOD_NET_HERMES_PLX 802.11b PCMCIA cards can be used in desktop machines. The Netgear MA301 is such an adaptor. -config BR2_PACKAGE_KMOD_NET_NATSEMI +config PACKAGE_KMOD_NET_NATSEMI prompt "kmod-net-natsemi.................. National Semiconductor DP8381x series PCI Ethernet kernel support" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 + depends LINUX_2_4_X86 || LINUX_2_6_X86 default m help This driver is for the National Semiconductor DP83810 series, which is used in cards from PureData, NetGear, Linksys and others, including the 83815 chip. -config BR2_PACKAGE_KMOD_NET_PRISM54 +config PACKAGE_KMOD_NET_PRISM54 prompt "kmod-net-prism54.................. Intersil Prism GT/Duette/Indigo PCI/PCMCIA cards kernel support" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_BRCM + depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM default m help Enable PCI and Cardbus support for the following chipset based cards: @@ -591,135 +593,135 @@ config BR2_PACKAGE_KMOD_NET_PRISM54 endmenu menu "PCMCIA/CardBus support" - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_BRCM + depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM -config BR2_PACKAGE_KMOD_PCMCIA_CORE +config PACKAGE_KMOD_PCMCIA_CORE prompt "kmod-pcmcia-core.................. PCMCIA/CardBus support" - depends BR2_LINUX_PCMCIA_SUPPORT + depends LINUX_PCMCIA_SUPPORT tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_6_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_BRCM + depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM default m -config BR2_PACKAGE_KMOD_PCMCIA_SERIAL +config PACKAGE_KMOD_PCMCIA_SERIAL prompt "kmod-pcmcia-serial.............. PCMCIA/CardBus serial device support" tristate default m - depends BR2_PACKAGE_KMOD_PCMCIA_CORE + depends PACKAGE_KMOD_PCMCIA_CORE endmenu menu "USB support" -config BR2_PACKAGE_KMOD_USB +config PACKAGE_KMOD_USB prompt "kmod-usb-core..................... USB support" tristate - default n if BR2_LINUX_2_4_AR531X + default n if LINUX_2_4_AR531X default m -config BR2_PACKAGE_KMOD_USB_UHCI +config PACKAGE_KMOD_USB_UHCI prompt "kmod-usb-uhci................... Support for UHCI controllers" tristate - default n if BR2_LINUX_2_6_AU1000 - depends BR2_PACKAGE_KMOD_USB - select BR2_PACKAGE_KMOD_USB_CONTROLLER + default n if LINUX_2_6_AU1000 + depends PACKAGE_KMOD_USB + select PACKAGE_KMOD_USB_CONTROLLER -config BR2_PACKAGE_KMOD_USB_OHCI +config PACKAGE_KMOD_USB_OHCI prompt "kmod-usb-ohci................... Support for OHCI controllers" tristate default m - depends BR2_PACKAGE_KMOD_USB - select BR2_PACKAGE_KMOD_USB_CONTROLLER + depends PACKAGE_KMOD_USB + select PACKAGE_KMOD_USB_CONTROLLER -config BR2_PACKAGE_KMOD_USB2 +config PACKAGE_KMOD_USB2 prompt "kmod-usb2....................... Support for USB 2.0 controllers" tristate - default n if BR2_LINUX_2_6_AU1000 - depends BR2_PACKAGE_KMOD_USB - select BR2_PACKAGE_KMOD_USB_CONTROLLER + default n if LINUX_2_6_AU1000 + depends PACKAGE_KMOD_USB + select PACKAGE_KMOD_USB_CONTROLLER -config BR2_PACKAGE_KMOD_USB_CONTROLLER +config PACKAGE_KMOD_USB_CONTROLLER tristate - depends on BR2_PACKAGE_KMOD_USB_UHCI || BR2_PACKAGE_KMOD_USB_OHCI || BR2_PACKAGE_KMOD_USB2 + depends on PACKAGE_KMOD_USB_UHCI || PACKAGE_KMOD_USB_OHCI || PACKAGE_KMOD_USB2 default n -config BR2_PACKAGE_KMOD_USB_ACM +config PACKAGE_KMOD_USB_ACM prompt "kmod-usb-acm...................... Support for USB modems/isdn controllers" tristate default m - depends BR2_PACKAGE_KMOD_USB_CONTROLLER + depends PACKAGE_KMOD_USB_CONTROLLER -config BR2_PACKAGE_KMOD_USB_AUDIO +config PACKAGE_KMOD_USB_AUDIO prompt "kmod-usb-audio.................... Support for USB soundcards" tristate default m - depends BR2_PACKAGE_KMOD_USB_CONTROLLER - select BR2_PACKAGE_KMOD_SOUNDCORE + depends PACKAGE_KMOD_USB_CONTROLLER + select PACKAGE_KMOD_SOUNDCORE -config BR2_PACKAGE_KMOD_USB_PRINTER +config PACKAGE_KMOD_USB_PRINTER prompt "kmod-usb-printer.................. Support for USB printers" tristate default m - depends BR2_PACKAGE_KMOD_USB_CONTROLLER + depends PACKAGE_KMOD_USB_CONTROLLER -config BR2_PACKAGE_KMOD_USB_SERIAL +config PACKAGE_KMOD_USB_SERIAL prompt "kmod-usb-serial................... Support for USB-to-serial converters" tristate default m - depends BR2_PACKAGE_KMOD_USB_CONTROLLER + depends PACKAGE_KMOD_USB_CONTROLLER -config BR2_PACKAGE_KMOD_USB_SERIAL_BELKIN +config PACKAGE_KMOD_USB_SERIAL_BELKIN prompt "kmod-usb-serial-belkin.......... Support for Belkin USB-to-serial converters" tristate default m - depends BR2_PACKAGE_KMOD_USB_SERIAL + depends PACKAGE_KMOD_USB_SERIAL -config BR2_PACKAGE_KMOD_USB_SERIAL_FTDI +config PACKAGE_KMOD_USB_SERIAL_FTDI prompt "kmod-usb-serial-ftdi............ Support for FTDI USB-to-serial converterr" tristate default m - depends BR2_PACKAGE_KMOD_USB_SERIAL + depends PACKAGE_KMOD_USB_SERIAL -config BR2_PACKAGE_KMOD_USB_SERIAL_MCT_U232 +config PACKAGE_KMOD_USB_SERIAL_MCT_U232 prompt "kmod-usb-serial-mct-u232........ Support for Magic Control Technology USB-to-Serial converters" tristate default m - depends BR2_PACKAGE_KMOD_USB_SERIAL + depends PACKAGE_KMOD_USB_SERIAL -config BR2_PACKAGE_KMOD_USB_SERIAL_PL2303 +config PACKAGE_KMOD_USB_SERIAL_PL2303 prompt "kmod-usb-serial-pl2303.......... Support for Prolific PL2303 USB-to-Serial converters" tristate default m - depends BR2_PACKAGE_KMOD_USB_SERIAL + depends PACKAGE_KMOD_USB_SERIAL -config BR2_PACKAGE_KMOD_USB_SERIAL_VISOR +config PACKAGE_KMOD_USB_SERIAL_VISOR prompt "kmod-usb-serial-visor........... Support for Handspring Visor / Palm m50x / Sony Clie Driver" tristate default m - depends BR2_PACKAGE_KMOD_USB_SERIAL + depends PACKAGE_KMOD_USB_SERIAL -config BR2_PACKAGE_KMOD_USB_STORAGE +config PACKAGE_KMOD_USB_STORAGE prompt "kmod-usb-storage.................. Support for USB storage devices" tristate default m - depends BR2_PACKAGE_KMOD_USB_CONTROLLER + depends PACKAGE_KMOD_USB_CONTROLLER -config BR2_PACKAGE_KMOD_USB_ATM +config PACKAGE_KMOD_USB_ATM prompt "kmod-usb-atm...................... Support for USB ATM devices" tristate default m - depends BR2_PACKAGE_KMOD_USB_CONTROLLER + depends PACKAGE_KMOD_USB_CONTROLLER -config BR2_PACKAGE_KMOD_USB_ATM_SPEEDTOUCH +config PACKAGE_KMOD_USB_ATM_SPEEDTOUCH prompt "kmod-usb-atm-speedtouch......... Support for USB Speedtouch ADSL modem" tristate default m - depends BR2_PACKAGE_KMOD_USB_ATM + depends PACKAGE_KMOD_USB_ATM endmenu menu "Misc. devices support" -config BR2_PACKAGE_KMOD_AX25 +config PACKAGE_KMOD_AX25 prompt "kmod-ax25......................... AX25 support" tristate default m @@ -728,33 +730,33 @@ config BR2_PACKAGE_KMOD_AX25 This package contains both the AX25 layer 2 support (ax25) and AX25 KISS driver (mkiss) -config BR2_PACKAGE_KMOD_BLUETOOTH +config PACKAGE_KMOD_BLUETOOTH prompt "kmod-bluetooth.................... Bluetooth drivers and network stack" tristate default m - default n if BR2_LINUX_2_4_AR531X + default n if LINUX_2_4_AR531X help Bluetooth drivers and network stack -config BR2_PACKAGE_KMOD_LP +config PACKAGE_KMOD_LP prompt "kmod-lp........................... Parallel port and lp support" tristate default m help Kernel modules for line printer and parallel port support -config BR2_PACKAGE_KMOD_SOFTDOG +config PACKAGE_KMOD_SOFTDOG prompt "kmod-softdog...................... Software watchdog" tristate default m help Kernel modules for software watchdog driver -config BR2_PACKAGE_KMOD_WD1100 +config PACKAGE_KMOD_WD1100 prompt "kmod-wd1100....................... Soekris net4801 watchdog" tristate default y - depends BR2_LINUX_2_4_X86 + depends LINUX_2_4_X86 help Driver for the NatSemi SC1x00 series Watchdog found on Soekris net4801 boards diff --git a/openwrt/target/linux/ar7-2.4/Config.in b/openwrt/target/linux/ar7-2.4/Config.in index 9d1fe7b8139..57d06c01b57 100644 --- a/openwrt/target/linux/ar7-2.4/Config.in +++ b/openwrt/target/linux/ar7-2.4/Config.in @@ -1,27 +1,27 @@ -config BR2_PACKAGE_KMOD_CPMAC +config PACKAGE_KMOD_CPMAC prompt "kmod-cpmac........................ AR7 CPMAC Network Driver" tristate default y - depends BR2_LINUX_2_4_AR7 + depends LINUX_2_4_AR7 help Driver for the AR7 CPMAC network chip -config BR2_PACKAGE_KMOD_SANGAM_ATM_A +config PACKAGE_KMOD_SANGAM_ATM_A prompt "kmod-sangam-atm-annex-a........... AR7 Sangam ADSL Driver (Annex A)" tristate default m - depends BR2_LINUX_2_4_AR7 - select BR2_PACKAGE_KMOD_ATM + depends LINUX_2_4_AR7 + select PACKAGE_KMOD_ATM help ATM driver for the Sangam ADSL chip on AR7 Annex A version -config BR2_PACKAGE_KMOD_SANGAM_ATM_B +config PACKAGE_KMOD_SANGAM_ATM_B prompt "kmod-sangam-atm-annex-b........... AR7 Sangam ADSL Driver (Annex B)" tristate default y - depends BR2_LINUX_2_4_AR7 - select BR2_PACKAGE_KMOD_ATM + depends LINUX_2_4_AR7 + select PACKAGE_KMOD_ATM help ATM driver for the Sangam ADSL chip on AR7 Annex B version diff --git a/openwrt/target/linux/aruba-2.6/Config.in b/openwrt/target/linux/aruba-2.6/Config.in index c1fab56464e..b66e8f65519 100644 --- a/openwrt/target/linux/aruba-2.6/Config.in +++ b/openwrt/target/linux/aruba-2.6/Config.in @@ -1,4 +1,4 @@ -config BR2_ARUBA_RAMDISK +config ARUBA_RAMDISK prompt "ramdisk support" - depends BR2_LINUX_2_6_ARUBA + depends LINUX_2_6_ARUBA bool diff --git a/openwrt/target/linux/aruba-2.6/Makefile b/openwrt/target/linux/aruba-2.6/Makefile index 24330c08f1d..b5b220d0f2c 100644 --- a/openwrt/target/linux/aruba-2.6/Makefile +++ b/openwrt/target/linux/aruba-2.6/Makefile @@ -14,7 +14,7 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) -ifeq ($(BR2_ARUBA_RAMDISK),y) +ifeq ($(CONFIG_ARUBA_RAMDISK),y) @$(CP) config-ramdisk $(LINUX_DIR)/.config else @$(CP) config $(LINUX_DIR)/.config diff --git a/openwrt/target/linux/brcm-2.4/Config.in b/openwrt/target/linux/brcm-2.4/Config.in index c344a97e816..181014f7b3e 100644 --- a/openwrt/target/linux/brcm-2.4/Config.in +++ b/openwrt/target/linux/brcm-2.4/Config.in @@ -1,15 +1,15 @@ -config BR2_PACKAGE_KMOD_BRCM_WL +config PACKAGE_KMOD_BRCM_WL prompt "kmod-brcm-wl...................... Broadcom Wireless Network Driver" tristate - depends BR2_LINUX_2_4_BRCM + depends LINUX_2_4_BRCM default y help Proprietary driver for Broadcom Wireless chipsets -config BR2_PACKAGE_KMOD_BRCM_WL2 +config PACKAGE_KMOD_BRCM_WL2 prompt "kmod-brcm-wl2..................... Broadcom Wireless Network Driver (new)" tristate - depends BR2_LINUX_2_4_BRCM + depends LINUX_2_4_BRCM default m help Proprietary driver for Broadcom Wireless chipsets diff --git a/openwrt/target/linux/image/Makefile b/openwrt/target/linux/image/Makefile index af7cd0e8d57..ce807b30279 100644 --- a/openwrt/target/linux/image/Makefile +++ b/openwrt/target/linux/image/Makefile @@ -2,15 +2,15 @@ include $(TOPDIR)/rules.mk KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -ifeq ($(BR2_TARGET_ROOTFS_JFFS2),y) +ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y) include ./jffs2.mk endif -ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS_LZMA),y) +ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_LZMA),y) include ./squashfs.mk endif -ifeq ($(BR2_TARGET_ROOTFS_TGZ),y) +ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y) include ./tgz.mk endif diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index a2cceaf0c1c..0ddde20266c 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -36,7 +36,7 @@ ifeq ($(FS),jffs2-4MB) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari: $(KDIR)/loader.elf ./addVersion -n ArubaOS $(KDIR)/loader.elf $@ version -ifneq ($(BR2_ARUBA_RAMDISK),y) +ifneq ($(CONFIG_ARUBA_RAMDISK),y) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari $(KDIR)/root.$(FS) @dd if=$< of=$@.tmp bs=655360 conv=sync @cat $(KDIR)/root.$(FS) >> $@.tmp diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk index 1b0c3a778f3..7df3aedbcf5 100644 --- a/openwrt/target/linux/image/jffs2.mk +++ b/openwrt/target/linux/image/jffs2.mk @@ -1,4 +1,4 @@ -ifneq ($(BR2_mips),y) +ifneq ($(CONFIG_mips),y) JFFS2OPTS := --pad --little-endian --squash else JFFS2OPTS := --pad --big-endian --squash diff --git a/openwrt/target/linux/package/Makefile b/openwrt/target/linux/package/Makefile index 45211c1c8b0..792fb7bd674 100644 --- a/openwrt/target/linux/package/Makefile +++ b/openwrt/target/linux/package/Makefile @@ -3,22 +3,22 @@ include $(TOPDIR)/rules.mk include ../rules.mk package-y += base-files -package-$(BR2_PACKAGE_KMOD_ALSA) += alsa -package-$(BR2_PACKAGE_KMOD_FUSE) += fuse -package-$(BR2_PACKAGE_KMOD_HOSTAP) += hostap -package-$(BR2_PACKAGE_KMOD_BCM43XX_STANDALONE) += bcm43xx-standalone -package-$(BR2_PACKAGE_KMOD_IEEE80211_DSCAPE) += ieee80211-dscape -package-$(BR2_PACKAGE_KMOD_MADWIFI) += madwifi -package-$(BR2_PACKAGE_KMOD_MADWIFI_OLD) += madwifi-old -package-$(BR2_PACKAGE_KMOD_MINI_FO) += mini_fo -package-$(BR2_PACKAGE_KMOD_OPENSWAN) += openswan -package-$(BR2_PACKAGE_KMOD_SHFS) += shfs -package-$(BR2_PACKAGE_KMOD_SPCA5XX) += spca5xx -package-$(BR2_PACKAGE_KMOD_SWITCH) += switch -package-$(BR2_PACKAGE_KMOD_UEAGLE_ATM) += ueagle-atm -package-$(BR2_PACKAGE_KMOD_DIAG) += diag -package-$(BR2_PACKAGE_KMOD_WLCOMPAT) += wlcompat -package-$(BR2_PACKAGE_KMOD_ZD1211) += zd1211 +package-$(CONFIG_PACKAGE_KMOD_ALSA) += alsa +package-$(CONFIG_PACKAGE_KMOD_FUSE) += fuse +package-$(CONFIG_PACKAGE_KMOD_HOSTAP) += hostap +package-$(CONFIG_PACKAGE_KMOD_BCM43XX_STANDALONE) += bcm43xx-standalone +package-$(CONFIG_PACKAGE_KMOD_IEEE80211_DSCAPE) += ieee80211-dscape +package-$(CONFIG_PACKAGE_KMOD_MADWIFI) += madwifi +package-$(CONFIG_PACKAGE_KMOD_MADWIFI_OLD) += madwifi-old +package-$(CONFIG_PACKAGE_KMOD_MINI_FO) += mini_fo +package-$(CONFIG_PACKAGE_KMOD_OPENSWAN) += openswan +package-$(CONFIG_PACKAGE_KMOD_SHFS) += shfs +package-$(CONFIG_PACKAGE_KMOD_SPCA5XX) += spca5xx +package-$(CONFIG_PACKAGE_KMOD_SWITCH) += switch +package-$(CONFIG_PACKAGE_KMOD_UEAGLE_ATM) += ueagle-atm +package-$(CONFIG_PACKAGE_KMOD_DIAG) += diag +package-$(CONFIG_PACKAGE_KMOD_WLCOMPAT) += wlcompat +package-$(CONFIG_PACKAGE_KMOD_ZD1211) += zd1211 bcm43xx-standalone-compile: ieee80211-dscape-compile wlcompat-compile: base-files-compile diff --git a/openwrt/target/linux/package/alsa/Config.in b/openwrt/target/linux/package/alsa/Config.in index df4da0b7d1d..55d9abd1c47 100644 --- a/openwrt/target/linux/package/alsa/Config.in +++ b/openwrt/target/linux/package/alsa/Config.in @@ -1,9 +1,9 @@ -config BR2_PACKAGE_KMOD_ALSA +config PACKAGE_KMOD_ALSA prompt "kmod-alsa......................... Alsa Sound Drivers" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_X86 || BR2_LINUX_2_6_BRCM - depends BR2_PACKAGE_KMOD_USB_CONTROLLER - select BR2_PACKAGE_KMOD_SOUNDCORE - default m if CONFIG_DEVEL + depends LINUX_2_4_X86 || LINUX_2_4_BRCM || LINUX_2_6_X86 || LINUX_2_6_BRCM + depends PACKAGE_KMOD_USB_CONTROLLER + select PACKAGE_KMOD_SOUNDCORE + default m if DEVEL help Alsa Drivers for USB Soundcards diff --git a/openwrt/target/linux/package/bcm43xx-standalone/Config.in b/openwrt/target/linux/package/bcm43xx-standalone/Config.in index 5e15f8121c3..84a4702cf2c 100644 --- a/openwrt/target/linux/package/bcm43xx-standalone/Config.in +++ b/openwrt/target/linux/package/bcm43xx-standalone/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_KMOD_BCM43XX_STANDALONE +config PACKAGE_KMOD_BCM43XX_STANDALONE prompt "kmod-bcm43xx-standalone............... Free Broadcom 43xx wireless driver (devicescape stack)" tristate - depends BR2_LINUX_2_6_BRCM - select BR2_PACKAGE_KMOD_IEEE80211_DSCAPE + depends LINUX_2_6_BRCM + select PACKAGE_KMOD_IEEE80211_DSCAPE default n help Free driver for the Broadcom 43xx wireless chipset diff --git a/openwrt/target/linux/package/diag/Config.in b/openwrt/target/linux/package/diag/Config.in index 70f726c5b68..80cba50cf2d 100644 --- a/openwrt/target/linux/package/diag/Config.in +++ b/openwrt/target/linux/package/diag/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_KMOD_DIAG +config PACKAGE_KMOD_DIAG prompt "kmod-diag......................... Driver for router LEDs and Buttons" tristate - depends BR2_LINUX_2_4_BRCM + depends LINUX_2_4_BRCM default y help Driver for router LEDs and Buttons diff --git a/openwrt/target/linux/package/fuse/Config.in b/openwrt/target/linux/package/fuse/Config.in index 8fbb34c079e..d51229522b0 100644 --- a/openwrt/target/linux/package/fuse/Config.in +++ b/openwrt/target/linux/package/fuse/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_KMOD_FUSE +config PACKAGE_KMOD_FUSE prompt "kmod-fuse......................... FUSE kernel module" tristate - default m if CONFIG_DEVEL + default m if DEVEL help With FUSE it is possible to implement a fully functional filesystem in a userspace program. diff --git a/openwrt/target/linux/package/hostap/Config.in b/openwrt/target/linux/package/hostap/Config.in index 767b4593163..39b49d4c4bd 100644 --- a/openwrt/target/linux/package/hostap/Config.in +++ b/openwrt/target/linux/package/hostap/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_KMOD_HOSTAP +config PACKAGE_KMOD_HOSTAP prompt "kmod-hostap....................... Host AP support for Prism2/2.5/3 IEEE 802.11b" tristate - depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_4_BRCM - default m if CONFIG_DEVEL + depends LINUX_2_4_X86 || LINUX_2_4_BRCM + default m if DEVEL help A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3 chipset. This driver supports so called Host AP mode that allows @@ -14,11 +14,11 @@ config BR2_PACKAGE_KMOD_HOSTAP http://hostap.epitest.fi/ -config BR2_PACKAGE_KMOD_HOSTAP_PCI +config PACKAGE_KMOD_HOSTAP_PCI prompt "kmod-hostap-pci................. Host AP driver for Prism2.5 PCI adaptors" tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_KMOD_HOSTAP + default m if DEVEL + depends PACKAGE_KMOD_HOSTAP help Host AP support for Prism2/2.5/3 IEEE 802.11b" is required for this driver and its help text includes more information about the Host AP @@ -26,11 +26,11 @@ config BR2_PACKAGE_KMOD_HOSTAP_PCI http://hostap.epitest.fi/ -config BR2_PACKAGE_KMOD_HOSTAP_PLX +config PACKAGE_KMOD_HOSTAP_PLX prompt "kmod-hostap-plx................. Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors" tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_KMOD_HOSTAP + default m if DEVEL + depends PACKAGE_KMOD_HOSTAP help Host AP support for Prism2/2.5/3 IEEE 802.11b" is required for this driver and its help text includes more information about the Host AP diff --git a/openwrt/target/linux/package/ieee80211-dscape/Config.in b/openwrt/target/linux/package/ieee80211-dscape/Config.in index a440ee26079..d747ed2fbab 100644 --- a/openwrt/target/linux/package/ieee80211-dscape/Config.in +++ b/openwrt/target/linux/package/ieee80211-dscape/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_KMOD_IEEE80211_DSCAPE +config PACKAGE_KMOD_IEEE80211_DSCAPE prompt "kmod-ieee80211-dscape............. IEEE 802.11 stack (devicescape)" tristate default n - depends BR2_LINUX_2_6_BRCM || BR2_LINUX_2_6_X86 + depends LINUX_2_6_BRCM || LINUX_2_6_X86 help IEEE 802.11 stack (devicescape) diff --git a/openwrt/target/linux/package/madwifi-old/Config.in b/openwrt/target/linux/package/madwifi-old/Config.in index 115ce03f607..ec0385540dd 100644 --- a/openwrt/target/linux/package/madwifi-old/Config.in +++ b/openwrt/target/linux/package/madwifi-old/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_KMOD_MADWIFI_OLD +config PACKAGE_KMOD_MADWIFI_OLD prompt "kmod-madwifi-old.................. (old) Atheros Wifi driver" tristate - default m if CONFIG_DEVEL + default m if DEVEL default n help Madwifi-old driver for Atheros wireless adapters diff --git a/openwrt/target/linux/package/madwifi-old/Makefile b/openwrt/target/linux/package/madwifi-old/Makefile index 25c64df50a3..7d369722aae 100644 --- a/openwrt/target/linux/package/madwifi-old/Makefile +++ b/openwrt/target/linux/package/madwifi-old/Makefile @@ -26,10 +26,10 @@ endif BUS := PCI -ifneq ($(BR2_LINUX_2_4_AR531X),) +ifneq ($(CONFIG_LINUX_2_4_AR531X),) BUS := AHB endif -# ifneq ($(BR2_LINUX_2_6_ARUBA),) +# ifneq ($(CONFIG_LINUX_2_6_ARUBA),) # BUS := PCI AHB # no suitable HAL for AHB yet. # endif diff --git a/openwrt/target/linux/package/madwifi/Config.in b/openwrt/target/linux/package/madwifi/Config.in index b554e672fd3..6eda342f818 100644 --- a/openwrt/target/linux/package/madwifi/Config.in +++ b/openwrt/target/linux/package/madwifi/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_KMOD_MADWIFI +config PACKAGE_KMOD_MADWIFI prompt "kmod-madwifi...................... Atheros Wifi driver" tristate - default y if BR2_LINUX_2_6_BRCM || BR2_LINUX_2_6_ARUBA || BR2_LINUX_2_4_AR531X - default m if CONFIG_DEVEL + default y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X + default m if DEVEL default n help Driver for Atheros 802.11a/b/g MiniPCI cards diff --git a/openwrt/target/linux/package/madwifi/Makefile b/openwrt/target/linux/package/madwifi/Makefile index fcdac9097fc..d42372b52ec 100644 --- a/openwrt/target/linux/package/madwifi/Makefile +++ b/openwrt/target/linux/package/madwifi/Makefile @@ -26,10 +26,10 @@ endif BUS := PCI -ifneq ($(BR2_LINUX_2_4_AR531X),) +ifneq ($(CONFIG_LINUX_2_4_AR531X),) BUS := AHB endif -ifneq ($(BR2_LINUX_2_6_ARUBA),) +ifneq ($(CONFIG_LINUX_2_6_ARUBA),) BUS := PCI AHB # no suitable HAL for AHB yet. endif diff --git a/openwrt/target/linux/package/mini_fo/Config.in b/openwrt/target/linux/package/mini_fo/Config.in index a92ff9785a0..a280ff56a8d 100644 --- a/openwrt/target/linux/package/mini_fo/Config.in +++ b/openwrt/target/linux/package/mini_fo/Config.in @@ -1,6 +1,6 @@ -config BR2_PACKAGE_KMOD_MINI_FO +config PACKAGE_KMOD_MINI_FO prompt "kmod-mini_fo...................... mini fanout overlay file system" tristate - default m if CONFIG_DEVEL + default m if DEVEL help The mini fanout overlay file system. diff --git a/openwrt/target/linux/package/openswan/Config.in b/openwrt/target/linux/package/openswan/Config.in index 59a943f8e46..faf0f8f4a61 100644 --- a/openwrt/target/linux/package/openswan/Config.in +++ b/openwrt/target/linux/package/openswan/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_KMOD_OPENSWAN +config PACKAGE_KMOD_OPENSWAN prompt "kmod-openswan..................... Openswan kernel module" tristate - default m if CONFIG_DEVEL + default m if DEVEL help Openswan is an implementation of IPsec for Linux. diff --git a/openwrt/target/linux/package/shfs/Config.in b/openwrt/target/linux/package/shfs/Config.in index 61bd54b5e59..71cc327073a 100644 --- a/openwrt/target/linux/package/shfs/Config.in +++ b/openwrt/target/linux/package/shfs/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_KMOD_SHFS +config PACKAGE_KMOD_SHFS prompt "kmod-shfs......................... Shell FileSystem kernel module (ShFS) kernel module" tristate - default m if CONFIG_DEVEL + default m if DEVEL help ShFS is a simple and easy to use Linux kernel module which allows you to mount remote filesystems using a plain shell diff --git a/openwrt/target/linux/package/spca5xx/Config.in b/openwrt/target/linux/package/spca5xx/Config.in index 6d504823f1c..729e6b00944 100644 --- a/openwrt/target/linux/package/spca5xx/Config.in +++ b/openwrt/target/linux/package/spca5xx/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_KMOD_SPCA5XX +config PACKAGE_KMOD_SPCA5XX prompt "kmod-spca5xx...................... Kernel driver for SPCA5XX based USB cameras" tristate - default m if CONFIG_DEVEL + default m if DEVEL help Kernel driver for SPCA5XX based USB cameras diff --git a/openwrt/target/linux/package/switch/Config.in b/openwrt/target/linux/package/switch/Config.in index 407d5deb689..0ff2aa1aba9 100644 --- a/openwrt/target/linux/package/switch/Config.in +++ b/openwrt/target/linux/package/switch/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_KMOD_SWITCH +config PACKAGE_KMOD_SWITCH prompt "kmod-switch....................... Kernel driver for ROBO and ADMTEK SWITCH" tristate - default y if BR2_LINUX_2_6_BRCM || BR2_LINUX_2_4_BRCM - default m if CONFIG_DEVEL + default y if LINUX_2_6_BRCM || LINUX_2_4_BRCM + default m if DEVEL default n help Kernel driver for ROBO and ADMTEK switches. diff --git a/openwrt/target/linux/package/ueagle-atm/Config.in b/openwrt/target/linux/package/ueagle-atm/Config.in index 17b619cef81..c92fc2f7248 100644 --- a/openwrt/target/linux/package/ueagle-atm/Config.in +++ b/openwrt/target/linux/package/ueagle-atm/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_KMOD_UEAGLE_ATM +config PACKAGE_KMOD_UEAGLE_ATM prompt "kmod-ueagle-atm.................... Kernel driver for Eagle 8051 based USB ADSL modems" tristate - depends BR2_LINUX_2_6_BRCM - default m if CONFIG_DEVEL + depends LINUX_2_6_BRCM + default m if DEVEL help Kernel driver for Eagle 8051 USB ADSL modems diff --git a/openwrt/target/linux/package/wlcompat/Config.in b/openwrt/target/linux/package/wlcompat/Config.in index 1e5f5e79e07..904d1e66459 100644 --- a/openwrt/target/linux/package/wlcompat/Config.in +++ b/openwrt/target/linux/package/wlcompat/Config.in @@ -1,17 +1,17 @@ -config BR2_PACKAGE_KMOD_WLCOMPAT +config PACKAGE_KMOD_WLCOMPAT prompt "kmod-wlcompat..................... Wrapper providing Wireless Extensions for Broadcom wl module" tristate default y - depends BR2_PACKAGE_KMOD_BRCM_WL || BR2_PACKAGE_KMOD_BRCM_WL2 + depends PACKAGE_KMOD_BRCM_WL || PACKAGE_KMOD_BRCM_WL2 help A wrapper module, that provides Wireless Extension support for the proprietary Broadcom wl module. -config BR2_PACKAGE_KMOD_WLCOMPAT_DEBUG +config PACKAGE_KMOD_WLCOMPAT_DEBUG prompt "kmod-wlcompat-debug............... Wrapper providing Wireless Extensions for Broadcom wl module (debug)" tristate default m - depends BR2_PACKAGE_KMOD_BRCM_WL || BR2_PACKAGE_KMOD_BRCM_WL2 + depends PACKAGE_KMOD_BRCM_WL || PACKAGE_KMOD_BRCM_WL2 help A wrapper module, that provides Wireless Extension support for the proprietary Broadcom wl module. (debug version) diff --git a/openwrt/target/linux/package/zd1211/Config.in b/openwrt/target/linux/package/zd1211/Config.in index 2852c84e558..cadfa4f5dd8 100644 --- a/openwrt/target/linux/package/zd1211/Config.in +++ b/openwrt/target/linux/package/zd1211/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_KMOD_ZD1211 +config PACKAGE_KMOD_ZD1211 prompt "kmod-zd12111...................... Driver for Zydas 1211 based devices" tristate - depends BR2_LINUX_2_6 - default m if CONFIG_DEVEL + depends LINUX_2_6 + default m if DEVEL help Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip. Initially contributed by ZyDAS, this driver is actively maintained diff --git a/openwrt/target/linux/rules.mk b/openwrt/target/linux/rules.mk index 1ebe28b6ac5..8490d110de8 100644 --- a/openwrt/target/linux/rules.mk +++ b/openwrt/target/linux/rules.mk @@ -54,10 +54,10 @@ PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_ I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(2) ifeq ($$(KDEPEND_$(1)),m) -ifneq ($(BR2_PACKAGE_KMOD_$(1)),) +ifneq ($(CONFIG_PACKAGE_KMOD_$(1)),) TARGETS += $$(PKG_$(1)) endif -ifeq ($(BR2_PACKAGE_KMOD_$(1)),y) +ifeq ($(CONFIG_PACKAGE_KMOD_$(1)),y) INSTALL_TARGETS += $$(PKG_$(1)) endif endif diff --git a/openwrt/target/sdk/Config.in b/openwrt/target/sdk/Config.in index f70810ba02d..343352ad050 100644 --- a/openwrt/target/sdk/Config.in +++ b/openwrt/target/sdk/Config.in @@ -1,6 +1,6 @@ -config BR2_PACKAGE_SDK +config PACKAGE_SDK bool "OpenWrt SDK" - default y if CONFIG_DEVEL + default y if DEVEL help Build an OpenWrt SDK. This is essentially a stripped-down version of the buildroot diff --git a/openwrt/target/sdk/Makefile b/openwrt/target/sdk/Makefile index 3f62aec1155..cfcf8c5e058 100644 --- a/openwrt/target/sdk/Makefile +++ b/openwrt/target/sdk/Makefile @@ -27,7 +27,7 @@ $(BIN_DIR)/$(SDK_NAME).tar.bz2: $(CP) ./files/README.SDK $(SDK_BUILD_DIR)/ $(CP) ./files/depend.mk $(SDK_BUILD_DIR)/package/ $(CP) $(TOPDIR)/package/rules.mk $(SDK_BUILD_DIR)/package/ - egrep '^BR2_(ARCH|WGET|STAGING|JLEVEL|LARGEFILE|TARGET_OPT)' $(TOPDIR)/.config > $(SDK_BUILD_DIR)/.config + egrep '^CONFIG_(ARCH|WGET|STAGING|JLEVEL|LARGEFILE|TARGET_OPT)' $(TOPDIR)/.config > $(SDK_BUILD_DIR)/.config find $(SDK_BUILD_DIR) -name .svn | xargs rm -rf find $(SDK_BUILD_DIR) -name CVS | xargs rm -rf (cd $(BUILD_DIR); \ diff --git a/openwrt/toolchain/binutils/Makefile b/openwrt/toolchain/binutils/Makefile index 1b205715e34..7d405664bb0 100644 --- a/openwrt/toolchain/binutils/Makefile +++ b/openwrt/toolchain/binutils/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk # build binutils for use on the host system # ############################################################# -BINUTILS_VERSION:=$(strip $(subst ",, $(BR2_BINUTILS_VERSION))) +BINUTILS_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION))) #" BINUTILS_SITE:=http://www.fr.kernel.org/pub/linux/devel/binutils \ diff --git a/openwrt/toolchain/gcc/Makefile b/openwrt/toolchain/gcc/Makefile index 26e17ad61e2..cf60d750503 100644 --- a/openwrt/toolchain/gcc/Makefile +++ b/openwrt/toolchain/gcc/Makefile @@ -37,10 +37,10 @@ GCC_STRIP_HOST_BINARIES:=true # ############################################################# -ifeq ($(BR2_INSTALL_LIBGCJ),y) +ifeq ($(CONFIG_INSTALL_LIBGCJ),y) TARGET_LANGUAGES:=c,c++,java else -ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +ifeq ($(CONFIG_INSTALL_LIBSTDCPP),y) TARGET_LANGUAGES:=c,c++ else TARGET_LANGUAGES:=c @@ -71,7 +71,7 @@ $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked # We can dispense with the custom spec files, as well as libfloat for the arm case. # However, we still need a patch for arm. There's a similar patch for gcc 3.3.x # which needs to be integrated so we can kill of libfloat for good. -ifeq ($(BR2_SOFT_FLOAT),y) +ifeq ($(CONFIG_SOFT_FLOAT),y) ifeq ("$(strip $(ARCH))","arm") $(SCRIPT_DIR)/patch-kernel.sh $(GCC_DIR) ./$(GCC_VERSION) arm-softfloat.patch.conditional endif @@ -175,7 +175,7 @@ gcc-install: $(GCC_BUILD_DIR2)/.compiled # # Now for the ugly 3.3.x soft float hack... # -ifeq ($(BR2_SOFT_FLOAT),y) +ifeq ($(CONFIG_SOFT_FLOAT),y) ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) # Make sure we have a soft float specs file for this arch if [ ! -f ./$(GCC_VERSION)/specs-$(ARCH)-soft-float ] ; then \ diff --git a/openwrt/toolchain/gdb/Config.in b/openwrt/toolchain/gdb/Config.in index 574a398bb8d..f8560cbd907 100644 --- a/openwrt/toolchain/gdb/Config.in +++ b/openwrt/toolchain/gdb/Config.in @@ -1,6 +1,6 @@ comment "Gdb Options" -config BR2_PACKAGE_GDB_CLIENT +config PACKAGE_GDB_CLIENT bool "Build gdb client for the Host" default n help diff --git a/openwrt/toolchain/uClibc/Makefile b/openwrt/toolchain/uClibc/Makefile index d77f554a12b..19ab0326f64 100644 --- a/openwrt/toolchain/uClibc/Makefile +++ b/openwrt/toolchain/uClibc/Makefile @@ -6,10 +6,10 @@ include $(TOPDIR)/rules.mk # ############################################################# -ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) +ifeq ($(CONFIG_UCLIBC_VERSION_SNAPSHOT),y) # Be aware that this changes daily.... UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc -UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(BR2_USE_UCLIBC_SNAPSHOT))).tar.bz2 +UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(CONFIG_USE_UCLIBC_SNAPSHOT))).tar.bz2 #" UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots UCLIBC_VER:=PKG_VERSION:=0.${shell date +"%G%m%d"} @@ -50,13 +50,13 @@ $(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(CP) ./files/config.$(ARCH) $(UCLIBC_DIR)/.config $(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \ $(UCLIBC_DIR)/.config -ifeq ($(BR2_LARGEFILE),y) +ifeq ($(CONFIG_LARGEFILE),y) $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(UCLIBC_DIR)/.config else $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(UCLIBC_DIR)/.config endif $(SED) 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(UCLIBC_DIR)/.config -ifeq ($(BR2_SOFT_FLOAT),y) +ifeq ($(CONFIG_SOFT_FLOAT),y) $(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(UCLIBC_DIR)/.config endif mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include From 4811f9dcdc666f950551ad27b4d49ad52bb7b9d0 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 12 May 2006 21:33:07 +0000 Subject: [PATCH 053/757] fix busybox config parsing for new config format SVN-Revision: 3770 --- openwrt/scripts/gen_busybox_config.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/scripts/gen_busybox_config.pl b/openwrt/scripts/gen_busybox_config.pl index 1a84ab999de..0c70b4a1163 100755 --- a/openwrt/scripts/gen_busybox_config.pl +++ b/openwrt/scripts/gen_busybox_config.pl @@ -6,11 +6,11 @@ my $l1 = ''; my $l2 = '=y'; while (<>) { chomp; - /^(# )BR2_LARGEFILE(.+)$/ and do { + /^(# )CONFIG_LARGEFILE(.+)$/ and do { $l1 = $1; $l2 = $2; }; - /^(# )?BUSYBOX_(.+)/ and do { + /^(# )?CONFIG_BUSYBOX_(.+)/ and do { my $p1 = $1; my $p2 = $2; $p2 =~ /(CONFIG_LFS|FDISK_SUPPORT_LARGE_DISKS)/ and do { From e54cfc1f1f1f24ec59c357e198cf7d69740b15d8 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sun, 14 May 2006 08:36:39 +0000 Subject: [PATCH 054/757] generate package dependancies SVN-Revision: 3774 --- openwrt/scripts/gen_deps.pl | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 openwrt/scripts/gen_deps.pl diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl new file mode 100755 index 00000000000..d4b6c76d091 --- /dev/null +++ b/openwrt/scripts/gen_deps.pl @@ -0,0 +1,34 @@ +#!/usr/bin/perl +use strict; + +my $name; +my $src; +my $makefile; +my %pkg; + +my $line; +while ($line = <>) { + chomp $line; + $line =~ /^Source-Makefile: \s*(.+\/([^\/]+)\/Makefile)\s*$/ and do { + $makefile = $1; + $src = $2; + }; + $line =~ /^Package: \s*(.+)\s*$/ and do { + $name = $1; + defined $pkg{$name} or $pkg{$name} = {}; + $pkg{$name}->{src} = $src; + }; + $line =~ /^Depends: \s*(.+)\s*$/ and do { + my @dep = split /,\s*/, $1; + $pkg{$name}->{depends} = \@dep; + }; +} + +foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { + print "$name: "; + foreach my $dep (@{$pkg{$name}->{depends}}) { + print "$dep "; + } + print "\n\tmake -C ".$pkg{$name}->{src}."\n"; + print "\n"; +} From 12ec1ba1fb851d3de7be4211c7fea96fa0bf28bd Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sun, 14 May 2006 09:30:29 +0000 Subject: [PATCH 055/757] revert .built rule; fix typos SVN-Revision: 3775 --- openwrt/package/rules.mk | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index e5df61e1774..d25b487a76b 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -10,6 +10,10 @@ define Build/DefaultTargets $(PKG_BUILD_DIR)/.prepared: package-clean endif + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif + $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) @-rm -rf $(PKG_BUILD_DIR) @mkdir -p $(PKG_BUILD_DIR) @@ -20,14 +24,16 @@ define Build/DefaultTargets $(call Build/Configure) touch $$@ - built: FORCE $(PKG_BUILD_DIR)/.configured - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) + $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(call Build/Compile) - endif - + touch $$@ + package-clean: FORCE $(call Build/Clean) + package-rebuild: FORCE + @-rm $(PKG_BUILD_DIR)/.built + define Build/DefaultTargets endef endef @@ -70,16 +76,12 @@ define BuildPackage IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list - ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) - COMPILE_$(1):=1 - endif - ifeq ($(CONFIG_PACKAGE_$(1)),y) install-targets: $$(INFO_$(1)) endif - ifneq ($(COMPILE_$(1)),) - compile-targets: $(IPKG_$(1)) + ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) + compile-targets: $$(IPKG_$(1)) endif IDEPEND_$(1):=$$(strip $$(DEPENDS)) @@ -129,7 +131,7 @@ define BuildPackage [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ done - $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control built + $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(call Package/$(1)/install,$$(IDIR_$(1))) mkdir -p $(PACKAGE_DIR) $(RSTRIP) $$(IDIR_$(1)) @@ -144,7 +146,7 @@ define BuildPackage clean: $(1)-clean ifneq ($(__DEFAULT_TARGETS),1) - $$(eval $$(call Build/DefaultTargets,$(1))) + $(eval $(call Build/DefaultTargets,$(1))) endif endef From 11817c5453123ad3c28cac0dec5bdda0edd08381 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sun, 14 May 2006 10:24:06 +0000 Subject: [PATCH 056/757] fix .built target SVN-Revision: 3776 --- openwrt/package/rules.mk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index d25b487a76b..2d379006c38 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -5,12 +5,11 @@ else endif define Build/DefaultTargets - ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) $(PKG_BUILD_DIR)/.prepared: package-clean endif - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) + ifneq ($(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) $(PKG_BUILD_DIR)/.built: package-rebuild endif @@ -145,9 +144,7 @@ define BuildPackage clean: $(1)-clean - ifneq ($(__DEFAULT_TARGETS),1) - $(eval $(call Build/DefaultTargets,$(1))) - endif + $$(eval $$(call Build/DefaultTargets,$(1))) endef From 6afabb7118aa64c8ccbf7b5c7ca479281585da08 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sun, 14 May 2006 10:25:38 +0000 Subject: [PATCH 057/757] move FORCE to toplevel rules.mk SVN-Revision: 3777 --- openwrt/package/rules.mk | 3 --- openwrt/rules.mk | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 2d379006c38..a0cdd1e31e3 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -239,6 +239,3 @@ else @$(MAKE) clean-targets rm -rf $(PKG_BUILD_DIR) endif - -.PHONY: FORCE -FORCE: diff --git a/openwrt/rules.mk b/openwrt/rules.mk index d94a818441c..0e7dd2e044c 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -132,3 +132,7 @@ IPKG_STATE_DIR := $(TARGET_DIR)/usr/lib/ipkg RSTRIP:=STRIP="$(STRIP)" $(SCRIPT_DIR)/rstrip.sh RSTRIP_KMOD:=STRIP="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" $(SCRIPT_DIR)/rstrip.sh + +all: +.PHONY: FORCE +FORCE: From e63936f36838ffae1b4c1c6c2723ed0913caccd1 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sun, 14 May 2006 12:30:52 +0000 Subject: [PATCH 058/757] change syntax SVN-Revision: 3778 --- openwrt/scripts/gen_deps.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index d4b6c76d091..a910a9937bb 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -25,10 +25,15 @@ while ($line = <>) { } foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { - print "$name: "; + my $hasdeps = 0; + $line = "$pkg{$name}->{src}-compile:"; foreach my $dep (@{$pkg{$name}->{depends}}) { - print "$dep "; + if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) { + $hasdeps = 1; + $line .= " $pkg{$dep}->{src}-compile"; + } + } + if ($hasdeps) { + print "$line\n"; } - print "\n\tmake -C ".$pkg{$name}->{src}."\n"; - print "\n"; } From 7bd78892a575a266fc1cccfdfe2b13df1f26fd2c Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 15 May 2006 20:30:26 +0000 Subject: [PATCH 059/757] avoid running timestamp.pl for dumpinfo -- drastically speeds up the .pkginfo process SVN-Revision: 3780 --- openwrt/package/rules.mk | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index a0cdd1e31e3..e8417c3a5f4 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -5,12 +5,14 @@ else endif define Build/DefaultTargets - ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.) - $(PKG_BUILD_DIR)/.prepared: package-clean - endif + ifeq ($(DUMP),) + ifeq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . | tee /tmp/xy1),.) + $(PKG_BUILD_DIR)/.prepared: package-clean + endif - ifneq ($(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - $(PKG_BUILD_DIR)/.built: package-rebuild + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR) | tee /tmp/xy2),$(IPKG_$(1))) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif endif $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) @@ -191,6 +193,7 @@ define Build/Configure/Default --infodir=/usr/info \ $(DISABLE_NLS) \ $(1); \ + true; \ ) endef @@ -205,11 +208,12 @@ define Build/Compile/Default PREFIX="$$(IDIR_$(1))" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ ARCH="$(ARCH)" \ - DESTDIR="$$(IDIR_$(1))" + DESTDIR="$$(IDIR_$(1))" \ + $(1); endef define Build/Compile - $(call Build/Compile/Default) + $(call Build/Compile/Default,) endef define Build/Clean @@ -217,7 +221,7 @@ define Build/Clean endef ifneq ($(DUMP),) - dumpinfo: + dumpinfo: FORCE $(DUMPINFO) else From 4414005acdd2cd916e74be2964ca75d7a01f0b2f Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 15 May 2006 20:34:04 +0000 Subject: [PATCH 060/757] removed; obsolete SVN-Revision: 3781 --- openwrt/Config.in.devel | 104 ---------------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 openwrt/Config.in.devel diff --git a/openwrt/Config.in.devel b/openwrt/Config.in.devel deleted file mode 100644 index 8e382f63997..00000000000 --- a/openwrt/Config.in.devel +++ /dev/null @@ -1,104 +0,0 @@ -# -config CONFIG_DEVEL - bool - default y - -mainmenu "OpenWrt Configuration" - -config MODULES - bool - default y - -config BR2_HAVE_DOT_CONFIG - bool - default y - -# Supported architectures - -config BR2_i386 - tristate - -config BR2_mips - tristate - -config BR2_mipsel - tristate - -# Unsupported architectures - -if CONFIG_DEVEL - -config BR2_arm - tristate - -config BR2_armeb - tristate - -config BR2_cris - tristate - -config BR2_m68k - tristate - -config BR2_powerpc - tristate - -config BR2_sh3 - tristate - -config BR2_sh3eb - tristate - -config BR2_sh4 - tristate - -config BR2_sh4eb - tristate - -config BR2_sparc - tristate - -endif - -config BR2_ARCH - string - default "arm" if BR2_arm - default "armeb" if BR2_armeb - default "cris" if BR2_cris - default "i386" if BR2_i386 - default "m68k" if BR2_m68k - default "mips" if BR2_mips - default "mipsel" if BR2_mipsel || !CONFIG_DEVEL - default "powerpc" if BR2_powerpc - default "sh3" if BR2_sh3 - default "sh3eb" if BR2_sh3eb - default "sh4" if BR2_sh4 - default "sh4eb" if BR2_sh4eb - default "sparc" if BR2_sparc - -source "target/Config.in" - -menu "Build options" - -config BR2_WGET - string - prompt "Wget command" - default "wget --passive-ftp -nd" - -config BR2_TAR_VERBOSITY - bool - prompt "Tar verbose" - default n - -config BR2_JLEVEL - int - prompt "Number of jobs to run simultaneously" - default "1" - help - Number of jobs to run simultanesouly - -endmenu - -source "toolchain/Config.in.devel" -source "package/Config.in" -source "target/linux/Config.in" From 063e1cc4b6c761db71dbfba30bff6b501f710f22 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 15 May 2006 22:42:04 +0000 Subject: [PATCH 061/757] replace find call with perl code SVN-Revision: 3782 --- openwrt/scripts/timestamp.pl | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/openwrt/scripts/timestamp.pl b/openwrt/scripts/timestamp.pl index dc47e24aae4..9735dd61e4e 100755 --- a/openwrt/scripts/timestamp.pl +++ b/openwrt/scripts/timestamp.pl @@ -1,24 +1,35 @@ #!/usr/bin/perl use strict; +use File::stat; + +sub crawl($$) { + my $path = shift; + my $options = shift; + my @results = $path; + opendir(DIR,$path); + foreach my $file (readdir(DIR)) { + if ($file !~m/^(\.(svn|\.?)|CVS$options)$/) { + push @results, crawl("$path/$file",$options); + } + } + closedir(DIR); + return @results; +} sub get_ts($$) { my $path = shift; my $options = shift; my $ts = 0; my $fn = ""; - open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* $options 2>/dev/null |"; - while (<FIND>) { - chomp; - my $file = $_; - open FILE, "<$file"; - my @stat = stat FILE; - close FILE; - if ($stat[9] > $ts) { - $ts = $stat[9]; + my @search = crawl($path,$options); + while (@search) { + my $file = shift @search; + my $mtime = stat($file)->mtime; + if ($mtime > $ts) { + $ts = $mtime; $fn = $file; } } - close FIND; return ($ts, $fn); } @@ -30,7 +41,7 @@ while (@ARGV > 0) { my $path = shift @ARGV; if ($path =~ /^-x/) { my $str = shift @ARGV; - $options{"-x"} .= " -and -not -path \\*".$str."\\*" + $options{"-x"} .= "|".$str; } elsif ($path =~ /^-/) { $options{$path} = 1; } else { From 7db51089509c6fb62a4d9f8f3f64e961d4178883 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 15 May 2006 23:04:02 +0000 Subject: [PATCH 062/757] revert; perl version was entirely too slow SVN-Revision: 3783 --- openwrt/scripts/timestamp.pl | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/openwrt/scripts/timestamp.pl b/openwrt/scripts/timestamp.pl index 9735dd61e4e..dc47e24aae4 100755 --- a/openwrt/scripts/timestamp.pl +++ b/openwrt/scripts/timestamp.pl @@ -1,35 +1,24 @@ #!/usr/bin/perl use strict; -use File::stat; - -sub crawl($$) { - my $path = shift; - my $options = shift; - my @results = $path; - opendir(DIR,$path); - foreach my $file (readdir(DIR)) { - if ($file !~m/^(\.(svn|\.?)|CVS$options)$/) { - push @results, crawl("$path/$file",$options); - } - } - closedir(DIR); - return @results; -} sub get_ts($$) { my $path = shift; my $options = shift; my $ts = 0; my $fn = ""; - my @search = crawl($path,$options); - while (@search) { - my $file = shift @search; - my $mtime = stat($file)->mtime; - if ($mtime > $ts) { - $ts = $mtime; + open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* $options 2>/dev/null |"; + while (<FIND>) { + chomp; + my $file = $_; + open FILE, "<$file"; + my @stat = stat FILE; + close FILE; + if ($stat[9] > $ts) { + $ts = $stat[9]; $fn = $file; } } + close FIND; return ($ts, $fn); } @@ -41,7 +30,7 @@ while (@ARGV > 0) { my $path = shift @ARGV; if ($path =~ /^-x/) { my $str = shift @ARGV; - $options{"-x"} .= "|".$str; + $options{"-x"} .= " -and -not -path \\*".$str."\\*" } elsif ($path =~ /^-/) { $options{$path} = 1; } else { From e90b9b95b926a030e2be551fc59255208a2d02d7 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 15 May 2006 23:13:49 +0000 Subject: [PATCH 063/757] more BR2_ / CONFIG_ patches SVN-Revision: 3784 --- openwrt/package/base-files/Config.in | 4 +-- openwrt/package/base-files/Makefile | 10 +++--- openwrt/package/linux-atm/Config.in | 10 +++--- openwrt/package/ppp/Config.in | 46 ++++++++++++++-------------- openwrt/package/ppp/Makefile | 4 +-- openwrt/package/pptp/Config.in | 8 ++--- openwrt/package/wificonf/Config.in | 4 +-- 7 files changed, 43 insertions(+), 43 deletions(-) diff --git a/openwrt/package/base-files/Config.in b/openwrt/package/base-files/Config.in index c278b272f1b..1dd6ff5360c 100644 --- a/openwrt/package/base-files/Config.in +++ b/openwrt/package/base-files/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_LIBGCC +config PACKAGE_LIBGCC prompt "libgcc............................ GCC support library" tristate - default m if CONFIG_DEVEL + default m if DEVEL help GCC support library diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 8517dcc685c..90820cf91dc 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -6,10 +6,10 @@ PKG_NAME:=base-files PKG_RELEASE:=6 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files -BOARD:=$(shell LANG=C grep ^BR2_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ +BOARD:=$(shell LANG=C grep ^CONFIG_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ -e "s/.*_//"| tr "[:upper:]" "[:lower:]") -KERNEL:=$(shell LANG=C grep ^BR2_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ - -e "s/BR2_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") +KERNEL:=$(shell LANG=C grep ^CONFIG_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ + -e "s/CONFIG_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) @@ -32,11 +32,11 @@ IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC) -ifeq ($(BR2_PACKAGE_LIBGCC),y) +ifeq ($(CONFIG_PACKAGE_LIBGCC),y) PACKAGES+=$(IPKG_LIBGCC) PACKAGES_INSTALL+=$(IPKG_LIBGCC) endif -ifeq ($(BR2_PACKAGE_LIBGCC),m) +ifeq ($(CONFIG_PACKAGE_LIBGCC),m) PACKAGES+=$(IPKG_LIBGCC) endif diff --git a/openwrt/package/linux-atm/Config.in b/openwrt/package/linux-atm/Config.in index bf7ff35c0bc..e9769b5da49 100644 --- a/openwrt/package/linux-atm/Config.in +++ b/openwrt/package/linux-atm/Config.in @@ -1,19 +1,19 @@ -config BR2_PACKAGE_LINUX_ATM +config PACKAGE_LINUX_ATM prompt "linux-atm......................... ATM Library/Utilities for Linux" tristate - default y if BR2_LINUX_2_4_AR7 + default y if LINUX_2_4_AR7 default n help ATM Library for linux http://ftp.debian.org/debian/pool/main/l/linux-atm/ -config BR2_PACKAGE_BR2684CTL +config PACKAGE_BR2684CTL prompt "br2684ctl....................... RFC2684 bridging utility" tristate - default y if BR2_LINUX_2_4_AR7 + default y if LINUX_2_4_AR7 default n - depends BR2_PACKAGE_LINUX_ATM + depends PACKAGE_LINUX_ATM help Utility for setting up ATM RFC2684 bridging mode Useful for PPPoE diff --git a/openwrt/package/ppp/Config.in b/openwrt/package/ppp/Config.in index 21139adf776..237ef205176 100644 --- a/openwrt/package/ppp/Config.in +++ b/openwrt/package/ppp/Config.in @@ -1,53 +1,53 @@ menu "ppp............................... PPP (Point-to-Point Protocol) daemon" -config BR2_PACKAGE_PPP +config PACKAGE_PPP prompt "ppp............................... PPP (Point-to-Point Protocol) daemon" tristate - default n if BR2_LINUX_2_6_ARUBA + default n if LINUX_2_6_ARUBA default y - select BR2_PACKAGE_KMOD_PPP + select PACKAGE_KMOD_PPP -config BR2_PACKAGE_PPP_WITH_FILTER +config PACKAGE_PPP_WITH_FILTER prompt "Enable filter support" bool default y -config BR2_PACKAGE_PPP_MOD_PPPOA +config PACKAGE_PPP_MOD_PPPOA prompt "ppp-mod-pppoa................... PPPoA (PPP over ATM) plugin" tristate - default y if BR2_LINUX_2_4_AR7 - depends on BR2_PACKAGE_PPP - select BR2_PACKAGE_KMOD_PPPOATM + default y if LINUX_2_4_AR7 + depends on PACKAGE_PPP + select PACKAGE_KMOD_PPPOATM -config BR2_PACKAGE_PPP_MOD_PPPOE +config PACKAGE_PPP_MOD_PPPOE prompt "ppp-mod-pppoe................... PPPoE (PPP over Ethernet) plugin" tristate default y - depends on BR2_PACKAGE_PPP - select BR2_PACKAGE_KMOD_PPPOE + depends on PACKAGE_PPP + select PACKAGE_KMOD_PPPOE -config BR2_PACKAGE_PPP_MOD_RADIUS +config PACKAGE_PPP_MOD_RADIUS prompt "ppp-mod-radius.................. RADIUS (Remote Authentication Dial-In User Service) plugin" tristate - default m if CONFIG_DEVEL - depends on BR2_PACKAGE_PPP + default m if DEVEL + depends on PACKAGE_PPP -config BR2_PACKAGE_CHAT +config PACKAGE_CHAT prompt "chat............................ Utility to establish conversation with other PPP servers (via a modem)" tristate - default m if CONFIG_DEVEL - depends on BR2_PACKAGE_PPP + default m if DEVEL + depends on PACKAGE_PPP -config BR2_PACKAGE_PPPDUMP +config PACKAGE_PPPDUMP prompt "pppdump......................... Utility to read PPP record file" tristate - default m if CONFIG_DEVEL - depends on BR2_PACKAGE_PPP + default m if DEVEL + depends on PACKAGE_PPP -config BR2_PACKAGE_PPPSTATS +config PACKAGE_PPPSTATS prompt "pppstats........................ Utility to report PPP statistics" tristate - default m if CONFIG_DEVEL - depends on BR2_PACKAGE_PPP + default m if DEVEL + depends on PACKAGE_PPP endmenu diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index e63fa4cf504..92aba9a57d7 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -40,7 +40,7 @@ $(eval $(call PKG_mod_template,PPP_MOD_PPPOE,rp-pppoe)) $(eval $(call PKG_mod_template,PPP_MOD_RADIUS,radius)) PKG_DEPEND:="kmod-ppp" -ifeq ($(BR2_PACKAGE_PPP_WITH_FILTER),y) +ifeq ($(CONFIG_PACKAGE_PPP_WITH_FILTER),y) ENABLE_FILTER:="PRECOMPILED_FILTER=1" endif @@ -84,7 +84,7 @@ $(PKG_BUILD_DIR)/.built: all install touch $@ -ifeq ($(BR2_PACKAGE_PPP_WITH_FILTER),y) +ifeq ($(CONFIG_PACKAGE_PPP_WITH_FILTER),y) INSTALL_FILTER=install -m0644 ./files/etc/ppp/filter $(IDIR_PPP)/etc/ppp/ endif diff --git a/openwrt/package/pptp/Config.in b/openwrt/package/pptp/Config.in index 88da23748c9..425473a058b 100644 --- a/openwrt/package/pptp/Config.in +++ b/openwrt/package/pptp/Config.in @@ -1,9 +1,9 @@ -config BR2_PACKAGE_PPTP +config PACKAGE_PPTP prompt "pptp.............................. PPTP (Point-to-Point Tunneling Protocol) client" tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_GRE - select BR2_PACKAGE_PPP + default m if DEVEL + select PACKAGE_KMOD_GRE + select PACKAGE_PPP help A Point-to-Point Tunneling Protocol Client diff --git a/openwrt/package/wificonf/Config.in b/openwrt/package/wificonf/Config.in index 410f33107d2..e401cee7c29 100644 --- a/openwrt/package/wificonf/Config.in +++ b/openwrt/package/wificonf/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_WIFICONF +config PACKAGE_WIFICONF prompt "wificonf.......................... replacement utility for wlconf" tristate default y - depends BR2_PACKAGE_NVRAM + depends PACKAGE_NVRAM help Replacement utility for wlconf From 4db216c4dec44d29881a3bfa13cf491e603569b9 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 16 May 2006 00:32:02 +0000 Subject: [PATCH 064/757] fix config SVN-Revision: 3785 --- openwrt/target/linux/aruba-2.6/config-ramdisk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrt/target/linux/aruba-2.6/config-ramdisk b/openwrt/target/linux/aruba-2.6/config-ramdisk index f020e7c4f2b..69accc42e2c 100644 --- a/openwrt/target/linux/aruba-2.6/config-ramdisk +++ b/openwrt/target/linux/aruba-2.6/config-ramdisk @@ -314,7 +314,8 @@ CONFIG_IP_NF_IRC=m # CONFIG_IP_NF_NETBIOS_NS is not set CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m -# CONFIG_IP_NF_PPTP is not set +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=y CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m @@ -349,6 +350,8 @@ CONFIG_IP_NF_NAT_IRC=m CONFIG_IP_NF_NAT_FTP=y CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m From b64d24928b353bd6c263190c903590632da6ac53 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 16 May 2006 00:32:57 +0000 Subject: [PATCH 065/757] finish up package makefile SVN-Revision: 3786 --- openwrt/Config.in | 7 +++++++ openwrt/package/Makefile | 19 ++++++++++++++----- openwrt/package/ipsec-tools/Makefile | 6 ++++++ openwrt/scripts/gen_deps.pl | 17 ++++++++++++----- 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/openwrt/Config.in b/openwrt/Config.in index 71db916c6e6..ae959f683ed 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -18,6 +18,10 @@ config ALL bool "Select all packages by default" default n +config WGET + string + default "wget --passive-ftp -nd" + menuconfig BUILDOPTS bool "Build Options" if DEVEL @@ -37,3 +41,6 @@ source "toolchain/Config.in" source "target/linux/Config.in" source ".config.in" +menu "busybox" +source "package/busybox/config/Config.in" +endmenu diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index e0bd23c7ecb..af746715bac 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -1,13 +1,11 @@ # Main makefile for the packages include $(TOPDIR)/rules.mk +include $(TOPDIR)/.config +include .pkgdeps + COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) -all: compile -clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) -compile: $(COMPILE_PACKAGES) -install: base-files-install $(INSTALL_PACKAGES) - $(STAMP_DIR) $(TARGET_DIR): mkdir -p $@ @@ -15,8 +13,19 @@ $(STAMP_DIR) $(TARGET_DIR): $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: $(STAMP_DIR) $(TARGET_DIR) + @echo "-> make $@" $(MAKE) -C $(patsubst %-compile,%,$@) compile %-clean: $(STAMP_DIR) $(TARGET_DIR) $(MAKE) -C $(patsubst %-clean,%,$@) clean + +.pkgdeps: $(TOPDIR)/.pkginfo FORCE + @$(TOPDIR)/scripts/gen_deps.pl < $< > $@ || rm -f $@ + +all: compile +clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) +compile: $(COMPILE_PACKAGES) +install: base-files-install $(INSTALL_PACKAGES) + + diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 9e14b400750..e85f09d89c9 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -12,6 +12,8 @@ PKG_SOURCE_URL:=@SF/ipsec-tools PKG_MD5SUM:=d0242a943c82c0cbf28005966ff35e21 PKG_CAT:=bzcat +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + include $(TOPDIR)/package/rules.mk define Package/ipsec-tools @@ -66,6 +68,10 @@ define Build/Configure ); endef +define Build/Compile + $(call Build/Compile/Default,install) +endef + define Package/ipsec-tools/install install -d -m0755 $(1)/etc install -d -m0755 $(1)/usr/lib/ diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index a910a9937bb..ef49fa3f418 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -24,16 +24,23 @@ while ($line = <>) { }; } +$line=""; + foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { + print "package-\$(CONFIG_PACKAGE_$name) += $pkg{$name}->{src}\n"; + my $hasdeps = 0; - $line = "$pkg{$name}->{src}-compile:"; + my $depline = ""; foreach my $dep (@{$pkg{$name}->{depends}}) { if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) { - $hasdeps = 1; - $line .= " $pkg{$dep}->{src}-compile"; + $depline .= " $pkg{$dep}->{src}-compile"; } } - if ($hasdeps) { - print "$line\n"; + if ($depline ne "") { + $line .= "$pkg{$name}->{src}-compile: $depline\n"; } } + +if ($line ne "") { + print "\n$line"; +} From 59c1faa1503df905ebe75e435eebf6fb0de107e2 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 19 May 2006 22:46:24 +0000 Subject: [PATCH 066/757] clean up menu configuration SVN-Revision: 3801 --- openwrt/Config.in | 18 ++++++++---------- openwrt/Makefile | 2 +- openwrt/package/busybox/Makefile | 6 +++++- openwrt/package/rules.mk | 8 +++++++- openwrt/scripts/gen_menuconfig.pl | 13 ++++++++++++- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/openwrt/Config.in b/openwrt/Config.in index ae959f683ed..4a887cc1356 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -8,23 +8,24 @@ config HAVE_DOT_CONFIG source "target/Config.in" -config DEVEL +config ALL + bool "Select all packages by default" + default n + +menuconfig DEVEL bool "Advanced configuration options (for developers)" default n select BUILDOPTS select TOOLCHAINOPTS -config ALL - bool "Select all packages by default" - default n +menuconfig BUILDOPTS + bool "Build Options" if DEVEL config WGET string + prompt "WGET command" if BUILDOPTS default "wget --passive-ftp -nd" -menuconfig BUILDOPTS - bool "Build Options" if DEVEL - config TAR_VERBOSITY bool prompt "Tar verbose" if BUILDOPTS @@ -41,6 +42,3 @@ source "toolchain/Config.in" source "target/linux/Config.in" source ".config.in" -menu "busybox" -source "package/busybox/config/Config.in" -endmenu diff --git a/openwrt/Makefile b/openwrt/Makefile index 06288de6b86..9b9d1c955e1 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -45,7 +45,7 @@ ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package) @echo Collecting package info... @-for makefile in package/*/Makefile; do \ echo Source-Makefile: $$makefile; \ - $(MAKE) DUMP=1 -f $$makefile 2>&- || true; \ + $(MAKE) --no-print-dir DUMP=1 -f $$makefile 2>&- || true; \ done > $@ endif diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 23dcc1cf8dc..ff23ee7dd81 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -15,14 +15,18 @@ PKG_CAT:=bzcat include $(TOPDIR)/package/rules.mk define Package/busybox -CONFIGFILE:=config/Config.in SECTION:=base CATEGORY:=Base system +MENU:=1 DEFAULT:=y TITLE:=Core utilities for embedded Linux DESCRIPTION:=The Swiss Army Knife of embedded Linux. \\\ It slices, it dices, it makes Julian Fries. URL:=http://busybox.net/ +CONFIG:=menu "Configuration" \\\ + depends on PACKAGE_busybox \\\ +source "package/busybox/config/Config.in" \\\ +endmenu endef define Build/Configure diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index e8417c3a5f4..99e4a846a54 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -116,6 +116,12 @@ define BuildPackage DUMPINFO += \ echo "@@"; + ifneq ($(CONFIG),) + DUMPINFO += \ + echo "Config: $(CONFIG)" | sed -e 's,\\,\n,g'; \ + echo "@@"; + endif + $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control @@ -222,7 +228,7 @@ endef ifneq ($(DUMP),) dumpinfo: FORCE - $(DUMPINFO) + @$(DUMPINFO) else $(PACKAGE_DIR): diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index 3f4476a2c6a..e282ee3ed2d 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -30,7 +30,9 @@ sub print_category($) { } print "\t\thelp\n"; print $pkg->{description}; - print "\n" + print "\n"; + + $pkg->{config} and print $pkg->{config}."\n"; } } print "endmenu\n\n"; @@ -75,6 +77,15 @@ while ($line = <>) { $desc .= "\t\t$line"; } $pkg->{description} = $desc; + }; + $line =~ /^Config: \s*(.*)\s*$/ and do { + my $conf = "$1\n"; + my $line; + while ($line = <>) { + last if $line =~ /^@@/; + $conf .= "$line"; + } + $pkg->{config} = $conf; } } From a3281a2f3bd6604d02d6543bce188c9adea82708 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 19 May 2006 23:02:14 +0000 Subject: [PATCH 067/757] fix .pkginfo line to allow the use of $(SOURCE) SVN-Revision: 3802 --- openwrt/Makefile | 8 ++++---- openwrt/package/busybox/Makefile | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 9b9d1c955e1..9b341f1241a 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -41,11 +41,11 @@ export OPENWRTVERSION all: .pkginfo: FORCE -ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package) +ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) @echo Collecting package info... - @-for makefile in package/*/Makefile; do \ - echo Source-Makefile: $$makefile; \ - $(MAKE) --no-print-dir DUMP=1 -f $$makefile 2>&- || true; \ + @-for dir in package/*/; do \ + echo Source-Makefile: $${dir}Makefile; \ + $(MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \ done > $@ endif diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index ff23ee7dd81..cc36301f52a 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -23,10 +23,11 @@ TITLE:=Core utilities for embedded Linux DESCRIPTION:=The Swiss Army Knife of embedded Linux. \\\ It slices, it dices, it makes Julian Fries. URL:=http://busybox.net/ -CONFIG:=menu "Configuration" \\\ - depends on PACKAGE_busybox \\\ -source "package/busybox/config/Config.in" \\\ -endmenu +CONFIG:=\\\ + menu "Configuration" \\\ + depends on PACKAGE_busybox \\\ + source "$(SOURCE)/config/Config.in" \\\ + endmenu endef define Build/Configure From da6326e0fb586dbc3eca2d1beb9a70b9e3041313 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 22 May 2006 21:52:54 +0000 Subject: [PATCH 068/757] fix GCC version. SVN-Revision: 3817 --- openwrt/toolchain/gcc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/toolchain/gcc/Makefile b/openwrt/toolchain/gcc/Makefile index cf60d750503..7c037edddc0 100644 --- a/openwrt/toolchain/gcc/Makefile +++ b/openwrt/toolchain/gcc/Makefile @@ -20,7 +20,7 @@ include $(TOPDIR)/rules.mk -GCC_VERSION:=$(strip $(GCC_VERSION)) +GCC_VERSION:=$(strip $(CONFIG_GCC_VERSION)) #GCC_SITE:=ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(GCC_VERSION) GCC_SITE:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(GCC_VERSION) \ From 716ccaec23646ef9f752b1d2dd3d59dcf596e296 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 24 May 2006 07:00:32 +0000 Subject: [PATCH 069/757] sync with trunk. SVN-Revision: 3821 --- openwrt/package/ebtables/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index df551154e2c..4d40ee320bf 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ebtables PKG_VERSION:=2.0.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/ebtables-v$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz @@ -24,8 +24,10 @@ URL:=http://ebtables.sourceforge.net/ endef define Package/ebtables/install + install -d -m0755 $(1)/etc + install -m0644 $(PKG_BUILD_DIR)/ethertypes $(1)/etc/ install -d -m0755 $(1)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/ebtables + install -m0755 $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/ endef $(eval $(call BuildPackage,ebtables)) From f69beb4a342221c97ca8bddb815f7eb73bb5b3dd Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 24 May 2006 07:01:52 +0000 Subject: [PATCH 070/757] fix haserl/install. SVN-Revision: 3822 --- openwrt/package/haserl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/haserl/Makefile b/openwrt/package/haserl/Makefile index 2bb9fc93198..e6215c9547f 100644 --- a/openwrt/package/haserl/Makefile +++ b/openwrt/package/haserl/Makefile @@ -24,7 +24,7 @@ endef define Package/haserl/install install -m0755 -d $(1)/usr/bin - install -m0755 $(PKG_INSTALL_DIR)/usr/bin/haserl $(1)/usr/bin/ + install -m0755 $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/ endef $(eval $(call BuildPackage,haserl)) From 551aff096d4a7a636d86c58b8234284e4bd73f15 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 24 May 2006 07:06:23 +0000 Subject: [PATCH 071/757] sync busybox with trunk (update to v1.1.3). SVN-Revision: 3823 --- openwrt/package/busybox/Makefile | 4 +- .../busybox/patches/230-passwd_salt.patch | 13 - .../package/busybox/patches/300-netmsg.patch | 2 +- .../package/busybox/patches/911-ipkg.patch | 906 +++++++++++------- .../patches/912-ipkg-no_warnings.patch | 131 +-- .../busybox/patches/913-libbb_hash.patch | 3 + .../busybox/patches/914-ipkg-fixes.patch | 15 + 7 files changed, 676 insertions(+), 398 deletions(-) delete mode 100644 openwrt/package/busybox/patches/230-passwd_salt.patch create mode 100644 openwrt/package/busybox/patches/914-ipkg-fixes.patch diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index cc36301f52a..799372fad34 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -3,13 +3,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.1.2 +PKG_VERSION:=1.1.3 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads -PKG_MD5SUM:=0b5d78072302fe687407956537bdb9e3 +PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7 PKG_CAT:=bzcat include $(TOPDIR)/package/rules.mk diff --git a/openwrt/package/busybox/patches/230-passwd_salt.patch b/openwrt/package/busybox/patches/230-passwd_salt.patch deleted file mode 100644 index 0322a984397..00000000000 --- a/openwrt/package/busybox/patches/230-passwd_salt.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- busybox-1.00/loginutils/passwd.c 2006-03-26 06:07:37 -05:00 -+++ busybox-1.00/loginutils/passwd.c 2006-03-26 06:09:03 -05:00 -@@ -386,7 +386,9 @@ - bzero(orig, sizeof(orig)); - - if (algo == 1) { -- cp = pw_encrypt(pass, "$1$"); -+ char salt[6]="$1$\0\0\0"; -+ memcpy(salt+3,crypt_make_salt(),3); -+ cp = pw_encrypt(pass, salt); - } else - cp = pw_encrypt(pass, crypt_make_salt()); - bzero(pass, sizeof pass); diff --git a/openwrt/package/busybox/patches/300-netmsg.patch b/openwrt/package/busybox/patches/300-netmsg.patch index efc4c337c2a..ef6c0f45074 100644 --- a/openwrt/package/busybox/patches/300-netmsg.patch +++ b/openwrt/package/busybox/patches/300-netmsg.patch @@ -5,7 +5,7 @@ diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h USE_MV(APPLET(mv, mv_main, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_NAMEIF(APPLET(nameif, nameif_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) USE_NC(APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -+USE_NETMSG(APPLET_NOUSAGE("netmsg", netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) ++USE_NETMSG(APPLET_NOUSAGE(netmsg, netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) USE_NETSTAT(APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_NICE(APPLET(nice, nice_main, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_NOHUP(APPLET(nohup, nohup_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) diff --git a/openwrt/package/busybox/patches/911-ipkg.patch b/openwrt/package/busybox/patches/911-ipkg.patch index dfca0c40c1a..7b6437c98ca 100644 --- a/openwrt/package/busybox/patches/911-ipkg.patch +++ b/openwrt/package/busybox/patches/911-ipkg.patch @@ -1,6 +1,9 @@ -diff -ruN busybox-1.1.1-old/Makefile busybox-1.1.1-new/Makefile ---- busybox-1.1.1-old/Makefile 2006-03-22 22:16:26.000000000 +0100 -+++ busybox-1.1.1-new/Makefile 2006-03-30 00:39:48.000000000 +0200 +# +# add ipkg support to busybox +# +diff -ruN busybox-1.1.2-orig/Makefile busybox-1.1.2+ipkg-0.99.162/Makefile +--- busybox-1.1.2-orig/Makefile 2006-04-10 21:45:46.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162/Makefile 2006-05-09 02:06:48.000000000 +0200 @@ -25,7 +25,7 @@ export srctree=$(top_srcdir) vpath %/Config.in $(srctree) @@ -10,9 +13,9 @@ diff -ruN busybox-1.1.1-old/Makefile busybox-1.1.1-new/Makefile debianutils editors findutils init miscutils modutils networking \ networking/libiproute networking/udhcp procps loginutils shell \ sysklogd util-linux e2fsprogs libpwdgrp coreutils/libcoreutils libbb -diff -ruN busybox-1.1.1-old/archival/Config.in busybox-1.1.1-new/archival/Config.in ---- busybox-1.1.1-old/archival/Config.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.1-new/archival/Config.in 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/Config.in busybox-1.1.2+ipkg-0.99.162/archival/Config.in +--- busybox-1.1.2-orig/archival/Config.in 2006-03-22 22:16:20.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/Config.in 2006-05-09 02:06:48.000000000 +0200 @@ -121,6 +121,14 @@ gzip is used to compress files. It's probably the most widely used UNIX compression program. @@ -28,9 +31,9 @@ diff -ruN busybox-1.1.1-old/archival/Config.in busybox-1.1.1-new/archival/Config config CONFIG_RPM2CPIO bool "rpm2cpio" default n -diff -ruN busybox-1.1.1-old/archival/Makefile.in busybox-1.1.1-new/archival/Makefile.in ---- busybox-1.1.1-old/archival/Makefile.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.1-new/archival/Makefile.in 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/Makefile.in +--- busybox-1.1.2-orig/archival/Makefile.in 2006-03-22 22:16:20.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/Makefile.in 2006-05-09 02:06:48.000000000 +0200 @@ -20,6 +20,7 @@ ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o @@ -39,9 +42,9 @@ diff -ruN busybox-1.1.1-old/archival/Makefile.in busybox-1.1.1-new/archival/Make ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o ARCHIVAL-$(CONFIG_RPM) += rpm.o ARCHIVAL-$(CONFIG_TAR) += tar.o -diff -ruN busybox-1.1.1-old/archival/dpkg.c busybox-1.1.1-new/archival/dpkg.c ---- busybox-1.1.1-old/archival/dpkg.c 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.1-new/archival/dpkg.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/dpkg.c busybox-1.1.2+ipkg-0.99.162/archival/dpkg.c +--- busybox-1.1.2-orig/archival/dpkg.c 2006-03-22 22:16:20.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/dpkg.c 2006-05-09 02:06:48.000000000 +0200 @@ -1530,6 +1530,10 @@ return(ar_handle->sub_archive->buffer); } @@ -62,9 +65,9 @@ diff -ruN busybox-1.1.1-old/archival/dpkg.c busybox-1.1.1-new/archival/dpkg.c static void unpack_package(deb_file_t *deb_file) { const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name]; -diff -ruN busybox-1.1.1-old/archival/ipkg.c busybox-1.1.1-new/archival/ipkg.c ---- busybox-1.1.1-old/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/ipkg.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/ipkg.c busybox-1.1.2+ipkg-0.99.162/archival/ipkg.c +--- busybox-1.1.2-orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/ipkg.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,26 @@ +/* ipkg.c - the itsy package management system + @@ -92,9 +95,9 @@ diff -ruN busybox-1.1.1-old/archival/ipkg.c busybox-1.1.1-new/archival/ipkg.c +{ + return ipkg_op(argc, argv); +} -diff -ruN busybox-1.1.1-old/archival/libipkg/Makefile busybox-1.1.1-new/archival/libipkg/Makefile ---- busybox-1.1.1-old/archival/libipkg/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/Makefile 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/Makefile busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile +--- busybox-1.1.2-orig/archival/libipkg/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,32 @@ +# Makefile for busybox +# @@ -128,9 +131,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/Makefile busybox-1.1.1-new/archival +clean: + rm -f *.o *.a $(AR_TARGET) + -diff -ruN busybox-1.1.1-old/archival/libipkg/Makefile.in busybox-1.1.1-new/archival/libipkg/Makefile.in ---- busybox-1.1.1-old/archival/libipkg/Makefile.in 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/Makefile.in 2006-03-30 01:14:50.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile.in +--- busybox-1.1.2-orig/archival/libipkg/Makefile.in 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile.in 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,85 @@ +# Makefile for busybox +# @@ -217,10 +220,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/Makefile.in busybox-1.1.1-new/archi +$(LIBIPKG_OBJS): $(LIBIPKG_DIR)%.o : $(srcdir)/%.c + $(compile.c) + -diff -ruN busybox-1.1.1-old/archival/libipkg/args.c busybox-1.1.1-new/archival/libipkg/args.c ---- busybox-1.1.1-old/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/args.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,241 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/args.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.c +--- busybox-1.1.2-orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.c 2006-05-09 02:12:03.000000000 +0200 +@@ -0,0 +1,242 @@ +/* args.c - parse command-line args + + Carl D. Worth @@ -302,6 +305,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/args.c busybox-1.1.1-new/archival/l + args->offline_root_post_script_cmd = ARGS_DEFAULT_OFFLINE_ROOT_POST_SCRIPT_CMD; + args->multiple_providers = 0; + args->nocheckfordirorfile = 0; ++ args->noreadfeedsfile = 0; + + return 1; +} @@ -462,10 +466,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/args.c busybox-1.1.1-new/archival/l +{ + bb_error_msg("version %s\n", IPKG_VERSION); +} -diff -ruN busybox-1.1.1-old/archival/libipkg/args.h busybox-1.1.1-new/archival/libipkg/args.h ---- busybox-1.1.1-old/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/args.h 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,71 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/args.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.h +--- busybox-1.1.2-orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.h 2006-05-09 02:12:03.000000000 +0200 +@@ -0,0 +1,72 @@ +/* args.h - parse command-line args + + Carl D. Worth @@ -506,6 +510,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/args.h busybox-1.1.1-new/archival/l + int verbose_wget; + int verbosity; + int nocheckfordirorfile; ++ int noreadfeedsfile; + char *offline_root; + char *offline_root_pre_script_cmd; + char *offline_root_post_script_cmd; @@ -537,9 +542,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/args.h busybox-1.1.1-new/archival/l +void args_usage(char *complaint); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/conffile.c busybox-1.1.1-new/archival/libipkg/conffile.c ---- busybox-1.1.1-old/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/conffile.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.c +--- busybox-1.1.2-orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,64 @@ +/* conffile.c - the itsy package management system + @@ -605,9 +610,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/conffile.c busybox-1.1.1-new/archiv + + return ret; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/conffile.h busybox-1.1.1-new/archival/libipkg/conffile.h ---- busybox-1.1.1-old/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/conffile.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.h +--- busybox-1.1.2-orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,30 @@ +/* conffile.h - the itsy package management system + @@ -639,9 +644,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/conffile.h busybox-1.1.1-new/archiv + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/conffile_list.c busybox-1.1.1-new/archival/libipkg/conffile_list.c ---- busybox-1.1.1-old/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/conffile_list.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.c +--- busybox-1.1.2-orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,47 @@ +/* conffile_list.c - the itsy package management system + @@ -690,9 +695,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/conffile_list.c busybox-1.1.1-new/a + return nv_pair_list_pop(list); +} + -diff -ruN busybox-1.1.1-old/archival/libipkg/conffile_list.h busybox-1.1.1-new/archival/libipkg/conffile_list.h ---- busybox-1.1.1-old/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/conffile_list.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.h +--- busybox-1.1.2-orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,36 @@ +/* conffile_list.h - the itsy package management system + @@ -730,9 +735,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/conffile_list.h busybox-1.1.1-new/a + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/file_util.c busybox-1.1.1-new/archival/libipkg/file_util.c ---- busybox-1.1.1-old/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/file_util.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c +--- busybox-1.1.2-orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,177 @@ +/* file_util.c - convenience routines for common stat operations + @@ -911,9 +916,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/file_util.c busybox-1.1.1-new/archi + return md5sum_hex; +} + -diff -ruN busybox-1.1.1-old/archival/libipkg/file_util.h busybox-1.1.1-new/archival/libipkg/file_util.h ---- busybox-1.1.1-old/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/file_util.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.h +--- busybox-1.1.2-orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,29 @@ +/* file_util.h - convenience routines for common file operations + @@ -944,9 +949,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/file_util.h busybox-1.1.1-new/archi +char *file_md5sum_alloc(const char *file_name); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/hash_table.c busybox-1.1.1-new/archival/libipkg/hash_table.c ---- busybox-1.1.1-old/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/hash_table.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.c +--- busybox-1.1.2-orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,155 @@ +/* hash.c - hash tables for ipkg + @@ -1103,9 +1108,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/hash_table.c busybox-1.1.1-new/arch + } +} + -diff -ruN busybox-1.1.1-old/archival/libipkg/hash_table.h busybox-1.1.1-new/archival/libipkg/hash_table.h ---- busybox-1.1.1-old/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/hash_table.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.h +--- busybox-1.1.2-orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,44 @@ +/* hash.h - hash tables for ipkg + @@ -1151,9 +1156,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/hash_table.h busybox-1.1.1-new/arch +void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data); + +#endif /* _HASH_TABLE_H_ */ -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg.h busybox-1.1.1-new/archival/libipkg/ipkg.h ---- busybox-1.1.1-old/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,74 @@ +/* ipkg.h - the itsy package management system + @@ -1204,7 +1209,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg.h busybox-1.1.1-new/archival/l + +#define IPKG_LIST_DESCRIPTION_LENGTH 128 + -+#define IPKG_VERSION "0.99.154" ++#define IPKG_VERSION "0.99.162" + + +enum ipkg_error { @@ -1229,10 +1234,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg.h busybox-1.1.1-new/archival/l +extern ipkg_conf_t *global_conf; + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archival/libipkg/ipkg_cmd.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_cmd.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,1344 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c 2006-05-09 02:23:37.000000000 +0200 +@@ -0,0 +1,1431 @@ +/* ipkg_cmd.c - the itsy package management system + + Carl D. Worth @@ -1260,6 +1265,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv +#include <unistd.h> +#include <signal.h> +#include <stdio.h> ++#include <dirent.h> + +#include "ipkg_conf.h" +#include "ipkg_cmd.h" @@ -1427,13 +1433,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv + pkg_src_t *src; + + -+ if (conf->offline_root) { -+ sprintf_alloc(&lists_dir, "%s/%s", -+ conf->offline_root, -+ conf->restrict_to_default_dest ? conf->default_dest->lists_dir : conf->lists_dir); -+ } else { -+ sprintf_alloc(&lists_dir, "%s", conf->restrict_to_default_dest ? conf->default_dest->lists_dir : conf->lists_dir); -+ } ++ sprintf_alloc(&lists_dir, "%s", conf->restrict_to_default_dest ? conf->default_dest->lists_dir : conf->lists_dir); + + if (! file_is_dir(lists_dir)) { + if (file_exists(lists_dir)) { @@ -1563,6 +1563,8 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv + //if (strcmp (tmp + (tmplen - strlen (DPKG_PKG_EXTENSION)), DPKG_PKG_EXTENSION) != 0) + // continue; + ++ ipkg_message(conf, IPKG_DEBUG2, "Debug mfs: %s \n",filename ); ++ + err = ipkg_prepare_url_for_install(conf, filename, &argv[i]); + if (err) + return err; @@ -1570,11 +1572,90 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv + return 0; +} + ++struct ipkg_intercept ++{ ++ char *oldpath; ++ char *statedir; ++}; ++ ++typedef struct ipkg_intercept *ipkg_intercept_t; ++ ++ipkg_intercept_t ipkg_prep_intercepts(ipkg_conf_t *conf) ++{ ++ ipkg_intercept_t ctx; ++ char *newpath; ++ int gen; ++ ++ ctx = malloc (sizeof (*ctx)); ++ ctx->oldpath = strdup (getenv ("PATH")); ++ ++ sprintf_alloc (&newpath, "%s/ipkg/intercept:%s", IPKGLIBDIR, ctx->oldpath); ++ setenv ("PATH", newpath, 1); ++ free (newpath); ++ ++ gen = 0; ++ retry: ++ sprintf_alloc (&ctx->statedir, "/tmp/ipkg-intercept-%d-%d", getpid (), gen); ++ if (mkdir (ctx->statedir, 0770) < 0) { ++ if (errno == EEXIST) { ++ free (ctx->statedir); ++ gen++; ++ goto retry; ++ } ++ perror (ctx->statedir); ++ return NULL; ++ } ++ setenv ("IPKG_INTERCEPT_DIR", ctx->statedir, 1); ++ return ctx; ++} ++ ++int ipkg_finalize_intercepts(ipkg_intercept_t ctx) ++{ ++ char *cmd; ++ DIR *dir; ++ int err = 0; ++ ++ setenv ("PATH", ctx->oldpath, 1); ++ free (ctx->oldpath); ++ ++ dir = opendir (ctx->statedir); ++ if (dir) { ++ struct dirent *de; ++ while (de = readdir (dir), de != NULL) { ++ char *path; ++ ++ if (de->d_name[0] == '.') ++ continue; ++ ++ sprintf_alloc (&path, "%s/%s", ctx->statedir, de->d_name); ++ if (access (path, X_OK) == 0) { ++ if (system (path)) { ++ err = errno; ++ perror (de->d_name); ++ } ++ } ++ free (path); ++ } ++ } else ++ perror (ctx->statedir); ++ ++ sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir); ++ system (cmd); ++ free (cmd); ++ ++ free (ctx->statedir); ++ free (ctx); ++ ++ return err; ++} ++ +int ipkg_configure_packages(ipkg_conf_t *conf, char *pkg_name) +{ + pkg_vec_t *all; + int i; + pkg_t *pkg; ++ ipkg_intercept_t ic; ++ int r, err = 0; + + ipkg_message(conf, IPKG_INFO, + "Configuring unpacked packages\n"); @@ -1583,6 +1664,8 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv + all = pkg_vec_alloc(); + pkg_hash_fetch_available(&conf->pkg_hash, all); + ++ ic = ipkg_prep_intercepts (conf); ++ + for(i = 0; i < all->len; i++) { + pkg = all->pkgs[i]; + @@ -1593,16 +1676,24 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv + ipkg_message(conf, IPKG_NOTICE, + "Configuring %s\n", pkg->name); + fflush( stdout ); -+ if (ipkg_configure(conf, pkg) == 0) { ++ r = ipkg_configure(conf, pkg); ++ if (r == 0) { + pkg->state_status = SS_INSTALLED; + pkg->parent->state_status = SS_INSTALLED; + pkg->state_flag &= ~SF_PREFER; ++ } else { ++ if (!err) ++ err = r; + } + } + } + ++ r = ipkg_finalize_intercepts (ic); ++ if (r && !err) ++ err = r; ++ + pkg_vec_free(all); -+ return 0; ++ return err; +} + +static void sigint_handler(int sig) @@ -1629,6 +1720,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv + for (i=0; i < argc; i++) { + arg = argv[i]; + ++ ipkg_message(conf, IPKG_DEBUG2, "Debug install_cmd: %s \n",arg ); + err = ipkg_prepare_url_for_install(conf, arg, &argv[i]); + if (err != EINVAL && err != 0) + return err; @@ -2034,7 +2126,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv + ipkg_message(conf, IPKG_ERROR, "Package seems to be %s not installed (STATUS = NOT_INSTALLED).\n", pkg->name); + continue; + } -+ ipkg_remove_pkg(conf, pkg_to_remove); ++ ipkg_remove_pkg(conf, pkg_to_remove,0); + done = 1; + } + free (pkg_name); @@ -2074,7 +2166,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv + && !pkg_has_installed_dependents(conf, pkg->parent, pkg, NULL)) { + removed++; + ipkg_message(conf, IPKG_NOTICE, "Removing non-user leaf package %s\n"); -+ ipkg_remove_pkg(conf, pkg); ++ ipkg_remove_pkg(conf, pkg,0); + done = 1; + } + } @@ -2577,9 +2669,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.1-new/archiv +} + + -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.h busybox-1.1.1-new/archival/libipkg/ipkg_cmd.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_cmd.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,46 @@ +/* ipkg_cmd.h - the itsy package management system + @@ -2627,10 +2719,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_cmd.h busybox-1.1.1-new/archiv +int pkg_mark_provides(pkg_t *pkg); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_conf.c busybox-1.1.1-new/archival/libipkg/ipkg_conf.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_conf.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,709 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c 2006-05-09 02:12:04.000000000 +0200 +@@ -0,0 +1,711 @@ +/* ipkg_conf.c - the itsy package management system + + Carl D. Worth @@ -2816,6 +2908,13 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_conf.c busybox-1.1.1-new/archi + sprintf (lists_dir,"%s",IPKG_CONF_LISTS_DIR); + } + ++ if (args->offline_root) { ++ char *tmp = malloc(strlen(lists_dir) + strlen(args->offline_root) + 1); ++ sprintf_alloc(&tmp, "%s/%s",args->offline_root,lists_dir); ++ free(lists_dir); ++ lists_dir = tmp; ++ } ++ + pending_dir = malloc(strlen(lists_dir)+strlen("/pending")+5); + snprintf(pending_dir,strlen(lists_dir)+strlen("/pending") ,"%s%s",lists_dir,"/pending"); + @@ -2912,7 +3011,8 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_conf.c busybox-1.1.1-new/archi +*/ + if ( !(args->nocheckfordirorfile)){ + /* need to run load the source list before dest list -Jamey */ -+ set_and_load_pkg_src_list(conf, &conf->pkg_src_list); ++ if ( !(args->noreadfeedsfile)) ++ set_and_load_pkg_src_list(conf, &conf->pkg_src_list); + + /* Now that we have resolved conf->offline_root, we can commit to + the directory names for the dests and load in all the package @@ -3033,16 +3133,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_conf.c busybox-1.1.1-new/archi + if (src == NULL) { + continue; + } -+ if (conf->offline_root) { -+ sprintf_alloc(&list_file, "%s/%s/%s", -+ conf->offline_root, -+ conf->restrict_to_default_dest ? conf->default_dest->lists_dir : conf->lists_dir, -+ src->name); -+ } else { -+ sprintf_alloc(&list_file, "%s/%s", -+ conf->restrict_to_default_dest ? conf->default_dest->lists_dir : conf->lists_dir, -+ src->name); -+ } ++ ++ sprintf_alloc(&list_file, "%s/%s", ++ conf->restrict_to_default_dest ? conf->default_dest->lists_dir : conf->lists_dir, ++ src->name); + + if (file_exists(list_file)) { + pkg_hash_add_from_file(conf, list_file, src, NULL, 0); @@ -3340,9 +3434,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_conf.c busybox-1.1.1-new/archi + sprintf_alloc(&root_filename, "%s%s", (conf->offline_root ? conf->offline_root : ""), filename); + return root_filename; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_conf.h busybox-1.1.1-new/archival/libipkg/ipkg_conf.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_conf.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,107 @@ +/* ipkg_conf.h - the itsy package management system + @@ -3451,9 +3545,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_conf.h busybox-1.1.1-new/archi +char *root_filename_alloc(ipkg_conf_t *conf, char *filename); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_configure.c busybox-1.1.1-new/archival/libipkg/ipkg_configure.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_configure.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,40 @@ +/* ipkg_configure.c - the itsy package management system + @@ -3495,9 +3589,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_configure.c busybox-1.1.1-new/ + return 0; +} + -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_configure.h busybox-1.1.1-new/archival/libipkg/ipkg_configure.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_configure.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,25 @@ +/* ipkg_configure.h - the itsy package management system + @@ -3524,10 +3618,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_configure.h busybox-1.1.1-new/ +int ipkg_configure(ipkg_conf_t *ipkg_conf, pkg_t *pkg); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_download.c busybox-1.1.1-new/archival/libipkg/ipkg_download.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_download.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,191 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-05-09 02:12:04.000000000 +0200 +@@ -0,0 +1,195 @@ +/* ipkg_download.c - the itsy package management system + + Carl D. Worth @@ -3696,8 +3790,12 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_download.c busybox-1.1.1-new/a + if (err) + return err; + pkg->local_filename = strdup(url); ++ ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand \(%s\).\n", pkg->name,pkg->local_filename); ++ pkg->provided_by_hand = 1; + + } else { ++ pkg_deinit(pkg); ++ free(pkg); + return 0; + } + @@ -3715,13 +3813,13 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_download.c busybox-1.1.1-new/a + return 0; + } + if (namep) { -+ *namep = pkg->name; ++ *namep = strdup(pkg->name); + } + return 0; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_download.h busybox-1.1.1-new/archival/libipkg/ipkg_download.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_download.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,30 @@ +/* ipkg_download.h - the itsy package management system + @@ -3753,9 +3851,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_download.h busybox-1.1.1-new/a +int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_includes.h busybox-1.1.1-new/archival/libipkg/ipkg_includes.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_includes.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_includes.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_includes.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_includes.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,79 @@ +#ifndef IPKG_INCLUDES_H +#define IPKG_INCLUDES_H @@ -3836,10 +3934,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_includes.h busybox-1.1.1-new/a +#endif + +#endif /* IPKG_INCLUDES_H */ -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/archival/libipkg/ipkg_install.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_install.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,1823 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.c 2006-05-09 02:12:04.000000000 +0200 +@@ -0,0 +1,1942 @@ +/* ipkg_install.c - the itsy package management system + + Carl D. Worth @@ -3894,6 +3992,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar +static int preinst_configure(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); +static int preinst_configure_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); +static int check_data_file_clashes(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); ++static int check_data_file_clashes_change(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); +static int check_data_file_clashes_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); +static int backup_modified_conffiles(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); +static int backup_modified_conffiles_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg); @@ -3971,7 +4070,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + } + + ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__); -+ return ipkg_install_pkg(conf, pkg); ++ return ipkg_install_pkg(conf, pkg,0); +} + +ipkg_error_t ipkg_install_by_name(ipkg_conf_t *conf, const char *pkg_name) @@ -3980,9 +4079,29 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + pkg_t *old, *new; + char *old_version, *new_version; + ++ ipkg_message(conf, IPKG_DEBUG2, " Getting old from pkg_hash_fetch \n" ); + old = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg_name); ++ if ( old ) ++ ipkg_message(conf, IPKG_DEBUG2, " Old versions from pkg_hash_fetch %s \n", old->version ); + ++ ipkg_message(conf, IPKG_DEBUG2, " Getting new from pkg_hash_fetch \n" ); + new = pkg_hash_fetch_best_installation_candidate_by_name(conf, pkg_name); ++ if ( new ) ++ ipkg_message(conf, IPKG_DEBUG2, " New versions from pkg_hash_fetch %s \n", new->version ); ++ ++/* Pigi Basically here is broken the version stuff. ++ What's happening is that nothing provide the version to differents ++ functions, so the returned struct is always the latest. ++ That's why the install by name don't work. ++*/ ++ ipkg_message(conf, IPKG_DEBUG2, " Versions from pkg_hash_fetch in %s ", __FUNCTION__ ); ++ ++ if ( old ) ++ ipkg_message(conf, IPKG_DEBUG2, " old %s ", old->version ); ++ if ( new ) ++ ipkg_message(conf, IPKG_DEBUG2, " new %s ", new->version ); ++ ipkg_message(conf, IPKG_DEBUG2, " \n"); ++ + if (new == NULL) { + return IPKG_PKG_HAS_NO_CANDIDATE; + } @@ -4000,7 +4119,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + /* reinstall, and some check could fail asking the "force-reinstall" option */ + } + ipkg_message(conf, IPKG_DEBUG, -+ "comparing visible versions of pkg %s:" ++ "Comparing visible versions of pkg %s:" + "\n\t%s is installed " + "\n\t%s is available " + "\n\t%d was comparison result\n", @@ -4032,7 +4151,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + anyone ever wants to make a nice libipkg. */ + + ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__); -+ return ipkg_install_pkg(conf, new); ++ return ipkg_install_pkg(conf, new,0); +} + +ipkg_error_t ipkg_install_multi_by_name(ipkg_conf_t *conf, const char *pkg_name) @@ -4233,7 +4352,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + if ((dep->state_status != SS_INSTALLED) + && (dep->state_status != SS_UNPACKED)) { + ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__); -+ err = ipkg_install_pkg(conf, dep); ++ err = ipkg_install_pkg(conf, dep,0); + if (err) { + pkg_vec_free(depends); + return err; @@ -4466,7 +4585,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + pkg_t *replacee = replacees->pkgs[i]; + int err; + replacee->state_flag |= SF_REPLACE; /* flag it so remove won't complain */ -+ err = ipkg_remove_pkg(conf, replacee); ++ err = ipkg_remove_pkg(conf, replacee,0); + if (err) + return err; + } @@ -4482,7 +4601,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + pkg_t *replacee = replacees->pkgs[i]; + if (replacee->state_status != SS_INSTALLED) { + ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__); -+ err = ipkg_install_pkg(conf, replacee); ++ err = ipkg_install_pkg(conf, replacee,0); + if (err) + return err; + } @@ -4497,7 +4616,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar +} + +/* compares versions of pkg and old_pkg, returns 0 if OK to proceed with installation of pkg, 1 otherwise */ -+static int ipkg_install_check_downgrade(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++static int ipkg_install_check_downgrade(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg, int message) +{ + if (old_pkg) { + char message_out[15]; @@ -4506,10 +4625,11 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + int cmp = pkg_compare_versions(old_pkg, pkg); + int rc = 0; + -+ strncpy (message_out,"Upgrading ",13); ++ memset(message_out,'\x0',15); ++ strncpy (message_out,"Upgrading ",strlen("Upgrading ")); + if ( (conf->force_downgrade==1) && (cmp > 0) ){ /* We've been asked to allow downgrade and version is precedent */ + cmp = -1 ; /* then we force ipkg to downgrade */ -+ strncpy (message_out,"Downgrading ",13); /* We need to use a value < 0 because in the 0 case we are asking to */ ++ strncpy (message_out,"Downgrading ",strlen("Downgrading ")); /* We need to use a value < 0 because in the 0 case we are asking to */ + /* reinstall, and some check could fail asking the "force-reinstall" option */ + } + @@ -4520,7 +4640,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + rc = 1; + } else if (cmp < 0) { + ipkg_message(conf, IPKG_NOTICE, -+ "%s %s on %s from %s to %s...\n", ++ "%s%s on %s from %s to %s...\n", + message_out, pkg->name, old_pkg->dest->name, old_version, new_version); + pkg->dest = old_pkg->dest; + rc = 0; @@ -4542,9 +4662,16 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + free(new_version); + return rc; + } else { ++ char message_out[15] ; ++ memset(message_out,'\x0',15); ++ if ( message ) ++ strncpy( message_out,"Upgrading ",strlen("Upgrading ") ); ++ else ++ strncpy( message_out,"Installing ",strlen("Installing ") ); + char *version = pkg_version_str_alloc(pkg); ++ + ipkg_message(conf, IPKG_NOTICE, -+ "Installing %s (%s) to %s...\n", ++ "%s%s (%s) to %s...\n", message_out, + pkg->name, version, pkg->dest->name); + free(version); + return 0; @@ -4552,13 +4679,19 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar +} + +/* and now the meat... */ -+int ipkg_install_pkg(ipkg_conf_t *conf, pkg_t *pkg) ++int ipkg_install_pkg(ipkg_conf_t *conf, pkg_t *pkg, int from_upgrade) +{ + int err = 0; ++ int message = 0; + pkg_t *old_pkg = NULL; + pkg_vec_t *replacees; + abstract_pkg_t *ab_pkg = NULL; + int old_state_flag; ++ char* file_md5; ++ ++ ++ if ( from_upgrade ) ++ message = 1; /* Coming from an upgrade, and should change the output message */ + + if (!pkg) { + ipkg_message(conf, IPKG_ERROR, @@ -4589,11 +4722,14 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + + old_pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg->name); + -+ err = ipkg_install_check_downgrade(conf, pkg, old_pkg); ++ err = ipkg_install_check_downgrade(conf, pkg, old_pkg, message); + if (err) { return err; } + + pkg->state_want = SW_INSTALL; -+ if (old_pkg) old_pkg->state_want = SW_DEINSTALL; /* needed for check_data_file_clashes of dependences */ ++ if (old_pkg){ ++ old_pkg->state_want = SW_DEINSTALL; /* needed for check_data_file_clashes of dependences */ ++ } ++ + + /* Abhaya: conflicts check */ + err = check_conflicts_for(conf, pkg); @@ -4618,11 +4754,29 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + return err; + } + } ++ ++/* Check for md5 values */ ++ if (pkg->md5sum) ++ { ++ file_md5 = file_md5sum_alloc(pkg->local_filename); ++ if (strcmp(file_md5, pkg->md5sum)) ++ { ++ ipkg_message(conf, IPKG_ERROR, ++ "Package %s md5sum mismatch. Either the ipkg or the package index are corrupt. Try 'ipkg update'.\n", ++ pkg->name); ++ free(file_md5); ++ return err; ++ } ++ free(file_md5); ++ } ++ + if (pkg->tmp_unpack_dir == NULL) { + unpack_pkg_control_files(conf, pkg); + } + + /* We should update the filelist here, so that upgrades of packages that split will not fail. -Jamey 27-MAR-03 */ ++/* Pigi: check if it will pass from here when replacing. It seems to fail */ ++/* That's rather strange that files don't change owner. Investigate !!!!!!*/ + err = update_file_ownership(conf, pkg, old_pkg); + if (err) { return err; } + @@ -4689,7 +4843,16 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + " removing obsolesced files\n"); + remove_obsolesced_files(conf, pkg, old_pkg); + } ++ /* removing files from old package, to avoid ghost files */ ++ remove_data_files_and_list(conf, old_pkg); ++/* Pigi : It should be better to remove also maintainer and postrem scripts here, just in case*/ ++ remove_maintainer_scripts_except_postrm(conf, old_pkg); ++ remove_postrm(conf, old_pkg); ++/* Pigi */ ++ + } ++ ++ + ipkg_message(conf, IPKG_INFO, + " installing maintainer scripts\n"); + install_maintainer_scripts(conf, pkg, old_pkg); @@ -4701,6 +4864,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + " installing data files\n"); + install_data_files(conf, pkg); + ++/* read comments from function for detail but I will execute this here as all other tests are ok.*/ ++ err = check_data_file_clashes_change(conf, pkg, old_pkg); ++ + ipkg_message(conf, IPKG_INFO, + " resolving conf files\n"); + resolve_conffiles(conf, pkg); @@ -4928,6 +5094,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + return 0; +} + ++ +static int check_data_file_clashes(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) +{ + /* DPKG_INCOMPATIBILITY: @@ -4980,8 +5147,8 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + + /* Pre-existing files are OK if owned by a package replaced by new pkg. */ + if (owner) { ++ ipkg_message(conf, IPKG_DEBUG2, "Checking for replaces for %s in package %s\n", filename, owner->name); + if (pkg_replaces(pkg, owner)) { -+ ipkg_message(conf, IPKG_INFO, "Replacing pre-existing file %s owned by package %s\n", filename, owner->name); + continue; + } +/* If the file that would be installed is owned by the same package, ( as per a reinstall or similar ) @@ -5020,6 +5187,56 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + return clashes; +} + ++static int check_data_file_clashes_change(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) ++{ ++ /* Basically that's the worst hack I could do to be able to change ownership of ++ file list, but, being that we have no way to unwind the mods, due to structure ++ of hash table, probably is the quickest hack too, whishing it would not slow-up thing too much. ++ What we do here is change the ownership of file in hash if a replace ( or similar events ++ happens ) ++ Only the action that are needed to change name should be considered. ++ @@@ To change after 1.0 release. ++ */ ++ str_list_t *files_list; ++ str_list_elt_t *iter; ++ ++ int clashes = 0; ++ ++ files_list = pkg_get_installed_files(pkg); ++ for (iter = files_list->head; iter; iter = iter->next) { ++ char *root_filename; ++ char *filename = iter->data; ++ root_filename = root_filename_alloc(conf, filename); ++ if (file_exists(root_filename) && (! file_is_dir(root_filename))) { ++ pkg_t *owner; ++ ++ if (conf->force_overwrite) { ++ /* but we need to change who owns this file */ ++ file_hash_set_file_owner(conf, filename, pkg); ++ continue; ++ } ++ ++ owner = file_hash_get_file_owner(conf, filename); ++ ++ /* Pre-existing files are OK if owned by a package replaced by new pkg. */ ++ if (owner) { ++ if (pkg_replaces(pkg, owner)) { ++/* It's now time to change the owner of that file. ++ It has been "replaced" from the new "Replaces", then I need to inform lists file about that. */ ++ ipkg_message(conf, IPKG_INFO, "Replacing pre-existing file %s owned by package %s\n", filename, owner->name); ++ file_hash_set_file_owner(conf, filename, pkg); ++ continue; ++ } ++ } ++ ++ } ++ free(root_filename); ++ } ++ pkg_free_installed_files(pkg); ++ ++ return clashes; ++} ++ +static int check_data_file_clashes_unwind(ipkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg) +{ + /* Nothing to do since check_data_file_clashes doesn't change state */ @@ -5424,7 +5641,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar + /* first, remove the packages that need removing */ + for (i = 0 ; i < pkgs_to_remove->len; i++ ) { + pkg_t *pkg = pkgs_to_remove->pkgs[i]; -+ err = ipkg_remove_pkg(conf, pkg); ++ err = ipkg_remove_pkg(conf, pkg,0); + if (err) return err; + } + return 0; @@ -5663,9 +5880,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.c busybox-1.1.1-new/ar +} + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.h busybox-1.1.1-new/archival/libipkg/ipkg_install.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_install.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.h 2006-05-09 02:12:04.000000000 +0200 @@ -0,0 +1,35 @@ +/* ipkg_install.h - the itsy package management system + @@ -5693,7 +5910,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.h busybox-1.1.1-new/ar +ipkg_error_t ipkg_install_by_name(ipkg_conf_t *conf, const char *pkg_name); +ipkg_error_t ipkg_install_multi_by_name(ipkg_conf_t *conf, const char *pkg_name); +int ipkg_install_from_file(ipkg_conf_t *conf, const char *filename); -+int ipkg_install_pkg(ipkg_conf_t *conf, pkg_t *pkg); ++int ipkg_install_pkg(ipkg_conf_t *conf, pkg_t *pkg,int from_upgrading); +int satisfy_dependencies_for(ipkg_conf_t *conf, pkg_t *pkg); + +int ipkg_satisfy_all_dependences(ipkg_conf_t *conf); @@ -5702,9 +5919,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_install.h busybox-1.1.1-new/ar +int name_mark_dependencies_for_installation(ipkg_conf_t *conf, const char *pkg_name, pkg_vec_t *pkgs_needed); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_message.c busybox-1.1.1-new/archival/libipkg/ipkg_message.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_message.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,61 @@ +/* ipkg_message.c - the itsy package management system + @@ -5767,9 +5984,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_message.c busybox-1.1.1-new/ar + } +} +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_message.h busybox-1.1.1-new/archival/libipkg/ipkg_message.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_message.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,32 @@ +/* ipkg_message.h - the itsy package management system + @@ -5803,10 +6020,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_message.h busybox-1.1.1-new/ar +extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, char *fmt, ...); + +#endif /* _IPKG_MESSAGE_H_ */ -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/archival/libipkg/ipkg_remove.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_remove.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,381 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.c 2006-05-09 02:12:04.000000000 +0200 +@@ -0,0 +1,383 @@ +/* ipkg_remove.c - the itsy package management system + + Carl D. Worth @@ -5837,10 +6054,6 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + +#include "ipkg_cmd.h" + -+static int remove_data_files_and_list(ipkg_conf_t *conf, pkg_t *pkg); -+static int remove_maintainer_scripts_except_postrm(ipkg_conf_t *conf, pkg_t *pkg); -+static int remove_postrm(ipkg_conf_t *conf, pkg_t *pkg); -+ +/* + * Returns number of the number of packages depending on the packages provided by this package. + * Every package implicitly provides itself. @@ -5949,7 +6162,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + + + for (i = 0; i < dependent_pkgs->len; i++) { -+ int err = ipkg_remove_pkg(conf, dependent_pkgs->pkgs[i]); ++ int err = ipkg_remove_pkg(conf, dependent_pkgs->pkgs[i],0); + if (err) + return err; + } @@ -5974,12 +6187,16 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + return 0; +} + -+int ipkg_remove_pkg(ipkg_conf_t *conf, pkg_t *pkg) ++int ipkg_remove_pkg(ipkg_conf_t *conf, pkg_t *pkg,int message) +{ ++/* Actually, when "message == 1" I have been called from an upgrade, and not from a normal remove ++ thus I wan't check for essential, as I'm upgrading. ++ I hope it won't break anything :) ++*/ + int err; + abstract_pkg_t *parent_pkg = NULL; + -+ if (pkg->essential) { ++ if (pkg->essential && !message) { + if (conf->force_removal_of_essential_packages) { + fprintf(stderr, "WARNING: Removing essential package %s under your coercion.\n" + "\tIf your system breaks, you get to keep both pieces\n", @@ -6025,9 +6242,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + } + } + -+ printf("Removing package %s from %s...\n", pkg->name, pkg->dest->name); -+ fflush(stdout); -+ ++ if ( message==0 ){ ++ printf("Removing package %s from %s...\n", pkg->name, pkg->dest->name); ++ fflush(stdout); ++ } + pkg->state_flag |= SF_FILELIST_CHANGED; + + pkg->state_want = SW_DEINSTALL; @@ -6062,11 +6280,11 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + +int ipkg_purge_pkg(ipkg_conf_t *conf, pkg_t *pkg) +{ -+ ipkg_remove_pkg(conf, pkg); ++ ipkg_remove_pkg(conf, pkg,0); + return 0; +} + -+static int remove_data_files_and_list(ipkg_conf_t *conf, pkg_t *pkg) ++int remove_data_files_and_list(ipkg_conf_t *conf, pkg_t *pkg) +{ + str_list_t installed_dirs; + str_list_t *installed_files; @@ -6148,7 +6366,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + return 0; +} + -+static int remove_maintainer_scripts_except_postrm(ipkg_conf_t *conf, pkg_t *pkg) ++int remove_maintainer_scripts_except_postrm(ipkg_conf_t *conf, pkg_t *pkg) +{ + int i, err; + char *globpattern; @@ -6168,6 +6386,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + if (str_ends_with(globbuf.gl_pathv[i], ".postrm")) { + continue; + } ++ ipkg_message(conf, IPKG_INFO, " deleting %s\n", globbuf.gl_pathv[i]); + unlink(globbuf.gl_pathv[i]); + } + globfree(&globbuf); @@ -6175,7 +6394,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + return 0; +} + -+static int remove_postrm(ipkg_conf_t *conf, pkg_t *pkg) ++int remove_postrm(ipkg_conf_t *conf, pkg_t *pkg) +{ + char *postrm_file_name; + @@ -6188,10 +6407,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.c busybox-1.1.1-new/arc + + return 0; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.h busybox-1.1.1-new/archival/libipkg/ipkg_remove.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_remove.h 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,29 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.h 2006-05-09 02:12:04.000000000 +0200 +@@ -0,0 +1,33 @@ +/* ipkg_remove.h - the itsy package management system + + Carl D. Worth @@ -6215,15 +6434,19 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_remove.h busybox-1.1.1-new/arc +#include "pkg.h" +#include "ipkg_conf.h" + -+int ipkg_remove_pkg(ipkg_conf_t *conf, pkg_t *pkg); ++int ipkg_remove_pkg(ipkg_conf_t *conf, pkg_t *pkg,int message); +int ipkg_purge_pkg(ipkg_conf_t *conf, pkg_t *pkg); +int possible_broken_removal_of_packages (ipkg_conf_t *conf, pkg_t *pkg); +int pkg_has_installed_dependents(ipkg_conf_t *conf, abstract_pkg_t *parent_apkg, pkg_t *pkg, abstract_pkg_t *** pdependents); ++int remove_data_files_and_list(ipkg_conf_t *conf, pkg_t *pkg); ++int remove_maintainer_scripts_except_postrm (ipkg_conf_t *conf, pkg_t *pkg); ++int remove_postrm (ipkg_conf_t *conf, pkg_t *pkg); ++ + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_upgrade.c busybox-1.1.1-new/archival/libipkg/ipkg_upgrade.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_upgrade.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c 2006-05-09 02:12:04.000000000 +0200 @@ -0,0 +1,77 @@ +/* ipkg_upgrade.c - the itsy package management system + @@ -6300,11 +6523,11 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_upgrade.c busybox-1.1.1-new/ar + } + + new->state_flag |= SF_USER; -+ return ipkg_install_pkg(conf, new); ++ return ipkg_install_pkg(conf, new,1); +} -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_upgrade.h busybox-1.1.1-new/archival/libipkg/ipkg_upgrade.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_upgrade.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,18 @@ +/* ipkg_upgrade.c - the itsy package management system + @@ -6324,9 +6547,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_upgrade.h busybox-1.1.1-new/ar +#include "ipkg.h" + +int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old); -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_utils.c busybox-1.1.1-new/archival/libipkg/ipkg_utils.c ---- busybox-1.1.1-old/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_utils.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.c +--- busybox-1.1.2-orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,181 @@ +/* ipkg_utils.c - the itsy package management system + @@ -6509,9 +6732,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_utils.c busybox-1.1.1-new/arch +} + + -diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_utils.h busybox-1.1.1-new/archival/libipkg/ipkg_utils.h ---- busybox-1.1.1-old/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/ipkg_utils.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.h +--- busybox-1.1.2-orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,29 @@ +/* ipkg_utils.h - the itsy package management system + @@ -6542,10 +6765,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/ipkg_utils.h busybox-1.1.1-new/arch +int line_is_blank(const char *line); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/libipkg.c busybox-1.1.1-new/archival/libipkg/libipkg.c ---- busybox-1.1.1-old/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/libipkg.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,512 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c +--- busybox-1.1.2-orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c 2006-05-09 02:12:05.000000000 +0200 +@@ -0,0 +1,527 @@ +/* ipkglib.c - the itsy package management system + + Florina Boor @@ -7017,6 +7240,21 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/libipkg.c busybox-1.1.1-new/archiva + !strcmp(cmd_name,"print_installation_architecture") ) + args.nocheckfordirorfile = 1; + ++/* Pigi: added a flag to disable the reading of feed files if the command does not need to ++ read anything from there. ++*/ ++ if ( !strcmp(cmd_name,"flag") || ++ !strcmp(cmd_name,"configure") || ++ !strcmp(cmd_name,"remove") || ++ !strcmp(cmd_name,"files") || ++ !strcmp(cmd_name,"search") || ++ !strcmp(cmd_name,"compare_versions") || ++ !strcmp(cmd_name,"compare-versions") || ++ !strcmp(cmd_name,"list_installed") || ++ !strcmp(cmd_name,"list-installed") || ++ !strcmp(cmd_name,"status") ) ++ args.noreadfeedsfile = 1; ++ + + err = ipkg_conf_init (&ipkg_conf, &args); + if (err) @@ -7058,9 +7296,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/libipkg.c busybox-1.1.1-new/archiva +} + +#endif /* IPKG_LIB */ -diff -ruN busybox-1.1.1-old/archival/libipkg/libipkg.h busybox-1.1.1-new/archival/libipkg/libipkg.h ---- busybox-1.1.1-old/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/libipkg.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.h +--- busybox-1.1.2-orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,87 @@ +/* ipkglib.h - the itsy package management system + @@ -7149,9 +7387,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/libipkg.h busybox-1.1.1-new/archiva + + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/md5.c busybox-1.1.1-new/archival/libipkg/md5.c ---- busybox-1.1.1-old/archival/libipkg/md5.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/md5.c 2006-03-30 01:24:25.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c +--- busybox-1.1.2-orig/archival/libipkg/md5.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,48 @@ +/* md5.c - wrappers to busybox md5 functions + * @@ -7201,9 +7439,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/md5.c busybox-1.1.1-new/archival/li + return md5_end(resblock, &md5_cx); +} + -diff -ruN busybox-1.1.1-old/archival/libipkg/md5.h busybox-1.1.1-new/archival/libipkg/md5.h ---- busybox-1.1.1-old/archival/libipkg/md5.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/md5.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.h +--- busybox-1.1.2-orig/archival/libipkg/md5.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,35 @@ +/* md5.h - Compute MD5 checksum of files or strings according to the + * definition of MD5 in RFC 1321 from April 1992. @@ -7240,9 +7478,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/md5.h busybox-1.1.1-new/archival/li + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/nv_pair.c busybox-1.1.1-new/archival/libipkg/nv_pair.c ---- busybox-1.1.1-old/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/nv_pair.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.c +--- busybox-1.1.2-orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,40 @@ +/* nv_pair.c - the itsy package management system + @@ -7284,9 +7522,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/nv_pair.c busybox-1.1.1-new/archiva +} + + -diff -ruN busybox-1.1.1-old/archival/libipkg/nv_pair.h busybox-1.1.1-new/archival/libipkg/nv_pair.h ---- busybox-1.1.1-old/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/nv_pair.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.h +--- busybox-1.1.2-orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,32 @@ +/* nv_pair.h - the itsy package management system + @@ -7320,9 +7558,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/nv_pair.h busybox-1.1.1-new/archiva + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/nv_pair_list.c busybox-1.1.1-new/archival/libipkg/nv_pair_list.c ---- busybox-1.1.1-old/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/nv_pair_list.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.c +--- busybox-1.1.2-orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,98 @@ +/* nv_pair_list.c - the itsy package management system + @@ -7422,9 +7660,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/nv_pair_list.c busybox-1.1.1-new/ar + } + return NULL; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/nv_pair_list.h busybox-1.1.1-new/archival/libipkg/nv_pair_list.h ---- busybox-1.1.1-old/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/nv_pair_list.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.h +--- busybox-1.1.2-orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,60 @@ +/* nv_pair_list.h - the itsy package management system + @@ -7486,10 +7724,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/nv_pair_list.h busybox-1.1.1-new/ar + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg.c busybox-1.1.1-new/archival/libipkg/pkg.c ---- busybox-1.1.1-old/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,1753 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c +--- busybox-1.1.2-orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c 2006-05-09 02:12:05.000000000 +0200 +@@ -0,0 +1,1754 @@ +/* pkg.c - the itsy package management system + + Carl D. Worth @@ -7629,6 +7867,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg.c busybox-1.1.1-new/archival/li + pkg->installed_files = NULL; + pkg->installed_files_ref_cnt = 0; + pkg->essential = 0; ++ pkg->provided_by_hand = 0; + + return 0; +} @@ -9243,10 +9482,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg.c busybox-1.1.1-new/archival/li + } + return 0; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg.h busybox-1.1.1-new/archival/libipkg/pkg.h ---- busybox-1.1.1-old/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg.h 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,230 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h +--- busybox-1.1.2-orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h 2006-05-09 02:12:05.000000000 +0200 +@@ -0,0 +1,232 @@ +/* pkg.h - the itsy package management system + + Carl D. Worth @@ -9423,6 +9662,8 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg.h busybox-1.1.1-new/archival/li + int installed_files_ref_cnt; + int essential; + int arch_priority; ++/* Adding this flag, to "force" ipkg to choose a "provided_by_hand" package, if there are multiple choice */ ++ int provided_by_hand; +}; + +pkg_t *pkg_new(void); @@ -9477,10 +9718,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg.h busybox-1.1.1-new/archival/li +int pkg_write_changed_filelists(ipkg_conf_t *conf); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_depends.c busybox-1.1.1-new/archival/libipkg/pkg_depends.c ---- busybox-1.1.1-old/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_depends.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,1029 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c 2006-05-09 02:12:05.000000000 +0200 +@@ -0,0 +1,1033 @@ +/* pkg_depends.c - the itsy package management system + + Steven M. Ayer @@ -9758,8 +9999,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_depends.c busybox-1.1.1-new/arc + replaces = pkg->replaces; + + for (i = 0; i < replaces_count; i++) { -+ if (strcmp(pkg_scout->name,pkg->replaces[i]->name)==0) // Found ++ if (strcmp(pkg_scout->name,pkg->replaces[i]->name)==0) { // Found ++ ipkg_message(NULL, IPKG_DEBUG2, "Seems I've found a replace %s %s \n",pkg_scout->name,pkg->replaces[i]->name); + return 1; ++ } + } + return 0; + @@ -9989,13 +10232,15 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_depends.c busybox-1.1.1-new/arc +{ + abstract_pkg_t **replaces = pkg->replaces; + int replaces_count = pkg->replaces_count; -+ abstract_pkg_t **replacee_provides = pkg->provides; -+ int replacee_provides_count = pkg->provides_count; ++ /* abstract_pkg_t **replacee_provides = pkg->provides; ++ int replacee_provides_count = pkg->provides_count; */ + int i, j; + for (i = 0; i < replaces_count; i++) { + abstract_pkg_t *abstract_replacee = replaces[i]; -+ for (j = 0; j < replacee_provides_count; j++) { -+ if (replacee_provides[j] == abstract_replacee) ++ for (j = 0; j < replaces_count; j++) { ++ /* ipkg_message(NULL, IPKG_DEBUG2, "Searching pkg-name %s repprovname %s absrepname %s \n", ++ pkg->name,replacee->provides[j]->name, abstract_replacee->name); */ ++ if (replacee->provides[j] == abstract_replacee) + return 1; + } + } @@ -10510,9 +10755,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_depends.c busybox-1.1.1-new/arc + + return 0; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_depends.h busybox-1.1.1-new/archival/libipkg/pkg_depends.h ---- busybox-1.1.1-old/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_depends.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,105 @@ +/* pkg_depends.h - the itsy package management system + @@ -10619,9 +10864,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_depends.h busybox-1.1.1-new/arc +int pkg_dependence_satisfied(ipkg_conf_t *conf, depend_t *depend); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_dest.c busybox-1.1.1-new/archival/libipkg/pkg_dest.c ---- busybox-1.1.1-old/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_dest.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,92 @@ +/* pkg_dest.c - the itsy package management system + @@ -10715,9 +10960,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_dest.c busybox-1.1.1-new/archiv + + dest->root_dir = NULL; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_dest.h busybox-1.1.1-new/archival/libipkg/pkg_dest.h ---- busybox-1.1.1-old/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_dest.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,38 @@ +/* pkg_dest.h - the itsy package management system + @@ -10757,9 +11002,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_dest.h busybox-1.1.1-new/archiv + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_dest_list.c busybox-1.1.1-new/archival/libipkg/pkg_dest_list.c ---- busybox-1.1.1-old/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_dest_list.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,85 @@ +/* pkg_dest_list.c - the itsy package management system + @@ -10846,9 +11091,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_dest_list.c busybox-1.1.1-new/a +{ + return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list); +} -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_dest_list.h busybox-1.1.1-new/archival/libipkg/pkg_dest_list.h ---- busybox-1.1.1-old/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_dest_list.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,50 @@ +/* pkg_dest_list.h - the itsy package management system + @@ -10900,9 +11145,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_dest_list.h busybox-1.1.1-new/a + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_extract.c busybox-1.1.1-new/archival/libipkg/pkg_extract.c ---- busybox-1.1.1-old/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_extract.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,224 @@ +/* pkg_extract.c - the itsy package management system + @@ -11128,9 +11373,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_extract.c busybox-1.1.1-new/arc + + return 0; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_extract.h busybox-1.1.1-new/archival/libipkg/pkg_extract.h ---- busybox-1.1.1-old/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_extract.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,32 @@ +/* pkg_extract.c - the itsy package management system + @@ -11164,10 +11409,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_extract.h busybox-1.1.1-new/arc +int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_hash.c busybox-1.1.1-new/archival/libipkg/pkg_hash.c ---- busybox-1.1.1-old/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_hash.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,608 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c 2006-05-09 02:12:05.000000000 +0200 +@@ -0,0 +1,617 @@ +/* ipkg_hash.c - the itsy package management system + + Steven M. Ayer @@ -11384,8 +11629,8 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_hash.c busybox-1.1.1-new/archiv + /* count packages matching max arch priority and keep track of last one */ + for (i = 0; i < vec->len; i++) { + pkg_t *maybe = vec->pkgs[i]; -+ ipkg_message(conf, IPKG_DEBUG, " %s arch=%s arch_priority=%d \n", -+ maybe->name, maybe->architecture, maybe->arch_priority); ++ ipkg_message(conf, IPKG_DEBUG, " %s arch=%s arch_priority=%d version=%s \n", ++ maybe->name, maybe->architecture, maybe->arch_priority, maybe->version); + if (maybe->arch_priority > 0) { + max_count++; + abstract_pkg_vec_insert(matching_apkgs, maybe->parent); @@ -11402,12 +11647,21 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_hash.c busybox-1.1.1-new/archiv + +/* Here it is usefull, if ( matching_apkgs->len > 1 ), to test if one of this matching packages has the same name of the + needed package. In this case, I would return it for install, otherwise I will continue with the procedure */ ++/* The problem is what to do when there are more than a mathing package, with the same name and several version ? ++ Until now I always got the latest, but that breaks the downgrade option. ++ If I stop at the first one, I would probably miss the new ones ++ Maybe the way is to have some kind of flag somewhere, to see if the package been asked to install is from a file, ++ or from a Packages feed. ++ It it is from a file it always need to be checked whatever version I have in feeds or everywhere, according to force-down or whatever options*/ ++/*Pigi*/ + + for (i = 0; i < matching_pkgs->len; i++) { + pkg_t *matching = matching_pkgs->pkgs[i]; + if (constraint_fcn(matching, cdata)) { /* We found it */ -+ ipkg_message(conf, IPKG_DEBUG, " Found a valid candidate for the install: %s \n", matching->name) ; ++ ipkg_message(conf, IPKG_DEBUG, " Found a valid candidate for the install: %s %s \n", matching->name, matching->version) ; + good_pkg_by_name = matching; ++ if ( matching->provided_by_hand == 1 ) /* It has been provided by hand, so it is what user want */ ++ break; + } + } + @@ -11480,7 +11734,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_hash.c busybox-1.1.1-new/archiv + if (strcmp(pkg->name, name) == 0) + return 1; + else -+ return 0; /* Pigi */ ++ return 0; +} + +pkg_t *pkg_hash_fetch_best_installation_candidate_by_name(ipkg_conf_t *conf, const char *name) @@ -11776,9 +12030,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_hash.c busybox-1.1.1-new/archiv +} + + -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_hash.h busybox-1.1.1-new/archival/libipkg/pkg_hash.h ---- busybox-1.1.1-old/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_hash.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,61 @@ +/* pkg_hash.h - the itsy package management system + @@ -11841,9 +12095,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_hash.h busybox-1.1.1-new/archiv + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_parse.c busybox-1.1.1-new/archival/libipkg/pkg_parse.c ---- busybox-1.1.1-old/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_parse.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,366 @@ +/* pkg_parse.c - the itsy package management system + @@ -12211,9 +12465,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_parse.c busybox-1.1.1-new/archi + + return 0; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_parse.h busybox-1.1.1-new/archival/libipkg/pkg_parse.h ---- busybox-1.1.1-old/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_parse.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,31 @@ +/* pkg_parse.h - the itsy package management system + @@ -12246,9 +12500,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_parse.h busybox-1.1.1-new/archi +int pkg_valorize_other_field(pkg_t *pkg, char ***raw); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_src.c busybox-1.1.1-new/archival/libipkg/pkg_src.c ---- busybox-1.1.1-old/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_src.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,43 @@ +/* pkg_src.c - the itsy package management system + @@ -12293,9 +12547,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_src.c busybox-1.1.1-new/archiva +} + + -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_src.h busybox-1.1.1-new/archival/libipkg/pkg_src.h ---- busybox-1.1.1-old/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_src.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,34 @@ +/* pkg_src.h - the itsy package management system + @@ -12331,9 +12585,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_src.h busybox-1.1.1-new/archiva +void pkg_src_deinit(pkg_src_t *src); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_src_list.c busybox-1.1.1-new/archival/libipkg/pkg_src_list.c ---- busybox-1.1.1-old/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_src_list.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,75 @@ +/* pkg_src_list.c - the itsy package management system + @@ -12410,9 +12664,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_src_list.c busybox-1.1.1-new/ar +{ + return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list); +} -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_src_list.h busybox-1.1.1-new/archival/libipkg/pkg_src_list.h ---- busybox-1.1.1-old/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_src_list.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,57 @@ +/* pkg_src_list.h - the itsy package management system + @@ -12471,10 +12725,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_src_list.h busybox-1.1.1-new/ar + +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_vec.c busybox-1.1.1-new/archival/libipkg/pkg_vec.c ---- busybox-1.1.1-old/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_vec.c 2006-03-30 00:39:48.000000000 +0200 -@@ -0,0 +1,226 @@ +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.c +--- busybox-1.1.2-orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.c 2006-05-09 02:12:05.000000000 +0200 +@@ -0,0 +1,230 @@ +/* pkg_vec.c - the itsy package management system + + Steven M. Ayer @@ -12529,7 +12783,10 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_vec.c busybox-1.1.1-new/archiva + int found = 0; + + /* look for a duplicate pkg by name, version, and architecture */ -+ for (i = 0; i < vec->len; i++) ++ for (i = 0; i < vec->len; i++){ ++ ipkg_message(conf, IPKG_DEBUG2, "Function: %s. Found pkg=%s version=%s arch=%s cmp=%s version=%s arch=%s \n", ++ __FUNCTION__, pkg->name, pkg->version, pkg->architecture, ++ vec->pkgs[i]->name, vec->pkgs[i]->version,vec->pkgs[i]->architecture ); + if ((strcmp(pkg->name, vec->pkgs[i]->name) == 0) + && (pkg_compare_versions(pkg, vec->pkgs[i]) == 0) + && (strcmp(pkg->architecture, vec->pkgs[i]->architecture) == 0)) { @@ -12538,6 +12795,7 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_vec.c busybox-1.1.1-new/archiva + __FUNCTION__, pkg->name, pkg->version, pkg->architecture); + break; + } ++ } + + /* we didn't find one, add it */ + if (!found){ @@ -12701,9 +12959,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_vec.c busybox-1.1.1-new/archiva + qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar); +} + -diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_vec.h busybox-1.1.1-new/archival/libipkg/pkg_vec.h ---- busybox-1.1.1-old/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/pkg_vec.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h +--- busybox-1.1.2-orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,62 @@ +/* pkg_vec.h - the itsy package management system + @@ -12767,9 +13025,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/pkg_vec.h busybox-1.1.1-new/archiva +void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *)); +#endif + -diff -ruN busybox-1.1.1-old/archival/libipkg/sprintf_alloc.h busybox-1.1.1-new/archival/libipkg/sprintf_alloc.h ---- busybox-1.1.1-old/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/sprintf_alloc.h 2006-03-31 02:19:07.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/sprintf_alloc.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h +--- busybox-1.1.2-orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,25 @@ +/* sprintf_alloca.c -- like sprintf with memory allocation + @@ -12796,9 +13054,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/sprintf_alloc.h busybox-1.1.1-new/a +#define sprintf_alloc(str, fmt, args...) *str = bb_xasprintf(fmt, ## args) + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/str_list.c busybox-1.1.1-new/archival/libipkg/str_list.c ---- busybox-1.1.1-old/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/str_list.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.c +--- busybox-1.1.2-orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,76 @@ +/* str_list.c - the itsy package management system + @@ -12876,9 +13134,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/str_list.c busybox-1.1.1-new/archiv + (void *)target_str, + (void_list_cmp_t)strcmp); +} -diff -ruN busybox-1.1.1-old/archival/libipkg/str_list.h busybox-1.1.1-new/archival/libipkg/str_list.h ---- busybox-1.1.1-old/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/str_list.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.h +--- busybox-1.1.2-orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,51 @@ +/* str_list.h - the itsy package management system + @@ -12931,9 +13189,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/str_list.h busybox-1.1.1-new/archiv +char *str_list_remove_elt(str_list_t *list, const char *target_str); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/str_util.c busybox-1.1.1-new/archival/libipkg/str_util.c ---- busybox-1.1.1-old/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/str_util.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.c +--- busybox-1.1.2-orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,73 @@ +/* str_utils.c - the itsy package management system + @@ -13008,9 +13266,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/str_util.c busybox-1.1.1-new/archiv + return str ? strdup(str) : NULL; +} + -diff -ruN busybox-1.1.1-old/archival/libipkg/str_util.h busybox-1.1.1-new/archival/libipkg/str_util.h ---- busybox-1.1.1-old/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/str_util.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.h +--- busybox-1.1.2-orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,28 @@ +/* str_utils.h - the itsy package management system + @@ -13040,9 +13298,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/str_util.h busybox-1.1.1-new/archiv +char *str_dup_safe(const char *str); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/user.c busybox-1.1.1-new/archival/libipkg/user.c ---- busybox-1.1.1-old/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/user.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/user.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.c +--- busybox-1.1.2-orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,58 @@ +/* user.c - the itsy package management system + @@ -13102,9 +13360,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/user.c busybox-1.1.1-new/archival/l + + return response; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/user.h busybox-1.1.1-new/archival/libipkg/user.h ---- busybox-1.1.1-old/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/user.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/user.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.h +--- busybox-1.1.2-orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,23 @@ +/* user.c - the itsy package management system + @@ -13129,9 +13387,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/user.h busybox-1.1.1-new/archival/l + +char *get_user_response(const char *format, ...); + -diff -ruN busybox-1.1.1-old/archival/libipkg/void_list.c busybox-1.1.1-new/archival/libipkg/void_list.c ---- busybox-1.1.1-old/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/void_list.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.c +--- busybox-1.1.2-orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,194 @@ +/* void_list.c - the itsy package management system + @@ -13327,9 +13585,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/void_list.c busybox-1.1.1-new/archi + else + return NULL; +} -diff -ruN busybox-1.1.1-old/archival/libipkg/void_list.h busybox-1.1.1-new/archival/libipkg/void_list.h ---- busybox-1.1.1-old/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/void_list.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.h +--- busybox-1.1.2-orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,59 @@ +/* void_list.h - the itsy package management system + @@ -13390,9 +13648,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/void_list.h busybox-1.1.1-new/archi +void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp); + +#endif -diff -ruN busybox-1.1.1-old/archival/libipkg/xsystem.c busybox-1.1.1-new/archival/libipkg/xsystem.c ---- busybox-1.1.1-old/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/xsystem.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.c +--- busybox-1.1.2-orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.c 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,64 @@ +/* xsystem.c - system(3) with error messages + @@ -13458,9 +13716,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/xsystem.c busybox-1.1.1-new/archiva + return -1; +} + -diff -ruN busybox-1.1.1-old/archival/libipkg/xsystem.h busybox-1.1.1-new/archival/libipkg/xsystem.h ---- busybox-1.1.1-old/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/archival/libipkg/xsystem.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.h +--- busybox-1.1.2-orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.h 2006-05-09 02:06:48.000000000 +0200 @@ -0,0 +1,34 @@ +/* xsystem.h - system(3) with error messages + @@ -13496,9 +13754,9 @@ diff -ruN busybox-1.1.1-old/archival/libipkg/xsystem.h busybox-1.1.1-new/archiva + +#endif + -diff -ruN busybox-1.1.1-old/archival/libunarchive/Makefile.in busybox-1.1.1-new/archival/libunarchive/Makefile.in ---- busybox-1.1.1-old/archival/libunarchive/Makefile.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.1-new/archival/libunarchive/Makefile.in 2006-03-30 00:56:59.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libunarchive/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/Makefile.in +--- busybox-1.1.2-orig/archival/libunarchive/Makefile.in 2006-03-22 22:16:20.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/Makefile.in 2006-05-09 02:06:48.000000000 +0200 @@ -58,6 +58,7 @@ LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) @@ -13507,9 +13765,9 @@ diff -ruN busybox-1.1.1-old/archival/libunarchive/Makefile.in busybox-1.1.1-new/ LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o -diff -ruN busybox-1.1.1-old/archival/libunarchive/data_extract_all.c busybox-1.1.1-new/archival/libunarchive/data_extract_all.c ---- busybox-1.1.1-old/archival/libunarchive/data_extract_all.c 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.1-new/archival/libunarchive/data_extract_all.c 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/archival/libunarchive/data_extract_all.c busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/data_extract_all.c +--- busybox-1.1.2-orig/archival/libunarchive/data_extract_all.c 2006-03-22 22:16:20.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/data_extract_all.c 2006-05-09 02:06:48.000000000 +0200 @@ -126,3 +126,17 @@ utime(file_header->name, &t); } @@ -13528,9 +13786,9 @@ diff -ruN busybox-1.1.1-old/archival/libunarchive/data_extract_all.c busybox-1.1 + } +} + -diff -ruN busybox-1.1.1-old/include/applets.h busybox-1.1.1-new/include/applets.h ---- busybox-1.1.1-old/include/applets.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.1-new/include/applets.h 2006-03-30 00:42:08.000000000 +0200 +diff -ruN busybox-1.1.2-orig/include/applets.h busybox-1.1.2+ipkg-0.99.162/include/applets.h +--- busybox-1.1.2-orig/include/applets.h 2006-03-22 22:16:24.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/include/applets.h 2006-05-09 02:06:48.000000000 +0200 @@ -149,6 +149,7 @@ USE_IPCALC(APPLET(ipcalc, ipcalc_main, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_IPCRM(APPLET(ipcrm, ipcrm_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) @@ -13539,9 +13797,9 @@ diff -ruN busybox-1.1.1-old/include/applets.h busybox-1.1.1-new/include/applets. USE_IPLINK(APPLET(iplink, iplink_main, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_IPROUTE(APPLET(iproute, iproute_main, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_IPTUNNEL(APPLET(iptunnel, iptunnel_main, _BB_DIR_BIN, _BB_SUID_NEVER)) -diff -ruN busybox-1.1.1-old/include/unarchive.h busybox-1.1.1-new/include/unarchive.h ---- busybox-1.1.1-old/include/unarchive.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.1-new/include/unarchive.h 2006-03-30 00:39:48.000000000 +0200 +diff -ruN busybox-1.1.2-orig/include/unarchive.h busybox-1.1.2+ipkg-0.99.162/include/unarchive.h +--- busybox-1.1.2-orig/include/unarchive.h 2006-03-22 22:16:24.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/include/unarchive.h 2006-05-09 02:06:48.000000000 +0200 @@ -74,6 +74,7 @@ extern void data_skip(archive_handle_t *archive_handle); @@ -13550,9 +13808,9 @@ diff -ruN busybox-1.1.1-old/include/unarchive.h busybox-1.1.1-new/include/unarch extern void data_extract_to_stdout(archive_handle_t *archive_handle); extern void data_extract_to_buffer(archive_handle_t *archive_handle); -diff -ruN busybox-1.1.1-old/include/usage.h busybox-1.1.1-new/include/usage.h ---- busybox-1.1.1-old/include/usage.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.1-new/include/usage.h 2006-03-30 00:42:53.000000000 +0200 +diff -ruN busybox-1.1.2-orig/include/usage.h busybox-1.1.2+ipkg-0.99.162/include/usage.h +--- busybox-1.1.2-orig/include/usage.h 2006-03-22 22:16:24.000000000 +0100 ++++ busybox-1.1.2+ipkg-0.99.162/include/usage.h 2006-05-09 02:06:48.000000000 +0200 @@ -1013,6 +1013,82 @@ "$ ls -la /tmp/busybox*\n" \ "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" diff --git a/openwrt/package/busybox/patches/912-ipkg-no_warnings.patch b/openwrt/package/busybox/patches/912-ipkg-no_warnings.patch index 707361fa6de..74133b07690 100644 --- a/openwrt/package/busybox/patches/912-ipkg-no_warnings.patch +++ b/openwrt/package/busybox/patches/912-ipkg-no_warnings.patch @@ -1,6 +1,9 @@ -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/file_util.c busybox-1.1.0-pre1-new/archival/libipkg/file_util.c ---- busybox-1.1.0-pre1-old/archival/libipkg/file_util.c 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/file_util.c 2005-12-08 09:04:01.000000000 +0100 +# +# remove (numerous) compile warnings +# +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/file_util.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c 2006-05-09 02:06:48.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/file_util.c 2006-05-09 02:16:48.000000000 +0200 @@ -123,7 +123,7 @@ int file_mkdir_hier(const char *path, long mode) @@ -10,10 +13,10 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/file_util.c busybox-1.1.0-pre1 } char *file_md5sum_alloc(const char *file_name) -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.0-pre1-new/archival/libipkg/ipkg_cmd.c ---- busybox-1.1.0-pre1-old/archival/libipkg/ipkg_cmd.c 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/ipkg_cmd.c 2005-12-08 09:04:01.000000000 +0100 -@@ -251,7 +251,7 @@ +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_cmd.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c 2006-05-09 02:23:37.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_cmd.c 2006-05-09 02:23:17.000000000 +0200 +@@ -246,7 +246,7 @@ in = fopen (tmp_file_name, "r"); out = fopen (list_file_name, "w"); if (in && out) @@ -22,7 +25,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.0-pre1- else err = 1; if (in) -@@ -807,14 +807,13 @@ +@@ -894,14 +894,13 @@ pkg_vec_free(available); } else { pkg_vec_t *installed_pkgs = pkg_vec_alloc(); @@ -38,7 +41,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.0-pre1- if (pkg->state_flag & SF_USER) { flagged_pkg_count++; } else { -@@ -834,7 +833,7 @@ +@@ -921,7 +920,7 @@ do { removed = 0; for (i = 0; i < installed_pkgs->len; i++) { @@ -47,7 +50,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.0-pre1- if (!(pkg->state_flag & SF_USER) && !pkg_has_installed_dependents(conf, pkg->parent, pkg, NULL)) { removed++; -@@ -889,7 +888,7 @@ +@@ -976,7 +975,7 @@ { int i; pkg_t *pkg; @@ -56,10 +59,10 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/ipkg_cmd.c busybox-1.1.0-pre1- global_conf = conf; signal(SIGINT, sigint_handler); -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/ipkg_conf.c busybox-1.1.0-pre1-new/archival/libipkg/ipkg_conf.c ---- busybox-1.1.0-pre1-old/archival/libipkg/ipkg_conf.c 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/ipkg_conf.c 2005-12-08 09:04:01.000000000 +0100 -@@ -540,14 +540,14 @@ +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_conf.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c 2006-05-09 02:12:04.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_conf.c 2006-05-09 02:16:48.000000000 +0200 +@@ -542,14 +542,14 @@ if (strcmp(type, "option") == 0) { ipkg_conf_set_option(options, name, value); } else if (strcmp(type, "src") == 0) { @@ -76,9 +79,21 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/ipkg_conf.c busybox-1.1.0-pre1 pkg_src_list_append (pkg_src_list, name, value, extra, 1); } else { ipkg_message(conf, IPKG_ERROR, "ERROR: duplicate src declaration. Skipping:\n\t src %s %s\n", -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/libipkg.c busybox-1.1.0-pre1-new/archival/libipkg/libipkg.c ---- busybox-1.1.0-pre1-old/archival/libipkg/libipkg.c 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/libipkg.c 2005-12-08 09:04:01.000000000 +0100 +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_download.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-05-09 02:12:04.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_download.c 2006-05-09 02:22:51.000000000 +0200 +@@ -166,7 +166,7 @@ + if (err) + return err; + pkg->local_filename = strdup(url); +- ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand \(%s\).\n", pkg->name,pkg->local_filename); ++ ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand (%s).\n", pkg->name,pkg->local_filename); + pkg->provided_by_hand = 1; + + } else { +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/libipkg.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c 2006-05-09 02:12:05.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/libipkg.c 2006-05-09 02:16:48.000000000 +0200 @@ -445,7 +445,7 @@ int ipkg_op (int argc, char *argv[]) @@ -105,7 +120,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/libipkg.c busybox-1.1.0-pre1-n /* Pigi: added a flag to disable the checking of structures if the command does not need to read anything from there. */ -@@ -494,7 +494,7 @@ +@@ -509,7 +509,7 @@ args_usage (NULL); } @@ -114,7 +129,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/libipkg.c busybox-1.1.0-pre1-n { fprintf (stderr, "%s: the ``%s'' command requires at least one argument\n", -@@ -502,7 +502,7 @@ +@@ -517,7 +517,7 @@ args_usage (NULL); } @@ -123,9 +138,9 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/libipkg.c busybox-1.1.0-pre1-n ipkg_conf_deinit (&ipkg_conf); -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/md5.c busybox-1.1.0-pre1-new/archival/libipkg/md5.c ---- busybox-1.1.0-pre1-old/archival/libipkg/md5.c 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/md5.c 2005-12-08 09:04:01.000000000 +0100 +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/md5.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c 2006-05-09 02:06:48.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/md5.c 2006-05-09 02:16:48.000000000 +0200 @@ -25,7 +25,6 @@ int md5_stream(FILE *stream, void *resblock) { @@ -134,10 +149,10 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/md5.c busybox-1.1.0-pre1-new/a if( (fd = fileno(stream)) == -1 ) { bb_error_msg("bad file descriptor"); -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/archival/libipkg/pkg.c ---- busybox-1.1.0-pre1-old/archival/libipkg/pkg.c 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/pkg.c 2005-12-08 09:04:01.000000000 +0100 -@@ -527,6 +527,7 @@ +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c 2006-05-09 02:12:05.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c 2006-05-09 02:16:48.000000000 +0200 +@@ -528,6 +528,7 @@ char * pkg_formatted_field(pkg_t *pkg, const char *field ) { static size_t LINE_LEN = 128; @@ -145,7 +160,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a char * temp = (char *)malloc(1); int len = 0; int flag_provide_false = 0; -@@ -566,7 +567,6 @@ +@@ -567,7 +568,6 @@ if (strcasecmp(field, "Conffiles") == 0) { /* Conffiles */ conffile_list_elt_t *iter; @@ -153,7 +168,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a if (pkg->conffiles.head == NULL) { return temp; -@@ -587,15 +587,14 @@ +@@ -588,15 +588,14 @@ strncpy(temp, "Conffiles:\n", 12); for (iter = pkg->conffiles.head; iter; iter = iter->next) { if (iter->data->name && iter->data->value) { @@ -171,7 +186,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a len = 14 ; for(i = 0; i < pkg->conflicts_count; i++) { len = len + (strlen(pkg->conflicts_str[i])+5); -@@ -608,8 +607,8 @@ +@@ -609,8 +608,8 @@ temp[0]='\0'; strncpy(temp, "Conflicts:", 11); for(i = 0; i < pkg->conflicts_count; i++) { @@ -182,7 +197,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a } strncat(temp, "\n", strlen("\n")); } -@@ -624,7 +623,6 @@ +@@ -625,7 +624,6 @@ int i; if (pkg->depends_count) { @@ -190,7 +205,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a len = 14 ; for(i = 0; i < pkg->depends_count; i++) { len = len + (strlen(pkg->depends_str[i])+4); -@@ -637,8 +635,8 @@ +@@ -638,8 +636,8 @@ temp[0]='\0'; strncpy(temp, "Depends:", 10); for(i = 0; i < pkg->depends_count; i++) { @@ -201,7 +216,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a } strncat(temp, "\n", strlen("\n")); } -@@ -803,7 +801,6 @@ +@@ -804,7 +802,6 @@ /* Replaces | Recommends*/ if (strcasecmp (field, "Replaces") == 0) { if (pkg->replaces_count) { @@ -209,7 +224,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a len = 14; for (i = 0; i < pkg->replaces_count; i++) { len = len + (strlen(pkg->replaces_str[i])+5); -@@ -816,14 +813,13 @@ +@@ -817,14 +814,13 @@ temp[0]='\0'; strncpy(temp, "Replaces:", 12); for (i = 0; i < pkg->replaces_count; i++) { @@ -226,7 +241,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a len = 15; for(i = 0; i < pkg->recommends_count; i++) { len = len + (strlen( pkg->recommends_str[i])+5); -@@ -836,8 +832,8 @@ +@@ -837,8 +833,8 @@ temp[0]='\0'; strncpy(temp, "Recommends:", 13); for(i = 0; i < pkg->recommends_count; i++) { @@ -237,7 +252,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a } strncat(temp, "\n", strlen("\n")); } -@@ -906,7 +902,6 @@ +@@ -907,7 +903,6 @@ } else if (strcasecmp(field, "Suggests") == 0) { if (pkg->suggests_count) { int i; @@ -245,7 +260,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a len = 13; for(i = 0; i < pkg->suggests_count; i++) { len = len + (strlen(pkg->suggests_str[i])+5); -@@ -919,8 +914,8 @@ +@@ -920,8 +915,8 @@ temp[0]='\0'; strncpy(temp, "Suggests:", 10); for(i = 0; i < pkg->suggests_count; i++) { @@ -256,7 +271,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a } strncat(temp, "\n", strlen("\n")); } -@@ -1139,10 +1134,8 @@ +@@ -1140,10 +1135,8 @@ return 0; } @@ -268,7 +283,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a int namecmp; int vercmp; if (!a->name || !b->name) { -@@ -1169,10 +1162,8 @@ +@@ -1170,10 +1163,8 @@ return 0; } @@ -280,7 +295,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a if (!a->name || !b->name) { fprintf(stderr, "abstract_pkg_name_compare: a=%p a->name=%p b=%p b->name=%p\n", a, a->name, b, b->name); -@@ -1192,7 +1183,7 @@ +@@ -1193,7 +1184,7 @@ #endif if (pkg->epoch) { @@ -289,10 +304,10 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.c busybox-1.1.0-pre1-new/a } else { epoch_str = strdup(""); } -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.h busybox-1.1.0-pre1-new/archival/libipkg/pkg.h ---- busybox-1.1.0-pre1-old/archival/libipkg/pkg.h 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/pkg.h 2005-12-08 09:04:01.000000000 +0100 -@@ -192,8 +192,8 @@ +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.h +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h 2006-05-09 02:12:05.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.h 2006-05-09 02:16:48.000000000 +0200 +@@ -194,8 +194,8 @@ char *pkg_version_str_alloc(pkg_t *pkg); int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg); @@ -303,9 +318,9 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg.h busybox-1.1.0-pre1-new/a char * pkg_formatted_info(pkg_t *pkg ); char * pkg_formatted_field(pkg_t *pkg, const char *field ); -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg_depends.c busybox-1.1.0-pre1-new/archival/libipkg/pkg_depends.c ---- busybox-1.1.0-pre1-old/archival/libipkg/pkg_depends.c 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/pkg_depends.c 2005-12-08 09:04:01.000000000 +0100 +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c 2006-05-09 02:12:05.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.c 2006-05-09 02:16:48.000000000 +0200 @@ -68,7 +68,7 @@ pkg_vec_t *unsatisfied, char *** unresolved) { @@ -336,7 +351,7 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg_depends.c busybox-1.1.0-pr if (p->state_want == SW_INSTALL) continue; ipkg_message(conf, IPKG_DEBUG, "not installing %s due to requirement for %s\n", pkg_scout->name, p->name); -@@ -810,27 +808,27 @@ +@@ -814,27 +812,27 @@ * [npredepends+nrecommends,npredepends+nrecommends+nsuggests) -> returns recommends_str[index] * [npredepends+nrecommends+nsuggests,npredepends+nrecommends+nsuggests+ndepends) -> returns depends_str[index] */ @@ -377,9 +392,9 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg_depends.c busybox-1.1.0-pr return NULL; } -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg_depends.h busybox-1.1.0-pre1-new/archival/libipkg/pkg_depends.h ---- busybox-1.1.0-pre1-old/archival/libipkg/pkg_depends.h 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/pkg_depends.h 2005-12-08 09:04:01.000000000 +0100 +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.h +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h 2006-05-09 02:06:48.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.h 2006-05-09 02:16:48.000000000 +0200 @@ -92,7 +92,7 @@ */ int pkg_conflicts(pkg_t *pkg, pkg_t *conflicts); @@ -389,9 +404,9 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg_depends.h busybox-1.1.0-pr void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg); void freeDepends(pkg_t *pkg); void printDepends(pkg_t * pkg); -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg_hash.c busybox-1.1.0-pre1-new/archival/libipkg/pkg_hash.c ---- busybox-1.1.0-pre1-old/archival/libipkg/pkg_hash.c 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/pkg_hash.c 2005-12-08 09:04:01.000000000 +0100 +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_hash.c +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c 2006-05-09 02:12:05.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_hash.c 2006-05-09 02:17:35.000000000 +0200 @@ -143,7 +143,7 @@ pkg_t *pkg_hash_fetch_best_installation_candidate(ipkg_conf_t *conf, abstract_pkg_t *apkg, int (*constraint_fcn)(pkg_t *pkg, void *cdata), void *cdata, int quiet) @@ -412,12 +427,12 @@ diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg_hash.c busybox-1.1.0-pre1- - pkg_t *maybe = vec->pkgs[i]; + for (j = 0; j < vec->len; j++) { + pkg_t *maybe = vec->pkgs[j]; - ipkg_message(conf, IPKG_DEBUG, " %s arch=%s arch_priority=%d \n", - maybe->name, maybe->architecture, maybe->arch_priority); + ipkg_message(conf, IPKG_DEBUG, " %s arch=%s arch_priority=%d version=%s \n", + maybe->name, maybe->architecture, maybe->arch_priority, maybe->version); if (maybe->arch_priority > 0) { -diff -ruN busybox-1.1.0-pre1-old/archival/libipkg/pkg_vec.h busybox-1.1.0-pre1-new/archival/libipkg/pkg_vec.h ---- busybox-1.1.0-pre1-old/archival/libipkg/pkg_vec.h 2005-12-08 09:01:04.000000000 +0100 -+++ busybox-1.1.0-pre1-new/archival/libipkg/pkg_vec.h 2005-12-08 09:04:01.000000000 +0100 +diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_vec.h +--- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h 2006-05-09 02:06:48.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_vec.h 2006-05-09 02:16:48.000000000 +0200 @@ -35,6 +35,8 @@ }; typedef struct abstract_pkg_vec abstract_pkg_vec_t; diff --git a/openwrt/package/busybox/patches/913-libbb_hash.patch b/openwrt/package/busybox/patches/913-libbb_hash.patch index a146a07d4a1..3a6a2ba1d1f 100644 --- a/openwrt/package/busybox/patches/913-libbb_hash.patch +++ b/openwrt/package/busybox/patches/913-libbb_hash.patch @@ -1,3 +1,6 @@ +# +# expose (again) an hash_fd function (used 911-ipkg.patch) +# diff -ruN busybox-1.1.1-old/coreutils/md5_sha1_sum.c busybox-1.1.1-new/coreutils/md5_sha1_sum.c --- busybox-1.1.1-old/coreutils/md5_sha1_sum.c 2006-03-30 00:14:50.000000000 +0200 +++ busybox-1.1.1-new/coreutils/md5_sha1_sum.c 2006-03-29 23:46:51.000000000 +0200 diff --git a/openwrt/package/busybox/patches/914-ipkg-fixes.patch b/openwrt/package/busybox/patches/914-ipkg-fixes.patch new file mode 100644 index 00000000000..55cd9040c6f --- /dev/null +++ b/openwrt/package/busybox/patches/914-ipkg-fixes.patch @@ -0,0 +1,15 @@ +# +# fix ipkg bugs +# +diff -ruN busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162-fixes/archival/libipkg/pkg.c +--- busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c 2006-05-09 02:16:48.000000000 +0200 ++++ busybox-1.1.2+ipkg-0.99.162-fixes/archival/libipkg/pkg.c 2006-05-09 05:15:29.000000000 +0200 +@@ -359,6 +359,8 @@ + if (!oldpkg->essential) + oldpkg->essential = newpkg->essential; + ++ oldpkg->provided_by_hand |= newpkg->provided_by_hand; ++ + return 0; + } + From a56e4d12e9c98dbed756d2ce6e74c9b57e51c592 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 24 May 2006 07:12:59 +0000 Subject: [PATCH 072/757] add Build/InstallDev template to install dev files in STAGING_DIR, introduce a NEEDS: package field to implement SELECT PACKAGE_foo in menuconfig. SVN-Revision: 3824 --- openwrt/package/rules.mk | 20 ++++++++++++++++++++ openwrt/scripts/gen_menuconfig.pl | 7 +++++++ 2 files changed, 27 insertions(+) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 99e4a846a54..4999974900f 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -29,8 +29,13 @@ define Build/DefaultTargets $(call Build/Compile) touch $$@ + $(PKG_BUILD_DIR)/.dev-installed: $(PKG_BUILD_DIR)/.built + $(call Build/InstallDev) + touch $$@ + package-clean: FORCE $(call Build/Clean) + $(call Build/UninstallDev) package-rebuild: FORCE @-rm $(PKG_BUILD_DIR)/.built @@ -44,6 +49,7 @@ define Package/Default SECTION:=opt CATEGORY:=Extra packages DEPENDS:= + NEEDS:= MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org> SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) @@ -86,6 +92,7 @@ define BuildPackage endif IDEPEND_$(1):=$$(strip $$(DEPENDS)) + INEED_$(1):=$$(strip $$(NEEDS)) DUMPINFO += \ echo "Package: $(1)"; @@ -103,6 +110,7 @@ define BuildPackage DUMPINFO += \ echo "Version: $(VERSION)"; \ echo "Depends: $$(IDEPEND_$(1))"; \ + echo "Needs: $$(INEED_$(1))"; \ echo "Category: $(CATEGORY)"; \ echo "Title: $(TITLE)"; \ echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; @@ -147,6 +155,8 @@ define BuildPackage $$(INFO_$(1)): $$(IPKG_$(1)) $(IPKG) install $$(IPKG_$(1)) + compile-targets: $(PKG_BUILD_DIR)/.dev-installed + $(1)-clean: rm -f $(PACKAGE_DIR)/$(1)_* @@ -183,10 +193,14 @@ define Build/Configure/Default [ -x configure ] && \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ ./configure \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ --prefix=/usr \ --exec-prefix=/usr \ --bindir=/usr/bin \ @@ -222,10 +236,16 @@ define Build/Compile $(call Build/Compile/Default,) endef +define Build/InstallDev +endef + define Build/Clean $(MAKE) clean endef +define Build/UninstallDev +endef + ifneq ($(DUMP),) dumpinfo: FORCE @$(DUMPINFO) diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index e282ee3ed2d..e304f188139 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -28,6 +28,9 @@ sub print_category($) { foreach my $depend (@{$pkg->{depends}}) { print "\t\tdepends PACKAGE_$depend\n"; } + foreach my $need (@{$pkg->{needs}}) { + print "\t\tselect PACKAGE_$need\n"; + } print "\t\thelp\n"; print $pkg->{description}; print "\n"; @@ -63,6 +66,10 @@ while ($line = <>) { my @dep = split /,\s*/, $1; $pkg->{depends} = \@dep; }; + $line =~ /^Needs: \s*(.+)\s*$/ and do { + my @need = split /,\s*/, $1; + $pkg->{needs} = \@need; + }; $line =~ /^Category: \s*(.+)\s*$/ and do { $pkg->{category} = $1; defined $category{$1} or $category{$1} = {}; From c57461252bdf1d0294eae3447e22d4747c96a130 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 24 May 2006 07:18:36 +0000 Subject: [PATCH 073/757] import libpcap from trunk and convert it to -ng. SVN-Revision: 3825 --- openwrt/package/libpcap/Makefile | 97 ++++++++++++++ .../libpcap/patches/100-shared-lib.patch | 120 ++++++++++++++++++ .../patches/101-cross-compile-fix.patch | 12 ++ .../libpcap/patches/102-alt-ether.patch | 40 ++++++ 4 files changed, 269 insertions(+) create mode 100644 openwrt/package/libpcap/Makefile create mode 100644 openwrt/package/libpcap/patches/100-shared-lib.patch create mode 100644 openwrt/package/libpcap/patches/101-cross-compile-fix.patch create mode 100644 openwrt/package/libpcap/patches/102-alt-ether.patch diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile new file mode 100644 index 00000000000..960caf133d7 --- /dev/null +++ b/openwrt/package/libpcap/Makefile @@ -0,0 +1,97 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libpcap +PKG_VERSION:=0.9.4 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.tcpdump.org/release/ +PKG_MD5SUM:=79025766e8027df154cb1f32de8a7974 +PKG_CAT:=zcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(TOPDIR)/package/rules.mk + +define Package/libpcap + SECTION:=base + CATEGORY:=Libraries + TITLE:=Low-level packet capture library + DESCRIPTION:=A system-independent library for user-level network packet capture. + URL:=http://www.tcpdump.org/ +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -f config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + ac_cv_linux_vers= \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + --enable-shared \ + --enable-static \ + --disable-yydebug \ + --enable-ipv6 \ + --with-build-cc=$(HOSTCC) \ + --with-pcap=linux \ + ); +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/libpcap/install + install -m0755 -d $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/ +endef + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap.h \ + $(PKG_INSTALL_DIR)/usr/include/pcap-bpf.h \ + $(PKG_INSTALL_DIR)/usr/include/pcap-namedb.h \ + $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.a \ + $(PKG_INSTALL_DIR)/usr/lib/libpcap.so* \ + $(STAGING_DIR)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/pcap.h \ + $(STAGING_DIR)/usr/include/pcap-bpf.h \ + $(STAGING_DIR)/usr/include/pcap-namedb.h \ + $(STAGING_DIR)/usr/lib/libpcap.a \ + $(STAGING_DIR)/usr/lib/libpcap.so* +endef + +$(eval $(call BuildPackage,libpcap)) diff --git a/openwrt/package/libpcap/patches/100-shared-lib.patch b/openwrt/package/libpcap/patches/100-shared-lib.patch new file mode 100644 index 00000000000..54cc774a376 --- /dev/null +++ b/openwrt/package/libpcap/patches/100-shared-lib.patch @@ -0,0 +1,120 @@ +diff -urN libpcap-0.9.4.orig/Makefile.in libpcap-0.9.4/Makefile.in +--- libpcap-0.9.4.orig/Makefile.in 2003-12-15 02:35:03.000000000 +0100 ++++ libpcap-0.9.4/Makefile.in 2006-02-05 16:56:18.000000000 +0100 +@@ -37,6 +37,15 @@ + srcdir = @srcdir@ + VPATH = @srcdir@ + ++# some defines for shared library compilation ++MAJ=0.9 ++MIN=4 ++VERSION=$(MAJ).$(MIN) ++LIBNAME=pcap ++LIBRARY=lib$(LIBNAME).a ++SOLIBRARY=lib$(LIBNAME).so ++SHAREDLIB=$(SOLIBRARY).$(VERSION) ++ + # + # You shouldn't need to edit anything below. + # +@@ -50,6 +59,7 @@ + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(INCLS) $(DEFS) ++CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ) + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -70,7 +80,12 @@ + .c.o: + @rm -f $@ + $(CC) $(CFLAGS) -c $(srcdir)/$*.c ++ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c + ++%_pic.o: %.c ++ @rm -f $@ ++ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c ++ + PSRC = pcap-@V_PCAP@.c + FSRC = fad-@V_FINDALLDEVS@.c + SSRC = @SSRC@ +@@ -84,6 +99,7 @@ + # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot + # hack the extra indirection + OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) ++OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(SSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) + HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ + ethertype.h gencode.h gnuc.h + GENHDR = \ +@@ -95,15 +111,23 @@ + TAGFILES = \ + $(SRC) $(HDR) $(TAGHDR) + +-CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c ++CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* + +-all: libpcap.a ++all: libpcap.a $(SHAREDLIB) + + libpcap.a: $(OBJ) + @rm -f $@ + ar rc $@ $(OBJ) $(LIBS) + $(RANLIB) $@ + ++$(SHAREDLIB): $(OBJ_PIC) ++ -@rm -f $@ ++ -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) ++ $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc ++ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) ++ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) ++ ++ + shared: libpcap.$(DYEXT) + + # +@@ -129,6 +153,10 @@ + scanner.o: scanner.c tokdefs.h + $(CC) $(CFLAGS) -c scanner.c + ++scanner_pic.o: scanner.c tokdefs.h ++ $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c ++ ++ + pcap.o: version.h + + tokdefs.h: grammar.c +@@ -142,9 +170,16 @@ + @rm -f $@ + $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c + ++grammar_pic.o: grammar.c ++ @rm -f $@ ++ $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c ++ + version.o: version.c + $(CC) $(CFLAGS) -c version.c + ++version_pic.o: version.c ++ $(CC) -fPIC $(CFLAGS) -c version.c -o $@ ++ + snprintf.o: $(srcdir)/missing/snprintf.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + +@@ -170,10 +205,17 @@ + bpf_filter.o: bpf_filter.c + $(CC) $(CFLAGS) -c bpf_filter.c + ++bpf_filter_pic.o: bpf_filter.c ++ $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@ ++ ++ + install: libpcap.a + [ -d $(DESTDIR)$(libdir) ] || \ + (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) + $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a ++ $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ ++ ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) ++ ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) + $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a + [ -d $(DESTDIR)$(includedir) ] || \ + (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) diff --git a/openwrt/package/libpcap/patches/101-cross-compile-fix.patch b/openwrt/package/libpcap/patches/101-cross-compile-fix.patch new file mode 100644 index 00000000000..5ba78adaef6 --- /dev/null +++ b/openwrt/package/libpcap/patches/101-cross-compile-fix.patch @@ -0,0 +1,12 @@ +diff -urN libpcap-0.9.4.orig/Makefile.in libpcap-0.9.4/Makefile.in +--- libpcap-0.9.4.orig/Makefile.in 2006-02-05 16:57:16.000000000 +0100 ++++ libpcap-0.9.4/Makefile.in 2006-02-05 16:57:03.000000000 +0100 +@@ -117,7 +117,7 @@ + + libpcap.a: $(OBJ) + @rm -f $@ +- ar rc $@ $(OBJ) $(LIBS) ++ $(AR) rc $@ $(OBJ) $(LIBS) + $(RANLIB) $@ + + $(SHAREDLIB): $(OBJ_PIC) diff --git a/openwrt/package/libpcap/patches/102-alt-ether.patch b/openwrt/package/libpcap/patches/102-alt-ether.patch new file mode 100644 index 00000000000..347265d6e91 --- /dev/null +++ b/openwrt/package/libpcap/patches/102-alt-ether.patch @@ -0,0 +1,40 @@ +diff -urN libpcap-0.9.4.orig/nametoaddr.c libpcap-0.9.4/nametoaddr.c +--- libpcap-0.9.4.orig/nametoaddr.c 2005-04-20 13:13:51.000000000 +0200 ++++ libpcap-0.9.4/nametoaddr.c 2006-02-05 16:58:46.000000000 +0100 +@@ -410,7 +410,7 @@ + e = ep = (u_char *)malloc(6); + + while (*s) { +- if (*s == ':') ++ if (*s == ':' || *s == '.') + s += 1; + d = xdtoi(*s++); + if (isxdigit((unsigned char)*s)) { +diff -urN libpcap-0.9.4.orig/scanner.l libpcap-0.9.4/scanner.l +--- libpcap-0.9.4.orig/scanner.l 2005-09-05 11:08:07.000000000 +0200 ++++ libpcap-0.9.4/scanner.l 2006-02-05 17:00:13.000000000 +0100 +@@ -80,6 +80,7 @@ + N ([0-9]+|(0X|0x)[0-9A-Fa-f]+) + B ([0-9A-Fa-f][0-9A-Fa-f]?) + W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?) ++X [0-9A-Fa-f] + + %a 16000 + %o 19000 +@@ -306,7 +307,7 @@ + {N} { yylval.i = stoi((char *)yytext); return NUM; } + ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) { + yylval.s = sdup((char *)yytext); return HID; } +-{B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext); ++({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) { yylval.e = pcap_ether_aton((char *)yytext); + return EID; } + {V6} { + #ifdef INET6 +@@ -324,6 +325,7 @@ + #endif /*INET6*/ + } + {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); } ++{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;} + icmptype { yylval.i = 0; return NUM; } + icmpcode { yylval.i = 1; return NUM; } + icmp-echoreply { yylval.i = 0; return NUM; } From ef5c0e48fa0ad4cc9dfba2abcca2cae28aa504ef Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 24 May 2006 07:19:27 +0000 Subject: [PATCH 074/757] sync ppp with trunk and convert it to -ng. SVN-Revision: 3826 --- openwrt/package/ppp/Config.in | 53 ---- openwrt/package/ppp/Makefile | 232 +++++++++--------- openwrt/package/ppp/files/etc/ppp/ip-down | 7 + openwrt/package/ppp/files/etc/ppp/ip-up | 7 + openwrt/package/ppp/files/ifup.pppoa | 2 + openwrt/package/ppp/files/ifup.pppoe | 2 + openwrt/package/ppp/ipkg/chat.control | 5 - .../package/ppp/ipkg/ppp-mod-pppoa.control | 5 - .../package/ppp/ipkg/ppp-mod-pppoe.control | 5 - .../package/ppp/ipkg/ppp-mod-radius.conffiles | 2 - .../package/ppp/ipkg/ppp-mod-radius.control | 5 - openwrt/package/ppp/ipkg/ppp.conffiles | 2 - openwrt/package/ppp/ipkg/ppp.control | 4 - openwrt/package/ppp/ipkg/pppdump.control | 5 - openwrt/package/ppp/ipkg/pppstats.control | 5 - 15 files changed, 140 insertions(+), 201 deletions(-) delete mode 100644 openwrt/package/ppp/Config.in delete mode 100644 openwrt/package/ppp/ipkg/chat.control delete mode 100644 openwrt/package/ppp/ipkg/ppp-mod-pppoa.control delete mode 100644 openwrt/package/ppp/ipkg/ppp-mod-pppoe.control delete mode 100644 openwrt/package/ppp/ipkg/ppp-mod-radius.conffiles delete mode 100644 openwrt/package/ppp/ipkg/ppp-mod-radius.control delete mode 100644 openwrt/package/ppp/ipkg/ppp.conffiles delete mode 100644 openwrt/package/ppp/ipkg/ppp.control delete mode 100644 openwrt/package/ppp/ipkg/pppdump.control delete mode 100644 openwrt/package/ppp/ipkg/pppstats.control diff --git a/openwrt/package/ppp/Config.in b/openwrt/package/ppp/Config.in deleted file mode 100644 index 237ef205176..00000000000 --- a/openwrt/package/ppp/Config.in +++ /dev/null @@ -1,53 +0,0 @@ -menu "ppp............................... PPP (Point-to-Point Protocol) daemon" - -config PACKAGE_PPP - prompt "ppp............................... PPP (Point-to-Point Protocol) daemon" - tristate - default n if LINUX_2_6_ARUBA - default y - select PACKAGE_KMOD_PPP - -config PACKAGE_PPP_WITH_FILTER - prompt "Enable filter support" - bool - default y - -config PACKAGE_PPP_MOD_PPPOA - prompt "ppp-mod-pppoa................... PPPoA (PPP over ATM) plugin" - tristate - default y if LINUX_2_4_AR7 - depends on PACKAGE_PPP - select PACKAGE_KMOD_PPPOATM - -config PACKAGE_PPP_MOD_PPPOE - prompt "ppp-mod-pppoe................... PPPoE (PPP over Ethernet) plugin" - tristate - default y - depends on PACKAGE_PPP - select PACKAGE_KMOD_PPPOE - -config PACKAGE_PPP_MOD_RADIUS - prompt "ppp-mod-radius.................. RADIUS (Remote Authentication Dial-In User Service) plugin" - tristate - default m if DEVEL - depends on PACKAGE_PPP - -config PACKAGE_CHAT - prompt "chat............................ Utility to establish conversation with other PPP servers (via a modem)" - tristate - default m if DEVEL - depends on PACKAGE_PPP - -config PACKAGE_PPPDUMP - prompt "pppdump......................... Utility to read PPP record file" - tristate - default m if DEVEL - depends on PACKAGE_PPP - -config PACKAGE_PPPSTATS - prompt "pppstats........................ Utility to report PPP statistics" - tristate - default m if DEVEL - depends on PACKAGE_PPP - -endmenu diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 92aba9a57d7..1542a8b5d7a 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -5,142 +5,154 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ppp PKG_VERSION:=2.4.3 PKG_RELEASE:=7 -PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c - -PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/ +PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c +PKG_CAT:=zcat + PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk -define PKG_mod_template - -$$(IPKG_$(1)): - install -d -m0755 $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION) - install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/$(2).so \ - $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION)/ - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - +define Package/ppp + SECTION:=net + CATEGORY:=Network + NEEDS:=libpcap + MENU:=1 + DEFAULT:=y + TITLE:=PPP daemon + DESCRIPTION:=PPP (Point-to-Point Protocol) daemon + URL:=http://ppp.samba.org/ endef -$(eval $(call PKG_template,PPP,ppp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PPP_MOD_PPPOA,ppp-mod-pppoa,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PPP_MOD_PPPOE,ppp-mod-pppoe,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PPP_MOD_RADIUS,ppp-mod-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,CHAT,chat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PPPDUMP,pppdump,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,PPPSTATS,pppstats,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/ppp-mod-pppoa + SECTION:=net + CATEGORY:=Network + DEPENDS:=ppp + TITLE:=PPPoA plugin + DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp +endef -$(eval $(call PKG_mod_template,PPP_MOD_PPPOA,pppoatm)) -$(eval $(call PKG_mod_template,PPP_MOD_PPPOE,rp-pppoe)) -$(eval $(call PKG_mod_template,PPP_MOD_RADIUS,radius)) +define Package/ppp-mod-pppoe + SECTION:=net + CATEGORY:=Network + DEFAULT:=y + DEPENDS:=ppp + TITLE:=PPPoE plugin + DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp +endef -PKG_DEPEND:="kmod-ppp" -ifeq ($(CONFIG_PACKAGE_PPP_WITH_FILTER),y) -ENABLE_FILTER:="PRECOMPILED_FILTER=1" -endif +define Package/ppp-mod-radius + SECTION:=net + CATEGORY:=Network + DEPENDS:=ppp + TITLE:=RADIUS plugin + DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp +endef -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - ) - touch $@ +define Package/chat + SECTION:=net + CATEGORY:=Network + DEPENDS:=ppp + TITLE:=Establish conversation with a modem + DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem) +endef -$(PKG_BUILD_DIR)/.built: +define Package/pppdump + SECTION:=net + CATEGORY:=Network + DEPENDS:=ppp + TITLE:=Read PPP record file + DESCRIPTION:=Utility to read PPP record file +endef + +define Package/pppstats + SECTION:=net + CATEGORY:=Network + DEPENDS:=ppp + TITLE:=Report PPP statistics + DESCRIPTION:=Utility to report PPP statistics +endef + + +define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR)/usr $(MAKE) -C $(PKG_BUILD_DIR) \ CC=$(TARGET_CC) \ COPTS="$(TARGET_CFLAGS)" \ - HAVE_INET6="1" \ - $(ENABLE_FILTER) \ - STAGING_DIR=$(STAGING_DIR) \ + PRECOMPILED_FILTER=1 \ + STAGING_DIR="$(STAGING_DIR)" \ DESTDIR="$(PKG_INSTALL_DIR)/usr" \ all install - touch $@ +endef -ifeq ($(CONFIG_PACKAGE_PPP_WITH_FILTER),y) -INSTALL_FILTER=install -m0644 ./files/etc/ppp/filter $(IDIR_PPP)/etc/ppp/ -endif - -$(IPKG_PPP): - install -d -m0755 $(IDIR_PPP)/etc/ppp - ln -sf /tmp/resolv.conf $(IDIR_PPP)/etc/ppp/resolv.conf - install -m0600 ./files/etc/ppp/chap-secrets $(IDIR_PPP)/etc/ppp/ - install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/ - $(INSTALL_FILTER) - install -m0755 ./files/etc/ppp/ip-up $(IDIR_PPP)/etc/ppp/ - install -m0755 ./files/etc/ppp/ip-down $(IDIR_PPP)/etc/ppp/ - install -d -m0755 $(IDIR_PPP)/usr/sbin - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(IDIR_PPP)/usr/sbin/ - install -d -m0755 $(IDIR_PPP)/usr/lib/pppd - echo "Depends: $(PKG_DEPEND)" >> $(IDIR_PPP)/CONTROL/control - $(RSTRIP) $(IDIR_PPP) - $(IPKG_BUILD) $(IDIR_PPP) $(PACKAGE_DIR) +define Package/ppp/install + install -d -m0755 $(1)/etc/ppp + install -m0600 ./files/etc/ppp/chap-secrets $(1)/etc/ppp/ + install -m0644 ./files/etc/ppp/filter $(1)/etc/ppp/ + install -m0755 ./files/etc/ppp/ip-up $(1)/etc/ppp/ + install -d -m0755 $(1)/etc/ppp/ip-up.d + install -m0755 ./files/etc/ppp/ip-down $(1)/etc/ppp/ + install -d -m0755 $(1)/etc/ppp/ip-down.d + install -m0644 ./files/etc/ppp/options $(1)/etc/ppp/ + ln -sf /tmp/resolv.conf $(1)/etc/ppp/resolv.conf + install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/ +endef -$(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa: - install -d -m0755 $(IDIR_PPP_MOD_PPPOA)/sbin - install -m0755 ./files/ifup.pppoa $(IDIR_PPP_MOD_PPPOA)/sbin/ +define Package/ppp-mod-pppoa/install + install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) + install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \ + $(1)/usr/lib/pppd/$(PKG_VERSION)/ + install -d -m0755 $(1)/sbin + install -m0755 ./files/ifup.pppoa $(1)/sbin/ +endef -$(IPKG_PPP_MOD_PPPOA): $(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa +define Package/ppp-mod-pppoe/install + install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) + install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \ + $(1)/usr/lib/pppd/$(PKG_VERSION)/ + install -d -m0755 $(1)/sbin + install -m0755 ./files/ifup.pppoe $(1)/sbin/ +endef -$(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe: - install -d -m0755 $(IDIR_PPP_MOD_PPPOE)/sbin - install -m0755 ./files/ifup.pppoe $(IDIR_PPP_MOD_PPPOE)/sbin/ - -$(IPKG_PPP_MOD_PPPOE): $(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe - -$(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf: - install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp - install -m644 ./files/etc/ppp/radius.conf $(IDIR_PPP_MOD_RADIUS)/etc/ppp/ - install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius +define Package/ppp-mod-radius/install + install -d -m0755 $(1)/etc/ppp + install -m644 ./files/etc/ppp/radius.conf $(1)/etc/ppp/ + install -d -m0755 $(1)/etc/ppp/radius install -m644 ./files/etc/ppp/radius/dictionary* \ - $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/ + $(1)/etc/ppp/radius/ install -m600 ./files/etc/ppp/radius/servers \ - $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/ + $(1)/etc/ppp/radius/ + install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) + install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \ + $(1)/usr/lib/pppd/$(PKG_VERSION)/ +endef -$(IPKG_PPP_MOD_RADIUS): $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf +define Package/chat/install + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/ +endef -$(IPKG_CHAT): - install -d -m0755 $(IDIR_CHAT)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/ - $(RSTRIP) $(IDIR_CHAT) - $(IPKG_BUILD) $(IDIR_CHAT) $(PACKAGE_DIR) +define Package/pppdump/install + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/ +endef -$(IPKG_PPPDUMP): - install -d -m0755 $(IDIR_PPPDUMP)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/ - $(RSTRIP) $(IDIR_PPPDUMP) - $(IPKG_BUILD) $(IDIR_PPPDUMP) $(PACKAGE_DIR) - -$(IPKG_PPPSTATS): $(IPKG_PPP) - install -d -m0755 $(IDIR_PPPSTATS)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/ - $(RSTRIP) $(IDIR_PPPSTATS) - $(IPKG_BUILD) $(IDIR_PPPSTATS) $(PACKAGE_DIR) +define Package/pppstats/install + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/ + $(RSTRIP) $(1) +endef +$(eval $(call BuildPackage,ppp)) +$(eval $(call BuildPackage,ppp-mod-pppoa)) +$(eval $(call BuildPackage,ppp-mod-pppoe)) +$(eval $(call BuildPackage,ppp-mod-radius)) +$(eval $(call BuildPackage,chat)) +$(eval $(call BuildPackage,pppdump)) +$(eval $(call BuildPackage,pppstats)) diff --git a/openwrt/package/ppp/files/etc/ppp/ip-down b/openwrt/package/ppp/files/etc/ppp/ip-down index 044759fbf1d..334bcb885af 100755 --- a/openwrt/package/ppp/files/etc/ppp/ip-down +++ b/openwrt/package/ppp/files/etc/ppp/ip-down @@ -1,2 +1,9 @@ #!/bin/sh [ -z "$6" ] || env -i ACTION="ifdown" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface" + +[ -d /etc/ppp/ip-down.d ] && { + for SCRIPT in /etc/ppp/ip-down.d/* + do + [ -x "$SCRIPT" ] && "$SCRIPT" $@ + done +} diff --git a/openwrt/package/ppp/files/etc/ppp/ip-up b/openwrt/package/ppp/files/etc/ppp/ip-up index c67a3d03c5d..34b4b50e15a 100755 --- a/openwrt/package/ppp/files/etc/ppp/ip-up +++ b/openwrt/package/ppp/files/etc/ppp/ip-up @@ -1,2 +1,9 @@ #!/bin/sh [ -z "$6" ] || env -i ACTION="ifup" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface" + +[ -d /etc/ppp/ip-up.d ] && { + for SCRIPT in /etc/ppp/ip-up.d/* + do + [ -x "$SCRIPT" ] && "$SCRIPT" $@ + done +} diff --git a/openwrt/package/ppp/files/ifup.pppoa b/openwrt/package/ppp/files/ifup.pppoa index 277266c0f5f..f78a162ce51 100644 --- a/openwrt/package/ppp/files/ifup.pppoa +++ b/openwrt/package/ppp/files/ifup.pppoa @@ -9,6 +9,8 @@ eval "proto=\"\${${type}_proto}\"" exit } +mkdir -p /var/lock + for module in slhc ppp_generic pppoatm; do /sbin/insmod $module 2>&- >&- done diff --git a/openwrt/package/ppp/files/ifup.pppoe b/openwrt/package/ppp/files/ifup.pppoe index 0f3c14ed0d7..c7019fc3981 100644 --- a/openwrt/package/ppp/files/ifup.pppoe +++ b/openwrt/package/ppp/files/ifup.pppoe @@ -9,6 +9,8 @@ eval "proto=\"\${${type}_proto}\"" exit } +mkdir -p /var/lock + for module in slhc ppp_generic pppox pppoe; do /sbin/insmod $module 2>&- >&- done diff --git a/openwrt/package/ppp/ipkg/chat.control b/openwrt/package/ppp/ipkg/chat.control deleted file mode 100644 index 43dbdb1e1bc..00000000000 --- a/openwrt/package/ppp/ipkg/chat.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: chat -Priority: optional -Section: net -Description: Utility for establishing a connection with the ISP's PPP server (e.g. via Modem) -Depends: ppp diff --git a/openwrt/package/ppp/ipkg/ppp-mod-pppoa.control b/openwrt/package/ppp/ipkg/ppp-mod-pppoa.control deleted file mode 100644 index ce2d5d45fd5..00000000000 --- a/openwrt/package/ppp/ipkg/ppp-mod-pppoa.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ppp-mod-pppoa -Priority: optional -Section: net -Description: a PPPoA (PPP over ATM) plugin for PPP -Depends: ppp, kmod-pppoa diff --git a/openwrt/package/ppp/ipkg/ppp-mod-pppoe.control b/openwrt/package/ppp/ipkg/ppp-mod-pppoe.control deleted file mode 100644 index 7cf49636b04..00000000000 --- a/openwrt/package/ppp/ipkg/ppp-mod-pppoe.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ppp-mod-pppoe -Priority: optional -Section: net -Description: a PPPoE (PPP over Ethernet) plugin for PPP -Depends: ppp, kmod-pppoe diff --git a/openwrt/package/ppp/ipkg/ppp-mod-radius.conffiles b/openwrt/package/ppp/ipkg/ppp-mod-radius.conffiles deleted file mode 100644 index 70fe146d223..00000000000 --- a/openwrt/package/ppp/ipkg/ppp-mod-radius.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/ppp/radius.conf -/etc/ppp/radius/servers diff --git a/openwrt/package/ppp/ipkg/ppp-mod-radius.control b/openwrt/package/ppp/ipkg/ppp-mod-radius.control deleted file mode 100644 index 0a858da30f8..00000000000 --- a/openwrt/package/ppp/ipkg/ppp-mod-radius.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: ppp-mod-radius -Priority: optional -Section: net -Description: a RADIUS plugin for PPP -Depends: ppp diff --git a/openwrt/package/ppp/ipkg/ppp.conffiles b/openwrt/package/ppp/ipkg/ppp.conffiles deleted file mode 100644 index 8ad17eb436e..00000000000 --- a/openwrt/package/ppp/ipkg/ppp.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/ppp/chap-secrets -/etc/ppp/options diff --git a/openwrt/package/ppp/ipkg/ppp.control b/openwrt/package/ppp/ipkg/ppp.control deleted file mode 100644 index 38e53319087..00000000000 --- a/openwrt/package/ppp/ipkg/ppp.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: ppp -Priority: optional -Section: net -Description: a PPP (Point-to-Point Protocol) daemon (with MPPE/MPPC support) diff --git a/openwrt/package/ppp/ipkg/pppdump.control b/openwrt/package/ppp/ipkg/pppdump.control deleted file mode 100644 index 4a89e152eab..00000000000 --- a/openwrt/package/ppp/ipkg/pppdump.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pppdump -Priority: optional -Section: net -Description: an utility to read PPP record file -Depends: ppp diff --git a/openwrt/package/ppp/ipkg/pppstats.control b/openwrt/package/ppp/ipkg/pppstats.control deleted file mode 100644 index 8780b2f8750..00000000000 --- a/openwrt/package/ppp/ipkg/pppstats.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pppstats -Priority: optional -Section: net -Description: an utility to report PPP statistics -Depends: ppp From 2d41202df521fa00723089d256737245c8c414d1 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 24 May 2006 09:50:24 +0000 Subject: [PATCH 075/757] sync pptp with trunk, remove Config.in and ipkg not needed anymore. SVN-Revision: 3828 --- openwrt/package/pptp/Config.in | 11 ----------- openwrt/package/pptp/files/ifup.pptp | 2 +- openwrt/package/pptp/ipkg/pptp.conffiles | 1 - openwrt/package/pptp/ipkg/pptp.control | 5 ----- 4 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 openwrt/package/pptp/Config.in delete mode 100644 openwrt/package/pptp/ipkg/pptp.conffiles delete mode 100644 openwrt/package/pptp/ipkg/pptp.control diff --git a/openwrt/package/pptp/Config.in b/openwrt/package/pptp/Config.in deleted file mode 100644 index 425473a058b..00000000000 --- a/openwrt/package/pptp/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config PACKAGE_PPTP - prompt "pptp.............................. PPTP (Point-to-Point Tunneling Protocol) client" - tristate - default m if DEVEL - select PACKAGE_KMOD_GRE - select PACKAGE_PPP - help - A Point-to-Point Tunneling Protocol Client - - http://pptpclient.sourceforge.net/ - diff --git a/openwrt/package/pptp/files/ifup.pptp b/openwrt/package/pptp/files/ifup.pptp index a9bc579b569..f401a36b2fa 100644 --- a/openwrt/package/pptp/files/ifup.pptp +++ b/openwrt/package/pptp/files/ifup.pptp @@ -9,7 +9,7 @@ eval "proto=\"\${${type}_proto}\"" exit } -[ -d "/var/lock" ] || mkdir -p /var/lock || exit 1 +mkdir -p /var/lock for module in slhc ppp_generic ppp_async ip_gre; do /sbin/insmod $module 2>&- >&- diff --git a/openwrt/package/pptp/ipkg/pptp.conffiles b/openwrt/package/pptp/ipkg/pptp.conffiles deleted file mode 100644 index 136db31f1c5..00000000000 --- a/openwrt/package/pptp/ipkg/pptp.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ppp/options.pptp \ No newline at end of file diff --git a/openwrt/package/pptp/ipkg/pptp.control b/openwrt/package/pptp/ipkg/pptp.control deleted file mode 100644 index e582c6221ad..00000000000 --- a/openwrt/package/pptp/ipkg/pptp.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: pptp -Priority: optional -Section: net -Description: a Point-to-Point Tunneling Protocol (PPTP) client -Depends: ppp, kmod-gre From 139852b0f80aa24acf3fa9b8044478ece077c25c Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 28 May 2006 22:58:07 +0000 Subject: [PATCH 076/757] add dependencies from the NEEDS variable to ipkg/control SVN-Revision: 3831 --- openwrt/package/rules.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 4999974900f..9b551728b3a 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -134,7 +134,8 @@ define BuildPackage mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control - echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control + #FIXME: there should be a better way to do it + D="$$(IDEPEND_$(1))"; D="$$$${D}$$$${D:+, }$$(INEED_$(1))"; echo "Depends: $$$${D}" >> $$(IDIR_$(1))/CONTROL/control echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control From 9fa193cbcfa0b6b15ec478c3e29dde26b6f5502a Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 29 May 2006 01:27:54 +0000 Subject: [PATCH 077/757] cosmetic change to standardize layout. SVN-Revision: 3832 --- openwrt/package/ipset/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index 3b65a7d37df..8cfdee94e6f 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ipset PKG_VERSION:=2.2.3 PKG_RELEASE:=1 -PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 PKG_BUILD_DIR:=$(BUILD_DIR)/ipset-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-20050914.tar.bz2 PKG_SOURCE_URL:=http://ipset.netfilter.org +PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 PKG_CAT:=bzcat include $(TOPDIR)/package/rules.mk From 6f9b5a61b996e3a9b4077ed70c7d788bfef601cc Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 29 May 2006 01:29:46 +0000 Subject: [PATCH 078/757] use InstallDev/UninstallDev. SVN-Revision: 3833 --- openwrt/package/zlib/Makefile | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index 56c0381f562..da9e6f46146 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -53,18 +53,22 @@ define Package/zlib/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/ endef -$(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built +define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/zconf.h \ + $(PKG_INSTALL_DIR)/usr/include/zlib.h \ + $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(STAGING_DIR)/usr/lib - touch $(STAGING_DIR)/usr/lib/libz.so + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.a \ + $(PKG_INSTALL_DIR)/usr/lib/libz.so* \ + $(STAGING_DIR)/usr/lib/ +endef -install-dev: $(STAGING_DIR)/usr/lib/libz.so - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/zconf.h - rm -rf $(STAGING_DIR)/usr/include/zlib.h - rm -rf $(STAGING_DIR)/usr/lib/libz.* +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/zconf.h \ + $(STAGING_DIR)/usr/include/zlib.h \ + $(STAGING_DIR)/usr/lib/libz.a \ + $(STAGING_DIR)/usr/lib/libz.so* +endef $(eval $(call BuildPackage,zlib)) From 23bb66c974151653c6ac5c5519bea488c34ca518 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 29 May 2006 01:37:15 +0000 Subject: [PATCH 079/757] fix conversion to buildroot-ng. SVN-Revision: 3834 --- openwrt/package/pcmcia-cs/Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/openwrt/package/pcmcia-cs/Makefile b/openwrt/package/pcmcia-cs/Makefile index c89ce2913f5..76e63d31578 100644 --- a/openwrt/package/pcmcia-cs/Makefile +++ b/openwrt/package/pcmcia-cs/Makefile @@ -12,6 +12,8 @@ PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_MD5SUM:=0d6d65be8896eff081aee996049afaa5 PKG_CAT:=zcat +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + include $(TOPDIR)/package/rules.mk define Package/pcmcia-cs @@ -42,12 +44,20 @@ define Build/Configure ) endef +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + CFLAGS="$(TARGET_CFLAGS)" \ + all install +endef + define Package/pcmcia-cs/install install -m0755 -d $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/pcmcia $(1)/etc/ install -m0755 -d $(1)/usr/sbin - install -m0644 $(PKG_INSTALL_DIR)/etc/pcmcia $(1)/etc/ - install -m0755 $(PKG_INSTALL_DIR)/sbin/cardctl $(1)/usr/sbin/ - install -m0755 $(PKG_INSTALL_DIR)/sbin/cardmgr $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/cardctl $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/cardmgr $(1)/usr/sbin/ endef $(eval $(call BuildPackage,pcmcia-cs)) From 72ea2d0ed3a299acbf1cef45006635300a6aa86e Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 29 May 2006 01:39:50 +0000 Subject: [PATCH 080/757] fix conversion to buildroot-ng. SVN-Revision: 3835 --- openwrt/package/udev/Makefile | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/openwrt/package/udev/Makefile b/openwrt/package/udev/Makefile index 620aa1aedd2..c7e5f44083f 100644 --- a/openwrt/package/udev/Makefile +++ b/openwrt/package/udev/Makefile @@ -5,7 +5,6 @@ include $(TOPDIR)/rules.mk PKG_NAME:=udev PKG_VERSION:=077 PKG_RELEASE:=1 -PKG_MD5SUM:=61ec646daf7795e9777e8f33975408fe PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -15,8 +14,11 @@ PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \ http://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \ ftp://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/ \ http://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/ +PKG_MD5SUM:=61ec646daf7795e9777e8f33975408fe PKG_CAT:=bzcat +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + include $(TOPDIR)/package/rules.mk define Package/udev @@ -30,20 +32,32 @@ the /dev directory, or it renames network interfaces. \\\ URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html endef +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + CROSS="$(TARGET_CROSS)" \ + STRIP="/bin/true" \ + OPTFLAGS="$(TARGET_CFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + INSTALL="install -c" \ + all install +endef + define Package/udev/install install -d -m0775 $(1)/etc/udev + $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/ install -d -m0775 $(1)/lib/udev install -d -m0775 $(1)/sbin/ - install -d -m0775 $(1)/usr/bin/ - install -d -m0775 $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/ $(CP) $(PKG_INSTALL_DIR)/sbin/udev $(1)/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/udevsend $(1)/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/udevstart $(1)/sbin/ + install -d -m0775 $(1)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/ + install -d -m0775 $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(1)/usr/sbin/ endef From 9503b04c34b07750df3c2fe16427b4807949417e Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 29 May 2006 01:41:59 +0000 Subject: [PATCH 081/757] cosmetic change to standardize layout. SVN-Revision: 3836 --- openwrt/package/iptables/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index fc57f9c701f..ae2adcfa083 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -5,16 +5,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iptables PKG_VERSION:=1.3.5 PKG_RELEASE:=1 -PKG_MD5SUM:=00fb916fa8040ca992a5ace56d905ea5 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \ ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \ ftp://ftp.de.netfilter.org/pub/netfilter/iptables/ \ ftp://ftp.no.netfilter.org/pub/netfilter/iptables/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=00fb916fa8040ca992a5ace56d905ea5 PKG_CAT:=bzcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_MENU:=IPv4 / IPv6 firewall administration From 82d39bdf24b15f6ce6b543c46881d262a13b76d7 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 13:17:25 +0000 Subject: [PATCH 082/757] don't enable ebtables by default SVN-Revision: 3837 --- openwrt/package/ebtables/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index 4d40ee320bf..04bb99d1576 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -17,7 +17,6 @@ include $(TOPDIR)/package/rules.mk define Package/ebtables SECTION:=base CATEGORY:=Network -DEFAULT:=y TITLE:=Ethernet bridge firewall administration utility DESCRIPTION:=Ethernet Bridge Firewalling (ebtables) URL:=http://ebtables.sourceforge.net/ From b978be63dfdbf449e1bc1efee3d23573837cf7dd Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 14:11:24 +0000 Subject: [PATCH 083/757] add {package,target,toolchain}/* targets to toplevel makefile SVN-Revision: 3838 --- openwrt/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openwrt/Makefile b/openwrt/Makefile index 9b341f1241a..96dd2e0e0d3 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -70,5 +70,14 @@ config: scripts/config/conf config-clean: $(MAKE) -C scripts/config clean +package/%: + $(MAKE) -C toolchain $(patsubst package/%,%,$@) + +target/%: + $(MAKE) -C toolchain $(patsubst target/%,%,$@) + +toolchain/%: + $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) + .PHONY: FORCE FORCE: From bdae688d5cd365c80a85d20ca5151681b6b52636 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 16:53:36 +0000 Subject: [PATCH 084/757] fix toolchain build, remove some old gcc junk SVN-Revision: 3839 --- openwrt/rules.mk | 27 ++++-------------------- openwrt/toolchain/gcc/Makefile | 38 +++------------------------------- 2 files changed, 7 insertions(+), 58 deletions(-) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 0e7dd2e044c..a613beaf40b 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -29,28 +29,9 @@ MAKEFLAGS=-j$(CONFIG_JLEVEL) V=$(V) $(EXTRA_MAKEFLAGS) # Strip off the annoying quoting ARCH:=$(strip $(subst ",, $(CONFIG_ARCH))) WGET:=$(strip $(subst ",, $(CONFIG_WGET))) -GCC_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION))) -GCC_USE_SJLJ_EXCEPTIONS:=$(strip $(subst ",, $(CONFIG_GCC_USE_SJLJ_EXCEPTIONS))) TARGET_OPTIMIZATION:=$(strip $(subst ",, $(CONFIG_TARGET_OPTIMIZATION))) #"))"))"))"))")) # for vim's broken syntax highlighting :) - -ifeq ($(CONFIG_SOFT_FLOAT),y) -# gcc 3.4.x soft float configuration is different than previous versions. -ifeq ($(findstring 3.4.,$(GCC_VERSION)),3.4.) -SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft -else -SOFT_FLOAT_CONFIG_OPTION:=--without-float -endif -TARGET_SOFT_FLOAT:=-msoft-float -ARCH_FPU_SUFFIX:=_nofpu -else -SOFT_FLOAT_CONFIG_OPTION:= -TARGET_SOFT_FLOAT:= -ARCH_FPU_SUFFIX:= -endif - - ifeq ($(CONFIG_TAR_VERBOSITY),y) TAR_OPTIONS=-xvf else @@ -66,17 +47,17 @@ OPTIMIZE_FOR_CPU=$(ARCH) HOSTCC:=gcc BASE_DIR:=$(TOPDIR) DL_DIR:=$(BASE_DIR)/dl -BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX) -STAGING_DIR:=$(BASE_DIR)/staging_dir_$(ARCH)$(ARCH_FPU_SUFFIX) +BUILD_DIR:=$(BASE_DIR)/build_$(ARCH) +STAGING_DIR:=$(BASE_DIR)/staging_dir_$(ARCH) SCRIPT_DIR:=$(BASE_DIR)/scripts BIN_DIR:=$(BASE_DIR)/bin STAMP_DIR:=$(BUILD_DIR)/stamp PACKAGE_DIR:=$(BIN_DIR)/packages STAMP_DIR:=$(BUILD_DIR)/stamp TARGET_DIR:=$(BUILD_DIR)/root -TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX) +TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH) TARGET_PATH=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin -IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH)$(ARCH_FPU_SUFFIX) +IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux KERNEL_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- diff --git a/openwrt/toolchain/gcc/Makefile b/openwrt/toolchain/gcc/Makefile index 7c037edddc0..1ce00101b5b 100644 --- a/openwrt/toolchain/gcc/Makefile +++ b/openwrt/toolchain/gcc/Makefile @@ -20,7 +20,7 @@ include $(TOPDIR)/rules.mk -GCC_VERSION:=$(strip $(CONFIG_GCC_VERSION)) +GCC_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION)))#")) #GCC_SITE:=ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(GCC_VERSION) GCC_SITE:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(GCC_VERSION) \ @@ -29,7 +29,6 @@ GCC_SITE:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(GCC_VERSION) GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2 GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION) GCC_CAT:=bzcat -GCC_STRIP_HOST_BINARIES:=true ############################################################# # @@ -71,14 +70,6 @@ $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked # We can dispense with the custom spec files, as well as libfloat for the arm case. # However, we still need a patch for arm. There's a similar patch for gcc 3.3.x # which needs to be integrated so we can kill of libfloat for good. -ifeq ($(CONFIG_SOFT_FLOAT),y) -ifeq ("$(strip $(ARCH))","arm") - $(SCRIPT_DIR)/patch-kernel.sh $(GCC_DIR) ./$(GCC_VERSION) arm-softfloat.patch.conditional -endif -ifeq ("$(strip $(ARCH))","armeb") - $(SCRIPT_DIR)/patch-kernel.sh $(GCC_DIR) ./$(GCC_VERSION) arm-softfloat.patch.conditional -endif -endif $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(GCC_DIR)/gcc/version.c $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(GCC_DIR)/gcc/version.c touch $(GCC_DIR)/.patched @@ -103,9 +94,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched --with-gnu-ld \ $(DISABLE_NLS) \ $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \ - $(EXTRA_GCC_CONFIG_OPTIONS)); + ); touch $(GCC_BUILD_DIR1)/.configured $(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured @@ -149,10 +138,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/lib/libc.a --with-gnu-ld \ $(DISABLE_NLS) \ $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \ - $(GCC_USE_SJLJ_EXCEPTIONS) \ - $(EXTRA_GCC_CONFIG_OPTIONS)); + ); touch $(GCC_BUILD_DIR2)/.configured $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured @@ -172,24 +158,6 @@ gcc-install: $(GCC_BUILD_DIR2)/.compiled $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ done; \ ); - # - # Now for the ugly 3.3.x soft float hack... - # -ifeq ($(CONFIG_SOFT_FLOAT),y) -ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) - # Make sure we have a soft float specs file for this arch - if [ ! -f ./$(GCC_VERSION)/specs-$(ARCH)-soft-float ] ; then \ - echo soft float configured but no specs file for this arch ; \ - /bin/false ; \ - fi; - # Replace specs file with one that defaults to soft float mode. - if [ ! -f $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \ - echo staging dir specs file is missing ; \ - /bin/false ; \ - fi; - $(CP) ./$(GCC_VERSION)/specs-$(ARCH)-soft-float $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs -endif -endif # We do another ugly hack here because the standard behaviour is # to include a reference to libgcc.so.1 in all binaries. For flash space # saving, we change the specs file to link in a static libgcc here. From 3ace7fc64f7f7718c13767b4d48cbe8517025305 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 17:09:06 +0000 Subject: [PATCH 085/757] fix package/ and target/ targets SVN-Revision: 3840 --- openwrt/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 96dd2e0e0d3..8a2e6bbb8e2 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -71,10 +71,10 @@ config-clean: $(MAKE) -C scripts/config clean package/%: - $(MAKE) -C toolchain $(patsubst package/%,%,$@) + $(MAKE) -C package $(patsubst package/%,%,$@) target/%: - $(MAKE) -C toolchain $(patsubst target/%,%,$@) + $(MAKE) -C target $(patsubst target/%,%,$@) toolchain/%: $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) From 10152c5c0752e6e514999056142dacbc8de71d95 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 17:09:21 +0000 Subject: [PATCH 086/757] add proper build depends SVN-Revision: 3841 --- openwrt/package/Makefile | 2 +- openwrt/package/ppp/Makefile | 2 +- openwrt/package/rules.mk | 11 +++-------- openwrt/scripts/gen_deps.pl | 4 ++-- openwrt/scripts/gen_menuconfig.pl | 7 ------- 5 files changed, 7 insertions(+), 19 deletions(-) diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index af746715bac..0dc2670174f 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -20,7 +20,7 @@ $(STAMP_DIR) $(TARGET_DIR): $(MAKE) -C $(patsubst %-clean,%,$@) clean -.pkgdeps: $(TOPDIR)/.pkginfo FORCE +.pkgdeps: $(TOPDIR)/.pkginfo @$(TOPDIR)/scripts/gen_deps.pl < $< > $@ || rm -f $@ all: compile diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 1542a8b5d7a..0139eb051f7 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -5,6 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ppp PKG_VERSION:=2.4.3 PKG_RELEASE:=7 +PKG_BUILDDEP:=libpcap PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -19,7 +20,6 @@ include $(TOPDIR)/package/rules.mk define Package/ppp SECTION:=net CATEGORY:=Network - NEEDS:=libpcap MENU:=1 DEFAULT:=y TITLE:=PPP daemon diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 9b551728b3a..55066610d01 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -49,7 +49,6 @@ define Package/Default SECTION:=opt CATEGORY:=Extra packages DEPENDS:= - NEEDS:= MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org> SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) @@ -92,7 +91,6 @@ define BuildPackage endif IDEPEND_$(1):=$$(strip $$(DEPENDS)) - INEED_$(1):=$$(strip $$(NEEDS)) DUMPINFO += \ echo "Package: $(1)"; @@ -110,7 +108,7 @@ define BuildPackage DUMPINFO += \ echo "Version: $(VERSION)"; \ echo "Depends: $$(IDEPEND_$(1))"; \ - echo "Needs: $$(INEED_$(1))"; \ + echo "Build-Depends: $(PKG_BUILDDEP)"; \ echo "Category: $(CATEGORY)"; \ echo "Title: $(TITLE)"; \ echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; @@ -134,8 +132,7 @@ define BuildPackage mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control - #FIXME: there should be a better way to do it - D="$$(IDEPEND_$(1))"; D="$$$${D}$$$${D:+, }$$(INEED_$(1))"; echo "Depends: $$$${D}" >> $$(IDIR_$(1))/CONTROL/control + echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control @@ -156,8 +153,6 @@ define BuildPackage $$(INFO_$(1)): $$(IPKG_$(1)) $(IPKG) install $$(IPKG_$(1)) - compile-targets: $(PKG_BUILD_DIR)/.dev-installed - $(1)-clean: rm -f $(PACKAGE_DIR)/$(1)_* @@ -259,7 +254,7 @@ else prepare: $(PKG_BUILD_DIR)/.prepared configure: $(PKG_BUILD_DIR)/.configured - compile-targets: + compile-targets: $(PKG_BUILD_DIR)/.dev-installed compile: compile-targets install-targets: diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index ef49fa3f418..40153bde3d1 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -18,8 +18,8 @@ while ($line = <>) { defined $pkg{$name} or $pkg{$name} = {}; $pkg{$name}->{src} = $src; }; - $line =~ /^Depends: \s*(.+)\s*$/ and do { - my @dep = split /,\s*/, $1; + $line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do { + my @dep = split /,\s*/, $2; $pkg{$name}->{depends} = \@dep; }; } diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index e304f188139..e282ee3ed2d 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -28,9 +28,6 @@ sub print_category($) { foreach my $depend (@{$pkg->{depends}}) { print "\t\tdepends PACKAGE_$depend\n"; } - foreach my $need (@{$pkg->{needs}}) { - print "\t\tselect PACKAGE_$need\n"; - } print "\t\thelp\n"; print $pkg->{description}; print "\n"; @@ -66,10 +63,6 @@ while ($line = <>) { my @dep = split /,\s*/, $1; $pkg->{depends} = \@dep; }; - $line =~ /^Needs: \s*(.+)\s*$/ and do { - my @need = split /,\s*/, $1; - $pkg->{needs} = \@need; - }; $line =~ /^Category: \s*(.+)\s*$/ and do { $pkg->{category} = $1; defined $category{$1} or $category{$1} = {}; From 5b05f4a5ee5fa1dd3246350b6672d05a1aaa7f4d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 18:55:52 +0000 Subject: [PATCH 087/757] improve dependency handling, fix some package makefile bugs SVN-Revision: 3843 --- openwrt/Makefile | 4 ++-- openwrt/package/Makefile | 4 ++-- openwrt/package/dropbear/Makefile | 3 +-- openwrt/package/iproute2/Makefile | 10 ---------- openwrt/package/ipsec-tools/Makefile | 2 +- openwrt/package/ipset/Makefile | 3 +-- openwrt/package/nvram/Makefile | 3 +-- openwrt/package/pcmcia-cs/Makefile | 3 +-- openwrt/package/ppp/Makefile | 4 ++-- openwrt/package/robocfg/Makefile | 2 -- openwrt/package/rules.mk | 9 ++++++++- openwrt/package/udev/Makefile | 3 +-- openwrt/package/wificonf/Makefile | 2 +- openwrt/package/wireless-tools/Makefile | 8 ++++++-- openwrt/package/zlib/Makefile | 1 - openwrt/scripts/gen_deps.pl | 19 ++++++++++++++++--- openwrt/scripts/gen_menuconfig.pl | 9 +++++++-- 17 files changed, 50 insertions(+), 39 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 8a2e6bbb8e2..f93b008033f 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -70,10 +70,10 @@ config: scripts/config/conf config-clean: $(MAKE) -C scripts/config clean -package/%: +package/%: .pkginfo $(MAKE) -C package $(patsubst package/%,%,$@) -target/%: +target/%: .pkginfo $(MAKE) -C target $(patsubst target/%,%,$@) toolchain/%: diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 0dc2670174f..adeb238d437 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -1,7 +1,7 @@ # Main makefile for the packages include $(TOPDIR)/rules.mk include $(TOPDIR)/.config -include .pkgdeps +include $(TOPDIR)/.pkgdeps COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) @@ -20,7 +20,7 @@ $(STAMP_DIR) $(TARGET_DIR): $(MAKE) -C $(patsubst %-clean,%,$@) clean -.pkgdeps: $(TOPDIR)/.pkginfo +$(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo @$(TOPDIR)/scripts/gen_deps.pl < $< > $@ || rm -f $@ all: compile diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index 4a732ee831f..28cdd15f7cf 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -25,10 +25,9 @@ endef define Package/dropbearconvert $(call Package/dropbear) -DEFAULT:=m TITLE:=Utility for converting SSH keys DESCRIPTION:=Utility for converting SSH keys -DEPENDS:=zlib +DEPENDS:=+zlib endef define Build/Configure diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index c670ee5dac3..11336948f47 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -14,25 +14,15 @@ PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk -# define Package/iproute2 -# SECTION:=base -# CATEGORY:=Network -# DEFAULT:=n -# MENU:=1 -# TITLE:=A collection of utilites for controlling TCP/IP networking and Traffic Control -# endef - define Package/ip SECTION:=base CATEGORY:=Network -DEFAULT:=n DEPENDS:=iproute2 TITLE:=A routing control utility endef define Package/tc $(call Package/ip) -# DEPENDS:=kmod-sched TITLE:=A traffic control utility endef diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index e85f09d89c9..4b6bfe09ecb 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -19,7 +19,7 @@ include $(TOPDIR)/package/rules.mk define Package/ipsec-tools SECTION:=base CATEGORY:=Network -DEFAULT:=y +DEPENDS:=@LINUX_2_6 TITLE:=IPsec management tools DESCRIPTION:=IPsec management tools URL:=http://ipsec-tools.sourceforge.net/ diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index 8cfdee94e6f..7358f03a7c5 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -17,8 +17,7 @@ include $(TOPDIR)/package/rules.mk define Package/ipset SECTION:=base CATEGORY:=Network -DEFAULT:=y -DEPENDS:=kmod-iptables-extra +DEPENDS:=+kmod-iptables-extra TITLE:=Netfilter ip sets administration utility DESCRIPTION:=Netfilter ip sets administration utility URL:=http://ipset.netfilter.org/ diff --git a/openwrt/package/nvram/Makefile b/openwrt/package/nvram/Makefile index 3b9f82dbe05..9cc6b9997ab 100644 --- a/openwrt/package/nvram/Makefile +++ b/openwrt/package/nvram/Makefile @@ -11,8 +11,7 @@ include $(TOPDIR)/package/rules.mk define Package/nvram SECTION:=base -# CATEGORY:=FIXME -DEFAULT:=n +DEPENDS:=@LINUX_2_4_BRCM TITLE:=Broadcom config utility DESCRIPTION:=control utility for broadcom's 'nvram' config area endef diff --git a/openwrt/package/pcmcia-cs/Makefile b/openwrt/package/pcmcia-cs/Makefile index 76e63d31578..a389fd63e19 100644 --- a/openwrt/package/pcmcia-cs/Makefile +++ b/openwrt/package/pcmcia-cs/Makefile @@ -18,8 +18,7 @@ include $(TOPDIR)/package/rules.mk define Package/pcmcia-cs SECTION:=base -# CATEGORY:=FIXME -DEFAULT:=n +DEPENDS:=@PCMCIA_SUPPORT TITLE:=PCMCIA/Cardbus management utilities DESCRIPTION:=PCMCIA/Cardbus management utilities URL:=http://pcmcia-cs.sourceforge.net/ diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 0139eb051f7..2f014003089 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ppp PKG_VERSION:=2.4.3 PKG_RELEASE:=7 -PKG_BUILDDEP:=libpcap +PKG_BUILDDEP:=libpcap linux-atm PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -30,7 +30,7 @@ endef define Package/ppp-mod-pppoa SECTION:=net CATEGORY:=Network - DEPENDS:=ppp + DEPENDS:=ppp +linux-atm TITLE:=PPPoA plugin DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp endef diff --git a/openwrt/package/robocfg/Makefile b/openwrt/package/robocfg/Makefile index 8f89e753878..81cf99ac237 100644 --- a/openwrt/package/robocfg/Makefile +++ b/openwrt/package/robocfg/Makefile @@ -12,8 +12,6 @@ include $(TOPDIR)/package/rules.mk define Package/robocfg SECTION:=base -# CATEGORY:=FIXME -DEFAULT:=n TITLE:=BCM5325E/536x switch configuration utility DESCRIPTION:=Broadcom BCM5325E/536x switch configuration utility endef diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 55066610d01..d436df8dcee 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -132,7 +132,14 @@ define BuildPackage mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control - echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control + ( \ + DEPENDS=; \ + for depend in $$(IDEPEND_$(1)); do \ + [ "$$$${depend%%%%%%%%[A-Za-z]*}" = "@" ] && continue; \ + DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \ + done; \ + echo "Depends: $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \ + ) echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control diff --git a/openwrt/package/udev/Makefile b/openwrt/package/udev/Makefile index c7e5f44083f..54e06dcff61 100644 --- a/openwrt/package/udev/Makefile +++ b/openwrt/package/udev/Makefile @@ -23,8 +23,7 @@ include $(TOPDIR)/package/rules.mk define Package/udev SECTION:=base -# CATEGORY:=FIXME -DEFAULT:=n +DEPENDS:=@LINUX_2_6 TITLE:=Dynamic device management subsystem DESCRIPTION:=udev provides a dynamic device directory containing only the files for \\\ actually present devices. It creates or removes device node files in \\\ diff --git a/openwrt/package/wificonf/Makefile b/openwrt/package/wificonf/Makefile index 5fbaf052312..dc61267a73e 100644 --- a/openwrt/package/wificonf/Makefile +++ b/openwrt/package/wificonf/Makefile @@ -12,7 +12,7 @@ include $(TOPDIR)/package/rules.mk define Package/wificonf SECTION:=base CATEGORY:=Network -DEFAULT:=y +DEPENDS:=nvram +wireless-tools TITLE:=replacement utility for wlconf DESCRIPTION:=Replacement utility for wlconf endef diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index 39a4ee6b66c..17b59f841f2 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -42,12 +42,16 @@ define Package/wireless-tools/install install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(1)/usr/sbin/ endef -install-dev: $(PKG_BUILD_DIR)/.built +define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/{lib,include} $(CP) $(PKG_BUILD_DIR)/libiw.so* $(STAGING_DIR)/usr/lib/ ln -sf libiw.so.28 $(STAGING_DIR)/usr/lib/libiw.so $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(STAGING_DIR)/usr/include/ +endef -uninstall-dev: +define Build/UninstallDev rm -f $(STAGING_DIR)/usr/lib/libiw.* rm -f $(STAGING_DIR)/usr/include/{iwlib,wireless}.h +endef + +$(eval $(call BuildPackage,wireless-tools)) diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index da9e6f46146..33cbcceb276 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -20,7 +20,6 @@ include $(TOPDIR)/package/rules.mk define Package/zlib SECTION:=base CATEGORY:=Libraries -DEFAULT:=n TITLE:=Library implementing the deflate compression method DESCRIPTION:=A library implementing the 'deflate' compression method URL:=http://www.zlib.net/ diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index 40153bde3d1..d75f06d6f6f 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -5,6 +5,7 @@ my $name; my $src; my $makefile; my %pkg; +my %dep; my $line; while ($line = <>) { @@ -19,8 +20,12 @@ while ($line = <>) { $pkg{$name}->{src} = $src; }; $line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do { - my @dep = split /,\s*/, $2; - $pkg{$name}->{depends} = \@dep; + $pkg{$name}->{depends} ||= []; + foreach my $v (split /\s+/, $2) { + next if $v =~ /^@/; + $v =~ s/^\+//; + push @{$pkg{$name}->{depends}}, $v; + } }; } @@ -32,8 +37,16 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { my $hasdeps = 0; my $depline = ""; foreach my $dep (@{$pkg{$name}->{depends}}) { + my $idx; if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) { - $depline .= " $pkg{$dep}->{src}-compile"; + $idx = $pkg{$dep}->{src}; + } elsif (defined $pkg{$dep}) { + $idx = $dep; + } + if ($idx) { + next if $dep{$pkg{$name}->{src}."->".$idx}; + $depline .= " $idx\-compile"; + $dep{$pkg{$name}->{src}."->".$idx} = 1; } } if ($depline ne "") { diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index e282ee3ed2d..a7f939ff52d 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -26,7 +26,12 @@ sub print_category($) { print "\t\ttristate \"$title\"\n"; print "\t\tdefault ".$pkg->{default}."\n"; foreach my $depend (@{$pkg->{depends}}) { - print "\t\tdepends PACKAGE_$depend\n"; + my $m = "depends"; + $depend =~ s/^([@\+])//; + my $flags = $1; + $flags =~ /@/ or $depend = "PACKAGE_$depend"; + $flags =~ /\+/ and $m = "select"; + print "\t\t$m $depend\n"; } print "\t\thelp\n"; print $pkg->{description}; @@ -60,7 +65,7 @@ while ($line = <>) { $line =~ /^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1; $line =~ /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1; $line =~ /^Depends: \s*(.+)\s*$/ and do { - my @dep = split /,\s*/, $1; + my @dep = split /\s+/, $1; $pkg->{depends} = \@dep; }; $line =~ /^Category: \s*(.+)\s*$/ and do { From aef3bd9e643498397c2ef33ba17d166e10518d85 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 19:38:38 +0000 Subject: [PATCH 088/757] resync with kamikaze SVN-Revision: 3844 --- .../base-files/default/etc/functions.sh | 4 + .../base-files/default/etc/init.d/S10boot | 3 +- openwrt/package/iptables/files/firewall.awk | 1 + openwrt/target/Config.in | 9 + openwrt/target/linux/Config.in | 12 +- openwrt/target/linux/Makefile | 2 + openwrt/target/linux/aruba-2.6/Makefile | 4 +- .../linux/aruba-2.6/patches/000-aruba.patch | 42 +- .../linux/aruba-2.6/patches/004-wdt.patch | 126 + openwrt/target/linux/au1000-2.6/Makefile | 11 +- openwrt/target/linux/au1000-2.6/config | 811 +- .../patches/002-mtx1_flash_map.patch | 16 + .../linux/au1000-2.6/patches/003-zImage.patch | 1364 ++ .../patches/004-mtx1_watchdog.patch | 279 + .../patches/005-au1000_eth_link_beat.patch | 24 + .../patches/006-mtx1_system_button.patch | 241 + .../au1000-2.6/patches/007-mtx1_sio2.patch | 13 + .../patches/008-isdel_cardbus.patch | 63 + .../linux/au1000-2.6/patches/009-boot.patch | 15 + openwrt/target/linux/brcm-2.4/Config.in | 10 - openwrt/target/linux/brcm-2.4/Makefile | 17 +- openwrt/target/linux/brcm-2.4/config | 1 - .../linux/brcm-2.4/patches/001-bcm47xx.patch | 19933 +++++++--------- .../patches/009-wrt54g3g_pcmcia.patch | 119 + openwrt/target/linux/brcm-2.6/Makefile | 4 +- openwrt/target/linux/control/kernel.control | 2 - .../linux/control/kmod-arptables.control | 2 - openwrt/target/linux/control/kmod-atm.control | 2 - .../target/linux/control/kmod-ax25.control | 2 - .../linux/control/kmod-bluetooth.control | 2 - .../target/linux/control/kmod-brcm-et.control | 2 - .../target/linux/control/kmod-brcm-wl.control | 2 - .../linux/control/kmod-brcm-wl2.control | 2 - .../target/linux/control/kmod-cpmac.control | 2 - .../target/linux/control/kmod-crypto.control | 2 - .../linux/control/kmod-ebtables.control | 2 - openwrt/target/linux/control/kmod-gre.control | 2 - openwrt/target/linux/control/kmod-ide.control | 2 - .../linux/control/kmod-ip6tables.control | 2 - .../target/linux/control/kmod-ipip.control | 4 + .../linux/control/kmod-iptables-extra.control | 2 - .../linux/control/kmod-iptables.control | 2 - .../target/linux/control/kmod-ipv6.control | 2 - .../target/linux/control/kmod-loop.control | 2 - openwrt/target/linux/control/kmod-lp.control | 2 - .../target/linux/control/kmod-mppe.control | 2 - openwrt/target/linux/control/kmod-nbd.control | 2 - .../linux/control/kmod-nls-base.control | 2 - .../linux/control/kmod-nls-cp437.control | 2 - .../linux/control/kmod-nls-cp850.control | 2 - .../linux/control/kmod-nls-iso8859-1.control | 2 - .../linux/control/kmod-nls-iso8859-15.control | 2 - .../linux/control/kmod-nls-utf8.control | 2 - openwrt/target/linux/control/kmod-ppp.control | 2 - .../target/linux/control/kmod-pppoatm.control | 2 - .../target/linux/control/kmod-pppoe.control | 2 - openwrt/target/linux/control/kmod-pwc.control | 2 - .../control/kmod-sangam-atm-annex-a.control | 2 - .../control/kmod-sangam-atm-annex-b.control | 2 - .../target/linux/control/kmod-sched.control | 2 - .../target/linux/control/kmod-softdog.control | 2 - .../linux/control/kmod-soundcore.control | 2 - openwrt/target/linux/control/kmod-tun.control | 2 - .../target/linux/control/kmod-usb-acm.control | 2 - .../control/kmod-usb-atm-speedtouch.control | 2 - .../linux/control/kmod-usb-audio.control | 2 - .../linux/control/kmod-usb-core.control | 2 - .../linux/control/kmod-usb-ohci.control | 2 - .../linux/control/kmod-usb-printer.control | 2 - .../control/kmod-usb-serial-belkin.control | 2 - .../control/kmod-usb-serial-ftdi.control | 2 - .../control/kmod-usb-serial-mct-u232.control | 2 - .../control/kmod-usb-serial-pl2303.control | 2 - .../control/kmod-usb-serial-visor.control | 5 +- .../linux/control/kmod-usb-serial.control | 2 - .../linux/control/kmod-usb-storage.control | 2 - .../linux/control/kmod-usb-uhci.control | 2 - .../target/linux/control/kmod-usb2.control | 2 - .../linux/control/kmod-videodev.control | 2 - .../target/linux/control/kmod-wd1100.control | 2 - openwrt/target/linux/generic-2.4/modules.mk | 10 +- openwrt/target/linux/generic-2.6/modules.mk | 6 +- .../generic-2.6/patches/005-gcc4_fix.patch | 14 +- openwrt/target/linux/image/au1000/Makefile | 58 +- openwrt/target/linux/image/jffs2.mk | 2 +- openwrt/target/linux/image/squashfs.mk | 6 +- openwrt/target/linux/image/xscale/Makefile | 36 + openwrt/target/linux/kernel.mk | 6 +- openwrt/target/linux/package/Makefile | 3 - .../files/au1000-2.6/sbin/mount_root | 23 + .../files/brcm-2.4/etc/hotplug.d/net/09-net | 6 +- .../files/sibyte-2.6/etc/config/network | 12 + .../base-files/files/sibyte-2.6/etc/inittab | 3 + .../package/base-files/files/sibyte-2.6/init | 6 + .../files/xscale-2.6/etc/config/network | 5 + .../files/xscale-2.6/etc/init.d/S00xscale | 4 + .../package/base-files/files/xscale-2.6/init | 3 + .../package/bcm43xx-standalone/Config.in | 12 - .../linux/package/bcm43xx-standalone/Makefile | 57 - .../bcm43xx-standalone/fwcutter/Makefile | 32 - .../bcm43xx-standalone/fwcutter/fwcutter.c | 562 - .../fwcutter/fwcutter_list.h | 810 - .../package/bcm43xx-standalone/fwcutter/md5.c | 253 - .../package/bcm43xx-standalone/fwcutter/md5.h | 16 - .../ipkg/kmod-bcm43xx-standalone.control | 4 - .../linux/package/ieee80211-dscape/Config.in | 10 - .../linux/package/ieee80211-dscape/Makefile | 46 - .../ipkg/kmod-ieee80211-dscape.control | 4 - .../package/ieee80211-dscape/src/Kconfig | 32 - .../package/ieee80211-dscape/src/Makefile | 23 - .../linux/package/ieee80211-dscape/src/aes.c | 564 - .../package/ieee80211-dscape/src/aes_ccm.c | 119 - .../package/ieee80211-dscape/src/aes_ccm.h | 22 - .../package/ieee80211-dscape/src/fifo_qdisc.c | 103 - .../ieee80211-dscape/src/hostapd_ioctl.h | 438 - .../package/ieee80211-dscape/src/ieee80211.c | 4895 ---- .../ieee80211-dscape/src/ieee80211_i.h | 571 - .../ieee80211-dscape/src/ieee80211_ioctl.c | 2832 --- .../ieee80211-dscape/src/ieee80211_key.h | 80 - .../ieee80211-dscape/src/ieee80211_led.c | 32 - .../ieee80211-dscape/src/ieee80211_proc.c | 777 - .../ieee80211-dscape/src/ieee80211_proc.h | 41 - .../ieee80211-dscape/src/ieee80211_scan.c | 352 - .../ieee80211-dscape/src/ieee80211_sta.c | 2868 --- .../src/include/net/ieee80211.h | 872 - .../src/include/net/ieee80211_common.h | 96 - .../src/include/net/ieee80211_mgmt.h | 196 - .../src/include/net/ieee80211_shared.h | 50 - .../package/ieee80211-dscape/src/michael.c | 104 - .../package/ieee80211-dscape/src/michael.h | 18 - .../ieee80211-dscape/src/rate_control.c | 381 - .../ieee80211-dscape/src/rate_control.h | 128 - .../package/ieee80211-dscape/src/sta_info.c | 417 - .../package/ieee80211-dscape/src/sta_info.h | 142 - .../linux/package/ieee80211-dscape/src/tkip.c | 341 - .../linux/package/ieee80211-dscape/src/tkip.h | 26 - .../linux/package/ieee80211-dscape/src/wep.c | 423 - .../linux/package/ieee80211-dscape/src/wep.h | 34 - .../linux/package/ieee80211-dscape/src/wme.c | 700 - .../linux/package/ieee80211-dscape/src/wme.h | 53 - .../linux/package/ieee80211-dscape/src/wpa.c | 825 - .../linux/package/ieee80211-dscape/src/wpa.h | 30 - .../target/linux/package/madwifi/Config.in | 2 +- openwrt/target/linux/package/madwifi/Makefile | 7 +- .../madwifi/patches/100-kernel_cflags.patch | 11 + .../target/linux/package/wlcompat/Config.in | 4 +- .../target/linux/package/wlcompat/wlcompat.c | 4 +- openwrt/target/linux/rules.mk | 6 + openwrt/target/linux/sibyte-2.6/Makefile | 19 + openwrt/target/linux/sibyte-2.6/config | 1311 + .../linux/sibyte-2.6/patches/000-DUART.patch | 956 + .../sibyte-2.6/patches/001-bcm112x_ax.patch | 17 + openwrt/target/linux/x86-2.6/Makefile | 4 +- openwrt/target/linux/xscale-2.6/Makefile | 18 + openwrt/target/linux/xscale-2.6/config | 1363 ++ .../xscale-2.6/patches/001-gateway_7001.patch | 159 + 156 files changed, 15637 insertions(+), 32077 deletions(-) create mode 100644 openwrt/target/linux/aruba-2.6/patches/004-wdt.patch create mode 100644 openwrt/target/linux/au1000-2.6/patches/002-mtx1_flash_map.patch create mode 100644 openwrt/target/linux/au1000-2.6/patches/003-zImage.patch create mode 100644 openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch create mode 100644 openwrt/target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch create mode 100644 openwrt/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch create mode 100644 openwrt/target/linux/au1000-2.6/patches/007-mtx1_sio2.patch create mode 100644 openwrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch create mode 100644 openwrt/target/linux/au1000-2.6/patches/009-boot.patch create mode 100644 openwrt/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch create mode 100644 openwrt/target/linux/control/kmod-ipip.control create mode 100644 openwrt/target/linux/image/xscale/Makefile create mode 100755 openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root create mode 100644 openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network create mode 100644 openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab create mode 100755 openwrt/target/linux/package/base-files/files/sibyte-2.6/init create mode 100644 openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network create mode 100755 openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale create mode 100755 openwrt/target/linux/package/base-files/files/xscale-2.6/init delete mode 100644 openwrt/target/linux/package/bcm43xx-standalone/Config.in delete mode 100644 openwrt/target/linux/package/bcm43xx-standalone/Makefile delete mode 100644 openwrt/target/linux/package/bcm43xx-standalone/fwcutter/Makefile delete mode 100644 openwrt/target/linux/package/bcm43xx-standalone/fwcutter/fwcutter.c delete mode 100644 openwrt/target/linux/package/bcm43xx-standalone/fwcutter/fwcutter_list.h delete mode 100644 openwrt/target/linux/package/bcm43xx-standalone/fwcutter/md5.c delete mode 100644 openwrt/target/linux/package/bcm43xx-standalone/fwcutter/md5.h delete mode 100644 openwrt/target/linux/package/bcm43xx-standalone/ipkg/kmod-bcm43xx-standalone.control delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/Config.in delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/Makefile delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/ipkg/kmod-ieee80211-dscape.control delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/Kconfig delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/Makefile delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/aes.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/aes_ccm.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/aes_ccm.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/fifo_qdisc.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/hostapd_ioctl.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_i.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_ioctl.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_key.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_led.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_proc.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_proc.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_scan.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_sta.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_common.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_mgmt.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_shared.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/michael.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/michael.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/rate_control.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/rate_control.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/sta_info.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/sta_info.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/tkip.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/tkip.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/wep.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/wep.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/wme.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/wme.h delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/wpa.c delete mode 100644 openwrt/target/linux/package/ieee80211-dscape/src/wpa.h create mode 100644 openwrt/target/linux/sibyte-2.6/Makefile create mode 100644 openwrt/target/linux/sibyte-2.6/config create mode 100644 openwrt/target/linux/sibyte-2.6/patches/000-DUART.patch create mode 100644 openwrt/target/linux/sibyte-2.6/patches/001-bcm112x_ax.patch create mode 100644 openwrt/target/linux/xscale-2.6/Makefile create mode 100644 openwrt/target/linux/xscale-2.6/config create mode 100644 openwrt/target/linux/xscale-2.6/patches/001-gateway_7001.patch diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 858dc286ad3..d54a346315c 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -61,3 +61,7 @@ config_get() { config_set() { export CONFIG_${1}_${2}="${3}" } + +load_modules() { + sed 's/^[^#]/insmod &/' $* | ash 2>&- || : +} diff --git a/openwrt/package/base-files/default/etc/init.d/S10boot b/openwrt/package/base-files/default/etc/init.d/S10boot index 0cc519d8eb6..42bb4388615 100755 --- a/openwrt/package/base-files/default/etc/init.d/S10boot +++ b/openwrt/package/base-files/default/etc/init.d/S10boot @@ -1,4 +1,5 @@ #!/bin/sh +. /etc/functions.sh [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc vconfig set_name_type VLAN_PLUS_VID_NO_PAD @@ -16,7 +17,7 @@ for iface in $(/sbin/ifconfig -a | awk '{print $1}' | grep eth); do /usr/bin/env -i ACTION=add INTERFACE="$iface" /sbin/hotplug net done -sed 's/^[^#]/insmod &/' /etc/modules /etc/modules.d/* 2>&-|ash +load_modules /etc/modules /etc/modules.d/* ifconfig lo 127.0.0.1 up ifconfig eth0 promisc diff --git a/openwrt/package/iptables/files/firewall.awk b/openwrt/package/iptables/files/firewall.awk index 1b63f838620..1a201a0bce5 100644 --- a/openwrt/package/iptables/files/firewall.awk +++ b/openwrt/package/iptables/files/firewall.awk @@ -1,4 +1,5 @@ BEGIN { + print ". /etc/config/network" print "proto=\"$wan_proto\"" print "[ -z \"$proto\" -o \"$proto\" = \"none\" ] && exit" print "ifname=\"$wan_ifname\"" diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index f20504031cc..aad5f9940f3 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -7,6 +7,7 @@ config LINUX_2_6_ARUBA select mips select LINUX_2_6 select PCI_SUPPORT + select BIG_ENDIAN help Build firmware images for Aruba boards @@ -14,6 +15,7 @@ config LINUX_2_4_AR531X bool "Atheros AR531x [2.4]" select mips select LINUX_2_4 + select BIG_ENDIAN help Build firmware images for Atheros AR531x based boards (e.g. Netgear WGT624, Linksys WRT55AG) @@ -84,6 +86,7 @@ config LINUX_2_6_ARM config LINUX_2_6_ARMEB bool "UNSUPPORTED big-endian arm platform" select LINUX_2_6 + select BIG_ENDIAN select armeb config LINUX_2_6_CRIS @@ -99,6 +102,7 @@ config LINUX_2_6_M68K config LINUX_2_6_PPC bool "UNSUPPORTED powerpc platform" select LINUX_2_6 + select BIG_ENDIAN select powerpc config LINUX_2_6_SH3 @@ -109,6 +113,7 @@ config LINUX_2_6_SH3 config LINUX_2_6_SH3EB bool "UNSUPPORTED big-endian sh3 platform" select LINUX_2_6 + select BIG_ENDIAN select sh3eb config LINUX_2_6_SH4 @@ -119,11 +124,13 @@ config LINUX_2_6_SH4 config LINUX_2_6_SH4EB bool "UNSUPPORTED big-endian sh4 platform" select LINUX_2_6 + select BIG_ENDIAN select sh4eb config LINUX_2_6_SPARC bool "UNSUPPORTED sparc platform" select LINUX_2_6 + select BIG_ENDIAN select sparc endif @@ -145,6 +152,8 @@ config PCI_SUPPORT config PCMCIA_SUPPORT bool +config BIG_ENDIAN + bool # Architecture selection diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 5257c78ad0b..540e2b73641 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -10,6 +10,7 @@ menu "Target Root Filesystem" bool "squashfs-lzma" default y depends !LINUX_2_6_ARUBA + depends !LINUX_2_6_XSCALE help Build a squashfs-lzma root filesystem @@ -53,6 +54,13 @@ config PACKAGE_KMOD_IMQ help Kernel support for the Intermediate Queueing device +config PACKAGE_KMOD_IPIP + prompt "kmod-ipip......................... IP in IP encapsulation support" + tristate + default m + help + Kernel module for IP in IP encapsulation + config PACKAGE_KMOD_IPV6 prompt "kmod-ipv6......................... IPv6 support" tristate @@ -294,7 +302,7 @@ config PACKAGE_KMOD_IDE - ide-core - ide-detect - ide-disk - - pdc202old + - pdc202xx_old config PACKAGE_KMOD_LOOP prompt "kmod-loop......................... Loop mount support" @@ -316,7 +324,7 @@ config PACKAGE_KMOD_CRYPTO prompt "CryptoAPI modules" tristate default m - select BUSYBOX_FEATURE_CHECK_TAINTED_MODULE + select BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE help Kernel modules for cryptographic algorithms diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index d7744f56e08..bea43514a7d 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -84,3 +84,5 @@ $(eval $(call kernel_template,2.6,x86,2_6_X86)) $(eval $(call kernel_template,2.4,ar531x,2_4_AR531X)) $(eval $(call kernel_template,2.6,aruba,2_6_ARUBA)) $(eval $(call kernel_template,2.6,au1000,2_6_AU1000)) +$(eval $(call kernel_template,2.6,xscale,2_6_XSCALE)) +$(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE)) diff --git a/openwrt/target/linux/aruba-2.6/Makefile b/openwrt/target/linux/aruba-2.6/Makefile index b5b220d0f2c..e21bf818de7 100644 --- a/openwrt/target/linux/aruba-2.6/Makefile +++ b/openwrt/target/linux/aruba-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.4 +LINUX_VERSION:=2.6.16.7 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=cb675279c9711237a06ebb8379a4da27 +LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e include ../rules.mk include ./config diff --git a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch index 34fbaf2dec4..7bb8a26d7fb 100644 --- a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch +++ b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch @@ -45,7 +45,7 @@ diff -Nur linux-2.6.16/arch/mips/aruba/Makefile linux-2.6.16-owrt/arch/mips/arub +# .S.o: +# $(CC) $(CFLAGS) -c $< -o $*.o + -+obj-y := prom.o setup.o idtIRQ.o irq.o time.o flash_lock.o wdt_merlot.o ++obj-y := prom.o setup.o idtIRQ.o irq.o time.o flash_lock.o +obj-$(CONFIG_SERIAL_8250) += serial.o + +subdir-y += nvram @@ -823,6 +823,7 @@ diff -Nur linux-2.6.16/arch/mips/aruba/setup.c linux-2.6.16-owrt/arch/mips/aruba + */ + +#include <linux/init.h> ++#include <linux/module.h> +#include <linux/mm.h> +#include <linux/sched.h> +#include <linux/irq.h> @@ -872,7 +873,6 @@ diff -Nur linux-2.6.16/arch/mips/aruba/setup.c linux-2.6.16-owrt/arch/mips/aruba + +extern char * getenv(char *e); +extern void unlock_ap60_70_flash(void); -+extern void wdt_merlot_disable(void); + +void __init plat_setup(void) +{ @@ -895,8 +895,6 @@ diff -Nur linux-2.6.16/arch/mips/aruba/setup.c linux-2.6.16-owrt/arch/mips/aruba + + printk("BOARD - %s\n",getenv("boardname")); + -+ wdt_merlot_disable(); -+ + return 0; +} + @@ -909,6 +907,8 @@ diff -Nur linux-2.6.16/arch/mips/aruba/setup.c linux-2.6.16-owrt/arch/mips/aruba +{ + return "MIPS IDT32434 - ARUBA"; +} ++ ++EXPORT_SYMBOL(get_system_type); diff -Nur linux-2.6.16/arch/mips/aruba/time.c linux-2.6.16-owrt/arch/mips/aruba/time.c --- linux-2.6.16/arch/mips/aruba/time.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.16-owrt/arch/mips/aruba/time.c 2006-03-20 14:25:10.000000000 +0100 @@ -1021,40 +1021,6 @@ diff -Nur linux-2.6.16/arch/mips/aruba/time.c linux-2.6.16-owrt/arch/mips/aruba/ + timer_interrupt(irq, NULL, regs); + irq_exit(); +} -diff -Nur linux-2.6.16/arch/mips/aruba/wdt_merlot.c linux-2.6.16-owrt/arch/mips/aruba/wdt_merlot.c ---- linux-2.6.16/arch/mips/aruba/wdt_merlot.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/wdt_merlot.c 2006-03-20 14:25:10.000000000 +0100 -@@ -0,0 +1,30 @@ -+#include <linux/config.h> -+#include <linux/kernel.h> -+#include <asm/bootinfo.h> -+ -+void wdt_merlot_disable() -+{ -+ volatile __u32 *wdt_errcs; -+ volatile __u32 *wdt_wtc; -+ volatile __u32 *wdt_ctl; -+ volatile __u32 val; -+ -+ switch (mips_machtype) { -+ case MACH_ARUBA_AP70: -+ wdt_errcs = (__u32 *) 0xb8030030; -+ wdt_wtc = (__u32 *) 0xb803003c; -+ val = *wdt_errcs; -+ val &= ~0x201; -+ *wdt_errcs = val; -+ val = *wdt_wtc; -+ val &= ~0x1; -+ *wdt_wtc = val; -+ break; -+ case MACH_ARUBA_AP65: -+ case MACH_ARUBA_AP60: -+ default: -+ wdt_ctl = (__u32 *) 0xbc003008; -+ *wdt_ctl = 0; -+ break; -+ } -+} diff -Nur linux-2.6.16/arch/mips/Kconfig linux-2.6.16-owrt/arch/mips/Kconfig --- linux-2.6.16/arch/mips/Kconfig 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-owrt/arch/mips/Kconfig 2006-03-20 14:25:10.000000000 +0100 diff --git a/openwrt/target/linux/aruba-2.6/patches/004-wdt.patch b/openwrt/target/linux/aruba-2.6/patches/004-wdt.patch new file mode 100644 index 00000000000..15fbffa043c --- /dev/null +++ b/openwrt/target/linux/aruba-2.6/patches/004-wdt.patch @@ -0,0 +1,126 @@ +diff -Nur linux-2.6.15.1/drivers/char/watchdog/wdt_merlot.c linux-2.6.15.1-openwrt/drivers/char/watchdog/wdt_merlot.c +--- linux-2.6.15.1/drivers/char/watchdog/wdt_merlot.c 2006-01-26 21:14:02.204626250 -0800 ++++ linux-2.6.15.1-openwrt/drivers/char/watchdog/wdt_merlot.c 2006-02-02 20:31:43.000000000 -0800 +@@ -0,0 +1,110 @@ ++#include <linux/config.h> ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/miscdevice.h> ++#include <linux/watchdog.h> ++#include <linux/fs.h> ++ ++#include <asm/io.h> ++#include <asm/uaccess.h> ++#include <asm/system.h> ++#include <asm/bootinfo.h> ++ ++extern unsigned long mips_machtype; ++ ++static unsigned long wdt_is_open; ++static struct timer_list wdt_timer; ++ ++static void wdt_merlot_refresh(void) ++{ ++ volatile __u32 *wdt; ++ switch (mips_machtype) { ++ case MACH_ARUBA_AP70: ++ wdt = (__u32 *) 0xb8030034; ++ *wdt = 0x10000000; ++ break; ++ default: ++ wdt = (__u32 *) 0xbc00300c; ++ *wdt = 0x40000000; ++ break; ++ } ++} ++ ++static void wdt_merlot_timer_fn(unsigned long data) ++{ ++ wdt_merlot_refresh(); ++ if (!test_bit(1, &wdt_is_open)) ++ mod_timer(&wdt_timer, jiffies + HZ); ++} ++ ++static int wdt_merlot_setup_timer(void) ++{ ++ ++ init_timer(&wdt_timer); ++ wdt_timer.function = wdt_merlot_timer_fn; ++ wdt_timer.data = 0; ++ wdt_timer.expires = jiffies + HZ; ++ add_timer(&wdt_timer); ++ return 0; ++} ++ ++static int wdt_open(struct inode *inode, struct file *file) ++{ ++ if (test_and_set_bit(0, &wdt_is_open)) ++ return -EBUSY; ++ set_bit(1, &wdt_is_open); ++ return nonseekable_open(inode, file); ++} ++ ++static ssize_t wdt_write(struct file *file, const char __user * buf, size_t count, loff_t * ppos) ++{ ++ if (count) /* something was written */ ++ wdt_merlot_refresh(); ++ return count; ++} ++ ++static int wdt_release(struct inode *inode, struct file *file) ++{ ++ clear_bit(0, &wdt_is_open); ++ return 0; ++} ++ ++static struct file_operations wdt_fops = { ++ .owner = THIS_MODULE, ++ .llseek = no_llseek, ++ .write = wdt_write, ++ .open = wdt_open, ++ .release = wdt_release, ++}; ++ ++static struct miscdevice wdt_miscdev = { ++ .minor = WATCHDOG_MINOR, ++ .name = "watchdog", ++ .fops = &wdt_fops, ++}; ++ ++static void __exit wdt_exit(void) ++{ ++ misc_deregister(&wdt_miscdev); ++} ++ ++static int __init wdt_init(void) ++{ ++ int ret; ++ ret = misc_register(&wdt_miscdev); ++ if (ret) { ++ printk(KERN_ERR ++ "wdt: cannot register miscdev on minor=%d (err=%d)\n", ++ WATCHDOG_MINOR, ret); ++ misc_deregister(&wdt_miscdev); ++ goto out; ++ } ++ printk("wdt: registered with refresh\n"); ++ wdt_merlot_refresh(); ++ wdt_merlot_setup_timer(); ++ out: ++ return ret; ++} ++ ++module_init(wdt_init); ++module_exit(wdt_exit); +diff -Nur linux-2.6.15.3/drivers/char/watchdog/Makefile linux-2.6.15.3-openwrt/drivers/char/watchdog/Makefile +--- linux-2.6.15.3/drivers/char/watchdog/Makefile 2006-02-22 10:04:18.596278000 -0800 ++++ linux-2.6.15.3-openwrt/drivers/char/watchdog/Makefile 2006-02-22 10:06:21.400960000 -0800 +@@ -71,5 +71,8 @@ + + # SPARC64 Architecture + ++# Aruba Architecture ++obj-$(CONFIG_MACH_ARUBA) += wdt_merlot.o ++ + # Architecture Independant + obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o diff --git a/openwrt/target/linux/au1000-2.6/Makefile b/openwrt/target/linux/au1000-2.6/Makefile index 8c1c67d1833..8ba22aa683f 100644 --- a/openwrt/target/linux/au1000-2.6/Makefile +++ b/openwrt/target/linux/au1000-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.4 +LINUX_VERSION:=2.6.16.7 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=cb675279c9711237a06ebb8379a4da27 +LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e include ../rules.mk include ./config @@ -17,9 +17,10 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked @$(CP) config $(LINUX_DIR)/.config touch $@ -$(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux - $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage - $(CP) $(LINUX_DIR)/vmlinux $@ +$(LINUX_BUILD_DIR)/zImage.flash.srec: $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.srec + $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) zImage.flash + $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec $(LINUX_DIR)/zImage.flash.srec + $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.srec $(LINUX_DIR)/zImage.srec touch $@ compile: $(LINUX_DIR)/vmlinux diff --git a/openwrt/target/linux/au1000-2.6/config b/openwrt/target/linux/au1000-2.6/config index 37dac8ed26d..b274fcfd55b 100644 --- a/openwrt/target/linux/au1000-2.6/config +++ b/openwrt/target/linux/au1000-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.2 -# Tue Apr 11 13:27:02 2006 +# Linux kernel version: 2.6.16.7 +# Sat Apr 29 20:33:29 2006 # CONFIG_MIPS=y @@ -113,7 +113,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y # CONFIG_MIPS_MT is not set -# CONFIG_64BIT_PHYS_ADDR is not set +CONFIG_64BIT_PHYS_ADDR=y # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -148,19 +148,21 @@ CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_EMBEDDED=y -# CONFIG_KALLSYMS is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y -# CONFIG_ELF_CORE is not set +CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y @@ -169,10 +171,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_SLAB is not set +CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -CONFIG_SLOB=y +# CONFIG_SLOB is not set CONFIG_OBSOLETE_INTERMODULE=y # @@ -180,11 +182,11 @@ CONFIG_OBSOLETE_INTERMODULE=y # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set +CONFIG_KMOD=y # # Block layer @@ -196,8 +198,8 @@ CONFIG_OBSOLETE_MODPARM=y # CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set +CONFIG_IOSCHED_DEADLINE=m +CONFIG_IOSCHED_CFQ=m CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_DEADLINE is not set # CONFIG_DEFAULT_CFQ is not set @@ -226,7 +228,7 @@ CONFIG_MMU=y # Executable file formats # CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m +CONFIG_BINFMT_MISC=y CONFIG_TRAD_SIGNALS=y # CONFIG_PM is not set @@ -239,12 +241,12 @@ CONFIG_NET=y # Networking options # # CONFIG_NETDEBUG is not set -CONFIG_PACKET=y +CONFIG_PACKET=m CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y +CONFIG_UNIX=m CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_NET_KEY is not set +CONFIG_XFRM_USER=m +CONFIG_NET_KEY=m CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y @@ -255,33 +257,35 @@ CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_FWMARK=y CONFIG_IP_ROUTE_MULTIPATH=y # CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -# CONFIG_IP_PNP is not set +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set -CONFIG_IPSEC_NAT_TRAVERSAL=y +CONFIG_NET_IPGRE_BROADCAST=y +# CONFIG_IPSEC_NAT_TRAVERSAL is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m +# CONFIG_INET_DIAG is not set CONFIG_TCP_CONG_ADVANCED=y # # TCP congestion control # -CONFIG_TCP_CONG_BIC=m -CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_BIC=y +# CONFIG_TCP_CONG_CUBIC is not set CONFIG_TCP_CONG_WESTWOOD=m CONFIG_TCP_CONG_HTCP=m CONFIG_TCP_CONG_HSTCP=m CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_VEGAS=m CONFIG_TCP_CONG_SCALABLE=m # @@ -289,62 +293,67 @@ CONFIG_TCP_CONG_SCALABLE=m # # CONFIG_IP_VS is not set CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_IPV6_TUNNEL is not set +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set -# CONFIG_BRIDGE_NETFILTER is not set +CONFIG_BRIDGE_NETFILTER=y # # Core Netfilter Configuration # -# CONFIG_NETFILTER_NETLINK is not set -CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set CONFIG_NETFILTER_XT_TARGET_MARK=m -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_STATE=y -# CONFIG_NETFILTER_XT_MATCH_STRING is not set -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m # # IP: Netfilter Configuration # -CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=y -CONFIG_IP_NF_IRC=y -# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_CONNTRACK_EVENTS=y +CONFIG_IP_NF_CONNTRACK_NETLINK=m +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_NETBIOS_NS=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_LAYER7=m -# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_MATCH_LAYER7_DEBUG=y CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m @@ -355,36 +364,38 @@ CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH_ESP=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set -# CONFIG_IP_NF_MATCH_POLICY is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_MATCH_POLICY=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_IMQ=m -# CONFIG_IP_NF_TARGET_LOG is not set +CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y -CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=y -CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_TTL=m -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 @@ -401,24 +412,7 @@ CONFIG_IP_NF_TARGET_SET=m # IPv6: Netfilter Configuration (EXPERIMENTAL) # CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -# CONFIG_IP6_NF_MATCH_RT is not set -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_FRAG is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -# CONFIG_IP6_NF_MATCH_AHESP is not set -CONFIG_IP6_NF_MATCH_EUI64=m -# CONFIG_IP6_NF_MATCH_POLICY is not set -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_IMQ=m -# CONFIG_IP6_NF_TARGET_LOG is not set -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -# CONFIG_IP6_NF_TARGET_HL is not set -# CONFIG_IP6_NF_RAW is not set +# CONFIG_IP6_NF_IPTABLES is not set # # Bridge: Netfilter Configuration @@ -458,17 +452,12 @@ CONFIG_BRIDGE_EBT_ULOG=m # TIPC Configuration (EXPERIMENTAL) # # CONFIG_TIPC is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -CONFIG_ATM_BR2684_IPFILTER=y -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y +# CONFIG_ATM is not set +CONFIG_BRIDGE=m +CONFIG_VLAN_8021Q=m # CONFIG_DECNET is not set -# CONFIG_LLC2 is not set +CONFIG_LLC=m +CONFIG_LLC2=m # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set @@ -491,16 +480,15 @@ CONFIG_NET_SCH_CLK_JIFFIES=y CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_RED=m CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_ESFQ=m +# CONFIG_NET_SCH_ESFQ is not set CONFIG_NET_SCH_TEQL=m CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_NETEM is not set +CONFIG_NET_SCH_NETEM=m CONFIG_NET_SCH_INGRESS=m # @@ -513,67 +501,36 @@ CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m -# CONFIG_CLS_U32_PERF is not set -# CONFIG_CLS_U32_MARK is not set +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +# CONFIG_NET_ACT_IPT is not set +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m # CONFIG_NET_CLS_IND is not set CONFIG_NET_ESTIMATOR=y # # Network testing # -# CONFIG_NET_PKTGEN is not set -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -# CONFIG_AX25_DAMA_SLAVE is not set -# CONFIG_NETROM is not set -# CONFIG_ROSE is not set - -# -# AX.25 network device drivers -# -CONFIG_MKISS=m -# CONFIG_6PACK is not set -# CONFIG_BPQETHER is not set -# CONFIG_BAYCOM_SER_FDX is not set -# CONFIG_BAYCOM_SER_HDX is not set -# CONFIG_YAM is not set +CONFIG_NET_PKTGEN=m +# CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m +# CONFIG_BT is not set +# CONFIG_IEEE80211 is not set # # Device Drivers @@ -582,21 +539,21 @@ CONFIG_IEEE80211_CRYPT_TKIP=m # # Generic Driver Options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_STANDALONE is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=y # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=m +# CONFIG_CONNECTOR is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_CONCAT=y CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set @@ -628,7 +585,7 @@ CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set # CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_INTELEXT is not set CONFIG_MTD_CFI_AMDSTD=y CONFIG_MTD_CFI_AMDSTD_RETRY=0 # CONFIG_MTD_CFI_STAA is not set @@ -641,11 +598,10 @@ CONFIG_MTD_CFI_UTIL=y # # Mapping drivers for chip access # -CONFIG_MTD_COMPLEX_MAPPINGS=y +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ALCHEMY is not set CONFIG_MTD_MTX1=y -# CONFIG_MTD_PCI is not set # CONFIG_MTD_PLATRAM is not set # @@ -697,8 +653,9 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM=m CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -712,7 +669,7 @@ CONFIG_BLK_DEV_RAM_COUNT=16 # # CONFIG_RAID_ATTRS is not set CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y +# CONFIG_SCSI_PROC_FS is not set # # SCSI support type (disk, tape, CD-ROM) @@ -721,14 +678,14 @@ CONFIG_BLK_DEV_SD=m # CONFIG_CHR_DEV_ST is not set # CONFIG_CHR_DEV_OSST is not set # CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set +CONFIG_CHR_DEV_SG=m # CONFIG_CHR_DEV_SCH is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_LOGGING is not set # @@ -798,8 +755,9 @@ CONFIG_BLK_DEV_SD=m # Network device support # CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set +# CONFIG_IFB is not set +CONFIG_DUMMY=m +CONFIG_BONDING=m # CONFIG_EQUALIZER is not set CONFIG_IMQ=m # CONFIG_IMQ_BEHAVIOR_AA is not set @@ -837,26 +795,7 @@ CONFIG_MIPS_AU1X00_ENET=y # # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set -# CONFIG_LAN_SAA9730 is not set +# CONFIG_NET_PCI is not set # # Ethernet (1000 Mbit) @@ -872,7 +811,6 @@ CONFIG_NET_PCI=y # CONFIG_SKGE is not set # CONFIG_SKY2 is not set # CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # CONFIG_BNX2 is not set @@ -896,20 +834,15 @@ CONFIG_NET_RADIO=y # # Obsolete Wireless cards support (pre-802.11) # -# CONFIG_STRIP is not set +CONFIG_STRIP=m # # Wireless 802.11b ISA/PCI cards support # -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -# CONFIG_IPW2200_DEBUG is not set CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m +# CONFIG_PLX_HERMES is not set +# CONFIG_TMD_HERMES is not set +# CONFIG_NORTEL_HERMES is not set CONFIG_PCI_HERMES=m CONFIG_ATMEL=m CONFIG_PCI_ATMEL=m @@ -918,49 +851,27 @@ CONFIG_PCI_ATMEL=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m +# CONFIG_HOSTAP is not set CONFIG_NET_WIRELESS=y # # Wan interfaces # # CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_DUMMY=m -CONFIG_ATM_TCP=m -# CONFIG_ATM_LANAI is not set -# CONFIG_ATM_ENI is not set -# CONFIG_ATM_FIRESTREAM is not set -# CONFIG_ATM_ZATM is not set -# CONFIG_ATM_NICSTAR is not set -# CONFIG_ATM_IDT77252 is not set -# CONFIG_ATM_AMBASSADOR is not set -# CONFIG_ATM_HORIZON is not set -# CONFIG_ATM_IA is not set -# CONFIG_ATM_FORE200E_MAYBE is not set -# CONFIG_ATM_HE is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_MULTILINK=y CONFIG_PPP_FILTER=y CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m +# CONFIG_PPP_MPPE is not set CONFIG_PPPOE=m -CONFIG_PPPOATM=m # CONFIG_SLIP is not set # CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set +CONFIG_SHAPER=m # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set @@ -978,7 +889,7 @@ CONFIG_PPPOATM=m # # Input device support # -CONFIG_INPUT=m +CONFIG_INPUT=y # # Userland interfaces @@ -986,7 +897,7 @@ CONFIG_INPUT=m # CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # @@ -1007,7 +918,9 @@ CONFIG_INPUT_EVDEV=m # # Character devices # -# CONFIG_VT is not set +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -1015,10 +928,10 @@ CONFIG_INPUT_EVDEV=m # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_AU1X00 is not set +CONFIG_SERIAL_8250_AU1X00=y # # Non-8250 serial port support @@ -1038,7 +951,25 @@ CONFIG_UNIX98_PTYS=y # # Watchdog Cards # -# CONFIG_WATCHDOG is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +CONFIG_SOFT_WATCHDOG=m +CONFIG_MTX1_WATCHDOG=y + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -1090,29 +1021,7 @@ CONFIG_UNIX98_PTYS=y # # Multimedia devices # -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set +# CONFIG_VIDEO_DEV is not set # # Digital Video Broadcasting Devices @@ -1124,94 +1033,16 @@ CONFIG_VIDEO_DEV=m # # CONFIG_FB is not set +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + # # Sound # -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# PCI devices -# -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALI5451 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AZT3328 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_EMU10K1 is not set -# CONFIG_SND_EMU10K1X is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_ES1938 is not set -# CONFIG_SND_ES1968 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDA_INTEL is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1712 is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_MAESTRO3 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_TRIDENT is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# ALSA MIPS devices -# -# CONFIG_SND_AU1X00 is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set +# CONFIG_SOUND is not set # # USB support @@ -1232,20 +1063,15 @@ CONFIG_USB_DEVICEFS=y # # USB Host Controller Drivers # -CONFIG_USB_EHCI_HCD=m -# CONFIG_USB_EHCI_SPLIT_ISO is not set -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +# CONFIG_USB_EHCI_HCD is not set # CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_UHCI_HCD is not set # CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers # -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m @@ -1258,15 +1084,14 @@ CONFIG_USB_PRINTER=m # CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y # CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set # CONFIG_USB_LIBUSUAL is not set # @@ -1297,34 +1122,36 @@ CONFIG_USB_STORAGE=m # # USB Imaging devices # -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m # # USB Multimedia devices # -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set +CONFIG_USB_DABUSB=m + +# +# Video4Linux support is needed for USB Multimedia device support +# # # USB Network Adapters # -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_MON is not set +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_NET1080=m +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m +CONFIG_USB_MON=y # # USB port drivers @@ -1334,62 +1161,58 @@ CONFIG_USB_STORAGE=m # USB Serial Converter support # CONFIG_USB_SERIAL=m -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRPRIME is not set +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRPRIME=m # CONFIG_USB_SERIAL_ANYDATA is not set CONFIG_USB_SERIAL_BELKIN=m -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP2101 is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP2101=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_VISOR=m -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m # CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OMNINET is not set +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_EZUSB=y # # USB Miscellaneous drivers # -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_AUERSWALD=m +CONFIG_USB_RIO500=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_LED=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_PHIDGETKIT=m +CONFIG_USB_PHIDGETSERVO=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_LD=m +CONFIG_USB_TEST=m # # USB DSL modem support # -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -# CONFIG_USB_CXACRU is not set -CONFIG_USB_UEAGLEATM=m -# CONFIG_USB_XUSBATM is not set # # USB Gadget Support @@ -1413,34 +1236,26 @@ CONFIG_USB_UEAGLEATM=m # # File systems # -CONFIG_EXT2_FS=m -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set +# CONFIG_EXT2_FS is not set CONFIG_EXT3_FS=m # CONFIG_EXT3_FS_XATTR is not set CONFIG_JBD=m # CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_SECURITY is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_FS_POSIX_ACL is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_SECURITY is not set # CONFIG_XFS_POSIX_ACL is not set # CONFIG_XFS_RT is not set # CONFIG_OCFS2_FS is not set -CONFIG_MINIX_FS=m -# CONFIG_ROMFS_FS is not set +# CONFIG_MINIX_FS is not set +CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y # CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set @@ -1455,26 +1270,28 @@ CONFIG_INOTIFY=y # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=m -# CONFIG_MSDOS_FS is not set +CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y # # Pseudo filesystems # CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set +CONFIG_PROC_KCORE=y CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVFS_DEBUG=y CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set +CONFIG_CONFIGFS_FS=y # # Miscellaneous filesystems @@ -1490,15 +1307,12 @@ CONFIG_RAMFS=y CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_SUMMARY=y +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE is not set -# CONFIG_CRAMFS is not set +CONFIG_CRAMFS=m CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_EMBEDDED is not set CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 @@ -1512,24 +1326,32 @@ CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 # # Network File Systems # -CONFIG_NFS_FS=m +CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_LOCKD=m +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +# CONFIG_ROOT_NFS is not set +CONFIG_LOCKD=y CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_XATTR is not set +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y # CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -1539,28 +1361,13 @@ CONFIG_CIFS=m # # Partition Types # -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y +# CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set # # Native Language Support # -CONFIG_NLS=m +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set @@ -1610,11 +1417,11 @@ CONFIG_NLS_UTF8=m # Kernel hacking # # CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set +CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200" +CONFIG_CMDLINE="init=/etc/preinit" # # Security options @@ -1627,29 +1434,29 @@ CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit # CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m # # Hardware crypto devices @@ -1659,8 +1466,12 @@ CONFIG_CRYPTO_MICHAEL_MIC=m # Library routines # CONFIG_CRC_CCITT=m -CONFIG_CRC16=m +CONFIG_CRC16=y CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set +CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m diff --git a/openwrt/target/linux/au1000-2.6/patches/002-mtx1_flash_map.patch b/openwrt/target/linux/au1000-2.6/patches/002-mtx1_flash_map.patch new file mode 100644 index 00000000000..9a6b05b146d --- /dev/null +++ b/openwrt/target/linux/au1000-2.6/patches/002-mtx1_flash_map.patch @@ -0,0 +1,16 @@ +diff -urN linux-2.6.16.7/drivers/mtd/maps/alchemy-flash.c linux-2.6.16.7.new/drivers/mtd/maps/alchemy-flash.c +--- linux-2.6.16.7/drivers/mtd/maps/alchemy-flash.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/drivers/mtd/maps/alchemy-flash.c 2006-04-20 19:16:26.000000000 +0200 +@@ -105,6 +105,12 @@ + #define USE_LOCAL_ACCESSORS /* why? */ + #endif + ++#ifdef CONFIG_MIPS_MTX1 ++#define BOARD_MAP_NAME "MTX-1 Flash" ++#define BOARD_FLASH_SIZE 0x04000000 /* 64MB */ ++#define BOARD_FLASH_WIDTH 4 /* 32-bits */ ++#endif ++ + static struct map_info alchemy_map = { + .name = BOARD_MAP_NAME, + }; diff --git a/openwrt/target/linux/au1000-2.6/patches/003-zImage.patch b/openwrt/target/linux/au1000-2.6/patches/003-zImage.patch new file mode 100644 index 00000000000..1d4c6ad5d18 --- /dev/null +++ b/openwrt/target/linux/au1000-2.6/patches/003-zImage.patch @@ -0,0 +1,1364 @@ +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/au1xxx/head.S linux-2.6.16.7.new/arch/mips/boot/compressed/au1xxx/head.S +--- linux-2.6.16.7/arch/mips/boot/compressed/au1xxx/head.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/au1xxx/head.S 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,119 @@ ++/* ++ * arch/mips/kernel/head.S ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 1994, 1995 Waldorf Electronics ++ * Written by Ralf Baechle and Andreas Busse ++ * Copyright (C) 1995 - 1999 Ralf Baechle ++ * Copyright (C) 1996 Paul M. Antoine ++ * Modified for DECStation and hence R3000 support by Paul M. Antoine ++ * Further modifications by David S. Miller and Harald Koerfgen ++ * Copyright (C) 1999 Silicon Graphics, Inc. ++ * ++ * Head.S contains the MIPS exception handler and startup code. ++ * ++ ************************************************************************** ++ * 9 Nov, 2000. ++ * Added Cache Error exception handler and SBDDP EJTAG debug exception. ++ * ++ * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com ++ * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. ++ ************************************************************************** ++ */ ++#include <linux/config.h> ++#include <linux/threads.h> ++ ++#include <asm/asm.h> ++#include <asm/cacheops.h> ++#include <asm/mipsregs.h> ++#include <asm/cachectl.h> ++#include <asm/regdef.h> ++ ++#define IndexInvalidate_I 0x00 ++#define IndexWriteBack_D 0x01 ++ ++ .set noreorder ++ .cprestore ++ LEAF(start) ++start: ++ bal locate ++ nop ++locate: ++ subu s8, ra, 8 /* Where we were loaded */ ++ la sp, (.stack + 8192) ++ ++ move s0, a0 /* Save boot rom start args */ ++ move s1, a1 ++ move s2, a2 ++ move s3, a3 ++ ++ la a0, start /* Where we were linked to run */ ++ ++ move a1, s8 ++ la a2, _edata ++ subu t1, a2, a0 ++ srl t1, t1, 2 ++ ++ /* copy text section */ ++ li t0, 0 ++1: lw v0, 0(a1) ++ nop ++ sw v0, 0(a0) ++ xor t0, t0, v0 ++ addu a0, 4 ++ bne a2, a0, 1b ++ addu a1, 4 ++ ++ /* Clear BSS */ ++ la a0, _edata ++ la a2, _end ++2: sw zero, 0(a0) ++ bne a2, a0, 2b ++ addu a0, 4 ++ ++ /* push the D-Cache and invalidate I-Cache */ ++ li k0, 0x80000000 # start address ++ li k1, 0x80004000 # end address (16KB I-Cache) ++ subu k1, 128 ++ ++1: ++ .set mips3 ++ cache IndexWriteBack_D, 0(k0) ++ cache IndexWriteBack_D, 32(k0) ++ cache IndexWriteBack_D, 64(k0) ++ cache IndexWriteBack_D, 96(k0) ++ cache IndexInvalidate_I, 0(k0) ++ cache IndexInvalidate_I, 32(k0) ++ cache IndexInvalidate_I, 64(k0) ++ cache IndexInvalidate_I, 96(k0) ++ .set mips0 ++ ++ bne k0, k1, 1b ++ addu k0, k0, 128 ++ /* done */ ++ ++ move a0, s8 /* load address */ ++ move a1, t1 /* length in words */ ++ move a2, t0 /* checksum */ ++ move a3, sp ++ ++ la ra, 1f ++ la k0, decompress_kernel ++ jr k0 ++ nop ++1: ++ ++ move a0, s0 ++ move a1, s1 ++ move a2, s2 ++ move a3, s3 ++ li k0, KERNEL_ENTRY ++ jr k0 ++ nop ++3: ++ b 3b ++ END(start) ++ .comm .stack,4096*2,4 +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/au1xxx/Makefile linux-2.6.16.7.new/arch/mips/boot/compressed/au1xxx/Makefile +--- linux-2.6.16.7/arch/mips/boot/compressed/au1xxx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/au1xxx/Makefile 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,110 @@ ++# arch/mips/boot/compressed/au1xxx/Makefile ++# ++# Makefile for AMD Alchemy Semiconductor Au1x based boards. ++# All of the boot loader code was derived from the ppc ++# boot code. ++# ++# Copyright 2001,2002 MontaVista Software Inc. ++# ++# Author: Mark A. Greer ++# mgreer@mvista.com ++# ++# Copyright 2004 Embedded Alley Solutions, Inc ++# Ported and modified for mips 2.6 support by ++# Pete Popov <ppopov@embeddedalley.com> ++# ++# 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. ++ ++boot := arch/mips/boot ++compressed := $(boot)/compressed ++utils := $(compressed)/utils ++lib := $(compressed)/lib ++images := $(compressed)/images ++common := $(compressed)/common ++ ++######################################################################### ++# START BOARD SPECIFIC VARIABLES ++ ++# These two variables control where the zImage is stored ++# in flash and loaded in memory. It only controls how the srec ++# file is generated, the code is the same. ++RAM_RUN_ADDR = 0x81000000 ++ ++ifdef CONFIG_MIPS_XXS1500 ++FLASH_LOAD_ADDR = 0xBF000000 ++else ++FLASH_LOAD_ADDR = 0xBFD00000 ++endif ++ ++# These two variables specify the free ram region ++# that can be used for temporary malloc area ++AVAIL_RAM_START=0x80500000 ++AVAIL_RAM_END=0x80900000 ++ ++# This one must match the LOADADDR in arch/mips/Makefile! ++LOADADDR=0x80100000 ++ ++# WARNING WARNING WARNING ++# Note that with a LOADADDR of 0x80100000 and AVAIL_RAM_START of ++# 0x80500000, the max decompressed kernel size can be 4MB. Else we ++# start overwriting ourselve. You can change these vars as needed; ++# it would be much better if we just figured everything out on the fly. ++ ++# END BOARD SPECIFIC VARIABLES ++######################################################################### ++ ++OBJECTS := $(obj)/head.o $(common)/misc-common.o $(common)/misc-simple.o \ ++ $(common)/au1k_uart.o ++LIBS := $(lib)/lib.a ++ ++ENTRY := $(utils)/entry ++OFFSET := $(utils)/offset ++SIZE := $(utils)/size ++ ++LD_ARGS := -T $(compressed)/ld.script -Ttext $(RAM_RUN_ADDR) -Bstatic ++ ++ifdef CONFIG_CPU_LITTLE_ENDIAN ++OBJCOPY_ARGS = -O elf32-tradlittlemips ++else ++OBJCOPY_ARGS = -O elf32-tradbigmips ++endif ++ ++$(obj)/head.o: $(obj)/head.S $(TOPDIR)/vmlinux ++ $(CC) -I $(TOPDIR)/include $(AFLAGS) \ ++ -DKERNEL_ENTRY=$(shell sh $(ENTRY) $(NM) $(TOPDIR)/vmlinux ) \ ++ -c -o $*.o $< ++ ++$(common)/misc-simple.o: ++ $(CC) -I $(TOPDIR)/include $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 -DZIMAGE_OFFSET=0 \ ++ -DAVAIL_RAM_START=$(AVAIL_RAM_START) \ ++ -DAVAIL_RAM_END=$(AVAIL_RAM_END) \ ++ -DLOADADDR=$(LOADADDR) \ ++ -DZIMAGE_SIZE=0 -c -o $@ $*.c ++ ++$(obj)/zvmlinux: $(OBJECTS) $(LIBS) $(srctree)/$(compressed)/ld.script $(images)/vmlinux.gz $(common)/dummy.o ++ $(OBJCOPY) \ ++ --add-section=.image=$(images)/vmlinux.gz \ ++ --set-section-flags=.image=contents,alloc,load,readonly,data \ ++ $(common)/dummy.o $(common)/image.o ++ $(LD) $(LD_ARGS) -o $@ $(OBJECTS) $(common)/image.o $(LIBS) ++ $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R __kcrctab -R __ksymtab_strings \ ++ -R .comment -R .stab -R .stabstr -R .initrd -R .sysmap ++ ++# Here we manipulate the image in order to get it the necessary ++# srecord file we need. ++zImage: $(obj)/zvmlinux ++ mv $(obj)/zvmlinux $(images)/zImage ++ $(OBJCOPY) -O srec $(images)/zImage $(images)/zImage.srec ++ $(OBJCOPY) -O binary $(images)/zImage $(images)/zImage.bin ++ ++zImage.flash: zImage ++ ( \ ++ flash=${FLASH_LOAD_ADDR} ; \ ++ ram=${RAM_RUN_ADDR} ; \ ++ adjust=$$[ $$flash - $$ram ] ; \ ++ $(OBJCOPY) -O srec --adjust-vma `printf '0x%08x' $$adjust` \ ++ $(images)/zImage $(images)/zImage.flash.srec ; \ ++ ) +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/common/au1k_uart.c linux-2.6.16.7.new/arch/mips/boot/compressed/common/au1k_uart.c +--- linux-2.6.16.7/arch/mips/boot/compressed/common/au1k_uart.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/common/au1k_uart.c 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,103 @@ ++/* ++ * BRIEF MODULE DESCRIPTION ++ * Simple Au1000 uart routines. ++ * ++ * Copyright 2001 MontaVista Software Inc. ++ * Author: MontaVista Software, Inc. ++ * ppopov@mvista.com or source@mvista.com ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++#include <linux/config.h> ++#include <asm/io.h> ++#include <asm/mach-au1x00/au1000.h> ++#include "ns16550.h" ++ ++typedef unsigned char uint8; ++typedef unsigned int uint32; ++ ++#define UART16550_BAUD_2400 2400 ++#define UART16550_BAUD_4800 4800 ++#define UART16550_BAUD_9600 9600 ++#define UART16550_BAUD_19200 19200 ++#define UART16550_BAUD_38400 38400 ++#define UART16550_BAUD_57600 57600 ++#define UART16550_BAUD_115200 115200 ++ ++#define UART16550_PARITY_NONE 0 ++#define UART16550_PARITY_ODD 0x08 ++#define UART16550_PARITY_EVEN 0x18 ++#define UART16550_PARITY_MARK 0x28 ++#define UART16550_PARITY_SPACE 0x38 ++ ++#define UART16550_DATA_5BIT 0x0 ++#define UART16550_DATA_6BIT 0x1 ++#define UART16550_DATA_7BIT 0x2 ++#define UART16550_DATA_8BIT 0x3 ++ ++#define UART16550_STOP_1BIT 0x0 ++#define UART16550_STOP_2BIT 0x4 ++ ++/* It would be nice if we had a better way to do this. ++ * It could be a variable defined in one of the board specific files. ++ */ ++#undef UART_BASE ++#ifdef CONFIG_COGENT_CSB250 ++#define UART_BASE UART3_ADDR ++#else ++#define UART_BASE UART0_ADDR ++#endif ++ ++/* memory-mapped read/write of the port */ ++#define UART16550_READ(y) (au_readl(UART_BASE + y) & 0xff) ++#define UART16550_WRITE(y,z) (au_writel(z&0xff, UART_BASE + y)) ++ ++/* ++ * We use uart 0, which is already initialized by ++ * yamon. ++ */ ++volatile struct NS16550 * ++serial_init(int chan) ++{ ++ volatile struct NS16550 *com_port; ++ com_port = (struct NS16550 *) UART_BASE; ++ return (com_port); ++} ++ ++void ++serial_putc(volatile struct NS16550 *com_port, unsigned char c) ++{ ++ while ((UART16550_READ(UART_LSR)&0x40) == 0); ++ UART16550_WRITE(UART_TX, c); ++} ++ ++unsigned char ++serial_getc(volatile struct NS16550 *com_port) ++{ ++ while((UART16550_READ(UART_LSR) & 0x1) == 0); ++ return UART16550_READ(UART_RX); ++} ++ ++int ++serial_tstc(volatile struct NS16550 *com_port) ++{ ++ return((UART16550_READ(UART_LSR) & LSR_DR) != 0); ++} +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/common/dummy.c linux-2.6.16.7.new/arch/mips/boot/compressed/common/dummy.c +--- linux-2.6.16.7/arch/mips/boot/compressed/common/dummy.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/common/dummy.c 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,4 @@ ++int main(void) ++{ ++ return 0; ++} +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/common/Makefile linux-2.6.16.7.new/arch/mips/boot/compressed/common/Makefile +--- linux-2.6.16.7/arch/mips/boot/compressed/common/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/common/Makefile 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,14 @@ ++# ++# arch/mips/boot/compressed/common/Makefile ++# ++# This file is subject to the terms and conditions of the GNU General Public ++# License. See the file "COPYING" in the main directory of this archive ++# for more details. ++# ++# Tom Rini January 2001 ++# ++# Pete Popov, 2004 ++# ++ ++lib-y := misc-common.o no_initrd.o dummy.o ++lib-$(CONFIG_SOC_AU1X00) += au1k_uart.o +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/common/misc-common.c linux-2.6.16.7.new/arch/mips/boot/compressed/common/misc-common.c +--- linux-2.6.16.7/arch/mips/boot/compressed/common/misc-common.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/common/misc-common.c 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,434 @@ ++/* ++ * arch/mips/boot/compressed/common/misc-common.c ++ * ++ * Misc. bootloader code (almost) all platforms can use ++ * ++ * Author: Johnnie Peters <jpeters@mvista.com> ++ * Editor: Tom Rini <trini@mvista.com> ++ * ++ * Derived from arch/ppc/boot/prep/misc.c ++ * ++ * Ported by Pete Popov <ppopov@mvista.com> to ++ * support mips board(s). I also got rid of the vga console ++ * code. ++ * ++ * Copyright 2000-2001 MontaVista Software Inc. ++ * ++ * Ported to MIPS 2.6 by Pete Popov, <ppopov@embeddedalley.com> ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#include <stdarg.h> /* for va_ bits */ ++#include <linux/config.h> ++#include <linux/string.h> ++#include <linux/zlib.h> ++ ++extern char *avail_ram; ++extern char *end_avail; ++extern char _end[]; ++ ++void puts(const char *); ++void putc(const char c); ++void puthex(unsigned long val); ++void _bcopy(char *src, char *dst, int len); ++void gunzip(void *, int, unsigned char *, int *); ++static int _cvt(unsigned long val, char *buf, long radix, char *digits); ++ ++void _vprintk(void(*)(const char), const char *, va_list ap); ++ ++struct NS16550 *com_port; ++ ++int serial_tstc(volatile struct NS16550 *); ++unsigned char serial_getc(volatile struct NS16550 *); ++void serial_putc(volatile struct NS16550 *, unsigned char); ++ ++void pause(void) ++{ ++ puts("pause\n"); ++} ++ ++void exit(void) ++{ ++ puts("exit\n"); ++ while(1); ++} ++ ++int tstc(void) ++{ ++ return (serial_tstc(com_port)); ++} ++ ++int getc(void) ++{ ++ while (1) { ++ if (serial_tstc(com_port)) ++ return (serial_getc(com_port)); ++ } ++} ++ ++void ++putc(const char c) ++{ ++ serial_putc(com_port, c); ++ if ( c == '\n' ) ++ serial_putc(com_port, '\r'); ++} ++ ++void puts(const char *s) ++{ ++ char c; ++ while ( ( c = *s++ ) != '\0' ) { ++ serial_putc(com_port, c); ++ if ( c == '\n' ) serial_putc(com_port, '\r'); ++ } ++} ++ ++void error(char *x) ++{ ++ puts("\n\n"); ++ puts(x); ++ puts("\n\n -- System halted"); ++ ++ while(1); /* Halt */ ++} ++ ++static void *zalloc(unsigned size) ++{ ++ void *p = avail_ram; ++ ++ size = (size + 7) & -8; ++ avail_ram += size; ++ if (avail_ram > end_avail) { ++ puts("oops... out of memory\n"); ++ pause(); ++ } ++ return p; ++} ++ ++ ++#define HEAD_CRC 2 ++#define EXTRA_FIELD 4 ++#define ORIG_NAME 8 ++#define COMMENT 0x10 ++#define RESERVED 0xe0 ++ ++#define DEFLATED 8 ++ ++void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp) ++{ ++ z_stream s; ++ int r, i, flags; ++ ++ /* skip header */ ++ i = 10; ++ flags = src[3]; ++ if (src[2] != Z_DEFLATED || (flags & RESERVED) != 0) { ++ puts("bad gzipped data\n"); ++ exit(); ++ } ++ if ((flags & EXTRA_FIELD) != 0) ++ i = 12 + src[10] + (src[11] << 8); ++ if ((flags & ORIG_NAME) != 0) ++ while (src[i++] != 0) ++ ; ++ if ((flags & COMMENT) != 0) ++ while (src[i++] != 0) ++ ; ++ if ((flags & HEAD_CRC) != 0) ++ i += 2; ++ if (i >= *lenp) { ++ puts("gunzip: ran out of data in header\n"); ++ exit(); ++ } ++ ++ /* Initialize ourself. */ ++ s.workspace = zalloc(zlib_inflate_workspacesize()); ++ r = zlib_inflateInit2(&s, -MAX_WBITS); ++ if (r != Z_OK) { ++ puts("zlib_inflateInit2 returned "); puthex(r); puts("\n"); ++ exit(); ++ } ++ s.next_in = src + i; ++ s.avail_in = *lenp - i; ++ s.next_out = dst; ++ s.avail_out = dstlen; ++ r = zlib_inflate(&s, Z_FINISH); ++ if (r != Z_OK && r != Z_STREAM_END) { ++ puts("inflate returned "); puthex(r); puts("\n"); ++ exit(); ++ } ++ *lenp = s.next_out - (unsigned char *) dst; ++ zlib_inflateEnd(&s); ++} ++ ++void ++puthex(unsigned long val) ++{ ++ ++ unsigned char buf[10]; ++ int i; ++ for (i = 7; i >= 0; i--) ++ { ++ buf[i] = "0123456789ABCDEF"[val & 0x0F]; ++ val >>= 4; ++ } ++ buf[8] = '\0'; ++ puts(buf); ++} ++ ++#define FALSE 0 ++#define TRUE 1 ++ ++void ++_printk(char const *fmt, ...) ++{ ++ va_list ap; ++ ++ va_start(ap, fmt); ++ _vprintk(putc, fmt, ap); ++ va_end(ap); ++ return; ++} ++ ++#define is_digit(c) ((c >= '0') && (c <= '9')) ++ ++void ++_vprintk(void(*putc)(const char), const char *fmt0, va_list ap) ++{ ++ char c, sign, *cp = 0; ++ int left_prec, right_prec, zero_fill, length = 0, pad, pad_on_right; ++ char buf[32]; ++ long val; ++ while ((c = *fmt0++)) ++ { ++ if (c == '%') ++ { ++ c = *fmt0++; ++ left_prec = right_prec = pad_on_right = 0; ++ if (c == '-') ++ { ++ c = *fmt0++; ++ pad_on_right++; ++ } ++ if (c == '0') ++ { ++ zero_fill = TRUE; ++ c = *fmt0++; ++ } else ++ { ++ zero_fill = FALSE; ++ } ++ while (is_digit(c)) ++ { ++ left_prec = (left_prec * 10) + (c - '0'); ++ c = *fmt0++; ++ } ++ if (c == '.') ++ { ++ c = *fmt0++; ++ zero_fill++; ++ while (is_digit(c)) ++ { ++ right_prec = (right_prec * 10) + (c - '0'); ++ c = *fmt0++; ++ } ++ } else ++ { ++ right_prec = left_prec; ++ } ++ sign = '\0'; ++ switch (c) ++ { ++ case 'd': ++ case 'x': ++ case 'X': ++ val = va_arg(ap, long); ++ switch (c) ++ { ++ case 'd': ++ if (val < 0) ++ { ++ sign = '-'; ++ val = -val; ++ } ++ length = _cvt(val, buf, 10, "0123456789"); ++ break; ++ case 'x': ++ length = _cvt(val, buf, 16, "0123456789abcdef"); ++ break; ++ case 'X': ++ length = _cvt(val, buf, 16, "0123456789ABCDEF"); ++ break; ++ } ++ cp = buf; ++ break; ++ case 's': ++ cp = va_arg(ap, char *); ++ length = strlen(cp); ++ break; ++ case 'c': ++ c = va_arg(ap, long /*char*/); ++ (*putc)(c); ++ continue; ++ default: ++ (*putc)('?'); ++ } ++ pad = left_prec - length; ++ if (sign != '\0') ++ { ++ pad--; ++ } ++ if (zero_fill) ++ { ++ c = '0'; ++ if (sign != '\0') ++ { ++ (*putc)(sign); ++ sign = '\0'; ++ } ++ } else ++ { ++ c = ' '; ++ } ++ if (!pad_on_right) ++ { ++ while (pad-- > 0) ++ { ++ (*putc)(c); ++ } ++ } ++ if (sign != '\0') ++ { ++ (*putc)(sign); ++ } ++ while (length-- > 0) ++ { ++ (*putc)(c = *cp++); ++ if (c == '\n') ++ { ++ (*putc)('\r'); ++ } ++ } ++ if (pad_on_right) ++ { ++ while (pad-- > 0) ++ { ++ (*putc)(c); ++ } ++ } ++ } else ++ { ++ (*putc)(c); ++ if (c == '\n') ++ { ++ (*putc)('\r'); ++ } ++ } ++ } ++} ++ ++int ++_cvt(unsigned long val, char *buf, long radix, char *digits) ++{ ++ char temp[80]; ++ char *cp = temp; ++ int length = 0; ++ if (val == 0) ++ { /* Special case */ ++ *cp++ = '0'; ++ } else ++ while (val) ++ { ++ *cp++ = digits[val % radix]; ++ val /= radix; ++ } ++ while (cp != temp) ++ { ++ *buf++ = *--cp; ++ length++; ++ } ++ *buf = '\0'; ++ return (length); ++} ++ ++void ++_dump_buf_with_offset(unsigned char *p, int s, unsigned char *base) ++{ ++ int i, c; ++ if ((unsigned int)s > (unsigned int)p) ++ { ++ s = (unsigned int)s - (unsigned int)p; ++ } ++ while (s > 0) ++ { ++ if (base) ++ { ++ _printk("%06X: ", (int)p - (int)base); ++ } else ++ { ++ _printk("%06X: ", p); ++ } ++ for (i = 0; i < 16; i++) ++ { ++ if (i < s) ++ { ++ _printk("%02X", p[i] & 0xFF); ++ } else ++ { ++ _printk(" "); ++ } ++ if ((i % 2) == 1) _printk(" "); ++ if ((i % 8) == 7) _printk(" "); ++ } ++ _printk(" |"); ++ for (i = 0; i < 16; i++) ++ { ++ if (i < s) ++ { ++ c = p[i] & 0xFF; ++ if ((c < 0x20) || (c >= 0x7F)) c = '.'; ++ } else ++ { ++ c = ' '; ++ } ++ _printk("%c", c); ++ } ++ _printk("|\n"); ++ s -= 16; ++ p += 16; ++ } ++} ++ ++void ++_dump_buf(unsigned char *p, int s) ++{ ++ _printk("\n"); ++ _dump_buf_with_offset(p, s, 0); ++} ++ ++/* ++ * Local variables: ++ * c-indent-level: 8 ++ * c-basic-offset: 8 ++ * tab-width: 8 ++ * End: ++ */ +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/common/misc-simple.c linux-2.6.16.7.new/arch/mips/boot/compressed/common/misc-simple.c +--- linux-2.6.16.7/arch/mips/boot/compressed/common/misc-simple.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/common/misc-simple.c 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,122 @@ ++/* ++ * arch/mips/zboot/common/misc-simple.c ++ * ++ * Misc. bootloader code for many machines. This assumes you have are using ++ * a 6xx/7xx/74xx CPU in your machine. This assumes the chunk of memory ++ * below 8MB is free. Finally, it assumes you have a NS16550-style uart for ++ * your serial console. If a machine meets these requirements, it can quite ++ * likely use this code during boot. ++ * ++ * Author: Matt Porter <mporter@mvista.com> ++ * Derived from arch/ppc/boot/prep/misc.c ++ * ++ * Copyright 2001 MontaVista Software Inc. ++ * ++ * 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. ++ */ ++ ++#include <linux/types.h> ++#include <linux/elf.h> ++#include <linux/config.h> ++ ++#include <asm/page.h> ++ ++#include "linux/zlib.h" ++ ++extern struct NS16550 *com_port; ++ ++char *avail_ram; ++char *end_avail; ++extern char _end[]; ++char *zimage_start; ++ ++#ifdef CONFIG_CMDLINE ++#define CMDLINE CONFIG_CMDLINE ++#else ++#define CMDLINE "" ++#endif ++char cmd_preset[] = CMDLINE; ++char cmd_buf[256]; ++char *cmd_line = cmd_buf; ++ ++/* The linker tells us where the image is. ++*/ ++extern unsigned char __image_begin, __image_end; ++extern unsigned char __ramdisk_begin, __ramdisk_end; ++unsigned long initrd_size; ++ ++extern void puts(const char *); ++extern void putc(const char c); ++extern void puthex(unsigned long val); ++extern void *memcpy(void * __dest, __const void * __src, ++ __kernel_size_t __n); ++extern void gunzip(void *, int, unsigned char *, int *); ++extern void udelay(long delay); ++extern int tstc(void); ++extern int getc(void); ++extern volatile struct NS16550 *serial_init(int chan); ++ ++void ++decompress_kernel(unsigned long load_addr, int num_words, ++ unsigned long cksum, unsigned long *sp) ++{ ++ extern unsigned long start; ++ int zimage_size; ++ ++ com_port = (struct NS16550 *)serial_init(0); ++ ++ initrd_size = (unsigned long)(&__ramdisk_end) - ++ (unsigned long)(&__ramdisk_begin); ++ ++ /* ++ * Reveal where we were loaded at and where we ++ * were relocated to. ++ */ ++ puts("loaded at: "); puthex(load_addr); ++ puts(" "); puthex((unsigned long)(load_addr + (4*num_words))); puts("\n"); ++ if ( (unsigned long)load_addr != (unsigned long)&start ) ++ { ++ puts("relocated to: "); puthex((unsigned long)&start); ++ puts(" "); ++ puthex((unsigned long)((unsigned long)&start + (4*num_words))); ++ puts("\n"); ++ } ++ ++ /* ++ * We link ourself to an arbitrary low address. When we run, we ++ * relocate outself to that address. __image_being points to ++ * the part of the image where the zImage is. -- Tom ++ */ ++ zimage_start = (char *)(unsigned long)(&__image_begin); ++ zimage_size = (unsigned long)(&__image_end) - ++ (unsigned long)(&__image_begin); ++ ++ /* ++ * The zImage and initrd will be between start and _end, so they've ++ * already been moved once. We're good to go now. -- Tom ++ */ ++ puts("zimage at: "); puthex((unsigned long)zimage_start); ++ puts(" "); puthex((unsigned long)(zimage_size+zimage_start)); ++ puts("\n"); ++ ++ if ( initrd_size ) { ++ puts("initrd at: "); ++ puthex((unsigned long)(&__ramdisk_begin)); ++ puts(" "); puthex((unsigned long)(&__ramdisk_end));puts("\n"); ++ } ++ ++ /* assume the chunk below 8M is free */ ++ avail_ram = (char *)AVAIL_RAM_START; ++ end_avail = (char *)AVAIL_RAM_END; ++ ++ /* Display standard Linux/MIPS boot prompt for kernel args */ ++ puts("Uncompressing Linux at load address "); ++ puthex(LOADADDR); ++ puts("\n"); ++ /* I don't like this hard coded gunzip size (fixme) */ ++ gunzip((void *)LOADADDR, 0x400000, zimage_start, &zimage_size); ++ puts("Now booting the kernel\n"); ++} +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/common/no_initrd.c linux-2.6.16.7.new/arch/mips/boot/compressed/common/no_initrd.c +--- linux-2.6.16.7/arch/mips/boot/compressed/common/no_initrd.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/common/no_initrd.c 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,2 @@ ++char initrd_data[1]; ++int initrd_len = 0; +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/images/Makefile linux-2.6.16.7.new/arch/mips/boot/compressed/images/Makefile +--- linux-2.6.16.7/arch/mips/boot/compressed/images/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/images/Makefile 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,17 @@ ++ ++# ++# This dir holds all of the images for MIPS machines. ++# Tom Rini January 2001 ++# Pete Popov 2004 ++ ++extra-y := vmlinux.bin vmlinux.gz ++ ++OBJCOPYFLAGS_vmlinux.bin := -O binary ++$(obj)/vmlinux.bin: vmlinux FORCE ++ $(call if_changed,objcopy) ++ ++$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE ++ $(call if_changed,gzip) ++ ++# Files generated that shall be removed upon make clean ++clean-files := vmlinux* zImage* +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/include/nonstdio.h linux-2.6.16.7.new/arch/mips/boot/compressed/include/nonstdio.h +--- linux-2.6.16.7/arch/mips/boot/compressed/include/nonstdio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/include/nonstdio.h 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,18 @@ ++/* ++ * Copyright (C) Paul Mackerras 1997. ++ * ++ * 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. ++ */ ++typedef int FILE; ++extern FILE *stdin, *stdout; ++#define NULL ((void *)0) ++#define EOF (-1) ++#define fopen(n, m) NULL ++#define fflush(f) 0 ++#define fclose(f) 0 ++extern char *fgets(); ++ ++#define perror(s) printf("%s: no files!\n", (s)) +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/include/ns16550.h linux-2.6.16.7.new/arch/mips/boot/compressed/include/ns16550.h +--- linux-2.6.16.7/arch/mips/boot/compressed/include/ns16550.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/include/ns16550.h 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,46 @@ ++/* ++ * NS16550 Serial Port ++ */ ++ ++/* ++ * Figure out which file will have the definitons of COMx ++ */ ++ ++/* Some machines have their uart registers 16 bytes apart. Most don't. ++ * TODO: Make this work like drivers/char/serial does - Tom */ ++#if !defined(UART_REG_PAD) ++#define UART_REG_PAD(x) ++#endif ++ ++struct NS16550 ++ { ++ unsigned char rbr; /* 0 */ ++ UART_REG_PAD(rbr) ++ unsigned char ier; /* 1 */ ++ UART_REG_PAD(ier) ++ unsigned char fcr; /* 2 */ ++ UART_REG_PAD(fcr) ++ unsigned char lcr; /* 3 */ ++ UART_REG_PAD(lcr) ++ unsigned char mcr; /* 4 */ ++ UART_REG_PAD(mcr) ++ unsigned char lsr; /* 5 */ ++ UART_REG_PAD(lsr) ++ unsigned char msr; /* 6 */ ++ UART_REG_PAD(msr) ++ unsigned char scr; /* 7 */ ++ }; ++ ++#define thr rbr ++#define iir fcr ++#define dll rbr ++#define dlm ier ++ ++#define LSR_DR 0x01 /* Data ready */ ++#define LSR_OE 0x02 /* Overrun */ ++#define LSR_PE 0x04 /* Parity error */ ++#define LSR_FE 0x08 /* Framing error */ ++#define LSR_BI 0x10 /* Break */ ++#define LSR_THRE 0x20 /* Xmit holding register empty */ ++#define LSR_TEMT 0x40 /* Xmitter empty */ ++#define LSR_ERR 0x80 /* Error */ +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/include/pb1000_serial.h linux-2.6.16.7.new/arch/mips/boot/compressed/include/pb1000_serial.h +--- linux-2.6.16.7/arch/mips/boot/compressed/include/pb1000_serial.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/include/pb1000_serial.h 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,20 @@ ++/* ++ * arch/ppc/boot/include/sandpoint_serial.h ++ * ++ * Location of the COM ports on Motorola SPS Sandpoint machines ++ * ++ * Author: Mark A. Greer ++ * mgreer@mvista.com ++ * ++ * Copyright 2001 MontaVista Software Inc. ++ * ++ * 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. ++ */ ++ ++#define COM1 0xfe0003f8 ++#define COM2 0xfe0002f8 ++#define COM3 0x00000000 /* No COM3 */ ++#define COM4 0x00000000 /* No COM4 */ +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/ld.script linux-2.6.16.7.new/arch/mips/boot/compressed/ld.script +--- linux-2.6.16.7/arch/mips/boot/compressed/ld.script 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/ld.script 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,151 @@ ++OUTPUT_ARCH(mips) ++ENTRY(start) ++SECTIONS ++{ ++ /* Read-only sections, merged into text segment: */ ++ /* . = 0x81000000; */ ++ .init : { *(.init) } =0 ++ .text : ++ { ++ _ftext = . ; ++ *(.text) ++ *(.rodata) *(.rodata.*) ++ *(.rodata1) ++ /* .gnu.warning sections are handled specially by elf32.em. */ ++ *(.gnu.warning) ++ } =0 ++ .kstrtab : { *(.kstrtab) } ++ ++ . = ALIGN(16); /* Exception table */ ++ __start___ex_table = .; ++ __ex_table : { *(__ex_table) } ++ __stop___ex_table = .; ++ ++ __start___dbe_table = .; /* Exception table for data bus errors */ ++ __dbe_table : { *(__dbe_table) } ++ __stop___dbe_table = .; ++ ++ __start___ksymtab = .; /* Kernel symbol table */ ++ __ksymtab : { *(__ksymtab) } ++ __stop___ksymtab = .; ++ ++ _etext = .; ++ ++ . = ALIGN(8192); ++ .data.init_task : { *(.data.init_task) } ++ ++ /* Startup code */ ++ . = ALIGN(4096); ++ __init_begin = .; ++ .text.init : { *(.text.init) } ++ .data.init : { *(.data.init) } ++ . = ALIGN(16); ++ __setup_start = .; ++ .setup.init : { *(.setup.init) } ++ __setup_end = .; ++ __initcall_start = .; ++ .initcall.init : { *(.initcall.init) } ++ __initcall_end = .; ++ . = ALIGN(4096); /* Align double page for init_task_union */ ++ __init_end = .; ++ ++ . = ALIGN(4096); ++ .data.page_aligned : { *(.data.idt) } ++ ++ . = ALIGN(32); ++ .data.cacheline_aligned : { *(.data.cacheline_aligned) } ++ ++ .fini : { *(.fini) } =0 ++ .reginfo : { *(.reginfo) } ++ /* Adjust the address for the data segment. We want to adjust up to ++ the same address within the page on the next page up. It would ++ be more correct to do this: ++ . = .; ++ The current expression does not correctly handle the case of a ++ text segment ending precisely at the end of a page; it causes the ++ data segment to skip a page. The above expression does not have ++ this problem, but it will currently (2/95) cause BFD to allocate ++ a single segment, combining both text and data, for this case. ++ This will prevent the text segment from being shared among ++ multiple executions of the program; I think that is more ++ important than losing a page of the virtual address space (note ++ that no actual memory is lost; the page which is skipped can not ++ be referenced). */ ++ . = .; ++ .data : ++ { ++ _fdata = . ; ++ *(.data) ++ ++ /* Put the compressed image here, so bss is on the end. */ ++ __image_begin = .; ++ *(.image) ++ __image_end = .; ++ /* Align the initial ramdisk image (INITRD) on page boundaries. */ ++ . = ALIGN(4096); ++ __ramdisk_begin = .; ++ *(.initrd) ++ __ramdisk_end = .; ++ . = ALIGN(4096); ++ ++ CONSTRUCTORS ++ } ++ .data1 : { *(.data1) } ++ _gp = . + 0x8000; ++ .lit8 : { *(.lit8) } ++ .lit4 : { *(.lit4) } ++ .ctors : { *(.ctors) } ++ .dtors : { *(.dtors) } ++ .got : { *(.got.plt) *(.got) } ++ .dynamic : { *(.dynamic) } ++ /* We want the small data sections together, so single-instruction offsets ++ can access them all, and initialized data all before uninitialized, so ++ we can shorten the on-disk segment size. */ ++ .sdata : { *(.sdata) } ++ . = ALIGN(4); ++ _edata = .; ++ PROVIDE (edata = .); ++ ++ __bss_start = .; ++ _fbss = .; ++ .sbss : { *(.sbss) *(.scommon) } ++ .bss : ++ { ++ *(.dynbss) ++ *(.bss) ++ *(COMMON) ++ . = ALIGN(4); ++ _end = . ; ++ PROVIDE (end = .); ++ } ++ ++ /* Sections to be discarded */ ++ /DISCARD/ : ++ { ++ *(.text.exit) ++ *(.data.exit) ++ *(.exitcall.exit) ++ } ++ ++ /* This is the MIPS specific mdebug section. */ ++ .mdebug : { *(.mdebug) } ++ /* These are needed for ELF backends which have not yet been ++ converted to the new style linker. */ ++ .stab 0 : { *(.stab) } ++ .stabstr 0 : { *(.stabstr) } ++ /* DWARF debug sections. ++ Symbols in the .debug DWARF section are relative to the beginning of the ++ section so we begin .debug at 0. It's not clear yet what needs to happen ++ for the others. */ ++ .debug 0 : { *(.debug) } ++ .debug_srcinfo 0 : { *(.debug_srcinfo) } ++ .debug_aranges 0 : { *(.debug_aranges) } ++ .debug_pubnames 0 : { *(.debug_pubnames) } ++ .debug_sfnames 0 : { *(.debug_sfnames) } ++ .line 0 : { *(.line) } ++ /* These must appear regardless of . */ ++ .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } ++ .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } ++ .comment : { *(.comment) } ++ .note : { *(.note) } ++} +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/lib/Makefile linux-2.6.16.7.new/arch/mips/boot/compressed/lib/Makefile +--- linux-2.6.16.7/arch/mips/boot/compressed/lib/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/lib/Makefile 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,11 @@ ++ ++# ++# Makefile for some libs needed by zImage. ++# ++ ++lib-y := $(addprefix ../../../../../lib/zlib_inflate/, \ ++ infblock.o infcodes.o inffast.o inflate.o inftrees.o infutil.o) \ ++ $(addprefix ../../../../../lib/, ctype.o string.o) \ ++ $(addprefix ../../../../../arch/mips/lib/, memcpy.o) \ ++ ++ +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/Makefile linux-2.6.16.7.new/arch/mips/boot/compressed/Makefile +--- linux-2.6.16.7/arch/mips/boot/compressed/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/Makefile 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,32 @@ ++ ++# ++# arch/mips/boot/compressed/Makefile ++# ++# This file is subject to the terms and conditions of the GNU General Public ++# License. See the file "COPYING" in the main directory of this archive ++# for more details. ++# ++# Copyright (C) 1994 by Linus Torvalds ++# Adapted for PowerPC by Gary Thomas ++# modified by Cort (cort@cs.nmt.edu) ++# ++# Ported to MIPS by Pete Popov, ppopov@embeddedalley.com ++# ++ ++boot := arch/mips/boot ++compressed := arch/mips/boot/compressed ++ ++CFLAGS += -fno-builtin -D__BOOTER__ -I$(compressed)/include ++ ++BOOT_TARGETS = zImage zImage.flash ++ ++bootdir-$(CONFIG_SOC_AU1X00) := au1xxx ++subdir-y := common lib images ++ ++.PHONY: $(BOOT_TARGETS) $(bootdir-y) ++ ++$(BOOT_TARGETS): $(bootdir-y) ++ ++$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \ ++ $(addprefix $(obj)/,$(hostprogs-y)) ++ $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/utils/entry linux-2.6.16.7.new/arch/mips/boot/compressed/utils/entry +--- linux-2.6.16.7/arch/mips/boot/compressed/utils/entry 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/utils/entry 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,12 @@ ++#!/bin/sh ++ ++# grab the kernel_entry address from the vmlinux elf image ++entry=`$1 $2 | grep kernel_entry` ++ ++fs=`echo $entry | grep ffffffff` # check toolchain output ++ ++if [ -n "$fs" ]; then ++ echo "0x"`$1 $2 | grep kernel_entry | cut -c9- | awk '{print $1}'` ++else ++ echo "0x"`$1 $2 | grep kernel_entry | cut -c1- | awk '{print $1}'` ++fi +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/utils/offset linux-2.6.16.7.new/arch/mips/boot/compressed/utils/offset +--- linux-2.6.16.7/arch/mips/boot/compressed/utils/offset 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/utils/offset 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,3 @@ ++#!/bin/sh ++ ++echo "0x"`$1 -h $2 | grep $3 | grep -v zvmlinux| awk '{print $6}'` +diff -urN linux-2.6.16.7/arch/mips/boot/compressed/utils/size linux-2.6.16.7.new/arch/mips/boot/compressed/utils/size +--- linux-2.6.16.7/arch/mips/boot/compressed/utils/size 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/boot/compressed/utils/size 2006-05-04 23:08:18.000000000 +0200 +@@ -0,0 +1,4 @@ ++#!/bin/sh ++ ++OFFSET=`$1 -h $2 | grep $3 | grep -v zvmlinux | awk '{print $3}'` ++echo "0x"$OFFSET +diff -urN linux-2.6.16.7/arch/mips/boot/Makefile linux-2.6.16.7.new/arch/mips/boot/Makefile +--- linux-2.6.16.7/arch/mips/boot/Makefile 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/arch/mips/boot/Makefile 2006-05-04 23:08:18.000000000 +0200 +@@ -16,6 +16,7 @@ + E2EFLAGS = + endif + ++ + # + # Drop some uninteresting sections in the kernel. + # This is only relevant for ELF kernels but doesn't hurt a.out +@@ -25,7 +26,10 @@ + + VMLINUX = vmlinux + +-all: vmlinux.ecoff vmlinux.srec addinitrd ++ZBOOT_TARGETS = zImage zImage.flash ++bootdir-y := compressed ++ ++all: vmlinux.ecoff vmlinux.srec addinitrd zImage + + vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) + $(obj)/elf2ecoff $(VMLINUX) vmlinux.ecoff $(E2EFLAGS) +@@ -51,3 +55,11 @@ + vmlinux.bin \ + vmlinux.ecoff \ + vmlinux.srec ++ ++.PHONY: $(ZBOOT_TARGETS) $(bootdir-y) ++ ++$(ZBOOT_TARGETS): $(bootdir-y) ++ ++$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \ ++ $(addprefix $(obj)/,$(hostprogs-y)) ++ $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) +diff -urN linux-2.6.16.7/arch/mips/Makefile linux-2.6.16.7.new/arch/mips/Makefile +--- linux-2.6.16.7/arch/mips/Makefile 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/arch/mips/Makefile 2006-05-04 23:09:44.000000000 +0200 +@@ -831,6 +831,10 @@ + all: vmlinux.ecoff + endif + ++ifdef CONFIG_MIPS_MTX1 ++all: vmlinux.srec zImage zImage.flash ++endif ++ + vmlinux.bin: $(vmlinux-32) + +@$(call makeboot,$@) + +@@ -840,6 +844,12 @@ + vmlinux.srec: $(vmlinux-32) + +@$(call makeboot,$@) + ++zImage: vmlinux ++ +@$(call makeboot,$@) ++ ++zImage.flash: vmlinux ++ +@$(call makeboot,$@) ++ + CLEAN_FILES += vmlinux.ecoff \ + vmlinux.srec \ + vmlinux.rm200.tmp \ +@@ -848,6 +858,7 @@ + archclean: + @$(MAKE) $(clean)=arch/mips/boot + @$(MAKE) $(clean)=arch/mips/lasat ++ @$(MAKE) $(clean)=arch/mips/boot/compressed + + CLEAN_FILES += vmlinux.32 \ + vmlinux.64 \ diff --git a/openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch b/openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch new file mode 100644 index 00000000000..c7e329b2950 --- /dev/null +++ b/openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch @@ -0,0 +1,279 @@ +diff -urN linux-2.6.16.7/drivers/char/watchdog/Kconfig linux-2.6.16.7.new/drivers/char/watchdog/Kconfig +--- linux-2.6.16.7/drivers/char/watchdog/Kconfig 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/drivers/char/watchdog/Kconfig 2006-04-22 23:23:53.000000000 +0200 +@@ -460,6 +460,14 @@ + timer expired and no process has written to /dev/watchdog during + that time. + ++config MTX1_WATCHDOG ++ tristate "MTX-1 Hardware Watchdog" ++ depends on WATCHDOG && MIPS_MTX1 ++ help ++ Hardware driver for the AccessCube MTX-1 watchdog. This is a ++ watchdog timer that will reboot the machine after a 100 seconds ++ timer expired. ++ + # S390 Architecture + + config ZVM_WATCHDOG +diff -urN linux-2.6.16.7/drivers/char/watchdog/Makefile linux-2.6.16.7.new/drivers/char/watchdog/Makefile +--- linux-2.6.16.7/drivers/char/watchdog/Makefile 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/drivers/char/watchdog/Makefile 2006-04-22 23:21:18.000000000 +0200 +@@ -65,6 +65,7 @@ + + # MIPS Architecture + obj-$(CONFIG_INDYDOG) += indydog.o ++obj-$(CONFIG_MTX1_WATCHDOG) += mtx-1_watchdog.o + + # S390 Architecture + +diff -urN linux-2.6.16.7/drivers/char/watchdog/mtx-1_watchdog.c linux-2.6.16.7.new/drivers/char/watchdog/mtx-1_watchdog.c +--- linux-2.6.16.7/drivers/char/watchdog/mtx-1_watchdog.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/drivers/char/watchdog/mtx-1_watchdog.c 2006-04-22 23:20:53.000000000 +0200 +@@ -0,0 +1,246 @@ ++/* ++ * Driver for the MTX-1 Watchdog. ++ * ++ * (c) Copyright 2005 4G Systems <info@4g-systems.biz>, All Rights Reserved. ++ * http://www.4g-systems.biz ++ * ++ * 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. ++ * ++ * Neither Michael Stickel nor 4G Systems admit liability nor provide ++ * warranty for any of this software. This material is provided ++ * "AS-IS" and at no charge. ++ * ++ * (c) Copyright 2005 4G Systems <info@4g-systems.biz> ++ * ++ * Release 0.01. ++ * ++ * Author: Michael Stickel michael.stickel@4g-systems.biz ++ * ++ * ++ * The Watchdog is configured to reset the MTX-1 ++ * if it is not triggered for 100 seconds. ++ * It should not be triggered more often than 1.6 seconds. ++ * ++ * A timer triggers the watchdog every 5 seconds, until ++ * it is opened for the first time. After the first open ++ * it MUST be triggered every 2..95 seconds. ++ */ ++#include <linux/config.h> ++#include <linux/module.h> ++#include <linux/version.h> ++#include <linux/types.h> ++#include <linux/errno.h> ++#include <linux/kernel.h> ++#include <linux/sched.h> ++#include <linux/miscdevice.h> ++#include <linux/watchdog.h> ++#include <linux/slab.h> ++#include <linux/init.h> ++#include <asm/uaccess.h> ++#include <linux/fs.h> ++ ++#include <asm/mach-au1x00/au1000.h> ++ ++#ifndef FALSE ++# define FALSE (0) ++#endif ++ ++#ifndef TRUE ++# define TRUE (!FALSE) ++#endif ++ ++ ++//---------[ Hardware Functions ]----------------- ++ ++static void mtx1_trigger_wd (void) ++{ ++ /* ++ * toggle GPIO2_15 ++ */ ++ ++ u32 tmp = au_readl(GPIO2_DIR); ++ tmp = (tmp & ~(1<<15)) | ((~tmp) & (1<<15)); ++ au_writel (tmp, GPIO2_DIR); ++} ++ ++static void mtx1_enable_wd (void) ++{ ++ au_writel (au_readl(GPIO2_DIR) | (u32)(1<<15), GPIO2_DIR); ++} ++ ++static void mtx1_disable_wd (void) ++{ ++ au_writel (au_readl(GPIO2_DIR) & ~((u32)(1<<15)), GPIO2_DIR); ++} ++ ++ ++//---------[ Timer Functions ]----------------- ++ ++static struct timer_list wd_trigger_timer; ++static char timer_is_running = FALSE; ++ ++static void wd_timer_callback (unsigned long data) ++{ ++ if (timer_is_running) ++ mod_timer (&wd_trigger_timer, jiffies + 5 * HZ); ++ mtx1_trigger_wd(); ++} ++ ++static void start_wd_timer (void) ++{ ++ if (!timer_is_running) { ++ struct timer_list *t = &wd_trigger_timer; ++ ++ init_timer (t); ++ t->function = wd_timer_callback; ++ t->data = (unsigned long)0L; ++ t->expires = jiffies + 5 * HZ; // 5 seconds. ++ add_timer (t); ++ timer_is_running = TRUE; ++ } ++} ++ ++ ++ ++static void stop_wd_timer (void) ++{ ++ if (timer_is_running) { ++ del_timer(&wd_trigger_timer); ++ timer_is_running = FALSE; ++ } ++} ++ ++ ++//---------[ File Functions ]----------------- ++ ++static char restart_after_close; ++ ++static int mtx1wd_open (struct inode *inode, struct file *file) ++{ ++ if (MINOR(inode->i_rdev) != WATCHDOG_MINOR) return -ENODEV; ++ //MOD_INC_USE_COUNT; ++ ++ // stop the timer, if it is running. It will not be ++ // started again, until the module is loaded again. ++ stop_wd_timer(); ++ ++ // sleep for 2 seconds, to ensure, that the wd is ++ // not triggered more often than every 2 seconds. ++ schedule_timeout (2 * HZ); ++ ++ return 0; ++} ++ ++ ++static int mtx1wd_release (struct inode *inode, struct file *file) { ++ if (MINOR(inode->i_rdev)==WATCHDOG_MINOR) { ++ } ++ if (restart_after_close) ++ start_wd_timer(); ++ //MOD_DEC_USE_COUNT; ++ return 0; ++} ++ ++ ++static ssize_t mtx1wd_write (struct file *file, const char *buf, size_t count, loff_t *ppos) { ++ ++ mtx1_trigger_wd (); ++ ++ if (count > 0) { ++ char buffer[10]; ++ int n = (count>9)?9:count; ++ ++ if (copy_from_user (&buffer, buf, n)) ++ return -EFAULT; ++ buffer[n]=0; ++ ++ if (count >= 4 && strncmp("auto", buffer, 4)==0) ++ restart_after_close = 1; ++ ++ else if (count >= 6 && strncmp("manual", buffer, 6)==0) ++ restart_after_close = 0; ++ ++ return n; ++ } ++ ++ return 0; ++} ++ ++static ssize_t mtx1wd_read (struct file *file, char *buf, size_t count, loff_t *ppos) ++{ ++ char * state = restart_after_close ? "auto\n" : "manual\n"; ++ int n = strlen(state)+1; ++ ++ if (file->f_pos >= n) ++ return 0; ++ ++ if (count < n) ++ return -EINVAL; ++ ++ if(copy_to_user(buf, state, n)) ++ return -EFAULT; ++ ++ file->f_pos += n; ++ ++ return n; ++} ++ ++static struct file_operations mtx1wd_fops = { ++ .owner = THIS_MODULE, ++ .read = mtx1wd_read, ++ .write = mtx1wd_write, ++ .open = mtx1wd_open, ++ .release = mtx1wd_release ++}; ++ ++ ++static struct miscdevice mtx1wd_miscdev = { ++ WATCHDOG_MINOR, ++ "watchdog", ++ &mtx1wd_fops ++}; ++ ++ ++ ++//---------[ Module Functions ]----------------- ++ ++ ++static int __init init_mtx1_watchdog(void) ++{ ++ printk("MTX-1 watchdog driver\n"); ++ ++ misc_register(&mtx1wd_miscdev); ++ ++ restart_after_close = 0; ++ ++ mtx1_enable_wd (); ++ ++ //-- trigger it for the first time. ++ //-- We do not exactly know how long it has not been triggered. ++ mtx1_trigger_wd (); ++ ++ // start a timer, that calls mtx1_trigger_wd every 5 seconds. ++ start_wd_timer(); ++ ++ return 0; ++} ++ ++static void __exit exit_mtx1_watchdog(void) { ++ ++ // stop the timer, if it is running. ++ stop_wd_timer(); ++ ++ misc_deregister(&mtx1wd_miscdev); ++ ++ mtx1_disable_wd(); ++} ++ ++module_init(init_mtx1_watchdog); ++module_exit(exit_mtx1_watchdog); ++ ++MODULE_AUTHOR("Michael Stickel"); ++MODULE_DESCRIPTION("Driver for the MTX-1 watchdog"); ++MODULE_LICENSE("GPL"); diff --git a/openwrt/target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch b/openwrt/target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch new file mode 100644 index 00000000000..946bd84540a --- /dev/null +++ b/openwrt/target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch @@ -0,0 +1,24 @@ +diff -urN linux-2.6.16.7/drivers/net/au1000_eth.c linux-2.6.16.7.new/drivers/net/au1000_eth.c +--- linux-2.6.16.7/drivers/net/au1000_eth.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/drivers/net/au1000_eth.c 2006-04-23 01:42:48.000000000 +0200 +@@ -12,6 +12,9 @@ + * 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 +@@ -1672,6 +1675,10 @@ + 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)) { diff --git a/openwrt/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch b/openwrt/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch new file mode 100644 index 00000000000..511df2c8dad --- /dev/null +++ b/openwrt/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch @@ -0,0 +1,241 @@ +diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c +--- linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c 2006-04-23 11:54:31.000000000 +0200 +@@ -64,6 +64,7 @@ + { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, ++ { AU1500_GPIO_207, INTC_INT_RISE_AND_FALL_EDGE, 0 }, + }; + + int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); +diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/Makefile linux-2.6.16.7.new/arch/mips/au1000/mtx-1/Makefile +--- linux-2.6.16.7/arch/mips/au1000/mtx-1/Makefile 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/Makefile 2006-04-23 14:01:36.000000000 +0200 +@@ -8,3 +8,4 @@ + # + + lib-y := init.o board_setup.o irqmap.o ++obj-y := mtx-1_sysbtn.o +diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c +--- linux-2.6.16.7/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c 2006-04-23 14:01:17.000000000 +0200 +@@ -0,0 +1,218 @@ ++/* ++ * Driver for the MTX-1 System Button. ++ * ++ * (c) Copyright 2005 4G Systems <info@4g-systems.biz>, All Rights Reserved. ++ * http://www.4g-systems.biz ++ * ++ * 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. ++ * ++ * Neither Michael Stickel nor 4G Systeme GmbH admit liability nor provide ++ * warranty for any of this software. This material is provided ++ * "AS-IS" and at no charge. ++ * ++ * (c) Copyright 2005 4G Systems <info@4g-systems.biz> ++ * ++ * Release 0.01. ++ * ++ * Author: Michael Stickel michael.stickel@4g-systems.biz ++ * ++ * ++ * After the module is loaded there is a device /dev/misc/btn ++ * that can be read. It returns one char '1' if the button ++ * has been pressed an '0' if it has been released. ++ */ ++#include <linux/config.h> ++#include <linux/module.h> ++#include <linux/version.h> ++#include <linux/types.h> ++#include <linux/errno.h> ++#include <linux/kernel.h> ++#include <linux/poll.h> ++#include <linux/sched.h> ++#include <linux/miscdevice.h> ++#include <linux/slab.h> ++#include <linux/init.h> ++#include <linux/irq.h> ++#include <linux/interrupt.h> ++ ++#include <asm/uaccess.h> ++ ++#include <asm/mach-au1x00/au1000.h> ++ ++ ++#ifndef FALSE ++# define FALSE (0) ++#endif ++ ++#ifndef TRUE ++# define TRUE (!FALSE) ++#endif ++ ++ ++//---------[ declarations ]----------------- ++ ++ ++static DECLARE_WAIT_QUEUE_HEAD(mtx1btn_wait_queue); ++static char state_changed; ++static char last_value; ++static char is_inuse; ++ ++ ++//---------[ Hardware Functions ]----------------- ++ ++// The MTX-1 Button is attached to GPIO207. ++#define MTX1_GPIO2_SYSBTN (7) ++#define MTX1_SYSBTN_IRQ (AU1500_GPIO_207) ++ ++ ++static char mtx1_getbtn (int btnno) ++{ ++ if (btnno==0) { ++ return (au_readl(GPIO2_PINSTATE) & (1<<MTX1_GPIO2_SYSBTN)) ? 0 : 1; ++ } ++ return 0; ++} ++ ++static void mtx1_initbuttons (void) ++{ ++ au_writel (au_readl(GPIO2_DIR) & ~(1<<MTX1_GPIO2_SYSBTN), GPIO2_DIR); ++} ++ ++ ++//---------[ Interrupt handling ]----------------- ++ ++ ++static void mtx1_btn_interrupt (int irq, void *private, struct pt_regs *regs) ++{ ++ char value = mtx1_getbtn(0); ++ if (last_value != value) ++ { ++ last_value = value; ++ state_changed = 1; ++ wake_up (&mtx1btn_wait_queue); ++ } ++// kill_fasync(&async_queue, SIGIO, POLL_OUT); ++} ++ ++ ++static int mtx1_btn_startirq (void) ++{ ++ if (!request_irq (MTX1_SYSBTN_IRQ, mtx1_btn_interrupt, 0 /* | SA_INTERRUPT */, "mtx1btn", (void *)&state_changed)) { ++ return 0; ++ } ++ return -1; ++} ++ ++static int mtx1_btn_stopirq (void) ++{ ++ free_irq(MTX1_SYSBTN_IRQ, (void *)&state_changed); ++ return 0; ++} ++ ++ ++ ++//---------[ File Functions ]----------------- ++ ++ ++static int mtx1sysbtn_minor = -1; ++ ++ ++static int mtx1sysbtn_open (struct inode *inode, struct file *file) ++{ ++ if (MINOR(inode->i_rdev)!=mtx1sysbtn_minor) return -ENODEV; ++ if (is_inuse) return -EBUSY; ++ is_inuse=1; ++ last_value = mtx1_getbtn(0); ++ state_changed = 0; ++ return 0; ++} ++ ++ ++static int mtx1sysbtn_release (struct inode *inode, struct file *file) { ++ if (MINOR(inode->i_rdev)==mtx1sysbtn_minor) { ++ is_inuse=0; ++ } ++ return 0; ++} ++ ++ ++static ssize_t mtx1sysbtn_read (struct file *file, char *buf, size_t count, loff_t *ppos) ++{ ++ if (count < 1) ++ return -EINVAL; ++ if (!state_changed) ++ interruptible_sleep_on (&mtx1btn_wait_queue); ++ state_changed = 0; ++ char c = last_value ? '1' : '0'; /* mtx1_getbtn(0) */ ++ if(copy_to_user(buf, &c, 1)) ++ return -EFAULT; ++ return 1; ++} ++ ++ ++static unsigned int mtx1sysbtn_poll (struct file *file, poll_table * wait) ++{ ++ unsigned int mask = 0; ++ ++ poll_wait (file, &mtx1btn_wait_queue, wait); ++ ++ if (state_changed) // state changed since last time. ++ mask |= POLLIN | POLLRDNORM; ++ ++ return mask; ++} ++ ++ ++static struct file_operations mtx1sysbtn_fops = { ++ .owner = THIS_MODULE, ++ .read = mtx1sysbtn_read, ++ .poll = mtx1sysbtn_poll, ++ .open = mtx1sysbtn_open, ++ .release = mtx1sysbtn_release ++}; ++ ++ ++static struct miscdevice mtx1sysbtn_miscdev = { ++ MISC_DYNAMIC_MINOR /* SYSBTN_MINOR */ , ++ "btn", ++ &mtx1sysbtn_fops ++}; ++ ++ ++ ++//---------[ Module Functions ]----------------- ++ ++ ++void __exit exit_mtx1_sysbtn (void) ++{ ++ is_inuse = 1; ++ mtx1_btn_stopirq (); ++ misc_deregister(&mtx1sysbtn_miscdev); ++} ++ ++ ++static int __init init_mtx1_sysbtn (void) ++{ ++ printk("MTX-1 System Button driver\n"); ++ is_inuse = 1; ++ mtx1_initbuttons (); ++ if (misc_register (&mtx1sysbtn_miscdev) >= 0) { ++ mtx1sysbtn_minor = mtx1sysbtn_miscdev.minor; ++ if (mtx1_btn_startirq () == 0) { ++ is_inuse=0; ++ return 0; ++ } ++ misc_deregister(&mtx1sysbtn_miscdev); ++ } ++ return 1; ++} ++ ++module_init(init_mtx1_sysbtn); ++module_exit(exit_mtx1_sysbtn); ++ ++MODULE_AUTHOR("Michael Stickel"); ++MODULE_DESCRIPTION("Driver for the MTX-1 system button"); ++MODULE_LICENSE("GPL"); diff --git a/openwrt/target/linux/au1000-2.6/patches/007-mtx1_sio2.patch b/openwrt/target/linux/au1000-2.6/patches/007-mtx1_sio2.patch new file mode 100644 index 00000000000..34d1005347a --- /dev/null +++ b/openwrt/target/linux/au1000-2.6/patches/007-mtx1_sio2.patch @@ -0,0 +1,13 @@ +--- linux-2.6.16.7/arch/mips/au1000/mtx-1/board_setup.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/board_setup.c 2006-04-23 14:35:42.000000000 +0200 +@@ -71,9 +71,7 @@ + #endif + + // initialize sys_pinfunc: +- // disable second ethernet port (SYS_PF_NI2) +- // set U3/GPIO23 to GPIO23 (SYS_PF_U3) +- au_writel( SYS_PF_NI2 | SYS_PF_U3, SYS_PINFUNC ); ++ au_writel( SYS_PF_NI2, SYS_PINFUNC ); + + // initialize GPIO + au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR ); diff --git a/openwrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch b/openwrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch new file mode 100644 index 00000000000..9e54ac1c594 --- /dev/null +++ b/openwrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch @@ -0,0 +1,63 @@ +diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/board_setup.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/board_setup.c +--- linux-2.6.16.7/arch/mips/au1000/mtx-1/board_setup.c 2006-04-23 14:39:21.000000000 +0200 ++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/board_setup.c 2006-04-23 14:39:03.000000000 +0200 +@@ -44,6 +44,9 @@ + #include <asm/pgtable.h> + #include <asm/mach-au1x00/au1000.h> + ++extern int (*board_pci_idsel)(unsigned int devsel, int assert); ++int mtx1_pci_idsel(unsigned int devsel, int assert); ++ + void board_reset (void) + { + /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ +@@ -77,11 +80,37 @@ + au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR ); + au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF + au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF ++ au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON + au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF + + // enable LED and set it to green + au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR ); + au_writel( 0x18000800, GPIO2_OUTPUT ); + ++ board_pci_idsel = mtx1_pci_idsel; ++ + printk("4G Systems MTX-1 Board\n"); + } ++ ++int ++mtx1_pci_idsel(unsigned int devsel, int assert) ++{ ++#define MTX_IDSEL_ONLY_0_AND_3 0 ++#if MTX_IDSEL_ONLY_0_AND_3 ++ if (devsel != 0 && devsel != 3) { ++ printk("*** not 0 or 3\n"); ++ return 0; ++ } ++#endif ++ ++ if (assert && devsel != 0) { ++ // supress signal to cardbus ++ au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF ++ } ++ else { ++ au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON ++ } ++ au_sync_udelay(1); ++ return 1; ++} ++ +diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c +--- linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c 2006-04-23 14:40:54.000000000 +0200 ++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c 2006-04-23 14:40:12.000000000 +0200 +@@ -48,7 +48,7 @@ + #include <asm/mach-au1x00/au1000.h> + + char irq_tab_alchemy[][5] __initdata = { +- [0] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */ ++ [0] = { -1, INTA, INTA, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */ + [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ + [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */ + [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */ diff --git a/openwrt/target/linux/au1000-2.6/patches/009-boot.patch b/openwrt/target/linux/au1000-2.6/patches/009-boot.patch new file mode 100644 index 00000000000..611c70d4602 --- /dev/null +++ b/openwrt/target/linux/au1000-2.6/patches/009-boot.patch @@ -0,0 +1,15 @@ +diff -Nur linux-cvs/arch/mips/kernel/head.S linux-aruba/arch/mips/kernel/head.S +--- linux-cvs/arch/mips/kernel/head.S 2004-12-23 00:21:39.000000000 -0800 ++++ linux-aruba/arch/mips/kernel/head.S 2005-10-20 09:16:08.000000000 -0700 +@@ -122,6 +122,10 @@ + #endif + .endm + ++ ++ j kernel_entry ++ nop ++ + /* + * Reserved space for exception handlers. + * Necessary for machines which link their kernels at KSEG0. + diff --git a/openwrt/target/linux/brcm-2.4/Config.in b/openwrt/target/linux/brcm-2.4/Config.in index 181014f7b3e..c766a45c3d9 100644 --- a/openwrt/target/linux/brcm-2.4/Config.in +++ b/openwrt/target/linux/brcm-2.4/Config.in @@ -6,13 +6,3 @@ config PACKAGE_KMOD_BRCM_WL help Proprietary driver for Broadcom Wireless chipsets -config PACKAGE_KMOD_BRCM_WL2 - prompt "kmod-brcm-wl2..................... Broadcom Wireless Network Driver (new)" - tristate - depends LINUX_2_4_BRCM - default m - help - Proprietary driver for Broadcom Wireless chipsets - New version with Multi-BSS capability - - diff --git a/openwrt/target/linux/brcm-2.4/Makefile b/openwrt/target/linux/brcm-2.4/Makefile index 06da0ac010f..9447114d4e2 100644 --- a/openwrt/target/linux/brcm-2.4/Makefile +++ b/openwrt/target/linux/brcm-2.4/Makefile @@ -12,10 +12,6 @@ $(eval $(call KMOD_template,BRCM_WL,brcm-wl,\ $(MODULES_DIR)/kernel/drivers/net/wl/wl.o \ ,CONFIG_WL,,20,wl)) -$(eval $(call KMOD_template,BRCM_WL2,brcm-wl2,\ - $(MODULES_DIR)/kernel/drivers/net/wl2/wl.o \ -,CONFIG_WL,,20,wl)) - $(eval $(call KMOD_template,LP,lp,\ $(MODULES_DIR)/kernel/drivers/parport/parport.o \ $(MODULES_DIR)/kernel/drivers/parport/parport_splink.o \ @@ -38,10 +34,10 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked # Proprietary driver for BCM43xx ############################################### -LINUX_BINARY_DRIVER_SITE=http://openwrt.org/downloads/sources +LINUX_BINARY_DRIVER_SITE=http://downloads.openwrt.org/sources # proprietary driver, extracted from Linksys GPL sourcetree WRT54GS 4.70.6 -LINUX_BINARY_WL_DRIVER=kernel-binary-wl-0.6.tar.gz -LINUX_BINARY_WL_MD5SUM=4fc1d5b46bcb7a17d6d5dd31da9c8d7f +LINUX_BINARY_WL_DRIVER=kernel-binary-wl-0.7.tar.gz +LINUX_BINARY_WL_MD5SUM=ff50130914790cbae9b73a13513da5ee $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER): $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_BINARY_WL_DRIVER) $(LINUX_BINARY_WL_MD5SUM) $(LINUX_BINARY_DRIVER_SITE) @@ -56,18 +52,15 @@ $(LINUX_DIR)/.drivers-unpacked: $(LINUX_DIR)/.unpacked zcat $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - # copy binary wlan driver mkdir -p $(LINUX_DIR)/drivers/net/wl - $(CP) $(BUILD_DIR)/kernel-binary-wl/old/*.o $(LINUX_DIR)/drivers/net/wl - $(CP) $(BUILD_DIR)/kernel-binary-wl/new/*.o $(LINUX_DIR)/drivers/net/wl2 + $(CP) $(BUILD_DIR)/kernel-binary-wl/*.o $(LINUX_DIR)/drivers/net/wl touch $@ $(LINUX_DIR)/.drivers-installed: $(LINUX_DIR)/.modules_done mkdir -p $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl - mkdir -p $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl2 @-[ -f $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl/wl.o ] || $(CP) $(LINUX_DIR)/drivers/net/wl/wl.o $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl/ - @-[ -f $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl2/wl.o ] || $(CP) $(LINUX_DIR)/drivers/net/wl2/wl.o $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl2/ touch $@ linux-dirclean: drivers-clean drivers-clean: - rm -rf $(BUILD_DIR)/wl + rm -rf $(BUILD_DIR)/kernel-binary-wl diff --git a/openwrt/target/linux/brcm-2.4/config b/openwrt/target/linux/brcm-2.4/config index 9759b90f5f8..c4cf5340ea9 100644 --- a/openwrt/target/linux/brcm-2.4/config +++ b/openwrt/target/linux/brcm-2.4/config @@ -833,7 +833,6 @@ CONFIG_NET_RADIO=y # CONFIG_AIRO is not set # CONFIG_HERMES is not set CONFIG_WL=m -CONFIG_WL2=m # CONFIG_PLX_HERMES is not set # CONFIG_TMD_HERMES is not set # CONFIG_PCI_HERMES is not set diff --git a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch index d662b4c0151..af82c3c770f 100644 --- a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch +++ b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch @@ -1,6 +1,6 @@ -diff -Naur linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile ---- linux.old/arch/mips/Makefile 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/Makefile 2006-04-06 15:34:15.000000000 +0200 +diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile +--- linux.old/arch/mips/Makefile 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/Makefile 2006-04-27 19:24:19.000000000 +0200 @@ -726,6 +726,19 @@ endif @@ -29,10 +29,10 @@ diff -Naur linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile archmrproper: @$(MAKEBOOT) mrproper -diff -Naur linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Makefile +diff -urN linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Makefile --- linux.old/arch/mips/bcm947xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/Makefile 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,15 @@ ++++ linux.dev/arch/mips/bcm947xx/Makefile 2006-05-02 17:46:22.000000000 +0200 +@@ -0,0 +1,17 @@ +# +# Makefile for the BCM947xx specific kernel interface routines +# under Linux. @@ -42,15 +42,1484 @@ diff -Naur linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Ma + +O_TARGET := bcm947xx.o + -+export-objs := nvram_linux.o setup.o ++export-objs := export.o +obj-y := prom.o setup.o time.o sbmips.o gpio.o +obj-y += nvram.o nvram_linux.o sflash.o cfe_env.o ++obj-y += sbutils.o bcmutils.o bcmsrom.o hndchipc.o +obj-$(CONFIG_PCI) += sbpci.o pcibios.o ++obj-y += export.o + +include $(TOPDIR)/Rules.make -diff -Naur linux.old/arch/mips/bcm947xx/cfe_env.c linux.dev/arch/mips/bcm947xx/cfe_env.c +diff -urN linux.old/arch/mips/bcm947xx/bcmsrom.c linux.dev/arch/mips/bcm947xx/bcmsrom.c +--- linux.old/arch/mips/bcm947xx/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/bcmsrom.c 2006-04-27 20:32:48.000000000 +0200 +@@ -0,0 +1,1212 @@ ++/* ++ * Misc useful routines to access NIC SROM/OTP . ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * $Id: bcmsrom.c,v 1.1.1.14 2006/04/15 01:28:25 michael Exp $ ++ */ ++ ++#include <typedefs.h> ++#include <bcmdefs.h> ++#include <osl.h> ++#include <bcmutils.h> ++#include <bcmsrom.h> ++#include <bcmdevs.h> ++#include <bcmendian.h> ++#include <sbpcmcia.h> ++#include <pcicfg.h> ++#include <sbutils.h> ++#include <bcmnvram.h> ++ ++/* debug/trace */ ++#if defined(WLTEST) ++#define BS_ERROR(args) printf args ++#else ++#define BS_ERROR(args) ++#endif /* BCMDBG_ERR || WLTEST */ ++ ++#define VARS_MAX 4096 /* should be reduced */ ++ ++#define WRITE_ENABLE_DELAY 500 /* 500 ms after write enable/disable toggle */ ++#define WRITE_WORD_DELAY 20 /* 20 ms between each word write */ ++ ++static int initvars_srom_pci(void *sbh, void *curmap, char **vars, uint *count); ++static int initvars_cis_pcmcia(void *sbh, osl_t *osh, char **vars, uint *count); ++static int initvars_flash_sb(void *sbh, char **vars, uint *count); ++static int srom_parsecis(osl_t *osh, uint8 **pcis, uint ciscnt, char **vars, uint *count); ++static int sprom_cmd_pcmcia(osl_t *osh, uint8 cmd); ++static int sprom_read_pcmcia(osl_t *osh, uint16 addr, uint16 *data); ++static int sprom_write_pcmcia(osl_t *osh, uint16 addr, uint16 data); ++static int sprom_read_pci(osl_t *osh, uint16 *sprom, uint wordoff, uint16 *buf, uint nwords, ++ bool check_crc); ++ ++static int initvars_table(osl_t *osh, char *start, char *end, char **vars, uint *count); ++static int initvars_flash(osl_t *osh, char **vp, uint len, char *devpath); ++ ++/* ++ * Initialize local vars from the right source for this platform. ++ * Return 0 on success, nonzero on error. ++ */ ++int ++srom_var_init(void *sbh, uint bustype, void *curmap, osl_t *osh, char **vars, uint *count) ++{ ++ ASSERT(bustype == BUSTYPE(bustype)); ++ if (vars == NULL || count == NULL) ++ return (0); ++ ++ switch (BUSTYPE(bustype)) { ++ case SB_BUS: ++ case JTAG_BUS: ++ return initvars_flash_sb(sbh, vars, count); ++ ++ case PCI_BUS: ++ ASSERT(curmap); /* can not be NULL */ ++ return initvars_srom_pci(sbh, curmap, vars, count); ++ ++ case PCMCIA_BUS: ++ return initvars_cis_pcmcia(sbh, osh, vars, count); ++ ++ ++ default: ++ ASSERT(0); ++ } ++ return (-1); ++} ++ ++/* support only 16-bit word read from srom */ ++int ++srom_read(uint bustype, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf) ++{ ++ void *srom; ++ uint i, off, nw; ++ ++ ASSERT(bustype == BUSTYPE(bustype)); ++ ++ /* check input - 16-bit access only */ ++ if (byteoff & 1 || nbytes & 1 || (byteoff + nbytes) > (SPROM_SIZE * 2)) ++ return 1; ++ ++ off = byteoff / 2; ++ nw = nbytes / 2; ++ ++ if (BUSTYPE(bustype) == PCI_BUS) { ++ if (!curmap) ++ return 1; ++ srom = (uchar*)curmap + PCI_BAR0_SPROM_OFFSET; ++ if (sprom_read_pci(osh, srom, off, buf, nw, FALSE)) ++ return 1; ++ } else if (BUSTYPE(bustype) == PCMCIA_BUS) { ++ for (i = 0; i < nw; i++) { ++ if (sprom_read_pcmcia(osh, (uint16)(off + i), (uint16*)(buf + i))) ++ return 1; ++ } ++ } else { ++ return 1; ++ } ++ ++ return 0; ++} ++ ++/* support only 16-bit word write into srom */ ++int ++srom_write(uint bustype, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf) ++{ ++ uint16 *srom; ++ uint i, nw, crc_range; ++ uint16 image[SPROM_SIZE]; ++ uint8 crc; ++ volatile uint32 val32; ++ ++ ASSERT(bustype == BUSTYPE(bustype)); ++ ++ /* check input - 16-bit access only */ ++ if (byteoff & 1 || nbytes & 1 || (byteoff + nbytes) > (SPROM_SIZE * 2)) ++ return 1; ++ ++ /* Are we writing the whole thing at once? */ ++ if ((byteoff == 0) && ++ ((nbytes == SPROM_SIZE) || ++ (nbytes == (SPROM_CRC_RANGE * 2)) || ++ (nbytes == (SROM4_WORDS * 2)))) { ++ crc_range = nbytes; ++ bcopy((void*)buf, (void*)image, nbytes); ++ nw = nbytes / 2; ++ } else { ++ if ((BUSTYPE(bustype) == PCMCIA_BUS) || (BUSTYPE(bustype) == SDIO_BUS)) ++ crc_range = SPROM_SIZE; ++ else ++ crc_range = SPROM_CRC_RANGE * 2; /* Tentative */ ++ ++ nw = crc_range / 2; ++ /* read first 64 words from srom */ ++ if (srom_read(bustype, curmap, osh, 0, nw * 2, image)) ++ return 1; ++ if (image[SROM4_SIGN] == SROM4_SIGNATURE) { ++ crc_range = SROM4_WORDS; ++ nw = crc_range / 2; ++ if (srom_read(bustype, curmap, osh, 0, nw * 2, image)) ++ return 1; ++ } ++ /* make changes */ ++ bcopy((void*)buf, (void*)&image[byteoff / 2], nbytes); ++ } ++ ++ /* calculate crc */ ++ htol16_buf(image, crc_range); ++ crc = ~hndcrc8((uint8 *)image, crc_range - 1, CRC8_INIT_VALUE); ++ ltoh16_buf(image, crc_range); ++ image[(crc_range / 2) - 1] = (crc << 8) | (image[(crc_range / 2) - 1] & 0xff); ++ ++ if (BUSTYPE(bustype) == PCI_BUS) { ++ srom = (uint16*)((uchar*)curmap + PCI_BAR0_SPROM_OFFSET); ++ /* enable writes to the SPROM */ ++ val32 = OSL_PCI_READ_CONFIG(osh, PCI_SPROM_CONTROL, sizeof(uint32)); ++ val32 |= SPROM_WRITEEN; ++ OSL_PCI_WRITE_CONFIG(osh, PCI_SPROM_CONTROL, sizeof(uint32), val32); ++ bcm_mdelay(WRITE_ENABLE_DELAY); ++ /* write srom */ ++ for (i = 0; i < nw; i++) { ++ W_REG(osh, &srom[i], image[i]); ++ bcm_mdelay(WRITE_WORD_DELAY); ++ } ++ /* disable writes to the SPROM */ ++ OSL_PCI_WRITE_CONFIG(osh, PCI_SPROM_CONTROL, sizeof(uint32), val32 & ++ ~SPROM_WRITEEN); ++ } else if (BUSTYPE(bustype) == PCMCIA_BUS) { ++ /* enable writes to the SPROM */ ++ if (sprom_cmd_pcmcia(osh, SROM_WEN)) ++ return 1; ++ bcm_mdelay(WRITE_ENABLE_DELAY); ++ /* write srom */ ++ for (i = 0; i < nw; i++) { ++ sprom_write_pcmcia(osh, (uint16)(i), image[i]); ++ bcm_mdelay(WRITE_WORD_DELAY); ++ } ++ /* disable writes to the SPROM */ ++ if (sprom_cmd_pcmcia(osh, SROM_WDS)) ++ return 1; ++ } else { ++ return 1; ++ } ++ ++ bcm_mdelay(WRITE_ENABLE_DELAY); ++ return 0; ++} ++ ++ ++static int ++srom_parsecis(osl_t *osh, uint8 **pcis, uint ciscnt, char **vars, uint *count) ++{ ++ char eabuf[32]; ++ char *vp, *base; ++ uint8 *cis, tup, tlen, sromrev = 1; ++ int i, j; ++ uint varsize; ++ bool ag_init = FALSE; ++ uint32 w32; ++ ++ ASSERT(vars); ++ ASSERT(count); ++ ++ base = vp = MALLOC(osh, VARS_MAX); ++ ASSERT(vp); ++ if (!vp) ++ return -2; ++ ++ while (ciscnt--) { ++ cis = *pcis++; ++ i = 0; ++ do { ++ tup = cis[i++]; ++ tlen = cis[i++]; ++ if ((i + tlen) >= CIS_SIZE) ++ break; ++ ++ switch (tup) { ++ case CISTPL_MANFID: ++ vp += sprintf(vp, "manfid=%d", (cis[i + 1] << 8) + cis[i]); ++ vp++; ++ vp += sprintf(vp, "prodid=%d", (cis[i + 3] << 8) + cis[i + 2]); ++ vp++; ++ break; ++ ++ case CISTPL_FUNCE: ++ switch (cis[i]) { ++ case LAN_NID: ++ ASSERT(cis[i + 1] == 6); ++ bcm_ether_ntoa((struct ether_addr *)&cis[i + 2], eabuf); ++ vp += sprintf(vp, "il0macaddr=%s", eabuf); ++ vp++; ++ break; ++ case 1: /* SDIO Extended Data */ ++ vp += sprintf(vp, "sdmaxblk=%d", ++ (cis[i + 13] << 8) | cis[i + 12]); ++ vp++; ++ break; ++ } ++ break; ++ ++ case CISTPL_CFTABLE: ++ vp += sprintf(vp, "regwindowsz=%d", (cis[i + 7] << 8) | cis[i + 6]); ++ vp++; ++ break; ++ ++ case CISTPL_BRCM_HNBU: ++ switch (cis[i]) { ++ case HNBU_SROMREV: ++ sromrev = cis[i + 1]; ++ break; ++ ++ case HNBU_CHIPID: ++ vp += sprintf(vp, "vendid=%d", (cis[i + 2] << 8) + ++ cis[i + 1]); ++ vp++; ++ vp += sprintf(vp, "devid=%d", (cis[i + 4] << 8) + ++ cis[i + 3]); ++ vp++; ++ if (tlen == 7) { ++ vp += sprintf(vp, "chiprev=%d", ++ (cis[i + 6] << 8) + cis[i + 5]); ++ vp++; ++ } ++ break; ++ ++ case HNBU_BOARDREV: ++ vp += sprintf(vp, "boardrev=%d", cis[i + 1]); ++ vp++; ++ break; ++ ++ case HNBU_AA: ++ vp += sprintf(vp, "aa2g=%d", cis[i + 1]); ++ vp++; ++ break; ++ ++ case HNBU_AG: ++ vp += sprintf(vp, "ag0=%d", cis[i + 1]); ++ vp++; ++ ag_init = TRUE; ++ break; ++ ++ case HNBU_CC: ++ ASSERT(sromrev == 1); ++ vp += sprintf(vp, "cc=%d", cis[i + 1]); ++ vp++; ++ break; ++ ++ case HNBU_PAPARMS: ++ if (tlen == 2) { ++ ASSERT(sromrev == 1); ++ vp += sprintf(vp, "pa0maxpwr=%d", cis[i + 1]); ++ vp++; ++ } else if (tlen >= 9) { ++ if (tlen == 10) { ++ ASSERT(sromrev == 2); ++ vp += sprintf(vp, "opo=%d", cis[i + 9]); ++ vp++; ++ } else ++ ASSERT(tlen == 9); ++ ++ for (j = 0; j < 3; j++) { ++ vp += sprintf(vp, "pa0b%d=%d", j, ++ (cis[i + (j * 2) + 2] << 8) + ++ cis[i + (j * 2) + 1]); ++ vp++; ++ } ++ vp += sprintf(vp, "pa0itssit=%d", cis[i + 7]); ++ vp++; ++ vp += sprintf(vp, "pa0maxpwr=%d", cis[i + 8]); ++ vp++; ++ } else ++ ASSERT(tlen >= 9); ++ break; ++ ++ case HNBU_OEM: ++ ASSERT(sromrev == 1); ++ vp += sprintf(vp, "oem=%02x%02x%02x%02x%02x%02x%02x%02x", ++ cis[i + 1], cis[i + 2], ++ cis[i + 3], cis[i + 4], ++ cis[i + 5], cis[i + 6], ++ cis[i + 7], cis[i + 8]); ++ vp++; ++ break; ++ ++ case HNBU_BOARDFLAGS: ++ w32 = (cis[i + 2] << 8) + cis[i + 1]; ++ if (tlen == 5) ++ w32 |= (cis[i + 4] << 24) + (cis[i + 3] << 16); ++ vp += sprintf(vp, "boardflags=0x%x", w32); ++ vp++; ++ break; ++ ++ case HNBU_LEDS: ++ if (cis[i + 1] != 0xff) { ++ vp += sprintf(vp, "ledbh0=%d", cis[i + 1]); ++ vp++; ++ } ++ if (cis[i + 2] != 0xff) { ++ vp += sprintf(vp, "ledbh1=%d", cis[i + 2]); ++ vp++; ++ } ++ if (cis[i + 3] != 0xff) { ++ vp += sprintf(vp, "ledbh2=%d", cis[i + 3]); ++ vp++; ++ } ++ if (cis[i + 4] != 0xff) { ++ vp += sprintf(vp, "ledbh3=%d", cis[i + 4]); ++ vp++; ++ } ++ break; ++ ++ case HNBU_CCODE: ++ { ++ char str[3]; ++ ASSERT(sromrev > 1); ++ str[0] = cis[i + 1]; ++ str[1] = cis[i + 2]; ++ str[2] = 0; ++ vp += sprintf(vp, "ccode=%s", str); ++ vp++; ++ vp += sprintf(vp, "cctl=0x%x", cis[i + 3]); ++ vp++; ++ break; ++ } ++ ++ case HNBU_CCKPO: ++ ASSERT(sromrev > 2); ++ vp += sprintf(vp, "cckpo=0x%x", ++ (cis[i + 2] << 8) | cis[i + 1]); ++ vp++; ++ break; ++ ++ case HNBU_OFDMPO: ++ ASSERT(sromrev > 2); ++ vp += sprintf(vp, "ofdmpo=0x%x", ++ (cis[i + 4] << 24) | ++ (cis[i + 3] << 16) | ++ (cis[i + 2] << 8) | ++ cis[i + 1]); ++ vp++; ++ break; ++ } ++ break; ++ ++ } ++ i += tlen; ++ } while (tup != 0xff); ++ } ++ ++ /* Set the srom version */ ++ vp += sprintf(vp, "sromrev=%d", sromrev); ++ vp++; ++ ++ /* if there is no antenna gain field, set default */ ++ if (ag_init == FALSE) { ++ ASSERT(sromrev == 1); ++ vp += sprintf(vp, "ag0=%d", 0xff); ++ vp++; ++ } ++ ++ /* final nullbyte terminator */ ++ *vp++ = '\0'; ++ varsize = (uint)(vp - base); ++ ++ ASSERT((vp - base) < VARS_MAX); ++ ++ if (varsize == VARS_MAX) { ++ *vars = base; ++ } else { ++ vp = MALLOC(osh, varsize); ++ ASSERT(vp); ++ if (vp) ++ bcopy(base, vp, varsize); ++ MFREE(osh, base, VARS_MAX); ++ *vars = vp; ++ if (!vp) { ++ *count = 0; ++ return -2; ++ } ++ } ++ *count = varsize; ++ ++ return (0); ++} ++ ++ ++/* set PCMCIA sprom command register */ ++static int ++sprom_cmd_pcmcia(osl_t *osh, uint8 cmd) ++{ ++ uint8 status = 0; ++ uint wait_cnt = 1000; ++ ++ /* write sprom command register */ ++ OSL_PCMCIA_WRITE_ATTR(osh, SROM_CS, &cmd, 1); ++ ++ /* wait status */ ++ while (wait_cnt--) { ++ OSL_PCMCIA_READ_ATTR(osh, SROM_CS, &status, 1); ++ if (status & SROM_DONE) ++ return 0; ++ } ++ ++ return 1; ++} ++ ++/* read a word from the PCMCIA srom */ ++static int ++sprom_read_pcmcia(osl_t *osh, uint16 addr, uint16 *data) ++{ ++ uint8 addr_l, addr_h, data_l, data_h; ++ ++ addr_l = (uint8)((addr * 2) & 0xff); ++ addr_h = (uint8)(((addr * 2) >> 8) & 0xff); ++ ++ /* set address */ ++ OSL_PCMCIA_WRITE_ATTR(osh, SROM_ADDRH, &addr_h, 1); ++ OSL_PCMCIA_WRITE_ATTR(osh, SROM_ADDRL, &addr_l, 1); ++ ++ /* do read */ ++ if (sprom_cmd_pcmcia(osh, SROM_READ)) ++ return 1; ++ ++ /* read data */ ++ data_h = data_l = 0; ++ OSL_PCMCIA_READ_ATTR(osh, SROM_DATAH, &data_h, 1); ++ OSL_PCMCIA_READ_ATTR(osh, SROM_DATAL, &data_l, 1); ++ ++ *data = (data_h << 8) | data_l; ++ return 0; ++} ++ ++/* write a word to the PCMCIA srom */ ++static int ++sprom_write_pcmcia(osl_t *osh, uint16 addr, uint16 data) ++{ ++ uint8 addr_l, addr_h, data_l, data_h; ++ ++ addr_l = (uint8)((addr * 2) & 0xff); ++ addr_h = (uint8)(((addr * 2) >> 8) & 0xff); ++ data_l = (uint8)(data & 0xff); ++ data_h = (uint8)((data >> 8) & 0xff); ++ ++ /* set address */ ++ OSL_PCMCIA_WRITE_ATTR(osh, SROM_ADDRH, &addr_h, 1); ++ OSL_PCMCIA_WRITE_ATTR(osh, SROM_ADDRL, &addr_l, 1); ++ ++ /* write data */ ++ OSL_PCMCIA_WRITE_ATTR(osh, SROM_DATAH, &data_h, 1); ++ OSL_PCMCIA_WRITE_ATTR(osh, SROM_DATAL, &data_l, 1); ++ ++ /* do write */ ++ return sprom_cmd_pcmcia(osh, SROM_WRITE); ++} ++ ++/* ++ * Read in and validate sprom. ++ * Return 0 on success, nonzero on error. ++ */ ++static int ++sprom_read_pci(osl_t *osh, uint16 *sprom, uint wordoff, uint16 *buf, uint nwords, bool check_crc) ++{ ++ int err = 0; ++ uint i; ++ ++ /* read the sprom */ ++ for (i = 0; i < nwords; i++) ++ buf[i] = R_REG(osh, &sprom[wordoff + i]); ++ ++ if (check_crc) { ++ /* fixup the endianness so crc8 will pass */ ++ htol16_buf(buf, nwords * 2); ++ if (hndcrc8((uint8*)buf, nwords * 2, CRC8_INIT_VALUE) != CRC8_GOOD_VALUE) ++ err = 1; ++ /* now correct the endianness of the byte array */ ++ ltoh16_buf(buf, nwords * 2); ++ } ++ ++ return err; ++} ++ ++/* ++* Create variable table from memory. ++* Return 0 on success, nonzero on error. ++*/ ++static int ++initvars_table(osl_t *osh, char *start, char *end, char **vars, uint *count) ++{ ++ int c = (int)(end - start); ++ ++ /* do it only when there is more than just the null string */ ++ if (c > 1) { ++ char *vp = MALLOC(osh, c); ++ ASSERT(vp); ++ if (!vp) ++ return BCME_NOMEM; ++ bcopy(start, vp, c); ++ *vars = vp; ++ *count = c; ++ } ++ else { ++ *vars = NULL; ++ *count = 0; ++ } ++ ++ return 0; ++} ++ ++/* ++ * Find variables with <devpath> from flash. 'base' points to the beginning ++ * of the table upon enter and to the end of the table upon exit when success. ++ * Return 0 on success, nonzero on error. ++ */ ++static int ++initvars_flash(osl_t *osh, char **base, uint len, char *devpath) ++{ ++ char *vp = *base; ++ char *flash; ++ int err; ++ char *s; ++ uint l, dl, copy_len; ++ ++ /* allocate memory and read in flash */ ++ if (!(flash = MALLOC(osh, NVRAM_SPACE))) ++ return BCME_NOMEM; ++ if ((err = nvram_getall(flash, NVRAM_SPACE))) ++ goto exit; ++ ++ /* grab vars with the <devpath> prefix in name */ ++ dl = strlen(devpath); ++ for (s = flash; s && *s; s += l + 1) { ++ l = strlen(s); ++ ++ /* skip non-matching variable */ ++ if (strncmp(s, devpath, dl)) ++ continue; ++ ++ /* is there enough room to copy? */ ++ copy_len = l - dl + 1; ++ if (len < copy_len) { ++ err = BCME_BUFTOOSHORT; ++ goto exit; ++ } ++ ++ /* no prefix, just the name=value */ ++ strcpy(vp, &s[dl]); ++ vp += copy_len; ++ len -= copy_len; ++ } ++ ++ /* add null string as terminator */ ++ if (len < 1) { ++ err = BCME_BUFTOOSHORT; ++ goto exit; ++ } ++ *vp++ = '\0'; ++ ++ *base = vp; ++ ++exit: MFREE(osh, flash, NVRAM_SPACE); ++ return err; ++} ++ ++/* ++ * Initialize nonvolatile variable table from flash. ++ * Return 0 on success, nonzero on error. ++ */ ++static int ++initvars_flash_sb(void *sbh, char **vars, uint *count) ++{ ++ osl_t *osh = sb_osh(sbh); ++ char devpath[SB_DEVPATH_BUFSZ]; ++ char *vp, *base; ++ int err; ++ ++ ASSERT(vars); ++ ASSERT(count); ++ ++ if ((err = sb_devpath(sbh, devpath, sizeof(devpath)))) ++ return err; ++ ++ base = vp = MALLOC(osh, VARS_MAX); ++ ASSERT(vp); ++ if (!vp) ++ return BCME_NOMEM; ++ ++ if ((err = initvars_flash(osh, &vp, VARS_MAX, devpath))) ++ goto err; ++ ++ err = initvars_table(osh, base, vp, vars, count); ++ ++err: MFREE(osh, base, VARS_MAX); ++ return err; ++} ++ ++#ifdef WLTEST ++char mfgsromvars[256]; ++char *defaultsromvars = "il0macaddr=00:11:22:33:44:51\0" ++ "et0macaddr=00:11:22:33:44:52\0" ++ "et1macaddr=00:11:22:33:44:53\0" ++ "boardtype=0xffff\0" ++ "boardrev=0x10\0" ++ "boardflags=8\0" ++ "sromrev=2\0" ++ "aa2g=3"; ++#define MFGSROM_DEFVARSLEN 147 /* default srom len */ ++#endif /* WL_TEST */ ++ ++/* ++ * Initialize nonvolatile variable table from sprom. ++ * Return 0 on success, nonzero on error. ++ */ ++static int ++initvars_srom_pci(void *sbh, void *curmap, char **vars, uint *count) ++{ ++ uint16 w, *b; ++ uint8 sromrev = 0; ++ struct ether_addr ea; ++ char eabuf[32]; ++ uint32 w32; ++ int woff, i; ++ char *vp, *base; ++ osl_t *osh = sb_osh(sbh); ++ bool flash = FALSE; ++ char name[SB_DEVPATH_BUFSZ+16], *value; ++ char devpath[SB_DEVPATH_BUFSZ]; ++ int err; ++ ++ /* ++ * Apply CRC over SROM content regardless SROM is present or not, ++ * and use variable <devpath>sromrev's existance in flash to decide ++ * if we should return an error when CRC fails or read SROM variables ++ * from flash. ++ */ ++ b = MALLOC(osh, SROM_MAX); ++ ASSERT(b); ++ if (!b) ++ return -2; ++ ++ err = sprom_read_pci(osh, (void*)((int8*)curmap + PCI_BAR0_SPROM_OFFSET), 0, b, ++ 64, TRUE); ++ if (err == 0) { ++ /* srom is good and is rev < 4 */ ++ /* top word of sprom contains version and crc8 */ ++ sromrev = b[63] & 0xff; ++ /* bcm4401 sroms misprogrammed */ ++ if (sromrev == 0x10) ++ sromrev = 1; ++ } else if (b[SROM4_SIGN] == SROM4_SIGNATURE) { ++ /* If sromrev >= 4, read more */ ++ err = sprom_read_pci(osh, (void*)((int8*)curmap + PCI_BAR0_SPROM_OFFSET), 0, b, ++ SROM4_WORDS, TRUE); ++ sromrev = b[SROM4_WORDS - 1] & 0xff; ++ } ++ ++ if (err) { ++#ifdef WLTEST ++ BS_ERROR(("SROM Crc Error, so see if we could use a default\n")); ++ w32 = OSL_PCI_READ_CONFIG(osh, PCI_SPROM_CONTROL, sizeof(uint32)); ++ if (w32 & SPROM_OTPIN_USE) { ++ BS_ERROR(("srom crc failed with OTP, use default vars....\n")); ++ vp = base = mfgsromvars; ++ if (sb_chip(sbh) == BCM4311_CHIP_ID) { ++ BS_ERROR(("setting the devid to be 4311\n")); ++ vp += sprintf(vp, "devid=0x4311"); ++ vp++; ++ } ++ bcopy(defaultsromvars, vp, MFGSROM_DEFVARSLEN); ++ vp += MFGSROM_DEFVARSLEN; ++ goto varsdone; ++ } else { ++ BS_ERROR(("srom crc failed with SPROM....\n")); ++#endif /* WLTEST */ ++ if ((err = sb_devpath(sbh, devpath, sizeof(devpath)))) ++ return err; ++ sprintf(name, "%ssromrev", devpath); ++ if (!(value = getvar(NULL, name))) ++ return (-1); ++ sromrev = (uint8)bcm_strtoul(value, NULL, 0); ++ flash = TRUE; ++#ifdef WLTEST ++ } ++#endif /* WLTEST */ ++ } ++ ++ /* srom version check */ ++ if (sromrev > 4) ++ return (-2); ++ ++ ASSERT(vars); ++ ASSERT(count); ++ ++ base = vp = MALLOC(osh, VARS_MAX); ++ ASSERT(vp); ++ if (!vp) ++ return -2; ++ ++ /* read variables from flash */ ++ if (flash) { ++ if ((err = initvars_flash(osh, &vp, VARS_MAX, devpath))) ++ goto err; ++ goto varsdone; ++ } ++ ++ vp += sprintf(vp, "sromrev=%d", sromrev); ++ vp++; ++ ++ if (sromrev >= 4) { ++ uint path, pathbase; ++ const uint pathbases[MAX_PATH] = {SROM4_PATH0, SROM4_PATH1, ++ SROM4_PATH2, SROM4_PATH3}; ++ ++ vp += sprintf(vp, "boardrev=%d", b[SROM4_BREV]); ++ vp++; ++ ++ vp += sprintf(vp, "boardflags=%d", (b[SROM4_BFL1] << 16) | b[SROM4_BFL0]); ++ vp++; ++ ++ vp += sprintf(vp, "boardflags2=%d", (b[SROM4_BFL3] << 16) | b[SROM4_BFL2]); ++ vp++; ++ ++ /* The macaddr */ ++ ea.octet[0] = (b[SROM4_MACHI] >> 8) & 0xff; ++ ea.octet[1] = b[SROM4_MACHI] & 0xff; ++ ea.octet[2] = (b[SROM4_MACMID] >> 8) & 0xff; ++ ea.octet[3] = b[SROM4_MACMID] & 0xff; ++ ea.octet[4] = (b[SROM4_MACLO] >> 8) & 0xff; ++ ea.octet[5] = b[SROM4_MACLO] & 0xff; ++ bcm_ether_ntoa(&ea, eabuf); ++ vp += sprintf(vp, "macaddr=%s", eabuf); ++ vp++; ++ ++ w = b[SROM4_CCODE]; ++ if (w == 0) ++ vp += sprintf(vp, "ccode="); ++ else ++ vp += sprintf(vp, "ccode=%c%c", (w >> 8), (w & 0xff)); ++ vp++; ++ vp += sprintf(vp, "regrev=%d", b[SROM4_REGREV]); ++ vp++; ++ ++ w = b[SROM4_LEDBH10]; ++ if ((w != 0) && (w != 0xffff)) { ++ /* ledbh0 */ ++ vp += sprintf(vp, "ledbh0=%d", (w & 0xff)); ++ vp++; ++ ++ /* ledbh1 */ ++ vp += sprintf(vp, "ledbh1=%d", (w >> 8) & 0xff); ++ vp++; ++ } ++ w = b[SROM4_LEDBH32]; ++ if ((w != 0) && (w != 0xffff)) { ++ /* ledbh2 */ ++ vp += sprintf(vp, "ledbh2=%d", w & 0xff); ++ vp++; ++ ++ /* ledbh3 */ ++ vp += sprintf(vp, "ledbh3=%d", (w >> 8) & 0xff); ++ vp++; ++ } ++ /* LED Powersave duty cycle (oncount >> 24) (offcount >> 8) */ ++ w = b[SROM4_LEDDC]; ++ w32 = ((uint32)((unsigned char)(w >> 8) & 0xff) << 24) | /* oncount */ ++ ((uint32)((unsigned char)(w & 0xff)) << 8); /* offcount */ ++ vp += sprintf(vp, "leddc=%d", w32); ++ vp++; ++ ++ w = b[SROM4_AA]; ++ vp += sprintf(vp, "aa2g=%d", w & SROM4_AA2G_MASK); ++ vp++; ++ vp += sprintf(vp, "aa5g=%d", w >> SROM4_AA5G_SHIFT); ++ vp++; ++ ++ w = b[SROM4_AG10]; ++ vp += sprintf(vp, "ag0=%d", w & 0xff); ++ vp++; ++ vp += sprintf(vp, "ag1=%d", (w >> 8) & 0xff); ++ vp++; ++ w = b[SROM4_AG32]; ++ vp += sprintf(vp, "ag2=%d", w & 0xff); ++ vp++; ++ vp += sprintf(vp, "ag3=%d", (w >> 8) & 0xff); ++ vp++; ++ ++ /* Fixed power indices when power control is disabled */ ++ for (i = 0; i < 2; i++) { ++ w = b[SROM4_TXPID2G + i]; ++ vp += sprintf(vp, "txpid2ga%d=%d", 2 * i, w & 0xff); ++ vp++; ++ vp += sprintf(vp, "txpid2ga%d=%d", (2 * i) + 1, (w >> 8) & 0xff); ++ vp++; ++ w = b[SROM4_TXPID5G + i]; ++ vp += sprintf(vp, "txpid5ga%d=%d", 2 * i, w & 0xff); ++ vp++; ++ vp += sprintf(vp, "txpid5ga%d=%d", (2 * i) + 1, (w >> 8) & 0xff); ++ vp++; ++ w = b[SROM4_TXPID5GL + i]; ++ vp += sprintf(vp, "txpid5gla%d=%d", 2 * i, w & 0xff); ++ vp++; ++ vp += sprintf(vp, "txpid5gla%d=%d", (2 * i) + 1, (w >> 8) & 0xff); ++ vp++; ++ w = b[SROM4_TXPID5GH + i]; ++ vp += sprintf(vp, "txpid5gha%d=%d", 2 * i, w & 0xff); ++ vp++; ++ vp += sprintf(vp, "txpid5gha%d=%d", (2 * i) + 1, (w >> 8) & 0xff); ++ vp++; ++ } ++ ++ /* Per path variables */ ++ for (path = 0; path < MAX_PATH; path++) { ++ pathbase = pathbases[path]; ++ w = b[pathbase + SROM4_2G_ITT_MAXP]; ++ vp += sprintf(vp, "itt2ga%d=%d", path, w >> B2G_ITT_SHIFT); ++ vp++; ++ vp += sprintf(vp, "maxp2ga%d=%d", path, w & B2G_MAXP_MASK); ++ vp++; ++ ++ for (i = 0; i < 4; i++) { ++ vp += sprintf(vp, "pa2gw%da%d=%d", i, path, ++ b[pathbase + SROM4_2G_PA + i]); ++ vp++; ++ } ++ ++ w = b[pathbase + SROM4_5G_ITT_MAXP]; ++ vp += sprintf(vp, "itt5ga%d=%d", path, w >> B5G_ITT_SHIFT); ++ vp++; ++ vp += sprintf(vp, "maxp5ga%d=%d", path, w & B5G_MAXP_MASK); ++ vp++; ++ ++ w = b[pathbase + SROM4_5GLH_MAXP]; ++ vp += sprintf(vp, "maxp5lga%d=%d", path, w >> B5GL_MAXP_SHIFT); ++ vp++; ++ vp += sprintf(vp, "maxp5gha%d=%d", path, w & B5GH_MAXP_MASK); ++ vp++; ++ ++ for (i = 0; i < 4; i++) { ++ vp += sprintf(vp, "pa5gw%da%d=%d", i, path, ++ b[pathbase + SROM4_5G_PA + i]); ++ vp++; ++ vp += sprintf(vp, "pa5glw%da%d=%d", i, path, ++ b[pathbase + SROM4_5GL_PA + i]); ++ vp++; ++ vp += sprintf(vp, "pa5hgw%da%d=%d", i, path, ++ b[pathbase + SROM4_5GH_PA + i]); ++ vp++; ++ } ++ } ++ ++ vp += sprintf(vp, "cck2gpo=%d", b[SROM4_2G_CCKPO]); ++ vp++; ++ ++ w32 = ((uint32)b[SROM4_2G_OFDMPO + 1] << 16) | b[SROM4_2G_OFDMPO]; ++ vp += sprintf(vp, "ofdm2gpo=%d", w32); ++ vp++; ++ ++ w32 = ((uint32)b[SROM4_5G_OFDMPO + 1] << 16) | b[SROM4_5G_OFDMPO]; ++ vp += sprintf(vp, "ofdm5gpo=%d", w32); ++ vp++; ++ ++ w32 = ((uint32)b[SROM4_5GL_OFDMPO + 1] << 16) | b[SROM4_5GL_OFDMPO]; ++ vp += sprintf(vp, "ofdm5glpo=%d", w32); ++ vp++; ++ ++ w32 = ((uint32)b[SROM4_5GH_OFDMPO + 1] << 16) | b[SROM4_5GH_OFDMPO]; ++ vp += sprintf(vp, "ofdm5ghpo=%d", w32); ++ vp++; ++ ++ for (i = 0; i < 8; i++) { ++ vp += sprintf(vp, "mcs2gpo%d=%d", i, b[SROM4_2G_MCSPO]); ++ vp++; ++ vp += sprintf(vp, "mcs5gpo%d=%d", i, b[SROM4_5G_MCSPO]); ++ vp++; ++ vp += sprintf(vp, "mcs5glpo%d=%d", i, b[SROM4_5GL_MCSPO]); ++ vp++; ++ vp += sprintf(vp, "mcs5ghpo%d=%d", i, b[SROM4_5GH_MCSPO]); ++ vp++; ++ } ++ ++ vp += sprintf(vp, "ccdpo%d=%d", i, b[SROM4_CCDPO]); ++ vp++; ++ vp += sprintf(vp, "stbcpo%d=%d", i, b[SROM4_STBCPO]); ++ vp++; ++ vp += sprintf(vp, "bw40po%d=%d", i, b[SROM4_BW40PO]); ++ vp++; ++ vp += sprintf(vp, "bwduppo%d=%d", i, b[SROM4_BWDUPPO]); ++ vp++; ++ ++ goto done; ++ } ++ if (sromrev >= 3) { ++ /* New section takes over the 3th hardware function space */ ++ ++ /* Words 22+23 are 11a (mid) ofdm power offsets */ ++ w32 = ((uint32)b[23] << 16) | b[22]; ++ vp += sprintf(vp, "ofdmapo=%d", w32); ++ vp++; ++ ++ /* Words 24+25 are 11a (low) ofdm power offsets */ ++ w32 = ((uint32)b[25] << 16) | b[24]; ++ vp += sprintf(vp, "ofdmalpo=%d", w32); ++ vp++; ++ ++ /* Words 26+27 are 11a (high) ofdm power offsets */ ++ w32 = ((uint32)b[27] << 16) | b[26]; ++ vp += sprintf(vp, "ofdmahpo=%d", w32); ++ vp++; ++ ++ /* LED Powersave duty cycle (oncount >> 24) (offcount >> 8) */ ++ w32 = ((uint32)((unsigned char)(b[21] >> 8) & 0xff) << 24) | /* oncount */ ++ ((uint32)((unsigned char)(b[21] & 0xff)) << 8); /* offcount */ ++ vp += sprintf(vp, "leddc=%d", w32); ++ ++ vp++; ++ } ++ ++ if (sromrev >= 2) { ++ /* New section takes over the 4th hardware function space */ ++ ++ /* Word 29 is max power 11a high/low */ ++ w = b[29]; ++ vp += sprintf(vp, "pa1himaxpwr=%d", w & 0xff); ++ vp++; ++ vp += sprintf(vp, "pa1lomaxpwr=%d", (w >> 8) & 0xff); ++ vp++; ++ ++ /* Words 30-32 set the 11alow pa settings, ++ * 33-35 are the 11ahigh ones. ++ */ ++ for (i = 0; i < 3; i++) { ++ vp += sprintf(vp, "pa1lob%d=%d", i, b[30 + i]); ++ vp++; ++ vp += sprintf(vp, "pa1hib%d=%d", i, b[33 + i]); ++ vp++; ++ } ++ w = b[59]; ++ if (w == 0) ++ vp += sprintf(vp, "ccode="); ++ else ++ vp += sprintf(vp, "ccode=%c%c", (w >> 8), (w & 0xff)); ++ vp++; ++ ++ } ++ ++ /* parameter section of sprom starts at byte offset 72 */ ++ woff = 72/2; ++ ++ /* first 6 bytes are il0macaddr */ ++ ea.octet[0] = (b[woff] >> 8) & 0xff; ++ ea.octet[1] = b[woff] & 0xff; ++ ea.octet[2] = (b[woff+1] >> 8) & 0xff; ++ ea.octet[3] = b[woff+1] & 0xff; ++ ea.octet[4] = (b[woff+2] >> 8) & 0xff; ++ ea.octet[5] = b[woff+2] & 0xff; ++ woff += 3; ++ bcm_ether_ntoa(&ea, eabuf); ++ vp += sprintf(vp, "il0macaddr=%s", eabuf); ++ vp++; ++ ++ /* next 6 bytes are et0macaddr */ ++ ea.octet[0] = (b[woff] >> 8) & 0xff; ++ ea.octet[1] = b[woff] & 0xff; ++ ea.octet[2] = (b[woff+1] >> 8) & 0xff; ++ ea.octet[3] = b[woff+1] & 0xff; ++ ea.octet[4] = (b[woff+2] >> 8) & 0xff; ++ ea.octet[5] = b[woff+2] & 0xff; ++ woff += 3; ++ bcm_ether_ntoa(&ea, eabuf); ++ vp += sprintf(vp, "et0macaddr=%s", eabuf); ++ vp++; ++ ++ /* next 6 bytes are et1macaddr */ ++ ea.octet[0] = (b[woff] >> 8) & 0xff; ++ ea.octet[1] = b[woff] & 0xff; ++ ea.octet[2] = (b[woff+1] >> 8) & 0xff; ++ ea.octet[3] = b[woff+1] & 0xff; ++ ea.octet[4] = (b[woff+2] >> 8) & 0xff; ++ ea.octet[5] = b[woff+2] & 0xff; ++ woff += 3; ++ bcm_ether_ntoa(&ea, eabuf); ++ vp += sprintf(vp, "et1macaddr=%s", eabuf); ++ vp++; ++ ++ /* ++ * Enet phy settings one or two singles or a dual ++ * Bits 4-0 : MII address for enet0 (0x1f for not there) ++ * Bits 9-5 : MII address for enet1 (0x1f for not there) ++ * Bit 14 : Mdio for enet0 ++ * Bit 15 : Mdio for enet1 ++ */ ++ w = b[woff]; ++ vp += sprintf(vp, "et0phyaddr=%d", (w & 0x1f)); ++ vp++; ++ vp += sprintf(vp, "et1phyaddr=%d", ((w >> 5) & 0x1f)); ++ vp++; ++ vp += sprintf(vp, "et0mdcport=%d", ((w >> 14) & 0x1)); ++ vp++; ++ vp += sprintf(vp, "et1mdcport=%d", ((w >> 15) & 0x1)); ++ vp++; ++ ++ /* Word 46 has board rev, antennas 0/1 & Country code/control */ ++ w = b[46]; ++ vp += sprintf(vp, "boardrev=%d", w & 0xff); ++ vp++; ++ ++ if (sromrev > 1) ++ vp += sprintf(vp, "cctl=%d", (w >> 8) & 0xf); ++ else ++ vp += sprintf(vp, "cc=%d", (w >> 8) & 0xf); ++ vp++; ++ ++ vp += sprintf(vp, "aa2g=%d", (w >> 12) & 0x3); ++ vp++; ++ ++ vp += sprintf(vp, "aa5g=%d", (w >> 14) & 0x3); ++ vp++; ++ ++ /* Words 47-49 set the (wl) pa settings */ ++ woff = 47; ++ ++ for (i = 0; i < 3; i++) { ++ vp += sprintf(vp, "pa0b%d=%d", i, b[woff+i]); ++ vp++; ++ vp += sprintf(vp, "pa1b%d=%d", i, b[woff+i+6]); ++ vp++; ++ } ++ ++ /* ++ * Words 50-51 set the customer-configured wl led behavior. ++ * 8 bits/gpio pin. High bit: activehi=0, activelo=1; ++ * LED behavior values defined in wlioctl.h . ++ */ ++ w = b[50]; ++ if ((w != 0) && (w != 0xffff)) { ++ /* ledbh0 */ ++ vp += sprintf(vp, "ledbh0=%d", (w & 0xff)); ++ vp++; ++ ++ /* ledbh1 */ ++ vp += sprintf(vp, "ledbh1=%d", (w >> 8) & 0xff); ++ vp++; ++ } ++ w = b[51]; ++ if ((w != 0) && (w != 0xffff)) { ++ /* ledbh2 */ ++ vp += sprintf(vp, "ledbh2=%d", w & 0xff); ++ vp++; ++ ++ /* ledbh */ ++ vp += sprintf(vp, "ledbh3=%d", (w >> 8) & 0xff); ++ vp++; ++ } ++ ++ /* Word 52 is max power 0/1 */ ++ w = b[52]; ++ vp += sprintf(vp, "pa0maxpwr=%d", w & 0xff); ++ vp++; ++ vp += sprintf(vp, "pa1maxpwr=%d", (w >> 8) & 0xff); ++ vp++; ++ ++ /* Word 56 is idle tssi target 0/1 */ ++ w = b[56]; ++ vp += sprintf(vp, "pa0itssit=%d", w & 0xff); ++ vp++; ++ vp += sprintf(vp, "pa1itssit=%d", (w >> 8) & 0xff); ++ vp++; ++ ++ /* Word 57 is boardflags, if not programmed make it zero */ ++ w32 = (uint32)b[57]; ++ if (w32 == 0xffff) w32 = 0; ++ if (sromrev > 1) { ++ /* Word 28 is the high bits of boardflags */ ++ w32 |= (uint32)b[28] << 16; ++ } ++ vp += sprintf(vp, "boardflags=%d", w32); ++ vp++; ++ ++ /* Word 58 is antenna gain 0/1 */ ++ w = b[58]; ++ vp += sprintf(vp, "ag0=%d", w & 0xff); ++ vp++; ++ ++ vp += sprintf(vp, "ag1=%d", (w >> 8) & 0xff); ++ vp++; ++ ++ if (sromrev == 1) { ++ /* set the oem string */ ++ vp += sprintf(vp, "oem=%02x%02x%02x%02x%02x%02x%02x%02x", ++ ((b[59] >> 8) & 0xff), (b[59] & 0xff), ++ ((b[60] >> 8) & 0xff), (b[60] & 0xff), ++ ((b[61] >> 8) & 0xff), (b[61] & 0xff), ++ ((b[62] >> 8) & 0xff), (b[62] & 0xff)); ++ vp++; ++ } else if (sromrev == 2) { ++ /* Word 60 OFDM tx power offset from CCK level */ ++ /* OFDM Power Offset - opo */ ++ vp += sprintf(vp, "opo=%d", b[60] & 0xff); ++ vp++; ++ } else { ++ /* Word 60: cck power offsets */ ++ vp += sprintf(vp, "cckpo=%d", b[60]); ++ vp++; ++ ++ /* Words 61+62: 11g ofdm power offsets */ ++ w32 = ((uint32)b[62] << 16) | b[61]; ++ vp += sprintf(vp, "ofdmgpo=%d", w32); ++ vp++; ++ } ++ ++ /* final nullbyte terminator */ ++done: *vp++ = '\0'; ++ ++ ASSERT((vp - base) <= VARS_MAX); ++ ++varsdone: ++ err = initvars_table(osh, base, vp, vars, count); ++ ++err: ++#ifdef WLTEST ++ if (base != mfgsromvars) ++#endif ++ MFREE(osh, base, VARS_MAX); ++ MFREE(osh, b, SROM_MAX); ++ return err; ++} ++ ++/* ++ * Read the cis and call parsecis to initialize the vars. ++ * Return 0 on success, nonzero on error. ++ */ ++static int ++initvars_cis_pcmcia(void *sbh, osl_t *osh, char **vars, uint *count) ++{ ++ uint8 *cis = NULL; ++ int rc; ++ uint data_sz; ++ ++ data_sz = (sb_pcmciarev(sbh) == 1) ? (SPROM_SIZE * 2) : CIS_SIZE; ++ ++ if ((cis = MALLOC(osh, data_sz)) == NULL) ++ return (-2); ++ ++ if (sb_pcmciarev(sbh) == 1) { ++ if (srom_read(PCMCIA_BUS, (void *)NULL, osh, 0, data_sz, (uint16 *)cis)) { ++ MFREE(osh, cis, data_sz); ++ return (-1); ++ } ++ /* fix up endianess for 16-bit data vs 8-bit parsing */ ++ ltoh16_buf((uint16 *)cis, data_sz); ++ } else ++ OSL_PCMCIA_READ_ATTR(osh, 0, cis, data_sz); ++ ++ rc = srom_parsecis(osh, &cis, 1, vars, count); ++ ++ MFREE(osh, cis, data_sz); ++ ++ return (rc); ++} ++ +diff -urN linux.old/arch/mips/bcm947xx/bcmutils.c linux.dev/arch/mips/bcm947xx/bcmutils.c +--- linux.old/arch/mips/bcm947xx/bcmutils.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/bcmutils.c 2006-04-28 00:34:02.000000000 +0200 +@@ -0,0 +1,247 @@ ++/* ++ * Misc useful OS-independent routines. ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * $Id: bcmutils.c,v 1.1.1.12 2006/02/27 03:43:16 honor Exp $ ++ */ ++ ++#include <typedefs.h> ++#include <bcmdefs.h> ++#include <stdarg.h> ++#include <bcmutils.h> ++#include <osl.h> ++#include <sbutils.h> ++#include <bcmnvram.h> ++#include <bcmendian.h> ++#include <bcmdevs.h> ++ ++unsigned char bcm_ctype[] = { ++ _BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C, /* 0-7 */ ++ _BCM_C, _BCM_C|_BCM_S, _BCM_C|_BCM_S, _BCM_C|_BCM_S, _BCM_C|_BCM_S, _BCM_C|_BCM_S, _BCM_C, ++ _BCM_C, /* 8-15 */ ++ _BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C, /* 16-23 */ ++ _BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C, /* 24-31 */ ++ _BCM_S|_BCM_SP,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 32-39 */ ++ _BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 40-47 */ ++ _BCM_D,_BCM_D,_BCM_D,_BCM_D,_BCM_D,_BCM_D,_BCM_D,_BCM_D, /* 48-55 */ ++ _BCM_D,_BCM_D,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 56-63 */ ++ _BCM_P, _BCM_U|_BCM_X, _BCM_U|_BCM_X, _BCM_U|_BCM_X, _BCM_U|_BCM_X, _BCM_U|_BCM_X, ++ _BCM_U|_BCM_X, _BCM_U, /* 64-71 */ ++ _BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U, /* 72-79 */ ++ _BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U, /* 80-87 */ ++ _BCM_U,_BCM_U,_BCM_U,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 88-95 */ ++ _BCM_P, _BCM_L|_BCM_X, _BCM_L|_BCM_X, _BCM_L|_BCM_X, _BCM_L|_BCM_X, _BCM_L|_BCM_X, ++ _BCM_L|_BCM_X, _BCM_L, /* 96-103 */ ++ _BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L, /* 104-111 */ ++ _BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L, /* 112-119 */ ++ _BCM_L,_BCM_L,_BCM_L,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_C, /* 120-127 */ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 128-143 */ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 144-159 */ ++ _BCM_S|_BCM_SP, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, ++ _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, /* 160-175 */ ++ _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, ++ _BCM_P, _BCM_P, _BCM_P, _BCM_P, _BCM_P, /* 176-191 */ ++ _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, ++ _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, /* 192-207 */ ++ _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_P, _BCM_U, _BCM_U, _BCM_U, ++ _BCM_U, _BCM_U, _BCM_U, _BCM_U, _BCM_L, /* 208-223 */ ++ _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, ++ _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, /* 224-239 */ ++ _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_P, _BCM_L, _BCM_L, _BCM_L, ++ _BCM_L, _BCM_L, _BCM_L, _BCM_L, _BCM_L /* 240-255 */ ++}; ++ ++ ++ulong ++bcm_strtoul(char *cp, char **endp, uint base) ++{ ++ ulong result, value; ++ bool minus; ++ ++ minus = FALSE; ++ ++ while (bcm_isspace(*cp)) ++ cp++; ++ ++ if (cp[0] == '+') ++ cp++; ++ else if (cp[0] == '-') { ++ minus = TRUE; ++ cp++; ++ } ++ ++ if (base == 0) { ++ if (cp[0] == '0') { ++ if ((cp[1] == 'x') || (cp[1] == 'X')) { ++ base = 16; ++ cp = &cp[2]; ++ } else { ++ base = 8; ++ cp = &cp[1]; ++ } ++ } else ++ base = 10; ++ } else if (base == 16 && (cp[0] == '0') && ((cp[1] == 'x') || (cp[1] == 'X'))) { ++ cp = &cp[2]; ++ } ++ ++ result = 0; ++ ++ while (bcm_isxdigit(*cp) && ++ (value = bcm_isdigit(*cp) ? *cp-'0' : bcm_toupper(*cp)-'A'+10) < base) { ++ result = result*base + value; ++ cp++; ++ } ++ ++ if (minus) ++ result = (ulong)(result * -1); ++ ++ if (endp) ++ *endp = (char *)cp; ++ ++ return (result); ++} ++ ++uchar ++bcm_toupper(uchar c) ++{ ++ if (bcm_islower(c)) ++ c -= 'a'-'A'; ++ return (c); ++} ++ ++char* ++bcm_ether_ntoa(struct ether_addr *ea, char *buf) ++{ ++ sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", ++ ea->octet[0]&0xff, ea->octet[1]&0xff, ea->octet[2]&0xff, ++ ea->octet[3]&0xff, ea->octet[4]&0xff, ea->octet[5]&0xff); ++ return (buf); ++} ++ ++ ++/* ++ * Search the name=value vars for a specific one and return its value. ++ * Returns NULL if not found. ++ */ ++char* ++getvar(char *vars, char *name) ++{ ++ char *s; ++ int len; ++ ++ len = strlen(name); ++ ++ /* first look in vars[] */ ++ for (s = vars; s && *s;) { ++ /* CSTYLED */ ++ if ((memcmp(s, name, len) == 0) && (s[len] == '=')) ++ return (&s[len+1]); ++ ++ while (*s++) ++ ; ++ } ++ ++ /* then query nvram */ ++ return (nvram_get(name)); ++} ++ ++/* ++ * Search the vars for a specific one and return its value as ++ * an integer. Returns 0 if not found. ++ */ ++int ++getintvar(char *vars, char *name) ++{ ++ char *val; ++ ++ if ((val = getvar(vars, name)) == NULL) ++ return (0); ++ ++ return (bcm_strtoul(val, NULL, 0)); ++} ++ ++ ++/******************************************************************************* ++ * crc8 ++ * ++ * Computes a crc8 over the input data using the polynomial: ++ * ++ * x^8 + x^7 +x^6 + x^4 + x^2 + 1 ++ * ++ * The caller provides the initial value (either CRC8_INIT_VALUE ++ * or the previous returned value) to allow for processing of ++ * discontiguous blocks of data. When generating the CRC the ++ * caller is responsible for complementing the final return value ++ * and inserting it into the byte stream. When checking, a final ++ * return value of CRC8_GOOD_VALUE indicates a valid CRC. ++ * ++ * Reference: Dallas Semiconductor Application Note 27 ++ * Williams, Ross N., "A Painless Guide to CRC Error Detection Algorithms", ++ * ver 3, Aug 1993, ross@guest.adelaide.edu.au, Rocksoft Pty Ltd., ++ * ftp://ftp.rocksoft.com/clients/rocksoft/papers/crc_v3.txt ++ * ++ * **************************************************************************** ++ */ ++ ++static uint8 crc8_table[256] = { ++ 0x00, 0xF7, 0xB9, 0x4E, 0x25, 0xD2, 0x9C, 0x6B, ++ 0x4A, 0xBD, 0xF3, 0x04, 0x6F, 0x98, 0xD6, 0x21, ++ 0x94, 0x63, 0x2D, 0xDA, 0xB1, 0x46, 0x08, 0xFF, ++ 0xDE, 0x29, 0x67, 0x90, 0xFB, 0x0C, 0x42, 0xB5, ++ 0x7F, 0x88, 0xC6, 0x31, 0x5A, 0xAD, 0xE3, 0x14, ++ 0x35, 0xC2, 0x8C, 0x7B, 0x10, 0xE7, 0xA9, 0x5E, ++ 0xEB, 0x1C, 0x52, 0xA5, 0xCE, 0x39, 0x77, 0x80, ++ 0xA1, 0x56, 0x18, 0xEF, 0x84, 0x73, 0x3D, 0xCA, ++ 0xFE, 0x09, 0x47, 0xB0, 0xDB, 0x2C, 0x62, 0x95, ++ 0xB4, 0x43, 0x0D, 0xFA, 0x91, 0x66, 0x28, 0xDF, ++ 0x6A, 0x9D, 0xD3, 0x24, 0x4F, 0xB8, 0xF6, 0x01, ++ 0x20, 0xD7, 0x99, 0x6E, 0x05, 0xF2, 0xBC, 0x4B, ++ 0x81, 0x76, 0x38, 0xCF, 0xA4, 0x53, 0x1D, 0xEA, ++ 0xCB, 0x3C, 0x72, 0x85, 0xEE, 0x19, 0x57, 0xA0, ++ 0x15, 0xE2, 0xAC, 0x5B, 0x30, 0xC7, 0x89, 0x7E, ++ 0x5F, 0xA8, 0xE6, 0x11, 0x7A, 0x8D, 0xC3, 0x34, ++ 0xAB, 0x5C, 0x12, 0xE5, 0x8E, 0x79, 0x37, 0xC0, ++ 0xE1, 0x16, 0x58, 0xAF, 0xC4, 0x33, 0x7D, 0x8A, ++ 0x3F, 0xC8, 0x86, 0x71, 0x1A, 0xED, 0xA3, 0x54, ++ 0x75, 0x82, 0xCC, 0x3B, 0x50, 0xA7, 0xE9, 0x1E, ++ 0xD4, 0x23, 0x6D, 0x9A, 0xF1, 0x06, 0x48, 0xBF, ++ 0x9E, 0x69, 0x27, 0xD0, 0xBB, 0x4C, 0x02, 0xF5, ++ 0x40, 0xB7, 0xF9, 0x0E, 0x65, 0x92, 0xDC, 0x2B, ++ 0x0A, 0xFD, 0xB3, 0x44, 0x2F, 0xD8, 0x96, 0x61, ++ 0x55, 0xA2, 0xEC, 0x1B, 0x70, 0x87, 0xC9, 0x3E, ++ 0x1F, 0xE8, 0xA6, 0x51, 0x3A, 0xCD, 0x83, 0x74, ++ 0xC1, 0x36, 0x78, 0x8F, 0xE4, 0x13, 0x5D, 0xAA, ++ 0x8B, 0x7C, 0x32, 0xC5, 0xAE, 0x59, 0x17, 0xE0, ++ 0x2A, 0xDD, 0x93, 0x64, 0x0F, 0xF8, 0xB6, 0x41, ++ 0x60, 0x97, 0xD9, 0x2E, 0x45, 0xB2, 0xFC, 0x0B, ++ 0xBE, 0x49, 0x07, 0xF0, 0x9B, 0x6C, 0x22, 0xD5, ++ 0xF4, 0x03, 0x4D, 0xBA, 0xD1, 0x26, 0x68, 0x9F ++}; ++ ++#define CRC_INNER_LOOP(n, c, x) \ ++ (c) = ((c) >> 8) ^ crc##n##_table[((c) ^ (x)) & 0xff] ++ ++uint8 ++hndcrc8( ++ uint8 *pdata, /* pointer to array of data to process */ ++ uint nbytes, /* number of input data bytes to process */ ++ uint8 crc /* either CRC8_INIT_VALUE or previous return value */ ++) ++{ ++ /* hard code the crc loop instead of using CRC_INNER_LOOP macro ++ * to avoid the undefined and unnecessary (uint8 >> 8) operation. ++ */ ++ while (nbytes-- > 0) ++ crc = crc8_table[(crc ^ *pdata++) & 0xff]; ++ ++ return crc; ++} ++ ++ +diff -urN linux.old/arch/mips/bcm947xx/cfe_env.c linux.dev/arch/mips/bcm947xx/cfe_env.c --- linux.old/arch/mips/bcm947xx/cfe_env.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/cfe_env.c 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/cfe_env.c 2006-04-27 19:24:19.000000000 +0200 @@ -0,0 +1,234 @@ +/* + * NVRAM variable manipulation (Linux kernel half) @@ -286,9 +1755,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/cfe_env.c linux.dev/arch/mips/bcm947xx/c + +} + -diff -Naur linux.old/arch/mips/bcm947xx/compressed/Makefile linux.dev/arch/mips/bcm947xx/compressed/Makefile +diff -urN linux.old/arch/mips/bcm947xx/compressed/Makefile linux.dev/arch/mips/bcm947xx/compressed/Makefile --- linux.old/arch/mips/bcm947xx/compressed/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/compressed/Makefile 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/compressed/Makefile 2006-04-27 19:24:19.000000000 +0200 @@ -0,0 +1,33 @@ +# +# Makefile for Broadcom BCM947XX boards @@ -323,9 +1792,75 @@ diff -Naur linux.old/arch/mips/bcm947xx/compressed/Makefile linux.dev/arch/mips/ + +clean: + rm -f vmlinuz piggy -diff -Naur linux.old/arch/mips/bcm947xx/generic/Makefile linux.dev/arch/mips/bcm947xx/generic/Makefile +diff -urN linux.old/arch/mips/bcm947xx/export.c linux.dev/arch/mips/bcm947xx/export.c +--- linux.old/arch/mips/bcm947xx/export.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/export.c 2006-04-28 02:57:34.000000000 +0200 +@@ -0,0 +1,62 @@ ++#include <linux/module.h> ++ ++#define _export(n) \ ++ void n(void); \ ++ EXPORT_SYMBOL(n); ++ ++_export(bcm947xx_sbh) ++ ++_export(sb_attach) ++_export(sb_boardtype) ++_export(sb_boardvendor) ++_export(sb_btcgpiowar) ++_export(sb_bus) ++_export(sb_chip) ++_export(sb_chiprev) ++_export(sb_chipcrev) ++_export(sb_chippkg) ++_export(sb_clkctl_clk) ++_export(sb_clkctl_fast_pwrup_delay) ++_export(sb_clkctl_init) ++_export(sb_clkctl_xtal) ++_export(sb_core_disable) ++_export(sb_core_reset) ++_export(sb_core_tofixup) ++_export(sb_coreflags) ++_export(sb_coreflagshi) ++_export(sb_coreidx) ++_export(sb_corerev) ++_export(sb_coreunit) ++_export(sb_detach) ++_export(sb_deviceremoved) ++_export(sb_gpiocontrol) ++_export(sb_gpioled) ++_export(sb_gpioin) ++_export(sb_gpioout) ++_export(sb_gpioouten) ++_export(sb_gpiotimerval) ++_export(sb_iscoreup) ++_export(sb_pci_setup) ++_export(sb_pcirev) ++_export(sb_pcmcia_init) ++_export(sb_pcmciarev) ++_export(sb_register_intr_callback) ++_export(sb_setcore) ++_export(sb_war16165) ++_export(sb_osh) ++ ++_export(getvar) ++_export(getintvar) ++_export(bcm_strtoul) ++_export(bcm_ctype) ++_export(bcm_toupper) ++_export(bcm_ether_ntoa) ++ ++_export(nvram_get) ++_export(nvram_getall) ++_export(nvram_set) ++_export(nvram_unset) ++_export(nvram_commit) ++ ++_export(srom_read) ++_export(srom_write) +diff -urN linux.old/arch/mips/bcm947xx/generic/Makefile linux.dev/arch/mips/bcm947xx/generic/Makefile --- linux.old/arch/mips/bcm947xx/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/generic/Makefile 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/generic/Makefile 2006-04-27 19:24:19.000000000 +0200 @@ -0,0 +1,15 @@ +# +# Makefile for the BCM947xx specific kernel interface routines @@ -342,9 +1877,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/generic/Makefile linux.dev/arch/mips/bcm +obj-y := int-handler.o irq.o + +include $(TOPDIR)/Rules.make -diff -Naur linux.old/arch/mips/bcm947xx/generic/int-handler.S linux.dev/arch/mips/bcm947xx/generic/int-handler.S +diff -urN linux.old/arch/mips/bcm947xx/generic/int-handler.S linux.dev/arch/mips/bcm947xx/generic/int-handler.S --- linux.old/arch/mips/bcm947xx/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/generic/int-handler.S 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/generic/int-handler.S 2006-04-27 19:24:19.000000000 +0200 @@ -0,0 +1,51 @@ +/* + * Generic interrupt handler for Broadcom MIPS boards @@ -397,9 +1932,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/generic/int-handler.S linux.dev/arch/mip + nop + + END(brcmIRQ) -diff -Naur linux.old/arch/mips/bcm947xx/generic/irq.c linux.dev/arch/mips/bcm947xx/generic/irq.c +diff -urN linux.old/arch/mips/bcm947xx/generic/irq.c linux.dev/arch/mips/bcm947xx/generic/irq.c --- linux.old/arch/mips/bcm947xx/generic/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/generic/irq.c 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/generic/irq.c 2006-04-27 19:24:19.000000000 +0200 @@ -0,0 +1,130 @@ +/* + * Generic interrupt control functions for Broadcom MIPS boards @@ -531,10 +2066,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/generic/irq.c linux.dev/arch/mips/bcm947 + breakpoint(); +#endif +} -diff -Naur linux.old/arch/mips/bcm947xx/gpio.c linux.dev/arch/mips/bcm947xx/gpio.c +diff -urN linux.old/arch/mips/bcm947xx/gpio.c linux.dev/arch/mips/bcm947xx/gpio.c --- linux.old/arch/mips/bcm947xx/gpio.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/gpio.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,158 @@ ++++ linux.dev/arch/mips/bcm947xx/gpio.c 2006-04-27 23:09:33.000000000 +0200 +@@ -0,0 +1,159 @@ +/* + * GPIO char driver + * @@ -556,6 +2091,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/gpio.c linux.dev/arch/mips/bcm947xx/gpio +#include <asm/uaccess.h> + +#include <typedefs.h> ++#include <osl.h> +#include <bcmutils.h> +#include <sbutils.h> +#include <bcmdevs.h> @@ -693,9 +2229,749 @@ diff -Naur linux.old/arch/mips/bcm947xx/gpio.c linux.dev/arch/mips/bcm947xx/gpio + +module_init(gpio_init); +module_exit(gpio_exit); -diff -Naur linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bcm947xx/include/bcmdevs.h +diff -urN linux.old/arch/mips/bcm947xx/hndchipc.c linux.dev/arch/mips/bcm947xx/hndchipc.c +--- linux.old/arch/mips/bcm947xx/hndchipc.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/hndchipc.c 2006-04-28 00:33:05.000000000 +0200 +@@ -0,0 +1,158 @@ ++/* ++ * BCM47XX support code for some chipcommon (old extif) facilities (uart) ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: hndchipc.c,v 1.1.1.1 2006/02/27 03:43:16 honor Exp $ ++ */ ++ ++#include <typedefs.h> ++#include <bcmdefs.h> ++#include <osl.h> ++#include <bcmutils.h> ++#include <sbutils.h> ++#include <bcmdevs.h> ++#include <bcmnvram.h> ++#include <sbconfig.h> ++#include <sbextif.h> ++#include <sbchipc.h> ++#include <hndcpu.h> ++ ++/* ++ * Returns TRUE if an external UART exists at the given base ++ * register. ++ */ ++static bool ++BCMINITFN(serial_exists)(osl_t *osh, uint8 *regs) ++{ ++ uint8 save_mcr, status1; ++ ++ save_mcr = R_REG(osh, ®s[UART_MCR]); ++ W_REG(osh, ®s[UART_MCR], UART_MCR_LOOP | 0x0a); ++ status1 = R_REG(osh, ®s[UART_MSR]) & 0xf0; ++ W_REG(osh, ®s[UART_MCR], save_mcr); ++ ++ return (status1 == 0x90); ++} ++ ++/* ++ * Initializes UART access. The callback function will be called once ++ * per found UART. ++ */ ++void ++BCMINITFN(sb_serial_init)(sb_t *sbh, void (*add)(void *regs, uint irq, uint baud_base, ++ uint reg_shift)) ++{ ++ osl_t *osh; ++ void *regs; ++ ulong base; ++ uint irq; ++ int i, n; ++ ++ osh = sb_osh(sbh); ++ ++ if ((regs = sb_setcore(sbh, SB_EXTIF, 0))) { ++ extifregs_t *eir = (extifregs_t *) regs; ++ sbconfig_t *sb; ++ ++ /* Determine external UART register base */ ++ sb = (sbconfig_t *)((ulong) eir + SBCONFIGOFF); ++ base = EXTIF_CFGIF_BASE(sb_base(R_REG(osh, &sb->sbadmatch1))); ++ ++ /* Determine IRQ */ ++ irq = sb_irq(sbh); ++ ++ /* Disable GPIO interrupt initially */ ++ W_REG(osh, &eir->gpiointpolarity, 0); ++ W_REG(osh, &eir->gpiointmask, 0); ++ ++ /* Search for external UARTs */ ++ n = 2; ++ for (i = 0; i < 2; i++) { ++ regs = (void *) REG_MAP(base + (i * 8), 8); ++ if (serial_exists(osh, regs)) { ++ /* Set GPIO 1 to be the external UART IRQ */ ++ W_REG(osh, &eir->gpiointmask, 2); ++ /* XXXDetermine external UART clock */ ++ if (add) ++ add(regs, irq, 13500000, 0); ++ } ++ } ++ ++ /* Add internal UART if enabled */ ++ if (R_REG(osh, &eir->corecontrol) & CC_UE) ++ if (add) ++ add((void *) &eir->uartdata, irq, sb_clock(sbh), 2); ++ } else if ((regs = sb_setcore(sbh, SB_CC, 0))) { ++ chipcregs_t *cc = (chipcregs_t *) regs; ++ uint32 rev, cap, pll, baud_base, div; ++ ++ /* Determine core revision and capabilities */ ++ rev = sb_corerev(sbh); ++ cap = R_REG(osh, &cc->capabilities); ++ pll = cap & CAP_PLL_MASK; ++ ++ /* Determine IRQ */ ++ irq = sb_irq(sbh); ++ ++ if (pll == PLL_TYPE1) { ++ /* PLL clock */ ++ baud_base = sb_clock_rate(pll, ++ R_REG(osh, &cc->clockcontrol_n), ++ R_REG(osh, &cc->clockcontrol_m2)); ++ div = 1; ++ } else { ++ /* Fixed ALP clock */ ++ if (rev >= 11 && rev != 15) { ++ baud_base = 20000000; ++ div = 1; ++ /* Set the override bit so we don't divide it */ ++ W_REG(osh, &cc->corecontrol, CC_UARTCLKO); ++ } ++ /* Internal backplane clock */ ++ else if (rev >= 3) { ++ baud_base = sb_clock(sbh); ++ div = 2; /* Minimum divisor */ ++ W_REG(osh, &cc->clkdiv, ++ ((R_REG(osh, &cc->clkdiv) & ~CLKD_UART) | div)); ++ } ++ /* Fixed internal backplane clock */ ++ else { ++ baud_base = 88000000; ++ div = 48; ++ } ++ ++ /* Clock source depends on strapping if UartClkOverride is unset */ ++ if ((rev > 0) && ++ ((R_REG(osh, &cc->corecontrol) & CC_UARTCLKO) == 0)) { ++ if ((cap & CAP_UCLKSEL) == CAP_UINTCLK) { ++ /* Internal divided backplane clock */ ++ baud_base /= div; ++ } else { ++ /* Assume external clock of 1.8432 MHz */ ++ baud_base = 1843200; ++ } ++ } ++ } ++ ++ /* Add internal UARTs */ ++ n = cap & CAP_UARTS_MASK; ++ for (i = 0; i < n; i++) { ++ /* Register offset changed after revision 0 */ ++ if (rev) ++ regs = (void *)((ulong) &cc->uart0data + (i * 256)); ++ else ++ regs = (void *)((ulong) &cc->uart0data + (i * 8)); ++ ++ if (add) ++ add(regs, irq, baud_base, 0); ++ } ++ } ++} ++ +diff -urN linux.old/arch/mips/bcm947xx/include/bcm4710.h linux.dev/arch/mips/bcm947xx/include/bcm4710.h +--- linux.old/arch/mips/bcm947xx/include/bcm4710.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/bcm4710.h 2006-04-27 22:30:01.000000000 +0200 +@@ -0,0 +1,91 @@ ++/* ++ * BCM4710 address space map and definitions ++ * Think twice before adding to this file, this is not the kitchen sink ++ * These definitions are not guaranteed for all 47xx chips, only the 4710 ++ * ++ * Copyright 2004, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: bcm4710.h,v 1.3 2004/09/27 07:23:30 tallest Exp $ ++ */ ++ ++#ifndef _bcm4710_h_ ++#define _bcm4710_h_ ++ ++/* Address map */ ++#define BCM4710_SDRAM 0x00000000 /* Physical SDRAM */ ++#define BCM4710_PCI_MEM 0x08000000 /* Host Mode PCI memory access space (64 MB) */ ++#define BCM4710_PCI_CFG 0x0c000000 /* Host Mode PCI configuration space (64 MB) */ ++#define BCM4710_PCI_DMA 0x40000000 /* Client Mode PCI memory access space (1 GB) */ ++#define BCM4710_SDRAM_SWAPPED 0x10000000 /* Byteswapped Physical SDRAM */ ++#define BCM4710_ENUM 0x18000000 /* Beginning of core enumeration space */ ++ ++/* Core register space */ ++#define BCM4710_REG_SDRAM 0x18000000 /* SDRAM core registers */ ++#define BCM4710_REG_ILINE20 0x18001000 /* InsideLine20 core registers */ ++#define BCM4710_REG_EMAC0 0x18002000 /* Ethernet MAC 0 core registers */ ++#define BCM4710_REG_CODEC 0x18003000 /* Codec core registers */ ++#define BCM4710_REG_USB 0x18004000 /* USB core registers */ ++#define BCM4710_REG_PCI 0x18005000 /* PCI core registers */ ++#define BCM4710_REG_MIPS 0x18006000 /* MIPS core registers */ ++#define BCM4710_REG_EXTIF 0x18007000 /* External Interface core registers */ ++#define BCM4710_REG_EMAC1 0x18008000 /* Ethernet MAC 1 core registers */ ++ ++#define BCM4710_EXTIF 0x1f000000 /* External Interface base address */ ++#define BCM4710_PCMCIA_MEM 0x1f000000 /* External Interface PCMCIA memory access */ ++#define BCM4710_PCMCIA_IO 0x1f100000 /* PCMCIA I/O access */ ++#define BCM4710_PCMCIA_CONF 0x1f200000 /* PCMCIA configuration */ ++#define BCM4710_PROG 0x1f800000 /* Programable interface */ ++#define BCM4710_FLASH 0x1fc00000 /* Flash */ ++ ++#define BCM4710_EJTAG 0xff200000 /* MIPS EJTAG space (2M) */ ++ ++#define BCM4710_UART (BCM4710_REG_EXTIF + 0x00000300) ++ ++#define BCM4710_EUART (BCM4710_EXTIF + 0x00800000) ++#define BCM4710_LED (BCM4710_EXTIF + 0x00900000) ++ ++#define SBFLAG_PCI 0 ++#define SBFLAG_ENET0 1 ++#define SBFLAG_ILINE20 2 ++#define SBFLAG_CODEC 3 ++#define SBFLAG_USB 4 ++#define SBFLAG_EXTIF 5 ++#define SBFLAG_ENET1 6 ++ ++#ifdef CONFIG_HWSIM ++#define BCM4710_TRACE(trval) do { *((int *)0xa0000f18) = (trval); } while (0) ++#else ++#define BCM4710_TRACE(trval) ++#endif ++ ++ ++/* BCM94702 CPCI -ExtIF used for LocalBus devs */ ++ ++#define BCM94702_CPCI_RESET_ADDR BCM4710_EXTIF ++#define BCM94702_CPCI_BOARDID_ADDR (BCM4710_EXTIF | 0x4000) ++#define BCM94702_CPCI_DOC_ADDR (BCM4710_EXTIF | 0x6000) ++#define BCM94702_DOC_ADDR BCM94702_CPCI_DOC_ADDR ++#define BCM94702_CPCI_LED_ADDR (BCM4710_EXTIF | 0xc000) ++#define BCM94702_CPCI_NVRAM_ADDR (BCM4710_EXTIF | 0xe000) ++#define BCM94702_CPCI_NVRAM_SIZE 0x1ff0 /* 8K NVRAM : DS1743/STM48txx*/ ++#define BCM94702_CPCI_TOD_REG_BASE (BCM94702_CPCI_NVRAM_ADDR | 0x1ff0) ++ ++#define LED_REG(x) \ ++ (*(volatile unsigned char *) (KSEG1ADDR(BCM94702_CPCI_LED_ADDR) + (x))) ++ ++/* ++ * Reset function implemented in PLD. Read or write should trigger hard reset ++ */ ++#define SYS_HARD_RESET() \ ++ { for (;;) \ ++ *( (volatile unsigned char *)\ ++ KSEG1ADDR(BCM94702_CPCI_RESET_ADDR) ) = 0x80; \ ++ } ++ ++#endif /* _bcm4710_h_ */ +diff -urN linux.old/arch/mips/bcm947xx/include/bcmdefs.h linux.dev/arch/mips/bcm947xx/include/bcmdefs.h +--- linux.old/arch/mips/bcm947xx/include/bcmdefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/bcmdefs.h 2006-04-27 20:12:21.000000000 +0200 +@@ -0,0 +1,106 @@ ++/* ++ * Misc system wide definitions ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * $Id: bcmdefs.h,v 1.1.1.3 2006/04/08 06:13:39 honor Exp $ ++ */ ++ ++#ifndef _bcmdefs_h_ ++#define _bcmdefs_h_ ++ ++/* ++ * One doesn't need to include this file explicitly, gets included automatically if ++ * typedefs.h is included. ++ */ ++ ++/* Reclaiming text and data : ++ * The following macros specify special linker sections that can be reclaimed ++ * after a system is considered 'up'. ++ */ ++#if defined(__GNUC__) && defined(BCMRECLAIM) ++extern bool bcmreclaimed; ++#define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data ++#define BCMINITFN(_fn) __attribute__ ((__section__ (".textini." #_fn))) _fn ++#else /* #if defined(__GNUC__) && defined(BCMRECLAIM) */ ++#define BCMINITDATA(_data) _data ++#define BCMINITFN(_fn) _fn ++#define bcmreclaimed 0 ++#endif /* #if defined(__GNUC__) && defined(BCMRECLAIM) */ ++ ++/* Reclaim uninit functions if BCMNODOWN is defined */ ++/* and if they are not already removed by -gc-sections */ ++#ifdef BCMNODOWN ++#define BCMUNINITFN(_fn) BCMINITFN(_fn) ++#else ++#define BCMUNINITFN(_fn) _fn ++#endif ++ ++#ifdef BCMRECLAIM ++#define CONST ++#else ++#define CONST const ++#endif /* BCMRECLAIM */ ++ ++/* Compatibility with old-style BCMRECLAIM */ ++#define BCMINIT(_id) _id ++ ++ ++/* Put some library data/code into ROM to reduce RAM requirements */ ++#if defined(__GNUC__) && defined(BCMROMOFFLOAD) ++#define BCMROMDATA(_data) __attribute__ ((__section__ (".datarom." #_data))) _data ++#define BCMROMFN(_fn) __attribute__ ((__section__ (".textrom." #_fn))) _fn ++#else ++#define BCMROMDATA(_data) _data ++#define BCMROMFN(_fn) _fn ++#endif ++ ++/* Bus types */ ++#define SB_BUS 0 /* Silicon Backplane */ ++#define PCI_BUS 1 /* PCI target */ ++#define PCMCIA_BUS 2 /* PCMCIA target */ ++#define SDIO_BUS 3 /* SDIO target */ ++#define JTAG_BUS 4 /* JTAG */ ++#define NO_BUS 0xFF /* Bus that does not support R/W REG */ ++ ++/* Allows optimization for single-bus support */ ++#ifdef BCMBUSTYPE ++#define BUSTYPE(bus) (BCMBUSTYPE) ++#else ++#define BUSTYPE(bus) (bus) ++#endif ++ ++/* Defines for DMA Address Width - Shared between OSL and HNDDMA */ ++#define DMADDR_MASK_32 0x0 /* Address mask for 32-bits */ ++#define DMADDR_MASK_30 0xc0000000 /* Address mask for 30-bits */ ++#define DMADDR_MASK_0 0xffffffff /* Address mask for 0-bits (hi-part) */ ++ ++#define DMADDRWIDTH_30 30 /* 30-bit addressing capability */ ++#define DMADDRWIDTH_32 32 /* 32-bit addressing capability */ ++#define DMADDRWIDTH_63 63 /* 64-bit addressing capability */ ++#define DMADDRWIDTH_64 64 /* 64-bit addressing capability */ ++ ++/* packet headroom necessary to accomodate the largest header in the system, (i.e TXOFF). ++ * By doing, we avoid the need to allocate an extra buffer for the header when bridging to WL. ++ * There is a compile time check in wlc.c which ensure that this value is at least as big ++ * as TXOFF. This value is used in dma_rxfill (hnddma.c). ++ */ ++#define BCMEXTRAHDROOM 160 ++ ++/* Headroom required for dongle-to-host communication. Packets allocated ++ * locally in the dongle (e.g. for CDC ioctls or RNDIS messages) should ++ * leave this much room in front for low-level message headers which may ++ * be needed to get across the dongle bus to the host. (These messages ++ * don't go over the network, so room for the full WL header above would ++ * be a waste.) ++ */ ++#define BCMDONGLEHDRSZ 8 ++ ++ ++ ++#endif /* _bcmdefs_h_ */ +diff -urN linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bcm947xx/include/bcmdevs.h --- linux.old/arch/mips/bcm947xx/include/bcmdevs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmdevs.h 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/include/bcmdevs.h 2006-04-27 22:30:25.000000000 +0200 +@@ -0,0 +1,369 @@ ++/* ++ * Broadcom device-specific manifest constants. ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * $Id: bcmdevs.h,v 1.1.1.17 2006/04/15 01:29:08 michael Exp $ ++ */ ++ ++#ifndef _BCMDEVS_H ++#define _BCMDEVS_H ++ ++#include "bcm4710.h" ++ ++/* Known PCI vendor Id's */ ++#define VENDOR_EPIGRAM 0xfeda ++#define VENDOR_BROADCOM 0x14e4 ++#define VENDOR_3COM 0x10b7 ++#define VENDOR_NETGEAR 0x1385 ++#define VENDOR_DIAMOND 0x1092 ++#define VENDOR_DELL 0x1028 ++#define VENDOR_HP 0x0e11 ++#define VENDOR_APPLE 0x106b ++ ++/* PCI Device Id's */ ++#define BCM4210_DEVICE_ID 0x1072 /* never used */ ++#define BCM4211_DEVICE_ID 0x4211 ++#define BCM4230_DEVICE_ID 0x1086 /* never used */ ++#define BCM4231_DEVICE_ID 0x4231 ++ ++#define BCM4410_DEVICE_ID 0x4410 /* bcm44xx family pci iline */ ++#define BCM4430_DEVICE_ID 0x4430 /* bcm44xx family cardbus iline */ ++#define BCM4412_DEVICE_ID 0x4412 /* bcm44xx family pci enet */ ++#define BCM4432_DEVICE_ID 0x4432 /* bcm44xx family cardbus enet */ ++ ++#define BCM3352_DEVICE_ID 0x3352 /* bcm3352 device id */ ++#define BCM3360_DEVICE_ID 0x3360 /* bcm3360 device id */ ++ ++#define EPI41210_DEVICE_ID 0xa0fa /* bcm4210 */ ++#define EPI41230_DEVICE_ID 0xa10e /* bcm4230 */ ++ ++#define BCM47XX_ILINE_ID 0x4711 /* 47xx iline20 */ ++#define BCM47XX_V90_ID 0x4712 /* 47xx v90 codec */ ++#define BCM47XX_ENET_ID 0x4713 /* 47xx enet */ ++#define BCM47XX_EXT_ID 0x4714 /* 47xx external i/f */ ++#define BCM47XX_USB_ID 0x4715 /* 47xx usb */ ++#define BCM47XX_USBH_ID 0x4716 /* 47xx usb host */ ++#define BCM47XX_USBD_ID 0x4717 /* 47xx usb device */ ++#define BCM47XX_IPSEC_ID 0x4718 /* 47xx ipsec */ ++#define BCM47XX_ROBO_ID 0x4719 /* 47xx/53xx roboswitch core */ ++#define BCM47XX_USB20H_ID 0x471a /* 47xx usb 2.0 host */ ++#define BCM47XX_USB20D_ID 0x471b /* 47xx usb 2.0 device */ ++#define BCM47XX_ATA100_ID 0x471d /* 47xx parallel ATA */ ++#define BCM47XX_SATAXOR_ID 0x471e /* 47xx serial ATA & XOR DMA */ ++#define BCM47XX_GIGETH_ID 0x471f /* 47xx GbE (5700) */ ++ ++#define BCM47XX_SMBUS_EMU_ID 0x47fe /* 47xx emulated SMBus device */ ++#define BCM47XX_XOR_EMU_ID 0x47ff /* 47xx emulated XOR engine */ ++ ++#define BCM4710_CHIP_ID 0x4710 /* 4710 chipid returned by sb_chip() */ ++#define BCM4710_DEVICE_ID 0x4710 /* 4710 primary function 0 */ ++ ++#define BCM4402_CHIP_ID 0x4402 /* 4402 chipid */ ++#define BCM4402_ENET_ID 0x4402 /* 4402 enet */ ++#define BCM4402_V90_ID 0x4403 /* 4402 v90 codec */ ++#define BCM4401_ENET_ID 0x170c /* 4401b0 production enet cards */ ++ ++#define BCM4306_CHIP_ID 0x4306 /* 4306 chipcommon chipid */ ++#define BCM4306_D11G_ID 0x4320 /* 4306 802.11g */ ++#define BCM4306_D11G_ID2 0x4325 ++#define BCM4306_D11A_ID 0x4321 /* 4306 802.11a */ ++#define BCM4306_UART_ID 0x4322 /* 4306 uart */ ++#define BCM4306_V90_ID 0x4323 /* 4306 v90 codec */ ++#define BCM4306_D11DUAL_ID 0x4324 /* 4306 dual A+B */ ++ ++#define BCM4309_PKG_ID 1 /* 4309 package id */ ++ ++#define BCM4311_CHIP_ID 0x4311 /* 4311 PCIe 802.11a/b/g */ ++#define BCM4311_D11G_ID 0x4311 /* 4311 802.11b/g id */ ++#define BCM4311_D11DUAL_ID 0x4312 /* 4311 802.11a/b/g id */ ++#define BCM4311_D11A_ID 0x4313 /* 4311 802.11a id */ ++ ++#define BCM4303_D11B_ID 0x4303 /* 4303 802.11b */ ++#define BCM4303_PKG_ID 2 /* 4303 package id */ ++ ++#define BCMGPRS_UART_ID 0x4333 /* Uart id used by 4306/gprs card */ ++#define BCMGPRS2_UART_ID 0x4344 /* Uart id used by 4306/gprs card */ ++ ++#define BCM4704_CHIP_ID 0x4704 /* 4704 chipcommon chipid */ ++#define BCM4704_ENET_ID 0x4706 /* 4704 enet (Use 47XX_ENET_ID instead!) */ ++ ++#define BCM4318_CHIP_ID 0x4318 /* 4318 chip common chipid */ ++#define BCM4318_D11G_ID 0x4318 /* 4318 802.11b/g id */ ++#define BCM4318_D11DUAL_ID 0x4319 /* 4318 802.11a/b/g id */ ++#define BCM4318_D11A_ID 0x431a /* 4318 802.11a id */ ++ ++#define BCM4321_CHIP_ID 0x4321 /* 4321 chip common chipid */ ++#define BCM4321_D11N_ID 0x4328 /* 4321 802.11n dualband id */ ++#define BCM4321_D11N2G_ID 0x4329 /* 4321 802.11n 2.4Hgz band id */ ++#define BCM4321_D11N5G_ID 0x432a /* 4321 802.11n 5Ghz band id */ ++ ++#define BCM4331_CHIP_ID 0x4331 /* 4331 chip common chipid */ ++#define BCM4331_D11N2G_ID 0x4330 /* 4331 802.11n 2.4Ghz band id */ ++#define BCM4331_D11N_ID 0x4331 /* 4331 802.11n dualband id */ ++#define BCM4331_D11N5G_ID 0x4332 /* 4331 802.11n 5Ghz band id */ ++ ++#define HDLSIM5350_PKG_ID 1 /* HDL simulator package id for a 5350 */ ++#define HDLSIM_PKG_ID 14 /* HDL simulator package id */ ++#define HWSIM_PKG_ID 15 /* Hardware simulator package id */ ++ ++#define BCM4712_CHIP_ID 0x4712 /* 4712 chipcommon chipid */ ++#define BCM4712_MIPS_ID 0x4720 /* 4712 base devid */ ++#define BCM4712LARGE_PKG_ID 0 /* 340pin 4712 package id */ ++#define BCM4712SMALL_PKG_ID 1 /* 200pin 4712 package id */ ++#define BCM4712MID_PKG_ID 2 /* 225pin 4712 package id */ ++ ++#define BCM5365_CHIP_ID 0x5365 /* 5365 chipcommon chipid */ ++#define BCM5350_CHIP_ID 0x5350 /* bcm5350 chipcommon chipid */ ++#define BCM5352_CHIP_ID 0x5352 /* bcm5352 chipcommon chipid */ ++ ++#define BCM4320_CHIP_ID 0x4320 /* bcm4320 chipcommon chipid */ ++ ++#define BCM4328_CHIP_ID 0x4328 /* bcm4328 chipcommon chipid */ ++ ++#define FPGA_JTAGM_ID 0x43f0 /* FPGA jtagm device id */ ++#define BCM43XX_JTAGM_ID 0x43f1 /* 43xx jtagm device id */ ++#define BCM43XXOLD_JTAGM_ID 0x4331 /* 43xx old jtagm device id */ ++ ++#define SDIOH_FPGA_ID 0x43f2 /* sdio host fpga */ ++#define SDIOD_FPGA_ID 0x43f4 /* sdio device fpga */ ++ ++#define MIMO_FPGA_ID 0x43f8 /* FPGA mimo minimacphy device id */ ++ ++#define BCM4785_CHIP_ID 0x4785 /* 4785 chipcommon chipid */ ++ ++/* PCMCIA vendor Id's */ ++ ++#define VENDOR_BROADCOM_PCMCIA 0x02d0 ++ ++/* SDIO vendor Id's */ ++#define VENDOR_BROADCOM_SDIO 0x00BF ++ ++ ++/* boardflags */ ++#define BFL_BTCOEXIST 0x0001 /* This board implements Bluetooth coexistance */ ++#define BFL_PACTRL 0x0002 /* This board has gpio 9 controlling the PA */ ++#define BFL_AIRLINEMODE 0x0004 /* This board implements gpio13 radio disable indication */ ++#define BFL_ENETROBO 0x0010 /* This board has robo switch or core */ ++#define BFL_CCKHIPWR 0x0040 /* Can do high-power CCK transmission */ ++#define BFL_ENETADM 0x0080 /* This board has ADMtek switch */ ++#define BFL_ENETVLAN 0x0100 /* This board has vlan capability */ ++#define BFL_AFTERBURNER 0x0200 /* This board supports Afterburner mode */ ++#define BFL_NOPCI 0x0400 /* This board leaves PCI floating */ ++#define BFL_FEM 0x0800 /* This board supports the Front End Module */ ++#define BFL_EXTLNA 0x1000 /* This board has an external LNA */ ++#define BFL_HGPA 0x2000 /* This board has a high gain PA */ ++#define BFL_BTCMOD 0x4000 /* This board' BTCOEXIST is in the alternate gpios */ ++#define BFL_ALTIQ 0x8000 /* Alternate I/Q settings */ ++ ++/* boardflags2 */ ++#define BFL2_RXBB_INT_REG_DIS 0x00000001 /* This board has an external rxbb regulator */ ++#define BFL2_SSWITCH_AVAIL 0x00000002 /* This board has a superswitch for > 2 antennas */ ++#define BFL2_TXPWRCTRL_EN 0x00000004 /* This board permits TX Power Control to be enabled */ ++ ++/* board specific GPIO assignment, gpio 0-3 are also customer-configurable led */ ++#define BOARD_GPIO_BTCMOD_IN 0x010 /* bit 4 is the alternate BT Coexistance Input */ ++#define BOARD_GPIO_BTCMOD_OUT 0x020 /* bit 5 is the alternate BT Coexistance Out */ ++#define BOARD_GPIO_BTC_IN 0x080 /* bit 7 is BT Coexistance Input */ ++#define BOARD_GPIO_BTC_OUT 0x100 /* bit 8 is BT Coexistance Out */ ++#define BOARD_GPIO_PACTRL 0x200 /* bit 9 controls the PA on new 4306 boards */ ++#define PCI_CFG_GPIO_SCS 0x10 /* PCI config space bit 4 for 4306c0 slow clock source */ ++#define PCI_CFG_GPIO_HWRAD 0x20 /* PCI config space GPIO 13 for hw radio disable */ ++#define PCI_CFG_GPIO_XTAL 0x40 /* PCI config space GPIO 14 for Xtal powerup */ ++#define PCI_CFG_GPIO_PLL 0x80 /* PCI config space GPIO 15 for PLL powerdown */ ++ ++/* power control defines */ ++#define PLL_DELAY 150 /* us pll on delay */ ++#define FREF_DELAY 200 /* us fref change delay */ ++#define MIN_SLOW_CLK 32 /* us Slow clock period */ ++#define XTAL_ON_DELAY 1000 /* us crystal power-on delay */ ++ ++/* Reference Board Types */ ++ ++#define BU4710_BOARD 0x0400 ++#define VSIM4710_BOARD 0x0401 ++#define QT4710_BOARD 0x0402 ++ ++#define BU4309_BOARD 0x040a ++#define BCM94309CB_BOARD 0x040b ++#define BCM94309MP_BOARD 0x040c ++#define BCM4309AP_BOARD 0x040d ++ ++#define BCM94302MP_BOARD 0x040e ++ ++#define BU4306_BOARD 0x0416 ++#define BCM94306CB_BOARD 0x0417 ++#define BCM94306MP_BOARD 0x0418 ++ ++#define BCM94710D_BOARD 0x041a ++#define BCM94710R1_BOARD 0x041b ++#define BCM94710R4_BOARD 0x041c ++#define BCM94710AP_BOARD 0x041d ++ ++#define BU2050_BOARD 0x041f ++ ++ ++#define BCM94309G_BOARD 0x0421 ++ ++#define BU4704_BOARD 0x0423 ++#define BU4702_BOARD 0x0424 ++ ++#define BCM94306PC_BOARD 0x0425 /* pcmcia 3.3v 4306 card */ ++ ++ ++#define BCM94702MN_BOARD 0x0428 ++ ++/* BCM4702 1U CompactPCI Board */ ++#define BCM94702CPCI_BOARD 0x0429 ++ ++/* BCM4702 with BCM95380 VLAN Router */ ++#define BCM95380RR_BOARD 0x042a ++ ++/* cb4306 with SiGe PA */ ++#define BCM94306CBSG_BOARD 0x042b ++ ++/* cb4306 with SiGe PA */ ++#define PCSG94306_BOARD 0x042d ++ ++/* bu4704 with sdram */ ++#define BU4704SD_BOARD 0x042e ++ ++/* Dual 11a/11g Router */ ++#define BCM94704AGR_BOARD 0x042f ++ ++/* 11a-only minipci */ ++#define BCM94308MP_BOARD 0x0430 ++ ++ ++ ++#define BU4712_BOARD 0x0444 ++#define BU4712SD_BOARD 0x045d ++#define BU4712L_BOARD 0x045f ++ ++/* BCM4712 boards */ ++#define BCM94712AP_BOARD 0x0445 ++#define BCM94712P_BOARD 0x0446 ++ ++/* BCM4318 boards */ ++#define BU4318_BOARD 0x0447 ++#define CB4318_BOARD 0x0448 ++#define MPG4318_BOARD 0x0449 ++#define MP4318_BOARD 0x044a ++#define SD4318_BOARD 0x044b ++ ++/* BCM63XX boards */ ++#define BCM96338_BOARD 0x6338 ++#define BCM96348_BOARD 0x6348 ++ ++/* Another mp4306 with SiGe */ ++#define BCM94306P_BOARD 0x044c ++ ++/* mp4303 */ ++#define BCM94303MP_BOARD 0x044e ++ ++/* mpsgh4306 */ ++#define BCM94306MPSGH_BOARD 0x044f ++ ++/* BRCM 4306 w/ Front End Modules */ ++#define BCM94306MPM 0x0450 ++#define BCM94306MPL 0x0453 ++ ++/* 4712agr */ ++#define BCM94712AGR_BOARD 0x0451 ++ ++/* pcmcia 4303 */ ++#define PC4303_BOARD 0x0454 ++ ++/* 5350K */ ++#define BCM95350K_BOARD 0x0455 ++ ++/* 5350R */ ++#define BCM95350R_BOARD 0x0456 ++ ++/* 4306mplna */ ++#define BCM94306MPLNA_BOARD 0x0457 ++ ++/* 4320 boards */ ++#define BU4320_BOARD 0x0458 ++#define BU4320S_BOARD 0x0459 ++#define BCM94320PH_BOARD 0x045a ++ ++/* 4306mph */ ++#define BCM94306MPH_BOARD 0x045b ++ ++/* 4306pciv */ ++#define BCM94306PCIV_BOARD 0x045c ++ ++#define BU4712SD_BOARD 0x045d ++ ++#define BCM94320PFLSH_BOARD 0x045e ++ ++#define BU4712L_BOARD 0x045f ++#define BCM94712LGR_BOARD 0x0460 ++#define BCM94320R_BOARD 0x0461 ++ ++#define BU5352_BOARD 0x0462 ++ ++#define BCM94318MPGH_BOARD 0x0463 ++ ++#define BU4311_BOARD 0x0464 ++#define BCM94311MC_BOARD 0x0465 ++#define BCM94311MCAG_BOARD 0x0466 ++ ++#define BCM95352GR_BOARD 0x0467 ++ ++/* bcm95351agr */ ++#define BCM95351AGR_BOARD 0x0470 ++ ++/* bcm94704mpcb */ ++#define BCM94704MPCB_BOARD 0x0472 ++ ++/* 4785 boards */ ++#define BU4785_BOARD 0x0478 ++ ++/* 4321 boards */ ++#define BU4321_BOARD 0x046b ++#define BU4321E_BOARD 0x047c ++#define MP4321_BOARD 0x046c ++#define CB2_4321_BOARD 0x046d ++#define MC4321_BOARD 0x046e ++ ++/* # of GPIO pins */ ++#define GPIO_NUMPINS 16 ++ ++/* radio ID codes */ ++#define NORADIO_ID 0xe4f5 ++#define NORADIO_IDCODE 0x4e4f5246 ++ ++#define BCM2050_ID 0x2050 ++#define BCM2050_IDCODE 0x02050000 ++#define BCM2050A0_IDCODE 0x1205017f ++#define BCM2050A1_IDCODE 0x2205017f ++#define BCM2050R8_IDCODE 0x8205017f ++ ++#define BCM2055_ID 0x2055 ++#define BCM2055_IDCODE 0x02055000 ++#define BCM2055A0_IDCODE 0x1205517f ++ ++#define BCM2060_ID 0x2060 ++#define BCM2060_IDCODE 0x02060000 ++#define BCM2060WW_IDCODE 0x1206017f ++ ++#define BCM2062_ID 0x2062 ++#define BCM2062_IDCODE 0x02062000 ++#define BCM2062A0_IDCODE 0x0206217f ++ ++/* parts of an idcode: */ ++#define IDCODE_MFG_MASK 0x00000fff ++#define IDCODE_MFG_SHIFT 0 ++#define IDCODE_ID_MASK 0x0ffff000 ++#define IDCODE_ID_SHIFT 12 ++#define IDCODE_REV_MASK 0xf0000000 ++#define IDCODE_REV_SHIFT 28 ++ ++#endif /* _BCMDEVS_H */ +diff -urN linux.old/arch/mips/bcm947xx/include/bcmdevs1.h linux.dev/arch/mips/bcm947xx/include/bcmdevs1.h +--- linux.old/arch/mips/bcm947xx/include/bcmdevs1.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/bcmdevs1.h 2006-05-02 04:32:03.000000000 +0200 @@ -0,0 +1,391 @@ +/* + * Broadcom device-specific manifest constants. @@ -1088,22 +3364,22 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bc +#define GPIO_NUMPINS 16 + +#endif /* _BCMDEVS_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/bcm947xx/include/bcmendian.h +diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/bcm947xx/include/bcmendian.h --- linux.old/arch/mips/bcm947xx/include/bcmendian.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmendian.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,152 @@ ++++ linux.dev/arch/mips/bcm947xx/include/bcmendian.h 2006-04-27 20:08:35.000000000 +0200 +@@ -0,0 +1,198 @@ +/* + * local version of endian.h - byte order defines + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: bcmendian.h,v 1.1.1.10 2006/02/27 03:43:16 honor Exp $ +*/ + +#ifndef _BCMENDIAN_H_ @@ -1113,24 +3389,24 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/ + +/* Byte swap a 16 bit value */ +#define BCMSWAP16(val) \ -+ ((uint16)( \ ++ ((uint16)(\ + (((uint16)(val) & (uint16)0x00ffU) << 8) | \ -+ (((uint16)(val) & (uint16)0xff00U) >> 8) )) -+ ++ (((uint16)(val) & (uint16)0xff00U) >> 8))) ++ +/* Byte swap a 32 bit value */ +#define BCMSWAP32(val) \ -+ ((uint32)( \ ++ ((uint32)(\ + (((uint32)(val) & (uint32)0x000000ffUL) << 24) | \ + (((uint32)(val) & (uint32)0x0000ff00UL) << 8) | \ + (((uint32)(val) & (uint32)0x00ff0000UL) >> 8) | \ -+ (((uint32)(val) & (uint32)0xff000000UL) >> 24) )) -+ ++ (((uint32)(val) & (uint32)0xff000000UL) >> 24))) ++ +/* 2 Byte swap a 32 bit value */ +#define BCMSWAP32BY16(val) \ -+ ((uint32)( \ ++ ((uint32)(\ + (((uint32)(val) & (uint32)0x0000ffffUL) << 16) | \ -+ (((uint32)(val) & (uint32)0xffff0000UL) >> 16) )) -+ ++ (((uint32)(val) & (uint32)0xffff0000UL) >> 16))) ++ + +static INLINE uint16 +bcmswap16(uint16 val) @@ -1157,7 +3433,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/ +{ + len = len/2; + -+ while(len--){ ++ while (len--) { + *buf = bcmswap16(*buf); + buf++; + } @@ -1184,8 +3460,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/ +#define ltoh32(i) bcmswap32(i) +#define htol16(i) bcmswap16(i) +#define htol32(i) bcmswap32(i) -+#endif -+#endif ++#endif /* IL_BIGENDIAN */ ++#endif /* hton16 */ + +#ifndef IL_BIGENDIAN +#define ltoh16_buf(buf, i) @@ -1193,65 +3469,111 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/ +#else +#define ltoh16_buf(buf, i) bcmswap16_buf((uint16*)buf, i) +#define htol16_buf(buf, i) bcmswap16_buf((uint16*)buf, i) -+#endif ++#endif /* IL_BIGENDIAN */ ++ ++/* ++* store 16-bit value to unaligned little endian byte array. ++*/ ++static INLINE void ++htol16_ua_store(uint16 val, uint8 *bytes) ++{ ++ bytes[0] = val&0xff; ++ bytes[1] = val>>8; ++} ++ ++/* ++* store 32-bit value to unaligned little endian byte array. ++*/ ++static INLINE void ++htol32_ua_store(uint32 val, uint8 *bytes) ++{ ++ bytes[0] = val&0xff; ++ bytes[1] = (val>>8)&0xff; ++ bytes[2] = (val>>16)&0xff; ++ bytes[3] = val>>24; ++} ++ ++/* ++* store 16-bit value to unaligned network(big) endian byte array. ++*/ ++static INLINE void ++hton16_ua_store(uint16 val, uint8 *bytes) ++{ ++ bytes[1] = val&0xff; ++ bytes[0] = val>>8; ++} ++ ++/* ++* store 32-bit value to unaligned network(big) endian byte array. ++*/ ++static INLINE void ++hton32_ua_store(uint32 val, uint8 *bytes) ++{ ++ bytes[3] = val&0xff; ++ bytes[2] = (val>>8)&0xff; ++ bytes[1] = (val>>16)&0xff; ++ bytes[0] = val>>24; ++} + +/* +* load 16-bit value from unaligned little endian byte array. +*/ +static INLINE uint16 -+ltoh16_ua(uint8 *bytes) ++ltoh16_ua(void *bytes) +{ -+ return (bytes[1]<<8)+bytes[0]; ++ return (((uint8*)bytes)[1]<<8)+((uint8 *)bytes)[0]; +} + +/* +* load 32-bit value from unaligned little endian byte array. +*/ +static INLINE uint32 -+ltoh32_ua(uint8 *bytes) ++ltoh32_ua(void *bytes) +{ -+ return (bytes[3]<<24)+(bytes[2]<<16)+(bytes[1]<<8)+bytes[0]; ++ return (((uint8*)bytes)[3]<<24)+(((uint8*)bytes)[2]<<16)+ ++ (((uint8*)bytes)[1]<<8)+((uint8*)bytes)[0]; +} + +/* +* load 16-bit value from unaligned big(network) endian byte array. +*/ +static INLINE uint16 -+ntoh16_ua(uint8 *bytes) ++ntoh16_ua(void *bytes) +{ -+ return (bytes[0]<<8)+bytes[1]; ++ return (((uint8*)bytes)[0]<<8)+((uint8*)bytes)[1]; +} + +/* +* load 32-bit value from unaligned big(network) endian byte array. +*/ +static INLINE uint32 -+ntoh32_ua(uint8 *bytes) ++ntoh32_ua(void *bytes) +{ -+ return (bytes[0]<<24)+(bytes[1]<<16)+(bytes[2]<<8)+bytes[3]; ++ return (((uint8*)bytes)[0]<<24)+(((uint8*)bytes)[1]<<16)+ ++ (((uint8*)bytes)[2]<<8)+((uint8*)bytes)[3]; +} + -+#define ltoh_ua(ptr) ( \ ++#define ltoh_ua(ptr) (\ + sizeof(*(ptr)) == sizeof(uint8) ? *(uint8 *)ptr : \ + sizeof(*(ptr)) == sizeof(uint16) ? (((uint8 *)ptr)[1]<<8)+((uint8 *)ptr)[0] : \ + (((uint8 *)ptr)[3]<<24)+(((uint8 *)ptr)[2]<<16)+(((uint8 *)ptr)[1]<<8)+((uint8 *)ptr)[0] \ +) + -+#define ntoh_ua(ptr) ( \ ++#define ntoh_ua(ptr) (\ + sizeof(*(ptr)) == sizeof(uint8) ? *(uint8 *)ptr : \ + sizeof(*(ptr)) == sizeof(uint16) ? (((uint8 *)ptr)[0]<<8)+((uint8 *)ptr)[1] : \ + (((uint8 *)ptr)[0]<<24)+(((uint8 *)ptr)[1]<<16)+(((uint8 *)ptr)[2]<<8)+((uint8 *)ptr)[3] \ +) + +#endif /* _BCMENDIAN_H_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/bcm947xx/include/bcmnvram.h +diff -urN linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/bcm947xx/include/bcmnvram.h --- linux.old/arch/mips/bcm947xx/include/bcmnvram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmnvram.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,141 @@ ++++ linux.dev/arch/mips/bcm947xx/include/bcmnvram.h 2006-04-27 23:29:18.000000000 +0200 +@@ -0,0 +1,159 @@ +/* + * NVRAM variable manipulation + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -1259,7 +3581,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: bcmnvram.h,v 1.17 2006/03/02 12:33:44 honor Exp $ + */ + +#ifndef _bcmnvram_h_ @@ -1268,6 +3590,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b +#ifndef _LANGUAGE_ASSEMBLY + +#include <typedefs.h> ++#include <bcmdefs.h> + +struct nvram_header { + uint32 magic; @@ -1287,13 +3610,13 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + * Initialize NVRAM access. May be unnecessary or undefined on certain + * platforms. + */ -+extern int BCMINIT(nvram_init)(void *sbh); ++extern int nvram_init(void *sbh); + +/* + * Disable NVRAM access. May be unnecessary or undefined on certain + * platforms. + */ -+extern void BCMINIT(nvram_exit)(void *sbh); ++extern void nvram_exit(void *sbh); + +/* + * Get the value of an NVRAM variable. The pointer returned may be @@ -1301,20 +3624,32 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + * @param name name of variable to get + * @return value of variable or NULL if undefined + */ -+extern char * BCMINIT(nvram_get)(const char *name); ++extern char * nvram_get(const char *name); + +/* + * Read the reset GPIO value from the nvram and set the GPIO + * as input + */ +extern int BCMINITFN(nvram_resetgpio_init)(void *sbh); ++extern int BCMINITFN(nvram_gpio_init)(const char *name, void *sbh); ++extern int BCMINITFN(nvram_gpio_set)(const char *name, void *sbh, int type); + +/* + * Get the value of an NVRAM variable. + * @param name name of variable to get + * @return value of variable or NUL if undefined + */ -+#define nvram_safe_get(name) (BCMINIT(nvram_get)(name) ? : "") ++#define nvram_safe_get(name) (nvram_get(name) ? : "") ++ ++#define nvram_safe_unset(name) ({ \ ++ if(nvram_get(name)) \ ++ nvram_unset(name); \ ++}) ++ ++#define nvram_safe_set(name, value) ({ \ ++ if(!nvram_get(name) || strcmp(nvram_get(name), value)) \ ++ nvram_set(name, value); \ ++}) + +/* + * Match an NVRAM variable. @@ -1325,7 +3660,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + */ +static INLINE int +nvram_match(char *name, char *match) { -+ const char *value = BCMINIT(nvram_get)(name); ++ const char *value = nvram_get(name); + return (value && !strcmp(value, match)); +} + @@ -1338,7 +3673,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + */ +static INLINE int +nvram_invmatch(char *name, char *invmatch) { -+ const char *value = BCMINIT(nvram_get)(name); ++ const char *value = nvram_get(name); + return (value && strcmp(value, invmatch)); +} + @@ -1351,7 +3686,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + * @param value value of variable + * @return 0 on success and errno on failure + */ -+extern int BCMINIT(nvram_set)(const char *name, const char *value); ++extern int nvram_set(const char *name, const char *value); + +/* + * Unset an NVRAM variable. Pointers to previously set values @@ -1360,7 +3695,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + * @return 0 on success and errno on failure + * NOTE: use nvram_commit to commit this change to flash. + */ -+extern int BCMINIT(nvram_unset)(const char *name); ++extern int nvram_unset(const char *name); + +/* + * Commit NVRAM variables to permanent storage. All pointers to values @@ -1368,7 +3703,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + * NVRAM values are undefined after a commit. + * @return 0 on success and errno on failure + */ -+extern int BCMINIT(nvram_commit)(void); ++extern int nvram_commit(void); + +/* + * Get all NVRAM variables (format name=value\0 ... \0\0). @@ -1376,11 +3711,16 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b + * @param count size of buffer in bytes + * @return 0 on success and errno on failure + */ -+extern int BCMINIT(nvram_getall)(char *buf, int count); ++extern int nvram_getall(char *buf, int count); ++ ++extern int file2nvram(char *filename, char *varname); ++extern int nvram2file(char *varname, char *filename); + +#endif /* _LANGUAGE_ASSEMBLY */ + +#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */ ++#define NVRAM_CLEAR_MAGIC 0x0 ++#define NVRAM_INVALID_MAGIC 0xFFFFFFFF +#define NVRAM_VERSION 1 +#define NVRAM_HEADER_SIZE 20 +#define NVRAM_SPACE 0x8000 @@ -1389,14 +3729,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/b +#define NVRAM_MAX_PARAM_LEN 64 + +#endif /* _bcmnvram_h_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/bcmsrom.h linux.dev/arch/mips/bcm947xx/include/bcmsrom.h +diff -urN linux.old/arch/mips/bcm947xx/include/bcmsrom.h linux.dev/arch/mips/bcm947xx/include/bcmsrom.h --- linux.old/arch/mips/bcm947xx/include/bcmsrom.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmsrom.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,23 @@ ++++ linux.dev/arch/mips/bcm947xx/include/bcmsrom.h 2006-04-27 20:27:33.000000000 +0200 +@@ -0,0 +1,108 @@ +/* + * Misc useful routines to access NIC local SROM/OTP . + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -1404,41 +3744,125 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmsrom.h linux.dev/arch/mips/bc + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: bcmsrom.h,v 1.1.1.13 2006/04/15 01:29:08 michael Exp $ + */ + +#ifndef _bcmsrom_h_ +#define _bcmsrom_h_ + -+extern int srom_var_init(void *sbh, uint bus, void *curmap, osl_t *osh, char **vars, int *count); ++/* Maximum srom: 4 Kilobits == 512 bytes */ ++#define SROM_MAX 512 ++ ++/* SROM Rev 4: Reallocate the software part of the srom to accomodate ++ * MIMO features. It assumes up to two PCIE functions and 440 bytes ++ * of useable srom i.e. the useable storage in chips with OTP that ++ * implements hardware redundancy. ++ */ ++ ++#define SROM4_WORDS 220 ++ ++#define SROM4_SIGN 32 ++#define SROM4_SIGNATURE 0x5372 ++ ++#define SROM4_BREV 33 ++ ++#define SROM4_BFL0 34 ++#define SROM4_BFL1 35 ++#define SROM4_BFL2 36 ++#define SROM4_BFL3 37 ++ ++#define SROM4_MACHI 38 ++#define SROM4_MACMID 39 ++#define SROM4_MACLO 40 ++ ++#define SROM4_CCODE 41 ++#define SROM4_REGREV 42 ++ ++#define SROM4_LEDBH10 43 ++#define SROM4_LEDBH32 44 ++ ++#define SROM4_LEDDC 45 ++ ++#define SROM4_AA 46 ++#define SROM4_AA2G_MASK 0x00ff ++#define SROM4_AA2G_SHIFT 0 ++#define SROM4_AA5G_MASK 0xff00 ++#define SROM4_AA5G_SHIFT 8 ++ ++#define SROM4_AG10 47 ++#define SROM4_AG32 48 ++ ++#define SROM4_TXPID2G 49 ++#define SROM4_TXPID5G 51 ++#define SROM4_TXPID5GL 53 ++#define SROM4_TXPID5GH 55 ++ ++/* Per-path fields */ ++#define MAX_PATH 4 ++#define SROM4_PATH0 64 ++#define SROM4_PATH1 87 ++#define SROM4_PATH2 110 ++#define SROM4_PATH3 133 ++ ++#define SROM4_2G_ITT_MAXP 0 ++#define SROM4_2G_PA 1 ++#define SROM4_5G_ITT_MAXP 5 ++#define SROM4_5GLH_MAXP 6 ++#define SROM4_5G_PA 7 ++#define SROM4_5GL_PA 11 ++#define SROM4_5GH_PA 15 ++ ++/* Fields in the ITT_MAXP and 5GLH_MAXP words */ ++#define B2G_MAXP_MASK 0xff ++#define B2G_ITT_SHIFT 8 ++#define B5G_MAXP_MASK 0xff ++#define B5G_ITT_SHIFT 8 ++#define B5GH_MAXP_MASK 0xff ++#define B5GL_MAXP_SHIFT 8 ++ ++/* All the miriad power offsets */ ++#define SROM4_2G_CCKPO 156 ++#define SROM4_2G_OFDMPO 157 ++#define SROM4_5G_OFDMPO 159 ++#define SROM4_5GL_OFDMPO 161 ++#define SROM4_5GH_OFDMPO 163 ++#define SROM4_2G_MCSPO 165 ++#define SROM4_5G_MCSPO 173 ++#define SROM4_5GL_MCSPO 181 ++#define SROM4_5GH_MCSPO 189 ++#define SROM4_CCDPO 197 ++#define SROM4_STBCPO 198 ++#define SROM4_BW40PO 199 ++#define SROM4_BWDUPPO 200 ++ ++extern int srom_var_init(void *sbh, uint bus, void *curmap, osl_t *osh, char **vars, uint *count); + +extern int srom_read(uint bus, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf); +extern int srom_write(uint bus, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf); + +#endif /* _bcmsrom_h_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bcm947xx/include/bcmutils.h +diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bcm947xx/include/bcmutils.h --- linux.old/arch/mips/bcm947xx/include/bcmutils.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmutils.h 2006-04-06 17:07:30.000000000 +0200 -@@ -0,0 +1,287 @@ ++++ linux.dev/arch/mips/bcm947xx/include/bcmutils.h 2006-05-02 01:52:12.000000000 +0200 +@@ -0,0 +1,433 @@ +/* + * Misc useful os-independent macros and functions. + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * $Id: bcmutils.h,v 1.1.1.16 2006/04/08 06:13:39 honor Exp $ + */ + +#ifndef _bcmutils_h_ +#define _bcmutils_h_ + -+/*** driver-only section ***/ ++/* ** driver-only section ** */ +#ifdef BCMDRIVER -+#include <osl.h> + +#define _BCM_U 0x01 /* upper */ +#define _BCM_L 0x02 /* lower */ @@ -1449,7 +3873,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/b +#define _BCM_X 0x40 /* hex digit */ +#define _BCM_SP 0x80 /* hard space (0x20) */ + -+#define GPIO_PIN_NOTDEFINED 0x20 ++#define GPIO_PIN_NOTDEFINED 0x20 /* Pin not defined */ + +extern unsigned char bcm_ctype[]; +#define bcm_ismask(x) (bcm_ctype[(int)(unsigned char)(x)]) @@ -1479,42 +3903,98 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/b + } \ +} + ++struct ether_addr { ++ uint8 octet[6]; ++} __attribute__((packed)); ++ +/* string */ -+extern uint bcm_atoi(char *s); +extern uchar bcm_toupper(uchar c); +extern ulong bcm_strtoul(char *cp, char **endp, uint base); +extern char *bcmstrstr(char *haystack, char *needle); +extern char *bcmstrcat(char *dest, const char *src); +extern ulong wchar2ascii(char *abuf, ushort *wbuf, ushort wbuflen, ulong abuflen); +/* ethernet address */ -+extern char *bcm_ether_ntoa(char *ea, char *buf); -+extern int bcm_ether_atoe(char *p, char *ea); -+/* delay */ -+extern void bcm_mdelay(uint ms); ++extern char *bcm_ether_ntoa(struct ether_addr *ea, char *buf); +/* variable access */ +extern char *getvar(char *vars, char *name); +extern int getintvar(char *vars, char *name); +extern uint getgpiopin(char *vars, char *pin_name, uint def_pin); ++#ifdef BCMPERFSTATS ++extern void bcm_perf_enable(void); ++extern void bcmstats(char *fmt); ++extern void bcmlog(char *fmt, uint a1, uint a2); ++extern void bcmdumplog(char *buf, int size); ++extern int bcmdumplogent(char *buf, uint idx); ++#else ++#define bcm_perf_enable() ++#define bcmstats(fmt) +#define bcmlog(fmt, a1, a2) +#define bcmdumplog(buf, size) *buf = '\0' +#define bcmdumplogent(buf, idx) -1 ++#endif /* BCMPERFSTATS */ ++extern char *bcm_nvram_vars(uint *length); ++extern int bcm_nvram_cache(void *sbh); ++ ++/* Support for sharing code across in-driver iovar implementations. ++ * The intent is that a driver use this structure to map iovar names ++ * to its (private) iovar identifiers, and the lookup function to ++ * find the entry. Macros are provided to map ids and get/set actions ++ * into a single number space for a switch statement. ++ */ ++ ++/* iovar structure */ ++typedef struct bcm_iovar { ++ const char *name; /* name for lookup and display */ ++ uint16 varid; /* id for switch */ ++ uint16 flags; /* driver-specific flag bits */ ++ uint16 type; /* base type of argument */ ++ uint16 minlen; /* min length for buffer vars */ ++} bcm_iovar_t; ++ ++/* varid definitions are per-driver, may use these get/set bits */ ++ ++/* IOVar action bits for id mapping */ ++#define IOV_GET 0 /* Get an iovar */ ++#define IOV_SET 1 /* Set an iovar */ ++ ++/* Varid to actionid mapping */ ++#define IOV_GVAL(id) ((id)*2) ++#define IOV_SVAL(id) (((id)*2)+IOV_SET) ++#define IOV_ISSET(actionid) ((actionid & IOV_SET) == IOV_SET) ++ ++/* flags are per-driver based on driver attributes */ ++ ++/* Base type definitions */ ++#define IOVT_VOID 0 /* no value (implictly set only) */ ++#define IOVT_BOOL 1 /* any value ok (zero/nonzero) */ ++#define IOVT_INT8 2 /* integer values are range-checked */ ++#define IOVT_UINT8 3 /* unsigned int 8 bits */ ++#define IOVT_INT16 4 /* int 16 bits */ ++#define IOVT_UINT16 5 /* unsigned int 16 bits */ ++#define IOVT_INT32 6 /* int 32 bits */ ++#define IOVT_UINT32 7 /* unsigned int 32 bits */ ++#define IOVT_BUFFER 8 /* buffer is size-checked as per minlen */ ++ ++extern const bcm_iovar_t *bcm_iovar_lookup(const bcm_iovar_t *table, const char *name); ++extern int bcm_iovar_lencheck(const bcm_iovar_t *table, void *arg, int len, bool set); + +#endif /* #ifdef BCMDRIVER */ + -+/*** driver/apps-shared section ***/ ++/* ** driver/apps-shared section ** */ + -+#define BCME_STRLEN 64 ++#define BCME_STRLEN 64 /* Max string length for BCM errors */ +#define VALID_BCMERROR(e) ((e <= 0) && (e >= BCME_LAST)) + + -+/* -+ * error codes could be added but the defined ones shouldn't be changed/deleted -+ * these error codes are exposed to the user code -+ * when ever a new error code is added to this list -+ * please update errorstring table with the related error string and -+ * update osl files with os specific errorcode map ++/* ++ * error codes could be added but the defined ones shouldn't be changed/deleted ++ * these error codes are exposed to the user code ++ * when ever a new error code is added to this list ++ * please update errorstring table with the related error string and ++ * update osl files with os specific errorcode map +*/ + ++#define BCME_OK 0 /* Success */ +#define BCME_ERROR -1 /* Error generic */ +#define BCME_BADARG -2 /* Bad Argument */ +#define BCME_BADOPTION -3 /* Bad option */ @@ -1524,61 +4004,133 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/b +#define BCME_NOTSTA -7 /* Not STA */ +#define BCME_BADKEYIDX -8 /* BAD Key Index */ +#define BCME_RADIOOFF -9 /* Radio Off */ -+#define BCME_NOTBANDLOCKED -10 /* Not bandlocked */ -+#define BCME_NOCLK -11 /* No Clock*/ -+#define BCME_BADRATESET -12 /* BAD RateSet*/ ++#define BCME_NOTBANDLOCKED -10 /* Not band locked */ ++#define BCME_NOCLK -11 /* No Clock */ ++#define BCME_BADRATESET -12 /* BAD Rate valueset */ +#define BCME_BADBAND -13 /* BAD Band */ -+#define BCME_BUFTOOSHORT -14 /* Buffer too short */ -+#define BCME_BUFTOOLONG -15 /* Buffer too Long */ -+#define BCME_BUSY -16 /* Busy*/ -+#define BCME_NOTASSOCIATED -17 /* Not associated*/ -+#define BCME_BADSSIDLEN -18 /* BAD SSID Len */ -+#define BCME_OUTOFRANGECHAN -19 /* Out of Range Channel*/ -+#define BCME_BADCHAN -20 /* BAD Channel */ -+#define BCME_BADADDR -21 /* BAD Address*/ -+#define BCME_NORESOURCE -22 /* No resources*/ -+#define BCME_UNSUPPORTED -23 /* Unsupported*/ -+#define BCME_BADLEN -24 /* Bad Length*/ -+#define BCME_NOTREADY -25 /* Not ready Yet*/ ++#define BCME_BUFTOOSHORT -14 /* Buffer too short */ ++#define BCME_BUFTOOLONG -15 /* Buffer too long */ ++#define BCME_BUSY -16 /* Busy */ ++#define BCME_NOTASSOCIATED -17 /* Not Associated */ ++#define BCME_BADSSIDLEN -18 /* Bad SSID len */ ++#define BCME_OUTOFRANGECHAN -19 /* Out of Range Channel */ ++#define BCME_BADCHAN -20 /* Bad Channel */ ++#define BCME_BADADDR -21 /* Bad Address */ ++#define BCME_NORESOURCE -22 /* Not Enough Resources */ ++#define BCME_UNSUPPORTED -23 /* Unsupported */ ++#define BCME_BADLEN -24 /* Bad length */ ++#define BCME_NOTREADY -25 /* Not Ready */ +#define BCME_EPERM -26 /* Not Permitted */ +#define BCME_NOMEM -27 /* No Memory */ +#define BCME_ASSOCIATED -28 /* Associated */ -+#define BCME_RANGE -29 /* Range Error*/ -+#define BCME_NOTFOUND -30 /* Not found */ -+#define BCME_LAST BCME_NOTFOUND ++#define BCME_RANGE -29 /* Not In Range */ ++#define BCME_NOTFOUND -30 /* Not Found */ ++#define BCME_WME_NOT_ENABLED -31 /* WME Not Enabled */ ++#define BCME_TSPEC_NOTFOUND -32 /* TSPEC Not Found */ ++#define BCME_ACM_NOTSUPPORTED -33 /* ACM Not Supported */ ++#define BCME_NOT_WME_ASSOCIATION -34 /* Not WME Association */ ++#define BCME_SDIO_ERROR -35 /* SDIO Bus Error */ ++#define BCME_DONGLE_DOWN -36 /* Dongle Not Accessible */ ++#define BCME_LAST BCME_DONGLE_DOWN ++ ++/* These are collection of BCME Error strings */ ++#define BCMERRSTRINGTABLE { \ ++ "OK", \ ++ "Undefined error", \ ++ "Bad Argument", \ ++ "Bad Option", \ ++ "Not up", \ ++ "Not down", \ ++ "Not AP", \ ++ "Not STA", \ ++ "Bad Key Index", \ ++ "Radio Off", \ ++ "Not band locked", \ ++ "No clock", \ ++ "Bad Rate valueset", \ ++ "Bad Band", \ ++ "Buffer too short", \ ++ "Buffer too long", \ ++ "Busy", \ ++ "Not Associated", \ ++ "Bad SSID len", \ ++ "Out of Range Channel", \ ++ "Bad Channel", \ ++ "Bad Address", \ ++ "Not Enough Resources", \ ++ "Unsupported", \ ++ "Bad length", \ ++ "Not Ready", \ ++ "Not Permitted", \ ++ "No Memory", \ ++ "Associated", \ ++ "Not In Range", \ ++ "Not Found", \ ++ "WME Not Enabled", \ ++ "TSPEC Not Found", \ ++ "ACM Not Supported", \ ++ "Not WME Association", \ ++ "SDIO Bus Error", \ ++ "Dongle Not Accessible" \ ++} + +#ifndef ABS -+#define ABS(a) (((a)<0)?-(a):(a)) -+#endif ++#define ABS(a) (((a) < 0)?-(a):(a)) ++#endif /* ABS */ + +#ifndef MIN -+#define MIN(a, b) (((a)<(b))?(a):(b)) -+#endif ++#define MIN(a, b) (((a) < (b))?(a):(b)) ++#endif /* MIN */ + +#ifndef MAX -+#define MAX(a, b) (((a)>(b))?(a):(b)) -+#endif ++#define MAX(a, b) (((a) > (b))?(a):(b)) ++#endif /* MAX */ + +#define CEIL(x, y) (((x) + ((y)-1)) / (y)) +#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) +#define ISALIGNED(a, x) (((a) & ((x)-1)) == 0) -+#define ISPOWEROF2(x) ((((x)-1)&(x))==0) ++#define ISPOWEROF2(x) ((((x)-1)&(x)) == 0) +#define VALID_MASK(mask) !((mask) & ((mask) + 1)) +#define OFFSETOF(type, member) ((uint)(uintptr)&((type *)0)->member) +#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) + +/* bit map related macros */ +#ifndef setbit ++#ifndef NBBY /* the BSD family defines NBBY */ +#define NBBY 8 /* 8 bits per byte */ -+#define setbit(a,i) (((uint8 *)a)[(i)/NBBY] |= 1<<((i)%NBBY)) -+#define clrbit(a,i) (((uint8 *)a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) -+#define isset(a,i) (((uint8 *)a)[(i)/NBBY] & (1<<((i)%NBBY))) -+#define isclr(a,i) ((((uint8 *)a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) -+#endif ++#endif /* #ifndef NBBY */ ++#define setbit(a, i) (((uint8 *)a)[(i)/NBBY] |= 1<<((i)%NBBY)) ++#define clrbit(a, i) (((uint8 *)a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) ++#define isset(a, i) (((uint8 *)a)[(i)/NBBY] & (1<<((i)%NBBY))) ++#define isclr(a, i) ((((uint8 *)a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) ++#endif /* setbit */ + +#define NBITS(type) (sizeof(type) * 8) -+#define NBITVAL(bits) (1 << (bits)) -+#define MAXBITVAL(bits) ((1 << (bits)) - 1) ++#define NBITVAL(nbits) (1 << (nbits)) ++#define MAXBITVAL(nbits) ((1 << (nbits)) - 1) ++#define NBITMASK(nbits) MAXBITVAL(nbits) ++#define MAXNBVAL(nbyte) MAXBITVAL((nbyte) * 8) ++ ++/* basic mux operation - can be optimized on several architectures */ ++#define MUX(pred, true, false) ((pred) ? (true) : (false)) ++ ++/* modulo inc/dec - assumes x E [0, bound - 1] */ ++#define MODDEC(x, bound) MUX((x) == 0, (bound) - 1, (x) - 1) ++#define MODINC(x, bound) MUX((x) == (bound) - 1, 0, (x) + 1) ++ ++/* modulo inc/dec, bound = 2^k */ ++#define MODDEC_POW2(x, bound) (((x) - 1) & ((bound) - 1)) ++#define MODINC_POW2(x, bound) (((x) + 1) & ((bound) - 1)) ++ ++/* modulo add/sub - assumes x, y E [0, bound - 1] */ ++#define MODADD(x, y, bound) \ ++ MUX((x) + (y) >= (bound), (x) + (y) - (bound), (x) + (y)) ++#define MODSUB(x, y, bound) \ ++ MUX(((int)(x)) - ((int)(y)) < 0, (x) - (y) + (bound), (x) - (y)) ++ ++/* module add/sub, bound = 2^k */ ++#define MODADD_POW2(x, y, bound) (((x) + (y)) & ((bound) - 1)) ++#define MODSUB_POW2(x, y, bound) (((x) - (y)) & ((bound) - 1)) + +/* crc defines */ +#define CRC8_INIT_VALUE 0xff /* Initial CRC8 checksum value */ @@ -1605,7 +4157,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/b +#define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (int)(buflen) >= (int)(2 + (elt)->len)) + +/* buffer length for ethernet address from bcm_ether_ntoa() */ -+#define ETHER_ADDR_STR_LEN 18 ++#define ETHER_ADDR_STR_LEN 18 /* 18-bytes of Ethernet address buffer length */ + +/* unaligned load and store macros */ +#ifdef IL_BIGENDIAN @@ -1667,7 +4219,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/b + a[0] = v & 0xff; +} + -+#endif ++#endif /* IL_BIGENDIAN */ + +/* externs */ +/* crc */ @@ -1675,12 +4227,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/b +extern uint16 hndcrc16(uint8 *p, uint nbytes, uint16 crc); +extern uint32 hndcrc32(uint8 *p, uint nbytes, uint32 crc); +/* format/print */ ++extern void printfbig(char *buf); ++ +/* IE parsing */ +extern bcm_tlv_t *bcm_next_tlv(bcm_tlv_t *elt, int *buflen); +extern bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen, uint key); +extern bcm_tlv_t *bcm_parse_ordered_tlvs(void *buf, int buflen, uint key); + -+/* bcmerror*/ ++/* bcmerror */ +extern const char *bcmerrorstr(int bcmerror); + +/* multi-bool data type: set of bools, mbool is true if any is set */ @@ -1701,21 +4255,37 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/b + uint32 len; +}; + ++/* Buffer structure for collecting string-formatted data ++* using bcm_bprintf() API. ++* Use bcm_binit() to initialize before use ++*/ ++struct bcmstrbuf ++{ ++ char *buf; /* pointer to current position in origbuf */ ++ uint size; /* current (residual) size in bytes */ ++ char *origbuf; /* unmodified pointer to orignal buffer */ ++ uint origsize; /* unmodified orignal buffer size in bytes */ ++}; ++ ++extern void bcm_binit(struct bcmstrbuf *b, char *buf, uint size); ++extern int bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...); ++ +typedef uint32 (*readreg_rtn)(void *arg0, void *arg1, uint32 offset); -+extern uint bcmdumpfields(readreg_rtn func_ptr, void *arg0, void *arg1, struct fielddesc *str, char *buf, uint32 bufsize); ++extern uint bcmdumpfields(readreg_rtn func_ptr, void *arg0, void *arg1, struct fielddesc *str, ++ char *buf, uint32 bufsize); + +extern uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf, uint len); ++extern uint bcm_bitcount(uint8 *bitmap, uint bytelength); + +#endif /* _bcmutils_h_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bcm947xx/include/hndmips.h ---- linux.old/arch/mips/bcm947xx/include/hndmips.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/hndmips.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,16 @@ +diff -urN linux.old/arch/mips/bcm947xx/include/hndcpu.h linux.dev/arch/mips/bcm947xx/include/hndcpu.h +--- linux.old/arch/mips/bcm947xx/include/hndcpu.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/hndcpu.h 2006-04-27 22:14:38.000000000 +0200 +@@ -0,0 +1,28 @@ +/* -+ * Alternate include file for HND sbmips.h since CFE also ships with -+ * a sbmips.h. ++ * HND SiliconBackplane MIPS/ARM cores software interface. + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -1723,402 +4293,123 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bc + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: hndcpu.h,v 1.1.1.1 2006/02/27 03:43:16 honor Exp $ + */ + -+#include "sbmips.h" -diff -Naur linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/bcm947xx/include/linux_osl.h ---- linux.old/arch/mips/bcm947xx/include/linux_osl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/linux_osl.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,371 @@ -+/* -+ * Linux OS Independent Layer -+ * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id$ -+ */ ++#ifndef _hndcpu_h_ ++#define _hndcpu_h_ + -+#ifndef _linux_osl_h_ -+#define _linux_osl_h_ -+ -+#include <typedefs.h> -+ -+/* use current 2.4.x calling conventions */ -+#include <linuxver.h> -+ -+/* assert and panic */ -+#ifdef __GNUC__ -+#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -+#if GCC_VERSION > 30100 -+#define ASSERT(exp) do {} while (0) -+#else -+/* ASSERT could causes segmentation fault on GCC3.1, use empty instead*/ -+#define ASSERT(exp) -+#endif -+#endif -+ -+/* microsecond delay */ -+#define OSL_DELAY(usec) osl_delay(usec) -+extern void osl_delay(uint usec); -+ -+/* PCMCIA attribute space access macros */ -+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) -+struct pcmcia_dev { -+ dev_link_t link; /* PCMCIA device pointer */ -+ dev_node_t node; /* PCMCIA node structure */ -+ void *base; /* Mapped attribute memory window */ -+ size_t size; /* Size of window */ -+ void *drv; /* Driver data */ -+}; -+#endif -+#define OSL_PCMCIA_READ_ATTR(osh, offset, buf, size) \ -+ osl_pcmcia_read_attr((osh), (offset), (buf), (size)) -+#define OSL_PCMCIA_WRITE_ATTR(osh, offset, buf, size) \ -+ osl_pcmcia_write_attr((osh), (offset), (buf), (size)) -+extern void osl_pcmcia_read_attr(osl_t *osh, uint offset, void *buf, int size); -+extern void osl_pcmcia_write_attr(osl_t *osh, uint offset, void *buf, int size); -+ -+/* PCI configuration space access macros */ -+#define OSL_PCI_READ_CONFIG(osh, offset, size) \ -+ osl_pci_read_config((osh), (offset), (size)) -+#define OSL_PCI_WRITE_CONFIG(osh, offset, size, val) \ -+ osl_pci_write_config((osh), (offset), (size), (val)) -+extern uint32 osl_pci_read_config(osl_t *osh, uint size, uint offset); -+extern void osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val); -+ -+/* PCI device bus # and slot # */ -+#define OSL_PCI_BUS(osh) osl_pci_bus(osh) -+#define OSL_PCI_SLOT(osh) osl_pci_slot(osh) -+extern uint osl_pci_bus(osl_t *osh); -+extern uint osl_pci_slot(osl_t *osh); -+ -+/* OSL initialization */ -+extern osl_t *osl_attach(void *pdev); -+extern void osl_detach(osl_t *osh); -+ -+/* host/bus architecture-specific byte swap */ -+#define BUS_SWAP32(v) (v) -+ -+/* general purpose memory allocation */ -+ -+#if defined(BCMDBG_MEM) -+ -+#define MALLOC(osh, size) osl_debug_malloc((osh), (size), __LINE__, __FILE__) -+#define MFREE(osh, addr, size) osl_debug_mfree((osh), (addr), (size), __LINE__, __FILE__) -+#define MALLOCED(osh) osl_malloced((osh)) -+#define MALLOC_DUMP(osh, buf, sz) osl_debug_memdump((osh), (buf), (sz)) -+extern void *osl_debug_malloc(osl_t *osh, uint size, int line, char* file); -+extern void osl_debug_mfree(osl_t *osh, void *addr, uint size, int line, char* file); -+extern char *osl_debug_memdump(osl_t *osh, char *buf, uint sz); -+ -+#else -+ -+#define MALLOC(osh, size) osl_malloc((osh), (size)) -+#define MFREE(osh, addr, size) osl_mfree((osh), (addr), (size)) -+#define MALLOCED(osh) osl_malloced((osh)) -+ -+#endif /* BCMDBG_MEM */ -+ -+#define MALLOC_FAILED(osh) osl_malloc_failed((osh)) -+ -+extern void *osl_malloc(osl_t *osh, uint size); -+extern void osl_mfree(osl_t *osh, void *addr, uint size); -+extern uint osl_malloced(osl_t *osh); -+extern uint osl_malloc_failed(osl_t *osh); -+ -+/* allocate/free shared (dma-able) consistent memory */ -+#define DMA_CONSISTENT_ALIGN PAGE_SIZE -+#define DMA_ALLOC_CONSISTENT(osh, size, pap) \ -+ osl_dma_alloc_consistent((osh), (size), (pap)) -+#define DMA_FREE_CONSISTENT(osh, va, size, pa) \ -+ osl_dma_free_consistent((osh), (void*)(va), (size), (pa)) -+extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, ulong *pap); -+extern void osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa); -+ -+/* map/unmap direction */ -+#define DMA_TX 1 -+#define DMA_RX 2 -+ -+/* map/unmap shared (dma-able) memory */ -+#define DMA_MAP(osh, va, size, direction, p) \ -+ osl_dma_map((osh), (va), (size), (direction)) -+#define DMA_UNMAP(osh, pa, size, direction, p) \ -+ osl_dma_unmap((osh), (pa), (size), (direction)) -+extern uint osl_dma_map(osl_t *osh, void *va, uint size, int direction); -+extern void osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction); -+ -+/* register access macros */ -+#if defined(BCMJTAG) -+#include <bcmjtag.h> -+#define R_REG(r) bcmjtag_read(NULL, (uint32)(r), sizeof (*(r))) -+#define W_REG(r, v) bcmjtag_write(NULL, (uint32)(r), (uint32)(v), sizeof (*(r))) -+#endif -+ -+/* -+ * BINOSL selects the slightly slower function-call-based binary compatible osl. -+ * Macros expand to calls to functions defined in linux_osl.c . -+ */ -+#ifndef BINOSL -+ -+/* string library, kernel mode */ -+#define printf(fmt, args...) printk(fmt, ## args) -+#include <linux/kernel.h> -+#include <linux/string.h> -+ -+/* register access macros */ -+#if !defined(BCMJTAG) -+#ifndef IL_BIGENDIAN -+#define R_REG(r) ( \ -+ sizeof(*(r)) == sizeof(uint8) ? readb((volatile uint8*)(r)) : \ -+ sizeof(*(r)) == sizeof(uint16) ? readw((volatile uint16*)(r)) : \ -+ readl((volatile uint32*)(r)) \ -+) -+#define W_REG(r, v) do { \ -+ switch (sizeof(*(r))) { \ -+ case sizeof(uint8): writeb((uint8)(v), (volatile uint8*)(r)); break; \ -+ case sizeof(uint16): writew((uint16)(v), (volatile uint16*)(r)); break; \ -+ case sizeof(uint32): writel((uint32)(v), (volatile uint32*)(r)); break; \ -+ } \ -+} while (0) -+#else /* IL_BIGENDIAN */ -+#define R_REG(r) ({ \ -+ __typeof(*(r)) __osl_v; \ -+ switch (sizeof(*(r))) { \ -+ case sizeof(uint8): __osl_v = readb((volatile uint8*)((uint32)r^3)); break; \ -+ case sizeof(uint16): __osl_v = readw((volatile uint16*)((uint32)r^2)); break; \ -+ case sizeof(uint32): __osl_v = readl((volatile uint32*)(r)); break; \ -+ } \ -+ __osl_v; \ -+}) -+#define W_REG(r, v) do { \ -+ switch (sizeof(*(r))) { \ -+ case sizeof(uint8): writeb((uint8)(v), (volatile uint8*)((uint32)r^3)); break; \ -+ case sizeof(uint16): writew((uint16)(v), (volatile uint16*)((uint32)r^2)); break; \ -+ case sizeof(uint32): writel((uint32)(v), (volatile uint32*)(r)); break; \ -+ } \ -+} while (0) -+#endif -+#endif -+ -+#define AND_REG(r, v) W_REG((r), R_REG(r) & (v)) -+#define OR_REG(r, v) W_REG((r), R_REG(r) | (v)) -+ -+/* bcopy, bcmp, and bzero */ -+#define bcopy(src, dst, len) memcpy((dst), (src), (len)) -+#define bcmp(b1, b2, len) memcmp((b1), (b2), (len)) -+#define bzero(b, len) memset((b), '\0', (len)) -+ -+/* uncached virtual address */ -+#ifdef mips -+#define OSL_UNCACHED(va) KSEG1ADDR((va)) -+#include <asm/addrspace.h> -+#else -+#define OSL_UNCACHED(va) (va) -+#endif -+ -+/* get processor cycle count */ +#if defined(mips) -+#define OSL_GETCYCLES(x) ((x) = read_c0_count() * 2) -+#elif defined(__i386__) -+#define OSL_GETCYCLES(x) rdtscl((x)) -+#else -+#define OSL_GETCYCLES(x) ((x) = 0) ++#include <hndmips.h> ++#elif defined(__ARM_ARCH_4T__) ++#include <hndarm.h> +#endif + -+/* dereference an address that may cause a bus exception */ -+#ifdef mips -+#if defined(MODULE) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,17)) -+#define BUSPROBE(val, addr) panic("get_dbe() will not fixup a bus exception when compiled into a module") -+#else -+#define BUSPROBE(val, addr) get_dbe((val), (addr)) -+#include <asm/paccess.h> -+#endif -+#else -+#define BUSPROBE(val, addr) ({ (val) = R_REG((addr)); 0; }) -+#endif ++extern uint sb_irq(sb_t *sbh); ++extern uint32 sb_cpu_clock(sb_t *sbh); ++extern void sb_cpu_wait(void); + -+/* map/unmap physical to virtual I/O */ -+#define REG_MAP(pa, size) ioremap_nocache((unsigned long)(pa), (unsigned long)(size)) -+#define REG_UNMAP(va) iounmap((void *)(va)) ++#endif /* _hndcpu_h_ */ +diff -urN linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bcm947xx/include/hndmips.h +--- linux.old/arch/mips/bcm947xx/include/hndmips.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/hndmips.h 2006-04-27 20:43:42.000000000 +0200 +@@ -0,0 +1,45 @@ ++/* ++ * HND SiliconBackplane MIPS core software interface. ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: hndmips.h,v 1.1.1.8 2006/02/27 03:43:16 honor Exp $ ++ */ + -+/* shared (dma-able) memory access macros */ -+#define R_SM(r) *(r) -+#define W_SM(r, v) (*(r) = (v)) -+#define BZERO_SM(r, len) memset((r), '\0', (len)) ++#ifndef _hndmips_h_ ++#define _hndmips_h_ + -+/* packet primitives */ -+#define PKTGET(osh, len, send) osl_pktget((osh), (len), (send)) -+#define PKTFREE(osh, skb, send) osl_pktfree((skb)) -+#define PKTDATA(osh, skb) (((struct sk_buff*)(skb))->data) -+#define PKTLEN(osh, skb) (((struct sk_buff*)(skb))->len) -+#define PKTHEADROOM(osh, skb) (PKTDATA(osh,skb)-(((struct sk_buff*)(skb))->head)) -+#define PKTTAILROOM(osh, skb) ((((struct sk_buff*)(skb))->end)-(((struct sk_buff*)(skb))->tail)) -+#define PKTNEXT(osh, skb) (((struct sk_buff*)(skb))->next) -+#define PKTSETNEXT(skb, x) (((struct sk_buff*)(skb))->next = (struct sk_buff*)(x)) -+#define PKTSETLEN(osh, skb, len) __skb_trim((struct sk_buff*)(skb), (len)) -+#define PKTPUSH(osh, skb, bytes) skb_push((struct sk_buff*)(skb), (bytes)) -+#define PKTPULL(osh, skb, bytes) skb_pull((struct sk_buff*)(skb), (bytes)) -+#define PKTDUP(osh, skb) skb_clone((struct sk_buff*)(skb), GFP_ATOMIC) -+#define PKTCOOKIE(skb) ((void*)((struct sk_buff*)(skb))->csum) -+#define PKTSETCOOKIE(skb, x) (((struct sk_buff*)(skb))->csum = (uint)(x)) -+#define PKTLINK(skb) (((struct sk_buff*)(skb))->prev) -+#define PKTSETLINK(skb, x) (((struct sk_buff*)(skb))->prev = (struct sk_buff*)(x)) -+#define PKTPRIO(skb) (((struct sk_buff*)(skb))->priority) -+#define PKTSETPRIO(skb, x) (((struct sk_buff*)(skb))->priority = (x)) -+extern void *osl_pktget(osl_t *osh, uint len, bool send); -+extern void osl_pktfree(void *skb); ++extern void sb_mips_init(sb_t *sbh, uint shirq_map_base); ++extern bool sb_mips_setclock(sb_t *sbh, uint32 mipsclock, uint32 sbclock, uint32 pciclock); ++extern void enable_pfc(uint32 mode); ++extern uint32 sb_memc_get_ncdl(sb_t *sbh); + -+#else /* BINOSL */ ++#if defined(BCMPERFSTATS) ++/* enable counting - exclusive version. Only one set of counters allowed at a time */ ++extern void hndmips_perf_instrcount_enable(void); ++extern void hndmips_perf_icachecount_enable(void); ++extern void hndmips_perf_dcachecount_enable(void); ++/* start and stop counting */ ++#define hndmips_perf_start01() \ ++ MTC0(C0_PERFORMANCE, 4, MFC0(C0_PERFORMANCE, 4) | 0x80008000) ++#define hndmips_perf_stop01() \ ++ MTC0(C0_PERFORMANCE, 4, MFC0(C0_PERFORMANCE, 4) & ~0x80008000) ++/* retrieve coutners - counters *decrement* */ ++#define hndmips_perf_read0() -(long)(MFC0(C0_PERFORMANCE, 0)) ++#define hndmips_perf_read1() -(long)(MFC0(C0_PERFORMANCE, 1)) ++#define hndmips_perf_read2() -(long)(MFC0(C0_PERFORMANCE, 2)) ++/* enable counting - modular version. Each counters can be enabled separately. */ ++extern void hndmips_perf_icache_hit_enable(void); ++extern void hndmips_perf_icache_miss_enable(void); ++extern uint32 hndmips_perf_read_instrcount(void); ++extern uint32 hndmips_perf_read_cache_miss(void); ++extern uint32 hndmips_perf_read_cache_hit(void); ++#endif /* defined(BCMINTERNAL) || defined (BCMPERFSTATS) */ + -+/* string library */ -+#ifndef LINUX_OSL -+#undef printf -+#define printf(fmt, args...) osl_printf((fmt), ## args) -+#undef sprintf -+#define sprintf(buf, fmt, args...) osl_sprintf((buf), (fmt), ## args) -+#undef strcmp -+#define strcmp(s1, s2) osl_strcmp((s1), (s2)) -+#undef strncmp -+#define strncmp(s1, s2, n) osl_strncmp((s1), (s2), (n)) -+#undef strlen -+#define strlen(s) osl_strlen((s)) -+#undef strcpy -+#define strcpy(d, s) osl_strcpy((d), (s)) -+#undef strncpy -+#define strncpy(d, s, n) osl_strncpy((d), (s), (n)) -+#endif -+extern int osl_printf(const char *format, ...); -+extern int osl_sprintf(char *buf, const char *format, ...); -+extern int osl_strcmp(const char *s1, const char *s2); -+extern int osl_strncmp(const char *s1, const char *s2, uint n); -+extern int osl_strlen(const char *s); -+extern char* osl_strcpy(char *d, const char *s); -+extern char* osl_strncpy(char *d, const char *s, uint n); ++#endif /* _hndmips_h_ */ +diff -urN linux.old/arch/mips/bcm947xx/include/hndpci.h linux.dev/arch/mips/bcm947xx/include/hndpci.h +--- linux.old/arch/mips/bcm947xx/include/hndpci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/hndpci.h 2006-04-27 20:36:48.000000000 +0200 +@@ -0,0 +1,30 @@ ++/* ++ * HND SiliconBackplane PCI core software interface. ++ * ++ * $Id: hndpci.h,v 1.1.1.1 2006/02/27 03:43:16 honor Exp $ ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ */ + -+/* register access macros */ -+#if !defined(BCMJTAG) -+#define R_REG(r) ( \ -+ sizeof(*(r)) == sizeof(uint8) ? osl_readb((volatile uint8*)(r)) : \ -+ sizeof(*(r)) == sizeof(uint16) ? osl_readw((volatile uint16*)(r)) : \ -+ osl_readl((volatile uint32*)(r)) \ -+) -+#define W_REG(r, v) do { \ -+ switch (sizeof(*(r))) { \ -+ case sizeof(uint8): osl_writeb((uint8)(v), (volatile uint8*)(r)); break; \ -+ case sizeof(uint16): osl_writew((uint16)(v), (volatile uint16*)(r)); break; \ -+ case sizeof(uint32): osl_writel((uint32)(v), (volatile uint32*)(r)); break; \ -+ } \ -+} while (0) -+#endif ++#ifndef _hndpci_h_ ++#define _hndpci_h_ + -+#define AND_REG(r, v) W_REG((r), R_REG(r) & (v)) -+#define OR_REG(r, v) W_REG((r), R_REG(r) | (v)) -+extern uint8 osl_readb(volatile uint8 *r); -+extern uint16 osl_readw(volatile uint16 *r); -+extern uint32 osl_readl(volatile uint32 *r); -+extern void osl_writeb(uint8 v, volatile uint8 *r); -+extern void osl_writew(uint16 v, volatile uint16 *r); -+extern void osl_writel(uint32 v, volatile uint32 *r); ++extern int sbpci_read_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, ++ int len); ++extern int extpci_read_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, ++ int len); ++extern int sbpci_write_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, ++ int len); ++extern int extpci_write_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, ++ int len); ++extern void sbpci_ban(uint16 core); ++extern int sbpci_init(sb_t *sbh); ++extern int sbpci_init_pci(sb_t *sbh); ++extern void sbpci_check(sb_t *sbh); + -+/* bcopy, bcmp, and bzero */ -+extern void bcopy(const void *src, void *dst, int len); -+extern int bcmp(const void *b1, const void *b2, int len); -+extern void bzero(void *b, int len); -+ -+/* uncached virtual address */ -+#define OSL_UNCACHED(va) osl_uncached((va)) -+extern void *osl_uncached(void *va); -+ -+/* get processor cycle count */ -+#define OSL_GETCYCLES(x) ((x) = osl_getcycles()) -+extern uint osl_getcycles(void); -+ -+/* dereference an address that may target abort */ -+#define BUSPROBE(val, addr) osl_busprobe(&(val), (addr)) -+extern int osl_busprobe(uint32 *val, uint32 addr); -+ -+/* map/unmap physical to virtual */ -+#define REG_MAP(pa, size) osl_reg_map((pa), (size)) -+#define REG_UNMAP(va) osl_reg_unmap((va)) -+extern void *osl_reg_map(uint32 pa, uint size); -+extern void osl_reg_unmap(void *va); -+ -+/* shared (dma-able) memory access macros */ -+#define R_SM(r) *(r) -+#define W_SM(r, v) (*(r) = (v)) -+#define BZERO_SM(r, len) bzero((r), (len)) -+ -+/* packet primitives */ -+#define PKTGET(osh, len, send) osl_pktget((osh), (len), (send)) -+#define PKTFREE(osh, skb, send) osl_pktfree((skb)) -+#define PKTDATA(osh, skb) osl_pktdata((osh), (skb)) -+#define PKTLEN(osh, skb) osl_pktlen((osh), (skb)) -+#define PKTHEADROOM(osh, skb) osl_pktheadroom((osh), (skb)) -+#define PKTTAILROOM(osh, skb) osl_pkttailroom((osh), (skb)) -+#define PKTNEXT(osh, skb) osl_pktnext((osh), (skb)) -+#define PKTSETNEXT(skb, x) osl_pktsetnext((skb), (x)) -+#define PKTSETLEN(osh, skb, len) osl_pktsetlen((osh), (skb), (len)) -+#define PKTPUSH(osh, skb, bytes) osl_pktpush((osh), (skb), (bytes)) -+#define PKTPULL(osh, skb, bytes) osl_pktpull((osh), (skb), (bytes)) -+#define PKTDUP(osh, skb) osl_pktdup((osh), (skb)) -+#define PKTCOOKIE(skb) osl_pktcookie((skb)) -+#define PKTSETCOOKIE(skb, x) osl_pktsetcookie((skb), (x)) -+#define PKTLINK(skb) osl_pktlink((skb)) -+#define PKTSETLINK(skb, x) osl_pktsetlink((skb), (x)) -+#define PKTPRIO(skb) osl_pktprio((skb)) -+#define PKTSETPRIO(skb, x) osl_pktsetprio((skb), (x)) -+extern void *osl_pktget(osl_t *osh, uint len, bool send); -+extern void osl_pktfree(void *skb); -+extern uchar *osl_pktdata(osl_t *osh, void *skb); -+extern uint osl_pktlen(osl_t *osh, void *skb); -+extern uint osl_pktheadroom(osl_t *osh, void *skb); -+extern uint osl_pkttailroom(osl_t *osh, void *skb); -+extern void *osl_pktnext(osl_t *osh, void *skb); -+extern void osl_pktsetnext(void *skb, void *x); -+extern void osl_pktsetlen(osl_t *osh, void *skb, uint len); -+extern uchar *osl_pktpush(osl_t *osh, void *skb, int bytes); -+extern uchar *osl_pktpull(osl_t *osh, void *skb, int bytes); -+extern void *osl_pktdup(osl_t *osh, void *skb); -+extern void *osl_pktcookie(void *skb); -+extern void osl_pktsetcookie(void *skb, void *x); -+extern void *osl_pktlink(void *skb); -+extern void osl_pktsetlink(void *skb, void *x); -+extern uint osl_pktprio(void *skb); -+extern void osl_pktsetprio(void *skb, uint x); -+ -+#endif /* BINOSL */ -+ -+#define OSL_ERROR(bcmerror) osl_error(bcmerror) -+extern int osl_error(int bcmerror); -+ -+/* the largest reasonable packet buffer driver uses for ethernet MTU in bytes */ -+#define PKTBUFSZ 2048 -+ -+#endif /* _linux_osl_h_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bcm947xx/include/linuxver.h ++#endif /* _hndpci_h_ */ +diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bcm947xx/include/linuxver.h --- linux.old/arch/mips/bcm947xx/include/linuxver.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/linuxver.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,411 @@ ++++ linux.dev/arch/mips/bcm947xx/include/linuxver.h 2006-04-27 20:10:08.000000000 +0200 +@@ -0,0 +1,417 @@ +/* + * Linux-specific abstractions to gain some independence from linux kernel versions. + * Pave over some 2.2 versus 2.4 versus 2.6 kernel differences. + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id$ ++ * ++ * $Id: linuxver.h,v 1.1.1.10 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _linuxver_h_ @@ -2127,31 +4418,32 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#include <linux/config.h> +#include <linux/version.h> + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)) +/* __NO_VERSION__ must be defined for all linkables except one in 2.2 */ +#ifdef __UNDEF_NO_VERSION__ +#undef __NO_VERSION__ +#else +#define __NO_VERSION__ +#endif -+#endif ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0) */ + +#if defined(MODULE) && defined(MODVERSIONS) +#include <linux/modversions.h> +#endif + -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) +#include <linux/moduleparam.h> +#endif + + -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -+#define module_param(_name_, _type_, _perm_) MODULE_PARM(_name_, "i") -+#define module_param_string(_name_, _string_, _size_, _perm_) MODULE_PARM(_string_, "c" __MODULE_STRING(_size_)) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) ++#define module_param(_name_, _type_, _perm_) MODULE_PARM(_name_, "i") ++#define module_param_string(_name_, _string_, _size_, _perm_) \ ++ MODULE_PARM(_string_, "c" __MODULE_STRING(_size_)) +#endif + +/* linux/malloc.h is deprecated, use linux/slab.h instead. */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,9)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 9)) +#include <linux/malloc.h> +#else +#include <linux/slab.h> @@ -2166,7 +4458,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#include <linux/netdevice.h> +#include <asm/io.h> + -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41)) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 41)) +#include <linux/workqueue.h> +#else +#include <linux/tqueue.h> @@ -2182,9 +4474,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#ifndef flush_scheduled_work +#define flush_scheduled_work() flush_scheduled_tasks() +#endif -+#endif ++#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 41) */ + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)) +/* Some distributions have their own 2.6.x compatibility layers */ +#ifndef IRQ_NONE +typedef void irqreturn_t; @@ -2193,8 +4485,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#define IRQ_RETVAL(x) +#endif +#else -+typedef irqreturn_t (*FN_ISR) (int irq, void *dev_id, struct pt_regs *ptregs); -+#endif ++typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs *ptregs); ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) */ + +#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) + @@ -2205,9 +4497,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#include <pcmcia/cisreg.h> +#include <pcmcia/ds.h> + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 69)) +/* In 2.5 (as of 2.5.69 at least) there is a cs_error exported which -+ * does this, but it's not in 2.4 so we do our own for now. */ ++ * does this, but it's not in 2.4 so we do our own for now. ++ */ +static inline void +cs_error(client_handle_t handle, int func, int ret) +{ @@ -2234,10 +4527,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#define __devexit_p(x) x +#endif + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)) + +#define pci_get_drvdata(dev) (dev)->sysdata -+#define pci_set_drvdata(dev, value) (dev)->sysdata=(value) ++#define pci_set_drvdata(dev, value) (dev)->sysdata = (value) + +/* + * New-style (2.4.x) PCI/hot-pluggable PCI/CardBus registration @@ -2254,8 +4547,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b + struct list_head node; + char *name; + const struct pci_device_id *id_table; /* NULL if wants all devices */ -+ int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ -+ void (*remove)(struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ ++ int (*probe)(struct pci_dev *dev, ++ const struct pci_device_id *id); /* New device inserted */ ++ void (*remove)(struct pci_dev *dev); /* Device removed (NULL if not a hot-plug ++ * capable driver) ++ */ + void (*suspend)(struct pci_dev *dev); /* Device suspended */ + void (*resume)(struct pci_dev *dev); /* Device woken up */ +}; @@ -2270,7 +4566,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b + +#endif /* PCI registration */ + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18)) +#ifdef MODULE +#define module_init(x) int init_module(void) { return x(); } +#define module_exit(x) void cleanup_module(void) { x(); } @@ -2278,28 +4574,28 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#define module_init(x) __initcall(x); +#define module_exit(x) __exitcall(x); +#endif -+#endif ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18) */ + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,48)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 48)) +#define list_for_each(pos, head) \ + for (pos = (head)->next; pos != (head); pos = pos->next) +#endif + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 13)) +#define pci_resource_start(dev, bar) ((dev)->base_address[(bar)]) -+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,44)) ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 44)) +#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) +#endif + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,23)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 23)) +#define pci_enable_device(dev) do { } while (0) +#endif + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,14)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 14)) +#define net_device device +#endif + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,42)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 42)) + +/* + * DMA mapping @@ -2329,7 +4625,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +} + +static inline void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, -+ dma_addr_t *dma_handle) ++ dma_addr_t *dma_handle) +{ + void *ret; + int gfp = GFP_ATOMIC | GFP_DMA; @@ -2343,7 +4639,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b + return ret; +} +static inline void pci_free_consistent(struct pci_dev *hwdev, size_t size, -+ void *vaddr, dma_addr_t dma_handle) ++ void *vaddr, dma_addr_t dma_handle) +{ + free_pages((unsigned long)vaddr, get_order(size)); +} @@ -2357,10 +4653,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b + +#endif /* DMA mapping */ + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,43)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 43)) + +#define dev_kfree_skb_any(a) dev_kfree_skb(a) -+#define netif_down(dev) do { (dev)->start = 0; } while(0) ++#define netif_down(dev) do { (dev)->start = 0; } while (0) + +/* pcmcia-cs provides its own netdevice compatibility layer */ +#ifndef _COMPAT_NETDEVICE_H @@ -2376,9 +4672,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b + * done by Aman Singla. + */ + -+#define dev_kfree_skb_irq(a) dev_kfree_skb(a) -+#define netif_wake_queue(dev) do { clear_bit(0, &(dev)->tbusy); mark_bh(NET_BH); } while(0) -+#define netif_stop_queue(dev) set_bit(0, &(dev)->tbusy) ++#define dev_kfree_skb_irq(a) dev_kfree_skb(a) ++#define netif_wake_queue(dev) \ ++ do { clear_bit(0, &(dev)->tbusy); mark_bh(NET_BH); } while (0) ++#define netif_stop_queue(dev) set_bit(0, &(dev)->tbusy) + +static inline void netif_start_queue(struct net_device *dev) +{ @@ -2404,15 +4701,15 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +} + +static inline void tasklet_init(struct tasklet_struct *tasklet, -+ void (*func)(unsigned long), -+ unsigned long data) ++ void (*func)(unsigned long), ++ unsigned long data) +{ + tasklet->next = NULL; + tasklet->sync = 0; + tasklet->routine = (void (*)(void *))func; + tasklet->data = (void *)data; +} -+#define tasklet_kill(tasklet) {do{} while(0);} ++#define tasklet_kill(tasklet) { do{} while (0); } + +/* 2.4.x introduced del_timer_sync() */ +#define del_timer_sync(timer) del_timer(timer) @@ -2423,7 +4720,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b + +#endif /* SoftNet */ + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 3)) + +/* + * Emit code to initialise a tq_struct's routine and data pointers @@ -2444,9 +4741,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b + PREPARE_TQUEUE((_tq), (_routine), (_data)); \ + } while (0) + -+#endif ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 3) */ + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,6)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 6)) + +/* Power management related routines */ + @@ -2456,31 +4753,31 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b + int i; + if (buffer) { + for (i = 0; i < 16; i++) -+ pci_read_config_dword(dev, i * 4,&buffer[i]); ++ pci_read_config_dword(dev, i * 4, &buffer[i]); + } + return 0; +} + -+static inline int ++static inline int +pci_restore_state(struct pci_dev *dev, u32 *buffer) +{ + int i; + + if (buffer) { + for (i = 0; i < 16; i++) -+ pci_write_config_dword(dev,i * 4, buffer[i]); ++ pci_write_config_dword(dev, i * 4, buffer[i]); + } + /* + * otherwise, write the context information we know from bootup. + * This works around a problem where warm-booting from Windows + * combined with a D3(hot)->D0 transition causes PCI config + * header data to be forgotten. -+ */ ++ */ + else { + for (i = 0; i < 6; i ++) + pci_write_config_dword(dev, -+ PCI_BASE_ADDRESS_0 + (i * 4), -+ pci_resource_start(dev, i)); ++ PCI_BASE_ADDRESS_0 + (i * 4), ++ pci_resource_start(dev, i)); + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); + } + return 0; @@ -2489,7 +4786,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#endif /* PCI power management */ + +/* Old cp0 access macros deprecated in 2.4.19 */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 19)) +#define read_c0_count() read_32bit_cp0_register(CP0_COUNT) +#endif + @@ -2511,20 +4808,20 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/b +#define free_netdev(dev) kfree(dev) +#endif + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)) +/* struct packet_type redefined in 2.6.x */ +#define af_packet_priv data +#endif + +#endif /* _linuxver_h_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm947xx/include/mipsinc.h +diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm947xx/include/mipsinc.h --- linux.old/arch/mips/bcm947xx/include/mipsinc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/mipsinc.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,552 @@ ++++ linux.dev/arch/mips/bcm947xx/include/mipsinc.h 2006-04-27 22:12:20.000000000 +0200 +@@ -0,0 +1,541 @@ +/* + * HND Run Time Environment for standalone MIPS programs. + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -2532,7 +4829,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: mipsinc.h,v 1.1.1.5 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _MISPINC_H @@ -2582,9 +4879,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define ra $31 /* return address */ + + -+/* -+ * CP0 Registers -+ */ ++/* CP0 Registers */ + +#define C0_INX $0 +#define C0_RAND $1 @@ -2624,19 +4919,26 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define LEAF(symbol) \ + .globl symbol; \ + .align 2; \ -+ .type symbol,@function; \ -+ .ent symbol,0; \ -+symbol: .frame sp,0,ra ++ .type symbol, @function; \ ++ .ent symbol, 0; \ ++symbol: .frame sp, 0, ra + +/* + * END - mark end of function + */ +#define END(function) \ + .end function; \ -+ .size function,.-function ++ .size function, . - function + +#define _ULCAST_ + ++#define MFC0_SEL(dst, src, sel) \ ++ .word\t(0x40000000 | ((dst) << 16) | ((src) << 11) | (sel)) ++ ++ ++#define MTC0_SEL(dst, src, sel) \ ++ .word\t(0x40800000 | ((dst) << 16) | ((src) << 11) | (sel)) ++ +#else + +/* @@ -2653,9 +4955,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define _ULCAST_ (unsigned long) + + -+/* -+ * CP0 Registers -+ */ ++/* CP0 Registers */ + +#define C0_INX 0 /* CP0: TLB Index */ +#define C0_RAND 1 /* CP0: TLB Random */ @@ -2757,7 +5057,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc + /* 0x1e is unused */ +#define Hit_Set_Virtual_SI 0x1e +#define Hit_Set_Virtual_SD 0x1f -+#endif ++#endif /* !Index_Invalidate_I */ + + +/* @@ -2800,7 +5100,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define ST0_CU1 0x20000000 +#define ST0_CU2 0x40000000 +#define ST0_CU3 0x80000000 -+#endif ++#endif /* !ST0_UM */ + + +/* @@ -2859,9 +5159,15 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define CONF_DB (_ULCAST_(1) << 4) +#define CONF_IB (_ULCAST_(1) << 5) +#define CONF_SE (_ULCAST_(1) << 12) ++#ifndef CONF_BE /* duplicate in mipsregs.h */ ++#define CONF_BE (_ULCAST_(1) << 15) ++#endif +#define CONF_SC (_ULCAST_(1) << 17) +#define CONF_AC (_ULCAST_(1) << 23) +#define CONF_HALT (_ULCAST_(1) << 25) ++#ifndef CONF_M /* duplicate in mipsregs.h */ ++#define CONF_M (_ULCAST_(1) << 31) ++#endif + + +/* @@ -2911,14 +5217,17 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define PRID_IMP_UNKNOWN 0xff00 + +#define BCM330X(id) \ -+ (((id & (PRID_COMP_MASK | PRID_IMP_MASK)) == (PRID_COMP_BROADCOM | PRID_IMP_BCM3302)) \ -+ || ((id & (PRID_COMP_MASK | PRID_IMP_MASK)) == (PRID_COMP_BROADCOM | PRID_IMP_BCM3303))) ++ (((id & (PRID_COMP_MASK | PRID_IMP_MASK)) == \ ++ (PRID_COMP_BROADCOM | PRID_IMP_BCM3302)) || \ ++ ((id & (PRID_COMP_MASK | PRID_IMP_MASK)) == \ ++ (PRID_COMP_BROADCOM | PRID_IMP_BCM3303))) + +/* Bits in C0_BROADCOM */ +#define BRCM_PFC_AVAIL 0x20000000 /* PFC is available */ +#define BRCM_DC_ENABLE 0x40000000 /* Enable Data $ */ +#define BRCM_IC_ENABLE 0x80000000 /* Enable Instruction $ */ +#define BRCM_PFC_ENABLE 0x00400000 /* Obsolete? Enable PFC (at least on 4310) */ ++#define BRCM_CLF_ENABLE 0x00100000 /* Enable cache line first feature */ + +/* PreFetch Cache aka Read Ahead Cache */ + @@ -2947,29 +5256,6 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define PFC_I_AND_D (PFC_INST | PFC_DATA) +#define PFC_I_AND_D_NOPF (PFC_INST_NOPF | PFC_DATA_NOPF) + -+ -+/* -+ * These are the UART port assignments, expressed as offsets from the base -+ * register. These assignments should hold for any serial port based on -+ * a 8250, 16450, or 16550(A). -+ */ -+ -+#define UART_RX 0 /* In: Receive buffer (DLAB=0) */ -+#define UART_TX 0 /* Out: Transmit buffer (DLAB=0) */ -+#define UART_DLL 0 /* Out: Divisor Latch Low (DLAB=1) */ -+#define UART_DLM 1 /* Out: Divisor Latch High (DLAB=1) */ -+#define UART_LCR 3 /* Out: Line Control Register */ -+#define UART_MCR 4 /* Out: Modem Control Register */ -+#define UART_LSR 5 /* In: Line Status Register */ -+#define UART_MSR 6 /* In: Modem Status Register */ -+#define UART_SCR 7 /* I/O: Scratch Register */ -+#define UART_LCR_DLAB 0x80 /* Divisor latch access bit */ -+#define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */ -+#define UART_MCR_LOOP 0x10 /* Enable loopback test mode */ -+#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ -+#define UART_LSR_RXRDY 0x01 /* Receiver ready */ -+ -+ +#ifndef _LANGUAGE_ASSEMBLY + +/* @@ -2979,13 +5265,13 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define MFC0(source, sel) \ +({ \ + int __res; \ -+ __asm__ __volatile__( \ -+ ".set\tnoreorder\n\t" \ -+ ".set\tnoat\n\t" \ -+ ".word\t"STR(0x40010000 | ((source)<<11) | (sel))"\n\t" \ -+ "move\t%0,$1\n\t" \ -+ ".set\tat\n\t" \ -+ ".set\treorder" \ ++ __asm__ __volatile__(" \ ++ .set\tnoreorder; \ ++ .set\tnoat; \ ++ .word\t"STR(0x40010000 | ((source) << 11) | (sel))"; \ ++ move\t%0, $1; \ ++ .set\tat; \ ++ .set\treorder" \ + :"=r" (__res) \ + : \ + :"$1"); \ @@ -2994,13 +5280,13 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc + +#define MTC0(source, sel, value) \ +do { \ -+ __asm__ __volatile__( \ -+ ".set\tnoreorder\n\t" \ -+ ".set\tnoat\n\t" \ -+ "move\t$1,%z0\n\t" \ -+ ".word\t"STR(0x40810000 | ((source)<<11) | (sel))"\n\t" \ -+ ".set\tat\n\t" \ -+ ".set\treorder" \ ++ __asm__ __volatile__(" \ ++ .set\tnoreorder; \ ++ .set\tnoat; \ ++ move\t$1, %z0; \ ++ .word\t"STR(0x40810000 | ((source) << 11) | (sel))"; \ ++ .set\tat; \ ++ .set\treorder" \ + : \ + :"jr" (value) \ + :"$1"); \ @@ -3009,12 +5295,12 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#define get_c0_count() \ +({ \ + int __res; \ -+ __asm__ __volatile__( \ -+ ".set\tnoreorder\n\t" \ -+ ".set\tnoat\n\t" \ -+ "mfc0\t%0,$9\n\t" \ -+ ".set\tat\n\t" \ -+ ".set\treorder" \ ++ __asm__ __volatile__(" \ ++ .set\tnoreorder; \ ++ .set\tnoat; \ ++ mfc0\t%0, $9; \ ++ .set\tat; \ ++ .set\treorder" \ + :"=r" (__res)); \ + __res; \ +}) @@ -3060,10 +5346,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc + __asm__ __volatile__(" \ + .set noreorder; \ + .set mips3; \ -+ cache %1,0(%0); \ -+ cache %1,delta(%0); \ -+ cache %1,(2 * delta)(%0); \ -+ cache %1,(3 * delta)(%0); \ ++ cache %1, 0(%0); \ ++ cache %1, delta(%0); \ ++ cache %1, (2 * delta)(%0); \ ++ cache %1, (3 * delta)(%0); \ + .set mips0; \ + .set reorder" \ + : \ @@ -3073,60 +5359,197 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bc +#endif /* !_LANGUAGE_ASSEMBLY */ + +#endif /* _MISPINC_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/osl.h linux.dev/arch/mips/bcm947xx/include/osl.h +diff -urN linux.old/arch/mips/bcm947xx/include/osl.h linux.dev/arch/mips/bcm947xx/include/osl.h --- linux.old/arch/mips/bcm947xx/include/osl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/osl.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,42 @@ -+/* -+ * OS Abstraction Layer -+ * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ -+ */ ++++ linux.dev/arch/mips/bcm947xx/include/osl.h 2006-05-02 17:40:43.000000000 +0200 +@@ -0,0 +1,179 @@ ++#ifndef __osl_h ++#define __osl_h + -+#ifndef _osl_h_ -+#define _osl_h_ ++#include <linux/delay.h> ++#include <typedefs.h> ++#include <linuxver.h> ++#include <bcmutils.h> ++#include <pcicfg.h> + -+/* osl handle type forward declaration */ -+typedef struct os_handle osl_t; ++#define ASSERT(n) + -+#if defined(linux) -+#include <linux_osl.h> -+#elif defined(NDIS) -+#include <ndis_osl.h> -+#elif defined(_CFE_) -+#include <cfe_osl.h> -+#elif defined(_HNDRTE_) -+#include <hndrte_osl.h> -+#elif defined(_MINOSL_) -+#include <min_osl.h> -+#elif PMON -+#include <pmon_osl.h> -+#elif defined(MACOSX) -+#include <macosx_osl.h> ++/* Pkttag flag should be part of public information */ ++struct osl_pubinfo { ++ bool pkttag; ++ uint pktalloced; /* Number of allocated packet buffers */ ++}; ++ ++struct osl_info { ++ struct osl_pubinfo pub; ++ uint magic; ++ void *pdev; ++ uint malloced; ++ uint failed; ++ void *dbgmem_list; ++}; ++ ++typedef struct osl_info osl_t; ++ ++#define PCI_CFG_RETRY 10 ++ ++/* map/unmap direction */ ++#define DMA_TX 1 /* TX direction for DMA */ ++#define DMA_RX 2 /* RX direction for DMA */ ++ ++#define AND_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) & (v)) ++#define OR_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) | (v)) ++#define SET_REG(osh, r, mask, val) W_REG((osh), (r), ((R_REG((osh), r) & ~(mask)) | (val))) ++ ++/* bcopy, bcmp, and bzero */ ++#define bcopy(src, dst, len) memcpy((dst), (src), (len)) ++#define bcmp(b1, b2, len) memcmp((b1), (b2), (len)) ++#define bzero(b, len) memset((b), '\0', (len)) ++ ++/* uncached virtual address */ ++#ifdef mips ++#define OSL_UNCACHED(va) KSEG1ADDR((va)) ++#include <asm/addrspace.h> +#else -+#error "Unsupported OSL requested" ++#define OSL_UNCACHED(va) (va) ++#endif /* mips */ ++ ++ ++#ifndef IL_BIGENDIAN ++#define R_REG(osh, r) (\ ++ sizeof(*(r)) == sizeof(uint8) ? readb((volatile uint8*)(r)) : \ ++ sizeof(*(r)) == sizeof(uint16) ? readw((volatile uint16*)(r)) : \ ++ readl((volatile uint32*)(r)) \ ++) ++#define W_REG(osh, r, v) do { \ ++ switch (sizeof(*(r))) { \ ++ case sizeof(uint8): writeb((uint8)(v), (volatile uint8*)(r)); break; \ ++ case sizeof(uint16): writew((uint16)(v), (volatile uint16*)(r)); break; \ ++ case sizeof(uint32): writel((uint32)(v), (volatile uint32*)(r)); break; \ ++ } \ ++} while (0) ++#else /* IL_BIGENDIAN */ ++#define R_REG(osh, r) ({ \ ++ __typeof(*(r)) __osl_v; \ ++ switch (sizeof(*(r))) { \ ++ case sizeof(uint8): __osl_v = readb((volatile uint8*)((uint32)r^3)); break; \ ++ case sizeof(uint16): __osl_v = readw((volatile uint16*)((uint32)r^2)); break; \ ++ case sizeof(uint32): __osl_v = readl((volatile uint32*)(r)); break; \ ++ } \ ++ __osl_v; \ ++}) ++#define W_REG(osh, r, v) do { \ ++ switch (sizeof(*(r))) { \ ++ case sizeof(uint8): writeb((uint8)(v), (volatile uint8*)((uint32)r^3)); break; \ ++ case sizeof(uint16): writew((uint16)(v), (volatile uint16*)((uint32)r^2)); break; \ ++ case sizeof(uint32): writel((uint32)(v), (volatile uint32*)(r)); break; \ ++ } \ ++} while (0) ++#endif /* IL_BIGENDIAN */ ++ ++/* dereference an address that may cause a bus exception */ ++#define BUSPROBE(val, addr) get_dbe((val), (addr)) ++#include <asm/paccess.h> ++ ++/* map/unmap physical to virtual I/O */ ++#define REG_MAP(pa, size) ioremap_nocache((unsigned long)(pa), (unsigned long)(size)) ++#define REG_UNMAP(va) iounmap((void *)(va)) ++ ++/* shared (dma-able) memory access macros */ ++#define R_SM(r) *(r) ++#define W_SM(r, v) (*(r) = (v)) ++#define BZERO_SM(r, len) memset((r), '\0', (len)) ++ ++#define MALLOC(osh, size) kmalloc((size), GFP_ATOMIC) ++#define MFREE(osh, addr, size) kfree((addr)) ++#define MALLOCED(osh) (0) ++ ++#define osl_delay OSL_DELAY ++static inline void OSL_DELAY(uint usec) ++{ ++ uint d; ++ ++ while (usec > 0) { ++ d = MIN(usec, 1000); ++ udelay(d); ++ usec -= d; ++ } ++} ++ ++static inline void ++bcm_mdelay(uint ms) ++{ ++ uint i; ++ ++ for (i = 0; i < ms; i++) { ++ OSL_DELAY(1000); ++ } ++} ++ ++ ++#define OSL_PCMCIA_READ_ATTR(osh, offset, buf, size) ++#define OSL_PCMCIA_WRITE_ATTR(osh, offset, buf, size) ++ ++#define OSL_PCI_READ_CONFIG(osh, offset, size) \ ++ osl_pci_read_config((osh), (offset), (size)) ++ ++static inline uint32 ++osl_pci_read_config(osl_t *osh, uint offset, uint size) ++{ ++ uint val; ++ uint retry = PCI_CFG_RETRY; ++ ++ do { ++ pci_read_config_dword(osh->pdev, offset, &val); ++ if (val != 0xffffffff) ++ break; ++ } while (retry--); ++ ++ return (val); ++} ++ ++#define OSL_PCI_WRITE_CONFIG(osh, offset, size, val) \ ++ osl_pci_write_config((osh), (offset), (size), (val)) ++static inline void ++osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val) ++{ ++ uint retry = PCI_CFG_RETRY; ++ ++ do { ++ pci_write_config_dword(osh->pdev, offset, val); ++ if (offset != PCI_BAR0_WIN) ++ break; ++ if (osl_pci_read_config(osh, offset, size) == val) ++ break; ++ } while (retry--); ++} ++ ++ ++/* return bus # for the pci device pointed by osh->pdev */ ++#define OSL_PCI_BUS(osh) osl_pci_bus(osh) ++static inline uint ++osl_pci_bus(osl_t *osh) ++{ ++ return ((struct pci_dev *)osh->pdev)->bus->number; ++} ++ ++/* return slot # for the pci device pointed by osh->pdev */ ++#define OSL_PCI_SLOT(osh) osl_pci_slot(osh) ++static inline uint ++osl_pci_slot(osl_t *osh) ++{ ++ return PCI_SLOT(((struct pci_dev *)osh->pdev)->devfn); ++} ++ +#endif -+ -+/* handy */ -+#define SET_REG(r, mask, val) W_REG((r), ((R_REG(r) & ~(mask)) | (val))) -+#define MAXPRIO 7 /* 0-7 */ -+ -+#endif /* _osl_h_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm947xx/include/pcicfg.h +diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm947xx/include/pcicfg.h --- linux.old/arch/mips/bcm947xx/include/pcicfg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/pcicfg.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,451 @@ ++++ linux.dev/arch/mips/bcm947xx/include/pcicfg.h 2006-04-27 20:31:41.000000000 +0200 +@@ -0,0 +1,495 @@ +/* -+ * pcicfg.h: PCI configuration constants and structures. ++ * pcicfg.h: PCI configuration constants and structures. + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -3134,11 +5557,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: pcicfg.h,v 1.1.1.11 2006/04/08 06:13:40 honor Exp $ + */ + -+#ifndef _h_pci_ -+#define _h_pci_ ++#ifndef _h_pcicfg_ ++#define _h_pcicfg_ + +/* The following inside ifndef's so we don't collide with NTDDK.H */ +#ifndef PCI_MAX_BUS @@ -3182,7 +5605,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +#define PCI_CONFIG_FUN(a) (((a) >> PCICFG_FUN_SHIFT) & PCICFG_FUN_MASK) +#define PCI_CONFIG_OFF(a) (((a) >> PCICFG_OFF_SHIFT) & PCICFG_OFF_MASK) + -+/* PCIE Config space accessing MACROS*/ ++/* PCIE Config space accessing MACROS */ + +#define PCIECFG_BUS_SHIFT 24 /* Bus shift */ +#define PCIECFG_SLOT_SHIFT 19 /* Slot/Device shift */ @@ -3205,7 +5628,6 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +#define PCIE_CONFIG_FUN(a) (((a) >> PCIECFG_FUN_SHIFT) & PCIECFG_FUN_MASK) +#define PCIE_CONFIG_OFF(a) (((a) >> PCIECFG_OFF_SHIFT) & PCIECFG_OFF_MASK) + -+ +/* The actual config space */ + +#define PCI_BAR_MAX 6 @@ -3214,34 +5636,43 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm + +#define PCR_RSVDA_MAX 2 + -+/* pci config status reg has a bit to indicate that capability ptr is present*/ ++/* Bits in PCI bars' flags */ ++ ++#define PCIBAR_FLAGS 0xf ++#define PCIBAR_IO 0x1 ++#define PCIBAR_MEM1M 0x2 ++#define PCIBAR_MEM64 0x4 ++#define PCIBAR_PREFETCH 0x8 ++#define PCIBAR_MEM32_MASK 0xFFFFFF80 ++ ++/* pci config status reg has a bit to indicate that capability ptr is present */ + +#define PCI_CAPPTR_PRESENT 0x0010 + +typedef struct _pci_config_regs { -+ unsigned short vendor; -+ unsigned short device; -+ unsigned short command; -+ unsigned short status; -+ unsigned char rev_id; -+ unsigned char prog_if; -+ unsigned char sub_class; -+ unsigned char base_class; -+ unsigned char cache_line_size; -+ unsigned char latency_timer; -+ unsigned char header_type; -+ unsigned char bist; -+ unsigned long base[PCI_BAR_MAX]; -+ unsigned long cardbus_cis; -+ unsigned short subsys_vendor; -+ unsigned short subsys_id; -+ unsigned long baserom; -+ unsigned long rsvd_a[PCR_RSVDA_MAX]; -+ unsigned char int_line; -+ unsigned char int_pin; -+ unsigned char min_gnt; -+ unsigned char max_lat; -+ unsigned char dev_dep[192]; ++ unsigned short vendor; ++ unsigned short device; ++ unsigned short command; ++ unsigned short status; ++ unsigned char rev_id; ++ unsigned char prog_if; ++ unsigned char sub_class; ++ unsigned char base_class; ++ unsigned char cache_line_size; ++ unsigned char latency_timer; ++ unsigned char header_type; ++ unsigned char bist; ++ unsigned long base[PCI_BAR_MAX]; ++ unsigned long cardbus_cis; ++ unsigned short subsys_vendor; ++ unsigned short subsys_id; ++ unsigned long baserom; ++ unsigned long rsvd_a[PCR_RSVDA_MAX]; ++ unsigned char int_line; ++ unsigned char int_pin; ++ unsigned char min_gnt; ++ unsigned char max_lat; ++ unsigned char dev_dep[192]; +} pci_config_regs; + +#define SZPCR (sizeof (pci_config_regs)) @@ -3279,154 +5710,167 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +#define PCI_CFG_MINGNT 0x3e +#define PCI_CFG_MAXLAT 0x3f + ++#ifdef __NetBSD__ ++#undef PCI_CLASS_DISPLAY ++#undef PCI_CLASS_MEMORY ++#undef PCI_CLASS_BRIDGE ++#undef PCI_CLASS_INPUT ++#undef PCI_CLASS_DOCK ++#endif /* __NetBSD__ */ ++ +/* Classes and subclasses */ + +typedef enum { -+ PCI_CLASS_OLD = 0, -+ PCI_CLASS_DASDI, -+ PCI_CLASS_NET, -+ PCI_CLASS_DISPLAY, -+ PCI_CLASS_MMEDIA, -+ PCI_CLASS_MEMORY, -+ PCI_CLASS_BRIDGE, -+ PCI_CLASS_COMM, -+ PCI_CLASS_BASE, -+ PCI_CLASS_INPUT, -+ PCI_CLASS_DOCK, -+ PCI_CLASS_CPU, -+ PCI_CLASS_SERIAL, -+ PCI_CLASS_INTELLIGENT = 0xe, -+ PCI_CLASS_SATELLITE, -+ PCI_CLASS_CRYPT, -+ PCI_CLASS_DSP, -+ PCI_CLASS_MAX ++ PCI_CLASS_OLD = 0, ++ PCI_CLASS_DASDI, ++ PCI_CLASS_NET, ++ PCI_CLASS_DISPLAY, ++ PCI_CLASS_MMEDIA, ++ PCI_CLASS_MEMORY, ++ PCI_CLASS_BRIDGE, ++ PCI_CLASS_COMM, ++ PCI_CLASS_BASE, ++ PCI_CLASS_INPUT, ++ PCI_CLASS_DOCK, ++ PCI_CLASS_CPU, ++ PCI_CLASS_SERIAL, ++ PCI_CLASS_INTELLIGENT = 0xe, ++ PCI_CLASS_SATELLITE, ++ PCI_CLASS_CRYPT, ++ PCI_CLASS_DSP, ++ PCI_CLASS_XOR = 0xfe +} pci_classes; + +typedef enum { -+ PCI_DASDI_SCSI, -+ PCI_DASDI_IDE, -+ PCI_DASDI_FLOPPY, -+ PCI_DASDI_IPI, -+ PCI_DASDI_RAID, -+ PCI_DASDI_OTHER = 0x80 ++ PCI_DASDI_SCSI, ++ PCI_DASDI_IDE, ++ PCI_DASDI_FLOPPY, ++ PCI_DASDI_IPI, ++ PCI_DASDI_RAID, ++ PCI_DASDI_OTHER = 0x80 +} pci_dasdi_subclasses; + +typedef enum { -+ PCI_NET_ETHER, -+ PCI_NET_TOKEN, -+ PCI_NET_FDDI, -+ PCI_NET_ATM, -+ PCI_NET_OTHER = 0x80 ++ PCI_NET_ETHER, ++ PCI_NET_TOKEN, ++ PCI_NET_FDDI, ++ PCI_NET_ATM, ++ PCI_NET_OTHER = 0x80 +} pci_net_subclasses; + +typedef enum { -+ PCI_DISPLAY_VGA, -+ PCI_DISPLAY_XGA, -+ PCI_DISPLAY_3D, -+ PCI_DISPLAY_OTHER = 0x80 ++ PCI_DISPLAY_VGA, ++ PCI_DISPLAY_XGA, ++ PCI_DISPLAY_3D, ++ PCI_DISPLAY_OTHER = 0x80 +} pci_display_subclasses; + +typedef enum { -+ PCI_MMEDIA_VIDEO, -+ PCI_MMEDIA_AUDIO, -+ PCI_MMEDIA_PHONE, -+ PCI_MEDIA_OTHER = 0x80 ++ PCI_MMEDIA_VIDEO, ++ PCI_MMEDIA_AUDIO, ++ PCI_MMEDIA_PHONE, ++ PCI_MEDIA_OTHER = 0x80 +} pci_mmedia_subclasses; + +typedef enum { -+ PCI_MEMORY_RAM, -+ PCI_MEMORY_FLASH, -+ PCI_MEMORY_OTHER = 0x80 ++ PCI_MEMORY_RAM, ++ PCI_MEMORY_FLASH, ++ PCI_MEMORY_OTHER = 0x80 +} pci_memory_subclasses; + +typedef enum { -+ PCI_BRIDGE_HOST, -+ PCI_BRIDGE_ISA, -+ PCI_BRIDGE_EISA, -+ PCI_BRIDGE_MC, -+ PCI_BRIDGE_PCI, -+ PCI_BRIDGE_PCMCIA, -+ PCI_BRIDGE_NUBUS, -+ PCI_BRIDGE_CARDBUS, -+ PCI_BRIDGE_RACEWAY, -+ PCI_BRIDGE_OTHER = 0x80 ++ PCI_BRIDGE_HOST, ++ PCI_BRIDGE_ISA, ++ PCI_BRIDGE_EISA, ++ PCI_BRIDGE_MC, ++ PCI_BRIDGE_PCI, ++ PCI_BRIDGE_PCMCIA, ++ PCI_BRIDGE_NUBUS, ++ PCI_BRIDGE_CARDBUS, ++ PCI_BRIDGE_RACEWAY, ++ PCI_BRIDGE_OTHER = 0x80 +} pci_bridge_subclasses; + +typedef enum { -+ PCI_COMM_UART, -+ PCI_COMM_PARALLEL, -+ PCI_COMM_MULTIUART, -+ PCI_COMM_MODEM, -+ PCI_COMM_OTHER = 0x80 ++ PCI_COMM_UART, ++ PCI_COMM_PARALLEL, ++ PCI_COMM_MULTIUART, ++ PCI_COMM_MODEM, ++ PCI_COMM_OTHER = 0x80 +} pci_comm_subclasses; + +typedef enum { -+ PCI_BASE_PIC, -+ PCI_BASE_DMA, -+ PCI_BASE_TIMER, -+ PCI_BASE_RTC, -+ PCI_BASE_PCI_HOTPLUG, -+ PCI_BASE_OTHER = 0x80 ++ PCI_BASE_PIC, ++ PCI_BASE_DMA, ++ PCI_BASE_TIMER, ++ PCI_BASE_RTC, ++ PCI_BASE_PCI_HOTPLUG, ++ PCI_BASE_OTHER = 0x80 +} pci_base_subclasses; + +typedef enum { -+ PCI_INPUT_KBD, -+ PCI_INPUT_PEN, -+ PCI_INPUT_MOUSE, -+ PCI_INPUT_SCANNER, -+ PCI_INPUT_GAMEPORT, -+ PCI_INPUT_OTHER = 0x80 ++ PCI_INPUT_KBD, ++ PCI_INPUT_PEN, ++ PCI_INPUT_MOUSE, ++ PCI_INPUT_SCANNER, ++ PCI_INPUT_GAMEPORT, ++ PCI_INPUT_OTHER = 0x80 +} pci_input_subclasses; + +typedef enum { -+ PCI_DOCK_GENERIC, -+ PCI_DOCK_OTHER = 0x80 ++ PCI_DOCK_GENERIC, ++ PCI_DOCK_OTHER = 0x80 +} pci_dock_subclasses; + +typedef enum { -+ PCI_CPU_386, -+ PCI_CPU_486, -+ PCI_CPU_PENTIUM, -+ PCI_CPU_ALPHA = 0x10, -+ PCI_CPU_POWERPC = 0x20, -+ PCI_CPU_MIPS = 0x30, -+ PCI_CPU_COPROC = 0x40, -+ PCI_CPU_OTHER = 0x80 ++ PCI_CPU_386, ++ PCI_CPU_486, ++ PCI_CPU_PENTIUM, ++ PCI_CPU_ALPHA = 0x10, ++ PCI_CPU_POWERPC = 0x20, ++ PCI_CPU_MIPS = 0x30, ++ PCI_CPU_COPROC = 0x40, ++ PCI_CPU_OTHER = 0x80 +} pci_cpu_subclasses; + +typedef enum { -+ PCI_SERIAL_IEEE1394, -+ PCI_SERIAL_ACCESS, -+ PCI_SERIAL_SSA, -+ PCI_SERIAL_USB, -+ PCI_SERIAL_FIBER, -+ PCI_SERIAL_SMBUS, -+ PCI_SERIAL_OTHER = 0x80 ++ PCI_SERIAL_IEEE1394, ++ PCI_SERIAL_ACCESS, ++ PCI_SERIAL_SSA, ++ PCI_SERIAL_USB, ++ PCI_SERIAL_FIBER, ++ PCI_SERIAL_SMBUS, ++ PCI_SERIAL_OTHER = 0x80 +} pci_serial_subclasses; + +typedef enum { -+ PCI_INTELLIGENT_I2O, ++ PCI_INTELLIGENT_I2O +} pci_intelligent_subclasses; + +typedef enum { -+ PCI_SATELLITE_TV, -+ PCI_SATELLITE_AUDIO, -+ PCI_SATELLITE_VOICE, -+ PCI_SATELLITE_DATA, -+ PCI_SATELLITE_OTHER = 0x80 ++ PCI_SATELLITE_TV, ++ PCI_SATELLITE_AUDIO, ++ PCI_SATELLITE_VOICE, ++ PCI_SATELLITE_DATA, ++ PCI_SATELLITE_OTHER = 0x80 +} pci_satellite_subclasses; + +typedef enum { -+ PCI_CRYPT_NETWORK, -+ PCI_CRYPT_ENTERTAINMENT, -+ PCI_CRYPT_OTHER = 0x80 ++ PCI_CRYPT_NETWORK, ++ PCI_CRYPT_ENTERTAINMENT, ++ PCI_CRYPT_OTHER = 0x80 +} pci_crypt_subclasses; + +typedef enum { -+ PCI_DSP_DPIO, -+ PCI_DSP_OTHER = 0x80 ++ PCI_DSP_DPIO, ++ PCI_DSP_OTHER = 0x80 +} pci_dsp_subclasses; + ++typedef enum { ++ PCI_XOR_QDMA, ++ PCI_XOR_OTHER = 0x80 ++} pci_xor_subclasses; ++ +/* Header types */ +typedef enum { + PCI_HEADER_NORMAL, @@ -3441,45 +5885,45 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +#define PPB_RSVDD_MAX 8 + +typedef struct _ppb_config_regs { -+ unsigned short vendor; -+ unsigned short device; -+ unsigned short command; -+ unsigned short status; -+ unsigned char rev_id; -+ unsigned char prog_if; -+ unsigned char sub_class; -+ unsigned char base_class; -+ unsigned char cache_line_size; -+ unsigned char latency_timer; -+ unsigned char header_type; -+ unsigned char bist; -+ unsigned long rsvd_a[PPB_RSVDA_MAX]; -+ unsigned char prim_bus; -+ unsigned char sec_bus; -+ unsigned char sub_bus; -+ unsigned char sec_lat; -+ unsigned char io_base; -+ unsigned char io_lim; -+ unsigned short sec_status; -+ unsigned short mem_base; -+ unsigned short mem_lim; -+ unsigned short pf_mem_base; -+ unsigned short pf_mem_lim; -+ unsigned long pf_mem_base_hi; -+ unsigned long pf_mem_lim_hi; -+ unsigned short io_base_hi; -+ unsigned short io_lim_hi; -+ unsigned short subsys_vendor; -+ unsigned short subsys_id; -+ unsigned long rsvd_b; -+ unsigned char rsvd_c; -+ unsigned char int_pin; -+ unsigned short bridge_ctrl; -+ unsigned char chip_ctrl; -+ unsigned char diag_ctrl; -+ unsigned short arb_ctrl; -+ unsigned long rsvd_d[PPB_RSVDD_MAX]; -+ unsigned char dev_dep[192]; ++ unsigned short vendor; ++ unsigned short device; ++ unsigned short command; ++ unsigned short status; ++ unsigned char rev_id; ++ unsigned char prog_if; ++ unsigned char sub_class; ++ unsigned char base_class; ++ unsigned char cache_line_size; ++ unsigned char latency_timer; ++ unsigned char header_type; ++ unsigned char bist; ++ unsigned long rsvd_a[PPB_RSVDA_MAX]; ++ unsigned char prim_bus; ++ unsigned char sec_bus; ++ unsigned char sub_bus; ++ unsigned char sec_lat; ++ unsigned char io_base; ++ unsigned char io_lim; ++ unsigned short sec_status; ++ unsigned short mem_base; ++ unsigned short mem_lim; ++ unsigned short pf_mem_base; ++ unsigned short pf_mem_lim; ++ unsigned long pf_mem_base_hi; ++ unsigned long pf_mem_lim_hi; ++ unsigned short io_base_hi; ++ unsigned short io_lim_hi; ++ unsigned short subsys_vendor; ++ unsigned short subsys_id; ++ unsigned long rsvd_b; ++ unsigned char rsvd_c; ++ unsigned char int_pin; ++ unsigned short bridge_ctrl; ++ unsigned char chip_ctrl; ++ unsigned char diag_ctrl; ++ unsigned short arb_ctrl; ++ unsigned long rsvd_d[PPB_RSVDD_MAX]; ++ unsigned char dev_dep[192]; +} ppb_config_regs; + + @@ -3489,7 +5933,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +#define PCI_CAP_PCIECAP_ID 0x10 + +/* Data structure to define the Message Signalled Interrupt facility -+ * Valid for PCI and PCIE configurations */ ++ * Valid for PCI and PCIE configurations ++ */ +typedef struct _pciconfig_cap_msi { + unsigned char capID; + unsigned char nextptr; @@ -3498,14 +5943,15 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +} pciconfig_cap_msi; + +/* Data structure to define the Power managment facility -+ * Valid for PCI and PCIE configurations */ ++ * Valid for PCI and PCIE configurations ++ */ +typedef struct _pciconfig_cap_pwrmgmt { + unsigned char capID; + unsigned char nextptr; + unsigned short pme_cap; -+ unsigned short pme_sts_ctrl; -+ unsigned char pme_bridge_ext; -+ unsigned char data; ++ unsigned short pme_sts_ctrl; ++ unsigned char pme_bridge_ext; ++ unsigned char data; +} pciconfig_cap_pwrmgmt; + +/* Data structure to define the PCIE capability */ @@ -3513,10 +5959,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm + unsigned char capID; + unsigned char nextptr; + unsigned short pcie_cap; -+ unsigned int dev_cap; ++ unsigned int dev_cap; + unsigned short dev_ctrl; + unsigned short dev_status; -+ unsigned int link_cap; ++ unsigned int link_cap; + unsigned short link_ctrl; + unsigned short link_status; +} pciconfig_cap_pcie; @@ -3538,6 +5984,13 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm + +/* Everything below is BRCM HND proprietary */ + ++ ++/* Brcm PCI configuration registers */ ++#define cap_list rsvd_a[0] ++#define bar0_window dev_dep[0x80 - 0x40] ++#define bar1_window dev_dep[0x84 - 0x40] ++#define sprom_control dev_dep[0x88 - 0x40] ++ +#define PCI_BAR0_WIN 0x80 /* backplane addres space accessed by BAR0 */ +#define PCI_BAR1_WIN 0x84 /* backplane addres space accessed by BAR1 */ +#define PCI_SPROM_CONTROL 0x88 /* sprom property control */ @@ -3546,13 +5999,24 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +#define PCI_INT_MASK 0x94 /* mask of PCI and other cores interrupts */ +#define PCI_TO_SB_MB 0x98 /* signal backplane interrupts */ +#define PCI_BACKPLANE_ADDR 0xA0 /* address an arbitrary location on the system backplane */ -+#define PCI_BACKPLANE_DATA 0xA4 /* data at the location specified by above address register */ ++#define PCI_BACKPLANE_DATA 0xA4 /* data at the location specified by above address */ +#define PCI_GPIO_IN 0xb0 /* pci config space gpio input (>=rev3) */ +#define PCI_GPIO_OUT 0xb4 /* pci config space gpio output (>=rev3) */ +#define PCI_GPIO_OUTEN 0xb8 /* pci config space gpio output enable (>=rev3) */ + ++#define PCI_BAR0_SHADOW_OFFSET (2 * 1024) /* bar0 + 2K accesses sprom shadow (in pci core) */ +#define PCI_BAR0_SPROM_OFFSET (4 * 1024) /* bar0 + 4K accesses external sprom */ +#define PCI_BAR0_PCIREGS_OFFSET (6 * 1024) /* bar0 + 6K accesses pci core registers */ ++#define PCI_BAR0_PCISBR_OFFSET (4 * 1024) /* pci core SB registers are at the end of the ++ * 8KB window, so their address is the "regular" ++ * address plus 4K ++ */ ++#define PCI_BAR0_WINSZ 8192 /* bar0 window size */ ++ ++/* On pci corerev >= 13 and all pcie, the bar0 is now 16KB and it maps: */ ++#define PCI_16KB0_PCIREGS_OFFSET (8 * 1024) /* bar0 + 8K accesses pci/pcie core registers */ ++#define PCI_16KB0_CCREGS_OFFSET (12 * 1024) /* bar0 + 12K accesses chipc core registers */ ++#define PCI_16KBB0_WINSZ (16 * 1024) /* bar0 window size */ + +/* PCI_INT_STATUS */ +#define PCI_SBIM_STATUS_SERR 0x4 /* backplane SBErr interrupt status */ @@ -3563,9 +6027,12 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +#define PCI_SBIM_MASK_SERR 0x4 /* backplane SBErr interrupt mask */ + +/* PCI_SPROM_CONTROL */ -+#define SPROM_BLANK 0x04 /* indicating a blank sprom */ -+#define SPROM_WRITEEN 0x10 /* sprom write enable */ ++#define SPROM_SZ_MSK 0x02 /* SPROM Size Mask */ ++#define SPROM_LOCKED 0x08 /* SPROM Locked */ ++#define SPROM_BLANK 0x04 /* indicating a blank SPROM */ ++#define SPROM_WRITEEN 0x10 /* SPROM write enable */ +#define SPROM_BOOTROM_WE 0x20 /* external bootrom write enable */ ++#define SPROM_OTPIN_USE 0x80 /* device OTP In use */ + +#define SPROM_SIZE 256 /* sprom size in 16-bit */ +#define SPROM_CRC_RANGE 64 /* crc cover range in 16-bit */ @@ -3573,11 +6040,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm +/* PCI_CFG_CMD_STAT */ +#define PCI_CFG_CMD_STAT_TA 0x08000000 /* target abort status */ + -+#endif -diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm947xx/include/sbchipc.h ++#endif /* _h_pcicfg_ */ +diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm947xx/include/sbchipc.h --- linux.old/arch/mips/bcm947xx/include/sbchipc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbchipc.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,440 @@ ++++ linux.dev/arch/mips/bcm947xx/include/sbchipc.h 2006-04-27 22:11:01.000000000 +0200 +@@ -0,0 +1,516 @@ +/* + * SiliconBackplane Chipcommon core hardware definitions. + * @@ -3585,8 +6052,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc + * jtag, 0/1/2 uarts, clock frequency control, a watchdog interrupt timer, + * gpio interface, extbus, and support for serial and parallel flashes. + * -+ * $Id$ -+ * Copyright 2005, Broadcom Corporation ++ * $Id: sbchipc.h,v 1.1.1.14 2006/04/15 01:29:08 michael Exp $ ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -3657,8 +6124,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc + uint32 watchdog; /* 0x80 */ + uint32 PAD[1]; + -+ /*GPIO based LED powersave registers corerev >= 16*/ -+ uint32 gpiotimerval; /*0x88 */ ++ /* GPIO based LED powersave registers corerev >= 16 */ ++ uint32 gpiotimerval; /* 0x88 */ + uint32 gpiotimeroutmask; + + /* clock control */ @@ -3666,7 +6133,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc + uint32 clockcontrol_sb; /* aka m0 */ + uint32 clockcontrol_pci; /* aka m1 */ + uint32 clockcontrol_m2; /* mii/uart/mipsref */ -+ uint32 clockcontrol_mips; /* aka m3 */ ++ uint32 clockcontrol_m3; /* cpu */ + uint32 clkdiv; /* corerev >= 3 */ + uint32 PAD[2]; + @@ -3694,7 +6161,12 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc + uint32 prog_waitcount; + uint32 flash_config; + uint32 flash_waitcount; -+ uint32 PAD[116]; ++ uint32 PAD[44]; ++ ++ /* Clock control and hardware workarounds */ ++ uint32 clk_ctl_st; ++ uint32 hw_war; ++ uint32 PAD[70]; + + /* uarts */ + uint8 uart0data; /* 0x300 */ @@ -3736,43 +6208,51 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc +#define CC_OTP 0x800 + +/* chipid */ -+#define CID_ID_MASK 0x0000ffff /* Chip Id mask */ -+#define CID_REV_MASK 0x000f0000 /* Chip Revision mask */ -+#define CID_REV_SHIFT 16 /* Chip Revision shift */ -+#define CID_PKG_MASK 0x00f00000 /* Package Option mask */ -+#define CID_PKG_SHIFT 20 /* Package Option shift */ -+#define CID_CC_MASK 0x0f000000 /* CoreCount (corerev >= 4) */ ++#define CID_ID_MASK 0x0000ffff /* Chip Id mask */ ++#define CID_REV_MASK 0x000f0000 /* Chip Revision mask */ ++#define CID_REV_SHIFT 16 /* Chip Revision shift */ ++#define CID_PKG_MASK 0x00f00000 /* Package Option mask */ ++#define CID_PKG_SHIFT 20 /* Package Option shift */ ++#define CID_CC_MASK 0x0f000000 /* CoreCount (corerev >= 4) */ +#define CID_CC_SHIFT 24 + +/* capabilities */ -+#define CAP_UARTS_MASK 0x00000003 /* Number of uarts */ -+#define CAP_MIPSEB 0x00000004 /* MIPS is in big-endian mode */ -+#define CAP_UCLKSEL 0x00000018 /* UARTs clock select */ -+#define CAP_UINTCLK 0x00000008 /* UARTs are driven by internal divided clock */ -+#define CAP_UARTGPIO 0x00000020 /* UARTs own Gpio's 15:12 */ -+#define CAP_EXTBUS 0x00000040 /* External bus present */ -+#define CAP_FLASH_MASK 0x00000700 /* Type of flash */ -+#define CAP_PLL_MASK 0x00038000 /* Type of PLL */ -+#define CAP_PWR_CTL 0x00040000 /* Power control */ -+#define CAP_OTPSIZE 0x00380000 /* OTP Size (0 = none) */ -+#define CAP_OTPSIZE_SHIFT 19 /* OTP Size shift */ -+#define CAP_OTPSIZE_BASE 5 /* OTP Size base */ -+#define CAP_JTAGP 0x00400000 /* JTAG Master Present */ -+#define CAP_ROM 0x00800000 /* Internal boot rom active */ ++#define CAP_UARTS_MASK 0x00000003 /* Number of uarts */ ++#define CAP_MIPSEB 0x00000004 /* MIPS is in big-endian mode */ ++#define CAP_UCLKSEL 0x00000018 /* UARTs clock select */ ++#define CAP_UINTCLK 0x00000008 /* UARTs are driven by internal divided clock */ ++#define CAP_UARTGPIO 0x00000020 /* UARTs own Gpio's 15:12 */ ++#define CAP_EXTBUS_MASK 0x000000c0 /* External bus mask */ ++#define CAP_EXTBUS_NONE 0x00000000 /* No ExtBus present */ ++#define CAP_EXTBUS_FULL 0x00000040 /* ExtBus: PCMCIA, IDE & Prog */ ++#define CAP_EXTBUS_PROG 0x00000080 /* ExtBus: ProgIf only */ ++#define CAP_FLASH_MASK 0x00000700 /* Type of flash */ ++#define CAP_PLL_MASK 0x00038000 /* Type of PLL */ ++#define CAP_PWR_CTL 0x00040000 /* Power control */ ++#define CAP_OTPSIZE 0x00380000 /* OTP Size (0 = none) */ ++#define CAP_OTPSIZE_SHIFT 19 /* OTP Size shift */ ++#define CAP_OTPSIZE_BASE 5 /* OTP Size base */ ++#define CAP_JTAGP 0x00400000 /* JTAG Master Present */ ++#define CAP_ROM 0x00800000 /* Internal boot rom active */ ++#define CAP_BKPLN64 0x08000000 /* 64-bit backplane */ + +/* PLL type */ +#define PLL_NONE 0x00000000 -+#define PLL_TYPE1 0x00010000 /* 48Mhz base, 3 dividers */ -+#define PLL_TYPE2 0x00020000 /* 48Mhz, 4 dividers */ -+#define PLL_TYPE3 0x00030000 /* 25Mhz, 2 dividers */ -+#define PLL_TYPE4 0x00008000 /* 48Mhz, 4 dividers */ -+#define PLL_TYPE5 0x00018000 /* 25Mhz, 4 dividers */ -+#define PLL_TYPE6 0x00028000 /* 100/200 or 120/240 only */ -+#define PLL_TYPE7 0x00038000 /* 25Mhz, 4 dividers */ ++#define PLL_TYPE1 0x00010000 /* 48Mhz base, 3 dividers */ ++#define PLL_TYPE2 0x00020000 /* 48Mhz, 4 dividers */ ++#define PLL_TYPE3 0x00030000 /* 25Mhz, 2 dividers */ ++#define PLL_TYPE4 0x00008000 /* 48Mhz, 4 dividers */ ++#define PLL_TYPE5 0x00018000 /* 25Mhz, 4 dividers */ ++#define PLL_TYPE6 0x00028000 /* 100/200 or 120/240 only */ ++#define PLL_TYPE7 0x00038000 /* 25Mhz, 4 dividers */ + +/* corecontrol */ -+#define CC_UARTCLKO 0x00000001 /* Drive UART with internal clock */ -+#define CC_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ ++#define CC_UARTCLKO 0x00000001 /* Drive UART with internal clock */ ++#define CC_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ ++ ++/* chipcontrol */ ++#define CHIPCTRL_4321A0_DEFAULT 0x3a4 ++#define CHIPCTRL_4321A1_DEFAULT 0x0a4 + +/* Fields in the otpstatus register */ +#define OTPS_PROGFAIL 0x80000000 @@ -3812,7 +6292,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc +#define JCMD0_ACC_IRPDR 0x00004000 +#define JCMD0_ACC_PDR 0x00005000 +#define JCMD0_IRW_MASK 0x00000f00 -+#define JCMD_ACC_MASK 0x000f0000 /* Changes for corerev 11 */ ++#define JCMD_ACC_MASK 0x000f0000 /* Changes for corerev 11 */ +#define JCMD_ACC_IRDR 0x00000000 +#define JCMD_ACC_DR 0x00010000 +#define JCMD_ACC_IR 0x00020000 @@ -3824,9 +6304,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc +#define JCMD_DRW_MASK 0x0000003f + +/* jtagctrl */ -+#define JCTRL_FORCE_CLK 4 /* Force clock */ -+#define JCTRL_EXT_EN 2 /* Enable external targets */ -+#define JCTRL_EN 1 /* Enable Jtag master */ ++#define JCTRL_FORCE_CLK 4 /* Force clock */ ++#define JCTRL_EXT_EN 2 /* Enable external targets */ ++#define JCTRL_EN 1 /* Enable Jtag master */ + +/* Fields in clkdiv */ +#define CLKD_SFLASH 0x0f000000 @@ -3834,65 +6314,73 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc +#define CLKD_OTP 0x000f0000 +#define CLKD_OTP_SHIFT 16 +#define CLKD_JTAG 0x00000f00 -+#define CLKD_JTAG_SHIFT 8 ++#define CLKD_JTAG_SHIFT 8 +#define CLKD_UART 0x000000ff + +/* intstatus/intmask */ -+#define CI_GPIO 0x00000001 /* gpio intr */ -+#define CI_EI 0x00000002 /* ro: ext intr pin (corerev >= 3) */ -+#define CI_WDRESET 0x80000000 /* watchdog reset occurred */ ++#define CI_GPIO 0x00000001 /* gpio intr */ ++#define CI_EI 0x00000002 /* ro: ext intr pin (corerev >= 3) */ ++#define CI_WDRESET 0x80000000 /* watchdog reset occurred */ + +/* slow_clk_ctl */ -+#define SCC_SS_MASK 0x00000007 /* slow clock source mask */ -+#define SCC_SS_LPO 0x00000000 /* source of slow clock is LPO */ -+#define SCC_SS_XTAL 0x00000001 /* source of slow clock is crystal */ -+#define SCC_SS_PCI 0x00000002 /* source of slow clock is PCI */ -+#define SCC_LF 0x00000200 /* LPOFreqSel, 1: 160Khz, 0: 32KHz */ -+#define SCC_LP 0x00000400 /* LPOPowerDown, 1: LPO is disabled, 0: LPO is enabled */ -+#define SCC_FS 0x00000800 /* ForceSlowClk, 1: sb/cores running on slow clock, 0: power logic control */ -+#define SCC_IP 0x00001000 /* IgnorePllOffReq, 1/0: power logic ignores/honors PLL clock disable requests from core */ -+#define SCC_XC 0x00002000 /* XtalControlEn, 1/0: power logic does/doesn't disable crystal when appropriate */ -+#define SCC_XP 0x00004000 /* XtalPU (RO), 1/0: crystal running/disabled */ -+#define SCC_CD_MASK 0xffff0000 /* ClockDivider (SlowClk = 1/(4+divisor)) */ ++#define SCC_SS_MASK 0x00000007 /* slow clock source mask */ ++#define SCC_SS_LPO 0x00000000 /* source of slow clock is LPO */ ++#define SCC_SS_XTAL 0x00000001 /* source of slow clock is crystal */ ++#define SCC_SS_PCI 0x00000002 /* source of slow clock is PCI */ ++#define SCC_LF 0x00000200 /* LPOFreqSel, 1: 160Khz, 0: 32KHz */ ++#define SCC_LP 0x00000400 /* LPOPowerDown, 1: LPO is disabled, ++ * 0: LPO is enabled ++ */ ++#define SCC_FS 0x00000800 /* ForceSlowClk, 1: sb/cores running on slow clock, ++ * 0: power logic control ++ */ ++#define SCC_IP 0x00001000 /* IgnorePllOffReq, 1/0: power logic ignores/honors ++ * PLL clock disable requests from core ++ */ ++#define SCC_XC 0x00002000 /* XtalControlEn, 1/0: power logic does/doesn't ++ * disable crystal when appropriate ++ */ ++#define SCC_XP 0x00004000 /* XtalPU (RO), 1/0: crystal running/disabled */ ++#define SCC_CD_MASK 0xffff0000 /* ClockDivider (SlowClk = 1/(4+divisor)) */ +#define SCC_CD_SHIFT 16 + +/* system_clk_ctl */ -+#define SYCC_IE 0x00000001 /* ILPen: Enable Idle Low Power */ -+#define SYCC_AE 0x00000002 /* ALPen: Enable Active Low Power */ -+#define SYCC_FP 0x00000004 /* ForcePLLOn */ -+#define SYCC_AR 0x00000008 /* Force ALP (or HT if ALPen is not set */ -+#define SYCC_HR 0x00000010 /* Force HT */ -+#define SYCC_CD_MASK 0xffff0000 /* ClkDiv (ILP = 1/(4+divisor)) */ ++#define SYCC_IE 0x00000001 /* ILPen: Enable Idle Low Power */ ++#define SYCC_AE 0x00000002 /* ALPen: Enable Active Low Power */ ++#define SYCC_FP 0x00000004 /* ForcePLLOn */ ++#define SYCC_AR 0x00000008 /* Force ALP (or HT if ALPen is not set */ ++#define SYCC_HR 0x00000010 /* Force HT */ ++#define SYCC_CD_MASK 0xffff0000 /* ClkDiv (ILP = 1/(4 * (divisor + 1)) */ +#define SYCC_CD_SHIFT 16 + -+/* gpiotimerval*/ ++/* gpiotimerval */ +#define GPIO_ONTIME_SHIFT 16 + +/* clockcontrol_n */ -+#define CN_N1_MASK 0x3f /* n1 control */ -+#define CN_N2_MASK 0x3f00 /* n2 control */ ++#define CN_N1_MASK 0x3f /* n1 control */ ++#define CN_N2_MASK 0x3f00 /* n2 control */ +#define CN_N2_SHIFT 8 -+#define CN_PLLC_MASK 0xf0000 /* pll control */ ++#define CN_PLLC_MASK 0xf0000 /* pll control */ +#define CN_PLLC_SHIFT 16 + +/* clockcontrol_sb/pci/uart */ -+#define CC_M1_MASK 0x3f /* m1 control */ -+#define CC_M2_MASK 0x3f00 /* m2 control */ ++#define CC_M1_MASK 0x3f /* m1 control */ ++#define CC_M2_MASK 0x3f00 /* m2 control */ +#define CC_M2_SHIFT 8 -+#define CC_M3_MASK 0x3f0000 /* m3 control */ ++#define CC_M3_MASK 0x3f0000 /* m3 control */ +#define CC_M3_SHIFT 16 -+#define CC_MC_MASK 0x1f000000 /* mux control */ ++#define CC_MC_MASK 0x1f000000 /* mux control */ +#define CC_MC_SHIFT 24 + +/* N3M Clock control magic field values */ -+#define CC_F6_2 0x02 /* A factor of 2 in */ -+#define CC_F6_3 0x03 /* 6-bit fields like */ -+#define CC_F6_4 0x05 /* N1, M1 or M3 */ ++#define CC_F6_2 0x02 /* A factor of 2 in */ ++#define CC_F6_3 0x03 /* 6-bit fields like */ ++#define CC_F6_4 0x05 /* N1, M1 or M3 */ +#define CC_F6_5 0x09 +#define CC_F6_6 0x11 +#define CC_F6_7 0x21 + -+#define CC_F5_BIAS 5 /* 5-bit fields get this added */ ++#define CC_F5_BIAS 5 /* 5-bit fields get this added */ + +#define CC_MC_BYPASS 0x08 +#define CC_MC_M1 0x04 @@ -3901,22 +6389,22 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc +#define CC_MC_M1M3 0x11 + +/* Type 2 Clock control magic field values */ -+#define CC_T2_BIAS 2 /* n1, n2, m1 & m3 bias */ -+#define CC_T2M2_BIAS 3 /* m2 bias */ ++#define CC_T2_BIAS 2 /* n1, n2, m1 & m3 bias */ ++#define CC_T2M2_BIAS 3 /* m2 bias */ + +#define CC_T2MC_M1BYP 1 +#define CC_T2MC_M2BYP 2 +#define CC_T2MC_M3BYP 4 + +/* Type 6 Clock control magic field values */ -+#define CC_T6_MMASK 1 /* bits of interest in m */ -+#define CC_T6_M0 120000000 /* sb clock for m = 0 */ -+#define CC_T6_M1 100000000 /* sb clock for m = 1 */ ++#define CC_T6_MMASK 1 /* bits of interest in m */ ++#define CC_T6_M0 120000000 /* sb clock for m = 0 */ ++#define CC_T6_M1 100000000 /* sb clock for m = 1 */ +#define SB2MIPS_T6(sb) (2 * (sb)) + +/* Common clock base */ -+#define CC_CLOCK_BASE1 24000000 /* Half the clock freq */ -+#define CC_CLOCK_BASE2 12500000 /* Alternate crystal on some PLL's */ ++#define CC_CLOCK_BASE1 24000000 /* Half the clock freq */ ++#define CC_CLOCK_BASE2 12500000 /* Alternate crystal on some PLL's */ + +/* Clock control values for 200Mhz in 5350 */ +#define CLKC_5350_N 0x0311 @@ -3928,23 +6416,46 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc +#define SFLASH_AT 0x200 /* Atmel serial flash */ +#define PFLASH 0x700 /* Parallel flash */ + -+/* Bits in the config registers */ ++/* Bits in the ExtBus config registers */ +#define CC_CFG_EN 0x0001 /* Enable */ +#define CC_CFG_EM_MASK 0x000e /* Extif Mode */ -+#define CC_CFG_EM_ASYNC 0x0002 /* Async/Parallel flash */ -+#define CC_CFG_EM_SYNC 0x0004 /* Synchronous */ -+#define CC_CFG_EM_PCMCIA 0x0008 /* PCMCIA */ -+#define CC_CFG_EM_IDE 0x000a /* IDE */ ++#define CC_CFG_EM_ASYNC 0x0000 /* Async/Parallel flash */ ++#define CC_CFG_EM_SYNC 0x0002 /* Synchronous */ ++#define CC_CFG_EM_PCMCIA 0x0004 /* PCMCIA */ ++#define CC_CFG_EM_IDE 0x0006 /* IDE */ +#define CC_CFG_DS 0x0010 /* Data size, 0=8bit, 1=16bit */ +#define CC_CFG_CD_MASK 0x0060 /* Sync: Clock divisor */ +#define CC_CFG_CE 0x0080 /* Sync: Clock enable */ +#define CC_CFG_SB 0x0100 /* Sync: Size/Bytestrobe */ + ++/* ExtBus address space */ ++#define CC_EB_BASE 0x1a000000 /* Chipc ExtBus base address */ ++#define CC_EB_PCMCIA_MEM 0x1a000000 /* PCMCIA 0 memory base address */ ++#define CC_EB_PCMCIA_IO 0x1a200000 /* PCMCIA 0 I/O base address */ ++#define CC_EB_PCMCIA_CFG 0x1a400000 /* PCMCIA 0 config base address */ ++#define CC_EB_IDE 0x1a800000 /* IDE memory base */ ++#define CC_EB_PCMCIA1_MEM 0x1a800000 /* PCMCIA 1 memory base address */ ++#define CC_EB_PCMCIA1_IO 0x1aa00000 /* PCMCIA 1 I/O base address */ ++#define CC_EB_PCMCIA1_CFG 0x1ac00000 /* PCMCIA 1 config base address */ ++#define CC_EB_PROGIF 0x1b000000 /* ProgIF Async/Sync base address */ ++ ++ +/* Start/busy bit in flashcontrol */ ++#define SFLASH_OPCODE 0x000000ff ++#define SFLASH_ACTION 0x00000700 +#define SFLASH_START 0x80000000 +#define SFLASH_BUSY SFLASH_START + -+/* flashcontrol opcodes for ST flashes */ ++/* flashcontrol action codes */ ++#define SFLASH_ACT_OPONLY 0x0000 /* Issue opcode only */ ++#define SFLASH_ACT_OP1D 0x0100 /* opcode + 1 data byte */ ++#define SFLASH_ACT_OP3A 0x0200 /* opcode + 3 address bytes */ ++#define SFLASH_ACT_OP3A1D 0x0300 /* opcode + 3 addres & 1 data bytes */ ++#define SFLASH_ACT_OP3A4D 0x0400 /* opcode + 3 addres & 4 data bytes */ ++#define SFLASH_ACT_OP3A4X4D 0x0500 /* opcode + 3 addres, 4 don't care & 4 data bytes */ ++#define SFLASH_ACT_OP3A1X4D 0x0700 /* opcode + 3 addres, 1 don't care & 4 data bytes */ ++ ++/* flashcontrol action+opcodes for ST flashes */ +#define SFLASH_ST_WREN 0x0006 /* Write Enable */ +#define SFLASH_ST_WRDIS 0x0004 /* Write Disable */ +#define SFLASH_ST_RDSR 0x0105 /* Read Status Register */ @@ -3963,7 +6474,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc +#define SFLASH_ST_BP_SHIFT 2 +#define SFLASH_ST_SRWD 0x80 /* Status Register Write Disable */ + -+/* flashcontrol opcodes for Atmel flashes */ ++/* flashcontrol action+opcodes for Atmel flashes */ +#define SFLASH_AT_READ 0x07e8 +#define SFLASH_AT_PAGE_READ 0x07d2 +#define SFLASH_AT_BUF1_READ @@ -4017,22 +6528,55 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bc +#define OTP_SIGNATURE 0x578a +#define OTP_MAGIC 0x4e56 + ++/* ++ * These are the UART port assignments, expressed as offsets from the base ++ * register. These assignments should hold for any serial port based on ++ * a 8250, 16450, or 16550(A). ++ */ ++ ++#define UART_RX 0 /* In: Receive buffer (DLAB=0) */ ++#define UART_TX 0 /* Out: Transmit buffer (DLAB=0) */ ++#define UART_DLL 0 /* Out: Divisor Latch Low (DLAB=1) */ ++#define UART_IER 1 /* In/Out: Interrupt Enable Register (DLAB=0) */ ++#define UART_DLM 1 /* Out: Divisor Latch High (DLAB=1) */ ++#define UART_IIR 2 /* In: Interrupt Identity Register */ ++#define UART_FCR 2 /* Out: FIFO Control Register */ ++#define UART_LCR 3 /* Out: Line Control Register */ ++#define UART_MCR 4 /* Out: Modem Control Register */ ++#define UART_LSR 5 /* In: Line Status Register */ ++#define UART_MSR 6 /* In: Modem Status Register */ ++#define UART_SCR 7 /* I/O: Scratch Register */ ++#define UART_LCR_DLAB 0x80 /* Divisor latch access bit */ ++#define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */ ++#define UART_MCR_OUT2 0x08 /* MCR GPIO out 2 */ ++#define UART_MCR_LOOP 0x10 /* Enable loopback test mode */ ++#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ ++#define UART_LSR_RXRDY 0x01 /* Receiver ready */ ++#define UART_FCR_FIFO_ENABLE 1 /* FIFO control register bit controlling FIFO enable/disable */ ++ ++/* Interrupt Enable Register (IER) bits */ ++#define UART_IER_EDSSI 8 /* enable modem status interrupt */ ++#define UART_IER_ELSI 4 /* enable receiver line status interrupt */ ++#define UART_IER_ETBEI 2 /* enable transmitter holding register empty interrupt */ ++#define UART_IER_ERBFI 1 /* enable data available interrupt */ ++ +#endif /* _SBCHIPC_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/bcm947xx/include/sbconfig.h +diff -urN linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/bcm947xx/include/sbconfig.h --- linux.old/arch/mips/bcm947xx/include/sbconfig.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbconfig.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,342 @@ ++++ linux.dev/arch/mips/bcm947xx/include/sbconfig.h 2006-04-27 22:14:11.000000000 +0200 +@@ -0,0 +1,369 @@ +/* + * Broadcom SiliconBackplane hardware register definitions. + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sbconfig.h,v 1.1.1.11 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _SBCONFIG_H @@ -4051,6 +6595,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/b + */ +#define SB_SDRAM_BASE 0x00000000 /* Physical SDRAM */ +#define SB_PCI_MEM 0x08000000 /* Host Mode sb2pcitranslation0 (64 MB) */ ++#define SB_PCI_MEM_SZ (64 * 1024 * 1024) +#define SB_PCI_CFG 0x0c000000 /* Host Mode sb2pcitranslation1 (64 MB) */ +#define SB_SDRAM_SWAPPED 0x10000000 /* Byteswapped Physical SDRAM */ +#define SB_ENUM_BASE 0x18000000 /* Enumeration space base */ @@ -4060,13 +6605,22 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/b +#define SB_FLASH2_SZ 0x02000000 /* Size of Flash Region 2 */ + +#define SB_EXTIF_BASE 0x1f000000 /* External Interface region base address */ -+#define SB_FLASH1 0x1fc00000 /* Flash Region 1 */ -+#define SB_FLASH1_SZ 0x00400000 /* Size of Flash Region 1 */ ++#define SB_FLASH1 0x1fc00000 /* MIPS Flash Region 1 */ ++#define SB_FLASH1_SZ 0x00400000 /* MIPS Size of Flash Region 1 */ ++ ++#define SB_ROM 0x20000000 /* ARM ROM */ ++#define SB_SRAM2 0x80000000 /* ARM SRAM Region 2 */ ++#define SB_ARM_FLASH1 0xffff0000 /* ARM Flash Region 1 */ ++#define SB_ARM_FLASH1_SZ 0x00010000 /* ARM Size of Flash Region 1 */ + +#define SB_PCI_DMA 0x40000000 /* Client Mode sb2pcitranslation2 (1 GB) */ +#define SB_PCI_DMA_SZ 0x40000000 /* Client Mode sb2pcitranslation2 size in bytes */ -+#define SB_PCIE_DMA_L32 0x00000000 /* PCIE Client Mode sb2pcitranslation2 (2 ZettaBytes), low 32 bits */ -+#define SB_PCIE_DMA_H32 0x80000000 /* PCIE Client Mode sb2pcitranslation2 (2 ZettaBytes), high 32 bits */ ++#define SB_PCIE_DMA_L32 0x00000000 /* PCIE Client Mode sb2pcitranslation2 ++ * (2 ZettaBytes), low 32 bits ++ */ ++#define SB_PCIE_DMA_H32 0x80000000 /* PCIE Client Mode sb2pcitranslation2 ++ * (2 ZettaBytes), high 32 bits ++ */ +#define SB_EUART (SB_EXTIF_BASE + 0x00800000) +#define SB_LED (SB_EXTIF_BASE + 0x00900000) + @@ -4074,6 +6628,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/b +/* enumeration space related defs */ +#define SB_CORE_SIZE 0x1000 /* each core gets 4Kbytes for registers */ +#define SB_MAXCORES ((SB_ENUM_LIM - SB_ENUM_BASE)/SB_CORE_SIZE) ++#define SB_MAXFUNCS 4 /* max. # functions per core */ +#define SBCONFIGOFF 0xf00 /* core sbconfig regs are top 256bytes of regs */ +#define SBCONFIGSIZE 256 /* sizeof (sbconfig_t) */ + @@ -4107,6 +6662,16 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/b +#define SBIDLOW 0xf8 +#define SBIDHIGH 0xfc + ++/* All the previous registers are above SBCONFIGOFF, but with Sonics 2.3, we have ++ * a few registers *below* that line. I think it would be very confusing to try ++ * and change the value of SBCONFIGOFF, so I'm definig them as absolute offsets here, ++ */ ++ ++#define SBIMERRLOGA 0xea8 ++#define SBIMERRLOG 0xeb0 ++#define SBTMPORTCONNID0 0xed8 ++#define SBTMPORTLOCK0 0xef8 ++ +#ifndef _LANGUAGE_ASSEMBLY + +typedef volatile struct _sbconfig { @@ -4312,6 +6877,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/b +#define SB_VEND_BCM 0x4243 /* Broadcom's SB vendor code */ + +/* core codes */ ++#define SB_NODEV 0x700 /* Invalid coreid */ +#define SB_CC 0x800 /* chipcommon core */ +#define SB_ILINE20 0x801 /* iline20 core */ +#define SB_SDRAM 0x803 /* sdram core */ @@ -4324,6 +6890,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/b +#define SB_ILINE100 0x80a /* iline100 core */ +#define SB_IPSEC 0x80b /* ipsec core */ +#define SB_PCMCIA 0x80d /* pcmcia core */ ++#define SB_SDIOD SB_PCMCIA /* pcmcia core has sdio device */ +#define SB_SOCRAM 0x80e /* internal memory core */ +#define SB_MEMC 0x80f /* memc sdram core */ +#define SB_EXTIF 0x811 /* external interface core */ @@ -4339,8 +6906,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/b +#define SB_SATAXOR 0x81e /* serial ATA & XOR DMA core */ +#define SB_GIGETH 0x81f /* gigabit ethernet core */ +#define SB_PCIE 0x820 /* pci express core */ ++#define SB_MIMO 0x821 /* MIMO phy core */ +#define SB_SRAMC 0x822 /* SRAM controller core */ +#define SB_MINIMAC 0x823 /* MINI MAC/phy core */ ++#define SB_ARM11 0x824 /* ARM 1176 core */ ++#define SB_ARM7 0x825 /* ARM 7tdmi core */ + +#define SB_CC_IDX 0 /* chipc, when present, is always core 0 */ + @@ -4364,10 +6934,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/b +#define BISZ_SIZE 7 /* descriptor size in 32-bit intergers */ + +#endif /* _SBCONFIG_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bcm947xx/include/sbextif.h +diff -urN linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bcm947xx/include/sbextif.h --- linux.old/arch/mips/bcm947xx/include/sbextif.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbextif.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,242 @@ ++++ linux.dev/arch/mips/bcm947xx/include/sbextif.h 2006-04-27 22:13:03.000000000 +0200 +@@ -0,0 +1,243 @@ +/* + * Hardware-specific External Interface I/O core definitions + * for the BCM47xx family of SiliconBackplane-based chips. @@ -4382,14 +6952,15 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bc + * The external interface core also contains 2 on-chip 16550 UARTs, clock + * frequency control, a watchdog interrupt timer, and a GPIO interface. + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sbextif.h,v 1.1.1.8 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _SBEXTIF_H @@ -4610,22 +7181,73 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bc +#define CC_CLOCK_BASE 24000000 /* Half the clock freq. in the 4710 */ + +#endif /* _SBEXTIF_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm947xx/include/sbmemc.h +diff -urN linux.old/arch/mips/bcm947xx/include/sbhndmips.h linux.dev/arch/mips/bcm947xx/include/sbhndmips.h +--- linux.old/arch/mips/bcm947xx/include/sbhndmips.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/sbhndmips.h 2006-04-27 20:43:56.000000000 +0200 +@@ -0,0 +1,47 @@ ++/* ++ * Broadcom SiliconBackplane MIPS definitions ++ * ++ * SB MIPS cores are custom MIPS32 processors with SiliconBackplane ++ * OCP interfaces. The CP0 processor ID is 0x00024000, where bits ++ * 23:16 mean Broadcom and bits 15:8 mean a MIPS core with an OCP ++ * interface. The core revision is stored in the SB ID register in SB ++ * configuration space. ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sbhndmips.h,v 1.1.1.1 2006/02/27 03:43:16 honor Exp $ ++ */ ++ ++#ifndef _sbhndmips_h_ ++#define _sbhndmips_h_ ++ ++#include <mipsinc.h> ++ ++#ifndef _LANGUAGE_ASSEMBLY ++ ++/* cpp contortions to concatenate w/arg prescan */ ++#ifndef PAD ++#define _PADLINE(line) pad ## line ++#define _XSTR(line) _PADLINE(line) ++#define PAD _XSTR(__LINE__) ++#endif /* PAD */ ++ ++typedef volatile struct { ++ uint32 corecontrol; ++ uint32 PAD[2]; ++ uint32 biststatus; ++ uint32 PAD[4]; ++ uint32 intstatus; ++ uint32 intmask; ++ uint32 timer; ++} mipsregs_t; ++ ++#endif /* _LANGUAGE_ASSEMBLY */ ++ ++#endif /* _sbhndmips_h_ */ +diff -urN linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm947xx/include/sbmemc.h --- linux.old/arch/mips/bcm947xx/include/sbmemc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbmemc.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,148 @@ ++++ linux.dev/arch/mips/bcm947xx/include/sbmemc.h 2006-04-27 22:12:41.000000000 +0200 +@@ -0,0 +1,147 @@ +/* + * BCM47XX Sonics SiliconBackplane DDR/SDRAM controller core hardware definitions. + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: sbmemc.h,v 1.6 2006/03/02 12:33:44 honor Exp $ + */ + +#ifndef _SBMEMC_H @@ -4655,8 +7277,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm +#define MEMC_BARRIER 0x50 +#define MEMC_CORE 0x54 + -+ -+#else ++#else /* !_LANGUAGE_ASSEMBLY */ + +/* Sonics side: MEMC core registers */ +typedef volatile struct sbmemcregs { @@ -4684,7 +7305,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm + uint32 core; +} sbmemcregs_t; + -+#endif ++#endif /* _LANGUAGE_ASSEMBLY */ + +/* MEMC Core Init values (OCP ID 0x80f) */ + @@ -4762,20 +7383,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm +#define MEMC_CONFIG_DDR 0x00000001 + +#endif /* _SBMEMC_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm947xx/include/sbmips.h ---- linux.old/arch/mips/bcm947xx/include/sbmips.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbmips.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,62 @@ +diff -urN linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm947xx/include/sbpci.h +--- linux.old/arch/mips/bcm947xx/include/sbpci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/sbpci.h 2006-05-02 17:20:14.000000000 +0200 +@@ -0,0 +1,114 @@ +/* -+ * Broadcom SiliconBackplane MIPS definitions ++ * HND SiliconBackplane PCI core hardware definitions. + * -+ * SB MIPS cores are custom MIPS32 processors with SiliconBackplane -+ * OCP interfaces. The CP0 processor ID is 0x00024000, where bits -+ * 23:16 mean Broadcom and bits 15:8 mean a MIPS core with an OCP -+ * interface. The core revision is stored in the SB ID register in SB -+ * configuration space. -+ * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -4783,13 +7398,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: sbpci.h,v 1.1.1.11 2006/02/27 03:43:16 honor Exp $ + */ + -+#ifndef _SBMIPS_H -+#define _SBMIPS_H -+ -+#include <mipsinc.h> ++#ifndef _sbpci_h_ ++#define _sbpci_h_ + +#ifndef _LANGUAGE_ASSEMBLY + @@ -4798,61 +7411,6 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm +#define _PADLINE(line) pad ## line +#define _XSTR(line) _PADLINE(line) +#define PAD _XSTR(__LINE__) -+#endif /* PAD */ -+ -+typedef volatile struct { -+ uint32 corecontrol; -+ uint32 PAD[2]; -+ uint32 biststatus; -+ uint32 PAD[4]; -+ uint32 intstatus; -+ uint32 intmask; -+ uint32 timer; -+} mipsregs_t; -+ -+extern uint32 sb_flag(sb_t *sbh); -+extern uint sb_irq(sb_t *sbh); -+ -+extern void BCMINIT(sb_serial_init)(sb_t *sbh, void (*add)(void *regs, uint irq, uint baud_base, uint reg_shift)); -+ -+extern void *sb_jtagm_init(sb_t *sbh, uint clkd, bool exttap); -+extern void sb_jtagm_disable(void *h); -+extern uint32 jtag_rwreg(void *h, uint32 ir, uint32 dr); -+extern void BCMINIT(sb_mips_init)(sb_t *sbh); -+extern uint32 BCMINIT(sb_mips_clock)(sb_t *sbh); -+extern bool BCMINIT(sb_mips_setclock)(sb_t *sbh, uint32 mipsclock, uint32 sbclock, uint32 pciclock); -+extern void BCMINIT(enable_pfc)(uint32 mode); -+extern uint32 BCMINIT(sb_memc_get_ncdl)(sb_t *sbh); -+ -+ -+#endif /* _LANGUAGE_ASSEMBLY */ -+ -+#endif /* _SBMIPS_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm947xx/include/sbpci.h ---- linux.old/arch/mips/bcm947xx/include/sbpci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbpci.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,122 @@ -+/* -+ * BCM47XX Sonics SiliconBackplane PCI core hardware definitions. -+ * -+ * $Id$ -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ */ -+ -+#ifndef _SBPCI_H -+#define _SBPCI_H -+ -+/* cpp contortions to concatenate w/arg prescan */ -+#ifndef PAD -+#define _PADLINE(line) pad ## line -+#define _XSTR(line) _PADLINE(line) -+#define PAD _XSTR(__LINE__) +#endif + +/* Sonics side: PCI core and host control registers */ @@ -4876,26 +7434,31 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm9 + uint32 sbtopci0; /* Sonics to PCI translation 0 */ + uint32 sbtopci1; /* Sonics to PCI translation 1 */ + uint32 sbtopci2; /* Sonics to PCI translation 2 */ -+ uint32 PAD[445]; ++ uint32 PAD[189]; ++ uint32 pcicfg[4][64]; /* 0x400 - 0x7FF, PCI Cfg Space (>=rev8) */ + uint16 sprom[36]; /* SPROM shadow Area */ + uint32 PAD[46]; +} sbpciregs_t; + ++#endif /* _LANGUAGE_ASSEMBLY */ ++ +/* PCI control */ +#define PCI_RST_OE 0x01 /* When set, drives PCI_RESET out to pin */ +#define PCI_RST 0x02 /* Value driven out to pin */ +#define PCI_CLK_OE 0x04 /* When set, drives clock as gated by PCI_CLK out to pin */ -+#define PCI_CLK 0x08 /* Gate for clock driven out to pin */ ++#define PCI_CLK 0x08 /* Gate for clock driven out to pin */ + +/* PCI arbiter control */ +#define PCI_INT_ARB 0x01 /* When set, use an internal arbiter */ +#define PCI_EXT_ARB 0x02 /* When set, use an external arbiter */ -+#define PCI_PARKID_MASK 0x06 /* Selects which agent is parked on an idle bus */ -+#define PCI_PARKID_SHIFT 1 -+#define PCI_PARKID_LAST 0 /* Last requestor */ -+#define PCI_PARKID_4710 1 /* 4710 */ -+#define PCI_PARKID_EXTREQ0 2 /* External requestor 0 */ -+#define PCI_PARKID_EXTREQ1 3 /* External requestor 1 */ ++/* ParkID - for PCI corerev >= 8 */ ++#define PCI_PARKID_MASK 0x1c /* Selects which agent is parked on an idle bus */ ++#define PCI_PARKID_SHIFT 2 ++#define PCI_PARKID_EXT0 0 /* External master 0 */ ++#define PCI_PARKID_EXT1 1 /* External master 1 */ ++#define PCI_PARKID_EXT2 2 /* External master 2 */ ++#define PCI_PARKID_INT 3 /* Internal master */ ++#define PCI_PARKID_LAST 4 /* Last active master */ + +/* Interrupt status/mask */ +#define PCI_INTA 0x01 /* PCI INTA# is asserted */ @@ -4937,38 +7500,23 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm9 +#define SRSH_PI_MASK 0xf000 /* bit 15:12 */ +#define SRSH_PI_SHIFT 12 /* bit 15:12 */ + -+/* PCI side: Reserved PCI configuration registers (see pcicfg.h) */ -+#define cap_list rsvd_a[0] -+#define bar0_window dev_dep[0x80 - 0x40] -+#define bar1_window dev_dep[0x84 - 0x40] -+#define sprom_control dev_dep[0x88 - 0x40] -+ -+#ifndef _LANGUAGE_ASSEMBLY -+ -+extern int sbpci_read_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, int len); -+extern int sbpci_write_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, int len); -+extern void sbpci_ban(uint16 core); -+extern int sbpci_init(sb_t *sbh); -+extern void sbpci_check(sb_t *sbh); -+ -+#endif /* !_LANGUAGE_ASSEMBLY */ -+ -+#endif /* _SBPCI_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcie.h linux.dev/arch/mips/bcm947xx/include/sbpcie.h ++#endif /* _sbpci_h_ */ +diff -urN linux.old/arch/mips/bcm947xx/include/sbpcie.h linux.dev/arch/mips/bcm947xx/include/sbpcie.h --- linux.old/arch/mips/bcm947xx/include/sbpcie.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbpcie.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,199 @@ ++++ linux.dev/arch/mips/bcm947xx/include/sbpcie.h 2006-04-27 20:42:22.000000000 +0200 +@@ -0,0 +1,200 @@ +/* + * BCM43XX SiliconBackplane PCIE core hardware definitions. + * -+ * $Id: -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sbpcie.h,v 1.1.1.2 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _SBPCIE_H @@ -4981,16 +7529,17 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcie.h linux.dev/arch/mips/bcm +#define PAD _XSTR(__LINE__) +#endif + -+/* PCIE Enumeration space offsets*/ ++/* PCIE Enumeration space offsets */ +#define PCIE_CORE_CONFIG_OFFSET 0x0 +#define PCIE_FUNC0_CONFIG_OFFSET 0x400 +#define PCIE_FUNC1_CONFIG_OFFSET 0x500 +#define PCIE_FUNC2_CONFIG_OFFSET 0x600 +#define PCIE_FUNC3_CONFIG_OFFSET 0x700 +#define PCIE_SPROM_SHADOW_OFFSET 0x800 -+#define PCIE_SBCONFIG_OFFSET 0xE00 ++#define PCIE_SBCONFIG_OFFSET 0xE00 + +/* PCIE Bar0 Address Mapping. Each function maps 16KB config space */ ++#define PCIE_DEV_BAR0_SIZE 0x4000 +#define PCIE_BAR0_WINMAPCORE_OFFSET 0x0 +#define PCIE_BAR0_EXTSPROM_OFFSET 0x1000 +#define PCIE_BAR0_PCIECORE_OFFSET 0x2000 @@ -4998,11 +7547,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcie.h linux.dev/arch/mips/bcm + +/* SB side: PCIE core and host control registers */ +typedef struct sbpcieregs { -+ + uint32 PAD[3]; -+ uint32 biststatus; /* bist Status: 0x00C*/ -+ uint32 PAD[6]; -+ uint32 sbtopcimailbox; /* sb to pcie mailbox: 0x028*/ ++ uint32 biststatus; /* bist Status: 0x00C */ ++ uint32 PAD[6]; ++ uint32 sbtopcimailbox; /* sb to pcie mailbox: 0x028 */ + uint32 PAD[54]; + uint32 sbtopcie0; /* sb to pcie translation 0: 0x100 */ + uint32 sbtopcie1; /* sb to pcie translation 1: 0x104 */ @@ -5010,14 +7558,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcie.h linux.dev/arch/mips/bcm + uint32 PAD[4]; + + /* pcie core supports in direct access to config space */ -+ uint32 configaddr; /* pcie config space access: Address field: 0x120*/ -+ uint32 configdata; /* pcie config space access: Data field: 0x124*/ ++ uint32 configaddr; /* pcie config space access: Address field: 0x120 */ ++ uint32 configdata; /* pcie config space access: Data field: 0x124 */ + + /* mdio access to serdes */ + uint32 mdiocontrol; /* controls the mdio access: 0x128 */ + uint32 mdiodata; /* Data to the mdio access: 0x12c */ + -+ /* pcie protocol phy/dllp/tlp register access mechanism*/ ++ /* pcie protocol phy/dllp/tlp register access mechanism */ + uint32 pcieaddr; /* address of the internal registeru: 0x130 */ + uint32 pciedata; /* Data to/from the internal regsiter: 0x134 */ + @@ -5030,20 +7578,20 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcie.h linux.dev/arch/mips/bcm +#define SBTOPCIE1_MASK 0xfc000000 +#define SBTOPCIE2_MASK 0xc0000000 + -+/* Access type bits (0:1)*/ ++/* Access type bits (0:1) */ +#define SBTOPCIE_MEM 0 +#define SBTOPCIE_IO 1 +#define SBTOPCIE_CFG0 2 +#define SBTOPCIE_CFG1 3 + -+/*Prefetch enable bit 2*/ ++/* Prefetch enable bit 2 */ +#define SBTOPCIE_PF 4 + -+/*Write Burst enable for memory write bit 3*/ -+#define SBTOPCIE_WR_BURST 8 ++/* Write Burst enable for memory write bit 3 */ ++#define SBTOPCIE_WR_BURST 8 + +/* config access */ -+#define CONFIGADDR_FUNC_MASK 0x7000 ++#define CONFIGADDR_FUNC_MASK 0x7000 +#define CONFIGADDR_FUNC_SHF 12 +#define CONFIGADDR_REG_MASK 0x0FFF +#define CONFIGADDR_REG_SHF 0 @@ -5056,78 +7604,78 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcie.h linux.dev/arch/mips/bcm +#define PCIEADDR_PL_PLP 2 + +/* PCIE protocol PHY diagnostic registers */ -+#define PCIE_PLP_MODEREG 0x200 /* Mode*/ -+#define PCIE_PLP_STATUSREG 0x204 /* Status*/ -+#define PCIE_PLP_LTSSMCTRLREG 0x208 /* LTSSM control */ -+#define PCIE_PLP_LTLINKNUMREG 0x20c /* Link Training Link number*/ -+#define PCIE_PLP_LTLANENUMREG 0x210 /* Link Training Lane number*/ ++#define PCIE_PLP_MODEREG 0x200 /* Mode */ ++#define PCIE_PLP_STATUSREG 0x204 /* Status */ ++#define PCIE_PLP_LTSSMCTRLREG 0x208 /* LTSSM control */ ++#define PCIE_PLP_LTLINKNUMREG 0x20c /* Link Training Link number */ ++#define PCIE_PLP_LTLANENUMREG 0x210 /* Link Training Lane number */ +#define PCIE_PLP_LTNFTSREG 0x214 /* Link Training N_FTS */ +#define PCIE_PLP_ATTNREG 0x218 /* Attention */ -+#define PCIE_PLP_ATTNMASKREG 0x21C /* Attention Mask */ ++#define PCIE_PLP_ATTNMASKREG 0x21C /* Attention Mask */ +#define PCIE_PLP_RXERRCTR 0x220 /* Rx Error */ -+#define PCIE_PLP_RXFRMERRCTR 0x224 /* Rx Framing Error*/ ++#define PCIE_PLP_RXFRMERRCTR 0x224 /* Rx Framing Error */ +#define PCIE_PLP_RXERRTHRESHREG 0x228 /* Rx Error threshold */ -+#define PCIE_PLP_TESTCTRLREG 0x22C /* Test Control reg*/ ++#define PCIE_PLP_TESTCTRLREG 0x22C /* Test Control reg */ +#define PCIE_PLP_SERDESCTRLOVRDREG 0x230 /* SERDES Control Override */ +#define PCIE_PLP_TIMINGOVRDREG 0x234 /* Timing param override */ -+#define PCIE_PLP_RXTXSMDIAGREG 0x238 /* RXTX State Machine Diag*/ -+#define PCIE_PLP_LTSSMDIAGREG 0x23C /* LTSSM State Machine Diag*/ ++#define PCIE_PLP_RXTXSMDIAGREG 0x238 /* RXTX State Machine Diag */ ++#define PCIE_PLP_LTSSMDIAGREG 0x23C /* LTSSM State Machine Diag */ + +/* PCIE protocol DLLP diagnostic registers */ -+#define PCIE_DLLP_LCREG 0x100 /* Link Control*/ ++#define PCIE_DLLP_LCREG 0x100 /* Link Control */ +#define PCIE_DLLP_LSREG 0x104 /* Link Status */ -+#define PCIE_DLLP_LAREG 0x108 /* Link Attention*/ ++#define PCIE_DLLP_LAREG 0x108 /* Link Attention */ +#define PCIE_DLLP_LAMASKREG 0x10C /* Link Attention Mask */ -+#define PCIE_DLLP_NEXTTXSEQNUMREG 0x110 /* Next Tx Seq Num*/ -+#define PCIE_DLLP_ACKEDTXSEQNUMREG 0x114 /* Acked Tx Seq Num*/ -+#define PCIE_DLLP_PURGEDTXSEQNUMREG 0x118 /* Purged Tx Seq Num*/ ++#define PCIE_DLLP_NEXTTXSEQNUMREG 0x110 /* Next Tx Seq Num */ ++#define PCIE_DLLP_ACKEDTXSEQNUMREG 0x114 /* Acked Tx Seq Num */ ++#define PCIE_DLLP_PURGEDTXSEQNUMREG 0x118 /* Purged Tx Seq Num */ +#define PCIE_DLLP_RXSEQNUMREG 0x11C /* Rx Sequence Number */ -+#define PCIE_DLLP_LRREG 0x120 /* Link Replay*/ -+#define PCIE_DLLP_LACKTOREG 0x124 /* Link Ack Timeout*/ -+#define PCIE_DLLP_PMTHRESHREG 0x128 /* Power Management Threshold*/ -+#define PCIE_DLLP_RTRYWPREG 0x12C /* Retry buffer write ptr*/ -+#define PCIE_DLLP_RTRYRPREG 0x130 /* Retry buffer Read ptr*/ -+#define PCIE_DLLP_RTRYPPREG 0x134 /* Retry buffer Purged ptr*/ -+#define PCIE_DLLP_RTRRWREG 0x138 /* Retry buffer Read/Write*/ ++#define PCIE_DLLP_LRREG 0x120 /* Link Replay */ ++#define PCIE_DLLP_LACKTOREG 0x124 /* Link Ack Timeout */ ++#define PCIE_DLLP_PMTHRESHREG 0x128 /* Power Management Threshold */ ++#define PCIE_DLLP_RTRYWPREG 0x12C /* Retry buffer write ptr */ ++#define PCIE_DLLP_RTRYRPREG 0x130 /* Retry buffer Read ptr */ ++#define PCIE_DLLP_RTRYPPREG 0x134 /* Retry buffer Purged ptr */ ++#define PCIE_DLLP_RTRRWREG 0x138 /* Retry buffer Read/Write */ +#define PCIE_DLLP_ECTHRESHREG 0x13C /* Error Count Threshold */ +#define PCIE_DLLP_TLPERRCTRREG 0x140 /* TLP Error Counter */ -+#define PCIE_DLLP_ERRCTRREG 0x144 /* Error Counter*/ -+#define PCIE_DLLP_NAKRXCTRREG 0x148 /* NAK Received Counter*/ ++#define PCIE_DLLP_ERRCTRREG 0x144 /* Error Counter */ ++#define PCIE_DLLP_NAKRXCTRREG 0x148 /* NAK Received Counter */ +#define PCIE_DLLP_TESTREG 0x14C /* Test */ -+#define PCIE_DLLP_PKTBIST 0x150 /* Packet BIST*/ ++#define PCIE_DLLP_PKTBIST 0x150 /* Packet BIST */ + +/* PCIE protocol TLP diagnostic registers */ +#define PCIE_TLP_CONFIGREG 0x000 /* Configuration */ +#define PCIE_TLP_WORKAROUNDSREG 0x004 /* TLP Workarounds */ -+#define PCIE_TLP_WRDMAUPPER 0x010 /* Write DMA Upper Address*/ -+#define PCIE_TLP_WRDMALOWER 0x014 /* Write DMA Lower Address*/ -+#define PCIE_TLP_WRDMAREQ_LBEREG 0x018 /* Write DMA Len/ByteEn Req*/ -+#define PCIE_TLP_RDDMAUPPER 0x01C /* Read DMA Upper Address*/ -+#define PCIE_TLP_RDDMALOWER 0x020 /* Read DMA Lower Address*/ -+#define PCIE_TLP_RDDMALENREG 0x024 /* Read DMA Len Req*/ -+#define PCIE_TLP_MSIDMAUPPER 0x028 /* MSI DMA Upper Address*/ -+#define PCIE_TLP_MSIDMALOWER 0x02C /* MSI DMA Lower Address*/ -+#define PCIE_TLP_MSIDMALENREG 0x030 /* MSI DMA Len Req*/ -+#define PCIE_TLP_SLVREQLENREG 0x034 /* Slave Request Len*/ -+#define PCIE_TLP_FCINPUTSREQ 0x038 /* Flow Control Inputs*/ -+#define PCIE_TLP_TXSMGRSREQ 0x03C /* Tx StateMachine and Gated Req*/ -+#define PCIE_TLP_ADRACKCNTARBLEN 0x040 /* Address Ack XferCnt and ARB Len*/ -+#define PCIE_TLP_DMACPLHDR0 0x044 /* DMA Completion Hdr 0*/ -+#define PCIE_TLP_DMACPLHDR1 0x048 /* DMA Completion Hdr 1*/ -+#define PCIE_TLP_DMACPLHDR2 0x04C /* DMA Completion Hdr 2*/ ++#define PCIE_TLP_WRDMAUPPER 0x010 /* Write DMA Upper Address */ ++#define PCIE_TLP_WRDMALOWER 0x014 /* Write DMA Lower Address */ ++#define PCIE_TLP_WRDMAREQ_LBEREG 0x018 /* Write DMA Len/ByteEn Req */ ++#define PCIE_TLP_RDDMAUPPER 0x01C /* Read DMA Upper Address */ ++#define PCIE_TLP_RDDMALOWER 0x020 /* Read DMA Lower Address */ ++#define PCIE_TLP_RDDMALENREG 0x024 /* Read DMA Len Req */ ++#define PCIE_TLP_MSIDMAUPPER 0x028 /* MSI DMA Upper Address */ ++#define PCIE_TLP_MSIDMALOWER 0x02C /* MSI DMA Lower Address */ ++#define PCIE_TLP_MSIDMALENREG 0x030 /* MSI DMA Len Req */ ++#define PCIE_TLP_SLVREQLENREG 0x034 /* Slave Request Len */ ++#define PCIE_TLP_FCINPUTSREQ 0x038 /* Flow Control Inputs */ ++#define PCIE_TLP_TXSMGRSREQ 0x03C /* Tx StateMachine and Gated Req */ ++#define PCIE_TLP_ADRACKCNTARBLEN 0x040 /* Address Ack XferCnt and ARB Len */ ++#define PCIE_TLP_DMACPLHDR0 0x044 /* DMA Completion Hdr 0 */ ++#define PCIE_TLP_DMACPLHDR1 0x048 /* DMA Completion Hdr 1 */ ++#define PCIE_TLP_DMACPLHDR2 0x04C /* DMA Completion Hdr 2 */ +#define PCIE_TLP_DMACPLMISC0 0x050 /* DMA Completion Misc0 */ +#define PCIE_TLP_DMACPLMISC1 0x054 /* DMA Completion Misc1 */ +#define PCIE_TLP_DMACPLMISC2 0x058 /* DMA Completion Misc2 */ -+#define PCIE_TLP_SPTCTRLLEN 0x05C /* Split Controller Req len*/ -+#define PCIE_TLP_SPTCTRLMSIC0 0x060 /* Split Controller Misc 0*/ -+#define PCIE_TLP_SPTCTRLMSIC1 0x064 /* Split Controller Misc 1*/ -+#define PCIE_TLP_BUSDEVFUNC 0x068 /* Bus/Device/Func*/ -+#define PCIE_TLP_RESETCTR 0x06C /* Reset Counter*/ -+#define PCIE_TLP_RTRYBUF 0x070 /* Retry Buffer value*/ -+#define PCIE_TLP_TGTDEBUG1 0x074 /* Target Debug Reg1*/ -+#define PCIE_TLP_TGTDEBUG2 0x078 /* Target Debug Reg2*/ -+#define PCIE_TLP_TGTDEBUG3 0x07C /* Target Debug Reg3*/ -+#define PCIE_TLP_TGTDEBUG4 0x080 /* Target Debug Reg4*/ ++#define PCIE_TLP_SPTCTRLLEN 0x05C /* Split Controller Req len */ ++#define PCIE_TLP_SPTCTRLMSIC0 0x060 /* Split Controller Misc 0 */ ++#define PCIE_TLP_SPTCTRLMSIC1 0x064 /* Split Controller Misc 1 */ ++#define PCIE_TLP_BUSDEVFUNC 0x068 /* Bus/Device/Func */ ++#define PCIE_TLP_RESETCTR 0x06C /* Reset Counter */ ++#define PCIE_TLP_RTRYBUF 0x070 /* Retry Buffer value */ ++#define PCIE_TLP_TGTDEBUG1 0x074 /* Target Debug Reg1 */ ++#define PCIE_TLP_TGTDEBUG2 0x078 /* Target Debug Reg2 */ ++#define PCIE_TLP_TGTDEBUG3 0x07C /* Target Debug Reg3 */ ++#define PCIE_TLP_TGTDEBUG4 0x080 /* Target Debug Reg4 */ + +/* MDIO control */ +#define MDIOCTL_DIVISOR_MASK 0x7f /* clock to be used on MDIO */ @@ -5157,21 +7705,22 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcie.h linux.dev/arch/mips/bcm +#define SERDES_RX_CDRBW 7 /* CDR BW */ + +#endif /* _SBPCIE_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcmcia.h linux.dev/arch/mips/bcm947xx/include/sbpcmcia.h +diff -urN linux.old/arch/mips/bcm947xx/include/sbpcmcia.h linux.dev/arch/mips/bcm947xx/include/sbpcmcia.h --- linux.old/arch/mips/bcm947xx/include/sbpcmcia.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbpcmcia.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,146 @@ ++++ linux.dev/arch/mips/bcm947xx/include/sbpcmcia.h 2006-04-27 20:29:47.000000000 +0200 +@@ -0,0 +1,147 @@ +/* + * BCM43XX Sonics SiliconBackplane PCMCIA core hardware definitions. + * -+ * $Id$ -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sbpcmcia.h,v 1.1.1.9 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _SBPCMCIA_H @@ -5280,12 +7829,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcmcia.h linux.dev/arch/mips/b +/* Subtypes of BRCM_HNBU: */ + +#define HNBU_SROMREV 0x00 /* A byte with sromrev, 1 if not present */ -+#define HNBU_CHIPID 0x01 /* Six bytes with PCI vendor & -+ * device id and chiprev ++#define HNBU_CHIPID 0x01 /* Two 16bit values: PCI vendor & device id */ ++#define HNBU_BOARDREV 0x02 /* One byte board revision */ ++#define HNBU_PAPARMS 0x03 /* PA parameters: 8 (sromrev == 1) ++ * or 9 (sromrev > 1) bytes + */ -+#define HNBU_BOARDREV 0x02 /* Two bytes board revision */ -+#define HNBU_PAPARMS 0x03 /* PA parameters: 1 (old), 8 (sreomrev == 1) -+ * or 9 (sromrev > 1) bytes */ +#define HNBU_OEM 0x04 /* Eight bytes OEM data (sromrev == 1) */ +#define HNBU_CC 0x05 /* Default country code (sromrev == 1) */ +#define HNBU_AA 0x06 /* Antennas available */ @@ -5297,6 +7845,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcmcia.h linux.dev/arch/mips/b + */ +#define HNBU_CCKPO 0x0b /* 2 byte cck power offsets in rev 3 */ +#define HNBU_OFDMPO 0x0c /* 4 byte 11g ofdm power offsets in rev 3 */ ++#define HNBU_GPIOTIMER 0x0d /* 2 bytes with on/off values in rev 3 */ + + +/* sbtmstatelow */ @@ -5307,21 +7856,22 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbpcmcia.h linux.dev/arch/mips/b +#define SBTMH_INT_STATUS 0x40000 /* sb interrupt status */ + +#endif /* _SBPCMCIA_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbsdram.h linux.dev/arch/mips/bcm947xx/include/sbsdram.h +diff -urN linux.old/arch/mips/bcm947xx/include/sbsdram.h linux.dev/arch/mips/bcm947xx/include/sbsdram.h --- linux.old/arch/mips/bcm947xx/include/sbsdram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbsdram.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,75 @@ ++++ linux.dev/arch/mips/bcm947xx/include/sbsdram.h 2006-04-27 20:36:08.000000000 +0200 +@@ -0,0 +1,85 @@ +/* + * BCM47XX Sonics SiliconBackplane SDRAM controller core hardware definitions. + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sbsdram.h,v 1.1.1.9 2006/03/02 13:03:52 honor Exp $ + */ + +#ifndef _SBSDRAM_H @@ -5338,8 +7888,17 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbsdram.h linux.dev/arch/mips/bc + uint32 pad2; +} sbsdramregs_t; + ++/* SDRAM simulation */ ++#ifdef RAMSZ ++#define SDRAMSZ RAMSZ ++#else ++#define SDRAMSZ (4 * 1024 * 1024) +#endif + ++extern uchar sdrambuf[SDRAMSZ]; ++ ++#endif /* _LANGUAGE_ASSEMBLY */ ++ +/* SDRAM initialization control (initcontrol) register bits */ +#define SDRAM_CBR 0x0001 /* Writing 1 generates refresh cycle and toggles bit */ +#define SDRAM_PRE 0x0002 /* Writing 1 generates precharge cycle and toggles bit */ @@ -5386,56 +7945,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbsdram.h linux.dev/arch/mips/bc +#define MEM8MX16X2 0xc29 /* 32 MB */ + +#endif /* _SBSDRAM_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbsocram.h linux.dev/arch/mips/bcm947xx/include/sbsocram.h +diff -urN linux.old/arch/mips/bcm947xx/include/sbsocram.h linux.dev/arch/mips/bcm947xx/include/sbsocram.h --- linux.old/arch/mips/bcm947xx/include/sbsocram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbsocram.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,37 @@ ++++ linux.dev/arch/mips/bcm947xx/include/sbsocram.h 2006-04-27 22:13:19.000000000 +0200 +@@ -0,0 +1,64 @@ +/* + * BCM47XX Sonics SiliconBackplane embedded ram core + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id$ -+ */ -+ -+#ifndef _SBSOCRAM_H -+#define _SBSOCRAM_H -+ -+#define SOCRAM_MEMSIZE 0x00 -+#define SOCRAM_BISTSTAT 0x0c -+ -+ -+#ifndef _LANGUAGE_ASSEMBLY -+ -+/* Memcsocram core registers */ -+typedef volatile struct sbsocramregs { -+ uint32 memsize; -+ uint32 biststat; -+} sbsocramregs_t; -+ -+#endif -+ -+/* Them memory size is 2 to the power of the following -+ * base added to the contents of the memsize register. -+ */ -+#define SOCRAM_MEMSIZE_BASESHIFT 16 -+ -+#endif /* _SBSOCRAM_H */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm947xx/include/sbutils.h ---- linux.old/arch/mips/bcm947xx/include/sbutils.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbutils.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,140 @@ -+/* -+ * Misc utility routines for accessing chip-specific features -+ * of Broadcom HNBU SiliconBackplane-based chips. -+ * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -5443,22 +7960,91 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bc + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: sbsocram.h,v 1.1.1.3 2006/02/27 03:43:16 honor Exp $ ++ */ ++ ++#ifndef _SBSOCRAM_H ++#define _SBSOCRAM_H ++ ++#define SR_COREINFO 0x00 ++#define SR_BWALLOC 0x04 ++#define SR_BISTSTAT 0x0c ++#define SR_BANKINDEX 0x10 ++#define SR_BANKSTBYCTL 0x14 ++ ++ ++#ifndef _LANGUAGE_ASSEMBLY ++ ++/* Memcsocram core registers */ ++typedef volatile struct sbsocramregs { ++ uint32 coreinfo; ++ uint32 bwalloc; ++ uint32 PAD; ++ uint32 biststat; ++ uint32 bankidx; ++ uint32 standbyctrl; ++} sbsocramregs_t; ++ ++#endif ++ ++/* Coreinfo register */ ++#define SRCI_PT_MASK 0x30000 ++#define SRCI_PT_SHIFT 16 ++ ++/* In corerev 0, the memory size is 2 to the power of the ++ * base plus 16 plus to the contents of the memsize field plus 1. ++ */ ++#define SRCI_MS0_MASK 0xf ++#define SR_MS0_BASE 16 ++ ++/* ++ * In corerev 1 the bank size is 2 ^ the bank size field plus 14, ++ * the memory size is number of banks times bank size. ++ * The same applies to rom size. ++ */ ++#define SRCI_ROMNB_MASK 0xf000 ++#define SRCI_ROMNB_SHIFT 12 ++#define SRCI_ROMBSZ_MASK 0xf00 ++#define SRCI_ROMBSZ_SHIFT 8 ++#define SRCI_SRNB_MASK 0xf0 ++#define SRCI_SRNB_SHIFT 4 ++#define SRCI_SRBSZ_MASK 0xf ++#define SRCI_SRBSZ_SHIFT 0 ++ ++#define SR_BSZ_BASE 14 ++#endif /* _SBSOCRAM_H */ +diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm947xx/include/sbutils.h +--- linux.old/arch/mips/bcm947xx/include/sbutils.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/include/sbutils.h 2006-04-27 23:09:25.000000000 +0200 +@@ -0,0 +1,150 @@ ++/* ++ * Misc utility routines for accessing chip-specific features ++ * of Broadcom HNBU SiliconBackplane-based chips. ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sbutils.h,v 1.4 2006/04/08 07:12:42 honor Exp $ + */ + +#ifndef _sbutils_h_ +#define _sbutils_h_ + +/* -+ * Datastructure to export all chip specific common variables -+ * public (read-only) portion of sbutils handle returned by ++ * Datastructure to export all chip specific common variables ++ * public (read-only) portion of sbutils handle returned by + * sb_attach()/sb_kattach() +*/ + +struct sb_pub { + + uint bustype; /* SB_BUS, PCI_BUS */ -+ uint buscoretype; /* SB_PCI, SB_PCMCIA, SB_PCIE*/ ++ uint buscoretype; /* SB_PCI, SB_PCMCIA, SB_PCIE */ + uint buscorerev; /* buscore rev */ + uint buscoreidx; /* buscore index */ + int ccrev; /* chip common core rev */ @@ -5480,19 +8066,21 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bc + * Use sb_setcore() or sb_setcoreidx() to change the association to another core. + */ + ++#define SB_OSH NULL /* Use for sb_kattach when no osh is available */ +/* exported externs */ -+extern sb_t * BCMINIT(sb_attach)(uint pcidev, osl_t *osh, void *regs, uint bustype, void *sdh, char **vars, int *varsz); -+extern sb_t * BCMINIT(sb_kattach)(void); ++extern sb_t *sb_attach(uint pcidev, osl_t *osh, void *regs, uint bustype, ++ void *sdh, char **vars, uint *varsz); ++extern sb_t *sb_kattach(void); +extern void sb_detach(sb_t *sbh); -+extern uint BCMINIT(sb_chip)(sb_t *sbh); -+extern uint BCMINIT(sb_chiprev)(sb_t *sbh); -+extern uint BCMINIT(sb_chipcrev)(sb_t *sbh); -+extern uint BCMINIT(sb_chippkg)(sb_t *sbh); -+extern uint BCMINIT(sb_pcirev)(sb_t *sbh); -+extern bool BCMINIT(sb_war16165)(sb_t *sbh); -+extern uint BCMINIT(sb_pcmciarev)(sb_t *sbh); -+extern uint BCMINIT(sb_boardvendor)(sb_t *sbh); -+extern uint BCMINIT(sb_boardtype)(sb_t *sbh); ++extern uint sb_chip(sb_t *sbh); ++extern uint sb_chiprev(sb_t *sbh); ++extern uint sb_chipcrev(sb_t *sbh); ++extern uint sb_chippkg(sb_t *sbh); ++extern uint sb_pcirev(sb_t *sbh); ++extern bool sb_war16165(sb_t *sbh); ++extern uint sb_pcmciarev(sb_t *sbh); ++extern uint sb_boardvendor(sb_t *sbh); ++extern uint sb_boardtype(sb_t *sbh); +extern uint sb_bus(sb_t *sbh); +extern uint sb_buscoretype(sb_t *sbh); +extern uint sb_buscorerev(sb_t *sbh); @@ -5503,17 +8091,18 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bc +extern uint sb_corevendor(sb_t *sbh); +extern uint sb_corerev(sb_t *sbh); +extern void *sb_osh(sb_t *sbh); ++extern void sb_setosh(sb_t *sbh, osl_t *osh); +extern void *sb_coreregs(sb_t *sbh); +extern uint32 sb_coreflags(sb_t *sbh, uint32 mask, uint32 val); +extern uint32 sb_coreflagshi(sb_t *sbh, uint32 mask, uint32 val); +extern bool sb_iscoreup(sb_t *sbh); +extern void *sb_setcoreidx(sb_t *sbh, uint coreidx); +extern void *sb_setcore(sb_t *sbh, uint coreid, uint coreunit); -+extern int sb_corebist(sb_t *sbh, uint coreid, uint coreunit); ++extern int sb_corebist(sb_t *sbh); +extern void sb_commit(sb_t *sbh); +extern uint32 sb_base(uint32 admatch); +extern uint32 sb_size(uint32 admatch); -+extern void sb_core_reset(sb_t *sbh, uint32 bits); ++extern void sb_core_reset(sb_t *sbh, uint32 bits, uint32 resetbits); +extern void sb_core_tofixup(sb_t *sbh); +extern void sb_core_disable(sb_t *sbh, uint32 bits); +extern uint32 sb_clock_rate(uint32 pll_type, uint32 n, uint32 m); @@ -5536,17 +8125,24 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bc +extern uint16 sb_clkctl_fast_pwrup_delay(sb_t *sbh); +extern bool sb_clkctl_clk(sb_t *sbh, uint mode); +extern int sb_clkctl_xtal(sb_t *sbh, uint what, bool on); -+extern void sb_register_intr_callback(sb_t *sbh, void *intrsoff_fn, -+ void *intrsrestore_fn, void *intrsenabled_fn, void *intr_arg); ++extern void sb_register_intr_callback(sb_t *sbh, void *intrsoff_fn, void *intrsrestore_fn, ++ void *intrsenabled_fn, void *intr_arg); +extern uint32 sb_set_initiator_to(sb_t *sbh, uint32 to); -+extern void sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice, -+ uint8 *pciclass, uint8 *pcisubclass, uint8 *pciprogif); ++extern int sb_corepciid(sb_t *sbh, uint func, uint16 *pcivendor, uint16 *pcidevice, ++ uint8 *pciclass, uint8 *pcisubclass, uint8 *pciprogif, ++ uint8 *pciheader); +extern uint sb_pcie_readreg(void *sbh, void* arg1, uint offset); +extern uint sb_pcie_writereg(sb_t *sbh, void *arg1, uint offset, uint val); +extern uint32 sb_gpiotimerval(sb_t *sbh, uint32 mask, uint32 val); ++extern bool sb_backplane64(sb_t *sbh); ++extern void sb_btcgpiowar(sb_t *sbh); + + + ++ ++extern bool sb_deviceremoved(sb_t *sbh); ++extern uint32 sb_socram_size(sb_t *sbh); ++ +/* +* Build device path. Path size must be >= SB_DEVPATH_BUFSZ. +* The returned path is NULL terminated and has trailing '/'. @@ -5555,38 +8151,38 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bc +extern int sb_devpath(sb_t *sbh, char *path, int size); + +/* clkctl xtal what flags */ -+#define XTAL 0x1 /* primary crystal oscillator (2050) */ -+#define PLL 0x2 /* main chip pll */ ++#define XTAL 0x1 /* primary crystal oscillator (2050) */ ++#define PLL 0x2 /* main chip pll */ + +/* clkctl clk mode */ -+#define CLK_FAST 0 /* force fast (pll) clock */ -+#define CLK_DYNAMIC 2 /* enable dynamic clock control */ ++#define CLK_FAST 0 /* force fast (pll) clock */ ++#define CLK_DYNAMIC 2 /* enable dynamic clock control */ + + +/* GPIO usage priorities */ -+#define GPIO_DRV_PRIORITY 0 -+#define GPIO_APP_PRIORITY 1 ++#define GPIO_DRV_PRIORITY 0 /* Driver */ ++#define GPIO_APP_PRIORITY 1 /* Application */ + +/* device path */ -+#define SB_DEVPATH_BUFSZ 16 /* min buffer size in bytes */ ++#define SB_DEVPATH_BUFSZ 16 /* min buffer size in bytes */ + +#endif /* _sbutils_h_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/sflash.h linux.dev/arch/mips/bcm947xx/include/sflash.h +diff -urN linux.old/arch/mips/bcm947xx/include/sflash.h linux.dev/arch/mips/bcm947xx/include/sflash.h --- linux.old/arch/mips/bcm947xx/include/sflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sflash.h 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/include/sflash.h 2006-04-27 22:13:51.000000000 +0200 @@ -0,0 +1,36 @@ +/* + * Broadcom SiliconBackplane chipcommon serial flash interface + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: sflash.h,v 1.1.1.8 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _sflash_h_ @@ -5611,9 +8207,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/sflash.h linux.dev/arch/mips/bcm +extern struct sflash * sflash_init(chipcregs_t *cc); + +#endif /* _sflash_h_ */ -diff -Naur linux.old/arch/mips/bcm947xx/include/trxhdr.h linux.dev/arch/mips/bcm947xx/include/trxhdr.h +diff -urN linux.old/arch/mips/bcm947xx/include/trxhdr.h linux.dev/arch/mips/bcm947xx/include/trxhdr.h --- linux.old/arch/mips/bcm947xx/include/trxhdr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/trxhdr.h 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/include/trxhdr.h 2006-04-27 19:24:19.000000000 +0200 @@ -0,0 +1,33 @@ +/* + * TRX image file header format. @@ -5648,19 +8244,19 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/trxhdr.h linux.dev/arch/mips/bcm + +/* Compatibility */ +typedef struct trx_header TRXHDR, *PTRXHDR; -diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bcm947xx/include/typedefs.h +diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bcm947xx/include/typedefs.h --- linux.old/arch/mips/bcm947xx/include/typedefs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/typedefs.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,326 @@ ++++ linux.dev/arch/mips/bcm947xx/include/typedefs.h 2006-04-27 23:47:30.000000000 +0200 +@@ -0,0 +1,361 @@ +/* -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * $Id: typedefs.h,v 1.1.1.12 2006/04/08 06:13:40 honor Exp $ + */ + +#ifndef _TYPEDEFS_H_ @@ -5682,17 +8278,19 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b + +#ifdef SITE_TYPEDEFS + -+/******************************************************************************* ++/* + * Site Specific Typedefs -+ *******************************************************************************/ ++ * ++ */ + +#include "site_typedefs.h" + +#else + -+/******************************************************************************* ++/* + * Inferred Typedefs -+ *******************************************************************************/ ++ * ++ */ + +/* Infer the compile environment based on preprocessor symbols and pramas. + * Override type definitions as needed, and include configuration dependent @@ -5727,10 +8325,19 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b +typedef ULONG_PTR uintptr; +#endif + -+#ifdef _HNDRTE_ ++ ++#if defined(_MINOSL_) ++#define _NEED_SIZE_T_ ++#endif ++ ++#if defined(_NEED_SIZE_T_) +typedef long unsigned int size_t; +#endif + ++#ifdef __DJGPP__ ++typedef long unsigned int size_t; ++#endif /* __DJGPP__ */ ++ +#ifdef _MSC_VER /* Microsoft C */ +#define TYPEDEF_INT64 +#define TYPEDEF_UINT64 @@ -5738,10 +8345,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b +typedef unsigned __int64 uint64; +#endif + -+#if defined(MACOSX) && defined(KERNEL) ++#if defined(MACOSX) +#define TYPEDEF_BOOL +#endif + ++#if defined(__NetBSD__) ++#define TYPEDEF_ULONG ++#endif ++ + +#if defined(linux) +#define TYPEDEF_UINT @@ -5749,7 +8360,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b +#define TYPEDEF_ULONG +#endif + -+#if !defined(linux) && !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) && !defined(_HNDRTE_) && !defined(_MINOSL_) ++#if !defined(linux) && !defined(_WIN32) && !defined(_CFE_) && \ ++ !defined(_HNDRTE_) && !defined(_MINOSL_) && !defined(__DJGPP__) +#define TYPEDEF_UINT +#define TYPEDEF_USHORT +#endif @@ -5762,7 +8374,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b +#endif + +/* ICL accepts unsigned 64 bit type only, and complains in ANSI mode -+ * for singned or unsigned */ ++ * for singned or unsigned ++ */ +#if defined(__ICL) + +#define TYPEDEF_INT64 @@ -5773,8 +8386,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b + +#endif /* __ICL */ + -+ -+#if !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) && !defined(_HNDRTE_) && !defined(_MINOSL_) ++#if !defined(_WIN32) && !defined(_CFE_) && !defined(_MINOSL_) && \ ++ !defined(__DJGPP__) + +/* pick up ushort & uint from standard types.h */ +#if defined(linux) && defined(__KERNEL__) @@ -5783,15 +8396,42 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b + +#else + -+#include <sys/types.h> ++#include <sys/types.h> + +#endif + -+#endif /* !_WIN32 && !PMON && !_CFE_ && !_HNDRTE_ && !_MINOSL_ */ ++#endif /* !_WIN32 && !PMON && !_CFE_ && !_HNDRTE_ && !_MINOSL_ && !__DJGPP__ */ + -+#if defined(MACOSX) && defined(KERNEL) ++#if defined(MACOSX) ++ ++#ifdef __BIG_ENDIAN__ ++#define IL_BIGENDIAN ++#else ++#ifdef IL_BIGENDIAN ++#error "IL_BIGENDIAN was defined for a little-endian compile" ++#endif ++#endif /* __BIG_ENDIAN__ */ ++ ++#if !defined(__cplusplus) ++ ++#if defined(__i386__) ++typedef unsigned char bool; ++#else ++typedef unsigned int bool; ++#endif ++#define TYPE_BOOL 1 ++enum { ++ false = 0, ++ true = 1 ++}; ++ ++#if defined(KERNEL) +#include <IOKit/IOTypes.h> -+#endif ++#endif /* KERNEL */ ++ ++#endif /* __cplusplus */ ++ ++#endif /* MACOSX */ + + +/* use the default typedefs in the next section of this file */ @@ -5800,18 +8440,19 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b +#endif /* SITE_TYPEDEFS */ + + -+/******************************************************************************* ++/* + * Default Typedefs -+ *******************************************************************************/ ++ * ++ */ + +#ifdef USE_TYPEDEF_DEFAULTS +#undef USE_TYPEDEF_DEFAULTS + +#ifndef TYPEDEF_BOOL -+typedef /*@abstract@*/ unsigned char bool; ++typedef /* @abstract@ */ unsigned char bool; +#endif + -+/*----------------------- define uchar, ushort, uint, ulong ------------------*/ ++/* define uchar, ushort, uint, ulong */ + +#ifndef TYPEDEF_UCHAR +typedef unsigned char uchar; @@ -5829,7 +8470,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b +typedef unsigned long ulong; +#endif + -+/*----------------------- define [u]int8/16/32/64, uintptr --------------------*/ ++/* define [u]int8/16/32/64, uintptr */ + +#ifndef TYPEDEF_UINT8 +typedef unsigned char uint8; @@ -5867,7 +8508,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b +typedef signed long long int64; +#endif + -+/*----------------------- define float32/64, float_t -----------------------*/ ++/* define float32/64, float_t */ + +#ifndef TYPEDEF_FLOAT32 +typedef float float32; @@ -5893,14 +8534,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b + +#endif /* TYPEDEF_FLOAT_T */ + -+/*----------------------- define macro values -----------------------------*/ ++/* define macro values */ + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef TRUE -+#define TRUE 1 ++#define TRUE 1 /* TRUE */ +#endif + +#ifndef NULL @@ -5912,31 +8553,15 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b +#endif + +#ifndef ON -+#define ON 1 ++#define ON 1 /* ON = 1 */ +#endif + -+#define AUTO (-1) ++#define AUTO (-1) /* Auto = -1 */ + -+/* Reclaiming text and data : -+ The following macros specify special linker sections that can be reclaimed -+ after a system is considered 'up'. -+ */ -+#if defined(__GNUC__) && defined(BCMRECLAIM) -+extern bool bcmreclaimed; -+#define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data##_ini -+#define BCMINITFN(_fn) __attribute__ ((__section__ (".textini." #_fn))) _fn##_ini -+#define BCMINIT(_id) _id##_ini -+#else -+#define BCMINITDATA(_data) _data -+#define BCMINITFN(_fn) _fn -+#define BCMINIT(_id) _id -+#define bcmreclaimed 0 -+#endif -+ -+/*----------------------- define PTRSZ, INLINE ----------------------------*/ ++/* define PTRSZ, INLINE */ + +#ifndef PTRSZ -+#define PTRSZ sizeof (char*) ++#define PTRSZ sizeof(char*) +#endif + +#ifndef INLINE @@ -5977,11 +8602,17 @@ diff -Naur linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/b + +#endif /* USE_TYPEDEF_DEFAULTS */ + ++/* ++ * Including the bcmdefs.h here, to make sure everyone including typedefs.h ++ * gets this automatically ++*/ ++#include "bcmdefs.h" ++ +#endif /* _TYPEDEFS_H_ */ -diff -Naur linux.old/arch/mips/bcm947xx/nvram.c linux.dev/arch/mips/bcm947xx/nvram.c +diff -urN linux.old/arch/mips/bcm947xx/nvram.c linux.dev/arch/mips/bcm947xx/nvram.c --- linux.old/arch/mips/bcm947xx/nvram.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/nvram.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,320 @@ ++++ linux.dev/arch/mips/bcm947xx/nvram.c 2006-04-27 23:11:58.000000000 +0200 +@@ -0,0 +1,315 @@ +/* + * NVRAM variable manipulation (common) + * @@ -6278,13 +8909,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram.c linux.dev/arch/mips/bcm947xx/nvr +{ + struct nvram_header *header; + int ret; -+ void *osh; + -+ /* get kernel osl handler */ -+ osh = osl_attach(NULL); -+ -+ if (!(header = (struct nvram_header *) MALLOC(osh, NVRAM_SPACE))) { -+ printf("nvram_init: out of memory, malloced %d bytes\n", MALLOCED(osh)); ++ if (!(header = (struct nvram_header *) kmalloc(NVRAM_SPACE, GFP_ATOMIC))) { + return -12; /* -ENOMEM */ + } + @@ -6292,7 +8918,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram.c linux.dev/arch/mips/bcm947xx/nvr + header->magic == NVRAM_MAGIC) + BCMINIT(nvram_rehash)(header); + -+ MFREE(osh, header, NVRAM_SPACE); ++ kfree(header); + return ret; +} + @@ -6302,14 +8928,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram.c linux.dev/arch/mips/bcm947xx/nvr +{ + BCMINIT(nvram_free)(); +} -diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947xx/nvram_linux.c +diff -urN linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947xx/nvram_linux.c --- linux.old/arch/mips/bcm947xx/nvram_linux.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/nvram_linux.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,653 @@ ++++ linux.dev/arch/mips/bcm947xx/nvram_linux.c 2006-04-27 23:30:07.000000000 +0200 +@@ -0,0 +1,723 @@ +/* + * NVRAM variable manipulation (Linux kernel half) + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -6317,6 +8943,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * ++ * $Id: nvram_linux.c,v 1.19 2006/04/08 07:12:42 honor Exp $ + */ + +#include <linux/config.h> @@ -6337,13 +8964,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 +#include <asm/uaccess.h> + +#include <typedefs.h> ++#include <osl.h> +#include <bcmendian.h> +#include <bcmnvram.h> +#include <bcmutils.h> +#include <sbconfig.h> +#include <sbchipc.h> +#include <sbutils.h> -+#include <sbmips.h> ++#include <hndmips.h> +#include <sflash.h> + +/* In BSS to minimize text size and page aligned so it can be mmap()-ed */ @@ -6482,6 +9110,33 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + return NULL; +} + ++static int __init ++early_nvram_getall(char *buf, int count) ++{ ++ char *var, *end; ++ int len = 0; ++ ++ /* Too early? */ ++ if (sbh == NULL) ++ return -1; ++ ++ if (!nvram_buf[0]) ++ early_nvram_init(); ++ ++ bzero(buf, count); ++ ++ /* Write name=value\0 ... \0\0 */ ++ var = &nvram_buf[sizeof(struct nvram_header)]; ++ end = nvram_buf + sizeof(nvram_buf) - 2; ++ end[0] = end[1] = '\0'; ++ for (; *var; var += strlen(var) + 1) { ++ if ((count - len) <= (strlen(var) + 1)) ++ break; ++ len += sprintf(buf + len, "%s", var) + 1; ++ } ++ ++ return 0; ++} +#endif /* !MODULE */ + +extern char * _nvram_get(const char *name); @@ -6489,7 +9144,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 +extern int _nvram_unset(const char *name); +extern int _nvram_getall(char *buf, int count); +extern int _nvram_commit(struct nvram_header *header); -+extern int _nvram_init(void); ++extern int _nvram_init(void *sbh); +extern void _nvram_exit(void); + +/* Globals */ @@ -6620,7 +9275,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 +nvram_commit(void) +{ + char *buf; -+ size_t erasesize, len; ++ size_t erasesize, len, magic_len; + unsigned int i; + int ret; + struct nvram_header *header; @@ -6629,6 +9284,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + DECLARE_WAITQUEUE(wait, current); + wait_queue_head_t wait_q; + struct erase_info erase; ++ u_int32_t magic_offset = 0; /* Offset for writing MAGIC # */ + + if (!nvram_mtd) { + printk("nvram_commit: NVRAM not found\n"); @@ -6659,11 +9315,31 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + goto done; + } + header = (struct nvram_header *)(buf + i); ++ magic_offset = i + ((void *)&header->magic - (void *)header); + } else { + offset = nvram_mtd->size - NVRAM_SPACE; ++ magic_offset = ((void *)&header->magic - (void *)header); + header = (struct nvram_header *)buf; + } + ++ /* clear the existing magic # to mark the NVRAM as unusable ++ we can pull MAGIC bits low without erase */ ++ header->magic = NVRAM_CLEAR_MAGIC; /* All zeros magic */ ++ ++ /* Unlock sector blocks (for Intel 28F320C3B flash) , 20060309 */ ++ if(nvram_mtd->unlock) ++ nvram_mtd->unlock(nvram_mtd, offset, nvram_mtd->erasesize); ++ ++ ret = MTD_WRITE(nvram_mtd, offset + magic_offset, sizeof(header->magic), ++ &magic_len, (char *)&header->magic); ++ if (ret || magic_len != sizeof(header->magic)) { ++ printk("nvram_commit: clear MAGIC error\n"); ++ ret = -EIO; ++ goto done; ++ } ++ ++ header->magic = NVRAM_MAGIC; /* reset MAGIC before we regenerate the NVRAM, ++ otherwise we'll have an incorrect CRC */ + /* Regenerate NVRAM */ + spin_lock_irqsave(&nvram_lock, flags); + ret = _nvram_commit(header); @@ -6700,6 +9376,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + } + + /* Write partition up to end of data area */ ++ header->magic = NVRAM_INVALID_MAGIC; /* All ones magic */ + offset = nvram_mtd->size - erasesize; + i = erasesize - NVRAM_SPACE + header->len; + ret = MTD_WRITE(nvram_mtd, offset, i, &len, buf); @@ -6709,12 +9386,27 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + goto done; + } + ++ /* Now mark the NVRAM in flash as "valid" by setting the correct ++ MAGIC # */ ++ header->magic = NVRAM_MAGIC; ++ ret = MTD_WRITE(nvram_mtd, offset + magic_offset, sizeof(header->magic), ++ &magic_len, (char *)&header->magic); ++ if (ret || magic_len != sizeof(header->magic)) { ++ printk("nvram_commit: write MAGIC error\n"); ++ ret = -EIO; ++ goto done; ++ } ++ ++ /* ++ * Reading a few bytes back here will put the device ++ * back to the correct mode on certain flashes */ + offset = nvram_mtd->size - erasesize; + ret = MTD_READ(nvram_mtd, offset, 4, &len, buf); + + done: + up(&nvram_sem); + kfree(buf); ++ + return ret; +} + @@ -6725,17 +9417,20 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + int ret; + + spin_lock_irqsave(&nvram_lock, flags); -+ ret = _nvram_getall(buf, count); ++ if (nvram_major >= 0) ++ ret = _nvram_getall(buf, count); ++ else ++ ret = early_nvram_getall(buf, count); + spin_unlock_irqrestore(&nvram_lock, flags); + + return ret; +} + -+EXPORT_SYMBOL(nvram_get); -+EXPORT_SYMBOL(nvram_getall); -+EXPORT_SYMBOL(nvram_set); -+EXPORT_SYMBOL(nvram_unset); -+EXPORT_SYMBOL(nvram_commit); ++ ++ ++ ++ ++ + +/* User mode interface below */ + @@ -6827,6 +9522,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 +{ + if (cmd != NVRAM_MAGIC) + return -EINVAL; ++ + return nvram_commit(); +} + @@ -6932,7 +9628,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + } + + /* Initialize hash table */ -+ _nvram_init(); ++ _nvram_init(sbh); + + /* Create /dev/nvram handle */ + nvram_handle = devfs_register(NULL, "nvram", DEVFS_FL_NONE, nvram_major, 0, @@ -6959,14 +9655,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/nvram_linux.c linux.dev/arch/mips/bcm947 + +module_init(dev_nvram_init); +module_exit(dev_nvram_exit); -diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/pcibios.c +diff -urN linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/pcibios.c --- linux.old/arch/mips/bcm947xx/pcibios.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/pcibios.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,355 @@ ++++ linux.dev/arch/mips/bcm947xx/pcibios.c 2006-04-27 23:42:50.000000000 +0200 +@@ -0,0 +1,380 @@ +/* + * Low-Level PCI and SB support for BCM47xx (Linux support code) + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -6974,7 +9670,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: pcibios.c,v 1.1.1.9 2006/02/27 03:42:55 honor Exp $ + */ + +#include <linux/config.h> @@ -6989,10 +9685,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p +#include <asm/paccess.h> + +#include <typedefs.h> ++#include <osl.h> +#include <bcmutils.h> +#include <sbconfig.h> +#include <sbutils.h> -+#include <sbpci.h> ++#include <hndpci.h> +#include <pcicfg.h> +#include <bcmdevs.h> +#include <bcmnvram.h> @@ -7012,7 +9709,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + int ret; + + spin_lock_irqsave(&sbh_lock, flags); -+ ret = sbpci_read_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), where, value, sizeof(*value)); ++ ret = sbpci_read_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), ++ PCI_FUNC(dev->devfn), where, value, sizeof(*value)); + spin_unlock_irqrestore(&sbh_lock, flags); + return ret ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; +} @@ -7024,7 +9722,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + int ret; + + spin_lock_irqsave(&sbh_lock, flags); -+ ret = sbpci_read_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), where, value, sizeof(*value)); ++ ret = sbpci_read_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), ++ PCI_FUNC(dev->devfn), where, value, sizeof(*value)); + spin_unlock_irqrestore(&sbh_lock, flags); + return ret ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; +} @@ -7036,7 +9735,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + int ret; + + spin_lock_irqsave(&sbh_lock, flags); -+ ret = sbpci_read_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), where, value, sizeof(*value)); ++ ret = sbpci_read_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), ++ PCI_FUNC(dev->devfn), where, value, sizeof(*value)); + spin_unlock_irqrestore(&sbh_lock, flags); + return ret ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; +} @@ -7048,7 +9748,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + int ret; + + spin_lock_irqsave(&sbh_lock, flags); -+ ret = sbpci_write_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), where, &value, sizeof(value)); ++ ret = sbpci_write_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), ++ PCI_FUNC(dev->devfn), where, &value, sizeof(value)); + spin_unlock_irqrestore(&sbh_lock, flags); + return ret ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; +} @@ -7060,7 +9761,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + int ret; + + spin_lock_irqsave(&sbh_lock, flags); -+ ret = sbpci_write_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), where, &value, sizeof(value)); ++ ret = sbpci_write_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), ++ PCI_FUNC(dev->devfn), where, &value, sizeof(value)); + spin_unlock_irqrestore(&sbh_lock, flags); + return ret ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; +} @@ -7072,7 +9774,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + int ret; + + spin_lock_irqsave(&sbh_lock, flags); -+ ret = sbpci_write_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), where, &value, sizeof(value)); ++ ret = sbpci_write_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn), ++ PCI_FUNC(dev->devfn), where, &value, sizeof(value)); + spin_unlock_irqrestore(&sbh_lock, flags); + return ret ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; +} @@ -7102,8 +9805,6 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + + set_io_port_base((unsigned long) ioremap_nocache(SB_PCI_MEM, 0x04000000)); + -+ mdelay(300); //By Joey for Atheros Card -+ + /* Scan the SB bus */ + pci_scan_bus(0, &pcibios_ops, NULL); + @@ -7133,11 +9834,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + u32 *base; + u8 irq; + -+ printk("PCI: Fixing up bus %d\n", b->number); ++ printk("PCI: Fixing up bus %d\n", b->number); + + /* Fix up SB */ + if (b->number == 0) { -+ for (ln=b->devices.next; ln != &b->devices; ln=ln->next) { ++ for (ln = b->devices.next; ln != &b->devices; ln = ln->next) { + d = pci_dev_b(ln); + /* Fix up interrupt lines */ + pci_read_config_byte(d, PCI_INTERRUPT_LINE, &irq); @@ -7148,7 +9849,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + + /* Fix up external PCI */ + else { -+ for (ln=b->devices.next; ln != &b->devices; ln=ln->next) { ++ for (ln = b->devices.next; ln != &b->devices; ln = ln->next) { + d = pci_dev_b(ln); + /* Fix up resource bases */ + for (pos = 0; pos < 6; pos++) { @@ -7156,12 +9857,13 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + base = (res->flags & IORESOURCE_IO) ? &pci_iobase : &pci_membase; + if (res->end) { + size = res->end - res->start + 1; -+ if (*base & (size - 1)) -+ *base = (*base + size) & ~(size - 1); -+ res->start = *base; -+ res->end = res->start + size - 1; -+ *base += size; -+ pci_write_config_dword(d, PCI_BASE_ADDRESS_0 + (pos << 2), res->start); ++ if (*base & (size - 1)) ++ *base = (*base + size) & ~(size - 1); ++ res->start = *base; ++ res->end = res->start + size - 1; ++ *base += size; ++ pci_write_config_dword(d, ++ PCI_BASE_ADDRESS_0 + (pos << 2), res->start); + } + /* Fix up PCI bridge BAR0 only */ + if (b->number == 1 && PCI_SLOT(d->devfn) == 0) @@ -7183,7 +9885,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + +void +pcibios_align_resource(void *data, struct resource *res, -+ unsigned long size, unsigned long align) ++ unsigned long size, unsigned long align) +{ +} + @@ -7200,7 +9902,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + + pci_read_config_word(dev, PCI_COMMAND, &cmd); + old_cmd = cmd; -+ for(idx=0; idx<6; idx++) { ++ for (idx = 0; idx < 6; idx++) { + r = &dev->resource[idx]; + if (r->flags & IORESOURCE_IO) + cmd |= PCI_COMMAND_IO; @@ -7221,6 +9923,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p +{ + ulong flags; + uint coreidx; ++ void *regs; + + /* External PCI device enable */ + if (dev->bus->number != 0) @@ -7235,7 +9938,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + + spin_lock_irqsave(&sbh_lock, flags); + coreidx = sb_coreidx(sbh); -+ if (!sb_setcoreidx(sbh, PCI_SLOT(dev->devfn))) ++ regs = sb_setcoreidx(sbh, PCI_SLOT(dev->devfn)); ++ if (!regs) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* @@ -7249,19 +9953,36 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + */ + if (sb_coreid(sbh) == SB_USB) { + sb_core_disable(sbh, sb_coreflags(sbh, 0, 0)); -+ sb_core_reset(sbh, 1 << 29); ++ sb_core_reset(sbh, 1 << 29, 0); ++ } ++ /* ++ * USB 2.0 special considerations: ++ * ++ * 1. Since the core supports both OHCI and EHCI functions, it must ++ * only be reset once. ++ * ++ * 2. In addition to the standard SB reset sequence, the Host Control ++ * Register must be programmed to bring the USB core and various ++ * phy components out of reset. ++ */ ++ else if (sb_coreid(sbh) == SB_USB20H) { ++ if (!sb_iscoreup(sbh)) { ++ sb_core_reset(sbh, 0, 0); ++ writel(0x7FF, (ulong)regs + 0x200); ++ udelay(1); ++ } + } else -+ sb_core_reset(sbh, 0); ++ sb_core_reset(sbh, 0, 0); + + sb_setcoreidx(sbh, coreidx); + spin_unlock_irqrestore(&sbh_lock, flags); -+ ++ + return 0; +} + +void +pcibios_update_resource(struct pci_dev *dev, struct resource *root, -+ struct resource *res, int resource) ++ struct resource *res, int resource) +{ + unsigned long where, size; + u32 reg; @@ -7318,9 +10039,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/p + pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); +} + -diff -Naur linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom.c +diff -urN linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom.c --- linux.old/arch/mips/bcm947xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/prom.c 2006-04-06 15:34:14.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/prom.c 2006-04-27 19:24:19.000000000 +0200 @@ -0,0 +1,41 @@ +/* + * Early initialization code for BCM94710 boards @@ -7363,14 +10084,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom +prom_free_prom_memory(void) +{ +} -diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sbmips.c +diff -urN linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sbmips.c --- linux.old/arch/mips/bcm947xx/sbmips.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/sbmips.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,1038 @@ ++++ linux.dev/arch/mips/bcm947xx/sbmips.c 2006-05-02 04:43:13.000000000 +0200 +@@ -0,0 +1,1132 @@ +/* + * BCM47XX Sonics SiliconBackplane MIPS core routines + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -7378,244 +10099,27 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: hndmips.c,v 1.1.1.1 2006/02/27 03:43:16 honor Exp $ + */ + +#include <typedefs.h> ++#include <bcmdefs.h> +#include <osl.h> ++#include <bcmutils.h> +#include <sbutils.h> +#include <bcmdevs.h> +#include <bcmnvram.h> -+#include <bcmutils.h> -+#include <hndmips.h> +#include <sbconfig.h> +#include <sbextif.h> +#include <sbchipc.h> +#include <sbmemc.h> +#include <mipsinc.h> -+#include <sbutils.h> -+ -+/* -+ * Returns TRUE if an external UART exists at the given base -+ * register. -+ */ -+static bool -+BCMINITFN(serial_exists)(uint8 *regs) -+{ -+ uint8 save_mcr, status1; -+ -+ save_mcr = R_REG(®s[UART_MCR]); -+ W_REG(®s[UART_MCR], UART_MCR_LOOP | 0x0a); -+ status1 = R_REG(®s[UART_MSR]) & 0xf0; -+ W_REG(®s[UART_MCR], save_mcr); -+ -+ return (status1 == 0x90); -+} -+ -+/* -+ * Initializes UART access. The callback function will be called once -+ * per found UART. -+ */ -+void -+BCMINITFN(sb_serial_init)(sb_t *sbh, void (*add)(void *regs, uint irq, uint baud_base, uint reg_shift)) -+{ -+ void *regs; -+ ulong base; -+ uint irq; -+ int i, n; -+ -+ if ((regs = sb_setcore(sbh, SB_EXTIF, 0))) { -+ extifregs_t *eir = (extifregs_t *) regs; -+ sbconfig_t *sb; -+ -+ /* Determine external UART register base */ -+ sb = (sbconfig_t *)((ulong) eir + SBCONFIGOFF); -+ base = EXTIF_CFGIF_BASE(sb_base(R_REG(&sb->sbadmatch1))); -+ -+ /* Determine IRQ */ -+ irq = sb_irq(sbh); -+ -+ /* Disable GPIO interrupt initially */ -+ W_REG(&eir->gpiointpolarity, 0); -+ W_REG(&eir->gpiointmask, 0); -+ -+ /* Search for external UARTs */ -+ n = 2; -+ for (i = 0; i < 2; i++) { -+ regs = (void *) REG_MAP(base + (i * 8), 8); -+ if (BCMINIT(serial_exists)(regs)) { -+ /* Set GPIO 1 to be the external UART IRQ */ -+ W_REG(&eir->gpiointmask, 2); -+ if (add) -+ add(regs, irq, 13500000, 0); -+ } -+ } -+ -+ /* Add internal UART if enabled */ -+ if (R_REG(&eir->corecontrol) & CC_UE) -+ if (add) -+ add((void *) &eir->uartdata, irq, sb_clock(sbh), 2); -+ } else if ((regs = sb_setcore(sbh, SB_CC, 0))) { -+ chipcregs_t *cc = (chipcregs_t *) regs; -+ uint32 rev, cap, pll, baud_base, div; -+ -+ /* Determine core revision and capabilities */ -+ rev = sb_corerev(sbh); -+ cap = R_REG(&cc->capabilities); -+ pll = cap & CAP_PLL_MASK; -+ -+ /* Determine IRQ */ -+ irq = sb_irq(sbh); -+ -+ if (pll == PLL_TYPE1) { -+ /* PLL clock */ -+ baud_base = sb_clock_rate(pll, -+ R_REG(&cc->clockcontrol_n), -+ R_REG(&cc->clockcontrol_m2)); -+ div = 1; -+ } else { -+ if (rev >= 11) { -+ /* Fixed ALP clock */ -+ baud_base = 20000000; -+ div = 1; -+ /* Set the override bit so we don't divide it */ -+ W_REG(&cc->corecontrol, CC_UARTCLKO); -+ } else if (rev >= 3) { -+ /* Internal backplane clock */ -+ baud_base = sb_clock(sbh); -+ div = 2; /* Minimum divisor */ -+ W_REG(&cc->clkdiv, -+ ((R_REG(&cc->clkdiv) & ~CLKD_UART) | div)); -+ } else { -+ /* Fixed internal backplane clock */ -+ baud_base = 88000000; -+ div = 48; -+ } -+ -+ /* Clock source depends on strapping if UartClkOverride is unset */ -+ if ((rev > 0) && -+ ((R_REG(&cc->corecontrol) & CC_UARTCLKO) == 0)) { -+ if ((cap & CAP_UCLKSEL) == CAP_UINTCLK) { -+ /* Internal divided backplane clock */ -+ baud_base /= div; -+ } else { -+ /* Assume external clock of 1.8432 MHz */ -+ baud_base = 1843200; -+ } -+ } -+ } -+ -+ /* Add internal UARTs */ -+ n = cap & CAP_UARTS_MASK; -+ for (i = 0; i < n; i++) { -+ /* Register offset changed after revision 0 */ -+ if (rev) -+ regs = (void *)((ulong) &cc->uart0data + (i * 256)); -+ else -+ regs = (void *)((ulong) &cc->uart0data + (i * 8)); -+ -+ if (add) -+ add(regs, irq, baud_base, 0); -+ } -+ } -+} -+ -+/* -+ * Initialize jtag master and return handle for -+ * jtag_rwreg. Returns NULL on failure. -+ */ -+void * -+sb_jtagm_init(sb_t *sbh, uint clkd, bool exttap) -+{ -+ void *regs; -+ -+ if ((regs = sb_setcore(sbh, SB_CC, 0)) != NULL) { -+ chipcregs_t *cc = (chipcregs_t *) regs; -+ uint32 tmp; -+ -+ /* -+ * Determine jtagm availability from -+ * core revision and capabilities. -+ */ -+ tmp = sb_corerev(sbh); -+ /* -+ * Corerev 10 has jtagm, but the only chip -+ * with it does not have a mips, and -+ * the layout of the jtagcmd register is -+ * different. We'll only accept >= 11. -+ */ -+ if (tmp < 11) -+ return (NULL); -+ -+ tmp = R_REG(&cc->capabilities); -+ if ((tmp & CAP_JTAGP) == 0) -+ return (NULL); -+ -+ /* Set clock divider if requested */ -+ if (clkd != 0) { -+ tmp = R_REG(&cc->clkdiv); -+ tmp = (tmp & ~CLKD_JTAG) | -+ ((clkd << CLKD_JTAG_SHIFT) & CLKD_JTAG); -+ W_REG(&cc->clkdiv, tmp); -+ } -+ -+ /* Enable jtagm */ -+ tmp = JCTRL_EN | (exttap ? JCTRL_EXT_EN : 0); -+ W_REG(&cc->jtagctrl, tmp); -+ } -+ -+ return (regs); -+} -+ -+void -+sb_jtagm_disable(void *h) -+{ -+ chipcregs_t *cc = (chipcregs_t *)h; -+ -+ W_REG(&cc->jtagctrl, R_REG(&cc->jtagctrl) & ~JCTRL_EN); -+} -+ -+/* -+ * Read/write a jtag register. Assumes a target with -+ * 8 bit IR and 32 bit DR. -+ */ -+#define IRWIDTH 8 -+#define DRWIDTH 32 -+uint32 -+jtag_rwreg(void *h, uint32 ir, uint32 dr) -+{ -+ chipcregs_t *cc = (chipcregs_t *) h; -+ uint32 tmp; -+ -+ W_REG(&cc->jtagir, ir); -+ W_REG(&cc->jtagdr, dr); -+ tmp = JCMD_START | JCMD_ACC_IRDR | -+ ((IRWIDTH - 1) << JCMD_IRW_SHIFT) | -+ (DRWIDTH - 1); -+ W_REG(&cc->jtagcmd, tmp); -+ while (((tmp = R_REG(&cc->jtagcmd)) & JCMD_BUSY) == JCMD_BUSY) { -+ /* OSL_DELAY(1); */ -+ } -+ -+ tmp = R_REG(&cc->jtagdr); -+ return (tmp); -+} -+ -+/* Returns the SB interrupt flag of the current core. */ -+uint32 -+sb_flag(sb_t *sbh) -+{ -+ void *regs; -+ sbconfig_t *sb; -+ -+ regs = sb_coreregs(sbh); -+ sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); -+ -+ return (R_REG(&sb->sbtpsflag) & SBTPS_NUM0_MASK); -+} ++#include <sbhndmips.h> ++#include <hndcpu.h> + ++/* sbipsflag register format, indexed by irq. */ +static const uint32 sbips_int_mask[] = { -+ 0, ++ 0, /* placeholder */ + SBIPS_INT1_MASK, + SBIPS_INT2_MASK, + SBIPS_INT3_MASK, @@ -7623,27 +10127,53 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb +}; + +static const uint32 sbips_int_shift[] = { -+ 0, -+ 0, ++ 0, /* placeholder */ ++ SBIPS_INT1_SHIFT, + SBIPS_INT2_SHIFT, + SBIPS_INT3_SHIFT, + SBIPS_INT4_SHIFT +}; + +/* ++ * Map SB cores sharing the MIPS hardware IRQ0 to virtual dedicated OS IRQs. ++ * Per-port BSP code is required to provide necessary translations between ++ * the shared MIPS IRQ and the virtual OS IRQs based on SB core flag. ++ * ++ * See sb_irq() for the mapping. ++ */ ++static uint shirq_map_base = 0; ++ ++/* Returns the SB interrupt flag of the current core. */ ++static uint32 ++sb_getflag(sb_t *sbh) ++{ ++ osl_t *osh; ++ void *regs; ++ sbconfig_t *sb; ++ ++ osh = sb_osh(sbh); ++ regs = sb_coreregs(sbh); ++ sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); ++ ++ return (R_REG(osh, &sb->sbtpsflag) & SBTPS_NUM0_MASK); ++} ++ ++/* + * Returns the MIPS IRQ assignment of the current core. If unassigned, + * 0 is returned. + */ +uint +sb_irq(sb_t *sbh) +{ ++ osl_t *osh; + uint idx; + void *regs; + sbconfig_t *sb; + uint32 flag, sbipsflag; + uint irq = 0; + -+ flag = sb_flag(sbh); ++ osh = sb_osh(sbh); ++ flag = sb_getflag(sbh); + + idx = sb_coreidx(sbh); + @@ -7652,7 +10182,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); + + /* sbipsflag specifies which core is routed to interrupts 1 to 4 */ -+ sbipsflag = R_REG(&sb->sbipsflag); ++ sbipsflag = R_REG(osh, &sb->sbipsflag); + for (irq = 1; irq <= 4; irq++) { + if (((sbipsflag & sbips_int_mask[irq]) >> sbips_int_shift[irq]) == flag) + break; @@ -7670,63 +10200,83 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb +static void +BCMINITFN(sb_clearirq)(sb_t *sbh, uint irq) +{ ++ osl_t *osh; + void *regs; + sbconfig_t *sb; + ++ osh = sb_osh(sbh); ++ + if (!(regs = sb_setcore(sbh, SB_MIPS, 0)) && + !(regs = sb_setcore(sbh, SB_MIPS33, 0))) + ASSERT(regs); + sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); + + if (irq == 0) -+ W_REG(&sb->sbintvec, 0); ++ W_REG(osh, &sb->sbintvec, 0); + else -+ OR_REG(&sb->sbipsflag, sbips_int_mask[irq]); ++ OR_REG(osh, &sb->sbipsflag, sbips_int_mask[irq]); +} + +/* + * Assigns the specified MIPS IRQ to the specified core. Shared MIPS + * IRQ 0 may be assigned more than once. ++ * ++ * The old assignment to the specified core is removed first. + */ +static void +BCMINITFN(sb_setirq)(sb_t *sbh, uint irq, uint coreid, uint coreunit) +{ ++ osl_t *osh; + void *regs; + sbconfig_t *sb; + uint32 flag; ++ uint oldirq; ++ ++ osh = sb_osh(sbh); + + regs = sb_setcore(sbh, coreid, coreunit); + ASSERT(regs); -+ flag = sb_flag(sbh); ++ flag = sb_getflag(sbh); ++ oldirq = sb_irq(sbh); ++ if (oldirq) ++ sb_clearirq(sbh, oldirq); + + if (!(regs = sb_setcore(sbh, SB_MIPS, 0)) && + !(regs = sb_setcore(sbh, SB_MIPS33, 0))) + ASSERT(regs); + sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); + ++ if (!oldirq) ++ AND_REG(osh, &sb->sbintvec, ~(1 << flag)); ++ + if (irq == 0) -+ OR_REG(&sb->sbintvec, 1 << flag); ++ OR_REG(osh, &sb->sbintvec, 1 << flag); + else { + flag <<= sbips_int_shift[irq]; + ASSERT(!(flag & ~sbips_int_mask[irq])); -+ flag |= R_REG(&sb->sbipsflag) & ~sbips_int_mask[irq]; -+ W_REG(&sb->sbipsflag, flag); ++ flag |= R_REG(osh, &sb->sbipsflag) & ~sbips_int_mask[irq]; ++ W_REG(osh, &sb->sbipsflag, flag); + } +} + +/* + * Initializes clocks and interrupts. SB and NVRAM access must be + * initialized prior to calling. ++ * ++ * 'shirqmap' enables virtual dedicated OS IRQ mapping if non-zero. + */ +void -+BCMINITFN(sb_mips_init)(sb_t *sbh) ++BCMINITFN(sb_mips_init)(sb_t *sbh, uint shirqmap) +{ ++ osl_t *osh; + ulong hz, ns, tmp; + extifregs_t *eir; + chipcregs_t *cc; + char *value; + uint irq; + ++ osh = sb_osh(sbh); ++ + /* Figure out current SB clock speed */ + if ((hz = sb_clock(sbh)) == 0) + hz = 100000000; @@ -7735,85 +10285,85 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + /* Setup external interface timing */ + if ((eir = sb_setcore(sbh, SB_EXTIF, 0))) { + /* Initialize extif so we can get to the LEDs and external UART */ -+ W_REG(&eir->prog_config, CF_EN); ++ W_REG(osh, &eir->prog_config, CF_EN); + + /* Set timing for the flash */ + tmp = CEIL(10, ns) << FW_W3_SHIFT; /* W3 = 10nS */ + tmp = tmp | (CEIL(40, ns) << FW_W1_SHIFT); /* W1 = 40nS */ + tmp = tmp | CEIL(120, ns); /* W0 = 120nS */ -+ W_REG(&eir->prog_waitcount, tmp); /* 0x01020a0c for a 100Mhz clock */ ++ W_REG(osh, &eir->prog_waitcount, tmp); /* 0x01020a0c for a 100Mhz clock */ + + /* Set programmable interface timing for external uart */ + tmp = CEIL(10, ns) << FW_W3_SHIFT; /* W3 = 10nS */ + tmp = tmp | (CEIL(20, ns) << FW_W2_SHIFT); /* W2 = 20nS */ + tmp = tmp | (CEIL(100, ns) << FW_W1_SHIFT); /* W1 = 100nS */ + tmp = tmp | CEIL(120, ns); /* W0 = 120nS */ -+ W_REG(&eir->prog_waitcount, tmp); /* 0x01020a0c for a 100Mhz clock */ ++ W_REG(osh, &eir->prog_waitcount, tmp); /* 0x01020a0c for a 100Mhz clock */ + } else if ((cc = sb_setcore(sbh, SB_CC, 0))) { + /* Set timing for the flash */ + tmp = CEIL(10, ns) << FW_W3_SHIFT; /* W3 = 10nS */ + tmp |= CEIL(10, ns) << FW_W1_SHIFT; /* W1 = 10nS */ + tmp |= CEIL(120, ns); /* W0 = 120nS */ -+ -+ // Added by Chen-I for 5365 -+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) -+ { -+ W_REG(&cc->flash_waitcount, tmp); -+ W_REG(&cc->pcmcia_memwait, tmp); -+ } -+ else -+ { -+ if (sb_corerev(sbh) < 9) -+ W_REG(&cc->flash_waitcount, tmp); ++ if ((sb_corerev(sbh) < 9) || ++ (BCMINIT(sb_chip)(sbh) == 0x5365)) ++ W_REG(osh, &cc->flash_waitcount, tmp); + -+ if ((sb_corerev(sbh) < 9) || -+ ((BCMINIT(sb_chip)(sbh) == BCM5350_DEVICE_ID) && BCMINIT(sb_chiprev)(sbh) == 0)) { -+ W_REG(&cc->pcmcia_memwait, tmp); -+ } ++ if ((sb_corerev(sbh) < 9) || ++ ((sb_chip(sbh) == BCM5350_CHIP_ID) && sb_chiprev(sbh) == 0) || ++ (BCMINIT(sb_chip)(sbh) == 0x5365)) { ++ W_REG(osh, &cc->pcmcia_memwait, tmp); + } ++ ++ /* Save shared IRQ mapping base */ ++ shirq_map_base = shirqmap; + } + + /* Chip specific initialization */ -+ switch (BCMINIT(sb_chip)(sbh)) { -+ case BCM4710_DEVICE_ID: ++ switch (sb_chip(sbh)) { ++ case BCM4710_CHIP_ID: + /* Clear interrupt map */ + for (irq = 0; irq <= 4; irq++) -+ BCMINIT(sb_clearirq)(sbh, irq); -+ BCMINIT(sb_setirq)(sbh, 0, SB_CODEC, 0); -+ BCMINIT(sb_setirq)(sbh, 0, SB_EXTIF, 0); -+ BCMINIT(sb_setirq)(sbh, 2, SB_ENET, 1); -+ BCMINIT(sb_setirq)(sbh, 3, SB_ILINE20, 0); -+ BCMINIT(sb_setirq)(sbh, 4, SB_PCI, 0); ++ sb_clearirq(sbh, irq); ++ sb_setirq(sbh, 0, SB_CODEC, 0); ++ sb_setirq(sbh, 0, SB_EXTIF, 0); ++ sb_setirq(sbh, 2, SB_ENET, 1); ++ sb_setirq(sbh, 3, SB_ILINE20, 0); ++ sb_setirq(sbh, 4, SB_PCI, 0); + ASSERT(eir); -+ value = BCMINIT(nvram_get)("et0phyaddr"); ++ value = nvram_get("et0phyaddr"); + if (value && !strcmp(value, "31")) { + /* Enable internal UART */ -+ W_REG(&eir->corecontrol, CC_UE); ++ W_REG(osh, &eir->corecontrol, CC_UE); + /* Give USB its own interrupt */ -+ BCMINIT(sb_setirq)(sbh, 1, SB_USB, 0); ++ sb_setirq(sbh, 1, SB_USB, 0); + } else { + /* Disable internal UART */ -+ W_REG(&eir->corecontrol, 0); ++ W_REG(osh, &eir->corecontrol, 0); + /* Give Ethernet its own interrupt */ -+ BCMINIT(sb_setirq)(sbh, 1, SB_ENET, 0); -+ BCMINIT(sb_setirq)(sbh, 0, SB_USB, 0); ++ sb_setirq(sbh, 1, SB_ENET, 0); ++ sb_setirq(sbh, 0, SB_USB, 0); + } + break; -+ case BCM5350_DEVICE_ID: ++ case BCM5350_CHIP_ID: + /* Clear interrupt map */ + for (irq = 0; irq <= 4; irq++) -+ BCMINIT(sb_clearirq)(sbh, irq); -+ BCMINIT(sb_setirq)(sbh, 0, SB_CC, 0); -+ BCMINIT(sb_setirq)(sbh, 1, SB_D11, 0); -+ BCMINIT(sb_setirq)(sbh, 2, SB_ENET, 0); -+ BCMINIT(sb_setirq)(sbh, 3, SB_PCI, 0); -+ BCMINIT(sb_setirq)(sbh, 4, SB_USB, 0); ++ sb_clearirq(sbh, irq); ++ sb_setirq(sbh, 0, SB_CC, 0); ++ sb_setirq(sbh, 0, SB_MIPS33, 0); ++ sb_setirq(sbh, 1, SB_D11, 0); ++ sb_setirq(sbh, 2, SB_ENET, 0); ++ sb_setirq(sbh, 3, SB_PCI, 0); ++ sb_setirq(sbh, 4, SB_USB, 0); ++ break; ++ case BCM4785_CHIP_ID: ++ /* Reassign PCI to irq 4 */ ++ sb_setirq(sbh, 4, SB_PCI, 0); + break; + } +} + +uint32 -+BCMINITFN(sb_mips_clock)(sb_t *sbh) ++BCMINITFN(sb_cpu_clock)(sb_t *sbh) +{ + extifregs_t *eir; + chipcregs_t *cc; @@ -7827,36 +10377,38 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + + /* switch to extif or chipc core */ + if ((eir = (extifregs_t *) sb_setcore(sbh, SB_EXTIF, 0))) { -+ n = R_REG(&eir->clockcontrol_n); -+ m = R_REG(&eir->clockcontrol_sb); ++ n = R_REG(osh, &eir->clockcontrol_n); ++ m = R_REG(osh, &eir->clockcontrol_sb); + } else if ((cc = (chipcregs_t *) sb_setcore(sbh, SB_CC, 0))) { -+ pll_type = R_REG(&cc->capabilities) & CAP_PLL_MASK; -+ n = R_REG(&cc->clockcontrol_n); ++ pll_type = R_REG(osh, &cc->capabilities) & CAP_PLL_MASK; ++ n = R_REG(osh, &cc->clockcontrol_n); + if ((pll_type == PLL_TYPE2) || + (pll_type == PLL_TYPE4) || + (pll_type == PLL_TYPE6) || + (pll_type == PLL_TYPE7)) -+ m = R_REG(&cc->clockcontrol_mips); ++ m = R_REG(osh, &cc->clockcontrol_m3); + else if (pll_type == PLL_TYPE5) { + rate = 200000000; + goto out; + } + else if (pll_type == PLL_TYPE3) { -+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) { /* 5365 is also type3 */ ++ if (sb_chip(sbh) == BCM5365_CHIP_ID) { + rate = 200000000; + goto out; -+ } else -+ m = R_REG(&cc->clockcontrol_m2); /* 5350 uses m2 to control mips */ ++ } ++ /* 5350 uses m2 to control mips */ ++ else ++ m = R_REG(osh, &cc->clockcontrol_m2); + } else -+ m = R_REG(&cc->clockcontrol_sb); ++ m = R_REG(osh, &cc->clockcontrol_sb); + } else + goto out; + -+ // Added by Chen-I for 5365 -+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) ++ ++ /* calculate rate */ ++ if (BCMINIT(sb_chip)(sbh) == 0x5365) + rate = 100000000; + else -+ /* calculate rate */ + rate = sb_clock_rate(pll_type, n, m); + + if (pll_type == PLL_TYPE6) @@ -7874,8 +10426,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb +static void +BCMINITFN(handler)(void) +{ -+ /* Step 11 */ -+ __asm__ ( ++ __asm__( + ".set\tmips32\n\t" + "ssnop\n\t" + "ssnop\n\t" @@ -7889,8 +10440,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + "eret\n\t" + "nop\n\t" + "nop\n\t" -+ ".set\tmips0" -+ ); ++ ".set\tmips0"); +} + +/* The following MUST come right after handler() */ @@ -7901,6 +10451,9 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + +/* + * Set the MIPS, backplane and PCI clocks as closely as possible. ++ * ++ * MIPS clocks synchronization function has been moved from PLL in chipcommon ++ * core rev. 15 to a DLL inside the MIPS core in 4785. + */ +bool +BCMINITFN(sb_mips_setclock)(sb_t *sbh, uint32 mipsclock, uint32 sbclock, uint32 pciclock) @@ -7913,6 +10466,8 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + uint32 pll_type, sync_mode; + uint ic_size, ic_lsize; + uint idx, i; ++ ++ /* PLL configuration: type 1 */ + typedef struct { + uint32 mipsclock; + uint16 n; @@ -7921,36 +10476,61 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + uint32 pci25; + } n3m_table_t; + static n3m_table_t BCMINITDATA(type1_table)[] = { -+ { 96000000, 0x0303, 0x04020011, 0x11030011, 0x11050011 }, /* 96.000 32.000 24.000 */ -+ { 100000000, 0x0009, 0x04020011, 0x11030011, 0x11050011 }, /* 100.000 33.333 25.000 */ -+ { 104000000, 0x0802, 0x04020011, 0x11050009, 0x11090009 }, /* 104.000 31.200 24.960 */ -+ { 108000000, 0x0403, 0x04020011, 0x11050009, 0x02000802 }, /* 108.000 32.400 24.923 */ -+ { 112000000, 0x0205, 0x04020011, 0x11030021, 0x02000403 }, /* 112.000 32.000 24.889 */ -+ { 115200000, 0x0303, 0x04020009, 0x11030011, 0x11050011 }, /* 115.200 32.000 24.000 */ -+ { 120000000, 0x0011, 0x04020011, 0x11050011, 0x11090011 }, /* 120.000 30.000 24.000 */ -+ { 124800000, 0x0802, 0x04020009, 0x11050009, 0x11090009 }, /* 124.800 31.200 24.960 */ -+ { 128000000, 0x0305, 0x04020011, 0x11050011, 0x02000305 }, /* 128.000 32.000 24.000 */ -+ { 132000000, 0x0603, 0x04020011, 0x11050011, 0x02000305 }, /* 132.000 33.000 24.750 */ -+ { 136000000, 0x0c02, 0x04020011, 0x11090009, 0x02000603 }, /* 136.000 32.640 24.727 */ -+ { 140000000, 0x0021, 0x04020011, 0x11050021, 0x02000c02 }, /* 140.000 30.000 24.706 */ -+ { 144000000, 0x0405, 0x04020011, 0x01020202, 0x11090021 }, /* 144.000 30.857 24.686 */ -+ { 150857142, 0x0605, 0x04020021, 0x02000305, 0x02000605 }, /* 150.857 33.000 24.000 */ -+ { 152000000, 0x0e02, 0x04020011, 0x11050021, 0x02000e02 }, /* 152.000 32.571 24.000 */ -+ { 156000000, 0x0802, 0x04020005, 0x11050009, 0x11090009 }, /* 156.000 31.200 24.960 */ -+ { 160000000, 0x0309, 0x04020011, 0x11090011, 0x02000309 }, /* 160.000 32.000 24.000 */ -+ { 163200000, 0x0c02, 0x04020009, 0x11090009, 0x02000603 }, /* 163.200 32.640 24.727 */ -+ { 168000000, 0x0205, 0x04020005, 0x11030021, 0x02000403 }, /* 168.000 32.000 24.889 */ -+ { 176000000, 0x0602, 0x04020003, 0x11050005, 0x02000602 }, /* 176.000 33.000 24.000 */ -+ }; ++ /* 96.000 32.000 24.000 */ ++ { 96000000, 0x0303, 0x04020011, 0x11030011, 0x11050011 }, ++ /* 100.000 33.333 25.000 */ ++ { 100000000, 0x0009, 0x04020011, 0x11030011, 0x11050011 }, ++ /* 104.000 31.200 24.960 */ ++ { 104000000, 0x0802, 0x04020011, 0x11050009, 0x11090009 }, ++ /* 108.000 32.400 24.923 */ ++ { 108000000, 0x0403, 0x04020011, 0x11050009, 0x02000802 }, ++ /* 112.000 32.000 24.889 */ ++ { 112000000, 0x0205, 0x04020011, 0x11030021, 0x02000403 }, ++ /* 115.200 32.000 24.000 */ ++ { 115200000, 0x0303, 0x04020009, 0x11030011, 0x11050011 }, ++ /* 120.000 30.000 24.000 */ ++ { 120000000, 0x0011, 0x04020011, 0x11050011, 0x11090011 }, ++ /* 124.800 31.200 24.960 */ ++ { 124800000, 0x0802, 0x04020009, 0x11050009, 0x11090009 }, ++ /* 128.000 32.000 24.000 */ ++ { 128000000, 0x0305, 0x04020011, 0x11050011, 0x02000305 }, ++ /* 132.000 33.000 24.750 */ ++ { 132000000, 0x0603, 0x04020011, 0x11050011, 0x02000305 }, ++ /* 136.000 32.640 24.727 */ ++ { 136000000, 0x0c02, 0x04020011, 0x11090009, 0x02000603 }, ++ /* 140.000 30.000 24.706 */ ++ { 140000000, 0x0021, 0x04020011, 0x11050021, 0x02000c02 }, ++ /* 144.000 30.857 24.686 */ ++ { 144000000, 0x0405, 0x04020011, 0x01020202, 0x11090021 }, ++ /* 150.857 33.000 24.000 */ ++ { 150857142, 0x0605, 0x04020021, 0x02000305, 0x02000605 }, ++ /* 152.000 32.571 24.000 */ ++ { 152000000, 0x0e02, 0x04020011, 0x11050021, 0x02000e02 }, ++ /* 156.000 31.200 24.960 */ ++ { 156000000, 0x0802, 0x04020005, 0x11050009, 0x11090009 }, ++ /* 160.000 32.000 24.000 */ ++ { 160000000, 0x0309, 0x04020011, 0x11090011, 0x02000309 }, ++ /* 163.200 32.640 24.727 */ ++ { 163200000, 0x0c02, 0x04020009, 0x11090009, 0x02000603 }, ++ /* 168.000 32.000 24.889 */ ++ { 168000000, 0x0205, 0x04020005, 0x11030021, 0x02000403 }, ++ /* 176.000 33.000 24.000 */ ++ { 176000000, 0x0602, 0x04020003, 0x11050005, 0x02000602 }, ++ }; ++ ++ /* PLL configuration: type 3 */ + typedef struct { + uint32 mipsclock; + uint16 n; + uint32 m2; /* that is the clockcontrol_m2 */ + } type3_table_t; -+ static type3_table_t type3_table[] = { /* for 5350, mips clock is always double sb clock */ ++ static type3_table_t type3_table[] = { ++ /* for 5350, mips clock is always double sb clock */ + { 150000000, 0x311, 0x4020005 }, + { 200000000, 0x311, 0x4020003 }, -+ }; ++ }; ++ ++ /* PLL configuration: type 2, 4, 7 */ + typedef struct { + uint32 mipsclock; + uint32 sbclock; @@ -7961,71 +10541,155 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + uint32 m3; + uint32 ratio_cfg; + uint32 ratio_parm; ++ uint32 d11_r1; ++ uint32 d11_r2; + } n4m_table_t; -+ + static n4m_table_t BCMINITDATA(type2_table)[] = { -+ { 180000000, 80000000, 0x0403, 0x01010000, 0x01020300, 0x01020600, 0x05000100, 8, 0x012a00a9 }, -+ { 180000000, 90000000, 0x0403, 0x01000100, 0x01020300, 0x01000100, 0x05000100, 11, 0x0aaa0555 }, -+ { 200000000, 100000000, 0x0303, 0x02010000, 0x02040001, 0x02010000, 0x06000001, 11, 0x0aaa0555 }, -+ { 211200000, 105600000, 0x0902, 0x01000200, 0x01030400, 0x01000200, 0x05000200, 11, 0x0aaa0555 }, -+ { 220800000, 110400000, 0x1500, 0x01000200, 0x01030400, 0x01000200, 0x05000200, 11, 0x0aaa0555 }, -+ { 230400000, 115200000, 0x0604, 0x01000200, 0x01020600, 0x01000200, 0x05000200, 11, 0x0aaa0555 }, -+ { 234000000, 104000000, 0x0b01, 0x01010000, 0x01010700, 0x01020600, 0x05000100, 8, 0x012a00a9 }, -+ { 240000000, 120000000, 0x0803, 0x01000200, 0x01020600, 0x01000200, 0x05000200, 11, 0x0aaa0555 }, -+ { 252000000, 126000000, 0x0504, 0x01000100, 0x01020500, 0x01000100, 0x05000100, 11, 0x0aaa0555 }, -+ { 264000000, 132000000, 0x0903, 0x01000200, 0x01020700, 0x01000200, 0x05000200, 11, 0x0aaa0555 }, -+ { 270000000, 120000000, 0x0703, 0x01010000, 0x01030400, 0x01020600, 0x05000100, 8, 0x012a00a9 }, -+ { 276000000, 122666666, 0x1500, 0x01010000, 0x01030400, 0x01020600, 0x05000100, 8, 0x012a00a9 }, -+ { 280000000, 140000000, 0x0503, 0x01000000, 0x01010600, 0x01000000, 0x05000000, 11, 0x0aaa0555 }, -+ { 288000000, 128000000, 0x0604, 0x01010000, 0x01030400, 0x01020600, 0x05000100, 8, 0x012a00a9 }, -+ { 288000000, 144000000, 0x0404, 0x01000000, 0x01010600, 0x01000000, 0x05000000, 11, 0x0aaa0555 }, -+ { 300000000, 133333333, 0x0803, 0x01010000, 0x01020600, 0x01020600, 0x05000100, 8, 0x012a00a9 }, -+ { 300000000, 150000000, 0x0803, 0x01000100, 0x01020600, 0x01000100, 0x05000100, 11, 0x0aaa0555 } ++ { 120000000, 60000000, 0x0303, 0x01000200, 0x01000600, 0x01000200, 0x05000200, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 150000000, 75000000, 0x0303, 0x01000100, 0x01000600, 0x01000100, 0x05000100, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 180000000, 80000000, 0x0403, 0x01010000, 0x01020300, 0x01020600, 0x05000100, 8, ++ 0x012a00a9, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 180000000, 90000000, 0x0403, 0x01000100, 0x01020300, 0x01000100, 0x05000100, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 200000000, 100000000, 0x0303, 0x02010000, 0x02040001, 0x02010000, 0x06000001, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 211200000, 105600000, 0x0902, 0x01000200, 0x01030400, 0x01000200, 0x05000200, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 220800000, 110400000, 0x1500, 0x01000200, 0x01030400, 0x01000200, 0x05000200, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 230400000, 115200000, 0x0604, 0x01000200, 0x01020600, 0x01000200, 0x05000200, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 234000000, 104000000, 0x0b01, 0x01010000, 0x01010700, 0x01020600, 0x05000100, 8, ++ 0x012a00a9, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 240000000, 120000000, 0x0803, 0x01000200, 0x01020600, 0x01000200, 0x05000200, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 252000000, 126000000, 0x0504, 0x01000100, 0x01020500, 0x01000100, 0x05000100, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 264000000, 132000000, 0x0903, 0x01000200, 0x01020700, 0x01000200, 0x05000200, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 270000000, 120000000, 0x0703, 0x01010000, 0x01030400, 0x01020600, 0x05000100, 8, ++ 0x012a00a9, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 276000000, 122666666, 0x1500, 0x01010000, 0x01030400, 0x01020600, 0x05000100, 8, ++ 0x012a00a9, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 280000000, 140000000, 0x0503, 0x01000000, 0x01010600, 0x01000000, 0x05000000, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 288000000, 128000000, 0x0604, 0x01010000, 0x01030400, 0x01020600, 0x05000100, 8, ++ 0x012a00a9, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 288000000, 144000000, 0x0404, 0x01000000, 0x01010600, 0x01000000, 0x05000000, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 300000000, 133333333, 0x0803, 0x01010000, 0x01020600, 0x01010100, 0x05000100, 8, ++ 0x012a00a9, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 300000000, 150000000, 0x0803, 0x01000100, 0x01020600, 0x01010100, 0x05000100, 11, ++ 0x0aaa0555, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 330000000, 132000000, 0x0903, 0x01000200, 0x00020200, 0x01010100, 0x05000100, 0, ++ 0, 10 /* ratio 4/10 */, 0x02520129 }, ++ { 330000000, 146666666, 0x0903, 0x01010000, 0x00020200, 0x01010100, 0x05000100, 0, ++ 0, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 330000000, 165000000, 0x0903, 0x01000100, 0x00020200, 0x01010100, 0x05000100, 0, ++ 0, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 360000000, 120000000, 0x0a03, 0x01000300, 0x00010201, 0x01010200, 0x05000100, 0, ++ 0, 12 /* ratio 4/12 */, 0x04920492 }, ++ { 360000000, 144000000, 0x0a03, 0x01000200, 0x00010201, 0x01010200, 0x05000100, 0, ++ 0, 10 /* ratio 4/10 */, 0x02520129 }, ++ { 360000000, 160000000, 0x0a03, 0x01010000, 0x00010201, 0x01010200, 0x05000100, 0, ++ 0, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 360000000, 180000000, 0x0a03, 0x01000100, 0x00010201, 0x01010200, 0x05000100, 0, ++ 0, 8 /* ratio 4/8 */, 0x00aa0055 }, ++ { 390000000, 130000000, 0x0b03, 0x01010100, 0x00020101, 0x01020100, 0x05000100, 0, ++ 0, 12 /* ratio 4/12 */, 0x04920492 }, ++ { 390000000, 156000000, 0x0b03, 0x01000200, 0x00020101, 0x01020100, 0x05000100, 0, ++ 0, 10 /* ratio 4/10 */, 0x02520129 }, ++ { 390000000, 173000000, 0x0b03, 0x01010000, 0x00020101, 0x01020100, 0x05000100, 0, ++ 0, 9 /* ratio 4/9 */, 0x012a00a9 }, ++ { 390000000, 195000000, 0x0b03, 0x01000100, 0x00020101, 0x01020100, 0x05000100, 0, ++ 0, 8 /* ratio 4/8 */, 0x00aa0055 }, + }; -+ + static n4m_table_t BCMINITDATA(type4_table)[] = { -+ { 192000000, 96000000, 0x0702, 0x04000011, 0x11030011, 0x04000011, 0x04000003, 11, 0x0aaa0555 }, -+ { 198000000, 99000000, 0x0603, 0x11020005, 0x11030011, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 200000000, 100000000, 0x0009, 0x04020011, 0x11030011, 0x04020011, 0x04020003, 11, 0x0aaa0555 }, -+ { 204000000, 102000000, 0x0c02, 0x11020005, 0x01030303, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 208000000, 104000000, 0x0802, 0x11030002, 0x11090005, 0x11030002, 0x04000003, 11, 0x0aaa0555 }, -+ { 210000000, 105000000, 0x0209, 0x11020005, 0x01030303, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 216000000, 108000000, 0x0111, 0x11020005, 0x01030303, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 224000000, 112000000, 0x0205, 0x11030002, 0x02002103, 0x11030002, 0x04000003, 11, 0x0aaa0555 }, -+ { 228000000, 101333333, 0x0e02, 0x11030003, 0x11210005, 0x01030305, 0x04000005, 8, 0x012a00a9 }, -+ { 228000000, 114000000, 0x0e02, 0x11020005, 0x11210005, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 240000000, 102857143, 0x0109, 0x04000021, 0x01050203, 0x11030021, 0x04000003, 13, 0x254a14a9 }, -+ { 240000000, 120000000, 0x0109, 0x11030002, 0x01050203, 0x11030002, 0x04000003, 11, 0x0aaa0555 }, -+ { 252000000, 100800000, 0x0203, 0x04000009, 0x11050005, 0x02000209, 0x04000002, 9, 0x02520129 }, -+ { 252000000, 126000000, 0x0203, 0x04000005, 0x11050005, 0x04000005, 0x04000002, 11, 0x0aaa0555 }, -+ { 264000000, 132000000, 0x0602, 0x04000005, 0x11050005, 0x04000005, 0x04000002, 11, 0x0aaa0555 }, -+ { 272000000, 116571428, 0x0c02, 0x04000021, 0x02000909, 0x02000221, 0x04000003, 13, 0x254a14a9 }, -+ { 280000000, 120000000, 0x0209, 0x04000021, 0x01030303, 0x02000221, 0x04000003, 13, 0x254a14a9 }, -+ { 288000000, 123428571, 0x0111, 0x04000021, 0x01030303, 0x02000221, 0x04000003, 13, 0x254a14a9 }, -+ { 300000000, 120000000, 0x0009, 0x04000009, 0x01030203, 0x02000902, 0x04000002, 9, 0x02520129 }, -+ { 300000000, 150000000, 0x0009, 0x04000005, 0x01030203, 0x04000005, 0x04000002, 11, 0x0aaa0555 } ++ { 120000000, 60000000, 0x0009, 0x11020009, 0x01030203, 0x11020009, 0x04000009, 11, ++ 0x0aaa0555 }, ++ { 150000000, 75000000, 0x0009, 0x11050002, 0x01030203, 0x11050002, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 192000000, 96000000, 0x0702, 0x04000011, 0x11030011, 0x04000011, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 198000000, 99000000, 0x0603, 0x11020005, 0x11030011, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 200000000, 100000000, 0x0009, 0x04020011, 0x11030011, 0x04020011, 0x04020003, 11, ++ 0x0aaa0555 }, ++ { 204000000, 102000000, 0x0c02, 0x11020005, 0x01030303, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 208000000, 104000000, 0x0802, 0x11030002, 0x11090005, 0x11030002, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 210000000, 105000000, 0x0209, 0x11020005, 0x01030303, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 216000000, 108000000, 0x0111, 0x11020005, 0x01030303, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 224000000, 112000000, 0x0205, 0x11030002, 0x02002103, 0x11030002, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 228000000, 101333333, 0x0e02, 0x11030003, 0x11210005, 0x01030305, 0x04000005, 8, ++ 0x012a00a9 }, ++ { 228000000, 114000000, 0x0e02, 0x11020005, 0x11210005, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 240000000, 102857143, 0x0109, 0x04000021, 0x01050203, 0x11030021, 0x04000003, 13, ++ 0x254a14a9 }, ++ { 240000000, 120000000, 0x0109, 0x11030002, 0x01050203, 0x11030002, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 252000000, 100800000, 0x0203, 0x04000009, 0x11050005, 0x02000209, 0x04000002, 9, ++ 0x02520129 }, ++ { 252000000, 126000000, 0x0203, 0x04000005, 0x11050005, 0x04000005, 0x04000002, 11, ++ 0x0aaa0555 }, ++ { 264000000, 132000000, 0x0602, 0x04000005, 0x11050005, 0x04000005, 0x04000002, 11, ++ 0x0aaa0555 }, ++ { 272000000, 116571428, 0x0c02, 0x04000021, 0x02000909, 0x02000221, 0x04000003, 13, ++ 0x254a14a9 }, ++ { 280000000, 120000000, 0x0209, 0x04000021, 0x01030303, 0x02000221, 0x04000003, 13, ++ 0x254a14a9 }, ++ { 288000000, 123428571, 0x0111, 0x04000021, 0x01030303, 0x02000221, 0x04000003, 13, ++ 0x254a14a9 }, ++ { 300000000, 120000000, 0x0009, 0x04000009, 0x01030203, 0x02000902, 0x04000002, 9, ++ 0x02520129 }, ++ { 300000000, 150000000, 0x0009, 0x04000005, 0x01030203, 0x04000005, 0x04000002, 11, ++ 0x0aaa0555 } + }; -+ + static n4m_table_t BCMINITDATA(type7_table)[] = { -+ { 183333333, 91666666, 0x0605, 0x04000011, 0x11030011, 0x04000011, 0x04000003, 11, 0x0aaa0555 }, -+ { 187500000, 93750000, 0x0a03, 0x04000011, 0x11030011, 0x04000011, 0x04000003, 11, 0x0aaa0555 }, -+ { 196875000, 98437500, 0x1003, 0x11020005, 0x11050011, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 200000000, 100000000, 0x0311, 0x04000011, 0x11030011, 0x04000009, 0x04000003, 11, 0x0aaa0555 }, -+ { 200000000, 100000000, 0x0311, 0x04020011, 0x11030011, 0x04020011, 0x04020003, 11, 0x0aaa0555 }, -+ { 206250000, 103125000, 0x1103, 0x11020005, 0x11050011, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 212500000, 106250000, 0x0c05, 0x11020005, 0x01030303, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 215625000, 107812500, 0x1203, 0x11090009, 0x11050005, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 216666666, 108333333, 0x0805, 0x11020003, 0x11030011, 0x11020003, 0x04000003, 11, 0x0aaa0555 }, -+ { 225000000, 112500000, 0x0d03, 0x11020003, 0x11030011, 0x11020003, 0x04000003, 11, 0x0aaa0555 }, -+ { 233333333, 116666666, 0x0905, 0x11020003, 0x11030011, 0x11020003, 0x04000003, 11, 0x0aaa0555 }, -+ { 237500000, 118750000, 0x0e05, 0x11020005, 0x11210005, 0x11020005, 0x04000005, 11, 0x0aaa0555 }, -+ { 240000000, 120000000, 0x0b11, 0x11020009, 0x11210009, 0x11020009, 0x04000009, 11, 0x0aaa0555 }, -+ { 250000000, 125000000, 0x0f03, 0x11020003, 0x11210003, 0x11020003, 0x04000003, 11, 0x0aaa0555 } ++ { 183333333, 91666666, 0x0605, 0x04000011, 0x11030011, 0x04000011, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 187500000, 93750000, 0x0a03, 0x04000011, 0x11030011, 0x04000011, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 196875000, 98437500, 0x1003, 0x11020005, 0x11050011, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 200000000, 100000000, 0x0311, 0x04000011, 0x11030011, 0x04000009, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 200000000, 100000000, 0x0311, 0x04020011, 0x11030011, 0x04020011, 0x04020003, 11, ++ 0x0aaa0555 }, ++ { 206250000, 103125000, 0x1103, 0x11020005, 0x11050011, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 212500000, 106250000, 0x0c05, 0x11020005, 0x01030303, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 215625000, 107812500, 0x1203, 0x11090009, 0x11050005, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 216666666, 108333333, 0x0805, 0x11020003, 0x11030011, 0x11020003, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 225000000, 112500000, 0x0d03, 0x11020003, 0x11030011, 0x11020003, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 233333333, 116666666, 0x0905, 0x11020003, 0x11030011, 0x11020003, 0x04000003, 11, ++ 0x0aaa0555 }, ++ { 237500000, 118750000, 0x0e05, 0x11020005, 0x11210005, 0x11020005, 0x04000005, 11, ++ 0x0aaa0555 }, ++ { 240000000, 120000000, 0x0b11, 0x11020009, 0x11210009, 0x11020009, 0x04000009, 11, ++ 0x0aaa0555 }, ++ { 250000000, 125000000, 0x0f03, 0x11020003, 0x11210003, 0x11020003, 0x04000003, 11, ++ 0x0aaa0555 } + }; + + ulong start, end, dst; + bool ret = FALSE; + ++ volatile uint32 *dll_ctrl = (volatile uint32 *)0xff400008; ++ volatile uint32 *dll_r1 = (volatile uint32 *)0xff400010; ++ volatile uint32 *dll_r2 = (volatile uint32 *)0xff400018; ++ + /* get index of the current core */ + idx = sb_coreidx(sbh); + clockcontrol_m2 = NULL; @@ -8038,7 +10702,7 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + clockcontrol_pci = &eir->clockcontrol_pci; + clockcontrol_m2 = &cc->clockcontrol_m2; + } else if ((cc = (chipcregs_t *) sb_setcore(sbh, SB_CC, 0))) { -+ pll_type = R_REG(&cc->capabilities) & CAP_PLL_MASK; ++ pll_type = R_REG(osh, &cc->capabilities) & CAP_PLL_MASK; + if (pll_type == PLL_TYPE6) { + clockcontrol_n = NULL; + clockcontrol_sb = NULL; @@ -8057,23 +10721,25 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + orig_n = orig_sb = orig_pci = 0; + } else { + /* Store the current clock register values */ -+ orig_n = R_REG(clockcontrol_n); -+ orig_sb = R_REG(clockcontrol_sb); -+ orig_pci = R_REG(clockcontrol_pci); ++ orig_n = R_REG(osh, clockcontrol_n); ++ orig_sb = R_REG(osh, clockcontrol_sb); ++ orig_pci = R_REG(osh, clockcontrol_pci); + } + + if (pll_type == PLL_TYPE1) { + /* Keep the current PCI clock if not specified */ + if (pciclock == 0) { -+ pciclock = sb_clock_rate(pll_type, R_REG(clockcontrol_n), R_REG(clockcontrol_pci)); ++ pciclock = sb_clock_rate(pll_type, R_REG(osh, clockcontrol_n), ++ R_REG(osh, clockcontrol_pci)); + pciclock = (pciclock <= 25000000) ? 25000000 : 33000000; + } + + /* Search for the closest MIPS clock less than or equal to a preferred value */ -+ for (i = 0; i < ARRAYSIZE(BCMINIT(type1_table)); i++) { -+ ASSERT(BCMINIT(type1_table)[i].mipsclock == -+ sb_clock_rate(pll_type, BCMINIT(type1_table)[i].n, BCMINIT(type1_table)[i].sb)); -+ if (BCMINIT(type1_table)[i].mipsclock > mipsclock) ++ for (i = 0; i < ARRAYSIZE(type1_table); i++) { ++ ASSERT(type1_table[i].mipsclock == ++ sb_clock_rate(pll_type, type1_table[i].n, ++ type1_table[i].sb)); ++ if (type1_table[i].mipsclock > mipsclock) + break; + } + if (i == 0) { @@ -8083,70 +10749,73 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + ret = TRUE; + i--; + } -+ ASSERT(BCMINIT(type1_table)[i].mipsclock <= mipsclock); ++ ASSERT(type1_table[i].mipsclock <= mipsclock); + + /* No PLL change */ -+ if ((orig_n == BCMINIT(type1_table)[i].n) && -+ (orig_sb == BCMINIT(type1_table)[i].sb) && -+ (orig_pci == BCMINIT(type1_table)[i].pci33)) ++ if ((orig_n == type1_table[i].n) && ++ (orig_sb == type1_table[i].sb) && ++ (orig_pci == type1_table[i].pci33)) + goto done; + + /* Set the PLL controls */ -+ W_REG(clockcontrol_n, BCMINIT(type1_table)[i].n); -+ W_REG(clockcontrol_sb, BCMINIT(type1_table)[i].sb); ++ W_REG(osh, clockcontrol_n, type1_table[i].n); ++ W_REG(osh, clockcontrol_sb, type1_table[i].sb); + if (pciclock == 25000000) -+ W_REG(clockcontrol_pci, BCMINIT(type1_table)[i].pci25); ++ W_REG(osh, clockcontrol_pci, type1_table[i].pci25); + else -+ W_REG(clockcontrol_pci, BCMINIT(type1_table)[i].pci33); ++ W_REG(osh, clockcontrol_pci, type1_table[i].pci33); + + /* Reset */ + sb_watchdog(sbh, 1); -+ + while (1); -+ } else if ((pll_type == PLL_TYPE3) && -+ (BCMINIT(sb_chip)(sbh) != BCM5365_DEVICE_ID)) { ++ } else if (pll_type == PLL_TYPE3) { + /* 5350 */ -+ /* Search for the closest MIPS clock less than or equal to a preferred value */ ++ if (sb_chip(sbh) != BCM5365_CHIP_ID) { ++ /* ++ * Search for the closest MIPS clock less than or equal to ++ * a preferred value. ++ */ ++ for (i = 0; i < ARRAYSIZE(type3_table); i++) { ++ if (type3_table[i].mipsclock > mipsclock) ++ break; ++ } ++ if (i == 0) { ++ ret = FALSE; ++ goto done; ++ } else { ++ ret = TRUE; ++ i--; ++ } ++ ASSERT(type3_table[i].mipsclock <= mipsclock); + -+ for (i = 0; i < ARRAYSIZE(type3_table); i++) { -+ if (type3_table[i].mipsclock > mipsclock) -+ break; ++ /* No PLL change */ ++ orig_m2 = R_REG(osh, &cc->clockcontrol_m2); ++ if ((orig_n == type3_table[i].n) && ++ (orig_m2 == type3_table[i].m2)) { ++ goto done; ++ } ++ ++ /* Set the PLL controls */ ++ W_REG(osh, clockcontrol_n, type3_table[i].n); ++ W_REG(osh, clockcontrol_m2, type3_table[i].m2); ++ ++ /* Reset */ ++ sb_watchdog(sbh, 1); ++ while (1); + } -+ if (i == 0) { -+ ret = FALSE; -+ goto done; -+ } else { -+ ret = TRUE; -+ i--; -+ } -+ ASSERT(type3_table[i].mipsclock <= mipsclock); -+ -+ /* No PLL change */ -+ orig_m2 = R_REG(&cc->clockcontrol_m2); -+ if ((orig_n == type3_table[i].n) && -+ (orig_m2 == type3_table[i].m2)) { -+ goto done; -+ } -+ -+ /* Set the PLL controls */ -+ W_REG(clockcontrol_n, type3_table[i].n); -+ W_REG(clockcontrol_m2, type3_table[i].m2); -+ -+ /* Reset */ -+ sb_watchdog(sbh, 1); -+ while (1); + } else if ((pll_type == PLL_TYPE2) || -+ (pll_type == PLL_TYPE4) || -+ (pll_type == PLL_TYPE6) || -+ (pll_type == PLL_TYPE7)) { ++ (pll_type == PLL_TYPE4) || ++ (pll_type == PLL_TYPE6) || ++ (pll_type == PLL_TYPE7)) { + n4m_table_t *table = NULL, *te; + uint tabsz = 0; + + ASSERT(cc); + -+ orig_mips = R_REG(&cc->clockcontrol_mips); ++ orig_mips = R_REG(osh, &cc->clockcontrol_m3); + -+ if (pll_type == PLL_TYPE6) { ++ switch (pll_type) { ++ case PLL_TYPE6: { + uint32 new_mips = 0; + + ret = TRUE; @@ -8156,24 +10825,28 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + if (orig_mips == new_mips) + goto done; + -+ W_REG(&cc->clockcontrol_mips, new_mips); ++ W_REG(osh, &cc->clockcontrol_m3, new_mips); + goto end_fill; + } -+ -+ if (pll_type == PLL_TYPE2) { -+ table = BCMINIT(type2_table); -+ tabsz = ARRAYSIZE(BCMINIT(type2_table)); -+ } else if (pll_type == PLL_TYPE4) { -+ table = BCMINIT(type4_table); -+ tabsz = ARRAYSIZE(BCMINIT(type4_table)); -+ } else if (pll_type == PLL_TYPE7) { -+ table = BCMINIT(type7_table); -+ tabsz = ARRAYSIZE(BCMINIT(type7_table)); -+ } else ++ case PLL_TYPE2: ++ table = type2_table; ++ tabsz = ARRAYSIZE(type2_table); ++ break; ++ case PLL_TYPE4: ++ table = type4_table; ++ tabsz = ARRAYSIZE(type4_table); ++ break; ++ case PLL_TYPE7: ++ table = type7_table; ++ tabsz = ARRAYSIZE(type7_table); ++ break; ++ default: + ASSERT("No table for plltype" == NULL); ++ break; ++ } + + /* Store the current clock register values */ -+ orig_m2 = R_REG(&cc->clockcontrol_m2); ++ orig_m2 = R_REG(osh, &cc->clockcontrol_m2); + orig_ratio_parm = 0; + orig_ratio_cfg = 0; + @@ -8215,41 +10888,48 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + goto done; + + /* Set the PLL controls */ -+ W_REG(clockcontrol_n, te->n); -+ W_REG(clockcontrol_sb, te->sb); -+ W_REG(clockcontrol_pci, te->pci33); -+ W_REG(&cc->clockcontrol_m2, te->m2); -+ W_REG(&cc->clockcontrol_mips, te->m3); ++ W_REG(osh, clockcontrol_n, te->n); ++ W_REG(osh, clockcontrol_sb, te->sb); ++ W_REG(osh, clockcontrol_pci, te->pci33); ++ W_REG(osh, &cc->clockcontrol_m2, te->m2); ++ W_REG(osh, &cc->clockcontrol_m3, te->m3); + + /* Set the chipcontrol bit to change mipsref to the backplane divider if needed */ -+ if ((pll_type == PLL_TYPE7) && -+ (te->sb != te->m2) && ++ if ((pll_type == PLL_TYPE7) && (te->sb != te->m2) && + (sb_clock_rate(pll_type, te->n, te->m2) == 120000000)) -+ W_REG(&cc->chipcontrol, R_REG(&cc->chipcontrol) | 0x100); ++ W_REG(osh, &cc->chipcontrol, ++ R_REG(osh, &cc->chipcontrol) | 0x100); + + /* No ratio change */ -+ if (orig_ratio_parm == te->ratio_parm) -+ goto end_fill; -+ -+ icache_probe(MFC0(C0_CONFIG, 1), &ic_size, &ic_lsize); ++ if (sb_chip(sbh) != BCM4785_CHIP_ID) { ++ if (orig_ratio_parm == te->ratio_parm) ++ goto end_fill; ++ } + + /* Preload the code into the cache */ -+ start = ((ulong) &&start_fill) & ~(ic_lsize - 1); -+ end = ((ulong) &&end_fill + (ic_lsize - 1)) & ~(ic_lsize - 1); ++ icache_probe(MFC0(C0_CONFIG, 1), &ic_size, &ic_lsize); ++ if (sb_chip(sbh) == BCM4785_CHIP_ID) { ++ start = ((ulong) &&start_fill_4785) & ~(ic_lsize - 1); ++ end = ((ulong) &&end_fill_4785 + (ic_lsize - 1)) & ~(ic_lsize - 1); ++ } ++ else { ++ start = ((ulong) &&start_fill) & ~(ic_lsize - 1); ++ end = ((ulong) &&end_fill + (ic_lsize - 1)) & ~(ic_lsize - 1); ++ } + while (start < end) { + cache_op(start, Fill_I); + start += ic_lsize; + } + + /* Copy the handler */ -+ start = (ulong) &BCMINIT(handler); -+ end = (ulong) &BCMINIT(afterhandler); ++ start = (ulong) &handler; ++ end = (ulong) &afterhandler; + dst = KSEG1ADDR(0x180); + for (i = 0; i < (end - start); i += 4) + *((ulong *)(dst + i)) = *((ulong *)(start + i)); + -+ /* Preload handler into the cache one line at a time */ -+ for (i = 0; i < (end - start); i += 4) ++ /* Preload the handler into the cache one line at a time */ ++ for (i = 0; i < (end - start); i += ic_lsize) + cache_op(dst + i, Fill_I); + + /* Clear BEV bit */ @@ -8258,104 +10938,162 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + /* Enable interrupts */ + MTC0(C0_STATUS, 0, MFC0(C0_STATUS, 0) | (ALLINTS | ST0_IE)); + -+ /* Enable MIPS timer interrupt */ -+ if (!(mipsr = sb_setcore(sbh, SB_MIPS, 0)) && -+ !(mipsr = sb_setcore(sbh, SB_MIPS33, 0))) -+ ASSERT(mipsr); -+ W_REG(&mipsr->intmask, 1); ++ /* 4785 clock freq change procedures */ ++ if (sb_chip(sbh) == BCM4785_CHIP_ID) { ++ start_fill_4785: ++ /* Switch to async */ ++ MTC0(C0_BROADCOM, 4, (1 << 22)); ++ ++ /* Set clock ratio in MIPS */ ++ *dll_r1 = (*dll_r1 & 0xfffffff0) | (te->d11_r1 - 1); ++ *dll_r2 = te->d11_r2; ++ ++ /* Enable new settings in MIPS */ ++ *dll_r1 = *dll_r1 | 0xc0000000; ++ ++ /* Set active cfg */ ++ MTC0(C0_BROADCOM, 2, MFC0(C0_BROADCOM, 2) | (1 << 3) | 1); ++ ++ /* Fake soft reset (clock cfg registers not reset) */ ++ MTC0(C0_BROADCOM, 5, MFC0(C0_BROADCOM, 5) | (1 << 2)); ++ ++ /* Clear active cfg */ ++ MTC0(C0_BROADCOM, 2, MFC0(C0_BROADCOM, 2) & ~(1 << 3)); ++ ++ /* set watchdog timer */ ++ W_REG(osh, &cc->watchdog, 20); ++ (void) R_REG(osh, &cc->chipid); ++ ++ /* wait for timer interrupt */ ++ __asm__ __volatile__( ++ ".set\tmips3\n\t" ++ "sync\n\t" ++ "wait\n\t" ++ ".set\tmips0"); ++ end_fill_4785: ++ while (1); ++ } ++ /* Generic clock freq change procedures */ ++ else { ++ /* Enable MIPS timer interrupt */ ++ if (!(mipsr = sb_setcore(sbh, SB_MIPS, 0)) && ++ !(mipsr = sb_setcore(sbh, SB_MIPS33, 0))) ++ ASSERT(mipsr); ++ W_REG(osh, &mipsr->intmask, 1); + + start_fill: -+ /* step 1, set clock ratios */ -+ MTC0(C0_BROADCOM, 3, te->ratio_parm); -+ MTC0(C0_BROADCOM, 1, te->ratio_cfg); ++ /* step 1, set clock ratios */ ++ MTC0(C0_BROADCOM, 3, te->ratio_parm); ++ MTC0(C0_BROADCOM, 1, te->ratio_cfg); + -+ /* step 2: program timer intr */ -+ W_REG(&mipsr->timer, 100); -+ (void) R_REG(&mipsr->timer); ++ /* step 2: program timer intr */ ++ W_REG(osh, &mipsr->timer, 100); ++ (void) R_REG(osh, &mipsr->timer); + -+ /* step 3, switch to async */ -+ sync_mode = MFC0(C0_BROADCOM, 4); -+ MTC0(C0_BROADCOM, 4, 1 << 22); ++ /* step 3, switch to async */ ++ sync_mode = MFC0(C0_BROADCOM, 4); ++ MTC0(C0_BROADCOM, 4, 1 << 22); + -+ /* step 4, set cfg active */ -+ MTC0(C0_BROADCOM, 2, 0x9); ++ /* step 4, set cfg active */ ++ MTC0(C0_BROADCOM, 2, (1 << 3) | 1); + ++ /* steps 5 & 6 */ ++ __asm__ __volatile__( ++ ".set\tmips3\n\t" ++ "wait\n\t" ++ ".set\tmips0"); + -+ /* steps 5 & 6 */ -+ __asm__ __volatile__ ( -+ ".set\tmips3\n\t" -+ "wait\n\t" -+ ".set\tmips0" -+ ); ++ /* step 7, clear cfg active */ ++ MTC0(C0_BROADCOM, 2, 0); + -+ /* step 7, clear cfg_active */ -+ MTC0(C0_BROADCOM, 2, 0); ++ /* Additional Step: set back to orig sync mode */ ++ MTC0(C0_BROADCOM, 4, sync_mode); + -+ /* Additional Step: set back to orig sync mode */ -+ MTC0(C0_BROADCOM, 4, sync_mode); -+ -+ /* step 8, fake soft reset */ -+ MTC0(C0_BROADCOM, 5, MFC0(C0_BROADCOM, 5) | 4); ++ /* step 8, fake soft reset */ ++ MTC0(C0_BROADCOM, 5, MFC0(C0_BROADCOM, 5) | (1 << 2)); + + end_fill: -+ /* step 9 set watchdog timer */ -+ sb_watchdog(sbh, 20); -+ (void) R_REG(&cc->chipid); ++ /* set watchdog timer */ ++ W_REG(osh, &cc->watchdog, 20); ++ (void) R_REG(osh, &cc->chipid); + -+ /* step 11 */ -+ __asm__ __volatile__ ( -+ ".set\tmips3\n\t" -+ "sync\n\t" -+ "wait\n\t" -+ ".set\tmips0" -+ ); -+ while (1); ++ /* wait for timer interrupt */ ++ __asm__ __volatile__( ++ ".set\tmips3\n\t" ++ "sync\n\t" ++ "wait\n\t" ++ ".set\tmips0"); ++ while (1); ++ } + } + +done: ++ /* Enable 4785 DLL */ ++ if (sb_chip(sbh) == BCM4785_CHIP_ID) { ++ uint32 tmp; ++ ++ /* set mask to 1e, enable DLL (bit 0) */ ++ *dll_ctrl |= 0x0041e021; ++ ++ /* enable aggressive hardware mode */ ++ *dll_ctrl |= 0x00000080; ++ ++ /* wait for lock flag to clear */ ++ while ((*dll_ctrl & 0x2) == 0); ++ ++ /* clear sticky flags (clear on write 1) */ ++ tmp = *dll_ctrl; ++ *dll_ctrl = tmp; ++ ++ /* set mask to 5b'10001 */ ++ *dll_ctrl = (*dll_ctrl & 0xfffc1fff) | 0x00022000; ++ ++ /* enable sync mode */ ++ MTC0(C0_BROADCOM, 4, MFC0(C0_BROADCOM, 4) & 0xfe3fffff); ++ (void)MFC0(C0_BROADCOM, 4); ++ } ++ + /* switch back to previous core */ + sb_setcoreidx(sbh, idx); + + return ret; +} + -+/* -+ * This also must be run from the cache on 47xx -+ * so there are no mips core BIU ops in progress -+ * when the PFC is enabled. -+ */ -+ -+static void -+BCMINITFN(_enable_pfc)(uint32 mode) -+{ -+ /* write range */ -+ *(volatile uint32 *)PFC_CR1 = 0xffff0000; -+ -+ /* enable */ -+ *(volatile uint32 *)PFC_CR0 = mode; -+} -+ +void +BCMINITFN(enable_pfc)(uint32 mode) +{ + ulong start, end; -+ int i; ++ uint ic_size, ic_lsize; + + /* If auto then choose the correct mode for this -+ platform, currently we only ever select one mode */ ++ * platform, currently we only ever select one mode ++ */ + if (mode == PFC_AUTO) + mode = PFC_INST; + ++ icache_probe(MFC0(C0_CONFIG, 1), &ic_size, &ic_lsize); ++ + /* enable prefetch cache if available */ + if (MFC0(C0_BROADCOM, 0) & BRCM_PFC_AVAIL) { -+ start = (ulong) &BCMINIT(_enable_pfc); -+ end = (ulong) &BCMINIT(enable_pfc); ++ start = ((ulong) &&setpfc_start) & ~(ic_lsize - 1); ++ end = ((ulong) &&setpfc_end + (ic_lsize - 1)) & ~(ic_lsize - 1); + -+ /* Preload handler into the cache one line at a time */ -+ for (i = 0; i < (end - start); i += 4) -+ cache_op(start + i, Fill_I); ++ /* Preload setpfc code into the cache one line at a time */ ++ while (start < end) { ++ cache_op(start, Fill_I); ++ start += ic_lsize; ++ } + -+ BCMINIT(_enable_pfc)(mode); ++ /* Now set the pfc */ ++ setpfc_start: ++ /* write range */ ++ *(volatile uint32 *)PFC_CR1 = 0xffff0000; ++ ++ /* enable */ ++ *(volatile uint32 *)PFC_CR0 = mode; ++ setpfc_end: ++ /* Compiler foder */ ++ ic_size = 0; + } +} + @@ -8363,11 +11101,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb +uint32 +BCMINITFN(sb_memc_get_ncdl)(sb_t *sbh) +{ ++ osl_t *osh; + sbmemcregs_t *memc; + uint32 ret = 0; + uint32 config, rd, wr, misc, dqsg, cd, sm, sd; + uint idx, rev; + ++ osh = sb_osh(sbh); ++ + idx = sb_coreidx(sbh); + + memc = (sbmemcregs_t *)sb_setcore(sbh, SB_MEMC, 0); @@ -8376,11 +11117,11 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + + rev = sb_corerev(sbh); + -+ config = R_REG(&memc->config); -+ wr = R_REG(&memc->wrncdlcor); -+ rd = R_REG(&memc->rdncdlcor); -+ misc = R_REG(&memc->miscdlyctl); -+ dqsg = R_REG(&memc->dqsgatencdl); ++ config = R_REG(osh, &memc->config); ++ wr = R_REG(osh, &memc->wrncdlcor); ++ rd = R_REG(osh, &memc->rdncdlcor); ++ misc = R_REG(osh, &memc->miscdlyctl); ++ dqsg = R_REG(osh, &memc->dqsgatencdl); + + rd &= MEMC_RDNCDLCOR_RD_MASK; + wr &= MEMC_WRNCDLCOR_WR_MASK; @@ -8405,14 +11146,88 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbmips.c linux.dev/arch/mips/bcm947xx/sb + return ret; +} + -diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbpci.c ++#if defined(BCMPERFSTATS) ++/* ++ * CP0 Register 25 supports 4 semi-independent 32bit performance counters. ++ * $25 select 0, 1, 2, and 3 are the counters. The counters *decrement* (who thought this one up?) ++ * $25 select 4 and 5 each contain 2-16bit control fields, one for each of the 4 counters ++ * $25 select 6 is the global perf control register. ++ */ ++/* enable and start instruction counting */ ++ ++void ++hndmips_perf_instrcount_enable() ++{ ++ MTC0(C0_PERFORMANCE, 6, 0x80000200); /* global enable perf counters */ ++ MTC0(C0_PERFORMANCE, 4, ++ 0x8044 | MFC0(C0_PERFORMANCE, 4)); /* enable instruction counting for counter 0 */ ++ MTC0(C0_PERFORMANCE, 0, 0); /* zero counter zero */ ++} ++ ++/* enable and start I$ hit and I$ miss counting */ ++void ++hndmips_perf_icachecount_enable(void) ++{ ++ MTC0(C0_PERFORMANCE, 6, 0x80000218); /* enable I$ counting */ ++ MTC0(C0_PERFORMANCE, 4, 0x80148018); /* count I$ hits in cntr 0 and misses in cntr 1 */ ++ MTC0(C0_PERFORMANCE, 0, 0); /* zero counter 0 - # I$ hits */ ++ MTC0(C0_PERFORMANCE, 1, 0); /* zero counter 1 - # I$ misses */ ++} ++ ++/* enable and start D$ hit and I$ miss counting */ ++void ++hndmips_perf_dcachecount_enable(void) ++{ ++ MTC0(C0_PERFORMANCE, 6, 0x80000211); /* enable D$ counting */ ++ MTC0(C0_PERFORMANCE, 4, 0x80248028); /* count D$ hits in cntr 0 and misses in cntr 1 */ ++ MTC0(C0_PERFORMANCE, 0, 0); /* zero counter 0 - # D$ hits */ ++ MTC0(C0_PERFORMANCE, 1, 0); /* zero counter 1 - # D$ misses */ ++} ++ ++void ++hndmips_perf_icache_miss_enable() ++{ ++ MTC0(C0_PERFORMANCE, 4, ++ 0x80140000 | MFC0(C0_PERFORMANCE, 4)); /* enable cache misses counting for counter 1 */ ++ MTC0(C0_PERFORMANCE, 1, 0); /* zero counter one */ ++} ++ ++ ++void ++hndmips_perf_icache_hit_enable() ++{ ++ MTC0(C0_PERFORMANCE, 5, 0x8018 | MFC0(C0_PERFORMANCE, 5)); ++ /* enable cache hits counting for counter 2 */ ++ MTC0(C0_PERFORMANCE, 2, 0); /* zero counter 2 */ ++} ++ ++uint32 ++hndmips_perf_read_instrcount() ++{ ++ return -(long)(MFC0(C0_PERFORMANCE, 0)); ++} ++ ++uint32 ++hndmips_perf_read_cache_miss() ++{ ++ return -(long)(MFC0(C0_PERFORMANCE, 1)); ++} ++ ++uint32 ++hndmips_perf_read_cache_hit() ++{ ++ return -(long)(MFC0(C0_PERFORMANCE, 2)); ++} ++ ++#endif /* BCMINTERNAL | BCMPERFSTATS */ +diff -urN linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbpci.c --- linux.old/arch/mips/bcm947xx/sbpci.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/sbpci.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,588 @@ ++++ linux.dev/arch/mips/bcm947xx/sbpci.c 2006-05-02 17:37:13.000000000 +0200 +@@ -0,0 +1,768 @@ +/* + * Low-Level PCI and SB support for BCM47xx + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -8420,31 +11235,60 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: hndpci.c,v 1.1.1.3 2006/04/08 06:13:39 honor Exp $ + */ + +#include <typedefs.h> ++#include <osl.h> +#include <pcicfg.h> +#include <bcmdevs.h> +#include <sbconfig.h> -+#include <osl.h> ++#include <bcmutils.h> +#include <sbutils.h> +#include <sbpci.h> +#include <bcmendian.h> -+#include <bcmutils.h> +#include <bcmnvram.h> ++#include <hndcpu.h> +#include <hndmips.h> ++#include <hndpci.h> ++ ++/* debug/trace */ ++#ifdef BCMDBG_PCI ++#define PCI_MSG(args) printf args ++#else ++#define PCI_MSG(args) ++#endif /* BCMDBG_PCI */ + +/* Can free sbpci_init() memory after boot */ +#ifndef linux +#define __init -+#endif ++#endif /* linux */ + +/* Emulated configuration space */ ++typedef struct { ++ int n; ++ uint size0; ++ uint size1; ++ uint size2; ++ uint size3; ++} sb_bar_cfg_t; +static pci_config_regs sb_config_regs[SB_MAXCORES]; ++static sb_bar_cfg_t sb_bar_cfg[SB_MAXCORES]; ++ ++/* Links to emulated and real PCI configuration spaces */ ++#define MAXFUNCS 2 ++typedef struct { ++ pci_config_regs *emu; /* emulated PCI config */ ++ pci_config_regs *pci; /* real PCI config */ ++ sb_bar_cfg_t *bar; /* region sizes */ ++} sb_pci_cfg_t; ++static sb_pci_cfg_t sb_pci_cfg[SB_MAXCORES][MAXFUNCS]; ++ ++/* Special emulated config space for non-existing device */ ++static pci_config_regs sb_pci_null = { 0xffff, 0xffff }; + +/* Banned cores */ -+static uint16 pci_ban[32] = { 0 }; ++static uint16 pci_ban[SB_MAXCORES] = { 0 }; +static uint pci_banned = 0; + +/* CardBus mode */ @@ -8453,12 +11297,22 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp +/* Disable PCI host core */ +static bool pci_disabled = FALSE; + ++/* Host bridge slot #, default to 0 */ ++static uint8 pci_hbslot = 0; ++ ++/* Internal macros */ ++#define PCI_SLOTAD_MAP 16 /* SLOT<n> mapps to AD<n+16> */ ++#define PCI_HBSBCFG_REV 8 /* MIN. core rev. required to ++ * access host bridge PCI cfg space ++ * from SB ++ */ ++ +/* + * Functions for accessing external PCI configuration space + */ + +/* Assume one-hot slot wiring */ -+#define PCI_SLOT_MAX 16 ++#define PCI_SLOT_MAX 16 /* Max. PCI Slots */ + +static uint32 +config_cmd(sb_t *sbh, uint bus, uint dev, uint func, uint off) @@ -8466,11 +11320,14 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + uint coreidx; + sbpciregs_t *regs; + uint32 addr = 0; ++ osl_t *osh; + + /* CardBusMode supports only one device */ + if (cardbus && dev > 1) + return 0; + ++ osh = sb_osh(sbh); ++ + coreidx = sb_coreidx(sbh); + regs = (sbpciregs_t *) sb_setcore(sbh, SB_PCI, 0); + @@ -8478,17 +11335,24 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + if (bus == 1) { + /* Skip unwired slots */ + if (dev < PCI_SLOT_MAX) { -+ /* Slide the PCI window to the appropriate slot */ -+ W_REG(®s->sbtopci1, SBTOPCI_CFG0 | ((1 << (dev + 16)) & SBTOPCI1_MASK)); -+ addr = SB_PCI_CFG | ((1 << (dev + 16)) & ~SBTOPCI1_MASK) | -+ (func << 8) | (off & ~3); -+ } -+ } ++ uint32 win; + -+ /* Type 1 transaction */ -+ else { -+ W_REG(®s->sbtopci1, SBTOPCI_CFG1); -+ addr = SB_PCI_CFG | (bus << 16) | (dev << 11) | (func << 8) | (off & ~3); ++ /* Slide the PCI window to the appropriate slot */ ++ win = (SBTOPCI_CFG0 | ((1 << (dev + PCI_SLOTAD_MAP)) & SBTOPCI1_MASK)); ++ W_REG(osh, ®s->sbtopci1, win); ++ addr = SB_PCI_CFG | ++ ((1 << (dev + PCI_SLOTAD_MAP)) & ~SBTOPCI1_MASK) | ++ (func << PCICFG_FUN_SHIFT) | ++ (off & ~3); ++ } ++ } else { ++ /* Type 1 transaction */ ++ W_REG(osh, ®s->sbtopci1, SBTOPCI_CFG1); ++ addr = SB_PCI_CFG | ++ (bus << PCICFG_BUS_SHIFT) | ++ (dev << PCICFG_SLOT_SHIFT) | ++ (func << PCICFG_FUN_SHIFT) | ++ (off & ~3); + } + + sb_setcoreidx(sbh, coreidx); @@ -8496,17 +11360,70 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + return addr; +} + -+static int ++/* ++ * Read host bridge PCI config registers from Silicon Backplane (>=rev8). ++ * ++ * It returns TRUE to indicate that access to the host bridge's pci config ++ * from SB is ok, and values in 'addr' and 'val' are valid. ++ * ++ * It can only read registers at multiple of 4-bytes. Callers must pick up ++ * needed bytes from 'val' based on 'off' value. Value in 'addr' reflects ++ * the register address where value in 'val' is read. ++ */ ++static bool ++sb_pcihb_read_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, ++ uint32 **addr, uint32 *val) ++{ ++ sbpciregs_t *regs; ++ osl_t *osh; ++ uint coreidx; ++ bool ret = FALSE; ++ ++ /* sanity check */ ++ ASSERT(bus == 1); ++ ASSERT(dev == pci_hbslot); ++ ASSERT(func == 0); ++ ++ osh = sb_osh(sbh); ++ ++ /* read pci config when core rev >= 8 */ ++ coreidx = sb_coreidx(sbh); ++ regs = (sbpciregs_t *)sb_setcore(sbh, SB_PCI, 0); ++ if (regs && sb_corerev(sbh) >= PCI_HBSBCFG_REV) { ++ *addr = (uint32 *)®s->pcicfg[func][off >> 2]; ++ *val = R_REG(osh, *addr); ++ ret = TRUE; ++ } ++ sb_setcoreidx(sbh, coreidx); ++ ++ return ret; ++} ++ ++int +extpci_read_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, int len) +{ -+ uint32 addr, *reg = NULL, val; ++ uint32 addr = 0, *reg = NULL, val; + int ret = 0; + -+ if (pci_disabled || -+ !(addr = config_cmd(sbh, bus, dev, func, off)) || -+ !(reg = (uint32 *) REG_MAP(addr, len)) || -+ BUSPROBE(val, reg)) ++ /* ++ * Set value to -1 when: ++ * flag 'pci_disabled' is true; ++ * value of 'addr' is zero; ++ * REG_MAP() fails; ++ * BUSPROBE() fails; ++ */ ++ if (pci_disabled) + val = 0xffffffff; ++ else if (bus == 1 && dev == pci_hbslot && func == 0 && ++ sb_pcihb_read_config(sbh, bus, dev, func, off, ®, &val)) ++ ; ++ else if (((addr = config_cmd(sbh, bus, dev, func, off)) == 0) || ++ ((reg = (uint32 *)REG_MAP(addr, len)) == 0) || ++ (BUSPROBE(val, reg) != 0)) ++ val = 0xffffffff; ++ ++ PCI_MSG(("%s: 0x%x <= 0x%p(0x%x), len %d, off 0x%x, buf 0x%p\n", ++ __FUNCTION__, val, reg, addr, len, off, buf)); + + val >>= 8 * (off & 3); + if (len == 4) @@ -8518,22 +11435,36 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + else + ret = -1; + -+ if (reg) ++ if (reg && addr) + REG_UNMAP(reg); + + return ret; +} + -+static int ++int +extpci_write_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, int len) +{ -+ uint32 addr, *reg = NULL, val; ++ osl_t *osh; ++ uint32 addr = 0, *reg = NULL, val; + int ret = 0; + -+ if (pci_disabled || -+ !(addr = config_cmd(sbh, bus, dev, func, off)) || -+ !(reg = (uint32 *) REG_MAP(addr, len)) || -+ BUSPROBE(val, reg)) ++ osh = sb_osh(sbh); ++ ++ /* ++ * Ignore write attempt when: ++ * flag 'pci_disabled' is true; ++ * value of 'addr' is zero; ++ * REG_MAP() fails; ++ * BUSPROBE() fails; ++ */ ++ if (pci_disabled) ++ return 0; ++ else if (bus == 1 && dev == pci_hbslot && func == 0 && ++ sb_pcihb_read_config(sbh, bus, dev, func, off, ®, &val)) ++ ; ++ else if (((addr = config_cmd(sbh, bus, dev, func, off)) == 0) || ++ ((reg = (uint32 *) REG_MAP(addr, len)) == 0) || ++ (BUSPROBE(val, reg) != 0)) + goto done; + + if (len == 4) @@ -8544,34 +11475,133 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + } else if (len == 1) { + val &= ~(0xff << (8 * (off & 3))); + val |= *((uint8 *) buf) << (8 * (off & 3)); -+ } else ++ } else { + ret = -1; ++ goto done; ++ } + -+ W_REG(reg, val); ++ PCI_MSG(("%s: 0x%x => 0x%p\n", __FUNCTION__, val, reg)); + -+ done: -+ if (reg) ++ W_REG(osh, reg, val); ++ ++done: ++ if (reg && addr) + REG_UNMAP(reg); + + return ret; +} + +/* ++ * Must access emulated PCI configuration at these locations even when ++ * the real PCI config space exists and is accessible. ++ * ++ * PCI_CFG_VID (0x00) ++ * PCI_CFG_DID (0x02) ++ * PCI_CFG_PROGIF (0x09) ++ * PCI_CFG_SUBCL (0x0a) ++ * PCI_CFG_BASECL (0x0b) ++ * PCI_CFG_HDR (0x0e) ++ * PCI_CFG_INT (0x3c) ++ * PCI_CFG_PIN (0x3d) ++ */ ++#define FORCE_EMUCFG(off, len) \ ++ ((off == PCI_CFG_VID) || (off == PCI_CFG_DID) || \ ++ (off == PCI_CFG_PROGIF) || \ ++ (off == PCI_CFG_SUBCL) || (off == PCI_CFG_BASECL) || \ ++ (off == PCI_CFG_HDR) || \ ++ (off == PCI_CFG_INT) || (off == PCI_CFG_PIN)) ++ ++/* Sync the emulation registers and the real PCI config registers. */ ++static void ++sb_pcid_read_config(sb_t *sbh, uint coreidx, sb_pci_cfg_t *cfg, ++ uint off, uint len) ++{ ++ osl_t *osh; ++ uint oldidx; ++ ++ ASSERT(cfg); ++ ASSERT(cfg->emu); ++ ASSERT(cfg->pci); ++ ++ /* decide if real PCI config register access is necessary */ ++ if (FORCE_EMUCFG(off, len)) ++ return; ++ ++ osh = sb_osh(sbh); ++ ++ /* access to the real pci config space only when the core is up */ ++ oldidx = sb_coreidx(sbh); ++ sb_setcoreidx(sbh, coreidx); ++ if (sb_iscoreup(sbh)) { ++ if (len == 4) ++ *(uint32 *)((ulong)cfg->emu + off) = ++ htol32(R_REG(osh, (uint32 *)((ulong)cfg->pci + off))); ++ else if (len == 2) ++ *(uint16 *)((ulong)cfg->emu + off) = ++ htol16(R_REG(osh, (uint16 *)((ulong)cfg->pci + off))); ++ else if (len == 1) ++ *(uint8 *)((ulong)cfg->emu + off) = ++ R_REG(osh, (uint8 *)((ulong)cfg->pci + off)); ++ } ++ sb_setcoreidx(sbh, oldidx); ++} ++ ++static void ++sb_pcid_write_config(sb_t *sbh, uint coreidx, sb_pci_cfg_t *cfg, ++ uint off, uint len) ++{ ++ osl_t *osh; ++ uint oldidx; ++ ++ ASSERT(cfg); ++ ASSERT(cfg->emu); ++ ASSERT(cfg->pci); ++ ++ osh = sb_osh(sbh); ++ ++ /* decide if real PCI config register access is necessary */ ++ if (FORCE_EMUCFG(off, len)) ++ return; ++ ++ /* access to the real pci config space only when the core is up */ ++ oldidx = sb_coreidx(sbh); ++ sb_setcoreidx(sbh, coreidx); ++ if (sb_iscoreup(sbh)) { ++ if (len == 4) ++ W_REG(osh, (uint32 *)((ulong)cfg->pci + off), ++ ltoh32(*(uint32 *)((ulong)cfg->emu + off))); ++ else if (len == 2) ++ W_REG(osh, (uint16 *)((ulong)cfg->pci + off), ++ ltoh16(*(uint16 *)((ulong)cfg->emu + off))); ++ else if (len == 1) ++ W_REG(osh, (uint8 *)((ulong)cfg->pci + off), ++ *(uint8 *)((ulong)cfg->emu + off)); ++ } ++ sb_setcoreidx(sbh, oldidx); ++} ++ ++/* + * Functions for accessing translated SB configuration space + */ -+ +static int +sb_read_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, int len) +{ + pci_config_regs *cfg; + -+ if (dev >= SB_MAXCORES || (off + len) > sizeof(pci_config_regs)) ++ if (dev >= SB_MAXCORES || func >= MAXFUNCS || (off + len) > sizeof(pci_config_regs)) + return -1; -+ cfg = &sb_config_regs[dev]; ++ cfg = sb_pci_cfg[dev][func].emu; + + ASSERT(ISALIGNED(off, len)); + ASSERT(ISALIGNED((uintptr)buf, len)); + ++ /* use special config space if the device does not exist */ ++ if (!cfg) ++ cfg = &sb_pci_null; ++ /* sync emulation with real PCI config if necessary */ ++ else if (sb_pci_cfg[dev][func].pci) ++ sb_pcid_read_config(sbh, dev, &sb_pci_cfg[dev][func], off, len); ++ + if (len == 4) + *((uint32 *) buf) = ltoh32(*((uint32 *)((ulong) cfg + off))); + else if (len == 2) @@ -8587,40 +11617,43 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp +static int +sb_write_config(sb_t *sbh, uint bus, uint dev, uint func, uint off, void *buf, int len) +{ -+ uint coreidx, n; ++ uint coreidx; + void *regs; -+ sbconfig_t *sb; + pci_config_regs *cfg; ++ osl_t *osh; ++ sb_bar_cfg_t *bar; + -+ if (dev >= SB_MAXCORES || (off + len) > sizeof(pci_config_regs)) ++ if (dev >= SB_MAXCORES || func >= MAXFUNCS || (off + len) > sizeof(pci_config_regs)) ++ return -1; ++ cfg = sb_pci_cfg[dev][func].emu; ++ if (!cfg) + return -1; -+ cfg = &sb_config_regs[dev]; + + ASSERT(ISALIGNED(off, len)); + ASSERT(ISALIGNED((uintptr)buf, len)); + ++ osh = sb_osh(sbh); ++ + /* Emulate BAR sizing */ -+ if (off >= OFFSETOF(pci_config_regs, base[0]) && off <= OFFSETOF(pci_config_regs, base[3]) && ++ if (off >= OFFSETOF(pci_config_regs, base[0]) && ++ off <= OFFSETOF(pci_config_regs, base[3]) && + len == 4 && *((uint32 *) buf) == ~0) { + coreidx = sb_coreidx(sbh); + if ((regs = sb_setcoreidx(sbh, dev))) { -+ sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); ++ bar = sb_pci_cfg[dev][func].bar; + /* Highest numbered address match register */ -+ n = (R_REG(&sb->sbidlow) & SBIDL_AR_MASK) >> SBIDL_AR_SHIFT; + if (off == OFFSETOF(pci_config_regs, base[0])) -+ cfg->base[0] = ~(sb_size(R_REG(&sb->sbadmatch0)) - 1); -+ else if (off == OFFSETOF(pci_config_regs, base[1]) && n >= 1) -+ cfg->base[1] = ~(sb_size(R_REG(&sb->sbadmatch1)) - 1); -+ else if (off == OFFSETOF(pci_config_regs, base[2]) && n >= 2) -+ cfg->base[2] = ~(sb_size(R_REG(&sb->sbadmatch2)) - 1); -+ else if (off == OFFSETOF(pci_config_regs, base[3]) && n >= 3) -+ cfg->base[3] = ~(sb_size(R_REG(&sb->sbadmatch3)) - 1); ++ cfg->base[0] = ~(bar->size0 - 1); ++ else if (off == OFFSETOF(pci_config_regs, base[1]) && bar->n >= 1) ++ cfg->base[1] = ~(bar->size1 - 1); ++ else if (off == OFFSETOF(pci_config_regs, base[2]) && bar->n >= 2) ++ cfg->base[2] = ~(bar->size2 - 1); ++ else if (off == OFFSETOF(pci_config_regs, base[3]) && bar->n >= 3) ++ cfg->base[3] = ~(bar->size3 - 1); + } + sb_setcoreidx(sbh, coreidx); -+ return 0; + } -+ -+ if (len == 4) ++ else if (len == 4) + *((uint32 *)((ulong) cfg + off)) = htol32(*((uint32 *) buf)); + else if (len == 2) + *((uint16 *)((ulong) cfg + off)) = htol16(*((uint16 *) buf)); @@ -8629,6 +11662,10 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + else + return -1; + ++ /* sync emulation with real PCI config if necessary */ ++ if (sb_pci_cfg[dev][func].pci) ++ sb_pcid_write_config(sbh, dev, &sb_pci_cfg[dev][func], off, len); ++ + return 0; +} + @@ -8657,7 +11694,12 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + pci_ban[pci_banned++] = core; +} + -+static int ++/* ++ * Initiliaze PCI core. Return 0 after a successful initialization. ++ * Otherwise return -1 to indicate there is no PCI core and return 1 ++ * to indicate PCI core is disabled. ++ */ ++int __init +sbpci_init_pci(sb_t *sbh) +{ + uint chip, chiprev, chippkg, host; @@ -8665,34 +11707,43 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + sbpciregs_t *pci; + sbconfig_t *sb; + uint32 val; ++ int ret = 0; ++ char *hbslot; ++ osl_t *osh; + + chip = sb_chip(sbh); + chiprev = sb_chiprev(sbh); + chippkg = sb_chippkg(sbh); + ++ osh = sb_osh(sbh); ++ + if (!(pci = (sbpciregs_t *) sb_setcore(sbh, SB_PCI, 0))) { -+ printf("PCI: no core\n"); ++ printk("PCI: no core\n"); + pci_disabled = TRUE; + return -1; + } -+ sb_core_reset(sbh, 0); ++ ++ if ((chip == 0x4710) && (chiprev == 0)) ++ pci_disabled = TRUE; ++ ++ sb = (sbconfig_t *)((ulong) pci + SBCONFIGOFF); + + boardflags = (uint32) getintvar(NULL, "boardflags"); + -+ if ((chip == BCM4310_DEVICE_ID) && (chiprev == 0)) -+ pci_disabled = TRUE; -+ + /* + * The 200-pin BCM4712 package does not bond out PCI. Even when + * PCI is bonded out, some boards may leave the pins + * floating. + */ -+ if (((chip == BCM4712_DEVICE_ID) && ++ if (((chip == BCM4712_CHIP_ID) && + ((chippkg == BCM4712SMALL_PKG_ID) || + (chippkg == BCM4712MID_PKG_ID))) || + (boardflags & BFL_NOPCI)) + pci_disabled = TRUE; + ++ /* Enable the core */ ++ sb_core_reset(sbh, 0, 0); ++ + /* + * If the PCI core should not be touched (disabled, not bonded + * out, or pins floating), do not even attempt to access core @@ -8705,4112 +11756,265 @@ diff -Naur linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbp + host = !BUSPROBE(val, &pci->control); + + if (!host) { ++ ret = 1; ++ + /* Disable PCI interrupts in client mode */ -+ sb = (sbconfig_t *)((ulong) pci + SBCONFIGOFF); -+ W_REG(&sb->sbintvec, 0); ++ W_REG(osh, &sb->sbintvec, 0); + + /* Disable the PCI bridge in client mode */ + sbpci_ban(SB_PCI); -+ printf("PCI: Disabled\n"); ++ sb_core_disable(sbh, 0); ++ ++ printk("PCI: Disabled\n"); + } else { ++ printk("PCI: Initializing host\n"); ++ ++ /* Disable PCI SBReqeustTimeout for BCM4785 */ ++ if (chip == BCM4785_CHIP_ID) { ++ AND_REG(osh, &sb->sbimconfiglow, ~0x00000070); ++ sb_commit(sbh); ++ } ++ + /* Reset the external PCI bus and enable the clock */ -+ W_REG(&pci->control, 0x5); /* enable the tristate drivers */ -+ W_REG(&pci->control, 0xd); /* enable the PCI clock */ ++ W_REG(osh, &pci->control, 0x5); /* enable the tristate drivers */ ++ W_REG(osh, &pci->control, 0xd); /* enable the PCI clock */ + OSL_DELAY(150); /* delay > 100 us */ -+ W_REG(&pci->control, 0xf); /* deassert PCI reset */ -+ W_REG(&pci->arbcontrol, PCI_INT_ARB); /* use internal arbiter */ ++ W_REG(osh, &pci->control, 0xf); /* deassert PCI reset */ ++ /* Use internal arbiter and park REQ/GRNT at external master 0 */ ++ W_REG(osh, &pci->arbcontrol, PCI_INT_ARB); + OSL_DELAY(1); /* delay 1 us */ ++ if (sb_corerev(sbh) >= 8) { ++ val = getintvar(NULL, "parkid"); ++ ASSERT(val <= PCI_PARKID_LAST); ++ OR_REG(osh, &pci->arbcontrol, val << PCI_PARKID_SHIFT); ++ OSL_DELAY(1); ++ } + + /* Enable CardBusMode */ -+ cardbus = nvram_match("cardbus", "1"); ++ cardbus = getintvar(NULL, "cardbus") == 1; + if (cardbus) { -+ printf("PCI: Enabling CardBus\n"); ++ printk("PCI: Enabling CardBus\n"); + /* GPIO 1 resets the CardBus device on bcm94710ap */ + sb_gpioout(sbh, 1, 1, GPIO_DRV_PRIORITY); + sb_gpioouten(sbh, 1, 1, GPIO_DRV_PRIORITY); -+ W_REG(&pci->sprom[0], R_REG(&pci->sprom[0]) | 0x400); ++ W_REG(osh, &pci->sprom[0], R_REG(osh, &pci->sprom[0]) | 0x400); + } + + /* 64 MB I/O access window */ -+ W_REG(&pci->sbtopci0, SBTOPCI_IO); ++ W_REG(osh, &pci->sbtopci0, SBTOPCI_IO); + /* 64 MB configuration access window */ -+ W_REG(&pci->sbtopci1, SBTOPCI_CFG0); ++ W_REG(osh, &pci->sbtopci1, SBTOPCI_CFG0); + /* 1 GB memory access window */ -+ W_REG(&pci->sbtopci2, SBTOPCI_MEM | SB_PCI_DMA); ++ W_REG(osh, &pci->sbtopci2, SBTOPCI_MEM | SB_PCI_DMA); ++ ++ /* Host bridge slot # nvram overwrite */ ++ if ((hbslot = nvram_get("pcihbslot"))) { ++ pci_hbslot = bcm_strtoul(hbslot, NULL, 0); ++ ASSERT(pci_hbslot < PCI_MAX_DEVICES); ++ } + + /* Enable PCI bridge BAR0 prefetch and burst */ + val = 6; -+ sbpci_write_config(sbh, 1, 0, 0, PCI_CFG_CMD, &val, sizeof(val)); ++ sbpci_write_config(sbh, 1, pci_hbslot, 0, PCI_CFG_CMD, &val, sizeof(val)); + + /* Enable PCI interrupts */ -+ W_REG(&pci->intmask, PCI_INTA); ++ W_REG(osh, &pci->intmask, PCI_INTA); + } -+ -+ return 0; ++ ++ return ret; +} + -+static int ++/* ++ * Get the PCI region address and size information. ++ */ ++static void __init ++sbpci_init_regions(sb_t *sbh, uint func, pci_config_regs *cfg, sb_bar_cfg_t *bar) ++{ ++ osl_t *osh; ++ uint16 coreid; ++ void *regs; ++ sbconfig_t *sb; ++ uint32 base; ++ ++ osh = sb_osh(sbh); ++ coreid = sb_coreid(sbh); ++ regs = sb_coreregs(sbh); ++ sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); ++ ++ switch (coreid) { ++ case SB_USB20H: ++ base = htol32(sb_base(R_REG(osh, &sb->sbadmatch0))); ++ ++ cfg->base[0] = func == 0 ? base : base + 0x800; /* OHCI/EHCI */ ++ cfg->base[1] = 0; ++ cfg->base[2] = 0; ++ cfg->base[3] = 0; ++ cfg->base[4] = 0; ++ cfg->base[5] = 0; ++ bar->n = 1; ++ bar->size0 = func == 0 ? 0x200 : 0x100; /* OHCI/EHCI */ ++ bar->size1 = 0; ++ bar->size2 = 0; ++ bar->size3 = 0; ++ break; ++ default: ++ cfg->base[0] = htol32(sb_base(R_REG(osh, &sb->sbadmatch0))); ++ cfg->base[1] = htol32(sb_base(R_REG(osh, &sb->sbadmatch1))); ++ cfg->base[2] = htol32(sb_base(R_REG(osh, &sb->sbadmatch2))); ++ cfg->base[3] = htol32(sb_base(R_REG(osh, &sb->sbadmatch3))); ++ cfg->base[4] = 0; ++ cfg->base[5] = 0; ++ bar->n = (R_REG(osh, &sb->sbidlow) & SBIDL_AR_MASK) >> SBIDL_AR_SHIFT; ++ bar->size0 = sb_size(R_REG(osh, &sb->sbadmatch0)); ++ bar->size1 = sb_size(R_REG(osh, &sb->sbadmatch1)); ++ bar->size2 = sb_size(R_REG(osh, &sb->sbadmatch2)); ++ bar->size3 = sb_size(R_REG(osh, &sb->sbadmatch3)); ++ break; ++ } ++} ++ ++/* ++ * Construct PCI config spaces for SB cores so that they ++ * can be accessed as if they were PCI devices. ++ */ ++static void __init +sbpci_init_cores(sb_t *sbh) +{ -+ uint chip, chiprev, chippkg, coreidx, i; ++ uint chiprev, coreidx, i; + sbconfig_t *sb; -+ pci_config_regs *cfg; ++ pci_config_regs *cfg, *pci; ++ sb_bar_cfg_t *bar; + void *regs; -+ char varname[8]; -+ uint wlidx = 0; -+ uint16 vendor, core; ++ osl_t *osh; ++ uint16 vendor, device; ++ uint16 coreid; + uint8 class, subclass, progif; -+ uint32 val; -+ uint32 sbips_int_mask[] = { 0, SBIPS_INT1_MASK, SBIPS_INT2_MASK, SBIPS_INT3_MASK, SBIPS_INT4_MASK }; -+ uint32 sbips_int_shift[] = { 0, 0, SBIPS_INT2_SHIFT, SBIPS_INT3_SHIFT, SBIPS_INT4_SHIFT }; ++ uint dev; ++ uint8 header; ++ uint func; + -+ chip = sb_chip(sbh); + chiprev = sb_chiprev(sbh); -+ chippkg = sb_chippkg(sbh); + coreidx = sb_coreidx(sbh); + ++ osh = sb_osh(sbh); ++ + /* Scan the SB bus */ + bzero(sb_config_regs, sizeof(sb_config_regs)); -+ for (cfg = sb_config_regs; cfg < &sb_config_regs[SB_MAXCORES]; cfg++) { -+ cfg->vendor = 0xffff; -+ if (!(regs = sb_setcoreidx(sbh, cfg - sb_config_regs))) ++ bzero(sb_bar_cfg, sizeof(sb_bar_cfg)); ++ bzero(sb_pci_cfg, sizeof(sb_pci_cfg)); ++ memset(&sb_pci_null, -1, sizeof(sb_pci_null)); ++ cfg = sb_config_regs; ++ bar = sb_bar_cfg; ++ for (dev = 0; dev < SB_MAXCORES; dev ++) { ++ /* Check if the core exists */ ++ if (!(regs = sb_setcoreidx(sbh, dev))) + continue; + sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); + -+ /* Read ID register and parse vendor and core */ -+ val = R_REG(&sb->sbidhigh); -+ vendor = (val & SBIDH_VC_MASK) >> SBIDH_VC_SHIFT; -+ core = (val & SBIDH_CC_MASK) >> SBIDH_CC_SHIFT; -+ progif = 0; -+ + /* Check if this core is banned */ ++ coreid = sb_coreid(sbh); + for (i = 0; i < pci_banned; i++) -+ if (core == pci_ban[i]) ++ if (coreid == pci_ban[i]) + break; + if (i < pci_banned) + continue; + -+ /* Known vendor translations */ -+ switch (vendor) { -+ case SB_VEND_BCM: -+ vendor = VENDOR_BROADCOM; -+ break; -+ } -+ -+ /* Determine class based on known core codes */ -+ switch (core) { -+ case SB_ILINE20: -+ class = PCI_CLASS_NET; -+ subclass = PCI_NET_ETHER; -+ core = BCM47XX_ILINE_ID; -+ break; -+ case SB_ILINE100: -+ class = PCI_CLASS_NET; -+ subclass = PCI_NET_ETHER; -+ core = BCM4610_ILINE_ID; -+ break; -+ case SB_ENET: -+ class = PCI_CLASS_NET; -+ subclass = PCI_NET_ETHER; -+ core = BCM47XX_ENET_ID; -+ break; -+ case SB_SDRAM: -+ case SB_MEMC: -+ class = PCI_CLASS_MEMORY; -+ subclass = PCI_MEMORY_RAM; -+ break; -+ case SB_PCI: -+ class = PCI_CLASS_BRIDGE; -+ subclass = PCI_BRIDGE_PCI; -+ break; -+ case SB_MIPS: -+ case SB_MIPS33: -+ class = PCI_CLASS_CPU; -+ subclass = PCI_CPU_MIPS; -+ break; -+ case SB_CODEC: -+ class = PCI_CLASS_COMM; -+ subclass = PCI_COMM_MODEM; -+ core = BCM47XX_V90_ID; -+ break; -+ case SB_USB: -+ class = PCI_CLASS_SERIAL; -+ subclass = PCI_SERIAL_USB; -+ progif = 0x10; /* OHCI */ -+ core = BCM47XX_USB_ID; -+ break; -+ case SB_USB11H: -+ class = PCI_CLASS_SERIAL; -+ subclass = PCI_SERIAL_USB; -+ progif = 0x10; /* OHCI */ -+ core = BCM47XX_USBH_ID; -+ break; -+ case SB_USB11D: -+ class = PCI_CLASS_SERIAL; -+ subclass = PCI_SERIAL_USB; -+ core = BCM47XX_USBD_ID; -+ break; -+ case SB_IPSEC: -+ class = PCI_CLASS_CRYPT; -+ subclass = PCI_CRYPT_NETWORK; -+ core = BCM47XX_IPSEC_ID; -+ break; -+ case SB_ROBO: -+ class = PCI_CLASS_NET; -+ subclass = PCI_NET_OTHER; -+ core = BCM47XX_ROBO_ID; -+ break; -+ case SB_EXTIF: -+ case SB_CC: -+ class = PCI_CLASS_MEMORY; -+ subclass = PCI_MEMORY_FLASH; -+ break; -+ case SB_D11: -+ class = PCI_CLASS_NET; -+ subclass = PCI_NET_OTHER; -+ /* Let an nvram variable override this */ -+ sprintf(varname, "wl%did", wlidx); -+ wlidx++; -+ if ((core = getintvar(NULL, varname)) == 0) { -+ if (chip == BCM4712_DEVICE_ID) { -+ if (chippkg == BCM4712SMALL_PKG_ID) -+ core = BCM4306_D11G_ID; -+ else -+ core = BCM4306_D11DUAL_ID; -+ } else { -+ /* 4310 */ -+ core = BCM4310_D11B_ID; -+ } ++ for (func = 0; func < MAXFUNCS; ++func) { ++ /* Make sure we won't go beyond the limit */ ++ if (cfg >= &sb_config_regs[SB_MAXCORES]) { ++ printk("PCI: too many emulated devices\n"); ++ goto done; + } -+ break; + -+ default: -+ class = subclass = progif = 0xff; -+ break; -+ } ++ /* Convert core id to pci id */ ++ if (sb_corepciid(sbh, func, &vendor, &device, &class, &subclass, ++ &progif, &header)) ++ continue; + -+ /* Supported translations */ -+ cfg->vendor = htol16(vendor); -+ cfg->device = htol16(core); -+ cfg->rev_id = chiprev; -+ cfg->prog_if = progif; -+ cfg->sub_class = subclass; -+ cfg->base_class = class; -+ cfg->base[0] = htol32(sb_base(R_REG(&sb->sbadmatch0))); -+ cfg->base[1] = htol32(sb_base(R_REG(&sb->sbadmatch1))); -+ cfg->base[2] = htol32(sb_base(R_REG(&sb->sbadmatch2))); -+ cfg->base[3] = htol32(sb_base(R_REG(&sb->sbadmatch3))); -+ cfg->base[4] = 0; -+ cfg->base[5] = 0; -+ if (class == PCI_CLASS_BRIDGE && subclass == PCI_BRIDGE_PCI) -+ cfg->header_type = PCI_HEADER_BRIDGE; -+ else -+ cfg->header_type = PCI_HEADER_NORMAL; -+ /* Save core interrupt flag */ -+ cfg->int_pin = R_REG(&sb->sbtpsflag) & SBTPS_NUM0_MASK; -+ /* Default to MIPS shared interrupt 0 */ -+ cfg->int_line = 0; -+ /* MIPS sbipsflag maps core interrupt flags to interrupts 1 through 4 */ -+ if ((regs = sb_setcore(sbh, SB_MIPS, 0)) || -+ (regs = sb_setcore(sbh, SB_MIPS33, 0))) { -+ sb = (sbconfig_t *)((ulong) regs + SBCONFIGOFF); -+ val = R_REG(&sb->sbipsflag); -+ for (cfg->int_line = 1; cfg->int_line <= 4; cfg->int_line++) { -+ if (((val & sbips_int_mask[cfg->int_line]) >> sbips_int_shift[cfg->int_line]) == cfg->int_pin) -+ break; ++ /* ++ * Differentiate real PCI config from emulated. ++ * non zero 'pci' indicate there is a real PCI config space ++ * for this device. ++ */ ++ switch (device) { ++ case BCM47XX_GIGETH_ID: ++ pci = (pci_config_regs *)((uint32)regs + 0x800); ++ break; ++ case BCM47XX_SATAXOR_ID: ++ pci = (pci_config_regs *)((uint32)regs + 0x400); ++ break; ++ case BCM47XX_ATA100_ID: ++ pci = (pci_config_regs *)((uint32)regs + 0x800); ++ break; ++ default: ++ pci = NULL; ++ break; + } -+ if (cfg->int_line > 4) -+ cfg->int_line = 0; ++ /* Supported translations */ ++ cfg->vendor = htol16(vendor); ++ cfg->device = htol16(device); ++ cfg->rev_id = chiprev; ++ cfg->prog_if = progif; ++ cfg->sub_class = subclass; ++ cfg->base_class = class; ++ cfg->header_type = header; ++ sbpci_init_regions(sbh, func, cfg, bar); ++ /* Save core interrupt flag */ ++ cfg->int_pin = R_REG(osh, &sb->sbtpsflag) & SBTPS_NUM0_MASK; ++ /* Save core interrupt assignment */ ++ cfg->int_line = sb_irq(sbh); ++ /* Indicate there is no SROM */ ++ *((uint32 *) &cfg->sprom_control) = 0xffffffff; ++ ++ /* Point to the PCI config spaces */ ++ sb_pci_cfg[dev][func].emu = cfg; ++ sb_pci_cfg[dev][func].pci = pci; ++ sb_pci_cfg[dev][func].bar = bar; ++ cfg ++; ++ bar ++; + } -+ /* Emulated core */ -+ *((uint32 *) &cfg->sprom_control) = 0xffffffff; + } + ++done: + sb_setcoreidx(sbh, coreidx); -+ return 0; +} + ++/* ++ * Initialize PCI core and construct PCI config spaces for SB cores. ++ * Must propagate sbpci_init_pci() return value to the caller to let ++ * them know the PCI core initialization status. ++ */ +int __init +sbpci_init(sb_t *sbh) +{ -+ sbpci_init_pci(sbh); ++ int status = sbpci_init_pci(sbh); + sbpci_init_cores(sbh); -+ return 0; ++ return status; +} + -+void -+sbpci_check(sb_t *sbh) -+{ -+ uint coreidx; -+ sbpciregs_t *pci; -+ uint32 sbtopci1; -+ uint32 buf[64], *ptr, i; -+ ulong pa; -+ volatile uint j; -+ -+ coreidx = sb_coreidx(sbh); -+ pci = (sbpciregs_t *) sb_setcore(sbh, SB_PCI, 0); -+ -+ /* Clear the test array */ -+ pa = (ulong) DMA_MAP(NULL, buf, sizeof(buf), DMA_RX, NULL); -+ ptr = (uint32 *) OSL_UNCACHED(&buf[0]); -+ memset(ptr, 0, sizeof(buf)); -+ -+ /* Point PCI window 1 to memory */ -+ sbtopci1 = R_REG(&pci->sbtopci1); -+ W_REG(&pci->sbtopci1, SBTOPCI_MEM | (pa & SBTOPCI1_MASK)); -+ -+ /* Fill the test array via PCI window 1 */ -+ ptr = (uint32 *) REG_MAP(SB_PCI_CFG + (pa & ~SBTOPCI1_MASK), sizeof(buf)); -+ for (i = 0; i < ARRAYSIZE(buf); i++) { -+ for (j = 0; j < 2; j++); -+ W_REG(&ptr[i], i); -+ } -+ REG_UNMAP(ptr); -+ -+ /* Restore PCI window 1 */ -+ W_REG(&pci->sbtopci1, sbtopci1); -+ -+ /* Check the test array */ -+ DMA_UNMAP(NULL, pa, sizeof(buf), DMA_RX, NULL); -+ ptr = (uint32 *) OSL_UNCACHED(&buf[0]); -+ for (i = 0; i < ARRAYSIZE(buf); i++) { -+ if (ptr[i] != i) -+ break; -+ } -+ -+ /* Change the clock if the test fails */ -+ if (i < ARRAYSIZE(buf)) { -+ uint32 req, cur; -+ -+ cur = sb_clock(sbh); -+ printf("PCI: Test failed at %d MHz\n", (cur + 500000) / 1000000); -+ for (req = 104000000; req < 176000000; req += 4000000) { -+ printf("PCI: Resetting to %d MHz\n", (req + 500000) / 1000000); -+ /* This will only reset if the clocks are valid and have changed */ -+ sb_mips_setclock(sbh, req, 0, 0); -+ } -+ /* Should not reach here */ -+ ASSERT(0); -+ } -+ -+ sb_setcoreidx(sbh, coreidx); -+} -+ -diff -Naur linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setup.c ---- linux.old/arch/mips/bcm947xx/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/setup.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,234 @@ -+/* -+ * Generic setup routines for Broadcom MIPS boards -+ * -+ * Copyright (C) 2005 Felix Fietkau <nbd@openwrt.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 the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ * -+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * 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., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/kernel.h> -+#include <linux/module.h> -+#include <linux/serialP.h> -+#include <linux/ide.h> -+#include <asm/bootinfo.h> -+#include <asm/cpu.h> -+#include <asm/time.h> -+#include <asm/reboot.h> -+ -+#include <typedefs.h> -+#include <osl.h> -+#include <sbutils.h> -+#include <bcmutils.h> -+#include <bcmnvram.h> -+#include <sbmips.h> -+#include <trxhdr.h> -+ -+/* Global SB handle */ -+sb_t *bcm947xx_sbh = NULL; -+spinlock_t bcm947xx_sbh_lock = SPIN_LOCK_UNLOCKED; -+ -+/* Convenience */ -+#define sbh bcm947xx_sbh -+#define sbh_lock bcm947xx_sbh_lock -+ -+extern void bcm947xx_time_init(void); -+extern void bcm947xx_timer_setup(struct irqaction *irq); -+ -+#ifdef CONFIG_REMOTE_DEBUG -+extern void set_debug_traps(void); -+extern void rs_kgdb_hook(struct serial_state *); -+extern void breakpoint(void); -+#endif -+ -+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) -+extern struct ide_ops std_ide_ops; -+#endif -+ -+/* Kernel command line */ -+char arcs_cmdline[CL_SIZE] __initdata = CONFIG_CMDLINE; -+ -+void -+bcm947xx_machine_restart(char *command) -+{ -+ printk("Please stand by while rebooting the system...\n"); -+ -+ /* Set the watchdog timer to reset immediately */ -+ __cli(); -+ sb_watchdog(sbh, 1); -+ while (1); -+} -+ -+void -+bcm947xx_machine_halt(void) -+{ -+ printk("System halted\n"); -+ -+ /* Disable interrupts and watchdog and spin forever */ -+ __cli(); -+ sb_watchdog(sbh, 0); -+ while (1); -+} -+ -+#ifdef CONFIG_SERIAL -+ -+static int ser_line = 0; -+ -+typedef struct { -+ void *regs; -+ uint irq; -+ uint baud_base; -+ uint reg_shift; -+} serial_port; -+ -+static serial_port ports[4]; -+static int num_ports = 0; -+ -+static void -+serial_add(void *regs, uint irq, uint baud_base, uint reg_shift) -+{ -+ ports[num_ports].regs = regs; -+ ports[num_ports].irq = irq; -+ ports[num_ports].baud_base = baud_base; -+ ports[num_ports].reg_shift = reg_shift; -+ num_ports++; -+} -+ -+static void -+do_serial_add(serial_port *port) -+{ -+ void *regs; -+ uint irq; -+ uint baud_base; -+ uint reg_shift; -+ struct serial_struct s; -+ -+ regs = port->regs; -+ irq = port->irq; -+ baud_base = port->baud_base; -+ reg_shift = port->reg_shift; -+ -+ memset(&s, 0, sizeof(s)); -+ -+ s.line = ser_line++; -+ s.iomem_base = regs; -+ s.irq = irq + 2; -+ s.baud_base = baud_base / 16; -+ s.flags = ASYNC_BOOT_AUTOCONF; -+ s.io_type = SERIAL_IO_MEM; -+ s.iomem_reg_shift = reg_shift; -+ -+ if (early_serial_setup(&s) != 0) { -+ printk(KERN_ERR "Serial setup failed!\n"); -+ } -+} -+ -+#endif /* CONFIG_SERIAL */ -+ -+void __init -+brcm_setup(void) -+{ -+ char *s; -+ int i; -+ char *value; -+ -+ /* Get global SB handle */ -+ sbh = sb_kattach(); -+ -+ /* Initialize clocks and interrupts */ -+ sb_mips_init(sbh); -+ -+ if (BCM330X(current_cpu_data.processor_id) && -+ (read_c0_diag() & BRCM_PFC_AVAIL)) { -+ /* -+ * Now that the sbh is inited set the proper PFC value -+ */ -+ printk("Setting the PFC to its default value\n"); -+ enable_pfc(PFC_AUTO); -+ } -+ -+ -+#ifdef CONFIG_SERIAL -+ sb_serial_init(sbh, serial_add); -+ -+ /* reverse serial ports if nvram variable starts with console=ttyS1 */ -+ /* Initialize UARTs */ -+ s = nvram_get("kernel_args"); -+ if (!s) s = ""; -+ if (!strncmp(s, "console=ttyS1", 13)) { -+ for (i = num_ports; i; i--) -+ do_serial_add(&ports[i - 1]); -+ } else { -+ for (i = 0; i < num_ports; i++) -+ do_serial_add(&ports[i]); -+ } -+#endif -+ -+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) -+ ide_ops = &std_ide_ops; -+#endif -+ -+ /* Override default command line arguments */ -+ value = nvram_get("kernel_cmdline"); -+ if (value && strlen(value) && strncmp(value, "empty", 5)) -+ strncpy(arcs_cmdline, value, sizeof(arcs_cmdline)); -+ -+ -+ /* Generic setup */ -+ _machine_restart = bcm947xx_machine_restart; -+ _machine_halt = bcm947xx_machine_halt; -+ _machine_power_off = bcm947xx_machine_halt; -+ -+ board_time_init = bcm947xx_time_init; -+ board_timer_setup = bcm947xx_timer_setup; -+} -+ -+const char * -+get_system_type(void) -+{ -+ static char s[32]; -+ -+ if (bcm947xx_sbh) { -+ sprintf(s, "Broadcom BCM%X chip rev %d", sb_chip(bcm947xx_sbh), -+ sb_chiprev(bcm947xx_sbh)); -+ return s; -+ } -+ else -+ return "Broadcom BCM947XX"; -+} -+ -+void __init -+bus_error_init(void) -+{ -+} -+ -+EXPORT_SYMBOL(bcm947xx_sbh); -diff -Naur linux.old/arch/mips/bcm947xx/sflash.c linux.dev/arch/mips/bcm947xx/sflash.c ---- linux.old/arch/mips/bcm947xx/sflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/sflash.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,418 @@ -+/* -+ * Broadcom SiliconBackplane chipcommon serial flash interface -+ * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id$ -+ */ -+ -+#include <osl.h> -+#include <typedefs.h> -+#include <sbconfig.h> -+#include <sbchipc.h> -+#include <mipsinc.h> -+#include <bcmutils.h> -+#include <bcmdevs.h> -+#include <sflash.h> -+ -+/* Private global state */ -+static struct sflash sflash; -+ -+/* Issue a serial flash command */ -+static INLINE void -+sflash_cmd(chipcregs_t *cc, uint opcode) -+{ -+ W_REG(&cc->flashcontrol, SFLASH_START | opcode); -+ while (R_REG(&cc->flashcontrol) & SFLASH_BUSY); -+} -+ -+/* Initialize serial flash access */ -+struct sflash * -+sflash_init(chipcregs_t *cc) -+{ -+ uint32 id, id2; -+ -+ bzero(&sflash, sizeof(sflash)); -+ -+ sflash.type = R_REG(&cc->capabilities) & CAP_FLASH_MASK; -+ -+ switch (sflash.type) { -+ case SFLASH_ST: -+ /* Probe for ST chips */ -+ sflash_cmd(cc, SFLASH_ST_DP); -+ sflash_cmd(cc, SFLASH_ST_RES); -+ id = R_REG(&cc->flashdata); -+ switch (id) { -+ case 0x11: -+ /* ST M25P20 2 Mbit Serial Flash */ -+ sflash.blocksize = 64 * 1024; -+ sflash.numblocks = 4; -+ break; -+ case 0x12: -+ /* ST M25P40 4 Mbit Serial Flash */ -+ sflash.blocksize = 64 * 1024; -+ sflash.numblocks = 8; -+ break; -+ case 0x13: -+ /* ST M25P80 8 Mbit Serial Flash */ -+ sflash.blocksize = 64 * 1024; -+ sflash.numblocks = 16; -+ break; -+ case 0x14: -+ /* ST M25P16 16 Mbit Serial Flash */ -+ sflash.blocksize = 64 * 1024; -+ sflash.numblocks = 32; -+ break; -+ case 0x15: -+ /* ST M25P32 32 Mbit Serial Flash */ -+ sflash.blocksize = 64 * 1024; -+ sflash.numblocks = 64; -+ break; -+ case 0xbf: -+ W_REG(&cc->flashaddress, 1); -+ sflash_cmd(cc, SFLASH_ST_RES); -+ id2 = R_REG(&cc->flashdata); -+ if (id2 == 0x44) { -+ /* SST M25VF80 4 Mbit Serial Flash */ -+ sflash.blocksize = 64 * 1024; -+ sflash.numblocks = 8; -+ } -+ break; -+ } -+ break; -+ -+ case SFLASH_AT: -+ /* Probe for Atmel chips */ -+ sflash_cmd(cc, SFLASH_AT_STATUS); -+ id = R_REG(&cc->flashdata) & 0x3c; -+ switch (id) { -+ case 0xc: -+ /* Atmel AT45DB011 1Mbit Serial Flash */ -+ sflash.blocksize = 256; -+ sflash.numblocks = 512; -+ break; -+ case 0x14: -+ /* Atmel AT45DB021 2Mbit Serial Flash */ -+ sflash.blocksize = 256; -+ sflash.numblocks = 1024; -+ break; -+ case 0x1c: -+ /* Atmel AT45DB041 4Mbit Serial Flash */ -+ sflash.blocksize = 256; -+ sflash.numblocks = 2048; -+ break; -+ case 0x24: -+ /* Atmel AT45DB081 8Mbit Serial Flash */ -+ sflash.blocksize = 256; -+ sflash.numblocks = 4096; -+ break; -+ case 0x2c: -+ /* Atmel AT45DB161 16Mbit Serial Flash */ -+ sflash.blocksize = 512; -+ sflash.numblocks = 4096; -+ break; -+ case 0x34: -+ /* Atmel AT45DB321 32Mbit Serial Flash */ -+ sflash.blocksize = 512; -+ sflash.numblocks = 8192; -+ break; -+ case 0x3c: -+ /* Atmel AT45DB642 64Mbit Serial Flash */ -+ sflash.blocksize = 1024; -+ sflash.numblocks = 8192; -+ break; -+ } -+ break; -+ } -+ -+ sflash.size = sflash.blocksize * sflash.numblocks; -+ return sflash.size ? &sflash : NULL; -+} -+ -+/* Read len bytes starting at offset into buf. Returns number of bytes read. */ -+int -+sflash_read(chipcregs_t *cc, uint offset, uint len, uchar *buf) -+{ -+ int cnt; -+ uint32 *from, *to; -+ -+ if (!len) -+ return 0; -+ -+ if ((offset + len) > sflash.size) -+ return -22; -+ -+ if ((len >= 4) && (offset & 3)) -+ cnt = 4 - (offset & 3); -+ else if ((len >= 4) && ((uint32)buf & 3)) -+ cnt = 4 - ((uint32)buf & 3); -+ else -+ cnt = len; -+ -+ from = (uint32 *)KSEG1ADDR(SB_FLASH2 + offset); -+ to = (uint32 *)buf; -+ -+ if (cnt < 4) { -+ bcopy(from, to, cnt); -+ return cnt; -+ } -+ -+ while (cnt >= 4) { -+ *to++ = *from++; -+ cnt -= 4; -+ } -+ -+ return (len - cnt); -+} -+ -+/* Poll for command completion. Returns zero when complete. */ -+int -+sflash_poll(chipcregs_t *cc, uint offset) -+{ -+ if (offset >= sflash.size) -+ return -22; -+ -+ switch (sflash.type) { -+ case SFLASH_ST: -+ /* Check for ST Write In Progress bit */ -+ sflash_cmd(cc, SFLASH_ST_RDSR); -+ return R_REG(&cc->flashdata) & SFLASH_ST_WIP; -+ case SFLASH_AT: -+ /* Check for Atmel Ready bit */ -+ sflash_cmd(cc, SFLASH_AT_STATUS); -+ return !(R_REG(&cc->flashdata) & SFLASH_AT_READY); -+ } -+ -+ return 0; -+} -+ -+/* Write len bytes starting at offset into buf. Returns number of bytes -+ * written. Caller should poll for completion. -+ */ -+int -+sflash_write(chipcregs_t *cc, uint offset, uint len, const uchar *buf) -+{ -+ struct sflash *sfl; -+ int ret = 0; -+ bool is4712b0; -+ uint32 page, byte, mask; -+ -+ if (!len) -+ return 0; -+ -+ if ((offset + len) > sflash.size) -+ return -22; -+ -+ sfl = &sflash; -+ switch (sfl->type) { -+ case SFLASH_ST: -+ mask = R_REG(&cc->chipid); -+ is4712b0 = (((mask & CID_ID_MASK) == BCM4712_DEVICE_ID) && -+ ((mask & CID_REV_MASK) == (3 << CID_REV_SHIFT))); -+ /* Enable writes */ -+ sflash_cmd(cc, SFLASH_ST_WREN); -+ if (is4712b0) { -+ mask = 1 << 14; -+ W_REG(&cc->flashaddress, offset); -+ W_REG(&cc->flashdata, *buf++); -+ /* Set chip select */ -+ OR_REG(&cc->gpioout, mask); -+ /* Issue a page program with the first byte */ -+ sflash_cmd(cc, SFLASH_ST_PP); -+ ret = 1; -+ offset++; -+ len--; -+ while (len > 0) { -+ if ((offset & 255) == 0) { -+ /* Page boundary, drop cs and return */ -+ AND_REG(&cc->gpioout, ~mask); -+ if (!sflash_poll(cc, offset)) { -+ /* Flash rejected command */ -+ return -11; -+ } -+ return ret; -+ } else { -+ /* Write single byte */ -+ sflash_cmd(cc, *buf++); -+ } -+ ret++; -+ offset++; -+ len--; -+ } -+ /* All done, drop cs if needed */ -+ if ((offset & 255) != 1) { -+ /* Drop cs */ -+ AND_REG(&cc->gpioout, ~mask); -+ if (!sflash_poll(cc, offset)) { -+ /* Flash rejected command */ -+ return -12; -+ } -+ } -+ } else { -+ ret = 1; -+ W_REG(&cc->flashaddress, offset); -+ W_REG(&cc->flashdata, *buf); -+ /* Page program */ -+ sflash_cmd(cc, SFLASH_ST_PP); -+ } -+ break; -+ case SFLASH_AT: -+ mask = sfl->blocksize - 1; -+ page = (offset & ~mask) << 1; -+ byte = offset & mask; -+ /* Read main memory page into buffer 1 */ -+ if (byte || len < sfl->blocksize) { -+ W_REG(&cc->flashaddress, page); -+ sflash_cmd(cc, SFLASH_AT_BUF1_LOAD); -+ /* 250 us for AT45DB321B */ -+ SPINWAIT(sflash_poll(cc, offset), 1000); -+ ASSERT(!sflash_poll(cc, offset)); -+ } -+ /* Write into buffer 1 */ -+ for (ret = 0; ret < len && byte < sfl->blocksize; ret++) { -+ W_REG(&cc->flashaddress, byte++); -+ W_REG(&cc->flashdata, *buf++); -+ sflash_cmd(cc, SFLASH_AT_BUF1_WRITE); -+ } -+ /* Write buffer 1 into main memory page */ -+ W_REG(&cc->flashaddress, page); -+ sflash_cmd(cc, SFLASH_AT_BUF1_PROGRAM); -+ break; -+ } -+ -+ return ret; -+} -+ -+/* Erase a region. Returns number of bytes scheduled for erasure. -+ * Caller should poll for completion. -+ */ -+int -+sflash_erase(chipcregs_t *cc, uint offset) -+{ -+ struct sflash *sfl; -+ -+ if (offset >= sflash.size) -+ return -22; -+ -+ sfl = &sflash; -+ switch (sfl->type) { -+ case SFLASH_ST: -+ sflash_cmd(cc, SFLASH_ST_WREN); -+ W_REG(&cc->flashaddress, offset); -+ sflash_cmd(cc, SFLASH_ST_SE); -+ return sfl->blocksize; -+ case SFLASH_AT: -+ W_REG(&cc->flashaddress, offset << 1); -+ sflash_cmd(cc, SFLASH_AT_PAGE_ERASE); -+ return sfl->blocksize; -+ } -+ -+ return 0; -+} -+ -+/* -+ * writes the appropriate range of flash, a NULL buf simply erases -+ * the region of flash -+ */ -+int -+sflash_commit(chipcregs_t *cc, uint offset, uint len, const uchar *buf) -+{ -+ struct sflash *sfl; -+ uchar *block = NULL, *cur_ptr, *blk_ptr; -+ uint blocksize = 0, mask, cur_offset, cur_length, cur_retlen, remainder; -+ uint blk_offset, blk_len, copied; -+ int bytes, ret = 0; -+ -+ /* Check address range */ -+ if (len <= 0) -+ return 0; -+ -+ sfl = &sflash; -+ if ((offset + len) > sfl->size) -+ return -1; -+ -+ blocksize = sfl->blocksize; -+ mask = blocksize - 1; -+ -+ /* Allocate a block of mem */ -+ if (!(block = MALLOC(NULL, blocksize))) -+ return -1; -+ -+ while (len) { -+ /* Align offset */ -+ cur_offset = offset & ~mask; -+ cur_length = blocksize; -+ cur_ptr = block; -+ -+ remainder = blocksize - (offset & mask); -+ if (len < remainder) -+ cur_retlen = len; -+ else -+ cur_retlen = remainder; -+ -+ /* buf == NULL means erase only */ -+ if (buf) { -+ /* Copy existing data into holding block if necessary */ -+ if ((offset & mask) || (len < blocksize)) { -+ blk_offset = cur_offset; -+ blk_len = cur_length; -+ blk_ptr = cur_ptr; -+ -+ /* Copy entire block */ -+ while(blk_len) { -+ copied = sflash_read(cc, blk_offset, blk_len, blk_ptr); -+ blk_offset += copied; -+ blk_len -= copied; -+ blk_ptr += copied; -+ } -+ } -+ -+ /* Copy input data into holding block */ -+ memcpy(cur_ptr + (offset & mask), buf, cur_retlen); -+ } -+ -+ /* Erase block */ -+ if ((ret = sflash_erase(cc, (uint) cur_offset)) < 0) -+ goto done; -+ while (sflash_poll(cc, (uint) cur_offset)); -+ -+ /* buf == NULL means erase only */ -+ if (!buf) { -+ offset += cur_retlen; -+ len -= cur_retlen; -+ continue; -+ } -+ -+ /* Write holding block */ -+ while (cur_length > 0) { -+ if ((bytes = sflash_write(cc, -+ (uint) cur_offset, -+ (uint) cur_length, -+ (uchar *) cur_ptr)) < 0) { -+ ret = bytes; -+ goto done; -+ } -+ while (sflash_poll(cc, (uint) cur_offset)); -+ cur_offset += bytes; -+ cur_length -= bytes; -+ cur_ptr += bytes; -+ } -+ -+ offset += cur_retlen; -+ len -= cur_retlen; -+ buf += cur_retlen; -+ } -+ -+ ret = len; -+done: -+ if (block) -+ MFREE(NULL, block, blocksize); -+ return ret; -+} -+ -diff -Naur linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time.c ---- linux.old/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/time.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,118 @@ -+/* -+ * Copyright 2004, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id: time.c,v 1.1 2005/03/16 13:49:59 wbx Exp $ -+ */ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/kernel.h> -+#include <linux/sched.h> -+#include <linux/serial_reg.h> -+#include <linux/interrupt.h> -+#include <asm/addrspace.h> -+#include <asm/io.h> -+#include <asm/time.h> -+ -+#include <typedefs.h> -+#include <osl.h> -+#include <sbutils.h> -+#include <bcmnvram.h> -+#include <sbconfig.h> -+#include <sbextif.h> -+#include <sbmips.h> -+ -+/* Global SB handle */ -+extern void *bcm947xx_sbh; -+extern spinlock_t bcm947xx_sbh_lock; -+ -+/* Convenience */ -+#define sbh bcm947xx_sbh -+#define sbh_lock bcm947xx_sbh_lock -+ -+extern int panic_timeout; -+static int watchdog = 0; -+static u8 *mcr = NULL; -+ -+void __init -+bcm947xx_time_init(void) -+{ -+ unsigned int hz; -+ extifregs_t *eir; -+ -+ /* -+ * Use deterministic values for initial counter interrupt -+ * so that calibrate delay avoids encountering a counter wrap. -+ */ -+ write_c0_count(0); -+ write_c0_compare(0xffff); -+ -+ if (!(hz = sb_mips_clock(sbh))) -+ hz = 100000000; -+ -+ printk("CPU: BCM%04x rev %d at %d MHz\n", sb_chip(sbh), sb_chiprev(sbh), -+ (hz + 500000) / 1000000); -+ -+ /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */ -+ mips_hpt_frequency = hz / 2; -+ -+ /* Set watchdog interval in ms */ -+ watchdog = simple_strtoul(nvram_safe_get("watchdog"), NULL, 0); -+ -+ /* Please set the watchdog to 3 sec if it is less than 3 but not equal to 0 */ -+ if (watchdog > 0) { -+ if (watchdog < 3000) -+ watchdog = 3000; -+ } -+ -+ -+ /* Set panic timeout in seconds */ -+ panic_timeout = watchdog / 1000; -+ -+ /* Setup blink */ -+ if ((eir = sb_setcore(sbh, SB_EXTIF, 0))) { -+ sbconfig_t *sb = (sbconfig_t *)((unsigned int) eir + SBCONFIGOFF); -+ unsigned long base = EXTIF_CFGIF_BASE(sb_base(readl(&sb->sbadmatch1))); -+ mcr = (u8 *) ioremap_nocache(base + UART_MCR, 1); -+ } -+} -+ -+static void -+bcm947xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -+{ -+ /* Generic MIPS timer code */ -+ timer_interrupt(irq, dev_id, regs); -+ -+ /* Set the watchdog timer to reset after the specified number of ms */ -+ if (watchdog > 0) -+ sb_watchdog(sbh, WATCHDOG_CLOCK / 1000 * watchdog); -+ -+#ifdef CONFIG_HWSIM -+ (*((int *)0xa0000f1c))++; -+#else -+ /* Blink one of the LEDs in the external UART */ -+ if (mcr && !(jiffies % (HZ/2))) -+ writeb(readb(mcr) ^ UART_MCR_OUT2, mcr); -+#endif -+} -+ -+static struct irqaction bcm947xx_timer_irqaction = { -+ bcm947xx_timer_interrupt, -+ SA_INTERRUPT, -+ 0, -+ "timer", -+ NULL, -+ NULL -+}; -+ -+void __init -+bcm947xx_timer_setup(struct irqaction *irq) -+{ -+ /* Enable the timer interrupt */ -+ setup_irq(7, &bcm947xx_timer_irqaction); -+} -diff -Naur linux.old/arch/mips/config-shared.in linux.dev/arch/mips/config-shared.in ---- linux.old/arch/mips/config-shared.in 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/config-shared.in 2006-04-06 15:34:14.000000000 +0200 -@@ -208,6 +208,14 @@ - fi - define_bool CONFIG_MIPS_RTC y - fi -+dep_bool 'Support for Broadcom MIPS-based boards' CONFIG_MIPS_BRCM $CONFIG_EXPERIMENTAL -+dep_bool 'Support for Broadcom BCM947XX' CONFIG_BCM947XX $CONFIG_MIPS_BRCM -+if [ "$CONFIG_BCM947XX" = "y" ] ; then -+ bool ' Support for Broadcom BCM4710' CONFIG_BCM4710 -+ bool ' Support for Broadcom BCM4310' CONFIG_BCM4310 -+ bool ' Support for Broadcom BCM4704' CONFIG_BCM4704 -+ bool ' Support for Broadcom BCM5365' CONFIG_BCM5365 -+fi - bool 'Support for SNI RM200 PCI' CONFIG_SNI_RM200_PCI - bool 'Support for TANBAC TB0226 (Mbase)' CONFIG_TANBAC_TB0226 - bool 'Support for TANBAC TB0229 (VR4131DIMM)' CONFIG_TANBAC_TB0229 -@@ -229,6 +237,11 @@ - define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n - - # -+# Provide an option for a default kernel command line -+# -+string 'Default kernel command string' CONFIG_CMDLINE "" -+ -+# - # Select some configuration options automatically based on user selections. - # - if [ "$CONFIG_ACER_PICA_61" = "y" ]; then -@@ -554,6 +567,13 @@ - define_bool CONFIG_SWAP_IO_SPACE_L y - define_bool CONFIG_BOOT_ELF32 y - fi -+if [ "$CONFIG_BCM947XX" = "y" ] ; then -+ define_bool CONFIG_PCI y -+ define_bool CONFIG_NONCOHERENT_IO y -+ define_bool CONFIG_NEW_TIME_C y -+ define_bool CONFIG_NEW_IRQ y -+ define_bool CONFIG_HND y -+fi - if [ "$CONFIG_SNI_RM200_PCI" = "y" ]; then - define_bool CONFIG_ARC32 y - define_bool CONFIG_ARC_MEMORY y -@@ -1042,7 +1062,11 @@ - - bool 'Are you using a crosscompiler' CONFIG_CROSSCOMPILE - bool 'Enable run-time debugging' CONFIG_RUNTIME_DEBUG --bool 'Remote GDB kernel debugging' CONFIG_KGDB -+if [ "$CONFIG_BCM947XX" = "y" ] ; then -+ bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG -+else -+ bool 'Remote GDB kernel debugging' CONFIG_KGDB -+fi - dep_bool ' Console output to GDB' CONFIG_GDB_CONSOLE $CONFIG_KGDB - if [ "$CONFIG_KGDB" = "y" ]; then - define_bool CONFIG_DEBUG_INFO y -diff -Naur linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu-probe.c ---- linux.old/arch/mips/kernel/cpu-probe.c 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/kernel/cpu-probe.c 2006-04-06 15:34:14.000000000 +0200 -@@ -162,7 +162,7 @@ - - static inline void cpu_probe_legacy(struct cpuinfo_mips *c) - { -- switch (c->processor_id & 0xff00) { -+ switch (c->processor_id & PRID_IMP_MASK) { - case PRID_IMP_R2000: - c->cputype = CPU_R2000; - c->isa_level = MIPS_CPU_ISA_I; -@@ -172,7 +172,7 @@ - c->tlbsize = 64; - break; - case PRID_IMP_R3000: -- if ((c->processor_id & 0xff) == PRID_REV_R3000A) -+ if ((c->processor_id & PRID_REV_MASK) == PRID_REV_R3000A) - if (cpu_has_confreg()) - c->cputype = CPU_R3081E; - else -@@ -187,12 +187,12 @@ - break; - case PRID_IMP_R4000: - if (read_c0_config() & CONF_SC) { -- if ((c->processor_id & 0xff) >= PRID_REV_R4400) -+ if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_R4400) - c->cputype = CPU_R4400PC; - else - c->cputype = CPU_R4000PC; - } else { -- if ((c->processor_id & 0xff) >= PRID_REV_R4400) -+ if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_R4400) - c->cputype = CPU_R4400SC; - else - c->cputype = CPU_R4000SC; -@@ -438,7 +438,7 @@ - static inline void cpu_probe_mips(struct cpuinfo_mips *c) - { - decode_config1(c); -- switch (c->processor_id & 0xff00) { -+ switch (c->processor_id & PRID_IMP_MASK) { - case PRID_IMP_4KC: - c->cputype = CPU_4KC; - c->isa_level = MIPS_CPU_ISA_M32; -@@ -479,10 +479,10 @@ - { - decode_config1(c); - c->options |= MIPS_CPU_PREFETCH; -- switch (c->processor_id & 0xff00) { -+ switch (c->processor_id & PRID_IMP_MASK) { - case PRID_IMP_AU1_REV1: - case PRID_IMP_AU1_REV2: -- switch ((c->processor_id >> 24) & 0xff) { -+ switch ((c->processor_id >> 24) & PRID_REV_MASK) { - case 0: - c->cputype = CPU_AU1000; - break; -@@ -510,10 +510,34 @@ - } - } - -+static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) -+{ -+ decode_config1(c); -+ c->options |= MIPS_CPU_PREFETCH; -+ switch (c->processor_id & PRID_IMP_MASK) { -+ case PRID_IMP_BCM4710: -+ c->cputype = CPU_BCM4710; -+ c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | -+ MIPS_CPU_4KTLB | MIPS_CPU_COUNTER; -+ c->scache.flags = MIPS_CACHE_NOT_PRESENT; -+ break; -+ case PRID_IMP_4KC: -+ case PRID_IMP_BCM3302: -+ c->cputype = CPU_BCM3302; -+ c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | -+ MIPS_CPU_4KTLB | MIPS_CPU_COUNTER; -+ c->scache.flags = MIPS_CACHE_NOT_PRESENT; -+ break; -+ default: -+ c->cputype = CPU_UNKNOWN; -+ break; -+ } -+} -+ - static inline void cpu_probe_sibyte(struct cpuinfo_mips *c) - { - decode_config1(c); -- switch (c->processor_id & 0xff00) { -+ switch (c->processor_id & PRID_IMP_MASK) { - case PRID_IMP_SB1: - c->cputype = CPU_SB1; - c->isa_level = MIPS_CPU_ISA_M64; -@@ -535,7 +559,7 @@ - static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c) - { - decode_config1(c); -- switch (c->processor_id & 0xff00) { -+ switch (c->processor_id & PRID_IMP_MASK) { - case PRID_IMP_SR71000: - c->cputype = CPU_SR71000; - c->isa_level = MIPS_CPU_ISA_M64; -@@ -560,7 +584,7 @@ - c->cputype = CPU_UNKNOWN; - - c->processor_id = read_c0_prid(); -- switch (c->processor_id & 0xff0000) { -+ switch (c->processor_id & PRID_COMP_MASK) { - - case PRID_COMP_LEGACY: - cpu_probe_legacy(c); -@@ -571,6 +595,9 @@ - case PRID_COMP_ALCHEMY: - cpu_probe_alchemy(c); - break; -+ case PRID_COMP_BROADCOM: -+ cpu_probe_broadcom(c); -+ break; - case PRID_COMP_SIBYTE: - cpu_probe_sibyte(c); - break; -diff -Naur linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S ---- linux.old/arch/mips/kernel/head.S 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/kernel/head.S 2006-04-06 15:34:14.000000000 +0200 -@@ -28,12 +28,20 @@ - #include <asm/mipsregs.h> - #include <asm/stackframe.h> - -+#ifdef CONFIG_BCM4710 -+#undef eret -+#define eret nop; nop; eret -+#endif -+ - .text -+ j kernel_entry -+ nop -+ - /* - * Reserved space for exception handlers. - * Necessary for machines which link their kernels at KSEG0. - */ -- .fill 0x400 -+ .fill 0x3f4 - - /* The following two symbols are used for kernel profiling. */ - EXPORT(stext) -diff -Naur linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c ---- linux.old/arch/mips/kernel/proc.c 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/kernel/proc.c 2006-04-06 15:34:14.000000000 +0200 -@@ -78,9 +78,10 @@ - [CPU_AU1550] "Au1550", - [CPU_24K] "MIPS 24K", - [CPU_AU1200] "Au1200", -+ [CPU_BCM4710] "BCM4710", -+ [CPU_BCM3302] "BCM3302", - }; - -- - static int show_cpuinfo(struct seq_file *m, void *v) - { - unsigned int version = current_cpu_data.processor_id; -diff -Naur linux.old/arch/mips/kernel/setup.c linux.dev/arch/mips/kernel/setup.c ---- linux.old/arch/mips/kernel/setup.c 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/kernel/setup.c 2006-04-06 15:34:14.000000000 +0200 -@@ -493,6 +493,7 @@ - void swarm_setup(void); - void hp_setup(void); - void au1x00_setup(void); -+ void brcm_setup(void); - void frame_info_init(void); - - frame_info_init(); -@@ -691,6 +692,11 @@ - pmc_yosemite_setup(); - break; - #endif -+#if defined(CONFIG_BCM4710) || defined(CONFIG_BCM4310) -+ case MACH_GROUP_BRCM: -+ brcm_setup(); -+ break; -+#endif - default: - panic("Unsupported architecture"); - } -diff -Naur linux.old/arch/mips/kernel/traps.c linux.dev/arch/mips/kernel/traps.c ---- linux.old/arch/mips/kernel/traps.c 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/kernel/traps.c 2006-04-06 15:34:14.000000000 +0200 -@@ -920,6 +920,7 @@ - void __init trap_init(void) - { - extern char except_vec1_generic; -+ extern char except_vec2_generic; - extern char except_vec3_generic, except_vec3_r4000; - extern char except_vec_ejtag_debug; - extern char except_vec4; -@@ -927,6 +928,7 @@ - - /* Copy the generic exception handler code to it's final destination. */ - memcpy((void *)(KSEG0 + 0x80), &except_vec1_generic, 0x80); -+ memcpy((void *)(KSEG0 + 0x100), &except_vec2_generic, 0x80); - - /* - * Setup default vectors -@@ -985,6 +987,12 @@ - set_except_vector(13, handle_tr); - set_except_vector(22, handle_mdmx); - -+ if (current_cpu_data.cputype == CPU_SB1) { -+ /* Enable timer interrupt and scd mapped interrupt */ -+ clear_c0_status(0xf000); -+ set_c0_status(0xc00); -+ } -+ - if (cpu_has_fpu && !cpu_has_nofpuex) - set_except_vector(15, handle_fpe); - -diff -Naur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c ---- linux.old/arch/mips/mm/c-r4k.c 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/mm/c-r4k.c 2006-04-06 15:34:15.000000000 +0200 -@@ -1166,3 +1166,47 @@ - build_clear_page(); - build_copy_page(); - } -+ -+#ifdef CONFIG_BCM4704 -+static void __init mips32_icache_fill(unsigned long addr, uint nbytes) -+{ -+ unsigned long ic_lsize = current_cpu_data.icache.linesz; -+ int i; -+ for (i = 0; i < nbytes; i += ic_lsize) -+ fill_icache_line((addr + i)); -+} -+ -+/* -+ * This must be run from the cache on 4704A0 -+ * so there are no mips core BIU ops in progress -+ * when the PFC is enabled. -+ */ -+#define PFC_CR0 0xff400000 /* control reg 0 */ -+#define PFC_CR1 0xff400004 /* control reg 1 */ -+static void __init enable_pfc(u32 mode) -+{ -+ /* write range */ -+ *(volatile u32 *)PFC_CR1 = 0xffff0000; -+ -+ /* enable */ -+ *(volatile u32 *)PFC_CR0 = mode; -+} -+#endif -+ -+ -+void check_enable_mips_pfc(int val) -+{ -+ -+#ifdef CONFIG_BCM4704 -+ struct cpuinfo_mips *c = ¤t_cpu_data; -+ -+ /* enable prefetch cache */ -+ if (((c->processor_id & (PRID_COMP_MASK | PRID_IMP_MASK)) == PRID_IMP_BCM3302) -+ && (read_c0_diag() & (1 << 29))) { -+ mips32_icache_fill((unsigned long) &enable_pfc, 64); -+ enable_pfc(val); -+ } -+#endif -+} -+ -+ -diff -Naur linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile ---- linux.old/arch/mips/pci/Makefile 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/arch/mips/pci/Makefile 2006-04-06 15:34:14.000000000 +0200 -@@ -13,7 +13,9 @@ - obj-$(CONFIG_MIPS_MSC) += ops-msc.o - obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o - obj-$(CONFIG_SNI_RM200_PCI) += ops-sni.o -+ifndef CONFIG_BCM947XX - obj-y += pci.o -+endif - obj-$(CONFIG_PCI_AUTO) += pci_auto.o - - include $(TOPDIR)/Rules.make -diff -Naur linux.old/drivers/char/serial.c linux.dev/drivers/char/serial.c ---- linux.old/drivers/char/serial.c 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/drivers/char/serial.c 2006-04-06 15:34:14.000000000 +0200 -@@ -444,6 +444,10 @@ - return inb(info->port+1); - #endif - case SERIAL_IO_MEM: -+#ifdef CONFIG_BCM4310 -+ readb((unsigned long) info->iomem_base + -+ (UART_SCR<<info->iomem_reg_shift)); -+#endif - return readb((unsigned long) info->iomem_base + - (offset<<info->iomem_reg_shift)); - default: -@@ -464,6 +468,9 @@ - case SERIAL_IO_MEM: - writeb(value, (unsigned long) info->iomem_base + - (offset<<info->iomem_reg_shift)); -+#ifdef CONFIG_BCM4704 -+ *((volatile unsigned int *) KSEG1ADDR(0x18000000)); -+#endif - break; - default: - outb(value, info->port+offset); -@@ -1728,7 +1735,7 @@ - /* Special case since 134 is really 134.5 */ - quot = (2*baud_base / 269); - else if (baud) -- quot = baud_base / baud; -+ quot = (baud_base + (baud / 2)) / baud; - } - /* If the quotient is zero refuse the change */ - if (!quot && old_termios) { -@@ -1745,12 +1752,12 @@ - /* Special case since 134 is really 134.5 */ - quot = (2*baud_base / 269); - else if (baud) -- quot = baud_base / baud; -+ quot = (baud_base + (baud / 2)) / baud; - } - } - /* As a last resort, if the quotient is zero, default to 9600 bps */ - if (!quot) -- quot = baud_base / 9600; -+ quot = (baud_base + 4800) / 9600; - /* - * Work around a bug in the Oxford Semiconductor 952 rev B - * chip which causes it to seriously miscalculate baud rates -@@ -5994,6 +6001,13 @@ - * Divisor, bytesize and parity - */ - state = rs_table + co->index; -+ /* -+ * Safe guard: state structure must have been initialized -+ */ -+ if (state->iomem_base == NULL) { -+ printk("!unable to setup serial console!\n"); -+ return -1; -+ } - if (doflow) - state->flags |= ASYNC_CONS_FLOW; - info = &async_sercons; -@@ -6007,7 +6021,7 @@ - info->io_type = state->io_type; - info->iomem_base = state->iomem_base; - info->iomem_reg_shift = state->iomem_reg_shift; -- quot = state->baud_base / baud; -+ quot = (state->baud_base + (baud / 2)) / baud; - cval = cflag & (CSIZE | CSTOPB); - #if defined(__powerpc__) || defined(__alpha__) - cval >>= 8; -diff -Naur linux.old/drivers/net/Config.in linux.dev/drivers/net/Config.in ---- linux.old/drivers/net/Config.in 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/drivers/net/Config.in 2006-04-06 15:34:14.000000000 +0200 -@@ -2,6 +2,8 @@ - # Network device configuration - # - -+tristate 'Broadcom Home Network Division' CONFIG_HND $CONFIG_PCI -+ - source drivers/net/arcnet/Config.in - - tristate 'Dummy net driver support' CONFIG_DUMMY -diff -Naur linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile ---- linux.old/drivers/net/Makefile 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/drivers/net/Makefile 2006-04-06 16:45:29.000000000 +0200 -@@ -3,6 +3,8 @@ - # Makefile for the Linux network (ethercard) device drivers. - # - -+EXTRA_CFLAGS := -I$(TOPDIR)/arch/mips/bcm947xx/include -+ - obj-y := - obj-m := - obj-n := -@@ -39,6 +41,9 @@ - obj-$(CONFIG_ISDN) += slhc.o - endif - -+subdir-$(CONFIG_HND) += hnd -+subdir-$(CONFIG_WL) += wl -+subdir-$(CONFIG_WL2) += wl2 - subdir-$(CONFIG_NET_PCMCIA) += pcmcia - subdir-$(CONFIG_NET_WIRELESS) += wireless - subdir-$(CONFIG_TULIP) += tulip -@@ -69,6 +74,10 @@ - obj-$(CONFIG_MYRI_SBUS) += myri_sbus.o - obj-$(CONFIG_SUNGEM) += sungem.o - -+ifeq ($(CONFIG_HND),y) -+ obj-y += hnd/hnd.o -+endif -+ - obj-$(CONFIG_MACE) += mace.o - obj-$(CONFIG_BMAC) += bmac.o - obj-$(CONFIG_GMAC) += gmac.o -diff -Naur linux.old/drivers/net/hnd/Makefile linux.dev/drivers/net/hnd/Makefile ---- linux.old/drivers/net/hnd/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/hnd/Makefile 2006-04-06 16:20:00.000000000 +0200 -@@ -0,0 +1,19 @@ -+# -+# Makefile for the BCM47xx specific kernel interface routines -+# under Linux. -+# -+ -+EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER -+ -+O_TARGET := hnd.o -+ -+HND_OBJS := bcmutils.o linux_osl.o sbutils.o bcmsrom.o -+ -+export-objs := shared_ksyms.o -+obj-y := shared_ksyms.o $(HND_OBJS) -+obj-m := $(O_TARGET) -+ -+include $(TOPDIR)/Rules.make -+ -+shared_ksyms.c: shared_ksyms.sh $(HND_OBJS) -+ sh -e $< $(HND_OBJS) > $@ -diff -Naur linux.old/drivers/net/hnd/bcmsrom.c linux.dev/drivers/net/hnd/bcmsrom.c ---- linux.old/drivers/net/hnd/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/hnd/bcmsrom.c 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,938 @@ -+/* -+ * Misc useful routines to access NIC SROM/OTP . -+ * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ -+ */ -+ -+#include <typedefs.h> -+#include <osl.h> -+#include <bcmutils.h> -+#include <bcmsrom.h> -+#include <bcmdevs.h> -+#include <bcmendian.h> -+#include <sbpcmcia.h> -+#include <pcicfg.h> -+#include <sbutils.h> -+#include <bcmnvram.h> -+ -+struct ether_addr { -+ uint8 octet[6]; -+} PACKED; -+ -+#define VARS_MAX 4096 /* should be reduced */ -+ -+#define WRITE_ENABLE_DELAY 500 /* 500 ms after write enable/disable toggle */ -+#define WRITE_WORD_DELAY 20 /* 20 ms between each word write */ -+ -+static int initvars_srom_pci(void *sbh, void *curmap, char **vars, int *count); -+static int initvars_cis_pcmcia(void *sbh, osl_t *osh, char **vars, int *count); -+static int initvars_flash_sb(void *sbh, char **vars, int *count); -+static int srom_parsecis(osl_t *osh, uint8 *cis, char **vars, int *count); -+static int sprom_cmd_pcmcia(osl_t *osh, uint8 cmd); -+static int sprom_read_pcmcia(osl_t *osh, uint16 addr, uint16 *data); -+static int sprom_write_pcmcia(osl_t *osh, uint16 addr, uint16 data); -+static int sprom_read_pci(uint16 *sprom, uint wordoff, uint16 *buf, uint nwords, bool check_crc); -+ -+static int initvars_table(osl_t *osh, char *start, char *end, char **vars, uint *count); -+static int initvars_flash(osl_t *osh, char **vp, int len, char *devpath); -+ -+/* -+ * Initialize local vars from the right source for this platform. -+ * Return 0 on success, nonzero on error. -+ */ -+int -+srom_var_init(void *sbh, uint bustype, void *curmap, osl_t *osh, char **vars, int *count) -+{ -+ ASSERT(bustype == BUSTYPE(bustype)); -+ if (vars == NULL || count == NULL) -+ return (0); -+ -+ switch (BUSTYPE(bustype)) { -+ case SB_BUS: -+ case JTAG_BUS: -+ return initvars_flash_sb(sbh, vars, count); -+ -+ case PCI_BUS: -+ ASSERT(curmap); /* can not be NULL */ -+ return initvars_srom_pci(sbh, curmap, vars, count); -+ -+ case PCMCIA_BUS: -+ return initvars_cis_pcmcia(sbh, osh, vars, count); -+ -+ -+ default: -+ ASSERT(0); -+ } -+ return (-1); -+} -+ -+/* support only 16-bit word read from srom */ -+int -+srom_read(uint bustype, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf) -+{ -+ void *srom; -+ uint i, off, nw; -+ -+ ASSERT(bustype == BUSTYPE(bustype)); -+ -+ /* check input - 16-bit access only */ -+ if (byteoff & 1 || nbytes & 1 || (byteoff + nbytes) > (SPROM_SIZE * 2)) -+ return 1; -+ -+ off = byteoff / 2; -+ nw = nbytes / 2; -+ -+ if (BUSTYPE(bustype) == PCI_BUS) { -+ if (!curmap) -+ return 1; -+ srom = (uchar*)curmap + PCI_BAR0_SPROM_OFFSET; -+ if (sprom_read_pci(srom, off, buf, nw, FALSE)) -+ return 1; -+ } else if (BUSTYPE(bustype) == PCMCIA_BUS) { -+ for (i = 0; i < nw; i++) { -+ if (sprom_read_pcmcia(osh, (uint16)(off + i), (uint16*)(buf + i))) -+ return 1; -+ } -+ } else { -+ return 1; -+ } -+ -+ return 0; -+} -+ -+/* support only 16-bit word write into srom */ -+int -+srom_write(uint bustype, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf) -+{ -+ uint16 *srom; -+ uint i, off, nw, crc_range; -+ uint16 image[SPROM_SIZE], *p; -+ uint8 crc; -+ volatile uint32 val32; -+ -+ ASSERT(bustype == BUSTYPE(bustype)); -+ -+ /* check input - 16-bit access only */ -+ if (byteoff & 1 || nbytes & 1 || (byteoff + nbytes) > (SPROM_SIZE * 2)) -+ return 1; -+ -+ crc_range = (((BUSTYPE(bustype) == PCMCIA_BUS) || (BUSTYPE(bustype) == SDIO_BUS)) ? SPROM_SIZE : SPROM_CRC_RANGE) * 2; -+ -+ /* if changes made inside crc cover range */ -+ if (byteoff < crc_range) { -+ nw = (((byteoff + nbytes) > crc_range) ? byteoff + nbytes : crc_range) / 2; -+ /* read data including entire first 64 words from srom */ -+ if (srom_read(bustype, curmap, osh, 0, nw * 2, image)) -+ return 1; -+ /* make changes */ -+ bcopy((void*)buf, (void*)&image[byteoff / 2], nbytes); -+ /* calculate crc */ -+ htol16_buf(image, crc_range); -+ crc = ~hndcrc8((uint8 *)image, crc_range - 1, CRC8_INIT_VALUE); -+ ltoh16_buf(image, crc_range); -+ image[(crc_range / 2) - 1] = (crc << 8) | (image[(crc_range / 2) - 1] & 0xff); -+ p = image; -+ off = 0; -+ } else { -+ p = buf; -+ off = byteoff / 2; -+ nw = nbytes / 2; -+ } -+ -+ if (BUSTYPE(bustype) == PCI_BUS) { -+ srom = (uint16*)((uchar*)curmap + PCI_BAR0_SPROM_OFFSET); -+ /* enable writes to the SPROM */ -+ val32 = OSL_PCI_READ_CONFIG(osh, PCI_SPROM_CONTROL, sizeof(uint32)); -+ val32 |= SPROM_WRITEEN; -+ OSL_PCI_WRITE_CONFIG(osh, PCI_SPROM_CONTROL, sizeof(uint32), val32); -+ bcm_mdelay(WRITE_ENABLE_DELAY); -+ /* write srom */ -+ for (i = 0; i < nw; i++) { -+ W_REG(&srom[off + i], p[i]); -+ bcm_mdelay(WRITE_WORD_DELAY); -+ } -+ /* disable writes to the SPROM */ -+ OSL_PCI_WRITE_CONFIG(osh, PCI_SPROM_CONTROL, sizeof(uint32), val32 & ~SPROM_WRITEEN); -+ } else if (BUSTYPE(bustype) == PCMCIA_BUS) { -+ /* enable writes to the SPROM */ -+ if (sprom_cmd_pcmcia(osh, SROM_WEN)) -+ return 1; -+ bcm_mdelay(WRITE_ENABLE_DELAY); -+ /* write srom */ -+ for (i = 0; i < nw; i++) { -+ sprom_write_pcmcia(osh, (uint16)(off + i), p[i]); -+ bcm_mdelay(WRITE_WORD_DELAY); -+ } -+ /* disable writes to the SPROM */ -+ if (sprom_cmd_pcmcia(osh, SROM_WDS)) -+ return 1; -+ } else { -+ return 1; -+ } -+ -+ bcm_mdelay(WRITE_ENABLE_DELAY); -+ return 0; -+} -+ -+ -+static int -+srom_parsecis(osl_t *osh, uint8 *cis, char **vars, int *count) -+{ -+ char eabuf[32]; -+ char *vp, *base; -+ uint8 tup, tlen, sromrev = 1; -+ int i, j; -+ uint varsize; -+ bool ag_init = FALSE; -+ uint32 w32; -+ -+ ASSERT(vars); -+ ASSERT(count); -+ -+ base = vp = MALLOC(osh, VARS_MAX); -+ ASSERT(vp); -+ if (!vp) -+ return -2; -+ -+ i = 0; -+ do { -+ tup = cis[i++]; -+ tlen = cis[i++]; -+ if ((i + tlen) >= CIS_SIZE) -+ break; -+ -+ switch (tup) { -+ case CISTPL_MANFID: -+ vp += sprintf(vp, "manfid=%d", (cis[i + 1] << 8) + cis[i]); -+ vp++; -+ vp += sprintf(vp, "prodid=%d", (cis[i + 3] << 8) + cis[i + 2]); -+ vp++; -+ break; -+ -+ case CISTPL_FUNCE: -+ if (cis[i] == LAN_NID) { -+ ASSERT(cis[i + 1] == 6); -+ bcm_ether_ntoa((uchar*)&cis[i + 2], eabuf); -+ vp += sprintf(vp, "il0macaddr=%s", eabuf); -+ vp++; -+ } -+ break; -+ -+ case CISTPL_CFTABLE: -+ vp += sprintf(vp, "regwindowsz=%d", (cis[i + 7] << 8) | cis[i + 6]); -+ vp++; -+ break; -+ -+ case CISTPL_BRCM_HNBU: -+ switch (cis[i]) { -+ case HNBU_SROMREV: -+ sromrev = cis[i + 1]; -+ break; -+ -+ case HNBU_CHIPID: -+ vp += sprintf(vp, "vendid=%d", (cis[i + 2] << 8) + cis[i + 1]); -+ vp++; -+ vp += sprintf(vp, "devid=%d", (cis[i + 4] << 8) + cis[i + 3]); -+ vp++; -+ if (tlen == 7) { -+ vp += sprintf(vp, "chiprev=%d", (cis[i + 6] << 8) + cis[i + 5]); -+ vp++; -+ } -+ break; -+ -+ case HNBU_BOARDREV: -+ vp += sprintf(vp, "boardrev=%d", cis[i + 1]); -+ vp++; -+ break; -+ -+ case HNBU_AA: -+ vp += sprintf(vp, "aa0=%d", cis[i + 1]); -+ vp++; -+ break; -+ -+ case HNBU_AG: -+ vp += sprintf(vp, "ag0=%d", cis[i + 1]); -+ vp++; -+ ag_init = TRUE; -+ break; -+ -+ case HNBU_CC: -+ ASSERT(sromrev > 1); -+ vp += sprintf(vp, "cc=%d", cis[i + 1]); -+ vp++; -+ break; -+ -+ case HNBU_PAPARMS: -+ if (tlen == 2) { -+ ASSERT(sromrev == 1); -+ vp += sprintf(vp, "pa0maxpwr=%d", cis[i + 1]); -+ vp++; -+ } else if (tlen >= 9) { -+ if (tlen == 10) { -+ ASSERT(sromrev == 2); -+ vp += sprintf(vp, "opo=%d", cis[i + 9]); -+ vp++; -+ } else -+ ASSERT(tlen == 9); -+ -+ for (j = 0; j < 3; j++) { -+ vp += sprintf(vp, "pa0b%d=%d", j, -+ (cis[i + (j * 2) + 2] << 8) + cis[i + (j * 2) + 1]); -+ vp++; -+ } -+ vp += sprintf(vp, "pa0itssit=%d", cis[i + 7]); -+ vp++; -+ vp += sprintf(vp, "pa0maxpwr=%d", cis[i + 8]); -+ vp++; -+ } else -+ ASSERT(tlen >= 9); -+ break; -+ -+ case HNBU_OEM: -+ ASSERT(sromrev == 1); -+ vp += sprintf(vp, "oem=%02x%02x%02x%02x%02x%02x%02x%02x", -+ cis[i + 1], cis[i + 2], cis[i + 3], cis[i + 4], -+ cis[i + 5], cis[i + 6], cis[i + 7], cis[i + 8]); -+ vp++; -+ break; -+ -+ case HNBU_BOARDFLAGS: -+ w32 = (cis[i + 2] << 8) + cis[i + 1]; -+ if (tlen == 5) -+ w32 |= (cis[i + 4] << 24) + (cis[i + 3] << 16); -+ vp += sprintf(vp, "boardflags=0x%x", w32); -+ vp++; -+ break; -+ -+ case HNBU_LEDS: -+ if (cis[i + 1] != 0xff) { -+ vp += sprintf(vp, "wl0gpio0=%d", cis[i + 1]); -+ vp++; -+ } -+ if (cis[i + 2] != 0xff) { -+ vp += sprintf(vp, "wl0gpio1=%d", cis[i + 2]); -+ vp++; -+ } -+ if (cis[i + 3] != 0xff) { -+ vp += sprintf(vp, "wl0gpio2=%d", cis[i + 3]); -+ vp++; -+ } -+ if (cis[i + 4] != 0xff) { -+ vp += sprintf(vp, "wl0gpio3=%d", cis[i + 4]); -+ vp++; -+ } -+ break; -+ -+ case HNBU_CCODE: -+ ASSERT(sromrev > 1); -+ vp += sprintf(vp, "ccode=%c%c", cis[i + 1], cis[i + 2]); -+ vp++; -+ vp += sprintf(vp, "cctl=0x%x", cis[i + 3]); -+ vp++; -+ break; -+ -+ case HNBU_CCKPO: -+ ASSERT(sromrev > 2); -+ vp += sprintf(vp, "cckpo=0x%x", (cis[i + 2] << 8) | cis[i + 1]); -+ vp++; -+ break; -+ -+ case HNBU_OFDMPO: -+ ASSERT(sromrev > 2); -+ vp += sprintf(vp, "ofdmpo=0x%x", (cis[i + 4] << 24) | -+ (cis[i + 3] << 16) | (cis[i + 2] << 8) | cis[i + 1]); -+ vp++; -+ break; -+ } -+ break; -+ -+ } -+ i += tlen; -+ } while (tup != 0xff); -+ -+ /* Set the srom version */ -+ vp += sprintf(vp, "sromrev=%d", sromrev); -+ vp++; -+ -+ /* if there is no antenna gain field, set default */ -+ if (ag_init == FALSE) { -+ ASSERT(sromrev == 1); -+ vp += sprintf(vp, "ag0=%d", 0xff); -+ vp++; -+ } -+ -+ /* final nullbyte terminator */ -+ *vp++ = '\0'; -+ varsize = (uint)(vp - base); -+ -+ ASSERT((vp - base) < VARS_MAX); -+ -+ if (varsize == VARS_MAX) { -+ *vars = base; -+ } else { -+ vp = MALLOC(osh, varsize); -+ ASSERT(vp); -+ if (vp) -+ bcopy(base, vp, varsize); -+ MFREE(osh, base, VARS_MAX); -+ *vars = vp; -+ if (!vp) { -+ *count = 0; -+ return -2; -+ } -+ } -+ *count = varsize; -+ -+ return (0); -+} -+ -+ -+/* set PCMCIA sprom command register */ -+static int -+sprom_cmd_pcmcia(osl_t *osh, uint8 cmd) -+{ -+ uint8 status = 0; -+ uint wait_cnt = 1000; -+ -+ /* write sprom command register */ -+ OSL_PCMCIA_WRITE_ATTR(osh, SROM_CS, &cmd, 1); -+ -+ /* wait status */ -+ while (wait_cnt--) { -+ OSL_PCMCIA_READ_ATTR(osh, SROM_CS, &status, 1); -+ if (status & SROM_DONE) -+ return 0; -+ } -+ -+ return 1; -+} -+ -+/* read a word from the PCMCIA srom */ -+static int -+sprom_read_pcmcia(osl_t *osh, uint16 addr, uint16 *data) -+{ -+ uint8 addr_l, addr_h, data_l, data_h; -+ -+ addr_l = (uint8)((addr * 2) & 0xff); -+ addr_h = (uint8)(((addr * 2) >> 8) & 0xff); -+ -+ /* set address */ -+ OSL_PCMCIA_WRITE_ATTR(osh, SROM_ADDRH, &addr_h, 1); -+ OSL_PCMCIA_WRITE_ATTR(osh, SROM_ADDRL, &addr_l, 1); -+ -+ /* do read */ -+ if (sprom_cmd_pcmcia(osh, SROM_READ)) -+ return 1; -+ -+ /* read data */ -+ data_h = data_l = 0; -+ OSL_PCMCIA_READ_ATTR(osh, SROM_DATAH, &data_h, 1); -+ OSL_PCMCIA_READ_ATTR(osh, SROM_DATAL, &data_l, 1); -+ -+ *data = (data_h << 8) | data_l; -+ return 0; -+} -+ -+/* write a word to the PCMCIA srom */ -+static int -+sprom_write_pcmcia(osl_t *osh, uint16 addr, uint16 data) -+{ -+ uint8 addr_l, addr_h, data_l, data_h; -+ -+ addr_l = (uint8)((addr * 2) & 0xff); -+ addr_h = (uint8)(((addr * 2) >> 8) & 0xff); -+ data_l = (uint8)(data & 0xff); -+ data_h = (uint8)((data >> 8) & 0xff); -+ -+ /* set address */ -+ OSL_PCMCIA_WRITE_ATTR(osh, SROM_ADDRH, &addr_h, 1); -+ OSL_PCMCIA_WRITE_ATTR(osh, SROM_ADDRL, &addr_l, 1); -+ -+ /* write data */ -+ OSL_PCMCIA_WRITE_ATTR(osh, SROM_DATAH, &data_h, 1); -+ OSL_PCMCIA_WRITE_ATTR(osh, SROM_DATAL, &data_l, 1); -+ -+ /* do write */ -+ return sprom_cmd_pcmcia(osh, SROM_WRITE); -+} -+ -+/* -+ * Read in and validate sprom. -+ * Return 0 on success, nonzero on error. -+ */ -+static int -+sprom_read_pci(uint16 *sprom, uint wordoff, uint16 *buf, uint nwords, bool check_crc) -+{ -+ int err = 0; -+ uint i; -+ -+ /* read the sprom */ -+ for (i = 0; i < nwords; i++) -+ buf[i] = R_REG(&sprom[wordoff + i]); -+ -+ if (check_crc) { -+ /* fixup the endianness so crc8 will pass */ -+ htol16_buf(buf, nwords * 2); -+ if (hndcrc8((uint8*)buf, nwords * 2, CRC8_INIT_VALUE) != CRC8_GOOD_VALUE) -+ err = 1; -+ /* now correct the endianness of the byte array */ -+ ltoh16_buf(buf, nwords * 2); -+ } -+ -+ return err; -+} -+ -+/* -+* Create variable table from memory. -+* Return 0 on success, nonzero on error. -+*/ -+static int -+initvars_table(osl_t *osh, char *start, char *end, char **vars, uint *count) -+{ -+ int c = (int)(end - start); -+ -+ /* do it only when there is more than just the null string */ -+ if (c > 1) { -+ char *vp = MALLOC(osh, c); -+ ASSERT(vp); -+ if (!vp) -+ return BCME_NOMEM; -+ bcopy(start, vp, c); -+ *vars = vp; -+ *count = c; -+ } -+ else { -+ *vars = NULL; -+ *count = 0; -+ } -+ -+ return 0; -+} -+ -+/* -+* Find variables with <devpath> from flash. 'base' points to the beginning -+* of the table upon enter and to the end of the table upon exit when success. -+* Return 0 on success, nonzero on error. -+*/ -+static int -+initvars_flash(osl_t *osh, char **base, int size, char *devpath) -+{ -+ char *vp = *base; -+ char *flash; -+ int err; -+ char *s; -+ uint l, dl, copy_len; -+ -+ /* allocate memory and read in flash */ -+ if (!(flash = MALLOC(osh, NVRAM_SPACE))) -+ return BCME_NOMEM; -+ if ((err = BCMINIT(nvram_getall)(flash, NVRAM_SPACE))) -+ goto exit; -+ -+ /* grab vars with the <devpath> prefix in name */ -+ dl = strlen(devpath); -+ for (s = flash; s && *s; s += l + 1) { -+ l = strlen(s); -+ -+ /* skip non-matching variable */ -+ if (strncmp(s, devpath, dl)) -+ continue; -+ -+ /* is there enough room to copy? */ -+ copy_len = l - dl + 1; -+ if (size < (int)copy_len) { -+ err = BCME_BUFTOOSHORT; -+ goto exit; -+ } -+ -+ /* no prefix, just the name=value */ -+ strcpy(vp, &s[dl]); -+ vp += copy_len; -+ size -= copy_len; -+ } -+ -+ /* add null string as terminator */ -+ if (size < 1) { -+ err = BCME_BUFTOOSHORT; -+ goto exit; -+ } -+ *vp++ = '\0'; -+ -+ *base = vp; -+ -+exit: MFREE(osh, flash, NVRAM_SPACE); -+ return err; -+} -+ -+/* -+ * Initialize nonvolatile variable table from flash. -+ * Return 0 on success, nonzero on error. -+ */ -+static int -+initvars_flash_sb(void *sbh, char **vars, int *count) -+{ -+ osl_t *osh = sb_osh(sbh); -+ char devpath[SB_DEVPATH_BUFSZ]; -+ char *vp, *base; -+ int err; -+ -+ ASSERT(vars); -+ ASSERT(count); -+ -+ if ((err = sb_devpath(sbh, devpath, sizeof(devpath)))) -+ return err; -+ -+ base = vp = MALLOC(osh, VARS_MAX); -+ ASSERT(vp); -+ if (!vp) -+ return BCME_NOMEM; -+ -+ if ((err = initvars_flash(osh, &vp, VARS_MAX, devpath))) -+ goto err; -+ -+ err = initvars_table(osh, base, vp, vars, count); -+ -+err: MFREE(osh, base, VARS_MAX); -+ return err; -+} -+ -+/* -+ * Initialize nonvolatile variable table from sprom. -+ * Return 0 on success, nonzero on error. -+ */ -+static int -+initvars_srom_pci(void *sbh, void *curmap, char **vars, int *count) -+{ -+ uint16 w, b[64]; -+ uint8 sromrev; -+ struct ether_addr ea; -+ char eabuf[32]; -+ uint32 w32; -+ int woff, i; -+ char *vp, *base; -+ osl_t *osh = sb_osh(sbh); -+ bool flash = FALSE; -+ char name[SB_DEVPATH_BUFSZ+16], *value; -+ char devpath[SB_DEVPATH_BUFSZ]; -+ int err; -+ -+ /* -+ * Apply CRC over SROM content regardless SROM is present or not, -+ * and use variable <devpath>sromrev's existance in flash to decide -+ * if we should return an error when CRC fails or read SROM variables -+ * from flash. -+ */ -+ if (sprom_read_pci((void*)((int8*)curmap + PCI_BAR0_SPROM_OFFSET), 0, b, sizeof(b)/sizeof(b[0]), TRUE)) { -+ if ((err = sb_devpath(sbh, devpath, sizeof(devpath)))) -+ return err; -+ sprintf(name, "%ssromrev", devpath); -+ if (!(value = getvar(NULL, name))) -+ return (-1); -+ sromrev = (uint8)bcm_strtoul(value, NULL, 0); -+ flash = TRUE; -+ } -+ /* srom is good */ -+ else { -+ /* top word of sprom contains version and crc8 */ -+ sromrev = b[63] & 0xff; -+ /* bcm4401 sroms misprogrammed */ -+ if (sromrev == 0x10) -+ sromrev = 1; -+ } -+ -+ /* srom version check */ -+ if (sromrev > 3) -+ return (-2); -+ -+ ASSERT(vars); -+ ASSERT(count); -+ -+ base = vp = MALLOC(osh, VARS_MAX); -+ ASSERT(vp); -+ if (!vp) -+ return -2; -+ -+ /* read variables from flash */ -+ if (flash) { -+ if ((err = initvars_flash(osh, &vp, VARS_MAX, devpath))) -+ goto err; -+ goto done; -+ } -+ -+ vp += sprintf(vp, "sromrev=%d", sromrev); -+ vp++; -+ -+ if (sromrev >= 3) { -+ /* New section takes over the 3th hardware function space */ -+ -+ /* Words 22+23 are 11a (mid) ofdm power offsets */ -+ w32 = ((uint32)b[23] << 16) | b[22]; -+ vp += sprintf(vp, "ofdmapo=%d", w32); -+ vp++; -+ -+ /* Words 24+25 are 11a (low) ofdm power offsets */ -+ w32 = ((uint32)b[25] << 16) | b[24]; -+ vp += sprintf(vp, "ofdmalpo=%d", w32); -+ vp++; -+ -+ /* Words 26+27 are 11a (high) ofdm power offsets */ -+ w32 = ((uint32)b[27] << 16) | b[26]; -+ vp += sprintf(vp, "ofdmahpo=%d", w32); -+ vp++; -+ -+ /*GPIO LED Powersave duty cycle (oncount >> 24) (offcount >> 8)*/ -+ w32 = ((uint32)b[43] << 24) | ((uint32)b[42] << 8); -+ vp += sprintf(vp, "gpiotimerval=%d", w32); -+ -+ /*GPIO LED Powersave duty cycle (oncount >> 24) (offcount >> 8)*/ -+ w32 = ((uint32)((unsigned char)(b[21] >> 8) & 0xFF) << 24) | /* oncount*/ -+ ((uint32)((unsigned char)(b[21] & 0xFF)) << 8); /* offcount */ -+ vp += sprintf(vp, "gpiotimerval=%d", w32); -+ -+ vp++; -+ } -+ -+ if (sromrev >= 2) { -+ /* New section takes over the 4th hardware function space */ -+ -+ /* Word 29 is max power 11a high/low */ -+ w = b[29]; -+ vp += sprintf(vp, "pa1himaxpwr=%d", w & 0xff); -+ vp++; -+ vp += sprintf(vp, "pa1lomaxpwr=%d", (w >> 8) & 0xff); -+ vp++; -+ -+ /* Words 30-32 set the 11alow pa settings, -+ * 33-35 are the 11ahigh ones. -+ */ -+ for (i = 0; i < 3; i++) { -+ vp += sprintf(vp, "pa1lob%d=%d", i, b[30 + i]); -+ vp++; -+ vp += sprintf(vp, "pa1hib%d=%d", i, b[33 + i]); -+ vp++; -+ } -+ w = b[59]; -+ if (w == 0) -+ vp += sprintf(vp, "ccode="); -+ else -+ vp += sprintf(vp, "ccode=%c%c", (w >> 8), (w & 0xff)); -+ vp++; -+ -+ } -+ -+ /* parameter section of sprom starts at byte offset 72 */ -+ woff = 72/2; -+ -+ /* first 6 bytes are il0macaddr */ -+ ea.octet[0] = (b[woff] >> 8) & 0xff; -+ ea.octet[1] = b[woff] & 0xff; -+ ea.octet[2] = (b[woff+1] >> 8) & 0xff; -+ ea.octet[3] = b[woff+1] & 0xff; -+ ea.octet[4] = (b[woff+2] >> 8) & 0xff; -+ ea.octet[5] = b[woff+2] & 0xff; -+ woff += 3; -+ bcm_ether_ntoa((uchar*)&ea, eabuf); -+ vp += sprintf(vp, "il0macaddr=%s", eabuf); -+ vp++; -+ -+ /* next 6 bytes are et0macaddr */ -+ ea.octet[0] = (b[woff] >> 8) & 0xff; -+ ea.octet[1] = b[woff] & 0xff; -+ ea.octet[2] = (b[woff+1] >> 8) & 0xff; -+ ea.octet[3] = b[woff+1] & 0xff; -+ ea.octet[4] = (b[woff+2] >> 8) & 0xff; -+ ea.octet[5] = b[woff+2] & 0xff; -+ woff += 3; -+ bcm_ether_ntoa((uchar*)&ea, eabuf); -+ vp += sprintf(vp, "et0macaddr=%s", eabuf); -+ vp++; -+ -+ /* next 6 bytes are et1macaddr */ -+ ea.octet[0] = (b[woff] >> 8) & 0xff; -+ ea.octet[1] = b[woff] & 0xff; -+ ea.octet[2] = (b[woff+1] >> 8) & 0xff; -+ ea.octet[3] = b[woff+1] & 0xff; -+ ea.octet[4] = (b[woff+2] >> 8) & 0xff; -+ ea.octet[5] = b[woff+2] & 0xff; -+ woff += 3; -+ bcm_ether_ntoa((uchar*)&ea, eabuf); -+ vp += sprintf(vp, "et1macaddr=%s", eabuf); -+ vp++; -+ -+ /* -+ * Enet phy settings one or two singles or a dual -+ * Bits 4-0 : MII address for enet0 (0x1f for not there) -+ * Bits 9-5 : MII address for enet1 (0x1f for not there) -+ * Bit 14 : Mdio for enet0 -+ * Bit 15 : Mdio for enet1 -+ */ -+ w = b[woff]; -+ vp += sprintf(vp, "et0phyaddr=%d", (w & 0x1f)); -+ vp++; -+ vp += sprintf(vp, "et1phyaddr=%d", ((w >> 5) & 0x1f)); -+ vp++; -+ vp += sprintf(vp, "et0mdcport=%d", ((w >> 14) & 0x1)); -+ vp++; -+ vp += sprintf(vp, "et1mdcport=%d", ((w >> 15) & 0x1)); -+ vp++; -+ -+ /* Word 46 has board rev, antennas 0/1 & Country code/control */ -+ w = b[46]; -+ vp += sprintf(vp, "boardrev=%d", w & 0xff); -+ vp++; -+ -+ if (sromrev > 1) -+ vp += sprintf(vp, "cctl=%d", (w >> 8) & 0xf); -+ else -+ vp += sprintf(vp, "cc=%d", (w >> 8) & 0xf); -+ vp++; -+ -+ vp += sprintf(vp, "aa0=%d", (w >> 12) & 0x3); -+ vp++; -+ -+ vp += sprintf(vp, "aa1=%d", (w >> 14) & 0x3); -+ vp++; -+ -+ /* Words 47-49 set the (wl) pa settings */ -+ woff = 47; -+ -+ for (i = 0; i < 3; i++) { -+ vp += sprintf(vp, "pa0b%d=%d", i, b[woff+i]); -+ vp++; -+ vp += sprintf(vp, "pa1b%d=%d", i, b[woff+i+6]); -+ vp++; -+ } -+ -+ /* -+ * Words 50-51 set the customer-configured wl led behavior. -+ * 8 bits/gpio pin. High bit: activehi=0, activelo=1; -+ * LED behavior values defined in wlioctl.h . -+ */ -+ w = b[50]; -+ if ((w != 0) && (w != 0xffff)) { -+ /* gpio0 */ -+ vp += sprintf(vp, "wl0gpio0=%d", (w & 0xff)); -+ vp++; -+ -+ /* gpio1 */ -+ vp += sprintf(vp, "wl0gpio1=%d", (w >> 8) & 0xff); -+ vp++; -+ } -+ w = b[51]; -+ if ((w != 0) && (w != 0xffff)) { -+ /* gpio2 */ -+ vp += sprintf(vp, "wl0gpio2=%d", w & 0xff); -+ vp++; -+ -+ /* gpio3 */ -+ vp += sprintf(vp, "wl0gpio3=%d", (w >> 8) & 0xff); -+ vp++; -+ } -+ -+ /* Word 52 is max power 0/1 */ -+ w = b[52]; -+ vp += sprintf(vp, "pa0maxpwr=%d", w & 0xff); -+ vp++; -+ vp += sprintf(vp, "pa1maxpwr=%d", (w >> 8) & 0xff); -+ vp++; -+ -+ /* Word 56 is idle tssi target 0/1 */ -+ w = b[56]; -+ vp += sprintf(vp, "pa0itssit=%d", w & 0xff); -+ vp++; -+ vp += sprintf(vp, "pa1itssit=%d", (w >> 8) & 0xff); -+ vp++; -+ -+ /* Word 57 is boardflags, if not programmed make it zero */ -+ w32 = (uint32)b[57]; -+ if (w32 == 0xffff) w32 = 0; -+ if (sromrev > 1) { -+ /* Word 28 is the high bits of boardflags */ -+ w32 |= (uint32)b[28] << 16; -+ } -+ vp += sprintf(vp, "boardflags=%d", w32); -+ vp++; -+ -+ /* Word 58 is antenna gain 0/1 */ -+ w = b[58]; -+ vp += sprintf(vp, "ag0=%d", w & 0xff); -+ vp++; -+ -+ vp += sprintf(vp, "ag1=%d", (w >> 8) & 0xff); -+ vp++; -+ -+ if (sromrev == 1) { -+ /* set the oem string */ -+ vp += sprintf(vp, "oem=%02x%02x%02x%02x%02x%02x%02x%02x", -+ ((b[59] >> 8) & 0xff), (b[59] & 0xff), -+ ((b[60] >> 8) & 0xff), (b[60] & 0xff), -+ ((b[61] >> 8) & 0xff), (b[61] & 0xff), -+ ((b[62] >> 8) & 0xff), (b[62] & 0xff)); -+ vp++; -+ } else if (sromrev == 2) { -+ /* Word 60 OFDM tx power offset from CCK level */ -+ /* OFDM Power Offset - opo */ -+ vp += sprintf(vp, "opo=%d", b[60] & 0xff); -+ vp++; -+ } else { -+ /* Word 60: cck power offsets */ -+ vp += sprintf(vp, "cckpo=%d", b[60]); -+ vp++; -+ -+ /* Words 61+62: 11g ofdm power offsets */ -+ w32 = ((uint32)b[62] << 16) | b[61]; -+ vp += sprintf(vp, "ofdmgpo=%d", w32); -+ vp++; -+ } -+ -+ /* final nullbyte terminator */ -+ *vp++ = '\0'; -+ -+ ASSERT((vp - base) <= VARS_MAX); -+ -+done: err = initvars_table(osh, base, vp, vars, count); -+ -+err: MFREE(osh, base, VARS_MAX); -+ return err; -+} -+ -+/* -+ * Read the cis and call parsecis to initialize the vars. -+ * Return 0 on success, nonzero on error. -+ */ -+static int -+initvars_cis_pcmcia(void *sbh, osl_t *osh, char **vars, int *count) -+{ -+ uint8 *cis = NULL; -+ int rc; -+ uint data_sz; -+ -+ data_sz = (sb_pcmciarev(sbh) == 1) ? (SPROM_SIZE * 2) : CIS_SIZE; -+ -+ if ((cis = MALLOC(osh, data_sz)) == NULL) -+ return (-2); -+ -+ if (sb_pcmciarev(sbh) == 1) { -+ if (srom_read(PCMCIA_BUS, (void *)NULL, osh, 0, data_sz, (uint16 *)cis)) { -+ MFREE(osh, cis, data_sz); -+ return (-1); -+ } -+ /* fix up endianess for 16-bit data vs 8-bit parsing */ -+ ltoh16_buf((uint16 *)cis, data_sz); -+ } else -+ OSL_PCMCIA_READ_ATTR(osh, 0, cis, data_sz); -+ -+ rc = srom_parsecis(osh, cis, vars, count); -+ -+ MFREE(osh, cis, data_sz); -+ -+ return (rc); -+} -+ -diff -Naur linux.old/drivers/net/hnd/bcmutils.c linux.dev/drivers/net/hnd/bcmutils.c ---- linux.old/drivers/net/hnd/bcmutils.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/hnd/bcmutils.c 2006-04-06 16:05:56.000000000 +0200 -@@ -0,0 +1,875 @@ -+/* -+ * Misc useful OS-independent routines. -+ * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ -+ */ -+ -+#include <typedefs.h> -+#ifdef BCMDRIVER -+#include <osl.h> -+#include <sbutils.h> -+#include <bcmnvram.h> -+#else -+#include <stdio.h> -+#include <string.h> -+#endif -+#include <bcmutils.h> -+#include <bcmendian.h> -+#include <bcmdevs.h> -+ -+#ifdef BCMDRIVER -+unsigned char bcm_ctype[] = { -+ _BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C, /* 0-7 */ -+ _BCM_C,_BCM_C|_BCM_S,_BCM_C|_BCM_S,_BCM_C|_BCM_S,_BCM_C|_BCM_S,_BCM_C|_BCM_S,_BCM_C,_BCM_C, /* 8-15 */ -+ _BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C, /* 16-23 */ -+ _BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C,_BCM_C, /* 24-31 */ -+ _BCM_S|_BCM_SP,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 32-39 */ -+ _BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 40-47 */ -+ _BCM_D,_BCM_D,_BCM_D,_BCM_D,_BCM_D,_BCM_D,_BCM_D,_BCM_D, /* 48-55 */ -+ _BCM_D,_BCM_D,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 56-63 */ -+ _BCM_P,_BCM_U|_BCM_X,_BCM_U|_BCM_X,_BCM_U|_BCM_X,_BCM_U|_BCM_X,_BCM_U|_BCM_X,_BCM_U|_BCM_X,_BCM_U, /* 64-71 */ -+ _BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U, /* 72-79 */ -+ _BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U, /* 80-87 */ -+ _BCM_U,_BCM_U,_BCM_U,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 88-95 */ -+ _BCM_P,_BCM_L|_BCM_X,_BCM_L|_BCM_X,_BCM_L|_BCM_X,_BCM_L|_BCM_X,_BCM_L|_BCM_X,_BCM_L|_BCM_X,_BCM_L, /* 96-103 */ -+ _BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L, /* 104-111 */ -+ _BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L, /* 112-119 */ -+ _BCM_L,_BCM_L,_BCM_L,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_C, /* 120-127 */ -+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */ -+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */ -+ _BCM_S|_BCM_SP,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 160-175 */ -+ _BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P,_BCM_P, /* 176-191 */ -+ _BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U, /* 192-207 */ -+ _BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_P,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_U,_BCM_L, /* 208-223 */ -+ _BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L, /* 224-239 */ -+ _BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_P,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L,_BCM_L /* 240-255 */ -+}; -+ -+uchar -+bcm_toupper(uchar c) -+{ -+ if (bcm_islower(c)) -+ c -= 'a'-'A'; -+ return (c); -+} -+ -+ulong -+bcm_strtoul(char *cp, char **endp, uint base) -+{ -+ ulong result, value; -+ bool minus; -+ -+ minus = FALSE; -+ -+ while (bcm_isspace(*cp)) -+ cp++; -+ -+ if (cp[0] == '+') -+ cp++; -+ else if (cp[0] == '-') { -+ minus = TRUE; -+ cp++; -+ } -+ -+ if (base == 0) { -+ if (cp[0] == '0') { -+ if ((cp[1] == 'x') || (cp[1] == 'X')) { -+ base = 16; -+ cp = &cp[2]; -+ } else { -+ base = 8; -+ cp = &cp[1]; -+ } -+ } else -+ base = 10; -+ } else if (base == 16 && (cp[0] == '0') && ((cp[1] == 'x') || (cp[1] == 'X'))) { -+ cp = &cp[2]; -+ } -+ -+ result = 0; -+ -+ while (bcm_isxdigit(*cp) && -+ (value = bcm_isdigit(*cp) ? *cp-'0' : bcm_toupper(*cp)-'A'+10) < base) { -+ result = result*base + value; -+ cp++; -+ } -+ -+ if (minus) -+ result = (ulong)(result * -1); -+ -+ if (endp) -+ *endp = (char *)cp; -+ -+ return (result); -+} -+ -+uint -+bcm_atoi(char *s) -+{ -+ uint n; -+ -+ n = 0; -+ -+ while (bcm_isdigit(*s)) -+ n = (n * 10) + *s++ - '0'; -+ return (n); -+} -+ -+/* return pointer to location of substring 'needle' in 'haystack' */ -+char* -+bcmstrstr(char *haystack, char *needle) -+{ -+ int len, nlen; -+ int i; -+ -+ if ((haystack == NULL) || (needle == NULL)) -+ return (haystack); -+ -+ nlen = strlen(needle); -+ len = strlen(haystack) - nlen + 1; -+ -+ for (i = 0; i < len; i++) -+ if (bcmp(needle, &haystack[i], nlen) == 0) -+ return (&haystack[i]); -+ return (NULL); -+} -+ -+char* -+bcmstrcat(char *dest, const char *src) -+{ -+ strcpy(&dest[strlen(dest)], src); -+ return (dest); -+} -+ -+#if defined(CONFIG_USBRNDIS_RETAIL) || defined(NDIS_MINIPORT_DRIVER) -+/* registry routine buffer preparation utility functions: -+ * parameter order is like strncpy, but returns count -+ * of bytes copied. Minimum bytes copied is null char(1)/wchar(2) -+ */ -+ulong -+wchar2ascii( -+ char *abuf, -+ ushort *wbuf, -+ ushort wbuflen, -+ ulong abuflen -+) -+{ -+ ulong copyct = 1; -+ ushort i; -+ -+ if (abuflen == 0) -+ return 0; -+ -+ /* wbuflen is in bytes */ -+ wbuflen /= sizeof(ushort); -+ -+ for (i = 0; i < wbuflen; ++i) { -+ if (--abuflen == 0) -+ break; -+ *abuf++ = (char) *wbuf++; -+ ++copyct; -+ } -+ *abuf = '\0'; -+ -+ return copyct; -+} -+#endif -+ -+char* -+bcm_ether_ntoa(char *ea, char *buf) -+{ -+ sprintf(buf,"%02x:%02x:%02x:%02x:%02x:%02x", -+ (uchar)ea[0]&0xff, (uchar)ea[1]&0xff, (uchar)ea[2]&0xff, -+ (uchar)ea[3]&0xff, (uchar)ea[4]&0xff, (uchar)ea[5]&0xff); -+ return (buf); -+} -+ -+/* parse a xx:xx:xx:xx:xx:xx format ethernet address */ -+int -+bcm_ether_atoe(char *p, char *ea) -+{ -+ int i = 0; -+ -+ for (;;) { -+ ea[i++] = (char) bcm_strtoul(p, &p, 16); -+ if (!*p++ || i == 6) -+ break; -+ } -+ -+ return (i == 6); -+} -+ -+void -+bcm_mdelay(uint ms) -+{ -+ uint i; -+ -+ for (i = 0; i < ms; i++) { -+ OSL_DELAY(1000); -+ } -+} -+ -+/* -+ * Search the name=value vars for a specific one and return its value. -+ * Returns NULL if not found. -+ */ -+char* -+getvar(char *vars, char *name) -+{ -+ char *s; -+ int len; -+ -+ len = strlen(name); -+ -+ /* first look in vars[] */ -+ for (s = vars; s && *s; ) { -+ if ((bcmp(s, name, len) == 0) && (s[len] == '=')) -+ return (&s[len+1]); -+ -+ while (*s++) -+ ; -+ } -+ -+ /* then query nvram */ -+ return (BCMINIT(nvram_get)(name)); -+} -+ -+/* -+ * Search the vars for a specific one and return its value as -+ * an integer. Returns 0 if not found. -+ */ -+int -+getintvar(char *vars, char *name) -+{ -+ char *val; -+ -+ if ((val = getvar(vars, name)) == NULL) -+ return (0); -+ -+ return (bcm_strtoul(val, NULL, 0)); -+} -+ -+ -+/* Search for token in comma separated token-string */ -+static int -+findmatch(char *string, char *name) -+{ -+ uint len; -+ char *c; -+ -+ len = strlen(name); -+ while ((c = strchr(string, ',')) != NULL) { -+ if (len == (uint)(c - string) && !strncmp(string, name, len)) -+ return 1; -+ string = c + 1; -+ } -+ -+ return (!strcmp(string, name)); -+} -+ -+/* Return gpio pin number assigned to the named pin */ -+/* -+* Variable should be in format: -+* -+* gpio<N>=pin_name,pin_name -+* -+* This format allows multiple features to share the gpio with mutual -+* understanding. -+* -+* 'def_pin' is returned if a specific gpio is not defined for the requested functionality -+* and if def_pin is not used by others. -+*/ -+uint -+getgpiopin(char *vars, char *pin_name, uint def_pin) -+{ -+ char name[] = "gpioXXXX"; -+ char *val; -+ uint pin; -+ -+ /* Go thru all possibilities till a match in pin name */ -+ for (pin = 0; pin < GPIO_NUMPINS; pin ++) { -+ sprintf(name, "gpio%d", pin); -+ val = getvar(vars, name); -+ if (val && findmatch(val, pin_name)) -+ return pin; -+ } -+ -+ if (def_pin != GPIO_PIN_NOTDEFINED) { -+ /* make sure the default pin is not used by someone else */ -+ sprintf(name, "gpio%d", def_pin); -+ if (getvar(vars, name)) { -+ def_pin = GPIO_PIN_NOTDEFINED; -+ } -+ } -+ -+ return def_pin; -+} -+ -+ -+static char bcm_undeferrstr[BCME_STRLEN]; -+ -+static const char *bcmerrorstrtable[] = \ -+{ "OK", /* 0 */ -+ "Undefined error", /* BCME_ERROR */ -+ "Bad Argument", /* BCME_BADARG*/ -+ "Bad Option", /* BCME_BADOPTION*/ -+ "Not up", /* BCME_NOTUP */ -+ "Not down", /* BCME_NOTDOWN */ -+ "Not AP", /* BCME_NOTAP */ -+ "Not STA", /* BCME_NOTSTA */ -+ "Bad Key Index", /* BCME_BADKEYIDX */ -+ "Radio Off", /* BCME_RADIOOFF */ -+ "Not band locked", /* BCME_NOTBANDLOCKED */ -+ "No clock", /* BCME_NOCLK */ -+ "Bad Rate valueset", /* BCME_BADRATESET */ -+ "Bad Band", /* BCME_BADBAND */ -+ "Buffer too short", /* BCME_BUFTOOSHORT */ -+ "Buffer too length", /* BCME_BUFTOOLONG */ -+ "Busy", /* BCME_BUSY */ -+ "Not Associated", /* BCME_NOTASSOCIATED */ -+ "Bad SSID len", /* BCME_BADSSIDLEN */ -+ "Out of Range Channel", /* BCME_OUTOFRANGECHAN */ -+ "Bad Channel", /* BCME_BADCHAN */ -+ "Bad Address", /* BCME_BADADDR */ -+ "Not Enough Resources", /* BCME_NORESOURCE */ -+ "Unsupported", /* BCME_UNSUPPORTED */ -+ "Bad length", /* BCME_BADLENGTH */ -+ "Not Ready", /* BCME_NOTREADY */ -+ "Not Permitted", /* BCME_EPERM */ -+ "No Memory", /* BCME_NOMEM */ -+ "Associated", /* BCME_ASSOCIATED */ -+ "Not In Range", /* BCME_RANGE */ -+ "Not Found" /* BCME_NOTFOUND */ -+ }; -+ -+/* Convert the Error codes into related Error strings */ -+const char * -+bcmerrorstr(int bcmerror) -+{ -+ int abs_bcmerror; -+ -+ abs_bcmerror = ABS(bcmerror); -+ -+ /* check if someone added a bcmerror code but forgot to add errorstring */ -+ ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(bcmerrorstrtable) - 1)); -+ if ( (bcmerror > 0) || (abs_bcmerror > ABS(BCME_LAST))) { -+ sprintf(bcm_undeferrstr, "undefined Error %d", bcmerror); -+ return bcm_undeferrstr; -+ } -+ -+ ASSERT((strlen((char*)bcmerrorstrtable[abs_bcmerror])) < BCME_STRLEN); -+ -+ return bcmerrorstrtable[abs_bcmerror]; -+} -+#endif /* #ifdef BCMDRIVER */ -+ -+ -+/******************************************************************************* -+ * crc8 -+ * -+ * Computes a crc8 over the input data using the polynomial: -+ * -+ * x^8 + x^7 +x^6 + x^4 + x^2 + 1 -+ * -+ * The caller provides the initial value (either CRC8_INIT_VALUE -+ * or the previous returned value) to allow for processing of -+ * discontiguous blocks of data. When generating the CRC the -+ * caller is responsible for complementing the final return value -+ * and inserting it into the byte stream. When checking, a final -+ * return value of CRC8_GOOD_VALUE indicates a valid CRC. -+ * -+ * Reference: Dallas Semiconductor Application Note 27 -+ * Williams, Ross N., "A Painless Guide to CRC Error Detection Algorithms", -+ * ver 3, Aug 1993, ross@guest.adelaide.edu.au, Rocksoft Pty Ltd., -+ * ftp://ftp.rocksoft.com/clients/rocksoft/papers/crc_v3.txt -+ * -+ ******************************************************************************/ -+ -+static uint8 crc8_table[256] = { -+ 0x00, 0xF7, 0xB9, 0x4E, 0x25, 0xD2, 0x9C, 0x6B, -+ 0x4A, 0xBD, 0xF3, 0x04, 0x6F, 0x98, 0xD6, 0x21, -+ 0x94, 0x63, 0x2D, 0xDA, 0xB1, 0x46, 0x08, 0xFF, -+ 0xDE, 0x29, 0x67, 0x90, 0xFB, 0x0C, 0x42, 0xB5, -+ 0x7F, 0x88, 0xC6, 0x31, 0x5A, 0xAD, 0xE3, 0x14, -+ 0x35, 0xC2, 0x8C, 0x7B, 0x10, 0xE7, 0xA9, 0x5E, -+ 0xEB, 0x1C, 0x52, 0xA5, 0xCE, 0x39, 0x77, 0x80, -+ 0xA1, 0x56, 0x18, 0xEF, 0x84, 0x73, 0x3D, 0xCA, -+ 0xFE, 0x09, 0x47, 0xB0, 0xDB, 0x2C, 0x62, 0x95, -+ 0xB4, 0x43, 0x0D, 0xFA, 0x91, 0x66, 0x28, 0xDF, -+ 0x6A, 0x9D, 0xD3, 0x24, 0x4F, 0xB8, 0xF6, 0x01, -+ 0x20, 0xD7, 0x99, 0x6E, 0x05, 0xF2, 0xBC, 0x4B, -+ 0x81, 0x76, 0x38, 0xCF, 0xA4, 0x53, 0x1D, 0xEA, -+ 0xCB, 0x3C, 0x72, 0x85, 0xEE, 0x19, 0x57, 0xA0, -+ 0x15, 0xE2, 0xAC, 0x5B, 0x30, 0xC7, 0x89, 0x7E, -+ 0x5F, 0xA8, 0xE6, 0x11, 0x7A, 0x8D, 0xC3, 0x34, -+ 0xAB, 0x5C, 0x12, 0xE5, 0x8E, 0x79, 0x37, 0xC0, -+ 0xE1, 0x16, 0x58, 0xAF, 0xC4, 0x33, 0x7D, 0x8A, -+ 0x3F, 0xC8, 0x86, 0x71, 0x1A, 0xED, 0xA3, 0x54, -+ 0x75, 0x82, 0xCC, 0x3B, 0x50, 0xA7, 0xE9, 0x1E, -+ 0xD4, 0x23, 0x6D, 0x9A, 0xF1, 0x06, 0x48, 0xBF, -+ 0x9E, 0x69, 0x27, 0xD0, 0xBB, 0x4C, 0x02, 0xF5, -+ 0x40, 0xB7, 0xF9, 0x0E, 0x65, 0x92, 0xDC, 0x2B, -+ 0x0A, 0xFD, 0xB3, 0x44, 0x2F, 0xD8, 0x96, 0x61, -+ 0x55, 0xA2, 0xEC, 0x1B, 0x70, 0x87, 0xC9, 0x3E, -+ 0x1F, 0xE8, 0xA6, 0x51, 0x3A, 0xCD, 0x83, 0x74, -+ 0xC1, 0x36, 0x78, 0x8F, 0xE4, 0x13, 0x5D, 0xAA, -+ 0x8B, 0x7C, 0x32, 0xC5, 0xAE, 0x59, 0x17, 0xE0, -+ 0x2A, 0xDD, 0x93, 0x64, 0x0F, 0xF8, 0xB6, 0x41, -+ 0x60, 0x97, 0xD9, 0x2E, 0x45, 0xB2, 0xFC, 0x0B, -+ 0xBE, 0x49, 0x07, 0xF0, 0x9B, 0x6C, 0x22, 0xD5, -+ 0xF4, 0x03, 0x4D, 0xBA, 0xD1, 0x26, 0x68, 0x9F -+}; -+ -+#define CRC_INNER_LOOP(n, c, x) \ -+ (c) = ((c) >> 8) ^ crc##n##_table[((c) ^ (x)) & 0xff] -+ -+uint8 -+hndcrc8( -+ uint8 *pdata, /* pointer to array of data to process */ -+ uint nbytes, /* number of input data bytes to process */ -+ uint8 crc /* either CRC8_INIT_VALUE or previous return value */ -+) -+{ -+ /* hard code the crc loop instead of using CRC_INNER_LOOP macro -+ * to avoid the undefined and unnecessary (uint8 >> 8) operation. */ -+ while (nbytes-- > 0) -+ crc = crc8_table[(crc ^ *pdata++) & 0xff]; -+ -+ return crc; -+} -+ -+/******************************************************************************* -+ * crc16 -+ * -+ * Computes a crc16 over the input data using the polynomial: -+ * -+ * x^16 + x^12 +x^5 + 1 -+ * -+ * The caller provides the initial value (either CRC16_INIT_VALUE -+ * or the previous returned value) to allow for processing of -+ * discontiguous blocks of data. When generating the CRC the -+ * caller is responsible for complementing the final return value -+ * and inserting it into the byte stream. When checking, a final -+ * return value of CRC16_GOOD_VALUE indicates a valid CRC. -+ * -+ * Reference: Dallas Semiconductor Application Note 27 -+ * Williams, Ross N., "A Painless Guide to CRC Error Detection Algorithms", -+ * ver 3, Aug 1993, ross@guest.adelaide.edu.au, Rocksoft Pty Ltd., -+ * ftp://ftp.rocksoft.com/clients/rocksoft/papers/crc_v3.txt -+ * -+ ******************************************************************************/ -+ -+static uint16 crc16_table[256] = { -+ 0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF, -+ 0x8C48, 0x9DC1, 0xAF5A, 0xBED3, 0xCA6C, 0xDBE5, 0xE97E, 0xF8F7, -+ 0x1081, 0x0108, 0x3393, 0x221A, 0x56A5, 0x472C, 0x75B7, 0x643E, -+ 0x9CC9, 0x8D40, 0xBFDB, 0xAE52, 0xDAED, 0xCB64, 0xF9FF, 0xE876, -+ 0x2102, 0x308B, 0x0210, 0x1399, 0x6726, 0x76AF, 0x4434, 0x55BD, -+ 0xAD4A, 0xBCC3, 0x8E58, 0x9FD1, 0xEB6E, 0xFAE7, 0xC87C, 0xD9F5, -+ 0x3183, 0x200A, 0x1291, 0x0318, 0x77A7, 0x662E, 0x54B5, 0x453C, -+ 0xBDCB, 0xAC42, 0x9ED9, 0x8F50, 0xFBEF, 0xEA66, 0xD8FD, 0xC974, -+ 0x4204, 0x538D, 0x6116, 0x709F, 0x0420, 0x15A9, 0x2732, 0x36BB, -+ 0xCE4C, 0xDFC5, 0xED5E, 0xFCD7, 0x8868, 0x99E1, 0xAB7A, 0xBAF3, -+ 0x5285, 0x430C, 0x7197, 0x601E, 0x14A1, 0x0528, 0x37B3, 0x263A, -+ 0xDECD, 0xCF44, 0xFDDF, 0xEC56, 0x98E9, 0x8960, 0xBBFB, 0xAA72, -+ 0x6306, 0x728F, 0x4014, 0x519D, 0x2522, 0x34AB, 0x0630, 0x17B9, -+ 0xEF4E, 0xFEC7, 0xCC5C, 0xDDD5, 0xA96A, 0xB8E3, 0x8A78, 0x9BF1, -+ 0x7387, 0x620E, 0x5095, 0x411C, 0x35A3, 0x242A, 0x16B1, 0x0738, -+ 0xFFCF, 0xEE46, 0xDCDD, 0xCD54, 0xB9EB, 0xA862, 0x9AF9, 0x8B70, -+ 0x8408, 0x9581, 0xA71A, 0xB693, 0xC22C, 0xD3A5, 0xE13E, 0xF0B7, -+ 0x0840, 0x19C9, 0x2B52, 0x3ADB, 0x4E64, 0x5FED, 0x6D76, 0x7CFF, -+ 0x9489, 0x8500, 0xB79B, 0xA612, 0xD2AD, 0xC324, 0xF1BF, 0xE036, -+ 0x18C1, 0x0948, 0x3BD3, 0x2A5A, 0x5EE5, 0x4F6C, 0x7DF7, 0x6C7E, -+ 0xA50A, 0xB483, 0x8618, 0x9791, 0xE32E, 0xF2A7, 0xC03C, 0xD1B5, -+ 0x2942, 0x38CB, 0x0A50, 0x1BD9, 0x6F66, 0x7EEF, 0x4C74, 0x5DFD, -+ 0xB58B, 0xA402, 0x9699, 0x8710, 0xF3AF, 0xE226, 0xD0BD, 0xC134, -+ 0x39C3, 0x284A, 0x1AD1, 0x0B58, 0x7FE7, 0x6E6E, 0x5CF5, 0x4D7C, -+ 0xC60C, 0xD785, 0xE51E, 0xF497, 0x8028, 0x91A1, 0xA33A, 0xB2B3, -+ 0x4A44, 0x5BCD, 0x6956, 0x78DF, 0x0C60, 0x1DE9, 0x2F72, 0x3EFB, -+ 0xD68D, 0xC704, 0xF59F, 0xE416, 0x90A9, 0x8120, 0xB3BB, 0xA232, -+ 0x5AC5, 0x4B4C, 0x79D7, 0x685E, 0x1CE1, 0x0D68, 0x3FF3, 0x2E7A, -+ 0xE70E, 0xF687, 0xC41C, 0xD595, 0xA12A, 0xB0A3, 0x8238, 0x93B1, -+ 0x6B46, 0x7ACF, 0x4854, 0x59DD, 0x2D62, 0x3CEB, 0x0E70, 0x1FF9, -+ 0xF78F, 0xE606, 0xD49D, 0xC514, 0xB1AB, 0xA022, 0x92B9, 0x8330, -+ 0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78 -+}; -+ -+uint16 -+hndcrc16( -+ uint8 *pdata, /* pointer to array of data to process */ -+ uint nbytes, /* number of input data bytes to process */ -+ uint16 crc /* either CRC16_INIT_VALUE or previous return value */ -+) -+{ -+ while (nbytes-- > 0) -+ CRC_INNER_LOOP(16, crc, *pdata++); -+ return crc; -+} -+ -+static uint32 crc32_table[256] = { -+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, -+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, -+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, -+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, -+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, -+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, -+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, -+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, -+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, -+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, -+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, -+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, -+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, -+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, -+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, -+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, -+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, -+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, -+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, -+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, -+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, -+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, -+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, -+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, -+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, -+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, -+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, -+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, -+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, -+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, -+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, -+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, -+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, -+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, -+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, -+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, -+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, -+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, -+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, -+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, -+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, -+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, -+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, -+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, -+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, -+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, -+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, -+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, -+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, -+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, -+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, -+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, -+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, -+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, -+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, -+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, -+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, -+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, -+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, -+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, -+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, -+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, -+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, -+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D -+}; -+ -+uint32 -+hndcrc32( -+ uint8 *pdata, /* pointer to array of data to process */ -+ uint nbytes, /* number of input data bytes to process */ -+ uint32 crc /* either CRC32_INIT_VALUE or previous return value */ -+) -+{ -+ uint8 *pend; -+#ifdef __mips__ -+ uint8 tmp[4]; -+ ulong *tptr = (ulong *)tmp; -+ -+ /* in case the beginning of the buffer isn't aligned */ -+ pend = (uint8 *)((uint)(pdata + 3) & 0xfffffffc); -+ nbytes -= (pend - pdata); -+ while (pdata < pend) -+ CRC_INNER_LOOP(32, crc, *pdata++); -+ -+ /* handle bulk of data as 32-bit words */ -+ pend = pdata + (nbytes & 0xfffffffc); -+ while (pdata < pend) { -+ tptr = *((ulong *) pdata); -+ *((ulong *) pdata) += 1; -+ CRC_INNER_LOOP(32, crc, tmp[0]); -+ CRC_INNER_LOOP(32, crc, tmp[1]); -+ CRC_INNER_LOOP(32, crc, tmp[2]); -+ CRC_INNER_LOOP(32, crc, tmp[3]); -+ } -+ -+ /* 1-3 bytes at end of buffer */ -+ pend = pdata + (nbytes & 0x03); -+ while (pdata < pend) -+ CRC_INNER_LOOP(32, crc, *pdata++); -+#else -+ pend = pdata + nbytes; -+ while (pdata < pend) -+ CRC_INNER_LOOP(32, crc, *pdata++); -+#endif -+ -+ return crc; -+} -+ -+#ifdef notdef -+#define CLEN 1499 -+#define CBUFSIZ (CLEN+4) -+#define CNBUFS 5 -+ -+void testcrc32(void) -+{ -+ uint j,k,l; -+ uint8 *buf; -+ uint len[CNBUFS]; -+ uint32 crcr; -+ uint32 crc32tv[CNBUFS] = -+ {0xd2cb1faa, 0xd385c8fa, 0xf5b4f3f3, 0x55789e20, 0x00343110}; -+ -+ ASSERT((buf = MALLOC(CBUFSIZ*CNBUFS)) != NULL); -+ -+ /* step through all possible alignments */ -+ for (l=0;l<=4;l++) { -+ for (j=0; j<CNBUFS; j++) { -+ len[j] = CLEN; -+ for (k=0; k<len[j]; k++) -+ *(buf + j*CBUFSIZ + (k+l)) = (j+k) & 0xff; -+ } -+ -+ for (j=0; j<CNBUFS; j++) { -+ crcr = crc32(buf + j*CBUFSIZ + l, len[j], CRC32_INIT_VALUE); -+ ASSERT(crcr == crc32tv[j]); -+ } -+ } -+ -+ MFREE(buf, CBUFSIZ*CNBUFS); -+ return; -+} -+#endif -+ -+ -+/* -+ * Advance from the current 1-byte tag/1-byte length/variable-length value -+ * triple, to the next, returning a pointer to the next. -+ * If the current or next TLV is invalid (does not fit in given buffer length), -+ * NULL is returned. -+ * *buflen is not modified if the TLV elt parameter is invalid, or is decremented -+ * by the TLV paramter's length if it is valid. -+ */ -+bcm_tlv_t * -+bcm_next_tlv(bcm_tlv_t *elt, int *buflen) -+{ -+ int len; -+ -+ /* validate current elt */ -+ if (!bcm_valid_tlv(elt, *buflen)) -+ return NULL; -+ -+ /* advance to next elt */ -+ len = elt->len; -+ elt = (bcm_tlv_t*)(elt->data + len); -+ *buflen -= (2 + len); -+ -+ /* validate next elt */ -+ if (!bcm_valid_tlv(elt, *buflen)) -+ return NULL; -+ -+ return elt; -+} -+ -+/* -+ * Traverse a string of 1-byte tag/1-byte length/variable-length value -+ * triples, returning a pointer to the substring whose first element -+ * matches tag -+ */ -+bcm_tlv_t * -+bcm_parse_tlvs(void *buf, int buflen, uint key) -+{ -+ bcm_tlv_t *elt; -+ int totlen; -+ -+ elt = (bcm_tlv_t*)buf; -+ totlen = buflen; -+ -+ /* find tagged parameter */ -+ while (totlen >= 2) { -+ int len = elt->len; -+ -+ /* validate remaining totlen */ -+ if ((elt->id == key) && (totlen >= (len + 2))) -+ return (elt); -+ -+ elt = (bcm_tlv_t*)((uint8*)elt + (len + 2)); -+ totlen -= (len + 2); -+ } -+ -+ return NULL; -+} -+ -+/* -+ * Traverse a string of 1-byte tag/1-byte length/variable-length value -+ * triples, returning a pointer to the substring whose first element -+ * matches tag. Stop parsing when we see an element whose ID is greater -+ * than the target key. -+ */ -+bcm_tlv_t * -+bcm_parse_ordered_tlvs(void *buf, int buflen, uint key) -+{ -+ bcm_tlv_t *elt; -+ int totlen; -+ -+ elt = (bcm_tlv_t*)buf; -+ totlen = buflen; -+ -+ /* find tagged parameter */ -+ while (totlen >= 2) { -+ uint id = elt->id; -+ int len = elt->len; -+ -+ /* Punt if we start seeing IDs > than target key */ -+ if (id > key) -+ return(NULL); -+ -+ /* validate remaining totlen */ -+ if ((id == key) && (totlen >= (len + 2))) -+ return (elt); -+ -+ elt = (bcm_tlv_t*)((uint8*)elt + (len + 2)); -+ totlen -= (len + 2); -+ } -+ return NULL; -+} -+/* routine to dump fields in a fileddesc structure */ -+ -+uint -+bcmdumpfields(readreg_rtn read_rtn, void *arg0, void *arg1, struct fielddesc *fielddesc_array, char *buf, uint32 bufsize) -+{ -+ uint filled_len; -+ uint len; -+ struct fielddesc *cur_ptr; -+ -+ filled_len = 0; -+ cur_ptr = fielddesc_array; -+ -+ while (bufsize > (filled_len + 64)) { -+ if (cur_ptr->nameandfmt == NULL) -+ break; -+ len = sprintf(buf, cur_ptr->nameandfmt, read_rtn(arg0, arg1, cur_ptr->offset)); -+ buf += len; -+ filled_len += len; -+ cur_ptr++; -+ } -+ return filled_len; -+} -+ -+uint -+bcm_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen) -+{ -+ uint len; -+ -+ len = strlen(name) + 1; -+ -+ if ((len + datalen) > buflen) -+ return 0; -+ -+ strcpy(buf, name); -+ -+ /* append data onto the end of the name string */ -+ memcpy(&buf[len], data, datalen); -+ len += datalen; -+ -+ return len; -+} -+ -+/* Quarter dBm units to mW -+ * Table starts at QDBM_OFFSET, so the first entry is mW for qdBm=153 -+ * Table is offset so the last entry is largest mW value that fits in -+ * a uint16. -+ */ -+ -+#define QDBM_OFFSET 153 -+#define QDBM_TABLE_LEN 40 -+ -+/* Smallest mW value that will round up to the first table entry, QDBM_OFFSET. -+ * Value is ( mW(QDBM_OFFSET - 1) + mW(QDBM_OFFSET) ) / 2 -+ */ -+#define QDBM_TABLE_LOW_BOUND 6493 -+ -+/* Largest mW value that will round down to the last table entry, -+ * QDBM_OFFSET + QDBM_TABLE_LEN-1. -+ * Value is ( mW(QDBM_OFFSET + QDBM_TABLE_LEN - 1) + mW(QDBM_OFFSET + QDBM_TABLE_LEN) ) / 2. -+ */ -+#define QDBM_TABLE_HIGH_BOUND 64938 -+ -+static const uint16 nqdBm_to_mW_map[QDBM_TABLE_LEN] = { -+/* qdBm: +0 +1 +2 +3 +4 +5 +6 +7 */ -+/* 153: */ 6683, 7079, 7499, 7943, 8414, 8913, 9441, 10000, -+/* 161: */ 10593, 11220, 11885, 12589, 13335, 14125, 14962, 15849, -+/* 169: */ 16788, 17783, 18836, 19953, 21135, 22387, 23714, 25119, -+/* 177: */ 26607, 28184, 29854, 31623, 33497, 35481, 37584, 39811, -+/* 185: */ 42170, 44668, 47315, 50119, 53088, 56234, 59566, 63096 -+}; -+ -+uint16 -+bcm_qdbm_to_mw(uint8 qdbm) -+{ -+ uint factor = 1; -+ int idx = qdbm - QDBM_OFFSET; -+ -+ if (idx > QDBM_TABLE_LEN) { -+ /* clamp to max uint16 mW value */ -+ return 0xFFFF; -+ } -+ -+ /* scale the qdBm index up to the range of the table 0-40 -+ * where an offset of 40 qdBm equals a factor of 10 mW. -+ */ -+ while (idx < 0) { -+ idx += 40; -+ factor *= 10; -+ } -+ -+ /* return the mW value scaled down to the correct factor of 10, -+ * adding in factor/2 to get proper rounding. */ -+ return ((nqdBm_to_mW_map[idx] + factor/2) / factor); -+} -+ -+uint8 -+bcm_mw_to_qdbm(uint16 mw) -+{ -+ uint8 qdbm; -+ int offset; -+ uint mw_uint = mw; -+ uint boundary; -+ -+ /* handle boundary case */ -+ if (mw_uint <= 1) -+ return 0; -+ -+ offset = QDBM_OFFSET; -+ -+ /* move mw into the range of the table */ -+ while (mw_uint < QDBM_TABLE_LOW_BOUND) { -+ mw_uint *= 10; -+ offset -= 40; -+ } -+ -+ for (qdbm = 0; qdbm < QDBM_TABLE_LEN-1; qdbm++) { -+ boundary = nqdBm_to_mW_map[qdbm] + (nqdBm_to_mW_map[qdbm+1] - nqdBm_to_mW_map[qdbm])/2; -+ if (mw_uint < boundary) break; -+ } -+ -+ qdbm += (uint8)offset; -+ -+ return(qdbm); -+} -diff -Naur linux.old/drivers/net/hnd/linux_osl.c linux.dev/drivers/net/hnd/linux_osl.c ---- linux.old/drivers/net/hnd/linux_osl.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/hnd/linux_osl.c 2006-04-06 15:34:15.000000000 +0200 -@@ -0,0 +1,708 @@ -+/* -+ * Linux OS Independent Layer -+ * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id$ -+ */ -+ -+#define LINUX_OSL -+ -+#include <typedefs.h> -+#include <bcmendian.h> -+#include <linux/module.h> -+#include <linuxver.h> -+#include <osl.h> -+#include <bcmutils.h> -+#include <linux/delay.h> -+#ifdef mips -+#include <asm/paccess.h> -+#endif -+#include <pcicfg.h> -+ -+#define PCI_CFG_RETRY 10 -+ -+#define OS_HANDLE_MAGIC 0x1234abcd -+#define BCM_MEM_FILENAME_LEN 24 -+ -+typedef struct bcm_mem_link { -+ struct bcm_mem_link *prev; -+ struct bcm_mem_link *next; -+ uint size; -+ int line; -+ char file[BCM_MEM_FILENAME_LEN]; -+} bcm_mem_link_t; -+ -+struct os_handle { -+ uint magic; -+ void *pdev; -+ uint malloced; -+ uint failed; -+ bcm_mem_link_t *dbgmem_list; -+}; -+ -+static int16 linuxbcmerrormap[] = \ -+{ 0, /* 0 */ -+ -EINVAL, /* BCME_ERROR */ -+ -EINVAL, /* BCME_BADARG*/ -+ -EINVAL, /* BCME_BADOPTION*/ -+ -EINVAL, /* BCME_NOTUP */ -+ -EINVAL, /* BCME_NOTDOWN */ -+ -EINVAL, /* BCME_NOTAP */ -+ -EINVAL, /* BCME_NOTSTA */ -+ -EINVAL, /* BCME_BADKEYIDX */ -+ -EINVAL, /* BCME_RADIOOFF */ -+ -EINVAL, /* BCME_NOTBANDLOCKED */ -+ -EINVAL, /* BCME_NOCLK */ -+ -EINVAL, /* BCME_BADRATESET */ -+ -EINVAL, /* BCME_BADBAND */ -+ -E2BIG, /* BCME_BUFTOOSHORT */ -+ -E2BIG, /* BCME_BUFTOOLONG */ -+ -EBUSY, /* BCME_BUSY */ -+ -EINVAL, /* BCME_NOTASSOCIATED */ -+ -EINVAL, /* BCME_BADSSIDLEN */ -+ -EINVAL, /* BCME_OUTOFRANGECHAN */ -+ -EINVAL, /* BCME_BADCHAN */ -+ -EFAULT, /* BCME_BADADDR */ -+ -ENOMEM, /* BCME_NORESOURCE */ -+ -EOPNOTSUPP, /* BCME_UNSUPPORTED */ -+ -EMSGSIZE, /* BCME_BADLENGTH */ -+ -EINVAL, /* BCME_NOTREADY */ -+ -EPERM, /* BCME_NOTPERMITTED */ -+ -ENOMEM, /* BCME_NOMEM */ -+ -EINVAL, /* BCME_ASSOCIATED */ -+ -ERANGE, /* BCME_RANGE */ -+ -EINVAL /* BCME_NOTFOUND */ -+}; -+ -+/* translate bcmerrors into linux errors*/ -+int -+osl_error(int bcmerror) -+{ -+ int abs_bcmerror; -+ int array_size = ARRAYSIZE(linuxbcmerrormap); -+ -+ abs_bcmerror = ABS(bcmerror); -+ -+ if (bcmerror > 0) -+ abs_bcmerror = 0; -+ -+ else if (abs_bcmerror >= array_size) -+ abs_bcmerror = BCME_ERROR; -+ -+ return linuxbcmerrormap[abs_bcmerror]; -+} -+ -+osl_t * -+osl_attach(void *pdev) -+{ -+ osl_t *osh; -+ -+ osh = kmalloc(sizeof(osl_t), GFP_ATOMIC); -+ ASSERT(osh); -+ -+ /* -+ * check the cases where -+ * 1.Error code Added to bcmerror table, but forgot to add it to the OS -+ * dependent error code -+ * 2. Error code is added to the bcmerror table, but forgot to add the -+ * corresponding errorstring(dummy call to bcmerrorstr) -+ */ -+ bcmerrorstr(0); -+ ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(linuxbcmerrormap) - 1)); -+ -+ osh->magic = OS_HANDLE_MAGIC; -+ osh->malloced = 0; -+ osh->failed = 0; -+ osh->dbgmem_list = NULL; -+ osh->pdev = pdev; -+ -+ return osh; -+} -+ -+void -+osl_detach(osl_t *osh) -+{ -+ ASSERT(osh && (osh->magic == OS_HANDLE_MAGIC)); -+ kfree(osh); -+} -+ -+void* -+osl_pktget(osl_t *osh, uint len, bool send) -+{ -+ struct sk_buff *skb; -+ -+ if ((skb = dev_alloc_skb(len)) == NULL) -+ return (NULL); -+ -+ skb_put(skb, len); -+ -+ /* ensure the cookie field is cleared */ -+ PKTSETCOOKIE(skb, NULL); -+ -+ return ((void*) skb); -+} -+ -+void -+osl_pktfree(void *p) -+{ -+ struct sk_buff *skb, *nskb; -+ -+ skb = (struct sk_buff*) p; -+ -+ /* perversion: we use skb->next to chain multi-skb packets */ -+ while (skb) { -+ nskb = skb->next; -+ skb->next = NULL; -+ if (skb->destructor) { -+ /* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if destructor exists */ -+ dev_kfree_skb_any(skb); -+ } else { -+ /* can free immediately (even in_irq()) if destructor does not exist */ -+ dev_kfree_skb(skb); -+ } -+ skb = nskb; -+ } -+} -+ -+uint32 -+osl_pci_read_config(osl_t *osh, uint offset, uint size) -+{ -+ uint val; -+ uint retry=PCI_CFG_RETRY; -+ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ -+ /* only 4byte access supported */ -+ ASSERT(size == 4); -+ -+ do { -+ pci_read_config_dword(osh->pdev, offset, &val); -+ if (val != 0xffffffff) -+ break; -+ } while (retry--); -+ -+ -+ return (val); -+} -+ -+void -+osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val) -+{ -+ uint retry=PCI_CFG_RETRY; -+ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ -+ /* only 4byte access supported */ -+ ASSERT(size == 4); -+ -+ do { -+ pci_write_config_dword(osh->pdev, offset, val); -+ if (offset!=PCI_BAR0_WIN) -+ break; -+ if (osl_pci_read_config(osh,offset,size) == val) -+ break; -+ } while (retry--); -+ -+} -+ -+/* return bus # for the pci device pointed by osh->pdev */ -+uint -+osl_pci_bus(osl_t *osh) -+{ -+ ASSERT(osh && (osh->magic == OS_HANDLE_MAGIC) && osh->pdev); -+ -+ return ((struct pci_dev *)osh->pdev)->bus->number; -+} -+ -+/* return slot # for the pci device pointed by osh->pdev */ -+uint -+osl_pci_slot(osl_t *osh) -+{ -+ ASSERT(osh && (osh->magic == OS_HANDLE_MAGIC) && osh->pdev); -+ -+ return PCI_SLOT(((struct pci_dev *)osh->pdev)->devfn); -+} -+ -+static void -+osl_pcmcia_attr(osl_t *osh, uint offset, char *buf, int size, bool write) -+{ -+} -+ -+void -+osl_pcmcia_read_attr(osl_t *osh, uint offset, void *buf, int size) -+{ -+ osl_pcmcia_attr(osh, offset, (char *) buf, size, FALSE); -+} -+ -+void -+osl_pcmcia_write_attr(osl_t *osh, uint offset, void *buf, int size) -+{ -+ osl_pcmcia_attr(osh, offset, (char *) buf, size, TRUE); -+} -+ -+ -+#ifdef BCMDBG_MEM -+ -+void* -+osl_debug_malloc(osl_t *osh, uint size, int line, char* file) -+{ -+ bcm_mem_link_t *p; -+ char* basename; -+ -+ ASSERT(size); -+ -+ if ((p = (bcm_mem_link_t*)osl_malloc(osh, sizeof(bcm_mem_link_t) + size)) == NULL) -+ return (NULL); -+ -+ p->size = size; -+ p->line = line; -+ -+ basename = strrchr(file, '/'); -+ /* skip the '/' */ -+ if (basename) -+ basename++; -+ -+ if (!basename) -+ basename = file; -+ -+ strncpy(p->file, basename, BCM_MEM_FILENAME_LEN); -+ p->file[BCM_MEM_FILENAME_LEN - 1] = '\0'; -+ -+ /* link this block */ -+ p->prev = NULL; -+ p->next = osh->dbgmem_list; -+ if (p->next) -+ p->next->prev = p; -+ osh->dbgmem_list = p; -+ -+ return p + 1; -+} -+ -+void -+osl_debug_mfree(osl_t *osh, void *addr, uint size, int line, char* file) -+{ -+ bcm_mem_link_t *p = (bcm_mem_link_t *)((int8*)addr - sizeof(bcm_mem_link_t)); -+ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ -+ if (p->size == 0) { -+ printk("osl_debug_mfree: double free on addr 0x%x size %d at line %d file %s\n", -+ (uint)addr, size, line, file); -+ ASSERT(p->size); -+ return; -+ } -+ -+ if (p->size != size) { -+ printk("osl_debug_mfree: dealloc size %d does not match alloc size %d on addr 0x%x at line %d file %s\n", -+ size, p->size, (uint)addr, line, file); -+ ASSERT(p->size == size); -+ return; -+ } -+ -+ /* unlink this block */ -+ if (p->prev) -+ p->prev->next = p->next; -+ if (p->next) -+ p->next->prev = p->prev; -+ if (osh->dbgmem_list == p) -+ osh->dbgmem_list = p->next; -+ p->next = p->prev = NULL; -+ -+ osl_mfree(osh, p, size + sizeof(bcm_mem_link_t)); -+} -+ -+char* -+osl_debug_memdump(osl_t *osh, char *buf, uint sz) -+{ -+ bcm_mem_link_t *p; -+ char *obuf; -+ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ obuf = buf; -+ -+ buf += sprintf(buf, " Address\tSize\tFile:line\n"); -+ for (p = osh->dbgmem_list; p && ((buf - obuf) < (sz - 128)); p = p->next) -+ buf += sprintf(buf, "0x%08x\t%5d\t%s:%d\n", -+ (int)p + sizeof(bcm_mem_link_t), p->size, p->file, p->line); -+ -+ return (obuf); -+} -+ -+#endif /* BCMDBG_MEM */ -+ -+void* -+osl_malloc(osl_t *osh, uint size) -+{ -+ void *addr; -+ -+ /* only ASSERT if osh is defined */ -+ if (osh) -+ ASSERT(osh->magic == OS_HANDLE_MAGIC); -+ -+ if ((addr = kmalloc(size, GFP_ATOMIC)) == NULL) { -+ if(osh) -+ osh->failed++; -+ return (NULL); -+ } -+ if (osh) -+ osh->malloced += size; -+ -+ return (addr); -+} -+ -+void -+osl_mfree(osl_t *osh, void *addr, uint size) -+{ -+ if (osh) { -+ ASSERT(osh->magic == OS_HANDLE_MAGIC); -+ osh->malloced -= size; -+ } -+ kfree(addr); -+} -+ -+uint -+osl_malloced(osl_t *osh) -+{ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ return (osh->malloced); -+} -+ -+uint osl_malloc_failed(osl_t *osh) -+{ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ return (osh->failed); -+} -+ -+void* -+osl_dma_alloc_consistent(osl_t *osh, uint size, ulong *pap) -+{ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ -+ return (pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap)); -+} -+ -+void -+osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa) -+{ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ -+ pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); -+} -+ -+uint -+osl_dma_map(osl_t *osh, void *va, uint size, int direction) -+{ -+ int dir; -+ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; -+ return (pci_map_single(osh->pdev, va, size, dir)); -+} -+ -+void -+osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction) -+{ -+ int dir; -+ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; -+ pci_unmap_single(osh->pdev, (uint32)pa, size, dir); -+} -+ -+#if defined(BINOSL) -+void -+osl_assert(char *exp, char *file, int line) -+{ -+ char tempbuf[255]; -+ -+ sprintf(tempbuf, "assertion \"%s\" failed: file \"%s\", line %d\n", exp, file, line); -+ panic(tempbuf); -+} -+#endif /* BCMDBG || BINOSL */ -+ -+void -+osl_delay(uint usec) -+{ -+ uint d; -+ -+ while (usec > 0) { -+ d = MIN(usec, 1000); -+ udelay(d); -+ usec -= d; -+ } -+} -+ -+/* -+ * BINOSL selects the slightly slower function-call-based binary compatible osl. -+ */ -+#ifdef BINOSL -+ -+int -+osl_printf(const char *format, ...) -+{ -+ va_list args; -+ char buf[1024]; -+ int len; -+ -+ /* sprintf into a local buffer because there *is* no "vprintk()".. */ -+ va_start(args, format); -+ len = vsprintf(buf, format, args); -+ va_end(args); -+ -+ if (len > sizeof (buf)) { -+ printk("osl_printf: buffer overrun\n"); -+ return (0); -+ } -+ -+ return (printk(buf)); -+} -+ -+int -+osl_sprintf(char *buf, const char *format, ...) -+{ -+ va_list args; -+ int rc; -+ -+ va_start(args, format); -+ rc = vsprintf(buf, format, args); -+ va_end(args); -+ return (rc); -+} -+ -+int -+osl_strcmp(const char *s1, const char *s2) -+{ -+ return (strcmp(s1, s2)); -+} -+ -+int -+osl_strncmp(const char *s1, const char *s2, uint n) -+{ -+ return (strncmp(s1, s2, n)); -+} -+ -+int -+osl_strlen(const char *s) -+{ -+ return (strlen(s)); -+} -+ -+char* -+osl_strcpy(char *d, const char *s) -+{ -+ return (strcpy(d, s)); -+} -+ -+char* -+osl_strncpy(char *d, const char *s, uint n) -+{ -+ return (strncpy(d, s, n)); -+} -+ -+void -+bcopy(const void *src, void *dst, int len) -+{ -+ memcpy(dst, src, len); -+} -+ -+int -+bcmp(const void *b1, const void *b2, int len) -+{ -+ return (memcmp(b1, b2, len)); -+} -+ -+void -+bzero(void *b, int len) -+{ -+ memset(b, '\0', len); -+} -+ -+uint32 -+osl_readl(volatile uint32 *r) -+{ -+ return (readl(r)); -+} -+ -+uint16 -+osl_readw(volatile uint16 *r) -+{ -+ return (readw(r)); -+} -+ -+uint8 -+osl_readb(volatile uint8 *r) -+{ -+ return (readb(r)); -+} -+ -+void -+osl_writel(uint32 v, volatile uint32 *r) -+{ -+ writel(v, r); -+} -+ -+void -+osl_writew(uint16 v, volatile uint16 *r) -+{ -+ writew(v, r); -+} -+ -+void -+osl_writeb(uint8 v, volatile uint8 *r) -+{ -+ writeb(v, r); -+} -+ -+void * -+osl_uncached(void *va) -+{ -+#ifdef mips -+ return ((void*)KSEG1ADDR(va)); -+#else -+ return ((void*)va); -+#endif -+} -+ -+uint -+osl_getcycles(void) -+{ -+ uint cycles; -+ -+#if defined(mips) -+ cycles = read_c0_count() * 2; -+#elif defined(__i386__) -+ rdtscl(cycles); -+#else -+ cycles = 0; -+#endif -+ return cycles; -+} -+ -+void * -+osl_reg_map(uint32 pa, uint size) -+{ -+ return (ioremap_nocache((unsigned long)pa, (unsigned long)size)); -+} -+ -+void -+osl_reg_unmap(void *va) -+{ -+ iounmap(va); -+} -+ -+int -+osl_busprobe(uint32 *val, uint32 addr) -+{ -+#ifdef mips -+ return get_dbe(*val, (uint32*)addr); -+#else -+ *val = readl(addr); -+ return 0; -+#endif -+} -+ -+uchar* -+osl_pktdata(osl_t *osh, void *skb) -+{ -+ return (((struct sk_buff*)skb)->data); -+} -+ -+uint -+osl_pktlen(osl_t *osh, void *skb) -+{ -+ return (((struct sk_buff*)skb)->len); -+} -+ -+uint -+osl_pktheadroom(osl_t *osh, void *skb) -+{ -+ return (uint) skb_headroom((struct sk_buff *) skb); -+} -+ -+uint -+osl_pkttailroom(osl_t *osh, void *skb) -+{ -+ return (uint) skb_tailroom((struct sk_buff *) skb); -+} -+ -+void* -+osl_pktnext(osl_t *osh, void *skb) -+{ -+ return (((struct sk_buff*)skb)->next); -+} -+ -+void -+osl_pktsetnext(void *skb, void *x) -+{ -+ ((struct sk_buff*)skb)->next = (struct sk_buff*)x; -+} -+ -+void -+osl_pktsetlen(osl_t *osh, void *skb, uint len) -+{ -+ __skb_trim((struct sk_buff*)skb, len); -+} -+ -+uchar* -+osl_pktpush(osl_t *osh, void *skb, int bytes) -+{ -+ return (skb_push((struct sk_buff*)skb, bytes)); -+} -+ -+uchar* -+osl_pktpull(osl_t *osh, void *skb, int bytes) -+{ -+ return (skb_pull((struct sk_buff*)skb, bytes)); -+} -+ -+void* -+osl_pktdup(osl_t *osh, void *skb) -+{ -+ return (skb_clone((struct sk_buff*)skb, GFP_ATOMIC)); -+} -+ -+void* -+osl_pktcookie(void *skb) -+{ -+ return ((void*)((struct sk_buff*)skb)->csum); -+} -+ -+void -+osl_pktsetcookie(void *skb, void *x) -+{ -+ ((struct sk_buff*)skb)->csum = (uint)x; -+} -+ -+void* -+osl_pktlink(void *skb) -+{ -+ return (((struct sk_buff*)skb)->prev); -+} -+ -+void -+osl_pktsetlink(void *skb, void *x) -+{ -+ ((struct sk_buff*)skb)->prev = (struct sk_buff*)x; -+} -+ -+uint -+osl_pktprio(void *skb) -+{ -+ return (((struct sk_buff*)skb)->priority); -+} -+ -+void -+osl_pktsetprio(void *skb, uint x) -+{ -+ ((struct sk_buff*)skb)->priority = x; -+} -+ -+ -+#endif /* BINOSL */ -diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils.c ---- linux.old/drivers/net/hnd/sbutils.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/hnd/sbutils.c 2006-04-06 15:34:15.000000000 +0200 -@@ -0,0 +1,2837 @@ +diff -urN linux.old/arch/mips/bcm947xx/sbutils.c linux.dev/arch/mips/bcm947xx/sbutils.c +--- linux.old/arch/mips/bcm947xx/sbutils.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/sbutils.c 2006-05-02 04:33:16.000000000 +0200 +@@ -0,0 +1,3081 @@ +/* + * Misc utility routines for accessing chip-specific features + * of the SiliconBackplane-based Broadcom chips. + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * $Id: sbutils.c,v 1.10 2006/04/08 07:12:42 honor Exp $ + */ + +#include <typedefs.h> ++#include <bcmdefs.h> +#include <osl.h> -+#include <sbutils.h> +#include <bcmutils.h> ++#include <sbutils.h> +#include <bcmdevs.h> +#include <sbconfig.h> +#include <sbchipc.h> @@ -12819,12 +12023,15 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +#include <pcicfg.h> +#include <sbpcmcia.h> +#include <sbextif.h> ++#include <sbsocram.h> +#include <bcmsrom.h> ++#ifdef __mips__ ++#include <mipsinc.h> ++#endif /* __mips__ */ + +/* debug/trace */ +#define SB_ERROR(args) + -+ +typedef uint32 (*sb_intrsoff_t)(void *intr_arg); +typedef void (*sb_intrsrestore_t)(void *intr_arg, uint32 arg); +typedef bool (*sb_intrsenabled_t)(void *intr_arg); @@ -12832,7 +12039,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +/* misc sb info needed by some of the routines */ +typedef struct sb_info { + -+ struct sb_pub sb; /* back plane public state(must be first field of sb_info */ ++ struct sb_pub sb; /* back plane public state (must be first field) */ + + void *osh; /* osl os handle */ + void *sdh; /* bcmsdh handle */ @@ -12852,56 +12059,60 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + uint coreid[SB_MAXCORES]; /* id of each core */ + + void *intr_arg; /* interrupt callback function arg */ -+ sb_intrsoff_t intrsoff_fn; /* function turns chip interrupts off */ -+ sb_intrsrestore_t intrsrestore_fn; /* function restore chip interrupts */ -+ sb_intrsenabled_t intrsenabled_fn; /* function to check if chip interrupts are enabled */ ++ sb_intrsoff_t intrsoff_fn; /* turns chip interrupts off */ ++ sb_intrsrestore_t intrsrestore_fn; /* restore chip interrupts */ ++ sb_intrsenabled_t intrsenabled_fn; /* check if interrupts are enabled */ + +} sb_info_t; + +/* local prototypes */ -+static sb_info_t * BCMINIT(sb_doattach)(sb_info_t *si, uint devid, osl_t *osh, void *regs, -+ uint bustype, void *sdh, char **vars, int *varsz); -+static void BCMINIT(sb_scan)(sb_info_t *si); ++static sb_info_t * sb_doattach(sb_info_t *si, uint devid, osl_t *osh, void *regs, ++ uint bustype, void *sdh, char **vars, uint *varsz); ++static void sb_scan(sb_info_t *si); +static uint sb_corereg(sb_info_t *si, uint coreidx, uint regoff, uint mask, uint val); +static uint _sb_coreidx(sb_info_t *si); +static uint sb_findcoreidx(sb_info_t *si, uint coreid, uint coreunit); -+static uint BCMINIT(sb_pcidev2chip)(uint pcidev); -+static uint BCMINIT(sb_chip2numcores)(uint chip); ++static uint sb_pcidev2chip(uint pcidev); ++static uint sb_chip2numcores(uint chip); +static bool sb_ispcie(sb_info_t *si); +static bool sb_find_pci_capability(sb_info_t *si, uint8 req_cap_id, uchar *buf, uint32 *buflen); +static int sb_pci_fixcfg(sb_info_t *si); + +/* routines to access mdio slave device registers */ +static int sb_pcie_mdiowrite(sb_info_t *si, uint physmedia, uint readdr, uint val); -+static void BCMINIT(sb_war30841)(sb_info_t *si); ++static void sb_war30841(sb_info_t *si); + +/* delay needed between the mdio control/ mdiodata register data access */ +#define PR28829_DELAY() OSL_DELAY(10) + ++/* size that can take bitfielddump */ ++#define BITFIELD_DUMP_SIZE 32 + -+/* global variable to indicate reservation/release of gpio's*/ ++/* global variable to indicate reservation/release of gpio's */ +static uint32 sb_gpioreservation = 0; + +#define SB_INFO(sbh) (sb_info_t*)sbh -+#define SET_SBREG(sbh, r, mask, val) W_SBREG((sbh), (r), ((R_SBREG((sbh), (r)) & ~(mask)) | (val))) -+#define GOODCOREADDR(x) (((x) >= SB_ENUM_BASE) && ((x) <= SB_ENUM_LIM) && ISALIGNED((x), SB_CORE_SIZE)) ++#define SET_SBREG(si, r, mask, val) \ ++ W_SBREG((si), (r), ((R_SBREG((si), (r)) & ~(mask)) | (val))) ++#define GOODCOREADDR(x) (((x) >= SB_ENUM_BASE) && ((x) <= SB_ENUM_LIM) && \ ++ ISALIGNED((x), SB_CORE_SIZE)) +#define GOODREGS(regs) ((regs) && ISALIGNED((uintptr)(regs), SB_CORE_SIZE)) +#define REGS2SB(va) (sbconfig_t*) ((int8*)(va) + SBCONFIGOFF) +#define GOODIDX(idx) (((uint)idx) < SB_MAXCORES) +#define BADIDX (SB_MAXCORES+1) -+#define NOREV -1 ++#define NOREV -1 /* Invalid rev */ + -+#define PCI(si) ((BUSTYPE(si->sb.bustype) == PCI_BUS) && (si->sb.buscoretype == SB_PCI)) -+#define PCIE(si) ((BUSTYPE(si->sb.bustype) == PCI_BUS) && (si->sb.buscoretype == SB_PCIE)) ++#define PCI(si) ((BUSTYPE(si->sb.bustype) == PCI_BUS) && (si->sb.buscoretype == SB_PCI)) ++#define PCIE(si) ((BUSTYPE(si->sb.bustype) == PCI_BUS) && (si->sb.buscoretype == SB_PCIE)) + +/* sonicsrev */ +#define SONICS_2_2 (SBIDL_RV_2_2 >> SBIDL_RV_SHIFT) +#define SONICS_2_3 (SBIDL_RV_2_3 >> SBIDL_RV_SHIFT) + -+#define R_SBREG(sbh, sbr) sb_read_sbreg((sbh), (sbr)) -+#define W_SBREG(sbh, sbr, v) sb_write_sbreg((sbh), (sbr), (v)) -+#define AND_SBREG(sbh, sbr, v) W_SBREG((sbh), (sbr), (R_SBREG((sbh), (sbr)) & (v))) -+#define OR_SBREG(sbh, sbr, v) W_SBREG((sbh), (sbr), (R_SBREG((sbh), (sbr)) | (v))) ++#define R_SBREG(si, sbr) sb_read_sbreg((si), (sbr)) ++#define W_SBREG(si, sbr, v) sb_write_sbreg((si), (sbr), (v)) ++#define AND_SBREG(si, sbr, v) W_SBREG((si), (sbr), (R_SBREG((si), (sbr)) & (v))) ++#define OR_SBREG(si, sbr, v) W_SBREG((si), (sbr), (R_SBREG((si), (sbr)) | (v))) + +/* + * Macros to disable/restore function core(D11, ENET, ILINE20, etc) interrupts before/ @@ -12915,25 +12126,23 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + (*(si)->intrsrestore_fn)((si)->intr_arg, intr_val); } + +/* dynamic clock control defines */ -+#define LPOMINFREQ 25000 /* low power oscillator min */ -+#define LPOMAXFREQ 43000 /* low power oscillator max */ -+#define XTALMINFREQ 19800000 /* 20 MHz - 1% */ -+#define XTALMAXFREQ 20200000 /* 20 MHz + 1% */ -+#define PCIMINFREQ 25000000 /* 25 MHz */ -+#define PCIMAXFREQ 34000000 /* 33 MHz + fudge */ ++#define LPOMINFREQ 25000 /* low power oscillator min */ ++#define LPOMAXFREQ 43000 /* low power oscillator max */ ++#define XTALMINFREQ 19800000 /* 20 MHz - 1% */ ++#define XTALMAXFREQ 20200000 /* 20 MHz + 1% */ ++#define PCIMINFREQ 25000000 /* 25 MHz */ ++#define PCIMAXFREQ 34000000 /* 33 MHz + fudge */ + -+#define ILP_DIV_5MHZ 0 /* ILP = 5 MHz */ -+#define ILP_DIV_1MHZ 4 /* ILP = 1 MHz */ ++#define ILP_DIV_5MHZ 0 /* ILP = 5 MHz */ ++#define ILP_DIV_1MHZ 4 /* ILP = 1 MHz */ + -+#define MIN_DUMPBUFLEN 32 /* debug */ -+ -+/* different register spaces to access thr'u pcie indirect access*/ -+#define PCIE_CONFIGREGS 1 -+#define PCIE_PCIEREGS 2 ++/* different register spaces to access thr'u pcie indirect access */ ++#define PCIE_CONFIGREGS 1 /* Access to config space */ ++#define PCIE_PCIEREGS 2 /* Access to pcie registers */ + +/* GPIO Based LED powersave defines */ -+#define DEFAULT_GPIO_ONTIME 10 -+#define DEFAULT_GPIO_OFFTIME 90 ++#define DEFAULT_GPIO_ONTIME 10 /* Default: 10% on */ ++#define DEFAULT_GPIO_OFFTIME 90 /* Default: 10% on */ + +#define DEFAULT_GPIOTIMERVAL ((DEFAULT_GPIO_ONTIME << GPIO_ONTIME_SHIFT) | DEFAULT_GPIO_OFFTIME) + @@ -12950,16 +12159,16 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + * so we program MEM_SEG with 12th bit when necessary(access sb regsiters). + * For normal PCMCIA bus(CFTable_regwinsz > 2k), do nothing special + */ -+ if(si->memseg) { ++ if (si->memseg) { + INTR_OFF(si, intr_val); + tmp = 1; + OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1); -+ sbr = (uint32) ((uintptr) sbr & ~(1 << 11)); /* mask out bit 11*/ ++ sbr = (volatile uint32 *)((uintptr)sbr & ~(1 << 11)); /* mask out bit 11 */ + } + -+ val = R_REG(sbr); ++ val = R_REG(si->osh, sbr); + -+ if(si->memseg) { ++ if (si->memseg) { + tmp = 0; + OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1); + INTR_RESTORE(si, intr_val); @@ -12982,29 +12191,29 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + * so we program MEM_SEG with 12th bit when necessary(access sb regsiters). + * For normal PCMCIA bus(CFTable_regwinsz > 2k), do nothing special + */ -+ if(si->memseg) { ++ if (si->memseg) { + INTR_OFF(si, intr_val); + tmp = 1; + OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1); -+ sbr = (uint32) ((uintptr) sbr & ~(1 << 11)); /* mask out bit 11*/ ++ sbr = (volatile uint32 *)((uintptr)sbr & ~(1 << 11)); /* mask out bit 11 */ + } + + if (BUSTYPE(si->sb.bustype) == PCMCIA_BUS) { +#ifdef IL_BIGENDIAN -+ dummy = R_REG(sbr); -+ W_REG(((volatile uint16 *)sbr + 1), (uint16)((v >> 16) & 0xffff)); -+ dummy = R_REG(sbr); -+ W_REG((volatile uint16 *)sbr, (uint16)(v & 0xffff)); ++ dummy = R_REG(si->osh, sbr); ++ W_REG(si->osh, ((volatile uint16 *)sbr + 1), (uint16)((v >> 16) & 0xffff)); ++ dummy = R_REG(si->osh, sbr); ++ W_REG(si->osh, (volatile uint16 *)sbr, (uint16)(v & 0xffff)); +#else -+ dummy = R_REG(sbr); -+ W_REG((volatile uint16 *)sbr, (uint16)(v & 0xffff)); -+ dummy = R_REG(sbr); -+ W_REG(((volatile uint16 *)sbr + 1), (uint16)((v >> 16) & 0xffff)); -+#endif ++ dummy = R_REG(si->osh, sbr); ++ W_REG(si->osh, (volatile uint16 *)sbr, (uint16)(v & 0xffff)); ++ dummy = R_REG(si->osh, sbr); ++ W_REG(si->osh, ((volatile uint16 *)sbr + 1), (uint16)((v >> 16) & 0xffff)); ++#endif /* IL_BIGENDIAN */ + } else -+ W_REG(sbr, v); ++ W_REG(si->osh, sbr, v); + -+ if(si->memseg) { ++ if (si->memseg) { + tmp = 0; + OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1); + INTR_RESTORE(si, intr_val); @@ -13020,9 +12229,9 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + * vars - pointer to a pointer area for "environment" variables + * varsz - pointer to int to return the size of the vars + */ -+sb_t * ++sb_t * +BCMINITFN(sb_attach)(uint devid, osl_t *osh, void *regs, -+ uint bustype, void *sdh, char **vars, int *varsz) ++ uint bustype, void *sdh, char **vars, uint *varsz) +{ + sb_info_t *si; + @@ -13032,10 +12241,11 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return (NULL); + } + -+ if (BCMINIT(sb_doattach)(si, devid, osh, regs, bustype, sdh, vars, varsz) == NULL) { -+ MFREE(osh, si, sizeof (sb_info_t)); ++ if (sb_doattach(si, devid, osh, regs, bustype, sdh, vars, (uint*)varsz) == NULL) { ++ MFREE(osh, si, sizeof(sb_info_t)); + return (NULL); + } ++ + return (sb_t *)si; +} + @@ -13045,43 +12255,47 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* global kernel resource */ +static sb_info_t ksi; ++static bool ksi_attached = FALSE; + +/* generic kernel variant of sb_attach() */ -+sb_t * -+BCMINITFN(sb_kattach)() ++sb_t * ++BCMINITFN(sb_kattach)(void) +{ ++ osl_t *osh = NULL; + uint32 *regs; + -+ if (ksi.curmap == NULL) { ++ if (!ksi_attached) { + uint32 cid; + + regs = (uint32 *)REG_MAP(SB_ENUM_BASE, SB_CORE_SIZE); -+ cid = R_REG((uint32 *)regs); -+ if (((cid & CID_ID_MASK) == BCM4712_DEVICE_ID) && ++ cid = R_REG(osh, (uint32 *)regs); ++ if (((cid & CID_ID_MASK) == BCM4712_CHIP_ID) && + ((cid & CID_PKG_MASK) != BCM4712LARGE_PKG_ID) && + ((cid & CID_REV_MASK) <= (3 << CID_REV_SHIFT))) { + uint32 *scc, val; + + scc = (uint32 *)((uchar*)regs + OFFSETOF(chipcregs_t, slow_clk_ctl)); -+ val = R_REG(scc); ++ val = R_REG(osh, scc); + SB_ERROR((" initial scc = 0x%x\n", val)); + val |= SCC_SS_XTAL; -+ W_REG(scc, val); ++ W_REG(osh, scc, val); + } + -+ if (BCMINIT(sb_doattach)(&ksi, BCM4710_DEVICE_ID, NULL, (void*)regs, ++ if (sb_doattach(&ksi, BCM4710_DEVICE_ID, osh, (void*)regs, + SB_BUS, NULL, NULL, NULL) == NULL) { + return NULL; + } ++ else ++ ksi_attached = TRUE; + } + + return (sb_t *)&ksi; +} -+#endif ++#endif /* !BCMBUSTYPE || (BCMBUSTYPE == SB_BUS) */ + -+static sb_info_t * ++static sb_info_t * +BCMINITFN(sb_doattach)(sb_info_t *si, uint devid, osl_t *osh, void *regs, -+ uint bustype, void *sdh, char **vars, int *varsz) ++ uint bustype, void *sdh, char **vars, uint *varsz) +{ + uint origidx; + chipcregs_t *cc; @@ -13090,26 +12304,27 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + ASSERT(GOODREGS(regs)); + -+ bzero((uchar*)si, sizeof (sb_info_t)); ++ bzero((uchar*)si, sizeof(sb_info_t)); + + si->sb.buscoreidx = si->gpioidx = BADIDX; + -+ si->osh = osh; + si->curmap = regs; + si->sdh = sdh; ++ si->osh = osh; + + /* check to see if we are a sb core mimic'ing a pci core */ + if (bustype == PCI_BUS) { -+ if (OSL_PCI_READ_CONFIG(osh, PCI_SPROM_CONTROL, sizeof (uint32)) == 0xffffffff) ++ if (OSL_PCI_READ_CONFIG(si->osh, PCI_SPROM_CONTROL, sizeof(uint32)) == 0xffffffff) { ++ SB_ERROR(("%s: incoming bus is PCI but it's a lie, switching to SB " ++ "devid:0x%x\n", __FUNCTION__, devid)); + bustype = SB_BUS; -+ else -+ bustype = PCI_BUS; ++ } + } + + si->sb.bustype = bustype; + if (si->sb.bustype != BUSTYPE(si->sb.bustype)) { + SB_ERROR(("sb_doattach: bus type %d does not match configured bus type %d\n", -+ si->sb.bustype, BUSTYPE(si->sb.bustype))); ++ si->sb.bustype, BUSTYPE(si->sb.bustype))); + return NULL; + } + @@ -13122,9 +12337,9 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + sb_clkctl_xtal(&si->sb, XTAL|PLL, ON); + + if (BUSTYPE(si->sb.bustype) == PCI_BUS) { -+ w = OSL_PCI_READ_CONFIG(osh, PCI_BAR0_WIN, sizeof (uint32)); ++ w = OSL_PCI_READ_CONFIG(si->osh, PCI_BAR0_WIN, sizeof(uint32)); + if (!GOODCOREADDR(w)) -+ OSL_PCI_WRITE_CONFIG(si->osh, PCI_BAR0_WIN, sizeof (uint32), SB_ENUM_BASE); ++ OSL_PCI_WRITE_CONFIG(si->osh, PCI_BAR0_WIN, sizeof(uint32), SB_ENUM_BASE); + } + + /* initialize current core index value */ @@ -13137,7 +12352,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + /* get sonics backplane revision */ + sb = REGS2SB(si->curmap); -+ si->sb.sonicsrev = (R_SBREG(si, &(sb)->sbidlow) & SBIDL_RV_MASK) >> SBIDL_RV_SHIFT; ++ si->sb.sonicsrev = (R_SBREG(si, &sb->sbidlow) & SBIDL_RV_MASK) >> SBIDL_RV_SHIFT; + + /* keep and reuse the initial register mapping */ + origidx = si->curidx; @@ -13153,16 +12368,12 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + /* determine chip id and rev */ + if (cc) { + /* chip common core found! */ -+ si->sb.chip = R_REG(&cc->chipid) & CID_ID_MASK; -+ si->sb.chiprev = (R_REG(&cc->chipid) & CID_REV_MASK) >> CID_REV_SHIFT; -+ si->sb.chippkg = (R_REG(&cc->chipid) & CID_PKG_MASK) >> CID_PKG_SHIFT; ++ si->sb.chip = R_REG(si->osh, &cc->chipid) & CID_ID_MASK; ++ si->sb.chiprev = (R_REG(si->osh, &cc->chipid) & CID_REV_MASK) >> CID_REV_SHIFT; ++ si->sb.chippkg = (R_REG(si->osh, &cc->chipid) & CID_PKG_MASK) >> CID_PKG_SHIFT; + } else { -+ /* The only pcmcia chip without a chipcommon core is a 4301 */ -+ if (BUSTYPE(si->sb.bustype) == PCMCIA_BUS) -+ devid = BCM4301_DEVICE_ID; -+ + /* no chip common core -- must convert device id to chip id */ -+ if ((si->sb.chip = BCMINIT(sb_pcidev2chip)(devid)) == 0) { ++ if ((si->sb.chip = sb_pcidev2chip(devid)) == 0) { + SB_ERROR(("sb_doattach: unrecognized device id 0x%04x\n", devid)); + sb_setcoreidx(&si->sb, origidx); + return NULL; @@ -13174,9 +12385,9 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + /* determine numcores */ + if (cc && ((si->sb.ccrev == 4) || (si->sb.ccrev >= 6))) -+ si->numcores = (R_REG(&cc->chipid) & CID_CC_MASK) >> CID_CC_SHIFT; ++ si->numcores = (R_REG(si->osh, &cc->chipid) & CID_CC_MASK) >> CID_CC_SHIFT; + else -+ si->numcores = BCMINIT(sb_chip2numcores)(si->sb.chip); ++ si->numcores = sb_chip2numcores(si->sb.chip); + + /* return to original core */ + sb_setcoreidx(&si->sb, origidx); @@ -13185,7 +12396,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + ASSERT(si->sb.chip); + + /* scan for cores */ -+ BCMINIT(sb_scan)(si); ++ sb_scan(si); + + /* fixup necessary chip/core configurations */ + if (BUSTYPE(si->sb.bustype) == PCI_BUS) { @@ -13194,13 +12405,13 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return NULL; + } + } -+ ++ + /* srom_var_init() depends on sb_scan() info */ -+ if (srom_var_init(si, si->sb.bustype, si->curmap, osh, vars, varsz)) { ++ if (srom_var_init(si, si->sb.bustype, si->curmap, si->osh, vars, varsz)) { + SB_ERROR(("sb_doattach: srom_var_init failed: bad srom\n")); + return (NULL); + } -+ ++ + if (cc == NULL) { + /* + * The chip revision number is hardwired into all @@ -13213,7 +12424,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + ASSERT(vars); + si->sb.chiprev = getintvar(*vars, "chiprev"); + } else if (BUSTYPE(si->sb.bustype) == PCI_BUS) { -+ w = OSL_PCI_READ_CONFIG(osh, PCI_CFG_REV, sizeof (uint32)); ++ w = OSL_PCI_READ_CONFIG(si->osh, PCI_CFG_REV, sizeof(uint32)); + si->sb.chiprev = w & 0xff; + } else + si->sb.chiprev = 0; @@ -13234,7 +12445,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + switch (BUSTYPE(si->sb.bustype)) { + case PCI_BUS: + /* do a pci config read to get subsystem id and subvendor id */ -+ w = OSL_PCI_READ_CONFIG(osh, PCI_CFG_SVID, sizeof (uint32)); ++ w = OSL_PCI_READ_CONFIG(si->osh, PCI_CFG_SVID, sizeof(uint32)); + si->sb.boardvendor = w & 0xffff; + si->sb.boardtype = (w >> 16) & 0xffff; + break; @@ -13260,11 +12471,16 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + /* setup the GPIO based LED powersave register */ + if (si->sb.ccrev >= 16) { -+ w = getintvar(*vars, "gpiotimerval"); -+ if (!w) -+ w = DEFAULT_GPIOTIMERVAL; ++ if ((vars == NULL) || ((w = getintvar(*vars, "leddc")) == 0)) ++ w = DEFAULT_GPIOTIMERVAL; + sb_corereg(si, 0, OFFSETOF(chipcregs_t, gpiotimerval), ~0, w); + } ++ if ((si->sb.chip == BCM4311_CHIP_ID) && (si->sb.chiprev <= 1)) { ++ /* set proper clk setup delays before forcing HT */ ++ sb_clkctl_init((void *)si); ++ sb_corereg((void*)si, SB_CC_IDX, OFFSETOF(chipcregs_t, system_clk_ctl), ++ SYCC_HR, SYCC_HR); ++ } + + + return (si); @@ -13279,7 +12495,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + si = SB_INFO(sbh); + sb = REGS2SB(si->curmap); + -+ return ((R_SBREG(si, &(sb)->sbidhigh) & SBIDH_CC_MASK) >> SBIDH_CC_SHIFT); ++ return ((R_SBREG(si, &sb->sbidhigh) & SBIDH_CC_MASK) >> SBIDH_CC_SHIFT); +} + +uint @@ -13307,7 +12523,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + break; + + case PCI_BUS: -+ sbaddr = OSL_PCI_READ_CONFIG(si->osh, PCI_BAR0_WIN, sizeof (uint32)); ++ sbaddr = OSL_PCI_READ_CONFIG(si->osh, PCI_BAR0_WIN, sizeof(uint32)); + break; + + case PCMCIA_BUS: { @@ -13347,7 +12563,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + si = SB_INFO(sbh); + sb = REGS2SB(si->curmap); + -+ return ((R_SBREG(si, &(sb)->sbidhigh) & SBIDH_VC_MASK) >> SBIDH_VC_SHIFT); ++ return ((R_SBREG(si, &sb->sbidhigh) & SBIDH_VC_MASK) >> SBIDH_VC_SHIFT); +} + +uint @@ -13359,7 +12575,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + si = SB_INFO(sbh); + sb = REGS2SB(si->curmap); -+ sbidh = R_SBREG(si, &(sb)->sbidhigh); ++ sbidh = R_SBREG(si, &sb->sbidhigh); + + return (SBCOREREV(sbidh)); +} @@ -13373,7 +12589,18 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return si->osh; +} + -+#define SBTML_ALLOW (SBTML_PE | SBTML_FGC | SBTML_FL_MASK) ++void ++sb_setosh(sb_t *sbh, osl_t *osh) ++{ ++ sb_info_t *si; ++ ++ si = SB_INFO(sbh); ++ if (si->osh != NULL) { ++ SB_ERROR(("osh is already set....\n")); ++ ASSERT(!si->osh); ++ } ++ si->osh = osh; ++} + +/* set/clear sbtmstatelow core-specific flags */ +uint32 @@ -13387,7 +12614,6 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + sb = REGS2SB(si->curmap); + + ASSERT((val & ~mask) == 0); -+ ASSERT((mask & ~SBTML_ALLOW) == 0); + + /* mask and set */ + if (mask || val) { @@ -13396,7 +12622,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + } + + /* return the new value */ -+ return (R_SBREG(si, &sb->sbtmstatelow) & SBTML_ALLOW); ++ return (R_SBREG(si, &sb->sbtmstatelow)); +} + +/* set/clear sbtmstatehigh core-specific flags */ @@ -13423,31 +12649,27 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return (R_SBREG(si, &sb->sbtmstatehigh) & SBTMH_FL_MASK); +} + -+/* caller needs to take care of core-specific bist hazards */ ++/* Run bist on current core. Caller needs to take care of core-specific bist hazards */ +int -+sb_corebist(sb_t *sbh, uint coreid, uint coreunit) ++sb_corebist(sb_t *sbh) +{ + uint32 sblo; -+ uint coreidx; + sb_info_t *si; ++ sbconfig_t *sb; + int result = 0; + + si = SB_INFO(sbh); ++ sb = REGS2SB(si->curmap); + -+ coreidx = sb_findcoreidx(si, coreid, coreunit); -+ if (!GOODIDX(coreidx)) ++ sblo = R_SBREG(si, &sb->sbtmstatelow); ++ W_SBREG(si, &sb->sbtmstatelow, (sblo | SBTML_FGC | SBTML_BE)); ++ ++ SPINWAIT(((R_SBREG(si, &sb->sbtmstatehigh) & SBTMH_BISTD) == 0), 100000); ++ ++ if (R_SBREG(si, &sb->sbtmstatehigh) & SBTMH_BISTF) + result = BCME_ERROR; -+ else { -+ sblo = sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatelow), 0, 0); -+ sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatelow), ~0, (sblo | SBTML_FGC | SBTML_BE)); -+ -+ SPINWAIT(((sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatehigh), 0, 0) & SBTMH_BISTD) == 0), 100000); -+ -+ if (sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatehigh), 0, 0) & SBTMH_BISTF) -+ result = BCME_ERROR; + -+ sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatelow), ~0, sblo); -+ } ++ W_SBREG(si, &sb->sbtmstatelow, sblo); + + return result; +} @@ -13461,32 +12683,75 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + si = SB_INFO(sbh); + sb = REGS2SB(si->curmap); + -+ return ((R_SBREG(si, &(sb)->sbtmstatelow) & (SBTML_RESET | SBTML_REJ_MASK | SBTML_CLK)) == SBTML_CLK); ++ return ((R_SBREG(si, &sb->sbtmstatelow) & ++ (SBTML_RESET | SBTML_REJ_MASK | SBTML_CLK)) == SBTML_CLK); +} + +/* + * Switch to 'coreidx', issue a single arbitrary 32bit register mask&set operation, + * switch back to the original core, and return the new value. ++ * ++ * When using the silicon backplane, no fidleing with interrupts or core switches are needed. ++ * ++ * Also, when using pci/pcie, we can optimize away the core switching for pci registers ++ * and (on newer pci cores) chipcommon registers. + */ +static uint +sb_corereg(sb_info_t *si, uint coreidx, uint regoff, uint mask, uint val) +{ -+ uint origidx; -+ uint32 *r; ++ uint origidx = 0; ++ uint32 *r = NULL; + uint w; + uint intr_val = 0; ++ bool fast = FALSE; + + ASSERT(GOODIDX(coreidx)); + ASSERT(regoff < SB_CORE_SIZE); + ASSERT((val & ~mask) == 0); + -+ INTR_OFF(si, intr_val); ++#ifdef notyet ++ if (si->sb.bustype == SB_BUS) { ++ /* If internal bus, we can always get at everything */ ++ fast = TRUE; ++ r = (uint32 *)((uchar *)si->regs[coreidx] + regoff); ++ } else if (si->sb.bustype == PCI_BUS) { ++ /* If pci/pcie, we can get at pci/pcie regs and on newer cores to chipc */ + -+ /* save current core index */ -+ origidx = sb_coreidx(&si->sb); ++ if ((si->coreid[coreidx] == SB_CC) && ++ ((si->sb.buscoretype == SB_PCIE) || ++ (si->sb.buscorerev >= 13))) { ++ /* Chipc registers are mapped at 12KB */ + -+ /* switch core */ -+ r = (uint32*) ((uchar*) sb_setcoreidx(&si->sb, coreidx) + regoff); ++ fast = TRUE; ++ r = (uint32 *)((char *)si->curmap + PCI_16KB0_CCREGS_OFFSET + regoff); ++ } else if (si->sb.buscoreidx == coreidx) { ++ /* pci registers are at either in the last 2KB of an 8KB window ++ * or, in pcie and pci rev 13 at 8KB ++ */ ++ fast = TRUE; ++ if ((si->sb.buscoretype == SB_PCIE) || ++ (si->sb.buscorerev >= 13)) ++ r = (uint32 *)((char *)si->curmap + ++ PCI_16KB0_PCIREGS_OFFSET + regoff); ++ else ++ r = (uint32 *)((char *)si->curmap + ++ ((regoff >= SBCONFIGOFF) ? ++ PCI_BAR0_PCISBR_OFFSET : PCI_BAR0_PCIREGS_OFFSET) + ++ regoff); ++ } ++ } ++#endif /* notyet */ ++ ++ if (!fast) { ++ INTR_OFF(si, intr_val); ++ ++ /* save current core index */ ++ origidx = sb_coreidx(&si->sb); ++ ++ /* switch core */ ++ r = (uint32*) ((uchar*) sb_setcoreidx(&si->sb, coreidx) + regoff); ++ } ++ ASSERT(r); + + /* mask and set */ + if (mask || val) { @@ -13494,8 +12759,8 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + w = (R_SBREG(si, r) & ~mask) | val; + W_SBREG(si, r, w); + } else { -+ w = (R_REG(r) & ~mask) | val; -+ W_REG(r, w); ++ w = (R_REG(si->osh, r) & ~mask) | val; ++ W_REG(si->osh, r, w); + } + } + @@ -13503,13 +12768,16 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + if (regoff >= SBCONFIGOFF) + w = R_SBREG(si, r); + else -+ w = R_REG(r); ++ w = R_REG(si->osh, r); + -+ /* restore core index */ -+ if (origidx != coreidx) -+ sb_setcoreidx(&si->sb, origidx); ++ if (!fast) { ++ /* restore core index */ ++ if (origidx != coreidx) ++ sb_setcoreidx(&si->sb, origidx); ++ ++ INTR_RESTORE(si, intr_val); ++ } + -+ INTR_RESTORE(si, intr_val); + return (w); +} + @@ -13531,7 +12799,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + +/* return TRUE if requested capability exists in the PCI config space */ -+static bool ++static bool +sb_find_pci_capability(sb_info_t *si, uint8 req_cap_id, uchar *buf, uint32 *buflen) +{ + uint8 cap_id; @@ -13542,7 +12810,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + if (BUSTYPE(si->sb.bustype) != PCI_BUS) + return FALSE; + -+ /* check for Header type 0*/ ++ /* check for Header type 0 */ + byte_val = read_pci_cfg_byte(PCI_CFG_HDR); + if ((byte_val & 0x7f) != PCI_HEADER_NORMAL) + return FALSE; @@ -13571,7 +12839,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return FALSE; + } + /* found the caller requested capability */ -+ if ((buf != NULL) && (buflen != NULL)) { ++ if ((buf != NULL) && (buflen != NULL)) { + bufsize = *buflen; + if (!bufsize) goto end; + *buflen = 0; @@ -13591,10 +12859,10 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +} + +/* return TRUE if PCIE capability exists the pci config space */ -+static bool ++static inline bool +sb_ispcie(sb_info_t *si) +{ -+ return(sb_find_pci_capability(si, PCI_CAP_PCIECAP_ID, NULL, NULL)); ++ return (sb_find_pci_capability(si, PCI_CAP_PCIECAP_ID, NULL, NULL)); +} + +/* scan the sb enumerated space to identify all cores */ @@ -13611,7 +12879,6 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + uint pcierev; + + -+ + /* numcores should already be set */ + ASSERT((si->numcores > 0) && (si->numcores <= SB_MAXCORES)); + @@ -13631,7 +12898,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + sb_setcoreidx(&si->sb, i); + si->coreid[i] = sb_coreid(&si->sb); + -+ if (si->coreid[i] == SB_PCI) { ++ if (si->coreid[i] == SB_PCI) { + pciidx = i; + pcirev = sb_corerev(&si->sb); + pci = TRUE; @@ -13642,7 +12909,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + } else if (si->coreid[i] == SB_PCMCIA) { + si->sb.buscorerev = sb_corerev(&si->sb); + si->sb.buscoretype = si->coreid[i]; -+ si->sb.buscoreidx = i; ++ si->sb.buscoreidx = i; + } + } + if (pci && pcie) { @@ -13653,13 +12920,12 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + } + if (pci) { + si->sb.buscoretype = SB_PCI; -+ si->sb.buscorerev = pcirev; -+ si->sb.buscoreidx = pciidx; -+ } -+ else if (pcie) { ++ si->sb.buscorerev = pcirev; ++ si->sb.buscoreidx = pciidx; ++ } else if (pcie) { + si->sb.buscoretype = SB_PCIE; -+ si->sb.buscorerev = pcierev; -+ si->sb.buscoreidx = pcieidx; ++ si->sb.buscorerev = pcierev; ++ si->sb.buscoreidx = pcieidx; + } + + /* @@ -13703,9 +12969,11 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + REG_UNMAP(si->regs[idx]); + si->regs[idx] = NULL; + } -+ ++#if !defined(BCMBUSTYPE) || (BCMBUSTYPE == SB_BUS) + if (si != &ksi) -+ MFREE(si->osh, si, sizeof (sb_info_t)); ++#endif /* !BCMBUSTYPE || (BCMBUSTYPE == SB_BUS) */ ++ MFREE(si->osh, si, sizeof(sb_info_t)); ++ +} + +/* use pci dev id to determine chip id for chips not having a chipcommon core */ @@ -13713,15 +12981,11 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +BCMINITFN(sb_pcidev2chip)(uint pcidev) +{ + if ((pcidev >= BCM4710_DEVICE_ID) && (pcidev <= BCM47XX_USB_ID)) -+ return (BCM4710_DEVICE_ID); -+ if ((pcidev >= BCM4402_DEVICE_ID) && (pcidev <= BCM4402_V90_ID)) -+ return (BCM4402_DEVICE_ID); ++ return (BCM4710_CHIP_ID); ++ if ((pcidev >= BCM4402_ENET_ID) && (pcidev <= BCM4402_V90_ID)) ++ return (BCM4402_CHIP_ID); + if (pcidev == BCM4401_ENET_ID) -+ return (BCM4402_DEVICE_ID); -+ if ((pcidev >= BCM4307_V90_ID) && (pcidev <= BCM4307_D11B_ID)) -+ return (BCM4307_DEVICE_ID); -+ if (pcidev == BCM4301_DEVICE_ID) -+ return (BCM4301_DEVICE_ID); ++ return (BCM4402_CHIP_ID); + + return (0); +} @@ -13730,17 +12994,15 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +static uint +BCMINITFN(sb_chip2numcores)(uint chip) +{ -+ if (chip == BCM4710_DEVICE_ID) ++ if (chip == BCM4710_CHIP_ID) + return (9); -+ if (chip == BCM4402_DEVICE_ID) ++ if (chip == BCM4402_CHIP_ID) + return (3); -+ if ((chip == BCM4301_DEVICE_ID) || (chip == BCM4307_DEVICE_ID)) -+ return (5); -+ if (chip == BCM4306_DEVICE_ID) /* < 4306c0 */ ++ if (chip == BCM4306_CHIP_ID) /* < 4306c0 */ + return (6); -+ if (chip == BCM4704_DEVICE_ID) ++ if (chip == BCM4704_CHIP_ID) + return (9); -+ if (chip == BCM5365_DEVICE_ID) ++ if (chip == BCM5365_CHIP_ID) + return (7); + + SB_ERROR(("sb_chip2numcores: unsupported chip 0x%x\n", chip)); @@ -13750,7 +13012,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* return index of coreid or BADIDX if not found */ +static uint -+sb_findcoreidx( sb_info_t *si, uint coreid, uint coreunit) ++sb_findcoreidx(sb_info_t *si, uint coreid, uint coreunit) +{ + uint found; + uint i; @@ -13768,7 +13030,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +} + +/* -+ * this function changes logical "focus" to the indiciated core, ++ * this function changes logical "focus" to the indiciated core, + * must be called with interrupt off. + * Moreover, callers should keep interrupts off during switching out of and back to d11 core + */ @@ -13783,7 +13045,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + if (coreidx >= si->numcores) + return (NULL); -+ ++ + /* + * If the user has provided an interrupt mask enabled function, + * then assert interrupts are disabled before switching the core. @@ -13833,7 +13095,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +} + +/* -+ * this function changes logical "focus" to the indiciated core, ++ * this function changes logical "focus" to the indiciated core, + * must be called with interrupt off. + * Moreover, callers should keep interrupts off during switching out of and back to d11 core + */ @@ -13853,7 +13115,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* return chip number */ +uint -+BCMINITFN(sb_chip)(sb_t *sbh) ++sb_chip(sb_t *sbh) +{ + sb_info_t *si; + @@ -13863,7 +13125,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* return chip revision number */ +uint -+BCMINITFN(sb_chiprev)(sb_t *sbh) ++sb_chiprev(sb_t *sbh) +{ + sb_info_t *si; + @@ -13873,7 +13135,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* return chip common revision number */ +uint -+BCMINITFN(sb_chipcrev)(sb_t *sbh) ++sb_chipcrev(sb_t *sbh) +{ + sb_info_t *si; + @@ -13883,7 +13145,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* return chip package option */ +uint -+BCMINITFN(sb_chippkg)(sb_t *sbh) ++sb_chippkg(sb_t *sbh) +{ + sb_info_t *si; + @@ -13893,7 +13155,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* return PCI core rev. */ +uint -+BCMINITFN(sb_pcirev)(sb_t *sbh) ++sb_pcirev(sb_t *sbh) +{ + sb_info_t *si; + @@ -13911,7 +13173,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return (PCI(si) && (si->sb.buscorerev <= 10)); +} + -+static void ++static void +BCMINITFN(sb_war30841)(sb_info_t *si) +{ + sb_pcie_mdiowrite(si, MDIODATA_DEV_RX, SERDES_RX_TIMER1, 0x8128); @@ -13931,7 +13193,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* return board vendor id */ +uint -+BCMINITFN(sb_boardvendor)(sb_t *sbh) ++sb_boardvendor(sb_t *sbh) +{ + sb_info_t *si; + @@ -13941,7 +13203,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* return boardtype */ +uint -+BCMINITFN(sb_boardtype)(sb_t *sbh) ++sb_boardtype(sb_t *sbh) +{ + sb_info_t *si; + char *var; @@ -14015,7 +13277,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + si = SB_INFO(sbh); + -+ bcopy((uchar*)si->coreid, (uchar*)coreid, (si->numcores * sizeof (uint))); ++ bcopy((uchar*)si->coreid, (uchar*)coreid, (si->numcores * sizeof(uint))); + return (si->numcores); +} + @@ -14052,14 +13314,14 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + chipcregs_t *ccregs = (chipcregs_t *)sb_setcore(sbh, SB_CC, 0); + + /* do the buffer registers update */ -+ W_REG(&ccregs->broadcastaddress, SB_COMMIT); -+ W_REG(&ccregs->broadcastdata, 0x0); ++ W_REG(si->osh, &ccregs->broadcastaddress, SB_COMMIT); ++ W_REG(si->osh, &ccregs->broadcastdata, 0x0); + } else if (PCI(si)) { + sbpciregs_t *pciregs = (sbpciregs_t *)sb_setcore(sbh, SB_PCI, 0); + + /* do the buffer registers update */ -+ W_REG(&pciregs->bcastaddr, SB_COMMIT); -+ W_REG(&pciregs->bcastdata, 0x0); ++ W_REG(si->osh, &pciregs->bcastaddr, SB_COMMIT); ++ W_REG(si->osh, &pciregs->bcastdata, 0x0); + } else + ASSERT(0); + @@ -14068,9 +13330,13 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + INTR_RESTORE(si, intr_val); +} + -+/* reset and re-enable a core */ ++/* reset and re-enable a core ++ * inputs: ++ * bits - core specific bits that are set during and after reset sequence ++ * resetbits - core specific bits that are set only during reset sequence ++ */ +void -+sb_core_reset(sb_t *sbh, uint32 bits) ++sb_core_reset(sb_t *sbh, uint32 bits, uint32 resetbits) +{ + sb_info_t *si; + sbconfig_t *sb; @@ -14083,14 +13349,14 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + /* + * Must do the disable sequence first to work for arbitrary current core state. + */ -+ sb_core_disable(sbh, bits); ++ sb_core_disable(sbh, (bits | resetbits)); + + /* + * Now do the initialization sequence. + */ + + /* set reset while enabling the clock and forcing them on throughout the core */ -+ W_SBREG(si, &sb->sbtmstatelow, (SBTML_FGC | SBTML_CLK | SBTML_RESET | bits)); ++ W_SBREG(si, &sb->sbtmstatelow, (SBTML_FGC | SBTML_CLK | SBTML_RESET | bits | resetbits)); + dummy = R_SBREG(si, &sb->sbtmstatelow); + OSL_DELAY(1); + @@ -14120,7 +13386,8 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + si = SB_INFO(sbh); + -+ if ( (BUSTYPE(si->sb.bustype) != PCI_BUS) || PCIE(si) || (PCI(si) && (si->sb.buscorerev >= 5)) ) ++ if ((BUSTYPE(si->sb.bustype) != PCI_BUS) || PCIE(si) || ++ (PCI(si) && (si->sb.buscorerev >= 5))) + return; + + ASSERT(GOODREGS(si->curmap)); @@ -14128,13 +13395,13 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + if (BUSTYPE(si->sb.bustype) == SB_BUS) { + SET_SBREG(si, &sb->sbimconfiglow, -+ SBIMCL_RTO_MASK | SBIMCL_STO_MASK, -+ (0x5 << SBIMCL_RTO_SHIFT) | 0x3); ++ SBIMCL_RTO_MASK | SBIMCL_STO_MASK, ++ (0x5 << SBIMCL_RTO_SHIFT) | 0x3); + } else { + if (sb_coreid(sbh) == SB_PCI) { + SET_SBREG(si, &sb->sbimconfiglow, -+ SBIMCL_RTO_MASK | SBIMCL_STO_MASK, -+ (0x3 << SBIMCL_RTO_SHIFT) | 0x2); ++ SBIMCL_RTO_MASK | SBIMCL_STO_MASK, ++ (0x3 << SBIMCL_RTO_SHIFT) | 0x2); + } else { + SET_SBREG(si, &sb->sbimconfiglow, (SBIMCL_RTO_MASK | SBIMCL_STO_MASK), 0); + } @@ -14185,7 +13452,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + idx = BADIDX; + switch (BUSTYPE(si->sb.bustype)) { + case PCI_BUS: -+ idx = si->sb.buscoreidx; ++ idx = si->sb.buscoreidx; + break; + case JTAG_BUS: + idx = SB_CC_IDX; @@ -14251,8 +13518,10 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + dummy = R_SBREG(si, &sb->sbtmstatelow); + OSL_DELAY(1); + SPINWAIT((R_SBREG(si, &sb->sbtmstatehigh) & SBTMH_BUSY), 100000); ++ if (R_SBREG(si, &sb->sbtmstatehigh) & SBTMH_BUSY) ++ SB_ERROR(("%s: target state still busy\n", __FUNCTION__)); + -+ if (R_SBREG(si, &sb->sbidlow) & SBIDL_INIT) { ++ if (R_SBREG(si, &sb->sbidlow) & SBIDL_INIT) { + OR_SBREG(si, &sb->sbimstate, SBIM_RJ); + dummy = R_SBREG(si, &sb->sbimstate); + OSL_DELAY(1); @@ -14280,10 +13549,28 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +{ + sb_info_t *si = SB_INFO(sbh); + ++ /* make sure we come up in fast clock mode */ ++ sb_clkctl_clk(sbh, CLK_FAST); ++ + /* instant NMI */ + switch (si->gpioid) { + case SB_CC: ++#ifdef __mips__ ++ if (sb_chip(sbh) == BCM4785_CHIP_ID && ticks <= 1) ++ MTC0(C0_BROADCOM, 4, (1 << 22)); ++#endif /* __mips__ */ + sb_corereg(si, 0, OFFSETOF(chipcregs_t, watchdog), ~0, ticks); ++#ifdef __mips__ ++ if (sb_chip(sbh) == BCM4785_CHIP_ID && ticks <= 1) { ++ __asm__ __volatile__ ( ++ ".set\tmips3\n\t" ++ "sync\n\t" ++ "wait\n\t" ++ ".set\tmips0" ++ ); ++ while (1); ++ } ++#endif /* __mips__ */ + break; + case SB_EXTIF: + sb_corereg(si, si->gpioidx, OFFSETOF(extifregs_t, watchdog), ~0, ticks); @@ -14296,21 +13583,14 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +sb_pcmcia_init(sb_t *sbh) +{ + sb_info_t *si; -+ uint8 cor; ++ uint8 cor = 0; + + si = SB_INFO(sbh); + + /* enable d11 mac interrupts */ -+ if (si->sb.chip == BCM4301_DEVICE_ID) { -+ /* Have to use FCR2 in 4301 */ -+ OSL_PCMCIA_READ_ATTR(si->osh, PCMCIA_FCR2 + PCMCIA_COR, &cor, 1); -+ cor |= COR_IRQEN | COR_FUNEN; -+ OSL_PCMCIA_WRITE_ATTR(si->osh, PCMCIA_FCR2 + PCMCIA_COR, &cor, 1); -+ } else { -+ OSL_PCMCIA_READ_ATTR(si->osh, PCMCIA_FCR0 + PCMCIA_COR, &cor, 1); -+ cor |= COR_IRQEN | COR_FUNEN; -+ OSL_PCMCIA_WRITE_ATTR(si->osh, PCMCIA_FCR0 + PCMCIA_COR, &cor, 1); -+ } ++ OSL_PCMCIA_READ_ATTR(si->osh, PCMCIA_FCR0 + PCMCIA_COR, &cor, 1); ++ cor |= COR_IRQEN | COR_FUNEN; ++ OSL_PCMCIA_WRITE_ATTR(si->osh, PCMCIA_FCR0 + PCMCIA_COR, &cor, 1); + +} + @@ -14320,7 +13600,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + * coremask is the bitvec of cores by index to be enabled. + */ +void -+sb_pci_setup(sb_t *sbh, uint coremask) ++BCMINITFN(sb_pci_setup)(sb_t *sbh, uint coremask) +{ + sb_info_t *si; + sbconfig_t *sb; @@ -14366,9 +13646,9 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + } + + if (PCI(si)) { -+ OR_REG(&pciregs->sbtopci2, (SBTOPCI_PREF|SBTOPCI_BURST)); ++ OR_REG(si->osh, &pciregs->sbtopci2, (SBTOPCI_PREF|SBTOPCI_BURST)); + if (si->sb.buscorerev >= 11) -+ OR_REG(&pciregs->sbtopci2, SBTOPCI_RC_READMULTI); ++ OR_REG(si->osh, &pciregs->sbtopci2, SBTOPCI_RC_READMULTI); + if (si->sb.buscorerev < 5) { + SET_SBREG(si, &sb->sbimconfiglow, SBIMCL_RTO_MASK | SBIMCL_STO_MASK, + (0x3 << SBIMCL_RTO_SHIFT) | 0x2); @@ -14376,17 +13656,28 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + } + } + -+ if (PCIE(si) && (si->sb.buscorerev == 0)) { -+ reg_val = sb_pcie_readreg((void *)sbh, (void *)PCIE_PCIEREGS, PCIE_TLP_WORKAROUNDSREG); -+ reg_val |= 0x8; -+ sb_pcie_writereg((void *)sbh, (void *)PCIE_PCIEREGS, PCIE_TLP_WORKAROUNDSREG, reg_val); ++#ifdef PCIE_SUPPOER ++ /* PCIE workarounds */ ++ if (PCIE(si)) { ++ if ((si->sb.buscorerev == 0) || (si->sb.buscorerev == 1)) { ++ reg_val = sb_pcie_readreg((void *)sbh, (void *)PCIE_PCIEREGS, ++ PCIE_TLP_WORKAROUNDSREG); ++ reg_val |= 0x8; ++ sb_pcie_writereg((void *)sbh, (void *)PCIE_PCIEREGS, ++ PCIE_TLP_WORKAROUNDSREG, reg_val); ++ } + -+ reg_val = sb_pcie_readreg((void *)sbh, (void *)PCIE_PCIEREGS, PCIE_DLLP_LCREG); -+ reg_val &= ~(0x40); -+ sb_pcie_writereg(sbh, (void *)PCIE_PCIEREGS, PCIE_DLLP_LCREG, reg_val); ++ if (si->sb.buscorerev == 1) { ++ reg_val = sb_pcie_readreg((void *)sbh, (void *)PCIE_PCIEREGS, ++ PCIE_DLLP_LCREG); ++ reg_val |= (0x40); ++ sb_pcie_writereg(sbh, (void *)PCIE_PCIEREGS, PCIE_DLLP_LCREG, reg_val); ++ } + -+ BCMINIT(sb_war30841)(si); ++ if (si->sb.buscorerev == 0) ++ sb_war30841(si); + } ++#endif + + /* switch back to previous core */ + sb_setcoreidx(sbh, idx); @@ -14495,9 +13786,9 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + else + return CC_T6_M0; + } else if ((pll_type == PLL_TYPE1) || -+ (pll_type == PLL_TYPE3) || -+ (pll_type == PLL_TYPE4) || -+ (pll_type == PLL_TYPE7)) { ++ (pll_type == PLL_TYPE3) || ++ (pll_type == PLL_TYPE4) || ++ (pll_type == PLL_TYPE7)) { + n1 = factor6(n1); + n2 += CC_F5_BIAS; + } else if (pll_type == PLL_TYPE2) { @@ -14511,10 +13802,9 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + ASSERT(0); + /* PLL types 3 and 7 use BASE2 (25Mhz) */ + if ((pll_type == PLL_TYPE3) || -+ (pll_type == PLL_TYPE7)) { ++ (pll_type == PLL_TYPE7)) { + clock = CC_CLOCK_BASE2 * n1 * n2; -+ } -+ else ++ } else + clock = CC_CLOCK_BASE1 * n1 * n2; + + if (clock == 0) @@ -14561,7 +13851,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + if ((mc & CC_T2MC_M3BYP) == 0) + clock /= m3; + -+ return(clock); ++ return (clock); + } +} + @@ -14585,37 +13875,32 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + /* switch to extif or chipc core */ + if ((eir = (extifregs_t *) sb_setcore(sbh, SB_EXTIF, 0))) { -+ n = R_REG(&eir->clockcontrol_n); -+ m = R_REG(&eir->clockcontrol_sb); ++ n = R_REG(si->osh, &eir->clockcontrol_n); ++ m = R_REG(si->osh, &eir->clockcontrol_sb); + } else if ((cc = (chipcregs_t *) sb_setcore(sbh, SB_CC, 0))) { -+ pll_type = R_REG(&cc->capabilities) & CAP_PLL_MASK; -+ n = R_REG(&cc->clockcontrol_n); -+ if (pll_type == PLL_TYPE6) -+ m = R_REG(&cc->clockcontrol_mips); -+ else if (pll_type == PLL_TYPE3) -+ { -+ // Added by Chen-I for 5365 -+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) -+ m = R_REG(&cc->clockcontrol_sb); -+ else -+ m = R_REG(&cc->clockcontrol_m2); ++ pll_type = R_REG(si->osh, &cc->capabilities) & CAP_PLL_MASK; ++ if (pll_type == PLL_NONE) { ++ INTR_RESTORE(si, intr_val); ++ return 80000000; + } ++ n = R_REG(si->osh, &cc->clockcontrol_n); ++ if (pll_type == PLL_TYPE6) ++ m = R_REG(si->osh, &cc->clockcontrol_m3); ++ else if ((pll_type == PLL_TYPE3) && !(BCMINIT(sb_chip)(sbh) == 0x5365)) ++ m = R_REG(si->osh, &cc->clockcontrol_m2); + else -+ m = R_REG(&cc->clockcontrol_sb); ++ m = R_REG(si->osh, &cc->clockcontrol_sb); + } else { + INTR_RESTORE(si, intr_val); + return 0; + } + -+ // Added by Chen-I for 5365 -+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) -+ { ++ /* calculate rate */ ++ if (BCMINIT(sb_chip)(sbh) == 0x5365) + rate = 100000000; -+ } -+ else -+ { -+ /* calculate rate */ ++ else { + rate = sb_clock_rate(pll_type, n, m); ++ + if (pll_type == PLL_TYPE3) + rate = rate / 2; + } @@ -14756,8 +14041,10 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + priority = GPIO_DRV_PRIORITY; /* compatibility hack */ + -+ /* only cores on SB_BUS share GPIO's and only applcation users need to reserve/release GPIO */ -+ if ( (BUSTYPE(si->sb.bustype) != SB_BUS) || (!priority)) { ++ /* only cores on SB_BUS share GPIO's and only applcation users need to ++ * reserve/release GPIO ++ */ ++ if ((BUSTYPE(si->sb.bustype) != SB_BUS) || (!priority)) { + ASSERT((BUSTYPE(si->sb.bustype) == SB_BUS) && (priority)); + return -1; + } @@ -14778,7 +14065,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + +/* release one gpio */ +/* -+ * releasing the gpio doesn't change the current value on the GPIO last write value ++ * releasing the gpio doesn't change the current value on the GPIO last write value + * persists till some one overwrites it +*/ + @@ -14791,8 +14078,10 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + priority = GPIO_DRV_PRIORITY; /* compatibility hack */ + -+ /* only cores on SB_BUS share GPIO's and only applcation users need to reserve/release GPIO */ -+ if ( (BUSTYPE(si->sb.bustype) != SB_BUS) || (!priority)) { ++ /* only cores on SB_BUS share GPIO's and only applcation users need to ++ * reserve/release GPIO ++ */ ++ if ((BUSTYPE(si->sb.bustype) != SB_BUS) || (!priority)) { + ASSERT((BUSTYPE(si->sb.bustype) == SB_BUS) && (priority)); + return -1; + } @@ -14801,7 +14090,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + ASSERT((gpio_bitmask) && !((gpio_bitmask) & (gpio_bitmask - 1))); + return -1; + } -+ ++ + /* already released */ + if (!(sb_gpioreservation & gpio_bitmask)) + return -1; @@ -14924,11 +14213,11 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return -1; + + /* gpio led powersave reg */ -+ return(sb_corereg(si, 0, OFFSETOF(chipcregs_t, gpiotimeroutmask), mask, val)); ++ return (sb_corereg(si, 0, OFFSETOF(chipcregs_t, gpiotimeroutmask), mask, val)); +} + -+/* mask&set gpio timer val */ -+uint32 ++/* mask & set gpio timer val */ ++uint32 +sb_gpiotimerval(sb_t *sbh, uint32 mask, uint32 gpiotimerval) +{ + sb_info_t *si; @@ -14937,7 +14226,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + if (si->sb.ccrev < 16) + return -1; + -+ return(sb_corereg(si, 0, OFFSETOF(chipcregs_t, gpiotimerval), mask, gpiotimerval)); ++ return (sb_corereg(si, 0, OFFSETOF(chipcregs_t, gpiotimerval), mask, gpiotimerval)); +} + + @@ -14951,14 +14240,15 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + ASSERT(sb_coreid(&si->sb) == SB_CC); + + if (si->sb.ccrev < 6) { -+ if ((BUSTYPE(si->sb.bustype) == PCI_BUS) -+ && (OSL_PCI_READ_CONFIG(si->osh, PCI_GPIO_OUT, sizeof (uint32)) & PCI_CFG_GPIO_SCS)) ++ if ((BUSTYPE(si->sb.bustype) == PCI_BUS) && ++ (OSL_PCI_READ_CONFIG(si->osh, PCI_GPIO_OUT, sizeof(uint32)) & ++ PCI_CFG_GPIO_SCS)) + return (SCC_SS_PCI); + else + return (SCC_SS_XTAL); + } else if (si->sb.ccrev < 10) { + cc = (chipcregs_t*) sb_setcoreidx(&si->sb, si->curidx); -+ return (R_REG(&cc->slow_clk_ctl) & SCC_SS_MASK); ++ return (R_REG(si->osh, &cc->slow_clk_ctl) & SCC_SS_MASK); + } else /* Insta-clock */ + return (SCC_SS_XTAL); +} @@ -14977,7 +14267,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + cc = (chipcregs_t*) sb_setcoreidx(&si->sb, si->curidx); + + /* shouldn't be here unless we've established the chip has dynamic clk control */ -+ ASSERT(R_REG(&cc->capabilities) & CAP_PWR_CTL); ++ ASSERT(R_REG(si->osh, &cc->capabilities) & CAP_PWR_CTL); + + slowclk = sb_slowclk_src(si); + if (si->sb.ccrev < 6) { @@ -14986,7 +14276,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + else + return (max? (XTALMAXFREQ/32) : (XTALMINFREQ/32)); + } else if (si->sb.ccrev < 10) { -+ div = 4 * (((R_REG(&cc->slow_clk_ctl) & SCC_CD_MASK) >> SCC_CD_SHIFT) + 1); ++ div = 4 * (((R_REG(si->osh, &cc->slow_clk_ctl) & SCC_CD_MASK) >> SCC_CD_SHIFT) + 1); + if (slowclk == SCC_SS_LPO) + return (max? LPOMAXFREQ : LPOMINFREQ); + else if (slowclk == SCC_SS_XTAL) @@ -14997,7 +14287,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + ASSERT(0); + } else { + /* Chipc rev 10 is InstaClock */ -+ div = R_REG(&cc->system_clk_ctl) >> SYCC_CD_SHIFT; ++ div = R_REG(si->osh, &cc->system_clk_ctl) >> SYCC_CD_SHIFT; + div = 4 * (div + 1); + return (max ? XTALMAXFREQ : (XTALMINFREQ/div)); + } @@ -15005,7 +14295,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +} + +static void -+sb_clkctl_setdelay(sb_info_t *si, void *chipcregs) ++BCMINITFN(sb_clkctl_setdelay)(sb_info_t *si, void *chipcregs) +{ + chipcregs_t * cc; + uint slowmaxfreq, pll_delay, slowclk; @@ -15016,6 +14306,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + /* If the slow clock is not sourced by the xtal then add the xtal_on_delay + * since the xtal will also be powered down by dynamic clk control logic. + */ ++ + slowclk = sb_slowclk_src(si); + if (slowclk != SCC_SS_XTAL) + pll_delay += XTAL_ON_DELAY; @@ -15027,56 +14318,13 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + fref_sel_delay = ((slowmaxfreq * FREF_DELAY) + 999999) / 1000000; + + cc = (chipcregs_t *)chipcregs; -+ W_REG(&cc->pll_on_delay, pll_on_delay); -+ W_REG(&cc->fref_sel_delay, fref_sel_delay); -+} -+ -+int -+sb_pwrctl_slowclk(void *sbh, bool set, uint *div) -+{ -+ sb_info_t *si; -+ uint origidx; -+ chipcregs_t *cc; -+ uint intr_val = 0; -+ uint err = 0; -+ -+ si = SB_INFO(sbh); -+ -+ /* chipcommon cores prior to rev6 don't support slowclkcontrol */ -+ if (si->sb.ccrev < 6) -+ return 1; -+ -+ /* chipcommon cores rev10 are a whole new ball game */ -+ if (si->sb.ccrev >= 10) -+ return 1; -+ -+ if (set && ((*div % 4) || (*div < 4))) -+ return 2; -+ -+ INTR_OFF(si, intr_val); -+ origidx = si->curidx; -+ cc = (chipcregs_t*) sb_setcore(sbh, SB_CC, 0); -+ ASSERT(cc != NULL); -+ -+ if (!(R_REG(&cc->capabilities) & CAP_PWR_CTL)) { -+ err = 3; -+ goto done; -+ } -+ -+ if (set) { -+ SET_REG(&cc->slow_clk_ctl, SCC_CD_MASK, ((*div / 4 - 1) << SCC_CD_SHIFT)); -+ sb_clkctl_setdelay(sbh, (void *)cc); -+ } else -+ *div = 4 * (((R_REG(&cc->slow_clk_ctl) & SCC_CD_MASK) >> SCC_CD_SHIFT) + 1); -+ -+done: -+ sb_setcoreidx(sbh, origidx); -+ INTR_RESTORE(si, intr_val); -+ return err; ++ W_REG(si->osh, &cc->pll_on_delay, pll_on_delay); ++ W_REG(si->osh, &cc->fref_sel_delay, fref_sel_delay); +} + +/* initialize power control delay registers */ -+void sb_clkctl_init(sb_t *sbh) ++void ++BCMINITFN(sb_clkctl_init)(sb_t *sbh) +{ + sb_info_t *si; + uint origidx; @@ -15089,26 +14337,24 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + if ((cc = (chipcregs_t*) sb_setcore(sbh, SB_CC, 0)) == NULL) + return; + -+ if (!(R_REG(&cc->capabilities) & CAP_PWR_CTL)) -+ goto done; ++ if ((si->sb.chip == BCM4321_CHIP_ID) && (si->sb.chiprev < 2)) ++ W_REG(si->osh, &cc->chipcontrol, ++ (si->sb.chiprev == 0) ? CHIPCTRL_4321A0_DEFAULT : CHIPCTRL_4321A1_DEFAULT); + -+ /* 4317pc does not work with SlowClock less than 5 MHz */ -+ if ((BUSTYPE(si->sb.bustype) == PCMCIA_BUS) && (si->sb.ccrev >= 6) && (si->sb.ccrev < 10)) -+ SET_REG(&cc->slow_clk_ctl, SCC_CD_MASK, (ILP_DIV_5MHZ << SCC_CD_SHIFT)); ++ if (!(R_REG(si->osh, &cc->capabilities) & CAP_PWR_CTL)) ++ goto done; + + /* set all Instaclk chip ILP to 1 MHz */ + else if (si->sb.ccrev >= 10) -+ SET_REG(&cc->system_clk_ctl, SYCC_CD_MASK, (ILP_DIV_1MHZ << SYCC_CD_SHIFT)); -+ ++ SET_REG(si->osh, &cc->system_clk_ctl, SYCC_CD_MASK, ++ (ILP_DIV_1MHZ << SYCC_CD_SHIFT)); ++ + sb_clkctl_setdelay(si, (void *)cc); + +done: + sb_setcoreidx(sbh, origidx); +} -+void sb_pwrctl_init(sb_t *sbh) -+{ -+sb_clkctl_init(sbh); -+} ++ +/* return the value suitable for writing to the dot11 core FAST_PWRUP_DELAY register */ +uint16 +sb_clkctl_fast_pwrup_delay(sb_t *sbh) @@ -15129,21 +14375,19 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + if ((cc = (chipcregs_t*) sb_setcore(sbh, SB_CC, 0)) == NULL) + goto done; + -+ if (!(R_REG(&cc->capabilities) & CAP_PWR_CTL)) ++ if (!(R_REG(si->osh, &cc->capabilities) & CAP_PWR_CTL)) + goto done; + + slowminfreq = sb_slowclk_freq(si, FALSE); -+ fpdelay = (((R_REG(&cc->pll_on_delay) + 2) * 1000000) + (slowminfreq - 1)) / slowminfreq; ++ fpdelay = (((R_REG(si->osh, &cc->pll_on_delay) + 2) * 1000000) + ++ (slowminfreq - 1)) / slowminfreq; + +done: + sb_setcoreidx(sbh, origidx); + INTR_RESTORE(si, intr_val); + return (fpdelay); +} -+uint16 sb_pwrctl_fast_pwrup_delay(sb_t *sbh) -+{ -+return sb_clkctl_fast_pwrup_delay(sbh); -+} ++ +/* turn primary xtal and/or pll off/on */ +int +sb_clkctl_xtal(sb_t *sbh, uint what, bool on) @@ -15166,9 +14410,9 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + if (PCIE(si)) + return -1; + -+ in = OSL_PCI_READ_CONFIG(si->osh, PCI_GPIO_IN, sizeof (uint32)); -+ out = OSL_PCI_READ_CONFIG(si->osh, PCI_GPIO_OUT, sizeof (uint32)); -+ outen = OSL_PCI_READ_CONFIG(si->osh, PCI_GPIO_OUTEN, sizeof (uint32)); ++ in = OSL_PCI_READ_CONFIG(si->osh, PCI_GPIO_IN, sizeof(uint32)); ++ out = OSL_PCI_READ_CONFIG(si->osh, PCI_GPIO_OUT, sizeof(uint32)); ++ outen = OSL_PCI_READ_CONFIG(si->osh, PCI_GPIO_OUTEN, sizeof(uint32)); + + /* + * Avoid glitching the clock if GPRS is already using it. @@ -15189,15 +14433,18 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + out |= PCI_CFG_GPIO_XTAL; + if (what & PLL) + out |= PCI_CFG_GPIO_PLL; -+ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUT, sizeof (uint32), out); -+ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUTEN, sizeof (uint32), outen); ++ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUT, ++ sizeof(uint32), out); ++ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUTEN, ++ sizeof(uint32), outen); + OSL_DELAY(XTAL_ON_DELAY); + } + + /* turn pll on */ + if (what & PLL) { + out &= ~PCI_CFG_GPIO_PLL; -+ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUT, sizeof (uint32), out); ++ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUT, ++ sizeof(uint32), out); + OSL_DELAY(2000); + } + } else { @@ -15205,8 +14452,9 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + out &= ~PCI_CFG_GPIO_XTAL; + if (what & PLL) + out |= PCI_CFG_GPIO_PLL; -+ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUT, sizeof (uint32), out); -+ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUTEN, sizeof (uint32), outen); ++ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUT, sizeof(uint32), out); ++ OSL_PCI_WRITE_CONFIG(si->osh, PCI_GPIO_OUTEN, sizeof(uint32), ++ outen); + } + + default: @@ -15216,13 +14464,8 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return (0); +} + -+int sb_pwrctl_xtal(sb_t *sbh, uint what, bool on) -+{ -+return sb_clkctl_xtal(sbh,what,on); -+} -+ +/* set dynamic clk control mode (forceslow, forcefast, dynamic) */ -+/* returns true if ignore pll off is set and false if it is not */ ++/* returns true if we are forcing fast clock */ +bool +sb_clkctl_clk(sb_t *sbh, uint mode) +{ @@ -15230,7 +14473,6 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + uint origidx; + chipcregs_t *cc; + uint32 scc; -+ bool forcefastclk=FALSE; + uint intr_val = 0; + + si = SB_INFO(sbh); @@ -15239,60 +14481,73 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + if (si->sb.ccrev < 6) + return (FALSE); + -+ /* chipcommon cores rev10 are a whole new ball game */ -+ if (si->sb.ccrev >= 10) -+ return (FALSE); ++ ++ /* Chips with ccrev 10 are EOL and they don't have SYCC_HR which we use below */ ++ ASSERT(si->sb.ccrev != 10); + + INTR_OFF(si, intr_val); + + origidx = si->curidx; + ++ if (sb_setcore(sbh, SB_MIPS33, 0) && (sb_corerev(&si->sb) <= 7) && ++ (BUSTYPE(si->sb.bustype) == SB_BUS) && (si->sb.ccrev >= 10)) ++ goto done; ++ ++ /* PR32414WAR "Force HT clock on" all the time, no dynamic clk ctl */ ++ if ((si->sb.chip == BCM4311_CHIP_ID) && (si->sb.chiprev <= 1)) ++ goto done; ++ + cc = (chipcregs_t*) sb_setcore(sbh, SB_CC, 0); + ASSERT(cc != NULL); + -+ if (!(R_REG(&cc->capabilities) & CAP_PWR_CTL)) ++ if (!(R_REG(si->osh, &cc->capabilities) & CAP_PWR_CTL)) + goto done; + + switch (mode) { + case CLK_FAST: /* force fast (pll) clock */ -+ /* don't forget to force xtal back on before we clear SCC_DYN_XTAL.. */ -+ sb_clkctl_xtal(&si->sb, XTAL, ON); ++ if (si->sb.ccrev < 10) { ++ /* don't forget to force xtal back on before we clear SCC_DYN_XTAL.. */ ++ sb_clkctl_xtal(&si->sb, XTAL, ON); + -+ SET_REG(&cc->slow_clk_ctl, (SCC_XC | SCC_FS | SCC_IP), SCC_IP); ++ SET_REG(si->osh, &cc->slow_clk_ctl, (SCC_XC | SCC_FS | SCC_IP), SCC_IP); ++ } else ++ OR_REG(si->osh, &cc->system_clk_ctl, SYCC_HR); ++ /* wait for the PLL */ ++ OSL_DELAY(PLL_DELAY); + break; + + case CLK_DYNAMIC: /* enable dynamic clock control */ -+ scc = R_REG(&cc->slow_clk_ctl); -+ scc &= ~(SCC_FS | SCC_IP | SCC_XC); -+ if ((scc & SCC_SS_MASK) != SCC_SS_XTAL) -+ scc |= SCC_XC; -+ W_REG(&cc->slow_clk_ctl, scc); + -+ /* for dynamic control, we have to release our xtal_pu "force on" */ -+ if (scc & SCC_XC) -+ sb_clkctl_xtal(&si->sb, XTAL, OFF); ++ if (si->sb.ccrev < 10) { ++ scc = R_REG(si->osh, &cc->slow_clk_ctl); ++ scc &= ~(SCC_FS | SCC_IP | SCC_XC); ++ if ((scc & SCC_SS_MASK) != SCC_SS_XTAL) ++ scc |= SCC_XC; ++ W_REG(si->osh, &cc->slow_clk_ctl, scc); ++ ++ /* for dynamic control, we have to release our xtal_pu "force on" */ ++ if (scc & SCC_XC) ++ sb_clkctl_xtal(&si->sb, XTAL, OFF); ++ } else { ++ /* Instaclock */ ++ AND_REG(si->osh, &cc->system_clk_ctl, ~SYCC_HR); ++ } + break; + + default: + ASSERT(0); + } + -+ /* Is the h/w forcing the use of the fast clk */ -+ forcefastclk = (bool)((R_REG(&cc->slow_clk_ctl) & SCC_IP) == SCC_IP); -+ +done: + sb_setcoreidx(sbh, origidx); + INTR_RESTORE(si, intr_val); -+ return (forcefastclk); ++ return (mode == CLK_FAST); +} + -+bool sb_pwrctl_clk(sb_t *sbh, uint mode) -+{ -+return sb_clkctl_clk(sbh, mode); -+} +/* register driver interrupt disabling and restoring callback functions */ +void -+sb_register_intr_callback(sb_t *sbh, void *intrsoff_fn, void *intrsrestore_fn, void *intrsenabled_fn, void *intr_arg) ++sb_register_intr_callback(sb_t *sbh, void *intrsoff_fn, void *intrsrestore_fn, ++ void *intrsenabled_fn, void *intr_arg) +{ + sb_info_t *si; + @@ -15308,29 +14563,41 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils +} + + -+void -+sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice, -+ uint8 *pciclass, uint8 *pcisubclass, uint8 *pciprogif) ++int ++sb_corepciid(sb_t *sbh, uint func, uint16 *pcivendor, uint16 *pcidevice, ++ uint8 *pciclass, uint8 *pcisubclass, uint8 *pciprogif, ++ uint8 *pciheader) +{ -+ uint vendor, core, unit; ++ uint16 vendor = 0xffff, device = 0xffff; ++ uint core, unit; + uint chip, chippkg; -+ char varname[8]; ++ uint nfunc; ++ char varname[SB_DEVPATH_BUFSZ + 8]; + uint8 class, subclass, progif; -+ -+ vendor = sb_corevendor(sbh); ++ char devpath[SB_DEVPATH_BUFSZ]; ++ uint8 header; ++ + core = sb_coreid(sbh); + unit = sb_coreunit(sbh); + -+ chip = BCMINIT(sb_chip)(sbh); -+ chippkg = BCMINIT(sb_chippkg)(sbh); ++ chip = sb_chip(sbh); ++ chippkg = sb_chippkg(sbh); + + progif = 0; -+ ++ header = PCI_HEADER_NORMAL; ++ ++ /* Verify whether the function exists for the core */ ++ nfunc = (core == SB_USB20H) ? 2 : 1; ++ if (func >= nfunc) ++ return BCME_ERROR; ++ + /* Known vendor translations */ -+ switch (vendor) { ++ switch (sb_corevendor(sbh)) { + case SB_VEND_BCM: + vendor = VENDOR_BROADCOM; + break; ++ default: ++ return BCME_ERROR; + } + + /* Determine class based on known core codes */ @@ -15338,97 +14605,144 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + case SB_ILINE20: + class = PCI_CLASS_NET; + subclass = PCI_NET_ETHER; -+ core = BCM47XX_ILINE_ID; ++ device = BCM47XX_ILINE_ID; + break; + case SB_ENET: + class = PCI_CLASS_NET; + subclass = PCI_NET_ETHER; -+ core = BCM47XX_ENET_ID; ++ device = BCM47XX_ENET_ID; ++ break; ++ case SB_GIGETH: ++ class = PCI_CLASS_NET; ++ subclass = PCI_NET_ETHER; ++ device = BCM47XX_GIGETH_ID; + break; + case SB_SDRAM: + case SB_MEMC: + class = PCI_CLASS_MEMORY; + subclass = PCI_MEMORY_RAM; ++ device = (uint16)core; + break; + case SB_PCI: + case SB_PCIE: + class = PCI_CLASS_BRIDGE; + subclass = PCI_BRIDGE_PCI; ++ device = (uint16)core; ++ header = PCI_HEADER_BRIDGE; + break; + case SB_MIPS: + case SB_MIPS33: + class = PCI_CLASS_CPU; + subclass = PCI_CPU_MIPS; ++ device = (uint16)core; + break; + case SB_CODEC: + class = PCI_CLASS_COMM; + subclass = PCI_COMM_MODEM; -+ core = BCM47XX_V90_ID; ++ device = BCM47XX_V90_ID; + break; + case SB_USB: + class = PCI_CLASS_SERIAL; + subclass = PCI_SERIAL_USB; + progif = 0x10; /* OHCI */ -+ core = BCM47XX_USB_ID; ++ device = BCM47XX_USB_ID; + break; + case SB_USB11H: + class = PCI_CLASS_SERIAL; + subclass = PCI_SERIAL_USB; + progif = 0x10; /* OHCI */ -+ core = BCM47XX_USBH_ID; ++ device = BCM47XX_USBH_ID; ++ break; ++ case SB_USB20H: ++ class = PCI_CLASS_SERIAL; ++ subclass = PCI_SERIAL_USB; ++ progif = func == 0 ? 0x10 : 0x20; /* OHCI/EHCI */ ++ device = BCM47XX_USB20H_ID; ++ header = 0x80; /* multifunction */ + break; + case SB_USB11D: + class = PCI_CLASS_SERIAL; + subclass = PCI_SERIAL_USB; -+ core = BCM47XX_USBD_ID; ++ device = BCM47XX_USBD_ID; ++ break; ++ case SB_USB20D: ++ class = PCI_CLASS_SERIAL; ++ subclass = PCI_SERIAL_USB; ++ device = BCM47XX_USB20D_ID; + break; + case SB_IPSEC: + class = PCI_CLASS_CRYPT; + subclass = PCI_CRYPT_NETWORK; -+ core = BCM47XX_IPSEC_ID; ++ device = BCM47XX_IPSEC_ID; + break; + case SB_ROBO: + class = PCI_CLASS_NET; + subclass = PCI_NET_OTHER; -+ core = BCM47XX_ROBO_ID; ++ device = BCM47XX_ROBO_ID; + break; + case SB_EXTIF: + case SB_CC: + class = PCI_CLASS_MEMORY; + subclass = PCI_MEMORY_FLASH; ++ device = (uint16)core; + break; + case SB_D11: + class = PCI_CLASS_NET; + subclass = PCI_NET_OTHER; -+ /* Let an nvram variable override this */ ++ /* Let nvram variable override core ID */ ++ sb_devpath(sbh, devpath, sizeof(devpath)); ++ sprintf(varname, "%sdevid", devpath); ++ if ((device = (uint16)getintvar(NULL, varname))) ++ break; ++ /* ++ * no longer support wl%did, but keep the code ++ * here for backward compatibility. ++ */ + sprintf(varname, "wl%did", unit); -+ if ((core = getintvar(NULL, varname)) == 0) { -+ if (chip == BCM4712_DEVICE_ID) { -+ if (chippkg == BCM4712SMALL_PKG_ID) -+ core = BCM4306_D11G_ID; -+ else -+ core = BCM4306_D11DUAL_ID; -+ } ++ if ((device = (uint16)getintvar(NULL, varname))) ++ break; ++ /* Chip specific conversion */ ++ if (chip == BCM4712_CHIP_ID) { ++ if (chippkg == BCM4712SMALL_PKG_ID) ++ device = BCM4306_D11G_ID; ++ else ++ device = BCM4306_D11DUAL_ID; ++ break; + } ++ /* ignore it */ ++ device = 0xffff; ++ break; ++ case SB_SATAXOR: ++ class = PCI_CLASS_XOR; ++ subclass = PCI_XOR_QDMA; ++ device = BCM47XX_SATAXOR_ID; ++ break; ++ case SB_ATA100: ++ class = PCI_CLASS_DASDI; ++ subclass = PCI_DASDI_IDE; ++ device = BCM47XX_ATA100_ID; + break; + + default: + class = subclass = progif = 0xff; ++ device = (uint16)core; + break; + } + -+ *pcivendor = (uint16)vendor; -+ *pcidevice = (uint16)core; ++ *pcivendor = vendor; ++ *pcidevice = device; + *pciclass = class; + *pcisubclass = subclass; + *pciprogif = progif; ++ *pciheader = header; ++ ++ return 0; +} + + + -+ +/* use the mdio interface to write to mdio slaves */ -+static int ++static int +sb_pcie_mdiowrite(sb_info_t *si, uint physmedia, uint regaddr, uint val) +{ + uint mdiodata; @@ -15436,24 +14750,24 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + sbpcieregs_t *pcieregs; + + pcieregs = (sbpcieregs_t*) sb_setcoreidx(&si->sb, si->sb.buscoreidx); -+ ASSERT (pcieregs); ++ ASSERT(pcieregs); + -+ /* enable mdio access to SERDES */ -+ W_REG((&pcieregs->mdiocontrol), MDIOCTL_PREAM_EN | MDIOCTL_DIVISOR_VAL); ++ /* enable mdio access to SERDES */ ++ W_REG(si->osh, (&pcieregs->mdiocontrol), MDIOCTL_PREAM_EN | MDIOCTL_DIVISOR_VAL); + -+ mdiodata = MDIODATA_START | MDIODATA_WRITE | ++ mdiodata = MDIODATA_START | MDIODATA_WRITE | + (physmedia << MDIODATA_DEVADDR_SHF) | + (regaddr << MDIODATA_REGADDR_SHF) | MDIODATA_TA | val; + -+ W_REG((&pcieregs->mdiodata), mdiodata); ++ W_REG(si->osh, (&pcieregs->mdiodata), mdiodata); + + PR28829_DELAY(); + + /* retry till the transaction is complete */ -+ while ( i < 10 ) { -+ if (R_REG(&(pcieregs->mdiocontrol)) & MDIOCTL_ACCESS_DONE) { -+ /* Disable mdio access to SERDES */ -+ W_REG((&pcieregs->mdiocontrol), 0); ++ while (i < 10) { ++ if (R_REG(si->osh, &(pcieregs->mdiocontrol)) & MDIOCTL_ACCESS_DONE) { ++ /* Disable mdio access to SERDES */ ++ W_REG(si->osh, (&pcieregs->mdiocontrol), 0); + return 0; + } + OSL_DELAY(1000); @@ -15461,87 +14775,86 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + } + + SB_ERROR(("sb_pcie_mdiowrite: timed out\n")); -+ /* Disable mdio access to SERDES */ -+ W_REG((&pcieregs->mdiocontrol), 0); ++ /* Disable mdio access to SERDES */ ++ W_REG(si->osh, (&pcieregs->mdiocontrol), 0); + ASSERT(0); -+ return 1; ++ return 1; + +} + -+/* indirect way to read pcie config regs*/ -+uint ++/* indirect way to read pcie config regs */ ++uint +sb_pcie_readreg(void *sb, void* arg1, uint offset) +{ + sb_info_t *si; + sb_t *sbh; + uint retval = 0xFFFFFFFF; -+ sbpcieregs_t *pcieregs; ++ sbpcieregs_t *pcieregs; + uint addrtype; + + sbh = (sb_t *)sb; + si = SB_INFO(sbh); -+ ASSERT (PCIE(si)); ++ ASSERT(PCIE(si)); + + pcieregs = (sbpcieregs_t *)sb_setcore(sbh, SB_PCIE, 0); -+ ASSERT (pcieregs); ++ ASSERT(pcieregs); + + addrtype = (uint)((uintptr)arg1); -+ switch(addrtype) { ++ switch (addrtype) { + case PCIE_CONFIGREGS: -+ W_REG((&pcieregs->configaddr),offset); -+ retval = R_REG(&(pcieregs->configdata)); ++ W_REG(si->osh, (&pcieregs->configaddr), offset); ++ retval = R_REG(si->osh, &(pcieregs->configdata)); + break; + case PCIE_PCIEREGS: -+ W_REG(&(pcieregs->pcieaddr),offset); -+ retval = R_REG(&(pcieregs->pciedata)); ++ W_REG(si->osh, &(pcieregs->pcieaddr), offset); ++ retval = R_REG(si->osh, &(pcieregs->pciedata)); + break; + default: -+ ASSERT(0); ++ ASSERT(0); + break; + } + return retval; +} + -+/* indirect way to write pcie config/mdio/pciecore regs*/ -+uint ++/* indirect way to write pcie config/mdio/pciecore regs */ ++uint +sb_pcie_writereg(sb_t *sbh, void *arg1, uint offset, uint val) +{ + sb_info_t *si; -+ sbpcieregs_t *pcieregs; ++ sbpcieregs_t *pcieregs; + uint addrtype; + + si = SB_INFO(sbh); -+ ASSERT (PCIE(si)); ++ ASSERT(PCIE(si)); + + pcieregs = (sbpcieregs_t *)sb_setcore(sbh, SB_PCIE, 0); -+ ASSERT (pcieregs); ++ ASSERT(pcieregs); + + addrtype = (uint)((uintptr)arg1); + -+ switch(addrtype) { ++ switch (addrtype) { + case PCIE_CONFIGREGS: -+ W_REG((&pcieregs->configaddr),offset); -+ W_REG((&pcieregs->configdata),val); ++ W_REG(si->osh, (&pcieregs->configaddr), offset); ++ W_REG(si->osh, (&pcieregs->configdata), val); + break; + case PCIE_PCIEREGS: -+ W_REG((&pcieregs->pcieaddr),offset); -+ W_REG((&pcieregs->pciedata),val); ++ W_REG(si->osh, (&pcieregs->pcieaddr), offset); ++ W_REG(si->osh, (&pcieregs->pciedata), val); + break; + default: -+ ASSERT(0); ++ ASSERT(0); + break; + } + return 0; +} + -+ +/* Build device path. Support SB, PCI, and JTAG for now. */ +int +sb_devpath(sb_t *sbh, char *path, int size) +{ + ASSERT(path); + ASSERT(size >= SB_DEVPATH_BUFSZ); -+ ++ + switch (BUSTYPE((SB_INFO(sbh))->sb.bustype)) { + case SB_BUS: + case JTAG_BUS: @@ -15569,7 +14882,10 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return 0; +} + -+/* Fix chip's configuration. The current core may be changed upon return */ ++/* ++ * Fixup SROMless PCI device's configuration. ++ * The current core may be changed upon return. ++ */ +static int +sb_pci_fixcfg(sb_info_t *si) +{ @@ -15582,7 +14898,7 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + + ASSERT(BUSTYPE(si->sb.bustype) == PCI_BUS); + -+ /* Fix PCI(e) SROM shadow area */ ++ /* Fixup PI in SROM shadow area to enable the correct PCI core access */ + /* save the current index */ + origidx = sb_coreidx(&si->sb); + @@ -15591,28 +14907,29 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + pcieregs = (sbpcieregs_t *)sb_setcore(&si->sb, SB_PCIE, 0); + ASSERT(pcieregs); + reg16 = &pcieregs->sprom[SRSH_PI_OFFSET]; -+ } -+ else if (si->sb.buscoretype == SB_PCI) { ++ } else if (si->sb.buscoretype == SB_PCI) { + pciregs = (sbpciregs_t *)sb_setcore(&si->sb, SB_PCI, 0); + ASSERT(pciregs); + reg16 = &pciregs->sprom[SRSH_PI_OFFSET]; -+ } -+ else { ++ } else { + ASSERT(0); + return -1; + } + pciidx = sb_coreidx(&si->sb); -+ val16 = R_REG(reg16); ++ val16 = R_REG(si->osh, reg16); + if (((val16 & SRSH_PI_MASK) >> SRSH_PI_SHIFT) != (uint16)pciidx) { + val16 = (uint16)(pciidx << SRSH_PI_SHIFT) | (val16 & ~SRSH_PI_MASK); -+ W_REG(reg16, val16); ++ W_REG(si->osh, reg16, val16); + } + + /* restore the original index */ + sb_setcoreidx(&si->sb, origidx); -+ -+ /* Fix bar0window */ -+ /* !do it last, it changes the current core! */ ++ ++ /* ++ * Fixup bar0window in PCI config space to make the core indicated ++ * by the nvram variable the current core. ++ * !Do it last, it may change the current core! ++ */ + if (sb_devpath(&si->sb, devpath, sizeof(devpath))) + return -1; + sprintf(name, "%sb0w", devpath); @@ -15630,322 +14947,165 @@ diff -Naur linux.old/drivers/net/hnd/sbutils.c linux.dev/drivers/net/hnd/sbutils + return 0; +} + -diff -Naur linux.old/drivers/net/hnd/shared_ksyms.sh linux.dev/drivers/net/hnd/shared_ksyms.sh ---- linux.old/drivers/net/hnd/shared_ksyms.sh 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/hnd/shared_ksyms.sh 2006-04-06 15:34:15.000000000 +0200 -@@ -0,0 +1,21 @@ -+#!/bin/sh -+# -+# Copyright 2004, Broadcom Corporation -+# All Rights Reserved. -+# -+# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+# -+# $Id: shared_ksyms.sh,v 1.1 2005/03/16 13:50:00 wbx Exp $ -+# ++static uint ++sb_chipc_capability(sb_t *sbh) ++{ ++ sb_info_t *si; + -+cat <<EOF -+#include <linux/config.h> -+#include <linux/module.h> -+EOF ++ si = SB_INFO(sbh); + -+for file in $* ; do -+ ${NM} $file | sed -ne 's/[0-9A-Fa-f]* [DT] \([^ ]*\)/extern void \1; EXPORT_SYMBOL(\1);/p' -+done -diff -Naur linux.old/drivers/net/wireless/Config.in linux.dev/drivers/net/wireless/Config.in ---- linux.old/drivers/net/wireless/Config.in 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/drivers/net/wireless/Config.in 2006-04-06 17:04:48.000000000 +0200 -@@ -13,6 +13,8 @@ - fi - - if [ "$CONFIG_PCI" = "y" ]; then -+ dep_tristate ' Proprietary Broadcom BCM43xx 802.11 Wireless support (old)' CONFIG_WL -+ dep_tristate ' Proprietary Broadcom BCM43xx 802.11 Wireless support (new)' CONFIG_WL2 - dep_tristate ' Hermes in PLX9052 based PCI adaptor support (Netgear MA301 etc.) (EXPERIMENTAL)' CONFIG_PLX_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL - dep_tristate ' Hermes in TMD7160/NCP130 based PCI adaptor support (Pheecom WL-PCI etc.) (EXPERIMENTAL)' CONFIG_TMD_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL - dep_tristate ' Prism 2.5 PCI 802.11b adaptor support (EXPERIMENTAL)' CONFIG_PCI_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL -diff -Naur linux.old/drivers/net/wl/Makefile linux.dev/drivers/net/wl/Makefile ---- linux.old/drivers/net/wl/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/Makefile 2006-04-06 16:56:38.000000000 +0200 -@@ -0,0 +1,27 @@ -+# -+# Makefile for the Broadcom wl driver -+# -+# Copyright 2004, Broadcom Corporation -+# All Rights Reserved. -+# -+# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+# -+# $Id: Makefile,v 1.2 2005/03/29 03:32:18 mbm Exp $ ++ /* Make sure that there is ChipCommon core present */ ++ if (si->coreid[SB_CC_IDX] == SB_CC) ++ return (sb_corereg(si, SB_CC_IDX, OFFSETOF(chipcregs_t, capabilities), ++ 0, 0)); ++ return 0; ++} + -+EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER ++/* Return ADDR64 capability of the backplane */ ++bool ++sb_backplane64(sb_t *sbh) ++{ ++ return ((sb_chipc_capability(sbh) & CAP_BKPLN64) != 0); ++} + -+O_TARGET := wl.o ++void ++sb_btcgpiowar(sb_t *sbh) ++{ ++ sb_info_t *si; ++ uint origidx; ++ uint intr_val = 0; ++ chipcregs_t *cc; ++ si = SB_INFO(sbh); + -+obj-y := apsta_aeskeywrap.o apsta_aes.o apsta_bcmwpa.o apsta_d11ucode.o -+obj-y += apsta_hmac.o apsta_md5.o apsta_passhash.o apsta_prf.o apsta_rc4.o -+obj-y += apsta_rijndael-alg-fst.o apsta_sha1.o apsta_tkhash.o apsta_wlc_led.o -+obj-y += apsta_wlc_phy.o apsta_wlc_rate.o apsta_wlc_security.o -+obj-y += apsta_wlc_sup.o apsta_wlc_wet.o apsta_wl_linux.o apsta_wlc.o -+obj-y += compat.o hnddma.o ++ /* Make sure that there is ChipCommon core present && ++ * UART_TX is strapped to 1 ++ */ ++ if (!(sb_chipc_capability(sbh) & CAP_UARTGPIO)) ++ return; + -+obj-m := $(O_TARGET) ++ /* sb_corereg cannot be used as we have to guarantee 8-bit read/writes */ ++ INTR_OFF(si, intr_val); + -+include $(TOPDIR)/Rules.make -diff -Naur linux.old/drivers/net/wl/compat.c linux.dev/drivers/net/wl/compat.c ---- linux.old/drivers/net/wl/compat.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/compat.c 2006-04-06 17:12:19.000000000 +0200 -@@ -0,0 +1,237 @@ ++ origidx = sb_coreidx(sbh); ++ ++ cc = (chipcregs_t *)sb_setcore(sbh, SB_CC, 0); ++ if (cc == NULL) ++ goto end; ++ ++ W_REG(si->osh, &cc->uart0mcr, R_REG(si->osh, &cc->uart0mcr) | 0x04); ++ ++end: ++ /* restore the original index */ ++ sb_setcoreidx(sbh, origidx); ++ ++ INTR_RESTORE(si, intr_val); ++} ++ ++/* check if the device is removed */ ++bool ++sb_deviceremoved(sb_t *sbh) ++{ ++ uint32 w; ++ sb_info_t *si; ++ ++ si = SB_INFO(sbh); ++ ++ switch (BUSTYPE(si->sb.bustype)) { ++ case PCI_BUS: ++ ASSERT(si->osh); ++ w = OSL_PCI_READ_CONFIG(si->osh, PCI_CFG_VID, sizeof(uint32)); ++ if ((w & 0xFFFF) != VENDOR_BROADCOM) ++ return TRUE; ++ else ++ return FALSE; ++ default: ++ return FALSE; ++ } ++ return FALSE; ++} ++ ++/* Return the RAM size of the SOCRAM core */ ++uint32 ++sb_socram_size(sb_t *sbh) ++{ ++ sb_info_t *si; ++ uint origidx; ++ uint intr_val = 0; ++ ++ sbsocramregs_t *regs; ++ bool wasup; ++ uint corerev; ++ uint32 coreinfo; ++ uint memsize = 0; ++ ++ si = SB_INFO(sbh); ++ ASSERT(si); ++ ++ /* Block ints and save current core */ ++ INTR_OFF(si, intr_val); ++ origidx = sb_coreidx(sbh); ++ ++ /* Switch to SOCRAM core */ ++ if (!(regs = sb_setcore(sbh, SB_SOCRAM, 0))) ++ goto done; ++ ++ /* Get info for determining size */ ++ if (!(wasup = sb_iscoreup(sbh))) ++ sb_core_reset(sbh, 0, 0); ++ corerev = sb_corerev(sbh); ++ coreinfo = R_REG(si->osh, ®s->coreinfo); ++ ++ /* Calculate size from coreinfo based on rev */ ++ switch (corerev) { ++ case 0: ++ memsize = 1 << (16 + (coreinfo & SRCI_MS0_MASK)); ++ break; ++ default: /* rev >= 1 */ ++ memsize = 1 << (SR_BSZ_BASE + (coreinfo & SRCI_SRBSZ_MASK)); ++ memsize *= (coreinfo & SRCI_SRNB_MASK) >> SRCI_SRNB_SHIFT; ++ break; ++ } ++ ++ /* Return to previous state and core */ ++ if (!wasup) ++ sb_core_disable(sbh, 0); ++ sb_setcoreidx(sbh, origidx); ++ ++done: ++ INTR_RESTORE(si, intr_val); ++ return memsize; ++} ++ ++ +diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setup.c +--- linux.old/arch/mips/bcm947xx/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/setup.c 2006-04-27 23:22:53.000000000 +0200 +@@ -0,0 +1,241 @@ +/* -+ * Misc useful OS-independent routines. ++ * Generic setup routines for Broadcom MIPS boards ++ * ++ * Copyright (C) 2005 Felix Fietkau <nbd@openwrt.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 the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ -+ */ -+ -+#include <typedefs.h> -+#ifdef BCMDRIVER -+#include <osl.h> -+#include <sbutils.h> -+#include <bcmnvram.h> -+#else -+#include <stdio.h> -+#include <string.h> -+#endif -+#include "pktq.h" -+#include <bcmutils.h> -+#include <bcmendian.h> -+#include <bcmdevs.h> -+ -+#ifdef BCMDRIVER -+/* copy a pkt buffer chain into a buffer */ -+uint -+pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf) -+{ -+ uint n, ret = 0; -+ -+ if (len < 0) -+ len = 4096; /* "infinite" */ -+ -+ /* skip 'offset' bytes */ -+ for (; p && offset; p = PKTNEXT(osh, p)) { -+ if (offset < (uint)PKTLEN(osh, p)) -+ break; -+ offset -= PKTLEN(osh, p); -+ } -+ -+ if (!p) -+ return 0; -+ -+ /* copy the data */ -+ for (; p && len; p = PKTNEXT(osh, p)) { -+ n = MIN((uint)PKTLEN(osh, p) - offset, (uint)len); -+ bcopy(PKTDATA(osh, p) + offset, buf, n); -+ buf += n; -+ len -= n; -+ ret += n; -+ offset = 0; -+ } -+ -+ return ret; -+} -+ -+/* return total length of buffer chain */ -+uint -+pkttotlen(osl_t *osh, void *p) -+{ -+ uint total; -+ -+ total = 0; -+ for (; p; p = PKTNEXT(osh, p)) -+ total += PKTLEN(osh, p); -+ return (total); -+} -+ -+void -+pktq_init(struct pktq *q, uint maxlen, const uint8 prio_map[]) -+{ -+ q->head = q->tail = NULL; -+ q->maxlen = maxlen; -+ q->len = 0; -+ if (prio_map) { -+ q->priority = TRUE; -+ bcopy(prio_map, q->prio_map, sizeof(q->prio_map)); -+ } -+ else -+ q->priority = FALSE; -+} -+ -+ -+/* should always check pktq_full before calling pktenq */ -+void -+pktenq(struct pktq *q, void *p, bool lifo) -+{ -+ void *next, *prev; -+ -+ /* allow 10 pkts slack */ -+ ASSERT(q->len < (q->maxlen + 10)); -+ -+ /* Queueing chains not allowed */ -+ ASSERT(PKTLINK(p) == NULL); -+ -+ /* Queue is empty */ -+ if (q->tail == NULL) { -+ ASSERT(q->head == NULL); -+ q->head = q->tail = p; -+ } -+ -+ /* Insert at head or tail */ -+ else if (q->priority == FALSE) { -+ /* Insert at head (LIFO) */ -+ if (lifo) { -+ PKTSETLINK(p, q->head); -+ q->head = p; -+ } -+ /* Insert at tail (FIFO) */ -+ else { -+ ASSERT(PKTLINK(q->tail) == NULL); -+ PKTSETLINK(q->tail, p); -+ PKTSETLINK(p, NULL); -+ q->tail = p; -+ } -+ } -+ -+ /* Insert by priority */ -+ else { -+ /* legal priorities 0-7 */ -+ ASSERT(PKTPRIO(p) <= MAXPRIO); -+ -+ ASSERT(q->head); -+ ASSERT(q->tail); -+ /* Shortcut to insertion at tail */ -+ if (_pktq_pri(q, PKTPRIO(p)) < _pktq_pri(q, PKTPRIO(q->tail)) || -+ (!lifo && _pktq_pri(q, PKTPRIO(p)) <= _pktq_pri(q, PKTPRIO(q->tail)))) { -+ prev = q->tail; -+ next = NULL; -+ } -+ /* Insert at head or in the middle */ -+ else { -+ prev = NULL; -+ next = q->head; -+ } -+ /* Walk the queue */ -+ for (; next; prev = next, next = PKTLINK(next)) { -+ /* Priority queue invariant */ -+ ASSERT(!prev || _pktq_pri(q, PKTPRIO(prev)) >= _pktq_pri(q, PKTPRIO(next))); -+ /* Insert at head of string of packets of same priority (LIFO) */ -+ if (lifo) { -+ if (_pktq_pri(q, PKTPRIO(p)) >= _pktq_pri(q, PKTPRIO(next))) -+ break; -+ } -+ /* Insert at tail of string of packets of same priority (FIFO) */ -+ else { -+ if (_pktq_pri(q, PKTPRIO(p)) > _pktq_pri(q, PKTPRIO(next))) -+ break; -+ } -+ } -+ /* Insert at tail */ -+ if (next == NULL) { -+ ASSERT(PKTLINK(q->tail) == NULL); -+ PKTSETLINK(q->tail, p); -+ PKTSETLINK(p, NULL); -+ q->tail = p; -+ } -+ /* Insert in the middle */ -+ else if (prev) { -+ PKTSETLINK(prev, p); -+ PKTSETLINK(p, next); -+ } -+ /* Insert at head */ -+ else { -+ PKTSETLINK(p, q->head); -+ q->head = p; -+ } -+ } -+ -+ /* List invariants after insertion */ -+ ASSERT(q->head); -+ ASSERT(PKTLINK(q->tail) == NULL); -+ -+ q->len++; -+} -+ -+/* dequeue packet at head */ -+void* -+pktdeq(struct pktq *q) -+{ -+ void *p; -+ -+ if ((p = q->head)) { -+ ASSERT(q->tail); -+ q->head = PKTLINK(p); -+ PKTSETLINK(p, NULL); -+ q->len--; -+ if (q->head == NULL) -+ q->tail = NULL; -+ } -+ else { -+ ASSERT(q->tail == NULL); -+ } -+ -+ return (p); -+} -+ -+/* dequeue packet at tail */ -+void* -+pktdeqtail(struct pktq *q) -+{ -+ void *p; -+ void *next, *prev; -+ -+ if (q->head == q->tail) { /* last packet on queue or queue empty */ -+ p = q->head; -+ q->head = q->tail = NULL; -+ q->len = 0; -+ return(p); -+ } -+ -+ /* start walk at head */ -+ prev = NULL; -+ next = q->head; -+ -+ /* Walk the queue to find prev of q->tail */ -+ for (; next; prev = next, next = PKTLINK(next)) { -+ if (next == q->tail) -+ break; -+ } -+ -+ ASSERT(prev); -+ -+ PKTSETLINK(prev, NULL); -+ q->tail = prev; -+ q->len--; -+ p = next; -+ -+ return (p); -+} -+#endif -+ -+ -diff -Naur linux.old/drivers/net/wl/hnddma.c linux.dev/drivers/net/wl/hnddma.c ---- linux.old/drivers/net/wl/hnddma.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/hnddma.c 2006-04-06 16:58:24.000000000 +0200 -@@ -0,0 +1,1453 @@ -+/* -+ * Generic Broadcom Home Networking Division (HND) DMA module. -+ * This supports the following chips: BCM42xx, 44xx, 47xx . + * + * Copyright 2005, Broadcom Corporation + * All Rights Reserved. @@ -15955,1892 +15115,1276 @@ diff -Naur linux.old/drivers/net/wl/hnddma.c linux.dev/drivers/net/wl/hnddma.c + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ + */ + ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/serialP.h> ++#include <linux/ide.h> ++#include <asm/bootinfo.h> ++#include <asm/cpu.h> ++#include <asm/time.h> ++#include <asm/reboot.h> ++ +#include <typedefs.h> +#include <osl.h> -+#include <bcmendian.h> ++#include <sbutils.h> ++#include <bcmutils.h> ++#include <bcmnvram.h> ++#include <sbhndmips.h> ++#include <hndmips.h> ++#include <trxhdr.h> ++ ++/* Virtual IRQ base, after last hw IRQ */ ++#define SBMIPS_VIRTIRQ_BASE 6 ++ ++/* # IRQs, hw and sw IRQs */ ++#define SBMIPS_NUMIRQS 8 ++ ++/* Global SB handle */ ++sb_t *bcm947xx_sbh = NULL; ++spinlock_t bcm947xx_sbh_lock = SPIN_LOCK_UNLOCKED; ++ ++/* Convenience */ ++#define sbh bcm947xx_sbh ++#define sbh_lock bcm947xx_sbh_lock ++ ++extern void bcm947xx_time_init(void); ++extern void bcm947xx_timer_setup(struct irqaction *irq); ++ ++#ifdef CONFIG_REMOTE_DEBUG ++extern void set_debug_traps(void); ++extern void rs_kgdb_hook(struct serial_state *); ++extern void breakpoint(void); ++#endif ++ ++#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ++extern struct ide_ops std_ide_ops; ++#endif ++ ++/* Kernel command line */ ++char arcs_cmdline[CL_SIZE] __initdata = CONFIG_CMDLINE; ++extern void sb_serial_init(sb_t *sbh, void (*add)(void *regs, uint irq, uint baud_base, uint reg_shift)); ++ ++void ++bcm947xx_machine_restart(char *command) ++{ ++ printk("Please stand by while rebooting the system...\n"); ++ ++ /* Set the watchdog timer to reset immediately */ ++ __cli(); ++ sb_watchdog(sbh, 1); ++ while (1); ++} ++ ++void ++bcm947xx_machine_halt(void) ++{ ++ printk("System halted\n"); ++ ++ /* Disable interrupts and watchdog and spin forever */ ++ __cli(); ++ sb_watchdog(sbh, 0); ++ while (1); ++} ++ ++#ifdef CONFIG_SERIAL ++ ++static int ser_line = 0; ++ ++typedef struct { ++ void *regs; ++ uint irq; ++ uint baud_base; ++ uint reg_shift; ++} serial_port; ++ ++static serial_port ports[4]; ++static int num_ports = 0; ++ ++static void ++serial_add(void *regs, uint irq, uint baud_base, uint reg_shift) ++{ ++ ports[num_ports].regs = regs; ++ ports[num_ports].irq = irq; ++ ports[num_ports].baud_base = baud_base; ++ ports[num_ports].reg_shift = reg_shift; ++ num_ports++; ++} ++ ++static void ++do_serial_add(serial_port *port) ++{ ++ void *regs; ++ uint irq; ++ uint baud_base; ++ uint reg_shift; ++ struct serial_struct s; ++ ++ regs = port->regs; ++ irq = port->irq; ++ baud_base = port->baud_base; ++ reg_shift = port->reg_shift; ++ ++ memset(&s, 0, sizeof(s)); ++ ++ s.line = ser_line++; ++ s.iomem_base = regs; ++ s.irq = irq + 2; ++ s.baud_base = baud_base / 16; ++ s.flags = ASYNC_BOOT_AUTOCONF; ++ s.io_type = SERIAL_IO_MEM; ++ s.iomem_reg_shift = reg_shift; ++ ++ if (early_serial_setup(&s) != 0) { ++ printk(KERN_ERR "Serial setup failed!\n"); ++ } ++} ++ ++#endif /* CONFIG_SERIAL */ ++ ++void __init ++brcm_setup(void) ++{ ++ char *s; ++ int i; ++ char *value; ++ ++ /* Get global SB handle */ ++ sbh = sb_kattach(); ++ ++ /* Initialize clocks and interrupts */ ++ sb_mips_init(sbh, SBMIPS_VIRTIRQ_BASE); ++ ++ if (BCM330X(current_cpu_data.processor_id) && ++ (read_c0_diag() & BRCM_PFC_AVAIL)) { ++ /* ++ * Now that the sbh is inited set the proper PFC value ++ */ ++ printk("Setting the PFC to its default value\n"); ++ enable_pfc(PFC_AUTO); ++ } ++ ++ ++#ifdef CONFIG_SERIAL ++ sb_serial_init(sbh, serial_add); ++ ++ /* reverse serial ports if nvram variable starts with console=ttyS1 */ ++ /* Initialize UARTs */ ++ s = nvram_get("kernel_args"); ++ if (!s) s = ""; ++ if (!strncmp(s, "console=ttyS1", 13)) { ++ for (i = num_ports; i; i--) ++ do_serial_add(&ports[i - 1]); ++ } else { ++ for (i = 0; i < num_ports; i++) ++ do_serial_add(&ports[i]); ++ } ++#endif ++ ++#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ++ ide_ops = &std_ide_ops; ++#endif ++ ++ /* Override default command line arguments */ ++ value = nvram_get("kernel_cmdline"); ++ if (value && strlen(value) && strncmp(value, "empty", 5)) ++ strncpy(arcs_cmdline, value, sizeof(arcs_cmdline)); ++ ++ ++ /* Generic setup */ ++ _machine_restart = bcm947xx_machine_restart; ++ _machine_halt = bcm947xx_machine_halt; ++ _machine_power_off = bcm947xx_machine_halt; ++ ++ board_time_init = bcm947xx_time_init; ++ board_timer_setup = bcm947xx_timer_setup; ++} ++ ++const char * ++get_system_type(void) ++{ ++ static char s[32]; ++ ++ if (bcm947xx_sbh) { ++ sprintf(s, "Broadcom BCM%X chip rev %d", sb_chip(bcm947xx_sbh), ++ sb_chiprev(bcm947xx_sbh)); ++ return s; ++ } ++ else ++ return "Broadcom BCM947XX"; ++} ++ ++void __init ++bus_error_init(void) ++{ ++} ++ +diff -urN linux.old/arch/mips/bcm947xx/sflash.c linux.dev/arch/mips/bcm947xx/sflash.c +--- linux.old/arch/mips/bcm947xx/sflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/sflash.c 2006-04-27 22:11:27.000000000 +0200 +@@ -0,0 +1,422 @@ ++/* ++ * Broadcom SiliconBackplane chipcommon serial flash interface ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sflash.c,v 1.1.1.13 2006/02/27 03:43:16 honor Exp $ ++ */ ++ ++#include <osl.h> ++#include <typedefs.h> +#include <sbconfig.h> ++#include <sbchipc.h> ++#include <mipsinc.h> +#include <bcmutils.h> +#include <bcmdevs.h> -+#include <sbutils.h> ++#include <sflash.h> + -+struct dma_info; /* forward declaration */ -+#define di_t struct dma_info ++/* Private global state */ ++static struct sflash sflash; + -+#include "sbhnddma.h" -+#include "hnddma.h" -+ -+/* debug/trace */ -+#define DMA_ERROR(args) -+#define DMA_TRACE(args) -+ -+/* default dma message level (if input msg_level pointer is null in dma_attach()) */ -+static uint dma_msg_level = -+ 0; -+ -+#define MAXNAMEL 8 -+ -+/* dma engine software state */ -+typedef struct dma_info { -+ hnddma_t hnddma; /* exported structure */ -+ uint *msg_level; /* message level pointer */ -+ char name[MAXNAMEL]; /* callers name for diag msgs */ -+ -+ void *osh; /* os handle */ -+ sb_t *sbh; /* sb handle */ -+ -+ bool dma64; /* dma64 enabled */ -+ bool addrext; /* this dma engine supports DmaExtendedAddrChanges */ -+ -+ dma32regs_t *d32txregs; /* 32 bits dma tx engine registers */ -+ dma32regs_t *d32rxregs; /* 32 bits dma rx engine registers */ -+ dma64regs_t *d64txregs; /* 64 bits dma tx engine registers */ -+ dma64regs_t *d64rxregs; /* 64 bits dma rx engine registers */ -+ -+ uint32 dma64align; /* either 8k or 4k depends on number of dd */ -+ dma32dd_t *txd32; /* pointer to dma32 tx descriptor ring */ -+ dma64dd_t *txd64; /* pointer to dma64 tx descriptor ring */ -+ uint ntxd; /* # tx descriptors tunable */ -+ uint txin; /* index of next descriptor to reclaim */ -+ uint txout; /* index of next descriptor to post */ -+ uint txavail; /* # free tx descriptors */ -+ void **txp; /* pointer to parallel array of pointers to packets */ -+ ulong txdpa; /* physical address of descriptor ring */ -+ uint txdalign; /* #bytes added to alloc'd mem to align txd */ -+ uint txdalloc; /* #bytes allocated for the ring */ -+ -+ dma32dd_t *rxd32; /* pointer to dma32 rx descriptor ring */ -+ dma64dd_t *rxd64; /* pointer to dma64 rx descriptor ring */ -+ uint nrxd; /* # rx descriptors tunable */ -+ uint rxin; /* index of next descriptor to reclaim */ -+ uint rxout; /* index of next descriptor to post */ -+ void **rxp; /* pointer to parallel array of pointers to packets */ -+ ulong rxdpa; /* physical address of descriptor ring */ -+ uint rxdalign; /* #bytes added to alloc'd mem to align rxd */ -+ uint rxdalloc; /* #bytes allocated for the ring */ -+ -+ /* tunables */ -+ uint rxbufsize; /* rx buffer size in bytes */ -+ uint nrxpost; /* # rx buffers to keep posted */ -+ uint rxoffset; /* rxcontrol offset */ -+ uint ddoffsetlow; /* add to get dma address of descriptor ring, low 32 bits */ -+ uint ddoffsethigh; /* add to get dma address of descriptor ring, high 32 bits */ -+ uint dataoffsetlow; /* add to get dma address of data buffer, low 32 bits */ -+ uint dataoffsethigh; /* add to get dma address of data buffer, high 32 bits */ -+} dma_info_t; -+ -+#ifdef BCMDMA64 -+#define DMA64_ENAB(di) ((di)->dma64) -+#else -+#define DMA64_ENAB(di) (0) -+#endif -+ -+/* descriptor bumping macros */ -+#define XXD(x, n) ((x) & ((n) - 1)) -+#define TXD(x) XXD((x), di->ntxd) -+#define RXD(x) XXD((x), di->nrxd) -+#define NEXTTXD(i) TXD(i + 1) -+#define PREVTXD(i) TXD(i - 1) -+#define NEXTRXD(i) RXD(i + 1) -+#define NTXDACTIVE(h, t) TXD(t - h) -+#define NRXDACTIVE(h, t) RXD(t - h) -+ -+/* macros to convert between byte offsets and indexes */ -+#define B2I(bytes, type) ((bytes) / sizeof(type)) -+#define I2B(index, type) ((index) * sizeof(type)) -+ -+#define PCI32ADDR_HIGH 0xc0000000 /* address[31:30] */ -+#define PCI32ADDR_HIGH_SHIFT 30 -+ -+ -+/* prototypes */ -+static bool dma_isaddrext(dma_info_t *di); -+static bool dma_alloc(dma_info_t *di, uint direction); -+ -+static bool dma32_alloc(dma_info_t *di, uint direction); -+static void dma32_txreset(dma_info_t *di); -+static void dma32_rxreset(dma_info_t *di); -+static bool dma32_txsuspendedidle(dma_info_t *di); -+static int dma32_txfast(dma_info_t *di, void *p0, uint32 coreflags); -+static void* dma32_getnexttxp(dma_info_t *di, bool forceall); -+static void* dma32_getnextrxp(dma_info_t *di, bool forceall); -+static void dma32_txrotate(di_t *di); -+ -+/* prototype or stubs */ -+#ifdef BCMDMA64 -+static bool dma64_alloc(dma_info_t *di, uint direction); -+static void dma64_txreset(dma_info_t *di); -+static void dma64_rxreset(dma_info_t *di); -+static bool dma64_txsuspendedidle(dma_info_t *di); -+static int dma64_txfast(dma_info_t *di, void *p0, uint32 coreflags); -+static void* dma64_getnexttxp(dma_info_t *di, bool forceall); -+static void* dma64_getnextrxp(dma_info_t *di, bool forceall); -+static void dma64_txrotate(di_t *di); -+#else -+static bool dma64_alloc(dma_info_t *di, uint direction) { return TRUE; } -+static void dma64_txreset(dma_info_t *di) {} -+static void dma64_rxreset(dma_info_t *di) {} -+static bool dma64_txsuspendedidle(dma_info_t *di) { return TRUE;} -+static int dma64_txfast(dma_info_t *di, void *p0, uint32 coreflags) { return 0; } -+static void* dma64_getnexttxp(dma_info_t *di, bool forceall) { return NULL; } -+static void* dma64_getnextrxp(dma_info_t *di, bool forceall) { return NULL; } -+static void dma64_txrotate(di_t *di) { return; } -+#endif -+ -+/* old dmaregs struct for compatibility */ -+typedef volatile struct { -+ /* transmit channel */ -+ uint32 xmtcontrol; /* enable, et al */ -+ uint32 xmtaddr; /* descriptor ring base address (4K aligned) */ -+ uint32 xmtptr; /* last descriptor posted to chip */ -+ uint32 xmtstatus; /* current active descriptor, et al */ -+ -+ /* receive channel */ -+ uint32 rcvcontrol; /* enable, et al */ -+ uint32 rcvaddr; /* descriptor ring base address (4K aligned) */ -+ uint32 rcvptr; /* last descriptor posted to chip */ -+ uint32 rcvstatus; /* current active descriptor, et al */ -+} dmaregs_t; -+ -+void* -+dma_attach(void *drv, void *osh, char *name, dmaregs_t *regs, uint ntxd, uint nrxd, -+ uint rxbufsize, uint nrxpost, uint rxoffset, uint ddoffset, uint dataoffset, uint *msg_level) ++/* Issue a serial flash command */ ++static INLINE void ++sflash_cmd(chipcregs_t *cc, uint opcode) +{ -+ dma_info_t *di; -+ uint size; -+ dma32regs_t *dmaregstx = regs; -+ dma32regs_t *dmaregsrx = dmaregstx + 1; -+ -+ /* allocate private info structure */ -+ if ((di = MALLOC(osh, sizeof (dma_info_t))) == NULL) { -+ return (NULL); -+ } -+ bzero((char*)di, sizeof (dma_info_t)); -+ di->msg_level = msg_level ? msg_level : &dma_msg_level; -+ -+ /* check arguments */ -+ ASSERT(ISPOWEROF2(ntxd)); -+ ASSERT(ISPOWEROF2(nrxd)); -+ if (nrxd == 0) -+ ASSERT(dmaregsrx == NULL); -+ if (ntxd == 0) -+ ASSERT(dmaregstx == NULL); -+ -+ ASSERT(ntxd <= D32MAXDD); -+ ASSERT(nrxd <= D32MAXDD); -+ di->d32txregs = (dma32regs_t *)dmaregstx; -+ di->d32rxregs = (dma32regs_t *)dmaregsrx; -+ -+ /* make a private copy of our callers name */ -+ strncpy(di->name, name, MAXNAMEL); -+ di->name[MAXNAMEL-1] = '\0'; -+ -+ di->osh = osh; -+ di->sbh = NULL; -+ -+ /* save tunables */ -+ di->ntxd = ntxd; -+ di->nrxd = nrxd; -+ di->rxbufsize = rxbufsize; -+ di->nrxpost = nrxpost; -+ di->rxoffset = rxoffset; -+ -+ di->ddoffsetlow = ddoffset; -+ di->dataoffsetlow = dataoffset; -+ di->ddoffsethigh = 0; -+ di->dataoffsethigh = 0; -+ -+ di->addrext = 0; -+ -+ DMA_TRACE(("%s: dma_attach: osh %p ntxd %d nrxd %d rxbufsize %d nrxpost %d rxoffset %d ddoffset 0x%x dataoffset 0x%x\n", -+ name, osh, ntxd, nrxd, rxbufsize, nrxpost, rxoffset, di->ddoffsetlow, di->dataoffsetlow)); -+ -+ /* allocate tx packet pointer vector */ -+ if (ntxd) { -+ size = ntxd * sizeof (void*); -+ if ((di->txp = MALLOC(osh, size)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: out of tx memory, malloced %d bytes\n", di->name, MALLOCED(osh))); -+ goto fail; -+ } -+ bzero((char*)di->txp, size); -+ } -+ -+ /* allocate rx packet pointer vector */ -+ if (nrxd) { -+ size = nrxd * sizeof (void*); -+ if ((di->rxp = MALLOC(osh, size)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: out of rx memory, malloced %d bytes\n", di->name, MALLOCED(osh))); -+ goto fail; -+ } -+ bzero((char*)di->rxp, size); -+ } -+ -+ /* allocate transmit descriptor ring, only need ntxd descriptors but it must be aligned */ -+ if (ntxd) { -+ if (!dma_alloc(di, DMA_TX)) -+ goto fail; -+ } -+ -+ /* allocate receive descriptor ring, only need nrxd descriptors but it must be aligned */ -+ if (nrxd) { -+ if (!dma_alloc(di, DMA_RX)) -+ goto fail; -+ } -+ -+ if ((di->ddoffsetlow == SB_PCI_DMA) && (di->txdpa > SB_PCI_DMA_SZ) && !di->addrext) { -+ DMA_ERROR(("%s: dma_attach: txdpa 0x%lx: addrext not supported\n", di->name, di->txdpa)); -+ goto fail; -+ } -+ if ((di->ddoffsetlow == SB_PCI_DMA) && (di->rxdpa > SB_PCI_DMA_SZ) && !di->addrext) { -+ DMA_ERROR(("%s: dma_attach: rxdpa 0x%lx: addrext not supported\n", di->name, di->rxdpa)); -+ goto fail; -+ } -+ -+ return ((void*)di); -+ -+fail: -+ dma_detach((void*)di); -+ return (NULL); ++ W_REG(NULL, &cc->flashcontrol, SFLASH_START | opcode); ++ while (R_REG(NULL, &cc->flashcontrol) & SFLASH_BUSY); +} + -+ -+static bool -+dma_alloc(dma_info_t *di, uint direction) ++/* Initialize serial flash access */ ++struct sflash * ++sflash_init(chipcregs_t *cc) +{ -+ if (DMA64_ENAB(di)) { -+ return dma64_alloc(di, direction); -+ } else { -+ return dma32_alloc(di, direction); -+ } -+} ++ uint32 id, id2; + -+/* may be called with core in reset */ -+void -+dma_detach(dma_info_t *di) -+{ -+ if (di == NULL) -+ return; ++ bzero(&sflash, sizeof(sflash)); + -+ DMA_TRACE(("%s: dma_detach\n", di->name)); ++ sflash.type = R_REG(NULL, &cc->capabilities) & CAP_FLASH_MASK; + -+ /* shouldn't be here if descriptors are unreclaimed */ -+ ASSERT(di->txin == di->txout); -+ ASSERT(di->rxin == di->rxout); -+ -+ /* free dma descriptor rings */ -+ if (di->txd32) -+ DMA_FREE_CONSISTENT(di->osh, ((int8*)di->txd32 - di->txdalign), di->txdalloc, (di->txdpa - di->txdalign)); -+ if (di->rxd32) -+ DMA_FREE_CONSISTENT(di->osh, ((int8*)di->rxd32 - di->rxdalign), di->rxdalloc, (di->rxdpa - di->rxdalign)); -+ -+ /* free packet pointer vectors */ -+ if (di->txp) -+ MFREE(di->osh, (void*)di->txp, (di->ntxd * sizeof (void*))); -+ if (di->rxp) -+ MFREE(di->osh, (void*)di->rxp, (di->nrxd * sizeof (void*))); -+ -+ /* free our private info structure */ -+ MFREE(di->osh, (void*)di, sizeof (dma_info_t)); -+} -+ -+/* return TRUE if this dma engine supports DmaExtendedAddrChanges, otherwise FALSE */ -+static bool -+dma_isaddrext(dma_info_t *di) -+{ -+ uint32 w; -+ -+ if (DMA64_ENAB(di)) { -+ OR_REG(&di->d64txregs->control, D64_XC_AE); -+ w = R_REG(&di->d32txregs->control); -+ AND_REG(&di->d32txregs->control, ~D64_XC_AE); -+ return ((w & XC_AE) == D64_XC_AE); -+ } else { -+ OR_REG(&di->d32txregs->control, XC_AE); -+ w = R_REG(&di->d32txregs->control); -+ AND_REG(&di->d32txregs->control, ~XC_AE); -+ return ((w & XC_AE) == XC_AE); -+ } -+} -+ -+void -+dma_txreset(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txreset\n", di->name)); -+ -+ if (DMA64_ENAB(di)) -+ dma64_txreset(di); -+ else -+ dma32_txreset(di); -+} -+ -+void -+dma_rxreset(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_rxreset\n", di->name)); -+ -+ if (DMA64_ENAB(di)) -+ dma64_rxreset(di); -+ else -+ dma32_rxreset(di); -+} -+ -+/* initialize descriptor table base address */ -+static void -+dma_ddtable_init(dma_info_t *di, uint direction, ulong pa) -+{ -+ if (DMA64_ENAB(di)) { -+ if (direction == DMA_TX) { -+ W_REG(&di->d64txregs->addrlow, pa + di->ddoffsetlow); -+ W_REG(&di->d64txregs->addrhigh, di->ddoffsethigh); -+ } else { -+ W_REG(&di->d64rxregs->addrlow, pa + di->ddoffsetlow); -+ W_REG(&di->d64rxregs->addrhigh, di->ddoffsethigh); -+ } -+ } else { -+ uint32 offset = di->ddoffsetlow; -+ if ((offset != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { -+ if (direction == DMA_TX) -+ W_REG(&di->d32txregs->addr, (pa + offset)); -+ else -+ W_REG(&di->d32rxregs->addr, (pa + offset)); -+ } else { -+ /* dma32 address extension */ -+ uint32 ae; -+ ASSERT(di->addrext); -+ ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; -+ -+ if (direction == DMA_TX) { -+ W_REG(&di->d32txregs->addr, ((pa & ~PCI32ADDR_HIGH) + offset)); -+ SET_REG(&di->d32txregs->control, XC_AE, (ae << XC_AE_SHIFT)); -+ } else { -+ W_REG(&di->d32rxregs->addr, ((pa & ~PCI32ADDR_HIGH) + offset)); -+ SET_REG(&di->d32rxregs->control, RC_AE, (ae << RC_AE_SHIFT)); ++ switch (sflash.type) { ++ case SFLASH_ST: ++ /* Probe for ST chips */ ++ sflash_cmd(cc, SFLASH_ST_DP); ++ sflash_cmd(cc, SFLASH_ST_RES); ++ id = R_REG(NULL, &cc->flashdata); ++ switch (id) { ++ case 0x11: ++ /* ST M25P20 2 Mbit Serial Flash */ ++ sflash.blocksize = 64 * 1024; ++ sflash.numblocks = 4; ++ break; ++ case 0x12: ++ /* ST M25P40 4 Mbit Serial Flash */ ++ sflash.blocksize = 64 * 1024; ++ sflash.numblocks = 8; ++ break; ++ case 0x13: ++ /* ST M25P80 8 Mbit Serial Flash */ ++ sflash.blocksize = 64 * 1024; ++ sflash.numblocks = 16; ++ break; ++ case 0x14: ++ /* ST M25P16 16 Mbit Serial Flash */ ++ sflash.blocksize = 64 * 1024; ++ sflash.numblocks = 32; ++ break; ++ case 0x15: ++ /* ST M25P32 32 Mbit Serial Flash */ ++ sflash.blocksize = 64 * 1024; ++ sflash.numblocks = 64; ++ break; ++ case 0x16: ++ /* ST M25P64 64 Mbit Serial Flash */ ++ sflash.blocksize = 64 * 1024; ++ sflash.numblocks = 128; ++ break; ++ case 0xbf: ++ W_REG(NULL, &cc->flashaddress, 1); ++ sflash_cmd(cc, SFLASH_ST_RES); ++ id2 = R_REG(NULL, &cc->flashdata); ++ if (id2 == 0x44) { ++ /* SST M25VF80 4 Mbit Serial Flash */ ++ sflash.blocksize = 64 * 1024; ++ sflash.numblocks = 8; + } ++ break; + } -+ } -+} ++ break; + -+/* init the tx or rx descriptor */ -+static INLINE void -+dma32_dd_upd(dma_info_t *di, dma32dd_t *ddring, ulong pa, uint outidx, uint32 *ctrl) -+{ -+ uint offset = di->dataoffsetlow; -+ -+ if ((offset != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { -+ W_SM(&ddring[outidx].addr, BUS_SWAP32(pa + offset)); -+ W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*ctrl)); -+ } else { -+ /* address extension */ -+ uint32 ae; -+ ASSERT(di->addrext); -+ ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; -+ -+ *ctrl |= (ae << CTRL_AE_SHIFT); -+ W_SM(&ddring[outidx].addr, BUS_SWAP32((pa & ~PCI32ADDR_HIGH) + offset)); -+ W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*ctrl)); -+ } -+} -+ -+/* init the tx or rx descriptor */ -+static INLINE void -+dma64_dd_upd(dma_info_t *di, dma64dd_t *ddring, ulong pa, uint outidx, uint32 *flags, uint32 bufcount) -+{ -+ uint32 bufaddr_low = pa + di->dataoffsetlow; -+ uint32 bufaddr_high = 0 + di->dataoffsethigh; -+ -+ uint32 ctrl2 = bufcount & D64_CTRL2_BC_MASK; -+ -+ W_SM(&ddring[outidx].addrlow, BUS_SWAP32(bufaddr_low)); -+ W_SM(&ddring[outidx].addrhigh, BUS_SWAP32(bufaddr_high)); -+ W_SM(&ddring[outidx].ctrl1, BUS_SWAP32(*flags)); -+ W_SM(&ddring[outidx].ctrl2, BUS_SWAP32(ctrl2)); -+} -+ -+void -+dma_txinit(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txinit\n", di->name)); -+ -+ di->txin = di->txout = 0; -+ di->txavail = di->ntxd - 1; -+ -+ /* clear tx descriptor ring */ -+ if (DMA64_ENAB(di)) { -+ BZERO_SM((void*)di->txd64, (di->ntxd * sizeof (dma64dd_t))); -+ W_REG(&di->d64txregs->control, XC_XE); -+ dma_ddtable_init(di, DMA_TX, di->txdpa); -+ } else { -+ BZERO_SM((void*)di->txd32, (di->ntxd * sizeof (dma32dd_t))); -+ W_REG(&di->d32txregs->control, XC_XE); -+ dma_ddtable_init(di, DMA_TX, di->txdpa); -+ } -+} -+ -+bool -+dma_txenabled(dma_info_t *di) -+{ -+ uint32 xc; -+ -+ /* If the chip is dead, it is not enabled :-) */ -+ if (DMA64_ENAB(di)) { -+ xc = R_REG(&di->d64txregs->control); -+ return ((xc != 0xffffffff) && (xc & D64_XC_XE)); -+ } else { -+ xc = R_REG(&di->d32txregs->control); -+ return ((xc != 0xffffffff) && (xc & XC_XE)); -+ } -+} -+ -+void -+dma_txsuspend(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txsuspend\n", di->name)); -+ if (DMA64_ENAB(di)) -+ OR_REG(&di->d64txregs->control, D64_XC_SE); -+ else -+ OR_REG(&di->d32txregs->control, XC_SE); -+} -+ -+void -+dma_txresume(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txresume\n", di->name)); -+ if (DMA64_ENAB(di)) -+ AND_REG(&di->d64txregs->control, ~D64_XC_SE); -+ else -+ AND_REG(&di->d32txregs->control, ~XC_SE); -+} -+ -+bool -+dma_txsuspendedidle(dma_info_t *di) -+{ -+ if (DMA64_ENAB(di)) -+ return dma64_txsuspendedidle(di); -+ else -+ return dma32_txsuspendedidle(di); -+} -+ -+bool -+dma_txsuspended(dma_info_t *di) -+{ -+ if (DMA64_ENAB(di)) -+ return ((R_REG(&di->d64txregs->control) & D64_XC_SE) == D64_XC_SE); -+ else -+ return ((R_REG(&di->d32txregs->control) & XC_SE) == XC_SE); -+} -+ -+bool -+dma_txstopped(dma_info_t *di) -+{ -+ if (DMA64_ENAB(di)) -+ return ((R_REG(&di->d64txregs->status0) & D64_XS0_XS_MASK) == D64_XS0_XS_STOPPED); -+ else -+ return ((R_REG(&di->d32txregs->status) & XS_XS_MASK) == XS_XS_STOPPED); -+} -+ -+bool -+dma_rxstopped(dma_info_t *di) -+{ -+ if (DMA64_ENAB(di)) -+ return ((R_REG(&di->d64rxregs->status0) & D64_RS0_RS_MASK) == D64_RS0_RS_STOPPED); -+ else -+ return ((R_REG(&di->d32rxregs->status) & RS_RS_MASK) == RS_RS_STOPPED); -+} -+ -+void -+dma_fifoloopbackenable(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_fifoloopbackenable\n", di->name)); -+ if (DMA64_ENAB(di)) -+ OR_REG(&di->d64txregs->control, D64_XC_LE); -+ else -+ OR_REG(&di->d32txregs->control, XC_LE); -+} -+ -+void -+dma_rxinit(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_rxinit\n", di->name)); -+ -+ di->rxin = di->rxout = 0; -+ -+ /* clear rx descriptor ring */ -+ if (DMA64_ENAB(di)) { -+ BZERO_SM((void*)di->rxd64, (di->nrxd * sizeof (dma64dd_t))); -+ dma_rxenable(di); -+ dma_ddtable_init(di, DMA_RX, di->rxdpa); -+ } else { -+ BZERO_SM((void*)di->rxd32, (di->nrxd * sizeof (dma32dd_t))); -+ dma_rxenable(di); -+ dma_ddtable_init(di, DMA_RX, di->rxdpa); -+ } -+} -+ -+void -+dma_rxenable(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_rxenable\n", di->name)); -+ if (DMA64_ENAB(di)) -+ W_REG(&di->d64rxregs->control, ((di->rxoffset << D64_RC_RO_SHIFT) | D64_RC_RE)); -+ else -+ W_REG(&di->d32rxregs->control, ((di->rxoffset << RC_RO_SHIFT) | RC_RE)); -+} -+ -+bool -+dma_rxenabled(dma_info_t *di) -+{ -+ uint32 rc; -+ -+ if (DMA64_ENAB(di)) { -+ rc = R_REG(&di->d64rxregs->control); -+ return ((rc != 0xffffffff) && (rc & D64_RC_RE)); -+ } else { -+ rc = R_REG(&di->d32rxregs->control); -+ return ((rc != 0xffffffff) && (rc & RC_RE)); -+ } -+} -+ -+ -+/* !! tx entry routine */ -+int -+dma_txfast(dma_info_t *di, void *p0, uint32 coreflags) -+{ -+ if (DMA64_ENAB(di)) { -+ return dma64_txfast(di, p0, coreflags); -+ } else { -+ return dma32_txfast(di, p0, coreflags); -+ } -+} -+ -+/* !! rx entry routine, returns a pointer to the next frame received, or NULL if there are no more */ -+void* -+dma_rx(dma_info_t *di) -+{ -+ void *p; -+ uint len; -+ int skiplen = 0; -+ -+ while ((p = dma_getnextrxp(di, FALSE))) { -+ /* skip giant packets which span multiple rx descriptors */ -+ if (skiplen > 0) { -+ skiplen -= di->rxbufsize; -+ if (skiplen < 0) -+ skiplen = 0; -+ PKTFREE(di->osh, p, FALSE); -+ continue; ++ case SFLASH_AT: ++ /* Probe for Atmel chips */ ++ sflash_cmd(cc, SFLASH_AT_STATUS); ++ id = R_REG(NULL, &cc->flashdata) & 0x3c; ++ switch (id) { ++ case 0xc: ++ /* Atmel AT45DB011 1Mbit Serial Flash */ ++ sflash.blocksize = 256; ++ sflash.numblocks = 512; ++ break; ++ case 0x14: ++ /* Atmel AT45DB021 2Mbit Serial Flash */ ++ sflash.blocksize = 256; ++ sflash.numblocks = 1024; ++ break; ++ case 0x1c: ++ /* Atmel AT45DB041 4Mbit Serial Flash */ ++ sflash.blocksize = 256; ++ sflash.numblocks = 2048; ++ break; ++ case 0x24: ++ /* Atmel AT45DB081 8Mbit Serial Flash */ ++ sflash.blocksize = 256; ++ sflash.numblocks = 4096; ++ break; ++ case 0x2c: ++ /* Atmel AT45DB161 16Mbit Serial Flash */ ++ sflash.blocksize = 512; ++ sflash.numblocks = 4096; ++ break; ++ case 0x34: ++ /* Atmel AT45DB321 32Mbit Serial Flash */ ++ sflash.blocksize = 512; ++ sflash.numblocks = 8192; ++ break; ++ case 0x3c: ++ /* Atmel AT45DB642 64Mbit Serial Flash */ ++ sflash.blocksize = 1024; ++ sflash.numblocks = 8192; ++ break; + } -+ -+ len = ltoh16(*(uint16*)(PKTDATA(di->osh, p))); -+ DMA_TRACE(("%s: dma_rx len %d\n", di->name, len)); -+ -+ /* bad frame length check */ -+ if (len > (di->rxbufsize - di->rxoffset)) { -+ DMA_ERROR(("%s: dma_rx: bad frame length (%d)\n", di->name, len)); -+ if (len > 0) -+ skiplen = len - (di->rxbufsize - di->rxoffset); -+ PKTFREE(di->osh, p, FALSE); -+ di->hnddma.rxgiants++; -+ continue; -+ } -+ -+ /* set actual length */ -+ PKTSETLEN(di->osh, p, (di->rxoffset + len)); -+ + break; + } + -+ return (p); ++ sflash.size = sflash.blocksize * sflash.numblocks; ++ return sflash.size ? &sflash : NULL; +} + -+/* post receive buffers */ -+void -+dma_rxfill(dma_info_t *di) ++/* Read len bytes starting at offset into buf. Returns number of bytes read. */ ++int ++sflash_read(chipcregs_t *cc, uint offset, uint len, uchar *buf) +{ -+ void *p; -+ uint rxin, rxout; -+ uint32 ctrl; -+ uint n; -+ uint i; -+ uint32 pa; -+ uint rxbufsize; ++ int cnt; ++ uint32 *from, *to; + -+ /* -+ * Determine how many receive buffers we're lacking -+ * from the full complement, allocate, initialize, -+ * and post them, then update the chip rx lastdscr. -+ */ -+ -+ rxin = di->rxin; -+ rxout = di->rxout; -+ rxbufsize = di->rxbufsize; -+ -+ n = di->nrxpost - NRXDACTIVE(rxin, rxout); -+ -+ DMA_TRACE(("%s: dma_rxfill: post %d\n", di->name, n)); -+ -+ for (i = 0; i < n; i++) { -+ if ((p = PKTGET(di->osh, rxbufsize, FALSE)) == NULL) { -+ DMA_ERROR(("%s: dma_rxfill: out of rxbufs\n", di->name)); -+ di->hnddma.rxnobuf++; -+ break; -+ } -+ -+ /* Do a cached write instead of uncached write since DMA_MAP -+ * will flush the cache. */ -+ *(uint32*)(PKTDATA(di->osh, p)) = 0; -+ -+ pa = (uint32) DMA_MAP(di->osh, PKTDATA(di->osh, p), rxbufsize, DMA_RX, p); -+ ASSERT(ISALIGNED(pa, 4)); -+ -+ /* save the free packet pointer */ -+ ASSERT(di->rxp[rxout] == NULL); -+ di->rxp[rxout] = p; -+ -+ if (DMA64_ENAB(di)) { -+ /* prep the descriptor control value */ -+ if (rxout == (di->nrxd - 1)) -+ ctrl = CTRL_EOT; -+ -+ dma64_dd_upd(di, di->rxd64, pa, rxout, &ctrl, rxbufsize); -+ } else { -+ /* prep the descriptor control value */ -+ ctrl = rxbufsize; -+ if (rxout == (di->nrxd - 1)) -+ ctrl |= CTRL_EOT; -+ dma32_dd_upd(di, di->rxd32, pa, rxout, &ctrl); -+ } -+ -+ rxout = NEXTRXD(rxout); -+ } -+ -+ di->rxout = rxout; -+ -+ /* update the chip lastdscr pointer */ -+ if (DMA64_ENAB(di)) { -+ W_REG(&di->d64rxregs->ptr, I2B(rxout, dma64dd_t)); -+ } else { -+ W_REG(&di->d32rxregs->ptr, I2B(rxout, dma32dd_t)); -+ } -+} -+ -+void -+dma_txreclaim(dma_info_t *di, bool forceall) -+{ -+ void *p; -+ -+ DMA_TRACE(("%s: dma_txreclaim %s\n", di->name, forceall ? "all" : "")); -+ -+ while ((p = dma_getnexttxp(di, forceall))) -+ PKTFREE(di->osh, p, TRUE); -+} -+ -+/* -+ * Reclaim next completed txd (txds if using chained buffers) and -+ * return associated packet. -+ * If 'force' is true, reclaim txd(s) and return associated packet -+ * regardless of the value of the hardware "curr" pointer. -+ */ -+void* -+dma_getnexttxp(dma_info_t *di, bool forceall) -+{ -+ if (DMA64_ENAB(di)) { -+ return dma64_getnexttxp(di, forceall); -+ } else { -+ return dma32_getnexttxp(di, forceall); -+ } -+} -+ -+/* like getnexttxp but no reclaim */ -+void* -+dma_peeknexttxp(dma_info_t *di) -+{ -+ uint end, i; -+ -+ if (DMA64_ENAB(di)) { -+ end = B2I(R_REG(&di->d64txregs->status0) & D64_XS0_CD_MASK, dma64dd_t); -+ } else { -+ end = B2I(R_REG(&di->d32txregs->status) & XS_CD_MASK, dma32dd_t); -+ } -+ -+ for (i = di->txin; i != end; i = NEXTTXD(i)) -+ if (di->txp[i]) -+ return (di->txp[i]); -+ -+ return (NULL); -+} -+ -+/* -+ * Rotate all active tx dma ring entries "forward" by (ActiveDescriptor - txin). -+ */ -+void -+dma_txrotate(di_t *di) -+{ -+ if (DMA64_ENAB(di)) { -+ dma64_txrotate(di); -+ } else { -+ dma32_txrotate(di); -+ } -+} -+ -+void -+dma_rxreclaim(dma_info_t *di) -+{ -+ void *p; -+ -+ DMA_TRACE(("%s: dma_rxreclaim\n", di->name)); -+ -+ while ((p = dma_getnextrxp(di, TRUE))) -+ PKTFREE(di->osh, p, FALSE); -+} -+ -+void * -+dma_getnextrxp(dma_info_t *di, bool forceall) -+{ -+ if (DMA64_ENAB(di)) { -+ return dma64_getnextrxp(di, forceall); -+ } else { -+ return dma32_getnextrxp(di, forceall); -+ } -+} -+ -+uintptr -+dma_getvar(dma_info_t *di, char *name) -+{ -+ if (!strcmp(name, "&txavail")) -+ return ((uintptr) &di->txavail); -+ else { -+ ASSERT(0); -+ } -+ return (0); -+} -+ -+void -+dma_txblock(dma_info_t *di) -+{ -+ di->txavail = 0; -+} -+ -+void -+dma_txunblock(dma_info_t *di) -+{ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+} -+ -+uint -+dma_txactive(dma_info_t *di) -+{ -+ return (NTXDACTIVE(di->txin, di->txout)); -+} -+ -+void -+dma_rxpiomode(dma32regs_t *regs) -+{ -+ W_REG(®s->control, RC_FM); -+} -+ -+void -+dma_txpioloopback(dma32regs_t *regs) -+{ -+ OR_REG(®s->control, XC_LE); -+} -+ -+ -+ -+ -+/*** 32 bits DMA non-inline functions ***/ -+static bool -+dma32_alloc(dma_info_t *di, uint direction) -+{ -+ uint size; -+ uint ddlen; -+ void *va; -+ -+ ddlen = sizeof (dma32dd_t); -+ -+ size = (direction == DMA_TX) ? (di->ntxd * ddlen) : (di->nrxd * ddlen); -+ -+ if (!ISALIGNED(DMA_CONSISTENT_ALIGN, D32RINGALIGN)) -+ size += D32RINGALIGN; -+ -+ -+ if (direction == DMA_TX) { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->txdpa)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(ntxd) failed\n", di->name)); -+ return FALSE; -+ } -+ -+ di->txd32 = (dma32dd_t*) ROUNDUP((uintptr)va, D32RINGALIGN); -+ di->txdalign = (uint)((int8*)di->txd32 - (int8*)va); -+ di->txdpa += di->txdalign; -+ di->txdalloc = size; -+ ASSERT(ISALIGNED((uintptr)di->txd32, D32RINGALIGN)); -+ } else { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->rxdpa)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(nrxd) failed\n", di->name)); -+ return FALSE; -+ } -+ di->rxd32 = (dma32dd_t*) ROUNDUP((uintptr)va, D32RINGALIGN); -+ di->rxdalign = (uint)((int8*)di->rxd32 - (int8*)va); -+ di->rxdpa += di->rxdalign; -+ di->rxdalloc = size; -+ ASSERT(ISALIGNED((uintptr)di->rxd32, D32RINGALIGN)); -+ } -+ -+ return TRUE; -+} -+ -+static void -+dma32_txreset(dma_info_t *di) -+{ -+ uint32 status; -+ -+ /* suspend tx DMA first */ -+ W_REG(&di->d32txregs->control, XC_SE); -+ SPINWAIT((status = (R_REG(&di->d32txregs->status) & XS_XS_MASK)) != XS_XS_DISABLED && -+ status != XS_XS_IDLE && -+ status != XS_XS_STOPPED, -+ 10000); -+ -+ W_REG(&di->d32txregs->control, 0); -+ SPINWAIT((status = (R_REG(&di->d32txregs->status) & XS_XS_MASK)) != XS_XS_DISABLED, -+ 10000); -+ -+ if (status != XS_XS_DISABLED) { -+ DMA_ERROR(("%s: dma_txreset: dma cannot be stopped\n", di->name)); -+ } -+ -+ /* wait for the last transaction to complete */ -+ OSL_DELAY(300); -+} -+ -+static void -+dma32_rxreset(dma_info_t *di) -+{ -+ uint32 status; -+ -+ W_REG(&di->d32rxregs->control, 0); -+ SPINWAIT((status = (R_REG(&di->d32rxregs->status) & RS_RS_MASK)) != RS_RS_DISABLED, -+ 10000); -+ -+ if (status != RS_RS_DISABLED) { -+ DMA_ERROR(("%s: dma_rxreset: dma cannot be stopped\n", di->name)); -+ } -+} -+ -+static bool -+dma32_txsuspendedidle(dma_info_t *di) -+{ -+ if (!(R_REG(&di->d32txregs->control) & XC_SE)) -+ return 0; -+ -+ if ((R_REG(&di->d32txregs->status) & XS_XS_MASK) != XS_XS_IDLE) ++ if (!len) + return 0; + -+ OSL_DELAY(2); -+ return ((R_REG(&di->d32txregs->status) & XS_XS_MASK) == XS_XS_IDLE); -+} ++ if ((offset + len) > sflash.size) ++ return -22; + -+/* -+ * supports full 32bit dma engine buffer addressing so -+ * dma buffers can cross 4 Kbyte page boundaries. -+ */ -+static int -+dma32_txfast(dma_info_t *di, void *p0, uint32 coreflags) -+{ -+ void *p, *next; -+ uchar *data; -+ uint len; -+ uint txout; -+ uint32 ctrl; -+ uint32 pa; -+ -+ DMA_TRACE(("%s: dma_txfast\n", di->name)); -+ -+ txout = di->txout; -+ ctrl = 0; -+ -+ /* -+ * Walk the chain of packet buffers -+ * allocating and initializing transmit descriptor entries. -+ */ -+ for (p = p0; p; p = next) { -+ data = PKTDATA(di->osh, p); -+ len = PKTLEN(di->osh, p); -+ next = PKTNEXT(di->osh, p); -+ -+ /* return nonzero if out of tx descriptors */ -+ if (NEXTTXD(txout) == di->txin) -+ goto outoftxd; -+ -+ if (len == 0) -+ continue; -+ -+ /* get physical address of buffer start */ -+ pa = (uint32) DMA_MAP(di->osh, data, len, DMA_TX, p); -+ -+ /* build the descriptor control value */ -+ ctrl = len & CTRL_BC_MASK; -+ -+ ctrl |= coreflags; -+ -+ if (p == p0) -+ ctrl |= CTRL_SOF; -+ if (next == NULL) -+ ctrl |= (CTRL_IOC | CTRL_EOF); -+ if (txout == (di->ntxd - 1)) -+ ctrl |= CTRL_EOT; -+ -+ if (DMA64_ENAB(di)) { -+ dma64_dd_upd(di, di->txd64, pa, txout, &ctrl, len); -+ } else { -+ dma32_dd_upd(di, di->txd32, pa, txout, &ctrl); -+ } -+ -+ ASSERT(di->txp[txout] == NULL); -+ -+ txout = NEXTTXD(txout); -+ } -+ -+ /* if last txd eof not set, fix it */ -+ if (!(ctrl & CTRL_EOF)) -+ W_SM(&di->txd32[PREVTXD(txout)].ctrl, BUS_SWAP32(ctrl | CTRL_IOC | CTRL_EOF)); -+ -+ /* save the packet */ -+ di->txp[PREVTXD(txout)] = p0; -+ -+ /* bump the tx descriptor index */ -+ di->txout = txout; -+ -+ /* kick the chip */ -+ if (DMA64_ENAB(di)) { -+ W_REG(&di->d64txregs->ptr, I2B(txout, dma64dd_t)); -+ } else { -+ W_REG(&di->d32txregs->ptr, I2B(txout, dma32dd_t)); -+ } -+ -+ /* tx flow control */ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ return (0); -+ -+ outoftxd: -+ DMA_ERROR(("%s: dma_txfast: out of txds\n", di->name)); -+ PKTFREE(di->osh, p0, TRUE); -+ di->txavail = 0; -+ di->hnddma.txnobuf++; -+ return (-1); -+} -+ -+static void* -+dma32_getnexttxp(dma_info_t *di, bool forceall) -+{ -+ uint start, end, i; -+ void *txp; -+ -+ DMA_TRACE(("%s: dma_getnexttxp %s\n", di->name, forceall ? "all" : "")); -+ -+ txp = NULL; -+ -+ start = di->txin; -+ if (forceall) -+ end = di->txout; ++ if ((len >= 4) && (offset & 3)) ++ cnt = 4 - (offset & 3); ++ else if ((len >= 4) && ((uint32)buf & 3)) ++ cnt = 4 - ((uint32)buf & 3); + else -+ end = B2I(R_REG(&di->d32txregs->status) & XS_CD_MASK, dma32dd_t); ++ cnt = len; + -+ if ((start == 0) && (end > di->txout)) -+ goto bogus; ++ from = (uint32 *)KSEG1ADDR(SB_FLASH2 + offset); ++ to = (uint32 *)buf; + -+ for (i = start; i != end && !txp; i = NEXTTXD(i)) { -+ DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->txd32[i].addr)) - di->dataoffsetlow), -+ (BUS_SWAP32(R_SM(&di->txd32[i].ctrl)) & CTRL_BC_MASK), DMA_TX, di->txp[i]); -+ -+ W_SM(&di->txd32[i].addr, 0xdeadbeef); -+ txp = di->txp[i]; -+ di->txp[i] = NULL; ++ if (cnt < 4) { ++ bcopy(from, to, cnt); ++ return cnt; + } + -+ di->txin = i; -+ -+ /* tx flow control */ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ return (txp); -+ -+bogus: -+/* -+ DMA_ERROR(("dma_getnexttxp: bogus curr: start %d end %d txout %d force %d\n", -+ start, end, di->txout, forceall)); -+*/ -+ return (NULL); -+} -+ -+static void * -+dma32_getnextrxp(dma_info_t *di, bool forceall) -+{ -+ uint i; -+ void *rxp; -+ -+ /* if forcing, dma engine must be disabled */ -+ ASSERT(!forceall || !dma_rxenabled(di)); -+ -+ i = di->rxin; -+ -+ /* return if no packets posted */ -+ if (i == di->rxout) -+ return (NULL); -+ -+ /* ignore curr if forceall */ -+ if (!forceall && (i == B2I(R_REG(&di->d32rxregs->status) & RS_CD_MASK, dma32dd_t))) -+ return (NULL); -+ -+ /* get the packet pointer that corresponds to the rx descriptor */ -+ rxp = di->rxp[i]; -+ ASSERT(rxp); -+ di->rxp[i] = NULL; -+ -+ /* clear this packet from the descriptor ring */ -+ DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->rxd32[i].addr)) - di->dataoffsetlow), -+ di->rxbufsize, DMA_RX, rxp); -+ W_SM(&di->rxd32[i].addr, 0xdeadbeef); -+ -+ di->rxin = NEXTRXD(i); -+ -+ return (rxp); -+} -+ -+static void -+dma32_txrotate(di_t *di) -+{ -+ uint ad; -+ uint nactive; -+ uint rot; -+ uint old, new; -+ uint32 w; -+ uint first, last; -+ -+ ASSERT(dma_txsuspendedidle(di)); -+ -+ nactive = dma_txactive(di); -+ ad = B2I(((R_REG(&di->d32txregs->status) & XS_AD_MASK) >> XS_AD_SHIFT), dma32dd_t); -+ rot = TXD(ad - di->txin); -+ -+ ASSERT(rot < di->ntxd); -+ -+ /* full-ring case is a lot harder - don't worry about this */ -+ if (rot >= (di->ntxd - nactive)) { -+ DMA_ERROR(("%s: dma_txrotate: ring full - punt\n", di->name)); -+ return; ++ while (cnt >= 4) { ++ *to++ = *from++; ++ cnt -= 4; + } + -+ first = di->txin; -+ last = PREVTXD(di->txout); -+ -+ /* move entries starting at last and moving backwards to first */ -+ for (old = last; old != PREVTXD(first); old = PREVTXD(old)) { -+ new = TXD(old + rot); -+ -+ /* -+ * Move the tx dma descriptor. -+ * EOT is set only in the last entry in the ring. -+ */ -+ w = R_SM(&di->txd32[old].ctrl) & ~CTRL_EOT; -+ if (new == (di->ntxd - 1)) -+ w |= CTRL_EOT; -+ W_SM(&di->txd32[new].ctrl, w); -+ W_SM(&di->txd32[new].addr, R_SM(&di->txd32[old].addr)); -+ -+ /* zap the old tx dma descriptor address field */ -+ W_SM(&di->txd32[old].addr, 0xdeadbeef); -+ -+ /* move the corresponding txp[] entry */ -+ ASSERT(di->txp[new] == NULL); -+ di->txp[new] = di->txp[old]; -+ di->txp[old] = NULL; -+ } -+ -+ /* update txin and txout */ -+ di->txin = ad; -+ di->txout = TXD(di->txout + rot); -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ /* kick the chip */ -+ W_REG(&di->d32txregs->ptr, I2B(di->txout, dma32dd_t)); ++ return (len - cnt); +} + -+/*** 64 bits DMA non-inline functions ***/ -+ -+#ifdef BCMDMA64 -+ -+static bool -+dma64_alloc(dma_info_t *di, uint direction) ++/* Poll for command completion. Returns zero when complete. */ ++int ++sflash_poll(chipcregs_t *cc, uint offset) +{ -+ uint size; -+ uint ddlen; -+ uint32 alignbytes; -+ void *va; ++ if (offset >= sflash.size) ++ return -22; + -+ ddlen = sizeof (dma64dd_t); -+ -+ size = (direction == DMA_TX) ? (di->ntxd * ddlen) : (di->nrxd * ddlen); -+ -+ alignbytes = di->dma64align; -+ -+ if (!ISALIGNED(DMA_CONSISTENT_ALIGN, alignbytes)) -+ size += alignbytes; -+ -+ -+ if (direction == DMA_TX) { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->txdpa)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(ntxd) failed\n", di->name)); -+ return FALSE; -+ } -+ -+ di->txd64 = (dma64dd_t*) ROUNDUP((uintptr)va, alignbytes); -+ di->txdalign = (uint)((int8*)di->txd64 - (int8*)va); -+ di->txdpa += di->txdalign; -+ di->txdalloc = size; -+ ASSERT(ISALIGNED((uintptr)di->txd64, alignbytes)); -+ } else { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->rxdpa)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(nrxd) failed\n", di->name)); -+ return FALSE; -+ } -+ di->rxd64 = (dma64dd_t*) ROUNDUP((uintptr)va, alignbytes); -+ di->rxdalign = (uint)((int8*)di->rxd64 - (int8*)va); -+ di->rxdpa += di->rxdalign; -+ di->rxdalloc = size; -+ ASSERT(ISALIGNED((uintptr)di->rxd64, alignbytes)); ++ switch (sflash.type) { ++ case SFLASH_ST: ++ /* Check for ST Write In Progress bit */ ++ sflash_cmd(cc, SFLASH_ST_RDSR); ++ return R_REG(NULL, &cc->flashdata) & SFLASH_ST_WIP; ++ case SFLASH_AT: ++ /* Check for Atmel Ready bit */ ++ sflash_cmd(cc, SFLASH_AT_STATUS); ++ return !(R_REG(NULL, &cc->flashdata) & SFLASH_AT_READY); + } + -+ return TRUE; ++ return 0; +} + -+static void -+dma64_txreset(dma_info_t *di) ++/* Write len bytes starting at offset into buf. Returns number of bytes ++ * written. Caller should poll for completion. ++ */ ++int ++sflash_write(chipcregs_t *cc, uint offset, uint len, const uchar *buf) +{ -+ uint32 status; ++ struct sflash *sfl; ++ int ret = 0; ++ bool is4712b0; ++ uint32 page, byte, mask; + -+ /* suspend tx DMA first */ -+ W_REG(&di->d64txregs->control, D64_XC_SE); -+ SPINWAIT((status = (R_REG(&di->d64txregs->status0) & D64_XS0_XS_MASK)) != D64_XS0_XS_DISABLED && -+ status != D64_XS0_XS_IDLE && -+ status != D64_XS0_XS_STOPPED, -+ 10000); -+ -+ W_REG(&di->d64txregs->control, 0); -+ SPINWAIT((status = (R_REG(&di->d64txregs->status0) & D64_XS0_XS_MASK)) != D64_XS0_XS_DISABLED, -+ 10000); -+ -+ if (status != D64_XS0_XS_DISABLED) { -+ DMA_ERROR(("%s: dma_txreset: dma cannot be stopped\n", di->name)); -+ } -+ -+ /* wait for the last transaction to complete */ -+ OSL_DELAY(300); -+} -+ -+static void -+dma64_rxreset(dma_info_t *di) -+{ -+ uint32 status; -+ -+ W_REG(&di->d64rxregs->control, 0); -+ SPINWAIT((status = (R_REG(&di->d64rxregs->status0) & D64_RS0_RS_MASK)) != D64_RS0_RS_DISABLED, -+ 10000); -+ -+ if (status != D64_RS0_RS_DISABLED) { -+ DMA_ERROR(("%s: dma_rxreset: dma cannot be stopped\n", di->name)); -+ } -+} -+ -+static bool -+dma64_txsuspendedidle(dma_info_t *di) -+{ -+ -+ if (!(R_REG(&di->d64txregs->control) & D64_XC_SE)) ++ if (!len) + return 0; -+ -+ if ((R_REG(&di->d64txregs->status0) & D64_XS0_XS_MASK) == D64_XS0_XS_IDLE) -+ return 1; ++ ++ if ((offset + len) > sflash.size) ++ return -22; ++ ++ sfl = &sflash; ++ switch (sfl->type) { ++ case SFLASH_ST: ++ mask = R_REG(NULL, &cc->chipid); ++ is4712b0 = (((mask & CID_ID_MASK) == BCM4712_CHIP_ID) && ++ ((mask & CID_REV_MASK) == (3 << CID_REV_SHIFT))); ++ /* Enable writes */ ++ sflash_cmd(cc, SFLASH_ST_WREN); ++ if (is4712b0) { ++ mask = 1 << 14; ++ W_REG(NULL, &cc->flashaddress, offset); ++ W_REG(NULL, &cc->flashdata, *buf++); ++ /* Set chip select */ ++ OR_REG(NULL, &cc->gpioout, mask); ++ /* Issue a page program with the first byte */ ++ sflash_cmd(cc, SFLASH_ST_PP); ++ ret = 1; ++ offset++; ++ len--; ++ while (len > 0) { ++ if ((offset & 255) == 0) { ++ /* Page boundary, drop cs and return */ ++ AND_REG(NULL, &cc->gpioout, ~mask); ++ if (!sflash_poll(cc, offset)) { ++ /* Flash rejected command */ ++ return -11; ++ } ++ return ret; ++ } else { ++ /* Write single byte */ ++ sflash_cmd(cc, *buf++); ++ } ++ ret++; ++ offset++; ++ len--; ++ } ++ /* All done, drop cs if needed */ ++ if ((offset & 255) != 1) { ++ /* Drop cs */ ++ AND_REG(NULL, &cc->gpioout, ~mask); ++ if (!sflash_poll(cc, offset)) { ++ /* Flash rejected command */ ++ return -12; ++ } ++ } ++ } else { ++ ret = 1; ++ W_REG(NULL, &cc->flashaddress, offset); ++ W_REG(NULL, &cc->flashdata, *buf); ++ /* Page program */ ++ sflash_cmd(cc, SFLASH_ST_PP); ++ } ++ break; ++ case SFLASH_AT: ++ mask = sfl->blocksize - 1; ++ page = (offset & ~mask) << 1; ++ byte = offset & mask; ++ /* Read main memory page into buffer 1 */ ++ if (byte || (len < sfl->blocksize)) { ++ W_REG(NULL, &cc->flashaddress, page); ++ sflash_cmd(cc, SFLASH_AT_BUF1_LOAD); ++ /* 250 us for AT45DB321B */ ++ SPINWAIT(sflash_poll(cc, offset), 1000); ++ ASSERT(!sflash_poll(cc, offset)); ++ } ++ /* Write into buffer 1 */ ++ for (ret = 0; (ret < (int)len) && (byte < sfl->blocksize); ret++) { ++ W_REG(NULL, &cc->flashaddress, byte++); ++ W_REG(NULL, &cc->flashdata, *buf++); ++ sflash_cmd(cc, SFLASH_AT_BUF1_WRITE); ++ } ++ /* Write buffer 1 into main memory page */ ++ W_REG(NULL, &cc->flashaddress, page); ++ sflash_cmd(cc, SFLASH_AT_BUF1_PROGRAM); ++ break; ++ } ++ ++ return ret; ++} ++ ++/* Erase a region. Returns number of bytes scheduled for erasure. ++ * Caller should poll for completion. ++ */ ++int ++sflash_erase(chipcregs_t *cc, uint offset) ++{ ++ struct sflash *sfl; ++ ++ if (offset >= sflash.size) ++ return -22; ++ ++ sfl = &sflash; ++ switch (sfl->type) { ++ case SFLASH_ST: ++ sflash_cmd(cc, SFLASH_ST_WREN); ++ W_REG(NULL, &cc->flashaddress, offset); ++ sflash_cmd(cc, SFLASH_ST_SE); ++ return sfl->blocksize; ++ case SFLASH_AT: ++ W_REG(NULL, &cc->flashaddress, offset << 1); ++ sflash_cmd(cc, SFLASH_AT_PAGE_ERASE); ++ return sfl->blocksize; ++ } + + return 0; +} + +/* -+ * supports full 32bit dma engine buffer addressing so -+ * dma buffers can cross 4 Kbyte page boundaries. ++ * writes the appropriate range of flash, a NULL buf simply erases ++ * the region of flash + */ -+static int -+dma64_txfast(dma_info_t *di, void *p0, uint32 coreflags) ++int ++sflash_commit(chipcregs_t *cc, uint offset, uint len, const uchar *buf) +{ -+ void *p, *next; -+ uchar *data; -+ uint len; -+ uint txout; -+ uint32 flags; -+ uint32 pa; ++ struct sflash *sfl; ++ uchar *block = NULL, *cur_ptr, *blk_ptr; ++ uint blocksize = 0, mask, cur_offset, cur_length, cur_retlen, remainder; ++ uint blk_offset, blk_len, copied; ++ int bytes, ret = 0; + -+ DMA_TRACE(("%s: dma_txfast\n", di->name)); ++ /* Check address range */ ++ if (len <= 0) ++ return 0; + -+ txout = di->txout; -+ flags = 0; ++ sfl = &sflash; ++ if ((offset + len) > sfl->size) ++ return -1; + -+ /* -+ * Walk the chain of packet buffers -+ * allocating and initializing transmit descriptor entries. -+ */ -+ for (p = p0; p; p = next) { -+ data = PKTDATA(di->osh, p); -+ len = PKTLEN(di->osh, p); -+ next = PKTNEXT(di->osh, p); ++ blocksize = sfl->blocksize; ++ mask = blocksize - 1; + -+ /* return nonzero if out of tx descriptors */ -+ if (NEXTTXD(txout) == di->txin) -+ goto outoftxd; ++ /* Allocate a block of mem */ ++ if (!(block = MALLOC(NULL, blocksize))) ++ return -1; + -+ if (len == 0) ++ while (len) { ++ /* Align offset */ ++ cur_offset = offset & ~mask; ++ cur_length = blocksize; ++ cur_ptr = block; ++ ++ remainder = blocksize - (offset & mask); ++ if (len < remainder) ++ cur_retlen = len; ++ else ++ cur_retlen = remainder; ++ ++ /* buf == NULL means erase only */ ++ if (buf) { ++ /* Copy existing data into holding block if necessary */ ++ if ((offset & mask) || (len < blocksize)) { ++ blk_offset = cur_offset; ++ blk_len = cur_length; ++ blk_ptr = cur_ptr; ++ ++ /* Copy entire block */ ++ while (blk_len) { ++ copied = sflash_read(cc, blk_offset, blk_len, blk_ptr); ++ blk_offset += copied; ++ blk_len -= copied; ++ blk_ptr += copied; ++ } ++ } ++ ++ /* Copy input data into holding block */ ++ memcpy(cur_ptr + (offset & mask), buf, cur_retlen); ++ } ++ ++ /* Erase block */ ++ if ((ret = sflash_erase(cc, (uint) cur_offset)) < 0) ++ goto done; ++ while (sflash_poll(cc, (uint) cur_offset)); ++ ++ /* buf == NULL means erase only */ ++ if (!buf) { ++ offset += cur_retlen; ++ len -= cur_retlen; + continue; ++ } + -+ /* get physical address of buffer start */ -+ pa = (uint32) DMA_MAP(di->osh, data, len, DMA_TX, p); ++ /* Write holding block */ ++ while (cur_length > 0) { ++ if ((bytes = sflash_write(cc, ++ (uint) cur_offset, ++ (uint) cur_length, ++ (uchar *) cur_ptr)) < 0) { ++ ret = bytes; ++ goto done; ++ } ++ while (sflash_poll(cc, (uint) cur_offset)); ++ cur_offset += bytes; ++ cur_length -= bytes; ++ cur_ptr += bytes; ++ } + -+ flags = coreflags; -+ -+ if (p == p0) -+ flags |= D64_CTRL1_SOF; -+ if (next == NULL) -+ flags |= (D64_CTRL1_IOC | D64_CTRL1_EOF); -+ if (txout == (di->ntxd - 1)) -+ flags |= D64_CTRL1_EOT; -+ -+ dma64_dd_upd(di, di->txd64, pa, txout, &flags, len); -+ -+ ASSERT(di->txp[txout] == NULL); -+ -+ txout = NEXTTXD(txout); ++ offset += cur_retlen; ++ len -= cur_retlen; ++ buf += cur_retlen; + } + -+ /* if last txd eof not set, fix it */ -+ if (!(flags & D64_CTRL1_EOF)) -+ W_SM(&di->txd64[PREVTXD(txout)].ctrl1, BUS_SWAP32(flags | D64_CTRL1_IOC | D64_CTRL1_EOF)); -+ -+ /* save the packet */ -+ di->txp[PREVTXD(txout)] = p0; -+ -+ /* bump the tx descriptor index */ -+ di->txout = txout; -+ -+ /* kick the chip */ -+ W_REG(&di->d64txregs->ptr, I2B(txout, dma64dd_t)); -+ -+ /* tx flow control */ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ return (0); -+ -+outoftxd: -+ DMA_ERROR(("%s: dma_txfast: out of txds\n", di->name)); -+ PKTFREE(di->osh, p0, TRUE); -+ di->txavail = 0; -+ di->hnddma.txnobuf++; -+ return (-1); ++ ret = len; ++done: ++ if (block) ++ MFREE(NULL, block, blocksize); ++ return ret; +} -+ -+static void* -+dma64_getnexttxp(dma_info_t *di, bool forceall) -+{ -+ uint start, end, i; -+ void *txp; -+ -+ DMA_TRACE(("%s: dma_getnexttxp %s\n", di->name, forceall ? "all" : "")); -+ -+ txp = NULL; -+ -+ start = di->txin; -+ if (forceall) -+ end = di->txout; -+ else -+ end = B2I(R_REG(&di->d64txregs->status0) & D64_XS0_CD_MASK, dma64dd_t); -+ -+ if ((start == 0) && (end > di->txout)) -+ goto bogus; -+ -+ for (i = start; i != end && !txp; i = NEXTTXD(i)) { -+ DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->txd64[i].addrlow)) - di->dataoffsetlow), -+ (BUS_SWAP32(R_SM(&di->txd64[i].ctrl2)) & D64_CTRL2_BC_MASK), DMA_TX, di->txp[i]); -+ -+ W_SM(&di->txd64[i].addrlow, 0xdeadbeef); -+ W_SM(&di->txd64[i].addrhigh, 0xdeadbeef); -+ -+ txp = di->txp[i]; -+ di->txp[i] = NULL; -+ } -+ -+ di->txin = i; -+ -+ /* tx flow control */ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ return (txp); -+ -+bogus: +diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time.c +--- linux.old/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm947xx/time.c 2006-04-28 00:45:40.000000000 +0200 +@@ -0,0 +1,119 @@ +/* -+ DMA_ERROR(("dma_getnexttxp: bogus curr: start %d end %d txout %d force %d\n", -+ start, end, di->txout, forceall)); -+*/ -+ return (NULL); -+} -+ -+static void * -+dma64_getnextrxp(dma_info_t *di, bool forceall) -+{ -+ uint i; -+ void *rxp; -+ -+ /* if forcing, dma engine must be disabled */ -+ ASSERT(!forceall || !dma_rxenabled(di)); -+ -+ i = di->rxin; -+ -+ /* return if no packets posted */ -+ if (i == di->rxout) -+ return (NULL); -+ -+ /* ignore curr if forceall */ -+ if (!forceall && (i == B2I(R_REG(&di->d64rxregs->status0) & D64_RS0_CD_MASK, dma64dd_t))) -+ return (NULL); -+ -+ /* get the packet pointer that corresponds to the rx descriptor */ -+ rxp = di->rxp[i]; -+ ASSERT(rxp); -+ di->rxp[i] = NULL; -+ -+ /* clear this packet from the descriptor ring */ -+ DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->rxd64[i].addrlow)) - di->dataoffsetlow), -+ di->rxbufsize, DMA_RX, rxp); -+ -+ W_SM(&di->rxd64[i].addrlow, 0xdeadbeef); -+ W_SM(&di->rxd64[i].addrhigh, 0xdeadbeef); -+ -+ di->rxin = NEXTRXD(i); -+ -+ return (rxp); -+} -+ -+static void -+dma64_txrotate(di_t *di) -+{ -+ uint ad; -+ uint nactive; -+ uint rot; -+ uint old, new; -+ uint32 w; -+ uint first, last; -+ -+ ASSERT(dma_txsuspendedidle(di)); -+ -+ nactive = dma_txactive(di); -+ ad = B2I((R_REG(&di->d64txregs->status1) & D64_XS1_AD_MASK), dma64dd_t); -+ rot = TXD(ad - di->txin); -+ -+ ASSERT(rot < di->ntxd); -+ -+ /* full-ring case is a lot harder - don't worry about this */ -+ if (rot >= (di->ntxd - nactive)) { -+ DMA_ERROR(("%s: dma_txrotate: ring full - punt\n", di->name)); -+ return; -+ } -+ -+ first = di->txin; -+ last = PREVTXD(di->txout); -+ -+ /* move entries starting at last and moving backwards to first */ -+ for (old = last; old != PREVTXD(first); old = PREVTXD(old)) { -+ new = TXD(old + rot); -+ -+ /* -+ * Move the tx dma descriptor. -+ * EOT is set only in the last entry in the ring. -+ */ -+ w = R_SM(&di->txd64[old].ctrl1) & ~D64_CTRL1_EOT; -+ if (new == (di->ntxd - 1)) -+ w |= D64_CTRL1_EOT; -+ W_SM(&di->txd64[new].ctrl1, w); -+ -+ w = R_SM(&di->txd64[old].ctrl2); -+ W_SM(&di->txd64[new].ctrl2, w); -+ -+ W_SM(&di->txd64[new].addrlow, R_SM(&di->txd64[old].addrlow)); -+ W_SM(&di->txd64[new].addrhigh, R_SM(&di->txd64[old].addrhigh)); -+ -+ /* zap the old tx dma descriptor address field */ -+ W_SM(&di->txd64[old].addrlow, 0xdeadbeef); -+ W_SM(&di->txd64[old].addrhigh, 0xdeadbeef); -+ -+ /* move the corresponding txp[] entry */ -+ ASSERT(di->txp[new] == NULL); -+ di->txp[new] = di->txp[old]; -+ di->txp[old] = NULL; -+ } -+ -+ /* update txin and txout */ -+ di->txin = ad; -+ di->txout = TXD(di->txout + rot); -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ /* kick the chip */ -+ W_REG(&di->d64txregs->ptr, I2B(di->txout, dma64dd_t)); -+} -+ -+#endif -+ -diff -Naur linux.old/drivers/net/wl/hnddma.h linux.dev/drivers/net/wl/hnddma.h ---- linux.old/drivers/net/wl/hnddma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/hnddma.h 2006-04-06 16:57:44.000000000 +0200 -@@ -0,0 +1,69 @@ -+/* -+ * Generic Broadcom Home Networking Division (HND) DMA engine SW interface -+ * This supports the following chips: BCM42xx, 44xx, 47xx . -+ * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ -+ */ -+ -+#ifndef _hnddma_h_ -+#define _hnddma_h_ -+ -+/* export structure */ -+typedef volatile struct { -+ /* rx error counters */ -+ uint rxgiants; /* rx giant frames */ -+ uint rxnobuf; /* rx out of dma descriptors */ -+ /* tx error counters */ -+ uint txnobuf; /* tx out of dma descriptors */ -+} hnddma_t; -+ -+#ifndef di_t -+#define di_t void -+#endif -+ -+#ifndef osl_t -+#define osl_t void -+#endif -+ -+/* externs */ -+extern void dma_detach(di_t *di); -+extern void dma_txreset(di_t *di); -+extern void dma_rxreset(di_t *di); -+extern void dma_txinit(di_t *di); -+extern bool dma_txenabled(di_t *di); -+extern void dma_rxinit(di_t *di); -+extern void dma_rxenable(di_t *di); -+extern bool dma_rxenabled(di_t *di); -+extern void dma_txsuspend(di_t *di); -+extern void dma_txresume(di_t *di); -+extern bool dma_txsuspended(di_t *di); -+extern bool dma_txsuspendedidle(di_t *di); -+extern bool dma_txstopped(di_t *di); -+extern bool dma_rxstopped(di_t *di); -+extern int dma_txfast(di_t *di, void *p, uint32 coreflags); -+extern void dma_fifoloopbackenable(di_t *di); -+extern void *dma_rx(di_t *di); -+extern void dma_rxfill(di_t *di); -+extern void dma_txreclaim(di_t *di, bool forceall); -+extern void dma_rxreclaim(di_t *di); -+extern uintptr dma_getvar(di_t *di, char *name); -+extern void *dma_getnexttxp(di_t *di, bool forceall); -+extern void *dma_peeknexttxp(di_t *di); -+extern void *dma_getnextrxp(di_t *di, bool forceall); -+extern void dma_txblock(di_t *di); -+extern void dma_txunblock(di_t *di); -+extern uint dma_txactive(di_t *di); -+extern void dma_txrotate(di_t *di); -+ -+extern void dma_rxpiomode(dma32regs_t *); -+extern void dma_txpioloopback(dma32regs_t *); -+ -+ -+#endif /* _hnddma_h_ */ -diff -Naur linux.old/drivers/net/wl/pktq.h linux.dev/drivers/net/wl/pktq.h ---- linux.old/drivers/net/wl/pktq.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/pktq.h 2006-04-06 17:32:52.000000000 +0200 -@@ -0,0 +1,48 @@ -+/* -+ * Misc useful os-independent macros and functions. -+ * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ -+ */ -+ -+#ifndef _pktq_h_ -+#define _pktq_h_ -+ -+/*** driver-only section ***/ -+#ifdef BCMDRIVER -+ -+/* generic osl packet queue */ -+struct pktq { -+ void *head; /* first packet to dequeue */ -+ void *tail; /* last packet to dequeue */ -+ uint len; /* number of queued packets */ -+ uint maxlen; /* maximum number of queued packets */ -+ bool priority; /* enqueue by packet priority */ -+ uint8 prio_map[MAXPRIO+1]; /* user priority to packet enqueue policy map */ -+}; -+#define DEFAULT_QLEN 128 -+ -+#define pktq_len(q) ((q)->len) -+#define pktq_avail(q) ((q)->maxlen - (q)->len) -+#define pktq_head(q) ((q)->head) -+#define pktq_full(q) ((q)->len >= (q)->maxlen) -+#define _pktq_pri(q, pri) ((q)->prio_map[pri]) -+#define pktq_tailpri(q) ((q)->tail ? _pktq_pri(q, PKTPRIO((q)->tail)) : _pktq_pri(q, 0)) -+ -+/* externs */ -+/* packet */ -+extern uint pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf); -+extern uint pkttotlen(osl_t *osh, void *); -+extern void pktq_init(struct pktq *q, uint maxlen, const uint8 prio_map[]); -+extern void pktenq(struct pktq *q, void *p, bool lifo); -+extern void *pktdeq(struct pktq *q); -+extern void *pktdeqtail(struct pktq *q); -+ -+#endif -+#endif /* _pktq_h_ */ -diff -Naur linux.old/drivers/net/wl/sbhnddma.h linux.dev/drivers/net/wl/sbhnddma.h ---- linux.old/drivers/net/wl/sbhnddma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/sbhnddma.h 2006-04-06 15:34:14.000000000 +0200 -@@ -0,0 +1,312 @@ -+/* -+ * Generic Broadcom Home Networking Division (HND) DMA engine HW interface -+ * This supports the following chips: BCM42xx, 44xx, 47xx . + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * $Id: time.c,v 1.1.1.10 2006/02/27 03:42:55 honor Exp $ + */ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/kernel.h> ++#include <linux/sched.h> ++#include <linux/serial_reg.h> ++#include <linux/interrupt.h> ++#include <asm/addrspace.h> ++#include <asm/io.h> ++#include <asm/time.h> + -+#ifndef _sbhnddma_h_ -+#define _sbhnddma_h_ ++#include <typedefs.h> ++#include <osl.h> ++#include <bcmnvram.h> ++#include <sbconfig.h> ++#include <sbextif.h> ++#include <sbutils.h> ++#include <hndmips.h> ++#include <mipsinc.h> ++#include <hndcpu.h> + -+ -+/* 2byte-wide pio register set per channel(xmt or rcv) */ -+typedef volatile struct { -+ uint16 fifocontrol; -+ uint16 fifodata; -+ uint16 fifofree; /* only valid in xmt channel, not in rcv channel */ -+ uint16 PAD; -+} pio2regs_t; ++/* Global SB handle */ ++extern void *bcm947xx_sbh; ++extern spinlock_t bcm947xx_sbh_lock; + -+/* a pair of pio channels(tx and rx) */ -+typedef volatile struct { -+ pio2regs_t tx; -+ pio2regs_t rx; -+} pio2regp_t; ++/* Convenience */ ++#define sbh bcm947xx_sbh ++#define sbh_lock bcm947xx_sbh_lock + -+/* 4byte-wide pio register set per channel(xmt or rcv) */ -+typedef volatile struct { -+ uint32 fifocontrol; -+ uint32 fifodata; -+} pio4regs_t; ++extern int panic_timeout; ++static int watchdog = 0; ++static u8 *mcr = NULL; + -+/* a pair of pio channels(tx and rx) */ -+typedef volatile struct { -+ pio4regs_t tx; -+ pio4regs_t rx; -+} pio4regp_t; ++void __init ++bcm947xx_time_init(void) ++{ ++ unsigned int hz; ++ extifregs_t *eir; + ++ /* ++ * Use deterministic values for initial counter interrupt ++ * so that calibrate delay avoids encountering a counter wrap. ++ */ ++ write_c0_count(0); ++ write_c0_compare(0xffff); + ++ if (!(hz = sb_cpu_clock(sbh))) ++ hz = 100000000; + -+/* DMA structure: -+ * support two DMA engines: 32 bits address or 64 bit addressing -+ * basic DMA register set is per channel(transmit or receive) -+ * a pair of channels is defined for convenience -+ */ ++ printk("CPU: BCM%04x rev %d at %d MHz\n", sb_chip(sbh), sb_chiprev(sbh), ++ (hz + 500000) / 1000000); + ++ /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */ ++ mips_hpt_frequency = hz / 2; + -+/*** 32 bits addressing ***/ ++ /* Set watchdog interval in ms */ ++ watchdog = simple_strtoul(nvram_safe_get("watchdog"), NULL, 0); + -+/* dma registers per channel(xmt or rcv) */ -+typedef volatile struct { -+ uint32 control; /* enable, et al */ -+ uint32 addr; /* descriptor ring base address (4K aligned) */ -+ uint32 ptr; /* last descriptor posted to chip */ -+ uint32 status; /* current active descriptor, et al */ -+} dma32regs_t; ++ /* Please set the watchdog to 3 sec if it is less than 3 but not equal to 0 */ ++ if (watchdog > 0) { ++ if (watchdog < 3000) ++ watchdog = 3000; ++ } + -+typedef volatile struct { -+ dma32regs_t xmt; /* dma tx channel */ -+ dma32regs_t rcv; /* dma rx channel */ -+} dma32regp_t; ++ /* Set panic timeout in seconds */ ++ panic_timeout = watchdog / 1000; + -+typedef volatile struct { /* diag access */ -+ uint32 fifoaddr; /* diag address */ -+ uint32 fifodatalow; /* low 32bits of data */ -+ uint32 fifodatahigh; /* high 32bits of data */ -+ uint32 pad; /* reserved */ -+} dma32diag_t; ++ /* Setup blink */ ++ if ((eir = sb_setcore(sbh, SB_EXTIF, 0))) { ++ sbconfig_t *sb = (sbconfig_t *)((unsigned int) eir + SBCONFIGOFF); ++ unsigned long base = EXTIF_CFGIF_BASE(sb_base(readl(&sb->sbadmatch1))); ++ mcr = (u8 *) ioremap_nocache(base + UART_MCR, 1); ++ } ++} ++ ++static void ++bcm947xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) ++{ ++ /* Generic MIPS timer code */ ++ timer_interrupt(irq, dev_id, regs); ++ ++ /* Set the watchdog timer to reset after the specified number of ms */ ++ if (watchdog > 0) ++ sb_watchdog(sbh, WATCHDOG_CLOCK / 1000 * watchdog); ++ ++#ifdef CONFIG_HWSIM ++ (*((int *)0xa0000f1c))++; ++#else ++ /* Blink one of the LEDs in the external UART */ ++ if (mcr && !(jiffies % (HZ/2))) ++ writeb(readb(mcr) ^ UART_MCR_OUT2, mcr); ++#endif ++} ++ ++static struct irqaction bcm947xx_timer_irqaction = { ++ bcm947xx_timer_interrupt, ++ SA_INTERRUPT, ++ 0, ++ "timer", ++ NULL, ++ NULL ++}; ++ ++void __init ++bcm947xx_timer_setup(struct irqaction *irq) ++{ ++ /* Enable the timer interrupt */ ++ setup_irq(7, &bcm947xx_timer_irqaction); ++} +diff -urN linux.old/arch/mips/config-shared.in linux.dev/arch/mips/config-shared.in +--- linux.old/arch/mips/config-shared.in 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/config-shared.in 2006-04-27 19:24:19.000000000 +0200 +@@ -208,6 +208,14 @@ + fi + define_bool CONFIG_MIPS_RTC y + fi ++dep_bool 'Support for Broadcom MIPS-based boards' CONFIG_MIPS_BRCM $CONFIG_EXPERIMENTAL ++dep_bool 'Support for Broadcom BCM947XX' CONFIG_BCM947XX $CONFIG_MIPS_BRCM ++if [ "$CONFIG_BCM947XX" = "y" ] ; then ++ bool ' Support for Broadcom BCM4710' CONFIG_BCM4710 ++ bool ' Support for Broadcom BCM4310' CONFIG_BCM4310 ++ bool ' Support for Broadcom BCM4704' CONFIG_BCM4704 ++ bool ' Support for Broadcom BCM5365' CONFIG_BCM5365 ++fi + bool 'Support for SNI RM200 PCI' CONFIG_SNI_RM200_PCI + bool 'Support for TANBAC TB0226 (Mbase)' CONFIG_TANBAC_TB0226 + bool 'Support for TANBAC TB0229 (VR4131DIMM)' CONFIG_TANBAC_TB0229 +@@ -229,6 +237,11 @@ + define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n + + # ++# Provide an option for a default kernel command line ++# ++string 'Default kernel command string' CONFIG_CMDLINE "" ++ ++# + # Select some configuration options automatically based on user selections. + # + if [ "$CONFIG_ACER_PICA_61" = "y" ]; then +@@ -554,6 +567,13 @@ + define_bool CONFIG_SWAP_IO_SPACE_L y + define_bool CONFIG_BOOT_ELF32 y + fi ++if [ "$CONFIG_BCM947XX" = "y" ] ; then ++ define_bool CONFIG_PCI y ++ define_bool CONFIG_NONCOHERENT_IO y ++ define_bool CONFIG_NEW_TIME_C y ++ define_bool CONFIG_NEW_IRQ y ++ define_bool CONFIG_HND y ++fi + if [ "$CONFIG_SNI_RM200_PCI" = "y" ]; then + define_bool CONFIG_ARC32 y + define_bool CONFIG_ARC_MEMORY y +@@ -1042,7 +1062,11 @@ + + bool 'Are you using a crosscompiler' CONFIG_CROSSCOMPILE + bool 'Enable run-time debugging' CONFIG_RUNTIME_DEBUG +-bool 'Remote GDB kernel debugging' CONFIG_KGDB ++if [ "$CONFIG_BCM947XX" = "y" ] ; then ++ bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG ++else ++ bool 'Remote GDB kernel debugging' CONFIG_KGDB ++fi + dep_bool ' Console output to GDB' CONFIG_GDB_CONSOLE $CONFIG_KGDB + if [ "$CONFIG_KGDB" = "y" ]; then + define_bool CONFIG_DEBUG_INFO y +diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu-probe.c +--- linux.old/arch/mips/kernel/cpu-probe.c 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/kernel/cpu-probe.c 2006-04-27 19:24:19.000000000 +0200 +@@ -162,7 +162,7 @@ + + static inline void cpu_probe_legacy(struct cpuinfo_mips *c) + { +- switch (c->processor_id & 0xff00) { ++ switch (c->processor_id & PRID_IMP_MASK) { + case PRID_IMP_R2000: + c->cputype = CPU_R2000; + c->isa_level = MIPS_CPU_ISA_I; +@@ -172,7 +172,7 @@ + c->tlbsize = 64; + break; + case PRID_IMP_R3000: +- if ((c->processor_id & 0xff) == PRID_REV_R3000A) ++ if ((c->processor_id & PRID_REV_MASK) == PRID_REV_R3000A) + if (cpu_has_confreg()) + c->cputype = CPU_R3081E; + else +@@ -187,12 +187,12 @@ + break; + case PRID_IMP_R4000: + if (read_c0_config() & CONF_SC) { +- if ((c->processor_id & 0xff) >= PRID_REV_R4400) ++ if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_R4400) + c->cputype = CPU_R4400PC; + else + c->cputype = CPU_R4000PC; + } else { +- if ((c->processor_id & 0xff) >= PRID_REV_R4400) ++ if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_R4400) + c->cputype = CPU_R4400SC; + else + c->cputype = CPU_R4000SC; +@@ -438,7 +438,7 @@ + static inline void cpu_probe_mips(struct cpuinfo_mips *c) + { + decode_config1(c); +- switch (c->processor_id & 0xff00) { ++ switch (c->processor_id & PRID_IMP_MASK) { + case PRID_IMP_4KC: + c->cputype = CPU_4KC; + c->isa_level = MIPS_CPU_ISA_M32; +@@ -479,10 +479,10 @@ + { + decode_config1(c); + c->options |= MIPS_CPU_PREFETCH; +- switch (c->processor_id & 0xff00) { ++ switch (c->processor_id & PRID_IMP_MASK) { + case PRID_IMP_AU1_REV1: + case PRID_IMP_AU1_REV2: +- switch ((c->processor_id >> 24) & 0xff) { ++ switch ((c->processor_id >> 24) & PRID_REV_MASK) { + case 0: + c->cputype = CPU_AU1000; + break; +@@ -510,10 +510,34 @@ + } + } + ++static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) ++{ ++ decode_config1(c); ++ c->options |= MIPS_CPU_PREFETCH; ++ switch (c->processor_id & PRID_IMP_MASK) { ++ case PRID_IMP_BCM4710: ++ c->cputype = CPU_BCM4710; ++ c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | ++ MIPS_CPU_4KTLB | MIPS_CPU_COUNTER; ++ c->scache.flags = MIPS_CACHE_NOT_PRESENT; ++ break; ++ case PRID_IMP_4KC: ++ case PRID_IMP_BCM3302: ++ c->cputype = CPU_BCM3302; ++ c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | ++ MIPS_CPU_4KTLB | MIPS_CPU_COUNTER; ++ c->scache.flags = MIPS_CACHE_NOT_PRESENT; ++ break; ++ default: ++ c->cputype = CPU_UNKNOWN; ++ break; ++ } ++} ++ + static inline void cpu_probe_sibyte(struct cpuinfo_mips *c) + { + decode_config1(c); +- switch (c->processor_id & 0xff00) { ++ switch (c->processor_id & PRID_IMP_MASK) { + case PRID_IMP_SB1: + c->cputype = CPU_SB1; + c->isa_level = MIPS_CPU_ISA_M64; +@@ -535,7 +559,7 @@ + static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c) + { + decode_config1(c); +- switch (c->processor_id & 0xff00) { ++ switch (c->processor_id & PRID_IMP_MASK) { + case PRID_IMP_SR71000: + c->cputype = CPU_SR71000; + c->isa_level = MIPS_CPU_ISA_M64; +@@ -560,7 +584,7 @@ + c->cputype = CPU_UNKNOWN; + + c->processor_id = read_c0_prid(); +- switch (c->processor_id & 0xff0000) { ++ switch (c->processor_id & PRID_COMP_MASK) { + + case PRID_COMP_LEGACY: + cpu_probe_legacy(c); +@@ -571,6 +595,9 @@ + case PRID_COMP_ALCHEMY: + cpu_probe_alchemy(c); + break; ++ case PRID_COMP_BROADCOM: ++ cpu_probe_broadcom(c); ++ break; + case PRID_COMP_SIBYTE: + cpu_probe_sibyte(c); + break; +diff -urN linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S +--- linux.old/arch/mips/kernel/head.S 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/kernel/head.S 2006-04-27 19:24:19.000000000 +0200 +@@ -28,12 +28,20 @@ + #include <asm/mipsregs.h> + #include <asm/stackframe.h> + ++#ifdef CONFIG_BCM4710 ++#undef eret ++#define eret nop; nop; eret ++#endif ++ + .text ++ j kernel_entry ++ nop ++ + /* + * Reserved space for exception handlers. + * Necessary for machines which link their kernels at KSEG0. + */ +- .fill 0x400 ++ .fill 0x3f4 + + /* The following two symbols are used for kernel profiling. */ + EXPORT(stext) +diff -urN linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c +--- linux.old/arch/mips/kernel/proc.c 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/kernel/proc.c 2006-04-27 19:24:19.000000000 +0200 +@@ -78,9 +78,10 @@ + [CPU_AU1550] "Au1550", + [CPU_24K] "MIPS 24K", + [CPU_AU1200] "Au1200", ++ [CPU_BCM4710] "BCM4710", ++ [CPU_BCM3302] "BCM3302", + }; + +- + static int show_cpuinfo(struct seq_file *m, void *v) + { + unsigned int version = current_cpu_data.processor_id; +diff -urN linux.old/arch/mips/kernel/setup.c linux.dev/arch/mips/kernel/setup.c +--- linux.old/arch/mips/kernel/setup.c 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/kernel/setup.c 2006-04-27 19:24:19.000000000 +0200 +@@ -493,6 +493,7 @@ + void swarm_setup(void); + void hp_setup(void); + void au1x00_setup(void); ++ void brcm_setup(void); + void frame_info_init(void); + + frame_info_init(); +@@ -691,6 +692,11 @@ + pmc_yosemite_setup(); + break; + #endif ++#if defined(CONFIG_BCM4710) || defined(CONFIG_BCM4310) ++ case MACH_GROUP_BRCM: ++ brcm_setup(); ++ break; ++#endif + default: + panic("Unsupported architecture"); + } +diff -urN linux.old/arch/mips/kernel/traps.c linux.dev/arch/mips/kernel/traps.c +--- linux.old/arch/mips/kernel/traps.c 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/kernel/traps.c 2006-04-27 19:24:19.000000000 +0200 +@@ -920,6 +920,7 @@ + void __init trap_init(void) + { + extern char except_vec1_generic; ++ extern char except_vec2_generic; + extern char except_vec3_generic, except_vec3_r4000; + extern char except_vec_ejtag_debug; + extern char except_vec4; +@@ -927,6 +928,7 @@ + + /* Copy the generic exception handler code to it's final destination. */ + memcpy((void *)(KSEG0 + 0x80), &except_vec1_generic, 0x80); ++ memcpy((void *)(KSEG0 + 0x100), &except_vec2_generic, 0x80); + + /* + * Setup default vectors +@@ -985,6 +987,12 @@ + set_except_vector(13, handle_tr); + set_except_vector(22, handle_mdmx); + ++ if (current_cpu_data.cputype == CPU_SB1) { ++ /* Enable timer interrupt and scd mapped interrupt */ ++ clear_c0_status(0xf000); ++ set_c0_status(0xc00); ++ } ++ + if (cpu_has_fpu && !cpu_has_nofpuex) + set_except_vector(15, handle_fpe); + +diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c +--- linux.old/arch/mips/mm/c-r4k.c 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/mm/c-r4k.c 2006-04-27 19:24:19.000000000 +0200 +@@ -1166,3 +1166,47 @@ + build_clear_page(); + build_copy_page(); + } ++ ++#ifdef CONFIG_BCM4704 ++static void __init mips32_icache_fill(unsigned long addr, uint nbytes) ++{ ++ unsigned long ic_lsize = current_cpu_data.icache.linesz; ++ int i; ++ for (i = 0; i < nbytes; i += ic_lsize) ++ fill_icache_line((addr + i)); ++} + +/* -+ * DMA Descriptor -+ * Descriptors are only read by the hardware, never written back. ++ * This must be run from the cache on 4704A0 ++ * so there are no mips core BIU ops in progress ++ * when the PFC is enabled. + */ -+typedef volatile struct { -+ uint32 ctrl; /* misc control bits & bufcount */ -+ uint32 addr; /* data buffer address */ -+} dma32dd_t; ++#define PFC_CR0 0xff400000 /* control reg 0 */ ++#define PFC_CR1 0xff400004 /* control reg 1 */ ++static void __init enable_pfc(u32 mode) ++{ ++ /* write range */ ++ *(volatile u32 *)PFC_CR1 = 0xffff0000; + -+/* -+ * Each descriptor ring must be 4096byte aligned, and fit within a single 4096byte page. -+ */ -+#define D32MAXRINGSZ 4096 -+#define D32RINGALIGN 4096 -+#define D32MAXDD (D32MAXRINGSZ / sizeof (dma32dd_t)) -+ -+/* transmit channel control */ -+#define XC_XE ((uint32)1 << 0) /* transmit enable */ -+#define XC_SE ((uint32)1 << 1) /* transmit suspend request */ -+#define XC_LE ((uint32)1 << 2) /* loopback enable */ -+#define XC_FL ((uint32)1 << 4) /* flush request */ -+#define XC_AE ((uint32)3 << 16) /* address extension bits */ -+#define XC_AE_SHIFT 16 -+ -+/* transmit descriptor table pointer */ -+#define XP_LD_MASK 0xfff /* last valid descriptor */ -+ -+/* transmit channel status */ -+#define XS_CD_MASK 0x0fff /* current descriptor pointer */ -+#define XS_XS_MASK 0xf000 /* transmit state */ -+#define XS_XS_SHIFT 12 -+#define XS_XS_DISABLED 0x0000 /* disabled */ -+#define XS_XS_ACTIVE 0x1000 /* active */ -+#define XS_XS_IDLE 0x2000 /* idle wait */ -+#define XS_XS_STOPPED 0x3000 /* stopped */ -+#define XS_XS_SUSP 0x4000 /* suspend pending */ -+#define XS_XE_MASK 0xf0000 /* transmit errors */ -+#define XS_XE_SHIFT 16 -+#define XS_XE_NOERR 0x00000 /* no error */ -+#define XS_XE_DPE 0x10000 /* descriptor protocol error */ -+#define XS_XE_DFU 0x20000 /* data fifo underrun */ -+#define XS_XE_BEBR 0x30000 /* bus error on buffer read */ -+#define XS_XE_BEDA 0x40000 /* bus error on descriptor access */ -+#define XS_AD_MASK 0xfff00000 /* active descriptor */ -+#define XS_AD_SHIFT 20 -+ -+/* receive channel control */ -+#define RC_RE ((uint32)1 << 0) /* receive enable */ -+#define RC_RO_MASK 0xfe /* receive frame offset */ -+#define RC_RO_SHIFT 1 -+#define RC_FM ((uint32)1 << 8) /* direct fifo receive (pio) mode */ -+#define RC_AE ((uint32)3 << 16) /* address extension bits */ -+#define RC_AE_SHIFT 16 -+ -+/* receive descriptor table pointer */ -+#define RP_LD_MASK 0xfff /* last valid descriptor */ -+ -+/* receive channel status */ -+#define RS_CD_MASK 0x0fff /* current descriptor pointer */ -+#define RS_RS_MASK 0xf000 /* receive state */ -+#define RS_RS_SHIFT 12 -+#define RS_RS_DISABLED 0x0000 /* disabled */ -+#define RS_RS_ACTIVE 0x1000 /* active */ -+#define RS_RS_IDLE 0x2000 /* idle wait */ -+#define RS_RS_STOPPED 0x3000 /* reserved */ -+#define RS_RE_MASK 0xf0000 /* receive errors */ -+#define RS_RE_SHIFT 16 -+#define RS_RE_NOERR 0x00000 /* no error */ -+#define RS_RE_DPE 0x10000 /* descriptor protocol error */ -+#define RS_RE_DFO 0x20000 /* data fifo overflow */ -+#define RS_RE_BEBW 0x30000 /* bus error on buffer write */ -+#define RS_RE_BEDA 0x40000 /* bus error on descriptor access */ -+#define RS_AD_MASK 0xfff00000 /* active descriptor */ -+#define RS_AD_SHIFT 20 -+ -+/* fifoaddr */ -+#define FA_OFF_MASK 0xffff /* offset */ -+#define FA_SEL_MASK 0xf0000 /* select */ -+#define FA_SEL_SHIFT 16 -+#define FA_SEL_XDD 0x00000 /* transmit dma data */ -+#define FA_SEL_XDP 0x10000 /* transmit dma pointers */ -+#define FA_SEL_RDD 0x40000 /* receive dma data */ -+#define FA_SEL_RDP 0x50000 /* receive dma pointers */ -+#define FA_SEL_XFD 0x80000 /* transmit fifo data */ -+#define FA_SEL_XFP 0x90000 /* transmit fifo pointers */ -+#define FA_SEL_RFD 0xc0000 /* receive fifo data */ -+#define FA_SEL_RFP 0xd0000 /* receive fifo pointers */ -+#define FA_SEL_RSD 0xe0000 /* receive frame status data */ -+#define FA_SEL_RSP 0xf0000 /* receive frame status pointers */ -+ -+/* descriptor control flags */ -+#define CTRL_BC_MASK 0x1fff /* buffer byte count */ -+#define CTRL_AE ((uint32)3 << 16) /* address extension bits */ -+#define CTRL_AE_SHIFT 16 -+#define CTRL_EOT ((uint32)1 << 28) /* end of descriptor table */ -+#define CTRL_IOC ((uint32)1 << 29) /* interrupt on completion */ -+#define CTRL_EOF ((uint32)1 << 30) /* end of frame */ -+#define CTRL_SOF ((uint32)1 << 31) /* start of frame */ -+ -+/* control flags in the range [27:20] are core-specific and not defined here */ -+#define CTRL_CORE_MASK 0x0ff00000 -+ -+/*** 64 bits addressing ***/ -+ -+/* dma registers per channel(xmt or rcv) */ -+typedef volatile struct { -+ uint32 control; /* enable, et al */ -+ uint32 ptr; /* last descriptor posted to chip */ -+ uint32 addrlow; /* descriptor ring base address low 32-bits (8K aligned) */ -+ uint32 addrhigh; /* descriptor ring base address bits 63:32 (8K aligned) */ -+ uint32 status0; /* current descriptor, xmt state */ -+ uint32 status1; /* active descriptor, xmt error */ -+} dma64regs_t; -+ -+typedef volatile struct { -+ dma64regs_t tx; /* dma64 tx channel */ -+ dma64regs_t rx; /* dma64 rx channel */ -+} dma64regp_t; -+ -+typedef volatile struct { /* diag access */ -+ uint32 fifoaddr; /* diag address */ -+ uint32 fifodatalow; /* low 32bits of data */ -+ uint32 fifodatahigh; /* high 32bits of data */ -+ uint32 pad; /* reserved */ -+} dma64diag_t; -+ -+/* -+ * DMA Descriptor -+ * Descriptors are only read by the hardware, never written back. -+ */ -+typedef volatile struct { -+ uint32 ctrl1; /* misc control bits & bufcount */ -+ uint32 ctrl2; /* buffer count and address extension */ -+ uint32 addrlow; /* memory address of the first byte of the date buffer, bits 31:0 */ -+ uint32 addrhigh; /* memory address of the first byte of the date buffer, bits 63:32 */ -+} dma64dd_t; -+ -+/* -+ * Each descriptor ring must be 8kB aligned, and fit within a contiguous 8kB physical addresss. -+ */ -+#define D64MAXRINGSZ 8192 -+#define D64RINGALIGN 8192 -+#define D64MAXDD (D64MAXRINGSZ / sizeof (dma64dd_t)) -+ -+/* transmit channel control */ -+#define D64_XC_XE 0x00000001 /* transmit enable */ -+#define D64_XC_SE 0x00000002 /* transmit suspend request */ -+#define D64_XC_LE 0x00000004 /* loopback enable */ -+#define D64_XC_FL 0x00000010 /* flush request */ -+#define D64_XC_AE 0x00110000 /* address extension bits */ -+#define D64_XC_AE_SHIFT 16 -+ -+/* transmit descriptor table pointer */ -+#define D64_XP_LD_MASK 0x00000fff /* last valid descriptor */ -+ -+/* transmit channel status */ -+#define D64_XS0_CD_MASK 0x00001fff /* current descriptor pointer */ -+#define D64_XS0_XS_MASK 0xf0000000 /* transmit state */ -+#define D64_XS0_XS_SHIFT 28 -+#define D64_XS0_XS_DISABLED 0x00000000 /* disabled */ -+#define D64_XS0_XS_ACTIVE 0x10000000 /* active */ -+#define D64_XS0_XS_IDLE 0x20000000 /* idle wait */ -+#define D64_XS0_XS_STOPPED 0x30000000 /* stopped */ -+#define D64_XS0_XS_SUSP 0x40000000 /* suspend pending */ -+ -+#define D64_XS1_AD_MASK 0x0001ffff /* active descriptor */ -+#define D64_XS1_XE_MASK 0xf0000000 /* transmit errors */ -+#define D64_XS1_XE_SHIFT 28 -+#define D64_XS1_XE_NOERR 0x00000000 /* no error */ -+#define D64_XS1_XE_DPE 0x10000000 /* descriptor protocol error */ -+#define D64_XS1_XE_DFU 0x20000000 /* data fifo underrun */ -+#define D64_XS1_XE_DTE 0x30000000 /* data transfer error */ -+#define D64_XS1_XE_DESRE 0x40000000 /* descriptor read error */ -+#define D64_XS1_XE_COREE 0x50000000 /* core error */ -+ -+/* receive channel control */ -+#define D64_RC_RE 0x00000001 /* receive enable */ -+#define D64_RC_RO_MASK 0x000000fe /* receive frame offset */ -+#define D64_RC_RO_SHIFT 1 -+#define D64_RC_FM 0x00000100 /* direct fifo receive (pio) mode */ -+#define D64_RC_AE 0x00110000 /* address extension bits */ -+#define D64_RC_AE_SHIFT 16 -+ -+/* receive descriptor table pointer */ -+#define D64_RP_LD_MASK 0x00000fff /* last valid descriptor */ -+ -+/* receive channel status */ -+#define D64_RS0_CD_MASK 0x00001fff /* current descriptor pointer */ -+#define D64_RS0_RS_MASK 0xf0000000 /* receive state */ -+#define D64_RS0_RS_SHIFT 28 -+#define D64_RS0_RS_DISABLED 0x00000000 /* disabled */ -+#define D64_RS0_RS_ACTIVE 0x10000000 /* active */ -+#define D64_RS0_RS_IDLE 0x20000000 /* idle wait */ -+#define D64_RS0_RS_STOPPED 0x30000000 /* stopped */ -+#define D64_RS0_RS_SUSP 0x40000000 /* suspend pending */ -+ -+#define D64_RS1_AD_MASK 0x0001ffff /* active descriptor */ -+#define D64_RS1_RE_MASK 0xf0000000 /* receive errors */ -+#define D64_RS1_RE_SHIFT 28 -+#define D64_RS1_RE_NOERR 0x00000000 /* no error */ -+#define D64_RS1_RE_DPO 0x10000000 /* descriptor protocol error */ -+#define D64_RS1_RE_DFU 0x20000000 /* data fifo overflow */ -+#define D64_RS1_RE_DTE 0x30000000 /* data transfer error */ -+#define D64_RS1_RE_DESRE 0x40000000 /* descriptor read error */ -+#define D64_RS1_RE_COREE 0x50000000 /* core error */ -+ -+/* fifoaddr */ -+#define D64_FA_OFF_MASK 0xffff /* offset */ -+#define D64_FA_SEL_MASK 0xf0000 /* select */ -+#define D64_FA_SEL_SHIFT 16 -+#define D64_FA_SEL_XDD 0x00000 /* transmit dma data */ -+#define D64_FA_SEL_XDP 0x10000 /* transmit dma pointers */ -+#define D64_FA_SEL_RDD 0x40000 /* receive dma data */ -+#define D64_FA_SEL_RDP 0x50000 /* receive dma pointers */ -+#define D64_FA_SEL_XFD 0x80000 /* transmit fifo data */ -+#define D64_FA_SEL_XFP 0x90000 /* transmit fifo pointers */ -+#define D64_FA_SEL_RFD 0xc0000 /* receive fifo data */ -+#define D64_FA_SEL_RFP 0xd0000 /* receive fifo pointers */ -+#define D64_FA_SEL_RSD 0xe0000 /* receive frame status data */ -+#define D64_FA_SEL_RSP 0xf0000 /* receive frame status pointers */ -+ -+/* descriptor control flags 1 */ -+#define D64_CTRL1_EOT ((uint32)1 << 28) /* end of descriptor table */ -+#define D64_CTRL1_IOC ((uint32)1 << 29) /* interrupt on completion */ -+#define D64_CTRL1_EOF ((uint32)1 << 30) /* end of frame */ -+#define D64_CTRL1_SOF ((uint32)1 << 31) /* start of frame */ -+ -+/* descriptor control flags 2 */ -+#define D64_CTRL2_BC_MASK 0x00007fff /* buffer byte count mask */ -+#define D64_CTRL2_AE 0x00110000 /* address extension bits */ -+#define D64_CTRL2_AE_SHIFT 16 -+ -+/* control flags in the range [27:20] are core-specific and not defined here */ -+#define D64_CTRL_CORE_MASK 0x0ff00000 ++ /* enable */ ++ *(volatile u32 *)PFC_CR0 = mode; ++} ++#endif + + -+#endif /* _sbhnddma_h_ */ -diff -Naur linux.old/drivers/net/wl2/Makefile linux.dev/drivers/net/wl2/Makefile ---- linux.old/drivers/net/wl2/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl2/Makefile 2006-04-06 16:56:27.000000000 +0200 -@@ -0,0 +1,23 @@ ++void check_enable_mips_pfc(int val) ++{ ++ ++#ifdef CONFIG_BCM4704 ++ struct cpuinfo_mips *c = ¤t_cpu_data; ++ ++ /* enable prefetch cache */ ++ if (((c->processor_id & (PRID_COMP_MASK | PRID_IMP_MASK)) == PRID_IMP_BCM3302) ++ && (read_c0_diag() & (1 << 29))) { ++ mips32_icache_fill((unsigned long) &enable_pfc, 64); ++ enable_pfc(val); ++ } ++#endif ++} ++ ++ +diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile +--- linux.old/arch/mips/pci/Makefile 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/arch/mips/pci/Makefile 2006-04-27 19:24:19.000000000 +0200 +@@ -13,7 +13,9 @@ + obj-$(CONFIG_MIPS_MSC) += ops-msc.o + obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o + obj-$(CONFIG_SNI_RM200_PCI) += ops-sni.o ++ifndef CONFIG_BCM947XX + obj-y += pci.o ++endif + obj-$(CONFIG_PCI_AUTO) += pci_auto.o + + include $(TOPDIR)/Rules.make +diff -urN linux.old/drivers/char/serial.c linux.dev/drivers/char/serial.c +--- linux.old/drivers/char/serial.c 2006-04-27 18:04:37.000000000 +0200 ++++ linux.dev/drivers/char/serial.c 2006-04-27 19:24:19.000000000 +0200 +@@ -444,6 +444,10 @@ + return inb(info->port+1); + #endif + case SERIAL_IO_MEM: ++#ifdef CONFIG_BCM4310 ++ readb((unsigned long) info->iomem_base + ++ (UART_SCR<<info->iomem_reg_shift)); ++#endif + return readb((unsigned long) info->iomem_base + + (offset<<info->iomem_reg_shift)); + default: +@@ -464,6 +468,9 @@ + case SERIAL_IO_MEM: + writeb(value, (unsigned long) info->iomem_base + + (offset<<info->iomem_reg_shift)); ++#ifdef CONFIG_BCM4704 ++ *((volatile unsigned int *) KSEG1ADDR(0x18000000)); ++#endif + break; + default: + outb(value, info->port+offset); +@@ -1728,7 +1735,7 @@ + /* Special case since 134 is really 134.5 */ + quot = (2*baud_base / 269); + else if (baud) +- quot = baud_base / baud; ++ quot = (baud_base + (baud / 2)) / baud; + } + /* If the quotient is zero refuse the change */ + if (!quot && old_termios) { +@@ -1745,12 +1752,12 @@ + /* Special case since 134 is really 134.5 */ + quot = (2*baud_base / 269); + else if (baud) +- quot = baud_base / baud; ++ quot = (baud_base + (baud / 2)) / baud; + } + } + /* As a last resort, if the quotient is zero, default to 9600 bps */ + if (!quot) +- quot = baud_base / 9600; ++ quot = (baud_base + 4800) / 9600; + /* + * Work around a bug in the Oxford Semiconductor 952 rev B + * chip which causes it to seriously miscalculate baud rates +@@ -5994,6 +6001,13 @@ + * Divisor, bytesize and parity + */ + state = rs_table + co->index; ++ /* ++ * Safe guard: state structure must have been initialized ++ */ ++ if (state->iomem_base == NULL) { ++ printk("!unable to setup serial console!\n"); ++ return -1; ++ } + if (doflow) + state->flags |= ASYNC_CONS_FLOW; + info = &async_sercons; +@@ -6007,7 +6021,7 @@ + info->io_type = state->io_type; + info->iomem_base = state->iomem_base; + info->iomem_reg_shift = state->iomem_reg_shift; +- quot = state->baud_base / baud; ++ quot = (state->baud_base + (baud / 2)) / baud; + cval = cflag & (CSIZE | CSTOPB); + #if defined(__powerpc__) || defined(__alpha__) + cval >>= 8; +diff -urN linux.old/drivers/net/Config.in linux.dev/drivers/net/Config.in +--- linux.old/drivers/net/Config.in 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/drivers/net/Config.in 2006-04-27 19:24:19.000000000 +0200 +@@ -2,6 +2,8 @@ + # Network device configuration + # + ++tristate 'Broadcom Home Network Division' CONFIG_HND $CONFIG_PCI ++ + source drivers/net/arcnet/Config.in + + tristate 'Dummy net driver support' CONFIG_DUMMY +diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile +--- linux.old/drivers/net/Makefile 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/drivers/net/Makefile 2006-05-04 01:41:03.000000000 +0200 +@@ -3,6 +3,8 @@ + # Makefile for the Linux network (ethercard) device drivers. + # + ++EXTRA_CFLAGS := -I$(TOPDIR)/arch/mips/bcm947xx/include ++ + obj-y := + obj-m := + obj-n := +@@ -39,6 +41,7 @@ + obj-$(CONFIG_ISDN) += slhc.o + endif + ++subdir-$(CONFIG_WL) += wl + subdir-$(CONFIG_NET_PCMCIA) += pcmcia + subdir-$(CONFIG_NET_WIRELESS) += wireless + subdir-$(CONFIG_TULIP) += tulip +diff -urN linux.old/drivers/net/wireless/Config.in linux.dev/drivers/net/wireless/Config.in +--- linux.old/drivers/net/wireless/Config.in 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/drivers/net/wireless/Config.in 2006-05-04 01:42:48.000000000 +0200 +@@ -13,6 +13,7 @@ + fi + + if [ "$CONFIG_PCI" = "y" ]; then ++ dep_tristate ' Proprietary Broadcom BCM43xx 802.11 Wireless support' CONFIG_WL + dep_tristate ' Hermes in PLX9052 based PCI adaptor support (Netgear MA301 etc.) (EXPERIMENTAL)' CONFIG_PLX_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL + dep_tristate ' Hermes in TMD7160/NCP130 based PCI adaptor support (Pheecom WL-PCI etc.) (EXPERIMENTAL)' CONFIG_TMD_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL + dep_tristate ' Prism 2.5 PCI 802.11b adaptor support (EXPERIMENTAL)' CONFIG_PCI_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL +diff -urN linux.old/drivers/net/wl/patchtable.pl linux.dev/drivers/net/wl/patchtable.pl +--- linux.old/drivers/net/wl/patchtable.pl 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/patchtable.pl 2006-04-28 01:33:52.000000000 +0200 +@@ -0,0 +1,54 @@ ++#!/usr/bin/perl ++use strict; ++ ++my $TABLE = pack("V", 0xbadc0ded); ++my $TABLE_SIZE = 512; ++my $SLT1 = "\x01\x00\x00\x00"; ++my $SLT2 = "\x02\x00\x00\x00"; ++my $ACKW = "\x03\x00\x00\x00"; ++my $PTABLE_END = "\xff\xff\xff\xff"; ++ ++my $addr = ""; ++my $opcode = ""; ++my $function = ""; ++ ++sub add_entry { ++ my $key = shift; ++ my $value = shift; ++ my $default = shift; ++ ++ $TABLE .= $key; ++ $TABLE .= pack("V", $value); ++ $TABLE .= pack("V", $default); ++} ++ ++while (<>) { ++ $addr = $opcode = ""; ++ /^\w{8}\s*<(.*)>:$/ and $function = $1; ++ /^\s*(\w+):\s*(\w{8})\s*/ and do { ++ $addr = $1; ++ $opcode = $2; ++ }; ++ ++ ($function eq 'wlc_update_slot_timing') and do { ++ # li a2,9 -- short slot time ++ ($opcode eq '24060009') and add_entry($SLT1, hex($addr), hex($opcode)); ++ # li v0,519 -- 510 + short slot time ++ ($opcode eq '24020207') and add_entry($SLT2, hex($addr), hex($opcode)); ++ ++ # li a2,20 -- long slot time ++ ($opcode eq '24060014') and add_entry($SLT1, hex($addr), hex($opcode)); ++ # li v0,530 -- 510 + long slot time ++ ($opcode eq '24020212') and add_entry($SLT2, hex($addr), hex($opcode)); ++ }; ++ ($function eq 'wlc_d11hdrs') and do { ++ # ori s6,s6,0x1 -- ack flag (new) ++ ($opcode eq '36d60001') and add_entry($ACKW, hex($addr), hex($opcode)); ++ # ori s3,s3,0x1 -- ack flag (old) ++ ($opcode eq '36730001') and add_entry($ACKW, hex($addr), hex($opcode)); ++ } ++} ++ ++$TABLE .= $PTABLE_END; ++$TABLE .= ("\x00" x ($TABLE_SIZE - length($TABLE))); ++print $TABLE; +diff -urN linux.old/drivers/net/wl/Makefile linux.dev/drivers/net/wl/Makefile +--- linux.old/drivers/net/wl/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/Makefile 2006-04-28 01:33:52.000000000 +0200 +@@ -0,0 +1,32 @@ +# +# Makefile for the Broadcom wl driver +# @@ -17856,46 +16400,179 @@ diff -Naur linux.old/drivers/net/wl2/Makefile linux.dev/drivers/net/wl2/Makefile + +EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER + -+O_TARGET := wl.o ++O_TARGET := wl_link.o + -+obj-y := wl_apsta.o -+obj-y += compat.o hnddma.o ++obj-y := wl_mod.o ++obj-y += bcmutils.o hnddma.o linux_osl.o + +obj-m := $(O_TARGET) + ++wl_mod.o: wl_apsta.o ++ sed -e 's,eth%d,wl%d\x00,g' < $< > $@ ++ ++wl.o: wl_link.o ++ $(OBJDUMP) -d $< | perl patchtable.pl > patchtable.bin ++ cat wl_link.o patchtable.bin > $@ ++ ++modules: wl.o ++ +include $(TOPDIR)/Rules.make -diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c ---- linux.old/drivers/net/wl2/compat.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl2/compat.c 2006-04-06 17:08:21.000000000 +0200 -@@ -0,0 +1,376 @@ +diff -urN linux.old/drivers/net/wl/bcmip.h linux.dev/drivers/net/wl/bcmip.h +--- linux.old/drivers/net/wl/bcmip.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/bcmip.h 2006-04-28 02:11:28.000000000 +0200 +@@ -0,0 +1,101 @@ ++/* ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * Fundamental constants relating to IP Protocol ++ * ++ * $Id: bcmip.h,v 1.1.1.3 2006/02/27 03:43:16 honor Exp $ ++ */ ++ ++#ifndef _bcmip_h_ ++#define _bcmip_h_ ++ ++/* IPV4 and IPV6 common */ ++#define IP_VER_OFFSET 0x0 /* offset to version field */ ++#define IP_VER_MASK 0xf0 /* version mask */ ++#define IP_VER_SHIFT 4 /* version shift */ ++#define IP_VER_4 4 /* version number for IPV4 */ ++#define IP_VER_6 6 /* version number for IPV6 */ ++ ++#define IP_VER(ip_body) \ ++ ((((uint8 *)(ip_body))[IP_VER_OFFSET] & IP_VER_MASK) >> IP_VER_SHIFT) ++ ++#define IP_PROT_ICMP 0x1 /* ICMP protocol */ ++#define IP_PROT_TCP 0x6 /* TCP protocol */ ++#define IP_PROT_UDP 0x11 /* UDP protocol type */ ++ ++/* IPV4 field offsets */ ++#define IPV4_VER_HL_OFFSET 0 /* version and ihl byte offset */ ++#define IPV4_TOS_OFFSET 1 /* type of service offset */ ++#define IPV4_PROT_OFFSET 9 /* protocol type offset */ ++#define IPV4_CHKSUM_OFFSET 10 /* IP header checksum offset */ ++#define IPV4_SRC_IP_OFFSET 12 /* src IP addr offset */ ++#define IPV4_DEST_IP_OFFSET 16 /* dest IP addr offset */ ++ ++/* IPV4 field decodes */ ++#define IPV4_VER_MASK 0xf0 /* IPV4 version mask */ ++#define IPV4_VER_SHIFT 4 /* IPV4 version shift */ ++ ++#define IPV4_HLEN_MASK 0x0f /* IPV4 header length mask */ ++#define IPV4_HLEN(ipv4_body) (4 * (((uint8 *)(ipv4_body))[IPV4_VER_HL_OFFSET] & IPV4_HLEN_MASK)) ++ ++#define IPV4_ADDR_LEN 4 /* IPV4 address length */ ++ ++#define IPV4_ADDR_NULL(a) ((((uint8 *)(a))[0] | ((uint8 *)(a))[1] | \ ++ ((uint8 *)(a))[2] | ((uint8 *)(a))[3]) == 0) ++ ++#define IPV4_TOS_DSCP_MASK 0xfc /* DiffServ codepoint mask */ ++#define IPV4_TOS_DSCP_SHIFT 2 /* DiffServ codepoint shift */ ++ ++#define IPV4_TOS(ipv4_body) (((uint8 *)(ipv4_body))[IPV4_TOS_OFFSET]) ++ ++#define IPV4_TOS_PREC_MASK 0xe0 /* Historical precedence mask */ ++#define IPV4_TOS_PREC_SHIFT 5 /* Historical precedence shift */ ++ ++#define IPV4_TOS_LOWDELAY 0x10 /* Lowest delay requested */ ++#define IPV4_TOS_THROUGHPUT 0x8 /* Best throughput requested */ ++#define IPV4_TOS_RELIABILITY 0x4 /* Most reliable delivery requested */ ++ ++#define IPV4_PROT(ipv4_body) (((uint8 *)(ipv4_body))[IPV4_PROT_OFFSET]) ++ ++#define IPV4_ADDR_STR_LEN 16 /* Max IP address length in string format */ ++ ++/* IPV6 field offsets */ ++#define IPV6_PAYLOAD_LEN_OFFSET 4 /* payload length offset */ ++#define IPV6_NEXT_HDR_OFFSET 6 /* next header/protocol offset */ ++#define IPV6_HOP_LIMIT_OFFSET 7 /* hop limit offset */ ++#define IPV6_SRC_IP_OFFSET 8 /* src IP addr offset */ ++#define IPV6_DEST_IP_OFFSET 24 /* dst IP addr offset */ ++ ++/* IPV6 field decodes */ ++#define IPV6_TRAFFIC_CLASS(ipv6_body) \ ++ (((((uint8 *)(ipv6_body))[0] & 0x0f) << 4) | \ ++ ((((uint8 *)(ipv6_body))[1] & 0xf0) >> 4)) ++ ++#define IPV6_FLOW_LABEL(ipv6_body) \ ++ (((((uint8 *)(ipv6_body))[1] & 0x0f) << 16) | \ ++ (((uint8 *)(ipv6_body))[2] << 8) | \ ++ (((uint8 *)(ipv6_body))[3])) ++ ++#define IPV6_PAYLOAD_LEN(ipv6_body) \ ++ ((((uint8 *)(ipv6_body))[IPV6_PAYLOAD_LEN_OFFSET + 0] << 8) | \ ++ ((uint8 *)(ipv6_body))[IPV6_PAYLOAD_LEN_OFFSET + 1]) ++ ++#define IPV6_NEXT_HDR(ipv6_body) \ ++ (((uint8 *)(ipv6_body))[IPV6_NEXT_HDR_OFFSET]) ++ ++#define IPV6_PROT(ipv6_body) IPV6_NEXT_HDR(ipv6_body) ++ ++#define IPV6_ADDR_LEN 16 /* IPV6 address length */ ++ ++/* IPV4 TOS or IPV6 Traffic Classifier or 0 */ ++#define IP_TOS(ip_body) \ ++ (IP_VER(ip_body) == IP_VER_4 ? IPV4_TOS(ip_body) : \ ++ IP_VER(ip_body) == IP_VER_6 ? IPV6_TRAFFIC_CLASS(ip_body) : 0) ++ ++#endif /* _bcmip_h_ */ +diff -urN linux.old/drivers/net/wl/bcmutils.c linux.dev/drivers/net/wl/bcmutils.c +--- linux.old/drivers/net/wl/bcmutils.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/bcmutils.c 2006-04-28 02:27:20.000000000 +0200 +@@ -0,0 +1,857 @@ +/* + * Misc useful OS-independent routines. + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * $Id: bcmutils.c,v 1.1.1.12 2006/02/27 03:43:16 honor Exp $ + */ + +#include <typedefs.h> -+#ifdef BCMDRIVER ++#include <bcmdefs.h> ++#include <stdarg.h> +#include <osl.h> -+#include <sbutils.h> -+#include <bcmnvram.h> -+#else -+#include <stdio.h> -+#include <string.h> -+#endif ++#include "linux_osl.h" +#include "pktq.h" +#include <bcmutils.h> ++#include <sbutils.h> ++#include <bcmnvram.h> +#include <bcmendian.h> +#include <bcmdevs.h> ++#include "bcmip.h" ++ ++#define ETHER_TYPE_8021Q 0x8100 ++#define ETHER_TYPE_IP 0x0800 ++#define VLAN_PRI_SHIFT 13 ++#define VLAN_PRI_MASK 7 ++ ++ ++struct ether_header { ++ uint8 ether_dhost[6]; ++ uint8 ether_shost[6]; ++ uint16 ether_type; ++} __attribute__((packed)); ++ ++ ++struct ethervlan_header { ++ uint8 ether_dhost[6]; ++ uint8 ether_shost[6]; ++ uint16 vlan_type; /* 0x8100 */ ++ uint16 vlan_tag; /* priority, cfi and vid */ ++ uint16 ether_type; ++}; + -+#ifdef BCMDRIVER +/* copy a pkt buffer chain into a buffer */ +uint +pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf) @@ -17940,11 +16617,21 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + return (total); +} + ++/* return the last buffer of chained pkt */ ++void * ++pktlast(osl_t *osh, void *p) ++{ ++ for (; PKTNEXT(osh, p); p = PKTNEXT(osh, p)) ++ ; ++ ++ return (p); ++} ++ ++ +/* + * osl multiple-precedence packet queue + * hi_prec is always >= the number of the highest non-empty queue + */ -+ +void * +pktq_penq(struct pktq *pq, int prec, void *p) +{ @@ -17966,11 +16653,11 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + q->tail = p; + q->len++; + ++ pq->len++; ++ + if (pq->hi_prec < prec) + pq->hi_prec = (uint8)prec; + -+ pq->len++; -+ + return p; +} + @@ -17987,19 +16674,18 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + + q = &pq->q[prec]; + -+ if (q->head) -+ PKTSETLINK(p, q->head); -+ else ++ if (q->head == NULL) + q->tail = p; + ++ PKTSETLINK(p, q->head); + q->head = p; + q->len++; + ++ pq->len++; ++ + if (pq->hi_prec < prec) + pq->hi_prec = (uint8)prec; + -+ pq->len++; -+ + return p; +} + @@ -18058,17 +16744,70 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c +} + +void -+pktq_init(struct pktq *pq, int num_prec, int max) ++pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir) ++{ ++ struct pktq_prec *q; ++ void *p; ++ ++ q = &pq->q[prec]; ++ p = q->head; ++ while (p) { ++ q->head = PKTLINK(p); ++ PKTSETLINK(p, NULL); ++ PKTFREE(osh, p, dir); ++ q->len--; ++ pq->len--; ++ p = q->head; ++ } ++ ASSERT(q->len == 0); ++ q->tail = NULL; ++} ++ ++bool ++pktq_pdel(struct pktq *pq, void *pktbuf, int prec) ++{ ++ struct pktq_prec *q; ++ void *p; ++ ++ ASSERT(prec >= 0 && prec < pq->num_prec); ++ ++ if (!pktbuf) ++ return FALSE; ++ ++ q = &pq->q[prec]; ++ ++ if (q->head == pktbuf) { ++ if ((q->head = PKTLINK(pktbuf)) == NULL) ++ q->tail = NULL; ++ } else { ++ for (p = q->head; p && PKTLINK(p) != pktbuf; p = PKTLINK(p)) ++ ; ++ if (p == NULL) ++ return FALSE; ++ ++ PKTSETLINK(p, PKTLINK(pktbuf)); ++ if (q->tail == pktbuf) ++ q->tail = p; ++ } ++ ++ q->len--; ++ pq->len--; ++ PKTSETLINK(pktbuf, NULL); ++ return TRUE; ++} ++ ++void ++pktq_init(struct pktq *pq, int num_prec, int max_len) +{ + int prec; + -+ ASSERT(num_prec >= 0 && num_prec <= PKTQ_MAX_PREC); ++ ASSERT(num_prec > 0 && num_prec <= PKTQ_MAX_PREC); + -+ bzero(pq, sizeof (*pq)); ++ bzero(pq, sizeof(*pq)); + + pq->num_prec = (uint16)num_prec; + -+ pq->max = (uint16)max; ++ pq->max = (uint16)max_len; + + for (prec = 0; prec < num_prec; prec++) + pq->q[prec].max = pq->max; @@ -18097,11 +16836,11 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + + q->len--; + ++ pq->len--; ++ + if (prec_out) + *prec_out = prec; + -+ pq->len--; -+ + PKTSETLINK(p, NULL); + + return p; @@ -18137,11 +16876,11 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + q->tail = prev; + q->len--; + ++ pq->len--; ++ + if (prec_out) + *prec_out = prec; + -+ pq->len--; -+ + PKTSETLINK(p, NULL); + + return p; @@ -18150,7 +16889,6 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c +void * +pktq_peek(struct pktq *pq, int *prec_out) +{ -+ void *p; + int prec; + + if (pq->len == 0) @@ -18159,19 +16897,15 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + while ((prec = pq->hi_prec) > 0 && pq->q[prec].head == NULL) + pq->hi_prec--; + -+ if ((p = pq->q[prec].head) == NULL) -+ return NULL; -+ + if (prec_out) + *prec_out = prec; + -+ return p; ++ return (pq->q[prec].head); +} + +void * +pktq_peek_tail(struct pktq *pq, int *prec_out) +{ -+ void *p; + int prec; + + if (pq->len == 0) @@ -18181,15 +16915,22 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + if (pq->q[prec].head) + break; + -+ if ((p = pq->q[prec].tail) == NULL) -+ return NULL; -+ + if (prec_out) + *prec_out = prec; + -+ return p; ++ return (pq->q[prec].tail); +} + ++void ++pktq_flush(osl_t *osh, struct pktq *pq, bool dir) ++{ ++ int prec; ++ for (prec = 0; prec < pq->num_prec; prec++) ++ pktq_pflush(osh, pq, prec, dir); ++ ASSERT(pq->len == 0); ++} ++ ++/* Return sum of lengths of a specific set of precedences */ +int +pktq_mlen(struct pktq *pq, uint prec_bmp) +{ @@ -18204,6 +16945,7 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + return len; +} + ++/* Priority dequeue from a specific set of precedences */ +void * +pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out) +{ @@ -18241,18 +16983,415 @@ diff -Naur linux.old/drivers/net/wl2/compat.c linux.dev/drivers/net/wl2/compat.c + return p; +} + -+#endif ++char* ++bcmstrcat(char *dest, const char *src) ++{ ++ strcpy(&dest[strlen(dest)], src); ++ return (dest); ++} ++ ++char* ++bcm_ether_ntoa(struct ether_addr *ea, char *buf) ++{ ++ sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", ++ ea->octet[0]&0xff, ea->octet[1]&0xff, ea->octet[2]&0xff, ++ ea->octet[3]&0xff, ea->octet[4]&0xff, ea->octet[5]&0xff); ++ return (buf); ++} ++ ++/* parse a xx:xx:xx:xx:xx:xx format ethernet address */ ++int ++bcm_ether_atoe(char *p, struct ether_addr *ea) ++{ ++ int i = 0; ++ ++ for (;;) { ++ ea->octet[i++] = (char) bcm_strtoul(p, &p, 16); ++ if (!*p++ || i == 6) ++ break; ++ } ++ ++ return (i == 6); ++} ++ ++/* Takes an Ethernet frame and sets out-of-bound PKTPRIO ++ * Also updates the inplace vlan tag if requested ++ */ ++void ++pktsetprio(void *pkt, bool update_vtag) ++{ ++ struct ether_header *eh; ++ struct ethervlan_header *evh; ++ uint8 *pktdata; ++ int priority = 0; ++ ++ pktdata = (uint8 *) PKTDATA(NULL, pkt); ++ ASSERT(ISALIGNED((uintptr)pktdata, sizeof(uint16))); ++ ++ eh = (struct ether_header *) pktdata; ++ ++ if (ntoh16(eh->ether_type) == ETHER_TYPE_8021Q) { ++ uint16 vlan_tag; ++ int vlan_prio, dscp_prio = 0; ++ ++ evh = (struct ethervlan_header *)eh; ++ ++ vlan_tag = ntoh16(evh->vlan_tag); ++ vlan_prio = (int) (vlan_tag >> VLAN_PRI_SHIFT) & VLAN_PRI_MASK; ++ ++ if (ntoh16(evh->ether_type) == ETHER_TYPE_IP) { ++ uint8 *ip_body = pktdata + sizeof(struct ethervlan_header); ++ uint8 tos_tc = IP_TOS(ip_body); ++ dscp_prio = (int)(tos_tc >> IPV4_TOS_PREC_SHIFT); ++ } ++ ++ /* DSCP priority gets precedence over 802.1P (vlan tag) */ ++ priority = (dscp_prio != 0) ? dscp_prio : vlan_prio; ++ ++ /* ++ * If the DSCP priority is not the same as the VLAN priority, ++ * then overwrite the priority field in the vlan tag, with the ++ * DSCP priority value. This is required for Linux APs because ++ * the VLAN driver on Linux, overwrites the skb->priority field ++ * with the priority value in the vlan tag ++ */ ++ if (update_vtag && (priority != vlan_prio)) { ++ vlan_tag &= ~(VLAN_PRI_MASK << VLAN_PRI_SHIFT); ++ vlan_tag |= (uint16)priority << VLAN_PRI_SHIFT; ++ evh->vlan_tag = hton16(vlan_tag); ++ } ++ } else if (ntoh16(eh->ether_type) == ETHER_TYPE_IP) { ++ uint8 *ip_body = pktdata + sizeof(struct ether_header); ++ uint8 tos_tc = IP_TOS(ip_body); ++ priority = (int)(tos_tc >> IPV4_TOS_PREC_SHIFT); ++ } ++ ++ ASSERT(priority >= 0 && priority <= MAXPRIO); ++ PKTSETPRIO(pkt, priority); ++} ++ ++static char bcm_undeferrstr[BCME_STRLEN]; ++ ++static const char *bcmerrorstrtable[] = BCMERRSTRINGTABLE; ++ ++/* Convert the Error codes into related Error strings */ ++const char * ++bcmerrorstr(int bcmerror) ++{ ++ int abs_bcmerror; ++ ++ abs_bcmerror = ABS(bcmerror); ++ ++ /* check if someone added a bcmerror code but forgot to add errorstring */ ++ ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(bcmerrorstrtable) - 1)); ++ if ((bcmerror > 0) || (abs_bcmerror > ABS(BCME_LAST))) { ++ sprintf(bcm_undeferrstr, "undefined Error %d", bcmerror); ++ return bcm_undeferrstr; ++ } ++ ++ ASSERT((strlen((char*)bcmerrorstrtable[abs_bcmerror])) < BCME_STRLEN); ++ ++ return bcmerrorstrtable[abs_bcmerror]; ++} + + -diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c ---- linux.old/drivers/net/wl2/hnddma.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl2/hnddma.c 2006-04-06 16:32:33.000000000 +0200 -@@ -0,0 +1,1487 @@ ++int ++bcm_iovar_lencheck(const bcm_iovar_t *vi, void *arg, int len, bool set) ++{ ++ int bcmerror = 0; ++ ++ /* length check on io buf */ ++ switch (vi->type) { ++ case IOVT_BOOL: ++ case IOVT_INT8: ++ case IOVT_INT16: ++ case IOVT_INT32: ++ case IOVT_UINT8: ++ case IOVT_UINT16: ++ case IOVT_UINT32: ++ /* all integers are int32 sized args at the ioctl interface */ ++ if (len < (int)sizeof(int)) { ++ bcmerror = BCME_BUFTOOSHORT; ++ } ++ break; ++ ++ case IOVT_BUFFER: ++ /* buffer must meet minimum length requirement */ ++ if (len < vi->minlen) { ++ bcmerror = BCME_BUFTOOSHORT; ++ } ++ break; ++ ++ case IOVT_VOID: ++ if (!set) { ++ /* Cannot return nil... */ ++ bcmerror = BCME_UNSUPPORTED; ++ } else if (len) { ++ /* Set is an action w/o parameters */ ++ bcmerror = BCME_BUFTOOLONG; ++ } ++ break; ++ ++ default: ++ /* unknown type for length check in iovar info */ ++ ASSERT(0); ++ bcmerror = BCME_UNSUPPORTED; ++ } ++ ++ return bcmerror; ++} ++ ++#define CRC_INNER_LOOP(n, c, x) \ ++ (c) = ((c) >> 8) ^ crc##n##_table[((c) ^ (x)) & 0xff] ++ ++static uint32 crc32_table[256] = { ++ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, ++ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, ++ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, ++ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, ++ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, ++ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, ++ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, ++ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, ++ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, ++ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, ++ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, ++ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, ++ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, ++ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, ++ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, ++ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, ++ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, ++ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, ++ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, ++ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, ++ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, ++ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, ++ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, ++ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, ++ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, ++ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, ++ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, ++ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, ++ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, ++ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, ++ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, ++ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, ++ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, ++ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, ++ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, ++ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, ++ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, ++ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, ++ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, ++ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, ++ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, ++ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, ++ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, ++ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, ++ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, ++ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, ++ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, ++ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, ++ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, ++ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, ++ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, ++ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, ++ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, ++ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, ++ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, ++ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, ++ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, ++ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, ++ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, ++ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, ++ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, ++ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, ++ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, ++ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D ++}; ++ ++uint32 ++hndcrc32( ++ uint8 *pdata, /* pointer to array of data to process */ ++ uint nbytes, /* number of input data bytes to process */ ++ uint32 crc /* either CRC32_INIT_VALUE or previous return value */ ++) ++{ ++ uint8 *pend; ++#ifdef __mips__ ++ uint8 tmp[4]; ++ ulong *tptr = (ulong *)tmp; ++ ++ /* in case the beginning of the buffer isn't aligned */ ++ pend = (uint8 *)((uint)(pdata + 3) & 0xfffffffc); ++ nbytes -= (pend - pdata); ++ while (pdata < pend) ++ CRC_INNER_LOOP(32, crc, *pdata++); ++ ++ /* handle bulk of data as 32-bit words */ ++ pend = pdata + (nbytes & 0xfffffffc); ++ while (pdata < pend) { ++ *tptr = *(ulong *)pdata; ++ pdata += sizeof(ulong *); ++ CRC_INNER_LOOP(32, crc, tmp[0]); ++ CRC_INNER_LOOP(32, crc, tmp[1]); ++ CRC_INNER_LOOP(32, crc, tmp[2]); ++ CRC_INNER_LOOP(32, crc, tmp[3]); ++ } ++ ++ /* 1-3 bytes at end of buffer */ ++ pend = pdata + (nbytes & 0x03); ++ while (pdata < pend) ++ CRC_INNER_LOOP(32, crc, *pdata++); ++#else ++ pend = pdata + nbytes; ++ while (pdata < pend) ++ CRC_INNER_LOOP(32, crc, *pdata++); ++#endif /* __mips__ */ ++ ++ return crc; ++} ++ ++ ++/* ++ * Advance from the current 1-byte tag/1-byte length/variable-length value ++ * triple, to the next, returning a pointer to the next. ++ * If the current or next TLV is invalid (does not fit in given buffer length), ++ * NULL is returned. ++ * *buflen is not modified if the TLV elt parameter is invalid, or is decremented ++ * by the TLV paramter's length if it is valid. ++ */ ++bcm_tlv_t * ++bcm_next_tlv(bcm_tlv_t *elt, int *buflen) ++{ ++ int len; ++ ++ /* validate current elt */ ++ if (!bcm_valid_tlv(elt, *buflen)) ++ return NULL; ++ ++ /* advance to next elt */ ++ len = elt->len; ++ elt = (bcm_tlv_t*)(elt->data + len); ++ *buflen -= (2 + len); ++ ++ /* validate next elt */ ++ if (!bcm_valid_tlv(elt, *buflen)) ++ return NULL; ++ ++ return elt; ++} ++ ++/* ++ * Traverse a string of 1-byte tag/1-byte length/variable-length value ++ * triples, returning a pointer to the substring whose first element ++ * matches tag ++ */ ++bcm_tlv_t * ++bcm_parse_tlvs(void *buf, int buflen, uint key) ++{ ++ bcm_tlv_t *elt; ++ int totlen; ++ ++ elt = (bcm_tlv_t*)buf; ++ totlen = buflen; ++ ++ /* find tagged parameter */ ++ while (totlen >= 2) { ++ int len = elt->len; ++ ++ /* validate remaining totlen */ ++ if ((elt->id == key) && (totlen >= (len + 2))) ++ return (elt); ++ ++ elt = (bcm_tlv_t*)((uint8*)elt + (len + 2)); ++ totlen -= (len + 2); ++ } ++ ++ return NULL; ++} ++ ++/* ++ * Traverse a string of 1-byte tag/1-byte length/variable-length value ++ * triples, returning a pointer to the substring whose first element ++ * matches tag. Stop parsing when we see an element whose ID is greater ++ * than the target key. ++ */ ++bcm_tlv_t * ++bcm_parse_ordered_tlvs(void *buf, int buflen, uint key) ++{ ++ bcm_tlv_t *elt; ++ int totlen; ++ ++ elt = (bcm_tlv_t*)buf; ++ totlen = buflen; ++ ++ /* find tagged parameter */ ++ while (totlen >= 2) { ++ uint id = elt->id; ++ int len = elt->len; ++ ++ /* Punt if we start seeing IDs > than target key */ ++ if (id > key) ++ return (NULL); ++ ++ /* validate remaining totlen */ ++ if ((id == key) && (totlen >= (len + 2))) ++ return (elt); ++ ++ elt = (bcm_tlv_t*)((uint8*)elt + (len + 2)); ++ totlen -= (len + 2); ++ } ++ return NULL; ++} ++ ++ ++/* Initialization of bcmstrbuf structure */ ++void ++bcm_binit(struct bcmstrbuf *b, char *buf, uint size) ++{ ++ b->origsize = b->size = size; ++ b->origbuf = b->buf = buf; ++} ++ ++/* Buffer sprintf wrapper to guard against buffer overflow */ ++int ++bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...) ++{ ++ va_list ap; ++ int r; ++ ++ va_start(ap, fmt); ++ r = vsnprintf(b->buf, b->size, fmt, ap); ++ ++ /* Non Ansi C99 compliant returns -1, ++ * Ansi compliant return r >= b->size, ++ * bcmstdlib returns 0, handle all ++ */ ++ if ((r == -1) || (r >= (int)b->size) || (r == 0)) ++ { ++ b->size = 0; ++ } ++ else ++ { ++ b->size -= r; ++ b->buf += r; ++ } ++ ++ va_end(ap); ++ ++ return r; ++} +diff -urN linux.old/drivers/net/wl/hnddma.c linux.dev/drivers/net/wl/hnddma.c +--- linux.old/drivers/net/wl/hnddma.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/hnddma.c 2006-05-02 17:42:13.000000000 +0200 +@@ -0,0 +1,1157 @@ +/* + * Generic Broadcom Home Networking Division (HND) DMA module. + * This supports the following chips: BCM42xx, 44xx, 47xx . + * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -18260,20 +17399,19 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * -+ * $Id$ ++ * $Id: hnddma.c,v 1.11 2006/04/08 07:12:42 honor Exp $ + */ + +#include <typedefs.h> ++#include <bcmdefs.h> +#include <osl.h> ++#include "linux_osl.h" +#include <bcmendian.h> +#include <sbconfig.h> +#include <bcmutils.h> +#include <bcmdevs.h> +#include <sbutils.h> + -+struct dma_info; /* forward declaration */ -+#define di_t struct dma_info -+ +#include "sbhnddma.h" +#include "hnddma.h" + @@ -18285,20 +17423,24 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c +static uint dma_msg_level = + 0; + -+#define MAXNAMEL 8 ++#define MAXNAMEL 8 /* 8 char names */ ++ ++#define DI_INFO(dmah) (dma_info_t *)dmah + +/* dma engine software state */ +typedef struct dma_info { -+ hnddma_t hnddma; /* exported structure */ ++ struct hnddma_pub hnddma; /* exported structure, don't use hnddma_t, ++ * which could be const ++ */ + uint *msg_level; /* message level pointer */ + char name[MAXNAMEL]; /* callers name for diag msgs */ -+ ++ + void *osh; /* os handle */ + sb_t *sbh; /* sb handle */ -+ ++ + bool dma64; /* dma64 enabled */ + bool addrext; /* this dma engine supports DmaExtendedAddrChanges */ -+ ++ + dma32regs_t *d32txregs; /* 32 bits dma tx engine registers */ + dma32regs_t *d32rxregs; /* 32 bits dma rx engine registers */ + dma64regs_t *d64txregs; /* 64 bits dma tx engine registers */ @@ -18307,43 +17449,42 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + uint32 dma64align; /* either 8k or 4k depends on number of dd */ + dma32dd_t *txd32; /* pointer to dma32 tx descriptor ring */ + dma64dd_t *txd64; /* pointer to dma64 tx descriptor ring */ -+ uint ntxd; /* # tx descriptors tunable */ ++ uint ntxd; /* # tx descriptors tunable */ + uint txin; /* index of next descriptor to reclaim */ + uint txout; /* index of next descriptor to post */ -+ uint txavail; /* # free tx descriptors */ + void **txp; /* pointer to parallel array of pointers to packets */ ++ osldma_t *tx_dmah; /* DMA TX descriptor ring handle */ ++ osldma_t **txp_dmah; /* DMA TX packet data handle */ + ulong txdpa; /* physical address of descriptor ring */ + uint txdalign; /* #bytes added to alloc'd mem to align txd */ + uint txdalloc; /* #bytes allocated for the ring */ + + dma32dd_t *rxd32; /* pointer to dma32 rx descriptor ring */ + dma64dd_t *rxd64; /* pointer to dma64 rx descriptor ring */ -+ uint nrxd; /* # rx descriptors tunable */ ++ uint nrxd; /* # rx descriptors tunable */ + uint rxin; /* index of next descriptor to reclaim */ + uint rxout; /* index of next descriptor to post */ + void **rxp; /* pointer to parallel array of pointers to packets */ ++ osldma_t *rx_dmah; /* DMA RX descriptor ring handle */ ++ osldma_t **rxp_dmah; /* DMA RX packet data handle */ + ulong rxdpa; /* physical address of descriptor ring */ + uint rxdalign; /* #bytes added to alloc'd mem to align rxd */ + uint rxdalloc; /* #bytes allocated for the ring */ + + /* tunables */ -+ uint rxbufsize; /* rx buffer size in bytes */ ++ uint rxbufsize; /* rx buffer size in bytes, ++ not including the extra headroom ++ */ + uint nrxpost; /* # rx buffers to keep posted */ + uint rxoffset; /* rxcontrol offset */ + uint ddoffsetlow; /* add to get dma address of descriptor ring, low 32 bits */ -+ uint ddoffsethigh; /* add to get dma address of descriptor ring, high 32 bits */ ++ uint ddoffsethigh; /* high 32 bits */ + uint dataoffsetlow; /* add to get dma address of data buffer, low 32 bits */ -+ uint dataoffsethigh; /* add to get dma address of data buffer, high 32 bits */ ++ uint dataoffsethigh; /* high 32 bits */ +} dma_info_t; + -+#ifdef BCMDMA64 -+#define DMA64_ENAB(di) ((di)->dma64) -+#else -+#define DMA64_ENAB(di) (0) -+#endif -+ +/* descriptor bumping macros */ -+#define XXD(x, n) ((x) & ((n) - 1)) ++#define XXD(x, n) ((x) & ((n) - 1)) /* faster than %, but n must be power of 2 */ +#define TXD(x) XXD((x), di->ntxd) +#define RXD(x) XXD((x), di->nrxd) +#define NEXTTXD(i) TXD(i + 1) @@ -18357,48 +17498,95 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c +#define I2B(index, type) ((index) * sizeof(type)) + +#define PCI32ADDR_HIGH 0xc0000000 /* address[31:30] */ -+#define PCI32ADDR_HIGH_SHIFT 30 ++#define PCI32ADDR_HIGH_SHIFT 30 /* address[31:30] */ + + -+/* prototypes */ -+static bool dma_isaddrext(dma_info_t *di); -+static bool dma_alloc(dma_info_t *di, uint direction); -+ ++/* common prototypes */ ++static bool _dma_isaddrext(dma_info_t *di); +static bool dma32_alloc(dma_info_t *di, uint direction); -+static void dma32_txreset(dma_info_t *di); -+static void dma32_rxreset(dma_info_t *di); ++static void _dma_detach(dma_info_t *di); ++static void _dma_ddtable_init(dma_info_t *di, uint direction, ulong pa); ++static void _dma_rxinit(dma_info_t *di); ++static void *_dma_rx(dma_info_t *di); ++static void _dma_rxfill(dma_info_t *di); ++static void _dma_rxreclaim(dma_info_t *di); ++static void _dma_rxenable(dma_info_t *di); ++static void * _dma_getnextrxp(dma_info_t *di, bool forceall); ++ ++static void _dma_txblock(dma_info_t *di); ++static void _dma_txunblock(dma_info_t *di); ++static uint _dma_txactive(dma_info_t *di); ++ ++static void* _dma_peeknexttxp(dma_info_t *di); ++static uintptr _dma_getvar(dma_info_t *di, char *name); ++static void _dma_counterreset(dma_info_t *di); ++static void _dma_fifoloopbackenable(dma_info_t *di); ++ ++/* ** 32 bit DMA prototypes */ ++static bool dma32_alloc(dma_info_t *di, uint direction); ++static bool dma32_txreset(dma_info_t *di); ++static bool dma32_rxreset(dma_info_t *di); +static bool dma32_txsuspendedidle(dma_info_t *di); -+static int dma32_txfast(dma_info_t *di, void *p0, uint32 coreflags); -+static void* dma32_getnexttxp(dma_info_t *di, bool forceall); -+static void* dma32_getnextrxp(dma_info_t *di, bool forceall); -+static void dma32_txrotate(di_t *di); -+ -+/* prototype or stubs */ -+#ifdef BCMDMA64 -+static bool dma64_alloc(dma_info_t *di, uint direction); -+static void dma64_txreset(dma_info_t *di); -+static void dma64_rxreset(dma_info_t *di); -+static bool dma64_txsuspendedidle(dma_info_t *di); -+static int dma64_txfast(dma_info_t *di, void *p0, uint32 coreflags); -+static void* dma64_getnexttxp(dma_info_t *di, bool forceall); -+static void* dma64_getnextrxp(dma_info_t *di, bool forceall); -+static void dma64_txrotate(di_t *di); -+#else -+static bool dma64_alloc(dma_info_t *di, uint direction) { return TRUE; } -+static void dma64_txreset(dma_info_t *di) {} -+static void dma64_rxreset(dma_info_t *di) {} -+static bool dma64_txsuspendedidle(dma_info_t *di) { return TRUE;} -+static int dma64_txfast(dma_info_t *di, void *p0, uint32 coreflags) { return 0; } -+static void* dma64_getnexttxp(dma_info_t *di, bool forceall) { return NULL; } -+static void* dma64_getnextrxp(dma_info_t *di, bool forceall) { return NULL; } -+static void dma64_txrotate(di_t *di) { return; } -+#endif ++static int dma32_txfast(dma_info_t *di, void *p0, bool commit); ++static void *dma32_getnexttxp(dma_info_t *di, bool forceall); ++static void *dma32_getnextrxp(dma_info_t *di, bool forceall); ++static void dma32_txrotate(dma_info_t *di); ++static bool dma32_rxidle(dma_info_t *di); ++static void dma32_txinit(dma_info_t *di); ++static bool dma32_txenabled(dma_info_t *di); ++static void dma32_txsuspend(dma_info_t *di); ++static void dma32_txresume(dma_info_t *di); ++static bool dma32_txsuspended(dma_info_t *di); ++static void dma32_txreclaim(dma_info_t *di, bool forceall); ++static bool dma32_txstopped(dma_info_t *di); ++static bool dma32_rxstopped(dma_info_t *di); ++static bool dma32_rxenabled(dma_info_t *di); ++static bool _dma32_addrext(osl_t *osh, dma32regs_t *dma32regs); + + ++static di_fcn_t dma32proc = { ++ (di_detach_t)_dma_detach, ++ (di_txinit_t)dma32_txinit, ++ (di_txreset_t)dma32_txreset, ++ (di_txenabled_t)dma32_txenabled, ++ (di_txsuspend_t)dma32_txsuspend, ++ (di_txresume_t)dma32_txresume, ++ (di_txsuspended_t)dma32_txsuspended, ++ (di_txsuspendedidle_t)dma32_txsuspendedidle, ++ (di_txfast_t)dma32_txfast, ++ (di_txstopped_t)dma32_txstopped, ++ (di_txreclaim_t)dma32_txreclaim, ++ (di_getnexttxp_t)dma32_getnexttxp, ++ (di_peeknexttxp_t)_dma_peeknexttxp, ++ (di_txblock_t)_dma_txblock, ++ (di_txunblock_t)_dma_txunblock, ++ (di_txactive_t)_dma_txactive, ++ (di_txrotate_t)dma32_txrotate, + -+void* ++ (di_rxinit_t)_dma_rxinit, ++ (di_rxreset_t)dma32_rxreset, ++ (di_rxidle_t)dma32_rxidle, ++ (di_rxstopped_t)dma32_rxstopped, ++ (di_rxenable_t)_dma_rxenable, ++ (di_rxenabled_t)dma32_rxenabled, ++ (di_rx_t)_dma_rx, ++ (di_rxfill_t)_dma_rxfill, ++ (di_rxreclaim_t)_dma_rxreclaim, ++ (di_getnextrxp_t)_dma_getnextrxp, ++ ++ (di_fifoloopbackenable_t)_dma_fifoloopbackenable, ++ (di_getvar_t)_dma_getvar, ++ (di_counterreset_t)_dma_counterreset, ++ ++ NULL, ++ NULL, ++ NULL, ++ 34 ++}; ++ ++hnddma_t * +dma_attach(osl_t *osh, char *name, sb_t *sbh, void *dmaregstx, void *dmaregsrx, -+ uint ntxd, uint nrxd, uint rxbufsize, uint nrxpost, uint rxoffset, uint *msg_level) ++ uint ntxd, uint nrxd, uint rxbufsize, uint nrxpost, uint rxoffset, uint *msg_level) +{ + dma_info_t *di; + uint size; @@ -18407,20 +17595,13 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + if ((di = MALLOC(osh, sizeof (dma_info_t))) == NULL) { + return (NULL); + } -+ bzero((char*)di, sizeof (dma_info_t)); ++ bzero((char *)di, sizeof(dma_info_t)); + + di->msg_level = msg_level ? msg_level : &dma_msg_level; + -+ if (sbh != NULL) -+ di->dma64 = ((sb_coreflagshi(sbh, 0, 0) & SBTMH_DMA64) == SBTMH_DMA64); ++ /* old chips w/o sb is no longer supported */ ++ ASSERT(sbh != NULL); + -+#ifndef BCMDMA64 -+ if (di->dma64) { -+ DMA_ERROR(("dma_attach: driver doesn't have the capability to support 64 bits DMA\n")); -+ goto fail; -+ } -+#endif -+ + /* check arguments */ + ASSERT(ISPOWEROF2(ntxd)); + ASSERT(ISPOWEROF2(nrxd)); @@ -18431,24 +17612,15 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + + + /* init dma reg pointer */ -+ if (di->dma64) { -+ ASSERT(ntxd <= D64MAXDD); -+ ASSERT(nrxd <= D64MAXDD); -+ di->d64txregs = (dma64regs_t *)dmaregstx; -+ di->d64rxregs = (dma64regs_t *)dmaregsrx; -+ -+ di->dma64align = D64RINGALIGN; -+ if ((ntxd < D64MAXDD / 2) && (nrxd < D64MAXDD / 2)) { -+ /* for smaller dd table, HW relax the alignment requirement */ -+ di->dma64align = D64RINGALIGN / 2; -+ } -+ } else { -+ ASSERT(ntxd <= D32MAXDD); -+ ASSERT(nrxd <= D32MAXDD); -+ di->d32txregs = (dma32regs_t *)dmaregstx; -+ di->d32rxregs = (dma32regs_t *)dmaregsrx; -+ } ++ ASSERT(ntxd <= D32MAXDD); ++ ASSERT(nrxd <= D32MAXDD); ++ di->d32txregs = (dma32regs_t *)dmaregstx; ++ di->d32rxregs = (dma32regs_t *)dmaregsrx; + ++ DMA_TRACE(("%s: dma_attach: %s osh %p ntxd %d nrxd %d rxbufsize %d nrxpost %d " ++ "rxoffset %d dmaregstx %p dmaregsrx %p\n", ++ name, "DMA32", osh, ntxd, nrxd, rxbufsize, ++ nrxpost, rxoffset, dmaregstx, dmaregsrx)); + + /* make a private copy of our callers name */ + strncpy(di->name, name, MAXNAMEL); @@ -18460,104 +17632,158 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + /* save tunables */ + di->ntxd = ntxd; + di->nrxd = nrxd; -+ di->rxbufsize = rxbufsize; ++ ++ /* the actual dma size doesn't include the extra headroom */ ++ if (rxbufsize > BCMEXTRAHDROOM) ++ di->rxbufsize = rxbufsize - BCMEXTRAHDROOM; ++ else ++ di->rxbufsize = rxbufsize; ++ + di->nrxpost = nrxpost; + di->rxoffset = rxoffset; + -+ /* -+ * figure out the DMA physical address offset for dd and data ++ /* ++ * figure out the DMA physical address offset for dd and data + * for old chips w/o sb, use zero -+ * for new chips w sb, ++ * for new chips w sb, + * PCI/PCIE: they map silicon backplace address to zero based memory, need offset + * Other bus: use zero + * SB_BUS BIGENDIAN kludge: use sdram swapped region for data buffer, not descriptor + */ + di->ddoffsetlow = 0; + di->dataoffsetlow = 0; -+ if (sbh != NULL) { -+ if (sbh->bustype == PCI_BUS) { /* for pci bus, add offset */ -+ if ((sbh->buscoretype == SB_PCIE) && di->dma64){ -+ di->ddoffsetlow = 0; -+ di->ddoffsethigh = SB_PCIE_DMA_H32; -+ } else { -+ di->ddoffsetlow = SB_PCI_DMA; -+ di->ddoffsethigh = 0; -+ } -+ di->dataoffsetlow = di->ddoffsetlow; -+ di->dataoffsethigh = di->ddoffsethigh; -+ } -+#if defined(__mips__) && defined(IL_BIGENDIAN) -+ /* use sdram swapped region for data buffers but not dma descriptors */ -+ di->dataoffsetlow = di->dataoffsetlow + SB_SDRAM_SWAPPED; -+#endif ++ /* for pci bus, add offset */ ++ if (sbh->bustype == PCI_BUS) { ++ di->ddoffsetlow = SB_PCI_DMA; ++ di->ddoffsethigh = 0; ++ di->dataoffsetlow = di->ddoffsetlow; ++ di->dataoffsethigh = di->ddoffsethigh; + } + -+ di->addrext = dma_isaddrext(di); ++#if defined(__mips__) && defined(IL_BIGENDIAN) ++ di->dataoffsetlow = di->dataoffsetlow + SB_SDRAM_SWAPPED; ++#endif + -+ DMA_TRACE(("%s: dma_attach: osh %p ntxd %d nrxd %d rxbufsize %d nrxpost %d rxoffset %d ddoffset 0x%x dataoffset 0x%x\n", -+ name, osh, ntxd, nrxd, rxbufsize, nrxpost, rxoffset, di->ddoffsetlow, di->dataoffsetlow)); ++ di->addrext = _dma_isaddrext(di); + + /* allocate tx packet pointer vector */ + if (ntxd) { -+ size = ntxd * sizeof (void*); ++ size = ntxd * sizeof(void *); + if ((di->txp = MALLOC(osh, size)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: out of tx memory, malloced %d bytes\n", di->name, MALLOCED(osh))); ++ DMA_ERROR(("%s: dma_attach: out of tx memory, malloced %d bytes\n", ++ di->name, MALLOCED(osh))); + goto fail; + } -+ bzero((char*)di->txp, size); ++ bzero((char *)di->txp, size); + } + + /* allocate rx packet pointer vector */ + if (nrxd) { -+ size = nrxd * sizeof (void*); ++ size = nrxd * sizeof(void *); + if ((di->rxp = MALLOC(osh, size)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: out of rx memory, malloced %d bytes\n", di->name, MALLOCED(osh))); ++ DMA_ERROR(("%s: dma_attach: out of rx memory, malloced %d bytes\n", ++ di->name, MALLOCED(osh))); + goto fail; + } -+ bzero((char*)di->rxp, size); -+ } ++ bzero((char *)di->rxp, size); ++ } + + /* allocate transmit descriptor ring, only need ntxd descriptors but it must be aligned */ + if (ntxd) { -+ if (!dma_alloc(di, DMA_TX)) ++ if (!dma32_alloc(di, DMA_TX)) + goto fail; + } + + /* allocate receive descriptor ring, only need nrxd descriptors but it must be aligned */ + if (nrxd) { -+ if (!dma_alloc(di, DMA_RX)) ++ if (!dma32_alloc(di, DMA_RX)) + goto fail; + } + + if ((di->ddoffsetlow == SB_PCI_DMA) && (di->txdpa > SB_PCI_DMA_SZ) && !di->addrext) { -+ DMA_ERROR(("%s: dma_attach: txdpa 0x%lx: addrext not supported\n", di->name, di->txdpa)); ++ DMA_ERROR(("%s: dma_attach: txdpa 0x%lx: addrext not supported\n", ++ di->name, di->txdpa)); + goto fail; + } + if ((di->ddoffsetlow == SB_PCI_DMA) && (di->rxdpa > SB_PCI_DMA_SZ) && !di->addrext) { -+ DMA_ERROR(("%s: dma_attach: rxdpa 0x%lx: addrext not supported\n", di->name, di->rxdpa)); ++ DMA_ERROR(("%s: dma_attach: rxdpa 0x%lx: addrext not supported\n", ++ di->name, di->rxdpa)); + goto fail; + } + -+ return ((void*)di); ++ DMA_TRACE(("ddoffsetlow 0x%x ddoffsethigh 0x%x dataoffsetlow 0x%x dataoffsethigh " ++ "0x%x addrext %d\n", di->ddoffsetlow, di->ddoffsethigh, di->dataoffsetlow, ++ di->dataoffsethigh, di->addrext)); ++ ++ /* allocate tx packet pointer vector and DMA mapping vectors */ ++ if (ntxd) { ++ ++ size = ntxd * sizeof(osldma_t **); ++ if ((di->txp_dmah = (osldma_t **)MALLOC(osh, size)) == NULL) ++ goto fail; ++ bzero((char*)di->txp_dmah, size); ++ }else ++ di->txp_dmah = NULL; ++ ++ /* allocate rx packet pointer vector and DMA mapping vectors */ ++ if (nrxd) { ++ ++ size = nrxd * sizeof(osldma_t **); ++ if ((di->rxp_dmah = (osldma_t **)MALLOC(osh, size)) == NULL) ++ goto fail; ++ bzero((char*)di->rxp_dmah, size); ++ ++ } else ++ di->rxp_dmah = NULL; ++ ++ /* initialize opsvec of function pointers */ ++ di->hnddma.di_fn = dma32proc; ++ ++ return ((hnddma_t *)di); + +fail: -+ dma_detach((void*)di); ++ _dma_detach(di); + return (NULL); +} + -+static bool -+dma_alloc(dma_info_t *di, uint direction) ++/* init the tx or rx descriptor */ ++static INLINE void ++dma32_dd_upd(dma_info_t *di, dma32dd_t *ddring, ulong pa, uint outidx, uint32 *flags, ++ uint32 bufcount) +{ -+ if (DMA64_ENAB(di)) { -+ return dma64_alloc(di, direction); ++ /* dma32 uses 32 bits control to fit both flags and bufcounter */ ++ *flags = *flags | (bufcount & CTRL_BC_MASK); ++ ++ if ((di->dataoffsetlow != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { ++ W_SM(&ddring[outidx].addr, BUS_SWAP32(pa + di->dataoffsetlow)); ++ W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*flags)); + } else { -+ return dma32_alloc(di, direction); ++ /* address extension */ ++ uint32 ae; ++ ASSERT(di->addrext); ++ ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; ++ pa &= ~PCI32ADDR_HIGH; ++ ++ *flags |= (ae << CTRL_AE_SHIFT); ++ W_SM(&ddring[outidx].addr, BUS_SWAP32(pa + di->dataoffsetlow)); ++ W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*flags)); + } +} + -+/* may be called with core in reset */ -+void -+dma_detach(dma_info_t *di) ++static bool ++_dma32_addrext(osl_t *osh, dma32regs_t *dma32regs) ++{ ++ uint32 w; ++ ++ OR_REG(osh, &dma32regs->control, XC_AE); ++ w = R_REG(osh, &dma32regs->control); ++ AND_REG(osh, &dma32regs->control, ~XC_AE); ++ return ((w & XC_AE) == XC_AE); ++} ++ ++/* !! may be called with core in reset */ ++static void ++_dma_detach(dma_info_t *di) +{ + if (di == NULL) + return; @@ -18570,298 +17796,112 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + + /* free dma descriptor rings */ + if (di->txd32) -+ DMA_FREE_CONSISTENT(di->osh, ((int8*)di->txd32 - di->txdalign), di->txdalloc, (di->txdpa - di->txdalign)); ++ DMA_FREE_CONSISTENT(di->osh, ((int8*)di->txd32 - di->txdalign), ++ di->txdalloc, (di->txdpa - di->txdalign), &di->tx_dmah); + if (di->rxd32) -+ DMA_FREE_CONSISTENT(di->osh, ((int8*)di->rxd32 - di->rxdalign), di->rxdalloc, (di->rxdpa - di->rxdalign)); ++ DMA_FREE_CONSISTENT(di->osh, ((int8*)di->rxd32 - di->rxdalign), ++ di->rxdalloc, (di->rxdpa - di->rxdalign), &di->rx_dmah); + + /* free packet pointer vectors */ + if (di->txp) -+ MFREE(di->osh, (void*)di->txp, (di->ntxd * sizeof (void*))); ++ MFREE(di->osh, (void *)di->txp, (di->ntxd * sizeof(void *))); + if (di->rxp) -+ MFREE(di->osh, (void*)di->rxp, (di->nrxd * sizeof (void*))); ++ MFREE(di->osh, (void *)di->rxp, (di->nrxd * sizeof(void *))); ++ ++ /* free tx packet DMA handles */ ++ if (di->txp_dmah) ++ MFREE(di->osh, (void *)di->txp_dmah, di->ntxd * sizeof(osldma_t **)); ++ ++ /* free rx packet DMA handles */ ++ if (di->rxp_dmah) ++ MFREE(di->osh, (void *)di->rxp_dmah, di->nrxd * sizeof(osldma_t **)); + + /* free our private info structure */ -+ MFREE(di->osh, (void*)di, sizeof (dma_info_t)); ++ MFREE(di->osh, (void *)di, sizeof(dma_info_t)); ++ +} + +/* return TRUE if this dma engine supports DmaExtendedAddrChanges, otherwise FALSE */ +static bool -+dma_isaddrext(dma_info_t *di) ++_dma_isaddrext(dma_info_t *di) +{ -+ uint32 w; -+ -+ if (DMA64_ENAB(di)) { -+ OR_REG(&di->d64txregs->control, D64_XC_AE); -+ w = R_REG(&di->d32txregs->control); -+ AND_REG(&di->d32txregs->control, ~D64_XC_AE); -+ return ((w & XC_AE) == D64_XC_AE); -+ } else { -+ OR_REG(&di->d32txregs->control, XC_AE); -+ w = R_REG(&di->d32txregs->control); -+ AND_REG(&di->d32txregs->control, ~XC_AE); -+ return ((w & XC_AE) == XC_AE); -+ } -+} -+ -+void -+dma_txreset(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txreset\n", di->name)); -+ -+ if (DMA64_ENAB(di)) -+ dma64_txreset(di); -+ else -+ dma32_txreset(di); -+} -+ -+void -+dma_rxreset(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_rxreset\n", di->name)); -+ -+ if (DMA64_ENAB(di)) -+ dma64_rxreset(di); -+ else -+ dma32_rxreset(di); ++ if (di->d32txregs) ++ return (_dma32_addrext(di->osh, di->d32txregs)); ++ else if (di->d32rxregs) ++ return (_dma32_addrext(di->osh, di->d32rxregs)); ++ return FALSE; +} + +/* initialize descriptor table base address */ +static void -+dma_ddtable_init(dma_info_t *di, uint direction, ulong pa) ++_dma_ddtable_init(dma_info_t *di, uint direction, ulong pa) +{ -+ if (DMA64_ENAB(di)) { -+ if (direction == DMA_TX) { -+ W_REG(&di->d64txregs->addrlow, pa + di->ddoffsetlow); -+ W_REG(&di->d64txregs->addrhigh, di->ddoffsethigh); -+ } else { -+ W_REG(&di->d64rxregs->addrlow, pa + di->ddoffsetlow); -+ W_REG(&di->d64rxregs->addrhigh, di->ddoffsethigh); -+ } ++ if ((di->ddoffsetlow != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { ++ if (direction == DMA_TX) ++ W_REG(di->osh, &di->d32txregs->addr, (pa + di->ddoffsetlow)); ++ else ++ W_REG(di->osh, &di->d32rxregs->addr, (pa + di->ddoffsetlow)); + } else { -+ uint32 offset = di->ddoffsetlow; -+ if ((offset != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { -+ if (direction == DMA_TX) -+ W_REG(&di->d32txregs->addr, (pa + offset)); -+ else -+ W_REG(&di->d32rxregs->addr, (pa + offset)); -+ } else { -+ /* dma32 address extension */ -+ uint32 ae; -+ ASSERT(di->addrext); -+ ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; -+ -+ if (direction == DMA_TX) { -+ W_REG(&di->d32txregs->addr, ((pa & ~PCI32ADDR_HIGH) + offset)); -+ SET_REG(&di->d32txregs->control, XC_AE, (ae << XC_AE_SHIFT)); -+ } else { -+ W_REG(&di->d32rxregs->addr, ((pa & ~PCI32ADDR_HIGH) + offset)); -+ SET_REG(&di->d32rxregs->control, RC_AE, (ae << RC_AE_SHIFT)); -+ } -+ } -+ } -+} -+ -+/* init the tx or rx descriptor */ -+static INLINE void -+dma32_dd_upd(dma_info_t *di, dma32dd_t *ddring, ulong pa, uint outidx, uint32 *ctrl) -+{ -+ uint offset = di->dataoffsetlow; -+ -+ if ((offset != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { -+ W_SM(&ddring[outidx].addr, BUS_SWAP32(pa + offset)); -+ W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*ctrl)); -+ } else { -+ /* address extension */ ++ /* dma32 address extension */ + uint32 ae; + ASSERT(di->addrext); ++ ++ /* shift the high bit(s) from pa to ae */ + ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; ++ pa &= ~PCI32ADDR_HIGH; + -+ *ctrl |= (ae << CTRL_AE_SHIFT); -+ W_SM(&ddring[outidx].addr, BUS_SWAP32((pa & ~PCI32ADDR_HIGH) + offset)); -+ W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*ctrl)); ++ if (direction == DMA_TX) { ++ W_REG(di->osh, &di->d32txregs->addr, (pa + di->ddoffsetlow)); ++ SET_REG(di->osh, &di->d32txregs->control, XC_AE, ae <<XC_AE_SHIFT); ++ } else { ++ W_REG(di->osh, &di->d32rxregs->addr, (pa + di->ddoffsetlow)); ++ SET_REG(di->osh, &di->d32rxregs->control, RC_AE, ae <<RC_AE_SHIFT); ++ } + } +} + -+/* init the tx or rx descriptor */ -+static INLINE void -+dma64_dd_upd(dma_info_t *di, dma64dd_t *ddring, ulong pa, uint outidx, uint32 *flags, uint32 bufcount) -+{ -+ uint32 bufaddr_low = pa + di->dataoffsetlow; -+ uint32 bufaddr_high = 0 + di->dataoffsethigh; -+ -+ uint32 ctrl2 = bufcount & D64_CTRL2_BC_MASK; -+ -+ W_SM(&ddring[outidx].addrlow, BUS_SWAP32(bufaddr_low)); -+ W_SM(&ddring[outidx].addrhigh, BUS_SWAP32(bufaddr_high)); -+ W_SM(&ddring[outidx].ctrl1, BUS_SWAP32(*flags)); -+ W_SM(&ddring[outidx].ctrl2, BUS_SWAP32(ctrl2)); -+} -+ -+void -+dma_txinit(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txinit\n", di->name)); -+ -+ di->txin = di->txout = 0; -+ di->txavail = di->ntxd - 1; -+ -+ /* clear tx descriptor ring */ -+ if (DMA64_ENAB(di)) { -+ BZERO_SM((void*)di->txd64, (di->ntxd * sizeof (dma64dd_t))); -+ W_REG(&di->d64txregs->control, XC_XE); -+ dma_ddtable_init(di, DMA_TX, di->txdpa); -+ } else { -+ BZERO_SM((void*)di->txd32, (di->ntxd * sizeof (dma32dd_t))); -+ W_REG(&di->d32txregs->control, XC_XE); -+ dma_ddtable_init(di, DMA_TX, di->txdpa); -+ } -+} -+ -+bool -+dma_txenabled(dma_info_t *di) -+{ -+ uint32 xc; -+ -+ /* If the chip is dead, it is not enabled :-) */ -+ if (DMA64_ENAB(di)) { -+ xc = R_REG(&di->d64txregs->control); -+ return ((xc != 0xffffffff) && (xc & D64_XC_XE)); -+ } else { -+ xc = R_REG(&di->d32txregs->control); -+ return ((xc != 0xffffffff) && (xc & XC_XE)); -+ } -+} -+ -+void -+dma_txsuspend(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txsuspend\n", di->name)); -+ if (DMA64_ENAB(di)) -+ OR_REG(&di->d64txregs->control, D64_XC_SE); -+ else -+ OR_REG(&di->d32txregs->control, XC_SE); -+} -+ -+void -+dma_txresume(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txresume\n", di->name)); -+ if (DMA64_ENAB(di)) -+ AND_REG(&di->d64txregs->control, ~D64_XC_SE); -+ else -+ AND_REG(&di->d32txregs->control, ~XC_SE); -+} -+ -+bool -+dma_txsuspendedidle(dma_info_t *di) -+{ -+ if (DMA64_ENAB(di)) -+ return dma64_txsuspendedidle(di); -+ else -+ return dma32_txsuspendedidle(di); -+} -+ -+bool -+dma_txsuspended(dma_info_t *di) -+{ -+ if (DMA64_ENAB(di)) -+ return ((R_REG(&di->d64txregs->control) & D64_XC_SE) == D64_XC_SE); -+ else -+ return ((R_REG(&di->d32txregs->control) & XC_SE) == XC_SE); -+} -+ -+bool -+dma_txstopped(dma_info_t *di) -+{ -+ if (DMA64_ENAB(di)) -+ return ((R_REG(&di->d64txregs->status0) & D64_XS0_XS_MASK) == D64_XS0_XS_STOPPED); -+ else -+ return ((R_REG(&di->d32txregs->status) & XS_XS_MASK) == XS_XS_STOPPED); -+} -+ -+bool -+dma_rxstopped(dma_info_t *di) -+{ -+ if (DMA64_ENAB(di)) -+ return ((R_REG(&di->d64rxregs->status0) & D64_RS0_RS_MASK) == D64_RS0_RS_STOPPED); -+ else -+ return ((R_REG(&di->d32rxregs->status) & RS_RS_MASK) == RS_RS_STOPPED); -+} -+ -+void -+dma_fifoloopbackenable(dma_info_t *di) ++static void ++_dma_fifoloopbackenable(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_fifoloopbackenable\n", di->name)); -+ if (DMA64_ENAB(di)) -+ OR_REG(&di->d64txregs->control, D64_XC_LE); -+ else -+ OR_REG(&di->d32txregs->control, XC_LE); ++ OR_REG(di->osh, &di->d32txregs->control, XC_LE); +} + -+void -+dma_rxinit(dma_info_t *di) ++static void ++_dma_rxinit(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_rxinit\n", di->name)); + ++ if (di->nrxd == 0) ++ return; ++ + di->rxin = di->rxout = 0; + + /* clear rx descriptor ring */ -+ if (DMA64_ENAB(di)) { -+ BZERO_SM((void*)di->rxd64, (di->nrxd * sizeof (dma64dd_t))); -+ dma_rxenable(di); -+ dma_ddtable_init(di, DMA_RX, di->rxdpa); -+ } else { -+ BZERO_SM((void*)di->rxd32, (di->nrxd * sizeof (dma32dd_t))); -+ dma_rxenable(di); -+ dma_ddtable_init(di, DMA_RX, di->rxdpa); -+ } ++ BZERO_SM((void *)di->rxd32, (di->nrxd * sizeof(dma32dd_t))); ++ _dma_rxenable(di); ++ _dma_ddtable_init(di, DMA_RX, di->rxdpa); +} + -+void -+dma_rxenable(dma_info_t *di) ++static void ++_dma_rxenable(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_rxenable\n", di->name)); -+ if (DMA64_ENAB(di)) -+ W_REG(&di->d64rxregs->control, ((di->rxoffset << D64_RC_RO_SHIFT) | D64_RC_RE)); -+ else -+ W_REG(&di->d32rxregs->control, ((di->rxoffset << RC_RO_SHIFT) | RC_RE)); ++ ++ W_REG(di->osh, &di->d32rxregs->control, ((di->rxoffset << RC_RO_SHIFT) | RC_RE)); +} + -+bool -+dma_rxenabled(dma_info_t *di) -+{ -+ uint32 rc; -+ -+ if (DMA64_ENAB(di)) { -+ rc = R_REG(&di->d64rxregs->control); -+ return ((rc != 0xffffffff) && (rc & D64_RC_RE)); -+ } else { -+ rc = R_REG(&di->d32rxregs->control); -+ return ((rc != 0xffffffff) && (rc & RC_RE)); -+ } -+} -+ -+ -+/* !! tx entry routine */ -+int -+dma_txfast(dma_info_t *di, void *p0, uint32 coreflags) -+{ -+ if (DMA64_ENAB(di)) { -+ return dma64_txfast(di, p0, coreflags); -+ } else { -+ return dma32_txfast(di, p0, coreflags); -+ } -+} -+ -+/* !! rx entry routine, returns a pointer to the next frame received, or NULL if there are no more */ -+void* -+dma_rx(dma_info_t *di) ++/* !! rx entry routine, returns a pointer to the next frame received, ++ * or NULL if there are no more ++ */ ++static void * ++_dma_rx(dma_info_t *di) +{ + void *p; + uint len; + int skiplen = 0; + -+ while ((p = dma_getnextrxp(di, FALSE))) { ++ while ((p = _dma_getnextrxp(di, FALSE))) { + /* skip giant packets which span multiple rx descriptors */ + if (skiplen > 0) { + skiplen -= di->rxbufsize; @@ -18894,16 +17934,16 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c +} + +/* post receive buffers */ -+void -+dma_rxfill(dma_info_t *di) ++static void ++_dma_rxfill(dma_info_t *di) +{ + void *p; + uint rxin, rxout; -+ uint32 ctrl; ++ uint32 flags = 0; + uint n; + uint i; + uint32 pa; -+ uint rxbufsize; ++ uint extra_offset = 0; + + /* + * Determine how many receive buffers we're lacking @@ -18913,95 +17953,66 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + + rxin = di->rxin; + rxout = di->rxout; -+ rxbufsize = di->rxbufsize; + + n = di->nrxpost - NRXDACTIVE(rxin, rxout); + + DMA_TRACE(("%s: dma_rxfill: post %d\n", di->name, n)); + ++ if (di->rxbufsize > BCMEXTRAHDROOM) ++ extra_offset = BCMEXTRAHDROOM; ++ + for (i = 0; i < n; i++) { -+ if ((p = PKTGET(di->osh, rxbufsize, FALSE)) == NULL) { ++ /* the di->rxbufsize doesn't include the extra headroom, we need to add it to the ++ size to be allocated ++ */ ++ if ((p = PKTGET(di->osh, di->rxbufsize + extra_offset, ++ FALSE)) == NULL) { + DMA_ERROR(("%s: dma_rxfill: out of rxbufs\n", di->name)); + di->hnddma.rxnobuf++; + break; + } ++ /* reserve an extra headroom, if applicable */ ++ if (extra_offset) ++ PKTPULL(di->osh, p, extra_offset); + + /* Do a cached write instead of uncached write since DMA_MAP -+ * will flush the cache. */ ++ * will flush the cache. ++ */ + *(uint32*)(PKTDATA(di->osh, p)) = 0; + -+ pa = (uint32) DMA_MAP(di->osh, PKTDATA(di->osh, p), rxbufsize, DMA_RX, p); ++ pa = (uint32) DMA_MAP(di->osh, PKTDATA(di->osh, p), ++ di->rxbufsize, DMA_RX, p); ++ + ASSERT(ISALIGNED(pa, 4)); + + /* save the free packet pointer */ + ASSERT(di->rxp[rxout] == NULL); + di->rxp[rxout] = p; + -+ if (DMA64_ENAB(di)) { -+ /* prep the descriptor control value */ -+ if (rxout == (di->nrxd - 1)) -+ ctrl = CTRL_EOT; -+ -+ dma64_dd_upd(di, di->rxd64, pa, rxout, &ctrl, rxbufsize); -+ } else { -+ /* prep the descriptor control value */ -+ ctrl = rxbufsize; -+ if (rxout == (di->nrxd - 1)) -+ ctrl |= CTRL_EOT; -+ dma32_dd_upd(di, di->rxd32, pa, rxout, &ctrl); -+ } -+ ++ /* reset flags for each descriptor */ ++ flags = 0; ++ if (rxout == (di->nrxd - 1)) ++ flags = CTRL_EOT; ++ dma32_dd_upd(di, di->rxd32, pa, rxout, &flags, di->rxbufsize); + rxout = NEXTRXD(rxout); + } + + di->rxout = rxout; + + /* update the chip lastdscr pointer */ -+ if (DMA64_ENAB(di)) { -+ W_REG(&di->d64rxregs->ptr, I2B(rxout, dma64dd_t)); -+ } else { -+ W_REG(&di->d32rxregs->ptr, I2B(rxout, dma32dd_t)); -+ } ++ W_REG(di->osh, &di->d32rxregs->ptr, I2B(rxout, dma32dd_t)); +} + -+void -+dma_txreclaim(dma_info_t *di, bool forceall) -+{ -+ void *p; -+ -+ DMA_TRACE(("%s: dma_txreclaim %s\n", di->name, forceall ? "all" : "")); -+ -+ while ((p = dma_getnexttxp(di, forceall))) -+ PKTFREE(di->osh, p, TRUE); -+} -+ -+/* -+ * Reclaim next completed txd (txds if using chained buffers) and -+ * return associated packet. -+ * If 'force' is true, reclaim txd(s) and return associated packet -+ * regardless of the value of the hardware "curr" pointer. -+ */ -+void* -+dma_getnexttxp(dma_info_t *di, bool forceall) -+{ -+ if (DMA64_ENAB(di)) { -+ return dma64_getnexttxp(di, forceall); -+ } else { -+ return dma32_getnexttxp(di, forceall); -+ } -+} -+ +/* like getnexttxp but no reclaim */ -+void* -+dma_peeknexttxp(dma_info_t *di) ++static void * ++_dma_peeknexttxp(dma_info_t *di) +{ + uint end, i; + -+ if (DMA64_ENAB(di)) { -+ end = B2I(R_REG(&di->d64txregs->status0) & D64_XS0_CD_MASK, dma64dd_t); -+ } else { -+ end = B2I(R_REG(&di->d32txregs->status) & XS_CD_MASK, dma32dd_t); -+ } ++ if (di->ntxd == 0) ++ return (NULL); ++ ++ end = B2I(R_REG(di->osh, &di->d32txregs->status) & XS_CD_MASK, dma32dd_t); + + for (i = di->txin; i != end; i = NEXTTXD(i)) + if (di->txp[i]) @@ -19010,45 +18021,64 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + return (NULL); +} + -+/* -+ * Rotate all active tx dma ring entries "forward" by (ActiveDescriptor - txin). -+ */ -+void -+dma_txrotate(di_t *di) -+{ -+ if (DMA64_ENAB(di)) { -+ dma64_txrotate(di); -+ } else { -+ dma32_txrotate(di); -+ } -+} -+ -+void -+dma_rxreclaim(dma_info_t *di) ++static void ++_dma_rxreclaim(dma_info_t *di) +{ + void *p; + ++ /* "unused local" warning suppression for OSLs that ++ * define PKTFREE() without using the di->osh arg ++ */ ++ di = di; ++ + DMA_TRACE(("%s: dma_rxreclaim\n", di->name)); + -+ while ((p = dma_getnextrxp(di, TRUE))) ++ while ((p = _dma_getnextrxp(di, TRUE))) + PKTFREE(di->osh, p, FALSE); +} + -+void * -+dma_getnextrxp(dma_info_t *di, bool forceall) ++static void * ++_dma_getnextrxp(dma_info_t *di, bool forceall) +{ -+ if (DMA64_ENAB(di)) { -+ return dma64_getnextrxp(di, forceall); -+ } else { -+ return dma32_getnextrxp(di, forceall); -+ } ++ if (di->nrxd == 0) ++ return (NULL); ++ ++ return dma32_getnextrxp(di, forceall); +} + -+uintptr -+dma_getvar(dma_info_t *di, char *name) ++static void ++_dma_txblock(dma_info_t *di) ++{ ++ di->hnddma.txavail = 0; ++} ++ ++static void ++_dma_txunblock(dma_info_t *di) ++{ ++ di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; ++} ++ ++static uint ++_dma_txactive(dma_info_t *di) ++{ ++ return (NTXDACTIVE(di->txin, di->txout)); ++} ++ ++static void ++_dma_counterreset(dma_info_t *di) ++{ ++ /* reset all software counter */ ++ di->hnddma.rxgiants = 0; ++ di->hnddma.rxnobuf = 0; ++ di->hnddma.txnobuf = 0; ++} ++ ++/* get the address of the var in order to change later */ ++static uintptr ++_dma_getvar(dma_info_t *di, char *name) +{ + if (!strcmp(name, "&txavail")) -+ return ((uintptr) &di->txavail); ++ return ((uintptr) &(di->hnddma.txavail)); + else { + ASSERT(0); + } @@ -19056,39 +18086,92 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c +} + +void -+dma_txblock(dma_info_t *di) ++dma_txpioloopback(osl_t *osh, dma32regs_t *regs) +{ -+ di->txavail = 0; -+} -+ -+void -+dma_txunblock(dma_info_t *di) -+{ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+} -+ -+uint -+dma_txactive(dma_info_t *di) -+{ -+ return (NTXDACTIVE(di->txin, di->txout)); -+} -+ -+void -+dma_rxpiomode(dma32regs_t *regs) -+{ -+ W_REG(®s->control, RC_FM); -+} -+ -+void -+dma_txpioloopback(dma32regs_t *regs) -+{ -+ OR_REG(®s->control, XC_LE); ++ OR_REG(osh, ®s->control, XC_LE); +} + + + ++/* 32 bits DMA functions */ ++static void ++dma32_txinit(dma_info_t *di) ++{ ++ DMA_TRACE(("%s: dma_txinit\n", di->name)); ++ ++ if (di->ntxd == 0) ++ return; ++ ++ di->txin = di->txout = 0; ++ di->hnddma.txavail = di->ntxd - 1; ++ ++ /* clear tx descriptor ring */ ++ BZERO_SM((void *)di->txd32, (di->ntxd * sizeof(dma32dd_t))); ++ W_REG(di->osh, &di->d32txregs->control, XC_XE); ++ _dma_ddtable_init(di, DMA_TX, di->txdpa); ++} ++ ++static bool ++dma32_txenabled(dma_info_t *di) ++{ ++ uint32 xc; ++ ++ /* If the chip is dead, it is not enabled :-) */ ++ xc = R_REG(di->osh, &di->d32txregs->control); ++ return ((xc != 0xffffffff) && (xc & XC_XE)); ++} ++ ++static void ++dma32_txsuspend(dma_info_t *di) ++{ ++ DMA_TRACE(("%s: dma_txsuspend\n", di->name)); ++ ++ if (di->ntxd == 0) ++ return; ++ ++ OR_REG(di->osh, &di->d32txregs->control, XC_SE); ++} ++ ++static void ++dma32_txresume(dma_info_t *di) ++{ ++ DMA_TRACE(("%s: dma_txresume\n", di->name)); ++ ++ if (di->ntxd == 0) ++ return; ++ ++ AND_REG(di->osh, &di->d32txregs->control, ~XC_SE); ++} ++ ++static bool ++dma32_txsuspended(dma_info_t *di) ++{ ++ return (di->ntxd == 0) || ((R_REG(di->osh, &di->d32txregs->control) & XC_SE) == XC_SE); ++} ++ ++static void ++dma32_txreclaim(dma_info_t *di, bool forceall) ++{ ++ void *p; ++ ++ DMA_TRACE(("%s: dma_txreclaim %s\n", di->name, forceall ? "all" : "")); ++ ++ while ((p = dma32_getnexttxp(di, forceall))) ++ PKTFREE(di->osh, p, TRUE); ++} ++ ++static bool ++dma32_txstopped(dma_info_t *di) ++{ ++ return ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) == XS_XS_STOPPED); ++} ++ ++static bool ++dma32_rxstopped(dma_info_t *di) ++{ ++ return ((R_REG(di->osh, &di->d32rxregs->status) & RS_RS_MASK) == RS_RS_STOPPED); ++} + -+/*** 32 bits DMA non-inline functions ***/ +static bool +dma32_alloc(dma_info_t *di, uint direction) +{ @@ -19096,7 +18179,7 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + uint ddlen; + void *va; + -+ ddlen = sizeof (dma32dd_t); ++ ddlen = sizeof(dma32dd_t); + + size = (direction == DMA_TX) ? (di->ntxd * ddlen) : (di->nrxd * ddlen); + @@ -19105,22 +18188,24 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + + + if (direction == DMA_TX) { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->txdpa)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(ntxd) failed\n", di->name)); ++ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->txdpa, &di->tx_dmah)) == NULL) { ++ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(ntxd) failed\n", ++ di->name)); + return FALSE; + } + -+ di->txd32 = (dma32dd_t*) ROUNDUP((uintptr)va, D32RINGALIGN); ++ di->txd32 = (dma32dd_t *) ROUNDUP((uintptr)va, D32RINGALIGN); + di->txdalign = (uint)((int8*)di->txd32 - (int8*)va); + di->txdpa += di->txdalign; + di->txdalloc = size; + ASSERT(ISALIGNED((uintptr)di->txd32, D32RINGALIGN)); + } else { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->rxdpa)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(nrxd) failed\n", di->name)); ++ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->rxdpa, &di->rx_dmah)) == NULL) { ++ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(nrxd) failed\n", ++ di->name)); + return FALSE; + } -+ di->rxd32 = (dma32dd_t*) ROUNDUP((uintptr)va, D32RINGALIGN); ++ di->rxd32 = (dma32dd_t *) ROUNDUP((uintptr)va, D32RINGALIGN); + di->rxdalign = (uint)((int8*)di->rxd32 - (int8*)va); + di->rxdpa += di->rxdalign; + di->rxdalloc = size; @@ -19130,75 +18215,103 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + return TRUE; +} + -+static void ++static bool +dma32_txreset(dma_info_t *di) +{ + uint32 status; + ++ if (di->ntxd == 0) ++ return TRUE; ++ + /* suspend tx DMA first */ -+ W_REG(&di->d32txregs->control, XC_SE); -+ SPINWAIT((status = (R_REG(&di->d32txregs->status) & XS_XS_MASK)) != XS_XS_DISABLED && -+ status != XS_XS_IDLE && -+ status != XS_XS_STOPPED, -+ 10000); ++ W_REG(di->osh, &di->d32txregs->control, XC_SE); ++ SPINWAIT(((status = (R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK)) ++ != XS_XS_DISABLED) && ++ (status != XS_XS_IDLE) && ++ (status != XS_XS_STOPPED), ++ (10000)); + -+ W_REG(&di->d32txregs->control, 0); -+ SPINWAIT((status = (R_REG(&di->d32txregs->status) & XS_XS_MASK)) != XS_XS_DISABLED, -+ 10000); -+ -+ if (status != XS_XS_DISABLED) { -+ DMA_ERROR(("%s: dma_txreset: dma cannot be stopped\n", di->name)); -+ } ++ W_REG(di->osh, &di->d32txregs->control, 0); ++ SPINWAIT(((status = (R_REG(di->osh, ++ &di->d32txregs->status) & XS_XS_MASK)) != XS_XS_DISABLED), ++ 10000); + + /* wait for the last transaction to complete */ + OSL_DELAY(300); ++ ++ return (status == XS_XS_DISABLED); +} + -+static void ++static bool ++dma32_rxidle(dma_info_t *di) ++{ ++ DMA_TRACE(("%s: dma_rxidle\n", di->name)); ++ ++ if (di->nrxd == 0) ++ return TRUE; ++ ++ return ((R_REG(di->osh, &di->d32rxregs->status) & RS_CD_MASK) == ++ R_REG(di->osh, &di->d32rxregs->ptr)); ++} ++ ++static bool +dma32_rxreset(dma_info_t *di) +{ + uint32 status; + -+ W_REG(&di->d32rxregs->control, 0); -+ SPINWAIT((status = (R_REG(&di->d32rxregs->status) & RS_RS_MASK)) != RS_RS_DISABLED, -+ 10000); ++ if (di->nrxd == 0) ++ return TRUE; + -+ if (status != RS_RS_DISABLED) { -+ DMA_ERROR(("%s: dma_rxreset: dma cannot be stopped\n", di->name)); -+ } ++ W_REG(di->osh, &di->d32rxregs->control, 0); ++ SPINWAIT(((status = (R_REG(di->osh, ++ &di->d32rxregs->status) & RS_RS_MASK)) != RS_RS_DISABLED), ++ 10000); ++ ++ return (status == RS_RS_DISABLED); ++} ++ ++static bool ++dma32_rxenabled(dma_info_t *di) ++{ ++ uint32 rc; ++ ++ rc = R_REG(di->osh, &di->d32rxregs->control); ++ return ((rc != 0xffffffff) && (rc & RC_RE)); +} + +static bool +dma32_txsuspendedidle(dma_info_t *di) +{ -+ if (!(R_REG(&di->d32txregs->control) & XC_SE)) ++ if (di->ntxd == 0) ++ return TRUE; ++ ++ if (!(R_REG(di->osh, &di->d32txregs->control) & XC_SE)) + return 0; -+ -+ if ((R_REG(&di->d32txregs->status) & XS_XS_MASK) != XS_XS_IDLE) ++ ++ if ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) != XS_XS_IDLE) + return 0; + + OSL_DELAY(2); -+ return ((R_REG(&di->d32txregs->status) & XS_XS_MASK) == XS_XS_IDLE); ++ return ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) == XS_XS_IDLE); +} + -+/* ++/* !! tx entry routine + * supports full 32bit dma engine buffer addressing so + * dma buffers can cross 4 Kbyte page boundaries. + */ +static int -+dma32_txfast(dma_info_t *di, void *p0, uint32 coreflags) ++dma32_txfast(dma_info_t *di, void *p0, bool commit) +{ + void *p, *next; + uchar *data; + uint len; + uint txout; -+ uint32 ctrl; -+ uint32 pa; ++ uint32 flags = 0; ++ uint32 pa; + + DMA_TRACE(("%s: dma_txfast\n", di->name)); + + txout = di->txout; -+ ctrl = 0; + + /* + * Walk the chain of packet buffers @@ -19219,32 +18332,23 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + /* get physical address of buffer start */ + pa = (uint32) DMA_MAP(di->osh, data, len, DMA_TX, p); + -+ /* build the descriptor control value */ -+ ctrl = len & CTRL_BC_MASK; -+ -+ ctrl |= coreflags; -+ ++ flags = 0; + if (p == p0) -+ ctrl |= CTRL_SOF; ++ flags |= CTRL_SOF; + if (next == NULL) -+ ctrl |= (CTRL_IOC | CTRL_EOF); ++ flags |= (CTRL_IOC | CTRL_EOF); + if (txout == (di->ntxd - 1)) -+ ctrl |= CTRL_EOT; -+ -+ if (DMA64_ENAB(di)) { -+ dma64_dd_upd(di, di->txd64, pa, txout, &ctrl, len); -+ } else { -+ dma32_dd_upd(di, di->txd32, pa, txout, &ctrl); -+ } ++ flags |= CTRL_EOT; + ++ dma32_dd_upd(di, di->txd32, pa, txout, &flags, len); + ASSERT(di->txp[txout] == NULL); + + txout = NEXTTXD(txout); + } + + /* if last txd eof not set, fix it */ -+ if (!(ctrl & CTRL_EOF)) -+ W_SM(&di->txd32[PREVTXD(txout)].ctrl, BUS_SWAP32(ctrl | CTRL_IOC | CTRL_EOF)); ++ if (!(flags & CTRL_EOF)) ++ W_SM(&di->txd32[PREVTXD(txout)].ctrl, BUS_SWAP32(flags | CTRL_IOC | CTRL_EOF)); + + /* save the packet */ + di->txp[PREVTXD(txout)] = p0; @@ -19253,26 +18357,29 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + di->txout = txout; + + /* kick the chip */ -+ if (DMA64_ENAB(di)) { -+ W_REG(&di->d64txregs->ptr, I2B(txout, dma64dd_t)); -+ } else { -+ W_REG(&di->d32txregs->ptr, I2B(txout, dma32dd_t)); -+ } ++ if (commit) ++ W_REG(di->osh, &di->d32txregs->ptr, I2B(txout, dma32dd_t)); + + /* tx flow control */ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; ++ di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; + + return (0); + -+ outoftxd: ++outoftxd: + DMA_ERROR(("%s: dma_txfast: out of txds\n", di->name)); + PKTFREE(di->osh, p0, TRUE); -+ di->txavail = 0; ++ di->hnddma.txavail = 0; + di->hnddma.txnobuf++; + return (-1); +} + -+static void* ++/* ++ * Reclaim next completed txd (txds if using chained buffers) and ++ * return associated packet. ++ * If 'force' is true, reclaim txd(s) and return associated packet ++ * regardless of the value of the hardware "curr" pointer. ++ */ ++static void * +dma32_getnexttxp(dma_info_t *di, bool forceall) +{ + uint start, end, i; @@ -19280,20 +18387,24 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + + DMA_TRACE(("%s: dma_getnexttxp %s\n", di->name, forceall ? "all" : "")); + ++ if (di->ntxd == 0) ++ return (NULL); ++ + txp = NULL; + + start = di->txin; + if (forceall) + end = di->txout; + else -+ end = B2I(R_REG(&di->d32txregs->status) & XS_CD_MASK, dma32dd_t); ++ end = B2I(R_REG(di->osh, &di->d32txregs->status) & XS_CD_MASK, dma32dd_t); + + if ((start == 0) && (end > di->txout)) + goto bogus; + + for (i = start; i != end && !txp; i = NEXTTXD(i)) { + DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->txd32[i].addr)) - di->dataoffsetlow), -+ (BUS_SWAP32(R_SM(&di->txd32[i].ctrl)) & CTRL_BC_MASK), DMA_TX, di->txp[i]); ++ (BUS_SWAP32(R_SM(&di->txd32[i].ctrl)) & CTRL_BC_MASK), ++ DMA_TX, di->txp[i]); + + W_SM(&di->txd32[i].addr, 0xdeadbeef); + txp = di->txp[i]; @@ -19303,7 +18414,7 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + di->txin = i; + + /* tx flow control */ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; ++ di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; + + return (txp); + @@ -19322,7 +18433,7 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + void *rxp; + + /* if forcing, dma engine must be disabled */ -+ ASSERT(!forceall || !dma_rxenabled(di)); ++ ASSERT(!forceall || !dma32_rxenabled(di)); + + i = di->rxin; + @@ -19331,7 +18442,7 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + return (NULL); + + /* ignore curr if forceall */ -+ if (!forceall && (i == B2I(R_REG(&di->d32rxregs->status) & RS_CD_MASK, dma32dd_t))) ++ if (!forceall && (i == B2I(R_REG(di->osh, &di->d32rxregs->status) & RS_CD_MASK, dma32dd_t))) + return (NULL); + + /* get the packet pointer that corresponds to the rx descriptor */ @@ -19341,7 +18452,8 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + + /* clear this packet from the descriptor ring */ + DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->rxd32[i].addr)) - di->dataoffsetlow), -+ di->rxbufsize, DMA_RX, rxp); ++ di->rxbufsize, DMA_RX, rxp); ++ + W_SM(&di->rxd32[i].addr, 0xdeadbeef); + + di->rxin = NEXTRXD(i); @@ -19349,8 +18461,11 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + return (rxp); +} + ++/* ++ * Rotate all active tx dma ring entries "forward" by (ActiveDescriptor - txin). ++ */ +static void -+dma32_txrotate(di_t *di) ++dma32_txrotate(dma_info_t *di) +{ + uint ad; + uint nactive; @@ -19359,10 +18474,10 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + uint32 w; + uint first, last; + -+ ASSERT(dma_txsuspendedidle(di)); ++ ASSERT(dma32_txsuspendedidle(di)); + -+ nactive = dma_txactive(di); -+ ad = B2I(((R_REG(&di->d32txregs->status) & XS_AD_MASK) >> XS_AD_SHIFT), dma32dd_t); ++ nactive = _dma_txactive(di); ++ ad = B2I(((R_REG(di->osh, &di->d32txregs->status) & XS_AD_MASK) >> XS_AD_SHIFT), dma32dd_t); + rot = TXD(ad - di->txin); + + ASSERT(rot < di->ntxd); @@ -19384,14 +18499,14 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + * Move the tx dma descriptor. + * EOT is set only in the last entry in the ring. + */ -+ w = R_SM(&di->txd32[old].ctrl) & ~CTRL_EOT; ++ w = BUS_SWAP32(R_SM(&di->txd32[old].ctrl)) & ~CTRL_EOT; + if (new == (di->ntxd - 1)) + w |= CTRL_EOT; -+ W_SM(&di->txd32[new].ctrl, w); ++ W_SM(&di->txd32[new].ctrl, BUS_SWAP32(w)); + W_SM(&di->txd32[new].addr, R_SM(&di->txd32[old].addr)); + + /* zap the old tx dma descriptor address field */ -+ W_SM(&di->txd32[old].addr, 0xdeadbeef); ++ W_SM(&di->txd32[old].addr, BUS_SWAP32(0xdeadbeef)); + + /* move the corresponding txp[] entry */ + ASSERT(di->txp[new] == NULL); @@ -19402,463 +18517,686 @@ diff -Naur linux.old/drivers/net/wl2/hnddma.c linux.dev/drivers/net/wl2/hnddma.c + /* update txin and txout */ + di->txin = ad; + di->txout = TXD(di->txout + rot); -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; ++ di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; + + /* kick the chip */ -+ W_REG(&di->d32txregs->ptr, I2B(di->txout, dma32dd_t)); ++ W_REG(di->osh, &di->d32txregs->ptr, I2B(di->txout, dma32dd_t)); +} + -+/*** 64 bits DMA non-inline functions ***/ + -+#ifdef BCMDMA64 -+ -+static bool -+dma64_alloc(dma_info_t *di, uint direction) ++uint ++dma_addrwidth(sb_t *sbh, void *dmaregs) +{ -+ uint size; -+ uint ddlen; -+ uint32 alignbytes; -+ void *va; ++ dma32regs_t *dma32regs; ++ osl_t *osh; + -+ ddlen = sizeof (dma64dd_t); ++ osh = sb_osh(sbh); + -+ size = (direction == DMA_TX) ? (di->ntxd * ddlen) : (di->nrxd * ddlen); ++ /* Start checking for 32-bit / 30-bit addressing */ ++ dma32regs = (dma32regs_t *)dmaregs; + -+ alignbytes = di->dma64align; ++ /* For System Backplane, PCIE bus or addrext feature, 32-bits ok */ ++ if ((BUSTYPE(sbh->bustype) == SB_BUS) || ++ ((BUSTYPE(sbh->bustype) == PCI_BUS) && sbh->buscoretype == SB_PCIE) || ++ (_dma32_addrext(osh, dma32regs))) ++ return (DMADDRWIDTH_32); + -+ if (!ISALIGNED(DMA_CONSISTENT_ALIGN, alignbytes)) -+ size += alignbytes; -+ -+ -+ if (direction == DMA_TX) { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->txdpa)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(ntxd) failed\n", di->name)); -+ return FALSE; -+ } -+ -+ di->txd64 = (dma64dd_t*) ROUNDUP((uintptr)va, alignbytes); -+ di->txdalign = (uint)((int8*)di->txd64 - (int8*)va); -+ di->txdpa += di->txdalign; -+ di->txdalloc = size; -+ ASSERT(ISALIGNED((uintptr)di->txd64, alignbytes)); -+ } else { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->rxdpa)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(nrxd) failed\n", di->name)); -+ return FALSE; -+ } -+ di->rxd64 = (dma64dd_t*) ROUNDUP((uintptr)va, alignbytes); -+ di->rxdalign = (uint)((int8*)di->rxd64 - (int8*)va); -+ di->rxdpa += di->rxdalign; -+ di->rxdalloc = size; -+ ASSERT(ISALIGNED((uintptr)di->rxd64, alignbytes)); -+ } -+ -+ return TRUE; ++ /* Fallthru */ ++ return (DMADDRWIDTH_30); +} -+ -+static void -+dma64_txreset(dma_info_t *di) -+{ -+ uint32 status; -+ -+ /* suspend tx DMA first */ -+ W_REG(&di->d64txregs->control, D64_XC_SE); -+ SPINWAIT((status = (R_REG(&di->d64txregs->status0) & D64_XS0_XS_MASK)) != D64_XS0_XS_DISABLED && -+ status != D64_XS0_XS_IDLE && -+ status != D64_XS0_XS_STOPPED, -+ 10000); -+ -+ W_REG(&di->d64txregs->control, 0); -+ SPINWAIT((status = (R_REG(&di->d64txregs->status0) & D64_XS0_XS_MASK)) != D64_XS0_XS_DISABLED, -+ 10000); -+ -+ if (status != D64_XS0_XS_DISABLED) { -+ DMA_ERROR(("%s: dma_txreset: dma cannot be stopped\n", di->name)); -+ } -+ -+ /* wait for the last transaction to complete */ -+ OSL_DELAY(300); -+} -+ -+static void -+dma64_rxreset(dma_info_t *di) -+{ -+ uint32 status; -+ -+ W_REG(&di->d64rxregs->control, 0); -+ SPINWAIT((status = (R_REG(&di->d64rxregs->status0) & D64_RS0_RS_MASK)) != D64_RS0_RS_DISABLED, -+ 10000); -+ -+ if (status != D64_RS0_RS_DISABLED) { -+ DMA_ERROR(("%s: dma_rxreset: dma cannot be stopped\n", di->name)); -+ } -+} -+ -+static bool -+dma64_txsuspendedidle(dma_info_t *di) -+{ -+ -+ if (!(R_REG(&di->d64txregs->control) & D64_XC_SE)) -+ return 0; -+ -+ if ((R_REG(&di->d64txregs->status0) & D64_XS0_XS_MASK) == D64_XS0_XS_IDLE) -+ return 1; -+ -+ return 0; -+} -+ -+/* -+ * supports full 32bit dma engine buffer addressing so -+ * dma buffers can cross 4 Kbyte page boundaries. -+ */ -+static int -+dma64_txfast(dma_info_t *di, void *p0, uint32 coreflags) -+{ -+ void *p, *next; -+ uchar *data; -+ uint len; -+ uint txout; -+ uint32 flags; -+ uint32 pa; -+ -+ DMA_TRACE(("%s: dma_txfast\n", di->name)); -+ -+ txout = di->txout; -+ flags = 0; -+ -+ /* -+ * Walk the chain of packet buffers -+ * allocating and initializing transmit descriptor entries. -+ */ -+ for (p = p0; p; p = next) { -+ data = PKTDATA(di->osh, p); -+ len = PKTLEN(di->osh, p); -+ next = PKTNEXT(di->osh, p); -+ -+ /* return nonzero if out of tx descriptors */ -+ if (NEXTTXD(txout) == di->txin) -+ goto outoftxd; -+ -+ if (len == 0) -+ continue; -+ -+ /* get physical address of buffer start */ -+ pa = (uint32) DMA_MAP(di->osh, data, len, DMA_TX, p); -+ -+ flags = coreflags; -+ -+ if (p == p0) -+ flags |= D64_CTRL1_SOF; -+ if (next == NULL) -+ flags |= (D64_CTRL1_IOC | D64_CTRL1_EOF); -+ if (txout == (di->ntxd - 1)) -+ flags |= D64_CTRL1_EOT; -+ -+ dma64_dd_upd(di, di->txd64, pa, txout, &flags, len); -+ -+ ASSERT(di->txp[txout] == NULL); -+ -+ txout = NEXTTXD(txout); -+ } -+ -+ /* if last txd eof not set, fix it */ -+ if (!(flags & D64_CTRL1_EOF)) -+ W_SM(&di->txd64[PREVTXD(txout)].ctrl1, BUS_SWAP32(flags | D64_CTRL1_IOC | D64_CTRL1_EOF)); -+ -+ /* save the packet */ -+ di->txp[PREVTXD(txout)] = p0; -+ -+ /* bump the tx descriptor index */ -+ di->txout = txout; -+ -+ /* kick the chip */ -+ W_REG(&di->d64txregs->ptr, I2B(txout, dma64dd_t)); -+ -+ /* tx flow control */ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ return (0); -+ -+outoftxd: -+ DMA_ERROR(("%s: dma_txfast: out of txds\n", di->name)); -+ PKTFREE(di->osh, p0, TRUE); -+ di->txavail = 0; -+ di->hnddma.txnobuf++; -+ return (-1); -+} -+ -+static void* -+dma64_getnexttxp(dma_info_t *di, bool forceall) -+{ -+ uint start, end, i; -+ void *txp; -+ -+ DMA_TRACE(("%s: dma_getnexttxp %s\n", di->name, forceall ? "all" : "")); -+ -+ txp = NULL; -+ -+ start = di->txin; -+ if (forceall) -+ end = di->txout; -+ else -+ end = B2I(R_REG(&di->d64txregs->status0) & D64_XS0_CD_MASK, dma64dd_t); -+ -+ if ((start == 0) && (end > di->txout)) -+ goto bogus; -+ -+ for (i = start; i != end && !txp; i = NEXTTXD(i)) { -+ DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->txd64[i].addrlow)) - di->dataoffsetlow), -+ (BUS_SWAP32(R_SM(&di->txd64[i].ctrl2)) & D64_CTRL2_BC_MASK), DMA_TX, di->txp[i]); -+ -+ W_SM(&di->txd64[i].addrlow, 0xdeadbeef); -+ W_SM(&di->txd64[i].addrhigh, 0xdeadbeef); -+ -+ txp = di->txp[i]; -+ di->txp[i] = NULL; -+ } -+ -+ di->txin = i; -+ -+ /* tx flow control */ -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ return (txp); -+ -+bogus: -+/* -+ DMA_ERROR(("dma_getnexttxp: bogus curr: start %d end %d txout %d force %d\n", -+ start, end, di->txout, forceall)); -+*/ -+ return (NULL); -+} -+ -+static void * -+dma64_getnextrxp(dma_info_t *di, bool forceall) -+{ -+ uint i; -+ void *rxp; -+ -+ /* if forcing, dma engine must be disabled */ -+ ASSERT(!forceall || !dma_rxenabled(di)); -+ -+ i = di->rxin; -+ -+ /* return if no packets posted */ -+ if (i == di->rxout) -+ return (NULL); -+ -+ /* ignore curr if forceall */ -+ if (!forceall && (i == B2I(R_REG(&di->d64rxregs->status0) & D64_RS0_CD_MASK, dma64dd_t))) -+ return (NULL); -+ -+ /* get the packet pointer that corresponds to the rx descriptor */ -+ rxp = di->rxp[i]; -+ ASSERT(rxp); -+ di->rxp[i] = NULL; -+ -+ /* clear this packet from the descriptor ring */ -+ DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->rxd64[i].addrlow)) - di->dataoffsetlow), -+ di->rxbufsize, DMA_RX, rxp); -+ -+ W_SM(&di->rxd64[i].addrlow, 0xdeadbeef); -+ W_SM(&di->rxd64[i].addrhigh, 0xdeadbeef); -+ -+ di->rxin = NEXTRXD(i); -+ -+ return (rxp); -+} -+ -+static void -+dma64_txrotate(di_t *di) -+{ -+ uint ad; -+ uint nactive; -+ uint rot; -+ uint old, new; -+ uint32 w; -+ uint first, last; -+ -+ ASSERT(dma_txsuspendedidle(di)); -+ -+ nactive = dma_txactive(di); -+ ad = B2I((R_REG(&di->d64txregs->status1) & D64_XS1_AD_MASK), dma64dd_t); -+ rot = TXD(ad - di->txin); -+ -+ ASSERT(rot < di->ntxd); -+ -+ /* full-ring case is a lot harder - don't worry about this */ -+ if (rot >= (di->ntxd - nactive)) { -+ DMA_ERROR(("%s: dma_txrotate: ring full - punt\n", di->name)); -+ return; -+ } -+ -+ first = di->txin; -+ last = PREVTXD(di->txout); -+ -+ /* move entries starting at last and moving backwards to first */ -+ for (old = last; old != PREVTXD(first); old = PREVTXD(old)) { -+ new = TXD(old + rot); -+ -+ /* -+ * Move the tx dma descriptor. -+ * EOT is set only in the last entry in the ring. -+ */ -+ w = R_SM(&di->txd64[old].ctrl1) & ~D64_CTRL1_EOT; -+ if (new == (di->ntxd - 1)) -+ w |= D64_CTRL1_EOT; -+ W_SM(&di->txd64[new].ctrl1, w); -+ -+ w = R_SM(&di->txd64[old].ctrl2); -+ W_SM(&di->txd64[new].ctrl2, w); -+ -+ W_SM(&di->txd64[new].addrlow, R_SM(&di->txd64[old].addrlow)); -+ W_SM(&di->txd64[new].addrhigh, R_SM(&di->txd64[old].addrhigh)); -+ -+ /* zap the old tx dma descriptor address field */ -+ W_SM(&di->txd64[old].addrlow, 0xdeadbeef); -+ W_SM(&di->txd64[old].addrhigh, 0xdeadbeef); -+ -+ /* move the corresponding txp[] entry */ -+ ASSERT(di->txp[new] == NULL); -+ di->txp[new] = di->txp[old]; -+ di->txp[old] = NULL; -+ } -+ -+ /* update txin and txout */ -+ di->txin = ad; -+ di->txout = TXD(di->txout + rot); -+ di->txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ /* kick the chip */ -+ W_REG(&di->d64txregs->ptr, I2B(di->txout, dma64dd_t)); -+} -+ -+#endif -+ -diff -Naur linux.old/drivers/net/wl2/hnddma.h linux.dev/drivers/net/wl2/hnddma.h ---- linux.old/drivers/net/wl2/hnddma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl2/hnddma.h 2006-04-06 16:32:44.000000000 +0200 -@@ -0,0 +1,71 @@ +diff -urN linux.old/drivers/net/wl/hnddma.h linux.dev/drivers/net/wl/hnddma.h +--- linux.old/drivers/net/wl/hnddma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/hnddma.h 2006-04-28 02:20:44.000000000 +0200 +@@ -0,0 +1,156 @@ +/* + * Generic Broadcom Home Networking Division (HND) DMA engine SW interface + * This supports the following chips: BCM42xx, 44xx, 47xx . + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ -+ */ -+ -+#ifndef _hnddma_h_ -+#define _hnddma_h_ -+ -+/* export structure */ -+typedef volatile struct { -+ /* rx error counters */ -+ uint rxgiants; /* rx giant frames */ -+ uint rxnobuf; /* rx out of dma descriptors */ -+ /* tx error counters */ -+ uint txnobuf; /* tx out of dma descriptors */ -+} hnddma_t; -+ -+#ifndef di_t -+#define di_t void -+#endif -+ -+#ifndef osl_t -+#define osl_t void -+#endif -+ -+/* externs */ -+extern void * dma_attach(osl_t *osh, char *name, sb_t *sbh, void *dmaregstx, void *dmaregsrx, -+ uint ntxd, uint nrxd, uint rxbufsize, uint nrxpost, uint rxoffset, uint *msg_level); -+extern void dma_detach(di_t *di); -+extern void dma_txreset(di_t *di); -+extern void dma_rxreset(di_t *di); -+extern void dma_txinit(di_t *di); -+extern bool dma_txenabled(di_t *di); -+extern void dma_rxinit(di_t *di); -+extern void dma_rxenable(di_t *di); -+extern bool dma_rxenabled(di_t *di); -+extern void dma_txsuspend(di_t *di); -+extern void dma_txresume(di_t *di); -+extern bool dma_txsuspended(di_t *di); -+extern bool dma_txsuspendedidle(di_t *di); -+extern bool dma_txstopped(di_t *di); -+extern bool dma_rxstopped(di_t *di); -+extern int dma_txfast(di_t *di, void *p, uint32 coreflags); -+extern void dma_fifoloopbackenable(di_t *di); -+extern void *dma_rx(di_t *di); -+extern void dma_rxfill(di_t *di); -+extern void dma_txreclaim(di_t *di, bool forceall); -+extern void dma_rxreclaim(di_t *di); -+extern uintptr dma_getvar(di_t *di, char *name); -+extern void *dma_getnexttxp(di_t *di, bool forceall); -+extern void *dma_peeknexttxp(di_t *di); -+extern void *dma_getnextrxp(di_t *di, bool forceall); -+extern void dma_txblock(di_t *di); -+extern void dma_txunblock(di_t *di); -+extern uint dma_txactive(di_t *di); -+extern void dma_txrotate(di_t *di); -+ -+extern void dma_rxpiomode(dma32regs_t *); -+extern void dma_txpioloopback(dma32regs_t *); -+ -+ -+#endif /* _hnddma_h_ */ -diff -Naur linux.old/drivers/net/wl2/pktq.h linux.dev/drivers/net/wl2/pktq.h ---- linux.old/drivers/net/wl2/pktq.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl2/pktq.h 2006-04-06 17:33:02.000000000 +0200 -@@ -0,0 +1,83 @@ -+/* -+ * Misc useful os-independent macros and functions. -+ * -+ * Copyright 2005, Broadcom Corporation ++ * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * $Id: hnddma.h,v 1.1.1.13 2006/04/08 06:13:39 honor Exp $ ++ */ ++ ++#ifndef _hnddma_h_ ++#define _hnddma_h_ ++ ++typedef const struct hnddma_pub hnddma_t; ++ ++/* dma function type */ ++typedef void (*di_detach_t)(hnddma_t *dmah); ++typedef bool (*di_txreset_t)(hnddma_t *dmah); ++typedef bool (*di_rxreset_t)(hnddma_t *dmah); ++typedef bool (*di_rxidle_t)(hnddma_t *dmah); ++typedef void (*di_txinit_t)(hnddma_t *dmah); ++typedef bool (*di_txenabled_t)(hnddma_t *dmah); ++typedef void (*di_rxinit_t)(hnddma_t *dmah); ++typedef void (*di_txsuspend_t)(hnddma_t *dmah); ++typedef void (*di_txresume_t)(hnddma_t *dmah); ++typedef bool (*di_txsuspended_t)(hnddma_t *dmah); ++typedef bool (*di_txsuspendedidle_t)(hnddma_t *dmah); ++typedef int (*di_txfast_t)(hnddma_t *dmah, void *p, bool commit); ++typedef void (*di_fifoloopbackenable_t)(hnddma_t *dmah); ++typedef bool (*di_txstopped_t)(hnddma_t *dmah); ++typedef bool (*di_rxstopped_t)(hnddma_t *dmah); ++typedef bool (*di_rxenable_t)(hnddma_t *dmah); ++typedef bool (*di_rxenabled_t)(hnddma_t *dmah); ++typedef void* (*di_rx_t)(hnddma_t *dmah); ++typedef void (*di_rxfill_t)(hnddma_t *dmah); ++typedef void (*di_txreclaim_t)(hnddma_t *dmah, bool forceall); ++typedef void (*di_rxreclaim_t)(hnddma_t *dmah); ++typedef uintptr (*di_getvar_t)(hnddma_t *dmah, char *name); ++typedef void* (*di_getnexttxp_t)(hnddma_t *dmah, bool forceall); ++typedef void* (*di_getnextrxp_t)(hnddma_t *dmah, bool forceall); ++typedef void* (*di_peeknexttxp_t)(hnddma_t *dmah); ++typedef void (*di_txblock_t)(hnddma_t *dmah); ++typedef void (*di_txunblock_t)(hnddma_t *dmah); ++typedef uint (*di_txactive_t)(hnddma_t *dmah); ++typedef void (*di_txrotate_t)(hnddma_t *dmah); ++typedef void (*di_counterreset_t)(hnddma_t *dmah); ++typedef char* (*di_dump_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); ++typedef char* (*di_dumptx_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); ++typedef char* (*di_dumprx_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); ++ ++/* dma opsvec */ ++typedef struct di_fcn_s { ++ di_detach_t detach; ++ di_txinit_t txinit; ++ di_txreset_t txreset; ++ di_txenabled_t txenabled; ++ di_txsuspend_t txsuspend; ++ di_txresume_t txresume; ++ di_txsuspended_t txsuspended; ++ di_txsuspendedidle_t txsuspendedidle; ++ di_txfast_t txfast; ++ di_txstopped_t txstopped; ++ di_txreclaim_t txreclaim; ++ di_getnexttxp_t getnexttxp; ++ di_peeknexttxp_t peeknexttxp; ++ di_txblock_t txblock; ++ di_txunblock_t txunblock; ++ di_txactive_t txactive; ++ di_txrotate_t txrotate; ++ ++ di_rxinit_t rxinit; ++ di_rxreset_t rxreset; ++ di_rxidle_t rxidle; ++ di_rxstopped_t rxstopped; ++ di_rxenable_t rxenable; ++ di_rxenabled_t rxenabled; ++ di_rx_t rx; ++ di_rxfill_t rxfill; ++ di_rxreclaim_t rxreclaim; ++ di_getnextrxp_t getnextrxp; ++ ++ di_fifoloopbackenable_t fifoloopbackenable; ++ di_getvar_t d_getvar; ++ di_counterreset_t counterreset; ++ di_dump_t dump; ++ di_dumptx_t dumptx; ++ di_dumprx_t dumprx; ++ uint endnum; ++} di_fcn_t; ++ ++/* ++ * Exported data structure (read-only) ++ */ ++/* export structure */ ++struct hnddma_pub { ++ di_fcn_t di_fn; /* DMA function pointers */ ++ uint txavail; /* # free tx descriptors */ ++ ++ /* rx error counters */ ++ uint rxgiants; /* rx giant frames */ ++ uint rxnobuf; /* rx out of dma descriptors */ ++ /* tx error counters */ ++ uint txnobuf; /* tx out of dma descriptors */ ++}; ++ ++ ++extern hnddma_t * dma_attach(osl_t *osh, char *name, sb_t *sbh, void *dmaregstx, void *dmaregsrx, ++ uint ntxd, uint nrxd, uint rxbufsize, uint nrxpost, uint rxoffset, ++ uint *msg_level); ++#define dma_detach(di) ((di)->di_fn.detach(di)) ++#define dma_txreset(di) ((di)->di_fn.txreset(di)) ++#define dma_rxreset(di) ((di)->di_fn.rxreset(di)) ++#define dma_rxidle(di) ((di)->di_fn.rxidle(di)) ++#define dma_txinit(di) ((di)->di_fn.txinit(di)) ++#define dma_txenabled(di) ((di)->di_fn.txenabled(di)) ++#define dma_rxinit(di) ((di)->di_fn.rxinit(di)) ++#define dma_txsuspend(di) ((di)->di_fn.txsuspend(di)) ++#define dma_txresume(di) ((di)->di_fn.txresume(di)) ++#define dma_txsuspended(di) ((di)->di_fn.txsuspended(di)) ++#define dma_txsuspendedidle(di) ((di)->di_fn.txsuspendedidle(di)) ++#define dma_txfast(di, p, commit) ((di)->di_fn.txfast(di, p, commit)) ++#define dma_fifoloopbackenable(di) ((di)->di_fn.fifoloopbackenable(di)) ++#define dma_txstopped(di) ((di)->di_fn.txstopped(di)) ++#define dma_rxstopped(di) ((di)->di_fn.rxstopped(di)) ++#define dma_rxenable(di) ((di)->di_fn.rxenable(di)) ++#define dma_rxenabled(di) ((di)->di_fn.rxenabled(di)) ++#define dma_rx(di) ((di)->di_fn.rx(di)) ++#define dma_rxfill(di) ((di)->di_fn.rxfill(di)) ++#define dma_txreclaim(di, forceall) ((di)->di_fn.txreclaim(di, forceall)) ++#define dma_rxreclaim(di) ((di)->di_fn.rxreclaim(di)) ++#define dma_getvar(di, name) ((di)->di_fn.d_getvar(di, name)) ++#define dma_getnexttxp(di, forceall) ((di)->di_fn.getnexttxp(di, forceall)) ++#define dma_getnextrxp(di, forceall) ((di)->di_fn.getnextrxp(di, forceall)) ++#define dma_peeknexttxp(di) ((di)->di_fn.peeknexttxp(di)) ++#define dma_txblock(di) ((di)->di_fn.txblock(di)) ++#define dma_txunblock(di) ((di)->di_fn.txunblock(di)) ++#define dma_txactive(di) ((di)->di_fn.txactive(di)) ++#define dma_txrotate(di) ((di)->di_fn.txrotate(di)) ++#define dma_counterreset(di) ((di)->di_fn.counterreset(di)) ++ ++#define DMA_DUMP_SIZE 2048 ++/* return addresswidth allowed ++ * This needs to be done after SB attach but before dma attach. ++ * SB attach provides ability to probe backplane and dma core capabilities ++ * This info is needed by DMA_ALLOC_CONSISTENT in dma attach ++ */ ++extern uint dma_addrwidth(sb_t *sbh, void *dmaregs); ++ ++/* pio helpers */ ++void dma_txpioloopback(osl_t *osh, dma32regs_t *); ++ ++#endif /* _hnddma_h_ */ +diff -urN linux.old/drivers/net/wl/linux_osl.c linux.dev/drivers/net/wl/linux_osl.c +--- linux.old/drivers/net/wl/linux_osl.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/linux_osl.c 2006-04-28 02:29:46.000000000 +0200 +@@ -0,0 +1,269 @@ ++/* ++ * Linux OS Independent Layer ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: linux_osl.c,v 1.1.1.14 2006/04/08 06:13:39 honor Exp $ ++ */ ++ ++#define LINUX_OSL ++ ++#include <typedefs.h> ++#include <bcmendian.h> ++#include <linux/module.h> ++#include <linuxver.h> ++#include <bcmdefs.h> ++#include <osl.h> ++#include "linux_osl.h" ++#include <bcmutils.h> ++#include <linux/delay.h> ++#ifdef mips ++#include <asm/paccess.h> ++#endif /* mips */ ++#include <pcicfg.h> ++ ++#define PCI_CFG_RETRY 10 ++ ++#define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */ ++#define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */ ++ ++typedef struct bcm_mem_link { ++ struct bcm_mem_link *prev; ++ struct bcm_mem_link *next; ++ uint size; ++ int line; ++ char file[BCM_MEM_FILENAME_LEN]; ++} bcm_mem_link_t; ++ ++static int16 linuxbcmerrormap[] = \ ++{ 0, /* 0 */ ++ -EINVAL, /* BCME_ERROR */ ++ -EINVAL, /* BCME_BADARG */ ++ -EINVAL, /* BCME_BADOPTION */ ++ -EINVAL, /* BCME_NOTUP */ ++ -EINVAL, /* BCME_NOTDOWN */ ++ -EINVAL, /* BCME_NOTAP */ ++ -EINVAL, /* BCME_NOTSTA */ ++ -EINVAL, /* BCME_BADKEYIDX */ ++ -EINVAL, /* BCME_RADIOOFF */ ++ -EINVAL, /* BCME_NOTBANDLOCKED */ ++ -EINVAL, /* BCME_NOCLK */ ++ -EINVAL, /* BCME_BADRATESET */ ++ -EINVAL, /* BCME_BADBAND */ ++ -E2BIG, /* BCME_BUFTOOSHORT */ ++ -E2BIG, /* BCME_BUFTOOLONG */ ++ -EBUSY, /* BCME_BUSY */ ++ -EINVAL, /* BCME_NOTASSOCIATED */ ++ -EINVAL, /* BCME_BADSSIDLEN */ ++ -EINVAL, /* BCME_OUTOFRANGECHAN */ ++ -EINVAL, /* BCME_BADCHAN */ ++ -EFAULT, /* BCME_BADADDR */ ++ -ENOMEM, /* BCME_NORESOURCE */ ++ -EOPNOTSUPP, /* BCME_UNSUPPORTED */ ++ -EMSGSIZE, /* BCME_BADLENGTH */ ++ -EINVAL, /* BCME_NOTREADY */ ++ -EPERM, /* BCME_NOTPERMITTED */ ++ -ENOMEM, /* BCME_NOMEM */ ++ -EINVAL, /* BCME_ASSOCIATED */ ++ -ERANGE, /* BCME_RANGE */ ++ -EINVAL, /* BCME_NOTFOUND */ ++ -EINVAL, /* BCME_WME_NOT_ENABLED */ ++ -EINVAL, /* BCME_TSPEC_NOTFOUND */ ++ -EINVAL, /* BCME_ACM_NOTSUPPORTED */ ++ -EINVAL, /* BCME_NOT_WME_ASSOCIATION */ ++ -EIO, /* BCME_SDIO_ERROR */ ++ -ENODEV /* BCME_DONGLE_DOWN */ ++}; ++ ++/* translate bcmerrors into linux errors */ ++int ++osl_error(int bcmerror) ++{ ++ int abs_bcmerror; ++ int array_size = ARRAYSIZE(linuxbcmerrormap); ++ ++ abs_bcmerror = ABS(bcmerror); ++ ++ if (bcmerror > 0) ++ abs_bcmerror = 0; ++ ++ else if (abs_bcmerror >= array_size) ++ abs_bcmerror = BCME_ERROR; ++ ++ return linuxbcmerrormap[abs_bcmerror]; ++} ++ ++osl_t * ++osl_attach(void *pdev, bool pkttag) ++{ ++ osl_t *osh; ++ ++ osh = kmalloc(sizeof(osl_t), GFP_ATOMIC); ++ ASSERT(osh); ++ ++ bzero(osh, sizeof(osl_t)); ++ ++ /* ++ * check the cases where ++ * 1.Error code Added to bcmerror table, but forgot to add it to the OS ++ * dependent error code ++ * 2. Error code is added to the bcmerror table, but forgot to add the ++ * corresponding errorstring(dummy call to bcmerrorstr) ++ */ ++ bcmerrorstr(0); ++ ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(linuxbcmerrormap) - 1)); ++ ++ osh->magic = OS_HANDLE_MAGIC; ++ osh->malloced = 0; ++ osh->failed = 0; ++ osh->dbgmem_list = NULL; ++ osh->pdev = pdev; ++ osh->pub.pkttag = pkttag; ++ ++ return osh; ++} ++ ++void ++osl_detach(osl_t *osh) ++{ ++ if (osh == NULL) ++ return; ++ ++ ASSERT(osh->magic == OS_HANDLE_MAGIC); ++ kfree(osh); ++} ++ ++/* Return a new packet. zero out pkttag */ ++void* ++osl_pktget(osl_t *osh, uint len, bool send) ++{ ++ struct sk_buff *skb; ++ ++ if ((skb = dev_alloc_skb(len))) { ++ skb_put(skb, len); ++ skb->priority = 0; ++ ++#ifdef BCMDBG_PKT ++ pktlist_add(&(osh->pktlist), (void *) skb); ++#endif /* BCMDBG_PKT */ ++ ++ osh->pub.pktalloced++; ++ } ++ ++ return ((void*) skb); ++} ++ ++/* Free the driver packet. Free the tag if present */ ++void ++osl_pktfree(osl_t *osh, void *p) ++{ ++ struct sk_buff *skb, *nskb; ++ ++ skb = (struct sk_buff*) p; ++ ++ /* perversion: we use skb->next to chain multi-skb packets */ ++ while (skb) { ++ nskb = skb->next; ++ skb->next = NULL; ++ ++#ifdef BCMDBG_PKT ++ pktlist_remove(&(osh->pktlist), (void *) skb); ++#endif /* BCMDBG_PKT */ ++ ++ if (skb->destructor) { ++ /* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if destructor exists ++ */ ++ dev_kfree_skb_any(skb); ++ } else { ++ /* can free immediately (even in_irq()) if destructor does not exist */ ++ dev_kfree_skb(skb); ++ } ++ ++ osh->pub.pktalloced--; ++ ++ skb = nskb; ++ } ++} ++ ++void* ++osl_malloc(osl_t *osh, uint size) ++{ ++ void *addr; ++ ++ /* only ASSERT if osh is defined */ ++ if (osh) ++ ASSERT(osh->magic == OS_HANDLE_MAGIC); ++ ++ if ((addr = kmalloc(size, GFP_ATOMIC)) == NULL) { ++ if (osh) ++ osh->failed++; ++ return (NULL); ++ } ++ if (osh) ++ osh->malloced += size; ++ ++ return (addr); ++} ++ ++void ++osl_mfree(osl_t *osh, void *addr, uint size) ++{ ++ if (osh) { ++ ASSERT(osh->magic == OS_HANDLE_MAGIC); ++ osh->malloced -= size; ++ } ++ kfree(addr); ++} ++ ++uint ++osl_malloced(osl_t *osh) ++{ ++ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); ++ return (osh->malloced); ++} ++ ++uint osl_malloc_failed(osl_t *osh) ++{ ++ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); ++ return (osh->failed); ++} ++ ++#undef osl_delay ++void ++osl_delay(uint usec) ++{ ++ OSL_DELAY(usec); ++} ++ ++/* Clone a packet. ++ * The pkttag contents are NOT cloned. ++ */ ++void * ++osl_pktdup(osl_t *osh, void *skb) ++{ ++ void * p; ++ ++ if ((p = skb_clone((struct sk_buff*)skb, GFP_ATOMIC)) == NULL) ++ return NULL; ++ ++ /* skb_clone copies skb->cb.. we don't want that */ ++ if (osh->pub.pkttag) ++ bzero((void*)((struct sk_buff *)p)->cb, OSL_PKTTAG_SZ); ++ ++ /* Increment the packet counter */ ++ osh->pub.pktalloced++; ++ return (p); ++} ++ ++uint ++osl_pktalloced(osl_t *osh) ++{ ++ return (osh->pub.pktalloced); ++} ++ +diff -urN linux.old/drivers/net/wl/linux_osl.h linux.dev/drivers/net/wl/linux_osl.h +--- linux.old/drivers/net/wl/linux_osl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/linux_osl.h 2006-05-02 17:44:29.000000000 +0200 +@@ -0,0 +1,171 @@ ++/* ++ * Linux OS Independent Layer ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: linux_osl.h,v 1.1.1.13 2006/04/08 06:13:39 honor Exp $ ++ */ ++ ++#ifndef _linux_osl_h_ ++#define _linux_osl_h_ ++ ++#include <typedefs.h> ++#include <linuxver.h> ++#include <osl.h> ++ ++#define OSL_PKTTAG_SZ 32 /* Size of PktTag */ ++ ++/* osl handle type forward declaration */ ++typedef struct osl_dmainfo osldma_t; ++ ++/* OSL initialization */ ++extern osl_t *osl_attach(void *pdev, bool pkttag); ++extern void osl_detach(osl_t *osh); ++ ++/* host/bus architecture-specific byte swap */ ++#define BUS_SWAP32(v) (v) ++#define MALLOC_FAILED(osh) osl_malloc_failed((osh)) ++ ++extern void *osl_malloc(osl_t *osh, uint size); ++extern void osl_mfree(osl_t *osh, void *addr, uint size); ++extern uint osl_malloced(osl_t *osh); ++extern uint osl_malloc_failed(osl_t *osh); ++ ++/* API for DMA addressing capability */ ++#define DMA_MAP(osh, va, size, direction, p) \ ++ osl_dma_map((osh), (va), (size), (direction)) ++#define DMA_UNMAP(osh, pa, size, direction, p) \ ++ osl_dma_unmap((osh), (pa), (size), (direction)) ++static inline uint ++osl_dma_map(void *osh, void *va, uint size, int direction) ++{ ++ int dir; ++ struct pci_dev *dev; ++ ++ dev = (osh == NULL ? NULL : ((osl_t *)osh)->pdev); ++ dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; ++ return (pci_map_single(dev, va, size, dir)); ++} ++ ++static inline void ++osl_dma_unmap(void *osh, uint pa, uint size, int direction) ++{ ++ int dir; ++ struct pci_dev *dev; ++ ++ dev = (osh == NULL ? NULL : ((osl_t *)osh)->pdev); ++ dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; ++ pci_unmap_single(dev, (uint32)pa, size, dir); ++} ++ ++#define OSL_DMADDRWIDTH(osh, addrwidth) do {} while (0) ++#define DMA_CONSISTENT_ALIGN PAGE_SIZE ++#define DMA_ALLOC_CONSISTENT(osh, size, pap, dmah) \ ++ osl_dma_alloc_consistent((osh), (size), (pap)) ++#define DMA_FREE_CONSISTENT(osh, va, size, pa, dmah) \ ++ osl_dma_free_consistent((osh), (void*)(va), (size), (pa)) ++static inline void* ++osl_dma_alloc_consistent(osl_t *osh, uint size, ulong *pap) ++{ ++ return (pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap)); ++} ++ ++static inline void ++osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa) ++{ ++ pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); ++} ++ ++ ++/* register access macros */ ++#if defined(BCMJTAG) ++#include <bcmjtag.h> ++#define R_REG(osh, r) bcmjtag_read(NULL, (uint32)(r), sizeof(*(r))) ++#define W_REG(osh, r, v) bcmjtag_write(NULL, (uint32)(r), (uint32)(v), sizeof(*(r))) ++#endif /* defined(BCMSDIO) */ ++ ++/* packet primitives */ ++#define PKTGET(osh, len, send) osl_pktget((osh), (len), (send)) ++#define PKTFREE(osh, skb, send) osl_pktfree((osh), (skb)) ++#define PKTDATA(osh, skb) (((struct sk_buff*)(skb))->data) ++#define PKTLEN(osh, skb) (((struct sk_buff*)(skb))->len) ++#define PKTHEADROOM(osh, skb) (PKTDATA(osh, skb)-(((struct sk_buff*)(skb))->head)) ++#define PKTTAILROOM(osh, skb) ((((struct sk_buff*)(skb))->end)-(((struct sk_buff*)(skb))->tail)) ++#define PKTNEXT(osh, skb) (((struct sk_buff*)(skb))->next) ++#define PKTSETNEXT(osh, skb, x) (((struct sk_buff*)(skb))->next = (struct sk_buff*)(x)) ++#define PKTSETLEN(osh, skb, len) __skb_trim((struct sk_buff*)(skb), (len)) ++#define PKTPUSH(osh, skb, bytes) skb_push((struct sk_buff*)(skb), (bytes)) ++#define PKTPULL(osh, skb, bytes) skb_pull((struct sk_buff*)(skb), (bytes)) ++#define PKTDUP(osh, skb) osl_pktdup((osh), (skb)) ++#define PKTTAG(skb) ((void*)(((struct sk_buff*)(skb))->cb)) ++#define PKTALLOCED(osh) osl_pktalloced((osh)) ++#define PKTLIST_DUMP(osh, buf) ++ ++/* Convert a native(OS) packet to driver packet. ++ * In the process, native packet is destroyed, there is no copying ++ * Also, a packettag is zeroed out ++ */ ++static INLINE void * ++osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb) ++{ ++ struct sk_buff *nskb; ++ ++ if (osh->pkttag) ++ bzero((void*)skb->cb, OSL_PKTTAG_SZ); ++ ++ /* Increment the packet counter */ ++ for (nskb = skb; nskb; nskb = nskb->next) { ++ osh->pktalloced++; ++ } ++ ++ return (void *)skb; ++} ++#define PKTFRMNATIVE(osh, skb) osl_pkt_frmnative(((struct osl_pubinfo *)osh), \ ++ (struct sk_buff*)(skb)) ++ ++/* Convert a driver packet to native(OS) packet ++ * In the process, packettag is zeroed out before sending up ++ * IP code depends on skb->cb to be setup correctly with various options ++ * In our case, that means it should be 0 ++ */ ++static INLINE struct sk_buff * ++osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt) ++{ ++ struct sk_buff *nskb; ++ ++ if (osh->pkttag) ++ bzero(((struct sk_buff*)pkt)->cb, OSL_PKTTAG_SZ); ++ ++ /* Decrement the packet counter */ ++ for (nskb = (struct sk_buff *)pkt; nskb; nskb = nskb->next) { ++ osh->pktalloced--; ++ } ++ ++ return (struct sk_buff *)pkt; ++} ++#define PKTTONATIVE(osh, pkt) osl_pkt_tonative((struct osl_pubinfo *)(osh), (pkt)) ++ ++#define PKTLINK(skb) (((struct sk_buff*)(skb))->prev) ++#define PKTSETLINK(skb, x) (((struct sk_buff*)(skb))->prev = (struct sk_buff*)(x)) ++#define PKTPRIO(skb) (((struct sk_buff*)(skb))->priority) ++#define PKTSETPRIO(skb, x) (((struct sk_buff*)(skb))->priority = (x)) ++#define PKTSHARED(skb) (((struct sk_buff*)(skb))->cloned) ++ ++extern void *osl_pktget(osl_t *osh, uint len, bool send); ++extern void osl_pktfree(osl_t *osh, void *skb); ++extern void *osl_pktdup(osl_t *osh, void *skb); ++extern uint osl_pktalloced(osl_t *osh); ++ ++#define OSL_ERROR(bcmerror) osl_error(bcmerror) ++extern int osl_error(int bcmerror); ++ ++/* the largest reasonable packet buffer driver uses for ethernet MTU in bytes */ ++#define PKTBUFSZ 2048 /* largest reasonable packet buffer, driver uses for ethernet MTU */ ++ ++#endif /* _linux_osl_h_ */ +diff -urN linux.old/drivers/net/wl/pktq.h linux.dev/drivers/net/wl/pktq.h +--- linux.old/drivers/net/wl/pktq.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/pktq.h 2006-04-28 02:11:49.000000000 +0200 +@@ -0,0 +1,97 @@ ++/* ++ * Misc useful os-independent macros and functions. ++ * ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * $Id: bcmutils.h,v 1.1.1.16 2006/04/08 06:13:39 honor Exp $ + */ + +#ifndef _pktq_h_ +#define _pktq_h_ -+ -+/*** driver-only section ***/ -+#ifdef BCMDRIVER -+ -+/* osl packet chain functions */ -+extern uint pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf); -+extern uint pkttotlen(osl_t *osh, void *); -+ -+#define pktenq(pq, p) pktq_penq((pq), 0, (p)) /* legacy */ -+#define pktdeq(pq) pktq_pdeq((pq), 0) /* legacy */ ++#include <osl.h> + +/* osl multi-precedence packet queue */ + -+#define PKTQ_LEN_DEFAULT 128 -+#define PKTQ_MAX_PREC 8 -+struct pktq_prec { -+ void *head; /* first packet to dequeue */ -+ void *tail; /* last packet to dequeue */ -+ uint16 len; /* number of queued packets */ -+ uint16 max; /* maximum number of queued packets */ -+}; ++#define PKTQ_LEN_DEFAULT 128 /* Max 128 packets */ ++#define PKTQ_MAX_PREC 16 /* Maximum precedence levels */ + +struct pktq { -+ struct pktq_prec q[PKTQ_MAX_PREC]; ++ struct pktq_prec { ++ void *head; /* first packet to dequeue */ ++ void *tail; /* last packet to dequeue */ ++ uint16 len; /* number of queued packets */ ++ uint16 max; /* maximum number of queued packets */ ++ } q[PKTQ_MAX_PREC]; + uint16 num_prec; /* number of precedences in use */ + uint16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */ + uint16 max; /* total max packets */ + uint16 len; /* total number of packets */ +}; + ++#define PKTQ_PREC_ITER(pq, prec) for (prec = (pq)->num_prec - 1; prec >= 0; prec--) ++ ++/* forward definition of ether_addr structure used by some function prototypes */ ++ ++struct ether_addr; ++ +/* operations on a specific precedence in packet queue */ + +#define pktq_psetmax(pq, prec, _max) ((pq)->q[prec].max = (_max)) @@ -19874,79 +19212,69 @@ diff -Naur linux.old/drivers/net/wl2/pktq.h linux.dev/drivers/net/wl2/pktq.h +extern void *pktq_penq_head(struct pktq *pq, int prec, void *p); +extern void *pktq_pdeq(struct pktq *pq, int prec); +extern void *pktq_pdeq_tail(struct pktq *pq, int prec); ++/* Empty the queue at particular precedence level */ ++extern void pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir); ++/* Remove a specified packet from its queue */ ++extern bool pktq_pdel(struct pktq *pq, void *p, int prec); ++ ++/* operations on a set of precedences in packet queue */ ++ ++extern int pktq_mlen(struct pktq *pq, uint prec_bmp); ++extern void *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out); + +/* operations on packet queue as a whole */ + -+extern void pktq_init(struct pktq *pq, int num_prec, int max); -+ +#define pktq_len(pq) ((int)(pq)->len) +#define pktq_max(pq) ((int)(pq)->max) +#define pktq_avail(pq) ((int)((pq)->max - (pq)->len)) +#define pktq_full(pq) ((pq)->len >= (pq)->max) +#define pktq_empty(pq) ((pq)->len == 0) + ++/* operations for single precedence queues */ ++#define pktenq(pq, p) pktq_penq((pq), 0, (p)) ++#define pktenq_head(pq, p) pktq_penq_head((pq), 0, (p)) ++#define pktdeq(pq) pktq_pdeq((pq), 0) ++#define pktdeq_tail(pq) pktq_pdeq_tail((pq), 0) ++ ++extern void pktq_init(struct pktq *pq, int num_prec, int max_len); ++/* prec_out may be NULL if caller is not interested in return value */ +extern void *pktq_deq(struct pktq *pq, int *prec_out); +extern void *pktq_deq_tail(struct pktq *pq, int *prec_out); +extern void *pktq_peek(struct pktq *pq, int *prec_out); +extern void *pktq_peek_tail(struct pktq *pq, int *prec_out); ++extern void pktq_flush(osl_t *osh, struct pktq *pq, bool dir); /* Empty the entire queue */ + -+extern int pktq_mlen(struct pktq *pq, uint prec_bmp); -+extern void *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out); ++/* externs */ ++/* packet */ ++extern uint pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf); ++extern uint pkttotlen(osl_t *osh, void *p); ++extern void *pktlast(osl_t *osh, void *p); + -+#define PKTQ_PREC_ITER(pq, prec) for (prec = (pq)->num_prec - 1; prec >= 0; prec--) ++extern void pktsetprio(void *pkt, bool update_vtag); + -+#endif +#endif /* _pktq_h_ */ -diff -Naur linux.old/drivers/net/wl2/sbhnddma.h linux.dev/drivers/net/wl2/sbhnddma.h ---- linux.old/drivers/net/wl2/sbhnddma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl2/sbhnddma.h 2006-04-06 16:32:44.000000000 +0200 -@@ -0,0 +1,312 @@ +diff -urN linux.old/drivers/net/wl/sbhnddma.h linux.dev/drivers/net/wl/sbhnddma.h +--- linux.old/drivers/net/wl/sbhnddma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/wl/sbhnddma.h 2006-04-28 02:20:47.000000000 +0200 +@@ -0,0 +1,284 @@ +/* + * Generic Broadcom Home Networking Division (HND) DMA engine HW interface + * This supports the following chips: BCM42xx, 44xx, 47xx . + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id$ ++ * Copyright 2006, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * ++ * $Id: sbhnddma.h,v 1.1.1.2 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _sbhnddma_h_ +#define _sbhnddma_h_ + -+ -+/* 2byte-wide pio register set per channel(xmt or rcv) */ -+typedef volatile struct { -+ uint16 fifocontrol; -+ uint16 fifodata; -+ uint16 fifofree; /* only valid in xmt channel, not in rcv channel */ -+ uint16 PAD; -+} pio2regs_t; -+ -+/* a pair of pio channels(tx and rx) */ -+typedef volatile struct { -+ pio2regs_t tx; -+ pio2regs_t rx; -+} pio2regp_t; -+ -+/* 4byte-wide pio register set per channel(xmt or rcv) */ -+typedef volatile struct { -+ uint32 fifocontrol; -+ uint32 fifodata; -+} pio4regs_t; -+ -+/* a pair of pio channels(tx and rx) */ -+typedef volatile struct { -+ pio4regs_t tx; -+ pio4regs_t rx; -+} pio4regp_t; -+ -+ -+ +/* DMA structure: + * support two DMA engines: 32 bits address or 64 bit addressing + * basic DMA register set is per channel(transmit or receive) @@ -19954,7 +19282,7 @@ diff -Naur linux.old/drivers/net/wl2/sbhnddma.h linux.dev/drivers/net/wl2/sbhndd + */ + + -+/*** 32 bits addressing ***/ ++/* 32 bits addressing */ + +/* dma registers per channel(xmt or rcv) */ +typedef volatile struct { @@ -20078,7 +19406,7 @@ diff -Naur linux.old/drivers/net/wl2/sbhnddma.h linux.dev/drivers/net/wl2/sbhndd +/* control flags in the range [27:20] are core-specific and not defined here */ +#define CTRL_CORE_MASK 0x0ff00000 + -+/*** 64 bits addressing ***/ ++/* 64 bits addressing */ + +/* dma registers per channel(xmt or rcv) */ +typedef volatile struct { @@ -20109,8 +19437,8 @@ diff -Naur linux.old/drivers/net/wl2/sbhnddma.h linux.dev/drivers/net/wl2/sbhndd +typedef volatile struct { + uint32 ctrl1; /* misc control bits & bufcount */ + uint32 ctrl2; /* buffer count and address extension */ -+ uint32 addrlow; /* memory address of the first byte of the date buffer, bits 31:0 */ -+ uint32 addrhigh; /* memory address of the first byte of the date buffer, bits 63:32 */ ++ uint32 addrlow; /* memory address of the date buffer, bits 31:0 */ ++ uint32 addrhigh; /* memory address of the date buffer, bits 63:32 */ +} dma64dd_t; + +/* @@ -20125,7 +19453,7 @@ diff -Naur linux.old/drivers/net/wl2/sbhnddma.h linux.dev/drivers/net/wl2/sbhndd +#define D64_XC_SE 0x00000002 /* transmit suspend request */ +#define D64_XC_LE 0x00000004 /* loopback enable */ +#define D64_XC_FL 0x00000010 /* flush request */ -+#define D64_XC_AE 0x00110000 /* address extension bits */ ++#define D64_XC_AE 0x00030000 /* address extension bits */ +#define D64_XC_AE_SHIFT 16 + +/* transmit descriptor table pointer */ @@ -20156,7 +19484,7 @@ diff -Naur linux.old/drivers/net/wl2/sbhnddma.h linux.dev/drivers/net/wl2/sbhndd +#define D64_RC_RO_MASK 0x000000fe /* receive frame offset */ +#define D64_RC_RO_SHIFT 1 +#define D64_RC_FM 0x00000100 /* direct fifo receive (pio) mode */ -+#define D64_RC_AE 0x00110000 /* address extension bits */ ++#define D64_RC_AE 0x00030000 /* address extension bits */ +#define D64_RC_AE_SHIFT 16 + +/* receive descriptor table pointer */ @@ -20205,7 +19533,7 @@ diff -Naur linux.old/drivers/net/wl2/sbhnddma.h linux.dev/drivers/net/wl2/sbhndd + +/* descriptor control flags 2 */ +#define D64_CTRL2_BC_MASK 0x00007fff /* buffer byte count mask */ -+#define D64_CTRL2_AE 0x00110000 /* address extension bits */ ++#define D64_CTRL2_AE 0x00030000 /* address extension bits */ +#define D64_CTRL2_AE_SHIFT 16 + +/* control flags in the range [27:20] are core-specific and not defined here */ @@ -20213,9 +19541,9 @@ diff -Naur linux.old/drivers/net/wl2/sbhnddma.h linux.dev/drivers/net/wl2/sbhndd + + +#endif /* _sbhnddma_h_ */ -diff -Naur linux.old/drivers/parport/Config.in linux.dev/drivers/parport/Config.in ---- linux.old/drivers/parport/Config.in 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/drivers/parport/Config.in 2006-04-06 15:34:15.000000000 +0200 +diff -urN linux.old/drivers/parport/Config.in linux.dev/drivers/parport/Config.in +--- linux.old/drivers/parport/Config.in 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/drivers/parport/Config.in 2006-04-27 19:24:19.000000000 +0200 @@ -11,6 +11,7 @@ tristate 'Parallel port support' CONFIG_PARPORT if [ "$CONFIG_PARPORT" != "n" ]; then @@ -20224,9 +19552,9 @@ diff -Naur linux.old/drivers/parport/Config.in linux.dev/drivers/parport/Config. if [ "$CONFIG_PARPORT_PC" != "n" -a "$CONFIG_SERIAL" != "n" ]; then if [ "$CONFIG_SERIAL" = "m" ]; then define_tristate CONFIG_PARPORT_PC_CML1 m -diff -Naur linux.old/drivers/parport/Makefile linux.dev/drivers/parport/Makefile ---- linux.old/drivers/parport/Makefile 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/drivers/parport/Makefile 2006-04-06 15:34:15.000000000 +0200 +diff -urN linux.old/drivers/parport/Makefile linux.dev/drivers/parport/Makefile +--- linux.old/drivers/parport/Makefile 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/drivers/parport/Makefile 2006-04-27 19:24:19.000000000 +0200 @@ -22,6 +22,7 @@ obj-$(CONFIG_PARPORT) += parport.o @@ -20235,9 +19563,9 @@ diff -Naur linux.old/drivers/parport/Makefile linux.dev/drivers/parport/Makefile obj-$(CONFIG_PARPORT_PC_PCMCIA) += parport_cs.o obj-$(CONFIG_PARPORT_AMIGA) += parport_amiga.o obj-$(CONFIG_PARPORT_MFC3) += parport_mfc3.o -diff -Naur linux.old/drivers/parport/parport_splink.c linux.dev/drivers/parport/parport_splink.c +diff -urN linux.old/drivers/parport/parport_splink.c linux.dev/drivers/parport/parport_splink.c --- linux.old/drivers/parport/parport_splink.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/parport/parport_splink.c 2006-04-06 15:34:15.000000000 +0200 ++++ linux.dev/drivers/parport/parport_splink.c 2006-04-27 19:24:19.000000000 +0200 @@ -0,0 +1,345 @@ +/* Low-level parallel port routines for the ASUS WL-500g built-in port + * @@ -20584,1340 +19912,9 @@ diff -Naur linux.old/drivers/parport/parport_splink.c linux.dev/drivers/parport/ +module_init(parport_splink_init) +module_exit(parport_splink_cleanup) + -diff -Naur linux.old/drivers/pcmcia/Makefile linux.dev/drivers/pcmcia/Makefile ---- linux.old/drivers/pcmcia/Makefile 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/drivers/pcmcia/Makefile 2006-04-06 15:34:15.000000000 +0200 -@@ -74,6 +74,10 @@ - au1000_ss-objs-$(CONFIG_MIPS_HYDROGEN3) += au1000_hydrogen3.o - au1000_ss-objs-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o - -+obj-$(CONFIG_PCMCIA_BCM4710) += bcm4710_ss.o -+bcm4710_ss-objs := bcm4710_generic.o -+bcm4710_ss-objs += bcm4710_pcmcia.o -+ - obj-$(CONFIG_PCMCIA_SA1100) += sa1100_cs.o - obj-$(CONFIG_PCMCIA_M8XX) += m8xx_pcmcia.o - obj-$(CONFIG_PCMCIA_SIBYTE) += sibyte_generic.o -@@ -112,5 +116,8 @@ - au1x00_ss.o: $(au1000_ss-objs-y) - $(LD) -r -o $@ $(au1000_ss-objs-y) - -+bcm4710_ss.o: $(bcm4710_ss-objs) -+ $(LD) -r -o $@ $(bcm4710_ss-objs) -+ - yenta_socket.o: $(yenta_socket-objs) - $(LD) $(LD_RFLAG) -r -o $@ $(yenta_socket-objs) -diff -Naur linux.old/drivers/pcmcia/bcm4710_generic.c linux.dev/drivers/pcmcia/bcm4710_generic.c ---- linux.old/drivers/pcmcia/bcm4710_generic.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/pcmcia/bcm4710_generic.c 2006-04-06 15:34:15.000000000 +0200 -@@ -0,0 +1,912 @@ -+/* -+ * -+ * bcm47xx pcmcia driver -+ * -+ * Copyright 2004, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * Based on sa1100_generic.c from www.handhelds.org, -+ * and au1000_generic.c from oss.sgi.com. -+ * -+ * $Id: bcm4710_generic.c,v 1.1 2005/03/16 13:50:00 wbx Exp $ -+ */ -+#include <linux/module.h> -+#include <linux/init.h> -+#include <linux/config.h> -+#include <linux/delay.h> -+#include <linux/ioport.h> -+#include <linux/kernel.h> -+#include <linux/tqueue.h> -+#include <linux/timer.h> -+#include <linux/mm.h> -+#include <linux/proc_fs.h> -+#include <linux/version.h> -+#include <linux/types.h> -+#include <linux/vmalloc.h> -+ -+#include <pcmcia/version.h> -+#include <pcmcia/cs_types.h> -+#include <pcmcia/cs.h> -+#include <pcmcia/ss.h> -+#include <pcmcia/bulkmem.h> -+#include <pcmcia/cistpl.h> -+#include <pcmcia/bus_ops.h> -+#include "cs_internal.h" -+ -+#include <asm/io.h> -+#include <asm/irq.h> -+#include <asm/system.h> -+ -+#include <typedefs.h> -+#include <bcm4710.h> -+#include <sbextif.h> -+ -+#include "bcm4710pcmcia.h" -+ -+#ifdef PCMCIA_DEBUG -+static int pc_debug = PCMCIA_DEBUG; -+#endif -+ -+MODULE_DESCRIPTION("Linux PCMCIA Card Services: bcm47xx Socket Controller"); -+ -+/* This structure maintains housekeeping state for each socket, such -+ * as the last known values of the card detect pins, or the Card Services -+ * callback value associated with the socket: -+ */ -+static struct bcm47xx_pcmcia_socket *pcmcia_socket; -+static int socket_count; -+ -+ -+/* Returned by the low-level PCMCIA interface: */ -+static struct pcmcia_low_level *pcmcia_low_level; -+ -+/* Event poll timer structure */ -+static struct timer_list poll_timer; -+ -+ -+/* Prototypes for routines which are used internally: */ -+ -+static int bcm47xx_pcmcia_driver_init(void); -+static void bcm47xx_pcmcia_driver_shutdown(void); -+static void bcm47xx_pcmcia_task_handler(void *data); -+static void bcm47xx_pcmcia_poll_event(unsigned long data); -+static void bcm47xx_pcmcia_interrupt(int irq, void *dev, struct pt_regs *regs); -+static struct tq_struct bcm47xx_pcmcia_task; -+ -+#ifdef CONFIG_PROC_FS -+static int bcm47xx_pcmcia_proc_status(char *buf, char **start, -+ off_t pos, int count, int *eof, void *data); -+#endif -+ -+ -+/* Prototypes for operations which are exported to the -+ * in-kernel PCMCIA core: -+ */ -+ -+static int bcm47xx_pcmcia_init(unsigned int sock); -+static int bcm47xx_pcmcia_suspend(unsigned int sock); -+static int bcm47xx_pcmcia_register_callback(unsigned int sock, -+ void (*handler)(void *, unsigned int), void *info); -+static int bcm47xx_pcmcia_inquire_socket(unsigned int sock, socket_cap_t *cap); -+static int bcm47xx_pcmcia_get_status(unsigned int sock, u_int *value); -+static int bcm47xx_pcmcia_get_socket(unsigned int sock, socket_state_t *state); -+static int bcm47xx_pcmcia_set_socket(unsigned int sock, socket_state_t *state); -+static int bcm47xx_pcmcia_get_io_map(unsigned int sock, struct pccard_io_map *io); -+static int bcm47xx_pcmcia_set_io_map(unsigned int sock, struct pccard_io_map *io); -+static int bcm47xx_pcmcia_get_mem_map(unsigned int sock, struct pccard_mem_map *mem); -+static int bcm47xx_pcmcia_set_mem_map(unsigned int sock, struct pccard_mem_map *mem); -+#ifdef CONFIG_PROC_FS -+static void bcm47xx_pcmcia_proc_setup(unsigned int sock, struct proc_dir_entry *base); -+#endif -+ -+static struct pccard_operations bcm47xx_pcmcia_operations = { -+ bcm47xx_pcmcia_init, -+ bcm47xx_pcmcia_suspend, -+ bcm47xx_pcmcia_register_callback, -+ bcm47xx_pcmcia_inquire_socket, -+ bcm47xx_pcmcia_get_status, -+ bcm47xx_pcmcia_get_socket, -+ bcm47xx_pcmcia_set_socket, -+ bcm47xx_pcmcia_get_io_map, -+ bcm47xx_pcmcia_set_io_map, -+ bcm47xx_pcmcia_get_mem_map, -+ bcm47xx_pcmcia_set_mem_map, -+#ifdef CONFIG_PROC_FS -+ bcm47xx_pcmcia_proc_setup -+#endif -+}; -+ -+ -+/* -+ * bcm47xx_pcmcia_driver_init() -+ * -+ * This routine performs a basic sanity check to ensure that this -+ * kernel has been built with the appropriate board-specific low-level -+ * PCMCIA support, performs low-level PCMCIA initialization, registers -+ * this socket driver with Card Services, and then spawns the daemon -+ * thread which is the real workhorse of the socket driver. -+ * -+ * Please see linux/Documentation/arm/SA1100/PCMCIA for more information -+ * on the low-level kernel interface. -+ * -+ * Returns: 0 on success, -1 on error -+ */ -+static int __init bcm47xx_pcmcia_driver_init(void) -+{ -+ servinfo_t info; -+ struct pcmcia_init pcmcia_init; -+ struct pcmcia_state state; -+ unsigned int i; -+ unsigned long tmp; -+ -+ -+ printk("\nBCM47XX PCMCIA (CS release %s)\n", CS_RELEASE); -+ -+ CardServices(GetCardServicesInfo, &info); -+ -+ if (info.Revision != CS_RELEASE_CODE) { -+ printk(KERN_ERR "Card Services release codes do not match\n"); -+ return -1; -+ } -+ -+#ifdef CONFIG_BCM4710 -+ pcmcia_low_level=&bcm4710_pcmcia_ops; -+#else -+#error Unsupported Broadcom BCM47XX board. -+#endif -+ -+ pcmcia_init.handler=bcm47xx_pcmcia_interrupt; -+ -+ if ((socket_count = pcmcia_low_level->init(&pcmcia_init)) < 0) { -+ printk(KERN_ERR "Unable to initialize PCMCIA service.\n"); -+ return -EIO; -+ } else { -+ printk("\t%d PCMCIA sockets initialized.\n", socket_count); -+ } -+ -+ pcmcia_socket = -+ kmalloc(sizeof(struct bcm47xx_pcmcia_socket) * socket_count, -+ GFP_KERNEL); -+ memset(pcmcia_socket, 0, -+ sizeof(struct bcm47xx_pcmcia_socket) * socket_count); -+ if (!pcmcia_socket) { -+ printk(KERN_ERR "Card Services can't get memory \n"); -+ return -1; -+ } -+ -+ for (i = 0; i < socket_count; i++) { -+ if (pcmcia_low_level->socket_state(i, &state) < 0) { -+ printk(KERN_ERR "Unable to get PCMCIA status\n"); -+ return -EIO; -+ } -+ pcmcia_socket[i].k_state = state; -+ pcmcia_socket[i].cs_state.csc_mask = SS_DETECT; -+ -+ if (i == 0) { -+ pcmcia_socket[i].virt_io = -+ (unsigned long)ioremap_nocache(EXTIF_PCMCIA_IOBASE(BCM4710_EXTIF), 0x1000); -+ /* Substract ioport base which gets added by in/out */ -+ pcmcia_socket[i].virt_io -= mips_io_port_base; -+ pcmcia_socket[i].phys_attr = -+ (unsigned long)EXTIF_PCMCIA_CFGBASE(BCM4710_EXTIF); -+ pcmcia_socket[i].phys_mem = -+ (unsigned long)EXTIF_PCMCIA_MEMBASE(BCM4710_EXTIF); -+ } else { -+ printk(KERN_ERR "bcm4710: socket 1 not supported\n"); -+ return 1; -+ } -+ } -+ -+ /* Only advertise as many sockets as we can detect: */ -+ if (register_ss_entry(socket_count, &bcm47xx_pcmcia_operations) < 0) { -+ printk(KERN_ERR "Unable to register socket service routine\n"); -+ return -ENXIO; -+ } -+ -+ /* Start the event poll timer. -+ * It will reschedule by itself afterwards. -+ */ -+ bcm47xx_pcmcia_poll_event(0); -+ -+ DEBUG(1, "bcm4710: initialization complete\n"); -+ return 0; -+ -+} -+ -+module_init(bcm47xx_pcmcia_driver_init); -+ -+ -+/* -+ * bcm47xx_pcmcia_driver_shutdown() -+ * -+ * Invokes the low-level kernel service to free IRQs associated with this -+ * socket controller and reset GPIO edge detection. -+ */ -+static void __exit bcm47xx_pcmcia_driver_shutdown(void) -+{ -+ int i; -+ -+ del_timer_sync(&poll_timer); -+ unregister_ss_entry(&bcm47xx_pcmcia_operations); -+ pcmcia_low_level->shutdown(); -+ flush_scheduled_tasks(); -+ for (i = 0; i < socket_count; i++) { -+ if (pcmcia_socket[i].virt_io) -+ iounmap((void *)pcmcia_socket[i].virt_io); -+ if (pcmcia_socket[i].phys_attr) -+ iounmap((void *)pcmcia_socket[i].phys_attr); -+ if (pcmcia_socket[i].phys_mem) -+ iounmap((void *)pcmcia_socket[i].phys_mem); -+ } -+ DEBUG(1, "bcm4710: shutdown complete\n"); -+} -+ -+module_exit(bcm47xx_pcmcia_driver_shutdown); -+ -+/* -+ * bcm47xx_pcmcia_init() -+ * We perform all of the interesting initialization tasks in -+ * bcm47xx_pcmcia_driver_init(). -+ * -+ * Returns: 0 -+ */ -+static int bcm47xx_pcmcia_init(unsigned int sock) -+{ -+ DEBUG(1, "%s(): initializing socket %u\n", __FUNCTION__, sock); -+ -+ return 0; -+} -+ -+/* -+ * bcm47xx_pcmcia_suspend() -+ * -+ * We don't currently perform any actions on a suspend. -+ * -+ * Returns: 0 -+ */ -+static int bcm47xx_pcmcia_suspend(unsigned int sock) -+{ -+ DEBUG(1, "%s(): suspending socket %u\n", __FUNCTION__, sock); -+ -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_events() -+ * -+ * Helper routine to generate a Card Services event mask based on -+ * state information obtained from the kernel low-level PCMCIA layer -+ * in a recent (and previous) sampling. Updates `prev_state'. -+ * -+ * Returns: an event mask for the given socket state. -+ */ -+static inline unsigned -+bcm47xx_pcmcia_events(struct pcmcia_state *state, -+ struct pcmcia_state *prev_state, -+ unsigned int mask, unsigned int flags) -+{ -+ unsigned int events=0; -+ -+ if (state->bvd1 != prev_state->bvd1) { -+ -+ DEBUG(3, "%s(): card BVD1 value %u\n", __FUNCTION__, state->bvd1); -+ -+ events |= mask & (flags & SS_IOCARD) ? SS_STSCHG : SS_BATDEAD; -+ } -+ -+ if (state->bvd2 != prev_state->bvd2) { -+ -+ DEBUG(3, "%s(): card BVD2 value %u\n", __FUNCTION__, state->bvd2); -+ -+ events |= mask & (flags & SS_IOCARD) ? 0 : SS_BATWARN; -+ } -+ -+ if (state->detect != prev_state->detect) { -+ -+ DEBUG(3, "%s(): card detect value %u\n", __FUNCTION__, state->detect); -+ -+ events |= mask & SS_DETECT; -+ } -+ -+ -+ if (state->ready != prev_state->ready) { -+ -+ DEBUG(3, "%s(): card ready value %u\n", __FUNCTION__, state->ready); -+ -+ events |= mask & ((flags & SS_IOCARD) ? 0 : SS_READY); -+ } -+ -+ if (events != 0) { -+ DEBUG(2, "events: %s%s%s%s%s\n", -+ (events & SS_DETECT) ? "DETECT " : "", -+ (events & SS_READY) ? "READY " : "", -+ (events & SS_BATDEAD) ? "BATDEAD " : "", -+ (events & SS_BATWARN) ? "BATWARN " : "", -+ (events & SS_STSCHG) ? "STSCHG " : ""); -+ } -+ -+ *prev_state=*state; -+ return events; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_task_handler() -+ * -+ * Processes serviceable socket events using the "eventd" thread context. -+ * -+ * Event processing (specifically, the invocation of the Card Services event -+ * callback) occurs in this thread rather than in the actual interrupt -+ * handler due to the use of scheduling operations in the PCMCIA core. -+ */ -+static void bcm47xx_pcmcia_task_handler(void *data) -+{ -+ struct pcmcia_state state; -+ int i, events, irq_status; -+ -+ DEBUG(4, "%s(): entering PCMCIA monitoring thread\n", __FUNCTION__); -+ -+ for (i = 0; i < socket_count; i++) { -+ if ((irq_status = pcmcia_low_level->socket_state(i, &state)) < 0) -+ printk(KERN_ERR "Error in kernel low-level PCMCIA service.\n"); -+ -+ events = bcm47xx_pcmcia_events(&state, -+ &pcmcia_socket[i].k_state, -+ pcmcia_socket[i].cs_state.csc_mask, -+ pcmcia_socket[i].cs_state.flags); -+ -+ if (pcmcia_socket[i].handler != NULL) { -+ pcmcia_socket[i].handler(pcmcia_socket[i].handler_info, -+ events); -+ } -+ } -+} -+ -+static struct tq_struct bcm47xx_pcmcia_task = { -+ routine: bcm47xx_pcmcia_task_handler -+}; -+ -+ -+/* -+ * bcm47xx_pcmcia_poll_event() -+ * -+ * Let's poll for events in addition to IRQs since IRQ only is unreliable... -+ */ -+static void bcm47xx_pcmcia_poll_event(unsigned long dummy) -+{ -+ DEBUG(4, "%s(): polling for events\n", __FUNCTION__); -+ -+ poll_timer.function = bcm47xx_pcmcia_poll_event; -+ poll_timer.expires = jiffies + BCM47XX_PCMCIA_POLL_PERIOD; -+ add_timer(&poll_timer); -+ schedule_task(&bcm47xx_pcmcia_task); -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_interrupt() -+ * -+ * Service routine for socket driver interrupts (requested by the -+ * low-level PCMCIA init() operation via bcm47xx_pcmcia_thread()). -+ * -+ * The actual interrupt-servicing work is performed by -+ * bcm47xx_pcmcia_task(), largely because the Card Services event- -+ * handling code performs scheduling operations which cannot be -+ * executed from within an interrupt context. -+ */ -+static void -+bcm47xx_pcmcia_interrupt(int irq, void *dev, struct pt_regs *regs) -+{ -+ DEBUG(3, "%s(): servicing IRQ %d\n", __FUNCTION__, irq); -+ schedule_task(&bcm47xx_pcmcia_task); -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_register_callback() -+ * -+ * Implements the register_callback() operation for the in-kernel -+ * PCMCIA service (formerly SS_RegisterCallback in Card Services). If -+ * the function pointer `handler' is not NULL, remember the callback -+ * location in the state for `sock', and increment the usage counter -+ * for the driver module. (The callback is invoked from the interrupt -+ * service routine, bcm47xx_pcmcia_interrupt(), to notify Card Services -+ * of interesting events.) Otherwise, clear the callback pointer in the -+ * socket state and decrement the module usage count. -+ * -+ * Returns: 0 -+ */ -+static int -+bcm47xx_pcmcia_register_callback(unsigned int sock, -+ void (*handler)(void *, unsigned int), void *info) -+{ -+ if (handler == NULL) { -+ pcmcia_socket[sock].handler = NULL; -+ MOD_DEC_USE_COUNT; -+ } else { -+ MOD_INC_USE_COUNT; -+ pcmcia_socket[sock].handler = handler; -+ pcmcia_socket[sock].handler_info = info; -+ } -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_inquire_socket() -+ * -+ * Implements the inquire_socket() operation for the in-kernel PCMCIA -+ * service (formerly SS_InquireSocket in Card Services). Of note is -+ * the setting of the SS_CAP_PAGE_REGS bit in the `features' field of -+ * `cap' to "trick" Card Services into tolerating large "I/O memory" -+ * addresses. Also set is SS_CAP_STATIC_MAP, which disables the memory -+ * resource database check. (Mapped memory is set up within the socket -+ * driver itself.) -+ * -+ * In conjunction with the STATIC_MAP capability is a new field, -+ * `io_offset', recommended by David Hinds. Rather than go through -+ * the SetIOMap interface (which is not quite suited for communicating -+ * window locations up from the socket driver), we just pass up -+ * an offset which is applied to client-requested base I/O addresses -+ * in alloc_io_space(). -+ * -+ * Returns: 0 on success, -1 if no pin has been configured for `sock' -+ */ -+static int -+bcm47xx_pcmcia_inquire_socket(unsigned int sock, socket_cap_t *cap) -+{ -+ struct pcmcia_irq_info irq_info; -+ -+ if (sock >= socket_count) { -+ printk(KERN_ERR "bcm47xx: socket %u not configured\n", sock); -+ return -1; -+ } -+ -+ /* SS_CAP_PAGE_REGS: used by setup_cis_mem() in cistpl.c to set the -+ * force_low argument to validate_mem() in rsrc_mgr.c -- since in -+ * general, the mapped * addresses of the PCMCIA memory regions -+ * will not be within 0xffff, setting force_low would be -+ * undesirable. -+ * -+ * SS_CAP_STATIC_MAP: don't bother with the (user-configured) memory -+ * resource database; we instead pass up physical address ranges -+ * and allow other parts of Card Services to deal with remapping. -+ * -+ * SS_CAP_PCCARD: we can deal with 16-bit PCMCIA & CF cards, but -+ * not 32-bit CardBus devices. -+ */ -+ cap->features = (SS_CAP_PAGE_REGS | SS_CAP_STATIC_MAP | SS_CAP_PCCARD); -+ -+ irq_info.sock = sock; -+ irq_info.irq = -1; -+ -+ if (pcmcia_low_level->get_irq_info(&irq_info) < 0) { -+ printk(KERN_ERR "Error obtaining IRQ info socket %u\n", sock); -+ return -1; -+ } -+ -+ cap->irq_mask = 0; -+ cap->map_size = PAGE_SIZE; -+ cap->pci_irq = irq_info.irq; -+ cap->io_offset = pcmcia_socket[sock].virt_io; -+ -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_get_status() -+ * -+ * Implements the get_status() operation for the in-kernel PCMCIA -+ * service (formerly SS_GetStatus in Card Services). Essentially just -+ * fills in bits in `status' according to internal driver state or -+ * the value of the voltage detect chipselect register. -+ * -+ * As a debugging note, during card startup, the PCMCIA core issues -+ * three set_socket() commands in a row the first with RESET deasserted, -+ * the second with RESET asserted, and the last with RESET deasserted -+ * again. Following the third set_socket(), a get_status() command will -+ * be issued. The kernel is looking for the SS_READY flag (see -+ * setup_socket(), reset_socket(), and unreset_socket() in cs.c). -+ * -+ * Returns: 0 -+ */ -+static int -+bcm47xx_pcmcia_get_status(unsigned int sock, unsigned int *status) -+{ -+ struct pcmcia_state state; -+ -+ -+ if ((pcmcia_low_level->socket_state(sock, &state)) < 0) { -+ printk(KERN_ERR "Unable to get PCMCIA status from kernel.\n"); -+ return -1; -+ } -+ -+ pcmcia_socket[sock].k_state = state; -+ -+ *status = state.detect ? SS_DETECT : 0; -+ -+ *status |= state.ready ? SS_READY : 0; -+ -+ /* The power status of individual sockets is not available -+ * explicitly from the hardware, so we just remember the state -+ * and regurgitate it upon request: -+ */ -+ *status |= pcmcia_socket[sock].cs_state.Vcc ? SS_POWERON : 0; -+ -+ if (pcmcia_socket[sock].cs_state.flags & SS_IOCARD) -+ *status |= state.bvd1 ? SS_STSCHG : 0; -+ else { -+ if (state.bvd1 == 0) -+ *status |= SS_BATDEAD; -+ else if (state.bvd2 == 0) -+ *status |= SS_BATWARN; -+ } -+ -+ *status |= state.vs_3v ? SS_3VCARD : 0; -+ -+ *status |= state.vs_Xv ? SS_XVCARD : 0; -+ -+ DEBUG(2, "\tstatus: %s%s%s%s%s%s%s%s\n", -+ (*status&SS_DETECT)?"DETECT ":"", -+ (*status&SS_READY)?"READY ":"", -+ (*status&SS_BATDEAD)?"BATDEAD ":"", -+ (*status&SS_BATWARN)?"BATWARN ":"", -+ (*status&SS_POWERON)?"POWERON ":"", -+ (*status&SS_STSCHG)?"STSCHG ":"", -+ (*status&SS_3VCARD)?"3VCARD ":"", -+ (*status&SS_XVCARD)?"XVCARD ":""); -+ -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_get_socket() -+ * -+ * Implements the get_socket() operation for the in-kernel PCMCIA -+ * service (formerly SS_GetSocket in Card Services). Not a very -+ * exciting routine. -+ * -+ * Returns: 0 -+ */ -+static int -+bcm47xx_pcmcia_get_socket(unsigned int sock, socket_state_t *state) -+{ -+ DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); -+ -+ /* This information was given to us in an earlier call to set_socket(), -+ * so we're just regurgitating it here: -+ */ -+ *state = pcmcia_socket[sock].cs_state; -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_set_socket() -+ * -+ * Implements the set_socket() operation for the in-kernel PCMCIA -+ * service (formerly SS_SetSocket in Card Services). We more or -+ * less punt all of this work and let the kernel handle the details -+ * of power configuration, reset, &c. We also record the value of -+ * `state' in order to regurgitate it to the PCMCIA core later. -+ * -+ * Returns: 0 -+ */ -+static int -+bcm47xx_pcmcia_set_socket(unsigned int sock, socket_state_t *state) -+{ -+ struct pcmcia_configure configure; -+ -+ DEBUG(2, "\tmask: %s%s%s%s%s%s\n\tflags: %s%s%s%s%s%s\n" -+ "\tVcc %d Vpp %d irq %d\n", -+ (state->csc_mask == 0) ? "<NONE>" : "", -+ (state->csc_mask & SS_DETECT) ? "DETECT " : "", -+ (state->csc_mask & SS_READY) ? "READY " : "", -+ (state->csc_mask & SS_BATDEAD) ? "BATDEAD " : "", -+ (state->csc_mask & SS_BATWARN) ? "BATWARN " : "", -+ (state->csc_mask & SS_STSCHG) ? "STSCHG " : "", -+ (state->flags == 0) ? "<NONE>" : "", -+ (state->flags & SS_PWR_AUTO) ? "PWR_AUTO " : "", -+ (state->flags & SS_IOCARD) ? "IOCARD " : "", -+ (state->flags & SS_RESET) ? "RESET " : "", -+ (state->flags & SS_SPKR_ENA) ? "SPKR_ENA " : "", -+ (state->flags & SS_OUTPUT_ENA) ? "OUTPUT_ENA " : "", -+ state->Vcc, state->Vpp, state->io_irq); -+ -+ configure.sock = sock; -+ configure.vcc = state->Vcc; -+ configure.vpp = state->Vpp; -+ configure.output = (state->flags & SS_OUTPUT_ENA) ? 1 : 0; -+ configure.speaker = (state->flags & SS_SPKR_ENA) ? 1 : 0; -+ configure.reset = (state->flags & SS_RESET) ? 1 : 0; -+ -+ if (pcmcia_low_level->configure_socket(&configure) < 0) { -+ printk(KERN_ERR "Unable to configure socket %u\n", sock); -+ return -1; -+ } -+ -+ pcmcia_socket[sock].cs_state = *state; -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_get_io_map() -+ * -+ * Implements the get_io_map() operation for the in-kernel PCMCIA -+ * service (formerly SS_GetIOMap in Card Services). Just returns an -+ * I/O map descriptor which was assigned earlier by a set_io_map(). -+ * -+ * Returns: 0 on success, -1 if the map index was out of range -+ */ -+static int -+bcm47xx_pcmcia_get_io_map(unsigned int sock, struct pccard_io_map *map) -+{ -+ DEBUG(2, "bcm47xx_pcmcia_get_io_map: sock %d\n", sock); -+ -+ if (map->map >= MAX_IO_WIN) { -+ printk(KERN_ERR "%s(): map (%d) out of range\n", -+ __FUNCTION__, map->map); -+ return -1; -+ } -+ -+ *map = pcmcia_socket[sock].io_map[map->map]; -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_set_io_map() -+ * -+ * Implements the set_io_map() operation for the in-kernel PCMCIA -+ * service (formerly SS_SetIOMap in Card Services). We configure -+ * the map speed as requested, but override the address ranges -+ * supplied by Card Services. -+ * -+ * Returns: 0 on success, -1 on error -+ */ -+int -+bcm47xx_pcmcia_set_io_map(unsigned int sock, struct pccard_io_map *map) -+{ -+ unsigned int speed; -+ unsigned long start; -+ -+ DEBUG(2, "\tmap %u speed %u\n\tstart 0x%08lx stop 0x%08lx\n" -+ "\tflags: %s%s%s%s%s%s%s%s\n", -+ map->map, map->speed, map->start, map->stop, -+ (map->flags == 0) ? "<NONE>" : "", -+ (map->flags & MAP_ACTIVE) ? "ACTIVE " : "", -+ (map->flags & MAP_16BIT) ? "16BIT " : "", -+ (map->flags & MAP_AUTOSZ) ? "AUTOSZ " : "", -+ (map->flags & MAP_0WS) ? "0WS " : "", -+ (map->flags & MAP_WRPROT) ? "WRPROT " : "", -+ (map->flags & MAP_USE_WAIT) ? "USE_WAIT " : "", -+ (map->flags & MAP_PREFETCH) ? "PREFETCH " : ""); -+ -+ if (map->map >= MAX_IO_WIN) { -+ printk(KERN_ERR "%s(): map (%d) out of range\n", -+ __FUNCTION__, map->map); -+ return -1; -+ } -+ -+ if (map->flags & MAP_ACTIVE) { -+ speed = (map->speed > 0) ? map->speed : BCM47XX_PCMCIA_IO_SPEED; -+ pcmcia_socket[sock].speed_io = speed; -+ } -+ -+ start = map->start; -+ -+ if (map->stop == 1) { -+ map->stop = PAGE_SIZE - 1; -+ } -+ -+ map->start = pcmcia_socket[sock].virt_io; -+ map->stop = map->start + (map->stop - start); -+ pcmcia_socket[sock].io_map[map->map] = *map; -+ DEBUG(2, "set_io_map %d start %x stop %x\n", -+ map->map, map->start, map->stop); -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_get_mem_map() -+ * -+ * Implements the get_mem_map() operation for the in-kernel PCMCIA -+ * service (formerly SS_GetMemMap in Card Services). Just returns a -+ * memory map descriptor which was assigned earlier by a -+ * set_mem_map() request. -+ * -+ * Returns: 0 on success, -1 if the map index was out of range -+ */ -+static int -+bcm47xx_pcmcia_get_mem_map(unsigned int sock, struct pccard_mem_map *map) -+{ -+ DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); -+ -+ if (map->map >= MAX_WIN) { -+ printk(KERN_ERR "%s(): map (%d) out of range\n", -+ __FUNCTION__, map->map); -+ return -1; -+ } -+ -+ *map = pcmcia_socket[sock].mem_map[map->map]; -+ return 0; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_set_mem_map() -+ * -+ * Implements the set_mem_map() operation for the in-kernel PCMCIA -+ * service (formerly SS_SetMemMap in Card Services). We configure -+ * the map speed as requested, but override the address ranges -+ * supplied by Card Services. -+ * -+ * Returns: 0 on success, -1 on error -+ */ -+static int -+bcm47xx_pcmcia_set_mem_map(unsigned int sock, struct pccard_mem_map *map) -+{ -+ unsigned int speed; -+ unsigned long start; -+ u_long flags; -+ -+ if (map->map >= MAX_WIN) { -+ printk(KERN_ERR "%s(): map (%d) out of range\n", -+ __FUNCTION__, map->map); -+ return -1; -+ } -+ -+ DEBUG(2, "\tmap %u speed %u\n\tsys_start %#lx\n" -+ "\tsys_stop %#lx\n\tcard_start %#x\n" -+ "\tflags: %s%s%s%s%s%s%s%s\n", -+ map->map, map->speed, map->sys_start, map->sys_stop, -+ map->card_start, (map->flags == 0) ? "<NONE>" : "", -+ (map->flags & MAP_ACTIVE) ? "ACTIVE " : "", -+ (map->flags & MAP_16BIT) ? "16BIT " : "", -+ (map->flags & MAP_AUTOSZ) ? "AUTOSZ " : "", -+ (map->flags & MAP_0WS) ? "0WS " : "", -+ (map->flags & MAP_WRPROT) ? "WRPROT " : "", -+ (map->flags & MAP_ATTRIB) ? "ATTRIB " : "", -+ (map->flags & MAP_USE_WAIT) ? "USE_WAIT " : ""); -+ -+ if (map->flags & MAP_ACTIVE) { -+ /* When clients issue RequestMap, the access speed is not always -+ * properly configured: -+ */ -+ speed = (map->speed > 0) ? map->speed : BCM47XX_PCMCIA_MEM_SPEED; -+ -+ /* TBD */ -+ if (map->flags & MAP_ATTRIB) { -+ pcmcia_socket[sock].speed_attr = speed; -+ } else { -+ pcmcia_socket[sock].speed_mem = speed; -+ } -+ } -+ -+ save_flags(flags); -+ cli(); -+ start = map->sys_start; -+ -+ if (map->sys_stop == 0) -+ map->sys_stop = PAGE_SIZE - 1; -+ -+ if (map->flags & MAP_ATTRIB) { -+ map->sys_start = pcmcia_socket[sock].phys_attr + -+ map->card_start; -+ } else { -+ map->sys_start = pcmcia_socket[sock].phys_mem + -+ map->card_start; -+ } -+ -+ map->sys_stop = map->sys_start + (map->sys_stop - start); -+ pcmcia_socket[sock].mem_map[map->map] = *map; -+ restore_flags(flags); -+ DEBUG(2, "set_mem_map %d start %x stop %x card_start %x\n", -+ map->map, map->sys_start, map->sys_stop, -+ map->card_start); -+ return 0; -+} -+ -+ -+#if defined(CONFIG_PROC_FS) -+ -+/* -+ * bcm47xx_pcmcia_proc_setup() -+ * -+ * Implements the proc_setup() operation for the in-kernel PCMCIA -+ * service (formerly SS_ProcSetup in Card Services). -+ * -+ * Returns: 0 on success, -1 on error -+ */ -+static void -+bcm47xx_pcmcia_proc_setup(unsigned int sock, struct proc_dir_entry *base) -+{ -+ struct proc_dir_entry *entry; -+ -+ if ((entry = create_proc_entry("status", 0, base)) == NULL) { -+ printk(KERN_ERR "Unable to install \"status\" procfs entry\n"); -+ return; -+ } -+ -+ entry->read_proc = bcm47xx_pcmcia_proc_status; -+ entry->data = (void *)sock; -+} -+ -+ -+/* -+ * bcm47xx_pcmcia_proc_status() -+ * -+ * Implements the /proc/bus/pccard/??/status file. -+ * -+ * Returns: the number of characters added to the buffer -+ */ -+static int -+bcm47xx_pcmcia_proc_status(char *buf, char **start, off_t pos, -+ int count, int *eof, void *data) -+{ -+ char *p = buf; -+ unsigned int sock = (unsigned int)data; -+ -+ p += sprintf(p, "k_flags : %s%s%s%s%s%s%s\n", -+ pcmcia_socket[sock].k_state.detect ? "detect " : "", -+ pcmcia_socket[sock].k_state.ready ? "ready " : "", -+ pcmcia_socket[sock].k_state.bvd1 ? "bvd1 " : "", -+ pcmcia_socket[sock].k_state.bvd2 ? "bvd2 " : "", -+ pcmcia_socket[sock].k_state.wrprot ? "wrprot " : "", -+ pcmcia_socket[sock].k_state.vs_3v ? "vs_3v " : "", -+ pcmcia_socket[sock].k_state.vs_Xv ? "vs_Xv " : ""); -+ -+ p += sprintf(p, "status : %s%s%s%s%s%s%s%s%s\n", -+ pcmcia_socket[sock].k_state.detect ? "SS_DETECT " : "", -+ pcmcia_socket[sock].k_state.ready ? "SS_READY " : "", -+ pcmcia_socket[sock].cs_state.Vcc ? "SS_POWERON " : "", -+ pcmcia_socket[sock].cs_state.flags & SS_IOCARD ? "SS_IOCARD " : "", -+ (pcmcia_socket[sock].cs_state.flags & SS_IOCARD && -+ pcmcia_socket[sock].k_state.bvd1) ? "SS_STSCHG " : "", -+ ((pcmcia_socket[sock].cs_state.flags & SS_IOCARD) == 0 && -+ (pcmcia_socket[sock].k_state.bvd1 == 0)) ? "SS_BATDEAD " : "", -+ ((pcmcia_socket[sock].cs_state.flags & SS_IOCARD) == 0 && -+ (pcmcia_socket[sock].k_state.bvd2 == 0)) ? "SS_BATWARN " : "", -+ pcmcia_socket[sock].k_state.vs_3v ? "SS_3VCARD " : "", -+ pcmcia_socket[sock].k_state.vs_Xv ? "SS_XVCARD " : ""); -+ -+ p += sprintf(p, "mask : %s%s%s%s%s\n", -+ pcmcia_socket[sock].cs_state.csc_mask & SS_DETECT ? "SS_DETECT " : "", -+ pcmcia_socket[sock].cs_state.csc_mask & SS_READY ? "SS_READY " : "", -+ pcmcia_socket[sock].cs_state.csc_mask & SS_BATDEAD ? "SS_BATDEAD " : "", -+ pcmcia_socket[sock].cs_state.csc_mask & SS_BATWARN ? "SS_BATWARN " : "", -+ pcmcia_socket[sock].cs_state.csc_mask & SS_STSCHG ? "SS_STSCHG " : ""); -+ -+ p += sprintf(p, "cs_flags : %s%s%s%s%s\n", -+ pcmcia_socket[sock].cs_state.flags & SS_PWR_AUTO ? -+ "SS_PWR_AUTO " : "", -+ pcmcia_socket[sock].cs_state.flags & SS_IOCARD ? -+ "SS_IOCARD " : "", -+ pcmcia_socket[sock].cs_state.flags & SS_RESET ? -+ "SS_RESET " : "", -+ pcmcia_socket[sock].cs_state.flags & SS_SPKR_ENA ? -+ "SS_SPKR_ENA " : "", -+ pcmcia_socket[sock].cs_state.flags & SS_OUTPUT_ENA ? -+ "SS_OUTPUT_ENA " : ""); -+ -+ p += sprintf(p, "Vcc : %d\n", pcmcia_socket[sock].cs_state.Vcc); -+ p += sprintf(p, "Vpp : %d\n", pcmcia_socket[sock].cs_state.Vpp); -+ p += sprintf(p, "irq : %d\n", pcmcia_socket[sock].cs_state.io_irq); -+ p += sprintf(p, "I/O : %u\n", pcmcia_socket[sock].speed_io); -+ p += sprintf(p, "attribute: %u\n", pcmcia_socket[sock].speed_attr); -+ p += sprintf(p, "common : %u\n", pcmcia_socket[sock].speed_mem); -+ return p-buf; -+} -+ -+ -+#endif /* defined(CONFIG_PROC_FS) */ -diff -Naur linux.old/drivers/pcmcia/bcm4710_pcmcia.c linux.dev/drivers/pcmcia/bcm4710_pcmcia.c ---- linux.old/drivers/pcmcia/bcm4710_pcmcia.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/pcmcia/bcm4710_pcmcia.c 2006-04-06 15:34:15.000000000 +0200 -@@ -0,0 +1,266 @@ -+/* -+ * BCM4710 specific pcmcia routines. -+ * -+ * Copyright 2004, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id: bcm4710_pcmcia.c,v 1.1 2005/03/16 13:50:00 wbx Exp $ -+ */ -+#include <linux/module.h> -+#include <linux/init.h> -+#include <linux/config.h> -+#include <linux/delay.h> -+#include <linux/ioport.h> -+#include <linux/kernel.h> -+#include <linux/tqueue.h> -+#include <linux/timer.h> -+#include <linux/mm.h> -+#include <linux/proc_fs.h> -+#include <linux/version.h> -+#include <linux/types.h> -+#include <linux/pci.h> -+ -+#include <pcmcia/version.h> -+#include <pcmcia/cs_types.h> -+#include <pcmcia/cs.h> -+#include <pcmcia/ss.h> -+#include <pcmcia/bulkmem.h> -+#include <pcmcia/cistpl.h> -+#include <pcmcia/bus_ops.h> -+#include "cs_internal.h" -+ -+#include <asm/io.h> -+#include <asm/irq.h> -+#include <asm/system.h> -+ -+ -+#include <typedefs.h> -+#include <bcmdevs.h> -+#include <bcm4710.h> -+#include <sbconfig.h> -+#include <sbextif.h> -+ -+#include "bcm4710pcmcia.h" -+ -+/* Use a static var for irq dev_id */ -+static int bcm47xx_pcmcia_dev_id; -+ -+/* Do we think we have a card or not? */ -+static int bcm47xx_pcmcia_present = 0; -+ -+ -+static void bcm4710_pcmcia_reset(void) -+{ -+ extifregs_t *eir; -+ unsigned long s; -+ uint32 out0, out1, outen; -+ -+ -+ eir = (extifregs_t *) ioremap_nocache(BCM4710_REG_EXTIF, sizeof(extifregs_t)); -+ -+ save_and_cli(s); -+ -+ /* Use gpio7 to reset the pcmcia slot */ -+ outen = readl(&eir->gpio[0].outen); -+ outen |= BCM47XX_PCMCIA_RESET; -+ out0 = readl(&eir->gpio[0].out); -+ out0 &= ~(BCM47XX_PCMCIA_RESET); -+ out1 = out0 | BCM47XX_PCMCIA_RESET; -+ -+ writel(out0, &eir->gpio[0].out); -+ writel(outen, &eir->gpio[0].outen); -+ mdelay(1); -+ writel(out1, &eir->gpio[0].out); -+ mdelay(1); -+ writel(out0, &eir->gpio[0].out); -+ -+ restore_flags(s); -+} -+ -+ -+static int bcm4710_pcmcia_init(struct pcmcia_init *init) -+{ -+ struct pci_dev *pdev; -+ extifregs_t *eir; -+ uint32 outen, intp, intm, tmp; -+ uint16 *attrsp; -+ int rc = 0, i; -+ extern unsigned long bcm4710_cpu_cycle; -+ -+ -+ if (!(pdev = pci_find_device(VENDOR_BROADCOM, SB_EXTIF, NULL))) { -+ printk(KERN_ERR "bcm4710_pcmcia: extif not found\n"); -+ return -ENODEV; -+ } -+ eir = (extifregs_t *) ioremap_nocache(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); -+ -+ /* Initialize the pcmcia i/f: 16bit no swap */ -+ writel(CF_EM_PCMCIA | CF_DS | CF_EN, &eir->pcmcia_config); -+ -+#ifdef notYet -+ -+ /* Set the timing for memory accesses */ -+ tmp = (19 / bcm4710_cpu_cycle) << 24; /* W3 = 10nS */ -+ tmp = tmp | ((29 / bcm4710_cpu_cycle) << 16); /* W2 = 20nS */ -+ tmp = tmp | ((109 / bcm4710_cpu_cycle) << 8); /* W1 = 100nS */ -+ tmp = tmp | (129 / bcm4710_cpu_cycle); /* W0 = 120nS */ -+ writel(tmp, &eir->pcmcia_memwait); /* 0x01020a0c for a 100Mhz clock */ -+ -+ /* Set the timing for I/O accesses */ -+ tmp = (19 / bcm4710_cpu_cycle) << 24; /* W3 = 10nS */ -+ tmp = tmp | ((29 / bcm4710_cpu_cycle) << 16); /* W2 = 20nS */ -+ tmp = tmp | ((109 / bcm4710_cpu_cycle) << 8); /* W1 = 100nS */ -+ tmp = tmp | (129 / bcm4710_cpu_cycle); /* W0 = 120nS */ -+ writel(tmp, &eir->pcmcia_iowait); /* 0x01020a0c for a 100Mhz clock */ -+ -+ /* Set the timing for attribute accesses */ -+ tmp = (19 / bcm4710_cpu_cycle) << 24; /* W3 = 10nS */ -+ tmp = tmp | ((29 / bcm4710_cpu_cycle) << 16); /* W2 = 20nS */ -+ tmp = tmp | ((109 / bcm4710_cpu_cycle) << 8); /* W1 = 100nS */ -+ tmp = tmp | (129 / bcm4710_cpu_cycle); /* W0 = 120nS */ -+ writel(tmp, &eir->pcmcia_attrwait); /* 0x01020a0c for a 100Mhz clock */ -+ -+#endif -+ /* Make sure gpio0 and gpio5 are inputs */ -+ outen = readl(&eir->gpio[0].outen); -+ outen &= ~(BCM47XX_PCMCIA_WP | BCM47XX_PCMCIA_STSCHG | BCM47XX_PCMCIA_RESET); -+ writel(outen, &eir->gpio[0].outen); -+ -+ /* Issue a reset to the pcmcia socket */ -+ bcm4710_pcmcia_reset(); -+ -+#ifdef DO_BCM47XX_PCMCIA_INTERRUPTS -+ /* Setup gpio5 to be the STSCHG interrupt */ -+ intp = readl(&eir->gpiointpolarity); -+ writel(intp | BCM47XX_PCMCIA_STSCHG, &eir->gpiointpolarity); /* Active low */ -+ intm = readl(&eir->gpiointmask); -+ writel(intm | BCM47XX_PCMCIA_STSCHG, &eir->gpiointmask); /* Enable it */ -+#endif -+ -+ DEBUG(2, "bcm4710_pcmcia after reset:\n"); -+ DEBUG(2, "\textstatus\t= 0x%08x:\n", readl(&eir->extstatus)); -+ DEBUG(2, "\tpcmcia_config\t= 0x%08x:\n", readl(&eir->pcmcia_config)); -+ DEBUG(2, "\tpcmcia_memwait\t= 0x%08x:\n", readl(&eir->pcmcia_memwait)); -+ DEBUG(2, "\tpcmcia_attrwait\t= 0x%08x:\n", readl(&eir->pcmcia_attrwait)); -+ DEBUG(2, "\tpcmcia_iowait\t= 0x%08x:\n", readl(&eir->pcmcia_iowait)); -+ DEBUG(2, "\tgpioin\t\t= 0x%08x:\n", readl(&eir->gpioin)); -+ DEBUG(2, "\tgpio_outen0\t= 0x%08x:\n", readl(&eir->gpio[0].outen)); -+ DEBUG(2, "\tgpio_out0\t= 0x%08x:\n", readl(&eir->gpio[0].out)); -+ DEBUG(2, "\tgpiointpolarity\t= 0x%08x:\n", readl(&eir->gpiointpolarity)); -+ DEBUG(2, "\tgpiointmask\t= 0x%08x:\n", readl(&eir->gpiointmask)); -+ -+#ifdef DO_BCM47XX_PCMCIA_INTERRUPTS -+ /* Request pcmcia interrupt */ -+ rc = request_irq(BCM47XX_PCMCIA_IRQ, init->handler, SA_INTERRUPT, -+ "PCMCIA Interrupt", &bcm47xx_pcmcia_dev_id); -+#endif -+ -+ attrsp = (uint16 *)ioremap_nocache(EXTIF_PCMCIA_CFGBASE(BCM4710_EXTIF), 0x1000); -+ tmp = readw(&attrsp[0]); -+ DEBUG(2, "\tattr[0] = 0x%04x\n", tmp); -+ if ((tmp == 0x7fff) || (tmp == 0x7f00)) { -+ bcm47xx_pcmcia_present = 0; -+ } else { -+ bcm47xx_pcmcia_present = 1; -+ } -+ -+ /* There's only one socket */ -+ return 1; -+} -+ -+static int bcm4710_pcmcia_shutdown(void) -+{ -+ extifregs_t *eir; -+ uint32 intm; -+ -+ eir = (extifregs_t *) ioremap_nocache(BCM4710_REG_EXTIF, sizeof(extifregs_t)); -+ -+ /* Disable the pcmcia i/f */ -+ writel(0, &eir->pcmcia_config); -+ -+ /* Reset gpio's */ -+ intm = readl(&eir->gpiointmask); -+ writel(intm & ~BCM47XX_PCMCIA_STSCHG, &eir->gpiointmask); /* Disable it */ -+ -+ free_irq(BCM47XX_PCMCIA_IRQ, &bcm47xx_pcmcia_dev_id); -+ -+ return 0; -+} -+ -+static int -+bcm4710_pcmcia_socket_state(unsigned sock, struct pcmcia_state *state) -+{ -+ extifregs_t *eir; -+ -+ eir = (extifregs_t *) ioremap_nocache(BCM4710_REG_EXTIF, sizeof(extifregs_t)); -+ -+ -+ if (sock != 0) { -+ printk(KERN_ERR "bcm4710 socket_state bad sock %d\n", sock); -+ return -1; -+ } -+ -+ if (bcm47xx_pcmcia_present) { -+ state->detect = 1; -+ state->ready = 1; -+ state->bvd1 = 1; -+ state->bvd2 = 1; -+ state->wrprot = (readl(&eir->gpioin) & BCM47XX_PCMCIA_WP) == BCM47XX_PCMCIA_WP; -+ state->vs_3v = 0; -+ state->vs_Xv = 0; -+ } else { -+ state->detect = 0; -+ state->ready = 0; -+ } -+ -+ return 1; -+} -+ -+ -+static int bcm4710_pcmcia_get_irq_info(struct pcmcia_irq_info *info) -+{ -+ if (info->sock >= BCM47XX_PCMCIA_MAX_SOCK) return -1; -+ -+ info->irq = BCM47XX_PCMCIA_IRQ; -+ -+ return 0; -+} -+ -+ -+static int -+bcm4710_pcmcia_configure_socket(const struct pcmcia_configure *configure) -+{ -+ if (configure->sock >= BCM47XX_PCMCIA_MAX_SOCK) return -1; -+ -+ -+ DEBUG(2, "Vcc %dV Vpp %dV output %d speaker %d reset %d\n", configure->vcc, -+ configure->vpp, configure->output, configure->speaker, configure->reset); -+ -+ if ((configure->vcc != 50) || (configure->vpp != 50)) { -+ printk("%s: bad Vcc/Vpp (%d:%d)\n", __FUNCTION__, configure->vcc, -+ configure->vpp); -+ } -+ -+ if (configure->reset) { -+ /* Issue a reset to the pcmcia socket */ -+ DEBUG(1, "%s: Reseting socket\n", __FUNCTION__); -+ bcm4710_pcmcia_reset(); -+ } -+ -+ -+ return 0; -+} -+ -+struct pcmcia_low_level bcm4710_pcmcia_ops = { -+ bcm4710_pcmcia_init, -+ bcm4710_pcmcia_shutdown, -+ bcm4710_pcmcia_socket_state, -+ bcm4710_pcmcia_get_irq_info, -+ bcm4710_pcmcia_configure_socket -+}; -+ -diff -Naur linux.old/drivers/pcmcia/bcm4710pcmcia.h linux.dev/drivers/pcmcia/bcm4710pcmcia.h ---- linux.old/drivers/pcmcia/bcm4710pcmcia.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/pcmcia/bcm4710pcmcia.h 2006-04-06 15:34:15.000000000 +0200 -@@ -0,0 +1,118 @@ -+/* -+ * -+ * bcm47xx pcmcia driver -+ * -+ * Copyright 2004, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * Based on sa1100.h and include/asm-arm/arch-sa1100/pcmica.h -+ * from www.handhelds.org, -+ * and au1000_generic.c from oss.sgi.com. -+ * -+ * $Id: bcm4710pcmcia.h,v 1.1 2005/03/16 13:50:00 wbx Exp $ -+ */ -+ -+#if !defined(_BCM4710PCMCIA_H) -+#define _BCM4710PCMCIA_H -+ -+#include <pcmcia/cs_types.h> -+#include <pcmcia/ss.h> -+#include <pcmcia/bulkmem.h> -+#include <pcmcia/cistpl.h> -+#include "cs_internal.h" -+ -+ -+/* The 47xx can only support one socket */ -+#define BCM47XX_PCMCIA_MAX_SOCK 1 -+ -+/* In the bcm947xx gpio's are used for some pcmcia functions */ -+#define BCM47XX_PCMCIA_WP 0x01 /* Bit 0 is WP input */ -+#define BCM47XX_PCMCIA_STSCHG 0x20 /* Bit 5 is STSCHG input/interrupt */ -+#define BCM47XX_PCMCIA_RESET 0x80 /* Bit 7 is RESET */ -+ -+#define BCM47XX_PCMCIA_IRQ 2 -+ -+/* The socket driver actually works nicely in interrupt-driven form, -+ * so the (relatively infrequent) polling is "just to be sure." -+ */ -+#define BCM47XX_PCMCIA_POLL_PERIOD (2 * HZ) -+ -+#define BCM47XX_PCMCIA_IO_SPEED (255) -+#define BCM47XX_PCMCIA_MEM_SPEED (300) -+ -+ -+struct pcmcia_state { -+ unsigned detect: 1, -+ ready: 1, -+ bvd1: 1, -+ bvd2: 1, -+ wrprot: 1, -+ vs_3v: 1, -+ vs_Xv: 1; -+}; -+ -+ -+struct pcmcia_configure { -+ unsigned sock: 8, -+ vcc: 8, -+ vpp: 8, -+ output: 1, -+ speaker: 1, -+ reset: 1; -+}; -+ -+struct pcmcia_irq_info { -+ unsigned int sock; -+ unsigned int irq; -+}; -+ -+/* This structure encapsulates per-socket state which we might need to -+ * use when responding to a Card Services query of some kind. -+ */ -+struct bcm47xx_pcmcia_socket { -+ socket_state_t cs_state; -+ struct pcmcia_state k_state; -+ unsigned int irq; -+ void (*handler)(void *, unsigned int); -+ void *handler_info; -+ pccard_io_map io_map[MAX_IO_WIN]; -+ pccard_mem_map mem_map[MAX_WIN]; -+ ioaddr_t virt_io, phys_attr, phys_mem; -+ unsigned short speed_io, speed_attr, speed_mem; -+}; -+ -+struct pcmcia_init { -+ void (*handler)(int irq, void *dev, struct pt_regs *regs); -+}; -+ -+struct pcmcia_low_level { -+ int (*init)(struct pcmcia_init *); -+ int (*shutdown)(void); -+ int (*socket_state)(unsigned sock, struct pcmcia_state *); -+ int (*get_irq_info)(struct pcmcia_irq_info *); -+ int (*configure_socket)(const struct pcmcia_configure *); -+}; -+ -+extern struct pcmcia_low_level bcm47xx_pcmcia_ops; -+ -+/* I/O pins replacing memory pins -+ * (PCMCIA System Architecture, 2nd ed., by Don Anderson, p.75) -+ * -+ * These signals change meaning when going from memory-only to -+ * memory-or-I/O interface: -+ */ -+#define iostschg bvd1 -+#define iospkr bvd2 -+ -+ -+/* -+ * Declaration for implementation specific low_level operations. -+ */ -+extern struct pcmcia_low_level bcm4710_pcmcia_ops; -+ -+#endif /* !defined(_BCM4710PCMCIA_H) */ -diff -Naur linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h ---- linux.old/include/asm-mips/bootinfo.h 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/include/asm-mips/bootinfo.h 2006-04-06 15:34:15.000000000 +0200 +diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h +--- linux.old/include/asm-mips/bootinfo.h 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/include/asm-mips/bootinfo.h 2006-04-27 19:24:19.000000000 +0200 @@ -37,6 +37,7 @@ #define MACH_GROUP_HP_LJ 20 /* Hewlett Packard LaserJet */ #define MACH_GROUP_LASAT 21 @@ -21942,9 +19939,9 @@ diff -Naur linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/boot * Valid machtype for group TITAN */ #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ -diff -Naur linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h ---- linux.old/include/asm-mips/cpu.h 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/include/asm-mips/cpu.h 2006-04-06 15:34:15.000000000 +0200 +diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h +--- linux.old/include/asm-mips/cpu.h 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/include/asm-mips/cpu.h 2006-04-27 19:24:19.000000000 +0200 @@ -22,6 +22,11 @@ spec. */ @@ -21993,9 +19990,9 @@ diff -Naur linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h /* * ISA Level encodings -diff -Naur linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcache.h ---- linux.old/include/asm-mips/r4kcache.h 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/include/asm-mips/r4kcache.h 2006-04-06 15:34:15.000000000 +0200 +diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcache.h +--- linux.old/include/asm-mips/r4kcache.h 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/include/asm-mips/r4kcache.h 2006-04-27 19:24:19.000000000 +0200 @@ -658,4 +658,17 @@ cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); } @@ -22014,9 +20011,9 @@ diff -Naur linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kc +} + #endif /* __ASM_R4KCACHE_H */ -diff -Naur linux.old/include/asm-mips/serial.h linux.dev/include/asm-mips/serial.h ---- linux.old/include/asm-mips/serial.h 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/include/asm-mips/serial.h 2006-04-06 15:34:15.000000000 +0200 +diff -urN linux.old/include/asm-mips/serial.h linux.dev/include/asm-mips/serial.h +--- linux.old/include/asm-mips/serial.h 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/include/asm-mips/serial.h 2006-04-27 19:24:19.000000000 +0200 @@ -223,6 +223,13 @@ #define TXX927_SERIAL_PORT_DEFNS #endif @@ -22039,9 +20036,9 @@ diff -Naur linux.old/include/asm-mips/serial.h linux.dev/include/asm-mips/serial COBALT_SERIAL_PORT_DEFNS \ DDB5477_SERIAL_PORT_DEFNS \ EV96100_SERIAL_PORT_DEFNS \ -diff -Naur linux.old/init/do_mounts.c linux.dev/init/do_mounts.c ---- linux.old/init/do_mounts.c 2006-04-06 15:38:09.000000000 +0200 -+++ linux.dev/init/do_mounts.c 2006-04-06 15:34:15.000000000 +0200 +diff -urN linux.old/init/do_mounts.c linux.dev/init/do_mounts.c +--- linux.old/init/do_mounts.c 2006-04-27 18:04:38.000000000 +0200 ++++ linux.dev/init/do_mounts.c 2006-04-27 19:24:19.000000000 +0200 @@ -254,7 +254,13 @@ { "ftlb", 0x2c08 }, { "ftlc", 0x2c10 }, diff --git a/openwrt/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch b/openwrt/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch new file mode 100644 index 00000000000..0759eeb40e5 --- /dev/null +++ b/openwrt/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch @@ -0,0 +1,119 @@ +diff -urN linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/pcibios.c +--- linux.old/arch/mips/bcm947xx/pcibios.c 2006-04-07 21:20:59.000000000 +0200 ++++ linux.dev/arch/mips/bcm947xx/pcibios.c 2006-04-08 03:17:59.000000000 +0200 +@@ -157,6 +157,7 @@ + + static u32 pci_iobase = 0x100; + static u32 pci_membase = SB_PCI_DMA; ++static u32 pcmcia_membase = 0x40004000; + + void __init + pcibios_fixup_bus(struct pci_bus *b) +@@ -188,7 +189,7 @@ + /* Fix up resource bases */ + for (pos = 0; pos < 6; pos++) { + res = &d->resource[pos]; +- base = (res->flags & IORESOURCE_IO) ? &pci_iobase : &pci_membase; ++ base = (res->flags & IORESOURCE_IO) ? &pci_iobase : ((b->number == 2) ? &pcmcia_membase : &pci_membase); + if (res->end) { + size = res->end - res->start + 1; + if (*base & (size - 1)) +@@ -308,7 +309,12 @@ + where = PCI_BASE_ADDRESS_0 + (resource * 4); + size = res->end - res->start; + pci_read_config_dword(dev, where, ®); +- reg = (reg & size) | (((u32)(res->start - root->start)) & ~size); ++ ++ if (dev->bus->number == 1) ++ reg = (reg & size) | (((u32)(res->start - root->start)) & ~size); ++ else ++ reg = res->start; ++ + pci_write_config_dword(dev, where, reg); + } + +diff -urN linux.old/drivers/pcmcia/yenta.c linux.dev/drivers/pcmcia/yenta.c +--- linux.old/drivers/pcmcia/yenta.c 2004-11-17 12:54:21.000000000 +0100 ++++ linux.dev/drivers/pcmcia/yenta.c 2006-04-11 17:47:45.000000000 +0200 +@@ -543,6 +543,9 @@ + * Probe for usable interrupts using the force + * register to generate bogus card status events. + */ ++ ++#ifndef CONFIG_BCM947XX ++ /* WRT54G3G does not like this */ + cb_writel(socket, CB_SOCKET_EVENT, -1); + cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK); + exca_writeb(socket, I365_CSCINT, 0); +@@ -557,7 +560,8 @@ + } + cb_writel(socket, CB_SOCKET_MASK, 0); + exca_writeb(socket, I365_CSCINT, 0); +- ++#endif ++ + mask = probe_irq_mask(val) & 0xffff; + + bridge_ctrl &= ~CB_BRIDGE_INTR; +@@ -578,6 +582,12 @@ + socket->cap.cb_dev = socket->dev; + socket->cap.bus = NULL; + ++#ifdef CONFIG_BCM947XX ++ /* irq mask probing is broken for the WRT54G3G */ ++ if (socket->cap.irq_mask == 0) ++ socket->cap.irq_mask = 0x6f8; ++#endif ++ + printk(KERN_INFO "Yenta ISA IRQ mask 0x%04x, PCI irq %d\n", + socket->cap.irq_mask, socket->cb_irq); + } +@@ -609,6 +619,15 @@ + printk(KERN_INFO "Socket status: %08x\n", + cb_readl(socket, CB_SOCKET_STATE)); + ++ /* Generate an interrupt on card insert/remove */ ++ config_writew(socket, CB_SOCKET_MASK, CB_CSTSMASK | CB_CDMASK); ++ ++ /* Set up Multifunction Routing Status Register */ ++ config_writew(socket, 0x8C, 0x1000 /* MFUNC3 to GPIO3 */ | 0x2 /* MFUNC0 to INTA */); ++ ++ /* Switch interrupts to parallelized */ ++ config_writeb(socket, 0x92, 0x64); ++ + /* Register it with the pcmcia layer.. */ + cardbus_register(socket); + +@@ -731,7 +750,7 @@ + { + struct pci_bus *bus; + struct resource *root, *res; +- u32 start, end; ++ u32 start = 0, end = 0; + u32 align, size, min, max; + unsigned offset; + unsigned mask; +@@ -750,6 +769,15 @@ + res->end = 0; + root = pci_find_parent_resource(socket->dev, res); + ++#ifdef CONFIG_BCM947XX ++ /* default mem resources are completely fscked up on the wrt54g3g */ ++ /* bypass the entire resource allocation stuff below and just set it statically */ ++ if (type & IORESOURCE_MEM) { ++ res->start = 0x40004000; ++ res->end = res->start + 0x3fff; ++ } ++ ++#else + if (!root) + return; + +@@ -794,6 +822,7 @@ + res->start = res->end = 0; + return; + } ++#endif + + config_writel(socket, offset, res->start); + config_writel(socket, offset+4, res->end); diff --git a/openwrt/target/linux/brcm-2.6/Makefile b/openwrt/target/linux/brcm-2.6/Makefile index 9f99fbd6356..5926e6ebcdb 100644 --- a/openwrt/target/linux/brcm-2.6/Makefile +++ b/openwrt/target/linux/brcm-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.4 +LINUX_VERSION:=2.6.16.7 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=cb675279c9711237a06ebb8379a4da27 +LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e include ../rules.mk include ./config diff --git a/openwrt/target/linux/control/kernel.control b/openwrt/target/linux/control/kernel.control index 5432d21a0f2..be5f10940d5 100644 --- a/openwrt/target/linux/control/kernel.control +++ b/openwrt/target/linux/control/kernel.control @@ -1,6 +1,4 @@ Package: kernel Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Virtual package for the Kernel diff --git a/openwrt/target/linux/control/kmod-arptables.control b/openwrt/target/linux/control/kmod-arptables.control index 757db61bb0a..6896388e6e1 100644 --- a/openwrt/target/linux/control/kmod-arptables.control +++ b/openwrt/target/linux/control/kmod-arptables.control @@ -1,6 +1,4 @@ Package: kmod-arptables Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: ARP firewalling kernel modules diff --git a/openwrt/target/linux/control/kmod-atm.control b/openwrt/target/linux/control/kmod-atm.control index ee78ebaf147..ae07126a6a5 100644 --- a/openwrt/target/linux/control/kmod-atm.control +++ b/openwrt/target/linux/control/kmod-atm.control @@ -1,6 +1,4 @@ Package: kmod-atm Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: ATM/ADSL support diff --git a/openwrt/target/linux/control/kmod-ax25.control b/openwrt/target/linux/control/kmod-ax25.control index c080d458547..18c4cef8fea 100644 --- a/openwrt/target/linux/control/kmod-ax25.control +++ b/openwrt/target/linux/control/kmod-ax25.control @@ -1,6 +1,4 @@ Package: kmod-ax25 Priority: optional Section: net -Maintainer: Michael Conrad <openwrt@friggleware.net> -Source: buildroot internal Description: Kernel AX25 driver diff --git a/openwrt/target/linux/control/kmod-bluetooth.control b/openwrt/target/linux/control/kmod-bluetooth.control index a9bd41ac3b0..9f5409a9b77 100644 --- a/openwrt/target/linux/control/kmod-bluetooth.control +++ b/openwrt/target/linux/control/kmod-bluetooth.control @@ -1,6 +1,4 @@ Package: kmod-bluetooth Priority: optional Section: sys -Maintainer: Markus Becker <mab@comnets.uni-bremen.de> -Source: http://bluez.org Description: Bluetooth support diff --git a/openwrt/target/linux/control/kmod-brcm-et.control b/openwrt/target/linux/control/kmod-brcm-et.control index a99a79aa900..3e65bc906ab 100644 --- a/openwrt/target/linux/control/kmod-brcm-et.control +++ b/openwrt/target/linux/control/kmod-brcm-et.control @@ -1,6 +1,4 @@ Package: kmod-brcm-et Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Proprietary driver for Broadcom Ethernet chipsets diff --git a/openwrt/target/linux/control/kmod-brcm-wl.control b/openwrt/target/linux/control/kmod-brcm-wl.control index c8ec8712261..cf610c36739 100644 --- a/openwrt/target/linux/control/kmod-brcm-wl.control +++ b/openwrt/target/linux/control/kmod-brcm-wl.control @@ -1,6 +1,4 @@ Package: kmod-brcm-wl Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Proprietary driver for Broadcom Wireless chipsets diff --git a/openwrt/target/linux/control/kmod-brcm-wl2.control b/openwrt/target/linux/control/kmod-brcm-wl2.control index 39f714c0c56..4ae019ddf96 100644 --- a/openwrt/target/linux/control/kmod-brcm-wl2.control +++ b/openwrt/target/linux/control/kmod-brcm-wl2.control @@ -1,7 +1,5 @@ Package: kmod-brcm-wl2 Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@openwrt.org> -Source: buildroot internal Description: Proprietary driver for Broadcom Wireless chipsets New version with multi-BSS support diff --git a/openwrt/target/linux/control/kmod-cpmac.control b/openwrt/target/linux/control/kmod-cpmac.control index 35d75da0f86..18f8e901b67 100644 --- a/openwrt/target/linux/control/kmod-cpmac.control +++ b/openwrt/target/linux/control/kmod-cpmac.control @@ -1,6 +1,4 @@ Package: kmod-cpmac Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: AR7 CPMAC ethernet driver diff --git a/openwrt/target/linux/control/kmod-crypto.control b/openwrt/target/linux/control/kmod-crypto.control index 1d95456b33b..199d33cd7d3 100644 --- a/openwrt/target/linux/control/kmod-crypto.control +++ b/openwrt/target/linux/control/kmod-crypto.control @@ -1,6 +1,4 @@ Package: kmod-crypto Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: CryptoAPI kernel modules diff --git a/openwrt/target/linux/control/kmod-ebtables.control b/openwrt/target/linux/control/kmod-ebtables.control index 3437759e2dd..85c2af9bccd 100644 --- a/openwrt/target/linux/control/kmod-ebtables.control +++ b/openwrt/target/linux/control/kmod-ebtables.control @@ -1,6 +1,4 @@ Package: kmod-ebtables Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Ethernet bridge firewalling kernel modules diff --git a/openwrt/target/linux/control/kmod-gre.control b/openwrt/target/linux/control/kmod-gre.control index bcf9a625548..42db0cce545 100644 --- a/openwrt/target/linux/control/kmod-gre.control +++ b/openwrt/target/linux/control/kmod-gre.control @@ -1,6 +1,4 @@ Package: kmod-gre Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel GRE tunneling support diff --git a/openwrt/target/linux/control/kmod-ide.control b/openwrt/target/linux/control/kmod-ide.control index 52cd4747ce0..2b02d82257c 100644 --- a/openwrt/target/linux/control/kmod-ide.control +++ b/openwrt/target/linux/control/kmod-ide.control @@ -1,6 +1,4 @@ Package: kmod-ide Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel modules IDE support diff --git a/openwrt/target/linux/control/kmod-ip6tables.control b/openwrt/target/linux/control/kmod-ip6tables.control index 777ab14bc44..6ccf422ffbc 100644 --- a/openwrt/target/linux/control/kmod-ip6tables.control +++ b/openwrt/target/linux/control/kmod-ip6tables.control @@ -1,6 +1,4 @@ Package: kmod-ip6tables Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel modules for ip6tables diff --git a/openwrt/target/linux/control/kmod-ipip.control b/openwrt/target/linux/control/kmod-ipip.control new file mode 100644 index 00000000000..99bf0ec34b5 --- /dev/null +++ b/openwrt/target/linux/control/kmod-ipip.control @@ -0,0 +1,4 @@ +Package: kmod-ipip +Section: sys +Priority: optional +Description: IP in IP encapsulation support diff --git a/openwrt/target/linux/control/kmod-iptables-extra.control b/openwrt/target/linux/control/kmod-iptables-extra.control index 2fd67d254be..96a3b1acc0c 100644 --- a/openwrt/target/linux/control/kmod-iptables-extra.control +++ b/openwrt/target/linux/control/kmod-iptables-extra.control @@ -1,6 +1,4 @@ Package: kmod-iptables-extra Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Extra kernel modules for iptables diff --git a/openwrt/target/linux/control/kmod-iptables.control b/openwrt/target/linux/control/kmod-iptables.control index 259f802a4aa..7f97cc44b65 100644 --- a/openwrt/target/linux/control/kmod-iptables.control +++ b/openwrt/target/linux/control/kmod-iptables.control @@ -1,6 +1,4 @@ Package: kmod-iptables Priority: optional Section: net -Maintainer: OpenWrt Development Team <bugs@openwrt.org> -Source: buildroot internal Description: kernel modules for iptables diff --git a/openwrt/target/linux/control/kmod-ipv6.control b/openwrt/target/linux/control/kmod-ipv6.control index b2b74a1202f..3a6ccc99209 100644 --- a/openwrt/target/linux/control/kmod-ipv6.control +++ b/openwrt/target/linux/control/kmod-ipv6.control @@ -1,6 +1,4 @@ Package: kmod-ipv6 Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel modules for the IPv6 protocol diff --git a/openwrt/target/linux/control/kmod-loop.control b/openwrt/target/linux/control/kmod-loop.control index b84e84da572..48bcb835d69 100644 --- a/openwrt/target/linux/control/kmod-loop.control +++ b/openwrt/target/linux/control/kmod-loop.control @@ -1,6 +1,4 @@ Package: kmod-loop Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@dass-it.de> -Source: buildroot internal Description: Kernel module for mount loopback support diff --git a/openwrt/target/linux/control/kmod-lp.control b/openwrt/target/linux/control/kmod-lp.control index 7cc358edf5f..5d408131599 100644 --- a/openwrt/target/linux/control/kmod-lp.control +++ b/openwrt/target/linux/control/kmod-lp.control @@ -1,6 +1,4 @@ Package: kmod-lp Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@dass-it.de> -Source: buildroot internal Description: Kernel modules for parallel port support and line printer diff --git a/openwrt/target/linux/control/kmod-mppe.control b/openwrt/target/linux/control/kmod-mppe.control index f5170168b91..e4aa4c963ae 100644 --- a/openwrt/target/linux/control/kmod-mppe.control +++ b/openwrt/target/linux/control/kmod-mppe.control @@ -1,6 +1,4 @@ Package: kmod-mppe Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Microsoft PPP Encryption/Compression support diff --git a/openwrt/target/linux/control/kmod-nbd.control b/openwrt/target/linux/control/kmod-nbd.control index 899e2df3529..3c467223bf9 100644 --- a/openwrt/target/linux/control/kmod-nbd.control +++ b/openwrt/target/linux/control/kmod-nbd.control @@ -1,6 +1,4 @@ Package: kmod-nbd Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@dass-it.de> -Source: buildroot internal Description: Kernel module for network block device diff --git a/openwrt/target/linux/control/kmod-nls-base.control b/openwrt/target/linux/control/kmod-nls-base.control index 8e5514eea8c..067f5dec860 100644 --- a/openwrt/target/linux/control/kmod-nls-base.control +++ b/openwrt/target/linux/control/kmod-nls-base.control @@ -1,6 +1,4 @@ Package: kmod-nls-base Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@openwrt.org> -Source: buildroot internal Description: Kernel modules for basic native language support diff --git a/openwrt/target/linux/control/kmod-nls-cp437.control b/openwrt/target/linux/control/kmod-nls-cp437.control index 0beb993d80d..f47146083fe 100644 --- a/openwrt/target/linux/control/kmod-nls-cp437.control +++ b/openwrt/target/linux/control/kmod-nls-cp437.control @@ -1,6 +1,4 @@ Package: kmod-nls-cp437 Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@openwrt.org> -Source: buildroot internal Description: Kernel module for codepage 437 diff --git a/openwrt/target/linux/control/kmod-nls-cp850.control b/openwrt/target/linux/control/kmod-nls-cp850.control index 8631ba2ae82..1a7d083f90a 100644 --- a/openwrt/target/linux/control/kmod-nls-cp850.control +++ b/openwrt/target/linux/control/kmod-nls-cp850.control @@ -1,6 +1,4 @@ Package: kmod-nls-cp850 Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@openwrt.org> -Source: buildroot internal Description: Kernel module for codepage 850 diff --git a/openwrt/target/linux/control/kmod-nls-iso8859-1.control b/openwrt/target/linux/control/kmod-nls-iso8859-1.control index d4e88250e67..91e40faa7a5 100644 --- a/openwrt/target/linux/control/kmod-nls-iso8859-1.control +++ b/openwrt/target/linux/control/kmod-nls-iso8859-1.control @@ -1,6 +1,4 @@ Package: kmod-nls-iso8859-1 Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@openwrt.org> -Source: buildroot internal Description: Kernel module for iso8859-1 charset support diff --git a/openwrt/target/linux/control/kmod-nls-iso8859-15.control b/openwrt/target/linux/control/kmod-nls-iso8859-15.control index 33b598eca03..f565e379e91 100644 --- a/openwrt/target/linux/control/kmod-nls-iso8859-15.control +++ b/openwrt/target/linux/control/kmod-nls-iso8859-15.control @@ -1,6 +1,4 @@ Package: kmod-nls-iso8859-15 Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@openwrt.org> -Source: buildroot internal Description: Kernel module for iso8859-15 charset support diff --git a/openwrt/target/linux/control/kmod-nls-utf8.control b/openwrt/target/linux/control/kmod-nls-utf8.control index cbbd14b8a44..8c5b23c37ed 100644 --- a/openwrt/target/linux/control/kmod-nls-utf8.control +++ b/openwrt/target/linux/control/kmod-nls-utf8.control @@ -1,6 +1,4 @@ Package: kmod-nls-utf8 Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@openwrt.org> -Source: buildroot internal Description: Kernel module for utf8 support diff --git a/openwrt/target/linux/control/kmod-ppp.control b/openwrt/target/linux/control/kmod-ppp.control index c1d9875d532..d851e6526eb 100644 --- a/openwrt/target/linux/control/kmod-ppp.control +++ b/openwrt/target/linux/control/kmod-ppp.control @@ -1,6 +1,4 @@ Package: kmod-ppp Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: PPP support diff --git a/openwrt/target/linux/control/kmod-pppoatm.control b/openwrt/target/linux/control/kmod-pppoatm.control index 31c9550c128..c777362ab75 100644 --- a/openwrt/target/linux/control/kmod-pppoatm.control +++ b/openwrt/target/linux/control/kmod-pppoatm.control @@ -1,6 +1,4 @@ Package: kmod-pppoatm Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: PPP over ATM support diff --git a/openwrt/target/linux/control/kmod-pppoe.control b/openwrt/target/linux/control/kmod-pppoe.control index 23986d43829..3216e2c8890 100644 --- a/openwrt/target/linux/control/kmod-pppoe.control +++ b/openwrt/target/linux/control/kmod-pppoe.control @@ -1,6 +1,4 @@ Package: kmod-pppoe Priority: optional Section: net -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: PPP over Ethernet support diff --git a/openwrt/target/linux/control/kmod-pwc.control b/openwrt/target/linux/control/kmod-pwc.control index ecd5485b44a..2860eedf3d5 100644 --- a/openwrt/target/linux/control/kmod-pwc.control +++ b/openwrt/target/linux/control/kmod-pwc.control @@ -1,6 +1,4 @@ Package: kmod-pwc Priority: optional Section: sys -Maintainer: Nicolas Thill <nico@openwrt.org> -Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/target/linux/linux-2.4/ Description: Kernel driver for USB Philips Cameras diff --git a/openwrt/target/linux/control/kmod-sangam-atm-annex-a.control b/openwrt/target/linux/control/kmod-sangam-atm-annex-a.control index 8406d7034d6..e07e7245655 100644 --- a/openwrt/target/linux/control/kmod-sangam-atm-annex-a.control +++ b/openwrt/target/linux/control/kmod-sangam-atm-annex-a.control @@ -1,6 +1,4 @@ Package: kmod-sangam-atm-annex-a Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: AR7 Sangam ATM/ADSL driver (Annex A version) diff --git a/openwrt/target/linux/control/kmod-sangam-atm-annex-b.control b/openwrt/target/linux/control/kmod-sangam-atm-annex-b.control index 487fe88fb7f..7e6ff3f63e4 100644 --- a/openwrt/target/linux/control/kmod-sangam-atm-annex-b.control +++ b/openwrt/target/linux/control/kmod-sangam-atm-annex-b.control @@ -1,6 +1,4 @@ Package: kmod-sangam-atm-annex-b Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: AR7 Sangam ATM/ADSL driver (Annex B version) diff --git a/openwrt/target/linux/control/kmod-sched.control b/openwrt/target/linux/control/kmod-sched.control index 8d1363f541c..53e993de473 100644 --- a/openwrt/target/linux/control/kmod-sched.control +++ b/openwrt/target/linux/control/kmod-sched.control @@ -1,6 +1,4 @@ Package: kmod-sched Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel schedulers for IP traffic diff --git a/openwrt/target/linux/control/kmod-softdog.control b/openwrt/target/linux/control/kmod-softdog.control index 88a7400572e..01aff7fe8e7 100644 --- a/openwrt/target/linux/control/kmod-softdog.control +++ b/openwrt/target/linux/control/kmod-softdog.control @@ -1,6 +1,4 @@ Package: kmod-softdog Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org> -Source: buildroot internal Description: Kernel software watchdog driver diff --git a/openwrt/target/linux/control/kmod-soundcore.control b/openwrt/target/linux/control/kmod-soundcore.control index ea0323b10f1..6b4fffa058b 100644 --- a/openwrt/target/linux/control/kmod-soundcore.control +++ b/openwrt/target/linux/control/kmod-soundcore.control @@ -1,6 +1,4 @@ Package: kmod-soundcore Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>, David Collett <daveco@users.sourceforge.net> -Source: buildroot internal Description: Kernel support for audio soundcards diff --git a/openwrt/target/linux/control/kmod-tun.control b/openwrt/target/linux/control/kmod-tun.control index c70b75353c4..b60a8feee57 100644 --- a/openwrt/target/linux/control/kmod-tun.control +++ b/openwrt/target/linux/control/kmod-tun.control @@ -1,6 +1,4 @@ Package: kmod-tun Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel TUN/TAP extension diff --git a/openwrt/target/linux/control/kmod-usb-acm.control b/openwrt/target/linux/control/kmod-usb-acm.control index 1a9a2de74ec..8d1fca496be 100644 --- a/openwrt/target/linux/control/kmod-usb-acm.control +++ b/openwrt/target/linux/control/kmod-usb-acm.control @@ -1,6 +1,4 @@ Package: kmod-usb-acm Priority: optional Section: sys -Maintainer: Waldemar Brodkorb <wbx@openwrt.org> -Source: buildroot internal Description: Kernel modules for USB modems and ISDN diff --git a/openwrt/target/linux/control/kmod-usb-atm-speedtouch.control b/openwrt/target/linux/control/kmod-usb-atm-speedtouch.control index 25e20739d57..e8ded69d48a 100644 --- a/openwrt/target/linux/control/kmod-usb-atm-speedtouch.control +++ b/openwrt/target/linux/control/kmod-usb-atm-speedtouch.control @@ -1,6 +1,4 @@ Package: kmod-usb-atm-speedtouch Priority: optional Section: sys -Maintainer: Jonathan McDowell <noodles@earth.li> -Source: buildroot internal Description: Kernel driver for USB Speedtouch ADSL modem diff --git a/openwrt/target/linux/control/kmod-usb-audio.control b/openwrt/target/linux/control/kmod-usb-audio.control index 367c5905702..d30b8f2c706 100644 --- a/openwrt/target/linux/control/kmod-usb-audio.control +++ b/openwrt/target/linux/control/kmod-usb-audio.control @@ -1,7 +1,5 @@ Package: kmod-usb-audio Priority: optional Section: sys -Maintainer: David Collett <daveco@users.sourceforge.net> -Source: buildroot internal Depends: kmod-soundcore Description: Kernel Support for USB Soundcards diff --git a/openwrt/target/linux/control/kmod-usb-core.control b/openwrt/target/linux/control/kmod-usb-core.control index 2e696629698..fa1c13bbd81 100644 --- a/openwrt/target/linux/control/kmod-usb-core.control +++ b/openwrt/target/linux/control/kmod-usb-core.control @@ -1,6 +1,4 @@ Package: kmod-usb-core Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel Support for USB diff --git a/openwrt/target/linux/control/kmod-usb-ohci.control b/openwrt/target/linux/control/kmod-usb-ohci.control index adb6e276350..3d0edc863c7 100644 --- a/openwrt/target/linux/control/kmod-usb-ohci.control +++ b/openwrt/target/linux/control/kmod-usb-ohci.control @@ -1,6 +1,4 @@ Package: kmod-usb-ohci Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel driver for OHCI USB controllers diff --git a/openwrt/target/linux/control/kmod-usb-printer.control b/openwrt/target/linux/control/kmod-usb-printer.control index b9f13fec6cb..1c47a3d176d 100644 --- a/openwrt/target/linux/control/kmod-usb-printer.control +++ b/openwrt/target/linux/control/kmod-usb-printer.control @@ -1,6 +1,4 @@ Package: kmod-usb-printer Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel modules for USB Printer support diff --git a/openwrt/target/linux/control/kmod-usb-serial-belkin.control b/openwrt/target/linux/control/kmod-usb-serial-belkin.control index 708cc44351a..d907a9702bf 100644 --- a/openwrt/target/linux/control/kmod-usb-serial-belkin.control +++ b/openwrt/target/linux/control/kmod-usb-serial-belkin.control @@ -1,6 +1,4 @@ Package: kmod-usb-serial-belkin Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org> -Source: buildroot internal Description: Kernel Support for Belkin USB-to-Serial converters diff --git a/openwrt/target/linux/control/kmod-usb-serial-ftdi.control b/openwrt/target/linux/control/kmod-usb-serial-ftdi.control index 16bcdca2549..e845294a5f1 100644 --- a/openwrt/target/linux/control/kmod-usb-serial-ftdi.control +++ b/openwrt/target/linux/control/kmod-usb-serial-ftdi.control @@ -1,6 +1,4 @@ Package: kmod-usb-serial-ftdi Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org> -Source: buildroot internal Description: Kernel Support for FTDI USB-to-Serial converters diff --git a/openwrt/target/linux/control/kmod-usb-serial-mct-u232.control b/openwrt/target/linux/control/kmod-usb-serial-mct-u232.control index 00f2038bf0e..b52b7ca7b34 100644 --- a/openwrt/target/linux/control/kmod-usb-serial-mct-u232.control +++ b/openwrt/target/linux/control/kmod-usb-serial-mct-u232.control @@ -1,6 +1,4 @@ Package: kmod-usb-serial-mct-u232 Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org> -Source: buildroot internal Description: Kernel Support for Magic Control Technology USB-to-Serial converters diff --git a/openwrt/target/linux/control/kmod-usb-serial-pl2303.control b/openwrt/target/linux/control/kmod-usb-serial-pl2303.control index bccbdd8924d..4de43bd5107 100644 --- a/openwrt/target/linux/control/kmod-usb-serial-pl2303.control +++ b/openwrt/target/linux/control/kmod-usb-serial-pl2303.control @@ -1,6 +1,4 @@ Package: kmod-usb-serial-pl2303 Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org> -Source: buildroot internal Description: Kernel Support for Prolific PL2303 USB-to-Serial converters diff --git a/openwrt/target/linux/control/kmod-usb-serial-visor.control b/openwrt/target/linux/control/kmod-usb-serial-visor.control index 7b993beafd7..951c00c51f2 100644 --- a/openwrt/target/linux/control/kmod-usb-serial-visor.control +++ b/openwrt/target/linux/control/kmod-usb-serial-visor.control @@ -1,7 +1,4 @@ Package: kmod-usb-serial-visor Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org> -Source: buildroot internal -Description: Kernel Support for Handspring Visor / Palm m50x / Sony Clie -Driver +Description: Kernel Support for Handspring Visor / Palm m50x / Sony Clie Driver diff --git a/openwrt/target/linux/control/kmod-usb-serial.control b/openwrt/target/linux/control/kmod-usb-serial.control index dda5f9d01a3..136fca752f4 100644 --- a/openwrt/target/linux/control/kmod-usb-serial.control +++ b/openwrt/target/linux/control/kmod-usb-serial.control @@ -1,6 +1,4 @@ Package: kmod-usb-serial Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org> -Source: buildroot internal Description: Kernel Support for USB-to-Serial converters diff --git a/openwrt/target/linux/control/kmod-usb-storage.control b/openwrt/target/linux/control/kmod-usb-storage.control index 4156a0d91d8..4ee70eb8a96 100644 --- a/openwrt/target/linux/control/kmod-usb-storage.control +++ b/openwrt/target/linux/control/kmod-usb-storage.control @@ -1,6 +1,4 @@ Package: kmod-usb-storage Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel modules for USB storage support diff --git a/openwrt/target/linux/control/kmod-usb-uhci.control b/openwrt/target/linux/control/kmod-usb-uhci.control index c7e678f188b..09966a8a0e5 100644 --- a/openwrt/target/linux/control/kmod-usb-uhci.control +++ b/openwrt/target/linux/control/kmod-usb-uhci.control @@ -1,6 +1,4 @@ Package: kmod-usb-uhci Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel driver for UHCI USB controllers diff --git a/openwrt/target/linux/control/kmod-usb2.control b/openwrt/target/linux/control/kmod-usb2.control index 48da3a6fc81..338865e524a 100644 --- a/openwrt/target/linux/control/kmod-usb2.control +++ b/openwrt/target/linux/control/kmod-usb2.control @@ -1,6 +1,4 @@ Package: kmod-usb2 Priority: optional Section: sys -Maintainer: Felix Fietkau <nbd@vd-s.ath.cx> -Source: buildroot internal Description: Kernel driver for USB2 controllers diff --git a/openwrt/target/linux/control/kmod-videodev.control b/openwrt/target/linux/control/kmod-videodev.control index c8526835c43..57c0b1cdfe9 100644 --- a/openwrt/target/linux/control/kmod-videodev.control +++ b/openwrt/target/linux/control/kmod-videodev.control @@ -1,6 +1,4 @@ Package: kmod-videodev Priority: optional Section: sys -Maintainer: Nicolas Thill <nico@openwrt.org> -Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/target/linux/linux-2.4/ Description: Video For Linux kernel support diff --git a/openwrt/target/linux/control/kmod-wd1100.control b/openwrt/target/linux/control/kmod-wd1100.control index d81924e8a80..32163200ec6 100644 --- a/openwrt/target/linux/control/kmod-wd1100.control +++ b/openwrt/target/linux/control/kmod-wd1100.control @@ -1,6 +1,4 @@ Package: kmod-wd1100 Priority: optional Section: sys -Maintainer: OpenWrt Developers Team <bugs@openwrt.org> -Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/target/linux/ Description: NatSemi SC1x00 series Watchdog kernel support diff --git a/openwrt/target/linux/generic-2.4/modules.mk b/openwrt/target/linux/generic-2.4/modules.mk index f35e9ba56b8..540ac715cc2 100644 --- a/openwrt/target/linux/generic-2.4/modules.mk +++ b/openwrt/target/linux/generic-2.4/modules.mk @@ -12,9 +12,12 @@ $(eval $(call KMOD_template,GRE,gre,\ ,CONFIG_NET_IPGRE)) $(eval $(call KMOD_template,IMQ,imq,\ - $(MODULES_DIR)/kernel/net/*/netfilter/*IMQ*.o \ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.o \ $(MODULES_DIR)/kernel/drivers/net/imq.o \ )) +$(eval $(call KMOD_template,IPIP,ipip,\ + $(MODULES_DIR)/kernel/net/ipv4/ipip.o \ +,CONFIG_NET_IPIP,,60,ipip)) $(eval $(call KMOD_template,IPV6,ipv6,\ $(MODULES_DIR)/kernel/net/ipv6/ipv6.o \ @@ -39,12 +42,9 @@ $(eval $(call KMOD_template,PPPOE,pppoe,\ $(MODULES_DIR)/kernel/drivers/net/pppoe.o \ ,CONFIG_PPPOE)) -ifneq ($(wildcard $(MODULES_DIR)/kernel/net/sched/*.o),) -CONFIG_SCHED:=m -endif $(eval $(call KMOD_template,SCHED,sched,\ $(MODULES_DIR)/kernel/net/sched/*.o \ -,CONFIG_SCHED)) +)) $(eval $(call KMOD_template,TUN,tun,\ $(MODULES_DIR)/kernel/drivers/net/tun.o \ diff --git a/openwrt/target/linux/generic-2.6/modules.mk b/openwrt/target/linux/generic-2.6/modules.mk index ab8a5f5d512..b582400bd63 100644 --- a/openwrt/target/linux/generic-2.6/modules.mk +++ b/openwrt/target/linux/generic-2.6/modules.mk @@ -14,10 +14,14 @@ $(eval $(call KMOD_template,GRE,gre,\ ,CONFIG_NET_IPGRE)) $(eval $(call KMOD_template,IMQ,imq,\ - $(MODULES_DIR)/kernel/net/*/netfilter/*IMQ*.ko \ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.ko \ $(MODULES_DIR)/kernel/drivers/net/imq.ko \ )) +$(eval $(call KMOD_template,IPIP,ipip,\ + $(MODULES_DIR)/kernel/net/ipv4/ipip.ko \ +,CONFIG_NET_IPIP,,60,ipip)) + $(eval $(call KMOD_template,IPV6,ipv6,\ $(MODULES_DIR)/kernel/net/ipv6/ipv6.ko \ ,CONFIG_IPV6,,20,ipv6)) diff --git a/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch b/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch index 91da40ac37d..72df58184d5 100644 --- a/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch +++ b/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch @@ -179,7 +179,19 @@ diff -Nur linux-2.6.15.1/lib/Makefile linux-2.6.15.1-openwrt/lib/Makefile sha1.o lib-y += kobject.o kref.o kobject_uevent.o klist.o -+lib-y += ashldi3.o ashrdi3.o lshrdi3.o ++obj-y += ashldi3.o ashrdi3.o lshrdi3.o obj-y += sort.o parser.o halfmd4.o +diff -Nur linux-2.6.15.1/include/asm-arm/libgcc.h linux-2.6.15.1-openwrt/include/asm-arm/libgcc.h +--- linux-2.6.15.1/include/asm-arm/libgcc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.15.1-openwrt/include/asm-arm/libgcc.h 2006-04-12 23:01:18.000000000 +0200 +@@ -0,0 +1,8 @@ ++#ifndef __ASM_LIBGCC_H ++#define __ASM_LIBGCC_H ++ ++#undef ARCH_NEEDS_ashldi3 ++#undef ARCH_NEEDS_ashrdi3 ++#undef ARCH_NEEDS_lshrdi3 ++ ++#endif /* __ASM_LIBGCC_H */ diff --git a/openwrt/target/linux/image/au1000/Makefile b/openwrt/target/linux/image/au1000/Makefile index 04a89f9b19e..c7158ca7611 100644 --- a/openwrt/target/linux/image/au1000/Makefile +++ b/openwrt/target/linux/image/au1000/Makefile @@ -1,18 +1,43 @@ include $(TOPDIR)/rules.mk +LOADADDR = 0x8108c8f4 # RAM start + 16M +KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile +RAMSIZE = 0x04000000 # 64MB + +LOADER_MAKEOPTS= \ + KDIR=$(KDIR) \ + LOADADDR=$(LOADADDR) \ + KERNEL_ENTRY=$(KERNEL_ENTRY) \ + RAMSIZE=$(RAMSIZE) + KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) +lzma-loader-clean: + $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean + +lzma-loader-prepare: + $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare + +lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare + $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile + +ifeq ($(IB),) +$(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux + cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false) + +install: $(KDIR)/vmlinux.lzma +endif ifeq ($(FS),jffs2-8MB) -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) - $(CP) $^ $@ - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img +$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS) + $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec + grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img + grep -v S0 $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img +install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin endif - ifeq ($(FS),tgz) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz @@ -22,15 +47,30 @@ install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz endif +ifeq ($(FS),squashfs) +$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS) + $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec + grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img + grep -v S0 $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/vmlinux +endif + +$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/zImage.flash $(CP) $^ $@ - +ifeq ($(IB),) +clean: lzma-loader-clean +prepare: lzma-loader-prepare +compile: lzma-loader-compile +else clean: prepare: compile: -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz +endif install-ib: + mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ + $(CP) $(KDIR)/loader.elf $(IB_DIR)/build_$(ARCH)/ + $(CP) $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ + $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/loader.elf $(KDIR)/loader.srec + grep -v S0 $(KDIR)/loader.srec > $(KDIR)/kernel.srec diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk index 7df3aedbcf5..432df3e2b19 100644 --- a/openwrt/target/linux/image/jffs2.mk +++ b/openwrt/target/linux/image/jffs2.mk @@ -1,4 +1,4 @@ -ifneq ($(CONFIG_mips),y) +ifneq ($(CONFIG_BIG_ENDIAN),y) JFFS2OPTS := --pad --little-endian --squash else JFFS2OPTS := --pad --big-endian --squash diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk index 29ce5522d51..abc58da1e4d 100644 --- a/openwrt/target/linux/image/squashfs.mk +++ b/openwrt/target/linux/image/squashfs.mk @@ -1,7 +1,7 @@ +ifneq ($(CONFIG_BIG_ENDIAN),y) endian := le - -ifeq ($(ARCH),mips) - endian := be +else +endian := be endif squashfs-prepare: diff --git a/openwrt/target/linux/image/xscale/Makefile b/openwrt/target/linux/image/xscale/Makefile new file mode 100644 index 00000000000..04a89f9b19e --- /dev/null +++ b/openwrt/target/linux/image/xscale/Makefile @@ -0,0 +1,36 @@ +include $(TOPDIR)/rules.mk + +KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) + + +ifeq ($(FS),jffs2-8MB) + +$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) + $(CP) $^ $@ + +install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img + +endif + + +ifeq ($(FS),tgz) + +$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz + $(CP) $^ $@ + +install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz + +endif + + +$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/vmlinux + $(CP) $^ $@ + + +clean: +prepare: +compile: +install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz +install-ib: + mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) + $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index 00ff102d583..f8f4700525b 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -103,8 +103,10 @@ mostlyclean: rebuild: -$(MAKE) mostlyclean - @[ -f $(LINUX_KERNEL) ] && $(MAKE) clean - $(MAKE) compile + if [ -f $(LINUX_KERNEL) ]; then \ + $(MAKE) clean; \ + fi + $(MAKE) compile $(MAKE_TRACE) clean: rm -f $(STAMP_DIR)/.linux-compile diff --git a/openwrt/target/linux/package/Makefile b/openwrt/target/linux/package/Makefile index 792fb7bd674..f24c845d79d 100644 --- a/openwrt/target/linux/package/Makefile +++ b/openwrt/target/linux/package/Makefile @@ -6,8 +6,6 @@ package-y += base-files package-$(CONFIG_PACKAGE_KMOD_ALSA) += alsa package-$(CONFIG_PACKAGE_KMOD_FUSE) += fuse package-$(CONFIG_PACKAGE_KMOD_HOSTAP) += hostap -package-$(CONFIG_PACKAGE_KMOD_BCM43XX_STANDALONE) += bcm43xx-standalone -package-$(CONFIG_PACKAGE_KMOD_IEEE80211_DSCAPE) += ieee80211-dscape package-$(CONFIG_PACKAGE_KMOD_MADWIFI) += madwifi package-$(CONFIG_PACKAGE_KMOD_MADWIFI_OLD) += madwifi-old package-$(CONFIG_PACKAGE_KMOD_MINI_FO) += mini_fo @@ -20,7 +18,6 @@ package-$(CONFIG_PACKAGE_KMOD_DIAG) += diag package-$(CONFIG_PACKAGE_KMOD_WLCOMPAT) += wlcompat package-$(CONFIG_PACKAGE_KMOD_ZD1211) += zd1211 -bcm43xx-standalone-compile: ieee80211-dscape-compile wlcompat-compile: base-files-compile all: compile install diff --git a/openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root b/openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root new file mode 100755 index 00000000000..5dd1b0c5627 --- /dev/null +++ b/openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root @@ -0,0 +1,23 @@ +#!/bin/sh +size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) +mount none /tmp -t tmpfs -o size=$size + +if [ "$1" != "failsafe" ]; then + mtd unlock filesystem + mount | grep jffs2 >&- + if [ $? = 0 ] ; then + if [ $(cat /proc/mtd | wc -l) = 6 ]; then + mtd erase filesystem + jffs2root --move + else + mount -o remount,rw /dev/root / + fi + else + . /bin/firstboot + fi +fi + +mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 +mkdir -p /dev/pts +mount none /dev/pts -t devpts +mount -t sysfs none /sys 2>&- diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net index 856d26b653b..9dd77963ba9 100644 --- a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net +++ b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net @@ -1,5 +1,5 @@ #!/bin/sh -setup_eth() +setup_wl() { [ -f /proc/net/wl0 ] && { lsmod | grep wlcompat >&- || insmod wlcompat @@ -7,6 +7,9 @@ setup_eth() iwconfig "$INTERFACE" 2>&- | grep -v 'no wireless' >&- && { /sbin/wifi } +} +setup_eth() +{ [ -d /proc/switch ] || { insmod switch-core insmod switch-robo || insmod switch-adm @@ -30,6 +33,7 @@ do_register() { case "${INTERFACE%%[0-9]*}" in eth) setup_eth;; + wl) setup_wl;; esac } diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network b/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network new file mode 100644 index 00000000000..2cc9e267171 --- /dev/null +++ b/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network @@ -0,0 +1,12 @@ +# Network configuration file + +## LAN configuration +lan_ifname="br0" +lan_ifnames="eth0 ath0" +lan_proto="static" +lan_ipaddr="192.168.1.1" +lan_netmask="255.255.255.0" + +## WAN configuration +wan_ifname="" +wan_proto="none" diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab b/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab new file mode 100644 index 00000000000..6eef29efbad --- /dev/null +++ b/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab @@ -0,0 +1,3 @@ +::sysinit:/etc/init.d/rcS +duart/0::askfirst:/bin/ash --login +#tts/1::askfirst:/bin/ash --login diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/init b/openwrt/target/linux/package/base-files/files/sibyte-2.6/init new file mode 100755 index 00000000000..1f98589eb60 --- /dev/null +++ b/openwrt/target/linux/package/base-files/files/sibyte-2.6/init @@ -0,0 +1,6 @@ +#!/bin/ash +mount none /dev -t devfs +mount none /proc -t proc +mount_root failsafe +mount -o remount,rw /dev/root / +exec /bin/busybox init diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network b/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network new file mode 100644 index 00000000000..f60332cd8cf --- /dev/null +++ b/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network @@ -0,0 +1,5 @@ +# Network configuration file + +## LAN configuration +lan_ifname="eth0" +lan_proto="dhcp" diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale b/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale new file mode 100755 index 00000000000..9836de423b7 --- /dev/null +++ b/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale @@ -0,0 +1,4 @@ +#!/bin/sh +mount none /proc -t proc +mount_root failsafe +mount -o remount,rw /dev/root / diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/init b/openwrt/target/linux/package/base-files/files/xscale-2.6/init new file mode 100755 index 00000000000..8ca48a04c1c --- /dev/null +++ b/openwrt/target/linux/package/base-files/files/xscale-2.6/init @@ -0,0 +1,3 @@ +#!/bin/ash +mount none /dev -t devfs +exec /bin/busybox init diff --git a/openwrt/target/linux/package/bcm43xx-standalone/Config.in b/openwrt/target/linux/package/bcm43xx-standalone/Config.in deleted file mode 100644 index 84a4702cf2c..00000000000 --- a/openwrt/target/linux/package/bcm43xx-standalone/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config PACKAGE_KMOD_BCM43XX_STANDALONE - prompt "kmod-bcm43xx-standalone............... Free Broadcom 43xx wireless driver (devicescape stack)" - tristate - depends LINUX_2_6_BRCM - select PACKAGE_KMOD_IEEE80211_DSCAPE - default n - help - Free driver for the Broadcom 43xx wireless chipset - This driver uses the DeviceScape 802.11 stack - - http://bcm43xx.berlios.de - diff --git a/openwrt/target/linux/package/bcm43xx-standalone/Makefile b/openwrt/target/linux/package/bcm43xx-standalone/Makefile deleted file mode 100644 index fed1628eeee..00000000000 --- a/openwrt/target/linux/package/bcm43xx-standalone/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME := bcm43xx-standalone -PKG_VERSION := 060313 -PKG_RELEASE := 1 -PKG_MD%SUM := 773b26a164a54f0da544764969ca019b - -PKG_SOURCE_URL := ftp://bu3sch.de/bcm43xx-snapshots/standalone/bcm43xx/ -PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT := bzcat - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -FIRMWARE_BLOB := wl_apsta-3.130.20.0.o -FIRMWARE_BLOB_URL := http://downloads.openwrt.org/sources -FIRMWARE_BLOB_MD5SUM := e08665c5c5b66beb9c3b2dd54aa80cb3 - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_BCM43XX_DSCAPE,kmod-$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)+0.$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/fwcutter/.built: - mkdir -p $(PKG_BUILD_DIR)/fwcutter - $(CP) ./fwcutter/* $(PKG_BUILD_DIR)/fwcutter/ - $(SCRIPT_DIR)/download.pl "$(PKG_BUILD_DIR)/fwcutter" "$(FIRMWARE_BLOB)" "$(FIRMWARE_BLOB_MD5SUM)" $(FIRMWARE_BLOB_URL) - $(MAKE) -C $(PKG_BUILD_DIR)/fwcutter - $(PKG_BUILD_DIR)/fwcutter/fwcutter -w $(PKG_BUILD_DIR)/fwcutter $(PKG_BUILD_DIR)/fwcutter/$(FIRMWARE_BLOB) - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/fwcutter/.built - $(MAKE) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ - SUBDIRS="$(PKG_BUILD_DIR)" \ - LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/ieee80211-dscape -I$(LINUX_DIR)/include -DBCM47XX=1" \ - modules - touch $@ - -$(IPKG_KMOD_BCM43XX_DSCAPE): - install -m0755 -d $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/modules/$(LINUX_VERSION) - install -m0755 -d $(IDIR_KMOD_BCM43XX_DSCAPE)/etc/modules.d - ( \ - echo 80211; \ - echo rate_control; \ - echo bcm43xx; \ - ) >& $(IDIR_KMOD_BCM43XX_DSCAPE)/etc/modules.d/50-bcm43xx - $(CP) $(PKG_BUILD_DIR)/*.ko $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/modules/$(LINUX_VERSION) - install -m0755 -d $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/firmware - $(CP) $(PKG_BUILD_DIR)/fwcutter/*.fw $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/firmware/ - $(IPKG_BUILD) $(IDIR_KMOD_BCM43XX_DSCAPE) $(PACKAGE_DIR) diff --git a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/Makefile b/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/Makefile deleted file mode 100644 index 6402dca85f0..00000000000 --- a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -VERSION = 0.0.1 - -FIRMWARE_INSTALL_DIR ?= /lib/firmware - -CC = cc -PREFIX = /usr/local -CFLAGS = -std=c99 -O2 -fomit-frame-pointer -Wall -pedantic -D_BSD_SOURCE -LDFLAGS = - - -OBJECTS = fwcutter.o md5.o - -CFLAGS += -DFWCUTTER_VERSION_=$(VERSION) - -all: fwcutter - -fwcutter: $(OBJECTS) - $(CC) $(CFLAGS) -o fwcutter $(OBJECTS) $(LDFLAGS) - -install: all - -install -o 0 -g 0 -m 755 fwcutter $(PREFIX)/bin/ - -clean: - -rm -f *~ *.o *.orig *.rej *.fw fwcutter - -installfw: - -if ! [ -d $(FIRMWARE_INSTALL_DIR) ]; then mkdir $(FIRMWARE_INSTALL_DIR); fi - -install -o 0 -g 0 -m 600 bcm43xx_*.fw $(FIRMWARE_INSTALL_DIR) - -# dependencies -fwcutter.o: md5.h fwcutter_list.h -md5.o: md5.h diff --git a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/fwcutter.c b/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/fwcutter.c deleted file mode 100644 index ea98880dff7..00000000000 --- a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/fwcutter.c +++ /dev/null @@ -1,562 +0,0 @@ -/* - * firmware cutter for broadcom 43xx wireless driver files - * - * Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, - * 2005 Michael Buesch <mbuesch@freenet.de> - * 2005 Alex Beregszaszi - * - * 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; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - - -#include <stdlib.h> -#include <ctype.h> -#include <string.h> -#include <stdio.h> - -typedef unsigned char byte; - -#define DRIVER_UNSUPPORTED 0x01 /* no support for this driver file */ -#define BYTE_ORDER_BIG_ENDIAN 0x02 /* ppc driver files */ -#define BYTE_ORDER_LITTLE_ENDIAN 0x04 /* x86, mips driver files */ - -#define MISSING_INITVAL_08 0x10 /* initval 8 is missing */ -#define MISSING_INITVAL_80211_A 0x20 /* initvals 3,7,9,10 (802.11a cards) are empty */ - -#define FIRMWARE_UCODE_OFFSET 100 -#define FIRMWARE_UNDEFINED 0 -#define FIRMWARE_PCM_4 4 -#define FIRMWARE_PCM_5 5 -#define FIRMWARE_UCODE_2 (FIRMWARE_UCODE_OFFSET + 2) -#define FIRMWARE_UCODE_4 (FIRMWARE_UCODE_OFFSET + 4) -#define FIRMWARE_UCODE_5 (FIRMWARE_UCODE_OFFSET + 5) -#define FIRMWARE_UCODE_11 (FIRMWARE_UCODE_OFFSET + 11) - - -#define fwcutter_stringify_1(x) #x -#define fwcutter_stringify(x) fwcutter_stringify_1(x) -#define FWCUTTER_VERSION fwcutter_stringify(FWCUTTER_VERSION_) - -#include "md5.h" -#include "fwcutter_list.h" - - -struct cmdline_args { - const char *infile; - const char *postfix; - const char *target_dir; - int identify_only; -}; - -static struct cmdline_args cmdargs; -int big_endian_cpu; - - -static void write_little_endian(FILE *f, byte *buffer, int len) -{ - byte swapbuf[4]; - - while (len > 0) { - swapbuf[0] = buffer[3]; swapbuf[1] = buffer[2]; - swapbuf[2] = buffer[1]; swapbuf[3] = buffer[0]; - fwrite(swapbuf, 4, 1, f); - buffer = buffer + 4; - len = len - 4; - } -} - -static void write_big_endian(FILE *f, byte *buffer, int len) -{ - while (len > 0) { - fwrite(buffer, 4, 1, f); - buffer = buffer + 4; - len = len - 4; - } -} - -static void write_fw(const char *outfilename, uint8_t flags, byte *data, int len) -{ - FILE* fw; - char outfile[2048]; - - snprintf(outfile, sizeof(outfile), - "%s/%s", cmdargs.target_dir, outfilename); - - fw = fopen(outfile, "w"); - if (!fw) { - perror(outfile); - exit(1); - } - - if (flags & BYTE_ORDER_LITTLE_ENDIAN) - write_little_endian(fw, data, len); - else if (flags & BYTE_ORDER_BIG_ENDIAN) - write_big_endian(fw, data, len); - else - printf("unknown byteorder...\n"); - - fflush(fw); - fclose(fw); -} - -static void write_iv(uint8_t flags, byte *data) -{ - FILE* fw; - char ivfilename[2048]; - int i; - - for (i = 1; i <= 10; i++) { - - if ((flags & MISSING_INITVAL_08) && (i==8)) { - printf("*****: Sorry, initval08 is not available in driver file \"%s\".\n", cmdargs.infile); - printf("*****: Extracting firmware from an old driver is bad. Choose a more recent one.\n"); - printf("*****: Luckily bcm43xx driver doesn't include initval08 uploads at the moment.\n"); - printf("*****: But this can be added in the future...\n"); - i++; - } - - snprintf(ivfilename, sizeof(ivfilename), - "%s/bcm43xx_initval%02d%s.fw", - cmdargs.target_dir, i, cmdargs.postfix); - fw = fopen(ivfilename, "w"); - - if (!fw) { - perror(ivfilename); - exit(1); - } - - printf("extracting bcm43xx_initval%02d%s.fw ...\n", i, cmdargs.postfix); - - while (1) { - - if ((data[0]==0xff) && (data[1]==0xff) && (data[2]==0x00) && (data[3]==0x00)) { - data = data + 8; - break; - } - - if (flags & BYTE_ORDER_LITTLE_ENDIAN) - fprintf(fw, "%c%c%c%c%c%c%c%c", - data[1], data[0], /* offset */ - data[3], data[2], /* size */ - data[7], data[6], data[5], data[4]); /* value */ - else if (flags & BYTE_ORDER_BIG_ENDIAN) - fprintf(fw, "%c%c%c%c%c%c%c%c", - data[0], data[1], /* offset */ - data[2], data[3], /* size */ - data[4], data[5], data[6], data[7]); /* value */ - else { - printf("unknown byteorder...\n"); - exit(1); - } - - data = data + 8; - } - fflush(fw); - fclose(fw); - } -} - -static byte* read_file(const char* filename) -{ - FILE* file; - long len; - byte* data; - - file = fopen(filename, "rb"); - if (!file) { - perror(filename); - exit(1); - } - if (fseek(file, 0, SEEK_END)) { - perror("cannot seek"); - exit(1); - } - len = ftell(file); - fseek(file, 0, SEEK_SET); - data = malloc(len); - if (!data) { - fputs("out of memory\n", stderr); - exit(1); - } - if (fread(data, 1, len, file) != len) { - perror("cannot read"); - exit(1); - } - fclose(file); - return data; -} - -static void extract_fw(uint8_t fwtype, uint8_t flags, uint32_t pos, uint32_t length) -{ - byte* filedata; - char outfile[1024]; - - switch (fwtype) { - case FIRMWARE_UCODE_2: - case FIRMWARE_UCODE_4: - case FIRMWARE_UCODE_5: - case FIRMWARE_UCODE_11: - snprintf(outfile, sizeof(outfile), "bcm43xx_microcode%i%s.fw", - fwtype - FIRMWARE_UCODE_OFFSET, cmdargs.postfix); - break; - case FIRMWARE_PCM_4: - case FIRMWARE_PCM_5: - snprintf(outfile, sizeof(outfile), "bcm43xx_pcm%i%s.fw", - fwtype, cmdargs.postfix); - break; - default: - snprintf(outfile, sizeof(outfile), "bcm43xx_unknown.fw"); - } - - if (length > 0) { - printf("extracting %s ...\n", outfile); - filedata = read_file(cmdargs.infile); - write_fw(outfile, flags, filedata + pos, length); - free(filedata); - } else { - printf("*****: Sorry, it's not posible to extract \"%s\".\n", outfile); - printf("*****: Extracting firmware from an old driver is bad. Choose a more recent one.\n"); - - switch (fwtype) { - case FIRMWARE_UCODE_2: - printf("*****: bcm43xx driver will not work with with core revision 2.\n"); - break; - case FIRMWARE_UCODE_4: - printf("*****: bcm43xx driver will not work with with core revision 4.\n"); - break; - case FIRMWARE_UCODE_5: - printf("*****: bcm43xx driver will not work with with core revision 5 or higher.\n"); - break; - case FIRMWARE_UCODE_11: - printf("*****: Luckily bcm43xx driver doesn't include microcode11 uploads at the moment.\n"); - printf("*****: But this can be added in the future...\n"); - break; - case FIRMWARE_PCM_4: - printf("*****: bcm43xx driver will not work with with core revision 4 or smaller.\n"); - break; - case FIRMWARE_PCM_5: - printf("*****: bcm43xx driver will not work with with core revision 5 or higher.\n"); - break; - } - } -} - -static void extract_iv(uint8_t flags, uint32_t pos) -{ - byte* filedata; - - if (pos > 0) { - filedata = read_file(cmdargs.infile); - write_iv(flags, filedata + pos); - free(filedata); - } -} - -static void print_banner(void) -{ - printf("fwcutter " FWCUTTER_VERSION "\n"); -} - -static void print_file(const struct file *file) -{ - printf("%s\t", file->name); - if (strlen(file->name) < 8) - printf("\t"); - - printf("%s\t", file->version); - if (strlen(file->version) < 8) - printf("\t"); - if (strlen(file->version) < 16) - printf("\t"); - - if (!(file->flags & DRIVER_UNSUPPORTED)) { - if (file->flags & MISSING_INITVAL_80211_A) - printf("b/g "); - else - printf("a/b/g"); - } - - printf(" %s", file->md5); - printf("\n"); -} - -static void print_supported_files(void) -{ - int i; - - print_banner(); - printf("\nExtracting firmware is possible from these binary driver files:\n\n"); - printf("<filename>\t<version>\t <802.11><MD5 checksum>\n\n"); - for (i = 0; i < FILES; i++) { - if (files[i].flags & DRIVER_UNSUPPORTED) - continue; - print_file(&files[i]); - } - printf("\n\nExtracting firmware is IMPOSSIBLE from these binary driver files:\n\n"); - printf("<filename>\t<version>\t <MD5 checksum>\n\n"); - for (i = 0; i < FILES; i++) { - if (!(files[i].flags & DRIVER_UNSUPPORTED)) - continue; - print_file(&files[i]); - } -} - -static const struct file * find_file(FILE *fd) -{ - unsigned char buffer[16384], signature[16]; - struct MD5Context md5c; - char md5sig[33]; - int i; - - MD5Init(&md5c); - while ((i = (int) fread(buffer, 1, sizeof(buffer), fd)) > 0) - MD5Update(&md5c, buffer, (unsigned) i); - MD5Final(signature, &md5c); - - snprintf(md5sig, sizeof(md5sig), - "%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x", - signature[0], signature[1], signature[2], signature[3], - signature[4], signature[5], signature[6], signature[7], - signature[8], signature[9], signature[10], signature[11], - signature[12], signature[13], signature[14], signature[15]); - - for (i = 0; i < FILES; ++i) { - if (strcasecmp(md5sig, files[i].md5) == 0) { - if (files[i].flags & DRIVER_UNSUPPORTED) { - printf("Extracting firmware from this file is IMPOSSIBLE. (too old)\n"); - return 0; - } - printf("fwcutter can cut the firmware out of %s\n", cmdargs.infile); - printf(" filename : %s\n", files[i].name); - printf(" version : %s\n", files[i].version); - printf(" MD5 : %s\n\n", files[i].md5); - if (files[i].flags & MISSING_INITVAL_80211_A) { - printf("WARNING! This firmware doesn't include support for 802.11a cards.\n"); - printf("WARNING! Use this firmware only for 802.11b/g cards.\n\n"); - } - return &(files[i]); - } - } - printf("Sorry, the input file is either wrong or not supported by fwcutter.\n"); - printf("I can't find the MD5sum %s :(\n", md5sig); - - return 0; -} - -static void get_endianess(void) -{ - const unsigned char x[] = { 0xde, 0xad, 0xbe, 0xef, }; - const uint32_t *p = (uint32_t *)x; - - if (*p == 0xdeadbeef) { - big_endian_cpu = 1; - } else if (*p == 0xefbeadde) { - big_endian_cpu = 0; - } else { - printf("Confused: NUXI endian machine??\n"); - exit(-1); - } -} - -static void print_usage(int argc, char *argv[]) -{ - print_banner(); - printf("\nUsage: %s [OPTION] [driver.sys]\n", argv[0]); - printf(" -l|--list List supported driver versions\n"); - printf(" -i|--identify Only identify the driver file (don't extract)\n"); - printf(" -w|--target-dir DIR Extract and write firmware to DIR\n"); - printf(" -p|--postfix \".FOO\" Postfix for firmware filenames (.FOO.fw)\n"); - printf(" -v|--version Print fwcutter version\n"); - printf(" -h|--help Print this help\n"); - printf("\nExample: %s bcmwl5.sys\n" - " to extract the firmware blobs from bcmwl5.sys\n", argv[0]); -} - -#define ARG_MATCH 0 -#define ARG_NOMATCH 1 -#define ARG_ERROR -1 - -static int do_cmp_arg(char **argv, int *pos, - const char *template, - int allow_merged, - char **param) -{ - char *arg; - char *next_arg; - size_t arg_len, template_len; - - arg = argv[*pos]; - next_arg = argv[*pos + 1]; - arg_len = strlen(arg); - template_len = strlen(template); - - if (param) { - /* Maybe we have a merged parameter here. - * A merged parameter is "-pfoobar" for example. - */ - if (allow_merged && arg_len > template_len) { - if (memcmp(arg, template, template_len) == 0) { - *param = arg + template_len; - return ARG_MATCH; - } - return ARG_NOMATCH; - } else if (arg_len != template_len) - return ARG_NOMATCH; - *param = next_arg; - } - if (strcmp(arg, template) == 0) { - if (param) { - /* Skip the parameter on the next iteration. */ - (*pos)++; - if (*param == 0) { - printf("%s needs a parameter\n", arg); - return ARG_ERROR; - } - } - return ARG_MATCH; - } - - return ARG_NOMATCH; -} - -/* Simple and lean command line argument parsing. */ -static int cmp_arg(char **argv, int *pos, - const char *long_template, - const char *short_template, - char **param) -{ - int err; - - if (long_template) { - err = do_cmp_arg(argv, pos, long_template, 0, param); - if (err == ARG_MATCH || err == ARG_ERROR) - return err; - } - err = ARG_NOMATCH; - if (short_template) - err = do_cmp_arg(argv, pos, short_template, 1, param); - return err; -} - -static int parse_args(int argc, char *argv[]) -{ - int i, res; - char *param; - - if (argc < 2) - goto out_usage; - for (i = 1; i < argc; i++) { - res = cmp_arg(argv, &i, "--list", "-l", 0); - if (res == ARG_MATCH) { - print_supported_files(); - return 1; - } else if (res == ARG_ERROR) - goto out; - - res = cmp_arg(argv, &i, "--version", "-v", 0); - if (res == ARG_MATCH) { - print_banner(); - return 1; - } else if (res == ARG_ERROR) - goto out; - - res = cmp_arg(argv, &i, "--help", "-h", 0); - if (res == ARG_MATCH) - goto out_usage; - else if (res == ARG_ERROR) - goto out; - - res = cmp_arg(argv, &i, "--identify", "-i", 0); - if (res == ARG_MATCH) { - cmdargs.identify_only = 1; - continue; - } else if (res == ARG_ERROR) - goto out; - - res = cmp_arg(argv, &i, "--target-dir", "-w", ¶m); - if (res == ARG_MATCH) { - cmdargs.target_dir = param; - continue; - } else if (res == ARG_ERROR) - goto out; - - res = cmp_arg(argv, &i, "--postfix", "-p", ¶m); - if (res == ARG_MATCH) { - cmdargs.postfix = param; - continue; - } else if (res == ARG_ERROR) - goto out; - - cmdargs.infile = argv[i]; - break; - } - - if (!cmdargs.infile) - goto out_usage; - return 0; - -out_usage: - print_usage(argc, argv); -out: - return -1; -} - -int main(int argc, char *argv[]) -{ - FILE *fd; - const struct file *file; - int err; - - get_endianess(); - - cmdargs.target_dir = "."; - cmdargs.postfix = ""; - err = parse_args(argc, argv); - if (err == 1) - return 0; - else if (err != 0) - return err; - - fd = fopen(cmdargs.infile, "rb"); - if (!fd) { - fprintf(stderr, "Cannot open input file %s\n", cmdargs.infile); - return 2; - } - - err = -1; - file = find_file(fd); - if (!file) - goto out_close; - if (cmdargs.identify_only) { - err = 0; - goto out_close; - } - - extract_fw(FIRMWARE_UCODE_2, file->flags, file->uc2_pos, file->uc2_length); - extract_fw(FIRMWARE_UCODE_4, file->flags, file->uc4_pos, file->uc4_length); - extract_fw(FIRMWARE_UCODE_5, file->flags, file->uc5_pos, file->uc5_length); - extract_fw(FIRMWARE_UCODE_11, file->flags, file->uc11_pos, file->uc11_length); - extract_fw(FIRMWARE_PCM_4, file->flags, file->pcm4_pos, file->pcm4_length); - extract_fw(FIRMWARE_PCM_5, file->flags, file->pcm5_pos, file->pcm5_length); - extract_iv(file->flags, file->iv_pos); - - err = 0; -out_close: - fclose(fd); - - return err; -} diff --git a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/fwcutter_list.h b/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/fwcutter_list.h deleted file mode 100644 index e855b6d6da9..00000000000 --- a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/fwcutter_list.h +++ /dev/null @@ -1,810 +0,0 @@ - -static const struct file { - const char *name; - const char *version; - const char *md5; - const uint8_t flags; - const uint32_t iv_pos; - const uint32_t uc2_pos; - const uint32_t uc2_length; - const uint32_t uc4_pos; - const uint32_t uc4_length; - const uint32_t uc5_pos; - const uint32_t uc5_length; - const uint32_t uc11_pos; - const uint32_t uc11_length; - const uint32_t pcm4_pos; - const uint32_t pcm4_length; - const uint32_t pcm5_pos; - const uint32_t pcm5_length; -} files[] = -{ - { - .name = "AppleAirPort2", - .version = "3.30.15.p3 (3.1.1b2)", - .md5 = "a8275cc50107a13b5be15d067b2245a0", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x42550, - .uc2_pos = 0x45630, .uc2_length = 0x3d88, - .uc4_pos = 0x493bc, .uc4_length = 0x44a0, - .uc5_pos = 0x4d860, .uc5_length = 0x4ec0, - .pcm4_pos = 0x52724, .pcm4_length = 0x478, - .pcm5_pos = 0x52ba0, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.30.15.p3 (3.1.2b3)", - .md5 = "55134c1298abaa85f190331f016d4d36", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x42c24, - .uc2_pos = 0x45d04, .uc2_length = 0x3d88, - .uc4_pos = 0x49a90, .uc4_length = 0x44a0, - .uc5_pos = 0x4df34, .uc5_length = 0x4ec0, - .pcm4_pos = 0x52df8, .pcm4_length = 0x478, - .pcm5_pos = 0x53274, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.30.15.p7 (3.2)", - .md5 = "e74e8d2df2e4eb97e28602f3b2dd4647", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x40efc, - .uc2_pos = 0x43fdc, .uc2_length = 0x3d88, - .uc4_pos = 0x47d68, .uc4_length = 0x44a0, - .uc5_pos = 0x4c20c, .uc5_length = 0x4ec0, - .pcm4_pos = 0x510d0, .pcm4_length = 0x478, - .pcm5_pos = 0x5154c, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.30.15.p8 (3.3b1)", /* 01/19/2004 */ - .md5 = "87c74c55d2501d2e968f8c132e160b6e", - .flags = BYTE_ORDER_BIG_ENDIAN, - .iv_pos = 0x41c8c, - .uc2_pos = 0x43fe4, .uc2_length = 0x3d88, - .uc4_pos = 0x47d70, .uc4_length = 0x44b2, - .uc5_pos = 0x4c214, .uc5_length = 0x4ec0, - .pcm4_pos = 0x510d8, .pcm4_length = 0x478, - .pcm5_pos = 0x51554, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.50.37.p4 (3.4.2b1)", - .md5 = "1739c357ade1d04c9be47e8604afb1c2", - .flags = BYTE_ORDER_BIG_ENDIAN, - .iv_pos = 0x4f2b8, - .uc2_pos = 0x52da0, .uc2_length = 0x3d30, - .uc4_pos = 0x56ad4, .uc4_length = 0x45c8, - .uc5_pos = 0x5b0a0, .uc5_length = 0x5500, - .pcm4_pos = 0x605a4, .pcm4_length = 0x478, - .pcm5_pos = 0x60a20, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.50.37.p4 (3.4.3f1)", /* 09/29/2004 */ - .md5 = "c672b8c218c5dc4a55060bdfa9f58a69", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x4f378, - .uc2_pos = 0x52e60, .uc2_length = 0x3d30, - .uc4_pos = 0x56b94, .uc4_length = 0x45c8, - .uc5_pos = 0x5b160, .uc5_length = 0x5500, - .pcm4_pos = 0x60664, .pcm4_length = 0x478, - .pcm5_pos = 0x60ae0, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.50.37.p4 (3.4.4f5)", - .md5 = "2c388e3e8ea9310a58cf76a3757e8ccc", - .flags = BYTE_ORDER_BIG_ENDIAN, - .iv_pos = 0x4f5f0, - .uc2_pos = 0x530d8, .uc2_length = 0x3d30, - .uc4_pos = 0x56e0c, .uc4_length = 0x45c8, - .uc5_pos = 0x5b3d8, .uc5_length = 0x5500, - .pcm4_pos = 0x608dc, .pcm4_length = 0x478, - .pcm5_pos = 0x60d58, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.50.37.p4 (3.4.4f5)", - .md5 = "3860545266b554d2955664db55452f5a", - .flags = BYTE_ORDER_BIG_ENDIAN, - .iv_pos = 0x4f5f0, - .uc2_pos = 0x530d8, .uc2_length = 0x3d30, - .uc4_pos = 0x56e0c, .uc4_length = 0x45c8, - .uc5_pos = 0x5b3d8, .uc5_length = 0x5500, - .pcm4_pos = 0x608dc, .pcm4_length = 0x478, - .pcm5_pos = 0x60d58, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.50.37.p6 (3.5f1)", - .md5 = "a62e35ee9956b286c46b145d35bd6e0c", - .flags = BYTE_ORDER_BIG_ENDIAN, - .iv_pos = 0x4f9b8, - .uc2_pos = 0x534a0, .uc2_length = 0x3d30, - .uc4_pos = 0x571d4, .uc4_length = 0x45c8, - .uc5_pos = 0x5b7a0, .uc5_length = 0x5500, - .pcm4_pos = 0x60ca4, .pcm4_length = 0x478, - .pcm5_pos = 0x61120, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.50.37.p6 (3.5f1)", - .md5 = "b6f3d2437c40277c197f0afcf12208e9", - .flags = BYTE_ORDER_BIG_ENDIAN, - .iv_pos = 0x4f9b8, - .uc2_pos = 0x534a0, .uc2_length = 0x3d30, - .uc4_pos = 0x571d4, .uc4_length = 0x45c8, - .uc5_pos = 0x5b7a0, .uc5_length = 0x5500, - .pcm4_pos = 0x60ca4, .pcm4_length = 0x478, - .pcm5_pos = 0x61120, .pcm5_length = 0x478, - }, - { - .name = "AppleAirPort2", - .version = "3.90.34.0.p11 (400.17)", /* 09/13/2005 (??) */ - .md5 = "ca0f34df2f0bfb8b5cfd83b5848d2bf5", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_80211_A, - .iv_pos = 0x4ff2c, /* A-PHY init vals empty */ - .uc2_pos = 0x5181c, .uc2_length = 0x3f48, - .uc4_pos = 0x55764, .uc4_length = 0x4df0, - .uc5_pos = 0x5a554, .uc5_length = 0x57e0, - .pcm4_pos = 0x5fd34, .pcm4_length = 0x520, - .pcm5_pos = 0x60254, .pcm5_length = 0x520, - }, - { - .name = "AppleAirPort2", - .version = "3.90.34.0.p11 (400.17)", - .md5 = "dc3a69aac95c68fe8edc760e39bbb2c9", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_80211_A, - .iv_pos = 0x50efc, /* A-PHY init vals empty */ - .uc2_pos = 0x527ec, .uc2_length = 0x3f48, - .uc4_pos = 0x56734, .uc4_length = 0x4df0, - .uc5_pos = 0x5b524, .uc5_length = 0x57e0, - .pcm4_pos = 0x60d04, .pcm4_length = 0x520, - .pcm5_pos = 0x61224, .pcm5_length = 0x520, - }, - { - .name = "AppleAirPort2", - .version = "3.90.34.0.p13 (401.2)", /* 07/10/2005 */ - .md5 = "6ecf38e5ab6997c7ec483c0d637f5c68", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_80211_A, - .iv_pos = 0x50fcc, /* A-PHY init vals empty */ - .uc2_pos = 0x528bc, .uc2_length = 0x3f48, - .uc4_pos = 0x56804, .uc4_length = 0x4df0, - .uc5_pos = 0x5b5f4, .uc5_length = 0x57e0, - .pcm4_pos = 0x60dd4, .pcm4_length = 0x520, - .pcm5_pos = 0x612f4, .pcm5_length = 0x520, - }, - { - .name = "AppleAirPort2", - .version = "3.90.34.0.p16 (404.2)", - .md5 = "7200d1aef5f413ebc811046d068b40dc", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_80211_A, - .iv_pos = 0x511ec, /* A-PHY init vals empty */ - .uc2_pos = 0x52adc, .uc2_length = 0x3f48, - .uc4_pos = 0x56a24, .uc4_length = 0x4df0, - .uc5_pos = 0x5b814, .uc5_length = 0x57f0, - .pcm4_pos = 0x61004, .pcm4_length = 0x520, - .pcm5_pos = 0x61524, .pcm5_length = 0x520, - }, - { - .name = "AppleAirPort2", - .version = "3.90.34.0.p16 (404.2)", - .md5 = "86cc708e8df3b035a1dbea41ac4eb7d2", - .flags = BYTE_ORDER_BIG_ENDIAN | - MISSING_INITVAL_80211_A, - .iv_pos = 0x5021c, /* A-PHY init vals empty */ - .uc2_pos = 0x51b0c, .uc2_length = 0x3f48, - .uc4_pos = 0x55a54, .uc4_length = 0x4df0, - .uc5_pos = 0x5a844, .uc5_length = 0x57f0, - .pcm4_pos = 0x60034, .pcm4_length = 0x520, - .pcm5_pos = 0x60554, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.10.8.0", /* 10/04/2002 */ - .md5 = "288923b401e87ef76b7ae2652601ee47", - .flags = DRIVER_UNSUPPORTED, /* file differs from later ones */ - }, - { - .name = "bcmwl5.sys", - .version = "3.10.53.6", /* 04/28/2003 */ - .md5 = "b43c593fd7c2a47cdc40580fe341f674", - .flags = DRIVER_UNSUPPORTED, /* file differs from later ones */ - }, - { - .name = "bcmwl5.sys", - .version = "3.20.23.0", /* 06/13/2003 */ - .md5 = "1b1cf5e962c15abca83d1ef2b3906e2f", /* pcm5 not available, driver is too old */ - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x2a1d0, - .uc2_pos = 0x2d228, .uc2_length = 0x3da8, - .uc4_pos = 0x30fd8, .uc4_length = 0x4470, - .uc5_pos = 0x35450, .uc5_length = 0x4ba0, - .pcm4_pos = 0x39ff8, .pcm4_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.30.15.0", /* 07/17/2003 */ - .md5 = "ebf36d658d0da5b1ea667fa403919c26", - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x2c658, - .uc2_pos = 0x2f738, .uc2_length = 0x3d88, - .uc4_pos = 0x334c8, .uc4_length = 0x44a0, - .uc5_pos = 0x37970, .uc5_length = 0x4ec0, - .pcm4_pos = 0x3c838, .pcm4_length = 0x478, - .pcm5_pos = 0x3ccb8, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.40.20.0", /* 09/24/2003 */ - .md5 = "0c3fc803184f6f85e665dd012611225b", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x302f0, - .uc2_pos = 0x33d88, .uc2_length = 0x3db8, - .uc4_pos = 0x37b48, .uc4_length = 0x45d8, - .uc5_pos = 0x3c128, .uc5_length = 0x5050, - .pcm4_pos = 0x41180, .pcm4_length = 0x478, - .pcm5_pos = 0x41600, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.40.25.3", /* 10/28/2003 */ - .md5 = "5e58a3148b98c9f356cde6049435cb21", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x30970, - .uc2_pos = 0x34408, .uc2_length = 0x3db0, - .uc4_pos = 0x381c0, .uc4_length = 0x45d0, - .uc5_pos = 0x3c798, .uc5_length = 0x5050, - .pcm4_pos = 0x417f0, .pcm4_length = 0x478, - .pcm5_pos = 0x41c70, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.40.73.0", /* 06/25/2004 */ - .md5 = "52d67c5465c01913b03b7daca0cc4077", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x37398, - .uc2_pos = 0x3ae30, .uc2_length = 0x3ff0, - .uc4_pos = 0x3ee28, .uc4_length = 0x47f0, - .uc5_pos = 0x43620, .uc5_length = 0x5260, - .pcm4_pos = 0x48888, .pcm4_length = 0x478, - .pcm5_pos = 0x48d08, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.40.100.0", /* 02/07/2004 */ - .md5 = "431195b941dff794f23c2077fcbf8377", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x34d18, - .uc2_pos = 0x387b0, .uc2_length = 0x3ff0, - .uc4_pos = 0x3c7a8, .uc4_length = 0x47f0, - .uc5_pos = 0x40fa0, .uc5_length = 0x5260, - .pcm4_pos = 0x46208, .pcm4_length = 0x478, - .pcm5_pos = 0x46688, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.50.21.11", /* 02/19/2004 */ - .md5 = "ae96075a3aed5c40f1ead477ea94acd7", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x33370, - .uc2_pos = 0x36e58, .uc2_length = 0x3e00, - .uc4_pos = 0x3ac60, .uc4_length = 0x4628, - .uc5_pos = 0x3f290, .uc5_length = 0x5548, - .pcm4_pos = 0x447e0, .pcm4_length = 0x478, - .pcm5_pos = 0x44c60, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.60.7.0", /* 03/22/2004 */ - .md5 = "c5616736df4e83930780dca5795387ca", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3b988, - .uc2_pos = 0x3f580, .uc2_length = 0x3e08, - .uc4_pos = 0x43390, .uc4_length = 0x4e58, - .uc5_pos = 0x481f0, .uc5_length = 0x5608, - .pcm4_pos = 0x4d800, .pcm4_length = 0x478, - .pcm5_pos = 0x4dc80, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.60.7.5", /* 06/07/2004 */ - .md5 = "d2ae116c741c215ef3ef68603db9917f", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3b988, - .uc2_pos = 0x3f580, .uc2_length = 0x3e08, - .uc4_pos = 0x43390, .uc4_length = 0x4e58, - .uc5_pos = 0x481f0, .uc5_length = 0x5608, - .pcm4_pos = 0x4d800, .pcm4_length = 0x478, - .pcm5_pos = 0x4dc80, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.70.12.0", /* 06/02/2004 */ - .md5 = "d409b089370486521d5408baed9bffde", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x39480, - .uc2_pos = 0x3d0c8, .uc2_length = 0x3e80, - .uc4_pos = 0x40f50, .uc4_length = 0x4ed0, - .uc5_pos = 0x45e28, .uc5_length = 0x5680, - .pcm4_pos = 0x4b4b0, .pcm4_length = 0x478, - .pcm5_pos = 0x4b930, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.70.17.0", /* 06/25/2004 */ - .md5 = "d87b4e14e890091d8e64fb5c570cf192", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x39600, - .uc2_pos = 0x3d248, .uc2_length = 0x3e80, - .uc4_pos = 0x410d0, .uc4_length = 0x4ed0, - .uc5_pos = 0x45fa8, .uc5_length = 0x5680, - .pcm4_pos = 0x4b630, .pcm4_length = 0x478, - .pcm5_pos = 0x4bab0, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.70.22.0", /* 10/20/2004 */ - .md5 = "185a6dc6d655dc31c0b228cc94fb99ac", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x39a88, - .uc2_pos = 0x3d6d0, .uc2_length = 0x3e80, - .uc4_pos = 0x41558, .uc4_length = 0x4ed0, - .uc5_pos = 0x46430, .uc5_length = 0x5680, - .pcm4_pos = 0x4bab8, .pcm4_length = 0x478, - .pcm5_pos = 0x4bf38, .pcm5_length = 0x478, - }, - { - .name = "bcmwl5.sys", - .version = "3.90.41.1", /* 07/04/2005 */ - .md5 = "0a87541dd24c6f046a4bf8f671f74de2", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3bec8, - .uc2_pos = 0x3fb38, .uc2_length = 0x3f48, - .uc4_pos = 0x43a88, .uc4_length = 0x4df0, - .uc5_pos = 0x48880, .uc5_length = 0x57e0, - .pcm4_pos = 0x4e068, .pcm4_length = 0x520, - .pcm5_pos = 0x4e590, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.100.35.0", /* 11/27/2004 */ - .md5 = "c3ab2d6954c7b5103770832a3a6a591b", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3de80, - .uc2_pos = 0x41af0, .uc2_length = 0x3f58, - .uc4_pos = 0x45a50, .uc4_length = 0x4df8, - .uc5_pos = 0x4a850, .uc5_length = 0x57f8, - .pcm4_pos = 0x50050, .pcm4_length = 0x520, - .pcm5_pos = 0x50578, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.100.35.1", /* 02/10/2005 */ - .md5 = "da7ca369a1a3593ceac85dec2d267a08", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3df00, - .uc2_pos = 0x41b70, .uc2_length = 0x3f58, - .uc4_pos = 0x45ad0, .uc4_length = 0x4df8, - .uc5_pos = 0x4a8d0, .uc5_length = 0x57f8, - .pcm4_pos = 0x500d0, .pcm4_length = 0x520, - .pcm5_pos = 0x505f8, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.100.46.0", /* 12/22/2004 */ - .md5 = "38ca1443660d0f5f06887c6a2e692aeb", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3de80, - .uc2_pos = 0x41af0, .uc2_length = 0x3f58, - .uc4_pos = 0x45a50, .uc4_length = 0x4df8, - .uc5_pos = 0x4a850, .uc5_length = 0x57f8, - .pcm4_pos = 0x50050, .pcm4_length = 0x520, - .pcm5_pos = 0x50578, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.100.64.0", /* 02/11/2005 */ - .md5 = "e7debb46b9ef1f28932e533be4a3d1a9", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3e980, - .uc2_pos = 0x425f0, .uc2_length = 0x3f58, - .uc4_pos = 0x46550, .uc4_length = 0x4e00, - .uc5_pos = 0x4b358, .uc5_length = 0x5800, - .pcm4_pos = 0x50b60, .pcm4_length = 0x520, - .pcm5_pos = 0x51088, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.100.64.50", /* 04/05/2005 */ - .md5 = "4b3e367b829b9b2c0c088909a617e04e", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3e900, - .uc2_pos = 0x42570, .uc2_length = 0x3f58, - .uc4_pos = 0x464d0, .uc4_length = 0x4e00, - .uc5_pos = 0x4b2d8, .uc5_length = 0x5800, - .pcm4_pos = 0x50ae0, .pcm4_length = 0x520, - .pcm5_pos = 0x51008, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.100.65.1", /* 04/21/2005 */ - .md5 = "d5f1ab1aab8b81bca6f19da9554a267a", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3e980, - .uc2_pos = 0x425f0, .uc2_length = 0x3f58, - .uc4_pos = 0x46550, .uc4_length = 0x4e00, - .uc5_pos = 0x4b358, .uc5_length = 0x5800, - .pcm4_pos = 0x50b60, .pcm4_length = 0x520, - .pcm5_pos = 0x51088, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.120.27.0", /* 05/19/2005 */ - .md5 = "8d49f11238815a320880fee9f98b2c92", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3f700, - .uc2_pos = 0x43370, .uc2_length = 0x3f68, - .uc4_pos = 0x472e0, .uc4_length = 0x4e10, - .uc5_pos = 0x4c0f8, .uc5_length = 0x5800, - .pcm4_pos = 0x51900, .pcm4_length = 0x520, - .pcm5_pos = 0x51e28, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5.sys", - .version = "3.140.16.0", /* 07/21/2005 */ - .md5 = "fa4a4a50b4b2647afedc676cc68c69cc", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3f700, - .uc2_pos = 0x43370, .uc2_length = 0x3f68, - .uc4_pos = 0x472e0, .uc4_length = 0x4e10, - .uc5_pos = 0x4c0f8, .uc5_length = 0x5800, - .pcm4_pos = 0x51900, .pcm4_length = 0x520, - .pcm5_pos = 0x51e28, .pcm5_length = 0x520, - }, - { - .name = "bcmwl564.sys", - .version = "3.70.17.5", /* 09/21/2004 */ - .md5 = "f5590c8784b91dfd9ee092d3040b6e40", /* for 64bit machines */ - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x566f0, - .uc2_pos = 0x5a360, .uc2_length = 0x3e80, - .uc4_pos = 0x5e1f0, .uc4_length = 0x4ed0, - .uc5_pos = 0x630d0, .uc5_length = 0x5680, - .pcm4_pos = 0x68760, .pcm4_length = 0x478, - .pcm5_pos = 0x68be0, .pcm5_length = 0x478, - }, - { - .name = "bcmwl564.sys", - .version = "3.100.64.10", /* 05/12/2005 */ - .md5 = "b8d76da338ecf2c650f5f7ca226ccf89", /* for 64bit machines */ - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x50bf0, - .uc2_pos = 0x54860, .uc2_length = 0x3f58, - .uc4_pos = 0x587c0, .uc4_length = 0x4e00, - .uc5_pos = 0x5d5d0, .uc5_length = 0x5800, - .pcm4_pos = 0x62de0, .pcm4_length = 0x520, - .pcm5_pos = 0x63310, .pcm5_length = 0x520, - }, - { - .name = "bcmwl5a.sys", - .version = "3.90.16.0", /* 12/06/2004 */ - .md5 = "e6d927deea6c75bddf84080e6c3837b7", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3b4c8, - .uc2_pos = 0x3f138, .uc2_length = 0x3f48, - .uc4_pos = 0x43088, .uc4_length = 0x4de8, - .uc5_pos = 0x47e78, .uc5_length = 0x57d8, - .pcm4_pos = 0x4d658, .pcm4_length = 0x520, - .pcm5_pos = 0x4db80, .pcm5_length = 0x520, - }, - { - .name = "d11ucode.o", - .version = "3.31.16.0 ?", /*FIXME: version correct? */ - .md5 = "31e6cac8a8129bf8f91291293e017329", - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x40, - .uc2_pos = 0x3120, .uc2_length = 0x3d88, - .uc4_pos = 0x6eac, .uc4_length = 0x44a0, - .uc5_pos = 0xb350, .uc5_length = 0x4ec0, - .pcm4_pos = 0x10214, .pcm4_length = 0x478, - .pcm5_pos = 0x10690, .pcm5_length = 0x478, - }, - { - .name = "d11ucode.o", - .version = "3.60.7.0 ? (1.3.2)", /* no version number found */ - .md5 = "7774e5dda1daa2b3f83d279552ca1cc4", /* but same fw files are also */ - .flags = BYTE_ORDER_LITTLE_ENDIAN, /* in bcmwl5.sys 3.60.7.0 */ - .iv_pos = 0x40, - .uc2_pos = 0x3c38, .uc2_length = 0x3e08, - .uc4_pos = 0x7a44, .uc4_length = 0x4e58, - .uc5_pos = 0xc8a0, .uc5_length = 0x5608, - .pcm4_pos = 0x11eac, .pcm4_length = 0x478, - .pcm5_pos = 0x12328, .pcm5_length = 0x478, - }, - { - .name = "d11ucode.o", - .version = "3.90.7.0 ? (3.90.RC7)", /* 10/14/2004 */ - .md5 = "b2580361620881b06fa810422ec8b7ce", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x60, - .uc2_pos = 0x3cd0, .uc2_length = 0x3ec0, - .uc4_pos = 0x7b94, .uc4_length = 0x4d60, - .uc5_pos = 0xc8f8, .uc5_length = 0x5750, - .pcm4_pos = 0x1204c, .pcm4_length = 0x520, - .pcm5_pos = 0x12570, .pcm5_length = 0x520, - }, - { - .name = "d11ucode.o", - .version = "3.90.37.0", - .md5 = "2543935259739a8a879ccb8386647ac7", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x60, - .uc2_pos = 0x3cd0, .uc2_length = 0x3f48, - .uc4_pos = 0x7c1c, .uc4_length = 0x4df0, - .uc5_pos = 0xca10, .uc5_length = 0x57e0, - .pcm4_pos = 0x121f4, .pcm4_length = 0x520, - .pcm5_pos = 0x12718, .pcm5_length = 0x520, - }, - { - .name = "wl.o", - .version = "3.31.15.0", /* 07/28/2003 */ - .md5 = "a85af65b5ae1d64ee11eab714faab843", - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x32270, - .uc2_pos = 0x35350, .uc2_length = 0x3d88, - .uc4_pos = 0x390dc, .uc4_length = 0x44a0, - .uc5_pos = 0x3d580, .uc5_length = 0x4ec0, - .pcm4_pos = 0x42444, .pcm4_length = 0x478, - .pcm5_pos = 0x428c0, .pcm5_length = 0x478, - }, - { - .name = "wl.o", - .version = "3.31.15.0", /* 07/28/2003 */ - .md5 = "98dd50a95b02c8bcb3725c770df81dfc", - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x32270, - .uc2_pos = 0x35350, .uc2_length = 0x3d88, - .uc4_pos = 0x390dc, .uc4_length = 0x44a0, - .uc5_pos = 0x3d580, .uc5_length = 0x4ec0, - .pcm4_pos = 0x42444, .pcm4_length = 0x478, - .pcm5_pos = 0x428c0, .pcm5_length = 0x478, - }, - { - .name = "wl.o", - .version = "3.50.21.0", /* 05/11/2003 */ - .md5 = "f71be0e1d14f68c98d916465a300d835", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x38990, - .uc2_pos = 0x3c428, .uc2_length = 0x3db8, - .uc4_pos = 0x401e4, .uc4_length = 0x45d8, - .uc5_pos = 0x447c0, .uc5_length = 0x5050, - .pcm4_pos = 0x49814, .pcm4_length = 0x478, - .pcm5_pos = 0x49c90, .pcm5_length = 0x478, - }, - { - .name = "wl.o", - .version = "3.50.21.10", /* 01/21/2004 */ - .md5 = "191029d5e7097ed7db92cbd6e6131f85", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3a5d0, - .uc2_pos = 0x3e0b8, .uc2_length = 0x3e00, - .uc4_pos = 0x41ebc, .uc4_length = 0x4628, - .uc5_pos = 0x464e8, .uc5_length = 0x5548, - .pcm4_pos = 0x4ba34, .pcm4_length = 0x478, - .pcm5_pos = 0x4beb0, .pcm5_length = 0x478, - }, - { - .name = "wl.o", - .version = "3.60.7.0 ? (1.3.2.0)", /* 02/04/2004 */ - .md5 = "7009220d84c445797443aa0221b7d8a4", /* no bcm version found */ - .flags = BYTE_ORDER_LITTLE_ENDIAN, /* but same fw files are also */ - .iv_pos = 0x545e0, /* in bcmwl5.sys 3.60.7.0, */ - .uc2_pos = 0x581d8, .uc2_length = 0x3e08, - .uc4_pos = 0x5bfe4, .uc4_length = 0x4e58, - .uc5_pos = 0x60e40, .uc5_length = 0x5608, - .pcm4_pos = 0x6644c, .pcm4_length = 0x478, - .pcm5_pos = 0x668c8, .pcm5_length = 0x478, - }, - { - .name = "wl.o", - .version = "3.60.13.0", /* 05/05/2004 */ - .md5 = "275dd4958eb94058d4650f58d534c635", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3b740, - .uc2_pos = 0x3f388, .uc2_length = 0x3e30, - .uc4_pos = 0x431bc, .uc4_length = 0x4e80, - .uc5_pos = 0x48040, .uc5_length = 0x5630, - .pcm4_pos = 0x4d674, .pcm4_length = 0x478, - .pcm5_pos = 0x4daf0, .pcm5_length = 0x478, - }, - { - .name = "wl.o", - .version = "3.60.13.0", /* 08/02/2004 */ - .md5 = "4f20653a0b7c0bb3bd1ee0dd79f77785", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3b730, - .uc2_pos = 0x3f378, .uc2_length = 0x3e30, - .uc4_pos = 0x431ac, .uc4_length = 0x4e80, - .uc5_pos = 0x48030, .uc5_length = 0x5630, - .pcm4_pos = 0x4d664, .pcm4_length = 0x478, - .pcm5_pos = 0x4dae0, .pcm5_length = 0x478, - }, - { - .name = "wl.o", - .version = "3.90.7.0", /* 14/10/2004 */ - .md5 = "f15b59ad4d6f6ad2c7f45193d033aff8", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x4d890, - .uc2_pos = 0x51500, .uc2_length = 0x3ec0, - .uc4_pos = 0x553c4, .uc4_length = 0x4d60, - .uc5_pos = 0x5a128, .uc5_length = 0x5750, - .pcm4_pos = 0x5f87c, .pcm4_length = 0x520, - .pcm5_pos = 0x5fda0, .pcm5_length = 0x520, - }, - { - .name = "wl.o", - .version = "3.90.37.0", /* 15/02/2005 */ - .md5 = "984c42947552652d5ab61b78e7d12227", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x4cf50, - .uc2_pos = 0x50bc0, .uc2_length = 0x3f48, - .uc4_pos = 0x54b0c, .uc4_length = 0x4df0, - .uc5_pos = 0x59900, .uc5_length = 0x57e0, - .pcm4_pos = 0x5f0e4, .pcm4_length = 0x520, - .pcm5_pos = 0x5f608, .pcm5_length = 0x520, - }, - { - .name = "wl_ap.o", - .version = "3.31.16.0", /* 08/06/2003 */ - .md5 = "463633e7bf0efc6c0f8eac2514a71024", - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x32270, - .uc2_pos = 0x35350, .uc2_length = 0x3d88, - .uc4_pos = 0x390dc, .uc4_length = 0x44a0, - .uc5_pos = 0x3d580, .uc5_length = 0x4ec0, - .pcm4_pos = 0x42444, .pcm4_length = 0x478, - .pcm5_pos = 0x428c0, .pcm5_length = 0x478, - }, - { - .name = "wl_ap.o", - .version = "3.90.37.0", /* 15/02/2005 */ - .md5 = "0538296d46a854d2facc9a0db2088180", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3eac0, - .uc2_pos = 0x42730, .uc2_length = 0x3f48, - .uc4_pos = 0x4667c, .uc4_length = 0x4df0, - .uc5_pos = 0x4b470, .uc5_length = 0x57e0, - .pcm4_pos = 0x50c54, .pcm4_length = 0x520, - .pcm5_pos = 0x51178, .pcm5_length = 0x520, - }, - { - .name = "wl_ap.o", - .version = "3.90.37.0", /* 15/02/2005 */ - .md5 = "6c9073531a528dd455b716b5e821e696", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x3eac0, - .uc2_pos = 0x42730, .uc2_length = 0x3f48, - .uc4_pos = 0x4667c, .uc4_length = 0x4df0, - .uc5_pos = 0x4b470, .uc5_length = 0x57e0, - .pcm4_pos = 0x50c54, .pcm4_length = 0x520, - .pcm5_pos = 0x51178, .pcm5_length = 0x520, - }, - { - .name = "wl_apsta.o", - .version = "3.31.16.0", /* 06/08/2003 */ - .md5 = "22b90e4cbeee45ad7f78ff536c65712a", - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x38020, - .uc2_pos = 0x3b100, .uc2_length = 0x3d88, - .uc4_pos = 0x3ee8c, .uc4_length = 0x44a0, - .uc5_pos = 0x43330, .uc5_length = 0x4ec0, - .pcm4_pos = 0x481f4, .pcm4_length = 0x478, - .pcm5_pos = 0x48670, .pcm5_length = 0x478, - }, - { - .name = "wl_apsta.o", - .version = "3.31.16.0", /* 06/08/2003 */ - .md5 = "dfce35a8b5cb6e53e1ab75342c7e7194", - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x38020, - .uc2_pos = 0x3b100, .uc2_length = 0x3d88, - .uc4_pos = 0x3ee8c, .uc4_length = 0x44a0, - .uc5_pos = 0x43330, .uc5_length = 0x4ec0, - .pcm4_pos = 0x481f4, .pcm4_length = 0x478, - .pcm5_pos = 0x48670, .pcm5_length = 0x478, - }, - { - .name = "wl_apsta.o", - .version = "3.90.37.0", /* 15/02/2005 */ - .md5 = "2922e6c48917eacd6c8c094347d2ec4b", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x4ebc0, - .uc2_pos = 0x52830, .uc2_length = 0x3f48, - .uc4_pos = 0x5677c, .uc4_length = 0x4df0, - .uc5_pos = 0x5b570, .uc5_length = 0x57e0, - .pcm4_pos = 0x60d54, .pcm4_length = 0x520, - .pcm5_pos = 0x61278, .pcm5_length = 0x520, - }, - { - .name = "wl_apsta.o", - .version = "3.90.37.0", /* 15/02/2005 */ - .md5 = "f9fa565a766e8befeb495a8a8c0c134b", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x4ebc0, - .uc2_pos = 0x52830, .uc2_length = 0x3f48, - .uc4_pos = 0x5677c, .uc4_length = 0x4df0, - .uc5_pos = 0x5b570, .uc5_length = 0x57e0, - .pcm4_pos = 0x60d54, .pcm4_length = 0x520, - .pcm5_pos = 0x61278, .pcm5_length = 0x520, - }, - { - .name = "wl_apsta.o", - .version = "3.130.20.0", /* 19/05/2005 */ - .md5 = "e08665c5c5b66beb9c3b2dd54aa80cb3", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x56020, - .uc2_pos = 0x59ca0, .uc2_length = 0x3fe0, - .uc4_pos = 0x5dc84, .uc4_length = 0x4e78, - .uc5_pos = 0x62b00, .uc5_length = 0x5700, - .uc11_pos = 0x68204, .uc11_length = 0x54a8, - .pcm4_pos = 0x6d6b0, .pcm4_length = 0x520, - .pcm5_pos = 0x6dbd4, .pcm5_length = 0x520, - }, - { - .name = "wl_sta.o", - .version = "3.31.16.0", /* 08/06/2003 */ - .md5 = "c3e663cb78b2fc299088de69fc11a9a9", - .flags = BYTE_ORDER_LITTLE_ENDIAN | - MISSING_INITVAL_08, - .iv_pos = 0x317b0, - .uc2_pos = 0x34890, .uc2_length = 0x3d88, - .uc4_pos = 0x3861c, .uc4_length = 0x44a0, - .uc5_pos = 0x3cac0, .uc5_length = 0x4ec0, - .pcm4_pos = 0x41984, .pcm4_length = 0x478, - .pcm5_pos = 0x41e00, .pcm5_length = 0x478, - }, - { - .name = "wl_sta.o", - .version = "3.90.37.0", /* 15/02/2005 */ - .md5 = "4631d4d4c3ab943462e1ea24f4dba7bd", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x47040, - .uc2_pos = 0x4acb0, .uc2_length = 0x3f48, - .uc4_pos = 0x4ebfc, .uc4_length = 0x4df0, - .uc5_pos = 0x539f0, .uc5_length = 0x57e0, - .pcm4_pos = 0x591d4, .pcm4_length = 0x520, - .pcm5_pos = 0x596f8, .pcm5_length = 0x520, - }, - { - .name = "wl_sta.o", - .version = "3.90.37.0", /* 15/02/2005 */ - .md5 = "bf824b38b3993e0a8b5a9bf717c428ed", - .flags = BYTE_ORDER_LITTLE_ENDIAN, - .iv_pos = 0x47040, - .uc2_pos = 0x4acb0, .uc2_length = 0x3f48, - .uc4_pos = 0x4ebfc, .uc4_length = 0x4df0, - .uc5_pos = 0x539f0, .uc5_length = 0x57e0, - .pcm4_pos = 0x591d4, .pcm4_length = 0x520, - .pcm5_pos = 0x596f8, .pcm5_length = 0x520, - }, -}; - -#define FILES (sizeof(files) / sizeof(files[0])) diff --git a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/md5.c b/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/md5.c deleted file mode 100644 index ad134146e4f..00000000000 --- a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/md5.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * This code implements the MD5 message-digest algorithm. - * The algorithm is due to Ron Rivest. This code was - * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. - * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. - * - * To compute the message digest of a chunk of bytes, declare an - * MD5Context structure, pass it to MD5Init, call MD5Update as - * needed on buffers full of bytes, and then call MD5Final, which - * will fill a supplied 16-byte array with the digest. - */ - -/* Brutally hacked by John Walker back from ANSI C to K&R (no - prototypes) to maintain the tradition that Netfone will compile - with Sun's original "cc". */ -/* Ripped out ugly K&R again ;) --mbuesch */ - -#include <memory.h> /* for memcpy() */ -#include "md5.h" - -extern int big_endian_cpu; - -/* - * Note: this code is harmless on little-endian machines, - * but we return early nevertheless. - */ -static void byteReverse(unsigned char *buf, unsigned longs) -{ - uint32_t t; - - if (!big_endian_cpu) - return; - - do { - t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 | - ((unsigned) buf[1] << 8 | buf[0]); - *(uint32_t *) buf = t; - buf += 4; - } while (--longs); -} - -/* The four core functions - F1 is optimized somewhat */ - -/* #define F1(x, y, z) (x & y | ~x & z) */ -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -/* This is the central step in the MD5 algorithm. */ -#define MD5STEP(f, w, x, y, z, data, s) \ - ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) - -/* - * The core of the MD5 algorithm, this alters an existing MD5 hash to - * reflect the addition of 16 longwords of new data. MD5Update blocks - * the data and converts bytes into longwords for this routine. - */ -static void MD5Transform(uint32_t *buf, uint32_t *in) -{ - register uint32_t a, b, c, d; - - a = buf[0]; - b = buf[1]; - c = buf[2]; - d = buf[3]; - - MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); - MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); - MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); - MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); - MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); - MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); - MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); - MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); - MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); - MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); - MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); - MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); - MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); - MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); - MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; -} - -/* - * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious - * initialization constants. - */ -void MD5Init(struct MD5Context *ctx) -{ - ctx->buf[0] = 0x67452301; - ctx->buf[1] = 0xefcdab89; - ctx->buf[2] = 0x98badcfe; - ctx->buf[3] = 0x10325476; - - ctx->bits[0] = 0; - ctx->bits[1] = 0; -} - -/* - * Update context to reflect the concatenation of another buffer full - * of bytes. - */ -void MD5Update(struct MD5Context *ctx, unsigned char *buf, unsigned len) -{ - uint32_t t; - - /* Update bitcount */ - - t = ctx->bits[0]; - if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t) - ctx->bits[1]++; /* Carry from low to high */ - ctx->bits[1] += len >> 29; - - t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ - - /* Handle any leading odd-sized chunks */ - - if (t) { - unsigned char *p = (unsigned char *) ctx->in + t; - - t = 64 - t; - if (len < t) { - memcpy(p, buf, len); - return; - } - memcpy(p, buf, t); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32_t *) ctx->in); - buf += t; - len -= t; - } - /* Process data in 64-byte chunks */ - - while (len >= 64) { - memcpy(ctx->in, buf, 64); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32_t *) ctx->in); - buf += 64; - len -= 64; - } - - /* Handle any remaining bytes of data. */ - - memcpy(ctx->in, buf, len); -} - -/* - * Final wrapup - pad to 64-byte boundary with the bit pattern - * 1 0* (64-bit count of bits processed, MSB-first) - */ -void MD5Final(unsigned char *digest, struct MD5Context *ctx) -{ - unsigned count; - unsigned char *p; - - /* Compute number of bytes mod 64 */ - count = (ctx->bits[0] >> 3) & 0x3F; - - /* Set the first char of padding to 0x80. This is safe since there is - always at least one byte free */ - p = ctx->in + count; - *p++ = 0x80; - - /* Bytes of padding needed to make 64 bytes */ - count = 64 - 1 - count; - - /* Pad out to 56 mod 64 */ - if (count < 8) { - /* Two lots of padding: Pad the first block to 64 bytes */ - memset(p, 0, count); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32_t *) ctx->in); - - /* Now fill the next block with 56 bytes */ - memset(ctx->in, 0, 56); - } else { - /* Pad block to 56 bytes */ - memset(p, 0, count - 8); - } - byteReverse(ctx->in, 14); - - /* Append length in bits and transform */ - ((uint32_t *) ctx->in)[14] = ctx->bits[0]; - ((uint32_t *) ctx->in)[15] = ctx->bits[1]; - - MD5Transform(ctx->buf, (uint32_t *) ctx->in); - byteReverse((unsigned char *) ctx->buf, 4); - memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ -} diff --git a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/md5.h b/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/md5.h deleted file mode 100644 index ee574e4133f..00000000000 --- a/openwrt/target/linux/package/bcm43xx-standalone/fwcutter/md5.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef FWCUTTER_MD5_H_ -#define FWCUTTER_MD5_H_ - -#include <stdint.h> - -struct MD5Context { - uint32_t buf[4]; - uint32_t bits[2]; - unsigned char in[64]; -}; - -void MD5Init(struct MD5Context *ctx); -void MD5Update(struct MD5Context *ctx, unsigned char *buf, unsigned len); -void MD5Final(unsigned char *digest, struct MD5Context *ctx); - -#endif /* FWCUTTER_MD5_H_ */ diff --git a/openwrt/target/linux/package/bcm43xx-standalone/ipkg/kmod-bcm43xx-standalone.control b/openwrt/target/linux/package/bcm43xx-standalone/ipkg/kmod-bcm43xx-standalone.control deleted file mode 100644 index 5dcc79f829d..00000000000 --- a/openwrt/target/linux/package/bcm43xx-standalone/ipkg/kmod-bcm43xx-standalone.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-bcm43xx-standalone -Priority: optional -Section: sys -Description: Free BCM43xx wireless driver (devicescape) diff --git a/openwrt/target/linux/package/ieee80211-dscape/Config.in b/openwrt/target/linux/package/ieee80211-dscape/Config.in deleted file mode 100644 index d747ed2fbab..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config PACKAGE_KMOD_IEEE80211_DSCAPE - prompt "kmod-ieee80211-dscape............. IEEE 802.11 stack (devicescape)" - tristate - default n - depends LINUX_2_6_BRCM || LINUX_2_6_X86 - - help - IEEE 802.11 stack (devicescape) - - http://ftp.kernel.org/pub/linux/kernel/people/jbenc/ diff --git a/openwrt/target/linux/package/ieee80211-dscape/Makefile b/openwrt/target/linux/package/ieee80211-dscape/Makefile deleted file mode 100644 index 3de9b34fb83..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME := kmod-ieee80211-dscape -PKG_RELEASE := 1 -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_IEEE80211_DSCAPE,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ - SUBDIRS="$(PKG_BUILD_DIR)" \ - LINUXINCLUDE="-I$(shell pwd)/src/include -I$(LINUX_DIR)/include" \ - modules - touch $@ - -$(IPKG_KMOD_IEEE80211_DSCAPE): - install -m0755 -d $(IDIR_KMOD_IEEE80211_DSCAPE)/lib/modules/$(LINUX_VERSION) - #install -m0755 -d $(IDIR_KMOD_IEEE80211_DSCAPE)/etc/modules.d - $(CP) $(PKG_BUILD_DIR)/*.ko $(IDIR_KMOD_IEEE80211_DSCAPE)/lib/modules/$(LINUX_VERSION) - $(IPKG_BUILD) $(IDIR_KMOD_IEEE80211_DSCAPE) $(PACKAGE_DIR) - -install-dev: - mkdir -p $(STAGING_DIR)/usr/include/ieee80211-dscape - $(CP) src/include/* $(STAGING_DIR)/usr/include/ieee80211-dscape/ - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/ieee80211-dscape - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/target/linux/package/ieee80211-dscape/ipkg/kmod-ieee80211-dscape.control b/openwrt/target/linux/package/ieee80211-dscape/ipkg/kmod-ieee80211-dscape.control deleted file mode 100644 index f510d2d18c3..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/ipkg/kmod-ieee80211-dscape.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-ieee80211-dscape -Priority: optional -Section: sys -Description: IEEE 802.11 stack (devicescape) diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/Kconfig b/openwrt/target/linux/package/ieee80211-dscape/src/Kconfig deleted file mode 100644 index 052a4190e58..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/Kconfig +++ /dev/null @@ -1,32 +0,0 @@ -config IEEE80211 - tristate "Generic IEEE 802.11 Networking Stack" - ---help--- - This option enables the hardware independent IEEE 802.11 - networking stack. - -config IEEE80211_DEBUG - bool "Enable debugging output" - depends on IEEE80211 - ---help--- - This option will enable debug tracing output for the - ieee80211 network stack. - - If you are not trying to debug or develop the ieee80211 - subsystem, you most likely want to say N here. - -config IEEE80211_VERBOSE_DEBUG - bool "Verbose debugging output" - depends on IEEE80211_DEBUG - -config TKIP_DEBUG - bool "TKIP debugging" - depends on IEEE80211_DEBUG - -config IEEE80211_DEBUG_COUNTERS - bool "Extra statistics for TX/RX debugging" - depends on IEEE80211_DEBUG - -config HOSTAPD_WPA_TESTING - bool "Support for TKIP countermeasures testing" - depends on IEEE80211_DEBUG - diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/Makefile b/openwrt/target/linux/package/ieee80211-dscape/src/Makefile deleted file mode 100644 index ac4ab887ba3..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -obj-$(CONFIG_IEEE80211) += 80211.o rate_control.o - -80211-objs := \ - ieee80211.o \ - ieee80211_ioctl.o \ - sta_info.o \ - wep.o \ - wpa.o \ - ieee80211_proc.o \ - ieee80211_scan.o \ - ieee80211_sta.o \ - michael.o \ - tkip.o \ - aes_ccm.o \ - wme.o - -ifeq ($(CONFIG_NET_SCHED),) - 80211-objs += fifo_qdisc.o -endif - -ifeq ($(CONFIG_IEEE80211_LEDS),y) - 80211-objs += ieee80211_led.o -endif diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/aes.c b/openwrt/target/linux/package/ieee80211-dscape/src/aes.c deleted file mode 100644 index 085e4a99381..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/aes.c +++ /dev/null @@ -1,564 +0,0 @@ -/* Based on Rijndael implementation that has been placed in the public domain, - * although heavily modified. - * - * Modifications Copyright 2003, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Optimized both speed and size by removing not used key lengths (only - * 128-bit is used in IEEE 802.11i). - */ - -/* Use 256-byte Te4 table instead of larger 1024-byte */ -#define SMALL_TE4 - -/* Save data size by using only one 1k table, but with a drawback of having to - * rotate entries at lookup. This can be useful, if the CPU supports free - * rotate on memory read. However, if this is not the case, this is much slower - * than four-table implementation. */ -/* #define ONLY_ONE_TABLE */ - - -/* --- start of code that is based on public domain AES implementation --- */ - -/** - * rijndael-alg-fst.c - * - * @version 3.0 (December 2000) - * - * Optimised ANSI C code for the Rijndael cipher (now AES) - * - * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be> - * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be> - * @author Paulo Barreto <paulo.barreto@terra.com.br> - * - * This code is hereby placed in the public domain. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -Te0[x] = S [x].[02, 01, 01, 03]; -Te1[x] = S [x].[03, 02, 01, 01]; -Te2[x] = S [x].[01, 03, 02, 01]; -Te3[x] = S [x].[01, 01, 03, 02]; -Te4[x] = S [x].[01, 01, 01, 01]; -*/ - -static const u32 Te0[256] = -{ - 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, - 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, - 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, - 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, - 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, - 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, - 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, - 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, - 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, - 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, - 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, - 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, - 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, - 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, - 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, - 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, - 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, - 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, - 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, - 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, - 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, - 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, - 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, - 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, - 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, - 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, - 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, - 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, - 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, - 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, - 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, - 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, - 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, - 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, - 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, - 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, - 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, - 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, - 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, - 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, - 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, - 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, - 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, - 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, - 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, - 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, - 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, - 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, - 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, - 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, - 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, - 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, - 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, - 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, - 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, - 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, - 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, - 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, - 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, - 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, - 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, - 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, - 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, - 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, -}; - -#ifndef ONLY_ONE_TABLE -static const u32 Te1[256] = -{ - 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, - 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, - 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, - 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, - 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, - 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, - 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, - 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, - 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, - 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, - 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, - 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, - 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, - 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, - 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, - 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, - 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, - 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, - 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, - 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, - 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, - 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, - 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, - 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, - 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, - 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, - 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, - 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, - 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, - 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, - 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, - 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, - 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, - 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, - 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, - 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, - 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, - 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, - 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, - 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, - 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, - 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, - 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, - 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, - 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, - 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, - 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, - 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, - 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, - 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, - 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, - 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, - 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, - 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, - 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, - 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, - 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, - 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, - 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, - 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, - 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, - 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, - 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, - 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, -}; - -static const u32 Te2[256] = -{ - 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, - 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, - 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, - 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, - 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, - 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, - 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, - 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, - 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, - 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, - 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, - 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, - 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, - 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, - 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, - 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, - 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, - 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, - 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, - 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, - 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, - 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, - 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, - 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, - 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, - 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, - 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, - 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, - 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, - 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, - 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, - 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, - 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, - 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, - 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, - 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, - 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, - 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, - 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, - 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, - 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, - 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, - 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, - 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, - 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, - 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, - 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, - 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, - 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, - 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, - 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, - 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, - 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, - 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, - 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, - 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, - 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, - 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, - 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, - 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, - 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, - 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, - 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, - 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, -}; - -static const u32 Te3[256] = -{ - 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, - 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, - 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, - 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, - 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, - 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, - 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, - 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, - 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, - 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, - 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, - 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, - 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, - 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, - 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, - 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, - 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, - 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, - 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, - 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, - 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, - 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, - 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, - 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, - 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, - 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, - 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, - 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, - 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, - 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, - 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, - 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, - 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, - 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, - 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, - 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, - 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, - 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, - 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, - 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, - 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, - 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, - 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, - 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, - 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, - 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, - 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, - 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, - 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, - 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, - 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, - 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, - 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, - 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, - 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, - 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, - 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, - 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, - 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, - 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, - 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, - 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, - 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, - 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, -}; - -#define TE0(v) (Te0[(v) >> 24]) -#define TE1(v) (Te1[((v) >> 16) & 0xff]) -#define TE2(v) (Te2[((v) >> 8) & 0xff]) -#define TE3(v) (Te3[(v) & 0xff]) - -#else /* ONLY_ONE_TABLE */ - - -static inline u32 ROR8(u32 v) -{ - return (v >> 8) | (v << 24); -} - -static inline u32 ROR16(u32 v) -{ - return (v >> 16) | (v << 16); -} - -static inline u32 ROR24(u32 v) -{ - return (v >> 24) | (v << 8); -} - -#define TE0(v) (Te0[(v) >> 24]) -#define TE1(v) (ROR8(Te0[((v) >> 16) & 0xff])) -#define TE2(v) (ROR16(Te0[((v) >> 8) & 0xff])) -#define TE3(v) (ROR24(Te0[(v) & 0xff])) - -#endif /* ONLY_ONE_TABLE */ - - - -#ifdef SMALL_TE4 -static const u8 Te4s[256] = { - 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, - 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, - 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, - 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, - 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, - 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, - 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, - 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, - 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, - 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, - 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, - 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, - 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, - 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, - 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, - 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, - 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, - 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, - 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, - 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, - 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, - 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, - 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, - 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, - 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, - 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, - 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, - 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, - 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, - 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, - 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, - 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16, -}; - -#define TE4_1(v) (Te4s[(v) & 0xff] << 24) -#define TE4_2(v) (Te4s[(v) & 0xff] << 16) -#define TE4_3(v) (Te4s[(v) & 0xff] << 8) -#define TE4_4(v) (Te4s[(v) & 0xff]) - -#else /* SMALL_TE4 */ - -static const u32 Te4[256] = -{ - 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, - 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, - 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, - 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, - 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, - 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, - 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, - 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, - 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, - 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, - 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, - 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, - 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, - 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, - 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, - 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, - 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, - 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, - 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, - 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, - 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, - 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, - 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, - 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, - 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, - 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, - 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, - 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, - 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, - 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, - 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, - 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, - 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, - 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, - 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, - 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, - 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, - 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, - 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, - 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, - 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, - 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, - 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, - 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, - 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, - 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, - 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, - 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, - 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, - 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, - 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, - 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, - 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, - 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, - 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, - 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, - 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, - 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, - 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, - 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, - 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, - 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, - 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, - 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, -}; - -#define TE4_1(v) (Te4[(v) & 0xff] & 0xff000000) -#define TE4_2(v) (Te4[(v) & 0xff] & 0x00ff0000) -#define TE4_3(v) (Te4[(v) & 0xff] & 0x0000ff00) -#define TE4_4(v) (Te4[(v) & 0xff] & 0x000000ff) - -#endif /* SMALL_TE4 */ - - -static const u32 rcon[] = { - 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, - 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000, -}; - -#define GETU32(pt) \ -(((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ \ -((u32)(pt)[3])) -#define PUTU32(ct, st) \ -{ (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); \ -(ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); } - - -/* Expand the cipher key into the encryption key schedule. */ -void ieee80211_aes_key_setup_encrypt(u32 rk[/*44*/], const u8 key[]) -{ - int i; - u32 temp; - - rk[0] = GETU32(key ); - rk[1] = GETU32(key + 4); - rk[2] = GETU32(key + 8); - rk[3] = GETU32(key + 12); - - for (i = 0; i < 10; i++) { - temp = rk[3]; - rk[4] = rk[0] ^ TE4_1(temp >> 16) ^ TE4_2(temp >> 8) ^ - TE4_3(temp) ^ TE4_4(temp >> 24) ^ rcon[i]; - rk[5] = rk[1] ^ rk[4]; - rk[6] = rk[2] ^ rk[5]; - rk[7] = rk[3] ^ rk[6]; - rk += 4; - } -} - - -void ieee80211_aes_encrypt(const u32 rk[/*44*/], const u8 pt[16], u8 ct[16]) -{ - const int Nr = 10; - u32 s0, s1, s2, s3, t0, t1, t2, t3; - - /* Map byte array block to cipher state and add initial round key */ - s0 = GETU32(pt ) ^ rk[0]; - s1 = GETU32(pt + 4) ^ rk[1]; - s2 = GETU32(pt + 8) ^ rk[2]; - s3 = GETU32(pt + 12) ^ rk[3]; - -#define ROUND(r,d,s,i) \ -d##0 = TE0(s##0) ^ TE1(s##1) ^ TE2(s##2) ^ TE3(s##3) ^ rk[i]; \ -d##1 = TE0(s##1) ^ TE1(s##2) ^ TE2(s##3) ^ TE3(s##0) ^ rk[i + 1]; \ -d##2 = TE0(s##2) ^ TE1(s##3) ^ TE2(s##0) ^ TE3(s##1) ^ rk[i + 2]; \ -d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[i + 3] - ROUND(1,t,s,4); - ROUND(2,s,t,8); - ROUND(3,t,s,12); - ROUND(4,s,t,16); - ROUND(5,t,s,20); - ROUND(6,s,t,24); - ROUND(7,t,s,28); - ROUND(8,s,t,32); - ROUND(9,t,s,36); -#undef ROUND - - rk += Nr << 2; - - /* Apply the last round and map cipher state to byte array block */ - s0 = TE4_1(t0 >> 24) ^ TE4_2(t1 >> 16) ^ TE4_3(t2 >> 8) ^ TE4_4(t3) ^ - rk[0]; - PUTU32(ct, s0); - s0 = TE4_1(t1 >> 24) ^ TE4_2(t2 >> 16) ^ TE4_3(t3 >> 8) ^ TE4_4(t0) ^ - rk[1]; - PUTU32(ct + 4, s0); - s0 = TE4_1(t2 >> 24) ^ TE4_2(t3 >> 16) ^ TE4_3(t0 >> 8) ^ TE4_4(t1) ^ - rk[2]; - PUTU32(ct + 8, s0); - s0 = TE4_1(t3 >> 24) ^ TE4_2(t0 >> 16) ^ TE4_3(t1 >> 8) ^ TE4_4(t2) ^ - rk[3]; - PUTU32(ct + 12, s0); -} - -/* --- end of code that is based on public domain AES implementation --- */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/aes_ccm.c b/openwrt/target/linux/package/ieee80211-dscape/src/aes_ccm.c deleted file mode 100644 index bbc1f7bc96f..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/aes_ccm.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2003-2004, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/types.h> -#include <linux/netdevice.h> - -#include <net/ieee80211.h> -#include "ieee80211_key.h" -#include "aes_ccm.h" - -#include "aes.c" - -static inline void aes_ccm_prepare(u32 *rk, u8 *b_0, u8 *aad, u8 *b, - u8 *s_0, u8 *a) -{ - int i; - - ieee80211_aes_encrypt(rk, b_0, b); - - /* Extra Authenticate-only data (always two AES blocks) */ - for (i = 0; i < AES_BLOCK_LEN; i++) - aad[i] ^= b[i]; - ieee80211_aes_encrypt(rk, aad, b); - - aad += AES_BLOCK_LEN; - - for (i = 0; i < AES_BLOCK_LEN; i++) - aad[i] ^= b[i]; - ieee80211_aes_encrypt(rk, aad, a); - - /* Mask out bits from auth-only-b_0 */ - b_0[0] &= 0x07; - - /* S_0 is used to encrypt T (= MIC) */ - b_0[14] = 0; - b_0[15] = 0; - ieee80211_aes_encrypt(rk, b_0, s_0); -} - - -void ieee80211_aes_ccm_encrypt(u32 *rk, u8 *b_0, u8 *aad, u8 *data, - size_t data_len, u8 *cdata, u8 *mic) -{ - int i, j, last_len, num_blocks; - u8 *pos, *cpos; - u8 b[AES_BLOCK_LEN], s_0[AES_BLOCK_LEN], e[AES_BLOCK_LEN]; - - num_blocks = (data_len + AES_BLOCK_LEN - 1) / AES_BLOCK_LEN; - last_len = data_len % AES_BLOCK_LEN; - aes_ccm_prepare(rk, b_0, aad, b, s_0, b); - - /* Process payload blocks */ - pos = data; - cpos = cdata; - for (j = 1; j <= num_blocks; j++) { - int blen = (j == num_blocks && last_len) ? - last_len : AES_BLOCK_LEN; - - /* Authentication followed by encryption */ - for (i = 0; i < blen; i++) - b[i] ^= pos[i]; - ieee80211_aes_encrypt(rk, b, b); - - b_0[14] = (j >> 8) & 0xff; - b_0[15] = j & 0xff; - ieee80211_aes_encrypt(rk, b_0, e); - for (i = 0; i < blen; i++) - *cpos++ = *pos++ ^ e[i]; - } - - for (i = 0; i < CCMP_MIC_LEN; i++) - mic[i] = b[i] ^ s_0[i]; -} - - -int ieee80211_aes_ccm_decrypt(u32 *rk, u8 *b_0, u8 *aad, u8 *cdata, - size_t data_len, u8 *mic, u8 *data) -{ - int i, j, last_len, num_blocks; - u8 *pos, *cpos; - u8 b[AES_BLOCK_LEN], s_0[AES_BLOCK_LEN], a[AES_BLOCK_LEN]; - - num_blocks = (data_len + AES_BLOCK_LEN - 1) / AES_BLOCK_LEN; - last_len = data_len % AES_BLOCK_LEN; - aes_ccm_prepare(rk, b_0, aad, b, s_0, a); - - /* Process payload blocks */ - cpos = cdata; - pos = data; - for (j = 1; j <= num_blocks; j++) { - int blen = (j == num_blocks && last_len) ? - last_len : AES_BLOCK_LEN; - - /* Decryption followed by authentication */ - b_0[14] = (j >> 8) & 0xff; - b_0[15] = j & 0xff; - ieee80211_aes_encrypt(rk, b_0, b); - for (i = 0; i < blen; i++) { - *pos = *cpos++ ^ b[i]; - a[i] ^= *pos++; - } - - ieee80211_aes_encrypt(rk, a, a); - } - - for (i = 0; i < CCMP_MIC_LEN; i++) { - if ((mic[i] ^ s_0[i]) != a[i]) - return -1; - } - - return 0; -} - diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/aes_ccm.h b/openwrt/target/linux/package/ieee80211-dscape/src/aes_ccm.h deleted file mode 100644 index f741b088edf..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/aes_ccm.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2003-2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef AES_CCM_H -#define AES_CCM_H - -#define AES_BLOCK_LEN 16 -#define AES_STATE_LEN 44 - -void ieee80211_aes_key_setup_encrypt(u32 rk[/*44*/], const u8 key[]); -void ieee80211_aes_encrypt(const u32 rk[/*44*/], const u8 pt[16], u8 ct[16]); -void ieee80211_aes_ccm_encrypt(u32 rk[/*44*/], u8 *b_0, u8 *aad, u8 *data, - size_t data_len, u8 *cdata, u8 *mic); -int ieee80211_aes_ccm_decrypt(u32 rk[/*44*/], u8 *b_0, u8 *aad, u8 *cdata, - size_t data_len, u8 *mic, u8 *data); - -#endif /* AES_CCM_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/fifo_qdisc.c b/openwrt/target/linux/package/ieee80211-dscape/src/fifo_qdisc.c deleted file mode 100644 index 95bc0b5777b..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/fifo_qdisc.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * If building without CONFIG_NET_SCHED we need a simple - * fifo qdisc to install by default as the sub-qdisc. - * This is a simple replacement for sch_fifo. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/netdevice.h> -#include <net/ieee80211.h> -#include "ieee80211_i.h" -#include "wme.h" - -static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc* qd) -{ - struct sk_buff_head *q = qdisc_priv(qd); - - if (skb_queue_len(q) > qd->dev->tx_queue_len) { - qd->qstats.drops++; - kfree_skb(skb); - return NET_XMIT_DROP; - } - - skb_queue_tail(q, skb); - qd->q.qlen++; - qd->bstats.bytes += skb->len; - qd->bstats.packets++; - - return NET_XMIT_SUCCESS; -} - - -static int pfifo_requeue(struct sk_buff *skb, struct Qdisc* qd) -{ - struct sk_buff_head *q = qdisc_priv(qd); - - skb_queue_head(q, skb); - qd->q.qlen++; - qd->bstats.bytes += skb->len; - qd->bstats.packets++; - - return NET_XMIT_SUCCESS; -} - - -static struct sk_buff *pfifo_dequeue(struct Qdisc* qd) -{ - struct sk_buff_head *q = qdisc_priv(qd); - - return skb_dequeue(q); -} - - -static int pfifo_init(struct Qdisc* qd, struct rtattr *opt) -{ - struct sk_buff_head *q = qdisc_priv(qd); - - skb_queue_head_init(q); - return 0; -} - - -static void pfifo_reset(struct Qdisc* qd) -{ - struct sk_buff_head *q = qdisc_priv(qd); - - skb_queue_purge(q); - qd->q.qlen = 0; -} - - -static int pfifo_dump(struct Qdisc *qd, struct sk_buff *skb) -{ - return skb->len; -} - - -struct Qdisc_ops pfifo_qdisc_ops = -{ - .next = NULL, - .cl_ops = NULL, - .id = "ieee80211_pfifo", - .priv_size = sizeof(struct sk_buff_head), - - .enqueue = pfifo_enqueue, - .dequeue = pfifo_dequeue, - .requeue = pfifo_requeue, - .drop = NULL, - - .init = pfifo_init, - .reset = pfifo_reset, - .destroy = NULL, - .change = NULL, - - .dump = pfifo_dump, -}; - diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/hostapd_ioctl.h b/openwrt/target/linux/package/ieee80211-dscape/src/hostapd_ioctl.h deleted file mode 100644 index eff4858353f..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/hostapd_ioctl.h +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Host AP (software wireless LAN access point) user space daemon for - * Host AP kernel driver - * Copyright 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi> - * Copyright 2002-2004, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef HOSTAPD_IOCTL_H -#define HOSTAPD_IOCTL_H - -#ifndef __KERNEL__ -#include "ieee80211_shared.h" -#endif /* __KERNEL__ */ - -#define PRISM2_IOCTL_PRISM2_PARAM (SIOCIWFIRSTPRIV + 0) -#define PRISM2_IOCTL_GET_PRISM2_PARAM (SIOCIWFIRSTPRIV + 1) -#define PRISM2_IOCTL_HOSTAPD (SIOCIWFIRSTPRIV + 3) -#define PRISM2_IOCTL_TEST_PARAM (SIOCIWFIRSTPRIV + 4) - -/* PRISM2_IOCTL_PRISM2_PARAM ioctl() subtypes: */ -enum { - PRISM2_PARAM_PTYPE = 1, - PRISM2_PARAM_TXRATECTRL = 2, - PRISM2_PARAM_BEACON_INT = 3, - PRISM2_PARAM_PSEUDO_IBSS = 4, - PRISM2_PARAM_ALC = 5, - PRISM2_PARAM_TXPOWER = 6, - PRISM2_PARAM_DUMP = 7, - PRISM2_PARAM_OTHER_AP_POLICY = 8, - PRISM2_PARAM_AP_MAX_INACTIVITY = 9, - PRISM2_PARAM_AP_BRIDGE_PACKETS = 10, - PRISM2_PARAM_DTIM_PERIOD = 11, - PRISM2_PARAM_AP_NULLFUNC_ACK = 12, - PRISM2_PARAM_MAX_WDS = 13, - PRISM2_PARAM_AP_AUTOM_AP_WDS = 14, - PRISM2_PARAM_AP_AUTH_ALGS = 15, - PRISM2_PARAM_MONITOR_ALLOW_FCSERR = 16, - PRISM2_PARAM_HOST_ENCRYPT = 17, - PRISM2_PARAM_HOST_DECRYPT = 18, - PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX = 19, - PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX = 20, - PRISM2_PARAM_HOST_ROAMING = 21, - PRISM2_PARAM_BCRX_STA_KEY = 22, - PRISM2_PARAM_IEEE_802_1X = 23, - PRISM2_PARAM_ANTSEL_TX = 24, - PRISM2_PARAM_ANTSEL_RX = 25, - PRISM2_PARAM_MONITOR_TYPE = 26, - PRISM2_PARAM_WDS_TYPE = 27, - PRISM2_PARAM_HOSTSCAN = 28, - PRISM2_PARAM_AP_SCAN = 29, - - /* Instant802 additions */ - PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES = 1001, - PRISM2_PARAM_DROP_UNENCRYPTED = 1002, - PRISM2_PARAM_PREAMBLE = 1003, - PRISM2_PARAM_RATE_LIMIT = 1004, - PRISM2_PARAM_RATE_LIMIT_BURST = 1005, - PRISM2_PARAM_SHORT_SLOT_TIME = 1006, - PRISM2_PARAM_TEST_MODE = 1007, - PRISM2_PARAM_NEXT_MODE = 1008, - PRISM2_PARAM_CLEAR_KEYS = 1009, - PRISM2_PARAM_ADM_STATUS = 1010, - PRISM2_PARAM_ANTENNA_SEL = 1011, - PRISM2_PARAM_CALIB_INT = 1012, - PRISM2_PARAM_ANTENNA_MODE = 1013, - PRISM2_PARAM_PRIVACY_INVOKED = 1014, - PRISM2_PARAM_BROADCAST_SSID = 1015, - PRISM2_PARAM_STAT_TIME = 1016, - PRISM2_PARAM_STA_ANTENNA_SEL = 1017, - PRISM2_PARAM_FORCE_UNICAST_RATE = 1018, - PRISM2_PARAM_RATE_CTRL_NUM_UP = 1019, - PRISM2_PARAM_RATE_CTRL_NUM_DOWN = 1020, - PRISM2_PARAM_MAX_RATECTRL_RATE = 1021, - PRISM2_PARAM_TX_POWER_REDUCTION = 1022, - PRISM2_PARAM_EAPOL = 1023, - PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024, - PRISM2_PARAM_KEY_INDEX = 1025, - PRISM2_PARAM_DEFAULT_WEP_ONLY = 1026, - PRISM2_PARAM_WIFI_WME_NOACK_TEST = 1033, - PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS = 1034, - PRISM2_PARAM_SCAN_FLAGS = 1035, - PRISM2_PARAM_HW_MODES = 1036, - PRISM2_PARAM_CREATE_IBSS = 1037, - PRISM2_PARAM_WMM_ENABLED = 1038, - PRISM2_PARAM_MIXED_CELL = 1039, - PRISM2_PARAM_KEY_MGMT = 1040, - PRISM2_PARAM_RADAR_DETECT = 1043, - PRISM2_PARAM_SPECTRUM_MGMT = 1044, - /* NOTE: Please try to coordinate with other active development - * branches before allocating new param numbers so that each new param - * will be unique within all branches and the allocated number will not - * need to be changed when merging new features. Existing numbers in - * the mainline (or main devel branch) must not be changed when merging - * in new features. */ -}; - -/* PRISM2_IOCTL_HOSTAPD ioctl() cmd: */ -enum { - PRISM2_HOSTAPD_FLUSH = 1, - PRISM2_HOSTAPD_ADD_STA = 2, - PRISM2_HOSTAPD_REMOVE_STA = 3, - PRISM2_HOSTAPD_GET_INFO_STA = 4, - /* REMOVED: PRISM2_HOSTAPD_RESET_TXEXC_STA = 5, */ - PRISM2_SET_ENCRYPTION = 6, - PRISM2_GET_ENCRYPTION = 7, - PRISM2_HOSTAPD_SET_FLAGS_STA = 8, - PRISM2_HOSTAPD_GET_RID = 9, - PRISM2_HOSTAPD_SET_RID = 10, - PRISM2_HOSTAPD_SET_ASSOC_AP_ADDR = 11, - PRISM2_HOSTAPD_MLME = 13, - - /* Instant802 additions */ - PRISM2_HOSTAPD_SET_BEACON = 1001, - PRISM2_HOSTAPD_GET_HW_FEATURES = 1002, - PRISM2_HOSTAPD_SCAN = 1003, - PRISM2_HOSTAPD_WPA_TRIGGER = 1004, - PRISM2_HOSTAPD_SET_RATE_SETS = 1005, - PRISM2_HOSTAPD_ADD_IF = 1006, - PRISM2_HOSTAPD_REMOVE_IF = 1007, - PRISM2_HOSTAPD_GET_DOT11COUNTERSTABLE = 1008, - PRISM2_HOSTAPD_GET_LOAD_STATS = 1009, - PRISM2_HOSTAPD_SET_STA_VLAN = 1010, - PRISM2_HOSTAPD_SET_GENERIC_INFO_ELEM = 1011, - PRISM2_HOSTAPD_SET_CHANNEL_FLAG = 1012, - PRISM2_HOSTAPD_SET_REGULATORY_DOMAIN = 1013, - PRISM2_HOSTAPD_SET_TX_QUEUE_PARAMS = 1014, - PRISM2_HOSTAPD_SET_BSS = 1015, - PRISM2_HOSTAPD_GET_TX_STATS = 1016, - PRISM2_HOSTAPD_UPDATE_IF = 1017, - PRISM2_HOSTAPD_SCAN_REQ = 1019, - PRISM2_STA_GET_STATE = 1020, - PRISM2_HOSTAPD_FLUSH_IFS = 1021, - PRISM2_HOSTAPD_SET_RADAR_PARAMS = 1023, - PRISM2_HOSTAPD_SET_QUIET_PARAMS = 1024, - PRISM2_HOSTAPD_GET_TX_POWER = 1025, - /* NOTE: Please try to coordinate with other active development - * branches before allocating new param numbers so that each new param - * will be unique within all branches and the allocated number will not - * need to be changed when merging new features. Existing numbers in - * the mainline (or main devel branch) must not be changed when merging - * in new features. */ -}; - - /* these definitions mirror the ieee80211_i.h - * IEEE80211_DISABLED, ... IEEE80211_ASSOCIATED enumeration */ -enum { - PRISM2_PARAM_STA_DISABLED, - PRISM2_PARAM_STA_AUTHENTICATE, - PRISM2_PARAM_STA_ASSOCIATE, - PRISM2_PARAM_STA_ASSOCIATED, -}; - -#define PRISM2_HOSTAPD_MAX_BUF_SIZE 2048 -#define HOSTAP_CRYPT_ALG_NAME_LEN 16 - -/* Use this to make sure that structure elements are correctly aligned - * for access as other types. Most commonly, this affects the placeholder - * types used for data at the end of a structure in this union. - */ -#ifdef __GNUC__ -#undef ALIGNED -#define ALIGNED __attribute__ ((aligned)) -#else -/* Check if it has been defined elsewhere */ -#ifndef ALIGNED -#error "Must define ALIGNED to generate aligned structure elements" -#endif -#endif - -struct prism2_hostapd_param { - u32 cmd; - u8 sta_addr[ETH_ALEN]; - u8 pad[2]; - union { - struct { - u16 aid; - u16 capability; - u8 supp_rates[32]; - /* atheros_super_ag and enc_flags are only used with - * IEEE80211_ATHEROS_SUPER_AG - */ - u8 atheros_super_ag; - u8 atheros_xr_mode; - u8 wds_flags; -#define IEEE80211_STA_DYNAMIC_ENC BIT(0) - u8 enc_flags; - } add_sta; - struct { - u32 inactive_msec; - u32 rx_packets; - u32 tx_packets; - u32 rx_bytes; - u32 tx_bytes; - u32 current_tx_rate; /* in 100 kbps */ - u32 channel_use; - u32 flags; - u32 num_ps_buf_frames; - u32 tx_retry_failed; - u32 tx_retry_count; - u32 last_rssi; - u32 last_ack_rssi; - } get_info_sta; - struct { - u8 alg[HOSTAP_CRYPT_ALG_NAME_LEN]; - u32 flags; - u32 err; - u8 idx; -#define HOSTAP_SEQ_COUNTER_SIZE 8 - u8 seq_counter[HOSTAP_SEQ_COUNTER_SIZE]; - u16 key_len; - u8 key[0] ALIGNED; - } crypt; - struct { - u32 flags_and; - u32 flags_or; - } set_flags_sta; - struct { - u16 rid; - u16 len; - u8 data[0] ALIGNED; - } rid; - struct { - u16 head_len; - u16 tail_len; - u8 data[0] ALIGNED; /* head_len + tail_len bytes */ - } beacon; - struct { - u16 num_modes; - u16 flags; - u8 data[0] ALIGNED; /* num_modes * feature data */ - } hw_features; - struct { - u8 now; - s8 our_mode_only; - s16 last_rx; - u16 channel; - s16 interval; /* seconds */ - s32 listen; /* microseconds */ - } scan; - struct { -#define WPA_TRIGGER_FAIL_TX_MIC BIT(0) -#define WPA_TRIGGER_FAIL_TX_ICV BIT(1) -#define WPA_TRIGGER_FAIL_RX_MIC BIT(2) -#define WPA_TRIGGER_FAIL_RX_ICV BIT(3) -#define WPA_TRIGGER_TX_REPLAY BIT(4) -#define WPA_TRIGGER_TX_REPLAY_FRAG BIT(5) -#define WPA_TRIGGER_TX_SKIP_SEQ BIT(6) - u32 trigger; - } wpa_trigger; - struct { - u16 mode; /* MODE_* */ - u16 num_supported_rates; - u16 num_basic_rates; - u8 data[0] ALIGNED; /* num_supported_rates * u16 + - * num_basic_rates * u16 */ - } set_rate_sets; - struct { - u8 type; /* WDS, VLAN, etc */ - u8 name[IFNAMSIZ]; - u8 data[0] ALIGNED; - } if_info; - struct dot11_counters { - u32 dot11TransmittedFragmentCount; - u32 dot11MulticastTransmittedFrameCount; - u32 dot11FailedCount; - u32 dot11ReceivedFragmentCount; - u32 dot11MulticastReceivedFrameCount; - u32 dot11FCSErrorCount; - u32 dot11TransmittedFrameCount; - u32 dot11WEPUndecryptableCount; - u32 dot11ACKFailureCount; - u32 dot11RTSFailureCount; - u32 dot11RTSSuccessCount; - } dot11CountersTable; - struct { -#define LOAD_STATS_CLEAR BIT(1) - u32 flags; - u32 channel_use; - } get_load_stats; - struct { - char vlan_name[IFNAMSIZ]; - int vlan_id; - } set_sta_vlan; - struct { - u8 len; - u8 data[0] ALIGNED; - } set_generic_info_elem; - struct { - u16 mode; /* MODE_* */ - u16 chan; - u32 flag; - u8 power_level; /* regulatory limit in dBm */ - u8 antenna_max; - } set_channel_flag; - struct { - u32 rd; - } set_regulatory_domain; - struct { - u32 queue; - s32 aifs; - u32 cw_min; - u32 cw_max; - u32 burst_time; /* maximum burst time in 0.1 ms, i.e., - * 10 = 1 ms */ - } tx_queue_params; - struct { - u32 bss_count; - u8 bssid_mask[ETH_ALEN]; - } set_bss; - struct ieee80211_tx_stats { - struct { - unsigned int len; /* num packets in queue */ - unsigned int limit; /* queue len (soft) limit - */ - unsigned int count; /* total num frames sent */ - } data[4]; - } get_tx_stats; - struct { - u8 ssid_len; - u8 ssid[0] ALIGNED; - } scan_req; - struct { - u32 state; - } sta_get_state; - struct { -#define MLME_STA_DEAUTH 0 -#define MLME_STA_DISASSOC 1 - u16 cmd; - u16 reason_code; - } mlme; - struct { - unsigned int value; - /* TODO - int pulse_width; - int num_pulse; - int period; - */ - }radar; - struct { - unsigned int period; - unsigned int offset; - unsigned int duration; - }quiet; - struct { - unsigned int tx_power_min; - unsigned int tx_power_max; - }tx_power; - struct { - u8 dummy[80]; /* Make sizeof() this struct large enough - * with some compiler versions. */ - } dummy; - } u; -}; - - -#ifndef IEEE80211_TX_QUEUE_NUMS -#define IEEE80211_TX_QUEUE_NUMS -/* TODO: these need to be synchronized with ieee80211.h; make a shared header - * file that can be included into low-level drivers, 80211.o, and hostapd */ -/* tx_queue_params - queue */ -enum { - IEEE80211_TX_QUEUE_DATA0 = 0, /* used for EDCA AC_VO data */ - IEEE80211_TX_QUEUE_DATA1 = 1, /* used for EDCA AC_VI data */ - IEEE80211_TX_QUEUE_DATA2 = 2, /* used for EDCA AC_BE data */ - IEEE80211_TX_QUEUE_DATA3 = 3, /* used for EDCA AC_BK data */ - IEEE80211_TX_QUEUE_DATA4 = 4, - IEEE80211_TX_QUEUE_AFTER_BEACON = 6, - IEEE80211_TX_QUEUE_BEACON = 7 -}; -#endif /* IEEE80211_TX_QUEUE_NUMS */ - - -#define HOSTAP_CRYPT_FLAG_SET_TX_KEY BIT(0) -#define HOSTAP_CRYPT_FLAG_PERMANENT BIT(1) - -#define HOSTAP_CRYPT_ERR_UNKNOWN_ALG 2 -#define HOSTAP_CRYPT_ERR_UNKNOWN_ADDR 3 -#define HOSTAP_CRYPT_ERR_CRYPT_INIT_FAILED 4 -#define HOSTAP_CRYPT_ERR_KEY_SET_FAILED 5 -#define HOSTAP_CRYPT_ERR_TX_KEY_SET_FAILED 6 -#define HOSTAP_CRYPT_ERR_CARD_CONF_FAILED 7 - -#define HOSTAP_HW_FLAG_NULLFUNC_OK BIT(0) - -enum { - IEEE80211_KEY_MGMT_NONE = 0, - IEEE80211_KEY_MGMT_IEEE8021X = 1, - IEEE80211_KEY_MGMT_WPA_PSK = 2, - IEEE80211_KEY_MGMT_WPA_EAP = 3, -}; - - -/* Data structures used for get_hw_features ioctl */ -struct hostapd_ioctl_hw_modes_hdr { - int mode; - int num_channels; - int num_rates; -}; - -struct ieee80211_channel_data { - short chan; /* channel number (IEEE 802.11) */ - short freq; /* frequency in MHz */ - int flag; /* flag for hostapd use (IEEE80211_CHAN_*) */ -}; - -struct ieee80211_rate_data { - int rate; /* rate in 100 kbps */ - int flags; /* IEEE80211_RATE_ flags */ -}; - - -/* ADD_IF, REMOVE_IF, and UPDATE_IF 'type' argument */ -enum { - HOSTAP_IF_WDS = 1, HOSTAP_IF_VLAN = 2, HOSTAP_IF_BSS = 3, - HOSTAP_IF_STA = 4 -}; - -struct hostapd_if_wds { - u8 remote_addr[ETH_ALEN]; -}; - -struct hostapd_if_vlan { - u8 id; -}; - -struct hostapd_if_bss { - u8 bssid[ETH_ALEN]; -}; - -struct hostapd_if_sta { -}; - -#endif /* HOSTAPD_IOCTL_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211.c b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211.c deleted file mode 100644 index 5e4e7acfba1..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211.c +++ /dev/null @@ -1,4895 +0,0 @@ -/* - * Copyright 2002-2005, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef EXPORT_SYMTAB -#define EXPORT_SYMTAB -#endif - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/netdevice.h> -#include <linux/types.h> -#include <linux/slab.h> -#include <linux/skbuff.h> -#include <linux/etherdevice.h> -#include <linux/if_arp.h> -#include <linux/wireless.h> -#include <net/iw_handler.h> -#include <linux/compiler.h> - -#include <net/ieee80211.h> -#include <net/ieee80211_common.h> -#include <net/ieee80211_mgmt.h> -#include "ieee80211_i.h" -#include "ieee80211_proc.h" -#include "rate_control.h" -#include "wep.h" -#include "wpa.h" -#include "tkip.h" -#include "wme.h" - - -/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ -/* Ethernet-II snap header (RFC1042 for most EtherTypes) */ -static unsigned char rfc1042_header[] = -{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; -/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ -static unsigned char bridge_tunnel_header[] = -{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; -/* No encapsulation header if EtherType < 0x600 (=length) */ - -static unsigned char eapol_header[] = -{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x88, 0x8e }; - - -struct rate_control_algs { - struct rate_control_algs *next; - struct rate_control_ops *ops; -}; - -static struct rate_control_algs *ieee80211_rate_ctrl_algs; - -static int rate_control_initialize(struct ieee80211_local *local); - - -static u8 * ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len); - - -struct ieee80211_key_conf * -ieee80211_key_data2conf(struct ieee80211_local *local, - struct ieee80211_key *data) -{ - struct ieee80211_key_conf *conf; - - conf = kmalloc(sizeof(*conf) + data->keylen, GFP_ATOMIC); - if (conf == NULL) - return NULL; - - conf->hw_key_idx = data->hw_key_idx; - conf->alg = data->alg; - conf->keylen = data->keylen; - conf->force_sw_encrypt = data->force_sw_encrypt; - conf->keyidx = data->keyidx; - conf->default_tx_key = data->default_tx_key; - conf->default_wep_only = local->default_wep_only; - memcpy(conf->key, data->key, data->keylen); - - return conf; -} - - -static int rate_list_match(int *rate_list, int rate) -{ - int i; - - if (rate_list == NULL) - return 0; - - for (i = 0; rate_list[i] >= 0; i++) - if (rate_list[i] == rate) - return 1; - - return 0; -} - - -void ieee80211_prepare_rates(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - int i; - - for (i = 0; i < local->num_curr_rates; i++) { - struct ieee80211_rate *rate = &local->curr_rates[i]; - - rate->flags &= ~(IEEE80211_RATE_SUPPORTED | - IEEE80211_RATE_BASIC); - - if (local->supp_rates[local->conf.phymode]) { - if (!rate_list_match(local->supp_rates - [local->conf.phymode], - rate->rate)) - continue; - } - - rate->flags |= IEEE80211_RATE_SUPPORTED; - - /* Use configured basic rate set if it is available. If not, - * use defaults that are sane for most cases. */ - if (local->basic_rates[local->conf.phymode]) { - if (rate_list_match(local->basic_rates - [local->conf.phymode], - rate->rate)) - rate->flags |= IEEE80211_RATE_BASIC; - } else switch (local->conf.phymode) { - case MODE_IEEE80211A: - if (rate->rate == 60 || rate->rate == 120 || - rate->rate == 240) - rate->flags |= IEEE80211_RATE_BASIC; - break; - case MODE_IEEE80211B: - if (rate->rate == 10 || rate->rate == 20) - rate->flags |= IEEE80211_RATE_BASIC; - break; - case MODE_ATHEROS_TURBO: - if (rate->rate == 120 || rate->rate == 240 || - rate->rate == 480) - rate->flags |= IEEE80211_RATE_BASIC; - break; - case MODE_IEEE80211G: - if (rate->rate == 10 || rate->rate == 20 || - rate->rate == 55 || rate->rate == 110) - rate->flags |= IEEE80211_RATE_BASIC; - break; - } - - /* Set ERP and MANDATORY flags based on phymode */ - switch (local->conf.phymode) { - case MODE_IEEE80211A: - if (rate->rate == 60 || rate->rate == 120 || - rate->rate == 240) - rate->flags |= IEEE80211_RATE_MANDATORY; - break; - case MODE_IEEE80211B: - if (rate->rate == 10) - rate->flags |= IEEE80211_RATE_MANDATORY; - break; - case MODE_ATHEROS_TURBO: - break; - case MODE_IEEE80211G: - if (rate->rate == 10 || rate->rate == 20 || - rate->rate == 55 || rate->rate == 110 || - rate->rate == 60 || rate->rate == 120 || - rate->rate == 240) - rate->flags |= IEEE80211_RATE_MANDATORY; - if (rate->rate != 10 && rate->rate != 20 && - rate->rate != 55 && rate->rate != 110) - rate->flags |= IEEE80211_RATE_ERP; - break; - } - } -} - - -static void ieee80211_key_threshold_notify(struct net_device *dev, - struct ieee80211_key *key, - struct sta_info *sta) -{ - struct sk_buff *skb; - struct ieee80211_msg_key_notification *msg; - - skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) + - sizeof(struct ieee80211_msg_key_notification)); - if (skb == NULL) - return; - - skb_reserve(skb, sizeof(struct ieee80211_frame_info)); - msg = (struct ieee80211_msg_key_notification *) - skb_put(skb, sizeof(struct ieee80211_msg_key_notification)); - msg->tx_rx_count = key->tx_rx_count; - memcpy(msg->ifname, dev->name, IFNAMSIZ); - if (sta) - memcpy(msg->addr, sta->addr, ETH_ALEN); - else - memset(msg->addr, 0xff, ETH_ALEN); - - key->tx_rx_count = 0; - - ieee80211_rx_mgmt(dev, skb, 0, - ieee80211_msg_key_threshold_notification); -} - - -int ieee80211_get_hdrlen(u16 fc) -{ - int hdrlen = 24; - - switch (WLAN_FC_GET_TYPE(fc)) { - case WLAN_FC_TYPE_DATA: - if ((fc & WLAN_FC_FROMDS) && (fc & WLAN_FC_TODS)) - hdrlen = 30; /* Addr4 */ - if (WLAN_FC_GET_STYPE(fc) & 0x08) - hdrlen += 2; /* QoS Control Field */ - break; - case WLAN_FC_TYPE_CTRL: - switch (WLAN_FC_GET_STYPE(fc)) { - case WLAN_FC_STYPE_CTS: - case WLAN_FC_STYPE_ACK: - hdrlen = 10; - break; - default: - hdrlen = 16; - break; - } - break; - } - - return hdrlen; -} - - -int ieee80211_get_hdrlen_from_skb(struct sk_buff *skb) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - int hdrlen; - - if (unlikely(skb->len < 10)) - return 0; - hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control)); - if (unlikely(hdrlen > skb->len)) - return 0; - return hdrlen; -} - - -#ifdef IEEE80211_VERBOSE_DEBUG_FRAME_DUMP -static void ieee80211_dump_frame(const char *ifname, const char *title, - struct sk_buff *skb) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u16 fc; - int hdrlen; - - printk(KERN_DEBUG "%s: %s (len=%d)", ifname, title, skb->len); - if (skb->len < 4) { - printk("\n"); - return; - } - - fc = le16_to_cpu(hdr->frame_control); - hdrlen = ieee80211_get_hdrlen(fc); - if (hdrlen > skb->len) - hdrlen = skb->len; - if (hdrlen >= 4) - printk(" FC=0x%04x DUR=0x%04x", - fc, le16_to_cpu(hdr->duration_id)); - if (hdrlen >= 10) - printk(" A1=" MACSTR, MAC2STR(hdr->addr1)); - if (hdrlen >= 16) - printk(" A2=" MACSTR, MAC2STR(hdr->addr2)); - if (hdrlen >= 24) - printk(" A3=" MACSTR, MAC2STR(hdr->addr3)); - if (hdrlen >= 30) - printk(" A4=" MACSTR, MAC2STR(hdr->addr4)); - printk("\n"); -} -#else /* IEEE80211_VERBOSE_DEBUG_FRAME_DUMP */ -static inline void ieee80211_dump_frame(const char *ifname, const char *title, - struct sk_buff *skb) -{ -} -#endif /* IEEE80211_VERBOSE_DEBUG_FRAME_DUMP */ - - -static int ieee80211_is_eapol(struct sk_buff *skb) -{ - struct ieee80211_hdr *hdr; - u16 fc; - int hdrlen; - - if (unlikely(skb->len < 10)) - return 0; - - hdr = (struct ieee80211_hdr *) skb->data; - fc = le16_to_cpu(hdr->frame_control); - - if (unlikely(!WLAN_FC_DATA_PRESENT(fc))) - return 0; - - hdrlen = ieee80211_get_hdrlen(fc); - - if (unlikely(skb->len >= hdrlen + sizeof(eapol_header) && - memcmp(skb->data + hdrlen, eapol_header, - sizeof(eapol_header)) == 0)) - return 1; - - return 0; -} - - -static ieee80211_txrx_result -ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx) -{ - struct rate_control_extra extra; - - memset(&extra, 0, sizeof(extra)); - extra.mgmt_data = tx->sdata && - tx->sdata->type == IEEE80211_SUB_IF_TYPE_MGMT; - extra.ethertype = tx->ethertype; - extra.startidx = 0; - extra.endidx = tx->local->num_curr_rates; - - - tx->u.tx.rate = rate_control_get_rate(tx->dev, tx->skb, &extra); - if (unlikely(extra.probe != NULL)) { - tx->u.tx.control->rate_ctrl_probe = 1; - tx->u.tx.probe_last_frag = 1; -// tx->u.tx.control->alt_retry_rate = tx->u.tx.rate->val; - tx->u.tx.rate = extra.probe; - } else { -// tx->u.tx.control->alt_retry_rate = -1; - } - if (!tx->u.tx.rate) - return TXRX_DROP; - if (tx->local->conf.phymode == MODE_IEEE80211G && - tx->local->cts_protect_erp_frames && tx->fragmented && - extra.nonerp) { - tx->u.tx.last_frag_rate = tx->u.tx.rate; - tx->u.tx.last_frag_rateidx = extra.rateidx; - tx->u.tx.probe_last_frag = extra.probe ? 1 : 0; - - tx->u.tx.rate = extra.nonerp; -// tx->u.tx.control->rateidx = extra.nonerp_idx; - tx->u.tx.control->rate_ctrl_probe = 0; - } else { - tx->u.tx.last_frag_rate = tx->u.tx.rate; - tx->u.tx.last_frag_rateidx = extra.rateidx; -// tx->u.tx.control->rateidx = extra.rateidx; - } - tx->u.tx.control->tx_rate = tx->u.tx.rate->val; - if ((tx->u.tx.rate->flags & IEEE80211_RATE_PREAMBLE2) && - tx->local->short_preamble && - (!tx->sta || (tx->sta->flags & WLAN_STA_SHORT_PREAMBLE))) { - tx->u.tx.short_preamble = 1; - tx->u.tx.control->tx_rate = tx->u.tx.rate->val2; - } - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx) -{ - if (tx->sta) - tx->u.tx.control->key_idx = tx->sta->key_idx_compression; - else - tx->u.tx.control->key_idx = HW_KEY_IDX_INVALID; - - if (unlikely(tx->u.tx.control->do_not_encrypt)) - tx->key = NULL; - else if (tx->sta && tx->sta->key) - tx->key = tx->sta->key; - else if (tx->sdata->default_key) - tx->key = tx->sdata->default_key; - else if (tx->sdata->drop_unencrypted && !(tx->sdata->eapol && ieee80211_is_eapol(tx->skb))) { - I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted); - return TXRX_DROP; - } else - tx->key = NULL; - - if (tx->key) { - tx->key->tx_rx_count++; - if (unlikely(tx->local->key_tx_rx_threshold && - tx->key->tx_rx_count > - tx->local->key_tx_rx_threshold)) { - ieee80211_key_threshold_notify(tx->dev, tx->key, - tx->sta); - } - } - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_tx_h_fragment(struct ieee80211_txrx_data *tx) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; - size_t hdrlen, per_fragm, num_fragm, payload_len, left; - struct sk_buff **frags, *first, *frag; - int i; - u8 *pos; - int frag_threshold = tx->local->fragmentation_threshold; - - if (!tx->fragmented) - return TXRX_CONTINUE; - - - first = tx->skb; - - hdrlen = ieee80211_get_hdrlen(tx->fc); - payload_len = first->len - hdrlen; - per_fragm = frag_threshold - hdrlen - 4 /* FCS */; - num_fragm = (payload_len + per_fragm - 1) / per_fragm; - - frags = (struct sk_buff **) - kmalloc(num_fragm * sizeof(struct sk_buff *), GFP_ATOMIC); - if (frags == NULL) - goto fail; - memset(frags, 0, num_fragm * sizeof(struct sk_buff *)); - - hdr->frame_control |= cpu_to_le16(WLAN_FC_MOREFRAG); - pos = first->data + hdrlen + per_fragm; - left = payload_len - per_fragm; - for (i = 0; i < num_fragm - 1; i++) { - struct ieee80211_hdr *fhdr; - size_t copylen; - - if (left <= 0) - goto fail; - - /* reserve enough extra head and tail room for possible - * encryption */ -#define IEEE80211_ENCRYPT_HEADROOM 8 -#define IEEE80211_ENCRYPT_TAILROOM 12 - frag = frags[i] = - dev_alloc_skb(frag_threshold + - IEEE80211_ENCRYPT_HEADROOM + - IEEE80211_ENCRYPT_TAILROOM); - if (!frag) - goto fail; - /* Make sure that all fragments use the same priority so - * that they end up using the same TX queue */ - frag->priority = first->priority; - skb_reserve(frag, IEEE80211_ENCRYPT_HEADROOM); - fhdr = (struct ieee80211_hdr *) skb_put(frag, hdrlen); - memcpy(fhdr, first->data, hdrlen); - if (i == num_fragm - 2) - fhdr->frame_control &= cpu_to_le16(~WLAN_FC_MOREFRAG); - fhdr->seq_ctrl = cpu_to_le16(i + 1); - copylen = left > per_fragm ? per_fragm : left; - memcpy(skb_put(frag, copylen), pos, copylen); - - pos += copylen; - left -= copylen; - } - skb_trim(first, hdrlen + per_fragm); - - tx->u.tx.num_extra_frag = num_fragm - 1; - tx->u.tx.extra_frag = frags; - - return TXRX_CONTINUE; - - fail: - printk(KERN_DEBUG "%s: failed to fragment frame\n", tx->dev->name); - if (frags) { - for (i = 0; i < num_fragm - 1; i++) - if (frags[i]) - dev_kfree_skb(frags[i]); - kfree(frags); - } - I802_DEBUG_INC(tx->local->tx_handlers_drop_fragment); - return TXRX_DROP; -} - - -static int wep_encrypt_skb(struct ieee80211_txrx_data *tx, struct sk_buff *skb) -{ - if (tx->key->force_sw_encrypt || tx->local->conf.sw_encrypt) { - if (ieee80211_wep_encrypt(tx->local, skb, tx->key)) - return -1; - } else { - tx->u.tx.control->key_idx = tx->key->hw_key_idx; - if (tx->local->hw->wep_include_iv) { - if (ieee80211_wep_add_iv(tx->local, skb, tx->key) == - NULL) - return -1; - } - } - return 0; -} - - -void ieee80211_tx_set_iswep(struct ieee80211_txrx_data *tx) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; - - hdr->frame_control |= cpu_to_le16(WLAN_FC_ISWEP); - if (tx->u.tx.extra_frag) { - struct ieee80211_hdr *fhdr; - int i; - for (i = 0; i < tx->u.tx.num_extra_frag; i++) { - fhdr = (struct ieee80211_hdr *) - tx->u.tx.extra_frag[i]->data; - fhdr->frame_control |= cpu_to_le16(WLAN_FC_ISWEP); - } - } -} - - -static ieee80211_txrx_result -ieee80211_tx_h_wep_encrypt(struct ieee80211_txrx_data *tx) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; - u16 fc; - - fc = le16_to_cpu(hdr->frame_control); - - if (!tx->key || tx->key->alg != ALG_WEP || - (WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_DATA && - (WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT || - WLAN_FC_GET_STYPE(fc) != WLAN_FC_STYPE_AUTH))) - return TXRX_CONTINUE; - - tx->u.tx.control->iv_len = WEP_IV_LEN; - tx->u.tx.control->icv_len = WEP_ICV_LEN; - ieee80211_tx_set_iswep(tx); - - if (wep_encrypt_skb(tx, tx->skb) < 0) { - I802_DEBUG_INC(tx->local->tx_handlers_drop_wep); - return TXRX_DROP; - } - - if (tx->u.tx.extra_frag) { - int i; - for (i = 0; i < tx->u.tx.num_extra_frag; i++) { - if (wep_encrypt_skb(tx, tx->u.tx.extra_frag[i]) < 0) { - I802_DEBUG_INC(tx->local-> - tx_handlers_drop_wep); - return TXRX_DROP; - } - } - } - - return TXRX_CONTINUE; -} - - -static inline int ceiling_div(int dividend, int divisor) -{ - return ((dividend + divisor - 1) / divisor); -} - - -static int ieee80211_frame_duration(struct ieee80211_local *local, size_t len, - int rate, int erp, int short_preamble) -{ - int dur; - - /* calculate duration (in microseconds, rounded up to next higher - * integer if it includes a fractional microsecond) to send frame of - * len bytes (does not include FCS) at the given rate. Duration will - * also include SIFS. - * - * rate is in 100 kbps, so divident is multiplied by 10 in the - * ceiling_div() operations. - */ - - if (local->conf.phymode == MODE_IEEE80211A || erp || - local->conf.phymode == MODE_ATHEROS_TURBO) { - /* - * OFDM: - * - * N_DBPS = DATARATE x 4 - * N_SYM = Ceiling((16+8xLENGTH+6) / N_DBPS) - * (16 = SIGNAL time, 6 = tail bits) - * TXTIME = T_PREAMBLE + T_SIGNAL + T_SYM x N_SYM + Signal Ext - * - * T_SYM = 4 usec - * 802.11a - 17.5.2: aSIFSTime = 16 usec - * 802.11g - 19.8.4: aSIFSTime = 10 usec + - * signal ext = 6 usec - */ - /* FIX: Atheros Turbo may have different (shorter) duration? */ - dur = 16; /* SIFS + signal ext */ - dur += 16; /* 17.3.2.3: T_PREAMBLE = 16 usec */ - dur += 4; /* 17.3.2.3: T_SIGNAL = 4 usec */ - dur += 4 * ceiling_div((16 + 8 * (len + 4) + 6) * 10, - 4 * rate); /* T_SYM x N_SYM */ - } else { - /* - * 802.11b or 802.11g with 802.11b compatibility: - * 18.3.4: TXTIME = PreambleLength + PLCPHeaderTime + - * Ceiling(((LENGTH+PBCC)x8)/DATARATE). PBCC=0. - * - * 802.11 (DS): 15.3.3, 802.11b: 18.3.4 - * aSIFSTime = 10 usec - * aPreambleLength = 144 usec or 72 usec with short preamble - * aPLCPHeaderLength = 48 ms or 24 ms with short preamble - */ - dur = 10; /* aSIFSTime = 10 usec */ - dur += short_preamble ? (72 + 24) : (144 + 48); - - dur += ceiling_div(8 * (len + 4) * 10, rate); - } - - return dur; -} - - -static u16 ieee80211_duration(struct ieee80211_txrx_data *tx, int group_addr, - int next_frag_len) -{ - int rate, mrate, erp, dur, i; - struct ieee80211_rate *txrate = tx->u.tx.rate; - struct ieee80211_local *local = tx->local; - - erp = txrate->flags & IEEE80211_RATE_ERP; - - /* - * data and mgmt (except PS Poll): - * - during CFP: 32768 - * - during contention period: - * if addr1 is group address: 0 - * if more fragments = 0 and addr1 is individual address: time to - * transmit one ACK plus SIFS - * if more fragments = 1 and addr1 is individual address: time to - * transmit next fragment plus 2 x ACK plus 3 x SIFS - * - * IEEE 802.11, 9.6: - * - control response frame (CTS or ACK) shall be transmitted using the - * same rate as the immediately previous frame in the frame exchange - * sequence, if this rate belongs to the PHY mandatory rates, or else - * at the highest possible rate belonging to the PHY rates in the - * BSSBasicRateSet - */ - - if (WLAN_FC_GET_TYPE(tx->fc) == WLAN_FC_TYPE_CTRL) { - /* TODO: These control frames are not currently sent by - * 80211.o, but should they be implemented, this function - * needs to be updated to support duration field calculation. - * - * RTS: time needed to transmit pending data/mgmt frame plus - * one CTS frame plus one ACK frame plus 3 x SIFS - * CTS: duration of immediately previous RTS minus time - * required to transmit CTS and its SIFS - * ACK: 0 if immediately previous directed data/mgmt had - * more=0, with more=1 duration in ACK frame is duration - * from previous frame minus time needed to transmit ACK - * and its SIFS - * PS Poll: BIT(15) | BIT(14) | aid - */ - return 0; - } - - /* data/mgmt */ - if (0 /* FIX: data/mgmt during CFP */) - return 32768; - - if (group_addr) /* Group address as the destination - no ACK */ - return 0; - - /* Individual destination address: - * IEEE 802.11, Ch. 9.6 (after IEEE 802.11g changes) - * CTS and ACK frames shall be transmitted using the highest rate in - * basic rate set that is less than or equal to the rate of the - * immediately previous frame and that is using the same modulation - * (CCK or OFDM). If no basic rate set matches with these requirements, - * the highest mandatory rate of the PHY that is less than or equal to - * the rate of the previous frame is used. - * Mandatory rates for IEEE 802.11g PHY: 1, 2, 5.5, 11, 6, 12, 24 Mbps - */ - rate = -1; - mrate = 10; /* use 1 Mbps if everything fails */ - for (i = 0; i < local->num_curr_rates; i++) { - struct ieee80211_rate *r = &local->curr_rates[i]; - if (r->rate > txrate->rate) - break; - - if (IEEE80211_RATE_MODULATION(txrate->flags) != - IEEE80211_RATE_MODULATION(r->flags)) - continue; - - if (r->flags & IEEE80211_RATE_BASIC) - rate = r->rate; - else if (r->flags & IEEE80211_RATE_MANDATORY) - mrate = r->rate; - } - if (rate == -1) { - /* No matching basic rate found; use highest suitable mandatory - * PHY rate */ - rate = mrate; - } - - /* Time needed to transmit ACK - * (10 bytes + 4-byte FCS = 112 bits) plus SIFS; rounded up - * to closest integer */ - - dur = ieee80211_frame_duration(local, 10, rate, erp, - local->short_preamble); - - if (next_frag_len) { - /* Frame is fragmented: duration increases with time needed to - * transmit next fragment plus ACK and 2 x SIFS. */ - dur *= 2; /* ACK + SIFS */ - /* next fragment */ - dur += ieee80211_frame_duration(local, next_frag_len, - txrate->rate, erp, - local->short_preamble); - } - - return dur; -} - - -static ieee80211_txrx_result -ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; - u16 dur; - struct ieee80211_tx_control *control = tx->u.tx.control; - - if (!MULTICAST_ADDR(hdr->addr1)) { - if (tx->skb->len >= tx->local->rts_threshold && - tx->local->rts_threshold < IEEE80211_MAX_RTS_THRESHOLD) { - control->use_rts_cts = 1; - control->retry_limit = - tx->local->long_retry_limit; - } else { - control->retry_limit = - tx->local->short_retry_limit; - } - } else { - control->retry_limit = 1; - } - - if (tx->fragmented) { - /* Do not use multiple retry rates when sending fragmented - * frames. - * TODO: The last fragment could still use multiple retry - * rates. */ -// control->alt_retry_rate = -1; - } - - /* Use CTS protection for unicast frames sent using extended rates if - * there are associated non-ERP stations and RTS/CTS is not configured - * for the frame. */ - if (tx->local->conf.phymode == MODE_IEEE80211G && - (tx->u.tx.rate->flags & IEEE80211_RATE_ERP) && - tx->u.tx.unicast && - tx->local->cts_protect_erp_frames && - !control->use_rts_cts) - control->use_cts_protect = 1; - - - /* Setup duration field for the first fragment of the frame. Duration - * for remaining fragments will be updated when they are being sent - * to low-level driver in ieee80211_tx(). */ - dur = ieee80211_duration(tx, MULTICAST_ADDR(hdr->addr1), - tx->fragmented ? tx->u.tx.extra_frag[0]->len : - 0); - hdr->duration_id = cpu_to_le16(dur); - - if (control->use_rts_cts || control->use_cts_protect) { - struct ieee80211_rate *rate; - int erp = tx->u.tx.rate->flags & IEEE80211_RATE_ERP; - - /* Do not use multiple retry rates when using RTS/CTS */ -// control->alt_retry_rate = -1; - - /* Use min(data rate, max base rate) as CTS/RTS rate */ - rate = tx->u.tx.rate; - while (rate > tx->local->curr_rates && - !(rate->flags & IEEE80211_RATE_BASIC)) - rate--; - - - if (control->use_rts_cts) - dur += ieee80211_frame_duration(tx->local, 10, - rate->rate, erp, - tx->local-> - short_preamble); - dur += ieee80211_frame_duration(tx->local, tx->skb->len, - tx->u.tx.rate->rate, erp, - tx->u.tx.short_preamble); - control->rts_cts_duration = dur; - control->rts_cts_rate = rate->val; - } - - if (tx->sta) { - tx->sta->tx_packets++; - tx->sta->tx_fragments++; - tx->sta->tx_bytes += tx->skb->len; - if (tx->u.tx.extra_frag) { - int i; - tx->sta->tx_fragments += tx->u.tx.num_extra_frag; - for (i = 0; i < tx->u.tx.num_extra_frag; i++) { - tx->sta->tx_bytes += - tx->u.tx.extra_frag[i]->len; - } - } - } - tx->local->scan.txrx_count++; - - return TXRX_CONTINUE; -} - - -static void ieee80211_rate_limit(unsigned long data) -{ - struct ieee80211_local *local = (struct ieee80211_local *) data; - - if (local->rate_limit) { - local->rate_limit_bucket += local->rate_limit; - if (local->rate_limit_bucket > local->rate_limit_burst) - local->rate_limit_bucket = local->rate_limit_burst; - local->rate_limit_timer.expires = jiffies + HZ; - add_timer(&local->rate_limit_timer); - } - -} - -static ieee80211_txrx_result -ieee80211_tx_h_rate_limit(struct ieee80211_txrx_data *tx) -{ - - if (likely(!tx->local->rate_limit || tx->u.tx.unicast)) - return TXRX_CONTINUE; - - /* rate limit */ - if (tx->local->rate_limit_bucket) { - tx->local->rate_limit_bucket--; - return TXRX_CONTINUE; - } - - I802_DEBUG_INC(tx->local->tx_handlers_drop_rate_limit); - return TXRX_DROP; -} - - - -static ieee80211_txrx_result -ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx) -{ -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - struct sk_buff *skb = tx->skb; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - u32 sta_flags; - - if (unlikely(tx->local->sta_scanning != 0) && - (WLAN_FC_GET_TYPE(tx->fc) != WLAN_FC_TYPE_MGMT || - WLAN_FC_GET_STYPE(tx->fc) != WLAN_FC_STYPE_PROBE_REQ)) - return TXRX_DROP; - - if (tx->u.tx.ps_buffered) - return TXRX_CONTINUE; - - sta_flags = tx->sta ? tx->sta->flags : 0; - - if (likely(tx->u.tx.unicast)) { - if (unlikely(!(sta_flags & WLAN_STA_ASSOC) && - tx->local->conf.mode != IW_MODE_ADHOC && - WLAN_FC_GET_TYPE(tx->fc) == WLAN_FC_TYPE_DATA)) { -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: dropped data frame to not " - "associated station " MACSTR "\n", - tx->dev->name, MAC2STR(hdr->addr1)); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); - return TXRX_DROP; - } - } else { - if (unlikely(WLAN_FC_GET_TYPE(tx->fc) == WLAN_FC_TYPE_DATA && - tx->local->num_sta == 0 && - !tx->local->allow_broadcast_always && - tx->local->conf.mode != IW_MODE_ADHOC)) { - /* - * No associated STAs - no need to send multicast - * frames. - */ - return TXRX_DROP; - } - return TXRX_CONTINUE; - } - - if (unlikely(!tx->u.tx.mgmt_interface && tx->sdata->ieee802_1x && - !(sta_flags & WLAN_STA_AUTHORIZED))) { -#ifdef CONFIG_IEEE80211_DEBUG - struct ieee80211_hdr *hdr = - (struct ieee80211_hdr *) tx->skb->data; - printk(KERN_DEBUG "%s: dropped frame to " MACSTR - " (unauthorized port)\n", tx->dev->name, - MAC2STR(hdr->addr1)); -#endif - I802_DEBUG_INC(tx->local->tx_handlers_drop_unauth_port); - return TXRX_DROP; - } - - return TXRX_CONTINUE; -} - - -/* This function is called whenever the AP is about to exceed the maximum limit - * of buffered frames for power saving STAs. This situation should not really - * happen often during normal operation, so dropping the oldest buffered packet - * from each queue should be OK to make some room for new frames. */ -static void purge_old_ps_buffers(struct ieee80211_local *local) -{ - int total = 0, purged = 0; - struct sk_buff *skb; - struct list_head *ptr; - - spin_lock_bh(&local->sub_if_lock); - list_for_each(ptr, &local->sub_if_list) { - struct ieee80211_if_norm *norm; - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - if (sdata->dev == local->mdev || - sdata->type != IEEE80211_SUB_IF_TYPE_NORM) - continue; - norm = &sdata->u.norm; - skb = skb_dequeue(&norm->ps_bc_buf); - if (skb) { - purged++; - dev_kfree_skb(skb); - } - total += skb_queue_len(&norm->ps_bc_buf); - } - spin_unlock_bh(&local->sub_if_lock); - - spin_lock_bh(&local->sta_lock); - list_for_each(ptr, &local->sta_list) { - struct sta_info *sta = - list_entry(ptr, struct sta_info, list); - skb = skb_dequeue(&sta->ps_tx_buf); - if (skb) { - purged++; - dev_kfree_skb(skb); - } - total += skb_queue_len(&sta->ps_tx_buf); - } - spin_unlock_bh(&local->sta_lock); - - local->total_ps_buffered = total; - printk(KERN_DEBUG "%s: PS buffers full - purged %d frames\n", - local->mdev->name, purged); -} - - -static inline ieee80211_txrx_result -ieee80211_tx_h_multicast_ps_buf(struct ieee80211_txrx_data *tx) -{ - /* broadcast/multicast frame */ - /* If any of the associated stations is in power save mode, - * the frame is buffered to be sent after DTIM beacon frame */ - if (tx->local->hw->host_broadcast_ps_buffering && - tx->sdata->type != IEEE80211_SUB_IF_TYPE_WDS && - tx->sdata->bss && atomic_read(&tx->sdata->bss->num_sta_ps) && - !(tx->fc & WLAN_FC_ORDER)) { - if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) - purge_old_ps_buffers(tx->local); - if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= - AP_MAX_BC_BUFFER) { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: BC TX buffer full - " - "dropping the oldest frame\n", - tx->dev->name); - } - dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); - } else - tx->local->total_ps_buffered++; - skb_queue_tail(&tx->sdata->bss->ps_bc_buf, tx->skb); - return TXRX_QUEUED; - } - - return TXRX_CONTINUE; -} - - -static inline ieee80211_txrx_result -ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx) -{ - struct sta_info *sta = tx->sta; - - if (unlikely(!sta || - (WLAN_FC_GET_TYPE(tx->fc) == WLAN_FC_TYPE_MGMT && - WLAN_FC_GET_STYPE(tx->fc) == WLAN_FC_STYPE_PROBE_RESP))) - return TXRX_CONTINUE; - - if (unlikely((sta->flags & WLAN_STA_PS) && !sta->pspoll)) { - struct ieee80211_tx_packet_data *pkt_data; -#ifdef IEEE80211_VERBOSE_DEBUG_PS - printk(KERN_DEBUG "STA " MACSTR " aid %d: PS buffer (entries " - "before %d)\n", - MAC2STR(sta->addr), sta->aid, - skb_queue_len(&sta->ps_tx_buf)); -#endif /* IEEE80211_VERBOSE_DEBUG_PS */ - sta->flags |= WLAN_STA_TIM; - if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) - purge_old_ps_buffers(tx->local); - if (skb_queue_len(&sta->ps_tx_buf) >= STA_MAX_TX_BUFFER) { - struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf); - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: STA " MACSTR " TX " - "buffer full - dropping oldest frame\n", - tx->dev->name, MAC2STR(sta->addr)); - } - dev_kfree_skb(old); - } else - tx->local->total_ps_buffered++; - /* Queue frame to be sent after STA sends an PS Poll frame */ - if (skb_queue_empty(&sta->ps_tx_buf) && tx->local->hw->set_tim) - tx->local->hw->set_tim(tx->dev, sta->aid, 1); - pkt_data = (struct ieee80211_tx_packet_data *)tx->skb->cb; - pkt_data->jiffies = jiffies; - skb_queue_tail(&sta->ps_tx_buf, tx->skb); - return TXRX_QUEUED; - } -#ifdef IEEE80211_VERBOSE_DEBUG_PS - else if (unlikely(sta->flags & WLAN_STA_PS)) { - printk(KERN_DEBUG "%s: STA " MACSTR " in PS mode, but pspoll " - "set -> send frame\n", tx->dev->name, - MAC2STR(sta->addr)); - } -#endif /* IEEE80211_VERBOSE_DEBUG_PS */ - sta->pspoll = 0; - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_tx_h_ps_buf(struct ieee80211_txrx_data *tx) -{ - if (unlikely(tx->u.tx.ps_buffered)) - return TXRX_CONTINUE; - - if (tx->u.tx.unicast) - return ieee80211_tx_h_unicast_ps_buf(tx); - else - return ieee80211_tx_h_multicast_ps_buf(tx); -} - - -static void inline ieee80211_tx_prepare(struct ieee80211_txrx_data *tx, - struct sk_buff *skb, - struct net_device *dev, - struct ieee80211_tx_control *control) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - struct ieee80211_tx_packet_data *pkt_data; - int hdrlen; - - pkt_data = (struct ieee80211_tx_packet_data *)skb->cb; - - memset(tx, 0, sizeof(*tx)); - tx->skb = skb; - tx->dev = pkt_data->sdata->dev; /* use original interface */ - tx->local = local; - tx->sdata = pkt_data->sdata; - tx->sta = sta_info_get(local, hdr->addr1); - tx->fc = le16_to_cpu(hdr->frame_control); - control->power_level = local->conf.power_level; - tx->u.tx.control = control; - tx->u.tx.unicast = !MULTICAST_ADDR(hdr->addr1); - control->no_ack = MULTICAST_ADDR(hdr->addr1); - tx->fragmented = local->fragmentation_threshold < - IEEE80211_MAX_FRAG_THRESHOLD && tx->u.tx.unicast && - skb->len + 4 /* FCS */ > local->fragmentation_threshold && - (local->hw->set_frag_threshold == NULL); - if (tx->sta == NULL) - control->clear_dst_mask = 1; - else if (tx->sta->clear_dst_mask) { - control->clear_dst_mask = 1; - tx->sta->clear_dst_mask = 0; - } - control->antenna_sel = local->conf.antenna_sel; - if (local->sta_antenna_sel != STA_ANTENNA_SEL_AUTO && tx->sta) - control->antenna_sel = tx->sta->antenna_sel; - hdrlen = ieee80211_get_hdrlen(tx->fc); - if (skb->len > hdrlen + sizeof(rfc1042_header) + 2) { - u8 *pos = &skb->data[hdrlen + sizeof(rfc1042_header)]; - tx->ethertype = (pos[0] << 8) | pos[1]; - } - -} - - -static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_tx_control *control, int mgmt) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - ieee80211_tx_handler *handler; - struct ieee80211_txrx_data tx; - ieee80211_txrx_result res = TXRX_DROP; - int ret, i; - - if (unlikely(skb->len < 10)) { - dev_kfree_skb(skb); - return 0; - } - - ieee80211_tx_prepare(&tx, skb, dev, control); - sta = tx.sta; - tx.u.tx.mgmt_interface = mgmt; - - for (handler = local->tx_handlers; *handler != NULL; handler++) { - res = (*handler)(&tx); - if (res != TXRX_CONTINUE) - break; - } - - skb = tx.skb; /* handlers are allowed to change skb */ - - if (sta) - sta_info_release(local, sta); - - if (unlikely(res == TXRX_DROP)) { - I802_DEBUG_INC(local->tx_handlers_drop); - goto drop; - } - - if (unlikely(res == TXRX_QUEUED)) { - I802_DEBUG_INC(local->tx_handlers_queued); - return 0; - } - - ieee80211_dump_frame(dev->name, "TX to low-level driver", skb); - ret = local->hw->tx(dev, skb, control); -#ifdef IEEE80211_LEDS - if (!ret && local->tx_led_counter++ == 0) { - ieee80211_tx_led(1, dev); - } -#endif /* IEEE80211_LEDS */ - if (tx.u.tx.extra_frag) { - if (ret > 0) { - /* Must free all fragments and return 0 since skb data - * has been fragmented into multiple buffers. - * TODO: could free extra fragments and restore skb to - * the original form since the data is still there and - * then return nonzero so that Linux netif would - * retry. */ - goto drop; - } - - skb = NULL; /* skb is now owned by low-level driver */ - control->use_rts_cts = 0; - control->use_cts_protect = 0; - control->clear_dst_mask = 0; - for (i = 0; i < tx.u.tx.num_extra_frag; i++) { - int next_len, dur; - struct ieee80211_hdr *hdr = - (struct ieee80211_hdr *) - tx.u.tx.extra_frag[i]->data; - if (i + 1 < tx.u.tx.num_extra_frag) - next_len = tx.u.tx.extra_frag[i + 1]->len; - else { - next_len = 0; - tx.u.tx.rate = tx.u.tx.last_frag_rate; - tx.u.tx.control->tx_rate = tx.u.tx.rate->val; -// tx.u.tx.control->rateidx = -// tx.u.tx.last_frag_rateidx; - tx.u.tx.control->rate_ctrl_probe = - tx.u.tx.probe_last_frag; - } - dur = ieee80211_duration(&tx, 0, next_len); - hdr->duration_id = cpu_to_le16(dur); - - ieee80211_dump_frame(dev->name, - "TX to low-level driver", skb); - ret = local->hw->tx(dev, tx.u.tx.extra_frag[i], - control); - if (ret > 0) - goto drop; -#ifdef IEEE80211_LEDS - if (local->tx_led_counter++ == 0) { - ieee80211_tx_led(1, dev); - } -#endif /* IEEE80211_LEDS */ - tx.u.tx.extra_frag[i] = NULL; - } - kfree(tx.u.tx.extra_frag); - } - if (ret == -1) - ret = 0; - return ret; - - drop: - if (skb) - dev_kfree_skb(skb); - for (i = 0; i < tx.u.tx.num_extra_frag; i++) - if (tx.u.tx.extra_frag[i]) - dev_kfree_skb(tx.u.tx.extra_frag[i]); - kfree(tx.u.tx.extra_frag); - return 0; -} - - -static int ieee80211_master_start_xmit(struct sk_buff *skb, - struct net_device *dev) -{ - struct ieee80211_tx_control control; - struct ieee80211_tx_packet_data *pkt_data; - struct ieee80211_sub_if_data *sdata; - int ret = 1; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - /* - * copy control out of the skb so other people can use skb->cb - */ - pkt_data = (struct ieee80211_tx_packet_data *)skb->cb; - if (unlikely(pkt_data->magic != IEEE80211_CB_MAGIC)) { - printk(KERN_WARNING "%s: Someone messed with our skb->cb\n", - dev->name); - dev_kfree_skb(skb); - return 0; - } - memcpy(&control, &pkt_data->control, - sizeof(struct ieee80211_tx_control)); - - ret = ieee80211_tx(dev, skb, &control, - pkt_data->sdata->type == - IEEE80211_SUB_IF_TYPE_MGMT); - - return ret; -} - - -/** - * ieee80211_subif_start_xmit - netif start_xmit function for Ethernet-type - * subinterfaces (wlan#, WDS, and VLAN interfaces) - * @skb: packet to be sent - * @dev: incoming interface - * - * Returns: 0 on success (and frees skb in this case) or 1 on failure (skb will - * not be freed, and caller is responsible for either retrying later or freeing - * skb). - * - * This function takes in an Ethernet header and encapsulates it with suitable - * IEEE 802.11 header based on which interface the packet is coming in. The - * encapsulated packet will then be passed to master interface, wlan#.11, for - * transmission (through low-level driver). - */ -static int ieee80211_subif_start_xmit(struct sk_buff *skb, - struct net_device *dev) -{ - struct ieee80211_local *local = (struct ieee80211_local *) dev->priv; - struct ieee80211_tx_packet_data *pkt_data; - struct ieee80211_sub_if_data *sdata; - int ret = 1, head_need; - u16 ethertype, hdrlen, fc; - struct ieee80211_hdr hdr; - u8 *encaps_data; - int encaps_len, skip_header_bytes; - int nh_pos, h_pos, no_encrypt = 0; - struct sta_info *sta; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (unlikely(skb->len < ETH_HLEN)) { - printk(KERN_DEBUG "%s: short skb (len=%d)\n", - dev->name, skb->len); - ret = 0; - goto fail; - } - - nh_pos = skb->nh.raw - skb->data; - h_pos = skb->h.raw - skb->data; - - /* convert Ethernet header to proper 802.11 header (based on - * operation mode) */ - ethertype = (skb->data[12] << 8) | skb->data[13]; - /* TODO: handling for 802.1x authorized/unauthorized port */ - fc = (WLAN_FC_TYPE_DATA << 2) | (WLAN_FC_STYPE_DATA << 4); - - if (likely(sdata->type == IEEE80211_SUB_IF_TYPE_NORM || - sdata->type == IEEE80211_SUB_IF_TYPE_VLAN)) { - if (local->conf.mode == IW_MODE_MASTER) { - fc |= WLAN_FC_FROMDS; - /* DA BSSID SA */ - memcpy(hdr.addr1, skb->data, ETH_ALEN); - memcpy(hdr.addr2, dev->dev_addr, ETH_ALEN); - memcpy(hdr.addr3, skb->data + ETH_ALEN, ETH_ALEN); - } else if (local->conf.mode == IW_MODE_INFRA) { - fc |= WLAN_FC_TODS; - /* BSSID SA DA */ - memcpy(hdr.addr1, local->bssid, ETH_ALEN); - memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN); - memcpy(hdr.addr3, skb->data, ETH_ALEN); - } else if (local->conf.mode == IW_MODE_ADHOC) { - /* DA SA BSSID */ - memcpy(hdr.addr1, skb->data, ETH_ALEN); - memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN); - memcpy(hdr.addr3, local->bssid, ETH_ALEN); - } - hdrlen = 24; - } else if (sdata->type == IEEE80211_SUB_IF_TYPE_WDS) { - fc |= WLAN_FC_FROMDS | WLAN_FC_TODS; - /* RA TA DA SA */ - memcpy(hdr.addr1, sdata->u.wds.remote_addr, ETH_ALEN); - memcpy(hdr.addr2, dev->dev_addr, ETH_ALEN); - memcpy(hdr.addr3, skb->data, ETH_ALEN); - memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); - hdrlen = 30; - } else if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - if (local->conf.mode == IW_MODE_INFRA) { - fc |= WLAN_FC_TODS; - /* BSSID SA DA */ - memcpy(hdr.addr1, sdata->u.sta.bssid, ETH_ALEN); - memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN); - memcpy(hdr.addr3, skb->data, ETH_ALEN); - } else { - /* DA SA BSSID */ - memcpy(hdr.addr1, skb->data, ETH_ALEN); - memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN); - memcpy(hdr.addr3, sdata->u.sta.bssid, ETH_ALEN); - } - hdrlen = 24; - } else { - ret = 0; - goto fail; - } - - /* receiver is QoS enabled, use a QoS type frame */ - sta = sta_info_get(local, hdr.addr1); - if (sta) { - if (sta->flags & WLAN_STA_WME) { - fc |= WLAN_FC_STYPE_QOS_DATA << 4; - hdrlen += 2; - } - sta_info_release(local, sta); - } - - hdr.frame_control = cpu_to_le16(fc); - hdr.duration_id = 0; - hdr.seq_ctrl = 0; - - skip_header_bytes = ETH_HLEN; - if (ethertype == ETH_P_AARP || ethertype == ETH_P_IPX) { - encaps_data = bridge_tunnel_header; - encaps_len = sizeof(bridge_tunnel_header); - skip_header_bytes -= 2; - } else if (ethertype >= 0x600) { - encaps_data = rfc1042_header; - encaps_len = sizeof(rfc1042_header); - skip_header_bytes -= 2; - } else { - encaps_data = NULL; - encaps_len = 0; - } - - skb_pull(skb, skip_header_bytes); - nh_pos -= skip_header_bytes; - h_pos -= skip_header_bytes; - - /* TODO: implement support for fragments so that there is no need to - * reallocate and copy payload; it might be enough to support one - * extra fragment that would be copied in the beginning of the frame - * data.. anyway, it would be nice to include this into skb structure - * somehow - * - * There are few options for this: - * use skb->cb as an extra space for 802.11 header - * allocate new buffer if not enough headroom - * make sure that there is enough headroom in every skb by increasing - * build in headroom in __dev_alloc_skb() (linux/skbuff.h) and - * alloc_skb() (net/core/skbuff.c) - */ - head_need = hdrlen + encaps_len + (local->hw->extra_hdr_room ? 2 : 0); - head_need -= skb_headroom(skb); - - /* We are going to modify skb data, so make a copy of it if happens to - * be cloned. This could happen, e.g., with Linux bridge code passing - * us broadcast frames. */ - - if (head_need > 0 || skb_cloned(skb)) { -#if 0 - printk(KERN_DEBUG "%s: need to reallocate buffer for %d bytes " - "of headroom\n", dev->name, head_need); -#endif - - if (skb_cloned(skb)) - I802_DEBUG_INC(local->tx_expand_skb_head_cloned); - else - I802_DEBUG_INC(local->tx_expand_skb_head); - /* Since we have to reallocate the buffer, make sure that there - * is enough room for possible WEP IV/ICV and TKIP (8 bytes - * before payload and 12 after). */ - if (pskb_expand_head(skb, (head_need > 0 ? head_need + 8 : 8), - 12, GFP_ATOMIC)) { - printk(KERN_DEBUG "%s: failed to reallocate TX buffer" - "\n", dev->name); - goto fail; - } - } - - if (encaps_data) { - memcpy(skb_push(skb, encaps_len), encaps_data, encaps_len); - nh_pos += encaps_len; - h_pos += encaps_len; - } - memcpy(skb_push(skb, hdrlen), &hdr, hdrlen); - nh_pos += hdrlen; - h_pos += hdrlen; - - pkt_data = (struct ieee80211_tx_packet_data *)skb->cb; - memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data)); - pkt_data->magic = IEEE80211_CB_MAGIC; - pkt_data->sdata = sdata; - pkt_data->control.do_not_encrypt = no_encrypt; - - skb->dev = sdata->master; - sdata->stats.tx_packets++; - sdata->stats.tx_bytes += skb->len; - - /* Update skb pointers to various headers since this modified frame - * is going to go through Linux networking code that may potentially - * need things like pointer to IP header. */ - skb->mac.raw = skb->data; - skb->nh.raw = skb->data + nh_pos; - skb->h.raw = skb->data + h_pos; - - - dev_queue_xmit(skb); - - return 0; - - fail: - if (!ret) - dev_kfree_skb(skb); - - return ret; -} - - -/* - * This is the transmit routine for the 802.11 type interfaces - * called by upper layers of the linux networking - * stack when it has a frame to transmit - */ -static int -ieee80211_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev) -{ - struct ieee80211_sub_if_data *sdata; - struct ieee80211_tx_packet_data *pkt_data; - struct ieee80211_hdr *hdr; - u16 fc; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - if (skb->len < 10) { - dev_kfree_skb(skb); - return 0; - } - - hdr = (struct ieee80211_hdr *) skb->data; - fc = le16_to_cpu(hdr->frame_control); - - pkt_data = (struct ieee80211_tx_packet_data *)skb->cb; - memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data)); - pkt_data->magic = IEEE80211_CB_MAGIC; - pkt_data->sdata = sdata; - - if (WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT && - WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_PROBE_RESP) - pkt_data->control.pkt_type = PKT_PROBE_RESP; - - skb->priority = 20; /* use hardcode priority for mgmt TX queue */ - skb->dev = sdata->master; - - /* - * We're using the protocol field of the the frame control header - * to request TX callback for hostapd. BIT(1) is checked. - */ - if ((fc & BIT(1)) == BIT(1)) { - pkt_data->control.req_tx_status = 1; - fc &= ~BIT(1); - hdr->frame_control = cpu_to_le16(fc); - } - - - - pkt_data->control.do_not_encrypt = !(fc & WLAN_FC_ISWEP); - - sdata->stats.tx_packets++; - sdata->stats.tx_bytes += skb->len; - - dev_queue_xmit(skb); - - return 0; -} - - -static void ieee80211_beacon_add_tim(struct ieee80211_local *local, - struct ieee80211_if_norm *bss, - struct sk_buff *skb) -{ - u8 *pos, *tim; - int aid0 = 0; - int i, num_bits = 0, n1, n2; - u8 bitmap[251]; - - /* Generate bitmap for TIM only if there are any STAs in power save - * mode. */ - if (atomic_read(&bss->num_sta_ps) > 0 && bss->max_aid > 0) { - memset(bitmap, 0, sizeof(bitmap)); - spin_lock_bh(&local->sta_lock); - for (i = 0; i < bss->max_aid; i++) { - if (bss->sta_aid[i] && - (!skb_queue_empty(&bss->sta_aid[i]->ps_tx_buf) || - !skb_queue_empty(&bss->sta_aid[i]->tx_filtered))) - { - bitmap[(i + 1) / 8] |= 1 << (i + 1) % 8; - num_bits++; - } - } - spin_unlock_bh(&local->sta_lock); - } - - if (bss->dtim_count == 0) - bss->dtim_count = bss->dtim_period - 1; - else - bss->dtim_count--; - - tim = pos = (u8 *) skb_put(skb, 6); - *pos++ = WLAN_EID_TIM; - *pos++ = 4; - *pos++ = bss->dtim_count; - *pos++ = bss->dtim_period; - - if (bss->dtim_count == 0 && !skb_queue_empty(&bss->ps_bc_buf)) { - aid0 = 1; - } - - if (num_bits) { - /* Find largest even number N1 so that bits numbered 1 through - * (N1 x 8) - 1 in the bitmap are 0 and number N2 so that bits - * (N2 + 1) x 8 through 2007 are 0. */ - n1 = 0; - for (i = 0; i < sizeof(bitmap); i++) { - if (bitmap[i]) { - n1 = i & 0xfe; - break; - } - } - n2 = n1; - for (i = sizeof(bitmap) - 1; i >= n1; i--) { - if (bitmap[i]) { - n2 = i; - break; - } - } - - /* Bitmap control */ - *pos++ = n1 | (aid0 ? 1 : 0); - /* Part Virt Bitmap */ - memcpy(pos, bitmap + n1, n2 - n1 + 1); - - tim[1] = n2 - n1 + 4; - skb_put(skb, n2 - n1); - } else { - *pos++ = aid0 ? 1 : 0; /* Bitmap control */ - *pos++ = 0; /* Part Virt Bitmap */ - } -} - - - - -struct sk_buff * ieee80211_beacon_get(struct net_device *dev, int bss_idx, - struct ieee80211_tx_control *control) -{ - struct ieee80211_local *local = dev->priv; - struct sk_buff *skb; - struct net_device *bdev; - struct ieee80211_sub_if_data *sdata = NULL; - struct ieee80211_if_norm *norm = NULL; - struct ieee80211_rate *rate; - struct rate_control_extra extra; - u8 *b_head, *b_tail; - int bh_len, bt_len; - - - spin_lock_bh(&local->sub_if_lock); - if (bss_idx < 0 || bss_idx >= local->bss_dev_count) - bdev = NULL; - else { - bdev = local->bss_devs[bss_idx]; - sdata = IEEE80211_DEV_TO_SUB_IF(bdev); - norm = &sdata->u.norm; - } - spin_unlock_bh(&local->sub_if_lock); - - if (bdev == NULL || norm == NULL || norm->beacon_head == NULL) { -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - if (net_ratelimit()) - printk(KERN_DEBUG "no beacon data avail for idx=%d " - "(%s)\n", bss_idx, bdev ? bdev->name : "N/A"); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - return NULL; - } - - /* Assume we are generating the normal beacon locally */ - b_head = norm->beacon_head; - b_tail = norm->beacon_tail; - bh_len = norm->beacon_head_len; - bt_len = norm->beacon_tail_len; - - - skb = dev_alloc_skb(bh_len + bt_len + 256 /* maximum TIM len */); - if (!skb) - return NULL; - - memcpy(skb_put(skb, bh_len), b_head, bh_len); - - ieee80211_beacon_add_tim(local, norm, skb); - - if (b_tail) { - memcpy(skb_put(skb, bt_len), b_tail, bt_len); - } - - memset(&extra, 0, sizeof(extra)); - extra.endidx = local->num_curr_rates; - - - rate = rate_control_get_rate(dev, skb, &extra); - if (rate == NULL) { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: ieee80211_beacon_get: no rate " - "found\n", dev->name); - } - dev_kfree_skb(skb); - return NULL; - } - - control->tx_rate = (local->short_preamble && - (rate->flags & IEEE80211_RATE_PREAMBLE2)) ? - rate->val2 : rate->val; - control->antenna_sel = local->conf.antenna_sel; - control->power_level = local->conf.power_level; - control->no_ack = 1; - control->retry_limit = 1; - control->rts_cts_duration = 0; - control->clear_dst_mask = 1; - - - norm->num_beacons++; - return skb; -} - -struct sk_buff * -ieee80211_get_buffered_bc(struct net_device *dev, int bss_idx, - struct ieee80211_tx_control *control) -{ - struct ieee80211_local *local = dev->priv; - struct sk_buff *skb; - struct sta_info *sta; - ieee80211_tx_handler *handler; - struct ieee80211_txrx_data tx; - ieee80211_txrx_result res = TXRX_DROP; - struct net_device *bdev; - struct ieee80211_sub_if_data *sdata; - struct ieee80211_if_norm *bss; - - - spin_lock_bh(&local->sub_if_lock); - if (bss_idx < 0 || bss_idx >= local->bss_dev_count) { - bdev = NULL; - bss = NULL; - } else { - bdev = local->bss_devs[bss_idx]; - sdata = IEEE80211_DEV_TO_SUB_IF(bdev); - bss = &sdata->u.norm; - } - spin_unlock_bh(&local->sub_if_lock); - if (bdev == NULL || bss == NULL || bss->beacon_head == NULL) - return NULL; - - if (bss->dtim_count != 0) - return NULL; /* send buffered bc/mc only after DTIM beacon */ - skb = skb_dequeue(&bss->ps_bc_buf); - memset(control, 0, sizeof(*control)); - if (skb == NULL) - return NULL; - local->total_ps_buffered--; - - if (!skb_queue_empty(&bss->ps_bc_buf) && skb->len >= 2) { - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - /* more buffered multicast/broadcast frames ==> set MoreData - * flag in IEEE 802.11 header to inform PS STAs */ - hdr->frame_control |= cpu_to_le16(WLAN_FC_MOREDATA); - } - - ieee80211_tx_prepare(&tx, skb, dev, control); - sta = tx.sta; - tx.u.tx.ps_buffered = 1; - - for (handler = local->tx_handlers; *handler != NULL; handler++) { - res = (*handler)(&tx); - if (res == TXRX_DROP || res == TXRX_QUEUED) - break; - } - - if (res == TXRX_DROP) { - I802_DEBUG_INC(local->tx_handlers_drop); - dev_kfree_skb(skb); - skb = NULL; - } else if (res == TXRX_QUEUED) { - I802_DEBUG_INC(local->tx_handlers_queued); - skb = NULL; - } - - if (sta) - sta_info_release(local, sta); - - return skb; -} - - -int ieee80211_hw_config(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - int i, ret = 0; - -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "HW CONFIG: channel=%d freq=%d mode=%d " - "phymode=%d\n", local->conf.channel, local->conf.freq, - local->conf.mode, local->conf.phymode); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - - if (local->hw->config) - ret = local->hw->config(dev, &local->conf); - - for (i = 0; i < local->hw->num_modes; i++) { - struct ieee80211_hw_modes *mode = &local->hw->modes[i]; - if (mode->mode == local->conf.phymode) { - if (local->curr_rates != mode->rates) { - rate_control_clear(local); - } - local->curr_rates = mode->rates; - local->num_curr_rates = mode->num_rates; - ieee80211_prepare_rates(dev); - break; - } - } - - return ret; -} - - -struct ieee80211_conf *ieee80211_get_hw_conf(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - return &local->conf; -} - - -static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) -{ - /* FIX: what would be proper limits for MTU? - * This interface uses 802.3 frames. */ - if (new_mtu < 256 || new_mtu > 2304 - 24 - 6) { - printk(KERN_WARNING "%s: invalid MTU %d\n", - dev->name, new_mtu); - return -EINVAL; - } - -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: setting MTU %d\n", dev->name, new_mtu); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - dev->mtu = new_mtu; - return 0; -} - - -static int ieee80211_change_mtu_apdev(struct net_device *dev, int new_mtu) -{ - /* FIX: what would be proper limits for MTU? - * This interface uses 802.11 frames. */ - if (new_mtu < 256 || new_mtu > 2304) { - printk(KERN_WARNING "%s: invalid MTU %d\n", - dev->name, new_mtu); - return -EINVAL; - } - -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: setting MTU %d\n", dev->name, new_mtu); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - dev->mtu = new_mtu; - return 0; -} - - -static void ieee80211_tx_timeout(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - - printk(KERN_WARNING "%s: resetting interface.\n", dev->name); - - if (local->hw->reset(dev)) - printk(KERN_ERR "%s: failed to reset interface.\n", dev->name); - else - netif_wake_queue(dev); -} - - -static int ieee80211_set_mac_address(struct net_device *dev, void *addr) -{ - struct ieee80211_local *local = dev->priv; - struct sockaddr *a = addr; - struct list_head *ptr; - int res; - - if (!local->hw->set_mac_address) - return -EOPNOTSUPP; - - res = local->hw->set_mac_address(dev, addr); - if (res) - return res; - - list_for_each(ptr, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - memcpy(sdata->dev->dev_addr, a->sa_data, ETH_ALEN); - } - - return 0; -} - - -static struct net_device_stats *ieee80211_get_stats(struct net_device *dev) -{ - struct ieee80211_sub_if_data *sdata; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - return &(sdata->stats); -} - - -static int ieee80211_open(struct net_device *dev) -{ - struct ieee80211_sub_if_data *sdata; - struct ieee80211_local *local = dev->priv; - int res; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - if (local->open_count == 0) { - res = local->hw->open(sdata->master); - if (res) - return res; - ieee80211_init_scan(sdata->master); - } - local->open_count++; - - netif_start_queue(dev); - return 0; -} - - -static int ieee80211_stop(struct net_device *dev) -{ - struct ieee80211_sub_if_data *sdata; - struct ieee80211_local *local = dev->priv; - int res; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - netif_stop_queue(dev); - - local->open_count--; - if (local->open_count == 0) { - ieee80211_stop_scan(sdata->master); - res = local->hw->stop(sdata->master); - if (res) - return res; - } - - return 0; -} - - -static int header_parse_80211(struct sk_buff *skb, unsigned char *haddr) -{ - memcpy(haddr, skb->mac.raw + 10, ETH_ALEN); /* addr2 */ - return ETH_ALEN; -} - - -static struct net_device * -ieee80211_get_wds_dev(struct ieee80211_local *local, u8 *addr) -{ - struct list_head *ptr; - - list_for_each(ptr, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - if (sdata->type == IEEE80211_SUB_IF_TYPE_WDS && - memcmp(addr, sdata->u.wds.remote_addr, ETH_ALEN) == 0) - return sdata->dev; - } - - return NULL; -} - - -static struct net_device * ieee80211_own_bssid(struct ieee80211_local *local, - u8 *addr) -{ - int i; - struct net_device *dev = NULL; - - spin_lock_bh(&local->sub_if_lock); - for (i = 0; i < local->bss_dev_count; i++) { - if ((memcmp(local->bss_devs[i]->dev_addr, addr, ETH_ALEN) == 0) - ) { - dev = local->bss_devs[i]; - break; - } - } - spin_unlock_bh(&local->sub_if_lock); - - return dev; -} - - - - -static struct net_device * ieee80211_sta_bssid(struct ieee80211_local *local, - u8 *addr, u8 *a1, - int *sta_multicast) -{ - struct list_head *ptr; - int multicast; - u8 *own_addr = local->mdev->dev_addr; - - multicast = a1[0] & 0x01; - - /* Try O(1) lookup for a common case of only one AP being used. */ - if (own_addr[0] == a1[0] && own_addr[1] == a1[1] && - own_addr[2] == a1[2]) { - int index = (((int) a1[3] << 16) | ((int) a1[4] << 8) | a1[5]) - - (((int) own_addr[3] << 16) | - ((int) own_addr[4] << 8) | own_addr[5]); - if (index >= 0 && index < local->conf.bss_count && - local->sta_devs[index]) { - struct net_device *dev = local->sta_devs[index]; - struct ieee80211_sub_if_data *sdata; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (memcmp(addr, sdata->u.sta.bssid, ETH_ALEN) == 0) { - *sta_multicast = multicast; - return dev; - } - } - } - - if (!multicast) - return NULL; - - /* Could not find station interface, resort to O(n) lookup. */ - list_for_each(ptr, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - continue; - if (!multicast && - memcmp(a1, sdata->dev->dev_addr, ETH_ALEN) != 0) - continue; - - if (memcmp(addr, sdata->u.sta.bssid, ETH_ALEN) == 0 || - (memcmp(addr, "\xff\xff\xff\xff\xff\xff", ETH_ALEN) == 0 && - local->conf.mode == IW_MODE_ADHOC)) { - *sta_multicast = multicast; - return sdata->dev; - } - } - - return NULL; -} - - -static int ieee80211_own_addr(struct net_device *dev, u8 *addr) -{ - struct ieee80211_local *local = dev->priv; - u8 *own = dev->dev_addr; - int index; - - /* Optimization: assume that BSSID mask does not change for first - * three octets. */ - if (own[0] != addr[0] || own[1] != addr[1] || own[2] != addr[2]) - return 0; - - index = (((int) addr[3] << 16) | ((int) addr[4] << 8) | addr[5]) - - (((int) own[3] << 16) | ((int) own[4] << 8) | own[5]); - if (index >= 0 && index < local->conf.bss_count && - local->sta_devs[index]) - return 1; - - return 0; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_data(struct ieee80211_txrx_data *rx) -{ - struct net_device *dev = rx->dev; - struct ieee80211_local *local = rx->local; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data; - u16 fc, hdrlen, ethertype; - u8 *payload; - u8 dst[ETH_ALEN]; - u8 src[ETH_ALEN]; - struct sk_buff *skb = rx->skb, *skb2; - struct ieee80211_sub_if_data *sdata; - - fc = rx->fc; - if (unlikely(WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_DATA)) - return TXRX_CONTINUE; - - if (unlikely(!WLAN_FC_DATA_PRESENT(fc))) - return TXRX_DROP; - - hdrlen = ieee80211_get_hdrlen(fc); - - /* convert IEEE 802.11 header + possible LLC headers into Ethernet - * header - * IEEE 802.11 address fields: - * ToDS FromDS Addr1 Addr2 Addr3 Addr4 - * 0 0 DA SA BSSID n/a - * 0 1 DA BSSID SA n/a - * 1 0 BSSID SA DA n/a - * 1 1 RA TA DA SA - */ - - switch (fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) { - case WLAN_FC_TODS: - /* BSSID SA DA */ - memcpy(dst, hdr->addr3, ETH_ALEN); - memcpy(src, hdr->addr2, ETH_ALEN); - - if (unlikely(local->conf.mode != IW_MODE_MASTER || - !ieee80211_own_bssid(local, hdr->addr1))) { - printk(KERN_DEBUG "%s: dropped ToDS frame (BSSID=" - MACSTR " SA=" MACSTR " DA=" MACSTR ")\n", - dev->name, MAC2STR(hdr->addr1), - MAC2STR(hdr->addr2), MAC2STR(hdr->addr3)); - return TXRX_DROP; - } - break; - case (WLAN_FC_TODS | WLAN_FC_FROMDS): - /* RA TA DA SA */ - memcpy(dst, hdr->addr3, ETH_ALEN); - memcpy(src, hdr->addr4, ETH_ALEN); - - dev = ieee80211_get_wds_dev(local, hdr->addr2); - if (!dev || memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) != 0) { - printk(KERN_DEBUG "%s: dropped FromDS&ToDS frame (RA=" - MACSTR " TA=" MACSTR " DA=" MACSTR " SA=" - MACSTR ")\n", - rx->dev->name, MAC2STR(hdr->addr1), - MAC2STR(hdr->addr2), MAC2STR(hdr->addr3), - MAC2STR(hdr->addr4)); - return TXRX_DROP; - } - break; - case WLAN_FC_FROMDS: - /* DA BSSID SA */ - memcpy(dst, hdr->addr1, ETH_ALEN); - memcpy(src, hdr->addr3, ETH_ALEN); - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA || - memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0 || - memcmp(hdr->addr2, sdata->u.sta.bssid, ETH_ALEN) != 0) { - return TXRX_DROP; - } - break; - case 0: - /* DA SA BSSID */ - memcpy(dst, hdr->addr1, ETH_ALEN); - memcpy(src, hdr->addr2, ETH_ALEN); - - if (local->conf.mode != IW_MODE_ADHOC || - memcmp(hdr->addr3, local->bssid, ETH_ALEN) != 0) { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: dropped IBSS frame (DA=" - MACSTR " SA=" MACSTR " BSSID=" MACSTR - ")\n", - dev->name, MAC2STR(hdr->addr1), - MAC2STR(hdr->addr2), - MAC2STR(hdr->addr3)); - } - return TXRX_DROP; - } - break; - } - - payload = skb->data + hdrlen; - - if (unlikely(skb->len - hdrlen < 8)) { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: RX too short data frame " - "payload\n", dev->name); - } - return TXRX_DROP; - } - - ethertype = (payload[6] << 8) | payload[7]; - - if (likely((memcmp(payload, rfc1042_header, 6) == 0 && - ethertype != ETH_P_AARP && ethertype != ETH_P_IPX) || - memcmp(payload, bridge_tunnel_header, 6) == 0)) { - /* remove RFC1042 or Bridge-Tunnel encapsulation and - * replace EtherType */ - skb_pull(skb, hdrlen + 6); - memcpy(skb_push(skb, ETH_ALEN), src, ETH_ALEN); - memcpy(skb_push(skb, ETH_ALEN), dst, ETH_ALEN); - } else { - struct ethhdr *ehdr; - unsigned short len; - skb_pull(skb, hdrlen); - len = htons(skb->len); - ehdr = (struct ethhdr *)skb_push(skb, sizeof(struct ethhdr)); - memcpy(ehdr->h_dest, dst, ETH_ALEN); - memcpy(ehdr->h_source, src, ETH_ALEN); - ehdr->h_proto = len; - } - - if (rx->sta && !rx->sta->assoc_ap && - !(rx->sta && (rx->sta->flags & WLAN_STA_WDS))) - skb->dev = rx->sta->dev; - else - skb->dev = dev; - - skb2 = NULL; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - /* - * don't count the master since the low level code - * counts it already for us. - */ - if (skb->dev != sdata->master) { - sdata->stats.rx_packets++; - sdata->stats.rx_bytes += skb->len; - } - - if (local->bridge_packets && sdata->type != IEEE80211_SUB_IF_TYPE_WDS - && sdata->type != IEEE80211_SUB_IF_TYPE_STA) { - if (MULTICAST_ADDR(skb->data)) { - /* send multicast frames both to higher layers in - * local net stack and back to the wireless media */ - skb2 = skb_copy(skb, GFP_ATOMIC); - if (skb2 == NULL) - printk(KERN_DEBUG "%s: failed to clone " - "multicast frame\n", dev->name); - } else { - struct sta_info *dsta; - dsta = sta_info_get(local, skb->data); - if (dsta && dsta->dev == NULL) { - printk(KERN_DEBUG "Station with null dev " - "structure!\n"); - } else if (dsta && dsta->dev == dev) { - /* Destination station is associated to this - * AP, so send the frame directly to it and - * do not pass the frame to local net stack. - */ - skb2 = skb; - skb = NULL; - } - if (dsta) - sta_info_release(local, dsta); - } - } - - if (skb) { - /* deliver to local stack */ - skb->protocol = eth_type_trans(skb, dev); - memset(skb->cb, 0, sizeof(skb->cb)); - netif_rx(skb); - } - - if (skb2) { - /* send to wireless media */ - skb2->protocol = __constant_htons(ETH_P_802_3); - skb2->mac.raw = skb2->nh.raw = skb2->data; - dev_queue_xmit(skb2); - } - - return TXRX_QUEUED; -} - - -static struct ieee80211_rate * -ieee80211_get_rate(struct ieee80211_local *local, int phymode, int hw_rate) -{ - int m, r; - - for (m = 0; m < local->hw->num_modes; m++) { - struct ieee80211_hw_modes *mode = &local->hw->modes[m]; - if (mode->mode != phymode) - continue; - for (r = 0; r < mode->num_rates; r++) { - struct ieee80211_rate *rate = &mode->rates[r]; - if (rate->val == hw_rate || - (rate->flags & IEEE80211_RATE_PREAMBLE2 && - rate->val2 == hw_rate)) - return rate; - } - } - - return NULL; -} - - -void -ieee80211_rx_mgmt(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *status, u32 msg_type) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_frame_info *fi; - size_t hlen; - struct ieee80211_sub_if_data *sdata; - - dev = local->apdev; - skb->dev = dev; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - if (skb_headroom(skb) < sizeof(struct ieee80211_frame_info)) { - I802_DEBUG_INC(local->rx_expand_skb_head); - if (pskb_expand_head(skb, sizeof(struct ieee80211_frame_info), - 0, GFP_ATOMIC)) { - dev_kfree_skb(skb); - return; - } - } - - hlen = sizeof(struct ieee80211_frame_info); - if (msg_type == ieee80211_msg_monitor) - hlen -= sizeof(fi->msg_type); - - fi = (struct ieee80211_frame_info *) skb_push(skb, hlen); - memset(fi, 0, hlen); - if (msg_type != ieee80211_msg_monitor) - fi->msg_type = htonl(msg_type); - fi->version = htonl(IEEE80211_FI_VERSION); - fi->length = htonl(hlen); - if (status) { -// struct timespec ts; - struct ieee80211_rate *rate; - -#if 0 - jiffies_to_timespec(status->hosttime, &ts); - fi->hosttime = cpu_to_be64(ts.tv_sec * 1000000 + - ts.tv_nsec / 1000); - fi->mactime = cpu_to_be64(status->mactime); -#endif - switch (status->phymode) { - case MODE_IEEE80211A: - fi->phytype = htonl(ieee80211_phytype_ofdm_dot11_a); - break; - case MODE_IEEE80211B: - fi->phytype = htonl(ieee80211_phytype_dsss_dot11_b); - break; - case MODE_IEEE80211G: - fi->phytype = htonl(ieee80211_phytype_pbcc_dot11_g); - break; - case MODE_ATHEROS_TURBO: - fi->phytype = - htonl(ieee80211_phytype_dsss_dot11_turbo); - break; - default: - fi->phytype = 0xAAAAAAAA; - break; - } - fi->channel = htonl(status->channel); - rate = ieee80211_get_rate(local, status->phymode, - status->rate); - if (rate) { - fi->datarate = htonl(rate->rate); - if (rate->flags & IEEE80211_RATE_PREAMBLE2) { - if (status->rate == rate->val) - fi->preamble = htonl(2); /* long */ - else if (status->rate == rate->val2) - fi->preamble = htonl(1); /* short */ - } else - fi->preamble = htonl(0); - } else { - fi->datarate = htonl(0); - fi->preamble = htonl(0); - } - - fi->antenna = htonl(status->antenna); - fi->priority = 0xffffffff; /* no clue */ - fi->ssi_type = htonl(ieee80211_ssi_raw); - fi->ssi_signal = htonl(status->ssi); - fi->ssi_noise = 0x00000000; - fi->encoding = 0; - } else { - fi->ssi_type = htonl(ieee80211_ssi_none); - } - - sdata->stats.rx_packets++; - sdata->stats.rx_bytes += skb->len; - - skb->mac.raw = skb->data; - skb->ip_summed = CHECKSUM_UNNECESSARY; - skb->pkt_type = PACKET_OTHERHOST; - skb->protocol = __constant_htons(ETH_P_802_2); - memset(skb->cb, 0, sizeof(skb->cb)); - netif_rx(skb); -} - - -int ieee80211_radar_status(struct net_device *dev, int channel, int radar, - int radar_type) -{ - struct sk_buff *skb; - struct ieee80211_radar_info *msg; - - skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) + - sizeof(struct ieee80211_radar_info)); - - if (skb == NULL) - return -ENOMEM; - skb_reserve(skb, sizeof(struct ieee80211_frame_info)); - - msg = (struct ieee80211_radar_info *) - skb_put(skb, sizeof(struct ieee80211_radar_info)); - msg->channel = channel; - msg->radar = radar; - msg->radar_type = radar_type; - - ieee80211_rx_mgmt(dev, skb, 0, ieee80211_msg_radar); - return 0; -} - - -int ieee80211_set_aid_for_sta(struct net_device *dev, u8 *peer_address, - u16 aid) -{ - struct sk_buff *skb; - struct ieee80211_msg_set_aid_for_sta *msg; - - skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) + - sizeof(struct ieee80211_msg_set_aid_for_sta)); - - if (skb == NULL) - return -ENOMEM; - skb_reserve(skb, sizeof(struct ieee80211_frame_info)); - - msg = (struct ieee80211_msg_set_aid_for_sta *) - skb_put(skb, sizeof(struct ieee80211_msg_set_aid_for_sta)); - memcpy(msg->sta_address, peer_address, ETH_ALEN); - msg->aid = aid; - - ieee80211_rx_mgmt(dev, skb, 0, ieee80211_msg_set_aid_for_sta); - return 0; -} - - -static void ap_sta_ps_start(struct net_device *dev, struct sta_info *sta) -{ - struct ieee80211_sub_if_data *sdata; - sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); - - if (sdata->bss) - atomic_inc(&sdata->bss->num_sta_ps); - sta->flags |= WLAN_STA_PS; - sta->pspoll = 0; -#ifdef IEEE80211_VERBOSE_DEBUG_PS - printk(KERN_DEBUG "%s: STA " MACSTR " aid %d enters power " - "save mode\n", dev->name, MAC2STR(sta->addr), sta->aid); -#endif /* IEEE80211_VERBOSE_DEBUG_PS */ -} - - -static int ap_sta_ps_end(struct net_device *dev, struct sta_info *sta) -{ - struct ieee80211_local *local = dev->priv; - struct sk_buff *skb; - int sent = 0; - struct ieee80211_sub_if_data *sdata; - struct ieee80211_tx_packet_data *pkt_data; - - sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); - if (sdata->bss) - atomic_dec(&sdata->bss->num_sta_ps); - sta->flags &= ~(WLAN_STA_PS | WLAN_STA_TIM); - sta->pspoll = 0; - if (!skb_queue_empty(&sta->ps_tx_buf) && local->hw->set_tim) - local->hw->set_tim(dev, sta->aid, 0); -#ifdef IEEE80211_VERBOSE_DEBUG_PS - printk(KERN_DEBUG "%s: STA " MACSTR " aid %d exits power " - "save mode\n", dev->name, MAC2STR(sta->addr), sta->aid); -#endif /* IEEE80211_VERBOSE_DEBUG_PS */ - /* Send all buffered frames to the station */ - while ((skb = skb_dequeue(&sta->tx_filtered)) != NULL) { - pkt_data = (struct ieee80211_tx_packet_data *) skb->cb; - sent++; - pkt_data->control.requeue = 1; - dev_queue_xmit(skb); - } - while ((skb = skb_dequeue(&sta->ps_tx_buf)) != NULL) { - pkt_data = (struct ieee80211_tx_packet_data *) skb->cb; - local->total_ps_buffered--; - sent++; -#ifdef IEEE80211_VERBOSE_DEBUG_PS - printk(KERN_DEBUG "%s: STA " MACSTR " aid %d send PS frame " - "since STA not sleeping anymore\n", dev->name, - MAC2STR(sta->addr), sta->aid); -#endif /* IEEE80211_VERBOSE_DEBUG_PS */ - pkt_data->control.requeue = 1; - dev_queue_xmit(skb); - } - - return sent; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx) -{ - struct sk_buff *skb; - int no_pending_pkts; - - if (likely(!rx->sta || WLAN_FC_GET_TYPE(rx->fc) != WLAN_FC_TYPE_CTRL || - WLAN_FC_GET_STYPE(rx->fc) != WLAN_FC_STYPE_PSPOLL)) - return TXRX_CONTINUE; - - skb = skb_dequeue(&rx->sta->tx_filtered); - if (skb == NULL) { - skb = skb_dequeue(&rx->sta->ps_tx_buf); - if (skb) - rx->local->total_ps_buffered--; - } - no_pending_pkts = skb_queue_empty(&rx->sta->tx_filtered) && - skb_queue_empty(&rx->sta->ps_tx_buf); - - if (skb) { - struct ieee80211_hdr *hdr = - (struct ieee80211_hdr *) skb->data; - - /* tell TX path to send one frame even though the STA may - * still remain is PS mode after this frame exchange */ - rx->sta->pspoll = 1; - -#ifdef IEEE80211_VERBOSE_DEBUG_PS - printk(KERN_DEBUG "STA " MACSTR " aid %d: PS Poll (entries " - "after %d)\n", - MAC2STR(rx->sta->addr), rx->sta->aid, - skb_queue_len(&rx->sta->ps_tx_buf)); -#endif /* IEEE80211_VERBOSE_DEBUG_PS */ - - /* Use MoreData flag to indicate whether there are more - * buffered frames for this STA */ - if (no_pending_pkts) { - hdr->frame_control &= cpu_to_le16(~WLAN_FC_MOREDATA); - rx->sta->flags &= ~WLAN_STA_TIM; - } else - hdr->frame_control |= cpu_to_le16(WLAN_FC_MOREDATA); - - dev_queue_xmit(skb); - - if (no_pending_pkts && rx->local->hw->set_tim) - rx->local->hw->set_tim(rx->dev, rx->sta->aid, 0); -#ifdef IEEE80211_VERBOSE_DEBUG_PS - } else if (!rx->u.rx.sent_ps_buffered) { - printk(KERN_DEBUG "%s: STA " MACSTR " sent PS Poll even " - "though there is no buffered frames for it\n", - rx->dev->name, MAC2STR(rx->sta->addr)); -#endif /* IEEE80211_VERBOSE_DEBUG_PS */ - - } - - /* Free PS Poll skb here instead of returning TXRX_DROP that would - * count as an dropped frame. */ - dev_kfree_skb(rx->skb); - - return TXRX_QUEUED; -} - - -static inline struct ieee80211_fragment_entry * -ieee80211_reassemble_add(struct ieee80211_local *local, - unsigned int frag, unsigned int seq, int rx_queue, - struct sk_buff **skb) -{ - struct ieee80211_fragment_entry *entry; - int idx; - - idx = local->fragment_next; - entry = &local->fragments[local->fragment_next++]; - if (local->fragment_next >= IEEE80211_FRAGMENT_MAX) - local->fragment_next = 0; - - if (entry->skb) { -#ifdef CONFIG_IEEE80211_DEBUG - struct ieee80211_hdr *hdr = - (struct ieee80211_hdr *) entry->skb->data; - printk(KERN_DEBUG "%s: RX reassembly removed oldest " - "fragment entry (idx=%d age=%lu seq=%d last_frag=%d " - "addr1=" MACSTR " addr2=" MACSTR "\n", - local->mdev->name, idx, - jiffies - entry->first_frag_time, entry->seq, - entry->last_frag, MAC2STR(hdr->addr1), - MAC2STR(hdr->addr2)); -#endif /* CONFIG_IEEE80211_DEBUG */ - dev_kfree_skb(entry->skb); - } - - entry->skb = *skb; - *skb = NULL; - entry->first_frag_time = jiffies; - entry->seq = seq; - entry->rx_queue = rx_queue; - entry->last_frag = frag; - entry->ccmp = 0; - - return entry; -} - - -static inline struct ieee80211_fragment_entry * -ieee80211_reassemble_find(struct ieee80211_local *local, - u16 fc, unsigned int frag, unsigned int seq, - int rx_queue, struct ieee80211_hdr *hdr) -{ - struct ieee80211_fragment_entry *entry; - int i, idx; - - idx = local->fragment_next; - for (i = 0; i < IEEE80211_FRAGMENT_MAX; i++) { - struct ieee80211_hdr *f_hdr; - u16 f_fc; - - idx--; - if (idx < 0) - idx = IEEE80211_FRAGMENT_MAX - 1; - - entry = &local->fragments[idx]; - if (!entry->skb || entry->seq != seq || - entry->rx_queue != rx_queue || - entry->last_frag + 1 != frag) - continue; - - f_hdr = (struct ieee80211_hdr *) entry->skb->data; - f_fc = le16_to_cpu(f_hdr->frame_control); - - if (WLAN_FC_GET_TYPE(fc) != WLAN_FC_GET_TYPE(f_fc) || - memcmp(hdr->addr1, f_hdr->addr1, ETH_ALEN) != 0 || - memcmp(hdr->addr2, f_hdr->addr2, ETH_ALEN) != 0) - continue; - - if (entry->first_frag_time + 2 * HZ < jiffies) { - dev_kfree_skb(entry->skb); - entry->skb = NULL; - continue; - } - return entry; - } - - return NULL; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_defragment(struct ieee80211_txrx_data *rx) -{ - struct ieee80211_hdr *hdr; - u16 sc; - unsigned int frag, seq; - struct ieee80211_fragment_entry *entry; - - hdr = (struct ieee80211_hdr *) rx->skb->data; - sc = le16_to_cpu(hdr->seq_ctrl); - frag = WLAN_GET_SEQ_FRAG(sc); - - if (likely((!(rx->fc & WLAN_FC_MOREFRAG) && frag == 0) || - (rx->skb)->len < 24 || MULTICAST_ADDR(hdr->addr1))) { - /* not fragmented */ - goto out; - } - I802_DEBUG_INC(rx->local->rx_handlers_fragments); - - seq = WLAN_GET_SEQ_SEQ(sc); - - if (frag == 0) { - /* This is the first fragment of a new frame. */ - entry = ieee80211_reassemble_add(rx->local, frag, seq, - rx->u.rx.queue, &(rx->skb)); - if (rx->key && rx->key->alg == ALG_CCMP && - (rx->fc & WLAN_FC_ISWEP)) { - /* Store CCMP PN so that we can verify that the next - * fragment has a sequential PN value. */ - entry->ccmp = 1; - memcpy(entry->last_pn, - rx->key->u.ccmp.rx_pn[rx->u.rx.queue], - CCMP_PN_LEN); - } - return TXRX_QUEUED; - } - - /* This is a fragment for a frame that should already be pending in - * fragment cache. Add this fragment to the end of the pending entry. - */ - entry = ieee80211_reassemble_find(rx->local, rx->fc, frag, seq, - rx->u.rx.queue, hdr); - if (!entry) { - I802_DEBUG_INC(rx->local->rx_handlers_drop_defrag); - return TXRX_DROP; - } - - /* Verify that MPDUs within one MSDU have sequential PN values. - * (IEEE 802.11i, 8.3.3.4.5) */ - if (entry->ccmp) { - int i; - u8 pn[CCMP_PN_LEN], *rpn; - if (rx->key == NULL || rx->key->alg != ALG_CCMP) - return TXRX_DROP; - memcpy(pn, entry->last_pn, CCMP_PN_LEN); - for (i = CCMP_PN_LEN - 1; i >= 0; i--) { - pn[i]++; - if (pn[i]) - break; - } - rpn = rx->key->u.ccmp.rx_pn[rx->u.rx.queue]; - if (memcmp(pn, rpn, CCMP_PN_LEN) != 0) { - printk(KERN_DEBUG "%s: defrag: CCMP PN not sequential" - " A2=" MACSTR " PN=%02x%02x%02x%02x%02x%02x " - "(expected %02x%02x%02x%02x%02x%02x)\n", - rx->dev->name, MAC2STR(hdr->addr2), - rpn[0], rpn[1], rpn[2], rpn[3], rpn[4], rpn[5], - pn[0], pn[1], pn[2], pn[3], pn[4], pn[5]); - return TXRX_DROP; - } - memcpy(entry->last_pn, pn, CCMP_PN_LEN); - } - - /* TODO: could gather list of skb's and reallocate data buffer only - * after finding out the total length of the frame */ - skb_pull(rx->skb, ieee80211_get_hdrlen(rx->fc)); - if (skb_tailroom(entry->skb) < rx->skb->len) { - I802_DEBUG_INC(rx->local->rx_expand_skb_head2); - if (unlikely(pskb_expand_head(entry->skb, 0, rx->skb->len, - GFP_ATOMIC))) { - I802_DEBUG_INC(rx->local->rx_handlers_drop_defrag); - return TXRX_DROP; - } - } - memcpy(skb_put(entry->skb, rx->skb->len), rx->skb->data, rx->skb->len); - entry->last_frag = frag; - dev_kfree_skb(rx->skb); - - if (rx->fc & WLAN_FC_MOREFRAG) { - rx->skb = NULL; - return TXRX_QUEUED; - } - - /* Complete frame has been reassembled - process it now */ - rx->skb = entry->skb; - rx->fragmented = 1; - entry->skb = NULL; - - out: - if (rx->sta) - rx->sta->rx_packets++; - if (MULTICAST_ADDR(hdr->addr1)) - rx->local->dot11MulticastReceivedFrameCount++; -#ifdef IEEE80211_LEDS - else - ieee80211_rx_led(2, rx->dev); -#endif /* IEEE80211_LEDS */ - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_monitor(struct ieee80211_txrx_data *rx) -{ - if (rx->local->conf.mode == IW_MODE_MONITOR) { - ieee80211_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status, - ieee80211_msg_monitor); - return TXRX_QUEUED; - } - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_check(struct ieee80211_txrx_data *rx) -{ - struct ieee80211_hdr *hdr; - int always_sta_key; - hdr = (struct ieee80211_hdr *) rx->skb->data; - - /* Drop duplicate 802.11 retransmissions (IEEE 802.11 Chap. 9.2.9) */ - if (rx->sta && !MULTICAST_ADDR(hdr->addr1)) { - if (unlikely(rx->fc & WLAN_FC_RETRY && - rx->sta->last_seq_ctrl[rx->u.rx.queue] == - hdr->seq_ctrl)) { - rx->local->dot11FrameDuplicateCount++; - rx->sta->num_duplicates++; - return TXRX_DROP; - } else - rx->sta->last_seq_ctrl[rx->u.rx.queue] = hdr->seq_ctrl; - } - - if (rx->local->hw->rx_includes_fcs && rx->skb->len > FCS_LEN) - skb_trim(rx->skb, rx->skb->len - FCS_LEN); - - if (unlikely(rx->skb->len < 16)) { - I802_DEBUG_INC(rx->local->rx_handlers_drop_short); - return TXRX_DROP; - } - - /* Filter out foreign unicast packets when in promiscuous mode. - * FIX: Filter out multicast to foreign BSSID. */ - if (rx->local->conf.mode == IW_MODE_INFRA && - !MULTICAST_ADDR(hdr->addr1) && - !ieee80211_own_addr(rx->dev, hdr->addr1)) - return TXRX_DROP; - - /* Drop disallowed frame classes based on STA auth/assoc state; - * IEEE 802.11, Chap 5.5. - * - * 80211.o does filtering only based on association state, i.e., it - * drops Class 3 frames from not associated stations. hostapd sends - * deauth/disassoc frames when needed. In addition, hostapd is - * responsible for filtering on both auth and assoc states. - */ - if (unlikely((WLAN_FC_GET_TYPE(rx->fc) == WLAN_FC_TYPE_DATA || - (WLAN_FC_GET_TYPE(rx->fc) == WLAN_FC_TYPE_CTRL && - WLAN_FC_GET_STYPE(rx->fc) == WLAN_FC_STYPE_PSPOLL)) && - rx->local->conf.mode != IW_MODE_ADHOC && - (!rx->sta || !(rx->sta->flags & WLAN_STA_ASSOC)))) { - if (!(rx->fc & WLAN_FC_FROMDS) && !(rx->fc & WLAN_FC_TODS)) { - /* Drop IBSS frames silently. */ - return TXRX_DROP; - } - - ieee80211_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status, - ieee80211_msg_sta_not_assoc); - return TXRX_QUEUED; - } - - if (rx->local->conf.mode == IW_MODE_INFRA) - always_sta_key = 0; - else - always_sta_key = 1; - - if (rx->sta && rx->sta->key && always_sta_key) { - rx->key = rx->sta->key; - } else { - if (!rx->sdata) { - printk(KERN_DEBUG "%s: sdata was null in packet!!\n", - rx->dev->name); - printk(KERN_DEBUG "%s: Addr1: " MACSTR "\n", - rx->dev->name, MAC2STR(hdr->addr1)); - printk(KERN_DEBUG "%s: Addr2: " MACSTR "\n", - rx->dev->name, MAC2STR(hdr->addr2)); - printk(KERN_DEBUG "%s: Addr3: " MACSTR "\n", - rx->dev->name, MAC2STR(hdr->addr3)); - return TXRX_DROP; - } - if (rx->sta && rx->sta->key) - rx->key = rx->sta->key; - else - rx->key = rx->sdata->default_key; - - if (rx->local->hw->wep_include_iv && - rx->fc & WLAN_FC_ISWEP) { - int keyidx = ieee80211_wep_get_keyidx(rx->skb); - - if (keyidx >= 0 && keyidx < NUM_DEFAULT_KEYS && - (rx->sta == NULL || rx->sta->key == NULL || - keyidx > 0)) { - rx->key = rx->sdata->keys[keyidx]; - } - if (!rx->key) { - printk(KERN_DEBUG "%s: RX WEP frame with " - "unknown keyidx %d (A1=" MACSTR " A2=" - MACSTR " A3=" MACSTR ")\n", - rx->dev->name, keyidx, - MAC2STR(hdr->addr1), - MAC2STR(hdr->addr2), - MAC2STR(hdr->addr3)); - ieee80211_rx_mgmt( - rx->dev, rx->skb, rx->u.rx.status, - ieee80211_msg_wep_frame_unknown_key); - return TXRX_QUEUED; - } - } - } - - if (rx->fc & WLAN_FC_ISWEP && rx->key) { - rx->key->tx_rx_count++; - if (unlikely(rx->local->key_tx_rx_threshold && - rx->key->tx_rx_count > - rx->local->key_tx_rx_threshold)) { - ieee80211_key_threshold_notify(rx->dev, rx->key, - rx->sta); - } - } - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_sta_process(struct ieee80211_txrx_data *rx) -{ - struct sta_info *sta = rx->sta; - struct net_device *dev = rx->dev; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data; - - if (!sta) - return TXRX_CONTINUE; - - /* Update last_rx only for IBSS packets which are for the current - * BSSID to avoid keeping the current IBSS network alive in cases where - * other STAs are using different BSSID. */ - if (rx->local->conf.mode == IW_MODE_ADHOC) { - u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len); - if (memcmp(bssid, rx->local->bssid, ETH_ALEN) == 0) - sta->last_rx = jiffies; - } else - if (!MULTICAST_ADDR(hdr->addr1) || - rx->local->conf.mode == IW_MODE_INFRA) { - /* Update last_rx only for unicast frames in order to prevent - * the Probe Request frames (the only broadcast frames from a - * STA in infrastructure mode) from keeping a connection alive. - */ - sta->last_rx = jiffies; - } - sta->rx_fragments++; - sta->rx_bytes += rx->skb->len; - sta->last_rssi = rx->u.rx.status->ssi; - - if (!(rx->fc & WLAN_FC_MOREFRAG)) { - /* Change STA power saving mode only in the end of a frame - * exchange sequence */ - if ((sta->flags & WLAN_STA_PS) && !(rx->fc & WLAN_FC_PWRMGT)) - rx->u.rx.sent_ps_buffered += ap_sta_ps_end(dev, sta); - else if (!(sta->flags & WLAN_STA_PS) && - (rx->fc & WLAN_FC_PWRMGT)) - ap_sta_ps_start(dev, sta); - } - - /* Drop data::nullfunc frames silently, since they are used only to - * control station power saving mode. */ - if (WLAN_FC_GET_TYPE(rx->fc) == WLAN_FC_TYPE_DATA && - WLAN_FC_GET_STYPE(rx->fc) == WLAN_FC_STYPE_NULLFUNC) { - I802_DEBUG_INC(rx->local->rx_handlers_drop_nullfunc); - /* Update counter and free packet here to avoid counting this - * as a dropped packed. */ - sta->rx_packets++; - dev_kfree_skb(rx->skb); - return TXRX_QUEUED; - } - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_wep_weak_iv_detection(struct ieee80211_txrx_data *rx) -{ - if (!rx->sta || !(rx->fc & WLAN_FC_ISWEP) || - WLAN_FC_GET_TYPE(rx->fc) != WLAN_FC_TYPE_DATA || !rx->key || - rx->key->alg != ALG_WEP) - return TXRX_CONTINUE; - - /* Check for weak IVs, if hwaccel did not remove IV from the frame */ - if (rx->local->hw->wep_include_iv || - rx->key->force_sw_encrypt || rx->local->conf.sw_decrypt) { - u8 *iv = ieee80211_wep_is_weak_iv(rx->skb, rx->key); - if (iv) { - rx->sta->wep_weak_iv_count++; - } - } - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_wep_decrypt(struct ieee80211_txrx_data *rx) -{ - /* If the device handles decryption totally, skip this test */ - if (rx->local->hw->device_hides_wep) - return TXRX_CONTINUE; - - if ((rx->key && rx->key->alg != ALG_WEP) || - !(rx->fc & WLAN_FC_ISWEP) || - (WLAN_FC_GET_TYPE(rx->fc) != WLAN_FC_TYPE_DATA && - (WLAN_FC_GET_TYPE(rx->fc) != WLAN_FC_TYPE_MGMT || - WLAN_FC_GET_STYPE(rx->fc) != WLAN_FC_STYPE_AUTH))) - return TXRX_CONTINUE; - - if (!rx->key) { - printk(KERN_DEBUG "%s: RX WEP frame, but no key set\n", - rx->dev->name); - return TXRX_DROP; - } - - if (!(rx->u.rx.status->flag & RX_FLAG_DECRYPTED) || - rx->key->force_sw_encrypt || rx->local->conf.sw_decrypt) { - if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) { - printk(KERN_DEBUG "%s: RX WEP frame, decrypt " - "failed\n", rx->dev->name); - return TXRX_DROP; - } - } else if (rx->local->hw->wep_include_iv) { - ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key); - /* remove ICV */ - skb_trim(rx->skb, rx->skb->len - 4); - } - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_802_1x_pae(struct ieee80211_txrx_data *rx) -{ - if (rx->sdata->eapol && ieee80211_is_eapol(rx->skb) && - rx->local->conf.mode != IW_MODE_INFRA) { - /* Pass both encrypted and unencrypted EAPOL frames to user - * space for processing. */ - ieee80211_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status, - ieee80211_msg_normal); - return TXRX_QUEUED; - } - - if (unlikely(rx->sdata->ieee802_1x && - WLAN_FC_GET_TYPE(rx->fc) == WLAN_FC_TYPE_DATA && - WLAN_FC_GET_STYPE(rx->fc) != WLAN_FC_STYPE_NULLFUNC && - (!rx->sta || !(rx->sta->flags & WLAN_STA_AUTHORIZED)) && - !ieee80211_is_eapol(rx->skb))) { -#ifdef CONFIG_IEEE80211_DEBUG - struct ieee80211_hdr *hdr = - (struct ieee80211_hdr *) rx->skb->data; - printk(KERN_DEBUG "%s: dropped frame from " MACSTR - " (unauthorized port)\n", rx->dev->name, - MAC2STR(hdr->addr2)); -#endif /* CONFIG_IEEE80211_DEBUG */ - return TXRX_DROP; - } - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_drop_unencrypted(struct ieee80211_txrx_data *rx) -{ - /* If the device handles decryption totally, skip this test */ - if (rx->local->hw->device_hides_wep) - return TXRX_CONTINUE; - - /* Drop unencrypted frames if key is set. */ - if (unlikely(!(rx->fc & WLAN_FC_ISWEP) && - WLAN_FC_GET_TYPE(rx->fc) == WLAN_FC_TYPE_DATA && - WLAN_FC_GET_STYPE(rx->fc) != WLAN_FC_STYPE_NULLFUNC && - (rx->key || rx->sdata->drop_unencrypted) && - (rx->sdata->eapol == 0 || - !ieee80211_is_eapol(rx->skb)))) { - printk(KERN_DEBUG "%s: RX non-WEP frame, but expected " - "encryption\n", rx->dev->name); - return TXRX_DROP; - } - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_mgmt(struct ieee80211_txrx_data *rx) -{ - struct ieee80211_sub_if_data *sdata; - sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - ieee80211_sta_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status); - } else { - /* Management frames are sent to hostapd for processing */ - ieee80211_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status, - ieee80211_msg_normal); - } - return TXRX_QUEUED; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_passive_scan(struct ieee80211_txrx_data *rx) -{ - struct ieee80211_local *local = rx->local; - struct sk_buff *skb = rx->skb; - - if (unlikely(local->sta_scanning != 0)) { - ieee80211_sta_rx_scan(rx->dev, skb, rx->u.rx.status); - return TXRX_QUEUED; - } - - if (WLAN_FC_GET_TYPE(rx->fc) == WLAN_FC_TYPE_DATA) - local->scan.txrx_count++; - if (unlikely(local->scan.in_scan != 0 && - rx->u.rx.status->freq == local->scan.freq)) { - struct ieee80211_hdr *hdr; - u16 fc; - - local->scan.rx_packets++; - - hdr = (struct ieee80211_hdr *) skb->data; - fc = le16_to_cpu(hdr->frame_control); - - if (WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT && - WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_BEACON) { - local->scan.rx_beacon++; - /* Need to trim FCS here because it is normally - * removed only after this passive scan handler. */ - if (rx->local->hw->rx_includes_fcs && - rx->skb->len > FCS_LEN) - skb_trim(rx->skb, rx->skb->len - FCS_LEN); - - ieee80211_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status, - ieee80211_msg_passive_scan); - return TXRX_QUEUED; - } else { - I802_DEBUG_INC(local->rx_handlers_drop_passive_scan); - return TXRX_DROP; - } - } - - return TXRX_CONTINUE; -} - - -static u8 * ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len) -{ - u16 fc; - - if (len < 24) - return NULL; - - fc = le16_to_cpu(hdr->frame_control); - - switch (WLAN_FC_GET_TYPE(fc)) { - case WLAN_FC_TYPE_DATA: - switch (fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) { - case WLAN_FC_TODS: - return hdr->addr1; - case (WLAN_FC_TODS | WLAN_FC_FROMDS): - return NULL; - case WLAN_FC_FROMDS: - return hdr->addr2; - case 0: - return hdr->addr3; - } - break; - case WLAN_FC_TYPE_MGMT: - return hdr->addr3; - case WLAN_FC_TYPE_CTRL: - if (WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_PSPOLL) - return hdr->addr1; - else - return NULL; - } - - return NULL; -} - - -static struct net_device * ieee80211_get_rx_dev(struct ieee80211_local *local, - struct ieee80211_hdr *hdr, - size_t len, int *sta_broadcast) -{ - u8 *bssid; - struct net_device *dev; - u16 fc; - - bssid = ieee80211_get_bssid(hdr, len); - if (bssid) { - dev = ieee80211_own_bssid(local, bssid); - if (!dev && (local->conf.mode == IW_MODE_INFRA || - local->conf.mode == IW_MODE_ADHOC)) - dev = ieee80211_sta_bssid(local, bssid, hdr->addr1, - sta_broadcast); - if (dev) - return dev; - } - - if (len >= 30) { - fc = le16_to_cpu(hdr->frame_control); - if (WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA && - (fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == - (WLAN_FC_TODS | WLAN_FC_FROMDS)) { - dev = ieee80211_get_wds_dev(local, hdr->addr2); - if (dev) - return dev; - } - } - - /* Default to default device if nothing else matches */ - return local->wdev; -} - - -static void ieee80211_rx_michael_mic_report(struct net_device *dev, - struct ieee80211_hdr *hdr, - struct sta_info *sta, - struct ieee80211_txrx_data *rx) -{ - int keyidx, hdrlen; - - hdrlen = ieee80211_get_hdrlen_from_skb(rx->skb); - if (rx->skb->len >= hdrlen + 4) - keyidx = rx->skb->data[hdrlen + 3] >> 6; - else - keyidx = -1; - - /* TODO: verify that this is not triggered by fragmented - * frames (hw does not verify MIC for them). */ - printk(KERN_DEBUG "%s: TKIP hwaccel reported Michael MIC " - "failure from " MACSTR " to " MACSTR " keyidx=%d\n", - dev->name, MAC2STR(hdr->addr2), MAC2STR(hdr->addr1), keyidx); - - if (sta == NULL) { - /* Some hardware versions seem to generate incorrect - * Michael MIC reports; ignore them to avoid triggering - * countermeasures. */ - printk(KERN_DEBUG "%s: ignored spurious Michael MIC " - "error for unknown address " MACSTR "\n", - dev->name, MAC2STR(hdr->addr2)); - goto ignore; - } - - if (!(rx->fc & WLAN_FC_ISWEP)) { - printk(KERN_DEBUG "%s: ignored spurious Michael MIC " - "error for a frame with no ISWEP flag (src " - MACSTR ")\n", dev->name, MAC2STR(hdr->addr2)); - goto ignore; - } - - if (rx->local->hw->wep_include_iv && - rx->local->conf.mode == IW_MODE_MASTER) { - int keyidx = ieee80211_wep_get_keyidx(rx->skb); - /* AP with Pairwise keys support should never receive Michael - * MIC errors for non-zero keyidx because these are reserved - * for group keys and only the AP is sending real multicast - * frames in BSS. */ - if (keyidx) { - printk(KERN_DEBUG "%s: ignored Michael MIC error for " - "a frame with non-zero keyidx (%d) (src " MACSTR - ")\n", dev->name, keyidx, MAC2STR(hdr->addr2)); - goto ignore; - } - } - - if (WLAN_FC_GET_TYPE(rx->fc) != WLAN_FC_TYPE_DATA && - (WLAN_FC_GET_TYPE(rx->fc) != WLAN_FC_TYPE_MGMT || - WLAN_FC_GET_STYPE(rx->fc) != WLAN_FC_STYPE_AUTH)) { - printk(KERN_DEBUG "%s: ignored spurious Michael MIC " - "error for a frame that cannot be encrypted " - "(fc=0x%04x) (src " MACSTR ")\n", - dev->name, rx->fc, MAC2STR(hdr->addr2)); - goto ignore; - } - - do { - union iwreq_data wrqu; - char *buf = kmalloc(128, GFP_ATOMIC); - if (buf == NULL) - break; - - /* TODO: needed parameters: count, key type, TSC */ - sprintf(buf, "MLME-MICHAELMICFAILURE.indication(" - "keyid=%d %scast addr=" MACSTR ")", - keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni", - MAC2STR(hdr->addr2)); - memset(&wrqu, 0, sizeof(wrqu)); - wrqu.data.length = strlen(buf); - wireless_send_event(rx->dev, IWEVCUSTOM, &wrqu, buf); - kfree(buf); - } while (0); - - /* TODO: consider verifying the MIC error report with software - * implementation if we get too many spurious reports from the - * hardware. */ - ieee80211_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status, - ieee80211_msg_michael_mic_failure); - return; - - ignore: - dev_kfree_skb(rx->skb); - rx->skb = NULL; -} - - -static void ieee80211_sta_rx_broadcast(struct ieee80211_txrx_data *rx) -{ - struct ieee80211_local *local = rx->dev->priv; - u8 *_bssid, bssid[ETH_ALEN]; - struct sk_buff *orig_skb = rx->skb, *skb; - struct ieee80211_hdr *hdr; - ieee80211_rx_handler *handler; - ieee80211_txrx_result res; - struct list_head *ptr; - - hdr = (struct ieee80211_hdr *) orig_skb->data; - _bssid = ieee80211_get_bssid(hdr, orig_skb->len); - if (_bssid == NULL) { - dev_kfree_skb(orig_skb); - return; - } - memcpy(bssid, _bssid, ETH_ALEN); - - list_for_each(ptr, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA || - (memcmp(bssid, sdata->u.sta.bssid, ETH_ALEN) != 0 && - !(bssid[0] & 0x01))) - continue; - - skb = skb_copy(orig_skb, GFP_ATOMIC); - if (skb == NULL) { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: failed to copy " - "multicast frame for %s", - rx->dev->name, sdata->dev->name); - } - continue; - } - - hdr = (struct ieee80211_hdr *) skb->data; - rx->skb = skb; - rx->dev = sdata->dev; - rx->sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); - - res = TXRX_DROP; - for (handler = local->rx_handlers; *handler != NULL; handler++) - { - res = (*handler)(rx); - if (res == TXRX_DROP || res == TXRX_QUEUED) - break; - } - - if (res == TXRX_DROP || *handler == NULL) - dev_kfree_skb(skb); - } - - dev_kfree_skb(orig_skb); -} - - -/* - * This is the receive path handler. It is called by a low level driver when an - * 802.11 MPDU is received from the hardware. - */ -void ieee80211_rx(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *status) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - struct ieee80211_hdr *hdr; - ieee80211_rx_handler *handler; - struct ieee80211_txrx_data rx; - ieee80211_txrx_result res = TXRX_DROP; - u16 type; - int sta_broadcast = 0; - - hdr = (struct ieee80211_hdr *) skb->data; - memset(&rx, 0, sizeof(rx)); - rx.skb = skb; - rx.local = local; - if (skb->len >= 16) { - sta = rx.sta = sta_info_get(local, hdr->addr2); - if (unlikely(sta == NULL && - local->conf.mode == IW_MODE_ADHOC)) { - u8 *bssid = ieee80211_get_bssid(hdr, skb->len); - if (bssid && - memcmp(bssid, local->bssid, ETH_ALEN) == 0) - sta = rx.sta = - ieee80211_ibss_add_sta(dev, skb, bssid, - hdr->addr2); - } - } else - sta = rx.sta = NULL; - if (sta && !sta->assoc_ap && !(sta->flags & WLAN_STA_WDS)) - rx.dev = sta->dev; - else - rx.dev = ieee80211_get_rx_dev(local, hdr, skb->len, - &sta_broadcast); - - rx.sdata = IEEE80211_DEV_TO_SUB_IF(rx.dev); - rx.u.rx.status = status; - rx.fc = skb->len >= 2 ? le16_to_cpu(hdr->frame_control) : 0; - type = WLAN_FC_GET_TYPE(rx.fc); - if (type == WLAN_FC_TYPE_DATA || type == WLAN_FC_TYPE_MGMT) - local->dot11ReceivedFragmentCount++; - if (sta_broadcast) { - ieee80211_sta_rx_broadcast(&rx); - goto end; - } - - if ((status->flag & RX_FLAG_MMIC_ERROR)) { - ieee80211_rx_michael_mic_report(dev, hdr, sta, &rx); - goto end; - } - - for (handler = local->rx_handlers; *handler != NULL; handler++) { - res = (*handler)(&rx); - if (res != TXRX_CONTINUE) { - if (res == TXRX_DROP) { - I802_DEBUG_INC(local->rx_handlers_drop); - if (sta) - sta->rx_dropped++; - } - if (res == TXRX_QUEUED) - I802_DEBUG_INC(local->rx_handlers_queued); - break; - } - } - - if (res == TXRX_DROP || *handler == NULL) - dev_kfree_skb(skb); - - end: - if (sta) - sta_info_release(local, sta); -} - - -static ieee80211_txrx_result -ieee80211_tx_h_load_stats(struct ieee80211_txrx_data *tx) -{ - struct ieee80211_local *local = tx->local; - struct sk_buff *skb = tx->skb; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u32 load = 0, hdrtime; - - /* TODO: this could be part of tx_status handling, so that the number - * of retries would be known; TX rate should in that case be stored - * somewhere with the packet */ - - /* Estimate total channel use caused by this frame */ - - /* 1 bit at 1 Mbit/s takes 1 usec; in channel_use values, - * 1 usec = 1/8 * (1080 / 10) = 13.5 */ - - if (local->conf.phymode == MODE_IEEE80211A || - local->conf.phymode == MODE_ATHEROS_TURBO || - local->conf.phymode == MODE_ATHEROS_TURBOG || - (local->conf.phymode == MODE_IEEE80211G && - tx->u.tx.rate->flags & IEEE80211_RATE_ERP)) - hdrtime = CHAN_UTIL_HDR_SHORT; - else - hdrtime = CHAN_UTIL_HDR_LONG; - - load = hdrtime; - if (!MULTICAST_ADDR(hdr->addr1)) - load += hdrtime; - - if (tx->u.tx.control->use_rts_cts) - load += 2 * hdrtime; - else if (tx->u.tx.control->use_cts_protect) - load += hdrtime; - - load += skb->len * tx->u.tx.rate->rate_inv; - - if (tx->u.tx.extra_frag) { - int i; - for (i = 0; i < tx->u.tx.num_extra_frag; i++) { - load += 2 * hdrtime; - load += tx->u.tx.extra_frag[i]->len * - tx->u.tx.rate->rate; - } - } - - /* Divide channel_use by 8 to avoid wrapping around the counter */ - load >>= CHAN_UTIL_SHIFT; - local->channel_use_raw += load; - if (tx->sta) - tx->sta->channel_use_raw += load; - tx->sdata->channel_use_raw += load; - - return TXRX_CONTINUE; -} - - -static ieee80211_txrx_result -ieee80211_rx_h_load_stats(struct ieee80211_txrx_data *rx) -{ - struct ieee80211_local *local = rx->local; - struct sk_buff *skb = rx->skb; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u32 load = 0, hdrtime; - struct ieee80211_rate *rate; - int i; - - /* Estimate total channel use caused by this frame */ - - if (unlikely(local->num_curr_rates < 0)) - return TXRX_CONTINUE; - - rate = &local->curr_rates[0]; - for (i = 0; i < local->num_curr_rates; i++) { - if (local->curr_rates[i].val == rx->u.rx.status->rate) { - rate = &local->curr_rates[i]; - break; - } - } - - /* 1 bit at 1 Mbit/s takes 1 usec; in channel_use values, - * 1 usec = 1/8 * (1080 / 10) = 13.5 */ - - if (local->conf.phymode == MODE_IEEE80211A || - local->conf.phymode == MODE_ATHEROS_TURBO || - local->conf.phymode == MODE_ATHEROS_TURBOG || - (local->conf.phymode == MODE_IEEE80211G && - rate->flags & IEEE80211_RATE_ERP)) - hdrtime = CHAN_UTIL_HDR_SHORT; - else - hdrtime = CHAN_UTIL_HDR_LONG; - - load = hdrtime; - if (!MULTICAST_ADDR(hdr->addr1)) - load += hdrtime; - - load += skb->len * rate->rate_inv; - - /* Divide channel_use by 8 to avoid wrapping around the counter */ - load >>= CHAN_UTIL_SHIFT; - local->channel_use_raw += load; - if (rx->sta) - rx->sta->channel_use_raw += load; - rx->sdata->channel_use_raw += load; - - return TXRX_CONTINUE; -} - - -static void ieee80211_stat_refresh(unsigned long data) -{ - struct ieee80211_local *local = (struct ieee80211_local *) data; - struct list_head *ptr, *n; - - if (!local->stat_time) - return; - - /* go through all stations */ - spin_lock_bh(&local->sta_lock); - list_for_each(ptr, &local->sta_list) { - struct sta_info *sta = - list_entry(ptr, struct sta_info, list); - sta->channel_use = (sta->channel_use_raw / local->stat_time) / - CHAN_UTIL_PER_10MS; - sta->channel_use_raw = 0; - } - spin_unlock_bh(&local->sta_lock); - - /* go through all subinterfaces */ - list_for_each_safe(ptr, n, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - sdata->channel_use = (sdata->channel_use_raw / - local->stat_time) / CHAN_UTIL_PER_10MS; - sdata->channel_use_raw = 0; - - } - - /* hardware interface */ - local->channel_use = (local->channel_use_raw / - local->stat_time) / CHAN_UTIL_PER_10MS; - local->channel_use_raw = 0; - - local->stat_timer.expires = jiffies + HZ * local->stat_time / 100; - add_timer(&local->stat_timer); -} - - -/* This is a version of the rx handler that can be called from hard irq - * context. Post the skb on the queue and schedule the tasklet */ -void ieee80211_rx_irqsafe(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *status) -{ - struct ieee80211_local *local = dev->priv; - - skb->dev = dev; - memcpy(skb->cb, status, sizeof(struct ieee80211_rx_status)); - skb->pkt_type = ieee80211_rx_msg; - skb_queue_tail(&local->skb_queue, skb); - tasklet_schedule(&local->tasklet); -} - - -void ieee80211_tx_status_irqsafe(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_tx_status *status) -{ - struct ieee80211_local *local = dev->priv; - int tmp; - - if (status->tx_filtered || status->excessive_retries) { - /* Need to save a copy of skb->cb somewhere. Storing it in the - * end of the data might not be the most efficient way of doing - * this (since it may require reallocation of packet data), but - * should be good enough for now since tx_filtered or - * excessive_retries should not be triggered that often. */ - if (skb_is_nonlinear(skb)) { - if (skb_linearize(skb, GFP_ATOMIC)) { - printk(KERN_DEBUG "%s: Failed to linearize " - "skb\n", dev->name); - dev_kfree_skb_irq(skb); - return; - } - } - if (skb_tailroom(skb) < sizeof(skb->cb) && - pskb_expand_head(skb, 0, sizeof(skb->cb), GFP_ATOMIC)) { - printk(KERN_DEBUG "%s: Failed to store skb->cb " - "in skb->data for TX filtered frame\n", - dev->name); - dev_kfree_skb_irq(skb); - return; - } - memcpy(skb_put(skb, sizeof(skb->cb)), skb->cb, - sizeof(skb->cb)); - } - - skb->dev = dev; - memcpy(skb->cb, status, sizeof(struct ieee80211_tx_status)); - skb->pkt_type = ieee80211_tx_status_msg; - skb_queue_tail(status->req_tx_status ? - &local->skb_queue : &local->skb_queue_unreliable, skb); - tmp = skb_queue_len(&local->skb_queue) + - skb_queue_len(&local->skb_queue_unreliable); - while (tmp > IEEE80211_IRQSAFE_QUEUE_LIMIT && - (skb = skb_dequeue(&local->skb_queue_unreliable))) { - dev_kfree_skb_irq(skb); - tmp--; - I802_DEBUG_INC(local->tx_status_drop); - } - tasklet_schedule(&local->tasklet); -} - - -static void ieee80211_tasklet_handler(unsigned long data) -{ - struct ieee80211_local *local = (struct ieee80211_local *) data; - struct sk_buff *skb; - struct ieee80211_rx_status rx_status; - struct ieee80211_tx_status tx_status; - - while ((skb = skb_dequeue(&local->skb_queue)) || - (skb = skb_dequeue(&local->skb_queue_unreliable))) { - switch (skb->pkt_type) { - case ieee80211_rx_msg: - /* Make a copy of the RX status because the original - * skb may be freed during processing. Clear skb->type - * in order to not confuse kernel netstack. */ - memcpy(&rx_status, skb->cb, sizeof(rx_status)); - skb->pkt_type = 0; - ieee80211_rx(skb->dev, skb, &rx_status); - break; - case ieee80211_tx_status_msg: - /* Make a copy of the TX status because the original - * skb may be freed during processing. */ - memcpy(&tx_status, skb->cb, sizeof(tx_status)); - skb->pkt_type = 0; - if ((tx_status.tx_filtered || - tx_status.excessive_retries) && - skb->len >= sizeof(skb->cb)) { - /* Restore skb->cb from the copy that was made - * in ieee80211_tx_status_irqsafe() */ - memcpy(skb->cb, - skb->data + skb->len - sizeof(skb->cb), - sizeof(skb->cb)); - skb_trim(skb, skb->len - sizeof(skb->cb)); - } - ieee80211_tx_status(skb->dev, skb, &tx_status); - break; - default: /* should never get here! */ - printk(KERN_ERR "%s: Unknown message type (%d)\n", - local->wdev->name, skb->pkt_type); - dev_kfree_skb(skb); - break; - } - } -} - - -/* Remove added headers (e.g., QoS control), encryption header/MIC, etc. to - * make a prepared TX frame (one that has been given to hw) to look like brand - * new IEEE 802.11 frame that is ready to go through TX processing again. */ -static void ieee80211_remove_tx_extra(struct ieee80211_local *local, - struct ieee80211_key *key, - struct sk_buff *skb) -{ - int hdrlen, iv_len, mic_len; - - if (key == NULL) - return; - - hdrlen = ieee80211_get_hdrlen_from_skb(skb); - - switch (key->alg) { - case ALG_WEP: - iv_len = WEP_IV_LEN; - mic_len = WEP_ICV_LEN; - break; - case ALG_TKIP: - iv_len = TKIP_IV_LEN; - mic_len = TKIP_ICV_LEN; - break; - case ALG_CCMP: - iv_len = CCMP_HDR_LEN; - mic_len = CCMP_MIC_LEN; - break; - default: - return; - } - - if (skb->len >= mic_len && key->force_sw_encrypt) - skb_trim(skb, skb->len - mic_len); - if (skb->len >= iv_len && skb->len > hdrlen) { - memmove(skb->data + iv_len, skb->data, hdrlen); - skb_pull(skb, iv_len); - } - - { - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u16 fc = le16_to_cpu(hdr->frame_control); - if ((fc & 0x8C) == 0x88) /* QoS Control Field */ { - fc &= ~(WLAN_FC_STYPE_QOS_DATA << 4); - hdr->frame_control = cpu_to_le16(fc); - memmove(skb->data + 2, skb->data, hdrlen - 2); - skb_pull(skb, 2); - } - } -} - - -void ieee80211_tx_status(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_tx_status *status) -{ - struct sk_buff *skb2; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - struct ieee80211_local *local = dev->priv; - struct ieee80211_tx_packet_data *pkt_data = - (struct ieee80211_tx_packet_data *) skb->cb; - u16 frag, type; - u32 msg_type; - - if (!status) { - printk(KERN_ERR - "%s: ieee80211_tx_status called with NULL status\n", - dev->name); - dev_kfree_skb(skb); - return; - } - - if (status->excessive_retries) { - struct sta_info *sta; - - - sta = sta_info_get(local, hdr->addr1); - if (sta) { - if (sta->flags & WLAN_STA_PS) { - /* The STA is in power save mode, so assume - * that this TX packet failed because of that. - */ - status->excessive_retries = 0; - status->tx_filtered = 1; - } - sta_info_release(local, sta); - } - } - - if (status->tx_filtered) { - struct sta_info *sta; - sta = sta_info_get(local, hdr->addr1); - if (sta) { - - sta->tx_filtered_count++; - - /* Clear the TX filter mask for this STA when sending - * the next packet. If the STA went to power save mode, - * this will happen when it is waking up for the next - * time. */ - sta->clear_dst_mask = 1; - - /* TODO: Is the WLAN_STA_PS flag always set here or is - * the race between RX and TX status causing some - * packets to be filtered out before 80211.o gets an - * update for PS status? This seems to be the case, so - * no changes are likely to be needed. */ - if (sta->flags & WLAN_STA_PS && - skb_queue_len(&sta->tx_filtered) < - STA_MAX_TX_BUFFER) { - ieee80211_remove_tx_extra(local, sta->key, - skb); - skb_queue_tail(&sta->tx_filtered, skb); - } else if (!(sta->flags & WLAN_STA_PS) && - !pkt_data->control.requeue) { - /* Software retry the packet once */ - pkt_data->control.requeue = 1; - ieee80211_remove_tx_extra(local, sta->key, - skb); - dev_queue_xmit(skb); - } else { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: dropped TX " - "filtered frame queue_len=%d " - "PS=%d @%lu\n", - dev->name, - skb_queue_len( - &sta->tx_filtered), - !!(sta->flags & WLAN_STA_PS), - jiffies); - } - dev_kfree_skb(skb); - } - sta_info_release(local, sta); - return; - } - } else { - rate_control_tx_status(dev, skb, status); - } - -#ifdef IEEE80211_LEDS - if (local->tx_led_counter && (local->tx_led_counter-- == 1)) { - ieee80211_tx_led(0, dev); - } -#endif /* IEEE80211_LEDS */ - /* SNMP counters - * Fragments are passed to low-level drivers as separate skbs, so these - * are actually fragments, not frames. Update frame counters only for - * the first fragment of the frame. */ - - frag = WLAN_GET_SEQ_FRAG(le16_to_cpu(hdr->seq_ctrl)); - type = WLAN_FC_GET_TYPE(le16_to_cpu(hdr->frame_control)); - - if (status->ack) { - if (frag == 0) { - local->dot11TransmittedFrameCount++; - if (MULTICAST_ADDR(hdr->addr1)) - local->dot11MulticastTransmittedFrameCount++; - if (status->retry_count > 0) - local->dot11RetryCount++; - if (status->retry_count > 1) - local->dot11MultipleRetryCount++; - } - - /* This counter shall be incremented for an acknowledged MPDU - * with an individual address in the address 1 field or an MPDU - * with a multicast address in the address 1 field of type Data - * or Management. */ - if (!MULTICAST_ADDR(hdr->addr1) || type == WLAN_FC_TYPE_DATA || - type == WLAN_FC_TYPE_MGMT) - local->dot11TransmittedFragmentCount++; - } else { - if (frag == 0) - local->dot11FailedCount++; - } - - if (!status->req_tx_status) { - dev_kfree_skb(skb); - return; - } - - msg_type = status->ack ? ieee80211_msg_tx_callback_ack : - ieee80211_msg_tx_callback_fail; - - /* skb was the original skb used for TX. Clone it and give the clone - * to netif_rx(). Free original skb. */ - skb2 = skb_copy(skb, GFP_ATOMIC); - if (!skb2) { - dev_kfree_skb(skb); - return; - } - dev_kfree_skb(skb); - skb = skb2; - - /* Send frame to hostapd */ - ieee80211_rx_mgmt(dev, skb, NULL, msg_type); -} - - -/* TODO: implement register/unregister functions for adding TX/RX handlers - * into ordered list */ - -static ieee80211_rx_handler ieee80211_rx_handlers[] = -{ - ieee80211_rx_h_parse_qos, - ieee80211_rx_h_load_stats, - ieee80211_rx_h_monitor, - ieee80211_rx_h_passive_scan, - ieee80211_rx_h_check, - ieee80211_rx_h_sta_process, - ieee80211_rx_h_ccmp_decrypt, - ieee80211_rx_h_tkip_decrypt, - ieee80211_rx_h_wep_weak_iv_detection, - ieee80211_rx_h_wep_decrypt, - ieee80211_rx_h_defragment, - ieee80211_rx_h_ieee80211_rx_h_ps_poll, - ieee80211_rx_h_michael_mic_verify, - /* this must be after decryption - so header is counted in MPDU mic - * must be before pae and data, so QOS_DATA format frames - * are not passed to user space by these functions - */ - ieee80211_rx_h_remove_qos_control, - ieee80211_rx_h_802_1x_pae, - ieee80211_rx_h_drop_unencrypted, - ieee80211_rx_h_data, - ieee80211_rx_h_mgmt, - NULL -}; - -static ieee80211_tx_handler ieee80211_tx_handlers[] = -{ - ieee80211_tx_h_rate_limit, - ieee80211_tx_h_check_assoc, - ieee80211_tx_h_ps_buf, - ieee80211_tx_h_select_key, - ieee80211_tx_h_michael_mic_add, - ieee80211_tx_h_fragment, - ieee80211_tx_h_tkip_encrypt, - ieee80211_tx_h_ccmp_encrypt, - ieee80211_tx_h_wep_encrypt, - ieee80211_tx_h_rate_ctrl, - ieee80211_tx_h_misc, - ieee80211_tx_h_load_stats, - NULL -}; - - -static void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata) -{ - /* Default values for sub-interface parameters */ - sdata->drop_unencrypted = 0; - sdata->eapol = 1; -} - - -static struct net_device *ieee80211_if_add(struct net_device *dev, - char *name, int locked) -{ - struct net_device *wds_dev = NULL, *tmp_dev; - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata = NULL, *sdata_parent; - int alloc_size; - int ret; - int i; - - /* ensure 32-bit alignment of our private data and hw private data */ - alloc_size = sizeof(struct net_device) + 3 + - sizeof(struct ieee80211_sub_if_data) + 3; - - wds_dev = (struct net_device *) kmalloc(alloc_size, GFP_KERNEL); - if (wds_dev == NULL) - return NULL; - - memset(wds_dev, 0, alloc_size); - wds_dev->priv = local; - ether_setup(wds_dev); - if (strlen(name) == 0) { - i = 0; - do { - sprintf(wds_dev->name, "%s.%d", dev->name, i++); - tmp_dev = dev_get_by_name(wds_dev->name); - if (tmp_dev == NULL) - break; - dev_put(tmp_dev); - } while (i < 10000); - } else { - snprintf(wds_dev->name, IFNAMSIZ, "%s", name); - } - - memcpy(wds_dev->dev_addr, dev->dev_addr, ETH_ALEN); - wds_dev->hard_start_xmit = ieee80211_subif_start_xmit; - wds_dev->do_ioctl = ieee80211_ioctl; - wds_dev->change_mtu = ieee80211_change_mtu; - wds_dev->tx_timeout = ieee80211_tx_timeout; - wds_dev->get_stats = ieee80211_get_stats; - wds_dev->open = ieee80211_open; - wds_dev->stop = ieee80211_stop; - wds_dev->base_addr = dev->base_addr; - wds_dev->irq = dev->irq; - wds_dev->mem_start = dev->mem_start; - wds_dev->mem_end = dev->mem_end; - wds_dev->tx_queue_len = 0; - - sdata = IEEE80211_DEV_TO_SUB_IF(wds_dev); - sdata->type = IEEE80211_SUB_IF_TYPE_NORM; - sdata->master = local->mdev; - sdata->dev = wds_dev; - sdata->local = local; - memset(&sdata->stats, 0, sizeof(struct net_device_stats)); - sdata_parent = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata_parent->type == IEEE80211_SUB_IF_TYPE_NORM) - sdata->bss = &sdata_parent->u.norm; - else { - printk(KERN_DEBUG "%s: could not set BSS pointer for new " - "interface %s\n", dev->name, wds_dev->name); - } - ieee80211_if_sdata_init(sdata); - - if (locked) - ret = register_netdevice(wds_dev); - else - ret = register_netdev(wds_dev); - if (ret) { - kfree(wds_dev); - return NULL; - } - - list_add(&sdata->list, &local->sub_if_list); - - strcpy(name, wds_dev->name); - - return wds_dev; -} - - -int ieee80211_if_add_wds(struct net_device *dev, char *name, - struct ieee80211_if_wds *wds, int locked) -{ - struct net_device *wds_dev = NULL; - struct ieee80211_sub_if_data *sdata = NULL; - - if (strlen(name) != 0) { - wds_dev = dev_get_by_name(name); - if (wds_dev) { - dev_put(wds_dev); - return -EEXIST; - } - } - - wds_dev = ieee80211_if_add(dev, name, locked); - if (wds_dev == NULL) - return -ENOANO; - - sdata = IEEE80211_DEV_TO_SUB_IF(wds_dev); - sdata->type = IEEE80211_SUB_IF_TYPE_WDS; - memcpy(&sdata->u.wds, wds, sizeof(struct ieee80211_if_wds)); - -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG - "%s: Added WDS Link to " MACSTR "\n", - wds_dev->name, MAC2STR(sdata->u.wds.remote_addr)); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - - - ieee80211_proc_init_virtual(wds_dev); - - return 0; -} - - -int ieee80211_if_update_wds(struct net_device *dev, char *name, - struct ieee80211_if_wds *wds, int locked) -{ - struct net_device *wds_dev = NULL; - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata = NULL; - struct sta_info *sta; - struct list_head *ptr; - - list_for_each(ptr, &local->sub_if_list) { - sdata = list_entry(ptr, struct ieee80211_sub_if_data, list); - if (strcmp(name, sdata->dev->name) == 0) { - wds_dev = sdata->dev; - break; - } - } - - if (wds_dev == NULL || sdata->type != IEEE80211_SUB_IF_TYPE_WDS) - return -ENODEV; - - /* Remove STA entry for the old peer */ - sta = sta_info_get(local, sdata->u.wds.remote_addr); - if (sta) { - sta_info_release(local, sta); - sta_info_free(local, sta, 0); - } else { - printk(KERN_DEBUG "%s: could not find STA entry for WDS link " - "%s peer " MACSTR "\n", - dev->name, wds_dev->name, - MAC2STR(sdata->u.wds.remote_addr)); - } - - /* Update WDS link data */ - memcpy(&sdata->u.wds, wds, sizeof(struct ieee80211_if_wds)); - - - return 0; -} - - -static void ieee80211_if_init(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - - spin_lock_init(&local->sub_if_lock); - INIT_LIST_HEAD(&local->sub_if_list); - -} - - -int ieee80211_if_add_vlan(struct net_device *dev, - char *name, - struct ieee80211_if_vlan *vlan, - int locked) -{ - struct net_device *vlan_dev = NULL; - struct ieee80211_sub_if_data *sdata = NULL; - - if (strlen(name) != 0) { - vlan_dev = dev_get_by_name(name); - if (vlan_dev) { - dev_put(vlan_dev); - return -EEXIST; - } - } - - vlan_dev = ieee80211_if_add(dev, name, locked); - if (vlan_dev == NULL) - return -ENOANO; - - sdata = IEEE80211_DEV_TO_SUB_IF(vlan_dev); - sdata->type = IEEE80211_SUB_IF_TYPE_VLAN; - ieee80211_proc_init_virtual(vlan_dev); - return 0; -} - - -static void ieee80211_if_norm_init(struct ieee80211_sub_if_data *sdata) -{ - sdata->type = IEEE80211_SUB_IF_TYPE_NORM; - sdata->u.norm.dtim_period = 2; - sdata->u.norm.force_unicast_rateidx = -1; - sdata->u.norm.max_ratectrl_rateidx = -1; - skb_queue_head_init(&sdata->u.norm.ps_bc_buf); - sdata->bss = &sdata->u.norm; -} - - -int ieee80211_if_add_norm(struct net_device *dev, char *name, u8 *bssid, - int locked) -{ - struct ieee80211_local *local = dev->priv; - struct net_device *norm_dev = NULL; - struct ieee80211_sub_if_data *sdata = NULL; - - if (local->bss_dev_count >= local->conf.bss_count) - return -ENOBUFS; - - if (strlen(name) != 0) { - norm_dev = dev_get_by_name(name); - if (norm_dev) { - dev_put(norm_dev); - return -EEXIST; - } - } - - norm_dev = ieee80211_if_add(dev, name, locked); - if (norm_dev == NULL) - return -ENOANO; - - memcpy(norm_dev->dev_addr, bssid, ETH_ALEN); - sdata = IEEE80211_DEV_TO_SUB_IF(norm_dev); - ieee80211_if_norm_init(sdata); - ieee80211_proc_init_virtual(norm_dev); - spin_lock_bh(&local->sub_if_lock); - local->bss_devs[local->bss_dev_count] = norm_dev; - local->bss_dev_count++; - spin_unlock_bh(&local->sub_if_lock); - - return 0; -} - - -static void ieee80211_addr_inc(u8 *addr) -{ - int pos = 5; - while (pos >= 0) { - addr[pos]++; - if (addr[pos] != 0) - break; - pos--; - } -} - - -int ieee80211_if_add_sta(struct net_device *dev, char *name, int locked) -{ - struct ieee80211_local *local = dev->priv; - struct net_device *sta_dev; - struct ieee80211_sub_if_data *sdata; - struct ieee80211_if_sta *ifsta; - int i; - - if (local->sta_dev_count >= local->conf.bss_count) - return -ENOBUFS; - - if (strlen(name) != 0) { - sta_dev = dev_get_by_name(name); - if (sta_dev) { - dev_put(sta_dev); - return -EEXIST; - } - } - - sta_dev = ieee80211_if_add(dev, name, locked); - if (sta_dev == NULL) - return -ENOANO; - - sdata = IEEE80211_DEV_TO_SUB_IF(sta_dev); - ifsta = &sdata->u.sta; - sdata->type = IEEE80211_SUB_IF_TYPE_STA; - ieee80211_proc_init_virtual(sta_dev); - - spin_lock_bh(&local->sub_if_lock); - for (i = 0; i < local->conf.bss_count; i++) { - if (local->sta_devs[i] == NULL) { - local->sta_devs[i] = sta_dev; - local->sta_dev_count++; - printk(KERN_DEBUG "%s: using STA entry %d\n", - sta_dev->name, i); - while (i > 0) { - ieee80211_addr_inc(sta_dev->dev_addr); - i--; - } - printk(KERN_DEBUG "%s: MAC address " MACSTR "\n", - sta_dev->name, MAC2STR(sta_dev->dev_addr)); - break; - } - } - spin_unlock_bh(&local->sub_if_lock); - - init_timer(&ifsta->timer); - ifsta->timer.data = (unsigned long) sta_dev; - ifsta->timer.function = ieee80211_sta_timer; - - ifsta->capab = WLAN_CAPABILITY_ESS; - ifsta->auth_algs = IEEE80211_AUTH_ALG_OPEN | - IEEE80211_AUTH_ALG_SHARED_KEY; - ifsta->create_ibss = 1; - ifsta->wmm_enabled = 1; - - return 0; -} - - -static void ieee80211_if_del(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, int locked) -{ - struct sta_info *sta; - u8 addr[ETH_ALEN]; - int i, j; - struct list_head *ptr, *n; - - memset(addr, 0xff, ETH_ALEN); - for (i = 0; i < NUM_DEFAULT_KEYS; i++) { - if (!sdata->keys[i]) - continue; -#if 0 - /* Low-level driver has probably disabled hw - * already, so there is not really much point - * in disabling the keys at this point. */ - if (local->hw->set_key) - local->hw->set_key(dev, DISABLE_KEY, addr, - local->keys[i], 0); -#endif - kfree(sdata->keys[i]); - } - - switch (sdata->type) { - case IEEE80211_SUB_IF_TYPE_NORM: - /* Remove all virtual interfaces that use this BSS - * as their sdata->bss */ - list_for_each_safe(ptr, n, &local->sub_if_list) { - struct ieee80211_sub_if_data *tsdata = - list_entry(ptr, struct ieee80211_sub_if_data, - list); - - if (tsdata != sdata && tsdata->bss == &sdata->u.norm) { - printk(KERN_DEBUG "%s: removing virtual " - "interface %s because its BSS interface" - " is being removed\n", - sdata->dev->name, tsdata->dev->name); - ieee80211_if_del(local, tsdata, locked); - } - } - - kfree(sdata->u.norm.beacon_head); - kfree(sdata->u.norm.beacon_tail); - spin_lock_bh(&local->sub_if_lock); - for (j = 0; j < local->bss_dev_count; j++) { - if (sdata->dev == local->bss_devs[j]) { - if (j + 1 < local->bss_dev_count) { - memcpy(&local->bss_devs[j], - &local->bss_devs[j + 1], - (local->bss_dev_count - j - 1) * - sizeof(local->bss_devs[0])); - local->bss_devs[local->bss_dev_count - - 1] = NULL; - } else - local->bss_devs[j] = NULL; - local->bss_dev_count--; - break; - } - } - spin_unlock_bh(&local->sub_if_lock); - - if (sdata->dev != local->mdev) { - struct sk_buff *skb; - while ((skb = skb_dequeue(&sdata->u.norm.ps_bc_buf))) { - local->total_ps_buffered--; - dev_kfree_skb(skb); - } - } - - break; - case IEEE80211_SUB_IF_TYPE_WDS: - sta = sta_info_get(local, sdata->u.wds.remote_addr); - if (sta) { - sta_info_release(local, sta); - sta_info_free(local, sta, 0); - } else { -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: Someone had deleted my STA " - "entry for the WDS link\n", sdata->dev->name); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - } - break; - case IEEE80211_SUB_IF_TYPE_STA: - del_timer_sync(&sdata->u.sta.timer); - if (local->scan_timer.data == (unsigned long) sdata->dev) - del_timer_sync(&local->scan_timer); - kfree(sdata->u.sta.extra_ie); - sdata->u.sta.extra_ie = NULL; - kfree(sdata->u.sta.assocreq_ies); - sdata->u.sta.assocreq_ies = NULL; - kfree(sdata->u.sta.assocresp_ies); - sdata->u.sta.assocresp_ies = NULL; - if (sdata->u.sta.probe_resp) { - dev_kfree_skb(sdata->u.sta.probe_resp); - sdata->u.sta.probe_resp = NULL; - } - for (i = 0; i < local->conf.bss_count; i++) { - if (local->sta_devs[i] == sdata->dev) { - local->sta_devs[i] = NULL; - local->sta_dev_count--; - break; - } - } - - break; - } - - /* remove all STAs that are bound to this virtual interface */ - sta_info_flush(local, sdata->dev); - - list_del(&sdata->list); - ieee80211_proc_deinit_virtual(sdata->dev); - if (locked) - unregister_netdevice(sdata->dev); - else - unregister_netdev(sdata->dev); - /* Default data device and management device are allocated with the - * master device. All other devices are separately allocated and will - * be freed here. */ - if (sdata->dev != local->mdev && sdata->dev != local->wdev && - sdata->dev != local->apdev) - kfree(sdata->dev); -} - - -static int ieee80211_if_remove(struct net_device *dev, char *name, int id, - int locked) -{ - struct ieee80211_local *local = dev->priv; - struct list_head *ptr, *n; - - /* Make sure not to touch sdata->master since it may - * have already been deleted, etc. */ - - list_for_each_safe(ptr, n, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - - if (sdata->type == id && strcmp(name, sdata->dev->name) == 0) { - ieee80211_if_del(local, sdata, locked); - break; - } - } - - return 0; -} - - -int ieee80211_if_remove_wds(struct net_device *dev, char *name, int locked) -{ - return ieee80211_if_remove(dev, name, IEEE80211_SUB_IF_TYPE_WDS, - locked); -} - - -int ieee80211_if_remove_vlan(struct net_device *dev, char *name, int locked) -{ - return ieee80211_if_remove(dev, name, IEEE80211_SUB_IF_TYPE_VLAN, - locked); -} - - -int ieee80211_if_remove_norm(struct net_device *dev, char *name, int locked) -{ - return ieee80211_if_remove(dev, name, IEEE80211_SUB_IF_TYPE_NORM, - locked); -} - - -int ieee80211_if_remove_sta(struct net_device *dev, char *name, int locked) -{ - return ieee80211_if_remove(dev, name, IEEE80211_SUB_IF_TYPE_STA, - locked); -} - - -int ieee80211_if_flush(struct net_device *dev, int locked) -{ - struct ieee80211_local *local = dev->priv; - struct list_head *ptr, *n; - - list_for_each_safe(ptr, n, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - - if (sdata->dev != local->mdev && - sdata->dev != local->wdev && - sdata->dev != local->apdev) - ieee80211_if_del(local, sdata, locked); - } - - return 0; -} - - -static void ieee80211_precalc_rates(struct ieee80211_hw *hw) -{ - struct ieee80211_hw_modes *mode; - struct ieee80211_rate *rate; - int m, r; - - for (m = 0; m < hw->num_modes; m++) { - mode = &hw->modes[m]; - for (r = 0; r < mode->num_rates; r++) { - rate = &mode->rates[r]; - rate->rate_inv = CHAN_UTIL_RATE_LCM / rate->rate; - } - } -} - - -struct net_device *ieee80211_alloc_hw(size_t priv_data_len, - void (*setup)(struct net_device *)) -{ - struct net_device *dev, *apdev, *mdev; - struct ieee80211_local *local; - struct ieee80211_sub_if_data *sdata; - int alloc_size; - - /* Ensure 32-bit alignment of our private data and hw private data. - * Each net_device is followed by a sub_if_data which which is used - * for wds/vlan information; it is aligned as well. - * - * Sample memory map looks something like: - * - * 0000 ***************** - * * net_dev * - * 015c ***************** - * * sub_if * - * 017c ***************** - * * local * - * 0b84 ***************** - * * hw_priv * - * 1664 ***************** - * * ap net_dev * - * 17c0 ***************** - * * sub_if * - * ***************** - * * master net_dev* - * ***************** - * * sub_if * - * ***************** - */ - alloc_size = sizeof(struct net_device) + - sizeof(struct ieee80211_sub_if_data) + 3 + - sizeof(struct ieee80211_local) + 3 + - priv_data_len + 3 + - sizeof(struct net_device) + 3 + - sizeof(struct ieee80211_sub_if_data) + 3 + - sizeof(struct net_device) + 3 + - sizeof(struct ieee80211_sub_if_data) + 3 + - 4096; - mdev = (struct net_device *) kzalloc(alloc_size, GFP_KERNEL); - if (mdev == NULL) - return NULL; - - mdev->priv = (struct net_device *) - (((long) mdev + - sizeof(struct net_device) + - sizeof(struct ieee80211_sub_if_data) + 3) - & ~3); - local = mdev->priv; - local->hw_priv = (void *) - (((long) local + sizeof(struct ieee80211_local) + 3) & ~3); - apdev = (struct net_device *) - (((long) local->hw_priv + priv_data_len + 3) & ~3); - dev = (struct net_device *) - (((long) apdev + - sizeof(struct net_device) + - sizeof(struct ieee80211_sub_if_data) + 3) - & ~3); - dev->priv = local; - - ether_setup(dev); - memcpy(dev->name, "wlan%d", 7); - - dev->hard_start_xmit = ieee80211_subif_start_xmit; - dev->do_ioctl = ieee80211_ioctl; - dev->change_mtu = ieee80211_change_mtu; - dev->tx_timeout = ieee80211_tx_timeout; - dev->get_stats = ieee80211_get_stats; - dev->open = ieee80211_open; - dev->stop = ieee80211_stop; - dev->tx_queue_len = 0; - dev->set_mac_address = ieee80211_set_mac_address; - - local->wdev = dev; - local->mdev = mdev; - local->rx_handlers = ieee80211_rx_handlers; - local->tx_handlers = ieee80211_tx_handlers; - - local->bridge_packets = 1; - - local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; - local->fragmentation_threshold = IEEE80211_MAX_FRAG_THRESHOLD; - local->short_retry_limit = 7; - local->long_retry_limit = 4; - local->conf.calib_int = 60; - local->rate_ctrl_num_up = RATE_CONTROL_NUM_UP; - local->rate_ctrl_num_down = RATE_CONTROL_NUM_DOWN; - local->conf.bss_count = 1; - memset(local->conf.bssid_mask, 0xff, ETH_ALEN); - local->bss_devs = kmalloc(sizeof(struct net_device *), GFP_KERNEL); - if (local->bss_devs == NULL) - goto fail; - local->bss_devs[0] = local->wdev; - local->bss_dev_count = 1; - local->sta_devs = kmalloc(sizeof(struct net_device *), GFP_KERNEL); - if (local->sta_devs == NULL) - goto fail; - local->sta_devs[0] = NULL; - - local->scan.in_scan = 0; - local->hw_modes = (unsigned int) -1; - - init_timer(&local->scan.timer); /* clear it out */ - - spin_lock_init(&local->generic_lock); - init_timer(&local->rate_limit_timer); - local->rate_limit_timer.function = ieee80211_rate_limit; - local->rate_limit_timer.data = (unsigned long) local; - init_timer(&local->stat_timer); - local->stat_timer.function = ieee80211_stat_refresh; - local->stat_timer.data = (unsigned long) local; - ieee80211_rx_bss_list_init(dev); - - sta_info_init(local); - - ieee80211_if_init(dev); - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - sdata->dev = dev; - sdata->master = mdev; - sdata->local = local; - ieee80211_if_sdata_init(sdata); - ieee80211_if_norm_init(sdata); - list_add_tail(&sdata->list, &local->sub_if_list); - - if (strlen(dev->name) + 2 >= sizeof(dev->name)) - goto fail; - - apdev = (struct net_device *) - (((long) local->hw_priv + priv_data_len + 3) & ~3); - local->apdev = apdev; - ether_setup(apdev); - apdev->priv = local; - apdev->hard_start_xmit = ieee80211_mgmt_start_xmit; - apdev->change_mtu = ieee80211_change_mtu_apdev; - apdev->get_stats = ieee80211_get_stats; - apdev->open = ieee80211_open; - apdev->stop = ieee80211_stop; - apdev->type = ARPHRD_IEEE80211_PRISM; - apdev->hard_header_parse = header_parse_80211; - apdev->tx_queue_len = 0; - sprintf(apdev->name, "%sap", dev->name); - - sdata = IEEE80211_DEV_TO_SUB_IF(apdev); - sdata->type = IEEE80211_SUB_IF_TYPE_MGMT; - sdata->dev = apdev; - sdata->master = mdev; - sdata->local = local; - list_add_tail(&sdata->list, &local->sub_if_list); - - ether_setup(mdev); - mdev->hard_start_xmit = ieee80211_master_start_xmit; - mdev->do_ioctl = ieee80211_ioctl; - mdev->change_mtu = ieee80211_change_mtu; - mdev->tx_timeout = ieee80211_tx_timeout; - mdev->get_stats = ieee80211_get_stats; - mdev->open = ieee80211_open; - mdev->stop = ieee80211_stop; - mdev->type = ARPHRD_IEEE80211; - mdev->hard_header_parse = header_parse_80211; - sprintf(mdev->name, "%s.11", dev->name); - - sdata = IEEE80211_DEV_TO_SUB_IF(mdev); - sdata->type = IEEE80211_SUB_IF_TYPE_NORM; - sdata->dev = mdev; - sdata->master = mdev; - sdata->local = local; - list_add_tail(&sdata->list, &local->sub_if_list); - - tasklet_init(&local->tasklet, - ieee80211_tasklet_handler, - (unsigned long) local); - skb_queue_head_init(&local->skb_queue); - skb_queue_head_init(&local->skb_queue_unreliable); - - if (setup) - setup(mdev); - - return mdev; - - fail: - ieee80211_free_hw(mdev); - return NULL; -} - -int ieee80211_register_hw(struct net_device *dev, struct ieee80211_hw *hw) -{ - struct ieee80211_local *local = dev->priv; - int result; - - if (!hw) - return -1; - - if (hw->version != IEEE80211_VERSION) { - printk("ieee80211_register_hw - version mismatch: 80211.o " - "version %d, low-level driver version %d\n", - IEEE80211_VERSION, hw->version); - return -1; - } - - local->conf.mode = IW_MODE_MASTER; - local->conf.beacon_int = 1000; - - ieee80211_update_hw(dev, hw); /* Don't care about the result. */ - - sta_info_start(local); - - result = register_netdev(local->wdev); - if (result < 0) - return -1; - - result = register_netdev(local->apdev); - if (result < 0) - goto fail_2nd_dev; - - if (hw->fraglist) - dev->features |= NETIF_F_FRAGLIST; - result = register_netdev(dev); - if (result < 0) - goto fail_3rd_dev; - - if (rate_control_initialize(local) < 0) { - printk(KERN_DEBUG "%s: Failed to initialize rate control " - "algorithm\n", dev->name); - goto fail_rate; - } - - /* TODO: add rtnl locking around device creation and qdisc install */ - ieee80211_install_qdisc(dev); - - ieee80211_wep_init(local); - ieee80211_proc_init_interface(local); - return 0; - -fail_rate: - unregister_netdev(dev); -fail_3rd_dev: - unregister_netdev(local->apdev); -fail_2nd_dev: - unregister_netdev(local->wdev); - sta_info_stop(local); - return result; -} - -int ieee80211_update_hw(struct net_device *dev, struct ieee80211_hw *hw) -{ - struct ieee80211_local *local = dev->priv; - - local->hw = hw; - - /* Backwards compatibility for low-level drivers that do not set number - * of TX queues. */ - if (hw->queues == 0) - hw->queues = 1; - - memcpy(local->apdev->dev_addr, dev->dev_addr, ETH_ALEN); - local->apdev->base_addr = dev->base_addr; - local->apdev->irq = dev->irq; - local->apdev->mem_start = dev->mem_start; - local->apdev->mem_end = dev->mem_end; - - memcpy(local->wdev->dev_addr, dev->dev_addr, ETH_ALEN); - local->wdev->base_addr = dev->base_addr; - local->wdev->irq = dev->irq; - local->wdev->mem_start = dev->mem_start; - local->wdev->mem_end = dev->mem_end; - - if (!hw->modes || !hw->modes->channels || !hw->modes->rates || - !hw->modes->num_channels || !hw->modes->num_rates) - return -1; - - ieee80211_precalc_rates(hw); - local->conf.phymode = hw->modes[0].mode; - local->curr_rates = hw->modes[0].rates; - local->num_curr_rates = hw->modes[0].num_rates; - ieee80211_prepare_rates(dev); - - local->conf.freq = local->hw->modes[0].channels[0].freq; - local->conf.channel = local->hw->modes[0].channels[0].chan; - local->conf.channel_val = local->hw->modes[0].channels[0].val; - /* FIXME: Invoke config to allow driver to set the channel. */ - - return 0; -} - -void ieee80211_unregister_hw(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - struct list_head *ptr, *n; - int i; - - tasklet_disable(&local->tasklet); - /* TODO: skb_queue should be empty here, no need to do anything? */ - - if (local->rate_limit) - del_timer_sync(&local->rate_limit_timer); - if (local->stat_time) - del_timer_sync(&local->stat_timer); - if (local->scan_timer.data) - del_timer_sync(&local->scan_timer); - ieee80211_rx_bss_list_deinit(dev); - - list_for_each_safe(ptr, n, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - ieee80211_if_del(local, sdata, 0); - } - - sta_info_stop(local); - - for (i = 0; i < IEEE80211_FRAGMENT_MAX; i++) - if (local->fragments[i].skb) - dev_kfree_skb(local->fragments[i].skb); - - for (i = 0; i < NUM_IEEE80211_MODES; i++) { - kfree(local->supp_rates[i]); - kfree(local->basic_rates[i]); - } - - kfree(local->conf.ssid); - kfree(local->conf.generic_elem); - - ieee80211_proc_deinit_interface(local); - - skb_queue_purge(&local->skb_queue); - skb_queue_purge(&local->skb_queue_unreliable); - - rate_control_free(local); -} - -void ieee80211_free_hw(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - - kfree(local->sta_devs); - kfree(local->bss_devs); - kfree(dev); -} - -/* Perform netif operations on all configured interfaces */ -int ieee80211_netif_oper(struct net_device *sdev, Netif_Oper op) -{ - struct ieee80211_local *local = sdev->priv; - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(sdev); - struct net_device *dev = sdata->master; - - switch (op) { - case NETIF_ATTACH: - netif_device_attach(dev); - break; - case NETIF_DETACH: - netif_device_detach(dev); - break; - case NETIF_START: - netif_start_queue(dev); - break; - case NETIF_STOP: - break; - case NETIF_WAKE: - if (local->scan.in_scan == 0) { - netif_wake_queue(dev); -#if 1 - if (/* FIX: 802.11 qdisc in use */ 1) - __netif_schedule(dev); -#endif - } - break; - case NETIF_IS_STOPPED: - if (netif_queue_stopped(dev)) - return 1; - break; - case NETIF_UPDATE_TX_START: - dev->trans_start = jiffies; - break; - } - - return 0; -} - - -void * ieee80211_dev_hw_data(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - return local->hw_priv; -} - - -void * ieee80211_dev_stats(struct net_device *dev) -{ - struct ieee80211_sub_if_data *sdata; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - return &(sdata->stats); -} - - -int ieee80211_rate_control_register(struct rate_control_ops *ops) -{ - struct rate_control_algs *alg; - - alg = kmalloc(sizeof(*alg), GFP_KERNEL); - if (alg == NULL) { - return -1; - } - memset(alg, 0, sizeof(*alg)); - alg->next = ieee80211_rate_ctrl_algs; - alg->ops = ops; - ieee80211_rate_ctrl_algs = alg; - - return 0; -} - - -void ieee80211_rate_control_unregister(struct rate_control_ops *ops) -{ - struct rate_control_algs *alg, *prev; - - prev = NULL; - alg = ieee80211_rate_ctrl_algs; - while (alg) { - if (alg->ops == ops) { - if (prev) - prev->next = alg->next; - else - ieee80211_rate_ctrl_algs = alg->next; - kfree(alg); - break; - } - prev = alg; - alg = alg->next; - } -} - - -static int rate_control_initialize(struct ieee80211_local *local) -{ - struct rate_control_algs *algs; - for (algs = ieee80211_rate_ctrl_algs; algs; algs = algs->next) { - local->rate_ctrl = algs->ops; - local->rate_ctrl_priv = rate_control_alloc(local); - if (local->rate_ctrl_priv) { - printk(KERN_DEBUG "%s: Selected rate control " - "algorithm '%s'\n", local->wdev->name, - local->rate_ctrl->name); - return 0; - } - } - - printk(KERN_WARNING "%s: Failed to select rate control algorithm\n", - local->wdev->name); - return -1; -} - - -static int __init ieee80211_init(void) -{ - struct sk_buff *skb; - if (sizeof(struct ieee80211_tx_packet_data) > (sizeof(skb->cb))) { - printk("80211: ieee80211_tx_packet_data is bigger " - "than the skb->cb (%d > %d)\n", - (int) sizeof(struct ieee80211_tx_packet_data), - (int) sizeof(skb->cb)); - return -EINVAL; - } - if (sizeof(struct ieee80211_rx_status) > sizeof(skb->cb)) { - printk("80211: ieee80211_rx_status is bigger " - "than the skb->cb (%d > %d)\n", - (int) sizeof(struct ieee80211_rx_status), - (int) sizeof(skb->cb)); - return -EINVAL; - } - - ieee80211_proc_init(); - { - int ret = ieee80211_wme_register(); - if (ret) { - printk(KERN_DEBUG "ieee80211_init: failed to " - "initialize WME (err=%d)\n", ret); - ieee80211_proc_deinit(); - return ret; - } - } - - return 0; -} - - -static void __exit ieee80211_exit(void) -{ - ieee80211_wme_unregister(); - ieee80211_proc_deinit(); -} - - -EXPORT_SYMBOL(ieee80211_alloc_hw); -EXPORT_SYMBOL(ieee80211_register_hw); -EXPORT_SYMBOL(ieee80211_update_hw); -EXPORT_SYMBOL(ieee80211_unregister_hw); -EXPORT_SYMBOL(ieee80211_free_hw); -EXPORT_SYMBOL(ieee80211_rx); -EXPORT_SYMBOL(ieee80211_tx_status); -EXPORT_SYMBOL(ieee80211_beacon_get); -EXPORT_SYMBOL(ieee80211_get_buffered_bc); -EXPORT_SYMBOL(ieee80211_netif_oper); -EXPORT_SYMBOL(ieee80211_dev_hw_data); -EXPORT_SYMBOL(ieee80211_dev_stats); -EXPORT_SYMBOL(ieee80211_get_hw_conf); -EXPORT_SYMBOL(ieee80211_set_aid_for_sta); -EXPORT_SYMBOL(ieee80211_rx_irqsafe); -EXPORT_SYMBOL(ieee80211_tx_status_irqsafe); -EXPORT_SYMBOL(ieee80211_get_hdrlen); -EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb); -EXPORT_SYMBOL(ieee80211_rate_control_register); -EXPORT_SYMBOL(ieee80211_rate_control_unregister); -EXPORT_SYMBOL(sta_info_get); -EXPORT_SYMBOL(sta_info_release); -EXPORT_SYMBOL(ieee80211_radar_status); - -module_init(ieee80211_init); -module_exit(ieee80211_exit); diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_i.h b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_i.h deleted file mode 100644 index 7127f8d67b2..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_i.h +++ /dev/null @@ -1,571 +0,0 @@ -/* - * Copyright 2002-2005, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef IEEE80211_I_H -#define IEEE80211_I_H - -/* ieee80211.o internal definitions, etc. These are not included into - * low-level drivers. */ - -#ifndef ETH_P_PAE -#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ -#endif /* ETH_P_PAE */ - -#define IEEE80211_MAX_SSID_LEN 32 - -struct ieee80211_local; - -#include "ieee80211_key.h" -#include "sta_info.h" - -#define BIT(x) (1 << (x)) - -#define IEEE80211_ALIGN32_PAD(a) ((4 - ((a) & 3)) & 3) - - -/* Maximum number of broadcast/multicast frames to buffer when some of the - * associated stations are using power saving. */ -#define AP_MAX_BC_BUFFER 128 - -/* Maximum number of frames buffered to all STAs, including multicast frames. - * Note: increasing this limit increases the potential memory requirement. Each - * frame can be up to about 2 kB long. */ -#define TOTAL_MAX_TX_BUFFER 512 - - -#define MAC2STR(a) ((a)[0] & 0xff), ((a)[1] & 0xff), ((a)[2] & 0xff), \ - ((a)[3] & 0xff), ((a)[4] & 0xff), ((a)[5] & 0xff) -#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" - -#define MULTICAST_ADDR(a) ((a)[0] & 0x01) - - -/* IEEE 802.11 (Ch. 9.5 Defragmentation) requires support for concurrent - * reception of at least three fragmented frames. This limit can be increased - * by changing this define, at the cost of slower frame reassembly and - * increased memory use (about 2 kB of RAM per entry). */ -#define IEEE80211_FRAGMENT_MAX 4 - -struct ieee80211_fragment_entry { - unsigned long first_frag_time; - unsigned int seq; - unsigned int rx_queue; - unsigned int last_frag; - struct sk_buff *skb; - int ccmp; /* Whether fragments were encrypted with CCMP */ - u8 last_pn[6]; /* PN of the last fragment if CCMP was used */ -}; - - -struct ieee80211_sta_bss { - struct list_head list; - struct ieee80211_sta_bss *hnext; - atomic_t users; - - u8 bssid[ETH_ALEN]; - u8 ssid[IEEE80211_MAX_SSID_LEN]; - size_t ssid_len; - u16 capability; /* host byte order */ - int hw_mode; - int channel; - int freq; - int rssi; - u8 *wpa_ie; - size_t wpa_ie_len; - u8 *rsn_ie; - size_t rsn_ie_len; - u8 *wmm_ie; - size_t wmm_ie_len; -#define IEEE80211_MAX_SUPP_RATES 32 - u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; - size_t supp_rates_len; - int beacon_int; - u64 timestamp; - - int probe_resp; - unsigned long last_update; - -}; - - -typedef enum { - TXRX_CONTINUE, TXRX_DROP, TXRX_QUEUED -} ieee80211_txrx_result; - -struct ieee80211_txrx_data { - struct sk_buff *skb; - struct net_device *dev; - struct ieee80211_local *local; - struct ieee80211_sub_if_data *sdata; - struct sta_info *sta; - u16 fc, ethertype; - struct ieee80211_key *key; - unsigned int fragmented:1; /* whether the MSDU was fragmented */ - union { - struct { - struct ieee80211_tx_control *control; - int unicast:1; - int ps_buffered:1; - int short_preamble:1; - int probe_last_frag:1; - struct ieee80211_rate *rate; - /* use this rate (if set) for last fragment; rate can - * be set to lower rate for the first fragments, e.g., - * when using CTS protection with IEEE 802.11g. */ - struct ieee80211_rate *last_frag_rate; - int last_frag_rateidx; - int mgmt_interface; - - /* Extra fragments (in addition to the first fragment - * in skb) */ - int num_extra_frag; - struct sk_buff **extra_frag; - } tx; - struct { - struct ieee80211_rx_status *status; - int sent_ps_buffered; - int queue; - } rx; - } u; -#ifdef CONFIG_HOSTAPD_WPA_TESTING - int wpa_test; -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ -}; - -struct ieee80211_passive_scan { - unsigned int in_scan:1; /* this must be cleared before calling - * netif_oper(WAKEUP) */ - unsigned int our_mode_only:1; /* only scan our physical mode a/b/g/etc - */ - int interval; /* time in seconds between scans */ - int time; /* time in microseconds to scan for */ - int channel; /* channel to be scanned */ - int tries; - - int mode_idx; - int chan_idx; - - int freq; - int rx_packets; - int rx_beacon; - int txrx_count; - - struct timer_list timer; - - struct sk_buff *skb; /* skb to transmit before changing channels, - * maybe null for none */ - struct ieee80211_tx_control tx_control; - - unsigned int num_scans; -}; - -typedef ieee80211_txrx_result (*ieee80211_tx_handler) -(struct ieee80211_txrx_data *tx); - -typedef ieee80211_txrx_result (*ieee80211_rx_handler) -(struct ieee80211_txrx_data *rx); - -struct ieee80211_if_norm { - u8 *beacon_head, *beacon_tail; - int beacon_head_len, beacon_tail_len; - - /* TODO: sta_aid could be replaced by 2008-bit large bitfield of - * that could be used in TIM element generation. This would also - * make TIM element generation a bit faster. */ - /* AID mapping to station data. NULL, if AID is free. AID is in the - * range 1..2007 and sta_aid[i] corresponds to AID i+1. */ - struct sta_info *sta_aid[MAX_AID_TABLE_SIZE]; - int max_aid; /* largest aid currently in use */ - atomic_t num_sta_ps; /* number of stations in PS mode */ - struct sk_buff_head ps_bc_buf; - int dtim_period, dtim_count; - int force_unicast_rateidx; /* forced TX rateidx for unicast frames */ - int max_ratectrl_rateidx; /* max TX rateidx for rate control */ - int num_beacons; /* number of TXed beacon frames for this BSS */ -}; - -struct ieee80211_if_wds { - u8 remote_addr[ETH_ALEN]; - struct sta_info *sta; -}; - -struct ieee80211_if_vlan { - u8 id; -}; - -struct ieee80211_if_sta { - enum { - IEEE80211_DISABLED, IEEE80211_AUTHENTICATE, - IEEE80211_ASSOCIATE, IEEE80211_ASSOCIATED, - IEEE80211_IBSS_SEARCH, IEEE80211_IBSS_JOINED - } state; - struct timer_list timer; - u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; - u8 ssid[IEEE80211_MAX_SSID_LEN]; - size_t ssid_len; - u16 aid; - u16 ap_capab, capab; - u8 *extra_ie; /* to be added to the end of AssocReq */ - size_t extra_ie_len; - - /* The last AssocReq/Resp IEs */ - u8 *assocreq_ies, *assocresp_ies; - size_t assocreq_ies_len, assocresp_ies_len; - - int auth_tries, assoc_tries; - - int ssid_set:1; - int bssid_set:1; - int prev_bssid_set:1; - int authenticated:1; - int associated:1; - int probereq_poll:1; - int use_protection:1; - int create_ibss:1; - int mixed_cell:1; - int wmm_enabled:1; - - int key_mgmt; - unsigned long last_probe; - -#define IEEE80211_AUTH_ALG_OPEN BIT(0) -#define IEEE80211_AUTH_ALG_SHARED_KEY BIT(1) -#define IEEE80211_AUTH_ALG_LEAP BIT(2) - unsigned int auth_algs; /* bitfield of allowed auth algs */ - int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ - int auth_transaction; - - unsigned long ibss_join_req; - struct sk_buff *probe_resp; /* ProbeResp template for IBSS */ - u32 supp_rates_bits; - - int wmm_last_param_set; -}; - - -#define IEEE80211_SUB_IF_TYPE_NORM 0x00000000 -#define IEEE80211_SUB_IF_TYPE_MGMT 0x00000001 -#define IEEE80211_SUB_IF_TYPE_STA 0x00000002 -#define IEEE80211_SUB_IF_TYPE_WDS 0x5A580211 -#define IEEE80211_SUB_IF_TYPE_VLAN 0x00080211 - -struct ieee80211_sub_if_data { - struct list_head list; - unsigned int type; - - struct net_device *dev; - struct net_device *master; - struct ieee80211_local *local; - - struct net_device_stats stats; - int drop_unencrypted; - int eapol; /* 0 = process EAPOL frames as normal data frames, - * 1 = send EAPOL frames through wlan#ap to hostapd - * (default) */ - int ieee802_1x; /* IEEE 802.1X PAE - drop packet to/from unauthorized - * port */ - -#define NUM_DEFAULT_KEYS 4 - struct ieee80211_key *keys[NUM_DEFAULT_KEYS]; - struct ieee80211_key *default_key; - - struct ieee80211_if_norm *bss; /* BSS that this device belongs to */ - - union { - struct ieee80211_if_norm norm; - struct ieee80211_if_wds wds; - struct ieee80211_if_vlan vlan; - struct ieee80211_if_sta sta; - } u; - int channel_use; - int channel_use_raw; -}; - -#define IEEE80211_DEV_TO_SUB_IF(dev) ((struct ieee80211_sub_if_data *) \ - (((long)dev + sizeof(struct net_device) + 3) & ~3)) - - -struct ieee80211_local { - struct ieee80211_hw *hw; - void *hw_priv; - struct net_device *mdev; /* wlan#.11 - "master" 802.11 device */ - struct net_device *wdev; /* wlan# - default Ethernet (data) devide */ - struct net_device *apdev; /* wlan#ap - management frames (hostapd) */ - int open_count; - struct ieee80211_conf conf; - - /* Tasklet and skb queue to process calls from IRQ mode. All frames - * added to skb_queue will be processed, but frames in - * skb_queue_unreliable may be dropped if the total length of these - * queues increases over the limit. */ -#define IEEE80211_IRQSAFE_QUEUE_LIMIT 128 - struct tasklet_struct tasklet; - struct sk_buff_head skb_queue; - struct sk_buff_head skb_queue_unreliable; - enum { - ieee80211_rx_msg = 1, - ieee80211_tx_status_msg = 2 - } ieee80211_msg_enum; - - spinlock_t generic_lock; - /* Station data structures */ - spinlock_t sta_lock; /* mutex for STA data structures */ - int num_sta; /* number of stations in sta_list */ - struct list_head sta_list; - struct sta_info *sta_hash[STA_HASH_SIZE]; - struct timer_list sta_cleanup; - - /* Current rate table. This is a pointer to hw->modes structure. */ - struct ieee80211_rate *curr_rates; - int num_curr_rates; - - void *rate_ctrl_priv; - struct rate_control_ops *rate_ctrl; - - int next_mode; /* MODE_IEEE80211* - * The mode preference for next channel change. This is - * used to select .11g vs. .11b channels (or 4.9 GHz vs. - * .11a) when the channel number is not unique. */ - - /* Supported and basic rate filters for different modes. These are - * pointers to -1 terminated lists and rates in 100 kbps units. */ - int *supp_rates[NUM_IEEE80211_MODES]; - int *basic_rates[NUM_IEEE80211_MODES]; - - int rts_threshold; - int cts_protect_erp_frames; - int fragmentation_threshold; - int short_retry_limit; /* dot11ShortRetryLimit */ - int long_retry_limit; /* dot11LongRetryLimit */ - int short_preamble; /* use short preamble with IEEE 802.11b */ - - u32 wep_iv; - int key_tx_rx_threshold; /* number of times any key can be used in TX - * or RX before generating a rekey - * notification; 0 = notification disabled. */ - - /* Fragment table for host-based reassembly */ - struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX]; - unsigned int fragment_next; - - int bridge_packets; /* bridge packets between associated stations and - * deliver multicast frames both back to wireless - * media and to the local net stack */ - - struct ieee80211_passive_scan scan; - - - ieee80211_rx_handler *rx_handlers; - ieee80211_tx_handler *tx_handlers; - - spinlock_t sub_if_lock; /* mutex for STA data structures */ - struct list_head sub_if_list; - struct net_device **bss_devs; /* pointer to IF_TYPE_NORM devices for - * quick access to BSS data */ - int bss_dev_count; /* number of used entries in bss_devs; note: the - * total size of bss_devs array is stored in - * conf.bss_count */ - struct net_device **sta_devs; /* pointer to IF_TYPE_STA devices */ - int sta_dev_count; /* number of used entries in sta_devs */ - int sta_scanning; - int scan_hw_mode_idx; - int scan_channel_idx; - enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state; - unsigned long last_scan_completed; - struct timer_list scan_timer; - int scan_oper_channel; - int scan_oper_channel_val; - int scan_oper_power_level; - int scan_oper_freq; - int scan_oper_phymode; - int scan_oper_antenna_max; - u8 scan_ssid[IEEE80211_MAX_SSID_LEN]; - size_t scan_ssid_len; - int scan_skip_11b; - struct list_head sta_bss_list; - struct ieee80211_sta_bss *sta_bss_hash[STA_HASH_SIZE]; - spinlock_t sta_bss_lock; -#define IEEE80211_SCAN_MATCH_SSID BIT(0) -#define IEEE80211_SCAN_WPA_ONLY BIT(1) -#define IEEE80211_SCAN_EXTRA_INFO BIT(2) - int scan_flags; - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - u32 wpa_trigger; -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - /* SNMP counters */ - /* dot11CountersTable */ - u32 dot11TransmittedFragmentCount; - u32 dot11MulticastTransmittedFrameCount; - u32 dot11FailedCount; - u32 dot11RetryCount; - u32 dot11MultipleRetryCount; - u32 dot11FrameDuplicateCount; - u32 dot11ReceivedFragmentCount; - u32 dot11MulticastReceivedFrameCount; - u32 dot11TransmittedFrameCount; - u32 dot11WEPUndecryptableCount; - - int tx_led_counter; - - u32 channel_use; - u32 channel_use_raw; - u32 stat_time; - struct timer_list stat_timer; - - u8 bssid[ETH_ALEN]; /* BSSID for STA modes (Adhoc/Managed) */ - struct timer_list rate_limit_timer; - u32 rate_limit; - u32 rate_limit_burst; - u32 rate_limit_bucket; - struct proc_dir_entry *proc, *proc_sta, *proc_iface; - - struct work_struct sta_proc_add; - - enum { - STA_ANTENNA_SEL_AUTO = 0, - STA_ANTENNA_SEL_SW_CTRL = 1, - STA_ANTENNA_SEL_SW_CTRL_DEBUG = 2 - } sta_antenna_sel; - - int rate_ctrl_num_up, rate_ctrl_num_down; - -#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS - /* TX/RX handler statistics */ - unsigned int tx_handlers_drop; - unsigned int tx_handlers_queued; - unsigned int tx_handlers_drop_unencrypted; - unsigned int tx_handlers_drop_fragment; - unsigned int tx_handlers_drop_wep; - unsigned int tx_handlers_drop_rate_limit; - unsigned int tx_handlers_drop_not_assoc; - unsigned int tx_handlers_drop_unauth_port; - unsigned int rx_handlers_drop; - unsigned int rx_handlers_queued; - unsigned int rx_handlers_drop_nullfunc; - unsigned int rx_handlers_drop_defrag; - unsigned int rx_handlers_drop_short; - unsigned int rx_handlers_drop_passive_scan; - unsigned int tx_expand_skb_head; - unsigned int tx_expand_skb_head_cloned; - unsigned int rx_expand_skb_head; - unsigned int rx_expand_skb_head2; - unsigned int rx_handlers_fragments; - unsigned int tx_status_drop; - unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES]; - unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES]; -#define I802_DEBUG_INC(c) (c)++ -#else /* CONFIG_IEEE80211_DEBUG_COUNTERS */ -#define I802_DEBUG_INC(c) do { } while (0) -#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ - - - int default_wep_only; /* only default WEP keys are used with this - * interface; this is used to decide when hwaccel - * can be used with default keys */ - int total_ps_buffered; /* total number of all buffered unicast and - * multicast packets for power saving stations - */ - int allow_broadcast_always; /* whether to allow TX of broadcast frames - * even when there are no associated STAs - */ - - int wifi_wme_noack_test; - unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */ - - unsigned int hw_modes; /* bitfield of allowed hardware modes; - * (1 << MODE_*) */ -}; - - -/* ieee80211.c */ -int ieee80211_hw_config(struct net_device *dev); -struct ieee80211_key_conf * -ieee80211_key_data2conf(struct ieee80211_local *local, - struct ieee80211_key *data); -void ieee80211_rx_mgmt(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *status, u32 msg_type); -void ieee80211_prepare_rates(struct net_device *dev); -void ieee80211_tx_set_iswep(struct ieee80211_txrx_data *tx); -int ieee80211_if_add_wds(struct net_device *dev, - char *name, - struct ieee80211_if_wds *wds, int locked); -int ieee80211_if_add_vlan(struct net_device *dev, char *name, - struct ieee80211_if_vlan *vlan, int locked); -int ieee80211_if_add_norm(struct net_device *dev, char *name, u8 *bssid, - int locked); - -int ieee80211_if_remove_wds(struct net_device *dev, char *name, int locked); -int ieee80211_if_remove_vlan(struct net_device *dev, char *name, int locked); -int ieee80211_if_remove_norm(struct net_device *dev, char *name, int locked); -int ieee80211_if_flush(struct net_device *dev, int locked); -int ieee80211_if_update_wds(struct net_device *dev, char *name, - struct ieee80211_if_wds *wds, int locked); - -/* ieee80211_ioctl.c */ -int ieee80211_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); -/* Set hw encryption from ieee80211 */ -int ieee80211_set_hw_encryption(struct net_device *dev, - struct sta_info *sta, u8 addr[ETH_ALEN], - struct ieee80211_key *key); - -/* ieee80211_scan.c */ -void ieee80211_init_scan(struct net_device *dev); -void ieee80211_stop_scan(struct net_device *dev); - - - -/* Least common multiple of the used rates (in 100 kbps). This is used to - * calculate rate_inv values for each rate so that only integers are needed. */ -#define CHAN_UTIL_RATE_LCM 95040 -/* 1 usec is 1/8 * (95040/10) = 1188 */ -#define CHAN_UTIL_PER_USEC 1188 -/* Amount of bits to shift the result right to scale the total utilization - * to values that will not wrap around 32-bit integers. */ -#define CHAN_UTIL_SHIFT 9 -/* Theoretical maximum of channel utilization counter in 10 ms (stat_time=1): - * (CHAN_UTIL_PER_USEC * 10000) >> CHAN_UTIL_SHIFT = 23203. So dividing the - * raw value with about 23 should give utilization in 10th of a percentage - * (1/1000). However, utilization is only estimated and not all intervals - * between frames etc. are calculated. 18 seems to give numbers that are closer - * to the real maximum. */ -#define CHAN_UTIL_PER_10MS 18 -#define CHAN_UTIL_HDR_LONG (202 * CHAN_UTIL_PER_USEC) -#define CHAN_UTIL_HDR_SHORT (40 * CHAN_UTIL_PER_USEC) - - - -/* ieee80211.c */ -int ieee80211_if_add_sta(struct net_device *dev, char *name, int locked); -int ieee80211_if_remove_sta(struct net_device *dev, char *name, int locked); -/* ieee80211_ioctl.c */ -int ieee80211_set_compression(struct ieee80211_local *local, - struct net_device *dev, struct sta_info *sta); -/* ieee80211_sta.c */ -void ieee80211_sta_timer(unsigned long ptr); -void ieee80211_sta_rx_mgmt(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *rx_status); -int ieee80211_sta_set_ssid(struct net_device *dev, char *ssid, size_t len); -int ieee80211_sta_get_ssid(struct net_device *dev, char *ssid, size_t *len); -int ieee80211_sta_set_bssid(struct net_device *dev, u8 *bssid); -int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len); -int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len); -void ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *rx_status); -void ieee80211_rx_bss_list_init(struct net_device *dev); -void ieee80211_rx_bss_list_deinit(struct net_device *dev); -int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len); -struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev, - struct sk_buff *skb, u8 *bssid, - u8 *addr); -int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason); -int ieee80211_sta_disassociate(struct net_device *dev, u16 reason); - - -#endif /* IEEE80211_I_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_ioctl.c b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_ioctl.c deleted file mode 100644 index a44b02e8ee7..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_ioctl.c +++ /dev/null @@ -1,2832 +0,0 @@ -/* - * Copyright 2002-2005, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/netdevice.h> -#include <linux/types.h> -#include <linux/slab.h> -#include <linux/skbuff.h> -#include <linux/if_arp.h> -#include <linux/wireless.h> -#include <net/iw_handler.h> -#include <asm/uaccess.h> - -#include <net/ieee80211.h> -#include <net/ieee80211_mgmt.h> -#include "ieee80211_i.h" -#include "hostapd_ioctl.h" -#include "rate_control.h" -#include "wpa.h" -#include "aes_ccm.h" - - -static int ieee80211_regdom = 0x10; /* FCC */ -MODULE_PARM(ieee80211_regdom, "i"); -MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain; 64=MKK"); - -/* - * If firmware is upgraded by the vendor, additional channels can be used based - * on the new Japanese regulatory rules. This is indicated by setting - * ieee80211_japan_5ghz module parameter to one when loading the 80211 kernel - * module. - */ -static int ieee80211_japan_5ghz /* = 0 */; -MODULE_PARM(ieee80211_japan_5ghz, "i"); -MODULE_PARM_DESC(ieee80211_japan_5ghz, "Vendor-updated firmware for 5 GHz"); - - -static int ieee80211_ioctl_set_beacon(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len, - int flag) -{ - struct ieee80211_sub_if_data *sdata; - struct ieee80211_if_norm *norm; - u8 **b_head, **b_tail; - int *b_head_len, *b_tail_len; - int len; - - len = ((char *) param->u.beacon.data - (char *) param) + - param->u.beacon.head_len + param->u.beacon.tail_len; - - if (param_len > len) - param_len = len; - else if (param_len != len) - return -EINVAL; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type != IEEE80211_SUB_IF_TYPE_NORM) - return -EINVAL; - norm = &sdata->u.norm; - - switch (flag) { - case 0: - b_head = &norm->beacon_head; - b_tail = &norm->beacon_tail; - b_head_len = &norm->beacon_head_len; - b_tail_len = &norm->beacon_tail_len; - break; - default: - printk(KERN_DEBUG "%s: unknown beacon flag %d\n", - dev->name, flag); - return -EINVAL; - } - - kfree(*b_head); - kfree(*b_tail); - *b_head = NULL; - *b_tail = NULL; - - *b_head_len = param->u.beacon.head_len; - *b_tail_len = param->u.beacon.tail_len; - - *b_head = kmalloc(*b_head_len, GFP_KERNEL); - if (*b_head) - memcpy(*b_head, param->u.beacon.data, *b_head_len); - else { - printk(KERN_DEBUG "%s: failed to allocate beacon_head\n", - dev->name); - return -ENOMEM; - } - - if (*b_tail_len > 0) { - *b_tail = kmalloc(*b_tail_len, GFP_KERNEL); - if (*b_tail) - memcpy(*b_tail, param->u.beacon.data + (*b_head_len), - (*b_tail_len)); - else { - printk(KERN_DEBUG "%s: failed to allocate " - "beacon_tail\n", dev->name); - return -ENOMEM; - } - } - - return 0; -} - - -static int ieee80211_ioctl_get_hw_features(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len) -{ - struct ieee80211_local *local = dev->priv; - u8 *pos = param->u.hw_features.data; - int left = param_len - (pos - (u8 *) param); - int mode, i; - struct hostapd_ioctl_hw_modes_hdr *hdr; - struct ieee80211_rate_data *rate; - struct ieee80211_channel_data *chan; - - param->u.hw_features.flags = 0; - if (local->hw->data_nullfunc_ack) - param->u.hw_features.flags |= HOSTAP_HW_FLAG_NULLFUNC_OK; - - param->u.hw_features.num_modes = local->hw->num_modes; - for (mode = 0; mode < local->hw->num_modes; mode++) { - int clen, rlen; - struct ieee80211_hw_modes *m = &local->hw->modes[mode]; - clen = m->num_channels * sizeof(struct ieee80211_channel_data); - rlen = m->num_rates * sizeof(struct ieee80211_rate_data); - if (left < sizeof(*hdr) + clen + rlen) - return -E2BIG; - left -= sizeof(*hdr) + clen + rlen; - - hdr = (struct hostapd_ioctl_hw_modes_hdr *) pos; - hdr->mode = m->mode; - hdr->num_channels = m->num_channels; - hdr->num_rates = m->num_rates; - - pos = (u8 *) (hdr + 1); - chan = (struct ieee80211_channel_data *) pos; - for (i = 0; i < m->num_channels; i++) { - chan[i].chan = m->channels[i].chan; - chan[i].freq = m->channels[i].freq; - chan[i].flag = m->channels[i].flag; - } - pos += clen; - - rate = (struct ieee80211_rate_data *) pos; - for (i = 0; i < m->num_rates; i++) { - rate[i].rate = m->rates[i].rate; - rate[i].flags = m->rates[i].flags; - } - pos += rlen; - } - - return 0; -} - - -static int ieee80211_ioctl_scan(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - - if (local->hw->passive_scan == NULL) - return -EOPNOTSUPP; - - if ((param->u.scan.now == 1) && (local->scan.in_scan == 1)) - return -EBUSY; - - if (param->u.scan.our_mode_only >= 0) - local->scan.our_mode_only = param->u.scan.our_mode_only; - if (param->u.scan.interval >= 0) - local->scan.interval = param->u.scan.interval; - if (param->u.scan.listen >= 0) - local->scan.time = param->u.scan.listen; - if (param->u.scan.channel > 0) - local->scan.channel = param->u.scan.channel; - if (param->u.scan.now == 1) { - local->scan.in_scan = 0; - mod_timer(&local->scan.timer, jiffies); - } - - param->u.scan.our_mode_only = local->scan.our_mode_only; - param->u.scan.interval = local->scan.interval; - param->u.scan.listen = local->scan.time; - if (local->scan.in_scan == 1) - param->u.scan.last_rx = -1; - else { - param->u.scan.last_rx = local->scan.rx_packets; - local->scan.rx_packets = -1; - } - param->u.scan.channel = local->hw->modes[local->scan.mode_idx]. - channels[local->scan.chan_idx].chan; - - return 0; -} - - -static int ieee80211_ioctl_flush(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - sta_info_flush(local, NULL); - return 0; -} - - - - -static int ieee80211_ioctl_add_sta(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - u32 rates; - int i, j; - struct ieee80211_sub_if_data *sdata; - int add_key_entry = 1; - - sta = sta_info_get(local, param->sta_addr); - - if (sta == NULL) { - sta = sta_info_add(local, dev, param->sta_addr); - if (sta == NULL) - return -ENOMEM; - } - - if (sta->dev != dev) { - /* Binding STA to a new interface, so remove all references to - * the old BSS. */ - sta_info_remove_aid_ptr(sta); - } - - /* TODO - * We "steal" the device in case someone owns it - * This will hurt WDS links and such when we have a - * WDS link and a client associating from the same station - */ - sta->dev = dev; - sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); - - sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC; - sta->aid = param->u.add_sta.aid; - if (sta->aid > MAX_AID_TABLE_SIZE) - sta->aid = 0; - if (sta->aid > 0 && sdata->bss) - sdata->bss->sta_aid[sta->aid - 1] = sta; - if (sdata->bss && sta->aid > sdata->bss->max_aid) - sdata->bss->max_aid = sta->aid; - - rates = 0; - for (i = 0; i < sizeof(param->u.add_sta.supp_rates); i++) { - int rate = (param->u.add_sta.supp_rates[i] & 0x7f) * 5; - if (local->conf.phymode == MODE_ATHEROS_TURBO || - local->conf.phymode == MODE_ATHEROS_TURBOG) - rate *= 2; - for (j = 0; j < local->num_curr_rates; j++) { - if (local->curr_rates[j].rate == rate) - rates |= BIT(j); - } - - } - sta->supp_rates = rates; - - rate_control_rate_init(local, sta); - - - - if (param->u.add_sta.wds_flags & 0x01) - sta->flags |= WLAN_STA_WDS; - else - sta->flags &= ~WLAN_STA_WDS; - - if (add_key_entry && sta->key == NULL && sdata->default_key == NULL && - local->hw->set_key) { - struct ieee80211_key_conf conf; - /* Add key cache entry with NULL key type because this may used - * for TX filtering. */ - memset(&conf, 0, sizeof(conf)); - conf.hw_key_idx = HW_KEY_IDX_INVALID; - conf.alg = ALG_NULL; - conf.force_sw_encrypt = 1; - if (local->hw->set_key(dev, SET_KEY, sta->addr, &conf, - sta->aid)) { - sta->key_idx_compression = HW_KEY_IDX_INVALID; - } else { - sta->key_idx_compression = conf.hw_key_idx; - } - } - - sta_info_release(local, sta); - - return 0; -} - - -static int ieee80211_ioctl_remove_sta(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - - sta = sta_info_get(local, param->sta_addr); - if (sta) { - sta_info_release(local, sta); - sta_info_free(local, sta, 1); - } - - return sta ? 0 : -ENOENT; -} - - -static int ieee80211_ioctl_get_dot11counterstable(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_low_level_stats stats; - - memset(&stats, 0, sizeof(stats)); - if (local->hw->get_stats) - local->hw->get_stats(dev, &stats); - param->u.dot11CountersTable.dot11TransmittedFragmentCount = - local->dot11TransmittedFragmentCount; - param->u.dot11CountersTable.dot11MulticastTransmittedFrameCount = - local->dot11MulticastTransmittedFrameCount; - param->u.dot11CountersTable.dot11ReceivedFragmentCount = - local->dot11ReceivedFragmentCount; - param->u.dot11CountersTable.dot11MulticastReceivedFrameCount = - local->dot11MulticastReceivedFrameCount; - param->u.dot11CountersTable.dot11TransmittedFrameCount = - local->dot11TransmittedFrameCount; - param->u.dot11CountersTable.dot11FCSErrorCount = - stats.dot11FCSErrorCount; - param->u.dot11CountersTable.dot11ACKFailureCount = - stats.dot11ACKFailureCount; - param->u.dot11CountersTable.dot11RTSFailureCount = - stats.dot11RTSFailureCount; - param->u.dot11CountersTable.dot11RTSSuccessCount = - stats.dot11RTSSuccessCount; - - return 0; -} - -static int ieee80211_ioctl_get_info_sta(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - - if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && - param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && - param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) { - struct ieee80211_sub_if_data *sdata; - struct net_device_stats *stats; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - stats = ieee80211_dev_stats(sdata->master); - param->u.get_info_sta.rx_bytes = stats->rx_bytes; - param->u.get_info_sta.tx_bytes = stats->tx_bytes; - /* go through all STAs and get STA with lowest max. rate */ - param->u.get_info_sta.current_tx_rate = - local->curr_rates[sta_info_min_txrate_get(local)].rate; - return 0; - } - - sta = sta_info_get(local, param->sta_addr); - - if (!sta) - return -ENOENT; - - param->u.get_info_sta.inactive_msec = - jiffies_to_msecs(jiffies - sta->last_rx); - param->u.get_info_sta.rx_packets = sta->rx_packets; - param->u.get_info_sta.tx_packets = sta->tx_packets; - param->u.get_info_sta.rx_bytes = sta->rx_bytes; - param->u.get_info_sta.tx_bytes = sta->tx_bytes; - param->u.get_info_sta.channel_use = sta->channel_use; - param->u.get_info_sta.flags = sta->flags; - if (sta->txrate >= 0 && sta->txrate < local->num_curr_rates) - param->u.get_info_sta.current_tx_rate = - local->curr_rates[sta->txrate].rate; - param->u.get_info_sta.num_ps_buf_frames = - skb_queue_len(&sta->ps_tx_buf); - param->u.get_info_sta.tx_retry_failed = sta->tx_retry_failed; - param->u.get_info_sta.tx_retry_count = sta->tx_retry_count; - param->u.get_info_sta.last_rssi = sta->last_rssi; - param->u.get_info_sta.last_ack_rssi = sta->last_ack_rssi[2]; - - sta_info_release(local, sta); - - return 0; -} - - -static int ieee80211_ioctl_set_flags_sta(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - - sta = sta_info_get(local, param->sta_addr); - if (sta) { - sta->flags |= param->u.set_flags_sta.flags_or; - sta->flags &= param->u.set_flags_sta.flags_and; - if (local->hw->set_port_auth && - (param->u.set_flags_sta.flags_or & WLAN_STA_AUTHORIZED) && - local->hw->set_port_auth(local->mdev, sta->addr, 1)) - printk(KERN_DEBUG "%s: failed to set low-level driver " - "PAE state (authorized) for " MACSTR "\n", - dev->name, MAC2STR(sta->addr)); - if (local->hw->set_port_auth && - !(param->u.set_flags_sta.flags_and & WLAN_STA_AUTHORIZED) - && local->hw->set_port_auth(local->mdev, sta->addr, 0)) - printk(KERN_DEBUG "%s: failed to set low-level driver " - "PAE state (unauthorized) for " MACSTR "\n", - dev->name, MAC2STR(sta->addr)); - sta_info_release(local, sta); - } - - return sta ? 0 : -ENOENT; -} - - -int ieee80211_set_hw_encryption(struct net_device *dev, - struct sta_info *sta, u8 addr[ETH_ALEN], - struct ieee80211_key *key) -{ - struct ieee80211_key_conf *keyconf = NULL; - struct ieee80211_local *local = dev->priv; - int rc = 0; - - /* default to sw encryption; this will be cleared by low-level - * driver if the hw supports requested encryption */ - if (key) - key->force_sw_encrypt = 1; - - if (key && local->hw->set_key && - (!local->conf.sw_encrypt || !local->conf.sw_decrypt) && - (keyconf = ieee80211_key_data2conf(local, key)) != NULL) { - if (local->hw->set_key(dev, SET_KEY, addr, - keyconf, sta ? sta->aid : 0)) { - rc = HOSTAP_CRYPT_ERR_KEY_SET_FAILED; - key->force_sw_encrypt = 1; - key->hw_key_idx = HW_KEY_IDX_INVALID; - } else { - key->force_sw_encrypt = - keyconf->force_sw_encrypt; - key->hw_key_idx = - keyconf->hw_key_idx; - - } - } - kfree(keyconf); - - return rc; -} - - -static int ieee80211_ioctl_set_encryption(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len) -{ - struct ieee80211_local *local = dev->priv; - int alg, ret = 0; - struct sta_info *sta; - struct ieee80211_key **key; - int set_tx_key = 0, try_hwaccel = 1; - struct ieee80211_key_conf *keyconf; - struct ieee80211_sub_if_data *sdata; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - param->u.crypt.err = 0; - param->u.crypt.alg[HOSTAP_CRYPT_ALG_NAME_LEN - 1] = '\0'; - - if (param_len < - (int) ((char *) param->u.crypt.key - (char *) param) + - param->u.crypt.key_len) { - printk(KERN_DEBUG "%s: set_encrypt - invalid param_lem\n", - dev->name); - return -EINVAL; - } - - if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && - param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && - param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) { - sta = NULL; - if (param->u.crypt.idx >= NUM_DEFAULT_KEYS) { - printk(KERN_DEBUG "%s: set_encrypt - invalid idx=%d\n", - dev->name, param->u.crypt.idx); - return -EINVAL; - } - key = &sdata->keys[param->u.crypt.idx]; - if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) - set_tx_key = 1; - - /* Disable hwaccel for default keys when the interface is not - * the default one. - * TODO: consider adding hwaccel support for these; at least - * Atheros key cache should be able to handle this since AP is - * only transmitting frames with default keys. */ - /* FIX: hw key cache can be used when only one virtual - * STA is associated with each AP. If more than one STA - * is associated to the same AP, software encryption - * must be used. This should be done automatically - * based on configured station devices. For the time - * being, this can be only set at compile time. */ - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - if (0 /* FIX: more than one STA per AP */) - try_hwaccel = 0; - } else - if (sdata->type != IEEE80211_SUB_IF_TYPE_NORM || - dev != local->wdev) - try_hwaccel = 0; - } else { - if (param->u.crypt.idx != 0) { - printk(KERN_DEBUG "%s: set_encrypt - non-zero idx for " - "individual key\n", dev->name); - return -EINVAL; - } - - sta = sta_info_get(local, param->sta_addr); - if (sta == NULL) { - param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: set_encrypt - unknown addr " - MACSTR "\n", - dev->name, MAC2STR(param->sta_addr)); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - - return -ENOENT; - } - - key = &sta->key; - } - - if (strcmp(param->u.crypt.alg, "none") == 0) { - alg = ALG_NONE; - } else if (strcmp(param->u.crypt.alg, "WEP") == 0) { - alg = ALG_WEP; - } else if (strcmp(param->u.crypt.alg, "TKIP") == 0) { - if (param->u.crypt.key_len != ALG_TKIP_KEY_LEN) { - printk(KERN_DEBUG "%s: set_encrypt - invalid TKIP key " - "length %d\n", dev->name, - param->u.crypt.key_len); - ret = -EINVAL; - goto done; - } - alg = ALG_TKIP; - } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { - if (param->u.crypt.key_len != ALG_CCMP_KEY_LEN) { - printk(KERN_DEBUG "%s: set_encrypt - invalid CCMP key " - "length %d\n", dev->name, - param->u.crypt.key_len); - ret = -EINVAL; - goto done; - } - alg = ALG_CCMP; - } else { - param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ALG; - printk(KERN_DEBUG "%s: set_encrypt - unknown alg\n", - dev->name); - ret = -EINVAL; - goto done; - } - - /* FIX: - * Cannot configure default hwaccel keys with WEP algorithm, if - * any of the virtual interfaces is using static WEP - * configuration because hwaccel would otherwise try to decrypt - * these frames. - * - * For now, just disable WEP hwaccel for broadcast when there is - * possibility of conflict with default keys. This can maybe later be - * optimized by using non-default keys (at least with Atheros ar521x). - */ - if (!sta && alg == ALG_WEP && !local->default_wep_only && - local->conf.mode != IW_MODE_ADHOC && - local->conf.mode != IW_MODE_INFRA) { - try_hwaccel = 0; - } - - if (local->hw->device_hides_wep) { - /* Software encryption cannot be used with devices that hide - * encryption from the host system, so always try to use - * hardware acceleration with such devices. */ - try_hwaccel = 1; - } - - if (local->hw->no_tkip_wmm_hwaccel && alg == ALG_TKIP) { - if (sta && (sta->flags & WLAN_STA_WME)) { - /* Hardware does not support hwaccel with TKIP when using WMM. - */ - try_hwaccel = 0; - } - else if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - sta = sta_info_get(local, sdata->u.sta.bssid); - if (sta) { - if (sta->flags & WLAN_STA_WME) { - try_hwaccel = 0; - } - sta_info_release(local, sta); - sta = NULL; - } - } - } - - - if (alg == ALG_NONE) { - keyconf = NULL; - if (try_hwaccel && *key && local->hw->set_key && - (keyconf = ieee80211_key_data2conf(local, *key)) != NULL && - local->hw->set_key(dev, DISABLE_KEY, param->sta_addr, - keyconf, sta ? sta->aid : 0)) { - param->u.crypt.err = HOSTAP_CRYPT_ERR_KEY_SET_FAILED; - printk(KERN_DEBUG "%s: set_encrypt - low-level disable" - " failed\n", dev->name); - ret = -EINVAL; - } - kfree(keyconf); - - if (sdata->default_key == *key) - sdata->default_key = NULL; - kfree(*key); - *key = NULL; - } else { - if (*key == NULL || (*key)->keylen < param->u.crypt.key_len) { - kfree(*key); - *key = kmalloc(sizeof(struct ieee80211_key) + - param->u.crypt.key_len, GFP_ATOMIC); - if (*key == NULL) { - ret = -ENOMEM; - goto done; - } - } - memset(*key, 0, sizeof(struct ieee80211_key) + - param->u.crypt.key_len); - /* default to sw encryption; low-level driver sets these if the - * requested encryption is supported */ - (*key)->hw_key_idx = HW_KEY_IDX_INVALID; - (*key)->force_sw_encrypt = 1; - - (*key)->alg = alg; - (*key)->keyidx = param->u.crypt.idx; - (*key)->keylen = param->u.crypt.key_len; - memcpy((*key)->key, param->u.crypt.key, - param->u.crypt.key_len); - if (set_tx_key) - (*key)->default_tx_key = 1; - - if (alg == ALG_CCMP) { - /* Initialize AES key state here as an optimization - * so that it does not need to be initialized for every - * packet. */ - ieee80211_aes_key_setup_encrypt( - (*key)->u.ccmp.aes_state, (*key)->key); - } - - if (try_hwaccel && - (alg == ALG_WEP || alg == ALG_TKIP || alg == ALG_CCMP)) - param->u.crypt.err = ieee80211_set_hw_encryption( - dev, sta, param->sta_addr, *key); - } - - if (set_tx_key || (sta == NULL && sdata->default_key == NULL)) { - sdata->default_key = *key; - if (local->hw->set_key_idx && - local->hw->set_key_idx(dev, param->u.crypt.idx)) - printk(KERN_DEBUG "%s: failed to set TX key idx for " - "low-level driver\n", dev->name); - } - - done: - if (sta) - sta_info_release(local, sta); - - return ret; -} - -static int ieee80211_ioctl_get_encryption(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len) -{ - struct ieee80211_local *local = dev->priv; - int ret = 0; - struct sta_info *sta; - struct ieee80211_key **key; - int max_key_len; - struct ieee80211_sub_if_data *sdata; - u8 *pos; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - param->u.crypt.err = 0; - - max_key_len = param_len - - (int) ((char *) param->u.crypt.key - (char *) param); - if (max_key_len < 0) - return -EINVAL; - - if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && - param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && - param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) { - sta = NULL; - if (param->u.crypt.idx > NUM_DEFAULT_KEYS) { - param->u.crypt.idx = sdata->default_key ? - sdata->default_key->keyidx : 0; - return 0; - } else - key = &sdata->keys[param->u.crypt.idx]; - } else { - sta = sta_info_get(local, param->sta_addr); - if (sta == NULL) { - param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; - return -EINVAL; - } - - key = &sta->key; - } - - - memset(param->u.crypt.seq_counter, 0, HOSTAP_SEQ_COUNTER_SIZE); - if (*key == NULL) { - memcpy(param->u.crypt.alg, "none", 5); - param->u.crypt.key_len = 0; - param->u.crypt.idx = 0xff; - } else { - switch ((*key)->alg) { - case ALG_WEP: - memcpy(param->u.crypt.alg, "WEP", 4); - break; - case ALG_TKIP: - { - u32 iv32; - u16 iv16; - - memcpy(param->u.crypt.alg, "TKIP", 5); - if (local->hw->get_sequence_counter) { - /* Get transmit counter from low level driver */ - if (local->hw->get_sequence_counter(dev, - param->sta_addr, - (*key)->keyidx, - IEEE80211_SEQ_COUNTER_TX, - &iv32, - &iv16)) { - /* Error getting value from device */ - return -EIO; - } - } else { - /* Get it from our own local data */ - iv32 = (*key)->u.tkip.iv32; - iv16 = (*key)->u.tkip.iv16; - } - pos = param->u.crypt.seq_counter; - *pos++ = iv16 & 0xff; - *pos++ = (iv16 >> 8) & 0xff; - *pos++ = iv32 & 0xff; - *pos++ = (iv32 >> 8) & 0xff; - *pos++ = (iv32 >> 16) & 0xff; - *pos++ = (iv32 >> 24) & 0xff; - break; - } - case ALG_CCMP: - { - u8 *pn; - memcpy(param->u.crypt.alg, "CCMP", 5); - pos = param->u.crypt.seq_counter; - pn = (*key)->u.ccmp.tx_pn; - *pos++ = pn[5]; - *pos++ = pn[4]; - *pos++ = pn[3]; - *pos++ = pn[2]; - *pos++ = pn[1]; - *pos++ = pn[0]; - break; - } - default: - memcpy(param->u.crypt.alg, "unknown", 8); - break; - } - - if (max_key_len < (*key)->keylen) - ret = -E2BIG; - else { - param->u.crypt.key_len = (*key)->keylen; - memcpy(param->u.crypt.key, (*key)->key, - (*key)->keylen); - } - } - - if (sta) - sta_info_release(local, sta); - - return ret; -} - - -#ifdef CONFIG_HOSTAPD_WPA_TESTING -static int ieee80211_ioctl_wpa_trigger(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - - if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && - param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && - param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) { - local->wpa_trigger = param->u.wpa_trigger.trigger; - return 0; - } - - sta = sta_info_get(local, param->sta_addr); - if (sta == NULL) { - printk(KERN_DEBUG "%s: wpa_trigger - unknown addr\n", - dev->name); - return -EINVAL; - } - - sta->wpa_trigger = param->u.wpa_trigger.trigger; - - sta_info_release(local, sta); - return 0; -} -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - -static int ieee80211_ioctl_set_rate_sets(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len) -{ - struct ieee80211_local *local = dev->priv; - u16 *pos = (u16 *) param->u.set_rate_sets.data; - int left = param_len - ((u8 *) pos - (u8 *) param); - int i, mode, num_supp, num_basic, *supp, *basic, *prev; - - mode = param->u.set_rate_sets.mode; - num_supp = param->u.set_rate_sets.num_supported_rates; - num_basic = param->u.set_rate_sets.num_basic_rates; - - if (left < (num_supp + num_basic) * 2) { - printk(KERN_WARNING "%s: invalid length in hostapd set rate " - "sets ioctl (%d != %d)\n", dev->name, left, - (num_supp + num_basic) * 2); - return -EINVAL; - } - - supp = (int *) kmalloc((num_supp + 1) * sizeof(int), GFP_KERNEL); - basic = (int *) kmalloc((num_basic + 1) * sizeof(int), GFP_KERNEL); - - if (!supp || !basic) { - kfree(supp); - kfree(basic); - return -ENOMEM; - } - - for (i = 0; i < num_supp; i++) - supp[i] = *pos++; - supp[i] = -1; - - for (i = 0; i < num_basic; i++) - basic[i] = *pos++; - basic[i] = -1; - - if (num_supp == 0) { - kfree(supp); - supp = NULL; - } - - if (num_basic == 0) { - kfree(basic); - basic = NULL; - } - - prev = local->supp_rates[mode]; - local->supp_rates[mode] = supp; - kfree(prev); - - prev = local->basic_rates[mode]; - local->basic_rates[mode] = basic; - kfree(prev); - - if (mode == local->conf.phymode) { - /* TODO: should update STA TX rates and remove STAs if they - * do not have any remaining supported rates after the change - */ - ieee80211_prepare_rates(dev); - } - - return 0; -} - - -static int ieee80211_ioctl_add_if(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len) -{ - u8 *pos = param->u.if_info.data; - int left = param_len - ((u8 *) pos - (u8 *) param); - - if (param->u.if_info.type == HOSTAP_IF_WDS) { - struct ieee80211_if_wds iwds; - struct hostapd_if_wds *wds = - (struct hostapd_if_wds *) param->u.if_info.data; - - if (left < sizeof(struct ieee80211_if_wds)) - return -EPROTO; - - memcpy(iwds.remote_addr, wds->remote_addr, ETH_ALEN); - - return ieee80211_if_add_wds(dev, param->u.if_info.name, - &iwds, 1); - } else if (param->u.if_info.type == HOSTAP_IF_VLAN) { - struct hostapd_if_vlan *vlan = (struct hostapd_if_vlan *) pos; - struct ieee80211_if_vlan ivlan; - - if (left < sizeof(struct hostapd_if_vlan)) - return -EPROTO; - - ivlan.id = vlan->id; - - return ieee80211_if_add_vlan(dev, param->u.if_info.name, - &ivlan, 1); - } else if (param->u.if_info.type == HOSTAP_IF_BSS) { - struct hostapd_if_bss *bss = - (struct hostapd_if_bss *) param->u.if_info.data; - - if (left < sizeof(struct hostapd_if_bss)) - return -EPROTO; - - return ieee80211_if_add_norm(dev, param->u.if_info.name, - bss->bssid, 1); - } else if (param->u.if_info.type == HOSTAP_IF_STA) { -#if 0 - struct hostapd_if_sta *sta = - (struct hostapd_if_sta *) param->u.if_info.data; -#endif - - if (left < sizeof(struct hostapd_if_sta)) - return -EPROTO; - - return ieee80211_if_add_sta(dev, param->u.if_info.name, 1); - } else - return -EINVAL; - - return 0; -} - - -static int ieee80211_ioctl_remove_if(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - if (param->u.if_info.type == HOSTAP_IF_WDS) { - return ieee80211_if_remove_wds(dev, param->u.if_info.name, 1); - } else if (param->u.if_info.type == HOSTAP_IF_VLAN) { - return ieee80211_if_remove_vlan(dev, param->u.if_info.name, 1); - } else if (param->u.if_info.type == HOSTAP_IF_BSS) { - return ieee80211_if_remove_norm(dev, param->u.if_info.name, 1); - } else if (param->u.if_info.type == HOSTAP_IF_STA) { - return ieee80211_if_remove_sta(dev, param->u.if_info.name, 1); - } else { - return -EINVAL; - } -} - - -static int ieee80211_ioctl_update_if(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len) -{ - u8 *pos = param->u.if_info.data; - int left = param_len - ((u8 *) pos - (u8 *) param); - - if (param->u.if_info.type == HOSTAP_IF_WDS) { - struct ieee80211_if_wds iwds; - struct hostapd_if_wds *wds = - (struct hostapd_if_wds *) param->u.if_info.data; - - if (left < sizeof(struct ieee80211_if_wds)) - return -EPROTO; - - memcpy(iwds.remote_addr, wds->remote_addr, ETH_ALEN); - - return ieee80211_if_update_wds(dev, param->u.if_info.name, - &iwds, 1); - } else { - return -EOPNOTSUPP; - } -} - - -static int ieee80211_ioctl_flush_ifs(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - return ieee80211_if_flush(dev, 1); -} - - -static int ieee80211_ioctl_scan_req(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len) -{ - u8 *pos = param->u.scan_req.ssid; - int left = param_len - ((u8 *) pos - (u8 *) param); - int len = param->u.scan_req.ssid_len; - - if (left < len || len > IEEE80211_MAX_SSID_LEN) - return -EINVAL; - - return ieee80211_sta_req_scan(dev, pos, len); -} - - -static int ieee80211_ioctl_sta_get_state(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_sub_if_data *sdata; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - return -EINVAL; - param->u.sta_get_state.state = sdata->u.sta.state; - return 0; -} - - -static int ieee80211_ioctl_mlme(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_sub_if_data *sdata; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - return -EINVAL; - switch (param->u.mlme.cmd) { - case MLME_STA_DEAUTH: - ieee80211_sta_deauthenticate(dev, param->u.mlme.reason_code); - break; - case MLME_STA_DISASSOC: - ieee80211_sta_disassociate(dev, param->u.mlme.reason_code); - break; - } - return 0; -} - - -static int ieee80211_ioctl_get_load_stats(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - - param->u.get_load_stats.channel_use = local->channel_use; -/* if (param->u.get_load_stats.flags & LOAD_STATS_CLEAR) - local->channel_use = 0; */ /* now it's not raw counter */ - - return 0; -} - - -static int ieee80211_ioctl_set_sta_vlan(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - - sta = sta_info_get(local, param->sta_addr); - if (sta) { - struct net_device *new_vlan_dev; - new_vlan_dev = - dev_get_by_name(param->u.set_sta_vlan.vlan_name); - if (new_vlan_dev) { -#if 0 - printk("%s: Station " MACSTR " moved to vlan: %s\n", - dev->name, MAC2STR(param->sta_addr), - new_vlan_dev->name); -#endif - sta->dev = new_vlan_dev; - sta->vlan_id = param->u.set_sta_vlan.vlan_id; - dev_put(new_vlan_dev); - } - sta_info_release(local, sta); - } - - return sta ? 0 : -ENOENT; -} - - -static int -ieee80211_ioctl_set_generic_info_elem(struct net_device *dev, - struct prism2_hostapd_param *param, - int param_len) -{ - struct ieee80211_local *local = dev->priv; - u8 *pos = param->u.set_generic_info_elem.data; - int left = param_len - ((u8 *) pos - (u8 *) param); - int len = param->u.set_generic_info_elem.len; - - if (left < len) - return -EINVAL; - - { - struct ieee80211_sub_if_data *sdata; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) - return ieee80211_sta_set_extra_ie(dev, pos, len); - } - kfree(local->conf.generic_elem); - local->conf.generic_elem = kmalloc(len, GFP_KERNEL); - if (local->conf.generic_elem == NULL) - return -ENOMEM; - memcpy(local->conf.generic_elem, pos, len); - local->conf.generic_elem_len = len; - - return ieee80211_hw_config(dev); -} - - -static int ieee80211_ioctl_set_regulatory_domain(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_conf *conf = ieee80211_get_hw_conf(dev); - conf->regulatory_domain = param->u.set_regulatory_domain.rd; - return 0; -} - - -static int ieee80211_ioctl_set_adm_status(struct net_device *dev, - int val) -{ - struct ieee80211_conf *conf = ieee80211_get_hw_conf(dev); - conf->adm_status = val; - return ieee80211_hw_config(dev); -} - -static int -ieee80211_ioctl_set_tx_queue_params(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_tx_queue_params qparam; - - if (!local->hw->conf_tx) { - printk(KERN_DEBUG "%s: low-level driver does not support TX " - "queue configuration\n", dev->name); - return -EOPNOTSUPP; - } - - memset(&qparam, 0, sizeof(qparam)); - qparam.aifs = param->u.tx_queue_params.aifs; - qparam.cw_min = param->u.tx_queue_params.cw_min; - qparam.cw_max = param->u.tx_queue_params.cw_max; - qparam.burst_time = param->u.tx_queue_params.burst_time; - - return local->hw->conf_tx(dev, param->u.tx_queue_params.queue, - &qparam); -} - - -static int ieee80211_ioctl_get_tx_stats(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_tx_queue_stats stats; - int ret, i; - - if (!local->hw->get_tx_stats) - return -EOPNOTSUPP; - - memset(&stats, 0, sizeof(stats)); - ret = local->hw->get_tx_stats(dev, &stats); - if (ret) - return ret; - - for (i = 0; i < 4; i++) { - param->u.get_tx_stats.data[i].len = stats.data[i].len; - param->u.get_tx_stats.data[i].limit = stats.data[i].limit; - param->u.get_tx_stats.data[i].count = stats.data[i].count; - } - - return 0; -} - - -static int ieee80211_ioctl_set_bss(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_conf *conf = ieee80211_get_hw_conf(dev); - int i, bss_count; - int new_count = param->u.set_bss.bss_count; - struct net_device **bss_devs, **prev; - struct net_device **sta_devs, **prev_sta_devs; - - bss_count = 0; - for (i = 0; i < conf->bss_count; i++) { - if (local->bss_devs[i]) - bss_count++; - } - - if (new_count < bss_count) { - printk(KERN_DEBUG "%s: invalid BSS count %d (in use: %d)\n", - dev->name, new_count, bss_count); - return -EINVAL; - } - - bss_devs = kmalloc(new_count * sizeof(struct net_device *), - GFP_KERNEL); - if (bss_devs == NULL) - return -ENOMEM; - sta_devs = kmalloc(new_count * sizeof(struct net_device *), - GFP_KERNEL); - if (sta_devs == NULL) { - kfree(bss_devs); - return -ENOMEM; - } - - spin_lock_bh(&local->sub_if_lock); - memcpy(bss_devs, local->bss_devs, - bss_count * sizeof(struct net_device *)); - memset(&bss_devs[bss_count], 0, - (new_count - bss_count) * sizeof(struct net_device *)); - - memcpy(conf->bssid_mask, param->u.set_bss.bssid_mask, ETH_ALEN); - - prev = local->bss_devs; - local->bss_devs = bss_devs; - conf->bss_count = new_count; - - memcpy(sta_devs, local->sta_devs, - bss_count * sizeof(struct net_device *)); - memset(&sta_devs[bss_count], 0, - (new_count - bss_count) * sizeof(struct net_device *)); - prev_sta_devs = local->sta_devs; - local->sta_devs = sta_devs; - - spin_unlock_bh(&local->sub_if_lock); - kfree(prev); - kfree(prev_sta_devs); - - return ieee80211_hw_config(dev); -} - - -static int ieee80211_ioctl_set_channel_flag(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_hw_modes *mode = NULL; - struct ieee80211_channel *chan = NULL; - int i; - - for (i = 0; i < local->hw->num_modes; i++) { - mode = &local->hw->modes[i]; - if (mode->mode == param->u.set_channel_flag.mode) - break; - mode = NULL; - } - - if (!mode) - return -ENOENT; - - for (i = 0; i < mode->num_channels; i++) { - chan = &mode->channels[i]; - if (chan->chan == param->u.set_channel_flag.chan) - break; - chan = NULL; - } - - if (!chan) - return -ENOENT; - - chan->flag = param->u.set_channel_flag.flag; - chan->power_level = param->u.set_channel_flag.power_level; - chan->antenna_max = param->u.set_channel_flag.antenna_max; - - return 0; -} - - -static int ieee80211_ioctl_set_quiet_params(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - struct ieee80211_conf *conf = ieee80211_get_hw_conf(dev); - conf->quiet_duration = param->u.quiet.duration; - conf->quiet_offset = param->u.quiet.offset; - conf->quiet_period = param->u.quiet.period; - return 0; -} - - -static int ieee80211_ioctl_set_radar_params(struct net_device *dev, - struct prism2_hostapd_param *param) -{ - /* struct ieee80211_conf *conf = ieee80211_get_hw_conf(dev); */ - return 0; -} - - -static int ieee80211_ioctl_priv_hostapd(struct net_device *dev, - struct iw_point *p) -{ - struct prism2_hostapd_param *param; - int ret = 0; - - if (p->length < sizeof(struct prism2_hostapd_param) || - p->length > PRISM2_HOSTAPD_MAX_BUF_SIZE || !p->pointer) { - printk(KERN_DEBUG "%s: hostapd ioctl: ptr=%p len=%d min=%d " - "max=%d\n", dev->name, p->pointer, p->length, - (int)sizeof(struct prism2_hostapd_param), - PRISM2_HOSTAPD_MAX_BUF_SIZE); - return -EINVAL; - } - - param = (struct prism2_hostapd_param *) kmalloc(p->length, GFP_KERNEL); - if (param == NULL) - return -ENOMEM; - - if (copy_from_user(param, p->pointer, p->length)) { - ret = -EFAULT; - goto out; - } - - switch (param->cmd) { - case PRISM2_HOSTAPD_FLUSH: - ret = ieee80211_ioctl_flush(dev, param); - break; - case PRISM2_HOSTAPD_ADD_STA: - ret = ieee80211_ioctl_add_sta(dev, param); - break; - case PRISM2_HOSTAPD_REMOVE_STA: - ret = ieee80211_ioctl_remove_sta(dev, param); - break; - case PRISM2_HOSTAPD_GET_INFO_STA: - ret = ieee80211_ioctl_get_info_sta(dev, param); - break; - case PRISM2_SET_ENCRYPTION: - ret = ieee80211_ioctl_set_encryption(dev, param, p->length); - break; - case PRISM2_GET_ENCRYPTION: - ret = ieee80211_ioctl_get_encryption(dev, param, p->length); - break; - case PRISM2_HOSTAPD_SET_FLAGS_STA: - ret = ieee80211_ioctl_set_flags_sta(dev, param); - break; - case PRISM2_HOSTAPD_SET_BEACON: - ret = ieee80211_ioctl_set_beacon(dev, param, p->length, 0); - break; - case PRISM2_HOSTAPD_GET_HW_FEATURES: - ret = ieee80211_ioctl_get_hw_features(dev, param, p->length); - break; - case PRISM2_HOSTAPD_SCAN: - ret = ieee80211_ioctl_scan(dev, param); - break; -#ifdef CONFIG_HOSTAPD_WPA_TESTING - case PRISM2_HOSTAPD_WPA_TRIGGER: - ret = ieee80211_ioctl_wpa_trigger(dev, param); - break; -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - case PRISM2_HOSTAPD_SET_RATE_SETS: - ret = ieee80211_ioctl_set_rate_sets(dev, param, p->length); - break; - case PRISM2_HOSTAPD_ADD_IF: - ret = ieee80211_ioctl_add_if(dev, param, p->length); - break; - case PRISM2_HOSTAPD_REMOVE_IF: - ret = ieee80211_ioctl_remove_if(dev, param); - break; - case PRISM2_HOSTAPD_GET_DOT11COUNTERSTABLE: - ret = ieee80211_ioctl_get_dot11counterstable(dev, param); - break; - case PRISM2_HOSTAPD_GET_LOAD_STATS: - ret = ieee80211_ioctl_get_load_stats(dev, param); - break; - case PRISM2_HOSTAPD_SET_STA_VLAN: - ret = ieee80211_ioctl_set_sta_vlan(dev, param); - break; - case PRISM2_HOSTAPD_SET_GENERIC_INFO_ELEM: - ret = ieee80211_ioctl_set_generic_info_elem(dev, param, - p->length); - break; - case PRISM2_HOSTAPD_SET_CHANNEL_FLAG: - ret = ieee80211_ioctl_set_channel_flag(dev, param); - break; - case PRISM2_HOSTAPD_SET_REGULATORY_DOMAIN: - ret = ieee80211_ioctl_set_regulatory_domain(dev, param); - break; - case PRISM2_HOSTAPD_SET_TX_QUEUE_PARAMS: - ret = ieee80211_ioctl_set_tx_queue_params(dev, param); - break; - case PRISM2_HOSTAPD_SET_BSS: - ret = ieee80211_ioctl_set_bss(dev, param); - break; - case PRISM2_HOSTAPD_GET_TX_STATS: - ret = ieee80211_ioctl_get_tx_stats(dev, param); - break; - case PRISM2_HOSTAPD_UPDATE_IF: - ret = ieee80211_ioctl_update_if(dev, param, p->length); - break; - case PRISM2_HOSTAPD_SCAN_REQ: - ret = ieee80211_ioctl_scan_req(dev, param, p->length); - break; - case PRISM2_STA_GET_STATE: - ret = ieee80211_ioctl_sta_get_state(dev, param); - break; - case PRISM2_HOSTAPD_MLME: - ret = ieee80211_ioctl_mlme(dev, param); - break; - case PRISM2_HOSTAPD_FLUSH_IFS: - ret = ieee80211_ioctl_flush_ifs(dev, param); - break; - case PRISM2_HOSTAPD_SET_RADAR_PARAMS: - ret = ieee80211_ioctl_set_radar_params(dev, param); - break; - case PRISM2_HOSTAPD_SET_QUIET_PARAMS: - ret = ieee80211_ioctl_set_quiet_params(dev, param); - break; - default: - ret = -EOPNOTSUPP; - break; - } - - if (copy_to_user(p->pointer, param, p->length)) - ret = -EFAULT; - - out: - kfree(param); - - return ret; -} - - -static int ieee80211_ioctl_giwname(struct net_device *dev, - struct iw_request_info *info, - char *name, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - switch (local->conf.phymode) { - case MODE_IEEE80211A: - strcpy(name, "IEEE 802.11a"); - break; - case MODE_IEEE80211B: - strcpy(name, "IEEE 802.11b"); - break; - case MODE_IEEE80211G: - strcpy(name, "IEEE 802.11g"); - break; - case MODE_ATHEROS_TURBO: - strcpy(name, "5GHz Turbo"); - break; - default: - strcpy(name, "IEEE 802.11"); - break; - } - - return 0; -} - - -static int ieee80211_ioctl_giwrange(struct net_device *dev, - struct iw_request_info *info, - struct iw_point *data, char *extra) -{ - struct iw_range *range = (struct iw_range *) extra; - - data->length = sizeof(struct iw_range); - memset(range, 0, sizeof(struct iw_range)); - - range->we_version_compiled = WIRELESS_EXT; - range->we_version_source = 14; - range->retry_capa = IW_RETRY_LIMIT; - range->retry_flags = IW_RETRY_LIMIT; - range->min_retry = 0; - range->max_retry = 255; - range->min_rts = 0; - range->max_rts = 2347; - range->min_frag = 256; - range->max_frag = 2346; - - return 0; -} - - -struct ieee80211_channel_range { - short start_freq; - short end_freq; - unsigned char power_level; - unsigned char antenna_max; -}; - -static const struct ieee80211_channel_range ieee80211_fcc_channels[] = { - { 2412, 2462, 27, 6 } /* IEEE 802.11b/g, channels 1..11 */, - { 5180, 5240, 17, 6 } /* IEEE 802.11a, channels 36..48 */, - { 5260, 5320, 23, 6 } /* IEEE 802.11a, channels 52..64 */, - { 5745, 5825, 30, 6 } /* IEEE 802.11a, channels 149..165, outdoor */, - { 0 } -}; - -static const struct ieee80211_channel_range ieee80211_mkk_channels[] = { - { 2412, 2472, 20, 6 } /* IEEE 802.11b/g, channels 1..13 */, - { 5170, 5240, 20, 6 } /* IEEE 802.11a, channels 34..48 */, - { 5260, 5320, 20, 6 } /* IEEE 802.11a, channels 52..64 */, - { 0 } -}; - - -static const struct ieee80211_channel_range *channel_range = - ieee80211_fcc_channels; - - -static void ieee80211_unmask_channel(struct net_device *dev, int mode, - struct ieee80211_channel *chan) -{ - int i; - - chan->flag = 0; - - if (ieee80211_regdom == 64 && - (mode == MODE_ATHEROS_TURBO || mode == MODE_ATHEROS_TURBOG)) { - /* Do not allow Turbo modes in Japan. */ - return; - } - - for (i = 0; channel_range[i].start_freq; i++) { - const struct ieee80211_channel_range *r = &channel_range[i]; - if (r->start_freq <= chan->freq && r->end_freq >= chan->freq) { - if (ieee80211_regdom == 64 && !ieee80211_japan_5ghz && - chan->freq >= 5260 && chan->freq <= 5320) { - /* - * Skip new channels in Japan since the - * firmware was not marked having been upgraded - * by the vendor. - */ - continue; - } - - if (ieee80211_regdom == 0x10 && - (chan->freq == 5190 || chan->freq == 5210 || - chan->freq == 5230)) { - /* Skip MKK channels when in FCC domain. */ - continue; - } - - chan->flag |= IEEE80211_CHAN_W_SCAN | - IEEE80211_CHAN_W_ACTIVE_SCAN | - IEEE80211_CHAN_W_IBSS; - chan->power_level = r->power_level; - chan->antenna_max = r->antenna_max; - - if (ieee80211_regdom == 64 && - (chan->freq == 5170 || chan->freq == 5190 || - chan->freq == 5210 || chan->freq == 5230)) { - /* - * New regulatory rules in Japan have backwards - * compatibility with old channels in 5.15-5.25 - * GHz band, but the station is not allowed to - * use active scan on these old channels. - */ - chan->flag &= ~IEEE80211_CHAN_W_ACTIVE_SCAN; - } - - if (ieee80211_regdom == 64 && - (chan->freq == 5260 || chan->freq == 5280 || - chan->freq == 5300 || chan->freq == 5320)) { - /* - * IBSS is not allowed on 5.25-5.35 GHz band - * due to radar detection requirements. - */ - chan->flag &= ~IEEE80211_CHAN_W_IBSS; - } - - break; - } - } -} - - -static int ieee80211_unmask_channels(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - int m, c; - - for (m = 0; m < local->hw->num_modes; m++) { - struct ieee80211_hw_modes *mode = &local->hw->modes[m]; - for (c = 0; c < mode->num_channels; c++) { - ieee80211_unmask_channel(dev, mode->mode, - &mode->channels[c]); - } - } - return 0; -} - - -static int ieee80211_init_client(struct net_device *dev) -{ - if (ieee80211_regdom == 0x40) - channel_range = ieee80211_mkk_channels; - ieee80211_unmask_channels(dev); - ieee80211_ioctl_set_adm_status(dev, 1); - return 0; -} - - -static int ieee80211_is_client_mode(int iw_mode) -{ - return (iw_mode == IW_MODE_INFRA || iw_mode == IW_MODE_ADHOC); -} - - -static int ieee80211_ioctl_siwmode(struct net_device *dev, - struct iw_request_info *info, - __u32 *mode, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - if (!ieee80211_is_client_mode(local->conf.mode) && - ieee80211_is_client_mode(*mode)) { - ieee80211_init_client(dev); - } - if (local->conf.mode != *mode) { - struct ieee80211_sub_if_data *sdata = - IEEE80211_DEV_TO_SUB_IF(dev); - sta_info_flush(local, NULL); - if (local->conf.mode == IW_MODE_ADHOC && - sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - /* Clear drop_unencrypted when leaving adhoc mode since - * only adhoc mode is using automatic setting for this - * in 80211.o. */ - sdata->drop_unencrypted = 0; - } - if (*mode == IW_MODE_MASTER) { - /* AP mode does not currently use ACM bits to limit - * TX, so clear the bitfield here. */ - local->wmm_acm = 0; - } - } - local->conf.mode = *mode; - return ieee80211_hw_config(dev); -} - - -static int ieee80211_ioctl_giwmode(struct net_device *dev, - struct iw_request_info *info, - __u32 *mode, char *extra) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - if (local->conf.mode == IW_MODE_ADHOC) - *mode = IW_MODE_ADHOC; - else - *mode = IW_MODE_INFRA; - } else - *mode = local->conf.mode; - return 0; -} - - -int ieee80211_ioctl_siwfreq(struct net_device *dev, - struct iw_request_info *info, - struct iw_freq *freq, char *extra) -{ - struct ieee80211_local *local = dev->priv; - int m, c, nfreq, set = 0; - - /* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */ - if (freq->e == 0) - nfreq = -1; - else { - int i, div = 1000000; - for (i = 0; i < freq->e; i++) - div /= 10; - if (div > 0) - nfreq = freq->m / div; - else - return -EINVAL; - } - - for (m = 0; m < local->hw->num_modes; m++) { - struct ieee80211_hw_modes *mode = &local->hw->modes[m]; - for (c = 0; c < mode->num_channels; c++) { - struct ieee80211_channel *chan = &mode->channels[c]; - if (chan->flag & IEEE80211_CHAN_W_SCAN && - ((freq->e == 0 && chan->chan == freq->m) || - (freq->e > 0 && nfreq == chan->freq)) && - (local->hw_modes & (1 << mode->mode))) { - /* Use next_mode as the mode preference to - * resolve non-unique channel numbers. */ - if (set && mode->mode != local->next_mode) - continue; - - local->conf.channel = chan->chan; - local->conf.channel_val = chan->val; - local->conf.power_level = chan->power_level; - local->conf.freq = chan->freq; - local->conf.phymode = mode->mode; - local->conf.antenna_max = chan->antenna_max; - set++; - } - } - } - - if (set) { - local->sta_scanning = 0; /* Abort possible scan */ - return ieee80211_hw_config(dev); - } - - return -EINVAL; -} - - -static int ieee80211_ioctl_giwfreq(struct net_device *dev, - struct iw_request_info *info, - struct iw_freq *freq, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - /* TODO: in station mode (Managed/Ad-hoc) might need to poll low-level - * driver for the current channel with firmware-based management */ - - freq->m = local->conf.freq; - freq->e = 6; - - return 0; -} - - -static int ieee80211_ioctl_siwessid(struct net_device *dev, - struct iw_request_info *info, - struct iw_point *data, char *ssid) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata; - size_t len = data->length; - - /* iwconfig uses nul termination in SSID.. */ - if (len > 0 && ssid[len - 1] == '\0') - len--; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) - return ieee80211_sta_set_ssid(dev, ssid, len); - - kfree(local->conf.ssid); - local->conf.ssid = kmalloc(len + 1, GFP_KERNEL); - if (local->conf.ssid == NULL) - return -ENOMEM; - memcpy(local->conf.ssid, ssid, len); - local->conf.ssid[len] = '\0'; - local->conf.ssid_len = len; - return ieee80211_hw_config(dev); -} - - -static int ieee80211_ioctl_giwessid(struct net_device *dev, - struct iw_request_info *info, - struct iw_point *data, char *ssid) -{ - struct ieee80211_local *local = dev->priv; - size_t len; - - struct ieee80211_sub_if_data *sdata; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - int res = ieee80211_sta_get_ssid(dev, ssid, &len); - if (res == 0) - data->length = len; - return res; - } - - len = local->conf.ssid_len; - if (len > IW_ESSID_MAX_SIZE) - len = IW_ESSID_MAX_SIZE; - memcpy(ssid, local->conf.ssid, len); - data->length = len; - return 0; -} - - -static int ieee80211_ioctl_siwap(struct net_device *dev, - struct iw_request_info *info, - struct sockaddr *ap_addr, char *extra) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - int changed_bssid = 0; - if (memcmp(local->conf.client_bssid, (u8 *) &ap_addr->sa_data, - ETH_ALEN) != 0) - changed_bssid = 1; - memcpy(local->conf.client_bssid, (u8 *) &ap_addr->sa_data, - ETH_ALEN); - if (changed_bssid && ieee80211_hw_config(dev)) { - printk(KERN_DEBUG "%s: Failed to config new BSSID to " - "the low-level driver\n", dev->name); - } - return ieee80211_sta_set_bssid(dev, (u8 *) &ap_addr->sa_data); - } - - return -EOPNOTSUPP; -} - - -static int ieee80211_ioctl_giwap(struct net_device *dev, - struct iw_request_info *info, - struct sockaddr *ap_addr, char *extra) -{ - struct ieee80211_sub_if_data *sdata; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - ap_addr->sa_family = ARPHRD_ETHER; - memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); - return 0; - } - - return -EOPNOTSUPP; -} - - -static int ieee80211_ioctl_siwscan(struct net_device *dev, - struct iw_request_info *info, - struct iw_point *data, char *extra) -{ - struct ieee80211_local *local = dev->priv; - u8 *ssid = NULL; - size_t ssid_len = 0; - - if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) { - ssid = local->conf.ssid; - ssid_len = local->conf.ssid_len; - } - return ieee80211_sta_req_scan(dev, ssid, ssid_len); -} - - -static int ieee80211_ioctl_giwscan(struct net_device *dev, - struct iw_request_info *info, - struct iw_point *data, char *extra) -{ - int res; - struct ieee80211_local *local = dev->priv; - if (local->sta_scanning) - return -EAGAIN; - res = ieee80211_sta_scan_results(dev, extra, IW_SCAN_MAX_DATA); - if (res >= 0) { - data->length = res; - return 0; - } - data->length = 0; - return res; -} - - -static int ieee80211_ioctl_siwrts(struct net_device *dev, - struct iw_request_info *info, - struct iw_param *rts, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - if (rts->disabled) - local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; - else if (rts->value < 0 || rts->value > IEEE80211_MAX_RTS_THRESHOLD) - return -EINVAL; - else - local->rts_threshold = rts->value; - - /* If the wlan card performs RTS/CTS in hardware/firmware, - * configure it here */ - - if (local->hw->set_rts_threshold) { - local->hw->set_rts_threshold(dev, local->rts_threshold); - } - - return 0; -} - -static int ieee80211_ioctl_giwrts(struct net_device *dev, - struct iw_request_info *info, - struct iw_param *rts, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - rts->value = local->rts_threshold; - rts->disabled = (rts->value >= IEEE80211_MAX_RTS_THRESHOLD); - rts->fixed = 1; - - return 0; -} - - -static int ieee80211_ioctl_siwfrag(struct net_device *dev, - struct iw_request_info *info, - struct iw_param *frag, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - if (frag->disabled) - local->fragmentation_threshold = IEEE80211_MAX_FRAG_THRESHOLD; - else if (frag->value < 256 || - frag->value > IEEE80211_MAX_FRAG_THRESHOLD) - return -EINVAL; - else { - /* Fragment length must be even, so strip LSB. */ - local->fragmentation_threshold = frag->value & ~0x1; - } - - /* If the wlan card performs fragmentation in hardware/firmware, - * configure it here */ - - if (local->hw->set_frag_threshold) { - local->hw->set_frag_threshold( - dev, local->fragmentation_threshold); - } - - return 0; -} - -static int ieee80211_ioctl_giwfrag(struct net_device *dev, - struct iw_request_info *info, - struct iw_param *frag, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - frag->value = local->fragmentation_threshold; - frag->disabled = (frag->value >= IEEE80211_MAX_RTS_THRESHOLD); - frag->fixed = 1; - - return 0; -} - - -static int ieee80211_ioctl_siwretry(struct net_device *dev, - struct iw_request_info *info, - struct iw_param *retry, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - if (retry->disabled || - (retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT) - return -EINVAL; - - if (retry->flags & IW_RETRY_MAX) - local->long_retry_limit = retry->value; - else if (retry->flags & IW_RETRY_MIN) - local->short_retry_limit = retry->value; - else { - local->long_retry_limit = retry->value; - local->short_retry_limit = retry->value; - } - - if (local->hw->set_retry_limit) { - return local->hw->set_retry_limit( - dev, local->short_retry_limit, - local->long_retry_limit); - } - - return 0; -} - - -static int ieee80211_ioctl_giwretry(struct net_device *dev, - struct iw_request_info *info, - struct iw_param *retry, char *extra) -{ - struct ieee80211_local *local = dev->priv; - - retry->disabled = 0; - if ((retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT) - return -EINVAL; - if (retry->flags & IW_RETRY_MAX) { - retry->flags = IW_RETRY_LIMIT | IW_RETRY_MAX; - retry->value = local->long_retry_limit; - } else { - retry->flags = IW_RETRY_LIMIT; - retry->value = local->short_retry_limit; - if (local->long_retry_limit != local->short_retry_limit) - retry->flags |= IW_RETRY_MIN; - } - - return 0; -} - - -static void ieee80211_ioctl_unmask_channels(struct ieee80211_local *local) -{ - int m, c; - - for (m = 0; m < local->hw->num_modes; m++) { - struct ieee80211_hw_modes *mode = &local->hw->modes[m]; - for (c = 0; c < mode->num_channels; c++) { - struct ieee80211_channel *chan = &mode->channels[c]; - chan->flag |= IEEE80211_CHAN_W_SCAN; - } - } -} - - -static int ieee80211_ioctl_test_mode(struct net_device *dev, int mode) -{ - struct ieee80211_local *local = dev->priv; - int ret = -EOPNOTSUPP; - - if (mode == IEEE80211_TEST_UNMASK_CHANNELS) { - ieee80211_ioctl_unmask_channels(local); - ret = 0; - } - - if (local->hw->test_mode) - ret = local->hw->test_mode(dev, mode); - - return ret; -} - - -static int ieee80211_ioctl_clear_keys(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_key_conf key; - struct list_head *ptr; - int i; - u8 addr[ETH_ALEN]; - struct ieee80211_key_conf *keyconf; - - memset(addr, 0xff, ETH_ALEN); - list_for_each(ptr, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - for (i = 0; i < NUM_DEFAULT_KEYS; i++) { - keyconf = NULL; - if (sdata->keys[i] && - !sdata->keys[i]->force_sw_encrypt && - local->hw->set_key && - (keyconf = ieee80211_key_data2conf(local, - sdata->keys[i])) - != NULL) - local->hw->set_key(dev, DISABLE_KEY, addr, - keyconf, 0); - kfree(keyconf); - kfree(sdata->keys[i]); - sdata->keys[i] = NULL; - } - sdata->default_key = NULL; - } - - spin_lock_bh(&local->sta_lock); - list_for_each(ptr, &local->sta_list) { - struct sta_info *sta = - list_entry(ptr, struct sta_info, list); - keyconf = NULL; - if (sta->key && !sta->key->force_sw_encrypt && - local->hw->set_key && - (keyconf = ieee80211_key_data2conf(local, sta->key)) - != NULL) - local->hw->set_key(dev, DISABLE_KEY, sta->addr, - keyconf, sta->aid); - kfree(keyconf); - kfree(sta->key); - sta->key = NULL; - } - spin_unlock_bh(&local->sta_lock); - - - memset(&key, 0, sizeof(key)); - if (local->hw->set_key && - local->hw->set_key(dev, REMOVE_ALL_KEYS, NULL, - &key, 0)) - printk(KERN_DEBUG "%s: failed to remove hwaccel keys\n", - dev->name); - - return 0; -} - - -static int -ieee80211_ioctl_force_unicast_rate(struct net_device *dev, - struct ieee80211_sub_if_data *sdata, - int rate) -{ - struct ieee80211_local *local = dev->priv; - int i; - - if (sdata->type != IEEE80211_SUB_IF_TYPE_NORM) - return -ENOENT; - - if (rate == 0) { - sdata->u.norm.force_unicast_rateidx = -1; - return 0; - } - - for (i = 0; i < local->num_curr_rates; i++) { - if (local->curr_rates[i].rate == rate) { - sdata->u.norm.force_unicast_rateidx = i; - return 0; - } - } - return -EINVAL; -} - - -static int -ieee80211_ioctl_max_ratectrl_rate(struct net_device *dev, - struct ieee80211_sub_if_data *sdata, - int rate) -{ - struct ieee80211_local *local = dev->priv; - int i; - - if (sdata->type != IEEE80211_SUB_IF_TYPE_NORM) - return -ENOENT; - - if (rate == 0) { - sdata->u.norm.max_ratectrl_rateidx = -1; - return 0; - } - - for (i = 0; i < local->num_curr_rates; i++) { - if (local->curr_rates[i].rate == rate) { - sdata->u.norm.max_ratectrl_rateidx = i; - return 0; - } - } - return -EINVAL; -} - - -static void ieee80211_key_enable_hwaccel(struct ieee80211_local *local, - struct ieee80211_key *key) -{ - struct ieee80211_key_conf *keyconf; - u8 addr[ETH_ALEN]; - - if (key == NULL || key->alg != ALG_WEP || !key->force_sw_encrypt || - local->hw->device_hides_wep) - return; - - memset(addr, 0xff, ETH_ALEN); - keyconf = ieee80211_key_data2conf(local, key); - if (keyconf && local->hw->set_key && - local->hw->set_key(local->mdev, SET_KEY, addr, keyconf, 0) == 0) { - key->force_sw_encrypt = keyconf->force_sw_encrypt; - key->hw_key_idx = keyconf->hw_key_idx; - } - kfree(keyconf); -} - - -static void ieee80211_key_disable_hwaccel(struct ieee80211_local *local, - struct ieee80211_key *key) -{ - struct ieee80211_key_conf *keyconf; - u8 addr[ETH_ALEN]; - - if (key == NULL || key->alg != ALG_WEP || key->force_sw_encrypt || - local->hw->device_hides_wep) - return; - - memset(addr, 0xff, ETH_ALEN); - keyconf = ieee80211_key_data2conf(local, key); - if (keyconf && local->hw->set_key) - local->hw->set_key(local->mdev, DISABLE_KEY, addr, keyconf, 0); - kfree(keyconf); - key->force_sw_encrypt = 1; -} - - -static int ieee80211_ioctl_default_wep_only(struct ieee80211_local *local, - int value) -{ - int i; - struct list_head *ptr; - - local->default_wep_only = value; - list_for_each(ptr, &local->sub_if_list) { - struct ieee80211_sub_if_data *sdata = - list_entry(ptr, struct ieee80211_sub_if_data, list); - for (i = 0; i < NUM_DEFAULT_KEYS; i++) { - if (value) { - ieee80211_key_enable_hwaccel(local, - sdata->keys[i]); - } else { - ieee80211_key_disable_hwaccel(local, - sdata->keys[i]); - } - } - } - - return 0; -} - - -static int ieee80211_ioctl_prism2_param(struct net_device *dev, - struct iw_request_info *info, - void *wrqu, char *extra) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata; - int *i = (int *) extra; - int param = *i; - int value = *(i + 1); - int ret = 0; - - if (!capable(CAP_NET_ADMIN)) - return -EPERM; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - switch (param) { - case PRISM2_PARAM_HOST_ENCRYPT: - case PRISM2_PARAM_HOST_DECRYPT: - /* TODO: implement these; return success now to prevent - * hostapd from aborting */ - break; - - case PRISM2_PARAM_BEACON_INT: - local->conf.beacon_int = value; - if (ieee80211_hw_config(dev)) - ret = -EINVAL; - break; - - case PRISM2_PARAM_AP_BRIDGE_PACKETS: - local->bridge_packets = value; - break; - - case PRISM2_PARAM_AP_AUTH_ALGS: - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - sdata->u.sta.auth_algs = value; - } else - ret = -EOPNOTSUPP; - break; - - case PRISM2_PARAM_DTIM_PERIOD: - if (value < 1) - ret = -EINVAL; - else if (sdata->type != IEEE80211_SUB_IF_TYPE_NORM) - ret = -ENOENT; - else - sdata->u.norm.dtim_period = value; - break; - - case PRISM2_PARAM_IEEE_802_1X: - sdata->ieee802_1x = value; - if (local->hw->set_ieee8021x && - local->hw->set_ieee8021x(dev, value)) - printk(KERN_DEBUG "%s: failed to set IEEE 802.1X (%d) " - "for low-level driver\n", dev->name, value); - break; - - case PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES: - local->cts_protect_erp_frames = value; - break; - - case PRISM2_PARAM_DROP_UNENCRYPTED: - sdata->drop_unencrypted = value; - break; - - case PRISM2_PARAM_PREAMBLE: - local->short_preamble = value; - break; - - case PRISM2_PARAM_RATE_LIMIT_BURST: - local->rate_limit_burst = value; - local->rate_limit_bucket = value; - break; - - case PRISM2_PARAM_RATE_LIMIT: - /* number of packets (tokens) allowed per second */ - if (!local->rate_limit && value) { - if (!local->rate_limit_burst) local->rate_limit_burst = - value; - local->rate_limit_bucket = local->rate_limit_burst; - local->rate_limit_timer.expires = jiffies + HZ; - add_timer(&local->rate_limit_timer); - } else if (local->rate_limit && !value) { - del_timer_sync(&local->rate_limit_timer); - } - local->rate_limit = value; - break; - - case PRISM2_PARAM_STAT_TIME: - if (!local->stat_time && value) { - local->stat_timer.expires = jiffies + HZ * value / 100; - add_timer(&local->stat_timer); - } else if (local->stat_time && !value) { - del_timer_sync(&local->stat_timer); - } - local->stat_time = value; - break; - case PRISM2_PARAM_SHORT_SLOT_TIME: - local->conf.short_slot_time = value; - if (ieee80211_hw_config(dev)) - ret = -EINVAL; - break; - - case PRISM2_PARAM_PRIVACY_INVOKED: - if (local->hw->set_privacy_invoked) - ret = local->hw->set_privacy_invoked(dev, value); - break; - - case PRISM2_PARAM_TEST_MODE: - ret = ieee80211_ioctl_test_mode(dev, value); - break; - - case PRISM2_PARAM_NEXT_MODE: - local->next_mode = value; - break; - - case PRISM2_PARAM_CLEAR_KEYS: - ret = ieee80211_ioctl_clear_keys(dev); - break; - - case PRISM2_PARAM_ADM_STATUS: - ret = ieee80211_ioctl_set_adm_status(dev, value); - break; - - case PRISM2_PARAM_ANTENNA_SEL: - local->conf.antenna_sel = value; - if (ieee80211_hw_config(dev)) - ret = -EINVAL; - break; - - case PRISM2_PARAM_CALIB_INT: - local->conf.calib_int = value; - if (ieee80211_hw_config(dev)) - ret = -EINVAL; - break; - - case PRISM2_PARAM_ANTENNA_MODE: - local->conf.antenna_mode = value; - if (ieee80211_hw_config(dev)) - ret = -EINVAL; - break; - - case PRISM2_PARAM_BROADCAST_SSID: - if ((value < 0) || (value > 1)) - ret = -EINVAL; - else - local->conf.ssid_hidden = value; - break; - - case PRISM2_PARAM_STA_ANTENNA_SEL: - local->sta_antenna_sel = value; - break; - - case PRISM2_PARAM_FORCE_UNICAST_RATE: - ret = ieee80211_ioctl_force_unicast_rate(dev, sdata, value); - break; - - case PRISM2_PARAM_MAX_RATECTRL_RATE: - ret = ieee80211_ioctl_max_ratectrl_rate(dev, sdata, value); - break; - - case PRISM2_PARAM_RATE_CTRL_NUM_UP: - local->rate_ctrl_num_up = value; - break; - - case PRISM2_PARAM_RATE_CTRL_NUM_DOWN: - local->rate_ctrl_num_down = value; - break; - - case PRISM2_PARAM_TX_POWER_REDUCTION: - if (value < 0) - ret = -EINVAL; - else - local->conf.tx_power_reduction = value; - break; - - case PRISM2_PARAM_EAPOL: - sdata->eapol = value; - break; - - case PRISM2_PARAM_KEY_TX_RX_THRESHOLD: - local->key_tx_rx_threshold = value; - break; - - case PRISM2_PARAM_KEY_INDEX: - if (value < 0 || value >= NUM_DEFAULT_KEYS) - ret = -EINVAL; - else if (sdata->keys[value] == NULL) - ret = -ENOENT; - else - sdata->default_key = sdata->keys[value]; - break; - - case PRISM2_PARAM_DEFAULT_WEP_ONLY: - ret = ieee80211_ioctl_default_wep_only(local, value); - break; - - case PRISM2_PARAM_WIFI_WME_NOACK_TEST: - local->wifi_wme_noack_test = value; - break; - - - - case PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS: - local->allow_broadcast_always = value; - break; - - case PRISM2_PARAM_SCAN_FLAGS: - local->scan_flags = value; - break; - - case PRISM2_PARAM_MIXED_CELL: - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - ret = -EINVAL; - else - sdata->u.sta.mixed_cell = !!value; - break; - - case PRISM2_PARAM_KEY_MGMT: - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - ret = -EINVAL; - else - sdata->u.sta.key_mgmt = value; - break; - - case PRISM2_PARAM_HW_MODES: - local->hw_modes = value; - break; - - case PRISM2_PARAM_CREATE_IBSS: - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - ret = -EINVAL; - else - sdata->u.sta.create_ibss = !!value; - break; - case PRISM2_PARAM_WMM_ENABLED: - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - ret = -EINVAL; - else - sdata->u.sta.wmm_enabled = !!value; - break; - case PRISM2_PARAM_RADAR_DETECT: - local->conf.radar_detect = value; - break; - case PRISM2_PARAM_SPECTRUM_MGMT: - local->conf.spect_mgmt = value; - break; - default: - ret = -EOPNOTSUPP; - break; - } - - return ret; -} - - -static int ieee80211_ioctl_get_prism2_param(struct net_device *dev, - struct iw_request_info *info, - void *wrqu, char *extra) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata; - int *param = (int *) extra; - int ret = 0; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - switch (*param) { - case PRISM2_PARAM_BEACON_INT: - *param = local->conf.beacon_int; - break; - - case PRISM2_PARAM_AP_BRIDGE_PACKETS: - *param = local->bridge_packets; - break; - - case PRISM2_PARAM_AP_AUTH_ALGS: - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - *param = sdata->u.sta.auth_algs; - } else - ret = -EOPNOTSUPP; - break; - - case PRISM2_PARAM_DTIM_PERIOD: - if (sdata->type != IEEE80211_SUB_IF_TYPE_NORM) - ret = -ENOENT; - else - *param = sdata->u.norm.dtim_period; - break; - - case PRISM2_PARAM_IEEE_802_1X: - *param = sdata->ieee802_1x; - break; - - case PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES: - *param = local->cts_protect_erp_frames; - break; - - case PRISM2_PARAM_DROP_UNENCRYPTED: - *param = sdata->drop_unencrypted; - break; - - case PRISM2_PARAM_PREAMBLE: - *param = local->short_preamble; - break; - - case PRISM2_PARAM_RATE_LIMIT_BURST: - *param = local->rate_limit_burst; - break; - - case PRISM2_PARAM_RATE_LIMIT: - *param = local->rate_limit; - break; - - case PRISM2_PARAM_STAT_TIME: - *param = local->stat_time; - break; - case PRISM2_PARAM_SHORT_SLOT_TIME: - *param = local->conf.short_slot_time; - break; - - case PRISM2_PARAM_NEXT_MODE: - *param = local->next_mode; - break; - - case PRISM2_PARAM_ANTENNA_SEL: - *param = local->conf.antenna_sel; - break; - - case PRISM2_PARAM_CALIB_INT: - *param = local->conf.calib_int; - break; - - case PRISM2_PARAM_ANTENNA_MODE: - *param = local->conf.antenna_mode; - break; - - case PRISM2_PARAM_BROADCAST_SSID: - *param = local->conf.ssid_hidden; - break; - - case PRISM2_PARAM_STA_ANTENNA_SEL: - *param = local->sta_antenna_sel; - break; - - case PRISM2_PARAM_RATE_CTRL_NUM_UP: - *param = local->rate_ctrl_num_up; - break; - - case PRISM2_PARAM_RATE_CTRL_NUM_DOWN: - *param = local->rate_ctrl_num_down; - break; - - case PRISM2_PARAM_TX_POWER_REDUCTION: - *param = local->conf.tx_power_reduction; - break; - - case PRISM2_PARAM_EAPOL: - *param = sdata->eapol; - break; - - case PRISM2_PARAM_KEY_TX_RX_THRESHOLD: - *param = local->key_tx_rx_threshold; - break; - - case PRISM2_PARAM_KEY_INDEX: - if (sdata->default_key == NULL) - ret = -ENOENT; - else if (sdata->default_key == sdata->keys[0]) - *param = 0; - else if (sdata->default_key == sdata->keys[1]) - *param = 1; - else if (sdata->default_key == sdata->keys[2]) - *param = 2; - else if (sdata->default_key == sdata->keys[3]) - *param = 3; - else - ret = -ENOENT; - break; - - case PRISM2_PARAM_DEFAULT_WEP_ONLY: - *param = local->default_wep_only; - break; - - case PRISM2_PARAM_WIFI_WME_NOACK_TEST: - *param = local->wifi_wme_noack_test; - break; - - - - case PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS: - *param = local->allow_broadcast_always; - break; - - case PRISM2_PARAM_SCAN_FLAGS: - *param = local->scan_flags; - break; - - case PRISM2_PARAM_HW_MODES: - *param = local->hw_modes; - break; - - case PRISM2_PARAM_CREATE_IBSS: - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - ret = -EINVAL; - else - *param = !!sdata->u.sta.create_ibss; - break; - - case PRISM2_PARAM_MIXED_CELL: - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - ret = -EINVAL; - else - *param = !!sdata->u.sta.mixed_cell; - break; - - case PRISM2_PARAM_KEY_MGMT: - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - ret = -EINVAL; - else - *param = sdata->u.sta.key_mgmt; - break; - case PRISM2_PARAM_WMM_ENABLED: - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - ret = -EINVAL; - else - *param = !!sdata->u.sta.wmm_enabled; - break; - - default: - ret = -EOPNOTSUPP; - break; - } - - return ret; -} - - -static int ieee80211_ioctl_test_param(struct net_device *dev, - struct iw_request_info *info, - void *wrqu, char *extra) -{ - struct ieee80211_local *local = dev->priv; - int *i = (int *) extra; - int param = *i; - int value = *(i + 1); - - if (!capable(CAP_NET_ADMIN)) - return -EPERM; - - if (local->hw->test_param) - return local->hw->test_param(local->mdev, param, value); - - return -EOPNOTSUPP; -} - - -static const struct iw_priv_args ieee80211_ioctl_priv[] = { - { PRISM2_IOCTL_PRISM2_PARAM, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, 0, "param" }, - { PRISM2_IOCTL_GET_PRISM2_PARAM, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_param" }, - { PRISM2_IOCTL_TEST_PARAM, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, 0, "test_param" }, -}; - - -static int ieee80211_ioctl_giwpriv(struct net_device *dev, - struct iw_point *data) -{ - - if (!data->pointer || - !access_ok(VERIFY_WRITE, data->pointer, - sizeof(ieee80211_ioctl_priv))) - return -EINVAL; - - data->length = sizeof(ieee80211_ioctl_priv) / - sizeof(ieee80211_ioctl_priv[0]); - if (copy_to_user(data->pointer, ieee80211_ioctl_priv, - sizeof(ieee80211_ioctl_priv))) - return -EINVAL; - return 0; -} - - -int ieee80211_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -{ - struct iwreq *wrq = (struct iwreq *) rq; - int ret = 0; - char ssid[IW_ESSID_MAX_SIZE + 1]; - - switch (cmd) { - case SIOCGIWNAME: - ret = ieee80211_ioctl_giwname(dev, NULL, (char *) &wrq->u, - NULL); - break; - case SIOCSIWESSID: - if (!wrq->u.essid.pointer) - ret = -EINVAL; - else if (wrq->u.essid.length > IW_ESSID_MAX_SIZE) - ret = -E2BIG; - else { - if (copy_from_user(ssid, wrq->u.essid.pointer, - wrq->u.essid.length)) { - ret = -EFAULT; - break; - } - ret = ieee80211_ioctl_siwessid(dev, NULL, - &wrq->u.essid, ssid); - } - break; - case SIOCGIWESSID: - if (!wrq->u.essid.pointer) { - ret = -EINVAL; - } else { - memset(ssid, 0, IW_ESSID_MAX_SIZE + 1); - ret = ieee80211_ioctl_giwessid(dev, NULL, - &wrq->u.essid, ssid); - if (copy_to_user(wrq->u.essid.pointer, ssid, - wrq->u.essid.length)) { - ret = -EFAULT; - break; - } - } - break; - - case SIOCGIWRANGE: - { - struct iw_range range; - if (!access_ok(VERIFY_WRITE, wrq->u.data.pointer, - sizeof(range))) { - ret = -EFAULT; - break; - } - ret = ieee80211_ioctl_giwrange(dev, NULL, &wrq->u.data, - (char *) &range); - if (ret) - break; - if (copy_to_user(wrq->u.data.pointer, &range, sizeof(range))) - ret = -EFAULT; - break; - } - - case SIOCSIWAP: - ret = ieee80211_ioctl_siwap(dev, NULL, &wrq->u.ap_addr, NULL); - break; - case SIOCGIWAP: - ret = ieee80211_ioctl_giwap(dev, NULL, &wrq->u.ap_addr, NULL); - break; - case SIOCSIWSCAN: - ret = ieee80211_ioctl_siwscan(dev, NULL, &wrq->u.data, NULL); - break; - case SIOCGIWSCAN: - { - char *buf = kmalloc(IW_SCAN_MAX_DATA, GFP_KERNEL); - if (buf == NULL) { - ret = -ENOMEM; - break; - } - ret = ieee80211_ioctl_giwscan(dev, NULL, &wrq->u.data, buf); - if (ret == 0 && - copy_to_user(wrq->u.data.pointer, buf, wrq->u.data.length)) - ret = -EFAULT; - kfree(buf); - break; - } - - case SIOCSIWFREQ: - ret = ieee80211_ioctl_siwfreq(dev, NULL, &wrq->u.freq, NULL); - break; - case SIOCGIWFREQ: - ret = ieee80211_ioctl_giwfreq(dev, NULL, &wrq->u.freq, NULL); - break; - case SIOCSIWMODE: - ret = ieee80211_ioctl_siwmode(dev, NULL, &wrq->u.mode, NULL); - break; - case SIOCGIWMODE: - ret = ieee80211_ioctl_giwmode(dev, NULL, &wrq->u.mode, NULL); - break; - - case SIOCSIWRTS: - ret = ieee80211_ioctl_siwrts(dev, NULL, &wrq->u.rts, NULL); - break; - case SIOCGIWRTS: - ret = ieee80211_ioctl_giwrts(dev, NULL, &wrq->u.rts, NULL); - break; - - case SIOCSIWFRAG: - ret = ieee80211_ioctl_siwfrag(dev, NULL, &wrq->u.frag, NULL); - break; - case SIOCGIWFRAG: - ret = ieee80211_ioctl_giwfrag(dev, NULL, &wrq->u.frag, NULL); - break; - - case SIOCSIWRETRY: - ret = ieee80211_ioctl_siwretry(dev, NULL, &wrq->u.retry, NULL); - break; - case SIOCGIWRETRY: - ret = ieee80211_ioctl_giwretry(dev, NULL, &wrq->u.retry, NULL); - break; - - case PRISM2_IOCTL_PRISM2_PARAM: - ret = ieee80211_ioctl_prism2_param(dev, NULL, &wrq->u, - (char *) &wrq->u); - break; - case PRISM2_IOCTL_GET_PRISM2_PARAM: - ret = ieee80211_ioctl_get_prism2_param(dev, NULL, &wrq->u, - (char *) &wrq->u); - break; - case PRISM2_IOCTL_TEST_PARAM: - ret = ieee80211_ioctl_test_param(dev, NULL, &wrq->u, - (char *) &wrq->u); - break; - case PRISM2_IOCTL_HOSTAPD: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = ieee80211_ioctl_priv_hostapd(dev, &wrq->u.data); - break; - case SIOCGIWPRIV: - ret = ieee80211_ioctl_giwpriv(dev, &wrq->u.data); - break; - default: - ret = -EOPNOTSUPP; - break; - } - - return ret; -} diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_key.h b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_key.h deleted file mode 100644 index 7a2415dec4d..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_key.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2002-2004, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef IEEE80211_KEY_H -#define IEEE80211_KEY_H - -/* ALG_TKIP - * struct ieee80211_key::key is encoded as a 256-bit (32 byte) data block: - * Temporal Encryption Key (128 bits) - * Temporal Authenticator Tx MIC Key (64 bits) - * Temporal Authenticator Rx MIC Key (64 bits) - */ - -#define WEP_IV_LEN 4 -#define WEP_ICV_LEN 4 - -#define ALG_TKIP_KEY_LEN 32 -/* Starting offsets for each key */ -#define ALG_TKIP_TEMP_ENCR_KEY 0 -#define ALG_TKIP_TEMP_AUTH_TX_MIC_KEY 16 -#define ALG_TKIP_TEMP_AUTH_RX_MIC_KEY 24 -#define TKIP_IV_LEN 8 -#define TKIP_ICV_LEN 4 - -#define ALG_CCMP_KEY_LEN 16 -#define CCMP_HDR_LEN 8 -#define CCMP_MIC_LEN 8 -#define CCMP_TK_LEN 16 -#define CCMP_PN_LEN 6 - -#define NUM_RX_DATA_QUEUES 17 - -struct ieee80211_key { - int hw_key_idx; /* filled and used by low-level driver */ - ieee80211_key_alg alg; - union { - struct { - /* last used TSC */ - u32 iv32; - u16 iv16; - u16 p1k[5]; - int tx_initialized; - - /* last received RSC */ - u32 iv32_rx[NUM_RX_DATA_QUEUES]; - u16 iv16_rx[NUM_RX_DATA_QUEUES]; - u16 p1k_rx[NUM_RX_DATA_QUEUES][5]; - int rx_initialized[NUM_RX_DATA_QUEUES]; - } tkip; - struct { - u8 tx_pn[6]; - /* TODO: for WME make this replay counter per AC */ - u8 rx_pn[NUM_RX_DATA_QUEUES][6]; -#ifndef AES_STATE_LEN -#define AES_STATE_LEN 44 -#endif - u32 aes_state[AES_STATE_LEN]; - u32 replays; /* dot11RSNAStatsCCMPReplays */ - } ccmp; - } u; - int tx_rx_count; /* number of times this key has been used */ - int keylen; - - /* if the low level driver can provide hardware acceleration it should - * clear this flag */ - int force_sw_encrypt:1; - int keyidx:8; /* WEP key index */ - int default_tx_key:1; /* This key is the new default TX key - * (used only for broadcast keys). */ - - u8 key[0]; -}; - -#endif /* IEEE80211_KEY_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_led.c b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_led.c deleted file mode 100644 index de3f52cc7f8..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_led.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2002-2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/netdevice.h> -#include <linux/types.h> - -#ifdef CONFIG_OAP_LEDS_WLAN -extern void leds_wlan_set(int unit, int tx, int state); -#endif - -void ieee80211_rx_led(int state, struct net_device *dev) { -#ifdef CONFIG_OAP_LEDS_WLAN - static unsigned int count = 0; - - if (state == 2) { - leds_wlan_set(0, 0, (++count) & 1); - } -#endif -} - -void ieee80211_tx_led(int state, struct net_device *dev) { -#ifdef CONFIG_OAP_LEDS_WLAN - leds_wlan_set(0, 1, state); -#endif -} - diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_proc.c b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_proc.c deleted file mode 100644 index 1f74f299423..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_proc.c +++ /dev/null @@ -1,777 +0,0 @@ -/* - * Copyright 2003-2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/module.h> -#include <linux/netdevice.h> -#include <linux/proc_fs.h> -#include <linux/delay.h> - -#ifdef CONFIG_PROC_FS - -#include <net/ieee80211.h> -#include <net/ieee80211_common.h> -#include <net/ieee80211_mgmt.h> -#include "ieee80211_i.h" -#include "sta_info.h" -#include "ieee80211_proc.h" -#include "rate_control.h" - - -static struct proc_dir_entry *ieee80211_proc; - -#define PROC_LIMIT (PAGE_SIZE - 80) - - -static char * ieee80211_proc_key(char *p, struct ieee80211_key *key, - int idx, int def_key) -{ - int i; - u8 *tpn, *rpn; - - if (!key) - return p; - - p += sprintf(p, "key[%d]%s len=%d sw_encrypt=%d idx=%d hwidx=%d " - "tx_rx_count=%d", - idx, def_key ? "*" : "", key->keylen, - key->force_sw_encrypt, key->keyidx, key->hw_key_idx, - key->tx_rx_count); - switch (key->alg) { - case ALG_WEP: - p += sprintf(p, " alg=WEP"); - break; - case ALG_TKIP: - p += sprintf(p, " alg=TKIP iv(tx)=%08x %04x", - key->u.tkip.iv32, key->u.tkip.iv16); - for (i = 0; i < NUM_RX_DATA_QUEUES; i++) { - if (key->u.tkip.iv32_rx[i] == 0 && - key->u.tkip.iv16_rx[i] == 0) - continue; - p += sprintf(p, " iv(rx %d)=%08x %04x", i, - key->u.tkip.iv32_rx[i], - key->u.tkip.iv16_rx[i]); - } - break; - case ALG_CCMP: - tpn = key->u.ccmp.tx_pn; - p += sprintf(p, " alg=CCMP PN(tx)=%02x%02x%02x%02x%02x%02x", - tpn[0], tpn[1], tpn[2], tpn[3], tpn[4], tpn[5]); - for (i = 0; i < NUM_RX_DATA_QUEUES; i++) { - rpn = key->u.ccmp.rx_pn[i]; - if (memcmp(rpn, "\x00\x00\x00\x00\x00\x00", 6) == 0) - continue; - p += sprintf(p, " PN(rx %d)=%02x%02x%02x%02x%02x%02x", - i, rpn[0], rpn[1], rpn[2], rpn[3], rpn[4], - rpn[5]); - } - p += sprintf(p, " replays=%u", key->u.ccmp.replays); - break; - default: - break; - } - - p += sprintf(p, " key="); - for (i = 0; i < key->keylen; i++) - p += sprintf(p, "%02x", key->key[i]); - p += sprintf(p, "\n"); - return p; -} - - -static char * ieee80211_proc_sub_if_norm(char *p, - struct ieee80211_if_norm *norm) -{ - p += sprintf(p, "type=norm\n"); - if (norm->beacon_head) - p += sprintf(p, "beacon_head_len=%d\n", norm->beacon_head_len); - if (norm->beacon_tail) - p += sprintf(p, "beacon_tail_len=%d\n", norm->beacon_tail_len); - p += sprintf(p, - "max_aid=%d\n" - "num_sta_ps=%d\n" - "num_buffered_multicast=%u\n" - "dtim_period=%d\n" - "dtim_count=%d\n" - "num_beacons=%d\n" - "force_unicast_rateidx=%d\n" - "max_ratectrl_rateidx=%d\n", - norm->max_aid, atomic_read(&norm->num_sta_ps), - skb_queue_len(&norm->ps_bc_buf), - norm->dtim_period, norm->dtim_count, norm->num_beacons, - norm->force_unicast_rateidx, norm->max_ratectrl_rateidx); - return p; -} - - -static char * ieee80211_proc_sub_if_sta(char *p, - struct ieee80211_if_sta *ifsta) -{ - p += sprintf(p, "type=sta\n"); - p += sprintf(p, - "state=%d\n" - "bssid=" MACSTR "\n" - "prev_bssid=" MACSTR "\n" - "ssid_len=%zd\n" - "aid=%d\n" - "ap_capab=0x%x\n" - "capab=0x%x\n" - "extra_ie_len=%zd\n" - "auth_tries=%d\n" - "assoc_tries=%d\n" - "flags=%s%s%s%s%s%s%s\n" - "auth_algs=0x%x\n" - "auth_alg=%d\n" - "auth_transaction=%d\n", - ifsta->state, - MAC2STR(ifsta->bssid), - MAC2STR(ifsta->prev_bssid), - ifsta->ssid_len, - ifsta->aid, - ifsta->ap_capab, - ifsta->capab, - ifsta->extra_ie_len, - ifsta->auth_tries, - ifsta->assoc_tries, - ifsta->ssid_set ? "[SSID]" : "", - ifsta->bssid_set ? "[BSSID]" : "", - ifsta->prev_bssid_set ? "[prev BSSID" : "", - ifsta->authenticated ? "[AUTH]" : "", - ifsta->associated ? "[ASSOC]" : "", - ifsta->probereq_poll ? "[PROBEREQ POLL]" : "", - ifsta->use_protection ? "[CTS prot]" : "", - ifsta->auth_algs, - ifsta->auth_alg, - ifsta->auth_transaction); - return p; -} - - -static char * ieee80211_proc_sub_if(char *p, - struct ieee80211_sub_if_data *sdata) -{ - if (sdata == NULL) - return p; - - if (sdata->bss) - p += sprintf(p, "bss=%p\n", sdata->bss); - - switch (sdata->type) { - case IEEE80211_SUB_IF_TYPE_NORM: - p = ieee80211_proc_sub_if_norm(p, &sdata->u.norm); - break; - case IEEE80211_SUB_IF_TYPE_WDS: - p += sprintf(p, "type=wds\n"); - p += sprintf(p, "wds.peer=" MACSTR "\n", - MAC2STR(sdata->u.wds.remote_addr)); - break; - case IEEE80211_SUB_IF_TYPE_VLAN: - p += sprintf(p, "type=vlan\n"); - p += sprintf(p, "vlan.id=%d\n", sdata->u.vlan.id); - break; - case IEEE80211_SUB_IF_TYPE_STA: - p = ieee80211_proc_sub_if_sta(p, &sdata->u.sta); - break; - } - p += sprintf(p, "channel_use=%d\n", sdata->channel_use); - p += sprintf(p, "drop_unencrypted=%d\n", sdata->drop_unencrypted); - p += sprintf(p, "eapol=%d\n", sdata->eapol); - p += sprintf(p, "ieee802_1x=%d\n", sdata->ieee802_1x); - - return p; -} - - -static int ieee80211_proc_iface_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct net_device *dev = (struct net_device *) data; - struct ieee80211_sub_if_data *sdata; - int i; - - if (off != 0) { - *eof = 1; - return 0; - } - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (!sdata) - return -1; - - p = ieee80211_proc_sub_if(p, sdata); - - for (i = 0; i < NUM_DEFAULT_KEYS; i++) { - if (sdata->keys[i] == NULL) - continue; - - p = ieee80211_proc_key(p, sdata->keys[i], i, - sdata->keys[i] == sdata->default_key); - } - - return (p - page); -} - - -static int ieee80211_proc_sta_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct sta_info *sta = (struct sta_info *) data; - struct ieee80211_local *local; - int inactive, i; - - if (off != 0) { - *eof = 1; - return 0; - } - - if (!sta || !sta->dev) - return -1; - - p += sprintf(p, "users=%d\n", atomic_read(&sta->users)); - p += sprintf(p, "aid=%d\n", sta->aid); - p += sprintf(p, "flags=0x%x %s%s%s%s%s%s%s%s%s%s\n", sta->flags, - sta->flags & WLAN_STA_AUTH ? "[AUTH]" : "", - sta->flags & WLAN_STA_ASSOC ? "[ASSOC]" : "", - sta->flags & WLAN_STA_PS ? "[PS]" : "", - sta->flags & WLAN_STA_TIM ? "[TIM]" : "", - sta->flags & WLAN_STA_PERM ? "[PERM]" : "", - sta->flags & WLAN_STA_AUTHORIZED ? "[AUTHORIZED]" : "", - sta->flags & WLAN_STA_SHORT_PREAMBLE ? - "[SHORT PREAMBLE]" : "", - sta->flags & WLAN_STA_WME ? "[WME]" : "", - sta->flags & WLAN_STA_WDS ? "[WDS]" : "", - sta->flags & WLAN_STA_XR ? "[XR]" : ""); - p += sprintf(p, "key_idx_compression=%d\n", - sta->key_idx_compression); - p += sprintf(p, "dev=%s\n", sta->dev->name); - if (sta->vlan_id > 0) - p += sprintf(p, "vlan_id=%d\n", sta->vlan_id); - p += sprintf(p, "rx_packets=%lu\ntx_packets=%lu\nrx_bytes=%lu\n" - "tx_bytes=%lu\nrx_duplicates=%lu\nrx_fragments=%lu\n" - "rx_dropped=%lu\ntx_fragments=%lu\ntx_filtered=%lu\n", - sta->rx_packets, sta->tx_packets, - sta->rx_bytes, sta->tx_bytes, - sta->num_duplicates, sta->rx_fragments, sta->rx_dropped, - sta->tx_fragments, sta->tx_filtered_count); - p = ieee80211_proc_key(p, sta->key, 0, 1); - - local = (struct ieee80211_local *) sta->dev->priv; - if (sta->txrate >= 0 && sta->txrate < local->num_curr_rates) { - p += sprintf(p, "txrate=%d\n", - local->curr_rates[sta->txrate].rate); - } - if (sta->last_txrate >= 0 && - sta->last_txrate < local->num_curr_rates) { - p += sprintf(p, "last_txrate=%d\n", - local->curr_rates[sta->last_txrate].rate); - } - p += sprintf(p, "num_ps_buf_frames=%u\n", - skb_queue_len(&sta->ps_tx_buf)); - p += sprintf(p, "tx_retry_failed=%lu\n", sta->tx_retry_failed); - p += sprintf(p, "tx_retry_count=%lu\n", sta->tx_retry_count); - p += sprintf(p, "last_rssi=%d\n", sta->last_rssi); - p += sprintf(p, "last_ack_rssi=%d %d %d\n", - sta->last_ack_rssi[0], sta->last_ack_rssi[1], - sta->last_ack_rssi[2]); - if (sta->last_ack) - p += sprintf(p, "last_ack_ms=%d\n", - jiffies_to_msecs(jiffies - sta->last_ack)); - inactive = jiffies - sta->last_rx; - p += sprintf(p, "inactive_msec=%d\n", jiffies_to_msecs(inactive)); - p += sprintf(p, "channel_use=%d\n", sta->channel_use); - p += sprintf(p, "wep_weak_iv_count=%d\n", sta->wep_weak_iv_count); -#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS - p += sprintf(p, "wme_rx_queue="); - for (i = 0; i < NUM_RX_DATA_QUEUES; i++) - p += sprintf(p, "%u ", sta->wme_rx_queue[i]); - p += sprintf(p, "\n"); - - p += sprintf(p, "wme_tx_queue="); - for (i = 0; i < NUM_RX_DATA_QUEUES; i++) - p += sprintf(p, "%u ", sta->wme_tx_queue[i]); - p += sprintf(p, "\n"); -#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ - p += sprintf(p, "last_seq_ctrl="); - for (i = 0; i < NUM_RX_DATA_QUEUES; i++) { - p += sprintf(p, "%x ", sta->last_seq_ctrl[i]); - } - p += sprintf(p, "\n"); - - p += rate_control_status_sta(local, sta, p); - - return (p - page); -} - - -static int ieee80211_proc_counters_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct ieee80211_local *local = (struct ieee80211_local *) data; - struct ieee80211_low_level_stats stats; - - if (off != 0) { - *eof = 1; - return 0; - } - - p += sprintf(p, - "TransmittedFragmentCount=%u\n" - "MulticastTransmittedFrameCount=%u\n" - "FailedCount=%u\n" - "RetryCount=%u\n" - "MultipleRetryCount=%d\n" - "FrameDuplicateCount=%d\n" - "ReceivedFragmentCount=%u\n" - "MulticastReceivedFrameCount=%u\n" - "TransmittedFrameCount=%u\n" - "WEPUndecryptableCount=%u\n", - local->dot11TransmittedFragmentCount, - local->dot11MulticastTransmittedFrameCount, - local->dot11FailedCount, - local->dot11RetryCount, - local->dot11MultipleRetryCount, - local->dot11FrameDuplicateCount, - local->dot11ReceivedFragmentCount, - local->dot11MulticastReceivedFrameCount, - local->dot11TransmittedFrameCount, - local->dot11WEPUndecryptableCount); - - memset(&stats, 0, sizeof(stats)); - if (local->hw->get_stats && - local->hw->get_stats(local->mdev, &stats) == 0) { - p += sprintf(p, - "ACKFailureCount=%u\n" - "RTSFailureCount=%u\n" - "FCSErrorCount=%u\n" - "RTSSuccessCount=%u\n", - stats.dot11ACKFailureCount, - stats.dot11RTSFailureCount, - stats.dot11FCSErrorCount, - stats.dot11RTSSuccessCount); - } - - return (p - page); -} - - -static int ieee80211_proc_debug_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct ieee80211_local *local = (struct ieee80211_local *) data; - int i; - - if (off != 0) { - *eof = 1; - return 0; - } - -#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS - p += sprintf(p, - "tx_handlers_drop=%u\n" - "tx_handlers_queued=%u\n" - "tx_handlers_drop_unencrypted=%u\n" - "tx_handlers_drop_fragment=%u\n" - "tx_handlers_drop_wep=%u\n" - "tx_handlers_drop_rate_limit=%u\n" - "tx_handlers_drop_not_assoc=%u\n" - "tx_handlers_drop_unauth_port=%u\n" - "rx_handlers_drop=%u\n" - "rx_handlers_queued=%u\n" - "rx_handlers_drop_nullfunc=%u\n" - "rx_handlers_drop_defrag=%u\n" - "rx_handlers_drop_short=%u\n" - "rx_handlers_drop_passive_scan=%u\n" - "tx_expand_skb_head=%u\n" - "tx_expand_skb_head_cloned=%u\n" - "rx_expand_skb_head=%u\n" - "rx_expand_skb_head2=%u\n" - "rx_handlers_fragments=%u\n" - "tx_status_drop=%u\n", - local->tx_handlers_drop, - local->tx_handlers_queued, - local->tx_handlers_drop_unencrypted, - local->tx_handlers_drop_fragment, - local->tx_handlers_drop_wep, - local->tx_handlers_drop_rate_limit, - local->tx_handlers_drop_not_assoc, - local->tx_handlers_drop_unauth_port, - local->rx_handlers_drop, - local->rx_handlers_queued, - local->rx_handlers_drop_nullfunc, - local->rx_handlers_drop_defrag, - local->rx_handlers_drop_short, - local->rx_handlers_drop_passive_scan, - local->tx_expand_skb_head, - local->tx_expand_skb_head_cloned, - local->rx_expand_skb_head, - local->rx_expand_skb_head2, - local->rx_handlers_fragments, - local->tx_status_drop); - { - int i; - p += sprintf(p, "wme_rx_queue="); - for (i = 0; i < NUM_RX_DATA_QUEUES; i++) - p += sprintf(p, " %u", local->wme_rx_queue[i]); - p += sprintf(p, "\n"); - - p += sprintf(p, "wme_tx_queue="); - for (i = 0; i < NUM_RX_DATA_QUEUES; i++) - p += sprintf(p, " %u", local->wme_tx_queue[i]); - p += sprintf(p, "\n"); - } -#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ - - p += sprintf(p, "num_scans=%u\n", local->scan.num_scans); - - p += sprintf(p, - "conf.bss_count=%d\n" - "bss_dev_count=%u\n", - local->conf.bss_count, local->bss_dev_count); - for (i = 0; i < local->conf.bss_count; i++) { - p += sprintf(p, "bss_dev[%d]=%p (%s)\n", - i, local->bss_devs[i], - (i < local->bss_dev_count && local->bss_devs[i]) ? - local->bss_devs[i]->name : "N/A"); - } - - return (p - page); -} - - -static const char * ieee80211_mode_str_short(int mode) -{ - switch (mode) { - case MODE_IEEE80211A: - return "802.11a"; - case MODE_IEEE80211B: - return "802.11b"; - case MODE_IEEE80211G: - return "802.11g"; - case MODE_ATHEROS_TURBO: - return "AtherosTurbo"; - default: - return "UNKNOWN"; - } -} - - -static const char * ieee80211_mode_str(int mode) -{ - switch (mode) { - case MODE_IEEE80211A: - return "IEEE 802.11a"; - case MODE_IEEE80211B: - return "IEEE 802.11b"; - case MODE_IEEE80211G: - return "IEEE 802.11g"; - case MODE_ATHEROS_TURBO: - return "Atheros Turbo (5 GHz)"; - default: - return "UNKNOWN"; - } -} - - -static int ieee80211_proc_info_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct ieee80211_local *local = (struct ieee80211_local *) data; - int m; - struct ieee80211_hw_modes *mode; - - if (off != 0) { - *eof = 1; - return 0; - } - - p += sprintf(p, "hw_name=%s\n", local->hw->name); - p += sprintf(p, "modes="); - for (m = 0; m < local->hw->num_modes; m++) { - mode = &local->hw->modes[m]; - p += sprintf(p, "[%s]", ieee80211_mode_str_short(mode->mode)); - } - p += sprintf(p, "\n"); - if (local->rate_ctrl && local->rate_ctrl_priv) - p+= sprintf(p, "rate_ctrl_alg=%s\n", local->rate_ctrl->name); - return (p - page); -} - - -static int ieee80211_proc_config_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct ieee80211_local *local = (struct ieee80211_local *) data; - - if (off != 0) { - *eof = 1; - return 0; - } - - p += sprintf(p, - "low_level_driver=%s\n" - "channel=%d\n" - "freq=%d\n" - "mode=%s\n" - "802.11h=%d\n" - "wep_iv=0x%06x\n" - "antenna_sel=%d\n" - "calib_int=%d\n" - "tx_power_reduction=%d.%d dBm\n" - "bridge_packets=%d\n" - "key_tx_rx_threshold=%d\n" - "rts_threshold=%d\n" - "fragmentation_threshold=%d\n" - "short_retry_limit=%d\n" - "long_retry_limit=%d\n" - "total_ps_buffered=%d\n", - local->hw->name ? local->hw->name : "N/A", - local->conf.channel, - local->conf.freq, - ieee80211_mode_str(local->conf.phymode), - local->conf.radar_detect, - local->wep_iv & 0xffffff, - local->conf.antenna_sel, - local->conf.calib_int, - local->conf.tx_power_reduction / 10, - local->conf.tx_power_reduction % 10, - local->bridge_packets, - local->key_tx_rx_threshold, - local->rts_threshold, - local->fragmentation_threshold, - local->short_retry_limit, - local->long_retry_limit, - local->total_ps_buffered); - - return (p - page); -} - - -static int ieee80211_proc_channels_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct ieee80211_local *local = (struct ieee80211_local *) data; - int m, c; - struct ieee80211_hw_modes *mode; - struct ieee80211_channel *chan; - - if (off != 0) { - *eof = 1; - return 0; - } - - p += sprintf(p, "MODE CHAN FREQ TXPOWER ANTMAX FLAGS\n"); - for (m = 0; m < local->hw->num_modes; m++) { - mode = &local->hw->modes[m]; - for (c = 0; c < mode->num_channels; c++) { - chan = &mode->channels[c]; - p += sprintf(p, "%d %d %d %d %d %s%s%s\n", - mode->mode, chan->chan, chan->freq, - chan->power_level, chan->antenna_max, - chan->flag & IEEE80211_CHAN_W_SCAN ? - "[W_SCAN]" : "", - chan->flag & IEEE80211_CHAN_W_ACTIVE_SCAN - ? "[W_ACTIVE_SCAN]" : "", - chan->flag & IEEE80211_CHAN_W_IBSS ? - "[W_IBSS]" : ""); - } - } - return (p - page); -} - - -static int ieee80211_proc_rates_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct ieee80211_local *local = (struct ieee80211_local *) data; - int r; - struct ieee80211_rate *rate; - - if (off != 0) { - *eof = 1; - return 0; - } - - p += sprintf(p, "RATE VAL VAL2 MIN_RSSI_ACK MIN_RSSI_ACK_DELTA " - "FLAGS\n"); - for (r = 0; r < local->num_curr_rates; r++) { - rate = &local->curr_rates[r]; - p += sprintf(p, "%d %d %d %d %d 0x%x %s%s%s%s%s%s%s%s\n", - rate->rate, rate->val, rate->val2, - rate->min_rssi_ack, rate->min_rssi_ack_delta, - rate->flags, - rate->flags & IEEE80211_RATE_ERP ? "[ERP]" : "", - rate->flags & IEEE80211_RATE_BASIC ? - "[BASIC]" : "", - rate->flags & IEEE80211_RATE_PREAMBLE2 ? - "[PREAMBLE2]" : "", - rate->flags & IEEE80211_RATE_SUPPORTED ? - "[SUPPORTED]" : "", - rate->flags & IEEE80211_RATE_OFDM ? "[OFDM]" : "", - rate->flags & IEEE80211_RATE_CCK ? "[CCK]" : "", - rate->flags & IEEE80211_RATE_TURBO ? - "[TURBO]" : "", - rate->flags & IEEE80211_RATE_MANDATORY ? - "[MANDATORY]" : ""); - } - return (p - page); -} - - -static int ieee80211_proc_multicast_read(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *p = page; - struct ieee80211_local *local = (struct ieee80211_local *) data; - - if (off != 0) { - *eof = 1; - return 0; - } - - return rate_control_status_global(local, p); - -} - - -void ieee80211_proc_init_sta(struct ieee80211_local *local, - struct sta_info *sta) -{ - char buf[30]; - struct proc_dir_entry *entry; - - sprintf(buf, MACSTR, MAC2STR(sta->addr)); - - if (!local->proc_sta) - return; - - entry = create_proc_read_entry(buf, 0, local->proc_sta, - ieee80211_proc_sta_read, sta); - if (entry) { - entry->mode &= ~(S_IRWXG | S_IRWXO); - sta->proc_entry_added = 1; - } -} - - -void ieee80211_proc_deinit_sta(struct ieee80211_local *local, - struct sta_info *sta) -{ - char buf[30]; - sprintf(buf, MACSTR, MAC2STR(sta->addr)); - if (local->proc_sta) { - remove_proc_entry(buf, local->proc_sta); - sta->proc_entry_added = 0; - } -} - - -void ieee80211_proc_init_virtual(struct net_device *dev) -{ - struct proc_dir_entry *entry; - struct ieee80211_local *local = (struct ieee80211_local *) dev->priv; - - if (!local->proc_iface) - return; - - entry = create_proc_read_entry(dev->name, 0, local->proc_iface, - ieee80211_proc_iface_read, dev); - if (entry) - entry->mode &= ~(S_IRWXG | S_IRWXO); -} - - -void ieee80211_proc_deinit_virtual(struct net_device *dev) -{ - struct ieee80211_local *local = (struct ieee80211_local *) dev->priv; - - if (local->proc_iface) - remove_proc_entry(dev->name, local->proc_iface); -} - - -void ieee80211_proc_init_interface(struct ieee80211_local *local) -{ - if (!ieee80211_proc) - return; - - local->proc = proc_mkdir(local->wdev->name, ieee80211_proc); - if (!local->proc) - return; - - local->proc_sta = proc_mkdir("sta", local->proc); - local->proc_iface = proc_mkdir("iface", local->proc); - create_proc_read_entry("counters", 0, local->proc, - ieee80211_proc_counters_read, local); - create_proc_read_entry("config", 0, local->proc, - ieee80211_proc_config_read, local); - create_proc_read_entry("channels", 0, local->proc, - ieee80211_proc_channels_read, local); - create_proc_read_entry("rates", 0, local->proc, - ieee80211_proc_rates_read, local); - create_proc_read_entry("multicast", 0, local->proc, - ieee80211_proc_multicast_read, local); - create_proc_read_entry("debug", 0, local->proc, - ieee80211_proc_debug_read, local); - create_proc_read_entry("info", 0, local->proc, - ieee80211_proc_info_read, local); - ieee80211_proc_init_virtual(local->wdev); -} - - -void ieee80211_proc_deinit_interface(struct ieee80211_local *local) -{ - if (!local->proc) - return; - - ieee80211_proc_deinit_virtual(local->wdev); - remove_proc_entry("iface", local->proc); - remove_proc_entry("sta", local->proc); - remove_proc_entry("counters", local->proc); - remove_proc_entry("debug", local->proc); - remove_proc_entry("config", local->proc); - remove_proc_entry("channels", local->proc); - remove_proc_entry("rates", local->proc); - remove_proc_entry("multicast", local->proc); - remove_proc_entry("info", local->proc); - local->proc = NULL; - remove_proc_entry(local->wdev->name, ieee80211_proc); -} - - -void ieee80211_proc_init(void) -{ - if (proc_net == NULL) { - ieee80211_proc = NULL; - return; - } - - ieee80211_proc = proc_mkdir("ieee80211", proc_net); - if (!ieee80211_proc) - printk(KERN_WARNING "Failed to mkdir /proc/net/ieee80211\n"); -} - - -void ieee80211_proc_deinit(void) -{ - if (!ieee80211_proc) - return; - - ieee80211_proc = NULL; - remove_proc_entry("ieee80211", proc_net); -} - -#endif /* CONFIG_PROC_FS */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_proc.h b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_proc.h deleted file mode 100644 index a8e49e97636..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_proc.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2003-2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef IEEE80211_PROC_H -#define IEEE80211_PROC_H - -#ifdef CONFIG_PROC_FS - -void ieee80211_proc_init_sta(struct ieee80211_local *local, - struct sta_info *sta); -void ieee80211_proc_deinit_sta(struct ieee80211_local *local, - struct sta_info *sta); -void ieee80211_proc_init_virtual(struct net_device *dev); -void ieee80211_proc_deinit_virtual(struct net_device *dev); -void ieee80211_proc_init_interface(struct ieee80211_local *local); -void ieee80211_proc_deinit_interface(struct ieee80211_local *local); -void ieee80211_proc_init(void); -void ieee80211_proc_deinit(void); - -#else /* CONFIG_PROC_FS */ - -static inline void ieee80211_proc_init_sta(struct ieee80211_local *local, - struct sta_info *sta) {} -static inline void ieee80211_proc_deinit_sta(struct ieee80211_local *local, - struct sta_info *sta) {} -static inline void ieee80211_proc_init_virtual(struct net_device *dev) {} -static inline void ieee80211_proc_deinit_virtual(struct net_device *dev) {} -static inline void -ieee80211_proc_init_interface(struct ieee80211_local *local) {} -static inline void -ieee80211_proc_deinit_interface(struct ieee80211_local *local) {} -static inline void ieee80211_proc_init(void) {} -static inline void ieee80211_proc_deinit(void) {} -#endif /* CONFIG_PROC_FS */ - -#endif /* IEEE80211_PROC_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_scan.c b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_scan.c deleted file mode 100644 index 7d4effe8290..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_scan.c +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright 2002-2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/module.h> -#include <linux/netdevice.h> -#include <linux/types.h> -#include <linux/slab.h> -#include <linux/skbuff.h> - -#include <net/ieee80211.h> -#include "ieee80211_i.h" -#include "rate_control.h" - - -/* Maximum number of seconds to wait for the traffic load to get below - * threshold before forcing a passive scan. */ -#define MAX_SCAN_WAIT 60 -/* Threshold (pkts/sec TX or RX) for delaying passive scan */ -#define SCAN_TXRX_THRESHOLD 75 - -static void get_channel_params(struct ieee80211_local *local, int channel, - struct ieee80211_hw_modes **mode, - struct ieee80211_channel **chan) -{ - int m; - - for (m = 0; m < local->hw->num_modes; m++) { - *mode = &local->hw->modes[m]; - if ((*mode)->mode == local->conf.phymode) - break; - } - local->scan.mode_idx = m; - local->scan.chan_idx = 0; - do { - *chan = &(*mode)->channels[local->scan.chan_idx]; - if ((*chan)->chan == channel) { - return; - } - local->scan.chan_idx++; - } while (local->scan.chan_idx < (*mode)->num_channels); - *chan = NULL; -} - - -static void next_chan_same_mode(struct ieee80211_local *local, - struct ieee80211_hw_modes **mode, - struct ieee80211_channel **chan) -{ - int m, prev; - - for (m = 0; m < local->hw->num_modes; m++) { - *mode = &local->hw->modes[m]; - if ((*mode)->mode == local->conf.phymode) - break; - } - local->scan.mode_idx = m; - - /* Select next channel - scan only channels marked with W_SCAN flag */ - prev = local->scan.chan_idx; - do { - local->scan.chan_idx++; - if (local->scan.chan_idx >= (*mode)->num_channels) - local->scan.chan_idx = 0; - *chan = &(*mode)->channels[local->scan.chan_idx]; - if ((*chan)->flag & IEEE80211_CHAN_W_SCAN) - break; - } while (local->scan.chan_idx != prev); -} - - -static void next_chan_all_modes(struct ieee80211_local *local, - struct ieee80211_hw_modes **mode, - struct ieee80211_channel **chan) -{ - int prev, prev_m; - - if (local->scan.mode_idx >= local->hw->num_modes) { - local->scan.mode_idx = 0; - local->scan.chan_idx = 0; - } - - /* Select next channel - scan only channels marked with W_SCAN flag */ - prev = local->scan.chan_idx; - prev_m = local->scan.mode_idx; - do { - *mode = &local->hw->modes[local->scan.mode_idx]; - local->scan.chan_idx++; - if (local->scan.chan_idx >= (*mode)->num_channels) { - local->scan.chan_idx = 0; - local->scan.mode_idx++; - if (local->scan.mode_idx >= local->hw->num_modes) - local->scan.mode_idx = 0; - *mode = &local->hw->modes[local->scan.mode_idx]; - } - *chan = &(*mode)->channels[local->scan.chan_idx]; - if ((*chan)->flag & IEEE80211_CHAN_W_SCAN) - break; - } while (local->scan.chan_idx != prev || - local->scan.mode_idx != prev_m); -} - - -static void ieee80211_scan_start(struct net_device *dev, - struct ieee80211_scan_conf *conf) -{ - struct ieee80211_local *local = dev->priv; - int old_mode_idx = local->scan.mode_idx; - int old_chan_idx = local->scan.chan_idx; - struct ieee80211_hw_modes *mode = NULL; - struct ieee80211_channel *chan = NULL; - int ret; - - if (local->hw->passive_scan == 0) { - printk(KERN_DEBUG "%s: Scan handler called, yet the hardware " - "does not support passive scanning. Disabled.\n", - dev->name); - return; - } - - if ((local->scan.tries < MAX_SCAN_WAIT && - local->scan.txrx_count > SCAN_TXRX_THRESHOLD)) { - local->scan.tries++; - /* Count TX/RX packets during one second interval and allow - * scan to start only if the number of packets is below the - * threshold. */ - local->scan.txrx_count = 0; - local->scan.timer.expires = jiffies + HZ; - add_timer(&local->scan.timer); - return; - } - - if (local->scan.skb == NULL) { - printk(KERN_DEBUG "%s: Scan start called even though scan.skb " - "is not set\n", dev->name); - } - - if (local->scan.our_mode_only) { - if (local->scan.channel > 0) { - get_channel_params(local, local->scan.channel, &mode, - &chan); - } else - next_chan_same_mode(local, &mode, &chan); - } - else - next_chan_all_modes(local, &mode, &chan); - - conf->scan_channel = chan->chan; - conf->scan_freq = chan->freq; - conf->scan_channel_val = chan->val; - conf->scan_phymode = mode->mode; - conf->scan_power_level = chan->power_level; - conf->scan_antenna_max = chan->antenna_max; - conf->scan_time = 2 * local->hw->channel_change_time + - local->scan.time; /* 10ms scan time+hardware changes */ - conf->skb = local->scan.skb ? - skb_clone(local->scan.skb, GFP_ATOMIC) : NULL; - conf->tx_control = &local->scan.tx_control; -#if 0 - printk(KERN_DEBUG "%s: Doing scan on mode: %d freq: %d chan: %d " - "for %d ms\n", - dev->name, conf->scan_phymode, conf->scan_freq, - conf->scan_channel, conf->scan_time); -#endif - local->scan.rx_packets = 0; - local->scan.rx_beacon = 0; - local->scan.freq = chan->freq; - local->scan.in_scan = 1; - - ieee80211_netif_oper(dev, NETIF_STOP); - - ret = local->hw->passive_scan(dev, IEEE80211_SCAN_START, conf); - - if (ret == 0) { - long usec = local->hw->channel_change_time + - local->scan.time; - usec += 1000000L / HZ - 1; - usec /= 1000000L / HZ; - local->scan.timer.expires = jiffies + usec; - } else { - local->scan.in_scan = 0; - if (conf->skb) - dev_kfree_skb(conf->skb); - ieee80211_netif_oper(dev, NETIF_WAKE); - if (ret == -EAGAIN) { - local->scan.timer.expires = jiffies + - (local->scan.interval * HZ / 100); - local->scan.mode_idx = old_mode_idx; - local->scan.chan_idx = old_chan_idx; - } else { - printk(KERN_DEBUG "%s: Got unknown error from " - "passive_scan %d\n", dev->name, ret); - local->scan.timer.expires = jiffies + - (local->scan.interval * HZ); - } - local->scan.in_scan = 0; - } - - add_timer(&local->scan.timer); -} - - -static void ieee80211_scan_stop(struct net_device *dev, - struct ieee80211_scan_conf *conf) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_hw_modes *mode; - struct ieee80211_channel *chan; - int wait; - - if (local->hw->passive_scan == NULL) - return; - - if (local->scan.mode_idx >= local->hw->num_modes) { - local->scan.mode_idx = 0; - local->scan.chan_idx = 0; - } - - mode = &local->hw->modes[local->scan.mode_idx]; - - if (local->scan.chan_idx >= mode->num_channels) { - local->scan.chan_idx = 0; - } - - chan = &mode->channels[local->scan.chan_idx]; - - local->hw->passive_scan(dev, IEEE80211_SCAN_END, conf); - -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: Did scan on mode: %d freq: %d chan: %d " - "GOT: %d Beacon: %d (%d)\n", - dev->name, - mode->mode, chan->freq, chan->chan, - local->scan.rx_packets, local->scan.rx_beacon, - local->scan.tries); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - local->scan.num_scans++; - - local->scan.in_scan = 0; - ieee80211_netif_oper(dev, NETIF_WAKE); - - local->scan.tries = 0; - /* Use random interval of scan.interval .. 2 * scan.interval */ - wait = (local->scan.interval * HZ * ((net_random() & 127) + 128)) / - 128; - local->scan.timer.expires = jiffies + wait; - - add_timer(&local->scan.timer); -} - - -static void ieee80211_scan_handler(unsigned long uldev) -{ - struct net_device *dev = (struct net_device *) uldev; - struct ieee80211_local *local = dev->priv; - struct ieee80211_scan_conf conf; - - if (local->scan.interval == 0 && !local->scan.in_scan) { - /* Passive scanning is disabled - keep the timer always - * running to make code cleaner. */ - local->scan.timer.expires = jiffies + 10 * HZ; - add_timer(&local->scan.timer); - return; - } - - memset(&conf, 0, sizeof(struct ieee80211_scan_conf)); - conf.running_freq = local->conf.freq; - conf.running_channel = local->conf.channel; - conf.running_phymode = local->conf.phymode; - conf.running_channel_val = local->conf.channel_val; - conf.running_power_level = local->conf.power_level; - conf.running_antenna_max = local->conf.antenna_max; - - if (local->scan.in_scan == 0) - ieee80211_scan_start(dev, &conf); - else - ieee80211_scan_stop(dev, &conf); -} - - -void ieee80211_init_scan(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_hdr hdr; - u16 fc; - int len = 10; - struct rate_control_extra extra; - - /* Only initialize passive scanning if the hardware supports it */ - if (!local->hw->passive_scan) { - local->scan.skb = NULL; - memset(&local->scan.tx_control, 0, - sizeof(local->scan.tx_control)); - printk(KERN_DEBUG "%s: Does not support passive scan, " - "disabled\n", dev->name); - return; - } - - local->scan.interval = 0; - local->scan.our_mode_only = 1; - local->scan.time = 10000; - local->scan.timer.function = ieee80211_scan_handler; - local->scan.timer.data = (unsigned long) dev; - local->scan.timer.expires = jiffies + local->scan.interval * HZ; - add_timer(&local->scan.timer); - - /* Create a CTS from for broadcasting before - * the low level changes channels */ - local->scan.skb = alloc_skb(len, GFP_KERNEL); - if (local->scan.skb == NULL) { - printk(KERN_WARNING "%s: Failed to allocate CTS packet for " - "passive scan\n", dev->name); - return; - } - - fc = (WLAN_FC_TYPE_CTRL << 2) | (WLAN_FC_STYPE_CTS << 4); - hdr.frame_control = cpu_to_le16(fc); - hdr.duration_id = - cpu_to_le16(2 * local->hw->channel_change_time + - local->scan.time); - memcpy(hdr.addr1, dev->dev_addr, ETH_ALEN); /* DA */ - hdr.seq_ctrl = 0; - - memcpy(skb_put(local->scan.skb, len), &hdr, len); - - memset(&local->scan.tx_control, 0, sizeof(local->scan.tx_control)); - local->scan.tx_control.key_idx = HW_KEY_IDX_INVALID; - local->scan.tx_control.do_not_encrypt = 1; - memset(&extra, 0, sizeof(extra)); - extra.endidx = local->num_curr_rates; - local->scan.tx_control.tx_rate = - rate_control_get_rate(dev, local->scan.skb, &extra)->val; - local->scan.tx_control.no_ack = 1; -} - - -void ieee80211_stop_scan(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - - if (local->hw->passive_scan != 0) { - del_timer_sync(&local->scan.timer); - dev_kfree_skb(local->scan.skb); - local->scan.skb = NULL; - } -} diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_sta.c b/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_sta.c deleted file mode 100644 index be730323548..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/ieee80211_sta.c +++ /dev/null @@ -1,2868 +0,0 @@ -/* - * BSS client mode implementation - * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> - * Copyright 2004, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -/* TODO: - * BSS table: use <BSSID,SSID> as the key to support multi-SSID APs - * order BSS list by RSSI(?) ("quality of AP") - * scan result table filtering (by capability (privacy, IBSS/BSS, WPA/RSN IE, - * SSID) - */ -#include <linux/config.h> -#include <linux/version.h> -#include <linux/if_ether.h> -#include <linux/skbuff.h> -#include <linux/netdevice.h> -#include <linux/if_arp.h> -#include <linux/wireless.h> -#include <linux/random.h> -#include <net/iw_handler.h> -#include <asm/types.h> -#include <asm/delay.h> - -#include <net/ieee80211.h> -#include <net/ieee80211_mgmt.h> -#include "ieee80211_i.h" -#include "rate_control.h" -#include "hostapd_ioctl.h" - -/* #define IEEE80211_IBSS_DEBUG */ - -#define IEEE80211_AUTH_TIMEOUT (HZ / 5) -#define IEEE80211_AUTH_MAX_TRIES 3 -#define IEEE80211_ASSOC_TIMEOUT (HZ / 5) -#define IEEE80211_ASSOC_MAX_TRIES 3 -#define IEEE80211_MONITORING_INTERVAL (2 * HZ) -#define IEEE80211_PROBE_INTERVAL (60 * HZ) -#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ) -#define IEEE80211_SCAN_INTERVAL (2 * HZ) -#define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ) -#define IEEE80211_IBSS_JOIN_TIMEOUT (20 * HZ) - -#define IEEE80211_PROBE_DELAY (HZ / 33) -#define IEEE80211_CHANNEL_TIME (HZ / 33) -#define IEEE80211_PASSIVE_CHANNEL_TIME (HZ / 5) -#define IEEE80211_SCAN_RESULT_EXPIRE (10 * HZ) -#define IEEE80211_IBSS_MERGE_INTERVAL (30 * HZ) -#define IEEE80211_IBSS_INACTIVITY_LIMIT (60 * HZ) - -#define IEEE80211_IBSS_MAX_STA_ENTRIES 128 - - -#define IEEE80211_FC(type, stype) cpu_to_le16((type << 2) | (stype << 4)) - -#define ERP_INFO_USE_PROTECTION BIT(1) - -static void ieee80211_send_probe_req(struct net_device *dev, u8 *dst, - u8 *ssid, size_t ssid_len); -static struct ieee80211_sta_bss * -ieee80211_rx_bss_get(struct net_device *dev, u8 *bssid); -static void ieee80211_rx_bss_put(struct net_device *dev, - struct ieee80211_sta_bss *bss); -static int ieee80211_sta_find_ibss(struct net_device *dev, - struct ieee80211_if_sta *ifsta); -static int ieee80211_sta_wep_configured(struct net_device *dev); - - -/* Parsed Information Elements */ -struct ieee802_11_elems { - u8 *ssid; - u8 ssid_len; - u8 *supp_rates; - u8 supp_rates_len; - u8 *fh_params; - u8 fh_params_len; - u8 *ds_params; - u8 ds_params_len; - u8 *cf_params; - u8 cf_params_len; - u8 *tim; - u8 tim_len; - u8 *ibss_params; - u8 ibss_params_len; - u8 *challenge; - u8 challenge_len; - u8 *wpa; - u8 wpa_len; - u8 *rsn; - u8 rsn_len; - u8 *erp_info; - u8 erp_info_len; - u8 *ext_supp_rates; - u8 ext_supp_rates_len; - u8 *wmm_info; - u8 wmm_info_len; - u8 *wmm_param; - u8 wmm_param_len; -}; - -typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes; - - -static ParseRes ieee802_11_parse_elems(u8 *start, size_t len, - struct ieee802_11_elems *elems) -{ - size_t left = len; - u8 *pos = start; - int unknown = 0; - - memset(elems, 0, sizeof(*elems)); - - while (left >= 2) { - u8 id, elen; - - id = *pos++; - elen = *pos++; - left -= 2; - - if (elen > left) { -#if 0 - if (net_ratelimit()) - printk(KERN_DEBUG "IEEE 802.11 element parse " - "failed (id=%d elen=%d left=%d)\n", - id, elen, left); -#endif - return ParseFailed; - } - - switch (id) { - case WLAN_EID_SSID: - elems->ssid = pos; - elems->ssid_len = elen; - break; - case WLAN_EID_SUPP_RATES: - elems->supp_rates = pos; - elems->supp_rates_len = elen; - break; - case WLAN_EID_FH_PARAMS: - elems->fh_params = pos; - elems->fh_params_len = elen; - break; - case WLAN_EID_DS_PARAMS: - elems->ds_params = pos; - elems->ds_params_len = elen; - break; - case WLAN_EID_CF_PARAMS: - elems->cf_params = pos; - elems->cf_params_len = elen; - break; - case WLAN_EID_TIM: - elems->tim = pos; - elems->tim_len = elen; - break; - case WLAN_EID_IBSS_PARAMS: - elems->ibss_params = pos; - elems->ibss_params_len = elen; - break; - case WLAN_EID_CHALLENGE: - elems->challenge = pos; - elems->challenge_len = elen; - break; - case WLAN_EID_WPA: - if (elen >= 4 && pos[0] == 0x00 && pos[1] == 0x50 && - pos[2] == 0xf2) { - /* Microsoft OUI (00:50:F2) */ - if (pos[3] == 1) { - /* OUI Type 1 - WPA IE */ - elems->wpa = pos; - elems->wpa_len = elen; - } else if (elen >= 5 && pos[3] == 2) { - if (pos[4] == 0) { - elems->wmm_info = pos; - elems->wmm_info_len = elen; - } else if (pos[4] == 1) { - elems->wmm_param = pos; - elems->wmm_param_len = elen; - } - } - } - break; - case WLAN_EID_RSN: - elems->rsn = pos; - elems->rsn_len = elen; - break; - case WLAN_EID_ERP_INFO: - elems->erp_info = pos; - elems->erp_info_len = elen; - break; - case WLAN_EID_EXT_SUPP_RATES: - elems->ext_supp_rates = pos; - elems->ext_supp_rates_len = elen; - break; - default: -#if 0 - printk(KERN_DEBUG "IEEE 802.11 element parse ignored " - "unknown element (id=%d elen=%d)\n", - id, elen); -#endif - unknown++; - break; - } - - left -= elen; - pos += elen; - } - - if (left) - return ParseFailed; - - return unknown ? ParseUnknown : ParseOK; -} - - - - -static int ecw2cw(int ecw) -{ - int cw = 1; - while (ecw > 0) { - cw <<= 1; - ecw--; - } - return cw - 1; -} - - -static void ieee80211_sta_wmm_params(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - u8 *wmm_param, size_t wmm_param_len) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_tx_queue_params params; - size_t left; - int count; - u8 *pos; - - if (wmm_param_len < 8 || wmm_param[5] /* version */ != 1) - return; - count = wmm_param[6] & 0x0f; - if (count == ifsta->wmm_last_param_set) - return; - ifsta->wmm_last_param_set = count; - - pos = wmm_param + 8; - left = wmm_param_len - 8; - - memset(¶ms, 0, sizeof(params)); - - if (local->hw->conf_tx == NULL) - return; - - local->wmm_acm = 0; - for (; left >= 4; left -= 4, pos += 4) { - int aci = (pos[0] >> 5) & 0x03; - int acm = (pos[0] >> 4) & 0x01; - int queue; - - switch (aci) { - case 1: - queue = IEEE80211_TX_QUEUE_DATA3; - if (acm) { - local->wmm_acm |= BIT(1) | BIT(2); - } - break; - case 2: - queue = IEEE80211_TX_QUEUE_DATA1; - if (acm) { - local->wmm_acm |= BIT(4) | BIT(5); - } - break; - case 3: - queue = IEEE80211_TX_QUEUE_DATA0; - if (acm) { - local->wmm_acm |= BIT(6) | BIT(7); - } - break; - case 0: - default: - queue = IEEE80211_TX_QUEUE_DATA2; - if (acm) { - local->wmm_acm |= BIT(0) | BIT(3); - } - break; - } - - params.aifs = pos[0] & 0x0f; - params.cw_max = ecw2cw((pos[1] & 0xf0) >> 4); - params.cw_min = ecw2cw(pos[1] & 0x0f); - /* TXOP is in units of 32 usec; burst_time in 0.1 ms */ - params.burst_time = (pos[2] | (pos[3] << 8)) * 32 / 100; - printk(KERN_DEBUG "%s: WMM queue=%d aci=%d acm=%d aifs=%d " - "cWmin=%d cWmax=%d burst=%d\n", - dev->name, queue, aci, acm, params.aifs, params.cw_min, - params.cw_max, params.burst_time); - /* TODO: handle ACM (block TX, fallback to next lowest allowed - * AC for now) */ - if (local->hw->conf_tx(local->mdev, queue, ¶ms)) { - printk(KERN_DEBUG "%s: failed to set TX queue " - "parameters for queue %d\n", dev->name, queue); - } - } -} - - -static void ieee80211_sta_send_associnfo(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - char *buf; - size_t len; - int i; - union iwreq_data wrqu; - - if (ifsta->assocreq_ies == NULL && ifsta->assocresp_ies == NULL) - return; - - buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len + - ifsta->assocresp_ies_len), GFP_ATOMIC); - if (buf == NULL) - return; - - len = sprintf(buf, "ASSOCINFO("); - if (ifsta->assocreq_ies) { - len += sprintf(buf + len, "ReqIEs="); - for (i = 0; i < ifsta->assocreq_ies_len; i++) { - len += sprintf(buf + len, "%02x", - ifsta->assocreq_ies[i]); - } - } - if (ifsta->assocresp_ies) { - if (ifsta->assocreq_ies) - len += sprintf(buf + len, " "); - len += sprintf(buf + len, "RespIEs="); - for (i = 0; i < ifsta->assocresp_ies_len; i++) { - len += sprintf(buf + len, "%02x", - ifsta->assocresp_ies[i]); - } - } - len += sprintf(buf + len, ")"); - - if (len > IW_CUSTOM_MAX) { - len = sprintf(buf, "ASSOCRESPIE="); - for (i = 0; i < ifsta->assocresp_ies_len; i++) { - len += sprintf(buf + len, "%02x", - ifsta->assocresp_ies[i]); - } - } - - memset(&wrqu, 0, sizeof(wrqu)); - wrqu.data.length = len; - wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); - - kfree(buf); -} - - -static void ieee80211_set_associated(struct net_device *dev, - struct ieee80211_if_sta *ifsta, int assoc) -{ - union iwreq_data wrqu; - - if (ifsta->associated == assoc) - return; - - ifsta->associated = assoc; - - if (assoc) { - struct ieee80211_sub_if_data *sdata; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - return; - ifsta->prev_bssid_set = 1; - memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN); - memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN); - ieee80211_sta_send_associnfo(dev, ifsta); - } else { - memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); - } - wrqu.ap_addr.sa_family = ARPHRD_ETHER; - wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); - ifsta->last_probe = jiffies; -} - - -static void ieee80211_sta_tx(struct net_device *dev, struct sk_buff *skb, - int encrypt, int probe_resp) -{ - struct ieee80211_sub_if_data *sdata; - struct ieee80211_tx_packet_data *pkt_data; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - skb->dev = sdata->master; - skb->mac.raw = skb->nh.raw = skb->h.raw = skb->data; - - pkt_data = (struct ieee80211_tx_packet_data *) skb->cb; - memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data)); - pkt_data->magic = IEEE80211_CB_MAGIC; - pkt_data->sdata = sdata; - pkt_data->control.do_not_encrypt = !encrypt; - if (probe_resp) - pkt_data->control.pkt_type = PKT_PROBE_RESP; - - dev_queue_xmit(skb); -} - - -static void ieee80211_send_auth(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - int transaction, u8 *extra, size_t extra_len, - int encrypt) -{ - struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; - - skb = dev_alloc_skb(sizeof(*mgmt) + 6 + extra_len); - if (skb == NULL) { - printk(KERN_DEBUG "%s: failed to allocate buffer for auth " - "frame\n", dev->name); - return; - } - - mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24 + 6); - memset(mgmt, 0, 24 + 6); - mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, - WLAN_FC_STYPE_AUTH); - if (encrypt) - mgmt->frame_control |= cpu_to_le16(WLAN_FC_ISWEP); - memcpy(mgmt->da, ifsta->bssid, ETH_ALEN); - memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); - memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); - mgmt->u.auth.auth_alg = cpu_to_le16(ifsta->auth_alg); - mgmt->u.auth.auth_transaction = cpu_to_le16(transaction); - ifsta->auth_transaction = transaction + 1; - mgmt->u.auth.status_code = cpu_to_le16(0); - if (extra) - memcpy(skb_put(skb, extra_len), extra, extra_len); - - ieee80211_sta_tx(dev, skb, encrypt, 0); -} - - -static void ieee80211_authenticate(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - ifsta->auth_tries++; - if (ifsta->auth_tries > IEEE80211_AUTH_MAX_TRIES) { - printk(KERN_DEBUG "%s: authentication with AP " MACSTR - " timed out\n", - dev->name, MAC2STR(ifsta->bssid)); - return; - } - - ifsta->state = IEEE80211_AUTHENTICATE; - printk(KERN_DEBUG "%s: authenticate with AP " MACSTR "\n", - dev->name, MAC2STR(ifsta->bssid)); - - ieee80211_send_auth(dev, ifsta, 1, NULL, 0, 0); - - mod_timer(&ifsta->timer, jiffies + IEEE80211_AUTH_TIMEOUT); -} - - -static void ieee80211_send_assoc(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - struct ieee80211_local *local = dev->priv; - struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; - u8 *pos, *ies; - int i, len; - u16 capab; - struct ieee80211_sta_bss *bss; - int wmm = 0; - - skb = dev_alloc_skb(sizeof(*mgmt) + 200 + ifsta->extra_ie_len + - ifsta->ssid_len); - if (skb == NULL) { - printk(KERN_DEBUG "%s: failed to allocate buffer for assoc " - "frame\n", dev->name); - return; - } - - capab = ifsta->capab; - if (local->conf.phymode == MODE_IEEE80211G) { - capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME | - WLAN_CAPABILITY_SHORT_PREAMBLE; - } - bss = ieee80211_rx_bss_get(dev, ifsta->bssid); - if (bss) { - if (bss->capability & WLAN_CAPABILITY_PRIVACY) - capab |= WLAN_CAPABILITY_PRIVACY; - if (bss->wmm_ie) { - wmm = 1; - } - ieee80211_rx_bss_put(dev, bss); - } - - mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); - memset(mgmt, 0, 24); - memcpy(mgmt->da, ifsta->bssid, ETH_ALEN); - memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); - memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); - - if (ifsta->prev_bssid_set) { - skb_put(skb, 10); - mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, - WLAN_FC_STYPE_REASSOC_REQ); - mgmt->u.reassoc_req.capab_info = cpu_to_le16(capab); - mgmt->u.reassoc_req.listen_interval = cpu_to_le16(1); - memcpy(mgmt->u.reassoc_req.current_ap, ifsta->prev_bssid, - ETH_ALEN); - } else { - skb_put(skb, 4); - mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, - WLAN_FC_STYPE_ASSOC_REQ); - mgmt->u.assoc_req.capab_info = cpu_to_le16(capab); - mgmt->u.assoc_req.listen_interval = cpu_to_le16(1); - } - - /* SSID */ - ies = pos = skb_put(skb, 2 + ifsta->ssid_len); - *pos++ = WLAN_EID_SSID; - *pos++ = ifsta->ssid_len; - memcpy(pos, ifsta->ssid, ifsta->ssid_len); - - len = local->num_curr_rates; - if (len > 8) - len = 8; - pos = skb_put(skb, len + 2); - *pos++ = WLAN_EID_SUPP_RATES; - *pos++ = len; - for (i = 0; i < len; i++) { - int rate = local->curr_rates[i].rate; - if (local->conf.phymode == MODE_ATHEROS_TURBO) - rate /= 2; - *pos++ = (u8) (rate / 5); - } - - if (local->num_curr_rates > len) { - pos = skb_put(skb, local->num_curr_rates - len + 2); - *pos++ = WLAN_EID_EXT_SUPP_RATES; - *pos++ = local->num_curr_rates - len; - for (i = len; i < local->num_curr_rates; i++) { - int rate = local->curr_rates[i].rate; - if (local->conf.phymode == MODE_ATHEROS_TURBO) - rate /= 2; - *pos++ = (u8) (rate / 5); - } - } - - if (ifsta->extra_ie) { - pos = skb_put(skb, ifsta->extra_ie_len); - memcpy(pos, ifsta->extra_ie, ifsta->extra_ie_len); - } - - if (wmm && ifsta->wmm_enabled) { - pos = skb_put(skb, 9); - *pos++ = WLAN_EID_VENDOR_SPECIFIC; - *pos++ = 7; /* len */ - *pos++ = 0x00; /* Microsoft OUI 00:50:F2 */ - *pos++ = 0x50; - *pos++ = 0xf2; - *pos++ = 2; /* WME */ - *pos++ = 0; /* WME info */ - *pos++ = 1; /* WME ver */ - *pos++ = 0; - } - - kfree(ifsta->assocreq_ies); - ifsta->assocreq_ies_len = (skb->data + skb->len) - ies; - ifsta->assocreq_ies = kmalloc(ifsta->assocreq_ies_len, GFP_ATOMIC); - if (ifsta->assocreq_ies) - memcpy(ifsta->assocreq_ies, ies, ifsta->assocreq_ies_len); - - ieee80211_sta_tx(dev, skb, 0, 0); -} - - -static void ieee80211_send_deauth(struct net_device *dev, - struct ieee80211_if_sta *ifsta, u16 reason) -{ - struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; - - skb = dev_alloc_skb(sizeof(*mgmt)); - if (skb == NULL) { - printk(KERN_DEBUG "%s: failed to allocate buffer for deauth " - "frame\n", dev->name); - return; - } - - mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); - memset(mgmt, 0, 24); - memcpy(mgmt->da, ifsta->bssid, ETH_ALEN); - memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); - memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); - mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, - WLAN_FC_STYPE_DEAUTH); - skb_put(skb, 2); - mgmt->u.deauth.reason_code = cpu_to_le16(reason); - - ieee80211_sta_tx(dev, skb, 0, 0); -} - - -static void ieee80211_send_disassoc(struct net_device *dev, - struct ieee80211_if_sta *ifsta, u16 reason) -{ - struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; - - skb = dev_alloc_skb(sizeof(*mgmt)); - if (skb == NULL) { - printk(KERN_DEBUG "%s: failed to allocate buffer for disassoc " - "frame\n", dev->name); - return; - } - - mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); - memset(mgmt, 0, 24); - memcpy(mgmt->da, ifsta->bssid, ETH_ALEN); - memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); - memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); - mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, - WLAN_FC_STYPE_DISASSOC); - skb_put(skb, 2); - mgmt->u.disassoc.reason_code = cpu_to_le16(reason); - - ieee80211_sta_tx(dev, skb, 0, 0); -} - - -static int ieee80211_privacy_mismatch(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - struct ieee80211_sta_bss *bss; - int res = 0; - - if (ifsta == NULL || ifsta->mixed_cell || - ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE) - return 0; - - bss = ieee80211_rx_bss_get(dev, ifsta->bssid); - if (bss == NULL) - return 0; - - if (ieee80211_sta_wep_configured(dev) != - !!(bss->capability & WLAN_CAPABILITY_PRIVACY)) - res = 1; - - ieee80211_rx_bss_put(dev, bss); - - return res; -} - - -static void ieee80211_associate(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - ifsta->assoc_tries++; - if (ifsta->assoc_tries > IEEE80211_ASSOC_MAX_TRIES) { - printk(KERN_DEBUG "%s: association with AP " MACSTR - " timed out\n", - dev->name, MAC2STR(ifsta->bssid)); - return; - } - - ifsta->state = IEEE80211_ASSOCIATE; - printk(KERN_DEBUG "%s: associate with AP " MACSTR "\n", - dev->name, MAC2STR(ifsta->bssid)); - if (ieee80211_privacy_mismatch(dev, ifsta)) { - printk(KERN_DEBUG "%s: mismatch in privacy configuration and " - "mixed-cell disabled - abort association\n", dev->name); - return; - } - - ieee80211_send_assoc(dev, ifsta); - - mod_timer(&ifsta->timer, jiffies + IEEE80211_ASSOC_TIMEOUT); -} - - -static void ieee80211_associated(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - int disassoc; - - /* TODO: start monitoring current AP signal quality and number of - * missed beacons. Scan other channels every now and then and search - * for better APs. */ - /* TODO: remove expired BSSes */ - - ifsta->state = IEEE80211_ASSOCIATED; - - sta = sta_info_get(local, ifsta->bssid); - if (sta == NULL) { - printk(KERN_DEBUG "%s: No STA entry for own AP " MACSTR "\n", - dev->name, MAC2STR(ifsta->bssid)); - disassoc = 1; - } else { - disassoc = 0; - if (time_after(jiffies, - sta->last_rx + IEEE80211_MONITORING_INTERVAL)) { - if (ifsta->probereq_poll) { - printk(KERN_DEBUG "%s: No ProbeResp from " - "current AP " MACSTR " - assume out of " - "range\n", - dev->name, MAC2STR(ifsta->bssid)); - disassoc = 1; - } else { - ieee80211_send_probe_req(dev, ifsta->bssid, - local->scan_ssid, - local->scan_ssid_len); - ifsta->probereq_poll = 1; - } - } else { - ifsta->probereq_poll = 0; - if (time_after(jiffies, ifsta->last_probe + - IEEE80211_PROBE_INTERVAL)) { - ifsta->last_probe = jiffies; - ieee80211_send_probe_req(dev, ifsta->bssid, - ifsta->ssid, - ifsta->ssid_len); - } - } - sta_info_release(local, sta); - } - if (disassoc) { - union iwreq_data wrqu; - memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); - wrqu.ap_addr.sa_family = ARPHRD_ETHER; - wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); - mod_timer(&ifsta->timer, - jiffies + IEEE80211_MONITORING_INTERVAL + 30 * HZ); - } else { - mod_timer(&ifsta->timer, - jiffies + IEEE80211_MONITORING_INTERVAL); - } -} - - -static void ieee80211_send_probe_req(struct net_device *dev, u8 *dst, - u8 *ssid, size_t ssid_len) -{ - struct ieee80211_local *local = dev->priv; - struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; - u8 *pos, *supp_rates, *esupp_rates = NULL; - int i; - - skb = dev_alloc_skb(sizeof(*mgmt) + 200); - if (skb == NULL) { - printk(KERN_DEBUG "%s: failed to allocate buffer for probe " - "request\n", dev->name); - return; - } - - mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); - memset(mgmt, 0, 24); - mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, - WLAN_FC_STYPE_PROBE_REQ); - memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); - if (dst) { - memcpy(mgmt->da, dst, ETH_ALEN); - memcpy(mgmt->bssid, dst, ETH_ALEN); - } else { - memset(mgmt->da, 0xff, ETH_ALEN); - memset(mgmt->bssid, 0xff, ETH_ALEN); - } - pos = skb_put(skb, 2 + ssid_len); - *pos++ = WLAN_EID_SSID; - *pos++ = ssid_len; - memcpy(pos, ssid, ssid_len); - - supp_rates = skb_put(skb, 2); - supp_rates[0] = WLAN_EID_SUPP_RATES; - supp_rates[1] = 0; - for (i = 0; i < local->num_curr_rates; i++) { - struct ieee80211_rate *rate = &local->curr_rates[i]; - if (!(rate->flags & IEEE80211_RATE_SUPPORTED)) - continue; - if (esupp_rates) { - pos = skb_put(skb, 1); - esupp_rates[1]++; - } else if (supp_rates[1] == 8) { - esupp_rates = skb_put(skb, 3); - esupp_rates[0] = WLAN_EID_EXT_SUPP_RATES; - esupp_rates[1] = 1; - pos = &esupp_rates[2]; - } else { - pos = skb_put(skb, 1); - supp_rates[1]++; - } - if (local->conf.phymode == MODE_ATHEROS_TURBO) - *pos = rate->rate / 10; - else - *pos = rate->rate / 5; - } - - ieee80211_sta_tx(dev, skb, 0, 0); -} - - -static int ieee80211_sta_wep_configured(struct net_device *dev) -{ - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata == NULL || sdata->default_key == NULL || - sdata->default_key->alg != ALG_WEP) - return 0; - return 1; -} - - -static void ieee80211_auth_completed(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - printk(KERN_DEBUG "%s: authenticated\n", dev->name); - ifsta->authenticated = 1; - ieee80211_associate(dev, ifsta); -} - - -static void ieee80211_auth_challenge(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status) -{ - u8 *pos; - struct ieee802_11_elems elems; - - printk(KERN_DEBUG "%s: replying to auth challenge\n", dev->name); - pos = mgmt->u.auth.variable; - if (ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems) - == ParseFailed) { - printk(KERN_DEBUG "%s: failed to parse Auth(challenge)\n", - dev->name); - return; - } - if (elems.challenge == NULL) { - printk(KERN_DEBUG "%s: no challenge IE in shared key auth " - "frame\n", dev->name); - return; - } - ieee80211_send_auth(dev, ifsta, 3, elems.challenge - 2, - elems.challenge_len + 2, 1); -} - - -static void ieee80211_rx_mgmt_auth(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status) -{ - struct ieee80211_local *local = dev->priv; - u16 auth_alg, auth_transaction, status_code; - - if (ifsta->state != IEEE80211_AUTHENTICATE && - local->conf.mode != IW_MODE_ADHOC) { - printk(KERN_DEBUG "%s: authentication frame received from " - MACSTR ", but not in authenticate state - ignored\n", - dev->name, MAC2STR(mgmt->sa)); - return; - } - - if (len < 24 + 6) { - printk(KERN_DEBUG "%s: too short (%zd) authentication frame " - "received from " MACSTR " - ignored\n", - dev->name, len, MAC2STR(mgmt->sa)); - return; - } - - if (local->conf.mode != IW_MODE_ADHOC && - memcmp(ifsta->bssid, mgmt->sa, ETH_ALEN) != 0) { - printk(KERN_DEBUG "%s: authentication frame received from " - "unknown AP (SA=" MACSTR " BSSID=" MACSTR ") - " - "ignored\n", dev->name, MAC2STR(mgmt->sa), - MAC2STR(mgmt->bssid)); - return; - } - - if (local->conf.mode == IW_MODE_ADHOC && - memcmp(ifsta->bssid, mgmt->bssid, ETH_ALEN) != 0) { - printk(KERN_DEBUG "%s: authentication frame received from " - "unknown BSSID (SA=" MACSTR " BSSID=" MACSTR ") - " - "ignored\n", dev->name, MAC2STR(mgmt->sa), - MAC2STR(mgmt->bssid)); - return; - } - - auth_alg = le16_to_cpu(mgmt->u.auth.auth_alg); - auth_transaction = le16_to_cpu(mgmt->u.auth.auth_transaction); - status_code = le16_to_cpu(mgmt->u.auth.status_code); - - printk(KERN_DEBUG "%s: RX authentication from " MACSTR " (alg=%d " - "transaction=%d status=%d)\n", - dev->name, MAC2STR(mgmt->sa), auth_alg, - auth_transaction, status_code); - - if (local->conf.mode == IW_MODE_ADHOC) { - /* IEEE 802.11 standard does not require authentication in IBSS - * networks and most implementations do not seem to use it. - * However, try to reply to authentication attempts if someone - * has actually implemented this. - * TODO: Could implement shared key authentication. */ - if (auth_alg != WLAN_AUTH_OPEN || auth_transaction != 1) { - printk(KERN_DEBUG "%s: unexpected IBSS authentication " - "frame (alg=%d transaction=%d)\n", - dev->name, auth_alg, auth_transaction); - return; - } - ieee80211_send_auth(dev, ifsta, 2, NULL, 0, 0); - } - - if (auth_alg != ifsta->auth_alg || - auth_transaction != ifsta->auth_transaction) { - printk(KERN_DEBUG "%s: unexpected authentication frame " - "(alg=%d transaction=%d)\n", - dev->name, auth_alg, auth_transaction); - return; - } - - if (status_code != WLAN_STATUS_SUCCESS) { - printk(KERN_DEBUG "%s: AP denied authentication (auth_alg=%d " - "code=%d)\n", dev->name, ifsta->auth_alg, status_code); - if (status_code == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG) { - const int num_algs = 3; - u8 algs[num_algs]; - int i, pos; - algs[0] = algs[1] = algs[2] = 0xff; - if (ifsta->auth_algs & IEEE80211_AUTH_ALG_OPEN) - algs[0] = WLAN_AUTH_OPEN; - if (ifsta->auth_algs & IEEE80211_AUTH_ALG_SHARED_KEY) - algs[1] = WLAN_AUTH_SHARED_KEY; - if (ifsta->auth_algs & IEEE80211_AUTH_ALG_LEAP) - algs[2] = WLAN_AUTH_LEAP; - if (ifsta->auth_alg == WLAN_AUTH_OPEN) - pos = 0; - else if (ifsta->auth_alg == WLAN_AUTH_SHARED_KEY) - pos = 1; - else - pos = 2; - for (i = 0; i < num_algs; i++) { - pos++; - if (pos >= num_algs) - pos = 0; - if (algs[pos] == ifsta->auth_alg || - algs[pos] == 0xff) - continue; - if (algs[pos] == WLAN_AUTH_SHARED_KEY && - !ieee80211_sta_wep_configured(dev)) - continue; - ifsta->auth_alg = algs[pos]; - printk(KERN_DEBUG "%s: set auth_alg=%d for " - "next try\n", - dev->name, ifsta->auth_alg); - break; - } - } - return; - } - - switch (ifsta->auth_alg) { - case WLAN_AUTH_OPEN: - case WLAN_AUTH_LEAP: - ieee80211_auth_completed(dev, ifsta); - break; - case WLAN_AUTH_SHARED_KEY: - if (ifsta->auth_transaction == 4) - ieee80211_auth_completed(dev, ifsta); - else - ieee80211_auth_challenge(dev, ifsta, mgmt, len, - rx_status); - break; - } -} - - -static void ieee80211_rx_mgmt_deauth(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status) -{ - u16 reason_code; - - if (len < 24 + 2) { - printk(KERN_DEBUG "%s: too short (%zd) deauthentication frame " - "received from " MACSTR " - ignored\n", - dev->name, len, MAC2STR(mgmt->sa)); - return; - } - - if (memcmp(ifsta->bssid, mgmt->sa, ETH_ALEN) != 0) { - printk(KERN_DEBUG "%s: deauthentication frame received from " - "unknown AP (SA=" MACSTR " BSSID=" MACSTR ") - " - "ignored\n", dev->name, MAC2STR(mgmt->sa), - MAC2STR(mgmt->bssid)); - return; - } - - reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); - - printk(KERN_DEBUG "%s: RX deauthentication from " MACSTR - " (reason=%d)\n", - dev->name, MAC2STR(mgmt->sa), reason_code); - - if (ifsta->authenticated) { - printk(KERN_DEBUG "%s: deauthenticated\n", dev->name); - } - - if (ifsta->state == IEEE80211_AUTHENTICATE || - ifsta->state == IEEE80211_ASSOCIATE || - ifsta->state == IEEE80211_ASSOCIATED) { - ifsta->state = IEEE80211_AUTHENTICATE; - mod_timer(&ifsta->timer, - jiffies + IEEE80211_RETRY_AUTH_INTERVAL); - } - - ieee80211_set_associated(dev, ifsta, 0); - ifsta->authenticated = 0; -} - - -static void ieee80211_rx_mgmt_disassoc(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status) -{ - u16 reason_code; - - if (len < 24 + 2) { - printk(KERN_DEBUG "%s: too short (%zd) disassociation frame " - "received from " MACSTR " - ignored\n", - dev->name, len, MAC2STR(mgmt->sa)); - return; - } - - if (memcmp(ifsta->bssid, mgmt->sa, ETH_ALEN) != 0) { - printk(KERN_DEBUG "%s: disassociation frame received from " - "unknown AP (SA=" MACSTR " BSSID=" MACSTR ") - " - "ignored\n", dev->name, MAC2STR(mgmt->sa), - MAC2STR(mgmt->bssid)); - return; - } - - reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); - - printk(KERN_DEBUG "%s: RX disassociation from " MACSTR - " (reason=%d)\n", - dev->name, MAC2STR(mgmt->sa), reason_code); - - if (ifsta->associated) - printk(KERN_DEBUG "%s: disassociated\n", dev->name); - - if (ifsta->state == IEEE80211_ASSOCIATED) { - ifsta->state = IEEE80211_ASSOCIATE; - mod_timer(&ifsta->timer, - jiffies + IEEE80211_RETRY_AUTH_INTERVAL); - } - - ieee80211_set_associated(dev, ifsta, 0); -} - - -static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status, - int reassoc) -{ - struct ieee80211_local *local = dev->priv; - struct sta_info *sta; - u32 rates; - u16 capab_info, status_code, aid; - struct ieee802_11_elems elems; - u8 *pos; - int i, j; - - /* AssocResp and ReassocResp have identical structure, so process both - * of them in this function. */ - - if (ifsta->state != IEEE80211_ASSOCIATE) { - printk(KERN_DEBUG "%s: association frame received from " - MACSTR ", but not in associate state - ignored\n", - dev->name, MAC2STR(mgmt->sa)); - return; - } - - if (len < 24 + 6) { - printk(KERN_DEBUG "%s: too short (%zd) association frame " - "received from " MACSTR " - ignored\n", - dev->name, len, MAC2STR(mgmt->sa)); - return; - } - - if (memcmp(ifsta->bssid, mgmt->sa, ETH_ALEN) != 0) { - printk(KERN_DEBUG "%s: association frame received from " - "unknown AP (SA=" MACSTR " BSSID=" MACSTR ") - " - "ignored\n", dev->name, MAC2STR(mgmt->sa), - MAC2STR(mgmt->bssid)); - return; - } - - capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); - status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); - aid = le16_to_cpu(mgmt->u.assoc_resp.aid); - if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) - printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " - "set\n", dev->name, aid); - aid &= ~(BIT(15) | BIT(14)); - - printk(KERN_DEBUG "%s: RX %sssocResp from " MACSTR " (capab=0x%x " - "status=%d aid=%d)\n", - dev->name, reassoc ? "Rea" : "A", MAC2STR(mgmt->sa), - capab_info, status_code, aid); - - if (status_code != WLAN_STATUS_SUCCESS) { - printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", - dev->name, status_code); - return; - } - - pos = mgmt->u.assoc_resp.variable; - if (ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems) - == ParseFailed) { - printk(KERN_DEBUG "%s: failed to parse AssocResp\n", - dev->name); - return; - } - - if (elems.supp_rates == NULL) { - printk(KERN_DEBUG "%s: no SuppRates element in AssocResp\n", - dev->name); - return; - } - - printk(KERN_DEBUG "%s: associated\n", dev->name); - ifsta->aid = aid; - ifsta->ap_capab = capab_info; - - kfree(ifsta->assocresp_ies); - ifsta->assocresp_ies_len = len - (pos - (u8 *) mgmt); - ifsta->assocresp_ies = kmalloc(ifsta->assocresp_ies_len, GFP_ATOMIC); - if (ifsta->assocresp_ies) - memcpy(ifsta->assocresp_ies, pos, ifsta->assocresp_ies_len); - - ieee80211_set_associated(dev, ifsta, 1); - - /* Add STA entry for the AP */ - sta = sta_info_get(local, ifsta->bssid); - if (sta == NULL) { - sta = sta_info_add(local, dev, ifsta->bssid); - if (sta == NULL) { - printk(KERN_DEBUG "%s: failed to add STA entry for the" - " AP\n", dev->name); - return; - } - } - - sta->dev = dev; - sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC; - sta->assoc_ap = 1; - - rates = 0; - for (i = 0; i < elems.supp_rates_len; i++) { - int rate = (elems.supp_rates[i] & 0x7f) * 5; - if (local->conf.phymode == MODE_ATHEROS_TURBO) - rate *= 2; - for (j = 0; j < local->num_curr_rates; j++) - if (local->curr_rates[j].rate == rate) - rates |= BIT(j); - } - for (i = 0; i < elems.ext_supp_rates_len; i++) { - int rate = (elems.ext_supp_rates[i] & 0x7f) * 5; - if (local->conf.phymode == MODE_ATHEROS_TURBO) - rate *= 2; - for (j = 0; j < local->num_curr_rates; j++) - if (local->curr_rates[j].rate == rate) - rates |= BIT(j); - } - sta->supp_rates = rates; - - rate_control_rate_init(local, sta); - - if (elems.wmm_param && ifsta->wmm_enabled) { - sta->flags |= WLAN_STA_WME; - ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, - elems.wmm_param_len); - } - - - sta_info_release(local, sta); - - ieee80211_associated(dev, ifsta); -} - - -/* Caller must hold local->sta_bss_lock */ -static void __ieee80211_rx_bss_hash_add(struct net_device *dev, - struct ieee80211_sta_bss *bss) -{ - struct ieee80211_local *local = dev->priv; - bss->hnext = local->sta_bss_hash[STA_HASH(bss->bssid)]; - local->sta_bss_hash[STA_HASH(bss->bssid)] = bss; -} - - -/* Caller must hold local->sta_bss_lock */ -static void __ieee80211_rx_bss_hash_del(struct net_device *dev, - struct ieee80211_sta_bss *bss) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sta_bss *b, *prev = NULL; - b = local->sta_bss_hash[STA_HASH(bss->bssid)]; - while (b) { - if (b == bss) { - if (prev == NULL) { - local->sta_bss_hash[STA_HASH(bss->bssid)] = - bss->hnext; - } else { - prev->hnext = bss->hnext; - } - break; - } - prev = b; - b = b->hnext; - } -} - - -static struct ieee80211_sta_bss * -ieee80211_rx_bss_add(struct net_device *dev, u8 *bssid) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sta_bss *bss; - - bss = kmalloc(sizeof(*bss), GFP_ATOMIC); - if (bss == NULL) - return NULL; - memset(bss, 0, sizeof(*bss)); - atomic_inc(&bss->users); - atomic_inc(&bss->users); - memcpy(bss->bssid, bssid, ETH_ALEN); - - spin_lock_bh(&local->sta_bss_lock); - /* TODO: order by RSSI? */ - list_add_tail(&bss->list, &local->sta_bss_list); - __ieee80211_rx_bss_hash_add(dev, bss); - spin_unlock_bh(&local->sta_bss_lock); - return bss; -} - - -static struct ieee80211_sta_bss * -ieee80211_rx_bss_get(struct net_device *dev, u8 *bssid) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sta_bss *bss; - - spin_lock_bh(&local->sta_bss_lock); - bss = local->sta_bss_hash[STA_HASH(bssid)]; - while (bss) { - if (memcmp(bss->bssid, bssid, ETH_ALEN) == 0) { - atomic_inc(&bss->users); - break; - } - bss = bss->hnext; - } - spin_unlock_bh(&local->sta_bss_lock); - return bss; -} - - -static void ieee80211_rx_bss_free(struct ieee80211_sta_bss *bss) -{ - kfree(bss->wpa_ie); - kfree(bss->rsn_ie); - kfree(bss->wmm_ie); - kfree(bss); -} - - -static void ieee80211_rx_bss_put(struct net_device *dev, - struct ieee80211_sta_bss *bss) -{ - struct ieee80211_local *local = dev->priv; - if (!atomic_dec_and_test(&bss->users)) - return; - - spin_lock_bh(&local->sta_bss_lock); - __ieee80211_rx_bss_hash_del(dev, bss); - list_del(&bss->list); - spin_unlock_bh(&local->sta_bss_lock); - ieee80211_rx_bss_free(bss); -} - - -void ieee80211_rx_bss_list_init(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - spin_lock_init(&local->sta_bss_lock); - INIT_LIST_HEAD(&local->sta_bss_list); -} - - -void ieee80211_rx_bss_list_deinit(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sta_bss *bss; - struct list_head *ptr; - - for (;;) { - ptr = local->sta_bss_list.next; - if (!ptr || ptr == &local->sta_bss_list) - break; - bss = list_entry(ptr, struct ieee80211_sta_bss, list); - ieee80211_rx_bss_put(dev, bss); - } -} - - -static void ieee80211_rx_bss_info(struct net_device *dev, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status, - int beacon) -{ - struct ieee80211_local *local = dev->priv; - struct ieee802_11_elems elems; - size_t baselen; - int channel, invalid = 0, clen; - struct ieee80211_sta_bss *bss; - struct sta_info *sta; - struct ieee80211_sub_if_data *sdata; - u64 timestamp; - u8 *pos; - - if (!beacon && memcmp(mgmt->da, dev->dev_addr, ETH_ALEN)) - return; /* ignore ProbeResp to foreign address */ - -#if 0 - printk(KERN_DEBUG "%s: RX %s from " MACSTR " to " MACSTR "\n", - dev->name, beacon ? "Beacon" : "Probe Response", - MAC2STR(mgmt->sa), MAC2STR(mgmt->da)); -#endif - - baselen = (u8 *) mgmt->u.beacon.variable - (u8 *) mgmt; - if (baselen > len) - return; - - pos = mgmt->u.beacon.timestamp; - timestamp = ((u64) pos[7] << 56) | ((u64) pos[6] << 48) | - ((u64) pos[5] << 40) | ((u64) pos[4] << 32) | - ((u64) pos[3] << 24) | ((u64) pos[2] << 16) | - ((u64) pos[1] << 8) | ((u64) pos[0]); - - if (local->conf.mode == IW_MODE_ADHOC && beacon && - memcmp(mgmt->bssid, local->bssid, ETH_ALEN) == 0) { -#ifdef IEEE80211_IBSS_DEBUG - static unsigned long last_tsf_debug = 0; - u64 tsf; - if (local->hw->get_tsf) - tsf = local->hw->get_tsf(local->mdev); - else - tsf = -1LLU; - if (time_after(jiffies, last_tsf_debug + 5 * HZ)) { - printk(KERN_DEBUG "RX beacon SA=" MACSTR " BSSID=" - MACSTR " TSF=0x%llx BCN=0x%llx diff=%lld " - "@%ld\n", - MAC2STR(mgmt->sa), MAC2STR(mgmt->bssid), - tsf, timestamp, tsf - timestamp, jiffies); - last_tsf_debug = jiffies; - } -#endif /* IEEE80211_IBSS_DEBUG */ - } - - if (ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, - &elems) == ParseFailed) - invalid = 1; - - if (local->conf.mode == IW_MODE_ADHOC && elems.supp_rates && - memcmp(mgmt->bssid, local->bssid, ETH_ALEN) == 0 && - (sta = sta_info_get(local, mgmt->sa)) && - (sdata = IEEE80211_DEV_TO_SUB_IF(dev)) && - sdata->type == IEEE80211_SUB_IF_TYPE_STA) { - struct ieee80211_rate *rates; - size_t num_rates; - u32 supp_rates, prev_rates; - int i, j, oper_mode; - - rates = local->curr_rates; - num_rates = local->num_curr_rates; - oper_mode = local->sta_scanning ? local->scan_oper_phymode : - local->conf.phymode; - for (i = 0; i < local->hw->num_modes; i++) { - struct ieee80211_hw_modes *mode = &local->hw->modes[i]; - if (oper_mode == mode->mode) { - rates = mode->rates; - num_rates = mode->num_rates; - break; - } - } - - supp_rates = 0; - for (i = 0; i < elems.supp_rates_len + - elems.ext_supp_rates_len; i++) { - u8 rate = 0; - int own_rate; - if (i < elems.supp_rates_len) - rate = elems.supp_rates[i]; - else if (elems.ext_supp_rates) - rate = elems.ext_supp_rates - [i - elems.supp_rates_len]; - own_rate = 5 * (rate & 0x7f); - if (oper_mode == MODE_ATHEROS_TURBO) - own_rate *= 2; - for (j = 0; j < num_rates; j++) - if (rates[j].rate == own_rate) - supp_rates |= BIT(j); - } - - prev_rates = sta->supp_rates; - sta->supp_rates &= supp_rates; - if (sta->supp_rates == 0) { - /* No matching rates - this should not really happen. - * Make sure that at least one rate is marked - * supported to avoid issues with TX rate ctrl. */ - - sta->supp_rates = sdata->u.sta.supp_rates_bits; - } - if (sta->supp_rates != prev_rates) { - printk(KERN_DEBUG "%s: updated supp_rates set for " - MACSTR " based on beacon info (0x%x & 0x%x -> " - "0x%x)\n", - dev->name, MAC2STR(sta->addr), prev_rates, - supp_rates, sta->supp_rates); - } - sta_info_release(local, sta); - } - - if (elems.ssid == NULL) - return; - - if (elems.ds_params && elems.ds_params_len == 1) - channel = elems.ds_params[0]; - else - channel = rx_status->channel; - - bss = ieee80211_rx_bss_get(dev, mgmt->bssid); - if (bss == NULL) { - bss = ieee80211_rx_bss_add(dev, mgmt->bssid); - if (bss == NULL) - return; - } else { -#if 0 - /* TODO: order by RSSI? */ - spin_lock_bh(&local->sta_bss_lock); - list_move_tail(&bss->list, &local->sta_bss_list); - spin_unlock_bh(&local->sta_bss_lock); -#endif - } - - if (bss->probe_resp && beacon) { - /* Do not allow beacon to override data from Probe Response. */ - ieee80211_rx_bss_put(dev, bss); - return; - } - - bss->beacon_int = le16_to_cpu(mgmt->u.beacon.beacon_int); - bss->capability = le16_to_cpu(mgmt->u.beacon.capab_info); - if (elems.ssid && elems.ssid_len <= IEEE80211_MAX_SSID_LEN) { - memcpy(bss->ssid, elems.ssid, elems.ssid_len); - bss->ssid_len = elems.ssid_len; - } - - bss->supp_rates_len = 0; - if (elems.supp_rates) { - clen = IEEE80211_MAX_SUPP_RATES - bss->supp_rates_len; - if (clen > elems.supp_rates_len) - clen = elems.supp_rates_len; - memcpy(&bss->supp_rates[bss->supp_rates_len], elems.supp_rates, - clen); - bss->supp_rates_len += clen; - } - if (elems.ext_supp_rates) { - clen = IEEE80211_MAX_SUPP_RATES - bss->supp_rates_len; - if (clen > elems.ext_supp_rates_len) - clen = elems.ext_supp_rates_len; - memcpy(&bss->supp_rates[bss->supp_rates_len], - elems.ext_supp_rates, clen); - bss->supp_rates_len += clen; - } - - if (elems.wpa && - (bss->wpa_ie == NULL || bss->wpa_ie_len != elems.wpa_len || - memcmp(bss->wpa_ie, elems.wpa, elems.wpa_len))) { - kfree(bss->wpa_ie); - bss->wpa_ie = kmalloc(elems.wpa_len + 2, GFP_ATOMIC); - if (bss->wpa_ie) { - memcpy(bss->wpa_ie, elems.wpa - 2, elems.wpa_len + 2); - bss->wpa_ie_len = elems.wpa_len + 2; - } else - bss->wpa_ie_len = 0; - } else if (!elems.wpa && bss->wpa_ie) { - kfree(bss->wpa_ie); - bss->wpa_ie = NULL; - bss->wpa_ie_len = 0; - } - - if (elems.rsn && - (bss->rsn_ie == NULL || bss->rsn_ie_len != elems.rsn_len || - memcmp(bss->rsn_ie, elems.rsn, elems.rsn_len))) { - kfree(bss->rsn_ie); - bss->rsn_ie = kmalloc(elems.rsn_len + 2, GFP_ATOMIC); - if (bss->rsn_ie) { - memcpy(bss->rsn_ie, elems.rsn - 2, elems.rsn_len + 2); - bss->rsn_ie_len = elems.rsn_len + 2; - } else - bss->rsn_ie_len = 0; - } else if (!elems.rsn && bss->rsn_ie) { - kfree(bss->rsn_ie); - bss->rsn_ie = NULL; - bss->rsn_ie_len = 0; - } - - if (elems.wmm_param && - (bss->wmm_ie == NULL || bss->wmm_ie_len != elems.wmm_param_len || - memcmp(bss->wmm_ie, elems.wmm_param, elems.wmm_param_len))) { - kfree(bss->wmm_ie); - bss->wmm_ie = kmalloc(elems.wmm_param_len + 2, GFP_ATOMIC); - if (bss->wmm_ie) { - memcpy(bss->wmm_ie, elems.wmm_param - 2, - elems.wmm_param_len + 2); - bss->wmm_ie_len = elems.wmm_param_len + 2; - } else - bss->wmm_ie_len = 0; - } else if (!elems.wmm_param && bss->wmm_ie) { - kfree(bss->wmm_ie); - bss->wmm_ie = NULL; - bss->wmm_ie_len = 0; - } - - - bss->hw_mode = local->conf.phymode; - bss->channel = channel; - bss->freq = local->conf.freq; - if (channel != local->conf.channel && - (local->conf.phymode == MODE_IEEE80211G || - local->conf.phymode == MODE_IEEE80211B) && - channel >= 1 && channel <= 14) { - static const int freq_list[] = { - 2412, 2417, 2422, 2427, 2432, 2437, 2442, - 2447, 2452, 2457, 2462, 2467, 2472, 2484 - }; - /* IEEE 802.11g/b mode can receive packets from neighboring - * channels, so map the channel into frequency. */ - bss->freq = freq_list[channel - 1]; - } - bss->timestamp = timestamp; - bss->last_update = jiffies; - bss->rssi = rx_status->ssi; - if (!beacon) - bss->probe_resp++; - ieee80211_rx_bss_put(dev, bss); -} - - -static void ieee80211_rx_mgmt_probe_resp(struct net_device *dev, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status) -{ - ieee80211_rx_bss_info(dev, mgmt, len, rx_status, 0); -} - - -static void ieee80211_rx_mgmt_beacon(struct net_device *dev, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata; - struct ieee80211_if_sta *ifsta; - int use_protection; - size_t baselen; - struct ieee802_11_elems elems; - - ieee80211_rx_bss_info(dev, mgmt, len, rx_status, 1); - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - return; - ifsta = &sdata->u.sta; - - if (!ifsta->associated || - memcmp(ifsta->bssid, mgmt->bssid, ETH_ALEN) != 0) - return; - - /* Process beacon from the current BSS */ - baselen = (u8 *) mgmt->u.beacon.variable - (u8 *) mgmt; - if (baselen > len) - return; - - if (ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, - &elems) == ParseFailed) - return; - - use_protection = 0; - if (elems.erp_info && elems.erp_info_len >= 1) { - use_protection = - (elems.erp_info[0] & ERP_INFO_USE_PROTECTION) != 0; - } - - if (use_protection != !!ifsta->use_protection) { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: CTS protection %s (BSSID=" - MACSTR ")\n", - dev->name, - use_protection ? "enabled" : "disabled", - MAC2STR(ifsta->bssid)); - } - ifsta->use_protection = use_protection ? 1 : 0; - local->cts_protect_erp_frames = use_protection; - } - - if (elems.wmm_param && ifsta->wmm_enabled) { - ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, - elems.wmm_param_len); - } -} - - -static void ieee80211_rx_mgmt_probe_req(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - struct ieee80211_mgmt *mgmt, - size_t len, - struct ieee80211_rx_status *rx_status) -{ - struct ieee80211_local *local = dev->priv; - int tx_last_beacon; - struct sk_buff *skb; - struct ieee80211_mgmt *resp; - u8 *pos, *end; - - if (local->conf.mode != IW_MODE_ADHOC || - ifsta->state != IEEE80211_IBSS_JOINED || - len < 24 + 2 || ifsta->probe_resp == NULL) - return; - - if (local->hw->tx_last_beacon) - tx_last_beacon = local->hw->tx_last_beacon(local->mdev); - else - tx_last_beacon = 1; - -#ifdef IEEE80211_IBSS_DEBUG - printk(KERN_DEBUG "%s: RX ProbeReq SA=" MACSTR " DA=" MACSTR " BSSID=" - MACSTR " (tx_last_beacon=%d)\n", - dev->name, MAC2STR(mgmt->sa), MAC2STR(mgmt->da), - MAC2STR(mgmt->bssid), tx_last_beacon); -#endif /* IEEE80211_IBSS_DEBUG */ - - if (!tx_last_beacon) - return; - - if (memcmp(mgmt->bssid, ifsta->bssid, ETH_ALEN) != 0 && - memcmp(mgmt->bssid, "\xff\xff\xff\xff\xff\xff", ETH_ALEN) != 0) - return; - - end = ((u8 *) mgmt) + len; - pos = mgmt->u.probe_req.variable; - if (pos[0] != WLAN_EID_SSID || - pos + 2 + pos[1] > end) { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: Invalid SSID IE in ProbeReq " - "from " MACSTR "\n", - dev->name, MAC2STR(mgmt->sa)); - } - return; - } - if (pos[1] != 0 && - (pos[1] != ifsta->ssid_len || - memcmp(pos + 2, ifsta->ssid, ifsta->ssid_len) != 0)) { - /* Ignore ProbeReq for foreign SSID */ - return; - } - - /* Reply with ProbeResp */ - skb = skb_copy(ifsta->probe_resp, GFP_ATOMIC); - if (skb == NULL) - return; - - resp = (struct ieee80211_mgmt *) skb->data; - memcpy(resp->da, mgmt->sa, ETH_ALEN); -#ifdef IEEE80211_IBSS_DEBUG - printk(KERN_DEBUG "%s: Sending ProbeResp to " MACSTR "\n", - dev->name, MAC2STR(resp->da)); -#endif /* IEEE80211_IBSS_DEBUG */ - ieee80211_sta_tx(dev, skb, 0, 1); -} - - -void ieee80211_sta_rx_mgmt(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *rx_status) -{ - struct ieee80211_sub_if_data *sdata; - struct ieee80211_if_sta *ifsta; - struct ieee80211_mgmt *mgmt; - u16 fc; - - if (skb->len < 24) - goto fail; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) { - printk(KERN_DEBUG "%s: ieee80211_sta_rx_mgmt: non-STA " - "interface (type=%d)\n", dev->name, sdata->type); - goto fail; - } - ifsta = &sdata->u.sta; - - mgmt = (struct ieee80211_mgmt *) skb->data; - fc = le16_to_cpu(mgmt->frame_control); - - switch (WLAN_FC_GET_STYPE(fc)) { - case WLAN_FC_STYPE_PROBE_REQ: - ieee80211_rx_mgmt_probe_req(dev, ifsta, mgmt, skb->len, - rx_status); - break; - case WLAN_FC_STYPE_PROBE_RESP: - ieee80211_rx_mgmt_probe_resp(dev, mgmt, skb->len, rx_status); - break; - case WLAN_FC_STYPE_BEACON: - ieee80211_rx_mgmt_beacon(dev, mgmt, skb->len, rx_status); - break; - case WLAN_FC_STYPE_AUTH: - ieee80211_rx_mgmt_auth(dev, ifsta, mgmt, skb->len, rx_status); - break; - case WLAN_FC_STYPE_ASSOC_RESP: - ieee80211_rx_mgmt_assoc_resp(dev, ifsta, mgmt, skb->len, - rx_status, 0); - break; - case WLAN_FC_STYPE_REASSOC_RESP: - ieee80211_rx_mgmt_assoc_resp(dev, ifsta, mgmt, skb->len, - rx_status, 1); - break; - case WLAN_FC_STYPE_DEAUTH: - ieee80211_rx_mgmt_deauth(dev, ifsta, mgmt, skb->len, - rx_status); - break; - case WLAN_FC_STYPE_DISASSOC: - ieee80211_rx_mgmt_disassoc(dev, ifsta, mgmt, skb->len, - rx_status); - break; - default: - printk(KERN_DEBUG "%s: received unknown management frame - " - "stype=%d\n", dev->name, WLAN_FC_GET_STYPE(fc)); - break; - } - - fail: - dev_kfree_skb(skb); -} - - -void ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *rx_status) -{ - struct ieee80211_mgmt *mgmt; - u16 fc; - - if (skb->len < 24) { - dev_kfree_skb(skb); - return; - } - - mgmt = (struct ieee80211_mgmt *) skb->data; - fc = le16_to_cpu(mgmt->frame_control); - - if (WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT) { - if (WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_PROBE_RESP) { - ieee80211_rx_mgmt_probe_resp(dev, mgmt, - skb->len, rx_status); - } else if (WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_BEACON) { - ieee80211_rx_mgmt_beacon(dev, mgmt, skb->len, - rx_status); - } - } - - dev_kfree_skb(skb); -} - - -static int ieee80211_sta_active_ibss(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - struct list_head *ptr; - int active = 0; - struct sta_info *sta; - - spin_lock_bh(&local->sta_lock); - list_for_each(ptr, &local->sta_list) { - sta = list_entry(ptr, struct sta_info, list); - if (sta->dev == dev && - time_after(sta->last_rx + IEEE80211_IBSS_MERGE_INTERVAL, - jiffies)) { - active++; - break; - } - } - spin_unlock_bh(&local->sta_lock); - - return active; -} - - -static void ieee80211_sta_expire(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - struct list_head *ptr, *n; - struct sta_info *sta; - - spin_lock_bh(&local->sta_lock); - list_for_each_safe(ptr, n, &local->sta_list) { - sta = list_entry(ptr, struct sta_info, list); - if (time_after(jiffies, sta->last_rx + - IEEE80211_IBSS_INACTIVITY_LIMIT)) { - printk(KERN_DEBUG "%s: expiring inactive STA " MACSTR - "\n", dev->name, MAC2STR(sta->addr)); - sta_info_free(local, sta, 1); - } - } - spin_unlock_bh(&local->sta_lock); -} - - -static void ieee80211_sta_merge_ibss(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); - - ieee80211_sta_expire(dev); - if (ieee80211_sta_active_ibss(dev)) - return; - - printk(KERN_DEBUG "%s: No active IBSS STAs - trying to scan for other " - "IBSS networks with same SSID (merge)\n", dev->name); - ieee80211_sta_req_scan(dev, ifsta->ssid, ifsta->ssid_len); -} - - -void ieee80211_sta_timer(unsigned long ptr) -{ - struct net_device *dev; - struct ieee80211_sub_if_data *sdata; - struct ieee80211_if_sta *ifsta; - - dev = (struct net_device *) ptr; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) { - printk(KERN_DEBUG "%s: ieee80211_sta_timer: non-STA interface " - "(type=%d)\n", dev->name, sdata->type); - return; - } - ifsta = &sdata->u.sta; - - switch (ifsta->state) { - case IEEE80211_DISABLED: - break; - case IEEE80211_AUTHENTICATE: - ieee80211_authenticate(dev, ifsta); - break; - case IEEE80211_ASSOCIATE: - ieee80211_associate(dev, ifsta); - break; - case IEEE80211_ASSOCIATED: - ieee80211_associated(dev, ifsta); - break; - case IEEE80211_IBSS_SEARCH: - ieee80211_sta_find_ibss(dev, ifsta); - break; - case IEEE80211_IBSS_JOINED: - ieee80211_sta_merge_ibss(dev, ifsta); - break; - default: - printk(KERN_DEBUG "ieee80211_sta_timer: Unknown state %d\n", - ifsta->state); - break; - } - - if (ieee80211_privacy_mismatch(dev, ifsta)) { - printk(KERN_DEBUG "%s: privacy configuration mismatch and " - "mixed-cell disabled - disassociate\n", dev->name); - - ieee80211_send_disassoc(dev, ifsta, WLAN_REASON_UNSPECIFIED); - ieee80211_set_associated(dev, ifsta, 0); - } -} - - -static void ieee80211_sta_new_auth(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - struct ieee80211_local *local = dev->priv; - - if (local->conf.mode != IW_MODE_INFRA) - return; - - if (local->hw->reset_tsf) { - /* Reset own TSF to allow time synchronization work. */ - local->hw->reset_tsf(local->mdev); - } - - ifsta->wmm_last_param_set = -1; /* allow any WMM update */ - - - if (ifsta->auth_algs & IEEE80211_AUTH_ALG_OPEN) - ifsta->auth_alg = WLAN_AUTH_OPEN; - else if (ifsta->auth_algs & IEEE80211_AUTH_ALG_SHARED_KEY) - ifsta->auth_alg = WLAN_AUTH_SHARED_KEY; - else if (ifsta->auth_algs & IEEE80211_AUTH_ALG_LEAP) - ifsta->auth_alg = WLAN_AUTH_LEAP; - else - ifsta->auth_alg = WLAN_AUTH_OPEN; - printk(KERN_DEBUG "%s: Initial auth_alg=%d\n", dev->name, - ifsta->auth_alg); - ifsta->auth_transaction = -1; - ifsta->auth_tries = ifsta->assoc_tries = 0; - ieee80211_authenticate(dev, ifsta); -} - - -static int ieee80211_ibss_allowed(struct ieee80211_local *local) -{ - int m, c; - - for (m = 0; m < local->hw->num_modes; m++) { - struct ieee80211_hw_modes *mode = &local->hw->modes[m]; - if (mode->mode != local->conf.phymode) - continue; - for (c = 0; c < mode->num_channels; c++) { - struct ieee80211_channel *chan = &mode->channels[c]; - if (chan->flag & IEEE80211_CHAN_W_SCAN && - chan->chan == local->conf.channel) { - if (chan->flag & IEEE80211_CHAN_W_IBSS) - return 1; - break; - } - } - } - - return 0; -} - - -extern int ieee80211_ioctl_siwfreq(struct net_device *dev, - struct iw_request_info *info, - struct iw_freq *freq, char *extra); - -static int ieee80211_sta_join_ibss(struct net_device *dev, - struct ieee80211_if_sta *ifsta, - struct ieee80211_sta_bss *bss) -{ - struct ieee80211_local *local = dev->priv; - struct iw_freq rq; - int res, rates, i, j; - struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; - struct ieee80211_tx_control control; - struct ieee80211_rate *rate; - struct rate_control_extra extra; - u8 *pos; - struct ieee80211_sub_if_data *sdata; - - /* Remove possible STA entries from other IBSS networks. */ - sta_info_flush(local, NULL); - - if (local->hw->reset_tsf) { - /* Reset own TSF to allow time synchronization work. */ - local->hw->reset_tsf(local->mdev); - } - memcpy(ifsta->bssid, bss->bssid, ETH_ALEN); - memcpy(local->bssid, bss->bssid, ETH_ALEN); - memcpy(local->conf.client_bssid, bss->bssid, ETH_ALEN); - - local->conf.beacon_int = bss->beacon_int >= 10 ? bss->beacon_int : 10; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - sdata->drop_unencrypted = bss->capability & - cpu_to_le16(WLAN_CAPABILITY_PRIVACY) ? 1 : 0; - - memset(&rq, 0, sizeof(rq)); - rq.m = bss->freq * 100000; - rq.e = 1; - res = ieee80211_ioctl_siwfreq(dev, NULL, &rq, NULL); - - if (!ieee80211_ibss_allowed(local)) { - printk(KERN_DEBUG "%s: IBSS not allowed on channel %d " - "(%d MHz)\n", dev->name, local->conf.channel, - local->conf.freq); - return -1; - } - - /* Set beacon template based on scan results */ - skb = dev_alloc_skb(400); - do { - if (skb == NULL) - break; - - mgmt = (struct ieee80211_mgmt *) - skb_put(skb, 24 + sizeof(mgmt->u.beacon)); - memset(mgmt, 0, 24 + sizeof(mgmt->u.beacon)); - mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, - WLAN_FC_STYPE_BEACON); - memset(mgmt->da, 0xff, ETH_ALEN); - memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); - memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); - mgmt->u.beacon.beacon_int = - cpu_to_le16(local->conf.beacon_int); - mgmt->u.beacon.capab_info = cpu_to_le16(bss->capability); - - pos = skb_put(skb, 2 + ifsta->ssid_len); - *pos++ = WLAN_EID_SSID; - *pos++ = ifsta->ssid_len; - memcpy(pos, ifsta->ssid, ifsta->ssid_len); - - rates = bss->supp_rates_len; - if (rates > 8) - rates = 8; - pos = skb_put(skb, 2 + rates); - *pos++ = WLAN_EID_SUPP_RATES; - *pos++ = rates; - memcpy(pos, bss->supp_rates, rates); - - pos = skb_put(skb, 2 + 1); - *pos++ = WLAN_EID_DS_PARAMS; - *pos++ = 1; - *pos++ = bss->channel; - - pos = skb_put(skb, 2 + 2); - *pos++ = WLAN_EID_IBSS_PARAMS; - *pos++ = 2; - /* FIX: set ATIM window based on scan results */ - *pos++ = 0; - *pos++ = 0; - - if (bss->supp_rates_len > 8) { - rates = bss->supp_rates_len - 8; - pos = skb_put(skb, 2 + rates); - *pos++ = WLAN_EID_EXT_SUPP_RATES; - *pos++ = rates; - memcpy(pos, &bss->supp_rates[8], rates); - } - - memset(&control, 0, sizeof(control)); - control.pkt_type = PKT_PROBE_RESP; - memset(&extra, 0, sizeof(extra)); - extra.endidx = local->num_curr_rates; - rate = rate_control_get_rate(dev, skb, &extra); - if (rate == NULL) { - printk(KERN_DEBUG "%s: Failed to determine TX rate " - "for IBSS beacon\n", dev->name); - break; - } - control.tx_rate = (local->short_preamble && - (rate->flags & IEEE80211_RATE_PREAMBLE2)) ? - rate->val2 : rate->val; - control.antenna_sel = local->conf.antenna_sel; - control.power_level = local->conf.power_level; - control.no_ack = 1; - control.retry_limit = 1; - control.rts_cts_duration = 0; - - ifsta->probe_resp = skb_copy(skb, GFP_ATOMIC); - if (ifsta->probe_resp) { - mgmt = (struct ieee80211_mgmt *) - ifsta->probe_resp->data; - mgmt->frame_control = - IEEE80211_FC(WLAN_FC_TYPE_MGMT, - WLAN_FC_STYPE_PROBE_RESP); - } else { - printk(KERN_DEBUG "%s: Could not allocate ProbeResp " - "template for IBSS\n", dev->name); - } - - if (local->hw->beacon_update && - local->hw->beacon_update(dev, skb, &control) == 0) { - printk(KERN_DEBUG "%s: Configured IBSS beacon " - "template based on scan results\n", dev->name); - skb = NULL; - } - - rates = 0; - for (i = 0; i < bss->supp_rates_len; i++) { - int rate = (bss->supp_rates[i] & 0x7f) * 5; - if (local->conf.phymode == MODE_ATHEROS_TURBO) - rate *= 2; - for (j = 0; j < local->num_curr_rates; j++) - if (local->curr_rates[j].rate == rate) - rates |= BIT(j); - } - ifsta->supp_rates_bits = rates; - } while (0); - - if (skb) { - printk(KERN_DEBUG "%s: Failed to configure IBSS beacon " - "template\n", dev->name); - dev_kfree_skb(skb); - } - - ifsta->state = IEEE80211_IBSS_JOINED; - mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); - - ieee80211_rx_bss_put(dev, bss); - - return res; -} - - -static int ieee80211_sta_create_ibss(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sta_bss *bss; - struct ieee80211_sub_if_data *sdata; - u8 bssid[ETH_ALEN], *pos; - int i; - -#if 0 - /* Easier testing, use fixed BSSID. */ - memset(bssid, 0xfe, ETH_ALEN); -#else - /* Generate random, not broadcast, locally administered BSSID. Mix in - * own MAC address to make sure that devices that do not have proper - * random number generator get different BSSID. */ - get_random_bytes(bssid, ETH_ALEN); - for (i = 0; i < ETH_ALEN; i++) - bssid[i] ^= dev->dev_addr[i]; - bssid[0] &= ~0x01; - bssid[0] |= 0x02; -#endif - - printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID " MACSTR "\n", - dev->name, MAC2STR(bssid)); - - bss = ieee80211_rx_bss_add(dev, bssid); - if (bss == NULL) - return -ENOMEM; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - if (local->conf.beacon_int == 0) - local->conf.beacon_int = 100; - bss->beacon_int = local->conf.beacon_int; - bss->hw_mode = local->conf.phymode; - bss->channel = local->conf.channel; - bss->freq = local->conf.freq; - bss->last_update = jiffies; - bss->capability = cpu_to_le16(WLAN_CAPABILITY_IBSS); - if (sdata->default_key) { - bss->capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY); - } else - sdata->drop_unencrypted = 0; - bss->supp_rates_len = local->num_curr_rates; - pos = bss->supp_rates; - for (i = 0; i < local->num_curr_rates; i++) { - int rate = local->curr_rates[i].rate; - if (local->conf.phymode == MODE_ATHEROS_TURBO) - rate /= 2; - *pos++ = (u8) (rate / 5); - } - - return ieee80211_sta_join_ibss(dev, ifsta, bss); -} - - -static int ieee80211_sta_find_ibss(struct net_device *dev, - struct ieee80211_if_sta *ifsta) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sta_bss *bss; - int found = 0; - u8 bssid[ETH_ALEN]; - struct list_head *ptr; - int active_ibss; - - if (ifsta->ssid_len == 0) - return -EINVAL; - - active_ibss = ieee80211_sta_active_ibss(dev); -#ifdef IEEE80211_IBSS_DEBUG - printk(KERN_DEBUG "%s: sta_find_ibss (active_ibss=%d)\n", - dev->name, active_ibss); -#endif /* IEEE80211_IBSS_DEBUG */ - spin_lock_bh(&local->sta_bss_lock); - list_for_each(ptr, &local->sta_bss_list) { - bss = list_entry(ptr, struct ieee80211_sta_bss, list); - if (ifsta->ssid_len != bss->ssid_len || - memcmp(ifsta->ssid, bss->ssid, bss->ssid_len) != 0 - || !(bss->capability & WLAN_CAPABILITY_IBSS)) - continue; -#ifdef IEEE80211_IBSS_DEBUG - printk(KERN_DEBUG " bssid=" MACSTR " found\n", - MAC2STR(bss->bssid)); -#endif /* IEEE80211_IBSS_DEBUG */ - memcpy(bssid, bss->bssid, ETH_ALEN); - found = 1; - if (active_ibss || memcmp(bssid, ifsta->bssid, ETH_ALEN) != 0) - break; - } - spin_unlock_bh(&local->sta_bss_lock); - -#ifdef IEEE80211_IBSS_DEBUG - printk(KERN_DEBUG " sta_find_ibss: selected " MACSTR " current " - MACSTR "\n", MAC2STR(bssid), MAC2STR(ifsta->bssid)); -#endif /* IEEE80211_IBSS_DEBUG */ - if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 && - (bss = ieee80211_rx_bss_get(dev, bssid))) { - printk(KERN_DEBUG "%s: Selected IBSS BSSID " MACSTR - " based on configured SSID\n", - dev->name, MAC2STR(bssid)); - return ieee80211_sta_join_ibss(dev, ifsta, bss); - } -#ifdef IEEE80211_IBSS_DEBUG - printk(KERN_DEBUG " did not try to join ibss\n"); -#endif /* IEEE80211_IBSS_DEBUG */ - - /* Selected IBSS not found in current scan results - try to scan */ - if (ifsta->state == IEEE80211_IBSS_JOINED && - !ieee80211_sta_active_ibss(dev)) { - mod_timer(&ifsta->timer, - jiffies + IEEE80211_IBSS_MERGE_INTERVAL); - } else if (time_after(jiffies, local->last_scan_completed + - IEEE80211_SCAN_INTERVAL)) { - printk(KERN_DEBUG "%s: Trigger new scan to find an IBSS to " - "join\n", dev->name); - return ieee80211_sta_req_scan(dev, ifsta->ssid, - ifsta->ssid_len); - } else if (ifsta->state != IEEE80211_IBSS_JOINED) { - int interval = IEEE80211_SCAN_INTERVAL; - - if (time_after(jiffies, ifsta->ibss_join_req + - IEEE80211_IBSS_JOIN_TIMEOUT)) { - if (ifsta->create_ibss && - ieee80211_ibss_allowed(local)) - return ieee80211_sta_create_ibss(dev, ifsta); - if (ifsta->create_ibss) { - printk(KERN_DEBUG "%s: IBSS not allowed on the" - " configured channel %d (%d MHz)\n", - dev->name, local->conf.channel, - local->conf.freq); - } - - /* No IBSS found - decrease scan interval and continue - * scanning. */ - interval = IEEE80211_SCAN_INTERVAL_SLOW; - } - - ifsta->state = IEEE80211_IBSS_SEARCH; - mod_timer(&ifsta->timer, jiffies + interval); - return 0; - } - - return 0; -} - - -int ieee80211_sta_set_ssid(struct net_device *dev, char *ssid, size_t len) -{ - struct ieee80211_sub_if_data *sdata; - struct ieee80211_if_sta *ifsta; - struct ieee80211_local *local = dev->priv; - - if (len > IEEE80211_MAX_SSID_LEN) - return -EINVAL; - - /* TODO: This should always be done for IBSS, even if IEEE80211_QOS is - * not defined. */ - if (local->hw->conf_tx) { - struct ieee80211_tx_queue_params qparam; - int i; - - memset(&qparam, 0, sizeof(qparam)); - /* TODO: are these ok defaults for all hw_modes? */ - qparam.aifs = 2; - qparam.cw_min = - local->conf.phymode == MODE_IEEE80211B ? 31 : 15; - qparam.cw_max = 1023; - qparam.burst_time = 0; - for (i = IEEE80211_TX_QUEUE_DATA0; i < NUM_TX_DATA_QUEUES; i++) - { - local->hw->conf_tx(dev, i + IEEE80211_TX_QUEUE_DATA0, - &qparam); - } - /* IBSS uses different parameters for Beacon sending */ - qparam.cw_min++; - qparam.cw_min *= 2; - qparam.cw_min--; - local->hw->conf_tx(dev, IEEE80211_TX_QUEUE_BEACON, &qparam); - } - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - ifsta = &sdata->u.sta; - - if (ifsta->ssid_len != len || memcmp(ifsta->ssid, ssid, len) != 0) - ifsta->prev_bssid_set = 0; - memcpy(ifsta->ssid, ssid, len); - memset(ifsta->ssid + len, 0, IEEE80211_MAX_SSID_LEN - len); - ifsta->ssid_len = len; - - ifsta->ssid_set = 1; - if (local->conf.mode == IW_MODE_ADHOC && !ifsta->bssid_set) { - ifsta->ibss_join_req = jiffies; - ifsta->state = IEEE80211_IBSS_SEARCH; - return ieee80211_sta_find_ibss(dev, ifsta); - } - - if (ifsta->bssid_set && ifsta->state != IEEE80211_AUTHENTICATE) - ieee80211_sta_new_auth(dev, ifsta); - - return 0; -} - - -int ieee80211_sta_get_ssid(struct net_device *dev, char *ssid, size_t *len) -{ - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - struct ieee80211_if_sta *ifsta = &sdata->u.sta; - memcpy(ssid, ifsta->ssid, ifsta->ssid_len); - *len = ifsta->ssid_len; - return 0; -} - - -int ieee80211_sta_set_bssid(struct net_device *dev, u8 *bssid) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata; - struct ieee80211_if_sta *ifsta; - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - ifsta = &sdata->u.sta; - - memcpy(ifsta->bssid, bssid, ETH_ALEN); - if (local->conf.mode == IW_MODE_ADHOC) - memcpy(local->bssid, bssid, ETH_ALEN); - - if (memcmp(bssid, "\x00\x00\x00\x00\x00\x00", ETH_ALEN) == 0) - ifsta->bssid_set = 0; - else - ifsta->bssid_set = 1; - if (ifsta->ssid_set) - ieee80211_sta_new_auth(dev, ifsta); - - return 0; -} - - -static void ieee80211_sta_save_oper_chan(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - local->scan_oper_channel = local->conf.channel; - local->scan_oper_channel_val = local->conf.channel_val; - local->scan_oper_power_level = local->conf.power_level; - local->scan_oper_freq = local->conf.freq; - local->scan_oper_phymode = local->conf.phymode; - local->scan_oper_antenna_max = local->conf.antenna_max; -} - - -static int ieee80211_sta_restore_oper_chan(struct net_device *dev) -{ - struct ieee80211_local *local = dev->priv; - local->conf.channel = local->scan_oper_channel; - local->conf.channel_val = local->scan_oper_channel_val; - local->conf.power_level = local->scan_oper_power_level; - local->conf.freq = local->scan_oper_freq; - local->conf.phymode = local->scan_oper_phymode; - local->conf.antenna_max = local->scan_oper_antenna_max; - return ieee80211_hw_config(dev); -} - - -static int ieee80211_active_scan(struct ieee80211_local *local) -{ - int m, c; - - for (m = 0; m < local->hw->num_modes; m++) { - struct ieee80211_hw_modes *mode = &local->hw->modes[m]; - if (mode->mode != local->conf.phymode) - continue; - for (c = 0; c < mode->num_channels; c++) { - struct ieee80211_channel *chan = &mode->channels[c]; - if (chan->flag & IEEE80211_CHAN_W_SCAN && - chan->chan == local->conf.channel) { - if (chan->flag & IEEE80211_CHAN_W_ACTIVE_SCAN) - return 1; - break; - } - } - } - - return 0; -} - - -static void ieee80211_sta_scan_timer(unsigned long ptr) -{ - struct net_device *dev = (struct net_device *) ptr; - struct ieee80211_local *local = dev->priv; - struct ieee80211_hw_modes *mode; - struct ieee80211_channel *chan; - int skip; - union iwreq_data wrqu; - - if (!local->sta_scanning) - return; - - switch (local->scan_state) { - case SCAN_SET_CHANNEL: - mode = &local->hw->modes[local->scan_hw_mode_idx]; - if (local->scan_hw_mode_idx >= local->hw->num_modes || - (local->scan_hw_mode_idx + 1 == local->hw->num_modes && - local->scan_channel_idx >= mode->num_channels)) { - if (ieee80211_sta_restore_oper_chan(dev)) { - printk(KERN_DEBUG "%s: failed to restore " - "operational channel after scan\n", - dev->name); - } - printk(KERN_DEBUG "%s: scan completed\n", dev->name); - local->sta_scanning = 0; - local->last_scan_completed = jiffies; - memset(&wrqu, 0, sizeof(wrqu)); - wireless_send_event(dev, SIOCGIWSCAN, &wrqu, NULL); - if (local->conf.mode == IW_MODE_ADHOC) { - struct ieee80211_sub_if_data *sdata = - IEEE80211_DEV_TO_SUB_IF(dev); - struct ieee80211_if_sta *ifsta = &sdata->u.sta; - if (!ifsta->bssid_set || - (ifsta->state == IEEE80211_IBSS_JOINED && - !ieee80211_sta_active_ibss(dev))) - ieee80211_sta_find_ibss(dev, ifsta); - } - return; - } - skip = !(local->hw_modes & (1 << mode->mode)); - chan = &mode->channels[local->scan_channel_idx]; - if (!(chan->flag & IEEE80211_CHAN_W_SCAN) || - (local->conf.mode == IW_MODE_ADHOC && - !(chan->flag & IEEE80211_CHAN_W_IBSS)) || - (local->hw_modes & (1 << MODE_IEEE80211G) && - mode->mode == MODE_IEEE80211B && local->scan_skip_11b)) - skip = 1; - - if (!skip) { -#if 0 - printk(KERN_DEBUG "%s: scan channel %d (%d MHz)\n", - dev->name, chan->chan, chan->freq); -#endif - - local->conf.channel = chan->chan; - local->conf.channel_val = chan->val; - local->conf.power_level = chan->power_level; - local->conf.freq = chan->freq; - local->conf.phymode = mode->mode; - local->conf.antenna_max = chan->antenna_max; - if (ieee80211_hw_config(dev)) { - printk(KERN_DEBUG "%s: failed to set channel " - "%d (%d MHz) for scan\n", dev->name, - chan->chan, chan->freq); - skip = 1; - } - } - - local->scan_channel_idx++; - if (local->scan_channel_idx >= - local->hw->modes[local->scan_hw_mode_idx].num_channels) { - local->scan_hw_mode_idx++; - local->scan_channel_idx = 0; - } - - if (skip) { - local->scan_timer.expires = jiffies; - break; - } - - local->scan_timer.expires = jiffies + IEEE80211_PROBE_DELAY; - local->scan_state = SCAN_SEND_PROBE; - break; - case SCAN_SEND_PROBE: - if (ieee80211_active_scan(local)) { - ieee80211_send_probe_req(dev, NULL, local->scan_ssid, - local->scan_ssid_len); - local->scan_timer.expires = - jiffies + IEEE80211_CHANNEL_TIME; - } else { - local->scan_timer.expires = - jiffies + IEEE80211_PASSIVE_CHANNEL_TIME; - } - local->scan_state = SCAN_SET_CHANNEL; - break; - } - - add_timer(&local->scan_timer); -} - - -int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len) -{ - struct ieee80211_local *local = dev->priv; - - if (ssid_len > IEEE80211_MAX_SSID_LEN) - return -EINVAL; - - /* MLME-SCAN.request (page 118) page 144 (11.1.3.1) - * BSSType: INFRASTRUCTURE, INDEPENDENT, ANY_BSS - * BSSID: MACAddress - * SSID - * ScanType: ACTIVE, PASSIVE - * ProbeDelay: delay (in microseconds) to be used prior to transmitting - * a Probe frame during active scanning - * ChannelList - * MinChannelTime (>= ProbeDelay), in TU - * MaxChannelTime: (>= MinChannelTime), in TU - */ - - /* MLME-SCAN.confirm - * BSSDescriptionSet - * ResultCode: SUCCESS, INVALID_PARAMETERS - */ - - /* TODO: if assoc, move to power save mode for the duration of the - * scan */ - - if (local->sta_scanning) - return -EBUSY; - - printk(KERN_DEBUG "%s: starting scan\n", dev->name); - - ieee80211_sta_save_oper_chan(dev); - - local->sta_scanning = 1; - /* TODO: stop TX queue? */ - - if (ssid) { - local->scan_ssid_len = ssid_len; - memcpy(local->scan_ssid, ssid, ssid_len); - } else - local->scan_ssid_len = 0; - local->scan_skip_11b = 1; /* FIX: clear this is 11g is not supported */ - local->scan_state = SCAN_SET_CHANNEL; - local->scan_hw_mode_idx = 0; - local->scan_channel_idx = 0; - init_timer(&local->scan_timer); - local->scan_timer.data = (unsigned long) dev; - local->scan_timer.function = ieee80211_sta_scan_timer; - local->scan_timer.expires = jiffies + 1; - add_timer(&local->scan_timer); - - return 0; -} - - -static char * -ieee80211_sta_scan_result(struct net_device *dev, - struct ieee80211_sta_bss *bss, - char *current_ev, char *end_buf) -{ - struct ieee80211_local *local = dev->priv; - struct iw_event iwe; - - if (time_after(jiffies, - bss->last_update + IEEE80211_SCAN_RESULT_EXPIRE)) - return current_ev; - - if (!(local->hw_modes & (1 << bss->hw_mode))) - return current_ev; - - if (local->scan_flags & IEEE80211_SCAN_WPA_ONLY && - bss->wpa_ie == NULL && bss->rsn_ie == NULL) - return current_ev; - - if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID && - (local->scan_ssid_len != bss->ssid_len || - memcmp(local->scan_ssid, bss->ssid, bss->ssid_len) != 0)) - return current_ev; - - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = SIOCGIWAP; - iwe.u.ap_addr.sa_family = ARPHRD_ETHER; - memcpy(iwe.u.ap_addr.sa_data, bss->bssid, ETH_ALEN); - current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, - IW_EV_ADDR_LEN); - - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = SIOCGIWESSID; - iwe.u.data.length = bss->ssid_len; - iwe.u.data.flags = 1; - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, - bss->ssid); - - if (bss->capability & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS)) { - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = SIOCGIWMODE; - if (bss->capability & WLAN_CAPABILITY_ESS) - iwe.u.mode = IW_MODE_MASTER; - else - iwe.u.mode = IW_MODE_ADHOC; - current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, - IW_EV_UINT_LEN); - } - - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = SIOCGIWFREQ; - iwe.u.freq.m = bss->freq * 100000; - iwe.u.freq.e = 1; - current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, - IW_EV_FREQ_LEN); - - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = SIOCGIWENCODE; - if (bss->capability & WLAN_CAPABILITY_PRIVACY) - iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY; - else - iwe.u.data.flags = IW_ENCODE_DISABLED; - iwe.u.data.length = 0; - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, ""); - - if (bss && bss->wpa_ie) { - char *buf, *p; - int i; - buf = kmalloc(30 + bss->wpa_ie_len * 2, GFP_ATOMIC); - if (buf) { - p = buf; - p += sprintf(p, "wpa_ie="); - for (i = 0; i < bss->wpa_ie_len; i++) - p+= sprintf(p, "%02x", bss->wpa_ie[i]); - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(current_ev, end_buf, - &iwe, buf); - kfree(buf); - } - } - - if (bss && bss->rsn_ie) { - char *buf, *p; - int i; - buf = kmalloc(30 + bss->rsn_ie_len * 2, GFP_ATOMIC); - if (buf) { - p = buf; - p += sprintf(p, "rsn_ie="); - for (i = 0; i < bss->rsn_ie_len; i++) - p+= sprintf(p, "%02x", bss->rsn_ie[i]); - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(current_ev, end_buf, - &iwe, buf); - kfree(buf); - } - } - - if (bss) { - char *buf; - buf = kmalloc(30, GFP_ATOMIC); - if (buf) { - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - sprintf(buf, "tsf=%016llx", bss->timestamp); - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(current_ev, end_buf, - &iwe, buf); - kfree(buf); - } - } - - do { - char *buf, *p; - int i; - - if (!(local->scan_flags & IEEE80211_SCAN_EXTRA_INFO)) - break; - - buf = kmalloc(100, GFP_ATOMIC); - if (buf == NULL) - break; - - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - sprintf(buf, "bcn_int=%d", bss->beacon_int); - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, - buf); - - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - sprintf(buf, "rssi=%d", bss->rssi); - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, - buf); - - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - sprintf(buf, "capab=0x%04x", bss->capability); - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, - buf); - - p = buf; - p += sprintf(p, "supp_rates="); - for (i = 0; i < bss->supp_rates_len; i++) - p+= sprintf(p, "%02x", bss->supp_rates[i]); - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, - buf); - - kfree(buf); - break; - } while (0); - - return current_ev; -} - - -int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len) -{ - struct ieee80211_local *local = dev->priv; - struct list_head *ptr; - char *current_ev = buf; - char *end_buf = buf + len; - struct ieee80211_sta_bss *bss; - - spin_lock_bh(&local->sta_bss_lock); - list_for_each(ptr, &local->sta_bss_list) { - bss = list_entry(ptr, struct ieee80211_sta_bss, list); - current_ev = ieee80211_sta_scan_result(dev, bss, current_ev, - end_buf); - } - spin_unlock_bh(&local->sta_bss_lock); - return current_ev - buf; -} - - -int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len) -{ - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - struct ieee80211_if_sta *ifsta = &sdata->u.sta; - kfree(ifsta->extra_ie); - if (len == 0) { - ifsta->extra_ie = NULL; - ifsta->extra_ie_len = 0; - return 0; - } - ifsta->extra_ie = kmalloc(len, GFP_KERNEL); - if (ifsta->extra_ie == NULL) { - ifsta->extra_ie_len = 0; - return -ENOMEM; - } - memcpy(ifsta->extra_ie, ie, len); - ifsta->extra_ie_len = len; - if (ifsta->bssid_set && ifsta->ssid_set && - ifsta->state != IEEE80211_AUTHENTICATE) - ieee80211_sta_new_auth(dev, ifsta); - return 0; -} - - -struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev, - struct sk_buff *skb, u8 *bssid, - u8 *addr) -{ - struct ieee80211_local *local = dev->priv; - struct list_head *ptr; - struct sta_info *sta; - struct ieee80211_sub_if_data *sdata = NULL; - struct net_device *sta_dev = NULL; - - /* TODO: Could consider removing the least recently used entry and - * allow new one to be added. */ - if (local->num_sta >= IEEE80211_IBSS_MAX_STA_ENTRIES) { - if (net_ratelimit()) { - printk(KERN_DEBUG "%s: No room for a new IBSS STA " - "entry " MACSTR "\n", dev->name, MAC2STR(addr)); - } - return NULL; - } - - spin_lock_bh(&local->sub_if_lock); - list_for_each(ptr, &local->sub_if_list) { - sdata = list_entry(ptr, struct ieee80211_sub_if_data, list); - if (sdata->type == IEEE80211_SUB_IF_TYPE_STA && - memcmp(bssid, sdata->u.sta.bssid, ETH_ALEN) == 0) { - sta_dev = sdata->dev; - break; - } - } - spin_unlock_bh(&local->sub_if_lock); - - if (sta_dev == NULL) - return NULL; - - printk(KERN_DEBUG "%s: Adding new IBSS station " MACSTR " (dev=%s)\n", - dev->name, MAC2STR(addr), sta_dev->name); - - sta = sta_info_add(local, dev, addr); - if (sta == NULL) { - return NULL; - } - - sta->dev = sta_dev; - sta->supp_rates = sdata->u.sta.supp_rates_bits; - - rate_control_rate_init(local, sta); - - return sta; /* caller will call sta_info_release() */ -} - - -int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason) -{ - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - struct ieee80211_if_sta *ifsta = &sdata->u.sta; - - printk(KERN_DEBUG "%s: deauthenticate(reason=%d)\n", - dev->name, reason); - - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - return -EINVAL; - - ieee80211_send_deauth(dev, ifsta, reason); - ieee80211_set_associated(dev, ifsta, 0); - return 0; -} - - -int ieee80211_sta_disassociate(struct net_device *dev, u16 reason) -{ - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - struct ieee80211_if_sta *ifsta = &sdata->u.sta; - - printk(KERN_DEBUG "%s: disassociate(reason=%d)\n", - dev->name, reason); - - if (sdata->type != IEEE80211_SUB_IF_TYPE_STA) - return -EINVAL; - - if (!ifsta->associated) - return -1; - - ieee80211_send_disassoc(dev, ifsta, reason); - ieee80211_set_associated(dev, ifsta, 0); - return 0; -} diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211.h b/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211.h deleted file mode 100644 index 5d8975527ac..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211.h +++ /dev/null @@ -1,872 +0,0 @@ -/* - * Low-level hardware driver -- IEEE 802.11 driver (80211.o) interface - * Copyright 2002-2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef IEEE80211_H -#define IEEE80211_H - -#include "ieee80211_shared.h" - -/* Note! Only ieee80211_tx_status_irqsafe() and ieee80211_rx_irqsave() can be - * called in hardware interrupt context. The low-level driver must not call any - * other functions in hardware interrupt context. If there is a need for such - * call, the low-level driver should first ACK the interrupt and perform the - * IEEE 802.11 code call after this, e.g., from a scheduled tasklet (in - * software interrupt context). - */ - -/* - * Frame format used when passing frame between low-level hardware drivers - * and IEEE 802.11 driver the same as used in the wireless media, i.e., - * buffers start with IEEE 802.11 header and include the same octets that - * are sent over air. - * - * If hardware uses IEEE 802.3 headers (and perform 802.3 <-> 802.11 - * conversion in firmware), upper layer 802.11 code needs to be changed to - * support this. - * - * If the receive frame format is not the same as the real frame sent - * on the wireless media (e.g., due to padding etc.), upper layer 802.11 code - * could be updated to provide support for such format assuming this would - * optimize the performance, e.g., by removing need to re-allocation and - * copying of the data. - */ - -/* Interface version (used for compatibility verification) */ -#define IEEE80211_VERSION 2 - - -/* Channel information structure. Low-level driver is expected to fill in chan, - * freq, and val fields. Other fields will be filled in by 80211.o based on - * hostapd information and low-level driver does not need to use them. The - * limits for each channel will be provided in 'struct ieee80211_conf' when - * configuring the low-level driver with hw->config callback. */ -struct ieee80211_channel { - short chan; /* channel number (IEEE 802.11) */ - short freq; /* frequency in MHz */ - int val; /* hw specific value for the channel */ - int flag; /* flag for hostapd use (IEEE80211_CHAN_*) */ - unsigned char power_level; - unsigned char antenna_max; -}; - -struct ieee80211_rate { - int rate; /* rate in 100 kbps */ - int val; /* hw specific value for the rate */ - int flags; /* IEEE80211_RATE_ flags */ - int val2; /* hw specific value for the rate when using short preamble - * (only when IEEE80211_RATE_PREAMBLE2 flag is set, i.e., for - * 2, 5.5, and 11 Mbps) */ - signed char min_rssi_ack; - unsigned char min_rssi_ack_delta; - - /* following fields are set by 80211.o and need not be filled by the - * low-level driver */ - int rate_inv; /* inverse of the rate (LCM(all rates) / rate) for - * optimizing channel utilization estimates */ -}; - -struct ieee80211_hw_modes { - int mode; - int num_channels; - struct ieee80211_channel *channels; - int num_rates; - struct ieee80211_rate *rates; - int xr_end; /* only used with Atheros XR */ -}; - -struct ieee80211_tx_queue_params { - int aifs; /* 0 .. 255; -1 = use default */ - int cw_min; /* 2^n-1: 1, 3, 7, .. , 1023; 0 = use default */ - int cw_max; /* 2^n-1: 1, 3, 7, .. , 1023; 0 = use default */ - int burst_time; /* maximum burst time in 0.1 ms (i.e., 10 = 1 ms); - * 0 = disabled */ -}; - -#define NUM_TX_DATA_QUEUES 6 - -struct ieee80211_tx_queue_stats_data { - unsigned int len; /* num packets in queue */ - unsigned int limit; /* queue len (soft) limit */ - unsigned int count; /* total num frames sent */ -}; - -struct ieee80211_tx_queue_stats { - struct ieee80211_tx_queue_stats_data data[NUM_TX_DATA_QUEUES]; -}; - -#ifndef IEEE80211_TX_QUEUE_NUMS -#define IEEE80211_TX_QUEUE_NUMS -/* TODO: these need to be synchronized with hostapd_ioctl.h; make a shared - * header file that can be included into low-level drivers, 80211.o, and - * hostapd */ -enum { - IEEE80211_TX_QUEUE_DATA0 = 0, - IEEE80211_TX_QUEUE_DATA1 = 1, - IEEE80211_TX_QUEUE_DATA2 = 2, - IEEE80211_TX_QUEUE_DATA3 = 3, - IEEE80211_TX_QUEUE_DATA4 = 4, - IEEE80211_TX_QUEUE_SVP = 5, - IEEE80211_TX_QUEUE_AFTER_BEACON = 6, - IEEE80211_TX_QUEUE_BEACON = 7 -}; -#endif /* IEEE80211_TX_QUEUE_NUMS */ - - -struct ieee80211_low_level_stats { - unsigned int dot11ACKFailureCount; - unsigned int dot11RTSFailureCount; - unsigned int dot11FCSErrorCount; - unsigned int dot11RTSSuccessCount; -}; - -/* Transmit control fields. This data structure is passed to low-level driver - * with each TX frame. The low-level driver is responsible of configuring - * hardware to use given values (depending on what is supported). */ -#define HW_KEY_IDX_INVALID -1 - -struct ieee80211_tx_control { - enum { PKT_NORMAL = 0, PKT_PROBE_RESP } pkt_type; - int tx_rate; /* Transmit rate, given as the hw specific value for the - * rate (from struct ieee80211_rate) */ - int rts_cts_rate; /* Transmit rate for RTS/CTS frame, given as the hw - * specific value for the rate (from - * struct ieee80211_rate) */ - /* 1 = only first attempt, 2 = one retry, .. */ - unsigned int retry_limit:8; - /* duration field for RTS/CTS frame */ - unsigned int rts_cts_duration:16; - /* TODO: change these bit flags to use one unsigned int variable and - * defines with BIT(n). These are copied to TX status structure and - * this will make the code faster and smaller. */ - unsigned int req_tx_status:1; /* request TX status callback for this - * frame */ - unsigned int do_not_encrypt:1; /* send this frame without encryption; - * e.g., for EAPOL frames */ - unsigned int use_rts_cts:1; /* Use RTS-CTS before sending frame. */ - unsigned int use_cts_protect:1; /* Use CTS protection for the frame - * (e.g., for combined 802.11g / - * 802.11b networks) */ - unsigned int no_ack:1; /* Tell the low level not to wait for an ack */ - unsigned int rate_ctrl_probe:1; - unsigned int clear_dst_mask:1; - unsigned int requeue:1; - /* following three flags are only used with Atheros Super A/G */ - unsigned int compress:1; - unsigned int turbo_prime_notify:1; /* notify HostaAPd after frame - * transmission */ - unsigned int fast_frame:1; - - unsigned int atheros_xr:1; /* only used with Atheros XR */ - - unsigned int power_level:8; /* per-packet transmit power level, in dBm - */ - unsigned int antenna_sel:4; /* 0 = default/diversity, - * 1 = Ant0, 2 = Ant1 */ - int key_idx:8; /* -1 = do not encrypt, >= 0 keyidx from hw->set_key() - */ - int icv_len:8; /* Length of the ICV/MIC field in octets */ - int iv_len:8; /* Length of the IV field in octets */ - unsigned int queue:4; /* hardware queue to use for this frame; - * 0 = highest, hw->queues-1 = lowest */ - unsigned int sw_retry_attempt:4; /* no. of times hw has tried to - * transmit frame (not incl. hw retries) */ - -#if 0 - int rateidx; /* internal 80211.o rateidx, to be copied to tx_status */ - int alt_retry_rate; /* retry rate for the last retries, given as the - * hw specific value for the rate (from - * struct ieee80211_rate). To be used to limit - * packet dropping when probing higher rates, if hw - * supports multiple retry rates. -1 = not used */ -#endif -}; - -#define IEEE80211_CB_MAGIC 0xAAB80211 - -struct ieee80211_tx_packet_data { - unsigned int magic; - struct ieee80211_tx_control control; - unsigned long jiffies; - struct ieee80211_sub_if_data *sdata; -}; - -#define RX_FLAG_MMIC_ERROR 0x1 -#define RX_FLAG_DECRYPTED 0x2 -#define RX_FLAG_XR_DOUBLE_CHIRP 0x4 - -/* Receive status. The low-level driver should provide this information - * (the subset supported by hardware) to the 802.11 code with each received - * frame. - * Current implementation copies this into skb->cb, so it must be less than - * 48 bytes. */ -struct ieee80211_rx_status { -#if 0 - u64 hosttime; - u64 mactime; -#endif - int freq; /* receive frequency in Mhz */ - int channel; - int phymode; - int ssi; - int antenna; - int rate; - int flag; -}; - -/* Transmit status. The low-level driver should provide this information - * (the subset supported by hardware) to the 802.11 code for each transmit - * frame. */ -struct ieee80211_tx_status { - /* flags copied from struct ieee80211_tx_control) */ - unsigned int req_tx_status:1; /* whether TX status was explicitly - * requested */ - unsigned int rate_ctrl_probe:1; /* whether this was a probe packet from - * rate control */ - unsigned int tx_filtered:1; - - /* following three fields are only used with Atheros Super A/G */ - unsigned int turbo_prime_notify:1; /* notify HostAPd - CTS for Turbo - * Prime is sent */ - int queue_length; /* information about TX queue */ - int queue_number; - - int ack; /* whether the TX frame was ACKed */ - int ack_signal; /* measured signal strength of the ACK frame */ - int excessive_retries; - int retry_count; - int rateidx; /* internal 80211.o rateidx, to be copied to tx_status */ -}; - - -struct ieee80211_conf { - int channel; /* IEEE 802.11 channel number */ - int freq; /* MHz */ - int channel_val; /* hw specific value for the channel */ - - int mode; /* IW_MODE_ */ - - int phymode; /* MODE_IEEE80211A, .. */ - unsigned int regulatory_domain; - int adm_status; - - int beacon_int; - - /* Bitfields, grouped together */ - - int sw_encrypt:1; - int sw_decrypt:1; - int short_slot_time:1; /* use IEEE 802.11g Short Slot Time */ - int ssid_hidden:1; /* do not broadcast the ssid */ - - /* these fields are used by low level drivers for hardware - * that generate beacons independently */ - u8 *ssid; - size_t ssid_len; - u8 *generic_elem; - size_t generic_elem_len; - - u8 power_level; /* transmit power limit for current - * regulatory domain; in dBm */ - u8 antenna_max; /* maximum antenna gain */ - short tx_power_reduction; /* in 0.1 dBm */ - - int antenna_sel; /* default antenna conf: - * 0 = default/diversity, - * 1 = Ant0, - * 2 = Ant1 */ - - int calib_int; /* hw/radio calibration interval in - * seconds */ - int antenna_def; - int antenna_mode; - - u8 bssid_mask[ETH_ALEN]; /* ff:ff:ff:ff:ff:ff = 1 BSSID */ - int bss_count; - - int atheros_super_ag_compression; - int atheros_super_ag_fast_frame; - int atheros_super_ag_burst; - int atheros_super_ag_wme_ele; - int atheros_super_ag_turbo_g; - int atheros_super_ag_turbo_prime; - - int atheros_xr; - - u8 client_bssid[ETH_ALEN]; - - /* Following five fields are used for IEEE 802.11H */ - unsigned int radar_detect; - unsigned int spect_mgmt; - unsigned int quiet_duration; /* duration of quiet period */ - unsigned int quiet_offset; /* how far into the beacon is the quiet - * period */ - unsigned int quiet_period; -}; - - -typedef enum { ALG_NONE, ALG_WEP, ALG_TKIP, ALG_CCMP, ALG_NULL } -ieee80211_key_alg; - - -struct ieee80211_key_conf { - - int hw_key_idx; /* filled + used by low-level driver */ - ieee80211_key_alg alg; - int keylen; - - int force_sw_encrypt:1; /* to be cleared by low-level driver */ - int keyidx:8; /* WEP key index */ - int default_tx_key:1; /* This key is the new default TX key - * (used only for broadcast keys). */ - int default_wep_only:1; /* static WEP is the only configured security - * policy; this allows some low-level drivers - * to determine when hwaccel can be used */ - u8 key[0]; -}; - -#define IEEE80211_SCAN_START 1 -#define IEEE80211_SCAN_END 2 - -struct ieee80211_scan_conf { - int scan_channel; /* IEEE 802.11 channel number to do passive scan - * on */ - int scan_freq; /* new freq in MHz to switch to for passive scan - */ - int scan_channel_val; /* hw specific value for the channel */ - int scan_phymode; /* MODE_IEEE80211A, .. */ - unsigned char scan_power_level; - unsigned char scan_antenna_max; - - - int running_channel; /* IEEE 802.11 channel number we operate on - * normally */ - int running_freq; /* freq in MHz we're operating on normally */ - int running_channel_val; /* hw specific value for the channel */ - int running_phymode; - unsigned char running_power_level; - unsigned char running_antenna_max; - - int scan_time; /* time a scan will take in us */ - int tries; - - struct sk_buff *skb; /* skb to transmit before changing channels, maybe - * NULL for none */ - struct ieee80211_tx_control *tx_control; - -}; - -#ifndef IW_MODE_ADHOC -#define IW_MODE_ADHOC 1 -#endif - -#ifndef IW_MODE_INFRA -#define IW_MODE_INFRA 2 -#endif - -#ifndef IW_MODE_MASTER -#define IW_MODE_MASTER 3 -#endif - -#ifndef IW_MODE_MONITOR -#define IW_MODE_MONITOR 6 -#endif - -#define IEEE80211_SEQ_COUNTER_RX 0 -#define IEEE80211_SEQ_COUNTER_TX 1 - -typedef enum { - SET_KEY, DISABLE_KEY, REMOVE_ALL_KEYS, - ENABLE_COMPRESSION, DISABLE_COMPRESSION -} set_key_cmd; - -/* Configuration block used by the low-level driver to tell 802.11 code about - * supported hardware features and to pass function pointers for callback - * functions. */ -struct ieee80211_hw { - int version; /* IEEE80211_VERSION */ - - /* Driver name */ - char *name; - - /* TODO: frame_type 802.11/802.3, sw_encryption requirements */ - - /* Some wireless LAN chipsets generate beacons in the hardware/firmware - * and others rely on host generated beacons. This option is used to - * configure upper layer IEEE 802.11 module to generate beacons. The - * low-level driver can use ieee80211_beacon_get() to fetch next - * beacon frame. */ - int host_gen_beacon:1; - - - /* Some devices handle decryption internally and do not - * indicate whether the frame was encrypted (unencrypted frames - * will be dropped by the hardware, unless specifically allowed - * through) */ - int device_hides_wep:1; - - /* Whether RX frames passed to ieee80211_rx() include FCS in the end - */ - int rx_includes_fcs:1; - - /* Some wireless LAN chipsets buffer broadcast/multicast frames for - * power saving stations in the hardware/firmware and others rely on - * the host system for such buffering. This option is used to - * configure upper layer IEEE 802.11 to buffer broadcast/multicast - * frames when there are power saving stations so that low-level driver - * can fetch them with ieee80211_get_buffered_bc(). */ - int host_broadcast_ps_buffering:1; - - int wep_include_iv:1; - int data_nullfunc_ack:1; /* will data nullfunc frames get proper - * TX status callback */ - - /* Force sw version of encryption for TKIP packets if WMM is enabled. - */ - int no_tkip_wmm_hwaccel:1; - - /* 1 if the payload needs to be padded at even boundaries after the - * header */ - unsigned int extra_hdr_room:1; - - /* Some devices handle Michael MIC internally and do not include MIC in - * the received packets given to 80211.o. device_strips_mic must be set - * for such devices. ISWEP bit is still expected to be set in the IEEE - * 802.11 header with this option unlike with device_hides_wep option. - */ - unsigned int device_strips_mic:1; - - /* 1 = low-level driver supports skb fraglist (NETIF_F_FRAGLIST), i.e., - * more than one skb per frame */ - unsigned int fraglist; - - /* This is the time in us to change channels - */ - int channel_change_time; - - int num_modes; - struct ieee80211_hw_modes *modes; - - /* Handler that 802.11 module calls for each transmitted frame. - * skb contains the buffer starting from the IEEE 802.11 header. - * The low-level driver should send the frame out based on - * configuration in the TX control data. */ - int (*tx)(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_tx_control *control); - - /* Handler for performing hardware reset. */ - int (*reset)(struct net_device *dev); - - /* Handler that is called when any netdevice attached to the hardware - * device is set UP for the first time. This can be used, e.g., to - * enable interrupts and beacon sending. */ - int (*open)(struct net_device *dev); - - /* Handler that is called when the last netdevice attached to the - * hardware device is set DOWN. This can be used, e.g., to disable - * interrupts and beacon sending. */ - int (*stop)(struct net_device *dev); - - /* Handler for configuration requests. IEEE 802.11 code calls this - * function to change hardware configuration, e.g., channel. */ - int (*config)(struct net_device *dev, struct ieee80211_conf *conf); - - /* Set TIM bit handler. If the hardware/firmware takes care of beacon - * generation, IEEE 802.11 code uses this function to tell the - * low-level to set (or clear if set==0) TIM bit for the given aid. If - * host system is used to generate beacons, this handler is not used - * and low-level driver should set it to NULL. */ - int (*set_tim)(struct net_device *dev, int aid, int set); - - /* Set encryption key. IEEE 802.11 module calls this function to set - * encryption keys. addr is ff:ff:ff:ff:ff:ff for default keys and - * station hwaddr for individual keys. aid of the station is given - * to help low-level driver in selecting which key->hw_key_idx to use - * for this key. TX control data will use the hw_key_idx selected by - * the low-level driver. */ - int (*set_key)(struct net_device *dev, set_key_cmd cmd, u8 *addr, - struct ieee80211_key_conf *key, int aid); - - /* Set TX key index for default/broadcast keys. This is needed in cases - * where wlan card is doing full WEP/TKIP encapsulation (wep_include_iv - * is not set), in other cases, this function pointer can be set to - * NULL since 80211.o takes care of selecting the key index for each - * TX frame. */ - int (*set_key_idx)(struct net_device *dev, int idx); - - /* Enable/disable IEEE 802.1X. This item requests wlan card to pass - * unencrypted EAPOL-Key frames even when encryption is configured. - * If the wlan card does not require such a configuration, this - * function pointer can be set to NULL. 80211.o */ - int (*set_ieee8021x)(struct net_device *dev, int use_ieee8021x); - - /* Set port authorization state (IEEE 802.1X PAE) to be authorized - * (authorized=1) or unauthorized (authorized=0). This function can be - * used if the wlan hardware or low-level driver implements PAE. - * 80211.o module will anyway filter frames based on authorization - * state, so this function pointer can be NULL if low-level driver does - * not require event notification about port state changes. */ - int (*set_port_auth)(struct net_device *dev, u8 *addr, int authorized); - - /* Ask the hardware to do a passive scan on a new channel. The hardware - * will do what ever is required to nicely leave the current channel - * including transmit any CTS packets, etc. */ - int (*passive_scan)(struct net_device *dev, int state, - struct ieee80211_scan_conf *conf); - - /* return low-level statistics */ - int (*get_stats)(struct net_device *dev, - struct ieee80211_low_level_stats *stats); - - /* Enable/disable test modes; mode = IEEE80211_TEST_* */ - int (*test_mode)(struct net_device *dev, int mode); - - /* Configuration of test parameters */ - int (*test_param)(struct net_device *dev, int param, int value); - - /* Change MAC address. addr is pointer to struct sockaddr. */ - int (*set_mac_address)(struct net_device *dev, void *addr); - - /* For devices that generate their own beacons and probe response - * or association responses this updates the state of privacy_invoked - * returns 0 for success or an error number */ - - int (*set_privacy_invoked)(struct net_device *dev, - int privacy_invoked); - - /* For devices that have internal sequence counters, allow 802.11 - * code to access the current value of a counter */ - int (*get_sequence_counter)(struct net_device *dev, - u8* addr, u8 keyidx, u8 txrx, - u32* iv32, u16* iv16); - - /* Configuration of RTS threshold (if device needs it) */ - int (*set_rts_threshold)(struct net_device *dev, u32 value); - - /* Configuration of fragmentation threshold (if device needs it) */ - int (*set_frag_threshold)(struct net_device *dev, u32 value); - - /* Configuration of retry limits (if device needs it) */ - int (*set_retry_limit)(struct net_device *dev, u32 short_retry, - u32 long_retr); - - /* Number of STAs in STA table notification (NULL = disabled) */ - void (*sta_table_notification)(struct net_device *dev, int num_sta); - - /* Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), - * bursting) for a hardware TX queue. - * queue = IEEE80211_TX_QUEUE_*. */ - int (*conf_tx)(struct net_device *dev, int queue, - const struct ieee80211_tx_queue_params *params); - - /* Get statistics of the current TX queue status. This is used to get - * number of currently queued packets (queue length), maximum queue - * size (limit), and total number of packets sent using each TX queue - * (count). This information is used for WMM to find out which TX - * queues have room for more packets and by hostapd to provide - * statistics about the current queueing state to external programs. */ - int (*get_tx_stats)(struct net_device *dev, - struct ieee80211_tx_queue_stats *stats); - - /* Number of available hardware TX queues for data packets. - * WMM requires at least four queues. */ - int queues; - - /* Get the current TSF timer value from firmware/hardware. Currently, - * this is only used for IBSS mode debugging and, as such, is not a - * required function. */ - u64 (*get_tsf)(struct net_device *dev); - - /* Reset the TSF timer and allow firmware/hardware to synchronize with - * other STAs in the IBSS. This is only used in IBSS mode. This - * function is optional if the firmware/hardware takes full care of - * TSF synchronization. */ - void (*reset_tsf)(struct net_device *dev); - - /* Setup beacon data for IBSS beacons. Unlike access point (Master), - * IBSS uses a fixed beacon frame which is configured using this - * function. This handler is required only for IBSS mode. */ - int (*beacon_update)(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_tx_control *control); - - /* Determine whether the last IBSS beacon was sent by us. This is - * needed only for IBSS mode and the result of this function is used to - * determine whether to reply to Probe Requests. */ - int (*tx_last_beacon)(struct net_device *dev); - - /* Optional handler for XR-in-use notification. */ - int (*atheros_xr_in_use)(struct net_device *dev, int in_use); -}; - -/* Allocate a new hardware device. This must be called once for each - * hardware device. The returned pointer must be used to refer to this - * device when calling other functions. 802.11 code allocates a private data - * area for the low-level driver. The size of this area is given as - * priv_data_len. ieee80211_dev_hw_data() is used to get a pointer to the - * private data area. - * - * Note: in this version of the interface the returned pointer is struct - * net_device *. This may change in the future and low-level driver should - * not refer the device data directly to remain compatible with the future - * versions of the interface. */ -struct net_device *ieee80211_alloc_hw(size_t priv_data_len, - void (*setup)(struct net_device *)); - -/* Register hardware device to the IEEE 802.11 code and kernel. Low-level - * drivers must call this function before using any other IEEE 802.11 - * function. */ -int ieee80211_register_hw(struct net_device *dev, struct ieee80211_hw *hw); - -/* This function is allowed to update hardware configuration (e.g., list of - * supported operation modes and rates). */ -int ieee80211_update_hw(struct net_device *dev, struct ieee80211_hw *hw); - -/* Unregister a hardware device. This function instructs 802.11 code to free - * allocated resources and unregister netdevices from the kernel. */ -void ieee80211_unregister_hw(struct net_device *dev); - -/* Free allocated net_device including private data of a driver. */ -void ieee80211_free_hw(struct net_device *dev); - -/* Receive frame callback function. The low-level driver uses this function to - * send received frames to the IEEE 802.11 code. Receive buffer (skb) must - * start with IEEE 802.11 header. */ -void ieee80211_rx(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *status); -void ieee80211_rx_irqsafe(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_rx_status *status); - -/* Transmit status callback function. The low-level driver must call this - * function to report transmit status for all the TX frames that had - * req_tx_status set in the transmit control fields. In addition, this should - * be called at least for all unicast frames to provide information for TX rate - * control algorithm. In order to maintain all statistics, this function is - * recommended to be called after each frame, including multicast/broadcast, is - * sent. */ -void ieee80211_tx_status(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_tx_status *status); -void ieee80211_tx_status_irqsafe(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_tx_status *status); - -/* Beacon generation function. If the beacon frames are generated by the host - * system (i.e., not in hardware/firmware), the low-level driver uses this - * function to receive the next beacon frame from the 802.11 code. The - * low-level is responsible for calling this function before beacon data is - * needed (e.g., based on hardware interrupt). Returned skb is used only once - * and low-level driver is responsible of freeing it. */ -struct sk_buff * ieee80211_beacon_get(struct net_device *dev, int bss_idx, - struct ieee80211_tx_control *control); - -/* Function for accessing buffered broadcast and multicast frames. If - * hardware/firmware does not implement buffering of broadcast/multicast - * frames when power saving is used, 802.11 code buffers them in the host - * memory. The low-level driver uses this function to fetch next buffered - * frame. In most cases, this is used when generating beacon frame. This - * function returns a pointer to the next buffered skb or NULL if no more - * buffered frames are available. - * - * Note: buffered frames are returned only after DTIM beacon frame was - * generated with ieee80211_beacon_get() and the low-level driver must thus - * call ieee80211_beacon_get() first. ieee80211_get_buffered_bc() returns - * NULL if the previous generated beacon was not DTIM, so the low-level driver - * does not need to check for DTIM beacons separately and should be able to - * use common code for all beacons. */ -struct sk_buff * -ieee80211_get_buffered_bc(struct net_device *dev, int bss_idx, - struct ieee80211_tx_control *control); - -/* Low level drivers that have their own MLME and MAC indicate - * the aid for an associating station with this call */ -int ieee80211_set_aid_for_sta(struct net_device *dev, u8 *peer_address, - u16 aid); - - -/* Given an sk_buff with a raw 802.11 header at the data pointer this function - * returns the 802.11 header length in bytes (not including encryption - * headers). If the data in the sk_buff is too short to contain a valid 802.11 - * header the function returns 0. - */ -int ieee80211_get_hdrlen_from_skb(struct sk_buff *skb); - -/* Like ieee80211_get_hdrlen_from_skb() but takes a FC in CPU order. */ -int ieee80211_get_hdrlen(u16 fc); - -/* Function for net interface operation. IEEE 802.11 may use multiple kernel - * netdevices for each hardware device. The low-level driver does not "see" - * these interfaces, so it should use this function to perform netif - * operations on all interface. */ -typedef enum { - NETIF_ATTACH, NETIF_DETACH, NETIF_START, NETIF_STOP, NETIF_WAKE, - NETIF_IS_STOPPED, NETIF_UPDATE_TX_START -} Netif_Oper; -int ieee80211_netif_oper(struct net_device *dev, Netif_Oper op); - - -/* - * Function to get hardware configuration information - * by the low level driver should it need it. - */ -struct ieee80211_conf * -ieee80211_get_hw_conf(struct net_device *dev); - - -/* Return a pointer to the low-level private data area for the given device. */ -void * ieee80211_dev_hw_data(struct net_device *dev); -/* Return a pointer to network statistics data area for the given device. */ -void * ieee80211_dev_stats(struct net_device *dev); - -/* Function to indicate Radar Detection. The low level driver must call this - * function to indicate the presence of radar in the current channel. - * Additionally the radar type also could be sent */ -int ieee80211_radar_status(struct net_device *dev, int channel, int radar, - int radar_type); - -/* Test modes */ -enum { - IEEE80211_TEST_DISABLE = 0 /* terminate testing */, - IEEE80211_TEST_UNMASK_CHANNELS = 1 /* allow all channels to be used */, - IEEE80211_TEST_CONTINUOUS_TX = 2, -}; - -/* Test parameters */ -enum { - /* TX power in hardware specific raw value */ - IEEE80211_TEST_PARAM_TX_POWER_RAW = 0, - /* TX rate in hardware specific raw value */ - IEEE80211_TEST_PARAM_TX_RATE_RAW = 1, - /* Continuous TX pattern (32-bit) */ - IEEE80211_TEST_PARAM_TX_PATTERN = 2, - /* TX power in 0.1 dBm, 100 = 10 dBm */ - IEEE80211_TEST_PARAM_TX_POWER = 3, - /* TX rate in 100 kbps, 540 = 54 Mbps */ - IEEE80211_TEST_PARAM_TX_RATE = 4, - IEEE80211_TEST_PARAM_TX_ANT_SEL_RAW = 5, -}; - -/* ieee80211_tx_led called with state == 1 when the first frame is queued - * with state == 0 when the last frame is transmitted and tx queue is empty - */ -void ieee80211_tx_led(int state, struct net_device *dev); -/* ieee80211_rx_led is called each time frame is received, state is not used - * (== 2) - */ -void ieee80211_rx_led(int state, struct net_device *dev); - - -/* IEEE 802.11 defines */ - -#define FCS_LEN 4 - -#define WLAN_FC_PVER 0x0003 -#define WLAN_FC_TODS 0x0100 -#define WLAN_FC_FROMDS 0x0200 -#define WLAN_FC_MOREFRAG 0x0400 -#define WLAN_FC_RETRY 0x0800 -#define WLAN_FC_PWRMGT 0x1000 -#define WLAN_FC_MOREDATA 0x2000 -#define WLAN_FC_ISWEP 0x4000 -#define WLAN_FC_ORDER 0x8000 - -#define WLAN_FC_GET_TYPE(fc) (((fc) & 0x000c) >> 2) -#define WLAN_FC_GET_STYPE(fc) (((fc) & 0x00f0) >> 4) - -#define WLAN_GET_SEQ_FRAG(seq) ((seq) & 0x000f) -#define WLAN_GET_SEQ_SEQ(seq) ((seq) >> 4) - -#define WLAN_FC_DATA_PRESENT(fc) (((fc) & 0x4c) == 0x08) - -#define WLAN_FC_TYPE_MGMT 0 -#define WLAN_FC_TYPE_CTRL 1 -#define WLAN_FC_TYPE_DATA 2 - -/* management */ -#define WLAN_FC_STYPE_ASSOC_REQ 0 -#define WLAN_FC_STYPE_ASSOC_RESP 1 -#define WLAN_FC_STYPE_REASSOC_REQ 2 -#define WLAN_FC_STYPE_REASSOC_RESP 3 -#define WLAN_FC_STYPE_PROBE_REQ 4 -#define WLAN_FC_STYPE_PROBE_RESP 5 -#define WLAN_FC_STYPE_BEACON 8 -#define WLAN_FC_STYPE_ATIM 9 -#define WLAN_FC_STYPE_DISASSOC 10 -#define WLAN_FC_STYPE_AUTH 11 -#define WLAN_FC_STYPE_DEAUTH 12 -#define WLAN_FC_STYPE_ACTION 13 - -/* control */ -#define WLAN_FC_STYPE_PSPOLL 10 -#define WLAN_FC_STYPE_RTS 11 -#define WLAN_FC_STYPE_CTS 12 -#define WLAN_FC_STYPE_ACK 13 -#define WLAN_FC_STYPE_CFEND 14 -#define WLAN_FC_STYPE_CFENDACK 15 - -/* data */ -#define WLAN_FC_STYPE_DATA 0 -#define WLAN_FC_STYPE_DATA_CFACK 1 -#define WLAN_FC_STYPE_DATA_CFPOLL 2 -#define WLAN_FC_STYPE_DATA_CFACKPOLL 3 -#define WLAN_FC_STYPE_NULLFUNC 4 -#define WLAN_FC_STYPE_CFACK 5 -#define WLAN_FC_STYPE_CFPOLL 6 -#define WLAN_FC_STYPE_CFACKPOLL 7 -#define WLAN_FC_STYPE_QOS_DATA 8 -#define WLAN_FC_STYPE_QOS_DATA_CFACK 9 -#define WLAN_FC_STYPE_QOS_DATA_CFPOLL 10 -#define WLAN_FC_STYPE_QOS_DATA_CFACKPOLL 11 -#define WLAN_FC_STYPE_QOS_NULLFUNC 12 -#define WLAN_FC_STYPE_QOS_CFACK 13 -#define WLAN_FC_STYPE_QOS_CFPOLL 14 -#define WLAN_FC_STYPE_QOS_CFACKPOLL 15 - - -#define IEEE80211_MAX_FRAG_THRESHOLD 2346 -#define IEEE80211_MAX_RTS_THRESHOLD 2347 - -struct ieee80211_hdr { - u16 frame_control; - u16 duration_id; - u8 addr1[6]; - u8 addr2[6]; - u8 addr3[6]; - u16 seq_ctrl; - u8 addr4[6]; -} __attribute__ ((packed)); - -/* return a pointer to the source address (SA) */ -static inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr) -{ - u8 *raw = (u8 *) hdr; - u8 tofrom = (*(raw+1)) & 3; /* get the TODS and FROMDS bits */ - - switch (tofrom) { - case 2: - return hdr->addr3; - case 3: - return hdr->addr4; - } - return hdr->addr2; -} - -/* return a pointer to the destination address (DA) */ -static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) -{ - u8 *raw = (u8 *) hdr; - u8 to_ds = (*(raw+1)) & 1; /* get the TODS bit */ - - if (to_ds) - return hdr->addr3; - return hdr->addr1; -} - -static inline int ieee80211_get_morefrag(struct ieee80211_hdr *hdr) -{ - return (le16_to_cpu(hdr->frame_control) & WLAN_FC_MOREFRAG) != 0; -} - -#endif /* IEEE80211_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_common.h b/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_common.h deleted file mode 100644 index 68c1663861a..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_common.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * IEEE 802.11 driver (80211.o) -- hostapd interface - * Copyright 2002-2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef IEEE80211_COMMON_H -#define IEEE80211_COMMON_H - -/* - * This is common header information with user space. It is used on all - * frames sent to wlan#ap interface. - */ - -#define IEEE80211_FI_VERSION 0x80211001 - -struct ieee80211_frame_info { - u32 version; - u32 length; - u64 mactime; - u64 hosttime; - u32 phytype; - u32 channel; - u32 datarate; - u32 antenna; - u32 priority; - u32 ssi_type; - u32 ssi_signal; - u32 ssi_noise; - u32 preamble; - u32 encoding; - - /* Note: this structure is otherwise identical to capture format used - * in linux-wlan-ng, but this additional field is used to provide meta - * data about the frame to hostapd. This was the easiest method for - * providing this information, but this might change in the future. */ - u32 msg_type; -} __attribute__ ((packed)); - - -enum ieee80211_msg_type { - ieee80211_msg_normal = 0, - ieee80211_msg_tx_callback_ack = 1, - ieee80211_msg_tx_callback_fail = 2, - ieee80211_msg_passive_scan = 3, - ieee80211_msg_wep_frame_unknown_key = 4, - ieee80211_msg_michael_mic_failure = 5, - ieee80211_msg_monitor = 6, - ieee80211_msg_sta_not_assoc = 7, - ieee80211_msg_set_aid_for_sta = 8 /* used by Intersil MVC driver */, - ieee80211_msg_key_threshold_notification = 9, - ieee80211_msg_radar = 11, -}; - -struct ieee80211_msg_set_aid_for_sta { - char sta_address[ETH_ALEN]; - u16 aid; -}; - -struct ieee80211_msg_key_notification { - int tx_rx_count; - char ifname[IFNAMSIZ]; - u8 addr[ETH_ALEN]; /* ff:ff:ff:ff:ff:ff for broadcast keys */ -}; - - -enum ieee80211_phytype { - ieee80211_phytype_fhss_dot11_97 = 1, - ieee80211_phytype_dsss_dot11_97 = 2, - ieee80211_phytype_irbaseband = 3, - ieee80211_phytype_dsss_dot11_b = 4, - ieee80211_phytype_pbcc_dot11_b = 5, - ieee80211_phytype_ofdm_dot11_g = 6, - ieee80211_phytype_pbcc_dot11_g = 7, - ieee80211_phytype_ofdm_dot11_a = 8, - ieee80211_phytype_dsss_dot11_turbog = 255, - ieee80211_phytype_dsss_dot11_turbo = 256, -}; - -enum ieee80211_ssi_type { - ieee80211_ssi_none = 0, - ieee80211_ssi_norm = 1, /* normalized, 0-1000 */ - ieee80211_ssi_dbm = 2, - ieee80211_ssi_raw = 3, /* raw SSI */ -}; - -struct ieee80211_radar_info { - int channel; - int radar; - int radar_type; -}; - -#endif /* IEEE80211_COMMON_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_mgmt.h b/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_mgmt.h deleted file mode 100644 index 86732684ea9..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_mgmt.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * IEEE 802.11 -- shared defines for 80211.o and hostapd - * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi> - * Copyright 2002-2004, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef IEEE802_11_MGMT_H -#define IEEE802_11_MGMT_H - - -struct ieee80211_mgmt { - u16 frame_control; - u16 duration; - u8 da[6]; - u8 sa[6]; - u8 bssid[6]; - u16 seq_ctrl; - union { - struct { - u16 auth_alg; - u16 auth_transaction; - u16 status_code; - /* possibly followed by Challenge text */ - u8 variable[0]; - } __attribute__ ((packed)) auth; - struct { - u16 reason_code; - } __attribute__ ((packed)) deauth; - struct { - u16 capab_info; - u16 listen_interval; - /* followed by SSID and Supported rates */ - u8 variable[0]; - } __attribute__ ((packed)) assoc_req; - struct { - u16 capab_info; - u16 status_code; - u16 aid; - /* followed by Supported rates */ - u8 variable[0]; - } __attribute__ ((packed)) assoc_resp, reassoc_resp; - struct { - u16 capab_info; - u16 listen_interval; - u8 current_ap[6]; - /* followed by SSID and Supported rates */ - u8 variable[0]; - } __attribute__ ((packed)) reassoc_req; - struct { - u16 reason_code; - } __attribute__ ((packed)) disassoc; - struct { - u8 timestamp[8]; - u16 beacon_int; - u16 capab_info; - /* followed by some of SSID, Supported rates, - * FH Params, DS Params, CF Params, IBSS Params, TIM */ - u8 variable[0]; - } __attribute__ ((packed)) beacon; - struct { - /* only variable items: SSID, Supported rates */ - u8 variable[0]; - } __attribute__ ((packed)) probe_req; - struct { - u8 timestamp[8]; - u16 beacon_int; - u16 capab_info; - /* followed by some of SSID, Supported rates, - * FH Params, DS Params, CF Params, IBSS Params */ - u8 variable[0]; - } __attribute__ ((packed)) probe_resp; - struct { - u8 category; - union { - struct { - u8 action_code; - u8 dialog_token; - u8 status_code; - u8 variable[0]; - } __attribute__ ((packed)) wme_action; - struct{ - u8 action_code; - u8 element_id; - u8 length; - u8 switch_mode; - u8 new_chan; - u8 switch_count; - } __attribute__((packed)) chan_switch; - } u; - } __attribute__ ((packed)) action; - } u; -} __attribute__ ((packed)); - - -/* Authentication algorithms */ -#define WLAN_AUTH_OPEN 0 -#define WLAN_AUTH_SHARED_KEY 1 -#define WLAN_AUTH_LEAP 128 - -#define WLAN_AUTH_CHALLENGE_LEN 128 - -#define WLAN_CAPABILITY_ESS BIT(0) -#define WLAN_CAPABILITY_IBSS BIT(1) -#define WLAN_CAPABILITY_CF_POLLABLE BIT(2) -#define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3) -#define WLAN_CAPABILITY_PRIVACY BIT(4) -#define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5) -#define WLAN_CAPABILITY_PBCC BIT(6) -#define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7) -/* 802.11h */ -#define WLAN_CAPABILITY_SPECTRUM_MGMT BIT(8) -#define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10) -#define WLAN_CAPABILITY_DSSS_OFDM BIT(13) - -/* Status codes */ -#define WLAN_STATUS_SUCCESS 0 -#define WLAN_STATUS_UNSPECIFIED_FAILURE 1 -#define WLAN_STATUS_CAPS_UNSUPPORTED 10 -#define WLAN_STATUS_REASSOC_NO_ASSOC 11 -#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12 -#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13 -#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14 -#define WLAN_STATUS_CHALLENGE_FAIL 15 -#define WLAN_STATUS_AUTH_TIMEOUT 16 -#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 -#define WLAN_STATUS_ASSOC_DENIED_RATES 18 -/* 802.11b */ -#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19 -#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20 -#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21 -/* 802.11h */ -#define WLAN_STATUS_SPEC_MGMT_REQUIRED 22 -#define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23 -#define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24 -/* 802.11g */ -#define WLAN_STATUS_ASSOC_DENOED_NO_SHORT_SLOT_TIME 25 -#define WLAN_STATUS_ASSOC_DENOED_NO_ER_PBCC 26 -#define WLAN_STATUS_ASSOC_DENOED_NO_DSSS_OFDM 27 - - -/* Reason codes */ -#define WLAN_REASON_UNSPECIFIED 1 -#define WLAN_REASON_PREV_AUTH_NOT_VALID 2 -#define WLAN_REASON_DEAUTH_LEAVING 3 -#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4 -#define WLAN_REASON_DISASSOC_AP_BUSY 5 -#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6 -#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7 -#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8 -#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 -/* 802.11h */ -#define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10 -#define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11 - -#define WLAN_REASON_MIC_FAILURE 14 - - -/* Information Element IDs */ -#define WLAN_EID_SSID 0 -#define WLAN_EID_SUPP_RATES 1 -#define WLAN_EID_FH_PARAMS 2 -#define WLAN_EID_DS_PARAMS 3 -#define WLAN_EID_CF_PARAMS 4 -#define WLAN_EID_TIM 5 -#define WLAN_EID_IBSS_PARAMS 6 -#define WLAN_EID_COUNTRY 7 -#define WLAN_EID_CHALLENGE 16 -/* EIDs defined as part fo 11h - starts */ -#define WLAN_EID_PWR_CONSTRAINT 32 -#define WLAN_EID_PWR_CAPABILITY 33 -#define WLAN_EID_TPC_REQUEST 34 -#define WLAN_EID_TPC_REPORT 35 -#define WLAN_EID_SUPPORTED_CHANNELS 36 -#define WLAN_EID_CHANNEL_SWITCH 37 -#define WLAN_EID_MEASURE_REQUEST 38 -#define WLAN_EID_MEASURE_REPORT 39 -#define WLAN_EID_QUITE 40 -#define WLAN_EID_IBSS_DFS 41 -/* EIDs defined as part fo 11h - ends */ -#define WLAN_EID_ERP_INFO 42 -#define WLAN_EID_RSN 48 -#define WLAN_EID_EXT_SUPP_RATES 50 -#define WLAN_EID_WPA 221 -#define WLAN_EID_GENERIC 221 -#define WLAN_EID_VENDOR_SPECIFIC 221 - - - -#define ATHEROS_INFO_USEXR BIT(3) - -#endif /* IEEE802_11_MGMT_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_shared.h b/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_shared.h deleted file mode 100644 index 95355bb2224..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/include/net/ieee80211_shared.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * IEEE 802.11 -- shared defines for low-level drivers, 80211.o, and hostapd - * Copyright 2002-2004, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef IEEE80211_SHARED_H -#define IEEE80211_SHARED_H - -/* 802.11g is backwards-compatible with 802.11b, so a wlan card can - * actually be both in 11b and 11g modes at the same time. */ -enum { - MODE_IEEE80211A = 0 /* IEEE 802.11a */, - MODE_IEEE80211B = 1 /* IEEE 802.11b only */, - MODE_ATHEROS_TURBO = 2 /* Atheros Turbo mode (2x.11a at 5 GHz) */, - MODE_IEEE80211G = 3 /* IEEE 802.11g (and 802.11b compatibility) */, - MODE_ATHEROS_TURBOG = 4 /* Atheros Turbo mode (2x.11g at 2.4 GHz) */, - MODE_ATHEROS_PRIME = 5 /* Atheros Dynamic Turbo mode */, - MODE_ATHEROS_PRIMEG = 6 /* Atheros Dynamic Turbo mode G */, - MODE_ATHEROS_XR = 7 /* Atheros XR mode */, - NUM_IEEE80211_MODES = 8 -}; - -#define IEEE80211_CHAN_W_SCAN 0x00000001 -#define IEEE80211_CHAN_W_ACTIVE_SCAN 0x00000002 -#define IEEE80211_CHAN_W_IBSS 0x00000004 - -/* Low-level driver should set PREAMBLE2, OFDM, CCK, and TURBO flags. - * BASIC, SUPPORTED, ERP, and MANDATORY flags are set in 80211.o based on the - * configuration. */ -#define IEEE80211_RATE_ERP 0x00000001 -#define IEEE80211_RATE_BASIC 0x00000002 -#define IEEE80211_RATE_PREAMBLE2 0x00000004 -#define IEEE80211_RATE_SUPPORTED 0x00000010 -#define IEEE80211_RATE_OFDM 0x00000020 -#define IEEE80211_RATE_CCK 0x00000040 -#define IEEE80211_RATE_TURBO 0x00000080 -#define IEEE80211_RATE_MANDATORY 0x00000100 -#define IEEE80211_RATE_XR 0x00000200 - -#define IEEE80211_RATE_CCK_2 (IEEE80211_RATE_CCK | IEEE80211_RATE_PREAMBLE2) -#define IEEE80211_RATE_MODULATION(f) \ -(f & (IEEE80211_RATE_CCK | IEEE80211_RATE_OFDM)) - - -#endif /* IEEE80211_SHARED_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/michael.c b/openwrt/target/linux/package/ieee80211-dscape/src/michael.c deleted file mode 100644 index 0f844f7895f..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/michael.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Michael MIC implementation - optimized for TKIP MIC operations - * Copyright 2002-2003, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/types.h> - -#include "michael.h" - -static inline u32 rotr(u32 val, int bits) -{ - return (val >> bits) | (val << (32 - bits)); -} - - -static inline u32 rotl(u32 val, int bits) -{ - return (val << bits) | (val >> (32 - bits)); -} - - -static inline u32 xswap(u32 val) -{ - return ((val & 0xff00ff00) >> 8) | ((val & 0x00ff00ff) << 8); -} - - -#define michael_block(l, r) \ -do { \ - r ^= rotl(l, 17); \ - l += r; \ - r ^= xswap(l); \ - l += r; \ - r ^= rotl(l, 3); \ - l += r; \ - r ^= rotr(l, 2); \ - l += r; \ -} while (0) - - -static inline u32 michael_get32(u8 *data) -{ - return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); -} - - -static inline void michael_put32(u32 val, u8 *data) -{ - data[0] = val & 0xff; - data[1] = (val >> 8) & 0xff; - data[2] = (val >> 16) & 0xff; - data[3] = (val >> 24) & 0xff; -} - - -void michael_mic(u8 *key, u8 *da, u8 *sa, u8 priority, - u8 *data, size_t data_len, u8 *mic) -{ - u32 l, r, val; - size_t block, blocks, left; - - l = michael_get32(key); - r = michael_get32(key + 4); - - /* A pseudo header (DA, SA, Priority, 0, 0, 0) is used in Michael MIC - * calculation, but it is _not_ transmitted */ - l ^= michael_get32(da); - michael_block(l, r); - l ^= da[4] | (da[5] << 8) | (sa[0] << 16) | (sa[1] << 24); - michael_block(l, r); - l ^= michael_get32(&sa[2]); - michael_block(l, r); - l ^= priority; - michael_block(l, r); - - /* Real data */ - blocks = data_len / 4; - left = data_len % 4; - - for (block = 0; block < blocks; block++) { - l ^= michael_get32(&data[block * 4]); - michael_block(l, r); - } - - /* Partial block of 0..3 bytes and padding: 0x5a + 4..7 zeros to make - * total length a multiple of 4. */ - val = 0x5a; - while (left > 0) { - val <<= 8; - left--; - val |= data[blocks * 4 + left]; - } - l ^= val; - michael_block(l, r); - /* last block is zero, so l ^ 0 = l */ - michael_block(l, r); - - michael_put32(l, mic); - michael_put32(r, mic + 4); -} diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/michael.h b/openwrt/target/linux/package/ieee80211-dscape/src/michael.h deleted file mode 100644 index 5acd8fd946c..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/michael.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Michael MIC implementation - optimized for TKIP MIC operations - * Copyright 2002-2003, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef MICHAEL_H -#define MICHAEL_H - -#define MICHAEL_MIC_LEN 8 - -void michael_mic(u8 *key, u8 *da, u8 *sa, u8 priority, - u8 *data, size_t data_len, u8 *mic); - -#endif /* MICHAEL_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/rate_control.c b/openwrt/target/linux/package/ieee80211-dscape/src/rate_control.c deleted file mode 100644 index 8782a756da7..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/rate_control.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright 2002-2005, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/netdevice.h> -#include <linux/types.h> -#include <linux/slab.h> -#include <linux/skbuff.h> -#include <linux/compiler.h> - -#include <net/ieee80211.h> -#include "ieee80211_i.h" -#include "rate_control.h" - - -/* This is a minimal implementation of TX rate controlling that can be used - * as the default when no improved mechanisms are available. */ - - -#define RATE_CONTROL_EMERG_DEC 2 -#define RATE_CONTROL_INTERVAL (HZ / 20) -#define RATE_CONTROL_MIN_TX 10 - - -static void rate_control_rate_inc(struct ieee80211_local *local, - struct sta_info *sta) -{ - struct ieee80211_sub_if_data *sdata; - int i = sta->txrate; - int maxrate; - - sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); - if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) { - /* forced unicast rate - do not change STA rate */ - return; - } - - maxrate = sdata->bss ? sdata->bss->max_ratectrl_rateidx : -1; - - if (i > local->num_curr_rates) - i = local->num_curr_rates - 2; - - while (i + 1 < local->num_curr_rates) { - i++; - if (sta->supp_rates & BIT(i) && - local->curr_rates[i].flags & IEEE80211_RATE_SUPPORTED && - (maxrate < 0 || i <= maxrate)) { - sta->txrate = i; - break; - } - } -} - - -static void rate_control_rate_dec(struct ieee80211_local *local, - struct sta_info *sta) -{ - struct ieee80211_sub_if_data *sdata; - int i = sta->txrate; - - sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); - if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) { - /* forced unicast rate - do not change STA rate */ - return; - } - - if (i > local->num_curr_rates) - i = local->num_curr_rates; - - while (i > 0) { - i--; - if (sta->supp_rates & BIT(i) && - local->curr_rates[i].flags & IEEE80211_RATE_SUPPORTED) { - sta->txrate = i; - break; - } - } -} - - -static struct ieee80211_rate * -rate_control_lowest_rate(struct ieee80211_local *local) -{ - int i; - - for (i = 0; i < local->num_curr_rates; i++) { - struct ieee80211_rate *rate = &local->curr_rates[i]; - - if (rate->flags & IEEE80211_RATE_SUPPORTED - ) - return rate; - } - - printk(KERN_DEBUG "rate_control_lowest_rate - no supported rates " - "found\n"); - return &local->curr_rates[0]; -} - - -struct global_rate_control { - int dummy; -}; - -struct sta_rate_control { - unsigned long last_rate_change; - u32 tx_num_failures; - u32 tx_num_xmit; - - unsigned long avg_rate_update; - u32 tx_avg_rate_sum; - u32 tx_avg_rate_num; -}; - - -static void rate_control_simple_tx_status(struct net_device *dev, - struct sk_buff *skb, - struct ieee80211_tx_status *status) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - struct sta_info *sta; - struct sta_rate_control *srctrl; - - sta = sta_info_get(local, hdr->addr1); - - if (!sta) - return; - - srctrl = sta->rate_ctrl_priv; - srctrl->tx_num_xmit++; - if (status->excessive_retries) { - sta->antenna_sel = sta->antenna_sel == 1 ? 2 : 1; - if (local->sta_antenna_sel == STA_ANTENNA_SEL_SW_CTRL_DEBUG) { - printk(KERN_DEBUG "%s: " MACSTR " TX antenna --> %d " - "(@%lu)\n", - dev->name, MAC2STR(hdr->addr1), - sta->antenna_sel, jiffies); - } - srctrl->tx_num_failures++; - sta->tx_retry_failed++; - sta->tx_num_consecutive_failures++; - sta->tx_num_mpdu_fail++; - } else { - sta->last_ack_rssi[0] = sta->last_ack_rssi[1]; - sta->last_ack_rssi[1] = sta->last_ack_rssi[2]; - sta->last_ack_rssi[2] = status->ack_signal; - sta->tx_num_consecutive_failures = 0; - sta->tx_num_mpdu_ok++; - } - sta->tx_retry_count += status->retry_count; - sta->tx_num_mpdu_fail += status->retry_count; - - if (time_after(jiffies, - srctrl->last_rate_change + RATE_CONTROL_INTERVAL) && - srctrl->tx_num_xmit > RATE_CONTROL_MIN_TX) { - u32 per_failed; - srctrl->last_rate_change = jiffies; - - per_failed = (100 * sta->tx_num_mpdu_fail) / - (sta->tx_num_mpdu_fail + sta->tx_num_mpdu_ok); - /* TODO: calculate average per_failed to make adjusting - * parameters easier */ -#if 0 - if (net_ratelimit()) { - printk(KERN_DEBUG "MPDU fail=%d ok=%d per_failed=%d\n", - sta->tx_num_mpdu_fail, sta->tx_num_mpdu_ok, - per_failed); - } -#endif - - if (per_failed > local->rate_ctrl_num_down) { - rate_control_rate_dec(local, sta); - } else if (per_failed < local->rate_ctrl_num_up) { - rate_control_rate_inc(local, sta); - } - srctrl->tx_avg_rate_sum += local->curr_rates[sta->txrate].rate; - srctrl->tx_avg_rate_num++; - srctrl->tx_num_failures = 0; - srctrl->tx_num_xmit = 0; - } else if (sta->tx_num_consecutive_failures >= - RATE_CONTROL_EMERG_DEC) { - rate_control_rate_dec(local, sta); - } - - if (srctrl->avg_rate_update + 60 * HZ < jiffies) { - srctrl->avg_rate_update = jiffies; - if (srctrl->tx_avg_rate_num > 0) { -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: STA " MACSTR " Average rate: " - "%d (%d/%d)\n", - dev->name, MAC2STR(sta->addr), - srctrl->tx_avg_rate_sum / - srctrl->tx_avg_rate_num, - srctrl->tx_avg_rate_sum, - srctrl->tx_avg_rate_num); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - srctrl->tx_avg_rate_sum = 0; - srctrl->tx_avg_rate_num = 0; - } - } - - sta_info_release(local, sta); -} - - -static struct ieee80211_rate * -rate_control_simple_get_rate(struct net_device *dev, struct sk_buff *skb, - struct rate_control_extra *extra) -{ - struct ieee80211_local *local = dev->priv; - struct ieee80211_sub_if_data *sdata; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - struct sta_info *sta; - int rateidx, nonerp_idx; - u16 fc; - - memset(extra, 0, sizeof(*extra)); - - fc = le16_to_cpu(hdr->frame_control); - if (WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_DATA || - (hdr->addr1[0] & 0x01)) { - /* Send management frames and broadcast/multicast data using - * lowest rate. */ - /* TODO: this could probably be improved.. */ - return rate_control_lowest_rate(local); - } - - sta = sta_info_get(local, hdr->addr1); - - if (!sta) - return rate_control_lowest_rate(local); - - sdata = IEEE80211_DEV_TO_SUB_IF(dev); - if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) - sta->txrate = sdata->bss->force_unicast_rateidx; - - rateidx = sta->txrate; - - if (rateidx >= local->num_curr_rates) - rateidx = local->num_curr_rates - 1; - - sta->last_txrate = rateidx; - nonerp_idx = rateidx; - while (nonerp_idx > 0 && - ((local->curr_rates[nonerp_idx].flags & IEEE80211_RATE_ERP) || - !(local->curr_rates[nonerp_idx].flags & - IEEE80211_RATE_SUPPORTED) || - !(sta->supp_rates & BIT(nonerp_idx)))) - nonerp_idx--; - extra->nonerp_idx = nonerp_idx; - extra->nonerp = &local->curr_rates[extra->nonerp_idx]; - - sta_info_release(local, sta); - - return &local->curr_rates[rateidx]; -} - - -static void rate_control_simple_rate_init(struct ieee80211_local *local, - struct sta_info *sta) -{ - int i; - sta->txrate = 0; - /* TODO: what is a good starting rate for STA? About middle? Maybe not - * the lowest or the highest rate.. Could consider using RSSI from - * previous packets? Need to have IEEE 802.1X auth succeed immediately - * after assoc.. */ - for (i = 0; i < local->num_curr_rates; i++) { - if ((sta->supp_rates & BIT(i)) && - (local->curr_rates[i].flags & IEEE80211_RATE_SUPPORTED)) - sta->txrate = i; - } -} - - -static void * rate_control_simple_alloc(struct ieee80211_local *local) -{ - struct global_rate_control *rctrl; - - rctrl = kmalloc(sizeof(*rctrl), GFP_ATOMIC); - if (rctrl == NULL) { - return NULL; - } - memset(rctrl, 0, sizeof(*rctrl)); - return rctrl; -} - - -static void rate_control_simple_free(void *priv) -{ - struct global_rate_control *rctrl = priv; - kfree(rctrl); -} - - -static void rate_control_simple_clear(void *priv) -{ -} - - -static void * rate_control_simple_alloc_sta(void) -{ - struct sta_rate_control *rctrl; - - rctrl = kmalloc(sizeof(*rctrl), GFP_ATOMIC); - if (rctrl == NULL) { - return NULL; - } - memset(rctrl, 0, sizeof(*rctrl)); - return rctrl; -} - - -static void rate_control_simple_free_sta(void *priv) -{ - struct sta_rate_control *rctrl = priv; - kfree(rctrl); -} - - -static int rate_control_simple_status_sta(struct ieee80211_local *local, - struct sta_info *sta, char *buf) -{ - char *p = buf; - struct sta_rate_control *srctrl = sta->rate_ctrl_priv; - - p += sprintf(p, "tx_avg_rate_sum=%d\n", srctrl->tx_avg_rate_sum); - p += sprintf(p, "tx_avg_rate_num=%d\n", srctrl->tx_avg_rate_num); - if (srctrl->tx_avg_rate_num) - p += sprintf(p, "tx_avg_rate_avg=%d\n", - srctrl->tx_avg_rate_sum / - srctrl->tx_avg_rate_num); - return p - buf; -} - - -static int rate_control_simple_status_global(struct ieee80211_local *local, - char *buf) -{ - return 0; -} - - -static struct rate_control_ops rate_control_simple = { - .name = "simple", - .tx_status = rate_control_simple_tx_status, - .get_rate = rate_control_simple_get_rate, - .rate_init = rate_control_simple_rate_init, - .clear = rate_control_simple_clear, - .status_sta = rate_control_simple_status_sta, - .status_global = rate_control_simple_status_global, - .alloc = rate_control_simple_alloc, - .free = rate_control_simple_free, - .alloc_sta = rate_control_simple_alloc_sta, - .free_sta = rate_control_simple_free_sta, -}; - - -int __init rate_control_simple_init(void) -{ - return ieee80211_rate_control_register(&rate_control_simple); -} - - -static void __exit rate_control_simple_exit(void) -{ - ieee80211_rate_control_unregister(&rate_control_simple); -} - - -module_init(rate_control_simple_init); -module_exit(rate_control_simple_exit); diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/rate_control.h b/openwrt/target/linux/package/ieee80211-dscape/src/rate_control.h deleted file mode 100644 index 9ceea7da57d..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/rate_control.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2002-2005, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef RATE_CONTROL -#define RATE_CONTROL - -#define RATE_CONTROL_NUM_DOWN 20 -#define RATE_CONTROL_NUM_UP 15 - - -struct rate_control_extra { - /* values from rate_control_get_rate() to the caller: */ - struct ieee80211_rate *probe; /* probe with this rate, or NULL for no - * probing */ - int startidx, endidx, rateidx; - struct ieee80211_rate *nonerp; - int nonerp_idx; - - /* parameters from the caller to rate_control_get_rate(): */ - int mgmt_data; /* this is data frame that is used for management - * (e.g., IEEE 802.1X EAPOL) */ - u16 ethertype; -}; - - -struct rate_control_ops { - const char *name; - void (*tx_status)(struct net_device *dev, struct sk_buff *skb, - struct ieee80211_tx_status *status); - struct ieee80211_rate * - (*get_rate)(struct net_device *dev, struct sk_buff *skb, - struct rate_control_extra *extra); - void (*rate_init)(struct ieee80211_local *local, struct sta_info *sta); - void (*clear)(void *priv); - int (*status_sta)(struct ieee80211_local *local, - struct sta_info *sta, char *buf); - int (*status_global)(struct ieee80211_local *local, char *buf); - - void * (*alloc)(struct ieee80211_local *local); - void (*free)(void *priv); - void * (*alloc_sta)(void); - void (*free_sta)(void *priv); -}; - - -int ieee80211_rate_control_register(struct rate_control_ops *ops); -void ieee80211_rate_control_unregister(struct rate_control_ops *ops); - - -static inline void rate_control_tx_status(struct net_device *dev, - struct sk_buff *skb, - struct ieee80211_tx_status *status) -{ - struct ieee80211_local *local = dev->priv; - local->rate_ctrl->tx_status(dev, skb, status); -} - - -static inline struct ieee80211_rate * -rate_control_get_rate(struct net_device *dev, struct sk_buff *skb, - struct rate_control_extra *extra) -{ - struct ieee80211_local *local = dev->priv; - return local->rate_ctrl->get_rate(dev, skb, extra); -} - - -static inline void rate_control_rate_init(struct ieee80211_local *local, - struct sta_info *sta) -{ - local->rate_ctrl->rate_init(local, sta); -} - - -static inline void rate_control_clear(struct ieee80211_local *local) -{ - local->rate_ctrl->clear(local->rate_ctrl_priv); -} - - -static inline int rate_control_status_sta(struct ieee80211_local *local, - struct sta_info *sta, char *buf) -{ - return local->rate_ctrl->status_sta(local, sta, buf); -} - - -static inline int rate_control_status_global(struct ieee80211_local *local, - char *buf) -{ - return local->rate_ctrl->status_global(local, buf); -} - - -static inline void * rate_control_alloc(struct ieee80211_local *local) -{ - return local->rate_ctrl->alloc(local); -} - - -static inline void rate_control_free(struct ieee80211_local *local) -{ - if (local->rate_ctrl == NULL || local->rate_ctrl_priv == NULL) - return; - local->rate_ctrl->free(local->rate_ctrl_priv); - local->rate_ctrl_priv = NULL; -} - - -static inline void * rate_control_alloc_sta(struct ieee80211_local *local) -{ - return local->rate_ctrl->alloc_sta(); -} - - -static inline void rate_control_free_sta(struct ieee80211_local *local, - void *priv) -{ - local->rate_ctrl->free_sta(priv); -} - -#endif /* RATE_CONTROL */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/sta_info.c b/openwrt/target/linux/package/ieee80211-dscape/src/sta_info.c deleted file mode 100644 index 4bb9f74ba04..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/sta_info.c +++ /dev/null @@ -1,417 +0,0 @@ -/* - * Copyright 2002-2005, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/netdevice.h> -#include <linux/types.h> -#include <linux/slab.h> -#include <linux/skbuff.h> -#include <linux/if_arp.h> - -#include <net/ieee80211.h> -#include "ieee80211_i.h" -#include "ieee80211_proc.h" -#include "rate_control.h" - - -/* Caller must hold local->sta_lock */ -static void sta_info_hash_add(struct ieee80211_local *local, - struct sta_info *sta) -{ - sta->hnext = local->sta_hash[STA_HASH(sta->addr)]; - local->sta_hash[STA_HASH(sta->addr)] = sta; -} - - -/* Caller must hold local->sta_lock */ -static void sta_info_hash_del(struct ieee80211_local *local, - struct sta_info *sta) -{ - struct sta_info *s; - - s = local->sta_hash[STA_HASH(sta->addr)]; - if (s == NULL) - return; - if (memcmp(s->addr, sta->addr, ETH_ALEN) == 0) { - local->sta_hash[STA_HASH(sta->addr)] = s->hnext; - return; - } - - while (s->hnext != NULL && - memcmp(s->hnext->addr, sta->addr, ETH_ALEN) != 0) - s = s->hnext; - if (s->hnext != NULL) - s->hnext = s->hnext->hnext; - else - printk(KERN_ERR "%s: could not remove STA " MACSTR " from " - "hash table\n", local->mdev->name, MAC2STR(sta->addr)); -} - - -struct sta_info * sta_info_get(struct ieee80211_local *local, u8 *addr) -{ - struct sta_info *sta; - - spin_lock_bh(&local->sta_lock); - sta = local->sta_hash[STA_HASH(addr)]; - while (sta) { - if (memcmp(sta->addr, addr, ETH_ALEN) == 0) { - atomic_inc(&sta->users); - break; - } - sta = sta->hnext; - } - spin_unlock_bh(&local->sta_lock); - - return sta; -} - - -int sta_info_min_txrate_get(struct ieee80211_local *local) -{ - struct sta_info *sta; - int min_txrate = 9999999; - int i; - - spin_lock_bh(&local->sta_lock); - for (i = 0; i < STA_HASH_SIZE; i++) { - sta = local->sta_hash[i]; - while (sta) { - if (sta->txrate < min_txrate) - min_txrate = sta->txrate; - sta = sta->hnext; - } - } - spin_unlock_bh(&local->sta_lock); - if (min_txrate == 9999999) - min_txrate = 0; - - return min_txrate; -} - - -void sta_info_release(struct ieee80211_local *local, struct sta_info *sta) -{ - struct sk_buff *skb; - - if (!atomic_dec_and_test(&sta->users)) - return; - - /* free sta structure; it has already been removed from - * hash table etc. external structures. Make sure that all - * buffered frames are release (one might have been added - * after sta_info_free() was called). */ - while ((skb = skb_dequeue(&sta->ps_tx_buf)) != NULL) { - local->total_ps_buffered--; - dev_kfree_skb_any(skb); - } - while ((skb = skb_dequeue(&sta->tx_filtered)) != NULL) { - dev_kfree_skb_any(skb); - } - rate_control_free_sta(local, sta->rate_ctrl_priv); - kfree(sta); -} - - -struct sta_info * sta_info_add(struct ieee80211_local *local, - struct net_device *dev, u8 *addr) -{ - struct sta_info *sta; - - sta = kmalloc(sizeof(*sta), GFP_ATOMIC); - if (!sta) - return NULL; - - memset(sta, 0, sizeof(*sta)); - - sta->rate_ctrl_priv = rate_control_alloc_sta(local); - if (sta->rate_ctrl_priv == NULL) { - kfree(sta); - return NULL; - } - - memcpy(sta->addr, addr, ETH_ALEN); - sta->dev = dev; - skb_queue_head_init(&sta->ps_tx_buf); - skb_queue_head_init(&sta->tx_filtered); - atomic_inc(&sta->users); /* sta in hashlist etc, decremented by - * sta_info_free() */ - atomic_inc(&sta->users); /* sta used by caller, decremented by - * sta_info_release() */ - spin_lock_bh(&local->sta_lock); - list_add(&sta->list, &local->sta_list); - local->num_sta++; - sta_info_hash_add(local, sta); - spin_unlock_bh(&local->sta_lock); - if (local->hw->sta_table_notification) - local->hw->sta_table_notification(local->mdev, local->num_sta); - sta->key_idx_compression = HW_KEY_IDX_INVALID; - -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: Added STA " MACSTR "\n", - dev->name, MAC2STR(addr)); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - - if (!in_interrupt()) { - ieee80211_proc_init_sta(local, sta); - } else { - /* procfs entry adding might sleep, so schedule process context - * task for adding proc entry for STAs that do not yet have - * one. */ - schedule_work(&local->sta_proc_add); - } - - return sta; -} - - -void sta_info_free(struct ieee80211_local *local, struct sta_info *sta, - int locked) -{ - struct sk_buff *skb; - struct ieee80211_sub_if_data *sdata; - - if (!locked) - spin_lock_bh(&local->sta_lock); - sta_info_hash_del(local, sta); - list_del(&sta->list); - sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); - if (sta->flags & WLAN_STA_PS) { - sta->flags &= ~WLAN_STA_PS; - if (sdata->bss) - atomic_dec(&sdata->bss->num_sta_ps); - } - local->num_sta--; - sta_info_remove_aid_ptr(sta); - if (!locked) - spin_unlock_bh(&local->sta_lock); - if (local->hw->sta_table_notification) - local->hw->sta_table_notification(local->mdev, local->num_sta); - - while ((skb = skb_dequeue(&sta->ps_tx_buf)) != NULL) { - local->total_ps_buffered--; - dev_kfree_skb_any(skb); - } - while ((skb = skb_dequeue(&sta->tx_filtered)) != NULL) { - dev_kfree_skb_any(skb); - } - - if (sta->key) { - if (local->hw->set_key) { - struct ieee80211_key_conf *key; - key = ieee80211_key_data2conf(local, sta->key); - if (key) { - local->hw->set_key(local->mdev, DISABLE_KEY, - sta->addr, key, sta->aid); - kfree(key); - } - } - kfree(sta->key); - sta->key = NULL; - } else if (sta->key_idx_compression != HW_KEY_IDX_INVALID) { - struct ieee80211_key_conf conf; - memset(&conf, 0, sizeof(conf)); - conf.hw_key_idx = sta->key_idx_compression; - conf.alg = ALG_NULL; - conf.force_sw_encrypt = 1; - local->hw->set_key(local->mdev, DISABLE_KEY, sta->addr, &conf, - sta->aid); - sta->key_idx_compression = HW_KEY_IDX_INVALID; - } - -#ifdef CONFIG_IEEE80211_VERBOSE_DEBUG - printk(KERN_DEBUG "%s: Removed STA " MACSTR "\n", - local->mdev->name, MAC2STR(sta->addr)); -#endif /* CONFIG_IEEE80211_VERBOSE_DEBUG */ - - ieee80211_proc_deinit_sta(local, sta); - - if (atomic_read(&sta->users) != 1) { - /* This is OK, but printed for debugging. The station structure - * will be removed when the other user of the data calls - * sta_info_release(). */ - printk(KERN_DEBUG "%s: STA " MACSTR " users count %d when " - "removing it\n", local->mdev->name, MAC2STR(sta->addr), - atomic_read(&sta->users)); - } - - sta_info_release(local, sta); -} - - -static inline int sta_info_buffer_expired(struct sk_buff *skb) -{ - struct ieee80211_tx_packet_data *pkt_data; - if (!skb) - return 0; - - /* TODO: this could be improved by passing STA listen interval into - * the kernel driver and expiring frames after 2 x listen_interval x - * beacon interval */ - - pkt_data = (struct ieee80211_tx_packet_data *) skb->cb; - - if (pkt_data->magic != IEEE80211_CB_MAGIC) - return 1; - - return time_after(jiffies, pkt_data->jiffies + STA_TX_BUFFER_EXPIRE); -} - - -static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, - struct sta_info *sta) -{ - unsigned long flags; - struct sk_buff *skb; - - if (skb_queue_empty(&sta->ps_tx_buf)) - return; - - for (;;) { - spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); - skb = skb_peek(&sta->ps_tx_buf); - if (sta_info_buffer_expired(skb)) - skb = __skb_dequeue(&sta->ps_tx_buf); - else - skb = NULL; - spin_unlock_irqrestore(&sta->ps_tx_buf.lock, flags); - - if (skb) { - local->total_ps_buffered--; - printk(KERN_DEBUG "Buffered frame expired (STA " - MACSTR ")\n", MAC2STR(sta->addr)); - dev_kfree_skb(skb); - } else - break; - } -} - - -static void sta_info_cleanup(unsigned long data) -{ - struct ieee80211_local *local = (struct ieee80211_local *) data; - struct list_head *ptr; - - spin_lock_bh(&local->sta_lock); - ptr = local->sta_list.next; - while (ptr && ptr != &local->sta_list) { - struct sta_info *sta = (struct sta_info *) ptr; - atomic_inc(&sta->users); - sta_info_cleanup_expire_buffered(local, sta); - sta_info_release(local, sta); - ptr = ptr->next; - } - spin_unlock_bh(&local->sta_lock); - - local->sta_cleanup.expires = jiffies + STA_INFO_CLEANUP_INTERVAL; - add_timer(&local->sta_cleanup); -} - - -static void sta_info_proc_add_task(void *data) -{ - struct ieee80211_local *local = data; - struct list_head *ptr; - struct sta_info *sta; - int max_adds = 100; - - while (max_adds > 0) { - sta = NULL; - spin_lock_bh(&local->sta_lock); - list_for_each(ptr, &local->sta_list) { - sta = list_entry(ptr, struct sta_info, list); - if (!sta->proc_entry_added) { - atomic_inc(&sta->users); - break; - } - sta = NULL; - } - spin_unlock_bh(&local->sta_lock); - - if (!sta) - break; - - ieee80211_proc_init_sta(local, sta); - atomic_dec(&sta->users); - - max_adds--; - } -} - - -void sta_info_init(struct ieee80211_local *local) -{ - spin_lock_init(&local->sta_lock); - INIT_LIST_HEAD(&local->sta_list); - - init_timer(&local->sta_cleanup); - local->sta_cleanup.expires = jiffies + STA_INFO_CLEANUP_INTERVAL; - local->sta_cleanup.data = (unsigned long) local; - local->sta_cleanup.function = sta_info_cleanup; - - INIT_WORK(&local->sta_proc_add, sta_info_proc_add_task, local); -} - -void sta_info_start(struct ieee80211_local *local) -{ - add_timer(&local->sta_cleanup); -} - -void sta_info_stop(struct ieee80211_local *local) -{ - struct list_head *ptr; - - del_timer(&local->sta_cleanup); - - ptr = local->sta_list.next; - while (ptr && ptr != &local->sta_list) { - struct sta_info *sta = (struct sta_info *) ptr; - ptr = ptr->next; - sta_info_free(local, sta, 0); - } -} - - -void sta_info_remove_aid_ptr(struct sta_info *sta) -{ - struct ieee80211_sub_if_data *sdata; - - sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); - if (sta->aid <= 0 || !sdata->bss) - return; - - sdata->bss->sta_aid[sta->aid - 1] = NULL; - if (sta->aid == sdata->bss->max_aid) { - while (sdata->bss->max_aid > 0 && - sdata->bss->sta_aid[sdata->bss->max_aid - 1] == NULL) - sdata->bss->max_aid--; - } -} - - -/** - * sta_info_flush - flush matching STA entries from the STA table - * @local: local interface data - * @dev: matching rule for the net device (sta->dev) or %NULL to match all STAs - */ -void sta_info_flush(struct ieee80211_local *local, struct net_device *dev) -{ - struct list_head *ptr, *n; - - spin_lock_bh(&local->sta_lock); - - list_for_each_safe(ptr, n, &local->sta_list) { - struct sta_info *sta = list_entry(ptr, struct sta_info, list); - if (dev == NULL || dev == sta->dev) - sta_info_free(local, sta, 1); - } - spin_unlock_bh(&local->sta_lock); -} diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/sta_info.h b/openwrt/target/linux/package/ieee80211-dscape/src/sta_info.h deleted file mode 100644 index ef6906d56de..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/sta_info.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2002-2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef STA_INFO_H -#define STA_INFO_H - -/* Stations flags (struct sta_info::flags) */ -#define WLAN_STA_AUTH BIT(0) -#define WLAN_STA_ASSOC BIT(1) -#define WLAN_STA_PS BIT(2) -#define WLAN_STA_TIM BIT(3) /* TIM bit is on for PS stations */ -#define WLAN_STA_PERM BIT(4) /* permanent; do not remove entry on expiration */ -#define WLAN_STA_AUTHORIZED BIT(5) /* If 802.1X is used, this flag is - * controlling whether STA is authorized to - * send and receive non-IEEE 802.1X frames - */ -#define WLAN_STA_SHORT_PREAMBLE BIT(7) -#define WLAN_STA_WME BIT(9) -#define WLAN_STA_XR BIT(26) -#define WLAN_STA_WDS BIT(27) - - -struct sta_info { - struct list_head list; - struct sta_info *hnext; /* next entry in hash table list */ - atomic_t users; /* number of users (do not remove if > 0) */ - - u8 addr[ETH_ALEN]; - u16 aid; /* STA's unique AID (1..2007), 0 = not yet assigned */ - u32 flags; /* WLAN_STA_ */ - - struct sk_buff_head ps_tx_buf; /* buffer of TX frames for station in - * power saving state */ - int pspoll; /* whether STA has send a PS Poll frame */ - struct sk_buff_head tx_filtered; /* buffer of TX frames that were - * already given to low-level driver, - * but were filtered */ - int clear_dst_mask; - - unsigned long rx_packets, tx_packets; /* number of RX/TX MSDUs */ - unsigned long rx_bytes, tx_bytes; - unsigned long tx_retry_failed, tx_retry_count; - unsigned long tx_filtered_count; - - unsigned int wep_weak_iv_count; /* number of RX frames with weak IV */ - - unsigned long last_rx; - u32 supp_rates; /* bitmap of supported rates in local->curr_rates */ - int txrate; /* index in local->curr_rates */ - int last_txrate; /* last rate used to send a frame to this STA */ - int last_nonerp_idx; - - struct net_device *dev; /* which net device is this station associated - * to */ - - struct ieee80211_key *key; - - u32 tx_num_consecutive_failures; - u32 tx_num_mpdu_ok; - u32 tx_num_mpdu_fail; - - void *rate_ctrl_priv; - - /* last received seq/frag number from this STA (per RX queue) */ - u16 last_seq_ctrl[NUM_RX_DATA_QUEUES]; - unsigned long num_duplicates; /* number of duplicate frames received - * from this STA */ - unsigned long tx_fragments; /* number of transmitted MPDUs */ - unsigned long rx_fragments; /* number of received MPDUs */ - unsigned long rx_dropped; /* number of dropped MPDUs from this STA */ - - int last_rssi; /* RSSI of last received frame from this STA */ - int last_ack_rssi[3]; /* RSSI of last received ACKs from this STA */ - unsigned long last_ack; - int channel_use; - int channel_use_raw; - - int antenna_sel; - - - int key_idx_compression; /* key table index for compression and TX - * filtering; used only if sta->key is not - * set */ - - int proc_entry_added:1; - int assoc_ap:1; /* whether this is an AP that we are associated with - * as a client */ - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - u32 wpa_trigger; -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - -#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS - unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES]; - unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES]; -#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ - - int vlan_id; -}; - - -/* Maximum number of concurrently registered stations */ -#define MAX_STA_COUNT 2007 - -/* Maximum number of AIDs to use for STAs; must be 2007 or lower - * (IEEE 802.11 beacon format limitation) */ -#define MAX_AID_TABLE_SIZE 2007 - -#define STA_HASH_SIZE 256 -#define STA_HASH(sta) (sta[5]) - - -/* Maximum number of frames to buffer per power saving station */ -#define STA_MAX_TX_BUFFER 128 - -/* Buffered frame expiry time */ -#define STA_TX_BUFFER_EXPIRE (10 * HZ) - -/* How often station data is cleaned up (e.g., expiration of buffered frames) - */ -#define STA_INFO_CLEANUP_INTERVAL (10 * HZ) - - -struct sta_info * sta_info_get(struct ieee80211_local *local, u8 *addr); -int sta_info_min_txrate_get(struct ieee80211_local *local); -void sta_info_release(struct ieee80211_local *local, struct sta_info *sta); -struct sta_info * sta_info_add(struct ieee80211_local *local, - struct net_device *dev, u8 *addr); -void sta_info_free(struct ieee80211_local *local, struct sta_info *sta, - int locked); -void sta_info_init(struct ieee80211_local *local); -void sta_info_start(struct ieee80211_local *local); -void sta_info_stop(struct ieee80211_local *local); -void sta_info_remove_aid_ptr(struct sta_info *sta); -void sta_info_flush(struct ieee80211_local *local, struct net_device *dev); - -#endif /* STA_INFO_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/tkip.c b/openwrt/target/linux/package/ieee80211-dscape/src/tkip.c deleted file mode 100644 index 41e0b8ea058..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/tkip.c +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright 2002-2004, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifdef CONFIG_TKIP_DEBUG -#include <linux/config.h> -#include <linux/version.h> -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/skbuff.h> -#endif /* CONFIG_TKIP_DEBUG */ - -#include <linux/types.h> -#include <linux/netdevice.h> - -#include <net/ieee80211.h> -#include "ieee80211_key.h" -#ifdef CONFIG_TKIP_DEBUG -#include "ieee80211_i.h" -#endif /* CONFIG_TKIP_DEBUG */ -#include "tkip.h" - -/* Dummy prototypes for structures used in wep.h, but not really needed for - * TKIP. */ -struct ieee80211_local; -struct sk_buff; -#include "wep.h" - - -/* TKIP key mixing functions */ - - -#define PHASE1_LOOP_COUNT 8 - - -/* 2-byte by 2-byte subset of the full AES S-box table; second part of this - * table is identical to first part but byte-swapped */ -static const u16 tkip_sbox[256] = -{ - 0xC6A5, 0xF884, 0xEE99, 0xF68D, 0xFF0D, 0xD6BD, 0xDEB1, 0x9154, - 0x6050, 0x0203, 0xCEA9, 0x567D, 0xE719, 0xB562, 0x4DE6, 0xEC9A, - 0x8F45, 0x1F9D, 0x8940, 0xFA87, 0xEF15, 0xB2EB, 0x8EC9, 0xFB0B, - 0x41EC, 0xB367, 0x5FFD, 0x45EA, 0x23BF, 0x53F7, 0xE496, 0x9B5B, - 0x75C2, 0xE11C, 0x3DAE, 0x4C6A, 0x6C5A, 0x7E41, 0xF502, 0x834F, - 0x685C, 0x51F4, 0xD134, 0xF908, 0xE293, 0xAB73, 0x6253, 0x2A3F, - 0x080C, 0x9552, 0x4665, 0x9D5E, 0x3028, 0x37A1, 0x0A0F, 0x2FB5, - 0x0E09, 0x2436, 0x1B9B, 0xDF3D, 0xCD26, 0x4E69, 0x7FCD, 0xEA9F, - 0x121B, 0x1D9E, 0x5874, 0x342E, 0x362D, 0xDCB2, 0xB4EE, 0x5BFB, - 0xA4F6, 0x764D, 0xB761, 0x7DCE, 0x527B, 0xDD3E, 0x5E71, 0x1397, - 0xA6F5, 0xB968, 0x0000, 0xC12C, 0x4060, 0xE31F, 0x79C8, 0xB6ED, - 0xD4BE, 0x8D46, 0x67D9, 0x724B, 0x94DE, 0x98D4, 0xB0E8, 0x854A, - 0xBB6B, 0xC52A, 0x4FE5, 0xED16, 0x86C5, 0x9AD7, 0x6655, 0x1194, - 0x8ACF, 0xE910, 0x0406, 0xFE81, 0xA0F0, 0x7844, 0x25BA, 0x4BE3, - 0xA2F3, 0x5DFE, 0x80C0, 0x058A, 0x3FAD, 0x21BC, 0x7048, 0xF104, - 0x63DF, 0x77C1, 0xAF75, 0x4263, 0x2030, 0xE51A, 0xFD0E, 0xBF6D, - 0x814C, 0x1814, 0x2635, 0xC32F, 0xBEE1, 0x35A2, 0x88CC, 0x2E39, - 0x9357, 0x55F2, 0xFC82, 0x7A47, 0xC8AC, 0xBAE7, 0x322B, 0xE695, - 0xC0A0, 0x1998, 0x9ED1, 0xA37F, 0x4466, 0x547E, 0x3BAB, 0x0B83, - 0x8CCA, 0xC729, 0x6BD3, 0x283C, 0xA779, 0xBCE2, 0x161D, 0xAD76, - 0xDB3B, 0x6456, 0x744E, 0x141E, 0x92DB, 0x0C0A, 0x486C, 0xB8E4, - 0x9F5D, 0xBD6E, 0x43EF, 0xC4A6, 0x39A8, 0x31A4, 0xD337, 0xF28B, - 0xD532, 0x8B43, 0x6E59, 0xDAB7, 0x018C, 0xB164, 0x9CD2, 0x49E0, - 0xD8B4, 0xACFA, 0xF307, 0xCF25, 0xCAAF, 0xF48E, 0x47E9, 0x1018, - 0x6FD5, 0xF088, 0x4A6F, 0x5C72, 0x3824, 0x57F1, 0x73C7, 0x9751, - 0xCB23, 0xA17C, 0xE89C, 0x3E21, 0x96DD, 0x61DC, 0x0D86, 0x0F85, - 0xE090, 0x7C42, 0x71C4, 0xCCAA, 0x90D8, 0x0605, 0xF701, 0x1C12, - 0xC2A3, 0x6A5F, 0xAEF9, 0x69D0, 0x1791, 0x9958, 0x3A27, 0x27B9, - 0xD938, 0xEB13, 0x2BB3, 0x2233, 0xD2BB, 0xA970, 0x0789, 0x33A7, - 0x2DB6, 0x3C22, 0x1592, 0xC920, 0x8749, 0xAAFF, 0x5078, 0xA57A, - 0x038F, 0x59F8, 0x0980, 0x1A17, 0x65DA, 0xD731, 0x84C6, 0xD0B8, - 0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A, -}; - - -static inline u16 Mk16(u8 x, u8 y) -{ - return ((u16) x << 8) | (u16) y; -} - - -static inline u8 Hi8(u16 v) -{ - return v >> 8; -} - - -static inline u8 Lo8(u16 v) -{ - return v & 0xff; -} - - -static inline u16 Hi16(u32 v) -{ - return v >> 16; -} - - -static inline u16 Lo16(u32 v) -{ - return v & 0xffff; -} - - -static inline u16 RotR1(u16 v) -{ - return (v >> 1) | ((v & 0x0001) << 15); -} - - -static inline u16 tkip_S(u16 val) -{ - u16 a = tkip_sbox[Hi8(val)]; - - return tkip_sbox[Lo8(val)] ^ Hi8(a) ^ (Lo8(a) << 8); -} - - - -/* P1K := Phase1(TA, TK, TSC) - * TA = transmitter address (48 bits) - * TK = dot11DefaultKeyValue or dot11KeyMappingValue (128 bits) - * TSC = TKIP sequence counter (48 bits, only 32 msb bits used) - * P1K: 80 bits - */ -static void tkip_mixing_phase1(const u8 *ta, const u8 *tk, u32 tsc_IV32, - u16 *p1k) -{ - int i, j; - - p1k[0] = Lo16(tsc_IV32); - p1k[1] = Hi16(tsc_IV32); - p1k[2] = Mk16(ta[1], ta[0]); - p1k[3] = Mk16(ta[3], ta[2]); - p1k[4] = Mk16(ta[5], ta[4]); - - for (i = 0; i < PHASE1_LOOP_COUNT; i++) { - j = 2 * (i & 1); - p1k[0] += tkip_S(p1k[4] ^ Mk16(tk[ 1 + j], tk[ 0 + j])); - p1k[1] += tkip_S(p1k[0] ^ Mk16(tk[ 5 + j], tk[ 4 + j])); - p1k[2] += tkip_S(p1k[1] ^ Mk16(tk[ 9 + j], tk[ 8 + j])); - p1k[3] += tkip_S(p1k[2] ^ Mk16(tk[13 + j], tk[12 + j])); - p1k[4] += tkip_S(p1k[3] ^ Mk16(tk[ 1 + j], tk[ 0 + j])) + i; - } -} - - -static void tkip_mixing_phase2(const u16 *p1k, const u8 *tk, u16 tsc_IV16, - u8 *rc4key) -{ - u16 ppk[6]; - int i; - - ppk[0] = p1k[0]; - ppk[1] = p1k[1]; - ppk[2] = p1k[2]; - ppk[3] = p1k[3]; - ppk[4] = p1k[4]; - ppk[5] = p1k[4] + tsc_IV16; - - ppk[0] += tkip_S(ppk[5] ^ Mk16(tk[ 1], tk[ 0])); - ppk[1] += tkip_S(ppk[0] ^ Mk16(tk[ 3], tk[ 2])); - ppk[2] += tkip_S(ppk[1] ^ Mk16(tk[ 5], tk[ 4])); - ppk[3] += tkip_S(ppk[2] ^ Mk16(tk[ 7], tk[ 6])); - ppk[4] += tkip_S(ppk[3] ^ Mk16(tk[ 9], tk[ 8])); - ppk[5] += tkip_S(ppk[4] ^ Mk16(tk[11], tk[10])); - ppk[0] += RotR1(ppk[5] ^ Mk16(tk[13], tk[12])); - ppk[1] += RotR1(ppk[0] ^ Mk16(tk[15], tk[14])); - ppk[2] += RotR1(ppk[1]); - ppk[3] += RotR1(ppk[2]); - ppk[4] += RotR1(ppk[3]); - ppk[5] += RotR1(ppk[4]); - - rc4key[0] = Hi8(tsc_IV16); - rc4key[1] = (Hi8(tsc_IV16) | 0x20) & 0x7f; - rc4key[2] = Lo8(tsc_IV16); - rc4key[3] = Lo8((ppk[5] ^ Mk16(tk[1], tk[0])) >> 1); - - for (i = 0; i < 6; i++) { - rc4key[4 + 2 * i] = Lo8(ppk[i]); - rc4key[5 + 2 * i] = Hi8(ppk[i]); - } -} - - -/* Add TKIP IV and Ext. IV at @pos. @iv0, @iv1, and @iv2 are the first octets - * of the IV. Returns pointer to the octet following IVs (i.e., beginning of - * the packet payload). */ -u8 * ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key, - u8 iv0, u8 iv1, u8 iv2) -{ - *pos++ = iv0; - *pos++ = iv1; - *pos++ = iv2; - *pos++ = (key->keyidx << 6) | (1 << 5) /* Ext IV */; - *pos++ = key->u.tkip.iv32 & 0xff; - *pos++ = (key->u.tkip.iv32 >> 8) & 0xff; - *pos++ = (key->u.tkip.iv32 >> 16) & 0xff; - *pos++ = (key->u.tkip.iv32 >> 24) & 0xff; - return pos; -} - - -/* Encrypt packet payload with TKIP using @key. @pos is a pointer to the - * beginning of the buffer containing payload. This payload must include - * headroom of eight octets for IV and Ext. IV and taildroom of four octets - * for ICV. @payload_len is the length of payload (_not_ including extra - * headroom and tailroom). @ta is the transmitter addresses. */ -void ieee80211_tkip_encrypt_data(struct ieee80211_key *key, u8 *pos, - size_t payload_len, u8 *ta) -{ - u8 rc4key[16]; - - /* Calculate per-packet key */ - if (key->u.tkip.iv16 == 0 || !key->u.tkip.tx_initialized) { - /* IV16 wrapped around - perform TKIP phase 1 */ - tkip_mixing_phase1(ta, &key->key[ALG_TKIP_TEMP_ENCR_KEY], - key->u.tkip.iv32, key->u.tkip.p1k); - key->u.tkip.tx_initialized = 1; - } - - tkip_mixing_phase2(key->u.tkip.p1k, &key->key[ALG_TKIP_TEMP_ENCR_KEY], - key->u.tkip.iv16, rc4key); - - pos = ieee80211_tkip_add_iv(pos, key, rc4key[0], rc4key[1], rc4key[2]); - ieee80211_wep_encrypt_data(rc4key, 16, pos, payload_len); -} - - -/* Decrypt packet payload with TKIP using @key. @pos is a pointer to the - * beginning of the buffer containing IEEE 802.11 header payload, i.e., - * including IV, Ext. IV, real data, Michael MIC, ICV. @payload_len is the - * length of payload, including IV, Ext. IV, MIC, ICV. */ -int ieee80211_tkip_decrypt_data(struct ieee80211_key *key, u8 *payload, - size_t payload_len, u8 *ta, int only_iv, - int queue) -{ - u32 iv32; - u32 iv16; - u8 rc4key[16], keyid, *pos = payload; - int res; - - if (payload_len < 12) - return -1; - - iv16 = (pos[0] << 8) | pos[2]; - keyid = pos[3]; - iv32 = pos[4] | (pos[5] << 8) | (pos[6] << 16) | (pos[7] << 24); - pos += 8; -#ifdef CONFIG_TKIP_DEBUG - { - int i; - printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len); - for (i = 0; i < payload_len; i++) - printk(" %02x", payload[i]); - printk("\n"); - printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n", - iv16, iv32); - } -#endif /* CONFIG_TKIP_DEBUG */ - - if (!(keyid & (1 << 5))) - return TKIP_DECRYPT_NO_EXT_IV; - - if ((keyid >> 6) != key->keyidx) - return TKIP_DECRYPT_INVALID_KEYIDX; - - if (key->u.tkip.rx_initialized[queue] && - (iv32 < key->u.tkip.iv32_rx[queue] || - (iv32 == key->u.tkip.iv32_rx[queue] && - iv16 <= key->u.tkip.iv16_rx[queue]))) { -#ifdef CONFIG_TKIP_DEBUG - printk(KERN_DEBUG "TKIP replay detected for RX frame from " - MACSTR " (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", - MAC2STR(ta), - iv32, iv16, key->u.tkip.iv32_rx[queue], - key->u.tkip.iv16_rx[queue]); -#endif /* CONFIG_TKIP_DEBUG */ - return TKIP_DECRYPT_REPLAY; - } - - if (only_iv) { - res = TKIP_DECRYPT_OK; - goto done; - } - - if (!key->u.tkip.rx_initialized[queue] || - key->u.tkip.iv32_rx[queue] != iv32) { - key->u.tkip.rx_initialized[queue] = 1; - /* IV16 wrapped around - perform TKIP phase 1 */ - tkip_mixing_phase1(ta, &key->key[ALG_TKIP_TEMP_ENCR_KEY], - iv32, key->u.tkip.p1k_rx[queue]); -#ifdef CONFIG_TKIP_DEBUG - { - int i; - printk(KERN_DEBUG "TKIP decrypt: Phase1 TA=" MACSTR - " TK=", MAC2STR(ta)); - for (i = 0; i < 16; i++) - printk("%02x ", - key->key[ALG_TKIP_TEMP_ENCR_KEY + i]); - printk("\n"); - printk(KERN_DEBUG "TKIP decrypt: P1K="); - for (i = 0; i < 5; i++) - printk("%04x ", key->u.tkip.p1k_rx[queue][i]); - printk("\n"); - } -#endif /* CONFIG_TKIP_DEBUG */ - } - - tkip_mixing_phase2(key->u.tkip.p1k_rx[queue], - &key->key[ALG_TKIP_TEMP_ENCR_KEY], - iv16, rc4key); -#ifdef CONFIG_TKIP_DEBUG - { - int i; - printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key="); - for (i = 0; i < 16; i++) - printk("%02x ", rc4key[i]); - printk("\n"); - } -#endif /* CONFIG_TKIP_DEBUG */ - - res = ieee80211_wep_decrypt_data(rc4key, 16, pos, payload_len - 12); - done: - if (res == TKIP_DECRYPT_OK) { - /* FIX: these should be updated only after Michael MIC has been - * verified */ - /* Record previously received IV */ - key->u.tkip.iv32_rx[queue] = iv32; - key->u.tkip.iv16_rx[queue] = iv16; - } - - return res; -} - - diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/tkip.h b/openwrt/target/linux/package/ieee80211-dscape/src/tkip.h deleted file mode 100644 index 6c4ab7f698f..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/tkip.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2002-2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef TKIP_H -#define TKIP_H - -u8 * ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key, - u8 iv0, u8 iv1, u8 iv2); -void ieee80211_tkip_encrypt_data(struct ieee80211_key *key, u8 *pos, - size_t payload_len, u8 *ta); -enum { - TKIP_DECRYPT_OK = 0, - TKIP_DECRYPT_NO_EXT_IV = -1, - TKIP_DECRYPT_INVALID_KEYIDX = -2, - TKIP_DECRYPT_REPLAY = -3, -}; -int ieee80211_tkip_decrypt_data(struct ieee80211_key *key, u8 *payload, - size_t payload_len, u8 *ta, int only_iv, - int queue); - -#endif /* TKIP_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/wep.c b/openwrt/target/linux/package/ieee80211-dscape/src/wep.c deleted file mode 100644 index 57c2f603c0e..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/wep.c +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Software WEP encryption implementation - * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi> - * Copyright 2003, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/netdevice.h> -#include <linux/types.h> -#include <linux/random.h> -#include <linux/compiler.h> - -#include <net/ieee80211.h> -#include "ieee80211_i.h" -#include "wep.h" - - -static const __u32 crc32_table[256] = { - 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, - 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, - 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, - 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, - 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, - 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, - 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, - 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, - 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, - 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, - 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, - 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, - 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, - 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, - 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, - 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, - 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, - 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, - 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, - 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, - 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, - 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, - 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, - 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, - 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, - 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, - 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, - 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, - 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, - 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, - 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, - 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, - 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, - 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, - 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, - 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, - 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, - 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, - 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, - 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, - 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, - 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, - 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, - 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, - 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, - 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, - 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, - 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, - 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, - 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, - 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, - 0x2d02ef8dL -}; - - -void ieee80211_wep_init(struct ieee80211_local *local) -{ - /* start WEP IV from a random value */ - get_random_bytes(&local->wep_iv, WEP_IV_LEN); -} - - -static inline int ieee80211_wep_weak_iv(u32 iv, int keylen) -{ - /* Fluhrer, Mantin, and Shamir have reported weaknesses in the - * key scheduling algorithm of RC4. At least IVs (KeyByte + 3, - * 0xff, N) can be used to speedup attacks, so avoid using them. */ - if ((iv & 0xff00) == 0xff00) { - u8 B = (iv >> 16) & 0xff; - if (B >= 3 && B < 3 + keylen) - return 1; - } - return 0; -} - - -void ieee80211_wep_get_iv(struct ieee80211_local *local, - struct ieee80211_key *key, u8 *iv) -{ - local->wep_iv++; - if (ieee80211_wep_weak_iv(local->wep_iv, key->keylen)) - local->wep_iv += 0x0100; - - if (iv == NULL) - return; - - *iv++ = (local->wep_iv >> 16) & 0xff; - *iv++ = (local->wep_iv >> 8) & 0xff; - *iv++ = local->wep_iv & 0xff; - *iv++ = key->keyidx << 6; -} - - -u8 * ieee80211_wep_add_iv(struct ieee80211_local *local, - struct sk_buff *skb, - struct ieee80211_key *key) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u16 fc; - int hdrlen; - u8 *newhdr; - - fc = le16_to_cpu(hdr->frame_control); - fc |= WLAN_FC_ISWEP; - hdr->frame_control = cpu_to_le16(fc); - - if ((skb_headroom(skb) < WEP_IV_LEN || - skb_tailroom(skb) < WEP_ICV_LEN)) { - I802_DEBUG_INC(local->tx_expand_skb_head); - if (unlikely(pskb_expand_head(skb, WEP_IV_LEN, WEP_ICV_LEN, - GFP_ATOMIC))) - return NULL; - } - - hdrlen = ieee80211_get_hdrlen(fc); - newhdr = skb_push(skb, WEP_IV_LEN); - memmove(newhdr, newhdr + WEP_IV_LEN, hdrlen); - ieee80211_wep_get_iv(local, key, newhdr + hdrlen); - return newhdr + hdrlen; -} - - -void ieee80211_wep_remove_iv(struct ieee80211_local *local, - struct sk_buff *skb, - struct ieee80211_key *key) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u16 fc; - int hdrlen; - - fc = le16_to_cpu(hdr->frame_control); - hdrlen = ieee80211_get_hdrlen(fc); - memmove(skb->data + WEP_IV_LEN, skb->data, hdrlen); - skb_pull(skb, WEP_IV_LEN); -} - - -/* Perform WEP encryption using given key. data buffer must have tailroom - * for 4-byte ICV. data_len must not include this ICV. Note: this function - * does _not_ add IV. data = RC4(data | CRC32(data)) */ -void ieee80211_wep_encrypt_data(u8 *rc4key, size_t klen, u8 *data, - size_t data_len) -{ - u32 i, j, k, crc; - u8 S[256]; - u8 kpos, *pos; -#define S_SWAP(a,b) do { u8 t = S[a]; S[a] = S[b]; S[b] = t; } while(0) - - /* Setup RC4 state */ - for (i = 0; i < 256; i++) - S[i] = i; - j = 0; - kpos = 0; - for (i = 0; i < 256; i++) { - j = (j + S[i] + rc4key[kpos]) & 0xff; - kpos++; - if (kpos >= klen) - kpos = 0; - S_SWAP(i, j); - } - - /* Compute CRC32 over unencrypted data and apply RC4 to data */ - pos = data; - crc = ~0; - i = j = 0; - for (k = 0; k < data_len; k++) { - crc = crc32_table[(crc ^ *pos) & 0xff] ^ (crc >> 8); - i = (i + 1) & 0xff; - j = (j + S[i]) & 0xff; - S_SWAP(i, j); - *pos++ ^= S[(S[i] + S[j]) & 0xff]; - } - crc = ~crc; - - /* Append little-endian CRC32 and encrypt it to produce ICV */ - pos[0] = crc; - pos[1] = crc >> 8; - pos[2] = crc >> 16; - pos[3] = crc >> 24; - for (k = 0; k < 4; k++) { - i = (i + 1) & 0xff; - j = (j + S[i]) & 0xff; - S_SWAP(i, j); - *pos++ ^= S[(S[i] + S[j]) & 0xff]; - } -} - - -/* Perform WEP encryption on given skb. 4 bytes of extra space (IV) in the - * beginning of the buffer 4 bytes of extra space (ICV) in the end of the - * buffer will be added. Both IV and ICV will be transmitted, so the - * payload length increases with 8 bytes. - * - * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data)) - */ -int ieee80211_wep_encrypt(struct ieee80211_local *local, struct sk_buff *skb, - struct ieee80211_key *key) -{ - u32 klen; - u8 *rc4key, *iv; - size_t len; - - if (key == NULL || key->alg != ALG_WEP) - return -1; - - klen = 3 + key->keylen; - rc4key = kmalloc(klen, GFP_ATOMIC); - if (rc4key == NULL) - return -1; - - iv = ieee80211_wep_add_iv(local, skb, key); - if (iv == NULL) { - kfree(rc4key); - return -1; - } - - len = skb->len - (iv + WEP_IV_LEN - skb->data); - - /* Prepend 24-bit IV to RC4 key */ - memcpy(rc4key, iv, 3); - - /* Copy rest of the WEP key (the secret part) */ - memcpy(rc4key + 3, key->key, key->keylen); - - /* Add room for ICV */ - skb_put(skb, WEP_ICV_LEN); - - ieee80211_wep_encrypt_data(rc4key, klen, iv + WEP_IV_LEN, len); - - kfree(rc4key); - - return 0; -} - - -/* Perform WEP decryption using given key. data buffer includes encrypted - * payload, including 4-byte ICV, but _not_ IV. data_len must not include ICV. - * Return 0 on success and -1 on ICV mismatch. */ -int ieee80211_wep_decrypt_data(u8 *rc4key, size_t klen, u8 *data, - size_t data_len) -{ - u32 i, j, k, crc; - u8 S[256]; - u8 kpos, *pos, crcbuf[WEP_ICV_LEN], *cpos; - - /* Setup RC4 state */ - for (i = 0; i < 256; i++) - S[i] = i; - j = 0; - kpos = 0; - for (i = 0; i < 256; i++) { - j = (j + S[i] + rc4key[kpos]) & 0xff; - kpos++; - if (kpos >= klen) - kpos = 0; - S_SWAP(i, j); - } - - /* Apply RC4 to data and compute CRC32 over decrypted data */ - pos = data; - crc = ~0; - i = j = 0; - for (k = 0; k < data_len; k++) { - i = (i + 1) & 0xff; - j = (j + S[i]) & 0xff; - S_SWAP(i, j); - *pos ^= S[(S[i] + S[j]) & 0xff]; - crc = crc32_table[(crc ^ *pos++) & 0xff] ^ (crc >> 8); - } - crc = ~crc; - - /* Decrypt little-endian CRC32 and verify that it matches with the - * received ICV */ - cpos = crcbuf; - crcbuf[0] = crc; - crcbuf[1] = crc >> 8; - crcbuf[2] = crc >> 16; - crcbuf[3] = crc >> 24; - for (k = 0; k < WEP_ICV_LEN; k++) { - i = (i + 1) & 0xff; - j = (j + S[i]) & 0xff; - S_SWAP(i, j); - if (*cpos++ != (*pos++ ^ S[(S[i] + S[j]) & 0xff])) { - /* ICV mismatch */ - return -1; - } - } - - return 0; -} - - -/* Perform WEP decryption on given skb. Buffer includes whole WEP part of - * the frame: IV (4 bytes), encrypted payload (including SNAP header), - * ICV (4 bytes). skb->len includes both IV and ICV. - * - * Returns 0 if frame was decrypted successfully and ICV was correct and -1 on - * failure. If frame is OK, IV and ICV will be removed, i.e., decrypted payload - * is moved to the beginning of the skb and skb length will be reduced. - */ -int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb, - struct ieee80211_key *key) -{ - u32 klen; - u8 *rc4key; - u8 keyidx; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u16 fc; - int hdrlen; - size_t len; - int ret = 0; - - fc = le16_to_cpu(hdr->frame_control); - if (!(fc & WLAN_FC_ISWEP)) - return -1; - - hdrlen = ieee80211_get_hdrlen(fc); - - if (skb->len < 8 + hdrlen) - return -1; - - len = skb->len - hdrlen - 8; - - keyidx = skb->data[hdrlen + 3] >> 6; - - if (key == NULL || keyidx != key->keyidx || key->alg != ALG_WEP) - return -1; - - klen = 3 + key->keylen; - - rc4key = kmalloc(klen, GFP_ATOMIC); - if (rc4key == NULL) - return -1; - - /* Prepend 24-bit IV to RC4 key */ - memcpy(rc4key, skb->data + hdrlen, 3); - - /* Copy rest of the WEP key (the secret part) */ - memcpy(rc4key + 3, key->key, key->keylen); - - if (ieee80211_wep_decrypt_data(rc4key, klen, - skb->data + hdrlen + WEP_IV_LEN, - len)) { - printk(KERN_DEBUG "WEP decrypt failed (ICV)\n"); - ret = -1; - } - - kfree(rc4key); - - /* Trim ICV */ - skb_trim(skb, skb->len - WEP_ICV_LEN); - - /* Remove IV */ - memmove(skb->data + WEP_IV_LEN, skb->data, hdrlen); - skb_pull(skb, WEP_IV_LEN); - - return ret; -} - - -int ieee80211_wep_get_keyidx(struct sk_buff *skb) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u16 fc; - int hdrlen; - - fc = le16_to_cpu(hdr->frame_control); - if (!(fc & WLAN_FC_ISWEP)) - return -1; - - hdrlen = ieee80211_get_hdrlen(fc); - - if (skb->len < 8 + hdrlen) - return -1; - - return skb->data[hdrlen + 3] >> 6; -} - - -u8 * ieee80211_wep_is_weak_iv(struct sk_buff *skb, struct ieee80211_key *key) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - u16 fc; - int hdrlen; - u8 *ivpos; - u32 iv; - - fc = le16_to_cpu(hdr->frame_control); - if (!(fc & WLAN_FC_ISWEP)) - return NULL; - - hdrlen = ieee80211_get_hdrlen(fc); - ivpos = skb->data + hdrlen; - iv = (ivpos[0] << 16) | (ivpos[1] << 8) | ivpos[2]; - - if (ieee80211_wep_weak_iv(iv, key->keylen)) - return ivpos; - - return NULL; -} diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/wep.h b/openwrt/target/linux/package/ieee80211-dscape/src/wep.h deleted file mode 100644 index 6f693945af7..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/wep.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Software WEP encryption implementation - * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi> - * Copyright 2003, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef WEP_H -#define WEP_H - -void ieee80211_wep_init(struct ieee80211_local *local); -void ieee80211_wep_get_iv(struct ieee80211_local *local, - struct ieee80211_key *key, u8 *iv); -u8 * ieee80211_wep_add_iv(struct ieee80211_local *local, - struct sk_buff *skb, - struct ieee80211_key *key); -void ieee80211_wep_remove_iv(struct ieee80211_local *local, - struct sk_buff *skb, - struct ieee80211_key *key); -void ieee80211_wep_encrypt_data(u8 *rc4key, size_t klen, u8 *data, - size_t data_len); -int ieee80211_wep_decrypt_data(u8 *rc4key, size_t klen, u8 *data, - size_t data_len); -int ieee80211_wep_encrypt(struct ieee80211_local *local, struct sk_buff *skb, - struct ieee80211_key *key); -int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb, - struct ieee80211_key *key); -int ieee80211_wep_get_keyidx(struct sk_buff *skb); -u8 * ieee80211_wep_is_weak_iv(struct sk_buff *skb, struct ieee80211_key *key); - -#endif /* WEP_H */ diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/wme.c b/openwrt/target/linux/package/ieee80211-dscape/src/wme.c deleted file mode 100644 index b3fdd59e5a2..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/wme.c +++ /dev/null @@ -1,700 +0,0 @@ -/* - * Copyright 2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/netdevice.h> -#include <linux/skbuff.h> -#include <linux/module.h> -#include <net/ip.h> - -#include <net/ieee80211.h> -#include "ieee80211_i.h" -#include "wme.h" - -#define CHILD_QDISC_OPS pfifo_qdisc_ops - -static inline int WLAN_FC_IS_QOS_DATA(u16 fc) -{ - return (fc & 0x8C) == 0x88; -} - - -ieee80211_txrx_result -ieee80211_rx_h_parse_qos(struct ieee80211_txrx_data *rx) -{ - u8 *data = rx->skb->data; - int tid; - - /* does the frame have a qos control field? */ - if (WLAN_FC_IS_QOS_DATA(rx->fc)) { - u8 *qc = data + ieee80211_get_hdrlen(rx->fc) - QOS_CONTROL_LEN; - /* frame has qos control */ - tid = qc[0] & QOS_CONTROL_TID_MASK; - } else { - if (unlikely(WLAN_FC_GET_TYPE(rx->fc) == WLAN_FC_TYPE_MGMT)) { - /* Separate TID for management frames */ - tid = NUM_RX_DATA_QUEUES - 1; - } else { - /* no qos control present */ - tid = 0; /* 802.1d - Best Effort */ - } - } -#ifdef CONFIG_IEEE80211_DEBUG_COUNTERS - I802_DEBUG_INC(rx->local->wme_rx_queue[tid]); - if (rx->sta) { - I802_DEBUG_INC(rx->sta->wme_rx_queue[tid]); - } -#endif /* CONFIG_IEEE80211_DEBUG_COUNTERS */ - - rx->u.rx.queue = tid; - /* Set skb->priority to 1d tag if highest order bit of TID is not set. - * For now, set skb->priority to 0 for other cases. */ - rx->skb->priority = (tid > 7) ? 0 : tid; - - return TXRX_CONTINUE; -} - - -ieee80211_txrx_result -ieee80211_rx_h_remove_qos_control(struct ieee80211_txrx_data *rx) -{ - u16 fc = rx->fc; - u8 *data = rx->skb->data; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) data; - - if (!WLAN_FC_IS_QOS_DATA(fc)) - return TXRX_CONTINUE; - - /* remove the qos control field, update frame type and meta-data */ - memmove(data + 2, data, ieee80211_get_hdrlen(fc) - 2); - hdr = (struct ieee80211_hdr *) skb_pull(rx->skb, 2); - /* change frame type to non QOS */ - rx->fc = fc &= ~(WLAN_FC_STYPE_QOS_DATA << 4); - hdr->frame_control = cpu_to_le16(fc); - - return TXRX_CONTINUE; -} - - -/* maximum number of hardware queues we support. */ -#define TC_80211_MAX_QUEUES 8 - -struct ieee80211_sched_data -{ - struct tcf_proto *filter_list; - struct Qdisc *queues[TC_80211_MAX_QUEUES]; - struct sk_buff_head requeued[TC_80211_MAX_QUEUES]; -}; - - -/* given a data frame determine the 802.1p/1d tag to use */ -static inline unsigned classify_1d(struct sk_buff *skb, struct Qdisc *qd) -{ - struct iphdr *ip; - int dscp; - int offset; - -#ifdef CONFIG_NET_SCHED - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct tcf_result res = { -1, 0 }; - - /* if there is a user set filter list, call out to that */ - if (q->filter_list) { - tc_classify(skb, q->filter_list, &res); - if (res.class != -1) - return res.class; - } -#endif /* CONFIG_NET_SCHED */ - - /* skb->priority values from 256->263 are magic values to - * directly indicate a specific 802.1d priority. - * This is used to allow 802.1d priority to be passed directly in - * from VLAN tags, etc. */ - if (skb->priority >= 256 && skb->priority <= 263) - return skb->priority - 256; - - /* check there is a valid IP header present */ - offset = ieee80211_get_hdrlen_from_skb(skb) + 8 /* LLC + proto */; - if (skb->protocol != __constant_htons(ETH_P_IP) || - skb->len < offset + sizeof(*ip)) - return 0; - - ip = (struct iphdr *) (skb->data + offset); - - dscp = ip->tos & 0xfc; - switch (dscp) { - case 0x20: - return 2; - case 0x40: - return 1; - case 0x60: - return 3; - case 0x80: - return 4; - case 0xa0: - return 5; - case 0xc0: - return 6; - case 0xe0: - return 7; - default: - return 0; - } -} - - - - -static inline int wme_downgrade_ac(struct sk_buff *skb) -{ - switch (skb->priority) { - case 6: - case 7: - skb->priority = 5; /* VO -> VI */ - return 0; - case 4: - case 5: - skb->priority = 3; /* VI -> BE */ - return 0; - case 0: - case 3: - skb->priority = 2; /* BE -> BK */ - return 0; - default: - return -1; - } -} - - -/* positive return value indicates which queue to use - * negative return value indicates to drop the frame */ -static inline int classify80211(struct sk_buff *skb, struct Qdisc *qd) -{ - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_tx_packet_data *pkt_data = - (struct ieee80211_tx_packet_data *) skb->cb; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - unsigned short fc = le16_to_cpu(hdr->frame_control); - int qos; - const int ieee802_1d_to_ac[8] = { 2, 3, 3, 2, 1, 1, 0, 0 }; - - if (unlikely(pkt_data->magic != IEEE80211_CB_MAGIC)) - return -1; - - /* see if frame is data or non data frame */ - if (unlikely(WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_DATA)) { - /* management frames go on AC_VO queue, but are sent - * without QoS control fields */ - return IEEE80211_TX_QUEUE_DATA0; - } - - if (unlikely(pkt_data->sdata->type == IEEE80211_SUB_IF_TYPE_MGMT)) { - /* Data frames from hostapd (mainly, EAPOL) use AC_VO - * and they will include QoS control fields if - * the target STA is using WME. */ - skb->priority = 7; - return ieee802_1d_to_ac[skb->priority]; - } - - - /* is this a QoS frame? */ - qos = fc & (WLAN_FC_STYPE_QOS_DATA << 4); - - - if (!qos) { - skb->priority = 0; /* required for correct WPA/11i MIC */ - return ieee802_1d_to_ac[skb->priority]; - } - - /* use the data classifier to determine what 802.1d tag the - * data frame has */ - skb->priority = classify_1d(skb, qd); - - - /* incase we are a client verify acm is not set for this ac */ - for (; unlikely(local->wmm_acm & BIT(skb->priority)); ) - { - if (wme_downgrade_ac(skb)) { - /* No AC with lower priority has acm=0, - * drop packet. */ - return -1; - } - } - - /* look up which queue to use for frames with this 1d tag */ - return ieee802_1d_to_ac[skb->priority]; -} - - -static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd) -{ - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct ieee80211_tx_packet_data *pkt_data = - (struct ieee80211_tx_packet_data *) skb->cb; - struct ieee80211_tx_control *control = &pkt_data->control; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - unsigned short fc = le16_to_cpu(hdr->frame_control); - struct Qdisc *qdisc; - int err, queue; - - if (control->requeue) { - skb_queue_tail(&q->requeued[control->queue], skb); - return 0; - } - - queue = classify80211(skb, qd); - - /* now we know the 1d priority, fill in the QoS header if there is one */ - if (WLAN_FC_IS_QOS_DATA(fc)) { - struct qos_control *qc = (struct qos_control *) (skb->data + ieee80211_get_hdrlen(fc) - 2); - u8 *p = (u8 *) qc; - *p++ = 0; /* do this due to gcc's lack of optimization on bitfield ops */ - *p = 0; - qc->tag1d = skb->priority; - if (local->wifi_wme_noack_test) - qc->ack_policy = 1; - } - - if (unlikely(queue >= local->hw->queues)) { -#if 0 - if (net_ratelimit()) { - printk(KERN_DEBUG "%s - queue=%d (hw does not " - "support) -> %d\n", - __func__, queue, local->hw->queues - 1); - } -#endif - queue = local->hw->queues - 1; - } - - if (unlikely(queue < 0)) { - kfree_skb(skb); - err = NET_XMIT_DROP; - } else { - control->queue = (unsigned int) queue; - qdisc = q->queues[queue]; - err = qdisc->enqueue(skb, qdisc); - if (err == NET_XMIT_SUCCESS) { - qd->q.qlen++; - qd->bstats.bytes += skb->len; - qd->bstats.packets++; - return NET_XMIT_SUCCESS; - } - } - qd->qstats.drops++; - return err; -} - - -/* TODO: clean up the cases where master_hard_start_xmit - * returns non 0 - it shouldn't ever do that. Once done we - * can remove this function */ -static int wme_qdiscop_requeue(struct sk_buff *skb, struct Qdisc* qd) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct ieee80211_tx_packet_data *pkt_data = - (struct ieee80211_tx_packet_data *) skb->cb; - struct Qdisc *qdisc; - int err; - - /* we recorded which queue to use earlier! */ - qdisc = q->queues[pkt_data->control.queue]; - - if ((err = qdisc->ops->requeue(skb, qdisc)) == 0) { - qd->q.qlen++; - return 0; - } - qd->qstats.drops++; - return err; -} - - -static struct sk_buff *wme_qdiscop_dequeue(struct Qdisc* qd) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct net_device *dev = qd->dev; - struct ieee80211_local *local = dev->priv; - struct ieee80211_hw *hw = local->hw; - struct ieee80211_tx_queue_stats stats; - struct sk_buff *skb; - struct Qdisc *qdisc; - int queue; - - /* find which hardware queues have space in them */ - hw->get_tx_stats(dev, &stats); - - /* check all the h/w queues in numeric/priority order */ - for (queue = 0; queue < hw->queues; queue++) { - /* see if there is room in this hardware queue */ - if (stats.data[queue].len >= stats.data[queue].limit) - continue; - - /* there is space - try and get a frame */ - skb = skb_dequeue(&q->requeued[queue]); - if (skb) - return skb; - - qdisc = q->queues[queue]; - skb = qdisc->dequeue(qdisc); - if (skb) { - qd->q.qlen--; - return skb; - } - } - /* returning a NULL here when all the h/w queues are full means we - * never need to call netif_stop_queue in the driver */ - return NULL; -} - - -static void wme_qdiscop_reset(struct Qdisc* qd) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - int queue; - - /* QUESTION: should we have some hardware flush functionality here? */ - - for (queue = 0; queue < hw->queues; queue++) { - skb_queue_purge(&q->requeued[queue]); - qdisc_reset(q->queues[queue]); - } - qd->q.qlen = 0; -} - - -static void wme_qdiscop_destroy(struct Qdisc* qd) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - struct tcf_proto *tp; - int queue; - - while ((tp = q->filter_list) != NULL) { - q->filter_list = tp->next; - tp->ops->destroy(tp); - } - - for (queue=0; queue < hw->queues; queue++) { - skb_queue_purge(&q->requeued[queue]); - qdisc_destroy(q->queues[queue]); - q->queues[queue] = &noop_qdisc; - } -} - - -/* called whenever parameters are updated on existing qdisc */ -static int wme_qdiscop_tune(struct Qdisc *qd, struct rtattr *opt) -{ -/* struct ieee80211_sched_data *q = qdisc_priv(qd); -*/ - /* check our options block is the right size */ - /* copy any options to our local structure */ -/* Ignore options block for now - always use static mapping - struct tc_ieee80211_qopt *qopt = RTA_DATA(opt); - - if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) - return -EINVAL; - memcpy(q->tag2queue, qopt->tag2queue, sizeof(qopt->tag2queue)); -*/ - return 0; -} - - -/* called during initial creation of qdisc on device */ -static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct net_device *dev = qd->dev; - struct ieee80211_local *local = dev->priv; - int queues = local->hw->queues; - int err = 0, i; - - /* check this device is an ieee80211 master type device */ - if (dev->type != ARPHRD_IEEE80211) - return -EINVAL; - - /* check that there is no qdisc currently attached to device - * this ensures that we will be the root qdisc. (I can't find a better - * way to test this explicitly) */ - if (dev->qdisc_sleeping != &noop_qdisc) - return -EINVAL; - - if (qd->flags & TCQ_F_INGRESS) - return -EINVAL; - - /* if options were passed in, set them */ - if (opt) { - err = wme_qdiscop_tune(qd, opt); - } - - /* create child queues */ - for (i = 0; i < queues; i++) { - skb_queue_head_init(&q->requeued[i]); - q->queues[i] = qdisc_create_dflt(qd->dev, &CHILD_QDISC_OPS); - if (q->queues[i] == 0) { - q->queues[i] = &noop_qdisc; - printk(KERN_ERR "%s child qdisc %i creation failed", dev->name, i); - } - } - - return err; -} - -static int wme_qdiscop_dump(struct Qdisc *qd, struct sk_buff *skb) -{ -/* struct ieee80211_sched_data *q = qdisc_priv(qd); - unsigned char *p = skb->tail; - struct tc_ieee80211_qopt opt; - - memcpy(&opt.tag2queue, q->tag2queue, TC_80211_MAX_TAG + 1); - RTA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); -*/ return skb->len; -/* -rtattr_failure: - skb_trim(skb, p - skb->data);*/ - return -1; -} - - -static int wme_classop_graft(struct Qdisc *qd, unsigned long arg, - struct Qdisc *new, struct Qdisc **old) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - unsigned long queue = arg - 1; - - if (queue >= hw->queues) - return -EINVAL; - - if (new == NULL) - new = &noop_qdisc; - - sch_tree_lock(qd); - *old = q->queues[queue]; - q->queues[queue] = new; - qdisc_reset(*old); - sch_tree_unlock(qd); - - return 0; -} - - -static struct Qdisc * -wme_classop_leaf(struct Qdisc *qd, unsigned long arg) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - unsigned long queue = arg - 1; - - if (queue >= hw->queues) - return NULL; - - return q->queues[queue]; -} - - -static unsigned long wme_classop_get(struct Qdisc *qd, u32 classid) -{ - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - unsigned long queue = TC_H_MIN(classid); - - if (queue - 1 >= hw->queues) - return 0; - - return queue; -} - - -static unsigned long wme_classop_bind(struct Qdisc *qd, unsigned long parent, - u32 classid) -{ - return wme_classop_get(qd, classid); -} - - -static void wme_classop_put(struct Qdisc *q, unsigned long cl) -{ - /* printk(KERN_DEBUG "entering %s\n", __func__); */ -} - - -static int wme_classop_change(struct Qdisc *qd, u32 handle, u32 parent, - struct rtattr **tca, unsigned long *arg) -{ - unsigned long cl = *arg; - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - /* printk(KERN_DEBUG "entering %s\n", __func__); */ - - if (cl - 1 > hw->queues) - return -ENOENT; - - /* TODO: put code to program hardware queue parameters here, - * to allow programming from tc command line */ - - return 0; -} - - -/* we don't support deleting hardware queues - * when we add WMM-SA support - TSPECs may be deleted here */ -static int wme_classop_delete(struct Qdisc *qd, unsigned long cl) -{ - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - /* printk(KERN_DEBUG "entering %s\n", __func__); */ - - if (cl - 1 > hw->queues) - return -ENOENT; - return 0; -} - - -static int wme_classop_dump_class(struct Qdisc *qd, unsigned long cl, - struct sk_buff *skb, struct tcmsg *tcm) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - /* printk(KERN_DEBUG "entering %s\n", __func__); */ - - if (cl - 1 > hw->queues) - return -ENOENT; - tcm->tcm_handle = TC_H_MIN(cl); - tcm->tcm_parent = qd->handle; - tcm->tcm_info = q->queues[cl-1]->handle; /* do we need this? */ - return 0; -} - - -static void wme_classop_walk(struct Qdisc *qd, struct qdisc_walker *arg) -{ - struct ieee80211_local *local = qd->dev->priv; - struct ieee80211_hw *hw = local->hw; - int queue; - /* printk(KERN_DEBUG "entering %s\n", __func__); */ - - if (arg->stop) - return; - - for (queue = 0; queue < hw->queues; queue++) { - if (arg->count < arg->skip) { - arg->count++; - continue; - } - /* we should return classids for our internal queues here - * as well as the external ones */ - if (arg->fn(qd, queue+1, arg) < 0) { - arg->stop = 1; - break; - } - arg->count++; - } -} - - -static struct tcf_proto ** wme_classop_find_tcf(struct Qdisc *qd, - unsigned long cl) -{ - struct ieee80211_sched_data *q = qdisc_priv(qd); - /* printk("entering %s\n", __func__); */ - - if (cl) - return NULL; - - return &q->filter_list; -} - - -/* this qdisc is classful (i.e. has classes, some of which may have leaf qdiscs attached) - * - these are the operations on the classes */ -static struct Qdisc_class_ops class_ops = -{ - .graft = wme_classop_graft, - .leaf = wme_classop_leaf, - - .get = wme_classop_get, - .put = wme_classop_put, - .change = wme_classop_change, - .delete = wme_classop_delete, - .walk = wme_classop_walk, - - .tcf_chain = wme_classop_find_tcf, - .bind_tcf = wme_classop_bind, - .unbind_tcf = wme_classop_put, - - .dump = wme_classop_dump_class, -}; - - -/* queueing discipline operations */ -static struct Qdisc_ops wme_qdisc_ops = -{ - .next = NULL, - .cl_ops = &class_ops, - .id = "ieee80211", - .priv_size = sizeof(struct ieee80211_sched_data), - - .enqueue = wme_qdiscop_enqueue, - .dequeue = wme_qdiscop_dequeue, - .requeue = wme_qdiscop_requeue, - .drop = NULL, /* drop not needed since we are always the root qdisc */ - - .init = wme_qdiscop_init, - .reset = wme_qdiscop_reset, - .destroy = wme_qdiscop_destroy, - .change = wme_qdiscop_tune, - - .dump = wme_qdiscop_dump, -}; - - -void ieee80211_install_qdisc(struct net_device *dev) -{ - struct Qdisc *qdisc; - - qdisc = qdisc_create_dflt(dev, &wme_qdisc_ops); - if (qdisc == NULL) { - printk(KERN_ERR "%s: qdisc installation failed\n", dev->name); - return; - } - - /* same handle as would be allocated by qdisc_alloc_handle() */ - qdisc->handle = 0x80010000; - - write_lock(&qdisc_tree_lock); - list_add_tail(&qdisc->list, &dev->qdisc_list); - dev->qdisc_sleeping = qdisc; - write_unlock(&qdisc_tree_lock); -} - - -int ieee80211_wme_register(void) -{ - int err = 0; - -#ifdef CONFIG_NET_SCHED - err = register_qdisc(&wme_qdisc_ops); -#endif - return err; -} - - -void ieee80211_wme_unregister(void) -{ -#ifdef CONFIG_NET_SCHED - unregister_qdisc(&wme_qdisc_ops); -#endif -} diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/wme.h b/openwrt/target/linux/package/ieee80211-dscape/src/wme.h deleted file mode 100644 index 9b27947807e..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/wme.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * IEEE 802.11 driver (80211.o) - QoS datatypes - * Copyright 2004, Instant802 Networks, Inc. - * Copyright 2005, Devicescape Software, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <asm/byteorder.h> -#include <net/pkt_sched.h> - -#define QOS_CONTROL_LEN 2 - -#define QOS_CONTROL_ACK_POLICY_NORMAL 0 -#define QOS_CONTROL_ACK_POLICY_NOACK 1 - -#define QOS_CONTROL_TID_MASK 0x0f -#define QOS_CONTROL_ACK_POLICY_SHIFT 5 - -/* This bit field structure should not be used; it can cause compiler to - * generate unaligned accesses and inefficient code. */ -struct qos_control { -#if defined(__LITTLE_ENDIAN_BITFIELD) - u8 tag1d:3, /* bits 0-2 */ - reserved1:1, - eosp:1, - ack_policy:2, - reserved2:1; -#elif defined (__BIG_ENDIAN_BITFIELD) - u8 reserved2:1, - ack_policy:2, - eosp:1, - reserved1:1, - tag1d:3; /* bits 0-2 */ -#else -#error "Please fix <asm/byteorder.h>" -#endif - u8 reserved; -} __attribute__ ((packed)); - -ieee80211_txrx_result -ieee80211_rx_h_parse_qos(struct ieee80211_txrx_data *rx); - -ieee80211_txrx_result -ieee80211_rx_h_remove_qos_control(struct ieee80211_txrx_data *rx); - -void ieee80211_install_qdisc(struct net_device *dev); - -int ieee80211_wme_register(void); -void ieee80211_wme_unregister(void); - diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/wpa.c b/openwrt/target/linux/package/ieee80211-dscape/src/wpa.c deleted file mode 100644 index e0050dbd8f9..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/wpa.c +++ /dev/null @@ -1,825 +0,0 @@ -/* - * Copyright 2002-2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/config.h> -#include <linux/version.h> -#include <linux/module.h> -#include <linux/netdevice.h> -#include <linux/types.h> -#include <linux/slab.h> -#include <linux/skbuff.h> -#include <linux/compiler.h> -#include <linux/wireless.h> -#include <net/iw_handler.h> - -#include <net/ieee80211.h> -#include <net/ieee80211_common.h> -#include "ieee80211_i.h" -#include "michael.h" -#include "tkip.h" -#include "aes_ccm.h" -#include "wpa.h" -#ifdef CONFIG_HOSTAPD_WPA_TESTING -#include "hostapd_ioctl.h" -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - -#define MICHAEL_MIC_HWACCEL - - -int ieee80211_get_hdr_info(const struct sk_buff *skb, u8 **sa, u8 **da, - u8 *qos_tid, u8 **data, size_t *data_len) -{ - struct ieee80211_hdr *hdr; - size_t hdrlen; - u16 fc; - int a4_included; - u8 *pos; - - hdr = (struct ieee80211_hdr *) skb->data; - fc = le16_to_cpu(hdr->frame_control); - - hdrlen = 24; - if ((fc & (WLAN_FC_FROMDS | WLAN_FC_TODS)) == - (WLAN_FC_FROMDS | WLAN_FC_TODS)) { - hdrlen += ETH_ALEN; - *sa = hdr->addr4; - *da = hdr->addr3; - } else if (fc & WLAN_FC_FROMDS) { - *sa = hdr->addr3; - *da = hdr->addr1; - } else if (fc & WLAN_FC_TODS) { - *sa = hdr->addr2; - *da = hdr->addr3; - } else { - *sa = hdr->addr2; - *da = hdr->addr1; - } - - if (fc & 0x80) - hdrlen += 2; - - *data = skb->data + hdrlen; - *data_len = skb->len - hdrlen; - - a4_included = (fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == - (WLAN_FC_TODS | WLAN_FC_FROMDS); - if (WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA && - WLAN_FC_GET_STYPE(fc) & 0x08) { - pos = (u8 *) &hdr->addr4; - if (a4_included) - pos += 6; - *qos_tid = pos[0] & 0x0f; - *qos_tid |= 0x80; /* qos_included flag */ - } else - *qos_tid = 0; - - return skb->len < hdrlen ? -1 : 0; -} - - -ieee80211_txrx_result -ieee80211_tx_h_michael_mic_add(struct ieee80211_txrx_data *tx) -{ - u8 *data, *sa, *da, *key, *mic, qos_tid; - size_t data_len; - u16 fc; - struct sk_buff *skb = tx->skb; - int authenticator; -#if defined(CONFIG_HOSTAPD_WPA_TESTING) || defined(MICHAEL_MIC_HWACCEL) - int wpa_test = 0; -#endif - - fc = tx->fc; - - if (!tx->key || tx->key->alg != ALG_TKIP || skb->len < 24 || - !WLAN_FC_DATA_PRESENT(fc)) - return TXRX_CONTINUE; - - if (ieee80211_get_hdr_info(skb, &sa, &da, &qos_tid, &data, &data_len)) - return TXRX_DROP; - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if ((tx->sta && tx->sta->wpa_trigger & WPA_TRIGGER_FAIL_TX_MIC) || - (!tx->u.tx.unicast && - tx->local->wpa_trigger & WPA_TRIGGER_FAIL_TX_MIC)) { - wpa_test = 1; - } -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - -#ifdef MICHAEL_MIC_HWACCEL - if (!tx->key->force_sw_encrypt && !tx->local->conf.sw_decrypt && - !tx->fragmented && !wpa_test) { - /* hwaccel - with no need for preallocated room for Michael MIC - */ - return TXRX_CONTINUE; - } -#endif /* MICHAEL_MIC_HWACCEL */ - - if (skb_tailroom(skb) < MICHAEL_MIC_LEN) { - I802_DEBUG_INC(tx->local->tx_expand_skb_head); - if (unlikely(pskb_expand_head(skb, TKIP_IV_LEN, - MICHAEL_MIC_LEN + TKIP_ICV_LEN, - GFP_ATOMIC))) { - printk(KERN_DEBUG "%s: failed to allocate more memory " - "for Michael MIC\n", tx->dev->name); - return TXRX_DROP; - } - } - -#if 0 - authenticator = fc & WLAN_FC_FROMDS; /* FIX */ -#else - authenticator = 1; -#endif - key = &tx->key->key[authenticator ? ALG_TKIP_TEMP_AUTH_TX_MIC_KEY : - ALG_TKIP_TEMP_AUTH_RX_MIC_KEY]; - mic = skb_put(skb, MICHAEL_MIC_LEN); - michael_mic(key, da, sa, qos_tid & 0x0f, data, data_len, mic); - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (tx->sta && tx->sta->wpa_trigger & WPA_TRIGGER_FAIL_TX_MIC) { - printk(KERN_INFO "%s: WPA testing - corrupting TX Michael MIC " - "for STA " MACSTR "\n", - tx->dev->name, MAC2STR(tx->sta->addr)); - tx->u.tx.control->key_idx = HW_KEY_IDX_INVALID; - tx->sta->wpa_trigger &= ~WPA_TRIGGER_FAIL_TX_MIC; - tx->wpa_test = 1; - mic[0]++; - } else if (!tx->u.tx.unicast && - tx->local->wpa_trigger & WPA_TRIGGER_FAIL_TX_MIC) { - printk(KERN_INFO "%s: WPA testing - corrupting TX Michael MIC " - "for Group Key\n", tx->dev->name); - tx->u.tx.control->key_idx = HW_KEY_IDX_INVALID; - tx->local->wpa_trigger &= ~WPA_TRIGGER_FAIL_TX_MIC; - tx->wpa_test = 1; - mic[0]++; - } -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - return TXRX_CONTINUE; -} - - -ieee80211_txrx_result -ieee80211_rx_h_michael_mic_verify(struct ieee80211_txrx_data *rx) -{ - u8 *data, *sa, *da, *key = NULL, qos_tid; - size_t data_len; - u16 fc; - u8 mic[MICHAEL_MIC_LEN]; - struct sk_buff *skb = rx->skb; - int authenticator = 1, wpa_test = 0; - - fc = rx->fc; - - /* If device handles decryption totally, skip this check */ - if (rx->local->hw->device_hides_wep || - rx->local->hw->device_strips_mic) - return TXRX_CONTINUE; - - if (!rx->key || rx->key->alg != ALG_TKIP || - !(rx->fc & WLAN_FC_ISWEP) || !WLAN_FC_DATA_PRESENT(fc)) - return TXRX_CONTINUE; - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (rx->sta && rx->sta->wpa_trigger & WPA_TRIGGER_FAIL_RX_MIC) { - wpa_test = 1; - } -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - -#ifdef MICHAEL_MIC_HWACCEL - if ((rx->u.rx.status->flag & RX_FLAG_DECRYPTED) && - !rx->key->force_sw_encrypt && !rx->local->conf.sw_decrypt) { - if (rx->local->hw->wep_include_iv) { - if (skb->len < MICHAEL_MIC_LEN) - return TXRX_DROP; - } - /* Need to verify Michael MIC sometimes in software even when - * hwaccel is used. Atheros ar5212: fragmented frames and QoS - * frames. */ - if (!rx->fragmented && !wpa_test) - goto remove_mic; - } -#endif /* MICHAEL_MIC_HWACCEL */ - - if (ieee80211_get_hdr_info(skb, &sa, &da, &qos_tid, &data, &data_len) - || data_len < MICHAEL_MIC_LEN) - return TXRX_DROP; - - data_len -= MICHAEL_MIC_LEN; - -#if 0 - authenticator = fc & WLAN_FC_TODS; /* FIX */ -#else - authenticator = 1; -#endif - key = &rx->key->key[authenticator ? ALG_TKIP_TEMP_AUTH_RX_MIC_KEY : - ALG_TKIP_TEMP_AUTH_TX_MIC_KEY]; - michael_mic(key, da, sa, qos_tid & 0x0f, data, data_len, mic); -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (rx->sta && rx->sta->wpa_trigger & WPA_TRIGGER_FAIL_RX_MIC) { - printk(KERN_INFO "%s: WPA testing - corrupting RX Michael MIC " - "for STA " MACSTR "\n", - rx->dev->name, MAC2STR(rx->sta->addr)); - rx->sta->wpa_trigger &= ~WPA_TRIGGER_FAIL_RX_MIC; - mic[0]++; - } -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - if (memcmp(mic, data + data_len, MICHAEL_MIC_LEN) != 0 || wpa_test) { -#ifdef CONFIG_HOSTAPD_WPA_TESTING - int i; -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - printk(KERN_DEBUG "%s: invalid Michael MIC in data frame from " - MACSTR "\n", rx->dev->name, MAC2STR(sa)); -#ifdef CONFIG_HOSTAPD_WPA_TESTING - printk(KERN_DEBUG " received"); - for (i = 0; i < MICHAEL_MIC_LEN; i++) - printk(" %02x", data[data_len + i]); - printk(" expected"); - for (i = 0; i < MICHAEL_MIC_LEN; i++) - printk(" %02x", mic[i]); - printk("\n"); - printk(KERN_DEBUG " SA=" MACSTR " DA=" MACSTR " key", - MAC2STR(sa), MAC2STR(da)); - for (i = 0; i < 8; i++) - printk(" %02x", key[i]); - printk(" (%d)\n", authenticator); -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - do { - struct ieee80211_hdr *hdr; - union iwreq_data wrqu; - char *buf = kmalloc(128, GFP_ATOMIC); - if (buf == NULL) - break; - - /* TODO: needed parameters: count, key type, TSC */ - hdr = (struct ieee80211_hdr *) skb->data; - sprintf(buf, "MLME-MICHAELMICFAILURE.indication(" - "keyid=%d %scast addr=" MACSTR ")", - rx->key->keyidx, - hdr->addr1[0] & 0x01 ? "broad" : "uni", - MAC2STR(hdr->addr2)); - memset(&wrqu, 0, sizeof(wrqu)); - wrqu.data.length = strlen(buf); - wireless_send_event(rx->dev, IWEVCUSTOM, &wrqu, buf); - kfree(buf); - } while (0); - - ieee80211_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status, - ieee80211_msg_michael_mic_failure); - - return TXRX_QUEUED; - } - -#ifdef MICHAEL_MIC_HWACCEL - remove_mic: -#endif /* MICHAEL_MIC_HWACCEL */ - /* remove Michael MIC from payload */ - skb_trim(skb, skb->len - MICHAEL_MIC_LEN); - - return TXRX_CONTINUE; -} - - -static int tkip_encrypt_skb(struct ieee80211_txrx_data *tx, - struct sk_buff *skb, int test) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - struct ieee80211_key *key = tx->key; - int hdrlen, len, tailneed; - u16 fc; - u8 *pos; - - fc = le16_to_cpu(hdr->frame_control); - hdrlen = ieee80211_get_hdrlen(fc); - len = skb->len - hdrlen; - - tailneed = (!tx->key->force_sw_encrypt && !tx->local->conf.sw_decrypt) - ? 0 : TKIP_ICV_LEN; - if ((skb_headroom(skb) < TKIP_IV_LEN || - skb_tailroom(skb) < tailneed)) { - I802_DEBUG_INC(tx->local->tx_expand_skb_head); - if (unlikely(pskb_expand_head(skb, TKIP_IV_LEN, tailneed, - GFP_ATOMIC))) - return -1; - } - - pos = skb_push(skb, TKIP_IV_LEN); - memmove(pos, pos + TKIP_IV_LEN, hdrlen); - pos += hdrlen; - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (test & WPA_TRIGGER_TX_REPLAY) - goto skip_iv_inc; -iv_inc: -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - /* Increase IV for the frame */ - key->u.tkip.iv16++; - if (key->u.tkip.iv16 == 0) - key->u.tkip.iv32++; - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (test & WPA_TRIGGER_TX_SKIP_SEQ) { - test = 0; - goto iv_inc; - } -skip_iv_inc: -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - if (!tx->key->force_sw_encrypt && !tx->local->conf.sw_decrypt -#ifdef CONFIG_HOSTAPD_WPA_TESTING - && !tx->wpa_test -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - ) { - /* hwaccel - with preallocated room for IV */ - - ieee80211_tkip_add_iv(pos, key, - (u8) (key->u.tkip.iv16 >> 8), - (u8) (((key->u.tkip.iv16 >> 8) | 0x20) & - 0x7f), - (u8) key->u.tkip.iv16); - - tx->u.tx.control->key_idx = tx->key->hw_key_idx; - return 0; - } - - /* Add room for ICV */ - skb_put(skb, TKIP_ICV_LEN); - - hdr = (struct ieee80211_hdr *) skb->data; - ieee80211_tkip_encrypt_data(key, pos, len, hdr->addr2); - return 0; -} - - -ieee80211_txrx_result -ieee80211_tx_h_tkip_encrypt(struct ieee80211_txrx_data *tx) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; - u16 fc; - struct ieee80211_key *key = tx->key; - struct sk_buff *skb = tx->skb; - int wpa_test = 0, test = 0; - - fc = le16_to_cpu(hdr->frame_control); - - if (!key || key->alg != ALG_TKIP || !WLAN_FC_DATA_PRESENT(fc)) - return TXRX_CONTINUE; - - tx->u.tx.control->icv_len = TKIP_ICV_LEN; - tx->u.tx.control->iv_len = TKIP_IV_LEN; - ieee80211_tx_set_iswep(tx); - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if ((tx->sta && tx->sta->wpa_trigger & WPA_TRIGGER_FAIL_TX_ICV) || - (!tx->u.tx.unicast && - tx->local->wpa_trigger & WPA_TRIGGER_FAIL_TX_ICV)) { - wpa_test = 1; - } - - if (tx->sta) { - test = tx->sta->wpa_trigger; - tx->sta->wpa_trigger &= - ~(WPA_TRIGGER_TX_REPLAY | WPA_TRIGGER_TX_REPLAY_FRAG | - WPA_TRIGGER_TX_SKIP_SEQ); - } else { - test = tx->local->wpa_trigger; - tx->local->wpa_trigger &= - ~(WPA_TRIGGER_TX_REPLAY | WPA_TRIGGER_TX_REPLAY_FRAG | - WPA_TRIGGER_TX_SKIP_SEQ); - } - if (test & - (WPA_TRIGGER_TX_REPLAY | WPA_TRIGGER_TX_REPLAY_FRAG | - WPA_TRIGGER_TX_SKIP_SEQ)) { - printk(KERN_INFO "%s: WPA testing - TKIP TX packet number " - "%s%s%s%s\n", tx->dev->name, - tx->sta ? "[UNICAST]" : "[MULTICAST]", - test & WPA_TRIGGER_TX_REPLAY ? "[REPLAY]" : "", - test & WPA_TRIGGER_TX_REPLAY_FRAG ? - "[REPLAY FRAG]" : "", - test & WPA_TRIGGER_TX_SKIP_SEQ ? "[SKIP SEQ]" : ""); - } -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - if (!tx->key->force_sw_encrypt && !tx->local->conf.sw_decrypt && - !tx->local->hw->wep_include_iv && !wpa_test) { - /* hwaccel - with no need for preallocated room for IV/ICV */ - tx->u.tx.control->key_idx = tx->key->hw_key_idx; - return TXRX_CONTINUE; - } - - if (tkip_encrypt_skb(tx, skb, test) < 0) - return TXRX_DROP; - - if (tx->u.tx.extra_frag) { - int i; -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (test & WPA_TRIGGER_TX_REPLAY_FRAG) - test |= WPA_TRIGGER_TX_REPLAY; -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - for (i = 0; i < tx->u.tx.num_extra_frag; i++) { - if (tkip_encrypt_skb(tx, tx->u.tx.extra_frag[i], test) - < 0) - return TXRX_DROP; - } - } - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (tx->sta && tx->sta->wpa_trigger & WPA_TRIGGER_FAIL_TX_ICV) { - printk(KERN_INFO "%s: WPA testing - corrupting TX TKIP ICV " - "for STA " MACSTR "\n", - tx->dev->name, MAC2STR(tx->sta->addr)); - tx->u.tx.control->key_idx = HW_KEY_IDX_INVALID; - tx->sta->wpa_trigger &= ~WPA_TRIGGER_FAIL_TX_ICV; - skb->data[skb->len - 1]++; - } else if (!tx->u.tx.unicast && - tx->local->wpa_trigger & WPA_TRIGGER_FAIL_TX_ICV) { - printk(KERN_INFO "%s: WPA testing - corrupting TX TKIP ICV " - "for Group Key\n", - tx->dev->name); - tx->u.tx.control->key_idx = HW_KEY_IDX_INVALID; - tx->local->wpa_trigger &= ~WPA_TRIGGER_FAIL_TX_ICV; - skb->data[skb->len - 1]++; - } -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - return TXRX_CONTINUE; -} - - -ieee80211_txrx_result -ieee80211_rx_h_tkip_decrypt(struct ieee80211_txrx_data *rx) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data; - u16 fc; - int hdrlen, res, hwaccel = 0, wpa_test = 0; - struct ieee80211_key *key = rx->key; - struct sk_buff *skb = rx->skb; - - fc = le16_to_cpu(hdr->frame_control); - hdrlen = ieee80211_get_hdrlen(fc); - - if (!rx->key || rx->key->alg != ALG_TKIP || - !(rx->fc & WLAN_FC_ISWEP) || - WLAN_FC_GET_TYPE(rx->fc) != WLAN_FC_TYPE_DATA) - return TXRX_CONTINUE; - - if (!rx->sta || skb->len - hdrlen < 12) - return TXRX_DROP; - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (rx->sta && rx->sta->wpa_trigger & WPA_TRIGGER_FAIL_RX_ICV) { - printk(KERN_INFO "%s: WPA testing - corrupting RX TKIP ICV " - "for STA " MACSTR "\n", - rx->dev->name, MAC2STR(rx->sta->addr)); - rx->sta->wpa_trigger &= ~WPA_TRIGGER_FAIL_RX_ICV; - skb->data[skb->len - 1]++; - wpa_test = 1; - } -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - if ((rx->u.rx.status->flag & RX_FLAG_DECRYPTED) && - !rx->key->force_sw_encrypt && !rx->local->conf.sw_decrypt) { - if (!rx->local->hw->wep_include_iv) { - /* Hardware takes care of all processing, including - * replay protection, so no need to continue here. */ - return TXRX_CONTINUE; - } - - /* let TKIP code verify IV, but skip decryption */ - hwaccel = 1; - } - - res = ieee80211_tkip_decrypt_data(key, skb->data + hdrlen, - skb->len - hdrlen, rx->sta->addr, - hwaccel, rx->u.rx.queue); - if (res != TKIP_DECRYPT_OK || wpa_test) { - printk(KERN_DEBUG "%s: TKIP decrypt failed for RX frame from " - MACSTR " (res=%d)\n", - rx->dev->name, MAC2STR(rx->sta->addr), res); - return TXRX_DROP; - } - - /* Trim ICV */ - skb_trim(skb, skb->len - TKIP_ICV_LEN); - - /* Remove IV */ - memmove(skb->data + TKIP_IV_LEN, skb->data, hdrlen); - skb_pull(skb, TKIP_IV_LEN); - - return TXRX_CONTINUE; -} - - -static void ccmp_special_blocks(struct sk_buff *skb, u8 *pn, u8 *b_0, u8 *aad, - int encrypted) -{ - u16 fc; - int a4_included, qos_included; - u8 qos_tid, *fc_pos, *data, *sa, *da; - int len_a; - size_t data_len; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - - fc_pos = (u8 *) &hdr->frame_control; - fc = fc_pos[0] ^ (fc_pos[1] << 8); - a4_included = (fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == - (WLAN_FC_TODS | WLAN_FC_FROMDS); - - ieee80211_get_hdr_info(skb, &sa, &da, &qos_tid, &data, &data_len); - data_len -= CCMP_HDR_LEN + (encrypted ? CCMP_MIC_LEN : 0); - if (qos_tid & 0x80) { - qos_included = 1; - qos_tid &= 0x0f; - } else - qos_included = 0; - /* First block, b_0 */ - - b_0[0] = 0x59; /* flags: Adata: 1, M: 011, L: 001 */ - /* Nonce: QoS Priority | A2 | PN */ - b_0[1] = qos_tid; - memcpy(&b_0[2], hdr->addr2, 6); - memcpy(&b_0[8], pn, CCMP_PN_LEN); - /* l(m) */ - b_0[14] = (data_len >> 8) & 0xff; - b_0[15] = data_len & 0xff; - - - /* AAD (extra authenticate-only data) / masked 802.11 header - * FC | A1 | A2 | A3 | SC | [A4] | [QC] */ - - len_a = a4_included ? 28 : 22; - if (qos_included) - len_a += 2; - - aad[0] = 0; /* (len_a >> 8) & 0xff; */ - aad[1] = len_a & 0xff; - /* Mask FC: zero subtype b4 b5 b6 */ - aad[2] = fc_pos[0] & ~(BIT(4) | BIT(5) | BIT(6)); - /* Retry, PwrMgt, MoreData; set Protected */ - aad[3] = (fc_pos[1] & ~(BIT(3) | BIT(4) | BIT(5))) | BIT(6); - memcpy(&aad[4], &hdr->addr1, 18); - - /* Mask Seq#, leave Frag# */ - aad[22] = *((u8 *) &hdr->seq_ctrl) & 0x0f; - aad[23] = 0; - if (a4_included) { - memcpy(&aad[24], hdr->addr4, 6); - aad[30] = 0; - aad[31] = 0; - } else - memset(&aad[24], 0, 8); - if (qos_included) { - u8 *dpos = &aad[a4_included ? 30 : 24]; - - /* Mask QoS Control field */ - dpos[0] = qos_tid; - dpos[1] = 0; - } -} - - -static inline void ccmp_pn2hdr(u8 *hdr, u8 *pn, int key_id) -{ - hdr[0] = pn[5]; - hdr[1] = pn[4]; - hdr[2] = 0; - hdr[3] = 0x20 | (key_id << 6); - hdr[4] = pn[3]; - hdr[5] = pn[2]; - hdr[6] = pn[1]; - hdr[7] = pn[0]; -} - - -static inline int ccmp_hdr2pn(u8 *pn, u8 *hdr) -{ - pn[0] = hdr[7]; - pn[1] = hdr[6]; - pn[2] = hdr[5]; - pn[3] = hdr[4]; - pn[4] = hdr[1]; - pn[5] = hdr[0]; - return (hdr[3] >> 6) & 0x03; -} - - -static int ccmp_encrypt_skb(struct ieee80211_txrx_data *tx, - struct sk_buff *skb, int test) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - struct ieee80211_key *key = tx->key; - int hdrlen, len, tailneed; - u16 fc; - u8 *pos, *pn; - u8 b_0[AES_BLOCK_LEN], aad[2 * AES_BLOCK_LEN]; - int i; - - fc = le16_to_cpu(hdr->frame_control); - hdrlen = ieee80211_get_hdrlen(fc); - len = skb->len - hdrlen; - - tailneed = (!tx->key->force_sw_encrypt && !tx->local->conf.sw_decrypt) - ? 0 : CCMP_MIC_LEN; - - if ((skb_headroom(skb) < CCMP_HDR_LEN || - skb_tailroom(skb) < tailneed)) { - I802_DEBUG_INC(tx->local->tx_expand_skb_head); - if (unlikely(pskb_expand_head(skb, CCMP_HDR_LEN, tailneed, - GFP_ATOMIC))) - return -1; - } - - pos = skb_push(skb, CCMP_HDR_LEN); - memmove(pos, pos + CCMP_HDR_LEN, hdrlen); - hdr = (struct ieee80211_hdr *) pos; - pos += hdrlen; - - /* PN = PN + 1 */ - pn = key->u.ccmp.tx_pn; - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (test & WPA_TRIGGER_TX_REPLAY) - goto skip_pn_inc; -pn_inc: -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - for (i = CCMP_PN_LEN - 1; i >= 0; i--) { - pn[i]++; - if (pn[i]) - break; - } - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (test & WPA_TRIGGER_TX_SKIP_SEQ) { - test = 0; - goto pn_inc; - } -skip_pn_inc: -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - ccmp_pn2hdr(pos, pn, key->keyidx); - - if (!tx->key->force_sw_encrypt && !tx->local->conf.sw_decrypt) { - /* hwaccel - with preallocated room for CCMP header */ - tx->u.tx.control->key_idx = tx->key->hw_key_idx; - return 0; - } - - pos += CCMP_HDR_LEN; - ccmp_special_blocks(skb, pn, b_0, aad, 0); - ieee80211_aes_ccm_encrypt(key->u.ccmp.aes_state, b_0, aad, pos, len, - pos, skb_put(skb, CCMP_MIC_LEN)); - - return 0; -} - - -ieee80211_txrx_result -ieee80211_tx_h_ccmp_encrypt(struct ieee80211_txrx_data *tx) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; - struct ieee80211_key *key = tx->key; - u16 fc; - struct sk_buff *skb = tx->skb; - int test = 0; - - fc = le16_to_cpu(hdr->frame_control); - - if (!key || key->alg != ALG_CCMP || !WLAN_FC_DATA_PRESENT(fc)) - return TXRX_CONTINUE; - -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (tx->sta) { - test = tx->sta->wpa_trigger; - tx->sta->wpa_trigger = 0; - } else { - test = tx->local->wpa_trigger; - tx->local->wpa_trigger = 0; - } - if (test & - (WPA_TRIGGER_TX_REPLAY | WPA_TRIGGER_TX_REPLAY_FRAG | - WPA_TRIGGER_TX_SKIP_SEQ)) { - printk(KERN_INFO "%s: WPA testing - CCMP TX packet number " - "%s%s%s%s\n", tx->dev->name, - tx->sta ? "[UNICAST]" : "[MULTICAST]", - test & WPA_TRIGGER_TX_REPLAY ? "[REPLAY]" : "", - test & WPA_TRIGGER_TX_REPLAY_FRAG ? - "[REPLAY FRAG]" : "", - test & WPA_TRIGGER_TX_SKIP_SEQ ? "[SKIP SEQ]" : ""); - } -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - - tx->u.tx.control->icv_len = CCMP_MIC_LEN; - tx->u.tx.control->iv_len = CCMP_HDR_LEN; - ieee80211_tx_set_iswep(tx); - - if (!tx->key->force_sw_encrypt && !tx->local->conf.sw_decrypt && - !tx->local->hw->wep_include_iv) { - /* hwaccel - with no need for preallocated room for CCMP " - * header or MIC fields */ - tx->u.tx.control->key_idx = tx->key->hw_key_idx; - return TXRX_CONTINUE; - } - - if (ccmp_encrypt_skb(tx, skb, test) < 0) - return TXRX_DROP; - - if (tx->u.tx.extra_frag) { - int i; -#ifdef CONFIG_HOSTAPD_WPA_TESTING - if (test & WPA_TRIGGER_TX_REPLAY_FRAG) - test |= WPA_TRIGGER_TX_REPLAY; -#endif /* CONFIG_HOSTAPD_WPA_TESTING */ - for (i = 0; i < tx->u.tx.num_extra_frag; i++) { - if (ccmp_encrypt_skb(tx, tx->u.tx.extra_frag[i], test) - < 0) - return TXRX_DROP; - } - } - - return TXRX_CONTINUE; -} - - -ieee80211_txrx_result -ieee80211_rx_h_ccmp_decrypt(struct ieee80211_txrx_data *rx) -{ - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data; - u16 fc; - int hdrlen; - struct ieee80211_key *key = rx->key; - struct sk_buff *skb = rx->skb; - u8 b_0[AES_BLOCK_LEN], aad[2 * AES_BLOCK_LEN]; - u8 pn[CCMP_PN_LEN]; - int data_len; - - fc = le16_to_cpu(hdr->frame_control); - hdrlen = ieee80211_get_hdrlen(fc); - - if (!rx->key || rx->key->alg != ALG_CCMP || - !(rx->fc & WLAN_FC_ISWEP) || - WLAN_FC_GET_TYPE(rx->fc) != WLAN_FC_TYPE_DATA) - return TXRX_CONTINUE; - - data_len = skb->len - hdrlen - CCMP_HDR_LEN - CCMP_MIC_LEN; - if (!rx->sta || data_len < 0) - return TXRX_DROP; - - if ((rx->u.rx.status->flag & RX_FLAG_DECRYPTED) && - !rx->key->force_sw_encrypt && !rx->local->conf.sw_decrypt && - !rx->local->hw->wep_include_iv) - return TXRX_CONTINUE; - - (void) ccmp_hdr2pn(pn, skb->data + hdrlen); - - if (memcmp(pn, key->u.ccmp.rx_pn[rx->u.rx.queue], CCMP_PN_LEN) <= 0) { -#ifdef CONFIG_IEEE80211_DEBUG - u8 *ppn = key->u.ccmp.rx_pn[rx->u.rx.queue]; - printk(KERN_DEBUG "%s: CCMP replay detected for RX frame from " - MACSTR " (RX PN %02x%02x%02x%02x%02x%02x <= prev. PN " - "%02x%02x%02x%02x%02x%02x)\n", rx->dev->name, - MAC2STR(rx->sta->addr), - pn[0], pn[1], pn[2], pn[3], pn[4], pn[5], - ppn[0], ppn[1], ppn[2], ppn[3], ppn[4], ppn[5]); -#endif /* CONFIG_IEEE80211_DEBUG */ - key->u.ccmp.replays++; - return TXRX_DROP; - } - - if ((rx->u.rx.status->flag & RX_FLAG_DECRYPTED) && - !rx->key->force_sw_encrypt && !rx->local->conf.sw_decrypt) { - /* hwaccel has already decrypted frame and verified MIC */ - } else { - ccmp_special_blocks(skb, pn, b_0, aad, 1); - - if (ieee80211_aes_ccm_decrypt( - key->u.ccmp.aes_state, b_0, aad, - skb->data + hdrlen + CCMP_HDR_LEN, data_len, - skb->data + skb->len - CCMP_MIC_LEN, - skb->data + hdrlen + CCMP_HDR_LEN)) { - printk(KERN_DEBUG "%s: CCMP decrypt failed for RX " - "frame from " MACSTR "\n", rx->dev->name, - MAC2STR(rx->sta->addr)); - return TXRX_DROP; - } - } - - memcpy(key->u.ccmp.rx_pn[rx->u.rx.queue], pn, CCMP_PN_LEN); - - /* Remove CCMP header and MIC */ - skb_trim(skb, skb->len - CCMP_MIC_LEN); - memmove(skb->data + CCMP_HDR_LEN, skb->data, hdrlen); - skb_pull(skb, CCMP_HDR_LEN); - - return TXRX_CONTINUE; -} - diff --git a/openwrt/target/linux/package/ieee80211-dscape/src/wpa.h b/openwrt/target/linux/package/ieee80211-dscape/src/wpa.h deleted file mode 100644 index 9ad7c0813e8..00000000000 --- a/openwrt/target/linux/package/ieee80211-dscape/src/wpa.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2002-2004, Instant802 Networks, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef WPA_H -#define WPA_H - -ieee80211_txrx_result -ieee80211_tx_h_michael_mic_add(struct ieee80211_txrx_data *tx); -ieee80211_txrx_result -ieee80211_rx_h_michael_mic_verify(struct ieee80211_txrx_data *rx); - -ieee80211_txrx_result -ieee80211_tx_h_tkip_encrypt(struct ieee80211_txrx_data *tx); -ieee80211_txrx_result -ieee80211_rx_h_tkip_decrypt(struct ieee80211_txrx_data *rx); - -ieee80211_txrx_result -ieee80211_tx_h_ccmp_encrypt(struct ieee80211_txrx_data *tx); -ieee80211_txrx_result -ieee80211_rx_h_ccmp_decrypt(struct ieee80211_txrx_data *rx); - -int ieee80211_get_hdr_info(const struct sk_buff *skb, u8 **sa, u8 **da, - u8 *qos_tid, u8 **data, size_t *data_len); - -#endif /* WPA_H */ diff --git a/openwrt/target/linux/package/madwifi/Config.in b/openwrt/target/linux/package/madwifi/Config.in index 6eda342f818..168f1e7b8b7 100644 --- a/openwrt/target/linux/package/madwifi/Config.in +++ b/openwrt/target/linux/package/madwifi/Config.in @@ -1,7 +1,7 @@ config PACKAGE_KMOD_MADWIFI prompt "kmod-madwifi...................... Atheros Wifi driver" tristate - default y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X + default y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE default m if DEVEL default n help diff --git a/openwrt/target/linux/package/madwifi/Makefile b/openwrt/target/linux/package/madwifi/Makefile index d42372b52ec..97cb0bd5e5f 100644 --- a/openwrt/target/linux/package/madwifi/Makefile +++ b/openwrt/target/linux/package/madwifi/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk include ../../rules.mk PKG_NAME:=madwifi-ng -PKG_VERSION:=r1486-20060329 +PKG_VERSION:=r1543-20060506 PKG_RELEASE:=1 -PKG_MD5SUM:=71f1c654531ca8516bf7cdb5e80eb10f +PKG_MD5SUM:=3d89e5197c7e43eb37564c176140b2bf PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_NAME) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -23,6 +23,9 @@ endif ifeq ($(ARCH),i386) HAL_TARGET:=i386-elf endif +ifeq ($(ARCH),armeb) +HAL_TARGET:=xscale-be-elf +endif BUS := PCI diff --git a/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch b/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch index 39aac7626a3..b67183c3847 100644 --- a/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch +++ b/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch @@ -30,3 +30,14 @@ diff -ru madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc madwifi-ng-r1486-2 -COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap \ +COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap -mips32 \ -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls +diff -ur madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc +--- madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc 2006-02-11 13:04:39.000000000 +0100 ++++ madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc 2006-04-16 15:07:59.000000000 +0200 +@@ -72,5 +72,5 @@ + + LDOPTS= -EB + COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN -DAH_REGOPS_FUNC +-COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ +- -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2 ++COPTS+= -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common \ ++ -msoft-float -mfp=2 diff --git a/openwrt/target/linux/package/wlcompat/Config.in b/openwrt/target/linux/package/wlcompat/Config.in index 904d1e66459..00774c17929 100644 --- a/openwrt/target/linux/package/wlcompat/Config.in +++ b/openwrt/target/linux/package/wlcompat/Config.in @@ -2,7 +2,7 @@ config PACKAGE_KMOD_WLCOMPAT prompt "kmod-wlcompat..................... Wrapper providing Wireless Extensions for Broadcom wl module" tristate default y - depends PACKAGE_KMOD_BRCM_WL || PACKAGE_KMOD_BRCM_WL2 + depends PACKAGE_KMOD_BRCM_WL help A wrapper module, that provides Wireless Extension support for the proprietary Broadcom wl module. @@ -11,7 +11,7 @@ config PACKAGE_KMOD_WLCOMPAT_DEBUG prompt "kmod-wlcompat-debug............... Wrapper providing Wireless Extensions for Broadcom wl module (debug)" tristate default m - depends PACKAGE_KMOD_BRCM_WL || PACKAGE_KMOD_BRCM_WL2 + depends PACKAGE_KMOD_BRCM_WL help A wrapper module, that provides Wireless Extension support for the proprietary Broadcom wl module. (debug version) diff --git a/openwrt/target/linux/package/wlcompat/wlcompat.c b/openwrt/target/linux/package/wlcompat/wlcompat.c index 7063c809a6b..1540a211676 100644 --- a/openwrt/target/linux/package/wlcompat/wlcompat.c +++ b/openwrt/target/linux/package/wlcompat/wlcompat.c @@ -980,13 +980,13 @@ static int new_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { static int __init wlcompat_init() { int found = 0, i; - char *devname = "eth0"; + char devname[4] = "wl0"; bss_force = 0; while (!found && (dev = dev_get_by_name(devname))) { if ((dev->wireless_handlers == NULL) && ((wl_ioctl(dev, WLC_GET_MAGIC, &i, sizeof(i)) == 0) && i == WLC_IOCTL_MAGIC)) found = 1; - devname[3]++; + devname[2]++; } if (!found) { diff --git a/openwrt/target/linux/rules.mk b/openwrt/target/linux/rules.mk index 8490d110de8..da32ed8b04a 100644 --- a/openwrt/target/linux/rules.mk +++ b/openwrt/target/linux/rules.mk @@ -20,6 +20,7 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/mipseb/mips/' \ -e 's/powerpc/ppc/' \ -e 's/sh[234]/sh/' \ + -e 's/armeb/arm/' \ ) KPKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \ @@ -75,6 +76,11 @@ ifneq ($(6),) for module in $(7); do \ echo $$$$module >> $$(I_$(1))/etc/modules.d/$(6)-$(2); \ done + echo "#!/bin/sh" >> $$(I_$(1))/CONTROL/postinst + echo "[ -z \"\$$$$IPKG_INSTROOT\" ] || exit" >> $$(I_$(1))/CONTROL/postinst + echo ". /etc/functions.sh" >> $$(I_$(1))/CONTROL/postinst + echo "load_modules /etc/modules.d/$(6)-$(2)" >> $$(I_$(1))/CONTROL/postinst + chmod 0755 $$(I_$(1))/CONTROL/postinst endif $(8) $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) diff --git a/openwrt/target/linux/sibyte-2.6/Makefile b/openwrt/target/linux/sibyte-2.6/Makefile new file mode 100644 index 00000000000..3309a84e55d --- /dev/null +++ b/openwrt/target/linux/sibyte-2.6/Makefile @@ -0,0 +1,19 @@ +include $(TOPDIR)/rules.mk + +LINUX_VERSION:=2.6.16.7 +LINUX_RELEASE:=1 +LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e + +include ../rules.mk +include ./config + +include ../generic-$(KERNEL)/modules.mk +include ../kernel.mk + + +$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches + @$(CP) config $(LINUX_DIR)/.config + touch $@ + diff --git a/openwrt/target/linux/sibyte-2.6/config b/openwrt/target/linux/sibyte-2.6/config new file mode 100644 index 00000000000..221d833b89f --- /dev/null +++ b/openwrt/target/linux/sibyte-2.6/config @@ -0,0 +1,1311 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.16.4 +# Fri Apr 21 16:08:33 2006 +# +CONFIG_MIPS=y + +# +# Machine selection +# +# CONFIG_MIPS_MTX1 is not set +# CONFIG_MIPS_BOSPORUS is not set +# CONFIG_MIPS_PB1000 is not set +# CONFIG_MIPS_PB1100 is not set +# CONFIG_MIPS_PB1500 is not set +# CONFIG_MIPS_PB1550 is not set +# CONFIG_MIPS_PB1200 is not set +# CONFIG_MIPS_DB1000 is not set +# CONFIG_MIPS_DB1100 is not set +# CONFIG_MIPS_DB1500 is not set +# CONFIG_MIPS_DB1550 is not set +# CONFIG_MIPS_DB1200 is not set +# CONFIG_MIPS_MIRAGE is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MIPS_EV64120 is not set +# CONFIG_MIPS_EV96100 is not set +# CONFIG_MIPS_IVR is not set +# CONFIG_MIPS_ITE8172 is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_LASAT is not set +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_MOMENCO_JAGUAR_ATX is not set +# CONFIG_MOMENCO_OCELOT is not set +# CONFIG_MOMENCO_OCELOT_3 is not set +# CONFIG_MOMENCO_OCELOT_C is not set +# CONFIG_MOMENCO_OCELOT_G is not set +# CONFIG_MIPS_XXS1500 is not set +# CONFIG_PNX8550_V2PCI is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set +# CONFIG_DDB5477 is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_QEMU is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_BIGSUR is not set +CONFIG_SIBYTE_SWARM=y +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_PTSWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SNI_RM200_PCI is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +CONFIG_SIBYTE_SB1250=y +CONFIG_SIBYTE_SB1xxx_SOC=y +# CONFIG_CPU_SB1_PASS_1 is not set +# CONFIG_CPU_SB1_PASS_2_1250 is not set +# CONFIG_CPU_SB1_PASS_2_2 is not set +CONFIG_CPU_SB1_PASS_4=y +# CONFIG_CPU_SB1_PASS_2_112x is not set +# CONFIG_CPU_SB1_PASS_3 is not set +CONFIG_SIBYTE_HAS_LDT=y +# CONFIG_SIMULATION is not set +# CONFIG_SB1_CEX_ALWAYS_FATAL is not set +# CONFIG_SB1_CERR_STALL is not set +CONFIG_SIBYTE_CFE=y +CONFIG_SIBYTE_CFE_CONSOLE=y +# CONFIG_SIBYTE_BUS_WATCHER is not set +# CONFIG_SIBYTE_SB1250_PROF is not set +# CONFIG_SIBYTE_TBPROF is not set +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_DMA_COHERENT=y +CONFIG_CPU_BIG_ENDIAN=y +# CONFIG_CPU_LITTLE_ENDIAN is not set +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_SWAP_IO_SPACE=y +CONFIG_BOOT_ELF32=y +CONFIG_MIPS_L1_CACHE_SHIFT=5 + +# +# CPU selection +# +# CONFIG_CPU_MIPS32_R1 is not set +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +CONFIG_CPU_SB1=y +CONFIG_SYS_HAS_CPU_SB1=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y + +# +# Kernel type +# +# CONFIG_32BIT is not set +CONFIG_64BIT=y +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +# CONFIG_SIBYTE_DMA_PAGEOPS is not set +CONFIG_CPU_HAS_PREFETCH=y +# CONFIG_MIPS_MT is not set +CONFIG_CPU_HAS_LLSC=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_SYS_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +# CONFIG_PREEMPT_BKL is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_CPUSETS=y +CONFIG_INITRAMFS_SOURCE="../root" +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_SLAB is not set +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +CONFIG_SLOB=y +CONFIG_OBSOLETE_INTERMODULE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set +CONFIG_STOP_MACHINE=y + +# +# Block layer +# + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +CONFIG_HW_HAS_PCI=y +CONFIG_PCI=y +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_MMU=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_BUILD_ELF64=y +CONFIG_MIPS32_COMPAT=y +CONFIG_COMPAT=y +CONFIG_MIPS32_O32=y +# CONFIG_MIPS32_N32 is not set +CONFIG_BINFMT_ELF32=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set +# CONFIG_IP_ROUTE_VERBOSE is not set +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y + +# +# TCP congestion control +# +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_SCALABLE=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_IPV6_TUNNEL is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_BRIDGE_NETFILTER is not set + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_STATE=y +# CONFIG_NETFILTER_XT_MATCH_STRING is not set +CONFIG_NETFILTER_XT_MATCH_TCPMSS=y + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_IRC=y +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_SIP=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +# CONFIG_IP_NF_MATCH_POLICY is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_IMQ=m +# CONFIG_IP_NF_TARGET_LOG is not set +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_REDIRECT=y +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_IRC=y +CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_TARGET_SET=m + +# +# IPv6: Netfilter Configuration (EXPERIMENTAL) +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_HL is not set +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +# CONFIG_IP6_NF_MATCH_AHESP is not set +CONFIG_IP6_NF_MATCH_EUI64=m +# CONFIG_IP6_NF_MATCH_POLICY is not set +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_IMQ=m +# CONFIG_IP6_NF_TARGET_LOG is not set +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +# CONFIG_IP6_NF_TARGET_HL is not set +# CONFIG_IP6_NF_RAW is not set + +# +# Bridge: Netfilter Configuration +# +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=y +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +# CONFIG_NET_SCH_NETEM is not set +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_CLS_U32_MARK is not set +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_ESTIMATOR=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_HAMRADIO=y + +# +# Packet Radio protocols +# +CONFIG_AX25=m +# CONFIG_AX25_DAMA_SLAVE is not set +# CONFIG_NETROM is not set +# CONFIG_ROSE is not set + +# +# AX.25 network device drivers +# +CONFIG_MKISS=m +# CONFIG_6PACK is not set +# CONFIG_BPQETHER is not set +# CONFIG_BAYCOM_SER_FDX is not set +# CONFIG_BAYCOM_SER_HDX is not set +# CONFIG_YAM is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_AMDSTD_RETRY=0 +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +CONFIG_MTD_COMPLEX_MAPPINGS=y +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 +CONFIG_TUN=m + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# +# CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_NET_SB1250_MAC=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_DM9000 is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +# CONFIG_NET_PCI is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set +# CONFIG_HERMES is not set +# CONFIG_ATMEL is not set + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +# CONFIG_PRISM54 is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +# CONFIG_HOSTAP_PLX is not set +# CONFIG_HOSTAP_PCI is not set +CONFIG_NET_WIRELESS=y + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# ATM drivers +# +CONFIG_ATM_DUMMY=m +CONFIG_ATM_TCP=m +# CONFIG_ATM_LANAI is not set +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_ZATM is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_AMBASSADOR is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_PPPOATM=m +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=m + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_SERIAL_NONSTANDARD=y +# CONFIG_COMPUTONE is not set +# CONFIG_ROCKETPORT is not set +# CONFIG_CYCLADES is not set +# CONFIG_DIGIEPCA is not set +# CONFIG_MOXA_INTELLIO is not set +# CONFIG_MOXA_SMARTIO is not set +# CONFIG_ISI is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set +# CONFIG_N_HDLC is not set +# CONFIG_SPECIALIX is not set +# CONFIG_SX is not set +# CONFIG_STALDRV is not set +CONFIG_SIBYTE_SB1250_DUART=y +CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y +# CONFIG_AU1000_UART is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multimedia Capabilities Port drivers +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# + +# +# File systems +# +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=m +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_XFS_FS=m +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_RT is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=m +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +# CONFIG_QUOTA is not set +# CONFIG_DNOTIFY is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_PROC_KCORE is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_SUMMARY is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=m +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=15 +CONFIG_CROSSCOMPILE=y +CONFIG_CMDLINE="" +# CONFIG_SB1XXX_CORELIS is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff --git a/openwrt/target/linux/sibyte-2.6/patches/000-DUART.patch b/openwrt/target/linux/sibyte-2.6/patches/000-DUART.patch new file mode 100644 index 00000000000..480287ffa0c --- /dev/null +++ b/openwrt/target/linux/sibyte-2.6/patches/000-DUART.patch @@ -0,0 +1,956 @@ +--- linux-2.6.16.7/drivers/char/Kconfig 2006-04-21 14:38:30.000000000 -0700 ++++ linux-2.6.16.7/drivers/char/Kconfig 2006-04-21 14:39:29.000000000 -0700 +@@ -340,6 +340,14 @@ + To compile this driver as a module, choose M here: the + module will be called istallion. + ++config SIBYTE_SB1250_DUART ++ bool "Support for BCM1xxx onchip DUART" ++ depends on MIPS && SIBYTE_SB1xxx_SOC=y ++ ++config SIBYTE_SB1250_DUART_CONSOLE ++ bool "Console on BCM1xxx DUART" ++ depends on SIBYTE_SB1250_DUART ++ + config AU1000_UART + bool "Enable Au1000 UART Support" + depends on SERIAL_NONSTANDARD && MIPS +diff -Nurb linux-2.6.16.7/drivers/char/Makefile linux-2.6.16.7/drivers/char/Makefile +--- linux-2.6.16.7/drivers/char/Makefile 2006-04-17 14:53:25.000000000 -0700 ++++ linux-2.6.16.7/drivers/char/Makefile 2006-04-28 12:14:24.000000000 -0700 +@@ -31,6 +31,7 @@ + obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o + obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o + obj-$(CONFIG_MOXA_SMARTIO) += mxser.o ++obj-$(CONFIG_SIBYTE_SB1250_DUART) += sb1250_duart.o + obj-$(CONFIG_COMPUTONE) += ip2.o ip2main.o + obj-$(CONFIG_RISCOM8) += riscom8.o + obj-$(CONFIG_ISI) += isicom.o +diff -Nurb linux-2.6.16.7/drivers/char/sb1250_duart.c linux-2.6.16.7/drivers/char/sb1250_duart.c +--- linux-2.6.16.7/drivers/char/sb1250_duart.c 1969-12-31 16:00:00.000000000 -0800 ++++ linux-2.6.16.7/drivers/char/sb1250_duart.c 2006-04-28 12:13:49.000000000 -0700 +@@ -0,0 +1,911 @@ ++/* ++ * Copyright (C) 2000,2001,2002,2003,2004 Broadcom Corporation ++ * ++ * 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. ++ */ ++ ++/* ++ * Driver support for the on-chip sb1250 dual-channel serial port, ++ * running in asynchronous mode. Also, support for doing a serial console ++ * on one of those ports ++ */ ++#include <linux/config.h> ++#include <linux/types.h> ++#include <linux/kernel.h> ++#include <linux/serial.h> ++#include <linux/interrupt.h> ++#include <linux/module.h> ++#include <linux/console.h> ++#include <linux/kdev_t.h> ++#include <linux/major.h> ++#include <linux/termios.h> ++#include <linux/spinlock.h> ++#include <linux/irq.h> ++#include <linux/errno.h> ++#include <linux/tty.h> ++#include <linux/sched.h> ++#include <linux/tty_flip.h> ++#include <linux/timer.h> ++#include <linux/init.h> ++#include <linux/mm.h> ++#include <asm/delay.h> ++#include <asm/io.h> ++#include <asm/uaccess.h> ++#include <asm/sibyte/swarm.h> ++#include <asm/sibyte/sb1250.h> ++#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) ++#include <asm/sibyte/bcm1480_regs.h> ++#include <asm/sibyte/bcm1480_int.h> ++#elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) ++#include <asm/sibyte/sb1250_regs.h> ++#include <asm/sibyte/sb1250_int.h> ++#else ++#error invalid SiByte UART configuation ++#endif ++#include <asm/sibyte/sb1250_uart.h> ++#include <asm/war.h> ++ ++#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) ++#define UNIT_CHANREG(n,reg) A_BCM1480_DUART_CHANREG((n),(reg)) ++#define UNIT_IMRREG(n) A_BCM1480_DUART_IMRREG(n) ++#define UNIT_INT(n) (K_BCM1480_INT_UART_0 + (n)) ++#elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) ++#define UNIT_CHANREG(n,reg) A_DUART_CHANREG((n),(reg)) ++#define UNIT_IMRREG(n) A_DUART_IMRREG(n) ++#define UNIT_INT(n) (K_INT_UART_0 + (n)) ++#else ++#error invalid SiByte UART configuation ++#endif ++ ++/* Toggle spewing of debugging output */ ++#undef DEBUG ++ ++#define DEFAULT_CFLAGS (CS8 | B115200) ++ ++#define TX_INTEN 1 ++#define DUART_INITIALIZED 2 ++ ++#define DUART_MAX_LINE 4 ++char sb1250_duart_present[DUART_MAX_LINE]; ++EXPORT_SYMBOL(sb1250_duart_present); ++ ++/* ++ * Still not sure what the termios structures set up here are for, ++ * but we have to supply pointers to them to register the tty driver ++ */ ++static struct tty_driver *sb1250_duart_driver; //, sb1250_duart_callout_driver; ++ ++/* ++ * This lock protects both the open flags for all the uart states as ++ * well as the reference count for the module ++ */ ++static DEFINE_SPINLOCK(open_lock); ++ ++typedef struct { ++ unsigned char outp_buf[SERIAL_XMIT_SIZE]; ++ unsigned int outp_head; ++ unsigned int outp_tail; ++ unsigned int outp_count; ++ spinlock_t outp_lock; ++ unsigned int open; ++ unsigned int line; ++ unsigned int last_cflags; ++ unsigned long flags; ++ struct tty_struct *tty; ++ /* CSR addresses */ ++ volatile u32 *status; ++ volatile u32 *imr; ++ volatile u32 *tx_hold; ++ volatile u32 *rx_hold; ++ volatile u32 *mode_1; ++ volatile u32 *mode_2; ++ volatile u32 *clk_sel; ++ volatile u32 *cmd; ++} uart_state_t; ++ ++static uart_state_t uart_states[DUART_MAX_LINE]; ++ ++/* ++ * Inline functions local to this module ++ */ ++ ++/* ++ * In bug 1956, we get glitches that can mess up uart registers. This ++ * "write-mode-1 after any register access" is the accepted ++ * workaround. ++ */ ++#if SIBYTE_1956_WAR ++static unsigned int last_mode1[DUART_MAX_LINE]; ++#endif ++ ++static inline u32 READ_SERCSR(volatile u32 *addr, int line) ++{ ++ u32 val = csr_in32(addr); ++#if SIBYTE_1956_WAR ++ csr_out32(last_mode1[line], uart_states[line].mode_1); ++#endif ++ return val; ++} ++ ++static inline void WRITE_SERCSR(u32 val, volatile u32 *addr, int line) ++{ ++ csr_out32(val, addr); ++#if SIBYTE_1956_WAR ++ csr_out32(last_mode1[line], uart_states[line].mode_1); ++#endif ++} ++ ++static void init_duart_port(uart_state_t *port, int line) ++{ ++ if (!(port->flags & DUART_INITIALIZED)) { ++ port->line = line; ++ port->status = IOADDR(UNIT_CHANREG(line, R_DUART_STATUS)); ++ port->imr = IOADDR(UNIT_IMRREG(line)); ++ port->tx_hold = IOADDR(UNIT_CHANREG(line, R_DUART_TX_HOLD)); ++ port->rx_hold = IOADDR(UNIT_CHANREG(line, R_DUART_RX_HOLD)); ++ port->mode_1 = IOADDR(UNIT_CHANREG(line, R_DUART_MODE_REG_1)); ++ port->mode_2 = IOADDR(UNIT_CHANREG(line, R_DUART_MODE_REG_2)); ++ port->clk_sel = IOADDR(UNIT_CHANREG(line, R_DUART_CLK_SEL)); ++ port->cmd = IOADDR(UNIT_CHANREG(line, R_DUART_CMD)); ++ port->flags |= DUART_INITIALIZED; ++ } ++} ++ ++/* ++ * Mask out the passed interrupt lines at the duart level. This should be ++ * called while holding the associated outp_lock. ++ */ ++static inline void duart_mask_ints(unsigned int line, unsigned int mask) ++{ ++ uart_state_t *port = uart_states + line; ++ u64 tmp = READ_SERCSR(port->imr, line); ++ WRITE_SERCSR(tmp & ~mask, port->imr, line); ++} ++ ++ ++/* Unmask the passed interrupt lines at the duart level */ ++static inline void duart_unmask_ints(unsigned int line, unsigned int mask) ++{ ++ uart_state_t *port = uart_states + line; ++ u64 tmp = READ_SERCSR(port->imr, line); ++ WRITE_SERCSR(tmp | mask, port->imr, line); ++} ++ ++static inline void transmit_char_pio(uart_state_t *us) ++{ ++ struct tty_struct *tty = us->tty; ++ int blocked = 0; ++ ++ if (spin_trylock(&us->outp_lock)) { ++ for (;;) { ++ if (!(READ_SERCSR(us->status, us->line) & M_DUART_TX_RDY)) ++ break; ++ if (us->outp_count <= 0 || tty->stopped || tty->hw_stopped) { ++ break; ++ } else { ++ WRITE_SERCSR(us->outp_buf[us->outp_head], ++ us->tx_hold, us->line); ++ us->outp_head = (us->outp_head + 1) & (SERIAL_XMIT_SIZE-1); ++ if (--us->outp_count <= 0) ++ break; ++ } ++ udelay(10); ++ } ++ spin_unlock(&us->outp_lock); ++ } else { ++ blocked = 1; ++ } ++ ++ if (!us->outp_count || tty->stopped || ++ tty->hw_stopped || blocked) { ++ us->flags &= ~TX_INTEN; ++ duart_mask_ints(us->line, M_DUART_IMR_TX); ++ } ++ ++ if (us->open && ++ (us->outp_count < (SERIAL_XMIT_SIZE/2))) { ++ /* ++ * We told the discipline at one point that we had no ++ * space, so it went to sleep. Wake it up when we hit ++ * half empty ++ */ ++ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && ++ tty->ldisc.write_wakeup) ++ tty->ldisc.write_wakeup(tty); ++ wake_up_interruptible(&tty->write_wait); ++ } ++} ++ ++/* ++ * Generic interrupt handler for both channels. dev_id is a pointer ++ * to the proper uart_states structure, so from that we can derive ++ * which port interrupted ++ */ ++ ++static irqreturn_t duart_int(int irq, void *dev_id, struct pt_regs *regs) ++{ ++ uart_state_t *us = (uart_state_t *)dev_id; ++ struct tty_struct *tty = us->tty; ++ unsigned int status = READ_SERCSR(us->status, us->line); ++ ++ pr_debug("DUART INT\n"); ++ ++ if (status & M_DUART_RX_RDY) { ++ int counter = 2048; ++ unsigned int ch; ++ ++ if (status & M_DUART_OVRUN_ERR) ++ tty_insert_flip_char(tty, 0, TTY_OVERRUN); ++ if (status & M_DUART_PARITY_ERR) { ++ printk("Parity error!\n"); ++ } else if (status & M_DUART_FRM_ERR) { ++ printk("Frame error!\n"); ++ } ++ ++ while (counter > 0) { ++ if (!(READ_SERCSR(us->status, us->line) & M_DUART_RX_RDY)) ++ break; ++ ch = READ_SERCSR(us->rx_hold, us->line); ++ tty_insert_flip_char(tty, ch, 0); ++ udelay(1); ++ counter--; ++ } ++ tty_flip_buffer_push(tty); ++ } ++ ++ if (status & M_DUART_TX_RDY) { ++ transmit_char_pio(us); ++ } ++ ++ return IRQ_HANDLED; ++} ++ ++/* ++ * Actual driver functions ++ */ ++ ++/* Return the number of characters we can accomodate in a write at this instant */ ++static int duart_write_room(struct tty_struct *tty) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ int retval; ++ ++ retval = SERIAL_XMIT_SIZE - us->outp_count; ++ ++ pr_debug("duart_write_room called, returning %i\n", retval); ++ ++ return retval; ++} ++ ++/* memcpy the data from src to destination, but take extra care if the ++ data is coming from user space */ ++static inline int copy_buf(char *dest, const char *src, int size, int from_user) ++{ ++ if (from_user) { ++ (void) copy_from_user(dest, src, size); ++ } else { ++ memcpy(dest, src, size); ++ } ++ return size; ++} ++ ++/* ++ * Buffer up to count characters from buf to be written. If we don't have ++ * other characters buffered, enable the tx interrupt to start sending ++ */ ++static int duart_write(struct tty_struct *tty, const unsigned char *buf, ++ int count) ++{ ++ uart_state_t *us; ++ int c, t, total = 0; ++ unsigned long flags; ++ ++ if (!tty) return 0; ++ ++ us = tty->driver_data; ++ if (!us) return 0; ++ ++ pr_debug("duart_write called for %i chars by %i (%s)\n", count, current->pid, current->comm); ++ ++ spin_lock_irqsave(&us->outp_lock, flags); ++ ++ for (;;) { ++ c = count; ++ ++ t = SERIAL_XMIT_SIZE - us->outp_tail; ++ if (t < c) c = t; ++ ++ t = SERIAL_XMIT_SIZE - 1 - us->outp_count; ++ if (t < c) c = t; ++ ++ if (c <= 0) break; ++ ++ memcpy(us->outp_buf + us->outp_tail, buf, c); ++ ++ us->outp_count += c; ++ us->outp_tail = (us->outp_tail + c) & (SERIAL_XMIT_SIZE - 1); ++ buf += c; ++ count -= c; ++ total += c; ++ } ++ ++ spin_unlock_irqrestore(&us->outp_lock, flags); ++ ++ if (us->outp_count && !tty->stopped && ++ !tty->hw_stopped && !(us->flags & TX_INTEN)) { ++ us->flags |= TX_INTEN; ++ duart_unmask_ints(us->line, M_DUART_IMR_TX); ++ } ++ ++ return total; ++} ++ ++ ++/* Buffer one character to be written. If there's not room for it, just drop ++ it on the floor. This is used for echo, among other things */ ++static void duart_put_char(struct tty_struct *tty, u_char ch) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ unsigned long flags; ++ ++ pr_debug("duart_put_char called. Char is %x (%c)\n", (int)ch, ch); ++ ++ spin_lock_irqsave(&us->outp_lock, flags); ++ ++ if (us->outp_count == SERIAL_XMIT_SIZE) { ++ spin_unlock_irqrestore(&us->outp_lock, flags); ++ return; ++ } ++ ++ us->outp_buf[us->outp_tail] = ch; ++ us->outp_tail = (us->outp_tail + 1) &(SERIAL_XMIT_SIZE-1); ++ us->outp_count++; ++ ++ spin_unlock_irqrestore(&us->outp_lock, flags); ++} ++ ++static void duart_flush_chars(struct tty_struct * tty) ++{ ++ uart_state_t *port; ++ ++ if (!tty) return; ++ ++ port = tty->driver_data; ++ ++ if (!port) return; ++ ++ if (port->outp_count <= 0 || tty->stopped || tty->hw_stopped) { ++ return; ++ } ++ ++ port->flags |= TX_INTEN; ++ duart_unmask_ints(port->line, M_DUART_IMR_TX); ++} ++ ++/* Return the number of characters in the output buffer that have yet to be ++ written */ ++static int duart_chars_in_buffer(struct tty_struct *tty) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ int retval; ++ ++ retval = us->outp_count; ++ ++ pr_debug("duart_chars_in_buffer returning %i\n", retval); ++ ++ return retval; ++} ++ ++/* Kill everything we haven't yet shoved into the FIFO. Turn off the ++ transmit interrupt since we've nothing more to transmit */ ++static void duart_flush_buffer(struct tty_struct *tty) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ unsigned long flags; ++ ++ pr_debug("duart_flush_buffer called\n"); ++ spin_lock_irqsave(&us->outp_lock, flags); ++ us->outp_head = us->outp_tail = us->outp_count = 0; ++ spin_unlock_irqrestore(&us->outp_lock, flags); ++ ++ wake_up_interruptible(&us->tty->write_wait); ++ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && ++ tty->ldisc.write_wakeup) ++ tty->ldisc.write_wakeup(tty); ++} ++ ++ ++/* See sb1250 user manual for details on these registers */ ++static inline void duart_set_cflag(unsigned int line, unsigned int cflag) ++{ ++ unsigned int mode_reg1 = 0, mode_reg2 = 0; ++ unsigned int clk_divisor; ++ uart_state_t *port = uart_states + line; ++ ++ switch (cflag & CSIZE) { ++ case CS7: ++ mode_reg1 |= V_DUART_BITS_PER_CHAR_7; ++ ++ default: ++ /* We don't handle CS5 or CS6...is there a way we're supposed to flag this? ++ right now we just force them to CS8 */ ++ mode_reg1 |= 0x0; ++ break; ++ } ++ if (cflag & CSTOPB) { ++ mode_reg2 |= M_DUART_STOP_BIT_LEN_2; ++ } ++ if (!(cflag & PARENB)) { ++ mode_reg1 |= V_DUART_PARITY_MODE_NONE; ++ } ++ if (cflag & PARODD) { ++ mode_reg1 |= M_DUART_PARITY_TYPE_ODD; ++ } ++ ++ /* Formula for this is (5000000/baud)-1, but we saturate ++ at 12 bits, which means we can't actually do anything less ++ that 1200 baud */ ++ switch (cflag & CBAUD) { ++ case B200: ++ case B300: ++ case B1200: clk_divisor = 4095; break; ++ case B1800: clk_divisor = 2776; break; ++ case B2400: clk_divisor = 2082; break; ++ case B4800: clk_divisor = 1040; break; ++ default: ++ case B9600: clk_divisor = 519; break; ++ case B19200: clk_divisor = 259; break; ++ case B38400: clk_divisor = 129; break; ++ case B57600: clk_divisor = 85; break; ++ case B115200: clk_divisor = 42; break; ++ } ++ WRITE_SERCSR(mode_reg1, port->mode_1, port->line); ++ WRITE_SERCSR(mode_reg2, port->mode_2, port->line); ++ WRITE_SERCSR(clk_divisor, port->clk_sel, port->line); ++ port->last_cflags = cflag; ++} ++ ++ ++/* Handle notification of a termios change. */ ++static void duart_set_termios(struct tty_struct *tty, struct termios *old) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ ++ pr_debug("duart_set_termios called by %i (%s)\n", current->pid, current->comm); ++ if (old && tty->termios->c_cflag == old->c_cflag) ++ return; ++ duart_set_cflag(us->line, tty->termios->c_cflag); ++} ++ ++static int get_serial_info(uart_state_t *us, struct serial_struct * retinfo) { ++ ++ struct serial_struct tmp; ++ ++ memset(&tmp, 0, sizeof(tmp)); ++ ++ tmp.type=PORT_SB1250; ++ tmp.line=us->line; ++ tmp.port=UNIT_CHANREG(tmp.line,0); ++ tmp.irq=UNIT_INT(tmp.line); ++ tmp.xmit_fifo_size=16; /* fixed by hw */ ++ tmp.baud_base=5000000; ++ tmp.io_type=SERIAL_IO_MEM; ++ ++ if (copy_to_user(retinfo,&tmp,sizeof(*retinfo))) ++ return -EFAULT; ++ ++ return 0; ++} ++ ++static int duart_ioctl(struct tty_struct *tty, struct file * file, ++ unsigned int cmd, unsigned long arg) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ ++/* if (serial_paranoia_check(info, tty->device, "rs_ioctl")) ++ return -ENODEV;*/ ++ switch (cmd) { ++ case TIOCMGET: ++ printk("Ignoring TIOCMGET\n"); ++ break; ++ case TIOCMBIS: ++ printk("Ignoring TIOCMBIS\n"); ++ break; ++ case TIOCMBIC: ++ printk("Ignoring TIOCMBIC\n"); ++ break; ++ case TIOCMSET: ++ printk("Ignoring TIOCMSET\n"); ++ break; ++ case TIOCGSERIAL: ++ return get_serial_info(us,(struct serial_struct *) arg); ++ case TIOCSSERIAL: ++ printk("Ignoring TIOCSSERIAL\n"); ++ break; ++ case TIOCSERCONFIG: ++ printk("Ignoring TIOCSERCONFIG\n"); ++ break; ++ case TIOCSERGETLSR: /* Get line status register */ ++ printk("Ignoring TIOCSERGETLSR\n"); ++ break; ++ case TIOCSERGSTRUCT: ++ printk("Ignoring TIOCSERGSTRUCT\n"); ++ break; ++ case TIOCMIWAIT: ++ printk("Ignoring TIOCMIWAIT\n"); ++ break; ++ case TIOCGICOUNT: ++ printk("Ignoring TIOCGICOUNT\n"); ++ break; ++ case TIOCSERGWILD: ++ printk("Ignoring TIOCSERGWILD\n"); ++ break; ++ case TIOCSERSWILD: ++ printk("Ignoring TIOCSERSWILD\n"); ++ break; ++ default: ++ break; ++ } ++// printk("Ignoring IOCTL %x from pid %i (%s)\n", cmd, current->pid, current->comm); ++ return -ENOIOCTLCMD; ++} ++ ++/* XXXKW locking? */ ++static void duart_start(struct tty_struct *tty) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ ++ pr_debug("duart_start called\n"); ++ ++ if (us->outp_count && !(us->flags & TX_INTEN)) { ++ us->flags |= TX_INTEN; ++ duart_unmask_ints(us->line, M_DUART_IMR_TX); ++ } ++} ++ ++/* XXXKW locking? */ ++static void duart_stop(struct tty_struct *tty) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ ++ pr_debug("duart_stop called\n"); ++ ++ if (us->outp_count && (us->flags & TX_INTEN)) { ++ us->flags &= ~TX_INTEN; ++ duart_mask_ints(us->line, M_DUART_IMR_TX); ++ } ++} ++ ++/* Not sure on the semantics of this; are we supposed to wait until the stuff ++ already in the hardware FIFO drains, or are we supposed to wait until ++ we've drained the output buffer, too? I'm assuming the former, 'cause thats ++ what the other drivers seem to assume ++*/ ++ ++static void duart_wait_until_sent(struct tty_struct *tty, int timeout) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ unsigned long orig_jiffies; ++ ++ orig_jiffies = jiffies; ++ pr_debug("duart_wait_until_sent(%d)+\n", timeout); ++ while (!(READ_SERCSR(us->status, us->line) & M_DUART_TX_EMT)) { ++ set_current_state(TASK_INTERRUPTIBLE); ++ schedule_timeout(1); ++ if (signal_pending(current)) ++ break; ++ if (timeout && time_after(jiffies, orig_jiffies + timeout)) ++ break; ++ } ++ pr_debug("duart_wait_until_sent()-\n"); ++} ++ ++/* ++ * duart_hangup() --- called by tty_hangup() when a hangup is signaled. ++ */ ++static void duart_hangup(struct tty_struct *tty) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ ++ duart_flush_buffer(tty); ++ us->open = 0; ++ us->tty = 0; ++} ++ ++/* ++ * Open a tty line. Note that this can be called multiple times, so ->open can ++ * be >1. Only set up the tty struct if this is a "new" open, e.g. ->open was ++ * zero ++ */ ++static int duart_open(struct tty_struct *tty, struct file *filp) ++{ ++ uart_state_t *us; ++ unsigned int line = tty->index; ++ unsigned long flags; ++ ++ if ((line >= tty->driver->num) || !sb1250_duart_present[line]) ++ return -ENODEV; ++ ++ pr_debug("duart_open called by %i (%s), tty is %p, rw is %p, ww is %p\n", ++ current->pid, current->comm, tty, tty->read_wait, ++ tty->write_wait); ++ ++ us = uart_states + line; ++ tty->driver_data = us; ++ ++ spin_lock_irqsave(&open_lock, flags); ++ if (!us->open) { ++ us->tty = tty; ++ us->tty->termios->c_cflag = us->last_cflags; ++ } ++ us->open++; ++ us->flags &= ~TX_INTEN; ++ duart_unmask_ints(line, M_DUART_IMR_RX); ++ spin_unlock_irqrestore(&open_lock, flags); ++ ++ return 0; ++} ++ ++ ++/* ++ * Close a reference count out. If reference count hits zero, null the ++ * tty, kill the interrupts. The tty_io driver is responsible for making ++ * sure we've cleared out our internal buffers before calling close() ++ */ ++static void duart_close(struct tty_struct *tty, struct file *filp) ++{ ++ uart_state_t *us = (uart_state_t *) tty->driver_data; ++ unsigned long flags; ++ ++ pr_debug("duart_close called by %i (%s)\n", current->pid, current->comm); ++ ++ if (!us || !us->open) ++ return; ++ ++ spin_lock_irqsave(&open_lock, flags); ++ if (tty_hung_up_p(filp)) { ++ spin_unlock_irqrestore(&open_lock, flags); ++ return; ++ } ++ ++ if (--us->open < 0) { ++ us->open = 0; ++ printk(KERN_ERR "duart: bad open count: %d\n", us->open); ++ } ++ if (us->open) { ++ spin_unlock_irqrestore(&open_lock, flags); ++ return; ++ } ++ ++ spin_unlock_irqrestore(&open_lock, flags); ++ ++ tty->closing = 1; ++ ++ /* Stop accepting input */ ++ duart_mask_ints(us->line, M_DUART_IMR_RX); ++ /* Wait for FIFO to drain */ ++ while (!(READ_SERCSR(us->status, us->line) & M_DUART_TX_EMT)) ++ ; ++ ++ if (tty->driver->flush_buffer) ++ tty->driver->flush_buffer(tty); ++ if (tty->ldisc.flush_buffer) ++ tty->ldisc.flush_buffer(tty); ++ tty->closing = 0; ++} ++ ++ ++static struct tty_operations duart_ops = { ++ .open = duart_open, ++ .close = duart_close, ++ .write = duart_write, ++ .put_char = duart_put_char, ++ .flush_chars = duart_flush_chars, ++ .write_room = duart_write_room, ++ .chars_in_buffer = duart_chars_in_buffer, ++ .flush_buffer = duart_flush_buffer, ++ .ioctl = duart_ioctl, ++// .throttle = duart_throttle, ++// .unthrottle = duart_unthrottle, ++ .set_termios = duart_set_termios, ++ .stop = duart_stop, ++ .start = duart_start, ++ .hangup = duart_hangup, ++ .wait_until_sent = duart_wait_until_sent, ++}; ++ ++/* Initialize the sb1250_duart_present array based on SOC type. */ ++static void __init sb1250_duart_init_present_lines(void) ++{ ++ int i, max_lines; ++ ++ /* Set the number of available units based on the SOC type. */ ++ switch (soc_type) { ++ case K_SYS_SOC_TYPE_BCM1x55: ++ case K_SYS_SOC_TYPE_BCM1x80: ++ max_lines = 4; ++ break; ++ default: ++ /* Assume at least two serial ports at the normal address. */ ++ max_lines = 2; ++ break; ++ } ++ if (max_lines > DUART_MAX_LINE) ++ max_lines = DUART_MAX_LINE; ++ ++ for (i = 0; i < max_lines; i++) ++ sb1250_duart_present[i] = 1; ++} ++ ++/* Set up the driver and register it, register the UART interrupts. This ++ is called from tty_init, or as a part of the module init */ ++static int __init sb1250_duart_init(void) ++{ ++ int i; ++ ++ sb1250_duart_init_present_lines(); ++ ++ sb1250_duart_driver = alloc_tty_driver(DUART_MAX_LINE); ++ if (!sb1250_duart_driver) ++ return -ENOMEM; ++ ++ sb1250_duart_driver->owner = THIS_MODULE; ++ sb1250_duart_driver->name = "duart"; ++ sb1250_duart_driver->devfs_name = "duart/"; ++ sb1250_duart_driver->major = TTY_MAJOR; ++ sb1250_duart_driver->minor_start = SB1250_DUART_MINOR_BASE; ++ sb1250_duart_driver->type = TTY_DRIVER_TYPE_SERIAL; ++ sb1250_duart_driver->subtype = SERIAL_TYPE_NORMAL; ++ sb1250_duart_driver->init_termios = tty_std_termios; ++ sb1250_duart_driver->flags = TTY_DRIVER_REAL_RAW; ++ tty_set_operations(sb1250_duart_driver, &duart_ops); ++ ++ for (i=0; i<DUART_MAX_LINE; i++) { ++ uart_state_t *port = uart_states + i; ++ ++ if (!sb1250_duart_present[i]) ++ continue; ++ ++ init_duart_port(port, i); ++ spin_lock_init(&port->outp_lock); ++ duart_mask_ints(i, M_DUART_IMR_ALL); ++ if (request_irq(UNIT_INT(i), duart_int, 0, "uart", port)) { ++ panic("Couldn't get uart0 interrupt line"); ++ } ++ __raw_writeq(M_DUART_RX_EN|M_DUART_TX_EN, ++ IOADDR(UNIT_CHANREG(i, R_DUART_CMD))); ++ duart_set_cflag(i, DEFAULT_CFLAGS); ++ } ++ ++ /* Interrupts are now active, our ISR can be called. */ ++ ++ if (tty_register_driver(sb1250_duart_driver)) { ++ printk(KERN_ERR "Couldn't register sb1250 duart serial driver\n"); ++ put_tty_driver(sb1250_duart_driver); ++ return 1; ++ } ++ return 0; ++} ++ ++/* Unload the driver. Unregister stuff, get ready to go away */ ++static void __exit sb1250_duart_fini(void) ++{ ++ unsigned long flags; ++ int i; ++ ++ local_irq_save(flags); ++ tty_unregister_driver(sb1250_duart_driver); ++ put_tty_driver(sb1250_duart_driver); ++ ++ for (i=0; i<DUART_MAX_LINE; i++) { ++ if (!sb1250_duart_present[i]) ++ continue; ++ free_irq(UNIT_INT(i), &uart_states[i]); ++ disable_irq(UNIT_INT(i)); ++ } ++ local_irq_restore(flags); ++} ++ ++module_init(sb1250_duart_init); ++module_exit(sb1250_duart_fini); ++MODULE_DESCRIPTION("SB1250 Duart serial driver"); ++MODULE_AUTHOR("Broadcom Corp."); ++ ++#ifdef CONFIG_SIBYTE_SB1250_DUART_CONSOLE ++ ++/* ++ * Serial console stuff. Very basic, polling driver for doing serial ++ * console output. The console_sem is held by the caller, so we ++ * shouldn't be interrupted for more console activity. ++ * XXXKW What about getting interrupted by uart driver activity? ++ */ ++ ++void serial_outc(unsigned char c, int line) ++{ ++ uart_state_t *port = uart_states + line; ++ while (!(READ_SERCSR(port->status, line) & M_DUART_TX_RDY)) ; ++ WRITE_SERCSR(c, port->tx_hold, line); ++ while (!(READ_SERCSR(port->status, port->line) & M_DUART_TX_EMT)) ; ++} ++ ++static void ser_console_write(struct console *cons, const char *s, ++ unsigned int count) ++{ ++ int line = cons->index; ++ uart_state_t *port = uart_states + line; ++ u32 imr; ++ ++ imr = READ_SERCSR(port->imr, line); ++ WRITE_SERCSR(0, port->imr, line); ++ while (count--) { ++ if (*s == '\n') ++ serial_outc('\r', line); ++ serial_outc(*s++, line); ++ } ++ WRITE_SERCSR(imr, port->imr, line); ++} ++ ++static struct tty_driver *ser_console_device(struct console *c, int *index) ++{ ++ *index = c->index; ++ return sb1250_duart_driver; ++} ++ ++static int ser_console_setup(struct console *cons, char *str) ++{ ++ int i; ++ ++ sb1250_duart_init_present_lines(); ++ ++ for (i=0; i<DUART_MAX_LINE; i++) { ++ uart_state_t *port = uart_states + i; ++ ++ if (!sb1250_duart_present[i]) ++ continue; ++ ++ init_duart_port(port, i); ++#if SIBYTE_1956_WAR ++ last_mode1[i] = V_DUART_PARITY_MODE_NONE|V_DUART_BITS_PER_CHAR_8; ++#endif ++ WRITE_SERCSR(V_DUART_PARITY_MODE_NONE|V_DUART_BITS_PER_CHAR_8, ++ port->mode_1, i); ++ WRITE_SERCSR(M_DUART_STOP_BIT_LEN_1, ++ port->mode_2, i); ++ WRITE_SERCSR(V_DUART_BAUD_RATE(115200), ++ port->clk_sel, i); ++ WRITE_SERCSR(M_DUART_RX_EN|M_DUART_TX_EN, ++ port->cmd, i); ++ } ++ return 0; ++} ++ ++static struct console sb1250_ser_cons = { ++ .name = "duart", ++ .write = ser_console_write, ++ .device = ser_console_device, ++ .setup = ser_console_setup, ++ .flags = CON_PRINTBUFFER, ++ .index = -1, ++}; ++ ++static int __init sb1250_serial_console_init(void) ++{ ++ register_console(&sb1250_ser_cons); ++ return 0; ++} ++ ++console_initcall(sb1250_serial_console_init); ++ ++#endif /* CONFIG_SIBYTE_SB1250_DUART_CONSOLE */ +diff -Nurb linux-2.6.16.7/include/linux/serial.h linux-2.6.16.7/include/linux/serial.h +--- linux-2.6.16.7/include/linux/serial.h 2006-04-17 14:53:25.000000000 -0700 ++++ linux-2.6.16.7/include/linux/serial.h 2006-04-28 12:25:19.000000000 -0700 +@@ -76,7 +76,8 @@ + #define PORT_16654 11 + #define PORT_16850 12 + #define PORT_RSA 13 /* RSA-DV II/S card */ +-#define PORT_MAX 13 ++#define PORT_SB1250 14 ++#define PORT_MAX 14 + + #define SERIAL_IO_PORT 0 + #define SERIAL_IO_HUB6 1 diff --git a/openwrt/target/linux/sibyte-2.6/patches/001-bcm112x_ax.patch b/openwrt/target/linux/sibyte-2.6/patches/001-bcm112x_ax.patch new file mode 100644 index 00000000000..c80d4aea54f --- /dev/null +++ b/openwrt/target/linux/sibyte-2.6/patches/001-bcm112x_ax.patch @@ -0,0 +1,17 @@ +--- linux-2.6.16.4/arch/mips/sibyte/sb1250/setup.c 2006-04-21 16:16:18.000000000 -0700 ++++ linux-2.6.16.4/arch/mips/sibyte/sb1250/setup.c 2006-04-21 16:15:22.000000000 -0700 +@@ -140,6 +140,14 @@ + periph_rev = 3; + pass_str = "A2"; + break; ++ case K_SYS_REVISION_BCM112x_A3: ++ periph_rev = 3; ++ pass_str = "A3"; ++ break; ++ case K_SYS_REVISION_BCM112x_A4: ++ periph_rev = 3; ++ pass_str = "A4"; ++ break; + default: + prom_printf("Unknown %s rev %x\n", soc_str, soc_pass); + ret = 1; diff --git a/openwrt/target/linux/x86-2.6/Makefile b/openwrt/target/linux/x86-2.6/Makefile index 48417d20c84..2a9ab2c971f 100644 --- a/openwrt/target/linux/x86-2.6/Makefile +++ b/openwrt/target/linux/x86-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.4 +LINUX_VERSION:=2.6.16.7 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=cb675279c9711237a06ebb8379a4da27 +LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e include ../rules.mk include ./config diff --git a/openwrt/target/linux/xscale-2.6/Makefile b/openwrt/target/linux/xscale-2.6/Makefile new file mode 100644 index 00000000000..4f6a5db8337 --- /dev/null +++ b/openwrt/target/linux/xscale-2.6/Makefile @@ -0,0 +1,18 @@ +include $(TOPDIR)/rules.mk + +LINUX_VERSION:=2.6.16.7 +LINUX_RELEASE:=1 +LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e + +include ../rules.mk +include ./config + +include ../generic-$(KERNEL)/modules.mk +include ../kernel.mk + + +$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches + @$(CP) config $(LINUX_DIR)/.config + touch $@ diff --git a/openwrt/target/linux/xscale-2.6/config b/openwrt/target/linux/xscale-2.6/config new file mode 100644 index 00000000000..92d4657e3e9 --- /dev/null +++ b/openwrt/target/linux/xscale-2.6/config @@ -0,0 +1,1363 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.16.4 +# Mon Apr 17 16:00:49 2006 +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +# CONFIG_SHMEM is not set +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_SLAB is not set +CONFIG_TINY_SHMEM=y +CONFIG_BASE_SMALL=0 +CONFIG_SLOB=y +CONFIG_OBSOLETE_INTERMODULE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set + +# +# Block layer +# + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +CONFIG_DEFAULT_NOOP=y +CONFIG_DEFAULT_IOSCHED="noop" + +# +# System Type +# +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +CONFIG_ARCH_IXP4XX=y +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_AT91RM9200 is not set +CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y + +# +# Intel IXP4xx Implementation Options +# + +# +# IXP4xx Platforms +# +# CONFIG_MACH_NSLU2 is not set +# CONFIG_ARCH_AVILA is not set +# CONFIG_ARCH_ADI_COYOTE is not set +CONFIG_MACH_GATEWAY7001=y +# CONFIG_ARCH_IXDP425 is not set +# CONFIG_MACH_IXDPG425 is not set +# CONFIG_MACH_IXDP465 is not set +# CONFIG_ARCH_PRPMC1100 is not set +# CONFIG_MACH_NAS100D is not set +# CONFIG_MACH_GTWX5715 is not set + +# +# IXP4xx Options +# +# CONFIG_IXP4XX_INDIRECT_PCI is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y + +# +# Processor Features +# +# CONFIG_ARM_THUMB is not set +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_XSCALE_PMU=y +CONFIG_DMABOUNCE=y + +# +# Bus support +# +CONFIG_PCI=y +CONFIG_PCI_LEGACY_PROC=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +# CONFIG_NO_IDLE_HZ is not set +# CONFIG_AEABI is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,115200" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# +# CONFIG_PM is not set +# CONFIG_APM is not set + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=m +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_ASK_IP_FIB_HASH is not set +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_IPSEC_NAT_TRAVERSAL=y +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y + +# +# TCP congestion control +# +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_WESTWOOD=y +CONFIG_TCP_CONG_HTCP=m +# CONFIG_TCP_CONG_HSTCP is not set +# CONFIG_TCP_CONG_HYBLA is not set +CONFIG_TCP_CONG_VEGAS=m +# CONFIG_TCP_CONG_SCALABLE is not set + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_IPV6_TUNNEL is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +# CONFIG_NETFILTER_NETLINK_QUEUE is not set +# CONFIG_NETFILTER_NETLINK_LOG is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set +CONFIG_NETFILTER_XT_TARGET_MARK=m +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_HELPER=m +# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_STATE=y +# CONFIG_NETFILTER_XT_MATCH_STRING is not set +CONFIG_NETFILTER_XT_MATCH_TCPMSS=y + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_IRC=y +# CONFIG_IP_NF_NETBIOS_NS is not set +# CONFIG_IP_NF_TFTP is not set +# CONFIG_IP_NF_AMANDA is not set +# CONFIG_IP_NF_PPTP is not set +CONFIG_IP_NF_SIP=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_TOS=m +# CONFIG_IP_NF_MATCH_TIME is not set +# CONFIG_IP_NF_MATCH_RECENT is not set +# CONFIG_IP_NF_MATCH_ECN is not set +# CONFIG_IP_NF_MATCH_DSCP is not set +# CONFIG_IP_NF_MATCH_AH_ESP is not set +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +# CONFIG_IP_NF_MATCH_POLICY is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_IMQ=m +# CONFIG_IP_NF_TARGET_LOG is not set +# CONFIG_IP_NF_TARGET_ULOG is not set +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_REDIRECT=m +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_IRC=y +CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_TARGET_TOS=m +# CONFIG_IP_NF_TARGET_ECN is not set +# CONFIG_IP_NF_TARGET_DSCP is not set +# CONFIG_IP_NF_TARGET_TTL is not set +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_SET is not set + +# +# IPv6: Netfilter Configuration (EXPERIMENTAL) +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_HL is not set +# CONFIG_IP6_NF_MATCH_MULTIPORT is not set +# CONFIG_IP6_NF_MATCH_OWNER is not set +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +# CONFIG_IP6_NF_MATCH_AHESP is not set +# CONFIG_IP6_NF_MATCH_EUI64 is not set +# CONFIG_IP6_NF_MATCH_POLICY is not set +CONFIG_IP6_NF_FILTER=m +# CONFIG_IP6_NF_TARGET_LOG is not set +CONFIG_IP6_NF_TARGET_REJECT=m +# CONFIG_IP6_NF_MANGLE is not set +# CONFIG_IP6_NF_RAW is not set + +# +# Bridge: Netfilter Configuration +# +# CONFIG_BRIDGE_NF_EBTABLES is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=y +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +# CONFIG_NET_SCH_NETEM is not set +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_ESTIMATOR=y + +# +# Network testing +# +CONFIG_NET_PKTGEN=m +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m + +# +# Connector - unified userspace <-> kernelspace linker +# +# CONFIG_CONNECTOR is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y +CONFIG_MTD_REDBOOT_PARTS_READONLY=y +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +CONFIG_MTD_COMPLEX_MAPPINGS=y +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +CONFIG_MTD_IXP4XX=y +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 +# CONFIG_TUN is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# +# CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_SMC91X is not set +# CONFIG_DM9000 is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2200=m +# CONFIG_IPW2200_DEBUG is not set +# CONFIG_HERMES is not set +# CONFIG_ATMEL is not set + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +# CONFIG_PRISM54 is not set +# CONFIG_HOSTAP is not set +CONFIG_NET_WIRELESS=y + +# +# Wan interfaces +# +CONFIG_WAN=y +# CONFIG_DSCC4 is not set +# CONFIG_LANMEDIA is not set +# CONFIG_SYNCLINK_SYNCPPP is not set +CONFIG_HDLC=m +CONFIG_HDLC_RAW=y +# CONFIG_HDLC_RAW_ETH is not set +CONFIG_HDLC_CISCO=y +CONFIG_HDLC_FR=y +CONFIG_HDLC_PPP=y + +# +# X.25/LAPB support is disabled +# +# CONFIG_PCI200SYN is not set +# CONFIG_WANXL is not set +# CONFIG_PC300 is not set +# CONFIG_FARSYNC is not set +CONFIG_DLCI=m +CONFIG_DLCI_COUNT=24 +CONFIG_DLCI_MAX=8 +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +# CONFIG_INPUT is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_IXP4XX_WATCHDOG=y + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Misc devices +# + +# +# Multimedia Capabilities Port drivers +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_BANDWIDTH=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=m +# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_UHCI_HCD=m +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TEST is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=m +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=m +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +# CONFIG_NFSD_V3 is not set +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=m +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_USER is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff --git a/openwrt/target/linux/xscale-2.6/patches/001-gateway_7001.patch b/openwrt/target/linux/xscale-2.6/patches/001-gateway_7001.patch new file mode 100644 index 00000000000..89426790008 --- /dev/null +++ b/openwrt/target/linux/xscale-2.6/patches/001-gateway_7001.patch @@ -0,0 +1,159 @@ +diff -Nur linux-2.6.16.4/arch/arm/boot/compressed/head-xscale.S linux-2.6.16.4-owrt/arch/arm/boot/compressed/head-xscale.S +--- linux-2.6.16.4/arch/arm/boot/compressed/head-xscale.S 2006-04-11 19:19:28.000000000 +0200 ++++ linux-2.6.16.4-owrt/arch/arm/boot/compressed/head-xscale.S 2006-04-16 16:51:05.000000000 +0200 +@@ -47,6 +47,11 @@ + orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00) + #endif + ++#ifdef CONFIG_MACH_GATEWAY7001 ++ mov r7, #(MACH_TYPE_GATEWAY7001 & 0xff) ++ orr r7, r7, #(MACH_TYPE_GATEWAY7001 & 0xff00) ++#endif ++ + #ifdef CONFIG_ARCH_IXP2000 + mov r1, #-1 + mov r0, #0xd6000000 +diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c +--- linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-pci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c 2006-04-17 19:21:55.000000000 +0200 +@@ -0,0 +1,67 @@ ++/* ++ * arch/arch/mach-ixp4xx/gateway7001-pci.c ++ * ++ * PCI setup routines for Gateway 7001 ++ * ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * ++ * based on coyote-pci.c: ++ * Copyright (C) 2002 Jungo Software Technologies. ++ * Copyright (C) 2003 MontaVista Softwrae, Inc. ++ * ++ * Maintainer: Imre Kaloz <kaloz@openwrt.org> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/pci.h> ++#include <linux/init.h> ++ ++#include <asm/mach-types.h> ++#include <asm/hardware.h> ++#include <asm/irq.h> ++ ++#include <asm/mach/pci.h> ++ ++extern void ixp4xx_pci_preinit(void); ++extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); ++extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); ++ ++void __init gateway7001_pci_preinit(void) ++{ ++ set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW); ++ set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW); ++ ++ ixp4xx_pci_preinit(); ++} ++ ++static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ++{ ++ if (slot == 0) ++ return IRQ_IXP4XX_GPIO10; ++ else if (slot == 1) ++ return IRQ_IXP4XX_GPIO11; ++ else return -1; ++} ++ ++struct hw_pci gateway7001_pci __initdata = { ++ .nr_controllers = 1, ++ .preinit = gateway7001_pci_preinit, ++ .swizzle = pci_std_swizzle, ++ .setup = ixp4xx_setup, ++ .scan = ixp4xx_scan_bus, ++ .map_irq = gateway7001_map_irq, ++}; ++ ++int __init gateway7001_pci_init(void) ++{ ++ if (machine_is_gateway7001()) ++ pci_common_init(&gateway7001_pci); ++ return 0; ++} ++ ++subsys_initcall(gateway7001_pci_init); +diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/Kconfig linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Kconfig +--- linux-2.6.16.4/arch/arm/mach-ixp4xx/Kconfig 2006-04-11 19:19:28.000000000 +0200 ++++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Kconfig 2006-04-16 15:58:37.000000000 +0200 +@@ -30,6 +30,13 @@ + Engineering Coyote Gateway Reference Platform. For more + information on this platform, see <file:Documentation/arm/IXP4xx>. + ++config MACH_GATEWAY7001 ++ bool "Gateway 7001" ++ help ++ Say 'Y' here if you want your kernel to support Gateway's ++ 7001 Access Point. For more information on this platform, ++ see http://openwrt.org ++ + config ARCH_IXDP425 + bool "IXDP425" + help +diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/Makefile linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Makefile +--- linux-2.6.16.4/arch/arm/mach-ixp4xx/Makefile 2006-04-11 19:19:28.000000000 +0200 ++++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Makefile 2006-04-16 16:03:42.000000000 +0200 +@@ -10,4 +10,5 @@ + obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o + obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o + obj-$(CONFIG_MACH_NAS100D) += nas100d-pci.o nas100d-setup.o nas100d-power.o ++obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o coyote-setup.o + +diff -Nur linux-2.6.16.4/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/uncompress.h +--- linux-2.6.16.4/include/asm-arm/arch-ixp4xx/uncompress.h 2006-04-11 19:19:28.000000000 +0200 ++++ linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2006-04-16 16:25:34.000000000 +0200 +@@ -48,7 +48,7 @@ + /* + * Coyote and gtwx5715 only have UART2 connected + */ +- if (machine_is_adi_coyote() || machine_is_gtwx5715()) ++ if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001()) + uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; + else + uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS; +diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/coyote-setup.c +--- linux-2.6.16.4/arch/arm/mach-ixp4xx/coyote-setup.c 2006-04-11 19:19:28.000000000 +0200 ++++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/coyote-setup.c 2006-04-16 16:03:23.000000000 +0200 +@@ -1,9 +1,10 @@ + /* + * arch/arm/mach-ixp4xx/coyote-setup.c + * +- * Board setup for ADI Engineering and IXDGP425 boards ++ * Board setup for ADI Engineering, IXDGP425 and Gateway 7001 boards + * + * Copyright (C) 2003-2005 MontaVista Software, Inc. ++ * Copyright (C) 2006 Imre Kaloz <Kaloz@openwrt.org> + * + * Author: Deepak Saxena <dsaxena@plexity.net> + */ +@@ -111,6 +112,19 @@ + MACHINE_END + #endif + ++#ifdef CONFIG_MACH_GATEWAY7001 ++MACHINE_START(GATEWAY7001, "Gateway 7001") ++ /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ ++ .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, ++ .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, ++ .map_io = ixp4xx_map_io, ++ .init_irq = ixp4xx_init_irq, ++ .timer = &ixp4xx_timer, ++ .boot_params = 0x0100, ++ .init_machine = coyote_init, ++MACHINE_END ++#endif ++ + /* + * IXDPG425 is identical to Coyote except for which serial port + * is connected. From e874a83da2412a8399edbd9971206c934c09212c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 19:41:55 +0000 Subject: [PATCH 089/757] remove old Config.in files SVN-Revision: 3845 --- openwrt/package/base-files/Config.in | 7 ------- openwrt/package/linux-atm/Config.in | 22 ---------------------- openwrt/package/wificonf/Config.in | 8 -------- 3 files changed, 37 deletions(-) delete mode 100644 openwrt/package/base-files/Config.in delete mode 100644 openwrt/package/linux-atm/Config.in delete mode 100644 openwrt/package/wificonf/Config.in diff --git a/openwrt/package/base-files/Config.in b/openwrt/package/base-files/Config.in deleted file mode 100644 index 1dd6ff5360c..00000000000 --- a/openwrt/package/base-files/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config PACKAGE_LIBGCC - prompt "libgcc............................ GCC support library" - tristate - default m if DEVEL - help - GCC support library - diff --git a/openwrt/package/linux-atm/Config.in b/openwrt/package/linux-atm/Config.in deleted file mode 100644 index e9769b5da49..00000000000 --- a/openwrt/package/linux-atm/Config.in +++ /dev/null @@ -1,22 +0,0 @@ -config PACKAGE_LINUX_ATM - prompt "linux-atm......................... ATM Library/Utilities for Linux" - tristate - default y if LINUX_2_4_AR7 - default n - help - ATM Library for linux - - http://ftp.debian.org/debian/pool/main/l/linux-atm/ - -config PACKAGE_BR2684CTL - prompt "br2684ctl....................... RFC2684 bridging utility" - tristate - default y if LINUX_2_4_AR7 - default n - depends PACKAGE_LINUX_ATM - help - Utility for setting up ATM RFC2684 bridging mode - Useful for PPPoE - - http://ftp.debian.org/debian/pool/main/l/linux-atm/ - diff --git a/openwrt/package/wificonf/Config.in b/openwrt/package/wificonf/Config.in deleted file mode 100644 index e401cee7c29..00000000000 --- a/openwrt/package/wificonf/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config PACKAGE_WIFICONF - prompt "wificonf.......................... replacement utility for wlconf" - tristate - default y - depends PACKAGE_NVRAM - help - Replacement utility for wlconf - From 31c5f70b25b2e9291071c90eba18f75eddd10178 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 19:50:48 +0000 Subject: [PATCH 090/757] convert linux-atm to new format SVN-Revision: 3846 --- openwrt/package/linux-atm/Makefile | 87 +++++++------------ .../package/linux-atm/ipkg/br2684ctl.control | 4 - .../package/linux-atm/ipkg/linux-atm.control | 4 - 3 files changed, 32 insertions(+), 63 deletions(-) delete mode 100644 openwrt/package/linux-atm/ipkg/br2684ctl.control delete mode 100644 openwrt/package/linux-atm/ipkg/linux-atm.control diff --git a/openwrt/package/linux-atm/Makefile b/openwrt/package/linux-atm/Makefile index 43dd6910e2f..9d9aa6576b4 100644 --- a/openwrt/package/linux-atm/Makefile +++ b/openwrt/package/linux-atm/Makefile @@ -16,76 +16,53 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,LINUX_ATM,linux-atm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(eval $(call PKG_template,BR2684CTL,br2684ctl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +define Package/linux-atm + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Linux ATM Library + DESCRIPTION:=Library for accessing the Linux ATM subsystem +endef -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include/ \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - ) - touch $@ +define Package/br2684ctl + SECTION:=net + CATEGORY:=Network + TITLE:=RFC2684 bridging + DEPENDS:=+linux-atm + DESCRIPTION:=ATM RFC2684 bridging utility +endef -$(PKG_BUILD_DIR)/.built: +define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install - touch $@ +endef -$(IPKG_LINUX_ATM): - install -d -m0755 $(IDIR_LINUX_ATM)/usr/lib - cp -f $(PKG_INSTALL_DIR)/usr/lib/libatm.so.1 $(IDIR_LINUX_ATM)/usr/lib - $(RSTRIP) $(IDIR_LINUX_ATM)/ - $(IPKG_BUILD) $(IDIR_LINUX_ATM) $(PACKAGE_DIR) +define Package/linux-atm/install + install -d -m0755 $(1)/usr/lib + cp -f $(PKG_INSTALL_DIR)/usr/lib/libatm.so.1 $(1)/usr/lib +endef -$(IPKG_BR2684CTL): - install -d -m0755 $(IDIR_BR2684CTL)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl $(IDIR_BR2684CTL)/usr/sbin/ - install -d -m0755 $(IDIR_BR2684CTL)/etc/hotplug.d/net - install -m0644 ./files/br2684.init $(IDIR_BR2684CTL)/etc/hotplug.d/net/30-br2684 - $(RSTRIP) $(IDIR_BR2684CTL)/ - $(IPKG_BUILD) $(IDIR_BR2684CTL) $(PACKAGE_DIR) +define Package/br2684ctl/install + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl $(1)/usr/sbin/ + install -d -m0755 $(1)/etc/hotplug.d/net + install -m0644 ./files/br2684.init $(1)/etc/hotplug.d/net/30-br2684 +endef -$(STAGING_DIR)/usr/lib/libatm.so: $(PKG_BUILD_DIR)/.built +define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/atm{,d,sap}.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.{a,so*} $(STAGING_DIR)/usr/lib/ - touch $@ +endef -install-dev: $(STAGING_DIR)/usr/lib/libatm.so - -uninstall-dev: +define Build/UninstallDev rm -rf \ $(STAGING_DIR)/usr/include/atm{,d,sap}.h \ - $(STAGING_DIR)/usr/lib/libatm.{a,so*} \ - -compile-targets: install-dev -clean-targets: uninstall-dev - -mostlyclean: - $(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built + $(STAGING_DIR)/usr/lib/libatm.{a,so*} +endef +$(eval $(call BuildPackage,linux-atm)) +$(eval $(call BuildPackage,br2684ctl)) diff --git a/openwrt/package/linux-atm/ipkg/br2684ctl.control b/openwrt/package/linux-atm/ipkg/br2684ctl.control deleted file mode 100644 index 444dc07ab20..00000000000 --- a/openwrt/package/linux-atm/ipkg/br2684ctl.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: br2684ctl -Priority: optional -Section: net -Description: Utility for configuring the ATM RFC2684 bridging diff --git a/openwrt/package/linux-atm/ipkg/linux-atm.control b/openwrt/package/linux-atm/ipkg/linux-atm.control deleted file mode 100644 index 616471a2b4e..00000000000 --- a/openwrt/package/linux-atm/ipkg/linux-atm.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: linux-atm -Priority: optional -Section: net -Description: ATM library for linux From c34681eec37096e90585a0fcd68c3279d71e1736 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 19:58:11 +0000 Subject: [PATCH 091/757] fix missing variable SVN-Revision: 3847 --- openwrt/package/wireless-tools/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index 17b59f841f2..4839563e74c 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -12,6 +12,8 @@ PKG_SOURCE_URL:=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux PKG_MD5SUM:=599c94497f9c9073c7b052d3dcb7cd16 PKG_CAT:=zcat +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + include $(TOPDIR)/package/rules.mk define Package/wireless-tools From 04fbcf5b01757ed03a2f3f1e80197da1ee46a6b9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 20:22:43 +0000 Subject: [PATCH 092/757] allow more complex defaults in menuconfig SVN-Revision: 3848 --- openwrt/scripts/gen_menuconfig.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index a7f939ff52d..c40e1caedce 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -24,7 +24,9 @@ sub print_category($) { $pkg->{menu} and print "menu"; print "config PACKAGE_".$pkg->{name}."\n"; print "\t\ttristate \"$title\"\n"; - print "\t\tdefault ".$pkg->{default}."\n"; + foreach my $default (split /\s*,\s*/, $pkg->{default}) { + print "\t\tdefault $default\n"; + } foreach my $depend (@{$pkg->{depends}}) { my $m = "depends"; $depend =~ s/^([@\+])//; From 921ba8d51636a2b39b75978af6e0cc20d426d572 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 20:22:58 +0000 Subject: [PATCH 093/757] convert base-files to new format SVN-Revision: 3849 --- openwrt/package/base-files/Makefile | 136 ++++++++---------- .../base-files/ipkg/base-files.conffiles | 9 -- .../base-files/ipkg/base-files.control | 4 - .../package/base-files/ipkg/libgcc.control | 5 - .../package/base-files/ipkg/uclibc.control | 5 - 5 files changed, 63 insertions(+), 96 deletions(-) delete mode 100644 openwrt/package/base-files/ipkg/base-files.conffiles delete mode 100644 openwrt/package/base-files/ipkg/base-files.control delete mode 100644 openwrt/package/base-files/ipkg/libgcc.control delete mode 100644 openwrt/package/base-files/ipkg/uclibc.control diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 90820cf91dc..252fa7eba58 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -3,12 +3,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files -BOARD:=$(shell LANG=C grep ^CONFIG_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ +BOARD:=$(shell LANG=C grep ^CONFIG_LINUX_2_._ $(TOPDIR)/.config|sed -e "s/=y//" \ -e "s/.*_//"| tr "[:upper:]" "[:lower:]") -KERNEL:=$(shell LANG=C grep ^CONFIG_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ +KERNEL:=$(shell LANG=C grep ^CONFIG_LINUX_2_._ $(TOPDIR)/.config|sed -e "s/=y//" \ -e "s/CONFIG_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) @@ -18,87 +18,77 @@ endif include $(TOPDIR)/package/rules.mk -IDIR_BASE:=$(PKG_BUILD_DIR)/base-files -IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk +define Package/base-files + SECTION:=base + CATEGORY:=Base system + DEFAULT:=y + TITLE:=OpenWrt system scripts + DESCRIPTION:=OpenWrt system scripts +endef -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -IDIR_UCLIBC:=$(PKG_BUILD_DIR)/uclibc -IPKG_UCLIBC:=$(PACKAGE_DIR)/uclibc_$(UCLIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -IDIR_LIBGCC:=$(PKG_BUILD_DIR)/libgcc -IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk +define Package/libgcc + SECTION:=libs + CATEGORY:=Libraries + DEFAULT:=m, y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0 + TITLE:=GCC support library + VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) + DESCRIPTION:=$(TITLE) +endef -PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) -PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC) +define Package/uclibc + $(call Package/base-files) + VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + TITLE:=C library + DESCRIPTION:=C library for embedded systems +endef -ifeq ($(CONFIG_PACKAGE_LIBGCC),y) -PACKAGES+=$(IPKG_LIBGCC) -PACKAGES_INSTALL+=$(IPKG_LIBGCC) -endif -ifeq ($(CONFIG_PACKAGE_LIBGCC),m) -PACKAGES+=$(IPKG_LIBGCC) -endif -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) - touch $@ +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ +define Build/Compile +endef -$(PKG_BUILD_DIR)/.built: - touch $@ +define Package/base-files/install + $(CP) ./default/* $(1) + $(SED) 's,$$R,r$(REV),g' $(1)/etc/banner + $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf + mkdir -p $(1)/dev + mkdir -p $(1)/etc/crontabs + mkdir -p $(1)/jffs + mkdir -p $(1)/lib + mkdir -p $(1)/mnt + mkdir -p $(1)/proc + mkdir -p $(1)/tmp + mkdir -p $(1)/usr/lib + mkdir -p $(1)/usr/bin + mkdir -p $(1)/sys + mkdir -p $(1)/www + ln -sf /tmp/resolv.conf $(1)/etc/resolv.conf + ln -sf /proc/mounts $(1)/etc/mtab + rm -f $(1)/var + ln -sf /tmp $(1)/var + -find $(1) -type d -name CVS | xargs rm -rf + -find $(1) -type d -name .svn | xargs rm -rf + -find $(1) -name '.#*' | xargs rm -f + mkdir -p $(1)/etc +endef -$(IPKG_BASE): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH) - $(CP) ./default/* $(IDIR_BASE) - $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner - $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf - mkdir -p $(IDIR_BASE)/dev - mkdir -p $(IDIR_BASE)/etc/crontabs - mkdir -p $(IDIR_BASE)/jffs - mkdir -p $(IDIR_BASE)/lib - mkdir -p $(IDIR_BASE)/mnt - mkdir -p $(IDIR_BASE)/proc - mkdir -p $(IDIR_BASE)/tmp - mkdir -p $(IDIR_BASE)/usr/lib - mkdir -p $(IDIR_BASE)/usr/bin - mkdir -p $(IDIR_BASE)/sys - mkdir -p $(IDIR_BASE)/www - ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf - ln -sf /proc/mounts $(IDIR_BASE)/etc/mtab - rm -f $(IDIR_BASE)/var - ln -sf /tmp $(IDIR_BASE)/var - -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf - -find $(IDIR_BASE) -type d -name .svn | xargs rm -rf - -find $(IDIR_BASE) -name '.#*' | xargs rm -f - mkdir -p $(IDIR_BASE)/etc - $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR) - -$(IPKG_UCLIBC): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_UCLIBC) ipkg/uclibc.control $(UCLIBC_VERSION)-$(PKG_RELEASE) $(ARCH) - mkdir -p $(IDIR_UCLIBC)/lib +define Package/uclibc/install + mkdir -p $(1)/lib for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \ - $(CP) $(STAGING_DIR)/lib/$$file.so.* $(IDIR_UCLIBC)/lib/; \ - $(CP) $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(IDIR_UCLIBC)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$file.so.* $(1)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(1)/lib/; \ done - -$(STRIP) $(IDIR_UCLIBC)/lib/* - $(IPKG_BUILD) $(IDIR_UCLIBC) $(PACKAGE_DIR) +endef -$(IPKG_LIBGCC): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBGCC) ipkg/libgcc.control $(LIBGCC_VERSION)-$(PKG_RELEASE) $(ARCH) +define Package/libgcc/install mkdir -p $(IDIR_LIBGCC)/lib $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_LIBGCC)/lib/ - -$(STRIP) $(IDIR_LIBGCC)/lib/* - $(IPKG_BUILD) $(IDIR_LIBGCC) $(PACKAGE_DIR) +endef -package-clean: - rm -f $(PACKAGES) - -clean-targets: package-clean -prepare: -compile-targets: $(PACKAGES) -install-targets: compile - mkdir -p $(TARGET_DIR) - $(IPKG) install $(PACKAGES_INSTALL) +$(eval $(call BuildPackage,base-files)) +$(eval $(call BuildPackage,libgcc)) +$(eval $(call BuildPackage,uclibc)) diff --git a/openwrt/package/base-files/ipkg/base-files.conffiles b/openwrt/package/base-files/ipkg/base-files.conffiles deleted file mode 100644 index d34e3479a86..00000000000 --- a/openwrt/package/base-files/ipkg/base-files.conffiles +++ /dev/null @@ -1,9 +0,0 @@ -/etc/config/network -/etc/group -/etc/hosts -/etc/ipkg.conf -/etc/modules -/etc/passwd -/etc/profile -/etc/protocols -/etc/sysctl.conf diff --git a/openwrt/package/base-files/ipkg/base-files.control b/openwrt/package/base-files/ipkg/base-files.control deleted file mode 100644 index 58f4b6f1b73..00000000000 --- a/openwrt/package/base-files/ipkg/base-files.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: base-files -Priority: optional -Section: net -Description: OpenWrt filesystem structure and scripts diff --git a/openwrt/package/base-files/ipkg/libgcc.control b/openwrt/package/base-files/ipkg/libgcc.control deleted file mode 100644 index a70362afed4..00000000000 --- a/openwrt/package/base-files/ipkg/libgcc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libgcc -Priority: optional -Section: net -Depends: base-files -Description: GCC support library diff --git a/openwrt/package/base-files/ipkg/uclibc.control b/openwrt/package/base-files/ipkg/uclibc.control deleted file mode 100644 index 1cdfe157cb4..00000000000 --- a/openwrt/package/base-files/ipkg/uclibc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: uclibc -Priority: optional -Section: net -Depends: base-files -Description: Standard C library for embedded Linux systems From 802f75b98c7b72986aab5e93e3c2c03f0b476e09 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 20:23:43 +0000 Subject: [PATCH 094/757] remove wificonf (will be replaced by wlc later) SVN-Revision: 3850 --- openwrt/package/wificonf/Makefile | 27 - .../package/wificonf/include/proto/802.11.h | 930 ------------- .../package/wificonf/include/proto/bcmeth.h | 103 -- .../package/wificonf/include/proto/bcmevent.h | 147 -- .../package/wificonf/include/proto/bcmip.h | 42 - .../package/wificonf/include/proto/ethernet.h | 171 --- openwrt/package/wificonf/include/proto/vlan.h | 50 - openwrt/package/wificonf/include/proto/wpa.h | 140 -- openwrt/package/wificonf/include/wlioctl.h | 1238 ----------------- .../package/wificonf/ipkg/wificonf.control | 5 - openwrt/package/wificonf/wificonf.c | 1026 -------------- 11 files changed, 3879 deletions(-) delete mode 100644 openwrt/package/wificonf/Makefile delete mode 100644 openwrt/package/wificonf/include/proto/802.11.h delete mode 100644 openwrt/package/wificonf/include/proto/bcmeth.h delete mode 100644 openwrt/package/wificonf/include/proto/bcmevent.h delete mode 100644 openwrt/package/wificonf/include/proto/bcmip.h delete mode 100644 openwrt/package/wificonf/include/proto/ethernet.h delete mode 100644 openwrt/package/wificonf/include/proto/vlan.h delete mode 100644 openwrt/package/wificonf/include/proto/wpa.h delete mode 100644 openwrt/package/wificonf/include/wlioctl.h delete mode 100644 openwrt/package/wificonf/ipkg/wificonf.control delete mode 100644 openwrt/package/wificonf/wificonf.c diff --git a/openwrt/package/wificonf/Makefile b/openwrt/package/wificonf/Makefile deleted file mode 100644 index dc61267a73e..00000000000 --- a/openwrt/package/wificonf/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wificonf -PKG_RELEASE:=5 - -PKG_BUILD_DIR:=$(BUILD_DIR)/wificonf - -include $(TOPDIR)/package/rules.mk - -define Package/wificonf -SECTION:=base -CATEGORY:=Network -DEPENDS:=nvram +wireless-tools -TITLE:=replacement utility for wlconf -DESCRIPTION:=Replacement utility for wlconf -endef - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) -Iinclude/ -I$(STAGING_DIR)/usr/include -o $(PKG_BUILD_DIR)/wifi wificonf.c -L$(STAGING_DIR)/usr/lib -lnvram -lshared $(STAGING_DIR)/usr/lib/libiw.so -endef - -define Package/wificonf/install - install -d -m0755 $(1)/sbin - install -m0755 $(PKG_BUILD_DIR)/wifi $(1)/sbin/ -endef diff --git a/openwrt/package/wificonf/include/proto/802.11.h b/openwrt/package/wificonf/include/proto/802.11.h deleted file mode 100644 index ac2b898e2e7..00000000000 --- a/openwrt/package/wificonf/include/proto/802.11.h +++ /dev/null @@ -1,930 +0,0 @@ -/* - * Copyright 2005, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * Fundamental types and constants relating to 802.11 - * - * $Id$ - */ - -#ifndef _802_11_H_ -#define _802_11_H_ - -#ifndef _TYPEDEFS_H_ -#include <typedefs.h> -#endif - -#ifndef _NET_ETHERNET_H_ -#include <proto/ethernet.h> -#endif - -#include <proto/wpa.h> - - -/* enable structure packing */ -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#pragma pack(1) -#define PACKED -#endif - -#define DOT11_TU_TO_US 1024 /* 802.11 Time Unit is 1024 microseconds */ - -/* Generic 802.11 frame constants */ -#define DOT11_A3_HDR_LEN 24 -#define DOT11_A4_HDR_LEN 30 -#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN -#define DOT11_FCS_LEN 4 -#define DOT11_ICV_LEN 4 -#define DOT11_ICV_AES_LEN 8 -#define DOT11_QOS_LEN 2 - -#define DOT11_KEY_INDEX_SHIFT 6 -#define DOT11_IV_LEN 4 -#define DOT11_IV_TKIP_LEN 8 -#define DOT11_IV_AES_OCB_LEN 4 -#define DOT11_IV_AES_CCM_LEN 8 - -/* Includes MIC */ -#define DOT11_MAX_MPDU_BODY_LEN 2304 -/* A4 header + QoS + CCMP + PDU + ICV + FCS = 2352 */ -#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \ - DOT11_QOS_LEN + \ - DOT11_IV_AES_CCM_LEN + \ - DOT11_MAX_MPDU_BODY_LEN + \ - DOT11_ICV_LEN + \ - DOT11_FCS_LEN) - -#define DOT11_MAX_SSID_LEN 32 - -/* dot11RTSThreshold */ -#define DOT11_DEFAULT_RTS_LEN 2347 -#define DOT11_MAX_RTS_LEN 2347 - -/* dot11FragmentationThreshold */ -#define DOT11_MIN_FRAG_LEN 256 -#define DOT11_MAX_FRAG_LEN 2346 /* Max frag is also limited by aMPDUMaxLength of the attached PHY */ -#define DOT11_DEFAULT_FRAG_LEN 2346 - -/* dot11BeaconPeriod */ -#define DOT11_MIN_BEACON_PERIOD 1 -#define DOT11_MAX_BEACON_PERIOD 0xFFFF - -/* dot11DTIMPeriod */ -#define DOT11_MIN_DTIM_PERIOD 1 -#define DOT11_MAX_DTIM_PERIOD 0xFF - -/* 802.2 LLC/SNAP header used by 802.11 per 802.1H */ -#define DOT11_LLC_SNAP_HDR_LEN 8 -#define DOT11_OUI_LEN 3 -struct dot11_llc_snap_header { - uint8 dsap; /* always 0xAA */ - uint8 ssap; /* always 0xAA */ - uint8 ctl; /* always 0x03 */ - uint8 oui[DOT11_OUI_LEN]; /* RFC1042: 0x00 0x00 0x00 - Bridge-Tunnel: 0x00 0x00 0xF8 */ - uint16 type; /* ethertype */ -} PACKED; - -/* RFC1042 header used by 802.11 per 802.1H */ -#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN) - -/* Generic 802.11 MAC header */ -/* - * N.B.: This struct reflects the full 4 address 802.11 MAC header. - * The fields are defined such that the shorter 1, 2, and 3 - * address headers just use the first k fields. - */ -struct dot11_header { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr a1; /* address 1 */ - struct ether_addr a2; /* address 2 */ - struct ether_addr a3; /* address 3 */ - uint16 seq; /* sequence control */ - struct ether_addr a4; /* address 4 */ -} PACKED; - -/* Control frames */ - -struct dot11_rts_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ - struct ether_addr ta; /* transmitter address */ -} PACKED; -#define DOT11_RTS_LEN 16 - -struct dot11_cts_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ -} PACKED; -#define DOT11_CTS_LEN 10 - -struct dot11_ack_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ -} PACKED; -#define DOT11_ACK_LEN 10 - -struct dot11_ps_poll_frame { - uint16 fc; /* frame control */ - uint16 durid; /* AID */ - struct ether_addr bssid; /* receiver address, STA in AP */ - struct ether_addr ta; /* transmitter address */ -} PACKED; -#define DOT11_PS_POLL_LEN 16 - -struct dot11_cf_end_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ - struct ether_addr bssid; /* transmitter address, STA in AP */ -} PACKED; -#define DOT11_CS_END_LEN 16 - -/* Management frame header */ -struct dot11_management_header { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr da; /* receiver address */ - struct ether_addr sa; /* transmitter address */ - struct ether_addr bssid; /* BSS ID */ - uint16 seq; /* sequence control */ -} PACKED; -#define DOT11_MGMT_HDR_LEN 24 - -/* Management frame payloads */ - -struct dot11_bcn_prb { - uint32 timestamp[2]; - uint16 beacon_interval; - uint16 capability; -} PACKED; -#define DOT11_BCN_PRB_LEN 12 - -struct dot11_auth { - uint16 alg; /* algorithm */ - uint16 seq; /* sequence control */ - uint16 status; /* status code */ -} PACKED; -#define DOT11_AUTH_FIXED_LEN 6 /* length of auth frame without challenge info elt */ - -struct dot11_assoc_req { - uint16 capability; /* capability information */ - uint16 listen; /* listen interval */ -} PACKED; -#define DOT11_ASSOC_REQ_FIXED_LEN 4 /* length of assoc frame without info elts */ - -struct dot11_reassoc_req { - uint16 capability; /* capability information */ - uint16 listen; /* listen interval */ - struct ether_addr ap; /* Current AP address */ -} PACKED; -#define DOT11_REASSOC_REQ_FIXED_LEN 10 /* length of assoc frame without info elts */ - -struct dot11_assoc_resp { - uint16 capability; /* capability information */ - uint16 status; /* status code */ - uint16 aid; /* association ID */ -} PACKED; - -struct dot11_action_measure { - uint8 category; - uint8 action; - uint8 token; - uint8 data[1]; -} PACKED; -#define DOT11_ACTION_MEASURE_LEN 3 - -struct dot11_action_switch_channel { - uint8 category; - uint8 action; - uint8 data[5]; /* for switch IE */ -} PACKED; - -/************** - 802.11h related definitions. -**************/ -typedef struct { - uint8 id; - uint8 len; - uint8 power; -} dot11_power_cnst_t; - -typedef struct { - uint8 min; - uint8 max; -} dot11_power_cap_t; - -typedef struct { - uint8 id; - uint8 len; - uint8 tx_pwr; - uint8 margin; -} dot11_tpc_rep_t; -#define DOT11_MNG_IE_TPC_REPORT_LEN 2 /* length of IE data, not including 2 byte header */ - -typedef struct { - uint8 id; - uint8 len; - uint8 first_channel; - uint8 num_channels; -} dot11_supp_channels_t; - -/* csa mode type */ -#define DOT11_CSA_MODE_ADVISORY 0 -#define DOT11_CSA_MODE_NO_TX 1 -struct dot11_channel_switch { - uint8 id; - uint8 len; - uint8 mode; - uint8 channel; - uint8 count; -} PACKED; -typedef struct dot11_channel_switch dot11_channel_switch_t; - -/* length of IE data, not including 2 byte header */ -#define DOT11_SWITCH_IE_LEN 3 - -/* 802.11h Measurement Request/Report IEs */ -/* Measurement Type field */ -#define DOT11_MEASURE_TYPE_BASIC 0 -#define DOT11_MEASURE_TYPE_CCA 1 -#define DOT11_MEASURE_TYPE_RPI 2 - -/* Measurement Mode field */ - -/* Measurement Request Modes */ -#define DOT11_MEASURE_MODE_ENABLE (1<<1) -#define DOT11_MEASURE_MODE_REQUEST (1<<2) -#define DOT11_MEASURE_MODE_REPORT (1<<3) -/* Measurement Report Modes */ -#define DOT11_MEASURE_MODE_LATE (1<<0) -#define DOT11_MEASURE_MODE_INCAPABLE (1<<1) -#define DOT11_MEASURE_MODE_REFUSED (1<<2) -/* Basic Measurement Map bits */ -#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0)) -#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1)) -#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2)) -#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3)) -#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4)) - -typedef struct { - uint8 id; - uint8 len; - uint8 token; - uint8 mode; - uint8 type; - uint8 channel; - uint8 start_time[8]; - uint16 duration; -} dot11_meas_req_t; -#define DOT11_MNG_IE_MREQ_LEN 14 -/* length of Measure Request IE data not including variable len */ -#define DOT11_MNG_IE_MREQ_FIXED_LEN 3 - -struct dot11_meas_rep { - uint8 id; - uint8 len; - uint8 token; - uint8 mode; - uint8 type; - union - { - struct { - uint8 channel; - uint8 start_time[8]; - uint16 duration; - uint8 map; - } PACKED basic; - uint8 data[1]; - } PACKED rep; -} PACKED; -typedef struct dot11_meas_rep dot11_meas_rep_t; - -/* length of Measure Report IE data not including variable len */ -#define DOT11_MNG_IE_MREP_FIXED_LEN 3 - -struct dot11_meas_rep_basic { - uint8 channel; - uint8 start_time[8]; - uint16 duration; - uint8 map; -} PACKED; -typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t; -#define DOT11_MEASURE_BASIC_REP_LEN 12 - -struct dot11_quiet { - uint8 id; - uint8 len; - uint8 count; /* TBTTs until beacon interval in quiet starts */ - uint8 period; /* Beacon intervals between periodic quiet periods ? */ - uint16 duration;/* Length of quiet period, in TU's */ - uint16 offset; /* TU's offset from TBTT in Count field */ -} PACKED; -typedef struct dot11_quiet dot11_quiet_t; - -typedef struct { - uint8 channel; - uint8 map; -} chan_map_tuple_t; - -typedef struct { - uint8 id; - uint8 len; - uint8 eaddr[ETHER_ADDR_LEN]; - uint8 interval; - chan_map_tuple_t map[1]; -} dot11_ibss_dfs_t; - -/* WME Elements */ -#define WME_OUI "\x00\x50\xf2" -#define WME_VER 1 -#define WME_TYPE 2 -#define WME_SUBTYPE_IE 0 /* Information Element */ -#define WME_SUBTYPE_PARAM_IE 1 /* Parameter Element */ -#define WME_SUBTYPE_TSPEC 2 /* Traffic Specification */ - -/* WME Access Category Indices (ACIs) */ -#define AC_BE 0 /* Best Effort */ -#define AC_BK 1 /* Background */ -#define AC_VI 2 /* Video */ -#define AC_VO 3 /* Voice */ -#define AC_MAX 4 - -/* WME Information Element (IE) */ -struct wme_ie { - uint8 oui[3]; - uint8 type; - uint8 subtype; - uint8 version; - uint8 acinfo; -} PACKED; -typedef struct wme_ie wme_ie_t; -#define WME_IE_LEN 7 - -struct wme_acparam { - uint8 ACI; - uint8 ECW; - uint16 TXOP; /* stored in network order (ls octet first) */ -} PACKED; -typedef struct wme_acparam wme_acparam_t; - -/* WME Parameter Element (PE) */ -struct wme_params { - uint8 oui[3]; - uint8 type; - uint8 subtype; - uint8 version; - uint8 acinfo; - uint8 rsvd; - wme_acparam_t acparam[4]; -} PACKED; -typedef struct wme_params wme_params_t; -#define WME_PARAMS_IE_LEN 24 - -/* acinfo */ -#define WME_COUNT_MASK 0x0f -/* ACI */ -#define WME_AIFS_MASK 0x0f -#define WME_ACM_MASK 0x10 -#define WME_ACI_MASK 0x60 -#define WME_ACI_SHIFT 5 -/* ECW */ -#define WME_CWMIN_MASK 0x0f -#define WME_CWMAX_MASK 0xf0 -#define WME_CWMAX_SHIFT 4 - -#define WME_TXOP_UNITS 32 - -/* AP: default params to be announced in the Beacon Frames/Probe Responses Table 12 WME Draft*/ -/* AP: default params to be Used in the AP Side Table 14 WME Draft January 2004 802.11-03-504r5 */ -#define WME_AC_BK_ACI_STA 0x27 -#define WME_AC_BK_ECW_STA 0xA4 -#define WME_AC_BK_TXOP_STA 0x0000 -#define WME_AC_BE_ACI_STA 0x03 -#define WME_AC_BE_ECW_STA 0xA4 -#define WME_AC_BE_TXOP_STA 0x0000 -#define WME_AC_VI_ACI_STA 0x42 -#define WME_AC_VI_ECW_STA 0x43 -#define WME_AC_VI_TXOP_STA 0x005e -#define WME_AC_VO_ACI_STA 0x62 -#define WME_AC_VO_ECW_STA 0x32 -#define WME_AC_VO_TXOP_STA 0x002f - -#define WME_AC_BK_ACI_AP 0x27 -#define WME_AC_BK_ECW_AP 0xA4 -#define WME_AC_BK_TXOP_AP 0x0000 -#define WME_AC_BE_ACI_AP 0x03 -#define WME_AC_BE_ECW_AP 0x64 -#define WME_AC_BE_TXOP_AP 0x0000 -#define WME_AC_VI_ACI_AP 0x41 -#define WME_AC_VI_ECW_AP 0x43 -#define WME_AC_VI_TXOP_AP 0x005e -#define WME_AC_VO_ACI_AP 0x61 -#define WME_AC_VO_ECW_AP 0x32 -#define WME_AC_VO_TXOP_AP 0x002f - -/* WME Traffic Specification (TSPEC) element */ -#define WME_SUBTYPE_TSPEC 2 -#define WME_TSPEC_HDR_LEN 2 -#define WME_TSPEC_BODY_OFF 2 -struct wme_tspec { - uint8 oui[DOT11_OUI_LEN]; /* WME_OUI */ - uint8 type; /* WME_TYPE */ - uint8 subtype; /* WME_SUBTYPE_TSPEC */ - uint8 version; /* WME_VERSION */ - uint16 ts_info; /* TS Info */ - uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */ - uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */ - uint32 min_service_interval; /* Minimum Service Interval (us) */ - uint32 max_service_interval; /* Maximum Service Interval (us) */ - uint32 inactivity_interval; /* Inactivity Interval (us) */ - uint32 service_start; /* Service Start Time (us) */ - uint32 min_rate; /* Minimum Data Rate (bps) */ - uint32 mean_rate; /* Mean Data Rate (bps) */ - uint32 max_burst_size; /* Maximum Burst Size (bytes) */ - uint32 min_phy_rate; /* Minimum PHY Rate (bps) */ - uint32 peak_rate; /* Peak Data Rate (bps) */ - uint32 delay_bound; /* Delay Bound (us) */ - uint16 surplus_bandwidth; /* Surplus Bandwidth Allowance Factor */ - uint16 medium_time; /* Medium Time (32 us/s periods) */ -} PACKED; -typedef struct wme_tspec wme_tspec_t; -#define WME_TSPEC_LEN 56 /* not including 2-byte header */ - -/* ts_info */ -/* 802.1D priority is duplicated - bits 13-11 AND bits 3-1 */ -#define TS_INFO_PRIO_SHIFT_HI 11 -#define TS_INFO_PRIO_MASK_HI (0x7 << TS_INFO_PRIO_SHIFT_HI) -#define TS_INFO_PRIO_SHIFT_LO 1 -#define TS_INFO_PRIO_MASK_LO (0x7 << TS_INFO_PRIO_SHIFT_LO) -#define TS_INFO_CONTENTION_SHIFT 7 -#define TS_INFO_CONTENTION_MASK (0x1 << TS_INFO_CONTENTION_SHIFT) -#define TS_INFO_DIRECTION_SHIFT 5 -#define TS_INFO_DIRECTION_MASK (0x3 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_UPLINK (0 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_DOWNLINK (1 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_BIDIRECTIONAL (3 << TS_INFO_DIRECTION_SHIFT) - -/* nom_msdu_size */ -#define FIXED_MSDU_SIZE 0x8000 /* MSDU size is fixed */ -#define MSDU_SIZE_MASK 0x7fff /* (Nominal or fixed) MSDU size */ - -/* surplus_bandwidth */ -/* Represented as 3 bits of integer, binary point, 13 bits fraction */ -#define INTEGER_SHIFT 13 -#define FRACTION_MASK 0x1FFF - -/* Management Notification Frame */ -struct dot11_management_notification { - uint8 category; /* DOT11_ACTION_NOTIFICATION */ - uint8 action; - uint8 token; - uint8 status; - uint8 data[1]; /* Elements */ -} PACKED; -#define DOT11_MGMT_NOTIFICATION_LEN 4 /* Fixed length */ - -/* WME Action Codes */ -#define WME_SETUP_REQUEST 0 -#define WME_SETUP_RESPONSE 1 -#define WME_TEARDOWN 2 - -/* WME Setup Response Status Codes */ -#define WME_ADMISSION_ACCEPTED 0 -#define WME_INVALID_PARAMETERS 1 -#define WME_ADMISSION_REFUSED 3 - -/* Macro to take a pointer to a beacon or probe response - * header and return the char* pointer to the SSID info element - */ -#define BCN_PRB_SSID(hdr) ((char*)(hdr) + DOT11_MGMT_HDR_LEN + DOT11_BCN_PRB_LEN) - -/* Authentication frame payload constants */ -#define DOT11_OPEN_SYSTEM 0 -#define DOT11_SHARED_KEY 1 -#define DOT11_CHALLENGE_LEN 128 - -/* Frame control macros */ -#define FC_PVER_MASK 0x3 -#define FC_PVER_SHIFT 0 -#define FC_TYPE_MASK 0xC -#define FC_TYPE_SHIFT 2 -#define FC_SUBTYPE_MASK 0xF0 -#define FC_SUBTYPE_SHIFT 4 -#define FC_TODS 0x100 -#define FC_TODS_SHIFT 8 -#define FC_FROMDS 0x200 -#define FC_FROMDS_SHIFT 9 -#define FC_MOREFRAG 0x400 -#define FC_MOREFRAG_SHIFT 10 -#define FC_RETRY 0x800 -#define FC_RETRY_SHIFT 11 -#define FC_PM 0x1000 -#define FC_PM_SHIFT 12 -#define FC_MOREDATA 0x2000 -#define FC_MOREDATA_SHIFT 13 -#define FC_WEP 0x4000 -#define FC_WEP_SHIFT 14 -#define FC_ORDER 0x8000 -#define FC_ORDER_SHIFT 15 - -/* sequence control macros */ -#define SEQNUM_SHIFT 4 -#define FRAGNUM_MASK 0xF - -/* Frame Control type/subtype defs */ - -/* FC Types */ -#define FC_TYPE_MNG 0 -#define FC_TYPE_CTL 1 -#define FC_TYPE_DATA 2 - -/* Management Subtypes */ -#define FC_SUBTYPE_ASSOC_REQ 0 -#define FC_SUBTYPE_ASSOC_RESP 1 -#define FC_SUBTYPE_REASSOC_REQ 2 -#define FC_SUBTYPE_REASSOC_RESP 3 -#define FC_SUBTYPE_PROBE_REQ 4 -#define FC_SUBTYPE_PROBE_RESP 5 -#define FC_SUBTYPE_BEACON 8 -#define FC_SUBTYPE_ATIM 9 -#define FC_SUBTYPE_DISASSOC 10 -#define FC_SUBTYPE_AUTH 11 -#define FC_SUBTYPE_DEAUTH 12 -#define FC_SUBTYPE_ACTION 13 - -/* Control Subtypes */ -#define FC_SUBTYPE_PS_POLL 10 -#define FC_SUBTYPE_RTS 11 -#define FC_SUBTYPE_CTS 12 -#define FC_SUBTYPE_ACK 13 -#define FC_SUBTYPE_CF_END 14 -#define FC_SUBTYPE_CF_END_ACK 15 - -/* Data Subtypes */ -#define FC_SUBTYPE_DATA 0 -#define FC_SUBTYPE_DATA_CF_ACK 1 -#define FC_SUBTYPE_DATA_CF_POLL 2 -#define FC_SUBTYPE_DATA_CF_ACK_POLL 3 -#define FC_SUBTYPE_NULL 4 -#define FC_SUBTYPE_CF_ACK 5 -#define FC_SUBTYPE_CF_POLL 6 -#define FC_SUBTYPE_CF_ACK_POLL 7 -#define FC_SUBTYPE_QOS_DATA 8 -#define FC_SUBTYPE_QOS_NULL 12 - -/* type-subtype combos */ -#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK) - -#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT)) - -#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ) -#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP) -#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ) -#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP) -#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ) -#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP) -#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON) -#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC) -#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH) -#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH) -#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION) - -#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL) -#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS) -#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS) -#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK) -#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END) -#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK) - -#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA) -#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL) -#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK) -#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA) -#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL) - -/* QoS Control Field */ - -/* 802.1D Tag */ -#define QOS_PRIO_SHIFT 0 -#define QOS_PRIO_MASK 0x0007 -#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT) - -#define QOS_TID_SHIFT 0 -#define QOS_TID_MASK 0x000f -#define QOS_TID(qos) (((qos) & QOS_TID_MASK) >> QOS_TID_SHIFT) - -/* Ack Policy (0 means Acknowledge) */ -#define QOS_ACK_SHIFT 5 -#define QOS_ACK_MASK 0x0060 -#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT) - -/* Management Frames */ - -/* Management Frame Constants */ - -/* Fixed fields */ -#define DOT11_MNG_AUTH_ALGO_LEN 2 -#define DOT11_MNG_AUTH_SEQ_LEN 2 -#define DOT11_MNG_BEACON_INT_LEN 2 -#define DOT11_MNG_CAP_LEN 2 -#define DOT11_MNG_AP_ADDR_LEN 6 -#define DOT11_MNG_LISTEN_INT_LEN 2 -#define DOT11_MNG_REASON_LEN 2 -#define DOT11_MNG_AID_LEN 2 -#define DOT11_MNG_STATUS_LEN 2 -#define DOT11_MNG_TIMESTAMP_LEN 8 - -/* DUR/ID field in assoc resp is 0xc000 | AID */ -#define DOT11_AID_MASK 0x3fff - -/* Reason Codes */ -#define DOT11_RC_RESERVED 0 -#define DOT11_RC_UNSPECIFIED 1 /* Unspecified reason */ -#define DOT11_RC_AUTH_INVAL 2 /* Previous authentication no longer valid */ -#define DOT11_RC_DEAUTH_LEAVING 3 /* Deauthenticated because sending station is - leaving (or has left) IBSS or ESS */ -#define DOT11_RC_INACTIVITY 4 /* Disassociated due to inactivity */ -#define DOT11_RC_BUSY 5 /* Disassociated because AP is unable to handle - all currently associated stations */ -#define DOT11_RC_INVAL_CLASS_2 6 /* Class 2 frame received from - nonauthenticated station */ -#define DOT11_RC_INVAL_CLASS_3 7 /* Class 3 frame received from - nonassociated station */ -#define DOT11_RC_DISASSOC_LEAVING 8 /* Disassociated because sending station is - leaving (or has left) BSS */ -#define DOT11_RC_NOT_AUTH 9 /* Station requesting (re)association is - not authenticated with responding station */ -#define DOT11_RC_MAX 23 /* Reason codes > 23 are reserved */ - -/* Status Codes */ -#define DOT11_STATUS_SUCCESS 0 /* Successful */ -#define DOT11_STATUS_FAILURE 1 /* Unspecified failure */ -#define DOT11_STATUS_CAP_MISMATCH 10 /* Cannot support all requested capabilities - in the Capability Information field */ -#define DOT11_STATUS_REASSOC_FAIL 11 /* Reassociation denied due to inability to - confirm that association exists */ -#define DOT11_STATUS_ASSOC_FAIL 12 /* Association denied due to reason outside - the scope of this standard */ -#define DOT11_STATUS_AUTH_MISMATCH 13 /* Responding station does not support the - specified authentication algorithm */ -#define DOT11_STATUS_AUTH_SEQ 14 /* Received an Authentication frame with - authentication transaction sequence number - out of expected sequence */ -#define DOT11_STATUS_AUTH_CHALLENGE_FAIL 15 /* Authentication rejected because of challenge failure */ -#define DOT11_STATUS_AUTH_TIMEOUT 16 /* Authentication rejected due to timeout waiting - for next frame in sequence */ -#define DOT11_STATUS_ASSOC_BUSY_FAIL 17 /* Association denied because AP is unable to - handle additional associated stations */ -#define DOT11_STATUS_ASSOC_RATE_MISMATCH 18 /* Association denied due to requesting station - not supporting all of the data rates in the - BSSBasicRateSet parameter */ -#define DOT11_STATUS_ASSOC_SHORT_REQUIRED 19 /* Association denied due to requesting station - not supporting the Short Preamble option */ -#define DOT11_STATUS_ASSOC_PBCC_REQUIRED 20 /* Association denied due to requesting station - not supporting the PBCC Modulation option */ -#define DOT11_STATUS_ASSOC_AGILITY_REQUIRED 21 /* Association denied due to requesting station - not supporting the Channel Agility option */ -#define DOT11_STATUS_ASSOC_SPECTRUM_REQUIRED 22 /* Association denied because Spectrum Management - capability is required. */ -#define DOT11_STATUS_ASSOC_BAD_POWER_CAP 23 /* Association denied because the info in the - Power Cap element is unacceptable. */ -#define DOT11_STATUS_ASSOC_BAD_SUP_CHANNELS 24 /* Association denied because the info in the - Supported Channel element is unacceptable */ -#define DOT11_STATUS_ASSOC_SHORTSLOT_REQUIRED 25 /* Association denied due to requesting station - not supporting the Short Slot Time option */ -#define DOT11_STATUS_ASSOC_ERPBCC_REQUIRED 26 /* Association denied due to requesting station - not supporting the ER-PBCC Modulation option */ -#define DOT11_STATUS_ASSOC_DSSOFDM_REQUIRED 27 /* Association denied due to requesting station - not supporting the DSS-OFDM option */ - -/* Info Elts, length of INFORMATION portion of Info Elts */ -#define DOT11_MNG_DS_PARAM_LEN 1 -#define DOT11_MNG_IBSS_PARAM_LEN 2 - -/* TIM Info element has 3 bytes fixed info in INFORMATION field, - * followed by 1 to 251 bytes of Partial Virtual Bitmap */ -#define DOT11_MNG_TIM_FIXED_LEN 3 -#define DOT11_MNG_TIM_DTIM_COUNT 0 -#define DOT11_MNG_TIM_DTIM_PERIOD 1 -#define DOT11_MNG_TIM_BITMAP_CTL 2 -#define DOT11_MNG_TIM_PVB 3 - -/* TLV defines */ -#define TLV_TAG_OFF 0 -#define TLV_LEN_OFF 1 -#define TLV_HDR_LEN 2 -#define TLV_BODY_OFF 2 - -/* Management Frame Information Element IDs */ -#define DOT11_MNG_SSID_ID 0 -#define DOT11_MNG_RATES_ID 1 -#define DOT11_MNG_FH_PARMS_ID 2 -#define DOT11_MNG_DS_PARMS_ID 3 -#define DOT11_MNG_CF_PARMS_ID 4 -#define DOT11_MNG_TIM_ID 5 -#define DOT11_MNG_IBSS_PARMS_ID 6 -#define DOT11_MNG_COUNTRY_ID 7 -#define DOT11_MNG_HOPPING_PARMS_ID 8 -#define DOT11_MNG_HOPPING_TABLE_ID 9 -#define DOT11_MNG_REQUEST_ID 10 -#define DOT11_MNG_CHALLENGE_ID 16 -#define DOT11_MNG_PWR_CONSTRAINT_ID 32 /* 11H PowerConstraint */ -#define DOT11_MNG_PWR_CAP_ID 33 /* 11H PowerCapability */ -#define DOT11_MNG_TPC_REQUEST_ID 34 /* 11H TPC Request */ -#define DOT11_MNG_TPC_REPORT_ID 35 /* 11H TPC Report */ -#define DOT11_MNG_SUPP_CHANNELS_ID 36 /* 11H Supported Channels */ -#define DOT11_MNG_CHANNEL_SWITCH_ID 37 /* 11H ChannelSwitch Announcement*/ -#define DOT11_MNG_MEASURE_REQUEST_ID 38 /* 11H MeasurementRequest */ -#define DOT11_MNG_MEASURE_REPORT_ID 39 /* 11H MeasurementReport */ -#define DOT11_MNG_QUIET_ID 40 /* 11H Quiet */ -#define DOT11_MNG_IBSS_DFS_ID 41 /* 11H IBSS_DFS */ -#define DOT11_MNG_ERP_ID 42 -#define DOT11_MNG_NONERP_ID 47 -#ifdef BCMWPA2 -#define DOT11_MNG_RSN_ID 48 -#endif /* BCMWPA2 */ -#define DOT11_MNG_EXT_RATES_ID 50 -#define DOT11_MNG_WPA_ID 221 -#define DOT11_MNG_PROPR_ID 221 - -/* ERP info element bit values */ -#define DOT11_MNG_ERP_LEN 1 /* ERP is currently 1 byte long */ -#define DOT11_MNG_NONERP_PRESENT 0x01 /* NonERP (802.11b) STAs are present in the BSS */ -#define DOT11_MNG_USE_PROTECTION 0x02 /* Use protection mechanisms for ERP-OFDM frames */ -#define DOT11_MNG_BARKER_PREAMBLE 0x04 /* Short Preambles: 0 == allowed, 1 == not allowed */ - -/* Capability Information Field */ -#define DOT11_CAP_ESS 0x0001 -#define DOT11_CAP_IBSS 0x0002 -#define DOT11_CAP_POLLABLE 0x0004 -#define DOT11_CAP_POLL_RQ 0x0008 -#define DOT11_CAP_PRIVACY 0x0010 -#define DOT11_CAP_SHORT 0x0020 -#define DOT11_CAP_PBCC 0x0040 -#define DOT11_CAP_AGILITY 0x0080 -#define DOT11_CAP_SPECTRUM 0x0100 -#define DOT11_CAP_SHORTSLOT 0x0400 -#define DOT11_CAP_CCK_OFDM 0x2000 - -/* Action Frame Constants */ -#define DOT11_ACTION_CAT_ERR_MASK 0x80 -#define DOT11_ACTION_CAT_SPECT_MNG 0x00 -#define DOT11_ACTION_NOTIFICATION 0x11 /* 17 */ - -#define DOT11_ACTION_ID_M_REQ 0 -#define DOT11_ACTION_ID_M_REP 1 -#define DOT11_ACTION_ID_TPC_REQ 2 -#define DOT11_ACTION_ID_TPC_REP 3 -#define DOT11_ACTION_ID_CHANNEL_SWITCH 4 - -/* MLME Enumerations */ -#define DOT11_BSSTYPE_INFRASTRUCTURE 0 -#define DOT11_BSSTYPE_INDEPENDENT 1 -#define DOT11_BSSTYPE_ANY 2 -#define DOT11_SCANTYPE_ACTIVE 0 -#define DOT11_SCANTYPE_PASSIVE 1 - -/* 802.11 A PHY constants */ -#define APHY_SLOT_TIME 9 -#define APHY_SIFS_TIME 16 -#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME)) -#define APHY_PREAMBLE_TIME 16 -#define APHY_SIGNAL_TIME 4 -#define APHY_SYMBOL_TIME 4 -#define APHY_SERVICE_NBITS 16 -#define APHY_TAIL_NBITS 6 -#define APHY_CWMIN 15 - -/* 802.11 B PHY constants */ -#define BPHY_SLOT_TIME 20 -#define BPHY_SIFS_TIME 10 -#define BPHY_DIFS_TIME 50 -#define BPHY_PLCP_TIME 192 -#define BPHY_PLCP_SHORT_TIME 96 -#define BPHY_CWMIN 31 - -/* 802.11 G constants */ -#define DOT11_OFDM_SIGNAL_EXTENSION 6 - -#define PHY_CWMAX 1023 - -#define DOT11_MAXNUMFRAGS 16 /* max # fragments per MSDU */ - -/* dot11Counters Table - 802.11 spec., Annex D */ -typedef struct d11cnt { - uint32 txfrag; /* dot11TransmittedFragmentCount */ - uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ - uint32 txfail; /* dot11FailedCount */ - uint32 txretry; /* dot11RetryCount */ - uint32 txretrie; /* dot11MultipleRetryCount */ - uint32 rxdup; /* dot11FrameduplicateCount */ - uint32 txrts; /* dot11RTSSuccessCount */ - uint32 txnocts; /* dot11RTSFailureCount */ - uint32 txnoack; /* dot11ACKFailureCount */ - uint32 rxfrag; /* dot11ReceivedFragmentCount */ - uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ - uint32 rxcrc; /* dot11FCSErrorCount */ - uint32 txfrmsnt; /* dot11TransmittedFrameCount */ - uint32 rxundec; /* dot11WEPUndecryptableCount */ -} d11cnt_t; - -/* BRCM OUI */ -#define BRCM_OUI "\x00\x10\x18" - -/* BRCM info element */ -struct brcm_ie { - uchar id; /* 221, DOT11_MNG_PROPR_ID */ - uchar len; - uchar oui[3]; - uchar ver; - uchar assoc; /* # of assoc STAs */ - uchar flags; /* misc flags */ -} PACKED; -#define BRCM_IE_LEN 8 -typedef struct brcm_ie brcm_ie_t; -#define BRCM_IE_VER 2 -#define BRCM_IE_LEGACY_AES_VER 1 - -/* brcm_ie flags */ -#define BRF_ABCAP 0x1 /* afterburner capable */ -#define BRF_ABRQRD 0x2 /* afterburner requested */ -#define BRF_LZWDS 0x4 /* lazy wds enabled */ -#define BRF_ABCOUNTER_MASK 0xf0 /* afterburner wds "state" counter */ -#define BRF_ABCOUNTER_SHIFT 4 - -#define AB_WDS_TIMEOUT_MAX 15 /* afterburner wds Max count indicating not locally capable */ -#define AB_WDS_TIMEOUT_MIN 1 /* afterburner wds, use zero count as indicating "downrev" */ - - -/* OUI for BRCM proprietary IE */ -#define BRCM_PROP_OUI "\x00\x90\x4C" - -/* Vendor IE structure */ -struct vndr_ie { - uchar id; - uchar len; - uchar oui [3]; - uchar data [1]; /* Variable size data */ -}PACKED; -typedef struct vndr_ie vndr_ie_t; - -#define VNDR_IE_HDR_LEN 2 /* id + len field */ -#define VNDR_IE_MIN_LEN 3 /* size of the oui field */ -#define VNDR_IE_MAX_LEN 256 - -/* WPA definitions */ -#define WPA_VERSION 1 -#define WPA_OUI "\x00\x50\xF2" - -#ifdef BCMWPA2 -#define WPA2_VERSION 1 -#define WPA2_VERSION_LEN 2 -#define WPA2_OUI "\x00\x0F\xAC" -#endif /* BCMWPA2 */ - -#define WPA_OUI_LEN 3 - -/* RSN authenticated key managment suite */ -#define RSN_AKM_NONE 0 /* None (IBSS) */ -#define RSN_AKM_UNSPECIFIED 1 /* Over 802.1x */ -#define RSN_AKM_PSK 2 /* Pre-shared Key */ - - -/* Key related defines */ -#define DOT11_MAX_DEFAULT_KEYS 4 /* number of default keys */ -#define DOT11_MAX_KEY_SIZE 32 /* max size of any key */ -#define DOT11_MAX_IV_SIZE 16 /* max size of any IV */ -#define DOT11_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ - -#define WEP1_KEY_SIZE 5 /* max size of any WEP key */ -#define WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ -#define WEP128_KEY_SIZE 13 /* max size of any WEP key */ -#define WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ -#define TKIP_MIC_SIZE 8 /* size of TKIP MIC */ -#define TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ -#define TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ -#define TKIP_KEY_SIZE 32 /* size of any TKIP key */ -#define TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ -#define TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ -#define TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ -#define TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ -#define AES_KEY_SIZE 16 /* size of AES key */ - -#undef PACKED -#if !defined(__GNUC__) -#pragma pack() -#endif - -#endif /* _802_11_H_ */ diff --git a/openwrt/package/wificonf/include/proto/bcmeth.h b/openwrt/package/wificonf/include/proto/bcmeth.h deleted file mode 100644 index 7a97fe87fa0..00000000000 --- a/openwrt/package/wificonf/include/proto/bcmeth.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Broadcom Ethernettype protocol definitions - * - * Copyright 2005, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - */ - -/* - * Broadcom Ethernet protocol defines - * - */ - -#ifndef _BCMETH_H_ -#define _BCMETH_H_ - -/* enable structure packing */ -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#pragma pack(1) -#define PACKED -#endif - -/* ETHER_TYPE_BRCM is defined in ethernet.h */ - -/* - * Following the 2byte BRCM ether_type is a 16bit BRCM subtype field - * in one of two formats: (only subtypes 32768-65535 are in use now) - * - * subtypes 0-32767: - * 8 bit subtype (0-127) - * 8 bit length in bytes (0-255) - * - * subtypes 32768-65535: - * 16 bit big-endian subtype - * 16 bit big-endian length in bytes (0-65535) - * - * length is the number of additional bytes beyond the 4 or 6 byte header - * - * Reserved values: - * 0 reserved - * 5-15 reserved for iLine protocol assignments - * 17-126 reserved, assignable - * 127 reserved - * 32768 reserved - * 32769-65534 reserved, assignable - * 65535 reserved - */ - -/* - * While adding the subtypes and their specific processing code make sure - * bcmeth_bcm_hdr_t is the first data structure in the user specific data structure definition - */ - -#define BCMILCP_SUBTYPE_RATE 1 -#define BCMILCP_SUBTYPE_LINK 2 -#define BCMILCP_SUBTYPE_CSA 3 -#define BCMILCP_SUBTYPE_LARQ 4 -#define BCMILCP_SUBTYPE_VENDOR 5 -#define BCMILCP_SUBTYPE_FLH 17 - -#define BCMILCP_SUBTYPE_VENDOR_LONG 32769 -#define BCMILCP_SUBTYPE_CERT 32770 -#define BCMILCP_SUBTYPE_SES 32771 - - -#define BCMILCP_BCM_SUBTYPE_RESERVED 0 -#define BCMILCP_BCM_SUBTYPE_EVENT 1 -#define BCMILCP_BCM_SUBTYPE_SES 2 -/* -The EAPOL type is not used anymore. Instead EAPOL messages are now embedded -within BCMILCP_BCM_SUBTYPE_EVENT type messages -*/ -/*#define BCMILCP_BCM_SUBTYPE_EAPOL 3*/ - -#define BCMILCP_BCM_SUBTYPEHDR_MINLENGTH 8 -#define BCMILCP_BCM_SUBTYPEHDR_VERSION 0 - -/* These fields are stored in network order */ -typedef struct bcmeth_hdr -{ - uint16 subtype; /* Vendor specific..32769*/ - uint16 length; - uint8 version; /* Version is 0*/ - uint8 oui[3]; /* Broadcom OUI*/ - /* user specific Data */ - uint16 usr_subtype; -} PACKED bcmeth_hdr_t; - - - -#undef PACKED -#if !defined(__GNUC__) -#pragma pack() -#endif - -#endif diff --git a/openwrt/package/wificonf/include/proto/bcmevent.h b/openwrt/package/wificonf/include/proto/bcmevent.h deleted file mode 100644 index 3d93f441b9d..00000000000 --- a/openwrt/package/wificonf/include/proto/bcmevent.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Broadcom Event protocol definitions - * - * Copyright 2005, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * - * Dependencies: proto/bcmeth.h - * - */ - -/* - * Broadcom Ethernet Events protocol defines - * - */ - -#ifndef _BCMEVENT_H_ -#define _BCMEVENT_H_ - -/* enable structure packing */ -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#pragma pack(1) -#define PACKED -#endif - - - -#define BCM_EVENT_MSG_VERSION 1 -#define BCM_MSG_IFNAME_MAX 16 - - -/* flags */ -#define WLC_EVENT_MSG_LINK 0x01 -#define WLC_EVENT_MSG_FLUSHTXQ 0x02 -#define WLC_EVENT_MSG_GROUP 0x04 - - - -/* theses fields are stored in network order */ -typedef struct -{ - uint16 version; - uint16 flags; /* see flags below */ - uint32 event_type; /* Message (see below) */ - uint32 status; /* Status code (see below) */ - uint32 reason; /* Reason code (if applicable) */ - uint32 auth_type; /* WLC_E_AUTH */ - uint32 datalen; /* data buf */ - struct ether_addr addr; /* Station address (if applicable) */ - char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface*/ -} PACKED wl_event_msg_t; - -/* used by driver msgs */ -typedef struct bcm_event { - struct ether_header eth; - bcmeth_hdr_t bcm_hdr; - wl_event_msg_t event; - /* data portion follows */ -} PACKED bcm_event_t; - -#define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header)) - - - -/* Event messages */ -#define WLC_E_SET_SSID 0 /* indicates status of set SSID */ -#define WLC_E_JOIN 1 /* differentiates join IBSS from found (WLC_E_START) IBSS */ -#define WLC_E_START 2 /* STA founded an IBSS or AP started a BSS */ -#define WLC_E_AUTH 3 /* 802.11 AUTH request */ -#define WLC_E_AUTH_IND 4 /* 802.11 AUTH indication */ -#define WLC_E_DEAUTH 5 /* 802.11 DEAUTH request */ -#define WLC_E_DEAUTH_IND 6 /* 802.11 DEAUTH indication */ -#define WLC_E_ASSOC 7 /* 802.11 ASSOC request */ -#define WLC_E_ASSOC_IND 8 /* 802.11 ASSOC indication */ -#define WLC_E_REASSOC 9 /* 802.11 REASSOC request */ -#define WLC_E_REASSOC_IND 10 /* 802.11 REASSOC indication */ -#define WLC_E_DISASSOC 11 /* 802.11 DISASSOC request */ -#define WLC_E_DISASSOC_IND 12 /* 802.11 DISASSOC indication */ -#define WLC_E_QUIET_START 13 /* 802.11h Quiet period started */ -#define WLC_E_QUIET_END 14 /* 802.11h Quiet period ended */ -#define WLC_E_GOT_BEACONS 15 /* internal use: IBSS mode: saw another STA's BEACONS */ -#define WLC_E_LINK 16 /* generic link indication */ -#define WLC_E_MIC_ERROR 17 /* TKIP MIC error occurred */ -#define WLC_E_NDIS_LINK 18 /* NDIS style link indication */ -#define WLC_E_ROAM 19 /* roam attempt occurred: indicate status & reason for roam */ -#define WLC_E_TXFAIL 20 /* change in dot11FailedCount (txfail) */ -#define WLC_E_PMKID_CACHE 21 /* WPA2 pmkid cache indication */ -#define WLC_E_RETROGRADE_TSF 22 /* current AP's TSF value went backward */ -#define WLC_E_PRUNE 23 /* AP was pruned from join list for reason */ -#define WLC_E_AUTOAUTH 24 /* report AutoAuth table entry match for join attempt */ -#define WLC_E_EAPOL_MSG 25 /* Event encapsulating an EAPOL message */ -#define WLC_E_LAST 26 - -/* Event status codes */ -#define WLC_E_STATUS_SUCCESS 0 -#define WLC_E_STATUS_FAIL 1 -#define WLC_E_STATUS_TIMEOUT 2 -#define WLC_E_STATUS_NO_NETWORKS 3 -#define WLC_E_STATUS_ABORT 4 -#define WLC_E_STATUS_NO_ACK 5 -#define WLC_E_STATUS_UNSOLICITED 6 -#define WLC_E_STATUS_ATTEMPT 7 - -/* roam reason codes */ -#define WLC_E_REASON_LOW_RSSI 1 -#define WLC_E_REASON_DEAUTH 2 -#define WLC_E_REASON_DISASSOC 3 -#define WLC_E_REASON_BCNS_LOST 4 -#define WLC_E_REASON_FAST_ROAM_FAILED 5 - -/* prune reason codes */ -#define WLC_E_PRUNE_ENCR_MISMATCH 1 /* ecryption mismatch */ -#define WLC_E_PRUNE_BCAST_BSSID 2 /* AP uses a broadcast BSSID */ -#define WLC_E_PRUNE_MAC_DENY 3 /* STA's MAC addr is in AP's MAC deny list */ -#define WLC_E_PRUNE_MAC_NA 4 /* STA's MAC addr is not in AP's MAC allow list */ -#define WLC_E_PRUNE_REG_PASSV 5 /* AP not allowed due to regulatory restriction */ -#define WLC_E_PRUNE_SPCT_MGMT 6 /* AP does not support STA locale spectrum mgmt */ -#define WLC_E_PRUNE_RADAR 7 /* AP is on a radar channel of STA locale */ -#define WLC_E_RSN_MISMATCH 8 /* STA does not support AP's RSN */ -#define WLC_E_PRUNE_NO_COMMON_RATES 9 /* No rates in common with AP */ -#define WLC_E_PRUNE_BASIC_RATES 10 /* STA does not support all basic rates of BSS */ -#define WLC_E_PRUNE_CCXFAST_PREVAP 11 /* CCX FAST ROAM: prune previous AP */ -#define WLC_E_PRUNE_CIPHER_NA 12 /* BSS's cipher not supported */ -#define WLC_E_PRUNE_KNOWN_STA 13 /* AP is already known to us as a STA */ - -/* WLC_SET_CALLBACK data type */ -typedef struct wlc_event_cb { - void (*fn)(void *, bcm_event_t *); /* Callback function */ - void *context; /* Passed to callback function */ -} wlc_event_cb_t; - - - - -#undef PACKED -#if !defined(__GNUC__) -#pragma pack() -#endif - -#endif diff --git a/openwrt/package/wificonf/include/proto/bcmip.h b/openwrt/package/wificonf/include/proto/bcmip.h deleted file mode 100644 index da2d8f8b608..00000000000 --- a/openwrt/package/wificonf/include/proto/bcmip.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2005, Broadcom Corporation - * All Rights Reserved. - * - * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation; - * the contents of this file may not be disclosed to third parties, copied - * or duplicated in any form, in whole or in part, without the prior - * written permission of Broadcom Corporation. - * - * Fundamental constants relating to IP Protocol - * - * $Id$ - */ - -#ifndef _bcmip_h_ -#define _bcmip_h_ - -/* IP header */ -#define IPV4_VERIHL_OFFSET 0 /* version and ihl byte offset */ -#define IPV4_TOS_OFFSET 1 /* TOS offset */ -#define IPV4_PROT_OFFSET 9 /* protocol type offset */ -#define IPV4_CHKSUM_OFFSET 10 /* IP header checksum offset */ -#define IPV4_SRC_IP_OFFSET 12 /* src IP addr offset */ -#define IPV4_DEST_IP_OFFSET 16 /* dest IP addr offset */ - -#define IPV4_VER_MASK 0xf0 -#define IPV4_IHL_MASK 0x0f - -#define IPV4_PROT_UDP 17 /* UDP protocol type */ - -#define IPV4_ADDR_LEN 4 /* IP v4 address length */ - -#define IPV4_VER_NUM 0x40 /* IP v4 version number */ - -/* NULL IP address check */ -#define IPV4_ISNULLADDR(a) ((((uint8 *)(a))[0] + ((uint8 *)(a))[1] + \ - ((uint8 *)(a))[2] + ((uint8 *)(a))[3]) == 0) - -#define IPV4_ADDR_STR_LEN 16 - -#endif /* #ifndef _bcmip_h_ */ - diff --git a/openwrt/package/wificonf/include/proto/ethernet.h b/openwrt/package/wificonf/include/proto/ethernet.h deleted file mode 100644 index c2718a6511c..00000000000 --- a/openwrt/package/wificonf/include/proto/ethernet.h +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - * $Id$ - * Copyright 2005, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * From FreeBSD 2.2.7: Fundamental constants relating to ethernet. - ******************************************************************************/ - -#ifndef ETHER_ADDR_LEN -#define _NET_ETHERNET_H_ - -#ifndef _TYPEDEFS_H_ -#include "typedefs.h" -#endif - -/* enable structure packing */ -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#pragma pack(1) -#define PACKED -#endif - -/* - * The number of bytes in an ethernet (MAC) address. - */ -#define ETHER_ADDR_LEN 6 - -/* - * The number of bytes in the type field. - */ -#define ETHER_TYPE_LEN 2 - -/* - * The number of bytes in the trailing CRC field. - */ -#define ETHER_CRC_LEN 4 - -/* - * The length of the combined header. - */ -#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN) - -/* - * The minimum packet length. - */ -#define ETHER_MIN_LEN 64 - -/* - * The minimum packet user data length. - */ -#define ETHER_MIN_DATA 46 - -/* - * The maximum packet length. - */ -#define ETHER_MAX_LEN 1518 - -/* - * The maximum packet user data length. - */ -#define ETHER_MAX_DATA 1500 - -/* ether types */ -#define ETHER_TYPE_IP 0x0800 /* IP */ -#define ETHER_TYPE_ARP 0x0806 /* ARP */ -#define ETHER_TYPE_8021Q 0x8100 /* 802.1Q */ -#define ETHER_TYPE_BRCM 0x886c /* Broadcom Corp. */ -#define ETHER_TYPE_802_1X 0x888e /* 802.1x */ -#ifdef BCMWPA2 -#define ETHER_TYPE_802_1X_PREAUTH 0x88c7 /* 802.1x preauthentication*/ -#endif - -/* Broadcom subtype follows ethertype; First 2 bytes are reserved; Next 2 are subtype; */ -#define ETHER_BRCM_SUBTYPE_LEN 4 /* Broadcom 4 byte subtype */ -#define ETHER_BRCM_CRAM 0x1 /* Broadcom subtype cram protocol */ - -/* ether header */ -#define ETHER_DEST_OFFSET 0 /* dest address offset */ -#define ETHER_SRC_OFFSET 6 /* src address offset */ -#define ETHER_TYPE_OFFSET 12 /* ether type offset */ - -/* - * A macro to validate a length with - */ -#define ETHER_IS_VALID_LEN(foo) \ - ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) - - -#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */ -/* - * Structure of a 10Mb/s Ethernet header. - */ -struct ether_header { - uint8 ether_dhost[ETHER_ADDR_LEN]; - uint8 ether_shost[ETHER_ADDR_LEN]; - uint16 ether_type; -} PACKED; - -/* - * Structure of a 48-bit Ethernet address. - */ -struct ether_addr { - uint8 octet[ETHER_ADDR_LEN]; -} PACKED; -#endif - -/* - * Takes a pointer, sets locally admininistered - * address bit in the 48-bit Ethernet address. - */ -#define ETHER_SET_LOCALADDR(ea) ( ((uint8 *)(ea))[0] = \ - (((uint8 *)(ea))[0] | 2) ) - -/* - * Takes a pointer, returns true if a 48-bit multicast address - * (including broadcast, since it is all ones) - */ -#define ETHER_ISMULTI(ea) (((uint8 *)(ea))[0] & 1) - - -/* compare two ethernet addresses - assumes the pointers can be referenced as shorts */ -#define ether_cmp(a, b) ( \ - !(((short*)a)[0] == ((short*)b)[0]) | \ - !(((short*)a)[1] == ((short*)b)[1]) | \ - !(((short*)a)[2] == ((short*)b)[2])) - -/* copy an ethernet address - assumes the pointers can be referenced as shorts */ -#define ether_copy(s, d) { \ - ((short*)d)[0] = ((short*)s)[0]; \ - ((short*)d)[1] = ((short*)s)[1]; \ - ((short*)d)[2] = ((short*)s)[2]; } - -/* - * Takes a pointer, returns true if a 48-bit broadcast (all ones) - */ -#define ETHER_ISBCAST(ea) ((((uint8 *)(ea))[0] & \ - ((uint8 *)(ea))[1] & \ - ((uint8 *)(ea))[2] & \ - ((uint8 *)(ea))[3] & \ - ((uint8 *)(ea))[4] & \ - ((uint8 *)(ea))[5]) == 0xff) - -static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}}; - -/* - * Takes a pointer, returns true if a 48-bit null address (all zeros) - */ -#define ETHER_ISNULLADDR(ea) ((((uint8 *)(ea))[0] | \ - ((uint8 *)(ea))[1] | \ - ((uint8 *)(ea))[2] | \ - ((uint8 *)(ea))[3] | \ - ((uint8 *)(ea))[4] | \ - ((uint8 *)(ea))[5]) == 0) - -/* Differentiated Services Codepoint - upper 6 bits of tos in iphdr */ -#define DSCP_MASK 0xFC /* upper 6 bits */ -#define DSCP_SHIFT 2 -#define DSCP_WME_PRI_MASK 0xE0 /* upper 3 bits */ -#define DSCP_WME_PRI_SHIFT 5 - -#undef PACKED -#if !defined(__GNUC__) -#pragma pack() -#endif - -#endif /* _NET_ETHERNET_H_ */ diff --git a/openwrt/package/wificonf/include/proto/vlan.h b/openwrt/package/wificonf/include/proto/vlan.h deleted file mode 100644 index ba136e9ed62..00000000000 --- a/openwrt/package/wificonf/include/proto/vlan.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 802.1Q VLAN protocol definitions - * - * Copyright 2005, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _vlan_h_ -#define _vlan_h_ - -/* enable structure packing */ -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#pragma pack(1) -#define PACKED -#endif - -#define VLAN_VID_MASK 0xfff /* low 12 bits are vlan id */ -#define VLAN_CFI_SHIFT 12 /* canonical format indicator bit */ -#define VLAN_PRI_SHIFT 13 /* user priority */ - -#define VLAN_PRI_MASK 7 /* 3 bits of priority */ - -#define VLAN_TAG_LEN 4 -#define VLAN_TAG_OFFSET (2 * ETHER_ADDR_LEN) - -struct ethervlan_header { - uint8 ether_dhost[ETHER_ADDR_LEN]; - uint8 ether_shost[ETHER_ADDR_LEN]; - uint16 vlan_type; /* 0x8100 */ - uint16 vlan_tag; /* priority, cfi and vid */ - uint16 ether_type; -}; - -#define ETHERVLAN_HDR_LEN (ETHER_HDR_LEN + VLAN_TAG_LEN) - -#undef PACKED -#if !defined(__GNUC__) -#pragma pack() -#endif - -#endif /* _vlan_h_ */ diff --git a/openwrt/package/wificonf/include/proto/wpa.h b/openwrt/package/wificonf/include/proto/wpa.h deleted file mode 100644 index db49b76308c..00000000000 --- a/openwrt/package/wificonf/include/proto/wpa.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Fundamental types and constants relating to WPA - * - * Copyright 2005, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _proto_wpa_h_ -#define _proto_wpa_h_ - -#include <typedefs.h> -#include <proto/ethernet.h> - -/* enable structure packing */ -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#pragma pack(1) -#define PACKED -#endif - -/* Reason Codes */ - -/* 10 and 11 are from TGh. */ -#define DOT11_RC_BAD_PC 10 /* Unacceptable power capability element */ -#define DOT11_RC_BAD_CHANNELS 11 /* Unacceptable supported channels element */ -/* 12 is unused */ -/* 13 through 23 taken from P802.11i/D3.0, November 2002 */ -#define DOT11_RC_INVALID_WPA_IE 13 /* Invalid info. element */ -#define DOT11_RC_MIC_FAILURE 14 /* Michael failure */ -#define DOT11_RC_4WH_TIMEOUT 15 /* 4-way handshake timeout */ -#define DOT11_RC_GTK_UPDATE_TIMEOUT 16 /* Group key update timeout */ -#define DOT11_RC_WPA_IE_MISMATCH 17 /* WPA IE in 4-way handshake differs from (re-)assoc. request/probe response */ -#define DOT11_RC_INVALID_MC_CIPHER 18 /* Invalid multicast cipher */ -#define DOT11_RC_INVALID_UC_CIPHER 19 /* Invalid unicast cipher */ -#define DOT11_RC_INVALID_AKMP 20 /* Invalid authenticated key management protocol */ -#define DOT11_RC_BAD_WPA_VERSION 21 /* Unsupported WPA version */ -#define DOT11_RC_INVALID_WPA_CAP 22 /* Invalid WPA IE capabilities */ -#define DOT11_RC_8021X_AUTH_FAIL 23 /* 802.1X authentication failure */ - -#define WPA2_PMKID_LEN 16 - -/* WPA IE fixed portion */ -typedef struct -{ - uint8 tag; /* TAG */ - uint8 length; /* TAG length */ - uint8 oui[3]; /* IE OUI */ - uint8 oui_type; /* OUI type */ - struct { - uint8 low; - uint8 high; - } PACKED version; /* IE version */ -} PACKED wpa_ie_fixed_t; -#define WPA_IE_OUITYPE_LEN 4 -#define WPA_IE_FIXED_LEN 8 -#define WPA_IE_TAG_FIXED_LEN 6 - -typedef struct { - uint8 tag; /* TAG */ - uint8 length; /* TAG length */ - struct { - uint8 low; - uint8 high; - } PACKED version; /* IE version */ -} PACKED wpa_rsn_ie_fixed_t; -#define WPA_RSN_IE_FIXED_LEN 4 -#define WPA_RSN_IE_TAG_FIXED_LEN 2 -typedef uint8 wpa_pmkid_t[WPA2_PMKID_LEN]; - -/* WPA suite/multicast suite */ -typedef struct -{ - uint8 oui[3]; - uint8 type; -} PACKED wpa_suite_t, wpa_suite_mcast_t; -#define WPA_SUITE_LEN 4 - -/* WPA unicast suite list/key management suite list */ -typedef struct -{ - struct { - uint8 low; - uint8 high; - } PACKED count; - wpa_suite_t list[1]; -} PACKED wpa_suite_ucast_t, wpa_suite_auth_key_mgmt_t; -#define WPA_IE_SUITE_COUNT_LEN 2 -typedef struct -{ - struct { - uint8 low; - uint8 high; - } PACKED count; - wpa_pmkid_t list[1]; -} PACKED wpa_pmkid_list_t; - -/* WPA cipher suites */ -#define WPA_CIPHER_NONE 0 /* None */ -#define WPA_CIPHER_WEP_40 1 /* WEP (40-bit) */ -#define WPA_CIPHER_TKIP 2 /* TKIP: default for WPA */ -#define WPA_CIPHER_AES_OCB 3 /* AES (OCB) */ -#define WPA_CIPHER_AES_CCM 4 /* AES (CCM) */ -#define WPA_CIPHER_WEP_104 5 /* WEP (104-bit) */ - -#define IS_WPA_CIPHER(cipher) ((cipher) == WPA_CIPHER_NONE || \ - (cipher) == WPA_CIPHER_WEP_40 || \ - (cipher) == WPA_CIPHER_WEP_104 || \ - (cipher) == WPA_CIPHER_TKIP || \ - (cipher) == WPA_CIPHER_AES_OCB || \ - (cipher) == WPA_CIPHER_AES_CCM) - -/* WPA TKIP countermeasures parameters */ -#define WPA_TKIP_CM_DETECT 60 /* multiple MIC failure window (seconds) */ -#define WPA_TKIP_CM_BLOCK 60 /* countermeasures active window (seconds) */ - -/* WPA capabilities defined in 802.11i */ -#define WPA_CAP_4_REPLAY_CNTRS 2 -#define WPA_CAP_16_REPLAY_CNTRS 3 -#define WPA_CAP_REPLAY_CNTR_SHIFT 2 -#define WPA_CAP_REPLAY_CNTR_MASK 0x000c - -/* WPA Specific defines */ -#define WPA_CAP_LEN 2 - -#define WPA_CAP_WPA2_PREAUTH 1 - -#undef PACKED -#if !defined(__GNUC__) -#pragma pack() -#endif - -#endif /* _proto_wpa_h_ */ diff --git a/openwrt/package/wificonf/include/wlioctl.h b/openwrt/package/wificonf/include/wlioctl.h deleted file mode 100644 index 43b4e02ea96..00000000000 --- a/openwrt/package/wificonf/include/wlioctl.h +++ /dev/null @@ -1,1238 +0,0 @@ -/* - * Custom OID/ioctl definitions for - * Broadcom 802.11abg Networking Device Driver - * - * Definitions subject to change without notice. - * - * Copyright 2005, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _wlioctl_h_ -#define _wlioctl_h_ - -#include "typedefs.h" -#include "proto/wpa.h" -#include "proto/ethernet.h" -#include "proto/bcmeth.h" -#include "proto/bcmevent.h" -#include "proto/802.11.h" - -/* require default structure packing */ -#if !defined(__GNUC__) -#pragma pack(push,8) -#endif - -#define WL_NUMRATES 255 /* max # of rates in a rateset */ - -typedef struct wl_rateset { - uint32 count; /* # rates in this set */ - uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */ -} wl_rateset_t; - -#define WL_CHANSPEC_CHAN_MASK 0x0fff -#define WL_CHANSPEC_BAND_MASK 0xf000 -#define WL_CHANSPEC_BAND_SHIFT 12 -#define WL_CHANSPEC_BAND_A 0x1000 -#define WL_CHANSPEC_BAND_B 0x2000 - -/* - * Per-bss information structure. - */ - -#define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */ - -typedef struct wl_bss_info { - uint32 version; /* version field */ - uint32 length; /* byte length of data in this record, starting at version and including IEs */ - struct ether_addr BSSID; - uint16 beacon_period; /* units are Kusec */ - uint16 capability; /* Capability information */ - uint8 SSID_len; - uint8 SSID[32]; - struct { - uint count; /* # rates in this set */ - uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ - } rateset; /* supported rates */ - uint8 channel; /* Channel no. */ - uint16 atim_window; /* units are Kusec */ - uint8 dtim_period; /* DTIM period */ - int16 RSSI; /* receive signal strength (in dBm) */ - int8 phy_noise; /* noise (in dBm) */ - uint32 ie_length; /* byte length of Information Elements */ - /* variable length Information Elements */ -} wl_bss_info_t; - -typedef struct wlc_ssid { - uint32 SSID_len; - uchar SSID[32]; -} wlc_ssid_t; - -typedef struct wl_scan_params { - wlc_ssid_t ssid; /* default is {0, ""} */ - struct ether_addr bssid;/* default is bcast */ - int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */ - int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */ - int32 nprobes; /* -1 use default, number of probes per channel */ - int32 active_time; /* -1 use default, dwell time per channel for active scanning */ - int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */ - int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */ - int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */ - uint16 channel_list[1]; /* list of chanspecs */ -} wl_scan_params_t; -/* size of wl_scan_params not including variable length array */ -#define WL_SCAN_PARAMS_FIXED_SIZE 64 - -typedef struct wl_scan_results { - uint32 buflen; - uint32 version; - uint32 count; - wl_bss_info_t bss_info[1]; -} wl_scan_results_t; -/* size of wl_scan_results not including variable length array */ -#define WL_SCAN_RESULTS_FIXED_SIZE 12 - -/* uint32 list */ -typedef struct wl_uint32_list { - /* in - # of elements, out - # of entries */ - uint32 count; - /* variable length uint32 list */ - uint32 element[1]; -} wl_uint32_list_t; - -#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */ - -typedef struct wl_channels_in_country { - uint32 buflen; - uint32 band; - char country_abbrev[WLC_CNTRY_BUF_SZ]; - uint32 count; - uint32 channel[1]; -} wl_channels_in_country_t; - -typedef struct wl_country_list { - uint32 buflen; - uint32 band_set; - uint32 band; - uint32 count; - char country_abbrev[1]; -} wl_country_list_t; - -#define WL_RM_TYPE_BASIC 1 -#define WL_RM_TYPE_CCA 2 -#define WL_RM_TYPE_RPI 3 - -#define WL_RM_FLAG_PARALLEL (1<<0) - -#define WL_RM_FLAG_LATE (1<<1) -#define WL_RM_FLAG_INCAPABLE (1<<2) -#define WL_RM_FLAG_REFUSED (1<<3) - -typedef struct wl_rm_req_elt { - int8 type; - int8 flags; - uint16 chanspec; - uint32 token; /* token for this measurement */ - uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ - uint32 tsf_l; /* TSF low 32-bits */ - uint32 dur; /* TUs */ -} wl_rm_req_elt_t; - -typedef struct wl_rm_req { - uint32 token; /* overall measurement set token */ - uint32 count; /* number of measurement reqests */ - wl_rm_req_elt_t req[1]; /* variable length block of requests */ -} wl_rm_req_t; -#define WL_RM_REQ_FIXED_LEN 8 - -typedef struct wl_rm_rep_elt { - int8 type; - int8 flags; - uint16 chanspec; - uint32 token; /* token for this measurement */ - uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ - uint32 tsf_l; /* TSF low 32-bits */ - uint32 dur; /* TUs */ - uint32 len; /* byte length of data block */ - uint8 data[1]; /* variable length data block */ -} wl_rm_rep_elt_t; -#define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */ - -#define WL_RPI_REP_BIN_NUM 8 -typedef struct wl_rm_rpi_rep { - uint8 rpi[WL_RPI_REP_BIN_NUM]; - int8 rpi_max[WL_RPI_REP_BIN_NUM]; -} wl_rm_rpi_rep_t; - -typedef struct wl_rm_rep { - uint32 token; /* overall measurement set token */ - uint32 len; /* length of measurement report block */ - wl_rm_rep_elt_t rep[1]; /* variable length block of reports */ -} wl_rm_rep_t; -#define WL_RM_REP_FIXED_LEN 8 - - -#define WLC_MAX_KEY_SIZE 32 /* max size of any key */ -#define WLC_MAX_IV_SIZE 16 /* max size of any IV */ -#define WLC_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ -#define WLC_MAX_DEFAULT_KEYS 4 /* # of default WEP keys */ -#define WLC_MAX_KEYS 54 /* Max # of WEP keys */ -#define WLC_WEP1_KEY_SIZE 5 /* max size of any WEP key */ -#define WLC_WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ -#define WLC_WEP128_KEY_SIZE 13 /* max size of any WEP key */ -#define WLC_WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ -#define WLC_TKIP_MIC_SIZE 8 /* size of TKIP MIC */ -#define WLC_TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ -#define WLC_TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ -#define WLC_TKIP_KEY_SIZE 32 /* size of any TKIP key */ -#define WLC_TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ -#define WLC_TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ -#define WLC_TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ -#define WLC_TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ -#define WLC_TKIP_P1_KEY_SIZE 10 /* size of TKHash Phase1 output, in bytes */ -#define WLC_TKIP_P2_KEY_SIZE 16 /* size of TKHash Phase2 output */ -#define WLC_AES_KEY_SIZE 16 /* size of AES key */ - - -typedef enum sup_auth_status { - WLC_SUP_DISCONNECTED = 0, - WLC_SUP_CONNECTING, - WLC_SUP_IDREQUIRED, - WLC_SUP_AUTHENTICATING, - WLC_SUP_AUTHENTICATED, - WLC_SUP_KEYXCHANGE, - WLC_SUP_KEYED, - WLC_SUP_TIMEOUT -} sup_auth_status_t; - - -/* Enumerate crypto algorithms */ -#define CRYPTO_ALGO_OFF 0 -#define CRYPTO_ALGO_WEP1 1 -#define CRYPTO_ALGO_TKIP 2 -#define CRYPTO_ALGO_WEP128 3 -#define CRYPTO_ALGO_AES_CCM 4 -#define CRYPTO_ALGO_AES_OCB_MSDU 5 -#define CRYPTO_ALGO_AES_OCB_MPDU 6 -#define CRYPTO_ALGO_NALG 7 - -#define WSEC_GEN_MIC_ERROR 0x0001 -#define WSEC_GEN_REPLAY 0x0002 - -#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */ -#define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ -#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */ -#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */ - - -typedef struct wlc_tkip_info { - uint16 phase1[WLC_TKIP_P1_KEY_SIZE/sizeof(uint16)]; /* tkhash phase1 result */ - uint8 phase2[WLC_TKIP_P2_KEY_SIZE]; /* tkhash phase2 result */ - uint32 micl; - uint32 micr; -} tkip_info_t; - -typedef struct _wsec_iv { - uint32 hi; /* upper 32 bits of IV */ - uint16 lo; /* lower 16 bits of IV */ -} wsec_iv_t; - -typedef struct wsec_key { - uint32 index; /* key index */ - uint32 len; /* key length */ - uint8 data[WLC_MAX_KEY_SIZE]; /* key data */ - tkip_info_t tkip_tx; /* tkip transmit state */ - tkip_info_t tkip_rx; /* tkip receive state */ - uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ - uint32 flags; /* misc flags */ - uint32 algo_hw; /* cache for hw register*/ - uint32 aes_mode; /* cache for hw register*/ - int iv_len; /* IV length */ - int iv_initialized; /* has IV been initialized already? */ - int icv_len; /* ICV length */ - wsec_iv_t rxiv; /* Rx IV */ - wsec_iv_t txiv; /* Tx IV */ - struct ether_addr ea; /* per station */ -} wsec_key_t; - - - -typedef struct wl_wsec_key { - uint32 index; /* key index */ - uint32 len; /* key length */ - uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */ - uint32 pad_1[18]; - uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ - uint32 flags; /* misc flags */ - uint32 pad_2[2]; - int pad_3; - int iv_initialized; /* has IV been initialized already? */ - int pad_4; - /* Rx IV */ - struct { - uint32 hi; /* upper 32 bits of IV */ - uint16 lo; /* lower 16 bits of IV */ - } rxiv; - uint32 pad_5[2]; - struct ether_addr ea; /* per station */ -} wl_wsec_key_t; - - -#define WSEC_MIN_PSK_LEN 8 -#define WSEC_MAX_PSK_LEN 64 - -/* Flag for key material needing passhash'ing */ -#define WSEC_PASSPHRASE (1<<0) - -/* recepticle for WLC_SET_WSEC_PMK parameter */ -typedef struct { - ushort key_len; /* octets in key material */ - ushort flags; /* key handling qualification */ - uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */ -} wsec_pmk_t; - -/* wireless security bitvec */ -#define WEP_ENABLED 0x0001 -#define TKIP_ENABLED 0x0002 -#define AES_ENABLED 0x0004 -#define WSEC_SWFLAG 0x0008 -#define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */ - -/* WPA authentication mode bitvec */ -#define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */ -#define WPA_AUTH_NONE 0x0001 /* none (IBSS) */ -#define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */ -#define WPA_AUTH_PSK 0x0004 /* Pre-shared key */ -/*#define WPA_AUTH_8021X 0x0020*/ /* 802.1x, reserved */ - -#define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */ -#define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */ - - - -/* pmkid */ -#define MAXPMKID 16 - -typedef struct _pmkid -{ - struct ether_addr BSSID; - uint8 PMKID[WPA2_PMKID_LEN]; -} pmkid_t; - -typedef struct _pmkid_list -{ - uint32 npmkid; - pmkid_t pmkid[1]; -} pmkid_list_t; - -typedef struct _pmkid_cand { - struct ether_addr BSSID; - uint8 preauth; -} pmkid_cand_t; - -typedef struct _pmkid_cand_list { - uint32 npmkid_cand; - pmkid_cand_t pmkid_cand[1]; -} pmkid_cand_list_t; - - -typedef struct wl_led_info { - uint32 index; /* led index */ - uint32 behavior; - bool activehi; -} wl_led_info_t; - -typedef struct wlc_assoc_info { - uint32 req_len; - uint32 resp_len; - uint32 flags; - struct dot11_assoc_req req; - struct ether_addr reassoc_bssid; /* used in reassoc's */ - struct dot11_assoc_resp resp; -} wl_assoc_info_t; -/* flags */ -#define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc */ -/* srom read/write struct passed through ioctl */ -typedef struct { - uint byteoff; /* byte offset */ - uint nbytes; /* number of bytes */ - uint16 buf[1]; -} srom_rw_t; - -/* R_REG and W_REG struct passed through ioctl */ -typedef struct { - uint32 byteoff; /* byte offset of the field in d11regs_t */ - uint32 val; /* read/write value of the field */ - uint32 size; /* sizeof the field */ - uint band; /* band (optional) */ -} rw_reg_t; - -/* Structure used by GET/SET_ATTEN ioctls */ -typedef struct { - uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */ - uint16 bb; /* Baseband attenuation */ - uint16 radio; /* Radio attenuation */ - uint16 txctl1; /* Radio TX_CTL1 value */ -} atten_t; - -/* Used to get specific STA parameters */ -typedef struct { - uint32 val; - struct ether_addr ea; -} scb_val_t; - - -/* Event data type */ -typedef struct wlc_event { - wl_event_msg_t event; /* encapsulated event */ - struct ether_addr *addr; /* used to keep a trace of the potential present of - an address in wlc_event_msg_t */ - void *data; /* used to hang additional data on an event */ - struct wlc_event *next; /* enables ordered list of pending events */ -} wlc_event_t; - -#define BCM_MAC_STATUS_INDICATION (0x40010200L) - -typedef struct { - uint16 ver; /* version of this struct */ - uint16 len; /* length in bytes of this structure */ - uint16 cap; /* sta's advertized capabilities */ - uint32 flags; /* flags defined below */ - uint32 idle; /* time since data pkt rx'd from sta */ - struct ether_addr ea; /* Station address */ - wl_rateset_t rateset; /* rateset in use */ - uint32 in; /* seconds elapsed since associated */ - uint32 listen_interval_inms; /* Min Listen interval in ms for this STA*/ -} sta_info_t; - -#define WL_STA_VER 2 - -/* flags fields */ -#define WL_STA_BRCM 0x01 -#define WL_STA_WME 0x02 -#define WL_STA_ABCAP 0x04 -#define WL_STA_AUTHE 0x08 -#define WL_STA_ASSOC 0x10 -#define WL_STA_AUTHO 0x20 -#define WL_STA_WDS 0x40 -#define WL_WDS_LINKUP 0x80 - -/* - * Country locale determines which channels are available to us. - */ -typedef enum _wlc_locale { - WLC_WW = 0, /* Worldwide */ - WLC_THA, /* Thailand */ - WLC_ISR, /* Israel */ - WLC_JDN, /* Jordan */ - WLC_PRC, /* China */ - WLC_JPN, /* Japan */ - WLC_FCC, /* USA */ - WLC_EUR, /* Europe */ - WLC_USL, /* US Low Band only */ - WLC_JPH, /* Japan High Band only */ - WLC_ALL, /* All the channels in this band */ - WLC_11D, /* Represents locale recieved by 11d beacons */ - WLC_LAST_LOCALE, - WLC_UNDEFINED_LOCALE = 0xf -} wlc_locale_t; - -/* channel encoding */ -typedef struct channel_info { - int hw_channel; - int target_channel; - int scan_channel; -} channel_info_t; - -/* For ioctls that take a list of MAC addresses */ -struct maclist { - uint count; /* number of MAC addresses */ - struct ether_addr ea[1]; /* variable length array of MAC addresses */ -}; - -/* get pkt count struct passed through ioctl */ -typedef struct get_pktcnt { - uint rx_good_pkt; - uint rx_bad_pkt; - uint tx_good_pkt; - uint tx_bad_pkt; -} get_pktcnt_t; - -/* Linux network driver ioctl encoding */ -typedef struct wl_ioctl { - uint cmd; /* common ioctl definition */ - void *buf; /* pointer to user buffer */ - uint len; /* length of user buffer */ - bool set; /* get or set request (optional) */ - uint used; /* bytes read or written (optional) */ - uint needed; /* bytes needed (optional) */ -} wl_ioctl_t; - -/* - * Structure for passing hardware and software - * revision info up from the driver. - */ -typedef struct wlc_rev_info { - uint vendorid; /* PCI vendor id */ - uint deviceid; /* device id of chip */ - uint radiorev; /* radio revision */ - uint chiprev; /* chip revision */ - uint corerev; /* core revision */ - uint boardid; /* board identifier (usu. PCI sub-device id) */ - uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */ - uint boardrev; /* board revision */ - uint driverrev; /* driver version */ - uint ucoderev; /* microcode version */ - uint bus; /* bus type */ - uint chipnum; /* chip number */ -} wlc_rev_info_t; - -#define WL_BRAND_MAX 10 -typedef struct wl_instance_info { - uint instance; - char brand[WL_BRAND_MAX]; -} wl_instance_info_t; - -/* check this magic number */ -#define WLC_IOCTL_MAGIC 0x14e46c77 - -/* bump this number if you change the ioctl interface */ -#define WLC_IOCTL_VERSION 1 - -#define WLC_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */ -#define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */ - -/* common ioctl definitions */ -#define WLC_GET_MAGIC 0 -#define WLC_GET_VERSION 1 -#define WLC_UP 2 -#define WLC_DOWN 3 -#define WLC_DUMP 6 -#define WLC_GET_MSGLEVEL 7 -#define WLC_SET_MSGLEVEL 8 -#define WLC_GET_PROMISC 9 -#define WLC_SET_PROMISC 10 -#define WLC_GET_RATE 12 -/* #define WLC_SET_RATE 13 */ /* no longer supported */ -#define WLC_GET_INSTANCE 14 -#define WLC_GET_FRAG 15 /* no longer supported in the new driver */ -#define WLC_SET_FRAG 16 /* no longer supported in the new driver */ -#define WLC_GET_RTS 17 /* no longer supported in the new driver */ -#define WLC_SET_RTS 18 /* no longer supported in the new driver */ -#define WLC_GET_INFRA 19 -#define WLC_SET_INFRA 20 -#define WLC_GET_AUTH 21 -#define WLC_SET_AUTH 22 -#define WLC_GET_BSSID 23 -#define WLC_SET_BSSID 24 -#define WLC_GET_SSID 25 -#define WLC_SET_SSID 26 -#define WLC_RESTART 27 -#define WLC_DUMP_SCB 28 -#define WLC_GET_CHANNEL 29 -#define WLC_SET_CHANNEL 30 -#define WLC_GET_SRL 31 -#define WLC_SET_SRL 32 -#define WLC_GET_LRL 33 -#define WLC_SET_LRL 34 -#define WLC_GET_PLCPHDR 35 -#define WLC_SET_PLCPHDR 36 -#define WLC_GET_RADIO 37 -#define WLC_SET_RADIO 38 -#define WLC_GET_PHYTYPE 39 -#define WLC_DUMP_RATE 40 -#define WLC_SET_RATE_PARAMS 41 -#define WLC_GET_WEP 42 -#define WLC_SET_WEP 43 -#define WLC_GET_KEY 44 -#define WLC_SET_KEY 45 -#define WLC_GET_REGULATORY 46 -#define WLC_SET_REGULATORY 47 -#define WLC_GET_PASSIVE 48 -#define WLC_SET_PASSIVE 49 -#define WLC_SCAN 50 -#define WLC_SCAN_RESULTS 51 -#define WLC_DISASSOC 52 -#define WLC_REASSOC 53 -#define WLC_GET_ROAM_TRIGGER 54 -#define WLC_SET_ROAM_TRIGGER 55 -#define WLC_GET_ROAM_DELTA 56 -#define WLC_SET_ROAM_DELTA 57 -#define WLC_GET_ROAM_SCAN_PERIOD 58 -#define WLC_SET_ROAM_SCAN_PERIOD 59 -#define WLC_EVM 60 -#define WLC_GET_TXANT 61 -#define WLC_SET_TXANT 62 -#define WLC_GET_ANTDIV 63 -#define WLC_SET_ANTDIV 64 -#define WLC_GET_TXPWR 65 -#define WLC_SET_TXPWR 66 -#define WLC_GET_CLOSED 67 -#define WLC_SET_CLOSED 68 -#define WLC_GET_MACLIST 69 -#define WLC_SET_MACLIST 70 -#define WLC_GET_RATESET 71 -#define WLC_SET_RATESET 72 -#define WLC_GET_LOCALE 73 -// #define WLC_SET_LOCALE 74 -#define WLC_GET_BCNPRD 75 -#define WLC_SET_BCNPRD 76 -#define WLC_GET_DTIMPRD 77 -#define WLC_SET_DTIMPRD 78 -#define WLC_GET_SROM 79 -#define WLC_SET_SROM 80 -#define WLC_GET_WEP_RESTRICT 81 -#define WLC_SET_WEP_RESTRICT 82 -#define WLC_GET_COUNTRY 83 -#define WLC_SET_COUNTRY 84 -#define WLC_GET_PM 85 -#define WLC_SET_PM 86 -#define WLC_GET_WAKE 87 -#define WLC_SET_WAKE 88 -#define WLC_GET_D11CNTS 89 -#define WLC_GET_FORCELINK 90 /* ndis only */ -#define WLC_SET_FORCELINK 91 /* ndis only */ -#define WLC_FREQ_ACCURACY 92 -#define WLC_CARRIER_SUPPRESS 93 -#define WLC_GET_PHYREG 94 -#define WLC_SET_PHYREG 95 -#define WLC_GET_RADIOREG 96 -#define WLC_SET_RADIOREG 97 -#define WLC_GET_REVINFO 98 -#define WLC_GET_UCANTDIV 99 -#define WLC_SET_UCANTDIV 100 -#define WLC_R_REG 101 -#define WLC_W_REG 102 -#define WLC_DIAG_LOOPBACK 103 -#define WLC_RESET_D11CNTS 104 -#define WLC_GET_MACMODE 105 -#define WLC_SET_MACMODE 106 -#define WLC_GET_MONITOR 107 -#define WLC_SET_MONITOR 108 -#define WLC_GET_GMODE 109 -#define WLC_SET_GMODE 110 -#define WLC_GET_LEGACY_ERP 111 -#define WLC_SET_LEGACY_ERP 112 -#define WLC_GET_RX_ANT 113 -#define WLC_GET_CURR_RATESET 114 /* current rateset */ -#define WLC_GET_SCANSUPPRESS 115 -#define WLC_SET_SCANSUPPRESS 116 -#define WLC_GET_AP 117 -#define WLC_SET_AP 118 -#define WLC_GET_EAP_RESTRICT 119 -#define WLC_SET_EAP_RESTRICT 120 -#define WLC_SCB_AUTHORIZE 121 -#define WLC_SCB_DEAUTHORIZE 122 -#define WLC_GET_WDSLIST 123 -#define WLC_SET_WDSLIST 124 -#define WLC_GET_ATIM 125 -#define WLC_SET_ATIM 126 -#define WLC_GET_RSSI 127 -#define WLC_GET_PHYANTDIV 128 -#define WLC_SET_PHYANTDIV 129 -#define WLC_AP_RX_ONLY 130 -#define WLC_GET_TX_PATH_PWR 131 -#define WLC_SET_TX_PATH_PWR 132 -#define WLC_GET_WSEC 133 -#define WLC_SET_WSEC 134 -#define WLC_GET_PHY_NOISE 135 -#define WLC_GET_BSS_INFO 136 -#define WLC_GET_PKTCNTS 137 -#define WLC_GET_LAZYWDS 138 -#define WLC_SET_LAZYWDS 139 -#define WLC_GET_BANDLIST 140 -#define WLC_GET_BAND 141 -#define WLC_SET_BAND 142 -#define WLC_SCB_DEAUTHENTICATE 143 -#define WLC_GET_SHORTSLOT 144 -#define WLC_GET_SHORTSLOT_OVERRIDE 145 -#define WLC_SET_SHORTSLOT_OVERRIDE 146 -#define WLC_GET_SHORTSLOT_RESTRICT 147 -#define WLC_SET_SHORTSLOT_RESTRICT 148 -#define WLC_GET_GMODE_PROTECTION 149 -#define WLC_GET_GMODE_PROTECTION_OVERRIDE 150 -#define WLC_SET_GMODE_PROTECTION_OVERRIDE 151 -#define WLC_UPGRADE 152 -#define WLC_GET_MRATE 153 -#define WLC_SET_MRATE 154 -#define WLC_GET_IGNORE_BCNS 155 -#define WLC_SET_IGNORE_BCNS 156 -#define WLC_GET_SCB_TIMEOUT 157 -#define WLC_SET_SCB_TIMEOUT 158 -#define WLC_GET_ASSOCLIST 159 -#define WLC_GET_CLK 160 -#define WLC_SET_CLK 161 -#define WLC_GET_UP 162 -#define WLC_OUT 163 -#define WLC_GET_WPA_AUTH 164 -#define WLC_SET_WPA_AUTH 165 -#define WLC_GET_UCFLAGS 166 -#define WLC_SET_UCFLAGS 167 -#define WLC_GET_PWRIDX 168 -#define WLC_SET_PWRIDX 169 -#define WLC_GET_TSSI 170 -#define WLC_GET_SUP_RATESET_OVERRIDE 171 -#define WLC_SET_SUP_RATESET_OVERRIDE 172 -#define WLC_SET_FAST_TIMER 173 -#define WLC_GET_FAST_TIMER 174 -#define WLC_SET_SLOW_TIMER 175 -#define WLC_GET_SLOW_TIMER 176 -#define WLC_DUMP_PHYREGS 177 -#define WLC_GET_GMODE_PROTECTION_CONTROL 178 -#define WLC_SET_GMODE_PROTECTION_CONTROL 179 -#define WLC_GET_PHYLIST 180 -#define WLC_ENCRYPT_STRENGTH 181 /* ndis only */ -#define WLC_DECRYPT_STATUS 182 /* ndis only */ -#define WLC_GET_KEY_SEQ 183 -#define WLC_GET_SCAN_CHANNEL_TIME 184 -#define WLC_SET_SCAN_CHANNEL_TIME 185 -#define WLC_GET_SCAN_UNASSOC_TIME 186 -#define WLC_SET_SCAN_UNASSOC_TIME 187 -#define WLC_GET_SCAN_HOME_TIME 188 -#define WLC_SET_SCAN_HOME_TIME 189 -#define WLC_GET_SCAN_PASSES 190 -#define WLC_SET_SCAN_PASSES 191 -#define WLC_GET_PRB_RESP_TIMEOUT 192 -#define WLC_SET_PRB_RESP_TIMEOUT 193 -#define WLC_GET_ATTEN 194 -#define WLC_SET_ATTEN 195 -#define WLC_GET_SHMEM 196 /* diag */ -#define WLC_SET_SHMEM 197 /* diag */ -#define WLC_GET_GMODE_PROTECTION_CTS 198 -#define WLC_SET_GMODE_PROTECTION_CTS 199 -#define WLC_SET_TKIP_MIC_FLAG 200 -#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201 -#define WLC_TKIP_COUNTERMEASURES 202 -#define WLC_GET_PIOMODE 203 -#define WLC_SET_PIOMODE 204 -#define WLC_SET_LED 209 -#define WLC_GET_LED 210 -#define WLC_GET_INTERFERENCE_MODE 211 -#define WLC_SET_INTERFERENCE_MODE 212 -#define WLC_GET_CHANNEL_QA 213 -#define WLC_START_CHANNEL_QA 214 -#define WLC_GET_CHANNEL_SEL 215 -#define WLC_START_CHANNEL_SEL 216 -#define WLC_GET_VALID_CHANNELS 217 -#define WLC_GET_FAKEFRAG 218 -#define WLC_SET_FAKEFRAG 219 -#define WLC_GET_PWROUT_PERCENTAGE 220 -#define WLC_SET_PWROUT_PERCENTAGE 221 -#define WLC_SET_BAD_FRAME_PREEMPT 222 -#define WLC_GET_BAD_FRAME_PREEMPT 223 -#define WLC_SET_LEAP_LIST 224 -#define WLC_GET_LEAP_LIST 225 -#define WLC_GET_CWMIN 226 -#define WLC_SET_CWMIN 227 -#define WLC_GET_CWMAX 228 -#define WLC_SET_CWMAX 229 -#define WLC_GET_WET 230 -#define WLC_SET_WET 231 -#define WLC_GET_KEY_PRIMARY 235 -#define WLC_SET_KEY_PRIMARY 236 -#define WLC_SCAN_WITH_CALLBACK 240 -#define WLC_GET_RADAR 242 -#define WLC_SET_RADAR 243 -#define WLC_SET_SPECT_MANAGMENT 244 -#define WLC_GET_SPECT_MANAGMENT 245 -#define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */ -#define WLC_SET_CS_SCAN_TIMER 248 -#define WLC_GET_CS_SCAN_TIMER 249 -#define WLC_SEND_PWR_CONSTRAINT 254 -#define WLC_CURRENT_PWR 256 -#define WLC_GET_CHANNELS_IN_COUNTRY 260 -#define WLC_GET_COUNTRY_LIST 261 -#define WLC_GET_VAR 262 /* get value of named variable */ -#define WLC_SET_VAR 263 /* set named variable to value */ -#define WLC_NVRAM_GET 264 -#define WLC_NVRAM_SET 265 -#define WLC_SET_WSEC_PMK 268 -#define WLC_GET_AUTH_MODE 269 -#define WLC_SET_AUTH_MODE 270 -#define WLC_NDCONFIG_ITEM 273 /* currently handled in wl_oid.c */ -#define WLC_NVOTPW 274 -/* #define WLC_OTPW 275 */ /* no longer supported */ -#define WLC_SET_LOCALE 278 -#define WLC_LAST 279 /* do not change - use get_var/set_var */ - -/* - * Minor kludge alert: - * Duplicate a few definitions that irelay requires from epiioctl.h here - * so caller doesn't have to include this file and epiioctl.h . - * If this grows any more, it would be time to move these irelay-specific - * definitions out of the epiioctl.h and into a separate driver common file. - */ -#ifndef EPICTRL_COOKIE -#define EPICTRL_COOKIE 0xABADCEDE -#endif - -/* vx wlc ioctl's offset */ -#define CMN_IOCTL_OFF 0x180 - -/* - * custom OID support - * - * 0xFF - implementation specific OID - * 0xE4 - first byte of Broadcom PCI vendor ID - * 0x14 - second byte of Broadcom PCI vendor ID - * 0xXX - the custom OID number - */ - -/* begin 0x1f values beyond the start of the ET driver range. */ -#define WL_OID_BASE 0xFFE41420 - -/* NDIS overrides */ -#define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE) -#define OID_WL_NDCONFIG_ITEM (WL_OID_BASE + WLC_NDCONFIG_ITEM) - -#define WL_DECRYPT_STATUS_SUCCESS 1 -#define WL_DECRYPT_STATUS_FAILURE 2 -#define WL_DECRYPT_STATUS_UNKNOWN 3 - -/* allows user-mode app to poll the status of USB image upgrade */ -#define WLC_UPGRADE_SUCCESS 0 -#define WLC_UPGRADE_PENDING 1 - -/* Bit masks for radio disabled status - returned by WL_GET_RADIO */ -#define WL_RADIO_SW_DISABLE (1<<0) -#define WL_RADIO_HW_DISABLE (1<<1) -#define WL_RADIO_MPC_DISABLE (1<<2) -#define WL_RADIO_COUNTRY_DISABLE (1<<3) /* some countries don't support any 802.11 channel */ - -/* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */ -#define WL_TXPWR_OVERRIDE (1<<31) - -/* "diag" iovar argument and error code */ -#define WL_DIAG_INTERRUPT 1 /* d11 loopback interrupt test */ -#define WL_DIAG_MEMORY 3 /* d11 memory test */ -#define WL_DIAG_LED 4 /* LED test */ -#define WL_DIAG_REG 5 /* d11/phy register test */ -#define WL_DIAG_SROM 6 /* srom read/crc test */ -#define WL_DIAG_DMA 7 /* DMA test */ - -#define WL_DIAGERR_SUCCESS 0 -#define WL_DIAGERR_FAIL_TO_RUN 1 /* unable to run requested diag */ -#define WL_DIAGERR_NOT_SUPPORTED 2 /* diag requested is not supported */ -#define WL_DIAGERR_INTERRUPT_FAIL 3 /* loopback interrupt test failed */ -#define WL_DIAGERR_LOOPBACK_FAIL 4 /* loopback data test failed */ -#define WL_DIAGERR_SROM_FAIL 5 /* srom read failed */ -#define WL_DIAGERR_SROM_BADCRC 6 /* srom crc failed */ -#define WL_DIAGERR_REG_FAIL 7 /* d11/phy register test failed */ -#define WL_DIAGERR_MEMORY_FAIL 8 /* d11 memory test failed */ -#define WL_DIAGERR_NOMEM 9 /* diag test failed due to no memory */ -#define WL_DIAGERR_DMA_FAIL 10 /* DMA test failed */ - -/* Bus types */ -#define WL_SB_BUS 0 /* Silicon Backplane */ -#define WL_PCI_BUS 1 /* PCI target */ -#define WL_PCMCIA_BUS 2 /* PCMCIA target */ - -/* band types */ -#define WLC_BAND_AUTO 0 /* auto-select */ -#define WLC_BAND_A 1 /* "a" band (5 Ghz) */ -#define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */ - -/* phy types (returned by WLC_GET_PHYTPE) */ -#define WLC_PHY_TYPE_A 0 -#define WLC_PHY_TYPE_B 1 -#define WLC_PHY_TYPE_G 2 -#define WLC_PHY_TYPE_NULL 0xf - -/* MAC list modes */ -#define WLC_MACMODE_DISABLED 0 /* MAC list disabled */ -#define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */ -#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */ - - -/* 54g modes (basic bits may still be overridden) */ -#define GMODE_LEGACY_B 0 /* Rateset: 1b, 2b, 5.5, 11 */ - /* Preamble: Long */ - /* Shortslot: Off */ -#define GMODE_AUTO 1 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ - /* Extended Rateset: 6, 9, 12, 48 */ - /* Preamble: Long */ - /* Shortslot: Auto */ -#define GMODE_ONLY 2 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 */ - /* Extended Rateset: 6b, 9, 12b, 48 */ - /* Preamble: Short required */ - /* Shortslot: Auto */ -#define GMODE_B_DEFERRED 3 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ - /* Extended Rateset: 6, 9, 12, 48 */ - /* Preamble: Long */ - /* Shortslot: On */ -#define GMODE_PERFORMANCE 4 /* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 */ - /* Preamble: Short required */ - /* Shortslot: On and required */ -#define GMODE_LRS 5 /* Rateset: 1b, 2b, 5.5b, 11b */ - /* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 */ - /* Preamble: Long */ - /* Shortslot: Auto */ -#define GMODE_MAX 6 - - -/* values for PLCPHdr_override */ -#define WLC_PLCP_AUTO -1 -#define WLC_PLCP_SHORT 0 -#define WLC_PLCP_LONG 1 - -/* values for g_protection_override */ -#define WLC_G_PROTECTION_AUTO -1 -#define WLC_G_PROTECTION_OFF 0 -#define WLC_G_PROTECTION_ON 1 - -/* values for g_protection_control */ -#define WLC_G_PROTECTION_CTL_OFF 0 -#define WLC_G_PROTECTION_CTL_LOCAL 1 -#define WLC_G_PROTECTION_CTL_OVERLAP 2 - -/* Values for PM */ -#define PM_OFF 0 -#define PM_MAX 1 -#define PM_FAST 2 - -/* interference mitigation options */ -#define INTERFERE_NONE 0 /* off */ -#define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */ -#define WLAN_MANUAL 2 /* ACI: no auto detection */ -#define WLAN_AUTO 3 /* ACI: auto - detact */ - -/* Message levels */ -#define WL_ERROR_VAL 0x0001 -#define WL_TRACE_VAL 0x0002 -#define WL_PRHDRS_VAL 0x0004 -#define WL_PRPKT_VAL 0x0008 -#define WL_INFORM_VAL 0x0010 -#define WL_TMP_VAL 0x0020 -#define WL_OID_VAL 0x0040 -#define WL_RATE_VAL 0x0080 -#define WL_ASSOC_VAL 0x0100 -#define WL_PRUSR_VAL 0x0200 -#define WL_PS_VAL 0x0400 -#define WL_TXPWR_VAL 0x0800 -#define WL_GMODE_VAL 0x1000 -#define WL_DUAL_VAL 0x2000 -#define WL_WSEC_VAL 0x4000 -#define WL_WSEC_DUMP_VAL 0x8000 -#define WL_LOG_VAL 0x10000 -#define WL_NRSSI_VAL 0x20000 -#define WL_LOFT_VAL 0x40000 -#define WL_REGULATORY_VAL 0x80000 -#define WL_ACI_VAL 0x100000 - - -/* 802.11h enforcement levels */ -#define SPECT_MNGMT_OFF 0 /* 11h disabled */ -#define SPECT_MNGMT_LOOSE 1 /* Allow scan lists to contain non-11h AP */ - /* when 11h is enabled */ -#define SPECT_MNGMT_STRICT 2 /* Prine out non-11h APs from scan list */ - -typedef struct { - int npulses; /* required number of pulses at n * t_int */ - int ncontig; /* required number of pulses at t_int */ - int min_pw; /* minimum pulse width (20 MHz clocks) */ - int max_pw; /* maximum pulse width (20 MHz clocks) */ - uint16 thresh0; /* Radar detection, thresh 0 */ - uint16 thresh1; /* Radar detection, thresh 1 */ -} wl_radar_args_t; - -/* radar iovar SET defines */ -#define WL_RADRA_DETECTOR_OFF 0 /* radar dector off */ -#define WL_RADAR_DETECTOR_ON 1 /* radar detector on */ -#define WL_RADAR_SIMULATED 2 /* force radar detector to declare detection once */ - -/* dfs_status iovar-related defines */ - -/* cac - channel availability check, - * ism - in-service monitoring - * csa - channel switching anouncement - */ - -/* cac state values */ -#define WL_DFS_CACSTATE_IDLE 0 /* state for operating in non-radar channel */ -#define WL_DFS_CACSTATE_PREISM_CAC 1 /* CAC in progress */ -#define WL_DFS_CACSTATE_ISM 2 /* ISM in progress */ -#define WL_DFS_CACSTATE_CSA 3 /* csa */ -#define WL_DFS_CACSTATE_POSTISM_CAC 4 /* ISM CAC */ -#define WL_DFS_CACSTATE_PREISM_OOC 5 /* PREISM OOC */ -#define WL_DFS_CACSTATE_POSTISM_OOC 6 /* POSTISM OOC */ -#define WL_DFS_CACSTATES 7 /* this many states exist */ - -/* data structure used in 'dfs_status' wl interface, which is used to query dfs status */ -typedef struct { - uint state; /* noted by WL_DFS_CACSTATE_XX. */ - uint duration; /* time spent in ms in state. */ - /* as dfs enters ISM state, it removes the operational channel from quiet channel list - * and notes the channel in channel_cleared. set to 0 if no channel is cleared - */ - uint channel_cleared; -} wl_dfs_status_t; - -#define NUM_PWRCTRL_RATES 12 - - -/* 802.11h enforcement levels */ -#define SPECT_MNGMT_OFF 0 /* 11h disabled */ -#define SPECT_MNGMT_LOOSE 1 /* allow scan lists to contain non-11h AP */ -#define SPECT_MNGMT_STRICT 2 /* prune out non-11h APs from scan list */ -#define SPECT_MNGMT_11D 3 /* switch to 802.11D mode */ - -#define WL_CHAN_VALID_HW (1 << 0) /* valid with current HW */ -#define WL_CHAN_VALID_SW (1 << 1) /* valid with current country setting */ -#define WL_CHAN_BAND_A (1 << 2) /* A-band channel */ -#define WL_CHAN_RADAR (1 << 3) /* radar sensitive channel */ -#define WL_CHAN_INACTIVE (1 << 4) /* temporarily out of service due to radar */ -#define WL_CHAN_RADAR_PASSIVE (1 << 5) /* radar channel is in passive mode */ - -#define WL_MPC_VAL 0x00400000 -#define WL_APSTA_VAL 0x00800000 -#define WL_DFS_VAL 0x01000000 - - -/* max # of leds supported by GPIO (gpio pin# == led index#) */ -#define WL_LED_NUMGPIO 16 /* gpio 0-15 */ - -/* led per-pin behaviors */ -#define WL_LED_OFF 0 /* always off */ -#define WL_LED_ON 1 /* always on */ -#define WL_LED_ACTIVITY 2 /* activity */ -#define WL_LED_RADIO 3 /* radio enabled */ -#define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */ -#define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */ -#define WL_LED_BGMODE 6 /* on if gmode, off if bmode */ -#define WL_LED_WI1 7 -#define WL_LED_WI2 8 -#define WL_LED_WI3 9 -#define WL_LED_ASSOC 10 /* associated state indicator */ -#define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */ -#define WL_LED_NUMBEHAVIOR 12 - -/* led behavior numeric value format */ -#define WL_LED_BEH_MASK 0x7f /* behavior mask */ -#define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */ - - -/* maximum channels */ -#define WL_NUMCHANNELS 64 /* max # of channels in the band */ - -/* rate check */ -#define WL_RATE_OFDM(r) (((r) & 0x7f) == 12 || ((r) & 0x7f) == 18 || \ - ((r) & 0x7f) == 24 || ((r) & 0x7f) == 36 || \ - ((r) & 0x7f) == 48 || ((r) & 0x7f) == 72 || \ - ((r) & 0x7f) == 96 || ((r) & 0x7f) == 108) - -/* WDS link local endpoint WPA role */ -#define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */ -#define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */ -#define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */ - -/* afterburner_override */ -#define ABO_AUTO -1 /* auto - no override */ -#define ABO_OFF 0 /* force afterburner off */ -#define ABO_ON 1 /* force afterburner on */ - -#define GMODE_AFTERBURNER 6 - -/* number of bytes needed to define a 128-bit mask for MAC event reporting */ -#define WL_EVENTING_MASK_LEN 16 - -/* Structures and constants used for "vndr_ie" IOVar interface */ -#define VNDR_IE_CMD_LEN 4 /* length of the set command string: "add", "del" (+ NULL) */ - -/* 802.11 Mgmt Packet flags */ -#define VNDR_IE_BEACON_FLAG 0x1 -#define VNDR_IE_PRBRSP_FLAG 0x2 -#define VNDR_IE_ASSOCRSP_FLAG 0x4 -#define VNDR_IE_AUTHRSP_FLAG 0x8 - -typedef struct { - uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */ - vndr_ie_t vndr_ie_data; /* vendor IE data */ -} vndr_ie_info_t; - -typedef struct { - int iecount; /* number of entries in the vndr_ie_list[] array */ - vndr_ie_info_t vndr_ie_list[1]; /* variable size list of vndr_ie_info_t structs */ -} vndr_ie_buf_t; - -typedef struct { - char cmd[VNDR_IE_CMD_LEN]; /* vndr_ie IOVar set command : "add", "del" + NULL */ - vndr_ie_buf_t vndr_ie_buffer; /* buffer containing Vendor IE list information */ -} vndr_ie_setbuf_t; - -/* join target preference types */ -#define WL_JOIN_PREF_RSSI 1 /* by RSSI, mandatory */ -#define WL_JOIN_PREF_WPA 2 /* by akm and ciphers, optional, RSN and WPA as values */ -#define WL_JOIN_PREF_BAND 3 /* by 802.11 band, optional, WLC_BAND_XXXX as values */ - -/* band preference */ -#define WLJP_BAND_ASSOC_PREF 255 /* use assoc preference settings */ - /* others use WLC_BAND_XXXX as values */ - -/* any multicast cipher suite */ -#define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00" - -#if !defined(__GNUC__) -#pragma pack(pop) -#endif - -#define NFIFO 6 /* # tx/rx fifopairs */ - -#define WL_CNT_T_VERSION 1 /* current version of wl_cnt_t struct */ - -typedef struct { - uint16 version; /* see definition of WL_CNT_T_VERSION */ - uint16 length; /* length of entire structure */ - - /* transmit stat counters */ - uint32 txframe; /* tx data frames */ - uint32 txbyte; /* tx data bytes */ - uint32 txretrans; /* tx mac retransmits */ - uint32 txerror; /* tx data errors */ - uint32 txctl; /* tx management frames */ - uint32 txprshort; /* tx short preamble frames */ - uint32 txserr; /* tx status errors */ - uint32 txnobuf; /* tx out of buffers errors */ - uint32 txnoassoc; /* tx discard because we're not associated */ - uint32 txrunt; /* tx runt frames */ - uint32 txchit; /* tx header cache hit (fastpath) */ - uint32 txcmiss; /* tx header cache miss (slowpath) */ - - /* transmit chip error counters */ - uint32 txuflo; /* tx fifo underflows */ - uint32 txphyerr; /* tx phy errors (indicated in tx status) */ - uint32 txphycrs; - - /* receive stat counters */ - uint32 rxframe; /* rx data frames */ - uint32 rxbyte; /* rx data bytes */ - uint32 rxerror; /* rx data errors */ - uint32 rxctl; /* rx management frames */ - uint32 rxnobuf; /* rx out of buffers errors */ - uint32 rxnondata; /* rx non data frames in the data channel errors */ - uint32 rxbadds; /* rx bad DS errors */ - uint32 rxbadcm; /* rx bad control or management frames */ - uint32 rxfragerr; /* rx fragmentation errors */ - uint32 rxrunt; /* rx runt frames */ - uint32 rxgiant; /* rx giant frames */ - uint32 rxnoscb; /* rx no scb error */ - uint32 rxbadproto; /* rx invalid frames */ - uint32 rxbadsrcmac; /* rx frames with Invalid Src Mac*/ - uint32 rxbadda; /* rx frames tossed for invalid da */ - uint32 rxfilter; /* rx frames filtered out */ - - /* receive chip error counters */ - uint32 rxoflo; /* rx fifo overflow errors */ - uint32 rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ - - uint32 d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ - uint32 d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ - uint32 d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ - - /* misc counters */ - uint32 dmade; /* tx/rx dma descriptor errors */ - uint32 dmada; /* tx/rx dma data errors */ - uint32 dmape; /* tx/rx dma descriptor protocol errors */ - uint32 reset; /* reset count */ - uint32 tbtt; /* cnts the TBTT int's */ - uint32 txdmawar; - - /* MAC counters: 32-bit version of d11.h's macstat_t */ - uint32 txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, - Control Management (includes retransmissions) */ - uint32 txrtsfrm; /* number of RTS sent out by the MAC */ - uint32 txctsfrm; /* number of CTS sent out by the MAC */ - uint32 txackfrm; /* number of ACK frames sent out */ - uint32 txdnlfrm; /* Not used */ - uint32 txbcnfrm; /* beacons transmitted */ - uint32 txfunfl[8]; /* per-fifo tx underflows */ - uint32 txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS or BCN) */ - uint32 txphyerror; /* Transmit phy error, type of error is reported in tx-status for - driver enqueued frames*/ - uint32 rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ - uint32 rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ - uint32 rxinvmachdr; /* Either the protocol version != 0 or frame type not - data/control/management*/ - uint32 rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ - uint32 rxbadplcp; /* parity check of the PLCP header failed */ - uint32 rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ - uint32 rxstrt; /* Number of received frames with a good PLCP (i.e. passing parity check) */ - uint32 rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ - uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ - uint32 rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ - uint32 rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ - uint32 rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS)*/ - uint32 rxackucast; /* number of ucast ACKS received (good FCS)*/ - uint32 rxdfrmocast; /* number of received DATA frames with good FCS and not matching RA */ - uint32 rxmfrmocast; /* number of received MGMT frames with good FCS and not matching RA */ - uint32 rxcfrmocast; /* number of received CNTRL frame with good FCS and not matching RA */ - uint32 rxrtsocast; /* number of received RTS not addressed to the MAC */ - uint32 rxctsocast; /* number of received CTS not addressed to the MAC */ - uint32 rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ - uint32 rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ - uint32 rxcfrmmcast; /* number of RX Control multicast frames received by the MAC (unlikely - to see these) */ - uint32 rxbeaconmbss; /* beacons received from member of BSS */ - uint32 rxdfrmucastobss; /* number of unicast frames addressed to the MAC from other BSS (WDS FRAME) */ - uint32 rxbeaconobss; /* beacons received from other BSS */ - uint32 rxrsptmout; /* Number of response timeouts for transmitted frames expecting a - response */ - uint32 bcntxcancl; /* transmit beacons cancelled due to receipt of beacon (IBSS) */ - uint32 rxf0ovfl; /* Number of receive fifo 0 overflows */ - uint32 rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ - uint32 rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ - uint32 txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ - uint32 pmqovfl; /* Number of PMQ overflows */ - uint32 rxcgprqfrm; /* Number of received Probe requests that made it into the PRQ fifo */ - uint32 rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ - uint32 txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did not get ACK */ - uint32 txcgprssuc; /* Tx Probe Rresponse Success (ACK was received) */ - uint32 prs_timeout; /* Number of probe requests that were dropped from the PRQ fifo because - a probe response could not be sent out within the time limit defined - in M_PRS_MAXTIME */ - uint32 rxnack; /* Number of NACKS received (Afterburner) */ - uint32 frmscons; /* Number of frames completed without transmission because of an - Afterburner re-queue */ - uint32 txnack; /* Number of NACKs transmtitted (Afterburner) */ - uint32 txglitch_nack; /* obsolete */ - uint32 txburst; /* obsolete */ - uint32 rxburst; /* obsolete */ - - /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ - uint32 txfrag; /* dot11TransmittedFragmentCount */ - uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ - uint32 txfail; /* dot11FailedCount */ - uint32 txretry; /* dot11RetryCount */ - uint32 txretrie; /* dot11MultipleRetryCount */ - uint32 rxdup; /* dot11FrameduplicateCount */ - uint32 txrts; /* dot11RTSSuccessCount */ - uint32 txnocts; /* dot11RTSFailureCount */ - uint32 txnoack; /* dot11ACKFailureCount */ - uint32 rxfrag; /* dot11ReceivedFragmentCount */ - uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ - uint32 rxcrc; /* dot11FCSErrorCount */ - uint32 txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ - uint32 rxundec; /* dot11WEPUndecryptableCount */ - - /* WPA2 counters (see rxundec for DecryptFailureCount) */ - uint32 tkipmicfaill; /* TKIPLocalMICFailures */ - uint32 tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ - uint32 tkipreplay; /* TKIPReplays */ - uint32 ccmpfmterr; /* CCMPFormatErrors */ - uint32 ccmpreplay; /* CCMPReplays */ - uint32 ccmpundec; /* CCMPDecryptErrors */ - uint32 fourwayfail; /* FourWayHandshakeFailures */ - uint32 wepundec; /* dot11WEPUndecryptableCount */ - uint32 wepicverr; /* dot11WEPICVErrorCount */ - uint32 decsuccess; /* DecryptSuccessCount */ - uint32 tkipicverr; /* TKIPICVErrorCount */ - uint32 wepexcluded; /* dot11WEPExcludedCount */ -} wl_cnt_t; - -#endif /* _wlioctl_h_ */ diff --git a/openwrt/package/wificonf/ipkg/wificonf.control b/openwrt/package/wificonf/ipkg/wificonf.control deleted file mode 100644 index 94a0bde198a..00000000000 --- a/openwrt/package/wificonf/ipkg/wificonf.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: wificonf -Priority: optional -Section: net -Maintainer: Felix Fietkau <nbd@openwrt.org> -Description: Replacement utility for wlconf diff --git a/openwrt/package/wificonf/wificonf.c b/openwrt/package/wificonf/wificonf.c deleted file mode 100644 index 068090cc964..00000000000 --- a/openwrt/package/wificonf/wificonf.c +++ /dev/null @@ -1,1026 +0,0 @@ -/* - * Wireless Network Adapter configuration utility - * - * Copyright (C) 2005 Felix Fietkau <nbd@openwrt.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 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. - */ - -#include <stdio.h> -#include <unistd.h> -#include <iwlib.h> -#include <bcmnvram.h> -#include <shutils.h> -#include <wlioctl.h> -#include <signal.h> - -#define ADD_VIF_RETRIES 5 -// #define DEBUG - -/*------------------------------------------------------------------*/ -/* - * Macro to handle errors when setting WE - * Print a nice error message and exit... - * We define them as macro so that "return" do the right thing. - * The "do {...} while(0)" is a standard trick - */ -#define ERR_SET_EXT(rname, request) \ - fprintf(stderr, "Error for wireless request \"%s\" (%X) :\n", \ - rname, request) - -#define ABORT_ARG_NUM(rname, request) \ - do { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " too few arguments.\n"); \ - } while(0) - -#define ABORT_ARG_TYPE(rname, request, arg) \ - do { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " invalid argument \"%s\".\n", arg); \ - } while(0) - -#define ABORT_ARG_SIZE(rname, request, max) \ - do { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " argument too big (max %d)\n", max); \ - } while(0) - -/*------------------------------------------------------------------*/ -/* - * Wrapper to push some Wireless Parameter in the driver - * Use standard wrapper and add pretty error message if fail... - */ -#define IW_SET_EXT_ERR(skfd, ifname, request, wrq, rname) \ - do { \ - if(iw_set_ext(skfd, ifname, request, wrq) < 0) { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " SET failed on device %-1.16s ; %s.\n", \ - ifname, strerror(errno)); \ - } } while(0) - -/*------------------------------------------------------------------*/ -/* - * Wrapper to extract some Wireless Parameter out of the driver - * Use standard wrapper and add pretty error message if fail... - */ -#define IW_GET_EXT_ERR(skfd, ifname, request, wrq, rname) \ - do { \ - if(iw_get_ext(skfd, ifname, request, wrq) < 0) { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " GET failed on device %-1.16s ; %s.\n", \ - ifname, strerror(errno)); \ - } } while(0) - -static void set_wext_ssid(int skfd, char *ifname); - -static char *prefix; -static char buffer[128]; -static int wpa_enc = 0; - -static char *wl_var(char *name) -{ - sprintf(buffer, "%s_%s", prefix, name); - return buffer; -} - -static char *vif_var(int vif, char *name) -{ - if (vif == 0) - return wl_var(name); - - sprintf(buffer, "%s.%d_%s", prefix, vif, name); - return buffer; -} - -static int nvram_enabled(char *name) -{ - return (nvram_match(name, "1") || nvram_match(name, "on") || nvram_match(name, "enabled") || nvram_match(name, "true") || nvram_match(name, "yes") ? 1 : 0); -} - -static int nvram_disabled(char *name) -{ - return (nvram_match(name, "0") || nvram_match(name, "off") || nvram_match(name, "disabled") || nvram_match(name, "false") || nvram_match(name, "no") ? 1 : 0); -} - - -/* Quarter dBm units to mW - * Table starts at QDBM_OFFSET, so the first entry is mW for qdBm=153 - * Table is offset so the last entry is largest mW value that fits in - * a uint16. - */ - -#define QDBM_OFFSET 153 -#define QDBM_TABLE_LEN 40 - -/* Smallest mW value that will round up to the first table entry, QDBM_OFFSET. - * Value is ( mW(QDBM_OFFSET - 1) + mW(QDBM_OFFSET) ) / 2 - */ -#define QDBM_TABLE_LOW_BOUND 6493 - -/* Largest mW value that will round down to the last table entry, - * QDBM_OFFSET + QDBM_TABLE_LEN-1. - * Value is ( mW(QDBM_OFFSET + QDBM_TABLE_LEN - 1) + mW(QDBM_OFFSET + QDBM_TABLE_LEN) ) / 2. - */ -#define QDBM_TABLE_HIGH_BOUND 64938 - -static const uint16 nqdBm_to_mW_map[QDBM_TABLE_LEN] = { -/* qdBm: +0 +1 +2 +3 +4 +5 +6 +7 */ -/* 153: */ 6683, 7079, 7499, 7943, 8414, 8913, 9441, 10000, -/* 161: */ 10593, 11220, 11885, 12589, 13335, 14125, 14962, 15849, -/* 169: */ 16788, 17783, 18836, 19953, 21135, 22387, 23714, 25119, -/* 177: */ 26607, 28184, 29854, 31623, 33497, 35481, 37584, 39811, -/* 185: */ 42170, 44668, 47315, 50119, 53088, 56234, 59566, 63096 -}; - -unsigned char mw_to_qdbm(uint16 mw) -{ - char qdbm; - int offset; - uint mw_uint = mw; - uint boundary; - - /* handle boundary case */ - if (mw_uint <= 1) - return 0; - - offset = QDBM_OFFSET; - - /* move mw into the range of the table */ - while (mw_uint < QDBM_TABLE_LOW_BOUND) { - mw_uint *= 10; - offset -= 40; - } - - for (qdbm = 0; qdbm < QDBM_TABLE_LEN-1; qdbm++) { - boundary = nqdBm_to_mW_map[qdbm] + (nqdBm_to_mW_map[qdbm+1] - nqdBm_to_mW_map[qdbm])/2; - if (mw_uint < boundary) break; - } - - qdbm += (unsigned char)offset; - - return(qdbm); -} - -static int bcom_ioctl(int skfd, char *ifname, int cmd, void *buf, int len) -{ - struct ifreq ifr; - wl_ioctl_t ioc; - int ret; - - ioc.cmd = cmd; - ioc.buf = buf; - ioc.len = len; - - ifr.ifr_data = (caddr_t) &ioc; - strncpy(ifr.ifr_name, ifname, IFNAMSIZ); - - ret = ioctl(skfd, SIOCDEVPRIVATE, &ifr); - -#ifdef DEBUG - if (ret < 0) - fprintf(stderr, "IOCTL %d failed: %d\n", cmd, ret); -#endif - - return ret; -} - -static int bcom_set_var(int skfd, char *ifname, char *var, void *val, int len) -{ - char buf[8192]; - int ret; - - if (strlen(var) + 1 > sizeof(buf) || len > sizeof(buf)) - return -1; - - bzero(buf, sizeof(buf)); - strcpy(buf, var); - memcpy(&buf[strlen(var) + 1], val, len); - - ret = bcom_ioctl(skfd, ifname, WLC_SET_VAR, buf, sizeof(buf)); - -#ifdef DEBUG - if (ret < 0) - fprintf(stderr, "SET_VAR %s failed: %d\n", var, ret); -#endif - - return ret; -} - -static int bcom_get_var(int skfd, char *ifname, char *var, void *buf, int len) -{ - int ret; - - if (strlen(var) + 1 > sizeof(buf) || len > sizeof(buf)) - return -1; - - bzero(buf, sizeof(buf)); - strcpy(buf, var); - - ret = bcom_ioctl(skfd, ifname, WLC_GET_VAR, buf, sizeof(buf)); - -#ifdef DEBUG - if (ret < 0) - fprintf(stderr, "GET_VAR %s failed: %d\n", var, ret); -#endif - - return ret; -} - -static int bcom_set_bss_var(int skfd, char *ifname, int bss, char *var, void *val, int len) -{ - char buf[8192]; - int i = 0, ret; - - bzero(buf, sizeof(buf)); - if (strlen(var) + len + 8 > sizeof(buf) || len > sizeof(buf)) - return -1; - - // "bsscfg:<name>\x00" <bss> <data> - i = sprintf(buf, "bsscfg:%s", var); - buf[i++] = 0; - - memcpy(buf + i, &bss, sizeof(bss)); - i += sizeof(bss); - - memcpy(buf + i, val, len); - i += len; - - ret = bcom_ioctl(skfd, ifname, WLC_SET_VAR, buf, i); - -#ifdef DEBUG - if (ret < 0) - fprintf(stderr, "SET_BSS_VAR %s failed: %d\n", var, ret); -#endif - - return ret; -} - -static int bcom_set_int(int skfd, char *ifname, char *var, int val) -{ - return bcom_set_var(skfd, ifname, var, &val, sizeof(val)); -} - -static int bcom_set_bss_int(int skfd, char *ifname, int bss, char *var, int val) -{ - return bcom_set_bss_var(skfd, ifname, bss, var, &val, sizeof(val)); -} - -static int is_new_bcom(int skfd, char *ifname) -{ - char buf[8192]; - - bzero(buf, 8192); - bcom_ioctl(skfd, ifname, WLC_DUMP, buf, 8192); - - if (strstr(buf, "3.130")) - return 1; - - return 0; -} - -static int bcom_get_wsec(int vif) -{ - int val; - - if (nvram_match(vif_var(vif, "crypto"), "tkip")) - val = TKIP_ENABLED; - else if (nvram_match(vif_var(vif, "crypto"), "aes")) - val = AES_ENABLED; - else if (nvram_match(vif_var(vif, "crypto"), "tkip+aes") || nvram_match(vif_var(vif, "crypto"), "aes+tkip")) - val = TKIP_ENABLED | AES_ENABLED; - else - val = 0; - - return val; -} - -static int bcom_get_wauth(int vif) -{ - char *v, *next, var[80]; - int res = 0; - - if (!(v = nvram_get(vif_var(vif, "akm")))) - v = nvram_safe_get(vif_var(vif, "auth_mode")); - - foreach(var, v, next) { - if (strcmp(var, "psk") == 0) - res |= WPA_AUTH_PSK; - else if (strcmp(var, "psk2") == 0) - res |= WPA2_AUTH_PSK; - else if (strcmp(var, "wpa") == 0) - res |= WPA_AUTH_UNSPECIFIED; - else if (strcmp(var, "wpa2") == 0) - res |= WPA2_AUTH_UNSPECIFIED; - } - - return res; -} - -static void stop_bcom(int skfd, char *ifname) -{ - int val = 0; - wlc_ssid_t ssid; - - if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) - return; - - ssid.SSID_len = 0; - ssid.SSID[0] = 0; - bcom_ioctl(skfd, ifname, WLC_SET_SSID, &ssid, sizeof(ssid)); - bcom_ioctl(skfd, ifname, WLC_DOWN, NULL, 0); - -} - -static void start_bcom(int skfd, char *ifname) -{ - int val = 0; - - if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) - return; - - bcom_ioctl(skfd, ifname, WLC_UP, &val, sizeof(val)); -} - -static int setup_bcom_wds(int skfd, char *ifname) -{ - char buf[8192]; - char wbuf[80]; - char *v; - int wds_enabled = 0; - - if (v = nvram_get(wl_var("wds"))) { - struct maclist *wdslist = (struct maclist *) buf; - struct ether_addr *addr = wdslist->ea; - char *next; - - memset(buf, 0, 8192); - foreach(wbuf, v, next) { - if (ether_atoe(wbuf, addr->ether_addr_octet)) { - wdslist->count++; - addr++; - wds_enabled = 1; - } - } - bcom_ioctl(skfd, ifname, WLC_SET_WDSLIST, buf, sizeof(buf)); - } - return wds_enabled; -} - -static void set_wext_mode(skfd, ifname) -{ - struct iwreq wrq; - int ap = 0, infra = 0, wet = 0; - - /* Set operation mode */ - ap = !nvram_match(wl_var("mode"), "sta") && !nvram_match(wl_var("mode"), "wet"); - infra = !nvram_disabled(wl_var("infra")); - wet = !ap && nvram_match(wl_var("mode"), "wet"); - - wrq.u.mode = (!infra ? IW_MODE_ADHOC : (ap ? IW_MODE_MASTER : (wet ? IW_MODE_REPEAT : IW_MODE_INFRA))); - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWMODE, &wrq, "Set Mode"); -} - - -void start_watchdog(int skfd, char *ifname) -{ - FILE *f; - char *v, *next; - unsigned char buf[8192], buf2[8192], wbuf[80], *p, *tmp; - int wds = 0, i, j, restart_wds; - wlc_ssid_t ssid; - - if (fork()) - return; - - system("kill $(cat /var/run/wifi.pid) 2>&- >&-"); - f = fopen("/var/run/wifi.pid", "w"); - fprintf(f, "%d\n", getpid()); - fclose(f); - - v = nvram_safe_get(wl_var("wds")); - memset(buf2, 0, 8192); - p = buf2; - foreach(wbuf, v, next) { - if (ether_atoe(wbuf, p)) { - p += 6; - wds++; - } - } - v = nvram_safe_get(wl_var("ssid")); - ssid.SSID_len = strlen(v); - strncpy(ssid.SSID, v, 32); - - for (;;) { - sleep(5); - - /* client mode */ - bcom_ioctl(skfd, ifname, WLC_GET_AP, &i, sizeof(i)); - if (!i) { - i = 0; - if (bcom_ioctl(skfd, ifname, WLC_GET_BSSID, buf, 6) < 0) - i = 1; - memcpy(buf + 6, "\x00\x00\x00\x00\x00\x00", 6); - if (memcmp(buf, buf + 6, 6) == 0) - i = 1; - - memset(buf, 0, 8192); - strcpy(buf, "sta_info"); - bcom_ioctl(skfd, ifname, WLC_GET_BSSID, buf + strlen(buf) + 1, 6); - if (bcom_ioctl(skfd, ifname, WLC_GET_VAR, buf, 8192) < 0) { - i = 1; - } else { - sta_info_t *sta = (sta_info_t *) (buf + 4); - if ((sta->flags & 0x18) != 0x18) - i = 1; - if (sta->idle > 20) - i = 1; - } - - if (i) - bcom_ioctl(skfd, ifname, WLC_SET_SSID, &ssid, sizeof(ssid)); - } - - - /* wds */ - p = buf2; - restart_wds = 0; - for (i = 0; i < wds; i++) { - memset(buf, 0, 8192); - strcpy(buf, "sta_info"); - memcpy(buf + strlen(buf) + 1, p, 6); - if (bcom_ioctl(skfd, ifname, WLC_GET_VAR, buf, 8192) < 0) { - } else { - sta_info_t *sta = (sta_info_t *) (buf + 4); - if (!(sta->flags & 0x40)) { - } else { - if (sta->idle > 120) - restart_wds = 1; - } - } - p += 6; - } - if (restart_wds) - setup_bcom_wds(skfd, ifname); - } -} - -static void setup_bcom_vif_sec(int skfd, char *ifname, int vif) -{ - int val, wep, wsec, i; - char *v; - - wsec = bcom_get_wsec(vif); - if (wsec) - val = bcom_get_wauth(vif); - else - val = 0; - - bcom_set_bss_int(skfd, ifname, vif, "wpa_auth", val); - - if (val) { - if (WPA_AUTH_PSK | WPA2_AUTH_PSK) { - v = nvram_safe_get(wl_var("wpa_psk")); - if ((strlen(v) >= 8) && (strlen(v) < 63) && nvram_match(wl_var("mode"), "wet") && (vif == 0)) { - /* Enable in-driver WPA supplicant */ - wsec_pmk_t pmk; - - pmk.key_len = (unsigned short) strlen(v); - pmk.flags = WSEC_PASSPHRASE; - strcpy(pmk.key, v); - bcom_ioctl(skfd, ifname, WLC_SET_WSEC_PMK, &pmk, sizeof(pmk)); - bcom_set_int(skfd, ifname, "sup_wpa", 1); - } else { - bcom_set_int(skfd, ifname, "sup_wpa", 0); - } - } - bcom_set_bss_int(skfd, ifname, vif, "eap_restrict", 1); - bcom_set_bss_int(skfd, ifname, vif, "wsec", wsec); - bcom_set_bss_int(skfd, ifname, vif, "wsec_restrict", 1); - } else { - bcom_set_bss_int(skfd, ifname, vif, "eap_restrict", 0); - if (wep = nvram_enabled(vif_var(vif, "wep"))) { - wep = atoi(nvram_safe_get(vif_var(vif, "key"))); - if ((wep >= 1) && (wep <= 4)) { - for (i = 1; i < 4; i++) { - wl_wsec_key_t k; - char name[5] = "key0"; - unsigned char *kdata = k.data; - unsigned char *kstr; - - bzero(&k, sizeof(k)); - name[3] += i; - kstr = nvram_safe_get(vif_var(vif, name)); - k.len = strlen(kstr); - if ((k.len == 10) || (k.len == 26)) { - k.index = i - 1; -#ifdef DEBUG - fprintf(stderr, "Adding WEP key %d to VIF %d: ", i, vif); -#endif - k.len = 0; - while (*kstr != 0) { - strncpy(name, kstr, 2); - name[2] = 0; - *kdata = (unsigned char) strtoul(name, NULL, 16); -#ifdef DEBUG - fprintf(stderr, "%02x", *kdata); -#endif - kstr += 2; - kdata++; - k.len++; - } -#ifdef DEBUG - fprintf(stderr, "\n"); -#endif - } else { - k.len = 0; - } - if ((k.len > 0) && (i == wep)) - k.flags = WL_PRIMARY_KEY; - - bcom_set_bss_var(skfd, ifname, vif, "wsec_key", &k, sizeof(k)); - } - wep = 1; - bcom_set_bss_int(skfd, ifname, vif, "wsec", WEP_ENABLED); - bcom_set_bss_int(skfd, ifname, vif, "wsec_restrict", 1); - bcom_set_bss_int(skfd, ifname, vif, "auth", nvram_enabled(vif_var(vif, "auth"))); - } else { - wep = 0; - } - } - } - - if (!wep && !val) { - bcom_set_bss_int(skfd, ifname, vif, "wsec", 0); - bcom_set_bss_int(skfd, ifname, vif, "wsec_restrict", 0); - } - -// bcom_set_bss_int(skfd, ifname, vif, "auth", atoi(nvram_safe_get(vif_var(vif, "auth")))); -} - -static void setup_bcom_vif(int skfd, char *ifname, int vif) -{ - int val, wep, wsec, i; - char *s, *v; - wlc_ssid_t ssid; - - s = nvram_safe_get(vif_var(vif, "ssid")); - strncpy(ssid.SSID, s, sizeof(ssid.SSID)); - ssid.SSID_len = strlen(ssid.SSID); - ssid.SSID_len = ((ssid.SSID_len > sizeof(ssid.SSID)) ? sizeof(ssid.SSID) : ssid.SSID_len); - bcom_set_bss_var(skfd, ifname, vif, "ssid", &ssid, sizeof(ssid)); - - val = nvram_enabled(vif_var(vif, "closed")); - bcom_set_bss_int(skfd, ifname, vif, "closednet", val); - - val = nvram_enabled(wl_var("ap_isolate")); - bcom_set_bss_int(skfd, ifname, vif, "ap_isolate", val); - -} - -static void start_bcom_vif(int skfd, char *ifname, int vif) -{ - int cfg[2]; - int i; - - cfg[0] = vif; - cfg[1] = 1; - for (i = 0; i < ADD_VIF_RETRIES; i++) { - if (bcom_set_var(skfd, ifname, "bss" , cfg, sizeof(cfg)) == 0) - break; - usleep(1000 * 1000); - } -} - -static void setup_bcom_common(int skfd, char *ifname) -{ - int val = 0, ap; - char buf[8192], wbuf[80], *v; - - nvram_set(wl_var("ifname"), ifname); - - /* Set Country */ - strncpy(buf, nvram_safe_get(wl_var("country_code")), 4); - buf[3] = 0; - bcom_ioctl(skfd, ifname, WLC_SET_COUNTRY, buf, 4); - - if (v = nvram_get(wl_var("txpwr"))) { - val = atoi(v); - val = mw_to_qdbm(val); - bcom_set_int(skfd, ifname, "qtxpower", val); - } - - /* Set other options */ - val = nvram_enabled(wl_var("lazywds")); - bcom_ioctl(skfd, ifname, WLC_SET_LAZYWDS, &val, sizeof(val)); - - if (v = nvram_get(wl_var("dtim"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_DTIMPRD, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("bcn"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_BCNPRD, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("antdiv"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_ANTDIV, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("txant"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_TXANT, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("maxassoc"))) { - val = atoi(v); - bcom_set_int(skfd, ifname, "maxassoc", val); - } - - val = nvram_enabled(wl_var("frameburst")); - bcom_ioctl(skfd, ifname, WLC_SET_FAKEFRAG, &val, sizeof(val)); - - ap = !nvram_match(wl_var("mode"), "sta") && !nvram_match(wl_var("mode"), "wet"); - - if (ap) - val = setup_bcom_wds(skfd, ifname); - - if ((!ap || val) && is_new_bcom(skfd, ifname)) - start_watchdog(skfd, ifname); - - /* Set up afterburner, disabled it if WDS is enabled */ - if (val || nvram_enabled(wl_var("lazywds"))) { - val = ABO_OFF; - } else { - val = ABO_AUTO; - if (nvram_enabled(wl_var("afterburner"))) - val = ABO_ON; - if (nvram_disabled(wl_var("afterburner"))) - val = ABO_OFF; - } - - bcom_set_var(skfd, ifname, "afterburner_override", &val, sizeof(val)); - - /* Set up MAC list */ - if (nvram_match(wl_var("macmode"), "allow")) - val = WLC_MACMODE_ALLOW; - else if (nvram_match(wl_var("macmode"), "deny")) - val = WLC_MACMODE_DENY; - else - val = WLC_MACMODE_DISABLED; - - if ((val != WLC_MACMODE_DISABLED) && (v = nvram_get(wl_var("maclist")))) { - struct maclist *mac_list; - struct ether_addr *addr; - char *next; - - memset(buf, 0, 8192); - mac_list = (struct maclist *) buf; - addr = mac_list->ea; - - foreach(wbuf, v, next) { - if (ether_atoe(wbuf, addr->ether_addr_octet)) { - mac_list->count++; - addr++; - } - } - bcom_ioctl(skfd, ifname, WLC_SET_MACLIST, buf, sizeof(buf)); - } else { - val = WLC_MACMODE_DISABLED; - } - bcom_ioctl(skfd, ifname, WLC_SET_MACMODE, &val, sizeof(val)); - - /* Set up G mode */ - bcom_ioctl(skfd, ifname, WLC_GET_PHYTYPE, &val, sizeof(val)); - if (val == 2) { - int override = WLC_G_PROTECTION_OFF; - int control = WLC_G_PROTECTION_CTL_OFF; - - if (v = nvram_get(wl_var("gmode"))) - val = atoi(v); - else - val = 1; - - if (val > 5) - val = 1; - - bcom_ioctl(skfd, ifname, WLC_SET_GMODE, &val, sizeof(val)); - - if (nvram_match(wl_var("gmode_protection"), "auto")) { - override = WLC_G_PROTECTION_AUTO; - control = WLC_G_PROTECTION_CTL_OVERLAP; - } - if (nvram_enabled(wl_var("gmode_protection"))) { - override = WLC_G_PROTECTION_ON; - control = WLC_G_PROTECTION_CTL_OVERLAP; - } - bcom_ioctl(skfd, ifname, WLC_SET_GMODE_PROTECTION_CONTROL, &override, sizeof(control)); - bcom_ioctl(skfd, ifname, WLC_SET_GMODE_PROTECTION_OVERRIDE, &override, sizeof(override)); - - if (val = 0) { - if (nvram_match(wl_var("plcphdr"), "long")) - val = WLC_PLCP_AUTO; - else - val = WLC_PLCP_SHORT; - - bcom_ioctl(skfd, ifname, WLC_SET_PLCPHDR, &val, sizeof(val)); - } - } -} - -static void setup_bcom_new(int skfd, char *ifname) -{ - int val = 0, i; - int iface[16], ifaces = 1; - int ap, apsta, sta, wet; - char *v; - - if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) - return; - - /* Clear all VIFs */ - iface[0] = 0; - for (i = 0; i < 16; i++) { - int cfg[2]; /* index, enabled */ - - cfg[0] = i; - cfg[1] = 0; - - bcom_set_var(skfd, ifname, "bss", cfg, sizeof(cfg)); - - if ((i > 0) && nvram_enabled(vif_var(i, "enabled")) && (i == 0 || nvram_get(vif_var(i, "ssid")))) { - iface[ifaces] = i; - ifaces++; - } - } - - set_wext_mode(skfd, ifname); - - ap = nvram_match(wl_var("mode"), "ap") || nvram_match(wl_var("mode"), "apsta"); - apsta = nvram_match(wl_var("mode"), "apsta"); - sta = nvram_match(wl_var("mode"), "sta"); - - bcom_set_int(skfd, ifname, "apsta", apsta); - bcom_set_int(skfd, ifname, "mssid", (ifaces > 1)); - - for (i = 0; i < (sta ? 0 : ifaces); i++) { -#ifdef DEBUG - fprintf(stderr, "setup_bcom_vif(%d) start\n", iface[i]); -#endif - setup_bcom_vif(skfd, ifname, iface[i]); -#ifdef DEBUG - fprintf(stderr, "setup_bcom_vif(%d) end\n", iface[i]); -#endif - } - - - if ((val = atoi(nvram_safe_get(wl_var("rate")))) > 0) { - val /= 500000; - bcom_set_int(skfd, ifname, "bg_rate", val); - bcom_set_int(skfd, ifname, "a_rate", val); - } - if (v = nvram_get(wl_var("rts"))) { - val = atoi(v); - bcom_set_int(skfd, ifname, "rtsthresh", val); - } - if (v = nvram_get(wl_var("frag"))) { - val = atoi(v); - bcom_set_int(skfd, ifname, "fragthresh", val); - } - - val = (nvram_disabled(wl_var("radio")) ? (1 | (1 << 16)) : 0); - bcom_ioctl(skfd, ifname, WLC_SET_RADIO, &val, sizeof(val)); - - setup_bcom_common(skfd, ifname); - start_bcom(skfd, ifname); - - val = atoi(nvram_safe_get(wl_var("channel"))); - if (val > 0) - bcom_ioctl(skfd, ifname, WLC_SET_CHANNEL, &val, sizeof(val)); - - val = (ap ? 15 : 0); - bcom_ioctl(skfd, ifname, WLC_SET_CS_SCAN_TIMER, &val, sizeof(val)); - - for (i = 0; i < (sta ? 0 : ifaces); i++) { - setup_bcom_vif_sec(skfd, ifname, iface[i]); - } - - for (i = 0; i < (sta ? 0 : ifaces); i++) { - start_bcom_vif(skfd, ifname, iface[i]); - } -} - -static void setup_bcom_old(int skfd, char *ifname) -{ - int val = 0, i; - char buf[8192]; - char wbuf[80]; - char *v; - - if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) - return; - - setup_bcom_common(skfd, ifname); - - if ((val = atoi(nvram_safe_get(wl_var("rate")))) > 0) { - val *= 2; - bcom_ioctl(skfd, ifname, 13, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("frag"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_FRAG, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("rts"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_RTS, &val, sizeof(val)); - } - - val = nvram_enabled(wl_var("closed")); - bcom_ioctl(skfd, ifname, WLC_SET_CLOSED, &val, sizeof(val)); - - val = nvram_enabled(wl_var("ap_isolate")); - bcom_set_int(skfd, ifname, "ap_isolate", val); - - start_bcom(skfd, ifname); - set_wext_ssid(skfd, ifname); - - val = bcom_get_wauth(0); - bcom_ioctl(skfd, ifname, WLC_SET_WPA_AUTH, &val, sizeof(val)); - - if (val & (WPA_AUTH_PSK | WPA2_AUTH_PSK)) { - v = nvram_safe_get(wl_var("wpa_psk")); - if ((strlen(v) >= 8) && (strlen(v) < 63) && nvram_match(wl_var("mode"), "wet")) { - /* Enable in-driver WPA supplicant */ - wsec_pmk_t pmk; - - pmk.key_len = (unsigned short) strlen(v); - pmk.flags = WSEC_PASSPHRASE; - strcpy(pmk.key, v); - bcom_ioctl(skfd, ifname, WLC_SET_WSEC_PMK, &pmk, sizeof(pmk)); - bcom_set_int(skfd, ifname, "sup_wpa", 1); - } - } - if (val) { - val = 1; - bcom_ioctl(skfd, ifname, WLC_SET_EAP_RESTRICT, &val, sizeof(val)); - val = bcom_get_wsec(0); - bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val)); - } else { - val = 0; - bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val)); - bcom_ioctl(skfd, ifname, WLC_SET_EAP_RESTRICT, &val, sizeof(val)); - bcom_set_int(skfd, ifname, "sup_wpa", 0); - } - - if (v = nvram_get(wl_var("auth"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_AUTH, &val, sizeof(val)); - } -} - - -static void set_wext_ssid(int skfd, char *ifname) -{ - char *buffer; - char essid[IW_ESSID_MAX_SIZE + 1]; - struct iwreq wrq; - - buffer = nvram_get(wl_var("ssid")); - - if (!buffer || (strlen(buffer) > IW_ESSID_MAX_SIZE)) - buffer = "OpenWrt"; - - wrq.u.essid.flags = 1; - strcpy(essid, buffer); - wrq.u.essid.pointer = (caddr_t) essid; - wrq.u.essid.length = strlen(essid) + 1; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWESSID, &wrq, "Set ESSID"); -} - -static void setup_wext_wep(int skfd, char *ifname) -{ - int i, keylen; - struct iwreq wrq; - char keystr[5]; - char *keyval; - unsigned char key[IW_ENCODING_TOKEN_MAX]; - - memset(&wrq, 0, sizeof(wrq)); - strcpy(keystr, "key1"); - for (i = 1; i <= 4; i++) { - if (keyval = nvram_get(wl_var(keystr))) { - keylen = iw_in_key(keyval, key); - - if (keylen > 0) { - wrq.u.data.length = keylen; - wrq.u.data.pointer = (caddr_t) key; - wrq.u.data.flags = i; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWENCODE, &wrq, "Set Encode"); - } - } - keystr[3]++; - } - - memset(&wrq, 0, sizeof(wrq)); - i = atoi(nvram_safe_get(wl_var("key"))); - if (i > 0 && i < 4) { - wrq.u.data.flags = i | IW_ENCODE_RESTRICTED; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWENCODE, &wrq, "Set Encode"); - } -} - -static void setup_wext(int skfd, char *ifname) -{ - char *buffer; - struct iwreq wrq; - - /* Set channel */ - int channel = atoi(nvram_safe_get(wl_var("channel"))); - - wrq.u.freq.m = -1; - wrq.u.freq.e = 0; - wrq.u.freq.flags = 0; - - if (channel > 0) { - wrq.u.freq.flags = IW_FREQ_FIXED; - wrq.u.freq.m = channel; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWFREQ, &wrq, "Set Frequency"); - } - - /* Disable radio if wlX_radio is set and not enabled */ - wrq.u.txpower.disabled = nvram_disabled(wl_var("radio")); - - wrq.u.txpower.value = -1; - wrq.u.txpower.fixed = 1; - wrq.u.txpower.flags = IW_TXPOW_DBM; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWTXPOW, &wrq, "Set Tx Power"); - - /* Set up WEP */ - if (nvram_enabled(wl_var("wep")) && !wpa_enc) - setup_wext_wep(skfd, ifname); - - /* Set ESSID */ - set_wext_ssid(skfd, ifname); - -} - -static int setup_interfaces(int skfd, char *ifname, char *args[], int count) -{ - struct iwreq wrq; - int rc; - - /* Avoid "Unused parameter" warning */ - args = args; count = count; - - if(iw_get_ext(skfd, ifname, SIOCGIWNAME, &wrq) < 0) - return 0; - - if (strncmp(ifname, "ath", 3) == 0) { - set_wext_mode(skfd, ifname); - setup_wext(skfd, ifname); - } else { - if (is_new_bcom(skfd, ifname)) { -#ifdef DEBUG - fprintf(stderr, "New Broadcom driver detected.\n"); -#endif - stop_bcom(skfd, ifname); -#ifdef DEBUG - fprintf(stderr, "Setup start.\n"); -#endif - setup_bcom_new(skfd, ifname); -#ifdef DEBUG - fprintf(stderr, "Setup done.\n"); -#endif - } else { -#ifdef DEBUG - fprintf(stderr, "Old Broadcom driver detected.\n"); -#endif - stop_bcom(skfd, ifname); - set_wext_mode(skfd, ifname); - setup_bcom_old(skfd, ifname); - setup_wext(skfd, ifname); - } - } - - prefix[2]++; -} - -int main(int argc, char **argv) -{ - int skfd; - if((skfd = iw_sockets_open()) < 0) { - perror("socket"); - exit(-1); - } - - prefix = strdup("wl0"); - iw_enum_devices(skfd, &setup_interfaces, NULL, 0); - - return 0; -} From d937c0222385b9ef78d1120421d5aad4a006740a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 30 May 2006 20:24:57 +0000 Subject: [PATCH 095/757] remove stale libgcc menuconfig item SVN-Revision: 3851 --- openwrt/toolchain/gcc/Config.in | 6 ------ 1 file changed, 6 deletions(-) diff --git a/openwrt/toolchain/gcc/Config.in b/openwrt/toolchain/gcc/Config.in index 0835b5c8a13..506287a3f81 100644 --- a/openwrt/toolchain/gcc/Config.in +++ b/openwrt/toolchain/gcc/Config.in @@ -29,12 +29,6 @@ choice endchoice -config PACKAGE_LIBGCC - tristate - prompt "libgcc package" if TOOLCHAINOPTS - default y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0 - default m - config GCC_VERSION string prompt "GCC compiler Version" if (TOOLCHAINOPTS && NULL) From c664a4aef7f81ded19545c02cec1085b83b18ff1 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 31 May 2006 06:49:51 +0000 Subject: [PATCH 096/757] fix base-files packages build. SVN-Revision: 3852 --- openwrt/package/base-files/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 252fa7eba58..2637949699f 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -18,6 +18,10 @@ endif include $(TOPDIR)/package/rules.mk +#FIXME: use the version from ./toolchain/uclibc +UCLIBC_VERSION:=0.9.28 +LIBGCC_VERSION:=$(CONFIG_GCC_VERSION) + define Package/base-files SECTION:=base CATEGORY:=Base system @@ -26,7 +30,6 @@ define Package/base-files DESCRIPTION:=OpenWrt system scripts endef - define Package/libgcc SECTION:=libs CATEGORY:=Libraries @@ -53,8 +56,8 @@ endef define Package/base-files/install $(CP) ./default/* $(1) - $(SED) 's,$$R,r$(REV),g' $(1)/etc/banner - $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf + $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner + $(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf mkdir -p $(1)/dev mkdir -p $(1)/etc/crontabs mkdir -p $(1)/jffs @@ -79,14 +82,14 @@ endef define Package/uclibc/install mkdir -p $(1)/lib for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \ - $(CP) $(STAGING_DIR)/lib/$$file.so.* $(1)/lib/; \ - $(CP) $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(1)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$$$file.so.* $(1)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$$$file-$(UCLIBC_VERSION).so $(1)/lib/; \ done endef define Package/libgcc/install - mkdir -p $(IDIR_LIBGCC)/lib - $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_LIBGCC)/lib/ + mkdir -p $(1)/lib + $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/ endef $(eval $(call BuildPackage,base-files)) From fc7bbe2e1aa1e083e86603a8bd050c03320016ff Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 11:06:32 +0000 Subject: [PATCH 097/757] clean up .svn and CVS directories for every package SVN-Revision: 3853 --- openwrt/package/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index d436df8dcee..50f03effae5 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -154,6 +154,8 @@ define BuildPackage $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(call Package/$(1)/install,$$(IDIR_$(1))) mkdir -p $(PACKAGE_DIR) + find $$(IDIR_$(1)) -name CVS | xargs rm -rf + find $$(IDIR_$(1)) -name .svn | xargs rm -rf $(RSTRIP) $$(IDIR_$(1)) $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) From 87eac4e652d2d1a6ceb594908e56563fab352175 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 12:23:16 +0000 Subject: [PATCH 098/757] remove madwifi-old SVN-Revision: 3854 --- openwrt/target/linux/package/Makefile | 1 - .../linux/package/madwifi-old/Config.in | 9 -- .../target/linux/package/madwifi-old/Makefile | 103 ------------------ .../package/madwifi-old/files/madwifi.init | 2 - .../package/madwifi-old/files/madwifi.modules | 11 -- .../madwifi-old/ipkg/kmod-madwifi-old.control | 4 - .../patches/100-kernel_cflags.patch | 32 ------ 7 files changed, 162 deletions(-) delete mode 100644 openwrt/target/linux/package/madwifi-old/Config.in delete mode 100644 openwrt/target/linux/package/madwifi-old/Makefile delete mode 100644 openwrt/target/linux/package/madwifi-old/files/madwifi.init delete mode 100644 openwrt/target/linux/package/madwifi-old/files/madwifi.modules delete mode 100644 openwrt/target/linux/package/madwifi-old/ipkg/kmod-madwifi-old.control delete mode 100644 openwrt/target/linux/package/madwifi-old/patches/100-kernel_cflags.patch diff --git a/openwrt/target/linux/package/Makefile b/openwrt/target/linux/package/Makefile index f24c845d79d..138404ae260 100644 --- a/openwrt/target/linux/package/Makefile +++ b/openwrt/target/linux/package/Makefile @@ -7,7 +7,6 @@ package-$(CONFIG_PACKAGE_KMOD_ALSA) += alsa package-$(CONFIG_PACKAGE_KMOD_FUSE) += fuse package-$(CONFIG_PACKAGE_KMOD_HOSTAP) += hostap package-$(CONFIG_PACKAGE_KMOD_MADWIFI) += madwifi -package-$(CONFIG_PACKAGE_KMOD_MADWIFI_OLD) += madwifi-old package-$(CONFIG_PACKAGE_KMOD_MINI_FO) += mini_fo package-$(CONFIG_PACKAGE_KMOD_OPENSWAN) += openswan package-$(CONFIG_PACKAGE_KMOD_SHFS) += shfs diff --git a/openwrt/target/linux/package/madwifi-old/Config.in b/openwrt/target/linux/package/madwifi-old/Config.in deleted file mode 100644 index ec0385540dd..00000000000 --- a/openwrt/target/linux/package/madwifi-old/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config PACKAGE_KMOD_MADWIFI_OLD - prompt "kmod-madwifi-old.................. (old) Atheros Wifi driver" - tristate - default m if DEVEL - default n - help - Madwifi-old driver for Atheros wireless adapters - - http://www.madwifi.org/ diff --git a/openwrt/target/linux/package/madwifi-old/Makefile b/openwrt/target/linux/package/madwifi-old/Makefile deleted file mode 100644 index 7d369722aae..00000000000 --- a/openwrt/target/linux/package/madwifi-old/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# $Id: Makefile 3287 2006-02-28 20:09:56Z nbd $ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=madwifi-old -PKG_VERSION:=r1417-20060128 -PKG_RELEASE:=1 -PKG_MD5SUM:=95d457e0edfb7028e09dee60db7fa7b8 - -PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -ifeq ($(ARCH),mips) -HAL_TARGET:=mips-be-elf -endif -ifeq ($(ARCH),mipsel) -HAL_TARGET:=mips-le-elf -endif -ifeq ($(ARCH),i386) -HAL_TARGET:=i386-elf -endif - -BUS := PCI - -ifneq ($(CONFIG_LINUX_2_4_AR531X),) - BUS := AHB -endif -# ifneq ($(CONFIG_LINUX_2_6_ARUBA),) -# BUS := PCI AHB # no suitable HAL for AHB yet. -# endif - -BUS_MODULES:= -ifeq ($(findstring AHB,$(BUS)),AHB) -BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX) -endif -ifeq ($(findstring PCI,$(BUS)),PCI) -BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX) -endif - - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_MADWIFI_OLD,kmod-madwifi-old,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -MADWIFI_OLD_MAKEOPTS= -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - TARGET="$(HAL_TARGET)" \ - TOOLPREFIX="$(KERNEL_CROSS)" \ - TOOLPATH="$(KERNEL_CROSS)" \ - KERNELPATH="$(LINUX_DIR)" \ - DOMULTI=1 - - -$(PKG_BUILD_DIR)/.built: -ifeq ($(findstring AHB,$(BUS)),AHB) - $(MAKE) $(MADWIFI_OLD_MAKEOPTS) BUS="AHB" all -endif -ifeq ($(findstring PCI,$(BUS)),PCI) - $(MAKE) $(MADWIFI_OLD_MAKEOPTS) BUS="PCI" all -endif - $(MAKE) $(MADWIFI_OLD_MAKEOPTS) -C tools all - $(RSTRIP) $(PKG_BUILD_DIR)/tools/madwifi_multi - touch $@ - -$(IPKG_KMOD_MADWIFI_OLD): - install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/etc/modules.d - install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI_OLD)/etc/modules.d/20-madwifi - install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/etc/init.d - install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI_OLD)/etc/init.d/S20madwifi - install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ - $(BUS_MODULES) \ - $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_MADWIFI_OLD)/lib/modules/$(LINUX_VERSION)/ - install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/tools/{80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats} $(IDIR_KMOD_MADWIFI_OLD)/usr/sbin/ - $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI_OLD) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/include/madwifi-old/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/madwifi-old - $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi-old - mkdir -p $(STAGING_DIR)/usr/include/madwifi-old/net80211 - $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi-old/net80211/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/include/madwifi-old/net80211/ieee80211.h - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/madwifi-old - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/openwrt/target/linux/package/madwifi-old/files/madwifi.init b/openwrt/target/linux/package/madwifi-old/files/madwifi.init deleted file mode 100644 index b1e78c0930f..00000000000 --- a/openwrt/target/linux/package/madwifi-old/files/madwifi.init +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -iwpriv ath0 mode 3 diff --git a/openwrt/target/linux/package/madwifi-old/files/madwifi.modules b/openwrt/target/linux/package/madwifi-old/files/madwifi.modules deleted file mode 100644 index 996b8e7205e..00000000000 --- a/openwrt/target/linux/package/madwifi-old/files/madwifi.modules +++ /dev/null @@ -1,11 +0,0 @@ -wlan -ath_hal -ath_rate_sample -ath_pci -wlan_acl -wlan_ccmp -wlan_tkip -wlan_wep -wlan_xauth -wlan_scan_ap -wlan_scan_sta diff --git a/openwrt/target/linux/package/madwifi-old/ipkg/kmod-madwifi-old.control b/openwrt/target/linux/package/madwifi-old/ipkg/kmod-madwifi-old.control deleted file mode 100644 index f7e5b8719f7..00000000000 --- a/openwrt/target/linux/package/madwifi-old/ipkg/kmod-madwifi-old.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-madwifi-old -Priority: optional -Section: net -Description: Driver for Atheros 802.11a/b/g MiniPCI cards diff --git a/openwrt/target/linux/package/madwifi-old/patches/100-kernel_cflags.patch b/openwrt/target/linux/package/madwifi-old/patches/100-kernel_cflags.patch deleted file mode 100644 index 5525c3f5576..00000000000 --- a/openwrt/target/linux/package/madwifi-old/patches/100-kernel_cflags.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urN madwifi.old/Makefile madwifi.dev/Makefile ---- madwifi.old/Makefile 2005-07-13 02:35:11.000000000 +0200 -+++ madwifi.dev/Makefile 2005-08-13 22:39:26.973649096 +0200 -@@ -46,7 +46,7 @@ - # NB: the order is important here - DIRS= ${ATH_HAL} ${ATH_RATE} ${WLAN} ${ATH} - --all: configcheck -+all: - mkdir -p ${SYMBOLSDIR} - for i in ${DIRS}; do \ - $(MAKE) -C $$i || exit 1; \ -diff -urn madwifi.old/hal/public/mips-le-elf.inc madwifi.dev/hal/public/mips-le-elf.inc ---- madwifi.old/hal/public/mips-le-elf.inc 2005-08-13 22:36:45.646174000 +0200 -+++ madwifi.dev/hal/public/mips-le-elf.inc 2005-08-13 22:37:52.506010360 +0200 -@@ -63,5 +63,5 @@ - - LDOPTS= -EL - COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN --COPTS+= -G 0 -EL -mno-abicalls -fno-pic -mips2 -Wa,--trap \ -+COPTS+= -G 0 -EL -mno-abicalls -fno-pic -mips32 -Wa,--trap \ - -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -diff -urn madwifi.old/hal/public/mips-be-elf.inc madwifi.dev/hal/public/mips-be-elf.inc ---- madwifi.old/hal/public/mips-be-elf.inc 2005-08-13 22:36:45.646174000 +0200 -+++ madwifi.dev/hal/public/mips-be-elf.inc 2005-08-13 22:37:52.506010360 +0200 -@@ -66,5 +66,5 @@ - - LDOPTS= -EB - COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN --COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips2 -Wa,--trap \ -+COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips32 -Wa,--trap \ - -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls From 445b861749781b117ebf7e0f479bcdf88bd9cb98 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 12:33:06 +0000 Subject: [PATCH 099/757] allow building of kernel-specific stuff in package/ instead of target/linux/package/ and merge target/linux/package/base-files into package/base-files SVN-Revision: 3855 --- openwrt/Makefile | 9 +- openwrt/package/base-files/Makefile | 56 +- .../base-files}/ar7-2.4/etc/config/network | 0 .../base-files}/ar7-2.4/etc/init.d/S00adam2 | 0 .../base-files}/aruba-2.6/etc/config/network | 0 .../base-files}/aruba-2.6/etc/init.d/S00aruba | 0 .../base-files}/aruba-2.6/init | 0 .../base-files}/au1000-2.6/etc/config/network | 0 .../base-files}/au1000-2.6/sbin/mount_root | 0 .../brcm-2.4/etc/hotplug.d/net/09-net | 0 .../base-files}/brcm-2.4/etc/init.d/S04nvram | 0 .../brcm-2.4/etc/init.d/S05netconfig | 0 .../brcm-2.6/etc/hotplug.d/net/09-net | 0 .../brcm-2.6/etc/init.d/S05netconfig | 0 .../base-files}/sibyte-2.6/etc/config/network | 0 .../base-files}/sibyte-2.6/etc/inittab | 0 .../base-files}/sibyte-2.6/init | 0 .../package/base-files/src/adam2patcher.c | 0 .../package/base-files/src/jffs2root.c | 0 .../base-files}/x86-2.4/etc/config/network | 0 .../base-files}/x86-2.6/etc/config/network | 0 .../base-files}/xscale-2.6/etc/config/network | 0 .../xscale-2.6/etc/init.d/S00xscale | 0 .../base-files}/xscale-2.6/init | 0 openwrt/scripts/make-ipkg-dir.sh | 21 + openwrt/target/linux/kernel.mk | 9 +- openwrt/target/linux/package/Makefile | 1 - .../target/linux/package/base-files/Makefile | 66 - .../package/base-files/include/bcmnvram.h | 148 --- .../package/base-files/include/bcmutils.h | 157 --- .../package/base-files/include/cy_conf.h | 69 -- .../package/base-files/include/epivers.h | 69 -- .../package/base-files/include/proto/802.11.h | 852 ------------- .../base-files/include/proto/ethernet.h | 179 --- .../package/base-files/include/shutils.h | 200 --- .../package/base-files/include/typedefs.h | 293 ----- .../linux/package/base-files/include/utils.h | 131 -- .../package/base-files/include/wlcompat.h | 36 - .../package/base-files/include/wlioctl.h | 1097 ----------------- .../package/base-files/include/wlutils.h | 59 - .../base-files/ipkg/base-files-arch.control | 4 - 41 files changed, 76 insertions(+), 3380 deletions(-) rename openwrt/{target/linux/package/base-files/files => package/base-files}/ar7-2.4/etc/config/network (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/ar7-2.4/etc/init.d/S00adam2 (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/aruba-2.6/etc/config/network (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/aruba-2.6/etc/init.d/S00aruba (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/aruba-2.6/init (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/au1000-2.6/etc/config/network (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/au1000-2.6/sbin/mount_root (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/brcm-2.4/etc/hotplug.d/net/09-net (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/brcm-2.4/etc/init.d/S04nvram (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/brcm-2.4/etc/init.d/S05netconfig (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/brcm-2.6/etc/hotplug.d/net/09-net (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/brcm-2.6/etc/init.d/S05netconfig (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/sibyte-2.6/etc/config/network (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/sibyte-2.6/etc/inittab (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/sibyte-2.6/init (100%) rename openwrt/{target/linux => }/package/base-files/src/adam2patcher.c (100%) rename openwrt/{target/linux => }/package/base-files/src/jffs2root.c (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/x86-2.4/etc/config/network (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/x86-2.6/etc/config/network (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/xscale-2.6/etc/config/network (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/xscale-2.6/etc/init.d/S00xscale (100%) rename openwrt/{target/linux/package/base-files/files => package/base-files}/xscale-2.6/init (100%) create mode 100755 openwrt/scripts/make-ipkg-dir.sh delete mode 100644 openwrt/target/linux/package/base-files/Makefile delete mode 100644 openwrt/target/linux/package/base-files/include/bcmnvram.h delete mode 100644 openwrt/target/linux/package/base-files/include/bcmutils.h delete mode 100644 openwrt/target/linux/package/base-files/include/cy_conf.h delete mode 100644 openwrt/target/linux/package/base-files/include/epivers.h delete mode 100644 openwrt/target/linux/package/base-files/include/proto/802.11.h delete mode 100644 openwrt/target/linux/package/base-files/include/proto/ethernet.h delete mode 100644 openwrt/target/linux/package/base-files/include/shutils.h delete mode 100644 openwrt/target/linux/package/base-files/include/typedefs.h delete mode 100644 openwrt/target/linux/package/base-files/include/utils.h delete mode 100644 openwrt/target/linux/package/base-files/include/wlcompat.h delete mode 100644 openwrt/target/linux/package/base-files/include/wlioctl.h delete mode 100644 openwrt/target/linux/package/base-files/include/wlutils.h delete mode 100644 openwrt/target/linux/package/base-files/ipkg/base-files-arch.control diff --git a/openwrt/Makefile b/openwrt/Makefile index f93b008033f..b1bcf91a132 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -38,7 +38,7 @@ endif endif export OPENWRTVERSION -all: +all: world .pkginfo: FORCE ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) @@ -79,5 +79,12 @@ target/%: .pkginfo toolchain/%: $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) +world: + $(MAKE) toolchain/install + $(MAKE) target/compile + $(MAKE) package/compile + $(MAKE) package/install + $(MAKE) target/install + .PHONY: FORCE FORCE: diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 2637949699f..536857657f4 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -3,14 +3,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files -BOARD:=$(shell LANG=C grep ^CONFIG_LINUX_2_._ $(TOPDIR)/.config|sed -e "s/=y//" \ - -e "s/.*_//"| tr "[:upper:]" "[:lower:]") -KERNEL:=$(shell LANG=C grep ^CONFIG_LINUX_2_._ $(TOPDIR)/.config|sed -e "s/=y//" \ - -e "s/CONFIG_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") - REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) REV:=0 @@ -18,16 +13,23 @@ endif include $(TOPDIR)/package/rules.mk -#FIXME: use the version from ./toolchain/uclibc -UCLIBC_VERSION:=0.9.28 -LIBGCC_VERSION:=$(CONFIG_GCC_VERSION) +ifneq ($(DUMP),1) +include $(BUILD_DIR)/kernel.mk +include $(TOPDIR)/target/linux/rules.mk +TARGET:=-$(BOARD)-$(KERNEL) -define Package/base-files +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +endif + +CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files + +define Package/base-files$(TARGET) SECTION:=base CATEGORY:=Base system DEFAULT:=y TITLE:=OpenWrt system scripts - DESCRIPTION:=OpenWrt system scripts + DESCRIPTION:=Base filesystem for OpenWrt endef define Package/libgcc @@ -40,7 +42,7 @@ define Package/libgcc endef define Package/uclibc - $(call Package/base-files) + $(call Package/base-files$(TARGET)) VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=C library DESCRIPTION:=C library for embedded systems @@ -51,11 +53,35 @@ define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef -define Build/Compile + +define Build/Compile/ar7 + $(TARGET_CC) -o $(PKG_BUILD_DIR)/adam2patcher src/adam2patcher.c endef -define Package/base-files/install +define Build/Compile/brcm + $(TARGET_CC) -o $(PKG_BUILD_DIR)/jffs2root src/jffs2root.c +endef + +define Build/Compile +$(call Build/Compile/$(BOARD)) +endef + + +define Package/base-files$(TARGET)/install-ar7 + mkdir -p $(1)/sbin + $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin +endef +define Package/base-files$(TARGET)/install-brcm + mkdir -p $(1)/sbin + $(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin +endef + +define Package/base-files$(TARGET)/install +$(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) $(CP) ./default/* $(1) + if [ -d $(BOARD)-$(KERNEL) ]; then \ + $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \ + fi $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner $(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf mkdir -p $(1)/dev @@ -92,6 +118,6 @@ define Package/libgcc/install $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/ endef -$(eval $(call BuildPackage,base-files)) +$(eval $(call BuildPackage,base-files$(TARGET))) $(eval $(call BuildPackage,libgcc)) $(eval $(call BuildPackage,uclibc)) diff --git a/openwrt/target/linux/package/base-files/files/ar7-2.4/etc/config/network b/openwrt/package/base-files/ar7-2.4/etc/config/network similarity index 100% rename from openwrt/target/linux/package/base-files/files/ar7-2.4/etc/config/network rename to openwrt/package/base-files/ar7-2.4/etc/config/network diff --git a/openwrt/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2 b/openwrt/package/base-files/ar7-2.4/etc/init.d/S00adam2 similarity index 100% rename from openwrt/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2 rename to openwrt/package/base-files/ar7-2.4/etc/init.d/S00adam2 diff --git a/openwrt/target/linux/package/base-files/files/aruba-2.6/etc/config/network b/openwrt/package/base-files/aruba-2.6/etc/config/network similarity index 100% rename from openwrt/target/linux/package/base-files/files/aruba-2.6/etc/config/network rename to openwrt/package/base-files/aruba-2.6/etc/config/network diff --git a/openwrt/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba b/openwrt/package/base-files/aruba-2.6/etc/init.d/S00aruba similarity index 100% rename from openwrt/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba rename to openwrt/package/base-files/aruba-2.6/etc/init.d/S00aruba diff --git a/openwrt/target/linux/package/base-files/files/aruba-2.6/init b/openwrt/package/base-files/aruba-2.6/init similarity index 100% rename from openwrt/target/linux/package/base-files/files/aruba-2.6/init rename to openwrt/package/base-files/aruba-2.6/init diff --git a/openwrt/target/linux/package/base-files/files/au1000-2.6/etc/config/network b/openwrt/package/base-files/au1000-2.6/etc/config/network similarity index 100% rename from openwrt/target/linux/package/base-files/files/au1000-2.6/etc/config/network rename to openwrt/package/base-files/au1000-2.6/etc/config/network diff --git a/openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root b/openwrt/package/base-files/au1000-2.6/sbin/mount_root similarity index 100% rename from openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root rename to openwrt/package/base-files/au1000-2.6/sbin/mount_root diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net b/openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net similarity index 100% rename from openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net rename to openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram b/openwrt/package/base-files/brcm-2.4/etc/init.d/S04nvram similarity index 100% rename from openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram rename to openwrt/package/base-files/brcm-2.4/etc/init.d/S04nvram diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig similarity index 100% rename from openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig rename to openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net b/openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net similarity index 100% rename from openwrt/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net rename to openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig similarity index 100% rename from openwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig rename to openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network b/openwrt/package/base-files/sibyte-2.6/etc/config/network similarity index 100% rename from openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network rename to openwrt/package/base-files/sibyte-2.6/etc/config/network diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab b/openwrt/package/base-files/sibyte-2.6/etc/inittab similarity index 100% rename from openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab rename to openwrt/package/base-files/sibyte-2.6/etc/inittab diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/init b/openwrt/package/base-files/sibyte-2.6/init similarity index 100% rename from openwrt/target/linux/package/base-files/files/sibyte-2.6/init rename to openwrt/package/base-files/sibyte-2.6/init diff --git a/openwrt/target/linux/package/base-files/src/adam2patcher.c b/openwrt/package/base-files/src/adam2patcher.c similarity index 100% rename from openwrt/target/linux/package/base-files/src/adam2patcher.c rename to openwrt/package/base-files/src/adam2patcher.c diff --git a/openwrt/target/linux/package/base-files/src/jffs2root.c b/openwrt/package/base-files/src/jffs2root.c similarity index 100% rename from openwrt/target/linux/package/base-files/src/jffs2root.c rename to openwrt/package/base-files/src/jffs2root.c diff --git a/openwrt/target/linux/package/base-files/files/x86-2.4/etc/config/network b/openwrt/package/base-files/x86-2.4/etc/config/network similarity index 100% rename from openwrt/target/linux/package/base-files/files/x86-2.4/etc/config/network rename to openwrt/package/base-files/x86-2.4/etc/config/network diff --git a/openwrt/target/linux/package/base-files/files/x86-2.6/etc/config/network b/openwrt/package/base-files/x86-2.6/etc/config/network similarity index 100% rename from openwrt/target/linux/package/base-files/files/x86-2.6/etc/config/network rename to openwrt/package/base-files/x86-2.6/etc/config/network diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network b/openwrt/package/base-files/xscale-2.6/etc/config/network similarity index 100% rename from openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network rename to openwrt/package/base-files/xscale-2.6/etc/config/network diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale b/openwrt/package/base-files/xscale-2.6/etc/init.d/S00xscale similarity index 100% rename from openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale rename to openwrt/package/base-files/xscale-2.6/etc/init.d/S00xscale diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/init b/openwrt/package/base-files/xscale-2.6/init similarity index 100% rename from openwrt/target/linux/package/base-files/files/xscale-2.6/init rename to openwrt/package/base-files/xscale-2.6/init diff --git a/openwrt/scripts/make-ipkg-dir.sh b/openwrt/scripts/make-ipkg-dir.sh new file mode 100755 index 00000000000..236cb6feb4b --- /dev/null +++ b/openwrt/scripts/make-ipkg-dir.sh @@ -0,0 +1,21 @@ +#!/bin/bash +BASE=http://svn.openwrt.org/openwrt/trunk/openwrt +TARGET=$1 +CONTROL=$2 +VERSION=$3 +ARCH=$4 + +WD=$(pwd) + +mkdir -p "$TARGET/CONTROL" +grep '^[^(Version|Architecture)]' "$CONTROL" > "$TARGET/CONTROL/control" +grep '^Maintainer' "$CONTROL" 2>&1 >/dev/null || \ + echo "Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>" >> "$TARGET/CONTROL/control" +grep '^Source' "$CONTROL" 2>&1 >/dev/null || { + pkgbase=$(echo "$WD" | sed -e "s|^$TOPDIR/||g") + [ "$pkgbase" = "$WD" ] && src="N/A" || src="$BASE/$pkgbase" + echo "Source: $src" >> "$TARGET/CONTROL/control" +} +echo "Version: $VERSION" >> "$TARGET/CONTROL/control" +echo "Architecture: $ARCH" >> "$TARGET/CONTROL/control" +chmod 644 "$TARGET/CONTROL/control" diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index f8f4700525b..371ea3366d4 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -18,8 +18,6 @@ $(DL_DIR)/$(LINUX_SOURCE): $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) -mkdir -p $(LINUX_BUILD_DIR) bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) - - rm -f $(BUILD_DIR)/linux - ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux touch $@ ifeq ($(KERNEL),2.4) @@ -83,8 +81,13 @@ $(KERNEL_IPKG): fi $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) +$(BUILD_DIR)/kernel.mk: FORCE + echo "BOARD:=$(BOARD)" > $@ + echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ + echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ + source: $(DL_DIR)/$(LINUX_SOURCE) -prepare: +prepare: $(BUILD_DIR)/kernel.mk @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) @$(MAKE) $(LINUX_DIR)/.configured diff --git a/openwrt/target/linux/package/Makefile b/openwrt/target/linux/package/Makefile index 138404ae260..ecaae0a41aa 100644 --- a/openwrt/target/linux/package/Makefile +++ b/openwrt/target/linux/package/Makefile @@ -2,7 +2,6 @@ include $(TOPDIR)/rules.mk include ../rules.mk -package-y += base-files package-$(CONFIG_PACKAGE_KMOD_ALSA) += alsa package-$(CONFIG_PACKAGE_KMOD_FUSE) += fuse package-$(CONFIG_PACKAGE_KMOD_HOSTAP) += hostap diff --git a/openwrt/target/linux/package/base-files/Makefile b/openwrt/target/linux/package/base-files/Makefile deleted file mode 100644 index cf72eabdacb..00000000000 --- a/openwrt/target/linux/package/base-files/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME := base-files-arch -PKG_RELEASE := 2 -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -IDIR_OPENWRT:=$(PKG_BUILD_DIR)/ipkg -IPKG_OPENWRT:=$(PACKAGE_DIR)/base-files-$(BOARD)-$(KERNEL)_$(PKG_RELEASE)_$(ARCH).ipk - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -ifeq ($(BOARD),ar7) -$(PKG_BUILD_DIR)/adam2patcher: src/adam2patcher.c - $(TARGET_CC) -o $@ $< - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/adam2patcher - -$(IDIR_OPENWRT)/sbin/adam2patcher: $(PKG_BUILD_DIR)/adam2patcher - mkdir -p $(IDIR_OPENWRT)/sbin - $(CP) $(PKG_BUILD_DIR)/adam2patcher $(IDIR_OPENWRT)/sbin - -$(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/adam2patcher -endif - -ifeq ($(BOARD),brcm) -$(PKG_BUILD_DIR)/jffs2root: src/jffs2root.c - $(TARGET_CC) -o $@ $< - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/jffs2root - -$(IDIR_OPENWRT)/sbin/jffs2root: $(PKG_BUILD_DIR)/jffs2root - mkdir -p $(IDIR_OPENWRT)/sbin - $(CP) $(PKG_BUILD_DIR)/jffs2root $(IDIR_OPENWRT)/sbin - -$(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/jffs2root -endif - -$(PKG_BUILD_DIR)/.built: - touch $@ - -$(IDIR_OPENWRT): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_OPENWRT) ipkg/base-files-arch.control $(PKG_RELEASE) $(ARCH) - $(SED) s,base-files-arch,base-files-$(BOARD)-$(KERNEL),g $(IDIR_OPENWRT)/CONTROL/control - -$(IPKG_OPENWRT): $(IDIR_OPENWRT) - [ -d files/$(BOARD)-$(KERNEL) ] && $(CP) -fpR files/$(BOARD)-$(KERNEL)/* $(IDIR_OPENWRT)/ - find $(IDIR_OPENWRT) -name CVS | xargs rm -rf - find $(IDIR_OPENWRT) -name .svn | xargs rm -rf - $(RSTRIP) $(IDIR_OPENWRT) - $(IPKG_BUILD) $(IDIR_OPENWRT) $(PACKAGE_DIR) - -install-targets: compile openwrt-install - -openwrt-install: - $(IPKG) install $(IPKG_OPENWRT) - -compile-targets: install-dev $(IPKG_OPENWRT) -install-dev: - mkdir -p $(STAGING_DIR)/usr/include - $(CP) ./include/[a-z]* $(STAGING_DIR)/usr/include/ diff --git a/openwrt/target/linux/package/base-files/include/bcmnvram.h b/openwrt/target/linux/package/base-files/include/bcmnvram.h deleted file mode 100644 index 3c452634e81..00000000000 --- a/openwrt/target/linux/package/base-files/include/bcmnvram.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * NVRAM variable manipulation - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _bcmnvram_h_ -#define _bcmnvram_h_ - -#ifndef _LANGUAGE_ASSEMBLY - -#include <typedefs.h> - -struct nvram_header { - uint32 magic; - uint32 len; - uint32 crc_ver_init; /* 0:7 crc, 8:15 ver, 16:27 init, mem. test 28, 29-31 reserved */ - uint32 config_refresh; /* 0:15 config, 16:31 refresh */ - uint32 config_ncdl; /* ncdl values for memc */ -}; - -struct nvram_tuple { - char *name; - char *value; - struct nvram_tuple *next; -}; - -/* - * Initialize NVRAM access. May be unnecessary or undefined on certain - * platforms. - */ -extern int nvram_init(void *sbh); - -/* - * Disable NVRAM access. May be unnecessary or undefined on certain - * platforms. - */ -extern void nvram_exit(void); - -/* - * Get the value of an NVRAM variable. The pointer returned may be - * invalid after a set. - * @param name name of variable to get - * @return value of variable or NULL if undefined - */ -extern char * nvram_get(const char *name); - -/* - * Get the value of an NVRAM variable. - * @param name name of variable to get - * @return value of variable or NUL if undefined - */ -#define nvram_safe_get(name) (nvram_get(name) ? : "") - -#define nvram_safe_unset(name) ({ \ - if(nvram_get(name)) \ - nvram_unset(name); \ -}) - -#define nvram_safe_set(name, value) ({ \ - if(!nvram_get(name) || strcmp(nvram_get(name), value)) \ - nvram_set(name, value); \ -}) - -/* - * Match an NVRAM variable. - * @param name name of variable to match - * @param match value to compare against value of variable - * @return TRUE if variable is defined and its value is string equal - * to match or FALSE otherwise - */ -static INLINE int -nvram_match(char *name, char *match) { - const char *value = nvram_get(name); - return (value && !strcmp(value, match)); -} - -/* - * Inversely match an NVRAM variable. - * @param name name of variable to match - * @param match value to compare against value of variable - * @return TRUE if variable is defined and its value is not string - * equal to invmatch or FALSE otherwise - */ -static INLINE int -nvram_invmatch(char *name, char *invmatch) { - const char *value = nvram_get(name); - return (value && strcmp(value, invmatch)); -} - -/* - * Set the value of an NVRAM variable. The name and value strings are - * copied into private storage. Pointers to previously set values - * may become invalid. The new value may be immediately - * retrieved but will not be permanently stored until a commit. - * @param name name of variable to set - * @param value value of variable - * @return 0 on success and errno on failure - */ -extern int nvram_set(const char *name, const char *value); - -/* - * Unset an NVRAM variable. Pointers to previously set values - * remain valid until a set. - * @param name name of variable to unset - * @return 0 on success and errno on failure - * NOTE: use nvram_commit to commit this change to flash. - */ -extern int nvram_unset(const char *name); - -/* - * Commit NVRAM variables to permanent storage. All pointers to values - * may be invalid after a commit. - * NVRAM values are undefined after a commit. - * @return 0 on success and errno on failure - */ -extern int nvram_commit(void); - -/* - * Get all NVRAM variables (format name=value\0 ... \0\0). - * @param buf buffer to store variables - * @param count size of buffer in bytes - * @return 0 on success and errno on failure - */ -extern int nvram_getall(char *buf, int count); - -extern int file2nvram(char *filename, char *varname); -extern int nvram2file(char *varname, char *filename); - -#endif /* _LANGUAGE_ASSEMBLY */ - -#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */ -#define NVRAM_VERSION 1 -#define NVRAM_HEADER_SIZE 20 -#define NVRAM_SPACE 0x8000 -#define FLASH_BASE 0xbfc00000 /* Extif core */ -#define FLASH_MIN 0x00100000 /* Minimum flash size */ -#define FLASH_MAX 0x00400000 /* Maximum flash size with extif */ - -#endif /* _bcmnvram_h_ */ diff --git a/openwrt/target/linux/package/base-files/include/bcmutils.h b/openwrt/target/linux/package/base-files/include/bcmutils.h deleted file mode 100644 index 05ad41d9d80..00000000000 --- a/openwrt/target/linux/package/base-files/include/bcmutils.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Misc useful os-independent macros and functions. - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * $Id$ - */ - -#ifndef _bcmutils_h_ -#define _bcmutils_h_ - -#ifndef MIN -#define MIN(a, b) (((a)<(b))?(a):(b)) -#endif - -#ifndef MAX -#define MAX(a, b) (((a)>(b))?(a):(b)) -#endif - -#define CEIL(x, y) (((x) + ((y)-1)) / (y)) -#define ROUNDUP(x, y) ((((ulong)(x)+((y)-1))/(y))*(y)) -#define ISALIGNED(a, x) (((uint)(a) & ((x)-1)) == 0) -#define ISPOWEROF2(x) ((((x)-1)&(x))==0) -#define OFFSETOF(type, member) ((uint) &((type *)0)->member) -#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) - -/* bit map related macros */ -#ifndef setbit -#define NBBY 8 /* 8 bits per byte */ -#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) -#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) -#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) -#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) -#endif - -#define NBITS(type) (sizeof (type) * 8) - -#define _BCM_U 0x01 /* upper */ -#define _BCM_L 0x02 /* lower */ -#define _BCM_D 0x04 /* digit */ -#define _BCM_C 0x08 /* cntrl */ -#define _BCM_P 0x10 /* punct */ -#define _BCM_S 0x20 /* white space (space/lf/tab) */ -#define _BCM_X 0x40 /* hex digit */ -#define _BCM_SP 0x80 /* hard space (0x20) */ - -extern unsigned char bcm_ctype[]; -#define bcm_ismask(x) (bcm_ctype[(int)(unsigned char)(x)]) - -#define bcm_isalnum(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L|_BCM_D)) != 0) -#define bcm_isalpha(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L)) != 0) -#define bcm_iscntrl(c) ((bcm_ismask(c)&(_BCM_C)) != 0) -#define bcm_isdigit(c) ((bcm_ismask(c)&(_BCM_D)) != 0) -#define bcm_isgraph(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D)) != 0) -#define bcm_islower(c) ((bcm_ismask(c)&(_BCM_L)) != 0) -#define bcm_isprint(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D|_BCM_SP)) != 0) -#define bcm_ispunct(c) ((bcm_ismask(c)&(_BCM_P)) != 0) -#define bcm_isspace(c) ((bcm_ismask(c)&(_BCM_S)) != 0) -#define bcm_isupper(c) ((bcm_ismask(c)&(_BCM_U)) != 0) -#define bcm_isxdigit(c) ((bcm_ismask(c)&(_BCM_D|_BCM_X)) != 0) - -/* - * Spin at most 'us' microseconds while 'exp' is true. - * Caller should explicitly test 'exp' when this completes - * and take appropriate error action if 'exp' is still true. - */ -#define SPINWAIT(exp, us) { \ - uint countdown = (us) + 9; \ - while ((exp) && (countdown >= 10)) {\ - OSL_DELAY(10); \ - countdown -= 10; \ - } \ -} - -/* generic osl packet queue */ -struct pktq { - void *head; /* first packet to dequeue */ - void *tail; /* last packet to dequeue */ - uint len; /* number of queued packets */ - uint maxlen; /* maximum number of queued packets */ - bool priority; /* enqueue by packet priority */ -}; -#define DEFAULT_QLEN 128 - -#define pktq_len(q) ((q)->len) -#define pktq_avail(q) ((q)->maxlen - (q)->len) -#define pktq_head(q) ((q)->head) -#define pktq_full(q) ((q)->len >= (q)->maxlen) - -/* crc defines */ -#define CRC8_INIT_VALUE 0xff /* Initial CRC8 checksum value */ -#define CRC8_GOOD_VALUE 0x9f /* Good final CRC8 checksum value */ -#define CRC16_INIT_VALUE 0xffff /* Initial CRC16 checksum value */ -#define CRC16_GOOD_VALUE 0xf0b8 /* Good final CRC16 checksum value */ -#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ -#define CRC32_GOOD_VALUE 0xdebb20e3 /* Good final CRC32 checksum value */ - -/* tag_ID/length/value_buffer tuple */ -typedef struct bcm_tlv { - uint8 id; - uint8 len; - uint8 data[1]; -} bcm_tlv_t; - -/* Check that bcm_tlv_t fits into the given buflen */ -#define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (buflen) >= 2 + (elt)->len) - -/* buffer length for ethernet address from bcm_ether_ntoa() */ -#define ETHER_ADDR_STR_LEN 18 - -/* -* load 32-bit value from unaligned byte array -*/ -#ifdef IL_BIGENDIAN -#define load32_ua(a) ((((uint8 *)(a))[0] << 24) + (((uint8 *)(a))[1] << 16) + \ - (((uint8 *)(a))[2] << 8) + ((uint8 *)(a))[3]) -#else -#define load32_ua(a) ((((uint8 *)(a))[3] << 24) + (((uint8 *)(a))[2] << 16) + \ - (((uint8 *)(a))[1] << 8) + ((uint8 *)(a))[0]) -#endif - -/* externs */ -extern uint bcm_atoi(char *s); -extern uchar bcm_toupper(uchar c); -extern ulong bcm_strtoul(char *cp, char **endp, uint base); -extern void deadbeef(char *p, uint len); -extern void prhex(char *msg, uchar *buf, uint len); -extern void prpkt(char *msg, void *drv, void *p0); -extern uint pktcopy(void *drv, void *p, uint offset, int len, uchar *buf); -extern uint pkttotlen(void *drv, void *); -extern uchar *bcm_ether_ntoa(char *ea, char *buf); -extern int bcm_ether_atoe(char *p, char *ea); -extern void bcm_mdelay(uint ms); -extern char *getvar(char *vars, char *name); -extern int getintvar(char *vars, char *name); -extern char *bcmstrstr(char *haystack, char *needle); - -extern uint8 crc8(uint8 *p, uint nbytes, uint8 crc); -extern uint16 crc16(uint8 *p, uint nbytes, uint16 crc); -extern uint32 crc32(uint8 *p, uint nbytes, uint32 crc); -extern bcm_tlv_t *bcm_next_tlv(bcm_tlv_t *elt, int *buflen); -extern bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen, uint key); -extern bcm_tlv_t *bcm_parse_ordered_tlvs(void *buf, int buflen, uint key); -extern void pktq_init(struct pktq *q, uint maxlen, bool priority); -extern bool pktenq(struct pktq *q, void *p, bool lifo); -extern void *pktdeq(struct pktq *q); - -#define bcmlog(fmt, a1, a2) -#define bcmdumplog(buf, size) *buf = '\0' -#define bcmdumplogent(buf, idx) -1 - -#endif /* _bcmutils_h_ */ diff --git a/openwrt/target/linux/package/base-files/include/cy_conf.h b/openwrt/target/linux/package/base-files/include/cy_conf.h deleted file mode 100644 index dbe387b83bc..00000000000 --- a/openwrt/target/linux/package/base-files/include/cy_conf.h +++ /dev/null @@ -1,69 +0,0 @@ - -#define DNSMASQ_SUPPORT 1 -#define CONFIG_DNSMASQ y -#define UDHCPD_SUPPORT 1 -#define CONFIG_UDHCPD y -#define UDHCPC_SUPPORT 1 -#define CONFIG_UDHCPC y -#define PPPOE_SUPPORT 1 -#define CONFIG_PPPOE y -#define PPTP_SUPPORT 1 -#define CONFIG_PPTP y -#define L2TP_SUPPORT 1 -#define CONFIG_L2TP y -#define PPPD_SUPPORT 1 -#define CONFIG_PPPD y -#define ZEBRA_SUPPORT 1 -#define CONFIG_ZEBRA y -#define TFTPD_SUPPORT 1 -#define CONFIG_TFTPD y -#define DDNS_SUPPORT 1 -#define CONFIG_DDNS y -#define CRON_SUPPORT 1 -#define CONFIG_CRON y -#define HTTPD_SUPPORT 1 -#define CONFIG_HTTPD y -#define GET_POST_SUPPORT 1 -#define CONFIG_GET_POST y - -#if 1 -#define HEARTBEAT_SUPPORT 1 -#define CONFIG_HEARTBEAT y -#define MULTICAST_SUPPORT 1 -#define CONFIG_MULTICAST y -#define SETUP_WIZARD_SUPPORT 1 -#define CONFIG_SETUP_WIZARD y -#define PARENTAL_CONTROL_SUPPORT 1 -#define CONFIG_PARENTAL_CONTROL y -#define HTTPS_SUPPORT 1 -#define CONFIG_HTTPS y -#define EOU_SUPPORT 1 -#define CONFIG_EOU y -#define EZC_SUPPORT 1 -#define CONFIG_EZC y -#define WRITE_MAC_SUPPORT 1 -#define CONFIG_WRITE_MAC y -#define DIAG_SUPPORT 1 -#define CONFIG_DIAG y -#endif - -#define SPEED_BOOSTER_SUPPORT 1 -#define CONFIG_SPEED_BOOSTER y -#define XBOX_SUPPORT 1 -#define CONFIG_XBOX y - -#if 0 -#define MPPPOE_SUPPORT 1 -#define CONFIG_MPPPOE y -#define UNNUMBERIP_SUPPORT 1 -#define CONFIG_UNNUMBERIP y -#endif - -#define WL_STA_SUPPORT 1 -#define CONFIG_WL_STA y -#define BACKUP_RESTORE_SUPPORT 1 -#define CONFIG_BACKUP_RESTORE y -#define PORT_TRIGGER_SUPPORT 1 -#define CONFIG_PORT_TRIGGER y -#define HW_QOS_SUPPORT 1 -#define CONFIG_HW_QOS y diff --git a/openwrt/target/linux/package/base-files/include/epivers.h b/openwrt/target/linux/package/base-files/include/epivers.h deleted file mode 100644 index e174fb50d83..00000000000 --- a/openwrt/target/linux/package/base-files/include/epivers.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - * -*/ - -#ifndef _epivers_h_ -#define _epivers_h_ - -#ifdef linux -#include <linux/config.h> -#endif - -/* Vendor Name, ASCII, 32 chars max */ -#ifdef COMPANYNAME -#define HPNA_VENDOR COMPANYNAME -#else -#define HPNA_VENDOR "Broadcom Corporation" -#endif - -/* Driver Date, ASCII, 32 chars max */ -#define HPNA_DRV_BUILD_DATE __DATE__ - -/* Hardware Manufacture Date, ASCII, 32 chars max */ -#define HPNA_HW_MFG_DATE "Not Specified" - -/* See documentation for Device Type values, 32 values max */ -#ifndef HPNA_DEV_TYPE - -#if defined(CONFIG_BRCM_VJ) -#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_DISPLAY } - -#elif defined(CONFIG_BCRM_93725) -#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_CM_BRIDGE, CDCF_V0_DEVICE_DISPLAY } - -#else -#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_PCINIC } - -#endif - -#endif /* !HPNA_DEV_TYPE */ - - -#define EPI_MAJOR_VERSION 3 - -#define EPI_MINOR_VERSION 60 - -#define EPI_RC_NUMBER 13 - -#define EPI_INCREMENTAL_NUMBER 0 - -#define EPI_BUILD_NUMBER 0 - -#define EPI_VERSION 3,60,13,0 - -#define EPI_VERSION_NUM 0x033c0d00 - -/* Driver Version String, ASCII, 32 chars max */ -#define EPI_VERSION_STR "3.60.13.0" -#define EPI_ROUTER_VERSION_STR "3.61.13.0" - -#endif /* _epivers_h_ */ diff --git a/openwrt/target/linux/package/base-files/include/proto/802.11.h b/openwrt/target/linux/package/base-files/include/proto/802.11.h deleted file mode 100644 index ea57850ce56..00000000000 --- a/openwrt/target/linux/package/base-files/include/proto/802.11.h +++ /dev/null @@ -1,852 +0,0 @@ -/* - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * Fundamental types and constants relating to 802.11 - * - * $Id$ - */ - -#ifndef _802_11_H_ -#define _802_11_H_ - -#ifndef _TYPEDEFS_H_ -#include <typedefs.h> -#endif - -#ifndef _NET_ETHERNET_H_ -#include <proto/ethernet.h> -#endif - -/* enable structure packing */ -#if !defined(__GNUC__) -#pragma pack(1) -#endif - -/* some platforms require stronger medicine */ -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#define PACKED -#endif - - -#define DOT11_TU_TO_US 1024 /* 802.11 Time Unit is 1024 microseconds */ - -/* Generic 802.11 frame constants */ -#define DOT11_A3_HDR_LEN 24 -#define DOT11_A4_HDR_LEN 30 -#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN -#define DOT11_FCS_LEN 4 -#define DOT11_ICV_LEN 4 -#define DOT11_ICV_AES_LEN 8 -#define DOT11_QOS_LEN 2 - -#define DOT11_KEY_INDEX_SHIFT 6 -#define DOT11_IV_LEN 4 -#define DOT11_IV_TKIP_LEN 8 -#define DOT11_IV_AES_OCB_LEN 4 -#define DOT11_IV_AES_CCM_LEN 8 - -/* Includes MIC */ -#define DOT11_MAX_MPDU_BODY_LEN 2304 -/* A4 header + QoS + CCMP + PDU + ICV + FCS = 2352 */ -#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \ - DOT11_QOS_LEN + \ - DOT11_IV_AES_CCM_LEN + \ - DOT11_MAX_MPDU_BODY_LEN + \ - DOT11_ICV_LEN + \ - DOT11_FCS_LEN) - -#define DOT11_MAX_SSID_LEN 32 - -/* dot11RTSThreshold */ -#define DOT11_DEFAULT_RTS_LEN 2347 -#define DOT11_MAX_RTS_LEN 2347 - -/* dot11FragmentationThreshold */ -#define DOT11_MIN_FRAG_LEN 256 -#define DOT11_MAX_FRAG_LEN 2346 /* Max frag is also limited by aMPDUMaxLength of the attached PHY */ -#define DOT11_DEFAULT_FRAG_LEN 2346 - -/* dot11BeaconPeriod */ -#define DOT11_MIN_BEACON_PERIOD 1 -#define DOT11_MAX_BEACON_PERIOD 0xFFFF - -/* dot11DTIMPeriod */ -#define DOT11_MIN_DTIM_PERIOD 1 -#define DOT11_MAX_DTIM_PERIOD 0xFF - -/* 802.2 LLC/SNAP header used by 802.11 per 802.1H */ -#define DOT11_LLC_SNAP_HDR_LEN 8 -#define DOT11_OUI_LEN 3 -struct dot11_llc_snap_header { - uint8 dsap; /* always 0xAA */ - uint8 ssap; /* always 0xAA */ - uint8 ctl; /* always 0x03 */ - uint8 oui[DOT11_OUI_LEN]; /* RFC1042: 0x00 0x00 0x00 - Bridge-Tunnel: 0x00 0x00 0xF8 */ - uint16 type; /* ethertype */ -} PACKED; - -/* RFC1042 header used by 802.11 per 802.1H */ -#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN) - -/* Generic 802.11 MAC header */ -/* - * N.B.: This struct reflects the full 4 address 802.11 MAC header. - * The fields are defined such that the shorter 1, 2, and 3 - * address headers just use the first k fields. - */ -struct dot11_header { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr a1; /* address 1 */ - struct ether_addr a2; /* address 2 */ - struct ether_addr a3; /* address 3 */ - uint16 seq; /* sequence control */ - struct ether_addr a4; /* address 4 */ -} PACKED; - -/* Control frames */ - -struct dot11_rts_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ - struct ether_addr ta; /* transmitter address */ -} PACKED; -#define DOT11_RTS_LEN 16 - -struct dot11_cts_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ -} PACKED; -#define DOT11_CTS_LEN 10 - -struct dot11_ack_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ -} PACKED; -#define DOT11_ACK_LEN 10 - -struct dot11_ps_poll_frame { - uint16 fc; /* frame control */ - uint16 durid; /* AID */ - struct ether_addr bssid; /* receiver address, STA in AP */ - struct ether_addr ta; /* transmitter address */ -} PACKED; -#define DOT11_PS_POLL_LEN 16 - -struct dot11_cf_end_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ - struct ether_addr bssid; /* transmitter address, STA in AP */ -} PACKED; -#define DOT11_CS_END_LEN 16 - -/* Management frame header */ -struct dot11_management_header { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr da; /* receiver address */ - struct ether_addr sa; /* transmitter address */ - struct ether_addr bssid; /* BSS ID */ - uint16 seq; /* sequence control */ -} PACKED; -#define DOT11_MGMT_HDR_LEN 24 - -/* Management frame payloads */ - -struct dot11_bcn_prb { - uint32 timestamp[2]; - uint16 beacon_interval; - uint16 capability; -} PACKED; -#define DOT11_BCN_PRB_LEN 12 - -struct dot11_auth { - uint16 alg; /* algorithm */ - uint16 seq; /* sequence control */ - uint16 status; /* status code */ -} PACKED; -#define DOT11_AUTH_FIXED_LEN 6 /* length of auth frame without challenge info elt */ - -struct dot11_assoc_req { - uint16 capability; /* capability information */ - uint16 listen; /* listen interval */ -} PACKED; - -struct dot11_assoc_resp { - uint16 capability; /* capability information */ - uint16 status; /* status code */ - uint16 aid; /* association ID */ -} PACKED; - -struct dot11_action_measure { - uint8 category; - uint8 action; - uint8 token; - uint8 data[1]; -} PACKED; -#define DOT11_ACTION_MEASURE_LEN 3 - -/************** - 802.11h related definitions. -**************/ -typedef struct { - uint8 id; - uint8 len; - uint8 power; -} dot11_power_cnst_t; - -typedef struct { - uint8 min; - uint8 max; -} dot11_power_cap_t; - -typedef struct { - uint8 id; - uint8 len; - uint8 tx_pwr; - uint8 margin; -} dot11_tpc_rep_t; -#define DOT11_MNG_IE_TPC_REPORT_LEN 2 /* length of IE data, not including 2 byte header */ - -typedef struct { - uint8 id; - uint8 len; - uint8 first_channel; - uint8 num_channels; -} dot11_supp_channels_t; - -struct dot11_channel_switch { - uint8 id; - uint8 len; - uint8 mode; - uint8 channel; - uint8 count; -} PACKED; -typedef struct dot11_channel_switch dot11_channel_switch_t; - -/* 802.11h Measurement Request/Report IEs */ -/* Measurement Type field */ -#define DOT11_MEASURE_TYPE_BASIC 0 -#define DOT11_MEASURE_TYPE_CCA 1 -#define DOT11_MEASURE_TYPE_RPI 2 - -/* Measurement Mode field */ - -/* Measurement Request Modes */ -#define DOT11_MEASURE_MODE_ENABLE (1<<1) -#define DOT11_MEASURE_MODE_REQUEST (1<<2) -#define DOT11_MEASURE_MODE_REPORT (1<<3) -/* Measurement Report Modes */ -#define DOT11_MEASURE_MODE_LATE (1<<0) -#define DOT11_MEASURE_MODE_INCAPABLE (1<<1) -#define DOT11_MEASURE_MODE_REFUSED (1<<2) -/* Basic Measurement Map bits */ -#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0)) -#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1)) -#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2)) -#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3)) -#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4)) - -typedef struct { - uint8 id; - uint8 len; - uint8 token; - uint8 mode; - uint8 type; - uint8 channel; - uint8 start_time[8]; - uint16 duration; -} dot11_meas_req_t; -#define DOT11_MNG_IE_MREQ_LEN 14 -/* length of Measure Request IE data not including variable len */ -#define DOT11_MNG_IE_MREQ_FIXED_LEN 3 - -struct dot11_meas_rep { - uint8 id; - uint8 len; - uint8 token; - uint8 mode; - uint8 type; - union - { - struct { - uint8 channel; - uint8 start_time[8]; - uint16 duration; - uint8 map; - } PACKED basic; - uint8 data[1]; - } PACKED rep; -} PACKED; -typedef struct dot11_meas_rep dot11_meas_rep_t; - -/* length of Measure Report IE data not including variable len */ -#define DOT11_MNG_IE_MREP_FIXED_LEN 3 - -struct dot11_meas_rep_basic { - uint8 channel; - uint8 start_time[8]; - uint16 duration; - uint8 map; -} PACKED; -typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t; -#define DOT11_MEASURE_BASIC_REP_LEN 12 - -struct dot11_quiet { - uint8 id; - uint8 len; - uint8 count; /* TBTTs until beacon interval in quiet starts */ - uint8 period; /* Beacon intervals between periodic quiet periods ? */ - uint16 duration;/* Length of quiet period, in TU's */ - uint16 offset; /* TU's offset from TBTT in Count field */ -} PACKED; -typedef struct dot11_quiet dot11_quiet_t; - -typedef struct { - uint8 channel; - uint8 map; -} chan_map_tuple_t; - -typedef struct { - uint8 id; - uint8 len; - uint8 eaddr[ETHER_ADDR_LEN]; - uint8 interval; - chan_map_tuple_t map[1]; -} dot11_ibss_dfs_t; - -/* WME Elements */ -#define WME_OUI "\x00\x50\xf2" -#define WME_VER 1 -#define WME_TYPE 2 -#define WME_SUBTYPE_IE 0 /* Information Element */ -#define WME_SUBTYPE_PARAM_IE 1 /* Parameter Element */ -#define WME_SUBTYPE_TSPEC 2 /* Traffic Specification */ - -/* WME Access Category Indices (ACIs) */ -#define AC_BE 0 /* Best Effort */ -#define AC_BK 1 /* Background */ -#define AC_VI 2 /* Video */ -#define AC_VO 3 /* Voice */ -#define AC_MAX 4 - -/* WME Information Element (IE) */ -struct wme_ie { - uint8 oui[3]; - uint8 type; - uint8 subtype; - uint8 version; - uint8 acinfo; -} PACKED; -typedef struct wme_ie wme_ie_t; -#define WME_IE_LEN 7 - -struct wme_acparam { - uint8 ACI; - uint8 ECW; - uint16 TXOP; /* stored in network order (ls octet first) */ -} PACKED; -typedef struct wme_acparam wme_acparam_t; - -/* WME Parameter Element (PE) */ -struct wme_params { - uint8 oui[3]; - uint8 type; - uint8 subtype; - uint8 version; - uint8 acinfo; - uint8 rsvd; - wme_acparam_t acparam[4]; -} PACKED; -typedef struct wme_params wme_params_t; -#define WME_PARAMS_IE_LEN 24 - -/* acinfo */ -#define WME_COUNT_MASK 0x0f -/* ACI */ -#define WME_AIFS_MASK 0x0f -#define WME_ACM_MASK 0x10 -#define WME_ACI_MASK 0x60 -#define WME_ACI_SHIFT 5 -/* ECW */ -#define WME_CWMIN_MASK 0x0f -#define WME_CWMAX_MASK 0xf0 -#define WME_CWMAX_SHIFT 4 - -#define WME_TXOP_UNITS 32 - -/* WME Traffic Specification (TSPEC) element */ -#define WME_SUBTYPE_TSPEC 2 -#define WME_TSPEC_HDR_LEN 2 -#define WME_TSPEC_BODY_OFF 2 -struct wme_tspec { - uint8 oui[DOT11_OUI_LEN]; /* WME_OUI */ - uint8 type; /* WME_TYPE */ - uint8 subtype; /* WME_SUBTYPE_TSPEC */ - uint8 version; /* WME_VERSION */ - uint16 ts_info; /* TS Info */ - uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */ - uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */ - uint32 min_service_interval; /* Minimum Service Interval (us) */ - uint32 max_service_interval; /* Maximum Service Interval (us) */ - uint32 inactivity_interval; /* Inactivity Interval (us) */ - uint32 service_start; /* Service Start Time (us) */ - uint32 min_rate; /* Minimum Data Rate (bps) */ - uint32 mean_rate; /* Mean Data Rate (bps) */ - uint32 max_burst_size; /* Maximum Burst Size (bytes) */ - uint32 min_phy_rate; /* Minimum PHY Rate (bps) */ - uint32 peak_rate; /* Peak Data Rate (bps) */ - uint32 delay_bound; /* Delay Bound (us) */ - uint16 surplus_bandwidth; /* Surplus Bandwidth Allowance Factor */ - uint16 medium_time; /* Medium Time (32 us/s periods) */ -} PACKED; -typedef struct wme_tspec wme_tspec_t; -#define WME_TSPEC_LEN 56 /* not including 2-byte header */ - -/* ts_info */ -/* 802.1D priority is duplicated - bits 13-11 AND bits 3-1 */ -#define TS_INFO_PRIO_SHIFT_HI 11 -#define TS_INFO_PRIO_MASK_HI (0x7 << TS_INFO_PRIO_SHIFT_HI) -#define TS_INFO_PRIO_SHIFT_LO 1 -#define TS_INFO_PRIO_MASK_LO (0x7 << TS_INFO_PRIO_SHIFT_LO) -#define TS_INFO_CONTENTION_SHIFT 7 -#define TS_INFO_CONTENTION_MASK (0x1 << TS_INFO_CONTENTION_SHIFT) -#define TS_INFO_DIRECTION_SHIFT 5 -#define TS_INFO_DIRECTION_MASK (0x3 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_UPLINK (0 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_DOWNLINK (1 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_BIDIRECTIONAL (3 << TS_INFO_DIRECTION_SHIFT) - -/* nom_msdu_size */ -#define FIXED_MSDU_SIZE 0x8000 /* MSDU size is fixed */ -#define MSDU_SIZE_MASK 0x7fff /* (Nominal or fixed) MSDU size */ - -/* surplus_bandwidth */ -/* Represented as 3 bits of integer, binary point, 13 bits fraction */ -#define INTEGER_SHIFT 13 -#define FRACTION_MASK 0x1FFF - -/* Management Notification Frame */ -struct dot11_management_notification { - uint8 category; /* DOT11_ACTION_NOTIFICATION */ - uint8 action; - uint8 token; - uint8 status; - uint8 data[1]; /* Elements */ -} PACKED; -#define DOT11_MGMT_NOTIFICATION_LEN 4 /* Fixed length */ - -/* WME Action Codes */ -#define WME_SETUP_REQUEST 0 -#define WME_SETUP_RESPONSE 1 -#define WME_TEARDOWN 2 - -/* WME Setup Response Status Codes */ -#define WME_ADMISSION_ACCEPTED 0 -#define WME_INVALID_PARAMETERS 1 -#define WME_ADMISSION_REFUSED 3 - -/* Macro to take a pointer to a beacon or probe response - * header and return the char* pointer to the SSID info element - */ -#define BCN_PRB_SSID(hdr) ((char*)(hdr) + DOT11_MGMT_HDR_LEN + DOT11_BCN_PRB_LEN) - -/* Authentication frame payload constants */ -#define DOT11_OPEN_SYSTEM 0 -#define DOT11_SHARED_KEY 1 -#define DOT11_CHALLENGE_LEN 128 - -/* Frame control macros */ -#define FC_PVER_MASK 0x3 -#define FC_PVER_SHIFT 0 -#define FC_TYPE_MASK 0xC -#define FC_TYPE_SHIFT 2 -#define FC_SUBTYPE_MASK 0xF0 -#define FC_SUBTYPE_SHIFT 4 -#define FC_TODS 0x100 -#define FC_TODS_SHIFT 8 -#define FC_FROMDS 0x200 -#define FC_FROMDS_SHIFT 9 -#define FC_MOREFRAG 0x400 -#define FC_MOREFRAG_SHIFT 10 -#define FC_RETRY 0x800 -#define FC_RETRY_SHIFT 11 -#define FC_PM 0x1000 -#define FC_PM_SHIFT 12 -#define FC_MOREDATA 0x2000 -#define FC_MOREDATA_SHIFT 13 -#define FC_WEP 0x4000 -#define FC_WEP_SHIFT 14 -#define FC_ORDER 0x8000 -#define FC_ORDER_SHIFT 15 - -/* sequence control macros */ -#define SEQNUM_SHIFT 4 -#define FRAGNUM_MASK 0xF - -/* Frame Control type/subtype defs */ - -/* FC Types */ -#define FC_TYPE_MNG 0 -#define FC_TYPE_CTL 1 -#define FC_TYPE_DATA 2 - -/* Management Subtypes */ -#define FC_SUBTYPE_ASSOC_REQ 0 -#define FC_SUBTYPE_ASSOC_RESP 1 -#define FC_SUBTYPE_REASSOC_REQ 2 -#define FC_SUBTYPE_REASSOC_RESP 3 -#define FC_SUBTYPE_PROBE_REQ 4 -#define FC_SUBTYPE_PROBE_RESP 5 -#define FC_SUBTYPE_BEACON 8 -#define FC_SUBTYPE_ATIM 9 -#define FC_SUBTYPE_DISASSOC 10 -#define FC_SUBTYPE_AUTH 11 -#define FC_SUBTYPE_DEAUTH 12 -#define FC_SUBTYPE_ACTION 13 - -/* Control Subtypes */ -#define FC_SUBTYPE_PS_POLL 10 -#define FC_SUBTYPE_RTS 11 -#define FC_SUBTYPE_CTS 12 -#define FC_SUBTYPE_ACK 13 -#define FC_SUBTYPE_CF_END 14 -#define FC_SUBTYPE_CF_END_ACK 15 - -/* Data Subtypes */ -#define FC_SUBTYPE_DATA 0 -#define FC_SUBTYPE_DATA_CF_ACK 1 -#define FC_SUBTYPE_DATA_CF_POLL 2 -#define FC_SUBTYPE_DATA_CF_ACK_POLL 3 -#define FC_SUBTYPE_NULL 4 -#define FC_SUBTYPE_CF_ACK 5 -#define FC_SUBTYPE_CF_POLL 6 -#define FC_SUBTYPE_CF_ACK_POLL 7 -#define FC_SUBTYPE_QOS_DATA 8 -#define FC_SUBTYPE_QOS_NULL 12 - -/* type-subtype combos */ -#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK) - -#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT)) - -#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ) -#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP) -#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ) -#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP) -#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ) -#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP) -#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON) -#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC) -#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH) -#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH) -#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION) - -#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL) -#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS) -#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS) -#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK) -#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END) -#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK) - -#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA) -#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL) -#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK) -#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA) -#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL) - -/* QoS Control Field */ - -/* 802.1D Tag */ -#define QOS_PRIO_SHIFT 0 -#define QOS_PRIO_MASK 0x0007 -#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT) - -/* Ack Policy (0 means Acknowledge) */ -#define QOS_ACK_SHIFT 5 -#define QOS_ACK_MASK 0x0060 -#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT) - -/* Management Frames */ - -/* Management Frame Constants */ - -/* Fixed fields */ -#define DOT11_MNG_AUTH_ALGO_LEN 2 -#define DOT11_MNG_AUTH_SEQ_LEN 2 -#define DOT11_MNG_BEACON_INT_LEN 2 -#define DOT11_MNG_CAP_LEN 2 -#define DOT11_MNG_AP_ADDR_LEN 6 -#define DOT11_MNG_LISTEN_INT_LEN 2 -#define DOT11_MNG_REASON_LEN 2 -#define DOT11_MNG_AID_LEN 2 -#define DOT11_MNG_STATUS_LEN 2 -#define DOT11_MNG_TIMESTAMP_LEN 8 - -/* DUR/ID field in assoc resp is 0xc000 | AID */ -#define DOT11_AID_MASK 0x3fff - -/* Reason Codes */ -#define DOT11_RC_RESERVED 0 -#define DOT11_RC_UNSPECIFIED 1 /* Unspecified reason */ -#define DOT11_RC_AUTH_INVAL 2 /* Previous authentication no longer valid */ -#define DOT11_RC_DEAUTH_LEAVING 3 /* Deauthenticated because sending station is - leaving (or has left) IBSS or ESS */ -#define DOT11_RC_INACTIVITY 4 /* Disassociated due to inactivity */ -#define DOT11_RC_BUSY 5 /* Disassociated because AP is unable to handle - all currently associated stations */ -#define DOT11_RC_INVAL_CLASS_2 6 /* Class 2 frame received from - nonauthenticated station */ -#define DOT11_RC_INVAL_CLASS_3 7 /* Class 3 frame received from - nonassociated station */ -#define DOT11_RC_DISASSOC_LEAVING 8 /* Disassociated because sending station is - leaving (or has left) BSS */ -#define DOT11_RC_NOT_AUTH 9 /* Station requesting (re)association is - not authenticated with responding station */ -#define DOT11_RC_MAX 23 /* Reason codes > 23 are reserved */ - -/* Status Codes */ -#define DOT11_STATUS_SUCCESS 0 /* Successful */ -#define DOT11_STATUS_FAILURE 1 /* Unspecified failure */ -#define DOT11_STATUS_CAP_MISMATCH 10 /* Cannot support all requested capabilities - in the Capability Information field */ -#define DOT11_STATUS_REASSOC_FAIL 11 /* Reassociation denied due to inability to - confirm that association exists */ -#define DOT11_STATUS_ASSOC_FAIL 12 /* Association denied due to reason outside - the scope of this standard */ -#define DOT11_STATUS_AUTH_MISMATCH 13 /* Responding station does not support the - specified authentication algorithm */ -#define DOT11_STATUS_AUTH_SEQ 14 /* Received an Authentication frame with - authentication transaction sequence number - out of expected sequence */ -#define DOT11_STATUS_AUTH_CHALLENGE_FAIL 15 /* Authentication rejected because of challenge failure */ -#define DOT11_STATUS_AUTH_TIMEOUT 16 /* Authentication rejected due to timeout waiting - for next frame in sequence */ -#define DOT11_STATUS_ASSOC_BUSY_FAIL 17 /* Association denied because AP is unable to - handle additional associated stations */ -#define DOT11_STATUS_ASSOC_RATE_MISMATCH 18 /* Association denied due to requesting station - not supporting all of the data rates in the - BSSBasicRateSet parameter */ -#define DOT11_STATUS_ASSOC_SHORT_REQUIRED 19 /* Association denied due to requesting station - not supporting the Short Preamble option */ -#define DOT11_STATUS_ASSOC_PBCC_REQUIRED 20 /* Association denied due to requesting station - not supporting the PBCC Modulation option */ -#define DOT11_STATUS_ASSOC_AGILITY_REQUIRED 21 /* Association denied due to requesting station - not supporting the Channel Agility option */ -#define DOT11_STATUS_ASSOC_SPECTRUM_REQUIRED 22 /* Association denied because Spectrum Management - capability is required. */ -#define DOT11_STATUS_ASSOC_BAD_POWER_CAP 23 /* Association denied because the info in the - Power Cap element is unacceptable. */ -#define DOT11_STATUS_ASSOC_BAD_SUP_CHANNELS 24 /* Association denied because the info in the - Supported Channel element is unacceptable */ -#define DOT11_STATUS_ASSOC_SHORTSLOT_REQUIRED 25 /* Association denied due to requesting station - not supporting the Short Slot Time option */ -#define DOT11_STATUS_ASSOC_ERPBCC_REQUIRED 26 /* Association denied due to requesting station - not supporting the ER-PBCC Modulation option */ -#define DOT11_STATUS_ASSOC_DSSOFDM_REQUIRED 27 /* Association denied due to requesting station - not supporting the DSS-OFDM option */ - -/* Info Elts, length of INFORMATION portion of Info Elts */ -#define DOT11_MNG_DS_PARAM_LEN 1 -#define DOT11_MNG_IBSS_PARAM_LEN 2 - -/* TIM Info element has 3 bytes fixed info in INFORMATION field, - * followed by 1 to 251 bytes of Partial Virtual Bitmap */ -#define DOT11_MNG_TIM_FIXED_LEN 3 -#define DOT11_MNG_TIM_DTIM_COUNT 0 -#define DOT11_MNG_TIM_DTIM_PERIOD 1 -#define DOT11_MNG_TIM_BITMAP_CTL 2 -#define DOT11_MNG_TIM_PVB 3 - -/* TLV defines */ -#define TLV_TAG_OFF 0 -#define TLV_LEN_OFF 1 -#define TLV_HDR_LEN 2 -#define TLV_BODY_OFF 2 - -/* Management Frame Information Element IDs */ -#define DOT11_MNG_SSID_ID 0 -#define DOT11_MNG_RATES_ID 1 -#define DOT11_MNG_FH_PARMS_ID 2 -#define DOT11_MNG_DS_PARMS_ID 3 -#define DOT11_MNG_CF_PARMS_ID 4 -#define DOT11_MNG_TIM_ID 5 -#define DOT11_MNG_IBSS_PARMS_ID 6 -#define DOT11_MNG_COUNTRY_ID 7 -#define DOT11_MNG_HOPPING_PARMS_ID 8 -#define DOT11_MNG_HOPPING_TABLE_ID 9 -#define DOT11_MNG_REQUEST_ID 10 -#define DOT11_MNG_CHALLENGE_ID 16 -#define DOT11_MNG_PWR_CONSTRAINT_ID 32 /* 11H PowerConstraint */ -#define DOT11_MNG_PWR_CAP_ID 33 /* 11H PowerCapability */ -#define DOT11_MNG_TPC_REQUEST_ID 34 /* 11H TPC Request */ -#define DOT11_MNG_TPC_REPORT_ID 35 /* 11H TPC Report */ -#define DOT11_MNG_SUPP_CHANNELS_ID 36 /* 11H Supported Channels */ -#define DOT11_MNG_CHANNEL_SWITCH_ID 37 /* 11H ChannelSwitch Announcement*/ -#define DOT11_MNG_MEASURE_REQUEST_ID 38 /* 11H MeasurementRequest */ -#define DOT11_MNG_MEASURE_REPORT_ID 39 /* 11H MeasurementReport */ -#define DOT11_MNG_QUIET_ID 40 /* 11H Quiet */ -#define DOT11_MNG_IBSS_DFS_ID 41 /* 11H IBSS_DFS */ -#define DOT11_MNG_ERP_ID 42 -#define DOT11_MNG_NONERP_ID 47 -#define DOT11_MNG_EXT_RATES_ID 50 -#define DOT11_MNG_WPA_ID 221 -#define DOT11_MNG_PROPR_ID 221 - -/* ERP info element bit values */ -#define DOT11_MNG_ERP_LEN 1 /* ERP is currently 1 byte long */ -#define DOT11_MNG_NONERP_PRESENT 0x01 /* NonERP (802.11b) STAs are present in the BSS */ -#define DOT11_MNG_USE_PROTECTION 0x02 /* Use protection mechanisms for ERP-OFDM frames */ -#define DOT11_MNG_BARKER_PREAMBLE 0x04 /* Short Preambles: 0 == allowed, 1 == not allowed */ - -/* Capability Information Field */ -#define DOT11_CAP_ESS 0x0001 -#define DOT11_CAP_IBSS 0x0002 -#define DOT11_CAP_POLLABLE 0x0004 -#define DOT11_CAP_POLL_RQ 0x0008 -#define DOT11_CAP_PRIVACY 0x0010 -#define DOT11_CAP_SHORT 0x0020 -#define DOT11_CAP_PBCC 0x0040 -#define DOT11_CAP_AGILITY 0x0080 -#define DOT11_CAP_SPECTRUM 0x0100 -#define DOT11_CAP_SHORTSLOT 0x0400 -#define DOT11_CAP_CCK_OFDM 0x2000 - -/* Action Frame Constants */ -#define DOT11_ACTION_CAT_ERR_MASK 0x80 -#define DOT11_ACTION_CAT_SPECT_MNG 0x00 -#define DOT11_ACTION_NOTIFICATION 0x11 /* 17 */ - -#define DOT11_ACTION_ID_M_REQ 0 -#define DOT11_ACTION_ID_M_REP 1 -#define DOT11_ACTION_ID_TPC_REQ 2 -#define DOT11_ACTION_ID_TPC_REP 3 -#define DOT11_ACTION_ID_CHANNEL_SWITCH 4 - -/* MLME Enumerations */ -#define DOT11_BSSTYPE_INFRASTRUCTURE 0 -#define DOT11_BSSTYPE_INDEPENDENT 1 -#define DOT11_BSSTYPE_ANY 2 -#define DOT11_SCANTYPE_ACTIVE 0 -#define DOT11_SCANTYPE_PASSIVE 1 - -/* 802.11 A PHY constants */ -#define APHY_SLOT_TIME 9 -#define APHY_SIFS_TIME 16 -#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME)) -#define APHY_PREAMBLE_TIME 16 -#define APHY_SIGNAL_TIME 4 -#define APHY_SYMBOL_TIME 4 -#define APHY_SERVICE_NBITS 16 -#define APHY_TAIL_NBITS 6 -#define APHY_CWMIN 15 - -/* 802.11 B PHY constants */ -#define BPHY_SLOT_TIME 20 -#define BPHY_SIFS_TIME 10 -#define BPHY_DIFS_TIME 50 -#define BPHY_PLCP_TIME 192 -#define BPHY_PLCP_SHORT_TIME 96 -#define BPHY_CWMIN 31 - -/* 802.11 G constants */ -#define DOT11_OFDM_SIGNAL_EXTENSION 6 - -#define PHY_CWMAX 1023 - -#define DOT11_MAXNUMFRAGS 16 /* max # fragments per MSDU */ - -/* dot11Counters Table - 802.11 spec., Annex D */ -typedef struct d11cnt { - uint32 txfrag; /* dot11TransmittedFragmentCount */ - uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ - uint32 txfail; /* dot11FailedCount */ - uint32 txretry; /* dot11RetryCount */ - uint32 txretrie; /* dot11MultipleRetryCount */ - uint32 rxdup; /* dot11FrameduplicateCount */ - uint32 txrts; /* dot11RTSSuccessCount */ - uint32 txnocts; /* dot11RTSFailureCount */ - uint32 txnoack; /* dot11ACKFailureCount */ - uint32 rxfrag; /* dot11ReceivedFragmentCount */ - uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ - uint32 rxcrc; /* dot11FCSErrorCount */ - uint32 txfrmsnt; /* dot11TransmittedFrameCount */ - uint32 rxundec; /* dot11WEPUndecryptableCount */ -} d11cnt_t; - -/* BRCM OUI */ -#define BRCM_OUI "\x00\x10\x18" - -/* BRCM info element */ -struct brcm_ie { - uchar id; - uchar len; - uchar oui[3]; - uchar ver; - uchar assoc; /* # of assoc STAs */ - uchar flags; /* misc flags */ -} PACKED; -#define BRCM_IE_LEN 8 -typedef struct brcm_ie brcm_ie_t; -#define BRCM_IE_VER 1 - -/* brcm_ie flags */ -#define BRF_ABCAP 0x1 /* afterburner capable */ -#define BRF_ABRQRD 0x2 /* afterburner requested */ - -/* WPA definitions */ -#define WPA_VERSION 1 -#define WPA_OUI "\x00\x50\xF2" - -#define WPA_OUI_LEN 3 - -/* WPA authentication modes */ -#define WPA_AUTH_NONE 0 /* None */ -#define WPA_AUTH_UNSPECIFIED 1 /* Unspecified authentication over 802.1X: default for WPA */ -#define WPA_AUTH_PSK 2 /* Pre-shared Key over 802.1X */ -#define WPA_AUTH_DISABLED 255 /* Legacy (i.e., non-WPA) */ - -#define IS_WPA_AUTH(auth) ((auth) == WPA_AUTH_NONE || \ - (auth) == WPA_AUTH_UNSPECIFIED || \ - (auth) == WPA_AUTH_PSK) - - -/* Key related defines */ -#define DOT11_MAX_DEFAULT_KEYS 4 /* number of default keys */ -#define DOT11_MAX_KEY_SIZE 32 /* max size of any key */ -#define DOT11_MAX_IV_SIZE 16 /* max size of any IV */ -#define DOT11_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ - -#define WEP1_KEY_SIZE 5 /* max size of any WEP key */ -#define WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ -#define WEP128_KEY_SIZE 13 /* max size of any WEP key */ -#define WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ -#define TKIP_MIC_SIZE 8 /* size of TKIP MIC */ -#define TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ -#define TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ -#define TKIP_KEY_SIZE 32 /* size of any TKIP key */ -#define TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ -#define TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ -#define TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ -#define TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ -#define AES_KEY_SIZE 16 /* size of AES key */ - -#undef PACKED -#if !defined(__GNUC__) -#pragma pack() -#endif - -#endif /* _802_11_H_ */ diff --git a/openwrt/target/linux/package/base-files/include/proto/ethernet.h b/openwrt/target/linux/package/base-files/include/proto/ethernet.h deleted file mode 100644 index 173464af639..00000000000 --- a/openwrt/target/linux/package/base-files/include/proto/ethernet.h +++ /dev/null @@ -1,179 +0,0 @@ -/******************************************************************************* - * $Id$ - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * From FreeBSD 2.2.7: Fundamental constants relating to ethernet. - ******************************************************************************/ - -#ifndef _NET_ETHERNET_H_ /* use native BSD ethernet.h when available */ -#define _NET_ETHERNET_H_ - -#ifndef _TYPEDEFS_H_ -#include "typedefs.h" -#endif - -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#define PACKED -#endif - -/* - * The number of bytes in an ethernet (MAC) address. - */ -#ifndef ETHER_ADDR_LEN -#define ETHER_ADDR_LEN 6 -#endif - -/* - * The number of bytes in the type field. - */ -#ifndef ETHER_TYPE_LEN -#define ETHER_TYPE_LEN 2 -#endif - -/* - * The number of bytes in the trailing CRC field. - */ -#ifndef ETHER_CRC_LEN -#define ETHER_CRC_LEN 4 -#endif - -/* - * The length of the combined header. - */ -#ifndef ETHER_HDR_LEN -#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN) -#endif - -/* - * The minimum packet length. - */ -#ifndef ETHER_MIN_LEN -#define ETHER_MIN_LEN 64 -#endif - -/* - * The minimum packet user data length. - */ -#ifndef ETHER_MIN_DATA -#define ETHER_MIN_DATA 46 -#endif - -/* - * The maximum packet length. - */ -#ifndef ETHER_MAX_LEN -#define ETHER_MAX_LEN 1518 -#endif - -/* - * The maximum packet user data length. - */ -#define ETHER_MAX_DATA 1500 - -/* - * Used to uniquely identify a 802.1q VLAN-tagged header. - */ -#define VLAN_TAG 0x8100 - -/* - * Located after dest & src address in ether header. - */ -#define VLAN_FIELDS_OFFSET (ETHER_ADDR_LEN * 2) - -/* - * 4 bytes of vlan field info. - */ -#define VLAN_FIELDS_SIZE 4 - -/* location of bits in 16-bit vlan fields */ -#define VLAN_PRI_SHIFT 13 /* user priority */ -#define VLAN_CFI_SHIFT 12 /* canonical format indicator bit */ - -/* 3 bits of priority */ -#define VLAN_PRI_MASK 7 -/* 12 bits of vlan identfier (VID) */ -#define VLAN_VID_MASK 0xFFF /* VLAN identifier (VID) field */ - -struct vlan_tags { - uint16 tag_type; /* 0x8100 for VLAN */ - uint16 tag_control; /* prio | cfi | vid */ -} PACKED ; - -/* 802.1X ethertype */ - -#define ETHER_TYPE_IP 0x0800 /* IP */ -#define ETHER_TYPE_BRCM 0x886c /* Broadcom Corp. */ -#define ETHER_TYPE_802_1X 0x888e /* 802.1x */ - -#define ETHER_BRCM_SUBTYPE_LEN 4 /* Broadcom 4byte subtype follows ethertype */ -#define ETHER_BRCM_CRAM 0x1 /* Broadcom subtype cram protocol */ - -/* - * A macro to validate a length with - */ -#define ETHER_IS_VALID_LEN(foo) \ - ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) - -#ifndef __NET_ETHERNET_H -#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */ -/* - * Structure of a 10Mb/s Ethernet header. - */ -struct ether_header { - uint8 ether_dhost[ETHER_ADDR_LEN]; - uint8 ether_shost[ETHER_ADDR_LEN]; - uint16 ether_type; -} PACKED ; - -/* - * Structure of a 48-bit Ethernet address. - */ -struct ether_addr { - uint8 octet[ETHER_ADDR_LEN]; -} PACKED ; -#endif -#endif - -/* - * Takes a pointer, returns true if a 48-bit multicast address - * (including broadcast, since it is all ones) - */ -#define ETHER_ISMULTI(ea) (((uint8 *)(ea))[0] & 1) - -/* - * Takes a pointer, returns true if a 48-bit broadcast (all ones) - */ -#define ETHER_ISBCAST(ea) ((((uint8 *)(ea))[0] & \ - ((uint8 *)(ea))[1] & \ - ((uint8 *)(ea))[2] & \ - ((uint8 *)(ea))[3] & \ - ((uint8 *)(ea))[4] & \ - ((uint8 *)(ea))[5]) == 0xff) - -static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}}; - -/* - * Takes a pointer, returns true if a 48-bit null address (all zeros) - */ -#define ETHER_ISNULLADDR(ea) ((((uint8 *)(ea))[0] | \ - ((uint8 *)(ea))[1] | \ - ((uint8 *)(ea))[2] | \ - ((uint8 *)(ea))[3] | \ - ((uint8 *)(ea))[4] | \ - ((uint8 *)(ea))[5]) == 0) - -/* Differentiated Services Codepoint - lower 6 bits of tos in iphdr */ -#define DSCP_PRI_MASK 0x3F /* bits 0-6 */ -#define DSCP_WME_PRI_MASK 0x38 /* bits 3-6 */ -#define DSCP_WME_PRI_SHIFT 3 - -#undef PACKED - -#endif /* _NET_ETHERNET_H_ */ diff --git a/openwrt/target/linux/package/base-files/include/shutils.h b/openwrt/target/linux/package/base-files/include/shutils.h deleted file mode 100644 index 783ee9ede14..00000000000 --- a/openwrt/target/linux/package/base-files/include/shutils.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Shell-like utility functions - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _shutils_h_ -#define _shutils_h_ -#include <string.h> -/* - * Reads file and returns contents - * @param fd file descriptor - * @return contents of file or NULL if an error occurred - */ -extern char * fd2str(int fd); - -/* - * Reads file and returns contents - * @param path path to file - * @return contents of file or NULL if an error occurred - */ -extern char * file2str(const char *path); - -/* - * Waits for a file descriptor to become available for reading or unblocked signal - * @param fd file descriptor - * @param timeout seconds to wait before timing out or 0 for no timeout - * @return 1 if descriptor changed status or 0 if timed out or -1 on error - */ -extern int waitfor(int fd, int timeout); - -/* - * Concatenates NULL-terminated list of arguments into a single - * commmand and executes it - * @param argv argument list - * @param path NULL, ">output", or ">>output" - * @param timeout seconds to wait before timing out or 0 for no timeout - * @param ppid NULL to wait for child termination or pointer to pid - * @return return value of executed command or errno - */ -extern int _eval(char *const argv[], char *path, int timeout, pid_t *ppid); - -/* - * Concatenates NULL-terminated list of arguments into a single - * commmand and executes it - * @param argv argument list - * @return stdout of executed command or NULL if an error occurred - */ -extern char * _backtick(char *const argv[]); - -/* - * Kills process whose PID is stored in plaintext in pidfile - * @param pidfile PID file - * @return 0 on success and errno on failure - */ -extern int kill_pidfile(char *pidfile); - -/* - * fread() with automatic retry on syscall interrupt - * @param ptr location to store to - * @param size size of each element of data - * @param nmemb number of elements - * @param stream file stream - * @return number of items successfully read - */ -extern int safe_fread(void *ptr, size_t size, size_t nmemb, FILE *stream); - -/* - * fwrite() with automatic retry on syscall interrupt - * @param ptr location to read from - * @param size size of each element of data - * @param nmemb number of elements - * @param stream file stream - * @return number of items successfully written - */ -extern int safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); - -/* - * Convert Ethernet address string representation to binary data - * @param a string in xx:xx:xx:xx:xx:xx notation - * @param e binary data - * @return TRUE if conversion was successful and FALSE otherwise - */ -extern int ether_atoe(const char *a, unsigned char *e); - -/* - * Convert Ethernet address binary data to string representation - * @param e binary data - * @param a string in xx:xx:xx:xx:xx:xx notation - * @return a - */ -extern char * ether_etoa(const unsigned char *e, char *a); - -/* - * Concatenate two strings together into a caller supplied buffer - * @param s1 first string - * @param s2 second string - * @param buf buffer large enough to hold both strings - * @return buf - */ -static inline char * strcat_r(const char *s1, const char *s2, char *buf) -{ - strcpy(buf, s1); - strcat(buf, s2); - return buf; -} - -/* Check for a blank character; that is, a space or a tab */ -#define isblank(c) ((c) == ' ' || (c) == '\t') - -/* Strip trailing CR/NL from string <s> */ -#define chomp(s) ({ \ - char *c = (s) + strlen((s)) - 1; \ - while ((c > (s)) && (*c == '\n' || *c == '\r' || *c == ' ')) \ - *c-- = '\0'; \ - s; \ -}) - -/* Simple version of _backtick() */ -#define backtick(cmd, args...) ({ \ - char *argv[] = { cmd, ## args, NULL }; \ - _backtick(argv); \ -}) - -/* Simple version of _eval() (no timeout and wait for child termination) */ -#define eval(cmd, args...) ({ \ - char *argv[] = { cmd, ## args, NULL }; \ - _eval(argv, ">/dev/console", 0, NULL); \ -}) - -/* Copy each token in wordlist delimited by space into word */ -#define foreach(word, wordlist, next) \ - for (next = &wordlist[strspn(wordlist, " ")], \ - strncpy(word, next, sizeof(word)), \ - word[strcspn(word, " ")] = '\0', \ - word[sizeof(word) - 1] = '\0', \ - next = strchr(next, ' '); \ - strlen(word); \ - next = next ? &next[strspn(next, " ")] : "", \ - strncpy(word, next, sizeof(word)), \ - word[strcspn(word, " ")] = '\0', \ - word[sizeof(word) - 1] = '\0', \ - next = strchr(next, ' ')) - -/* Return NUL instead of NULL if undefined */ -#define safe_getenv(s) (getenv(s) ? : "") - -/* Print directly to the console */ -#define cprintf(fmt, args...) do { \ - FILE *fp = fopen("/dev/console", "w"); \ - if (fp) { \ - fprintf(fp, fmt, ## args); \ - fclose(fp); \ - } \ -} while (0) - -/* Debug print */ -#ifdef DEBUG -#define dprintf(fmt, args...) cprintf("%s: " fmt, __FUNCTION__, ## args) -#else -#define dprintf(fmt, args...) -#endif - -#ifdef vxworks - -#include <inetLib.h> -#define inet_aton(a, n) ((inet_aton((a), (n)) == ERROR) ? 0 : 1) -#define inet_ntoa(n) ({ char a[INET_ADDR_LEN]; inet_ntoa_b ((n), a); a; }) - -#include <typedefs.h> -#include <bcmutils.h> -#define ether_atoe(a, e) bcm_ether_atoe((a), (e)) -#define ether_etoa(e, a) bcm_ether_ntoa((e), (a)) - -/* These declarations are not available where you would expect them */ -extern int vsnprintf (char *, size_t, const char *, va_list); -extern int snprintf(char *str, size_t count, const char *fmt, ...); -extern char *strdup(const char *); -extern char *strsep(char **stringp, char *delim); -extern int strcasecmp(const char *s1, const char *s2); -extern int strncasecmp(const char *s1, const char *s2, size_t n); - -/* Neither are socket() and connect() */ -#include <sockLib.h> - -#ifdef DEBUG -#undef dprintf -#define dprintf printf -#endif -#endif - -#endif /* _shutils_h_ */ diff --git a/openwrt/target/linux/package/base-files/include/typedefs.h b/openwrt/target/linux/package/base-files/include/typedefs.h deleted file mode 100644 index 6b0c25e0424..00000000000 --- a/openwrt/target/linux/package/base-files/include/typedefs.h +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * $Id$ - */ - -#ifndef _TYPEDEFS_H_ -#define _TYPEDEFS_H_ - - -/* Define 'SITE_TYPEDEFS' in the compile to include a site specific - * typedef file "site_typedefs.h". - * - * If 'SITE_TYPEDEFS' is not defined, then the "Inferred Typedefs" - * section of this file makes inferences about the compile environment - * based on defined symbols and possibly compiler pragmas. - * - * Following these two sections is the "Default Typedefs" - * section. This section is only prcessed if 'USE_TYPEDEF_DEFAULTS' is - * defined. This section has a default set of typedefs and a few - * proprocessor symbols (TRUE, FALSE, NULL, ...). - */ - -#ifdef SITE_TYPEDEFS - -/******************************************************************************* - * Site Specific Typedefs - *******************************************************************************/ - -#include "site_typedefs.h" - -#else - -/******************************************************************************* - * Inferred Typedefs - *******************************************************************************/ - -/* Infer the compile environment based on preprocessor symbols and pramas. - * Override type definitions as needed, and include configuration dependent - * header files to define types. - */ - -#ifdef __cplusplus - -#define TYPEDEF_BOOL -#ifndef FALSE -#define FALSE false -#endif -#ifndef TRUE -#define TRUE true -#endif - -#else /* ! __cplusplus */ - -/* for Windows build, define bool as a uchar instead of the default int */ -#if defined(_WIN32) - -#define TYPEDEF_BOOL -typedef unsigned char bool; - -#endif /* _WIN32 */ - -#endif /* ! __cplusplus */ - -#ifdef _MSC_VER /* Microsoft C */ -#define TYPEDEF_INT64 -#define TYPEDEF_UINT64 -typedef signed __int64 int64; -typedef unsigned __int64 uint64; -#endif - -#if defined(MACOSX) && defined(KERNEL) -#define TYPEDEF_BOOL -#endif - - -#if defined(linux) -#define TYPEDEF_UINT -#define TYPEDEF_USHORT -#define TYPEDEF_ULONG -#endif - -#if !defined(linux) && !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) -#define TYPEDEF_UINT -#define TYPEDEF_USHORT -#endif - - -/* Do not support the (u)int64 types with strict ansi for GNU C */ -#if defined(__GNUC__) && defined(__STRICT_ANSI__) -#define TYPEDEF_INT64 -#define TYPEDEF_UINT64 -#endif - -/* ICL accepts unsigned 64 bit type only, and complains in ANSI mode - * for singned or unsigned */ -#if defined(__ICL) - -#define TYPEDEF_INT64 - -#if defined(__STDC__) -#define TYPEDEF_UINT64 -#endif - -#endif /* __ICL */ - - -#if !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) - -/* pick up ushort & uint from standard types.h */ -#if defined(linux) && defined(__KERNEL__) - -#include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */ - -#else - -#include <sys/types.h> - -#endif - -#endif /* !_WIN32 && !PMON && !_CFE_ */ - -#if defined(MACOSX) && defined(KERNEL) -#include <IOKit/IOTypes.h> -#endif - - -/* use the default typedefs in the next section of this file */ -#define USE_TYPEDEF_DEFAULTS - -#endif /* SITE_TYPEDEFS */ - - -/******************************************************************************* - * Default Typedefs - *******************************************************************************/ - -#ifdef USE_TYPEDEF_DEFAULTS -#undef USE_TYPEDEF_DEFAULTS - -#ifndef TYPEDEF_BOOL -typedef int bool; -#endif - -/*----------------------- define uchar, ushort, uint, ulong ----------------*/ - -#ifndef TYPEDEF_UCHAR -typedef unsigned char uchar; -#endif - -#ifndef TYPEDEF_USHORT -typedef unsigned short ushort; -#endif - -#ifndef TYPEDEF_UINT -typedef unsigned int uint; -#endif - -#ifndef TYPEDEF_ULONG -typedef unsigned long ulong; -#endif - -/*----------------------- define [u]int8/16/32/64 --------------------------*/ - -#ifndef TYPEDEF_UINT8 -typedef unsigned char uint8; -#endif - -#ifndef TYPEDEF_UINT16 -typedef unsigned short uint16; -#endif - -#ifndef TYPEDEF_UINT32 -typedef unsigned int uint32; -#endif - -#ifndef TYPEDEF_UINT64 -typedef unsigned long long uint64; -#endif - -#ifndef TYPEDEF_INT8 -typedef signed char int8; -#endif - -#ifndef TYPEDEF_INT16 -typedef signed short int16; -#endif - -#ifndef TYPEDEF_INT32 -typedef signed int int32; -#endif - -#ifndef TYPEDEF_INT64 -typedef signed long long int64; -#endif - -/*----------------------- define float32/64, float_t -----------------------*/ - -#ifndef TYPEDEF_FLOAT32 -typedef float float32; -#endif - -#ifndef TYPEDEF_FLOAT64 -typedef double float64; -#endif - -/* - * abstracted floating point type allows for compile time selection of - * single or double precision arithmetic. Compiling with -DFLOAT32 - * selects single precision; the default is double precision. - */ - -#ifndef TYPEDEF_FLOAT_T - -#if defined(FLOAT32) -typedef float32 float_t; -#else /* default to double precision floating point */ -typedef float64 float_t; -#endif - -#endif /* TYPEDEF_FLOAT_T */ - -/*----------------------- define macro values -----------------------------*/ - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#ifndef OFF -#define OFF 0 -#endif - -#ifndef ON -#define ON 1 -#endif - -/*----------------------- define PTRSZ, INLINE ----------------------------*/ - -#ifndef PTRSZ -#define PTRSZ sizeof (char*) -#endif - -#ifndef INLINE - -#ifdef _MSC_VER - -#define INLINE __inline - -#elif __GNUC__ - -#define INLINE __inline__ - -#else - -#define INLINE - -#endif /* _MSC_VER */ - -#endif /* INLINE */ - -#undef TYPEDEF_BOOL -#undef TYPEDEF_UCHAR -#undef TYPEDEF_USHORT -#undef TYPEDEF_UINT -#undef TYPEDEF_ULONG -#undef TYPEDEF_UINT8 -#undef TYPEDEF_UINT16 -#undef TYPEDEF_UINT32 -#undef TYPEDEF_UINT64 -#undef TYPEDEF_INT8 -#undef TYPEDEF_INT16 -#undef TYPEDEF_INT32 -#undef TYPEDEF_INT64 -#undef TYPEDEF_FLOAT32 -#undef TYPEDEF_FLOAT64 -#undef TYPEDEF_FLOAT_T - -#endif /* USE_TYPEDEF_DEFAULTS */ - -#endif /* _TYPEDEFS_H_ */ diff --git a/openwrt/target/linux/package/base-files/include/utils.h b/openwrt/target/linux/package/base-files/include/utils.h deleted file mode 100644 index b8d1cdb7bfd..00000000000 --- a/openwrt/target/linux/package/base-files/include/utils.h +++ /dev/null @@ -1,131 +0,0 @@ -#include <cy_conf.h> - -extern int diag_led(int type, int act); -extern int C_led(int i); -extern int get_single_ip(char *ipaddr, int which); -extern char *get_mac_from_ip(char *ip); -extern struct dns_lists *get_dns_list(int no); -extern int dns_to_resolv(void); -extern char *get_wan_face(void); -extern int check_wan_link(int num); -extern char *get_complete_lan_ip(char *ip); -extern int get_int_len(int num); -extern int file_to_buf(char *path, char *buf, int len); -extern int buf_to_file(char *path, char *buf); -extern pid_t* find_pid_by_name( char* pidName); -extern int find_pid_by_ps(char* pidName); -extern int *find_all_pid_by_ps(char* pidName); -extern char *find_name_by_proc(int pid); -extern int get_ppp_pid(char *file); -extern long convert_ver(char *ver); -extern int check_flash(void); -extern int check_action(void); -extern int check_now_boot(void); -extern int check_hw_type(void); -extern int is_exist(char *filename); -extern void set_ip_forward(char c); -struct mtu_lists *get_mtu(char *proto); -extern void set_host_domain_name(void); - -extern void encode(char *buf, int len); -extern void decode(char *buf, int len); - -extern int sys_netdev_ioctl(int family, int socket, char *if_name, int cmd, struct ifreq *ifr); - -int ct_openlog(const char *ident, int option, int facility, char *log_name); -void ct_syslog(int level, int enable, const char *fmt,...); -void ct_logger(int level, const char *fmt,...); -struct wl_assoc_mac * get_wl_assoc_mac(int *c); - - - -enum { DMZ, SESSION, DIAG , WL}; - -enum { START_LED, STOP_LED }; - -typedef enum { ACT_IDLE, - ACT_TFTP_UPGRADE, - ACT_WEB_UPGRADE, - ACT_WEBS_UPGRADE, - ACT_SW_RESTORE, - ACT_HW_RESTORE } ACTION; - -enum { UNKNOWN_BOOT = -1, PMON_BOOT, CFE_BOOT }; - -enum { BCM4702_CHIP, BCM4712_CHIP, BCM5325E_CHIP }; - -enum { FIRST, SECOND }; - -enum { SYSLOG_LOG=1, SYSLOG_DEBUG, CONSOLE_ONLY, LOG_CONSOLE, DEBUG_CONSOLE }; - -#define ACTION(cmd) buf_to_file(ACTION_FILE, cmd) - -struct dns_lists { - int num_servers; - char dns_server[4][16]; -}; - -#define NOT_USING 0 -#define USING 1 - -struct wl_assoc_mac -{ - char mac[18]; -}; - -struct mtu_lists { - char *proto; /* protocol */ - char *min; /* min mtu */ - char *max; /* max mtu */ -}; - - -#define PPP_PSEUDO_IP "10.64.64.64" -#define PPP_PSEUDO_NM "255.255.255.255" -#define PPP_PSEUDO_GW "10.112.112.112" - -#define PING_TMP "/tmp/ping.log" -#define TRACEROUTE_TMP "/tmp/traceroute.log" -#define MAX_BUF_LEN 254 - -#define RESOLV_FILE "/tmp/resolv.conf" -#define HOSTS_FILE "/tmp/hosts" - -#define LOG_FILE "/var/log/mess" - -#define ACTION_FILE "/tmp/action" - - -#define split(word, wordlist, next, delim) \ - for (next = wordlist, \ - strncpy(word, next, sizeof(word)), \ - word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \ - next = next ? next + sizeof(delim) - 1 : NULL ; \ - strlen(word); \ - next = next ? : "", \ - strncpy(word, next, sizeof(word)), \ - word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \ - next = next ? next + sizeof(delim) - 1 : NULL) - -#define STRUCT_LEN(name) sizeof(name)/sizeof(name[0]) - -#define printHEX(str,len) { \ - int i; \ - for (i=0 ; i<len ; i++) { \ - printf("%02X ", (unsigned char)*(str+i)); \ - if(((i+1)%16) == 0) printf("- "); \ - if(((i+1)%32) == 0) printf("\n"); \ - } \ - printf("\n\n"); \ -} - - -#define printASC(str,len) { \ - int i; \ - for (i=0 ; i<len ; i++) { \ - printf("%c", (unsigned char)*(str+i)); \ - if(((i+1)%16) == 0) printf("- "); \ - if(((i+1)%32) == 0) printf("\n"); \ - } \ - printf("\n\n"); \ -} diff --git a/openwrt/target/linux/package/base-files/include/wlcompat.h b/openwrt/target/linux/package/base-files/include/wlcompat.h deleted file mode 100644 index a4fc13439dd..00000000000 --- a/openwrt/target/linux/package/base-files/include/wlcompat.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * wlcompat.h - * - * Copyright (C) 2005 Felix Fietkau <nbd@vd-s.ath.cx> - * - * 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. - * - * $Id$ - */ -#include <linux/wireless.h> - -#ifndef WLCOMPAT_H -#define WLCOMPAT_H - -#define WLCOMPAT_SET_MONITOR SIOCIWFIRSTPRIV + 0 -#define WLCOMPAT_GET_MONITOR SIOCIWFIRSTPRIV + 1 -#define WLCOMPAT_SET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 2 -#define WLCOMPAT_GET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 3 -#define WLCOMPAT_SET_ANTDIV SIOCIWFIRSTPRIV + 4 -#define WLCOMPAT_GET_ANTDIV SIOCIWFIRSTPRIV + 5 -#define WLCOMPAT_SET_TXANT SIOCIWFIRSTPRIV + 6 -#define WLCOMPAT_GET_TXANT SIOCIWFIRSTPRIV + 7 - -#endif diff --git a/openwrt/target/linux/package/base-files/include/wlioctl.h b/openwrt/target/linux/package/base-files/include/wlioctl.h deleted file mode 100644 index 66783cc44dd..00000000000 --- a/openwrt/target/linux/package/base-files/include/wlioctl.h +++ /dev/null @@ -1,1097 +0,0 @@ -/* - * Custom OID/ioctl definitions for - * Broadcom 802.11abg Networking Device Driver - * - * Definitions subject to change without notice. - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _wlioctl_h_ -#define _wlioctl_h_ - -#include <typedefs.h> -#include <proto/ethernet.h> -#include <proto/802.11.h> - -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#define PACKED -#endif - -#define WLC_ESSID_MAX_SIZE 32 - -#define WL_NUMRATES 255 /* max # of rates in a rateset */ - -typedef struct wl_rateset { - uint32 count; /* # rates in this set */ - uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */ -} wl_rateset_t; - -#define WL_CHANSPEC_CHAN_MASK 0x0fff -#define WL_CHANSPEC_BAND_MASK 0xf000 -#define WL_CHANSPEC_BAND_SHIFT 12 -#define WL_CHANSPEC_BAND_A 0x1000 -#define WL_CHANSPEC_BAND_B 0x2000 - -/* - * Per-bss information structure. - */ - -#define WL_LEGACY_BSS_INFO_VERSION 106 /* an older supported version of wl_bss_info struct */ -#define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */ - -typedef struct wl_bss_info106 { - uint version; /* version field */ - struct ether_addr BSSID; - uint8 SSID_len; - uint8 SSID[32]; - uint8 Privacy; /* 0=No WEP, 1=Use WEP */ - int16 RSSI; /* receive signal strength (in dBm) */ - uint16 beacon_period; /* units are Kusec */ - uint16 atim_window; /* units are Kusec */ - uint8 channel; /* Channel no. */ - int8 infra; /* 0=IBSS, 1=infrastructure, 2=unknown */ - struct { - uint count; /* # rates in this set */ - uint8 rates[12]; /* rates in 500kbps units w/hi bit set if basic */ - } rateset; /* supported rates */ - uint8 dtim_period; /* DTIM period */ - int8 phy_noise; /* noise right after tx (in dBm) */ - uint16 capability; /* Capability information */ - struct dot11_bcn_prb *prb; /* probe response frame (ioctl na) */ - uint16 prb_len; /* probe response frame length (ioctl na) */ - struct { - uint8 supported; /* wpa supported */ - uint8 multicast; /* multicast cipher */ - uint8 ucount; /* count of unicast ciphers */ - uint8 unicast[4]; /* unicast ciphers */ - uint8 acount; /* count of auth modes */ - uint8 auth[4]; /* Authentication modes */ - } wpa; -} wl_bss_info106_t; - -typedef struct wl_bss_info { - uint32 version; /* version field */ - uint32 length; /* byte length of data in this record, starting at version and including IEs */ - struct ether_addr BSSID; - uint16 beacon_period; /* units are Kusec */ - uint16 capability; /* Capability information */ - uint8 SSID_len; - uint8 SSID[32]; - struct { - uint count; /* # rates in this set */ - uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ - } rateset; /* supported rates */ - uint8 channel; /* Channel no. */ - uint16 atim_window; /* units are Kusec */ - uint8 dtim_period; /* DTIM period */ - int16 RSSI; /* receive signal strength (in dBm) */ - int8 phy_noise; /* noise (in dBm) */ - uint32 ie_length; /* byte length of Information Elements */ - /* variable length Information Elements */ -} wl_bss_info_t; - -typedef struct wlc_ssid { - uint32 SSID_len; - uchar SSID[32]; -} wlc_ssid_t; - -typedef struct wl_scan_params { - wlc_ssid_t ssid; /* default is {0, ""} */ - struct ether_addr bssid;/* default is bcast */ - int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */ - int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */ - int32 nprobes; /* -1 use default, number of probes per channel */ - int32 active_time; /* -1 use default, dwell time per channel for active scanning */ - int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */ - int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */ - int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */ - uint16 channel_list[1]; /* list of chanspecs */ -} wl_scan_params_t; -/* size of wl_scan_params not including variable length array */ -#define WL_SCAN_PARAMS_FIXED_SIZE 64 - -typedef struct wl_scan_results { - uint32 buflen; - uint32 version; - uint32 count; - wl_bss_info_t bss_info[1]; -} wl_scan_results_t; -/* size of wl_scan_results not including variable length array */ -#define WL_SCAN_RESULTS_FIXED_SIZE 12 - -/* uint32 list */ -typedef struct wl_uint32_list { - /* in - # of elements, out - # of entries */ - uint32 count; - /* variable length uint32 list */ - uint32 element[1]; -} wl_uint32_list_t; - -#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */ - -typedef struct wl_channels_in_country { - uint32 buflen; - uint32 band; - char country_abbrev[WLC_CNTRY_BUF_SZ]; - uint32 count; - uint32 channel[1]; -} wl_channels_in_country_t; - -typedef struct wl_country_list { - uint32 buflen; - uint32 band_set; - uint32 band; - uint32 count; - char country_abbrev[1]; -} wl_country_list_t; - -#define WL_RM_TYPE_BASIC 1 -#define WL_RM_TYPE_CCA 2 -#define WL_RM_TYPE_RPI 3 - -#define WL_RM_FLAG_PARALLEL (1<<0) - -#define WL_RM_FLAG_LATE (1<<1) -#define WL_RM_FLAG_INCAPABLE (1<<2) -#define WL_RM_FLAG_REFUSED (1<<3) - -typedef struct wl_rm_req_elt { - int8 type; - int8 flags; - uint16 chanspec; - uint32 token; /* token for this measurement */ - uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ - uint32 tsf_l; /* TSF low 32-bits */ - uint32 dur; /* TUs */ -} wl_rm_req_elt_t; - -typedef struct wl_rm_req { - uint32 token; /* overall measurement set token */ - uint32 count; /* number of measurement reqests */ - wl_rm_req_elt_t req[1]; /* variable length block of requests */ -} wl_rm_req_t; -#define WL_RM_REQ_FIXED_LEN 8 - -typedef struct wl_rm_rep_elt { - int8 type; - int8 flags; - uint16 chanspec; - uint32 token; /* token for this measurement */ - uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ - uint32 tsf_l; /* TSF low 32-bits */ - uint32 dur; /* TUs */ - uint32 len; /* byte length of data block */ - uint8 data[1]; /* variable length data block */ -} wl_rm_rep_elt_t; -#define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */ - -#define WL_RPI_REP_BIN_NUM 8 -typedef struct wl_rm_rpi_rep { - uint8 rpi[WL_RPI_REP_BIN_NUM]; - int8 rpi_max[WL_RPI_REP_BIN_NUM]; -} wl_rm_rpi_rep_t; - -typedef struct wl_rm_rep { - uint32 token; /* overall measurement set token */ - uint32 len; /* length of measurement report block */ - wl_rm_rep_elt_t rep[1]; /* variable length block of reports */ -} wl_rm_rep_t; -#define WL_RM_REP_FIXED_LEN 8 - - -#define WLC_MAX_KEY_SIZE 32 /* max size of any key */ -#define WLC_MAX_IV_SIZE 16 /* max size of any IV */ -#define WLC_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ -#define WLC_MAX_DEFAULT_KEYS 4 /* # of default WEP keys */ -#define WLC_MAX_KEYS 54 /* Max # of WEP keys */ -#define WLC_WEP1_KEY_SIZE 5 /* max size of any WEP key */ -#define WLC_WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ -#define WLC_WEP128_KEY_SIZE 13 /* max size of any WEP key */ -#define WLC_WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ -#define WLC_TKIP_MIC_SIZE 8 /* size of TKIP MIC */ -#define WLC_TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ -#define WLC_TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ -#define WLC_TKIP_KEY_SIZE 32 /* size of any TKIP key */ -#define WLC_TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ -#define WLC_TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ -#define WLC_TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ -#define WLC_TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ -#define WLC_TKIP_P1_KEY_SIZE 10 /* size of TKHash Phase1 output, in bytes */ -#define WLC_TKIP_P2_KEY_SIZE 16 /* size of TKHash Phase2 output */ -#define WLC_AES_KEY_SIZE 16 /* size of AES key */ - - -typedef enum sup_auth_status { - WLC_SUP_DISCONNECTED = 0, - WLC_SUP_CONNECTING, - WLC_SUP_IDREQUIRED, - WLC_SUP_AUTHENTICATING, - WLC_SUP_AUTHENTICATED, - WLC_SUP_KEYXCHANGE, - WLC_SUP_KEYED -} sup_auth_status_t; - -/* Enumerate crypto algorithms */ -#define CRYPTO_ALGO_OFF 0 -#define CRYPTO_ALGO_WEP1 1 -#define CRYPTO_ALGO_TKIP 2 -#define CRYPTO_ALGO_WEP128 3 -#define CRYPTO_ALGO_AES_CCM 4 -#define CRYPTO_ALGO_AES_OCB_MSDU 5 -#define CRYPTO_ALGO_AES_OCB_MPDU 6 -#define CRYPTO_ALGO_NALG 7 - -#define WSEC_GEN_MIC_ERROR 0x0001 -#define WSEC_GEN_REPLAY 0x0002 - -#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */ -#define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ -#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */ -#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */ - - -typedef struct wlc_tkip_info { - uint16 phase1[WLC_TKIP_P1_KEY_SIZE/sizeof(uint16)]; /* tkhash phase1 result */ - uint8 phase2[WLC_TKIP_P2_KEY_SIZE]; /* tkhash phase2 result */ - uint32 micl; - uint32 micr; -} tkip_info_t; - -typedef struct _wsec_iv { - uint32 hi; /* upper 32 bits of IV */ - uint16 lo; /* lower 16 bits of IV */ -} wsec_iv_t; - -typedef struct wsec_key { - uint32 index; /* key index */ - uint32 len; /* key length */ - uint8 data[WLC_MAX_KEY_SIZE]; /* key data */ - tkip_info_t tkip_tx; /* tkip transmit state */ - tkip_info_t tkip_rx; /* tkip receive state */ - uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ - uint32 flags; /* misc flags */ - uint32 algo_hw; /* cache for hw register*/ - uint32 aes_mode; /* cache for hw register*/ - int iv_len; /* IV length */ - int iv_initialized; /* has IV been initialized already? */ - int icv_len; /* ICV length */ - wsec_iv_t rxiv; /* Rx IV */ - wsec_iv_t txiv; /* Tx IV */ - struct ether_addr ea; /* per station */ -} wsec_key_t; - - - -typedef struct wl_wsec_key { - uint32 index; /* key index */ - uint32 len; /* key length */ - uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */ - uint32 pad_1[18]; - uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ - uint32 flags; /* misc flags */ - uint32 pad_2[2]; - int pad_3; - int iv_initialized; /* has IV been initialized already? */ - int pad_4; - /* Rx IV */ - struct { - uint32 hi; /* upper 32 bits of IV */ - uint16 lo; /* lower 16 bits of IV */ - } rxiv; - uint32 pad_5[2]; - struct ether_addr ea; /* per station */ -} wl_wsec_key_t; - -/* For use with wlc_wep_key.flags */ -#define WSEC_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ -#define WSEC_TKIP_ERROR (1 << 2) /* Provoke deliberate error */ - -#define WSEC_MIN_PSK_LEN 8 -#define WSEC_MAX_PSK_LEN 64 - -/* Flag for key material needing passhash'ing */ -#define WSEC_PASSPHRASE (1<<0) - -/* recepticle for WLC_SET_WSEC_PMK parameter */ -typedef struct { - ushort key_len; /* octets in key material */ - ushort flags; /* key handling qualification */ - uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */ -} wsec_pmk_t; - -/* wireless security bitvec */ -#define WEP_ENABLED 1 -#define TKIP_ENABLED 2 -#define AES_ENABLED 4 -#define WSEC_SWFLAG 8 - -#define WSEC_SW(wsec) ((wsec) & WSEC_SWFLAG) -#define WSEC_HW(wsec) (!WSEC_SW(wsec)) -#define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED) -#define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED) -#define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED) -#define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED)) - - -/* wireless authentication bit vector */ -#define WPA_ENABLED 1 -#define PSK_ENABLED 2 - -#define WAUTH_WPA_ENABLED(wauth) ((wauth) & WPA_ENABLED) -#define WAUTH_PSK_ENABLED(wauth) ((wauth) & PSK_ENABLED) -#define WAUTH_ENABLED(wauth) ((wauth) & (WPA_ENABLED | PSK_ENABLED)) - -/* group/mcast cipher */ -#define WPA_MCAST_CIPHER(wsec) (((wsec) & TKIP_ENABLED) ? WPA_CIPHER_TKIP : \ - ((wsec) & AES_ENABLED) ? WPA_CIPHER_AES_CCM : \ - WPA_CIPHER_NONE) - - -typedef struct wl_led_info { - uint32 index; /* led index */ - uint32 behavior; - bool activehi; -} wl_led_info_t; - -/* - * definitions for driver messages passed from WL to NAS. - */ -/* Use this to recognize wpa and 802.1x driver messages. */ -static const uint8 wl_wpa_snap_template[] = - { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c }; - -#define WL_WPA_MSG_IFNAME_MAX 16 - -/* WPA driver message */ -typedef struct wl_wpa_header { - struct ether_header eth; - struct dot11_llc_snap_header snap; - uint8 version; - uint8 type; - /* version 2 additions */ - char ifname[WL_WPA_MSG_IFNAME_MAX]; - /* version specific data */ - /* uint8 data[1]; */ -} wl_wpa_header_t PACKED; - -/* - * definitions for 802.2 messages passed from WL to NAS. - */ -/* This seems not to be defined outside the kernel on linux. */ -#ifndef ETH_P_802_2 -#define ETH_P_802_2 4 -#endif - -#define WL_WPA_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX) - -/* WPA driver message ethertype - private between wlc and nas */ -#define WL_WPA_ETHER_TYPE 0x9999 - -/* WPA driver message current version */ -#define WL_WPA_MSG_VERSION 2 - -/* Type field values for the 802.2 driver messages for WPA. */ -#define WLC_ASSOC_MSG 1 -#define WLC_DISASSOC_MSG 2 -#define WLC_PTK_MIC_MSG 3 -#define WLC_GTK_MIC_MSG 4 - -/* Use this to recognize 802.2 driver messages. */ -static const uint8 wpa_snap_template[] = - { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c }; - - -/* 802.1x driver message */ -typedef struct wl_eapol_header { - struct ether_header eth; - struct dot11_llc_snap_header snap; - uint8 version; - uint8 reserved; - char ifname[WL_WPA_MSG_IFNAME_MAX]; - /* version specific data */ - /* uint8 802_1x_msg[1]; */ -} wl_eapol_header_t PACKED; - -#define WL_EAPOL_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX) - -/* 802.1x driver message ethertype - private between wlc and nas */ -#define WL_EAPOL_ETHER_TYPE 0x999A - -/* 802.1x driver message current version */ -#define WL_EAPOL_MSG_VERSION 1 - -/* srom read/write struct passed through ioctl */ -typedef struct { - uint byteoff; /* byte offset */ - uint nbytes; /* number of bytes */ - uint16 buf[1]; -} srom_rw_t; - -/* R_REG and W_REG struct passed through ioctl */ -typedef struct { - uint32 byteoff; /* byte offset of the field in d11regs_t */ - uint32 val; /* read/write value of the field */ - uint32 size; /* sizeof the field */ -} rw_reg_t; - -/* Structure used by GET/SET_ATTEN ioctls */ -typedef struct { - uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */ - uint16 bb; /* Baseband attenuation */ - uint16 radio; /* Radio attenuation */ - uint16 txctl1; /* Radio TX_CTL1 value */ -} atten_t; - -/* Used to get specific STA parameters */ -typedef struct { - uint32 val; - struct ether_addr ea; -} scb_val_t; - -/* callback registration data types */ - -typedef struct _mac_event_params { - uint msg; - struct ether_addr *addr; - uint result; - uint status; - uint auth_type; -} mac_event_params_t; - -typedef struct _mic_error_params { - struct ether_addr *ea; - bool group; - bool flush_txq; -} mic_error_params_t; - -typedef enum _wl_callback { - WL_MAC_EVENT_CALLBACK = 0, - WL_LINK_UP_CALLBACK, - WL_LINK_DOWN_CALLBACK, - WL_MIC_ERROR_CALLBACK, - WL_LAST_CALLBACK -} wl_callback_t; - -typedef struct _callback { - void (*fn)(void *, void *); - void *context; -} callback_t; - -typedef struct _scan_callback { - void (*fn)(void *); - void *context; -} scan_callback_t; - -/* used to register an arbitrary callback via the IOCTL interface */ -typedef struct _set_callback { - int index; - callback_t callback; -} set_callback_t; - - - -/* Event data type */ -typedef struct { - uint msg; /* Message (see below) */ - struct ether_addr *addr; /* Station address (if applicable) */ - uint status; /* Status code (see below) */ - uint reason; /* Reason code (if applicable) */ - uint auth_type; /* WLC_E_AUTH */ - bool link; /* WLC_E_LINK */ - bool group; /* WLC_E_MIC_ERROR */ - bool flush_txq; /* WLC_E_MIC_ERROR */ -} wlc_event_t; - -typedef struct { - uint16 ver; /* version of this struct */ - uint16 cap; /* sta's advertized capabilities */ - uint32 flags; /* flags defined below */ - uint32 idle; /* time since data pkt rx'd from sta */ - struct ether_addr ea; /* Station address */ - wl_rateset_t rateset; /* rateset in use */ -} sta_info_t; - -#define WL_STA_INFO_LEN 300 -#define WL_STA_VER 1 - -/* flags fields */ -#define WL_STA_BRCM 0x01 -#define WL_STA_WME 0x02 -#define WL_STA_ABCAP 0x04 -#define WL_STA_AUTHE 0x08 -#define WL_STA_ASSOC 0x10 -#define WL_STA_AUTHO 0x20 - -/* Event messages */ -#define WLC_E_SET_SSID 1 -#define WLC_E_JOIN 2 -#define WLC_E_START 3 -#define WLC_E_AUTH 4 -#define WLC_E_AUTH_IND 5 -#define WLC_E_DEAUTH 6 -#define WLC_E_DEAUTH_IND 7 -#define WLC_E_ASSOC 8 -#define WLC_E_ASSOC_IND 9 -#define WLC_E_REASSOC 10 -#define WLC_E_REASSOC_IND 11 -#define WLC_E_DISASSOC 12 -#define WLC_E_DISASSOC_IND 13 -#define WLC_E_QUIET_START 14 /* 802.11h Quiet period started */ -#define WLC_E_QUIET_END 15 /* 802.11h Quiet period ended */ -#define WLC_E_GOT_BEACONS 16 -#define WLC_E_LINK 17 /* Link indication */ -#define WLC_E_MIC_ERROR 18 /* TKIP MIC error occurred */ -#define WLC_E_NDIS_LINK 19 /* NDIS style link indication */ -#define WLC_E_ROAM 20 -#define WLC_E_LAST 21 - -/* Event status codes */ -#define WLC_E_STATUS_SUCCESS 0 -#define WLC_E_STATUS_FAIL 1 -#define WLC_E_STATUS_TIMEOUT 2 -#define WLC_E_STATUS_NO_NETWORKS 3 -#define WLC_E_STATUS_ABORT 4 - -typedef struct wlc_event_cb { - uint msg; /* Event message or 0 for all */ - void (*fn)(void *, wlc_event_t *); /* Callback function */ - void *context; /* Passed to callback function */ - struct wlc_event_cb *next; /* Next in the chain */ -} wlc_event_cb_t; - -/* - * Country locale determines which channels are available to us. - */ -typedef enum _wlc_locale { - WLC_WW = 0, /* Worldwide */ - WLC_THA, /* Thailand */ - WLC_ISR, /* Israel */ - WLC_JDN, /* Jordan */ - WLC_PRC, /* China */ - WLC_JPN, /* Japan */ - WLC_FCC, /* USA */ - WLC_EUR, /* Europe */ - WLC_USL, /* US Low Band only */ - WLC_JPH, /* Japan High Band only */ - WLC_ALL, /* All the channels in this band */ - WLC_11D, /* Represents locale recieved by 11d beacons */ - WLC_LAST_LOCALE, - WLC_UNDEFINED_LOCALE = 0xf -} wlc_locale_t; - -/* channel encoding */ -typedef struct channel_info { - int hw_channel; - int target_channel; - int scan_channel; -} channel_info_t; - -/* For ioctls that take a list of MAC addresses */ -struct maclist { - uint count; /* number of MAC addresses */ - struct ether_addr ea[1]; /* variable length array of MAC addresses */ -}; - -/* get pkt count struct passed through ioctl */ -typedef struct get_pktcnt { - uint rx_good_pkt; - uint rx_bad_pkt; - uint tx_good_pkt; - uint tx_bad_pkt; -} get_pktcnt_t; - -/* Linux network driver ioctl encoding */ -typedef struct wl_ioctl { - uint cmd; /* common ioctl definition */ - void *buf; /* pointer to user buffer */ - uint len; /* length of user buffer */ - bool set; /* get or set request (optional) */ - uint used; /* bytes read or written (optional) */ - uint needed; /* bytes needed (optional) */ -} wl_ioctl_t; - -/* - * Structure for passing hardware and software - * revision info up from the driver. - */ -typedef struct wlc_rev_info { - uint vendorid; /* PCI vendor id */ - uint deviceid; /* device id of chip */ - uint radiorev; /* radio revision */ - uint chiprev; /* chip revision */ - uint corerev; /* core revision */ - uint boardid; /* board identifier (usu. PCI sub-device id) */ - uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */ - uint boardrev; /* board revision */ - uint driverrev; /* driver version */ - uint ucoderev; /* microcode version */ - uint bus; /* bus type */ - uint chipnum; /* chip number */ -} wlc_rev_info_t; - -/* check this magic number */ -#define WLC_IOCTL_MAGIC 0x14e46c77 - -/* bump this number if you change the ioctl interface */ -#define WLC_IOCTL_VERSION 1 - -/* maximum length buffer required */ -#define WLC_IOCTL_MAXLEN 8192 - -/* maximum length buffer required */ -#define WLC_IOCTL_SMLEN 256 - -/* common ioctl definitions */ -#define WLC_GET_MAGIC 0 -#define WLC_GET_VERSION 1 -#define WLC_UP 2 -#define WLC_DOWN 3 -#define WLC_GET_LOOP 4 -#define WLC_SET_LOOP 5 -#define WLC_DUMP 6 -#define WLC_GET_MSGLEVEL 7 -#define WLC_SET_MSGLEVEL 8 -#define WLC_GET_PROMISC 9 -#define WLC_SET_PROMISC 10 -#define WLC_OBSOLETE 11 -#define WLC_GET_RATE 12 -#define WLC_SET_RATE 13 -#define WLC_GET_INSTANCE 14 -#define WLC_GET_FRAG 15 -#define WLC_SET_FRAG 16 -#define WLC_GET_RTS 17 -#define WLC_SET_RTS 18 -#define WLC_GET_INFRA 19 -#define WLC_SET_INFRA 20 -#define WLC_GET_AUTH 21 -#define WLC_SET_AUTH 22 -#define WLC_GET_BSSID 23 -#define WLC_SET_BSSID 24 -#define WLC_GET_SSID 25 -#define WLC_SET_SSID 26 -#define WLC_RESTART 27 -#define WLC_DUMP_SCB 28 -#define WLC_GET_CHANNEL 29 -#define WLC_SET_CHANNEL 30 -#define WLC_GET_SRL 31 -#define WLC_SET_SRL 32 -#define WLC_GET_LRL 33 -#define WLC_SET_LRL 34 -#define WLC_GET_PLCPHDR 35 -#define WLC_SET_PLCPHDR 36 -#define WLC_GET_RADIO 37 -#define WLC_SET_RADIO 38 -#define WLC_GET_PHYTYPE 39 -#define WLC_DUMP_RATE 40 -#define WLC_SET_RATE_PARAMS 41 -#define WLC_GET_WEP 42 -#define WLC_SET_WEP 43 -#define WLC_GET_KEY 44 -#define WLC_SET_KEY 45 -#define WLC_GET_REGULATORY 46 -#define WLC_SET_REGULATORY 47 -#define WLC_GET_PASSIVE 48 /* added by nbd */ -#define WLC_SET_PASSIVE 49 /* added by nbd */ -#define WLC_SCAN 50 -#define WLC_SCAN_RESULTS 51 -#define WLC_DISASSOC 52 -#define WLC_REASSOC 53 -#define WLC_GET_ROAM_TRIGGER 54 -#define WLC_SET_ROAM_TRIGGER 55 -#define WLC_GET_ROAM_DELTA 56 -#define WLC_SET_ROAM_DELTA 57 -#define WLC_GET_ROAM_SCAN_PERIOD 58 -#define WLC_SET_ROAM_SCAN_PERIOD 59 -#define WLC_EVM 60 -#define WLC_GET_TXANT 61 -#define WLC_SET_TXANT 62 -#define WLC_GET_ANTDIV 63 -#define WLC_SET_ANTDIV 64 -#define WLC_GET_TXPWR 65 -#define WLC_SET_TXPWR 66 -#define WLC_GET_CLOSED 67 -#define WLC_SET_CLOSED 68 -#define WLC_GET_MACLIST 69 -#define WLC_SET_MACLIST 70 -#define WLC_GET_RATESET 71 -#define WLC_SET_RATESET 72 -#define WLC_GET_LOCALE 73 -#define WLC_SET_LOCALE 74 -#define WLC_GET_BCNPRD 75 -#define WLC_SET_BCNPRD 76 -#define WLC_GET_DTIMPRD 77 -#define WLC_SET_DTIMPRD 78 -#define WLC_GET_SROM 79 -#define WLC_SET_SROM 80 -#define WLC_GET_WEP_RESTRICT 81 -#define WLC_SET_WEP_RESTRICT 82 -#define WLC_GET_COUNTRY 83 -#define WLC_SET_COUNTRY 84 -#define WLC_GET_PM 85 -#define WLC_SET_PM 86 -#define WLC_GET_WAKE 87 -#define WLC_SET_WAKE 88 -#define WLC_GET_D11CNTS 89 -#define WLC_GET_FORCELINK 90 /* ndis only */ -#define WLC_SET_FORCELINK 91 /* ndis only */ -#define WLC_FREQ_ACCURACY 92 -#define WLC_CARRIER_SUPPRESS 93 -#define WLC_GET_PHYREG 94 -#define WLC_SET_PHYREG 95 -#define WLC_GET_RADIOREG 96 -#define WLC_SET_RADIOREG 97 -#define WLC_GET_REVINFO 98 -#define WLC_GET_UCANTDIV 99 -#define WLC_SET_UCANTDIV 100 -#define WLC_R_REG 101 -#define WLC_W_REG 102 -#define WLC_DIAG_LOOPBACK 103 -#define WLC_RESET_D11CNTS 104 -#define WLC_GET_MACMODE 105 -#define WLC_SET_MACMODE 106 -#define WLC_GET_MONITOR 107 /* added by nbd */ -#define WLC_SET_MONITOR 108 /* added by nbd */ -#define WLC_GET_GMODE 109 -#define WLC_SET_GMODE 110 -#define WLC_GET_LEGACY_ERP 111 -#define WLC_SET_LEGACY_ERP 112 -#define WLC_GET_RX_ANT 113 -#define WLC_GET_CURR_RATESET 114 /* current rateset */ -#define WLC_GET_SCANSUPPRESS 115 -#define WLC_SET_SCANSUPPRESS 116 -#define WLC_GET_AP 117 -#define WLC_SET_AP 118 -#define WLC_GET_EAP_RESTRICT 119 -#define WLC_SET_EAP_RESTRICT 120 -#define WLC_SCB_AUTHORIZE 121 -#define WLC_SCB_DEAUTHORIZE 122 -#define WLC_GET_WDSLIST 123 -#define WLC_SET_WDSLIST 124 -#define WLC_GET_ATIM 125 -#define WLC_SET_ATIM 126 -#define WLC_GET_RSSI 127 -#define WLC_GET_PHYANTDIV 128 -#define WLC_SET_PHYANTDIV 129 -#define WLC_AP_RX_ONLY 130 -#define WLC_GET_TX_PATH_PWR 131 -#define WLC_SET_TX_PATH_PWR 132 -#define WLC_GET_WSEC 133 -#define WLC_SET_WSEC 134 -#define WLC_GET_PHY_NOISE 135 -#define WLC_GET_BSS_INFO 136 -#define WLC_GET_PKTCNTS 137 -#define WLC_GET_LAZYWDS 138 -#define WLC_SET_LAZYWDS 139 -#define WLC_GET_BANDLIST 140 -#define WLC_GET_BAND 141 -#define WLC_SET_BAND 142 -#define WLC_SCB_DEAUTHENTICATE 143 -#define WLC_GET_SHORTSLOT 144 -#define WLC_GET_SHORTSLOT_OVERRIDE 145 -#define WLC_SET_SHORTSLOT_OVERRIDE 146 -#define WLC_GET_SHORTSLOT_RESTRICT 147 -#define WLC_SET_SHORTSLOT_RESTRICT 148 -#define WLC_GET_GMODE_PROTECTION 149 -#define WLC_GET_GMODE_PROTECTION_OVERRIDE 150 -#define WLC_SET_GMODE_PROTECTION_OVERRIDE 151 -#define WLC_UPGRADE 152 -#define WLC_GET_MRATE 153 -#define WLC_SET_MRATE 154 -#define WLC_GET_IGNORE_BCNS 155 -#define WLC_SET_IGNORE_BCNS 156 -#define WLC_GET_SCB_TIMEOUT 157 -#define WLC_SET_SCB_TIMEOUT 158 -#define WLC_GET_ASSOCLIST 159 -#define WLC_GET_CLK 160 -#define WLC_SET_CLK 161 -#define WLC_GET_UP 162 -#define WLC_OUT 163 -#define WLC_GET_WPA_AUTH 164 -#define WLC_SET_WPA_AUTH 165 -#define WLC_GET_UCFLAGS 166 -#define WLC_SET_UCFLAGS 167 -#define WLC_GET_PWRIDX 168 -#define WLC_SET_PWRIDX 169 -#define WLC_GET_TSSI 170 -#define WLC_GET_SUP_RATESET_OVERRIDE 171 -#define WLC_SET_SUP_RATESET_OVERRIDE 172 -#define WLC_SET_FAST_TIMER 173 -#define WLC_GET_FAST_TIMER 174 -#define WLC_SET_SLOW_TIMER 175 -#define WLC_GET_SLOW_TIMER 176 -#define WLC_DUMP_PHYREGS 177 -#define WLC_GET_GMODE_PROTECTION_CONTROL 178 -#define WLC_SET_GMODE_PROTECTION_CONTROL 179 -#define WLC_GET_PHYLIST 180 -#define WLC_ENCRYPT_STRENGTH 181 /* ndis only */ -#define WLC_DECRYPT_STATUS 182 /* ndis only */ -#define WLC_GET_KEY_SEQ 183 -#define WLC_GET_SCAN_CHANNEL_TIME 184 -#define WLC_SET_SCAN_CHANNEL_TIME 185 -#define WLC_GET_SCAN_UNASSOC_TIME 186 -#define WLC_SET_SCAN_UNASSOC_TIME 187 -#define WLC_GET_SCAN_HOME_TIME 188 -#define WLC_SET_SCAN_HOME_TIME 189 -#define WLC_GET_SCAN_PASSES 190 -#define WLC_SET_SCAN_PASSES 191 -#define WLC_GET_PRB_RESP_TIMEOUT 192 -#define WLC_SET_PRB_RESP_TIMEOUT 193 -#define WLC_GET_ATTEN 194 -#define WLC_SET_ATTEN 195 -#define WLC_GET_SHMEM 196 /* diag */ -#define WLC_SET_SHMEM 197 /* diag */ -#define WLC_GET_GMODE_PROTECTION_CTS 198 -#define WLC_SET_GMODE_PROTECTION_CTS 199 -#define WLC_SET_TKIP_MIC_FLAG 200 -#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201 -#define WLC_TKIP_COUNTERMEASURES 202 -#define WLC_GET_PIOMODE 203 -#define WLC_SET_PIOMODE 204 -#define WLC_SET_LED 209 -#define WLC_GET_LED 210 -#define WLC_GET_INTERFERENCE_MODE 211 -#define WLC_SET_INTERFERENCE_MODE 212 -#define WLC_GET_CHANNEL_QA 213 -#define WLC_START_CHANNEL_QA 214 -#define WLC_GET_CHANNEL_SEL 215 -#define WLC_START_CHANNEL_SEL 216 -#define WLC_GET_VALID_CHANNELS 217 -#define WLC_GET_FAKEFRAG 218 -#define WLC_SET_FAKEFRAG 219 -#define WLC_GET_PWROUT_PERCENTAGE 220 -#define WLC_SET_PWROUT_PERCENTAGE 221 -#define WLC_SET_BAD_FRAME_PREEMPT 222 -#define WLC_GET_BAD_FRAME_PREEMPT 223 -#define WLC_SET_LEAP_LIST 224 -#define WLC_GET_LEAP_LIST 225 -#define WLC_GET_CWMIN 226 -#define WLC_SET_CWMIN 227 -#define WLC_GET_CWMAX 228 -#define WLC_SET_CWMAX 229 -#define WLC_GET_WET 230 -#define WLC_SET_WET 231 -#define WLC_GET_KEY_PRIMARY 235 -#define WLC_SET_KEY_PRIMARY 236 -#define WLC_SCAN_WITH_CALLBACK 240 -#define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */ -#define WLC_SET_CS_SCAN_TIMER 248 -#define WLC_GET_CS_SCAN_TIMER 249 -#define WLC_CURRENT_PWR 256 -#define WLC_GET_CHANNELS_IN_COUNTRY 260 -#define WLC_GET_COUNTRY_LIST 261 -#define WLC_GET_VAR 262 /* get value of named variable */ -#define WLC_SET_VAR 263 /* set named variable to value */ -#define WLC_NVRAM_GET 264 -#define WLC_NVRAM_SET 265 -#define WLC_SET_WSEC_PMK 268 -#define WLC_GET_AUTH_MODE 269 -#define WLC_SET_AUTH_MODE 270 -#define WLC_LAST 273 /* do not change - use get_var/set_var */ - -/* - * Minor kludge alert: - * Duplicate a few definitions that irelay requires from epiioctl.h here - * so caller doesn't have to include this file and epiioctl.h . - * If this grows any more, it would be time to move these irelay-specific - * definitions out of the epiioctl.h and into a separate driver common file. - */ -#ifndef EPICTRL_COOKIE -#define EPICTRL_COOKIE 0xABADCEDE -#endif - -/* vx wlc ioctl's offset */ -#define CMN_IOCTL_OFF 0x180 - -/* - * custom OID support - * - * 0xFF - implementation specific OID - * 0xE4 - first byte of Broadcom PCI vendor ID - * 0x14 - second byte of Broadcom PCI vendor ID - * 0xXX - the custom OID number - */ - -/* begin 0x1f values beyond the start of the ET driver range. */ -#define WL_OID_BASE 0xFFE41420 - -/* NDIS overrides */ -#define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE) -#define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK) -#define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK) -#define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH) -#define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS) - -#define WL_DECRYPT_STATUS_SUCCESS 1 -#define WL_DECRYPT_STATUS_FAILURE 2 -#define WL_DECRYPT_STATUS_UNKNOWN 3 - -/* allows user-mode app to poll the status of USB image upgrade */ -#define WLC_UPGRADE_SUCCESS 0 -#define WLC_UPGRADE_PENDING 1 - -/* Bit masks for radio disabled status - returned by WL_GET_RADIO */ -#define WL_RADIO_SW_DISABLE (1<<0) -#define WL_RADIO_HW_DISABLE (1<<1) - -/* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */ -#define WL_TXPWR_OVERRIDE (1<<31) - - -/* Bus types */ -#define WL_SB_BUS 0 /* Silicon Backplane */ -#define WL_PCI_BUS 1 /* PCI target */ -#define WL_PCMCIA_BUS 2 /* PCMCIA target */ - -/* band types */ -#define WLC_BAND_AUTO 0 /* auto-select */ -#define WLC_BAND_A 1 /* "a" band (5 Ghz) */ -#define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */ - -/* MAC list modes */ -#define WLC_MACMODE_DISABLED 0 /* MAC list disabled */ -#define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */ -#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */ - - -/* 54g modes (basic bits may still be overridden) */ -#define GMODE_LEGACY_B 0 /* Rateset: 1b, 2b, 5.5, 11 */ - /* Preamble: Long */ - /* Shortslot: Off */ -#define GMODE_AUTO 1 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ - /* Extended Rateset: 6, 9, 12, 48 */ - /* Preamble: Long */ - /* Shortslot: Auto */ -#define GMODE_ONLY 2 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 */ - /* Extended Rateset: 6b, 9, 12b, 48 */ - /* Preamble: Short required */ - /* Shortslot: Auto */ -#define GMODE_B_DEFERRED 3 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ - /* Extended Rateset: 6, 9, 12, 48 */ - /* Preamble: Long */ - /* Shortslot: On */ -#define GMODE_PERFORMANCE 4 /* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 */ - /* Preamble: Short required */ - /* Shortslot: On and required */ -#define GMODE_LRS 5 /* Rateset: 1b, 2b, 5.5b, 11b */ - /* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 */ - /* Preamble: Long */ - /* Shortslot: Auto */ -#define GMODE_MAX 6 - - -/* values for PLCPHdr_override */ -#define WLC_PLCP_AUTO -1 -#define WLC_PLCP_SHORT 0 -#define WLC_PLCP_LONG 1 - -/* values for g_protection_override */ -#define WLC_G_PROTECTION_AUTO -1 -#define WLC_G_PROTECTION_OFF 0 -#define WLC_G_PROTECTION_ON 1 - -/* values for g_protection_control */ -#define WLC_G_PROTECTION_CTL_OFF 0 -#define WLC_G_PROTECTION_CTL_LOCAL 1 -#define WLC_G_PROTECTION_CTL_OVERLAP 2 - -/* Values for PM */ -#define PM_OFF 0 -#define PM_MAX 1 -#define PM_FAST 2 - -/* interference mitigation options */ -#define INTERFERE_NONE 0 /* off */ -#define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */ -#define WLAN_MANUAL 2 /* ACI: no auto detection */ -#define WLAN_AUTO 3 /* ACI: auto - detact */ - -/* Message levels */ -#define WL_ERROR_VAL 0x0001 -#define WL_TRACE_VAL 0x0002 -#define WL_PRHDRS_VAL 0x0004 -#define WL_PRPKT_VAL 0x0008 -#define WL_INFORM_VAL 0x0010 -#define WL_TMP_VAL 0x0020 -#define WL_OID_VAL 0x0040 -#define WL_RATE_VAL 0x0080 -#define WL_ASSOC_VAL 0x0100 -#define WL_PRUSR_VAL 0x0200 -#define WL_PS_VAL 0x0400 -#define WL_TXPWR_VAL 0x0800 -#define WL_GMODE_VAL 0x1000 -#define WL_DUAL_VAL 0x2000 -#define WL_WSEC_VAL 0x4000 -#define WL_WSEC_DUMP_VAL 0x8000 -#define WL_LOG_VAL 0x10000 -#define WL_NRSSI_VAL 0x20000 -#define WL_LOFT_VAL 0x40000 -#define WL_REGULATORY_VAL 0x80000 -#define WL_ACI_VAL 0x100000 - - -/* 802.11h enforcement levels */ -#define SPECT_MNGMT_OFF 0 /* 11h disabled */ -#define SPECT_MNGMT_LOOSE 1 /* Allow scan lists to contain non-11h AP */ - /* when 11h is enabled */ -#define SPECT_MNGMT_STRICT 2 /* Prine out non-11h APs from scan list */ - - - -/* max # of leds supported by GPIO (gpio pin# == led index#) */ -#define WL_LED_NUMGPIO 16 /* gpio 0-15 */ - -/* led per-pin behaviors */ -#define WL_LED_OFF 0 /* always off */ -#define WL_LED_ON 1 /* always on */ -#define WL_LED_ACTIVITY 2 /* activity */ -#define WL_LED_RADIO 3 /* radio enabled */ -#define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */ -#define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */ -#define WL_LED_BGMODE 6 /* on if gmode, off if bmode */ -#define WL_LED_WI1 7 -#define WL_LED_WI2 8 -#define WL_LED_WI3 9 -#define WL_LED_ASSOC 10 /* associated state indicator */ -#define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */ -#define WL_LED_NUMBEHAVIOR 12 - -/* led behavior numeric value format */ -#define WL_LED_BEH_MASK 0x7f /* behavior mask */ -#define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */ - - -/* maximum channels */ -#define WL_NUMCHANNELS 64 /* max # of channels in the band */ - -/* rate check */ -#define WL_RATE_OFDM(r) (((r) & 0x7f) == 12 || ((r) & 0x7f) == 18 || \ - ((r) & 0x7f) == 24 || ((r) & 0x7f) == 36 || \ - ((r) & 0x7f) == 48 || ((r) & 0x7f) == 72 || \ - ((r) & 0x7f) == 96 || ((r) & 0x7f) == 108) - -/* WDS link local endpoint WPA role */ -#define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */ -#define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */ -#define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */ - -/* afterburner_override */ -#define ABO_AUTO -1 /* auto - no override */ -#define ABO_OFF 0 /* force afterburner off */ -#define ABO_ON 1 /* force afterburner on */ - -#define GMODE_AFTERBURNER 6 - -#undef PACKED - -#endif /* _wlioctl_h_ */ diff --git a/openwrt/target/linux/package/base-files/include/wlutils.h b/openwrt/target/linux/package/base-files/include/wlutils.h deleted file mode 100644 index 07e2536ca3c..00000000000 --- a/openwrt/target/linux/package/base-files/include/wlutils.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Broadcom wireless network adapter utility functions - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _wlutils_h_ -#define _wlutils_h_ - -#include <typedefs.h> -#include <wlioctl.h> - -/* - * Pass a wlioctl request to the specified interface. - * @param name interface name - * @param cmd WLC_GET_MAGIC <= cmd < WLC_LAST - * @param buf buffer for passing in and/or receiving data - * @param len length of buf - * @return >= 0 if successful or < 0 otherwise - */ -extern int wl_ioctl(char *name, int cmd, void *buf, int len); - -/* - * Get the MAC (hardware) address of the specified interface. - * @param name interface name - * @param hwaddr 6-byte buffer for receiving address - * @return >= 0 if successful or < 0 otherwise - */ -extern int wl_hwaddr(char *name, unsigned char *hwaddr); - -/* - * Probe the specified interface. - * @param name interface name - * @return >= 0 if a Broadcom wireless device or < 0 otherwise - */ -extern int wl_probe(char *name); - -/* - * Set/Get named variable. - * @param name interface name - * @param var variable name - * @param val variable value/buffer - * @param len variable value/buffer length - * @return success == 0, failure != 0 - */ -extern int wl_set_val(char *name, char *var, void *val, int len); -extern int wl_get_val(char *name, char *var, void *val, int len); -extern int wl_set_int(char *name, char *var, int val); -extern int wl_get_int(char *name, char *var, int *val); - -#endif /* _wlutils_h_ */ diff --git a/openwrt/target/linux/package/base-files/ipkg/base-files-arch.control b/openwrt/target/linux/package/base-files/ipkg/base-files-arch.control deleted file mode 100644 index f4a65095b91..00000000000 --- a/openwrt/target/linux/package/base-files/ipkg/base-files-arch.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: base-files-arch -Priority: optional -Section: sys -Description: Board/architecture specific files From 61c868f34fa3efd1794579b986d130fe4ce4c972 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 12:38:39 +0000 Subject: [PATCH 100/757] disable target/linux/package SVN-Revision: 3856 --- openwrt/target/Makefile | 3 --- openwrt/target/linux/Makefile | 2 -- openwrt/target/linux/kernel.mk | 24 ++---------------------- openwrt/target/linux/rules.mk | 9 --------- 4 files changed, 2 insertions(+), 36 deletions(-) diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index b039214860e..58fc5eb874e 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -16,9 +16,6 @@ clean: linux-clean utils-clean lzma-clean image_clean image_clean: rm -f $(BIN_DIR)/openwrt-* -linux/package/%: - $(MAKE) -C $(TOPDIR)/target/linux $(patsubst linux/%,%,$@) - %-clean: $(MAKE) -C $(patsubst %-clean,%,$@) clean %-prepare: diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index bea43514a7d..46b162c7e6f 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -38,8 +38,6 @@ compile: $(1)/$(2)-compile rebuild: $(1)/$(2)-rebuild $(BIN_DIR)/$(IB_NAME).tar.bz2 install: $(1)/$(2)-image install-ib: $(1)/$(2)-install-ib -package/%: - $(MAKE) -C $(2)-$(1) BOARD="$(2)" $$@ endif .PHONY: $(1)/$(2)-clean $(1)/$(2)-prepare $(1)/$(2)-compile $(1)/$(2)-rebuild $(1)/$(2)-install $(1)/$(2)-image $(1)/$(2)-install-ib diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index 371ea3366d4..e710d7d9c91 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -40,7 +40,7 @@ $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched touch $@ endif -$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile +$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile FORCE $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux @@ -56,22 +56,8 @@ $(LINUX_DIR)/.modules_done: $(STAMP_DIR)/.linux-compile: @$(MAKE) $(LINUX_DIR)/.modules_done $(TARGETS) $(KERNEL_IPKG) ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux - $(MAKE) -C $(TOPDIR)/target/linux/package \ - $(KPKG_MAKEOPTS) \ - compile touch $@ -.PHONY: pkg-install -pkg-install: - @mkdir -p $(TARGET_MODULES_DIR) - @rm -rf $(LINUX_BUILD_DIR)/root* - @cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/ - echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf - $(MAKE) -C $(TOPDIR)/target/linux/package \ - $(KPKG_MAKEOPTS) \ - install - [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) - $(KERNEL_IPKG): rm -rf $(KERNEL_IDIR) mkdir -p $(KERNEL_IDIR)/etc @@ -93,9 +79,7 @@ prepare: $(BUILD_DIR)/kernel.mk compile: prepare $(STAMP_DIR)/.linux-compile -install: compile - $(MAKE) $(KPKG_MAKEOPTS) pkg-install - $(MAKE) $(KPKG_MAKEOPTS) $(LINUX_KERNEL) +install: compile $(LINUX_KERNEL) mostlyclean: rm -f $(STAMP_DIR)/.linux-compile @@ -116,7 +100,3 @@ clean: rm -rf $(LINUX_BUILD_DIR) rm -f $(TARGETS) -package/%: - $(MAKE) -C $(TOPDIR)/target/linux/package \ - $(KPKG_MAKEOPTS) \ - $(patsubst package/%,%,$@) diff --git a/openwrt/target/linux/rules.mk b/openwrt/target/linux/rules.mk index da32ed8b04a..092b81b4149 100644 --- a/openwrt/target/linux/rules.mk +++ b/openwrt/target/linux/rules.mk @@ -23,15 +23,6 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/armeb/arm/' \ ) -KPKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \ - BOARD="$(BOARD)" \ - KERNEL="$(KERNEL)" \ - TARGET_DIR="$(LINUX_TARGET_DIR)" \ - LINUX_BUILD_DIR="$(LINUX_BUILD_DIR)" \ - LINUX_DIR="$(LINUX_DIR)" \ - LINUX_VERSION="$(LINUX_VERSION)" \ - LINUX_RELEASE="$(LINUX_RELEASE)" - KMOD_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR) TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) From 579b222d5e4911e2028981d4a9b20d41b693d1d6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 13:00:11 +0000 Subject: [PATCH 101/757] add missing BuildPackage lines, convert install-dev: to Build/InstallDev SVN-Revision: 3857 --- openwrt/package/iproute2/Makefile | 5 ++--- openwrt/package/iptables/Makefile | 34 +++++++++++++++---------------- openwrt/package/mtd/Makefile | 2 ++ openwrt/package/nvram/Makefile | 11 +++++++--- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index 11336948f47..1fa638d39d7 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -53,6 +53,5 @@ define Package/tc/install install -m0755 $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/ endef -# $(eval $(call BuildPackage,iproute2)) -# $(eval $(call BuildPackage,ip)) -# $(eval $(call BuildPackage,tc)) +$(eval $(call BuildPackage,ip)) +$(eval $(call BuildPackage,tc)) diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index ae2adcfa083..4c547be998d 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -162,6 +162,22 @@ define Build/Compile DESTDIR="$(PKG_INSTALL_DIR)" \ all install install-devel endef + + +define Build/InstallDev + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \ + KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ + DESTDIR="$(STAGING_DIR)" \ + install install-devel +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/libipq.h + rm -rf $(STAGING_DIR)/usr/lib/libipq.a +endef + define Package/iptables/install install -d -m0755 $(1)/etc/config @@ -223,21 +239,3 @@ $(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m))) $(eval $(call BuildPlugin,iptables-mod-nat,$(IPT_NAT-m))) $(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m))) $(eval $(call BuildPackage,ip6tables)) - - -$(STAGING_DIR)/usr/lib/libipq.a: $(PKG_BUILD_DIR)/.built - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \ - KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ - DESTDIR="$(STAGING_DIR)" \ - install install-devel - -install-dev: $(STAGING_DIR)/usr/lib/libipq.a -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/libipq.h - rm -rf $(STAGING_DIR)/usr/lib/libipq.a - -compile-targets: install-dev -clean-targets: uninstall-dev - diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index 0d684b8f492..fdb43eee15d 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -26,3 +26,5 @@ define Package/mtd/install install -d -m0755 $(1)/sbin install -m0755 $(PKG_BUILD_DIR)/mtd $(1)/sbin endef + +$(eval $(call BuildPackage,mtd)) diff --git a/openwrt/package/nvram/Makefile b/openwrt/package/nvram/Makefile index 9cc6b9997ab..5900f6f05b1 100644 --- a/openwrt/package/nvram/Makefile +++ b/openwrt/package/nvram/Makefile @@ -28,9 +28,14 @@ define Package/nvram/install install -m0755 $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin endef -compile-targets: install-dev -install-dev: $(PKG_BUILD_DIR)/.built +define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/lib $(CP) $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib - +endef +define Build/UninstallDev + rm -f $(STAGING_DIR)/usr/lib/libshared*.so \ + $(STAGING_DIR)/usr/lib/libnvram*.so +endef + +$(eval $(call BuildPackage,nvram)) From fe7805070989f6b5a6888a1f09cffeb48aeab2b3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 13:27:11 +0000 Subject: [PATCH 102/757] cleanup; change base-files build directory SVN-Revision: 3858 --- openwrt/package/base-files/Makefile | 22 ++++++++++------------ openwrt/package/rules.mk | 5 +++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 536857657f4..485ebddc3b5 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -2,6 +2,16 @@ include $(TOPDIR)/rules.mk +ifneq ($(DUMP),1) +include $(BUILD_DIR)/kernel.mk +include $(TOPDIR)/target/linux/rules.mk +TARGET:=-$(BOARD)-$(KERNEL) +BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) + +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +endif + PKG_NAME:=base-files PKG_RELEASE:=8 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files @@ -13,15 +23,6 @@ endif include $(TOPDIR)/package/rules.mk -ifneq ($(DUMP),1) -include $(BUILD_DIR)/kernel.mk -include $(TOPDIR)/target/linux/rules.mk -TARGET:=-$(BOARD)-$(KERNEL) - -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -endif - CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files define Package/base-files$(TARGET) @@ -99,9 +100,6 @@ $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) ln -sf /proc/mounts $(1)/etc/mtab rm -f $(1)/var ln -sf /tmp $(1)/var - -find $(1) -type d -name CVS | xargs rm -rf - -find $(1) -type d -name .svn | xargs rm -rf - -find $(1) -name '.#*' | xargs rm -f mkdir -p $(1)/etc endef diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 50f03effae5..26b41969d9d 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -154,8 +154,9 @@ define BuildPackage $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(call Package/$(1)/install,$$(IDIR_$(1))) mkdir -p $(PACKAGE_DIR) - find $$(IDIR_$(1)) -name CVS | xargs rm -rf - find $$(IDIR_$(1)) -name .svn | xargs rm -rf + -find $$(IDIR_$(1)) -name CVS | xargs rm -rf + -find $$(IDIR_$(1)) -name .svn | xargs rm -rf + -find $$(IDIR_$(1)) -name '.#*' | xargs rm -f $(RSTRIP) $$(IDIR_$(1)) $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) From 0f0e7352b544482fa3c19f6881f7286ef0a46fef Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 14:29:33 +0000 Subject: [PATCH 103/757] don't try to strip kernel modules SVN-Revision: 3859 --- openwrt/scripts/rstrip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/scripts/rstrip.sh b/openwrt/scripts/rstrip.sh index d9d3ad21b63..023ae4e54fd 100755 --- a/openwrt/scripts/rstrip.sh +++ b/openwrt/scripts/rstrip.sh @@ -15,7 +15,7 @@ TARGETS=$* exit 1 } -find $TARGETS -type f -a -exec file {} \; | \ +find $TARGETS -type f -not -name \*.o -not -name \*.ko -a -exec file {} \; | \ sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*, not stripped/\1:\2/p' | \ ( IFS=":" From 7e04fed0e602b67026842fdc7ede04a61ac5c308 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 14:32:17 +0000 Subject: [PATCH 104/757] kernel package cleanup, move madwifi from target/linux/package/ to package/, update to 0.9.0 SVN-Revision: 3860 --- openwrt/Makefile | 10 +- openwrt/package/base-files/Makefile | 20 ++- openwrt/package/kernel.mk | 28 +++++ .../linux => }/package/madwifi/Config.in | 0 openwrt/package/madwifi/Makefile | 117 ++++++++++++++++++ .../package/madwifi/files/madwifi.init | 0 .../package/madwifi/files/madwifi.modules | 1 - .../package/madwifi/ipkg/kmod-madwifi.control | 0 .../madwifi/patches/100-kernel_cflags.patch | 6 +- .../madwifi/patches/101-no_werror.patch | 0 .../patches/102-multicall_binary.patch | 0 .../patches/104-apmode_by_default.patch | 0 openwrt/target/linux/package/madwifi/Makefile | 105 ---------------- 13 files changed, 164 insertions(+), 123 deletions(-) create mode 100644 openwrt/package/kernel.mk rename openwrt/{target/linux => }/package/madwifi/Config.in (100%) create mode 100644 openwrt/package/madwifi/Makefile rename openwrt/{target/linux => }/package/madwifi/files/madwifi.init (100%) rename openwrt/{target/linux => }/package/madwifi/files/madwifi.modules (92%) rename openwrt/{target/linux => }/package/madwifi/ipkg/kmod-madwifi.control (100%) rename openwrt/{target/linux => }/package/madwifi/patches/100-kernel_cflags.patch (96%) rename openwrt/{target/linux => }/package/madwifi/patches/101-no_werror.patch (100%) rename openwrt/{target/linux => }/package/madwifi/patches/102-multicall_binary.patch (100%) rename openwrt/{target/linux => }/package/madwifi/patches/104-apmode_by_default.patch (100%) delete mode 100644 openwrt/target/linux/package/madwifi/Makefile diff --git a/openwrt/Makefile b/openwrt/Makefile index b1bcf91a132..40b4efc0448 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -61,10 +61,16 @@ scripts/config/mconf: .config.in scripts/config/conf: .config.in $(MAKE) -C scripts/config conf -menuconfig: scripts/config/mconf +config: scripts/config/conf $< Config.in -config: scripts/config/conf +defdconfig: scripts/config/conf + $< -d Config.in + +oldconfig: scripts/config/conf + $< -o Config.in + +menuconfig: scripts/config/mconf $< Config.in config-clean: diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 485ebddc3b5..226782bb92d 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -1,20 +1,11 @@ # $Id$ include $(TOPDIR)/rules.mk - -ifneq ($(DUMP),1) -include $(BUILD_DIR)/kernel.mk -include $(TOPDIR)/target/linux/rules.mk -TARGET:=-$(BOARD)-$(KERNEL) -BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -endif +include $(TOPDIR)/package/kernel.mk PKG_NAME:=base-files PKG_RELEASE:=8 -PKG_BUILD_DIR:=$(BUILD_DIR)/base-files +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/base-files REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) @@ -23,6 +14,12 @@ endif include $(TOPDIR)/package/rules.mk +ifneq ($(DUMP),1) +TARGET:=-$(BOARD)-$(KERNEL) +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +endif + CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files define Package/base-files$(TARGET) @@ -49,7 +46,6 @@ define Package/uclibc DESCRIPTION:=C library for embedded systems endef - define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef diff --git a/openwrt/package/kernel.mk b/openwrt/package/kernel.mk new file mode 100644 index 00000000000..def66437c65 --- /dev/null +++ b/openwrt/package/kernel.mk @@ -0,0 +1,28 @@ +ifneq ($(DUMP),1) +include $(BUILD_DIR)/kernel.mk + +KERNEL:=unknown +ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) +KERNEL:=2.4 +LINUX_KMOD_SUFFIX=o +endif +ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) +KERNEL:=2.6 +LINUX_KMOD_SUFFIX=ko +endif + +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + -e 's/mipsel/mips/' \ + -e 's/mipseb/mips/' \ + -e 's/powerpc/ppc/' \ + -e 's/sh[234]/sh/' \ + -e 's/armeb/arm/' \ +) + +KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) +LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) + +KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules +MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) +TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) +endif diff --git a/openwrt/target/linux/package/madwifi/Config.in b/openwrt/package/madwifi/Config.in similarity index 100% rename from openwrt/target/linux/package/madwifi/Config.in rename to openwrt/package/madwifi/Config.in diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile new file mode 100644 index 00000000000..c24c821b247 --- /dev/null +++ b/openwrt/package/madwifi/Makefile @@ -0,0 +1,117 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=madwifi +PKG_VERSION:=0.9.0 +PKG_RELEASE:=1 +PKG_MD5SUM:=9b558d1df84cab2b0006c595feee0fba + +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_CAT:=bzcat + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +ifeq ($(ARCH),mips) + HAL_TARGET:=mips-be-elf +endif +ifeq ($(ARCH),mipsel) + HAL_TARGET:=mips-le-elf +endif +ifeq ($(ARCH),i386) + HAL_TARGET:=i386-elf +endif +ifeq ($(ARCH),armeb) + HAL_TARGET:=xscale-be-elf +endif + +BUS := PCI +ifneq ($(CONFIG_LINUX_2_4_AR531X),) + BUS := AHB +endif +ifneq ($(CONFIG_LINUX_2_6_ARUBA),) + BUS := PCI AHB # no suitable HAL for AHB yet. +endif + +BUS_MODULES:= +ifeq ($(findstring AHB,$(BUS)),AHB) + BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX) +endif +ifeq ($(findstring PCI,$(BUS)),PCI) + BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX) +endif + +MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ + PATH="$(TARGET_PATH)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + TARGET="$(HAL_TARGET)" \ + TOOLPREFIX="$(KERNEL_CROSS)" \ + TOOLPATH="$(KERNEL_CROSS)" \ + KERNELPATH="$(LINUX_DIR)" \ + DOMULTI=1 + +include $(TOPDIR)/package/rules.mk + +ifeq ($(findstring AHB,$(BUS)),AHB) +define Build/Compile/ahb + $(MAKE) $(MADWIFI_MAKEOPTS) BUS="AHB" all +endef +endif + +ifeq ($(findstring PCI,$(BUS)),PCI) +define Build/Compile/pci + $(MAKE) $(MADWIFI_MAKEOPTS) BUS="PCI" all +endef +endif + +define Build/Compile +$(call Build/Compile/ahb) +$(call Build/Compile/pci) +endef + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include/madwifi + $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/ + mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211 + $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/ +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/madwifi +endef + +define Package/kmod-madwifi + SECTION:=drivers + CATEGORY:=Drivers + DEFAULT:=y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE, m if ALL + TITLE:=Driver for Atheros wireless chipsets + DESCRIPTION:=Driver for Atheros 802.11a/b/g chipsets + URL:=http://madwifi.org/ +endef + +define Package/kmod-madwifi/install + mkdir -p $(1)/etc/modules.d + mkdir -p $(1)/etc/init.d + mkdir -p $(1)/lib/modules/$(LINUX_VERSION) + mkdir -p $(1)/usr/sbin + install -m0644 ./files/madwifi.modules $(1)/etc/modules.d/20-madwifi +ifeq ($(findstring AHB,$(BUS)),AHB) + echo ath_ahb >> $(1)/etc/modules.d/20-madwifi +endif +ifeq ($(findstring PCI,$(BUS)),PCI) + echo ath_pci >> $(1)/etc/modules.d/20-madwifi +endif + install -m0755 ./files/madwifi.init $(1)/etc/init.d/S20madwifi + $(CP) \ + $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ + $(BUS_MODULES) \ + $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,kmod-madwifi)) diff --git a/openwrt/target/linux/package/madwifi/files/madwifi.init b/openwrt/package/madwifi/files/madwifi.init similarity index 100% rename from openwrt/target/linux/package/madwifi/files/madwifi.init rename to openwrt/package/madwifi/files/madwifi.init diff --git a/openwrt/target/linux/package/madwifi/files/madwifi.modules b/openwrt/package/madwifi/files/madwifi.modules similarity index 92% rename from openwrt/target/linux/package/madwifi/files/madwifi.modules rename to openwrt/package/madwifi/files/madwifi.modules index eac01b66ee6..515c1e9aa11 100644 --- a/openwrt/target/linux/package/madwifi/files/madwifi.modules +++ b/openwrt/package/madwifi/files/madwifi.modules @@ -3,7 +3,6 @@ wlan_scan_ap wlan_scan_sta ath_hal ath_rate_sample -ath_pci wlan_acl wlan_ccmp wlan_tkip diff --git a/openwrt/target/linux/package/madwifi/ipkg/kmod-madwifi.control b/openwrt/package/madwifi/ipkg/kmod-madwifi.control similarity index 100% rename from openwrt/target/linux/package/madwifi/ipkg/kmod-madwifi.control rename to openwrt/package/madwifi/ipkg/kmod-madwifi.control diff --git a/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch b/openwrt/package/madwifi/patches/100-kernel_cflags.patch similarity index 96% rename from openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch rename to openwrt/package/madwifi/patches/100-kernel_cflags.patch index b67183c3847..ef283dd3f2e 100644 --- a/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch +++ b/openwrt/package/madwifi/patches/100-kernel_cflags.patch @@ -1,12 +1,12 @@ diff -ru madwifi-ng-r1486-20060329/Makefile madwifi-ng-r1486-20060329-patch/Makefile --- madwifi-ng-r1486-20060329/Makefile 2006-03-13 19:23:02.000000000 -0500 +++ madwifi-ng-r1486-20060329-patch/Makefile 2006-03-31 10:52:05.000000000 -0500 -@@ -52,7 +52,7 @@ +@@ -51,7 +51,7 @@ all: modules tools --modules: configcheck svnversion.h -+modules: svnversion.h +-modules: configcheck svnversion.h ++modules: svnversion.h mkdir -p ${SYMBOLSDIR} for i in ${DIRS_MODULES}; do \ $(MAKE) -C $$i || exit 1; \ diff --git a/openwrt/target/linux/package/madwifi/patches/101-no_werror.patch b/openwrt/package/madwifi/patches/101-no_werror.patch similarity index 100% rename from openwrt/target/linux/package/madwifi/patches/101-no_werror.patch rename to openwrt/package/madwifi/patches/101-no_werror.patch diff --git a/openwrt/target/linux/package/madwifi/patches/102-multicall_binary.patch b/openwrt/package/madwifi/patches/102-multicall_binary.patch similarity index 100% rename from openwrt/target/linux/package/madwifi/patches/102-multicall_binary.patch rename to openwrt/package/madwifi/patches/102-multicall_binary.patch diff --git a/openwrt/target/linux/package/madwifi/patches/104-apmode_by_default.patch b/openwrt/package/madwifi/patches/104-apmode_by_default.patch similarity index 100% rename from openwrt/target/linux/package/madwifi/patches/104-apmode_by_default.patch rename to openwrt/package/madwifi/patches/104-apmode_by_default.patch diff --git a/openwrt/target/linux/package/madwifi/Makefile b/openwrt/target/linux/package/madwifi/Makefile deleted file mode 100644 index 97cb0bd5e5f..00000000000 --- a/openwrt/target/linux/package/madwifi/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=madwifi-ng -PKG_VERSION:=r1543-20060506 -PKG_RELEASE:=1 -PKG_MD5SUM:=3d89e5197c7e43eb37564c176140b2bf - -PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -ifeq ($(ARCH),mips) -HAL_TARGET:=mips-be-elf -endif -ifeq ($(ARCH),mipsel) -HAL_TARGET:=mips-le-elf -endif -ifeq ($(ARCH),i386) -HAL_TARGET:=i386-elf -endif -ifeq ($(ARCH),armeb) -HAL_TARGET:=xscale-be-elf -endif - -BUS := PCI - -ifneq ($(CONFIG_LINUX_2_4_AR531X),) - BUS := AHB -endif -ifneq ($(CONFIG_LINUX_2_6_ARUBA),) - BUS := PCI AHB # no suitable HAL for AHB yet. -endif - -BUS_MODULES:= -ifeq ($(findstring AHB,$(BUS)),AHB) -BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX) -endif -ifeq ($(findstring PCI,$(BUS)),PCI) -BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX) -endif - - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - TARGET="$(HAL_TARGET)" \ - TOOLPREFIX="$(KERNEL_CROSS)" \ - TOOLPATH="$(KERNEL_CROSS)" \ - KERNELPATH="$(LINUX_DIR)" \ - DOMULTI=1 - - -$(PKG_BUILD_DIR)/.built: -ifeq ($(findstring AHB,$(BUS)),AHB) - $(MAKE) $(MADWIFI_MAKEOPTS) BUS="AHB" all -endif -ifeq ($(findstring PCI,$(BUS)),PCI) - $(MAKE) $(MADWIFI_MAKEOPTS) BUS="PCI" all -endif - $(RSTRIP) $(PKG_BUILD_DIR)/tools/madwifi_multi - touch $@ - -$(IPKG_KMOD_MADWIFI): - mkdir -p $(IDIR_KMOD_MADWIFI)/etc/modules.d - mkdir -p $(IDIR_KMOD_MADWIFI)/etc/init.d - mkdir -p $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION) - mkdir -p $(IDIR_KMOD_MADWIFI)/usr/sbin - install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi - install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi - $(CP) $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ - $(BUS_MODULES) \ - $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/ - $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(IDIR_KMOD_MADWIFI)/usr/sbin/ - $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/madwifi - $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/ - mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211 - $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/madwifi - -compile-targets: install-dev -clean-targets: uninstall-dev From 9d4ba07b77f5fab19e1be47ea8b3990b9ed8b44e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 14:42:45 +0000 Subject: [PATCH 105/757] add missing kernel version to madwifi package SVN-Revision: 3861 --- openwrt/package/madwifi/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index c24c821b247..b3eb338cb9e 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -90,6 +90,7 @@ define Package/kmod-madwifi TITLE:=Driver for Atheros wireless chipsets DESCRIPTION:=Driver for Atheros 802.11a/b/g chipsets URL:=http://madwifi.org/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Package/kmod-madwifi/install From 7486d2e8d5b442143ce94c0524e86a67b5c338b9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 15:27:00 +0000 Subject: [PATCH 106/757] move alsa from target/linux/package to package, add compile fix for linux 2.4 SVN-Revision: 3862 --- .../{target/linux => }/package/alsa/Config.in | 0 .../{target/linux => }/package/alsa/Makefile | 42 ++++++++++++------- .../package/alsa/files/alsa.modules | 0 .../package/alsa/ipkg/kmod-alsa.control | 0 .../alsa/patches/100-compile_fix.patch | 18 ++++++++ 5 files changed, 44 insertions(+), 16 deletions(-) rename openwrt/{target/linux => }/package/alsa/Config.in (100%) rename openwrt/{target/linux => }/package/alsa/Makefile (60%) rename openwrt/{target/linux => }/package/alsa/files/alsa.modules (100%) rename openwrt/{target/linux => }/package/alsa/ipkg/kmod-alsa.control (100%) create mode 100644 openwrt/package/alsa/patches/100-compile_fix.patch diff --git a/openwrt/target/linux/package/alsa/Config.in b/openwrt/package/alsa/Config.in similarity index 100% rename from openwrt/target/linux/package/alsa/Config.in rename to openwrt/package/alsa/Config.in diff --git a/openwrt/target/linux/package/alsa/Makefile b/openwrt/package/alsa/Makefile similarity index 60% rename from openwrt/target/linux/package/alsa/Makefile rename to openwrt/package/alsa/Makefile index 665fc00451c..5703db1905b 100644 --- a/openwrt/target/linux/package/alsa/Makefile +++ b/openwrt/package/alsa/Makefile @@ -1,18 +1,18 @@ # $Id$ include $(TOPDIR)/rules.mk -include ../../rules.mk +include $(TOPDIR)/package/kernel.mk PKG_NAME:=alsa-driver -PKG_VERSION:=1.0.11rc4 +PKG_VERSION:=1.0.11 PKG_RELEASE:=1 -PKG_MD5SUM:=8e5794026082a964b09b46f9d881e6ec +PKG_MD5SUM:=57534e4297cd683371402220e3753885 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_CAT:=bzcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(TOPDIR)/package/rules.mk @@ -25,9 +25,7 @@ KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic KERNEL_C_OPTS:= -Os -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap endif -$(eval $(call PKG_template,KMOD_ALSA,kmod-alsa,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: +define Build/Configure (cd $(PKG_BUILD_DIR); \ CFLAGS="$(KERNEL_C_INCS)" \ ./configure \ @@ -41,20 +39,32 @@ $(PKG_BUILD_DIR)/.configured: --with-sequencer=no \ --with-cards=usb-audio \ ); - touch $@ +endef -$(PKG_BUILD_DIR)/.built: +define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ c_opts="$(KERNEL_C_OPTS)" \ all - touch $@ +endef -$(IPKG_KMOD_ALSA): - install -d -m0755 $(IDIR_KMOD_ALSA)/etc/modules.d - install -m0644 ./files/alsa.modules $(IDIR_KMOD_ALSA)/etc/modules.d/70-alsa - install -d -m0755 $(IDIR_KMOD_ALSA)/lib/modules/$(LINUX_VERSION) +define Package/kmod-alsa + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@PCI_SUPPORT + TITLE:=Advanced Linux Sound Architecture + DESCRIPTION:=Advanced Linux Sound Architecture + URL:=http://alsa-project.org/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Package/kmod-alsa/install + install -d -m0755 $(1)/etc/modules.d + install -m0644 ./files/alsa.modules $(1)/etc/modules.d/70-alsa + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) install -m0644 $(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_ALSA)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_ALSA) $(PACKAGE_DIR) + $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +$(eval $(call BuildPackage,kmod-alsa)) diff --git a/openwrt/target/linux/package/alsa/files/alsa.modules b/openwrt/package/alsa/files/alsa.modules similarity index 100% rename from openwrt/target/linux/package/alsa/files/alsa.modules rename to openwrt/package/alsa/files/alsa.modules diff --git a/openwrt/target/linux/package/alsa/ipkg/kmod-alsa.control b/openwrt/package/alsa/ipkg/kmod-alsa.control similarity index 100% rename from openwrt/target/linux/package/alsa/ipkg/kmod-alsa.control rename to openwrt/package/alsa/ipkg/kmod-alsa.control diff --git a/openwrt/package/alsa/patches/100-compile_fix.patch b/openwrt/package/alsa/patches/100-compile_fix.patch new file mode 100644 index 00000000000..2e2a3df79a3 --- /dev/null +++ b/openwrt/package/alsa/patches/100-compile_fix.patch @@ -0,0 +1,18 @@ +diff -urN alsa.old/include/adriver.h alsa.dev/include/adriver.h +--- alsa.old/include/adriver.h 2006-04-19 08:24:30.000000000 +0200 ++++ alsa.dev/include/adriver.h 2006-05-31 17:24:49.000000000 +0200 +@@ -451,7 +451,7 @@ + #endif /* < 2.6.0 */ + + /* workarounds for USB API */ +-#if defined(SND_NEED_USB_WRAPPER) && (defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)) ++#if 1 + + #include <linux/usb.h> + +@@ -1174,4 +1174,5 @@ + */ + #define OPL3_HW_OPL3_PC98 0x0305 /* PC9800 */ + ++#undef info /* used in several structs */ + #endif /* __SOUND_LOCAL_DRIVER_H */ From 337621e4682ad459b28f23c2cacebc29a88fbde1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 16:01:46 +0000 Subject: [PATCH 107/757] move target/linux/package/switch to package/, fix a bug in the ipkg dependency handling SVN-Revision: 3864 --- openwrt/package/rules.mk | 3 +- openwrt/package/switch/Makefile | 44 +++++++++++++++++++ .../linux => }/package/switch/src/Makefile | 0 .../linux => }/package/switch/src/etc53xx.h | 0 .../linux => }/package/switch/src/gpio.h | 0 .../package/switch/src/switch-adm.c | 0 .../package/switch/src/switch-core.c | 0 .../package/switch/src/switch-core.h | 0 .../package/switch/src/switch-robo.c | 0 openwrt/target/linux/package/switch/Config.in | 11 ----- openwrt/target/linux/package/switch/Makefile | 37 ---------------- .../package/switch/ipkg/kmod-switch.control | 4 -- 12 files changed, 45 insertions(+), 54 deletions(-) create mode 100644 openwrt/package/switch/Makefile rename openwrt/{target/linux => }/package/switch/src/Makefile (100%) rename openwrt/{target/linux => }/package/switch/src/etc53xx.h (100%) rename openwrt/{target/linux => }/package/switch/src/gpio.h (100%) rename openwrt/{target/linux => }/package/switch/src/switch-adm.c (100%) rename openwrt/{target/linux => }/package/switch/src/switch-core.c (100%) rename openwrt/{target/linux => }/package/switch/src/switch-core.h (100%) rename openwrt/{target/linux => }/package/switch/src/switch-robo.c (100%) delete mode 100644 openwrt/target/linux/package/switch/Config.in delete mode 100644 openwrt/target/linux/package/switch/Makefile delete mode 100644 openwrt/target/linux/package/switch/ipkg/kmod-switch.control diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 26b41969d9d..e2e0777da4d 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -134,8 +134,7 @@ define BuildPackage echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control ( \ DEPENDS=; \ - for depend in $$(IDEPEND_$(1)); do \ - [ "$$$${depend%%%%%%%%[A-Za-z]*}" = "@" ] && continue; \ + for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \ DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \ done; \ echo "Depends: $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \ diff --git a/openwrt/package/switch/Makefile b/openwrt/package/switch/Makefile new file mode 100644 index 00000000000..be99a6064d0 --- /dev/null +++ b/openwrt/package/switch/Makefile @@ -0,0 +1,44 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME := kmod-switch +PKG_RELEASE := 1 +PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME) + +include $(TOPDIR)/package/rules.mk + + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + PATH="$(TARGET_PATH)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="-DBCMGPIO2" \ + modules +endef + +define Package/kmod-switch + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@LINUX_2_6_BRCM||LINUX_2_4_BRCM + DEFAULT:=y + TITLE:=Switch drivers + DESCRIPTION:=Switch drivers for ADM6996L and BCM53XX RoboSwitch + VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Package/kmod-switch/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION) +endef + +$(eval $(call BuildPackage,kmod-switch)) diff --git a/openwrt/target/linux/package/switch/src/Makefile b/openwrt/package/switch/src/Makefile similarity index 100% rename from openwrt/target/linux/package/switch/src/Makefile rename to openwrt/package/switch/src/Makefile diff --git a/openwrt/target/linux/package/switch/src/etc53xx.h b/openwrt/package/switch/src/etc53xx.h similarity index 100% rename from openwrt/target/linux/package/switch/src/etc53xx.h rename to openwrt/package/switch/src/etc53xx.h diff --git a/openwrt/target/linux/package/switch/src/gpio.h b/openwrt/package/switch/src/gpio.h similarity index 100% rename from openwrt/target/linux/package/switch/src/gpio.h rename to openwrt/package/switch/src/gpio.h diff --git a/openwrt/target/linux/package/switch/src/switch-adm.c b/openwrt/package/switch/src/switch-adm.c similarity index 100% rename from openwrt/target/linux/package/switch/src/switch-adm.c rename to openwrt/package/switch/src/switch-adm.c diff --git a/openwrt/target/linux/package/switch/src/switch-core.c b/openwrt/package/switch/src/switch-core.c similarity index 100% rename from openwrt/target/linux/package/switch/src/switch-core.c rename to openwrt/package/switch/src/switch-core.c diff --git a/openwrt/target/linux/package/switch/src/switch-core.h b/openwrt/package/switch/src/switch-core.h similarity index 100% rename from openwrt/target/linux/package/switch/src/switch-core.h rename to openwrt/package/switch/src/switch-core.h diff --git a/openwrt/target/linux/package/switch/src/switch-robo.c b/openwrt/package/switch/src/switch-robo.c similarity index 100% rename from openwrt/target/linux/package/switch/src/switch-robo.c rename to openwrt/package/switch/src/switch-robo.c diff --git a/openwrt/target/linux/package/switch/Config.in b/openwrt/target/linux/package/switch/Config.in deleted file mode 100644 index 0ff2aa1aba9..00000000000 --- a/openwrt/target/linux/package/switch/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config PACKAGE_KMOD_SWITCH - prompt "kmod-switch....................... Kernel driver for ROBO and ADMTEK SWITCH" - tristate - default y if LINUX_2_6_BRCM || LINUX_2_4_BRCM - default m if DEVEL - default n - help - Kernel driver for ROBO and ADMTEK switches. - - http://www.openwrt.org - diff --git a/openwrt/target/linux/package/switch/Makefile b/openwrt/target/linux/package/switch/Makefile deleted file mode 100644 index 812fccb2cc8..00000000000 --- a/openwrt/target/linux/package/switch/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME := kmod-switch -PKG_RELEASE := 1 -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_SWITCH,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ - SUBDIRS="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="-DBCMGPIO2" \ - modules - touch $@ - -$(IPKG_KMOD_SWITCH): - install -m0755 -d $(IDIR_KMOD_SWITCH)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_SWITCH)/lib/modules/$(LINUX_VERSION) - $(IPKG_BUILD) $(IDIR_KMOD_SWITCH) $(PACKAGE_DIR) - diff --git a/openwrt/target/linux/package/switch/ipkg/kmod-switch.control b/openwrt/target/linux/package/switch/ipkg/kmod-switch.control deleted file mode 100644 index db8a3684300..00000000000 --- a/openwrt/target/linux/package/switch/ipkg/kmod-switch.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-switch -Priority: optional -Section: sys -Description: switch driver for robo/admtek switch From 3bcaa7384bb8cd5062724cce55cfa558b9e763c6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 16:02:13 +0000 Subject: [PATCH 108/757] remove old Config.in files SVN-Revision: 3865 --- openwrt/package/alsa/Config.in | 9 --------- openwrt/package/madwifi/Config.in | 10 ---------- 2 files changed, 19 deletions(-) delete mode 100644 openwrt/package/alsa/Config.in delete mode 100644 openwrt/package/madwifi/Config.in diff --git a/openwrt/package/alsa/Config.in b/openwrt/package/alsa/Config.in deleted file mode 100644 index 55d9abd1c47..00000000000 --- a/openwrt/package/alsa/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config PACKAGE_KMOD_ALSA - prompt "kmod-alsa......................... Alsa Sound Drivers" - tristate - depends LINUX_2_4_X86 || LINUX_2_4_BRCM || LINUX_2_6_X86 || LINUX_2_6_BRCM - depends PACKAGE_KMOD_USB_CONTROLLER - select PACKAGE_KMOD_SOUNDCORE - default m if DEVEL - help - Alsa Drivers for USB Soundcards diff --git a/openwrt/package/madwifi/Config.in b/openwrt/package/madwifi/Config.in deleted file mode 100644 index 168f1e7b8b7..00000000000 --- a/openwrt/package/madwifi/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config PACKAGE_KMOD_MADWIFI - prompt "kmod-madwifi...................... Atheros Wifi driver" - tristate - default y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE - default m if DEVEL - default n - help - Driver for Atheros 802.11a/b/g MiniPCI cards - - http://www.madwifi.org/ From 7773da2a8481bbe4b10fae7df75d760e8c381357 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 16:20:27 +0000 Subject: [PATCH 109/757] only use the .dev-installed target if Build/InstallDev is defined - avoids unnecessary builds of deselected packages SVN-Revision: 3866 --- openwrt/package/rules.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index e2e0777da4d..5d604c50451 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -28,11 +28,11 @@ define Build/DefaultTargets $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(call Build/Compile) touch $$@ - + $(PKG_BUILD_DIR)/.dev-installed: $(PKG_BUILD_DIR)/.built $(call Build/InstallDev) touch $$@ - + package-clean: FORCE $(call Build/Clean) $(call Build/UninstallDev) @@ -263,7 +263,11 @@ else prepare: $(PKG_BUILD_DIR)/.prepared configure: $(PKG_BUILD_DIR)/.configured +ifdef Build/InstallDev compile-targets: $(PKG_BUILD_DIR)/.dev-installed +else + compile-targets: +endif compile: compile-targets install-targets: From e3848f8f4745bf562f1ef202ba1536a3703cc197 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 16:41:31 +0000 Subject: [PATCH 110/757] fix iptables build SVN-Revision: 3867 --- openwrt/package/iptables/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 4c547be998d..34e68174378 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -1,6 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk PKG_NAME:=iptables PKG_VERSION:=1.3.5 From 72d69accc3c295734a4dfa32ac4b1a1e1ce4943d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 18:32:57 +0000 Subject: [PATCH 111/757] remove some debugging junk (#492) SVN-Revision: 3868 --- .../linux/brcm-2.4/patches/001-bcm47xx.patch | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch index af82c3c770f..b17b5439452 100644 --- a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch +++ b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch @@ -15751,7 +15751,7 @@ diff -urN linux.old/arch/mips/bcm947xx/sflash.c linux.dev/arch/mips/bcm947xx/sfl diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time.c --- linux.old/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/arch/mips/bcm947xx/time.c 2006-04-28 00:45:40.000000000 +0200 -@@ -0,0 +1,119 @@ +@@ -0,0 +1,104 @@ +/* + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. @@ -15828,13 +15828,6 @@ diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time. + + /* Set panic timeout in seconds */ + panic_timeout = watchdog / 1000; -+ -+ /* Setup blink */ -+ if ((eir = sb_setcore(sbh, SB_EXTIF, 0))) { -+ sbconfig_t *sb = (sbconfig_t *)((unsigned int) eir + SBCONFIGOFF); -+ unsigned long base = EXTIF_CFGIF_BASE(sb_base(readl(&sb->sbadmatch1))); -+ mcr = (u8 *) ioremap_nocache(base + UART_MCR, 1); -+ } +} + +static void @@ -15846,14 +15839,6 @@ diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time. + /* Set the watchdog timer to reset after the specified number of ms */ + if (watchdog > 0) + sb_watchdog(sbh, WATCHDOG_CLOCK / 1000 * watchdog); -+ -+#ifdef CONFIG_HWSIM -+ (*((int *)0xa0000f1c))++; -+#else -+ /* Blink one of the LEDs in the external UART */ -+ if (mcr && !(jiffies % (HZ/2))) -+ writeb(readb(mcr) ^ UART_MCR_OUT2, mcr); -+#endif +} + +static struct irqaction bcm947xx_timer_irqaction = { From 59c8b4ea41b37610cf12de0d234545399f329e9d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 20:00:21 +0000 Subject: [PATCH 112/757] add package install target SVN-Revision: 3869 --- openwrt/package/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index adeb238d437..12ea942a6a1 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -16,6 +16,10 @@ $(STAMP_DIR) $(TARGET_DIR): @echo "-> make $@" $(MAKE) -C $(patsubst %-compile,%,$@) compile +%-install: $(STAMP_DIR) $(TARGET_DIR) + @echo "-> make $@" + $(MAKE) -C $(patsubst %-install,%,$@) install + %-clean: $(STAMP_DIR) $(TARGET_DIR) $(MAKE) -C $(patsubst %-clean,%,$@) clean From b41a642e433e002e05f5b0c26fe5d5a2bbc179cf Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 20:06:46 +0000 Subject: [PATCH 113/757] strip kernel modules automatically as well SVN-Revision: 3870 --- openwrt/rules.mk | 4 +--- openwrt/scripts/rstrip.sh | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index a613beaf40b..a94eee9cd1c 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -110,9 +110,7 @@ IPKG_TARGET_DIR := $(PACKAGE_DIR) IPKG:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(TARGET_DIR) IPKG_CONF_DIR=$(STAGING_DIR)/etc IPKG_OFFLINE_ROOT=$(BUILD_DIR)/root $(SCRIPT_DIR)/ipkg -force-defaults -force-depends IPKG_STATE_DIR := $(TARGET_DIR)/usr/lib/ipkg -RSTRIP:=STRIP="$(STRIP)" $(SCRIPT_DIR)/rstrip.sh -RSTRIP_KMOD:=STRIP="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" $(SCRIPT_DIR)/rstrip.sh - +RSTRIP:=STRIP="$(STRIP)" STRIP_KMOD="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" $(SCRIPT_DIR)/rstrip.sh all: .PHONY: FORCE diff --git a/openwrt/scripts/rstrip.sh b/openwrt/scripts/rstrip.sh index 023ae4e54fd..f71aaaf4f9f 100755 --- a/openwrt/scripts/rstrip.sh +++ b/openwrt/scripts/rstrip.sh @@ -15,12 +15,14 @@ TARGETS=$* exit 1 } -find $TARGETS -type f -not -name \*.o -not -name \*.ko -a -exec file {} \; | \ +find $TARGETS -type f -a -exec file {} \; | \ sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*, not stripped/\1:\2/p' | \ ( IFS=":" while read F S; do echo "$SELF: $F:$S" - eval "$STRIP $F" + [ "${F##*\.}" = "o" -o "${F##*\.}" = "ko" ] && \ + eval "$STRIP_KMOD $F" || \ + eval "$STRIP $F" done ) From c417ce482d2124ae5ec462e1fbccb1222a64f447 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 20:14:08 +0000 Subject: [PATCH 114/757] fix root filesystem path SVN-Revision: 3871 --- openwrt/target/linux/image/Makefile | 10 +++++----- openwrt/target/linux/image/jffs2.mk | 8 ++++---- openwrt/target/linux/image/squashfs.mk | 4 ++-- openwrt/target/linux/image/tgz.mk | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/openwrt/target/linux/image/Makefile b/openwrt/target/linux/image/Makefile index ce807b30279..3b82343398d 100644 --- a/openwrt/target/linux/image/Makefile +++ b/openwrt/target/linux/image/Makefile @@ -33,11 +33,11 @@ install-ib: $(CP) $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ install-prepare: - find $(KDIR)/root -type f -not -perm +0100 | xargs chmod 0644 - find $(KDIR)/root -type f -perm +0100 | xargs chmod 0755 - find $(KDIR)/root -type d | xargs chmod 0755 - mkdir -p $(KDIR)/root/tmp - chmod 0777 $(KDIR)/root/tmp + find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 + find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 + find $(BUILD_DIR)/root -type d | xargs chmod 0755 + mkdir -p $(BUILD_DIR)/root/tmp + chmod 0777 $(BUILD_DIR)/root/tmp rebuild: clean prepare compile install clean: diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk index 432df3e2b19..44d892415e7 100644 --- a/openwrt/target/linux/image/jffs2.mk +++ b/openwrt/target/linux/image/jffs2.mk @@ -17,12 +17,12 @@ jffs2-clean: rm -f $(KDIR)/root.jffs2* $(KDIR)/root.jffs2-4MB: install-prepare - @rm -rf $(KDIR)/root/jffs - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $@ -d $(KDIR)/root + @rm -rf $(BUILD_DIR)/root/jffs + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $@ -d $(BUILD_DIR)/root $(KDIR)/root.jffs2-8MB: install-prepare - @rm -rf $(KDIR)/root/jffs - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $@ -d $(KDIR)/root + @rm -rf $(BUILD_DIR)/root/jffs + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $@ -d $(BUILD_DIR)/root ifeq ($(IB),) jffs2-install: compile-targets $(BOARD)-compile diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk index abc58da1e4d..abe21563ecc 100644 --- a/openwrt/target/linux/image/squashfs.mk +++ b/openwrt/target/linux/image/squashfs.mk @@ -15,8 +15,8 @@ squashfs-clean: rm -f $(KDIR)/root.squashfs $(KDIR)/root.squashfs: install-prepare - @mkdir -p $(KDIR)/root/jffs - $(STAGING_DIR)/bin/mksquashfs-lzma $(KDIR)/root $@ -nopad -noappend -root-owned -$(endian) + @mkdir -p $(BUILD_DIR)/root/jffs + $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $@ -nopad -noappend -root-owned -$(endian) ifeq ($(IB),) squashfs-install: compile-targets $(BOARD)-compile diff --git a/openwrt/target/linux/image/tgz.mk b/openwrt/target/linux/image/tgz.mk index 3839eb6b475..4ea84ebd477 100644 --- a/openwrt/target/linux/image/tgz.mk +++ b/openwrt/target/linux/image/tgz.mk @@ -1,5 +1,5 @@ $(KDIR)/root.tar.gz: - tar -zcf $@ --owner=root --group=root -C $(KDIR)/root/ . + tar -zcf $@ --owner=root --group=root -C $(BUILD_DIR)/root/ . ifeq ($(BOARD),x86) install: tgz-install From 0bd782addd3e989cd22aef27d7a81907ea3b5847 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 20:29:11 +0000 Subject: [PATCH 115/757] fix install of in-tree modules ipkgs SVN-Revision: 3872 --- openwrt/target/linux/kernel.mk | 7 ++++++- openwrt/target/linux/rules.mk | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index e710d7d9c91..8e0b197e16e 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -40,7 +40,7 @@ $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched touch $@ endif -$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile FORCE +$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install FORCE $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux @@ -72,6 +72,9 @@ $(BUILD_DIR)/kernel.mk: FORCE echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ +pkg-install: + @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; } + source: $(DL_DIR)/$(LINUX_SOURCE) prepare: $(BUILD_DIR)/kernel.mk @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) @@ -99,4 +102,6 @@ clean: rm -f $(STAMP_DIR)/.linux-compile rm -rf $(LINUX_BUILD_DIR) rm -f $(TARGETS) + +.PHONY: source prepare compile install mostlyclean rebuild clean pkg-install diff --git a/openwrt/target/linux/rules.mk b/openwrt/target/linux/rules.mk index 092b81b4149..1b40ab77625 100644 --- a/openwrt/target/linux/rules.mk +++ b/openwrt/target/linux/rules.mk @@ -13,7 +13,6 @@ LINUX_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root -IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_TARGET_DIR) IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/mipsel/mips/' \ @@ -75,7 +74,6 @@ ifneq ($(6),) endif $(8) $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) - endef KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk From 7a14b4517731830ddcda3ba80b85f2af5c143585 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 20:57:49 +0000 Subject: [PATCH 116/757] remove weird /lib64 directory SVN-Revision: 3873 --- openwrt/package/busybox/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 799372fad34..3968f187538 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -38,6 +38,7 @@ endef define Package/busybox/install $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(1)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install + rmdir $(1)/lib64 endef $(eval $(call BuildPackage,busybox)) From 4f9703fb8de91c3a6b6199238470b7cf53064ae1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 20:58:13 +0000 Subject: [PATCH 117/757] add support for parallel build of packages (tested with -j8) SVN-Revision: 3874 --- openwrt/package/Makefile | 18 +++++++++++------- openwrt/rules.mk | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 12ea942a6a1..7548e069a71 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -10,18 +10,18 @@ $(STAMP_DIR) $(TARGET_DIR): mkdir -p $@ %-prepare: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-prepare,%,$@) prepare + $(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)" %-compile: $(STAMP_DIR) $(TARGET_DIR) @echo "-> make $@" - $(MAKE) -C $(patsubst %-compile,%,$@) compile + $(MAKE) -C $(patsubst %-compile,%,$@) compile MAKEFLAGS="$(BUILD_MAKEFLAGS)" %-install: $(STAMP_DIR) $(TARGET_DIR) @echo "-> make $@" - $(MAKE) -C $(patsubst %-install,%,$@) install + $(MAKE) -C $(patsubst %-install,%,$@) install MAKEFLAGS="$(BUILD_MAKEFLAGS)" %-clean: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-clean,%,$@) clean + $(MAKE) -C $(patsubst %-clean,%,$@) clean MAKEFLAGS="$(BUILD_MAKEFLAGS)" $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo @@ -29,7 +29,11 @@ $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo all: compile clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) -compile: $(COMPILE_PACKAGES) -install: base-files-install $(INSTALL_PACKAGES) - +compile-targets: $(COMPILE_PACKAGES) +compile: + $(MAKE) -j$(CONFIG_JLEVEL) compile-targets +install-targets: base-files-install $(INSTALL_PACKAGES) +install: + rm -rf $(BUILD_DIR)/root + $(MAKE) install-targets diff --git a/openwrt/rules.mk b/openwrt/rules.mk index a94eee9cd1c..79807e093dd 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -24,8 +24,8 @@ endif CP=cp -fpR -MAKE1=make -MAKEFLAGS=-j$(CONFIG_JLEVEL) V=$(V) $(EXTRA_MAKEFLAGS) +BUILD_MAKEFLAGS= V=$(V) $(EXTRA_MAKEFLAGS) +MAKEFLAGS=$(BUILD_MAKEFLAGS) # Strip off the annoying quoting ARCH:=$(strip $(subst ",, $(CONFIG_ARCH))) WGET:=$(strip $(subst ",, $(CONFIG_WGET))) From 00b8533b2322e085ede8724f33b0e559123eb518 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 22:38:39 +0000 Subject: [PATCH 118/757] remove useless FORCE depend SVN-Revision: 3875 --- openwrt/target/linux/kernel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index 8e0b197e16e..fc337543e0f 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -40,7 +40,7 @@ $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched touch $@ endif -$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install FORCE +$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux From 00b53c7433a39b169c54a8da50c580d63cf798ca Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 22:48:29 +0000 Subject: [PATCH 119/757] fix toolchain build SVN-Revision: 3876 --- openwrt/toolchain/uClibc/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openwrt/toolchain/uClibc/Makefile b/openwrt/toolchain/uClibc/Makefile index 19ab0326f64..1fd9b4a3bdf 100644 --- a/openwrt/toolchain/uClibc/Makefile +++ b/openwrt/toolchain/uClibc/Makefile @@ -62,7 +62,7 @@ endif mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/lib - $(MAKE1) -C $(UCLIBC_DIR) \ + $(MAKE) -C $(UCLIBC_DIR) \ PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \ DEVEL_PREFIX=/usr/ \ RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \ @@ -72,7 +72,7 @@ endif touch $(UCLIBC_DIR)/.configured $(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET) - $(MAKE1) -C $(UCLIBC_DIR) \ + $(MAKE) -C $(UCLIBC_DIR) \ PREFIX= \ DEVEL_PREFIX=/ \ RUNTIME_PREFIX=/ \ @@ -82,12 +82,12 @@ $(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET) touch -c $(UCLIBC_DIR)/lib/libc.a $(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a - $(MAKE1) -C $(UCLIBC_DIR) \ + $(MAKE) -C $(UCLIBC_DIR) \ PREFIX=$(STAGING_DIR)/ \ DEVEL_PREFIX=/ \ RUNTIME_PREFIX=/ \ install_runtime - $(MAKE1) -C $(UCLIBC_DIR) \ + $(MAKE) -C $(UCLIBC_DIR) \ PREFIX=$(STAGING_DIR)/ \ DEVEL_PREFIX=/ \ RUNTIME_PREFIX=/ \ From 9ba9373d546ff96369d03dcf2d92486dbf7f3d26 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 23:29:05 +0000 Subject: [PATCH 120/757] cleanup; replace .PHONY with FORCE; disable gdb by default SVN-Revision: 3877 --- openwrt/target/Makefile | 10 ++++----- openwrt/target/linux/ar7-2.4/Makefile | 2 +- openwrt/target/linux/brcm-2.4/Makefile | 2 +- openwrt/target/linux/image/Makefile | 16 ++++++-------- openwrt/target/linux/image/aruba/Makefile | 4 ++-- openwrt/target/linux/image/au1000/Makefile | 4 ++-- openwrt/target/linux/image/brcm/Makefile | 4 ++-- openwrt/target/linux/image/jffs2.mk | 8 +++---- openwrt/target/linux/image/jffs2/Makefile | 2 +- openwrt/target/linux/image/squashfs.mk | 6 ++--- openwrt/target/linux/image/squashfs/Makefile | 2 +- openwrt/target/linux/image/tgz.mk | 2 +- openwrt/target/linux/image/x86/Makefile | 7 +----- openwrt/target/linux/image/xscale/Makefile | 8 +------ openwrt/target/linux/imagebuilder/Makefile | 4 ++-- openwrt/target/linux/kernel.mk | 11 ++++------ openwrt/target/linux/package/Makefile | 8 +++---- openwrt/target/lzma/Makefile | 6 ++--- openwrt/target/utils/Makefile | 4 ++-- openwrt/toolchain/Config.in | 7 ++++++ openwrt/toolchain/Makefile | 23 ++++++++++---------- openwrt/toolchain/binutils/Makefile | 5 ++--- openwrt/toolchain/gcc/Makefile | 2 +- openwrt/toolchain/gdb/Makefile | 2 +- openwrt/toolchain/ipkg-utils/Makefile | 5 +---- openwrt/toolchain/libnotimpl/Makefile | 2 +- openwrt/toolchain/sed/Makefile | 6 ++--- openwrt/toolchain/uClibc/Makefile | 9 ++++---- openwrt/toolchain/utils/Makefile | 2 +- 29 files changed, 81 insertions(+), 92 deletions(-) diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 58fc5eb874e..709a2080a51 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -13,20 +13,20 @@ compile: linux-compile install: image_clean linux-install clean: linux-clean utils-clean lzma-clean image_clean -image_clean: +image_clean: FORCE rm -f $(BIN_DIR)/openwrt-* -%-clean: +%-clean: FORCE $(MAKE) -C $(patsubst %-clean,%,$@) clean -%-prepare: +%-prepare: FORCE $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: %-prepare $(MAKE) -C $(patsubst %-compile,%,$@) compile -%-rebuild: +%-rebuild: FORCE $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild %-install: %-compile $(MAKE) -C $(patsubst %-install,%,$@) install -linux-imagebuilder: +linux-imagebuilder: FORCE $(MAKE) -C linux imagebuilder diff --git a/openwrt/target/linux/ar7-2.4/Makefile b/openwrt/target/linux/ar7-2.4/Makefile index 207d95d9afe..7775e888846 100644 --- a/openwrt/target/linux/ar7-2.4/Makefile +++ b/openwrt/target/linux/ar7-2.4/Makefile @@ -60,7 +60,7 @@ $(LINUX_DIR)/.drivers-unpacked: $(LINUX_DIR)/.unpacked linux-dirclean: drivers-clean -drivers-clean: +drivers-clean: FORCE rm -rf $(BUILD_DIR)/$(ATM_FIRMWARE_DIR) diff --git a/openwrt/target/linux/brcm-2.4/Makefile b/openwrt/target/linux/brcm-2.4/Makefile index 9447114d4e2..384a1ea9186 100644 --- a/openwrt/target/linux/brcm-2.4/Makefile +++ b/openwrt/target/linux/brcm-2.4/Makefile @@ -62,5 +62,5 @@ $(LINUX_DIR)/.drivers-installed: $(LINUX_DIR)/.modules_done linux-dirclean: drivers-clean -drivers-clean: +drivers-clean: FORCE rm -rf $(BUILD_DIR)/kernel-binary-wl diff --git a/openwrt/target/linux/image/Makefile b/openwrt/target/linux/image/Makefile index 3b82343398d..a5141cb542b 100644 --- a/openwrt/target/linux/image/Makefile +++ b/openwrt/target/linux/image/Makefile @@ -14,25 +14,23 @@ ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y) include ./tgz.mk endif -prepare: +prepare: FORCE $(MAKE) prepare-targets -compile: +compile: FORCE $(MAKE) compile-targets -install: +install: FORCE $(MAKE) install-targets -.PHONY: prepare compile install - -$(BOARD)-compile: +$(BOARD)-compile: FORCE $(MAKE) -C $(BOARD) prepare $(MAKE) -C $(BOARD) compile -install-ib: +install-ib: FORCE -$(MAKE) -C $(BOARD) IB_DIR="$(IB_DIR)" install-ib mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) $(CP) $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ -install-prepare: +install-prepare: FORCE find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 find $(BUILD_DIR)/root -type d | xargs chmod 0755 @@ -40,5 +38,5 @@ install-prepare: chmod 0777 $(BUILD_DIR)/root/tmp rebuild: clean prepare compile install -clean: +clean: FORCE $(MAKE) clean-targets diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index 0ddde20266c..7ca076acc32 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -12,10 +12,10 @@ LOADER_MAKEOPTS= \ KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -lzma-loader-clean: +lzma-loader-clean: FORCE $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean -lzma-loader-prepare: +lzma-loader-prepare: FORCE $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare diff --git a/openwrt/target/linux/image/au1000/Makefile b/openwrt/target/linux/image/au1000/Makefile index c7158ca7611..2c9b1c05df7 100644 --- a/openwrt/target/linux/image/au1000/Makefile +++ b/openwrt/target/linux/image/au1000/Makefile @@ -12,10 +12,10 @@ LOADER_MAKEOPTS= \ KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -lzma-loader-clean: +lzma-loader-clean: FORCE $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean -lzma-loader-prepare: +lzma-loader-prepare: FORCE $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare diff --git a/openwrt/target/linux/image/brcm/Makefile b/openwrt/target/linux/image/brcm/Makefile index 0fe3ceeac7f..7e328470ae4 100644 --- a/openwrt/target/linux/image/brcm/Makefile +++ b/openwrt/target/linux/image/brcm/Makefile @@ -2,10 +2,10 @@ include $(TOPDIR)/rules.mk KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -lzma-loader-clean: +lzma-loader-clean: FORCE $(MAKE) -C lzma-loader clean -lzma-loader-prepare: +lzma-loader-prepare: FORCE $(MAKE) -C lzma-loader prepare lzma-loader-compile: lzma-loader-prepare diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk index 44d892415e7..c1d07a22b2e 100644 --- a/openwrt/target/linux/image/jffs2.mk +++ b/openwrt/target/linux/image/jffs2.mk @@ -6,13 +6,13 @@ endif #JFFS2OPTS += -Xlzo -msize -Xlzari -jffs2-prepare: +jffs2-prepare: FORCE $(MAKE) -C jffs2 prepare jffs2-compile: prepare-targets $(MAKE) -C jffs2 compile -jffs2-clean: +jffs2-clean: FORCE $(MAKE) -C jffs2 clean rm -f $(KDIR)/root.jffs2* @@ -28,11 +28,11 @@ ifeq ($(IB),) jffs2-install: compile-targets $(BOARD)-compile endif -jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB +jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB FORCE $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-4MB" $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-8MB" -jffs2-install-ib: compile-targets +jffs2-install-ib: compile-targets FORCE mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin $(CP) $(STAGING_DIR)/bin/mkfs.jffs2 $(IB_DIR)/staging_dir_$(ARCH)/bin diff --git a/openwrt/target/linux/image/jffs2/Makefile b/openwrt/target/linux/image/jffs2/Makefile index 071bacdd47f..0273d52fd11 100644 --- a/openwrt/target/linux/image/jffs2/Makefile +++ b/openwrt/target/linux/image/jffs2/Makefile @@ -24,6 +24,6 @@ source: $(DL_DIR)/$(MTD_SOURCE) prepare: $(MTD_DIR)/.unpacked compile: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2 install: -clean: +clean: FORCE rm -rf $(MTD_DIR) diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk index abe21563ecc..184330cfe72 100644 --- a/openwrt/target/linux/image/squashfs.mk +++ b/openwrt/target/linux/image/squashfs.mk @@ -4,13 +4,13 @@ else endian := be endif -squashfs-prepare: +squashfs-prepare: FORCE $(MAKE) -C squashfs prepare squashfs-compile: prepare-targets $(MAKE) -C squashfs compile -squashfs-clean: +squashfs-clean: FORCE $(MAKE) -C squashfs clean rm -f $(KDIR)/root.squashfs @@ -22,7 +22,7 @@ ifeq ($(IB),) squashfs-install: compile-targets $(BOARD)-compile endif -squashfs-install: $(KDIR)/root.squashfs +squashfs-install: $(KDIR)/root.squashfs FORCE $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="squashfs" squashfs-install-ib: compile-targets diff --git a/openwrt/target/linux/image/squashfs/Makefile b/openwrt/target/linux/image/squashfs/Makefile index b5a51f8a3a6..a2b36718764 100644 --- a/openwrt/target/linux/image/squashfs/Makefile +++ b/openwrt/target/linux/image/squashfs/Makefile @@ -23,5 +23,5 @@ source: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) prepare: $(SQUASHFSLZMA_DIR)/.unpacked compile: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/mksquashfs-lzma install: -clean: +clean: FORCE rm -rf $(SQUASHFSLZMA_DIR) diff --git a/openwrt/target/linux/image/tgz.mk b/openwrt/target/linux/image/tgz.mk index 4ea84ebd477..506ab891aed 100644 --- a/openwrt/target/linux/image/tgz.mk +++ b/openwrt/target/linux/image/tgz.mk @@ -1,4 +1,4 @@ -$(KDIR)/root.tar.gz: +$(KDIR)/root.tar.gz: FORCE tar -zcf $@ --owner=root --group=root -C $(BUILD_DIR)/root/ . ifeq ($(BOARD),x86) diff --git a/openwrt/target/linux/image/x86/Makefile b/openwrt/target/linux/image/x86/Makefile index 5820d022bc0..8035d722f8e 100644 --- a/openwrt/target/linux/image/x86/Makefile +++ b/openwrt/target/linux/image/x86/Makefile @@ -4,33 +4,28 @@ KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) ifeq ($(FS),jffs2-8MB) - $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) $(CP) $^ $@ install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img - endif ifeq ($(FS),tgz) - $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz $(CP) $^ $@ install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz - endif $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/bzImage $(CP) $^ $@ - clean: prepare: compile: install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz -install-ib: +install-ib: FORCE mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ diff --git a/openwrt/target/linux/image/xscale/Makefile b/openwrt/target/linux/image/xscale/Makefile index 04a89f9b19e..cc47c25aba1 100644 --- a/openwrt/target/linux/image/xscale/Makefile +++ b/openwrt/target/linux/image/xscale/Makefile @@ -2,35 +2,29 @@ include $(TOPDIR)/rules.mk KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - ifeq ($(FS),jffs2-8MB) - $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) $(CP) $^ $@ install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img - endif ifeq ($(FS),tgz) - $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz $(CP) $^ $@ install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz - endif $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/vmlinux $(CP) $^ $@ - clean: prepare: compile: install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz -install-ib: +install-ib: FORCE mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ diff --git a/openwrt/target/linux/imagebuilder/Makefile b/openwrt/target/linux/imagebuilder/Makefile index 4afb4d45a75..53e8dfc58ba 100644 --- a/openwrt/target/linux/imagebuilder/Makefile +++ b/openwrt/target/linux/imagebuilder/Makefile @@ -21,12 +21,12 @@ endef include ./kernel.mk -clean: +clean: FORCE @rm -rf $(LINUX_BUILD_DIR)/root* @rm -rf $(BIN_DIR) all: -build: +build: FORCE echo echo '### BUILDING IMAGE FROM lists/$(LIST).$(BOARD)-$(KERNEL)' echo diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index fc337543e0f..346fb7fad90 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -72,7 +72,7 @@ $(BUILD_DIR)/kernel.mk: FORCE echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ -pkg-install: +pkg-install: FORCE @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; } source: $(DL_DIR)/$(LINUX_SOURCE) @@ -84,24 +84,21 @@ compile: prepare $(STAMP_DIR)/.linux-compile install: compile $(LINUX_KERNEL) -mostlyclean: +mostlyclean: FORCE rm -f $(STAMP_DIR)/.linux-compile rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean rm -f $(LINUX_KERNEL) -rebuild: +rebuild: FORCE -$(MAKE) mostlyclean if [ -f $(LINUX_KERNEL) ]; then \ $(MAKE) clean; \ fi $(MAKE) compile $(MAKE_TRACE) -clean: +clean: FORCE rm -f $(STAMP_DIR)/.linux-compile rm -rf $(LINUX_BUILD_DIR) rm -f $(TARGETS) - -.PHONY: source prepare compile install mostlyclean rebuild clean pkg-install - diff --git a/openwrt/target/linux/package/Makefile b/openwrt/target/linux/package/Makefile index ecaae0a41aa..a8f01ff5eff 100644 --- a/openwrt/target/linux/package/Makefile +++ b/openwrt/target/linux/package/Makefile @@ -26,22 +26,22 @@ install: $(patsubst %,%-install,$(package-y)) KPKG_MAKEOPTS += BUILD_DIR="$(LINUX_BUILD_DIR)" -%-prepare: +%-prepare: FORCE $(MAKE) -C $(patsubst %-prepare,%,$@) \ $(KPKG_MAKEOPTS) \ prepare -%-compile: +%-compile: FORCE $(MAKE) -C $(patsubst %-compile,%,$@) \ $(KPKG_MAKEOPTS) \ compile -%-install: +%-install: FORCE $(MAKE) -C $(patsubst %-install,%,$@) \ $(KPKG_MAKEOPTS) \ install -%-clean: +%-clean: FORCE @$(MAKE) -C $(patsubst %-clean,%,$@) \ $(KPKG_MAKEOPTS) \ clean diff --git a/openwrt/target/lzma/Makefile b/openwrt/target/lzma/Makefile index d68a5d4b793..b358a9efce8 100644 --- a/openwrt/target/lzma/Makefile +++ b/openwrt/target/lzma/Makefile @@ -36,18 +36,18 @@ lzma: $(TARGETS) lzma-source: $(DL_DIR)/$(LZMA_SOURCE) -lzma-clean: +lzma-clean: FORCE -$(MAKE) -C $(LZMA_LIB_DIR) clean -$(MAKE) -C $(LZMA_ALONE_DIR) clean rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma -lzma-dirclean: +lzma-dirclean: FORCE rm -rf $(LZMA_DIR) ############################################################# prepare: $(LZMA_DIR)/.unpacked compile: lzma -install: lzma +install: lzma FORCE $(CP) $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/ clean: lzma-dirclean diff --git a/openwrt/target/utils/Makefile b/openwrt/target/utils/Makefile index 5b0f2470b48..fe354754ce6 100644 --- a/openwrt/target/utils/Makefile +++ b/openwrt/target/utils/Makefile @@ -5,12 +5,12 @@ TARGETS := addpattern trx motorola-bin dgfirmware UTILS_BUILD_DIR:=$(BUILD_DIR)/target-utils prepare: $(UTILS_BUILD_DIR) -compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) +compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) FORCE mkdir -p $(STAGING_DIR)/bin $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ install: compile package: -clean: +clean: FORCE rm -rf $(UTILS_BUILD_DIR) for f in $(TARGETS); do \ rm -f $(STAGING_DIR)/bin/$$f ; \ diff --git a/openwrt/toolchain/Config.in b/openwrt/toolchain/Config.in index d376c146256..3f0d13fe9ce 100644 --- a/openwrt/toolchain/Config.in +++ b/openwrt/toolchain/Config.in @@ -6,6 +6,13 @@ menuconfig TOOLCHAINOPTS source "toolchain/binutils/Config.in" source "toolchain/gcc/Config.in" +config GDB + bool + prompt "Build gdb" if TOOLCHAINOPTS + default n + help + Enable if you want to build the gdb + config ENABLE_MULTILIB bool prompt "Enable multilib support?" if TOOLCHAINOPTS diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index 8a39def3744..8e26db562b7 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -1,9 +1,10 @@ # Main makefile for the toolchain include $(TOPDIR)/rules.mk -TARGETS:=sed utils binutils gcc uClibc ipkg-utils gdb libnotimpl +TARGETS-y:=sed utils binutils gcc uClibc ipkg-utils libnotimpl +TARGETS-$(CONFIG_GDB) += gdb -TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS)) -TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) +TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y)) +TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y)) all: install install: $(TARGETS_INSTALL) @@ -18,18 +19,18 @@ gcc-compile: uClibc-install TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles $(TOOLCHAIN_STAMP_DIR): - mkdir -p $(TOOLCHAIN_STAMP_DIR) + mkdir -p $@ $(STAGING_DIR): - @mkdir -p $(STAGING_DIR)/lib - @mkdir -p $(STAGING_DIR)/include - @mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) - @ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib + @mkdir -p $@/lib + @mkdir -p $@/include + @mkdir -p $@/$(REAL_GNU_TARGET_NAME) + @ln -sf ../lib $@/$(REAL_GNU_TARGET_NAME)/lib $(TOOL_BUILD_DIR): - @mkdir -p $(TOOL_BUILD_DIR) + @mkdir -p $@ -%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) +%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \ } @@ -47,7 +48,7 @@ $(TOOL_BUILD_DIR): } @touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ -%-clean: +%-clean: FORCE @$(MAKE) -C $(patsubst %-clean,%,$@) clean @rm -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-* diff --git a/openwrt/toolchain/binutils/Makefile b/openwrt/toolchain/binutils/Makefile index 7d405664bb0..43755c5fb6b 100644 --- a/openwrt/toolchain/binutils/Makefile +++ b/openwrt/toolchain/binutils/Makefile @@ -5,8 +5,7 @@ include $(TOPDIR)/rules.mk # build binutils for use on the host system # ############################################################# -BINUTILS_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION))) -#" +BINUTILS_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#")) BINUTILS_SITE:=http://www.fr.kernel.org/pub/linux/devel/binutils \ http://www.fi.kernel.org/pub/linux/devel/binutils \ @@ -99,7 +98,7 @@ source: $(DL_DIR)/$(BINUTILS_SOURCE) prepare: $(BINUTILS_DIR)/.patched compile: $(BINUTILS_DIR1)/binutils/objdump install: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-ld -clean: +clean: FORCE rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* rm -rf $(BINUTILS_DIR) $(BINUTILS_DIR1) diff --git a/openwrt/toolchain/gcc/Makefile b/openwrt/toolchain/gcc/Makefile index 1ce00101b5b..b0686297d00 100644 --- a/openwrt/toolchain/gcc/Makefile +++ b/openwrt/toolchain/gcc/Makefile @@ -145,7 +145,7 @@ $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) all touch $(GCC_BUILD_DIR2)/.compiled -gcc-install: $(GCC_BUILD_DIR2)/.compiled +gcc-install: $(GCC_BUILD_DIR2)/.compiled FORCE PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install echo $(GCC_VERSION) > $(STAGING_DIR)/gcc_version # Set up the symlinks to enable lying about target name. diff --git a/openwrt/toolchain/gdb/Makefile b/openwrt/toolchain/gdb/Makefile index b1a2ad5fe55..f122881a741 100644 --- a/openwrt/toolchain/gdb/Makefile +++ b/openwrt/toolchain/gdb/Makefile @@ -55,5 +55,5 @@ source: $(DL_DIR)/$(GDB_SOURCE) prepare: $(GDB_DIR)/.patched compile: install: $(TARGET_CROSS)gdb -clean: +clean: FORCE rm -rf $(GDB_CLIENT_DIR) $(GDB_DIR) diff --git a/openwrt/toolchain/ipkg-utils/Makefile b/openwrt/toolchain/ipkg-utils/Makefile index 41c78fc24e1..0183257b3d1 100644 --- a/openwrt/toolchain/ipkg-utils/Makefile +++ b/openwrt/toolchain/ipkg-utils/Makefile @@ -40,14 +40,11 @@ $(STAGING_DIR)/usr/bin/ipkg-build: $(PKG_BUILD_DIR)/.patched install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin source: $(DL_DIR)/$(PKG_SOURCE_FILE) - prepare: $(PKG_BUILD_DIR)/.patched - compile: - install: $(STAGING_DIR)/usr/bin/ipkg-build -clean: +clean: FORCE rm -f $(STAGING_DIR)/etc/ipkg.conf rm -f $(STAGING_DIR)/usr/bin/ipkg* rm -rf $(PKG_BUILD_DIR) diff --git a/openwrt/toolchain/libnotimpl/Makefile b/openwrt/toolchain/libnotimpl/Makefile index f68346c3712..86ab927c124 100644 --- a/openwrt/toolchain/libnotimpl/Makefile +++ b/openwrt/toolchain/libnotimpl/Makefile @@ -24,7 +24,7 @@ source: prepare: $(LIBNOTIMPL_DIR)/.prepared compile: $(LIBNOTIMPL_DIR)/libnotimpl.a install: $(STAGING_DIR)/usr/lib/libnotimpl.a -clean: +clean: FORCE rm -rf \ $(STAGING_DIR)/usr/lib/libnotimpl.a \ $(LIBNOTIMPL_DIR) \ diff --git a/openwrt/toolchain/sed/Makefile b/openwrt/toolchain/sed/Makefile index 637bc6597b3..e14aadd8ff1 100644 --- a/openwrt/toolchain/sed/Makefile +++ b/openwrt/toolchain/sed/Makefile @@ -46,7 +46,7 @@ $(SED_DIR1)/$(SED_BINARY): $(SED_DIR1)/.configured $(MAKE) -C $(SED_DIR1) # This stuff is needed to work around GNU make deficiencies -build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) +build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) FORCE @if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \ rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi; @if [ ! -f $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) \ @@ -58,7 +58,7 @@ build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \ $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi -use-sed-host-binary: +use-sed-host-binary: FORCE @if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \ if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \ mkdir -p $(STAGING_DIR)/bin; \ @@ -69,7 +69,7 @@ source: prepare: compile: install: $(HOST_SED_TARGET) -clean: +clean: FORCE rm -rf $(SED_DIR1) rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY) diff --git a/openwrt/toolchain/uClibc/Makefile b/openwrt/toolchain/uClibc/Makefile index 1fd9b4a3bdf..f7691e4f1b0 100644 --- a/openwrt/toolchain/uClibc/Makefile +++ b/openwrt/toolchain/uClibc/Makefile @@ -9,15 +9,16 @@ include $(TOPDIR)/rules.mk ifeq ($(CONFIG_UCLIBC_VERSION_SNAPSHOT),y) # Be aware that this changes daily.... UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc -UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(CONFIG_USE_UCLIBC_SNAPSHOT))).tar.bz2 -#" +UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(CONFIG_USE_UCLIBC_SNAPSHOT))).tar.bz2#")) UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots UCLIBC_VER:=PKG_VERSION:=0.${shell date +"%G%m%d"} +UCLIBC_MD5SUM:=x else UCLIBC_VER:=0.9.28 UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_VER) UCLIBC_SOURCE:=uClibc-$(UCLIBC_VER).tar.bz2 UCLIBC_SITE:=http://www.uclibc.org/downloads +UCLIBC_MD5SUM:=1ada58d919a82561061e4741fb6abd29 endif UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ @@ -37,7 +38,7 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ $(DL_DIR)/$(UCLIBC_SOURCE): mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(UCLIBC_SOURCE) x $(UCLIBC_SITE) + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(UCLIBC_SOURCE) $(UCLIBC_MD5SUM) $(UCLIBC_SITE) $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) mkdir -p $(TOOL_BUILD_DIR) @@ -99,5 +100,5 @@ source: $(DL_DIR)/$(UCLIBC_SOURCE) prepare: $(UCLIBC_DIR)/.configured compile: $(UCLIBC_DIR)/lib/libc.a install: $(STAGING_DIR)/lib/libc.a $(UCLIBC_TARGETS) -clean: +clean: FORCE rm -rf $(UCLIBC_DIR) $(TOOL_BUILD_DIR)/uClibc_dev diff --git a/openwrt/toolchain/utils/Makefile b/openwrt/toolchain/utils/Makefile index 2af6b139dfd..65e488f4e5e 100644 --- a/openwrt/toolchain/utils/Makefile +++ b/openwrt/toolchain/utils/Makefile @@ -14,7 +14,7 @@ install: compile mkdir -p $(STAGING_DIR)/bin $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ package: -clean: +clean: FORCE rm -rf $(UTILS_BUILD_DIR) $(UTILS_BUILD_DIR): From d59800bbe15aa8881cd6ce84d54256c0b535d507 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 23:36:37 +0000 Subject: [PATCH 121/757] fix busybox build SVN-Revision: 3878 --- openwrt/package/busybox/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 3968f187538..aac9d21e323 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -38,7 +38,7 @@ endef define Package/busybox/install $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(1)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install - rmdir $(1)/lib64 + -rm -rf $(1)/lib64 endef $(eval $(call BuildPackage,busybox)) From e0b3512e743ec2c1f9f8ed3572876b18e5c2e8ef Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 31 May 2006 23:45:06 +0000 Subject: [PATCH 122/757] allow parallel build of binutils SVN-Revision: 3879 --- openwrt/toolchain/binutils/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openwrt/toolchain/binutils/Makefile b/openwrt/toolchain/binutils/Makefile index 43755c5fb6b..c161370e99a 100644 --- a/openwrt/toolchain/binutils/Makefile +++ b/openwrt/toolchain/binutils/Makefile @@ -59,12 +59,12 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched touch $(BINUTILS_DIR1)/.configured $(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured - $(MAKE) -C $(BINUTILS_DIR1) all + $(MAKE) -C $(BINUTILS_DIR1) -j $(CONFIG_JLEVEL) all # Make install will put gettext data in staging_dir/share/locale. # Unfortunatey, it isn't configureable. $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-ld: $(BINUTILS_DIR1)/binutils/objdump - $(MAKE) -C $(BINUTILS_DIR1) install + $(MAKE) -C $(BINUTILS_DIR1) -j $(CONFIG_JLEVEL) install ############################################################# @@ -92,7 +92,7 @@ $(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched $(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured PATH=$(TARGET_PATH) \ - $(MAKE) -C $(BINUTILS_DIR2) all + $(MAKE) -C $(BINUTILS_DIR2) -j $(CONFIG_JLEVEL) all source: $(DL_DIR)/$(BINUTILS_SOURCE) prepare: $(BINUTILS_DIR)/.patched From e5fda9318f3874493e4ceb23e77e5a084d0282c1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 00:06:16 +0000 Subject: [PATCH 123/757] fix InstallDev bug SVN-Revision: 3880 --- openwrt/package/rules.mk | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 5d604c50451..e06ddb11c30 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -32,6 +32,10 @@ define Build/DefaultTargets $(PKG_BUILD_DIR)/.dev-installed: $(PKG_BUILD_DIR)/.built $(call Build/InstallDev) touch $$@ + + ifdef Build/InstallDev + compile-targets: $(PKG_BUILD_DIR)/.dev-installed + endif package-clean: FORCE $(call Build/Clean) @@ -241,16 +245,10 @@ define Build/Compile $(call Build/Compile/Default,) endef -define Build/InstallDev -endef - define Build/Clean $(MAKE) clean endef -define Build/UninstallDev -endef - ifneq ($(DUMP),) dumpinfo: FORCE @$(DUMPINFO) @@ -263,11 +261,7 @@ else prepare: $(PKG_BUILD_DIR)/.prepared configure: $(PKG_BUILD_DIR)/.configured -ifdef Build/InstallDev - compile-targets: $(PKG_BUILD_DIR)/.dev-installed -else compile-targets: -endif compile: compile-targets install-targets: From 207bbb56d46cadd356ff19ebf71b2c604e25d8f5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 00:18:45 +0000 Subject: [PATCH 124/757] remove broken dependency SVN-Revision: 3881 --- openwrt/package/ipset/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index 7358f03a7c5..b5b9c784ed7 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -17,7 +17,6 @@ include $(TOPDIR)/package/rules.mk define Package/ipset SECTION:=base CATEGORY:=Network -DEPENDS:=+kmod-iptables-extra TITLE:=Netfilter ip sets administration utility DESCRIPTION:=Netfilter ip sets administration utility URL:=http://ipset.netfilter.org/ From a455258789eedf91d947c529789fd247349bef36 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 00:19:52 +0000 Subject: [PATCH 125/757] add clean targets, more FORCE stuff SVN-Revision: 3882 --- openwrt/Makefile | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 40b4efc0448..84508b1ffcf 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -61,36 +61,45 @@ scripts/config/mconf: .config.in scripts/config/conf: .config.in $(MAKE) -C scripts/config conf -config: scripts/config/conf +config: scripts/config/conf FORCE $< Config.in -defdconfig: scripts/config/conf +defdconfig: scripts/config/conf FORCE $< -d Config.in -oldconfig: scripts/config/conf +oldconfig: scripts/config/conf FORCE $< -o Config.in -menuconfig: scripts/config/mconf +menuconfig: scripts/config/mconf FORCE $< Config.in -config-clean: +config-clean: FORCE $(MAKE) -C scripts/config clean -package/%: .pkginfo +package/%: .pkginfo FORCE $(MAKE) -C package $(patsubst package/%,%,$@) -target/%: .pkginfo +target/%: .pkginfo FORCE $(MAKE) -C target $(patsubst target/%,%,$@) -toolchain/%: +toolchain/%: FORCE $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) -world: +world: FORCE $(MAKE) toolchain/install $(MAKE) target/compile $(MAKE) package/compile $(MAKE) package/install $(MAKE) target/install +clean: FORCE + rm -rf build_* bin + +dirclean: clean FORCE + rm -rf staging_dir_* toolchain_build_* + +distclean: dirclean FORCE + rm -rf .* dl + .PHONY: FORCE FORCE: From 8f353e3b6b538ad6807c134d28ec6081937923e3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 00:28:12 +0000 Subject: [PATCH 126/757] add TARGET_CONFIGURE_OPTS to default compile command SVN-Revision: 3883 --- openwrt/package/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index e06ddb11c30..61c2ae3eb08 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -232,6 +232,7 @@ endef define Build/Compile/Default $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ CC=$(TARGET_CC) \ CROSS="$(TARGET_CROSS)" \ PREFIX="$$(IDIR_$(1))" \ From 86aca71a36a3be3db65ba213bfb5afd5a52664bd Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 00:31:20 +0000 Subject: [PATCH 127/757] remove some debugging code, include package/rules.mk in package dependency check SVN-Revision: 3884 --- openwrt/package/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 61c2ae3eb08..4a8d947161c 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -6,11 +6,11 @@ endif define Build/DefaultTargets ifeq ($(DUMP),) - ifeq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . | tee /tmp/xy1),.) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(TOPDIR)/package/rules.mk),$(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/.prepared: package-clean endif - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR) | tee /tmp/xy2),$(IPKG_$(1))) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) $(PKG_BUILD_DIR)/.built: package-rebuild endif endif From c8ec7f76470dddcce6139cc2db28195052a71126 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 00:47:29 +0000 Subject: [PATCH 128/757] fix dependency problem SVN-Revision: 3885 --- openwrt/target/linux/kernel.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index 346fb7fad90..4b8bf139d41 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -8,9 +8,12 @@ KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg $(TARGETS): $(PACKAGE_DIR) +$(LINUX_DIR): + mkdir -p $@ + $(PACKAGE_DIR): - mkdir -p $(PACKAGE_DIR) - + mkdir -p $@ + $(DL_DIR)/$(LINUX_SOURCE): -mkdir -p $(DL_DIR) $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) @@ -67,7 +70,7 @@ $(KERNEL_IPKG): fi $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) -$(BUILD_DIR)/kernel.mk: FORCE +$(BUILD_DIR)/kernel.mk: $(LINUX_DIR) FORCE echo "BOARD:=$(BOARD)" > $@ echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ From 12090bfed09f3ab5190a619a947b9a8e33ee5108 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 01:06:23 +0000 Subject: [PATCH 129/757] some bugfixes and additions for the default compile target SVN-Revision: 3886 --- openwrt/package/rules.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 4a8d947161c..fe16a18f987 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -235,10 +235,8 @@ define Build/Compile/Default $(TARGET_CONFIGURE_OPTS) \ CC=$(TARGET_CC) \ CROSS="$(TARGET_CROSS)" \ - PREFIX="$$(IDIR_$(1))" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \ ARCH="$(ARCH)" \ - DESTDIR="$$(IDIR_$(1))" \ $(1); endef From 38e0f11f41ebe4a3fce4134debcedda8e7118c42 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 01:17:20 +0000 Subject: [PATCH 130/757] add broadcom include files, fix build SVN-Revision: 3887 --- openwrt/package/nvram/src/Makefile | 3 +- openwrt/package/nvram/src/include/bcmnvram.h | 148 +++ openwrt/package/nvram/src/include/bcmutils.h | 157 +++ openwrt/package/nvram/src/include/cy_conf.h | 69 ++ openwrt/package/nvram/src/include/epivers.h | 69 ++ .../package/nvram/src/include/proto/802.11.h | 852 +++++++++++++ .../nvram/src/include/proto/ethernet.h | 179 +++ openwrt/package/nvram/src/include/shutils.h | 200 +++ openwrt/package/nvram/src/include/typedefs.h | 293 +++++ openwrt/package/nvram/src/include/utils.h | 131 ++ openwrt/package/nvram/src/include/wlcompat.h | 36 + openwrt/package/nvram/src/include/wlioctl.h | 1097 +++++++++++++++++ openwrt/package/nvram/src/include/wlutils.h | 59 + 13 files changed, 3291 insertions(+), 2 deletions(-) create mode 100644 openwrt/package/nvram/src/include/bcmnvram.h create mode 100644 openwrt/package/nvram/src/include/bcmutils.h create mode 100644 openwrt/package/nvram/src/include/cy_conf.h create mode 100644 openwrt/package/nvram/src/include/epivers.h create mode 100644 openwrt/package/nvram/src/include/proto/802.11.h create mode 100644 openwrt/package/nvram/src/include/proto/ethernet.h create mode 100644 openwrt/package/nvram/src/include/shutils.h create mode 100644 openwrt/package/nvram/src/include/typedefs.h create mode 100644 openwrt/package/nvram/src/include/utils.h create mode 100644 openwrt/package/nvram/src/include/wlcompat.h create mode 100644 openwrt/package/nvram/src/include/wlioctl.h create mode 100644 openwrt/package/nvram/src/include/wlutils.h diff --git a/openwrt/package/nvram/src/Makefile b/openwrt/package/nvram/src/Makefile index 376c2b7de77..3d98209e858 100644 --- a/openwrt/package/nvram/src/Makefile +++ b/openwrt/package/nvram/src/Makefile @@ -1,13 +1,12 @@ # $Id$ -EXTRA_CFLAGS := -c -I. -I../include LIBSHARED_OBJS := shutils.o wl.o wl_linux.o defaults.o linux_timer.o LIBNVRAM_OBJS := nvram_linux.o nvram_convert.o all: libshared.so libnvram.so nvram %.o: %.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -I. -Iinclude -o $@ $^ libshared.so: $(LIBSHARED_OBJS) $(CC) -shared -o $@ $^ diff --git a/openwrt/package/nvram/src/include/bcmnvram.h b/openwrt/package/nvram/src/include/bcmnvram.h new file mode 100644 index 00000000000..3c452634e81 --- /dev/null +++ b/openwrt/package/nvram/src/include/bcmnvram.h @@ -0,0 +1,148 @@ +/* + * NVRAM variable manipulation + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#ifndef _bcmnvram_h_ +#define _bcmnvram_h_ + +#ifndef _LANGUAGE_ASSEMBLY + +#include <typedefs.h> + +struct nvram_header { + uint32 magic; + uint32 len; + uint32 crc_ver_init; /* 0:7 crc, 8:15 ver, 16:27 init, mem. test 28, 29-31 reserved */ + uint32 config_refresh; /* 0:15 config, 16:31 refresh */ + uint32 config_ncdl; /* ncdl values for memc */ +}; + +struct nvram_tuple { + char *name; + char *value; + struct nvram_tuple *next; +}; + +/* + * Initialize NVRAM access. May be unnecessary or undefined on certain + * platforms. + */ +extern int nvram_init(void *sbh); + +/* + * Disable NVRAM access. May be unnecessary or undefined on certain + * platforms. + */ +extern void nvram_exit(void); + +/* + * Get the value of an NVRAM variable. The pointer returned may be + * invalid after a set. + * @param name name of variable to get + * @return value of variable or NULL if undefined + */ +extern char * nvram_get(const char *name); + +/* + * Get the value of an NVRAM variable. + * @param name name of variable to get + * @return value of variable or NUL if undefined + */ +#define nvram_safe_get(name) (nvram_get(name) ? : "") + +#define nvram_safe_unset(name) ({ \ + if(nvram_get(name)) \ + nvram_unset(name); \ +}) + +#define nvram_safe_set(name, value) ({ \ + if(!nvram_get(name) || strcmp(nvram_get(name), value)) \ + nvram_set(name, value); \ +}) + +/* + * Match an NVRAM variable. + * @param name name of variable to match + * @param match value to compare against value of variable + * @return TRUE if variable is defined and its value is string equal + * to match or FALSE otherwise + */ +static INLINE int +nvram_match(char *name, char *match) { + const char *value = nvram_get(name); + return (value && !strcmp(value, match)); +} + +/* + * Inversely match an NVRAM variable. + * @param name name of variable to match + * @param match value to compare against value of variable + * @return TRUE if variable is defined and its value is not string + * equal to invmatch or FALSE otherwise + */ +static INLINE int +nvram_invmatch(char *name, char *invmatch) { + const char *value = nvram_get(name); + return (value && strcmp(value, invmatch)); +} + +/* + * Set the value of an NVRAM variable. The name and value strings are + * copied into private storage. Pointers to previously set values + * may become invalid. The new value may be immediately + * retrieved but will not be permanently stored until a commit. + * @param name name of variable to set + * @param value value of variable + * @return 0 on success and errno on failure + */ +extern int nvram_set(const char *name, const char *value); + +/* + * Unset an NVRAM variable. Pointers to previously set values + * remain valid until a set. + * @param name name of variable to unset + * @return 0 on success and errno on failure + * NOTE: use nvram_commit to commit this change to flash. + */ +extern int nvram_unset(const char *name); + +/* + * Commit NVRAM variables to permanent storage. All pointers to values + * may be invalid after a commit. + * NVRAM values are undefined after a commit. + * @return 0 on success and errno on failure + */ +extern int nvram_commit(void); + +/* + * Get all NVRAM variables (format name=value\0 ... \0\0). + * @param buf buffer to store variables + * @param count size of buffer in bytes + * @return 0 on success and errno on failure + */ +extern int nvram_getall(char *buf, int count); + +extern int file2nvram(char *filename, char *varname); +extern int nvram2file(char *varname, char *filename); + +#endif /* _LANGUAGE_ASSEMBLY */ + +#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */ +#define NVRAM_VERSION 1 +#define NVRAM_HEADER_SIZE 20 +#define NVRAM_SPACE 0x8000 +#define FLASH_BASE 0xbfc00000 /* Extif core */ +#define FLASH_MIN 0x00100000 /* Minimum flash size */ +#define FLASH_MAX 0x00400000 /* Maximum flash size with extif */ + +#endif /* _bcmnvram_h_ */ diff --git a/openwrt/package/nvram/src/include/bcmutils.h b/openwrt/package/nvram/src/include/bcmutils.h new file mode 100644 index 00000000000..05ad41d9d80 --- /dev/null +++ b/openwrt/package/nvram/src/include/bcmutils.h @@ -0,0 +1,157 @@ +/* + * Misc useful os-independent macros and functions. + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id$ + */ + +#ifndef _bcmutils_h_ +#define _bcmutils_h_ + +#ifndef MIN +#define MIN(a, b) (((a)<(b))?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a, b) (((a)>(b))?(a):(b)) +#endif + +#define CEIL(x, y) (((x) + ((y)-1)) / (y)) +#define ROUNDUP(x, y) ((((ulong)(x)+((y)-1))/(y))*(y)) +#define ISALIGNED(a, x) (((uint)(a) & ((x)-1)) == 0) +#define ISPOWEROF2(x) ((((x)-1)&(x))==0) +#define OFFSETOF(type, member) ((uint) &((type *)0)->member) +#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) + +/* bit map related macros */ +#ifndef setbit +#define NBBY 8 /* 8 bits per byte */ +#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) +#endif + +#define NBITS(type) (sizeof (type) * 8) + +#define _BCM_U 0x01 /* upper */ +#define _BCM_L 0x02 /* lower */ +#define _BCM_D 0x04 /* digit */ +#define _BCM_C 0x08 /* cntrl */ +#define _BCM_P 0x10 /* punct */ +#define _BCM_S 0x20 /* white space (space/lf/tab) */ +#define _BCM_X 0x40 /* hex digit */ +#define _BCM_SP 0x80 /* hard space (0x20) */ + +extern unsigned char bcm_ctype[]; +#define bcm_ismask(x) (bcm_ctype[(int)(unsigned char)(x)]) + +#define bcm_isalnum(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L|_BCM_D)) != 0) +#define bcm_isalpha(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L)) != 0) +#define bcm_iscntrl(c) ((bcm_ismask(c)&(_BCM_C)) != 0) +#define bcm_isdigit(c) ((bcm_ismask(c)&(_BCM_D)) != 0) +#define bcm_isgraph(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D)) != 0) +#define bcm_islower(c) ((bcm_ismask(c)&(_BCM_L)) != 0) +#define bcm_isprint(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D|_BCM_SP)) != 0) +#define bcm_ispunct(c) ((bcm_ismask(c)&(_BCM_P)) != 0) +#define bcm_isspace(c) ((bcm_ismask(c)&(_BCM_S)) != 0) +#define bcm_isupper(c) ((bcm_ismask(c)&(_BCM_U)) != 0) +#define bcm_isxdigit(c) ((bcm_ismask(c)&(_BCM_D|_BCM_X)) != 0) + +/* + * Spin at most 'us' microseconds while 'exp' is true. + * Caller should explicitly test 'exp' when this completes + * and take appropriate error action if 'exp' is still true. + */ +#define SPINWAIT(exp, us) { \ + uint countdown = (us) + 9; \ + while ((exp) && (countdown >= 10)) {\ + OSL_DELAY(10); \ + countdown -= 10; \ + } \ +} + +/* generic osl packet queue */ +struct pktq { + void *head; /* first packet to dequeue */ + void *tail; /* last packet to dequeue */ + uint len; /* number of queued packets */ + uint maxlen; /* maximum number of queued packets */ + bool priority; /* enqueue by packet priority */ +}; +#define DEFAULT_QLEN 128 + +#define pktq_len(q) ((q)->len) +#define pktq_avail(q) ((q)->maxlen - (q)->len) +#define pktq_head(q) ((q)->head) +#define pktq_full(q) ((q)->len >= (q)->maxlen) + +/* crc defines */ +#define CRC8_INIT_VALUE 0xff /* Initial CRC8 checksum value */ +#define CRC8_GOOD_VALUE 0x9f /* Good final CRC8 checksum value */ +#define CRC16_INIT_VALUE 0xffff /* Initial CRC16 checksum value */ +#define CRC16_GOOD_VALUE 0xf0b8 /* Good final CRC16 checksum value */ +#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ +#define CRC32_GOOD_VALUE 0xdebb20e3 /* Good final CRC32 checksum value */ + +/* tag_ID/length/value_buffer tuple */ +typedef struct bcm_tlv { + uint8 id; + uint8 len; + uint8 data[1]; +} bcm_tlv_t; + +/* Check that bcm_tlv_t fits into the given buflen */ +#define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (buflen) >= 2 + (elt)->len) + +/* buffer length for ethernet address from bcm_ether_ntoa() */ +#define ETHER_ADDR_STR_LEN 18 + +/* +* load 32-bit value from unaligned byte array +*/ +#ifdef IL_BIGENDIAN +#define load32_ua(a) ((((uint8 *)(a))[0] << 24) + (((uint8 *)(a))[1] << 16) + \ + (((uint8 *)(a))[2] << 8) + ((uint8 *)(a))[3]) +#else +#define load32_ua(a) ((((uint8 *)(a))[3] << 24) + (((uint8 *)(a))[2] << 16) + \ + (((uint8 *)(a))[1] << 8) + ((uint8 *)(a))[0]) +#endif + +/* externs */ +extern uint bcm_atoi(char *s); +extern uchar bcm_toupper(uchar c); +extern ulong bcm_strtoul(char *cp, char **endp, uint base); +extern void deadbeef(char *p, uint len); +extern void prhex(char *msg, uchar *buf, uint len); +extern void prpkt(char *msg, void *drv, void *p0); +extern uint pktcopy(void *drv, void *p, uint offset, int len, uchar *buf); +extern uint pkttotlen(void *drv, void *); +extern uchar *bcm_ether_ntoa(char *ea, char *buf); +extern int bcm_ether_atoe(char *p, char *ea); +extern void bcm_mdelay(uint ms); +extern char *getvar(char *vars, char *name); +extern int getintvar(char *vars, char *name); +extern char *bcmstrstr(char *haystack, char *needle); + +extern uint8 crc8(uint8 *p, uint nbytes, uint8 crc); +extern uint16 crc16(uint8 *p, uint nbytes, uint16 crc); +extern uint32 crc32(uint8 *p, uint nbytes, uint32 crc); +extern bcm_tlv_t *bcm_next_tlv(bcm_tlv_t *elt, int *buflen); +extern bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen, uint key); +extern bcm_tlv_t *bcm_parse_ordered_tlvs(void *buf, int buflen, uint key); +extern void pktq_init(struct pktq *q, uint maxlen, bool priority); +extern bool pktenq(struct pktq *q, void *p, bool lifo); +extern void *pktdeq(struct pktq *q); + +#define bcmlog(fmt, a1, a2) +#define bcmdumplog(buf, size) *buf = '\0' +#define bcmdumplogent(buf, idx) -1 + +#endif /* _bcmutils_h_ */ diff --git a/openwrt/package/nvram/src/include/cy_conf.h b/openwrt/package/nvram/src/include/cy_conf.h new file mode 100644 index 00000000000..dbe387b83bc --- /dev/null +++ b/openwrt/package/nvram/src/include/cy_conf.h @@ -0,0 +1,69 @@ + +#define DNSMASQ_SUPPORT 1 +#define CONFIG_DNSMASQ y +#define UDHCPD_SUPPORT 1 +#define CONFIG_UDHCPD y +#define UDHCPC_SUPPORT 1 +#define CONFIG_UDHCPC y +#define PPPOE_SUPPORT 1 +#define CONFIG_PPPOE y +#define PPTP_SUPPORT 1 +#define CONFIG_PPTP y +#define L2TP_SUPPORT 1 +#define CONFIG_L2TP y +#define PPPD_SUPPORT 1 +#define CONFIG_PPPD y +#define ZEBRA_SUPPORT 1 +#define CONFIG_ZEBRA y +#define TFTPD_SUPPORT 1 +#define CONFIG_TFTPD y +#define DDNS_SUPPORT 1 +#define CONFIG_DDNS y +#define CRON_SUPPORT 1 +#define CONFIG_CRON y +#define HTTPD_SUPPORT 1 +#define CONFIG_HTTPD y +#define GET_POST_SUPPORT 1 +#define CONFIG_GET_POST y + +#if 1 +#define HEARTBEAT_SUPPORT 1 +#define CONFIG_HEARTBEAT y +#define MULTICAST_SUPPORT 1 +#define CONFIG_MULTICAST y +#define SETUP_WIZARD_SUPPORT 1 +#define CONFIG_SETUP_WIZARD y +#define PARENTAL_CONTROL_SUPPORT 1 +#define CONFIG_PARENTAL_CONTROL y +#define HTTPS_SUPPORT 1 +#define CONFIG_HTTPS y +#define EOU_SUPPORT 1 +#define CONFIG_EOU y +#define EZC_SUPPORT 1 +#define CONFIG_EZC y +#define WRITE_MAC_SUPPORT 1 +#define CONFIG_WRITE_MAC y +#define DIAG_SUPPORT 1 +#define CONFIG_DIAG y +#endif + +#define SPEED_BOOSTER_SUPPORT 1 +#define CONFIG_SPEED_BOOSTER y +#define XBOX_SUPPORT 1 +#define CONFIG_XBOX y + +#if 0 +#define MPPPOE_SUPPORT 1 +#define CONFIG_MPPPOE y +#define UNNUMBERIP_SUPPORT 1 +#define CONFIG_UNNUMBERIP y +#endif + +#define WL_STA_SUPPORT 1 +#define CONFIG_WL_STA y +#define BACKUP_RESTORE_SUPPORT 1 +#define CONFIG_BACKUP_RESTORE y +#define PORT_TRIGGER_SUPPORT 1 +#define CONFIG_PORT_TRIGGER y +#define HW_QOS_SUPPORT 1 +#define CONFIG_HW_QOS y diff --git a/openwrt/package/nvram/src/include/epivers.h b/openwrt/package/nvram/src/include/epivers.h new file mode 100644 index 00000000000..e174fb50d83 --- /dev/null +++ b/openwrt/package/nvram/src/include/epivers.h @@ -0,0 +1,69 @@ +/* + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + * +*/ + +#ifndef _epivers_h_ +#define _epivers_h_ + +#ifdef linux +#include <linux/config.h> +#endif + +/* Vendor Name, ASCII, 32 chars max */ +#ifdef COMPANYNAME +#define HPNA_VENDOR COMPANYNAME +#else +#define HPNA_VENDOR "Broadcom Corporation" +#endif + +/* Driver Date, ASCII, 32 chars max */ +#define HPNA_DRV_BUILD_DATE __DATE__ + +/* Hardware Manufacture Date, ASCII, 32 chars max */ +#define HPNA_HW_MFG_DATE "Not Specified" + +/* See documentation for Device Type values, 32 values max */ +#ifndef HPNA_DEV_TYPE + +#if defined(CONFIG_BRCM_VJ) +#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_DISPLAY } + +#elif defined(CONFIG_BCRM_93725) +#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_CM_BRIDGE, CDCF_V0_DEVICE_DISPLAY } + +#else +#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_PCINIC } + +#endif + +#endif /* !HPNA_DEV_TYPE */ + + +#define EPI_MAJOR_VERSION 3 + +#define EPI_MINOR_VERSION 60 + +#define EPI_RC_NUMBER 13 + +#define EPI_INCREMENTAL_NUMBER 0 + +#define EPI_BUILD_NUMBER 0 + +#define EPI_VERSION 3,60,13,0 + +#define EPI_VERSION_NUM 0x033c0d00 + +/* Driver Version String, ASCII, 32 chars max */ +#define EPI_VERSION_STR "3.60.13.0" +#define EPI_ROUTER_VERSION_STR "3.61.13.0" + +#endif /* _epivers_h_ */ diff --git a/openwrt/package/nvram/src/include/proto/802.11.h b/openwrt/package/nvram/src/include/proto/802.11.h new file mode 100644 index 00000000000..ea57850ce56 --- /dev/null +++ b/openwrt/package/nvram/src/include/proto/802.11.h @@ -0,0 +1,852 @@ +/* + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * Fundamental types and constants relating to 802.11 + * + * $Id$ + */ + +#ifndef _802_11_H_ +#define _802_11_H_ + +#ifndef _TYPEDEFS_H_ +#include <typedefs.h> +#endif + +#ifndef _NET_ETHERNET_H_ +#include <proto/ethernet.h> +#endif + +/* enable structure packing */ +#if !defined(__GNUC__) +#pragma pack(1) +#endif + +/* some platforms require stronger medicine */ +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#define PACKED +#endif + + +#define DOT11_TU_TO_US 1024 /* 802.11 Time Unit is 1024 microseconds */ + +/* Generic 802.11 frame constants */ +#define DOT11_A3_HDR_LEN 24 +#define DOT11_A4_HDR_LEN 30 +#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN +#define DOT11_FCS_LEN 4 +#define DOT11_ICV_LEN 4 +#define DOT11_ICV_AES_LEN 8 +#define DOT11_QOS_LEN 2 + +#define DOT11_KEY_INDEX_SHIFT 6 +#define DOT11_IV_LEN 4 +#define DOT11_IV_TKIP_LEN 8 +#define DOT11_IV_AES_OCB_LEN 4 +#define DOT11_IV_AES_CCM_LEN 8 + +/* Includes MIC */ +#define DOT11_MAX_MPDU_BODY_LEN 2304 +/* A4 header + QoS + CCMP + PDU + ICV + FCS = 2352 */ +#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \ + DOT11_QOS_LEN + \ + DOT11_IV_AES_CCM_LEN + \ + DOT11_MAX_MPDU_BODY_LEN + \ + DOT11_ICV_LEN + \ + DOT11_FCS_LEN) + +#define DOT11_MAX_SSID_LEN 32 + +/* dot11RTSThreshold */ +#define DOT11_DEFAULT_RTS_LEN 2347 +#define DOT11_MAX_RTS_LEN 2347 + +/* dot11FragmentationThreshold */ +#define DOT11_MIN_FRAG_LEN 256 +#define DOT11_MAX_FRAG_LEN 2346 /* Max frag is also limited by aMPDUMaxLength of the attached PHY */ +#define DOT11_DEFAULT_FRAG_LEN 2346 + +/* dot11BeaconPeriod */ +#define DOT11_MIN_BEACON_PERIOD 1 +#define DOT11_MAX_BEACON_PERIOD 0xFFFF + +/* dot11DTIMPeriod */ +#define DOT11_MIN_DTIM_PERIOD 1 +#define DOT11_MAX_DTIM_PERIOD 0xFF + +/* 802.2 LLC/SNAP header used by 802.11 per 802.1H */ +#define DOT11_LLC_SNAP_HDR_LEN 8 +#define DOT11_OUI_LEN 3 +struct dot11_llc_snap_header { + uint8 dsap; /* always 0xAA */ + uint8 ssap; /* always 0xAA */ + uint8 ctl; /* always 0x03 */ + uint8 oui[DOT11_OUI_LEN]; /* RFC1042: 0x00 0x00 0x00 + Bridge-Tunnel: 0x00 0x00 0xF8 */ + uint16 type; /* ethertype */ +} PACKED; + +/* RFC1042 header used by 802.11 per 802.1H */ +#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN) + +/* Generic 802.11 MAC header */ +/* + * N.B.: This struct reflects the full 4 address 802.11 MAC header. + * The fields are defined such that the shorter 1, 2, and 3 + * address headers just use the first k fields. + */ +struct dot11_header { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr a1; /* address 1 */ + struct ether_addr a2; /* address 2 */ + struct ether_addr a3; /* address 3 */ + uint16 seq; /* sequence control */ + struct ether_addr a4; /* address 4 */ +} PACKED; + +/* Control frames */ + +struct dot11_rts_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ + struct ether_addr ta; /* transmitter address */ +} PACKED; +#define DOT11_RTS_LEN 16 + +struct dot11_cts_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ +} PACKED; +#define DOT11_CTS_LEN 10 + +struct dot11_ack_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ +} PACKED; +#define DOT11_ACK_LEN 10 + +struct dot11_ps_poll_frame { + uint16 fc; /* frame control */ + uint16 durid; /* AID */ + struct ether_addr bssid; /* receiver address, STA in AP */ + struct ether_addr ta; /* transmitter address */ +} PACKED; +#define DOT11_PS_POLL_LEN 16 + +struct dot11_cf_end_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ + struct ether_addr bssid; /* transmitter address, STA in AP */ +} PACKED; +#define DOT11_CS_END_LEN 16 + +/* Management frame header */ +struct dot11_management_header { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr da; /* receiver address */ + struct ether_addr sa; /* transmitter address */ + struct ether_addr bssid; /* BSS ID */ + uint16 seq; /* sequence control */ +} PACKED; +#define DOT11_MGMT_HDR_LEN 24 + +/* Management frame payloads */ + +struct dot11_bcn_prb { + uint32 timestamp[2]; + uint16 beacon_interval; + uint16 capability; +} PACKED; +#define DOT11_BCN_PRB_LEN 12 + +struct dot11_auth { + uint16 alg; /* algorithm */ + uint16 seq; /* sequence control */ + uint16 status; /* status code */ +} PACKED; +#define DOT11_AUTH_FIXED_LEN 6 /* length of auth frame without challenge info elt */ + +struct dot11_assoc_req { + uint16 capability; /* capability information */ + uint16 listen; /* listen interval */ +} PACKED; + +struct dot11_assoc_resp { + uint16 capability; /* capability information */ + uint16 status; /* status code */ + uint16 aid; /* association ID */ +} PACKED; + +struct dot11_action_measure { + uint8 category; + uint8 action; + uint8 token; + uint8 data[1]; +} PACKED; +#define DOT11_ACTION_MEASURE_LEN 3 + +/************** + 802.11h related definitions. +**************/ +typedef struct { + uint8 id; + uint8 len; + uint8 power; +} dot11_power_cnst_t; + +typedef struct { + uint8 min; + uint8 max; +} dot11_power_cap_t; + +typedef struct { + uint8 id; + uint8 len; + uint8 tx_pwr; + uint8 margin; +} dot11_tpc_rep_t; +#define DOT11_MNG_IE_TPC_REPORT_LEN 2 /* length of IE data, not including 2 byte header */ + +typedef struct { + uint8 id; + uint8 len; + uint8 first_channel; + uint8 num_channels; +} dot11_supp_channels_t; + +struct dot11_channel_switch { + uint8 id; + uint8 len; + uint8 mode; + uint8 channel; + uint8 count; +} PACKED; +typedef struct dot11_channel_switch dot11_channel_switch_t; + +/* 802.11h Measurement Request/Report IEs */ +/* Measurement Type field */ +#define DOT11_MEASURE_TYPE_BASIC 0 +#define DOT11_MEASURE_TYPE_CCA 1 +#define DOT11_MEASURE_TYPE_RPI 2 + +/* Measurement Mode field */ + +/* Measurement Request Modes */ +#define DOT11_MEASURE_MODE_ENABLE (1<<1) +#define DOT11_MEASURE_MODE_REQUEST (1<<2) +#define DOT11_MEASURE_MODE_REPORT (1<<3) +/* Measurement Report Modes */ +#define DOT11_MEASURE_MODE_LATE (1<<0) +#define DOT11_MEASURE_MODE_INCAPABLE (1<<1) +#define DOT11_MEASURE_MODE_REFUSED (1<<2) +/* Basic Measurement Map bits */ +#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0)) +#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1)) +#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2)) +#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3)) +#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4)) + +typedef struct { + uint8 id; + uint8 len; + uint8 token; + uint8 mode; + uint8 type; + uint8 channel; + uint8 start_time[8]; + uint16 duration; +} dot11_meas_req_t; +#define DOT11_MNG_IE_MREQ_LEN 14 +/* length of Measure Request IE data not including variable len */ +#define DOT11_MNG_IE_MREQ_FIXED_LEN 3 + +struct dot11_meas_rep { + uint8 id; + uint8 len; + uint8 token; + uint8 mode; + uint8 type; + union + { + struct { + uint8 channel; + uint8 start_time[8]; + uint16 duration; + uint8 map; + } PACKED basic; + uint8 data[1]; + } PACKED rep; +} PACKED; +typedef struct dot11_meas_rep dot11_meas_rep_t; + +/* length of Measure Report IE data not including variable len */ +#define DOT11_MNG_IE_MREP_FIXED_LEN 3 + +struct dot11_meas_rep_basic { + uint8 channel; + uint8 start_time[8]; + uint16 duration; + uint8 map; +} PACKED; +typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t; +#define DOT11_MEASURE_BASIC_REP_LEN 12 + +struct dot11_quiet { + uint8 id; + uint8 len; + uint8 count; /* TBTTs until beacon interval in quiet starts */ + uint8 period; /* Beacon intervals between periodic quiet periods ? */ + uint16 duration;/* Length of quiet period, in TU's */ + uint16 offset; /* TU's offset from TBTT in Count field */ +} PACKED; +typedef struct dot11_quiet dot11_quiet_t; + +typedef struct { + uint8 channel; + uint8 map; +} chan_map_tuple_t; + +typedef struct { + uint8 id; + uint8 len; + uint8 eaddr[ETHER_ADDR_LEN]; + uint8 interval; + chan_map_tuple_t map[1]; +} dot11_ibss_dfs_t; + +/* WME Elements */ +#define WME_OUI "\x00\x50\xf2" +#define WME_VER 1 +#define WME_TYPE 2 +#define WME_SUBTYPE_IE 0 /* Information Element */ +#define WME_SUBTYPE_PARAM_IE 1 /* Parameter Element */ +#define WME_SUBTYPE_TSPEC 2 /* Traffic Specification */ + +/* WME Access Category Indices (ACIs) */ +#define AC_BE 0 /* Best Effort */ +#define AC_BK 1 /* Background */ +#define AC_VI 2 /* Video */ +#define AC_VO 3 /* Voice */ +#define AC_MAX 4 + +/* WME Information Element (IE) */ +struct wme_ie { + uint8 oui[3]; + uint8 type; + uint8 subtype; + uint8 version; + uint8 acinfo; +} PACKED; +typedef struct wme_ie wme_ie_t; +#define WME_IE_LEN 7 + +struct wme_acparam { + uint8 ACI; + uint8 ECW; + uint16 TXOP; /* stored in network order (ls octet first) */ +} PACKED; +typedef struct wme_acparam wme_acparam_t; + +/* WME Parameter Element (PE) */ +struct wme_params { + uint8 oui[3]; + uint8 type; + uint8 subtype; + uint8 version; + uint8 acinfo; + uint8 rsvd; + wme_acparam_t acparam[4]; +} PACKED; +typedef struct wme_params wme_params_t; +#define WME_PARAMS_IE_LEN 24 + +/* acinfo */ +#define WME_COUNT_MASK 0x0f +/* ACI */ +#define WME_AIFS_MASK 0x0f +#define WME_ACM_MASK 0x10 +#define WME_ACI_MASK 0x60 +#define WME_ACI_SHIFT 5 +/* ECW */ +#define WME_CWMIN_MASK 0x0f +#define WME_CWMAX_MASK 0xf0 +#define WME_CWMAX_SHIFT 4 + +#define WME_TXOP_UNITS 32 + +/* WME Traffic Specification (TSPEC) element */ +#define WME_SUBTYPE_TSPEC 2 +#define WME_TSPEC_HDR_LEN 2 +#define WME_TSPEC_BODY_OFF 2 +struct wme_tspec { + uint8 oui[DOT11_OUI_LEN]; /* WME_OUI */ + uint8 type; /* WME_TYPE */ + uint8 subtype; /* WME_SUBTYPE_TSPEC */ + uint8 version; /* WME_VERSION */ + uint16 ts_info; /* TS Info */ + uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */ + uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */ + uint32 min_service_interval; /* Minimum Service Interval (us) */ + uint32 max_service_interval; /* Maximum Service Interval (us) */ + uint32 inactivity_interval; /* Inactivity Interval (us) */ + uint32 service_start; /* Service Start Time (us) */ + uint32 min_rate; /* Minimum Data Rate (bps) */ + uint32 mean_rate; /* Mean Data Rate (bps) */ + uint32 max_burst_size; /* Maximum Burst Size (bytes) */ + uint32 min_phy_rate; /* Minimum PHY Rate (bps) */ + uint32 peak_rate; /* Peak Data Rate (bps) */ + uint32 delay_bound; /* Delay Bound (us) */ + uint16 surplus_bandwidth; /* Surplus Bandwidth Allowance Factor */ + uint16 medium_time; /* Medium Time (32 us/s periods) */ +} PACKED; +typedef struct wme_tspec wme_tspec_t; +#define WME_TSPEC_LEN 56 /* not including 2-byte header */ + +/* ts_info */ +/* 802.1D priority is duplicated - bits 13-11 AND bits 3-1 */ +#define TS_INFO_PRIO_SHIFT_HI 11 +#define TS_INFO_PRIO_MASK_HI (0x7 << TS_INFO_PRIO_SHIFT_HI) +#define TS_INFO_PRIO_SHIFT_LO 1 +#define TS_INFO_PRIO_MASK_LO (0x7 << TS_INFO_PRIO_SHIFT_LO) +#define TS_INFO_CONTENTION_SHIFT 7 +#define TS_INFO_CONTENTION_MASK (0x1 << TS_INFO_CONTENTION_SHIFT) +#define TS_INFO_DIRECTION_SHIFT 5 +#define TS_INFO_DIRECTION_MASK (0x3 << TS_INFO_DIRECTION_SHIFT) +#define TS_INFO_UPLINK (0 << TS_INFO_DIRECTION_SHIFT) +#define TS_INFO_DOWNLINK (1 << TS_INFO_DIRECTION_SHIFT) +#define TS_INFO_BIDIRECTIONAL (3 << TS_INFO_DIRECTION_SHIFT) + +/* nom_msdu_size */ +#define FIXED_MSDU_SIZE 0x8000 /* MSDU size is fixed */ +#define MSDU_SIZE_MASK 0x7fff /* (Nominal or fixed) MSDU size */ + +/* surplus_bandwidth */ +/* Represented as 3 bits of integer, binary point, 13 bits fraction */ +#define INTEGER_SHIFT 13 +#define FRACTION_MASK 0x1FFF + +/* Management Notification Frame */ +struct dot11_management_notification { + uint8 category; /* DOT11_ACTION_NOTIFICATION */ + uint8 action; + uint8 token; + uint8 status; + uint8 data[1]; /* Elements */ +} PACKED; +#define DOT11_MGMT_NOTIFICATION_LEN 4 /* Fixed length */ + +/* WME Action Codes */ +#define WME_SETUP_REQUEST 0 +#define WME_SETUP_RESPONSE 1 +#define WME_TEARDOWN 2 + +/* WME Setup Response Status Codes */ +#define WME_ADMISSION_ACCEPTED 0 +#define WME_INVALID_PARAMETERS 1 +#define WME_ADMISSION_REFUSED 3 + +/* Macro to take a pointer to a beacon or probe response + * header and return the char* pointer to the SSID info element + */ +#define BCN_PRB_SSID(hdr) ((char*)(hdr) + DOT11_MGMT_HDR_LEN + DOT11_BCN_PRB_LEN) + +/* Authentication frame payload constants */ +#define DOT11_OPEN_SYSTEM 0 +#define DOT11_SHARED_KEY 1 +#define DOT11_CHALLENGE_LEN 128 + +/* Frame control macros */ +#define FC_PVER_MASK 0x3 +#define FC_PVER_SHIFT 0 +#define FC_TYPE_MASK 0xC +#define FC_TYPE_SHIFT 2 +#define FC_SUBTYPE_MASK 0xF0 +#define FC_SUBTYPE_SHIFT 4 +#define FC_TODS 0x100 +#define FC_TODS_SHIFT 8 +#define FC_FROMDS 0x200 +#define FC_FROMDS_SHIFT 9 +#define FC_MOREFRAG 0x400 +#define FC_MOREFRAG_SHIFT 10 +#define FC_RETRY 0x800 +#define FC_RETRY_SHIFT 11 +#define FC_PM 0x1000 +#define FC_PM_SHIFT 12 +#define FC_MOREDATA 0x2000 +#define FC_MOREDATA_SHIFT 13 +#define FC_WEP 0x4000 +#define FC_WEP_SHIFT 14 +#define FC_ORDER 0x8000 +#define FC_ORDER_SHIFT 15 + +/* sequence control macros */ +#define SEQNUM_SHIFT 4 +#define FRAGNUM_MASK 0xF + +/* Frame Control type/subtype defs */ + +/* FC Types */ +#define FC_TYPE_MNG 0 +#define FC_TYPE_CTL 1 +#define FC_TYPE_DATA 2 + +/* Management Subtypes */ +#define FC_SUBTYPE_ASSOC_REQ 0 +#define FC_SUBTYPE_ASSOC_RESP 1 +#define FC_SUBTYPE_REASSOC_REQ 2 +#define FC_SUBTYPE_REASSOC_RESP 3 +#define FC_SUBTYPE_PROBE_REQ 4 +#define FC_SUBTYPE_PROBE_RESP 5 +#define FC_SUBTYPE_BEACON 8 +#define FC_SUBTYPE_ATIM 9 +#define FC_SUBTYPE_DISASSOC 10 +#define FC_SUBTYPE_AUTH 11 +#define FC_SUBTYPE_DEAUTH 12 +#define FC_SUBTYPE_ACTION 13 + +/* Control Subtypes */ +#define FC_SUBTYPE_PS_POLL 10 +#define FC_SUBTYPE_RTS 11 +#define FC_SUBTYPE_CTS 12 +#define FC_SUBTYPE_ACK 13 +#define FC_SUBTYPE_CF_END 14 +#define FC_SUBTYPE_CF_END_ACK 15 + +/* Data Subtypes */ +#define FC_SUBTYPE_DATA 0 +#define FC_SUBTYPE_DATA_CF_ACK 1 +#define FC_SUBTYPE_DATA_CF_POLL 2 +#define FC_SUBTYPE_DATA_CF_ACK_POLL 3 +#define FC_SUBTYPE_NULL 4 +#define FC_SUBTYPE_CF_ACK 5 +#define FC_SUBTYPE_CF_POLL 6 +#define FC_SUBTYPE_CF_ACK_POLL 7 +#define FC_SUBTYPE_QOS_DATA 8 +#define FC_SUBTYPE_QOS_NULL 12 + +/* type-subtype combos */ +#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK) + +#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT)) + +#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ) +#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP) +#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ) +#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP) +#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ) +#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP) +#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON) +#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC) +#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH) +#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH) +#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION) + +#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL) +#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS) +#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS) +#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK) +#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END) +#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK) + +#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA) +#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL) +#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK) +#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA) +#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL) + +/* QoS Control Field */ + +/* 802.1D Tag */ +#define QOS_PRIO_SHIFT 0 +#define QOS_PRIO_MASK 0x0007 +#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT) + +/* Ack Policy (0 means Acknowledge) */ +#define QOS_ACK_SHIFT 5 +#define QOS_ACK_MASK 0x0060 +#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT) + +/* Management Frames */ + +/* Management Frame Constants */ + +/* Fixed fields */ +#define DOT11_MNG_AUTH_ALGO_LEN 2 +#define DOT11_MNG_AUTH_SEQ_LEN 2 +#define DOT11_MNG_BEACON_INT_LEN 2 +#define DOT11_MNG_CAP_LEN 2 +#define DOT11_MNG_AP_ADDR_LEN 6 +#define DOT11_MNG_LISTEN_INT_LEN 2 +#define DOT11_MNG_REASON_LEN 2 +#define DOT11_MNG_AID_LEN 2 +#define DOT11_MNG_STATUS_LEN 2 +#define DOT11_MNG_TIMESTAMP_LEN 8 + +/* DUR/ID field in assoc resp is 0xc000 | AID */ +#define DOT11_AID_MASK 0x3fff + +/* Reason Codes */ +#define DOT11_RC_RESERVED 0 +#define DOT11_RC_UNSPECIFIED 1 /* Unspecified reason */ +#define DOT11_RC_AUTH_INVAL 2 /* Previous authentication no longer valid */ +#define DOT11_RC_DEAUTH_LEAVING 3 /* Deauthenticated because sending station is + leaving (or has left) IBSS or ESS */ +#define DOT11_RC_INACTIVITY 4 /* Disassociated due to inactivity */ +#define DOT11_RC_BUSY 5 /* Disassociated because AP is unable to handle + all currently associated stations */ +#define DOT11_RC_INVAL_CLASS_2 6 /* Class 2 frame received from + nonauthenticated station */ +#define DOT11_RC_INVAL_CLASS_3 7 /* Class 3 frame received from + nonassociated station */ +#define DOT11_RC_DISASSOC_LEAVING 8 /* Disassociated because sending station is + leaving (or has left) BSS */ +#define DOT11_RC_NOT_AUTH 9 /* Station requesting (re)association is + not authenticated with responding station */ +#define DOT11_RC_MAX 23 /* Reason codes > 23 are reserved */ + +/* Status Codes */ +#define DOT11_STATUS_SUCCESS 0 /* Successful */ +#define DOT11_STATUS_FAILURE 1 /* Unspecified failure */ +#define DOT11_STATUS_CAP_MISMATCH 10 /* Cannot support all requested capabilities + in the Capability Information field */ +#define DOT11_STATUS_REASSOC_FAIL 11 /* Reassociation denied due to inability to + confirm that association exists */ +#define DOT11_STATUS_ASSOC_FAIL 12 /* Association denied due to reason outside + the scope of this standard */ +#define DOT11_STATUS_AUTH_MISMATCH 13 /* Responding station does not support the + specified authentication algorithm */ +#define DOT11_STATUS_AUTH_SEQ 14 /* Received an Authentication frame with + authentication transaction sequence number + out of expected sequence */ +#define DOT11_STATUS_AUTH_CHALLENGE_FAIL 15 /* Authentication rejected because of challenge failure */ +#define DOT11_STATUS_AUTH_TIMEOUT 16 /* Authentication rejected due to timeout waiting + for next frame in sequence */ +#define DOT11_STATUS_ASSOC_BUSY_FAIL 17 /* Association denied because AP is unable to + handle additional associated stations */ +#define DOT11_STATUS_ASSOC_RATE_MISMATCH 18 /* Association denied due to requesting station + not supporting all of the data rates in the + BSSBasicRateSet parameter */ +#define DOT11_STATUS_ASSOC_SHORT_REQUIRED 19 /* Association denied due to requesting station + not supporting the Short Preamble option */ +#define DOT11_STATUS_ASSOC_PBCC_REQUIRED 20 /* Association denied due to requesting station + not supporting the PBCC Modulation option */ +#define DOT11_STATUS_ASSOC_AGILITY_REQUIRED 21 /* Association denied due to requesting station + not supporting the Channel Agility option */ +#define DOT11_STATUS_ASSOC_SPECTRUM_REQUIRED 22 /* Association denied because Spectrum Management + capability is required. */ +#define DOT11_STATUS_ASSOC_BAD_POWER_CAP 23 /* Association denied because the info in the + Power Cap element is unacceptable. */ +#define DOT11_STATUS_ASSOC_BAD_SUP_CHANNELS 24 /* Association denied because the info in the + Supported Channel element is unacceptable */ +#define DOT11_STATUS_ASSOC_SHORTSLOT_REQUIRED 25 /* Association denied due to requesting station + not supporting the Short Slot Time option */ +#define DOT11_STATUS_ASSOC_ERPBCC_REQUIRED 26 /* Association denied due to requesting station + not supporting the ER-PBCC Modulation option */ +#define DOT11_STATUS_ASSOC_DSSOFDM_REQUIRED 27 /* Association denied due to requesting station + not supporting the DSS-OFDM option */ + +/* Info Elts, length of INFORMATION portion of Info Elts */ +#define DOT11_MNG_DS_PARAM_LEN 1 +#define DOT11_MNG_IBSS_PARAM_LEN 2 + +/* TIM Info element has 3 bytes fixed info in INFORMATION field, + * followed by 1 to 251 bytes of Partial Virtual Bitmap */ +#define DOT11_MNG_TIM_FIXED_LEN 3 +#define DOT11_MNG_TIM_DTIM_COUNT 0 +#define DOT11_MNG_TIM_DTIM_PERIOD 1 +#define DOT11_MNG_TIM_BITMAP_CTL 2 +#define DOT11_MNG_TIM_PVB 3 + +/* TLV defines */ +#define TLV_TAG_OFF 0 +#define TLV_LEN_OFF 1 +#define TLV_HDR_LEN 2 +#define TLV_BODY_OFF 2 + +/* Management Frame Information Element IDs */ +#define DOT11_MNG_SSID_ID 0 +#define DOT11_MNG_RATES_ID 1 +#define DOT11_MNG_FH_PARMS_ID 2 +#define DOT11_MNG_DS_PARMS_ID 3 +#define DOT11_MNG_CF_PARMS_ID 4 +#define DOT11_MNG_TIM_ID 5 +#define DOT11_MNG_IBSS_PARMS_ID 6 +#define DOT11_MNG_COUNTRY_ID 7 +#define DOT11_MNG_HOPPING_PARMS_ID 8 +#define DOT11_MNG_HOPPING_TABLE_ID 9 +#define DOT11_MNG_REQUEST_ID 10 +#define DOT11_MNG_CHALLENGE_ID 16 +#define DOT11_MNG_PWR_CONSTRAINT_ID 32 /* 11H PowerConstraint */ +#define DOT11_MNG_PWR_CAP_ID 33 /* 11H PowerCapability */ +#define DOT11_MNG_TPC_REQUEST_ID 34 /* 11H TPC Request */ +#define DOT11_MNG_TPC_REPORT_ID 35 /* 11H TPC Report */ +#define DOT11_MNG_SUPP_CHANNELS_ID 36 /* 11H Supported Channels */ +#define DOT11_MNG_CHANNEL_SWITCH_ID 37 /* 11H ChannelSwitch Announcement*/ +#define DOT11_MNG_MEASURE_REQUEST_ID 38 /* 11H MeasurementRequest */ +#define DOT11_MNG_MEASURE_REPORT_ID 39 /* 11H MeasurementReport */ +#define DOT11_MNG_QUIET_ID 40 /* 11H Quiet */ +#define DOT11_MNG_IBSS_DFS_ID 41 /* 11H IBSS_DFS */ +#define DOT11_MNG_ERP_ID 42 +#define DOT11_MNG_NONERP_ID 47 +#define DOT11_MNG_EXT_RATES_ID 50 +#define DOT11_MNG_WPA_ID 221 +#define DOT11_MNG_PROPR_ID 221 + +/* ERP info element bit values */ +#define DOT11_MNG_ERP_LEN 1 /* ERP is currently 1 byte long */ +#define DOT11_MNG_NONERP_PRESENT 0x01 /* NonERP (802.11b) STAs are present in the BSS */ +#define DOT11_MNG_USE_PROTECTION 0x02 /* Use protection mechanisms for ERP-OFDM frames */ +#define DOT11_MNG_BARKER_PREAMBLE 0x04 /* Short Preambles: 0 == allowed, 1 == not allowed */ + +/* Capability Information Field */ +#define DOT11_CAP_ESS 0x0001 +#define DOT11_CAP_IBSS 0x0002 +#define DOT11_CAP_POLLABLE 0x0004 +#define DOT11_CAP_POLL_RQ 0x0008 +#define DOT11_CAP_PRIVACY 0x0010 +#define DOT11_CAP_SHORT 0x0020 +#define DOT11_CAP_PBCC 0x0040 +#define DOT11_CAP_AGILITY 0x0080 +#define DOT11_CAP_SPECTRUM 0x0100 +#define DOT11_CAP_SHORTSLOT 0x0400 +#define DOT11_CAP_CCK_OFDM 0x2000 + +/* Action Frame Constants */ +#define DOT11_ACTION_CAT_ERR_MASK 0x80 +#define DOT11_ACTION_CAT_SPECT_MNG 0x00 +#define DOT11_ACTION_NOTIFICATION 0x11 /* 17 */ + +#define DOT11_ACTION_ID_M_REQ 0 +#define DOT11_ACTION_ID_M_REP 1 +#define DOT11_ACTION_ID_TPC_REQ 2 +#define DOT11_ACTION_ID_TPC_REP 3 +#define DOT11_ACTION_ID_CHANNEL_SWITCH 4 + +/* MLME Enumerations */ +#define DOT11_BSSTYPE_INFRASTRUCTURE 0 +#define DOT11_BSSTYPE_INDEPENDENT 1 +#define DOT11_BSSTYPE_ANY 2 +#define DOT11_SCANTYPE_ACTIVE 0 +#define DOT11_SCANTYPE_PASSIVE 1 + +/* 802.11 A PHY constants */ +#define APHY_SLOT_TIME 9 +#define APHY_SIFS_TIME 16 +#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME)) +#define APHY_PREAMBLE_TIME 16 +#define APHY_SIGNAL_TIME 4 +#define APHY_SYMBOL_TIME 4 +#define APHY_SERVICE_NBITS 16 +#define APHY_TAIL_NBITS 6 +#define APHY_CWMIN 15 + +/* 802.11 B PHY constants */ +#define BPHY_SLOT_TIME 20 +#define BPHY_SIFS_TIME 10 +#define BPHY_DIFS_TIME 50 +#define BPHY_PLCP_TIME 192 +#define BPHY_PLCP_SHORT_TIME 96 +#define BPHY_CWMIN 31 + +/* 802.11 G constants */ +#define DOT11_OFDM_SIGNAL_EXTENSION 6 + +#define PHY_CWMAX 1023 + +#define DOT11_MAXNUMFRAGS 16 /* max # fragments per MSDU */ + +/* dot11Counters Table - 802.11 spec., Annex D */ +typedef struct d11cnt { + uint32 txfrag; /* dot11TransmittedFragmentCount */ + uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ + uint32 txfail; /* dot11FailedCount */ + uint32 txretry; /* dot11RetryCount */ + uint32 txretrie; /* dot11MultipleRetryCount */ + uint32 rxdup; /* dot11FrameduplicateCount */ + uint32 txrts; /* dot11RTSSuccessCount */ + uint32 txnocts; /* dot11RTSFailureCount */ + uint32 txnoack; /* dot11ACKFailureCount */ + uint32 rxfrag; /* dot11ReceivedFragmentCount */ + uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ + uint32 rxcrc; /* dot11FCSErrorCount */ + uint32 txfrmsnt; /* dot11TransmittedFrameCount */ + uint32 rxundec; /* dot11WEPUndecryptableCount */ +} d11cnt_t; + +/* BRCM OUI */ +#define BRCM_OUI "\x00\x10\x18" + +/* BRCM info element */ +struct brcm_ie { + uchar id; + uchar len; + uchar oui[3]; + uchar ver; + uchar assoc; /* # of assoc STAs */ + uchar flags; /* misc flags */ +} PACKED; +#define BRCM_IE_LEN 8 +typedef struct brcm_ie brcm_ie_t; +#define BRCM_IE_VER 1 + +/* brcm_ie flags */ +#define BRF_ABCAP 0x1 /* afterburner capable */ +#define BRF_ABRQRD 0x2 /* afterburner requested */ + +/* WPA definitions */ +#define WPA_VERSION 1 +#define WPA_OUI "\x00\x50\xF2" + +#define WPA_OUI_LEN 3 + +/* WPA authentication modes */ +#define WPA_AUTH_NONE 0 /* None */ +#define WPA_AUTH_UNSPECIFIED 1 /* Unspecified authentication over 802.1X: default for WPA */ +#define WPA_AUTH_PSK 2 /* Pre-shared Key over 802.1X */ +#define WPA_AUTH_DISABLED 255 /* Legacy (i.e., non-WPA) */ + +#define IS_WPA_AUTH(auth) ((auth) == WPA_AUTH_NONE || \ + (auth) == WPA_AUTH_UNSPECIFIED || \ + (auth) == WPA_AUTH_PSK) + + +/* Key related defines */ +#define DOT11_MAX_DEFAULT_KEYS 4 /* number of default keys */ +#define DOT11_MAX_KEY_SIZE 32 /* max size of any key */ +#define DOT11_MAX_IV_SIZE 16 /* max size of any IV */ +#define DOT11_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ + +#define WEP1_KEY_SIZE 5 /* max size of any WEP key */ +#define WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ +#define WEP128_KEY_SIZE 13 /* max size of any WEP key */ +#define WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ +#define TKIP_MIC_SIZE 8 /* size of TKIP MIC */ +#define TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ +#define TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ +#define TKIP_KEY_SIZE 32 /* size of any TKIP key */ +#define TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ +#define TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ +#define TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ +#define TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ +#define AES_KEY_SIZE 16 /* size of AES key */ + +#undef PACKED +#if !defined(__GNUC__) +#pragma pack() +#endif + +#endif /* _802_11_H_ */ diff --git a/openwrt/package/nvram/src/include/proto/ethernet.h b/openwrt/package/nvram/src/include/proto/ethernet.h new file mode 100644 index 00000000000..173464af639 --- /dev/null +++ b/openwrt/package/nvram/src/include/proto/ethernet.h @@ -0,0 +1,179 @@ +/******************************************************************************* + * $Id$ + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * From FreeBSD 2.2.7: Fundamental constants relating to ethernet. + ******************************************************************************/ + +#ifndef _NET_ETHERNET_H_ /* use native BSD ethernet.h when available */ +#define _NET_ETHERNET_H_ + +#ifndef _TYPEDEFS_H_ +#include "typedefs.h" +#endif + +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#define PACKED +#endif + +/* + * The number of bytes in an ethernet (MAC) address. + */ +#ifndef ETHER_ADDR_LEN +#define ETHER_ADDR_LEN 6 +#endif + +/* + * The number of bytes in the type field. + */ +#ifndef ETHER_TYPE_LEN +#define ETHER_TYPE_LEN 2 +#endif + +/* + * The number of bytes in the trailing CRC field. + */ +#ifndef ETHER_CRC_LEN +#define ETHER_CRC_LEN 4 +#endif + +/* + * The length of the combined header. + */ +#ifndef ETHER_HDR_LEN +#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN) +#endif + +/* + * The minimum packet length. + */ +#ifndef ETHER_MIN_LEN +#define ETHER_MIN_LEN 64 +#endif + +/* + * The minimum packet user data length. + */ +#ifndef ETHER_MIN_DATA +#define ETHER_MIN_DATA 46 +#endif + +/* + * The maximum packet length. + */ +#ifndef ETHER_MAX_LEN +#define ETHER_MAX_LEN 1518 +#endif + +/* + * The maximum packet user data length. + */ +#define ETHER_MAX_DATA 1500 + +/* + * Used to uniquely identify a 802.1q VLAN-tagged header. + */ +#define VLAN_TAG 0x8100 + +/* + * Located after dest & src address in ether header. + */ +#define VLAN_FIELDS_OFFSET (ETHER_ADDR_LEN * 2) + +/* + * 4 bytes of vlan field info. + */ +#define VLAN_FIELDS_SIZE 4 + +/* location of bits in 16-bit vlan fields */ +#define VLAN_PRI_SHIFT 13 /* user priority */ +#define VLAN_CFI_SHIFT 12 /* canonical format indicator bit */ + +/* 3 bits of priority */ +#define VLAN_PRI_MASK 7 +/* 12 bits of vlan identfier (VID) */ +#define VLAN_VID_MASK 0xFFF /* VLAN identifier (VID) field */ + +struct vlan_tags { + uint16 tag_type; /* 0x8100 for VLAN */ + uint16 tag_control; /* prio | cfi | vid */ +} PACKED ; + +/* 802.1X ethertype */ + +#define ETHER_TYPE_IP 0x0800 /* IP */ +#define ETHER_TYPE_BRCM 0x886c /* Broadcom Corp. */ +#define ETHER_TYPE_802_1X 0x888e /* 802.1x */ + +#define ETHER_BRCM_SUBTYPE_LEN 4 /* Broadcom 4byte subtype follows ethertype */ +#define ETHER_BRCM_CRAM 0x1 /* Broadcom subtype cram protocol */ + +/* + * A macro to validate a length with + */ +#define ETHER_IS_VALID_LEN(foo) \ + ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) + +#ifndef __NET_ETHERNET_H +#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */ +/* + * Structure of a 10Mb/s Ethernet header. + */ +struct ether_header { + uint8 ether_dhost[ETHER_ADDR_LEN]; + uint8 ether_shost[ETHER_ADDR_LEN]; + uint16 ether_type; +} PACKED ; + +/* + * Structure of a 48-bit Ethernet address. + */ +struct ether_addr { + uint8 octet[ETHER_ADDR_LEN]; +} PACKED ; +#endif +#endif + +/* + * Takes a pointer, returns true if a 48-bit multicast address + * (including broadcast, since it is all ones) + */ +#define ETHER_ISMULTI(ea) (((uint8 *)(ea))[0] & 1) + +/* + * Takes a pointer, returns true if a 48-bit broadcast (all ones) + */ +#define ETHER_ISBCAST(ea) ((((uint8 *)(ea))[0] & \ + ((uint8 *)(ea))[1] & \ + ((uint8 *)(ea))[2] & \ + ((uint8 *)(ea))[3] & \ + ((uint8 *)(ea))[4] & \ + ((uint8 *)(ea))[5]) == 0xff) + +static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}}; + +/* + * Takes a pointer, returns true if a 48-bit null address (all zeros) + */ +#define ETHER_ISNULLADDR(ea) ((((uint8 *)(ea))[0] | \ + ((uint8 *)(ea))[1] | \ + ((uint8 *)(ea))[2] | \ + ((uint8 *)(ea))[3] | \ + ((uint8 *)(ea))[4] | \ + ((uint8 *)(ea))[5]) == 0) + +/* Differentiated Services Codepoint - lower 6 bits of tos in iphdr */ +#define DSCP_PRI_MASK 0x3F /* bits 0-6 */ +#define DSCP_WME_PRI_MASK 0x38 /* bits 3-6 */ +#define DSCP_WME_PRI_SHIFT 3 + +#undef PACKED + +#endif /* _NET_ETHERNET_H_ */ diff --git a/openwrt/package/nvram/src/include/shutils.h b/openwrt/package/nvram/src/include/shutils.h new file mode 100644 index 00000000000..783ee9ede14 --- /dev/null +++ b/openwrt/package/nvram/src/include/shutils.h @@ -0,0 +1,200 @@ +/* + * Shell-like utility functions + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#ifndef _shutils_h_ +#define _shutils_h_ +#include <string.h> +/* + * Reads file and returns contents + * @param fd file descriptor + * @return contents of file or NULL if an error occurred + */ +extern char * fd2str(int fd); + +/* + * Reads file and returns contents + * @param path path to file + * @return contents of file or NULL if an error occurred + */ +extern char * file2str(const char *path); + +/* + * Waits for a file descriptor to become available for reading or unblocked signal + * @param fd file descriptor + * @param timeout seconds to wait before timing out or 0 for no timeout + * @return 1 if descriptor changed status or 0 if timed out or -1 on error + */ +extern int waitfor(int fd, int timeout); + +/* + * Concatenates NULL-terminated list of arguments into a single + * commmand and executes it + * @param argv argument list + * @param path NULL, ">output", or ">>output" + * @param timeout seconds to wait before timing out or 0 for no timeout + * @param ppid NULL to wait for child termination or pointer to pid + * @return return value of executed command or errno + */ +extern int _eval(char *const argv[], char *path, int timeout, pid_t *ppid); + +/* + * Concatenates NULL-terminated list of arguments into a single + * commmand and executes it + * @param argv argument list + * @return stdout of executed command or NULL if an error occurred + */ +extern char * _backtick(char *const argv[]); + +/* + * Kills process whose PID is stored in plaintext in pidfile + * @param pidfile PID file + * @return 0 on success and errno on failure + */ +extern int kill_pidfile(char *pidfile); + +/* + * fread() with automatic retry on syscall interrupt + * @param ptr location to store to + * @param size size of each element of data + * @param nmemb number of elements + * @param stream file stream + * @return number of items successfully read + */ +extern int safe_fread(void *ptr, size_t size, size_t nmemb, FILE *stream); + +/* + * fwrite() with automatic retry on syscall interrupt + * @param ptr location to read from + * @param size size of each element of data + * @param nmemb number of elements + * @param stream file stream + * @return number of items successfully written + */ +extern int safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); + +/* + * Convert Ethernet address string representation to binary data + * @param a string in xx:xx:xx:xx:xx:xx notation + * @param e binary data + * @return TRUE if conversion was successful and FALSE otherwise + */ +extern int ether_atoe(const char *a, unsigned char *e); + +/* + * Convert Ethernet address binary data to string representation + * @param e binary data + * @param a string in xx:xx:xx:xx:xx:xx notation + * @return a + */ +extern char * ether_etoa(const unsigned char *e, char *a); + +/* + * Concatenate two strings together into a caller supplied buffer + * @param s1 first string + * @param s2 second string + * @param buf buffer large enough to hold both strings + * @return buf + */ +static inline char * strcat_r(const char *s1, const char *s2, char *buf) +{ + strcpy(buf, s1); + strcat(buf, s2); + return buf; +} + +/* Check for a blank character; that is, a space or a tab */ +#define isblank(c) ((c) == ' ' || (c) == '\t') + +/* Strip trailing CR/NL from string <s> */ +#define chomp(s) ({ \ + char *c = (s) + strlen((s)) - 1; \ + while ((c > (s)) && (*c == '\n' || *c == '\r' || *c == ' ')) \ + *c-- = '\0'; \ + s; \ +}) + +/* Simple version of _backtick() */ +#define backtick(cmd, args...) ({ \ + char *argv[] = { cmd, ## args, NULL }; \ + _backtick(argv); \ +}) + +/* Simple version of _eval() (no timeout and wait for child termination) */ +#define eval(cmd, args...) ({ \ + char *argv[] = { cmd, ## args, NULL }; \ + _eval(argv, ">/dev/console", 0, NULL); \ +}) + +/* Copy each token in wordlist delimited by space into word */ +#define foreach(word, wordlist, next) \ + for (next = &wordlist[strspn(wordlist, " ")], \ + strncpy(word, next, sizeof(word)), \ + word[strcspn(word, " ")] = '\0', \ + word[sizeof(word) - 1] = '\0', \ + next = strchr(next, ' '); \ + strlen(word); \ + next = next ? &next[strspn(next, " ")] : "", \ + strncpy(word, next, sizeof(word)), \ + word[strcspn(word, " ")] = '\0', \ + word[sizeof(word) - 1] = '\0', \ + next = strchr(next, ' ')) + +/* Return NUL instead of NULL if undefined */ +#define safe_getenv(s) (getenv(s) ? : "") + +/* Print directly to the console */ +#define cprintf(fmt, args...) do { \ + FILE *fp = fopen("/dev/console", "w"); \ + if (fp) { \ + fprintf(fp, fmt, ## args); \ + fclose(fp); \ + } \ +} while (0) + +/* Debug print */ +#ifdef DEBUG +#define dprintf(fmt, args...) cprintf("%s: " fmt, __FUNCTION__, ## args) +#else +#define dprintf(fmt, args...) +#endif + +#ifdef vxworks + +#include <inetLib.h> +#define inet_aton(a, n) ((inet_aton((a), (n)) == ERROR) ? 0 : 1) +#define inet_ntoa(n) ({ char a[INET_ADDR_LEN]; inet_ntoa_b ((n), a); a; }) + +#include <typedefs.h> +#include <bcmutils.h> +#define ether_atoe(a, e) bcm_ether_atoe((a), (e)) +#define ether_etoa(e, a) bcm_ether_ntoa((e), (a)) + +/* These declarations are not available where you would expect them */ +extern int vsnprintf (char *, size_t, const char *, va_list); +extern int snprintf(char *str, size_t count, const char *fmt, ...); +extern char *strdup(const char *); +extern char *strsep(char **stringp, char *delim); +extern int strcasecmp(const char *s1, const char *s2); +extern int strncasecmp(const char *s1, const char *s2, size_t n); + +/* Neither are socket() and connect() */ +#include <sockLib.h> + +#ifdef DEBUG +#undef dprintf +#define dprintf printf +#endif +#endif + +#endif /* _shutils_h_ */ diff --git a/openwrt/package/nvram/src/include/typedefs.h b/openwrt/package/nvram/src/include/typedefs.h new file mode 100644 index 00000000000..6b0c25e0424 --- /dev/null +++ b/openwrt/package/nvram/src/include/typedefs.h @@ -0,0 +1,293 @@ +/* + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id$ + */ + +#ifndef _TYPEDEFS_H_ +#define _TYPEDEFS_H_ + + +/* Define 'SITE_TYPEDEFS' in the compile to include a site specific + * typedef file "site_typedefs.h". + * + * If 'SITE_TYPEDEFS' is not defined, then the "Inferred Typedefs" + * section of this file makes inferences about the compile environment + * based on defined symbols and possibly compiler pragmas. + * + * Following these two sections is the "Default Typedefs" + * section. This section is only prcessed if 'USE_TYPEDEF_DEFAULTS' is + * defined. This section has a default set of typedefs and a few + * proprocessor symbols (TRUE, FALSE, NULL, ...). + */ + +#ifdef SITE_TYPEDEFS + +/******************************************************************************* + * Site Specific Typedefs + *******************************************************************************/ + +#include "site_typedefs.h" + +#else + +/******************************************************************************* + * Inferred Typedefs + *******************************************************************************/ + +/* Infer the compile environment based on preprocessor symbols and pramas. + * Override type definitions as needed, and include configuration dependent + * header files to define types. + */ + +#ifdef __cplusplus + +#define TYPEDEF_BOOL +#ifndef FALSE +#define FALSE false +#endif +#ifndef TRUE +#define TRUE true +#endif + +#else /* ! __cplusplus */ + +/* for Windows build, define bool as a uchar instead of the default int */ +#if defined(_WIN32) + +#define TYPEDEF_BOOL +typedef unsigned char bool; + +#endif /* _WIN32 */ + +#endif /* ! __cplusplus */ + +#ifdef _MSC_VER /* Microsoft C */ +#define TYPEDEF_INT64 +#define TYPEDEF_UINT64 +typedef signed __int64 int64; +typedef unsigned __int64 uint64; +#endif + +#if defined(MACOSX) && defined(KERNEL) +#define TYPEDEF_BOOL +#endif + + +#if defined(linux) +#define TYPEDEF_UINT +#define TYPEDEF_USHORT +#define TYPEDEF_ULONG +#endif + +#if !defined(linux) && !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) +#define TYPEDEF_UINT +#define TYPEDEF_USHORT +#endif + + +/* Do not support the (u)int64 types with strict ansi for GNU C */ +#if defined(__GNUC__) && defined(__STRICT_ANSI__) +#define TYPEDEF_INT64 +#define TYPEDEF_UINT64 +#endif + +/* ICL accepts unsigned 64 bit type only, and complains in ANSI mode + * for singned or unsigned */ +#if defined(__ICL) + +#define TYPEDEF_INT64 + +#if defined(__STDC__) +#define TYPEDEF_UINT64 +#endif + +#endif /* __ICL */ + + +#if !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) + +/* pick up ushort & uint from standard types.h */ +#if defined(linux) && defined(__KERNEL__) + +#include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */ + +#else + +#include <sys/types.h> + +#endif + +#endif /* !_WIN32 && !PMON && !_CFE_ */ + +#if defined(MACOSX) && defined(KERNEL) +#include <IOKit/IOTypes.h> +#endif + + +/* use the default typedefs in the next section of this file */ +#define USE_TYPEDEF_DEFAULTS + +#endif /* SITE_TYPEDEFS */ + + +/******************************************************************************* + * Default Typedefs + *******************************************************************************/ + +#ifdef USE_TYPEDEF_DEFAULTS +#undef USE_TYPEDEF_DEFAULTS + +#ifndef TYPEDEF_BOOL +typedef int bool; +#endif + +/*----------------------- define uchar, ushort, uint, ulong ----------------*/ + +#ifndef TYPEDEF_UCHAR +typedef unsigned char uchar; +#endif + +#ifndef TYPEDEF_USHORT +typedef unsigned short ushort; +#endif + +#ifndef TYPEDEF_UINT +typedef unsigned int uint; +#endif + +#ifndef TYPEDEF_ULONG +typedef unsigned long ulong; +#endif + +/*----------------------- define [u]int8/16/32/64 --------------------------*/ + +#ifndef TYPEDEF_UINT8 +typedef unsigned char uint8; +#endif + +#ifndef TYPEDEF_UINT16 +typedef unsigned short uint16; +#endif + +#ifndef TYPEDEF_UINT32 +typedef unsigned int uint32; +#endif + +#ifndef TYPEDEF_UINT64 +typedef unsigned long long uint64; +#endif + +#ifndef TYPEDEF_INT8 +typedef signed char int8; +#endif + +#ifndef TYPEDEF_INT16 +typedef signed short int16; +#endif + +#ifndef TYPEDEF_INT32 +typedef signed int int32; +#endif + +#ifndef TYPEDEF_INT64 +typedef signed long long int64; +#endif + +/*----------------------- define float32/64, float_t -----------------------*/ + +#ifndef TYPEDEF_FLOAT32 +typedef float float32; +#endif + +#ifndef TYPEDEF_FLOAT64 +typedef double float64; +#endif + +/* + * abstracted floating point type allows for compile time selection of + * single or double precision arithmetic. Compiling with -DFLOAT32 + * selects single precision; the default is double precision. + */ + +#ifndef TYPEDEF_FLOAT_T + +#if defined(FLOAT32) +typedef float32 float_t; +#else /* default to double precision floating point */ +typedef float64 float_t; +#endif + +#endif /* TYPEDEF_FLOAT_T */ + +/*----------------------- define macro values -----------------------------*/ + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef OFF +#define OFF 0 +#endif + +#ifndef ON +#define ON 1 +#endif + +/*----------------------- define PTRSZ, INLINE ----------------------------*/ + +#ifndef PTRSZ +#define PTRSZ sizeof (char*) +#endif + +#ifndef INLINE + +#ifdef _MSC_VER + +#define INLINE __inline + +#elif __GNUC__ + +#define INLINE __inline__ + +#else + +#define INLINE + +#endif /* _MSC_VER */ + +#endif /* INLINE */ + +#undef TYPEDEF_BOOL +#undef TYPEDEF_UCHAR +#undef TYPEDEF_USHORT +#undef TYPEDEF_UINT +#undef TYPEDEF_ULONG +#undef TYPEDEF_UINT8 +#undef TYPEDEF_UINT16 +#undef TYPEDEF_UINT32 +#undef TYPEDEF_UINT64 +#undef TYPEDEF_INT8 +#undef TYPEDEF_INT16 +#undef TYPEDEF_INT32 +#undef TYPEDEF_INT64 +#undef TYPEDEF_FLOAT32 +#undef TYPEDEF_FLOAT64 +#undef TYPEDEF_FLOAT_T + +#endif /* USE_TYPEDEF_DEFAULTS */ + +#endif /* _TYPEDEFS_H_ */ diff --git a/openwrt/package/nvram/src/include/utils.h b/openwrt/package/nvram/src/include/utils.h new file mode 100644 index 00000000000..b8d1cdb7bfd --- /dev/null +++ b/openwrt/package/nvram/src/include/utils.h @@ -0,0 +1,131 @@ +#include <cy_conf.h> + +extern int diag_led(int type, int act); +extern int C_led(int i); +extern int get_single_ip(char *ipaddr, int which); +extern char *get_mac_from_ip(char *ip); +extern struct dns_lists *get_dns_list(int no); +extern int dns_to_resolv(void); +extern char *get_wan_face(void); +extern int check_wan_link(int num); +extern char *get_complete_lan_ip(char *ip); +extern int get_int_len(int num); +extern int file_to_buf(char *path, char *buf, int len); +extern int buf_to_file(char *path, char *buf); +extern pid_t* find_pid_by_name( char* pidName); +extern int find_pid_by_ps(char* pidName); +extern int *find_all_pid_by_ps(char* pidName); +extern char *find_name_by_proc(int pid); +extern int get_ppp_pid(char *file); +extern long convert_ver(char *ver); +extern int check_flash(void); +extern int check_action(void); +extern int check_now_boot(void); +extern int check_hw_type(void); +extern int is_exist(char *filename); +extern void set_ip_forward(char c); +struct mtu_lists *get_mtu(char *proto); +extern void set_host_domain_name(void); + +extern void encode(char *buf, int len); +extern void decode(char *buf, int len); + +extern int sys_netdev_ioctl(int family, int socket, char *if_name, int cmd, struct ifreq *ifr); + +int ct_openlog(const char *ident, int option, int facility, char *log_name); +void ct_syslog(int level, int enable, const char *fmt,...); +void ct_logger(int level, const char *fmt,...); +struct wl_assoc_mac * get_wl_assoc_mac(int *c); + + + +enum { DMZ, SESSION, DIAG , WL}; + +enum { START_LED, STOP_LED }; + +typedef enum { ACT_IDLE, + ACT_TFTP_UPGRADE, + ACT_WEB_UPGRADE, + ACT_WEBS_UPGRADE, + ACT_SW_RESTORE, + ACT_HW_RESTORE } ACTION; + +enum { UNKNOWN_BOOT = -1, PMON_BOOT, CFE_BOOT }; + +enum { BCM4702_CHIP, BCM4712_CHIP, BCM5325E_CHIP }; + +enum { FIRST, SECOND }; + +enum { SYSLOG_LOG=1, SYSLOG_DEBUG, CONSOLE_ONLY, LOG_CONSOLE, DEBUG_CONSOLE }; + +#define ACTION(cmd) buf_to_file(ACTION_FILE, cmd) + +struct dns_lists { + int num_servers; + char dns_server[4][16]; +}; + +#define NOT_USING 0 +#define USING 1 + +struct wl_assoc_mac +{ + char mac[18]; +}; + +struct mtu_lists { + char *proto; /* protocol */ + char *min; /* min mtu */ + char *max; /* max mtu */ +}; + + +#define PPP_PSEUDO_IP "10.64.64.64" +#define PPP_PSEUDO_NM "255.255.255.255" +#define PPP_PSEUDO_GW "10.112.112.112" + +#define PING_TMP "/tmp/ping.log" +#define TRACEROUTE_TMP "/tmp/traceroute.log" +#define MAX_BUF_LEN 254 + +#define RESOLV_FILE "/tmp/resolv.conf" +#define HOSTS_FILE "/tmp/hosts" + +#define LOG_FILE "/var/log/mess" + +#define ACTION_FILE "/tmp/action" + + +#define split(word, wordlist, next, delim) \ + for (next = wordlist, \ + strncpy(word, next, sizeof(word)), \ + word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \ + next = next ? next + sizeof(delim) - 1 : NULL ; \ + strlen(word); \ + next = next ? : "", \ + strncpy(word, next, sizeof(word)), \ + word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \ + next = next ? next + sizeof(delim) - 1 : NULL) + +#define STRUCT_LEN(name) sizeof(name)/sizeof(name[0]) + +#define printHEX(str,len) { \ + int i; \ + for (i=0 ; i<len ; i++) { \ + printf("%02X ", (unsigned char)*(str+i)); \ + if(((i+1)%16) == 0) printf("- "); \ + if(((i+1)%32) == 0) printf("\n"); \ + } \ + printf("\n\n"); \ +} + + +#define printASC(str,len) { \ + int i; \ + for (i=0 ; i<len ; i++) { \ + printf("%c", (unsigned char)*(str+i)); \ + if(((i+1)%16) == 0) printf("- "); \ + if(((i+1)%32) == 0) printf("\n"); \ + } \ + printf("\n\n"); \ +} diff --git a/openwrt/package/nvram/src/include/wlcompat.h b/openwrt/package/nvram/src/include/wlcompat.h new file mode 100644 index 00000000000..a4fc13439dd --- /dev/null +++ b/openwrt/package/nvram/src/include/wlcompat.h @@ -0,0 +1,36 @@ +/* + * wlcompat.h + * + * Copyright (C) 2005 Felix Fietkau <nbd@vd-s.ath.cx> + * + * 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. + * + * $Id$ + */ +#include <linux/wireless.h> + +#ifndef WLCOMPAT_H +#define WLCOMPAT_H + +#define WLCOMPAT_SET_MONITOR SIOCIWFIRSTPRIV + 0 +#define WLCOMPAT_GET_MONITOR SIOCIWFIRSTPRIV + 1 +#define WLCOMPAT_SET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 2 +#define WLCOMPAT_GET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 3 +#define WLCOMPAT_SET_ANTDIV SIOCIWFIRSTPRIV + 4 +#define WLCOMPAT_GET_ANTDIV SIOCIWFIRSTPRIV + 5 +#define WLCOMPAT_SET_TXANT SIOCIWFIRSTPRIV + 6 +#define WLCOMPAT_GET_TXANT SIOCIWFIRSTPRIV + 7 + +#endif diff --git a/openwrt/package/nvram/src/include/wlioctl.h b/openwrt/package/nvram/src/include/wlioctl.h new file mode 100644 index 00000000000..66783cc44dd --- /dev/null +++ b/openwrt/package/nvram/src/include/wlioctl.h @@ -0,0 +1,1097 @@ +/* + * Custom OID/ioctl definitions for + * Broadcom 802.11abg Networking Device Driver + * + * Definitions subject to change without notice. + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#ifndef _wlioctl_h_ +#define _wlioctl_h_ + +#include <typedefs.h> +#include <proto/ethernet.h> +#include <proto/802.11.h> + +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#define PACKED +#endif + +#define WLC_ESSID_MAX_SIZE 32 + +#define WL_NUMRATES 255 /* max # of rates in a rateset */ + +typedef struct wl_rateset { + uint32 count; /* # rates in this set */ + uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */ +} wl_rateset_t; + +#define WL_CHANSPEC_CHAN_MASK 0x0fff +#define WL_CHANSPEC_BAND_MASK 0xf000 +#define WL_CHANSPEC_BAND_SHIFT 12 +#define WL_CHANSPEC_BAND_A 0x1000 +#define WL_CHANSPEC_BAND_B 0x2000 + +/* + * Per-bss information structure. + */ + +#define WL_LEGACY_BSS_INFO_VERSION 106 /* an older supported version of wl_bss_info struct */ +#define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */ + +typedef struct wl_bss_info106 { + uint version; /* version field */ + struct ether_addr BSSID; + uint8 SSID_len; + uint8 SSID[32]; + uint8 Privacy; /* 0=No WEP, 1=Use WEP */ + int16 RSSI; /* receive signal strength (in dBm) */ + uint16 beacon_period; /* units are Kusec */ + uint16 atim_window; /* units are Kusec */ + uint8 channel; /* Channel no. */ + int8 infra; /* 0=IBSS, 1=infrastructure, 2=unknown */ + struct { + uint count; /* # rates in this set */ + uint8 rates[12]; /* rates in 500kbps units w/hi bit set if basic */ + } rateset; /* supported rates */ + uint8 dtim_period; /* DTIM period */ + int8 phy_noise; /* noise right after tx (in dBm) */ + uint16 capability; /* Capability information */ + struct dot11_bcn_prb *prb; /* probe response frame (ioctl na) */ + uint16 prb_len; /* probe response frame length (ioctl na) */ + struct { + uint8 supported; /* wpa supported */ + uint8 multicast; /* multicast cipher */ + uint8 ucount; /* count of unicast ciphers */ + uint8 unicast[4]; /* unicast ciphers */ + uint8 acount; /* count of auth modes */ + uint8 auth[4]; /* Authentication modes */ + } wpa; +} wl_bss_info106_t; + +typedef struct wl_bss_info { + uint32 version; /* version field */ + uint32 length; /* byte length of data in this record, starting at version and including IEs */ + struct ether_addr BSSID; + uint16 beacon_period; /* units are Kusec */ + uint16 capability; /* Capability information */ + uint8 SSID_len; + uint8 SSID[32]; + struct { + uint count; /* # rates in this set */ + uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ + } rateset; /* supported rates */ + uint8 channel; /* Channel no. */ + uint16 atim_window; /* units are Kusec */ + uint8 dtim_period; /* DTIM period */ + int16 RSSI; /* receive signal strength (in dBm) */ + int8 phy_noise; /* noise (in dBm) */ + uint32 ie_length; /* byte length of Information Elements */ + /* variable length Information Elements */ +} wl_bss_info_t; + +typedef struct wlc_ssid { + uint32 SSID_len; + uchar SSID[32]; +} wlc_ssid_t; + +typedef struct wl_scan_params { + wlc_ssid_t ssid; /* default is {0, ""} */ + struct ether_addr bssid;/* default is bcast */ + int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */ + int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */ + int32 nprobes; /* -1 use default, number of probes per channel */ + int32 active_time; /* -1 use default, dwell time per channel for active scanning */ + int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */ + int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */ + int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */ + uint16 channel_list[1]; /* list of chanspecs */ +} wl_scan_params_t; +/* size of wl_scan_params not including variable length array */ +#define WL_SCAN_PARAMS_FIXED_SIZE 64 + +typedef struct wl_scan_results { + uint32 buflen; + uint32 version; + uint32 count; + wl_bss_info_t bss_info[1]; +} wl_scan_results_t; +/* size of wl_scan_results not including variable length array */ +#define WL_SCAN_RESULTS_FIXED_SIZE 12 + +/* uint32 list */ +typedef struct wl_uint32_list { + /* in - # of elements, out - # of entries */ + uint32 count; + /* variable length uint32 list */ + uint32 element[1]; +} wl_uint32_list_t; + +#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */ + +typedef struct wl_channels_in_country { + uint32 buflen; + uint32 band; + char country_abbrev[WLC_CNTRY_BUF_SZ]; + uint32 count; + uint32 channel[1]; +} wl_channels_in_country_t; + +typedef struct wl_country_list { + uint32 buflen; + uint32 band_set; + uint32 band; + uint32 count; + char country_abbrev[1]; +} wl_country_list_t; + +#define WL_RM_TYPE_BASIC 1 +#define WL_RM_TYPE_CCA 2 +#define WL_RM_TYPE_RPI 3 + +#define WL_RM_FLAG_PARALLEL (1<<0) + +#define WL_RM_FLAG_LATE (1<<1) +#define WL_RM_FLAG_INCAPABLE (1<<2) +#define WL_RM_FLAG_REFUSED (1<<3) + +typedef struct wl_rm_req_elt { + int8 type; + int8 flags; + uint16 chanspec; + uint32 token; /* token for this measurement */ + uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ + uint32 tsf_l; /* TSF low 32-bits */ + uint32 dur; /* TUs */ +} wl_rm_req_elt_t; + +typedef struct wl_rm_req { + uint32 token; /* overall measurement set token */ + uint32 count; /* number of measurement reqests */ + wl_rm_req_elt_t req[1]; /* variable length block of requests */ +} wl_rm_req_t; +#define WL_RM_REQ_FIXED_LEN 8 + +typedef struct wl_rm_rep_elt { + int8 type; + int8 flags; + uint16 chanspec; + uint32 token; /* token for this measurement */ + uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ + uint32 tsf_l; /* TSF low 32-bits */ + uint32 dur; /* TUs */ + uint32 len; /* byte length of data block */ + uint8 data[1]; /* variable length data block */ +} wl_rm_rep_elt_t; +#define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */ + +#define WL_RPI_REP_BIN_NUM 8 +typedef struct wl_rm_rpi_rep { + uint8 rpi[WL_RPI_REP_BIN_NUM]; + int8 rpi_max[WL_RPI_REP_BIN_NUM]; +} wl_rm_rpi_rep_t; + +typedef struct wl_rm_rep { + uint32 token; /* overall measurement set token */ + uint32 len; /* length of measurement report block */ + wl_rm_rep_elt_t rep[1]; /* variable length block of reports */ +} wl_rm_rep_t; +#define WL_RM_REP_FIXED_LEN 8 + + +#define WLC_MAX_KEY_SIZE 32 /* max size of any key */ +#define WLC_MAX_IV_SIZE 16 /* max size of any IV */ +#define WLC_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ +#define WLC_MAX_DEFAULT_KEYS 4 /* # of default WEP keys */ +#define WLC_MAX_KEYS 54 /* Max # of WEP keys */ +#define WLC_WEP1_KEY_SIZE 5 /* max size of any WEP key */ +#define WLC_WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ +#define WLC_WEP128_KEY_SIZE 13 /* max size of any WEP key */ +#define WLC_WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ +#define WLC_TKIP_MIC_SIZE 8 /* size of TKIP MIC */ +#define WLC_TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ +#define WLC_TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ +#define WLC_TKIP_KEY_SIZE 32 /* size of any TKIP key */ +#define WLC_TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ +#define WLC_TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ +#define WLC_TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ +#define WLC_TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ +#define WLC_TKIP_P1_KEY_SIZE 10 /* size of TKHash Phase1 output, in bytes */ +#define WLC_TKIP_P2_KEY_SIZE 16 /* size of TKHash Phase2 output */ +#define WLC_AES_KEY_SIZE 16 /* size of AES key */ + + +typedef enum sup_auth_status { + WLC_SUP_DISCONNECTED = 0, + WLC_SUP_CONNECTING, + WLC_SUP_IDREQUIRED, + WLC_SUP_AUTHENTICATING, + WLC_SUP_AUTHENTICATED, + WLC_SUP_KEYXCHANGE, + WLC_SUP_KEYED +} sup_auth_status_t; + +/* Enumerate crypto algorithms */ +#define CRYPTO_ALGO_OFF 0 +#define CRYPTO_ALGO_WEP1 1 +#define CRYPTO_ALGO_TKIP 2 +#define CRYPTO_ALGO_WEP128 3 +#define CRYPTO_ALGO_AES_CCM 4 +#define CRYPTO_ALGO_AES_OCB_MSDU 5 +#define CRYPTO_ALGO_AES_OCB_MPDU 6 +#define CRYPTO_ALGO_NALG 7 + +#define WSEC_GEN_MIC_ERROR 0x0001 +#define WSEC_GEN_REPLAY 0x0002 + +#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */ +#define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ +#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */ +#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */ + + +typedef struct wlc_tkip_info { + uint16 phase1[WLC_TKIP_P1_KEY_SIZE/sizeof(uint16)]; /* tkhash phase1 result */ + uint8 phase2[WLC_TKIP_P2_KEY_SIZE]; /* tkhash phase2 result */ + uint32 micl; + uint32 micr; +} tkip_info_t; + +typedef struct _wsec_iv { + uint32 hi; /* upper 32 bits of IV */ + uint16 lo; /* lower 16 bits of IV */ +} wsec_iv_t; + +typedef struct wsec_key { + uint32 index; /* key index */ + uint32 len; /* key length */ + uint8 data[WLC_MAX_KEY_SIZE]; /* key data */ + tkip_info_t tkip_tx; /* tkip transmit state */ + tkip_info_t tkip_rx; /* tkip receive state */ + uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ + uint32 flags; /* misc flags */ + uint32 algo_hw; /* cache for hw register*/ + uint32 aes_mode; /* cache for hw register*/ + int iv_len; /* IV length */ + int iv_initialized; /* has IV been initialized already? */ + int icv_len; /* ICV length */ + wsec_iv_t rxiv; /* Rx IV */ + wsec_iv_t txiv; /* Tx IV */ + struct ether_addr ea; /* per station */ +} wsec_key_t; + + + +typedef struct wl_wsec_key { + uint32 index; /* key index */ + uint32 len; /* key length */ + uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */ + uint32 pad_1[18]; + uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ + uint32 flags; /* misc flags */ + uint32 pad_2[2]; + int pad_3; + int iv_initialized; /* has IV been initialized already? */ + int pad_4; + /* Rx IV */ + struct { + uint32 hi; /* upper 32 bits of IV */ + uint16 lo; /* lower 16 bits of IV */ + } rxiv; + uint32 pad_5[2]; + struct ether_addr ea; /* per station */ +} wl_wsec_key_t; + +/* For use with wlc_wep_key.flags */ +#define WSEC_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ +#define WSEC_TKIP_ERROR (1 << 2) /* Provoke deliberate error */ + +#define WSEC_MIN_PSK_LEN 8 +#define WSEC_MAX_PSK_LEN 64 + +/* Flag for key material needing passhash'ing */ +#define WSEC_PASSPHRASE (1<<0) + +/* recepticle for WLC_SET_WSEC_PMK parameter */ +typedef struct { + ushort key_len; /* octets in key material */ + ushort flags; /* key handling qualification */ + uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */ +} wsec_pmk_t; + +/* wireless security bitvec */ +#define WEP_ENABLED 1 +#define TKIP_ENABLED 2 +#define AES_ENABLED 4 +#define WSEC_SWFLAG 8 + +#define WSEC_SW(wsec) ((wsec) & WSEC_SWFLAG) +#define WSEC_HW(wsec) (!WSEC_SW(wsec)) +#define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED) +#define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED) +#define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED) +#define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED)) + + +/* wireless authentication bit vector */ +#define WPA_ENABLED 1 +#define PSK_ENABLED 2 + +#define WAUTH_WPA_ENABLED(wauth) ((wauth) & WPA_ENABLED) +#define WAUTH_PSK_ENABLED(wauth) ((wauth) & PSK_ENABLED) +#define WAUTH_ENABLED(wauth) ((wauth) & (WPA_ENABLED | PSK_ENABLED)) + +/* group/mcast cipher */ +#define WPA_MCAST_CIPHER(wsec) (((wsec) & TKIP_ENABLED) ? WPA_CIPHER_TKIP : \ + ((wsec) & AES_ENABLED) ? WPA_CIPHER_AES_CCM : \ + WPA_CIPHER_NONE) + + +typedef struct wl_led_info { + uint32 index; /* led index */ + uint32 behavior; + bool activehi; +} wl_led_info_t; + +/* + * definitions for driver messages passed from WL to NAS. + */ +/* Use this to recognize wpa and 802.1x driver messages. */ +static const uint8 wl_wpa_snap_template[] = + { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c }; + +#define WL_WPA_MSG_IFNAME_MAX 16 + +/* WPA driver message */ +typedef struct wl_wpa_header { + struct ether_header eth; + struct dot11_llc_snap_header snap; + uint8 version; + uint8 type; + /* version 2 additions */ + char ifname[WL_WPA_MSG_IFNAME_MAX]; + /* version specific data */ + /* uint8 data[1]; */ +} wl_wpa_header_t PACKED; + +/* + * definitions for 802.2 messages passed from WL to NAS. + */ +/* This seems not to be defined outside the kernel on linux. */ +#ifndef ETH_P_802_2 +#define ETH_P_802_2 4 +#endif + +#define WL_WPA_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX) + +/* WPA driver message ethertype - private between wlc and nas */ +#define WL_WPA_ETHER_TYPE 0x9999 + +/* WPA driver message current version */ +#define WL_WPA_MSG_VERSION 2 + +/* Type field values for the 802.2 driver messages for WPA. */ +#define WLC_ASSOC_MSG 1 +#define WLC_DISASSOC_MSG 2 +#define WLC_PTK_MIC_MSG 3 +#define WLC_GTK_MIC_MSG 4 + +/* Use this to recognize 802.2 driver messages. */ +static const uint8 wpa_snap_template[] = + { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c }; + + +/* 802.1x driver message */ +typedef struct wl_eapol_header { + struct ether_header eth; + struct dot11_llc_snap_header snap; + uint8 version; + uint8 reserved; + char ifname[WL_WPA_MSG_IFNAME_MAX]; + /* version specific data */ + /* uint8 802_1x_msg[1]; */ +} wl_eapol_header_t PACKED; + +#define WL_EAPOL_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX) + +/* 802.1x driver message ethertype - private between wlc and nas */ +#define WL_EAPOL_ETHER_TYPE 0x999A + +/* 802.1x driver message current version */ +#define WL_EAPOL_MSG_VERSION 1 + +/* srom read/write struct passed through ioctl */ +typedef struct { + uint byteoff; /* byte offset */ + uint nbytes; /* number of bytes */ + uint16 buf[1]; +} srom_rw_t; + +/* R_REG and W_REG struct passed through ioctl */ +typedef struct { + uint32 byteoff; /* byte offset of the field in d11regs_t */ + uint32 val; /* read/write value of the field */ + uint32 size; /* sizeof the field */ +} rw_reg_t; + +/* Structure used by GET/SET_ATTEN ioctls */ +typedef struct { + uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */ + uint16 bb; /* Baseband attenuation */ + uint16 radio; /* Radio attenuation */ + uint16 txctl1; /* Radio TX_CTL1 value */ +} atten_t; + +/* Used to get specific STA parameters */ +typedef struct { + uint32 val; + struct ether_addr ea; +} scb_val_t; + +/* callback registration data types */ + +typedef struct _mac_event_params { + uint msg; + struct ether_addr *addr; + uint result; + uint status; + uint auth_type; +} mac_event_params_t; + +typedef struct _mic_error_params { + struct ether_addr *ea; + bool group; + bool flush_txq; +} mic_error_params_t; + +typedef enum _wl_callback { + WL_MAC_EVENT_CALLBACK = 0, + WL_LINK_UP_CALLBACK, + WL_LINK_DOWN_CALLBACK, + WL_MIC_ERROR_CALLBACK, + WL_LAST_CALLBACK +} wl_callback_t; + +typedef struct _callback { + void (*fn)(void *, void *); + void *context; +} callback_t; + +typedef struct _scan_callback { + void (*fn)(void *); + void *context; +} scan_callback_t; + +/* used to register an arbitrary callback via the IOCTL interface */ +typedef struct _set_callback { + int index; + callback_t callback; +} set_callback_t; + + + +/* Event data type */ +typedef struct { + uint msg; /* Message (see below) */ + struct ether_addr *addr; /* Station address (if applicable) */ + uint status; /* Status code (see below) */ + uint reason; /* Reason code (if applicable) */ + uint auth_type; /* WLC_E_AUTH */ + bool link; /* WLC_E_LINK */ + bool group; /* WLC_E_MIC_ERROR */ + bool flush_txq; /* WLC_E_MIC_ERROR */ +} wlc_event_t; + +typedef struct { + uint16 ver; /* version of this struct */ + uint16 cap; /* sta's advertized capabilities */ + uint32 flags; /* flags defined below */ + uint32 idle; /* time since data pkt rx'd from sta */ + struct ether_addr ea; /* Station address */ + wl_rateset_t rateset; /* rateset in use */ +} sta_info_t; + +#define WL_STA_INFO_LEN 300 +#define WL_STA_VER 1 + +/* flags fields */ +#define WL_STA_BRCM 0x01 +#define WL_STA_WME 0x02 +#define WL_STA_ABCAP 0x04 +#define WL_STA_AUTHE 0x08 +#define WL_STA_ASSOC 0x10 +#define WL_STA_AUTHO 0x20 + +/* Event messages */ +#define WLC_E_SET_SSID 1 +#define WLC_E_JOIN 2 +#define WLC_E_START 3 +#define WLC_E_AUTH 4 +#define WLC_E_AUTH_IND 5 +#define WLC_E_DEAUTH 6 +#define WLC_E_DEAUTH_IND 7 +#define WLC_E_ASSOC 8 +#define WLC_E_ASSOC_IND 9 +#define WLC_E_REASSOC 10 +#define WLC_E_REASSOC_IND 11 +#define WLC_E_DISASSOC 12 +#define WLC_E_DISASSOC_IND 13 +#define WLC_E_QUIET_START 14 /* 802.11h Quiet period started */ +#define WLC_E_QUIET_END 15 /* 802.11h Quiet period ended */ +#define WLC_E_GOT_BEACONS 16 +#define WLC_E_LINK 17 /* Link indication */ +#define WLC_E_MIC_ERROR 18 /* TKIP MIC error occurred */ +#define WLC_E_NDIS_LINK 19 /* NDIS style link indication */ +#define WLC_E_ROAM 20 +#define WLC_E_LAST 21 + +/* Event status codes */ +#define WLC_E_STATUS_SUCCESS 0 +#define WLC_E_STATUS_FAIL 1 +#define WLC_E_STATUS_TIMEOUT 2 +#define WLC_E_STATUS_NO_NETWORKS 3 +#define WLC_E_STATUS_ABORT 4 + +typedef struct wlc_event_cb { + uint msg; /* Event message or 0 for all */ + void (*fn)(void *, wlc_event_t *); /* Callback function */ + void *context; /* Passed to callback function */ + struct wlc_event_cb *next; /* Next in the chain */ +} wlc_event_cb_t; + +/* + * Country locale determines which channels are available to us. + */ +typedef enum _wlc_locale { + WLC_WW = 0, /* Worldwide */ + WLC_THA, /* Thailand */ + WLC_ISR, /* Israel */ + WLC_JDN, /* Jordan */ + WLC_PRC, /* China */ + WLC_JPN, /* Japan */ + WLC_FCC, /* USA */ + WLC_EUR, /* Europe */ + WLC_USL, /* US Low Band only */ + WLC_JPH, /* Japan High Band only */ + WLC_ALL, /* All the channels in this band */ + WLC_11D, /* Represents locale recieved by 11d beacons */ + WLC_LAST_LOCALE, + WLC_UNDEFINED_LOCALE = 0xf +} wlc_locale_t; + +/* channel encoding */ +typedef struct channel_info { + int hw_channel; + int target_channel; + int scan_channel; +} channel_info_t; + +/* For ioctls that take a list of MAC addresses */ +struct maclist { + uint count; /* number of MAC addresses */ + struct ether_addr ea[1]; /* variable length array of MAC addresses */ +}; + +/* get pkt count struct passed through ioctl */ +typedef struct get_pktcnt { + uint rx_good_pkt; + uint rx_bad_pkt; + uint tx_good_pkt; + uint tx_bad_pkt; +} get_pktcnt_t; + +/* Linux network driver ioctl encoding */ +typedef struct wl_ioctl { + uint cmd; /* common ioctl definition */ + void *buf; /* pointer to user buffer */ + uint len; /* length of user buffer */ + bool set; /* get or set request (optional) */ + uint used; /* bytes read or written (optional) */ + uint needed; /* bytes needed (optional) */ +} wl_ioctl_t; + +/* + * Structure for passing hardware and software + * revision info up from the driver. + */ +typedef struct wlc_rev_info { + uint vendorid; /* PCI vendor id */ + uint deviceid; /* device id of chip */ + uint radiorev; /* radio revision */ + uint chiprev; /* chip revision */ + uint corerev; /* core revision */ + uint boardid; /* board identifier (usu. PCI sub-device id) */ + uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */ + uint boardrev; /* board revision */ + uint driverrev; /* driver version */ + uint ucoderev; /* microcode version */ + uint bus; /* bus type */ + uint chipnum; /* chip number */ +} wlc_rev_info_t; + +/* check this magic number */ +#define WLC_IOCTL_MAGIC 0x14e46c77 + +/* bump this number if you change the ioctl interface */ +#define WLC_IOCTL_VERSION 1 + +/* maximum length buffer required */ +#define WLC_IOCTL_MAXLEN 8192 + +/* maximum length buffer required */ +#define WLC_IOCTL_SMLEN 256 + +/* common ioctl definitions */ +#define WLC_GET_MAGIC 0 +#define WLC_GET_VERSION 1 +#define WLC_UP 2 +#define WLC_DOWN 3 +#define WLC_GET_LOOP 4 +#define WLC_SET_LOOP 5 +#define WLC_DUMP 6 +#define WLC_GET_MSGLEVEL 7 +#define WLC_SET_MSGLEVEL 8 +#define WLC_GET_PROMISC 9 +#define WLC_SET_PROMISC 10 +#define WLC_OBSOLETE 11 +#define WLC_GET_RATE 12 +#define WLC_SET_RATE 13 +#define WLC_GET_INSTANCE 14 +#define WLC_GET_FRAG 15 +#define WLC_SET_FRAG 16 +#define WLC_GET_RTS 17 +#define WLC_SET_RTS 18 +#define WLC_GET_INFRA 19 +#define WLC_SET_INFRA 20 +#define WLC_GET_AUTH 21 +#define WLC_SET_AUTH 22 +#define WLC_GET_BSSID 23 +#define WLC_SET_BSSID 24 +#define WLC_GET_SSID 25 +#define WLC_SET_SSID 26 +#define WLC_RESTART 27 +#define WLC_DUMP_SCB 28 +#define WLC_GET_CHANNEL 29 +#define WLC_SET_CHANNEL 30 +#define WLC_GET_SRL 31 +#define WLC_SET_SRL 32 +#define WLC_GET_LRL 33 +#define WLC_SET_LRL 34 +#define WLC_GET_PLCPHDR 35 +#define WLC_SET_PLCPHDR 36 +#define WLC_GET_RADIO 37 +#define WLC_SET_RADIO 38 +#define WLC_GET_PHYTYPE 39 +#define WLC_DUMP_RATE 40 +#define WLC_SET_RATE_PARAMS 41 +#define WLC_GET_WEP 42 +#define WLC_SET_WEP 43 +#define WLC_GET_KEY 44 +#define WLC_SET_KEY 45 +#define WLC_GET_REGULATORY 46 +#define WLC_SET_REGULATORY 47 +#define WLC_GET_PASSIVE 48 /* added by nbd */ +#define WLC_SET_PASSIVE 49 /* added by nbd */ +#define WLC_SCAN 50 +#define WLC_SCAN_RESULTS 51 +#define WLC_DISASSOC 52 +#define WLC_REASSOC 53 +#define WLC_GET_ROAM_TRIGGER 54 +#define WLC_SET_ROAM_TRIGGER 55 +#define WLC_GET_ROAM_DELTA 56 +#define WLC_SET_ROAM_DELTA 57 +#define WLC_GET_ROAM_SCAN_PERIOD 58 +#define WLC_SET_ROAM_SCAN_PERIOD 59 +#define WLC_EVM 60 +#define WLC_GET_TXANT 61 +#define WLC_SET_TXANT 62 +#define WLC_GET_ANTDIV 63 +#define WLC_SET_ANTDIV 64 +#define WLC_GET_TXPWR 65 +#define WLC_SET_TXPWR 66 +#define WLC_GET_CLOSED 67 +#define WLC_SET_CLOSED 68 +#define WLC_GET_MACLIST 69 +#define WLC_SET_MACLIST 70 +#define WLC_GET_RATESET 71 +#define WLC_SET_RATESET 72 +#define WLC_GET_LOCALE 73 +#define WLC_SET_LOCALE 74 +#define WLC_GET_BCNPRD 75 +#define WLC_SET_BCNPRD 76 +#define WLC_GET_DTIMPRD 77 +#define WLC_SET_DTIMPRD 78 +#define WLC_GET_SROM 79 +#define WLC_SET_SROM 80 +#define WLC_GET_WEP_RESTRICT 81 +#define WLC_SET_WEP_RESTRICT 82 +#define WLC_GET_COUNTRY 83 +#define WLC_SET_COUNTRY 84 +#define WLC_GET_PM 85 +#define WLC_SET_PM 86 +#define WLC_GET_WAKE 87 +#define WLC_SET_WAKE 88 +#define WLC_GET_D11CNTS 89 +#define WLC_GET_FORCELINK 90 /* ndis only */ +#define WLC_SET_FORCELINK 91 /* ndis only */ +#define WLC_FREQ_ACCURACY 92 +#define WLC_CARRIER_SUPPRESS 93 +#define WLC_GET_PHYREG 94 +#define WLC_SET_PHYREG 95 +#define WLC_GET_RADIOREG 96 +#define WLC_SET_RADIOREG 97 +#define WLC_GET_REVINFO 98 +#define WLC_GET_UCANTDIV 99 +#define WLC_SET_UCANTDIV 100 +#define WLC_R_REG 101 +#define WLC_W_REG 102 +#define WLC_DIAG_LOOPBACK 103 +#define WLC_RESET_D11CNTS 104 +#define WLC_GET_MACMODE 105 +#define WLC_SET_MACMODE 106 +#define WLC_GET_MONITOR 107 /* added by nbd */ +#define WLC_SET_MONITOR 108 /* added by nbd */ +#define WLC_GET_GMODE 109 +#define WLC_SET_GMODE 110 +#define WLC_GET_LEGACY_ERP 111 +#define WLC_SET_LEGACY_ERP 112 +#define WLC_GET_RX_ANT 113 +#define WLC_GET_CURR_RATESET 114 /* current rateset */ +#define WLC_GET_SCANSUPPRESS 115 +#define WLC_SET_SCANSUPPRESS 116 +#define WLC_GET_AP 117 +#define WLC_SET_AP 118 +#define WLC_GET_EAP_RESTRICT 119 +#define WLC_SET_EAP_RESTRICT 120 +#define WLC_SCB_AUTHORIZE 121 +#define WLC_SCB_DEAUTHORIZE 122 +#define WLC_GET_WDSLIST 123 +#define WLC_SET_WDSLIST 124 +#define WLC_GET_ATIM 125 +#define WLC_SET_ATIM 126 +#define WLC_GET_RSSI 127 +#define WLC_GET_PHYANTDIV 128 +#define WLC_SET_PHYANTDIV 129 +#define WLC_AP_RX_ONLY 130 +#define WLC_GET_TX_PATH_PWR 131 +#define WLC_SET_TX_PATH_PWR 132 +#define WLC_GET_WSEC 133 +#define WLC_SET_WSEC 134 +#define WLC_GET_PHY_NOISE 135 +#define WLC_GET_BSS_INFO 136 +#define WLC_GET_PKTCNTS 137 +#define WLC_GET_LAZYWDS 138 +#define WLC_SET_LAZYWDS 139 +#define WLC_GET_BANDLIST 140 +#define WLC_GET_BAND 141 +#define WLC_SET_BAND 142 +#define WLC_SCB_DEAUTHENTICATE 143 +#define WLC_GET_SHORTSLOT 144 +#define WLC_GET_SHORTSLOT_OVERRIDE 145 +#define WLC_SET_SHORTSLOT_OVERRIDE 146 +#define WLC_GET_SHORTSLOT_RESTRICT 147 +#define WLC_SET_SHORTSLOT_RESTRICT 148 +#define WLC_GET_GMODE_PROTECTION 149 +#define WLC_GET_GMODE_PROTECTION_OVERRIDE 150 +#define WLC_SET_GMODE_PROTECTION_OVERRIDE 151 +#define WLC_UPGRADE 152 +#define WLC_GET_MRATE 153 +#define WLC_SET_MRATE 154 +#define WLC_GET_IGNORE_BCNS 155 +#define WLC_SET_IGNORE_BCNS 156 +#define WLC_GET_SCB_TIMEOUT 157 +#define WLC_SET_SCB_TIMEOUT 158 +#define WLC_GET_ASSOCLIST 159 +#define WLC_GET_CLK 160 +#define WLC_SET_CLK 161 +#define WLC_GET_UP 162 +#define WLC_OUT 163 +#define WLC_GET_WPA_AUTH 164 +#define WLC_SET_WPA_AUTH 165 +#define WLC_GET_UCFLAGS 166 +#define WLC_SET_UCFLAGS 167 +#define WLC_GET_PWRIDX 168 +#define WLC_SET_PWRIDX 169 +#define WLC_GET_TSSI 170 +#define WLC_GET_SUP_RATESET_OVERRIDE 171 +#define WLC_SET_SUP_RATESET_OVERRIDE 172 +#define WLC_SET_FAST_TIMER 173 +#define WLC_GET_FAST_TIMER 174 +#define WLC_SET_SLOW_TIMER 175 +#define WLC_GET_SLOW_TIMER 176 +#define WLC_DUMP_PHYREGS 177 +#define WLC_GET_GMODE_PROTECTION_CONTROL 178 +#define WLC_SET_GMODE_PROTECTION_CONTROL 179 +#define WLC_GET_PHYLIST 180 +#define WLC_ENCRYPT_STRENGTH 181 /* ndis only */ +#define WLC_DECRYPT_STATUS 182 /* ndis only */ +#define WLC_GET_KEY_SEQ 183 +#define WLC_GET_SCAN_CHANNEL_TIME 184 +#define WLC_SET_SCAN_CHANNEL_TIME 185 +#define WLC_GET_SCAN_UNASSOC_TIME 186 +#define WLC_SET_SCAN_UNASSOC_TIME 187 +#define WLC_GET_SCAN_HOME_TIME 188 +#define WLC_SET_SCAN_HOME_TIME 189 +#define WLC_GET_SCAN_PASSES 190 +#define WLC_SET_SCAN_PASSES 191 +#define WLC_GET_PRB_RESP_TIMEOUT 192 +#define WLC_SET_PRB_RESP_TIMEOUT 193 +#define WLC_GET_ATTEN 194 +#define WLC_SET_ATTEN 195 +#define WLC_GET_SHMEM 196 /* diag */ +#define WLC_SET_SHMEM 197 /* diag */ +#define WLC_GET_GMODE_PROTECTION_CTS 198 +#define WLC_SET_GMODE_PROTECTION_CTS 199 +#define WLC_SET_TKIP_MIC_FLAG 200 +#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201 +#define WLC_TKIP_COUNTERMEASURES 202 +#define WLC_GET_PIOMODE 203 +#define WLC_SET_PIOMODE 204 +#define WLC_SET_LED 209 +#define WLC_GET_LED 210 +#define WLC_GET_INTERFERENCE_MODE 211 +#define WLC_SET_INTERFERENCE_MODE 212 +#define WLC_GET_CHANNEL_QA 213 +#define WLC_START_CHANNEL_QA 214 +#define WLC_GET_CHANNEL_SEL 215 +#define WLC_START_CHANNEL_SEL 216 +#define WLC_GET_VALID_CHANNELS 217 +#define WLC_GET_FAKEFRAG 218 +#define WLC_SET_FAKEFRAG 219 +#define WLC_GET_PWROUT_PERCENTAGE 220 +#define WLC_SET_PWROUT_PERCENTAGE 221 +#define WLC_SET_BAD_FRAME_PREEMPT 222 +#define WLC_GET_BAD_FRAME_PREEMPT 223 +#define WLC_SET_LEAP_LIST 224 +#define WLC_GET_LEAP_LIST 225 +#define WLC_GET_CWMIN 226 +#define WLC_SET_CWMIN 227 +#define WLC_GET_CWMAX 228 +#define WLC_SET_CWMAX 229 +#define WLC_GET_WET 230 +#define WLC_SET_WET 231 +#define WLC_GET_KEY_PRIMARY 235 +#define WLC_SET_KEY_PRIMARY 236 +#define WLC_SCAN_WITH_CALLBACK 240 +#define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */ +#define WLC_SET_CS_SCAN_TIMER 248 +#define WLC_GET_CS_SCAN_TIMER 249 +#define WLC_CURRENT_PWR 256 +#define WLC_GET_CHANNELS_IN_COUNTRY 260 +#define WLC_GET_COUNTRY_LIST 261 +#define WLC_GET_VAR 262 /* get value of named variable */ +#define WLC_SET_VAR 263 /* set named variable to value */ +#define WLC_NVRAM_GET 264 +#define WLC_NVRAM_SET 265 +#define WLC_SET_WSEC_PMK 268 +#define WLC_GET_AUTH_MODE 269 +#define WLC_SET_AUTH_MODE 270 +#define WLC_LAST 273 /* do not change - use get_var/set_var */ + +/* + * Minor kludge alert: + * Duplicate a few definitions that irelay requires from epiioctl.h here + * so caller doesn't have to include this file and epiioctl.h . + * If this grows any more, it would be time to move these irelay-specific + * definitions out of the epiioctl.h and into a separate driver common file. + */ +#ifndef EPICTRL_COOKIE +#define EPICTRL_COOKIE 0xABADCEDE +#endif + +/* vx wlc ioctl's offset */ +#define CMN_IOCTL_OFF 0x180 + +/* + * custom OID support + * + * 0xFF - implementation specific OID + * 0xE4 - first byte of Broadcom PCI vendor ID + * 0x14 - second byte of Broadcom PCI vendor ID + * 0xXX - the custom OID number + */ + +/* begin 0x1f values beyond the start of the ET driver range. */ +#define WL_OID_BASE 0xFFE41420 + +/* NDIS overrides */ +#define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE) +#define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK) +#define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK) +#define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH) +#define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS) + +#define WL_DECRYPT_STATUS_SUCCESS 1 +#define WL_DECRYPT_STATUS_FAILURE 2 +#define WL_DECRYPT_STATUS_UNKNOWN 3 + +/* allows user-mode app to poll the status of USB image upgrade */ +#define WLC_UPGRADE_SUCCESS 0 +#define WLC_UPGRADE_PENDING 1 + +/* Bit masks for radio disabled status - returned by WL_GET_RADIO */ +#define WL_RADIO_SW_DISABLE (1<<0) +#define WL_RADIO_HW_DISABLE (1<<1) + +/* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */ +#define WL_TXPWR_OVERRIDE (1<<31) + + +/* Bus types */ +#define WL_SB_BUS 0 /* Silicon Backplane */ +#define WL_PCI_BUS 1 /* PCI target */ +#define WL_PCMCIA_BUS 2 /* PCMCIA target */ + +/* band types */ +#define WLC_BAND_AUTO 0 /* auto-select */ +#define WLC_BAND_A 1 /* "a" band (5 Ghz) */ +#define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */ + +/* MAC list modes */ +#define WLC_MACMODE_DISABLED 0 /* MAC list disabled */ +#define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */ +#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */ + + +/* 54g modes (basic bits may still be overridden) */ +#define GMODE_LEGACY_B 0 /* Rateset: 1b, 2b, 5.5, 11 */ + /* Preamble: Long */ + /* Shortslot: Off */ +#define GMODE_AUTO 1 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ + /* Extended Rateset: 6, 9, 12, 48 */ + /* Preamble: Long */ + /* Shortslot: Auto */ +#define GMODE_ONLY 2 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 */ + /* Extended Rateset: 6b, 9, 12b, 48 */ + /* Preamble: Short required */ + /* Shortslot: Auto */ +#define GMODE_B_DEFERRED 3 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ + /* Extended Rateset: 6, 9, 12, 48 */ + /* Preamble: Long */ + /* Shortslot: On */ +#define GMODE_PERFORMANCE 4 /* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 */ + /* Preamble: Short required */ + /* Shortslot: On and required */ +#define GMODE_LRS 5 /* Rateset: 1b, 2b, 5.5b, 11b */ + /* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 */ + /* Preamble: Long */ + /* Shortslot: Auto */ +#define GMODE_MAX 6 + + +/* values for PLCPHdr_override */ +#define WLC_PLCP_AUTO -1 +#define WLC_PLCP_SHORT 0 +#define WLC_PLCP_LONG 1 + +/* values for g_protection_override */ +#define WLC_G_PROTECTION_AUTO -1 +#define WLC_G_PROTECTION_OFF 0 +#define WLC_G_PROTECTION_ON 1 + +/* values for g_protection_control */ +#define WLC_G_PROTECTION_CTL_OFF 0 +#define WLC_G_PROTECTION_CTL_LOCAL 1 +#define WLC_G_PROTECTION_CTL_OVERLAP 2 + +/* Values for PM */ +#define PM_OFF 0 +#define PM_MAX 1 +#define PM_FAST 2 + +/* interference mitigation options */ +#define INTERFERE_NONE 0 /* off */ +#define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */ +#define WLAN_MANUAL 2 /* ACI: no auto detection */ +#define WLAN_AUTO 3 /* ACI: auto - detact */ + +/* Message levels */ +#define WL_ERROR_VAL 0x0001 +#define WL_TRACE_VAL 0x0002 +#define WL_PRHDRS_VAL 0x0004 +#define WL_PRPKT_VAL 0x0008 +#define WL_INFORM_VAL 0x0010 +#define WL_TMP_VAL 0x0020 +#define WL_OID_VAL 0x0040 +#define WL_RATE_VAL 0x0080 +#define WL_ASSOC_VAL 0x0100 +#define WL_PRUSR_VAL 0x0200 +#define WL_PS_VAL 0x0400 +#define WL_TXPWR_VAL 0x0800 +#define WL_GMODE_VAL 0x1000 +#define WL_DUAL_VAL 0x2000 +#define WL_WSEC_VAL 0x4000 +#define WL_WSEC_DUMP_VAL 0x8000 +#define WL_LOG_VAL 0x10000 +#define WL_NRSSI_VAL 0x20000 +#define WL_LOFT_VAL 0x40000 +#define WL_REGULATORY_VAL 0x80000 +#define WL_ACI_VAL 0x100000 + + +/* 802.11h enforcement levels */ +#define SPECT_MNGMT_OFF 0 /* 11h disabled */ +#define SPECT_MNGMT_LOOSE 1 /* Allow scan lists to contain non-11h AP */ + /* when 11h is enabled */ +#define SPECT_MNGMT_STRICT 2 /* Prine out non-11h APs from scan list */ + + + +/* max # of leds supported by GPIO (gpio pin# == led index#) */ +#define WL_LED_NUMGPIO 16 /* gpio 0-15 */ + +/* led per-pin behaviors */ +#define WL_LED_OFF 0 /* always off */ +#define WL_LED_ON 1 /* always on */ +#define WL_LED_ACTIVITY 2 /* activity */ +#define WL_LED_RADIO 3 /* radio enabled */ +#define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */ +#define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */ +#define WL_LED_BGMODE 6 /* on if gmode, off if bmode */ +#define WL_LED_WI1 7 +#define WL_LED_WI2 8 +#define WL_LED_WI3 9 +#define WL_LED_ASSOC 10 /* associated state indicator */ +#define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */ +#define WL_LED_NUMBEHAVIOR 12 + +/* led behavior numeric value format */ +#define WL_LED_BEH_MASK 0x7f /* behavior mask */ +#define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */ + + +/* maximum channels */ +#define WL_NUMCHANNELS 64 /* max # of channels in the band */ + +/* rate check */ +#define WL_RATE_OFDM(r) (((r) & 0x7f) == 12 || ((r) & 0x7f) == 18 || \ + ((r) & 0x7f) == 24 || ((r) & 0x7f) == 36 || \ + ((r) & 0x7f) == 48 || ((r) & 0x7f) == 72 || \ + ((r) & 0x7f) == 96 || ((r) & 0x7f) == 108) + +/* WDS link local endpoint WPA role */ +#define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */ +#define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */ +#define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */ + +/* afterburner_override */ +#define ABO_AUTO -1 /* auto - no override */ +#define ABO_OFF 0 /* force afterburner off */ +#define ABO_ON 1 /* force afterburner on */ + +#define GMODE_AFTERBURNER 6 + +#undef PACKED + +#endif /* _wlioctl_h_ */ diff --git a/openwrt/package/nvram/src/include/wlutils.h b/openwrt/package/nvram/src/include/wlutils.h new file mode 100644 index 00000000000..07e2536ca3c --- /dev/null +++ b/openwrt/package/nvram/src/include/wlutils.h @@ -0,0 +1,59 @@ +/* + * Broadcom wireless network adapter utility functions + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#ifndef _wlutils_h_ +#define _wlutils_h_ + +#include <typedefs.h> +#include <wlioctl.h> + +/* + * Pass a wlioctl request to the specified interface. + * @param name interface name + * @param cmd WLC_GET_MAGIC <= cmd < WLC_LAST + * @param buf buffer for passing in and/or receiving data + * @param len length of buf + * @return >= 0 if successful or < 0 otherwise + */ +extern int wl_ioctl(char *name, int cmd, void *buf, int len); + +/* + * Get the MAC (hardware) address of the specified interface. + * @param name interface name + * @param hwaddr 6-byte buffer for receiving address + * @return >= 0 if successful or < 0 otherwise + */ +extern int wl_hwaddr(char *name, unsigned char *hwaddr); + +/* + * Probe the specified interface. + * @param name interface name + * @return >= 0 if a Broadcom wireless device or < 0 otherwise + */ +extern int wl_probe(char *name); + +/* + * Set/Get named variable. + * @param name interface name + * @param var variable name + * @param val variable value/buffer + * @param len variable value/buffer length + * @return success == 0, failure != 0 + */ +extern int wl_set_val(char *name, char *var, void *val, int len); +extern int wl_get_val(char *name, char *var, void *val, int len); +extern int wl_set_int(char *name, char *var, int val); +extern int wl_get_int(char *name, char *var, int *val); + +#endif /* _wlutils_h_ */ From 6860977c4cb5b8c62bd7d8da383c3414fb424b44 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 1 Jun 2006 23:20:10 +0000 Subject: [PATCH 131/757] fix base-files version number SVN-Revision: 3888 --- openwrt/package/base-files/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 226782bb92d..014d4b731eb 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -28,6 +28,7 @@ define Package/base-files$(TARGET) DEFAULT:=y TITLE:=OpenWrt system scripts DESCRIPTION:=Base filesystem for OpenWrt + VERSION:=$(PKG_RELEASE) endef define Package/libgcc From 450d0b77e63341cc394708866b1de0181b216c96 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 2 Jun 2006 00:01:00 +0000 Subject: [PATCH 132/757] fix version info for packages that either lack PKG_VERSION or PKG_RELEASE SVN-Revision: 3890 --- openwrt/package/rules.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index fe16a18f987..79c2b3460d8 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -55,7 +55,15 @@ define Package/Default DEPENDS:= MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org> SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) - VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) + ifneq ($(PKG_VERSION),) + ifneq ($(PKG_RELEASE),) + VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) + else + VERSION:=$(PKG_VERSION) + endif + else + VERSION:=$(PKG_RELEASE) + endif PKGARCH:=$(ARCH) PRIORITY:=optional DEFAULT:= From 3975a3e97e8bfb86af0448e10ba6593d66334332 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 2 Jun 2006 16:03:03 +0000 Subject: [PATCH 133/757] fix a typo that prevents base-files from being installed SVN-Revision: 3894 --- openwrt/package/base-files/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 014d4b731eb..23152c11d1d 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -20,7 +20,7 @@ UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} endif -CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files +CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) define Package/base-files$(TARGET) SECTION:=base @@ -76,7 +76,7 @@ endef define Package/base-files$(TARGET)/install $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) - $(CP) ./default/* $(1) + $(CP) ./default/* $(1)/ if [ -d $(BOARD)-$(KERNEL) ]; then \ $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \ fi From 83acc2352b626aae81ee4764aff6369483ce1fb0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 2 Jun 2006 16:12:05 +0000 Subject: [PATCH 134/757] store stamp file for 'development headers installed' in the staging dir instead of the package dir SVN-Revision: 3895 --- openwrt/package/rules.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 79c2b3460d8..1fd6f2a8ab7 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -29,17 +29,18 @@ define Build/DefaultTargets $(call Build/Compile) touch $$@ - $(PKG_BUILD_DIR)/.dev-installed: $(PKG_BUILD_DIR)/.built + $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built $(call Build/InstallDev) touch $$@ ifdef Build/InstallDev - compile-targets: $(PKG_BUILD_DIR)/.dev-installed + compile-targets: $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed endif package-clean: FORCE $(call Build/Clean) $(call Build/UninstallDev) + rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed package-rebuild: FORCE @-rm $(PKG_BUILD_DIR)/.built From a6983e9cb105f6e1ca3a84698c064f9d971e70a4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 2 Jun 2006 16:17:56 +0000 Subject: [PATCH 135/757] remove unused wget menuconfig option; make the package autorebuild optional (but enabled by default) SVN-Revision: 3896 --- openwrt/Config.in | 10 ++++++---- openwrt/package/rules.mk | 10 +++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/openwrt/Config.in b/openwrt/Config.in index 4a887cc1356..740205e3ec0 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -21,10 +21,12 @@ menuconfig DEVEL menuconfig BUILDOPTS bool "Build Options" if DEVEL -config WGET - string - prompt "WGET command" if BUILDOPTS - default "wget --passive-ftp -nd" +config AUTOREBUILD + bool + prompt "Automatic rebuild of packages" if BUILDOPTS + default y + help + Automatically rebuild packages when their files change config TAR_VERBOSITY bool diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 1fd6f2a8ab7..c05333b021d 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -7,12 +7,16 @@ endif define Build/DefaultTargets ifeq ($(DUMP),) ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(TOPDIR)/package/rules.mk),$(PKG_BUILD_DIR)) - $(PKG_BUILD_DIR)/.prepared: package-clean + ifeq ($(CONFIG_AUTOREBUILD),y) + $(PKG_BUILD_DIR)/.prepared: package-clean + endif endif ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - $(PKG_BUILD_DIR)/.built: package-rebuild - endif + ifeq ($(CONFIG_AUTOREBUILD),y) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif + endif endif $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) From 0cde379fb90322fd91948ad4c5be9c89b992933f Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 2 Jun 2006 16:27:15 +0000 Subject: [PATCH 136/757] run defconfig at the start of a normal make run to get additional config options SVN-Revision: 3897 --- openwrt/Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 84508b1ffcf..1d45582affe 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -55,22 +55,23 @@ endif pkginfo-clean: FORCE -rm -f .pkginfo .config.in -scripts/config/mconf: .config.in +./scripts/config/mconf: .config.in $(MAKE) -C scripts/config all -scripts/config/conf: .config.in +./scripts/config/conf: .config.in $(MAKE) -C scripts/config conf -config: scripts/config/conf FORCE +config: ./scripts/config/conf FORCE $< Config.in -defdconfig: scripts/config/conf FORCE - $< -d Config.in +defconfig: ./scripts/config/conf FORCE + touch .config + $< -D .config Config.in -oldconfig: scripts/config/conf FORCE +oldconfig: ./scripts/config/conf FORCE $< -o Config.in -menuconfig: scripts/config/mconf FORCE +menuconfig: ./scripts/config/mconf FORCE $< Config.in config-clean: FORCE @@ -85,7 +86,9 @@ target/%: .pkginfo FORCE toolchain/%: FORCE $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) -world: FORCE +world: ./scripts/config/conf FORCE + touch .config + $< -D .config Config.in >/dev/null 2>/dev/null $(MAKE) toolchain/install $(MAKE) target/compile $(MAKE) package/compile From a9911c5adc193e31de461dfbed59e269ec850869 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 2 Jun 2006 16:30:25 +0000 Subject: [PATCH 137/757] don't delete .svn on distclean SVN-Revision: 3898 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 1d45582affe..dae32830c28 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -102,7 +102,7 @@ dirclean: clean FORCE rm -rf staging_dir_* toolchain_build_* distclean: dirclean FORCE - rm -rf .* dl + rm -rf dl .*config* .pkg* .PHONY: FORCE FORCE: From f5f11fff44b9d691fe26cd78591cc2e52bb046c9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 4 Jun 2006 01:31:03 +0000 Subject: [PATCH 138/757] don't compile libipkg in busybox if ipkg is disabled SVN-Revision: 3901 --- openwrt/package/busybox/patches/911-ipkg.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openwrt/package/busybox/patches/911-ipkg.patch b/openwrt/package/busybox/patches/911-ipkg.patch index 7b6437c98ca..1d7a4e35746 100644 --- a/openwrt/package/busybox/patches/911-ipkg.patch +++ b/openwrt/package/busybox/patches/911-ipkg.patch @@ -203,16 +203,16 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/Makefile.in busybox-1.1.2+ipkg-0.9 + str_util.c \ + xsystem.c \ + -+LIBIPKG-y += $(LIBIPKG_CORE_SOURCES) -+LIBIPKG-y += $(LIBIPKG_CMD_SOURCES) -+LIBIPKG-y += $(LIBIPKG_DB_SOURCES) -+LIBIPKG-y += $(LIBIPKG_LIST_SOURCES) -+LIBIPKG-y += $(LIBIPKG_UTIL_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CORE_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CMD_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_DB_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_LIST_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_SOURCES) +LIBIPKG_OBJS=$(patsubst %.c,$(LIBIPKG_DIR)%.o, $(LIBIPKG-y)) + +CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(TARGET_ARCH)\"" + -+libraries-y += $(LIBIPKG_DIR)$(LIBIPKG_AR) ++libraries-$(CONFIG_IPKG) += $(LIBIPKG_DIR)$(LIBIPKG_AR) + +$(LIBIPKG_DIR)$(LIBIPKG_AR): $(LIBIPKG_OBJS) + $(do_ar) From 1354f27bbb1e901a66432c0a608eb90f599b29bc Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 4 Jun 2006 14:40:47 +0000 Subject: [PATCH 139/757] whitespace fixes SVN-Revision: 3903 --- openwrt/package/rules.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index c05333b021d..d44cd986a49 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -7,16 +7,16 @@ endif define Build/DefaultTargets ifeq ($(DUMP),) ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(TOPDIR)/package/rules.mk),$(PKG_BUILD_DIR)) - ifeq ($(CONFIG_AUTOREBUILD),y) + ifeq ($(CONFIG_AUTOREBUILD),y) $(PKG_BUILD_DIR)/.prepared: package-clean endif endif ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - ifeq ($(CONFIG_AUTOREBUILD),y) + ifeq ($(CONFIG_AUTOREBUILD),y) $(PKG_BUILD_DIR)/.built: package-rebuild endif - endif + endif endif $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) From 2b7eb78d8088f6fae439bb3f060b5183fba043da Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 4 Jun 2006 21:57:38 +0000 Subject: [PATCH 140/757] fix unnecessary kernel rebuild SVN-Revision: 3904 --- openwrt/target/linux/au1000-2.6/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openwrt/target/linux/au1000-2.6/Makefile b/openwrt/target/linux/au1000-2.6/Makefile index 8ba22aa683f..34d4ddaf93a 100644 --- a/openwrt/target/linux/au1000-2.6/Makefile +++ b/openwrt/target/linux/au1000-2.6/Makefile @@ -17,10 +17,9 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked @$(CP) config $(LINUX_DIR)/.config touch $@ -$(LINUX_BUILD_DIR)/zImage.flash.srec: $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.srec - $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) zImage.flash +$(LINUX_BUILD_DIR)/zImage.flash.srec: $(LINUX_DIR)/vmlinux $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec $(LINUX_DIR)/zImage.flash.srec $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.srec $(LINUX_DIR)/zImage.srec touch $@ -compile: $(LINUX_DIR)/vmlinux +compile: $(LINUX_BUILD_DIR)/zImage.flash.srec From 648e7db52d515812a748d16086152e53ec89ad35 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 4 Jun 2006 21:57:59 +0000 Subject: [PATCH 141/757] target/linux/image rewrite SVN-Revision: 3905 --- openwrt/target/linux/Config.in | 8 +- openwrt/target/linux/Makefile | 87 +++------- openwrt/target/linux/image/Makefile | 42 ----- openwrt/target/linux/image/ar7/Makefile | 122 +++++--------- openwrt/target/linux/image/aruba/Makefile | 66 ++------ openwrt/target/linux/image/au1000/Makefile | 72 ++------ openwrt/target/linux/image/brcm/Makefile | 156 +++++------------- .../linux/image/brcm/lzma-loader/Makefile | 20 +-- .../linux/image/brcm/lzma-loader/src/Makefile | 5 +- openwrt/target/linux/image/generic/Makefile | 5 + openwrt/target/linux/image/image.mk | 53 ++++++ openwrt/target/linux/image/jffs2.mk | 42 ++--- openwrt/target/linux/image/jffs2/Makefile | 2 +- openwrt/target/linux/image/squashfs.mk | 38 ++--- openwrt/target/linux/image/tgz.mk | 17 +- openwrt/target/linux/image/x86/Makefile | 35 +--- openwrt/target/linux/image/xscale/Makefile | 34 +--- 17 files changed, 254 insertions(+), 550 deletions(-) delete mode 100644 openwrt/target/linux/image/Makefile create mode 100644 openwrt/target/linux/image/generic/Makefile create mode 100644 openwrt/target/linux/image/image.mk diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 540e2b73641..9bcb61cd24a 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -1,4 +1,10 @@ menu "Target Root Filesystem" + config TARGET_ROOTFS_INITRAMFS + bool "ramdisk" + default n + depends LINUX_2_6 + help + Embed the rootfs into the kernel (initramfs) config TARGET_ROOTFS_JFFS2 bool "jffs2" @@ -16,7 +22,7 @@ menu "Target Root Filesystem" config TARGET_ROOTFS_TGZ bool "tgz" - default y + default y if !LINUX_2_4_BRCM && !LINUX_2_6_BRCM && !LINUX_2_6_ARUBA && !LINUX_2_4_AR531X help Build a compressed tar archive of the the root filesystem diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index 46b162c7e6f..af3e3bd26f0 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -3,77 +3,13 @@ include $(TOPDIR)/rules.mk PKG_OS:=$(shell uname -s) PKG_CPU:=$(shell uname -m) -IB_NAME:=OpenWrt-ImageBuilder-$(PKG_OS)-$(PKG_CPU) -IB_DIR:=$(BUILD_DIR)/$(IB_NAME) - define kernel_template - -$(1)/$(2)-clean: - $(MAKE) -C $(2)-$(1) BOARD="$(2)" clean - -$(1)/$(2)-prepare: - $(MAKE) -C $(2)-$(1) BOARD="$(2)" prepare - -$(1)/$(2)-compile: - $(MAKE) -C $(2)-$(1) BOARD="$(2)" compile - -$(1)/$(2)-rebuild: - $(MAKE) -C $(2)-$(1) BOARD="$(2)" rebuild - -$(1)/$(2)-install: - $(MAKE) -C $(2)-$(1) BOARD="$(2)" install - -$(1)/$(2)-image: $(1)/$(2)-install - $(MAKE) -C image KERNEL="$(1)" BOARD="$(2)" install - -$(1)/$(2)-install-ib: - $(MAKE) -C image KERNEL="$(1)" BOARD="$(2)" IB_DIR="$(IB_DIR)" install-ib - echo '$$$$(eval $$$$(call image_template,$(2),$(1)))' >> $(IB_DIR)/kernel.mk - - ifeq ($(CONFIG_LINUX_$(3)),y) -clean: $(1)/$(2)-clean -prepare: $(1)/$(2)-prepare -compile: $(1)/$(2)-compile -rebuild: $(1)/$(2)-rebuild -$(BIN_DIR)/$(IB_NAME).tar.bz2 install: $(1)/$(2)-image -install-ib: $(1)/$(2)-install-ib +KERNEL:=$(1) +BOARD:=$(2) endif - -.PHONY: $(1)/$(2)-clean $(1)/$(2)-prepare $(1)/$(2)-compile $(1)/$(2)-rebuild $(1)/$(2)-install $(1)/$(2)-image $(1)/$(2)-install-ib endef -.PHONY: clean prepare compile rebuild install imagebuilder install-ib - -install-ib: - -$(BIN_DIR)/$(IB_NAME).tar.bz2: - rm -rf $(IB_DIR) - mkdir -p $(IB_DIR)/packages - mkdir -p $(IB_DIR)/scripts - $(CP) ./imagebuilder/* $(IB_DIR)/ - $(CP) $(TOPDIR)/bin/packages/*.ipk $(IB_DIR)/packages/ - $(CP) $(TOPDIR)/scripts/ipkg $(IB_DIR)/scripts/ - $(MAKE) install-ib - $(CP) $(TOPDIR)/rules.mk $(IB_DIR) - $(CP) ./image $(IB_DIR)/ - $(CP) $(TOPDIR)/.config $(IB_DIR)/ - find $(IB_DIR) -name .svn | xargs rm -rf - find $(IB_DIR) -name CVS | xargs rm -rf - (cd $(BUILD_DIR); tar c $(IB_NAME) | bzip2 -c > $(BIN_DIR)/$(IB_NAME).tar.bz2) - -ifeq ($(CONFIG_PACKAGE_IMAGEBUILDER),y) -install: $(BIN_DIR)/$(IB_NAME).tar.bz2 -endif - -prepare: - $(MAKE) -C image prepare -compile: - $(MAKE) -C image compile -install: -rebuild: -clean: - $(eval $(call kernel_template,2.4,brcm,2_4_BRCM)) $(eval $(call kernel_template,2.4,ar7,2_4_AR7)) $(eval $(call kernel_template,2.4,x86,2_4_X86)) @@ -84,3 +20,22 @@ $(eval $(call kernel_template,2.6,aruba,2_6_ARUBA)) $(eval $(call kernel_template,2.6,au1000,2_6_AU1000)) $(eval $(call kernel_template,2.6,xscale,2_6_XSCALE)) $(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE)) + +export BOARD +export KERNEL + +prepare: + $(MAKE) -C $(BOARD)-$(KERNEL) prepare + +compile: + $(MAKE) -C $(BOARD)-$(KERNEL) compile + +install: + $(MAKE) -C $(BOARD)-$(KERNEL) install + $(MAKE) -C image/$(BOARD) install + +clean: + $(MAKE) -C $(BOARD)-$(KERNEL) clean + +image/%: + $(MAKE) -C image $(patsubst image/%,%,$@) diff --git a/openwrt/target/linux/image/Makefile b/openwrt/target/linux/image/Makefile deleted file mode 100644 index a5141cb542b..00000000000 --- a/openwrt/target/linux/image/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include $(TOPDIR)/rules.mk - -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y) -include ./jffs2.mk -endif - -ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_LZMA),y) -include ./squashfs.mk -endif - -ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y) -include ./tgz.mk -endif - -prepare: FORCE - $(MAKE) prepare-targets -compile: FORCE - $(MAKE) compile-targets -install: FORCE - $(MAKE) install-targets - -$(BOARD)-compile: FORCE - $(MAKE) -C $(BOARD) prepare - $(MAKE) -C $(BOARD) compile - -install-ib: FORCE - -$(MAKE) -C $(BOARD) IB_DIR="$(IB_DIR)" install-ib - mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - $(CP) $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ - -install-prepare: FORCE - find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 - find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 - find $(BUILD_DIR)/root -type d | xargs chmod 0755 - mkdir -p $(BUILD_DIR)/root/tmp - chmod 0777 $(BUILD_DIR)/root/tmp - -rebuild: clean prepare compile install -clean: FORCE - $(MAKE) clean-targets diff --git a/openwrt/target/linux/image/ar7/Makefile b/openwrt/target/linux/image/ar7/Makefile index cb29ced02dd..4ac6d3015ff 100644 --- a/openwrt/target/linux/image/ar7/Makefile +++ b/openwrt/target/linux/image/ar7/Makefile @@ -1,12 +1,8 @@ -include $(TOPDIR)/rules.mk - -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) +include ../image.mk PKG_BUILD_DIR:=$(BUILD_DIR)/ar7loader -ifeq ($(IB),) LOADADDR := 0x94020000 -KERNEL_ENTRY := 0x${shell nm $(KDIR)/linux-$(KERNEL)*/vmlinux | grep kernel_entry | cut -d' ' -f1} OUTPUT_FORMAT := elf32-tradlittlemips CFLAGS := -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \ @@ -15,18 +11,6 @@ CFLAGS := -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \ -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap \ -DLOADADDR=$(LOADADDR) - -$(PKG_BUILD_DIR): - mkdir -p $(PKG_BUILD_DIR) - -$(PKG_BUILD_DIR)/zimage.script: src/zimage.script.in - sed -e 's/@@OUTPUT_FORMAT@@/$(OUTPUT_FORMAT)/' \ - -e 's/@@LOADADDR@@/$(LOADADDR)/' <$< >$@ - -$(PKG_BUILD_DIR)/ld.script: src/ld.script.in - sed -e 's/@@OUTPUT_FORMAT@@/$(OUTPUT_FORMAT)/' \ - -e 's/@@LOADADDR@@/$(LOADADDR)/' <$< >$@ - $(PKG_BUILD_DIR)/cksum.o: $(PKG_BUILD_DIR)/cksum.c $(HOSTCC) -o $@ $< @@ -45,24 +29,35 @@ $(PKG_BUILD_DIR)/loader.o: src/loader.c $(STAGING_DIR)/bin/srec2bin: src/srec2bin.c $(HOSTCC) -o $@ $< -$(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux - cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false) -$(KDIR)/vmlinux.bin: $(KDIR)/vmlinux.lzma compile - $(TARGET_CROSS)ld -T $(PKG_BUILD_DIR)/zimage.script -r -b binary $< -o $(KDIR)/zimage.o - $(TARGET_CROSS)ld -static -G 0 --defsym kernel_entry=$(KERNEL_ENTRY) -T $(PKG_BUILD_DIR)/ld.script \ +define Build/Compile + mkdir -p $(PKG_BUILD_DIR) + sed -e 's/@@OUTPUT_FORMAT@@/$(OUTPUT_FORMAT)/' \ + -e 's/@@LOADADDR@@/$(LOADADDR)/' \ + < src/zimage.script.in \ + > $(PKG_BUILD_DIR)/zimage.script + sed -e 's/@@OUTPUT_FORMAT@@/$(OUTPUT_FORMAT)/' \ + -e 's/@@LOADADDR@@/$(LOADADDR)/' \ + < src/ld.script.in \ + > $(PKG_BUILD_DIR)/ld.script + $(MAKE) $(PKG_BUILD_DIR)/loader.o $(PKG_BUILD_DIR)/LzmaDecode.o $(STAGING_DIR)/bin/srec2bin +endef + +define Build/Clean + rm -rf $(PKG_BUILD_DIR) +endef + +define Image/Prepare + cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma + $(TARGET_CROSS)ld -T $(PKG_BUILD_DIR)/zimage.script -r -b binary $(KDIR)/vmlinux.lzma -o $(KDIR)/zimage.o + $(TARGET_CROSS)ld -static -G 0 --defsym kernel_entry=0x$${shell nm $(KDIR)/linux-*/vmlinux | grep kernel_entry | cut -d' ' -f1} -T $(PKG_BUILD_DIR)/ld.script \ $(PKG_BUILD_DIR)/loader.o \ $(PKG_BUILD_DIR)/LzmaDecode.o \ $(KDIR)/zimage.o \ -o $(KDIR)/loader $(TARGET_CROSS)objcopy -O srec $(KDIR)/loader $(KDIR)/ram_zimage.sre - $(STAGING_DIR)/bin/srec2bin $(KDIR)/ram_zimage.sre $@ - -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-kernel.bin: $(KDIR)/vmlinux.bin -endif - -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-kernel.bin: - $(CP) $(KDIR)/vmlinux.bin $@ + $(STAGING_DIR)/bin/srec2bin $(KDIR)/ram_zimage.sre $(KDIR)/vmlinux.bin +endef ifeq ($(FS),jffs2-8MB) ALIGN:=bs=131072 conv=sync @@ -71,56 +66,29 @@ ifeq ($(FS),jffs2-4MB) ALIGN:=bs=65536 conv=sync endif -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-kernel.bin - dd if=$< $(ALIGN) > $@ - cat $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/root.$(FS) >> $@ - -define pattern_template -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS)-$(1).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).bin - (dd if=/dev/zero bs=16 count=1; cat $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).bin) | \ - $(STAGING_DIR)/bin/addpattern -p $(1) $(2) -o $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS)-$(1).bin - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS)-$(1).bin +define Image/Build/CyberTAN + (dd if=/dev/zero bs=16 count=1; cat $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).bin) | \ + $(STAGING_DIR)/bin/addpattern -p $(3) -o $(BIN_DIR)/openwrt-$(2)-$(KERNEL)-$(4).bin endef -define sercomm_template -$(BIN_DIR)/openwrt-$(1)-$(KERNEL)-$(FS).img: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).bin - cat sercomm/adam2.bin "$$^" > "$$@.tmp" - dd if=sercomm/$(1) of="$$@.tmp" bs=$$$$((0x3e0000 - 80)) seek=1 conv=notrunc - $(STAGING_DIR)/bin/dgfirmware -f -w "$$@" "$$@.tmp" - rm -f "$$@.tmp" - -install: $(BIN_DIR)/openwrt-$(1)-$(KERNEL)-$(FS).img +define Image/Build/sErCoMm + cat sercomm/adam2.bin "$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).bin" > "$(BIN_DIR)/openwrt-$(2)-$(KERNEL)-$(3).img" + dd if=sercomm/$(2) of="$(KDIR)/dgfw.tmp" bs=$$$$((0x3e0000 - 80)) seek=1 conv=notrunc + $(STAGING_DIR)/bin/dgfirmware -f -w "$(BIN_DIR)/openwrt-$(2)-$(KERNEL)-$(3).img" "$(KDIR)/dgfw.tmp" + rm -f "$(KDIR)/dgfw.tmp" endef -$(eval $(call sercomm_template,dg834)) -$(eval $(call sercomm_template,jdr454wb)) +define Image/Build + dd if=$(KDIR)/vmlinux.bin $(ALIGN) > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).bin + cat $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/root.$(1) >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).bin + $(call Image/Build/CyberTAN,$(1),AG1B,AG1B,$(1)) + $(call Image/Build/CyberTAN,$(1),WA21,WA21,$(1)) + $(call Image/Build/CyberTAN,$(1),WA22,WA22,$(1)) + $(call Image/Build/CyberTAN,$(1),WAG2,WAG2,$(1)) + $(call Image/Build/CyberTAN,$(1),WA31,WA31 -b,$(1)) + $(call Image/Build/CyberTAN,$(1),WA32,WA32 -b,$(1)) + $(call Image/Build/sErCoMm,$(1),dg834,$(1)) + $(call Image/Build/sErCoMm,$(1),jdr454wb,$(1)) +endef -$(eval $(call pattern_template,AG1B)) -$(eval $(call pattern_template,WA22)) -$(eval $(call pattern_template,WAG2)) -$(eval $(call pattern_template,WA21)) -$(eval $(call pattern_template,WA31,-b)) -$(eval $(call pattern_template,WA32,-b)) - -ifeq ($(IB),) -clean: - rm -rf $(PKG_BUILD_DIR) - rm -f $(BIN_DIR)/openwrt-$(BOARD)* - -prepare: $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)/zimage.script $(PKG_BUILD_DIR)/ld.script -compile: prepare $(PKG_BUILD_DIR)/loader.o $(PKG_BUILD_DIR)/LzmaDecode.o $(STAGING_DIR)/bin/srec2bin -else -clean: -prepare: -compile: -endif - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-kernel.bin $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).bin -install-ib: - mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - $(CP) $(KDIR)/vmlinux.bin $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ - mkdir -p $(IB_DIR)/staging_dir_$(ARCH) - $(CP) $(STAGING_DIR)/bin/addpattern $(IB_DIR)/staging_dir_$(ARCH)/bin/ - $(CP) $(STAGING_DIR)/bin/dgfirmware $(IB_DIR)/staging_dir_$(ARCH)/bin/ - +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index 7ca076acc32..9a4bc67deef 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/rules.mk +include ../image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80100000 @@ -10,57 +10,25 @@ LOADER_MAKEOPTS= \ KERNEL_ENTRY=$(KERNEL_ENTRY) \ RAMSIZE=$(RAMSIZE) -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -lzma-loader-clean: FORCE +define Build/Clean $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean +endef -lzma-loader-prepare: FORCE - $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare - -lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare +define Image/Prepare + cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile +endef -ifeq ($(IB),) -$(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux - cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false) - -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari: $(KDIR)/vmlinux.lzma -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari -endif - -ifeq ($(KERNEL),2.6) -FSNAME:=$(patsubst jffs2-%,jffs2,$(FS)) - -ifeq ($(FS),jffs2-4MB) -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari: $(KDIR)/loader.elf - ./addVersion -n ArubaOS $(KDIR)/loader.elf $@ version - +define Image/Build + ./addVersion -n ArubaOS $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari version ifneq ($(CONFIG_ARUBA_RAMDISK),y) -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari $(KDIR)/root.$(FS) - @dd if=$< of=$@.tmp bs=655360 conv=sync - @cat $(KDIR)/root.$(FS) >> $@.tmp - @dd if=$@.tmp of=$@ bs=3604480 conv=sync - @rm -f $@.tmp +ifeq ($(1),jffs2-64k) +endif + @dd if=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari of=$(KDIR)/image.tmp bs=655360 conv=sync + @cat $(KDIR)/root.$(FS) >> $(KDIR)/image.tmp + @dd if=$(KDIR)/image.tmp of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(patsubst jffs2-%,jffs2,$(1)).bin bs=3604480 conv=sync + @rm -f $(KDIR)/image.tmp +endif +endef -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin -endif - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari -endif -endif - -ifeq ($(IB),) -clean: lzma-loader-clean -prepare: lzma-loader-prepare -compile: lzma-loader-compile -else -clean: -prepare: -compile: -endif -install-ib: - mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin - mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - $(CP) $(KDIR)/loader.elf $(IB_DIR)/build_$(ARCH)/ - $(CP) $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/image/au1000/Makefile b/openwrt/target/linux/image/au1000/Makefile index 2c9b1c05df7..2607ed9eb3b 100644 --- a/openwrt/target/linux/image/au1000/Makefile +++ b/openwrt/target/linux/image/au1000/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/rules.mk +include ../image.mk LOADADDR = 0x8108c8f4 # RAM start + 16M KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile @@ -10,67 +10,19 @@ LOADER_MAKEOPTS= \ KERNEL_ENTRY=$(KERNEL_ENTRY) \ RAMSIZE=$(RAMSIZE) -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -lzma-loader-clean: FORCE +define Build/Clean $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean +endef -lzma-loader-prepare: FORCE - $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare - -lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare +define Image/Prepare + cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile +endef -ifeq ($(IB),) -$(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux - cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false) - -install: $(KDIR)/vmlinux.lzma -endif +define Image/Build + $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(1) $(KDIR)/root.srec + grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img + grep -v S0 $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img +endef -ifeq ($(FS),jffs2-8MB) - -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS) - $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec - grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img - grep -v S0 $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin -endif - -ifeq ($(FS),tgz) - -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz - $(CP) $^ $@ - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz - -endif - -ifeq ($(FS),squashfs) -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS) - $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec - grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img - grep -v S0 $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img - -endif - -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/zImage.flash - $(CP) $^ $@ - -ifeq ($(IB),) -clean: lzma-loader-clean -prepare: lzma-loader-prepare -compile: lzma-loader-compile -else -clean: -prepare: -compile: -endif -install-ib: - mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin - mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - $(CP) $(KDIR)/loader.elf $(IB_DIR)/build_$(ARCH)/ - $(CP) $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ - $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/loader.elf $(KDIR)/loader.srec - grep -v S0 $(KDIR)/loader.srec > $(KDIR)/kernel.srec +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/image/brcm/Makefile b/openwrt/target/linux/image/brcm/Makefile index 7e328470ae4..1d8e7ea2612 100644 --- a/openwrt/target/linux/image/brcm/Makefile +++ b/openwrt/target/linux/image/brcm/Makefile @@ -1,23 +1,4 @@ -include $(TOPDIR)/rules.mk - -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -lzma-loader-clean: FORCE - $(MAKE) -C lzma-loader clean - -lzma-loader-prepare: FORCE - $(MAKE) -C lzma-loader prepare - -lzma-loader-compile: lzma-loader-prepare - $(MAKE) -C lzma-loader compile - -ifeq ($(IB),) -$(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux - cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false) - -$(KDIR)/loader.tmp.gz: compile -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx: $(KDIR)/vmlinux.lzma -endif +include ../image.mk ifeq ($(FS),jffs2-8MB) TRXALIGN:=-a 0x20000 @@ -25,111 +6,56 @@ endif ifeq ($(FS),jffs2-4MB) TRXALIGN:=-a 0x10000 endif -# see ticket #155 ifeq ($(FS),squashfs) +# see ticket #155 TRXALIGN:=-a 1024 endif +define Build/Compile + rm -f $(KDIR)/loader.gz + $(MAKE) -C lzma-loader \ + BUILD_DIR="$(KDIR)" \ + TARGET="$(KDIR)" \ + install + echo -ne "\\x00" >> $(KDIR)/loader.gz +endef -$(KDIR)/loader.tmp.gz: - $(CP) $(BUILD_DIR)/loader.gz $@ - echo -ne "\\x00" >> $@ +define Build/Clean + $(MAKE) -C lzma-loader clean +endef -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx: $(KDIR)/loader.tmp.gz - $(STAGING_DIR)/bin/trx -o $@ $(KDIR)/loader.tmp.gz $(KDIR)/vmlinux.lzma $(TRXALIGN) $(KDIR)/root.$(FS) +define Image/Prepare + cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma +endef -ifeq ($(KERNEL),2.6) -FSNAME:=$(patsubst jffs2-%,jffs2,$(FS)) +define Image/Build/wgt634u + dd if=$(KDIR)/loader.elf of=$(BIN_DIR)/openwrt-wgt634u-$(KERNEL)-$(2).bin bs=131072 conv=sync + cat $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx >> $(BIN_DIR)/openwrt-wgt634u-$(KERNEL)-$(2).bin +endef -ifneq ($(FS),jffs2-4MB) -$(BIN_DIR)/openwrt-wgt634u-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - dd if=$(BUILD_DIR)/loader.elf of=$@ bs=131072 conv=sync - cat $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx >> $@ +define Image/Build/CyberTAN + $(STAGING_DIR)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx -o $(BIN_DIR)/openwrt-$(2)-$(KERNEL)-$(5).bin +endef -$(BIN_DIR)/openwrt-wrt54gs-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54S -v v4.70.6 -i $< -o $@ -g - -install: $(BIN_DIR)/openwrt-wgt634u-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54gs-$(KERNEL)-$(FSNAME).bin - -endif - -ifneq ($(FS),jffs2-8MB) -$(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54F -v v1.99.5 -i $< -o $@ -g - -$(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54G -v v4.20.6 -i $< -o $@ -g - -$(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54s -v v1.05.2 -i $< -o $@ -g - -install: $(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin +define Image/Build/Motorola + $(STAGING_DIR)/bin/motorola-bin -$(3) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(4).bin +endef +define Image/Build + $(STAGING_DIR)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx $(KDIR)/loader.gz $(KDIR)/vmlinux.lzma $(TRXALIGN) $(KDIR)/root.$(1) +ifneq ($(1),jffs2-128k) + $(call Image/Build/CyberTAN,$(1),wrt54g3g,W54F,1.99.5,$(patsubst jffs2-%,jffs2,$(1))) + $(call Image/Build/CyberTAN,$(1),wrt54g,W54G,4.40.1,$(patsubst jffs2-%,jffs2,$(1))) + $(call Image/Build/CyberTAN,$(1),wrt54gs_v4,W54s,1.09.1,$(patsubst jffs2-%,jffs2,$(1))) + $(call Image/Build/Motorola,$(1),wa840g,2,$(patsubst jffs2-%,jffs2,$(1))) + $(call Image/Build/Motorola,$(1),we800g,3,$(patsubst jffs2-%,jffs2,$(1))) endif +ifneq ($(1),jffs2-64k) + $(call Image/Build/CyberTAN,$(1),wrt54gs,W54S,4.80.1,$(patsubst jffs2-%,jffs2,$(1))) + $(call Image/Build/CyberTAN,$(1),wrtsl54gs,W54U,2.00.5,$(patsubst jffs2-%,jffs2,$(1))) + $(call Image/Build/wgt634u,$(1),$(patsubst jffs2-%,jffs2,$(1))) endif + $(call Image/Build/Motorola,$(1),wr850g,1,$(1)) +endef -ifeq ($(KERNEL),2.4) -FSNAME:=$(patsubst jffs2-%,jffs2,$(FS)) - -# ifeq ($(FS),squashfs) -# $(BIN_DIR)/openwrt-wap54g-$(KERNEL)-$(FSNAME).trx: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx -# $(CP) $< $@ -# echo -ne '\x01' >> $@ -# -# install: $(BIN_DIR)/openwrt-wap54g-$(KERNEL)-$(FSNAME).trx -# endif - -ifneq ($(FS),jffs2-8MB) -$(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54F -v v1.99.5 -i $< -o $@ -g - -$(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54G -v v4.20.6 -i $< -o $@ -g - -$(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54s -v v1.05.2 -i $< -o $@ -g - -$(BIN_DIR)/openwrt-wr850g-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/motorola-bin -1 $< $@ - -$(BIN_DIR)/openwrt-wa840g-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/motorola-bin -2 $< $@ - -$(BIN_DIR)/openwrt-we800g-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/motorola-bin -3 $< $@ - -install: $(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wr850g-$(FSNAME).bin $(BIN_DIR)/openwrt-wa840g-$(FSNAME).bin $(BIN_DIR)/openwrt-we800g-$(FSNAME).bin -endif - -ifneq ($(FS),jffs2-4MB) -$(BIN_DIR)/openwrt-wgt634u-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - dd if=$(BUILD_DIR)/loader.elf of=$@ bs=131072 conv=sync - cat $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx >> $@ - -$(BIN_DIR)/openwrt-wrt54gs-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54S -v v4.70.6 -i $< -o $@ -g - -$(BIN_DIR)/openwrt-wrtsl54gs-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54U -v v2.00.0 -i $< -o $@ -g - -install: $(BIN_DIR)/openwrt-wrt54gs-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wgt634u-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrtsl54gs-$(FSNAME).bin -endif -endif - -ifeq ($(IB),) -clean: lzma-loader-clean -prepare: lzma-loader-prepare -compile: lzma-loader-compile -else -clean: -prepare: -compile: -endif -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx -install-ib: - mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin - $(CP) $(STAGING_DIR)/bin/addpattern $(STAGING_DIR)/bin/trx $(STAGING_DIR)/bin/motorola-bin $(IB_DIR)/staging_dir_$(ARCH)/bin - mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - $(CP) $(BUILD_DIR)/loader.gz $(IB_DIR)/build_$(ARCH)/ - $(CP) $(BUILD_DIR)/loader.elf $(IB_DIR)/build_$(ARCH)/ - $(CP) $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/image/brcm/lzma-loader/Makefile b/openwrt/target/linux/image/brcm/lzma-loader/Makefile index 1d7b6a31969..3fa00fa4d94 100644 --- a/openwrt/target/linux/image/brcm/lzma-loader/Makefile +++ b/openwrt/target/linux/image/brcm/lzma-loader/Makefile @@ -2,10 +2,8 @@ include $(TOPDIR)/rules.mk -PKG_NAME := loader -PKG_VERSION := 0.04 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_NAME := lzma-loader +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/.prepared: mkdir $(PKG_BUILD_DIR) @@ -16,17 +14,15 @@ $(PKG_BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/.prepared $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC) \ LD=$(TARGET_CROSS)ld CROSS_COMPILE=$(TARGET_CROSS) -$(BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/loader.gz - $(CP) $< $@ - -$(BUILD_DIR)/loader.elf: $(PKG_BUILD_DIR)/loader.o - $(CP) $< $@ - source: prepare: $(PKG_BUILD_DIR)/.prepared -compile: $(BUILD_DIR)/loader.gz $(BUILD_DIR)/loader.elf +compile: $(PKG_BUILD_DIR)/loader.gz install: +ifneq ($(TARGET),) +install: compile + $(CP) $(PKG_BUILD_DIR)/loader.gz $(PKG_BUILD_DIR)/loader.elf $(TARGET)/ +endif + clean: rm -rf $(PKG_BUILD_DIR) - rm -f $(BUILD_DIR)/loader.gz diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/Makefile b/openwrt/target/linux/image/brcm/lzma-loader/src/Makefile index 92916d8cb38..85a864674ba 100644 --- a/openwrt/target/linux/image/brcm/lzma-loader/src/Makefile +++ b/openwrt/target/linux/image/brcm/lzma-loader/src/Makefile @@ -34,7 +34,7 @@ SEDFLAGS := s/BZ_TEXT_START/$(BZ_TEXT_START)/;s/TEXT_START/$(TEXT_START)/ OBJECTS := head.o data.o -all: loader.gz +all: loader.gz loader.elf # Don't build dependencies, this may die if $(CC) isn't gcc dep: @@ -44,6 +44,9 @@ install: loader.gz: loader gzip -nc9 $< > $@ +loader.elf: loader.o + cp $< $@ + loader: loader.o $(OBJCOPY) $< $@ diff --git a/openwrt/target/linux/image/generic/Makefile b/openwrt/target/linux/image/generic/Makefile new file mode 100644 index 00000000000..f87fb116dd1 --- /dev/null +++ b/openwrt/target/linux/image/generic/Makefile @@ -0,0 +1,5 @@ +include ../image.mk + +# use default targets for everything + +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/image/image.mk b/openwrt/target/linux/image/image.mk new file mode 100644 index 00000000000..61ad9ff2647 --- /dev/null +++ b/openwrt/target/linux/image/image.mk @@ -0,0 +1,53 @@ +include $(TOPDIR)/rules.mk + +KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) + +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) +ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y) +include $(TOPDIR)/target/linux/image/jffs2.mk +endif + +ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_LZMA),y) +include $(TOPDIR)/target/linux/image/squashfs.mk +endif + +ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y) +include $(TOPDIR)/target/linux/image/tgz.mk +endif +endif + +define Image/mkfs/prepare/default + find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 + find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 + find $(BUILD_DIR)/root -type d | xargs chmod 0755 + mkdir -p $(BUILD_DIR)/root/tmp + chmod 0777 $(BUILD_DIR)/root/tmp +endef + +define Image/mkfs/prepare + $(call Image/mkfs/prepare/default) +endef + +define BuildImage +compile: + $(call Build/Compile) + +install: + $(call Image/Prepare) + $(call Image/mkfs/prepare) + $(call Image/mkfs/jffs2) + $(call Image/mkfs/squashfs) + $(call Image/mkfs/tgz) + +clean: + $(call Build/Clean) +endef + +compile-targets: +install-targets: +clean-targets: + +prepare: +compile: compile-targets +install: compile install-targets +clean: clean-targets diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk index c1d07a22b2e..dd5edd01c0f 100644 --- a/openwrt/target/linux/image/jffs2.mk +++ b/openwrt/target/linux/image/jffs2.mk @@ -4,41 +4,23 @@ else JFFS2OPTS := --pad --big-endian --squash endif -#JFFS2OPTS += -Xlzo -msize -Xlzari +define Image/mkfs/jffs2 + rm -rf $(BUILD_DIR)/root/jffs + + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root -jffs2-prepare: FORCE - $(MAKE) -C jffs2 prepare + $(call Image/Build,jffs2-64k) + $(call Image/Build,jffs2-128k) +endef -jffs2-compile: prepare-targets - $(MAKE) -C jffs2 compile +$(STAGING_DIR)/bin/mkfs.jffs2: + $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 compile jffs2-clean: FORCE - $(MAKE) -C jffs2 clean + $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 clean rm -f $(KDIR)/root.jffs2* -$(KDIR)/root.jffs2-4MB: install-prepare - @rm -rf $(BUILD_DIR)/root/jffs - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $@ -d $(BUILD_DIR)/root - -$(KDIR)/root.jffs2-8MB: install-prepare - @rm -rf $(BUILD_DIR)/root/jffs - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $@ -d $(BUILD_DIR)/root - -ifeq ($(IB),) -jffs2-install: compile-targets $(BOARD)-compile -endif - -jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB FORCE - $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-4MB" - $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-8MB" - -jffs2-install-ib: compile-targets FORCE - mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin - $(CP) $(STAGING_DIR)/bin/mkfs.jffs2 $(IB_DIR)/staging_dir_$(ARCH)/bin - -prepare-targets: jffs2-prepare -compile-targets: jffs2-compile -install-targets: jffs2-install -install-ib: jffs2-install-ib +compile-targets: $(STAGING_DIR)/bin/mkfs.jffs2 clean-targets: jffs2-clean diff --git a/openwrt/target/linux/image/jffs2/Makefile b/openwrt/target/linux/image/jffs2/Makefile index 0273d52fd11..b673c438a6c 100644 --- a/openwrt/target/linux/image/jffs2/Makefile +++ b/openwrt/target/linux/image/jffs2/Makefile @@ -25,5 +25,5 @@ prepare: $(MTD_DIR)/.unpacked compile: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2 install: clean: FORCE - rm -rf $(MTD_DIR) + rm -rf $(MTD_DIR) $(STAGING_DIR)/bin/mkfs.jffs2 diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk index 184330cfe72..6890daec680 100644 --- a/openwrt/target/linux/image/squashfs.mk +++ b/openwrt/target/linux/image/squashfs.mk @@ -1,36 +1,22 @@ ifneq ($(CONFIG_BIG_ENDIAN),y) -endian := le +ENDIAN := le else -endian := be +ENDIAN := be endif -squashfs-prepare: FORCE - $(MAKE) -C squashfs prepare - -squashfs-compile: prepare-targets - $(MAKE) -C squashfs compile +$(STAGING_DIR)/bin/mksquashfs-lzma: + $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs compile squashfs-clean: FORCE - $(MAKE) -C squashfs clean + $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs clean rm -f $(KDIR)/root.squashfs -$(KDIR)/root.squashfs: install-prepare +define Image/mkfs/squashfs @mkdir -p $(BUILD_DIR)/root/jffs - $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $@ -nopad -noappend -root-owned -$(endian) - -ifeq ($(IB),) -squashfs-install: compile-targets $(BOARD)-compile -endif + $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned -$(ENDIAN) + $(call Image/Build,squashfs) +endef -squashfs-install: $(KDIR)/root.squashfs FORCE - $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="squashfs" - -squashfs-install-ib: compile-targets - mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin - $(CP) $(STAGING_DIR)/bin/mksquashfs-lzma $(IB_DIR)/staging_dir_$(ARCH)/bin - -prepare-targets: squashfs-prepare -compile-targets: squashfs-compile -install-targets: squashfs-install -install-ib: squashfs-install-ib -clean: squashfs-clean +FILESYSTEMS += squashfs +compile-targets: $(STAGING_DIR)/bin/mksquashfs-lzma +clean-targets: squashfs-clean diff --git a/openwrt/target/linux/image/tgz.mk b/openwrt/target/linux/image/tgz.mk index 506ab891aed..39adb692575 100644 --- a/openwrt/target/linux/image/tgz.mk +++ b/openwrt/target/linux/image/tgz.mk @@ -1,14 +1,3 @@ -$(KDIR)/root.tar.gz: FORCE - tar -zcf $@ --owner=root --group=root -C $(BUILD_DIR)/root/ . - -ifeq ($(BOARD),x86) -install: tgz-install - -tgz-install: $(KDIR)/root.tar.gz - $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="tgz" -endif - -prepare-targets: -compile-targets: -install-targets: $(KDIR)/root.tar.gz - +define Image/mkfs/tgz + tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ . +endef diff --git a/openwrt/target/linux/image/x86/Makefile b/openwrt/target/linux/image/x86/Makefile index 8035d722f8e..69f9bf470e5 100644 --- a/openwrt/target/linux/image/x86/Makefile +++ b/openwrt/target/linux/image/x86/Makefile @@ -1,31 +1,8 @@ -include $(TOPDIR)/rules.mk +include ../image.mk -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) +define Image/Build + cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img + cp $(KDIR)/vmlinux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz +endef - -ifeq ($(FS),jffs2-8MB) -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) - $(CP) $^ $@ - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img -endif - - -ifeq ($(FS),tgz) -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz - $(CP) $^ $@ - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz -endif - - -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/bzImage - $(CP) $^ $@ - -clean: -prepare: -compile: -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz -install-ib: FORCE - mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/image/xscale/Makefile b/openwrt/target/linux/image/xscale/Makefile index cc47c25aba1..09616d409f6 100644 --- a/openwrt/target/linux/image/xscale/Makefile +++ b/openwrt/target/linux/image/xscale/Makefile @@ -1,30 +1,10 @@ -include $(TOPDIR)/rules.mk +include ../image.mk -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -ifeq ($(FS),jffs2-8MB) -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) - $(CP) $^ $@ - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img +define Image/Build +ifneq ($(FS),jffs2-64k) + cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img + cp $(KDIR)/vmlinux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz endif +endef - -ifeq ($(FS),tgz) -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz - $(CP) $^ $@ - -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz -endif - - -$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/vmlinux - $(CP) $^ $@ - -clean: -prepare: -compile: -install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz -install-ib: FORCE - mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ +$(eval $(call BuildImage)) From d966955e51be9de9f33bc92bccd2d2f732206609 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 5 Jun 2006 03:01:17 +0000 Subject: [PATCH 142/757] fix typo SVN-Revision: 3906 --- openwrt/target/linux/image/aruba/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index 9a4bc67deef..835de1bef4a 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -25,7 +25,7 @@ ifneq ($(CONFIG_ARUBA_RAMDISK),y) ifeq ($(1),jffs2-64k) endif @dd if=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari of=$(KDIR)/image.tmp bs=655360 conv=sync - @cat $(KDIR)/root.$(FS) >> $(KDIR)/image.tmp + @cat $(KDIR)/root.$(1) >> $(KDIR)/image.tmp @dd if=$(KDIR)/image.tmp of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(patsubst jffs2-%,jffs2,$(1)).bin bs=3604480 conv=sync @rm -f $(KDIR)/image.tmp endif From 11b8b8af73ac2d02d09cd61ce14d9f3d43058d89 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Tue, 6 Jun 2006 08:40:51 +0000 Subject: [PATCH 143/757] add GCC 4.1.1 and sync 4.1.0 with Kamikaze SVN-Revision: 3907 --- .../gcc/4.1.0/800-arm-bigendian.patch | 67 + .../toolchain/gcc/4.1.1/100-uclibc-conf.patch | 544 +++ .../gcc/4.1.1/200-uclibc-locale.patch | 3261 +++++++++++++++++ .../gcc/4.1.1/300-libstdc++-pic.patch | 46 + .../gcc/4.1.1/301-missing-execinfo_h.patch | 11 + .../gcc/4.1.1/302-c99-snprintf.patch | 11 + .../gcc/4.1.1/303-c99-complex-ugly-hack.patch | 12 + .../toolchain/gcc/4.1.1/304-index_macro.patch | 24 + .../4.1.1/602-sdk-libstdc++-includes.patch | 20 + .../toolchain/gcc/4.1.1/740-sh-pr24836.patch | 25 + .../gcc/4.1.1/800-arm-bigendian.patch | 67 + openwrt/toolchain/gcc/Config.in | 6 +- 12 files changed, 4093 insertions(+), 1 deletion(-) create mode 100644 openwrt/toolchain/gcc/4.1.0/800-arm-bigendian.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/100-uclibc-conf.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/200-uclibc-locale.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/300-libstdc++-pic.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/302-c99-snprintf.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/304-index_macro.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/602-sdk-libstdc++-includes.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/740-sh-pr24836.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/800-arm-bigendian.patch diff --git a/openwrt/toolchain/gcc/4.1.0/800-arm-bigendian.patch b/openwrt/toolchain/gcc/4.1.0/800-arm-bigendian.patch new file mode 100644 index 00000000000..1fa5ae1cd27 --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.0/800-arm-bigendian.patch @@ -0,0 +1,67 @@ +By Lennert Buytenhek <buytenh@wantstofly.org> +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +--- gcc-4.1.0/gcc/config/arm/linux-elf.h ++++ gcc-4.1.0/gcc/config/arm/linux-elf.h +@@ -28,19 +28,33 @@ + #undef TARGET_VERSION + #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + #undef TARGET_DEFAULT_FLOAT_ABI + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (0) ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } + + /* Now we define the strings used to build the spec file. */ + #undef LIB_SPEC +@@ -61,7 +75,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + + #undef LINK_SPEC +--- gcc-4.1.0/gcc/config.gcc ++++ gcc-4.1.0/gcc/config.gcc +@@ -672,6 +672,11 @@ + ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" ++ case $target in ++ arm*b-*) ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ++ ;; ++ esac + tmake_file="${tmake_file} t-linux arm/t-arm" + case ${target} in + arm*-*-linux-gnueabi) diff --git a/openwrt/toolchain/gcc/4.1.1/100-uclibc-conf.patch b/openwrt/toolchain/gcc/4.1.1/100-uclibc-conf.patch new file mode 100644 index 00000000000..49d576c7ddd --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/100-uclibc-conf.patch @@ -0,0 +1,544 @@ +--- gcc-4.1.0/gcc/config/t-linux-uclibc ++++ gcc-4.1.0/gcc/config/t-linux-uclibc +@@ -0,0 +1,5 @@ ++# Remove glibc specific files added in t-linux ++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES)) ++ ++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc ++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH)) +--- gcc-4.1.0/gcc/config.gcc ++++ gcc-4.1.0/gcc/config.gcc +@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*) + ;; + sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \ + sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ +- sh-*-linux* | sh[346lbe]*-*-linux* | \ ++ sh*-*-linux* | sh[346lbe]*-*-linux* | \ + sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ + sh64-*-netbsd* | sh64l*-*-netbsd*) + tmake_file="${tmake_file} sh/t-sh sh/t-elf" +@@ -2341,6 +2341,12 @@ m32c-*-elf*) + ;; + esac + ++# Rather than hook into each target, just do it after all the linux ++# targets have been processed ++case ${target} in ++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc" ++esac ++ + case ${target} in + i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1) + tmake_file="${tmake_file} i386/t-gmm_malloc" +--- gcc-4.1.0/boehm-gc/configure ++++ gcc-4.1.0/boehm-gc/configure +@@ -4320,6 +4320,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +--- gcc-4.1.0/configure ++++ gcc-4.1.0/configure +@@ -1133,7 +1133,7 @@ no) + ;; + "") + case "${target}" in +- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) ++ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) + # Enable libmudflap by default in GNU and friends. + ;; + *-*-freebsd*) +--- gcc-4.1.0/configure.in ++++ gcc-4.1.0/configure.in +@@ -341,7 +341,7 @@ no) + ;; + "") + case "${target}" in +- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) ++ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) + # Enable libmudflap by default in GNU and friends. + ;; + *-*-freebsd*) +--- gcc-4.1.0/contrib/regression/objs-gcc.sh ++++ gcc-4.1.0/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +--- gcc-4.1.0/gcc/config/alpha/linux-elf.h ++++ gcc-4.1.0/gcc/config/alpha/linux-elf.h +@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */ + #define SUBTARGET_EXTRA_SPECS \ + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, + ++#if defined USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else + #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#endif + + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ +--- gcc-4.1.0/gcc/config/arm/linux-elf.h ++++ gcc-4.1.0/gcc/config/arm/linux-elf.h +@@ -51,7 +51,11 @@ + + #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" + ++#ifdef USE_UCLIBC ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" ++#else + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2" ++#endif + + #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \ + %{b} \ +--- gcc-4.1.0/gcc/config/cris/linux.h ++++ gcc-4.1.0/gcc/config/cris/linux.h +@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */ + #undef CRIS_DEFAULT_CPU_VERSION + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG + ++#ifdef USE_UCLIBC ++ ++#undef CRIS_SUBTARGET_VERSION ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" ++ ++#undef CRIS_LINK_SUBTARGET_SPEC ++#define CRIS_LINK_SUBTARGET_SPEC \ ++ "-mcrislinux\ ++ -rpath-link include/asm/../..%s\ ++ %{shared} %{static}\ ++ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ ++ %{!shared: \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ ++ %{!r:%{O2|O3: --gc-sections}}" ++ ++#else /* USE_UCLIBC */ ++ + #undef CRIS_SUBTARGET_VERSION + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" + +@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */ + %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ + %{!r:%{O2|O3: --gc-sections}}" + ++#endif /* USE_UCLIBC */ ++ + + /* Node: Run-time Target */ + +--- gcc-4.1.0/gcc/config/i386/linux.h ++++ gcc-4.1.0/gcc/config/i386/linux.h +@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */ + #define LINK_EMULATION "elf_i386" + #define DYNAMIC_LINKER "/lib/ld-linux.so.2" + ++#if defined USE_UCLIBC ++#undef DYNAMIC_LINKER ++#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#endif ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "link_emulation", LINK_EMULATION },\ +--- gcc-4.1.0/gcc/config/i386/linux64.h ++++ gcc-4.1.0/gcc/config/i386/linux64.h +@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */ + When the -shared link option is used a final link is not being + done. */ + ++#ifdef USE_UCLIBC ++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" ++#else ++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ +- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \ ++ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \ ++ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \ + %{static:-static}}" + + /* Similar to standard Linux, but adding -ffast-math support. */ +--- gcc-4.1.0/gcc/config/ia64/linux.h ++++ gcc-4.1.0/gcc/config/ia64/linux.h +@@ -37,13 +37,18 @@ do { \ + /* Define this for shared library support because it isn't in the main + linux.h file. */ + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "\ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}" + + +--- gcc-4.1.0/gcc/config/m68k/linux.h ++++ gcc-4.1.0/gcc/config/m68k/linux.h +@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */ + + /* If ELF is the default format, we should not use /lib/elf. */ + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "-m m68kelf %{shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \ ++ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static}}" + + /* For compatibility with linux/a.out */ +--- gcc-4.1.0/gcc/config/mips/linux.h ++++ gcc-4.1.0/gcc/config/mips/linux.h +@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */ + + /* Borrowed from sparc/linux.h */ + #undef LINK_SPEC ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" ++#endif + #define LINK_SPEC \ + "%(endian_spec) \ + %{shared:-shared} \ +@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */ + %{!ibcs: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}}" + + #undef SUBTARGET_ASM_SPEC +--- gcc-4.1.0/gcc/config/pa/pa-linux.h ++++ gcc-4.1.0/gcc/config/pa/pa-linux.h +@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */ + /* Define this for shared library support because it isn't in the main + linux.h file. */ + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "\ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}" + + /* glibc's profiling functions don't need gcc to allocate counters. */ +--- gcc-4.1.0/gcc/config/rs6000/linux.h ++++ gcc-4.1.0/gcc/config/rs6000/linux.h +@@ -72,7 +72,11 @@ + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" + + #undef LINK_OS_DEFAULT_SPEC ++#ifdef USE_UCLIBC ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" ++#else + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" ++#endif + + #define LINK_GCC_C_SEQUENCE_SPEC \ + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" +--- gcc-4.1.0/gcc/config/rs6000/sysv4.h ++++ gcc-4.1.0/gcc/config/rs6000/sysv4.h +@@ -866,6 +866,7 @@ extern int fixuplabelno; + mcall-linux : %(link_os_linux) ; \ + mcall-gnu : %(link_os_gnu) ; \ + mcall-netbsd : %(link_os_netbsd) ; \ ++ mcall-linux-uclibc : %(link_os_linux_uclibc); \ + mcall-openbsd: %(link_os_openbsd) ; \ + : %(link_os_default) }" + +@@ -1043,6 +1044,10 @@ extern int fixuplabelno; + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" + ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" ++ + #if defined(HAVE_LD_EH_FRAME_HDR) + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " + #endif +@@ -1209,6 +1214,7 @@ ncrtn.o%s" + { "link_os_sim", LINK_OS_SIM_SPEC }, \ + { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \ + { "link_os_linux", LINK_OS_LINUX_SPEC }, \ ++ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ + { "link_os_gnu", LINK_OS_GNU_SPEC }, \ + { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ +--- gcc-4.1.0/gcc/config/s390/linux.h ++++ gcc-4.1.0/gcc/config/s390/linux.h +@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street, + #define MULTILIB_DEFAULTS { "m31" } + #endif + ++#ifdef USE_UCLIBC ++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" ++#else ++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1" ++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1" ++#endif + #undef LINK_SPEC + #define LINK_SPEC \ + "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ +@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street, + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker: \ +- %{m31:-dynamic-linker /lib/ld.so.1} \ +- %{m64:-dynamic-linker /lib/ld64.so.1}}}}" ++ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \ ++ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}" + + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack +--- gcc-4.1.0/gcc/config/sh/linux.h ++++ gcc-4.1.0/gcc/config/sh/linux.h +@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA. */ + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" + #undef SUBTARGET_LINK_SPEC ++#ifdef USE_UCLIBC ++#define SUBTARGET_LINK_SPEC \ ++ "%{shared:-shared} \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ ++ %{static:-static}" ++#else + #define SUBTARGET_LINK_SPEC \ + "%{shared:-shared} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{static:-static}" ++#endif + + /* Output assembler code to STREAM to call the profiler. */ + +--- gcc-4.1.0/gcc/config/sparc/linux.h ++++ gcc-4.1.0/gcc/config/sparc/linux.h +@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */ + + /* If ELF is the default format, we should not use /lib/elf. */ + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ + %{!mno-relax:%{!r:-relax}} \ +@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */ + %{!ibcs: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}}" + + /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). +--- gcc-4.1.0/gcc/config/sparc/linux64.h ++++ gcc-4.1.0/gcc/config/sparc/linux64.h +@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */ + { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ + { "link_arch", LINK_ARCH_SPEC }, + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#endif + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ + %{!shared: \ + %{!ibcs: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}} \ + " + +--- gcc-4.1.0/libffi/configure ++++ gcc-4.1.0/libffi/configure +@@ -3457,6 +3457,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +--- gcc-4.1.0/libgfortran/configure ++++ gcc-4.1.0/libgfortran/configure +@@ -3699,6 +3699,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +--- gcc-4.1.0/libjava/configure ++++ gcc-4.1.0/libjava/configure +@@ -5137,6 +5137,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +--- gcc-4.1.0/libmudflap/configure ++++ gcc-4.1.0/libmudflap/configure +@@ -5382,6 +5382,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +--- gcc-4.1.0/libobjc/configure ++++ gcc-4.1.0/libobjc/configure +@@ -3312,6 +3312,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +--- gcc-4.1.0/libtool.m4 ++++ gcc-4.1.0/libtool.m4 +@@ -743,6 +743,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] +--- gcc-4.1.0/ltconfig ++++ gcc-4.1.0/ltconfig +@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in ++linux-uclibc*) ;; + linux-gnu*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac +@@ -1274,6 +1275,23 @@ linux-gnu*) + dynamic_linker='GNU/Linux ld.so' + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + need_lib_prefix=no + need_version=no +--- gcc-4.1.0/zlib/configure ++++ gcc-4.1.0/zlib/configure +@@ -3426,6 +3426,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' diff --git a/openwrt/toolchain/gcc/4.1.1/200-uclibc-locale.patch b/openwrt/toolchain/gcc/4.1.1/200-uclibc-locale.patch new file mode 100644 index 00000000000..9d65a6234e5 --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/200-uclibc-locale.patch @@ -0,0 +1,3261 @@ +diff -urN gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 gcc-4.1.0/libstdc++-v3/acinclude.m4 +--- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/acinclude.m4 2006-03-25 22:06:30.000000000 -0700 +@@ -1071,7 +1071,7 @@ + AC_MSG_CHECKING([for C locale to use]) + GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], + [use MODEL for target locale package], +- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) ++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) + + # If they didn't use this option switch, or if they specified --enable + # with no specific model, we'll have to look for one. If they +@@ -1087,6 +1087,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case ${target_os} in ++ *-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) + AC_EGREP_CPP([_GLIBCXX_ok], [ + #include <features.h> +@@ -1230,6 +1233,40 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ AC_MSG_RESULT(uclibc) ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ AC_SUBST(glibcxx_MOFILES) ++ AC_SUBST(glibcxx_POFILES) ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,63 @@ ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- ++ ++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// Written by Jakub Jelinek <jakub@redhat.com> ++ ++#include <bits/c++config.h> ++#include <clocale> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning clean this up ++#endif ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; ++extern "C" __typeof(strcoll_l) __strcoll_l; ++extern "C" __typeof(strftime_l) __strftime_l; ++extern "C" __typeof(strtod_l) __strtod_l; ++extern "C" __typeof(strtof_l) __strtof_l; ++extern "C" __typeof(strtold_l) __strtold_l; ++extern "C" __typeof(strxfrm_l) __strxfrm_l; ++extern "C" __typeof(newlocale) __newlocale; ++extern "C" __typeof(freelocale) __freelocale; ++extern "C" __typeof(duplocale) __duplocale; ++extern "C" __typeof(uselocale) __uselocale; ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++extern "C" __typeof(iswctype_l) __iswctype_l; ++extern "C" __typeof(towlower_l) __towlower_l; ++extern "C" __typeof(towupper_l) __towupper_l; ++extern "C" __typeof(wcscoll_l) __wcscoll_l; ++extern "C" __typeof(wcsftime_l) __wcsftime_l; ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; ++extern "C" __typeof(wctype_l) __wctype_l; ++#endif ++ ++#endif // GLIBC 2.3 and later +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,152 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 ++// Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <cerrno> // For errno ++#include <locale> ++#include <stdexcept> ++#include <langinfo.h> ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) ++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) ++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) ++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) ++#define __strtof_l(S, E, L) strtof((S), (E)) ++#define __strtod_l(S, E, L) strtod((S), (E)) ++#define __strtold_l(S, E, L) strtold((S), (E)) ++#warning should dummy __newlocale check for C|POSIX ? ++#define __newlocale(a, b, c) NULL ++#define __freelocale(a) ((void)0) ++#define __duplocale(a) __c_locale() ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ char* __sanity; ++ errno = 0; ++ float __f = __strtof_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __f; ++ else ++ __err |= ios_base::failbit; ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ char* __sanity; ++ errno = 0; ++ double __d = __strtod_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __d; ++ else ++ __err |= ios_base::failbit; ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ char* __sanity; ++ errno = 0; ++ long double __ld = __strtold_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __ld; ++ else ++ __err |= ios_base::failbit; ++ } ++ ++ void ++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, ++ __c_locale __old) ++ { ++ __cloc = __newlocale(1 << LC_ALL, __s, __old); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ if (!__cloc) ++ { ++ // This named locale is not supported by the underlying OS. ++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " ++ "name not valid")); ++ } ++#endif ++ } ++ ++ void ++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) ++ { ++ if (__cloc && _S_get_c_locale() != __cloc) ++ __freelocale(__cloc); ++ } ++ ++ __c_locale ++ locale::facet::_S_clone_c_locale(__c_locale& __cloc) ++ { return __duplocale(__cloc); } ++} // namespace std ++ ++namespace __gnu_cxx ++{ ++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = ++ { ++ "LC_CTYPE", ++ "LC_NUMERIC", ++ "LC_TIME", ++ "LC_COLLATE", ++ "LC_MONETARY", ++ "LC_MESSAGES", ++#if _GLIBCXX_NUM_CATEGORIES != 0 ++ "LC_PAPER", ++ "LC_NAME", ++ "LC_ADDRESS", ++ "LC_TELEPHONE", ++ "LC_MEASUREMENT", ++ "LC_IDENTIFICATION" ++#endif ++ }; ++} ++ ++namespace std ++{ ++ const char* const* const locale::_S_categories = __gnu_cxx::category_names; ++} // namespace std +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-26 13:03:42.000000000 -0700 +@@ -0,0 +1,117 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#ifndef _C_LOCALE_H ++#define _C_LOCALE_H 1 ++ ++#pragma GCC system_header ++ ++#include <cstring> // get std::strlen ++#include <cstdio> // get std::snprintf or std::sprintf ++#include <clocale> ++#include <langinfo.h> // For codecvt ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC_HAS_LOCALE__ ++#include <iconv.h> // For codecvt using iconv, iconv_t ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++#include <libintl.h> // For messages ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning what is _GLIBCXX_C_LOCALE_GNU for ++#endif ++#define _GLIBCXX_C_LOCALE_GNU 1 ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix categories ++#endif ++// #define _GLIBCXX_NUM_CATEGORIES 6 ++#define _GLIBCXX_NUM_CATEGORIES 0 ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++namespace __gnu_cxx ++{ ++ extern "C" __typeof(uselocale) __uselocale; ++} ++#endif ++ ++namespace std ++{ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ typedef __locale_t __c_locale; ++#else ++ typedef int* __c_locale; ++#endif ++ ++ // Convert numeric value of type _Tv to string and return length of ++ // string. If snprintf is available use it, otherwise fall back to ++ // the unsafe sprintf which, in general, can be dangerous and should ++ // be avoided. ++ template<typename _Tv> ++ int ++ __convert_from_v(char* __out, ++ const int __size __attribute__ ((__unused__)), ++ const char* __fmt, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ _Tv __v, const __c_locale& __cloc, int __prec) ++ { ++ __c_locale __old = __gnu_cxx::__uselocale(__cloc); ++#else ++ _Tv __v, const __c_locale&, int __prec) ++ { ++# ifdef __UCLIBC_HAS_LOCALE__ ++ char* __old = std::setlocale(LC_ALL, NULL); ++ char* __sav = new char[std::strlen(__old) + 1]; ++ std::strcpy(__sav, __old); ++ std::setlocale(LC_ALL, "C"); ++# endif ++#endif ++ ++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __gnu_cxx::__uselocale(__old); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ std::setlocale(LC_ALL, __sav); ++ delete [] __sav; ++#endif ++ return __ret; ++ } ++} ++ ++#endif +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,306 @@ ++// std::codecvt implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++namespace std ++{ ++ // Specializations. ++#ifdef _GLIBCXX_USE_WCHAR_T ++ codecvt_base::result ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_out(state_type& __state, const intern_type* __from, ++ const intern_type* __from_end, const intern_type*& __from_next, ++ extern_type* __to, extern_type* __to_end, ++ extern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // wcsnrtombs is *very* fast but stops if encounters NUL characters: ++ // in case we fall back to wcrtomb and then continue, in a loop. ++ // NB: wcsnrtombs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', ++ __from_end - __from_next); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ const size_t __conv = wcsnrtombs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // wcrtomb. ++ for (; __from < __from_next; ++__from) ++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ extern_type __buf[MB_LEN_MAX]; ++ __tmp_state = __state; ++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); ++ if (__conv > static_cast<size_t>(__to_end - __to_next)) ++ __ret = partial; ++ else ++ { ++ memcpy(__to_next, __buf, __conv); ++ __state = __tmp_state; ++ __to_next += __conv; ++ ++__from_next; ++ } ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ codecvt_base::result ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_in(state_type& __state, const extern_type* __from, ++ const extern_type* __from_end, const extern_type*& __from_next, ++ intern_type* __to, intern_type* __to_end, ++ intern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we store a L'\0' and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0', ++ __from_end ++ - __from_next)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ size_t __conv = mbsnrtowcs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (;; ++__to_next, __from += __conv) ++ { ++ __conv = mbrtowc(__to_next, __from, __from_end - __from, ++ &__tmp_state); ++ if (__conv == static_cast<size_t>(-1) ++ || __conv == static_cast<size_t>(-2)) ++ break; ++ } ++ __from_next = __from; ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ // It is unclear what to return in this case (see DR 382). ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ if (__to_next < __to_end) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from_next; ++ *__to_next++ = L'\0'; ++ } ++ else ++ __ret = partial; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_encoding() const throw() ++ { ++ // XXX This implementation assumes that the encoding is ++ // stateless and is either single-byte or variable-width. ++ int __ret = 0; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ if (MB_CUR_MAX == 1) ++ __ret = 1; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_max_length() const throw() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ // XXX Probably wrong for stateful encodings. ++ int __ret = MB_CUR_MAX; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_length(state_type& __state, const extern_type* __from, ++ const extern_type* __end, size_t __max) const ++ { ++ int __ret = 0; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we advance past it and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ ++ // A dummy internal buffer is needed in order for mbsnrtocws to consider ++ // its fourth parameter (it wouldn't with NULL as first parameter). ++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) ++ * __max)); ++ while (__from < __end && __max) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0', ++ __end ++ - __from)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __end; ++ ++ const extern_type* __tmp_from = __from; ++ size_t __conv = mbsnrtowcs(__to, &__from, ++ __from_chunk_end - __from, ++ __max, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (__from = __tmp_from;; __from += __conv) ++ { ++ __conv = mbrtowc(NULL, __from, __end - __from, ++ &__tmp_state); ++ if (__conv == static_cast<size_t>(-1) ++ || __conv == static_cast<size_t>(-2)) ++ break; ++ } ++ __state = __tmp_state; ++ __ret += __from - __tmp_from; ++ break; ++ } ++ if (!__from) ++ __from = __from_chunk_end; ++ ++ __ret += __from - __tmp_from; ++ __max -= __conv; ++ ++ if (__from < __end && __max) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from; ++ ++__ret; ++ --__max; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,80 @@ ++// std::collate implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) ++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) ++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) ++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) ++#endif ++ ++namespace std ++{ ++ // These are basically extensions to char_traits, and perhaps should ++ // be put there instead of here. ++ template<> ++ int ++ collate<char>::_M_compare(const char* __one, const char* __two) const ++ { ++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate<char>::_M_transform(char* __to, const char* __from, ++ size_t __n) const ++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ int ++ collate<wchar_t>::_M_compare(const wchar_t* __one, ++ const wchar_t* __two) const ++ { ++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from, ++ size_t __n) const ++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,314 @@ ++// std::ctype implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __wctype_l(S, L) wctype((S)) ++#define __towupper_l(C, L) towupper((C)) ++#define __towlower_l(C, L) towlower((C)) ++#define __iswctype_l(C, M, L) iswctype((C), (M)) ++#endif ++ ++namespace std ++{ ++ // NB: The other ctype<char> specializations are in src/locale.cc and ++ // various /config/os/* files. ++ template<> ++ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) ++ : ctype<char>(0, false, __refs) ++ { ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_ctype); ++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; ++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; ++ this->_M_table = this->_M_c_locale_ctype->__ctype_b; ++#endif ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ ctype<wchar_t>::__wmask_type ++ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const ++ { ++ __wmask_type __ret; ++ switch (__m) ++ { ++ case space: ++ __ret = __wctype_l("space", _M_c_locale_ctype); ++ break; ++ case print: ++ __ret = __wctype_l("print", _M_c_locale_ctype); ++ break; ++ case cntrl: ++ __ret = __wctype_l("cntrl", _M_c_locale_ctype); ++ break; ++ case upper: ++ __ret = __wctype_l("upper", _M_c_locale_ctype); ++ break; ++ case lower: ++ __ret = __wctype_l("lower", _M_c_locale_ctype); ++ break; ++ case alpha: ++ __ret = __wctype_l("alpha", _M_c_locale_ctype); ++ break; ++ case digit: ++ __ret = __wctype_l("digit", _M_c_locale_ctype); ++ break; ++ case punct: ++ __ret = __wctype_l("punct", _M_c_locale_ctype); ++ break; ++ case xdigit: ++ __ret = __wctype_l("xdigit", _M_c_locale_ctype); ++ break; ++ case alnum: ++ __ret = __wctype_l("alnum", _M_c_locale_ctype); ++ break; ++ case graph: ++ __ret = __wctype_l("graph", _M_c_locale_ctype); ++ break; ++ default: ++ __ret = __wmask_type(); ++ } ++ return __ret; ++ } ++ ++ wchar_t ++ ctype<wchar_t>::do_toupper(wchar_t __c) const ++ { return __towupper_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ wchar_t ++ ctype<wchar_t>::do_tolower(wchar_t __c) const ++ { return __towlower_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ bool ++ ctype<wchar_t>:: ++ do_is(mask __m, wchar_t __c) const ++ { ++ // The case of __m == ctype_base::space is particularly important, ++ // due to its use in many istream functions. Therefore we deal with ++ // it first, exploiting the knowledge that on GNU systems _M_bit[5] ++ // is the mask corresponding to ctype_base::space. NB: an encoding ++ // change would not affect correctness! ++ bool __ret = false; ++ if (__m == _M_bit[5]) ++ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); ++ else ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ const size_t __bitmasksize = 11; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__m & _M_bit[__bitcur]) ++ { ++ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ { ++ __ret = true; ++ break; ++ } ++ else if (__m == _M_bit[__bitcur]) ++ break; ++ } ++ } ++ return __ret; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const ++ { ++ for (; __lo < __hi; ++__vec, ++__lo) ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ const size_t __bitmasksize = 11; ++ mask __m = 0; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ __m |= _M_bit[__bitcur]; ++ *__vec = __m; ++ } ++ return __hi; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi && !this->do_is(__m, *__lo)) ++ ++__lo; ++ return __lo; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const ++ { ++ while (__lo < __hi && this->do_is(__m, *__lo) != 0) ++ ++__lo; ++ return __lo; ++ } ++ ++ wchar_t ++ ctype<wchar_t>:: ++ do_widen(char __c) const ++ { return _M_widen[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<wchar_t>:: ++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const ++ { ++ while (__lo < __hi) ++ { ++ *__dest = _M_widen[static_cast<unsigned char>(*__lo)]; ++ ++__lo; ++ ++__dest; ++ } ++ return __hi; ++ } ++ ++ char ++ ctype<wchar_t>:: ++ do_narrow(wchar_t __wc, char __dfault) const ++ { ++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) ++ return _M_narrow[__wc]; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ const int __c = wctob(__wc); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return (__c == EOF ? __dfault : static_cast<char>(__c)); ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, ++ char* __dest) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ if (_M_narrow_ok) ++ while (__lo < __hi) ++ { ++ if (*__lo >= 0 && *__lo < 128) ++ *__dest = _M_narrow[*__lo]; ++ else ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); ++ } ++ ++__lo; ++ ++__dest; ++ } ++ else ++ while (__lo < __hi) ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); ++ ++__lo; ++ ++__dest; ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __hi; ++ } ++ ++ void ++ ctype<wchar_t>::_M_initialize_ctype() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ wint_t __i; ++ for (__i = 0; __i < 128; ++__i) ++ { ++ const int __c = wctob(__i); ++ if (__c == EOF) ++ break; ++ else ++ _M_narrow[__i] = static_cast<char>(__c); ++ } ++ if (__i == 128) ++ _M_narrow_ok = true; ++ else ++ _M_narrow_ok = false; ++ for (size_t __j = 0; ++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) ++ _M_widen[__j] = btowc(__j); ++ ++ for (size_t __k = 0; __k <= 11; ++__k) ++ { ++ _M_bit[__k] = static_cast<mask>(_ISbit(__k)); ++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ } ++#endif // _GLIBCXX_USE_WCHAR_T ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,100 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix gettext stuff ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__dcgettext(const char *domainname, ++ const char *msgid, int category); ++#undef gettext ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) ++#else ++#undef gettext ++#define gettext(msgid) (msgid) ++#endif ++ ++namespace std ++{ ++ // Specializations. ++ template<> ++ string ++ messages<char>::do_get(catalog, int, int, const string& __dfault) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str())); ++ __uselocale(__old); ++ return string(__msg); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ const char* __msg = gettext(__dfault.c_str()); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return string(__msg); ++#else ++ const char* __msg = gettext(__dfault.c_str()); ++ return string(__msg); ++#endif ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ wstring ++ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const ++ { ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ __uselocale(__old); ++ return _M_convert_from_char(__msg); ++# elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return _M_convert_from_char(__msg); ++# else ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ return _M_convert_from_char(__msg); ++# endif ++ } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,121 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix prototypes for *textdomain funcs ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__textdomain(const char *domainname); ++extern "C" char *__bindtextdomain(const char *domainname, ++ const char *dirname); ++#else ++#undef __textdomain ++#undef __bindtextdomain ++#define __textdomain(D) ((void)0) ++#define __bindtextdomain(D,P) ((void)0) ++#endif ++ ++ // Non-virtual member functions. ++ template<typename _CharT> ++ messages<_CharT>::messages(size_t __refs) ++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), ++ _M_name_messages(_S_get_c_name()) ++ { } ++ ++ template<typename _CharT> ++ messages<_CharT>::messages(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL) ++ { ++ const size_t __len = std::strlen(__s) + 1; ++ char* __tmp = new char[__len]; ++ std::memcpy(__tmp, __s, __len); ++ _M_name_messages = __tmp; ++ ++ // Last to avoid leaking memory if new throws. ++ _M_c_locale_messages = _S_clone_c_locale(__cloc); ++ } ++ ++ template<typename _CharT> ++ typename messages<_CharT>::catalog ++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, ++ const char* __dir) const ++ { ++ __bindtextdomain(__s.c_str(), __dir); ++ return this->do_open(__s, __loc); ++ } ++ ++ // Virtual member functions. ++ template<typename _CharT> ++ messages<_CharT>::~messages() ++ { ++ if (_M_name_messages != _S_get_c_name()) ++ delete [] _M_name_messages; ++ _S_destroy_c_locale(_M_c_locale_messages); ++ } ++ ++ template<typename _CharT> ++ typename messages<_CharT>::catalog ++ messages<_CharT>::do_open(const basic_string<char>& __s, ++ const locale&) const ++ { ++ // No error checking is done, assume the catalog exists and can ++ // be used. ++ __textdomain(__s.c_str()); ++ return 0; ++ } ++ ++ template<typename _CharT> ++ void ++ messages<_CharT>::do_close(catalog) const ++ { } ++ ++ // messages_byname ++ template<typename _CharT> ++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) ++ : messages<_CharT>(__refs) ++ { ++ if (this->_M_name_messages != locale::facet::_S_get_c_name()) ++ delete [] this->_M_name_messages; ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ this->_M_name_messages = __tmp; ++ ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_messages); ++ this->_S_create_c_locale(this->_M_c_locale_messages, __s); ++ } ++ } +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,692 @@ ++// std::moneypunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning optimize this for uclibc ++#warning tailor for stub locale support ++#endif ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ // Construct and return valid pattern consisting of some combination of: ++ // space none symbol sign value ++ money_base::pattern ++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) ++ { ++ pattern __ret; ++ ++ // This insanely complicated routine attempts to construct a valid ++ // pattern for use with monyepunct. A couple of invariants: ++ ++ // if (__precedes) symbol -> value ++ // else value -> symbol ++ ++ // if (__space) space ++ // else none ++ ++ // none == never first ++ // space never first or last ++ ++ // Any elegant implementations of this are welcome. ++ switch (__posn) ++ { ++ case 0: ++ case 1: ++ // 1 The sign precedes the value and symbol. ++ __ret.field[0] = sign; ++ if (__space) ++ { ++ // Pattern starts with sign. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[3] = symbol; ++ } ++ __ret.field[2] = space; ++ } ++ else ++ { ++ // Pattern starts with sign and ends with none. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[3] = none; ++ } ++ break; ++ case 2: ++ // 2 The sign follows the value and symbol. ++ if (__space) ++ { ++ // Pattern either ends with sign. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[1] = space; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ // Pattern ends with sign then none. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[1] = symbol; ++ } ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ break; ++ case 3: ++ // 3 The sign immediately precedes the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = sign; ++ __ret.field[1] = symbol; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = sign; ++ __ret.field[3] = symbol; ++ } ++ else ++ { ++ __ret.field[1] = sign; ++ __ret.field[2] = symbol; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ case 4: ++ // 4 The sign immediately follows the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = sign; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = symbol; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ default: ++ __ret = pattern(); ++ } ++ return __ret; ++ } ++ ++ template<> ++ void ++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<char, true>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == true ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ void ++ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<char, false>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == false ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ moneypunct<char, true>::~moneypunct() ++ { delete _M_data; } ++ ++ template<> ++ moneypunct<char, false>::~moneypunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<wchar_t, true>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = ++ static_cast<wchar_t>(money_base::_S_atoms[__i]); ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ void ++ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<wchar_t, false>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = ++ static_cast<wchar_t>(money_base::_S_atoms[__i]); ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len; ++ __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ moneypunct<wchar_t, true>::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++ ++ template<> ++ moneypunct<wchar_t, false>::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,173 @@ ++// std::numpunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache<char>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, ++ __cloc)); ++ ++ // Check for NULL, which implies no grouping. ++ if (_M_data->_M_thousands_sep == '\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = "true"; ++ _M_data->_M_truename_size = 4; ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = "false"; ++ _M_data->_M_falsename_size = 5; ++ } ++ ++ template<> ++ numpunct<char>::~numpunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache<wchar_t>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ _M_data->_M_atoms_out[__i] = ++ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]); ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ _M_data->_M_atoms_in[__j] = ++ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]); ++ } ++ else ++ { ++ // Named locale. ++ // NB: In the GNU model wchar_t is always 32 bit wide. ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++#endif ++ ++ if (_M_data->_M_thousands_sep == L'\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = L"true"; ++ _M_data->_M_truename_size = 4; ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = L"false"; ++ _M_data->_M_falsename_size = 5; ++ } ++ ++ template<> ++ numpunct<wchar_t>::~numpunct() ++ { delete _M_data; } ++ #endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,406 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __timepunct<char>:: ++ _M_put(char* __s, size_t __maxlen, const char* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = strftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = '\0'; ++ } ++ ++ template<> ++ void ++ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache<char>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = "%m/%d/%y"; ++ _M_data->_M_date_era_format = "%m/%d/%y"; ++ _M_data->_M_time_format = "%H:%M:%S"; ++ _M_data->_M_time_era_format = "%H:%M:%S"; ++ _M_data->_M_date_time_format = ""; ++ _M_data->_M_date_time_era_format = ""; ++ _M_data->_M_am = "AM"; ++ _M_data->_M_pm = "PM"; ++ _M_data->_M_am_pm_format = ""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = "Sunday"; ++ _M_data->_M_day2 = "Monday"; ++ _M_data->_M_day3 = "Tuesday"; ++ _M_data->_M_day4 = "Wednesday"; ++ _M_data->_M_day5 = "Thursday"; ++ _M_data->_M_day6 = "Friday"; ++ _M_data->_M_day7 = "Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = "Sun"; ++ _M_data->_M_aday2 = "Mon"; ++ _M_data->_M_aday3 = "Tue"; ++ _M_data->_M_aday4 = "Wed"; ++ _M_data->_M_aday5 = "Thu"; ++ _M_data->_M_aday6 = "Fri"; ++ _M_data->_M_aday7 = "Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = "January"; ++ _M_data->_M_month02 = "February"; ++ _M_data->_M_month03 = "March"; ++ _M_data->_M_month04 = "April"; ++ _M_data->_M_month05 = "May"; ++ _M_data->_M_month06 = "June"; ++ _M_data->_M_month07 = "July"; ++ _M_data->_M_month08 = "August"; ++ _M_data->_M_month09 = "September"; ++ _M_data->_M_month10 = "October"; ++ _M_data->_M_month11 = "November"; ++ _M_data->_M_month12 = "December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = "Jan"; ++ _M_data->_M_amonth02 = "Feb"; ++ _M_data->_M_amonth03 = "Mar"; ++ _M_data->_M_amonth04 = "Apr"; ++ _M_data->_M_amonth05 = "May"; ++ _M_data->_M_amonth06 = "Jun"; ++ _M_data->_M_amonth07 = "Jul"; ++ _M_data->_M_amonth08 = "Aug"; ++ _M_data->_M_amonth09 = "Sep"; ++ _M_data->_M_amonth10 = "Oct"; ++ _M_data->_M_amonth11 = "Nov"; ++ _M_data->_M_amonth12 = "Dec"; ++ } ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); ++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); ++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); ++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); ++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); ++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, ++ __cloc); ++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); ++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); ++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); ++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); ++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); ++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); ++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); ++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); ++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); ++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); ++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); ++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); ++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); ++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); ++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); ++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); ++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); ++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); ++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); ++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); ++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); ++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); ++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); ++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); ++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); ++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); ++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); ++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); ++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); ++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); ++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); ++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); ++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); ++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); ++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); ++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); ++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ __timepunct<wchar_t>:: ++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); ++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = L'\0'; ++ } ++ ++ template<> ++ void ++ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache<wchar_t>; ++ ++#warning wide time stuff ++// if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = L"%m/%d/%y"; ++ _M_data->_M_date_era_format = L"%m/%d/%y"; ++ _M_data->_M_time_format = L"%H:%M:%S"; ++ _M_data->_M_time_era_format = L"%H:%M:%S"; ++ _M_data->_M_date_time_format = L""; ++ _M_data->_M_date_time_era_format = L""; ++ _M_data->_M_am = L"AM"; ++ _M_data->_M_pm = L"PM"; ++ _M_data->_M_am_pm_format = L""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = L"Sunday"; ++ _M_data->_M_day2 = L"Monday"; ++ _M_data->_M_day3 = L"Tuesday"; ++ _M_data->_M_day4 = L"Wednesday"; ++ _M_data->_M_day5 = L"Thursday"; ++ _M_data->_M_day6 = L"Friday"; ++ _M_data->_M_day7 = L"Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = L"Sun"; ++ _M_data->_M_aday2 = L"Mon"; ++ _M_data->_M_aday3 = L"Tue"; ++ _M_data->_M_aday4 = L"Wed"; ++ _M_data->_M_aday5 = L"Thu"; ++ _M_data->_M_aday6 = L"Fri"; ++ _M_data->_M_aday7 = L"Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = L"January"; ++ _M_data->_M_month02 = L"February"; ++ _M_data->_M_month03 = L"March"; ++ _M_data->_M_month04 = L"April"; ++ _M_data->_M_month05 = L"May"; ++ _M_data->_M_month06 = L"June"; ++ _M_data->_M_month07 = L"July"; ++ _M_data->_M_month08 = L"August"; ++ _M_data->_M_month09 = L"September"; ++ _M_data->_M_month10 = L"October"; ++ _M_data->_M_month11 = L"November"; ++ _M_data->_M_month12 = L"December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = L"Jan"; ++ _M_data->_M_amonth02 = L"Feb"; ++ _M_data->_M_amonth03 = L"Mar"; ++ _M_data->_M_amonth04 = L"Apr"; ++ _M_data->_M_amonth05 = L"May"; ++ _M_data->_M_amonth06 = L"Jun"; ++ _M_data->_M_amonth07 = L"Jul"; ++ _M_data->_M_amonth08 = L"Aug"; ++ _M_data->_M_amonth09 = L"Sep"; ++ _M_data->_M_amonth10 = L"Oct"; ++ _M_data->_M_amonth11 = L"Nov"; ++ _M_data->_M_amonth12 = L"Dec"; ++ } ++#if 0 ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ union { char *__s; wchar_t *__w; } __u; ++ ++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); ++ _M_data->_M_date_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); ++ _M_data->_M_date_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); ++ _M_data->_M_time_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); ++ _M_data->_M_time_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); ++ _M_data->_M_date_time_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); ++ _M_data->_M_date_time_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); ++ _M_data->_M_am = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); ++ _M_data->_M_pm = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); ++ _M_data->_M_am_pm_format = __u.__w; ++ ++ // Day names, starting with "C"'s Sunday. ++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); ++ _M_data->_M_day1 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); ++ _M_data->_M_day2 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); ++ _M_data->_M_day3 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); ++ _M_data->_M_day4 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); ++ _M_data->_M_day5 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); ++ _M_data->_M_day6 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); ++ _M_data->_M_day7 = __u.__w; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); ++ _M_data->_M_aday1 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); ++ _M_data->_M_aday2 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); ++ _M_data->_M_aday3 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); ++ _M_data->_M_aday4 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); ++ _M_data->_M_aday5 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); ++ _M_data->_M_aday6 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); ++ _M_data->_M_aday7 = __u.__w; ++ ++ // Month names, starting with "C"'s January. ++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); ++ _M_data->_M_month01 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); ++ _M_data->_M_month02 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); ++ _M_data->_M_month03 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); ++ _M_data->_M_month04 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); ++ _M_data->_M_month05 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); ++ _M_data->_M_month06 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); ++ _M_data->_M_month07 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); ++ _M_data->_M_month08 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); ++ _M_data->_M_month09 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); ++ _M_data->_M_month10 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); ++ _M_data->_M_month11 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); ++ _M_data->_M_month12 = __u.__w; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); ++ _M_data->_M_amonth01 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); ++ _M_data->_M_amonth02 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); ++ _M_data->_M_amonth03 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); ++ _M_data->_M_amonth04 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); ++ _M_data->_M_amonth05 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); ++ _M_data->_M_amonth06 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); ++ _M_data->_M_amonth07 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); ++ _M_data->_M_amonth08 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); ++ _M_data->_M_amonth09 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); ++ _M_data->_M_amonth10 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); ++ _M_data->_M_amonth11 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); ++ _M_data->_M_amonth12 = __u.__w; ++ } ++#endif // 0 ++ } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h 2005-10-21 02:34:06.000000000 -0600 +@@ -0,0 +1,76 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) ++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(NULL) ++ { ++ const size_t __len = std::strlen(__s) + 1; ++ char* __tmp = new char[__len]; ++ std::memcpy(__tmp, __s, __len); ++ _M_name_timepunct = __tmp; ++ ++ try ++ { _M_initialize_timepunct(__cloc); } ++ catch(...) ++ { ++ delete [] _M_name_timepunct; ++ __throw_exception_again; ++ } ++ } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::~__timepunct() ++ { ++ if (_M_name_timepunct != _S_get_c_name()) ++ delete [] _M_name_timepunct; ++ delete _M_data; ++ _S_destroy_c_locale(_M_c_locale_timepunct); ++ } +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h 2006-03-25 22:06:30.000000000 -0700 +@@ -0,0 +1,64 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004 ++// Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++/** @file ctype_base.h ++ * This is an internal header file, included by other library headers. ++ * You should not attempt to use it directly. ++ */ ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ /// @brief Base class for ctype. ++ struct ctype_base ++ { ++ // Note: In uClibc, the following two types depend on configuration. ++ ++ // Non-standard typedefs. ++ typedef const __ctype_touplow_t* __to_type; ++ ++ // NB: Offsets into ctype<char>::_M_table force a particular size ++ // on the mask type. Because of this, we don't use an enum. ++ typedef __ctype_mask_t mask; ++ static const mask upper = _ISupper; ++ static const mask lower = _ISlower; ++ static const mask alpha = _ISalpha; ++ static const mask digit = _ISdigit; ++ static const mask xdigit = _ISxdigit; ++ static const mask space = _ISspace; ++ static const mask print = _ISprint; ++ static const mask graph = _ISalpha | _ISdigit | _ISpunct; ++ static const mask cntrl = _IScntrl; ++ static const mask punct = _ISpunct; ++ static const mask alnum = _ISalpha | _ISdigit; ++ }; +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h 2006-03-25 22:06:30.000000000 -0700 +@@ -0,0 +1,69 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 2000, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) ++// functions go in ctype.cc ++ ++ bool ++ ctype<char>:: ++ is(mask __m, char __c) const ++ { return _M_table[static_cast<unsigned char>(__c)] & __m; } ++ ++ const char* ++ ctype<char>:: ++ is(const char* __low, const char* __high, mask* __vec) const ++ { ++ while (__low < __high) ++ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; ++ return __high; ++ } ++ ++ const char* ++ ctype<char>:: ++ scan_is(mask __m, const char* __low, const char* __high) const ++ { ++ while (__low < __high ++ && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) ++ ++__low; ++ return __low; ++ } ++ ++ const char* ++ ctype<char>:: ++ scan_not(mask __m, const char* __low, const char* __high) const ++ { ++ while (__low < __high ++ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) ++ ++__low; ++ return __low; ++ } +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2006-03-25 22:06:30.000000000 -0700 +@@ -0,0 +1,92 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 ++// Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ const ctype_base::mask* ++ ctype<char>::classic_table() throw() ++ { return __C_ctype_b; } ++ ++ ctype<char>::ctype(__c_locale, const mask* __table, bool __del, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ++ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) ++ { ++ _M_toupper = __C_ctype_toupper; ++ _M_tolower = __C_ctype_tolower; ++ _M_table = __table ? __table : __C_ctype_b; ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ } ++ ++ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) ++ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ++ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) ++ { ++ _M_toupper = __C_ctype_toupper; ++ _M_tolower = __C_ctype_tolower; ++ _M_table = __table ? __table : __C_ctype_b; ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ } ++ ++ char ++ ctype<char>::do_toupper(char __c) const ++ { return _M_toupper[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<char>::do_toupper(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = _M_toupper[static_cast<unsigned char>(*__low)]; ++ ++__low; ++ } ++ return __high; ++ } ++ ++ char ++ ctype<char>::do_tolower(char __c) const ++ { return _M_tolower[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<char>::do_tolower(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = _M_tolower[static_cast<unsigned char>(*__low)]; ++ ++__low; ++ } ++ return __high; ++ } +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h 2006-03-25 22:06:30.000000000 -0700 +@@ -0,0 +1,44 @@ ++// Specific definitions for GNU/Linux -*- C++ -*- ++ ++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++#ifndef _GLIBCXX_OS_DEFINES ++#define _GLIBCXX_OS_DEFINES 1 ++ ++// System-specific #define, typedefs, corrections, etc, go here. This ++// file will come before all others. ++ ++// This keeps isanum, et al from being propagated as macros. ++#define __NO_CTYPE 1 ++ ++#include <features.h> ++ ++// We must not see the optimized string functions GNU libc defines. ++#define __NO_STRING_INLINES ++ ++#endif +diff -urN gcc-4.1.0-dist/libstdc++-v3/configure gcc-4.1.0/libstdc++-v3/configure +--- gcc-4.1.0-dist/libstdc++-v3/configure 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/configure 2006-03-25 22:06:30.000000000 -0700 +@@ -4005,6 +4005,11 @@ + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +@@ -5740,7 +5745,7 @@ + enableval="$enable_clocale" + + case "$enableval" in +- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;; ++ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;; + *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} + { (exit 1); exit 1; }; } ;; +@@ -5765,6 +5770,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case ${target_os} in ++ linux-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -5995,6 +6003,76 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ echo "$as_me:$LINENO: result: uclibc" >&5 ++echo "${ECHO_T}uclibc" >&6 ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ # Extract the first word of "msgfmt", so it can be a program name with args. ++set dummy msgfmt; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$check_msgfmt"; then ++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_check_msgfmt="yes" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" ++fi ++fi ++check_msgfmt=$ac_cv_prog_check_msgfmt ++if test -n "$check_msgfmt"; then ++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5 ++echo "${ECHO_T}$check_msgfmt" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ ++ ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-4.1.0-dist/libstdc++-v3/configure.host gcc-4.1.0/libstdc++-v3/configure.host +--- gcc-4.1.0-dist/libstdc++-v3/configure.host 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/configure.host 2006-03-25 22:06:30.000000000 -0700 +@@ -261,6 +261,12 @@ + ;; + esac + ++# Override for uClibc since linux-uclibc gets mishandled above. ++case "${host_os}" in ++ *-uclibc*) ++ os_include_dir="os/uclibc" ++ ;; ++esac + + # Set any OS-dependent and CPU-dependent bits. + # THIS TABLE IS SORTED. KEEP IT THAT WAY. +diff -urN gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 gcc-4.1.0/libstdc++-v3/crossconfig.m4 +--- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/crossconfig.m4 2006-03-25 22:06:30.000000000 -0700 +@@ -143,6 +143,99 @@ + ;; + esac + ;; ++ *-uclibc*) ++# Temporary hack until we implement the float versions of the libm funcs ++ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ ++ machine/endian.h machine/param.h sys/machine.h sys/types.h \ ++ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) ++ SECTION_FLAGS='-ffunction-sections -fdata-sections' ++ AC_SUBST(SECTION_FLAGS) ++ GLIBCXX_CHECK_LINKER_FEATURES ++ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ++ GLIBCXX_CHECK_WCHAR_T_SUPPORT ++ ++ # For LFS. ++ AC_DEFINE(HAVE_INT64_T) ++ case "$target" in ++ *-uclinux*) ++ # Don't enable LFS with uClinux ++ ;; ++ *) ++ AC_DEFINE(_GLIBCXX_USE_LFS) ++ esac ++ ++ # For showmanyc_helper(). ++ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) ++ GLIBCXX_CHECK_POLL ++ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG ++ ++ # For xsputn_2(). ++ AC_CHECK_HEADERS(sys/uio.h) ++ GLIBCXX_CHECK_WRITEV ++ ++# AC_DEFINE(HAVE_ACOSF) ++# AC_DEFINE(HAVE_ASINF) ++# AC_DEFINE(HAVE_ATANF) ++# AC_DEFINE(HAVE_ATAN2F) ++ AC_DEFINE(HAVE_CEILF) ++ AC_DEFINE(HAVE_COPYSIGN) ++# AC_DEFINE(HAVE_COPYSIGNF) ++# AC_DEFINE(HAVE_COSF) ++# AC_DEFINE(HAVE_COSHF) ++# AC_DEFINE(HAVE_EXPF) ++# AC_DEFINE(HAVE_FABSF) ++ AC_DEFINE(HAVE_FINITE) ++ AC_DEFINE(HAVE_FINITEF) ++ AC_DEFINE(HAVE_FLOORF) ++# AC_DEFINE(HAVE_FMODF) ++# AC_DEFINE(HAVE_FREXPF) ++ AC_DEFINE(HAVE_HYPOT) ++# AC_DEFINE(HAVE_HYPOTF) ++ AC_DEFINE(HAVE_ISINF) ++ AC_DEFINE(HAVE_ISINFF) ++ AC_DEFINE(HAVE_ISNAN) ++ AC_DEFINE(HAVE_ISNANF) ++# AC_DEFINE(HAVE_LOGF) ++# AC_DEFINE(HAVE_LOG10F) ++# AC_DEFINE(HAVE_MODFF) ++# AC_DEFINE(HAVE_SINF) ++# AC_DEFINE(HAVE_SINHF) ++# AC_DEFINE(HAVE_SINCOS) ++# AC_DEFINE(HAVE_SINCOSF) ++ AC_DEFINE(HAVE_SQRTF) ++# AC_DEFINE(HAVE_TANF) ++# AC_DEFINE(HAVE_TANHF) ++ if test x"long_double_math_on_this_cpu" = x"yes"; then ++ AC_MSG_ERROR([long_double_math_on_this_cpu is yes!]) ++# AC_DEFINE(HAVE_ACOSL) ++# AC_DEFINE(HAVE_ASINL) ++# AC_DEFINE(HAVE_ATANL) ++# AC_DEFINE(HAVE_ATAN2L) ++# AC_DEFINE(HAVE_CEILL) ++# AC_DEFINE(HAVE_COPYSIGNL) ++# AC_DEFINE(HAVE_COSL) ++# AC_DEFINE(HAVE_COSHL) ++# AC_DEFINE(HAVE_EXPL) ++# AC_DEFINE(HAVE_FABSL) ++# AC_DEFINE(HAVE_FINITEL) ++# AC_DEFINE(HAVE_FLOORL) ++# AC_DEFINE(HAVE_FMODL) ++# AC_DEFINE(HAVE_FREXPL) ++# AC_DEFINE(HAVE_HYPOTL) ++# AC_DEFINE(HAVE_ISINFL) ++# AC_DEFINE(HAVE_ISNANL) ++# AC_DEFINE(HAVE_LOGL) ++# AC_DEFINE(HAVE_LOG10L) ++# AC_DEFINE(HAVE_MODFL) ++# AC_DEFINE(HAVE_POWL) ++# AC_DEFINE(HAVE_SINL) ++# AC_DEFINE(HAVE_SINHL) ++# AC_DEFINE(HAVE_SINCOSL) ++# AC_DEFINE(HAVE_SQRTL) ++# AC_DEFINE(HAVE_TANL) ++# AC_DEFINE(HAVE_TANHL) ++ fi ++ ;; + *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ + machine/endian.h machine/param.h sys/machine.h sys/types.h \ +@@ -157,7 +250,7 @@ + AC_DEFINE(HAVE_INT64_T) + case "$target" in + *-uclinux*) +- # Don't enable LFS with uClibc ++ # Don't enable LFS with uClinux + ;; + *) + AC_DEFINE(_GLIBCXX_USE_LFS) +diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h +--- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-25 22:06:30.000000000 -0700 +@@ -101,7 +101,9 @@ + using std::wmemcpy; + using std::wmemmove; + using std::wmemset; ++#if _GLIBCXX_HAVE_WCSFTIME + using std::wcsftime; ++#endif + + #if _GLIBCXX_USE_C99 + using std::wcstold; +diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h +--- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-25 22:06:30.000000000 -0700 +@@ -180,7 +180,9 @@ + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; ++#if _GLIBCXX_HAVE_WCSFTIME + using ::wcsftime; ++#endif + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; diff --git a/openwrt/toolchain/gcc/4.1.1/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/4.1.1/300-libstdc++-pic.patch new file mode 100644 index 00000000000..89d03a85e53 --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/300-libstdc++-pic.patch @@ -0,0 +1,46 @@ +# DP: Build and install libstdc++_pic.a library. + +--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500 +@@ -214,6 +214,10 @@ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ + + ++install-exec-local: ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++ + # Added bits to build debug library. + if GLIBCXX_BUILD_DEBUG + all-local: build_debug +--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500 ++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500 +@@ -627,7 +627,7 @@ + + install-data-am: install-data-local + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local + + install-info: install-info-am + +@@ -660,6 +660,7 @@ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-exec \ ++ install-exec-local \ + install-exec-am install-info install-info-am install-man \ + install-strip install-toolexeclibLTLIBRARIES installcheck \ + installcheck-am installdirs maintainer-clean \ +@@ -745,6 +746,11 @@ + install_debug: + (cd ${debugdir} && $(MAKE) \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ++ ++install-exec-local: ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/openwrt/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch b/openwrt/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch new file mode 100644 index 00000000000..0e2092f3fbb --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 ++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 +@@ -500,7 +500,7 @@ + #ifdef __linux__ + # include <features.h> + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/openwrt/toolchain/gcc/4.1.1/302-c99-snprintf.patch b/openwrt/toolchain/gcc/4.1.1/302-c99-snprintf.patch new file mode 100644 index 00000000000..dfb22d681bb --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/302-c99-snprintf.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500 +@@ -142,7 +142,7 @@ + using ::vsprintf; + } + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf diff --git a/openwrt/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch b/openwrt/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch new file mode 100644 index 00000000000..2ccc80d9bbd --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch @@ -0,0 +1,12 @@ +--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500 ++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500 +@@ -7194,6 +7194,9 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <complex.h> ++#ifdef __UCLIBC__ ++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs ++#endif + int + main () + { diff --git a/openwrt/toolchain/gcc/4.1.1/304-index_macro.patch b/openwrt/toolchain/gcc/4.1.1/304-index_macro.patch new file mode 100644 index 00000000000..1fac112fa9c --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/304-index_macro.patch @@ -0,0 +1,24 @@ +--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100 ++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100 +@@ -59,6 +59,9 @@ + #include <bits/allocator.h> + #include <ext/hash_fun.h> + ++/* cope w/ index defined as macro, SuSv3 proposal */ ++#undef index ++ + # ifdef __GC + # define __GC_CONST const + # else +--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100 ++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100 +@@ -53,6 +53,9 @@ + #include <ext/memory> // For uninitialized_copy_n + #include <ext/numeric> // For power + ++/* cope w/ index defined as macro, SuSv3 proposal */ ++#undef index ++ + namespace __gnu_cxx + { + using std::size_t; diff --git a/openwrt/toolchain/gcc/4.1.1/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/4.1.1/602-sdk-libstdc++-includes.patch new file mode 100644 index 00000000000..23fce7544da --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/602-sdk-libstdc++-includes.patch @@ -0,0 +1,20 @@ +--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500 +@@ -21,5 +21,5 @@ + $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once + + # -I/-D flags to pass when compiling. +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES) ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include + +--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500 +@@ -35,7 +35,7 @@ + + libmath_la_SOURCES = stubs.c + +-AM_CPPFLAGS = $(CANADIAN_INCLUDES) ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include + + # Only compiling "C" sources in this directory. + LIBTOOL = @LIBTOOL@ --tag CC diff --git a/openwrt/toolchain/gcc/4.1.1/740-sh-pr24836.patch b/openwrt/toolchain/gcc/4.1.1/740-sh-pr24836.patch new file mode 100644 index 00000000000..7992282cff8 --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/740-sh-pr24836.patch @@ -0,0 +1,25 @@ +http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836 + +--- gcc/gcc/configure.ac (revision 106699) ++++ gcc/gcc/configure.ac (working copy) +@@ -2446,7 +2446,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 +--- gcc/gcc/configure ++++ gcc/gcc/configure +@@ -14846,7 +14846,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 diff --git a/openwrt/toolchain/gcc/4.1.1/800-arm-bigendian.patch b/openwrt/toolchain/gcc/4.1.1/800-arm-bigendian.patch new file mode 100644 index 00000000000..1fa5ae1cd27 --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/800-arm-bigendian.patch @@ -0,0 +1,67 @@ +By Lennert Buytenhek <buytenh@wantstofly.org> +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +--- gcc-4.1.0/gcc/config/arm/linux-elf.h ++++ gcc-4.1.0/gcc/config/arm/linux-elf.h +@@ -28,19 +28,33 @@ + #undef TARGET_VERSION + #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + #undef TARGET_DEFAULT_FLOAT_ABI + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (0) ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } + + /* Now we define the strings used to build the spec file. */ + #undef LIB_SPEC +@@ -61,7 +75,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + + #undef LINK_SPEC +--- gcc-4.1.0/gcc/config.gcc ++++ gcc-4.1.0/gcc/config.gcc +@@ -672,6 +672,11 @@ + ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" ++ case $target in ++ arm*b-*) ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ++ ;; ++ esac + tmake_file="${tmake_file} t-linux arm/t-arm" + case ${target} in + arm*-*-linux-gnueabi) diff --git a/openwrt/toolchain/gcc/Config.in b/openwrt/toolchain/gcc/Config.in index 506287a3f81..681f1399acb 100644 --- a/openwrt/toolchain/gcc/Config.in +++ b/openwrt/toolchain/gcc/Config.in @@ -23,10 +23,13 @@ choice config GCC_VERSION_4_0_3 bool "gcc 4.0.3" - + config GCC_VERSION_4_1_0 bool "gcc 4.1.0" + config GCC_VERSION_4_1_1 + bool "gcc 4.1.1" + endchoice config GCC_VERSION @@ -38,6 +41,7 @@ config GCC_VERSION default "4.0.2" if GCC_VERSION_4_0_2 default "4.0.3" if GCC_VERSION_4_0_3 || LINUX_2_6_ARUBA default "4.1.0" if GCC_VERSION_4_1_0 + default "4.1.1" if GCC_VERSION_4_1_1 default "3.4.6" From 829c95db103151d07bcb3207a5a7eb0889feff5e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 7 Jun 2006 23:45:42 +0000 Subject: [PATCH 144/757] generic lzma loader: add support for memory copying, preserve prom arguments SVN-Revision: 3908 --- .../linux/image/generic/lzma-loader/Makefile | 3 +- .../image/generic/lzma-loader/src/Makefile | 29 ++++++++++++++----- .../generic/lzma-loader/src/decompress.c | 9 +++++- .../generic/lzma-loader/src/lzma-copy.lds.in | 20 +++++++++++++ .../image/generic/lzma-loader/src/lzma.lds.in | 3 +- .../image/generic/lzma-loader/src/start.S | 28 ++++++++++++++++-- 6 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 openwrt/target/linux/image/generic/lzma-loader/src/lzma-copy.lds.in diff --git a/openwrt/target/linux/image/generic/lzma-loader/Makefile b/openwrt/target/linux/image/generic/lzma-loader/Makefile index 089254bbafe..3de04a81a8d 100644 --- a/openwrt/target/linux/image/generic/lzma-loader/Makefile +++ b/openwrt/target/linux/image/generic/lzma-loader/Makefile @@ -17,7 +17,8 @@ $(PKG_BUILD_DIR)/lzma.elf: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/vmlinux.l LD=$(TARGET_CROSS)ld CROSS_COMPILE=$(TARGET_CROSS) \ RAMSIZE=$(RAMSIZE) \ LOADADDR=$(LOADADDR) \ - KERNEL_ENTRY=$(KERNEL_ENTRY) + KERNEL_ENTRY=$(KERNEL_ENTRY) \ + IMAGE_COPY=$(IMAGE_COPY) $(PKG_BUILD_DIR)/vmlinux.lzma: $(KDIR)/vmlinux.lzma diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/Makefile b/openwrt/target/linux/image/generic/lzma-loader/src/Makefile index 8dfd76a6a20..54356889f53 100644 --- a/openwrt/target/linux/image/generic/lzma-loader/src/Makefile +++ b/openwrt/target/linux/image/generic/lzma-loader/src/Makefile @@ -1,9 +1,16 @@ LOADADDR = 0x80400000 # RAM start + 4M KERNEL_ENTRY = 0x80001000 RAMSIZE = 0x00100000 # 1MB +IMAGE_COPY:=0 CROSS_COMPILE = mips-linux- +OBJCOPY:= $(CROSS_COMPILE)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S +CFLAGS := -fno-builtin -Os -G 0 -ffunction-sections -mno-abicalls -fno-pic -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -Wall -DRAMSIZE=${RAMSIZE} -DKERNEL_ENTRY=${KERNEL_ENTRY} -D_LZMA_IN_CB +ifeq ($(IMAGE_COPY),1) +CFLAGS += -DLOADADDR=${LOADADDR} -DIMAGE_COPY=1 +endif + .S.s: $(CPP) $(CFLAGS) $< -o $*.s .S.o: @@ -13,12 +20,8 @@ CROSS_COMPILE = mips-linux- CC = $(CROSS_COMPILE)gcc LD = $(CROSS_COMPILE)ld -OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump -CFLAGS = -fno-builtin -Os -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE} -DKERNEL_ENTRY=${KERNEL_ENTRY} -D_LZMA_IN_CB -# CFLAGS = -fno-builtin -Os -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE} - O_FORMAT = $(shell $(OBJDUMP) -i | head -2 | grep elf32) # Drop some uninteresting sections in the kernel. @@ -26,17 +29,29 @@ O_FORMAT = $(shell $(OBJDUMP) -i | head -2 | grep elf32) drop-sections = .reginfo .mdebug .comment strip-flags = $(addprefix --remove-section=,$(drop-sections)) - all : lzma.elf lzma.lds: lzma.lds.in - sed -e 's,@LOADADDR@,$(LOADADDR),g' $< >$@ + sed -e 's,@LOADADDR@,$(LOADADDR),g' -e 's,@ENTRY@,_start,g' $< >$@ kernel.o: vmlinux.lzma lzma.lds $(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $< +ifeq ($(IMAGE_COPY),1) +lzma.o: decompress.o LzmaDecode.o kernel.o + sed -e 's,@LOADADDR@,$(LOADADDR),g' -e 's,@ENTRY@,entry,g' lzma.lds.in >lzma-stage2.lds + $(LD) -static --no-warn-mismatch -e entry -Tlzma-stage2.lds -o temp-$@ $^ + $(OBJCOPY) temp-$@ lzma.tmp + @echo "SECTIONS { .data : { code_start = .; *(.data) code_stop = .; }}" > lzma-data.lds + $(LD) -no-warn-mismatch -T lzma-data.lds -r -o $@ -b binary lzma.tmp --oformat $(O_FORMAT) + +lzma.elf: start.o lzma.o + sed -e 's,@LOADADDR@,$(KERNEL_ENTRY),g' lzma-copy.lds.in >lzma-copy.lds + $(LD) -s -Tlzma-copy.lds -o $@ $^ +else lzma.elf: start.o decompress.o LzmaDecode.o kernel.o $(LD) -s -Tlzma.lds -o $@ $^ +endif clean: - rm -f *.o lzma.elf + rm -f *.o lzma.elf *.tmp *.lds diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/decompress.c b/openwrt/target/linux/image/generic/lzma-loader/src/decompress.c index f602276ddc3..4ed432d1a50 100644 --- a/openwrt/target/linux/image/generic/lzma-loader/src/decompress.c +++ b/openwrt/target/linux/image/generic/lzma-loader/src/decompress.c @@ -106,6 +106,13 @@ void entry(unsigned long icache_size, unsigned long icache_lsize, { unsigned int i; /* temp value */ unsigned int osize; /* uncompressed size */ + volatile unsigned int arg0, arg1, arg2, arg3; + + /* restore argument registers */ + __asm__ __volatile__ ("ori %0, $12, 0":"=r"(arg0)); + __asm__ __volatile__ ("ori %0, $13, 0":"=r"(arg1)); + __asm__ __volatile__ ("ori %0, $14, 0":"=r"(arg2)); + __asm__ __volatile__ ("ori %0, $15, 0":"=r"(arg3)); ILzmaInCallback callback; CLzmaDecoderState vs; @@ -142,6 +149,6 @@ void entry(unsigned long icache_size, unsigned long icache_lsize, blast_icache(icache_size, icache_lsize); /* Jump to load address */ - ((void (*)(void)) KERNEL_ENTRY)(); + ((void (*)(int a0, int a1, int a2, int a3)) KERNEL_ENTRY)(arg0, arg1, arg2, arg3); } } diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/lzma-copy.lds.in b/openwrt/target/linux/image/generic/lzma-loader/src/lzma-copy.lds.in new file mode 100644 index 00000000000..fbc87ab8e23 --- /dev/null +++ b/openwrt/target/linux/image/generic/lzma-loader/src/lzma-copy.lds.in @@ -0,0 +1,20 @@ +OUTPUT_ARCH(mips) +ENTRY(_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = @LOADADDR@; + .text : + { + _ftext = . ; + *(.text) + *(.rodata) + } =0 + + .reginfo : { *(.reginfo) } + + .bss : + { + *(.bss) + } +} diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/lzma.lds.in b/openwrt/target/linux/image/generic/lzma-loader/src/lzma.lds.in index 5ac555bf7db..6021cec014c 100644 --- a/openwrt/target/linux/image/generic/lzma-loader/src/lzma.lds.in +++ b/openwrt/target/linux/image/generic/lzma-loader/src/lzma.lds.in @@ -1,5 +1,5 @@ OUTPUT_ARCH(mips) -ENTRY(_start) +ENTRY(@ENTRY@) SECTIONS { /* Read-only sections, merged into text segment: */ @@ -7,6 +7,7 @@ SECTIONS .text : { _ftext = . ; + *(.text.entry) *(.text) *(.rodata) lzma_start = .; diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/start.S b/openwrt/target/linux/image/generic/lzma-loader/src/start.S index 37c7ca36d3c..9a85c4c3572 100644 --- a/openwrt/target/linux/image/generic/lzma-loader/src/start.S +++ b/openwrt/target/linux/image/generic/lzma-loader/src/start.S @@ -34,10 +34,30 @@ LEAF(_start) .set mips32 .set noreorder + /* save argument registers */ + move t4, a0 + move t5, a1 + move t6, a2 + move t7, a3 + /* set up stack */ li sp, 0xa0000000 + RAMSIZE - 16 - - + +#ifdef IMAGE_COPY + /* Copy decompressor code to the right place */ + li t2, LOADADDR + add a0, t2, 0 + la a1, code_start + la a2, code_stop +$L1: + lw t0, 0(a1) + sw t0, 0(a0) + add a1, 4 + add a0, 4 + blt a1, a2, $L1 + nop +#endif + /* At this point we need to invalidate dcache and */ /* icache before jumping to new code */ @@ -128,7 +148,11 @@ noic: move a0,s3 /* icache line size */ move a1,s4 /* icache size */ move a2,s1 /* dcache line size */ +#ifdef IMAGE_COPY + jal t2 +#else jal entry +#endif move a3,s2 /* dcache size */ .set reorder From eb1b6f7636681b37b6670d3fd7fc179cadb38cbe Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 7 Jun 2006 23:46:57 +0000 Subject: [PATCH 145/757] move mips boot patch to generic-2.6 SVN-Revision: 3909 --- .../linux/au1000-2.6/patches/009-boot.patch | 15 --------------- .../linux/brcm-2.6/patches/001-bcm947xx.patch | 5 +---- .../patches/011-mips_boot.patch} | 0 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 openwrt/target/linux/au1000-2.6/patches/009-boot.patch rename openwrt/target/linux/{aruba-2.6/patches/007-boot.patch => generic-2.6/patches/011-mips_boot.patch} (100%) diff --git a/openwrt/target/linux/au1000-2.6/patches/009-boot.patch b/openwrt/target/linux/au1000-2.6/patches/009-boot.patch deleted file mode 100644 index 611c70d4602..00000000000 --- a/openwrt/target/linux/au1000-2.6/patches/009-boot.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Nur linux-cvs/arch/mips/kernel/head.S linux-aruba/arch/mips/kernel/head.S ---- linux-cvs/arch/mips/kernel/head.S 2004-12-23 00:21:39.000000000 -0800 -+++ linux-aruba/arch/mips/kernel/head.S 2005-10-20 09:16:08.000000000 -0700 -@@ -122,6 +122,10 @@ - #endif - .endm - -+ -+ j kernel_entry -+ nop -+ - /* - * Reserved space for exception handlers. - * Necessary for machines which link their kernels at KSEG0. - diff --git a/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch b/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch index 771ea71b7f2..c6f63a2b8a8 100644 --- a/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch +++ b/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch @@ -11807,7 +11807,7 @@ diff -Nur linux-2.6.16/arch/mips/kernel/cpu-probe.c linux-2.6.16-owrt/arch/mips/ diff -Nur linux-2.6.16/arch/mips/kernel/head.S linux-2.6.16-owrt/arch/mips/kernel/head.S --- linux-2.6.16/arch/mips/kernel/head.S 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-owrt/arch/mips/kernel/head.S 2006-03-21 09:31:00.000000000 +0100 -@@ -107,6 +107,14 @@ +@@ -107,6 +107,11 @@ #endif .endm @@ -11815,9 +11815,6 @@ diff -Nur linux-2.6.16/arch/mips/kernel/head.S linux-2.6.16-owrt/arch/mips/kerne +#undef eret +#define eret nop; nop; eret +#endif -+ -+ j kernel_entry -+ nop + /* * Reserved space for exception handlers. diff --git a/openwrt/target/linux/aruba-2.6/patches/007-boot.patch b/openwrt/target/linux/generic-2.6/patches/011-mips_boot.patch similarity index 100% rename from openwrt/target/linux/aruba-2.6/patches/007-boot.patch rename to openwrt/target/linux/generic-2.6/patches/011-mips_boot.patch From ce3f164ea0ded53a181d04da5b12ec163e754046 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 7 Jun 2006 23:47:30 +0000 Subject: [PATCH 146/757] disable all other filesystems in menuconfig when initramfs is selected SVN-Revision: 3910 --- openwrt/target/linux/Config.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 9bcb61cd24a..946ace32045 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -9,6 +9,7 @@ menu "Target Root Filesystem" config TARGET_ROOTFS_JFFS2 bool "jffs2" default y + depends !TARGET_ROOTFS_INITRAMFS help Build a jffs2 root filesystem @@ -17,12 +18,14 @@ menu "Target Root Filesystem" default y depends !LINUX_2_6_ARUBA depends !LINUX_2_6_XSCALE + depends !TARGET_ROOTFS_INITRAMFS help Build a squashfs-lzma root filesystem config TARGET_ROOTFS_TGZ bool "tgz" default y if !LINUX_2_4_BRCM && !LINUX_2_6_BRCM && !LINUX_2_6_ARUBA && !LINUX_2_4_AR531X + depends !TARGET_ROOTFS_INITRAMFS help Build a compressed tar archive of the the root filesystem From de93bede138129886115d2597b32e34fb7b06ad4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 7 Jun 2006 23:59:04 +0000 Subject: [PATCH 147/757] make ramdisk support generic, some cleanups SVN-Revision: 3911 --- openwrt/package/kernel.mk | 5 +- openwrt/target/linux/aruba-2.6/Makefile | 4 - openwrt/target/linux/aruba-2.6/config-ramdisk | 1520 ----------------- .../linux/generic-2.6/files}/init | 0 .../generic-2.6/files/init.d/S00initramfs} | 0 openwrt/target/linux/image/aruba/Makefile | 2 +- openwrt/target/linux/kernel.mk | 20 +- openwrt/target/linux/rules.mk | 5 +- 8 files changed, 27 insertions(+), 1529 deletions(-) delete mode 100644 openwrt/target/linux/aruba-2.6/config-ramdisk rename openwrt/{package/base-files/aruba-2.6 => target/linux/generic-2.6/files}/init (100%) rename openwrt/{package/base-files/aruba-2.6/etc/init.d/S00aruba => target/linux/generic-2.6/files/init.d/S00initramfs} (100%) diff --git a/openwrt/package/kernel.mk b/openwrt/package/kernel.mk index def66437c65..39f9cc0c9c6 100644 --- a/openwrt/package/kernel.mk +++ b/openwrt/package/kernel.mk @@ -20,7 +20,10 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ ) KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) +ifeq ($(LINUX_NAME),) +LINUX_NAME:=linux-$(LINUX_VERSION) +endif +LINUX_DIR := $(KERNEL_BUILD_DIR)/$(LINUX_NAME) KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) diff --git a/openwrt/target/linux/aruba-2.6/Makefile b/openwrt/target/linux/aruba-2.6/Makefile index e21bf818de7..5926e6ebcdb 100644 --- a/openwrt/target/linux/aruba-2.6/Makefile +++ b/openwrt/target/linux/aruba-2.6/Makefile @@ -14,10 +14,6 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) -ifeq ($(CONFIG_ARUBA_RAMDISK),y) - @$(CP) config-ramdisk $(LINUX_DIR)/.config -else @$(CP) config $(LINUX_DIR)/.config -endif touch $@ diff --git a/openwrt/target/linux/aruba-2.6/config-ramdisk b/openwrt/target/linux/aruba-2.6/config-ramdisk deleted file mode 100644 index 69accc42e2c..00000000000 --- a/openwrt/target/linux/aruba-2.6/config-ramdisk +++ /dev/null @@ -1,1520 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16 -# Mon Mar 20 14:06:58 2006 -# -CONFIG_MIPS=y - -# -# Machine selection -# -# CONFIG_MIPS_MTX1 is not set -# CONFIG_MIPS_BOSPORUS is not set -# CONFIG_MIPS_PB1000 is not set -# CONFIG_MIPS_PB1100 is not set -# CONFIG_MIPS_PB1500 is not set -# CONFIG_MIPS_PB1550 is not set -# CONFIG_MIPS_PB1200 is not set -# CONFIG_MIPS_DB1000 is not set -# CONFIG_MIPS_DB1100 is not set -# CONFIG_MIPS_DB1500 is not set -# CONFIG_MIPS_DB1550 is not set -# CONFIG_MIPS_DB1200 is not set -# CONFIG_MIPS_MIRAGE is not set -# CONFIG_MIPS_COBALT is not set -# CONFIG_MACH_DECSTATION is not set -# CONFIG_MIPS_EV64120 is not set -# CONFIG_MIPS_EV96100 is not set -# CONFIG_MIPS_IVR is not set -# CONFIG_MIPS_ITE8172 is not set -CONFIG_MACH_ARUBA=y -# CONFIG_MACH_JAZZ is not set -# CONFIG_LASAT is not set -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_MALTA is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_MIPS_SIM is not set -# CONFIG_MOMENCO_JAGUAR_ATX is not set -# CONFIG_MOMENCO_OCELOT is not set -# CONFIG_MOMENCO_OCELOT_3 is not set -# CONFIG_MOMENCO_OCELOT_C is not set -# CONFIG_MOMENCO_OCELOT_G is not set -# CONFIG_MIPS_XXS1500 is not set -# CONFIG_PNX8550_V2PCI is not set -# CONFIG_PNX8550_JBS is not set -# CONFIG_DDB5074 is not set -# CONFIG_DDB5476 is not set -# CONFIG_DDB5477 is not set -# CONFIG_MACH_VR41XX is not set -# CONFIG_PMC_YOSEMITE is not set -# CONFIG_QEMU is not set -# CONFIG_SGI_IP22 is not set -# CONFIG_SGI_IP27 is not set -# CONFIG_SGI_IP32 is not set -# CONFIG_SIBYTE_BIGSUR is not set -# CONFIG_SIBYTE_SWARM is not set -# CONFIG_SIBYTE_SENTOSA is not set -# CONFIG_SIBYTE_RHONE is not set -# CONFIG_SIBYTE_CARMEL is not set -# CONFIG_SIBYTE_PTSWARM is not set -# CONFIG_SIBYTE_LITTLESUR is not set -# CONFIG_SIBYTE_CRHINE is not set -# CONFIG_SIBYTE_CRHONE is not set -# CONFIG_SNI_RM200_PCI is not set -# CONFIG_TOSHIBA_JMR3927 is not set -# CONFIG_TOSHIBA_RBTX4927 is not set -# CONFIG_TOSHIBA_RBTX4938 is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_DMA_NONCOHERENT=y -CONFIG_DMA_NEED_PCI_MAP_STATE=y -CONFIG_CPU_BIG_ENDIAN=y -# CONFIG_CPU_LITTLE_ENDIAN is not set -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y -CONFIG_SWAP_IO_SPACE=y -CONFIG_MIPS_L1_CACHE_SHIFT=5 - -# -# CPU selection -# -CONFIG_CPU_MIPS32_R1=y -# CONFIG_CPU_MIPS32_R2 is not set -# CONFIG_CPU_MIPS64_R1 is not set -# CONFIG_CPU_MIPS64_R2 is not set -# CONFIG_CPU_R3000 is not set -# CONFIG_CPU_TX39XX is not set -# CONFIG_CPU_VR41XX is not set -# CONFIG_CPU_R4300 is not set -# CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_TX49XX is not set -# CONFIG_CPU_R5000 is not set -# CONFIG_CPU_R5432 is not set -# CONFIG_CPU_R6000 is not set -# CONFIG_CPU_NEVADA is not set -# CONFIG_CPU_R8000 is not set -# CONFIG_CPU_R10000 is not set -# CONFIG_CPU_RM7000 is not set -# CONFIG_CPU_RM9000 is not set -# CONFIG_CPU_SB1 is not set -CONFIG_SYS_HAS_CPU_MIPS32_R1=y -CONFIG_CPU_MIPS32=y -CONFIG_CPU_MIPSR1=y -CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y - -# -# Kernel type -# -CONFIG_32BIT=y -# CONFIG_64BIT is not set -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_8KB is not set -# CONFIG_PAGE_SIZE_16KB is not set -# CONFIG_PAGE_SIZE_64KB is not set -CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_MIPS_MT is not set -# CONFIG_64BIT_PHYS_ADDR is not set -CONFIG_CPU_ADVANCED=y -CONFIG_CPU_HAS_LLSC=y -# CONFIG_CPU_HAS_WB is not set -CONFIG_CPU_HAS_SYNC=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_CPU_SUPPORTS_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="../root" -CONFIG_INITRAMFS_ROOT_UID=0 -CONFIG_INITRAMFS_ROOT_GID=0 -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -# CONFIG_KALLSYMS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -# CONFIG_ELF_CORE is not set -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_SLAB is not set -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -CONFIG_SLOB=y -CONFIG_OBSOLETE_INTERMODULE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -# CONFIG_LBD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Bus options (PCI, PCMCIA, EISA, ISA, TC) -# -CONFIG_HW_HAS_PCI=y -CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_MMU=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_TRAD_SIGNALS=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_IPSEC_NAT_TRAVERSAL is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_IPV6_TUNNEL is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_BRIDGE_NETFILTER is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -CONFIG_NETFILTER_XTABLES=y -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_STATE=y -# CONFIG_NETFILTER_XT_MATCH_STRING is not set -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_CT_ACCT=y -# CONFIG_IP_NF_CONNTRACK_MARK is not set -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=y -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=y -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_LAYER7=m -# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_IPP2P=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_TIME=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_IMQ=m -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y -CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=y -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=y -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set -CONFIG_IP_NF_SET=m -CONFIG_IP_NF_SET_MAX=256 -CONFIG_IP_NF_SET_HASHSIZE=1024 -CONFIG_IP_NF_SET_IPMAP=m -CONFIG_IP_NF_SET_MACIPMAP=m -CONFIG_IP_NF_SET_PORTMAP=m -CONFIG_IP_NF_SET_IPHASH=m -CONFIG_IP_NF_SET_NETHASH=m -CONFIG_IP_NF_SET_IPTREE=m -CONFIG_IP_NF_MATCH_SET=m -CONFIG_IP_NF_TARGET_SET=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set -# CONFIG_IP6_NF_IPTABLES is not set - -# -# Bridge: Netfilter Configuration -# -# CONFIG_BRIDGE_NF_EBTABLES is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_ESFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_NETEM is not set -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -# CONFIG_NET_ACT_SIMP is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -# CONFIG_MTD_CFI_INTELEXT is not set -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_AMDSTD_RETRY=0 -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x1fc00000 -CONFIG_MTD_PHYSMAP_LEN=0x400000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=1 -# CONFIG_MTD_PCI is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_IFB is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_IMQ=m -# CONFIG_IMQ_BEHAVIOR_AA is not set -# CONFIG_IMQ_BEHAVIOR_AB is not set -CONFIG_IMQ_BEHAVIOR_BA=y -# CONFIG_IMQ_BEHAVIOR_BB is not set -CONFIG_IMQ_NUM_DEVS=2 -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_AR2313=y -CONFIG_IDT_RC32434_ETH=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_DM9000 is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -CONFIG_NATSEMI=y -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set -# CONFIG_LAN_SAA9730 is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_HERMES is not set -# CONFIG_ATMEL is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -# CONFIG_PRISM54 is not set -# CONFIG_HOSTAP is not set -CONFIG_NET_WIRELESS=y - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=m - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# PCI devices -# -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALI5451 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AZT3328 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_EMU10K1 is not set -# CONFIG_SND_EMU10K1X is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_ES1938 is not set -# CONFIG_SND_ES1968 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDA_INTEL is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1712 is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_MAESTRO3 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_TRIDENT is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# ALSA MIPS devices -# - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -CONFIG_USB_DYNAMIC_MINORS=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -# CONFIG_USB_EHCI_SPLIT_ISO is not set -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_OHCI_HCD is not set -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_OBSOLETE_OSS_USB_DRIVER=y -CONFIG_USB_AUDIO=m -# CONFIG_USB_MIDI is not set -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -CONFIG_USB_PWC=m - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_ZD1201 is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# File systems -# -CONFIG_EXT2_FS=m -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_SECURITY is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -CONFIG_MINIX_FS=m -# CONFIG_ROMFS_FS is not set -# CONFIG_INOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -CONFIG_NLS_ISO8859_1=m -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="" - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m diff --git a/openwrt/package/base-files/aruba-2.6/init b/openwrt/target/linux/generic-2.6/files/init similarity index 100% rename from openwrt/package/base-files/aruba-2.6/init rename to openwrt/target/linux/generic-2.6/files/init diff --git a/openwrt/package/base-files/aruba-2.6/etc/init.d/S00aruba b/openwrt/target/linux/generic-2.6/files/init.d/S00initramfs similarity index 100% rename from openwrt/package/base-files/aruba-2.6/etc/init.d/S00aruba rename to openwrt/target/linux/generic-2.6/files/init.d/S00initramfs diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index 835de1bef4a..4888dad72fd 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -16,7 +16,7 @@ endef define Image/Prepare cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma - $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile + $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean compile endef define Image/Build diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index 4b8bf139d41..b54fbd5972c 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -1,4 +1,4 @@ -LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 +LINUX_SOURCE:=$(LINUX_NAME).tar.bz2 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \ @@ -43,7 +43,22 @@ $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched touch $@ endif -$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install +ramdisk-config: $(LINUX_DIR)/.configured FORCE + mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old + grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config +ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + echo 'CONFIG_INITRAMFS_SOURCE="../../root"' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config + mkdir -p $(BUILD_DIR)/root/etc/init.d + $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ + $(CP) ../generic-2.6/files/init.d/S00initramfs $(BUILD_DIR)/root/etc/init.d/ +else + rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs + echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config +endif + +$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install ramdisk-config $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux @@ -72,6 +87,7 @@ $(KERNEL_IPKG): $(BUILD_DIR)/kernel.mk: $(LINUX_DIR) FORCE echo "BOARD:=$(BOARD)" > $@ + echo "LINUX_NAME:=$(LINUX_NAME)" >> $@ echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ diff --git a/openwrt/target/linux/rules.mk b/openwrt/target/linux/rules.mk index 1b40ab77625..166bfe24b62 100644 --- a/openwrt/target/linux/rules.mk +++ b/openwrt/target/linux/rules.mk @@ -9,7 +9,10 @@ endif MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -LINUX_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) +ifeq ($(LINUX_NAME),) +LINUX_NAME:=linux-$(LINUX_VERSION) +endif +LINUX_DIR := $(LINUX_BUILD_DIR)/$(LINUX_NAME) LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root From 43313bdaab3ca59eef6ca84b746db80e2d19228c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 8 Jun 2006 00:39:08 +0000 Subject: [PATCH 148/757] clean scripts/config on distclean SVN-Revision: 3912 --- openwrt/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index dae32830c28..92a49bf9e81 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -98,10 +98,10 @@ world: ./scripts/config/conf FORCE clean: FORCE rm -rf build_* bin -dirclean: clean FORCE +dirclean: clean rm -rf staging_dir_* toolchain_build_* -distclean: dirclean FORCE +distclean: dirclean config-clean rm -rf dl .*config* .pkg* .PHONY: FORCE From 4d07b6ea64c617e9e95f2797a612018a8b49346e Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Thu, 8 Jun 2006 13:38:08 +0000 Subject: [PATCH 150/757] add arm eabi patches SVN-Revision: 3914 --- .../toolchain/gcc/4.1.0/110-arm-eabi.patch | 27 +++++++++++++++++++ .../toolchain/gcc/4.1.1/110-arm-eabi.patch | 27 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 openwrt/toolchain/gcc/4.1.0/110-arm-eabi.patch create mode 100644 openwrt/toolchain/gcc/4.1.1/110-arm-eabi.patch diff --git a/openwrt/toolchain/gcc/4.1.0/110-arm-eabi.patch b/openwrt/toolchain/gcc/4.1.0/110-arm-eabi.patch new file mode 100644 index 00000000000..acebe5308f6 --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.0/110-arm-eabi.patch @@ -0,0 +1,27 @@ +--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300 ++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300 +@@ -674,7 +674,7 @@ + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" + tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm" + case ${target} in +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" + tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" + # The BPABI long long divmod functions return a 128-bit value in + +diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h +--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300 ++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400 +@@ -53,7 +53,11 @@ + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ + #undef LINUX_TARGET_INTERPRETER ++#ifdef USE_UCLIBC ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" ++#else + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3" ++#endif + + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ diff --git a/openwrt/toolchain/gcc/4.1.1/110-arm-eabi.patch b/openwrt/toolchain/gcc/4.1.1/110-arm-eabi.patch new file mode 100644 index 00000000000..acebe5308f6 --- /dev/null +++ b/openwrt/toolchain/gcc/4.1.1/110-arm-eabi.patch @@ -0,0 +1,27 @@ +--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300 ++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300 +@@ -674,7 +674,7 @@ + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" + tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm" + case ${target} in +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" + tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" + # The BPABI long long divmod functions return a 128-bit value in + +diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h +--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300 ++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400 +@@ -53,7 +53,11 @@ + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ + #undef LINUX_TARGET_INTERPRETER ++#ifdef USE_UCLIBC ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" ++#else + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3" ++#endif + + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ From 3faa3eef9d33b9a00f2a47f314185d2b17a0fe73 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 8 Jun 2006 16:35:15 +0000 Subject: [PATCH 151/757] disable madwifi rfkill support by default (broken on some hardware) SVN-Revision: 3915 --- .../package/madwifi/patches/103-disable_rfkill.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 openwrt/package/madwifi/patches/103-disable_rfkill.patch diff --git a/openwrt/package/madwifi/patches/103-disable_rfkill.patch b/openwrt/package/madwifi/patches/103-disable_rfkill.patch new file mode 100644 index 00000000000..f5b3de14589 --- /dev/null +++ b/openwrt/package/madwifi/patches/103-disable_rfkill.patch @@ -0,0 +1,12 @@ +diff -urN madwifi.old/ath/if_ath.c madwifi.dev/ath/if_ath.c +--- madwifi.old/ath/if_ath.c 2006-06-08 17:20:12.000000000 +0200 ++++ madwifi.dev/ath/if_ath.c 2006-06-08 18:30:10.000000000 +0200 +@@ -252,7 +252,7 @@ + static int ath_outdoor = AH_FALSE; /* enable outdoor use */ + static int ath_xchanmode = AH_TRUE; /* enable extended channels */ + static char *autocreate = NULL; +-static int rfkill = -1; ++static int rfkill = 0; + static int countrycode = -1; + static int outdoor = -1; + static int xchanmode = -1; From f83eb8146e62722afaeaf7eb060bc7043e663f04 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 9 Jun 2006 00:29:26 +0000 Subject: [PATCH 152/757] add dropbear pubkey auth patch from #582 SVN-Revision: 3916 --- .../dropbear/patches/100-pubkey_path.patch | 106 +++++------------- 1 file changed, 31 insertions(+), 75 deletions(-) diff --git a/openwrt/package/dropbear/patches/100-pubkey_path.patch b/openwrt/package/dropbear/patches/100-pubkey_path.patch index 4adda38b2bb..cbe525bcc31 100644 --- a/openwrt/package/dropbear/patches/100-pubkey_path.patch +++ b/openwrt/package/dropbear/patches/100-pubkey_path.patch @@ -1,89 +1,45 @@ -diff -urN dropbear.old/svr-authpubkey.c dropbear.dev/svr-authpubkey.c ---- dropbear.old/svr-authpubkey.c 2005-12-09 06:42:33.000000000 +0100 -+++ dropbear.dev/svr-authpubkey.c 2005-12-12 01:35:32.139358750 +0100 -@@ -155,7 +155,6 @@ - unsigned char* keyblob, unsigned int keybloblen) { - - FILE * authfile = NULL; -- char * filename = NULL; - int ret = DROPBEAR_FAILURE; - buffer * line = NULL; - unsigned int len, pos; -@@ -176,17 +175,8 @@ +--- dropbear.old/svr-authpubkey.c.orig 2006-06-03 14:54:43.000000000 +0000 ++++ dropbear.dev/svr-authpubkey.c 2006-06-03 15:03:19.000000000 +0000 +@@ -176,6 +176,8 @@ goto out; } -- /* we don't need to check pw and pw_dir for validity, since -- * its been done in checkpubkeyperms. */ -- len = strlen(ses.authstate.pw->pw_dir); -- /* allocate max required pathname storage, -- * = path + "/.ssh/authorized_keys" + '\0' = pathlen + 22 */ -- filename = m_malloc(len + 22); -- snprintf(filename, len + 22, "%s/.ssh/authorized_keys", -- ses.authstate.pw->pw_dir); -- ++ if (ses.authstate.pw->pw_uid != 0) { ++ + /* we don't need to check pw and pw_dir for validity, since + * its been done in checkpubkeyperms. */ + len = strlen(ses.authstate.pw->pw_dir); +@@ -187,6 +189,9 @@ + /* open the file */ -- authfile = fopen(filename, "r"); -+ authfile = fopen("/etc/dropbear/authorized_keys", "r"); + authfile = fopen(filename, "r"); ++ } else { ++ authfile = fopen("/etc/dropbear/authorized_keys","r"); ++ } if (authfile == NULL) { goto out; } -@@ -247,7 +237,6 @@ - if (line) { - buf_free(line); - } -- m_free(filename); - TRACE(("leave checkpubkey: ret=%d", ret)) - return ret; - } -@@ -255,12 +244,11 @@ - - /* Returns DROPBEAR_SUCCESS if file permissions for pubkeys are ok, - * DROPBEAR_FAILURE otherwise. -- * Checks that the user's homedir, ~/.ssh, and -- * ~/.ssh/authorized_keys are all owned by either root or the user, and are -+ * Checks that /etc/dropbear and /etc/dropbear/authorized_keys -+ * are all owned by either root or the user, and are - * g-w, o-w */ - static int checkpubkeyperms() { - -- char* filename = NULL; - int ret = DROPBEAR_FAILURE; - unsigned int len; - -@@ -274,25 +262,11 @@ +@@ -274,6 +279,8 @@ goto out; } -- /* allocate max required pathname storage, -- * = path + "/.ssh/authorized_keys" + '\0' = pathlen + 22 */ -- filename = m_malloc(len + 22); -- strncpy(filename, ses.authstate.pw->pw_dir, len+1); -- -- /* check ~ */ -- if (checkfileperm(filename) != DROPBEAR_SUCCESS) { -- goto out; -- } -- -- /* check ~/.ssh */ -- strncat(filename, "/.ssh", 5); /* strlen("/.ssh") == 5 */ -- if (checkfileperm(filename) != DROPBEAR_SUCCESS) { -+ if (checkfileperm("/etc/dropbear") != DROPBEAR_SUCCESS) { ++ if (ses.authstate.pw->pw_uid != 0) { ++ + /* allocate max required pathname storage, + * = path + "/.ssh/authorized_keys" + '\0' = pathlen + 22 */ + filename = m_malloc(len + 22); +@@ -295,6 +302,14 @@ + if (checkfileperm(filename) != DROPBEAR_SUCCESS) { goto out; } ++ } else { ++ if (checkfileperm("/etc/dropbear") != DROPBEAR_SUCCESS) { ++ goto out; ++ } ++ if (checkfileperm("/etc/dropbear/authorized_keys") != DROPBEAR_SUCCESS) { ++ goto out; ++ } ++ } -- /* now check ~/.ssh/authorized_keys */ -- strncat(filename, "/authorized_keys", 16); -- if (checkfileperm(filename) != DROPBEAR_SUCCESS) { -+ if (checkfileperm("/etc/dropbear/authorized_keys") != DROPBEAR_SUCCESS) { - goto out; - } - -@@ -300,7 +274,6 @@ + /* file looks ok, return success */ ret = DROPBEAR_SUCCESS; - - out: -- m_free(filename); - - TRACE(("leave checkpubkeyperms")) - return ret; From 202ddb72dab4863d596130067c39c34b0c93e765 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 9 Jun 2006 01:34:58 +0000 Subject: [PATCH 153/757] ppp: try to reconnect indefinitely (#551) SVN-Revision: 3921 --- openwrt/package/ppp/files/etc/ppp/options | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/ppp/files/etc/ppp/options b/openwrt/package/ppp/files/etc/ppp/options index 4f6f3486ef4..d74de793065 100644 --- a/openwrt/package/ppp/files/etc/ppp/options +++ b/openwrt/package/ppp/files/etc/ppp/options @@ -3,3 +3,4 @@ noaccomp nopcomp nocrtscts lock +maxfail 0 From 528df9c6471e560d2b0d439d5812cf6ddcdf5566 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 9 Jun 2006 01:55:14 +0000 Subject: [PATCH 154/757] update ebtables to 2.0.8-rc2 (#558) SVN-Revision: 3922 --- openwrt/package/ebtables/Makefile | 6 +- .../patches/ebtables-2.0.6-gcc4.patch | 116 ------------------ .../ebtables/patches/gcc3.4-ebtables_c.patch | 10 -- 3 files changed, 3 insertions(+), 129 deletions(-) delete mode 100644 openwrt/package/ebtables/patches/ebtables-2.0.6-gcc4.patch delete mode 100644 openwrt/package/ebtables/patches/gcc3.4-ebtables_c.patch diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index 04bb99d1576..f6f01fac63c 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -3,13 +3,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ebtables -PKG_VERSION:=2.0.6 -PKG_RELEASE:=2 +PKG_VERSION:=2.0.8-rc2 +PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/ebtables-v$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/ebtables -PKG_MD5SUM:=c4559af2366c764c6c42a3fdd40d60d3 +PKG_MD5SUM:=f07111fcc1966be669278433c35dcc28 PKG_CAT:=zcat include $(TOPDIR)/package/rules.mk diff --git a/openwrt/package/ebtables/patches/ebtables-2.0.6-gcc4.patch b/openwrt/package/ebtables/patches/ebtables-2.0.6-gcc4.patch deleted file mode 100644 index cf64aed3aa2..00000000000 --- a/openwrt/package/ebtables/patches/ebtables-2.0.6-gcc4.patch +++ /dev/null @@ -1,116 +0,0 @@ -# --- T2-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# T2 SDE: package/.../ebtables/gcc4.patch -# Copyright (C) 2004 - 2005 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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. -# --- T2-COPYRIGHT-NOTE-END --- -diff -Nur ebtables-v2.0.6.orig/extensions/ebt_ip.c ebtables-v2.0.6/extensions/ebt_ip.c ---- ebtables-v2.0.6.orig/extensions/ebt_ip.c 2003-11-02 20:22:56.000000000 +0200 -+++ ebtables-v2.0.6/extensions/ebt_ip.c 2005-11-01 18:48:56.000000000 +0200 -@@ -244,6 +244,7 @@ - struct ebt_ip_info *ipinfo = (struct ebt_ip_info *)(*match)->data; - char *end; - long int i; -+ unsigned char j; - - switch (c) { - case IP_SOURCE: -@@ -313,7 +314,7 @@ - ipinfo->invflags |= EBT_IP_PROTO; - if (optind > argc) - print_error("Missing IP protocol argument"); -- (unsigned char) i = strtoul(argv[optind - 1], &end, 10); -+ j = strtoul(argv[optind - 1], &end, 10); - if (*end != '\0') { - struct protoent *pe; - -@@ -324,7 +325,7 @@ - argv[optind - 1]); - ipinfo->protocol = pe->p_proto; - } else { -- ipinfo->protocol = (unsigned char) i; -+ ipinfo->protocol = j; - } - ipinfo->bitmask |= EBT_IP_PROTO; - break; -diff -Nur ebtables-v2.0.6.orig/extensions/ebt_limit.c ebtables-v2.0.6/extensions/ebt_limit.c ---- ebtables-v2.0.6.orig/extensions/ebt_limit.c 2003-11-02 20:22:56.000000000 +0200 -+++ ebtables-v2.0.6/extensions/ebt_limit.c 2005-11-01 18:48:56.000000000 +0200 -@@ -203,15 +203,15 @@ - - static struct ebt_u_match limit_match = - { -- .name EBT_LIMIT_MATCH, -- .size sizeof(struct ebt_limit_info), -- .help print_help, -- .init init, -- .parse parse, -- .final_check final_check, -- .print print, -- .compare compare, -- .extra_ops opts, -+ .name = EBT_LIMIT_MATCH, -+ .size = sizeof(struct ebt_limit_info), -+ .help = print_help, -+ .init = init, -+ .parse = parse, -+ .final_check = final_check, -+ .print = print, -+ .compare = compare, -+ .extra_ops = opts, - }; - - static void _init(void) __attribute((constructor)); -diff -Nur ebtables-v2.0.6.orig/extensions/ebt_vlan.c ebtables-v2.0.6/extensions/ebt_vlan.c ---- ebtables-v2.0.6.orig/extensions/ebt_vlan.c 2003-11-02 20:22:56.000000000 +0200 -+++ ebtables-v2.0.6/extensions/ebt_vlan.c 2005-11-01 18:48:56.000000000 +0200 -@@ -135,14 +135,16 @@ - (struct ebt_vlan_info *) (*match)->data; - char *end; - struct ebt_vlan_info local; -+ unsigned short id, encap; -+ unsigned char prio; - - switch (c) { - case VLAN_ID: - check_option(flags, OPT_VLAN_ID); - CHECK_INV_FLAG(EBT_VLAN_ID); - CHECK_IF_MISSING_VALUE; -- (unsigned short) local.id = -- strtoul(argv[optind - 1], &end, 10); -+ id = strtoul(argv[optind - 1], &end, 10); -+ local.id = (uint16_t) id; - CHECK_RANGE(local.id > 4094 || *end != '\0'); - vlaninfo->id = local.id; - SET_BITMASK(EBT_VLAN_ID); -@@ -152,8 +154,8 @@ - check_option(flags, OPT_VLAN_PRIO); - CHECK_INV_FLAG(EBT_VLAN_PRIO); - CHECK_IF_MISSING_VALUE; -- (unsigned char) local.prio = -- strtoul(argv[optind - 1], &end, 10); -+ prio = strtoul(argv[optind - 1], &end, 10); -+ local.prio = (uint8_t) prio; - CHECK_RANGE(local.prio >= 8 || *end != '\0'); - vlaninfo->prio = local.prio; - SET_BITMASK(EBT_VLAN_PRIO); -@@ -163,8 +165,8 @@ - check_option(flags, OPT_VLAN_ENCAP); - CHECK_INV_FLAG(EBT_VLAN_ENCAP); - CHECK_IF_MISSING_VALUE; -- (unsigned short) local.encap = -- strtoul(argv[optind - 1], &end, 16); -+ encap = strtoul(argv[optind - 1], &end, 16); -+ local.encap = (uint16_t) encap; - if (*end != '\0') { - ethent = getethertypebyname(argv[optind - 1]); - if (ethent == NULL) diff --git a/openwrt/package/ebtables/patches/gcc3.4-ebtables_c.patch b/openwrt/package/ebtables/patches/gcc3.4-ebtables_c.patch deleted file mode 100644 index 1973ea57f7d..00000000000 --- a/openwrt/package/ebtables/patches/gcc3.4-ebtables_c.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ebtables-v2.0.6/ebtables.c 2003-11-02 19:22:56.000000000 +0100 -+++ ebtables-patch/ebtables.c 2005-03-29 08:03:09.734707134 +0200 -@@ -1171,6 +1171,7 @@ - continue; - return i; - letscontinue: -+ {}; - } - return -1; - } From 4615af9dd3875b70c9a3a1db814afa2f2e4bb63d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 9 Jun 2006 02:05:53 +0000 Subject: [PATCH 155/757] install missing ebtables files SVN-Revision: 3923 --- openwrt/package/ebtables/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index f6f01fac63c..f4359a6675d 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -25,8 +25,13 @@ endef define Package/ebtables/install install -d -m0755 $(1)/etc install -m0644 $(PKG_BUILD_DIR)/ethertypes $(1)/etc/ + install -d -m0755 $(1)/usr/lib/ebtables + install -m0755 $(PKG_BUILD_DIR)/lib*.so $(1)/usr/lib/ + install -m0755 $(PKG_BUILD_DIR)/extensions/*.so $(1)/usr/lib/ebtables/ install -d -m0755 $(1)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/ + install -m0755 $(PKG_BUILD_DIR)/ebtables-save $(1)/usr/sbin/ + install -m0755 $(PKG_BUILD_DIR)/ebtables-restore $(1)/usr/sbin/ endef $(eval $(call BuildPackage,ebtables)) From 7cd883e6713f8a2dd970f75a5d0fd4c8b2190872 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 9 Jun 2006 02:46:51 +0000 Subject: [PATCH 156/757] enable slab, disable slob - for better performance (#583) SVN-Revision: 3925 --- openwrt/target/linux/aruba-2.6/config | 4 ++-- openwrt/target/linux/brcm-2.6/config | 4 ++-- openwrt/target/linux/sibyte-2.6/config | 4 ++-- openwrt/target/linux/x86-2.6/config | 4 ++-- openwrt/target/linux/xscale-2.6/config | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/config b/openwrt/target/linux/aruba-2.6/config index 386272371aa..d49ea058ebb 100644 --- a/openwrt/target/linux/aruba-2.6/config +++ b/openwrt/target/linux/aruba-2.6/config @@ -169,10 +169,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_SLAB is not set +CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -CONFIG_SLOB=y +# CONFIG_SLOB is not set CONFIG_OBSOLETE_INTERMODULE=y # diff --git a/openwrt/target/linux/brcm-2.6/config b/openwrt/target/linux/brcm-2.6/config index a916628c42d..4a5d98c095e 100644 --- a/openwrt/target/linux/brcm-2.6/config +++ b/openwrt/target/linux/brcm-2.6/config @@ -168,10 +168,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_SLAB is not set +CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -CONFIG_SLOB=y +# CONFIG_SLOB is not set CONFIG_OBSOLETE_INTERMODULE=y # diff --git a/openwrt/target/linux/sibyte-2.6/config b/openwrt/target/linux/sibyte-2.6/config index 221d833b89f..3c5587fd77a 100644 --- a/openwrt/target/linux/sibyte-2.6/config +++ b/openwrt/target/linux/sibyte-2.6/config @@ -191,10 +191,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_SLAB is not set +CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -CONFIG_SLOB=y +# CONFIG_SLOB is not set CONFIG_OBSOLETE_INTERMODULE=y # diff --git a/openwrt/target/linux/x86-2.6/config b/openwrt/target/linux/x86-2.6/config index 39fcb764fbb..8bd2cee89c2 100644 --- a/openwrt/target/linux/x86-2.6/config +++ b/openwrt/target/linux/x86-2.6/config @@ -49,10 +49,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_SLAB is not set +CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -CONFIG_SLOB=y +# CONFIG_SLOB is not set # # Loadable module support diff --git a/openwrt/target/linux/xscale-2.6/config b/openwrt/target/linux/xscale-2.6/config index 92d4657e3e9..f908945f1db 100644 --- a/openwrt/target/linux/xscale-2.6/config +++ b/openwrt/target/linux/xscale-2.6/config @@ -45,10 +45,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_SLAB is not set +CONFIG_SLAB=y CONFIG_TINY_SHMEM=y CONFIG_BASE_SMALL=0 -CONFIG_SLOB=y +# CONFIG_SLOB is not set CONFIG_OBSOLETE_INTERMODULE=y # From faf7e1a5dda7fc6061d46187a7ae1c8907b91346 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 11 Jun 2006 00:25:58 +0000 Subject: [PATCH 157/757] fix dependency handling bug SVN-Revision: 3929 --- openwrt/scripts/gen_deps.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index d75f06d6f6f..0983186f861 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -38,8 +38,8 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { my $depline = ""; foreach my $dep (@{$pkg{$name}->{depends}}) { my $idx; - if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) { - $idx = $pkg{$dep}->{src}; + if (defined $pkg{$dep}->{src}) { + ($pkg{$name}->{src} ne $pkg{$dep}->{src}) and $idx = $pkg{$dep}->{src}; } elsif (defined $pkg{$dep}) { $idx = $dep; } From 6257403c0ce47a0cb4d8752facce119a0fe588f6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 11 Jun 2006 00:34:11 +0000 Subject: [PATCH 158/757] change handling of the Build/Clean template SVN-Revision: 3930 --- openwrt/package/rules.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index d44cd986a49..77a6595e82f 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -257,10 +257,6 @@ define Build/Compile $(call Build/Compile/Default,) endef -define Build/Clean - $(MAKE) clean -endef - ifneq ($(DUMP),) dumpinfo: FORCE @$(DUMPINFO) @@ -282,5 +278,6 @@ else clean-targets: clean: FORCE @$(MAKE) clean-targets + $(call Build/Clean) rm -rf $(PKG_BUILD_DIR) endif From 2a1da1cd8df3bfe44f0e88b592510110f9ca9ecc Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 11 Jun 2006 00:41:05 +0000 Subject: [PATCH 159/757] add openssl SVN-Revision: 3931 --- openwrt/package/openssl/Config.in | 35 ++++++ openwrt/package/openssl/Makefile | 111 ++++++++++++++++++ .../package/openssl/ipkg/libopenssl.control | 4 + .../openssl/ipkg/openssl-util.conffiles | 1 + .../package/openssl/ipkg/openssl-util.control | 5 + .../patches/110-optimize-for-size.patch | 12 ++ .../openssl/patches/120-makedepend.patch | 28 +++++ .../openssl/patches/130-perl-path.patch | 72 ++++++++++++ .../openssl/patches/140-makefile-dirs.patch | 11 ++ .../openssl/patches/150-no_engines.patch | 83 +++++++++++++ .../patches/160-disable_doc_tests.patch | 48 ++++++++ 11 files changed, 410 insertions(+) create mode 100644 openwrt/package/openssl/Config.in create mode 100644 openwrt/package/openssl/Makefile create mode 100644 openwrt/package/openssl/ipkg/libopenssl.control create mode 100644 openwrt/package/openssl/ipkg/openssl-util.conffiles create mode 100644 openwrt/package/openssl/ipkg/openssl-util.control create mode 100644 openwrt/package/openssl/patches/110-optimize-for-size.patch create mode 100644 openwrt/package/openssl/patches/120-makedepend.patch create mode 100644 openwrt/package/openssl/patches/130-perl-path.patch create mode 100644 openwrt/package/openssl/patches/140-makefile-dirs.patch create mode 100644 openwrt/package/openssl/patches/150-no_engines.patch create mode 100644 openwrt/package/openssl/patches/160-disable_doc_tests.patch diff --git a/openwrt/package/openssl/Config.in b/openwrt/package/openssl/Config.in new file mode 100644 index 00000000000..e852c9f0f47 --- /dev/null +++ b/openwrt/package/openssl/Config.in @@ -0,0 +1,35 @@ +config BR2_COMPILE_OPENSSL + tristate + default n + depends BR2_PACKAGE_LIBOPENSSL + +config BR2_PACKAGE_LIBOPENSSL + prompt "libopenssl........................ Open source SSL (Secure Socket Layer) libraries" + tristate + default m if CONFIG_DEVEL + select BR2_COMPILE_OPENSSL + help + The OpenSSL Project is a collaborative effort to develop a robust, + commercial-grade, full-featured, and Open Source toolkit implementing + the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) + protocols as well as a full-strength general purpose cryptography library. + + http://www.openssl.org/ + + This package contains the shared SSL libraries, needed by other programs. + +config BR2_PACKAGE_OPENSSL_UTIL + prompt "openssl-util.................... OpenSSL command line tool" + tristate + default m if CONFIG_DEVEL + depends BR2_PACKAGE_LIBOPENSSL + help + The OpenSSL Project is a collaborative effort to develop a robust, + commercial-grade, full-featured, and Open Source toolkit implementing + the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) + protocols as well as a full-strength general purpose cryptography library. + + http://www.openssl.org/ + + This package contains the multi-purpose OpenSSL binary tool. + diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile new file mode 100644 index 00000000000..1b7ead87ee1 --- /dev/null +++ b/openwrt/package/openssl/Makefile @@ -0,0 +1,111 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openssl +PKG_VERSION:=0.9.8b +PKG_RELEASE:=1 +PKG_MD5SUM:=12cedbeb6813a0d7919dbf1f82134b86 + +PKG_SOURCE_URL:=http://www.openssl.org/source/ \ + ftp://ftp.funet.fi/pub/crypt/cryptography/libs/openssl/source/ \ + ftp://ftp.webmonster.de/pub/openssl/source/ \ + ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192 +OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines + +include $(TOPDIR)/package/rules.mk + +define Build/Configure + $(SED) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' $(PKG_BUILD_DIR)/Configure + $(SED) s/OPENWRT_OPTIMIZATION_FLAGS/$(BR2_TARGET_OPTIMIZATION)/g $(PKG_BUILD_DIR)/Configure + (cd $(PKG_BUILD_DIR); \ + PATH=$(TARGET_PATH) \ + ./Configure linux-openwrt \ + --prefix=/usr \ + --openssldir=/etc/ssl \ + -I$(STAGING_DIR)/usr/include \ + -L$(STAGING_DIR)/usr/lib -ldl \ + -DOPENSSL_SMALL_FOOTPRINT \ + $(OPENSSL_NO_CIPHERS) \ + $(OPENSSL_OPTIONS) \ + ) +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ + MAKEDEPPROG="$(TARGET_CC)" \ + depend + $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ + CC="$(TARGET_CC)" \ + AR="$(TARGET_CROSS)ar r" \ + RANLIB="$(TARGET_CROSS)ranlib" \ + all build-shared + # Work around openssl build bug to link libssl.so with libcrypto.so. + -rm $(PKG_BUILD_DIR)/libssl.so.*.*.* + $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ + CC=$(TARGET_CC) \ + CCOPTS="$(TARGET_CFLAGS) -fomit-frame-pointer" \ + do_linux-shared + $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + install +endef + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/openssl $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} $(STAGING_DIR)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/openssl \ + $(STAGING_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} +endef + + +define Package/libopenssl + SECTION:=base + CATEGORY:=Libraries + TITLE:=Open source SSL libraries + DESCRIPTION:=Open source SSL (Secure Socket Layer) libraries + URL:=http://www.openssl.org/ +endef + +define Package/openssl-util + $(call Package/libopenssl) + DEPENDS:=libopenssl + TITLE:=OpenSSL command line utilities + DESCRIPTION:=OpenSSL command line utilities +endef + + +define Package/libopenssl/install + install -d -m0755 $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.so.* $(1)/usr/lib/ + chmod 0644 $(1)/usr/lib/* +endef + +define Package/openssl-util/install + install -d -m0755 $(1)/etc/ssl + $(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/ + install -d -m0755 $(1)/etc/ssl/certs + install -d -m0755 $(1)/etc/ssl/private + chmod 0700 $(1)/etc/ssl/private + install -d -m0755 $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/ +endef + + +$(eval $(call BuildPackage,libopenssl)) +$(eval $(call BuildPackage,openssl-util)) diff --git a/openwrt/package/openssl/ipkg/libopenssl.control b/openwrt/package/openssl/ipkg/libopenssl.control new file mode 100644 index 00000000000..9cf48a804f2 --- /dev/null +++ b/openwrt/package/openssl/ipkg/libopenssl.control @@ -0,0 +1,4 @@ +Package: libopenssl +Priority: optional +Section: libs +Description: OpenSSL (Secure Socket Layer) libraries diff --git a/openwrt/package/openssl/ipkg/openssl-util.conffiles b/openwrt/package/openssl/ipkg/openssl-util.conffiles new file mode 100644 index 00000000000..6d068e66c4a --- /dev/null +++ b/openwrt/package/openssl/ipkg/openssl-util.conffiles @@ -0,0 +1 @@ +/etc/ssl/openssl.cnf diff --git a/openwrt/package/openssl/ipkg/openssl-util.control b/openwrt/package/openssl/ipkg/openssl-util.control new file mode 100644 index 00000000000..4c14ab1aae6 --- /dev/null +++ b/openwrt/package/openssl/ipkg/openssl-util.control @@ -0,0 +1,5 @@ +Package: openssl-util +Priority: optionnal +Section: admin +Description: OpenSSL (Secure Socket Layer) command line tool +Depends: libopenssl diff --git a/openwrt/package/openssl/patches/110-optimize-for-size.patch b/openwrt/package/openssl/patches/110-optimize-for-size.patch new file mode 100644 index 00000000000..6031c25257c --- /dev/null +++ b/openwrt/package/openssl/patches/110-optimize-for-size.patch @@ -0,0 +1,12 @@ +diff -ur openssl-0.9.8a/Configure openssl-0.9.8a-owrt/Configure +--- openssl-0.9.8a/Configure 2005-08-02 12:59:42.000000000 +0200 ++++ openssl-0.9.8a-owrt/Configure 2006-03-23 14:16:35.000000000 +0100 +@@ -353,6 +353,8 @@ + "linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", + "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", ++# OpenWrt targets ++"linux-openwrt","gcc:-DTERMIO OPENWRT_OPTIMIZATION_FLAGS -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + + #### *BSD [do see comment about ${BSDthreads} above!] + "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", diff --git a/openwrt/package/openssl/patches/120-makedepend.patch b/openwrt/package/openssl/patches/120-makedepend.patch new file mode 100644 index 00000000000..c802fe4adc5 --- /dev/null +++ b/openwrt/package/openssl/patches/120-makedepend.patch @@ -0,0 +1,28 @@ +diff -ruN openssl-0.9.7g-old/util/domd openssl-0.9.7g-new/util/domd +--- openssl-0.9.7g-old/util/domd 2004-05-11 14:46:18.000000000 +0200 ++++ openssl-0.9.7g-new/util/domd 2005-05-30 20:20:04.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # Do a makedepend, only leave out the standard headers + # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999 + +@@ -14,7 +14,8 @@ + cp Makefile Makefile.save + # fake the presence of Kerberos + touch $TOP/krb5.h +-if [ "$MAKEDEPEND" = "gcc" ]; then ++D=${MAKEDEPEND/%*gcc/gcc} ++if [ "$D" = "gcc" ]; then + args="" + while [ $# -gt 0 ]; do + if [ "$1" != "--" ]; then args="$args $1"; fi +@@ -22,7 +23,7 @@ + done + sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp + echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp +- gcc -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp ++ ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp + ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new + rm -f Makefile.tmp + else diff --git a/openwrt/package/openssl/patches/130-perl-path.patch b/openwrt/package/openssl/patches/130-perl-path.patch new file mode 100644 index 00000000000..42467b83880 --- /dev/null +++ b/openwrt/package/openssl/patches/130-perl-path.patch @@ -0,0 +1,72 @@ +diff -Nur openssl-0.9.7f/Configure openssl-0.9.7f.new/Configure +--- openssl-0.9.7f/Configure 2005-03-12 12:28:21.000000000 +0100 ++++ openssl-0.9.7f.new/Configure 2005-04-03 20:32:00.000000000 +0200 +@@ -1,4 +1,4 @@ +-: ++#!/usr/bin/perl + eval 'exec perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + ## +diff -Nur openssl-0.9.7f/tools/c_rehash.in openssl-0.9.7f.new/tools/c_rehash.in +--- openssl-0.9.7f/tools/c_rehash.in 2002-10-11 22:35:45.000000000 +0200 ++++ openssl-0.9.7f.new/tools/c_rehash.in 2005-04-03 20:41:17.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + + # Perl c_rehash script, scan all files in a directory +diff -Nur openssl-0.9.7f/util/clean-depend.pl openssl-0.9.7f.new/util/clean-depend.pl +--- openssl-0.9.7f/util/clean-depend.pl 2001-10-10 10:27:28.000000000 +0200 ++++ openssl-0.9.7f.new/util/clean-depend.pl 2005-04-03 20:41:38.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl -w + # Clean the dependency list in a makefile of standard includes... + # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999 + +diff -Nur openssl-0.9.7f/util/mkdef.pl openssl-0.9.7f.new/util/mkdef.pl +--- openssl-0.9.7f/util/mkdef.pl 2005-02-05 18:19:23.000000000 +0100 ++++ openssl-0.9.7f.new/util/mkdef.pl 2005-04-03 20:42:49.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + # + # generate a .def file + # +diff -Nur openssl-0.9.7f/util/mkerr.pl openssl-0.9.7f.new/util/mkerr.pl +--- openssl-0.9.7f/util/mkerr.pl 2005-01-31 02:28:17.000000000 +0100 ++++ openssl-0.9.7f.new/util/mkerr.pl 2005-04-03 20:43:02.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + + my $config = "crypto/err/openssl.ec"; + my $debug = 0; +diff -Nur openssl-0.9.7f/util/mkstack.pl openssl-0.9.7f.new/util/mkstack.pl +--- openssl-0.9.7f/util/mkstack.pl 2004-10-04 18:27:36.000000000 +0200 ++++ openssl-0.9.7f.new/util/mkstack.pl 2005-04-03 20:43:18.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + + # This is a utility that searches out "DECLARE_STACK_OF()" + # declarations in .h and .c files, and updates/creates/replaces +diff -Nur openssl-0.9.7f/util/pod2man.pl openssl-0.9.7f.new/util/pod2man.pl +--- openssl-0.9.7f/util/pod2man.pl 2002-05-30 17:30:21.000000000 +0200 ++++ openssl-0.9.7f.new/util/pod2man.pl 2005-04-03 20:43:52.000000000 +0200 +@@ -1,4 +1,4 @@ +-: #!/usr/bin/perl-5.005 ++#!/usr/bin/perl + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +diff -Nur openssl-0.9.7f/util/selftest.pl openssl-0.9.7f.new/util/selftest.pl +--- openssl-0.9.7f/util/selftest.pl 2004-05-11 14:46:19.000000000 +0200 ++++ openssl-0.9.7f.new/util/selftest.pl 2005-04-03 20:44:10.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl -w ++#!/usr/bin/perl + # + # Run the test suite and generate a report + # diff --git a/openwrt/package/openssl/patches/140-makefile-dirs.patch b/openwrt/package/openssl/patches/140-makefile-dirs.patch new file mode 100644 index 00000000000..89022e0c6cd --- /dev/null +++ b/openwrt/package/openssl/patches/140-makefile-dirs.patch @@ -0,0 +1,11 @@ +--- openssl-0.9.8a/Makefile.org 2006-02-21 20:57:45.000000000 -0800 ++++ openssl-0.9.8a-new/Makefile.org 2006-02-21 21:37:11.000000000 -0800 +@@ -100,7 +100,7 @@ + KRB5_INCLUDES= + LIBKRB5= + +-DIRS= crypto ssl engines apps test tools ++DIRS= crypto ssl apps + SHLIBDIRS= crypto ssl + + # dirs in crypto to build diff --git a/openwrt/package/openssl/patches/150-no_engines.patch b/openwrt/package/openssl/patches/150-no_engines.patch new file mode 100644 index 00000000000..b928fbcc61d --- /dev/null +++ b/openwrt/package/openssl/patches/150-no_engines.patch @@ -0,0 +1,83 @@ +diff -udrNP openssl-0.9.8-stable-SNAP-20050703.orig/util/libeay.num openssl-0.9.8-stable-SNAP-20050703/util/libeay.num +--- openssl-0.9.8-stable-SNAP-20050703.orig/util/libeay.num 2005-07-04 00:27:14.653639088 +0200 ++++ openssl-0.9.8-stable-SNAP-20050703/util/libeay.num 2005-07-04 22:50:07.986576664 +0200 +@@ -2071,7 +2071,6 @@ + UI_add_error_string 2633 EXIST::FUNCTION: + KRB5_CHECKSUM_free 2634 EXIST::FUNCTION: + OCSP_REQUEST_get_ext 2635 EXIST::FUNCTION: +-ENGINE_load_ubsec 2636 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + ENGINE_register_all_digests 2637 EXIST::FUNCTION:ENGINE + PKEY_USAGE_PERIOD_it 2638 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: + PKEY_USAGE_PERIOD_it 2638 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +@@ -2545,7 +2544,6 @@ + AES_set_encrypt_key 3024 EXIST::FUNCTION:AES + OCSP_resp_count 3025 EXIST::FUNCTION: + KRB5_CHECKSUM_new 3026 EXIST::FUNCTION: +-ENGINE_load_cswift 3027 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + OCSP_onereq_get0_id 3028 EXIST::FUNCTION: + ENGINE_set_default_ciphers 3029 EXIST::FUNCTION:ENGINE + NOTICEREF_it 3030 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +@@ -2576,7 +2574,6 @@ + i2d_EXTENDED_KEY_USAGE 3052 EXIST::FUNCTION: + i2d_OCSP_SIGNATURE 3053 EXIST::FUNCTION: + asn1_enc_save 3054 EXIST::FUNCTION: +-ENGINE_load_nuron 3055 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + _ossl_old_des_pcbc_encrypt 3056 EXIST::FUNCTION:DES + PKCS12_MAC_DATA_it 3057 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: + PKCS12_MAC_DATA_it 3057 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +@@ -2600,7 +2597,6 @@ + i2d_KRB5_CHECKSUM 3072 EXIST::FUNCTION: + ENGINE_set_table_flags 3073 EXIST::FUNCTION:ENGINE + AES_options 3074 EXIST::FUNCTION:AES +-ENGINE_load_chil 3075 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + OCSP_id_cmp 3076 EXIST::FUNCTION: + OCSP_BASICRESP_new 3077 EXIST::FUNCTION: + OCSP_REQUEST_get_ext_by_NID 3078 EXIST::FUNCTION: +@@ -2667,7 +2663,6 @@ + OCSP_CRLID_it 3127 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: + i2d_KRB5_AUTHENTBODY 3128 EXIST::FUNCTION: + OCSP_REQUEST_get_ext_count 3129 EXIST::FUNCTION: +-ENGINE_load_atalla 3130 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + X509_NAME_it 3131 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: + X509_NAME_it 3131 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: + USERNOTICE_it 3132 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +@@ -2762,8 +2757,6 @@ + DES_read_password 3207 EXIST::FUNCTION:DES + UI_UTIL_read_pw 3208 EXIST::FUNCTION: + UI_UTIL_read_pw_string 3209 EXIST::FUNCTION: +-ENGINE_load_aep 3210 EXIST::FUNCTION:ENGINE,STATIC_ENGINE +-ENGINE_load_sureware 3211 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + OPENSSL_add_all_algorithms_noconf 3212 EXIST:!VMS:FUNCTION: + OPENSSL_add_all_algo_noconf 3212 EXIST:VMS:FUNCTION: + OPENSSL_add_all_algorithms_conf 3213 EXIST:!VMS:FUNCTION: +@@ -2772,7 +2765,6 @@ + AES_ofb128_encrypt 3215 EXIST::FUNCTION:AES + AES_ctr128_encrypt 3216 EXIST::FUNCTION:AES + AES_cfb128_encrypt 3217 EXIST::FUNCTION:AES +-ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE,STATIC_ENGINE + _ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES + EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES + EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES +@@ -3107,7 +3099,6 @@ + STORE_method_set_modify_function 3530 EXIST:!VMS:FUNCTION: + STORE_meth_set_modify_fn 3530 EXIST:VMS:FUNCTION: + STORE_parse_attrs_next 3531 EXIST::FUNCTION: +-ENGINE_load_padlock 3532 EXIST::FUNCTION:ENGINE + EC_GROUP_set_curve_name 3533 EXIST::FUNCTION:EC + X509_CERT_PAIR_it 3534 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: + X509_CERT_PAIR_it 3534 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +diff -udrNP openssl-0.9.8-stable-SNAP-20050703.orig/Configure openssl-0.9.8-stable-SNAP-20050703/Configure +--- openssl-0.9.8-stable-SNAP-20050703.orig/Configure 2005-07-04 00:27:11.169168808 +0200 ++++ openssl-0.9.8-stable-SNAP-20050703/Configure 2005-07-05 00:02:12.590136992 +0200 +@@ -1623,6 +1624,11 @@ + close(OUT); + } + ++# ugly hack to disable engines ++if($target eq "mingwx") { ++ system("sed -e s/^LIB/XLIB/g -i engines/Makefile"); ++} ++ + print <<EOF; + + Configured for $target. diff --git a/openwrt/package/openssl/patches/160-disable_doc_tests.patch b/openwrt/package/openssl/patches/160-disable_doc_tests.patch new file mode 100644 index 00000000000..de8d8527bd3 --- /dev/null +++ b/openwrt/package/openssl/patches/160-disable_doc_tests.patch @@ -0,0 +1,48 @@ +diff -urN openssl-0.9.8a/Makefile openssl-0.9.8a.new/Makefile +--- openssl-0.9.8a/Makefile 2005-10-11 12:21:48.000000000 +0200 ++++ openssl-0.9.8a.new/Makefile 2006-03-29 15:23:28.107586680 +0200 +@@ -102,7 +102,7 @@ + KRB5_INCLUDES= + LIBKRB5= + +-DIRS= crypto ssl engines apps test tools ++DIRS= crypto ssl engines apps tools + SHLIBDIRS= crypto ssl + + # dirs in crypto to build +@@ -119,7 +119,7 @@ + + # tests to perform. "alltests" is a special word indicating that all tests + # should be performed. +-TESTS = alltests ++TESTS = + + MAKEFILE= Makefile + +@@ -131,7 +131,7 @@ + + TOP= . + ONEDIRS=out tmp +-EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS ++EDIRS= times bugs util include certs ms shlib mt demos perl sf dep VMS + WDIRS= windows + LIBS= libcrypto.a libssl.a + SHARED_CRYPTO=libcrypto$(SHLIB_EXT) +@@ -204,7 +204,7 @@ + @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) + + sub_all: build_all +-build_all: build_libs build_apps build_tests build_tools ++build_all: build_libs build_apps build_tools + + build_libs: build_crypto build_ssl build_engines + +@@ -454,7 +454,7 @@ + dist_pem_h: + (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + +-install: all install_docs install_sw ++install: all install_sw + + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ From b378b1d490b667efd6c61a2d25cb9cd7cda7e265 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 11 Jun 2006 00:41:16 +0000 Subject: [PATCH 160/757] add hostapd SVN-Revision: 3932 --- openwrt/package/hostapd/Makefile | 110 ++++++++++++++++++ openwrt/package/hostapd/files/default.config | 69 +++++++++++ openwrt/package/hostapd/files/mini.config | 69 +++++++++++ .../hostapd/ipkg/hostapd-mini.conffiles | 1 + .../package/hostapd/ipkg/hostapd.conffiles | 1 + .../patches/001-cross_compile_fix.patch | 35 ++++++ 6 files changed, 285 insertions(+) create mode 100644 openwrt/package/hostapd/Makefile create mode 100644 openwrt/package/hostapd/files/default.config create mode 100644 openwrt/package/hostapd/files/mini.config create mode 100644 openwrt/package/hostapd/ipkg/hostapd-mini.conffiles create mode 100644 openwrt/package/hostapd/ipkg/hostapd.conffiles create mode 100644 openwrt/package/hostapd/patches/001-cross_compile_fix.patch diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile new file mode 100644 index 00000000000..9c2ecea4304 --- /dev/null +++ b/openwrt/package/hostapd/Makefile @@ -0,0 +1,110 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hostapd +PKG_VERSION:=0.5.3 +PKG_RELEASE:=1 +PKG_MD5SUM:=4e3134e8b0d86e831230f8c620fd81bb +PKG_BUILDDEP:=madwifi + +PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(TOPDIR)/package/rules.mk + + +define Build/ConfigureTarget + $(CP) $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)_$(1) + $(CP) ./files/$(1).config $(PKG_BUILD_DIR)_$(1)/.config +endef + +define Build/CompileTarget + $(MAKE) -C $(PKG_BUILD_DIR)_$(1) \ + $(TARGET_CONFIGURE_OPTS) \ + OPTFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + hostapd hostapd_cli + $(CP) $(PKG_BUILD_DIR)_$(1)/hostapd_cli $(PKG_BUILD_DIR)/ +endef + +define Package/InstallTemplate + if [ \! -f "$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \ + rm -f $(PKG_BUILD_DIR)/.built; \ + $(MAKE) $(PKG_BUILD_DIR)/.built; \ + fi + install -m0755 -d $$(1)/etc + install -m0600 $(PKG_BUILD_DIR)_$(2)/madwifi.conf $$(1)/etc/hostapd.conf + install -m0755 -d $$(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)_$(2)/hostapd $$(1)/usr/sbin/ +endef + +define Package/Template + ifneq ($(CONFIG_PACKAGE_$(1)),) + define Build/Configure/$(2) + $(call Build/ConfigureTarget,$(2)) + endef + define Build/Compile/$(2) + $(call Build/CompileTarget,$(2)) + endef + endif + + define Package/$(1)/install + $(call Package/InstallTemplate,$(1),$(2)) + endef +endef + +define Build/Configure + $(call Build/Configure/default) + $(call Build/Configure/mini) +endef + +define Build/Compile + $(call Build/Compile/default) + $(call Build/Compile/mini) +endef + +define Build/Clean + rm -rf $(PKG_BUILD_DIR)_default + rm -rf $(PKG_BUILD_DIR)_mini +endef + +define Package/hostapd +SECTION:=net +CATEGORY:=Network +DEPENDS:=+libopenssl +TITLE:=IEEE 802.1x Authenticator +DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator +URL:=http://hostap.epitest.fi/ +endef + +define Package/hostapd-mini +$(call Package/hostapd) +TITLE:=IEEE 802.1x Authenticator (WPA-PSK only) +DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (WPA-PSK only) +endef + +define Package/hostapd-utils +$(call Package/hostapd) +DEPENDS:=@PACKAGE_hostapd||PACKAGE_hostapd-mini +TITLE:=IEEE 802.1x Authenticator (utils) +DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (command line utils) +endef + +define Package/hostapd-utils/install + install -m0755 -d $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(1)/usr/sbin/ +endef + + +$(eval $(call Package/Template,hostapd,default)) +$(eval $(call Package/Template,hostapd-mini,mini)) + +$(eval $(call BuildPackage,hostapd)) +$(eval $(call BuildPackage,hostapd-mini)) +$(eval $(call BuildPackage,hostapd-utils)) + diff --git a/openwrt/package/hostapd/files/default.config b/openwrt/package/hostapd/files/default.config new file mode 100644 index 00000000000..e2237d6d8d8 --- /dev/null +++ b/openwrt/package/hostapd/files/default.config @@ -0,0 +1,69 @@ +# Example hostapd build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cass, these lines should use += in order not +# to override previous values of the variables. + +# Driver interface for Host AP driver +CONFIG_DRIVER_HOSTAP=y + +# Driver interface for wired authenticator +#CONFIG_DRIVER_WIRED=y + +# Driver interface for madwifi driver +CONFIG_DRIVER_MADWIFI=y +#CFLAGS += -I../head # change to reflect local setup; directory for madwifi src + +# Driver interface for Prism54 driver +#CONFIG_DRIVER_PRISM54=y + +# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) +#CONFIG_DRIVER_BSD=y +#CFLAGS += -I/usr/local/include +#LIBS += -L/usr/local/lib + +# IEEE 802.11F/IAPP +CONFIG_IAPP=y + +# WPA2/IEEE 802.11i RSN pre-authentication +CONFIG_RSN_PREAUTH=y + +# Integrated EAP authenticator +CONFIG_EAP=y + +# EAP-MD5 for the integrated EAP authenticator +CONFIG_EAP_MD5=y + +# EAP-TLS for the integrated EAP authenticator +CONFIG_EAP_TLS=y + +# EAP-MSCHAPv2 for the integrated EAP authenticator +CONFIG_EAP_MSCHAPV2=y + +# EAP-PEAP for the integrated EAP authenticator +CONFIG_EAP_PEAP=y + +# EAP-PSK for the integrated EAP authenticator +CONFIG_EAP_PSK=y + +# EAP-GTC for the integrated EAP authenticator +CONFIG_EAP_GTC=y + +# EAP-TTLS for the integrated EAP authenticator +CONFIG_EAP_TTLS=y + +# EAP-SIM for the integrated EAP authenticator +#CONFIG_EAP_SIM=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +CONFIG_PKCS12=y + +# RADIUS authentication server. This provides access to the integrated EAP +# authenticator from external hosts using RADIUS. +#CONFIG_RADIUS_SERVER=y diff --git a/openwrt/package/hostapd/files/mini.config b/openwrt/package/hostapd/files/mini.config new file mode 100644 index 00000000000..912bee8d7f4 --- /dev/null +++ b/openwrt/package/hostapd/files/mini.config @@ -0,0 +1,69 @@ +# Example hostapd build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cass, these lines should use += in order not +# to override previous values of the variables. + +# Driver interface for Host AP driver +CONFIG_DRIVER_HOSTAP=y + +# Driver interface for wired authenticator +#CONFIG_DRIVER_WIRED=y + +# Driver interface for madwifi driver +CONFIG_DRIVER_MADWIFI=y +#CFLAGS += -I../head # change to reflect local setup; directory for madwifi src + +# Driver interface for Prism54 driver +#CONFIG_DRIVER_PRISM54=y + +# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) +#CONFIG_DRIVER_BSD=y +#CFLAGS += -I/usr/local/include +#LIBS += -L/usr/local/lib + +# IEEE 802.11F/IAPP +CONFIG_IAPP=y + +# WPA2/IEEE 802.11i RSN pre-authentication +CONFIG_RSN_PREAUTH=y + +# Integrated EAP authenticator +CONFIG_EAP=y + +# EAP-MD5 for the integrated EAP authenticator +#CONFIG_EAP_MD5=y + +# EAP-TLS for the integrated EAP authenticator +#CONFIG_EAP_TLS=y + +# EAP-MSCHAPv2 for the integrated EAP authenticator +#CONFIG_EAP_MSCHAPV2=y + +# EAP-PEAP for the integrated EAP authenticator +#CONFIG_EAP_PEAP=y + +# EAP-PSK for the integrated EAP authenticator +CONFIG_EAP_PSK=y + +# EAP-GTC for the integrated EAP authenticator +#CONFIG_EAP_GTC=y + +# EAP-TTLS for the integrated EAP authenticator +#CONFIG_EAP_TTLS=y + +# EAP-SIM for the integrated EAP authenticator +#CONFIG_EAP_SIM=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +#CONFIG_PKCS12=y + +# RADIUS authentication server. This provides access to the integrated EAP +# authenticator from external hosts using RADIUS. +#CONFIG_RADIUS_SERVER=y diff --git a/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles b/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles new file mode 100644 index 00000000000..f61980010e6 --- /dev/null +++ b/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles @@ -0,0 +1 @@ +/etc/hostapd.conf diff --git a/openwrt/package/hostapd/ipkg/hostapd.conffiles b/openwrt/package/hostapd/ipkg/hostapd.conffiles new file mode 100644 index 00000000000..f61980010e6 --- /dev/null +++ b/openwrt/package/hostapd/ipkg/hostapd.conffiles @@ -0,0 +1 @@ +/etc/hostapd.conf diff --git a/openwrt/package/hostapd/patches/001-cross_compile_fix.patch b/openwrt/package/hostapd/patches/001-cross_compile_fix.patch new file mode 100644 index 00000000000..8b5ca681d27 --- /dev/null +++ b/openwrt/package/hostapd/patches/001-cross_compile_fix.patch @@ -0,0 +1,35 @@ +Common subdirectories: hostapd-0.5.2/logwatch and hostapd-0.5.2.new/logwatch +diff -u hostapd-0.5.2/Makefile hostapd-0.5.2.new/Makefile +--- hostapd-0.5.2/Makefile 2006-03-20 03:20:09.000000000 +0000 ++++ hostapd-0.5.2.new/Makefile 2006-03-21 22:25:23.803473592 +0000 +@@ -3,7 +3,7 @@ + DIR_HOSTAP=. + + ifndef CFLAGS +-CFLAGS = -MMD -O2 -Wall -g ++CFLAGS = -MMD $(OPTFLAGS) $(CPPFLAGS) + endif + + # define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to +@@ -266,7 +266,7 @@ + for i in $(ALL); do cp $$i /usr/local/bin/$$i; done + + hostapd: $(OBJS) +- $(CC) -o hostapd $(OBJS) $(LIBS) ++ $(CC) -o hostapd $(OBJS) $(LDFLAGS) $(LIBS) + + driver_conf.c: Makefile .config + rm -f driver_conf.c +@@ -330,10 +330,10 @@ + endif + + nt_password_hash: $(NOBJS) +- $(CC) -o nt_password_hash $(NOBJS) $(LIBS_n) ++ $(CC) -o nt_password_hash $(NOBJS) $(LDFLAGS) $(LIBS_n) + + hlr_auc_gw: $(HOBJS) +- $(CC) -o hlr_auc_gw $(HOBJS) $(LIBS_h) ++ $(CC) -o hlr_auc_gw $(HOBJS) $(LDFLAGS) $(LIBS_h) + + clean: + rm -f core *~ *.o hostapd hostapd_cli nt_password_hash hlr_auc_gw From e29845fcb8c0f9b1246b1b17e1c54d916f4014e1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 12 Jun 2006 20:42:11 +0000 Subject: [PATCH 161/757] madwifi: remove the hard dependency on kernel aes support - only needed for software crypto SVN-Revision: 3934 --- .../patches/105-no_forced_aes_dep.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 openwrt/package/madwifi/patches/105-no_forced_aes_dep.patch diff --git a/openwrt/package/madwifi/patches/105-no_forced_aes_dep.patch b/openwrt/package/madwifi/patches/105-no_forced_aes_dep.patch new file mode 100644 index 00000000000..fa439c6e96c --- /dev/null +++ b/openwrt/package/madwifi/patches/105-no_forced_aes_dep.patch @@ -0,0 +1,39 @@ +diff -urN madwifi.old/net80211/ieee80211_crypto_ccmp.c madwifi.dev/net80211/ieee80211_crypto_ccmp.c +--- madwifi.old/net80211/ieee80211_crypto_ccmp.c 2006-02-06 21:20:57.000000000 +0100 ++++ madwifi.dev/net80211/ieee80211_crypto_ccmp.c 2006-06-12 22:29:23.000000000 +0200 +@@ -105,12 +105,6 @@ + + ctx->cc_vap = vap; + ctx->cc_ic = vap->iv_ic; +- ctx->cc_tfm = crypto_alloc_tfm("aes", 0); +- if (ctx->cc_tfm == NULL) { +- FREE(ctx, M_DEVBUF); +- _MOD_DEC_USE(THIS_MODULE); +- return NULL; +- } + return ctx; + } + +@@ -137,8 +131,21 @@ + __func__, k->wk_keylen, 128 / NBBY); + return 0; + } +- if (k->wk_flags & IEEE80211_KEY_SWCRYPT) ++ ++ if (k->wk_flags & IEEE80211_KEY_SWCRYPT) { ++ if (ctx->cc_tfm == NULL) ++ ctx->cc_tfm = crypto_alloc_tfm("aes", 0); ++ ++ if (ctx->cc_tfm == NULL) { ++ IEEE80211_DPRINTF(ctx->cc_vap, IEEE80211_MSG_CRYPTO, ++ "%s: Tried to add a software crypto key, but no software crypto available\n", ++ __func__); ++ ++ return 0; ++ } ++ + crypto_cipher_setkey(ctx->cc_tfm, k->wk_key, k->wk_keylen); ++ } + return 1; + } + From dababf5dac0a65707d7f8530d5faa3d7940ba2b0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 12 Jun 2006 20:51:14 +0000 Subject: [PATCH 162/757] fix wpa/wpa2 with madwifi SVN-Revision: 3935 --- .../hostapd/patches/100-madwifi_fixes.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 openwrt/package/hostapd/patches/100-madwifi_fixes.patch diff --git a/openwrt/package/hostapd/patches/100-madwifi_fixes.patch b/openwrt/package/hostapd/patches/100-madwifi_fixes.patch new file mode 100644 index 00000000000..eb7299b41ad --- /dev/null +++ b/openwrt/package/hostapd/patches/100-madwifi_fixes.patch @@ -0,0 +1,52 @@ +diff -ur hostapd.old/driver_madwifi.c hostapd.dev/driver_madwifi.c +--- hostapd.old/driver_madwifi.c 2006-03-25 20:55:18.000000000 +0100 ++++ hostapd.dev/driver_madwifi.c 2006-06-12 21:54:22.000000000 +0200 +@@ -20,11 +20,6 @@ + + #include <include/compat.h> + #include <net80211/ieee80211.h> +-#ifdef WME_NUM_AC +-/* Assume this is built against BSD branch of madwifi driver. */ +-#define MADWIFI_BSD +-#include <net80211/_ieee80211.h> +-#endif /* WME_NUM_AC */ + #include <net80211/ieee80211_crypto.h> + #include <net80211/ieee80211_ioctl.h> + +@@ -168,7 +164,10 @@ + } + return 0; + } +- ++static int madwifi_get_inact_sec(void *priv, const u8 *addr) ++{ ++return 0; ++} + static int + set80211param(struct madwifi_driver_data *drv, int op, int arg) + { +@@ -1204,8 +1203,6 @@ + goto bad; + } + +- madwifi_set_iface_flags(drv, 0); /* mark down during setup */ +- + hapd->driver = &drv->ops; + return 0; + bad: +@@ -1226,7 +1223,6 @@ + + drv->hapd->driver = NULL; + +- (void) madwifi_set_iface_flags(drv, 0); + if (drv->ioctl_sock >= 0) + close(drv->ioctl_sock); + if (drv->sock_recv != NULL && drv->sock_recv != drv->sock_xmit) +@@ -1306,6 +1452,7 @@ + .get_ssid = madwifi_get_ssid, + .set_countermeasures = madwifi_set_countermeasures, + .sta_clear_stats = madwifi_sta_clear_stats, ++ .get_inact_sec = madwifi_get_inact_sec, + }; + + void madwifi_driver_register(void) From c9baa75cb7c741fb63cf51da5e2587c64d9a8c83 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 12 Jun 2006 22:04:52 +0000 Subject: [PATCH 163/757] call Image/BuildKernel template for targets that export their kernel images without filesystem SVN-Revision: 3936 --- openwrt/target/linux/image/image.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/target/linux/image/image.mk b/openwrt/target/linux/image/image.mk index 61ad9ff2647..1c9341dd760 100644 --- a/openwrt/target/linux/image/image.mk +++ b/openwrt/target/linux/image/image.mk @@ -35,6 +35,7 @@ compile: install: $(call Image/Prepare) $(call Image/mkfs/prepare) + $(call Image/BuildKernel) $(call Image/mkfs/jffs2) $(call Image/mkfs/squashfs) $(call Image/mkfs/tgz) From 0752cb311616109c21dcb290f3d6d2587d83d50c Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 13 Jun 2006 18:27:55 +0000 Subject: [PATCH 164/757] fix madwifi compile when using slab allocator SVN-Revision: 3937 --- openwrt/package/madwifi/patches/106-slab_fix.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 openwrt/package/madwifi/patches/106-slab_fix.patch diff --git a/openwrt/package/madwifi/patches/106-slab_fix.patch b/openwrt/package/madwifi/patches/106-slab_fix.patch new file mode 100644 index 00000000000..8de7dc7e432 --- /dev/null +++ b/openwrt/package/madwifi/patches/106-slab_fix.patch @@ -0,0 +1,11 @@ +diff -ruN madwifi-ng-r1590-20060523/net80211/ieee80211_linux.c madwifi-ng-r1590-20060523-patch/net80211/ieee80211_linux.c +--- madwifi-ng-r1590-20060523/net80211/ieee80211_linux.c 2006-06-13 14:26:25 -04:00 ++++ madwifi-ng-r1590-20060523-patch/net80211/ieee80211_linux.c 2006-06-13 14:26:41 -04:00 +@@ -44,6 +44,7 @@ + #include <linux/etherdevice.h> + #include <linux/if_vlan.h> + #include <linux/vmalloc.h> ++#include <linux/slab.h> + + #include <net/iw_handler.h> + #include <linux/wireless.h> From 726ba89f2b3aa3a4ddc60c5e8de5402d5ed0dbff Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 13 Jun 2006 22:58:12 +0000 Subject: [PATCH 165/757] fix aruba ramdisk check for the image building SVN-Revision: 3938 --- openwrt/target/linux/image/aruba/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index 4888dad72fd..14a923dd1a0 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -21,7 +21,7 @@ endef define Image/Build ./addVersion -n ArubaOS $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari version -ifneq ($(CONFIG_ARUBA_RAMDISK),y) +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) ifeq ($(1),jffs2-64k) endif @dd if=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari of=$(KDIR)/image.tmp bs=655360 conv=sync From da7464026db2aeb304895e66867d88dabe3792a5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 13 Jun 2006 22:59:00 +0000 Subject: [PATCH 166/757] remove aruba specific ramdisk option SVN-Revision: 3939 --- openwrt/target/linux/aruba-2.6/Config.in | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 openwrt/target/linux/aruba-2.6/Config.in diff --git a/openwrt/target/linux/aruba-2.6/Config.in b/openwrt/target/linux/aruba-2.6/Config.in deleted file mode 100644 index b66e8f65519..00000000000 --- a/openwrt/target/linux/aruba-2.6/Config.in +++ /dev/null @@ -1,4 +0,0 @@ -config ARUBA_RAMDISK - prompt "ramdisk support" - depends LINUX_2_6_ARUBA - bool From 8a33f62e33f2e29b72dd54fcd086610b9b3b1adc Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 13 Jun 2006 23:05:06 +0000 Subject: [PATCH 167/757] update aruba image building makefile for latest image.mk changes SVN-Revision: 3940 --- openwrt/target/linux/image/aruba/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index 14a923dd1a0..ddfe8e7f9cf 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -19,11 +19,12 @@ define Image/Prepare $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean compile endef -define Image/Build +define Image/BuildKernel ./addVersion -n ArubaOS $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari version -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) +endef + +define Image/Build ifeq ($(1),jffs2-64k) -endif @dd if=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari of=$(KDIR)/image.tmp bs=655360 conv=sync @cat $(KDIR)/root.$(1) >> $(KDIR)/image.tmp @dd if=$(KDIR)/image.tmp of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(patsubst jffs2-%,jffs2,$(1)).bin bs=3604480 conv=sync From 2690a2aedd668b8daba479a681ca67f713b974cd Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 13 Jun 2006 23:19:22 +0000 Subject: [PATCH 168/757] fix annoying make parse error SVN-Revision: 3941 --- openwrt/target/linux/image/aruba/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index ddfe8e7f9cf..d68084b2616 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -23,13 +23,13 @@ define Image/BuildKernel ./addVersion -n ArubaOS $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari version endef -define Image/Build ifeq ($(1),jffs2-64k) +define Image/Build @dd if=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari of=$(KDIR)/image.tmp bs=655360 conv=sync @cat $(KDIR)/root.$(1) >> $(KDIR)/image.tmp @dd if=$(KDIR)/image.tmp of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(patsubst jffs2-%,jffs2,$(1)).bin bs=3604480 conv=sync @rm -f $(KDIR)/image.tmp -endif endef +endif $(eval $(call BuildImage)) From 2d85d1932bcfaa205096e0307c95474036f7e649 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 13 Jun 2006 23:25:24 +0000 Subject: [PATCH 169/757] hopefully the last fix for the aruba image stuff SVN-Revision: 3942 --- openwrt/target/linux/image/aruba/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index d68084b2616..c8dab056a00 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -23,13 +23,15 @@ define Image/BuildKernel ./addVersion -n ArubaOS $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari version endef -ifeq ($(1),jffs2-64k) -define Image/Build +define Image/Build/jffs2-64k @dd if=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari of=$(KDIR)/image.tmp bs=655360 conv=sync @cat $(KDIR)/root.$(1) >> $(KDIR)/image.tmp @dd if=$(KDIR)/image.tmp of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(patsubst jffs2-%,jffs2,$(1)).bin bs=3604480 conv=sync @rm -f $(KDIR)/image.tmp endef -endif + +define Image/Build + $(call Image/Build/$(1),$(1)) +endef $(eval $(call BuildImage)) From 7965164e8ad979a9318f038cec8ef94995422440 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 13 Jun 2006 23:33:21 +0000 Subject: [PATCH 170/757] remove libgcc hack SVN-Revision: 3943 --- openwrt/package/base-files/Makefile | 2 +- .../gcc/3.4.4/static-libgcc.patch.conditional | 11 ----------- .../gcc/3.4.5/static-libgcc.patch.conditional | 11 ----------- .../gcc/3.4.6/static-libgcc.patch.conditional | 11 ----------- openwrt/toolchain/gcc/Makefile | 6 ------ 5 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 openwrt/toolchain/gcc/3.4.4/static-libgcc.patch.conditional delete mode 100644 openwrt/toolchain/gcc/3.4.5/static-libgcc.patch.conditional delete mode 100644 openwrt/toolchain/gcc/3.4.6/static-libgcc.patch.conditional diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 23152c11d1d..5e51b7e6535 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -34,7 +34,7 @@ endef define Package/libgcc SECTION:=libs CATEGORY:=Libraries - DEFAULT:=m, y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0 + DEFAULT:=y TITLE:=GCC support library VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) DESCRIPTION:=$(TITLE) diff --git a/openwrt/toolchain/gcc/3.4.4/static-libgcc.patch.conditional b/openwrt/toolchain/gcc/3.4.4/static-libgcc.patch.conditional deleted file mode 100644 index c8c1d849cd5..00000000000 --- a/openwrt/toolchain/gcc/3.4.4/static-libgcc.patch.conditional +++ /dev/null @@ -1,11 +0,0 @@ ---- specs~ 2005-11-21 17:22:08.000000000 +0100 -+++ specs 2005-11-21 17:22:08.000000000 +0100 -@@ -51,7 +51,7 @@ - %{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}} - - *libgcc: --%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s%M --no-as-needed}%{shared-libgcc:-lgcc_s%M%{!shared: -lgcc}}}} -+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}} - - *startfile: - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} diff --git a/openwrt/toolchain/gcc/3.4.5/static-libgcc.patch.conditional b/openwrt/toolchain/gcc/3.4.5/static-libgcc.patch.conditional deleted file mode 100644 index c8c1d849cd5..00000000000 --- a/openwrt/toolchain/gcc/3.4.5/static-libgcc.patch.conditional +++ /dev/null @@ -1,11 +0,0 @@ ---- specs~ 2005-11-21 17:22:08.000000000 +0100 -+++ specs 2005-11-21 17:22:08.000000000 +0100 -@@ -51,7 +51,7 @@ - %{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}} - - *libgcc: --%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s%M --no-as-needed}%{shared-libgcc:-lgcc_s%M%{!shared: -lgcc}}}} -+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}} - - *startfile: - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} diff --git a/openwrt/toolchain/gcc/3.4.6/static-libgcc.patch.conditional b/openwrt/toolchain/gcc/3.4.6/static-libgcc.patch.conditional deleted file mode 100644 index c8c1d849cd5..00000000000 --- a/openwrt/toolchain/gcc/3.4.6/static-libgcc.patch.conditional +++ /dev/null @@ -1,11 +0,0 @@ ---- specs~ 2005-11-21 17:22:08.000000000 +0100 -+++ specs 2005-11-21 17:22:08.000000000 +0100 -@@ -51,7 +51,7 @@ - %{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}} - - *libgcc: --%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s%M --no-as-needed}%{shared-libgcc:-lgcc_s%M%{!shared: -lgcc}}}} -+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}} - - *startfile: - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} diff --git a/openwrt/toolchain/gcc/Makefile b/openwrt/toolchain/gcc/Makefile index b0686297d00..e76b60b0bac 100644 --- a/openwrt/toolchain/gcc/Makefile +++ b/openwrt/toolchain/gcc/Makefile @@ -158,12 +158,6 @@ gcc-install: $(GCC_BUILD_DIR2)/.compiled FORCE $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ done; \ ); -# We do another ugly hack here because the standard behaviour is -# to include a reference to libgcc.so.1 in all binaries. For flash space -# saving, we change the specs file to link in a static libgcc here. - if [ -f $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \ - patch -d $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/ -p0 < ./$(GCC_VERSION)/static-libgcc.patch.conditional ; \ - fi; source: $(DL_DIR)/$(GCC_SOURCE) prepare: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc From 9369e2ed0702c46c7ddfb7af4afb6f75ba577f3b Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 14 Jun 2006 20:25:16 +0000 Subject: [PATCH 171/757] remove early_initcall hacks SVN-Revision: 3944 --- .../target/linux/aruba-2.6/patches/000-aruba.patch | 12 ------------ .../target/linux/brcm-2.6/patches/001-bcm947xx.patch | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch index 7bb8a26d7fb..ee02c34722a 100644 --- a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch +++ b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch @@ -10492,18 +10492,6 @@ diff -Nur linux-2.6.16/include/asm-mips/mach-generic/irq.h linux-2.6.16-owrt/inc +#define NR_IRQS 256 #endif /* __ASM_MACH_GENERIC_IRQ_H */ -diff -Nur linux-2.6.16/include/linux/init.h linux-2.6.16-owrt/include/linux/init.h ---- linux-2.6.16/include/linux/init.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/init.h 2006-03-20 14:25:10.000000000 +0100 -@@ -86,6 +86,8 @@ - static initcall_t __initcall_##fn __attribute_used__ \ - __attribute__((__section__(".initcall" level ".init"))) = fn - -+#define early_initcall(fn) __define_initcall(".early1",fn) -+ - #define core_initcall(fn) __define_initcall("1",fn) - #define postcore_initcall(fn) __define_initcall("2",fn) - #define arch_initcall(fn) __define_initcall("3",fn) diff -Nur linux-2.6.16/include/linux/kernel.h linux-2.6.16-owrt/include/linux/kernel.h --- linux-2.6.16/include/linux/kernel.h 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-owrt/include/linux/kernel.h 2006-03-20 14:25:10.000000000 +0100 diff --git a/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch b/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch index c6f63a2b8a8..a0820d0cd68 100644 --- a/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch +++ b/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch @@ -11904,18 +11904,6 @@ diff -Nur linux-2.6.16/include/asm-mips/cpu.h linux-2.6.16-owrt/include/asm-mips /* * ISA Level encodings -diff -Nur linux-2.6.16/include/linux/init.h linux-2.6.16-owrt/include/linux/init.h ---- linux-2.6.16/include/linux/init.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/init.h 2006-03-21 09:31:00.000000000 +0100 -@@ -86,6 +86,8 @@ - static initcall_t __initcall_##fn __attribute_used__ \ - __attribute__((__section__(".initcall" level ".init"))) = fn - -+#define early_initcall(fn) __define_initcall(".early1",fn) -+ - #define core_initcall(fn) __define_initcall("1",fn) - #define postcore_initcall(fn) __define_initcall("2",fn) - #define arch_initcall(fn) __define_initcall("3",fn) diff -Nur linux-2.6.16/include/linux/pci_ids.h linux-2.6.16-owrt/include/linux/pci_ids.h --- linux-2.6.16/include/linux/pci_ids.h 2006-03-20 06:53:29.000000000 +0100 +++ linux-2.6.16-owrt/include/linux/pci_ids.h 2006-03-21 09:31:00.000000000 +0100 From 7e1afbe4788082e5971893e3b1630365feb76b88 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 14 Jun 2006 21:13:11 +0000 Subject: [PATCH 172/757] switch io schedular to deadline SVN-Revision: 3945 --- openwrt/target/linux/au1000-2.6/config | 12 ++++++------ openwrt/target/linux/brcm-2.6/config | 12 ++++++------ openwrt/target/linux/sibyte-2.6/config | 12 ++++++------ openwrt/target/linux/x86-2.6/config | 12 ++++++------ openwrt/target/linux/xscale-2.6/config | 10 +++++----- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/openwrt/target/linux/au1000-2.6/config b/openwrt/target/linux/au1000-2.6/config index b274fcfd55b..70558108105 100644 --- a/openwrt/target/linux/au1000-2.6/config +++ b/openwrt/target/linux/au1000-2.6/config @@ -196,15 +196,15 @@ CONFIG_KMOD=y # # IO Schedulers # -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=m -CONFIG_IOSCHED_CFQ=m -CONFIG_DEFAULT_AS=y +# CONFIG_IOSCHED_NOOP is not set +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set # CONFIG_DEFAULT_DEADLINE is not set # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" +CONFIG_DEFAULT_IOSCHED="deadline" # # Bus options (PCI, PCMCIA, EISA, ISA, TC) diff --git a/openwrt/target/linux/brcm-2.6/config b/openwrt/target/linux/brcm-2.6/config index 4a5d98c095e..588f8f79c55 100644 --- a/openwrt/target/linux/brcm-2.6/config +++ b/openwrt/target/linux/brcm-2.6/config @@ -193,15 +193,15 @@ CONFIG_OBSOLETE_MODPARM=y # # IO Schedulers # -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_NOOP is not set +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" +CONFIG_DEFAULT_IOSCHED="deadline" # # Bus options (PCI, PCMCIA, EISA, ISA, TC) diff --git a/openwrt/target/linux/sibyte-2.6/config b/openwrt/target/linux/sibyte-2.6/config index 3c5587fd77a..5e055acaf73 100644 --- a/openwrt/target/linux/sibyte-2.6/config +++ b/openwrt/target/linux/sibyte-2.6/config @@ -216,15 +216,15 @@ CONFIG_STOP_MACHINE=y # # IO Schedulers # -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_NOOP is not set +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_AS is noet set +CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" +CONFIG_DEFAULT_IOSCHED="deadline" # # Bus options (PCI, PCMCIA, EISA, ISA, TC) diff --git a/openwrt/target/linux/x86-2.6/config b/openwrt/target/linux/x86-2.6/config index 8bd2cee89c2..16264f59948 100644 --- a/openwrt/target/linux/x86-2.6/config +++ b/openwrt/target/linux/x86-2.6/config @@ -73,15 +73,15 @@ CONFIG_OBSOLETE_MODPARM=y # # IO Schedulers # -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_NOOP is not set +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" +CONFIG_DEFAULT_IOSCHED="deadline" # # Processor type and features diff --git a/openwrt/target/linux/xscale-2.6/config b/openwrt/target/linux/xscale-2.6/config index f908945f1db..ebbca2f9280 100644 --- a/openwrt/target/linux/xscale-2.6/config +++ b/openwrt/target/linux/xscale-2.6/config @@ -69,15 +69,15 @@ CONFIG_OBSOLETE_MODPARM=y # # IO Schedulers # -CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_NOOP is not set # CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set # CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" # # System Type From ffa7abcdd1ab66249393d73b86f59ae16c98d753 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 14 Jun 2006 22:44:35 +0000 Subject: [PATCH 173/757] fix display of uninitialized ports SVN-Revision: 3946 --- openwrt/package/switch/src/switch-robo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/package/switch/src/switch-robo.c b/openwrt/package/switch/src/switch-robo.c index b23fca64428..eb93f4b98d1 100644 --- a/openwrt/package/switch/src/switch-robo.c +++ b/openwrt/package/switch/src/switch-robo.c @@ -315,6 +315,8 @@ static int handle_vlan_port_read(void *driver, char *buf, int nr) } } + buf[len] = '\0'; + return len; } From 44c42b85ac6e1380d1654c69c8781bfd20a1a35c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 13:44:26 +0000 Subject: [PATCH 174/757] fix gcc version selection SVN-Revision: 3947 --- openwrt/toolchain/gcc/Config.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openwrt/toolchain/gcc/Config.in b/openwrt/toolchain/gcc/Config.in index 681f1399acb..49129073404 100644 --- a/openwrt/toolchain/gcc/Config.in +++ b/openwrt/toolchain/gcc/Config.in @@ -1,5 +1,14 @@ # Choose gcc version. +if !TOOLCHAINOPTS + config GCC_VERSION_3_4_4 + default y if LINUX_2_4_BRCM + + config GCC_VERSION_4_0_3 + default y if LINUX_2_6_ARUBA + +endif + choice prompt "GCC compiler Version" if TOOLCHAINOPTS default GCC_VERSION_4_0_3 if LINUX_2_6_ARUBA @@ -35,11 +44,11 @@ endchoice config GCC_VERSION string prompt "GCC compiler Version" if (TOOLCHAINOPTS && NULL) - default "3.4.4" if GCC_VERSION_3_4_4 || LINUX_2_4_BRCM + default "3.4.4" if GCC_VERSION_3_4_4 default "3.4.5" if GCC_VERSION_3_4_5 default "3.4.6" if GCC_VERSION_3_4_6 default "4.0.2" if GCC_VERSION_4_0_2 - default "4.0.3" if GCC_VERSION_4_0_3 || LINUX_2_6_ARUBA + default "4.0.3" if GCC_VERSION_4_0_3 default "4.1.0" if GCC_VERSION_4_1_0 default "4.1.1" if GCC_VERSION_4_1_1 default "3.4.6" From 92d8c26513518c17970bc5d46445b8ed8259cfe3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 16:40:06 +0000 Subject: [PATCH 175/757] fix menuconfig developer options structure SVN-Revision: 3948 --- openwrt/toolchain/Config.in | 1 + openwrt/toolchain/gcc/Config.in | 23 +---------------------- openwrt/toolchain/gcc/Config.version | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 openwrt/toolchain/gcc/Config.version diff --git a/openwrt/toolchain/Config.in b/openwrt/toolchain/Config.in index 3f0d13fe9ce..5720beb8b0d 100644 --- a/openwrt/toolchain/Config.in +++ b/openwrt/toolchain/Config.in @@ -50,3 +50,4 @@ config TARGET_OPTIMIZATION help Optimizations to use when building for the target host. +source "toolchain/gcc/Config.version" diff --git a/openwrt/toolchain/gcc/Config.in b/openwrt/toolchain/gcc/Config.in index 49129073404..6c584db4052 100644 --- a/openwrt/toolchain/gcc/Config.in +++ b/openwrt/toolchain/gcc/Config.in @@ -1,14 +1,5 @@ # Choose gcc version. -if !TOOLCHAINOPTS - config GCC_VERSION_3_4_4 - default y if LINUX_2_4_BRCM - - config GCC_VERSION_4_0_3 - default y if LINUX_2_6_ARUBA - -endif - choice prompt "GCC compiler Version" if TOOLCHAINOPTS default GCC_VERSION_4_0_3 if LINUX_2_6_ARUBA @@ -41,19 +32,6 @@ choice endchoice -config GCC_VERSION - string - prompt "GCC compiler Version" if (TOOLCHAINOPTS && NULL) - default "3.4.4" if GCC_VERSION_3_4_4 - default "3.4.5" if GCC_VERSION_3_4_5 - default "3.4.6" if GCC_VERSION_3_4_6 - default "4.0.2" if GCC_VERSION_4_0_2 - default "4.0.3" if GCC_VERSION_4_0_3 - default "4.1.0" if GCC_VERSION_4_1_0 - default "4.1.1" if GCC_VERSION_4_1_1 - default "3.4.6" - - config EXTRA_GCC_CONFIG_OPTIONS string prompt "Additional gcc options" if TOOLCHAINOPTS @@ -68,3 +46,4 @@ config INSTALL_LIBSTDCPP help Build/install c++ compiler and libstdc++? + diff --git a/openwrt/toolchain/gcc/Config.version b/openwrt/toolchain/gcc/Config.version new file mode 100644 index 00000000000..80e26060521 --- /dev/null +++ b/openwrt/toolchain/gcc/Config.version @@ -0,0 +1,21 @@ +config GCC_VERSION + string + default "3.4.4" if GCC_VERSION_3_4_4 + default "3.4.5" if GCC_VERSION_3_4_5 + default "3.4.6" if GCC_VERSION_3_4_6 + default "4.0.2" if GCC_VERSION_4_0_2 + default "4.0.3" if GCC_VERSION_4_0_3 + default "4.1.0" if GCC_VERSION_4_1_0 + default "4.1.1" if GCC_VERSION_4_1_1 + default "3.4.6" + +if !TOOLCHAINOPTS + config GCC_VERSION_3_4_4 + default y if LINUX_2_4_BRCM + + config GCC_VERSION_4_0_3 + default y if LINUX_2_6_ARUBA + +endif + + From 5011ced3005436636c81a0e74d130d1994aa42a9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 16:41:35 +0000 Subject: [PATCH 176/757] fix dropbear depends and defaults SVN-Revision: 3949 --- openwrt/package/dropbear/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index 28cdd15f7cf..db79dd5c413 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -26,8 +26,8 @@ endef define Package/dropbearconvert $(call Package/dropbear) TITLE:=Utility for converting SSH keys +DEFAULT:=m if ALL DESCRIPTION:=Utility for converting SSH keys -DEPENDS:=+zlib endef define Build/Configure From 44f2725829d62af2a078d3f47d712e62c4f399ef Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 16:42:48 +0000 Subject: [PATCH 177/757] fix hostapd-mini dependencies SVN-Revision: 3950 --- openwrt/package/hostapd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile index 9c2ecea4304..1af252320c4 100644 --- a/openwrt/package/hostapd/Makefile +++ b/openwrt/package/hostapd/Makefile @@ -6,7 +6,7 @@ PKG_NAME:=hostapd PKG_VERSION:=0.5.3 PKG_RELEASE:=1 PKG_MD5SUM:=4e3134e8b0d86e831230f8c620fd81bb -PKG_BUILDDEP:=madwifi +PKG_BUILDDEP:=madwifi openssl PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -85,6 +85,7 @@ endef define Package/hostapd-mini $(call Package/hostapd) TITLE:=IEEE 802.1x Authenticator (WPA-PSK only) +DEPENDS:= DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (WPA-PSK only) endef From 6e5a58eb7b284defa202b8d281d97bef53dd029e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 17:21:17 +0000 Subject: [PATCH 178/757] clean up handling of the root filesystem mount - remove broadcom specific junk from the generic base-files part SVN-Revision: 3951 --- .../package/base-files/ar7-2.4/bin/firstboot | 89 ++++++++++++++++++ .../{default => ar7-2.4}/etc/preinit | 0 .../base-files/ar7-2.4/sbin/mount_root | 28 ++++++ .../{default => brcm-2.4}/bin/firstboot | 0 .../package/base-files/brcm-2.4/etc/preinit | 11 +++ .../base-files/brcm-2.4/sbin/mount_root | 38 ++++++++ .../package/base-files/brcm-2.6/bin/firstboot | 90 +++++++++++++++++++ .../package/base-files/brcm-2.6/etc/preinit | 11 +++ .../base-files/brcm-2.6/sbin/mount_root | 38 ++++++++ .../base-files/default/etc/init.d/S10boot | 1 + .../base-files/default/sbin/mount_root | 36 +------- openwrt/package/base-files/sibyte-2.6/init | 6 -- .../xscale-2.6/etc/init.d/S00xscale | 4 - openwrt/package/base-files/xscale-2.6/init | 3 - 14 files changed, 309 insertions(+), 46 deletions(-) create mode 100755 openwrt/package/base-files/ar7-2.4/bin/firstboot rename openwrt/package/base-files/{default => ar7-2.4}/etc/preinit (100%) create mode 100755 openwrt/package/base-files/ar7-2.4/sbin/mount_root rename openwrt/package/base-files/{default => brcm-2.4}/bin/firstboot (100%) create mode 100755 openwrt/package/base-files/brcm-2.4/etc/preinit create mode 100755 openwrt/package/base-files/brcm-2.4/sbin/mount_root create mode 100755 openwrt/package/base-files/brcm-2.6/bin/firstboot create mode 100755 openwrt/package/base-files/brcm-2.6/etc/preinit create mode 100755 openwrt/package/base-files/brcm-2.6/sbin/mount_root delete mode 100755 openwrt/package/base-files/sibyte-2.6/init delete mode 100755 openwrt/package/base-files/xscale-2.6/etc/init.d/S00xscale delete mode 100755 openwrt/package/base-files/xscale-2.6/init diff --git a/openwrt/package/base-files/ar7-2.4/bin/firstboot b/openwrt/package/base-files/ar7-2.4/bin/firstboot new file mode 100755 index 00000000000..955423be093 --- /dev/null +++ b/openwrt/package/base-files/ar7-2.4/bin/firstboot @@ -0,0 +1,89 @@ +#!/bin/sh +# $Id$ + +rom=$(awk '/squashfs/ {print $2}' /proc/mounts) +jffs=$(awk '/jffs2/ {print $2}' /proc/mounts) + +dupe() { # <new_root> <old_root> + cd $1 + echo -n "creating directories... " + { + cd $2 + find . -xdev -type d + echo "./dev ./jffs ./mnt ./proc ./tmp ./sys" + # xdev skips mounted directories + cd $1 + } | xargs mkdir -p + echo "done" + + echo -n "setting up symlinks... " + for file in $(cd $2; find . -xdev -type f;); do + case "$file" in + ./rom/note) ;; #nothing + ./etc/config*|\ + ./etc/resolv.conf|\ + ./usr/lib/ipkg/info) cp -af $2/$file $file;; + *) ln -sf /rom/${file#./*} $file;; + esac + done + for file in $(cd $2; find . -xdev -type l;); do + cp -af $2/${file#./*} $file + done + echo "done" +} + +pivot() { # <new_root> <old_root> + mount -o move /proc $1/proc && \ + pivot_root $1 $1$2 && { + mount -o move $2/dev /dev + mount -o move $2/tmp /tmp + mount -o move $2/sys /sys + return 0 + } +} + +mountdp() { # <device> <mount_point> <ignored> <fs> + dev=$1; mnt=$2; shift 2; opt=$* + mount $dev $mnt $opt + dupe $mnt $rom + pivot $mnt /rom +} + +ramoverlay() { + mkdir -p /tmp/root + mountdp /tmp/root /mnt -o bind +} + +[ "${0##*/}" = "firstboot" ] && { + [ -z "$rom" ] && { + echo "You do not have a squashfs partition; aborting" + echo "(firstboot cannot be run on jffs2 based firmwares)" + exit 1 + } + + [ "$1" = "switch2jffs" ] && { + mtd erase OpenWrt + mount -o remount,ro none / # try to avoid fs changing while copying + mount -o bind / /mnt + mount /dev/mtdblock/4 /rom/jffs -t jffs2 + echo -n "copying files ... " + cp -a /mnt/* /rom/jffs + umount /mnt + echo "done" + pivot /rom /mnt + mount -o move /mnt /tmp/root + pivot /jffs /rom + exit 0 + } + + # script run manually + [ \! -z "$jffs" ] && { + echo "firstboot has already been run" + echo "jffs2 partition is mounted, only resetting files" + dupe $jffs $rom + exit 0 + } + + mtd erase OpenWrt + mountdp /dev/mtdblock/4 /jffs -t jffs2 +} diff --git a/openwrt/package/base-files/default/etc/preinit b/openwrt/package/base-files/ar7-2.4/etc/preinit similarity index 100% rename from openwrt/package/base-files/default/etc/preinit rename to openwrt/package/base-files/ar7-2.4/etc/preinit diff --git a/openwrt/package/base-files/ar7-2.4/sbin/mount_root b/openwrt/package/base-files/ar7-2.4/sbin/mount_root new file mode 100755 index 00000000000..6b90bdc9ccc --- /dev/null +++ b/openwrt/package/base-files/ar7-2.4/sbin/mount_root @@ -0,0 +1,28 @@ +#!/bin/sh +size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) +mount none /tmp -t tmpfs -o size=$size + +if [ "$1" != "failsafe" ]; then + mtd unlock linux + mount | grep jffs2 >&- + if [ $? = 0 ] ; then + if [ $(cat /proc/mtd | wc -l) = 6 ]; then + mtd erase OpenWrt + else + mount -o remount,rw /dev/root / + fi + else + . /bin/firstboot + echo "switching to jffs2" + mount /dev/mtdblock/4 /jffs -t jffs2 + pivot /jffs /rom || { + echo "jffs2 unusable; using ramdisk" + ramoverlay + } + fi +fi + +mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 +mkdir -p /dev/pts +mount none /dev/pts -t devpts +mount -t sysfs none /sys 2>&- diff --git a/openwrt/package/base-files/default/bin/firstboot b/openwrt/package/base-files/brcm-2.4/bin/firstboot similarity index 100% rename from openwrt/package/base-files/default/bin/firstboot rename to openwrt/package/base-files/brcm-2.4/bin/firstboot diff --git a/openwrt/package/base-files/brcm-2.4/etc/preinit b/openwrt/package/base-files/brcm-2.4/etc/preinit new file mode 100755 index 00000000000..5b676ca3acf --- /dev/null +++ b/openwrt/package/base-files/brcm-2.4/etc/preinit @@ -0,0 +1,11 @@ +#!/bin/sh +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +mount none /proc -t proc + +[ -f /etc/preinit.arch ] && . /etc/preinit.arch +[ -z "$FAILSAFE" ] || { + echo /bin/true > /proc/sys/kernel/hotplug + telnetd -l /bin/login <> /dev/null 2>&1 +} +mount_root ${FAILSAFE:+failsafe} +exec /sbin/init diff --git a/openwrt/package/base-files/brcm-2.4/sbin/mount_root b/openwrt/package/base-files/brcm-2.4/sbin/mount_root new file mode 100755 index 00000000000..88a836c808f --- /dev/null +++ b/openwrt/package/base-files/brcm-2.4/sbin/mount_root @@ -0,0 +1,38 @@ +#!/bin/sh +is_dirty() { + grep Broadcom /proc/cpuinfo >&- || return 1 + OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))" + return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"') +} + +size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) +mount none /tmp -t tmpfs -o size=$size + +if [ "$1" != "failsafe" ]; then + mtd unlock linux + mount | grep jffs2 >&- + if [ $? = 0 ] ; then + if [ $(cat /proc/mtd | wc -l) = 6 ]; then + mtd erase OpenWrt + jffs2root --move + else + mount -o remount,rw /dev/root / + fi + else + . /bin/firstboot + is_dirty + [ $? != 0 ] && { + echo "switching to jffs2" + mount /dev/mtdblock/4 /jffs -t jffs2 + pivot /jffs /rom + } || { + echo "jffs2 unusable; using ramdisk" + ramoverlay + } + fi +fi + +mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 +mkdir -p /dev/pts +mount none /dev/pts -t devpts +mount -t sysfs none /sys 2>&- diff --git a/openwrt/package/base-files/brcm-2.6/bin/firstboot b/openwrt/package/base-files/brcm-2.6/bin/firstboot new file mode 100755 index 00000000000..28189780bd2 --- /dev/null +++ b/openwrt/package/base-files/brcm-2.6/bin/firstboot @@ -0,0 +1,90 @@ +#!/bin/sh +# $Id$ + +rom=$(awk '/squashfs/ {print $2}' /proc/mounts) +jffs=$(awk '/jffs2/ {print $2}' /proc/mounts) + +dupe() { # <new_root> <old_root> + cd $1 + echo -n "creating directories... " + { + cd $2 + find . -xdev -type d + echo "./dev ./jffs ./mnt ./proc ./tmp ./sys" + # xdev skips mounted directories + cd $1 + } | xargs mkdir -p + echo "done" + + echo -n "setting up symlinks... " + for file in $(cd $2; find . -xdev -type f;); do + case "$file" in + ./rom/note) ;; #nothing + ./etc/config*|\ + ./etc/resolv.conf|\ + ./usr/lib/ipkg/info) cp -af $2/$file $file;; + *) ln -sf /rom/${file#./*} $file;; + esac + done + for file in $(cd $2; find . -xdev -type l;); do + cp -af $2/${file#./*} $file + done + echo "done" +} + +pivot() { # <new_root> <old_root> + mount -o move /proc $1/proc && \ + pivot_root $1 $1$2 && { + mount -o move $2/dev /dev + mount -o move $2/tmp /tmp + mount -o move $2/sys /sys + return 0 + } +} + +mountdp() { # <device> <mount_point> <ignored> <fs> + dev=$1; mnt=$2; shift 2; opt=$* + mount $dev $mnt $opt + dupe $mnt $rom + pivot $mnt /rom +} + +ramoverlay() { + mkdir -p /tmp/root + mountdp /tmp/root /mnt -o bind +} + +[ "${0##*/}" = "firstboot" ] && { + [ -z "$rom" ] && { + echo "You do not have a squashfs partition; aborting" + echo "(firstboot cannot be run on jffs2 based firmwares)" + exit 1 + } + + [ "$1" = "switch2jffs" ] && { + mtd erase OpenWrt + mount -o remount,ro none / # try to avoid fs changing while copying + mount -o bind / /mnt + mount /dev/mtdblock/4 /rom/jffs -t jffs2 + echo -n "copying files ... " + cp -a /mnt/* /rom/jffs + umount /mnt + echo "done" + pivot /rom /mnt + mount -o move /mnt /tmp/root + pivot /jffs /rom + jffs2root --clean + exit 0 + } + + # script run manually + [ \! -z "$jffs" ] && { + echo "firstboot has already been run" + echo "jffs2 partition is mounted, only resetting files" + dupe $jffs $rom + exit 0 + } + + mtd erase OpenWrt + mountdp /dev/mtdblock/4 /jffs -t jffs2 +} diff --git a/openwrt/package/base-files/brcm-2.6/etc/preinit b/openwrt/package/base-files/brcm-2.6/etc/preinit new file mode 100755 index 00000000000..5b676ca3acf --- /dev/null +++ b/openwrt/package/base-files/brcm-2.6/etc/preinit @@ -0,0 +1,11 @@ +#!/bin/sh +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +mount none /proc -t proc + +[ -f /etc/preinit.arch ] && . /etc/preinit.arch +[ -z "$FAILSAFE" ] || { + echo /bin/true > /proc/sys/kernel/hotplug + telnetd -l /bin/login <> /dev/null 2>&1 +} +mount_root ${FAILSAFE:+failsafe} +exec /sbin/init diff --git a/openwrt/package/base-files/brcm-2.6/sbin/mount_root b/openwrt/package/base-files/brcm-2.6/sbin/mount_root new file mode 100755 index 00000000000..88a836c808f --- /dev/null +++ b/openwrt/package/base-files/brcm-2.6/sbin/mount_root @@ -0,0 +1,38 @@ +#!/bin/sh +is_dirty() { + grep Broadcom /proc/cpuinfo >&- || return 1 + OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))" + return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"') +} + +size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) +mount none /tmp -t tmpfs -o size=$size + +if [ "$1" != "failsafe" ]; then + mtd unlock linux + mount | grep jffs2 >&- + if [ $? = 0 ] ; then + if [ $(cat /proc/mtd | wc -l) = 6 ]; then + mtd erase OpenWrt + jffs2root --move + else + mount -o remount,rw /dev/root / + fi + else + . /bin/firstboot + is_dirty + [ $? != 0 ] && { + echo "switching to jffs2" + mount /dev/mtdblock/4 /jffs -t jffs2 + pivot /jffs /rom + } || { + echo "jffs2 unusable; using ramdisk" + ramoverlay + } + fi +fi + +mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 +mkdir -p /dev/pts +mount none /dev/pts -t devpts +mount -t sysfs none /sys 2>&- diff --git a/openwrt/package/base-files/default/etc/init.d/S10boot b/openwrt/package/base-files/default/etc/init.d/S10boot index 42bb4388615..e0d15db0e06 100755 --- a/openwrt/package/base-files/default/etc/init.d/S10boot +++ b/openwrt/package/base-files/default/etc/init.d/S10boot @@ -1,6 +1,7 @@ #!/bin/sh . /etc/functions.sh +[ -f /proc/mounts ] || /sbin/mount_root [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc vconfig set_name_type VLAN_PLUS_VID_NO_PAD diff --git a/openwrt/package/base-files/default/sbin/mount_root b/openwrt/package/base-files/default/sbin/mount_root index 88a836c808f..6c8805c0805 100755 --- a/openwrt/package/base-files/default/sbin/mount_root +++ b/openwrt/package/base-files/default/sbin/mount_root @@ -1,38 +1,8 @@ #!/bin/sh -is_dirty() { - grep Broadcom /proc/cpuinfo >&- || return 1 - OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))" - return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"') -} - size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) -mount none /tmp -t tmpfs -o size=$size - -if [ "$1" != "failsafe" ]; then - mtd unlock linux - mount | grep jffs2 >&- - if [ $? = 0 ] ; then - if [ $(cat /proc/mtd | wc -l) = 6 ]; then - mtd erase OpenWrt - jffs2root --move - else - mount -o remount,rw /dev/root / - fi - else - . /bin/firstboot - is_dirty - [ $? != 0 ] && { - echo "switching to jffs2" - mount /dev/mtdblock/4 /jffs -t jffs2 - pivot /jffs /rom - } || { - echo "jffs2 unusable; using ramdisk" - ramoverlay - } - fi -fi - -mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 +mount none /proc -t proc +mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777 mkdir -p /dev/pts mount none /dev/pts -t devpts mount -t sysfs none /sys 2>&- +mount -o remount,rw /dev/root / diff --git a/openwrt/package/base-files/sibyte-2.6/init b/openwrt/package/base-files/sibyte-2.6/init deleted file mode 100755 index 1f98589eb60..00000000000 --- a/openwrt/package/base-files/sibyte-2.6/init +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/ash -mount none /dev -t devfs -mount none /proc -t proc -mount_root failsafe -mount -o remount,rw /dev/root / -exec /bin/busybox init diff --git a/openwrt/package/base-files/xscale-2.6/etc/init.d/S00xscale b/openwrt/package/base-files/xscale-2.6/etc/init.d/S00xscale deleted file mode 100755 index 9836de423b7..00000000000 --- a/openwrt/package/base-files/xscale-2.6/etc/init.d/S00xscale +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -mount none /proc -t proc -mount_root failsafe -mount -o remount,rw /dev/root / diff --git a/openwrt/package/base-files/xscale-2.6/init b/openwrt/package/base-files/xscale-2.6/init deleted file mode 100755 index 8ca48a04c1c..00000000000 --- a/openwrt/package/base-files/xscale-2.6/init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/ash -mount none /dev -t devfs -exec /bin/busybox init From d388e21a35df7f4b2121609a04fa7b557ab1fcfe Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 17:22:17 +0000 Subject: [PATCH 179/757] remove old junk SVN-Revision: 3952 --- openwrt/target/linux/generic-2.6/files/init.d/S00initramfs | 4 ---- openwrt/target/linux/kernel.mk | 1 - 2 files changed, 5 deletions(-) delete mode 100755 openwrt/target/linux/generic-2.6/files/init.d/S00initramfs diff --git a/openwrt/target/linux/generic-2.6/files/init.d/S00initramfs b/openwrt/target/linux/generic-2.6/files/init.d/S00initramfs deleted file mode 100755 index 9836de423b7..00000000000 --- a/openwrt/target/linux/generic-2.6/files/init.d/S00initramfs +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -mount none /proc -t proc -mount_root failsafe -mount -o remount,rw /dev/root / diff --git a/openwrt/target/linux/kernel.mk b/openwrt/target/linux/kernel.mk index b54fbd5972c..cd74fccfb8a 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/target/linux/kernel.mk @@ -52,7 +52,6 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config mkdir -p $(BUILD_DIR)/root/etc/init.d $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ - $(CP) ../generic-2.6/files/init.d/S00initramfs $(BUILD_DIR)/root/etc/init.d/ else rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config From f0edabcc4e96faf8509f86c7cce626aee90c7daf Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 18:26:49 +0000 Subject: [PATCH 180/757] remove global hostapd builddep on openssl SVN-Revision: 3953 --- openwrt/package/hostapd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile index 1af252320c4..f4a6145213a 100644 --- a/openwrt/package/hostapd/Makefile +++ b/openwrt/package/hostapd/Makefile @@ -6,7 +6,7 @@ PKG_NAME:=hostapd PKG_VERSION:=0.5.3 PKG_RELEASE:=1 PKG_MD5SUM:=4e3134e8b0d86e831230f8c620fd81bb -PKG_BUILDDEP:=madwifi openssl +PKG_BUILDDEP:=madwifi PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz From 0eb990ad6342e438dbb92cc34be2b8363e0c4e8d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 18:32:53 +0000 Subject: [PATCH 181/757] add openssl depend on zlib SVN-Revision: 3954 --- openwrt/package/openssl/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile index 1b7ead87ee1..45b248fbf3f 100644 --- a/openwrt/package/openssl/Makefile +++ b/openwrt/package/openssl/Makefile @@ -78,6 +78,7 @@ define Package/libopenssl SECTION:=base CATEGORY:=Libraries TITLE:=Open source SSL libraries + DEPENDS:=+zlib DESCRIPTION:=Open source SSL (Secure Socket Layer) libraries URL:=http://www.openssl.org/ endef From 726e4fbdded4846bca1e2a95d8ed006b0efe654d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 15 Jun 2006 21:43:59 +0000 Subject: [PATCH 182/757] add rb532 support SVN-Revision: 3956 --- openwrt/target/Config.in | 6 + openwrt/target/linux/Makefile | 1 + openwrt/target/linux/image/rb532/Makefile | 50 + openwrt/target/linux/rb532-2.6/Makefile | 18 + openwrt/target/linux/rb532-2.6/config | 1518 +++++ .../rb532-2.6/patches/100-rb5xx_support.patch | 5679 +++++++++++++++++ .../patches/110-korina_ethernet.patch | 1375 ++++ .../linux/rb532-2.6/patches/120-cf.patch | 990 +++ .../patches/130-custom_partitions.patch | 308 + .../patches/140-jffs2_eofdetect.patch | 48 + .../patches/200-bridge_resource_hack.patch | 13 + .../rb532-2.6/patches/210-pci_fixes.patch | 46 + .../rb532-2.6/patches/220-serial_fix.patch | 18 + .../rb532-2.6/patches/230-dma_limit.patch | 13 + .../rb532-2.6/patches/240-via_hack.patch | 13 + 15 files changed, 10096 insertions(+) create mode 100644 openwrt/target/linux/image/rb532/Makefile create mode 100644 openwrt/target/linux/rb532-2.6/Makefile create mode 100644 openwrt/target/linux/rb532-2.6/config create mode 100644 openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/110-korina_ethernet.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/120-cf.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/130-custom_partitions.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/140-jffs2_eofdetect.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/200-bridge_resource_hack.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/210-pci_fixes.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/220-serial_fix.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/230-dma_limit.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/240-via_hack.patch diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index aad5f9940f3..47e62d41e62 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -43,6 +43,12 @@ config LINUX_2_6_BRCM Build firmware images for Broadcom based routers (e.g. Netgear WGT634u) +config LINUX_2_6_RB532 + bool "Mikrotik RB532 [2.6]" + select mipsel + select LINUX_2_6 + select PCI_SUPPORT + config LINUX_2_4_AR7 bool "TI AR7 [2.4]" select mipsel diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index af3e3bd26f0..c08bb4c89c0 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -14,6 +14,7 @@ $(eval $(call kernel_template,2.4,brcm,2_4_BRCM)) $(eval $(call kernel_template,2.4,ar7,2_4_AR7)) $(eval $(call kernel_template,2.4,x86,2_4_X86)) $(eval $(call kernel_template,2.6,brcm,2_6_BRCM)) +$(eval $(call kernel_template,2.6,rb532,2_6_RB532)) $(eval $(call kernel_template,2.6,x86,2_6_X86)) $(eval $(call kernel_template,2.4,ar531x,2_4_AR531X)) $(eval $(call kernel_template,2.6,aruba,2_6_ARUBA)) diff --git a/openwrt/target/linux/image/rb532/Makefile b/openwrt/target/linux/image/rb532/Makefile new file mode 100644 index 00000000000..ed419c8c6d0 --- /dev/null +++ b/openwrt/target/linux/image/rb532/Makefile @@ -0,0 +1,50 @@ +include ../image.mk + +LOADADDR = 0x81000000 # RAM start + 16M +KERNEL_ENTRY = 0x80101000 +RAMSIZE = 0x00100000 # 1MB +IMAGE_COPY = 1 + +LOADER_MAKEOPTS= \ + KDIR=$(KDIR) \ + LOADADDR=$(LOADADDR) \ + KERNEL_ENTRY=$(KERNEL_ENTRY) \ + RAMSIZE=$(RAMSIZE) \ + IMAGE_COPY=$(IMAGE_COPY) + +define Build/Clean + $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean +endef + +define Image/Prepare + cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma + $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean compile +endef + +define Image/BuildKernel + $(CP) $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux +endef + +PARTITION1=\x80\x01\x01\x00\x27\x01\x20\x7b\x20\x00\x00\x00\xe0\x1e\x00\x00# 4 MB (kernel part) +PARTITION2=\x00\x00\x01\x7c\x83\x01\xa0\x64\x00\x1f\x00\x00\x40\x7a\x00\x00# 16 MB (rootfs part) + +define Image/Build/jffs2-128k + ( \ + echo -ne OWRT | dd bs=$$$$((0x1be)) conv=sync; \ + ( \ + echo -ne '$(strip $(PARTITION1))'; \ + echo -ne '$(strip $(PARTITION2))'; \ + ) | dd bs=$$$$((0x40)) conv=sync; \ + echo -ne '\x55\xaa'; \ + dd if=/dev/zero bs=$$$$((0x3e00)) conv=sync count=1; \ + dd if=$(KDIR)/loader.elf bs=$$$$((0x3dc000)) conv=sync; \ + cat $(KDIR)/root.$(1); \ + echo -ne '\xde\xad\xc0\xde'; \ + ) > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).bin +endef + +define Image/Build + $(call Image/Build/$(1),$(1)) +endef + +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/rb532-2.6/Makefile b/openwrt/target/linux/rb532-2.6/Makefile new file mode 100644 index 00000000000..23ecfe32b0c --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/Makefile @@ -0,0 +1,18 @@ +include $(TOPDIR)/rules.mk + +LINUX_VERSION:=2.6.16.19 +LINUX_RELEASE:=1 +LINUX_KERNEL_MD5SUM:=b1e3c65992b0049fdbee825eb2a856af + +include ../rules.mk +include ./config + +include ../generic-$(KERNEL)/modules.mk +include ../kernel.mk + +$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches + @$(CP) config $(LINUX_DIR)/.config + touch $@ + diff --git a/openwrt/target/linux/rb532-2.6/config b/openwrt/target/linux/rb532-2.6/config new file mode 100644 index 00000000000..7ff1f4a1308 --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/config @@ -0,0 +1,1518 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.16.19 +# Thu Jun 15 19:40:52 2006 +# +CONFIG_MIPS=y + +# +# Machine selection +# +# CONFIG_MIPS_MTX1 is not set +# CONFIG_MIPS_BOSPORUS is not set +# CONFIG_MIPS_PB1000 is not set +# CONFIG_MIPS_PB1100 is not set +# CONFIG_MIPS_PB1500 is not set +# CONFIG_MIPS_PB1550 is not set +# CONFIG_MIPS_PB1200 is not set +# CONFIG_MIPS_DB1000 is not set +# CONFIG_MIPS_DB1100 is not set +# CONFIG_MIPS_DB1500 is not set +# CONFIG_MIPS_DB1550 is not set +# CONFIG_MIPS_DB1200 is not set +# CONFIG_MIPS_MIRAGE is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MIPS_EV64120 is not set +# CONFIG_MIPS_EV96100 is not set +# CONFIG_MIPS_IVR is not set +# CONFIG_MIPS_ITE8172 is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_LASAT is not set +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_MOMENCO_JAGUAR_ATX is not set +# CONFIG_MOMENCO_OCELOT is not set +# CONFIG_MOMENCO_OCELOT_3 is not set +# CONFIG_MOMENCO_OCELOT_C is not set +# CONFIG_MOMENCO_OCELOT_G is not set +# CONFIG_MIPS_XXS1500 is not set +# CONFIG_PNX8550_V2PCI is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set +# CONFIG_DDB5477 is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_QEMU is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SIBYTE_SWARM is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_PTSWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SNI_RM200_PCI is not set +# CONFIG_TOSHIBA_JMR3927 is not set +CONFIG_MIKROTIK_RB500=y +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_DMA_NONCOHERENT=y +CONFIG_DMA_NEED_PCI_MAP_STATE=y +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_IRQ_CPU=y +CONFIG_SWAP_IO_SPACE=y +CONFIG_MIPS_L1_CACHE_SHIFT=4 + +# +# CPU selection +# +CONFIG_CPU_MIPS32_R1=y +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +# CONFIG_CPU_SB1 is not set +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y + +# +# Kernel type +# +CONFIG_32BIT=y +# CONFIG_64BIT is not set +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +CONFIG_CPU_HAS_PREFETCH=y +# CONFIG_MIPS_MT is not set +# CONFIG_64BIT_PHYS_ADDR is not set +# CONFIG_CPU_ADVANCED is not set +CONFIG_CPU_HAS_LLSC=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +CONFIG_SLAB=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set + +# +# Block layer +# +# CONFIG_LBD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +CONFIG_HW_HAS_PCI=y +CONFIG_PCI=y +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_MMU=y + +# +# PCCARD (PCMCIA/CardBus) support +# +CONFIG_PCCARD=m +# CONFIG_PCMCIA_DEBUG is not set +CONFIG_PCMCIA=m +# CONFIG_PCMCIA_LOAD_CIS is not set +# CONFIG_PCMCIA_IOCTL is not set +CONFIG_CARDBUS=y + +# +# PC-card bridges +# +# CONFIG_YENTA is not set +# CONFIG_PD6729 is not set +# CONFIG_I82092 is not set + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_TRAD_SIGNALS=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set +# CONFIG_IP_ROUTE_VERBOSE is not set +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y + +# +# TCP congestion control +# +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_SCALABLE=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_IPV6_TUNNEL is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_BRIDGE_NETFILTER is not set + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_STATE=y +# CONFIG_NETFILTER_XT_MATCH_STRING is not set +CONFIG_NETFILTER_XT_MATCH_TCPMSS=y + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_IRC=y +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_SIP=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +# CONFIG_IP_NF_MATCH_POLICY is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_IMQ=m +# CONFIG_IP_NF_TARGET_LOG is not set +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_REDIRECT=y +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_IRC=y +CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_TARGET_SET=m + +# +# IPv6: Netfilter Configuration (EXPERIMENTAL) +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_HL is not set +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +# CONFIG_IP6_NF_MATCH_AHESP is not set +CONFIG_IP6_NF_MATCH_EUI64=m +# CONFIG_IP6_NF_MATCH_POLICY is not set +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_IMQ=m +# CONFIG_IP6_NF_TARGET_LOG is not set +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +# CONFIG_IP6_NF_TARGET_HL is not set +# CONFIG_IP6_NF_RAW is not set + +# +# Bridge: Netfilter Configuration +# +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=y +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +# CONFIG_NET_SCH_NETEM is not set +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_CLS_U32_MARK is not set +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_ESTIMATOR=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_HAMRADIO=y + +# +# Packet Radio protocols +# +CONFIG_AX25=m +# CONFIG_AX25_DAMA_SLAVE is not set +# CONFIG_NETROM is not set +# CONFIG_ROSE is not set + +# +# AX.25 network device drivers +# +CONFIG_MKISS=m +# CONFIG_6PACK is not set +# CONFIG_BPQETHER is not set +# CONFIG_BAYCOM_SER_FDX is not set +# CONFIG_BAYCOM_SER_HDX is not set +# CONFIG_YAM is not set +# CONFIG_IRDA is not set +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +# CONFIG_BT_HCIDTL1 is not set +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBLUECARD is not set +# CONFIG_BT_HCIBTUART is not set +# CONFIG_BT_HCIVHCI is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +CONFIG_MTD_BLOCK2MTD=y + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_BLK_DEV_CF_MIPS=y + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# PCMCIA SCSI adapter support +# +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_SYM53C500 is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 +CONFIG_TUN=m + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# +# CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_KORINA=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_DM9000 is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +CONFIG_VIA_RHINE=y +CONFIG_VIA_RHINE_MMIO=y +# CONFIG_LAN_SAA9730 is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set +# CONFIG_PCMCIA_WAVELAN is not set +# CONFIG_PCMCIA_NETWAVE is not set + +# +# Wireless 802.11 Frequency Hopping cards support +# +# CONFIG_PCMCIA_RAYCS is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set +# CONFIG_HERMES is not set +# CONFIG_ATMEL is not set + +# +# Wireless 802.11b Pcmcia/Cardbus cards support +# +# CONFIG_AIRO_CS is not set +# CONFIG_PCMCIA_WL3501 is not set + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +# CONFIG_PRISM54 is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +# CONFIG_HOSTAP_PLX is not set +# CONFIG_HOSTAP_PCI is not set +CONFIG_HOSTAP_CS=m +CONFIG_NET_WIRELESS=y + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# ATM drivers +# +CONFIG_ATM_DUMMY=m +CONFIG_ATM_TCP=m +# CONFIG_ATM_LANAI is not set +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_ZATM is not set +# CONFIG_ATM_NICSTAR is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_AMBASSADOR is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_PPPOATM=m +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=m + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_CS=m +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multimedia Capabilities Port drivers +# + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=m + +# +# Video For Linux +# + +# +# Video Adapters +# +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_MXB is not set +# CONFIG_VIDEO_DPC is not set +# CONFIG_VIDEO_HEXIUM_ORION is not set +# CONFIG_VIDEO_HEXIUM_GEMINI is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RADIO_MAESTRO is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=m +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# PCI devices +# +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_CS4281 is not set +# CONFIG_SND_CS46XX is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_HDA_INTEL is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_YMFPCI is not set + +# +# ALSA MIPS devices +# + +# +# PCMCIA devices +# + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# + +# +# File systems +# +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=m +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_XFS_FS=m +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_RT is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=m +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +# CONFIG_QUOTA is not set +# CONFIG_DNOTIFY is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_PROC_KCORE is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_SUMMARY is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +CONFIG_OPENWRT_PARTITION=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=m +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CROSSCOMPILE=y +CONFIG_CMDLINE="root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200" + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff --git a/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch b/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch new file mode 100644 index 00000000000..5886a75e31a --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch @@ -0,0 +1,5679 @@ +diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig +--- linux.old/arch/mips/Kconfig 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/arch/mips/Kconfig 2006-06-15 16:26:53.000000000 +0200 +@@ -739,6 +739,19 @@ + select SYS_SUPPORTS_BIG_ENDIAN + select TOSHIBA_BOARDS + ++config MIKROTIK_RB500 ++ bool "Support for RB5xx boards" ++ select HW_HAS_PCI ++ select IRQ_CPU ++ select SYS_HAS_CPU_MIPS32_R1 ++ select SYS_SUPPORTS_LITTLE_ENDIAN ++ select SYS_SUPPORTS_32BIT_KERNEL ++ select SWAP_IO_SPACE ++ select DMA_NONCOHERENT ++ help ++ Support the Mikrotik(tm) Routerboard 500 series, ++ such as the RB532. ++ + config TOSHIBA_RBTX4927 + bool "Support for Toshiba TBTX49[23]7 board" + select DMA_NONCOHERENT +@@ -1012,7 +1025,7 @@ + + config MIPS_L1_CACHE_SHIFT + int +- default "4" if MACH_DECSTATION ++ default "4" if MACH_DECSTATION || MIKROTIK_RB500 + default "7" if SGI_IP27 + default "5" + +diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile +--- linux.old/arch/mips/Makefile 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/arch/mips/Makefile 2006-06-15 16:26:53.000000000 +0200 +@@ -725,6 +725,13 @@ + load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000 + + # ++# Routerboard 532 board ++# ++core-$(CONFIG_MIKROTIK_RB500) += arch/mips/rb500/ ++cflags-$(CONFIG_MIKROTIK_RB500) += -Iinclude/asm-mips/rc32434 ++load-$(CONFIG_MIKROTIK_RB500) += 0xffffffff80101000 ++ ++# + # Toshiba RBTX4927 board or + # Toshiba RBTX4937 board + # +diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c +--- linux.old/arch/mips/mm/tlbex.c 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/arch/mips/mm/tlbex.c 2006-06-15 16:26:53.000000000 +0200 +@@ -852,7 +852,6 @@ + + case CPU_R10000: + case CPU_R12000: +- case CPU_4KC: + case CPU_SB1: + case CPU_SB1A: + case CPU_4KSC: +@@ -880,6 +879,7 @@ + tlbw(p); + break; + ++ case CPU_4KC: + case CPU_4KEC: + case CPU_24K: + case CPU_34K: +diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb500.c +--- linux.old/arch/mips/pci/fixup-rb500.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/fixup-rb500.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,49 @@ ++/* ++ * Copyright 2001 MontaVista Software Inc. ++ * Author: MontaVista Software, Inc. ++ * stevel@mvista.com or source@mvista.com ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#include <linux/config.h> ++#include <linux/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++ ++#include <asm/rc32434/rc32434.h> ++ ++static int __devinitdata irq_map[2][12] = { ++ { 0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1 }, ++ { 0, 0, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3 } ++}; ++ ++int __devinit pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ++{ ++ int irq = 0; ++ ++ if (dev->bus->number < 2 && PCI_SLOT(dev->devfn) < 12) { ++ irq = irq_map[dev->bus->number][PCI_SLOT(dev->devfn)]; ++ } ++ return irq + GROUP4_IRQ_BASE + 4; ++} ++ +diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile +--- linux.old/arch/mips/pci/Makefile 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/arch/mips/pci/Makefile 2006-06-15 16:26:53.000000000 +0200 +@@ -57,3 +57,4 @@ + obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup-tx4938.o ops-tx4938.o + obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o + obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o ++obj-$(CONFIG_MIKROTIK_RB500) += pci-rc32434.o ops-rc32434.o fixup-rb500.o +diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32434.c +--- linux.old/arch/mips/pci/ops-rc32434.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/ops-rc32434.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,195 @@ ++/************************************************************************** ++ * ++ * BRIEF MODULE DESCRIPTION ++ * pci_ops for IDT EB434 board ++ * ++ * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ ************************************************************************** ++ * May 2004 rkt, neb ++ * ++ * Initial Release ++ * ++ * ++ * ++ ************************************************************************** ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/pci.h> ++#include <linux/types.h> ++#include <linux/delay.h> ++ ++#include <asm/cpu.h> ++#include <asm/io.h> ++ ++#include <asm/rc32434/rc32434.h> ++#include <asm/rc32434/pci.h> ++ ++#define PCI_ACCESS_READ 0 ++#define PCI_ACCESS_WRITE 1 ++ ++ ++#define PCI_CFG_SET(bus,slot,func,off) \ ++ (rc32434_pci->pcicfga = (0x80000000 | \ ++ ((bus) << 16) | ((slot)<<11) | \ ++ ((func)<<8) | (off))) ++ ++static inline int config_access(unsigned char access_type, struct pci_bus *bus, ++ unsigned int devfn, unsigned char where, ++ u32 * data) ++{ ++ unsigned int slot = PCI_SLOT(devfn); ++ u8 func = PCI_FUNC(devfn); ++ ++ /* Setup address */ ++ PCI_CFG_SET(bus->number, slot, func, where); ++ rc32434_sync(); ++ ++ if (access_type == PCI_ACCESS_WRITE) ++ rc32434_pci->pcicfgd = *data; ++ else ++ *data = rc32434_pci->pcicfgd; ++ ++ rc32434_sync(); ++ ++ return 0; ++} ++ ++ ++/* ++ * We can't address 8 and 16 bit words directly. Instead we have to ++ * read/write a 32bit word and mask/modify the data we actually want. ++ */ ++static int read_config_byte(struct pci_bus *bus, unsigned int devfn, ++ int where, u8 * val) ++{ ++ u32 data; ++ int ret; ++ ++ ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); ++ *val = (data >> ((where & 3) << 3)) & 0xff; ++ return ret; ++} ++ ++static int read_config_word(struct pci_bus *bus, unsigned int devfn, ++ int where, u16 * val) ++{ ++ u32 data; ++ int ret; ++ ++ ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); ++ *val = (data >> ((where & 3) << 3)) & 0xffff; ++ return ret; ++} ++ ++static int read_config_dword(struct pci_bus *bus, unsigned int devfn, ++ int where, u32 * val) ++{ ++ int ret; ++ ++ ret = config_access(PCI_ACCESS_READ, bus, devfn, where, val); ++ return ret; ++} ++ ++static int ++write_config_byte(struct pci_bus *bus, unsigned int devfn, int where, ++ u8 val) ++{ ++ u32 data = 0; ++ ++ if (config_access(PCI_ACCESS_READ, bus, devfn, where, &data)) ++ return -1; ++ ++ data = (data & ~(0xff << ((where & 3) << 3))) | ++ (val << ((where & 3) << 3)); ++ ++ if (config_access(PCI_ACCESS_WRITE, bus, devfn, where, &data)) ++ return -1; ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++ ++static int ++write_config_word(struct pci_bus *bus, unsigned int devfn, int where, ++ u16 val) ++{ ++ u32 data = 0; ++ ++ if (config_access(PCI_ACCESS_READ, bus, devfn, where, &data)) ++ return -1; ++ ++ data = (data & ~(0xffff << ((where & 3) << 3))) | ++ (val << ((where & 3) << 3)); ++ ++ if (config_access(PCI_ACCESS_WRITE, bus, devfn, where, &data)) ++ return -1; ++ ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++ ++static int ++write_config_dword(struct pci_bus *bus, unsigned int devfn, int where, ++ u32 val) ++{ ++ if (config_access(PCI_ACCESS_WRITE, bus, devfn, where, &val)) ++ return -1; ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++static int pci_config_read(struct pci_bus *bus, unsigned int devfn, ++ int where, int size, u32 * val) ++{ ++ switch (size) { ++ case 1: ++ return read_config_byte(bus, devfn, where, (u8 *) val); ++ case 2: ++ return read_config_word(bus, devfn, where, (u16 *) val); ++ default: ++ return read_config_dword(bus, devfn, where, val); ++ } ++} ++ ++static int pci_config_write(struct pci_bus *bus, unsigned int devfn, ++ int where, int size, u32 val) ++{ ++ switch (size) { ++ case 1: ++ return write_config_byte(bus, devfn, where, (u8) val); ++ case 2: ++ return write_config_word(bus, devfn, where, (u16) val); ++ default: ++ return write_config_dword(bus, devfn, where, val); ++ } ++} ++ ++struct pci_ops rc32434_pci_ops = { ++ .read = pci_config_read, ++ .write = pci_config_write, ++}; +diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32434.c +--- linux.old/arch/mips/pci/pci-rc32434.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/pci-rc32434.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,234 @@ ++/************************************************************************** ++ * ++ * BRIEF MODULE DESCRIPTION ++ * PCI initialization for IDT EB434 board ++ * ++ * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ ************************************************************************** ++ * May 2004 rkt, neb ++ * ++ * Initial Release ++ * ++ * ++ * ++ ************************************************************************** ++ */ ++ ++#include <linux/config.h> ++#include <linux/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++ ++#include <asm/rc32434/rc32434.h> ++#include <asm/rc32434/pci.h> ++ ++#define PCI_ACCESS_READ 0 ++#define PCI_ACCESS_WRITE 1 ++ ++/* define an unsigned array for the PCI registers */ ++unsigned int korinaCnfgRegs[25] = { ++ KORINA_CNFG1, KORINA_CNFG2, KORINA_CNFG3, KORINA_CNFG4, ++ KORINA_CNFG5, KORINA_CNFG6, KORINA_CNFG7, KORINA_CNFG8, ++ KORINA_CNFG9, KORINA_CNFG10, KORINA_CNFG11, KORINA_CNFG12, ++ KORINA_CNFG13, KORINA_CNFG14, KORINA_CNFG15, KORINA_CNFG16, ++ KORINA_CNFG17, KORINA_CNFG18, KORINA_CNFG19, KORINA_CNFG20, ++ KORINA_CNFG21, KORINA_CNFG22, KORINA_CNFG23, KORINA_CNFG24 ++}; ++static struct resource rc32434_res_pci_mem1; ++static struct resource rc32434_res_pci_mem2; ++ ++static struct resource rc32434_res_pci_mem1 = { ++ .name = "PCI MEM1", ++ .start = 0x50000000, ++ .end = 0x5FFFFFFF, ++ .flags = IORESOURCE_MEM, ++ .parent = &rc32434_res_pci_mem1, ++ .sibling = NULL, ++ .child = &rc32434_res_pci_mem2 ++}; ++ ++static struct resource rc32434_res_pci_mem2 = { ++ .name = "PCI Mem2", ++ .start = 0x60000000, ++ .end = 0x6FFFFFFF, ++ .flags = IORESOURCE_MEM, ++ .parent = &rc32434_res_pci_mem1, ++ .sibling = NULL, ++ .child = NULL ++}; ++ ++static struct resource rc32434_res_pci_io1 = { ++ .name = "PCI I/O1", ++ .start = 0x18800000, ++ .end = 0x188FFFFF, ++ .flags = IORESOURCE_IO, ++}; ++ ++extern struct pci_ops rc32434_pci_ops; ++ ++#define PCI_MEM1_START PCI_ADDR_START ++#define PCI_MEM1_END PCI_ADDR_START + CPUTOPCI_MEM_WIN - 1 ++#define PCI_MEM2_START PCI_ADDR_START + CPUTOPCI_MEM_WIN ++#define PCI_MEM2_END PCI_ADDR_START + ( 2* CPUTOPCI_MEM_WIN) - 1 ++#define PCI_IO1_START PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) ++#define PCI_IO1_END PCI_ADDR_START + (2* CPUTOPCI_MEM_WIN) + CPUTOPCI_IO_WIN -1 ++#define PCI_IO2_START PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) + CPUTOPCI_IO_WIN ++#define PCI_IO2_END PCI_ADDR_START + (2* CPUTOPCI_MEM_WIN) + (2 * CPUTOPCI_IO_WIN) -1 ++ ++ ++struct pci_controller rc32434_controller2; ++ ++struct pci_controller rc32434_controller = { ++ .pci_ops = &rc32434_pci_ops, ++ .mem_resource = &rc32434_res_pci_mem1, ++ .io_resource = &rc32434_res_pci_io1, ++ .mem_offset = 0, ++ .io_offset = 0, ++ ++}; ++ ++#ifdef __MIPSEB__ ++#define PCI_ENDIAN_FLAG PCILBAC_sb_m ++#else ++#define PCI_ENDIAN_FLAG 0 ++#endif ++ ++static int __init rc32434_pcibridge_init(void) ++{ ++ unsigned int pcicValue, pcicData = 0; ++ unsigned int dummyRead, pciCntlVal; ++ int loopCount; ++ unsigned int pciConfigAddr; ++ ++ pcicValue = rc32434_pci->pcic; ++ pcicValue = (pcicValue >> PCIM_SHFT) & PCIM_BIT_LEN; ++ if (!((pcicValue == PCIM_H_EA) || ++ (pcicValue == PCIM_H_IA_FIX) || ++ (pcicValue == PCIM_H_IA_RR))) { ++ printk("PCI init error!!!\n"); ++ /* Not in Host Mode, return ERROR */ ++ return -1; ++ } ++ /* Enables the Idle Grant mode, Arbiter Parking */ ++ pcicData |=(PCIC_igm_m|PCIC_eap_m|PCIC_en_m); ++ rc32434_pci->pcic = pcicData; /* Enable the PCI bus Interface */ ++ /* Zero out the PCI status & PCI Status Mask */ ++ for(;;) ++ { ++ pcicData = rc32434_pci->pcis; ++ if (!(pcicData & PCIS_rip_m)) ++ break; ++ } ++ ++ rc32434_pci->pcis = 0; ++ rc32434_pci->pcism = 0xFFFFFFFF; ++ /* Zero out the PCI decoupled registers */ ++ rc32434_pci->pcidac=0; /* disable PCI decoupled accesses at initialization */ ++ rc32434_pci->pcidas=0; /* clear the status */ ++ rc32434_pci->pcidasm=0x0000007F; /* Mask all the interrupts */ ++ /* Mask PCI Messaging Interrupts */ ++ rc32434_pci_msg->pciiic = 0; ++ rc32434_pci_msg->pciiim = 0xFFFFFFFF; ++ rc32434_pci_msg->pciioic = 0; ++ rc32434_pci_msg->pciioim = 0; ++ ++ ++ /* Setup PCILB0 as Memory Window */ ++ rc32434_pci->pcilba[0].a = (unsigned int) (PCI_ADDR_START); ++ ++ /* setup the PCI map address as same as the local address */ ++ ++ rc32434_pci->pcilba[0].m = (unsigned int) (PCI_ADDR_START); ++ ++ ++ /* Setup PCILBA1 as MEM */ ++ rc32434_pci->pcilba[0].c = ( ((SIZE_256MB & 0x1f) << PCILBAC_size_b) | PCI_ENDIAN_FLAG); ++ dummyRead = rc32434_pci->pcilba[0].c; /* flush the CPU write Buffers */ ++ rc32434_pci->pcilba[1].a = 0x60000000; ++ rc32434_pci->pcilba[1].m = 0x60000000; ++ ++ /* setup PCILBA2 as IO Window*/ ++ rc32434_pci->pcilba[1].c = (((SIZE_256MB & 0x1f) << PCILBAC_size_b )| PCI_ENDIAN_FLAG); ++ dummyRead = rc32434_pci->pcilba[1].c; /* flush the CPU write Buffers */ ++ rc32434_pci->pcilba[2].a = 0x18C00000; ++ rc32434_pci->pcilba[2].m = 0x18FFFFFF; ++ ++ /* setup PCILBA2 as IO Window*/ ++ rc32434_pci->pcilba[2].c = (((SIZE_4MB & 0x1f) << PCILBAC_size_b) | PCI_ENDIAN_FLAG ); ++ dummyRead = rc32434_pci->pcilba[2].c; /* flush the CPU write Buffers */ ++ ++ /* Setup PCILBA3 as IO Window */ ++ rc32434_pci->pcilba[3].a = 0x18800000; ++ rc32434_pci->pcilba[3].m = 0x18800000; ++ rc32434_pci->pcilba[3].c = ( (((SIZE_1MB & 0x1ff) << PCILBAC_size_b) | PCILBAC_msi_m) | PCI_ENDIAN_FLAG); ++ dummyRead = rc32434_pci->pcilba[3].c; /* flush the CPU write Buffers */ ++ ++ pciConfigAddr=(unsigned int)(0x80000004); ++ for(loopCount=0;loopCount<24;loopCount++){ ++ rc32434_pci->pcicfga=pciConfigAddr; ++ dummyRead=rc32434_pci->pcicfga; ++ rc32434_pci->pcicfgd = korinaCnfgRegs[loopCount]; ++ dummyRead=rc32434_pci->pcicfgd; ++ pciConfigAddr += 4; ++ } ++ rc32434_pci->pcitc = (unsigned int)((PCITC_RTIMER_VAL&0xff) << PCITC_rtimer_b) ++ | ((PCITC_DTIMER_VAL&0xff) << PCITC_dtimer_b); ++ ++ pciCntlVal=rc32434_pci->pcic; ++ pciCntlVal &=~(PCIC_tnr_m); ++ rc32434_pci->pcic = pciCntlVal; ++ pciCntlVal=rc32434_pci->pcic; ++ return 0; ++} ++ ++/* Do platform specific device initialization at pci_enable_device() time */ ++int pcibios_plat_dev_init(struct pci_dev *dev) ++{ ++ if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) { ++ /* disable prefetched memory range */ ++ pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, 0); ++ pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, 0x10); ++ ++ pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 4); ++ } ++ return 0; ++} ++ ++static int __init rc32434_pci_init(void) ++{ ++ printk("PCI: Initializing PCI\n"); ++ ++ ioport_resource.start = rc32434_res_pci_io1.start; ++ ioport_resource.end = rc32434_res_pci_io1.end; ++ ++ rc32434_pcibridge_init(); ++ ++ register_pci_controller(&rc32434_controller); ++ rc32434_sync(); ++} ++ ++arch_initcall(rc32434_pci_init); ++ +diff -urN linux.old/arch/mips/rb500/devices.c linux.dev/arch/mips/rb500/devices.c +--- linux.old/arch/mips/rb500/devices.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/devices.c 2006-06-15 16:27:14.000000000 +0200 +@@ -0,0 +1,211 @@ ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <linux/module.h> ++#include <linux/ctype.h> ++#include <linux/string.h> ++#include <linux/platform_device.h> ++#include <asm/unaligned.h> ++#include <asm/io.h> ++ ++#include <asm/rc32434/rc32434.h> ++#include <asm/rc32434/dma.h> ++#include <asm/rc32434/dma_v.h> ++#include <asm/rc32434/eth.h> ++#include <asm/rc32434/rb.h> ++ ++#define ETH0_DMA_RX_IRQ GROUP1_IRQ_BASE + 0 ++#define ETH0_DMA_TX_IRQ GROUP1_IRQ_BASE + 1 ++#define ETH0_RX_OVR_IRQ GROUP3_IRQ_BASE + 9 ++#define ETH0_TX_UND_IRQ GROUP3_IRQ_BASE + 10 ++ ++#define ETH0_RX_DMA_ADDR (DMA0_PhysicalAddress + 0*DMA_CHAN_OFFSET) ++#define ETH0_TX_DMA_ADDR (DMA0_PhysicalAddress + 1*DMA_CHAN_OFFSET) ++ ++static struct resource korina_dev0_res[] = { ++ { ++ .name = "korina_regs", ++ .start = ETH0_PhysicalAddress, ++ .end = ETH0_PhysicalAddress + sizeof(ETH_t), ++ .flags = IORESOURCE_MEM, ++ }, ++ { ++ .name = "korina_rx", ++ .start = ETH0_DMA_RX_IRQ, ++ .end = ETH0_DMA_RX_IRQ, ++ .flags = IORESOURCE_IRQ ++ }, ++ { ++ .name = "korina_tx", ++ .start = ETH0_DMA_TX_IRQ, ++ .end = ETH0_DMA_TX_IRQ, ++ .flags = IORESOURCE_IRQ ++ }, ++ { ++ .name = "korina_ovr", ++ .start = ETH0_RX_OVR_IRQ, ++ .end = ETH0_RX_OVR_IRQ, ++ .flags = IORESOURCE_IRQ ++ }, ++ { ++ .name = "korina_und", ++ .start = ETH0_TX_UND_IRQ, ++ .end = ETH0_TX_UND_IRQ, ++ .flags = IORESOURCE_IRQ ++ }, ++ { ++ .name = "korina_dma_rx", ++ .start = ETH0_RX_DMA_ADDR, ++ .end = ETH0_RX_DMA_ADDR + DMA_CHAN_OFFSET - 1, ++ .flags = IORESOURCE_MEM, ++ }, ++ { ++ .name = "korina_dma_tx", ++ .start = ETH0_TX_DMA_ADDR, ++ .end = ETH0_TX_DMA_ADDR + DMA_CHAN_OFFSET - 1, ++ .flags = IORESOURCE_MEM, ++ } ++}; ++ ++static struct korina_device korina_dev0_data = { ++ .name = "korina0", ++ .mac = { 0xde, 0xca, 0xff, 0xc0, 0xff, 0xee } ++}; ++ ++static struct platform_device korina_dev0 = { ++ .id = 0, ++ .name = "korina", ++ .dev.platform_data = &korina_dev0_data, ++ .resource = korina_dev0_res, ++ .num_resources = ARRAY_SIZE(korina_dev0_res), ++}; ++ ++ ++#define CF_GPIO_NUM 13 ++ ++static struct resource cf_slot0_res[] = { ++ { ++ .name = "cf_membase", ++ .flags = IORESOURCE_MEM ++ }, ++ { ++ .name = "cf_irq", ++ .start = (8 + 4 * 32 + CF_GPIO_NUM), /* 149 */ ++ .end = (8 + 4 * 32 + CF_GPIO_NUM), ++ .flags = IORESOURCE_IRQ ++ } ++}; ++ ++static struct cf_device cf_slot0_data = { ++ .gpio_pin = 13 ++}; ++ ++static struct platform_device cf_slot0 = { ++ .id = 0, ++ .name = "rb500-cf", ++ .dev.platform_data = &cf_slot0_data, ++ .resource = cf_slot0_res, ++ .num_resources = ARRAY_SIZE(cf_slot0_res), ++}; ++ ++ ++ ++static struct platform_device *rb500_devs[] = { ++ &korina_dev0, ++ &cf_slot0 ++}; ++ ++static void __init parse_mac_addr(char* macstr) ++{ ++ int i, j; ++ unsigned char result, value; ++ ++ for (i=0; i<6; i++) { ++ result = 0; ++ if (i != 5 && *(macstr+2) != ':') { ++ return; ++ } ++ for (j=0; j<2; j++) { ++ if (isxdigit(*macstr) && (value = isdigit(*macstr) ? *macstr-'0' : ++ toupper(*macstr)-'A'+10) < 16) { ++ result = result*16 + value; ++ macstr++; ++ } ++ else return; ++ } ++ ++ macstr++; ++ korina_dev0_data.mac[i] = result; ++ } ++} ++ ++ ++/* DEVICE CONTROLLER 1 */ ++#define CFG_DC_DEV1 (void*)0xb8010010 ++#define CFG_DC_DEVBASE 0x0 ++#define CFG_DC_DEVMASK 0x4 ++#define CFG_DC_DEVC 0x8 ++#define CFG_DC_DEVTC 0xC ++ ++ ++static int __init plat_setup_devices(void) ++{ ++ /* Look for the CF card reader */ ++ if (!readl(CFG_DC_DEV1 + CFG_DC_DEVMASK)) ++ rb500_devs[1] = NULL; ++ else { ++ cf_slot0_res[0].start = readl(CFG_DC_DEV1 + CFG_DC_DEVBASE); ++ cf_slot0_res[0].end = cf_slot0_res[0].start + 0x1000; ++ } ++ ++ return platform_add_devices(rb500_devs, ARRAY_SIZE(rb500_devs)); ++} ++ ++static int __init setup_kmac(char *s) ++{ ++ printk("korina mac = %s\n",s); ++ parse_mac_addr(s); ++ return 0; ++} ++ ++__setup("kmac=", setup_kmac); ++arch_initcall(plat_setup_devices); ++ ++ ++#if defined(CONFIG_MTD_BLOCK2MTD) && defined(CONFIG_BLK_DEV_CF_MIPS) ++extern void block2mtd_setup(char *initstr); ++extern void mount_devfs_fs(void); ++ ++static int __init setup_mtd(void) ++{ ++ struct hd_struct **part; ++ int num = 0, i; ++ char initstr[64]; ++ ++ if (cf_slot0_data.gd == NULL) ++ return 0; ++ ++ /* count partitions */ ++ part = cf_slot0_data.gd->part; ++ while (part[num] != NULL) { ++ num++; ++ } ++ ++ if (num < 2) ++ return 0; ++ ++ mount_devfs_fs(); ++ printk("Setting up block2mtd devices\n"); ++ ++ block2mtd_setup("/dev/cf/card0/part1,131072,kernel"); ++ block2mtd_setup("/dev/cf/card0/part2,131072,rootfs"); ++ ++ for (i = 2; part[i]; i++) { ++ sprintf(initstr, "/dev/cf/card0/part%d,131072,part%d", i + 1, i + 1); ++ block2mtd_setup(initstr); ++ } ++ ++ return 0; ++} ++ ++late_initcall(setup_mtd); ++#endif +diff -urN linux.old/arch/mips/rb500/early_serial.c linux.dev/arch/mips/rb500/early_serial.c +--- linux.old/arch/mips/rb500/early_serial.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/early_serial.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,199 @@ ++/************************************************************************** ++ * ++ * BRIEF MODULE DESCRIPTION ++ * EB434 specific polling driver for 16550 UART. ++ * ++ * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ ************************************************************************** ++ * Copyright (C) 2000 by Lineo, Inc. ++ * Written by Quinn Jensen (jensenq@lineo.com) ++ ************************************************************************** ++ * P. Sadik Oct 20, 2003 ++ * ++ * DIVISOR is made a function of idt_cpu_freq ++ ************************************************************************** ++ * P. Sadik Oct 30, 2003 ++ * ++ * added reset_cons_port ++ ************************************************************************** ++ */ ++ ++#include <linux/serial_reg.h> ++ ++/* turn this on to watch the debug protocol echoed on the console port */ ++#define DEBUG_REMOTE_DEBUG ++ ++#define CONS_BAUD 115200 ++ ++extern unsigned int idt_cpu_freq; ++ ++#define EXT_FREQ 24000000 ++#define INT_FREQ idt_cpu_freq ++ ++#define EXT_PORT 0xb9800000u ++#define EXT_SHIFT 0 ++ ++#ifdef __MIPSEB__ ++#define INT_PORT 0xb8058003u ++#else ++#define INT_PORT 0xb8058000u ++#endif ++#define INT_SHIFT 2 ++ ++#define INT_FCR UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT | UART_FCR_TRIGGER_14 ++#define EXT_FCR UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT ++ ++typedef struct ++{ ++ volatile unsigned char *base; ++ unsigned int shift; ++ unsigned int freq; ++ unsigned int fcr; ++} ser_port; ++ ++ser_port ports[2] = ++{ ++ { (volatile unsigned char *)INT_PORT, INT_SHIFT, 0, INT_FCR}, ++ { (volatile unsigned char *)EXT_PORT, EXT_SHIFT, EXT_FREQ, EXT_FCR} ++}; ++ ++#define CONS_PORT 0 ++ ++void cons_putc(char c); ++int port_getc(int port); ++void port_putc(int port, char c); ++ ++int cons_getc(void) ++{ ++ return port_getc(CONS_PORT); ++} ++ ++void cons_putc(char c) ++{ ++ port_putc(CONS_PORT, c); ++} ++ ++void cons_puts(char *s) ++{ ++ while(*s) { ++ if(*s == '\n') cons_putc('\r'); ++ cons_putc(*s); ++ s++; ++ } ++} ++ ++void cons_do_putn(int n) ++{ ++ if(n) { ++ cons_do_putn(n / 10); ++ cons_putc(n % 10 + '0'); ++ } ++} ++ ++void cons_putn(int n) ++{ ++ if(n < 0) { ++ cons_putc('-'); ++ n = -n; ++ } ++ ++ if (n == 0) { ++ cons_putc('0'); ++ } else { ++ cons_do_putn(n); ++ } ++} ++ ++int port_getc(int p) ++{ ++ volatile unsigned char *port = ports[p].base; ++ int s = ports[p].shift; ++ int c; ++ ++ while((*(port + (UART_LSR << s)) & UART_LSR_DR) == 0) { ++ continue; ++ } ++ ++ c = *(port + (UART_RX << s)); ++ ++ return c; ++} ++ ++int port_getc_ready(int p) ++{ ++ volatile unsigned char *port = ports[p].base; ++ int s = ports[p].shift; ++ ++ return *(port + (UART_LSR << s)) & UART_LSR_DR; ++} ++ ++#define OK_TO_XMT (UART_LSR_TEMT | UART_LSR_THRE) ++ ++void port_putc(int p, char c) ++{ ++ volatile unsigned char *port = ports[p].base; ++ int s = ports[p].shift; ++ volatile unsigned char *lsr = port + (UART_LSR << s); ++ ++ while((*lsr & OK_TO_XMT) != OK_TO_XMT) { ++ continue; ++ } ++ ++ *(port + (UART_TX << s)) = c; ++} ++ ++void reset_cons_port(void) ++{ ++ volatile unsigned char *port = ports[CONS_PORT].base; ++ unsigned int s = ports[CONS_PORT].shift; ++ unsigned int DIVISOR; ++ ++ if (ports[CONS_PORT].freq) ++ DIVISOR = (ports[CONS_PORT].freq / 16 / CONS_BAUD); ++ else ++ DIVISOR = (idt_cpu_freq / 16 / CONS_BAUD); ++ ++ /* reset the port */ ++ *(port + (UART_CSR << s)) = 0; ++ ++ /* clear and enable the FIFOs */ ++ *(port + (UART_FCR << s)) = ports[CONS_PORT].fcr; ++ ++ /* set the baud rate */ ++ *(port + (UART_LCR << s)) = UART_LCR_DLAB; /* enable DLL, DLM registers */ ++ ++ *(port + (UART_DLL << s)) = DIVISOR; ++ *(port + (UART_DLM << s)) = DIVISOR >> 8; ++ /* set the line control stuff and disable DLL, DLM regs */ ++ ++ *(port + (UART_LCR << s)) = UART_LCR_STOP | /* 2 stop bits */ ++ UART_LCR_WLEN8; /* 8 bit word length */ ++ ++ /* leave interrupts off */ ++ *(port + (UART_IER << s)) = 0; ++ ++ /* the modem controls don't leave the chip on this port, so leave them alone */ ++ *(port + (UART_MCR << s)) = 0; ++} +diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c +--- linux.old/arch/mips/rb500/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/irq.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,266 @@ ++/* ++ * BRIEF MODULE DESCRIPTION ++ * RC32434 interrupt routines. ++ * ++ * Copyright 2002 MontaVista Software Inc. ++ * Author: MontaVista Software, Inc. ++ * stevel@mvista.com or source@mvista.com ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#include <linux/errno.h> ++#include <linux/init.h> ++#include <linux/kernel_stat.h> ++#include <linux/module.h> ++#include <linux/signal.h> ++#include <linux/sched.h> ++#include <linux/types.h> ++#include <linux/interrupt.h> ++#include <linux/ioport.h> ++#include <linux/timex.h> ++#include <linux/slab.h> ++#include <linux/random.h> ++#include <linux/delay.h> ++ ++#include <asm/bitops.h> ++#include <asm/bootinfo.h> ++#include <asm/io.h> ++#include <asm/irq.h> ++#include <asm/time.h> ++#include <asm/mipsregs.h> ++#include <asm/system.h> ++#include <asm/rc32434/rc32434.h> ++#include <asm/rc32434/gpio.h> ++ ++extern void set_debug_traps(void); ++extern irq_cpustat_t irq_stat [NR_CPUS]; ++unsigned int local_bh_count[NR_CPUS]; ++unsigned int local_irq_count[NR_CPUS]; ++ ++static unsigned int startup_irq(unsigned int irq); ++static void rb500_end_irq(unsigned int irq_nr); ++static void mask_and_ack_irq(unsigned int irq_nr); ++static void rb500_enable_irq(unsigned int irq_nr); ++static void rb500_disable_irq(unsigned int irq_nr); ++ ++extern void __init init_generic_irq(void); ++ ++typedef struct { ++ u32 mask; /* mask of valid bits in pending/mask registers */ ++ volatile u32 *base_addr; ++} intr_group_t; ++ ++#define RC32434_NR_IRQS (GROUP4_IRQ_BASE + 32) ++ ++#if (NR_IRQS < RC32434_NR_IRQS) ++#error Too little irqs defined. Did you override <asm/irq.h> ? ++#endif ++ ++static const intr_group_t intr_group[NUM_INTR_GROUPS] = { ++ { 0x0000efff, (u32 *)KSEG1ADDR(IC_GROUP0_PEND + 0 * IC_GROUP_OFFSET) }, ++ { 0x00001fff, (u32 *)KSEG1ADDR(IC_GROUP0_PEND + 1 * IC_GROUP_OFFSET) }, ++ { 0x00000007, (u32 *)KSEG1ADDR(IC_GROUP0_PEND + 2 * IC_GROUP_OFFSET) }, ++ { 0x0003ffff, (u32 *)KSEG1ADDR(IC_GROUP0_PEND + 3 * IC_GROUP_OFFSET) }, ++ { 0xffffffff, (u32 *)KSEG1ADDR(IC_GROUP0_PEND + 4 * IC_GROUP_OFFSET) } ++}; ++ ++#define READ_PEND(base) (*(base)) ++#define READ_MASK(base) (*(base + 2)) ++#define WRITE_MASK(base, val) (*(base + 2) = (val)) ++ ++static inline int irq_to_group(unsigned int irq_nr) ++{ ++ return ((irq_nr - GROUP0_IRQ_BASE) >> 5); ++} ++ ++static inline int group_to_ip(unsigned int group) ++{ ++ return group + 2; ++} ++ ++static inline void enable_local_irq(unsigned int ip) ++{ ++ int ipnum = 0x100 << ip; ++ clear_c0_cause(ipnum); ++ set_c0_status(ipnum); ++} ++ ++static inline void disable_local_irq(unsigned int ip) ++{ ++ int ipnum = 0x100 << ip; ++ clear_c0_status(ipnum); ++} ++ ++static inline void ack_local_irq(unsigned int ip) ++{ ++ int ipnum = 0x100 << ip; ++ clear_c0_cause(ipnum); ++} ++ ++static void rb500_enable_irq(unsigned int irq_nr) ++{ ++ int ip = irq_nr - GROUP0_IRQ_BASE; ++ unsigned int group, intr_bit; ++ volatile unsigned int *addr; ++ ++ ++ if (ip < 0) ++ enable_local_irq(irq_nr); ++ else { ++ group = ip >> 5; ++ ++ ip &= (1<<5)-1; ++ intr_bit = 1 << ip; ++ ++ enable_local_irq(group_to_ip(group)); ++ ++ addr = intr_group[group].base_addr; ++ WRITE_MASK(addr, READ_MASK(addr) & ~intr_bit); ++ } ++} ++ ++static void rb500_disable_irq(unsigned int irq_nr) ++{ ++ int ip = irq_nr - GROUP0_IRQ_BASE; ++ unsigned int group, intr_bit, mask; ++ volatile unsigned int *addr; ++ ++ if (ip < 0) { ++ disable_local_irq(irq_nr); ++ }else{ ++ group = ip >> 5; ++ ++ ip &= (1<<5) -1; ++ intr_bit = 1 << ip; ++ addr = intr_group[group].base_addr; ++ mask = READ_MASK(addr); ++ mask |= intr_bit; ++ WRITE_MASK(addr,mask); ++ ++ /* ++ * if there are no more interrupts enabled in this ++ * group, disable corresponding IP ++ */ ++ if (mask == intr_group[group].mask) ++ disable_local_irq(group_to_ip(group)); ++ } ++} ++ ++static unsigned int startup_irq(unsigned int irq_nr) ++{ ++ rb500_enable_irq(irq_nr); ++ return 0; ++} ++ ++static void shutdown_irq(unsigned int irq_nr) ++{ ++ rb500_disable_irq(irq_nr); ++ return; ++} ++ ++static void mask_and_ack_irq(unsigned int irq_nr) ++{ ++ rb500_disable_irq(irq_nr); ++ ack_local_irq(group_to_ip(irq_to_group(irq_nr))); ++} ++ ++static void rb500_end_irq(unsigned int irq_nr) ++{ ++ ++ int ip = irq_nr - GROUP0_IRQ_BASE; ++ unsigned int intr_bit, group; ++ volatile unsigned int *addr; ++ ++ if ((irq_desc[irq_nr].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { ++ printk("warning: end_irq %d did not enable (%x)\n", ++ irq_nr, irq_desc[irq_nr].status); ++ return; ++ } ++ ++ if (ip < 0) { ++ enable_local_irq(irq_nr); ++ } else { ++ group = ip >> 5; ++ ++ ip &= (1 << 5) - 1; ++ intr_bit = 1 << ip; ++ ++ if (irq_nr >= GROUP4_IRQ_BASE && irq_nr <= (GROUP4_IRQ_BASE + 13)) { ++ gpio->gpioistat = gpio->gpioistat & ~intr_bit; ++ } ++ ++ enable_local_irq(group_to_ip(group)); ++ ++ addr = intr_group[group].base_addr; ++ WRITE_MASK(addr, READ_MASK(addr) & ~intr_bit); ++ } ++} ++ ++static struct hw_interrupt_type rc32434_irq_type = { ++ .typename = "RB500", ++ .startup = startup_irq, ++ .shutdown = shutdown_irq, ++ .enable = rb500_enable_irq, ++ .disable = rb500_disable_irq, ++ .ack = mask_and_ack_irq, ++ .end = rb500_end_irq, ++}; ++ ++ ++/* Main Interrupt dispatcher */ ++asmlinkage void plat_irq_dispatch(struct pt_regs *regs) ++{ ++ unsigned int ip, pend, group; ++ volatile unsigned int *addr; ++ unsigned int cp0_cause = read_c0_cause() & read_c0_status(); ++ ++ if ((ip = (cp0_cause & 0x7c00))) { ++ group = 21 - rc32434_clz(ip); ++ ++ addr = intr_group[group].base_addr; ++ ++ pend = READ_PEND(addr); ++ pend &= ~READ_MASK(addr); // only unmasked interrupts ++ pend = 39 - rc32434_clz(pend); ++ do_IRQ((group << 5) + pend, regs); ++ } ++} ++ ++void __init arch_init_irq(void) ++{ ++ int i; ++ extern void rbIRQ(void); ++ ++ set_except_vector(0, rbIRQ); ++ printk("Initializing IRQ's: %d out of %d\n", RC32434_NR_IRQS, NR_IRQS); ++ memset(irq_desc, 0, sizeof(irq_desc)); ++ ++ for (i = 0; i < RC32434_NR_IRQS; i++) { ++ irq_desc[i].status = IRQ_DISABLED; ++ irq_desc[i].action = NULL; ++ irq_desc[i].depth = 1; ++ irq_desc[i].handler = &rc32434_irq_type; ++ spin_lock_init(&irq_desc[i].lock); ++ } ++} ++ ++ +diff -urN linux.old/arch/mips/rb500/Makefile linux.dev/arch/mips/rb500/Makefile +--- linux.old/arch/mips/rb500/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/Makefile 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,5 @@ ++# ++# Makefile for the RB500 board specific parts of the kernel ++# ++ ++obj-y += irq.o time.o setup.o serial.o early_serial.o prom.o misc.o devices.o rbIRQ.o +diff -urN linux.old/arch/mips/rb500/misc.c linux.dev/arch/mips/rb500/misc.c +--- linux.old/arch/mips/rb500/misc.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/misc.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,54 @@ ++#include <linux/module.h> ++#include <linux/kernel.h> /* printk() */ ++#include <linux/types.h> /* size_t */ ++#include <linux/pci.h> ++#include <linux/spinlock.h> ++#include <asm/rc32434/rb.h> ++ ++#define GPIO_BADDR 0xb8050000 ++ ++ ++static unsigned char *devCtl3Base = (unsigned char *) KSEG1ADDR(0x18010030); ++static unsigned char latchU5State = 0; ++static spinlock_t clu5Lock = SPIN_LOCK_UNLOCKED; ++ ++void set434Reg(unsigned regOffs, unsigned bit, unsigned len, unsigned val) { ++ unsigned flags, data; ++ unsigned i = 0; ++ spin_lock_irqsave(&clu5Lock, flags); ++ data = *(volatile unsigned *) (IDT434_REG_BASE + regOffs); ++ for (i = 0; i != len; ++i) { ++ if (val & (1 << i)) data |= (1 << (i + bit)); ++ else data &= ~(1 << (i + bit)); ++ } ++ *(volatile unsigned *) (IDT434_REG_BASE + regOffs) = data; ++ spin_unlock_irqrestore(&clu5Lock, flags); ++} ++ ++void changeLatchU5(unsigned char orMask, unsigned char nandMask) { ++ unsigned flags; ++ spin_lock_irqsave(&clu5Lock, flags); ++ latchU5State = (latchU5State | orMask) & ~nandMask; ++ *devCtl3Base = latchU5State; ++ spin_unlock_irqrestore(&clu5Lock, flags); ++} ++ ++u32 gpio_get(gpio_func func) ++{ ++ return readl((void *) GPIO_BADDR + func); ++} ++ ++void gpio_set(gpio_func func, u32 mask, u32 value) ++{ ++ u32 val = readl((void *) GPIO_BADDR + func); ++ ++ val &= ~mask; ++ val |= value & mask; ++ ++ writel(val, (void *) GPIO_BADDR + func); ++} ++ ++EXPORT_SYMBOL(gpio_set); ++EXPORT_SYMBOL(gpio_get); ++EXPORT_SYMBOL(set434Reg); ++EXPORT_SYMBOL(changeLatchU5); +diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c +--- linux.old/arch/mips/rb500/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/prom.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,181 @@ ++/* ++* prom.c ++********************************************************************** ++* P . Sadik Oct 10, 2003 ++* ++* Started change log ++* idt_cpu_freq is make a kernel configuration parameter ++* idt_cpu_freq is exported so that other modules can use it. ++* Code cleanup ++********************************************************************** ++* P. Sadik Oct 20, 2003 ++* ++* Removed NVRAM code from here, since they are already available under ++* nvram directory. ++* Added serial port initialisation. ++********************************************************************** ++********************************************************************** ++* P. Sadik Oct 30, 2003 ++* ++* Added reset_cons_port ++********************************************************************** ++ ++ P.Christeas, 2005-2006 ++ Port to 2.6, add 2.6 cmdline parsing ++ ++*/ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/mm.h> ++#include <linux/module.h> ++#include <linux/string.h> ++#include <linux/console.h> ++#include <asm/bootinfo.h> ++#include <linux/bootmem.h> ++#include <linux/ioport.h> ++#include <linux/blkdev.h> ++#include <asm/rc32434/ddr.h> ++ ++#define PROM_ENTRY(x) (0xbfc00000+((x)*8)) ++extern void __init setup_serial_port(void); ++extern void cons_putc(char c); ++extern void cons_puts(char *s); ++ ++unsigned int idt_cpu_freq = 132000000; ++EXPORT_SYMBOL(idt_cpu_freq); ++unsigned int board_type = 500; ++EXPORT_SYMBOL(board_type); ++unsigned int gpio_bootup_state = 0; ++EXPORT_SYMBOL(gpio_bootup_state); ++ ++ ++char mips_mac_address[18] = "08:00:06:05:40:01"; ++EXPORT_SYMBOL(mips_mac_address); ++ ++/* what to append to cmdline when button is [not] pressed */ ++#define GPIO_INIT_NOBUTTON "" ++#define GPIO_INIT_BUTTON " 2" ++ ++#ifdef CONFIG_MIKROTIK_RB500 ++unsigned soft_reboot = 0; ++EXPORT_SYMBOL(soft_reboot); ++#endif ++ ++#define SR_NMI 0x00180000 /* NMI */ ++#define SERIAL_SPEED_ENTRY 0x00000001 ++ ++#ifdef CONFIG_REMOTE_DEBUG ++extern int remote_debug; ++#endif ++ ++extern unsigned long mips_machgroup; ++extern unsigned long mips_machtype; ++ ++#define FREQ_TAG "HZ=" ++#define GPIO_TAG "gpio=" ++#define KMAC_TAG "kmac=" ++#define MEM_TAG "mem=" ++#define BOARD_TAG "board=" ++#define IGNORE_CMDLINE_MEM 1 ++#define DEBUG_DDR ++ ++void parse_soft_settings(unsigned *ptr, unsigned size); ++void parse_hard_settings(unsigned *ptr, unsigned size); ++ ++void __init prom_setup_cmdline(void); ++ ++#ifdef DEBUG_DDR ++void cons_puthex4(u32 h){ ++ h&=0x0f; ++ if (h>=10) ++ cons_putc((h-10)+'a'); ++ else ++ cons_putc(h+'0'); ++} ++ ++void cons_putreg32(u32 reg){ ++ char c; ++ cons_putc('0'); ++ cons_putc('x'); ++ for (c=28;c>=0;c-=4) ++ cons_puthex4(reg>>c); ++} ++#endif ++ ++void __init prom_init(void) ++{ ++ DDR_t ddr = (DDR_t) DDR_VirtualAddress; /* define the pointer to the DDR registers */ ++ phys_t memsize = 0-ddr->ddrmask; ++ ++ /* this should be the very first message, even before serial is properly initialized */ ++ prom_setup_cmdline(); ++ setup_serial_port(); ++ ++ mips_machgroup = MACH_GROUP_MIKROTIK; ++ soft_reboot = read_c0_status() & SR_NMI; ++ pm_power_off = NULL; ++ ++ /* ++ * give all RAM to boot allocator, ++ * except for the first 0x400 and the last 0x200 bytes ++ */ ++ add_memory_region(ddr->ddrbase + 0x400, memsize - 0x600, BOOT_MEM_RAM); ++} ++ ++void prom_free_prom_memory(void) ++{ ++ /* FIXME: STUB */ ++} ++ ++void __init prom_setup_cmdline(void){ ++ char cmd_line[CL_SIZE]; ++ char *cp; ++ int prom_argc; ++ char **prom_argv, **prom_envp; ++ int i; ++ ++ prom_argc = fw_arg0; ++ prom_argv = (char **) fw_arg1; ++ prom_envp = (char **) fw_arg2; ++ ++ cp=cmd_line; ++ /* Note: it is common that parameters start at argv[1] and not argv[0], ++ however, our elf loader starts at [0] */ ++ for(i=0;i<prom_argc;i++){ ++ if (strncmp(prom_argv[i], FREQ_TAG, sizeof(FREQ_TAG) - 1) == 0) { ++ idt_cpu_freq = simple_strtoul(prom_argv[i] + sizeof(FREQ_TAG) - 1, 0, 10); ++ continue; ++ } ++#ifdef IGNORE_CMDLINE_MEM ++ /* parses out the "mem=xx" arg */ ++ if (strncmp(prom_argv[i], MEM_TAG, sizeof(MEM_TAG) - 1) == 0) { ++ continue; ++ } ++#endif ++ if (i>0) *(cp++) = ' '; ++ if (strncmp(prom_argv[i], BOARD_TAG, sizeof(BOARD_TAG) - 1) == 0) { ++ board_type = simple_strtoul(prom_argv[i] + sizeof(BOARD_TAG) - 1, 0, 10); ++ } ++ if (strncmp(prom_argv[i], GPIO_TAG, sizeof(GPIO_TAG) - 1) == 0) { ++ gpio_bootup_state = simple_strtoul(prom_argv[i] + sizeof(GPIO_TAG) - 1, 0, 10); ++ } ++ strcpy(cp,prom_argv[i]); ++ cp+=strlen(prom_argv[i]); ++ } ++ ++ i=strlen(arcs_cmdline); ++ if (i>0){ ++ *(cp++) = ' '; ++ strcpy(cp,arcs_cmdline); ++ cp+=strlen(arcs_cmdline); ++ } ++ if (gpio_bootup_state&0x02) ++ strcpy(cp,GPIO_INIT_NOBUTTON); ++ else ++ strcpy(cp,GPIO_INIT_BUTTON); ++ cmd_line[CL_SIZE-1] = '\0'; ++ ++ strcpy(arcs_cmdline,cmd_line); ++} ++ +diff -urN linux.old/arch/mips/rb500/rbIRQ.S linux.dev/arch/mips/rb500/rbIRQ.S +--- linux.old/arch/mips/rb500/rbIRQ.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/rbIRQ.S 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,62 @@ ++/* ++ * Copyright 2001 MontaVista Software Inc. ++ * Author: stevel@mvista.com ++ * ++ * Interrupt dispatcher for RB500 board. ++ * ++ * 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. ++ */ ++ ++#define __ASSEMBLY__ 1 ++ ++#include <asm/asm.h> ++#include <asm/mipsregs.h> ++#include <asm/regdef.h> ++#include <asm/stackframe.h> ++ ++ .text ++ .set noreorder ++ .set noat ++ .align 5 ++ NESTED(rbIRQ, PT_SIZE, sp) ++ .set noat ++ SAVE_ALL ++ CLI ++ ++ .set at ++ .set noreorder ++ ++ /* Get the pending interrupts */ ++ mfc0 t0, CP0_CAUSE ++ nop ++ ++ /* Isolate the allowed ones by anding the irq mask */ ++ mfc0 t2, CP0_STATUS ++ move a1, sp /* need a nop here, hence we anticipate */ ++ andi t0, CAUSEF_IP ++ and t0, t2 ++ ++ /* check for r4k counter/timer IRQ. */ ++ ++ andi t1, t0, CAUSEF_IP7 ++ beqz t1, 1f ++ nop ++ ++ jal ll_timer_interrupt ++ ++ li a0, 7 ++ ++ j ret_from_irq ++ nop ++1: ++ jal plat_irq_dispatch ++ move a0, t0 ++ j ret_from_irq ++ nop ++ ++ END(rbIRQ) ++ ++ +diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c +--- linux.old/arch/mips/rb500/serial.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/serial.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,79 @@ ++/************************************************************************** ++ * ++ * BRIEF MODULE DESCRIPTION ++ * Serial port initialisation. ++ * ++ * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ ************************************************************************** ++ * May 2004 rkt, neb ++ * ++ * Initial Release ++ * ++ * ++ * ++ ************************************************************************** ++ */ ++ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/sched.h> ++#include <linux/pci.h> ++#include <linux/interrupt.h> ++#include <linux/tty.h> ++#include <linux/serial.h> ++#include <linux/serial_core.h> ++ ++#include <asm/time.h> ++#include <asm/cpu.h> ++#include <asm/bootinfo.h> ++#include <asm/irq.h> ++#include <asm/serial.h> ++#include <asm/rc32434/rc32434.h> ++ ++extern unsigned int idt_cpu_freq; ++ ++static struct uart_port serial_req = { ++ .type = PORT_16550A, ++ .line = 0, ++ .irq = RC32434_UART0_IRQ, ++ .flags = STD_COM_FLAGS, ++ .iotype = UPIO_MEM, ++ .membase = (char *) KSEG1ADDR(RC32434_UART0_BASE), ++// .fifosize = 14 ++ .regshift = 2 ++}; ++ ++int __init setup_serial_port(void) ++{ ++ serial_req.uartclk = idt_cpu_freq; ++ ++ if (early_serial_setup(&serial_req)){ ++ cons_puts("Serial setup failed!\n"); ++ return -ENODEV; ++ } ++ ++ return(0); ++} +diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c +--- linux.old/arch/mips/rb500/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/setup.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,84 @@ ++/* ++ * setup.c - boot time setup code ++ */ ++ ++#include <linux/init.h> ++#include <linux/mm.h> ++#include <linux/sched.h> ++#include <linux/irq.h> ++#include <asm/bootinfo.h> ++#include <asm/io.h> ++#include <linux/ioport.h> ++#include <asm/mipsregs.h> ++#include <asm/pgtable.h> ++#include <asm/reboot.h> ++#include <asm/addrspace.h> /* for KSEG1ADDR() */ ++#include <asm/rc32434/rc32434.h> ++#include <linux/pm.h> ++#include <asm/rc32434/pci.h> ++ ++extern void (*board_time_init)(void); ++extern void (*board_timer_setup)(struct irqaction *irq); ++extern void rc32434_time_init(void); ++extern void rc32434_timer_setup(struct irqaction *irq); ++#ifdef CONFIG_PCI ++extern int __init rc32434_pcibridge_init(void); ++#endif ++ ++#define epldMask ((volatile unsigned char *)0xB900000d) ++ ++static void rb_machine_restart(char *command) ++{ ++ /* just jump to the reset vector */ ++ * (volatile unsigned *) KSEG1ADDR(0x18008000) = 0x80000001; ++ ((void (*)(void))KSEG1ADDR(0x1FC00000u))(); ++} ++ ++static void rb_machine_halt(void) ++{ ++ for(;;) continue; ++} ++ ++#ifdef CONFIG_CPU_HAS_WB ++void (*__wbflush) (void); ++ ++static void rb_write_buffer_flush(void) ++{ ++ __asm__ __volatile__ ++ ("sync\n\t" "nop\n\t" "loop: bc0f loop\n\t" "nop\n\t"); ++} ++#endif ++ ++void __init plat_setup(void) ++{ ++ unsigned int pciCntlVal; ++ ++ board_time_init = rc32434_time_init; ++ board_timer_setup = rc32434_timer_setup; ++ ++#ifdef CONFIG_CPU_HAS_WB ++ __wbflush = rb_write_buffer_flush; ++#endif ++ _machine_restart = rb_machine_restart; ++ _machine_halt = rb_machine_halt; ++ /*_machine_power_off = rb_machine_power_halt;*/ ++ pm_power_off = rb_machine_halt; ++ ++ set_io_port_base(KSEG1); ++ ++ pciCntlVal=rc32434_pci->pcic; ++ pciCntlVal &= 0xFFFFFF7; ++ rc32434_pci->pcic = pciCntlVal; ++ ++#ifdef CONFIG_PCI ++ /* Enable PCI interrupts in EPLD Mask register */ ++ *epldMask = 0x0; ++ *(epldMask + 1) = 0x0; ++#endif ++ write_c0_wired(0); ++} ++ ++const char *get_system_type(void) ++{ ++ return "MIPS RB500"; ++} +diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c +--- linux.old/arch/mips/rb500/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/time.c 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,94 @@ ++/* ++**************************************************************************** ++* Carsten Langgaard, carstenl@mips.com ++* Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. ++* ++*************************************************************************** ++* ++* This program is free software; you can distribute it and/or modify it ++* under the terms of the GNU General Public License (Version 2) as ++* published by the Free Software Foundation. ++* ++* This program is distributed in the hope 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. ++* ++**************************************************************************** ++* ++* Setting up the clock on the MIPS boards. ++* ++**************************************************************************** ++* P. Sadik Oct 10, 2003 ++* ++* Started change log. ++* mips_counter_frequency is now calculated at run time, based on idt_cpu_freq. ++* Code cleanup ++**************************************************************************** ++*/ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/kernel_stat.h> ++#include <linux/sched.h> ++#include <linux/spinlock.h> ++#include <linux/mc146818rtc.h> ++#include <linux/irq.h> ++#include <linux/timex.h> ++ ++#include <asm/mipsregs.h> ++#include <asm/ptrace.h> ++#include <asm/debug.h> ++#include <asm/rc32434/rc32434.h> ++ ++static unsigned long r4k_offset; /* Amount to incr compare reg each time */ ++static unsigned long r4k_cur; /* What counter should be at next timer irq */ ++extern void ll_timer_interrupt(int irq, struct pt_regs *regs); ++extern unsigned int mips_hpt_frequency; ++extern unsigned int idt_cpu_freq; ++ ++/* ++ * Figure out the r4k offset, the amount to increment the compare ++ * register for each time tick. There is no RTC available. ++ * ++ * The RC32434 counts at half the CPU *core* speed. ++ */ ++static unsigned long __init cal_r4koff(void) ++{ ++ mips_hpt_frequency = idt_cpu_freq * IDT_CLOCK_MULT / 2; ++ return (mips_hpt_frequency / HZ); ++} ++ ++ ++void __init rc32434_time_init(void) ++{ ++ unsigned int est_freq, flags; ++ ++ local_irq_save(flags); ++ ++ printk("calculating r4koff... "); ++ r4k_offset = cal_r4koff(); ++ printk("%08lx(%d)\n", r4k_offset, (int) r4k_offset); ++ ++ est_freq = 2*r4k_offset*HZ; ++ est_freq += 5000; /* round */ ++ est_freq -= est_freq%10000; ++ printk("CPU frequency %d.%02d MHz\n", est_freq/1000000, ++ (est_freq%1000000)*100/1000000); ++ local_irq_restore(flags); ++} ++ ++void __init rc32434_timer_setup(struct irqaction *irq) ++{ ++ /* we are using the cpu counter for timer interrupts */ ++ setup_irq(MIPS_CPU_TIMER_IRQ, irq); ++ ++ /* to generate the first timer interrupt */ ++ r4k_cur = (read_c0_count() + r4k_offset); ++ write_c0_compare(r4k_cur); ++} ++ +diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/devices/block2mtd.c +--- linux.old/drivers/mtd/devices/block2mtd.c 2006-05-31 02:31:44.000000000 +0200 ++++ linux.dev/drivers/mtd/devices/block2mtd.c 2006-06-15 18:46:28.000000000 +0200 +@@ -25,7 +25,6 @@ + #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) + #define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) + +- + /* Info for the block device */ + struct block2mtd_dev { + struct list_head list; +@@ -61,10 +60,8 @@ + read_lock_irq(&mapping->tree_lock); + for (i = 0; i < PAGE_READAHEAD; i++) { + pagei = index + i; +- if (pagei > end_index) { +- INFO("Overrun end of disk in cache readahead\n"); ++ if (pagei > end_index) + break; +- } + page = radix_tree_lookup(&mapping->page_tree, pagei); + if (page && (!i)) + break; +@@ -105,7 +102,7 @@ + + while (pages) { + page = page_readahead(mapping, index); +- if (!page) ++ if (!page || !page_address(page)) + return -ENOMEM; + if (IS_ERR(page)) + return PTR_ERR(page); +@@ -284,7 +281,7 @@ + + + /* FIXME: ensure that mtd->size % erase_size == 0 */ +-static struct block2mtd_dev *add_device(char *devname, int erase_size) ++static struct block2mtd_dev *add_device(char *devname, int erase_size, char *alias) + { + struct block_device *bdev; + struct block2mtd_dev *dev; +@@ -314,14 +311,15 @@ + + /* Setup the MTD structure */ + /* make the name contain the block device in */ +- dev->mtd.name = kmalloc(sizeof("block2mtd: ") + strlen(devname), ++ dev->mtd.name = kmalloc(strlen((alias ?: devname)), + GFP_KERNEL); + if (!dev->mtd.name) + goto devinit_err; + +- sprintf(dev->mtd.name, "block2mtd: %s", devname); ++ strcpy(dev->mtd.name, (alias ?: devname)); + + dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK; ++ dev->mtd.size -= dev->mtd.size % erase_size; + dev->mtd.erasesize = erase_size; + dev->mtd.type = MTD_RAM; + dev->mtd.flags = MTD_CAP_RAM; +@@ -340,7 +338,7 @@ + } + list_add(&dev->list, &blkmtd_device_list); + INFO("mtd%d: [%s] erase_size = %dKiB [%d]", dev->mtd.index, +- dev->mtd.name + strlen("blkmtd: "), ++ dev->mtd.name, + dev->mtd.erasesize >> 10, dev->mtd.erasesize); + return dev; + +@@ -415,7 +413,7 @@ + return 0; \ + } while (0) + +-static int block2mtd_setup(const char *val, struct kernel_param *kp) ++int block2mtd_setup(const char *val, struct kernel_param *kp) + { + char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */ + char *token[2]; +@@ -429,7 +427,7 @@ + strcpy(str, val); + kill_final_newline(str); + +- for (i=0; i<2; i++) ++ for (i=0; i<3; i++) + token[i] = strsep(&str, ","); + + if (str) +@@ -452,7 +450,7 @@ + parse_err("illegal erase size"); + } + +- add_device(name, erase_size); ++ add_device(name, erase_size, token[2]); + + return 0; + } +@@ -460,6 +458,7 @@ + + module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200); + MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>]\""); ++EXPORT_SYMBOL(block2mtd_setup); + + static int __init block2mtd_init(void) + { +diff -urN linux.old/drivers/pci/Makefile linux.dev/drivers/pci/Makefile +--- linux.old/drivers/pci/Makefile 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/drivers/pci/Makefile 2006-06-15 16:26:53.000000000 +0200 +@@ -27,6 +27,7 @@ + obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o + obj-$(CONFIG_X86_VISWS) += setup-irq.o + obj-$(CONFIG_PCI_MSI) += msi.o ++obj-$(CONFIG_MIKROTIK_RB500) += setup-irq.o + + # + # ACPI Related PCI FW Functions +diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h +--- linux.old/include/asm-mips/bootinfo.h 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/include/asm-mips/bootinfo.h 2006-06-15 16:26:53.000000000 +0200 +@@ -218,6 +218,8 @@ + #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ + #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ + ++#define MACH_GROUP_MIKROTIK 24 /* Mikrotik Boards */ ++ + #define CL_SIZE COMMAND_LINE_SIZE + + const char *get_system_type(void); +diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h +--- linux.old/include/asm-mips/cpu.h 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/include/asm-mips/cpu.h 2006-06-15 16:26:53.000000000 +0200 +@@ -196,7 +196,8 @@ + #define CPU_34K 60 + #define CPU_PR4450 61 + #define CPU_SB1A 62 +-#define CPU_LAST 62 ++#define CPU_RC32300 63 ++#define CPU_LAST 63 + + /* + * ISA Level encodings +diff -urN linux.old/include/asm-mips/rc32434/crom.h linux.dev/include/asm-mips/rc32434/crom.h +--- linux.old/include/asm-mips/rc32434/crom.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/crom.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,98 @@ ++#ifndef __IDT_CROM_H__ ++#define __IDT_CROM_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Configuration ROM register definitions. ++ * ++ * File : $Id: crom.h,v 1.2 2002/06/06 18:34:03 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020118 ++ * Update : ++ * $Log: crom.h,v $ ++ * Revision 1.2 2002/06/06 18:34:03 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.1 2002/05/29 17:33:21 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ CROM0_PhysicalAddress = 0x100b8000, ++ CROM_PhysicalAddress = CROM0_PhysicalAddress, ++ ++ CROM0_VirtualAddress = 0xb00b8000, ++ CROM_VirtualAddress = CROM0_VirtualAddress, ++} ; ++ ++typedef struct CROM_s ++{ ++ U32 cromw0 ; // use CROMW0_ ++ U32 cromw1 ; // use CROMW1_ ++ U32 cromw2 ; // use CROMW2_ ++} volatile * CROM_t ; ++ ++enum ++{ ++ CROMW0_xloc_b = 0, ++ CROMW0_xloc_m = 0x0000003f, ++ CROMW0_yloc_b = 8, ++ CROMW0_yloc_m = 0x00003f00, ++ CROMW0_speed_b = 16, ++ CROMW0_speed_m = 0x01ff0000, ++ CROMW1_wafer_b = 0, ++ CROMW1_wafer_m = 0x0000001f, ++ CROMW1_lot_b = 8, ++ CROMW1_lot_m = 0x0fffff00, ++ CROMW1_fab_b = 28, ++ CROMW1_fab_m = 0xf0000000, ++ CROMW2_pci_b = 0, ++ CROMW2_pci_m = 0x00000001, ++ CROMW2_eth0_b = 1, ++ CROMW2_eth0_m = 0x00000002, ++ CROMW2_eth1_b = 2, ++ CROMW2_eth1_m = 0x00000004 ++ CROMW2_i2c_b = 3, ++ CROMW2_i2c_m = 0x00000008, ++ CROMW2_rng_b = 4, ++ CROMW2_rng_m = 0x00000010, ++ CROMW2_se_b = 5, ++ CROMW2_se_m = 0x00000020, ++ CROMW2_des_b = 6, ++ CROMW2_des_m = 0x00000040, ++ CROMW2_tdes_b = 7, ++ CROMW2_tdes_m = 0x00000080, ++ CROMW2_a128_b = 8, ++ CROMW2_a128_m = 0x00000100, ++ CROMW2_a192_b = 9, ++ CROMW2_a192_m = 0x00000200, ++ CROMW2_a256_b = 10, ++ CROMW2_a256_m = 0x00000400, ++ CROMW2_md5_b = 11, ++ CROMW2_md5_m = 0x00000800, ++ CROMW2_s1_b = 12, ++ CROMW2_s1_m = 0x00001000, ++ CROMW2_s256_b = 13, ++ CROMW2_s256_m = 0x00002000, ++ CROMW2_pka_b = 14, ++ CROMW2_pka_m = 0x00004000, ++ CROMW2_exp_b = 15, ++ CROMW2_exp_m = 0x00018000, ++ CROMW2_exp_8192_v = 0, ++ CROMW2_exp_1536_v = 1, ++ CROMW2_exp_1024_v = 2, ++ CROMW2_exp_512_v = 3, ++ CROMW2_rocfg_b = 17, ++ CROMW2_rocfg_m = 0x000e0000, ++} ; ++ ++#endif // __IDT_CROM_H__ +diff -urN linux.old/include/asm-mips/rc32434/ddr.h linux.dev/include/asm-mips/rc32434/ddr.h +--- linux.old/include/asm-mips/rc32434/ddr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/ddr.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,175 @@ ++#ifndef __IDT_DDR_H__ ++#define __IDT_DDR_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * DDR register definition. ++ * ++ * File : $Id: ddr.h,v 1.2 2002/06/06 18:34:03 astichte Exp $ ++ * ++ * Author : ryan.holmQVist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: ddr.h,v $ ++ * Revision 1.2 2002/06/06 18:34:03 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.1 2002/05/29 17:33:21 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ DDR0_PhysicalAddress = 0x18018000, ++ DDR_PhysicalAddress = DDR0_PhysicalAddress, // Default ++ ++ DDR0_VirtualAddress = 0xb8018000, ++ DDR_VirtualAddress = DDR0_VirtualAddress, // Default ++} ; ++ ++typedef struct DDR_s ++{ ++ U32 ddrbase ; ++ U32 ddrmask ; ++ U32 res1; ++ U32 res2; ++ U32 ddrc ; ++ U32 ddrabase ; ++ U32 ddramask ; ++ U32 ddramap ; ++ U32 ddrcust; ++ U32 ddrrdc; ++ U32 ddrspare; ++} volatile *DDR_t ; ++ ++enum ++{ ++ DDR0BASE_baseaddr_b = 16, ++ DDR0BASE_baseaddr_m = 0xffff0000, ++ ++ DDR0MASK_mask_b = 16, ++ DDR0MASK_mask_m = 0xffff0000, ++ ++ DDR1BASE_baseaddr_b = 16, ++ DDR1BASE_baseaddr_m = 0xffff0000, ++ ++ DDR1MASK_mask_b = 16, ++ DDR1MASK_mask_m = 0xffff0000, ++ ++ DDRC_ata_b = 5, ++ DDRC_ata_m = 0x000000E0, ++ DDRC_dbw_b = 8, ++ DDRC_dbw_m = 0x00000100, ++ DDRC_wr_b = 9, ++ DDRC_wr_m = 0x00000600, ++ DDRC_ps_b = 11, ++ DDRC_ps_m = 0x00001800, ++ DDRC_dtype_b = 13, ++ DDRC_dtype_m = 0x0000e000, ++ DDRC_rfc_b = 16, ++ DDRC_rfc_m = 0x000f0000, ++ DDRC_rp_b = 20, ++ DDRC_rp_m = 0x00300000, ++ DDRC_ap_b = 22, ++ DDRC_ap_m = 0x00400000, ++ DDRC_rcd_b = 23, ++ DDRC_rcd_m = 0x01800000, ++ DDRC_cl_b = 25, ++ DDRC_cl_m = 0x06000000, ++ DDRC_dbm_b = 27, ++ DDRC_dbm_m = 0x08000000, ++ DDRC_sds_b = 28, ++ DDRC_sds_m = 0x10000000, ++ DDRC_atp_b = 29, ++ DDRC_atp_m = 0x60000000, ++ DDRC_re_b = 31, ++ DDRC_re_m = 0x80000000, ++ ++ DDRRDC_ces_b = 0, ++ DDRRDC_ces_m = 0x00000001, ++ DDRRDC_ace_b = 1, ++ DDRRDC_ace_m = 0x00000002, ++ ++ DDRABASE_baseaddr_b = 16, ++ DDRABASE_baseaddr_m = 0xffff0000, ++ ++ DDRAMASK_mask_b = 16, ++ DDRAMASK_mask_m = 0xffff0000, ++ ++ DDRAMAP_map_b = 16, ++ DDRAMAP_map_m = 0xffff0000, ++ ++ DDRCUST_cs_b = 0, ++ DDRCUST_cs_m = 0x00000003, ++ DDRCUST_we_b = 2, ++ DDRCUST_we_m = 0x00000004, ++ DDRCUST_ras_b = 3, ++ DDRCUST_ras_m = 0x00000008, ++ DDRCUST_cas_b = 4, ++ DDRCUST_cas_m = 0x00000010, ++ DDRCUST_cke_b = 5, ++ DDRCUST_cke_m = 0x00000020, ++ DDRCUST_ba_b = 6, ++ DDRCUST_ba_m = 0x000000c0, ++ ++ RCOUNT_rcount_b = 0, ++ RCOUNT_rcount_m = 0x0000ffff, ++ ++ RCOMPARE_rcompare_b = 0, ++ RCOMPARE_rcompare_m = 0x0000ffff, ++ ++ RTC_ce_b = 0, ++ RTC_ce_m = 0x00000001, ++ RTC_to_b = 1, ++ RTC_to_m = 0x00000002, ++ RTC_rqe_b = 2, ++ RTC_rqe_m = 0x00000004, ++ ++ DDRDQSC_dm_b = 0, ++ DDRDQSC_dm_m = 0x00000003, ++ DDRDQSC_dqsbs_b = 2, ++ DDRDQSC_dqsbs_m = 0x000000fc, ++ DDRDQSC_db_b = 8, ++ DDRDQSC_db_m = 0x00000100, ++ DDRDQSC_dbsp_b = 9, ++ DDRDQSC_dbsp_m = 0x01fffe00, ++ DDRDQSC_bdp_b = 25, ++ DDRDQSC_bdp_m = 0x7e000000, ++ ++ DDRDLLC_eao_b = 0, ++ DDRDLLC_eao_m = 0x00000001, ++ DDRDLLC_eo_b = 1, ++ DDRDLLC_eo_m = 0x0000003e, ++ DDRDLLC_fs_b = 6, ++ DDRDLLC_fs_m = 0x000000c0, ++ DDRDLLC_as_b = 8, ++ DDRDLLC_as_m = 0x00000700, ++ DDRDLLC_sp_b = 11, ++ DDRDLLC_sp_m = 0x001ff800, ++ ++ DDRDLLFC_men_b = 0, ++ DDRDLLFC_men_m = 0x00000001, ++ DDRDLLFC_aen_b = 1, ++ DDRDLLFC_aen_m = 0x00000002, ++ DDRDLLFC_ff_b = 2, ++ DDRDLLFC_ff_m = 0x00000004, ++ ++ DDRDLLTA_addr_b = 2, ++ DDRDLLTA_addr_m = 0xfffffffc, ++ ++ DDRDLLED_dbe_b = 0, ++ DDRDLLED_dbe_m = 0x00000001, ++ DDRDLLED_dte_b = 1, ++ DDRDLLED_dte_m = 0x00000002, ++ ++ ++} ; ++ ++#endif // __IDT_DDR_H__ +diff -urN linux.old/include/asm-mips/rc32434/dev.h linux.dev/include/asm-mips/rc32434/dev.h +--- linux.old/include/asm-mips/rc32434/dev.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/dev.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,134 @@ ++#ifndef __IDT_DEV_H__ ++#define __IDT_DEV_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Device Controller register definition. ++ * ++ * File : $Id: dev.h,v 1.2 2002/06/06 18:34:03 astichte Exp $ ++ * ++ * Author : John.Ahrens@idt.com ++ * Date : 200112013 ++ * Update : ++ * $Log: dev.h,v $ ++ * Revision 1.2 2002/06/06 18:34:03 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.1 2002/05/29 17:33:21 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ DEV0_PhysicalAddress = 0x18010000, ++ DEV_PhysicalAddress = DEV0_PhysicalAddress, // Default ++ ++ DEV0_VirtualAddress = 0xb8010000, ++ DEV_VirtualAddress = DEV0_VirtualAddress, // Default ++} ; ++ ++typedef struct DEVICE_s ++{ ++ U32 devbase ; // Device Base ++ U32 devmask ; // Device Mask ++ U32 devc ; // Device Control ++ U32 devtc ; // Device Timing Control ++} volatile *DEVICE_t ; ++ ++enum ++{ ++ DEV_Count = 3, ++} ; ++ ++typedef struct DEV_s ++{ ++ struct DEVICE_s dev [DEV_Count] ; ++ U32 btcs ; // Bus timeout control / status ++ U32 btcompare ; // Compare ++ U32 btaddr ; // Timeout address. ++ U32 devdacs ; // Decoupled access control. ++ U32 devdaa ; // Decoupled access address. ++ U32 devdad ; // Decoupled access address. ++ U32 devspare ; // spare. ++} volatile *DEV_t ; ++ ++enum ++{ ++ DEVBASE_baseaddr_b = 16, ++ DEVBASE_baseaddr_m = 0xffff0000, ++ DEVMASK_mask_b = 16, ++ DEVMASK_mask_m = 0xffff0000, ++ ++ DEVC_ds_b = 0, ++ DEVC_ds_m = 0x00000003, ++ DEVC_ds_8_v = 0, // 8-bit device. ++ DEVC_ds_16_v = 1, // reserved ++ DEVC_ds_res_v = 2, // reserved. ++ DEVC_ds_res2_v = 3, // reserved. ++ DEVC_be_b = 2, ++ DEVC_be_m = 0x00000004, ++ DEVC_wp_b = 3, ++ DEVC_wp_m = 0x00000008, ++ DEVC_csd_b = 4, ++ DEVC_csd_m = 0x000000f0, ++ DEVC_oed_b = 8, ++ DEVC_oed_m = 0x00000f00, ++ DEVC_bwd_b = 12, ++ DEVC_bwd_m = 0x0000f000, ++ DEVC_rws_b = 16, ++ DEVC_rws_m = 0x003f0000, ++ DEVC_wws_b = 22, ++ DEVC_wws_m = 0x0fc00000, ++ DEVC_bre_b = 28, ++ DEVC_bre_m = 0x10000000, ++ DEVC_bwe_b = 29, ++ DEVC_bwe_m = 0x20000000, ++ DEVC_wam_b = 30, ++ DEVC_wam_m = 0x40000000, ++ ++ DEVTC_prd_b = 0, ++ DEVTC_prd_m = 0x0000000f, ++ DEVTC_pwd_b = 4, ++ DEVTC_pwd_m = 0x000000f0, ++ DEVTC_wdh_b = 8, ++ DEVTC_wdh_m = 0x00000700, ++ DEVTC_csh_b = 11, ++ DEVTC_csh_m = 0x00001800, ++ ++ BTCS_tt_b = 0, ++ BTCS_tt_m = 0x00000001, ++ BTCS_tt_write = 0, ++ BTCS_tt_read = 1, ++ BTCS_bto_b = 1, // In btcs ++ BTCS_bto_m = 0x00000002, // In btcs ++ BTCS_bte_b = 2, // In btcs ++ BTCS_bte_m = 0x00000004, // In btcs ++ ++ BTCOMPARE_compare_b = 0, // In btcompare ++ BTCOMPARE_compare_m = 0x0000ffff, // In btcompare ++ ++ DEVDACS_op_b = 0, // In devdacs ++ DEVDACS_op_m = 0x00000001, // In devdacs ++ DEVDACS_op_write_v = 0, ++ DEVDACS_op_read_v = 1, ++ DEVDACS_size_b = 1, // In devdacs ++ DEVDACS_size_m = 0x00000006, // In devdacs ++ DEVDACS_size_byte_v = 0, ++ DEVDACS_size_halfword = 1, ++ DEVDACS_size_triplebyte = 2, ++ DEVDACS_size_word = 3, ++ DEVDACS_err_b = 3, // In devdacs ++ DEVDACS_err_m = 0x00000008, // In devdacs ++ DEVDACS_f_b = 4, // In devdacs ++ DEVDACS_f_m = 0x00000010, // In devdacs ++} ; ++ ++#endif //__IDT_DEV_H__ ++ +diff -urN linux.old/include/asm-mips/rc32434/dma.h linux.dev/include/asm-mips/rc32434/dma.h +--- linux.old/include/asm-mips/rc32434/dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/dma.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,202 @@ ++#ifndef __IDT_DMA_H__ ++#define __IDT_DMA_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * DMA register definition. ++ * ++ * File : $Id: dma.h,v 1.3 2002/06/06 18:34:03 astichte Exp $ ++ * ++ * Author : ryan.holmQVist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: dma.h,v $ ++ * Revision 1.3 2002/06/06 18:34:03 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/05 18:30:46 astichte ++ * Removed IDTField ++ * ++ * Revision 1.1 2002/05/29 17:33:21 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++enum ++{ ++ DMA0_PhysicalAddress = 0x18040000, ++ DMA_PhysicalAddress = DMA0_PhysicalAddress, // Default ++ ++ DMA0_VirtualAddress = 0xb8040000, ++ DMA_VirtualAddress = DMA0_VirtualAddress, // Default ++} ; ++ ++/* ++ * DMA descriptor (in physical memory). ++ */ ++ ++typedef struct DMAD_s ++{ ++ U32 control ; // Control. use DMAD_* ++ U32 ca ; // Current Address. ++ U32 devcs ; // Device control and status. ++ U32 link ; // Next descriptor in chain. ++} volatile *DMAD_t ; ++ ++enum ++{ ++ DMAD_size = sizeof (struct DMAD_s), ++ DMAD_count_b = 0, // in DMAD_t -> control ++ DMAD_count_m = 0x0003ffff, // in DMAD_t -> control ++ DMAD_ds_b = 20, // in DMAD_t -> control ++ DMAD_ds_m = 0x00300000, // in DMAD_t -> control ++ DMAD_ds_ethRcv_v = 0, ++ DMAD_ds_ethXmt_v = 0, ++ DMAD_ds_memToFifo_v = 0, ++ DMAD_ds_fifoToMem_v = 0, ++ DMAD_ds_pciToMem_v = 0, ++ DMAD_ds_memToPci_v = 0, ++ ++ DMAD_devcmd_b = 22, // in DMAD_t -> control ++ DMAD_devcmd_m = 0x01c00000, // in DMAD_t -> control ++ DMAD_devcmd_byte_v = 0, //memory-to-memory ++ DMAD_devcmd_halfword_v = 1, //memory-to-memory ++ DMAD_devcmd_word_v = 2, //memory-to-memory ++ DMAD_devcmd_2words_v = 3, //memory-to-memory ++ DMAD_devcmd_4words_v = 4, //memory-to-memory ++ DMAD_devcmd_6words_v = 5, //memory-to-memory ++ DMAD_devcmd_8words_v = 6, //memory-to-memory ++ DMAD_devcmd_16words_v = 7, //memory-to-memory ++ DMAD_cof_b = 25, // chain on finished ++ DMAD_cof_m = 0x02000000, // ++ DMAD_cod_b = 26, // chain on done ++ DMAD_cod_m = 0x04000000, // ++ DMAD_iof_b = 27, // interrupt on finished ++ DMAD_iof_m = 0x08000000, // ++ DMAD_iod_b = 28, // interrupt on done ++ DMAD_iod_m = 0x10000000, // ++ DMAD_t_b = 29, // terminated ++ DMAD_t_m = 0x20000000, // ++ DMAD_d_b = 30, // done ++ DMAD_d_m = 0x40000000, // ++ DMAD_f_b = 31, // finished ++ DMAD_f_m = 0x80000000, // ++} ; ++ ++/* ++ * DMA register (within Internal Register Map). ++ */ ++ ++struct DMA_Chan_s ++{ ++ U32 dmac ; // Control. ++ U32 dmas ; // Status. ++ U32 dmasm ; // Mask. ++ U32 dmadptr ; // Descriptor pointer. ++ U32 dmandptr ; // Next descriptor pointer. ++}; ++ ++typedef struct DMA_Chan_s volatile *DMA_Chan_t ; ++ ++//DMA_Channels use DMACH_count instead ++ ++enum ++{ ++ DMAC_run_b = 0, // ++ DMAC_run_m = 0x00000001, // ++ DMAC_dm_b = 1, // done mask ++ DMAC_dm_m = 0x00000002, // ++ DMAC_mode_b = 2, // ++ DMAC_mode_m = 0x0000000c, // ++ DMAC_mode_auto_v = 0, ++ DMAC_mode_burst_v = 1, ++ DMAC_mode_transfer_v = 2, //usually used ++ DMAC_mode_reserved_v = 3, ++ DMAC_a_b = 4, // ++ DMAC_a_m = 0x00000010, // ++ ++ DMAS_f_b = 0, // finished (sticky) ++ DMAS_f_m = 0x00000001, // ++ DMAS_d_b = 1, // done (sticky) ++ DMAS_d_m = 0x00000002, // ++ DMAS_c_b = 2, // chain (sticky) ++ DMAS_c_m = 0x00000004, // ++ DMAS_e_b = 3, // error (sticky) ++ DMAS_e_m = 0x00000008, // ++ DMAS_h_b = 4, // halt (sticky) ++ DMAS_h_m = 0x00000010, // ++ ++ DMASM_f_b = 0, // finished (1=mask) ++ DMASM_f_m = 0x00000001, // ++ DMASM_d_b = 1, // done (1=mask) ++ DMASM_d_m = 0x00000002, // ++ DMASM_c_b = 2, // chain (1=mask) ++ DMASM_c_m = 0x00000004, // ++ DMASM_e_b = 3, // error (1=mask) ++ DMASM_e_m = 0x00000008, // ++ DMASM_h_b = 4, // halt (1=mask) ++ DMASM_h_m = 0x00000010, // ++} ; ++ ++/* ++ * DMA channel definitions ++ */ ++ ++enum ++{ ++ DMACH_ethRcv = 0, ++ DMACH_ethXmt = 1, ++ DMACH_memToFifo = 2, ++ DMACH_fifoToMem = 3, ++ DMACH_pciToMem = 4, ++ DMACH_memToPci = 5, ++ ++ DMACH_count //must be last ++}; ++ ++ ++typedef struct DMAC_s ++{ ++ struct DMA_Chan_s ch [DMACH_count] ; //use ch[DMACH_] ++} volatile *DMA_t ; ++ ++ ++/* ++ * External DMA parameters ++*/ ++#if 0 ++enum ++{ ++ DMADEVCMD_ts_b = 0, // ts field in devcmd ++ DMADEVCMD_ts_m = 0x00000007, // ts field in devcmd ++ DMADEVCMD_ts_byte_v = 0, ++ DMADEVCMD_ts_halfword_v = 1, ++ DMADEVCMD_ts_word_v = 2, ++ DMADEVCMD_ts_2word_v = 3, ++ DMADEVCMD_ts_4word_v = 4, ++ DMADEVCMD_ts_6word_v = 5, ++ DMADEVCMD_ts_8word_v = 6, ++ DMADEVCMD_ts_16word_v = 7 ++}; ++#endif ++ ++#if 1 // aws - Compatibility. ++# define EXTDMA_ts_b DMADEVCMD_ts_b ++# define EXTDMA_ts_m DMADEVCMD_ts_m ++# define EXTDMA_ts_byte_v DMADEVCMD_ts_byte_v ++# define EXTDMA_ts_halfword_v DMADEVCMD_ts_halfword_v ++# define EXTDMA_ts_word_v DMADEVCMD_ts_word_v ++# define EXTDMA_ts_2word_v DMADEVCMD_ts_2word_v ++# define EXTDMA_ts_4word_v DMADEVCMD_ts_4word_v ++# define EXTDMA_ts_6word_v DMADEVCMD_ts_6word_v ++# define EXTDMA_ts_8word_v DMADEVCMD_ts_8word_v ++# define EXTDMA_ts_16word_v DMADEVCMD_ts_16word_v ++#endif // aws - Compatibility. ++ ++#endif // __IDT_DMA_H__ ++ +diff -urN linux.old/include/asm-mips/rc32434/dma_v.h linux.dev/include/asm-mips/rc32434/dma_v.h +--- linux.old/include/asm-mips/rc32434/dma_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/dma_v.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,73 @@ ++#ifndef __IDT_DMA_V_H__ ++#define __IDT_DMA_V_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * DMA register definition. ++ * ++ * File : $Id: dma.h,v 1.3 2002/06/06 18:34:03 astichte Exp $ ++ * ++ * Author : ryan.holmQVist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: dma.h,v $ ++ * Revision 1.3 2002/06/06 18:34:03 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/05 18:30:46 astichte ++ * Removed IDTField ++ * ++ * Revision 1.1 2002/05/29 17:33:21 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++#include <asm/rc32434/types.h> ++#include <asm/rc32434/dma.h> ++#include <asm/rc32434/rc32434.h> ++#define DMA_CHAN_OFFSET 0x14 ++#define IS_DMA_USED(X) (((X) & (DMAD_f_m | DMAD_d_m | DMAD_t_m)) != 0) ++#define DMA_COUNT(count) \ ++ ((count) & DMAD_count_m) ++ ++#define DMA_HALT_TIMEOUT 500 ++ ++ ++static inline int rc32434_halt_dma(DMA_Chan_t ch) ++{ ++ int timeout=1; ++ if (local_readl(&ch->dmac) & DMAC_run_m) { ++ local_writel(0, &ch->dmac); ++ for (timeout = DMA_HALT_TIMEOUT; timeout > 0; timeout--) { ++ if (local_readl(&ch->dmas) & DMAS_h_m) { ++ local_writel(0, &ch->dmas); ++ break; ++ } ++ } ++ } ++ ++ return timeout ? 0 : 1; ++} ++ ++static inline void rc32434_start_dma(DMA_Chan_t ch, u32 dma_addr) ++{ ++ local_writel(0, &ch->dmandptr); ++ local_writel(dma_addr, &ch->dmadptr); ++} ++ ++static inline void rc32434_chain_dma(DMA_Chan_t ch, u32 dma_addr) ++{ ++ local_writel(dma_addr, &ch->dmandptr); ++} ++ ++#endif // __IDT_DMA_V_H__ ++ ++ ++ ++ ++ ++ ++ +diff -urN linux.old/include/asm-mips/rc32434/eth.h linux.dev/include/asm-mips/rc32434/eth.h +--- linux.old/include/asm-mips/rc32434/eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/eth.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,322 @@ ++#ifndef __IDT_ETH_H__ ++#define __IDT_ETH_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Ethernet register definition. ++ * ++ * File : $Id: eth.h,v 1.3 2002/06/06 18:34:04 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020605 ++ * Update : ++ * $Log: eth.h,v $ ++ * Revision 1.3 2002/06/06 18:34:04 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/05 18:19:46 astichte ++ * Added ++ * ++ * Revision 1.1 2002/05/29 17:33:22 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ ETH0_PhysicalAddress = 0x18060000, ++ ETH_PhysicalAddress = ETH0_PhysicalAddress, // Default ++ ++ ETH0_VirtualAddress = 0xb8060000, ++ ETH_VirtualAddress = ETH0_VirtualAddress, // Default ++} ; ++ ++typedef struct ++{ ++ U32 ethintfc ; ++ U32 ethfifott ; ++ U32 etharc ; ++ U32 ethhash0 ; ++ U32 ethhash1 ; ++ U32 ethu0 [4] ; // Reserved. ++ U32 ethpfs ; ++ U32 ethmcp ; ++ U32 eth_u1 [10] ; // Reserved. ++ U32 ethspare ; ++ U32 eth_u2 [42] ; // Reserved. ++ U32 ethsal0 ; ++ U32 ethsah0 ; ++ U32 ethsal1 ; ++ U32 ethsah1 ; ++ U32 ethsal2 ; ++ U32 ethsah2 ; ++ U32 ethsal3 ; ++ U32 ethsah3 ; ++ U32 ethrbc ; ++ U32 ethrpc ; ++ U32 ethrupc ; ++ U32 ethrfc ; ++ U32 ethtbc ; ++ U32 ethgpf ; ++ U32 eth_u9 [50] ; // Reserved. ++ U32 ethmac1 ; ++ U32 ethmac2 ; ++ U32 ethipgt ; ++ U32 ethipgr ; ++ U32 ethclrt ; ++ U32 ethmaxf ; ++ U32 eth_u10 ; // Reserved. ++ U32 ethmtest ; ++ U32 miimcfg ; ++ U32 miimcmd ; ++ U32 miimaddr ; ++ U32 miimwtd ; ++ U32 miimrdd ; ++ U32 miimind ; ++ U32 eth_u11 ; // Reserved. ++ U32 eth_u12 ; // Reserved. ++ U32 ethcfsa0 ; ++ U32 ethcfsa1 ; ++ U32 ethcfsa2 ; ++} volatile *ETH_t; ++ ++enum ++{ ++ ETHINTFC_en_b = 0, ++ ETHINTFC_en_m = 0x00000001, ++ ETHINTFC_its_b = 1, ++ ETHINTFC_its_m = 0x00000002, ++ ETHINTFC_rip_b = 2, ++ ETHINTFC_rip_m = 0x00000004, ++ ETHINTFC_jam_b = 3, ++ ETHINTFC_jam_m = 0x00000008, ++ ETHINTFC_ovr_b = 4, ++ ETHINTFC_ovr_m = 0x00000010, ++ ETHINTFC_und_b = 5, ++ ETHINTFC_und_m = 0x00000020, ++ ETHINTFC_iom_b = 6, ++ ETHINTFC_iom_m = 0x000000c0, ++ ++ ETHFIFOTT_tth_b = 0, ++ ETHFIFOTT_tth_m = 0x0000007f, ++ ++ ETHARC_pro_b = 0, ++ ETHARC_pro_m = 0x00000001, ++ ETHARC_am_b = 1, ++ ETHARC_am_m = 0x00000002, ++ ETHARC_afm_b = 2, ++ ETHARC_afm_m = 0x00000004, ++ ETHARC_ab_b = 3, ++ ETHARC_ab_m = 0x00000008, ++ ++ ETHSAL_byte5_b = 0, ++ ETHSAL_byte5_m = 0x000000ff, ++ ETHSAL_byte4_b = 8, ++ ETHSAL_byte4_m = 0x0000ff00, ++ ETHSAL_byte3_b = 16, ++ ETHSAL_byte3_m = 0x00ff0000, ++ ETHSAL_byte2_b = 24, ++ ETHSAL_byte2_m = 0xff000000, ++ ++ ETHSAH_byte1_b = 0, ++ ETHSAH_byte1_m = 0x000000ff, ++ ETHSAH_byte0_b = 8, ++ ETHSAH_byte0_m = 0x0000ff00, ++ ++ ETHGPF_ptv_b = 0, ++ ETHGPF_ptv_m = 0x0000ffff, ++ ++ ETHPFS_pfd_b = 0, ++ ETHPFS_pfd_m = 0x00000001, ++ ++ ETHCFSA0_cfsa4_b = 0, ++ ETHCFSA0_cfsa4_m = 0x000000ff, ++ ETHCFSA0_cfsa5_b = 8, ++ ETHCFSA0_cfsa5_m = 0x0000ff00, ++ ++ ETHCFSA1_cfsa2_b = 0, ++ ETHCFSA1_cfsa2_m = 0x000000ff, ++ ETHCFSA1_cfsa3_b = 8, ++ ETHCFSA1_cfsa3_m = 0x0000ff00, ++ ++ ETHCFSA2_cfsa0_b = 0, ++ ETHCFSA2_cfsa0_m = 0x000000ff, ++ ETHCFSA2_cfsa1_b = 8, ++ ETHCFSA2_cfsa1_m = 0x0000ff00, ++ ++ ETHMAC1_re_b = 0, ++ ETHMAC1_re_m = 0x00000001, ++ ETHMAC1_paf_b = 1, ++ ETHMAC1_paf_m = 0x00000002, ++ ETHMAC1_rfc_b = 2, ++ ETHMAC1_rfc_m = 0x00000004, ++ ETHMAC1_tfc_b = 3, ++ ETHMAC1_tfc_m = 0x00000008, ++ ETHMAC1_lb_b = 4, ++ ETHMAC1_lb_m = 0x00000010, ++ ETHMAC1_mr_b = 31, ++ ETHMAC1_mr_m = 0x80000000, ++ ++ ETHMAC2_fd_b = 0, ++ ETHMAC2_fd_m = 0x00000001, ++ ETHMAC2_flc_b = 1, ++ ETHMAC2_flc_m = 0x00000002, ++ ETHMAC2_hfe_b = 2, ++ ETHMAC2_hfe_m = 0x00000004, ++ ETHMAC2_dc_b = 3, ++ ETHMAC2_dc_m = 0x00000008, ++ ETHMAC2_cen_b = 4, ++ ETHMAC2_cen_m = 0x00000010, ++ ETHMAC2_pe_b = 5, ++ ETHMAC2_pe_m = 0x00000020, ++ ETHMAC2_vpe_b = 6, ++ ETHMAC2_vpe_m = 0x00000040, ++ ETHMAC2_ape_b = 7, ++ ETHMAC2_ape_m = 0x00000080, ++ ETHMAC2_ppe_b = 8, ++ ETHMAC2_ppe_m = 0x00000100, ++ ETHMAC2_lpe_b = 9, ++ ETHMAC2_lpe_m = 0x00000200, ++ ETHMAC2_nb_b = 12, ++ ETHMAC2_nb_m = 0x00001000, ++ ETHMAC2_bp_b = 13, ++ ETHMAC2_bp_m = 0x00002000, ++ ETHMAC2_ed_b = 14, ++ ETHMAC2_ed_m = 0x00004000, ++ ++ ETHIPGT_ipgt_b = 0, ++ ETHIPGT_ipgt_m = 0x0000007f, ++ ++ ETHIPGR_ipgr2_b = 0, ++ ETHIPGR_ipgr2_m = 0x0000007f, ++ ETHIPGR_ipgr1_b = 8, ++ ETHIPGR_ipgr1_m = 0x00007f00, ++ ++ ETHCLRT_maxret_b = 0, ++ ETHCLRT_maxret_m = 0x0000000f, ++ ETHCLRT_colwin_b = 8, ++ ETHCLRT_colwin_m = 0x00003f00, ++ ++ ETHMAXF_maxf_b = 0, ++ ETHMAXF_maxf_m = 0x0000ffff, ++ ++ ETHMTEST_tb_b = 2, ++ ETHMTEST_tb_m = 0x00000004, ++ ++ ETHMCP_div_b = 0, ++ ETHMCP_div_m = 0x000000ff, ++ ++ MIIMCFG_rsv_b = 0, ++ MIIMCFG_rsv_m = 0x0000000c, ++ ++ MIIMCMD_rd_b = 0, ++ MIIMCMD_rd_m = 0x00000001, ++ MIIMCMD_scn_b = 1, ++ MIIMCMD_scn_m = 0x00000002, ++ ++ MIIMADDR_regaddr_b = 0, ++ MIIMADDR_regaddr_m = 0x0000001f, ++ MIIMADDR_phyaddr_b = 8, ++ MIIMADDR_phyaddr_m = 0x00001f00, ++ ++ MIIMWTD_wdata_b = 0, ++ MIIMWTD_wdata_m = 0x0000ffff, ++ ++ MIIMRDD_rdata_b = 0, ++ MIIMRDD_rdata_m = 0x0000ffff, ++ ++ MIIMIND_bsy_b = 0, ++ MIIMIND_bsy_m = 0x00000001, ++ MIIMIND_scn_b = 1, ++ MIIMIND_scn_m = 0x00000002, ++ MIIMIND_nv_b = 2, ++ MIIMIND_nv_m = 0x00000004, ++ ++} ; ++ ++/* ++ * Values for the DEVCS field of the Ethernet DMA Rx and Tx descriptors. ++ */ ++enum ++{ ++ ETHRX_fd_b = 0, ++ ETHRX_fd_m = 0x00000001, ++ ETHRX_ld_b = 1, ++ ETHRX_ld_m = 0x00000002, ++ ETHRX_rok_b = 2, ++ ETHRX_rok_m = 0x00000004, ++ ETHRX_fm_b = 3, ++ ETHRX_fm_m = 0x00000008, ++ ETHRX_mp_b = 4, ++ ETHRX_mp_m = 0x00000010, ++ ETHRX_bp_b = 5, ++ ETHRX_bp_m = 0x00000020, ++ ETHRX_vlt_b = 6, ++ ETHRX_vlt_m = 0x00000040, ++ ETHRX_cf_b = 7, ++ ETHRX_cf_m = 0x00000080, ++ ETHRX_ovr_b = 8, ++ ETHRX_ovr_m = 0x00000100, ++ ETHRX_crc_b = 9, ++ ETHRX_crc_m = 0x00000200, ++ ETHRX_cv_b = 10, ++ ETHRX_cv_m = 0x00000400, ++ ETHRX_db_b = 11, ++ ETHRX_db_m = 0x00000800, ++ ETHRX_le_b = 12, ++ ETHRX_le_m = 0x00001000, ++ ETHRX_lor_b = 13, ++ ETHRX_lor_m = 0x00002000, ++ ETHRX_ces_b = 14, ++ ETHRX_ces_m = 0x00004000, ++ ETHRX_length_b = 16, ++ ETHRX_length_m = 0xffff0000, ++ ++ ETHTX_fd_b = 0, ++ ETHTX_fd_m = 0x00000001, ++ ETHTX_ld_b = 1, ++ ETHTX_ld_m = 0x00000002, ++ ETHTX_oen_b = 2, ++ ETHTX_oen_m = 0x00000004, ++ ETHTX_pen_b = 3, ++ ETHTX_pen_m = 0x00000008, ++ ETHTX_cen_b = 4, ++ ETHTX_cen_m = 0x00000010, ++ ETHTX_hen_b = 5, ++ ETHTX_hen_m = 0x00000020, ++ ETHTX_tok_b = 6, ++ ETHTX_tok_m = 0x00000040, ++ ETHTX_mp_b = 7, ++ ETHTX_mp_m = 0x00000080, ++ ETHTX_bp_b = 8, ++ ETHTX_bp_m = 0x00000100, ++ ETHTX_und_b = 9, ++ ETHTX_und_m = 0x00000200, ++ ETHTX_of_b = 10, ++ ETHTX_of_m = 0x00000400, ++ ETHTX_ed_b = 11, ++ ETHTX_ed_m = 0x00000800, ++ ETHTX_ec_b = 12, ++ ETHTX_ec_m = 0x00001000, ++ ETHTX_lc_b = 13, ++ ETHTX_lc_m = 0x00002000, ++ ETHTX_td_b = 14, ++ ETHTX_td_m = 0x00004000, ++ ETHTX_crc_b = 15, ++ ETHTX_crc_m = 0x00008000, ++ ETHTX_le_b = 16, ++ ETHTX_le_m = 0x00010000, ++ ETHTX_cc_b = 17, ++ ETHTX_cc_m = 0x001E0000, ++} ; ++ ++#endif // __IDT_ETH_H__ ++ ++ ++ ++ +diff -urN linux.old/include/asm-mips/rc32434/eth_v.h linux.dev/include/asm-mips/rc32434/eth_v.h +--- linux.old/include/asm-mips/rc32434/eth_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/eth_v.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,64 @@ ++#ifndef __IDT_ETH_V_H__ ++#define __IDT_ETH_V_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Ethernet register definition. ++ * ++ * File : $Id: eth.h,v 1.3 2002/06/06 18:34:04 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020605 ++ * Update : ++ * $Log: eth.h,v $ ++ * Revision 1.3 2002/06/06 18:34:04 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/05 18:19:46 astichte ++ * Added ++ * ++ * Revision 1.1 2002/05/29 17:33:22 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++#include <asm/rc32434/eth.h> ++ ++#define IS_TX_TOK(X) (((X) & (1<<ETHTX_tok_b)) >> ETHTX_tok_b ) /* Transmit Okay */ ++#define IS_TX_MP(X) (((X) & (1<<ETHTX_mp_b)) >> ETHTX_mp_b ) /* Multicast */ ++#define IS_TX_BP(X) (((X) & (1<<ETHTX_bp_b)) >> ETHTX_bp_b ) /* Broadcast */ ++#define IS_TX_UND_ERR(X) (((X) & (1<<ETHTX_und_b)) >> ETHTX_und_b ) /* Transmit FIFO Underflow */ ++#define IS_TX_OF_ERR(X) (((X) & (1<<ETHTX_of_b)) >> ETHTX_of_b ) /* Oversized frame */ ++#define IS_TX_ED_ERR(X) (((X) & (1<<ETHTX_ed_b)) >> ETHTX_ed_b ) /* Excessive deferral */ ++#define IS_TX_EC_ERR(X) (((X) & (1<<ETHTX_ec_b)) >> ETHTX_ec_b) /* Excessive collisions */ ++#define IS_TX_LC_ERR(X) (((X) & (1<<ETHTX_lc_b)) >> ETHTX_lc_b ) /* Late Collision */ ++#define IS_TX_TD_ERR(X) (((X) & (1<<ETHTX_td_b)) >> ETHTX_td_b ) /* Transmit deferred*/ ++#define IS_TX_CRC_ERR(X) (((X) & (1<<ETHTX_crc_b)) >> ETHTX_crc_b ) /* CRC Error */ ++#define IS_TX_LE_ERR(X) (((X) & (1<<ETHTX_le_b)) >> ETHTX_le_b ) /* Length Error */ ++ ++#define TX_COLLISION_COUNT(X) (((X) & ETHTX_cc_m)>>ETHTX_cc_b) /* Collision Count */ ++ ++#define IS_RCV_ROK(X) (((X) & (1<<ETHRX_rok_b)) >> ETHRX_rok_b) /* Receive Okay */ ++#define IS_RCV_FM(X) (((X) & (1<<ETHRX_fm_b)) >> ETHRX_fm_b) /* Is Filter Match */ ++#define IS_RCV_MP(X) (((X) & (1<<ETHRX_mp_b)) >> ETHRX_mp_b) /* Is it MP */ ++#define IS_RCV_BP(X) (((X) & (1<<ETHRX_bp_b)) >> ETHRX_bp_b) /* Is it BP */ ++#define IS_RCV_VLT(X) (((X) & (1<<ETHRX_vlt_b)) >> ETHRX_vlt_b) /* VLAN Tag Detect */ ++#define IS_RCV_CF(X) (((X) & (1<<ETHRX_cf_b)) >> ETHRX_cf_b) /* Control Frame */ ++#define IS_RCV_OVR_ERR(X) (((X) & (1<<ETHRX_ovr_b)) >> ETHRX_ovr_b) /* Receive Overflow */ ++#define IS_RCV_CRC_ERR(X) (((X) & (1<<ETHRX_crc_b)) >> ETHRX_crc_b) /* CRC Error */ ++#define IS_RCV_CV_ERR(X) (((X) & (1<<ETHRX_cv_b)) >> ETHRX_cv_b) /* Code Violation */ ++#define IS_RCV_DB_ERR(X) (((X) & (1<<ETHRX_db_b)) >> ETHRX_db_b) /* Dribble Bits */ ++#define IS_RCV_LE_ERR(X) (((X) & (1<<ETHRX_le_b)) >> ETHRX_le_b) /* Length error */ ++#define IS_RCV_LOR_ERR(X) (((X) & (1<<ETHRX_lor_b)) >> ETHRX_lor_b) /* Length Out of Range */ ++#define IS_RCV_CES_ERR(X) (((X) & (1<<ETHRX_ces_b)) >> ETHRX_ces_b) /* Preamble error */ ++#define RCVPKT_LENGTH(X) (((X) & ETHRX_length_m) >> ETHRX_length_b) /* Length of the received packet */ ++#endif // __IDT_ETH_V_H__ ++ ++ ++ ++ ++ +diff -urN linux.old/include/asm-mips/rc32434/gpio.h linux.dev/include/asm-mips/rc32434/gpio.h +--- linux.old/include/asm-mips/rc32434/gpio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/gpio.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,182 @@ ++#ifndef __IDT_GPIO_H__ ++#define __IDT_GPIO_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * GPIO register definition. ++ * ++ * File : $Id: gpio.h,v 1.2 2002/06/06 18:34:04 astichte Exp $ ++ * ++ * Author : ryan.holmQVist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: gpio.h,v $ ++ * Revision 1.2 2002/06/06 18:34:04 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.1 2002/05/29 17:33:22 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++enum ++{ ++ GPIO0_PhysicalAddress = 0x18050000, ++ GPIO_PhysicalAddress = GPIO0_PhysicalAddress, // Default ++ ++ GPIO0_VirtualAddress = 0xb8050000, ++ GPIO_VirtualAddress = GPIO0_VirtualAddress, // Default ++} ; ++ ++typedef struct ++{ ++ U32 gpiofunc; /* GPIO Function Register ++ * gpiofunc[x]==0 bit = gpio ++ * func[x]==1 bit = altfunc ++ */ ++ U32 gpiocfg; /* GPIO Configuration Register ++ * gpiocfg[x]==0 bit = input ++ * gpiocfg[x]==1 bit = output ++ */ ++ U32 gpiod; /* GPIO Data Register ++ * gpiod[x] read/write gpio pinX status ++ */ ++ U32 gpioilevel; /* GPIO Interrupt Status Register ++ * interrupt level (see gpioistat) ++ */ ++ U32 gpioistat; /* Gpio Interrupt Status Register ++ * istat[x] = (gpiod[x] == level[x]) ++ * cleared in ISR (STICKY bits) ++ */ ++ U32 gpionmien; /* GPIO Non-maskable Interrupt Enable Register */ ++} volatile * GPIO_t ; ++ ++typedef enum ++{ ++ GPIO_gpio_v = 0, // gpiofunc use pin as GPIO. ++ GPIO_alt_v = 1, // gpiofunc use pin as alt. ++ GPIO_input_v = 0, // gpiocfg use pin as input. ++ GPIO_output_v = 1, // gpiocfg use pin as output. ++ GPIO_pin0_b = 0, ++ GPIO_pin0_m = 0x00000001, ++ GPIO_pin1_b = 1, ++ GPIO_pin1_m = 0x00000002, ++ GPIO_pin2_b = 2, ++ GPIO_pin2_m = 0x00000004, ++ GPIO_pin3_b = 3, ++ GPIO_pin3_m = 0x00000008, ++ GPIO_pin4_b = 4, ++ GPIO_pin4_m = 0x00000010, ++ GPIO_pin5_b = 5, ++ GPIO_pin5_m = 0x00000020, ++ GPIO_pin6_b = 6, ++ GPIO_pin6_m = 0x00000040, ++ GPIO_pin7_b = 7, ++ GPIO_pin7_m = 0x00000080, ++ GPIO_pin8_b = 8, ++ GPIO_pin8_m = 0x00000100, ++ GPIO_pin9_b = 9, ++ GPIO_pin9_m = 0x00000200, ++ GPIO_pin10_b = 10, ++ GPIO_pin10_m = 0x00000400, ++ GPIO_pin11_b = 11, ++ GPIO_pin11_m = 0x00000800, ++ GPIO_pin12_b = 12, ++ GPIO_pin12_m = 0x00001000, ++ GPIO_pin13_b = 13, ++ GPIO_pin13_m = 0x00002000, ++ GPIO_pin14_b = 14, ++ GPIO_pin14_m = 0x00004000, ++ GPIO_pin15_b = 15, ++ GPIO_pin15_m = 0x00008000, ++ GPIO_pin16_b = 16, ++ GPIO_pin16_m = 0x00010000, ++ GPIO_pin17_b = 17, ++ GPIO_pin17_m = 0x00020000, ++ GPIO_pin18_b = 18, ++ GPIO_pin18_m = 0x00040000, ++ GPIO_pin19_b = 19, ++ GPIO_pin19_m = 0x00080000, ++ GPIO_pin20_b = 20, ++ GPIO_pin20_m = 0x00100000, ++ GPIO_pin21_b = 21, ++ GPIO_pin21_m = 0x00200000, ++ GPIO_pin22_b = 22, ++ GPIO_pin22_m = 0x00400000, ++ GPIO_pin23_b = 23, ++ GPIO_pin23_m = 0x00800000, ++ GPIO_pin24_b = 24, ++ GPIO_pin24_m = 0x01000000, ++ GPIO_pin25_b = 25, ++ GPIO_pin25_m = 0x02000000, ++ GPIO_pin26_b = 26, ++ GPIO_pin26_m = 0x04000000, ++ GPIO_pin27_b = 27, ++ GPIO_pin27_m = 0x08000000, ++ GPIO_pin28_b = 28, ++ GPIO_pin28_m = 0x10000000, ++ GPIO_pin29_b = 29, ++ GPIO_pin29_m = 0x20000000, ++ GPIO_pin30_b = 30, ++ GPIO_pin30_m = 0x40000000, ++ GPIO_pin31_b = 31, ++ GPIO_pin31_m = 0x80000000, ++ ++// Alternate function pins. Corrsponding gpiofunc bit set to GPIO_alt_v. ++ ++ GPIO_u0sout_b = GPIO_pin0_b, // UART 0 serial out. ++ GPIO_u0sout_m = GPIO_pin0_m, ++ GPIO_u0sout_cfg_v = GPIO_output_v, ++ GPIO_u0sinp_b = GPIO_pin1_b, // UART 0 serial in. ++ GPIO_u0sinp_m = GPIO_pin1_m, ++ GPIO_u0sinp_cfg_v = GPIO_input_v, ++ GPIO_u0rtsn_b = GPIO_pin2_b, // UART 0 req. to send. ++ GPIO_u0rtsn_m = GPIO_pin2_m, ++ GPIO_u0rtsn_cfg_v = GPIO_output_v, ++ GPIO_u0ctsn_b = GPIO_pin3_b, // UART 0 clear to send. ++ GPIO_u0ctsn_m = GPIO_pin3_m, ++ GPIO_u0ctsn_cfg_v = GPIO_input_v, ++ GPIO_maddr22_b = GPIO_pin4_b, // M&P bus bit 22. ++ GPIO_maddr22_m = GPIO_pin4_m, ++ GPIO_maddr22_cfg_v = GPIO_output_v, ++ ++ GPIO_maddr23_b = GPIO_pin5_b, // M&P bus bit 23. ++ GPIO_maddr23_m = GPIO_pin5_m, ++ GPIO_maddr23_cfg_v = GPIO_output_v, ++ ++ GPIO_maddr24_b = GPIO_pin6_b, // M&P bus bit 24. ++ GPIO_maddr24_m = GPIO_pin6_m, ++ GPIO_maddr24_cfg_v = GPIO_output_v, ++ ++ GPIO_maddr25_b = GPIO_pin7_b, // M&P bus bit 25. ++ GPIO_maddr25_m = GPIO_pin7_m, ++ GPIO_maddr25_cfg_v = GPIO_output_v, ++ ++ GPIO_cpu_b = GPIO_pin8_b, // M&P bus bit 25. ++ GPIO_cpu_m = GPIO_pin8_m, ++ GPIO_cpu_cfg_v = GPIO_output_v, ++ GPIO_afspare6_b = GPIO_pin9_b, // reserved. ++ GPIO_afspare6_m = GPIO_pin9_m, ++ GPIO_afspare6_cfg_v = GPIO_input_v, ++ GPIO_afspare4_b = GPIO_pin10_b, // reserved. ++ GPIO_afspare4_m = GPIO_pin10_m, ++ GPIO_afspare4_cfg_v = GPIO_input_v, ++ GPIO_afspare3_b = GPIO_pin11_b, // reserved. ++ GPIO_afspare3_m = GPIO_pin11_m, ++ GPIO_afspare3_cfg_v = GPIO_input_v, ++ GPIO_afspare2_b = GPIO_pin12_b, // reserved. ++ GPIO_afspare2_m = GPIO_pin12_m, ++ GPIO_afspare2_cfg_v = GPIO_input_v, ++ GPIO_pcimuintn_b = GPIO_pin13_b, // PCI messaging int. ++ GPIO_pcimuintn_m = GPIO_pin13_m, ++ GPIO_pcimuintn_cfg_v = GPIO_output_v, ++ ++} GPIO_DEFS_t; ++ ++#endif // __IDT_GPIO_H__ ++ +diff -urN linux.old/include/asm-mips/rc32434/i2c.h linux.dev/include/asm-mips/rc32434/i2c.h +--- linux.old/include/asm-mips/rc32434/i2c.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/i2c.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,147 @@ ++#ifndef __IDT_I2C_H__ ++#define __IDT_I2C_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * I2C register definitions. ++ * ++ * File : $Id: i2c.h,v 1.2 2002/06/06 18:34:04 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020120 ++ * Update : ++ * $Log: i2c.h,v $ ++ * Revision 1.2 2002/06/06 18:34:04 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.1 2002/05/29 17:33:22 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ I2C0_PhysicalAddress = 0x18068000, ++ I2C_PhysicalAddress = I2C0_PhysicalAddress, ++ ++ I2C0_VirtualAddress = 0xb8068000, ++ I2C_VirtualAddress = I2C0_VirtualAddress, ++} ; ++ ++typedef struct ++{ ++ U32 i2cc ; ++ U32 i2cdi ; ++ U32 i2cdo ; ++ U32 i2ccp ; // I2C clk = ICLK / div / 8 ++ U32 i2cmcmd ; ++ U32 i2cms ; ++ U32 i2cmsm ; ++ U32 i2css ; ++ U32 i2cssm ; ++ U32 i2csaddr ; ++ U32 i2csack ; ++} volatile * I2C_t ; ++enum ++{ ++ I2CC_men_b = 0, // In I2C-> i2cc ++ I2CC_men_m = 0x00000001, ++ I2CC_sen_b = 1, // In I2C-> i2cc ++ I2CC_sen_m = 0x00000002, ++ I2CC_iom_b = 2, // In I2C-> i2cc ++ I2CC_iom_m = 0x00000004, ++ ++ I2CDI_data_b = 0, // In I2C-> i2cdi ++ I2CDI_data_m = 0x000000ff, ++ ++ I2CDO_data_b = 0, // In I2C-> i2cdo ++ I2CDO_data_m = 0x000000ff, ++ ++ I2CCP_div_b = 0, // In I2C-> i2ccp ++ I2CCP_div_m = 0x0000ffff, ++ ++ I2CMCMD_cmd_b = 0, // In I2C-> i2cmcmd ++ I2CMCMD_cmd_m = 0x0000000f, ++ I2CMCMD_cmd_nop_v = 0, ++ I2CMCMD_cmd_start_v = 1, ++ I2CMCMD_cmd_stop_v = 2, ++ I2CMCMD_cmd_res3_v = 3, ++ I2CMCMD_cmd_rd_v = 4, ++ I2CMCMD_cmd_rdack_v = 5, ++ I2CMCMD_cmd_wd_v = 6, ++ I2CMCMD_cmd_wdack_v = 7, ++ I2CMCMD_cmd_res8_v = 8, ++ I2CMCMD_cmd_res9_v = 9, ++ I2CMCMD_cmd_res10_v = 10, ++ I2CMCMD_cmd_res11_v = 11, ++ I2CMCMD_cmd_res12_v = 12, ++ I2CMCMD_cmd_res13_v = 13, ++ I2CMCMD_cmd_res14_v = 14, ++ I2CMCMD_cmd_res15_v = 15, ++ ++ I2CMS_d_b = 0, // In I2C-> i2cms ++ I2CMS_d_m = 0x00000001, ++ I2CMS_na_b = 1, // In I2C-> i2cms ++ I2CMS_na_m = 0x00000002, ++ I2CMS_la_b = 2, // In I2C-> i2cms ++ I2CMS_la_m = 0x00000004, ++ I2CMS_err_b = 3, // In I2C-> i2cms ++ I2CMS_err_m = 0x00000008, ++ ++ I2CMSM_d_b = 0, // In I2C-> i2cmsm ++ I2CMSM_d_m = 0x00000001, ++ I2CMSM_na_b = 1, // In I2C-> i2cmsm ++ I2CMSM_na_m = 0x00000002, ++ I2CMSM_la_b = 2, // In I2C-> i2cmsm ++ I2CMSM_la_m = 0x00000004, ++ I2CMSM_err_b = 3, // In I2C-> i2cmsm ++ I2CMSM_err_m = 0x00000008, ++ ++ I2CSS_rr_b = 0, // In I2C-> i2css ++ I2CSS_rr_m = 0x00000001, ++ I2CSS_wr_b = 1, // In I2C-> i2css ++ I2CSS_wr_m = 0x00000002, ++ I2CSS_sa_b = 2, // In I2C-> i2css ++ I2CSS_sa_m = 0x00000004, ++ I2CSS_tf_b = 3, // In I2C-> i2css ++ I2CSS_tf_m = 0x00000008, ++ I2CSS_gc_b = 4, // In I2C-> i2css ++ I2CSS_gc_m = 0x00000010, ++ I2CSS_na_b = 5, // In I2C-> i2css ++ I2CSS_na_m = 0x00000020, ++ I2CSS_err_b = 6, // In I2C-> i2css ++ I2CSS_err_m = 0x00000040, ++ ++ I2CSSM_rr_b = 0, // In I2C-> i2cssm ++ I2CSSM_rr_m = 0x00000001, ++ I2CSSM_wr_b = 1, // In I2C-> i2cssm ++ I2CSSM_wr_m = 0x00000002, ++ I2CSSM_sa_b = 2, // In I2C-> i2cssm ++ I2CSSM_sa_m = 0x00000004, ++ I2CSSM_tf_b = 3, // In I2C-> i2cssm ++ I2CSSM_tf_m = 0x00000008, ++ I2CSSM_gc_b = 4, // In I2C-> i2cssm ++ I2CSSM_gc_m = 0x00000010, ++ I2CSSM_na_b = 5, // In I2C-> i2cssm ++ I2CSSM_na_m = 0x00000020, ++ I2CSSM_err_b = 6, // In I2C-> i2cssm ++ I2CSSM_err_m = 0x00000040, ++ ++ I2CSADDR_addr_b = 0, // In I2C-> i2csaddr ++ I2CSADDR_addr_m = 0x000003ff, ++ I2CSADDR_a_gc_b = 10, // In I2C-> i2csaddr ++ I2CSADDR_a_gc_m = 0x00000400, ++ I2CSADDR_a10_b = 11, // In I2C-> i2csaddr ++ I2CSADDR_a10_m = 0x00000800, ++ ++ I2CSACK_ack_b = 0, // In I2C-> i2csack ++ I2CSACK_ack_m = 0x00000001, ++ ++} ; ++#endif // __IDT_I2C_H__ +diff -urN linux.old/include/asm-mips/rc32434/integ.h linux.dev/include/asm-mips/rc32434/integ.h +--- linux.old/include/asm-mips/rc32434/integ.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/integ.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,78 @@ ++#ifndef __IDT_INTEG_H__ ++#define __IDT_INTEG_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * System Integrity register definition. ++ * ++ * File : $Id: integ.h,v 1.3 2002/06/06 18:34:04 astichte Exp $ ++ * ++ * Author : ryan.holmQVist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: integ.h,v $ ++ * Revision 1.3 2002/06/06 18:34:04 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/05 18:32:33 astichte ++ * Removed IDTField ++ * ++ * Revision 1.1 2002/05/29 17:33:22 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ INTEG0_PhysicalAddress = 0x18030000, ++ INTEG_PhysicalAddress = INTEG0_PhysicalAddress, // Default ++ ++ INTEG0_VirtualAddress = 0xb8030000, ++ INTEG_VirtualAddress = INTEG0_VirtualAddress, // Default ++} ; ++ ++// if you are looing for CEA, try rst.h ++typedef struct ++{ ++ U32 filler [0xc] ; // 0x30 bytes unused. ++ U32 errcs ; // sticky use ERRCS_ ++ U32 wtcount ; // Watchdog timer count reg. ++ U32 wtcompare ; // Watchdog timer timeout value. ++ U32 wtc ; // Watchdog timer control. use WTC_ ++} volatile *INTEG_t ; ++ ++enum ++{ ++ ERRCS_wto_b = 0, // In INTEG_t -> errcs ++ ERRCS_wto_m = 0x00000001, ++ ERRCS_wne_b = 1, // In INTEG_t -> errcs ++ ERRCS_wne_m = 0x00000002, ++ ERRCS_ucw_b = 2, // In INTEG_t -> errcs ++ ERRCS_ucw_m = 0x00000004, ++ ERRCS_ucr_b = 3, // In INTEG_t -> errcs ++ ERRCS_ucr_m = 0x00000008, ++ ERRCS_upw_b = 4, // In INTEG_t -> errcs ++ ERRCS_upw_m = 0x00000010, ++ ERRCS_upr_b = 5, // In INTEG_t -> errcs ++ ERRCS_upr_m = 0x00000020, ++ ERRCS_udw_b = 6, // In INTEG_t -> errcs ++ ERRCS_udw_m = 0x00000040, ++ ERRCS_udr_b = 7, // In INTEG_t -> errcs ++ ERRCS_udr_m = 0x00000080, ++ ERRCS_sae_b = 8, // In INTEG_t -> errcs ++ ERRCS_sae_m = 0x00000100, ++ ERRCS_wre_b = 9, // In INTEG_t -> errcs ++ ERRCS_wre_m = 0x00000200, ++ ++ WTC_en_b = 0, // In INTEG_t -> wtc ++ WTC_en_m = 0x00000001, ++ WTC_to_b = 1, // In INTEG_t -> wtc ++ WTC_to_m = 0x00000002, ++} ; ++ ++#endif // __IDT_INTEG_H__ +diff -urN linux.old/include/asm-mips/rc32434/int.h linux.dev/include/asm-mips/rc32434/int.h +--- linux.old/include/asm-mips/rc32434/int.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/int.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,167 @@ ++#ifndef __IDT_INT_H__ ++#define __IDT_INT_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Interrupt Controller register definition. ++ * ++ * File : $Id: int.h,v 1.3 2002/06/06 18:34:04 astichte Exp $ ++ * ++ * Author : ryan.holmqvist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: int.h,v $ ++ * Revision 1.3 2002/06/06 18:34:04 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/05 18:47:33 astichte ++ * Removed IDTField ++ * ++ * Revision 1.1 2002/05/29 17:33:22 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ INT0_PhysicalAddress = 0x18038000, ++ INT_PhysicalAddress = INT0_PhysicalAddress, // Default ++ ++ INT0_VirtualAddress = 0xb8038000, ++ INT_VirtualAddress = INT0_VirtualAddress, // Default ++} ; ++ ++struct INT_s ++{ ++ U32 ipend ; //Pending interrupts. use INT?_ ++ U32 itest ; //Test bits. use INT?_ ++ U32 imask ; //Interrupt disabled when set. use INT?_ ++} ; ++ ++enum ++{ ++ IPEND2 = 0, // HW 2 interrupt to core. use INT2_ ++ IPEND3 = 1, // HW 3 interrupt to core. use INT3_ ++ IPEND4 = 2, // HW 4 interrupt to core. use INT4_ ++ IPEND5 = 3, // HW 5 interrupt to core. use INT5_ ++ IPEND6 = 4, // HW 6 interrupt to core. use INT6_ ++ ++ IPEND_count, // must be last (used in loops) ++ IPEND_min = IPEND2 // min IPEND (used in loops) ++}; ++ ++typedef struct INTC_s ++{ ++ struct INT_s i [IPEND_count] ;// use i[IPEND?] = INT?_ ++ U32 nmips ; // use NMIPS_ ++} volatile *INT_t ; ++ ++enum ++{ ++ INT2_timer0_b = 0, ++ INT2_timer0_m = 0x00000001, ++ INT2_timer1_b = 1, ++ INT2_timer1_m = 0x00000002, ++ INT2_timer2_b = 2, ++ INT2_timer2_m = 0x00000004, ++ INT2_refresh_b = 3, ++ INT2_refresh_m = 0x00000008, ++ INT2_watchdogTimeout_b = 4, ++ INT2_watchdogTimeout_m = 0x00000010, ++ INT2_undecodedCpuWrite_b = 5, ++ INT2_undecodedCpuWrite_m = 0x00000020, ++ INT2_undecodedCpuRead_b = 6, ++ INT2_undecodedCpuRead_m = 0x00000040, ++ INT2_undecodedPciWrite_b = 7, ++ INT2_undecodedPciWrite_m = 0x00000080, ++ INT2_undecodedPciRead_b = 8, ++ INT2_undecodedPciRead_m = 0x00000100, ++ INT2_undecodedDmaWrite_b = 9, ++ INT2_undecodedDmaWrite_m = 0x00000200, ++ INT2_undecodedDmaRead_b = 10, ++ INT2_undecodedDmaRead_m = 0x00000400, ++ INT2_ipBusSlaveAckError_b = 11, ++ INT2_ipBusSlaveAckError_m = 0x00000800, ++ ++ INT3_dmaChannel0_b = 0, ++ INT3_dmaChannel0_m = 0x00000001, ++ INT3_dmaChannel1_b = 1, ++ INT3_dmaChannel1_m = 0x00000002, ++ INT3_dmaChannel2_b = 2, ++ INT3_dmaChannel2_m = 0x00000004, ++ INT3_dmaChannel3_b = 3, ++ INT3_dmaChannel3_m = 0x00000008, ++ INT3_dmaChannel4_b = 4, ++ INT3_dmaChannel4_m = 0x00000010, ++ INT3_dmaChannel5_b = 5, ++ INT3_dmaChannel5_m = 0x00000020, ++ ++ INT5_uartGeneral0_b = 0, ++ INT5_uartGeneral0_m = 0x00000001, ++ INT5_uartTxrdy0_b = 1, ++ INT5_uartTxrdy0_m = 0x00000002, ++ INT5_uartRxrdy0_b = 2, ++ INT5_uartRxrdy0_m = 0x00000004, ++ INT5_pci_b = 3, ++ INT5_pci_m = 0x00000008, ++ INT5_pciDecoupled_b = 4, ++ INT5_pciDecoupled_m = 0x00000010, ++ INT5_spi_b = 5, ++ INT5_spi_m = 0x00000020, ++ INT5_deviceDecoupled_b = 6, ++ INT5_deviceDecoupled_m = 0x00000040, ++ INT5_i2cMaster_b = 7, ++ INT5_i2cMaster_m = 0x00000080, ++ INT5_i2cSlave_b = 8, ++ INT5_i2cSlave_m = 0x00000100, ++ INT5_ethOvr_b = 9, ++ INT5_ethOvr_m = 0x00000200, ++ INT5_ethUnd_b = 10, ++ INT5_ethUnd_m = 0x00000400, ++ INT5_ethPfd_b = 11, ++ INT5_ethPfd_m = 0x00000800, ++ INT5_nvram_b = 12, ++ INT5_nvram_m = 0x00001000, ++ ++ INT6_gpio0_b = 0, ++ INT6_gpio0_m = 0x00000001, ++ INT6_gpio1_b = 1, ++ INT6_gpio1_m = 0x00000002, ++ INT6_gpio2_b = 2, ++ INT6_gpio2_m = 0x00000004, ++ INT6_gpio3_b = 3, ++ INT6_gpio3_m = 0x00000008, ++ INT6_gpio4_b = 4, ++ INT6_gpio4_m = 0x00000010, ++ INT6_gpio5_b = 5, ++ INT6_gpio5_m = 0x00000020, ++ INT6_gpio6_b = 6, ++ INT6_gpio6_m = 0x00000040, ++ INT6_gpio7_b = 7, ++ INT6_gpio7_m = 0x00000080, ++ INT6_gpio8_b = 8, ++ INT6_gpio8_m = 0x00000100, ++ INT6_gpio9_b = 9, ++ INT6_gpio9_m = 0x00000200, ++ INT6_gpio10_b = 10, ++ INT6_gpio10_m = 0x00000400, ++ INT6_gpio11_b = 11, ++ INT6_gpio11_m = 0x00000800, ++ INT6_gpio12_b = 12, ++ INT6_gpio12_m = 0x00001000, ++ INT6_gpio13_b = 13, ++ INT6_gpio13_m = 0x00002000, ++ ++ NMIPS_gpio_b = 0, ++ NMIPS_gpio_m = 0x00000001, ++} ; ++ ++#endif // __IDT_INT_H__ ++ ++ +diff -urN linux.old/include/asm-mips/rc32434/iparb.h linux.dev/include/asm-mips/rc32434/iparb.h +--- linux.old/include/asm-mips/rc32434/iparb.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/iparb.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,95 @@ ++#ifndef __IDT_IPARB_H__ ++#define __IDT_IPARB_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * IP Arbiter register definitions. ++ * ++ * File : $Id: iparb.h,v 1.3 2002/06/06 18:34:04 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020120 ++ * Update : ++ * $Log: iparb.h,v $ ++ * Revision 1.3 2002/06/06 18:34:04 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/05 19:01:42 astichte ++ * Removed IDTField ++ * ++ * Revision 1.1 2002/05/29 17:33:23 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ IPARB0_PhysicalAddress = 0x18048000, ++ IPARB_PhysicalAddress = IPARB0_PhysicalAddress, // Default ++ ++ IPARB0_VirtualAddress = 0xb8048000, ++ IPARB_VirtualAddress = IPARB0_VirtualAddress, // Default ++} ; ++ ++enum ++{ ++ IPABMXC_ethernetReceive = 0, ++ IPABMXC_ethernetTransmit = 1, ++ IPABMXC_memoryToHoldFifo = 2, ++ IPABMXC_holdFifoToMemory = 3, ++ IPABMXC_pciToMemory = 4, ++ IPABMXC_memoryToPci = 5, ++ IPABMXC_pciTarget = 6, ++ IPABMXC_pciTargetStart = 7, ++ IPABMXC_cpuToIpBus = 8, ++ ++ IPABMXC_Count, // Must be last in list ! ++ IPABMXC_Min = IPABMXC_ethernetReceive, ++ ++ IPAPXC_PriorityCount = 4, // 3-highest, 0-lowest. ++} ; ++ ++typedef struct ++{ ++ U32 ipapc [IPAPXC_PriorityCount] ; // ipapc[IPAPXC_] = IPAPC_ ++ U32 ipabmc [IPABMXC_Count] ; // ipabmc[IPABMXC_] = IPABMC_ ++ U32 ipac ; // use IPAC_ ++ U32 ipaitcc; // use IPAITCC_ ++ U32 ipaspare ; ++} volatile * IPARB_t ; ++ ++enum ++{ ++ IPAC_dwm_b = 2, ++ IPAC_dwm_m = 0x00000004, ++ IPAC_drm_b = 3, ++ IPAC_drm_m = 0x00000008, ++ IPAC_msk_b = 4, ++ IPAC_msk_m = 0x00000010, ++ ++ IPAPC_ptc_b = 0, ++ IPAPC_ptc_m = 0x00003fff, ++ IPAPC_mf_b = 14, ++ IPAPC_mf_m = 0x00004000, ++ IPAPC_cptc_b = 16, ++ IPAPC_cptc_m = 0x3fff0000, ++ ++ IPAITCC_itcc = 0, ++ IPAITCC_itcc, = 0x000001ff, ++ ++ IPABMC_mtc_b = 0, ++ IPABMC_mtc_m = 0x00000fff, ++ IPABMC_p_b = 12, ++ IPABMC_p_m = 0x00003000, ++ IPABMC_msk_b = 14, ++ IPABMC_msk_m = 0x00004000, ++ IPABMC_cmtc_b = 16, ++ IPABMC_cmtc_m = 0x0fff0000, ++}; ++ ++#endif // __IDT_IPARB_H__ +diff -urN linux.old/include/asm-mips/rc32434/irm.h linux.dev/include/asm-mips/rc32434/irm.h +--- linux.old/include/asm-mips/rc32434/irm.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/irm.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,55 @@ ++#ifndef __IDT_IRM_H__ ++#define __IDT_IRM_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Internal Register Map ++ * ++ * File : $Id: irm.h,v 1.2 2002/06/05 14:51:06 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020605 ++ * Update : ++ * $Log: irm.h,v $ ++ * Revision 1.2 2002/06/05 14:51:06 astichte ++ * *** empty log message *** ++ * ++ * Revision 1.1 2002/05/29 17:33:23 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ ******************************************************************************/ ++ ++/* ++ * NOTE -- ++ * This file is here for backwards compatibility. ++ * DO NOT USE !!!! ++ */ ++ ++typedef enum ++{ ++ IRM_Physical = 0x18000000, // Internal Reg. map physical. ++ RST_Offset = 0x00000000, // Includes sysid and RST. ++ DEV_Offset = 0x00010000, // Device Controller 0. ++ DDR_Offset = 0x00018000, // Double-Data-Rate mem. controller. ++ PMARB_Offset = 0x00020000, // PM bus arbiter. ++ TIM_Offset = 0x00028000, // Counter / timer. ++ INTEG_Offset = 0x00030000, // System Integrity. ++ INT_Offset = 0x00038000, // Interrupt controller. ++ DMA_Offset = 0x00040000, // DMA. ++ IPARB_Offset = 0x00044000, // IP bus arbiter. ++ GPIO_Offset = 0x00050000, // GPIO. ++ UART_Offset = 0x00058000, // UART ++ ETH_Offset = 0x00060000, // Ethernet 1. ++ I2C_Offset = 0x00068000, // I2C interface. ++ SPI_Offset = 0x00070000, // Serial Peripheral Interface. ++ NVRAM_Offset = 0x00078000, // NVRAM interface ++ AUTH_Offset = 0x0007c000, // Authorization unit ++ PCI_Offset = 0x00080000, ++ CROM_Offset = 0x000b8000, // Configuration ROM. ++ IRM_Size = 0x00200000, // Internal Reg. map size. ++} IRM_Offset_t ; ++ ++#endif // __IDT_IRM_H__ +diff -urN linux.old/include/asm-mips/rc32434/irq.h linux.dev/include/asm-mips/rc32434/irq.h +--- linux.old/include/asm-mips/rc32434/irq.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/irq.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,8 @@ ++#ifndef __ASM_MACH_MIPS_IRQ_H ++#define __ASM_MACH_MIPS_IRQ_H ++ ++#include <linux/config.h> ++ ++#define NR_IRQS 256 ++ ++#endif /* __ASM_MACH_MIPS_IRQ_H */ +diff -urN linux.old/include/asm-mips/rc32434/nvram.h linux.dev/include/asm-mips/rc32434/nvram.h +--- linux.old/include/asm-mips/rc32434/nvram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/nvram.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,97 @@ ++#ifndef __IDT_NVRAM_H ++#define __IDT_NVRAM_H ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * IP Arbiter register definitions. ++ * ++ * File : $Id: nvram.h,v 1.3 2003/07/24 18:34:04 astichte Exp $ ++ * ++ * Author : kiran.rao@idt.com ++ * Date : 20030724 ++ * Update : ++ * $Log: nvram.h,v $ ++ * ++ * ++ ******************************************************************************/ ++#include <asm/rc32434/tpes.h> ++ ++ ++enum ++{ ++ NVRAM0_PhysicalAddress = 0xba000000, ++ NVRAM_PhysicalAddress = NVRAM0_PhysicalAddress, // Default ++ ++ NVRAM0_VirtualAddress = 0xba000000, ++ NVRAM_VirtualAddress = NVRAM0_VirtualAddress, // Default ++} ; ++ ++enum ++{ ++ NVRCMD_cmd_b = 0, ++ NVRCMD_cmd_m = 0x0000007f, ++ ++ NVRS_r_b = 0, ++ NVRS_r_m = 0x00000001, ++ NVRS_e_b = 1, ++ NVRS_e_m = 0x00000002, ++ NVRS_k_b = 2, ++ NVRS_k_m = 0x00000004, ++ ++ NVRSM_r_b = 0, ++ NVRSM_r_m = 0x00000001, ++ NVRSM_e_b = 1, ++ NVRSM_e_m = 0x00000002, ++ NVRSM_k_b = 2, ++ NVRSM_k_m = 0x00000004, ++ ++ NVRCFG0_pwidth_b = 0, ++ NVRCFG0_pwidth_m = 0x00000003, ++ NVRCFG0_nmax_b = 2, ++ NVRCFG0_nmax_m = 0x0000000C, ++ NVRCFG0_vppl_b = 4, ++ NVRCFG0_vppl_m = 0x000000f0, ++ NVRCFG0_vppm_b = 8, ++ NVRCFG0_vppm_m = 0x00000300, ++ NVRCFG0_dvpp_b = 10, ++ NVRCFG0_dvpp_m = 0x00000c00, ++ NVRCFG0_x_b = 12, ++ NVRCFG0_x_m = 0x00007000, ++ ++ NVRCFG1_t1tecc_b = 0, ++ NVRCFG1_t1tecc_m = 0x00000003, ++ NVRCFG1_t1mrcl_b = 2, ++ NVRCFG1_t1mrcl_m = 0x0000000c, ++ NVRCFG1_t1bias_b = 4, ++ NVRCFG1_t1bias_m = 0x00000030, ++ NVRCFG1_t2tecc_b = 6, ++ NVRCFG1_t2tecc_m = 0x000000c0, ++ NVRCFG1_t2mrcl_b = 8, ++ NVRCFG1_t2mrcl_m = 0x00000300, ++ NVRCFG1_t2bias_b = 10, ++ NVRCFG1_t2bias_m = 0x00000c00, ++ NVRCFG1_t3tecc_b = 12, ++ NVRCFG1_t3tecc_m = 0x00003000, ++ NVRCFG1_t3mrcl_b = 14, ++ NVRCFG1_t3mrcl_m = 0x0000c000, ++ NVRCFG1_t3bias_b = 16, ++ NVRCFG1_t3bias_m = 0x00030000, ++ NVRCFG1_t4tecc_b = 18, ++ NVRCFG1_t4tecc_m = 0x000c0000, ++ NVRCFG1_t4mrcl_b = 20, ++ NVRCFG1_t4mrcl_m = 0x00300000, ++ NVRCFG1_t4bias_b = 22, ++ NVRCFG1_t4bias_m = 0x00c00000, ++ NVRCFG1_t5tecc_b = 24, ++ NVRCFG1_t5tecc_m = 0x03000000, ++ NVRCFG1_t5mrcl_b = 26, ++ NVRCFG1_t5mrcl_m = 0x0c000000, ++ NVRCFG1_t5bias_b = 28, ++ NVRCFG1_t5bias_m = 0x30000000, ++} ++ ++#endif // __IDT_NVRAM_H__ ++ +diff -urN linux.old/include/asm-mips/rc32434/pci.h linux.dev/include/asm-mips/rc32434/pci.h +--- linux.old/include/asm-mips/rc32434/pci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/pci.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,695 @@ ++/************************************************************************** ++ * ++ * BRIEF MODULE DESCRIPTION ++ * PCI register definitio ++ * ++ * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ ************************************************************************** ++ * May 2004 rkt, neb. ++ * ++ * Initial Release ++ * ++ * ++ * ++ ************************************************************************** ++ */ ++ ++#ifndef __IDT_PCI_H__ ++#define __IDT_PCI_H__ ++ ++enum ++{ ++ PCI0_PhysicalAddress = 0x18080000, ++ PCI_PhysicalAddress = PCI0_PhysicalAddress, ++ ++ PCI0_VirtualAddress = 0xB8080000, ++ PCI_VirtualAddress = PCI0_VirtualAddress, ++} ; ++ ++enum ++{ ++ PCI_LbaCount = 4, // Local base addresses. ++} ; ++ ++typedef struct ++{ ++ u32 a ; // Address. ++ u32 c ; // Control. ++ u32 m ; // mapping. ++} PCI_Map_s ; ++ ++typedef struct ++{ ++ u32 pcic ; ++ u32 pcis ; ++ u32 pcism ; ++ u32 pcicfga ; ++ u32 pcicfgd ; ++ PCI_Map_s pcilba [PCI_LbaCount] ; ++ u32 pcidac ; ++ u32 pcidas ; ++ u32 pcidasm ; ++ u32 pcidad ; ++ u32 pcidma8c ; ++ u32 pcidma9c ; ++ u32 pcitc ; ++} volatile *PCI_t ; ++ ++// PCI messaging unit. ++enum ++{ ++ PCIM_Count = 2, ++} ; ++typedef struct ++{ ++ u32 pciim [PCIM_Count] ; ++ u32 pciom [PCIM_Count] ; ++ u32 pciid ; ++ u32 pciiic ; ++ u32 pciiim ; ++ u32 pciiod ; ++ u32 pciioic ; ++ u32 pciioim ; ++} volatile *PCIM_t ; ++ ++/******************************************************************************* ++ * ++ * PCI Control Register ++ * ++ ******************************************************************************/ ++enum ++{ ++ PCIC_en_b = 0, ++ PCIC_en_m = 0x00000001, ++ PCIC_tnr_b = 1, ++ PCIC_tnr_m = 0x00000002, ++ PCIC_sce_b = 2, ++ PCIC_sce_m = 0x00000004, ++ PCIC_ien_b = 3, ++ PCIC_ien_m = 0x00000008, ++ PCIC_aaa_b = 4, ++ PCIC_aaa_m = 0x00000010, ++ PCIC_eap_b = 5, ++ PCIC_eap_m = 0x00000020, ++ PCIC_pcim_b = 6, ++ PCIC_pcim_m = 0x000001c0, ++ PCIC_pcim_disabled_v = 0, ++ PCIC_pcim_tnr_v = 1, // Satellite - target not ready ++ PCIC_pcim_suspend_v = 2, // Satellite - suspended CPU. ++ PCIC_pcim_extern_v = 3, // Host - external arbiter. ++ PCIC_pcim_fixed_v = 4, // Host - fixed priority arb. ++ PCIC_pcim_roundrobin_v = 5, // Host - round robin priority. ++ PCIC_pcim_reserved6_v = 6, ++ PCIC_pcim_reserved7_v = 7, ++ PCIC_igm_b = 9, ++ PCIC_igm_m = 0x00000200, ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI Status Register ++ * ++ ******************************************************************************/ ++enum { ++ PCIS_eed_b = 0, ++ PCIS_eed_m = 0x00000001, ++ PCIS_wr_b = 1, ++ PCIS_wr_m = 0x00000002, ++ PCIS_nmi_b = 2, ++ PCIS_nmi_m = 0x00000004, ++ PCIS_ii_b = 3, ++ PCIS_ii_m = 0x00000008, ++ PCIS_cwe_b = 4, ++ PCIS_cwe_m = 0x00000010, ++ PCIS_cre_b = 5, ++ PCIS_cre_m = 0x00000020, ++ PCIS_mdpe_b = 6, ++ PCIS_mdpe_m = 0x00000040, ++ PCIS_sta_b = 7, ++ PCIS_sta_m = 0x00000080, ++ PCIS_rta_b = 8, ++ PCIS_rta_m = 0x00000100, ++ PCIS_rma_b = 9, ++ PCIS_rma_m = 0x00000200, ++ PCIS_sse_b = 10, ++ PCIS_sse_m = 0x00000400, ++ PCIS_ose_b = 11, ++ PCIS_ose_m = 0x00000800, ++ PCIS_pe_b = 12, ++ PCIS_pe_m = 0x00001000, ++ PCIS_tae_b = 13, ++ PCIS_tae_m = 0x00002000, ++ PCIS_rle_b = 14, ++ PCIS_rle_m = 0x00004000, ++ PCIS_bme_b = 15, ++ PCIS_bme_m = 0x00008000, ++ PCIS_prd_b = 16, ++ PCIS_prd_m = 0x00010000, ++ PCIS_rip_b = 17, ++ PCIS_rip_m = 0x00020000, ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI Status Mask Register ++ * ++ ******************************************************************************/ ++enum { ++ PCISM_eed_b = 0, ++ PCISM_eed_m = 0x00000001, ++ PCISM_wr_b = 1, ++ PCISM_wr_m = 0x00000002, ++ PCISM_nmi_b = 2, ++ PCISM_nmi_m = 0x00000004, ++ PCISM_ii_b = 3, ++ PCISM_ii_m = 0x00000008, ++ PCISM_cwe_b = 4, ++ PCISM_cwe_m = 0x00000010, ++ PCISM_cre_b = 5, ++ PCISM_cre_m = 0x00000020, ++ PCISM_mdpe_b = 6, ++ PCISM_mdpe_m = 0x00000040, ++ PCISM_sta_b = 7, ++ PCISM_sta_m = 0x00000080, ++ PCISM_rta_b = 8, ++ PCISM_rta_m = 0x00000100, ++ PCISM_rma_b = 9, ++ PCISM_rma_m = 0x00000200, ++ PCISM_sse_b = 10, ++ PCISM_sse_m = 0x00000400, ++ PCISM_ose_b = 11, ++ PCISM_ose_m = 0x00000800, ++ PCISM_pe_b = 12, ++ PCISM_pe_m = 0x00001000, ++ PCISM_tae_b = 13, ++ PCISM_tae_m = 0x00002000, ++ PCISM_rle_b = 14, ++ PCISM_rle_m = 0x00004000, ++ PCISM_bme_b = 15, ++ PCISM_bme_m = 0x00008000, ++ PCISM_prd_b = 16, ++ PCISM_prd_m = 0x00010000, ++ PCISM_rip_b = 17, ++ PCISM_rip_m = 0x00020000, ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI Configuration Address Register ++ * ++ ******************************************************************************/ ++enum { ++ PCICFGA_reg_b = 2, ++ PCICFGA_reg_m = 0x000000fc, ++ PCICFGA_reg_id_v = 0x00>>2, //use PCFGID_ ++ PCICFGA_reg_04_v = 0x04>>2, //use PCFG04_ ++ PCICFGA_reg_08_v = 0x08>>2, //use PCFG08_ ++ PCICFGA_reg_0C_v = 0x0C>>2, //use PCFG0C_ ++ PCICFGA_reg_pba0_v = 0x10>>2, //use PCIPBA_ ++ PCICFGA_reg_pba1_v = 0x14>>2, //use PCIPBA_ ++ PCICFGA_reg_pba2_v = 0x18>>2, //use PCIPBA_ ++ PCICFGA_reg_pba3_v = 0x1c>>2, //use PCIPBA_ ++ PCICFGA_reg_subsystem_v = 0x2c>>2, //use PCFGSS_ ++ PCICFGA_reg_3C_v = 0x3C>>2, //use PCFG3C_ ++ PCICFGA_reg_pba0c_v = 0x44>>2, //use PCIPBAC_ ++ PCICFGA_reg_pba0m_v = 0x48>>2, ++ PCICFGA_reg_pba1c_v = 0x4c>>2, //use PCIPBAC_ ++ PCICFGA_reg_pba1m_v = 0x50>>2, ++ PCICFGA_reg_pba2c_v = 0x54>>2, //use PCIPBAC_ ++ PCICFGA_reg_pba2m_v = 0x58>>2, ++ PCICFGA_reg_pba3c_v = 0x5c>>2, //use PCIPBAC_ ++ PCICFGA_reg_pba3m_v = 0x60>>2, ++ PCICFGA_reg_pmgt_v = 0x64>>2, ++ PCICFGA_func_b = 8, ++ PCICFGA_func_m = 0x00000700, ++ PCICFGA_dev_b = 11, ++ PCICFGA_dev_m = 0x0000f800, ++ PCICFGA_dev_internal_v = 0, ++ PCICFGA_bus_b = 16, ++ PCICFGA_bus_m = 0x00ff0000, ++ PCICFGA_bus_type0_v = 0, //local bus ++ PCICFGA_en_b = 31, // read only ++ PCICFGA_en_m = 0x80000000, ++} ; ++ ++enum { ++ PCFGID_vendor_b = 0, ++ PCFGID_vendor_m = 0x0000ffff, ++ PCFGID_vendor_IDT_v = 0x111d, ++ PCFGID_device_b = 16, ++ PCFGID_device_m = 0xffff0000, ++ PCFGID_device_Korinade_v = 0x0214, ++ ++ PCFG04_command_ioena_b = 1, ++ PCFG04_command_ioena_m = 0x00000001, ++ PCFG04_command_memena_b = 2, ++ PCFG04_command_memena_m = 0x00000002, ++ PCFG04_command_bmena_b = 3, ++ PCFG04_command_bmena_m = 0x00000004, ++ PCFG04_command_mwinv_b = 5, ++ PCFG04_command_mwinv_m = 0x00000010, ++ PCFG04_command_parena_b = 7, ++ PCFG04_command_parena_m = 0x00000040, ++ PCFG04_command_serrena_b = 9, ++ PCFG04_command_serrena_m = 0x00000100, ++ PCFG04_command_fastbbena_b = 10, ++ PCFG04_command_fastbbena_m = 0x00000200, ++ PCFG04_status_b = 16, ++ PCFG04_status_m = 0xffff0000, ++ PCFG04_status_66MHz_b = 21, // 66 MHz enable ++ PCFG04_status_66MHz_m = 0x00200000, ++ PCFG04_status_fbb_b = 23, ++ PCFG04_status_fbb_m = 0x00800000, ++ PCFG04_status_mdpe_b = 24, ++ PCFG04_status_mdpe_m = 0x01000000, ++ PCFG04_status_dst_b = 25, ++ PCFG04_status_dst_m = 0x06000000, ++ PCFG04_status_sta_b = 27, ++ PCFG04_status_sta_m = 0x08000000, ++ PCFG04_status_rta_b = 28, ++ PCFG04_status_rta_m = 0x10000000, ++ PCFG04_status_rma_b = 29, ++ PCFG04_status_rma_m = 0x20000000, ++ PCFG04_status_sse_b = 30, ++ PCFG04_status_sse_m = 0x40000000, ++ PCFG04_status_pe_b = 31, ++ PCFG04_status_pe_m = 0x40000000, ++ ++ PCFG08_revId_b = 0, ++ PCFG08_revId_m = 0x000000ff, ++ PCFG08_classCode_b = 0, ++ PCFG08_classCode_m = 0xffffff00, ++ PCFG08_classCode_bridge_v = 06, ++ PCFG08_classCode_proc_v = 0x0b3000, // processor-MIPS ++ PCFG0C_cacheline_b = 0, ++ PCFG0C_cacheline_m = 0x000000ff, ++ PCFG0C_masterLatency_b = 8, ++ PCFG0C_masterLatency_m = 0x0000ff00, ++ PCFG0C_headerType_b = 16, ++ PCFG0C_headerType_m = 0x00ff0000, ++ PCFG0C_bist_b = 24, ++ PCFG0C_bist_m = 0xff000000, ++ ++ PCIPBA_msi_b = 0, ++ PCIPBA_msi_m = 0x00000001, ++ PCIPBA_p_b = 3, ++ PCIPBA_p_m = 0x00000004, ++ PCIPBA_baddr_b = 8, ++ PCIPBA_baddr_m = 0xffffff00, ++ ++ PCFGSS_vendorId_b = 0, ++ PCFGSS_vendorId_m = 0x0000ffff, ++ PCFGSS_id_b = 16, ++ PCFGSS_id_m = 0xffff0000, ++ ++ PCFG3C_interruptLine_b = 0, ++ PCFG3C_interruptLine_m = 0x000000ff, ++ PCFG3C_interruptPin_b = 8, ++ PCFG3C_interruptPin_m = 0x0000ff00, ++ PCFG3C_minGrant_b = 16, ++ PCFG3C_minGrant_m = 0x00ff0000, ++ PCFG3C_maxLat_b = 24, ++ PCFG3C_maxLat_m = 0xff000000, ++ ++ PCIPBAC_msi_b = 0, ++ PCIPBAC_msi_m = 0x00000001, ++ PCIPBAC_p_b = 1, ++ PCIPBAC_p_m = 0x00000002, ++ PCIPBAC_size_b = 2, ++ PCIPBAC_size_m = 0x0000007c, ++ PCIPBAC_sb_b = 7, ++ PCIPBAC_sb_m = 0x00000080, ++ PCIPBAC_pp_b = 8, ++ PCIPBAC_pp_m = 0x00000100, ++ PCIPBAC_mr_b = 9, ++ PCIPBAC_mr_m = 0x00000600, ++ PCIPBAC_mr_read_v =0, //no prefetching ++ PCIPBAC_mr_readLine_v =1, ++ PCIPBAC_mr_readMult_v =2, ++ PCIPBAC_mrl_b = 11, ++ PCIPBAC_mrl_m = 0x00000800, ++ PCIPBAC_mrm_b = 12, ++ PCIPBAC_mrm_m = 0x00001000, ++ PCIPBAC_trp_b = 13, ++ PCIPBAC_trp_m = 0x00002000, ++ ++ PCFG40_trdyTimeout_b = 0, ++ PCFG40_trdyTimeout_m = 0x000000ff, ++ PCFG40_retryLim_b = 8, ++ PCFG40_retryLim_m = 0x0000ff00, ++}; ++ ++/******************************************************************************* ++ * ++ * PCI Local Base Address [0|1|2|3] Register ++ * ++ ******************************************************************************/ ++enum { ++ PCILBA_baddr_b = 0, // In PCI_t -> pcilba [] .a ++ PCILBA_baddr_m = 0xffffff00, ++} ; ++/******************************************************************************* ++ * ++ * PCI Local Base Address Control Register ++ * ++ ******************************************************************************/ ++enum { ++ PCILBAC_msi_b = 0, // In pPci->pcilba[i].c ++ PCILBAC_msi_m = 0x00000001, ++ PCILBAC_msi_mem_v = 0, ++ PCILBAC_msi_io_v = 1, ++ PCILBAC_size_b = 2, // In pPci->pcilba[i].c ++ PCILBAC_size_m = 0x0000007c, ++ PCILBAC_sb_b = 7, // In pPci->pcilba[i].c ++ PCILBAC_sb_m = 0x00000080, ++ PCILBAC_rt_b = 8, // In pPci->pcilba[i].c ++ PCILBAC_rt_m = 0x00000100, ++ PCILBAC_rt_noprefetch_v = 0, // mem read ++ PCILBAC_rt_prefetch_v = 1, // mem readline ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI Local Base Address [0|1|2|3] Mapping Register ++ * ++ ******************************************************************************/ ++enum { ++ PCILBAM_maddr_b = 8, ++ PCILBAM_maddr_m = 0xffffff00, ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI Decoupled Access Control Register ++ * ++ ******************************************************************************/ ++enum { ++ PCIDAC_den_b = 0, ++ PCIDAC_den_m = 0x00000001, ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI Decoupled Access Status Register ++ * ++ ******************************************************************************/ ++enum { ++ PCIDAS_d_b = 0, ++ PCIDAS_d_m = 0x00000001, ++ PCIDAS_b_b = 1, ++ PCIDAS_b_m = 0x00000002, ++ PCIDAS_e_b = 2, ++ PCIDAS_e_m = 0x00000004, ++ PCIDAS_ofe_b = 3, ++ PCIDAS_ofe_m = 0x00000008, ++ PCIDAS_off_b = 4, ++ PCIDAS_off_m = 0x00000010, ++ PCIDAS_ife_b = 5, ++ PCIDAS_ife_m = 0x00000020, ++ PCIDAS_iff_b = 6, ++ PCIDAS_iff_m = 0x00000040, ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI DMA Channel 8 Configuration Register ++ * ++ ******************************************************************************/ ++enum ++{ ++ PCIDMA8C_mbs_b = 0, // Maximum Burst Size. ++ PCIDMA8C_mbs_m = 0x00000fff, // { pcidma8c } ++ PCIDMA8C_our_b = 12, // Optimize Unaligned Burst Reads. ++ PCIDMA8C_our_m = 0x00001000, // { pcidma8c } ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI DMA Channel 9 Configuration Register ++ * ++ ******************************************************************************/ ++enum ++{ ++ PCIDMA9C_mbs_b = 0, // Maximum Burst Size. ++ PCIDMA9C_mbs_m = 0x00000fff, // { pcidma9c } ++} ; ++ ++/******************************************************************************* ++ * ++ * PCI to Memory(DMA Channel 8) AND Memory to PCI DMA(DMA Channel 9)Descriptors ++ * ++ ******************************************************************************/ ++enum { ++ PCIDMAD_pt_b = 22, // in DEVCMD field (descriptor) ++ PCIDMAD_pt_m = 0x00c00000, // preferred transaction field ++ // These are for reads (DMA channel 8) ++ PCIDMAD_devcmd_mr_v = 0, //memory read ++ PCIDMAD_devcmd_mrl_v = 1, //memory read line ++ PCIDMAD_devcmd_mrm_v = 2, //memory read multiple ++ PCIDMAD_devcmd_ior_v = 3, //I/O read ++ // These are for writes (DMA channel 9) ++ PCIDMAD_devcmd_mw_v = 0, //memory write ++ PCIDMAD_devcmd_mwi_v = 1, //memory write invalidate ++ PCIDMAD_devcmd_iow_v = 3, //I/O write ++ ++ // Swap byte field applies to both DMA channel 8 and 9 ++ PCIDMAD_sb_b = 24, // in DEVCMD field (descriptor) ++ PCIDMAD_sb_m = 0x01000000, // swap byte field ++} ; ++ ++ ++/******************************************************************************* ++ * ++ * PCI Target Control Register ++ * ++ ******************************************************************************/ ++enum ++{ ++ PCITC_rtimer_b = 0, // In PCITC_t -> pcitc ++ PCITC_rtimer_m = 0x000000ff, ++ PCITC_dtimer_b = 8, // In PCITC_t -> pcitc ++ PCITC_dtimer_m = 0x0000ff00, ++ PCITC_rdr_b = 18, // In PCITC_t -> pcitc ++ PCITC_rdr_m = 0x00040000, ++ PCITC_ddt_b = 19, // In PCITC_t -> pcitc ++ PCITC_ddt_m = 0x00080000, ++} ; ++/******************************************************************************* ++ * ++ * PCI messaging unit [applies to both inbound and outbound registers ] ++ * ++ ******************************************************************************/ ++enum ++{ ++ PCIM_m0_b = 0, // In PCIM_t -> {pci{iic,iim,ioic,ioim}} ++ PCIM_m0_m = 0x00000001, // inbound or outbound message 0 ++ PCIM_m1_b = 1, // In PCIM_t -> {pci{iic,iim,ioic,ioim}} ++ PCIM_m1_m = 0x00000002, // inbound or outbound message 1 ++ PCIM_db_b = 2, // In PCIM_t -> {pci{iic,iim,ioic,ioim}} ++ PCIM_db_m = 0x00000004, // inbound or outbound doorbell ++}; ++ ++ ++ ++ ++ ++ ++#define PCI_MSG_VirtualAddress 0xB8088010 ++#define rc32434_pci ((volatile PCI_t) PCI0_VirtualAddress) ++#define rc32434_pci_msg ((volatile PCIM_t) PCI_MSG_VirtualAddress) ++ ++#define PCIM_SHFT 0x6 ++#define PCIM_BIT_LEN 0x7 ++#define PCIM_H_EA 0x3 ++#define PCIM_H_IA_FIX 0x4 ++#define PCIM_H_IA_RR 0x5 ++#if 0 ++#define PCI_ADDR_START 0x13000000 ++#endif ++ ++#define PCI_ADDR_START 0x50000000 ++ ++#define CPUTOPCI_MEM_WIN 0x02000000 ++#define CPUTOPCI_IO_WIN 0x00100000 ++#define PCILBA_SIZE_SHFT 2 ++#define PCILBA_SIZE_MASK 0x1F ++#define SIZE_256MB 0x1C ++#define SIZE_128MB 0x1B ++#define SIZE_64MB 0x1A ++#define SIZE_32MB 0x19 ++#define SIZE_16MB 0x18 ++#define SIZE_4MB 0x16 ++#define SIZE_2MB 0x15 ++#define SIZE_1MB 0x14 ++#define KORINA_CONFIG0_ADDR 0x80000000 ++#define KORINA_CONFIG1_ADDR 0x80000004 ++#define KORINA_CONFIG2_ADDR 0x80000008 ++#define KORINA_CONFIG3_ADDR 0x8000000C ++#define KORINA_CONFIG4_ADDR 0x80000010 ++#define KORINA_CONFIG5_ADDR 0x80000014 ++#define KORINA_CONFIG6_ADDR 0x80000018 ++#define KORINA_CONFIG7_ADDR 0x8000001C ++#define KORINA_CONFIG8_ADDR 0x80000020 ++#define KORINA_CONFIG9_ADDR 0x80000024 ++#define KORINA_CONFIG10_ADDR 0x80000028 ++#define KORINA_CONFIG11_ADDR 0x8000002C ++#define KORINA_CONFIG12_ADDR 0x80000030 ++#define KORINA_CONFIG13_ADDR 0x80000034 ++#define KORINA_CONFIG14_ADDR 0x80000038 ++#define KORINA_CONFIG15_ADDR 0x8000003C ++#define KORINA_CONFIG16_ADDR 0x80000040 ++#define KORINA_CONFIG17_ADDR 0x80000044 ++#define KORINA_CONFIG18_ADDR 0x80000048 ++#define KORINA_CONFIG19_ADDR 0x8000004C ++#define KORINA_CONFIG20_ADDR 0x80000050 ++#define KORINA_CONFIG21_ADDR 0x80000054 ++#define KORINA_CONFIG22_ADDR 0x80000058 ++#define KORINA_CONFIG23_ADDR 0x8000005C ++#define KORINA_CONFIG24_ADDR 0x80000060 ++#define KORINA_CONFIG25_ADDR 0x80000064 ++#define KORINA_CMD (PCFG04_command_ioena_m | \ ++ PCFG04_command_memena_m | \ ++ PCFG04_command_bmena_m | \ ++ PCFG04_command_mwinv_m | \ ++ PCFG04_command_parena_m | \ ++ PCFG04_command_serrena_m ) ++ ++#define KORINA_STAT (PCFG04_status_mdpe_m | \ ++ PCFG04_status_sta_m | \ ++ PCFG04_status_rta_m | \ ++ PCFG04_status_rma_m | \ ++ PCFG04_status_sse_m | \ ++ PCFG04_status_pe_m) ++ ++#define KORINA_CNFG1 ((KORINA_STAT<<16)|KORINA_CMD) ++ ++#define KORINA_REVID 0 ++#define KORINA_CLASS_CODE 0 ++#define KORINA_CNFG2 ((KORINA_CLASS_CODE<<8) | \ ++ KORINA_REVID) ++ ++#define KORINA_CACHE_LINE_SIZE 4 ++#define KORINA_MASTER_LAT 0x3c ++#define KORINA_HEADER_TYPE 0 ++#define KORINA_BIST 0 ++ ++#define KORINA_CNFG3 ((KORINA_BIST << 24) | \ ++ (KORINA_HEADER_TYPE<<16) | \ ++ (KORINA_MASTER_LAT<<8) | \ ++ KORINA_CACHE_LINE_SIZE ) ++ ++#define KORINA_BAR0 0x00000008 /* 128 MB Memory */ ++#define KORINA_BAR1 0x18800001 /* 1 MB IO */ ++#define KORINA_BAR2 0x18000001 /* 2 MB IO window for Korina ++ internal Registers */ ++#define KORINA_BAR3 0x48000008 /* Spare 128 MB Memory */ ++ ++#define KORINA_CNFG4 KORINA_BAR0 ++#define KORINA_CNFG5 KORINA_BAR1 ++#define KORINA_CNFG6 KORINA_BAR2 ++#define KORINA_CNFG7 KORINA_BAR3 ++ ++#define KORINA_SUBSYS_VENDOR_ID 0x011d ++#define KORINA_SUBSYSTEM_ID 0x0214 ++#define KORINA_CNFG8 0 ++#define KORINA_CNFG9 0 ++#define KORINA_CNFG10 0 ++#define KORINA_CNFG11 ((KORINA_SUBSYS_VENDOR_ID<<16) | \ ++ KORINA_SUBSYSTEM_ID) ++#define KORINA_INT_LINE 1 ++#define KORINA_INT_PIN 1 ++#define KORINA_MIN_GNT 8 ++#define KORINA_MAX_LAT 0x38 ++#define KORINA_CNFG12 0 ++#define KORINA_CNFG13 0 ++#define KORINA_CNFG14 0 ++#define KORINA_CNFG15 ((KORINA_MAX_LAT<<24) | \ ++ (KORINA_MIN_GNT<<16) | \ ++ (KORINA_INT_PIN<<8) | \ ++ KORINA_INT_LINE) ++#define KORINA_RETRY_LIMIT 0x80 ++#define KORINA_TRDY_LIMIT 0x80 ++#define KORINA_CNFG16 ((KORINA_RETRY_LIMIT<<8) | \ ++ KORINA_TRDY_LIMIT) ++#define PCI_PBAxC_R 0x0 ++#define PCI_PBAxC_RL 0x1 ++#define PCI_PBAxC_RM 0x2 ++#define SIZE_SHFT 2 ++ ++#if defined(__MIPSEB__) ++#define KORINA_PBA0C ( PCIPBAC_mrl_m | PCIPBAC_sb_m | \ ++ ((PCI_PBAxC_RM &0x3) << PCIPBAC_mr_b) | \ ++ PCIPBAC_pp_m | \ ++ (SIZE_128MB<<SIZE_SHFT) | \ ++ PCIPBAC_p_m) ++#else ++#define KORINA_PBA0C ( PCIPBAC_mrl_m | \ ++ ((PCI_PBAxC_RM &0x3) << PCIPBAC_mr_b) | \ ++ PCIPBAC_pp_m | \ ++ (SIZE_128MB<<SIZE_SHFT) | \ ++ PCIPBAC_p_m) ++#endif ++#define KORINA_CNFG17 KORINA_PBA0C ++#define KORINA_PBA0M 0x0 ++#define KORINA_CNFG18 KORINA_PBA0M ++ ++#if defined(__MIPSEB__) ++#define KORINA_PBA1C ((SIZE_1MB<<SIZE_SHFT) | PCIPBAC_sb_m | \ ++ PCIPBAC_msi_m) ++#else ++#define KORINA_PBA1C ((SIZE_1MB<<SIZE_SHFT) | \ ++ PCIPBAC_msi_m) ++#endif ++#define KORINA_CNFG19 KORINA_PBA1C ++#define KORINA_PBA1M 0x0 ++#define KORINA_CNFG20 KORINA_PBA1M ++ ++#if defined(__MIPSEB__) ++#define KORINA_PBA2C ((SIZE_2MB<<SIZE_SHFT) | PCIPBAC_sb_m | \ ++ PCIPBAC_msi_m) ++#else ++#define KORINA_PBA2C ((SIZE_2MB<<SIZE_SHFT) | \ ++ PCIPBAC_msi_m) ++#endif ++#define KORINA_CNFG21 KORINA_PBA2C ++#define KORINA_PBA2M 0x18000000 ++#define KORINA_CNFG22 KORINA_PBA2M ++#define KORINA_PBA3C 0 ++#define KORINA_CNFG23 KORINA_PBA3C ++#define KORINA_PBA3M 0 ++#define KORINA_CNFG24 KORINA_PBA3M ++ ++ ++ ++#define PCITC_DTIMER_VAL 8 ++#define PCITC_RTIMER_VAL 0x10 ++ ++ ++ ++ ++#endif // __IDT_PCI_H__ ++ ++ ++ +diff -urN linux.old/include/asm-mips/rc32434/pcikorina.h linux.dev/include/asm-mips/rc32434/pcikorina.h +--- linux.old/include/asm-mips/rc32434/pcikorina.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/pcikorina.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,209 @@ ++/* $Id: pciacacia.h,v 1.5 2001/05/01 10:09:17 carstenl Exp $ ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ */ ++#ifndef _PCIKORINA_H ++#define _PCIKORINA_H ++ ++ ++#define PCI_MSG_VirtualAddress 0xB8088010 ++#define rc32434_pci ((volatile PCI_t) PCI0_VirtualAddress) ++#define rc32434_pci_msg ((volatile PCIM_t) PCI_MSG_VirtualAddress) ++ ++#define PCIM_SHFT 0x6 ++#define PCIM_BIT_LEN 0x7 ++#define PCIM_H_EA 0x3 ++#define PCIM_H_IA_FIX 0x4 ++#define PCIM_H_IA_RR 0x5 ++#if 0 ++#define PCI_ADDR_START 0x13000000 ++#endif ++ ++#define PCI_ADDR_START 0x50000000 ++ ++#define CPUTOPCI_MEM_WIN 0x02000000 ++#define CPUTOPCI_IO_WIN 0x00100000 ++#define PCILBA_SIZE_SHFT 2 ++#define PCILBA_SIZE_MASK 0x1F ++#define SIZE_256MB 0x1C ++#define SIZE_128MB 0x1B ++#define SIZE_64MB 0x1A ++#define SIZE_32MB 0x19 ++#define SIZE_16MB 0x18 ++#define SIZE_4MB 0x16 ++#define SIZE_2MB 0x15 ++#define SIZE_1MB 0x14 ++#define KORINA_CONFIG0_ADDR 0x80000000 ++#define KORINA_CONFIG1_ADDR 0x80000004 ++#define KORINA_CONFIG2_ADDR 0x80000008 ++#define KORINA_CONFIG3_ADDR 0x8000000C ++#define KORINA_CONFIG4_ADDR 0x80000010 ++#define KORINA_CONFIG5_ADDR 0x80000014 ++#define KORINA_CONFIG6_ADDR 0x80000018 ++#define KORINA_CONFIG7_ADDR 0x8000001C ++#define KORINA_CONFIG8_ADDR 0x80000020 ++#define KORINA_CONFIG9_ADDR 0x80000024 ++#define KORINA_CONFIG10_ADDR 0x80000028 ++#define KORINA_CONFIG11_ADDR 0x8000002C ++#define KORINA_CONFIG12_ADDR 0x80000030 ++#define KORINA_CONFIG13_ADDR 0x80000034 ++#define KORINA_CONFIG14_ADDR 0x80000038 ++#define KORINA_CONFIG15_ADDR 0x8000003C ++#define KORINA_CONFIG16_ADDR 0x80000040 ++#define KORINA_CONFIG17_ADDR 0x80000044 ++#define KORINA_CONFIG18_ADDR 0x80000048 ++#define KORINA_CONFIG19_ADDR 0x8000004C ++#define KORINA_CONFIG20_ADDR 0x80000050 ++#define KORINA_CONFIG21_ADDR 0x80000054 ++#define KORINA_CONFIG22_ADDR 0x80000058 ++#define KORINA_CONFIG23_ADDR 0x8000005C ++#define KORINA_CONFIG24_ADDR 0x80000060 ++#define KORINA_CONFIG25_ADDR 0x80000064 ++#define KORINA_CMD (PCFG04_command_ioena_m | \ ++ PCFG04_command_memena_m | \ ++ PCFG04_command_bmena_m | \ ++ PCFG04_command_mwinv_m | \ ++ PCFG04_command_parena_m | \ ++ PCFG04_command_serrena_m ) ++ ++#define KORINA_STAT (PCFG04_status_mdpe_m | \ ++ PCFG04_status_sta_m | \ ++ PCFG04_status_rta_m | \ ++ PCFG04_status_rma_m | \ ++ PCFG04_status_sse_m | \ ++ PCFG04_status_pe_m) ++ ++#define KORINA_CNFG1 ((KORINA_STAT<<16)|KORINA_CMD) ++ ++#define KORINA_REVID 0 ++#define KORINA_CLASS_CODE 0 ++#define KORINA_CNFG2 ((KORINA_CLASS_CODE<<8) | \ ++ KORINA_REVID) ++ ++#define KORINA_CACHE_LINE_SIZE 4 ++#define KORINA_MASTER_LAT 0x3c ++#define KORINA_HEADER_TYPE 0 ++#define KORINA_BIST 0 ++ ++#define KORINA_CNFG3 ((KORINA_BIST << 24) | \ ++ (KORINA_HEADER_TYPE<<16) | \ ++ (KORINA_MASTER_LAT<<8) | \ ++ KORINA_CACHE_LINE_SIZE ) ++ ++#define KORINA_BAR0 0x00000008 /* 128 MB Memory */ ++#define KORINA_BAR1 0x18800001 /* 1 MB IO */ ++#define KORINA_BAR2 0x18000001 /* 2 MB IO window for Acacia ++ internal Registers */ ++#define KORINA_BAR3 0x48000008 /* Spare 128 MB Memory */ ++ ++#define KORINA_CNFG4 KORINA_BAR0 ++#define KORINA_CNFG5 KORINA_BAR1 ++#define KORINA_CNFG6 KORINA_BAR2 ++#define KORINA_CNFG7 KORINA_BAR3 ++ ++#define KORINA_SUBSYS_VENDOR_ID 0 ++#define KORINA_SUBSYSTEM_ID 0 ++#define KORINA_CNFG8 0 ++#define KORINA_CNFG9 0 ++#define KORINA_CNFG10 0 ++#define KORINA_CNFG11 ((KORINA_SUBSYS_VENDOR_ID<<16) | \ ++ KORINA_SUBSYSTEM_ID) ++#define KORINA_INT_LINE 1 ++#define KORINA_INT_PIN 1 ++#define KORINA_MIN_GNT 8 ++#define KORINA_MAX_LAT 0x38 ++#define KORINA_CNFG12 0 ++#define KORINA_CNFG13 0 ++#define KORINA_CNFG14 0 ++#define KORINA_CNFG15 ((KORINA_MAX_LAT<<24) | \ ++ (KORINA_MIN_GNT<<16) | \ ++ (KORINA_INT_PIN<<8) | \ ++ KORINA_INT_LINE) ++#define KORINA_RETRY_LIMIT 0x80 ++#define KORINA_TRDY_LIMIT 0x80 ++#define KORINA_CNFG16 ((KORINA_RETRY_LIMIT<<8) | \ ++ KORINA_TRDY_LIMIT) ++#define PCI_PBAxC_R 0x0 ++#define PCI_PBAxC_RL 0x1 ++#define PCI_PBAxC_RM 0x2 ++#define SIZE_SHFT 2 ++ ++#ifdef __MIPSEB__ ++#define KORINA_PBA0C ( PCIPBAC_mrl_m | PCIPBAC_sb_m | \ ++ ((PCI_PBAxC_RM &0x3) << PCIPBAC_mr_b) | \ ++ PCIPBAC_pp_m | \ ++ (SIZE_32MB<<SIZE_SHFT) | \ ++ PCIPBAC_p_m) ++#else ++#define KORINA_PBA0C ( PCIPBAC_mrl_m | \ ++ ((PCI_PBAxC_RM &0x3) << PCIPBAC_mr_b) | \ ++ PCIPBAC_pp_m | \ ++ (SIZE_32MB<<SIZE_SHFT) | \ ++ PCIPBAC_p_m) ++#endif ++ ++#if 0 ++ ++#define KORINA_PBA0C ( PCIPBAC_sb_m | PCIPBAC_pp_m | \ ++ ((PCI_PBAxC_R &0x3) << PCIPBAC_mr_b) | \ ++ (SIZE_128MB<<SIZE_SHFT)) ++#endif ++#define KORINA_CNFG17 KORINA_PBA0C ++#define KORINA_PBA0M 0x0 ++#define KORINA_CNFG18 KORINA_PBA0M ++ ++#ifdef __MIPSEB__ ++#define KORINA_PBA1C ((SIZE_1MB<<SIZE_SHFT) | PCIPBAC_sb_m | \ ++ PCIPBAC_msi_m) ++#else ++#define KORINA_PBA1C ((SIZE_1MB<<SIZE_SHFT) | \ ++ PCIPBAC_msi_m) ++ ++#endif ++ ++#define KORINA_CNFG19 KORINA_PBA1C ++#define KORINA_PBA1M 0x0 ++#define KORINA_CNFG20 KORINA_PBA1M ++ ++#ifdef __MIPSEB__ ++#define KORINA_PBA2C ((SIZE_2MB<<SIZE_SHFT) | PCIPBAC_sb_m | \ ++ PCIPBAC_msi_m) ++#else ++#define KORINA_PBA2C ((SIZE_2MB<<SIZE_SHFT) | \ ++ PCIPBAC_msi_m) ++ ++#endif ++#define KORINA_CNFG21 KORINA_PBA2C ++#define KORINA_PBA2M 0x18000000 ++#define KORINA_CNFG22 KORINA_PBA2M ++#define KORINA_PBA3C 0 ++#define KORINA_CNFG23 KORINA_PBA3C ++#define KORINA_PBA3M 0 ++#define KORINA_CNFG24 KORINA_PBA3M ++ ++ ++ ++#define PCITC_DTIMER_VAL 8 ++#define PCITC_RTIMER_VAL 0x10 ++ ++ ++#endif /* _PCIKORINA_H */ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -urN linux.old/include/asm-mips/rc32434/pci_regs.h linux.dev/include/asm-mips/rc32434/pci_regs.h +--- linux.old/include/asm-mips/rc32434/pci_regs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/pci_regs.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,8 @@ ++/* Override the default address space for this arch ++*/ ++ ++#include <linux/pci_regs.h> ++ ++//#undef PCI_BASE_ADDRESS_SPACE ++//#define PCI_BASE_ADDRESS_SPACE PCI_BASE_ADDRESS_SPACE_MEMORY ++ +diff -urN linux.old/include/asm-mips/rc32434/rb.h linux.dev/include/asm-mips/rc32434/rb.h +--- linux.old/include/asm-mips/rc32434/rb.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/rb.h 2006-06-15 16:27:36.000000000 +0200 +@@ -0,0 +1,69 @@ ++#ifndef __MIPS_RB_H__ ++#define __MIPS_RB_H__ ++#include <linux/genhd.h> ++ ++#define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(0x18000000)) ++#define DEV0BASE 0x010000 ++#define DEV0MASK 0x010004 ++#define DEV0C 0x010008 ++#define DEV0TC 0x01000C ++#define DEV1BASE 0x010010 ++#define DEV1MASK 0x010014 ++#define DEV1C 0x010018 ++#define DEV1TC 0x01001C ++#define DEV2BASE 0x010020 ++#define DEV2MASK 0x010024 ++#define DEV2C 0x010028 ++#define DEV2TC 0x01002C ++#define DEV3BASE 0x010030 ++#define DEV3MASK 0x010034 ++#define DEV3C 0x010038 ++#define DEV3TC 0x01003C ++#define BTCS 0x010040 ++#define BTCOMPARE 0x010044 ++#define GPIOFUNC 0x050000 ++#define GPIOCFG 0x050004 ++#define GPIOD 0x050008 ++#define GPIOILEVEL 0x05000C ++#define GPIOISTAT 0x050010 ++#define GPIONMIEN 0x050014 ++#define IMASK6 0x038038 ++ ++#define LO_WPX (1 << 0) ++#define LO_ALE (1 << 1) ++#define LO_CLE (1 << 2) ++#define LO_CEX (1 << 3) ++#define LO_FOFF (1 << 5) ++#define LO_SPICS (1 << 6) ++#define LO_ULED (1 << 7) ++ ++typedef enum { ++ FUNC = 0x00, ++ CFG = 0x04, ++ DATA = 0x08, ++ ILEVEL = 0x0c, ++ ISTAT = 0x10, ++ NMIEN = 0x14 ++} gpio_func; ++ ++extern void changeLatchU5(unsigned char orMask, unsigned char nandMask); ++extern unsigned get434Reg(unsigned regOffs); ++extern void set434Reg(unsigned regOffs, unsigned bit, unsigned len, unsigned val); ++extern void gpio_set(gpio_func func, u32 mask, u32 value); ++extern u32 gpio_get(gpio_func func); ++ ++#define get434Reg(x) (*(volatile unsigned *) (IDT434_REG_BASE + (x))) ++ ++struct korina_device { ++ char *name; ++ unsigned char mac[6]; ++ struct net_device *dev; ++}; ++ ++struct cf_device { ++ int gpio_pin; ++ void *dev; ++ struct gendisk *gd; ++}; ++ ++#endif +diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mips/rc32434/rc32434.h +--- linux.old/include/asm-mips/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/rc32434.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,126 @@ ++/* ++ *************************************************************************** ++ * Definitions for IDT RC323434 CPU. ++ * ++ **************************************************************************** ++ * Kiran Rao ++ * ++ * Original form ++ **************************************************************************** ++ * P. Sadik Oct 08, 2003 ++ * ++ * Started revision history ++ * Made IDT_BUS_FREQ a kernel configuration parameter ++ **************************************************************************** ++ * P. Sadik Oct 10, 2003 ++ * ++ * Removed IDT_BUS_FREQ, since this parameter is no longer required. Instead ++ * idt_cpu_freq is used everywhere ++ **************************************************************************** ++ * P. Sadik Oct 20, 2003 ++ * ++ * Removed RC32434_BASE_BAUD ++ **************************************************************************** ++*/ ++#ifndef _RC32434_H_ ++#define _RC32434_H_ ++ ++#include <linux/config.h> ++#include <linux/delay.h> ++#include <asm/io.h> ++#include <asm/rc32434/timer.h> ++ ++#define RC32434_REG_BASE 0x18000000 ++ ++#define interrupt ((volatile INT_t ) INT0_VirtualAddress) ++#define timer ((volatile TIM_t) TIM0_VirtualAddress) ++#define gpio ((volatile GPIO_t) GPIO0_VirtualAddress) ++ ++#define IDT_CLOCK_MULT 2 ++#define MIPS_CPU_TIMER_IRQ 7 ++/* Interrupt Controller */ ++#define IC_GROUP0_PEND (RC32434_REG_BASE + 0x38000) ++#define IC_GROUP0_MASK (RC32434_REG_BASE + 0x38008) ++#define IC_GROUP_OFFSET 0x0C ++ ++#define NUM_INTR_GROUPS 5 ++/* 16550 UARTs */ ++ ++#define GROUP0_IRQ_BASE 8 /* GRP2 IRQ numbers start here */ ++#define GROUP1_IRQ_BASE (GROUP0_IRQ_BASE + 32) /* GRP3 IRQ numbers start here */ ++#define GROUP2_IRQ_BASE (GROUP1_IRQ_BASE + 32) /* GRP4 IRQ numbers start here */ ++#define GROUP3_IRQ_BASE (GROUP2_IRQ_BASE + 32) /* GRP5 IRQ numbers start here */ ++#define GROUP4_IRQ_BASE (GROUP3_IRQ_BASE + 32) ++ ++ ++#ifdef __MIPSEB__ ++#define RC32434_UART0_BASE (RC32434_REG_BASE + 0x58003) ++#else ++#define RC32434_UART0_BASE (RC32434_REG_BASE + 0x58000) ++#endif ++ ++#define RC32434_UART0_IRQ GROUP3_IRQ_BASE + 0 ++// #define EB434_UART1_IRQ GROUP4_IRQ_BASE + 11 ++ ++#define local_readl(addr) __raw_readl(addr) ++#define local_writel(l,addr) __raw_writel(l,addr) ++ ++/* cpu pipeline flush */ ++static inline void rc32434_sync(void) ++{ ++ __asm__ volatile ("sync"); ++} ++ ++static inline void rc32434_sync_udelay(int us) ++{ ++ __asm__ volatile ("sync"); ++ udelay(us); ++} ++ ++static inline void rc32434_sync_delay(int ms) ++{ ++ __asm__ volatile ("sync"); ++ mdelay(ms); ++} ++ ++/* ++ * C access to CLZ and CLO instructions ++ * (count leading zeroes/ones). ++ */ ++static inline int rc32434_clz(unsigned long val) ++{ ++ int ret; ++ __asm__ volatile ( ++ ".set\tnoreorder\n\t" ++ ".set\tnoat\n\t" ++ ".set\tmips32\n\t" ++ "clz\t%0,%1\n\t" ++ ".set\tmips0\n\t" ++ ".set\tat\n\t" ++ ".set\treorder" ++ : "=r" (ret) ++ : "r" (val)); ++ ++ return ret; ++} ++static inline int rc32434_clo(unsigned long val) ++{ ++ int ret; ++ __asm__ volatile ( ++ ".set\tnoreorder\n\t" ++ ".set\tnoat\n\t" ++ ".set\tmips32\n\t" ++ "clo\t%0,%1\n\t" ++ ".set\tmips0\n\t" ++ ".set\tat\n\t" ++ ".set\treorder" ++ : "=r" (ret) ++ : "r" (val)); ++ ++ return ret; ++} ++ ++extern void cons_putc(char c); ++extern void cons_puts(char *s); ++ ++#endif /* _RC32434_H_ */ +diff -urN linux.old/include/asm-mips/rc32434/rst.h linux.dev/include/asm-mips/rc32434/rst.h +--- linux.old/include/asm-mips/rc32434/rst.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/rst.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,105 @@ ++#ifndef __IDT_RST_H__ ++#define __IDT_RST_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Reset register definitions. ++ * ++ * File : $Id: rst.h,v 1.2 2002/06/06 18:34:05 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020118 ++ * Update : ++ * $Log: rst.h,v $ ++ * Revision 1.2 2002/06/06 18:34:05 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.1 2002/05/29 17:33:24 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ RST0_PhysicalAddress = 0x18000000, ++ RST_PhysicalAddress = RST0_PhysicalAddress, // Default ++ ++ RST0_VirtualAddress = 0xb8000000, ++ RST_VirtualAddress = RST0_VirtualAddress, // Default ++} ; ++ ++typedef struct RST_s ++{ ++ U32 filler [0x0006] ; ++ U32 sysid ; ++ U32 filler2 [0x2000-8] ; // Pad out to offset 0x8000 ++ U32 reset ; ++ U32 bcv ; ++ U32 cea ; ++} volatile * RST_t ; ++ ++enum ++{ ++ SYSID_rev_b = 0, ++ SYSID_rev_m = 0x000000ff, ++ SYSID_imp_b = 8, ++ SYSID_imp_m = 0x000fff00, ++ SYSID_vendor_b = 20, ++ SYSID_vendor_m = 0xfff00000, ++ ++ BCV_pll_b = 0, ++ BCV_pll_m = 0x0000000f, ++ BCV_pll_PLLBypass_v = 0x0, // PCLK=1*CLK. ++ BCV_pll_Mul3_v = 0x1, // PCLK=3*CLK. ++ BCV_pll_Mul4_v = 0x2, // PCLK=4*CLK. ++ BCV_pll_SlowMul5_v = 0x3, // PCLK=4*CLK. ++ BCV_pll_Mul5_v = 0x4, // PCLK=6*CLK. ++ BCV_pll_SlowMul6_v = 0x5, // PCLK=8*CLK. ++ BCV_pll_Mul6_v = 0x6, // PCLK=8*CLK. ++ BCV_pll_Mul8_v = 0x7, // PCLK=8*CLK. ++ BCV_pll_Mul10_v = 0x8, // PCLK=8*CLK. ++ BCV_pll_Res5_v = 0x9, ++ BCV_pll_Res6_v = 0xa, ++ BCV_pll_Res7_v = 0xb, ++ BCV_pll_Res8_v = 0xc, ++ BCV_pll_Res13_v = 0xd, ++ BCV_pll_Res14_v = 0xe, ++ BCV_pll_Res15_v = 0xf, ++ BCV_clkDiv_b = 4, ++ BCV_clkDiv_m = 0x00000030, ++ BCV_clkDiv_Div1_v = 0x0, ++ BCV_clkDiv_Div2_v = 0x1, ++ BCV_clkDiv_Div4_v = 0x2, ++ BCV_clkDiv_Res3_v = 0x3, ++ BCV_bigEndian_b = 6, ++ BCV_bigEndian_m = 0x00000040, ++ BCV_resetFast_b = 7, ++ BCV_resetFast_m = 0x00000080, ++ BCV_pciMode_b = 8, ++ BCV_pciMode_m = 0x00000100, ++ BCV_pciMode_disabled_v = 0, // PCI is disabled. ++ BCV_pciMode_tnr_v = 1, // satellite Target Not Ready. ++ BCV_pciMode_suspended_v = 2, // satellite with suspended CPU. ++ BCV_pciMode_external_v = 3, // host, external arbiter. ++ BCV_pciMode_fixed_v = 4, // host, fixed priority arbiter. ++ BCV_pciMode_roundRobin_v= 5, // host, round robin arbiter. ++ BCV_pciMode_res6_v = 6, ++ BCV_pciMode_res7_v = 7, ++ BCV_watchDisable_b = 11, ++ BCV_watchDisable_m = 0x00000800, ++ BCV_pllTest_b = 12, ++ BCV_pllTest_m = 0x00001000, ++ BCV_nvramInit_b = 13, ++ BCV_nvramInit_m = 0x00002000, ++ BCV_clksyncTstMd_b = 14, ++ BCV_clksyncTstMd_m = 0x00004000, ++ BCV_delayBypass_b = 15, ++ BCV_delayByPass_m = 0x00008000, ++} ; ++#endif // __IDT_RST_H__ +diff -urN linux.old/include/asm-mips/rc32434/spi.h linux.dev/include/asm-mips/rc32434/spi.h +--- linux.old/include/asm-mips/rc32434/spi.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/spi.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,100 @@ ++#ifndef __IDT_SPI_H__ ++#define __IDT_SPI_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Serial Peripheral Interface register definitions. ++ * ++ * File : $Id: spi.h,v 1.2 2002/06/06 18:34:05 astichte Exp $ ++ * ++ * Author : ryan.holmQVist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: spi.h,v $ ++ * Revision 1.2 2002/06/06 18:34:05 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.1 2002/05/29 17:33:25 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ SPI0_PhysicalAddress = 0x18070000, ++ SPI_PhysicalAddress = SPI0_PhysicalAddress, ++ ++ SPI0_VirtualAddress = 0xb8070000, ++ SPI_VirtualAddress = SPI0_VirtualAddress, ++} ; ++ ++typedef struct ++{ ++ U32 spcp ; // prescalar. 0=off, * spiClk = sysClk/(2*(spcp+1)*SPR) ++ U32 spc ; // spi control reg use SPC_ ++ U32 sps ; // spi status reg use SPS_ ++ U32 spd ; // spi data reg use SPD_ ++ U32 siofunc ; // serial IO function use SIOFUNC_ ++ U32 siocfg ; // serial IO config use SIOCFG_ ++ U32 siod; // serial IO data use SIOD_ ++} volatile *SPI_t ; ++ ++enum ++{ ++ SPCP_div_b = 0, ++ SPCP_div_m = 0x000000ff, ++ SPC_spr_b = 0, ++ SPC_spr_m = 0x00000003, ++ SPC_spr_div2_v = 0, ++ SPC_spr_div4_v = 1, ++ SPC_spr_div16_v = 2, ++ SPC_spr_div32_v = 3, ++ SPC_cpha_b = 2, ++ SPC_cpha_m = 0x00000004, ++ SPC_cpol_b = 3, ++ SPC_cpol_m = 0x00000008, ++ SPC_mstr_b = 4, ++ SPC_mstr_m = 0x00000010, ++ SPC_spe_b = 6, ++ SPC_spe_m = 0x00000040, ++ SPC_spie_b = 7, ++ SPC_spie_m = 0x00000080, ++ ++ SPS_modf_b = 4, ++ SPS_modf_m = 0x00000010, ++ SPS_wcol_b = 6, ++ SPS_wcol_m = 0x00000040, ++ SPS_spif_b = 7, ++ SPS_spif_m = 0x00000070, ++ ++ SPD_data_b = 0, ++ SPD_data_m = 0x000000ff, ++ ++ SIOFUNC_sdo_b = 0, ++ SIOFUNC_sdo_m = 0x00000001, ++ SIOFUNC_sdi_b = 1, ++ SIOFUNC_sdi_m = 0x00000002, ++ SIOFUNC_sck_b = 2, ++ SIOFUNC_sck_m = 0x00000004, ++ ++ SIOCFG_sdo_b = 0, ++ SIOCFG_sdo_m = 0x00000001, ++ SIOCFG_sdi_b = 1, ++ SIOCFG_sdi_m = 0x00000002, ++ SIOCFG_sck_b = 2, ++ SIOCFG_sck_m = 0x00000004, ++ ++ SIOD_sdo_b = 0, ++ SIOD_sdo_m = 0x00000001, ++ SIOD_sdi_b = 1, ++ SIOD_sdi_m = 0x00000002, ++ SIOD_sck_b = 2, ++ SIOD_sck_m = 0x00000004, ++} ; ++#endif // __IDT_SPI_H__ +diff -urN linux.old/include/asm-mips/rc32434/timer.h linux.dev/include/asm-mips/rc32434/timer.h +--- linux.old/include/asm-mips/rc32434/timer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/timer.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,91 @@ ++/************************************************************************** ++ * ++ * BRIEF MODULE DESCRIPTION ++ * Definitions for timer registers ++ * ++ * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ ************************************************************************** ++ * May 2004 rkt,neb. ++ * ++ * Initial Release ++ * ++ * ++ * ++ ************************************************************************** ++ */ ++ ++#ifndef __IDT_TIM_H__ ++#define __IDT_TIM_H__ ++ ++enum ++{ ++ TIM0_PhysicalAddress = 0x18028000, ++ TIM_PhysicalAddress = TIM0_PhysicalAddress, // Default ++ ++ TIM0_VirtualAddress = 0xb8028000, ++ TIM_VirtualAddress = TIM0_VirtualAddress, // Default ++} ; ++ ++enum ++{ ++ TIM_Count = 3, ++} ; ++ ++struct TIM_CNTR_s ++{ ++ u32 count ; ++ u32 compare ; ++ u32 ctc ; //use CTC_ ++} ; ++ ++typedef struct TIM_s ++{ ++ struct TIM_CNTR_s tim [TIM_Count] ; ++ u32 rcount ; //use RCOUNT_ ++ u32 rcompare ; //use RCOMPARE_ ++ u32 rtc ; //use RTC_ ++} volatile * TIM_t ; ++ ++enum ++{ ++ CTC_en_b = 0, ++ CTC_en_m = 0x00000001, ++ CTC_to_b = 1, ++ CTC_to_m = 0x00000002, ++ ++ RCOUNT_count_b = 0, ++ RCOUNT_count_m = 0x0000ffff, ++ RCOMPARE_compare_b = 0, ++ RCOMPARE_compare_m = 0x0000ffff, ++ RTC_ce_b = 0, ++ RTC_ce_m = 0x00000001, ++ RTC_to_b = 1, ++ RTC_to_m = 0x00000002, ++ RTC_rqe_b = 2, ++ RTC_rqe_m = 0x00000004, ++ ++} ; ++#endif // __IDT_TIM_H__ ++ +diff -urN linux.old/include/asm-mips/rc32434/tim.h linux.dev/include/asm-mips/rc32434/tim.h +--- linux.old/include/asm-mips/rc32434/tim.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/tim.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,78 @@ ++#ifndef __IDT_TIM_H__ ++#define __IDT_TIM_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Timer register definition. ++ * ++ * File : $Id: tim.h,v 1.2 2002/06/06 18:34:05 astichte Exp $ ++ * ++ * Author : ryan.holmQVist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: tim.h,v $ ++ * Revision 1.2 2002/06/06 18:34:05 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.1 2002/05/29 17:33:25 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ TIM0_PhysicalAddress = 0x18028000, ++ TIM_PhysicalAddress = TIM0_PhysicalAddress, // Default ++ ++ TIM0_VirtualAddress = 0xb8028000, ++ TIM_VirtualAddress = TIM0_VirtualAddress, // Default ++} ; ++ ++enum ++{ ++ TIM_Count = 3, ++} ; ++ ++struct TIM_CNTR_s ++{ ++ U32 count ; ++ U32 compare ; ++ U32 ctc ; //use CTC_ ++} ; ++ ++typedef struct TIM_s ++{ ++ struct TIM_CNTR_s tim [TIM_Count] ; ++ U32 rcount ; //use RCOUNT_ ++ U32 rcompare ; //use RCOMPARE_ ++ U32 rtc ; //use RTC_ ++} volatile * TIM_t ; ++ ++enum ++{ ++ CTC_en_b = 0, ++ CTC_en_m = 0x00000001, ++ CTC_to_b = 1, ++ CTC_to_m = 0x00000002, ++ ++ RCOUNT_count_b = 0, ++ RCOUNT_count_m = 0x0000ffff, ++ RCOMPARE_compare_b = 0, ++ RCOMPARE_compare_m = 0x0000ffff, ++ RTC_ce_b = 0, ++ RTC_ce_m = 0x00000001, ++ RTC_to_b = 1, ++ RTC_to_m = 0x00000002, ++ RTC_rqe_b = 2, ++ RTC_rqe_m = 0x00000004, ++ ++} ; ++#endif // __IDT_TIM_H__ ++ +diff -urN linux.old/include/asm-mips/rc32434/types.h linux.dev/include/asm-mips/rc32434/types.h +--- linux.old/include/asm-mips/rc32434/types.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/types.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,39 @@ ++#ifndef __IDT_TYPES_H__ ++#define __IDT_TYPES_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * Common typedefs used in IDT-generated code. ++ * ++ * File : $Id: types.h,v 1.1 2002/06/06 16:16:56 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020606 ++ * Update : ++ * $Log: types.h,v $ ++ * Revision 1.1 2002/06/06 16:16:56 astichte ++ * Added ++ * ++ * ++ ******************************************************************************/ ++ ++typedef unsigned char U8 ; ++typedef signed char S8 ; ++ ++typedef unsigned short U16 ; ++typedef signed short S16 ; ++ ++typedef unsigned int U32 ; ++typedef signed int S32 ; ++ ++typedef unsigned long long U64 ; ++typedef signed long long S64 ; ++ ++#ifndef __cplusplus ++ typedef U32 bool ; // (false == 0), (true is != false) ++#endif // __cplusplus ++ ++#endif // __IDT_TYPES_H__ +diff -urN linux.old/include/asm-mips/rc32434/uart.h linux.dev/include/asm-mips/rc32434/uart.h +--- linux.old/include/asm-mips/rc32434/uart.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/uart.h 2006-06-15 16:26:53.000000000 +0200 +@@ -0,0 +1,178 @@ ++#ifndef __IDT_UART_H__ ++#define __IDT_UART_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * UART register definitions. ++ * ++ * File : $Id: uart.h,v 1.3 2002/06/06 18:34:05 astichte Exp $ ++ * ++ * Author : Allen.Stichter@idt.com ++ * Date : 20020118 ++ * Update : ++ * $Log: uart.h,v $ ++ * Revision 1.3 2002/06/06 18:34:05 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/04 17:37:52 astichte ++ * Updated register definitions. ++ * ++ * Revision 1.1 2002/05/29 17:33:25 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#include <asm/rc32434/types.h> ++ ++enum ++{ ++ UART_PhysicalAddress = 0x18058000, ++ UART_PhysicalAddress = UART_PhysicalAddress, // Default ++ ++ UART_VirtualAddress = 0xb8058000, ++ UART_VirtualAddress = UART_VirtualAddress, // Default ++} ; ++ ++/* ++ * Register definitions are in bytes so we can handle endian problems. ++ */ ++ ++typedef struct UART_s ++{ ++ union ++ { ++ U32 const uartrb ; // 0x00 - DLAB=0, read. ++ U32 uartth ; // 0x00 - DLAB=0, write. ++ U32 uartdll ; // 0x00 - DLAB=1, read/write. ++ } ; ++ ++ union ++ { ++ U32 uartie ; // 0x04 - DLAB=0, read/write. ++ U32 uartdlh ; // 0x04 - DLAB=1, read/write. ++ } ; ++ union ++ { ++ U32 const uartii ; // 0x08 - DLAB=0, read. ++ U32 uartfc ; // 0x08 - DLAB=0, write. ++ } ; ++ ++ U32 uartlc ; // 0x0c ++ U32 uartmc ; // 0x10 ++ U32 uartls ; // 0x14 ++ U32 uartms ; // 0x18 ++ U32 uarts ; // 0x1c ++} volatile *UART_t ; ++ ++// Reset registers. ++typedef U32 volatile *UARTRR_t ; ++ ++enum ++{ ++ UARTIE_rda_b = 0, ++ UARTIE_rda_m = 0x00000001, ++ UARTIE_the_b = 1, ++ UARTIE_the_m = 0x00000002, ++ UARTIE_rls_b = 2, ++ UARTIE_rls_m = 0x00000004, ++ UARTIE_ems_b = 3, ++ UARTIE_ems_m = 0x00000008, ++ ++ UARTII_pi_b = 0, ++ UARTII_pi_m = 0x00000001, ++ UARTII_iid_b = 1, ++ UARTII_iid_m = 0x0000000e, ++ UARTII_iid_ms_v = 0, // Modem stat-CTS,DSR,RI or DCD. ++ UARTII_iid_thre_v = 1, // Trans. Holding Reg. empty. ++ UARTII_iid_rda_v = 2, // Receive data available ++ UARTII_iid_rls_v = 3, // Overrun, parity, etc, error. ++ UARTII_iid_res4_v = 4, // reserved. ++ UARTII_iid_res5_v = 5, // reserved. ++ UARTII_iid_cto_v = 6, // Character timeout. ++ UARTII_iid_res7_v = 7, // reserved. ++ ++ UARTFC_en_b = 0, ++ UARTFC_en_m = 0x00000001, ++ UARTFC_rr_b = 1, ++ UARTFC_rr_m = 0x00000002, ++ UARTFC_tr_b = 2, ++ UARTFC_tr_m = 0x00000004, ++ UARTFC_dms_b = 3, ++ UARTFC_dms_m = 0x00000008, ++ UARTFC_rt_b = 6, ++ UARTFC_rt_m = 0x000000c0, ++ UARTFC_rt_1Byte_v = 0, ++ UARTFC_rt_4Byte_v = 1, ++ UARTFC_rt_8Byte_v = 2, ++ UARTFC_rt_14Byte_v = 3, ++ ++ UARTLC_wls_b = 0, ++ UARTLC_wls_m = 0x00000003, ++ UARTLC_wls_5Bits_v = 0, ++ UARTLC_wls_6Bits_v = 1, ++ UARTLC_wls_7Bits_v = 2, ++ UARTLC_wls_8Bits_v = 3, ++ UARTLC_stb_b = 2, ++ UARTLC_stb_m = 0x00000004, ++ UARTLC_pen_b = 3, ++ UARTLC_pen_m = 0x00000008, ++ UARTLC_eps_b = 4, ++ UARTLC_eps_m = 0x00000010, ++ UARTLC_sp_b = 5, ++ UARTLC_sp_m = 0x00000020, ++ UARTLC_sb_b = 6, ++ UARTLC_sb_m = 0x00000040, ++ UARTLC_dlab_b = 7, ++ UARTLC_dlab_m = 0x00000080, ++ ++ UARTMC_dtr_b = 0, ++ UARTMC_dtr_m = 0x00000001, ++ UARTMC_rts_b = 1, ++ UARTMC_rts_m = 0x00000002, ++ UARTMC_o1_b = 2, ++ UARTMC_o1_m = 0x00000004, ++ UARTMC_o2_b = 3, ++ UARTMC_o2_m = 0x00000008, ++ UARTMC_lp_b = 4, ++ UARTMC_lp_m = 0x00000010, ++ ++ UARTLS_dr_b = 0, ++ UARTLS_dr_m = 0x00000001, ++ UARTLS_oe_b = 1, ++ UARTLS_oe_m = 0x00000002, ++ UARTLS_pe_b = 2, ++ UARTLS_pe_m = 0x00000004, ++ UARTLS_fe_b = 3, ++ UARTLS_fe_m = 0x00000008, ++ UARTLS_bi_b = 4, ++ UARTLS_bi_m = 0x00000010, ++ UARTLS_thr_b = 5, ++ UARTLS_thr_m = 0x00000020, ++ UARTLS_te_b = 6, ++ UARTLS_te_m = 0x00000040, ++ UARTLS_rfe_b = 7, ++ UARTLS_rfe_m = 0x00000080, ++ ++ UARTMS_dcts_b = 0, ++ UARTMS_dcts_m = 0x00000001, ++ UARTMS_ddsr_b = 1, ++ UARTMS_ddsr_m = 0x00000002, ++ UARTMS_teri_b = 2, ++ UARTMS_teri_m = 0x00000004, ++ UARTMS_ddcd_b = 3, ++ UARTMS_ddcd_m = 0x00000008, ++ UARTMS_cts_b = 4, ++ UARTMS_cts_m = 0x00000010, ++ UARTMS_dsr_b = 5, ++ UARTMS_dsr_m = 0x00000020, ++ UARTMS_ri_b = 6, ++ UARTMS_ri_m = 0x00000040, ++ UARTMS_dcd_b = 7, ++ UARTMS_dcd_m = 0x00000080, ++} ; ++ ++#endif // __IDT_UART_H__ diff --git a/openwrt/target/linux/rb532-2.6/patches/110-korina_ethernet.patch b/openwrt/target/linux/rb532-2.6/patches/110-korina_ethernet.patch new file mode 100644 index 00000000000..723bc4ff103 --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/110-korina_ethernet.patch @@ -0,0 +1,1375 @@ +diff -urN linux.old/drivers/net/Kconfig linux.dev/drivers/net/Kconfig +--- linux.old/drivers/net/Kconfig 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/drivers/net/Kconfig 2006-06-08 20:19:40.000000000 +0200 +@@ -310,6 +310,13 @@ + + source "drivers/net/arm/Kconfig" + ++config KORINA ++ tristate "Korina Local Ethernet support" ++ depends on NET_ETHERNET && ( IDT_EB434 || MIKROTIK_RB500) ++ help ++ IDT RC32434 has one local ethernet port. Say Y here to enable it. ++ To compile this driver as a module, choose M here. ++ + config MACE + tristate "MACE (Power Mac ethernet) support" + depends on NET_ETHERNET && PPC_PMAC && PPC32 +diff -urN linux.old/drivers/net/korina.c linux.dev/drivers/net/korina.c +--- linux.old/drivers/net/korina.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/korina.c 2006-06-09 00:48:40.000000000 +0200 +@@ -0,0 +1,1159 @@ ++/************************************************************************** ++ * ++ * BRIEF MODULE DESCRIPTION ++ * Driver for the IDT RC32434 on-chip ethernet controller. ++ * ++ * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ ************************************************************************** ++ * May 2004 rkt, neb ++ * ++ * Based on the driver developed by B. Maruthanayakam, H. Kou and others. ++ * ++ * Aug 2004 Sadik ++ * ++ * Added NAPI ++ * ++ ************************************************************************** ++ */ ++ ++#include <linux/config.h> ++#include <linux/module.h> ++#include <linux/kernel.h> ++#include <linux/moduleparam.h> ++#include <linux/sched.h> ++#include <linux/ctype.h> ++#include <linux/types.h> ++#include <linux/fcntl.h> ++#include <linux/interrupt.h> ++#include <linux/ptrace.h> ++#include <linux/init.h> ++#include <linux/ioport.h> ++#include <linux/proc_fs.h> ++#include <linux/in.h> ++#include <linux/slab.h> ++#include <linux/string.h> ++#include <linux/delay.h> ++#include <linux/netdevice.h> ++#include <linux/etherdevice.h> ++#include <linux/skbuff.h> ++#include <linux/errno.h> ++#include <linux/platform_device.h> ++#include <asm/bootinfo.h> ++#include <asm/system.h> ++#include <asm/bitops.h> ++#include <asm/pgtable.h> ++#include <asm/segment.h> ++#include <asm/io.h> ++#include <asm/dma.h> ++ ++#include <asm/rc32434/rb.h> ++#include "rc32434_eth.h" ++ ++#define DRIVER_VERSION "(mar2904)" ++ ++#define DRIVER_NAME "rc32434 Ethernet driver. " DRIVER_VERSION ++ ++#define STATION_ADDRESS_HIGH(dev) (((dev)->dev_addr[0] << 8) | \ ++ ((dev)->dev_addr[1])) ++#define STATION_ADDRESS_LOW(dev) (((dev)->dev_addr[2] << 24) | \ ++ ((dev)->dev_addr[3] << 16) | \ ++ ((dev)->dev_addr[4] << 8) | \ ++ ((dev)->dev_addr[5])) ++ ++#define MII_CLOCK 1250000 /* no more than 2.5MHz */ ++#define CONFIG_IDT_USE_NAPI 1 ++ ++ ++static inline void rc32434_abort_tx(struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ rc32434_abort_dma(dev, lp->tx_dma_regs); ++ ++} ++ ++static inline void rc32434_abort_rx(struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ rc32434_abort_dma(dev, lp->rx_dma_regs); ++ ++} ++ ++static inline void rc32434_start_tx(struct rc32434_local *lp, volatile DMAD_t td) ++{ ++ rc32434_start_dma(lp->tx_dma_regs, CPHYSADDR(td)); ++} ++ ++static inline void rc32434_start_rx(struct rc32434_local *lp, volatile DMAD_t rd) ++{ ++ rc32434_start_dma(lp->rx_dma_regs, CPHYSADDR(rd)); ++} ++ ++static inline void rc32434_chain_tx(struct rc32434_local *lp, volatile DMAD_t td) ++{ ++ rc32434_chain_dma(lp->tx_dma_regs, CPHYSADDR(td)); ++} ++ ++static inline void rc32434_chain_rx(struct rc32434_local *lp, volatile DMAD_t rd) ++{ ++ rc32434_chain_dma(lp->rx_dma_regs, CPHYSADDR(rd)); ++} ++ ++#ifdef RC32434_PROC_DEBUG ++static int rc32434_read_proc(char *buf, char **start, off_t fpos, ++ int length, int *eof, void *data) ++{ ++ struct net_device *dev = (struct net_device *)data; ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ int len = 0; ++ ++ /* print out header */ ++ len += sprintf(buf + len, "\n\tKorina Ethernet Debug\n\n"); ++ len += sprintf (buf + len, ++ "DMA halt count = %10d, DMA run count = %10d\n", ++ lp->dma_halt_cnt, lp->dma_run_cnt); ++ ++ if (fpos >= len) { ++ *start = buf; ++ *eof = 1; ++ return 0; ++ } ++ *start = buf + fpos; ++ ++ if ((len -= fpos) > length) ++ return length; ++ *eof = 1; ++ ++ return len; ++ ++} ++#endif ++ ++ ++/* ++ * Restart the RC32434 ethernet controller. ++ */ ++static int rc32434_restart(struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ ++ /* ++ * Disable interrupts ++ */ ++ disable_irq(lp->rx_irq); ++ disable_irq(lp->tx_irq); ++#ifdef RC32434_REVISION ++ disable_irq(lp->ovr_irq); ++#endif ++ disable_irq(lp->und_irq); ++ ++ /* Mask F E bit in Tx DMA */ ++ __raw_writel(__raw_readl(&lp->tx_dma_regs->dmasm) | DMASM_f_m | DMASM_e_m, &lp->tx_dma_regs->dmasm); ++ /* Mask D H E bit in Rx DMA */ ++ __raw_writel(__raw_readl(&lp->rx_dma_regs->dmasm) | DMASM_d_m | DMASM_h_m | DMASM_e_m, &lp->rx_dma_regs->dmasm); ++ ++ rc32434_init(dev); ++ rc32434_multicast_list(dev); ++ ++ enable_irq(lp->und_irq); ++#ifdef RC32434_REVISION ++ enable_irq(lp->ovr_irq); ++#endif ++ enable_irq(lp->tx_irq); ++ enable_irq(lp->rx_irq); ++ ++ return 0; ++} ++ ++static int rc32434_probe(struct platform_device *pdev) ++{ ++ struct korina_device *bif = (struct korina_device *) pdev->dev.platform_data; ++ struct rc32434_local *lp = NULL; ++ struct net_device *dev = NULL; ++ struct resource *r; ++ int i, retval,err; ++ ++ dev = alloc_etherdev(sizeof(struct rc32434_local)); ++ if(!dev) { ++ ERR("Korina_eth: alloc_etherdev failed\n"); ++ return -1; ++ } ++ ++ platform_set_drvdata(pdev, dev); ++ SET_MODULE_OWNER(dev); ++ bif->dev = dev; ++ ++ memcpy(dev->dev_addr, bif->mac, 6); ++ ++ /* Initialize the device structure. */ ++ if (dev->priv == NULL) { ++ lp = (struct rc32434_local *)kmalloc(sizeof(*lp), GFP_KERNEL); ++ memset(lp, 0, sizeof(struct rc32434_local)); ++ } ++ else { ++ lp = (struct rc32434_local *)dev->priv; ++ } ++ ++ lp->rx_irq = platform_get_irq_byname(pdev, "korina_rx"); ++ lp->tx_irq = platform_get_irq_byname(pdev, "korina_tx"); ++ lp->ovr_irq = platform_get_irq_byname(pdev, "korina_ovr"); ++ lp->und_irq = platform_get_irq_byname(pdev, "korina_und"); ++ ++ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_regs"); ++ dev->base_addr = r->start; ++ lp->eth_regs = ioremap_nocache(r->start, r->end - r->start); ++ if (!lp->eth_regs) { ++ ERR("Can't remap eth registers\n"); ++ retval = -ENXIO; ++ goto probe_err_out; ++ } ++ ++ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_rx"); ++ lp->rx_dma_regs = ioremap_nocache(r->start, r->end - r->start); ++ if (!lp->rx_dma_regs) { ++ ERR("Can't remap Rx DMA registers\n"); ++ retval = -ENXIO; ++ goto probe_err_out; ++ } ++ ++ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_tx"); ++ lp->tx_dma_regs = ioremap_nocache(r->start, r->end - r->start); ++ if (!lp->tx_dma_regs) { ++ ERR("Can't remap Tx DMA registers\n"); ++ retval = -ENXIO; ++ goto probe_err_out; ++ } ++ ++#ifdef RC32434_PROC_DEBUG ++ lp->ps = create_proc_read_entry (bif->name, 0, proc_net, ++ rc32434_read_proc, dev); ++#endif ++ ++ lp->td_ring = (DMAD_t)kmalloc(TD_RING_SIZE + RD_RING_SIZE, GFP_KERNEL); ++ if (!lp->td_ring) { ++ ERR("Can't allocate descriptors\n"); ++ retval = -ENOMEM; ++ goto probe_err_out; ++ } ++ ++ dma_cache_inv((unsigned long)(lp->td_ring), TD_RING_SIZE + RD_RING_SIZE); ++ ++ /* now convert TD_RING pointer to KSEG1 */ ++ lp->td_ring = (DMAD_t )KSEG1ADDR(lp->td_ring); ++ lp->rd_ring = &lp->td_ring[RC32434_NUM_TDS]; ++ ++ ++ spin_lock_init(&lp->lock); ++ ++ /* just use the rx dma irq */ ++ dev->irq = lp->rx_irq; ++ ++ dev->priv = lp; ++ ++ dev->open = rc32434_open; ++ dev->stop = rc32434_close; ++ dev->hard_start_xmit = rc32434_send_packet; ++ dev->get_stats = rc32434_get_stats; ++ dev->set_multicast_list = &rc32434_multicast_list; ++ dev->tx_timeout = rc32434_tx_timeout; ++ dev->watchdog_timeo = RC32434_TX_TIMEOUT; ++ ++#ifdef CONFIG_IDT_USE_NAPI ++ dev->poll = rc32434_poll; ++ dev->weight = 64; ++ printk("Using NAPI with weight %d\n",dev->weight); ++#else ++ lp->rx_tasklet = kmalloc(sizeof(struct tasklet_struct), GFP_KERNEL); ++ tasklet_init(lp->rx_tasklet, rc32434_rx_tasklet, (unsigned long)dev); ++#endif ++ lp->tx_tasklet = kmalloc(sizeof(struct tasklet_struct), GFP_KERNEL); ++ tasklet_init(lp->tx_tasklet, rc32434_tx_tasklet, (unsigned long)dev); ++ ++ if ((err = register_netdev(dev))) { ++ printk(KERN_ERR "rc32434 ethernet. Cannot register net device %d\n", err); ++ free_netdev(dev); ++ retval = -EINVAL; ++ goto probe_err_out; ++ } ++ ++ INFO("Rx IRQ %d, Tx IRQ %d, ", lp->rx_irq, lp->tx_irq); ++ for (i = 0; i < 6; i++) { ++ printk("%2.2x", dev->dev_addr[i]); ++ if (i<5) ++ printk(":"); ++ } ++ printk("\n"); ++ ++ return 0; ++ ++ probe_err_out: ++ rc32434_cleanup_module(); ++ ERR(" failed. Returns %d\n", retval); ++ return retval; ++ ++} ++ ++static int rc32434_remove(struct platform_device *pdev) ++{ ++ struct korina_device *bif = (struct korina_device *) pdev->dev.platform_data; ++ ++ if (bif->dev != NULL) { ++ struct rc32434_local *lp = (struct rc32434_local *)bif->dev->priv; ++ if (lp != NULL) { ++ if (lp->eth_regs) ++ iounmap((void*)lp->eth_regs); ++ if (lp->rx_dma_regs) ++ iounmap((void*)lp->rx_dma_regs); ++ if (lp->tx_dma_regs) ++ iounmap((void*)lp->tx_dma_regs); ++ if (lp->td_ring) ++ kfree((void*)KSEG0ADDR(lp->td_ring)); ++ ++#ifdef RC32434_PROC_DEBUG ++ if (lp->ps) { ++ remove_proc_entry(bif->name, proc_net); ++ } ++#endif ++ kfree(lp); ++ } ++ ++ platform_set_drvdata(pdev, NULL); ++ unregister_netdev(bif->dev); ++ free_netdev(bif->dev); ++ kfree(bif->dev); ++ } ++ return 0; ++} ++ ++ ++static int rc32434_open(struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ ++ /* Initialize */ ++ if (rc32434_init(dev)) { ++ ERR("Error: cannot open the Ethernet device\n"); ++ return -EAGAIN; ++ } ++ ++ /* Install the interrupt handler that handles the Done Finished Ovr and Und Events */ ++ if (request_irq(lp->rx_irq, &rc32434_rx_dma_interrupt, ++ SA_SHIRQ | SA_INTERRUPT, ++ "Korina ethernet Rx", dev)) { ++ ERR(": unable to get Rx DMA IRQ %d\n", ++ lp->rx_irq); ++ return -EAGAIN; ++ } ++ if (request_irq(lp->tx_irq, &rc32434_tx_dma_interrupt, ++ SA_SHIRQ | SA_INTERRUPT, ++ "Korina ethernet Tx", dev)) { ++ ERR(": unable to get Tx DMA IRQ %d\n", ++ lp->tx_irq); ++ free_irq(lp->rx_irq, dev); ++ return -EAGAIN; ++ } ++ ++#ifdef RC32434_REVISION ++ /* Install handler for overrun error. */ ++ if (request_irq(lp->ovr_irq, &rc32434_ovr_interrupt, ++ SA_SHIRQ | SA_INTERRUPT, ++ "Ethernet Overflow", dev)) { ++ ERR(": unable to get OVR IRQ %d\n", ++ lp->ovr_irq); ++ free_irq(lp->rx_irq, dev); ++ free_irq(lp->tx_irq, dev); ++ return -EAGAIN; ++ } ++#endif ++ ++ /* Install handler for underflow error. */ ++ if (request_irq(lp->und_irq, &rc32434_und_interrupt, ++ SA_SHIRQ | SA_INTERRUPT, ++ "Ethernet Underflow", dev)) { ++ ERR(": unable to get UND IRQ %d\n", ++ lp->und_irq); ++ free_irq(lp->rx_irq, dev); ++ free_irq(lp->tx_irq, dev); ++#ifdef RC32434_REVISION ++ free_irq(lp->ovr_irq, dev); ++#endif ++ return -EAGAIN; ++ } ++ ++ ++ return 0; ++} ++ ++ ++ ++ ++static int rc32434_close(struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ u32 tmp; ++ ++ /* Disable interrupts */ ++ disable_irq(lp->rx_irq); ++ disable_irq(lp->tx_irq); ++#ifdef RC32434_REVISION ++ disable_irq(lp->ovr_irq); ++#endif ++ disable_irq(lp->und_irq); ++ ++ tmp = __raw_readl(&lp->tx_dma_regs->dmasm); ++ tmp = tmp | DMASM_f_m | DMASM_e_m; ++ __raw_writel(tmp, &lp->tx_dma_regs->dmasm); ++ ++ tmp = __raw_readl(&lp->rx_dma_regs->dmasm); ++ tmp = tmp | DMASM_d_m | DMASM_h_m | DMASM_e_m; ++ __raw_writel(tmp, &lp->rx_dma_regs->dmasm); ++ ++ free_irq(lp->rx_irq, dev); ++ free_irq(lp->tx_irq, dev); ++#ifdef RC32434_REVISION ++ free_irq(lp->ovr_irq, dev); ++#endif ++ free_irq(lp->und_irq, dev); ++ return 0; ++} ++ ++ ++/* transmit packet */ ++static int rc32434_send_packet(struct sk_buff *skb, struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ unsigned long flags; ++ u32 length; ++ DMAD_t td; ++ ++ ++ spin_lock_irqsave(&lp->lock, flags); ++ ++ td = &lp->td_ring[lp->tx_chain_tail]; ++ ++ /* stop queue when full, drop pkts if queue already full */ ++ if(lp->tx_count >= (RC32434_NUM_TDS - 2)) { ++ lp->tx_full = 1; ++ ++ if(lp->tx_count == (RC32434_NUM_TDS - 2)) { ++ netif_stop_queue(dev); ++ } ++ else { ++ lp->stats.tx_dropped++; ++ dev_kfree_skb_any(skb); ++ spin_unlock_irqrestore(&lp->lock, flags); ++ return 1; ++ } ++ } ++ ++ lp->tx_count ++; ++ ++ lp->tx_skb[lp->tx_chain_tail] = skb; ++ ++ length = skb->len; ++ ++ /* Setup the transmit descriptor. */ ++ td->ca = CPHYSADDR(skb->data); ++ ++ if(__raw_readl(&(lp->tx_dma_regs->dmandptr)) == 0) { ++ if( lp->tx_chain_status == empty ) { ++ td->control = DMA_COUNT(length) |DMAD_cof_m |DMAD_iof_m; /* Update tail */ ++ lp->tx_chain_tail = (lp->tx_chain_tail + 1) & RC32434_TDS_MASK; /* Move tail */ ++ __raw_writel(CPHYSADDR(&lp->td_ring[lp->tx_chain_head]), &(lp->tx_dma_regs->dmandptr)); /* Write to NDPTR */ ++ lp->tx_chain_head = lp->tx_chain_tail; /* Move head to tail */ ++ } ++ else { ++ td->control = DMA_COUNT(length) |DMAD_cof_m|DMAD_iof_m; /* Update tail */ ++ lp->td_ring[(lp->tx_chain_tail-1)& RC32434_TDS_MASK].control &= ~(DMAD_cof_m); /* Link to prev */ ++ lp->td_ring[(lp->tx_chain_tail-1)& RC32434_TDS_MASK].link = CPHYSADDR(td); /* Link to prev */ ++ lp->tx_chain_tail = (lp->tx_chain_tail + 1) & RC32434_TDS_MASK; /* Move tail */ ++ __raw_writel(CPHYSADDR(&lp->td_ring[lp->tx_chain_head]), &(lp->tx_dma_regs->dmandptr)); /* Write to NDPTR */ ++ lp->tx_chain_head = lp->tx_chain_tail; /* Move head to tail */ ++ lp->tx_chain_status = empty; ++ } ++ } ++ else { ++ if( lp->tx_chain_status == empty ) { ++ td->control = DMA_COUNT(length) |DMAD_cof_m |DMAD_iof_m; /* Update tail */ ++ lp->tx_chain_tail = (lp->tx_chain_tail + 1) & RC32434_TDS_MASK; /* Move tail */ ++ lp->tx_chain_status = filled; ++ } ++ else { ++ td->control = DMA_COUNT(length) |DMAD_cof_m |DMAD_iof_m; /* Update tail */ ++ lp->td_ring[(lp->tx_chain_tail-1)& RC32434_TDS_MASK].control &= ~(DMAD_cof_m); /* Link to prev */ ++ lp->td_ring[(lp->tx_chain_tail-1)& RC32434_TDS_MASK].link = CPHYSADDR(td); /* Link to prev */ ++ lp->tx_chain_tail = (lp->tx_chain_tail + 1) & RC32434_TDS_MASK; /* Move tail */ ++ } ++ } ++ ++ dev->trans_start = jiffies; ++ ++ spin_unlock_irqrestore(&lp->lock, flags); ++ ++ return 0; ++} ++ ++ ++/* Ethernet MII-PHY Handler */ ++static void rc32434_mii_handler(unsigned long data) ++{ ++ struct net_device *dev = (struct net_device *)data; ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ unsigned long flags; ++ unsigned long duplex_status; ++ int port_addr = (lp->rx_irq == 0x2c? 1:0) << 8; ++ ++ spin_lock_irqsave(&lp->lock, flags); ++ ++ /* Two ports are using the same MII, the difference is the PHY address */ ++ __raw_writel(0, &rc32434_eth0_regs->miimcfg); ++ __raw_writel(0, &rc32434_eth0_regs->miimcmd); ++ __raw_writel(port_addr |0x05, &rc32434_eth0_regs->miimaddr); ++ __raw_writel(MIIMCMD_scn_m, &rc32434_eth0_regs->miimcmd); ++ while(__raw_readl(&rc32434_eth0_regs->miimind) & MIIMIND_nv_m); ++ ++ ERR("irq:%x port_addr:%x RDD:%x\n", ++ lp->rx_irq, port_addr, __raw_readl(&rc32434_eth0_regs->miimrdd)); ++ duplex_status = (__raw_readl(&rc32434_eth0_regs->miimrdd) & 0x140)? ETHMAC2_fd_m: 0; ++ if(duplex_status != lp->duplex_mode) { ++ ERR("The MII-PHY is Auto-negotiated to %s-Duplex mode for Eth-%x\n", duplex_status? "Full":"Half", lp->rx_irq == 0x2c? 1:0); ++ lp->duplex_mode = duplex_status; ++ rc32434_restart(dev); ++ } ++ ++ lp->mii_phy_timer.expires = jiffies + 10 * HZ; ++ add_timer(&lp->mii_phy_timer); ++ ++ spin_unlock_irqrestore(&lp->lock, flags); ++ ++} ++ ++#ifdef RC32434_REVISION ++/* Ethernet Rx Overflow interrupt */ ++static irqreturn_t ++rc32434_ovr_interrupt(int irq, void *dev_id, struct pt_regs * regs) ++{ ++ struct net_device *dev = (struct net_device *)dev_id; ++ struct rc32434_local *lp; ++ unsigned int ovr; ++ irqreturn_t retval = IRQ_NONE; ++ ++ ASSERT(dev != NULL); ++ ++ lp = (struct rc32434_local *)dev->priv; ++ spin_lock(&lp->lock); ++ ovr = __raw_readl(&lp->eth_regs->ethintfc); ++ ++ if(ovr & ETHINTFC_ovr_m) { ++ netif_stop_queue(dev); ++ ++ /* clear OVR bit */ ++ __raw_writel((ovr & ~ETHINTFC_ovr_m), &lp->eth_regs->ethintfc); ++ ++ /* Restart interface */ ++ rc32434_restart(dev); ++ retval = IRQ_HANDLED; ++ } ++ spin_unlock(&lp->lock); ++ ++ return retval; ++} ++ ++#endif ++ ++ ++/* Ethernet Tx Underflow interrupt */ ++static irqreturn_t ++rc32434_und_interrupt(int irq, void *dev_id, struct pt_regs * regs) ++{ ++ struct net_device *dev = (struct net_device *)dev_id; ++ struct rc32434_local *lp; ++ unsigned int und; ++ irqreturn_t retval = IRQ_NONE; ++ ++ ASSERT(dev != NULL); ++ ++ lp = (struct rc32434_local *)dev->priv; ++ ++ spin_lock(&lp->lock); ++ ++ und = __raw_readl(&lp->eth_regs->ethintfc); ++ ++ if(und & ETHINTFC_und_m) { ++ netif_stop_queue(dev); ++ ++ __raw_writel((und & ~ETHINTFC_und_m), &lp->eth_regs->ethintfc); ++ ++ /* Restart interface */ ++ rc32434_restart(dev); ++ retval = IRQ_HANDLED; ++ } ++ ++ spin_unlock(&lp->lock); ++ ++ return retval; ++} ++ ++ ++/* Ethernet Rx DMA interrupt */ ++static irqreturn_t ++rc32434_rx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs) ++{ ++ struct net_device *dev = (struct net_device *)dev_id; ++ struct rc32434_local* lp; ++ volatile u32 dmas,dmasm; ++ irqreturn_t retval; ++ ++ ASSERT(dev != NULL); ++ ++ lp = (struct rc32434_local *)dev->priv; ++ ++ spin_lock(&lp->lock); ++ dmas = __raw_readl(&lp->rx_dma_regs->dmas); ++ if(dmas & (DMAS_d_m|DMAS_h_m|DMAS_e_m)) { ++ /* Mask D H E bit in Rx DMA */ ++ dmasm = __raw_readl(&lp->rx_dma_regs->dmasm); ++ __raw_writel(dmasm | (DMASM_d_m | DMASM_h_m | DMASM_e_m), &lp->rx_dma_regs->dmasm); ++#ifdef CONFIG_IDT_USE_NAPI ++ if(netif_rx_schedule_prep(dev)) ++ __netif_rx_schedule(dev); ++#else ++ tasklet_hi_schedule(lp->rx_tasklet); ++#endif ++ ++ if (dmas & DMAS_e_m) ++ ERR(": DMA error\n"); ++ ++ retval = IRQ_HANDLED; ++ } ++ else ++ retval = IRQ_NONE; ++ ++ spin_unlock(&lp->lock); ++ return retval; ++} ++ ++#ifdef CONFIG_IDT_USE_NAPI ++static int rc32434_poll(struct net_device *rx_data_dev, int *budget) ++#else ++static void rc32434_rx_tasklet(unsigned long rx_data_dev) ++#endif ++{ ++ struct net_device *dev = (struct net_device *)rx_data_dev; ++ struct rc32434_local* lp = netdev_priv(dev); ++ volatile DMAD_t rd = &lp->rd_ring[lp->rx_next_done]; ++ struct sk_buff *skb, *skb_new; ++ u8* pkt_buf; ++ u32 devcs, count, pkt_len, pktuncrc_len; ++ volatile u32 dmas; ++#ifdef CONFIG_IDT_USE_NAPI ++ u32 received = 0; ++ int rx_work_limit = min(*budget,dev->quota); ++#else ++ unsigned long flags; ++ spin_lock_irqsave(&lp->lock, flags); ++#endif ++ ++ while ( (count = RC32434_RBSIZE - (u32)DMA_COUNT(rd->control)) != 0) { ++#ifdef CONFIG_IDT_USE_NAPI ++ if(--rx_work_limit <0) ++ { ++ break; ++ } ++#endif ++ /* init the var. used for the later operations within the while loop */ ++ skb_new = NULL; ++ devcs = rd->devcs; ++ pkt_len = RCVPKT_LENGTH(devcs); ++ skb = lp->rx_skb[lp->rx_next_done]; ++ ++ if (count < 64) { ++ lp->stats.rx_errors++; ++ lp->stats.rx_dropped++; ++ } ++ else if ((devcs & ( ETHRX_ld_m)) != ETHRX_ld_m) { ++ /* check that this is a whole packet */ ++ /* WARNING: DMA_FD bit incorrectly set in Rc32434 (errata ref #077) */ ++ lp->stats.rx_errors++; ++ lp->stats.rx_dropped++; ++ } ++ else if ( (devcs & ETHRX_rok_m) ) { ++ ++ { ++ /* must be the (first and) last descriptor then */ ++ pkt_buf = (u8*)lp->rx_skb[lp->rx_next_done]->data; ++ ++ pktuncrc_len = pkt_len - 4; ++ /* invalidate the cache */ ++ dma_cache_inv((unsigned long)pkt_buf, pktuncrc_len); ++ ++ /* Malloc up new buffer. */ ++ skb_new = dev_alloc_skb(RC32434_RBSIZE + 2); ++ ++ if (skb_new != NULL){ ++ /* Make room */ ++ skb_put(skb, pktuncrc_len); ++ ++ skb->protocol = eth_type_trans(skb, dev); ++ ++ /* pass the packet to upper layers */ ++#ifdef CONFIG_IDT_USE_NAPI ++ netif_receive_skb(skb); ++#else ++ netif_rx(skb); ++#endif ++ ++ dev->last_rx = jiffies; ++ lp->stats.rx_packets++; ++ lp->stats.rx_bytes += pktuncrc_len; ++ ++ if (IS_RCV_MP(devcs)) ++ lp->stats.multicast++; ++ ++ /* 16 bit align */ ++ skb_reserve(skb_new, 2); ++ ++ skb_new->dev = dev; ++ lp->rx_skb[lp->rx_next_done] = skb_new; ++ } ++ else { ++ ERR("no memory, dropping rx packet.\n"); ++ lp->stats.rx_errors++; ++ lp->stats.rx_dropped++; ++ } ++ } ++ ++ } ++ else { ++ /* This should only happen if we enable accepting broken packets */ ++ lp->stats.rx_errors++; ++ lp->stats.rx_dropped++; ++ ++ /* add statistics counters */ ++ if (IS_RCV_CRC_ERR(devcs)) { ++ DBG(2, "RX CRC error\n"); ++ lp->stats.rx_crc_errors++; ++ } ++ else if (IS_RCV_LOR_ERR(devcs)) { ++ DBG(2, "RX LOR error\n"); ++ lp->stats.rx_length_errors++; ++ } ++ else if (IS_RCV_LE_ERR(devcs)) { ++ DBG(2, "RX LE error\n"); ++ lp->stats.rx_length_errors++; ++ } ++ else if (IS_RCV_OVR_ERR(devcs)) { ++ lp->stats.rx_over_errors++; ++ } ++ else if (IS_RCV_CV_ERR(devcs)) { ++ /* code violation */ ++ DBG(2, "RX CV error\n"); ++ lp->stats.rx_frame_errors++; ++ } ++ else if (IS_RCV_CES_ERR(devcs)) { ++ DBG(2, "RX Preamble error\n"); ++ } ++ } ++ ++ rd->devcs = 0; ++ ++ /* restore descriptor's curr_addr */ ++ if(skb_new) ++ rd->ca = CPHYSADDR(skb_new->data); ++ else ++ rd->ca = CPHYSADDR(skb->data); ++ ++ rd->control = DMA_COUNT(RC32434_RBSIZE) |DMAD_cod_m |DMAD_iod_m; ++ lp->rd_ring[(lp->rx_next_done-1)& RC32434_RDS_MASK].control &= ~(DMAD_cod_m); ++ ++ lp->rx_next_done = (lp->rx_next_done + 1) & RC32434_RDS_MASK; ++ rd = &lp->rd_ring[lp->rx_next_done]; ++ __raw_writel( ~DMAS_d_m, &lp->rx_dma_regs->dmas); ++ } ++#ifdef CONFIG_IDT_USE_NAPI ++ dev->quota -= received; ++ *budget =- received; ++ if(rx_work_limit < 0) ++ goto not_done; ++#endif ++ ++ dmas = __raw_readl(&lp->rx_dma_regs->dmas); ++ ++ if(dmas & DMAS_h_m) { ++ __raw_writel( ~(DMAS_h_m | DMAS_e_m), &lp->rx_dma_regs->dmas); ++#ifdef RC32434_PROC_DEBUG ++ lp->dma_halt_cnt++; ++#endif ++ rd->devcs = 0; ++ skb = lp->rx_skb[lp->rx_next_done]; ++ rd->ca = CPHYSADDR(skb->data); ++ rc32434_chain_rx(lp,rd); ++ } ++ ++#ifdef CONFIG_IDT_USE_NAPI ++ netif_rx_complete(dev); ++#endif ++ /* Enable D H E bit in Rx DMA */ ++ __raw_writel(__raw_readl(&lp->rx_dma_regs->dmasm) & ~(DMASM_d_m | DMASM_h_m |DMASM_e_m), &lp->rx_dma_regs->dmasm); ++#ifdef CONFIG_IDT_USE_NAPI ++ return 0; ++ not_done: ++ return 1; ++#else ++ spin_unlock_irqrestore(&lp->lock, flags); ++ return; ++#endif ++ ++ ++} ++ ++ ++ ++/* Ethernet Tx DMA interrupt */ ++static irqreturn_t ++rc32434_tx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs) ++{ ++ struct net_device *dev = (struct net_device *)dev_id; ++ struct rc32434_local *lp; ++ volatile u32 dmas,dmasm; ++ irqreturn_t retval; ++ ++ ASSERT(dev != NULL); ++ ++ lp = (struct rc32434_local *)dev->priv; ++ ++ spin_lock(&lp->lock); ++ ++ dmas = __raw_readl(&lp->tx_dma_regs->dmas); ++ ++ if (dmas & (DMAS_f_m | DMAS_e_m)) { ++ dmasm = __raw_readl(&lp->tx_dma_regs->dmasm); ++ /* Mask F E bit in Tx DMA */ ++ __raw_writel(dmasm | (DMASM_f_m | DMASM_e_m), &lp->tx_dma_regs->dmasm); ++ ++ tasklet_hi_schedule(lp->tx_tasklet); ++ ++ if(lp->tx_chain_status == filled && (__raw_readl(&(lp->tx_dma_regs->dmandptr)) == 0)) { ++ __raw_writel(CPHYSADDR(&lp->td_ring[lp->tx_chain_head]), &(lp->tx_dma_regs->dmandptr)); ++ lp->tx_chain_status = empty; ++ lp->tx_chain_head = lp->tx_chain_tail; ++ dev->trans_start = jiffies; ++ } ++ ++ if (dmas & DMAS_e_m) ++ ERR(": DMA error\n"); ++ ++ retval = IRQ_HANDLED; ++ } ++ else ++ retval = IRQ_NONE; ++ ++ spin_unlock(&lp->lock); ++ ++ return retval; ++} ++ ++ ++static void rc32434_tx_tasklet(unsigned long tx_data_dev) ++{ ++ struct net_device *dev = (struct net_device *)tx_data_dev; ++ struct rc32434_local* lp = (struct rc32434_local *)dev->priv; ++ volatile DMAD_t td = &lp->td_ring[lp->tx_next_done]; ++ u32 devcs; ++ unsigned long flags; ++ volatile u32 dmas; ++ ++ spin_lock_irqsave(&lp->lock, flags); ++ ++ /* process all desc that are done */ ++ while(IS_DMA_FINISHED(td->control)) { ++ if(lp->tx_full == 1) { ++ netif_wake_queue(dev); ++ lp->tx_full = 0; ++ } ++ ++ devcs = lp->td_ring[lp->tx_next_done].devcs; ++ if ((devcs & (ETHTX_fd_m | ETHTX_ld_m)) != (ETHTX_fd_m | ETHTX_ld_m)) { ++ lp->stats.tx_errors++; ++ lp->stats.tx_dropped++; ++ ++ /* should never happen */ ++ DBG(1, __FUNCTION__ ": split tx ignored\n"); ++ } ++ else if (IS_TX_TOK(devcs)) { ++ lp->stats.tx_packets++; ++ } ++ else { ++ lp->stats.tx_errors++; ++ lp->stats.tx_dropped++; ++ ++ /* underflow */ ++ if (IS_TX_UND_ERR(devcs)) ++ lp->stats.tx_fifo_errors++; ++ ++ /* oversized frame */ ++ if (IS_TX_OF_ERR(devcs)) ++ lp->stats.tx_aborted_errors++; ++ ++ /* excessive deferrals */ ++ if (IS_TX_ED_ERR(devcs)) ++ lp->stats.tx_carrier_errors++; ++ ++ /* collisions: medium busy */ ++ if (IS_TX_EC_ERR(devcs)) ++ lp->stats.collisions++; ++ ++ /* late collision */ ++ if (IS_TX_LC_ERR(devcs)) ++ lp->stats.tx_window_errors++; ++ ++ } ++ ++ /* We must always free the original skb */ ++ if (lp->tx_skb[lp->tx_next_done] != NULL) { ++ dev_kfree_skb_any(lp->tx_skb[lp->tx_next_done]); ++ lp->tx_skb[lp->tx_next_done] = NULL; ++ } ++ ++ lp->td_ring[lp->tx_next_done].control = DMAD_iof_m; ++ lp->td_ring[lp->tx_next_done].devcs = ETHTX_fd_m | ETHTX_ld_m; ++ lp->td_ring[lp->tx_next_done].link = 0; ++ lp->td_ring[lp->tx_next_done].ca = 0; ++ lp->tx_count --; ++ ++ /* go on to next transmission */ ++ lp->tx_next_done = (lp->tx_next_done + 1) & RC32434_TDS_MASK; ++ td = &lp->td_ring[lp->tx_next_done]; ++ ++ } ++ ++ dmas = __raw_readl(&lp->tx_dma_regs->dmas); ++ __raw_writel( ~dmas, &lp->tx_dma_regs->dmas); ++ ++ /* Enable F E bit in Tx DMA */ ++ __raw_writel(__raw_readl(&lp->tx_dma_regs->dmasm) & ~(DMASM_f_m | DMASM_e_m), &lp->tx_dma_regs->dmasm); ++ spin_unlock_irqrestore(&lp->lock, flags); ++ ++} ++ ++ ++static struct net_device_stats * rc32434_get_stats(struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ return &lp->stats; ++} ++ ++ ++/* ++ * Set or clear the multicast filter for this adaptor. ++ */ ++static void rc32434_multicast_list(struct net_device *dev) ++{ ++ /* listen to broadcasts always and to treat */ ++ /* IFF bits independantly */ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ unsigned long flags; ++ u32 recognise = ETHARC_ab_m; /* always accept broadcasts */ ++ ++ if (dev->flags & IFF_PROMISC) /* set promiscuous mode */ ++ recognise |= ETHARC_pro_m; ++ ++ if ((dev->flags & IFF_ALLMULTI) || (dev->mc_count > 15)) ++ recognise |= ETHARC_am_m; /* all multicast & bcast */ ++ else if (dev->mc_count > 0) { ++ DBG(2, __FUNCTION__ ": mc_count %d\n", dev->mc_count); ++ recognise |= ETHARC_am_m; /* for the time being */ ++ } ++ ++ spin_lock_irqsave(&lp->lock, flags); ++ __raw_writel(recognise, &lp->eth_regs->etharc); ++ spin_unlock_irqrestore(&lp->lock, flags); ++} ++ ++ ++static void rc32434_tx_timeout(struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&lp->lock, flags); ++ rc32434_restart(dev); ++ spin_unlock_irqrestore(&lp->lock, flags); ++ ++} ++ ++ ++/* ++ * Initialize the RC32434 ethernet controller. ++ */ ++static int rc32434_init(struct net_device *dev) ++{ ++ struct rc32434_local *lp = (struct rc32434_local *)dev->priv; ++ int i, j; ++ ++ /* Disable DMA */ ++ rc32434_abort_tx(dev); ++ rc32434_abort_rx(dev); ++ ++ /* reset ethernet logic */ ++ __raw_writel(0, &lp->eth_regs->ethintfc); ++ while((__raw_readl(&lp->eth_regs->ethintfc) & ETHINTFC_rip_m)) ++ dev->trans_start = jiffies; ++ ++ /* Enable Ethernet Interface */ ++ __raw_writel(ETHINTFC_en_m, &lp->eth_regs->ethintfc); ++ ++#ifndef CONFIG_IDT_USE_NAPI ++ tasklet_disable(lp->rx_tasklet); ++#endif ++ tasklet_disable(lp->tx_tasklet); ++ ++ /* Initialize the transmit Descriptors */ ++ for (i = 0; i < RC32434_NUM_TDS; i++) { ++ lp->td_ring[i].control = DMAD_iof_m; ++ lp->td_ring[i].devcs = ETHTX_fd_m | ETHTX_ld_m; ++ lp->td_ring[i].ca = 0; ++ lp->td_ring[i].link = 0; ++ if (lp->tx_skb[i] != NULL) { ++ dev_kfree_skb_any(lp->tx_skb[i]); ++ lp->tx_skb[i] = NULL; ++ } ++ } ++ lp->tx_next_done = lp->tx_chain_head = lp->tx_chain_tail = lp->tx_full = lp->tx_count = 0; ++ lp-> tx_chain_status = empty; ++ ++ /* ++ * Initialize the receive descriptors so that they ++ * become a circular linked list, ie. let the last ++ * descriptor point to the first again. ++ */ ++ for (i=0; i<RC32434_NUM_RDS; i++) { ++ struct sk_buff *skb = lp->rx_skb[i]; ++ ++ if (lp->rx_skb[i] == NULL) { ++ skb = dev_alloc_skb(RC32434_RBSIZE + 2); ++ if (skb == NULL) { ++ ERR("No memory in the system\n"); ++ for (j = 0; j < RC32434_NUM_RDS; j ++) ++ if (lp->rx_skb[j] != NULL) ++ dev_kfree_skb_any(lp->rx_skb[j]); ++ ++ return 1; ++ } ++ else { ++ skb->dev = dev; ++ skb_reserve(skb, 2); ++ lp->rx_skb[i] = skb; ++ lp->rd_ring[i].ca = CPHYSADDR(skb->data); ++ ++ } ++ } ++ lp->rd_ring[i].control = DMAD_iod_m | DMA_COUNT(RC32434_RBSIZE); ++ lp->rd_ring[i].devcs = 0; ++ lp->rd_ring[i].ca = CPHYSADDR(skb->data); ++ lp->rd_ring[i].link = CPHYSADDR(&lp->rd_ring[i+1]); ++ ++ } ++ /* loop back */ ++ lp->rd_ring[RC32434_NUM_RDS-1].link = CPHYSADDR(&lp->rd_ring[0]); ++ lp->rx_next_done = 0; ++ ++ lp->rd_ring[RC32434_NUM_RDS-1].control |= DMAD_cod_m; ++ lp->rx_chain_head = 0; ++ lp->rx_chain_tail = 0; ++ lp->rx_chain_status = empty; ++ ++ __raw_writel(0, &lp->rx_dma_regs->dmas); ++ /* Start Rx DMA */ ++ rc32434_start_rx(lp, &lp->rd_ring[0]); ++ ++ /* Enable F E bit in Tx DMA */ ++ __raw_writel(__raw_readl(&lp->tx_dma_regs->dmasm) & ~(DMASM_f_m | DMASM_e_m), &lp->tx_dma_regs->dmasm); ++ /* Enable D H E bit in Rx DMA */ ++ __raw_writel(__raw_readl(&lp->rx_dma_regs->dmasm) & ~(DMASM_d_m | DMASM_h_m | DMASM_e_m), &lp->rx_dma_regs->dmasm); ++ ++ /* Accept only packets destined for this Ethernet device address */ ++ __raw_writel(ETHARC_ab_m, &lp->eth_regs->etharc); ++ ++ /* Set all Ether station address registers to their initial values */ ++ __raw_writel(STATION_ADDRESS_LOW(dev), &lp->eth_regs->ethsal0); ++ __raw_writel(STATION_ADDRESS_HIGH(dev), &lp->eth_regs->ethsah0); ++ ++ __raw_writel(STATION_ADDRESS_LOW(dev), &lp->eth_regs->ethsal1); ++ __raw_writel(STATION_ADDRESS_HIGH(dev), &lp->eth_regs->ethsah1); ++ ++ __raw_writel(STATION_ADDRESS_LOW(dev), &lp->eth_regs->ethsal2); ++ __raw_writel(STATION_ADDRESS_HIGH(dev), &lp->eth_regs->ethsah2); ++ ++ __raw_writel(STATION_ADDRESS_LOW(dev), &lp->eth_regs->ethsal3); ++ __raw_writel(STATION_ADDRESS_HIGH(dev), &lp->eth_regs->ethsah3); ++ ++ ++ /* Frame Length Checking, Pad Enable, CRC Enable, Full Duplex set */ ++ __raw_writel(ETHMAC2_pe_m | ETHMAC2_cen_m | ETHMAC2_fd_m, &lp->eth_regs->ethmac2); ++ //ETHMAC2_flc_m ETHMAC2_fd_m lp->duplex_mode ++ ++ /* Back to back inter-packet-gap */ ++ __raw_writel(0x15, &lp->eth_regs->ethipgt); ++ /* Non - Back to back inter-packet-gap */ ++ __raw_writel(0x12, &lp->eth_regs->ethipgr); ++ ++ /* Management Clock Prescaler Divisor */ ++ /* Clock independent setting */ ++ __raw_writel(((idt_cpu_freq)/MII_CLOCK+1) & ~1, ++ &lp->eth_regs->ethmcp); ++ ++ /* don't transmit until fifo contains 48b */ ++ __raw_writel(48, &lp->eth_regs->ethfifott); ++ ++ __raw_writel(ETHMAC1_re_m, &lp->eth_regs->ethmac1); ++ ++#ifndef CONFIG_IDT_USE_NAPI ++ tasklet_enable(lp->rx_tasklet); ++#endif ++ tasklet_enable(lp->tx_tasklet); ++ ++ netif_start_queue(dev); ++ ++ return 0; ++} ++ ++static struct platform_driver korina_driver = { ++ .driver.name = "korina", ++ .probe = rc32434_probe, ++ .remove = rc32434_remove, ++}; ++ ++static int __init rc32434_init_module(void) ++{ ++ return platform_driver_register(&korina_driver); ++} ++ ++static void rc32434_cleanup_module(void) ++{ ++ return platform_driver_unregister(&korina_driver); ++} ++ ++module_init(rc32434_init_module); ++module_exit(rc32434_cleanup_module); +diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile +--- linux.old/drivers/net/Makefile 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/drivers/net/Makefile 2006-06-08 20:19:40.000000000 +0200 +@@ -23,6 +23,8 @@ + # + obj-$(CONFIG_PLIP) += plip.o + ++obj-$(CONFIG_KORINA) += korina.o ++ + obj-$(CONFIG_ROADRUNNER) += rrunner.o + + obj-$(CONFIG_HAPPYMEAL) += sunhme.o +diff -urN linux.old/drivers/net/rc32434_eth.h linux.dev/drivers/net/rc32434_eth.h +--- linux.old/drivers/net/rc32434_eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/net/rc32434_eth.h 2006-06-08 21:57:12.000000000 +0200 +@@ -0,0 +1,178 @@ ++/************************************************************************** ++ * ++ * BRIEF MODULE DESCRIPTION ++ * Definitions for IDT RC32434 on-chip ethernet controller. ++ * ++ * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * ++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * 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., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ ************************************************************************** ++ * May 2004 rkt, neb ++ * ++ * Initial Release ++ * ++ * Aug 2004 ++ * ++ * Added NAPI ++ * ++ ************************************************************************** ++ */ ++ ++ ++#include <asm/rc32434/rc32434.h> ++#include <asm/rc32434/dma_v.h> ++#include <asm/rc32434/eth_v.h> ++ ++#define CONFIG_IDT_USE_NAPI 1 ++#define RC32434_DEBUG 2 ++//#define RC32434_PROC_DEBUG ++#undef RC32434_DEBUG ++ ++#ifdef RC32434_DEBUG ++ ++/* use 0 for production, 1 for verification, >2 for debug */ ++static int rc32434_debug = RC32434_DEBUG; ++#define ASSERT(expr) \ ++ if(!(expr)) { \ ++ printk( "Assertion failed! %s,%s,%s,line=%d\n", \ ++ #expr,__FILE__,__FUNCTION__,__LINE__); } ++#define DBG(lvl, format, arg...) if (rc32434_debug > lvl) printk(KERN_INFO "%s: " format, dev->name , ## arg) ++#else ++#define ASSERT(expr) do {} while (0) ++#define DBG(lvl, format, arg...) do {} while (0) ++#endif ++ ++#define INFO(format, arg...) printk(KERN_INFO "%s: " format, dev->name , ## arg) ++#define ERR(format, arg...) printk(KERN_ERR "%s: " format, dev->name , ## arg) ++#define WARN(format, arg...) printk(KERN_WARNING "%s: " format, dev->name , ## arg) ++ ++/* the following must be powers of two */ ++#ifdef CONFIG_IDT_USE_NAPI ++#define RC32434_NUM_RDS 64 /* number of receive descriptors */ ++#define RC32434_NUM_TDS 64 /* number of transmit descriptors */ ++#else ++#define RC32434_NUM_RDS 128 /* number of receive descriptors */ ++#define RC32434_NUM_TDS 128 /* number of transmit descriptors */ ++#endif ++ ++#define RC32434_RBSIZE 1536 /* size of one resource buffer = Ether MTU */ ++#define RC32434_RDS_MASK (RC32434_NUM_RDS-1) ++#define RC32434_TDS_MASK (RC32434_NUM_TDS-1) ++#define RD_RING_SIZE (RC32434_NUM_RDS * sizeof(struct DMAD_s)) ++#define TD_RING_SIZE (RC32434_NUM_TDS * sizeof(struct DMAD_s)) ++ ++#define RC32434_TX_TIMEOUT HZ * 100 ++ ++#define rc32434_eth0_regs ((ETH_t)(ETH0_VirtualAddress)) ++#define rc32434_eth1_regs ((ETH_t)(ETH1_VirtualAddress)) ++ ++enum status { filled, empty}; ++#define IS_DMA_FINISHED(X) (((X) & (DMAD_f_m)) != 0) ++#define IS_DMA_DONE(X) (((X) & (DMAD_d_m)) != 0) ++ ++ ++/* Information that need to be kept for each board. */ ++struct rc32434_local { ++ ETH_t eth_regs; ++ DMA_Chan_t rx_dma_regs; ++ DMA_Chan_t tx_dma_regs; ++ volatile DMAD_t td_ring; /* transmit descriptor ring */ ++ volatile DMAD_t rd_ring; /* receive descriptor ring */ ++ ++ struct sk_buff* tx_skb[RC32434_NUM_TDS]; /* skbuffs for pkt to trans */ ++ struct sk_buff* rx_skb[RC32434_NUM_RDS]; /* skbuffs for pkt to trans */ ++ ++#ifndef CONFIG_IDT_USE_NAPI ++ struct tasklet_struct * rx_tasklet; ++#endif ++ struct tasklet_struct * tx_tasklet; ++ ++ int rx_next_done; ++ int rx_chain_head; ++ int rx_chain_tail; ++ enum status rx_chain_status; ++ ++ int tx_next_done; ++ int tx_chain_head; ++ int tx_chain_tail; ++ enum status tx_chain_status; ++ int tx_count; ++ int tx_full; ++ ++ struct timer_list mii_phy_timer; ++ unsigned long duplex_mode; ++ ++ int rx_irq; ++ int tx_irq; ++ int ovr_irq; ++ int und_irq; ++ ++ struct net_device_stats stats; ++ spinlock_t lock; ++ ++ /* debug /proc entry */ ++ struct proc_dir_entry *ps; ++ int dma_halt_cnt; int dma_run_cnt; ++}; ++ ++extern unsigned int idt_cpu_freq; ++ ++/* Index to functions, as function prototypes. */ ++static int rc32434_open(struct net_device *dev); ++static int rc32434_send_packet(struct sk_buff *skb, struct net_device *dev); ++static void rc32434_mii_handler(unsigned long data); ++static irqreturn_t rc32434_und_interrupt(int irq, void *dev_id, struct pt_regs * regs); ++static irqreturn_t rc32434_rx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs); ++static irqreturn_t rc32434_tx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs); ++#ifdef RC32434_REVISION ++static irqreturn_t rc32434_ovr_interrupt(int irq, void *dev_id, struct pt_regs * regs); ++#endif ++static int rc32434_close(struct net_device *dev); ++static struct net_device_stats *rc32434_get_stats(struct net_device *dev); ++static void rc32434_multicast_list(struct net_device *dev); ++static int rc32434_init(struct net_device *dev); ++static void rc32434_tx_timeout(struct net_device *dev); ++ ++static void rc32434_tx_tasklet(unsigned long tx_data_dev); ++#ifdef CONFIG_IDT_USE_NAPI ++static int rc32434_poll(struct net_device *rx_data_dev, int *budget); ++#else ++static void rc32434_rx_tasklet(unsigned long rx_data_dev); ++#endif ++static void rc32434_cleanup_module(void); ++ ++ ++static inline void rc32434_abort_dma(struct net_device *dev, DMA_Chan_t ch) ++{ ++ if (__raw_readl(&ch->dmac) & DMAC_run_m) { ++ __raw_writel(0x10, &ch->dmac); ++ ++ while (!(__raw_readl(&ch->dmas) & DMAS_h_m)) ++ dev->trans_start = jiffies; ++ ++ __raw_writel(0, &ch->dmas); ++ } ++ ++ __raw_writel(0, &ch->dmadptr); ++ __raw_writel(0, &ch->dmandptr); ++} + diff --git a/openwrt/target/linux/rb532-2.6/patches/120-cf.patch b/openwrt/target/linux/rb532-2.6/patches/120-cf.patch new file mode 100644 index 00000000000..657d8157d09 --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/120-cf.patch @@ -0,0 +1,990 @@ +diff -urN linux.old/drivers/block/Kconfig linux.dev/drivers/block/Kconfig +--- linux.old/drivers/block/Kconfig 2006-06-08 20:20:52.000000000 +0200 ++++ linux.dev/drivers/block/Kconfig 2006-06-08 22:14:58.000000000 +0200 +@@ -453,4 +453,12 @@ + This driver provides Support for ATA over Ethernet block + devices like the Coraid EtherDrive (R) Storage Blade. + ++config BLK_DEV_CF_MIPS ++ bool "CF slot of RB532 board" ++ depends on MIKROTIK_RB500 ++ default y ++ help ++ The Routerboard 532 has a CF slot on it. Enable the special block ++ device driver for it. ++ + endmenu +diff -urN linux.old/drivers/block/rb500/ata.c linux.dev/drivers/block/rb500/ata.c +--- linux.old/drivers/block/rb500/ata.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/block/rb500/ata.c 2006-06-09 01:58:40.000000000 +0200 +@@ -0,0 +1,474 @@ ++#include <linux/kernel.h> /* printk() */ ++#include <linux/module.h> /* module to be loadable */ ++#include <linux/delay.h> ++#include <linux/sched.h> ++#include <linux/pci.h> ++#include <linux/ioport.h> /* request_mem_region() */ ++#include <asm/unaligned.h> /* ioremap() */ ++#include <asm/io.h> /* ioremap() */ ++#include <asm/rc32434/rb.h> ++ ++#include "ata.h" ++ ++#define REQUEST_MEM_REGION 0 ++#define DEBUG 1 ++ ++#if DEBUG ++#define DEBUGP printk ++#else ++#define DEBUGP(format, args...) ++#endif ++ ++#define SECS 1000000 /* unit for wait_not_busy() is 1us */ ++ ++unsigned cf_head = 0; ++unsigned cf_cyl = 0; ++unsigned cf_spt = 0; ++unsigned cf_sectors = 0; ++static unsigned cf_block_size = 1; ++static void *baddr = 0; ++ ++#define DBUF32 ((volatile u32 *)((unsigned long)dev->baddr | ATA_DBUF_OFFSET)) ++ ++ ++static void cf_do_tasklet(unsigned long dev_l); ++ ++ ++static inline void wareg(u8 val, unsigned reg, struct cf_mips_dev* dev) ++{ ++ writeb(val, dev->baddr + ATA_REG_OFFSET + reg); ++} ++ ++static inline u8 rareg(unsigned reg, struct cf_mips_dev* dev) ++{ ++ return readb(dev->baddr + ATA_REG_OFFSET + reg); ++} ++ ++static inline int get_gpio_bit(gpio_func ofs, struct cf_mips_dev *dev) ++{ ++ return (gpio_get(ofs) >> dev->pin) & 1; ++} ++ ++static inline void set_gpio_bit(int bit, gpio_func ofs, struct cf_mips_dev *dev) ++{ ++ gpio_set(ofs, (1 << dev->pin), ((bit & 1) << dev->pin)); ++} ++ ++static inline int cfrdy(struct cf_mips_dev *dev) ++{ ++ return get_gpio_bit(DATA, dev); ++} ++ ++static inline void prepare_cf_irq(struct cf_mips_dev *dev) ++{ ++ set_gpio_bit(1, ILEVEL, dev); /* interrupt on cf ready (not busy) */ ++ set_gpio_bit(0, ISTAT, dev); /* clear interrupt status */ ++} ++ ++static inline int cf_present(struct cf_mips_dev* dev) ++{ ++ /* TODO: read and configure CIS into memory mapped mode ++ * TODO: parse CISTPL_CONFIG on CF+ cards to get base address (0x200) ++ * TODO: maybe adjust power saving setting for Hitachi Microdrive ++ */ ++ int i; ++ ++ /* setup CFRDY GPIO as input */ ++ set_gpio_bit(0, FUNC, dev); ++ set_gpio_bit(0, CFG, dev); ++ ++ for (i = 0; i < 0x10; ++i) { ++ if (rareg(i,dev) != 0xff) ++ return 1; ++ } ++ return 0; ++} ++ ++static inline int is_busy(struct cf_mips_dev *dev) ++{ ++ return !cfrdy(dev); ++} ++ ++static int wait_not_busy(int to_us, int wait_for_busy,struct cf_mips_dev *dev) ++{ ++ int us_passed = 0; ++ if (wait_for_busy && !is_busy(dev)) { ++ /* busy must appear within 400ns, ++ * but it may dissapear before we see it ++ * => must not wait for busy in a loop ++ */ ++ ndelay(400); ++ } ++ ++ do { ++ if (us_passed) ++ udelay(1); /* never reached in async mode */ ++ if (!is_busy(dev)) { ++ if (us_passed > 1 * SECS) { ++ printk(KERN_WARNING "cf-mips: not busy ok (after %dus)" ++ ", status 0x%02x\n", us_passed, (unsigned) rareg(ATA_REG_ST,dev)); ++ } ++ return CF_TRANS_OK; ++ } ++ if (us_passed == 1 * SECS) { ++ printk(KERN_WARNING "cf-mips: wait not busy %dus..\n", to_us); ++ } ++ if (dev->async_mode) { ++ dev->to_timer.expires = jiffies + (to_us * HZ / SECS); ++ dev->irq_enable_time = jiffies; ++ prepare_cf_irq(dev); ++ if (is_busy(dev)) { ++ add_timer(&dev->to_timer); ++ enable_irq(dev->irq); ++ return CF_TRANS_IN_PROGRESS; ++ } ++ continue; ++ } ++ ++us_passed; ++ } while (us_passed < to_us); ++ ++ printk(KERN_ERR "cf-mips: wait not busy timeout (%dus)" ++ ", status 0x%02x, state %d\n", ++ to_us, (unsigned) rareg(ATA_REG_ST,dev), dev->tstate); ++ return CF_TRANS_FAILED; ++} ++ ++static irqreturn_t cf_irq_handler(int irq, void *dev_id, struct pt_regs *regs) ++{ ++ /* While tasklet has not disabled irq, irq will be retried all the time ++ * because of ILEVEL matching GPIO pin status => deadlock. ++ * To avoid this, we change ILEVEL to 0. ++ */ ++ struct cf_mips_dev *dev=dev_id; ++ ++ set_gpio_bit(0, ILEVEL, dev); ++ set_gpio_bit(0, ISTAT, dev); ++ ++ del_timer(&dev->to_timer); ++ tasklet_schedule(&dev->tasklet); ++ return IRQ_HANDLED; ++} ++ ++static int do_reset(struct cf_mips_dev *dev) ++{ ++ printk(KERN_INFO "cf-mips: resetting..\n"); ++ ++ wareg(ATA_REG_DC_SRST, ATA_REG_DC,dev); ++ udelay(1); /* FIXME: how long should we wait here? */ ++ wareg(0, ATA_REG_DC,dev); ++ ++ return wait_not_busy(30 * SECS, 1,dev); ++} ++ ++static int set_multiple(struct cf_mips_dev *dev) ++{ ++ if (dev->block_size <= 1) ++ return CF_TRANS_OK; ++ ++ wareg(dev->block_size, ATA_REG_SC,dev); ++ wareg(ATA_REG_DH_BASE | ATA_REG_DH_LBA, ATA_REG_DH,dev); ++ wareg(ATA_CMD_SET_MULTIPLE, ATA_REG_CMD,dev); ++ ++ return wait_not_busy(10 * SECS, 1,dev); ++} ++ ++static int set_cmd(struct cf_mips_dev *dev) ++{ ++ //DEBUGP(KERN_INFO "cf-mips: ata cmd 0x%02x\n", dev->tcmd); ++ // sector_count should be <=24 bits.. ++ BUG_ON(dev->tsect_start>=0x10000000); ++ // This way, it addresses 2^24 * 512 = 128G ++ ++ if (dev->tsector_count) { ++ wareg(dev->tsector_count & 0xff, ATA_REG_SC,dev); ++ wareg(dev->tsect_start & 0xff, ATA_REG_SN,dev); ++ wareg((dev->tsect_start >> 8) & 0xff, ATA_REG_CL,dev); ++ wareg((dev->tsect_start >> 16) & 0xff, ATA_REG_CH,dev); ++ } ++ wareg(((dev->tsect_start >> 24) & 0x0f) | ATA_REG_DH_BASE | ATA_REG_DH_LBA, ++ ATA_REG_DH,dev); /* select drive on all commands */ ++ wareg(dev->tcmd, ATA_REG_CMD,dev); ++ return wait_not_busy(10 * SECS, 1,dev); ++} ++ ++static int do_trans(struct cf_mips_dev *dev) ++{ ++ int res; ++ unsigned st; ++ int transfered; ++ ++ //printk("do_trans: %d sectors left\n",dev->tsectors_left); ++ while (dev->tsectors_left) { ++ transfered = 0; ++ ++ st = rareg(ATA_REG_ST,dev); ++ if (!(st & ATA_REG_ST_DRQ)) { ++ printk(KERN_ERR "cf-mips: do_trans without DRQ (status 0x%x)!\n", st); ++ if (st & ATA_REG_ST_ERR) { ++ int errId = rareg(ATA_REG_ERR,dev); ++ printk(KERN_ERR "cf-mips: %s error, status 0x%x, errid 0x%x\n", ++ (dev->tread ? "read" : "write"), st, errId); ++ } ++ return CF_TRANS_FAILED; ++ } ++ do { /* Fill/read the buffer one block */ ++ u32 *qbuf, *qend; ++ qbuf = (u32 *)dev->tbuf; ++ qend = qbuf + CF_SECT_SIZE / sizeof(u32); ++ if (dev->tread) { ++ while (qbuf!=qend) ++ put_unaligned(*DBUF32,qbuf++); ++ //*(qbuf++) = *DBUF32; ++ } ++ else { ++ while(qbuf!=qend) ++ *DBUF32 = get_unaligned(qbuf++); ++ } ++ ++ dev->tsectors_left--; ++ dev->tbuf += CF_SECT_SIZE; ++ dev->tbuf_size -= CF_SECT_SIZE; ++ transfered++; ++ } while (transfered != dev->block_size && dev->tsectors_left > 0); ++ ++ res = wait_not_busy(10 * SECS, 1,dev); ++ if (res != CF_TRANS_OK) ++ return res; ++ }; ++ ++ st = rareg(ATA_REG_ST,dev); ++ if (st & (ATA_REG_ST_DRQ | ATA_REG_ST_DWF | ATA_REG_ST_ERR)) { ++ if (st & ATA_REG_ST_DRQ) { ++ printk(KERN_ERR "cf-mips: DRQ after all %d sectors are %s" ++ ", status 0x%x\n", dev->tsector_count, (dev->tread ? "read" : "written"), st); ++ } else if (st & ATA_REG_ST_DWF) { ++ printk(KERN_ERR "cf-mips: write fault, status 0x%x\n", st); ++ } else { ++ int errId = rareg(ATA_REG_ERR,dev); ++ printk(KERN_ERR "cf-mips: %s error, status 0x%x, errid 0x%x\n", ++ (dev->tread ? "read" : "write"), st, errId); ++ } ++ return CF_TRANS_FAILED; ++ } ++ return CF_TRANS_OK; ++} ++ ++static int cf_do_state(struct cf_mips_dev *dev) ++{ ++ int res; ++ switch (dev->tstate) { /* fall through everywhere */ ++ case TS_IDLE: ++ dev->tstate = TS_READY; ++ if (is_busy(dev)) { ++ dev->tstate = TS_AFTER_RESET; ++ res = do_reset(dev); ++ if (res != CF_TRANS_OK) ++ break; ++ } ++ case TS_AFTER_RESET: ++ if (dev->tstate == TS_AFTER_RESET) { ++ dev->tstate = TS_READY; ++ res = set_multiple(dev); ++ if (res != CF_TRANS_OK) ++ break; ++ } ++ case TS_READY: ++ dev->tstate = TS_CMD; ++ res = set_cmd(dev); ++ if (res != CF_TRANS_OK) ++ break;; ++ case TS_CMD: ++ dev->tstate = TS_TRANS; ++ case TS_TRANS: ++ res = do_trans(dev); ++ break; ++ default: ++ printk(KERN_ERR "cf-mips: BUG: unknown tstate %d\n", dev->tstate); ++ return CF_TRANS_FAILED; ++ } ++ if (res != CF_TRANS_IN_PROGRESS) ++ dev->tstate = TS_IDLE; ++ return res; ++} ++ ++static void cf_do_tasklet(unsigned long dev_l) ++{ ++ struct cf_mips_dev* dev=(struct cf_mips_dev*) dev_l; ++ int res; ++ ++ disable_irq(dev->irq); ++ ++ if (dev->tstate == TS_IDLE) ++ return; /* can happen when irq is first registered */ ++ ++#if 0 ++ DEBUGP(KERN_WARNING "cf-mips: not busy ok (tasklet) status 0x%02x\n", ++ (unsigned) rareg(ATA_REG_ST,dev)); ++#endif ++ ++ res = cf_do_state(dev); ++ if (res == CF_TRANS_IN_PROGRESS) ++ return; ++ cf_async_trans_done(dev,res); ++} ++ ++static void cf_async_timeout(unsigned long dev_l) ++{ ++ struct cf_mips_dev* dev=(struct cf_mips_dev*) dev_l; ++ disable_irq(dev->irq); ++ /* Perhaps send abort to the device? */ ++ printk(KERN_ERR "cf-mips: wait not busy timeout (%lus)" ++ ", status 0x%02x, state %d\n", ++ jiffies - dev->irq_enable_time, (unsigned) rareg(ATA_REG_ST,dev), dev->tstate); ++ dev->tstate = TS_IDLE; ++ cf_async_trans_done(dev,CF_TRANS_FAILED); ++} ++ ++int cf_do_transfer(struct cf_mips_dev* dev,sector_t sector, unsigned long nsect, ++ char* buffer, int is_write) ++{ ++ BUG_ON(dev->tstate!=TS_IDLE); ++ if (nsect > ATA_MAX_SECT_PER_CMD) { ++ printk(KERN_WARNING "cf-mips: sector count %lu out of range\n",nsect); ++ return CF_TRANS_FAILED; ++ } ++ if (sector + nsect > dev->sectors) { ++ printk(KERN_WARNING "cf-mips: sector %lu out of range\n",sector); ++ return CF_TRANS_FAILED; ++ } ++ dev->tbuf = buffer; ++ dev->tbuf_size = nsect*512; ++ dev->tsect_start = sector; ++ dev->tsector_count = nsect; ++ dev->tsectors_left = dev->tsector_count; ++ dev->tread = (is_write)?0:1; ++ ++ dev->tcmd = (dev->block_size == 1 ? ++ (is_write ? ATA_CMD_WRITE_SECTORS : ATA_CMD_READ_SECTORS) : ++ (is_write ? ATA_CMD_WRITE_MULTIPLE : ATA_CMD_READ_MULTIPLE)); ++ ++ return cf_do_state(dev); ++} ++ ++static int do_identify(struct cf_mips_dev *dev) ++{ ++ u16 sbuf[CF_SECT_SIZE >> 1]; ++ int res; ++ char tstr[17]; //serial ++ BUG_ON(dev->tstate!=TS_IDLE); ++ dev->tbuf = (char *) sbuf; ++ dev->tbuf_size = CF_SECT_SIZE; ++ dev->tsect_start = 0; ++ dev->tsector_count = 0; ++ dev->tsectors_left = 1; ++ dev->tread = 1; ++ dev->tcmd = ATA_CMD_IDENTIFY_DRIVE; ++ ++ DEBUGP(KERN_INFO "cf-mips: identify drive..\n"); ++ res = cf_do_state(dev); ++ if (res == CF_TRANS_IN_PROGRESS) { ++ printk(KERN_ERR "cf-mips: BUG: async identify cmd\n"); ++ return CF_TRANS_FAILED; ++ } ++ if (res != CF_TRANS_OK) ++ return 0; ++ ++ dev->head = sbuf[3]; ++ dev->cyl = sbuf[1]; ++ dev->spt = sbuf[6]; ++ dev->sectors = ((unsigned long) sbuf[7] << 16) | sbuf[8]; ++ dev->dtype=sbuf[0]; ++ memcpy(tstr,&sbuf[12],16); ++ tstr[16]=0; ++ printk(KERN_INFO "cf-mips: %s detected, C/H/S=%d/%d/%d sectors=%u (%uMB) Serial=%s\n", ++ (sbuf[0] == 0x848A ? "CF card" : "ATA drive"), dev->cyl, dev->head, ++ dev->spt, dev->sectors, dev->sectors >> 11,tstr); ++ return 1; ++} ++ ++static void init_multiple(struct cf_mips_dev * dev) ++{ ++ int res; ++ DEBUGP(KERN_INFO "cf-mips: detecting block size\n"); ++ ++ dev->block_size = 128; /* max block size = 128 sectors (64KB) */ ++ do { ++ wareg(dev->block_size, ATA_REG_SC,dev); ++ wareg(ATA_REG_DH_BASE | ATA_REG_DH_LBA, ATA_REG_DH,dev); ++ wareg(ATA_CMD_SET_MULTIPLE, ATA_REG_CMD,dev); ++ ++ res = wait_not_busy(10 * SECS, 1,dev); ++ if (res != CF_TRANS_OK) { ++ printk(KERN_ERR "cf-mips: failed to detect block size: busy!\n"); ++ dev->block_size = 1; ++ return; ++ } ++ if ((rareg(ATA_REG_ST,dev) & ATA_REG_ST_ERR) == 0) ++ break; ++ dev->block_size /= 2; ++ } while (dev->block_size > 1); ++ ++ printk(KERN_INFO "cf-mips: multiple sectors = %d\n", dev->block_size); ++} ++ ++int cf_init(struct cf_mips_dev *dev) ++{ ++ tasklet_init(&dev->tasklet,cf_do_tasklet,(unsigned long)dev); ++ dev->baddr = ioremap_nocache((unsigned long)dev->base, CFDEV_BUF_SIZE); ++ if (!dev->baddr) { ++ printk(KERN_ERR "cf-mips: cf_init: ioremap for (%lx,%x) failed\n", ++ (unsigned long) dev->base, CFDEV_BUF_SIZE); ++ return -EBUSY; ++ } ++ ++ if (!cf_present(dev)) { ++ printk(KERN_WARNING "cf-mips: cf card not present\n"); ++ iounmap(dev->baddr); ++ return -ENODEV; ++ } ++ ++ if (do_reset(dev) != CF_TRANS_OK) { ++ printk(KERN_ERR "cf-mips: cf reset failed\n"); ++ iounmap(dev->baddr); ++ return -EBUSY; ++ } ++ ++ if (!do_identify(dev)) { ++ printk(KERN_ERR "cf-mips: cf identify failed\n"); ++ iounmap(dev->baddr); ++ return -EBUSY; ++ } ++ ++/* set_apm_level(ATA_APM_WITH_STANDBY); */ ++ init_multiple(dev); ++ ++ init_timer(&dev->to_timer); ++ dev->to_timer.function = cf_async_timeout; ++ dev->to_timer.data = (unsigned long)dev; ++ ++ prepare_cf_irq(dev); ++ if (request_irq(dev->irq, cf_irq_handler, 0, "CF Mips", dev)) { ++ printk(KERN_ERR "cf-mips: failed to get irq\n"); ++ iounmap(dev->baddr); ++ return -EBUSY; ++ } ++ /* Disable below would be odd, because request will enable, and the tasklet ++ will disable it itself */ ++ //disable_irq(dev->irq); ++ ++ dev->async_mode = 1; ++ ++ return 0; ++} ++ ++void cf_cleanup(struct cf_mips_dev *dev) ++{ ++ iounmap(dev->baddr); ++ free_irq(dev->irq, NULL); ++#if REQUEST_MEM_REGION ++ release_mem_region((unsigned long)dev->base, CFDEV_BUF_SIZE); ++#endif ++} ++ ++ ++/*eof*/ +diff -urN linux.old/drivers/block/rb500/ata.h linux.dev/drivers/block/rb500/ata.h +--- linux.old/drivers/block/rb500/ata.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/block/rb500/ata.h 2006-06-09 00:15:23.000000000 +0200 +@@ -0,0 +1,132 @@ ++#ifndef __CFMIPS_ATA_H__ ++#define __CFMIPS_ATA_H__ ++ ++#include <linux/interrupt.h> ++ ++#define CFG_DC_DEV1 (void*)0xb8010010 ++#define CFG_DC_DEVBASE 0x0 ++#define CFG_DC_DEVMASK 0x4 ++#define CFG_DC_DEVC 0x8 ++#define CFG_DC_DEVTC 0xC ++ ++#define CFDEV_BUF_SIZE 0x1000 ++#define ATA_CIS_OFFSET 0x200 ++#define ATA_REG_OFFSET 0x800 ++#define ATA_DBUF_OFFSET 0xC00 ++ ++#define ATA_REG_FEAT 0x1 ++#define ATA_REG_SC 0x2 ++#define ATA_REG_SN 0x3 ++#define ATA_REG_CL 0x4 ++#define ATA_REG_CH 0x5 ++#define ATA_REG_DH 0x6 ++#define ATA_REG_DH_BASE 0xa0 ++#define ATA_REG_DH_LBA 0x40 ++#define ATA_REG_DH_DRV 0x10 ++#define ATA_REG_CMD 0x7 ++#define ATA_REG_ST 0x7 ++#define ATA_REG_ST_BUSY 0x80 ++#define ATA_REG_ST_RDY 0x40 ++#define ATA_REG_ST_DWF 0x20 ++#define ATA_REG_ST_DSC 0x10 ++#define ATA_REG_ST_DRQ 0x08 ++#define ATA_REG_ST_CORR 0x04 ++#define ATA_REG_ST_ERR 0x01 ++#define ATA_REG_ERR 0xd ++#define ATA_REG_DC 0xe ++#define ATA_REG_DC_IEN 0x02 ++#define ATA_REG_DC_SRST 0x04 ++ ++#define ATA_CMD_READ_SECTORS 0x20 ++#define ATA_CMD_WRITE_SECTORS 0x30 ++#define ATA_CMD_EXEC_DRIVE_DIAG 0x90 ++#define ATA_CMD_READ_MULTIPLE 0xC4 ++#define ATA_CMD_WRITE_MULTIPLE 0xC5 ++#define ATA_CMD_SET_MULTIPLE 0xC6 ++#define ATA_CMD_IDENTIFY_DRIVE 0xEC ++#define ATA_CMD_SET_FEATURES 0xEF ++ ++#define ATA_FEATURE_ENABLE_APM 0x05 ++#define ATA_FEATURE_DISABLE_APM 0x85 ++#define ATA_APM_DISABLED 0x00 ++#define ATA_APM_MIN_POWER 0x01 ++#define ATA_APM_WITH_STANDBY 0x7f ++#define ATA_APM_WITHOUT_STANDBY 0x80 ++#define ATA_APM_MAX_PERFORMANCE 0xfe ++ ++#define CF_SECT_SIZE 0x200 ++/* That is the ratio CF_SECT_SIZE/512 (the kernel sector size) */ ++#define CF_KERNEL_MUL 1 ++#define ATA_MAX_SECT_PER_CMD 0x100 ++ ++#define CF_TRANS_FAILED 0 ++#define CF_TRANS_OK 1 ++#define CF_TRANS_IN_PROGRESS 2 ++ ++ ++enum trans_state { ++ TS_IDLE = 0, ++ TS_AFTER_RESET, ++ TS_READY, ++ TS_CMD, ++ TS_TRANS ++}; ++ ++// ++// #if DEBUG ++// static unsigned long busy_time; ++// #endif ++ ++/** Struct to hold the cfdev ++Actually, all the data here only has one instance. However, for ++reasons of programming conformity, it is passed around as a pointer ++*/ ++struct cf_mips_dev { ++ void *base; /* base address for I/O */ ++ void *baddr; /* remapped address */ ++ ++ int pin; /* gpio pin */ ++ int irq; /* gpio irq */ ++ ++ unsigned head; ++ unsigned cyl; ++ unsigned spt; ++ unsigned sectors; ++ ++ unsigned short block_size; ++ unsigned dtype ; // ATA or CF ++ struct request_queue *queue; ++ struct gendisk *gd; ++ ++ /* Transaction state */ ++ enum trans_state tstate; ++ char *tbuf; ++ unsigned long tbuf_size; ++ sector_t tsect_start; ++ unsigned tsector_count; ++ unsigned tsectors_left; ++ int tread; ++ unsigned tcmd; ++ int async_mode; ++ unsigned long irq_enable_time; ++ ++ struct request *active_req; /* A request is being carried out. Is that different from tstate? */ ++ int users; ++ struct timer_list to_timer; ++ struct tasklet_struct tasklet; ++ ++ /** This lock ensures that the requests to this device are all done ++ atomically. Transfers can run in parallel, requests are all queued ++ one-by-one */ ++ spinlock_t lock; ++}; ++ ++int cf_do_transfer(struct cf_mips_dev* dev,sector_t sector, unsigned long nsect, ++ char* buffer, int is_write); ++int cf_init(struct cf_mips_dev* dev); ++void cf_cleanup(struct cf_mips_dev* dev); ++ ++void cf_async_trans_done(struct cf_mips_dev* dev, int result); ++// void *cf_get_next_buf(unsigned long *buf_size); ++ ++#endif +diff -urN linux.old/drivers/block/rb500/bdev.c linux.dev/drivers/block/rb500/bdev.c +--- linux.old/drivers/block/rb500/bdev.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/block/rb500/bdev.c 2006-06-15 16:29:04.000000000 +0200 +@@ -0,0 +1,340 @@ ++/* CF-mips driver ++ This is a block driver for the direct (mmaped) interface to the CF-slot, ++ found in Routerboard.com's RB532 board ++ See SDK provided from routerboard.com. ++ ++ Module adapted By P.Christeas <p_christeas@yahoo.com>, 2005-6. ++ Cleaned up and adapted to platform_device by Felix Fietkau <nbd@openwrt.org> ++ ++ This work is redistributed under the terms of the GNU General Public License. ++*/ ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/init.h> ++#include <linux/time.h> ++#include <linux/wait.h> ++#include <linux/fs.h> ++#include <linux/genhd.h> ++#include <linux/blkdev.h> ++#include <linux/blkpg.h> ++#include <linux/hdreg.h> ++#include <linux/platform_device.h> ++ ++#include <asm/uaccess.h> ++#include <asm/io.h> ++ ++#include <asm/rc32434/rb.h> ++ ++#ifdef DEBUG ++#define DEBUGP printk ++#define DLEVEL 1 ++#else ++#define DEBUGP(format, args...) ++#define DLEVEL 0 ++#endif ++ ++#define CF_MIPS_MAJOR 13 ++#define MAJOR_NR CF_MIPS_MAJOR ++#define CF_MAX_PART 16 /* max 15 partitions */ ++ ++#include "ata.h" ++ ++//extern struct block_device_operations cf_bdops; ++ ++// static struct hd_struct cf_parts[CF_MAX_PART]; ++// static int cf_part_sizes[CF_MAX_PART]; ++// static int cf_hsect_sizes[CF_MAX_PART]; ++// static int cf_max_sectors[CF_MAX_PART]; ++// static int cf_blksize_sizes[CF_MAX_PART]; ++ ++// static spinlock_t lock = SPIN_LOCK_UNLOCKED; ++ ++// volatile int cf_busy = 0; ++ ++static struct request *active_req = NULL; ++ ++static int cf_open (struct inode *, struct file *); ++static int cf_release (struct inode *, struct file *); ++static int cf_ioctl (struct inode *, struct file *, unsigned, unsigned long); ++ ++static void cf_request(request_queue_t * q); ++static int cf_transfer(const struct request *req); ++ ++/*long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); ++long (*compat_ioctl) (struct file *, unsigned, unsigned long);*/ ++// int (*direct_access) (struct block_device *, sector_t, unsigned long *); ++// int (*media_changed) (struct gendisk *); ++// int (*revalidate_disk) (struct gendisk *); ++ ++static struct block_device_operations cf_bdops = { ++ .owner = THIS_MODULE, ++ .open = cf_open, ++ .release = cf_release, ++ .ioctl = cf_ioctl, ++ .media_changed = NULL, ++ .unlocked_ioctl = NULL, ++ .revalidate_disk = NULL, ++ .compat_ioctl = NULL, ++ .direct_access = NULL ++}; ++ ++ ++int cf_mips_probe(struct platform_device *pdev) ++{ ++ struct gendisk* cf_gendisk=NULL; ++ struct cf_device *cdev = (struct cf_device *) pdev->dev.platform_data; ++ struct cf_mips_dev *dev; ++ struct resource *r; ++ int reg_result; ++ ++ reg_result = register_blkdev(MAJOR_NR, "cf-mips"); ++ if (reg_result < 0) { ++ printk(KERN_WARNING "cf-mips: can't get major %d\n", MAJOR_NR); ++ return reg_result; ++ } ++ ++ dev = (struct cf_mips_dev *)kmalloc(sizeof(struct cf_mips_dev),GFP_KERNEL); ++ if (!dev) ++ goto out_err; ++ memset(dev, 0, sizeof(struct cf_mips_dev)); ++ cdev->dev = dev; ++ ++ dev->pin = cdev->gpio_pin; ++ dev->irq = platform_get_irq_byname(pdev, "cf_irq"); ++ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cf_membase"); ++ dev->base = (void *) r->start; ++ ++ if (cf_init(dev)) goto out_err; ++ printk("init done"); ++ ++ spin_lock_init(&dev->lock); ++ dev->queue = blk_init_queue(cf_request,&dev->lock); ++ if (!dev->queue){ ++ printk(KERN_ERR "cf-mips: no mem for queue\n"); ++ goto out_err; ++ } ++ blk_queue_max_sectors(dev->queue,ATA_MAX_SECT_PER_CMD); ++ ++ /* For memory devices, it is always better to avoid crossing segments ++ inside the same request. */ ++/* if (dev->dtype==0x848A){ ++ printk(KERN_INFO "Setting boundary for cf to 0x%x",(dev->block_size*512)-1); ++ blk_queue_segment_boundary(dev->queue, (dev->block_size*512)-1); ++ }*/ ++ ++ dev->gd = alloc_disk(CF_MAX_PART); ++ cf_gendisk = dev->gd; ++ cdev->gd = dev->gd; ++ if (!cf_gendisk) goto out_err; /* Last of these goto's */ ++ ++ cf_gendisk->major = MAJOR_NR; ++ cf_gendisk->first_minor = 0; ++ cf_gendisk->queue=dev->queue; ++ BUG_ON(cf_gendisk->minors != CF_MAX_PART); ++ strcpy(cf_gendisk->disk_name,"cfa"); ++ strcpy(cf_gendisk->devfs_name,"cf/card0"); ++ cf_gendisk->fops = &cf_bdops; ++ cf_gendisk->flags = 0 ; /* is not yet GENHD_FL_REMOVABLE */ ++ cf_gendisk->private_data=dev; ++ ++ set_capacity(cf_gendisk,dev->sectors * CF_KERNEL_MUL); ++ ++ /* Let the disk go live */ ++ add_disk(cf_gendisk); ++#if 0 ++ result = cf_init(); ++ ++ /* default cfg for all partitions */ ++ memset(cf_parts, 0, sizeof (cf_parts[0]) * CF_MAX_PART); ++ memset(cf_part_sizes, 0, sizeof (cf_part_sizes[0]) * CF_MAX_PART); ++ for (i = 0; i < CF_MAX_PART; ++i) { ++ cf_hsect_sizes[i] = CF_SECT_SIZE; ++ cf_max_sectors[i] = ATA_MAX_SECT_PER_CMD; ++ cf_blksize_sizes[i] = BLOCK_SIZE; ++ } ++ ++ /* setup info for whole disk (partition 0) */ ++ cf_part_sizes[0] = cf_sectors / 2; ++ cf_parts[0].nr_sects = cf_sectors; ++ ++ blk_size[MAJOR_NR] = cf_part_sizes; ++ blksize_size[MAJOR_NR] = cf_blksize_sizes; ++ max_sectors[MAJOR_NR] = cf_max_sectors; ++ hardsect_size[MAJOR_NR] = cf_hsect_sizes; ++ read_ahead[MAJOR_NR] = 8; /* (4kB) */ ++ ++ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST); ++ ++ add_gendisk(&cf_gendisk); ++#endif ++// printk(KERN_INFO "cf-mips partition check: \n"); ++// register_disk(cf_gendisk, MKDEV(MAJOR_NR, 0), CF_MAX_PART, ++// &cf_bdops, dev->sectors); ++ return 0; ++ ++out_err: ++ if (dev->queue){ ++ blk_cleanup_queue(dev->queue); ++ } ++ if (reg_result) { ++ unregister_blkdev(MAJOR_NR, "cf-mips"); ++ return reg_result; ++ } ++ if (dev){ ++ cf_cleanup(dev); ++ kfree(dev); ++ } ++ return 1; ++} ++ ++static int ++cf_mips_remove(struct platform_device *pdev) ++{ ++ struct cf_device *cdev = (struct cf_device *) pdev->dev.platform_data; ++ struct cf_mips_dev *dev = (struct cf_mips_dev *) cdev->dev; ++ ++ unregister_blkdev(MAJOR_NR, "cf-mips"); ++ blk_cleanup_queue(dev->queue); ++ ++ del_gendisk(dev->gd); ++ cf_cleanup(dev); ++ return 0; ++} ++ ++ ++static struct platform_driver cf_driver = { ++ .driver.name = "rb500-cf", ++ .probe = cf_mips_probe, ++ .remove = cf_mips_remove, ++}; ++ ++static int __init cf_mips_init(void) ++{ ++ printk(KERN_INFO "cf-mips module loaded\n"); ++ return platform_driver_register(&cf_driver); ++} ++ ++static void cf_mips_cleanup(void) ++{ ++ platform_driver_unregister(&cf_driver); ++ printk(KERN_INFO "cf-mips module removed\n"); ++} ++ ++module_init(cf_mips_init); ++module_exit(cf_mips_cleanup); ++ ++MODULE_LICENSE("GPL"); ++MODULE_ALIAS_BLOCKDEV_MAJOR(CF_MIPS_MAJOR); ++ ++ ++static int cf_open(struct inode *inode, struct file *filp) ++{ ++ struct cf_mips_dev *dev=inode->i_bdev->bd_disk->private_data; ++ int minor = MINOR(inode->i_rdev); ++ ++ if (minor >= CF_MAX_PART) ++ return -ENODEV; ++ //DEBUGP(KERN_INFO "cf-mips module opened, minor %d\n", minor); ++ spin_lock(&dev->lock); ++ dev->users++; ++ spin_unlock(&dev->lock); ++ filp->private_data=dev; ++ ++ /* dirty workaround to set CFRDY GPIO as an input when some other ++ program sets it as an output */ ++ gpio_set(CFG, (1 << dev->pin), 0); ++ return 0; /* success */ ++} ++ ++static int cf_release(struct inode *inode, struct file *filp) ++{ ++ int minor = MINOR(inode->i_rdev); ++ struct cf_mips_dev *dev=inode->i_bdev->bd_disk->private_data; ++ spin_lock(&dev->lock); ++ dev->users--; ++ spin_unlock(&dev->lock); ++ return 0; ++} ++ ++static int cf_ioctl(struct inode *inode, struct file *filp, ++ unsigned int cmd, unsigned long arg) ++{ ++ unsigned minor = MINOR(inode->i_rdev); ++ struct cf_mips_dev *dev=inode->i_bdev->bd_disk->private_data; ++ ++ DEBUGP(KERN_INFO "cf_ioctl cmd %u\n", cmd); ++ switch (cmd) { ++ case BLKRRPART: /* re-read partition table */ ++ if (!capable(CAP_SYS_ADMIN)) ++ return -EACCES; ++ printk(KERN_INFO "cf-mips partition check: \n"); ++ register_disk(dev->gd); ++ return 0; ++ ++ case HDIO_GETGEO: ++ { ++ struct hd_geometry geo; ++ geo.cylinders = dev->cyl; ++ geo.heads = dev->head; ++ geo.sectors = dev->spt; ++ geo.start = (*dev->gd->part)[minor].start_sect; ++ if (copy_to_user((void *) arg, &geo, sizeof (geo))) ++ return -EFAULT; ++ } ++ return 0; ++ } ++ ++ return -EINVAL; /* unknown command */ ++} ++ ++static void cf_request(request_queue_t * q) ++{ ++ struct cf_mips_dev* dev; ++ ++ struct request * req; ++ int status; ++ ++ /* We could have q->queuedata = dev , but haven't yet. */ ++ if (active_req) ++ return; ++ ++ while ((req=elv_next_request(q))!=NULL){ ++ dev=req->rq_disk->private_data; ++ status=cf_transfer(req); ++ if (status==CF_TRANS_IN_PROGRESS){ ++ active_req=req; ++ return; ++ } ++ end_request(req,status); ++ } ++} ++ ++static int cf_transfer(const struct request *req) ++{ ++ struct cf_mips_dev* dev=req->rq_disk->private_data; ++ ++ if (!blk_fs_request(req)){ ++ if (printk_ratelimit()) ++ printk(KERN_WARNING "cf-mips: skipping non-fs request 0x%x\n",req->cmd[0]); ++ return CF_TRANS_FAILED; ++ } ++ ++ return cf_do_transfer(dev,req->sector,req->current_nr_sectors,req->buffer,rq_data_dir(req)); ++} ++ ++void cf_async_trans_done(struct cf_mips_dev * dev,int result) ++{ ++ struct request *req; ++ ++ spin_lock(&dev->lock); ++ req=active_req; ++ active_req=NULL; ++ end_request(req,result); ++ spin_unlock(&dev->lock); ++ ++ spin_lock(&dev->lock); ++ cf_request(dev->queue); ++ spin_unlock(&dev->lock); ++} ++ +diff -urN linux.old/drivers/block/rb500/Makefile linux.dev/drivers/block/rb500/Makefile +--- linux.old/drivers/block/rb500/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/block/rb500/Makefile 2006-06-08 22:14:58.000000000 +0200 +@@ -0,0 +1,3 @@ ++## Makefile for the RB532 CF port ++ ++obj-y += bdev.o ata.o +diff -urN linux.old/drivers/Makefile linux.dev/drivers/Makefile +--- linux.old/drivers/Makefile 2006-06-08 20:20:52.000000000 +0200 ++++ linux.dev/drivers/Makefile 2006-06-08 22:14:58.000000000 +0200 +@@ -73,3 +73,4 @@ + obj-y += firmware/ + obj-$(CONFIG_CRYPTO) += crypto/ + obj-$(CONFIG_SUPERH) += sh/ ++obj-$(CONFIG_BLK_DEV_CF_MIPS) += block/rb500/ +\ No newline at end of file diff --git a/openwrt/target/linux/rb532-2.6/patches/130-custom_partitions.patch b/openwrt/target/linux/rb532-2.6/patches/130-custom_partitions.patch new file mode 100644 index 00000000000..8aabd66d0cb --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/130-custom_partitions.patch @@ -0,0 +1,308 @@ +diff -urN linux.old/fs/partitions/check.c linux.dev/fs/partitions/check.c +--- linux.old/fs/partitions/check.c 2006-05-31 02:31:44.000000000 +0200 ++++ linux.dev/fs/partitions/check.c 2006-06-15 01:27:17.000000000 +0200 +@@ -29,6 +29,7 @@ + #include "ldm.h" + #include "mac.h" + #include "msdos.h" ++#include "openwrt.h" + #include "osf.h" + #include "sgi.h" + #include "sun.h" +@@ -48,6 +49,9 @@ + * Probe partition formats with tables at disk address 0 + * that also have an ADFS boot block at 0xdc0. + */ ++#ifdef CONFIG_OPENWRT_PARTITION ++ openwrt_partition, ++#endif + #ifdef CONFIG_ACORN_PARTITION_ICS + adfspart_check_ICS, + #endif +diff -urN linux.old/fs/partitions/Kconfig linux.dev/fs/partitions/Kconfig +--- linux.old/fs/partitions/Kconfig 2006-05-31 02:31:44.000000000 +0200 ++++ linux.dev/fs/partitions/Kconfig 2006-06-15 01:27:17.000000000 +0200 +@@ -14,6 +14,12 @@ + + If unsure, say N. + ++config OPENWRT_PARTITION ++ bool "OpenWrt partition support" if PARTITION_ADVANCED ++ default y ++ help ++ Support the custom OpenWrt partition map ++ + config ACORN_PARTITION + bool "Acorn partition support" if PARTITION_ADVANCED + default y if ARCH_ACORN +diff -urN linux.old/fs/partitions/Makefile linux.dev/fs/partitions/Makefile +--- linux.old/fs/partitions/Makefile 2006-05-31 02:31:44.000000000 +0200 ++++ linux.dev/fs/partitions/Makefile 2006-06-15 01:27:17.000000000 +0200 +@@ -11,6 +11,7 @@ + obj-$(CONFIG_MAC_PARTITION) += mac.o + obj-$(CONFIG_LDM_PARTITION) += ldm.o + obj-$(CONFIG_MSDOS_PARTITION) += msdos.o ++obj-$(CONFIG_OPENWRT_PARTITION) += openwrt.o + obj-$(CONFIG_OSF_PARTITION) += osf.o + obj-$(CONFIG_SGI_PARTITION) += sgi.o + obj-$(CONFIG_SUN_PARTITION) += sun.o +diff -urN linux.old/fs/partitions/openwrt.c linux.dev/fs/partitions/openwrt.c +--- linux.old/fs/partitions/openwrt.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/partitions/openwrt.c 2006-06-15 01:27:17.000000000 +0200 +@@ -0,0 +1,246 @@ ++/* ++ * fs/partitions/openwrt.c ++ * ++ * Code extracted from drivers/block/genhd.c ++ * and fs/partitions/msdos.c ++ * ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> ++ * Copyright (C) 1991-1998 Linus Torvalds ++ * ++ * Thanks to Branko Lankester, lankeste@fwi.uva.nl, who found a bug ++ * in the early extended-partition checks and added DM partitions ++ * ++ * Support for DiskManager v6.0x added by Mark Lord, ++ * with information provided by OnTrack. This now works for linux fdisk ++ * and LILO, as well as loadlin and bootln. Note that disks other than ++ * /dev/hda *must* have a "DOS" type 0x51 partition in the first slot (hda1). ++ * ++ * More flexible handling of extended partitions - aeb, 950831 ++ * ++ * Check partition table on IDE disks for common CHS translations ++ * ++ * Re-organised Feb 1998 Russell King ++ */ ++ ++#include <linux/config.h> ++ ++#include "check.h" ++#include "openwrt.h" ++ ++/* ++ * Many architectures don't like unaligned accesses, while ++ * the nr_sects and start_sect partition table entries are ++ * at a 2 (mod 4) address. ++ */ ++#include <asm/unaligned.h> ++ ++#define SYS_IND(p) (get_unaligned(&p->sys_ind)) ++#define NR_SECTS(p) ({ __typeof__(p->nr_sects) __a = \ ++ get_unaligned(&p->nr_sects); \ ++ le32_to_cpu(__a); \ ++ }) ++ ++#define START_SECT(p) ({ __typeof__(p->start_sect) __a = \ ++ get_unaligned(&p->start_sect); \ ++ le32_to_cpu(__a); \ ++ }) ++ ++static inline int is_extended_partition(struct partition *p) ++{ ++ return (SYS_IND(p) == DOS_EXTENDED_PARTITION || ++ SYS_IND(p) == WIN98_EXTENDED_PARTITION || ++ SYS_IND(p) == LINUX_EXTENDED_PARTITION); ++} ++ ++#define MSDOS_LABEL_MAGIC1 0x55 ++#define MSDOS_LABEL_MAGIC2 0xAA ++ ++static inline int ++msdos_magic_present(unsigned char *p) ++{ ++ return (p[0] == MSDOS_LABEL_MAGIC1 && p[1] == MSDOS_LABEL_MAGIC2); ++} ++ ++static inline int ++openwrt_magic_present(unsigned char *p) ++{ ++ return (p[0] == 'O' && ++ p[1] == 'W' && ++ p[2] == 'R' && ++ p[3] == 'T'); ++} ++ ++/* ++ * Create devices for each logical partition in an extended partition. ++ * The logical partitions form a linked list, with each entry being ++ * a partition table with two entries. The first entry ++ * is the real data partition (with a start relative to the partition ++ * table start). The second is a pointer to the next logical partition ++ * (with a start relative to the entire extended partition). ++ * We do not create a Linux partition for the partition tables, but ++ * only for the actual data partitions. ++ */ ++ ++static void ++parse_extended(struct parsed_partitions *state, struct block_device *bdev, ++ u32 first_sector, u32 first_size) ++{ ++ struct partition *p; ++ Sector sect; ++ unsigned char *data; ++ u32 this_sector, this_size; ++ int sector_size = bdev_hardsect_size(bdev) / 512; ++ int loopct = 0; /* number of links followed ++ without finding a data partition */ ++ int i; ++ ++ this_sector = first_sector; ++ this_size = first_size; ++ ++ while (1) { ++ if (++loopct > 100) ++ return; ++ if (state->next == state->limit) ++ return; ++ data = read_dev_sector(bdev, this_sector, §); ++ if (!data) ++ return; ++ ++ if (!msdos_magic_present(data + 510)) ++ goto done; ++ ++ p = (struct partition *) (data + 0x1be); ++ ++ /* ++ * Usually, the first entry is the real data partition, ++ * the 2nd entry is the next extended partition, or empty, ++ * and the 3rd and 4th entries are unused. ++ * However, DRDOS sometimes has the extended partition as ++ * the first entry (when the data partition is empty), ++ * and OS/2 seems to use all four entries. ++ */ ++ ++ /* ++ * First process the data partition(s) ++ */ ++ for (i=0; i<4; i++, p++) { ++ u32 offs, size, next; ++ if (!NR_SECTS(p) || is_extended_partition(p)) ++ continue; ++ ++ /* Check the 3rd and 4th entries - ++ these sometimes contain random garbage */ ++ offs = START_SECT(p)*sector_size; ++ size = NR_SECTS(p)*sector_size; ++ next = this_sector + offs; ++ if (i >= 2) { ++ if (offs + size > this_size) ++ continue; ++ if (next < first_sector) ++ continue; ++ if (next + size > first_sector + first_size) ++ continue; ++ } ++ ++ put_partition(state, state->next, next, size); ++ if (SYS_IND(p) == LINUX_RAID_PARTITION) ++ state->parts[state->next].flags = 1; ++ loopct = 0; ++ if (++state->next == state->limit) ++ goto done; ++ } ++ /* ++ * Next, process the (first) extended partition, if present. ++ * (So far, there seems to be no reason to make ++ * parse_extended() recursive and allow a tree ++ * of extended partitions.) ++ * It should be a link to the next logical partition. ++ */ ++ p -= 4; ++ for (i=0; i<4; i++, p++) ++ if (NR_SECTS(p) && is_extended_partition(p)) ++ break; ++ if (i == 4) ++ goto done; /* nothing left to do */ ++ ++ this_sector = first_sector + START_SECT(p) * sector_size; ++ this_size = NR_SECTS(p) * sector_size; ++ put_dev_sector(sect); ++ } ++done: ++ put_dev_sector(sect); ++} ++ ++ ++int openwrt_partition(struct parsed_partitions *state, struct block_device *bdev) ++{ ++ int sector_size = bdev_hardsect_size(bdev) / 512; ++ Sector sect; ++ unsigned char *data; ++ struct partition *p; ++ int slot; ++ u32 last_block = 0; ++ u32 size = 0; ++ int firstfree = 5; ++ ++ data = read_dev_sector(bdev, 0, §); ++ if (!data) ++ return -1; ++ if (!openwrt_magic_present(data)) { ++ printk("No OpenWrt partition table detected\n"); ++ put_dev_sector(sect); ++ return 0; ++ } ++ ++ /* ++ * Now that the 55aa signature is present, this is probably ++ * either the boot sector of a FAT filesystem or a DOS-type ++ * partition table. Reject this in case the boot indicator ++ * is not 0 or 0x80. ++ */ ++ p = (struct partition *) (data + 0x1be); ++ for (slot = 1; slot <= 4; slot++, p++) { ++ if (p->boot_ind != 0 && p->boot_ind != 0x80) { ++ put_dev_sector(sect); ++ return 0; ++ } ++ } ++ ++ p = (struct partition *) (data + 0x1be); ++ ++ /* ++ * Look for partitions in two passes: ++ * First find the primary and DOS-type extended partitions. ++ */ ++ ++ state->next = 6; ++ for (slot = 1 ; slot <= 4 ; slot++, p++) { ++ u32 start = START_SECT(p)*sector_size; ++ size = NR_SECTS(p)*sector_size; ++ if (!size) { ++ if (firstfree > slot) ++ firstfree = slot; ++ ++ continue; ++ } ++ if (is_extended_partition(p)) { ++ /* prevent someone doing mkfs or mkswap on an ++ extended partition, but leave room for LILO */ ++ last_block = start + size; ++ put_partition(state, slot, start, size == 1 ? 1 : 2); ++ printk(" <"); ++ parse_extended(state, bdev, start, size); ++ printk(" >"); ++ continue; ++ } ++ last_block = start + size; ++ put_partition(state, slot, start, size); ++ } ++ if (last_block + 1024 < (size = get_capacity(bdev->bd_disk))) ++ put_partition(state, firstfree, last_block, size - last_block); ++ ++ printk("\n"); ++ ++ put_dev_sector(sect); ++ return 1; ++} +diff -urN linux.old/fs/partitions/openwrt.h linux.dev/fs/partitions/openwrt.h +--- linux.old/fs/partitions/openwrt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/partitions/openwrt.h 2006-06-15 01:27:17.000000000 +0200 +@@ -0,0 +1,6 @@ ++/* ++ * fs/partitions/openwrt.h ++ */ ++ ++int openwrt_partition(struct parsed_partitions *state, struct block_device *bdev); ++ diff --git a/openwrt/target/linux/rb532-2.6/patches/140-jffs2_eofdetect.patch b/openwrt/target/linux/rb532-2.6/patches/140-jffs2_eofdetect.patch new file mode 100644 index 00000000000..b93efa68abd --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/140-jffs2_eofdetect.patch @@ -0,0 +1,48 @@ +diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c +--- linux.old/fs/jffs2/scan.c 2006-05-31 02:31:44.000000000 +0200 ++++ linux.dev/fs/jffs2/scan.c 2006-06-15 02:20:32.000000000 +0200 +@@ -120,8 +120,11 @@ + /* reset summary info for next eraseblock scan */ + jffs2_sum_reset_collected(s); + +- ret = jffs2_scan_eraseblock(c, jeb, buf_size?flashbuf:(flashbuf+jeb->offset), +- buf_size, s); ++ if (c->flags & (1 << 7)) ++ ret = BLK_STATE_ALLFF; ++ else ++ ret = jffs2_scan_eraseblock(c, jeb, buf_size?flashbuf:(flashbuf+jeb->offset), ++ buf_size, s); + + if (ret < 0) + goto out; +@@ -222,6 +225,12 @@ + } + } + ++ if (c->flags & (1 << 7)) { ++ printk("jffs2_scan_medium(): erasing all blocks after the end marker...\n"); ++ jffs2_erase_pending_blocks(c, -1); ++ printk("jffs2_scan_medium(): done.\n"); ++ } ++ + if (jffs2_sum_active() && s) + kfree(s); + +@@ -389,6 +398,17 @@ + return err; + } + ++ if ((buf[0] == 0xde) && ++ (buf[1] == 0xad) && ++ (buf[2] == 0xc0) && ++ (buf[3] == 0xde)) { ++ /* end of filesystem. erase everything after this point */ ++ printk("jffs2_scan_eraseblock(): End of filesystem marker found at 0x%x\n", jeb->offset); ++ c->flags |= (1 << 7); ++ ++ return BLK_STATE_ALLFF; ++ } ++ + /* We temporarily use 'ofs' as a pointer into the buffer/jeb */ + ofs = 0; + diff --git a/openwrt/target/linux/rb532-2.6/patches/200-bridge_resource_hack.patch b/openwrt/target/linux/rb532-2.6/patches/200-bridge_resource_hack.patch new file mode 100644 index 00000000000..3017f5dfcda --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/200-bridge_resource_hack.patch @@ -0,0 +1,13 @@ +--- linux.old/arch/mips/pci/pci.c 2006-04-19 08:10:14.000000000 +0200 ++++ linux.dev/arch/mips/pci/pci.c 2006-06-14 20:23:18.000000000 +0200 +@@ -65,8 +65,10 @@ + /* + * Put everything into 0x00-0xff region modulo 0x400 + */ ++#ifndef CONFIG_MIKROTIK_RB500 + if (start & 0x300) + start = (start + 0x3ff) & ~0x3ff; ++#endif + } else if (res->flags & IORESOURCE_MEM) { + /* Make sure we start at our min on all hoses */ + if (start < PCIBIOS_MIN_MEM + hose->mem_resource->start) diff --git a/openwrt/target/linux/rb532-2.6/patches/210-pci_fixes.patch b/openwrt/target/linux/rb532-2.6/patches/210-pci_fixes.patch new file mode 100644 index 00000000000..02cd2f063cc --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/210-pci_fixes.patch @@ -0,0 +1,46 @@ +diff -urN linux.old/drivers/pci/probe.c linux.dev/drivers/pci/probe.c +--- linux.old/drivers/pci/probe.c 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/drivers/pci/probe.c 2006-06-08 20:19:40.000000000 +0200 +@@ -760,15 +760,22 @@ + u32 l; + u8 hdr_type; + int delay = 1; +- +- if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l)) +- return NULL; +- +- /* some broken boards return 0 or ~0 if a slot is empty: */ +- if (l == 0xffffffff || l == 0x00000000 || +- l == 0x0000ffff || l == 0xffff0000) +- return NULL; +- ++ do { ++ if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l)) ++ return NULL; ++ /* some broken boards return 0 or ~0 if a slot is empty: */ ++ if (l == 0xffffffff || l == 0x00000000 || ++ l == 0x0000ffff || l == 0xffff0000){ ++ if (delay > 4) ++ return NULL; ++ /* But that could also be the previous dev not settled */ ++ pr_debug("PCI: retrying scan at 0x%x, because config is 0x%x\n",devfn,l); ++ msleep(delay); ++ delay *=2; ++ l=0; ++ } ++ }while (l==0); ++ + /* Configuration request Retry Status */ + while (l == 0xffff0001) { + msleep(delay); +@@ -903,7 +910,10 @@ + + /* Go find them, Rover! */ + for (devfn = 0; devfn < 0x100; devfn += 8) ++ { ++ if (bus->number == 0 && (devfn >> 3) > 21) break; + pci_scan_slot(bus, devfn); ++ } + + /* + * After performing arch-dependent fixup of the bus, look behind diff --git a/openwrt/target/linux/rb532-2.6/patches/220-serial_fix.patch b/openwrt/target/linux/rb532-2.6/patches/220-serial_fix.patch new file mode 100644 index 00000000000..d36f263a33e --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/220-serial_fix.patch @@ -0,0 +1,18 @@ +diff -urN linux.old/drivers/serial/8250.c linux.dev/drivers/serial/8250.c +--- linux.old/drivers/serial/8250.c 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/drivers/serial/8250.c 2006-06-08 20:19:40.000000000 +0200 +@@ -351,6 +351,13 @@ + default: + outb(value, up->port.iobase + offset); + } ++ ++#if defined(CONFIG_IDT_EB434) || defined(CONFIG_MIKROTIK_RB500) ++ __SLOW_DOWN_IO; ++ __SLOW_DOWN_IO; ++ __SLOW_DOWN_IO; ++ __SLOW_DOWN_IO; ++#endif + } + + /* + diff --git a/openwrt/target/linux/rb532-2.6/patches/230-dma_limit.patch b/openwrt/target/linux/rb532-2.6/patches/230-dma_limit.patch new file mode 100644 index 00000000000..ca87115704f --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/230-dma_limit.patch @@ -0,0 +1,13 @@ +diff -urN linux.old/arch/mips/mm/init.c linux.dev/arch/mips/mm/init.c +--- linux.old/arch/mips/mm/init.c 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/arch/mips/mm/init.c 2006-06-08 20:19:40.000000000 +0200 +@@ -149,7 +149,7 @@ + kmap_init(); + #endif + +- max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; ++ max_dma = virt_to_phys((char *) (256 * 1024 * 1024)) >> PAGE_SHIFT; + low = max_low_pfn; + high = highend_pfn; + + diff --git a/openwrt/target/linux/rb532-2.6/patches/240-via_hack.patch b/openwrt/target/linux/rb532-2.6/patches/240-via_hack.patch new file mode 100644 index 00000000000..46df520b414 --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/240-via_hack.patch @@ -0,0 +1,13 @@ +diff -urN linux.old/drivers/net/via-rhine.c linux.dev/drivers/net/via-rhine.c +--- linux.old/drivers/net/via-rhine.c 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/drivers/net/via-rhine.c 2006-06-08 20:19:40.000000000 +0200 +@@ -142,7 +142,7 @@ + These may be modified when a driver module is loaded. */ + + static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ +-static int max_interrupt_work = 20; ++static int max_interrupt_work = 20000; + + /* Set the copy breakpoint for the copy-only-tiny-frames scheme. + Setting to > 1518 effectively disables this feature. */ + From 02e8cd6b156739dcc8e1c1f5df8987f8804c5755 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Thu, 15 Jun 2006 22:17:32 +0000 Subject: [PATCH 183/757] return the correct system type for Aruba SVN-Revision: 3958 --- .../target/linux/aruba-2.6/patches/000-aruba.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch index ee02c34722a..4263f8e3e97 100644 --- a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch +++ b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch @@ -783,7 +783,7 @@ diff -Nur linux-2.6.16/arch/mips/aruba/serial.c linux-2.6.16-owrt/arch/mips/arub diff -Nur linux-2.6.16/arch/mips/aruba/setup.c linux-2.6.16-owrt/arch/mips/aruba/setup.c --- linux-2.6.16/arch/mips/aruba/setup.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.16-owrt/arch/mips/aruba/setup.c 2006-03-20 14:30:00.000000000 +0100 -@@ -0,0 +1,125 @@ +@@ -0,0 +1,134 @@ +/************************************************************************** + * + * BRIEF MODULE DESCRIPTION @@ -905,7 +905,16 @@ diff -Nur linux-2.6.16/arch/mips/aruba/setup.c linux-2.6.16-owrt/arch/mips/aruba + +const char *get_system_type(void) +{ -+ return "MIPS IDT32434 - ARUBA"; ++ switch (mips_machtype) { ++ case MACH_ARUBA_AP70: ++ return "Aruba AP70"; ++ case MACH_ARUBA_AP65: ++ return "Aruba AP65"; ++ case MACH_ARUBA_AP60: ++ return "Aruba AP60/AP61"; ++ default: ++ return "Aruba UNKNOWN"; ++ } +} + +EXPORT_SYMBOL(get_system_type); From 51b6a6f3c86f20c4a2de45321bc119aaa2cf130e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 16 Jun 2006 05:27:39 +0000 Subject: [PATCH 184/757] put a size limit on rb532 cf partitions SVN-Revision: 3960 --- .../linux/rb532-2.6/patches/130-custom_partitions.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrt/target/linux/rb532-2.6/patches/130-custom_partitions.patch b/openwrt/target/linux/rb532-2.6/patches/130-custom_partitions.patch index 8aabd66d0cb..e4b332703ae 100644 --- a/openwrt/target/linux/rb532-2.6/patches/130-custom_partitions.patch +++ b/openwrt/target/linux/rb532-2.6/patches/130-custom_partitions.patch @@ -49,7 +49,7 @@ diff -urN linux.old/fs/partitions/Makefile linux.dev/fs/partitions/Makefile diff -urN linux.old/fs/partitions/openwrt.c linux.dev/fs/partitions/openwrt.c --- linux.old/fs/partitions/openwrt.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/fs/partitions/openwrt.c 2006-06-15 01:27:17.000000000 +0200 -@@ -0,0 +1,246 @@ +@@ -0,0 +1,249 @@ +/* + * fs/partitions/openwrt.c + * @@ -285,6 +285,8 @@ diff -urN linux.old/fs/partitions/openwrt.c linux.dev/fs/partitions/openwrt.c + printk(" >"); + continue; + } ++ if ((start + size) > get_capacity(bdev->bd_disk)) ++ size = get_capacity(bdev->bd_disk) - start; + last_block = start + size; + put_partition(state, slot, start, size); + } @@ -296,6 +298,7 @@ diff -urN linux.old/fs/partitions/openwrt.c linux.dev/fs/partitions/openwrt.c + put_dev_sector(sect); + return 1; +} ++ diff -urN linux.old/fs/partitions/openwrt.h linux.dev/fs/partitions/openwrt.h --- linux.old/fs/partitions/openwrt.h 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/fs/partitions/openwrt.h 2006-06-15 01:27:17.000000000 +0200 From 1cc92a9d1462d561e80d70128ebb7b7bb405b589 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 16 Jun 2006 05:30:34 +0000 Subject: [PATCH 185/757] massive via-rhine performance improvements SVN-Revision: 3961 --- .../rb532-2.6/patches/240-via_hack.patch | 13 - .../patches/240-via_rhine_performance.patch | 461 ++++++++++++++++++ 2 files changed, 461 insertions(+), 13 deletions(-) delete mode 100644 openwrt/target/linux/rb532-2.6/patches/240-via_hack.patch create mode 100644 openwrt/target/linux/rb532-2.6/patches/240-via_rhine_performance.patch diff --git a/openwrt/target/linux/rb532-2.6/patches/240-via_hack.patch b/openwrt/target/linux/rb532-2.6/patches/240-via_hack.patch deleted file mode 100644 index 46df520b414..00000000000 --- a/openwrt/target/linux/rb532-2.6/patches/240-via_hack.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -urN linux.old/drivers/net/via-rhine.c linux.dev/drivers/net/via-rhine.c ---- linux.old/drivers/net/via-rhine.c 2006-06-08 20:21:20.000000000 +0200 -+++ linux.dev/drivers/net/via-rhine.c 2006-06-08 20:19:40.000000000 +0200 -@@ -142,7 +142,7 @@ - These may be modified when a driver module is loaded. */ - - static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ --static int max_interrupt_work = 20; -+static int max_interrupt_work = 20000; - - /* Set the copy breakpoint for the copy-only-tiny-frames scheme. - Setting to > 1518 effectively disables this feature. */ - diff --git a/openwrt/target/linux/rb532-2.6/patches/240-via_rhine_performance.patch b/openwrt/target/linux/rb532-2.6/patches/240-via_rhine_performance.patch new file mode 100644 index 00000000000..56c1fb559ce --- /dev/null +++ b/openwrt/target/linux/rb532-2.6/patches/240-via_rhine_performance.patch @@ -0,0 +1,461 @@ +diff -urN linux.old/drivers/net/via-rhine.c linux.dev/drivers/net/via-rhine.c +--- linux.old/drivers/net/via-rhine.c 2006-06-08 20:21:20.000000000 +0200 ++++ linux.dev/drivers/net/via-rhine.c 2006-06-08 20:19:40.000000000 +0200 +@@ -131,6 +131,10 @@ + - Fix Tx engine race for good + - Craig Brind: Zero padded aligned buffers for short packets. + ++ OpenWrt Version (Felix Fietkau <nbd@openwrt.org>) ++ - Performance improvements ++ - NAPI polling ++ + */ + + #define DRV_NAME "via-rhine" +@@ -142,7 +146,6 @@ + These may be modified when a driver module is loaded. */ + + static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ +-static int max_interrupt_work = 20; + + /* Set the copy breakpoint for the copy-only-tiny-frames scheme. + Setting to > 1518 effectively disables this feature. */ +@@ -165,9 +168,9 @@ + Making the Tx ring too large decreases the effectiveness of channel + bonding and packet priority. + There are no ill effects from too-large receive rings. */ +-#define TX_RING_SIZE 16 +-#define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */ +-#define RX_RING_SIZE 16 ++#define TX_RING_SIZE 128 ++#define TX_QUEUE_LEN 120 /* Limit ring entries actually used. */ ++#define RX_RING_SIZE 128 + + + /* Operational parameters that usually are not changed. */ +@@ -201,6 +204,7 @@ + #include <asm/io.h> + #include <asm/irq.h> + #include <asm/uaccess.h> ++#include <asm/unaligned.h> + + /* These identify the driver base version and may not be removed. */ + static char version[] __devinitdata = +@@ -217,10 +221,8 @@ + MODULE_DESCRIPTION("VIA Rhine PCI Fast Ethernet driver"); + MODULE_LICENSE("GPL"); + +-module_param(max_interrupt_work, int, 0); + module_param(debug, int, 0); + module_param(rx_copybreak, int, 0); +-MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt"); + MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)"); + MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames"); + +@@ -461,6 +463,8 @@ + struct tx_desc *tx_ring; + dma_addr_t rx_ring_dma; + dma_addr_t tx_ring_dma; ++ u32 istat; ++ u32 imask; + + /* The addresses of receive-in-place skbuffs. */ + struct sk_buff *rx_skbuff[RX_RING_SIZE]; +@@ -504,9 +508,10 @@ + static void rhine_check_media_task(struct net_device *dev); + static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev); + static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +-static void rhine_tx(struct net_device *dev); +-static void rhine_rx(struct net_device *dev); +-static void rhine_error(struct net_device *dev, int intr_status); ++static int rhine_poll(struct net_device *dev, int *budget); ++static int rhine_tx(struct net_device *dev); ++static int rhine_rx(struct net_device *dev); ++static void rhine_error(struct net_device *dev); + static void rhine_set_rx_mode(struct net_device *dev); + static struct net_device_stats *rhine_get_stats(struct net_device *dev); + static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); +@@ -601,6 +606,8 @@ + struct rhine_private *rp = netdev_priv(dev); + void __iomem *ioaddr = rp->base; + ++ pci_enable_device(rp->pdev); ++ + iowrite8(Cmd1Reset, ioaddr + ChipCmd1); + IOSYNC; + +@@ -622,6 +629,28 @@ + "failed" : "succeeded"); + } + ++static inline void rhine_intr_enable(struct net_device *dev) ++{ ++ struct rhine_private *rp = netdev_priv(dev); ++ void __iomem *ioaddr = rp->base; ++ ++ iowrite16(rp->imask = (IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | ++ IntrRxDropped | IntrRxNoBuf | IntrTxAborted | ++ IntrTxDone | IntrTxError | IntrTxUnderrun | ++ IntrPCIErr | IntrStatsMax | IntrLinkChange), ++ ioaddr + IntrEnable); ++} ++ ++static inline void rhine_intr_disable(struct net_device *dev) ++{ ++ struct rhine_private *rp = netdev_priv(dev); ++ void __iomem *ioaddr = rp->base; ++ ++ iowrite16(rp->imask = (IntrRxOverflow | IntrRxNoBuf | IntrTxAborted | ++ IntrTxError | IntrTxUnderrun | IntrPCIErr | IntrStatsMax | IntrLinkChange), ++ ioaddr + IntrEnable); ++} ++ + #ifdef USE_MMIO + static void enable_mmio(long pioaddr, u32 quirks) + { +@@ -664,14 +693,26 @@ + + } + +-#ifdef CONFIG_NET_POLL_CONTROLLER +-static void rhine_poll(struct net_device *dev) ++static int rhine_poll(struct net_device *dev, int *budget) + { +- disable_irq(dev->irq); +- rhine_interrupt(dev->irq, (void *)dev, NULL); +- enable_irq(dev->irq); ++ unsigned int work_done, work_to_do = min(*budget, dev->quota); ++ struct rhine_private *rp = netdev_priv(dev); ++ ++ work_done = rhine_rx(dev); ++ ++ if (rp->istat & (IntrTxErrSummary | IntrTxDone)) ++ rhine_tx(dev); ++ ++ *budget -= work_done; ++ dev->quota -= work_done; ++ ++ if (work_done < work_to_do) { ++ netif_rx_complete(dev); ++ rhine_intr_enable(dev); ++ } ++ ++ return (work_done >= work_to_do); + } +-#endif + + static void rhine_hw_init(struct net_device *dev, long pioaddr) + { +@@ -850,11 +891,10 @@ + dev->ethtool_ops = &netdev_ethtool_ops; + dev->tx_timeout = rhine_tx_timeout; + dev->watchdog_timeo = TX_TIMEOUT; +-#ifdef CONFIG_NET_POLL_CONTROLLER +- dev->poll_controller = rhine_poll; +-#endif +- if (rp->quirks & rqRhineI) +- dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM; ++ dev->poll = rhine_poll; ++ dev->weight = 64; ++ ++ dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; + + INIT_WORK(&rp->tx_timeout_task, + (void (*)(void *))rhine_tx_timeout_task, dev); +@@ -904,6 +944,10 @@ + } + } + rp->mii_if.phy_id = phy_id; ++ ++ // shut down until somebody really needs it ++ iowrite8(0x80, ioaddr + 0xa1); ++ pci_set_power_state(rp->pdev, 3); + + return 0; + +@@ -995,7 +1039,7 @@ + + /* Fill in the Rx buffers. Handle allocation failure gracefully. */ + for (i = 0; i < RX_RING_SIZE; i++) { +- struct sk_buff *skb = dev_alloc_skb(rp->rx_buf_sz); ++ struct sk_buff *skb = dev_alloc_skb(rp->rx_buf_sz + 4); + rp->rx_skbuff[i] = skb; + if (skb == NULL) + break; +@@ -1115,11 +1159,7 @@ + rhine_set_rx_mode(dev); + + /* Enable interrupts by setting the interrupt mask. */ +- iowrite16(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | +- IntrRxDropped | IntrRxNoBuf | IntrTxAborted | +- IntrTxDone | IntrTxError | IntrTxUnderrun | +- IntrPCIErr | IntrStatsMax | IntrLinkChange, +- ioaddr + IntrEnable); ++ rhine_intr_enable(dev); + + iowrite16(CmdStart | CmdTxOn | CmdRxOn | (Cmd1NoTxPoll << 8), + ioaddr + ChipCmd); +@@ -1230,6 +1270,7 @@ + mdio_read(dev, rp->mii_if.phy_id, MII_BMSR)); + + netif_start_queue(dev); ++ netif_poll_enable(dev); + + return 0; + } +@@ -1268,8 +1309,8 @@ + /* Reinitialize the hardware. */ + rhine_chip_reset(dev); + init_registers(dev); +- + spin_unlock(&rp->lock); ++ + enable_irq(rp->pdev->irq); + + dev->trans_start = jiffies; +@@ -1363,69 +1404,56 @@ + struct net_device *dev = dev_instance; + struct rhine_private *rp = netdev_priv(dev); + void __iomem *ioaddr = rp->base; +- u32 intr_status; +- int boguscnt = max_interrupt_work; + int handled = 0; + +- while ((intr_status = get_intr_status(dev))) { ++ if ((rp->istat = (get_intr_status(dev) & rp->imask))) { + handled = 1; + + /* Acknowledge all of the current interrupt sources ASAP. */ +- if (intr_status & IntrTxDescRace) ++ if (rp->istat & IntrTxDescRace) + iowrite8(0x08, ioaddr + IntrStatus2); +- iowrite16(intr_status & 0xffff, ioaddr + IntrStatus); ++ iowrite16(rp->istat & 0xffff, ioaddr + IntrStatus); + IOSYNC; + +- if (debug > 4) +- printk(KERN_DEBUG "%s: Interrupt, status %8.8x.\n", +- dev->name, intr_status); ++ if (likely(rp->istat & ((IntrRxDone | IntrRxErr | IntrRxDropped | ++ IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf | ++ IntrTxErrSummary | IntrTxDone)))) { ++ ++ rhine_intr_disable(dev); + +- if (intr_status & (IntrRxDone | IntrRxErr | IntrRxDropped | +- IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf)) +- rhine_rx(dev); +- +- if (intr_status & (IntrTxErrSummary | IntrTxDone)) { +- if (intr_status & IntrTxErrSummary) { +- /* Avoid scavenging before Tx engine turned off */ +- RHINE_WAIT_FOR(!(ioread8(ioaddr+ChipCmd) & CmdTxOn)); +- if (debug > 2 && +- ioread8(ioaddr+ChipCmd) & CmdTxOn) +- printk(KERN_WARNING "%s: " +- "rhine_interrupt() Tx engine" +- "still on.\n", dev->name); +- } +- rhine_tx(dev); ++ if (likely(netif_rx_schedule_prep(dev))) ++ __netif_rx_schedule(dev); + } + + /* Abnormal error summary/uncommon events handlers. */ +- if (intr_status & (IntrPCIErr | IntrLinkChange | ++ if (unlikely(rp->istat & (IntrPCIErr | IntrLinkChange | + IntrStatsMax | IntrTxError | IntrTxAborted | +- IntrTxUnderrun | IntrTxDescRace)) +- rhine_error(dev, intr_status); +- +- if (--boguscnt < 0) { +- printk(KERN_WARNING "%s: Too much work at interrupt, " +- "status=%#8.8x.\n", +- dev->name, intr_status); +- break; +- } ++ IntrTxUnderrun | IntrTxDescRace))) ++ rhine_error(dev); + } + +- if (debug > 3) +- printk(KERN_DEBUG "%s: exiting interrupt, status=%8.8x.\n", +- dev->name, ioread16(ioaddr + IntrStatus)); + return IRQ_RETVAL(handled); + } + + /* This routine is logically part of the interrupt handler, but isolated + for clarity. */ +-static void rhine_tx(struct net_device *dev) ++static int rhine_tx(struct net_device *dev) + { + struct rhine_private *rp = netdev_priv(dev); + int txstatus = 0, entry = rp->dirty_tx % TX_RING_SIZE; ++ void __iomem *ioaddr = rp->base; ++ int done = 0; + +- spin_lock(&rp->lock); ++ /* Avoid scavenging before Tx engine turned off */ ++ RHINE_WAIT_FOR(!(ioread8(ioaddr+ChipCmd) & CmdTxOn)); ++ if (debug > 2 && ++ ioread8(ioaddr+ChipCmd) & CmdTxOn) ++ printk(KERN_WARNING "%s: " ++ "rhine_interrupt() Tx engine" ++ "still on.\n", dev->name); + ++ ++ spin_lock_irq(&rp->lock); + /* find and cleanup dirty tx descriptors */ + while (rp->dirty_tx != rp->cur_tx) { + txstatus = le32_to_cpu(rp->tx_ring[entry].tx_status); +@@ -1462,6 +1490,7 @@ + txstatus & 0xF); + rp->stats.tx_bytes += rp->tx_skbuff[entry]->len; + rp->stats.tx_packets++; ++ done++; + } + /* Free the original skb. */ + if (rp->tx_skbuff_dma[entry]) { +@@ -1470,23 +1499,25 @@ + rp->tx_skbuff[entry]->len, + PCI_DMA_TODEVICE); + } +- dev_kfree_skb_irq(rp->tx_skbuff[entry]); ++ dev_kfree_skb_any(rp->tx_skbuff[entry]); + rp->tx_skbuff[entry] = NULL; + entry = (++rp->dirty_tx) % TX_RING_SIZE; + } ++ spin_unlock_irq(&rp->lock); ++ + if ((rp->cur_tx - rp->dirty_tx) < TX_QUEUE_LEN - 4) + netif_wake_queue(dev); + +- spin_unlock(&rp->lock); ++ return done; + } + + /* This routine is logically part of the interrupt handler, but isolated + for clarity and better register allocation. */ +-static void rhine_rx(struct net_device *dev) ++static int rhine_rx(struct net_device *dev) + { + struct rhine_private *rp = netdev_priv(dev); + int entry = rp->cur_rx % RX_RING_SIZE; +- int boguscnt = rp->dirty_rx + RX_RING_SIZE - rp->cur_rx; ++ int done = 0; + + if (debug > 4) { + printk(KERN_DEBUG "%s: rhine_rx(), entry %d status %8.8x.\n", +@@ -1503,8 +1534,6 @@ + if (debug > 4) + printk(KERN_DEBUG "rhine_rx() status is %8.8x.\n", + desc_status); +- if (--boguscnt < 0) +- break; + if ((desc_status & (RxWholePkt | RxErr)) != RxWholePkt) { + if ((desc_status & RxWholePkt) != RxWholePkt) { + printk(KERN_WARNING "%s: Oversized Ethernet " +@@ -1528,9 +1557,7 @@ + if (desc_status & 0x0004) rp->stats.rx_frame_errors++; + if (desc_status & 0x0002) { + /* this can also be updated outside the interrupt handler */ +- spin_lock(&rp->lock); + rp->stats.rx_crc_errors++; +- spin_unlock(&rp->lock); + } + } + } else { +@@ -1558,6 +1585,7 @@ + rp->rx_buf_sz, + PCI_DMA_FROMDEVICE); + } else { ++ int i; + skb = rp->rx_skbuff[entry]; + if (skb == NULL) { + printk(KERN_ERR "%s: Inconsistent Rx " +@@ -1566,6 +1594,14 @@ + break; + } + rp->rx_skbuff[entry] = NULL; ++ ++ /* align the data to the ip header - should be faster than using rx_copybreak */ ++ for (i = pkt_len - (pkt_len % 4); i >= 0; i -= 4) { ++ put_unaligned(*((u32 *) (skb->data + i)), (u32 *) (skb->data + i + 2)); ++ } ++ skb->data += 2; ++ skb->tail += 2; ++ + skb_put(skb, pkt_len); + pci_unmap_single(rp->pdev, + rp->rx_skbuff_dma[entry], +@@ -1573,10 +1609,11 @@ + PCI_DMA_FROMDEVICE); + } + skb->protocol = eth_type_trans(skb, dev); +- netif_rx(skb); ++ netif_receive_skb(skb); + dev->last_rx = jiffies; + rp->stats.rx_bytes += pkt_len; + rp->stats.rx_packets++; ++ done++; + } + entry = (++rp->cur_rx) % RX_RING_SIZE; + rp->rx_head_desc = &rp->rx_ring[entry]; +@@ -1587,7 +1624,7 @@ + struct sk_buff *skb; + entry = rp->dirty_rx % RX_RING_SIZE; + if (rp->rx_skbuff[entry] == NULL) { +- skb = dev_alloc_skb(rp->rx_buf_sz); ++ skb = dev_alloc_skb(rp->rx_buf_sz + 4); + rp->rx_skbuff[entry] = skb; + if (skb == NULL) + break; /* Better luck next round. */ +@@ -1600,6 +1637,8 @@ + } + rp->rx_ring[entry].rx_status = cpu_to_le32(DescOwn); + } ++ ++ return done; + } + + /* +@@ -1649,11 +1688,11 @@ + + } + +-static void rhine_error(struct net_device *dev, int intr_status) ++static void rhine_error(struct net_device *dev) + { + struct rhine_private *rp = netdev_priv(dev); + void __iomem *ioaddr = rp->base; +- ++ u32 intr_status = rp->istat; + spin_lock(&rp->lock); + + if (intr_status & IntrLinkChange) +@@ -1898,6 +1937,7 @@ + + /* Disable interrupts by clearing the interrupt mask. */ + iowrite16(0x0000, ioaddr + IntrEnable); ++ rp->imask = 0; + + /* Stop the chip's Tx and Rx processes. */ + iowrite16(CmdStop, ioaddr + ChipCmd); +@@ -1912,6 +1952,9 @@ + free_tbufs(dev); + free_ring(dev); + ++ writeb(0x80, ioaddr + 0xa1); ++ pci_set_power_state(rp->pdev, 3); ++ + return 0; + } + +@@ -1941,6 +1984,7 @@ + return; /* Nothing to do for non-WOL adapters */ + + rhine_power_init(dev); ++ netif_poll_disable(dev); + + /* Make sure we use pattern 0, 1 and not 4, 5 */ + if (rp->quirks & rq6patterns) From 7df7b7433402c56c193180a513c9d7a0ebd90b18 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 16 Jun 2006 18:49:39 +0000 Subject: [PATCH 186/757] remove some junk SVN-Revision: 3962 --- openwrt/toolchain/kernel-headers/patches/include.patch | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/openwrt/toolchain/kernel-headers/patches/include.patch b/openwrt/toolchain/kernel-headers/patches/include.patch index 34ecbefba85..1618bbdfd3d 100644 --- a/openwrt/toolchain/kernel-headers/patches/include.patch +++ b/openwrt/toolchain/kernel-headers/patches/include.patch @@ -12759,16 +12759,6 @@ diff -Nur linux-2.4.32/include/linux/capi.h linux-2.4.32.patched/include/linux/c * * CAPI 2.0 Interface for Linux * -diff -Nur linux-2.4.32/include/linux/compile.h linux-2.4.32.patched/include/linux/compile.h ---- linux-2.4.32/include/linux/compile.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.4.32.patched/include/linux/compile.h 2006-03-13 18:56:31.000000000 +0100 -@@ -0,0 +1,6 @@ -+#define UTS_VERSION "#1 Mon Mar 13 18:56:31 CET 2006" -+#define LINUX_COMPILE_TIME "18:56:31" -+#define LINUX_COMPILE_BY "root" -+#define LINUX_COMPILE_HOST "ux-2y02" -+#define LINUX_COMPILE_DOMAIN "inf.fh-bonn-rhein-sieg.de" -+#define LINUX_COMPILER "gcc version 3.4.4 (OpenWrt-2.0)" diff -Nur linux-2.4.32/include/linux/compiler.h linux-2.4.32.patched/include/linux/compiler.h --- linux-2.4.32/include/linux/compiler.h 2004-11-17 12:54:22.000000000 +0100 +++ linux-2.4.32.patched/include/linux/compiler.h 2006-03-13 18:55:55.000000000 +0100 From 5b244391701e4d2fc72a80d90ae98c3baf88ef6a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 16 Jun 2006 21:39:42 +0000 Subject: [PATCH 187/757] use rm -f in package-rebuild and add extra options to the default configure template SVN-Revision: 3965 --- openwrt/package/rules.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 77a6595e82f..37dc2a0ac6f 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -47,7 +47,7 @@ define Build/DefaultTargets rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed package-rebuild: FORCE - @-rm $(PKG_BUILD_DIR)/.built + @-rm -f $(PKG_BUILD_DIR)/.built define Build/DefaultTargets endef @@ -211,8 +211,9 @@ define Build/Prepare endef define Build/Configure/Default - @(cd $(PKG_BUILD_DIR); \ + @(cd $(PKG_BUILD_DIR)/$(3); \ [ -x configure ] && \ + $(2) \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ From a23d25253fbb45c3cdf8f53d1f07eb351eadc69b Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 08:34:53 +0000 Subject: [PATCH 188/757] move fuse from target/linux/package/ to package/, update to v2.5.3, add userland lib, util and dev stuff from trunk. SVN-Revision: 3966 --- openwrt/package/fuse/Makefile | 117 ++++++++++++++++++ .../package/fuse/patches/101-kmod_build.patch | 0 .../package/fuse/patches/102-no_depmod.patch | 15 +++ .../fuse/patches/111-uclibc_changes.patch | 16 +++ .../fuse/patches/112-no_break_on_mknod.patch | 12 ++ openwrt/target/linux/package/fuse/Config.in | 19 --- openwrt/target/linux/package/fuse/Makefile | 80 ------------ .../linux/package/fuse/ipkg/kmod-fuse.control | 4 - 8 files changed, 160 insertions(+), 103 deletions(-) create mode 100644 openwrt/package/fuse/Makefile rename openwrt/{target/linux => }/package/fuse/patches/101-kmod_build.patch (100%) create mode 100644 openwrt/package/fuse/patches/102-no_depmod.patch create mode 100644 openwrt/package/fuse/patches/111-uclibc_changes.patch create mode 100644 openwrt/package/fuse/patches/112-no_break_on_mknod.patch delete mode 100644 openwrt/target/linux/package/fuse/Config.in delete mode 100644 openwrt/target/linux/package/fuse/Makefile delete mode 100644 openwrt/target/linux/package/fuse/ipkg/kmod-fuse.control diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile new file mode 100644 index 00000000000..3b9418703a0 --- /dev/null +++ b/openwrt/package/fuse/Makefile @@ -0,0 +1,117 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=fuse +PKG_VERSION:=2.5.3 +PKG_RELEASE:=1 +PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c + +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(TOPDIR)/package/rules.mk + +define Package/kmod-fuse + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:= + TITLE:=FUSE (Filesystem in UserSpacE) + DESCRIPTION:=FUSE (Filesystem in UserSpacE) + URL:=http://fuse.sourceforge.net/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); \ + rm -rf config.{cache,status} ; \ + touch configure.in ; \ + touch aclocal.m4 ; \ + touch Makefile.in ; \ + touch include/config.h.in ; \ + touch configure ; \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + $(DISABLE_LARGEFILE) \ + $(DISABLE_NLS) \ + --enable-shared \ + --enable-static \ + --disable-rpath \ + --enable-kernel-module \ + --enable-lib \ + --enable-util \ + --disable-example \ + --disable-auto-modprobe \ + --with-kernel=$(LINUX_DIR) \ + --disable-mtab \ + ); +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + PATH="$(TARGET_PATH)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/kmod-fuse/install + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + install -d -m0755 $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/ + install -d -m0755 $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/ +endef + + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse.h $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so* $(STAGING_DIR)/usr/lib/ + mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(SED) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc + $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/fuse \ + $(STAGING_DIR)/usr/include/fuse.h \ + $(STAGING_DIR)/usr/lib/libfuse.a \ + $(STAGING_DIR)/usr/lib/libfuse.so* \ + $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc +endef + + +$(eval $(call BuildPackage,kmod-fuse)) diff --git a/openwrt/target/linux/package/fuse/patches/101-kmod_build.patch b/openwrt/package/fuse/patches/101-kmod_build.patch similarity index 100% rename from openwrt/target/linux/package/fuse/patches/101-kmod_build.patch rename to openwrt/package/fuse/patches/101-kmod_build.patch diff --git a/openwrt/package/fuse/patches/102-no_depmod.patch b/openwrt/package/fuse/patches/102-no_depmod.patch new file mode 100644 index 00000000000..ea9539a2006 --- /dev/null +++ b/openwrt/package/fuse/patches/102-no_depmod.patch @@ -0,0 +1,15 @@ +diff -ruN fuse-2.5.3-old/kernel/Makefile.in fuse-2.5.3-new/kernel/Makefile.in +--- fuse-2.5.3-old/kernel/Makefile.in 2006-06-17 00:04:06.000000000 +0200 ++++ fuse-2.5.3-new/kernel/Makefile.in 2006-06-17 00:08:44.000000000 +0200 +@@ -31,11 +31,9 @@ + install-y: all + $(mkdir_p) $(DESTDIR)$(fusemoduledir) + $(INSTALL) -m 644 $(fusemodule) $(DESTDIR)$(fusemoduledir)/$(fusemodule) +- -/sbin/depmod -a + + uninstall-y: + rm -f $(DESTDIR)$(fusemoduledir)/$(fusemodule) +- -/sbin/depmod -a + + clean: + -rm -f $(fusemodule) *.o .*.cmd *.mod.c *.ko *.s */*.o diff --git a/openwrt/package/fuse/patches/111-uclibc_changes.patch b/openwrt/package/fuse/patches/111-uclibc_changes.patch new file mode 100644 index 00000000000..69730758e67 --- /dev/null +++ b/openwrt/package/fuse/patches/111-uclibc_changes.patch @@ -0,0 +1,16 @@ +diff -ruw fuse-2.4.0/util/fusermount.c.org fuse-2.4.0/util/fusermount.c +--- fuse-2.4.0/util/fusermount.c.org 2005-10-14 11:34:06.000000000 +0200 ++++ fuse-2.4.0/util/fusermount.c 2005-10-14 11:56:26.000000000 +0200 +@@ -42,7 +42,12 @@ + #define FUSE_COMMFD_ENV "_FUSE_COMMFD" + + #define FUSE_DEV_OLD "/proc/fs/fuse/dev" ++#ifdef __UCLIBC__ ++/* /dev is mounted as devfs in OpenWRT, and device is created here */ ++#define FUSE_DEV_NEW "/dev/misc/fuse" ++#else + #define FUSE_DEV_NEW "/dev/fuse" ++#endif + #define FUSE_VERSION_FILE_OLD "/proc/fs/fuse/version" + #define FUSE_CONF "/etc/fuse.conf" + diff --git a/openwrt/package/fuse/patches/112-no_break_on_mknod.patch b/openwrt/package/fuse/patches/112-no_break_on_mknod.patch new file mode 100644 index 00000000000..96ed70f2917 --- /dev/null +++ b/openwrt/package/fuse/patches/112-no_break_on_mknod.patch @@ -0,0 +1,12 @@ +diff -ruN fuse-2.4.1-old/util/Makefile.in fuse-2.4.1-new/util/Makefile.in +--- fuse-2.4.1-old/util/Makefile.in 2005-10-17 12:29:20.000000000 +0200 ++++ fuse-2.4.1-new/util/Makefile.in 2005-10-19 17:11:13.000000000 +0200 +@@ -445,7 +445,7 @@ + install-exec-hook: + -chown root $(DESTDIR)$(bindir)/fusermount + -chmod u+s $(DESTDIR)$(bindir)/fusermount +- @if test ! -e $(DESTDIR)/dev/fuse; then \ ++ -@if test ! -e $(DESTDIR)/dev/fuse; then \ + $(mkdir_p) $(DESTDIR)/dev; \ + echo "mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229"; \ + mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229; \ diff --git a/openwrt/target/linux/package/fuse/Config.in b/openwrt/target/linux/package/fuse/Config.in deleted file mode 100644 index d51229522b0..00000000000 --- a/openwrt/target/linux/package/fuse/Config.in +++ /dev/null @@ -1,19 +0,0 @@ -config PACKAGE_KMOD_FUSE - prompt "kmod-fuse......................... FUSE kernel module" - tristate - default m if DEVEL - help - With FUSE it is possible to implement a fully functional - filesystem in a userspace program. - - Features include: - - * Simple library API - * Simple installation (no need to patch or recompile the kernel) - * Secure implementation - * Userspace - kernel interface is very efficient - * Usable by non privileged users - * Runs on Linux kernels 2.4.X and 2.6.X - * Has proven very stable over time - - http://fuse.sourceforge.net/ diff --git a/openwrt/target/linux/package/fuse/Makefile b/openwrt/target/linux/package/fuse/Makefile deleted file mode 100644 index e9922bcd327..00000000000 --- a/openwrt/target/linux/package/fuse/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=fuse -PKG_VERSION:=2.5.2 -PKG_RELEASE:=1 -PKG_MD5SUM:=ea565debe6c7486963bef05c45c50361 - -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_FUSE,kmod-fuse,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - (cd $(PKG_BUILD_DIR); \ - rm -rf config.{cache,status} ; \ - touch configure.in ; \ - touch aclocal.m4 ; \ - touch Makefile.in ; \ - touch include/config.h.in ; \ - touch configure ; \ - $(TARGET_CONFIGURE_OPTS) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --enable-kernel-module \ - --disable-lib \ - --disable-util \ - --disable-example \ - --disable-auto-modprobe \ - --with-kernel=$(LINUX_DIR) \ - --disable-mtab \ - ); - touch $@ - -$(PKG_BUILD_DIR)/.built: - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - PATH="$(TARGET_PATH)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - SUBDIRS="kernel" \ - all install - touch $@ - -$(IPKG_KMOD_FUSE): - mkdir -p $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_FUSE) $(PACKAGE_DIR) - diff --git a/openwrt/target/linux/package/fuse/ipkg/kmod-fuse.control b/openwrt/target/linux/package/fuse/ipkg/kmod-fuse.control deleted file mode 100644 index 1a9d3220353..00000000000 --- a/openwrt/target/linux/package/fuse/ipkg/kmod-fuse.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-fuse -Priority: optional -Section: sys -Description: Filesystem in Userspace (kernel module) From decebc21a61dcd326a4950276ab63d3f7bc414c3 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 08:58:45 +0000 Subject: [PATCH 189/757] add TARGET_CFLAGS to configure for userland lib and util. SVN-Revision: 3967 --- openwrt/package/fuse/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile index 3b9418703a0..09780e0d383 100644 --- a/openwrt/package/fuse/Makefile +++ b/openwrt/package/fuse/Makefile @@ -36,6 +36,7 @@ define Build/Configure touch include/config.h.in ; \ touch configure ; \ $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ ./configure \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ From 196571c15ffbd5c220e86d9ab9e5e71b5ca8d6fc Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 09:00:59 +0000 Subject: [PATCH 190/757] move mini_fo from target/linux/package/ to package/. SVN-Revision: 3968 --- openwrt/package/mini_fo/Makefile | 47 +++++++++++++++++++ .../mini_fo/patches/101-kmod_build.patch | 0 .../mini_fo/patches/102-mutex_change.patch | 0 .../target/linux/package/mini_fo/Config.in | 6 --- openwrt/target/linux/package/mini_fo/Makefile | 42 ----------------- .../package/mini_fo/ipkg/kmod-mini-fo.control | 4 -- 6 files changed, 47 insertions(+), 52 deletions(-) create mode 100644 openwrt/package/mini_fo/Makefile rename openwrt/{target/linux => }/package/mini_fo/patches/101-kmod_build.patch (100%) rename openwrt/{target/linux => }/package/mini_fo/patches/102-mutex_change.patch (100%) delete mode 100644 openwrt/target/linux/package/mini_fo/Config.in delete mode 100644 openwrt/target/linux/package/mini_fo/Makefile delete mode 100644 openwrt/target/linux/package/mini_fo/ipkg/kmod-mini-fo.control diff --git a/openwrt/package/mini_fo/Makefile b/openwrt/package/mini_fo/Makefile new file mode 100644 index 00000000000..a6319f4f7ee --- /dev/null +++ b/openwrt/package/mini_fo/Makefile @@ -0,0 +1,47 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=mini_fo +PKG_VERSION:=0.6.2pre1 +PKG_RELEASE:=1 +PKG_MD5SUM:=acd12157be25d7b3c8df90914049403e + +PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/ +PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2 +PKG_CAT:=bzcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/mini_fo-0-6-2-pre1 + +include $(TOPDIR)/package/rules.mk + +define Package/kmod-mini-fo + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:= + TITLE:=The mini fanout overlay file system + DESCRIPTION:=The mini fanout overlay file system + URL:=http://www.denx.de/wiki/Know.MiniFOHome + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + PATH="$(TARGET_PATH)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + KERNELVERSION="$(KERNEL)" \ + KERNEL_SRC="$(LINUX_DIR)" \ + all +endef + +define Package/kmod-mini-fo/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/mini_fo.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + install -m0755 -d $(1)/etc/modules.d + echo "mini_fo" > $(1)/etc/modules.d/15-mini-fo +endef + +$(eval $(call BuildPackage,kmod-mini-fo)) diff --git a/openwrt/target/linux/package/mini_fo/patches/101-kmod_build.patch b/openwrt/package/mini_fo/patches/101-kmod_build.patch similarity index 100% rename from openwrt/target/linux/package/mini_fo/patches/101-kmod_build.patch rename to openwrt/package/mini_fo/patches/101-kmod_build.patch diff --git a/openwrt/target/linux/package/mini_fo/patches/102-mutex_change.patch b/openwrt/package/mini_fo/patches/102-mutex_change.patch similarity index 100% rename from openwrt/target/linux/package/mini_fo/patches/102-mutex_change.patch rename to openwrt/package/mini_fo/patches/102-mutex_change.patch diff --git a/openwrt/target/linux/package/mini_fo/Config.in b/openwrt/target/linux/package/mini_fo/Config.in deleted file mode 100644 index a280ff56a8d..00000000000 --- a/openwrt/target/linux/package/mini_fo/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config PACKAGE_KMOD_MINI_FO - prompt "kmod-mini_fo...................... mini fanout overlay file system" - tristate - default m if DEVEL - help - The mini fanout overlay file system. diff --git a/openwrt/target/linux/package/mini_fo/Makefile b/openwrt/target/linux/package/mini_fo/Makefile deleted file mode 100644 index dcd5b91f3af..00000000000 --- a/openwrt/target/linux/package/mini_fo/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME := mini_fo -PKG_VERSION := 0.6.2pre1 -PKG_RELEASE := 1 -PKG_MD5SUM := acd12157be25d7b3c8df90914049403e - -PKG_SOURCE_URL := http://www.denx.de/twiki/pub/Know/MiniFOHome/ -PKG_SOURCE := mini_fo-0-6-2-pre1.tar.bz2 -PKG_CAT := bzcat - -PKG_BUILD_DIR := $(BUILD_DIR)/mini_fo-0-6-2-pre1 -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_MINI_FO,kmod-mini-fo,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - KERNELVERSION="$(KERNEL)" \ - KERNEL_SRC="$(LINUX_DIR)" \ - all - touch $@ - -$(IPKG_KMOD_MINI_FO): - install -m0755 -d $(IDIR_KMOD_MINI_FO)/lib/modules/$(LINUX_VERSION) - install -m0755 -d $(IDIR_KMOD_MINI_FO)/etc/modules.d - $(CP) $(PKG_BUILD_DIR)/mini_fo.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_MINI_FO)/lib/modules/$(LINUX_VERSION)/ - echo "mini_fo" > $(IDIR_KMOD_MINI_FO)/etc/modules.d/15-mini-fo - $(IPKG_BUILD) $(IDIR_KMOD_MINI_FO) $(PACKAGE_DIR) - diff --git a/openwrt/target/linux/package/mini_fo/ipkg/kmod-mini-fo.control b/openwrt/target/linux/package/mini_fo/ipkg/kmod-mini-fo.control deleted file mode 100644 index 9ccdc5fa793..00000000000 --- a/openwrt/target/linux/package/mini_fo/ipkg/kmod-mini-fo.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-mini-fo -Priority: optional -Section: sys -Description: mini fanout overlay file system From cd3cb0bc458a48ba3ced89ea530dc833c539a4bc Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 09:28:39 +0000 Subject: [PATCH 191/757] move hostap from target/linux/package/ to package/, update to v0.4.9. SVN-Revision: 3969 --- openwrt/package/hostap/Makefile | 92 +++++++++++++++++++ openwrt/target/linux/package/hostap/Config.in | 40 -------- openwrt/target/linux/package/hostap/Makefile | 58 ------------ .../hostap/ipkg/kmod-hostap-pci.control | 5 - .../hostap/ipkg/kmod-hostap-plx.control | 5 - .../package/hostap/ipkg/kmod-hostap.control | 4 - 6 files changed, 92 insertions(+), 112 deletions(-) create mode 100644 openwrt/package/hostap/Makefile delete mode 100644 openwrt/target/linux/package/hostap/Config.in delete mode 100644 openwrt/target/linux/package/hostap/Makefile delete mode 100644 openwrt/target/linux/package/hostap/ipkg/kmod-hostap-pci.control delete mode 100644 openwrt/target/linux/package/hostap/ipkg/kmod-hostap-plx.control delete mode 100644 openwrt/target/linux/package/hostap/ipkg/kmod-hostap.control diff --git a/openwrt/package/hostap/Makefile b/openwrt/package/hostap/Makefile new file mode 100644 index 00000000000..b546c0b2557 --- /dev/null +++ b/openwrt/package/hostap/Makefile @@ -0,0 +1,92 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=hostap-driver +PKG_VERSION:=0.4.9 +PKG_RELEASE:=1 +PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378 + +PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(TOPDIR)/package/rules.mk + +define Package/kmod-hostap + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@LINUX_2_4_BRCM||LINUX_2_4_X86 + TITLE:=Host AP support for Prism2/2.5/3 IEEE 802.11b + DESCRIPTION:=Host AP support for Prism2/2.5/3 IEEE 802.11b \\\ +A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3 \\\ +chipset. This driver supports so called Host AP mode that allows the card \\\ +to act as an IEEE 802.11 access point. \\\ +\\\ +This option includes the base Host AP driver code that is shared by \\\ +different hardware models. You will also need to enable support for \\\ +PLX/PCI/CS version of the driver to actually use the driver. \\\ + URL:=http://hostap.epitest.fi/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Package/kmod-hostap-pci + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=kmod-hostap + TITLE:=Host AP driver for Prism2.5 PCI adaptors + DESCRIPTION:=Host AP driver for Prism2.5 PCI adaptors + URL:=http://hostap.epitest.fi/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Package/kmod-hostap-plx + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=kmod-hostap + TITLE:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors + DESCRIPTION:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors + URL:=http://hostap.epitest.fi/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + + +define Build/Compile + $(MAKE) -C $(LINUX_DIR)/ \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \ + modules +endef + +define Package/kmod-hostap/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) \ + $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +define Package/kmod-hostap-pci/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) \ + $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +define Package/kmod-hostap-plx/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) \ + $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +$(eval $(call BuildPackage,kmod-hostap)) +$(eval $(call BuildPackage,kmod-hostap-pci)) +$(eval $(call BuildPackage,kmod-hostap-plx)) diff --git a/openwrt/target/linux/package/hostap/Config.in b/openwrt/target/linux/package/hostap/Config.in deleted file mode 100644 index 39b49d4c4bd..00000000000 --- a/openwrt/target/linux/package/hostap/Config.in +++ /dev/null @@ -1,40 +0,0 @@ -config PACKAGE_KMOD_HOSTAP - prompt "kmod-hostap....................... Host AP support for Prism2/2.5/3 IEEE 802.11b" - tristate - depends LINUX_2_4_X86 || LINUX_2_4_BRCM - default m if DEVEL - help - A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3 - chipset. This driver supports so called Host AP mode that allows - the card to act as an IEEE 802.11 access point. - - This option includes the base Host AP driver code that is shared by - different hardware models. You will also need to enable support for - PLX/PCI/CS version of the driver to actually use the driver. - - http://hostap.epitest.fi/ - -config PACKAGE_KMOD_HOSTAP_PCI - prompt "kmod-hostap-pci................. Host AP driver for Prism2.5 PCI adaptors" - tristate - default m if DEVEL - depends PACKAGE_KMOD_HOSTAP - help - Host AP support for Prism2/2.5/3 IEEE 802.11b" is required for this - driver and its help text includes more information about the Host AP - driver. - - http://hostap.epitest.fi/ - -config PACKAGE_KMOD_HOSTAP_PLX - prompt "kmod-hostap-plx................. Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors" - tristate - default m if DEVEL - depends PACKAGE_KMOD_HOSTAP - help - Host AP support for Prism2/2.5/3 IEEE 802.11b" is required for this - driver and its help text includes more information about the Host AP - driver. - - http://hostap.epitest.fi/ - diff --git a/openwrt/target/linux/package/hostap/Makefile b/openwrt/target/linux/package/hostap/Makefile deleted file mode 100644 index 3e8e604984f..00000000000 --- a/openwrt/target/linux/package/hostap/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=hostap-driver -PKG_VERSION:=0.4.7 -PKG_RELEASE:=1 -PKG_MD5SUM:=ee495686cf27011b4e401963c2c7f62a - -PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_HOSTAP,kmod-hostap,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) -$(eval $(call PKG_template,KMOD_HOSTAP_PCI,kmod-hostap-pci,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) -$(eval $(call PKG_template,KMOD_HOSTAP_PLX,kmod-hostap-plx,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(LINUX_DIR)/ \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \ - modules - touch $@ - -$(IPKG_KMOD_HOSTAP): - install -m0755 -d $(IDIR_KMOD_HOSTAP)/lib/modules/$(LINUX_VERSION) - $(CP) \ - $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_HOSTAP)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_HOSTAP) $(PACKAGE_DIR) - -$(IPKG_KMOD_HOSTAP_PCI): - install -m0755 -d $(IDIR_KMOD_HOSTAP_PCI)/lib/modules/$(LINUX_VERSION) - $(CP) \ - $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_HOSTAP_PCI)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_HOSTAP_PCI) $(PACKAGE_DIR) - -$(IPKG_KMOD_HOSTAP_PLX): - install -m0755 -d $(IDIR_KMOD_HOSTAP_PLX)/lib/modules/$(LINUX_VERSION) - $(CP) \ - $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_HOSTAP_PLX)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_HOSTAP_PLX) $(PACKAGE_DIR) - diff --git a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-pci.control b/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-pci.control deleted file mode 100644 index 3c3cdf82569..00000000000 --- a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-pci.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: kmod-hostap-pci -Priority: optional -Section: net -Depends: kmod-hostap -Description: Host AP driver for Prism2.5 PCI adaptors diff --git a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-plx.control b/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-plx.control deleted file mode 100644 index 6e039b83452..00000000000 --- a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-plx.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: kmod-hostap-plx -Priority: optional -Section: net -Depends: kmod-hostap -Description: Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors diff --git a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap.control b/openwrt/target/linux/package/hostap/ipkg/kmod-hostap.control deleted file mode 100644 index e5efb4e7f95..00000000000 --- a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-hostap -Priority: optional -Section: net -Description: Host AP support for Prism2/2.5/3 IEEE 802.11b From ab5540228b9bae9c677bb3f146c5181e3aab7e5b Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 09:43:57 +0000 Subject: [PATCH 192/757] move shfs from target/linux/package/ to package/. SVN-Revision: 3970 --- .../{target/linux => }/package/shfs/Makefile | 32 ++++++++++++------- .../package/shfs/patches/101-kmod_build.patch | 0 .../package/shfs/patches/102-gcc4_fix.patch | 0 .../package/shfs/patches/103-dentry.patch | 0 openwrt/target/linux/package/shfs/Config.in | 22 ------------- .../linux/package/shfs/ipkg/kmod-shfs.control | 4 --- 6 files changed, 21 insertions(+), 37 deletions(-) rename openwrt/{target/linux => }/package/shfs/Makefile (51%) rename openwrt/{target/linux => }/package/shfs/patches/101-kmod_build.patch (100%) rename openwrt/{target/linux => }/package/shfs/patches/102-gcc4_fix.patch (100%) rename openwrt/{target/linux => }/package/shfs/patches/103-dentry.patch (100%) delete mode 100644 openwrt/target/linux/package/shfs/Config.in delete mode 100644 openwrt/target/linux/package/shfs/ipkg/kmod-shfs.control diff --git a/openwrt/target/linux/package/shfs/Makefile b/openwrt/package/shfs/Makefile similarity index 51% rename from openwrt/target/linux/package/shfs/Makefile rename to openwrt/package/shfs/Makefile index 4625bdb12e1..dacbf8d75f5 100644 --- a/openwrt/target/linux/package/shfs/Makefile +++ b/openwrt/package/shfs/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include ../../rules.mk +include $(TOPDIR)/package/kernel.mk PKG_NAME:=shfs PKG_VERSION:=0.35 @@ -17,12 +17,21 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,KMOD_SHFS,kmod-shfs,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) +define Package/kmod-shfs + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:= + TITLE:=Shell FileSystem (ShFS) + DESCRIPTION:=Shell FileSystem (ShFS) \\\ +ShFS is a simple and easy to use Linux kernel module which allows you to \\\ +mount remote filesystems using a plain shell (SSH) connection. When using \\\ +ShFS, you can access all remote files just like the local ones, only the \\\ +access is governed through the transport security of SSH. + URL:=http://shfs.sourceforge.net/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: +define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -36,11 +45,12 @@ $(PKG_BUILD_DIR)/.built: KERNEL_SOURCES="$(LINUX_DIR)" \ ROOT="$(PKG_INSTALL_DIR)" \ module module-install - touch $@ +endef -$(IPKG_KMOD_SHFS): - install -m0755 -d $(IDIR_KMOD_SHFS)/lib/modules/$(LINUX_VERSION) +define Package/kmod-shfs/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_SHFS)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_SHFS) $(PACKAGE_DIR) + $(1)/lib/modules/$(LINUX_VERSION)/ +endef +$(eval $(call BuildPackage,kmod-shfs)) diff --git a/openwrt/target/linux/package/shfs/patches/101-kmod_build.patch b/openwrt/package/shfs/patches/101-kmod_build.patch similarity index 100% rename from openwrt/target/linux/package/shfs/patches/101-kmod_build.patch rename to openwrt/package/shfs/patches/101-kmod_build.patch diff --git a/openwrt/target/linux/package/shfs/patches/102-gcc4_fix.patch b/openwrt/package/shfs/patches/102-gcc4_fix.patch similarity index 100% rename from openwrt/target/linux/package/shfs/patches/102-gcc4_fix.patch rename to openwrt/package/shfs/patches/102-gcc4_fix.patch diff --git a/openwrt/target/linux/package/shfs/patches/103-dentry.patch b/openwrt/package/shfs/patches/103-dentry.patch similarity index 100% rename from openwrt/target/linux/package/shfs/patches/103-dentry.patch rename to openwrt/package/shfs/patches/103-dentry.patch diff --git a/openwrt/target/linux/package/shfs/Config.in b/openwrt/target/linux/package/shfs/Config.in deleted file mode 100644 index 71cc327073a..00000000000 --- a/openwrt/target/linux/package/shfs/Config.in +++ /dev/null @@ -1,22 +0,0 @@ -config PACKAGE_KMOD_SHFS - prompt "kmod-shfs......................... Shell FileSystem kernel module (ShFS) kernel module" - tristate - default m if DEVEL - help - ShFS is a simple and easy to use Linux kernel module which - allows you to mount remote filesystems using a plain shell - (SSH) connection. When using ShFS, you can access all remote - files just like the local ones, only the access is governed - through the transport security of SSH. - - ShFS supports some nice features: - - * file cache for access speedup - * perl and shell code for the remote (server) side - * could preserve uid/gid (root connection) - * number of remote host platforms (Linux, Solaris, Cygwin, ...) - * Linux kernel 2.4.10+ and 2.6 - * arbitrary command used for connection (instead of SSH) - * persistent connection (reconnect after SSH dies) - - http://shfs.sourceforge.net/ diff --git a/openwrt/target/linux/package/shfs/ipkg/kmod-shfs.control b/openwrt/target/linux/package/shfs/ipkg/kmod-shfs.control deleted file mode 100644 index 240efe60be4..00000000000 --- a/openwrt/target/linux/package/shfs/ipkg/kmod-shfs.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-shfs -Priority: optional -Section: sys -Description: SHell FileSystem Linux kernel module From eab0a7d91ec090b7a28465d083a79485c2936292 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sat, 17 Jun 2006 09:51:55 +0000 Subject: [PATCH 193/757] obsolete file SVN-Revision: 3971 --- .../base-files/brcm-2.4/etc/init.d/S04nvram | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100755 openwrt/package/base-files/brcm-2.4/etc/init.d/S04nvram diff --git a/openwrt/package/base-files/brcm-2.4/etc/init.d/S04nvram b/openwrt/package/base-files/brcm-2.4/etc/init.d/S04nvram deleted file mode 100755 index 4de124735bf..00000000000 --- a/openwrt/package/base-files/brcm-2.4/etc/init.d/S04nvram +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# NVRAM setup -# -# This file handles the NVRAM quirks of various hardware. - -# WGT634u -grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit - -alias debug=${DEBUG:-:} - -nvram_default() { - [ -z "$(nvram get $1)" ] && nvram set "$1=$2" -} - -nvram_set() { # for the linksys fixup part - [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { - COMMIT=1 - /usr/sbin/nvram set "$1=$2" - } -} - -# work around braindead CFE defaults in linksys routers -boardtype=$(nvram get boardtype) -boardnum=$(nvram get boardnum) -boardflags=$(($(nvram get boardflags))) -adm_switch="$(( ($boardflags & 0x80) >> 7 ))" - -case "$(( $boardtype ))" in - "1800") #0x708 - if [ "$adm_switch" = 0 ]; then - nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" - [ "$COMMIT" = 1 ] && { - nvram_set sdram_config 0x0062 - nvram_set clkfreq 216 - nvram_set sdram_ncdl 0x0 - nvram_set pa0itssit 62 - nvram_set pa0b0 0x15eb - nvram_set pa0b1 0xfa82 - nvram_set pa0b2 0xfe66 - nvram_set pa0maxpwr 0x4e - } - fi - ;; - "1127") #0x467 - nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" - [ "$COMMIT" = 1 ] && { - nvram_set sdram_config 0x0062 - nvram_set sdram_ncdl 0x0 - nvram_set pa0itssit 62 - nvram_set pa0b0 0x168b - nvram_set pa0b1 0xfabf - nvram_set pa0b2 0xfeaf - nvram_set pa0maxpwr 0x4e - } - ;; -esac -[ "$COMMIT" = "1" ] && nvram commit - -# hack for some motorola routers -nvram unset wl0gpio0 - -[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { - # if default wifi mac, set two higher than the lan mac - nvram set il0macaddr=$(nvram get et0macaddr| - awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') -} From dba6c32580474c30ec3853f92ce9f97e25628fe3 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 10:21:41 +0000 Subject: [PATCH 194/757] move spca5xx from target/linux/package/ to package/, dependency on kmod-usb-core & kmod-videodev packages needs fixing. SVN-Revision: 3972 --- openwrt/package/spca5xx/Makefile | 45 +++++++++++++++++++ .../spca5xx/patches/01-kmod-build.patch | 0 .../target/linux/package/spca5xx/Config.in | 9 ---- openwrt/target/linux/package/spca5xx/Makefile | 40 ----------------- .../package/spca5xx/ipkg/kmod-spca5xx.control | 5 --- 5 files changed, 45 insertions(+), 54 deletions(-) create mode 100644 openwrt/package/spca5xx/Makefile rename openwrt/{target/linux => }/package/spca5xx/patches/01-kmod-build.patch (100%) delete mode 100644 openwrt/target/linux/package/spca5xx/Config.in delete mode 100644 openwrt/target/linux/package/spca5xx/Makefile delete mode 100644 openwrt/target/linux/package/spca5xx/ipkg/kmod-spca5xx.control diff --git a/openwrt/package/spca5xx/Makefile b/openwrt/package/spca5xx/Makefile new file mode 100644 index 00000000000..0a84d980c94 --- /dev/null +++ b/openwrt/package/spca5xx/Makefile @@ -0,0 +1,45 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=spca5xx +PKG_VERSION:=20060301 +PKG_RELEASE:=1 +PKG_MD5SUM:=4160e03c408ac254111febacf058b88a + +PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(TOPDIR)/package/rules.mk + +#FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages +define Package/kmod-spca5xx + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@PACKAGE_KMOD_USB&&PACKAGE_KMOD_VIDEODEV + TITLE:=Driver for SPCA5xx based USB cameras + DESCRIPTION:=Driver for SPCA5xx based USB cameras + URL:=http://mxhaard.free.fr/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Build/Compile + $(MAKE) -C $(LINUX_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + KERNELVERSION="$(KERNEL)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + modules +endef + +define Package/kmod-spca5xx/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/spca5xx.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +$(eval $(call BuildPackage,kmod-spca5xx)) diff --git a/openwrt/target/linux/package/spca5xx/patches/01-kmod-build.patch b/openwrt/package/spca5xx/patches/01-kmod-build.patch similarity index 100% rename from openwrt/target/linux/package/spca5xx/patches/01-kmod-build.patch rename to openwrt/package/spca5xx/patches/01-kmod-build.patch diff --git a/openwrt/target/linux/package/spca5xx/Config.in b/openwrt/target/linux/package/spca5xx/Config.in deleted file mode 100644 index 729e6b00944..00000000000 --- a/openwrt/target/linux/package/spca5xx/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config PACKAGE_KMOD_SPCA5XX - prompt "kmod-spca5xx...................... Kernel driver for SPCA5XX based USB cameras" - tristate - default m if DEVEL - help - Kernel driver for SPCA5XX based USB cameras - - http://mxhaard.free.fr/ - diff --git a/openwrt/target/linux/package/spca5xx/Makefile b/openwrt/target/linux/package/spca5xx/Makefile deleted file mode 100644 index fa2605df25e..00000000000 --- a/openwrt/target/linux/package/spca5xx/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=spca5xx -PKG_VERSION:=20060301 -PKG_RELEASE:=1 -PKG_MD5SUM:=4160e03c408ac254111febacf058b88a - -PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_SPCA5XX,kmod-spca5xx,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(LINUX_DIR) \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - KERNELVERSION="$(KERNEL)" \ - SUBDIRS="$(PKG_BUILD_DIR)" \ - modules - touch $@ - -$(IPKG_KMOD_SPCA5XX): - install -m0755 -d $(IDIR_KMOD_SPCA5XX)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/spca5xx.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_SPCA5XX)/lib/modules/$(LINUX_VERSION)/ - $(RSTRIP_KMOD) $(IDIR_KMOD_SPCA5XX) - $(IPKG_BUILD) $(IDIR_KMOD_SPCA5XX) $(PACKAGE_DIR) - diff --git a/openwrt/target/linux/package/spca5xx/ipkg/kmod-spca5xx.control b/openwrt/target/linux/package/spca5xx/ipkg/kmod-spca5xx.control deleted file mode 100644 index 1563eb4566c..00000000000 --- a/openwrt/target/linux/package/spca5xx/ipkg/kmod-spca5xx.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: kmod-spca5xx -Priority: optional -Section: sys -Depends: kmod-videodev, kmod-usb-core -Description: Kernel driver for SPCA5XX based USB cameras From 4f1a0ec18e10a5ec02354e43584123821dc4a9ee Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 14:46:26 +0000 Subject: [PATCH 195/757] move zd1211 from target/linux/package/ to package/. SVN-Revision: 3973 --- openwrt/package/zd1211/Makefile | 57 +++++++++++++++++++ openwrt/target/linux/package/zd1211/Config.in | 11 ---- openwrt/target/linux/package/zd1211/Makefile | 49 ---------------- .../package/zd1211/ipkg/kmod-zd1211.control | 4 -- 4 files changed, 57 insertions(+), 64 deletions(-) create mode 100644 openwrt/package/zd1211/Makefile delete mode 100644 openwrt/target/linux/package/zd1211/Config.in delete mode 100644 openwrt/target/linux/package/zd1211/Makefile delete mode 100644 openwrt/target/linux/package/zd1211/ipkg/kmod-zd1211.control diff --git a/openwrt/package/zd1211/Makefile b/openwrt/package/zd1211/Makefile new file mode 100644 index 00000000000..e73c0dc5221 --- /dev/null +++ b/openwrt/package/zd1211/Makefile @@ -0,0 +1,57 @@ +# $Id: Makefile 3297 2006-03-02 23:42:52Z florian $ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=zd1211 +PKG_VERSION:=r69 +PKG_RELEASE:=1 +PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a + +PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ +PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) + +include $(TOPDIR)/package/rules.mk + +define Package/kmod-zd1211 + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@LINUX_2_6 + TITLE:=Driver for Zydas 1211 based USB devices + DESCRIPTION:=Driver for Zydas 1211 based USB devices \\\ +Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip.\\\ +Initially contributed by ZyDAS, this driver is actively maintained by the \\\ +open source community. + URL:=http://zd1211.ath.cx/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" \ + CPP="$(TARGET_CC)" \ + LD="$(TARGET_CROSS)ld" \ + STAGING_DIR=$(STAGING_DIR) \ + KERNELVERSION="$(KERNEL)" \ + KERNEL_SOURCE="$(LINUX_DIR)" \ + KDIR="$(LINUX_DIR)" \ + all + $(TARGET_CC) $(PKG_BUILD_DIR)/apdbg.c -o $(PKG_BUILD_DIR)/apdbg +endef + +define Package/kmod-zd1211/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/zd1211.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + install -m0755 -d $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/apdbg $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/sta $(1)/usr/sbin/$(PKG_NAME)-sta +endef + +$(eval $(call BuildPackage,kmod-zd1211)) + diff --git a/openwrt/target/linux/package/zd1211/Config.in b/openwrt/target/linux/package/zd1211/Config.in deleted file mode 100644 index cadfa4f5dd8..00000000000 --- a/openwrt/target/linux/package/zd1211/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config PACKAGE_KMOD_ZD1211 - prompt "kmod-zd12111...................... Driver for Zydas 1211 based devices" - tristate - depends LINUX_2_6 - default m if DEVEL - help - Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip. - Initially contributed by ZyDAS, this driver is actively maintained - by the open source community. - - http://zd1211.ath.cx/ diff --git a/openwrt/target/linux/package/zd1211/Makefile b/openwrt/target/linux/package/zd1211/Makefile deleted file mode 100644 index e357af768e8..00000000000 --- a/openwrt/target/linux/package/zd1211/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# $Id: Makefile 3297 2006-03-02 23:42:52Z florian $ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=zd1211 -PKG_VERSION:=r69 -PKG_RELEASE:=1 -PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a - -PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ -PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_ZD1211,kmod-$(PKG_NAME),$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - CC="$(TARGET_CC)" \ - CPP="$(TARGET_CC)" \ - LD="$(TARGET_CROSS)ld" \ - STAGING_DIR=$(STAGING_DIR) \ - KERNELVERSION="$(KERNEL)" \ - MODPATH="$(MODULES_DIR)" \ - KERNEL_SOURCE="$(LINUX_DIR)" \ - all - $(TARGET_CC) $(PKG_BUILD_DIR)/apdbg.c -o $(PKG_BUILD_DIR)/apdbg - touch $@ - -$(IPKG_KMOD_ZD1211): - install -m0755 -d $(IDIR_KMOD_ZD1211)/lib/modules/$(LINUX_VERSION) \ - $(IDIR_KMOD_ZD1211)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/zd1211.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_ZD1211)/lib/modules/$(LINUX_VERSION)/ - $(CP) $(PKG_BUILD_DIR)/apdbg $(IDIR_KMOD_ZD1211)/usr/sbin/ - $(CP) $(PKG_BUILD_DIR)/sta $(IDIR_KMOD_ZD1211)/usr/sbin/$(PKG_NAME)-sta - $(RSTRIP_KMOD) $(IDIR_KMOD_ZD1211) - $(IPKG_BUILD) $(IDIR_KMOD_ZD1211) $(PACKAGE_DIR) - diff --git a/openwrt/target/linux/package/zd1211/ipkg/kmod-zd1211.control b/openwrt/target/linux/package/zd1211/ipkg/kmod-zd1211.control deleted file mode 100644 index 314fc91650d..00000000000 --- a/openwrt/target/linux/package/zd1211/ipkg/kmod-zd1211.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-zd1211 -Section: net -Description: Driver for Zydas 1211 based devices. -Priority: optional From 989d7358ba17bbece31b30c0fccedaba07c944da Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 15:16:21 +0000 Subject: [PATCH 196/757] move openswan from target/linux/package to package/. SVN-Revision: 3974 --- openwrt/package/openswan/Makefile | 48 +++++++++++++++++++ .../openswan/patches/101-arp_header.patch | 0 .../target/linux/package/openswan/Config.in | 10 ---- .../target/linux/package/openswan/Makefile | 36 -------------- .../openswan/ipkg/kmod-openswan.control | 4 -- 5 files changed, 48 insertions(+), 50 deletions(-) create mode 100644 openwrt/package/openswan/Makefile rename openwrt/{target/linux => }/package/openswan/patches/101-arp_header.patch (100%) delete mode 100644 openwrt/target/linux/package/openswan/Config.in delete mode 100644 openwrt/target/linux/package/openswan/Makefile delete mode 100644 openwrt/target/linux/package/openswan/ipkg/kmod-openswan.control diff --git a/openwrt/package/openswan/Makefile b/openwrt/package/openswan/Makefile new file mode 100644 index 00000000000..1f41ccff916 --- /dev/null +++ b/openwrt/package/openswan/Makefile @@ -0,0 +1,48 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=openswan +PKG_VERSION:=2.4.5 +PKG_RELEASE:=1 +PKG_MD5SUM:=a9a8e88313faceebfc5ceb1a9da9a3c4 + +PKG_SOURCE_URL:=http://www.openswan.org/download +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(TOPDIR)/package/rules.mk + +define Package/kmod-openswan + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:= + TITLE:=Openswan kernel module + DESCRIPTION:=Openswan kernel module \\\ +Openswan is an implementation of IPsec for Linux. + URL:=http://www.openswan.org/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + LINUX_RELEASE="$(LINUX_RELEASE)" \ + KERNELSRC="$(LINUX_DIR)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + USERCOMPILE="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib " \ + AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \ + module +endef + +define Package/kmod-openswan/install + mkdir -p $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +$(eval $(call BuildPackage,kmod-openswan)) diff --git a/openwrt/target/linux/package/openswan/patches/101-arp_header.patch b/openwrt/package/openswan/patches/101-arp_header.patch similarity index 100% rename from openwrt/target/linux/package/openswan/patches/101-arp_header.patch rename to openwrt/package/openswan/patches/101-arp_header.patch diff --git a/openwrt/target/linux/package/openswan/Config.in b/openwrt/target/linux/package/openswan/Config.in deleted file mode 100644 index faf0f8f4a61..00000000000 --- a/openwrt/target/linux/package/openswan/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config PACKAGE_KMOD_OPENSWAN - prompt "kmod-openswan..................... Openswan kernel module" - tristate - default m if DEVEL - help - Openswan is an implementation of IPsec for Linux. - - http://www.openswan.org/ - - This package contains the Openswan IPSec module for the kernel diff --git a/openwrt/target/linux/package/openswan/Makefile b/openwrt/target/linux/package/openswan/Makefile deleted file mode 100644 index 0a8289525b0..00000000000 --- a/openwrt/target/linux/package/openswan/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=openswan -PKG_VERSION:=2.4.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=a9a8e88313faceebfc5ceb1a9da9a3c4 - -PKG_SOURCE_URL:=http://www.openswan.org/download -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=zcat - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_OPENSWAN,kmod-openswan,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -FLAGS := $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - LINUX_RELEASE="$(LINUX_RELEASE)" \ - KERNELSRC="$(LINUX_DIR)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - USERCOMPILE="$(FLAGS)" \ - AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \ - module - -$(IPKG_KMOD_OPENSWAN): - mkdir -p $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_OPENSWAN) $(PACKAGE_DIR) diff --git a/openwrt/target/linux/package/openswan/ipkg/kmod-openswan.control b/openwrt/target/linux/package/openswan/ipkg/kmod-openswan.control deleted file mode 100644 index f06c80cda5a..00000000000 --- a/openwrt/target/linux/package/openswan/ipkg/kmod-openswan.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-openswan -Priority: optional -Section: net -Description: Openswan IPSec kernel module From 158e2ea133d5c97badc82f9d7e78ea03d3cd8db3 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 16:56:12 +0000 Subject: [PATCH 197/757] move diag from target/linux/package/ to package/. SVN-Revision: 3976 --- .../{target/linux => }/package/diag/Makefile | 32 +++++++++++-------- .../linux => }/package/diag/diag_led.c | 0 openwrt/target/linux/package/diag/Config.in | 7 ---- .../linux/package/diag/ipkg/kmod-diag.control | 4 --- 4 files changed, 19 insertions(+), 24 deletions(-) rename openwrt/{target/linux => }/package/diag/Makefile (56%) rename openwrt/{target/linux => }/package/diag/diag_led.c (100%) delete mode 100644 openwrt/target/linux/package/diag/Config.in delete mode 100644 openwrt/target/linux/package/diag/ipkg/kmod-diag.control diff --git a/openwrt/target/linux/package/diag/Makefile b/openwrt/package/diag/Makefile similarity index 56% rename from openwrt/target/linux/package/diag/Makefile rename to openwrt/package/diag/Makefile index 3329ee98525..d6aa4bf1708 100644 --- a/openwrt/target/linux/package/diag/Makefile +++ b/openwrt/package/diag/Makefile @@ -1,8 +1,7 @@ -# Makefile for the diag module -# # $Id$ include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk PKG_NAME := kmod-diag PKG_RELEASE := 1 @@ -10,22 +9,29 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,KMOD_DIAG,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - DIAG_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \ -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \ -Wa,-mips32 -Wa,--trap -Wstrict-prototypes -Wno-trigraphs -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -nostdinc \ -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -c -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DBCMDRIVER -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ +define Package/kmod-diag + SECTION:=drivers + CATEGORY:=Drivers + DEFAULT:=y + DEPENDS:=@LINUX_2_4_BRCM + TITLE:=Driver for router LEDs and Buttons + DESCRIPTION:=Driver for router LEDs and Buttons + URL:= + VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef -$(PKG_BUILD_DIR)/.built: +define Build/Compile $(TARGET_CC) $(DIAG_FLAGS) -o $(PKG_BUILD_DIR)/diag.o diag_led.c - touch $@ +endef -$(IPKG_KMOD_DIAG): - mkdir -p $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/diag.o $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_DIAG) $(PACKAGE_DIR) +define Package/kmod-diag/install + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/diag.o $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +$(eval $(call BuildPackage,kmod-diag)) diff --git a/openwrt/target/linux/package/diag/diag_led.c b/openwrt/package/diag/diag_led.c similarity index 100% rename from openwrt/target/linux/package/diag/diag_led.c rename to openwrt/package/diag/diag_led.c diff --git a/openwrt/target/linux/package/diag/Config.in b/openwrt/target/linux/package/diag/Config.in deleted file mode 100644 index 80cba50cf2d..00000000000 --- a/openwrt/target/linux/package/diag/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config PACKAGE_KMOD_DIAG - prompt "kmod-diag......................... Driver for router LEDs and Buttons" - tristate - depends LINUX_2_4_BRCM - default y - help - Driver for router LEDs and Buttons diff --git a/openwrt/target/linux/package/diag/ipkg/kmod-diag.control b/openwrt/target/linux/package/diag/ipkg/kmod-diag.control deleted file mode 100644 index 9c93926b3a5..00000000000 --- a/openwrt/target/linux/package/diag/ipkg/kmod-diag.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-diag -Priority: essential -Section: sys -Description: Driver for Router LEDs and Buttons From d374d691d6bb528a75c193c2185f7673e7743de0 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 17 Jun 2006 18:47:54 +0000 Subject: [PATCH 198/757] move ueagle-atm from target/linux/package/ to package/. SVN-Revision: 3977 --- .../linux => }/package/ueagle-atm/Makefile | 35 ++++++++++++------- .../ueagle-atm/files/ueagle-atm.modules | 0 .../ueagle-atm/patches/100-compile_fix.patch | 0 .../target/linux/package/ueagle-atm/Config.in | 10 ------ .../ueagle-atm/ipkg/kmod-ueagle-atm.control | 5 --- 5 files changed, 22 insertions(+), 28 deletions(-) rename openwrt/{target/linux => }/package/ueagle-atm/Makefile (50%) rename openwrt/{target/linux => }/package/ueagle-atm/files/ueagle-atm.modules (100%) rename openwrt/{target/linux => }/package/ueagle-atm/patches/100-compile_fix.patch (100%) delete mode 100644 openwrt/target/linux/package/ueagle-atm/Config.in delete mode 100644 openwrt/target/linux/package/ueagle-atm/ipkg/kmod-ueagle-atm.control diff --git a/openwrt/target/linux/package/ueagle-atm/Makefile b/openwrt/package/ueagle-atm/Makefile similarity index 50% rename from openwrt/target/linux/package/ueagle-atm/Makefile rename to openwrt/package/ueagle-atm/Makefile index 3872727f595..630bcf74b67 100644 --- a/openwrt/target/linux/package/ueagle-atm/Makefile +++ b/openwrt/package/ueagle-atm/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $ include $(TOPDIR)/rules.mk -include ../../rules.mk +include $(TOPDIR)/package/kernel.mk PKG_NAME:=ueagle-atm PKG_VERSION:=1.0d1 @@ -17,26 +17,35 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk -$(eval $(call PKG_template,KMOD_UEAGLE_ATM,kmod-ueagle-atm,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(LINUX_RELEASE)))) +#FIXME: add dependency on kmod-usb-core +define Package/kmod-ueagle-atm + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@LINUX_2_6_BRCM + TITLE:=Driver for Eagle 8051 based USB ADSL modems + DESCRIPTION:=Driver for Eagle 8051 based USB ADSL modems + URL:=http://www.eagle-usb.org/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: +define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ TARGET="$(HAL_TARGET)" \ KERNELDIR="$(LINUX_DIR)" \ all - touch $@ +endef -$(IPKG_KMOD_UEAGLE_ATM): - install -m0755 -d $(IDIR_KMOD_UEAGLE_ATM)/lib/modules/$(LINUX_VERSION) $(IDIR_KMOD_UEAGLE_ATM)/etc/modules.d - install -m0644 ./files/$(PKG_NAME).modules $(IDIR_KMOD_UEAGLE_ATM)/etc/modules.d/10-$(PKG_NAME) +define Package/kmod-ueagle-atm/install + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) $(CP) $(PKG_BUILD_DIR)/driver/ueagle-atm.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/usbatm_iso/usbatm.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_UEAGLE_ATM)/lib/modules/$(LINUX_VERSION)/ - $(RSTRIP_KMOD) $(IDIR_KMOD_UEAGLE_ATM) - $(IPKG_BUILD) $(IDIR_KMOD_UEAGLE_ATM) $(PACKAGE_DIR) + $(1)/lib/modules/$(LINUX_VERSION)/ + install -d -m0755 $(1)/etc/modules.d + install -m0644 ./files/$(PKG_NAME).modules \ + $(1)/etc/modules.d/10-$(PKG_NAME) +endef + +$(eval $(call BuildPackage,kmod-ueagle-atm)) diff --git a/openwrt/target/linux/package/ueagle-atm/files/ueagle-atm.modules b/openwrt/package/ueagle-atm/files/ueagle-atm.modules similarity index 100% rename from openwrt/target/linux/package/ueagle-atm/files/ueagle-atm.modules rename to openwrt/package/ueagle-atm/files/ueagle-atm.modules diff --git a/openwrt/target/linux/package/ueagle-atm/patches/100-compile_fix.patch b/openwrt/package/ueagle-atm/patches/100-compile_fix.patch similarity index 100% rename from openwrt/target/linux/package/ueagle-atm/patches/100-compile_fix.patch rename to openwrt/package/ueagle-atm/patches/100-compile_fix.patch diff --git a/openwrt/target/linux/package/ueagle-atm/Config.in b/openwrt/target/linux/package/ueagle-atm/Config.in deleted file mode 100644 index c92fc2f7248..00000000000 --- a/openwrt/target/linux/package/ueagle-atm/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config PACKAGE_KMOD_UEAGLE_ATM - prompt "kmod-ueagle-atm.................... Kernel driver for Eagle 8051 based USB ADSL modems" - tristate - depends LINUX_2_6_BRCM - default m if DEVEL - help - Kernel driver for Eagle 8051 USB ADSL modems - - http://www.eagle-usb.org - diff --git a/openwrt/target/linux/package/ueagle-atm/ipkg/kmod-ueagle-atm.control b/openwrt/target/linux/package/ueagle-atm/ipkg/kmod-ueagle-atm.control deleted file mode 100644 index 9659aa0b7d0..00000000000 --- a/openwrt/target/linux/package/ueagle-atm/ipkg/kmod-ueagle-atm.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: kmod-ueagle-atm -Priority: optional -Section: sys -Depends: kmod-usb-core -Description: Kernel driver for Eagle 8051 based USB ADSL modems From 350e85c529a8f5693366458aa31041b2619c28ee Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 11:20:13 +0000 Subject: [PATCH 199/757] prevent autoheader invocation, clean autotools patch. SVN-Revision: 3978 --- openwrt/package/linux-atm/Makefile | 6 + .../linux-atm/patches/300-no_autotools.patch | 10672 ---------------- 2 files changed, 6 insertions(+), 10672 deletions(-) diff --git a/openwrt/package/linux-atm/Makefile b/openwrt/package/linux-atm/Makefile index 9d9aa6576b4..5b75e195522 100644 --- a/openwrt/package/linux-atm/Makefile +++ b/openwrt/package/linux-atm/Makefile @@ -31,6 +31,12 @@ define Package/br2684ctl DESCRIPTION:=ATM RFC2684 bridging utility endef +define Build/Configure + $(call Build/Configure/Default,) + # prevent autoheader invocation + touch $(PKG_BUILD_DIR)/stamp-h.in +endef + define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) diff --git a/openwrt/package/linux-atm/patches/300-no_autotools.patch b/openwrt/package/linux-atm/patches/300-no_autotools.patch index a085eca7db1..73427296c99 100644 --- a/openwrt/package/linux-atm/patches/300-no_autotools.patch +++ b/openwrt/package/linux-atm/patches/300-no_autotools.patch @@ -9194,10678 +9194,6 @@ diff -urN linux-atm.old/aclocal.m4 linux-atm.dev/aclocal.m4 AC_MSG_RESULT([$SED]) ]) -diff -urN linux-atm.old/autom4te.cache/output.0 linux-atm.dev/autom4te.cache/output.0 ---- linux-atm.old/autom4te.cache/output.0 1970-01-01 01:00:00.000000000 +0100 -+++ linux-atm.dev/autom4te.cache/output.0 2005-08-23 01:12:40.958209832 +0200 -@@ -0,0 +1,10118 @@ -+@%:@! /bin/sh -+@%:@ Guess values for system-dependent variables and create Makefiles. -+@%:@ Generated by GNU Autoconf 2.59. -+@%:@ -+@%:@ Copyright (C) 2003 Free Software Foundation, Inc. -+@%:@ This configure script is free software; the Free Software Foundation -+@%:@ gives unlimited permission to copy, distribute and modify it. -+## --------------------- ## -+## M4sh Initialization. ## -+## --------------------- ## -+ -+# Be Bourne compatible -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -+ # is contrary to our usage. Disable this feature. -+ alias -g '${1+"$@"}'='"$@"' -+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then -+ set -o posix -+fi -+DUALCASE=1; export DUALCASE # for MKS sh -+ -+# Support unset when possible. -+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -+ as_unset=unset -+else -+ as_unset=false -+fi -+ -+ -+# Work around bugs in pre-3.0 UWIN ksh. -+$as_unset ENV MAIL MAILPATH -+PS1='$ ' -+PS2='> ' -+PS4='+ ' -+ -+# NLS nuisances. -+for as_var in \ -+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -+ LC_TELEPHONE LC_TIME -+do -+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ eval $as_var=C; export $as_var -+ else -+ $as_unset $as_var -+ fi -+done -+ -+# Required to use basename. -+if expr a : '\(a\)' >/dev/null 2>&1; then -+ as_expr=expr -+else -+ as_expr=false -+fi -+ -+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then -+ as_basename=basename -+else -+ as_basename=false -+fi -+ -+ -+# Name of the executable. -+as_me=`$as_basename "$0" || -+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ -+ X"$0" : 'X\(//\)$' \| \ -+ X"$0" : 'X\(/\)$' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X/"$0" | -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } -+ /^X\/\(\/\/\)$/{ s//\1/; q; } -+ /^X\/\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ -+ -+# PATH needs CR, and LINENO needs CR and PATH. -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits -+ -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; then -+ echo "#! /bin/sh" >conf$$.sh -+ echo "exit 0" >>conf$$.sh -+ chmod +x conf$$.sh -+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then -+ PATH_SEPARATOR=';' -+ else -+ PATH_SEPARATOR=: -+ fi -+ rm -f conf$$.sh -+fi -+ -+ -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x$as_lineno_3" = "x$as_lineno_2" || { -+ # Find who we are. Look in the path if we contain no path at all -+ # relative or not. -+ case $0 in -+ *[\\/]* ) as_myself=$0 ;; -+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+done -+ -+ ;; -+ esac -+ # We did not find ourselves, most probably we were run as `sh COMMAND' -+ # in which case we are not to be found in the path. -+ if test "x$as_myself" = x; then -+ as_myself=$0 -+ fi -+ if test ! -f "$as_myself"; then -+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 -+ { (exit 1); exit 1; }; } -+ fi -+ case $CONFIG_SHELL in -+ '') -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for as_base in sh bash ksh sh5; do -+ case $as_dir in -+ /*) -+ if ("$as_dir/$as_base" -c ' -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then -+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } -+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } -+ CONFIG_SHELL=$as_dir/$as_base -+ export CONFIG_SHELL -+ exec "$CONFIG_SHELL" "$0" ${1+"$@"} -+ fi;; -+ esac -+ done -+done -+;; -+ esac -+ -+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -+ # uniformly replaced by the line number. The first 'sed' inserts a -+ # line-number line before each line; the second 'sed' does the real -+ # work. The second script uses 'N' to pair each line-number line -+ # with the numbered line, and appends trailing '-' during -+ # substitution so that $LINENO is not a special case at line end. -+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) -+ sed '=' <$as_myself | -+ sed ' -+ N -+ s,$,-, -+ : loop -+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, -+ t loop -+ s,-$,, -+ s,^['$as_cr_digits']*\n,, -+ ' >$as_me.lineno && -+ chmod +x $as_me.lineno || -+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -+ { (exit 1); exit 1; }; } -+ -+ # Don't try to exec as it changes $[0], causing all sort of problems -+ # (the dirname of $[0] is not the place where we might find the -+ # original and so on. Autoconf is especially sensible to this). -+ . ./$as_me.lineno -+ # Exit status is that of the last command. -+ exit -+} -+ -+ -+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in -+ *c*,-n*) ECHO_N= ECHO_C=' -+' ECHO_T=' ' ;; -+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; -+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -+esac -+ -+if expr a : '\(a\)' >/dev/null 2>&1; then -+ as_expr=expr -+else -+ as_expr=false -+fi -+ -+rm -f conf$$ conf$$.exe conf$$.file -+echo >conf$$.file -+if ln -s conf$$.file conf$$ 2>/dev/null; then -+ # We could just check for DJGPP; but this test a) works b) is more generic -+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). -+ if test -f conf$$.exe; then -+ # Don't use ln at all; we don't have any links -+ as_ln_s='cp -p' -+ else -+ as_ln_s='ln -s' -+ fi -+elif ln conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s=ln -+else -+ as_ln_s='cp -p' -+fi -+rm -f conf$$ conf$$.exe conf$$.file -+ -+if mkdir -p . 2>/dev/null; then -+ as_mkdir_p=: -+else -+ test -d ./-p && rmdir ./-p -+ as_mkdir_p=false -+fi -+ -+as_executable_p="test -f" -+ -+# Sed expression to map a string onto a valid CPP name. -+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -+ -+# Sed expression to map a string onto a valid variable name. -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -+ -+ -+# IFS -+# We need space, tab and new line, in precisely that order. -+as_nl=' -+' -+IFS=" $as_nl" -+ -+# CDPATH. -+$as_unset CDPATH -+ -+ -+# Find the correct PATH separator. Usually this is `:', but -+# DJGPP uses `;' like DOS. -+if test "X${PATH_SEPARATOR+set}" != Xset; then -+ UNAME=${UNAME-`uname 2>/dev/null`} -+ case X$UNAME in -+ *-DOS) lt_cv_sys_path_separator=';' ;; -+ *) lt_cv_sys_path_separator=':' ;; -+ esac -+ PATH_SEPARATOR=$lt_cv_sys_path_separator -+fi -+ -+ -+# Check that we are running under the correct shell. -+SHELL=${CONFIG_SHELL-/bin/sh} -+ -+case X$ECHO in -+X*--fallback-echo) -+ # Remove one level of quotation (which was required for Make). -+ ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` -+ ;; -+esac -+ -+echo=${ECHO-echo} -+if test "X$1" = X--no-reexec; then -+ # Discard the --no-reexec flag, and continue. -+ shift -+elif test "X$1" = X--fallback-echo; then -+ # Avoid inline document here, it may be left over -+ : -+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then -+ # Yippee, $echo works! -+ : -+else -+ # Restart under the correct shell. -+ exec $SHELL "$0" --no-reexec ${1+"$@"} -+fi -+ -+if test "X$1" = X--fallback-echo; then -+ # used as fallback echo -+ shift -+ cat <<EOF -+ -+EOF -+ exit 0 -+fi -+ -+# The HP-UX ksh and POSIX shell print the target directory to stdout -+# if CDPATH is set. -+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi -+ -+if test -z "$ECHO"; then -+if test "X${echo_test_string+set}" != Xset; then -+# find a string as large as possible, as long as the shell can cope with it -+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do -+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... -+ if (echo_test_string="`eval $cmd`") 2>/dev/null && -+ echo_test_string="`eval $cmd`" && -+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null -+ then -+ break -+ fi -+ done -+fi -+ -+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ : -+else -+ # The Solaris, AIX, and Digital Unix default echo programs unquote -+ # backslashes. This makes it impossible to quote backslashes using -+ # echo "$something" | sed 's/\\/\\\\/g' -+ # -+ # So, first we look for a working echo in the user's PATH. -+ -+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for dir in $PATH /usr/ucb; do -+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && -+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ echo="$dir/echo" -+ break -+ fi -+ done -+ IFS="$save_ifs" -+ -+ if test "X$echo" = Xecho; then -+ # We didn't find a better echo, so look for alternatives. -+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ # This shell has a builtin print -r that does the trick. -+ echo='print -r' -+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && -+ test "X$CONFIG_SHELL" != X/bin/ksh; then -+ # If we have ksh, try running configure again with it. -+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -+ export ORIGINAL_CONFIG_SHELL -+ CONFIG_SHELL=/bin/ksh -+ export CONFIG_SHELL -+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} -+ else -+ # Try using printf. -+ echo='printf %s\n' -+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && -+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ # Cool, printf works -+ : -+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && -+ test "X$echo_testing_string" = 'X\t' && -+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL -+ export CONFIG_SHELL -+ SHELL="$CONFIG_SHELL" -+ export SHELL -+ echo="$CONFIG_SHELL $0 --fallback-echo" -+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && -+ test "X$echo_testing_string" = 'X\t' && -+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && -+ test "X$echo_testing_string" = "X$echo_test_string"; then -+ echo="$CONFIG_SHELL $0 --fallback-echo" -+ else -+ # maybe with a smaller string... -+ prev=: -+ -+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do -+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null -+ then -+ break -+ fi -+ prev="$cmd" -+ done -+ -+ if test "$prev" != 'sed 50q "$0"'; then -+ echo_test_string=`eval $prev` -+ export echo_test_string -+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} -+ else -+ # Oops. We lost completely, so just stick with echo. -+ echo=echo -+ fi -+ fi -+ fi -+ fi -+fi -+fi -+ -+# Copy echo and quote the copy suitably for passing to libtool from -+# the Makefile, instead of quoting the original, which is used later. -+ECHO=$echo -+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then -+ ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -+fi -+ -+ -+ -+# Name of the host. -+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -+# so uname gets run too. -+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -+ -+exec 6>&1 -+ -+# -+# Initializations. -+# -+ac_default_prefix=/usr/local -+ac_config_libobj_dir=. -+cross_compiling=no -+subdirs= -+MFLAGS= -+MAKEFLAGS= -+SHELL=${CONFIG_SHELL-/bin/sh} -+ -+# Maximum number of lines to put in a shell here document. -+# This variable seems obsolete. It should probably be removed, and -+# only ac_max_sed_lines should be used. -+: ${ac_max_here_lines=38} -+ -+# Identity of this package. -+PACKAGE_NAME= -+PACKAGE_TARNAME= -+PACKAGE_VERSION= -+PACKAGE_STRING= -+PACKAGE_BUGREPORT= -+ -+ac_unique_file="src/include/atm.h" -+# Factoring default headers for most tests. -+ac_includes_default="\ -+#include <stdio.h> -+#if HAVE_SYS_TYPES_H -+# include <sys/types.h> -+#endif -+#if HAVE_SYS_STAT_H -+# include <sys/stat.h> -+#endif -+#if STDC_HEADERS -+# include <stdlib.h> -+# include <stddef.h> -+#else -+# if HAVE_STDLIB_H -+# include <stdlib.h> -+# endif -+#endif -+#if HAVE_STRING_H -+# if !STDC_HEADERS && HAVE_MEMORY_H -+# include <memory.h> -+# endif -+# include <string.h> -+#endif -+#if HAVE_STRINGS_H -+# include <strings.h> -+#endif -+#if HAVE_INTTYPES_H -+# include <inttypes.h> -+#else -+# if HAVE_STDINT_H -+# include <stdint.h> -+# endif -+#endif -+#if HAVE_UNISTD_H -+# include <unistd.h> -+#endif" -+ -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE LIBVER_CURRENT LIBVER_REVISION LIBVER_AGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LEX LEXLIB LEX_OUTPUT_ROOT YACC LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP LIBTOOL LIBTOOL_DEPS PERL LIB@&t@OBJS LTLIBOBJS' -+ac_subst_files='' -+ -+# Initialize some variables set by options. -+ac_init_help= -+ac_init_version=false -+# The variables have the same names as the options, with -+# dashes changed to underlines. -+cache_file=/dev/null -+exec_prefix=NONE -+no_create= -+no_recursion= -+prefix=NONE -+program_prefix=NONE -+program_suffix=NONE -+program_transform_name=s,x,x, -+silent= -+site= -+srcdir= -+verbose= -+x_includes=NONE -+x_libraries=NONE -+ -+# Installation directory options. -+# These are left unexpanded so users can "make install exec_prefix=/foo" -+# and all the variables that are supposed to be based on exec_prefix -+# by default will actually change. -+# Use braces instead of parens because sh, perl, etc. also accept them. -+bindir='${exec_prefix}/bin' -+sbindir='${exec_prefix}/sbin' -+libexecdir='${exec_prefix}/libexec' -+datadir='${prefix}/share' -+sysconfdir='${prefix}/etc' -+sharedstatedir='${prefix}/com' -+localstatedir='${prefix}/var' -+libdir='${exec_prefix}/lib' -+includedir='${prefix}/include' -+oldincludedir='/usr/include' -+infodir='${prefix}/info' -+mandir='${prefix}/man' -+ -+ac_prev= -+for ac_option -+do -+ # If the previous option needs an argument, assign it. -+ if test -n "$ac_prev"; then -+ eval "$ac_prev=\$ac_option" -+ ac_prev= -+ continue -+ fi -+ -+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` -+ -+ # Accept the important Cygnus configure options, so we can diagnose typos. -+ -+ case $ac_option in -+ -+ -bindir | --bindir | --bindi | --bind | --bin | --bi) -+ ac_prev=bindir ;; -+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) -+ bindir=$ac_optarg ;; -+ -+ -build | --build | --buil | --bui | --bu) -+ ac_prev=build_alias ;; -+ -build=* | --build=* | --buil=* | --bui=* | --bu=*) -+ build_alias=$ac_optarg ;; -+ -+ -cache-file | --cache-file | --cache-fil | --cache-fi \ -+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) -+ ac_prev=cache_file ;; -+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ -+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) -+ cache_file=$ac_optarg ;; -+ -+ --config-cache | -C) -+ cache_file=config.cache ;; -+ -+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da) -+ ac_prev=datadir ;; -+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ -+ | --da=*) -+ datadir=$ac_optarg ;; -+ -+ -disable-* | --disable-*) -+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` -+ # Reject names that are not valid shell variable names. -+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && -+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 -+ { (exit 1); exit 1; }; } -+ ac_feature=`echo $ac_feature | sed 's/-/_/g'` -+ eval "enable_$ac_feature=no" ;; -+ -+ -enable-* | --enable-*) -+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` -+ # Reject names that are not valid shell variable names. -+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && -+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 -+ { (exit 1); exit 1; }; } -+ ac_feature=`echo $ac_feature | sed 's/-/_/g'` -+ case $ac_option in -+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; -+ *) ac_optarg=yes ;; -+ esac -+ eval "enable_$ac_feature='$ac_optarg'" ;; -+ -+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ -+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ -+ | --exec | --exe | --ex) -+ ac_prev=exec_prefix ;; -+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ -+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ -+ | --exec=* | --exe=* | --ex=*) -+ exec_prefix=$ac_optarg ;; -+ -+ -gas | --gas | --ga | --g) -+ # Obsolete; use --with-gas. -+ with_gas=yes ;; -+ -+ -help | --help | --hel | --he | -h) -+ ac_init_help=long ;; -+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) -+ ac_init_help=recursive ;; -+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) -+ ac_init_help=short ;; -+ -+ -host | --host | --hos | --ho) -+ ac_prev=host_alias ;; -+ -host=* | --host=* | --hos=* | --ho=*) -+ host_alias=$ac_optarg ;; -+ -+ -includedir | --includedir | --includedi | --included | --include \ -+ | --includ | --inclu | --incl | --inc) -+ ac_prev=includedir ;; -+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ -+ | --includ=* | --inclu=* | --incl=* | --inc=*) -+ includedir=$ac_optarg ;; -+ -+ -infodir | --infodir | --infodi | --infod | --info | --inf) -+ ac_prev=infodir ;; -+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) -+ infodir=$ac_optarg ;; -+ -+ -libdir | --libdir | --libdi | --libd) -+ ac_prev=libdir ;; -+ -libdir=* | --libdir=* | --libdi=* | --libd=*) -+ libdir=$ac_optarg ;; -+ -+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ -+ | --libexe | --libex | --libe) -+ ac_prev=libexecdir ;; -+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ -+ | --libexe=* | --libex=* | --libe=*) -+ libexecdir=$ac_optarg ;; -+ -+ -localstatedir | --localstatedir | --localstatedi | --localstated \ -+ | --localstate | --localstat | --localsta | --localst \ -+ | --locals | --local | --loca | --loc | --lo) -+ ac_prev=localstatedir ;; -+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ -+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ -+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) -+ localstatedir=$ac_optarg ;; -+ -+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m) -+ ac_prev=mandir ;; -+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) -+ mandir=$ac_optarg ;; -+ -+ -nfp | --nfp | --nf) -+ # Obsolete; use --without-fp. -+ with_fp=no ;; -+ -+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ -+ | --no-cr | --no-c | -n) -+ no_create=yes ;; -+ -+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ -+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) -+ no_recursion=yes ;; -+ -+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ -+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ -+ | --oldin | --oldi | --old | --ol | --o) -+ ac_prev=oldincludedir ;; -+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ -+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ -+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) -+ oldincludedir=$ac_optarg ;; -+ -+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) -+ ac_prev=prefix ;; -+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) -+ prefix=$ac_optarg ;; -+ -+ -program-prefix | --program-prefix | --program-prefi | --program-pref \ -+ | --program-pre | --program-pr | --program-p) -+ ac_prev=program_prefix ;; -+ -program-prefix=* | --program-prefix=* | --program-prefi=* \ -+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) -+ program_prefix=$ac_optarg ;; -+ -+ -program-suffix | --program-suffix | --program-suffi | --program-suff \ -+ | --program-suf | --program-su | --program-s) -+ ac_prev=program_suffix ;; -+ -program-suffix=* | --program-suffix=* | --program-suffi=* \ -+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) -+ program_suffix=$ac_optarg ;; -+ -+ -program-transform-name | --program-transform-name \ -+ | --program-transform-nam | --program-transform-na \ -+ | --program-transform-n | --program-transform- \ -+ | --program-transform | --program-transfor \ -+ | --program-transfo | --program-transf \ -+ | --program-trans | --program-tran \ -+ | --progr-tra | --program-tr | --program-t) -+ ac_prev=program_transform_name ;; -+ -program-transform-name=* | --program-transform-name=* \ -+ | --program-transform-nam=* | --program-transform-na=* \ -+ | --program-transform-n=* | --program-transform-=* \ -+ | --program-transform=* | --program-transfor=* \ -+ | --program-transfo=* | --program-transf=* \ -+ | --program-trans=* | --program-tran=* \ -+ | --progr-tra=* | --program-tr=* | --program-t=*) -+ program_transform_name=$ac_optarg ;; -+ -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ -+ | -silent | --silent | --silen | --sile | --sil) -+ silent=yes ;; -+ -+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) -+ ac_prev=sbindir ;; -+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ -+ | --sbi=* | --sb=*) -+ sbindir=$ac_optarg ;; -+ -+ -sharedstatedir | --sharedstatedir | --sharedstatedi \ -+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ -+ | --sharedst | --shareds | --shared | --share | --shar \ -+ | --sha | --sh) -+ ac_prev=sharedstatedir ;; -+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ -+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ -+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ -+ | --sha=* | --sh=*) -+ sharedstatedir=$ac_optarg ;; -+ -+ -site | --site | --sit) -+ ac_prev=site ;; -+ -site=* | --site=* | --sit=*) -+ site=$ac_optarg ;; -+ -+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) -+ ac_prev=srcdir ;; -+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) -+ srcdir=$ac_optarg ;; -+ -+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ -+ | --syscon | --sysco | --sysc | --sys | --sy) -+ ac_prev=sysconfdir ;; -+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ -+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) -+ sysconfdir=$ac_optarg ;; -+ -+ -target | --target | --targe | --targ | --tar | --ta | --t) -+ ac_prev=target_alias ;; -+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) -+ target_alias=$ac_optarg ;; -+ -+ -v | -verbose | --verbose | --verbos | --verbo | --verb) -+ verbose=yes ;; -+ -+ -version | --version | --versio | --versi | --vers | -V) -+ ac_init_version=: ;; -+ -+ -with-* | --with-*) -+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` -+ # Reject names that are not valid shell variable names. -+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && -+ { echo "$as_me: error: invalid package name: $ac_package" >&2 -+ { (exit 1); exit 1; }; } -+ ac_package=`echo $ac_package| sed 's/-/_/g'` -+ case $ac_option in -+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; -+ *) ac_optarg=yes ;; -+ esac -+ eval "with_$ac_package='$ac_optarg'" ;; -+ -+ -without-* | --without-*) -+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` -+ # Reject names that are not valid shell variable names. -+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && -+ { echo "$as_me: error: invalid package name: $ac_package" >&2 -+ { (exit 1); exit 1; }; } -+ ac_package=`echo $ac_package | sed 's/-/_/g'` -+ eval "with_$ac_package=no" ;; -+ -+ --x) -+ # Obsolete; use --with-x. -+ with_x=yes ;; -+ -+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ -+ | --x-incl | --x-inc | --x-in | --x-i) -+ ac_prev=x_includes ;; -+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ -+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) -+ x_includes=$ac_optarg ;; -+ -+ -x-libraries | --x-libraries | --x-librarie | --x-librari \ -+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) -+ ac_prev=x_libraries ;; -+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ -+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) -+ x_libraries=$ac_optarg ;; -+ -+ -*) { echo "$as_me: error: unrecognized option: $ac_option -+Try \`$0 --help' for more information." >&2 -+ { (exit 1); exit 1; }; } -+ ;; -+ -+ *=*) -+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` -+ # Reject names that are not valid shell variable names. -+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && -+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 -+ { (exit 1); exit 1; }; } -+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` -+ eval "$ac_envvar='$ac_optarg'" -+ export $ac_envvar ;; -+ -+ *) -+ # FIXME: should be removed in autoconf 3.0. -+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2 -+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && -+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2 -+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} -+ ;; -+ -+ esac -+done -+ -+if test -n "$ac_prev"; then -+ ac_option=--`echo $ac_prev | sed 's/_/-/g'` -+ { echo "$as_me: error: missing argument to $ac_option" >&2 -+ { (exit 1); exit 1; }; } -+fi -+ -+# Be sure to have absolute paths. -+for ac_var in exec_prefix prefix -+do -+ eval ac_val=$`echo $ac_var` -+ case $ac_val in -+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;; -+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -+ { (exit 1); exit 1; }; };; -+ esac -+done -+ -+# Be sure to have absolute paths. -+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ -+ localstatedir libdir includedir oldincludedir infodir mandir -+do -+ eval ac_val=$`echo $ac_var` -+ case $ac_val in -+ [\\/$]* | ?:[\\/]* ) ;; -+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -+ { (exit 1); exit 1; }; };; -+ esac -+done -+ -+# There might be people who depend on the old broken behavior: `$host' -+# used to hold the argument of --host etc. -+# FIXME: To remove some day. -+build=$build_alias -+host=$host_alias -+target=$target_alias -+ -+# FIXME: To remove some day. -+if test "x$host_alias" != x; then -+ if test "x$build_alias" = x; then -+ cross_compiling=maybe -+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. -+ If a cross compiler is detected then cross compile mode will be used." >&2 -+ elif test "x$build_alias" != "x$host_alias"; then -+ cross_compiling=yes -+ fi -+fi -+ -+ac_tool_prefix= -+test -n "$host_alias" && ac_tool_prefix=$host_alias- -+ -+test "$silent" = yes && exec 6>/dev/null -+ -+ -+# Find the source files, if location was not specified. -+if test -z "$srcdir"; then -+ ac_srcdir_defaulted=yes -+ # Try the directory containing this script, then its parent. -+ ac_confdir=`(dirname "$0") 2>/dev/null || -+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$0" : 'X\(//\)[^/]' \| \ -+ X"$0" : 'X\(//\)$' \| \ -+ X"$0" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X"$0" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -+ /^X\(\/\/\)[^/].*/{ s//\1/; q; } -+ /^X\(\/\/\)$/{ s//\1/; q; } -+ /^X\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ srcdir=$ac_confdir -+ if test ! -r $srcdir/$ac_unique_file; then -+ srcdir=.. -+ fi -+else -+ ac_srcdir_defaulted=no -+fi -+if test ! -r $srcdir/$ac_unique_file; then -+ if test "$ac_srcdir_defaulted" = yes; then -+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 -+ { (exit 1); exit 1; }; } -+ else -+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 -+ { (exit 1); exit 1; }; } -+ fi -+fi -+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || -+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 -+ { (exit 1); exit 1; }; } -+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -+ac_env_build_alias_set=${build_alias+set} -+ac_env_build_alias_value=$build_alias -+ac_cv_env_build_alias_set=${build_alias+set} -+ac_cv_env_build_alias_value=$build_alias -+ac_env_host_alias_set=${host_alias+set} -+ac_env_host_alias_value=$host_alias -+ac_cv_env_host_alias_set=${host_alias+set} -+ac_cv_env_host_alias_value=$host_alias -+ac_env_target_alias_set=${target_alias+set} -+ac_env_target_alias_value=$target_alias -+ac_cv_env_target_alias_set=${target_alias+set} -+ac_cv_env_target_alias_value=$target_alias -+ac_env_CC_set=${CC+set} -+ac_env_CC_value=$CC -+ac_cv_env_CC_set=${CC+set} -+ac_cv_env_CC_value=$CC -+ac_env_CFLAGS_set=${CFLAGS+set} -+ac_env_CFLAGS_value=$CFLAGS -+ac_cv_env_CFLAGS_set=${CFLAGS+set} -+ac_cv_env_CFLAGS_value=$CFLAGS -+ac_env_LDFLAGS_set=${LDFLAGS+set} -+ac_env_LDFLAGS_value=$LDFLAGS -+ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -+ac_cv_env_LDFLAGS_value=$LDFLAGS -+ac_env_CPPFLAGS_set=${CPPFLAGS+set} -+ac_env_CPPFLAGS_value=$CPPFLAGS -+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -+ac_cv_env_CPPFLAGS_value=$CPPFLAGS -+ac_env_CPP_set=${CPP+set} -+ac_env_CPP_value=$CPP -+ac_cv_env_CPP_set=${CPP+set} -+ac_cv_env_CPP_value=$CPP -+ -+# -+# Report the --help message. -+# -+if test "$ac_init_help" = "long"; then -+ # Omit some internal or obsolete options to make the list less imposing. -+ # This message is too long to be a string in the A/UX 3.1 sh. -+ cat <<_ACEOF -+\`configure' configures this package to adapt to many kinds of systems. -+ -+Usage: $0 [OPTION]... [VAR=VALUE]... -+ -+To assign environment variables (e.g., CC, CFLAGS...), specify them as -+VAR=VALUE. See below for descriptions of some of the useful variables. -+ -+Defaults for the options are specified in brackets. -+ -+Configuration: -+ -h, --help display this help and exit -+ --help=short display options specific to this package -+ --help=recursive display the short help of all the included packages -+ -V, --version display version information and exit -+ -q, --quiet, --silent do not print \`checking...' messages -+ --cache-file=FILE cache test results in FILE [disabled] -+ -C, --config-cache alias for \`--cache-file=config.cache' -+ -n, --no-create do not create output files -+ --srcdir=DIR find the sources in DIR [configure dir or \`..'] -+ -+_ACEOF -+ -+ cat <<_ACEOF -+Installation directories: -+ --prefix=PREFIX install architecture-independent files in PREFIX -+ [$ac_default_prefix] -+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX -+ [PREFIX] -+ -+By default, \`make install' will install all the files in -+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -+an installation prefix other than \`$ac_default_prefix' using \`--prefix', -+for instance \`--prefix=\$HOME'. -+ -+For better control, use the options below. -+ -+Fine tuning of the installation directories: -+ --bindir=DIR user executables [EPREFIX/bin] -+ --sbindir=DIR system admin executables [EPREFIX/sbin] -+ --libexecdir=DIR program executables [EPREFIX/libexec] -+ --datadir=DIR read-only architecture-independent data [PREFIX/share] -+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] -+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] -+ --localstatedir=DIR modifiable single-machine data [PREFIX/var] -+ --libdir=DIR object code libraries [EPREFIX/lib] -+ --includedir=DIR C header files [PREFIX/include] -+ --oldincludedir=DIR C header files for non-gcc [/usr/include] -+ --infodir=DIR info documentation [PREFIX/info] -+ --mandir=DIR man documentation [PREFIX/man] -+_ACEOF -+ -+ cat <<\_ACEOF -+ -+Program names: -+ --program-prefix=PREFIX prepend PREFIX to installed program names -+ --program-suffix=SUFFIX append SUFFIX to installed program names -+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names -+ -+System types: -+ --build=BUILD configure for building on BUILD [guessed] -+ --host=HOST cross-compile to build programs to run on HOST [BUILD] -+ --target=TARGET configure for building compilers for TARGET [HOST] -+_ACEOF -+fi -+ -+if test -n "$ac_init_help"; then -+ -+ cat <<\_ACEOF -+ -+Optional Features: -+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) -+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] -+ --enable-shared=PKGS build shared libraries default=yes -+ --enable-static=PKGS build static libraries default=yes -+ --enable-fast-install=PKGS optimize for fast installation default=yes -+ --disable-libtool-lock avoid locking (might break parallel builds) -+ --enable-allow_uni30 Allow UNI 3.0 backwards-compatible extensions (if using UNI 3.1) -+ --enable-q2963_1 Enable peak cell rate modification as specified in Q.2963.1 (if using UNI 4.0) -+ --enable-cisco Enable work around for point-to-multipoint signaling bug in Cisco LS100 or LS7010 switches -+ --enable-thomflex Some versions of the Thomson Thomflex 5000 won't do any signaling before they get a RESTART. Enable sending of a RESTART whenever SAAL comes up. -+ --enable-mpoa_1_1 Enable proposed MPOA 1.1 features -+ --enable-mpr Enable memory debugging (if MPR is installed) -+ -+Optional Packages: -+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] -+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) -+ --with-gnu-ld assume the C compiler uses GNU ld default=no -+ --with-pic try to use only PIC/non-PIC objects default=use both -+ --with-uni=VERSION UNI version to use (3.0,3.1,4.0) default=dynamic -+ -+Some influential environment variables: -+ CC C compiler command -+ CFLAGS C compiler flags -+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a -+ nonstandard directory <lib dir> -+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have -+ headers in a nonstandard directory <include dir> -+ CPP C preprocessor -+ -+Use these variables to override the choices made by `configure' or to help -+it to find libraries and programs with nonstandard names/locations. -+ -+_ACEOF -+fi -+ -+if test "$ac_init_help" = "recursive"; then -+ # If there are subdirs, report their specific --help. -+ ac_popdir=`pwd` -+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue -+ test -d $ac_dir || continue -+ ac_builddir=. -+ -+if test "$ac_dir" != .; then -+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` -+ # A "../" for each directory in $ac_dir_suffix. -+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -+else -+ ac_dir_suffix= ac_top_builddir= -+fi -+ -+case $srcdir in -+ .) # No --srcdir option. We are building in place. -+ ac_srcdir=. -+ if test -z "$ac_top_builddir"; then -+ ac_top_srcdir=. -+ else -+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` -+ fi ;; -+ [\\/]* | ?:[\\/]* ) # Absolute path. -+ ac_srcdir=$srcdir$ac_dir_suffix; -+ ac_top_srcdir=$srcdir ;; -+ *) # Relative path. -+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix -+ ac_top_srcdir=$ac_top_builddir$srcdir ;; -+esac -+ -+# Do not use `cd foo && pwd` to compute absolute paths, because -+# the directories may not exist. -+case `pwd` in -+.) ac_abs_builddir="$ac_dir";; -+*) -+ case "$ac_dir" in -+ .) ac_abs_builddir=`pwd`;; -+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; -+ *) ac_abs_builddir=`pwd`/"$ac_dir";; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_builddir=${ac_top_builddir}.;; -+*) -+ case ${ac_top_builddir}. in -+ .) ac_abs_top_builddir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; -+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_srcdir=$ac_srcdir;; -+*) -+ case $ac_srcdir in -+ .) ac_abs_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; -+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_srcdir=$ac_top_srcdir;; -+*) -+ case $ac_top_srcdir in -+ .) ac_abs_top_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; -+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; -+ esac;; -+esac -+ -+ cd $ac_dir -+ # Check for guested configure; otherwise get Cygnus style configure. -+ if test -f $ac_srcdir/configure.gnu; then -+ echo -+ $SHELL $ac_srcdir/configure.gnu --help=recursive -+ elif test -f $ac_srcdir/configure; then -+ echo -+ $SHELL $ac_srcdir/configure --help=recursive -+ elif test -f $ac_srcdir/configure.ac || -+ test -f $ac_srcdir/configure.in; then -+ echo -+ $ac_configure --help -+ else -+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 -+ fi -+ cd "$ac_popdir" -+ done -+fi -+ -+test -n "$ac_init_help" && exit 0 -+if $ac_init_version; then -+ cat <<\_ACEOF -+ -+Copyright (C) 2003 Free Software Foundation, Inc. -+This configure script is free software; the Free Software Foundation -+gives unlimited permission to copy, distribute and modify it. -+_ACEOF -+ exit 0 -+fi -+exec 5>config.log -+cat >&5 <<_ACEOF -+This file contains any messages produced by compilers while -+running configure, to aid debugging if configure makes a mistake. -+ -+It was created by $as_me, which was -+generated by GNU Autoconf 2.59. Invocation command line was -+ -+ $ $0 $@ -+ -+_ACEOF -+{ -+cat <<_ASUNAME -+@%:@@%:@ --------- @%:@@%:@ -+@%:@@%:@ Platform. @%:@@%:@ -+@%:@@%:@ --------- @%:@@%:@ -+ -+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -+uname -m = `(uname -m) 2>/dev/null || echo unknown` -+uname -r = `(uname -r) 2>/dev/null || echo unknown` -+uname -s = `(uname -s) 2>/dev/null || echo unknown` -+uname -v = `(uname -v) 2>/dev/null || echo unknown` -+ -+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -+ -+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -+hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -+ -+_ASUNAME -+ -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ echo "PATH: $as_dir" -+done -+ -+} >&5 -+ -+cat >&5 <<_ACEOF -+ -+ -+@%:@@%:@ ----------- @%:@@%:@ -+@%:@@%:@ Core tests. @%:@@%:@ -+@%:@@%:@ ----------- @%:@@%:@ -+ -+_ACEOF -+ -+ -+# Keep a trace of the command line. -+# Strip out --no-create and --no-recursion so they do not pile up. -+# Strip out --silent because we don't want to record it for future runs. -+# Also quote any args containing shell meta-characters. -+# Make two passes to allow for proper duplicate-argument suppression. -+ac_configure_args= -+ac_configure_args0= -+ac_configure_args1= -+ac_sep= -+ac_must_keep_next=false -+for ac_pass in 1 2 -+do -+ for ac_arg -+ do -+ case $ac_arg in -+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ -+ | -silent | --silent | --silen | --sile | --sil) -+ continue ;; -+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) -+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ esac -+ case $ac_pass in -+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; -+ 2) -+ ac_configure_args1="$ac_configure_args1 '$ac_arg'" -+ if test $ac_must_keep_next = true; then -+ ac_must_keep_next=false # Got value, back to normal. -+ else -+ case $ac_arg in -+ *=* | --config-cache | -C | -disable-* | --disable-* \ -+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ -+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ -+ | -with-* | --with-* | -without-* | --without-* | --x) -+ case "$ac_configure_args0 " in -+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; -+ esac -+ ;; -+ -* ) ac_must_keep_next=true ;; -+ esac -+ fi -+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" -+ # Get rid of the leading space. -+ ac_sep=" " -+ ;; -+ esac -+ done -+done -+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } -+ -+# When interrupted or exit'd, cleanup temporary files, and complete -+# config.log. We remove comments because anyway the quotes in there -+# would cause problems or look ugly. -+# WARNING: Be sure not to use single quotes in there, as some shells, -+# such as our DU 5.0 friend, will then `close' the trap. -+trap 'exit_status=$? -+ # Save into config.log some information that might help in debugging. -+ { -+ echo -+ -+ cat <<\_ASBOX -+@%:@@%:@ ---------------- @%:@@%:@ -+@%:@@%:@ Cache variables. @%:@@%:@ -+@%:@@%:@ ---------------- @%:@@%:@ -+_ASBOX -+ echo -+ # The following way of writing the cache mishandles newlines in values, -+{ -+ (set) 2>&1 | -+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in -+ *ac_space=\ *) -+ sed -n \ -+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; -+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" -+ ;; -+ *) -+ sed -n \ -+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" -+ ;; -+ esac; -+} -+ echo -+ -+ cat <<\_ASBOX -+@%:@@%:@ ----------------- @%:@@%:@ -+@%:@@%:@ Output variables. @%:@@%:@ -+@%:@@%:@ ----------------- @%:@@%:@ -+_ASBOX -+ echo -+ for ac_var in $ac_subst_vars -+ do -+ eval ac_val=$`echo $ac_var` -+ echo "$ac_var='"'"'$ac_val'"'"'" -+ done | sort -+ echo -+ -+ if test -n "$ac_subst_files"; then -+ cat <<\_ASBOX -+@%:@@%:@ ------------- @%:@@%:@ -+@%:@@%:@ Output files. @%:@@%:@ -+@%:@@%:@ ------------- @%:@@%:@ -+_ASBOX -+ echo -+ for ac_var in $ac_subst_files -+ do -+ eval ac_val=$`echo $ac_var` -+ echo "$ac_var='"'"'$ac_val'"'"'" -+ done | sort -+ echo -+ fi -+ -+ if test -s confdefs.h; then -+ cat <<\_ASBOX -+@%:@@%:@ ----------- @%:@@%:@ -+@%:@@%:@ confdefs.h. @%:@@%:@ -+@%:@@%:@ ----------- @%:@@%:@ -+_ASBOX -+ echo -+ sed "/^$/d" confdefs.h | sort -+ echo -+ fi -+ test "$ac_signal" != 0 && -+ echo "$as_me: caught signal $ac_signal" -+ echo "$as_me: exit $exit_status" -+ } >&5 -+ rm -f core *.core && -+ rm -rf conftest* confdefs* conf$$* $ac_clean_files && -+ exit $exit_status -+ ' 0 -+for ac_signal in 1 2 13 15; do -+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -+done -+ac_signal=0 -+ -+# confdefs.h avoids OS command line length limits that DEFS can exceed. -+rm -rf conftest* confdefs.h -+# AIX cpp loses on an empty file, so make sure it contains at least a newline. -+echo >confdefs.h -+ -+# Predefined preprocessor variables. -+ -+cat >>confdefs.h <<_ACEOF -+@%:@define PACKAGE_NAME "$PACKAGE_NAME" -+_ACEOF -+ -+ -+cat >>confdefs.h <<_ACEOF -+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" -+_ACEOF -+ -+ -+cat >>confdefs.h <<_ACEOF -+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" -+_ACEOF -+ -+ -+cat >>confdefs.h <<_ACEOF -+@%:@define PACKAGE_STRING "$PACKAGE_STRING" -+_ACEOF -+ -+ -+cat >>confdefs.h <<_ACEOF -+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -+_ACEOF -+ -+ -+# Let the site file select an alternate cache file if it wants to. -+# Prefer explicitly selected file to automatically selected ones. -+if test -z "$CONFIG_SITE"; then -+ if test "x$prefix" != xNONE; then -+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" -+ else -+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" -+ fi -+fi -+for ac_site_file in $CONFIG_SITE; do -+ if test -r "$ac_site_file"; then -+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -+echo "$as_me: loading site script $ac_site_file" >&6;} -+ sed 's/^/| /' "$ac_site_file" >&5 -+ . "$ac_site_file" -+ fi -+done -+ -+if test -r "$cache_file"; then -+ # Some versions of bash will fail to source /dev/null (special -+ # files actually), so we avoid doing that. -+ if test -f "$cache_file"; then -+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -+echo "$as_me: loading cache $cache_file" >&6;} -+ case $cache_file in -+ [\\/]* | ?:[\\/]* ) . $cache_file;; -+ *) . ./$cache_file;; -+ esac -+ fi -+else -+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -+echo "$as_me: creating cache $cache_file" >&6;} -+ >$cache_file -+fi -+ -+# Check that the precious variables saved in the cache have kept the same -+# value. -+ac_cache_corrupted=false -+for ac_var in `(set) 2>&1 | -+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do -+ eval ac_old_set=\$ac_cv_env_${ac_var}_set -+ eval ac_new_set=\$ac_env_${ac_var}_set -+ eval ac_old_val="\$ac_cv_env_${ac_var}_value" -+ eval ac_new_val="\$ac_env_${ac_var}_value" -+ case $ac_old_set,$ac_new_set in -+ set,) -+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} -+ ac_cache_corrupted=: ;; -+ ,set) -+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} -+ ac_cache_corrupted=: ;; -+ ,);; -+ *) -+ if test "x$ac_old_val" != "x$ac_new_val"; then -+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} -+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -+echo "$as_me: former value: $ac_old_val" >&2;} -+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -+echo "$as_me: current value: $ac_new_val" >&2;} -+ ac_cache_corrupted=: -+ fi;; -+ esac -+ # Pass precious variables to config.status. -+ if test "$ac_new_set" = set; then -+ case $ac_new_val in -+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) -+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; -+ *) ac_arg=$ac_var=$ac_new_val ;; -+ esac -+ case " $ac_configure_args " in -+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. -+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; -+ esac -+ fi -+done -+if $ac_cache_corrupted; then -+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -+echo "$as_me: error: changes in the environment can compromise the build" >&2;} -+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ ac_config_headers="$ac_config_headers config.h" -+ -+ ac_config_commands="$ac_config_commands default-1" -+ -+ -+ac_aux_dir= -+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do -+ if test -f $ac_dir/install-sh; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/install-sh -c" -+ break -+ elif test -f $ac_dir/install.sh; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/install.sh -c" -+ break -+ elif test -f $ac_dir/shtool; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/shtool install -c" -+ break -+ fi -+done -+if test -z "$ac_aux_dir"; then -+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ac_config_guess="$SHELL $ac_aux_dir/config.guess" -+ac_config_sub="$SHELL $ac_aux_dir/config.sub" -+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. -+ -+# Make sure we can run config.sub. -+$ac_config_sub sun4 >/dev/null 2>&1 || -+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -+echo "$as_me: error: cannot run $ac_config_sub" >&2;} -+ { (exit 1); exit 1; }; } -+ -+echo "$as_me:$LINENO: checking build system type" >&5 -+echo $ECHO_N "checking build system type... $ECHO_C" >&6 -+if test "${ac_cv_build+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_build_alias=$build_alias -+test -z "$ac_cv_build_alias" && -+ ac_cv_build_alias=`$ac_config_guess` -+test -z "$ac_cv_build_alias" && -+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -+echo "$as_me: error: cannot guess build type; you must specify one" >&2;} -+ { (exit 1); exit 1; }; } -+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || -+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} -+ { (exit 1); exit 1; }; } -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -+echo "${ECHO_T}$ac_cv_build" >&6 -+build=$ac_cv_build -+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -+ -+ -+echo "$as_me:$LINENO: checking host system type" >&5 -+echo $ECHO_N "checking host system type... $ECHO_C" >&6 -+if test "${ac_cv_host+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_host_alias=$host_alias -+test -z "$ac_cv_host_alias" && -+ ac_cv_host_alias=$ac_cv_build_alias -+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || -+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} -+ { (exit 1); exit 1; }; } -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -+echo "${ECHO_T}$ac_cv_host" >&6 -+host=$ac_cv_host -+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -+ -+ -+echo "$as_me:$LINENO: checking target system type" >&5 -+echo $ECHO_N "checking target system type... $ECHO_C" >&6 -+if test "${ac_cv_target+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_target_alias=$target_alias -+test "x$ac_cv_target_alias" = "x" && -+ ac_cv_target_alias=$ac_cv_host_alias -+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || -+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} -+ { (exit 1); exit 1; }; } -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -+echo "${ECHO_T}$ac_cv_target" >&6 -+target=$ac_cv_target -+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -+ -+ -+# The aliases save the names the user supplied, while $host etc. -+# will get canonicalized. -+test -n "$target_alias" && -+ test "$program_prefix$program_suffix$program_transform_name" = \ -+ NONENONEs,x,x, && -+ program_prefix=${target_alias}- -+ -+am__api_version="1.4" -+# Find a good install program. We prefer a C program (faster), -+# so one script is as good as another. But avoid the broken or -+# incompatible versions: -+# SysV /etc/install, /usr/sbin/install -+# SunOS /usr/etc/install -+# IRIX /sbin/install -+# AIX /bin/install -+# AmigaOS /C/install, which installs bootblocks on floppy discs -+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -+# AFS /usr/afsws/bin/install, which mishandles nonexistent args -+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -+# OS/2's system install, which has a completely different semantic -+# ./install, which can be erroneously created by make from ./install.sh. -+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -+if test -z "$INSTALL"; then -+if test "${ac_cv_path_install+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ # Account for people who put trailing slashes in PATH elements. -+case $as_dir/ in -+ ./ | .// | /cC/* | \ -+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ -+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ -+ /usr/ucb/* ) ;; -+ *) -+ # OSF1 and SCO ODT 3.0 have their own names for install. -+ # Don't use installbsd from OSF since it installs stuff as root -+ # by default. -+ for ac_prog in ginstall scoinst install; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then -+ if test $ac_prog = install && -+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then -+ # AIX install. It has an incompatible calling convention. -+ : -+ elif test $ac_prog = install && -+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then -+ # program-specific install script used by HP pwplus--don't use. -+ : -+ else -+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" -+ break 3 -+ fi -+ fi -+ done -+ done -+ ;; -+esac -+done -+ -+ -+fi -+ if test "${ac_cv_path_install+set}" = set; then -+ INSTALL=$ac_cv_path_install -+ else -+ # As a last resort, use the slow shell script. We don't cache a -+ # path for INSTALL within a source directory, because that will -+ # break other packages using the cache if that directory is -+ # removed, or if the path is relative. -+ INSTALL=$ac_install_sh -+ fi -+fi -+echo "$as_me:$LINENO: result: $INSTALL" >&5 -+echo "${ECHO_T}$INSTALL" >&6 -+ -+# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -+# It thinks the first close brace ends the variable substitution. -+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -+ -+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -+ -+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -+ -+echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 -+# Just in case -+sleep 1 -+echo timestamp > conftestfile -+# Do `set' in a subshell so we don't clobber the current shell's -+# arguments. Must try -L first in case configure is actually a -+# symlink; some systems play weird games with the mod time of symlinks -+# (eg FreeBSD returns the mod time of the symlink's containing -+# directory). -+if ( -+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` -+ if test "$*" = "X"; then -+ # -L didn't work. -+ set X `ls -t $srcdir/configure conftestfile` -+ fi -+ if test "$*" != "X $srcdir/configure conftestfile" \ -+ && test "$*" != "X conftestfile $srcdir/configure"; then -+ -+ # If neither matched, then we have a broken ls. This can happen -+ # if, for instance, CONFIG_SHELL is bash and it inherits a -+ # broken ls alias from the environment. This has actually -+ # happened. Such a system could not be considered "sane". -+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -+alias in your environment" >&5 -+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -+alias in your environment" >&2;} -+ { (exit 1); exit 1; }; } -+ fi -+ -+ test "$2" = conftestfile -+ ) -+then -+ # Ok. -+ : -+else -+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -+Check your system clock" >&5 -+echo "$as_me: error: newly created file is older than distributed files! -+Check your system clock" >&2;} -+ { (exit 1); exit 1; }; } -+fi -+rm -f conftest* -+echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6 -+test "$program_prefix" != NONE && -+ program_transform_name="s,^,$program_prefix,;$program_transform_name" -+# Use a double $ so make ignores it. -+test "$program_suffix" != NONE && -+ program_transform_name="s,\$,$program_suffix,;$program_transform_name" -+# Double any \ or $. echo might interpret backslashes. -+# By default was `s,x,x', remove it if useless. -+cat <<\_ACEOF >conftest.sed -+s/[\\$]/&&/g;s/;s,x,x,$// -+_ACEOF -+program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -+rm conftest.sed -+ -+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.make <<\_ACEOF -+all: -+ @echo 'ac_maketemp="$(MAKE)"' -+_ACEOF -+# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -+if test -n "$ac_maketemp"; then -+ eval ac_cv_prog_make_${ac_make}_set=yes -+else -+ eval ac_cv_prog_make_${ac_make}_set=no -+fi -+rm -f conftest.make -+fi -+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then -+ echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6 -+ SET_MAKE= -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+ SET_MAKE="MAKE=${MAKE-make}" -+fi -+ -+ -+PACKAGE=linux-atm -+ -+VERSION=2.4.1 -+ -+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then -+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+cat >>confdefs.h <<_ACEOF -+@%:@define PACKAGE "$PACKAGE" -+_ACEOF -+ -+ -+cat >>confdefs.h <<_ACEOF -+@%:@define VERSION "$VERSION" -+_ACEOF -+ -+ -+ -+missing_dir=`cd $ac_aux_dir && pwd` -+echo "$as_me:$LINENO: checking for working aclocal-${am__api_version}" >&5 -+echo $ECHO_N "checking for working aclocal-${am__api_version}... $ECHO_C" >&6 -+# Run test in a subshell; some versions of sh will print an error if -+# an executable is not found, even if stderr is redirected. -+# Redirect stdin to placate older versions of autoconf. Sigh. -+if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then -+ ACLOCAL=aclocal-${am__api_version} -+ echo "$as_me:$LINENO: result: found" >&5 -+echo "${ECHO_T}found" >&6 -+else -+ ACLOCAL="$missing_dir/missing aclocal-${am__api_version}" -+ echo "$as_me:$LINENO: result: missing" >&5 -+echo "${ECHO_T}missing" >&6 -+fi -+ -+echo "$as_me:$LINENO: checking for working autoconf" >&5 -+echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6 -+# Run test in a subshell; some versions of sh will print an error if -+# an executable is not found, even if stderr is redirected. -+# Redirect stdin to placate older versions of autoconf. Sigh. -+if (autoconf --version) < /dev/null > /dev/null 2>&1; then -+ AUTOCONF=autoconf -+ echo "$as_me:$LINENO: result: found" >&5 -+echo "${ECHO_T}found" >&6 -+else -+ AUTOCONF="$missing_dir/missing autoconf" -+ echo "$as_me:$LINENO: result: missing" >&5 -+echo "${ECHO_T}missing" >&6 -+fi -+ -+echo "$as_me:$LINENO: checking for working automake-${am__api_version}" >&5 -+echo $ECHO_N "checking for working automake-${am__api_version}... $ECHO_C" >&6 -+# Run test in a subshell; some versions of sh will print an error if -+# an executable is not found, even if stderr is redirected. -+# Redirect stdin to placate older versions of autoconf. Sigh. -+if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then -+ AUTOMAKE=automake-${am__api_version} -+ echo "$as_me:$LINENO: result: found" >&5 -+echo "${ECHO_T}found" >&6 -+else -+ AUTOMAKE="$missing_dir/missing automake-${am__api_version}" -+ echo "$as_me:$LINENO: result: missing" >&5 -+echo "${ECHO_T}missing" >&6 -+fi -+ -+echo "$as_me:$LINENO: checking for working autoheader" >&5 -+echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6 -+# Run test in a subshell; some versions of sh will print an error if -+# an executable is not found, even if stderr is redirected. -+# Redirect stdin to placate older versions of autoconf. Sigh. -+if (autoheader --version) < /dev/null > /dev/null 2>&1; then -+ AUTOHEADER=autoheader -+ echo "$as_me:$LINENO: result: found" >&5 -+echo "${ECHO_T}found" >&6 -+else -+ AUTOHEADER="$missing_dir/missing autoheader" -+ echo "$as_me:$LINENO: result: missing" >&5 -+echo "${ECHO_T}missing" >&6 -+fi -+ -+echo "$as_me:$LINENO: checking for working makeinfo" >&5 -+echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6 -+# Run test in a subshell; some versions of sh will print an error if -+# an executable is not found, even if stderr is redirected. -+# Redirect stdin to placate older versions of autoconf. Sigh. -+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then -+ MAKEINFO=makeinfo -+ echo "$as_me:$LINENO: result: found" >&5 -+echo "${ECHO_T}found" >&6 -+else -+ MAKEINFO="$missing_dir/missing makeinfo" -+ echo "$as_me:$LINENO: result: missing" >&5 -+echo "${ECHO_T}missing" >&6 -+fi -+ -+ -+ -+LIBVER_CURRENT="1" -+LIBVER_REVISION="0" -+LIBVER_AGE="0" -+ -+ -+ -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -+set dummy ${ac_tool_prefix}gcc; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_CC+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$CC"; then -+ ac_cv_prog_CC="$CC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_CC="${ac_tool_prefix}gcc" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+CC=$ac_cv_prog_CC -+if test -n "$CC"; then -+ echo "$as_me:$LINENO: result: $CC" >&5 -+echo "${ECHO_T}$CC" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+fi -+if test -z "$ac_cv_prog_CC"; then -+ ac_ct_CC=$CC -+ # Extract the first word of "gcc", so it can be a program name with args. -+set dummy gcc; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$ac_ct_CC"; then -+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_CC="gcc" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+ac_ct_CC=$ac_cv_prog_ac_ct_CC -+if test -n "$ac_ct_CC"; then -+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -+echo "${ECHO_T}$ac_ct_CC" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ CC=$ac_ct_CC -+else -+ CC="$ac_cv_prog_CC" -+fi -+ -+if test -z "$CC"; then -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -+set dummy ${ac_tool_prefix}cc; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_CC+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$CC"; then -+ ac_cv_prog_CC="$CC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_CC="${ac_tool_prefix}cc" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+CC=$ac_cv_prog_CC -+if test -n "$CC"; then -+ echo "$as_me:$LINENO: result: $CC" >&5 -+echo "${ECHO_T}$CC" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+fi -+if test -z "$ac_cv_prog_CC"; then -+ ac_ct_CC=$CC -+ # Extract the first word of "cc", so it can be a program name with args. -+set dummy cc; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$ac_ct_CC"; then -+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_CC="cc" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+ac_ct_CC=$ac_cv_prog_ac_ct_CC -+if test -n "$ac_ct_CC"; then -+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -+echo "${ECHO_T}$ac_ct_CC" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ CC=$ac_ct_CC -+else -+ CC="$ac_cv_prog_CC" -+fi -+ -+fi -+if test -z "$CC"; then -+ # Extract the first word of "cc", so it can be a program name with args. -+set dummy cc; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_CC+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$CC"; then -+ ac_cv_prog_CC="$CC" # Let the user override the test. -+else -+ ac_prog_rejected=no -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then -+ ac_prog_rejected=yes -+ continue -+ fi -+ ac_cv_prog_CC="cc" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+if test $ac_prog_rejected = yes; then -+ # We found a bogon in the path, so make sure we never use it. -+ set dummy $ac_cv_prog_CC -+ shift -+ if test $@%:@ != 0; then -+ # We chose a different compiler from the bogus one. -+ # However, it has the same basename, so the bogon will be chosen -+ # first if we set CC to just the basename; use the full file name. -+ shift -+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" -+ fi -+fi -+fi -+fi -+CC=$ac_cv_prog_CC -+if test -n "$CC"; then -+ echo "$as_me:$LINENO: result: $CC" >&5 -+echo "${ECHO_T}$CC" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+fi -+if test -z "$CC"; then -+ if test -n "$ac_tool_prefix"; then -+ for ac_prog in cl -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_CC+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$CC"; then -+ ac_cv_prog_CC="$CC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+CC=$ac_cv_prog_CC -+if test -n "$CC"; then -+ echo "$as_me:$LINENO: result: $CC" >&5 -+echo "${ECHO_T}$CC" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ test -n "$CC" && break -+ done -+fi -+if test -z "$CC"; then -+ ac_ct_CC=$CC -+ for ac_prog in cl -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$ac_ct_CC"; then -+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_CC="$ac_prog" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+ac_ct_CC=$ac_cv_prog_ac_ct_CC -+if test -n "$ac_ct_CC"; then -+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -+echo "${ECHO_T}$ac_ct_CC" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ test -n "$ac_ct_CC" && break -+done -+ -+ CC=$ac_ct_CC -+fi -+ -+fi -+ -+ -+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -+See \`config.log' for more details." >&5 -+echo "$as_me: error: no acceptable C compiler found in \$PATH -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; } -+ -+# Provide some information about the compiler. -+echo "$as_me:$LINENO:" \ -+ "checking for C compiler version" >&5 -+ac_compiler=`set X $ac_compile; echo $2` -+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 -+ (eval $ac_compiler --version </dev/null >&5) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 -+ (eval $ac_compiler -v </dev/null >&5) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 -+ (eval $ac_compiler -V </dev/null >&5) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+ -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+ac_clean_files_save=$ac_clean_files -+ac_clean_files="$ac_clean_files a.out a.exe b.out" -+# Try to create an executable without -o first, disregard a.out. -+# It will help us diagnose broken compilers, and finding out an intuition -+# of exeext. -+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 -+ (eval $ac_link_default) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ # Find the output, starting from the most likely. This scheme is -+# not robust to junk in `.', hence go to wildcards (a.*) only as a last -+# resort. -+ -+# Be careful to initialize this variable, since it used to be cached. -+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -+ac_cv_exeext= -+# b.out is created by i960 compilers. -+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -+do -+ test -f "$ac_file" || continue -+ case $ac_file in -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) -+ ;; -+ conftest.$ac_ext ) -+ # This is the source file. -+ ;; -+ [ab].out ) -+ # We found the default executable, but exeext='' is most -+ # certainly right. -+ break;; -+ *.* ) -+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -+ # FIXME: I believe we export ac_cv_exeext for Libtool, -+ # but it would be cool to find out if it's true. Does anybody -+ # maintain Libtool? --akim. -+ export ac_cv_exeext -+ break;; -+ * ) -+ break;; -+ esac -+done -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -+See \`config.log' for more details." >&5 -+echo "$as_me: error: C compiler cannot create executables -+See \`config.log' for more details." >&2;} -+ { (exit 77); exit 77; }; } -+fi -+ -+ac_exeext=$ac_cv_exeext -+echo "$as_me:$LINENO: result: $ac_file" >&5 -+echo "${ECHO_T}$ac_file" >&6 -+ -+# Check the compiler produces executables we can run. If not, either -+# the compiler is broken, or we cross compile. -+echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -+# If not cross compiling, check that we can run a simple program. -+if test "$cross_compiling" != yes; then -+ if { ac_try='./$ac_file' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cross_compiling=no -+ else -+ if test "$cross_compiling" = maybe; then -+ cross_compiling=yes -+ else -+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -+If you meant to cross compile, use \`--host'. -+See \`config.log' for more details." >&5 -+echo "$as_me: error: cannot run C compiled programs. -+If you meant to cross compile, use \`--host'. -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; } -+ fi -+ fi -+fi -+echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6 -+ -+rm -f a.out a.exe conftest$ac_cv_exeext b.out -+ac_clean_files=$ac_clean_files_save -+# Check the compiler produces executables we can run. If not, either -+# the compiler is broken, or we cross compile. -+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -+echo "$as_me:$LINENO: result: $cross_compiling" >&5 -+echo "${ECHO_T}$cross_compiling" >&6 -+ -+echo "$as_me:$LINENO: checking for suffix of executables" >&5 -+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ # If both `conftest.exe' and `conftest' are `present' (well, observable) -+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -+# work properly (i.e., refer to `conftest.exe'), while it won't with -+# `rm'. -+for ac_file in conftest.exe conftest conftest.*; do -+ test -f "$ac_file" || continue -+ case $ac_file in -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; -+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -+ export ac_cv_exeext -+ break;; -+ * ) break;; -+ esac -+done -+else -+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -+See \`config.log' for more details." >&5 -+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+rm -f conftest$ac_cv_exeext -+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -+echo "${ECHO_T}$ac_cv_exeext" >&6 -+ -+rm -f conftest.$ac_ext -+EXEEXT=$ac_cv_exeext -+ac_exeext=$EXEEXT -+echo "$as_me:$LINENO: checking for suffix of object files" >&5 -+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -+if test "${ac_cv_objext+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.o conftest.obj -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do -+ case $ac_file in -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; -+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` -+ break;; -+ esac -+done -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -+See \`config.log' for more details." >&5 -+echo "$as_me: error: cannot compute suffix of object files: cannot compile -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+rm -f conftest.$ac_cv_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -+echo "${ECHO_T}$ac_cv_objext" >&6 -+OBJEXT=$ac_cv_objext -+ac_objext=$OBJEXT -+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -+if test "${ac_cv_c_compiler_gnu+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+#ifndef __GNUC__ -+ choke me -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_compiler_gnu=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_compiler_gnu=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ac_cv_c_compiler_gnu=$ac_compiler_gnu -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -+GCC=`test $ac_compiler_gnu = yes && echo yes` -+ac_test_CFLAGS=${CFLAGS+set} -+ac_save_CFLAGS=$CFLAGS -+CFLAGS="-g" -+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -+if test "${ac_cv_prog_cc_g+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_prog_cc_g=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_prog_cc_g=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -+if test "$ac_test_CFLAGS" = set; then -+ CFLAGS=$ac_save_CFLAGS -+elif test $ac_cv_prog_cc_g = yes; then -+ if test "$GCC" = yes; then -+ CFLAGS="-g -O2" -+ else -+ CFLAGS="-g" -+ fi -+else -+ if test "$GCC" = yes; then -+ CFLAGS="-O2" -+ else -+ CFLAGS= -+ fi -+fi -+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -+if test "${ac_cv_prog_cc_stdc+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_prog_cc_stdc=no -+ac_save_CC=$CC -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <stdarg.h> -+#include <stdio.h> -+#include <sys/types.h> -+#include <sys/stat.h> -+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -+struct buf { int x; }; -+FILE * (*rcsopen) (struct buf *, struct stat *, int); -+static char *e (p, i) -+ char **p; -+ int i; -+{ -+ return p[i]; -+} -+static char *f (char * (*g) (char **, int), char **p, ...) -+{ -+ char *s; -+ va_list v; -+ va_start (v,p); -+ s = g (p, va_arg (v,int)); -+ va_end (v); -+ return s; -+} -+ -+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has -+ function prototypes and stuff, but not '\xHH' hex character constants. -+ These don't provoke an error unfortunately, instead are silently treated -+ as 'x'. The following induces an error, until -std1 is added to get -+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an -+ array size at least. It's necessary to write '\x00'==0 to get something -+ that's true only with -std1. */ -+int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -+ -+int test (int i, double x); -+struct s1 {int (*f) (int a);}; -+struct s2 {int (*f) (double a);}; -+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -+int argc; -+char **argv; -+int -+main () -+{ -+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; -+ ; -+ return 0; -+} -+_ACEOF -+# Don't try gcc -ansi; that turns off useful extensions and -+# breaks some systems' header files. -+# AIX -qlanglvl=ansi -+# Ultrix and OSF/1 -std1 -+# HP-UX 10.20 and later -Ae -+# HP-UX older versions -Aa -D_HPUX_SOURCE -+# SVR4 -Xc -D__EXTENSIONS__ -+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -+do -+ CC="$ac_save_CC $ac_arg" -+ rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_prog_cc_stdc=$ac_arg -+break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext -+done -+rm -f conftest.$ac_ext conftest.$ac_objext -+CC=$ac_save_CC -+ -+fi -+ -+case "x$ac_cv_prog_cc_stdc" in -+ x|xno) -+ echo "$as_me:$LINENO: result: none needed" >&5 -+echo "${ECHO_T}none needed" >&6 ;; -+ *) -+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 -+ CC="$CC $ac_cv_prog_cc_stdc" ;; -+esac -+ -+# Some people use a C++ compiler to compile C. Since we use `exit', -+# in C++ we need to declare it. In case someone uses the same compiler -+# for both compiling C and C++ we need to have the C++ compiler decide -+# the declaration of exit, since it's the most demanding environment. -+cat >conftest.$ac_ext <<_ACEOF -+@%:@ifndef __cplusplus -+ choke me -+@%:@endif -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ for ac_declaration in \ -+ '' \ -+ 'extern "C" void std::exit (int) throw (); using std::exit;' \ -+ 'extern "C" void std::exit (int); using std::exit;' \ -+ 'extern "C" void exit (int) throw ();' \ -+ 'extern "C" void exit (int);' \ -+ 'void exit (int);' -+do -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_declaration -+@%:@include <stdlib.h> -+int -+main () -+{ -+exit (42); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ : -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+continue -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_declaration -+int -+main () -+{ -+exit (42); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+done -+rm -f conftest* -+if test -n "$ac_declaration"; then -+ echo '#ifdef __cplusplus' >>confdefs.h -+ echo $ac_declaration >>confdefs.h -+ echo '#endif' >>confdefs.h -+fi -+ -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ -+missing_dir=`cd $ac_aux_dir && pwd` -+for ac_prog in flex lex -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_LEX+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$LEX"; then -+ ac_cv_prog_LEX="$LEX" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_LEX="$ac_prog" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+LEX=$ac_cv_prog_LEX -+if test -n "$LEX"; then -+ echo "$as_me:$LINENO: result: $LEX" >&5 -+echo "${ECHO_T}$LEX" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ test -n "$LEX" && break -+done -+test -n "$LEX" || LEX="$missing_dir/missing flex" -+ -+for ac_prog in flex lex -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_LEX+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$LEX"; then -+ ac_cv_prog_LEX="$LEX" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_LEX="$ac_prog" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+LEX=$ac_cv_prog_LEX -+if test -n "$LEX"; then -+ echo "$as_me:$LINENO: result: $LEX" >&5 -+echo "${ECHO_T}$LEX" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ test -n "$LEX" && break -+done -+test -n "$LEX" || LEX=":" -+ -+if test -z "$LEXLIB" -+then -+ echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 -+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 -+if test "${ac_cv_lib_fl_yywrap+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lfl $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char yywrap (); -+int -+main () -+{ -+yywrap (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_fl_yywrap=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_fl_yywrap=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 -+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 -+if test $ac_cv_lib_fl_yywrap = yes; then -+ LEXLIB="-lfl" -+else -+ echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 -+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 -+if test "${ac_cv_lib_l_yywrap+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-ll $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char yywrap (); -+int -+main () -+{ -+yywrap (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_l_yywrap=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_l_yywrap=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 -+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 -+if test $ac_cv_lib_l_yywrap = yes; then -+ LEXLIB="-ll" -+fi -+ -+fi -+ -+fi -+ -+if test "x$LEX" != "x:"; then -+ echo "$as_me:$LINENO: checking lex output file root" >&5 -+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 -+if test "${ac_cv_prog_lex_root+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ # The minimal lex program is just a single line: %%. But some broken lexes -+# (Solaris, I think it was) want two %% lines, so accommodate them. -+cat >conftest.l <<_ACEOF -+%% -+%% -+_ACEOF -+{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 -+ (eval $LEX conftest.l) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+if test -f lex.yy.c; then -+ ac_cv_prog_lex_root=lex.yy -+elif test -f lexyy.c; then -+ ac_cv_prog_lex_root=lexyy -+else -+ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 -+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} -+ { (exit 1); exit 1; }; } -+fi -+fi -+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 -+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 -+rm -f conftest.l -+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root -+ -+echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 -+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 -+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ # POSIX says lex can declare yytext either as a pointer or an array; the -+# default is implementation-dependent. Figure out which it is, since -+# not all implementations provide the %pointer and %array declarations. -+ac_cv_prog_lex_yytext_pointer=no -+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c -+ac_save_LIBS=$LIBS -+LIBS="$LIBS $LEXLIB" -+cat >conftest.$ac_ext <<_ACEOF -+`cat $LEX_OUTPUT_ROOT.c` -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_prog_lex_yytext_pointer=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_save_LIBS -+rm -f "${LEX_OUTPUT_ROOT}.c" -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 -+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 -+if test $ac_cv_prog_lex_yytext_pointer = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+@%:@define YYTEXT_POINTER 1 -+_ACEOF -+ -+fi -+ -+fi -+ -+for ac_prog in 'bison -y' byacc -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_YACC+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$YACC"; then -+ ac_cv_prog_YACC="$YACC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_YACC="$ac_prog" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+YACC=$ac_cv_prog_YACC -+if test -n "$YACC"; then -+ echo "$as_me:$LINENO: result: $YACC" >&5 -+echo "${ECHO_T}$YACC" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ test -n "$YACC" && break -+done -+test -n "$YACC" || YACC="yacc" -+ -+# Find a good install program. We prefer a C program (faster), -+# so one script is as good as another. But avoid the broken or -+# incompatible versions: -+# SysV /etc/install, /usr/sbin/install -+# SunOS /usr/etc/install -+# IRIX /sbin/install -+# AIX /bin/install -+# AmigaOS /C/install, which installs bootblocks on floppy discs -+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -+# AFS /usr/afsws/bin/install, which mishandles nonexistent args -+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -+# OS/2's system install, which has a completely different semantic -+# ./install, which can be erroneously created by make from ./install.sh. -+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -+if test -z "$INSTALL"; then -+if test "${ac_cv_path_install+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ # Account for people who put trailing slashes in PATH elements. -+case $as_dir/ in -+ ./ | .// | /cC/* | \ -+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ -+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ -+ /usr/ucb/* ) ;; -+ *) -+ # OSF1 and SCO ODT 3.0 have their own names for install. -+ # Don't use installbsd from OSF since it installs stuff as root -+ # by default. -+ for ac_prog in ginstall scoinst install; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then -+ if test $ac_prog = install && -+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then -+ # AIX install. It has an incompatible calling convention. -+ : -+ elif test $ac_prog = install && -+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then -+ # program-specific install script used by HP pwplus--don't use. -+ : -+ else -+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" -+ break 3 -+ fi -+ fi -+ done -+ done -+ ;; -+esac -+done -+ -+ -+fi -+ if test "${ac_cv_path_install+set}" = set; then -+ INSTALL=$ac_cv_path_install -+ else -+ # As a last resort, use the slow shell script. We don't cache a -+ # path for INSTALL within a source directory, because that will -+ # break other packages using the cache if that directory is -+ # removed, or if the path is relative. -+ INSTALL=$ac_install_sh -+ fi -+fi -+echo "$as_me:$LINENO: result: $INSTALL" >&5 -+echo "${ECHO_T}$INSTALL" >&6 -+ -+# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -+# It thinks the first close brace ends the variable substitution. -+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -+ -+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -+ -+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -+ -+ -+# Check whether --enable-shared or --disable-shared was given. -+if test "${enable_shared+set}" = set; then -+ enableval="$enable_shared" -+ p=${PACKAGE-default} -+case $enableval in -+yes) enable_shared=yes ;; -+no) enable_shared=no ;; -+*) -+ enable_shared=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_shared=yes -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac -+else -+ enable_shared=yes -+fi; -+# Check whether --enable-static or --disable-static was given. -+if test "${enable_static+set}" = set; then -+ enableval="$enable_static" -+ p=${PACKAGE-default} -+case $enableval in -+yes) enable_static=yes ;; -+no) enable_static=no ;; -+*) -+ enable_static=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_static=yes -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac -+else -+ enable_static=yes -+fi; -+# Check whether --enable-fast-install or --disable-fast-install was given. -+if test "${enable_fast_install+set}" = set; then -+ enableval="$enable_fast_install" -+ p=${PACKAGE-default} -+case $enableval in -+yes) enable_fast_install=yes ;; -+no) enable_fast_install=no ;; -+*) -+ enable_fast_install=no -+ # Look at the argument we got. We use all the common list separators. -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," -+ for pkg in $enableval; do -+ if test "X$pkg" = "X$p"; then -+ enable_fast_install=yes -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac -+else -+ enable_fast_install=yes -+fi; -+# Find the correct PATH separator. Usually this is `:', but -+# DJGPP uses `;' like DOS. -+if test "X${PATH_SEPARATOR+set}" != Xset; then -+ UNAME=${UNAME-`uname 2>/dev/null`} -+ case X$UNAME in -+ *-DOS) lt_cv_sys_path_separator=';' ;; -+ *) lt_cv_sys_path_separator=':' ;; -+ esac -+ PATH_SEPARATOR=$lt_cv_sys_path_separator -+fi -+ -+ -+# Check whether --with-gnu-ld or --without-gnu-ld was given. -+if test "${with_gnu_ld+set}" = set; then -+ withval="$with_gnu_ld" -+ test "$withval" = no || with_gnu_ld=yes -+else -+ with_gnu_ld=no -+fi; -+ac_prog=ld -+if test "$GCC" = yes; then -+ # Check if gcc -print-prog-name=ld gives a path. -+ echo "$as_me:$LINENO: checking for ld used by GCC" >&5 -+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 -+ case $host in -+ *-*-mingw*) -+ # gcc leaves a trailing carriage return which upsets mingw -+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -+ *) -+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -+ esac -+ case $ac_prog in -+ # Accept absolute paths. -+ [\\/]* | [A-Za-z]:[\\/]*) -+ re_direlt='/[^/][^/]*/\.\./' -+ # Canonicalize the path of ld -+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` -+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do -+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` -+ done -+ test -z "$LD" && LD="$ac_prog" -+ ;; -+ "") -+ # If it fails, then pretend we aren't using GCC. -+ ac_prog=ld -+ ;; -+ *) -+ # If it is relative, then search for the first ld in PATH. -+ with_gnu_ld=unknown -+ ;; -+ esac -+elif test "$with_gnu_ld" = yes; then -+ echo "$as_me:$LINENO: checking for GNU ld" >&5 -+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 -+else -+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 -+fi -+if test "${lt_cv_path_LD+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -z "$LD"; then -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for ac_dir in $PATH; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -+ lt_cv_path_LD="$ac_dir/$ac_prog" -+ # Check to see if the program is GNU ld. I'd rather use --version, -+ # but apparently some GNU ld's only accept -v. -+ # Break only if it was the GNU/non-GNU ld that we prefer. -+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then -+ test "$with_gnu_ld" != no && break -+ else -+ test "$with_gnu_ld" != yes && break -+ fi -+ fi -+ done -+ IFS="$ac_save_ifs" -+else -+ lt_cv_path_LD="$LD" # Let the user override the test with a path. -+fi -+fi -+ -+LD="$lt_cv_path_LD" -+if test -n "$LD"; then -+ echo "$as_me:$LINENO: result: $LD" >&5 -+echo "${ECHO_T}$LD" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} -+ { (exit 1); exit 1; }; } -+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -+if test "${lt_cv_prog_gnu_ld+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ # I'd rather use --version here, but apparently some GNU ld's only accept -v. -+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then -+ lt_cv_prog_gnu_ld=yes -+else -+ lt_cv_prog_gnu_ld=no -+fi -+fi -+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 -+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -+with_gnu_ld=$lt_cv_prog_gnu_ld -+ -+ -+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 -+if test "${lt_cv_ld_reload_flag+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ lt_cv_ld_reload_flag='-r' -+fi -+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 -+reload_flag=$lt_cv_ld_reload_flag -+test -n "$reload_flag" && reload_flag=" $reload_flag" -+ -+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 -+if test "${lt_cv_path_NM+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$NM"; then -+ # Let the user override the test. -+ lt_cv_path_NM="$NM" -+else -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do -+ test -z "$ac_dir" && ac_dir=. -+ tmp_nm=$ac_dir/${ac_tool_prefix}nm -+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then -+ # Check to see if the nm accepts a BSD-compat flag. -+ # Adding the `sed 1q' prevents false positives on HP-UX, which says: -+ # nm: unknown option "B" ignored -+ # Tru64's nm complains that /dev/null is an invalid object file -+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -B" -+ break -+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then -+ lt_cv_path_NM="$tmp_nm -p" -+ break -+ else -+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but -+ continue # so that we can try to find one that supports BSD flags -+ fi -+ fi -+ done -+ IFS="$ac_save_ifs" -+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -+fi -+fi -+ -+NM="$lt_cv_path_NM" -+echo "$as_me:$LINENO: result: $NM" >&5 -+echo "${ECHO_T}$NM" >&6 -+ -+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 -+if test "${lt_cv_path_SED+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ # Loop through the user's path and test for sed and gsed. -+# Then use that list of sed's as ones to test for truncation. -+as_executable_p="test -f" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_prog in sed gsed; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then -+ _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" -+ fi -+ done -+ done -+done -+ -+ # Create a temporary directory, and hook for its removal unless debugging. -+$debug || -+{ -+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 -+ trap '{ (exit 1); exit 1; }' 1 2 13 15 -+} -+ -+# Create a (secure) tmp directory for tmp files. -+: ${TMPDIR=/tmp} -+{ -+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && -+ test -n "$tmp" && test -d "$tmp" -+} || -+{ -+ tmp=$TMPDIR/sed$$-$RANDOM -+ (umask 077 && mkdir $tmp) -+} || -+{ -+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 -+ { (exit 1); exit 1; } -+} -+ _max=0 -+ _count=0 -+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris -+ # along with /bin/sed that truncates output. -+ for _sed in $_sed_list /usr/xpg4/bin/sed; do -+ test ! -f ${_sed} && break -+ cat /dev/null > "$tmp/sed.in" -+ _count=0 -+ echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" -+ # Check for GNU sed and select it if it is found. -+ if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then -+ lt_cv_path_SED=${_sed} -+ break -+ fi -+ while true; do -+ cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" -+ mv "$tmp/sed.tmp" "$tmp/sed.in" -+ cp "$tmp/sed.in" "$tmp/sed.nl" -+ echo >>"$tmp/sed.nl" -+ ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break -+ cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break -+ # 40000 chars as input seems more than enough -+ test $_count -gt 10 && break -+ _count=`expr $_count + 1` -+ if test $_count -gt $_max; then -+ _max=$_count -+ lt_cv_path_SED=$_sed -+ fi -+ done -+ done -+ rm -rf "$tmp" -+ -+fi -+ -+if test "X$SED" != "X"; then -+ lt_cv_path_SED=$SED -+else -+ SED=$lt_cv_path_SED -+fi -+echo "$as_me:$LINENO: result: $SED" >&5 -+echo "${ECHO_T}$SED" >&6 -+ -+echo "$as_me:$LINENO: checking whether ln -s works" >&5 -+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -+LN_S=$as_ln_s -+if test "$LN_S" = "ln -s"; then -+ echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6 -+else -+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -+echo "${ECHO_T}no, using $LN_S" >&6 -+fi -+ -+echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 -+if test "${lt_cv_deplibs_check_method+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ lt_cv_file_magic_cmd='$MAGIC_CMD' -+lt_cv_file_magic_test_file= -+lt_cv_deplibs_check_method='unknown' -+# Need to set the preceding variable on all platforms that support -+# interlibrary dependencies. -+# 'none' -- dependencies not supported. -+# `unknown' -- same as none, but documents that we really don't know. -+# 'pass_all' -- all dependencies passed with no checks. -+# 'test_compile' -- check by making test program. -+# 'file_magic [[regex]]' -- check by looking for files in library path -+# which responds to the $file_magic_cmd with a given egrep regex. -+# If you have `file' or equivalent on your system and you're not sure -+# whether `pass_all' will *always* work, you probably want this one. -+ -+case $host_os in -+aix4* | aix5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+beos*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+bsdi4*) -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ lt_cv_file_magic_test_file=/shlib/libc.so -+ ;; -+ -+cygwin* | mingw* | pw32*) -+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ lt_cv_file_magic_cmd='$OBJDUMP -f' -+ ;; -+ -+darwin* | rhapsody*) -+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' -+ lt_cv_file_magic_cmd='/usr/bin/file -L' -+ case "$host_os" in -+ rhapsody* | darwin1.[012]) -+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` -+ ;; -+ *) # Darwin 1.3 on -+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' -+ ;; -+ esac -+ ;; -+ -+freebsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -+ case $host_cpu in -+ i*86 ) -+ # Not sure whether the presence of OpenBSD here was a mistake. -+ # Let's accept both of them until this is cleared up. -+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -+ ;; -+ esac -+ else -+ lt_cv_deplibs_check_method=pass_all -+ fi -+ ;; -+ -+gnu*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+hpux10.20*|hpux11*) -+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=/usr/lib/libc.sl -+ ;; -+ -+irix5* | irix6* | nonstopux*) -+ case $host_os in -+ irix5* | nonstopux*) -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" -+ ;; -+ *) -+ case $LD in -+ *-32|*"-32 ") libmagic=32-bit;; -+ *-n32|*"-n32 ") libmagic=N32;; -+ *-64|*"-64 ") libmagic=64-bit;; -+ *) libmagic=never-match;; -+ esac -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" -+ ;; -+ esac -+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+# This must be Linux ELF. -+linux-gnu*) -+ case $host_cpu in -+ alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | arm* | m68k) -+ lt_cv_deplibs_check_method=pass_all ;; -+ *) -+ # glibc up to 2.1.1 does not perform some relocations on ARM -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; -+ esac -+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` -+ ;; -+ -+netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then -+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -+ else -+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' -+ fi -+ ;; -+ -+newos6*) -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=/usr/lib/libnls.so -+ ;; -+ -+openbsd*) -+ lt_cv_file_magic_cmd=/usr/bin/file -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' -+ else -+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' -+ fi -+ ;; -+ -+osf3* | osf4* | osf5*) -+ # this will be overridden with pass_all, but let us keep it just in case -+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' -+ lt_cv_file_magic_test_file=/shlib/libc.so -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+sco3.2v5*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+solaris*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=/lib/libc.so -+ ;; -+ -+sysv5uw[78]* | sysv4*uw2*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ -+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ case $host_vendor in -+ motorola) -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' -+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` -+ ;; -+ ncr) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ sequent) -+ lt_cv_file_magic_cmd='/bin/file' -+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' -+ ;; -+ sni) -+ lt_cv_file_magic_cmd='/bin/file' -+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" -+ lt_cv_file_magic_test_file=/lib/libc.so -+ ;; -+ siemens) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ esac -+ ;; -+esac -+ -+fi -+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 -+file_magic_cmd=$lt_cv_file_magic_cmd -+deplibs_check_method=$lt_cv_deplibs_check_method -+ -+ -+ -+ -+ -+ -+ -+# Check for command to grab the raw symbol name followed by C symbol from nm. -+echo "$as_me:$LINENO: checking command to parse $NM output" >&5 -+echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6 -+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+# These are sane defaults that work on at least a few old systems. -+# [They come from Ultrix. What could be older than Ultrix?!! ;)] -+ -+# Character class describing NM global symbol codes. -+symcode='[BCDEGRST]' -+ -+# Regexp to match symbols that can be accessed directly from C. -+sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -+ -+# Transform the above into a raw symbol and a C symbol. -+symxfrm='\1 \2\3 \3' -+ -+# Transform an extracted symbol line into a proper C declaration -+lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" -+ -+# Transform an extracted symbol line into symbol name and symbol address -+lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ -+# Define system-specific variables. -+case $host_os in -+aix*) -+ symcode='[BCDT]' -+ ;; -+cygwin* | mingw* | pw32*) -+ symcode='[ABCDGISTW]' -+ ;; -+hpux*) # Its linker distinguishes data from code symbols -+ lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -+ lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -+ ;; -+irix* | nonstopux*) -+ symcode='[BCDEGRST]' -+ ;; -+osf*) -+ symcode='[BCDEGQRST]' -+ ;; -+solaris* | sysv5*) -+ symcode='[BDT]' -+ ;; -+sysv4) -+ symcode='[DFNSTU]' -+ ;; -+esac -+ -+# Handle CRLF in mingw tool chain -+opt_cr= -+case $host_os in -+mingw*) -+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp -+ ;; -+esac -+ -+# If we're using GNU nm, then use its standard symbol codes. -+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then -+ symcode='[ABCDGISTW]' -+fi -+ -+# Try without a prefix undercore, then with it. -+for ac_symprfx in "" "_"; do -+ -+ # Write the raw and C identifiers. -+lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" -+ -+ # Check to see that the pipe works correctly. -+ pipe_works=no -+ rm -f conftest* -+ cat > conftest.$ac_ext <<EOF -+#ifdef __cplusplus -+extern "C" { -+#endif -+char nm_test_var; -+void nm_test_func(){} -+#ifdef __cplusplus -+} -+#endif -+int main(){nm_test_var='a';nm_test_func();return(0);} -+EOF -+ -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ # Now try to grab the symbols. -+ nlist=conftest.nm -+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 -+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && test -s "$nlist"; then -+ # Try sorting and uniquifying the output. -+ if sort "$nlist" | uniq > "$nlist"T; then -+ mv -f "$nlist"T "$nlist" -+ else -+ rm -f "$nlist"T -+ fi -+ -+ # Make sure that we snagged all the symbols we need. -+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then -+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then -+ cat <<EOF > conftest.$ac_ext -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+EOF -+ # Now generate the symbol file. -+ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' -+ -+ cat <<EOF >> conftest.$ac_ext -+#if defined (__STDC__) && __STDC__ -+# define lt_ptr void * -+#else -+# define lt_ptr char * -+# define const -+#endif -+ -+/* The mapping between symbol names and symbols. */ -+const struct { -+ const char *name; -+ lt_ptr address; -+} -+lt_preloaded_symbols[] = -+{ -+EOF -+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext -+ cat <<\EOF >> conftest.$ac_ext -+ {0, (lt_ptr) 0} -+}; -+ -+#ifdef __cplusplus -+} -+#endif -+EOF -+ # Now try linking the two files. -+ mv conftest.$ac_objext conftstm.$ac_objext -+ save_LIBS="$LIBS" -+ save_CFLAGS="$CFLAGS" -+ LIBS="conftstm.$ac_objext" -+ CFLAGS="$CFLAGS$no_builtin_flag" -+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && test -s conftest$ac_exeext; then -+ pipe_works=yes -+ fi -+ LIBS="$save_LIBS" -+ CFLAGS="$save_CFLAGS" -+ else -+ echo "cannot find nm_test_func in $nlist" >&5 -+ fi -+ else -+ echo "cannot find nm_test_var in $nlist" >&5 -+ fi -+ else -+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 -+ fi -+ else -+ echo "$progname: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ fi -+ rm -f conftest* conftst* -+ -+ # Do not use the global_symbol_pipe unless it works. -+ if test "$pipe_works" = yes; then -+ break -+ else -+ lt_cv_sys_global_symbol_pipe= -+ fi -+done -+ -+fi -+ -+global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" -+if test -z "$lt_cv_sys_global_symbol_pipe"; then -+ global_symbol_to_cdecl= -+ global_symbol_to_c_name_address= -+else -+ global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" -+ global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" -+fi -+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; -+then -+ echo "$as_me:$LINENO: result: failed" >&5 -+echo "${ECHO_T}failed" >&6 -+else -+ echo "$as_me:$LINENO: result: ok" >&5 -+echo "${ECHO_T}ok" >&6 -+fi -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -+# On Suns, sometimes $CPP names a directory. -+if test -n "$CPP" && test -d "$CPP"; then -+ CPP= -+fi -+if test -z "$CPP"; then -+ if test "${ac_cv_prog_CPP+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ # Double quotes because CPP needs to be expanded -+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" -+ do -+ ac_preproc_ok=false -+for ac_c_preproc_warn_flag in '' yes -+do -+ # Use a header file that comes with gcc, so configuring glibc -+ # with a fresh cross-compiler works. -+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -+ # <limits.h> exists even on freestanding compilers. -+ # On the NeXT, cc -E runs the code through the compiler's parser, -+ # not just through cpp. "Syntax error" is here to catch this case. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+@%:@ifdef __STDC__ -+@%:@ include <limits.h> -+@%:@else -+@%:@ include <assert.h> -+@%:@endif -+ Syntax error -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ : -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Broken: fails on valid input. -+continue -+fi -+rm -f conftest.err conftest.$ac_ext -+ -+ # OK, works on sane cases. Now check whether non-existent headers -+ # can be detected and how. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+@%:@include <ac_nonexistent.h> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ # Broken: success on invalid input. -+continue -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Passes both tests. -+ac_preproc_ok=: -+break -+fi -+rm -f conftest.err conftest.$ac_ext -+ -+done -+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then -+ break -+fi -+ -+ done -+ ac_cv_prog_CPP=$CPP -+ -+fi -+ CPP=$ac_cv_prog_CPP -+else -+ ac_cv_prog_CPP=$CPP -+fi -+echo "$as_me:$LINENO: result: $CPP" >&5 -+echo "${ECHO_T}$CPP" >&6 -+ac_preproc_ok=false -+for ac_c_preproc_warn_flag in '' yes -+do -+ # Use a header file that comes with gcc, so configuring glibc -+ # with a fresh cross-compiler works. -+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -+ # <limits.h> exists even on freestanding compilers. -+ # On the NeXT, cc -E runs the code through the compiler's parser, -+ # not just through cpp. "Syntax error" is here to catch this case. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+@%:@ifdef __STDC__ -+@%:@ include <limits.h> -+@%:@else -+@%:@ include <assert.h> -+@%:@endif -+ Syntax error -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ : -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Broken: fails on valid input. -+continue -+fi -+rm -f conftest.err conftest.$ac_ext -+ -+ # OK, works on sane cases. Now check whether non-existent headers -+ # can be detected and how. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+@%:@include <ac_nonexistent.h> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ # Broken: success on invalid input. -+continue -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Passes both tests. -+ac_preproc_ok=: -+break -+fi -+rm -f conftest.err conftest.$ac_ext -+ -+done -+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then -+ : -+else -+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&5 -+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ -+echo "$as_me:$LINENO: checking for egrep" >&5 -+echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -+if test "${ac_cv_prog_egrep+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1 -+ then ac_cv_prog_egrep='grep -E' -+ else ac_cv_prog_egrep='egrep' -+ fi -+fi -+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -+echo "${ECHO_T}$ac_cv_prog_egrep" >&6 -+ EGREP=$ac_cv_prog_egrep -+ -+ -+echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -+if test "${ac_cv_header_stdc+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <stdlib.h> -+#include <stdarg.h> -+#include <string.h> -+#include <float.h> -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_header_stdc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_header_stdc=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+if test $ac_cv_header_stdc = yes; then -+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <string.h> -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "memchr" >/dev/null 2>&1; then -+ : -+else -+ ac_cv_header_stdc=no -+fi -+rm -f conftest* -+ -+fi -+ -+if test $ac_cv_header_stdc = yes; then -+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <stdlib.h> -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "free" >/dev/null 2>&1; then -+ : -+else -+ ac_cv_header_stdc=no -+fi -+rm -f conftest* -+ -+fi -+ -+if test $ac_cv_header_stdc = yes; then -+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -+ if test "$cross_compiling" = yes; then -+ : -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <ctype.h> -+#if ((' ' & 0x0FF) == 0x020) -+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -+#else -+# define ISLOWER(c) \ -+ (('a' <= (c) && (c) <= 'i') \ -+ || ('j' <= (c) && (c) <= 'r') \ -+ || ('s' <= (c) && (c) <= 'z')) -+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -+#endif -+ -+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -+int -+main () -+{ -+ int i; -+ for (i = 0; i < 256; i++) -+ if (XOR (islower (i), ISLOWER (i)) -+ || toupper (i) != TOUPPER (i)) -+ exit(2); -+ exit (0); -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ : -+else -+ echo "$as_me: program exited with status $ac_status" >&5 -+echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_header_stdc=no -+fi -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+fi -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -+echo "${ECHO_T}$ac_cv_header_stdc" >&6 -+if test $ac_cv_header_stdc = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+@%:@define STDC_HEADERS 1 -+_ACEOF -+ -+fi -+ -+# On IRIX 5.3, sys/types and inttypes.h are conflicting. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -+ inttypes.h stdint.h unistd.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+ -+@%:@include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ eval "$as_ac_Header=yes" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+eval "$as_ac_Header=no" -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+ -+for ac_header in dlfcn.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking $ac_header usability" >&5 -+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+@%:@include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking $ac_header presence" >&5 -+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+@%:@include <$ac_header> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+@%:@@%:@ ------------------------------------------ @%:@@%:@ -+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -+@%:@@%:@ ------------------------------------------ @%:@@%:@ -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ eval "$as_ac_Header=\$ac_header_preproc" -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+ -+fi -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+ -+ -+ -+ -+# Only perform the check for file, if the check method requires it -+case $deplibs_check_method in -+file_magic*) -+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then -+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 -+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ case $MAGIC_CMD in -+ /*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. -+ ;; -+ *) -+ ac_save_MAGIC_CMD="$MAGIC_CMD" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="/usr/bin:$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/${ac_tool_prefix}file; then -+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" -+ if test -n "$file_magic_test_file"; then -+ case $deplibs_check_method in -+ "file_magic "*) -+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" -+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -+ egrep "$file_magic_regex" > /dev/null; then -+ : -+ else -+ cat <<EOF 1>&2 -+ -+*** Warning: the command libtool uses to detect shared libraries, -+*** $file_magic_cmd, produces output that libtool cannot recognize. -+*** The result is that libtool may fail to recognize shared libraries -+*** as such. This will affect the creation of libtool libraries that -+*** depend on shared libraries, but programs linked with such libtool -+*** libraries will work regardless of this problem. Nevertheless, you -+*** may want to report the problem to your system manager and/or to -+*** bug-libtool@gnu.org -+ -+EOF -+ fi ;; -+ esac -+ fi -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ MAGIC_CMD="$ac_save_MAGIC_CMD" -+ ;; -+esac -+fi -+ -+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+if test -n "$MAGIC_CMD"; then -+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -+echo "${ECHO_T}$MAGIC_CMD" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+if test -z "$lt_cv_path_MAGIC_CMD"; then -+ if test -n "$ac_tool_prefix"; then -+ echo "$as_me:$LINENO: checking for file" >&5 -+echo $ECHO_N "checking for file... $ECHO_C" >&6 -+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ case $MAGIC_CMD in -+ /*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. -+ ;; -+ *) -+ ac_save_MAGIC_CMD="$MAGIC_CMD" -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy="/usr/bin:$PATH" -+ for ac_dir in $ac_dummy; do -+ test -z "$ac_dir" && ac_dir=. -+ if test -f $ac_dir/file; then -+ lt_cv_path_MAGIC_CMD="$ac_dir/file" -+ if test -n "$file_magic_test_file"; then -+ case $deplibs_check_method in -+ "file_magic "*) -+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" -+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -+ egrep "$file_magic_regex" > /dev/null; then -+ : -+ else -+ cat <<EOF 1>&2 -+ -+*** Warning: the command libtool uses to detect shared libraries, -+*** $file_magic_cmd, produces output that libtool cannot recognize. -+*** The result is that libtool may fail to recognize shared libraries -+*** as such. This will affect the creation of libtool libraries that -+*** depend on shared libraries, but programs linked with such libtool -+*** libraries will work regardless of this problem. Nevertheless, you -+*** may want to report the problem to your system manager and/or to -+*** bug-libtool@gnu.org -+ -+EOF -+ fi ;; -+ esac -+ fi -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ MAGIC_CMD="$ac_save_MAGIC_CMD" -+ ;; -+esac -+fi -+ -+MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+if test -n "$MAGIC_CMD"; then -+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -+echo "${ECHO_T}$MAGIC_CMD" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ else -+ MAGIC_CMD=: -+ fi -+fi -+ -+ fi -+ ;; -+esac -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -+set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_RANLIB+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$RANLIB"; then -+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+RANLIB=$ac_cv_prog_RANLIB -+if test -n "$RANLIB"; then -+ echo "$as_me:$LINENO: result: $RANLIB" >&5 -+echo "${ECHO_T}$RANLIB" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+fi -+if test -z "$ac_cv_prog_RANLIB"; then -+ ac_ct_RANLIB=$RANLIB -+ # Extract the first word of "ranlib", so it can be a program name with args. -+set dummy ranlib; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$ac_ct_RANLIB"; then -+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_RANLIB="ranlib" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" -+fi -+fi -+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -+if test -n "$ac_ct_RANLIB"; then -+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -+echo "${ECHO_T}$ac_ct_RANLIB" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ RANLIB=$ac_ct_RANLIB -+else -+ RANLIB="$ac_cv_prog_RANLIB" -+fi -+ -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -+set dummy ${ac_tool_prefix}strip; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_STRIP+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$STRIP"; then -+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_STRIP="${ac_tool_prefix}strip" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+fi -+fi -+STRIP=$ac_cv_prog_STRIP -+if test -n "$STRIP"; then -+ echo "$as_me:$LINENO: result: $STRIP" >&5 -+echo "${ECHO_T}$STRIP" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+fi -+if test -z "$ac_cv_prog_STRIP"; then -+ ac_ct_STRIP=$STRIP -+ # Extract the first word of "strip", so it can be a program name with args. -+set dummy strip; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$ac_ct_STRIP"; then -+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_STRIP="strip" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -+fi -+fi -+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -+if test -n "$ac_ct_STRIP"; then -+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -+echo "${ECHO_T}$ac_ct_STRIP" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ STRIP=$ac_ct_STRIP -+else -+ STRIP="$ac_cv_prog_STRIP" -+fi -+ -+ -+enable_dlopen=no -+enable_win32_dll=no -+ -+# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -+if test "${enable_libtool_lock+set}" = set; then -+ enableval="$enable_libtool_lock" -+ -+fi; -+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -+ -+# Some flags need to be propagated to the compiler or linker for good -+# libtool support. -+case $host in -+*-*-irix6*) -+ # Find out which ABI we are using. -+ echo '#line __oline__ "configure"' > conftest.$ac_ext -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *32-bit*) -+ LD="${LD-ld} -32" -+ ;; -+ *N32*) -+ LD="${LD-ld} -n32" -+ ;; -+ *64-bit*) -+ LD="${LD-ld} -64" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ -+*-*-sco3.2v5*) -+ # On SCO OpenServer 5, we need -belf to get full-featured binaries. -+ SAVE_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -belf" -+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 -+if test "${lt_cv_cc_needs_belf+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ -+ ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ lt_cv_cc_needs_belf=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+lt_cv_cc_needs_belf=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+fi -+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 -+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then -+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -+ CFLAGS="$SAVE_CFLAGS" -+ fi -+ ;; -+ -+ -+esac -+ -+# Sed substitution that helps us do robust quoting. It backslashifies -+# metacharacters that are still active within double-quoted strings. -+Xsed='sed -e s/^X//' -+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' -+ -+# Same as above, but do not quote variable references. -+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' -+ -+# Sed substitution to delay expansion of an escaped shell variable in a -+# double_quote_subst'ed string. -+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -+ -+# Constants: -+rm="rm -f" -+ -+# Global variables: -+default_ofile=libtool -+can_build_shared=yes -+ -+# All known linkers require a `.a' archive for static linking (except M$VC, -+# which needs '.lib'). -+libext=a -+ltmain="$ac_aux_dir/ltmain.sh" -+ofile="$default_ofile" -+with_gnu_ld="$lt_cv_prog_gnu_ld" -+need_locks="$enable_libtool_lock" -+ -+old_CC="$CC" -+old_CFLAGS="$CFLAGS" -+ -+# Set sane defaults for various variables -+test -z "$AR" && AR=ar -+test -z "$AR_FLAGS" && AR_FLAGS=cru -+test -z "$AS" && AS=as -+test -z "$CC" && CC=cc -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+test -z "$LD" && LD=ld -+test -z "$LN_S" && LN_S="ln -s" -+test -z "$MAGIC_CMD" && MAGIC_CMD=file -+test -z "$NM" && NM=nm -+test -z "$OBJDUMP" && OBJDUMP=objdump -+test -z "$RANLIB" && RANLIB=: -+test -z "$STRIP" && STRIP=: -+test -z "$ac_objext" && ac_objext=o -+ -+if test x"$host" != x"$build"; then -+ ac_tool_prefix=${host_alias}- -+else -+ ac_tool_prefix= -+fi -+ -+# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -+case $host_os in -+linux-gnu*) ;; -+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -+esac -+ -+case $host_os in -+aix3*) -+ # AIX sometimes has problems with the GCC collect2 program. For some -+ # reason, if we set the COLLECT_NAMES environment variable, the problems -+ # vanish in a puff of smoke. -+ if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+ fi -+ ;; -+esac -+ -+# Determine commands to create old-style static archives. -+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -+old_postinstall_cmds='chmod 644 $oldlib' -+old_postuninstall_cmds= -+ -+if test -n "$RANLIB"; then -+ case $host_os in -+ openbsd*) -+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" -+ ;; -+ *) -+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -+ ;; -+ esac -+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -+fi -+ -+# Allow CC to be a program name with arguments. -+set dummy $CC -+compiler="$2" -+ -+echo "$as_me:$LINENO: checking for objdir" >&5 -+echo $ECHO_N "checking for objdir... $ECHO_C" >&6 -+rm -f .libs 2>/dev/null -+mkdir .libs 2>/dev/null -+if test -d .libs; then -+ objdir=.libs -+else -+ # MS-DOS does not allow filenames that begin with a dot. -+ objdir=_libs -+fi -+rmdir .libs 2>/dev/null -+echo "$as_me:$LINENO: result: $objdir" >&5 -+echo "${ECHO_T}$objdir" >&6 -+ -+ -+ -+# Check whether --with-pic or --without-pic was given. -+if test "${with_pic+set}" = set; then -+ withval="$with_pic" -+ pic_mode="$withval" -+else -+ pic_mode=default -+fi; -+test -z "$pic_mode" && pic_mode=default -+ -+# We assume here that the value for lt_cv_prog_cc_pic will not be cached -+# in isolation, and that seeing it set (from the cache) indicates that -+# the associated values are set (in the cache) correctly too. -+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 -+if test "${lt_cv_prog_cc_pic+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_shlib= -+ lt_cv_prog_cc_wl= -+ lt_cv_prog_cc_static= -+ lt_cv_prog_cc_no_builtin= -+ lt_cv_prog_cc_can_build_shared=$can_build_shared -+ -+ if test "$GCC" = yes; then -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-static' -+ -+ case $host_os in -+ aix*) -+ # Below there is a dirty hack to force normal static linking with -ldl -+ # The problem is because libdl dynamically linked with both libc and -+ # libC (AIX C++ library), which obviously doesn't included in libraries -+ # list by gcc. This cause undefined symbols with -static flags. -+ # This hack allows C programs to be linked with "-static -ldl", but -+ # not sure about C++ programs. -+ lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" -+ ;; -+ amigaos*) -+ # FIXME: we need at least 68020 code to build shared libraries, but -+ # adding the `-m68020' flag to GCC prevents building anything better, -+ # like `-m68040'. -+ lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' -+ ;; -+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -+ # PIC is the default for these OSes. -+ ;; -+ darwin* | rhapsody*) -+ # PIC is the default on this platform -+ # Common symbols not allowed in MH_DYLIB files -+ lt_cv_prog_cc_pic='-fno-common' -+ ;; -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' -+ ;; -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ lt_cv_prog_cc_pic=-Kconform_pic -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic='-fPIC' -+ ;; -+ esac -+ else -+ # PORTME Check for PIC flags for the system compiler. -+ case $host_os in -+ aix3* | aix4* | aix5*) -+ lt_cv_prog_cc_wl='-Wl,' -+ # All AIX code is PIC. -+ if test "$host_cpu" = ia64; then -+ # AIX 5 now supports IA64 processor -+ lt_cv_prog_cc_static='-Bstatic' -+ else -+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' -+ fi -+ ;; -+ -+ hpux9* | hpux10* | hpux11*) -+ # Is there a better lt_cv_prog_cc_static that works with the bundled CC? -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" -+ lt_cv_prog_cc_pic='+Z' -+ ;; -+ -+ irix5* | irix6* | nonstopux*) -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' -+ # PIC (with -KPIC) is the default. -+ ;; -+ -+ cygwin* | mingw* | pw32* | os2*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ lt_cv_prog_cc_pic='-DDLL_EXPORT' -+ ;; -+ -+ newsos6) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ ;; -+ -+ osf3* | osf4* | osf5*) -+ # All OSF/1 code is PIC. -+ lt_cv_prog_cc_wl='-Wl,' -+ lt_cv_prog_cc_static='-non_shared' -+ ;; -+ -+ sco3.2v5*) -+ lt_cv_prog_cc_pic='-Kpic' -+ lt_cv_prog_cc_static='-dn' -+ lt_cv_prog_cc_shlib='-belf' -+ ;; -+ -+ solaris*) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ sunos4*) -+ lt_cv_prog_cc_pic='-PIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Qoption ld ' -+ ;; -+ -+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ lt_cv_prog_cc_pic='-KPIC' -+ lt_cv_prog_cc_static='-Bstatic' -+ lt_cv_prog_cc_wl='-Wl,' -+ ;; -+ -+ uts4*) -+ lt_cv_prog_cc_pic='-pic' -+ lt_cv_prog_cc_static='-Bstatic' -+ ;; -+ -+ sysv4*MP*) -+ if test -d /usr/nec ;then -+ lt_cv_prog_cc_pic='-Kconform_pic' -+ lt_cv_prog_cc_static='-Bstatic' -+ fi -+ ;; -+ -+ *) -+ lt_cv_prog_cc_can_build_shared=no -+ ;; -+ esac -+ fi -+ -+fi -+ -+if test -z "$lt_cv_prog_cc_pic"; then -+ echo "$as_me:$LINENO: result: none" >&5 -+echo "${ECHO_T}none" >&6 -+else -+ echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5 -+echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6 -+ -+ # Check to make sure the pic_flag actually works. -+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 -+echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6 -+ if test "${lt_cv_prog_cc_pic_works+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ case $host_os in -+ hpux9* | hpux10* | hpux11*) -+ # On HP-UX, both CC and GCC only warn that PIC is supported... then -+ # they create non-PIC objects. So, if there were any warnings, we -+ # assume that PIC is not supported. -+ if test -s conftest.err; then -+ lt_cv_prog_cc_pic_works=no -+ else -+ lt_cv_prog_cc_pic_works=yes -+ fi -+ ;; -+ *) -+ lt_cv_prog_cc_pic_works=yes -+ ;; -+ esac -+ -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ lt_cv_prog_cc_pic_works=no -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ CFLAGS="$save_CFLAGS" -+ -+fi -+ -+ -+ if test "X$lt_cv_prog_cc_pic_works" = Xno; then -+ lt_cv_prog_cc_pic= -+ lt_cv_prog_cc_can_build_shared=no -+ else -+ lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" -+ fi -+ -+ echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5 -+echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6 -+fi -+ -+# Check for any special shared library compilation flags. -+if test -n "$lt_cv_prog_cc_shlib"; then -+ { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5 -+echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;} -+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : -+ else -+ { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 -+echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} -+ lt_cv_prog_cc_can_build_shared=no -+ fi -+fi -+ -+echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 -+echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6 -+if test "${lt_cv_prog_cc_static_works+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ lt_cv_prog_cc_static_works=no -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ lt_cv_prog_cc_static_works=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ LDFLAGS="$save_LDFLAGS" -+ -+fi -+ -+ -+# Belt *and* braces to stop my trousers falling down: -+test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= -+echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5 -+echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6 -+ -+pic_flag="$lt_cv_prog_cc_pic" -+special_shlib_compile_flags="$lt_cv_prog_cc_shlib" -+wl="$lt_cv_prog_cc_wl" -+link_static_flag="$lt_cv_prog_cc_static" -+no_builtin_flag="$lt_cv_prog_cc_no_builtin" -+can_build_shared="$lt_cv_prog_cc_can_build_shared" -+ -+ -+# Check to see if options -o and -c are simultaneously supported by compiler -+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -+if test "${lt_cv_compiler_c_o+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+$rm -r conftest 2>/dev/null -+mkdir conftest -+cd conftest -+echo "int some_variable = 0;" > conftest.$ac_ext -+mkdir out -+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -+# that will create temporary files in the current directory regardless of -+# the output directory. Thus, making CWD read-only will cause this test -+# to fail, enabling locking or at least warning the user not to do parallel -+# builds. -+chmod -w . -+save_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" -+compiler_c_o=no -+if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s out/conftest.err; then -+ lt_cv_compiler_c_o=no -+ else -+ lt_cv_compiler_c_o=yes -+ fi -+else -+ # Append any errors to the config.log. -+ cat out/conftest.err 1>&5 -+ lt_cv_compiler_c_o=no -+fi -+CFLAGS="$save_CFLAGS" -+chmod u+w . -+$rm conftest* out/* -+rmdir out -+cd .. -+rmdir conftest -+$rm -r conftest 2>/dev/null -+ -+fi -+ -+compiler_c_o=$lt_cv_compiler_c_o -+echo "$as_me:$LINENO: result: $compiler_c_o" >&5 -+echo "${ECHO_T}$compiler_c_o" >&6 -+ -+if test x"$compiler_c_o" = x"yes"; then -+ # Check to see if we can write to a .lo -+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5 -+echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6 -+ if test "${lt_cv_compiler_o_lo+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ lt_cv_compiler_o_lo=no -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -c -o conftest.lo" -+ save_objext="$ac_objext" -+ ac_objext=lo -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+int some_variable = 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ lt_cv_compiler_o_lo=no -+ else -+ lt_cv_compiler_o_lo=yes -+ fi -+ -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ ac_objext="$save_objext" -+ CFLAGS="$save_CFLAGS" -+ -+fi -+ -+ compiler_o_lo=$lt_cv_compiler_o_lo -+ echo "$as_me:$LINENO: result: $compiler_o_lo" >&5 -+echo "${ECHO_T}$compiler_o_lo" >&6 -+else -+ compiler_o_lo=no -+fi -+ -+# Check to see if we can do hard links to lock some files if needed -+hard_links="nottested" -+if test "$compiler_c_o" = no && test "$need_locks" != no; then -+ # do not overwrite the value of need_locks provided by the user -+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 -+ hard_links=yes -+ $rm conftest* -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ touch conftest.a -+ ln conftest.a conftest.b 2>&5 || hard_links=no -+ ln conftest.a conftest.b 2>/dev/null && hard_links=no -+ echo "$as_me:$LINENO: result: $hard_links" >&5 -+echo "${ECHO_T}$hard_links" >&6 -+ if test "$hard_links" = no; then -+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} -+ need_locks=warn -+ fi -+else -+ need_locks=no -+fi -+ -+if test "$GCC" = yes; then -+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler -+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 -+ echo "int some_variable = 0;" > conftest.$ac_ext -+ save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" -+ compiler_rtti_exceptions=no -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+int some_variable = 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ # The compiler can only warn and ignore the option if not recognized -+ # So say no if there are warnings -+ if test -s conftest.err; then -+ compiler_rtti_exceptions=no -+ else -+ compiler_rtti_exceptions=yes -+ fi -+ -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ CFLAGS="$save_CFLAGS" -+ echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5 -+echo "${ECHO_T}$compiler_rtti_exceptions" >&6 -+ -+ if test "$compiler_rtti_exceptions" = "yes"; then -+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' -+ else -+ no_builtin_flag=' -fno-builtin' -+ fi -+fi -+ -+# See if the linker supports building shared libraries. -+echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5 -+echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6 -+ -+allow_undefined_flag= -+no_undefined_flag= -+need_lib_prefix=unknown -+need_version=unknown -+# when you set need_version to no, make sure it does not cause -set_version -+# flags to be left without arguments -+archive_cmds= -+archive_expsym_cmds= -+old_archive_from_new_cmds= -+old_archive_from_expsyms_cmds= -+export_dynamic_flag_spec= -+whole_archive_flag_spec= -+thread_safe_flag_spec= -+hardcode_into_libs=no -+hardcode_libdir_flag_spec= -+hardcode_libdir_separator= -+hardcode_direct=no -+hardcode_minus_L=no -+hardcode_shlibpath_var=unsupported -+runpath_var= -+link_all_deplibs=unknown -+always_export_symbols=no -+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -+# include_expsyms should be a list of space-separated symbols to be *always* -+# included in the symbol list -+include_expsyms= -+# exclude_expsyms can be an egrep regular expression of symbols to exclude -+# it will be wrapped by ` (' and `)$', so one must not match beginning or -+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -+# as well as any symbol that contains `d'. -+exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -+# platforms (ab)use it in PIC code, but their linkers get confused if -+# the symbol is explicitly referenced. Since portable code cannot -+# rely on this symbol name, it's probably fine to never include it in -+# preloaded symbol tables. -+extract_expsyms_cmds= -+ -+case $host_os in -+cygwin* | mingw* | pw32*) -+ # FIXME: the MSVC++ port hasn't been tested in a loooong time -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ if test "$GCC" != yes; then -+ with_gnu_ld=no -+ fi -+ ;; -+openbsd*) -+ with_gnu_ld=no -+ ;; -+esac -+ -+ld_shlibs=yes -+if test "$with_gnu_ld" = yes; then -+ # If archive_cmds runs LD, not CC, wlarc should be empty -+ wlarc='${wl}' -+ -+ # See if GNU ld supports shared libraries. -+ case $host_os in -+ aix3* | aix4* | aix5*) -+ # On AIX, the GNU linker is very broken -+ # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. -+ ld_shlibs=no -+ cat <<EOF 1>&2 -+ -+*** Warning: the GNU linker, at least up to release 2.9.1, is reported -+*** to be unable to reliably create shared libraries on AIX. -+*** Therefore, libtool is disabling shared libraries support. If you -+*** really care for shared libraries, you may want to modify your PATH -+*** so that a non-GNU linker is found, and then restart. -+ -+EOF -+ ;; -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ -+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports -+ # that the semantics of dynamic libraries on AmigaOS, at least up -+ # to version 4, is to share data among multiple programs linked -+ # with the same dynamic library. Since this doesn't match the -+ # behavior of shared libraries on other platforms, we can use -+ # them. -+ ld_shlibs=no -+ ;; -+ -+ beos*) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ allow_undefined_flag=unsupported -+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc -+ # support --undefined. This deserves some investigation. FIXME -+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec='-L$libdir' -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ -+ extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ -+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ -+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ -+ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ -+ else $CC -o impgen impgen.c ; fi)~ -+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' -+ -+ old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' -+ -+ # cygwin and mingw dlls have different entry points and sets of symbols -+ # to exclude. -+ # FIXME: what about values for MSVC? -+ dll_entry=__cygwin_dll_entry@12 -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ -+ case $host_os in -+ mingw*) -+ # mingw values -+ dll_entry=_DllMainCRTStartup@12 -+ dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ -+ ;; -+ esac -+ -+ # mingw and cygwin differ, and it's simplest to just exclude the union -+ # of the two symbol sets. -+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 -+ -+ # recent cygwin and mingw systems supply a stub DllMain which the user -+ # can override, but on older systems we have to supply one (in ltdll.c) -+ if test "x$lt_cv_need_dllmain" = "xyes"; then -+ ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " -+ ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ -+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' -+ else -+ ltdll_obj= -+ ltdll_cmds= -+ fi -+ -+ # Extract the symbol export list from an `--export-all' def file, -+ # then regenerate the def file from the symbol export list, so that -+ # the compiled dll only exports the symbol export list. -+ # Be careful not to strip the DATA tag left be newer dlltools. -+ export_symbols_cmds="$ltdll_cmds"' -+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ -+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' -+ -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is. -+ # If DATA tags from a recent dlltool are present, honour them! -+ archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname-def; -+ else -+ echo EXPORTS > $output_objdir/$soname-def; -+ _lt_hint=1; -+ cat $export_symbols | while read symbol; do -+ set dummy \$symbol; -+ case \$# in -+ 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; -+ 4) echo " \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; -+ *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; -+ esac; -+ _lt_hint=`expr 1 + \$_lt_hint`; -+ done; -+ fi~ -+ '"$ltdll_cmds"' -+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ -+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ -+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ -+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' -+ ;; -+ -+ netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -+ wlarc= -+ else -+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ fi -+ ;; -+ -+ solaris* | sysv5*) -+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then -+ ld_shlibs=no -+ cat <<EOF 1>&2 -+ -+*** Warning: The releases 2.8.* of the GNU linker cannot reliably -+*** create shared libraries on Solaris systems. Therefore, libtool -+*** is disabling shared libraries support. We urge you to upgrade GNU -+*** binutils to release 2.9.1 or newer. Another option is to modify -+*** your PATH or compiler configuration so that the native linker is -+*** used, and then restart. -+ -+EOF -+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ -+ sunos4*) -+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ wlarc= -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ *) -+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ else -+ ld_shlibs=no -+ fi -+ ;; -+ esac -+ -+ if test "$ld_shlibs" = yes; then -+ runpath_var=LD_RUN_PATH -+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' -+ export_dynamic_flag_spec='${wl}--export-dynamic' -+ case $host_os in -+ cygwin* | mingw* | pw32*) -+ # dlltool doesn't understand --whole-archive et. al. -+ whole_archive_flag_spec= -+ ;; -+ *) -+ # ancient GNU ld didn't support --whole-archive et. al. -+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then -+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ else -+ whole_archive_flag_spec= -+ fi -+ ;; -+ esac -+ fi -+else -+ # PORTME fill in a description of your system's linker (not GNU ld) -+ case $host_os in -+ aix3*) -+ allow_undefined_flag=unsupported -+ always_export_symbols=yes -+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -+ # Note: this linker hardcodes the directories in LIBPATH if there -+ # are no directories specified by -L. -+ hardcode_minus_L=yes -+ if test "$GCC" = yes && test -z "$link_static_flag"; then -+ # Neither direct hardcoding nor static linking is supported with a -+ # broken collect2. -+ hardcode_direct=unsupported -+ fi -+ ;; -+ -+ aix4* | aix5*) -+ if test "$host_cpu" = ia64; then -+ # On IA64, the linker does run time linking by default, so we don't -+ # have to do anything special. -+ aix_use_runtimelinking=no -+ exp_sym_flag='-Bexport' -+ no_entry_flag="" -+ else -+ aix_use_runtimelinking=no -+ -+ # Test if we are trying to use run time linking or normal -+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we -+ # need to do runtime linking. -+ case $host_os in aix4.[23]|aix4.[23].*|aix5*) -+ for ld_flag in $LDFLAGS; do -+ case $ld_flag in -+ *-brtl*) -+ aix_use_runtimelinking=yes -+ break -+ ;; -+ esac -+ done -+ esac -+ -+ exp_sym_flag='-bexport' -+ no_entry_flag='-bnoentry' -+ fi -+ -+ # When large executables or shared objects are built, AIX ld can -+ # have problems creating the table of contents. If linking a library -+ # or program results in "error TOC overflow" add -mminimal-toc to -+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -+ -+ hardcode_direct=yes -+ archive_cmds='' -+ hardcode_libdir_separator=':' -+ if test "$GCC" = yes; then -+ case $host_os in aix4.[012]|aix4.[012].*) -+ collect2name=`${CC} -print-prog-name=collect2` -+ if test -f "$collect2name" && \ -+ strings "$collect2name" | grep resolve_lib_name >/dev/null -+ then -+ # We have reworked collect2 -+ hardcode_direct=yes -+ else -+ # We have old collect2 -+ hardcode_direct=unsupported -+ # It fails to find uninstalled libraries when the uninstalled -+ # path is not listed in the libpath. Setting hardcode_minus_L -+ # to unsupported forces relinking -+ hardcode_minus_L=yes -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_libdir_separator= -+ fi -+ esac -+ -+ shared_flag='-shared' -+ else -+ # not using gcc -+ if test "$host_cpu" = ia64; then -+ shared_flag='${wl}-G' -+ else -+ if test "$aix_use_runtimelinking" = yes; then -+ shared_flag='${wl}-G' -+ else -+ shared_flag='${wl}-bM:SRE' -+ fi -+ fi -+ fi -+ -+ # It seems that -bexpall can do strange things, so it is better to -+ # generate a list of symbols to export. -+ always_export_symbols=yes -+ if test "$aix_use_runtimelinking" = yes; then -+ # Warning - without using the other runtime loading flags (-brtl), -+ # -berok will link without error, but may produce a broken library. -+ allow_undefined_flag='-berok' -+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' -+ archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" -+ else -+ if test "$host_cpu" = ia64; then -+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' -+ allow_undefined_flag="-z nodefs" -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" -+ else -+ hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' -+ # Warning - without using the other run time loading flags, -+ # -berok will link without error, but may produce a broken library. -+ allow_undefined_flag='${wl}-berok' -+ # This is a bit strange, but is similar to how AIX traditionally builds -+ # it's shared libraries. -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname' -+ fi -+ fi -+ ;; -+ -+ amigaos*) -+ archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ # see comment about different semantics on the GNU ld section -+ ld_shlibs=no -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ # When not using gcc, we currently assume that we are using -+ # Microsoft Visual C++. -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ hardcode_libdir_flag_spec=' ' -+ allow_undefined_flag=unsupported -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # FIXME: Setting linknames here is a bad hack. -+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' -+ # The linker will automatically build a .lib file if we build a DLL. -+ old_archive_from_new_cmds='true' -+ # FIXME: Should let the user specify the lib program. -+ old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' -+ fix_srcfile_path='`cygpath -w "$srcfile"`' -+ ;; -+ -+ darwin* | rhapsody*) -+ case "$host_os" in -+ rhapsody* | darwin1.[012]) -+ allow_undefined_flag='-undefined suppress' -+ ;; -+ *) # Darwin 1.3 on -+ allow_undefined_flag='-flat_namespace -undefined suppress' -+ ;; -+ esac -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles -+ # `"' quotes if we put them in here... so don't! -+ archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' -+ # We need to add '_' to the symbols in $export_symbols first -+ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ whole_archive_flag_spec='-all_load $convenience' -+ ;; -+ -+ freebsd1*) -+ ld_shlibs=no -+ ;; -+ -+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -+ # support. Future versions do this automatically, but an explicit c++rt0.o -+ # does not break anything, and helps significantly (at the cost of a little -+ # extra space). -+ freebsd2.2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ # Unfortunately, older versions of FreeBSD 2 do not have this feature. -+ freebsd2*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -+ freebsd*) -+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ hpux9* | hpux10* | hpux11*) -+ case $host_os in -+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; -+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; -+ esac -+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_direct=yes -+ hardcode_minus_L=yes # Not in the search PATH, but as the default -+ # location of the library. -+ export_dynamic_flag_spec='${wl}-E' -+ ;; -+ -+ irix5* | irix6* | nonstopux*) -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ link_all_deplibs=yes -+ ;; -+ -+ netbsd*) -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -+ else -+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -+ fi -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ newsos6) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ hardcode_shlibpath_var=no -+ ;; -+ -+ openbsd*) -+ hardcode_direct=yes -+ hardcode_shlibpath_var=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ export_dynamic_flag_spec='${wl}-E' -+ else -+ case "$host_os" in -+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) -+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-R$libdir' -+ ;; -+ *) -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -+ ;; -+ esac -+ fi -+ ;; -+ -+ os2*) -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ allow_undefined_flag=unsupported -+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -+ ;; -+ -+ osf3*) -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ fi -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_separator=: -+ ;; -+ -+ osf4* | osf5*) # as osf3* with the addition of -msym flag -+ if test "$GCC" = yes; then -+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ else -+ allow_undefined_flag=' -expect_unresolved \*' -+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' -+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ -+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' -+ -+ #Both c and cxx compiler support -rpath directly -+ hardcode_libdir_flag_spec='-rpath $libdir' -+ fi -+ hardcode_libdir_separator=: -+ ;; -+ -+ sco3.2v5*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ export_dynamic_flag_spec='${wl}-Bexport' -+ ;; -+ -+ solaris*) -+ # gcc --version < 3.0 without binutils cannot create self contained -+ # shared libraries reliably, requiring libgcc.a to resolve some of -+ # the object symbols generated in some cases. Libraries that use -+ # assert need libgcc.a to resolve __eprintf, for example. Linking -+ # a copy of libgcc.a into every shared library to guarantee resolving -+ # such symbols causes other problems: According to Tim Van Holder -+ # <tim.van.holder@pandora.be>, C++ libraries end up with a separate -+ # (to the application) exception stack for one thing. -+ no_undefined_flag=' -z defs' -+ if test "$GCC" = yes; then -+ case `$CC --version 2>/dev/null` in -+ [12].*) -+ cat <<EOF 1>&2 -+ -+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably -+*** create self contained shared libraries on Solaris systems, without -+*** introducing a dependency on libgcc.a. Therefore, libtool is disabling -+*** -no-undefined support, which will at least allow you to build shared -+*** libraries. However, you may find that when you link such libraries -+*** into an application without using GCC, you have to manually add -+*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to -+*** upgrade to a newer version of GCC. Another option is to rebuild your -+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. -+ -+EOF -+ no_undefined_flag= -+ ;; -+ esac -+ fi -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec='-R$libdir' -+ hardcode_shlibpath_var=no -+ case $host_os in -+ solaris2.[0-5] | solaris2.[0-5].*) ;; -+ *) # Supported since Solaris 2.6 (maybe 2.5.1?) -+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; -+ esac -+ link_all_deplibs=yes -+ ;; -+ -+ sunos4*) -+ if test "x$host_vendor" = xsequent; then -+ # Use $CC to link under sequent, because it throws in some extra .o -+ # files that make .init and .fini sections work. -+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -+ fi -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_direct=yes -+ hardcode_minus_L=yes -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4) -+ case $host_vendor in -+ sni) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes # is this really true??? -+ ;; -+ siemens) -+ ## LD is ld it makes a PLAMLIB -+ ## CC just makes a GrossModule. -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ reload_cmds='$CC -r -o $output$reload_objs' -+ hardcode_direct=no -+ ;; -+ motorola) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie -+ ;; -+ esac -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4.3*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ export_dynamic_flag_spec='-Bexport' -+ ;; -+ -+ sysv5*) -+ no_undefined_flag=' -z text' -+ # $CC -shared without GNU ld will not create a library from C++ -+ # object files and a static libstdc++, better avoid it by now -+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ -+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' -+ hardcode_libdir_flag_spec= -+ hardcode_shlibpath_var=no -+ runpath_var='LD_RUN_PATH' -+ ;; -+ -+ uts4*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ dgux*) -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ sysv4*MP*) -+ if test -d /usr/nec; then -+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_shlibpath_var=no -+ runpath_var=LD_RUN_PATH -+ hardcode_runpath_var=yes -+ ld_shlibs=yes -+ fi -+ ;; -+ -+ sysv4.2uw2*) -+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_direct=yes -+ hardcode_minus_L=no -+ hardcode_shlibpath_var=no -+ hardcode_runpath_var=yes -+ runpath_var=LD_RUN_PATH -+ ;; -+ -+ sysv5uw7* | unixware7*) -+ no_undefined_flag='${wl}-z ${wl}text' -+ if test "$GCC" = yes; then -+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ else -+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ fi -+ runpath_var='LD_RUN_PATH' -+ hardcode_shlibpath_var=no -+ ;; -+ -+ *) -+ ld_shlibs=no -+ ;; -+ esac -+fi -+echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -+echo "${ECHO_T}$ld_shlibs" >&6 -+test "$ld_shlibs" = no && can_build_shared=no -+ -+# Check hardcoding attributes. -+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -+hardcode_action= -+if test -n "$hardcode_libdir_flag_spec" || \ -+ test -n "$runpath_var"; then -+ -+ # We can hardcode non-existant directories. -+ if test "$hardcode_direct" != no && -+ # If the only mechanism to avoid hardcoding is shlibpath_var, we -+ # have to relink, otherwise we might link with an installed library -+ # when we should be linking with a yet-to-be-installed one -+ ## test "$hardcode_shlibpath_var" != no && -+ test "$hardcode_minus_L" != no; then -+ # Linking always hardcodes the temporary library directory. -+ hardcode_action=relink -+ else -+ # We can link without hardcoding, and we can hardcode nonexisting dirs. -+ hardcode_action=immediate -+ fi -+else -+ # We cannot hardcode anything, or else we can only hardcode existing -+ # directories. -+ hardcode_action=unsupported -+fi -+echo "$as_me:$LINENO: result: $hardcode_action" >&5 -+echo "${ECHO_T}$hardcode_action" >&6 -+ -+striplib= -+old_striplib= -+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then -+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -+ test -z "$striplib" && striplib="$STRIP --strip-unneeded" -+ echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+reload_cmds='$LD$reload_flag -o $output$reload_objs' -+test -z "$deplibs_check_method" && deplibs_check_method=unknown -+ -+# PORTME Fill in your ld.so characteristics -+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -+library_names_spec= -+libname_spec='lib$name' -+soname_spec= -+postinstall_cmds= -+postuninstall_cmds= -+finish_cmds= -+finish_eval= -+shlibpath_var= -+shlibpath_overrides_runpath=unknown -+version_type=none -+dynamic_linker="$host_os ld.so" -+sys_lib_dlsearch_path_spec="/lib /usr/lib" -+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+ -+case $host_os in -+aix3*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix $libname.a' -+ shlibpath_var=LIBPATH -+ -+ # AIX has no versioning support, so we append a major version to the name. -+ soname_spec='${libname}${release}.so$major' -+ ;; -+ -+aix4* | aix5*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ hardcode_into_libs=yes -+ if test "$host_cpu" = ia64; then -+ # AIX 5 supports IA64 -+ library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ else -+ # With GCC up to 2.95.x, collect2 would create an import file -+ # for dependence libraries. The import file would start with -+ # the line `#! .'. This would cause the generated library to -+ # depend on `.', always an invalid library. This was fixed in -+ # development snapshots of GCC prior to 3.0. -+ case $host_os in -+ aix4 | aix4.[01] | aix4.[01].*) -+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -+ echo ' yes ' -+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then -+ : -+ else -+ can_build_shared=no -+ fi -+ ;; -+ esac -+ # AIX (on Power*) has no versioning support, so currently we can -+ # not hardcode correct soname into executable. Probably we can -+ # add versioning support to collect2, so additional links can -+ # be useful in future. -+ if test "$aix_use_runtimelinking" = yes; then -+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so -+ # instead of lib<name>.a to let people know that these are not -+ # typical AIX shared libraries. -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ else -+ # We preserve .a as extension for shared libraries through AIX4.2 -+ # and later when we are not doing run time linking. -+ library_names_spec='${libname}${release}.a $libname.a' -+ soname_spec='${libname}${release}.so$major' -+ fi -+ shlibpath_var=LIBPATH -+ fi -+ hardcode_into_libs=yes -+ ;; -+ -+amigaos*) -+ library_names_spec='$libname.ixlibrary $libname.a' -+ # Create ${libname}_ixlibrary.a entries in /sys/libs. -+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' -+ ;; -+ -+beos*) -+ library_names_spec='${libname}.so' -+ dynamic_linker="$host_os ld.so" -+ shlibpath_var=LIBRARY_PATH -+ ;; -+ -+bsdi4*) -+ version_type=linux -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -+ export_dynamic_flag_spec=-rdynamic -+ # the default ld.so.conf also contains /usr/contrib/lib and -+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -+ # libtool to hard-code these into programs -+ ;; -+ -+cygwin* | mingw* | pw32*) -+ version_type=windows -+ need_version=no -+ need_lib_prefix=no -+ case $GCC,$host_os in -+ yes,cygwin*) -+ library_names_spec='$libname.dll.a' -+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' -+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog .libs/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $rm \$dlpath' -+ ;; -+ yes,mingw*) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' -+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` -+ ;; -+ yes,pw32*) -+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' -+ ;; -+ *) -+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' -+ ;; -+ esac -+ dynamic_linker='Win32 ld.exe' -+ # FIXME: first we should search . and the directory the executable is in -+ shlibpath_var=PATH -+ ;; -+ -+darwin* | rhapsody*) -+ dynamic_linker="$host_os dyld" -+ version_type=darwin -+ need_lib_prefix=no -+ need_version=no -+ # FIXME: Relying on posixy $() will cause problems for -+ # cross-compilation, but unfortunately the echo tests do not -+ # yet detect zsh echo's removal of \ escapes. -+ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' -+ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' -+ shlibpath_overrides_runpath=yes -+ shlibpath_var=DYLD_LIBRARY_PATH -+ ;; -+ -+freebsd1*) -+ dynamic_linker=no -+ ;; -+ -+freebsd*-gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ dynamic_linker='GNU/FreeBSD ld.so' -+ ;; -+ -+freebsd*) -+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` -+ version_type=freebsd-$objformat -+ case $version_type in -+ freebsd-elf*) -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' -+ need_version=no -+ need_lib_prefix=no -+ ;; -+ freebsd-*) -+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' -+ need_version=yes -+ ;; -+ esac -+ shlibpath_var=LD_LIBRARY_PATH -+ case $host_os in -+ freebsd2*) -+ shlibpath_overrides_runpath=yes -+ ;; -+ *) -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ ;; -+ esac -+ ;; -+ -+gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ hardcode_into_libs=yes -+ ;; -+ -+hpux9* | hpux10* | hpux11*) -+ # Give a soname corresponding to the major version so that dld.sl refuses to -+ # link against other versions. -+ dynamic_linker="$host_os dld.sl" -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_var=SHLIB_PATH -+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' -+ soname_spec='${libname}${release}.sl$major' -+ # HP-UX runs *really* slowly unless shared libraries are mode 555. -+ postinstall_cmds='chmod 555 $lib' -+ ;; -+ -+irix5* | irix6* | nonstopux*) -+ case $host_os in -+ nonstopux*) version_type=nonstopux ;; -+ *) version_type=irix ;; -+ esac -+ need_lib_prefix=no -+ need_version=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' -+ case $host_os in -+ irix5* | nonstopux*) -+ libsuff= shlibsuff= -+ ;; -+ *) -+ case $LD in # libtool.m4 will add one of these switches to LD -+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; -+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; -+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; -+ *) libsuff= shlibsuff= libmagic=never-match;; -+ esac -+ ;; -+ esac -+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -+ shlibpath_overrides_runpath=no -+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -+ ;; -+ -+# No shared lib support for Linux oldld, aout, or coff. -+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) -+ dynamic_linker=no -+ ;; -+ -+# This must be Linux ELF. -+linux-gnu*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ -+ # We used to test for /lib/ld.so.1 and disable shared libraries on -+ # powerpc, because MkLinux only supported shared libraries with the -+ # GNU dynamic linker. Since this was broken with cross compilers, -+ # most powerpc-linux boxes support dynamic linking these days and -+ # people can always --disable-shared, the test was removed, and we -+ # assume the GNU/Linux dynamic linker is in use. -+ dynamic_linker='GNU/Linux ld.so' -+ ;; -+ -+netbsd*) -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ dynamic_linker='NetBSD (a.out) ld.so' -+ else -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' -+ soname_spec='${libname}${release}.so$major' -+ dynamic_linker='NetBSD ld.elf_so' -+ fi -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ hardcode_into_libs=yes -+ ;; -+ -+newsos6) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ ;; -+ -+openbsd*) -+ version_type=sunos -+ need_lib_prefix=no -+ need_version=no -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ case "$host_os" in -+ openbsd2.[89] | openbsd2.[89].*) -+ shlibpath_overrides_runpath=no -+ ;; -+ *) -+ shlibpath_overrides_runpath=yes -+ ;; -+ esac -+ else -+ shlibpath_overrides_runpath=yes -+ fi -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+os2*) -+ libname_spec='$name' -+ need_lib_prefix=no -+ library_names_spec='$libname.dll $libname.a' -+ dynamic_linker='OS/2 ld.exe' -+ shlibpath_var=LIBPATH -+ ;; -+ -+osf3* | osf4* | osf5*) -+ version_type=osf -+ need_version=no -+ need_lib_prefix=no -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -+ hardcode_into_libs=yes -+ ;; -+ -+sco3.2v5*) -+ version_type=osf -+ soname_spec='${libname}${release}.so$major' -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+solaris*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ hardcode_into_libs=yes -+ # ldd complains unless libraries are executable -+ postinstall_cmds='chmod +x $lib' -+ ;; -+ -+sunos4*) -+ version_type=sunos -+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' -+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ if test "$with_gnu_ld" = yes; then -+ need_lib_prefix=no -+ fi -+ need_version=yes -+ ;; -+ -+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ case $host_vendor in -+ sni) -+ shlibpath_overrides_runpath=no -+ need_lib_prefix=no -+ export_dynamic_flag_spec='${wl}-Blargedynsym' -+ runpath_var=LD_RUN_PATH -+ ;; -+ siemens) -+ need_lib_prefix=no -+ ;; -+ motorola) -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_overrides_runpath=no -+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -+ ;; -+ esac -+ ;; -+ -+uts4*) -+ version_type=linux -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+dgux*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ ;; -+ -+sysv4*MP*) -+ if test -d /usr/nec ;then -+ version_type=linux -+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' -+ soname_spec='$libname.so.$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ fi -+ ;; -+ -+*) -+ dynamic_linker=no -+ ;; -+esac -+echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -+echo "${ECHO_T}$dynamic_linker" >&6 -+test "$dynamic_linker" = no && can_build_shared=no -+ -+# Report the final consequences. -+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -+echo "$as_me:$LINENO: result: $can_build_shared" >&5 -+echo "${ECHO_T}$can_build_shared" >&6 -+ -+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -+test "$can_build_shared" = "no" && enable_shared=no -+ -+# On AIX, shared libraries and static libraries use the same namespace, and -+# are all built from PIC. -+case "$host_os" in -+aix3*) -+ test "$enable_shared" = yes && enable_static=no -+ if test -n "$RANLIB"; then -+ archive_cmds="$archive_cmds~\$RANLIB \$lib" -+ postinstall_cmds='$RANLIB $lib' -+ fi -+ ;; -+ -+aix4*) -+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -+ test "$enable_shared" = yes && enable_static=no -+ fi -+ ;; -+esac -+echo "$as_me:$LINENO: result: $enable_shared" >&5 -+echo "${ECHO_T}$enable_shared" >&6 -+ -+echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -+# Make sure either enable_shared or enable_static is yes. -+test "$enable_shared" = yes || enable_static=yes -+echo "$as_me:$LINENO: result: $enable_static" >&5 -+echo "${ECHO_T}$enable_static" >&6 -+ -+if test "$hardcode_action" = relink; then -+ # Fast installation is not supported -+ enable_fast_install=no -+elif test "$shlibpath_overrides_runpath" = yes || -+ test "$enable_shared" = no; then -+ # Fast installation is not necessary -+ enable_fast_install=needless -+fi -+ -+variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -+if test "$GCC" = yes; then -+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -+fi -+ -+if test "x$enable_dlopen" != xyes; then -+ enable_dlopen=unknown -+ enable_dlopen_self=unknown -+ enable_dlopen_self_static=unknown -+else -+ lt_cv_dlopen=no -+ lt_cv_dlopen_libs= -+ -+ case $host_os in -+ beos*) -+ lt_cv_dlopen="load_add_on" -+ lt_cv_dlopen_libs= -+ lt_cv_dlopen_self=yes -+ ;; -+ -+ cygwin* | mingw* | pw32*) -+ lt_cv_dlopen="LoadLibrary" -+ lt_cv_dlopen_libs= -+ ;; -+ -+ *) -+ echo "$as_me:$LINENO: checking for shl_load" >&5 -+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -+if test "${ac_cv_func_shl_load+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. -+ For example, HP-UX 11i <limits.h> declares gettimeofday. */ -+#define shl_load innocuous_shl_load -+ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char shl_load (); below. -+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -+ <limits.h> exists even on freestanding compilers. */ -+ -+#ifdef __STDC__ -+# include <limits.h> -+#else -+# include <assert.h> -+#endif -+ -+#undef shl_load -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char shl_load (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub_shl_load) || defined (__stub___shl_load) -+choke me -+#else -+char (*f) () = shl_load; -+#endif -+#ifdef __cplusplus -+} -+#endif -+ -+int -+main () -+{ -+return f != shl_load; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_func_shl_load=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_func_shl_load=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -+echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -+if test $ac_cv_func_shl_load = yes; then -+ lt_cv_dlopen="shl_load" -+else -+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -+if test "${ac_cv_lib_dld_shl_load+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-ldld $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char shl_load (); -+int -+main () -+{ -+shl_load (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_dld_shl_load=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_dld_shl_load=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -+if test $ac_cv_lib_dld_shl_load = yes; then -+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -+else -+ echo "$as_me:$LINENO: checking for dlopen" >&5 -+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -+if test "${ac_cv_func_dlopen+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. -+ For example, HP-UX 11i <limits.h> declares gettimeofday. */ -+#define dlopen innocuous_dlopen -+ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char dlopen (); below. -+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -+ <limits.h> exists even on freestanding compilers. */ -+ -+#ifdef __STDC__ -+# include <limits.h> -+#else -+# include <assert.h> -+#endif -+ -+#undef dlopen -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char dlopen (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub_dlopen) || defined (__stub___dlopen) -+choke me -+#else -+char (*f) () = dlopen; -+#endif -+#ifdef __cplusplus -+} -+#endif -+ -+int -+main () -+{ -+return f != dlopen; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_func_dlopen=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_func_dlopen=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -+echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -+if test $ac_cv_func_dlopen = yes; then -+ lt_cv_dlopen="dlopen" -+else -+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -+if test "${ac_cv_lib_dl_dlopen+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-ldl $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char dlopen (); -+int -+main () -+{ -+dlopen (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_dl_dlopen=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_dl_dlopen=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -+if test $ac_cv_lib_dl_dlopen = yes; then -+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -+else -+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -+if test "${ac_cv_lib_svld_dlopen+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lsvld $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char dlopen (); -+int -+main () -+{ -+dlopen (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_svld_dlopen=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_svld_dlopen=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -+if test $ac_cv_lib_svld_dlopen = yes; then -+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -+else -+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -+if test "${ac_cv_lib_dld_dld_link+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-ldld $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char dld_link (); -+int -+main () -+{ -+dld_link (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_dld_dld_link=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_dld_dld_link=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -+if test $ac_cv_lib_dld_dld_link = yes; then -+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -+fi -+ -+ -+fi -+ -+ -+fi -+ -+ -+fi -+ -+ -+fi -+ -+ -+fi -+ -+ ;; -+ esac -+ -+ if test "x$lt_cv_dlopen" != xno; then -+ enable_dlopen=yes -+ else -+ enable_dlopen=no -+ fi -+ -+ case $lt_cv_dlopen in -+ dlopen) -+ save_CPPFLAGS="$CPPFLAGS" -+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -+ -+ save_LDFLAGS="$LDFLAGS" -+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -+ -+ save_LIBS="$LIBS" -+ LIBS="$lt_cv_dlopen_libs $LIBS" -+ -+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -+if test "${lt_cv_dlopen_self+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test "$cross_compiling" = yes; then : -+ lt_cv_dlopen_self=cross -+else -+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -+ lt_status=$lt_dlunknown -+ cat > conftest.$ac_ext <<EOF -+#line __oline__ "configure" -+#include "confdefs.h" -+ -+#if HAVE_DLFCN_H -+#include <dlfcn.h> -+#endif -+ -+#include <stdio.h> -+ -+#ifdef RTLD_GLOBAL -+# define LT_DLGLOBAL RTLD_GLOBAL -+#else -+# ifdef DL_GLOBAL -+# define LT_DLGLOBAL DL_GLOBAL -+# else -+# define LT_DLGLOBAL 0 -+# endif -+#endif -+ -+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -+ find out it does not work in some platform. */ -+#ifndef LT_DLLAZY_OR_NOW -+# ifdef RTLD_LAZY -+# define LT_DLLAZY_OR_NOW RTLD_LAZY -+# else -+# ifdef DL_LAZY -+# define LT_DLLAZY_OR_NOW DL_LAZY -+# else -+# ifdef RTLD_NOW -+# define LT_DLLAZY_OR_NOW RTLD_NOW -+# else -+# ifdef DL_NOW -+# define LT_DLLAZY_OR_NOW DL_NOW -+# else -+# define LT_DLLAZY_OR_NOW 0 -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+#ifdef __cplusplus -+extern "C" void exit (int); -+#endif -+ -+void fnord() { int i=42;} -+int main () -+{ -+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -+ int status = $lt_dlunknown; -+ -+ if (self) -+ { -+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -+ /* dlclose (self); */ -+ } -+ -+ exit (status); -+} -+EOF -+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then -+ (./conftest; exit; ) 2>/dev/null -+ lt_status=$? -+ case x$lt_status in -+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; -+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; -+ x$lt_unknown|x*) lt_cv_dlopen_self=no ;; -+ esac -+ else : -+ # compilation failed -+ lt_cv_dlopen_self=no -+ fi -+fi -+rm -fr conftest* -+ -+ -+fi -+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -+echo "${ECHO_T}$lt_cv_dlopen_self" >&6 -+ -+ if test "x$lt_cv_dlopen_self" = xyes; then -+ LDFLAGS="$LDFLAGS $link_static_flag" -+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -+if test "${lt_cv_dlopen_self_static+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test "$cross_compiling" = yes; then : -+ lt_cv_dlopen_self_static=cross -+else -+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -+ lt_status=$lt_dlunknown -+ cat > conftest.$ac_ext <<EOF -+#line __oline__ "configure" -+#include "confdefs.h" -+ -+#if HAVE_DLFCN_H -+#include <dlfcn.h> -+#endif -+ -+#include <stdio.h> -+ -+#ifdef RTLD_GLOBAL -+# define LT_DLGLOBAL RTLD_GLOBAL -+#else -+# ifdef DL_GLOBAL -+# define LT_DLGLOBAL DL_GLOBAL -+# else -+# define LT_DLGLOBAL 0 -+# endif -+#endif -+ -+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -+ find out it does not work in some platform. */ -+#ifndef LT_DLLAZY_OR_NOW -+# ifdef RTLD_LAZY -+# define LT_DLLAZY_OR_NOW RTLD_LAZY -+# else -+# ifdef DL_LAZY -+# define LT_DLLAZY_OR_NOW DL_LAZY -+# else -+# ifdef RTLD_NOW -+# define LT_DLLAZY_OR_NOW RTLD_NOW -+# else -+# ifdef DL_NOW -+# define LT_DLLAZY_OR_NOW DL_NOW -+# else -+# define LT_DLLAZY_OR_NOW 0 -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+#ifdef __cplusplus -+extern "C" void exit (int); -+#endif -+ -+void fnord() { int i=42;} -+int main () -+{ -+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -+ int status = $lt_dlunknown; -+ -+ if (self) -+ { -+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -+ /* dlclose (self); */ -+ } -+ -+ exit (status); -+} -+EOF -+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then -+ (./conftest; exit; ) 2>/dev/null -+ lt_status=$? -+ case x$lt_status in -+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; -+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; -+ x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; -+ esac -+ else : -+ # compilation failed -+ lt_cv_dlopen_self_static=no -+ fi -+fi -+rm -fr conftest* -+ -+ -+fi -+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 -+ fi -+ -+ CPPFLAGS="$save_CPPFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+ LIBS="$save_LIBS" -+ ;; -+ esac -+ -+ case $lt_cv_dlopen_self in -+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; -+ *) enable_dlopen_self=unknown ;; -+ esac -+ -+ case $lt_cv_dlopen_self_static in -+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; -+ *) enable_dlopen_self_static=unknown ;; -+ esac -+fi -+ -+ -+if test "$enable_shared" = yes && test "$GCC" = yes; then -+ case $archive_cmds in -+ *'~'*) -+ # FIXME: we may have to deal with multi-command sequences. -+ ;; -+ '$CC '*) -+ # Test whether the compiler implicitly links with -lc since on some -+ # systems, -lgcc has to come before -lc. If gcc already passes -lc -+ # to ld, don't add -lc before -lgcc. -+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 -+ if test "${lt_cv_archive_cmds_need_lc+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ $rm conftest* -+ echo 'static int dummy;' > conftest.$ac_ext -+ -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ soname=conftest -+ lib=conftest -+ libobjs=conftest.$ac_objext -+ deplibs= -+ wl=$lt_cv_prog_cc_wl -+ compiler_flags=-v -+ linker_flags=-v -+ verstring= -+ output_objdir=. -+ libname=conftest -+ save_allow_undefined_flag=$allow_undefined_flag -+ allow_undefined_flag= -+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 -+ (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+ then -+ lt_cv_archive_cmds_need_lc=no -+ else -+ lt_cv_archive_cmds_need_lc=yes -+ fi -+ allow_undefined_flag=$save_allow_undefined_flag -+ else -+ cat conftest.err 1>&5 -+ fi -+fi -+ -+ echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 -+echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 -+ ;; -+ esac -+fi -+need_lc=${lt_cv_archive_cmds_need_lc-yes} -+ -+# The second clause should only fire when bootstrapping the -+# libtool distribution, otherwise you forgot to ship ltmain.sh -+# with your package, and you will get complaints that there are -+# no rules to generate ltmain.sh. -+if test -f "$ltmain"; then -+ : -+else -+ # If there is no Makefile yet, we rely on a make rule to execute -+ # `config.status --recheck' to rerun these tests and create the -+ # libtool script then. -+ test -f Makefile && make "$ltmain" -+fi -+ -+if test -f "$ltmain"; then -+ trap "$rm \"${ofile}T\"; exit 1" 1 2 15 -+ $rm -f "${ofile}T" -+ -+ echo creating $ofile -+ -+ # Now quote all the things that may contain metacharacters while being -+ # careful not to overquote the AC_SUBSTed values. We take copies of the -+ # variables and quote the copies for generation of the libtool script. -+ for var in echo old_CC old_CFLAGS SED \ -+ AR AR_FLAGS CC LD LN_S NM SHELL \ -+ reload_flag reload_cmds wl \ -+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ -+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ -+ library_names_spec soname_spec \ -+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ -+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ -+ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ -+ old_striplib striplib file_magic_cmd export_symbols_cmds \ -+ deplibs_check_method allow_undefined_flag no_undefined_flag \ -+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ -+ global_symbol_to_c_name_address \ -+ hardcode_libdir_flag_spec hardcode_libdir_separator \ -+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ -+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do -+ -+ case $var in -+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ -+ old_postinstall_cmds | old_postuninstall_cmds | \ -+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ -+ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ -+ postinstall_cmds | postuninstall_cmds | \ -+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) -+ # Double-quote double-evaled strings. -+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" -+ ;; -+ *) -+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" -+ ;; -+ esac -+ done -+ -+ cat <<__EOF__ > "${ofile}T" -+#! $SHELL -+ -+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -+# NOTE: Changes made to this file will be lost: look at ltmain.sh. -+# -+# Copyright (C) 1996-2000 Free Software Foundation, Inc. -+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -+# -+# 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. -+# -+# As a special exception to the GNU General Public License, if you -+# distribute this file as part of a program that contains a -+# configuration script generated by Autoconf, you may include it under -+# the same distribution terms that you use for the rest of that program. -+ -+# A sed that does not truncate output. -+SED=$lt_SED -+ -+# Sed that helps us avoid accidentally triggering echo(1) options like -n. -+Xsed="${SED} -e s/^X//" -+ -+# The HP-UX ksh and POSIX shell print the target directory to stdout -+# if CDPATH is set. -+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi -+ -+# ### BEGIN LIBTOOL CONFIG -+ -+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -+ -+# Shell to use when invoking shell scripts. -+SHELL=$lt_SHELL -+ -+# Whether or not to build shared libraries. -+build_libtool_libs=$enable_shared -+ -+# Whether or not to build static libraries. -+build_old_libs=$enable_static -+ -+# Whether or not to add -lc for building shared libraries. -+build_libtool_need_lc=$need_lc -+ -+# Whether or not to optimize for fast installation. -+fast_install=$enable_fast_install -+ -+# The host system. -+host_alias=$host_alias -+host=$host -+ -+# An echo program that does not interpret backslashes. -+echo=$lt_echo -+ -+# The archiver. -+AR=$lt_AR -+AR_FLAGS=$lt_AR_FLAGS -+ -+# The default C compiler. -+CC=$lt_CC -+ -+# Is the compiler the GNU C compiler? -+with_gcc=$GCC -+ -+# The linker used to build libraries. -+LD=$lt_LD -+ -+# Whether we need hard or soft links. -+LN_S=$lt_LN_S -+ -+# A BSD-compatible nm program. -+NM=$lt_NM -+ -+# A symbol stripping program -+STRIP=$STRIP -+ -+# Used to examine libraries when file_magic_cmd begins "file" -+MAGIC_CMD=$MAGIC_CMD -+ -+# Used on cygwin: DLL creation program. -+DLLTOOL="$DLLTOOL" -+ -+# Used on cygwin: object dumper. -+OBJDUMP="$OBJDUMP" -+ -+# Used on cygwin: assembler. -+AS="$AS" -+ -+# The name of the directory that contains temporary libtool files. -+objdir=$objdir -+ -+# How to create reloadable object files. -+reload_flag=$lt_reload_flag -+reload_cmds=$lt_reload_cmds -+ -+# How to pass a linker flag through the compiler. -+wl=$lt_wl -+ -+# Object file suffix (normally "o"). -+objext="$ac_objext" -+ -+# Old archive suffix (normally "a"). -+libext="$libext" -+ -+# Executable file suffix (normally ""). -+exeext="$exeext" -+ -+# Additional compiler flags for building library objects. -+pic_flag=$lt_pic_flag -+pic_mode=$pic_mode -+ -+# Does compiler simultaneously support -c and -o options? -+compiler_c_o=$lt_compiler_c_o -+ -+# Can we write directly to a .lo ? -+compiler_o_lo=$lt_compiler_o_lo -+ -+# Must we lock files when doing compilation ? -+need_locks=$lt_need_locks -+ -+# Do we need the lib prefix for modules? -+need_lib_prefix=$need_lib_prefix -+ -+# Do we need a version for libraries? -+need_version=$need_version -+ -+# Whether dlopen is supported. -+dlopen_support=$enable_dlopen -+ -+# Whether dlopen of programs is supported. -+dlopen_self=$enable_dlopen_self -+ -+# Whether dlopen of statically linked programs is supported. -+dlopen_self_static=$enable_dlopen_self_static -+ -+# Compiler flag to prevent dynamic linking. -+link_static_flag=$lt_link_static_flag -+ -+# Compiler flag to turn off builtin functions. -+no_builtin_flag=$lt_no_builtin_flag -+ -+# Compiler flag to allow reflexive dlopens. -+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec -+ -+# Compiler flag to generate shared objects directly from archives. -+whole_archive_flag_spec=$lt_whole_archive_flag_spec -+ -+# Compiler flag to generate thread-safe objects. -+thread_safe_flag_spec=$lt_thread_safe_flag_spec -+ -+# Library versioning type. -+version_type=$version_type -+ -+# Format of library name prefix. -+libname_spec=$lt_libname_spec -+ -+# List of archive names. First name is the real one, the rest are links. -+# The last name is the one that the linker finds with -lNAME. -+library_names_spec=$lt_library_names_spec -+ -+# The coded name of the library, if different from the real name. -+soname_spec=$lt_soname_spec -+ -+# Commands used to build and install an old-style archive. -+RANLIB=$lt_RANLIB -+old_archive_cmds=$lt_old_archive_cmds -+old_postinstall_cmds=$lt_old_postinstall_cmds -+old_postuninstall_cmds=$lt_old_postuninstall_cmds -+ -+# Create an old-style archive from a shared archive. -+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds -+ -+# Create a temporary old-style archive to link instead of a shared archive. -+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds -+ -+# Commands used to build and install a shared archive. -+archive_cmds=$lt_archive_cmds -+archive_expsym_cmds=$lt_archive_expsym_cmds -+postinstall_cmds=$lt_postinstall_cmds -+postuninstall_cmds=$lt_postuninstall_cmds -+ -+# Commands to strip libraries. -+old_striplib=$lt_old_striplib -+striplib=$lt_striplib -+ -+# Method to check whether dependent libraries are shared objects. -+deplibs_check_method=$lt_deplibs_check_method -+ -+# Command to use when deplibs_check_method == file_magic. -+file_magic_cmd=$lt_file_magic_cmd -+ -+# Flag that allows shared libraries with undefined symbols to be built. -+allow_undefined_flag=$lt_allow_undefined_flag -+ -+# Flag that forces no undefined symbols. -+no_undefined_flag=$lt_no_undefined_flag -+ -+# Commands used to finish a libtool library installation in a directory. -+finish_cmds=$lt_finish_cmds -+ -+# Same as above, but a single script fragment to be evaled but not shown. -+finish_eval=$lt_finish_eval -+ -+# Take the output of nm and produce a listing of raw symbols and C names. -+global_symbol_pipe=$lt_global_symbol_pipe -+ -+# Transform the output of nm in a proper C declaration -+global_symbol_to_cdecl=$lt_global_symbol_to_cdecl -+ -+# Transform the output of nm in a C name address pair -+global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address -+ -+# This is the shared library runtime path variable. -+runpath_var=$runpath_var -+ -+# This is the shared library path variable. -+shlibpath_var=$shlibpath_var -+ -+# Is shlibpath searched before the hard-coded library search path? -+shlibpath_overrides_runpath=$shlibpath_overrides_runpath -+ -+# How to hardcode a shared library path into an executable. -+hardcode_action=$hardcode_action -+ -+# Whether we should hardcode library paths into libraries. -+hardcode_into_libs=$hardcode_into_libs -+ -+# Flag to hardcode \$libdir into a binary during linking. -+# This must work even if \$libdir does not exist. -+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -+ -+# Whether we need a single -rpath flag with a separated argument. -+hardcode_libdir_separator=$lt_hardcode_libdir_separator -+ -+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -+# resulting binary. -+hardcode_direct=$hardcode_direct -+ -+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -+# resulting binary. -+hardcode_minus_L=$hardcode_minus_L -+ -+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -+# the resulting binary. -+hardcode_shlibpath_var=$hardcode_shlibpath_var -+ -+# Variables whose values should be saved in libtool wrapper scripts and -+# restored at relink time. -+variables_saved_for_relink="$variables_saved_for_relink" -+ -+# Whether libtool must link a program against all its dependency libraries. -+link_all_deplibs=$link_all_deplibs -+ -+# Compile-time system search path for libraries -+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -+ -+# Run-time system search path for libraries -+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -+ -+# Fix the shell variable \$srcfile for the compiler. -+fix_srcfile_path="$fix_srcfile_path" -+ -+# Set to yes if exported symbols are required. -+always_export_symbols=$always_export_symbols -+ -+# The commands to list exported symbols. -+export_symbols_cmds=$lt_export_symbols_cmds -+ -+# The commands to extract the exported symbol list from a shared archive. -+extract_expsyms_cmds=$lt_extract_expsyms_cmds -+ -+# Symbols that should not be listed in the preloaded symbols. -+exclude_expsyms=$lt_exclude_expsyms -+ -+# Symbols that must always be exported. -+include_expsyms=$lt_include_expsyms -+ -+# ### END LIBTOOL CONFIG -+ -+__EOF__ -+ -+ case $host_os in -+ aix3*) -+ cat <<\EOF >> "${ofile}T" -+ -+# AIX sometimes has problems with the GCC collect2 program. For some -+# reason, if we set the COLLECT_NAMES environment variable, the problems -+# vanish in a puff of smoke. -+if test "X${COLLECT_NAMES+set}" != Xset; then -+ COLLECT_NAMES= -+ export COLLECT_NAMES -+fi -+EOF -+ ;; -+ esac -+ -+ case $host_os in -+ cygwin* | mingw* | pw32* | os2*) -+ cat <<'EOF' >> "${ofile}T" -+ # This is a source program that is used to create dlls on Windows -+ # Don't remove nor modify the starting and closing comments -+# /* ltdll.c starts here */ -+# #define WIN32_LEAN_AND_MEAN -+# #include <windows.h> -+# #undef WIN32_LEAN_AND_MEAN -+# #include <stdio.h> -+# -+# #ifndef __CYGWIN__ -+# # ifdef __CYGWIN32__ -+# # define __CYGWIN__ __CYGWIN32__ -+# # endif -+# #endif -+# -+# #ifdef __cplusplus -+# extern "C" { -+# #endif -+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -+# #ifdef __cplusplus -+# } -+# #endif -+# -+# #ifdef __CYGWIN__ -+# #include <cygwin/cygwin_dll.h> -+# DECLARE_CYGWIN_DLL( DllMain ); -+# #endif -+# HINSTANCE __hDllInstance_base; -+# -+# BOOL APIENTRY -+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -+# { -+# __hDllInstance_base = hInst; -+# return TRUE; -+# } -+# /* ltdll.c ends here */ -+ # This is a source program that is used to create import libraries -+ # on Windows for dlls which lack them. Don't remove nor modify the -+ # starting and closing comments -+# /* impgen.c starts here */ -+# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. -+# -+# This file is part of GNU libtool. -+# -+# 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 <stdio.h> /* for printf() */ -+# #include <unistd.h> /* for open(), lseek(), read() */ -+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ -+# #include <string.h> /* for strdup() */ -+# -+# /* O_BINARY isn't required (or even defined sometimes) under Unix */ -+# #ifndef O_BINARY -+# #define O_BINARY 0 -+# #endif -+# -+# static unsigned int -+# pe_get16 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[2]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 2); -+# return b[0] + (b[1]<<8); -+# } -+# -+# static unsigned int -+# pe_get32 (fd, offset) -+# int fd; -+# int offset; -+# { -+# unsigned char b[4]; -+# lseek (fd, offset, SEEK_SET); -+# read (fd, b, 4); -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# static unsigned int -+# pe_as32 (ptr) -+# void *ptr; -+# { -+# unsigned char *b = ptr; -+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -+# } -+# -+# int -+# main (argc, argv) -+# int argc; -+# char *argv[]; -+# { -+# int dll; -+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -+# unsigned long export_rva, export_size, nsections, secptr, expptr; -+# unsigned long name_rvas, nexp; -+# unsigned char *expdata, *erva; -+# char *filename, *dll_name; -+# -+# filename = argv[1]; -+# -+# dll = open(filename, O_RDONLY|O_BINARY); -+# if (dll < 1) -+# return 1; -+# -+# dll_name = filename; -+# -+# for (i=0; filename[i]; i++) -+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -+# dll_name = filename + i +1; -+# -+# pe_header_offset = pe_get32 (dll, 0x3c); -+# opthdr_ofs = pe_header_offset + 4 + 20; -+# num_entries = pe_get32 (dll, opthdr_ofs + 92); -+# -+# if (num_entries < 1) /* no exports */ -+# return 1; -+# -+# export_rva = pe_get32 (dll, opthdr_ofs + 96); -+# export_size = pe_get32 (dll, opthdr_ofs + 100); -+# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -+# secptr = (pe_header_offset + 4 + 20 + -+# pe_get16 (dll, pe_header_offset + 4 + 16)); -+# -+# expptr = 0; -+# for (i = 0; i < nsections; i++) -+# { -+# char sname[8]; -+# unsigned long secptr1 = secptr + 40 * i; -+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -+# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -+# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -+# lseek(dll, secptr1, SEEK_SET); -+# read(dll, sname, 8); -+# if (vaddr <= export_rva && vaddr+vsize > export_rva) -+# { -+# expptr = fptr + (export_rva - vaddr); -+# if (export_rva + export_size > vaddr + vsize) -+# export_size = vsize - (export_rva - vaddr); -+# break; -+# } -+# } -+# -+# expdata = (unsigned char*)malloc(export_size); -+# lseek (dll, expptr, SEEK_SET); -+# read (dll, expdata, export_size); -+# erva = expdata - export_rva; -+# -+# nexp = pe_as32 (expdata+24); -+# name_rvas = pe_as32 (expdata+32); -+# -+# printf ("EXPORTS\n"); -+# for (i = 0; i<nexp; i++) -+# { -+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); -+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); -+# } -+# -+# return 0; -+# } -+# /* impgen.c ends here */ -+ -+EOF -+ ;; -+ esac -+ -+ # We use sed instead of cat because bash on DJGPP gets confused if -+ # if finds mixed CR/LF and LF-only lines. Since sed operates in -+ # text mode, it properly converts lines to CR/LF. This bash problem -+ # is reportedly fixed, but why not run on old versions too? -+ sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) -+ -+ mv -f "${ofile}T" "$ofile" || \ -+ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") -+ chmod +x "$ofile" -+fi -+ -+ -+ -+ -+ -+# This can be used to rebuild libtool when needed -+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" -+ -+# Always use our own libtool. -+LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+ -+# Prevent multiple expansion -+ -+ -+ -+ -+# Extract the first word of "perl", so it can be a program name with args. -+set dummy perl; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_path_PERL+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ case $PERL in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+ ;; -+esac -+fi -+PERL=$ac_cv_path_PERL -+ -+if test -n "$PERL"; then -+ echo "$as_me:$LINENO: result: $PERL" >&5 -+echo "${ECHO_T}$PERL" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ -+ -+ -+if test "${ac_cv_header_asm_errno_h+set}" = set; then -+ echo "$as_me:$LINENO: checking for asm/errno.h" >&5 -+echo $ECHO_N "checking for asm/errno.h... $ECHO_C" >&6 -+if test "${ac_cv_header_asm_errno_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_asm_errno_h" >&5 -+echo "${ECHO_T}$ac_cv_header_asm_errno_h" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking asm/errno.h usability" >&5 -+echo $ECHO_N "checking asm/errno.h usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+@%:@include <asm/errno.h> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking asm/errno.h presence" >&5 -+echo $ECHO_N "checking asm/errno.h presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+@%:@include <asm/errno.h> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: asm/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: asm/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: asm/errno.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: asm/errno.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: asm/errno.h: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: asm/errno.h: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: asm/errno.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: asm/errno.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: asm/errno.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: asm/errno.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: asm/errno.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: asm/errno.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: asm/errno.h: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: asm/errno.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: asm/errno.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: asm/errno.h: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+@%:@@%:@ ------------------------------------------ @%:@@%:@ -+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -+@%:@@%:@ ------------------------------------------ @%:@@%:@ -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for asm/errno.h" >&5 -+echo $ECHO_N "checking for asm/errno.h... $ECHO_C" >&6 -+if test "${ac_cv_header_asm_errno_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_header_asm_errno_h=$ac_header_preproc -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_asm_errno_h" >&5 -+echo "${ECHO_T}$ac_cv_header_asm_errno_h" >&6 -+ -+fi -+if test $ac_cv_header_asm_errno_h = yes; then -+ : -+else -+ { { echo "$as_me:$LINENO: error: *** Unable to find asm/errno.h!!!" >&5 -+echo "$as_me: error: *** Unable to find asm/errno.h!!!" >&2;} -+ { (exit 1); exit 1; }; } -+ -+fi -+ -+ -+ -+if test "${ac_cv_header_linux_atmsap_h+set}" = set; then -+ echo "$as_me:$LINENO: checking for linux/atmsap.h" >&5 -+echo $ECHO_N "checking for linux/atmsap.h... $ECHO_C" >&6 -+if test "${ac_cv_header_linux_atmsap_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_linux_atmsap_h" >&5 -+echo "${ECHO_T}$ac_cv_header_linux_atmsap_h" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking linux/atmsap.h usability" >&5 -+echo $ECHO_N "checking linux/atmsap.h usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+@%:@include <linux/atmsap.h> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking linux/atmsap.h presence" >&5 -+echo $ECHO_N "checking linux/atmsap.h presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+@%:@include <linux/atmsap.h> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: linux/atmsap.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: linux/atmsap.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/atmsap.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: linux/atmsap.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: linux/atmsap.h: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: linux/atmsap.h: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/atmsap.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: linux/atmsap.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/atmsap.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: linux/atmsap.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/atmsap.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: linux/atmsap.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/atmsap.h: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: linux/atmsap.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/atmsap.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: linux/atmsap.h: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+@%:@@%:@ ------------------------------------------ @%:@@%:@ -+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@ -+@%:@@%:@ ------------------------------------------ @%:@@%:@ -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for linux/atmsap.h" >&5 -+echo $ECHO_N "checking for linux/atmsap.h... $ECHO_C" >&6 -+if test "${ac_cv_header_linux_atmsap_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_header_linux_atmsap_h=$ac_header_preproc -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_linux_atmsap_h" >&5 -+echo "${ECHO_T}$ac_cv_header_linux_atmsap_h" >&6 -+ -+fi -+if test $ac_cv_header_linux_atmsap_h = yes; then -+ : -+else -+ { { echo "$as_me:$LINENO: error: *** Unable to find linux/atmsap.h!!!" >&5 -+echo "$as_me: error: *** Unable to find linux/atmsap.h!!!" >&2;} -+ { (exit 1); exit 1; }; } -+ -+fi -+ -+ -+ -+ -+echo "$as_me:$LINENO: checking for main in -lresolv" >&5 -+echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6 -+if test "${ac_cv_lib_resolv_main+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lresolv $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ -+int -+main () -+{ -+main (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_resolv_main=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_resolv_main=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5 -+echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6 -+if test $ac_cv_lib_resolv_main = yes; then -+ cat >>confdefs.h <<_ACEOF -+@%:@define HAVE_LIBRESOLV 1 -+_ACEOF -+ -+ LIBS="-lresolv $LIBS" -+ -+else -+ { { echo "$as_me:$LINENO: error: *** Unable to find libresolv!!!" >&5 -+echo "$as_me: error: *** Unable to find libresolv!!!" >&2;} -+ { (exit 1); exit 1; }; } -+ -+fi -+ -+ -+LIBS="" -+ -+INCLUDES="-I\$(top_srcdir)/src/include" -+CFLAGS="$INCLUDES $CFLAGS -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes" -+YACC="$YACC -d" -+ -+cat >>confdefs.h <<\_ACEOF -+@%:@define YY_USE_CONST 1 -+_ACEOF -+ -+ -+atmsigd_conf_dir=` test "x$exec_prefix" = xNONE && exec_prefix=$ac_default_prefix -+ test "x$prefix" = xNONE && prefix=${exec_prefix} -+ eval echo "$sysconfdir"` -+cat >>confdefs.h <<_ACEOF -+@%:@define ATMSIGD_CONF "$atmsigd_conf_dir/atmsigd.conf" -+_ACEOF -+ -+ -+ -+# Check whether --with-uni or --without-uni was given. -+if test "${with_uni+set}" = set; then -+ withval="$with_uni" -+ -+ case "$with_uni" in -+ "3.0" ) cat >>confdefs.h <<\_ACEOF -+@%:@define UNI30 1 -+_ACEOF -+ -+ ;; -+ "3.1" ) cat >>confdefs.h <<\_ACEOF -+@%:@define UNI31 1 -+_ACEOF -+ -+ ;; -+ "4.0" ) cat >>confdefs.h <<\_ACEOF -+@%:@define UNI40 1 -+_ACEOF -+ -+ ;; -+ *) -+ cat >>confdefs.h <<\_ACEOF -+@%:@define DYNAMIC_UNI 1 -+_ACEOF -+ -+ { echo "$as_me:$LINENO: WARNING: *** UNI version not specified correctly. Defaulting to dynamic UNI." >&5 -+echo "$as_me: WARNING: *** UNI version not specified correctly. Defaulting to dynamic UNI." >&2;} -+ esac -+ -+else -+ cat >>confdefs.h <<\_ACEOF -+@%:@define DYNAMIC_UNI 1 -+_ACEOF -+ -+ -+fi; -+ -+# Check whether --enable-allow_uni30 or --disable-allow_uni30 was given. -+if test "${enable_allow_uni30+set}" = set; then -+ enableval="$enable_allow_uni30" -+ -+ if test "$with_uni" = "3.1" ; then -+ cat >>confdefs.h <<\_ACEOF -+@%:@define ALLOW_UNI30 1 -+_ACEOF -+ -+ else -+ { echo "$as_me:$LINENO: WARNING: *** Allow UNI 3.0 was not enabled. It is only valid when UNI 3.1 is specified as the default via --with-uni." >&5 -+echo "$as_me: WARNING: *** Allow UNI 3.0 was not enabled. It is only valid when UNI 3.1 is specified as the default via --with-uni." >&2;} -+ fi -+ -+ -+fi; -+ -+# Check whether --enable-q2963_1 or --disable-q2963_1 was given. -+if test "${enable_q2963_1+set}" = set; then -+ enableval="$enable_q2963_1" -+ -+ if test "$with_uni" = "4.0" ; then -+ cat >>confdefs.h <<\_ACEOF -+@%:@define Q2963_1 1 -+_ACEOF -+ -+ else -+ { echo "$as_me:$LINENO: WARNING: *** Q.2963.1 was not enabled. It is only valid when UNI 4.0 is specified as the default via --with-uni." >&5 -+echo "$as_me: WARNING: *** Q.2963.1 was not enabled. It is only valid when UNI 4.0 is specified as the default via --with-uni." >&2;} -+ fi -+ -+ -+fi; -+ -+# Check whether --enable-cisco or --disable-cisco was given. -+if test "${enable_cisco+set}" = set; then -+ enableval="$enable_cisco" -+ cat >>confdefs.h <<\_ACEOF -+@%:@define CISCO 1 -+_ACEOF -+ -+ -+fi; -+ -+# Check whether --enable-thomflex or --disable-thomflex was given. -+if test "${enable_thomflex+set}" = set; then -+ enableval="$enable_thomflex" -+ cat >>confdefs.h <<\_ACEOF -+@%:@define THOMFLEX 1 -+_ACEOF -+ -+ -+fi; -+ -+cat >>confdefs.h <<\_ACEOF -+@%:@define BROKEN_POLL 1 -+_ACEOF -+ -+ -+# Check whether --enable-mpoa_1_1 or --disable-mpoa_1_1 was given. -+if test "${enable_mpoa_1_1+set}" = set; then -+ enableval="$enable_mpoa_1_1" -+ cat >>confdefs.h <<\_ACEOF -+@%:@define MPOA_1_1 1 -+_ACEOF -+ -+ -+fi; -+ -+# Check whether --enable-mpr or --disable-mpr was given. -+if test "${enable_mpr+set}" = set; then -+ enableval="$enable_mpr" -+ -+ case "$enable_mpr" in -+ "" | y | ye | yes | Y | YE | YES ) -+ -+echo "$as_me:$LINENO: checking for main in -lmpr" >&5 -+echo $ECHO_N "checking for main in -lmpr... $ECHO_C" >&6 -+if test "${ac_cv_lib_mpr_main+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lmpr $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ -+int -+main () -+{ -+main (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_mpr_main=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_mpr_main=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_mpr_main" >&5 -+echo "${ECHO_T}$ac_cv_lib_mpr_main" >&6 -+if test $ac_cv_lib_mpr_main = yes; then -+ cat >>confdefs.h <<_ACEOF -+@%:@define HAVE_LIBMPR 1 -+_ACEOF -+ -+ LIBS="-lmpr $LIBS" -+ -+else -+ -+ { echo "$as_me:$LINENO: WARNING: *** Could not find libmpr! Is MPR installed?" >&5 -+echo "$as_me: WARNING: *** Could not find libmpr! Is MPR installed?" >&2;} -+ -+ -+fi -+ -+ ;; -+ esac -+ -+ -+fi; -+ -+ -+ ac_config_files="$ac_config_files Makefile doc/Makefile m4/Makefile src/Makefile src/include/Makefile src/lib/Makefile src/br2684/Makefile" -+cat >confcache <<\_ACEOF -+# This file is a shell script that caches the results of configure -+# tests run on this system so they can be shared between configure -+# scripts and configure runs, see configure's option --config-cache. -+# It is not useful on other systems. If it contains results you don't -+# want to keep, you may remove or edit it. -+# -+# config.status only pays attention to the cache file if you give it -+# the --recheck option to rerun configure. -+# -+# `ac_cv_env_foo' variables (set or unset) will be overridden when -+# loading this file, other *unset* `ac_cv_foo' will be assigned the -+# following values. -+ -+_ACEOF -+ -+# The following way of writing the cache mishandles newlines in values, -+# but we know of no workaround that is simple, portable, and efficient. -+# So, don't put newlines in cache variables' values. -+# Ultrix sh set writes to stderr and can't be redirected directly, -+# and sets the high bit in the cache file unless we assign to the vars. -+{ -+ (set) 2>&1 | -+ case `(ac_space=' '; set | grep ac_space) 2>&1` in -+ *ac_space=\ *) -+ # `set' does not quote correctly, so add quotes (double-quote -+ # substitution turns \\\\ into \\, and sed turns \\ into \). -+ sed -n \ -+ "s/'/'\\\\''/g; -+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" -+ ;; -+ *) -+ # `set' quotes correctly as required by POSIX, so do not add quotes. -+ sed -n \ -+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" -+ ;; -+ esac; -+} | -+ sed ' -+ t clear -+ : clear -+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ -+ t end -+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ -+ : end' >>confcache -+if diff $cache_file confcache >/dev/null 2>&1; then :; else -+ if test -w $cache_file; then -+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" -+ cat confcache >$cache_file -+ else -+ echo "not updating unwritable cache $cache_file" -+ fi -+fi -+rm -f confcache -+ -+test "x$prefix" = xNONE && prefix=$ac_default_prefix -+# Let make expand exec_prefix. -+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -+ -+# VPATH may cause trouble with some makes, so we remove $(srcdir), -+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -+# trailing colons and then remove the whole line if VPATH becomes empty -+# (actually we leave an empty line to preserve line numbers). -+if test "x$srcdir" = x.; then -+ ac_vpsub='/^[ ]*VPATH[ ]*=/{ -+s/:*\$(srcdir):*/:/; -+s/:*\${srcdir}:*/:/; -+s/:*@srcdir@:*/:/; -+s/^\([^=]*=[ ]*\):*/\1/; -+s/:*$//; -+s/^[^=]*=[ ]*$//; -+}' -+fi -+ -+DEFS=-DHAVE_CONFIG_H -+ -+ac_libobjs= -+ac_ltlibobjs= -+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue -+ # 1. Remove the extension, and $U if already installed. -+ ac_i=`echo "$ac_i" | -+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'` -+ # 2. Add them. -+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" -+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -+done -+LIB@&t@OBJS=$ac_libobjs -+ -+LTLIBOBJS=$ac_ltlibobjs -+ -+ -+ -+: ${CONFIG_STATUS=./config.status} -+ac_clean_files_save=$ac_clean_files -+ac_clean_files="$ac_clean_files $CONFIG_STATUS" -+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -+echo "$as_me: creating $CONFIG_STATUS" >&6;} -+cat >$CONFIG_STATUS <<_ACEOF -+#! $SHELL -+# Generated by $as_me. -+# Run this file to recreate the current configuration. -+# Compiler output produced by configure, useful for debugging -+# configure, is in config.log if it exists. -+ -+debug=false -+ac_cs_recheck=false -+ac_cs_silent=false -+SHELL=\${CONFIG_SHELL-$SHELL} -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<\_ACEOF -+## --------------------- ## -+## M4sh Initialization. ## -+## --------------------- ## -+ -+# Be Bourne compatible -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -+ # is contrary to our usage. Disable this feature. -+ alias -g '${1+"$@"}'='"$@"' -+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then -+ set -o posix -+fi -+DUALCASE=1; export DUALCASE # for MKS sh -+ -+# Support unset when possible. -+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -+ as_unset=unset -+else -+ as_unset=false -+fi -+ -+ -+# Work around bugs in pre-3.0 UWIN ksh. -+$as_unset ENV MAIL MAILPATH -+PS1='$ ' -+PS2='> ' -+PS4='+ ' -+ -+# NLS nuisances. -+for as_var in \ -+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -+ LC_TELEPHONE LC_TIME -+do -+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ eval $as_var=C; export $as_var -+ else -+ $as_unset $as_var -+ fi -+done -+ -+# Required to use basename. -+if expr a : '\(a\)' >/dev/null 2>&1; then -+ as_expr=expr -+else -+ as_expr=false -+fi -+ -+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then -+ as_basename=basename -+else -+ as_basename=false -+fi -+ -+ -+# Name of the executable. -+as_me=`$as_basename "$0" || -+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ -+ X"$0" : 'X\(//\)$' \| \ -+ X"$0" : 'X\(/\)$' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X/"$0" | -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } -+ /^X\/\(\/\/\)$/{ s//\1/; q; } -+ /^X\/\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ -+ -+# PATH needs CR, and LINENO needs CR and PATH. -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits -+ -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; then -+ echo "#! /bin/sh" >conf$$.sh -+ echo "exit 0" >>conf$$.sh -+ chmod +x conf$$.sh -+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then -+ PATH_SEPARATOR=';' -+ else -+ PATH_SEPARATOR=: -+ fi -+ rm -f conf$$.sh -+fi -+ -+ -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x$as_lineno_3" = "x$as_lineno_2" || { -+ # Find who we are. Look in the path if we contain no path at all -+ # relative or not. -+ case $0 in -+ *[\\/]* ) as_myself=$0 ;; -+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+done -+ -+ ;; -+ esac -+ # We did not find ourselves, most probably we were run as `sh COMMAND' -+ # in which case we are not to be found in the path. -+ if test "x$as_myself" = x; then -+ as_myself=$0 -+ fi -+ if test ! -f "$as_myself"; then -+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} -+ { (exit 1); exit 1; }; } -+ fi -+ case $CONFIG_SHELL in -+ '') -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for as_base in sh bash ksh sh5; do -+ case $as_dir in -+ /*) -+ if ("$as_dir/$as_base" -c ' -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then -+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } -+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } -+ CONFIG_SHELL=$as_dir/$as_base -+ export CONFIG_SHELL -+ exec "$CONFIG_SHELL" "$0" ${1+"$@"} -+ fi;; -+ esac -+ done -+done -+;; -+ esac -+ -+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -+ # uniformly replaced by the line number. The first 'sed' inserts a -+ # line-number line before each line; the second 'sed' does the real -+ # work. The second script uses 'N' to pair each line-number line -+ # with the numbered line, and appends trailing '-' during -+ # substitution so that $LINENO is not a special case at line end. -+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) -+ sed '=' <$as_myself | -+ sed ' -+ N -+ s,$,-, -+ : loop -+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, -+ t loop -+ s,-$,, -+ s,^['$as_cr_digits']*\n,, -+ ' >$as_me.lineno && -+ chmod +x $as_me.lineno || -+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} -+ { (exit 1); exit 1; }; } -+ -+ # Don't try to exec as it changes $[0], causing all sort of problems -+ # (the dirname of $[0] is not the place where we might find the -+ # original and so on. Autoconf is especially sensible to this). -+ . ./$as_me.lineno -+ # Exit status is that of the last command. -+ exit -+} -+ -+ -+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in -+ *c*,-n*) ECHO_N= ECHO_C=' -+' ECHO_T=' ' ;; -+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; -+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -+esac -+ -+if expr a : '\(a\)' >/dev/null 2>&1; then -+ as_expr=expr -+else -+ as_expr=false -+fi -+ -+rm -f conf$$ conf$$.exe conf$$.file -+echo >conf$$.file -+if ln -s conf$$.file conf$$ 2>/dev/null; then -+ # We could just check for DJGPP; but this test a) works b) is more generic -+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). -+ if test -f conf$$.exe; then -+ # Don't use ln at all; we don't have any links -+ as_ln_s='cp -p' -+ else -+ as_ln_s='ln -s' -+ fi -+elif ln conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s=ln -+else -+ as_ln_s='cp -p' -+fi -+rm -f conf$$ conf$$.exe conf$$.file -+ -+if mkdir -p . 2>/dev/null; then -+ as_mkdir_p=: -+else -+ test -d ./-p && rmdir ./-p -+ as_mkdir_p=false -+fi -+ -+as_executable_p="test -f" -+ -+# Sed expression to map a string onto a valid CPP name. -+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -+ -+# Sed expression to map a string onto a valid variable name. -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -+ -+ -+# IFS -+# We need space, tab and new line, in precisely that order. -+as_nl=' -+' -+IFS=" $as_nl" -+ -+# CDPATH. -+$as_unset CDPATH -+ -+exec 6>&1 -+ -+# Open the log real soon, to keep \$[0] and so on meaningful, and to -+# report actual input values of CONFIG_FILES etc. instead of their -+# values after options handling. Logging --version etc. is OK. -+exec 5>>config.log -+{ -+ echo -+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX -+@%:@@%:@ Running $as_me. @%:@@%:@ -+_ASBOX -+} >&5 -+cat >&5 <<_CSEOF -+ -+This file was extended by $as_me, which was -+generated by GNU Autoconf 2.59. Invocation command line was -+ -+ CONFIG_FILES = $CONFIG_FILES -+ CONFIG_HEADERS = $CONFIG_HEADERS -+ CONFIG_LINKS = $CONFIG_LINKS -+ CONFIG_COMMANDS = $CONFIG_COMMANDS -+ $ $0 $@ -+ -+_CSEOF -+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -+echo >&5 -+_ACEOF -+ -+# Files that config.status was made for. -+if test -n "$ac_config_files"; then -+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -+fi -+ -+if test -n "$ac_config_headers"; then -+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -+fi -+ -+if test -n "$ac_config_links"; then -+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -+fi -+ -+if test -n "$ac_config_commands"; then -+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -+fi -+ -+cat >>$CONFIG_STATUS <<\_ACEOF -+ -+ac_cs_usage="\ -+\`$as_me' instantiates files from templates according to the -+current configuration. -+ -+Usage: $0 [OPTIONS] [FILE]... -+ -+ -h, --help print this help, then exit -+ -V, --version print version number, then exit -+ -q, --quiet do not print progress messages -+ -d, --debug don't remove temporary files -+ --recheck update $as_me by reconfiguring in the same conditions -+ --file=FILE[:TEMPLATE] -+ instantiate the configuration file FILE -+ --header=FILE[:TEMPLATE] -+ instantiate the configuration header FILE -+ -+Configuration files: -+$config_files -+ -+Configuration headers: -+$config_headers -+ -+Configuration commands: -+$config_commands -+ -+Report bugs to <bug-autoconf@gnu.org>." -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<_ACEOF -+ac_cs_version="\\ -+config.status -+configured by $0, generated by GNU Autoconf 2.59, -+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -+ -+Copyright (C) 2003 Free Software Foundation, Inc. -+This config.status script is free software; the Free Software Foundation -+gives unlimited permission to copy, distribute and modify it." -+srcdir=$srcdir -+INSTALL="$INSTALL" -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<\_ACEOF -+# If no file are specified by the user, then we need to provide default -+# value. By we need to know if files were specified by the user. -+ac_need_defaults=: -+while test $# != 0 -+do -+ case $1 in -+ --*=*) -+ ac_option=`expr "x$1" : 'x\([^=]*\)='` -+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` -+ ac_shift=: -+ ;; -+ -*) -+ ac_option=$1 -+ ac_optarg=$2 -+ ac_shift=shift -+ ;; -+ *) # This is not an option, so the user has probably given explicit -+ # arguments. -+ ac_option=$1 -+ ac_need_defaults=false;; -+ esac -+ -+ case $ac_option in -+ # Handling of the options. -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF -+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) -+ ac_cs_recheck=: ;; -+ --version | --vers* | -V ) -+ echo "$ac_cs_version"; exit 0 ;; -+ --he | --h) -+ # Conflict between --help and --header -+ { { echo "$as_me:$LINENO: error: ambiguous option: $1 -+Try \`$0 --help' for more information." >&5 -+echo "$as_me: error: ambiguous option: $1 -+Try \`$0 --help' for more information." >&2;} -+ { (exit 1); exit 1; }; };; -+ --help | --hel | -h ) -+ echo "$ac_cs_usage"; exit 0 ;; -+ --debug | --d* | -d ) -+ debug=: ;; -+ --file | --fil | --fi | --f ) -+ $ac_shift -+ CONFIG_FILES="$CONFIG_FILES $ac_optarg" -+ ac_need_defaults=false;; -+ --header | --heade | --head | --hea ) -+ $ac_shift -+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" -+ ac_need_defaults=false;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ -+ | -silent | --silent | --silen | --sile | --sil | --si | --s) -+ ac_cs_silent=: ;; -+ -+ # This is an error. -+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -+Try \`$0 --help' for more information." >&5 -+echo "$as_me: error: unrecognized option: $1 -+Try \`$0 --help' for more information." >&2;} -+ { (exit 1); exit 1; }; } ;; -+ -+ *) ac_config_targets="$ac_config_targets $1" ;; -+ -+ esac -+ shift -+done -+ -+ac_configure_extra_args= -+ -+if $ac_cs_silent; then -+ exec 6>/dev/null -+ ac_configure_extra_args="$ac_configure_extra_args --silent" -+fi -+ -+_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF -+if \$ac_cs_recheck; then -+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 -+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -+fi -+ -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<_ACEOF -+# -+# INIT-COMMANDS section. -+# -+ -+ -+ -+_ACEOF -+ -+ -+ -+cat >>$CONFIG_STATUS <<\_ACEOF -+for ac_config_target in $ac_config_targets -+do -+ case "$ac_config_target" in -+ # Handling of arguments. -+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; -+ "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; -+ "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; -+ "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; -+ "src/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/include/Makefile" ;; -+ "src/lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;; -+ "src/br2684/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/br2684/Makefile" ;; -+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; -+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; -+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -+echo "$as_me: error: invalid argument: $ac_config_target" >&2;} -+ { (exit 1); exit 1; }; };; -+ esac -+done -+ -+# If the user did not use the arguments to specify the items to instantiate, -+# then the envvar interface is used. Set only those that are not. -+# We use the long form for the default assignment because of an extremely -+# bizarre bug on SunOS 4.1.3. -+if $ac_need_defaults; then -+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -+fi -+ -+# Have a temporary directory for convenience. Make it in the build tree -+# simply because there is no reason to put it here, and in addition, -+# creating and moving files from /tmp can sometimes cause problems. -+# Create a temporary directory, and hook for its removal unless debugging. -+$debug || -+{ -+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 -+ trap '{ (exit 1); exit 1; }' 1 2 13 15 -+} -+ -+# Create a (secure) tmp directory for tmp files. -+ -+{ -+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && -+ test -n "$tmp" && test -d "$tmp" -+} || -+{ -+ tmp=./confstat$$-$RANDOM -+ (umask 077 && mkdir $tmp) -+} || -+{ -+ echo "$me: cannot create a temporary directory in ." >&2 -+ { (exit 1); exit 1; } -+} -+ -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<_ACEOF -+ -+# -+# CONFIG_FILES section. -+# -+ -+# No need to generate the scripts if there are no CONFIG_FILES. -+# This happens for instance when ./config.status config.h -+if test -n "\$CONFIG_FILES"; then -+ # Protect against being on the right side of a sed subst in config.status. -+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; -+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -+s,@SHELL@,$SHELL,;t t -+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -+s,@exec_prefix@,$exec_prefix,;t t -+s,@prefix@,$prefix,;t t -+s,@program_transform_name@,$program_transform_name,;t t -+s,@bindir@,$bindir,;t t -+s,@sbindir@,$sbindir,;t t -+s,@libexecdir@,$libexecdir,;t t -+s,@datadir@,$datadir,;t t -+s,@sysconfdir@,$sysconfdir,;t t -+s,@sharedstatedir@,$sharedstatedir,;t t -+s,@localstatedir@,$localstatedir,;t t -+s,@libdir@,$libdir,;t t -+s,@includedir@,$includedir,;t t -+s,@oldincludedir@,$oldincludedir,;t t -+s,@infodir@,$infodir,;t t -+s,@mandir@,$mandir,;t t -+s,@build_alias@,$build_alias,;t t -+s,@host_alias@,$host_alias,;t t -+s,@target_alias@,$target_alias,;t t -+s,@DEFS@,$DEFS,;t t -+s,@ECHO_C@,$ECHO_C,;t t -+s,@ECHO_N@,$ECHO_N,;t t -+s,@ECHO_T@,$ECHO_T,;t t -+s,@LIBS@,$LIBS,;t t -+s,@build@,$build,;t t -+s,@build_cpu@,$build_cpu,;t t -+s,@build_vendor@,$build_vendor,;t t -+s,@build_os@,$build_os,;t t -+s,@host@,$host,;t t -+s,@host_cpu@,$host_cpu,;t t -+s,@host_vendor@,$host_vendor,;t t -+s,@host_os@,$host_os,;t t -+s,@target@,$target,;t t -+s,@target_cpu@,$target_cpu,;t t -+s,@target_vendor@,$target_vendor,;t t -+s,@target_os@,$target_os,;t t -+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -+s,@INSTALL_DATA@,$INSTALL_DATA,;t t -+s,@PACKAGE@,$PACKAGE,;t t -+s,@VERSION@,$VERSION,;t t -+s,@ACLOCAL@,$ACLOCAL,;t t -+s,@AUTOCONF@,$AUTOCONF,;t t -+s,@AUTOMAKE@,$AUTOMAKE,;t t -+s,@AUTOHEADER@,$AUTOHEADER,;t t -+s,@MAKEINFO@,$MAKEINFO,;t t -+s,@SET_MAKE@,$SET_MAKE,;t t -+s,@LIBVER_CURRENT@,$LIBVER_CURRENT,;t t -+s,@LIBVER_REVISION@,$LIBVER_REVISION,;t t -+s,@LIBVER_AGE@,$LIBVER_AGE,;t t -+s,@CC@,$CC,;t t -+s,@CFLAGS@,$CFLAGS,;t t -+s,@LDFLAGS@,$LDFLAGS,;t t -+s,@CPPFLAGS@,$CPPFLAGS,;t t -+s,@ac_ct_CC@,$ac_ct_CC,;t t -+s,@EXEEXT@,$EXEEXT,;t t -+s,@OBJEXT@,$OBJEXT,;t t -+s,@LEX@,$LEX,;t t -+s,@LEXLIB@,$LEXLIB,;t t -+s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t -+s,@YACC@,$YACC,;t t -+s,@LN_S@,$LN_S,;t t -+s,@ECHO@,$ECHO,;t t -+s,@RANLIB@,$RANLIB,;t t -+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -+s,@STRIP@,$STRIP,;t t -+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -+s,@CPP@,$CPP,;t t -+s,@EGREP@,$EGREP,;t t -+s,@LIBTOOL@,$LIBTOOL,;t t -+s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t -+s,@PERL@,$PERL,;t t -+s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t -+s,@LTLIBOBJS@,$LTLIBOBJS,;t t -+CEOF -+ -+_ACEOF -+ -+ cat >>$CONFIG_STATUS <<\_ACEOF -+ # Split the substitutions into bite-sized pieces for seds with -+ # small command number limits, like on Digital OSF/1 and HP-UX. -+ ac_max_sed_lines=48 -+ ac_sed_frag=1 # Number of current file. -+ ac_beg=1 # First line for current file. -+ ac_end=$ac_max_sed_lines # Line after last line for current file. -+ ac_more_lines=: -+ ac_sed_cmds= -+ while $ac_more_lines; do -+ if test $ac_beg -gt 1; then -+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag -+ else -+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag -+ fi -+ if test ! -s $tmp/subs.frag; then -+ ac_more_lines=false -+ else -+ # The purpose of the label and of the branching condition is to -+ # speed up the sed processing (if there are no `@' at all, there -+ # is no need to browse any of the substitutions). -+ # These are the two extra sed commands mentioned above. -+ (echo ':t -+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed -+ if test -z "$ac_sed_cmds"; then -+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" -+ else -+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" -+ fi -+ ac_sed_frag=`expr $ac_sed_frag + 1` -+ ac_beg=$ac_end -+ ac_end=`expr $ac_end + $ac_max_sed_lines` -+ fi -+ done -+ if test -z "$ac_sed_cmds"; then -+ ac_sed_cmds=cat -+ fi -+fi # test -n "$CONFIG_FILES" -+ -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF -+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue -+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". -+ case $ac_file in -+ - | *:- | *:-:* ) # input from stdin -+ cat >$tmp/stdin -+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -+ * ) ac_file_in=$ac_file.in ;; -+ esac -+ -+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. -+ ac_dir=`(dirname "$ac_file") 2>/dev/null || -+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$ac_file" : 'X\(//\)[^/]' \| \ -+ X"$ac_file" : 'X\(//\)$' \| \ -+ X"$ac_file" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X"$ac_file" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -+ /^X\(\/\/\)[^/].*/{ s//\1/; q; } -+ /^X\(\/\/\)$/{ s//\1/; q; } -+ /^X\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ { if $as_mkdir_p; then -+ mkdir -p "$ac_dir" -+ else -+ as_dir="$ac_dir" -+ as_dirs= -+ while test ! -d "$as_dir"; do -+ as_dirs="$as_dir $as_dirs" -+ as_dir=`(dirname "$as_dir") 2>/dev/null || -+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X"$as_dir" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -+ /^X\(\/\/\)[^/].*/{ s//\1/; q; } -+ /^X\(\/\/\)$/{ s//\1/; q; } -+ /^X\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ done -+ test ! -n "$as_dirs" || mkdir $as_dirs -+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} -+ { (exit 1); exit 1; }; }; } -+ -+ ac_builddir=. -+ -+if test "$ac_dir" != .; then -+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` -+ # A "../" for each directory in $ac_dir_suffix. -+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -+else -+ ac_dir_suffix= ac_top_builddir= -+fi -+ -+case $srcdir in -+ .) # No --srcdir option. We are building in place. -+ ac_srcdir=. -+ if test -z "$ac_top_builddir"; then -+ ac_top_srcdir=. -+ else -+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` -+ fi ;; -+ [\\/]* | ?:[\\/]* ) # Absolute path. -+ ac_srcdir=$srcdir$ac_dir_suffix; -+ ac_top_srcdir=$srcdir ;; -+ *) # Relative path. -+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix -+ ac_top_srcdir=$ac_top_builddir$srcdir ;; -+esac -+ -+# Do not use `cd foo && pwd` to compute absolute paths, because -+# the directories may not exist. -+case `pwd` in -+.) ac_abs_builddir="$ac_dir";; -+*) -+ case "$ac_dir" in -+ .) ac_abs_builddir=`pwd`;; -+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; -+ *) ac_abs_builddir=`pwd`/"$ac_dir";; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_builddir=${ac_top_builddir}.;; -+*) -+ case ${ac_top_builddir}. in -+ .) ac_abs_top_builddir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; -+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_srcdir=$ac_srcdir;; -+*) -+ case $ac_srcdir in -+ .) ac_abs_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; -+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_srcdir=$ac_top_srcdir;; -+*) -+ case $ac_top_srcdir in -+ .) ac_abs_top_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; -+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; -+ esac;; -+esac -+ -+ -+ case $INSTALL in -+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; -+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;; -+ esac -+ -+ # Let's still pretend it is `configure' which instantiates (i.e., don't -+ # use $as_me), people would be surprised to read: -+ # /* config.h. Generated by config.status. */ -+ if test x"$ac_file" = x-; then -+ configure_input= -+ else -+ configure_input="$ac_file. " -+ fi -+ configure_input=$configure_input"Generated from `echo $ac_file_in | -+ sed 's,.*/,,'` by configure." -+ -+ # First look for the input files in the build tree, otherwise in the -+ # src tree. -+ ac_file_inputs=`IFS=: -+ for f in $ac_file_in; do -+ case $f in -+ -) echo $tmp/stdin ;; -+ [\\/$]*) -+ # Absolute (can't be DOS-style, as IFS=:) -+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -+echo "$as_me: error: cannot find input file: $f" >&2;} -+ { (exit 1); exit 1; }; } -+ echo "$f";; -+ *) # Relative -+ if test -f "$f"; then -+ # Build tree -+ echo "$f" -+ elif test -f "$srcdir/$f"; then -+ # Source tree -+ echo "$srcdir/$f" -+ else -+ # /dev/null tree -+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -+echo "$as_me: error: cannot find input file: $f" >&2;} -+ { (exit 1); exit 1; }; } -+ fi;; -+ esac -+ done` || { (exit 1); exit 1; } -+ -+ if test x"$ac_file" != x-; then -+ { echo "$as_me:$LINENO: creating $ac_file" >&5 -+echo "$as_me: creating $ac_file" >&6;} -+ rm -f "$ac_file" -+ fi -+_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF -+ sed "$ac_vpsub -+$extrasub -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF -+:t -+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -+s,@configure_input@,$configure_input,;t t -+s,@srcdir@,$ac_srcdir,;t t -+s,@abs_srcdir@,$ac_abs_srcdir,;t t -+s,@top_srcdir@,$ac_top_srcdir,;t t -+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -+s,@builddir@,$ac_builddir,;t t -+s,@abs_builddir@,$ac_abs_builddir,;t t -+s,@top_builddir@,$ac_top_builddir,;t t -+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -+s,@INSTALL@,$ac_INSTALL,;t t -+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out -+ rm -f $tmp/stdin -+ if test x"$ac_file" != x-; then -+ mv $tmp/out $ac_file -+ else -+ cat $tmp/out -+ rm -f $tmp/out -+ fi -+ -+done -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF -+ -+# -+# CONFIG_HEADER section. -+# -+ -+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -+# NAME is the cpp macro being defined and VALUE is the value it is being given. -+# -+# ac_d sets the value in "#define NAME VALUE" lines. -+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -+ac_dB='[ ].*$,\1#\2' -+ac_dC=' ' -+ac_dD=',;t' -+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -+ac_uB='$,\1#\2define\3' -+ac_uC=' ' -+ac_uD=',;t' -+ -+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue -+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". -+ case $ac_file in -+ - | *:- | *:-:* ) # input from stdin -+ cat >$tmp/stdin -+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -+ * ) ac_file_in=$ac_file.in ;; -+ esac -+ -+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -+echo "$as_me: creating $ac_file" >&6;} -+ -+ # First look for the input files in the build tree, otherwise in the -+ # src tree. -+ ac_file_inputs=`IFS=: -+ for f in $ac_file_in; do -+ case $f in -+ -) echo $tmp/stdin ;; -+ [\\/$]*) -+ # Absolute (can't be DOS-style, as IFS=:) -+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -+echo "$as_me: error: cannot find input file: $f" >&2;} -+ { (exit 1); exit 1; }; } -+ # Do quote $f, to prevent DOS paths from being IFS'd. -+ echo "$f";; -+ *) # Relative -+ if test -f "$f"; then -+ # Build tree -+ echo "$f" -+ elif test -f "$srcdir/$f"; then -+ # Source tree -+ echo "$srcdir/$f" -+ else -+ # /dev/null tree -+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -+echo "$as_me: error: cannot find input file: $f" >&2;} -+ { (exit 1); exit 1; }; } -+ fi;; -+ esac -+ done` || { (exit 1); exit 1; } -+ # Remove the trailing spaces. -+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -+ -+_ACEOF -+ -+# Transform confdefs.h into two sed scripts, `conftest.defines' and -+# `conftest.undefs', that substitutes the proper values into -+# config.h.in to produce config.h. The first handles `#define' -+# templates, and the second `#undef' templates. -+# And first: Protect against being on the right side of a sed subst in -+# config.status. Protect against being in an unquoted here document -+# in config.status. -+rm -f conftest.defines conftest.undefs -+# Using a here document instead of a string reduces the quoting nightmare. -+# Putting comments in sed scripts is not portable. -+# -+# `end' is used to avoid that the second main sed command (meant for -+# 0-ary CPP macros) applies to n-ary macro definitions. -+# See the Autoconf documentation for `clear'. -+cat >confdef2sed.sed <<\_ACEOF -+s/[\\&,]/\\&/g -+s,[\\$`],\\&,g -+t clear -+: clear -+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -+t end -+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -+: end -+_ACEOF -+# If some macros were called several times there might be several times -+# the same #defines, which is useless. Nevertheless, we may not want to -+# sort them, since we want the *last* AC-DEFINE to be honored. -+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -+rm -f confdef2sed.sed -+ -+# This sed command replaces #undef with comments. This is necessary, for -+# example, in the case of _POSIX_SOURCE, which is predefined and required -+# on some systems where configure will not decide to define it. -+cat >>conftest.undefs <<\_ACEOF -+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -+_ACEOF -+ -+# Break up conftest.defines because some shells have a limit on the size -+# of here documents, and old seds have small limits too (100 cmds). -+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -+echo ' :' >>$CONFIG_STATUS -+rm -f conftest.tail -+while grep . conftest.defines >/dev/null -+do -+ # Write a limited-size here document to $tmp/defines.sed. -+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS -+ # Speed up: don't consider the non `#define' lines. -+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS -+ # Work around the forget-to-reset-the-flag bug. -+ echo 't clr' >>$CONFIG_STATUS -+ echo ': clr' >>$CONFIG_STATUS -+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS -+ echo 'CEOF -+ sed -f $tmp/defines.sed $tmp/in >$tmp/out -+ rm -f $tmp/in -+ mv $tmp/out $tmp/in -+' >>$CONFIG_STATUS -+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail -+ rm -f conftest.defines -+ mv conftest.tail conftest.defines -+done -+rm -f conftest.defines -+echo ' fi # grep' >>$CONFIG_STATUS -+echo >>$CONFIG_STATUS -+ -+# Break up conftest.undefs because some shells have a limit on the size -+# of here documents, and old seds have small limits too (100 cmds). -+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -+rm -f conftest.tail -+while grep . conftest.undefs >/dev/null -+do -+ # Write a limited-size here document to $tmp/undefs.sed. -+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS -+ # Speed up: don't consider the non `#undef' -+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS -+ # Work around the forget-to-reset-the-flag bug. -+ echo 't clr' >>$CONFIG_STATUS -+ echo ': clr' >>$CONFIG_STATUS -+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS -+ echo 'CEOF -+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out -+ rm -f $tmp/in -+ mv $tmp/out $tmp/in -+' >>$CONFIG_STATUS -+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail -+ rm -f conftest.undefs -+ mv conftest.tail conftest.undefs -+done -+rm -f conftest.undefs -+ -+cat >>$CONFIG_STATUS <<\_ACEOF -+ # Let's still pretend it is `configure' which instantiates (i.e., don't -+ # use $as_me), people would be surprised to read: -+ # /* config.h. Generated by config.status. */ -+ if test x"$ac_file" = x-; then -+ echo "/* Generated by configure. */" >$tmp/config.h -+ else -+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h -+ fi -+ cat $tmp/in >>$tmp/config.h -+ rm -f $tmp/in -+ if test x"$ac_file" != x-; then -+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then -+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -+echo "$as_me: $ac_file is unchanged" >&6;} -+ else -+ ac_dir=`(dirname "$ac_file") 2>/dev/null || -+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$ac_file" : 'X\(//\)[^/]' \| \ -+ X"$ac_file" : 'X\(//\)$' \| \ -+ X"$ac_file" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X"$ac_file" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -+ /^X\(\/\/\)[^/].*/{ s//\1/; q; } -+ /^X\(\/\/\)$/{ s//\1/; q; } -+ /^X\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ { if $as_mkdir_p; then -+ mkdir -p "$ac_dir" -+ else -+ as_dir="$ac_dir" -+ as_dirs= -+ while test ! -d "$as_dir"; do -+ as_dirs="$as_dir $as_dirs" -+ as_dir=`(dirname "$as_dir") 2>/dev/null || -+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X"$as_dir" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -+ /^X\(\/\/\)[^/].*/{ s//\1/; q; } -+ /^X\(\/\/\)$/{ s//\1/; q; } -+ /^X\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ done -+ test ! -n "$as_dirs" || mkdir $as_dirs -+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} -+ { (exit 1); exit 1; }; }; } -+ -+ rm -f $ac_file -+ mv $tmp/config.h $ac_file -+ fi -+ else -+ cat $tmp/config.h -+ rm -f $tmp/config.h -+ fi -+done -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF -+ -+# -+# CONFIG_COMMANDS section. -+# -+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue -+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'` -+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` -+ ac_dir=`(dirname "$ac_dest") 2>/dev/null || -+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$ac_dest" : 'X\(//\)[^/]' \| \ -+ X"$ac_dest" : 'X\(//\)$' \| \ -+ X"$ac_dest" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X"$ac_dest" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -+ /^X\(\/\/\)[^/].*/{ s//\1/; q; } -+ /^X\(\/\/\)$/{ s//\1/; q; } -+ /^X\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ { if $as_mkdir_p; then -+ mkdir -p "$ac_dir" -+ else -+ as_dir="$ac_dir" -+ as_dirs= -+ while test ! -d "$as_dir"; do -+ as_dirs="$as_dir $as_dirs" -+ as_dir=`(dirname "$as_dir") 2>/dev/null || -+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || -+echo X"$as_dir" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -+ /^X\(\/\/\)[^/].*/{ s//\1/; q; } -+ /^X\(\/\/\)$/{ s//\1/; q; } -+ /^X\(\/\).*/{ s//\1/; q; } -+ s/.*/./; q'` -+ done -+ test ! -n "$as_dirs" || mkdir $as_dirs -+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} -+ { (exit 1); exit 1; }; }; } -+ -+ ac_builddir=. -+ -+if test "$ac_dir" != .; then -+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` -+ # A "../" for each directory in $ac_dir_suffix. -+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -+else -+ ac_dir_suffix= ac_top_builddir= -+fi -+ -+case $srcdir in -+ .) # No --srcdir option. We are building in place. -+ ac_srcdir=. -+ if test -z "$ac_top_builddir"; then -+ ac_top_srcdir=. -+ else -+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` -+ fi ;; -+ [\\/]* | ?:[\\/]* ) # Absolute path. -+ ac_srcdir=$srcdir$ac_dir_suffix; -+ ac_top_srcdir=$srcdir ;; -+ *) # Relative path. -+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix -+ ac_top_srcdir=$ac_top_builddir$srcdir ;; -+esac -+ -+# Do not use `cd foo && pwd` to compute absolute paths, because -+# the directories may not exist. -+case `pwd` in -+.) ac_abs_builddir="$ac_dir";; -+*) -+ case "$ac_dir" in -+ .) ac_abs_builddir=`pwd`;; -+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; -+ *) ac_abs_builddir=`pwd`/"$ac_dir";; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_builddir=${ac_top_builddir}.;; -+*) -+ case ${ac_top_builddir}. in -+ .) ac_abs_top_builddir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; -+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_srcdir=$ac_srcdir;; -+*) -+ case $ac_srcdir in -+ .) ac_abs_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; -+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_srcdir=$ac_top_srcdir;; -+*) -+ case $ac_top_srcdir in -+ .) ac_abs_top_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; -+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; -+ esac;; -+esac -+ -+ -+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -+echo "$as_me: executing $ac_dest commands" >&6;} -+ case $ac_dest in -+ default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;; -+ esac -+done -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<\_ACEOF -+ -+{ (exit 0); exit 0; } -+_ACEOF -+chmod +x $CONFIG_STATUS -+ac_clean_files=$ac_clean_files_save -+ -+ -+# configure is writing to config.log, and then calls config.status. -+# config.status does its own redirection, appending to config.log. -+# Unfortunately, on DOS this fails, as config.log is still kept open -+# by configure, so config.status won't be able to write to it; its -+# output is simply discarded. So we exec the FD to /dev/null, -+# effectively closing config.log, so it can be properly (re)opened and -+# appended to by config.status. When coming back to configure, we -+# need to make the FD available again. -+if test "$no_create" != yes; then -+ ac_cs_success=: -+ ac_config_status_args= -+ test "$silent" = yes && -+ ac_config_status_args="$ac_config_status_args --quiet" -+ exec 5>/dev/null -+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false -+ exec 5>>config.log -+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which -+ # would make configure fail if this is the last instruction. -+ $ac_cs_success || { (exit 1); exit 1; } -+fi -+ -+ -diff -urN linux-atm.old/autom4te.cache/requests linux-atm.dev/autom4te.cache/requests ---- linux-atm.old/autom4te.cache/requests 1970-01-01 01:00:00.000000000 +0100 -+++ linux-atm.dev/autom4te.cache/requests 2005-08-23 01:12:41.188174872 +0200 -@@ -0,0 +1,116 @@ -+# This file was generated by Autom4te Sat Jan 8 16:59:54 PST 2005. -+# It contains the lists of macros which have been traced. -+# It can be safely removed. -+ -+@request = ( -+ bless( [ -+ '0', -+ 1, -+ [ -+ '/usr/share/autoconf' -+ ], -+ [ -+ '/usr/share/autoconf/autoconf/autoconf.m4f', -+ 'aclocal.m4', -+ 'configure.in' -+ ], -+ { -+ 'm4_pattern_forbid' => 1, -+ 'AC_CONFIG_LIBOBJ_DIR' => 1, -+ 'AC_TYPE_OFF_T' => 1, -+ 'AC_C_VOLATILE' => 1, -+ 'AC_FUNC_CLOSEDIR_VOID' => 1, -+ 'AC_REPLACE_FNMATCH' => 1, -+ 'AC_PROG_LIBTOOL' => 1, -+ 'AC_FUNC_STAT' => 1, -+ 'AC_HEADER_TIME' => 1, -+ 'AC_FUNC_WAIT3' => 1, -+ 'AM_AUTOMAKE_VERSION' => 1, -+ 'AC_STRUCT_TM' => 1, -+ 'AC_FUNC_LSTAT' => 1, -+ 'AC_TYPE_MODE_T' => 1, -+ 'AC_FUNC_GETMNTENT' => 1, -+ 'AC_FUNC_STRTOD' => 1, -+ 'AC_CHECK_HEADERS' => 1, -+ 'AC_FUNC_STRNLEN' => 1, -+ 'm4_sinclude' => 1, -+ 'AC_PROG_CXX' => 1, -+ 'AC_PATH_X' => 1, -+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, -+ 'AC_PROG_AWK' => 1, -+ '_m4_warn' => 1, -+ 'AC_HEADER_STDC' => 1, -+ 'AC_HEADER_MAJOR' => 1, -+ 'AC_FUNC_ERROR_AT_LINE' => 1, -+ 'AC_PROG_GCC_TRADITIONAL' => 1, -+ 'AC_LIBSOURCE' => 1, -+ 'AC_FUNC_MBRTOWC' => 1, -+ 'AC_STRUCT_ST_BLOCKS' => 1, -+ 'AC_TYPE_SIGNAL' => 1, -+ 'AC_TYPE_UID_T' => 1, -+ 'AC_CONFIG_AUX_DIR' => 1, -+ 'AC_PROG_MAKE_SET' => 1, -+ 'sinclude' => 1, -+ 'm4_pattern_allow' => 1, -+ 'AC_DEFINE_TRACE_LITERAL' => 1, -+ 'AC_FUNC_STRERROR_R' => 1, -+ 'AC_PROG_CC' => 1, -+ 'AC_FUNC_FORK' => 1, -+ 'AC_DECL_SYS_SIGLIST' => 1, -+ 'AC_FUNC_VPRINTF' => 1, -+ 'AC_FUNC_STRCOLL' => 1, -+ 'AC_PROG_YACC' => 1, -+ 'AC_INIT' => 1, -+ 'AC_STRUCT_TIMEZONE' => 1, -+ 'AC_FUNC_CHOWN' => 1, -+ 'AC_SUBST' => 1, -+ 'AC_FUNC_ALLOCA' => 1, -+ 'AC_CANONICAL_HOST' => 1, -+ 'AC_FUNC_GETPGRP' => 1, -+ 'AC_PROG_RANLIB' => 1, -+ 'AM_INIT_AUTOMAKE' => 1, -+ 'AC_FUNC_SETPGRP' => 1, -+ 'AC_CONFIG_SUBDIRS' => 1, -+ 'AC_FUNC_MMAP' => 1, -+ 'AC_FUNC_REALLOC' => 1, -+ 'AC_TYPE_SIZE_T' => 1, -+ 'AC_CONFIG_LINKS' => 1, -+ 'AC_CHECK_TYPES' => 1, -+ 'AC_CHECK_MEMBERS' => 1, -+ 'AM_MAINTAINER_MODE' => 1, -+ 'AC_FUNC_UTIME_NULL' => 1, -+ 'AC_FUNC_SELECT_ARGTYPES' => 1, -+ 'AC_FUNC_STRFTIME' => 1, -+ 'AC_HEADER_STAT' => 1, -+ 'AC_C_INLINE' => 1, -+ 'AC_PROG_CPP' => 1, -+ 'AC_TYPE_PID_T' => 1, -+ 'AC_C_CONST' => 1, -+ 'AC_PROG_LEX' => 1, -+ 'AC_CONFIG_FILES' => 1, -+ 'include' => 1, -+ 'AC_FUNC_SETVBUF_REVERSED' => 1, -+ 'AC_PROG_INSTALL' => 1, -+ 'AM_GNU_GETTEXT' => 1, -+ 'AC_FUNC_OBSTACK' => 1, -+ 'AC_CHECK_LIB' => 1, -+ 'AC_FUNC_MALLOC' => 1, -+ 'AC_FUNC_GETGROUPS' => 1, -+ 'AC_FUNC_GETLOADAVG' => 1, -+ 'AH_OUTPUT' => 1, -+ 'AC_FUNC_FSEEKO' => 1, -+ 'AM_PROG_CC_C_O' => 1, -+ 'AM_CONDITIONAL' => 1, -+ 'AC_CANONICAL_SYSTEM' => 1, -+ 'AC_FUNC_MKTIME' => 1, -+ 'AC_CONFIG_HEADERS' => 1, -+ 'AC_HEADER_SYS_WAIT' => 1, -+ 'AC_FUNC_MEMCMP' => 1, -+ 'AC_PROG_LN_S' => 1, -+ 'm4_include' => 1, -+ 'AC_HEADER_DIRENT' => 1, -+ 'AC_CHECK_FUNCS' => 1 -+ } -+ ], 'Autom4te::Request' ) -+ ); -+ -diff -urN linux-atm.old/autom4te.cache/traces.0 linux-atm.dev/autom4te.cache/traces.0 ---- linux-atm.old/autom4te.cache/traces.0 1970-01-01 01:00:00.000000000 +0100 -+++ linux-atm.dev/autom4te.cache/traces.0 2005-08-23 01:12:40.958209832 +0200 -@@ -0,0 +1,426 @@ -+m4trace:configure.in:8: -1- AC_INIT([src/include/atm.h]) -+m4trace:configure.in:8: -1- m4_pattern_forbid([^_?A[CHUM]_]) -+m4trace:configure.in:8: -1- m4_pattern_forbid([_AC_]) -+m4trace:configure.in:8: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -+m4trace:configure.in:8: -1- m4_pattern_allow([^AS_FLAGS$]) -+m4trace:configure.in:8: -1- m4_pattern_forbid([^_?m4_]) -+m4trace:configure.in:8: -1- m4_pattern_forbid([^dnl$]) -+m4trace:configure.in:8: -1- m4_pattern_forbid([^_?AS_]) -+m4trace:configure.in:8: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) -+m4trace:configure.in:8: -1- AC_SUBST([PATH_SEPARATOR]) -+m4trace:configure.in:8: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) -+m4trace:configure.in:8: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) -+m4trace:configure.in:8: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) -+m4trace:configure.in:8: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) -+m4trace:configure.in:8: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) -+m4trace:configure.in:8: -1- AC_SUBST([exec_prefix], [NONE]) -+m4trace:configure.in:8: -1- AC_SUBST([prefix], [NONE]) -+m4trace:configure.in:8: -1- AC_SUBST([program_transform_name], [s,x,x,]) -+m4trace:configure.in:8: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) -+m4trace:configure.in:8: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) -+m4trace:configure.in:8: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) -+m4trace:configure.in:8: -1- AC_SUBST([datadir], ['${prefix}/share']) -+m4trace:configure.in:8: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) -+m4trace:configure.in:8: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) -+m4trace:configure.in:8: -1- AC_SUBST([localstatedir], ['${prefix}/var']) -+m4trace:configure.in:8: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) -+m4trace:configure.in:8: -1- AC_SUBST([includedir], ['${prefix}/include']) -+m4trace:configure.in:8: -1- AC_SUBST([oldincludedir], ['/usr/include']) -+m4trace:configure.in:8: -1- AC_SUBST([infodir], ['${prefix}/info']) -+m4trace:configure.in:8: -1- AC_SUBST([mandir], ['${prefix}/man']) -+m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) -+m4trace:configure.in:8: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ -+#undef PACKAGE_NAME]) -+m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) -+m4trace:configure.in:8: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ -+#undef PACKAGE_TARNAME]) -+m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) -+m4trace:configure.in:8: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ -+#undef PACKAGE_VERSION]) -+m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) -+m4trace:configure.in:8: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ -+#undef PACKAGE_STRING]) -+m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) -+m4trace:configure.in:8: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ -+#undef PACKAGE_BUGREPORT]) -+m4trace:configure.in:8: -1- AC_SUBST([build_alias]) -+m4trace:configure.in:8: -1- AC_SUBST([host_alias]) -+m4trace:configure.in:8: -1- AC_SUBST([target_alias]) -+m4trace:configure.in:8: -1- AC_SUBST([DEFS]) -+m4trace:configure.in:8: -1- AC_SUBST([ECHO_C]) -+m4trace:configure.in:8: -1- AC_SUBST([ECHO_N]) -+m4trace:configure.in:8: -1- AC_SUBST([ECHO_T]) -+m4trace:configure.in:8: -1- AC_SUBST([LIBS]) -+m4trace:configure.in:9: -1- AC_CONFIG_HEADERS([config.h]) -+m4trace:configure.in:9: -1- _m4_warn([obsolete], [The macro `AC_OUTPUT_COMMANDS' is obsolete. -+You should run autoupdate.], [autoconf/status.m4:318: AC_OUTPUT_COMMANDS is expanded from... -+aclocal.m4:34: AM_CONFIG_HEADER is expanded from... -+configure.in:9: the top level]) -+m4trace:configure.in:9: -3- _m4_warn([obsolete], [The macro `_AC_OUTPUT_COMMANDS_CNT' is obsolete. -+You should run autoupdate.], [autoconf/status.m4:321: _AC_OUTPUT_COMMANDS_CNT is expanded from... -+autoconf/status.m4:318: AC_OUTPUT_COMMANDS is expanded from... -+aclocal.m4:34: AM_CONFIG_HEADER is expanded from... -+configure.in:9: the top level]) -+m4trace:configure.in:12: -1- AC_CANONICAL_SYSTEM -+m4trace:configure.in:12: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:1660: AC_CANONICAL_SYSTEM is expanded from... -+configure.in:12: the top level]) -+m4trace:configure.in:12: -1- AC_CANONICAL_HOST -+m4trace:configure.in:12: -1- AC_SUBST([build], [$ac_cv_build]) -+m4trace:configure.in:12: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`]) -+m4trace:configure.in:12: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`]) -+m4trace:configure.in:12: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`]) -+m4trace:configure.in:12: -1- AC_SUBST([host], [$ac_cv_host]) -+m4trace:configure.in:12: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`]) -+m4trace:configure.in:12: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`]) -+m4trace:configure.in:12: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`]) -+m4trace:configure.in:12: -1- AC_SUBST([target], [$ac_cv_target]) -+m4trace:configure.in:12: -1- AC_SUBST([target_cpu], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`]) -+m4trace:configure.in:12: -1- AC_SUBST([target_vendor], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`]) -+m4trace:configure.in:12: -1- AC_SUBST([target_os], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`]) -+m4trace:configure.in:14: -1- AM_INIT_AUTOMAKE([linux-atm], [2.4.1]) -+m4trace:configure.in:14: -1- AM_AUTOMAKE_VERSION([1.4-p6]) -+m4trace:configure.in:14: -1- AC_PROG_INSTALL -+m4trace:configure.in:14: -1- AC_SUBST([INSTALL_PROGRAM]) -+m4trace:configure.in:14: -1- AC_SUBST([INSTALL_SCRIPT]) -+m4trace:configure.in:14: -1- AC_SUBST([INSTALL_DATA]) -+m4trace:configure.in:14: -1- AC_SUBST([PACKAGE]) -+m4trace:configure.in:14: -1- AC_SUBST([VERSION]) -+m4trace:configure.in:14: -2- AC_DEFINE_TRACE_LITERAL([PACKAGE]) -+m4trace:configure.in:14: -2- AH_OUTPUT([PACKAGE], [/* Name of package */ -+#undef PACKAGE]) -+m4trace:configure.in:14: -2- AC_DEFINE_TRACE_LITERAL([VERSION]) -+m4trace:configure.in:14: -2- AH_OUTPUT([VERSION], [/* Version number of package */ -+#undef VERSION]) -+m4trace:configure.in:14: -1- AC_SUBST([ACLOCAL]) -+m4trace:configure.in:14: -1- AC_SUBST([AUTOCONF]) -+m4trace:configure.in:14: -1- AC_SUBST([AUTOMAKE]) -+m4trace:configure.in:14: -1- AC_SUBST([AUTOHEADER]) -+m4trace:configure.in:14: -1- AC_SUBST([MAKEINFO]) -+m4trace:configure.in:14: -1- AC_PROG_MAKE_SET -+m4trace:configure.in:14: -1- AC_SUBST([SET_MAKE]) -+m4trace:configure.in:19: -1- AC_SUBST([LIBVER_CURRENT]) -+m4trace:configure.in:20: -1- AC_SUBST([LIBVER_REVISION]) -+m4trace:configure.in:21: -1- AC_SUBST([LIBVER_AGE]) -+m4trace:configure.in:24: -1- AC_PROG_CC -+m4trace:configure.in:24: -1- AC_SUBST([CC]) -+m4trace:configure.in:24: -1- AC_SUBST([CFLAGS]) -+m4trace:configure.in:24: -1- AC_SUBST([LDFLAGS]) -+m4trace:configure.in:24: -1- AC_SUBST([CPPFLAGS]) -+m4trace:configure.in:24: -1- AC_SUBST([CC]) -+m4trace:configure.in:24: -1- AC_SUBST([ac_ct_CC]) -+m4trace:configure.in:24: -1- AC_SUBST([CC]) -+m4trace:configure.in:24: -1- AC_SUBST([ac_ct_CC]) -+m4trace:configure.in:24: -1- AC_SUBST([CC]) -+m4trace:configure.in:24: -1- AC_SUBST([CC]) -+m4trace:configure.in:24: -1- AC_SUBST([ac_ct_CC]) -+m4trace:configure.in:24: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) -+m4trace:configure.in:24: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) -+m4trace:configure.in:25: -1- AC_SUBST([LEX]) -+m4trace:configure.in:25: -1- AC_PROG_LEX -+m4trace:configure.in:25: -1- AC_SUBST([LEX]) -+m4trace:configure.in:25: -1- AC_CHECK_LIB([fl], [yywrap], [LEXLIB="-lfl"], [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")]) -+m4trace:configure.in:25: -1- AC_CHECK_LIB([l], [yywrap], [LEXLIB="-ll"]) -+m4trace:configure.in:25: -1- AC_SUBST([LEXLIB]) -+m4trace:configure.in:25: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root]) -+m4trace:configure.in:25: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER]) -+m4trace:configure.in:25: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a -+ `char[]\'. */ -+#undef YYTEXT_POINTER]) -+m4trace:configure.in:25: -1- _m4_warn([obsolete], [The macro `AC_DECL_YYTEXT' is obsolete. -+You should run autoupdate.], [autoconf/programs.m4:438: AC_DECL_YYTEXT is expanded from... -+aclocal.m4:165: AM_PROG_LEX is expanded from... -+configure.in:25: the top level]) -+m4trace:configure.in:25: -1- AC_PROG_LEX -+m4trace:configure.in:25: -1- _m4_warn([syntax], [AC_PROG_LEX invoked multiple times], [autoconf/programs.m4:438: AC_DECL_YYTEXT is expanded from... -+aclocal.m4:165: AM_PROG_LEX is expanded from... -+configure.in:25: the top level]) -+m4trace:configure.in:26: -1- AC_PROG_YACC -+m4trace:configure.in:26: -1- AC_SUBST([YACC]) -+m4trace:configure.in:27: -1- AC_PROG_INSTALL -+m4trace:configure.in:27: -1- AC_SUBST([INSTALL_PROGRAM]) -+m4trace:configure.in:27: -1- AC_SUBST([INSTALL_SCRIPT]) -+m4trace:configure.in:27: -1- AC_SUBST([INSTALL_DATA]) -+m4trace:configure.in:30: -1- AC_PROG_LIBTOOL -+m4trace:configure.in:30: -1- AC_PROG_LN_S -+m4trace:configure.in:30: -1- AC_SUBST([LN_S], [$as_ln_s]) -+m4trace:configure.in:30: -1- AC_SUBST([ECHO]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_CHECK_TOOL_PREFIX' is obsolete. -+You should run autoupdate.], [autoconf/programs.m4:188: AC_CHECK_TOOL_PREFIX is expanded from... -+configure.in:30: AC_CHECK_TOOL_PREFIX is required by... -+aclocal.m4:3303: AC_PATH_MAGIC is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- AC_SUBST([RANLIB]) -+m4trace:configure.in:30: -1- AC_SUBST([ac_ct_RANLIB]) -+m4trace:configure.in:30: -1- AC_SUBST([STRIP]) -+m4trace:configure.in:30: -1- AC_SUBST([ac_ct_STRIP]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. -+You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE', -+and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_LANG_C' is obsolete. -+You should run autoupdate.], [autoconf/c.m4:71: AC_LANG_C is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. -+You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:376: AC_FD_CC is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+aclocal.m4:509: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE is expanded from... -+configure.in:30: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE is required by... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:376: AC_FD_CC is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+aclocal.m4:509: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE is expanded from... -+configure.in:30: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE is required by... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:376: AC_FD_CC is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+aclocal.m4:509: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE is expanded from... -+configure.in:30: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE is required by... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:376: AC_FD_CC is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+aclocal.m4:509: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE is expanded from... -+configure.in:30: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE is required by... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries], [aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries], [aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure], [aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure], [aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:376: AC_FD_CC is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... -+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe], [aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe], [aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... -+aclocal.m4:3110: _LT_AC_LTCONFIG_HACK is expanded from... -+aclocal.m4:296: AC_LIBTOOL_SETUP is expanded from... -+configure.in:30: AC_LIBTOOL_SETUP is required by... -+aclocal.m4:183: AC_PROG_LIBTOOL is expanded from... -+aclocal.m4:3701: AM_PROG_LIBTOOL is expanded from... -+configure.in:30: the top level]) -+m4trace:configure.in:30: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], -+ [lt_cv_dlopen="dlopen"], -+ [AC_CHECK_LIB([dl], [dlopen], -+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], -+ [AC_CHECK_LIB([svld], [dlopen], -+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], -+ [AC_CHECK_LIB([dld], [dld_link], -+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) -+ ]) -+ ]) -+ ]) -+ ]) -+m4trace:configure.in:30: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], -+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], -+ [AC_CHECK_LIB([dld], [dld_link], -+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) -+ ]) -+ ]) -+m4trace:configure.in:30: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], -+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) -+ ]) -+m4trace:configure.in:30: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) -+m4trace:configure.in:30: -1- AC_CHECK_HEADERS([dlfcn.h]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */ -+#undef HAVE_DLFCN_H]) -+m4trace:configure.in:30: -1- AC_HEADER_STDC -+m4trace:configure.in:30: -1- AC_PROG_CPP -+m4trace:configure.in:30: -1- AC_SUBST([CPP]) -+m4trace:configure.in:30: -1- AC_SUBST([CPPFLAGS]) -+m4trace:configure.in:30: -1- AC_SUBST([CPP]) -+m4trace:configure.in:30: -1- AC_SUBST([EGREP]) -+m4trace:configure.in:30: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -+m4trace:configure.in:30: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ -+#undef STDC_HEADERS]) -+m4trace:configure.in:30: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -+ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */ -+#undef HAVE_SYS_TYPES_H]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */ -+#undef HAVE_SYS_STAT_H]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */ -+#undef HAVE_STDLIB_H]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */ -+#undef HAVE_STRING_H]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */ -+#undef HAVE_MEMORY_H]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */ -+#undef HAVE_STRINGS_H]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */ -+#undef HAVE_INTTYPES_H]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */ -+#undef HAVE_STDINT_H]) -+m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */ -+#undef HAVE_UNISTD_H]) -+m4trace:configure.in:30: -1- AC_SUBST([LIBTOOL]) -+m4trace:configure.in:31: -1- AC_SUBST([LIBTOOL_DEPS]) -+m4trace:configure.in:34: -1- AC_SUBST([PERL], [$ac_cv_path_PERL]) -+m4trace:configure.in:35: -1- AC_SUBST([PERL]) -+m4trace:configure.in:51: -1- AC_CHECK_LIB([resolv], [main], [], [{ { echo "$as_me:$LINENO: error: *** Unable to find libresolv!!!" >&5 -+echo "$as_me: error: *** Unable to find libresolv!!!" >&2;} -+ { (exit 1); exit 1; }; } -+]) -+m4trace:configure.in:51: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */ -+#undef HAVE_LIBRESOLV]) -+m4trace:configure.in:51: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV]) -+m4trace:configure.in:62: -1- AC_DEFINE_TRACE_LITERAL([YY_USE_CONST]) -+m4trace:configure.in:68: -1- AC_DEFINE_TRACE_LITERAL([ATMSIGD_CONF]) -+m4trace:configure.in:86: -2- AC_DEFINE_TRACE_LITERAL([DYNAMIC_UNI]) -+m4trace:configure.in:87: -1- AC_DEFINE_TRACE_LITERAL([UNI30]) -+m4trace:configure.in:87: -1- AC_DEFINE_TRACE_LITERAL([UNI31]) -+m4trace:configure.in:87: -1- AC_DEFINE_TRACE_LITERAL([UNI40]) -+m4trace:configure.in:87: -1- AC_DEFINE_TRACE_LITERAL([DYNAMIC_UNI]) -+m4trace:configure.in:98: -1- AC_DEFINE_TRACE_LITERAL([ALLOW_UNI30]) -+m4trace:configure.in:109: -1- AC_DEFINE_TRACE_LITERAL([Q2963_1]) -+m4trace:configure.in:113: -2- AC_DEFINE_TRACE_LITERAL([CISCO]) -+m4trace:configure.in:118: -2- AC_DEFINE_TRACE_LITERAL([THOMFLEX]) -+m4trace:configure.in:123: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_POLL]) -+m4trace:configure.in:127: -2- AC_DEFINE_TRACE_LITERAL([MPOA_1_1]) -+m4trace:configure.in:143: -1- AC_CHECK_LIB([mpr], [main], [], [ -+ AC_MSG_WARN([*** Could not find libmpr! Is MPR installed?]) -+ -+ ]) -+m4trace:configure.in:143: -1- AH_OUTPUT([HAVE_LIBMPR], [/* Define to 1 if you have the `mpr\' library (-lmpr). */ -+#undef HAVE_LIBMPR]) -+m4trace:configure.in:143: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBMPR]) -+m4trace:configure.in:157: -1- AC_CONFIG_FILES([Makefile \ -+ doc/Makefile \ -+ m4/Makefile \ -+ src/Makefile \ -+ src/include/Makefile \ -+ src/lib/Makefile \ -+ src/br2684/Makefile \ -+ ]) -+m4trace:configure.in:157: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. -+You should run autoupdate.], []) -+m4trace:configure.in:157: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -+m4trace:configure.in:157: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) diff -urN linux-atm.old/configure linux-atm.dev/configure --- linux-atm.old/configure 2005-08-23 01:12:10.846787000 +0200 +++ linux-atm.dev/configure 2005-08-23 01:12:41.187175024 +0200 From f199007fe174cba2e5716e618c4b562c0022d1fb Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 12:39:53 +0000 Subject: [PATCH 200/757] remove old ipkg directory SVN-Revision: 3979 --- openwrt/package/madwifi/ipkg/kmod-madwifi.control | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 openwrt/package/madwifi/ipkg/kmod-madwifi.control diff --git a/openwrt/package/madwifi/ipkg/kmod-madwifi.control b/openwrt/package/madwifi/ipkg/kmod-madwifi.control deleted file mode 100644 index ddab426b303..00000000000 --- a/openwrt/package/madwifi/ipkg/kmod-madwifi.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-madwifi -Priority: optional -Section: net -Description: Driver for Atheros 802.11a/b/g MiniPCI cards From 8fbfbb3619786afd6668393f5504ffac11452694 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 12:40:42 +0000 Subject: [PATCH 201/757] add missing base-files for rb532 SVN-Revision: 3980 --- openwrt/package/base-files/rb532-2.6/etc/config/network | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 openwrt/package/base-files/rb532-2.6/etc/config/network diff --git a/openwrt/package/base-files/rb532-2.6/etc/config/network b/openwrt/package/base-files/rb532-2.6/etc/config/network new file mode 100644 index 00000000000..f60332cd8cf --- /dev/null +++ b/openwrt/package/base-files/rb532-2.6/etc/config/network @@ -0,0 +1,5 @@ +# Network configuration file + +## LAN configuration +lan_ifname="eth0" +lan_proto="dhcp" From 7eda64608c43f18cc9070dbe8e72a1f24563b957 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 13:04:58 +0000 Subject: [PATCH 202/757] move source files to src/ and let the kernel tree build the module. SVN-Revision: 3981 --- openwrt/package/diag/Makefile | 43 +++++++++++-------- openwrt/package/diag/src/Makefile | 19 ++++++++ .../package/diag/{diag_led.c => src/diag.c} | 0 3 files changed, 44 insertions(+), 18 deletions(-) create mode 100644 openwrt/package/diag/src/Makefile rename openwrt/package/diag/{diag_led.c => src/diag.c} (100%) diff --git a/openwrt/package/diag/Makefile b/openwrt/package/diag/Makefile index d6aa4bf1708..6fed3b51bfd 100644 --- a/openwrt/package/diag/Makefile +++ b/openwrt/package/diag/Makefile @@ -3,35 +3,42 @@ include $(TOPDIR)/rules.mk include $(TOPDIR)/package/kernel.mk -PKG_NAME := kmod-diag -PKG_RELEASE := 1 -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) +PKG_NAME:=kmod-diag +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) include $(TOPDIR)/package/rules.mk -DIAG_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \ - -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \ - -Wa,-mips32 -Wa,--trap -Wstrict-prototypes -Wno-trigraphs -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -nostdinc \ - -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -c -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DBCMDRIVER - define Package/kmod-diag - SECTION:=drivers - CATEGORY:=Drivers - DEFAULT:=y - DEPENDS:=@LINUX_2_4_BRCM - TITLE:=Driver for router LEDs and Buttons - DESCRIPTION:=Driver for router LEDs and Buttons - URL:= - VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEFAULT:=y +DEPENDS:=@LINUX_2_4_BRCM +TITLE:=Driver for router LEDs and Buttons +DESCRIPTION:=Driver for router LEDs and Buttons +VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ endef define Build/Compile - $(TARGET_CC) $(DIAG_FLAGS) -o $(PKG_BUILD_DIR)/diag.o diag_led.c + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + PATH="$(TARGET_PATH)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="-DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include" \ + modules endef define Package/kmod-diag/install install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/diag.o $(1)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/diag.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ endef $(eval $(call BuildPackage,kmod-diag)) diff --git a/openwrt/package/diag/src/Makefile b/openwrt/package/diag/src/Makefile new file mode 100644 index 00000000000..169f2e9725f --- /dev/null +++ b/openwrt/package/diag/src/Makefile @@ -0,0 +1,19 @@ +# $Id$ +# +# Makefile for diag driver +# +# Copyright (C) 2005 Felix Fietkau <nbd@openwrt.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 the Free Software Foundation; either version +# 2 of the License, or (at your option) any later version. +# + +obj-m := diag.o + +ifeq ($(MAKING_MODULES),1) +export-objs := diag.o + +-include $(TOPDIR)/Rules.make +endif diff --git a/openwrt/package/diag/diag_led.c b/openwrt/package/diag/src/diag.c similarity index 100% rename from openwrt/package/diag/diag_led.c rename to openwrt/package/diag/src/diag.c From 9a9f6205c4ac50d7240c43004381f9445e9e86c7 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 13:09:32 +0000 Subject: [PATCH 203/757] add support for conffiles,preinst,... through templates SVN-Revision: 3982 --- openwrt/package/rules.mk | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 37dc2a0ac6f..d7719ebd05c 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -77,6 +77,12 @@ define Package/Default DESCRIPTION:= endef +define BuildIPKGVariable +pkg_$(subst -,_,$(1))_$(2) = $$(Package/$(1)/$(2)) +export pkg_$(subst -,_,$(1))_$(2) +COMMANDS += if [ -n "$$$$$$$$pkg_$(subst -,_,$(1))_$(2)" ]; then echo "$$$$$$$$pkg_$(subst -,_,$(1))_$(2)" > $(2); fi; +endef + define BuildPackage $(eval $(call Package/Default)) $(eval $(call Package/$(1))) @@ -145,6 +151,11 @@ define BuildPackage echo "@@"; endif + $(eval $(call BuildIPKGVariable,$(1),conffiles)) + $(eval $(call BuildIPKGVariable,$(1),preinst)) + $(eval $(call BuildIPKGVariable,$(1),postinst)) + $(eval $(call BuildIPKGVariable,$(1),prerm)) + $(eval $(call BuildIPKGVariable,$(1),postrm)) $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control @@ -163,9 +174,9 @@ define BuildPackage echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control chmod 644 $$(IDIR_$(1))/CONTROL/control - for file in conffiles preinst postinst prerm postrm; do \ - [ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ - done + (cd $$(IDIR_$(1))/CONTROL; \ + $(COMMANDS) \ + ) $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(call Package/$(1)/install,$$(IDIR_$(1))) From 108c394fa05dd8117ccf45efd74974f02e8e956b Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 13:09:54 +0000 Subject: [PATCH 204/757] suppress warnings. SVN-Revision: 3983 --- openwrt/package/diag/src/diag.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openwrt/package/diag/src/diag.c b/openwrt/package/diag/src/diag.c index 6ad7ff102f0..4f12a1f1e21 100644 --- a/openwrt/package/diag/src/diag.c +++ b/openwrt/package/diag/src/diag.c @@ -99,7 +99,7 @@ void (*set_dmz)(u8 state); static unsigned int diag = 0; -static void diag_change() +static void diag_change(void) { set_diag(0xFF); // off set_dmz(0xFF); // off @@ -166,11 +166,11 @@ static ctl_table sys_diag[] = { { 0 } }; -static int __init diag_init() +static int __init diag_init(void) { char *buf; u32 board_type; - sbh = sb_kattach(); + sbh = (void *)sb_kattach(); sb_gpiosetcore(sbh); board_type = sb_boardtype(sbh); @@ -255,7 +255,7 @@ static int __init diag_init() return 0; } -static void __exit diag_exit() +static void __exit diag_exit(void) { unregister_sysctl_table(diag_sysctl_header); } From 735be760e360786f5d5a78237fb37bae92c04e49 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 13:10:29 +0000 Subject: [PATCH 205/757] add conffiles to iptables SVN-Revision: 3984 --- openwrt/package/iptables/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 34e68174378..f47b936f056 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -35,6 +35,11 @@ TITLE:=IPv4 firewall administration tool URL:=http://netfilter.org/ endef +define Package/iptables/conffiles +/etc/config/firewall +/etc/firewall.user +endef + define Package/iptables-mod-conntrack SECTION:=net CATEGORY:=Base system From 68b9a0b76bfb2e90638239c5bd4c0a47b479e987 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 13:32:43 +0000 Subject: [PATCH 206/757] fix extra control files for packages containing "." and allow different conffiles for multiple packages built from the same directory SVN-Revision: 3985 --- openwrt/package/rules.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index d7719ebd05c..40e07f839fe 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -78,9 +78,9 @@ define Package/Default endef define BuildIPKGVariable -pkg_$(subst -,_,$(1))_$(2) = $$(Package/$(1)/$(2)) -export pkg_$(subst -,_,$(1))_$(2) -COMMANDS += if [ -n "$$$$$$$$pkg_$(subst -,_,$(1))_$(2)" ]; then echo "$$$$$$$$pkg_$(subst -,_,$(1))_$(2)" > $(2); fi; +pkg_$(subst .,_,$(subst -,_,$(1)))_$(2) = $$(Package/$(1)/$(2)) +export pkg_$(subst .,_,$(subst -,_,$(1))_$(2)) +$(1)_COMMANDS += if [ -n "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" ]; then echo "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" > $(2); fi; endef define BuildPackage @@ -175,7 +175,7 @@ define BuildPackage echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control chmod 644 $$(IDIR_$(1))/CONTROL/control (cd $$(IDIR_$(1))/CONTROL; \ - $(COMMANDS) \ + $($(1)_COMMANDS) \ ) $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built From 33983a27fc50ac8ddbfa37cf206dae8ba0f2dd19 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 13:38:23 +0000 Subject: [PATCH 207/757] add conffiles for base-files SVN-Revision: 3986 --- openwrt/package/base-files/Makefile | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 5e51b7e6535..c790efeab18 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -31,6 +31,48 @@ define Package/base-files$(TARGET) VERSION:=$(PKG_RELEASE) endef +define -ar7-2.4/conffiles +/etc/config/network +endef + +define -aruba-2.6/conffiles +/etc/config/network +endef + +define -au1000-2.6/conffiles +/etc/config/network +endef + +define -rb532-2.6/conffiles +/etc/config/network +endef + +define -sibyte-2.6/conffiles +/etc/config/network +endef + +define -x86-2.6/conffiles +/etc/config/network +endef + +define -xscale-2.6/conffiles +/etc/config/network +endef + + +define Package/base-files$(TARGET)/conffiles +/etc/banner +/etc/hosts +/etc/inittab +/etc/group +/etc/passwd +/etc/profile +/etc/shells +/etc/ipkg.conf +/etc/sysctl.conf +$(call $(TARGET)/conffiles) +endef + define Package/libgcc SECTION:=libs CATEGORY:=Libraries From 03f79e624fb37718a89bb103afca24274903fbb1 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Sun, 18 Jun 2006 14:32:57 +0000 Subject: [PATCH 208/757] upgrade to 2.6.17, probably break some stuff temporary SVN-Revision: 3987 --- openwrt/target/linux/aruba-2.6/Makefile | 4 +- .../linux/aruba-2.6/patches/000-aruba.patch | 374 ++++++++-------- openwrt/target/linux/au1000-2.6/Makefile | 4 +- openwrt/target/linux/brcm-2.6/Makefile | 4 +- .../linux/brcm-2.6/patches/001-bcm947xx.patch | 411 ++++++++---------- .../patches/003-bcm4710_cache_fixes.patch | 117 ++--- .../patches/004-b44_bcm47xx_support.patch | 112 ++--- .../patches/100-netfilter_layer7_2.1nbd.patch | 84 ++-- .../patches/101-ipp2p_0.8.1rc1.patch | 67 +-- openwrt/target/linux/rb532-2.6/Makefile | 4 +- .../rb532-2.6/patches/100-rb5xx_support.patch | 328 +++++++------- openwrt/target/linux/sibyte-2.6/Makefile | 4 +- .../linux/sibyte-2.6/patches/000-DUART.patch | 25 +- openwrt/target/linux/x86-2.6/Makefile | 4 +- openwrt/target/linux/xscale-2.6/Makefile | 4 +- 15 files changed, 751 insertions(+), 795 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/Makefile b/openwrt/target/linux/aruba-2.6/Makefile index 5926e6ebcdb..1f68614254d 100644 --- a/openwrt/target/linux/aruba-2.6/Makefile +++ b/openwrt/target/linux/aruba-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.7 +LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ../rules.mk include ./config diff --git a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch index 4263f8e3e97..52fb3bab0a5 100644 --- a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch +++ b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch @@ -1,6 +1,6 @@ -diff -Nur linux-2.6.16/arch/mips/aruba/Makefile linux-2.6.16-owrt/arch/mips/aruba/Makefile ---- linux-2.6.16/arch/mips/aruba/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/Makefile 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/aruba/Makefile linux-2.6.17-owrt/arch/mips/aruba/Makefile +--- linux-2.6.17/arch/mips/aruba/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/aruba/Makefile 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,49 @@ +############################################################################### +# @@ -51,9 +51,9 @@ diff -Nur linux-2.6.16/arch/mips/aruba/Makefile linux-2.6.16-owrt/arch/mips/arub +subdir-y += nvram +obj-y += nvram/built-in.o + -diff -Nur linux-2.6.16/arch/mips/aruba/nvram/Makefile linux-2.6.16-owrt/arch/mips/aruba/nvram/Makefile ---- linux-2.6.16/arch/mips/aruba/nvram/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/nvram/Makefile 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/aruba/nvram/Makefile linux-2.6.17-owrt/arch/mips/aruba/nvram/Makefile +--- linux-2.6.17/arch/mips/aruba/nvram/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/aruba/nvram/Makefile 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,46 @@ +############################################################################### +# @@ -101,9 +101,9 @@ diff -Nur linux-2.6.16/arch/mips/aruba/nvram/Makefile linux-2.6.16-owrt/arch/mip + + + -diff -Nur linux-2.6.16/arch/mips/aruba/nvram/nvram434.c linux-2.6.16-owrt/arch/mips/aruba/nvram/nvram434.c ---- linux-2.6.16/arch/mips/aruba/nvram/nvram434.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/nvram/nvram434.c 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/aruba/nvram/nvram434.c linux-2.6.17-owrt/arch/mips/aruba/nvram/nvram434.c +--- linux-2.6.17/arch/mips/aruba/nvram/nvram434.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/aruba/nvram/nvram434.c 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,392 @@ +/************************************************************************** + * @@ -497,9 +497,9 @@ diff -Nur linux-2.6.16/arch/mips/aruba/nvram/nvram434.c linux-2.6.16-owrt/arch/m +{ + nvram_mapenv(func); +} -diff -Nur linux-2.6.16/arch/mips/aruba/nvram/nvram434.h linux-2.6.16-owrt/arch/mips/aruba/nvram/nvram434.h ---- linux-2.6.16/arch/mips/aruba/nvram/nvram434.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/nvram/nvram434.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/aruba/nvram/nvram434.h linux-2.6.17-owrt/arch/mips/aruba/nvram/nvram434.h +--- linux-2.6.17/arch/mips/aruba/nvram/nvram434.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/aruba/nvram/nvram434.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,66 @@ +/************************************************************************** + * @@ -567,9 +567,9 @@ diff -Nur linux-2.6.16/arch/mips/aruba/nvram/nvram434.h linux-2.6.16-owrt/arch/m +#endif /* _NVRAM_ */ + + -diff -Nur linux-2.6.16/arch/mips/aruba/prom.c linux-2.6.16-owrt/arch/mips/aruba/prom.c ---- linux-2.6.16/arch/mips/aruba/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/prom.c 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/aruba/prom.c linux-2.6.17-owrt/arch/mips/aruba/prom.c +--- linux-2.6.17/arch/mips/aruba/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/aruba/prom.c 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,111 @@ +/************************************************************************** + * @@ -682,9 +682,9 @@ diff -Nur linux-2.6.16/arch/mips/aruba/prom.c linux-2.6.16-owrt/arch/mips/aruba/ +{ + printk("stubbed prom_free_prom_memory()\n"); +} -diff -Nur linux-2.6.16/arch/mips/aruba/serial.c linux-2.6.16-owrt/arch/mips/aruba/serial.c ---- linux-2.6.16/arch/mips/aruba/serial.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/serial.c 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/aruba/serial.c linux-2.6.17-owrt/arch/mips/aruba/serial.c +--- linux-2.6.17/arch/mips/aruba/serial.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/aruba/serial.c 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,94 @@ +/************************************************************************** + * @@ -780,9 +780,9 @@ diff -Nur linux-2.6.16/arch/mips/aruba/serial.c linux-2.6.16-owrt/arch/mips/arub + + return(0); +} -diff -Nur linux-2.6.16/arch/mips/aruba/setup.c linux-2.6.16-owrt/arch/mips/aruba/setup.c ---- linux-2.6.16/arch/mips/aruba/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/setup.c 2006-03-20 14:30:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/aruba/setup.c linux-2.6.17-owrt/arch/mips/aruba/setup.c +--- linux-2.6.17/arch/mips/aruba/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/aruba/setup.c 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,134 @@ +/************************************************************************** + * @@ -918,9 +918,9 @@ diff -Nur linux-2.6.16/arch/mips/aruba/setup.c linux-2.6.16-owrt/arch/mips/aruba +} + +EXPORT_SYMBOL(get_system_type); -diff -Nur linux-2.6.16/arch/mips/aruba/time.c linux-2.6.16-owrt/arch/mips/aruba/time.c ---- linux-2.6.16/arch/mips/aruba/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/aruba/time.c 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/aruba/time.c linux-2.6.17-owrt/arch/mips/aruba/time.c +--- linux-2.6.17/arch/mips/aruba/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/aruba/time.c 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,108 @@ +/************************************************************************** + * @@ -1030,9 +1030,9 @@ diff -Nur linux-2.6.16/arch/mips/aruba/time.c linux-2.6.16-owrt/arch/mips/aruba/ + timer_interrupt(irq, NULL, regs); + irq_exit(); +} -diff -Nur linux-2.6.16/arch/mips/Kconfig linux-2.6.16-owrt/arch/mips/Kconfig ---- linux-2.6.16/arch/mips/Kconfig 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/Kconfig 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/Kconfig linux-2.6.17-owrt/arch/mips/Kconfig +--- linux-2.6.17/arch/mips/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/Kconfig 2006-06-18 12:44:28.000000000 +0200 @@ -227,6 +227,17 @@ either a NEC Vr5432 or QED RM5231. Say Y here if you wish to build a kernel for this platform. @@ -1049,12 +1049,12 @@ diff -Nur linux-2.6.16/arch/mips/Kconfig linux-2.6.16-owrt/arch/mips/Kconfig + + config MACH_JAZZ - bool "Support for the Jazz family of machines" + bool "Jazz family of machines" select ARC -diff -Nur linux-2.6.16/arch/mips/Makefile linux-2.6.16-owrt/arch/mips/Makefile ---- linux-2.6.16/arch/mips/Makefile 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/Makefile 2006-03-20 14:25:10.000000000 +0100 -@@ -279,6 +279,14 @@ +diff -Nur linux-2.6.17/arch/mips/Makefile linux-2.6.17-owrt/arch/mips/Makefile +--- linux-2.6.17/arch/mips/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/Makefile 2006-06-18 12:44:28.000000000 +0200 +@@ -145,6 +145,14 @@ # # @@ -1069,18 +1069,18 @@ diff -Nur linux-2.6.16/arch/mips/Makefile linux-2.6.16-owrt/arch/mips/Makefile # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. # core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/ -diff -Nur linux-2.6.16/arch/mips/mm/tlbex.c linux-2.6.16-owrt/arch/mips/mm/tlbex.c ---- linux-2.6.16/arch/mips/mm/tlbex.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/mm/tlbex.c 2006-03-20 14:25:10.000000000 +0100 -@@ -852,7 +852,6 @@ - +diff -Nur linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-owrt/arch/mips/mm/tlbex.c +--- linux-2.6.17/arch/mips/mm/tlbex.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/mm/tlbex.c 2006-06-18 12:48:27.000000000 +0200 +@@ -876,7 +876,6 @@ case CPU_R10000: case CPU_R12000: + case CPU_R14000: - case CPU_4KC: case CPU_SB1: case CPU_SB1A: case CPU_4KSC: -@@ -880,6 +879,7 @@ +@@ -904,6 +903,7 @@ tlbw(p); break; @@ -1088,9 +1088,9 @@ diff -Nur linux-2.6.16/arch/mips/mm/tlbex.c linux-2.6.16-owrt/arch/mips/mm/tlbex case CPU_4KEC: case CPU_24K: case CPU_34K: -diff -Nur linux-2.6.16/drivers/net/Kconfig linux-2.6.16-owrt/drivers/net/Kconfig ---- linux-2.6.16/drivers/net/Kconfig 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/drivers/net/Kconfig 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/drivers/net/Kconfig linux-2.6.17-owrt/drivers/net/Kconfig +--- linux-2.6.17/drivers/net/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/net/Kconfig 2006-06-18 12:44:28.000000000 +0200 @@ -187,6 +187,13 @@ source "drivers/net/arm/Kconfig" @@ -1105,9 +1105,9 @@ diff -Nur linux-2.6.16/drivers/net/Kconfig linux-2.6.16-owrt/drivers/net/Kconfig config MACE tristate "MACE (Power Mac ethernet) support" depends on NET_ETHERNET && PPC_PMAC && PPC32 -diff -Nur linux-2.6.16/drivers/net/Makefile linux-2.6.16-owrt/drivers/net/Makefile ---- linux-2.6.16/drivers/net/Makefile 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/drivers/net/Makefile 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/drivers/net/Makefile linux-2.6.17-owrt/drivers/net/Makefile +--- linux-2.6.17/drivers/net/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/net/Makefile 2006-06-18 12:44:28.000000000 +0200 @@ -38,6 +38,7 @@ obj-$(CONFIG_OAKNET) += oaknet.o 8390.o @@ -1116,9 +1116,9 @@ diff -Nur linux-2.6.16/drivers/net/Makefile linux-2.6.16-owrt/drivers/net/Makefi obj-$(CONFIG_DGRS) += dgrs.o obj-$(CONFIG_VORTEX) += 3c59x.o obj-$(CONFIG_TYPHOON) += typhoon.o -diff -Nur linux-2.6.16/drivers/net/natsemi.c linux-2.6.16-owrt/drivers/net/natsemi.c ---- linux-2.6.16/drivers/net/natsemi.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/drivers/net/natsemi.c 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/drivers/net/natsemi.c linux-2.6.17-owrt/drivers/net/natsemi.c +--- linux-2.6.17/drivers/net/natsemi.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/net/natsemi.c 2006-06-18 12:44:28.000000000 +0200 @@ -771,6 +771,49 @@ static int netdev_get_eeprom(struct net_device *dev, u8 *buf); static struct ethtool_ops ethtool_ops; @@ -1169,7 +1169,7 @@ diff -Nur linux-2.6.16/drivers/net/natsemi.c linux-2.6.16-owrt/drivers/net/natse static inline void __iomem *ns_ioaddr(struct net_device *dev) { return (void __iomem *) dev->base_addr; -@@ -859,6 +902,7 @@ +@@ -871,6 +914,7 @@ goto err_ioremap; } @@ -1177,7 +1177,7 @@ diff -Nur linux-2.6.16/drivers/net/natsemi.c linux-2.6.16-owrt/drivers/net/natse /* Work around the dropped serial bit. */ prev_eedata = eeprom_read(ioaddr, 6); for (i = 0; i < 3; i++) { -@@ -867,6 +911,19 @@ +@@ -879,6 +923,19 @@ dev->dev_addr[i*2+1] = eedata >> 7; prev_eedata = eedata; } @@ -1197,9 +1197,9 @@ diff -Nur linux-2.6.16/drivers/net/natsemi.c linux-2.6.16-owrt/drivers/net/natse dev->base_addr = (unsigned long __force) ioaddr; dev->irq = irq; -diff -Nur linux-2.6.16/drivers/net/rc32434_eth.c linux-2.6.16-owrt/drivers/net/rc32434_eth.c ---- linux-2.6.16/drivers/net/rc32434_eth.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/drivers/net/rc32434_eth.c 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/rc32434_eth.c +--- linux-2.6.17/drivers/net/rc32434_eth.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/net/rc32434_eth.c 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,1268 @@ +/************************************************************************** + * @@ -2469,9 +2469,9 @@ diff -Nur linux-2.6.16/drivers/net/rc32434_eth.c linux-2.6.16-owrt/drivers/net/r + + + -diff -Nur linux-2.6.16/drivers/net/rc32434_eth.h linux-2.6.16-owrt/drivers/net/rc32434_eth.h ---- linux-2.6.16/drivers/net/rc32434_eth.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/drivers/net/rc32434_eth.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/drivers/net/rc32434_eth.h linux-2.6.17-owrt/drivers/net/rc32434_eth.h +--- linux-2.6.17/drivers/net/rc32434_eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/net/rc32434_eth.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,187 @@ +/************************************************************************** + * @@ -2660,9 +2660,9 @@ diff -Nur linux-2.6.16/drivers/net/rc32434_eth.h linux-2.6.16-owrt/drivers/net/r + rc32434_writel(0, &ch->dmadptr); + rc32434_writel(0, &ch->dmandptr); +} -diff -Nur linux-2.6.16/include/asm-mips/bootinfo.h linux-2.6.16-owrt/include/asm-mips/bootinfo.h ---- linux-2.6.16/include/asm-mips/bootinfo.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/bootinfo.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/bootinfo.h linux-2.6.17-owrt/include/asm-mips/bootinfo.h +--- linux-2.6.17/include/asm-mips/bootinfo.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/bootinfo.h 2006-06-18 12:44:28.000000000 +0200 @@ -218,6 +218,17 @@ #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ @@ -2681,11 +2681,11 @@ diff -Nur linux-2.6.16/include/asm-mips/bootinfo.h linux-2.6.16-owrt/include/asm #define CL_SIZE COMMAND_LINE_SIZE const char *get_system_type(void); -diff -Nur linux-2.6.16/include/asm-mips/cpu.h linux-2.6.16-owrt/include/asm-mips/cpu.h ---- linux-2.6.16/include/asm-mips/cpu.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/cpu.h 2006-03-20 14:25:10.000000000 +0100 -@@ -53,6 +53,9 @@ - #define PRID_IMP_R12000 0x0e00 +diff -Nur linux-2.6.17/include/asm-mips/cpu.h linux-2.6.17-owrt/include/asm-mips/cpu.h +--- linux-2.6.17/include/asm-mips/cpu.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/cpu.h 2006-06-18 12:45:56.000000000 +0200 +@@ -54,6 +54,9 @@ + #define PRID_IMP_R14000 0x0f00 #define PRID_IMP_R8000 0x1000 #define PRID_IMP_PR4450 0x1200 +#define PRID_IMP_RC32334 0x1800 @@ -2694,19 +2694,19 @@ diff -Nur linux-2.6.16/include/asm-mips/cpu.h linux-2.6.16-owrt/include/asm-mips #define PRID_IMP_R4600 0x2000 #define PRID_IMP_R4700 0x2100 #define PRID_IMP_TX39 0x2200 -@@ -196,7 +199,8 @@ - #define CPU_34K 60 - #define CPU_PR4450 61 +@@ -200,7 +203,8 @@ #define CPU_SB1A 62 --#define CPU_LAST 62 -+#define CPU_RC32300 63 -+#define CPU_LAST 63 + #define CPU_74K 63 + #define CPU_R14000 64 +-#define CPU_LAST 64 ++#define CPU_RC32300 65 ++#define CPU_LAST 65 /* * ISA Level encodings -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32300.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32300.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32300.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32300.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32300.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32300.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32300.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32300.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,142 @@ +/************************************************************************** + * @@ -2850,9 +2850,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32300.h linux-2.6.1 +} + +#endif // __IDT_RC32300_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32334.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32334.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32334.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32334.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32334.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32334.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32334.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32334.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,207 @@ +/************************************************************************** + * @@ -3061,9 +3061,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32334.h linux-2.6.1 +#define RAM_SIZE (32*1024*1024) + +#endif // __IDT_RC32334_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355_dma.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32355_dma.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355_dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32355_dma.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32355_dma.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32355_dma.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32355_dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32355_dma.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,206 @@ +/************************************************************************** + * @@ -3271,9 +3271,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355_dma.h linux-2 + ((count) & DMADESC_COUNT_MASK) + +#endif /* RC32355_DMA_H */ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355_eth.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32355_eth.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355_eth.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32355_eth.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32355_eth.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32355_eth.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32355_eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32355_eth.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,442 @@ +/************************************************************************** + * @@ -3717,9 +3717,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355_eth.h linux-2 + +#endif /* RC32355_ETHER_H */ + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32355.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32355.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32355.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32355.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32355.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32355.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,177 @@ +/************************************************************************** + * @@ -3898,9 +3898,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32355.h linux-2.6.1 +#define NVRAM_ENVSTART_OFF 32 + +#endif /* _RC32355_H_ */ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_dma.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_dma.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_dma.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_dma.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_dma.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_dma.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,226 @@ +/************************************************************************** + * @@ -4128,9 +4128,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_dma.h linux-2 +#endif // aws - Compatibility. + +#endif // __IDT_RC32365_DMA_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,86 @@ +/************************************************************************** + * @@ -4218,9 +4218,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_dma_v.h linux + local_writel(dma_addr, &ch->dmandptr); +} +#endif //__IDT_RC32365_DMA_V_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_eth.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_eth.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_eth.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_eth.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_eth.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_eth.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_eth.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,344 @@ +/************************************************************************** + * @@ -4566,9 +4566,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_eth.h linux-2 + u32 ipabmctx ; +}volatile *IPABM_ETH_t; +#endif //__IDT_RC32365_ETH_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,72 @@ +/************************************************************************** + * @@ -4642,9 +4642,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_eth_v.h linux +#define RCVPKT_LENGTH(X) (((X) & ETHRX_length_m) >> ETHRX_length_b) /* Length of the received packet */ + +#endif //__IDT_RC32365_ETH_V_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,181 @@ +/************************************************************************** + * @@ -4827,9 +4827,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_gpio.h linux- +} GPIO_DEFS_t; + +#endif //__IDT_RC32365_GPIO_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,91 @@ +/************************************************************************** + * @@ -4922,9 +4922,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_gpio_v.h linu + +#endif //__IDT_RC32365_GPIO_V_H__ + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,160 @@ +/************************************************************************** + * @@ -5086,9 +5086,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365.h linux-2.6.1 +#define RAM_SIZE (32 * 1024 * 1024) + +#endif //__IDT_RC32365_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_pci.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_pci.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_pci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_pci.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_pci.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_pci.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_pci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_pci.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,515 @@ +/************************************************************************** + * @@ -5605,9 +5605,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_pci.h linux-2 + + +#endif // __IDT_RC32365_PCI_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,217 @@ +/************************************************************************** + * @@ -5826,9 +5826,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32300/rc32365_pci_v.h linux +#define PCITC_RTIMER_VAL 0x10 + +#endif //__IDT_RC32365_PCI_V_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_dma.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_dma.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_dma.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_dma.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_dma.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_dma.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,205 @@ +/************************************************************************** + * @@ -6035,9 +6035,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_dma.h linux-2 + + + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,89 @@ +/************************************************************************** + * @@ -6128,9 +6128,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_dma_v.h linux + + + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_eth.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_eth.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_eth.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_eth.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_eth.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_eth.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_eth.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,333 @@ +/************************************************************************** + * @@ -6465,9 +6465,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_eth.h linux-2 + + + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,77 @@ +/************************************************************************** + * @@ -6546,9 +6546,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_eth_v.h linux + + + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,167 @@ +/************************************************************************** + * @@ -6717,9 +6717,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_gpio.h linux- + +#endif // __IDT_GPIO_H__ + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,199 @@ + /************************************************************************** + * @@ -6920,9 +6920,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434.h linux-2.6.1 + + + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_integ.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_integ.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_integ.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_integ.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_integ.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_integ.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_integ.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_integ.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,90 @@ +/************************************************************************** + * @@ -7014,9 +7014,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_integ.h linux +} ; + +#endif // __IDT_INTEG_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_int.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_int.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_int.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_int.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_int.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_int.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_int.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_int.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,174 @@ +/************************************************************************** + * @@ -7192,9 +7192,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_int.h linux-2 +#endif // __IDT_INT_H__ + + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,111 @@ +/************************************************************************** + * @@ -7307,9 +7307,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_iparb.h linux +}; + +#endif // __IDT_IPARB_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_pci.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_pci.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_pci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_pci.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_pci.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_pci.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_pci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_pci.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,695 @@ +/************************************************************************** + * @@ -8006,9 +8006,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_pci.h linux-2 + + + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_rst.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_rst.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_rst.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_rst.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_rst.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_rst.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_rst.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_rst.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,119 @@ +/************************************************************************** + * @@ -8129,9 +8129,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_rst.h linux-2 + BCV_res15_m = 0x00008000, +} ; +#endif // __IDT_RST_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_spi.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_spi.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_spi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_spi.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_spi.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_spi.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_spi.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_spi.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,120 @@ +/************************************************************************** + * @@ -8253,9 +8253,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_spi.h linux-2 + SIOD_pci_m = 0x00000008, +} ; +#endif // __IDT_SPI_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_timer.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_timer.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_timer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_timer.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_timer.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_timer.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_timer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_timer.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,91 @@ +/************************************************************************** + * @@ -8348,9 +8348,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_timer.h linux +} ; +#endif // __IDT_TIM_H__ + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_uart.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_uart.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_uart.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32434/rc32434_uart.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_uart.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_uart.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434_uart.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32434/rc32434_uart.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,189 @@ +/************************************************************************** + * @@ -8541,9 +8541,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32434/rc32434_uart.h linux- +} ; + +#endif // __IDT_UART_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_dma.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_dma.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_dma.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_dma.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_dma.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_dma.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,231 @@ +/************************************************************************** + * @@ -8776,9 +8776,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_dma.h linux-2 +#endif // aws - Compatibility. + +#endif //__IDT_RC32438_DMA_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,82 @@ +/************************************************************************** + * @@ -8862,9 +8862,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_dma_v.h linux + rc32438_writel(dma_addr, &ch->dmandptr); +} +#endif //__IDT_RC32438_DMA_V_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_eth.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_eth.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_eth.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_eth.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_eth.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_eth.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_eth.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,328 @@ +/************************************************************************** + * @@ -9194,9 +9194,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_eth.h linux-2 + ETHTX_cc_m = 0x001E0000, +} ; +#endif //__IDT_RC32438_ETH_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,72 @@ +/************************************************************************** + * @@ -9270,9 +9270,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_eth_v.h linux +#define RCVPKT_LENGTH(X) (((X) & ETHRX_length_m) >> ETHRX_length_b) /* Length of the received packet */ + +#endif //__IDT_RC32438_ETH_V_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,257 @@ +/************************************************************************** + * @@ -9531,9 +9531,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_gpio.h linux- +} GPIO_DEFS_t; + +#endif //__IDT_RC32438_GPIO_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,152 @@ +/************************************************************************** + * @@ -9687,9 +9687,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438.h linux-2.6.1 + return ret; +} +#endif //__IDT_RC32438_H__ -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_pci.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_pci.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_pci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_pci.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_pci.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_pci.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_pci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_pci.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,510 @@ +/************************************************************************** + * @@ -10201,9 +10201,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_pci.h linux-2 + PCIM_db_m = 0x00000004, // inbound or outbound doorbell +}; + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,190 @@ +/************************************************************************** + * @@ -10395,9 +10395,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_pci_v.h linux +#define PCITC_DTIMER_VAL 8 +#define PCITC_RTIMER_VAL 0x10 + -diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_timer.h linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_timer.h ---- linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_timer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/idt-boards/rc32438/rc32438_timer.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_timer.h linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_timer.h +--- linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438_timer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/idt-boards/rc32438/rc32438_timer.h 2006-06-18 12:44:28.000000000 +0200 @@ -0,0 +1,91 @@ +/************************************************************************** + * @@ -10490,9 +10490,9 @@ diff -Nur linux-2.6.16/include/asm-mips/idt-boards/rc32438/rc32438_timer.h linux +} ; +#endif //__IDT_RC32438_TIM_H__ + -diff -Nur linux-2.6.16/include/asm-mips/mach-generic/irq.h linux-2.6.16-owrt/include/asm-mips/mach-generic/irq.h ---- linux-2.6.16/include/asm-mips/mach-generic/irq.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/mach-generic/irq.h 2006-03-20 14:25:10.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/mach-generic/irq.h linux-2.6.17-owrt/include/asm-mips/mach-generic/irq.h +--- linux-2.6.17/include/asm-mips/mach-generic/irq.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/mach-generic/irq.h 2006-06-18 12:44:28.000000000 +0200 @@ -8,6 +8,6 @@ #ifndef __ASM_MACH_GENERIC_IRQ_H #define __ASM_MACH_GENERIC_IRQ_H @@ -10501,10 +10501,10 @@ diff -Nur linux-2.6.16/include/asm-mips/mach-generic/irq.h linux-2.6.16-owrt/inc +#define NR_IRQS 256 #endif /* __ASM_MACH_GENERIC_IRQ_H */ -diff -Nur linux-2.6.16/include/linux/kernel.h linux-2.6.16-owrt/include/linux/kernel.h ---- linux-2.6.16/include/linux/kernel.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/kernel.h 2006-03-20 14:25:10.000000000 +0100 -@@ -324,6 +324,7 @@ +diff -Nur linux-2.6.17/include/linux/kernel.h linux-2.6.17-owrt/include/linux/kernel.h +--- linux-2.6.17/include/linux/kernel.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/linux/kernel.h 2006-06-18 12:44:28.000000000 +0200 +@@ -329,6 +329,7 @@ }; /* Force a compilation error if condition is true */ diff --git a/openwrt/target/linux/au1000-2.6/Makefile b/openwrt/target/linux/au1000-2.6/Makefile index 34d4ddaf93a..39d8d4c8b02 100644 --- a/openwrt/target/linux/au1000-2.6/Makefile +++ b/openwrt/target/linux/au1000-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.7 +LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ../rules.mk include ./config diff --git a/openwrt/target/linux/brcm-2.6/Makefile b/openwrt/target/linux/brcm-2.6/Makefile index 5926e6ebcdb..1f68614254d 100644 --- a/openwrt/target/linux/brcm-2.6/Makefile +++ b/openwrt/target/linux/brcm-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.7 +LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ../rules.mk include ./config diff --git a/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch b/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch index a0820d0cd68..be3ac9429c1 100644 --- a/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch +++ b/openwrt/target/linux/brcm-2.6/patches/001-bcm947xx.patch @@ -1,6 +1,6 @@ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/bcmsrom.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/bcmsrom.c 2006-03-21 09:30:59.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/bcmsrom.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/bcmsrom.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,481 @@ +/* + * Misc useful routines to access NIC SROM/OTP . @@ -483,9 +483,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.16-owrt/a + return err; +} + -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/bcmutils.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/bcmutils.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/bcmutils.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/bcmutils.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/bcmutils.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,356 @@ +/* + * Misc useful OS-independent routines. @@ -843,9 +843,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.16-owrt/ +#define CNBUFS 5 + +#endif -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/cfe_env.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/cfe_env.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/cfe_env.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/cfe_env.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/cfe_env.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,234 @@ +/* + * NVRAM variable manipulation (Linux kernel half) @@ -1081,9 +1081,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.16-owrt/a + +} + -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/linux_osl.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/linux_osl.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/linux_osl.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/linux_osl.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/linux_osl.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,102 @@ +/* + * Linux OS Independent Layer @@ -1187,9 +1187,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.16-owrt + } +} + -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/Makefile linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/Makefile ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/Makefile 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/Makefile linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/Makefile +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/Makefile 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,6 @@ +# +# Makefile for the BCM47xx specific kernel interface routines @@ -1197,9 +1197,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/Makefile linux-2.6.16-owrt/ar +# + +obj-y := sbutils.o linux_osl.o bcmsrom.o bcmutils.o sbmips.o sbpci.o sflash.o nvram.o cfe_env.o -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/nvram.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/nvram.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/nvram.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/nvram.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/nvram.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,192 @@ +/* + * NVRAM variable manipulation (Linux kernel half) @@ -1393,9 +1393,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.16-owrt/arc +} + +EXPORT_SYMBOL(nvram_get); -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbmips.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbmips.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/sbmips.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/sbmips.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/sbmips.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,1055 @@ +/* + * BCM47XX Sonics SiliconBackplane MIPS core routines @@ -2452,9 +2452,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.16-owrt/ar + return ret; +} + -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbpci.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbpci.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/sbpci.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbpci.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/sbpci.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/sbpci.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/sbpci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/sbpci.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,534 @@ +/* + * Low-Level PCI and SB support for BCM47xx @@ -2990,9 +2990,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbpci.c linux-2.6.16-owrt/arc + return 0; +} + -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbutils.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sbutils.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/sbutils.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/sbutils.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/sbutils.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,2370 @@ +/* + * Misc utility routines for accessing chip-specific features @@ -5364,9 +5364,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.16-owrt/a +EXPORT_SYMBOL(sb_gpiosetcore); +EXPORT_SYMBOL(sb_gpiotimerval); +EXPORT_SYMBOL(sb_watchdog); -diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sflash.c linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sflash.c ---- linux-2.6.16/arch/mips/bcm947xx/broadcom/sflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/broadcom/sflash.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/broadcom/sflash.c linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/sflash.c +--- linux-2.6.17/arch/mips/bcm947xx/broadcom/sflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/broadcom/sflash.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,418 @@ +/* + * Broadcom SiliconBackplane chipcommon serial flash interface @@ -5786,9 +5786,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/broadcom/sflash.c linux-2.6.16-owrt/ar + return ret; +} + -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmdevs.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmdevs.h ---- linux-2.6.16/arch/mips/bcm947xx/include/bcmdevs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmdevs.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/bcmdevs.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmdevs.h +--- linux-2.6.17/arch/mips/bcm947xx/include/bcmdevs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmdevs.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,391 @@ +/* + * Broadcom device-specific manifest constants. @@ -6181,9 +6181,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmdevs.h linux-2.6.16-owrt/ar +#define GPIO_NUMPINS 16 + +#endif /* _BCMDEVS_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmendian.h ---- linux-2.6.16/arch/mips/bcm947xx/include/bcmendian.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmendian.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmendian.h +--- linux-2.6.17/arch/mips/bcm947xx/include/bcmendian.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmendian.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,152 @@ +/* + * local version of endian.h - byte order defines @@ -6337,9 +6337,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.16-owrt/ +) + +#endif /* _BCMENDIAN_H_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmnvram.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmnvram.h ---- linux-2.6.16/arch/mips/bcm947xx/include/bcmnvram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmnvram.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/bcmnvram.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmnvram.h +--- linux-2.6.17/arch/mips/bcm947xx/include/bcmnvram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmnvram.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,95 @@ +/* + * NVRAM variable manipulation @@ -6436,9 +6436,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmnvram.h linux-2.6.16-owrt/a +#define NVRAM_MAX_PARAM_LEN 64 + +#endif /* _bcmnvram_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmsrom.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmsrom.h ---- linux-2.6.16/arch/mips/bcm947xx/include/bcmsrom.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmsrom.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/bcmsrom.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmsrom.h +--- linux-2.6.17/arch/mips/bcm947xx/include/bcmsrom.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmsrom.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,23 @@ +/* + * Misc useful routines to access NIC local SROM/OTP . @@ -6463,9 +6463,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmsrom.h linux-2.6.16-owrt/ar +extern int srom_write(uint bus, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf); + +#endif /* _bcmsrom_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmutils.h ---- linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bcmutils.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmutils.h +--- linux-2.6.17/arch/mips/bcm947xx/include/bcmutils.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/bcmutils.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,308 @@ +/* + * Misc useful os-independent macros and functions. @@ -6775,9 +6775,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.16-owrt/a +extern uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf, uint len); + +#endif /* _bcmutils_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bitfuncs.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/bitfuncs.h ---- linux-2.6.16/arch/mips/bcm947xx/include/bitfuncs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/bitfuncs.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/bitfuncs.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/bitfuncs.h +--- linux-2.6.17/arch/mips/bcm947xx/include/bitfuncs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/bitfuncs.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,85 @@ +/* + * bit manipulation utility functions @@ -6864,9 +6864,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/bitfuncs.h linux-2.6.16-owrt/a +#endif + +#endif /* _BITFUNCS_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flash.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/flash.h ---- linux-2.6.16/arch/mips/bcm947xx/include/flash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/flash.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/flash.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/flash.h +--- linux-2.6.17/arch/mips/bcm947xx/include/flash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/flash.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,188 @@ +/* + * flash.h: Common definitions for flash access. @@ -7056,9 +7056,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flash.h linux-2.6.16-owrt/arch +extern flash_desc_t flashes[]; + +#endif -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flashutl.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/flashutl.h ---- linux-2.6.16/arch/mips/bcm947xx/include/flashutl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/flashutl.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/flashutl.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/flashutl.h +--- linux-2.6.17/arch/mips/bcm947xx/include/flashutl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/flashutl.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,27 @@ +/* + * BCM47XX FLASH driver interface @@ -7087,9 +7087,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/flashutl.h linux-2.6.16-owrt/a +#endif /* _LANGUAGE_ASSEMBLY */ + +#endif /* _flashutl_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/hndmips.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/hndmips.h ---- linux-2.6.16/arch/mips/bcm947xx/include/hndmips.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/hndmips.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/hndmips.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/hndmips.h +--- linux-2.6.17/arch/mips/bcm947xx/include/hndmips.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/hndmips.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,16 @@ +/* + * Alternate include file for HND sbmips.h since CFE also ships with @@ -7107,9 +7107,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/hndmips.h linux-2.6.16-owrt/ar + */ + +#include "sbmips.h" -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/linux_osl.h ---- linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/linux_osl.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/linux_osl.h +--- linux-2.6.17/arch/mips/bcm947xx/include/linux_osl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/linux_osl.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,331 @@ +/* + * Linux OS Independent Layer @@ -7442,9 +7442,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.16-owrt/ +#define PKTBUFSZ 2048 + +#endif /* _linux_osl_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/linuxver.h ---- linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/linuxver.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/linuxver.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/linuxver.h +--- linux-2.6.17/arch/mips/bcm947xx/include/linuxver.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/linuxver.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,389 @@ +/* + * Linux-specific abstractions to gain some independence from linux kernel versions. @@ -7835,9 +7835,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/linuxver.h linux-2.6.16-owrt/a +#endif + +#endif /* _linuxver_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/mipsinc.h ---- linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/mipsinc.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/mipsinc.h +--- linux-2.6.17/arch/mips/bcm947xx/include/mipsinc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/mipsinc.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,552 @@ +/* + * HND Run Time Environment for standalone MIPS programs. @@ -8391,9 +8391,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.16-owrt/ar +#endif /* !_LANGUAGE_ASSEMBLY */ + +#endif /* _MISPINC_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/osl.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/osl.h ---- linux-2.6.16/arch/mips/bcm947xx/include/osl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/osl.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/osl.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/osl.h +--- linux-2.6.17/arch/mips/bcm947xx/include/osl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/osl.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,42 @@ +/* + * OS Abstraction Layer @@ -8437,9 +8437,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/osl.h linux-2.6.16-owrt/arch/m +#define MAXPRIO 7 /* 0-7 */ + +#endif /* _osl_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/pcicfg.h ---- linux-2.6.16/arch/mips/bcm947xx/include/pcicfg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/pcicfg.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/pcicfg.h +--- linux-2.6.17/arch/mips/bcm947xx/include/pcicfg.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/pcicfg.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,398 @@ +/* + * pcicfg.h: PCI configuration constants and structures. @@ -8839,9 +8839,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.16-owrt/arc +#define PCI_CFG_CMD_STAT_TA 0x08000000 /* target abort status */ + +#endif -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/proto/ethernet.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/proto/ethernet.h ---- linux-2.6.16/arch/mips/bcm947xx/include/proto/ethernet.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/proto/ethernet.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/proto/ethernet.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/proto/ethernet.h +--- linux-2.6.17/arch/mips/bcm947xx/include/proto/ethernet.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/proto/ethernet.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,145 @@ +/******************************************************************************* + * $Id$ @@ -8988,9 +8988,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/proto/ethernet.h linux-2.6.16- +#undef PACKED + +#endif /* _NET_ETHERNET_H_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/s5.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/s5.h ---- linux-2.6.16/arch/mips/bcm947xx/include/s5.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/s5.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/s5.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/s5.h +--- linux-2.6.17/arch/mips/bcm947xx/include/s5.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/s5.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,103 @@ +#ifndef _S5_H_ +#define _S5_H_ @@ -9095,9 +9095,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/s5.h linux-2.6.16-owrt/arch/mi + + +#endif /*!_S5_H_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbchipc.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sbchipc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbchipc.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbchipc.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sbchipc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbchipc.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,440 @@ +/* + * SiliconBackplane Chipcommon core hardware definitions. @@ -9539,9 +9539,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.16-owrt/ar +#define OTP_MAGIC 0x4e56 + +#endif /* _SBCHIPC_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbconfig.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbconfig.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sbconfig.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbconfig.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sbconfig.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbconfig.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sbconfig.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbconfig.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,342 @@ +/* + * Broadcom SiliconBackplane hardware register definitions. @@ -9885,9 +9885,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbconfig.h linux-2.6.16-owrt/a +#define BISZ_SIZE 7 /* descriptor size in 32-bit intergers */ + +#endif /* _SBCONFIG_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbextif.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbextif.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sbextif.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbextif.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sbextif.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbextif.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sbextif.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbextif.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,242 @@ +/* + * Hardware-specific External Interface I/O core definitions @@ -10131,9 +10131,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbextif.h linux-2.6.16-owrt/ar +#define CC_CLOCK_BASE 24000000 /* Half the clock freq. in the 4710 */ + +#endif /* _SBEXTIF_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmemc.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbmemc.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sbmemc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbmemc.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sbmemc.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbmemc.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sbmemc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbmemc.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,148 @@ +/* + * BCM47XX Sonics SiliconBackplane DDR/SDRAM controller core hardware definitions. @@ -10283,9 +10283,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmemc.h linux-2.6.16-owrt/arc +#define MEMC_CONFIG_DDR 0x00000001 + +#endif /* _SBMEMC_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmips.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbmips.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sbmips.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbmips.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sbmips.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbmips.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sbmips.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbmips.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,62 @@ +/* + * Broadcom SiliconBackplane MIPS definitions @@ -10349,9 +10349,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbmips.h linux-2.6.16-owrt/arc +#endif /* _LANGUAGE_ASSEMBLY */ + +#endif /* _SBMIPS_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbpci.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbpci.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sbpci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbpci.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sbpci.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbpci.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sbpci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbpci.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,122 @@ +/* + * BCM47XX Sonics SiliconBackplane PCI core hardware definitions. @@ -10475,9 +10475,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbpci.h linux-2.6.16-owrt/arch +#endif /* !_LANGUAGE_ASSEMBLY */ + +#endif /* _SBPCI_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbsdram.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbsdram.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sbsdram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbsdram.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sbsdram.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbsdram.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sbsdram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbsdram.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,75 @@ +/* + * BCM47XX Sonics SiliconBackplane SDRAM controller core hardware definitions. @@ -10554,9 +10554,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbsdram.h linux-2.6.16-owrt/ar +#define MEM8MX16X2 0xc29 /* 32 MB */ + +#endif /* _SBSDRAM_H */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbutils.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sbutils.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sbutils.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbutils.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sbutils.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sbutils.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,136 @@ +/* + * Misc utility routines for accessing chip-specific features @@ -10694,9 +10694,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sbutils.h linux-2.6.16-owrt/ar +#define SB_DEVPATH_BUFSZ 16 /* min buffer size in bytes */ + +#endif /* _sbutils_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sflash.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/sflash.h ---- linux-2.6.16/arch/mips/bcm947xx/include/sflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/sflash.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/sflash.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/sflash.h +--- linux-2.6.17/arch/mips/bcm947xx/include/sflash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/sflash.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,36 @@ +/* + * Broadcom SiliconBackplane chipcommon serial flash interface @@ -10734,9 +10734,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/sflash.h linux-2.6.16-owrt/arc +extern struct sflash * sflash_init(chipcregs_t *cc); + +#endif /* _sflash_h_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/trxhdr.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/trxhdr.h ---- linux-2.6.16/arch/mips/bcm947xx/include/trxhdr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/trxhdr.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/trxhdr.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/trxhdr.h +--- linux-2.6.17/arch/mips/bcm947xx/include/trxhdr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/trxhdr.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,33 @@ +/* + * TRX image file header format. @@ -10771,9 +10771,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/trxhdr.h linux-2.6.16-owrt/arc + +/* Compatibility */ +typedef struct trx_header TRXHDR, *PTRXHDR; -diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h linux-2.6.16-owrt/arch/mips/bcm947xx/include/typedefs.h ---- linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/include/typedefs.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/include/typedefs.h linux-2.6.17-owrt/arch/mips/bcm947xx/include/typedefs.h +--- linux-2.6.17/arch/mips/bcm947xx/include/typedefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/include/typedefs.h 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,326 @@ +/* + * Copyright 2005, Broadcom Corporation @@ -11101,62 +11101,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/include/typedefs.h linux-2.6.16-owrt/a +#endif /* USE_TYPEDEF_DEFAULTS */ + +#endif /* _TYPEDEFS_H_ */ -diff -Nur linux-2.6.16/arch/mips/bcm947xx/int-handler.S linux-2.6.16-owrt/arch/mips/bcm947xx/int-handler.S ---- linux-2.6.16/arch/mips/bcm947xx/int-handler.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/int-handler.S 2006-03-21 09:31:00.000000000 +0100 -@@ -0,0 +1,48 @@ -+/* -+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.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 the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ * -+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * 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., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ -+ -+#include <asm/asm.h> -+#include <asm/mipsregs.h> -+#include <asm/regdef.h> -+#include <asm/stackframe.h> -+ -+ .text -+ .set noreorder -+ .set noat -+ .align 5 -+ -+ NESTED(bcm47xx_irq_handler, PT_SIZE, sp) -+ SAVE_ALL -+ CLI -+ -+ .set at -+ .set noreorder -+ -+ jal bcm47xx_irq_dispatch -+ move a0, sp -+ -+ j ret_from_irq -+ nop -+ -+ END(bcm47xx_irq_handler) -diff -Nur linux-2.6.16/arch/mips/bcm947xx/irq.c linux-2.6.16-owrt/arch/mips/bcm947xx/irq.c ---- linux-2.6.16/arch/mips/bcm947xx/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/irq.c 2006-03-21 09:31:00.000000000 +0100 -@@ -0,0 +1,67 @@ +diff -Nur linux-2.6.17/arch/mips/bcm947xx/irq.c linux-2.6.17-owrt/arch/mips/bcm947xx/irq.c +--- linux-2.6.17/arch/mips/bcm947xx/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/irq.c 2006-06-18 15:32:25.000000000 +0200 +@@ -0,0 +1,64 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) + * @@ -11195,9 +11143,7 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/irq.c linux-2.6.16-owrt/arch/mips/bcm9 +#include <asm/irq.h> +#include <asm/irq_cpu.h> + -+extern asmlinkage void bcm47xx_irq_handler(void); -+ -+void bcm47xx_irq_dispatch(struct pt_regs *regs) ++void plat_irq_dispatch(struct pt_regs *regs) +{ + u32 cause; + @@ -11221,22 +11167,21 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/irq.c linux-2.6.16-owrt/arch/mips/bcm9 + +void __init arch_init_irq(void) +{ -+ set_except_vector(0, bcm47xx_irq_handler); + mips_cpu_irq_init(0); +} -diff -Nur linux-2.6.16/arch/mips/bcm947xx/Makefile linux-2.6.16-owrt/arch/mips/bcm947xx/Makefile ---- linux-2.6.16/arch/mips/bcm947xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/Makefile 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/Makefile linux-2.6.17-owrt/arch/mips/bcm947xx/Makefile +--- linux-2.6.17/arch/mips/bcm947xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/Makefile 2006-06-18 15:33:03.000000000 +0200 @@ -0,0 +1,6 @@ +# +# Makefile for the BCM47xx specific kernel interface routines +# under Linux. +# + -+obj-y := irq.o int-handler.o prom.o setup.o time.o pci.o -diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm947xx/pci.c ---- linux-2.6.16/arch/mips/bcm947xx/pci.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/pci.c 2006-03-21 09:31:00.000000000 +0100 ++obj-y := irq.o prom.o setup.o time.o pci.o +diff -Nur linux-2.6.17/arch/mips/bcm947xx/pci.c linux-2.6.17-owrt/arch/mips/bcm947xx/pci.c +--- linux-2.6.17/arch/mips/bcm947xx/pci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/pci.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,215 @@ +#include <linux/kernel.h> +#include <linux/init.h> @@ -11453,9 +11398,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/pci.c linux-2.6.16-owrt/arch/mips/bcm9 +} + +DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, bcm47xx_fixup_bridge); -diff -Nur linux-2.6.16/arch/mips/bcm947xx/prom.c linux-2.6.16-owrt/arch/mips/bcm947xx/prom.c ---- linux-2.6.16/arch/mips/bcm947xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/prom.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/prom.c linux-2.6.17-owrt/arch/mips/bcm947xx/prom.c +--- linux-2.6.17/arch/mips/bcm947xx/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/prom.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) @@ -11516,9 +11461,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/prom.c linux-2.6.16-owrt/arch/mips/bcm +{ + return 0; +} -diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bcm947xx/setup.c ---- linux-2.6.16/arch/mips/bcm947xx/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/setup.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/setup.c linux-2.6.17-owrt/arch/mips/bcm947xx/setup.c +--- linux-2.6.17/arch/mips/bcm947xx/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/setup.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,158 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) @@ -11678,9 +11623,9 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/setup.c linux-2.6.16-owrt/arch/mips/bc +EXPORT_SYMBOL(sbh); +EXPORT_SYMBOL(sbh_lock); +EXPORT_SYMBOL(boardflags); -diff -Nur linux-2.6.16/arch/mips/bcm947xx/time.c linux-2.6.16-owrt/arch/mips/bcm947xx/time.c ---- linux-2.6.16/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/bcm947xx/time.c 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/bcm947xx/time.c linux-2.6.17-owrt/arch/mips/bcm947xx/time.c +--- linux-2.6.17/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/bcm947xx/time.c 2006-06-18 15:29:23.000000000 +0200 @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) @@ -11741,10 +11686,10 @@ diff -Nur linux-2.6.16/arch/mips/bcm947xx/time.c linux-2.6.16-owrt/arch/mips/bcm + /* Enable the timer interrupt */ + setup_irq(7, irq); +} -diff -Nur linux-2.6.16/arch/mips/Kconfig linux-2.6.16-owrt/arch/mips/Kconfig ---- linux-2.6.16/arch/mips/Kconfig 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/Kconfig 2006-03-21 09:31:00.000000000 +0100 -@@ -244,6 +244,17 @@ +diff -Nur linux-2.6.17/arch/mips/Kconfig linux-2.6.17-owrt/arch/mips/Kconfig +--- linux-2.6.17/arch/mips/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/Kconfig 2006-06-18 15:29:23.000000000 +0200 +@@ -245,6 +245,17 @@ Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and Olivetti M700-10 workstations. @@ -11760,12 +11705,12 @@ diff -Nur linux-2.6.16/arch/mips/Kconfig linux-2.6.16-owrt/arch/mips/Kconfig + Support for BCM947xx based boards + config LASAT - bool "Support for LASAT Networks platforms" + bool "LASAT Networks platforms" select DMA_NONCOHERENT -diff -Nur linux-2.6.16/arch/mips/kernel/cpu-probe.c linux-2.6.16-owrt/arch/mips/kernel/cpu-probe.c ---- linux-2.6.16/arch/mips/kernel/cpu-probe.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/kernel/cpu-probe.c 2006-03-21 09:32:48.000000000 +0100 -@@ -678,6 +678,28 @@ +diff -Nur linux-2.6.17/arch/mips/kernel/cpu-probe.c linux-2.6.17-owrt/arch/mips/kernel/cpu-probe.c +--- linux-2.6.17/arch/mips/kernel/cpu-probe.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/kernel/cpu-probe.c 2006-06-18 15:29:23.000000000 +0200 +@@ -691,6 +691,28 @@ } @@ -11794,7 +11739,7 @@ diff -Nur linux-2.6.16/arch/mips/kernel/cpu-probe.c linux-2.6.16-owrt/arch/mips/ __init void cpu_probe(void) { struct cpuinfo_mips *c = ¤t_cpu_data; -@@ -700,6 +722,9 @@ +@@ -713,6 +735,9 @@ case PRID_COMP_SIBYTE: cpu_probe_sibyte(c); break; @@ -11804,12 +11749,12 @@ diff -Nur linux-2.6.16/arch/mips/kernel/cpu-probe.c linux-2.6.16-owrt/arch/mips/ case PRID_COMP_SANDCRAFT: cpu_probe_sandcraft(c); break; -diff -Nur linux-2.6.16/arch/mips/kernel/head.S linux-2.6.16-owrt/arch/mips/kernel/head.S ---- linux-2.6.16/arch/mips/kernel/head.S 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/kernel/head.S 2006-03-21 09:31:00.000000000 +0100 -@@ -107,6 +107,11 @@ - #endif - .endm +diff -Nur linux-2.6.17/arch/mips/kernel/head.S linux-2.6.17-owrt/arch/mips/kernel/head.S +--- linux-2.6.17/arch/mips/kernel/head.S 2006-06-18 12:54:51.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/kernel/head.S 2006-06-18 15:29:23.000000000 +0200 +@@ -133,6 +133,11 @@ + j kernel_entry + nop +#ifdef CONFIG_BCM4710 +#undef eret @@ -11819,10 +11764,10 @@ diff -Nur linux-2.6.16/arch/mips/kernel/head.S linux-2.6.16-owrt/arch/mips/kerne /* * Reserved space for exception handlers. * Necessary for machines which link their kernels at KSEG0. -diff -Nur linux-2.6.16/arch/mips/kernel/proc.c linux-2.6.16-owrt/arch/mips/kernel/proc.c ---- linux-2.6.16/arch/mips/kernel/proc.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/kernel/proc.c 2006-03-21 09:31:00.000000000 +0100 -@@ -82,6 +82,8 @@ +diff -Nur linux-2.6.17/arch/mips/kernel/proc.c linux-2.6.17-owrt/arch/mips/kernel/proc.c +--- linux-2.6.17/arch/mips/kernel/proc.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/kernel/proc.c 2006-06-18 15:29:23.000000000 +0200 +@@ -84,6 +84,8 @@ [CPU_VR4181] = "NEC VR4181", [CPU_VR4181A] = "NEC VR4181A", [CPU_SR71000] = "Sandcraft SR71000", @@ -11831,10 +11776,10 @@ diff -Nur linux-2.6.16/arch/mips/kernel/proc.c linux-2.6.16-owrt/arch/mips/kerne [CPU_PR4450] = "Philips PR4450", }; -diff -Nur linux-2.6.16/arch/mips/Makefile linux-2.6.16-owrt/arch/mips/Makefile ---- linux-2.6.16/arch/mips/Makefile 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/Makefile 2006-03-21 09:31:00.000000000 +0100 -@@ -710,6 +710,13 @@ +diff -Nur linux-2.6.17/arch/mips/Makefile linux-2.6.17-owrt/arch/mips/Makefile +--- linux-2.6.17/arch/mips/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/Makefile 2006-06-18 15:29:23.000000000 +0200 +@@ -565,6 +565,13 @@ load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 # @@ -11848,10 +11793,10 @@ diff -Nur linux-2.6.16/arch/mips/Makefile linux-2.6.16-owrt/arch/mips/Makefile # SNI RM200 PCI # core-$(CONFIG_SNI_RM200_PCI) += arch/mips/sni/ -diff -Nur linux-2.6.16/arch/mips/mm/tlbex.c linux-2.6.16-owrt/arch/mips/mm/tlbex.c ---- linux-2.6.16/arch/mips/mm/tlbex.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/arch/mips/mm/tlbex.c 2006-03-21 09:31:00.000000000 +0100 -@@ -858,6 +858,8 @@ +diff -Nur linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-owrt/arch/mips/mm/tlbex.c +--- linux-2.6.17/arch/mips/mm/tlbex.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/mm/tlbex.c 2006-06-18 15:29:23.000000000 +0200 +@@ -882,6 +882,8 @@ case CPU_4KSC: case CPU_20KC: case CPU_25KF: @@ -11860,9 +11805,9 @@ diff -Nur linux-2.6.16/arch/mips/mm/tlbex.c linux-2.6.16-owrt/arch/mips/mm/tlbex tlbw(p); break; -diff -Nur linux-2.6.16/include/asm-mips/bootinfo.h linux-2.6.16-owrt/include/asm-mips/bootinfo.h ---- linux-2.6.16/include/asm-mips/bootinfo.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/bootinfo.h 2006-03-21 09:31:00.000000000 +0100 +diff -Nur linux-2.6.17/include/asm-mips/bootinfo.h linux-2.6.17-owrt/include/asm-mips/bootinfo.h +--- linux-2.6.17/include/asm-mips/bootinfo.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/bootinfo.h 2006-06-18 15:29:23.000000000 +0200 @@ -218,6 +218,12 @@ #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ @@ -11876,10 +11821,10 @@ diff -Nur linux-2.6.16/include/asm-mips/bootinfo.h linux-2.6.16-owrt/include/asm #define CL_SIZE COMMAND_LINE_SIZE const char *get_system_type(void); -diff -Nur linux-2.6.16/include/asm-mips/cpu.h linux-2.6.16-owrt/include/asm-mips/cpu.h ---- linux-2.6.16/include/asm-mips/cpu.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/asm-mips/cpu.h 2006-03-21 09:31:00.000000000 +0100 -@@ -102,6 +102,13 @@ +diff -Nur linux-2.6.17/include/asm-mips/cpu.h linux-2.6.17-owrt/include/asm-mips/cpu.h +--- linux-2.6.17/include/asm-mips/cpu.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/cpu.h 2006-06-18 15:30:53.000000000 +0200 +@@ -104,6 +104,13 @@ #define PRID_IMP_SR71000 0x0400 /* @@ -11893,21 +11838,21 @@ diff -Nur linux-2.6.16/include/asm-mips/cpu.h linux-2.6.16-owrt/include/asm-mips * Definitions for 7:0 on legacy processors */ -@@ -196,7 +203,9 @@ - #define CPU_34K 60 - #define CPU_PR4450 61 +@@ -200,7 +207,9 @@ #define CPU_SB1A 62 --#define CPU_LAST 62 -+#define CPU_BCM3302 63 -+#define CPU_BCM4710 64 -+#define CPU_LAST 64 + #define CPU_74K 63 + #define CPU_R14000 64 +-#define CPU_LAST 64 ++#define CPU_BCM3302 65 ++#define CPU_BCM4710 66 ++#define CPU_LAST 66 /* * ISA Level encodings -diff -Nur linux-2.6.16/include/linux/pci_ids.h linux-2.6.16-owrt/include/linux/pci_ids.h ---- linux-2.6.16/include/linux/pci_ids.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/pci_ids.h 2006-03-21 09:31:00.000000000 +0100 -@@ -1885,6 +1885,7 @@ +diff -Nur linux-2.6.17/include/linux/pci_ids.h linux-2.6.17-owrt/include/linux/pci_ids.h +--- linux-2.6.17/include/linux/pci_ids.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/linux/pci_ids.h 2006-06-18 15:29:23.000000000 +0200 +@@ -1906,6 +1906,7 @@ #define PCI_DEVICE_ID_TIGON3_5901_2 0x170e #define PCI_DEVICE_ID_BCM4401 0x4401 #define PCI_DEVICE_ID_BCM4401B0 0x4402 diff --git a/openwrt/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch b/openwrt/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch index eaa5231267c..c8a08eb926d 100644 --- a/openwrt/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch +++ b/openwrt/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch @@ -1,7 +1,7 @@ -diff -urN linux.old/arch/mips/kernel/genex.S linux.dev/arch/mips/kernel/genex.S ---- linux.old/arch/mips/kernel/genex.S 2006-03-20 06:53:29.000000000 +0100 -+++ linux.dev/arch/mips/kernel/genex.S 2006-03-21 12:19:26.000000000 +0100 -@@ -72,6 +72,10 @@ +diff -Nur linux-2.6.17/arch/mips/kernel/genex.S linux-2.6.17-owrt/arch/mips/kernel/genex.S +--- linux-2.6.17/arch/mips/kernel/genex.S 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/kernel/genex.S 2006-06-18 15:36:58.000000000 +0200 +@@ -73,6 +73,10 @@ .set push .set mips3 .set noat @@ -12,9 +12,9 @@ diff -urN linux.old/arch/mips/kernel/genex.S linux.dev/arch/mips/kernel/genex.S mfc0 k1, CP0_CAUSE li k0, 31<<2 andi k1, k1, 0x7c -diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c ---- linux.old/arch/mips/mm/c-r4k.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux.dev/arch/mips/mm/c-r4k.c 2006-03-21 12:19:26.000000000 +0100 +diff -Nur linux-2.6.17/arch/mips/mm/c-r4k.c linux-2.6.17-owrt/arch/mips/mm/c-r4k.c +--- linux-2.6.17/arch/mips/mm/c-r4k.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/mm/c-r4k.c 2006-06-18 15:36:58.000000000 +0200 @@ -14,6 +14,12 @@ #include <linux/mm.h> #include <linux/bitops.h> @@ -28,17 +28,17 @@ diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c #include <asm/bcache.h> #include <asm/bootinfo.h> #include <asm/cache.h> -@@ -29,6 +35,9 @@ - #include <asm/war.h> +@@ -30,6 +36,9 @@ #include <asm/cacheflush.h> /* for run_uncached() */ + +/* For enabling BCM4710 cache workarounds */ +int bcm4710 = 0; + /* - * Must die. - */ -@@ -73,7 +82,9 @@ + * Special Variant of smp_call_function for use by cache functions: + * +@@ -94,7 +103,9 @@ { unsigned long dc_lsize = cpu_dcache_line_size(); @@ -49,7 +49,7 @@ diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c r4k_blast_dcache_page = blast_dcache16_page; else if (dc_lsize == 32) r4k_blast_dcache_page = r4k_blast_dcache_page_dc32; -@@ -85,7 +96,9 @@ +@@ -106,7 +117,9 @@ { unsigned long dc_lsize = cpu_dcache_line_size(); @@ -60,7 +60,7 @@ diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed; else if (dc_lsize == 32) r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed; -@@ -97,7 +110,9 @@ +@@ -118,7 +131,9 @@ { unsigned long dc_lsize = cpu_dcache_line_size(); @@ -71,7 +71,7 @@ diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c r4k_blast_dcache = blast_dcache16; else if (dc_lsize == 32) r4k_blast_dcache = blast_dcache32; -@@ -660,6 +675,8 @@ +@@ -683,6 +698,8 @@ unsigned long addr = (unsigned long) arg; R4600_HIT_CACHEOP_WAR_IMPL; @@ -80,7 +80,7 @@ diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c protected_writeback_dcache_line(addr & ~(dc_lsize - 1)); if (!cpu_icache_snoops_remote_store && scache_size) protected_writeback_scache_line(addr & ~(sc_lsize - 1)); -@@ -1136,6 +1153,16 @@ +@@ -1189,6 +1206,16 @@ static inline void coherency_setup(void) { change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT); @@ -97,7 +97,7 @@ diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c /* * c0_status.cu=0 specifies that updates by the sc instruction use -@@ -1165,6 +1192,15 @@ +@@ -1227,6 +1254,15 @@ /* Default cache error handler for R4000 and R5000 family */ set_uncached_handler (0x100, &except_vec2_generic, 0x80); @@ -113,10 +113,10 @@ diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c probe_pcache(); setup_scache(); -diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c ---- linux.old/arch/mips/mm/tlbex.c 2006-03-21 12:12:38.000000000 +0100 -+++ linux.dev/arch/mips/mm/tlbex.c 2006-03-21 12:19:26.000000000 +0100 -@@ -28,6 +28,10 @@ +diff -Nur linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-owrt/arch/mips/mm/tlbex.c +--- linux-2.6.17/arch/mips/mm/tlbex.c 2006-06-18 15:34:19.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/mm/tlbex.c 2006-06-18 15:36:58.000000000 +0200 +@@ -38,6 +38,10 @@ /* #define DEBUG_TLB */ @@ -127,7 +127,7 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c static __init int __attribute__((unused)) r45k_bvahwbug(void) { /* XXX: We should probe for the presence of this bug, but we don't. */ -@@ -1152,6 +1156,12 @@ +@@ -1184,6 +1188,12 @@ memset(relocs, 0, sizeof(relocs)); memset(final_handler, 0, sizeof(final_handler)); @@ -140,12 +140,12 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c /* * create the plain linear handler */ -diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcache.h ---- linux.old/include/asm-mips/r4kcache.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux.dev/include/asm-mips/r4kcache.h 2006-03-21 18:40:32.000000000 +0100 -@@ -16,6 +16,18 @@ - #include <asm/cacheops.h> +diff -Nur linux-2.6.17/include/asm-mips/r4kcache.h linux-2.6.17-owrt/include/asm-mips/r4kcache.h +--- linux-2.6.17/include/asm-mips/r4kcache.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/r4kcache.h 2006-06-18 15:56:57.000000000 +0200 +@@ -17,6 +17,18 @@ #include <asm/cpu-features.h> + #include <asm/mipsmtregs.h> +#ifdef CONFIG_BCM4710 +#define BCM4710_DUMMY_RREG() (((sbconfig_t *)(KSEG1ADDR(SB_ENUM_BASE + SBCONFIGOFF)))->sbimstate) @@ -162,29 +162,31 @@ diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kca /* * This macro return a properly sign-extended address suitable as base address * for indexed cache operations. Two issues here: -@@ -46,6 +58,7 @@ - +@@ -150,6 +162,7 @@ static inline void flush_dcache_line_indexed(unsigned long addr) { + __dflush_prologue + BCM4710_DUMMY_RREG(); cache_op(Index_Writeback_Inv_D, addr); + __dflush_epilogue } - -@@ -61,11 +74,13 @@ - +@@ -169,6 +182,7 @@ static inline void flush_dcache_line(unsigned long addr) { + __dflush_prologue + BCM4710_DUMMY_RREG(); cache_op(Hit_Writeback_Inv_D, addr); + __dflush_epilogue } - +@@ -176,6 +190,7 @@ static inline void invalidate_dcache_line(unsigned long addr) { + __dflush_prologue + BCM4710_DUMMY_RREG(); cache_op(Hit_Invalidate_D, addr); + __dflush_epilogue } - -@@ -97,6 +112,7 @@ +@@ -208,6 +223,7 @@ */ static inline void protected_flush_icache_line(unsigned long addr) { @@ -192,7 +194,7 @@ diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kca protected_cache_op(Hit_Invalidate_I, addr); } -@@ -108,6 +124,7 @@ +@@ -219,6 +235,7 @@ */ static inline void protected_writeback_dcache_line(unsigned long addr) { @@ -200,7 +202,7 @@ diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kca protected_cache_op(Hit_Writeback_Inv_D, addr); } -@@ -228,8 +245,52 @@ +@@ -339,8 +356,52 @@ : "r" (base), \ "i" (op)); @@ -254,30 +256,33 @@ diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kca static inline void blast_##pfx##cache##lsize(void) \ { \ unsigned long start = INDEX_BASE; \ -@@ -239,6 +300,7 @@ - current_cpu_data.desc.waybit; \ - unsigned long ws, addr; \ +@@ -352,6 +413,7 @@ + \ + __##pfx##flush_prologue \ \ + war \ for (ws = 0; ws < ws_end; ws += ws_inc) \ for (addr = start; addr < end; addr += lsize * 32) \ cache##lsize##_unroll32(addr|ws,indexop); \ -@@ -249,6 +311,7 @@ - unsigned long start = page; \ - unsigned long end = page + PAGE_SIZE; \ +@@ -366,6 +428,7 @@ + \ + __##pfx##flush_prologue \ \ + war \ do { \ cache##lsize##_unroll32(start,hitop); \ start += lsize * 32; \ -@@ -265,29 +328,31 @@ +@@ -384,6 +447,8 @@ current_cpu_data.desc.waybit; \ unsigned long ws, addr; \ \ + war \ ++ \ + __##pfx##flush_prologue \ + \ for (ws = 0; ws < ws_end; ws += ws_inc) \ - for (addr = start; addr < end; addr += lsize * 32) \ - cache##lsize##_unroll32(addr|ws,indexop); \ +@@ -393,24 +458,25 @@ + __##pfx##flush_epilogue \ } -__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16) @@ -309,11 +314,11 @@ diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kca unsigned long addr = start & ~(lsize - 1); \ unsigned long aend = (end - 1) & ~(lsize - 1); \ + war \ - while (1) { \ - prot##cache_op(hitop, addr); \ - if (addr == aend) \ -@@ -296,12 +361,12 @@ - } \ + \ + __##pfx##flush_prologue \ + \ +@@ -424,13 +490,13 @@ + __##pfx##flush_epilogue \ } -__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_) @@ -328,13 +333,15 @@ diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kca +__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, , ) /* blast_inv_dcache_range */ -__BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, ) +-__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD, ) +__BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, , ) ++__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD, , ) #endif /* _ASM_R4KCACHE_H */ -diff -urN linux.old/include/asm-mips/stackframe.h linux.dev/include/asm-mips/stackframe.h ---- linux.old/include/asm-mips/stackframe.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux.dev/include/asm-mips/stackframe.h 2006-03-21 12:19:26.000000000 +0100 -@@ -285,6 +285,10 @@ +diff -Nur linux-2.6.17/include/asm-mips/stackframe.h linux-2.6.17-owrt/include/asm-mips/stackframe.h +--- linux-2.6.17/include/asm-mips/stackframe.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/stackframe.h 2006-06-18 15:36:58.000000000 +0200 +@@ -361,6 +361,10 @@ .macro RESTORE_SP_AND_RET LONG_L sp, PT_R29(sp) .set mips3 diff --git a/openwrt/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch b/openwrt/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch index b24480763f0..15e4297a816 100644 --- a/openwrt/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch +++ b/openwrt/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch @@ -1,6 +1,6 @@ -diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c ---- linux.old/drivers/net/b44.c 2006-01-16 20:35:09.203794500 +0100 -+++ linux.dev/drivers/net/b44.c 2006-01-16 22:20:45.631180500 +0100 +diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c +--- linux-2.6.17/drivers/net/b44.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/net/b44.c 2006-06-18 16:24:14.000000000 +0200 @@ -1,7 +1,9 @@ -/* b44.c: Broadcom 4400 device driver. +/* b44.c: Broadcom 4400/47xx device driver. @@ -10,12 +10,12 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c + * Copyright (C) 2004 Pekka Pietikainen (pp@ee.oulu.fi) + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) + * Copyright (C) 2006 Felix Fietkau (nbd@openwrt.org) + * Copyright (C) 2006 Broadcom Corporation. * * Distribute under GPL. - */ -@@ -31,6 +33,28 @@ - #define DRV_MODULE_VERSION "0.97" - #define DRV_MODULE_RELDATE "Nov 30, 2005" +@@ -32,6 +34,28 @@ + #define DRV_MODULE_VERSION "1.00" + #define DRV_MODULE_RELDATE "Apr 7, 2006" +#ifdef CONFIG_BCM947XX +extern char *nvram_get(char *name); @@ -42,7 +42,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c #define B44_DEF_MSG_ENABLE \ (NETIF_MSG_DRV | \ NETIF_MSG_PROBE | \ -@@ -77,8 +101,8 @@ +@@ -78,8 +102,8 @@ static char version[] __devinitdata = DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; @@ -53,7 +53,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_MODULE_VERSION); -@@ -93,6 +117,10 @@ +@@ -94,6 +118,10 @@ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401B1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, @@ -64,7 +64,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c { } /* terminate list with empty entry */ }; -@@ -131,17 +159,6 @@ +@@ -132,17 +160,6 @@ dma_desc_sync_size, dir); } @@ -73,7 +73,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c - return readl(bp->regs + reg); -} - --static inline void bw32(const struct b44 *bp, +-static inline void bw32(const struct b44 *bp, - unsigned long reg, unsigned long val) -{ - writel(val, bp->regs + reg); @@ -82,7 +82,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c static int b44_wait_bit(struct b44 *bp, unsigned long reg, u32 bit, unsigned long timeout, const int clear) { -@@ -268,6 +285,10 @@ +@@ -269,6 +286,10 @@ break; }; #endif @@ -93,7 +93,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c return 0; } -@@ -277,6 +298,30 @@ +@@ -278,6 +299,30 @@ == SBTMSLOW_CLOCK); } @@ -124,7 +124,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c static void __b44_cam_write(struct b44 *bp, unsigned char *data, int index) { u32 val; -@@ -313,14 +358,14 @@ +@@ -314,14 +359,14 @@ bw32(bp, B44_IMASK, bp->imask); } @@ -141,7 +141,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c (reg << MDIO_DATA_RA_SHIFT) | (MDIO_TA_VALID << MDIO_DATA_TA_SHIFT))); err = b44_wait_bit(bp, B44_EMAC_ISTAT, EMAC_INT_MII, 100, 0); -@@ -329,18 +374,34 @@ +@@ -330,18 +375,34 @@ return err; } @@ -178,7 +178,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c /* miilib interface */ /* FIXME FIXME: phy_id is ignored, bp->phy_addr use is unconditional * due to code existing before miilib use was added to this driver. -@@ -369,6 +430,8 @@ +@@ -370,6 +431,8 @@ u32 val; int err; @@ -187,7 +187,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c err = b44_writephy(bp, MII_BMCR, BMCR_RESET); if (err) return err; -@@ -439,6 +502,22 @@ +@@ -433,6 +496,22 @@ u32 val; int err; @@ -210,7 +210,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c if ((err = b44_readphy(bp, B44_MII_ALEDCTRL, &val)) != 0) goto out; if ((err = b44_writephy(bp, B44_MII_ALEDCTRL, -@@ -534,6 +613,19 @@ +@@ -528,6 +607,19 @@ { u32 bmsr, aux; @@ -230,7 +230,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c if (!b44_readphy(bp, MII_BMSR, &bmsr) && !b44_readphy(bp, B44_MII_AUXCTRL, &aux) && (bmsr != 0xffff)) { -@@ -1281,9 +1373,10 @@ +@@ -1282,9 +1374,10 @@ bw32(bp, B44_DMARX_CTRL, 0); bp->rx_prod = bp->rx_cons = 0; } else { @@ -244,7 +244,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c } ssb_core_reset(bp); -@@ -1291,8 +1384,14 @@ +@@ -1292,8 +1385,14 @@ b44_clear_stats(bp); /* Make PHY accessible. */ @@ -260,7 +260,7 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c br32(bp, B44_MDIO_CTRL); if (!(br32(bp, B44_DEVCTRL) & DEVCTRL_IPP)) { -@@ -1834,18 +1933,297 @@ +@@ -1837,18 +1936,297 @@ .get_perm_addr = ethtool_op_get_perm_addr, }; @@ -562,32 +562,18 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c out: return err; } -@@ -1865,22 +2243,55 @@ +@@ -1868,27 +2246,60 @@ static int __devinit b44_get_invariants(struct b44 *bp) { u8 eeprom[128]; - int err; -- -- err = b44_read_eeprom(bp, &eeprom[0]); -- if (err) -- goto out; -- -- bp->dev->dev_addr[0] = eeprom[79]; -- bp->dev->dev_addr[1] = eeprom[78]; -- bp->dev->dev_addr[2] = eeprom[81]; -- bp->dev->dev_addr[3] = eeprom[80]; -- bp->dev->dev_addr[4] = eeprom[83]; -- bp->dev->dev_addr[5] = eeprom[82]; -- memcpy(bp->dev->perm_addr, bp->dev->dev_addr, bp->dev->addr_len); -- -- bp->phy_addr = eeprom[90] & 0x1f; + u8 buf[32]; + int err = 0; + unsigned long flags; + +#ifdef CONFIG_BCM947XX + if (bp->pdev->device == PCI_DEVICE_ID_BCM4713) { -+ /* ++ /* + * BCM47xx boards don't have a EEPROM. The MAC is stored in + * a NVRAM area somewhere in the flash memory. + */ @@ -605,7 +591,10 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c + spin_unlock_irqrestore(&bp->lock, flags); + } -+ /* +- err = b44_read_eeprom(bp, &eeprom[0]); +- if (err) +- goto out; ++ /* + * BCM47xx boards don't have a PHY. Usually there is a switch + * chip with multiple PHYs connected to the PHY port. + */ @@ -617,37 +606,50 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c + err = b44_read_eeprom(bp, &eeprom[0]); + if (err) + goto out; -+ + +- bp->dev->dev_addr[0] = eeprom[79]; +- bp->dev->dev_addr[1] = eeprom[78]; +- bp->dev->dev_addr[2] = eeprom[81]; +- bp->dev->dev_addr[3] = eeprom[80]; +- bp->dev->dev_addr[4] = eeprom[83]; +- bp->dev->dev_addr[5] = eeprom[82]; + bp->dev->dev_addr[0] = eeprom[79]; + bp->dev->dev_addr[1] = eeprom[78]; + bp->dev->dev_addr[2] = eeprom[81]; + bp->dev->dev_addr[3] = eeprom[80]; + bp->dev->dev_addr[4] = eeprom[83]; + bp->dev->dev_addr[5] = eeprom[82]; + +- if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){ +- printk(KERN_ERR PFX "Invalid MAC address found in EEPROM\n"); +- return -EINVAL; +- } ++ if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){ ++ printk(KERN_ERR PFX "Invalid MAC address found in EEPROM\n"); ++ return -EINVAL; ++ } + +- memcpy(bp->dev->perm_addr, bp->dev->dev_addr, bp->dev->addr_len); + memcpy(bp->dev->perm_addr, bp->dev->dev_addr, bp->dev->addr_len); -+ + +- bp->phy_addr = eeprom[90] & 0x1f; + bp->phy_addr = eeprom[90] & 0x1f; + bp->dma_offset = SB_PCI_DMA; + } -+ + /* With this, plus the rx_header prepended to the data by the * hardware, we'll land the ethernet header on a 2-byte boundary. - */ -@@ -1889,11 +2300,7 @@ +@@ -1898,7 +2309,6 @@ bp->imask = IMASK_DEF; bp->core_unit = ssb_core_unit(bp); - bp->dma_offset = SB_PCI_DMA; -- /* XXX - really required? -- bp->flags |= B44_FLAG_BUGGY_TXPTR; -- */ - out: - return err; - } -@@ -2032,11 +2439,17 @@ - - pci_save_state(bp->pdev); + /* XXX - really required? + bp->flags |= B44_FLAG_BUGGY_TXPTR; +@@ -2048,11 +2458,17 @@ + */ + b44_chip_reset(bp); - printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name); + printk(KERN_INFO "%s: Broadcom %s 10/100BaseT Ethernet ", dev->name, @@ -664,9 +666,9 @@ diff -urN linux.old/drivers/net/b44.c linux.dev/drivers/net/b44.c return 0; err_out_iounmap: -diff -urN linux.old/drivers/net/b44.h linux.dev/drivers/net/b44.h ---- linux.old/drivers/net/b44.h 2006-01-16 20:35:09.255797750 +0100 -+++ linux.dev/drivers/net/b44.h 2006-01-16 20:30:30.566380750 +0100 +diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h +--- linux-2.6.17/drivers/net/b44.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/net/b44.h 2006-06-18 16:01:10.000000000 +0200 @@ -292,6 +292,10 @@ #define SSB_PCI_MASK1 0xfc000000 #define SSB_PCI_MASK2 0xc0000000 diff --git a/openwrt/target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch b/openwrt/target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch index ed8009cc6ed..ec3929bf13d 100644 --- a/openwrt/target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch +++ b/openwrt/target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch @@ -1,7 +1,7 @@ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_conntrack.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_conntrack.h 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_conntrack.h 2006-03-20 13:48:06.000000000 +0100 -@@ -122,6 +122,15 @@ +diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.17-owrt/include/linux/netfilter_ipv4/ip_conntrack.h +--- linux-2.6.17/include/linux/netfilter_ipv4/ip_conntrack.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/linux/netfilter_ipv4/ip_conntrack.h 2006-06-18 12:29:04.000000000 +0200 +@@ -124,6 +124,15 @@ /* Traversed often, so hopefully in different cacheline to top */ /* These are my tuples; original and reply */ struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; @@ -17,9 +17,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.16- }; struct ip_conntrack_expect -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ipt_layer7.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ipt_layer7.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ipt_layer7.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ipt_layer7.h 2006-03-20 13:48:06.000000000 +0100 +diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ipt_layer7.h linux-2.6.17-owrt/include/linux/netfilter_ipv4/ipt_layer7.h +--- linux-2.6.17/include/linux/netfilter_ipv4/ipt_layer7.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/linux/netfilter_ipv4/ipt_layer7.h 2006-06-18 12:29:04.000000000 +0200 @@ -0,0 +1,27 @@ +/* + By Matthew Strait <quadong@users.sf.net>, Dec 2003. @@ -48,9 +48,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ipt_layer7.h linux-2.6.16-ow +}; + +#endif /* _IPT_LAYER7_H */ -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_conntrack_core.c ---- linux-2.6.16/net/ipv4/netfilter/ip_conntrack_core.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_conntrack_core.c 2006-03-20 13:48:06.000000000 +0100 +diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.17-owrt/net/ipv4/netfilter/ip_conntrack_core.c +--- linux-2.6.17/net/ipv4/netfilter/ip_conntrack_core.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/ip_conntrack_core.c 2006-06-18 12:29:04.000000000 +0200 @@ -339,6 +339,13 @@ * too. */ ip_ct_remove_expectations(ct); @@ -65,9 +65,9 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.16-owrt/ /* We overload first tuple to link into unconfirmed list. */ if (!is_confirmed(ct)) { BUG_ON(list_empty(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list)); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_conntrack_standalone.c ---- linux-2.6.16/net/ipv4/netfilter/ip_conntrack_standalone.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_conntrack_standalone.c 2006-03-20 13:48:06.000000000 +0100 +diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.17-owrt/net/ipv4/netfilter/ip_conntrack_standalone.c +--- linux-2.6.17/net/ipv4/netfilter/ip_conntrack_standalone.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/ip_conntrack_standalone.c 2006-06-18 12:29:04.000000000 +0200 @@ -189,6 +189,12 @@ return -ENOSPC; #endif @@ -81,9 +81,9 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.16 if (seq_printf(s, "use=%u\n", atomic_read(&conntrack->ct_general.use))) return -ENOSPC; -diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_layer7.c linux-2.6.16-owrt/net/ipv4/netfilter/ipt_layer7.c ---- linux-2.6.16/net/ipv4/netfilter/ipt_layer7.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ipt_layer7.c 2006-03-20 13:48:06.000000000 +0100 +diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv4/netfilter/ipt_layer7.c +--- linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/ipt_layer7.c 2006-06-18 12:29:04.000000000 +0200 @@ -0,0 +1,592 @@ +/* + Kernel module to match application layer (OSI layer 7) @@ -677,12 +677,12 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_layer7.c linux-2.6.16-owrt/net/ipv + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/Kconfig linux-2.6.16-owrt/net/ipv4/netfilter/Kconfig ---- linux-2.6.16/net/ipv4/netfilter/Kconfig 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/Kconfig 2006-03-20 13:48:39.000000000 +0100 -@@ -201,6 +201,24 @@ - - To compile it as a module, choose M here. If unsure, say N. +diff -Nur linux-2.6.17/net/ipv4/netfilter/Kconfig linux-2.6.17-owrt/net/ipv4/netfilter/Kconfig +--- linux-2.6.17/net/ipv4/netfilter/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/Kconfig 2006-06-18 12:32:58.000000000 +0200 +@@ -314,6 +314,24 @@ + destination IP' or `500pps from any given source IP' with a single + IPtables rule. +config IP_NF_MATCH_LAYER7 + tristate "Layer 7 match support (EXPERIMENTAL)" @@ -702,24 +702,24 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/Kconfig linux-2.6.16-owrt/net/ipv4/net + help + Say Y to get lots of debugging output. + - config IP_NF_MATCH_MULTIPORT - tristate "Multiple port match support" - depends on IP_NF_IPTABLES -diff -Nur linux-2.6.16/net/ipv4/netfilter/Makefile linux-2.6.16-owrt/net/ipv4/netfilter/Makefile ---- linux-2.6.16/net/ipv4/netfilter/Makefile 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/Makefile 2006-03-20 13:48:06.000000000 +0100 -@@ -59,6 +59,8 @@ + # `filter', generic and specific targets + config IP_NF_FILTER + tristate "Packet filtering" +diff -Nur linux-2.6.17/net/ipv4/netfilter/Makefile linux-2.6.17-owrt/net/ipv4/netfilter/Makefile +--- linux-2.6.17/net/ipv4/netfilter/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/Makefile 2006-06-18 12:29:04.000000000 +0200 +@@ -62,6 +62,8 @@ + obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o - obj-$(CONFIG_IP_NF_MATCH_POLICY) += ipt_policy.o +obj-$(CONFIG_IP_NF_MATCH_LAYER7) += ipt_layer7.o + # targets obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o -diff -Nur linux-2.6.16/net/ipv4/netfilter/regexp/regexp.c linux-2.6.16-owrt/net/ipv4/netfilter/regexp/regexp.c ---- linux-2.6.16/net/ipv4/netfilter/regexp/regexp.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/regexp/regexp.c 2006-03-20 13:48:06.000000000 +0100 +diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regexp.c +--- linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regexp.c 2006-06-18 12:29:04.000000000 +0200 @@ -0,0 +1,1195 @@ +/* + * regcomp and regexec -- regsub and regerror are elsewhere @@ -1916,9 +1916,9 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/regexp/regexp.c linux-2.6.16-owrt/net/ +#endif + + -diff -Nur linux-2.6.16/net/ipv4/netfilter/regexp/regexp.h linux-2.6.16-owrt/net/ipv4/netfilter/regexp/regexp.h ---- linux-2.6.16/net/ipv4/netfilter/regexp/regexp.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/regexp/regexp.h 2006-03-20 13:48:06.000000000 +0100 +diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.h linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regexp.h +--- linux-2.6.17/net/ipv4/netfilter/regexp/regexp.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regexp.h 2006-06-18 12:29:04.000000000 +0200 @@ -0,0 +1,41 @@ +/* + * Definitions etc. for regexp(3) routines. @@ -1961,18 +1961,18 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/regexp/regexp.h linux-2.6.16-owrt/net/ +void regerror(char *s); + +#endif -diff -Nur linux-2.6.16/net/ipv4/netfilter/regexp/regmagic.h linux-2.6.16-owrt/net/ipv4/netfilter/regexp/regmagic.h ---- linux-2.6.16/net/ipv4/netfilter/regexp/regmagic.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/regexp/regmagic.h 2006-03-20 13:48:06.000000000 +0100 +diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regmagic.h linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regmagic.h +--- linux-2.6.17/net/ipv4/netfilter/regexp/regmagic.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regmagic.h 2006-06-18 12:29:04.000000000 +0200 @@ -0,0 +1,5 @@ +/* + * The first byte of the regexp internal "program" is actually this magic + * number; the start node begins in the second byte. + */ +#define MAGIC 0234 -diff -Nur linux-2.6.16/net/ipv4/netfilter/regexp/regsub.c linux-2.6.16-owrt/net/ipv4/netfilter/regexp/regsub.c ---- linux-2.6.16/net/ipv4/netfilter/regexp/regsub.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/regexp/regsub.c 2006-03-20 13:48:06.000000000 +0100 +diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regsub.c linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regsub.c +--- linux-2.6.17/net/ipv4/netfilter/regexp/regsub.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regsub.c 2006-06-18 12:29:04.000000000 +0200 @@ -0,0 +1,95 @@ +/* + * regsub diff --git a/openwrt/target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch b/openwrt/target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch index d6fa59379d3..9841db99edb 100644 --- a/openwrt/target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch +++ b/openwrt/target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch @@ -1,6 +1,6 @@ -diff -urN linux.old/include/linux/netfilter_ipv4/ipt_ipp2p.h linux.dev/include/linux/netfilter_ipv4/ipt_ipp2p.h ---- linux.old/include/linux/netfilter_ipv4/ipt_ipp2p.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/linux/netfilter_ipv4/ipt_ipp2p.h 2006-03-23 15:24:47.000000000 +0100 +diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ipt_ipp2p.h linux-2.6.17-owrt/include/linux/netfilter_ipv4/ipt_ipp2p.h +--- linux-2.6.17/include/linux/netfilter_ipv4/ipt_ipp2p.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/linux/netfilter_ipv4/ipt_ipp2p.h 2006-06-18 12:37:14.000000000 +0200 @@ -0,0 +1,31 @@ +#ifndef __IPT_IPP2P_H +#define __IPT_IPP2P_H @@ -33,36 +33,9 @@ diff -urN linux.old/include/linux/netfilter_ipv4/ipt_ipp2p.h linux.dev/include/l +#define IPP2P_MUTE (1 << 14) +#define IPP2P_WASTE (1 << 15) +#define IPP2P_XDCC (1 << 16) -diff -urN linux.old/net/ipv4/netfilter/Kconfig linux.dev/net/ipv4/netfilter/Kconfig ---- linux.old/net/ipv4/netfilter/Kconfig 2006-03-23 15:21:19.000000000 +0100 -+++ linux.dev/net/ipv4/netfilter/Kconfig 2006-03-23 15:26:29.000000000 +0100 -@@ -229,6 +229,12 @@ - - To compile it as a module, choose M here. If unsure, say N. - -+config IP_NF_MATCH_IPP2P -+ tristate "IPP2P" -+ depends on IP_NF_IPTABLES -+ help -+ Module for matching traffic of various Peer-to-Peer applications -+ - config IP_NF_MATCH_TOS - tristate "TOS match support" - depends on IP_NF_IPTABLES -diff -urN linux.old/net/ipv4/netfilter/Makefile linux.dev/net/ipv4/netfilter/Makefile ---- linux.old/net/ipv4/netfilter/Makefile 2006-03-23 15:21:19.000000000 +0100 -+++ linux.dev/net/ipv4/netfilter/Makefile 2006-03-23 15:27:00.000000000 +0100 -@@ -49,6 +49,7 @@ - obj-$(CONFIG_IP_NF_MATCH_HASHLIMIT) += ipt_hashlimit.o - obj-$(CONFIG_IP_NF_MATCH_SET) += ipt_set.o - obj-$(CONFIG_IP_NF_MATCH_IPRANGE) += ipt_iprange.o -+obj-$(CONFIG_IP_NF_MATCH_IPP2P) += ipt_ipp2p.o - obj-$(CONFIG_IP_NF_MATCH_MULTIPORT) += ipt_multiport.o - obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o - obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o -diff -urN linux.old/net/ipv4/netfilter/ipt_ipp2p.c linux.dev/net/ipv4/netfilter/ipt_ipp2p.c ---- linux.old/net/ipv4/netfilter/ipt_ipp2p.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/net/ipv4/netfilter/ipt_ipp2p.c 2006-03-23 15:24:47.000000000 +0100 +diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4/netfilter/ipt_ipp2p.c +--- linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/ipt_ipp2p.c 2006-06-18 12:37:14.000000000 +0200 @@ -0,0 +1,868 @@ +#if defined(MODVERSIONS) +#include <linux/modversions.h> @@ -932,3 +905,31 @@ diff -urN linux.old/net/ipv4/netfilter/ipt_ipp2p.c linux.dev/net/ipv4/netfilter/ +module_exit(fini); + + +diff -Nur linux-2.6.17/net/ipv4/netfilter/Kconfig linux-2.6.17-owrt/net/ipv4/netfilter/Kconfig +--- linux-2.6.17/net/ipv4/netfilter/Kconfig 2006-06-18 12:36:55.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/Kconfig 2006-06-18 12:37:14.000000000 +0200 +@@ -222,6 +222,12 @@ + + To compile it as a module, choose M here. If unsure, say N. + ++config IP_NF_MATCH_IPP2P ++ tristate "IPP2P" ++ depends on IP_NF_IPTABLES ++ help ++ Module for matching traffic of various Peer-to-Peer applications ++ + config IP_NF_MATCH_TOS + tristate "TOS match support" + depends on IP_NF_IPTABLES +diff -Nur linux-2.6.17/net/ipv4/netfilter/Makefile linux-2.6.17-owrt/net/ipv4/netfilter/Makefile +--- linux-2.6.17/net/ipv4/netfilter/Makefile 2006-06-18 12:36:55.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/Makefile 2006-06-18 12:38:11.000000000 +0200 +@@ -61,7 +61,7 @@ + obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o + obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o + obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o +- ++obj-$(CONFIG_IP_NF_MATCH_IPP2P) += ipt_ipp2p.o + obj-$(CONFIG_IP_NF_MATCH_LAYER7) += ipt_layer7.o + + # targets diff --git a/openwrt/target/linux/rb532-2.6/Makefile b/openwrt/target/linux/rb532-2.6/Makefile index 23ecfe32b0c..9bb7bba71c9 100644 --- a/openwrt/target/linux/rb532-2.6/Makefile +++ b/openwrt/target/linux/rb532-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.19 +LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=b1e3c65992b0049fdbee825eb2a856af +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ../rules.mk include ./config diff --git a/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch b/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch index 5886a75e31a..9c4ead2ce6c 100644 --- a/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch +++ b/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch @@ -1,7 +1,7 @@ -diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig ---- linux.old/arch/mips/Kconfig 2006-06-08 20:21:20.000000000 +0200 -+++ linux.dev/arch/mips/Kconfig 2006-06-15 16:26:53.000000000 +0200 -@@ -739,6 +739,19 @@ +diff -Nur linux-2.6.17/arch/mips/Kconfig linux-2.6.17-owrt/arch/mips/Kconfig +--- linux-2.6.17/arch/mips/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/Kconfig 2006-06-18 15:24:39.000000000 +0200 +@@ -742,6 +742,19 @@ select SYS_SUPPORTS_BIG_ENDIAN select TOSHIBA_BOARDS @@ -19,9 +19,9 @@ diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig + such as the RB532. + config TOSHIBA_RBTX4927 - bool "Support for Toshiba TBTX49[23]7 board" + bool "Toshiba TBTX49[23]7 board" select DMA_NONCOHERENT -@@ -1012,7 +1025,7 @@ +@@ -1028,7 +1041,7 @@ config MIPS_L1_CACHE_SHIFT int @@ -30,10 +30,10 @@ diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig default "7" if SGI_IP27 default "5" -diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile ---- linux.old/arch/mips/Makefile 2006-06-08 20:21:20.000000000 +0200 -+++ linux.dev/arch/mips/Makefile 2006-06-15 16:26:53.000000000 +0200 -@@ -725,6 +725,13 @@ +diff -Nur linux-2.6.17/arch/mips/Makefile linux-2.6.17-owrt/arch/mips/Makefile +--- linux-2.6.17/arch/mips/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/Makefile 2006-06-18 15:24:39.000000000 +0200 +@@ -580,6 +580,13 @@ load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000 # @@ -47,18 +47,18 @@ diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile # Toshiba RBTX4927 board or # Toshiba RBTX4937 board # -diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c ---- linux.old/arch/mips/mm/tlbex.c 2006-06-08 20:21:20.000000000 +0200 -+++ linux.dev/arch/mips/mm/tlbex.c 2006-06-15 16:26:53.000000000 +0200 -@@ -852,7 +852,6 @@ - +diff -Nur linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-owrt/arch/mips/mm/tlbex.c +--- linux-2.6.17/arch/mips/mm/tlbex.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/mm/tlbex.c 2006-06-18 15:26:55.000000000 +0200 +@@ -876,7 +876,6 @@ case CPU_R10000: case CPU_R12000: + case CPU_R14000: - case CPU_4KC: case CPU_SB1: case CPU_SB1A: case CPU_4KSC: -@@ -880,6 +879,7 @@ +@@ -904,6 +903,7 @@ tlbw(p); break; @@ -66,9 +66,9 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c case CPU_4KEC: case CPU_24K: case CPU_34K: -diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb500.c ---- linux.old/arch/mips/pci/fixup-rb500.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/pci/fixup-rb500.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/pci/fixup-rb500.c linux-2.6.17-owrt/arch/mips/pci/fixup-rb500.c +--- linux-2.6.17/arch/mips/pci/fixup-rb500.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/pci/fixup-rb500.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,49 @@ +/* + * Copyright 2001 MontaVista Software Inc. @@ -119,17 +119,17 @@ diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb + return irq + GROUP4_IRQ_BASE + 4; +} + -diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile ---- linux.old/arch/mips/pci/Makefile 2006-06-08 20:21:20.000000000 +0200 -+++ linux.dev/arch/mips/pci/Makefile 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/pci/Makefile linux-2.6.17-owrt/arch/mips/pci/Makefile +--- linux-2.6.17/arch/mips/pci/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/mips/pci/Makefile 2006-06-18 15:24:39.000000000 +0200 @@ -57,3 +57,4 @@ obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup-tx4938.o ops-tx4938.o obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o +obj-$(CONFIG_MIKROTIK_RB500) += pci-rc32434.o ops-rc32434.o fixup-rb500.o -diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32434.c ---- linux.old/arch/mips/pci/ops-rc32434.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/pci/ops-rc32434.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/pci/ops-rc32434.c linux-2.6.17-owrt/arch/mips/pci/ops-rc32434.c +--- linux-2.6.17/arch/mips/pci/ops-rc32434.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/pci/ops-rc32434.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,195 @@ +/************************************************************************** + * @@ -326,9 +326,9 @@ diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32 + .read = pci_config_read, + .write = pci_config_write, +}; -diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32434.c ---- linux.old/arch/mips/pci/pci-rc32434.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/pci/pci-rc32434.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/pci/pci-rc32434.c linux-2.6.17-owrt/arch/mips/pci/pci-rc32434.c +--- linux-2.6.17/arch/mips/pci/pci-rc32434.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/pci/pci-rc32434.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,234 @@ +/************************************************************************** + * @@ -564,9 +564,9 @@ diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32 + +arch_initcall(rc32434_pci_init); + -diff -urN linux.old/arch/mips/rb500/devices.c linux.dev/arch/mips/rb500/devices.c ---- linux.old/arch/mips/rb500/devices.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/devices.c 2006-06-15 16:27:14.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/devices.c linux-2.6.17-owrt/arch/mips/rb500/devices.c +--- linux-2.6.17/arch/mips/rb500/devices.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/devices.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,211 @@ +#include <linux/kernel.h> +#include <linux/init.h> @@ -779,9 +779,9 @@ diff -urN linux.old/arch/mips/rb500/devices.c linux.dev/arch/mips/rb500/devices. + +late_initcall(setup_mtd); +#endif -diff -urN linux.old/arch/mips/rb500/early_serial.c linux.dev/arch/mips/rb500/early_serial.c ---- linux.old/arch/mips/rb500/early_serial.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/early_serial.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/early_serial.c linux-2.6.17-owrt/arch/mips/rb500/early_serial.c +--- linux-2.6.17/arch/mips/rb500/early_serial.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/early_serial.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,199 @@ +/************************************************************************** + * @@ -982,9 +982,9 @@ diff -urN linux.old/arch/mips/rb500/early_serial.c linux.dev/arch/mips/rb500/ear + /* the modem controls don't leave the chip on this port, so leave them alone */ + *(port + (UART_MCR << s)) = 0; +} -diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c ---- linux.old/arch/mips/rb500/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/irq.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/irq.c linux-2.6.17-owrt/arch/mips/rb500/irq.c +--- linux-2.6.17/arch/mips/rb500/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/irq.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,266 @@ +/* + * BRIEF MODULE DESCRIPTION @@ -1252,18 +1252,18 @@ diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c +} + + -diff -urN linux.old/arch/mips/rb500/Makefile linux.dev/arch/mips/rb500/Makefile ---- linux.old/arch/mips/rb500/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/Makefile 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/Makefile linux-2.6.17-owrt/arch/mips/rb500/Makefile +--- linux-2.6.17/arch/mips/rb500/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/Makefile 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,5 @@ +# +# Makefile for the RB500 board specific parts of the kernel +# + +obj-y += irq.o time.o setup.o serial.o early_serial.o prom.o misc.o devices.o rbIRQ.o -diff -urN linux.old/arch/mips/rb500/misc.c linux.dev/arch/mips/rb500/misc.c ---- linux.old/arch/mips/rb500/misc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/misc.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/misc.c linux-2.6.17-owrt/arch/mips/rb500/misc.c +--- linux-2.6.17/arch/mips/rb500/misc.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/misc.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,54 @@ +#include <linux/module.h> +#include <linux/kernel.h> /* printk() */ @@ -1319,9 +1319,9 @@ diff -urN linux.old/arch/mips/rb500/misc.c linux.dev/arch/mips/rb500/misc.c +EXPORT_SYMBOL(gpio_get); +EXPORT_SYMBOL(set434Reg); +EXPORT_SYMBOL(changeLatchU5); -diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c ---- linux.old/arch/mips/rb500/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/prom.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/prom.c linux-2.6.17-owrt/arch/mips/rb500/prom.c +--- linux-2.6.17/arch/mips/rb500/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/prom.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,181 @@ +/* +* prom.c @@ -1504,9 +1504,9 @@ diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c + strcpy(arcs_cmdline,cmd_line); +} + -diff -urN linux.old/arch/mips/rb500/rbIRQ.S linux.dev/arch/mips/rb500/rbIRQ.S ---- linux.old/arch/mips/rb500/rbIRQ.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/rbIRQ.S 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/rbIRQ.S linux-2.6.17-owrt/arch/mips/rb500/rbIRQ.S +--- linux-2.6.17/arch/mips/rb500/rbIRQ.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/rbIRQ.S 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,62 @@ +/* + * Copyright 2001 MontaVista Software Inc. @@ -1570,9 +1570,9 @@ diff -urN linux.old/arch/mips/rb500/rbIRQ.S linux.dev/arch/mips/rb500/rbIRQ.S + END(rbIRQ) + + -diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c ---- linux.old/arch/mips/rb500/serial.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/serial.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/serial.c linux-2.6.17-owrt/arch/mips/rb500/serial.c +--- linux-2.6.17/arch/mips/rb500/serial.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/serial.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,79 @@ +/************************************************************************** + * @@ -1653,9 +1653,9 @@ diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c + + return(0); +} -diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c ---- linux.old/arch/mips/rb500/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/setup.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/setup.c linux-2.6.17-owrt/arch/mips/rb500/setup.c +--- linux-2.6.17/arch/mips/rb500/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/setup.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,84 @@ +/* + * setup.c - boot time setup code @@ -1741,9 +1741,9 @@ diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c +{ + return "MIPS RB500"; +} -diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c ---- linux.old/arch/mips/rb500/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/time.c 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/arch/mips/rb500/time.c linux-2.6.17-owrt/arch/mips/rb500/time.c +--- linux-2.6.17/arch/mips/rb500/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/mips/rb500/time.c 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,94 @@ +/* +**************************************************************************** @@ -1839,10 +1839,10 @@ diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c + write_c0_compare(r4k_cur); +} + -diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/devices/block2mtd.c ---- linux.old/drivers/mtd/devices/block2mtd.c 2006-05-31 02:31:44.000000000 +0200 -+++ linux.dev/drivers/mtd/devices/block2mtd.c 2006-06-15 18:46:28.000000000 +0200 -@@ -25,7 +25,6 @@ +diff -Nur linux-2.6.17/drivers/mtd/devices/block2mtd.c linux-2.6.17-owrt/drivers/mtd/devices/block2mtd.c +--- linux-2.6.17/drivers/mtd/devices/block2mtd.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/mtd/devices/block2mtd.c 2006-06-18 15:24:39.000000000 +0200 +@@ -26,7 +26,6 @@ #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) #define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) @@ -1850,7 +1850,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device /* Info for the block device */ struct block2mtd_dev { struct list_head list; -@@ -61,10 +60,8 @@ +@@ -62,10 +61,8 @@ read_lock_irq(&mapping->tree_lock); for (i = 0; i < PAGE_READAHEAD; i++) { pagei = index + i; @@ -1862,7 +1862,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device page = radix_tree_lookup(&mapping->page_tree, pagei); if (page && (!i)) break; -@@ -105,7 +102,7 @@ +@@ -106,7 +103,7 @@ while (pages) { page = page_readahead(mapping, index); @@ -1871,7 +1871,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device return -ENOMEM; if (IS_ERR(page)) return PTR_ERR(page); -@@ -284,7 +281,7 @@ +@@ -285,7 +282,7 @@ /* FIXME: ensure that mtd->size % erase_size == 0 */ @@ -1880,7 +1880,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device { struct block_device *bdev; struct block2mtd_dev *dev; -@@ -314,14 +311,15 @@ +@@ -315,14 +312,15 @@ /* Setup the MTD structure */ /* make the name contain the block device in */ @@ -1898,7 +1898,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device dev->mtd.erasesize = erase_size; dev->mtd.type = MTD_RAM; dev->mtd.flags = MTD_CAP_RAM; -@@ -340,7 +338,7 @@ +@@ -341,7 +339,7 @@ } list_add(&dev->list, &blkmtd_device_list); INFO("mtd%d: [%s] erase_size = %dKiB [%d]", dev->mtd.index, @@ -1907,7 +1907,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device dev->mtd.erasesize >> 10, dev->mtd.erasesize); return dev; -@@ -415,7 +413,7 @@ +@@ -416,7 +414,7 @@ return 0; \ } while (0) @@ -1916,7 +1916,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device { char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */ char *token[2]; -@@ -429,7 +427,7 @@ +@@ -430,7 +428,7 @@ strcpy(str, val); kill_final_newline(str); @@ -1925,7 +1925,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device token[i] = strsep(&str, ","); if (str) -@@ -452,7 +450,7 @@ +@@ -453,7 +451,7 @@ parse_err("illegal erase size"); } @@ -1934,7 +1934,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device return 0; } -@@ -460,6 +458,7 @@ +@@ -461,6 +459,7 @@ module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200); MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>]\""); @@ -1942,9 +1942,9 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device static int __init block2mtd_init(void) { -diff -urN linux.old/drivers/pci/Makefile linux.dev/drivers/pci/Makefile ---- linux.old/drivers/pci/Makefile 2006-06-08 20:21:20.000000000 +0200 -+++ linux.dev/drivers/pci/Makefile 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/drivers/pci/Makefile linux-2.6.17-owrt/drivers/pci/Makefile +--- linux-2.6.17/drivers/pci/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/pci/Makefile 2006-06-18 15:24:39.000000000 +0200 @@ -27,6 +27,7 @@ obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o obj-$(CONFIG_X86_VISWS) += setup-irq.o @@ -1953,9 +1953,9 @@ diff -urN linux.old/drivers/pci/Makefile linux.dev/drivers/pci/Makefile # # ACPI Related PCI FW Functions -diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h ---- linux.old/include/asm-mips/bootinfo.h 2006-06-08 20:21:20.000000000 +0200 -+++ linux.dev/include/asm-mips/bootinfo.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/bootinfo.h linux-2.6.17-owrt/include/asm-mips/bootinfo.h +--- linux-2.6.17/include/asm-mips/bootinfo.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/bootinfo.h 2006-06-18 15:24:39.000000000 +0200 @@ -218,6 +218,8 @@ #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ @@ -1965,22 +1965,22 @@ diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/booti #define CL_SIZE COMMAND_LINE_SIZE const char *get_system_type(void); -diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h ---- linux.old/include/asm-mips/cpu.h 2006-06-08 20:21:20.000000000 +0200 -+++ linux.dev/include/asm-mips/cpu.h 2006-06-15 16:26:53.000000000 +0200 -@@ -196,7 +196,8 @@ - #define CPU_34K 60 - #define CPU_PR4450 61 +diff -Nur linux-2.6.17/include/asm-mips/cpu.h linux-2.6.17-owrt/include/asm-mips/cpu.h +--- linux-2.6.17/include/asm-mips/cpu.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-mips/cpu.h 2006-06-18 15:25:55.000000000 +0200 +@@ -200,7 +200,8 @@ #define CPU_SB1A 62 --#define CPU_LAST 62 -+#define CPU_RC32300 63 -+#define CPU_LAST 63 + #define CPU_74K 63 + #define CPU_R14000 64 +-#define CPU_LAST 64 ++#define CPU_RC32300 65 ++#define CPU_LAST 65 /* * ISA Level encodings -diff -urN linux.old/include/asm-mips/rc32434/crom.h linux.dev/include/asm-mips/rc32434/crom.h ---- linux.old/include/asm-mips/rc32434/crom.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/crom.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/crom.h linux-2.6.17-owrt/include/asm-mips/rc32434/crom.h +--- linux-2.6.17/include/asm-mips/rc32434/crom.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/crom.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,98 @@ +#ifndef __IDT_CROM_H__ +#define __IDT_CROM_H__ @@ -2080,9 +2080,9 @@ diff -urN linux.old/include/asm-mips/rc32434/crom.h linux.dev/include/asm-mips/r +} ; + +#endif // __IDT_CROM_H__ -diff -urN linux.old/include/asm-mips/rc32434/ddr.h linux.dev/include/asm-mips/rc32434/ddr.h ---- linux.old/include/asm-mips/rc32434/ddr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/ddr.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/ddr.h linux-2.6.17-owrt/include/asm-mips/rc32434/ddr.h +--- linux-2.6.17/include/asm-mips/rc32434/ddr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/ddr.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,175 @@ +#ifndef __IDT_DDR_H__ +#define __IDT_DDR_H__ @@ -2259,9 +2259,9 @@ diff -urN linux.old/include/asm-mips/rc32434/ddr.h linux.dev/include/asm-mips/rc +} ; + +#endif // __IDT_DDR_H__ -diff -urN linux.old/include/asm-mips/rc32434/dev.h linux.dev/include/asm-mips/rc32434/dev.h ---- linux.old/include/asm-mips/rc32434/dev.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/dev.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/dev.h linux-2.6.17-owrt/include/asm-mips/rc32434/dev.h +--- linux-2.6.17/include/asm-mips/rc32434/dev.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/dev.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,134 @@ +#ifndef __IDT_DEV_H__ +#define __IDT_DEV_H__ @@ -2397,9 +2397,9 @@ diff -urN linux.old/include/asm-mips/rc32434/dev.h linux.dev/include/asm-mips/rc + +#endif //__IDT_DEV_H__ + -diff -urN linux.old/include/asm-mips/rc32434/dma.h linux.dev/include/asm-mips/rc32434/dma.h ---- linux.old/include/asm-mips/rc32434/dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/dma.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/dma.h linux-2.6.17-owrt/include/asm-mips/rc32434/dma.h +--- linux-2.6.17/include/asm-mips/rc32434/dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/dma.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,202 @@ +#ifndef __IDT_DMA_H__ +#define __IDT_DMA_H__ @@ -2603,9 +2603,9 @@ diff -urN linux.old/include/asm-mips/rc32434/dma.h linux.dev/include/asm-mips/rc + +#endif // __IDT_DMA_H__ + -diff -urN linux.old/include/asm-mips/rc32434/dma_v.h linux.dev/include/asm-mips/rc32434/dma_v.h ---- linux.old/include/asm-mips/rc32434/dma_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/dma_v.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/dma_v.h linux-2.6.17-owrt/include/asm-mips/rc32434/dma_v.h +--- linux-2.6.17/include/asm-mips/rc32434/dma_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/dma_v.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,73 @@ +#ifndef __IDT_DMA_V_H__ +#define __IDT_DMA_V_H__ @@ -2680,9 +2680,9 @@ diff -urN linux.old/include/asm-mips/rc32434/dma_v.h linux.dev/include/asm-mips/ + + + -diff -urN linux.old/include/asm-mips/rc32434/eth.h linux.dev/include/asm-mips/rc32434/eth.h ---- linux.old/include/asm-mips/rc32434/eth.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/eth.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/eth.h linux-2.6.17-owrt/include/asm-mips/rc32434/eth.h +--- linux-2.6.17/include/asm-mips/rc32434/eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/eth.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,322 @@ +#ifndef __IDT_ETH_H__ +#define __IDT_ETH_H__ @@ -3006,9 +3006,9 @@ diff -urN linux.old/include/asm-mips/rc32434/eth.h linux.dev/include/asm-mips/rc + + + -diff -urN linux.old/include/asm-mips/rc32434/eth_v.h linux.dev/include/asm-mips/rc32434/eth_v.h ---- linux.old/include/asm-mips/rc32434/eth_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/eth_v.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/eth_v.h linux-2.6.17-owrt/include/asm-mips/rc32434/eth_v.h +--- linux-2.6.17/include/asm-mips/rc32434/eth_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/eth_v.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,64 @@ +#ifndef __IDT_ETH_V_H__ +#define __IDT_ETH_V_H__ @@ -3074,9 +3074,9 @@ diff -urN linux.old/include/asm-mips/rc32434/eth_v.h linux.dev/include/asm-mips/ + + + -diff -urN linux.old/include/asm-mips/rc32434/gpio.h linux.dev/include/asm-mips/rc32434/gpio.h ---- linux.old/include/asm-mips/rc32434/gpio.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/gpio.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/gpio.h linux-2.6.17-owrt/include/asm-mips/rc32434/gpio.h +--- linux-2.6.17/include/asm-mips/rc32434/gpio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/gpio.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,182 @@ +#ifndef __IDT_GPIO_H__ +#define __IDT_GPIO_H__ @@ -3260,9 +3260,9 @@ diff -urN linux.old/include/asm-mips/rc32434/gpio.h linux.dev/include/asm-mips/r + +#endif // __IDT_GPIO_H__ + -diff -urN linux.old/include/asm-mips/rc32434/i2c.h linux.dev/include/asm-mips/rc32434/i2c.h ---- linux.old/include/asm-mips/rc32434/i2c.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/i2c.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/i2c.h linux-2.6.17-owrt/include/asm-mips/rc32434/i2c.h +--- linux-2.6.17/include/asm-mips/rc32434/i2c.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/i2c.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,147 @@ +#ifndef __IDT_I2C_H__ +#define __IDT_I2C_H__ @@ -3411,9 +3411,9 @@ diff -urN linux.old/include/asm-mips/rc32434/i2c.h linux.dev/include/asm-mips/rc + +} ; +#endif // __IDT_I2C_H__ -diff -urN linux.old/include/asm-mips/rc32434/integ.h linux.dev/include/asm-mips/rc32434/integ.h ---- linux.old/include/asm-mips/rc32434/integ.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/integ.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/integ.h linux-2.6.17-owrt/include/asm-mips/rc32434/integ.h +--- linux-2.6.17/include/asm-mips/rc32434/integ.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/integ.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,78 @@ +#ifndef __IDT_INTEG_H__ +#define __IDT_INTEG_H__ @@ -3493,9 +3493,9 @@ diff -urN linux.old/include/asm-mips/rc32434/integ.h linux.dev/include/asm-mips/ +} ; + +#endif // __IDT_INTEG_H__ -diff -urN linux.old/include/asm-mips/rc32434/int.h linux.dev/include/asm-mips/rc32434/int.h ---- linux.old/include/asm-mips/rc32434/int.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/int.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/int.h linux-2.6.17-owrt/include/asm-mips/rc32434/int.h +--- linux-2.6.17/include/asm-mips/rc32434/int.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/int.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,167 @@ +#ifndef __IDT_INT_H__ +#define __IDT_INT_H__ @@ -3664,9 +3664,9 @@ diff -urN linux.old/include/asm-mips/rc32434/int.h linux.dev/include/asm-mips/rc +#endif // __IDT_INT_H__ + + -diff -urN linux.old/include/asm-mips/rc32434/iparb.h linux.dev/include/asm-mips/rc32434/iparb.h ---- linux.old/include/asm-mips/rc32434/iparb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/iparb.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/iparb.h linux-2.6.17-owrt/include/asm-mips/rc32434/iparb.h +--- linux-2.6.17/include/asm-mips/rc32434/iparb.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/iparb.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,95 @@ +#ifndef __IDT_IPARB_H__ +#define __IDT_IPARB_H__ @@ -3763,9 +3763,9 @@ diff -urN linux.old/include/asm-mips/rc32434/iparb.h linux.dev/include/asm-mips/ +}; + +#endif // __IDT_IPARB_H__ -diff -urN linux.old/include/asm-mips/rc32434/irm.h linux.dev/include/asm-mips/rc32434/irm.h ---- linux.old/include/asm-mips/rc32434/irm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/irm.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/irm.h linux-2.6.17-owrt/include/asm-mips/rc32434/irm.h +--- linux-2.6.17/include/asm-mips/rc32434/irm.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/irm.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,55 @@ +#ifndef __IDT_IRM_H__ +#define __IDT_IRM_H__ @@ -3822,9 +3822,9 @@ diff -urN linux.old/include/asm-mips/rc32434/irm.h linux.dev/include/asm-mips/rc +} IRM_Offset_t ; + +#endif // __IDT_IRM_H__ -diff -urN linux.old/include/asm-mips/rc32434/irq.h linux.dev/include/asm-mips/rc32434/irq.h ---- linux.old/include/asm-mips/rc32434/irq.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/irq.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/irq.h linux-2.6.17-owrt/include/asm-mips/rc32434/irq.h +--- linux-2.6.17/include/asm-mips/rc32434/irq.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/irq.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,8 @@ +#ifndef __ASM_MACH_MIPS_IRQ_H +#define __ASM_MACH_MIPS_IRQ_H @@ -3834,9 +3834,9 @@ diff -urN linux.old/include/asm-mips/rc32434/irq.h linux.dev/include/asm-mips/rc +#define NR_IRQS 256 + +#endif /* __ASM_MACH_MIPS_IRQ_H */ -diff -urN linux.old/include/asm-mips/rc32434/nvram.h linux.dev/include/asm-mips/rc32434/nvram.h ---- linux.old/include/asm-mips/rc32434/nvram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/nvram.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/nvram.h linux-2.6.17-owrt/include/asm-mips/rc32434/nvram.h +--- linux-2.6.17/include/asm-mips/rc32434/nvram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/nvram.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,97 @@ +#ifndef __IDT_NVRAM_H +#define __IDT_NVRAM_H @@ -3935,9 +3935,9 @@ diff -urN linux.old/include/asm-mips/rc32434/nvram.h linux.dev/include/asm-mips/ + +#endif // __IDT_NVRAM_H__ + -diff -urN linux.old/include/asm-mips/rc32434/pci.h linux.dev/include/asm-mips/rc32434/pci.h ---- linux.old/include/asm-mips/rc32434/pci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/pci.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/pci.h linux-2.6.17-owrt/include/asm-mips/rc32434/pci.h +--- linux-2.6.17/include/asm-mips/rc32434/pci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/pci.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,695 @@ +/************************************************************************** + * @@ -4634,9 +4634,9 @@ diff -urN linux.old/include/asm-mips/rc32434/pci.h linux.dev/include/asm-mips/rc + + + -diff -urN linux.old/include/asm-mips/rc32434/pcikorina.h linux.dev/include/asm-mips/rc32434/pcikorina.h ---- linux.old/include/asm-mips/rc32434/pcikorina.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/pcikorina.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/pcikorina.h linux-2.6.17-owrt/include/asm-mips/rc32434/pcikorina.h +--- linux-2.6.17/include/asm-mips/rc32434/pcikorina.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/pcikorina.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,209 @@ +/* $Id: pciacacia.h,v 1.5 2001/05/01 10:09:17 carstenl Exp $ + * @@ -4847,9 +4847,9 @@ diff -urN linux.old/include/asm-mips/rc32434/pcikorina.h linux.dev/include/asm-m + + + -diff -urN linux.old/include/asm-mips/rc32434/pci_regs.h linux.dev/include/asm-mips/rc32434/pci_regs.h ---- linux.old/include/asm-mips/rc32434/pci_regs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/pci_regs.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/pci_regs.h linux-2.6.17-owrt/include/asm-mips/rc32434/pci_regs.h +--- linux-2.6.17/include/asm-mips/rc32434/pci_regs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/pci_regs.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,8 @@ +/* Override the default address space for this arch +*/ @@ -4859,9 +4859,9 @@ diff -urN linux.old/include/asm-mips/rc32434/pci_regs.h linux.dev/include/asm-mi +//#undef PCI_BASE_ADDRESS_SPACE +//#define PCI_BASE_ADDRESS_SPACE PCI_BASE_ADDRESS_SPACE_MEMORY + -diff -urN linux.old/include/asm-mips/rc32434/rb.h linux.dev/include/asm-mips/rc32434/rb.h ---- linux.old/include/asm-mips/rc32434/rb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/rb.h 2006-06-15 16:27:36.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/rb.h linux-2.6.17-owrt/include/asm-mips/rc32434/rb.h +--- linux-2.6.17/include/asm-mips/rc32434/rb.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/rb.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,69 @@ +#ifndef __MIPS_RB_H__ +#define __MIPS_RB_H__ @@ -4932,9 +4932,9 @@ diff -urN linux.old/include/asm-mips/rc32434/rb.h linux.dev/include/asm-mips/rc3 +}; + +#endif -diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mips/rc32434/rc32434.h ---- linux.old/include/asm-mips/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/rc32434.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/rc32434.h linux-2.6.17-owrt/include/asm-mips/rc32434/rc32434.h +--- linux-2.6.17/include/asm-mips/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/rc32434.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,126 @@ +/* + *************************************************************************** @@ -5062,9 +5062,9 @@ diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mip +extern void cons_puts(char *s); + +#endif /* _RC32434_H_ */ -diff -urN linux.old/include/asm-mips/rc32434/rst.h linux.dev/include/asm-mips/rc32434/rst.h ---- linux.old/include/asm-mips/rc32434/rst.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/rst.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/rst.h linux-2.6.17-owrt/include/asm-mips/rc32434/rst.h +--- linux-2.6.17/include/asm-mips/rc32434/rst.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/rst.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,105 @@ +#ifndef __IDT_RST_H__ +#define __IDT_RST_H__ @@ -5171,9 +5171,9 @@ diff -urN linux.old/include/asm-mips/rc32434/rst.h linux.dev/include/asm-mips/rc + BCV_delayByPass_m = 0x00008000, +} ; +#endif // __IDT_RST_H__ -diff -urN linux.old/include/asm-mips/rc32434/spi.h linux.dev/include/asm-mips/rc32434/spi.h ---- linux.old/include/asm-mips/rc32434/spi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/spi.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/spi.h linux-2.6.17-owrt/include/asm-mips/rc32434/spi.h +--- linux-2.6.17/include/asm-mips/rc32434/spi.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/spi.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,100 @@ +#ifndef __IDT_SPI_H__ +#define __IDT_SPI_H__ @@ -5275,9 +5275,9 @@ diff -urN linux.old/include/asm-mips/rc32434/spi.h linux.dev/include/asm-mips/rc + SIOD_sck_m = 0x00000004, +} ; +#endif // __IDT_SPI_H__ -diff -urN linux.old/include/asm-mips/rc32434/timer.h linux.dev/include/asm-mips/rc32434/timer.h ---- linux.old/include/asm-mips/rc32434/timer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/timer.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/timer.h linux-2.6.17-owrt/include/asm-mips/rc32434/timer.h +--- linux-2.6.17/include/asm-mips/rc32434/timer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/timer.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,91 @@ +/************************************************************************** + * @@ -5370,9 +5370,9 @@ diff -urN linux.old/include/asm-mips/rc32434/timer.h linux.dev/include/asm-mips/ +} ; +#endif // __IDT_TIM_H__ + -diff -urN linux.old/include/asm-mips/rc32434/tim.h linux.dev/include/asm-mips/rc32434/tim.h ---- linux.old/include/asm-mips/rc32434/tim.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/tim.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/tim.h linux-2.6.17-owrt/include/asm-mips/rc32434/tim.h +--- linux-2.6.17/include/asm-mips/rc32434/tim.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/tim.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,78 @@ +#ifndef __IDT_TIM_H__ +#define __IDT_TIM_H__ @@ -5452,9 +5452,9 @@ diff -urN linux.old/include/asm-mips/rc32434/tim.h linux.dev/include/asm-mips/rc +} ; +#endif // __IDT_TIM_H__ + -diff -urN linux.old/include/asm-mips/rc32434/types.h linux.dev/include/asm-mips/rc32434/types.h ---- linux.old/include/asm-mips/rc32434/types.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/types.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/types.h linux-2.6.17-owrt/include/asm-mips/rc32434/types.h +--- linux-2.6.17/include/asm-mips/rc32434/types.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/types.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,39 @@ +#ifndef __IDT_TYPES_H__ +#define __IDT_TYPES_H__ @@ -5495,9 +5495,9 @@ diff -urN linux.old/include/asm-mips/rc32434/types.h linux.dev/include/asm-mips/ +#endif // __cplusplus + +#endif // __IDT_TYPES_H__ -diff -urN linux.old/include/asm-mips/rc32434/uart.h linux.dev/include/asm-mips/rc32434/uart.h ---- linux.old/include/asm-mips/rc32434/uart.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/uart.h 2006-06-15 16:26:53.000000000 +0200 +diff -Nur linux-2.6.17/include/asm-mips/rc32434/uart.h linux-2.6.17-owrt/include/asm-mips/rc32434/uart.h +--- linux-2.6.17/include/asm-mips/rc32434/uart.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/include/asm-mips/rc32434/uart.h 2006-06-18 15:24:39.000000000 +0200 @@ -0,0 +1,178 @@ +#ifndef __IDT_UART_H__ +#define __IDT_UART_H__ diff --git a/openwrt/target/linux/sibyte-2.6/Makefile b/openwrt/target/linux/sibyte-2.6/Makefile index 3309a84e55d..210c195adff 100644 --- a/openwrt/target/linux/sibyte-2.6/Makefile +++ b/openwrt/target/linux/sibyte-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.7 +LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ../rules.mk include ./config diff --git a/openwrt/target/linux/sibyte-2.6/patches/000-DUART.patch b/openwrt/target/linux/sibyte-2.6/patches/000-DUART.patch index 480287ffa0c..fe899f14530 100644 --- a/openwrt/target/linux/sibyte-2.6/patches/000-DUART.patch +++ b/openwrt/target/linux/sibyte-2.6/patches/000-DUART.patch @@ -1,5 +1,6 @@ ---- linux-2.6.16.7/drivers/char/Kconfig 2006-04-21 14:38:30.000000000 -0700 -+++ linux-2.6.16.7/drivers/char/Kconfig 2006-04-21 14:39:29.000000000 -0700 +diff -Nur linux-2.6.17/drivers/char/Kconfig linux-2.6.17-owrt/drivers/char/Kconfig +--- linux-2.6.17/drivers/char/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/char/Kconfig 2006-06-18 12:41:36.000000000 +0200 @@ -340,6 +340,14 @@ To compile this driver as a module, choose M here: the module will be called istallion. @@ -15,20 +16,20 @@ config AU1000_UART bool "Enable Au1000 UART Support" depends on SERIAL_NONSTANDARD && MIPS -diff -Nurb linux-2.6.16.7/drivers/char/Makefile linux-2.6.16.7/drivers/char/Makefile ---- linux-2.6.16.7/drivers/char/Makefile 2006-04-17 14:53:25.000000000 -0700 -+++ linux-2.6.16.7/drivers/char/Makefile 2006-04-28 12:14:24.000000000 -0700 +diff -Nur linux-2.6.17/drivers/char/Makefile linux-2.6.17-owrt/drivers/char/Makefile +--- linux-2.6.17/drivers/char/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/char/Makefile 2006-06-18 12:42:57.000000000 +0200 @@ -31,6 +31,7 @@ obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o obj-$(CONFIG_MOXA_SMARTIO) += mxser.o +obj-$(CONFIG_SIBYTE_SB1250_DUART) += sb1250_duart.o - obj-$(CONFIG_COMPUTONE) += ip2.o ip2main.o + obj-$(CONFIG_COMPUTONE) += ip2/ obj-$(CONFIG_RISCOM8) += riscom8.o obj-$(CONFIG_ISI) += isicom.o -diff -Nurb linux-2.6.16.7/drivers/char/sb1250_duart.c linux-2.6.16.7/drivers/char/sb1250_duart.c ---- linux-2.6.16.7/drivers/char/sb1250_duart.c 1969-12-31 16:00:00.000000000 -0800 -+++ linux-2.6.16.7/drivers/char/sb1250_duart.c 2006-04-28 12:13:49.000000000 -0700 +diff -Nur linux-2.6.17/drivers/char/sb1250_duart.c linux-2.6.17-owrt/drivers/char/sb1250_duart.c +--- linux-2.6.17/drivers/char/sb1250_duart.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/char/sb1250_duart.c 2006-06-18 12:41:36.000000000 +0200 @@ -0,0 +1,911 @@ +/* + * Copyright (C) 2000,2001,2002,2003,2004 Broadcom Corporation @@ -941,9 +942,9 @@ diff -Nurb linux-2.6.16.7/drivers/char/sb1250_duart.c linux-2.6.16.7/drivers/cha +console_initcall(sb1250_serial_console_init); + +#endif /* CONFIG_SIBYTE_SB1250_DUART_CONSOLE */ -diff -Nurb linux-2.6.16.7/include/linux/serial.h linux-2.6.16.7/include/linux/serial.h ---- linux-2.6.16.7/include/linux/serial.h 2006-04-17 14:53:25.000000000 -0700 -+++ linux-2.6.16.7/include/linux/serial.h 2006-04-28 12:25:19.000000000 -0700 +diff -Nur linux-2.6.17/include/linux/serial.h linux-2.6.17-owrt/include/linux/serial.h +--- linux-2.6.17/include/linux/serial.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/linux/serial.h 2006-06-18 12:41:36.000000000 +0200 @@ -76,7 +76,8 @@ #define PORT_16654 11 #define PORT_16850 12 diff --git a/openwrt/target/linux/x86-2.6/Makefile b/openwrt/target/linux/x86-2.6/Makefile index 2a9ab2c971f..7b2f1b068d2 100644 --- a/openwrt/target/linux/x86-2.6/Makefile +++ b/openwrt/target/linux/x86-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.7 +LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ../rules.mk include ./config diff --git a/openwrt/target/linux/xscale-2.6/Makefile b/openwrt/target/linux/xscale-2.6/Makefile index 4f6a5db8337..608a49408bd 100644 --- a/openwrt/target/linux/xscale-2.6/Makefile +++ b/openwrt/target/linux/xscale-2.6/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.7 +LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ../rules.mk include ./config From 453299e099d7e1f52cbbc5b3ddfbad3830f100ab Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Sun, 18 Jun 2006 15:15:19 +0000 Subject: [PATCH 209/757] fix the multiple gateway patch, too SVN-Revision: 3988 --- .../201-multiple_default_gateways.patch | 264 ++++++++---------- 1 file changed, 119 insertions(+), 145 deletions(-) diff --git a/openwrt/target/linux/generic-2.6/patches/201-multiple_default_gateways.patch b/openwrt/target/linux/generic-2.6/patches/201-multiple_default_gateways.patch index b05012ff10c..3be34d7c637 100644 --- a/openwrt/target/linux/generic-2.6/patches/201-multiple_default_gateways.patch +++ b/openwrt/target/linux/generic-2.6/patches/201-multiple_default_gateways.patch @@ -1,6 +1,6 @@ -diff -ur v2.6.14/linux/include/linux/netfilter_ipv4/ip_nat.h linux/include/linux/netfilter_ipv4/ip_nat.h ---- v2.6.14/linux/include/linux/netfilter_ipv4/ip_nat.h 2005-10-29 14:15:09.000000000 +0300 -+++ linux/include/linux/netfilter_ipv4/ip_nat.h 2005-10-29 18:11:32.885759304 +0300 +diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ip_nat.h linux-2.6.17-owrt/include/linux/netfilter_ipv4/ip_nat.h +--- linux-2.6.17/include/linux/netfilter_ipv4/ip_nat.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/linux/netfilter_ipv4/ip_nat.h 2006-06-18 16:53:21.000000000 +0200 @@ -63,6 +63,13 @@ struct ip_conntrack; @@ -15,10 +15,10 @@ diff -ur v2.6.14/linux/include/linux/netfilter_ipv4/ip_nat.h linux/include/linux /* Set up the info structure to map into this range. */ extern unsigned int ip_nat_setup_info(struct ip_conntrack *conntrack, const struct ip_nat_range *range, -diff -ur v2.6.14/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h ---- v2.6.14/linux/include/linux/rtnetlink.h 2005-10-29 14:15:09.000000000 +0300 -+++ linux/include/linux/rtnetlink.h 2005-10-29 18:11:21.299520680 +0300 -@@ -292,6 +292,8 @@ +diff -Nur linux-2.6.17/include/linux/rtnetlink.h linux-2.6.17-owrt/include/linux/rtnetlink.h +--- linux-2.6.17/include/linux/rtnetlink.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/linux/rtnetlink.h 2006-06-18 16:53:21.000000000 +0200 +@@ -293,6 +293,8 @@ #define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ #define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ #define RTNH_F_ONLINK 4 /* Gateway is forced on link */ @@ -27,9 +27,9 @@ diff -ur v2.6.14/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h /* Macros to handle hexthops */ -diff -ur v2.6.14/linux/include/net/flow.h linux/include/net/flow.h ---- v2.6.14/linux/include/net/flow.h 2005-06-18 08:50:52.000000000 +0300 -+++ linux/include/net/flow.h 2005-10-29 18:11:32.885759304 +0300 +diff -Nur linux-2.6.17/include/net/flow.h linux-2.6.17-owrt/include/net/flow.h +--- linux-2.6.17/include/net/flow.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/net/flow.h 2006-06-18 16:53:21.000000000 +0200 @@ -19,6 +19,8 @@ __u32 daddr; __u32 saddr; @@ -48,9 +48,9 @@ diff -ur v2.6.14/linux/include/net/flow.h linux/include/net/flow.h #define fl4_tos nl_u.ip4_u.tos #define fl4_scope nl_u.ip4_u.scope -diff -ur v2.6.14/linux/include/net/ip_fib.h linux/include/net/ip_fib.h ---- v2.6.14/linux/include/net/ip_fib.h 2005-10-29 14:15:09.000000000 +0300 -+++ linux/include/net/ip_fib.h 2005-10-29 18:11:21.300520528 +0300 +diff -Nur linux-2.6.17/include/net/ip_fib.h linux-2.6.17-owrt/include/net/ip_fib.h +--- linux-2.6.17/include/net/ip_fib.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/net/ip_fib.h 2006-06-18 16:53:21.000000000 +0200 @@ -195,7 +195,8 @@ static inline void fib_select_default(const struct flowi *flp, struct fib_result *res) @@ -69,16 +69,16 @@ diff -ur v2.6.14/linux/include/net/ip_fib.h linux/include/net/ip_fib.h static inline struct fib_table *fib_get_table(int id) { -@@ -300,4 +302,6 @@ +@@ -302,4 +304,6 @@ extern void fib_proc_exit(void); #endif +extern rwlock_t fib_nhflags_lock; + #endif /* _NET_FIB_H */ -diff -ur v2.6.14/linux/include/net/route.h linux/include/net/route.h ---- v2.6.14/linux/include/net/route.h 2005-10-29 14:15:09.000000000 +0300 -+++ linux/include/net/route.h 2005-10-29 18:11:32.885759304 +0300 +diff -Nur linux-2.6.17/include/net/route.h linux-2.6.17-owrt/include/net/route.h +--- linux-2.6.17/include/net/route.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/net/route.h 2006-06-18 16:53:21.000000000 +0200 @@ -117,6 +117,7 @@ extern int ip_route_output_key(struct rtable **, struct flowi *flp); extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); @@ -87,10 +87,10 @@ diff -ur v2.6.14/linux/include/net/route.h linux/include/net/route.h extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu); extern void ip_rt_send_redirect(struct sk_buff *skb); -diff -ur v2.6.14/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c ---- v2.6.14/linux/net/ipv4/fib_frontend.c 2005-10-29 14:15:09.000000000 +0300 -+++ linux/net/ipv4/fib_frontend.c 2005-10-29 18:11:21.300520528 +0300 -@@ -54,6 +54,8 @@ +diff -Nur linux-2.6.17/net/ipv4/fib_frontend.c linux-2.6.17-owrt/net/ipv4/fib_frontend.c +--- linux-2.6.17/net/ipv4/fib_frontend.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/fib_frontend.c 2006-06-18 16:53:21.000000000 +0200 +@@ -56,6 +56,8 @@ struct fib_table *ip_fib_local_table; struct fib_table *ip_fib_main_table; @@ -99,7 +99,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c #else #define RT_TABLE_MIN 1 -@@ -71,6 +73,7 @@ +@@ -73,6 +75,7 @@ return tb; } @@ -107,7 +107,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c #endif /* CONFIG_IP_MULTIPLE_TABLES */ -@@ -168,6 +171,9 @@ +@@ -170,6 +173,9 @@ .tos = tos } }, .iif = oif }; struct fib_result res; @@ -117,7 +117,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c int no_addr, rpf; int ret; -@@ -189,31 +195,35 @@ +@@ -191,31 +197,35 @@ goto e_inval_res; *spec_dst = FIB_RES_PREFSRC(res); fib_combine_itag(itag, &res); @@ -160,7 +160,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c return ret; last_resort: -@@ -584,9 +594,7 @@ +@@ -589,9 +599,7 @@ switch (event) { case NETDEV_UP: fib_add_ifaddr(ifa); @@ -170,7 +170,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c rt_cache_flush(-1); break; case NETDEV_DOWN: -@@ -622,9 +630,7 @@ +@@ -627,9 +635,7 @@ for_ifa(in_dev) { fib_add_ifaddr(ifa); } endfor_ifa(in_dev); @@ -180,10 +180,10 @@ diff -ur v2.6.14/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c rt_cache_flush(-1); break; case NETDEV_DOWN: -diff -ur v2.6.14/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c ---- v2.6.14/linux/net/ipv4/fib_hash.c 2005-10-29 14:15:09.000000000 +0300 -+++ linux/net/ipv4/fib_hash.c 2005-10-29 18:11:21.301520376 +0300 -@@ -276,30 +276,38 @@ +diff -Nur linux-2.6.17/net/ipv4/fib_hash.c linux-2.6.17-owrt/net/ipv4/fib_hash.c +--- linux-2.6.17/net/ipv4/fib_hash.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/fib_hash.c 2006-06-18 16:53:21.000000000 +0200 +@@ -277,30 +277,38 @@ return err; } @@ -227,7 +227,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c list_for_each_entry(fa, &f->fn_alias, fa_list) { struct fib_info *next_fi = fa->fa_info; -@@ -307,41 +315,52 @@ +@@ -308,41 +316,52 @@ fa->fa_type != RTN_UNICAST) continue; @@ -292,7 +292,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c goto out; } -@@ -351,8 +370,11 @@ +@@ -352,8 +371,11 @@ res->fi = last_resort; if (last_resort) atomic_inc(&last_resort->fib_clntref); @@ -305,7 +305,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c out: read_unlock(&fib_hash_lock); } -@@ -451,6 +473,7 @@ +@@ -452,6 +474,7 @@ write_lock_bh(&fib_hash_lock); fi_drop = fa->fa_info; fa->fa_info = fi; @@ -313,7 +313,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c fa->fa_type = type; fa->fa_scope = r->rtm_scope; state = fa->fa_state; -@@ -510,6 +533,7 @@ +@@ -511,6 +534,7 @@ new_fa->fa_type = type; new_fa->fa_scope = r->rtm_scope; new_fa->fa_state = 0; @@ -321,9 +321,9 @@ diff -ur v2.6.14/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c /* * Insert new entry to the list. -diff -ur v2.6.14/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h ---- v2.6.14/linux/net/ipv4/fib_lookup.h 2005-10-29 14:15:09.000000000 +0300 -+++ linux/net/ipv4/fib_lookup.h 2005-10-29 18:11:21.302520224 +0300 +diff -Nur linux-2.6.17/net/ipv4/fib_lookup.h linux-2.6.17-owrt/net/ipv4/fib_lookup.h +--- linux-2.6.17/net/ipv4/fib_lookup.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/fib_lookup.h 2006-06-18 16:53:21.000000000 +0200 @@ -9,6 +9,7 @@ struct list_head fa_list; struct rcu_head rcu; @@ -341,10 +341,10 @@ diff -ur v2.6.14/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h + const struct flowi *flp); #endif /* _FIB_LOOKUP_H */ -diff -ur v2.6.14/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c ---- v2.6.14/linux/net/ipv4/fib_rules.c 2005-08-29 07:51:29.000000000 +0300 -+++ linux/net/ipv4/fib_rules.c 2005-10-29 18:11:21.302520224 +0300 -@@ -280,6 +280,11 @@ +diff -Nur linux-2.6.17/net/ipv4/fib_rules.c linux-2.6.17-owrt/net/ipv4/fib_rules.c +--- linux-2.6.17/net/ipv4/fib_rules.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/fib_rules.c 2006-06-18 16:53:21.000000000 +0200 +@@ -296,6 +296,11 @@ } } @@ -356,7 +356,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c int fib_lookup(const struct flowi *flp, struct fib_result *res) { int err; -@@ -342,7 +347,8 @@ +@@ -361,7 +366,8 @@ void fib_select_default(const struct flowi *flp, struct fib_result *res) { if (res->r && res->r->r_action == RTN_UNICAST && @@ -366,10 +366,10 @@ diff -ur v2.6.14/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c struct fib_table *tb; if ((tb = fib_get_table(res->r->r_table)) != NULL) tb->tb_select_default(tb, flp, res); -diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c ---- v2.6.14/linux/net/ipv4/fib_semantics.c 2005-10-29 14:15:09.000000000 +0300 -+++ linux/net/ipv4/fib_semantics.c 2005-10-29 18:11:32.886759152 +0300 -@@ -53,6 +53,7 @@ +diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_semantics.c +--- linux-2.6.17/net/ipv4/fib_semantics.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/fib_semantics.c 2006-06-18 16:53:21.000000000 +0200 +@@ -55,6 +55,7 @@ static struct hlist_head *fib_info_laddrhash; static unsigned int fib_hash_size; static unsigned int fib_info_cnt; @@ -377,7 +377,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c #define DEVINDEX_HASHBITS 8 #define DEVINDEX_HASHSIZE (1U << DEVINDEX_HASHBITS) -@@ -188,7 +189,7 @@ +@@ -190,7 +191,7 @@ #ifdef CONFIG_NET_CLS_ROUTE nh->nh_tclassid != onh->nh_tclassid || #endif @@ -386,7 +386,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c return -1; onh++; } endfor_nexthops(fi); -@@ -225,7 +226,7 @@ +@@ -227,7 +228,7 @@ nfi->fib_priority == fi->fib_priority && memcmp(nfi->fib_metrics, fi->fib_metrics, sizeof(fi->fib_metrics)) == 0 && @@ -395,7 +395,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c (nfi->fib_nhs == 0 || nh_comp(fi, nfi) == 0)) return fi; } -@@ -317,26 +318,70 @@ +@@ -319,26 +320,70 @@ } int fib_detect_death(struct fib_info *fi, int order, @@ -482,7 +482,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c } #ifdef CONFIG_IP_ROUTE_MULTIPATH -@@ -507,8 +552,11 @@ +@@ -509,8 +554,11 @@ return -EINVAL; if ((dev = __dev_get_by_index(nh->nh_oif)) == NULL) return -ENODEV; @@ -496,7 +496,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c nh->nh_dev = dev; dev_hold(dev); nh->nh_scope = RT_SCOPE_LINK; -@@ -523,24 +571,48 @@ +@@ -525,24 +573,48 @@ /* It is not necessary, but requires a bit of thinking */ if (fl.fl4_scope < RT_SCOPE_LINK) fl.fl4_scope = RT_SCOPE_LINK; @@ -561,7 +561,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c } else { struct in_device *in_dev; -@@ -551,8 +623,11 @@ +@@ -553,8 +625,11 @@ if (in_dev == NULL) return -ENODEV; if (!(in_dev->dev->flags&IFF_UP)) { @@ -575,7 +575,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c } nh->nh_dev = in_dev->dev; dev_hold(nh->nh_dev); -@@ -890,8 +965,12 @@ +@@ -892,8 +967,12 @@ for_nexthops(fi) { if (nh->nh_flags&RTNH_F_DEAD) continue; @@ -590,7 +590,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c } #ifdef CONFIG_IP_ROUTE_MULTIPATH if (nhsel < fi->fib_nhs) { -@@ -1197,18 +1276,29 @@ +@@ -1199,18 +1278,29 @@ prev_fi = fi; dead = 0; change_nexthops(fi) { @@ -628,7 +628,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c } #ifdef CONFIG_IP_ROUTE_MULTIPATH if (force > 1 && nh->nh_dev == dev) { -@@ -1227,11 +1317,8 @@ +@@ -1229,11 +1319,8 @@ return ret; } @@ -641,7 +641,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c */ int fib_sync_up(struct net_device *dev) -@@ -1241,8 +1328,10 @@ +@@ -1243,8 +1330,10 @@ struct hlist_head *head; struct hlist_node *node; struct fib_nh *nh; @@ -653,7 +653,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c if (!(dev->flags&IFF_UP)) return 0; -@@ -1250,6 +1339,7 @@ +@@ -1252,6 +1341,7 @@ hash = fib_devindex_hashfn(dev->ifindex); head = &fib_info_devhash[hash]; ret = 0; @@ -661,7 +661,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c hlist_for_each_entry(nh, node, head, nh_hash) { struct fib_info *fi = nh->nh_parent; -@@ -1262,19 +1352,37 @@ +@@ -1264,19 +1354,37 @@ prev_fi = fi; alive = 0; change_nexthops(fi) { @@ -702,7 +702,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c } endfor_nexthops(fi) if (alive > 0) { -@@ -1282,10 +1390,14 @@ +@@ -1284,10 +1392,14 @@ ret++; } } @@ -717,7 +717,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c /* The algorithm is suboptimal, but it provides really fair weighted route distribution. -@@ -1294,24 +1406,45 @@ +@@ -1296,24 +1408,45 @@ void fib_select_multipath(const struct flowi *flp, struct fib_result *res) { struct fib_info *fi = res->fi; @@ -771,7 +771,7 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c } -@@ -1321,20 +1454,40 @@ +@@ -1323,20 +1456,40 @@ w = jiffies % fi->fib_power; @@ -815,10 +815,10 @@ diff -ur v2.6.14/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c spin_unlock_bh(&fib_multipath_lock); } #endif -diff -ur v2.6.14/linux/net/ipv4/netfilter/ip_nat_core.c linux/net/ipv4/netfilter/ip_nat_core.c ---- v2.6.14/linux/net/ipv4/netfilter/ip_nat_core.c 2005-10-29 14:15:09.000000000 +0300 -+++ linux/net/ipv4/netfilter/ip_nat_core.c 2005-10-29 18:11:32.887759000 +0300 -@@ -591,6 +591,53 @@ +diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_nat_core.c linux-2.6.17-owrt/net/ipv4/netfilter/ip_nat_core.c +--- linux-2.6.17/net/ipv4/netfilter/ip_nat_core.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/ip_nat_core.c 2006-06-18 16:53:21.000000000 +0200 +@@ -589,6 +589,53 @@ EXPORT_SYMBOL_GPL(ip_nat_port_range_to_nfattr); #endif @@ -872,54 +872,28 @@ diff -ur v2.6.14/linux/net/ipv4/netfilter/ip_nat_core.c linux/net/ipv4/netfilter static int __init ip_nat_init(void) { size_t i; -diff -ur v2.6.14/linux/net/ipv4/netfilter/ip_nat_standalone.c linux/net/ipv4/netfilter/ip_nat_standalone.c ---- v2.6.14/linux/net/ipv4/netfilter/ip_nat_standalone.c 2005-10-29 14:15:09.000000000 +0300 -+++ linux/net/ipv4/netfilter/ip_nat_standalone.c 2005-10-29 18:11:32.887759000 +0300 -@@ -266,6 +266,14 @@ - .priority = NF_IP_PRI_NAT_DST, - }; - -+/* Before routing, route before mangling */ -+static struct nf_hook_ops ip_nat_inr_ops = { -+ .hook = ip_nat_route_input, -+ .pf = PF_INET, -+ .hooknum = NF_IP_PRE_ROUTING, -+ .priority = NF_IP_PRI_LAST-1, -+}; -+ - /* After packet filtering, change source */ - static struct nf_hook_ops ip_nat_out_ops = { - .hook = ip_nat_out, -@@ -330,10 +338,15 @@ - printk("ip_nat_init: can't register in hook.\n"); - goto cleanup_rule_init; - } -+ ret = nf_register_hook(&ip_nat_inr_ops); -+ if (ret < 0) { -+ printk("ip_nat_init: can't register inr hook.\n"); -+ goto cleanup_inops; -+ } - ret = nf_register_hook(&ip_nat_out_ops); - if (ret < 0) { - printk("ip_nat_init: can't register out hook.\n"); -- goto cleanup_inops; -+ goto cleanup_inrops; - } - ret = nf_register_hook(&ip_nat_adjust_in_ops); - if (ret < 0) { -@@ -367,6 +380,8 @@ - nf_unregister_hook(&ip_nat_adjust_in_ops); - cleanup_outops: - nf_unregister_hook(&ip_nat_out_ops); -+ cleanup_inrops: -+ nf_unregister_hook(&ip_nat_inr_ops); - cleanup_inops: - nf_unregister_hook(&ip_nat_in_ops); - cleanup_rule_init: -diff -ur v2.6.14/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c ---- v2.6.14/linux/net/ipv4/netfilter/ipt_MASQUERADE.c 2005-10-29 14:15:09.000000000 +0300 -+++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c 2005-10-29 18:11:32.887759000 +0300 -@@ -97,13 +97,31 @@ +diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_nat_standalone.c linux-2.6.17-owrt/net/ipv4/netfilter/ip_nat_standalone.c +--- linux-2.6.17/net/ipv4/netfilter/ip_nat_standalone.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/ip_nat_standalone.c 2006-06-18 17:12:03.000000000 +0200 +@@ -334,6 +334,14 @@ + .hooknum = NF_IP_LOCAL_OUT, + .priority = NF_IP_PRI_NAT_DST, + }, ++ /* Before routing, route before mangling */ ++ { ++ .hook = ip_nat_route_input, ++ .owner = THIS_MODULE, ++ .pf = PF_INET, ++ .hooknum = NF_IP_PRE_ROUTING, ++ .priority = NF_IP_PRI_LAST-1, ++ }, + /* After packet filtering, change source */ + { + .hook = ip_nat_fn, +diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_MASQUERADE.c linux-2.6.17-owrt/net/ipv4/netfilter/ipt_MASQUERADE.c +--- linux-2.6.17/net/ipv4/netfilter/ipt_MASQUERADE.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/netfilter/ipt_MASQUERADE.c 2006-06-18 16:53:21.000000000 +0200 +@@ -88,13 +88,31 @@ return NF_ACCEPT; mr = targinfo; @@ -956,10 +930,10 @@ diff -ur v2.6.14/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfil write_lock_bh(&masq_lock); ct->nat.masq_index = out->ifindex; write_unlock_bh(&masq_lock); -diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c ---- v2.6.14/linux/net/ipv4/route.c 2005-10-29 14:15:09.000000000 +0300 -+++ linux/net/ipv4/route.c 2005-10-29 18:11:32.889758696 +0300 -@@ -1197,6 +1197,7 @@ +diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c +--- linux-2.6.17/net/ipv4/route.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/net/ipv4/route.c 2006-06-18 16:53:21.000000000 +0200 +@@ -1195,6 +1195,7 @@ /* Gateway is different ... */ rt->rt_gateway = new_gw; @@ -967,7 +941,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c /* Redirect received -> path was valid */ dst_confirm(&rth->u.dst); -@@ -1632,6 +1633,7 @@ +@@ -1626,6 +1627,7 @@ rth->fl.fl4_fwmark= skb->nfmark; #endif rth->fl.fl4_src = saddr; @@ -975,7 +949,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c rth->rt_src = saddr; #ifdef CONFIG_NET_CLS_ROUTE rth->u.dst.tclassid = itag; -@@ -1642,6 +1644,7 @@ +@@ -1636,6 +1638,7 @@ dev_hold(rth->u.dst.dev); rth->idev = in_dev_get(rth->u.dst.dev); rth->fl.oif = 0; @@ -983,7 +957,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c rth->rt_gateway = daddr; rth->rt_spec_dst= spec_dst; rth->rt_type = RTN_MULTICAST; -@@ -1706,7 +1709,7 @@ +@@ -1700,7 +1703,7 @@ struct fib_result* res, struct in_device *in_dev, u32 daddr, u32 saddr, u32 tos, @@ -992,7 +966,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c { struct rtable *rth; -@@ -1739,6 +1742,7 @@ +@@ -1733,6 +1736,7 @@ flags |= RTCF_DIRECTSRC; if (out_dev == in_dev && err && !(flags & (RTCF_NAT | RTCF_MASQ)) && @@ -1000,7 +974,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c (IN_DEV_SHARED_MEDIA(out_dev) || inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) flags |= RTCF_DOREDIRECT; -@@ -1778,6 +1782,7 @@ +@@ -1772,6 +1776,7 @@ #endif rth->fl.fl4_src = saddr; rth->rt_src = saddr; @@ -1008,7 +982,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c rth->rt_gateway = daddr; rth->rt_iif = rth->fl.iif = in_dev->dev->ifindex; -@@ -1785,6 +1790,7 @@ +@@ -1779,6 +1784,7 @@ dev_hold(rth->u.dst.dev); rth->idev = in_dev_get(rth->u.dst.dev); rth->fl.oif = 0; @@ -1016,7 +990,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c rth->rt_spec_dst= spec_dst; rth->u.dst.input = ip_forward; -@@ -1806,19 +1812,20 @@ +@@ -1800,19 +1806,20 @@ struct fib_result* res, const struct flowi *fl, struct in_device *in_dev, @@ -1040,7 +1014,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c if (err) return err; -@@ -1831,7 +1838,7 @@ +@@ -1825,7 +1832,7 @@ struct fib_result* res, const struct flowi *fl, struct in_device *in_dev, @@ -1049,7 +1023,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c { #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED struct rtable* rth = NULL, *rtres; -@@ -1847,7 +1854,7 @@ +@@ -1841,7 +1848,7 @@ /* distinguish between multipath and singlepath */ if (hopcount < 2) return ip_mkroute_input_def(skb, res, fl, in_dev, daddr, @@ -1058,7 +1032,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c /* add all alternatives to the routing cache */ for (hop = 0; hop < hopcount; hop++) { -@@ -1859,7 +1866,7 @@ +@@ -1853,7 +1860,7 @@ /* create a routing cache entry */ err = __mkroute_input(skb, res, in_dev, daddr, saddr, tos, @@ -1067,7 +1041,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c if (err) return err; -@@ -1879,7 +1886,7 @@ +@@ -1873,7 +1880,7 @@ skb->dst = &rtres->u.dst; return err; #else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ @@ -1076,7 +1050,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c #endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ } -@@ -1895,20 +1902,20 @@ +@@ -1889,20 +1896,20 @@ */ static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr, @@ -1100,7 +1074,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c unsigned flags = 0; u32 itag = 0; struct rtable * rth; -@@ -1941,6 +1948,12 @@ +@@ -1935,6 +1942,12 @@ if (BADCLASS(daddr) || ZERONET(daddr) || LOOPBACK(daddr)) goto martian_destination; @@ -1113,7 +1087,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c /* * Now we are ready to route packet. */ -@@ -1950,6 +1963,10 @@ +@@ -1944,6 +1957,10 @@ goto no_route; } free_res = 1; @@ -1124,7 +1098,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c RT_CACHE_STAT_INC(in_slow_tot); -@@ -1974,7 +1991,7 @@ +@@ -1968,7 +1985,7 @@ if (res.type != RTN_UNICAST) goto martian_destination; @@ -1133,7 +1107,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c if (err == -ENOBUFS) goto e_nobufs; if (err == -EINVAL) -@@ -1989,6 +2006,8 @@ +@@ -1983,6 +2000,8 @@ brd_input: if (skb->protocol != htons(ETH_P_IP)) goto e_inval; @@ -1142,7 +1116,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c if (ZERONET(saddr)) spec_dst = inet_select_addr(dev, 0, RT_SCOPE_LINK); -@@ -2031,6 +2050,7 @@ +@@ -2025,6 +2044,7 @@ rth->u.dst.dev = &loopback_dev; dev_hold(rth->u.dst.dev); rth->idev = in_dev_get(rth->u.dst.dev); @@ -1150,7 +1124,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c rth->rt_gateway = daddr; rth->rt_spec_dst= spec_dst; rth->u.dst.input= ip_local_deliver; -@@ -2080,8 +2100,9 @@ +@@ -2074,8 +2094,9 @@ goto e_inval; } @@ -1162,7 +1136,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c { struct rtable * rth; unsigned hash; -@@ -2096,6 +2117,7 @@ +@@ -2090,6 +2111,7 @@ if (rth->fl.fl4_dst == daddr && rth->fl.fl4_src == saddr && rth->fl.iif == iif && @@ -1170,7 +1144,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c rth->fl.oif == 0 && #ifdef CONFIG_IP_ROUTE_FWMARK rth->fl.fl4_fwmark == skb->nfmark && -@@ -2144,7 +2166,19 @@ +@@ -2138,7 +2160,19 @@ rcu_read_unlock(); return -EINVAL; } @@ -1191,7 +1165,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c } static inline int __mkroute_output(struct rtable **result, -@@ -2223,6 +2257,7 @@ +@@ -2217,6 +2251,7 @@ rth->fl.fl4_tos = tos; rth->fl.fl4_src = oldflp->fl4_src; rth->fl.oif = oldflp->oif; @@ -1199,7 +1173,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c #ifdef CONFIG_IP_ROUTE_FWMARK rth->fl.fl4_fwmark= oldflp->fl4_fwmark; #endif -@@ -2370,6 +2405,7 @@ +@@ -2361,6 +2396,7 @@ struct flowi fl = { .nl_u = { .ip4_u = { .daddr = oldflp->fl4_dst, .saddr = oldflp->fl4_src, @@ -1207,7 +1181,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c .tos = tos & IPTOS_RT_MASK, .scope = ((tos & RTO_ONLINK) ? RT_SCOPE_LINK : -@@ -2475,6 +2511,7 @@ +@@ -2466,6 +2502,7 @@ dev_out = &loopback_dev; dev_hold(dev_out); fl.oif = loopback_dev.ifindex; @@ -1215,7 +1189,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c res.type = RTN_LOCAL; flags |= RTCF_LOCAL; goto make_route; -@@ -2482,7 +2519,7 @@ +@@ -2473,7 +2510,7 @@ if (fib_lookup(&fl, &res)) { res.fi = NULL; @@ -1224,7 +1198,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c /* Apparently, routing tables are wrong. Assume, that the destination is on link. -@@ -2522,6 +2559,7 @@ +@@ -2513,6 +2550,7 @@ dev_out = &loopback_dev; dev_hold(dev_out); fl.oif = dev_out->ifindex; @@ -1232,7 +1206,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c if (res.fi) fib_info_put(res.fi); res.fi = NULL; -@@ -2529,13 +2567,12 @@ +@@ -2520,13 +2558,12 @@ goto make_route; } @@ -1249,7 +1223,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c if (!fl.fl4_src) fl.fl4_src = FIB_RES_PREFSRC(res); -@@ -2572,6 +2609,7 @@ +@@ -2563,6 +2600,7 @@ rth->fl.fl4_src == flp->fl4_src && rth->fl.iif == 0 && rth->fl.oif == flp->oif && @@ -1257,7 +1231,7 @@ diff -ur v2.6.14/linux/net/ipv4/route.c linux/net/ipv4/route.c #ifdef CONFIG_IP_ROUTE_FWMARK rth->fl.fl4_fwmark == flp->fl4_fwmark && #endif -@@ -3211,3 +3249,4 @@ +@@ -3199,3 +3237,4 @@ EXPORT_SYMBOL(__ip_select_ident); EXPORT_SYMBOL(ip_route_input); EXPORT_SYMBOL(ip_route_output_key); From 6b99e5608cb05a812b361304552172cff6d03672 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 17:09:40 +0000 Subject: [PATCH 210/757] remove ipkg directory, normalize Makefile. SVN-Revision: 3989 --- openwrt/package/alsa/Makefile | 27 ++++++++++----------- openwrt/package/alsa/ipkg/kmod-alsa.control | 5 ---- 2 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 openwrt/package/alsa/ipkg/kmod-alsa.control diff --git a/openwrt/package/alsa/Makefile b/openwrt/package/alsa/Makefile index 5703db1905b..b1b9997c199 100644 --- a/openwrt/package/alsa/Makefile +++ b/openwrt/package/alsa/Makefile @@ -8,12 +8,11 @@ PKG_VERSION:=1.0.11 PKG_RELEASE:=1 PKG_MD5SUM:=57534e4297cd683371402220e3753885 +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_CAT:=bzcat -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - include $(TOPDIR)/package/rules.mk ifeq ($(LINUX_KARCH),i386) @@ -25,6 +24,16 @@ KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic KERNEL_C_OPTS:= -Os -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap endif +define Package/kmod-alsa +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@PCI_SUPPORT +TITLE:=Advanced Linux Sound Architecture +DESCRIPTION:=Advanced Linux Sound Architecture +URL:=http://alsa-project.org/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef + define Build/Configure (cd $(PKG_BUILD_DIR); \ CFLAGS="$(KERNEL_C_INCS)" \ @@ -49,22 +58,12 @@ define Build/Compile all endef -define Package/kmod-alsa - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@PCI_SUPPORT - TITLE:=Advanced Linux Sound Architecture - DESCRIPTION:=Advanced Linux Sound Architecture - URL:=http://alsa-project.org/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) -endef - define Package/kmod-alsa/install - install -d -m0755 $(1)/etc/modules.d - install -m0644 ./files/alsa.modules $(1)/etc/modules.d/70-alsa install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) install -m0644 $(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ + install -d -m0755 $(1)/etc/modules.d + install -m0644 ./files/alsa.modules $(1)/etc/modules.d/70-alsa endef $(eval $(call BuildPackage,kmod-alsa)) diff --git a/openwrt/package/alsa/ipkg/kmod-alsa.control b/openwrt/package/alsa/ipkg/kmod-alsa.control deleted file mode 100644 index 5641785d84e..00000000000 --- a/openwrt/package/alsa/ipkg/kmod-alsa.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: kmod-alsa -Priority: optional -Section: sys -Depends: kmod-usb-audio -Description: Alsa Drivers for USB Soundcards From eabd154f5157561c6a636c28fb991a3a4ce55cf0 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 17:46:02 +0000 Subject: [PATCH 211/757] remove ipkg directory, normalize Makefile. SVN-Revision: 3990 --- openwrt/package/openssl/Config.in | 35 ---------------- openwrt/package/openssl/Makefile | 42 +++++++++---------- .../package/openssl/ipkg/libopenssl.control | 4 -- .../openssl/ipkg/openssl-util.conffiles | 1 - .../package/openssl/ipkg/openssl-util.control | 5 --- 5 files changed, 21 insertions(+), 66 deletions(-) delete mode 100644 openwrt/package/openssl/Config.in delete mode 100644 openwrt/package/openssl/ipkg/libopenssl.control delete mode 100644 openwrt/package/openssl/ipkg/openssl-util.conffiles delete mode 100644 openwrt/package/openssl/ipkg/openssl-util.control diff --git a/openwrt/package/openssl/Config.in b/openwrt/package/openssl/Config.in deleted file mode 100644 index e852c9f0f47..00000000000 --- a/openwrt/package/openssl/Config.in +++ /dev/null @@ -1,35 +0,0 @@ -config BR2_COMPILE_OPENSSL - tristate - default n - depends BR2_PACKAGE_LIBOPENSSL - -config BR2_PACKAGE_LIBOPENSSL - prompt "libopenssl........................ Open source SSL (Secure Socket Layer) libraries" - tristate - default m if CONFIG_DEVEL - select BR2_COMPILE_OPENSSL - help - The OpenSSL Project is a collaborative effort to develop a robust, - commercial-grade, full-featured, and Open Source toolkit implementing - the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) - protocols as well as a full-strength general purpose cryptography library. - - http://www.openssl.org/ - - This package contains the shared SSL libraries, needed by other programs. - -config BR2_PACKAGE_OPENSSL_UTIL - prompt "openssl-util.................... OpenSSL command line tool" - tristate - default m if CONFIG_DEVEL - depends BR2_PACKAGE_LIBOPENSSL - help - The OpenSSL Project is a collaborative effort to develop a robust, - commercial-grade, full-featured, and Open Source toolkit implementing - the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) - protocols as well as a full-strength general purpose cryptography library. - - http://www.openssl.org/ - - This package contains the multi-purpose OpenSSL binary tool. - diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile index 45b248fbf3f..82f20d6b0dd 100644 --- a/openwrt/package/openssl/Makefile +++ b/openwrt/package/openssl/Makefile @@ -22,6 +22,26 @@ OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dyna include $(TOPDIR)/package/rules.mk +define Package/libopenssl +SECTION:=base +CATEGORY:=Libraries +TITLE:=Open source SSL libraries +DEPENDS:=+zlib +DESCRIPTION:=Open source SSL (Secure Socket Layer) libraries +URL:=http://www.openssl.org/ +endef + +define Package/openssl-util +$(call Package/libopenssl) +DEPENDS:=libopenssl +TITLE:=OpenSSL command line utilities +DESCRIPTION:=OpenSSL command line utilities +endef + +define Package/openssl-util/conffiles +/etc/ssl/openssl.cnf +endef + define Build/Configure $(SED) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' $(PKG_BUILD_DIR)/Configure $(SED) s/OPENWRT_OPTIMIZATION_FLAGS/$(BR2_TARGET_OPTIMIZATION)/g $(PKG_BUILD_DIR)/Configure @@ -68,29 +88,10 @@ define Build/InstallDev endef define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/openssl \ + rm -rf $(STAGING_DIR)/usr/include/openssl \ $(STAGING_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} endef - -define Package/libopenssl - SECTION:=base - CATEGORY:=Libraries - TITLE:=Open source SSL libraries - DEPENDS:=+zlib - DESCRIPTION:=Open source SSL (Secure Socket Layer) libraries - URL:=http://www.openssl.org/ -endef - -define Package/openssl-util - $(call Package/libopenssl) - DEPENDS:=libopenssl - TITLE:=OpenSSL command line utilities - DESCRIPTION:=OpenSSL command line utilities -endef - - define Package/libopenssl/install install -d -m0755 $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.so.* $(1)/usr/lib/ @@ -107,6 +108,5 @@ define Package/openssl-util/install $(CP) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/ endef - $(eval $(call BuildPackage,libopenssl)) $(eval $(call BuildPackage,openssl-util)) diff --git a/openwrt/package/openssl/ipkg/libopenssl.control b/openwrt/package/openssl/ipkg/libopenssl.control deleted file mode 100644 index 9cf48a804f2..00000000000 --- a/openwrt/package/openssl/ipkg/libopenssl.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: libopenssl -Priority: optional -Section: libs -Description: OpenSSL (Secure Socket Layer) libraries diff --git a/openwrt/package/openssl/ipkg/openssl-util.conffiles b/openwrt/package/openssl/ipkg/openssl-util.conffiles deleted file mode 100644 index 6d068e66c4a..00000000000 --- a/openwrt/package/openssl/ipkg/openssl-util.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ssl/openssl.cnf diff --git a/openwrt/package/openssl/ipkg/openssl-util.control b/openwrt/package/openssl/ipkg/openssl-util.control deleted file mode 100644 index 4c14ab1aae6..00000000000 --- a/openwrt/package/openssl/ipkg/openssl-util.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openssl-util -Priority: optionnal -Section: admin -Description: OpenSSL (Secure Socket Layer) command line tool -Depends: libopenssl From a48288c6a4961f4ed1327b47d730c858fb5d6838 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 18:03:31 +0000 Subject: [PATCH 212/757] move source file to src/. SVN-Revision: 3991 --- openwrt/package/mtd/Makefile | 15 +++++++++++---- openwrt/package/mtd/src/Makefile | 12 ++++++++++++ openwrt/package/mtd/{ => src}/mtd.c | 0 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 openwrt/package/mtd/src/Makefile rename openwrt/package/mtd/{ => src}/mtd.c (100%) diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index fdb43eee15d..f6e94303af8 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk -PKG_NAME := mtd -PKG_RELEASE := 4 +PKG_NAME:=mtd +PKG_RELEASE:=4 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) @@ -18,13 +18,20 @@ DESCRIPTION:=Update utility for trx firmware images. To update \\\ from other firmware or older OpenWrt releases. endef +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/mtd mtd.c + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + all endef define Package/mtd/install install -d -m0755 $(1)/sbin - install -m0755 $(PKG_BUILD_DIR)/mtd $(1)/sbin + install -m0755 $(PKG_BUILD_DIR)/mtd $(1)/sbin/ endef $(eval $(call BuildPackage,mtd)) diff --git a/openwrt/package/mtd/src/Makefile b/openwrt/package/mtd/src/Makefile new file mode 100644 index 00000000000..b9f256ad0cc --- /dev/null +++ b/openwrt/package/mtd/src/Makefile @@ -0,0 +1,12 @@ +# $Id$ + +all: mtd + +%.o: %.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $^ + +mtd: mtd.o + $(CC) -o $@ $^ + +clean: + rm -f *.o mtd diff --git a/openwrt/package/mtd/mtd.c b/openwrt/package/mtd/src/mtd.c similarity index 100% rename from openwrt/package/mtd/mtd.c rename to openwrt/package/mtd/src/mtd.c From e5c5a14618e03b343d76315a2bd2edf6abe6056e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 18:04:42 +0000 Subject: [PATCH 213/757] add wlc utility SVN-Revision: 3992 --- openwrt/package/wlc/Makefile | 40 + openwrt/package/wlc/src/Makefile | 9 + openwrt/package/wlc/src/include/bcmdefs.h | 106 ++ openwrt/package/wlc/src/include/bcmutils.h | 258 +++ .../package/wlc/src/include/proto/802.11.h | 1258 +++++++++++++++ .../package/wlc/src/include/proto/bcmeth.h | 101 ++ .../package/wlc/src/include/proto/bcmevent.h | 152 ++ .../package/wlc/src/include/proto/ethernet.h | 165 ++ openwrt/package/wlc/src/include/proto/wpa.h | 148 ++ openwrt/package/wlc/src/include/typedefs.h | 230 +++ openwrt/package/wlc/src/include/wlioctl.h | 1384 +++++++++++++++++ openwrt/package/wlc/src/include/wlutils.h | 102 ++ openwrt/package/wlc/src/ioctl.c | 298 ++++ openwrt/package/wlc/src/wlc.c | 1138 ++++++++++++++ 14 files changed, 5389 insertions(+) create mode 100644 openwrt/package/wlc/Makefile create mode 100644 openwrt/package/wlc/src/Makefile create mode 100644 openwrt/package/wlc/src/include/bcmdefs.h create mode 100644 openwrt/package/wlc/src/include/bcmutils.h create mode 100644 openwrt/package/wlc/src/include/proto/802.11.h create mode 100644 openwrt/package/wlc/src/include/proto/bcmeth.h create mode 100644 openwrt/package/wlc/src/include/proto/bcmevent.h create mode 100644 openwrt/package/wlc/src/include/proto/ethernet.h create mode 100644 openwrt/package/wlc/src/include/proto/wpa.h create mode 100644 openwrt/package/wlc/src/include/typedefs.h create mode 100644 openwrt/package/wlc/src/include/wlioctl.h create mode 100644 openwrt/package/wlc/src/include/wlutils.h create mode 100644 openwrt/package/wlc/src/ioctl.c create mode 100644 openwrt/package/wlc/src/wlc.c diff --git a/openwrt/package/wlc/Makefile b/openwrt/package/wlc/Makefile new file mode 100644 index 00000000000..e40fcd8d15f --- /dev/null +++ b/openwrt/package/wlc/Makefile @@ -0,0 +1,40 @@ +# $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wlc +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/wlc + +include $(TOPDIR)/package/rules.mk + +define Package/wlc +SECTION:=base +CATEGORY:=Base system +DEPENDS:=@PACKAGE_KMOD_BRCM_WL +DEFAULT:=y +TITLE:=Utility for configuring the Broadcom wl driver +DESCRIPTION:=Utility for configuring the Broadcom wl driver +endef + + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)\ + $(TARGET_CONFIGURE_OPTS) \ + CC="$(TARGET_CC)" \ + CFLAGS="-I$(PKG_BUILD_DIR)/include $(TARGET_CFLAGS)" \ + all +endef + +define Package/wlc/install + install -d -m0755 $(1)/sbin + install -m0755 $(PKG_BUILD_DIR)/wlc $(1)/sbin/ +endef + +$(eval $(call BuildPackage,wlc)) diff --git a/openwrt/package/wlc/src/Makefile b/openwrt/package/wlc/src/Makefile new file mode 100644 index 00000000000..ffe16495158 --- /dev/null +++ b/openwrt/package/wlc/src/Makefile @@ -0,0 +1,9 @@ +all: wlc +clean: + rm -f *.o wlc + +wlc: wlc.o ioctl.o +%.o: %.c + $(CC) $(CFLAGS) -Wall -c -o $@ $< + +.PHONY: all clean diff --git a/openwrt/package/wlc/src/include/bcmdefs.h b/openwrt/package/wlc/src/include/bcmdefs.h new file mode 100644 index 00000000000..8b5abe5d26e --- /dev/null +++ b/openwrt/package/wlc/src/include/bcmdefs.h @@ -0,0 +1,106 @@ +/* + * Misc system wide definitions + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id: bcmdefs.h,v 1.1.1.3 2006/04/08 06:13:39 honor Exp $ + */ + +#ifndef _bcmdefs_h_ +#define _bcmdefs_h_ + +/* + * One doesn't need to include this file explicitly, gets included automatically if + * typedefs.h is included. + */ + +/* Reclaiming text and data : + * The following macros specify special linker sections that can be reclaimed + * after a system is considered 'up'. + */ +#if defined(__GNUC__) && defined(BCMRECLAIM) +extern bool bcmreclaimed; +#define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data +#define BCMINITFN(_fn) __attribute__ ((__section__ (".textini." #_fn))) _fn +#else /* #if defined(__GNUC__) && defined(BCMRECLAIM) */ +#define BCMINITDATA(_data) _data +#define BCMINITFN(_fn) _fn +#define bcmreclaimed 0 +#endif /* #if defined(__GNUC__) && defined(BCMRECLAIM) */ + +/* Reclaim uninit functions if BCMNODOWN is defined */ +/* and if they are not already removed by -gc-sections */ +#ifdef BCMNODOWN +#define BCMUNINITFN(_fn) BCMINITFN(_fn) +#else +#define BCMUNINITFN(_fn) _fn +#endif + +#ifdef BCMRECLAIM +#define CONST +#else +#define CONST const +#endif /* BCMRECLAIM */ + +/* Compatibility with old-style BCMRECLAIM */ +#define BCMINIT(_id) _id + + +/* Put some library data/code into ROM to reduce RAM requirements */ +#if defined(__GNUC__) && defined(BCMROMOFFLOAD) +#define BCMROMDATA(_data) __attribute__ ((__section__ (".datarom." #_data))) _data +#define BCMROMFN(_fn) __attribute__ ((__section__ (".textrom." #_fn))) _fn +#else +#define BCMROMDATA(_data) _data +#define BCMROMFN(_fn) _fn +#endif + +/* Bus types */ +#define SB_BUS 0 /* Silicon Backplane */ +#define PCI_BUS 1 /* PCI target */ +#define PCMCIA_BUS 2 /* PCMCIA target */ +#define SDIO_BUS 3 /* SDIO target */ +#define JTAG_BUS 4 /* JTAG */ +#define NO_BUS 0xFF /* Bus that does not support R/W REG */ + +/* Allows optimization for single-bus support */ +#ifdef BCMBUSTYPE +#define BUSTYPE(bus) (BCMBUSTYPE) +#else +#define BUSTYPE(bus) (bus) +#endif + +/* Defines for DMA Address Width - Shared between OSL and HNDDMA */ +#define DMADDR_MASK_32 0x0 /* Address mask for 32-bits */ +#define DMADDR_MASK_30 0xc0000000 /* Address mask for 30-bits */ +#define DMADDR_MASK_0 0xffffffff /* Address mask for 0-bits (hi-part) */ + +#define DMADDRWIDTH_30 30 /* 30-bit addressing capability */ +#define DMADDRWIDTH_32 32 /* 32-bit addressing capability */ +#define DMADDRWIDTH_63 63 /* 64-bit addressing capability */ +#define DMADDRWIDTH_64 64 /* 64-bit addressing capability */ + +/* packet headroom necessary to accomodate the largest header in the system, (i.e TXOFF). + * By doing, we avoid the need to allocate an extra buffer for the header when bridging to WL. + * There is a compile time check in wlc.c which ensure that this value is at least as big + * as TXOFF. This value is used in dma_rxfill (hnddma.c). + */ +#define BCMEXTRAHDROOM 160 + +/* Headroom required for dongle-to-host communication. Packets allocated + * locally in the dongle (e.g. for CDC ioctls or RNDIS messages) should + * leave this much room in front for low-level message headers which may + * be needed to get across the dongle bus to the host. (These messages + * don't go over the network, so room for the full WL header above would + * be a waste.) + */ +#define BCMDONGLEHDRSZ 8 + + + +#endif /* _bcmdefs_h_ */ diff --git a/openwrt/package/wlc/src/include/bcmutils.h b/openwrt/package/wlc/src/include/bcmutils.h new file mode 100644 index 00000000000..b6e7b0542b1 --- /dev/null +++ b/openwrt/package/wlc/src/include/bcmutils.h @@ -0,0 +1,258 @@ +/* + * Misc useful os-independent macros and functions. + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id: bcmutils.h,v 1.1.1.16 2006/04/08 06:13:39 honor Exp $ + */ + +#ifndef _bcmutils_h_ +#define _bcmutils_h_ + +/* ** driver/apps-shared section ** */ + +#define BCME_STRLEN 64 /* Max string length for BCM errors */ +#define VALID_BCMERROR(e) ((e <= 0) && (e >= BCME_LAST)) + + +/* + * error codes could be added but the defined ones shouldn't be changed/deleted + * these error codes are exposed to the user code + * when ever a new error code is added to this list + * please update errorstring table with the related error string and + * update osl files with os specific errorcode map +*/ + +#define BCME_OK 0 /* Success */ +#define BCME_ERROR -1 /* Error generic */ +#define BCME_BADARG -2 /* Bad Argument */ +#define BCME_BADOPTION -3 /* Bad option */ +#define BCME_NOTUP -4 /* Not up */ +#define BCME_NOTDOWN -5 /* Not down */ +#define BCME_NOTAP -6 /* Not AP */ +#define BCME_NOTSTA -7 /* Not STA */ +#define BCME_BADKEYIDX -8 /* BAD Key Index */ +#define BCME_RADIOOFF -9 /* Radio Off */ +#define BCME_NOTBANDLOCKED -10 /* Not band locked */ +#define BCME_NOCLK -11 /* No Clock */ +#define BCME_BADRATESET -12 /* BAD Rate valueset */ +#define BCME_BADBAND -13 /* BAD Band */ +#define BCME_BUFTOOSHORT -14 /* Buffer too short */ +#define BCME_BUFTOOLONG -15 /* Buffer too long */ +#define BCME_BUSY -16 /* Busy */ +#define BCME_NOTASSOCIATED -17 /* Not Associated */ +#define BCME_BADSSIDLEN -18 /* Bad SSID len */ +#define BCME_OUTOFRANGECHAN -19 /* Out of Range Channel */ +#define BCME_BADCHAN -20 /* Bad Channel */ +#define BCME_BADADDR -21 /* Bad Address */ +#define BCME_NORESOURCE -22 /* Not Enough Resources */ +#define BCME_UNSUPPORTED -23 /* Unsupported */ +#define BCME_BADLEN -24 /* Bad length */ +#define BCME_NOTREADY -25 /* Not Ready */ +#define BCME_EPERM -26 /* Not Permitted */ +#define BCME_NOMEM -27 /* No Memory */ +#define BCME_ASSOCIATED -28 /* Associated */ +#define BCME_RANGE -29 /* Not In Range */ +#define BCME_NOTFOUND -30 /* Not Found */ +#define BCME_WME_NOT_ENABLED -31 /* WME Not Enabled */ +#define BCME_TSPEC_NOTFOUND -32 /* TSPEC Not Found */ +#define BCME_ACM_NOTSUPPORTED -33 /* ACM Not Supported */ +#define BCME_NOT_WME_ASSOCIATION -34 /* Not WME Association */ +#define BCME_SDIO_ERROR -35 /* SDIO Bus Error */ +#define BCME_DONGLE_DOWN -36 /* Dongle Not Accessible */ +#define BCME_LAST BCME_DONGLE_DOWN + +/* These are collection of BCME Error strings */ +#define BCMERRSTRINGTABLE { \ + "OK", \ + "Undefined error", \ + "Bad Argument", \ + "Bad Option", \ + "Not up", \ + "Not down", \ + "Not AP", \ + "Not STA", \ + "Bad Key Index", \ + "Radio Off", \ + "Not band locked", \ + "No clock", \ + "Bad Rate valueset", \ + "Bad Band", \ + "Buffer too short", \ + "Buffer too long", \ + "Busy", \ + "Not Associated", \ + "Bad SSID len", \ + "Out of Range Channel", \ + "Bad Channel", \ + "Bad Address", \ + "Not Enough Resources", \ + "Unsupported", \ + "Bad length", \ + "Not Ready", \ + "Not Permitted", \ + "No Memory", \ + "Associated", \ + "Not In Range", \ + "Not Found", \ + "WME Not Enabled", \ + "TSPEC Not Found", \ + "ACM Not Supported", \ + "Not WME Association", \ + "SDIO Bus Error", \ + "Dongle Not Accessible" \ +} + +#ifndef ABS +#define ABS(a) (((a) < 0)?-(a):(a)) +#endif /* ABS */ + +#ifndef MIN +#define MIN(a, b) (((a) < (b))?(a):(b)) +#endif /* MIN */ + +#ifndef MAX +#define MAX(a, b) (((a) > (b))?(a):(b)) +#endif /* MAX */ + +#define CEIL(x, y) (((x) + ((y)-1)) / (y)) +#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) +#define ISALIGNED(a, x) (((a) & ((x)-1)) == 0) +#define ISPOWEROF2(x) ((((x)-1)&(x)) == 0) +#define VALID_MASK(mask) !((mask) & ((mask) + 1)) +#define OFFSETOF(type, member) ((uint)(uintptr)&((type *)0)->member) +#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) + +/* bit map related macros */ +#ifndef setbit +#ifndef NBBY /* the BSD family defines NBBY */ +#define NBBY 8 /* 8 bits per byte */ +#endif /* #ifndef NBBY */ +#define setbit(a, i) (((uint8 *)a)[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a, i) (((uint8 *)a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a, i) (((uint8 *)a)[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a, i) ((((uint8 *)a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) +#endif /* setbit */ + +#define NBITS(type) (sizeof(type) * 8) +#define NBITVAL(nbits) (1 << (nbits)) +#define MAXBITVAL(nbits) ((1 << (nbits)) - 1) +#define NBITMASK(nbits) MAXBITVAL(nbits) +#define MAXNBVAL(nbyte) MAXBITVAL((nbyte) * 8) + +/* basic mux operation - can be optimized on several architectures */ +#define MUX(pred, true, false) ((pred) ? (true) : (false)) + +/* modulo inc/dec - assumes x E [0, bound - 1] */ +#define MODDEC(x, bound) MUX((x) == 0, (bound) - 1, (x) - 1) +#define MODINC(x, bound) MUX((x) == (bound) - 1, 0, (x) + 1) + +/* modulo inc/dec, bound = 2^k */ +#define MODDEC_POW2(x, bound) (((x) - 1) & ((bound) - 1)) +#define MODINC_POW2(x, bound) (((x) + 1) & ((bound) - 1)) + +/* modulo add/sub - assumes x, y E [0, bound - 1] */ +#define MODADD(x, y, bound) \ + MUX((x) + (y) >= (bound), (x) + (y) - (bound), (x) + (y)) +#define MODSUB(x, y, bound) \ + MUX(((int)(x)) - ((int)(y)) < 0, (x) - (y) + (bound), (x) - (y)) + +/* module add/sub, bound = 2^k */ +#define MODADD_POW2(x, y, bound) (((x) + (y)) & ((bound) - 1)) +#define MODSUB_POW2(x, y, bound) (((x) - (y)) & ((bound) - 1)) + +/* crc defines */ +#define CRC8_INIT_VALUE 0xff /* Initial CRC8 checksum value */ +#define CRC8_GOOD_VALUE 0x9f /* Good final CRC8 checksum value */ +#define CRC16_INIT_VALUE 0xffff /* Initial CRC16 checksum value */ +#define CRC16_GOOD_VALUE 0xf0b8 /* Good final CRC16 checksum value */ +#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ +#define CRC32_GOOD_VALUE 0xdebb20e3 /* Good final CRC32 checksum value */ + +/* bcm_format_flags() bit description structure */ +typedef struct bcm_bit_desc { + uint32 bit; + char* name; +} bcm_bit_desc_t; + +/* tag_ID/length/value_buffer tuple */ +typedef struct bcm_tlv { + uint8 id; + uint8 len; + uint8 data[1]; +} bcm_tlv_t; + +/* Check that bcm_tlv_t fits into the given buflen */ +#define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (int)(buflen) >= (int)(2 + (elt)->len)) + +/* buffer length for ethernet address from bcm_ether_ntoa() */ +#define ETHER_ADDR_STR_LEN 18 /* 18-bytes of Ethernet address buffer length */ + +/* unaligned load and store macros */ +#ifdef IL_BIGENDIAN +static INLINE uint32 +load32_ua(uint8 *a) +{ + return ((a[0] << 24) | (a[1] << 16) | (a[2] << 8) | a[3]); +} + +static INLINE void +store32_ua(uint8 *a, uint32 v) +{ + a[0] = (v >> 24) & 0xff; + a[1] = (v >> 16) & 0xff; + a[2] = (v >> 8) & 0xff; + a[3] = v & 0xff; +} + +static INLINE uint16 +load16_ua(uint8 *a) +{ + return ((a[0] << 8) | a[1]); +} + +static INLINE void +store16_ua(uint8 *a, uint16 v) +{ + a[0] = (v >> 8) & 0xff; + a[1] = v & 0xff; +} + +#else + +static INLINE uint32 +load32_ua(uint8 *a) +{ + return ((a[3] << 24) | (a[2] << 16) | (a[1] << 8) | a[0]); +} + +static INLINE void +store32_ua(uint8 *a, uint32 v) +{ + a[3] = (v >> 24) & 0xff; + a[2] = (v >> 16) & 0xff; + a[1] = (v >> 8) & 0xff; + a[0] = v & 0xff; +} + +static INLINE uint16 +load16_ua(uint8 *a) +{ + return ((a[1] << 8) | a[0]); +} + +static INLINE void +store16_ua(uint8 *a, uint16 v) +{ + a[1] = (v >> 8) & 0xff; + a[0] = v & 0xff; +} + +#endif /* IL_BIGENDIAN */ + +#endif /* _bcmutils_h_ */ diff --git a/openwrt/package/wlc/src/include/proto/802.11.h b/openwrt/package/wlc/src/include/proto/802.11.h new file mode 100644 index 00000000000..2b1c4ee111c --- /dev/null +++ b/openwrt/package/wlc/src/include/proto/802.11.h @@ -0,0 +1,1258 @@ +/* + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * Fundamental types and constants relating to 802.11 + * + * $Id: 802.11.h,v 1.1.1.17 2006/04/15 01:29:08 michael Exp $ + */ + +#ifndef _802_11_H_ +#define _802_11_H_ + +#ifndef _TYPEDEFS_H_ +#include <typedefs.h> +#endif + +#ifndef _NET_ETHERNET_H_ +#include <proto/ethernet.h> +#endif + +#include <proto/wpa.h> + +/* enable structure packing */ +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#pragma pack(1) +#define PACKED +#endif + +#define DOT11_TU_TO_US 1024 /* 802.11 Time Unit is 1024 microseconds */ + +/* Generic 802.11 frame constants */ +#define DOT11_A3_HDR_LEN 24 /* d11 header length with A3 */ +#define DOT11_A4_HDR_LEN 30 /* d11 header length with A4 */ +#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN /* MAC header length */ +#define DOT11_FCS_LEN 4 /* d11 FCS length */ +#define DOT11_ICV_LEN 4 /* d11 ICV length */ +#define DOT11_ICV_AES_LEN 8 /* d11 ICV/AES length */ +#define DOT11_QOS_LEN 2 /* d11 QoS length */ +#define DOT11_HTC_LEN 4 /* d11 HT Control field length */ + +#define DOT11_KEY_INDEX_SHIFT 6 /* d11 key index shift */ +#define DOT11_IV_LEN 4 /* d11 IV length */ +#define DOT11_IV_TKIP_LEN 8 /* d11 IV TKIP length */ +#define DOT11_IV_AES_OCB_LEN 4 /* d11 IV/AES/OCB length */ +#define DOT11_IV_AES_CCM_LEN 8 /* d11 IV/AES/CCM length */ +#define DOT11_IV_MAX_LEN 8 /* maximum iv len for any encryption */ + +/* Includes MIC */ +#define DOT11_MAX_MPDU_BODY_LEN 2304 /* max MPDU body length */ +/* A4 header + QoS + CCMP + PDU + ICV + FCS = 2352 */ +#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \ + DOT11_QOS_LEN + \ + DOT11_IV_AES_CCM_LEN + \ + DOT11_MAX_MPDU_BODY_LEN + \ + DOT11_ICV_LEN + \ + DOT11_FCS_LEN) /* d11 max MPDU length */ + +#define DOT11_MAX_SSID_LEN 32 /* d11 max ssid length */ + +/* dot11RTSThreshold */ +#define DOT11_DEFAULT_RTS_LEN 2347 /* d11 default RTS length */ +#define DOT11_MAX_RTS_LEN 2347 /* d11 max RTS length */ + +/* dot11FragmentationThreshold */ +#define DOT11_MIN_FRAG_LEN 256 /* d11 min fragmentation length */ +#define DOT11_MAX_FRAG_LEN 2346 /* Max frag is also limited by aMPDUMaxLength + * of the attached PHY + */ +#define DOT11_DEFAULT_FRAG_LEN 2346 /* d11 default fragmentation length */ + +/* dot11BeaconPeriod */ +#define DOT11_MIN_BEACON_PERIOD 1 /* d11 min beacon period */ +#define DOT11_MAX_BEACON_PERIOD 0xFFFF /* d11 max beacon period */ + +/* dot11DTIMPeriod */ +#define DOT11_MIN_DTIM_PERIOD 1 /* d11 min DTIM period */ +#define DOT11_MAX_DTIM_PERIOD 0xFF /* d11 max DTIM period */ + +/* 802.2 LLC/SNAP header used by 802.11 per 802.1H */ +#define DOT11_LLC_SNAP_HDR_LEN 8 /* d11 LLC/SNAP header length */ +#define DOT11_OUI_LEN 3 /* d11 OUI length */ +struct dot11_llc_snap_header { + uint8 dsap; /* always 0xAA */ + uint8 ssap; /* always 0xAA */ + uint8 ctl; /* always 0x03 */ + uint8 oui[DOT11_OUI_LEN]; /* RFC1042: 0x00 0x00 0x00 + * Bridge-Tunnel: 0x00 0x00 0xF8 + */ + uint16 type; /* ethertype */ +} PACKED; + +/* RFC1042 header used by 802.11 per 802.1H */ +#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN) /* RCF1042 header length */ + +/* Generic 802.11 MAC header */ +/* + * N.B.: This struct reflects the full 4 address 802.11 MAC header. + * The fields are defined such that the shorter 1, 2, and 3 + * address headers just use the first k fields. + */ +struct dot11_header { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr a1; /* address 1 */ + struct ether_addr a2; /* address 2 */ + struct ether_addr a3; /* address 3 */ + uint16 seq; /* sequence control */ + struct ether_addr a4; /* address 4 */ +} PACKED; + +/* Control frames */ + +struct dot11_rts_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ + struct ether_addr ta; /* transmitter address */ +} PACKED; +#define DOT11_RTS_LEN 16 /* d11 RTS frame length */ + +struct dot11_cts_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ +} PACKED; +#define DOT11_CTS_LEN 10 /* d11 CTS frame length */ + +struct dot11_ack_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ +} PACKED; +#define DOT11_ACK_LEN 10 /* d11 ACK frame length */ + +struct dot11_ps_poll_frame { + uint16 fc; /* frame control */ + uint16 durid; /* AID */ + struct ether_addr bssid; /* receiver address, STA in AP */ + struct ether_addr ta; /* transmitter address */ +} PACKED; +#define DOT11_PS_POLL_LEN 16 /* d11 PS poll frame length */ + +struct dot11_cf_end_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ + struct ether_addr bssid; /* transmitter address, STA in AP */ +} PACKED; +#define DOT11_CS_END_LEN 16 /* d11 CF-END frame length */ + +/* BA/BAR Control parameters */ +#define DOT11_BA_CTL_POLICY_NORMAL 0x0000 /* normal ack */ +#define DOT11_BA_CTL_POLICY_NOACK 0x0001 /* no ack */ +#define DOT11_BA_CTL_POLICY_MASK 0x0001 /* ack policy mask */ + +#define DOT11_BA_CTL_MTID 0x0002 /* multi tid BA */ +#define DOT11_BA_CTL_COMPRESSED 0x0004 /* compressed bitmap */ + +#define DOT11_BA_CTL_NUMMSDU_MASK 0x0FC0 /* num msdu in bitmap mask */ +#define DOT11_BA_CTL_NUMMSDU_SHIFT 6 /* num msdu in bitmap shift */ + +#define DOT11_BA_CTL_TID_MASK 0xF000 /* tid mask */ +#define DOT11_BA_CTL_TID_SHIFT 12 /* tid shift */ + +struct dot11_ba_req_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ + struct ether_addr ta; /* transmitter address */ + uint16 bar_control; /* BAR Control */ + uint16 seqnum; /* Starting Sequence control */ +} PACKED; +#define DOT11_BA_REQ_LEN 20 /* BAR frame length */ + +#define DOT11_BA_BITMAP_LEN 128 /* bitmap length */ +#define DOT11_BA_CMP_BITMAP_LEN 8 /* compressed bitmap length */ +struct dot11_ba_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ + struct ether_addr ta; /* transmitter address */ + uint16 ba_control; /* BA Control */ + uint16 seqnum; /* Starting Sequence control */ + uint8 bitmap[DOT11_BA_BITMAP_LEN]; /* Block Ack Bitmap */ +} PACKED; +#define DOT11_BA_LEN 20 /* BA frame length (without bitmap) */ + +/* Management frame header */ +struct dot11_management_header { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr da; /* receiver address */ + struct ether_addr sa; /* transmitter address */ + struct ether_addr bssid; /* BSS ID */ + uint16 seq; /* sequence control */ +} PACKED; +#define DOT11_MGMT_HDR_LEN 24 /* d11 management header length */ + +/* Management frame payloads */ + +struct dot11_bcn_prb { + uint32 timestamp[2]; + uint16 beacon_interval; + uint16 capability; +} PACKED; +#define DOT11_BCN_PRB_LEN 12 /* d11 beacon probe frame length */ + +struct dot11_auth { + uint16 alg; /* algorithm */ + uint16 seq; /* sequence control */ + uint16 status; /* status code */ +} PACKED; +#define DOT11_AUTH_FIXED_LEN 6 /* length of auth frame without challenge info + * elt + */ + +struct dot11_assoc_req { + uint16 capability; /* capability information */ + uint16 listen; /* listen interval */ +} PACKED; +#define DOT11_ASSOC_REQ_FIXED_LEN 4 /* length of assoc frame without info elts */ + +struct dot11_reassoc_req { + uint16 capability; /* capability information */ + uint16 listen; /* listen interval */ + struct ether_addr ap; /* Current AP address */ +} PACKED; +#define DOT11_REASSOC_REQ_FIXED_LEN 10 /* length of assoc frame without info elts */ + +struct dot11_assoc_resp { + uint16 capability; /* capability information */ + uint16 status; /* status code */ + uint16 aid; /* association ID */ +} PACKED; + +struct dot11_action_measure { + uint8 category; + uint8 action; + uint8 token; + uint8 data[1]; +} PACKED; +#define DOT11_ACTION_MEASURE_LEN 3 /* d11 action measurement header length */ + +struct dot11_action_switch_channel { + uint8 category; + uint8 action; + uint8 data[5]; /* for switch IE */ +} PACKED; + +struct dot11_action_ht_ch_width { + uint8 category; + uint8 action; + uint8 ch_width; +} PACKED; + +struct dot11_action_ht_mimops { + uint8 category; + uint8 action; + uint8 enable; + uint8 psmode; +} PACKED; + +/* ************* 802.11h related definitions. ************* */ +typedef struct { + uint8 id; + uint8 len; + uint8 power; +} dot11_power_cnst_t; + +typedef struct { + uint8 min; + uint8 max; +} dot11_power_cap_t; + +typedef struct { + uint8 id; + uint8 len; + uint8 tx_pwr; + uint8 margin; +} dot11_tpc_rep_t; +#define DOT11_MNG_IE_TPC_REPORT_LEN 2 /* length of IE data, not including 2 byte header */ + +typedef struct { + uint8 id; + uint8 len; + uint8 first_channel; + uint8 num_channels; +} dot11_supp_channels_t; + +/* channel switch announcement (CSA) mode type - 802.11h-2003 $7.3.2.20 */ +#define DOT11_CSA_MODE_ADVISORY 0 /* no DOT11_CSA_MODE_NO_TX restriction imposed */ +#define DOT11_CSA_MODE_NO_TX 1 /* no transmission upon receiving CSA frame. */ + +/* CSA IE data structure */ +struct dot11_channel_switch { + uint8 id; + uint8 len; + uint8 mode; + uint8 channel; + uint8 count; +} PACKED; +typedef struct dot11_channel_switch dot11_channel_switch_t; + +#define DOT11_SWITCH_IE_LEN 3 /* length of IE data, not including 2 byte header */ + +/* 802.11h Measurement Request/Report IEs */ +/* Measurement Type field */ +#define DOT11_MEASURE_TYPE_BASIC 0 /* d11 measurement basic type */ +#define DOT11_MEASURE_TYPE_CCA 1 /* d11 measurement CCA type */ +#define DOT11_MEASURE_TYPE_RPI 2 /* d11 measurement PRI type */ + +/* Measurement Mode field */ + +/* Measurement Request Modes */ +#define DOT11_MEASURE_MODE_ENABLE (1<<1) /* d11 measurement enable */ +#define DOT11_MEASURE_MODE_REQUEST (1<<2) /* d11 measurement request */ +#define DOT11_MEASURE_MODE_REPORT (1<<3) /* d11 measurement report */ +/* Measurement Report Modes */ +#define DOT11_MEASURE_MODE_LATE (1<<0) /* d11 measurement late */ +#define DOT11_MEASURE_MODE_INCAPABLE (1<<1) /* d11 measurement incapable */ +#define DOT11_MEASURE_MODE_REFUSED (1<<2) /* d11 measurement refuse */ +/* Basic Measurement Map bits */ +#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0)) /* d11 measurement basic map BSS */ +#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1)) /* d11 measurement map OFDM */ +#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2)) /* d11 measurement map unknown */ +#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3)) /* d11 measurement map radar */ +#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4)) /* d11 measurement map unmeasuremnt */ + +typedef struct { + uint8 id; + uint8 len; + uint8 token; + uint8 mode; + uint8 type; + uint8 channel; + uint8 start_time[8]; + uint16 duration; +} dot11_meas_req_t; +#define DOT11_MNG_IE_MREQ_LEN 14 /* d11 measurement request IE length */ +/* length of Measure Request IE data not including variable len */ +#define DOT11_MNG_IE_MREQ_FIXED_LEN 3 /* d11 measurement request IE fixed length */ + +struct dot11_meas_rep { + uint8 id; + uint8 len; + uint8 token; + uint8 mode; + uint8 type; + union + { + struct { + uint8 channel; + uint8 start_time[8]; + uint16 duration; + uint8 map; + } PACKED basic; + uint8 data[1]; + } PACKED rep; +} PACKED; +typedef struct dot11_meas_rep dot11_meas_rep_t; + +/* length of Measure Report IE data not including variable len */ +#define DOT11_MNG_IE_MREP_FIXED_LEN 3 /* d11 measurement response IE fixed length */ + +struct dot11_meas_rep_basic { + uint8 channel; + uint8 start_time[8]; + uint16 duration; + uint8 map; +} PACKED; +typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t; +#define DOT11_MEASURE_BASIC_REP_LEN 12 /* d11 measurement basic report length */ + +struct dot11_quiet { + uint8 id; + uint8 len; + uint8 count; /* TBTTs until beacon interval in quiet starts */ + uint8 period; /* Beacon intervals between periodic quiet periods ? */ + uint16 duration; /* Length of quiet period, in TU's */ + uint16 offset; /* TU's offset from TBTT in Count field */ +} PACKED; +typedef struct dot11_quiet dot11_quiet_t; + +typedef struct { + uint8 channel; + uint8 map; +} chan_map_tuple_t; + +typedef struct { + uint8 id; + uint8 len; + uint8 eaddr[ETHER_ADDR_LEN]; + uint8 interval; + chan_map_tuple_t map[1]; +} dot11_ibss_dfs_t; + +/* WME Elements */ +#define WME_OUI "\x00\x50\xf2" /* WME OUI */ +#define WME_VER 1 /* WME version */ +#define WME_TYPE 2 /* WME type */ +#define WME_SUBTYPE_IE 0 /* Information Element */ +#define WME_SUBTYPE_PARAM_IE 1 /* Parameter Element */ +#define WME_SUBTYPE_TSPEC 2 /* Traffic Specification */ + +/* WME Access Category Indices (ACIs) */ +#define AC_BE 0 /* Best Effort */ +#define AC_BK 1 /* Background */ +#define AC_VI 2 /* Video */ +#define AC_VO 3 /* Voice */ +#define AC_COUNT 4 /* number of ACs */ + +typedef uint8 ac_bitmap_t; /* AC bitmap of (1 << AC_xx) */ + +#define AC_BITMAP_NONE 0x0 /* No ACs */ +#define AC_BITMAP_ALL 0xf /* All ACs */ +#define AC_BITMAP_TST(ab, ac) (((ab) & (1 << (ac))) != 0) + +/* WME Information Element (IE) */ +struct wme_ie { + uint8 oui[3]; + uint8 type; + uint8 subtype; + uint8 version; + uint8 qosinfo; +} PACKED; +typedef struct wme_ie wme_ie_t; +#define WME_IE_LEN 7 /* WME IE length */ + +struct edcf_acparam { + uint8 ACI; + uint8 ECW; + uint16 TXOP; /* stored in network order (ls octet first) */ +} PACKED; +typedef struct edcf_acparam edcf_acparam_t; + +/* WME Parameter Element (PE) */ +struct wme_param_ie { + uint8 oui[3]; + uint8 type; + uint8 subtype; + uint8 version; + uint8 qosinfo; + uint8 rsvd; + edcf_acparam_t acparam[AC_COUNT]; +} PACKED; +typedef struct wme_param_ie wme_param_ie_t; +#define WME_PARAM_IE_LEN 24 /* WME Parameter IE length */ + +/* QoS Info field for IE as sent from AP */ +#define WME_QI_AP_APSD_MASK 0x80 /* U-APSD Supported mask */ +#define WME_QI_AP_APSD_SHIFT 7 /* U-APSD Supported shift */ +#define WME_QI_AP_COUNT_MASK 0x0f /* Parameter set count mask */ +#define WME_QI_AP_COUNT_SHIFT 0 /* Parameter set count shift */ + +/* QoS Info field for IE as sent from STA */ +#define WME_QI_STA_MAXSPLEN_MASK 0x60 /* Max Service Period Length mask */ +#define WME_QI_STA_MAXSPLEN_SHIFT 5 /* Max Service Period Length shift */ +#define WME_QI_STA_APSD_ALL_MASK 0xf /* APSD all AC bits mask */ +#define WME_QI_STA_APSD_ALL_SHIFT 0 /* APSD all AC bits shift */ +#define WME_QI_STA_APSD_BE_MASK 0x8 /* APSD AC_BE mask */ +#define WME_QI_STA_APSD_BE_SHIFT 3 /* APSD AC_BE shift */ +#define WME_QI_STA_APSD_BK_MASK 0x4 /* APSD AC_BK mask */ +#define WME_QI_STA_APSD_BK_SHIFT 2 /* APSD AC_BK shift */ +#define WME_QI_STA_APSD_VI_MASK 0x2 /* APSD AC_VI mask */ +#define WME_QI_STA_APSD_VI_SHIFT 1 /* APSD AC_VI shift */ +#define WME_QI_STA_APSD_VO_MASK 0x1 /* APSD AC_VO mask */ +#define WME_QI_STA_APSD_VO_SHIFT 0 /* APSD AC_VO shift */ + +/* ACI */ +#define EDCF_AIFSN_MIN 1 /* AIFSN minimum value */ +#define EDCF_AIFSN_MAX 15 /* AIFSN maximum value */ +#define EDCF_AIFSN_MASK 0x0f /* AIFSN mask */ +#define EDCF_ACM_MASK 0x10 /* ACM mask */ +#define EDCF_ACI_MASK 0x60 /* ACI mask */ +#define EDCF_ACI_SHIFT 5 /* ACI shift */ + +/* ECW */ +#define EDCF_ECW_MIN 0 /* cwmin/cwmax exponent minimum value */ +#define EDCF_ECW_MAX 15 /* cwmin/cwmax exponent maximum value */ +#define EDCF_ECW2CW(exp) ((1 << (exp)) - 1) +#define EDCF_ECWMIN_MASK 0x0f /* cwmin exponent form mask */ +#define EDCF_ECWMAX_MASK 0xf0 /* cwmax exponent form mask */ +#define EDCF_ECWMAX_SHIFT 4 /* cwmax exponent form shift */ + +/* TXOP */ +#define EDCF_TXOP_MIN 0 /* TXOP minimum value */ +#define EDCF_TXOP_MAX 65535 /* TXOP maximum value */ +#define EDCF_TXOP2USEC(txop) ((txop) << 5) + +/* Default EDCF parameters that AP advertises for STA to use; WMM draft Table 12 */ +#define EDCF_AC_BE_ACI_STA 0x03 /* STA ACI value for best effort AC */ +#define EDCF_AC_BE_ECW_STA 0xA4 /* STA ECW value for best effort AC */ +#define EDCF_AC_BE_TXOP_STA 0x0000 /* STA TXOP value for best effort AC */ +#define EDCF_AC_BK_ACI_STA 0x27 /* STA ACI value for background AC */ +#define EDCF_AC_BK_ECW_STA 0xA4 /* STA ECW value for background AC */ +#define EDCF_AC_BK_TXOP_STA 0x0000 /* STA TXOP value for background AC */ +#define EDCF_AC_VI_ACI_STA 0x42 /* STA ACI value for video AC */ +#define EDCF_AC_VI_ECW_STA 0x43 /* STA ECW value for video AC */ +#define EDCF_AC_VI_TXOP_STA 0x005e /* STA TXOP value for video AC */ +#define EDCF_AC_VO_ACI_STA 0x62 /* STA ACI value for audio AC */ +#define EDCF_AC_VO_ECW_STA 0x32 /* STA ECW value for audio AC */ +#define EDCF_AC_VO_TXOP_STA 0x002f /* STA TXOP value for audio AC */ + +/* Default EDCF parameters that AP uses; WMM draft Table 14 */ +#define EDCF_AC_BE_ACI_AP 0x03 /* AP ACI value for best effort AC */ +#define EDCF_AC_BE_ECW_AP 0x64 /* AP ECW value for best effort AC */ +#define EDCF_AC_BE_TXOP_AP 0x0000 /* AP TXOP value for best effort AC */ +#define EDCF_AC_BK_ACI_AP 0x27 /* AP ACI value for background AC */ +#define EDCF_AC_BK_ECW_AP 0xA4 /* AP ECW value for background AC */ +#define EDCF_AC_BK_TXOP_AP 0x0000 /* AP TXOP value for background AC */ +#define EDCF_AC_VI_ACI_AP 0x41 /* AP ACI value for video AC */ +#define EDCF_AC_VI_ECW_AP 0x43 /* AP ECW value for video AC */ +#define EDCF_AC_VI_TXOP_AP 0x005e /* AP TXOP value for video AC */ +#define EDCF_AC_VO_ACI_AP 0x61 /* AP ACI value for audio AC */ +#define EDCF_AC_VO_ECW_AP 0x32 /* AP ECW value for audio AC */ +#define EDCF_AC_VO_TXOP_AP 0x002f /* AP TXOP value for audio AC */ + +struct dot11_qbss_load_ie { + uint8 id; /* 11, DOT11_MNG_QBSS_LOAD_ID */ + uint8 length; + uint16 station_count; /* total number of STAs associated */ + uint8 channel_utilization; /* % of time, normalized to 255, QAP sensed medium busy */ + uint16 aac; /* available admission capacity */ +} PACKED; +typedef struct dot11_qbss_load_ie dot11_qbss_load_ie_t; + +/* nom_msdu_size */ +#define FIXED_MSDU_SIZE 0x8000 /* MSDU size is fixed */ +#define MSDU_SIZE_MASK 0x7fff /* (Nominal or fixed) MSDU size */ + +/* surplus_bandwidth */ +/* Represented as 3 bits of integer, binary point, 13 bits fraction */ +#define INTEGER_SHIFT 13 /* integer shift */ +#define FRACTION_MASK 0x1FFF /* fraction mask */ + +/* Management Notification Frame */ +struct dot11_management_notification { + uint8 category; /* DOT11_ACTION_NOTIFICATION */ + uint8 action; + uint8 token; + uint8 status; + uint8 data[1]; /* Elements */ +} PACKED; +#define DOT11_MGMT_NOTIFICATION_LEN 4 /* Fixed length */ + +/* WME Action Codes */ +#define WME_ADDTS_REQUEST 0 /* WME ADDTS request */ +#define WME_ADDTS_RESPONSE 1 /* WME ADDTS response */ +#define WME_DELTS_REQUEST 2 /* WME DELTS request */ + +/* WME Setup Response Status Codes */ +#define WME_ADMISSION_ACCEPTED 0 /* WME admission accepted */ +#define WME_INVALID_PARAMETERS 1 /* WME invalide parameters */ +#define WME_ADMISSION_REFUSED 3 /* WME admission refused */ + +/* Macro to take a pointer to a beacon or probe response + * header and return the char* pointer to the SSID info element + */ +#define BCN_PRB_SSID(hdr) ((char*)(hdr) + DOT11_MGMT_HDR_LEN + DOT11_BCN_PRB_LEN) + +/* Authentication frame payload constants */ +#define DOT11_OPEN_SYSTEM 0 /* d11 open authentication */ +#define DOT11_SHARED_KEY 1 /* d11 shared authentication */ +#define DOT11_CHALLENGE_LEN 128 /* d11 chanllenge text length */ + +/* Frame control macros */ +#define FC_PVER_MASK 0x3 /* PVER mask */ +#define FC_PVER_SHIFT 0 /* PVER shift */ +#define FC_TYPE_MASK 0xC /* type mask */ +#define FC_TYPE_SHIFT 2 /* type shift */ +#define FC_SUBTYPE_MASK 0xF0 /* subtype mask */ +#define FC_SUBTYPE_SHIFT 4 /* subtype shift */ +#define FC_TODS 0x100 /* to DS */ +#define FC_TODS_SHIFT 8 /* to DS shift */ +#define FC_FROMDS 0x200 /* from DS */ +#define FC_FROMDS_SHIFT 9 /* from DS shift */ +#define FC_MOREFRAG 0x400 /* more frag. */ +#define FC_MOREFRAG_SHIFT 10 /* more frag. shift */ +#define FC_RETRY 0x800 /* retry */ +#define FC_RETRY_SHIFT 11 /* retry shift */ +#define FC_PM 0x1000 /* PM */ +#define FC_PM_SHIFT 12 /* PM shift */ +#define FC_MOREDATA 0x2000 /* more data */ +#define FC_MOREDATA_SHIFT 13 /* more data shift */ +#define FC_WEP 0x4000 /* WEP */ +#define FC_WEP_SHIFT 14 /* WEP shift */ +#define FC_ORDER 0x8000 /* order */ +#define FC_ORDER_SHIFT 15 /* order shift */ + +/* sequence control macros */ +#define SEQNUM_SHIFT 4 /* seq. number shift */ +#define SEQNUM_MAX 0x1000 /* max seqnum + 1 */ +#define FRAGNUM_MASK 0xF /* frag. number mask */ + +/* Frame Control type/subtype defs */ + +/* FC Types */ +#define FC_TYPE_MNG 0 /* management type */ +#define FC_TYPE_CTL 1 /* control type */ +#define FC_TYPE_DATA 2 /* data type */ + +/* Management Subtypes */ +#define FC_SUBTYPE_ASSOC_REQ 0 /* assoc. request */ +#define FC_SUBTYPE_ASSOC_RESP 1 /* assoc. response */ +#define FC_SUBTYPE_REASSOC_REQ 2 /* reassoc. request */ +#define FC_SUBTYPE_REASSOC_RESP 3 /* reassoc. response */ +#define FC_SUBTYPE_PROBE_REQ 4 /* probe request */ +#define FC_SUBTYPE_PROBE_RESP 5 /* probe response */ +#define FC_SUBTYPE_BEACON 8 /* beacon */ +#define FC_SUBTYPE_ATIM 9 /* ATIM */ +#define FC_SUBTYPE_DISASSOC 10 /* disassoc. */ +#define FC_SUBTYPE_AUTH 11 /* authentication */ +#define FC_SUBTYPE_DEAUTH 12 /* de-authentication */ +#define FC_SUBTYPE_ACTION 13 /* action */ + +/* Control Subtypes */ +#define FC_SUBTYPE_BLOCKACK_REQ 8 /* Block Ack Req */ +#define FC_SUBTYPE_BLOCKACK 9 /* Block Ack */ +#define FC_SUBTYPE_PS_POLL 10 /* PS poll */ +#define FC_SUBTYPE_RTS 11 /* RTS */ +#define FC_SUBTYPE_CTS 12 /* CTS */ +#define FC_SUBTYPE_ACK 13 /* ACK */ +#define FC_SUBTYPE_CF_END 14 /* CF-END */ +#define FC_SUBTYPE_CF_END_ACK 15 /* CF-END ACK */ + +/* Data Subtypes */ +#define FC_SUBTYPE_DATA 0 /* Data */ +#define FC_SUBTYPE_DATA_CF_ACK 1 /* Data + CF-ACK */ +#define FC_SUBTYPE_DATA_CF_POLL 2 /* Data + CF-Poll */ +#define FC_SUBTYPE_DATA_CF_ACK_POLL 3 /* Data + CF-Ack + CF-Poll */ +#define FC_SUBTYPE_NULL 4 /* Null */ +#define FC_SUBTYPE_CF_ACK 5 /* CF-Ack */ +#define FC_SUBTYPE_CF_POLL 6 /* CF-Poll */ +#define FC_SUBTYPE_CF_ACK_POLL 7 /* CF-Ack + CF-Poll */ +#define FC_SUBTYPE_QOS_DATA 8 /* QoS Data */ +#define FC_SUBTYPE_QOS_DATA_CF_ACK 9 /* QoS Data + CF-Ack */ +#define FC_SUBTYPE_QOS_DATA_CF_POLL 10 /* QoS Data + CF-Poll */ +#define FC_SUBTYPE_QOS_DATA_CF_ACK_POLL 11 /* QoS Data + CF-Ack + CF-Poll */ +#define FC_SUBTYPE_QOS_NULL 12 /* QoS Null */ +#define FC_SUBTYPE_QOS_CF_POLL 14 /* QoS CF-Poll */ +#define FC_SUBTYPE_QOS_CF_ACK_POLL 15 /* QoS CF-Ack + CF-Poll */ + +/* Data Subtype Groups */ +#define FC_SUBTYPE_ANY_QOS(s) (((s) & 8) != 0) +#define FC_SUBTYPE_ANY_NULL(s) (((s) & 4) != 0) +#define FC_SUBTYPE_ANY_CF_POLL(s) (((s) & 2) != 0) +#define FC_SUBTYPE_ANY_CF_ACK(s) (((s) & 1) != 0) + +/* Type/Subtype Combos */ +#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK) /* FC kind mask */ + +#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT)) /* FC kind */ + +#define FC_SUBTYPE(fc) (((fc) & FC_SUBTYPE_MASK) >> FC_SUBTYPE_SHIFT) /* Subtype from FC */ +#define FC_TYPE(fc) (((fc) & FC_TYPE_MASK) >> FC_TYPE_SHIFT) /* Type from FC */ + +#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ) /* assoc. request */ +#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP) /* assoc. response */ +#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ) /* reassoc. request */ +#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP) /* reassoc. response */ +#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ) /* probe request */ +#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP) /* probe response */ +#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON) /* beacon */ +#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC) /* disassoc */ +#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH) /* authentication */ +#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH) /* deauthentication */ +#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION) /* action */ + +#define FC_BLOCKACK_REQ FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_BLOCKACK_REQ) /* Block Ack Req */ +#define FC_BLOCKACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_BLOCKACK) /* Block Ack */ +#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL) /* PS poll */ +#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS) /* RTS */ +#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS) /* CTS */ +#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK) /* ACK */ +#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END) /* CF-END */ +#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK) /* CF-END ACK */ + +#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA) /* data */ +#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL) /* null data */ +#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK) /* data CF ACK */ +#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA) /* QoS data */ +#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL) /* QoS null */ + +/* QoS Control Field */ + +/* 802.1D Priority */ +#define QOS_PRIO_SHIFT 0 /* QoS priority shift */ +#define QOS_PRIO_MASK 0x0007 /* QoS priority mask */ +#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT) /* QoS priority */ + +/* Traffic Identifier */ +#define QOS_TID_SHIFT 0 /* QoS TID shift */ +#define QOS_TID_MASK 0x000f /* QoS TID mask */ +#define QOS_TID(qos) (((qos) & QOS_TID_MASK) >> QOS_TID_SHIFT) /* QoS TID */ + +/* End of Service Period (U-APSD) */ +#define QOS_EOSP_SHIFT 4 /* QoS End of Service Period shift */ +#define QOS_EOSP_MASK 0x0010 /* QoS End of Service Period mask */ +#define QOS_EOSP(qos) (((qos) & QOS_EOSP_MASK) >> QOS_EOSP_SHIFT) /* Qos EOSP */ + +/* Ack Policy */ +#define QOS_ACK_NORMAL_ACK 0 /* Normal Ack */ +#define QOS_ACK_NO_ACK 1 /* No Ack (eg mcast) */ +#define QOS_ACK_NO_EXP_ACK 2 /* No Explicit Ack */ +#define QOS_ACK_BLOCK_ACK 3 /* Block Ack */ +#define QOS_ACK_SHIFT 5 /* QoS ACK shift */ +#define QOS_ACK_MASK 0x0060 /* QoS ACK mask */ +#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT) /* QoS ACK */ + +/* A-MSDU flag */ +#define QOS_AMSDU_SHIFT 7 /* AMSDU shift */ +#define QOS_AMSDU_MASK 0x0080 /* AMSDU mask */ + +/* Management Frames */ + +/* Management Frame Constants */ + +/* Fixed fields */ +#define DOT11_MNG_AUTH_ALGO_LEN 2 /* d11 management auth. algo. length */ +#define DOT11_MNG_AUTH_SEQ_LEN 2 /* d11 management auth. seq. length */ +#define DOT11_MNG_BEACON_INT_LEN 2 /* d11 management beacon interval length */ +#define DOT11_MNG_CAP_LEN 2 /* d11 management cap. length */ +#define DOT11_MNG_AP_ADDR_LEN 6 /* d11 management AP address length */ +#define DOT11_MNG_LISTEN_INT_LEN 2 /* d11 management listen interval length */ +#define DOT11_MNG_REASON_LEN 2 /* d11 management reason length */ +#define DOT11_MNG_AID_LEN 2 /* d11 management AID length */ +#define DOT11_MNG_STATUS_LEN 2 /* d11 management status length */ +#define DOT11_MNG_TIMESTAMP_LEN 8 /* d11 management timestamp length */ + +/* DUR/ID field in assoc resp is 0xc000 | AID */ +#define DOT11_AID_MASK 0x3fff /* d11 AID mask */ + +/* Reason Codes */ +#define DOT11_RC_RESERVED 0 /* d11 RC reserved */ +#define DOT11_RC_UNSPECIFIED 1 /* Unspecified reason */ +#define DOT11_RC_AUTH_INVAL 2 /* Previous authentication no longer + * valid + */ +#define DOT11_RC_DEAUTH_LEAVING 3 /* Deauthenticated because sending station + * is leaving (or has left) IBSS or ESS + */ +#define DOT11_RC_INACTIVITY 4 /* Disassociated due to inactivity */ +#define DOT11_RC_BUSY 5 /* Disassociated because AP is unable + * to handle all currently associated + * stations + */ +#define DOT11_RC_INVAL_CLASS_2 6 /* Class 2 frame received from + * nonauthenticated station + */ +#define DOT11_RC_INVAL_CLASS_3 7 /* Class 3 frame received from + * nonassociated station + */ +#define DOT11_RC_DISASSOC_LEAVING 8 /* Disassociated because sending station is + * leaving (or has left) BSS + */ +#define DOT11_RC_NOT_AUTH 9 /* Station requesting (re)association is + * not authenticated with responding + * station + */ +#define DOT11_RC_MAX 23 /* Reason codes > 23 are reserved */ + +/* Status Codes */ +#define DOT11_STATUS_SUCCESS 0 /* Successful */ +#define DOT11_STATUS_FAILURE 1 /* Unspecified failure */ +#define DOT11_STATUS_CAP_MISMATCH 10 /* Cannot support all requested + * capabilities in the Capability + * Information field + */ +#define DOT11_STATUS_REASSOC_FAIL 11 /* Reassociation denied due to inability + * to confirm that association exists + */ +#define DOT11_STATUS_ASSOC_FAIL 12 /* Association denied due to reason + * outside the scope of this standard + */ +#define DOT11_STATUS_AUTH_MISMATCH 13 /* Responding station does not support + * the specified authentication + * algorithm + */ +#define DOT11_STATUS_AUTH_SEQ 14 /* Received an Authentication frame + * with authentication transaction + * sequence number out of expected + * sequence + */ +#define DOT11_STATUS_AUTH_CHALLENGE_FAIL 15 /* Authentication rejected because of + * challenge failure + */ +#define DOT11_STATUS_AUTH_TIMEOUT 16 /* Authentication rejected due to timeout + * waiting for next frame in sequence + */ +#define DOT11_STATUS_ASSOC_BUSY_FAIL 17 /* Association denied because AP is + * unable to handle additional + * associated stations + */ +#define DOT11_STATUS_ASSOC_RATE_MISMATCH 18 /* Association denied due to requesting + * station not supporting all of the + * data rates in the BSSBasicRateSet + * parameter + */ +#define DOT11_STATUS_ASSOC_SHORT_REQUIRED 19 /* Association denied due to requesting + * station not supporting the Short + * Preamble option + */ +#define DOT11_STATUS_ASSOC_PBCC_REQUIRED 20 /* Association denied due to requesting + * station not supporting the PBCC + * Modulation option + */ +#define DOT11_STATUS_ASSOC_AGILITY_REQUIRED 21 /* Association denied due to requesting + * station not supporting the Channel + * Agility option + */ +#define DOT11_STATUS_ASSOC_SPECTRUM_REQUIRED 22 /* Association denied because Spectrum + * Management capability is required. + */ +#define DOT11_STATUS_ASSOC_BAD_POWER_CAP 23 /* Association denied because the info + * in the Power Cap element is + * unacceptable. + */ +#define DOT11_STATUS_ASSOC_BAD_SUP_CHANNELS 24 /* Association denied because the info + * in the Supported Channel element is + * unacceptable + */ +#define DOT11_STATUS_ASSOC_SHORTSLOT_REQUIRED 25 /* Association denied due to requesting + * station not supporting the Short Slot + * Time option + */ +#define DOT11_STATUS_ASSOC_ERPBCC_REQUIRED 26 /* Association denied due to requesting + * station not supporting the ER-PBCC + * Modulation option + */ +#define DOT11_STATUS_ASSOC_DSSOFDM_REQUIRED 27 /* Association denied due to requesting + * station not supporting the DSS-OFDM + * option + */ + +/* Info Elts, length of INFORMATION portion of Info Elts */ +#define DOT11_MNG_DS_PARAM_LEN 1 /* d11 management DS parameter length */ +#define DOT11_MNG_IBSS_PARAM_LEN 2 /* d11 management IBSS parameter length */ + +/* TIM Info element has 3 bytes fixed info in INFORMATION field, + * followed by 1 to 251 bytes of Partial Virtual Bitmap + */ +#define DOT11_MNG_TIM_FIXED_LEN 3 /* d11 management TIM fixed length */ +#define DOT11_MNG_TIM_DTIM_COUNT 0 /* d11 management DTIM count */ +#define DOT11_MNG_TIM_DTIM_PERIOD 1 /* d11 management DTIM period */ +#define DOT11_MNG_TIM_BITMAP_CTL 2 /* d11 management TIM BITMAP control */ +#define DOT11_MNG_TIM_PVB 3 /* d11 management TIM PVB */ + +/* TLV defines */ +#define TLV_TAG_OFF 0 /* tag offset */ +#define TLV_LEN_OFF 1 /* length offset */ +#define TLV_HDR_LEN 2 /* header length */ +#define TLV_BODY_OFF 2 /* body offset */ + +/* Management Frame Information Element IDs */ +#define DOT11_MNG_SSID_ID 0 /* d11 management SSID id */ +#define DOT11_MNG_RATES_ID 1 /* d11 management rates id */ +#define DOT11_MNG_FH_PARMS_ID 2 /* d11 management FH parameter id */ +#define DOT11_MNG_DS_PARMS_ID 3 /* d11 management DS parameter id */ +#define DOT11_MNG_CF_PARMS_ID 4 /* d11 management CF parameter id */ +#define DOT11_MNG_TIM_ID 5 /* d11 management TIM id */ +#define DOT11_MNG_IBSS_PARMS_ID 6 /* d11 management IBSS parameter id */ +#define DOT11_MNG_COUNTRY_ID 7 /* d11 management country id */ +#define DOT11_MNG_HOPPING_PARMS_ID 8 /* d11 management hopping parameter id */ +#define DOT11_MNG_HOPPING_TABLE_ID 9 /* d11 management hopping table id */ +#define DOT11_MNG_REQUEST_ID 10 /* d11 management request id */ +#define DOT11_MNG_QBSS_LOAD_ID 11 /* d11 management QBSS Load id */ +#define DOT11_MNG_CHALLENGE_ID 16 /* d11 management chanllenge id */ +#define DOT11_MNG_PWR_CONSTRAINT_ID 32 /* 11H PowerConstraint */ +#define DOT11_MNG_PWR_CAP_ID 33 /* 11H PowerCapability */ +#define DOT11_MNG_TPC_REQUEST_ID 34 /* 11H TPC Request */ +#define DOT11_MNG_TPC_REPORT_ID 35 /* 11H TPC Report */ +#define DOT11_MNG_SUPP_CHANNELS_ID 36 /* 11H Supported Channels */ +#define DOT11_MNG_CHANNEL_SWITCH_ID 37 /* 11H ChannelSwitch Announcement */ +#define DOT11_MNG_MEASURE_REQUEST_ID 38 /* 11H MeasurementRequest */ +#define DOT11_MNG_MEASURE_REPORT_ID 39 /* 11H MeasurementReport */ +#define DOT11_MNG_QUIET_ID 40 /* 11H Quiet */ +#define DOT11_MNG_IBSS_DFS_ID 41 /* 11H IBSS_DFS */ +#define DOT11_MNG_ERP_ID 42 /* d11 management ERP id */ +#define DOT11_MNG_TS_DELAY_ID 43 /* d11 management TS Delay id */ +#define DOT11_MNG_NONERP_ID 47 /* d11 management NON-ERP id */ +#define DOT11_MNG_RSN_ID 48 /* d11 management RSN id */ +#define DOT11_MNG_EXT_RATES_ID 50 /* d11 management ext. rates id */ +#define DOT11_MNG_WPA_ID 221 /* d11 management WPA id */ +#define DOT11_MNG_PROPR_ID 221 /* d11 management proprietary id */ + +/* Rate element Basic flag and rate mask */ +#define DOT11_RATE_BASIC 0x80 /* flag for a Basic Rate */ +#define DOT11_RATE_MASK 0x7F /* mask for numeric part of rate */ + +/* ERP info element bit values */ +#define DOT11_MNG_ERP_LEN 1 /* ERP is currently 1 byte long */ +#define DOT11_MNG_NONERP_PRESENT 0x01 /* NonERP (802.11b) STAs are present + *in the BSS + */ +#define DOT11_MNG_USE_PROTECTION 0x02 /* Use protection mechanisms for + *ERP-OFDM frames + */ +#define DOT11_MNG_BARKER_PREAMBLE 0x04 /* Short Preambles: 0 == allowed, + * 1 == not allowed + */ +/* TS Delay element offset & size */ +#define DOT11_MGN_TS_DELAY_LEN 4 /* length of TS DELAY IE */ +#define TS_DELAY_FIELD_SIZE 4 /* TS DELAY field size */ + +/* Capability Information Field */ +#define DOT11_CAP_ESS 0x0001 /* d11 cap. ESS */ +#define DOT11_CAP_IBSS 0x0002 /* d11 cap. IBSS */ +#define DOT11_CAP_POLLABLE 0x0004 /* d11 cap. pollable */ +#define DOT11_CAP_POLL_RQ 0x0008 /* d11 cap. poll request */ +#define DOT11_CAP_PRIVACY 0x0010 /* d11 cap. privacy */ +#define DOT11_CAP_SHORT 0x0020 /* d11 cap. short */ +#define DOT11_CAP_PBCC 0x0040 /* d11 cap. PBCC */ +#define DOT11_CAP_AGILITY 0x0080 /* d11 cap. agility */ +#define DOT11_CAP_SPECTRUM 0x0100 /* d11 cap. spectrum */ +#define DOT11_CAP_SHORTSLOT 0x0400 /* d11 cap. shortslot */ +#define DOT11_CAP_CCK_OFDM 0x2000 /* d11 cap. CCK/OFDM */ + +/* Action Frame Constants */ +#define DOT11_ACTION_CAT_ERR_MASK 0x80 /* d11 action category error mask */ +#define DOT11_ACTION_CAT_MASK 0x7F /* d11 action category mask */ +#define DOT11_ACTION_CAT_SPECT_MNG 0x00 /* d11 action category spectrum management */ +#define DOT11_ACTION_CAT_BLOCKACK 0x03 /* d11 action category block ack */ +#define DOT11_ACTION_NOTIFICATION 0x11 /* 17 */ + +#define DOT11_ACTION_ID_M_REQ 0 /* d11 action measurement request */ +#define DOT11_ACTION_ID_M_REP 1 /* d11 action measurement response */ +#define DOT11_ACTION_ID_TPC_REQ 2 /* d11 action TPC request */ +#define DOT11_ACTION_ID_TPC_REP 3 /* d11 action TPC response */ +#define DOT11_ACTION_ID_CHANNEL_SWITCH 4 /* d11 action channel switch */ + +/* HT (EWC) action ids */ +#define DOT11_ACTION_ID_HT_CH_WIDTH 0 /* mimo ps action frame id */ +#define DOT11_ACTION_ID_HT_MIMO_PS 1 /* mimo ps action frame id */ + +/* Block Ack action types */ +#define DOT11_BA_ACTION_ADDBA_REQ 0 /* ADDBA Req action frame type */ +#define DOT11_BA_ACTION_ADDBA_RESP 1 /* ADDBA Resp action frame type */ +#define DOT11_BA_ACTION_DELBA 2 /* DELBA action frame type */ + +/* ADDBA action parameters */ +#define DOT11_ADDBA_PARAM_POLICY_MASK 0x0002 /* policy mask(ack vs delayed) */ +#define DOT11_ADDBA_PARAM_POLICY_SHIFT 1 /* policy shift */ +#define DOT11_ADDBA_PARAM_TID_MASK 0x003c /* tid mask */ +#define DOT11_ADDBA_PARAM_TID_SHIFT 2 /* tid shift */ +#define DOT11_ADDBA_PARAM_BSIZE_MASK 0xffc0 /* buffer size mask */ +#define DOT11_ADDBA_PARAM_BSIZE_SHIFT 6 /* buffer size shift */ + +#define DOT11_ADDBA_POLICY_DELAYED 0 /* delayed BA policy */ +#define DOT11_ADDBA_POLICY_IMMEDIATE 1 /* immediate BA policy */ + +struct dot11_addba_req { + uint8 category; /* category of action frame (3) */ + uint8 action; /* action: addba req */ + uint8 token; /* identifier */ + uint16 addba_param_set; /* parameter set */ + uint16 timeout; /* timeout in seconds */ + uint16 start_seqnum; /* starting sequence number */ +}PACKED; +typedef struct dot11_addba_req dot11_addba_req_t; +#define DOT11_ADDBA_REQ_LEN 9 /* length of addba req frame */ + +struct dot11_addba_resp { + uint8 category; /* category of action frame (3) */ + uint8 action; /* action: addba resp */ + uint8 token; /* identifier */ + uint16 status; /* status of add request */ + uint16 addba_param_set; /* negotiated parameter set */ + uint16 timeout; /* negotiated timeout in seconds */ +}PACKED; +typedef struct dot11_addba_resp dot11_addba_resp_t; +#define DOT11_ADDBA_RESP_LEN 9 /* length of addba resp frame */ + +/* DELBA action parameters */ +#define DOT11_DELBA_PARAM_INIT_MASK 0x0800 /* initiator mask */ +#define DOT11_DELBA_PARAM_INIT_SHIFT 11 /* initiator shift */ +#define DOT11_DELBA_PARAM_TID_MASK 0xf000 /* tid mask */ +#define DOT11_DELBA_PARAM_TID_SHIFT 12 /* tid shift */ + +struct dot11_delba { + uint8 category; /* category of action frame (3) */ + uint8 action; /* action: addba req */ + uint16 delba_param_set; /* paarmeter set */ + uint16 reason; /* reason for dellba */ +}PACKED; +typedef struct dot11_delba dot11_delba_t; +#define DOT11_DELBA_LEN 6 /* length of delba frame */ + +/* MLME Enumerations */ +#define DOT11_BSSTYPE_INFRASTRUCTURE 0 /* d11 infrastructure */ +#define DOT11_BSSTYPE_INDEPENDENT 1 /* d11 independent */ +#define DOT11_BSSTYPE_ANY 2 /* d11 any BSS type */ +#define DOT11_SCANTYPE_ACTIVE 0 /* d11 scan active */ +#define DOT11_SCANTYPE_PASSIVE 1 /* d11 scan passive */ + +/* 802.11 BRCM "Compromise" Pre N constants */ +#define PREN_PREAMBLE 24 /* green field preamble time */ +#define PREN_MM_EXT 16 /* extra mixed mode preamble time */ +#define PREN_PREAMBLE_EXT 4 /* extra preamble (multiply by unique_streams-1) */ + +/* 802.11 A PHY constants */ +#define APHY_SLOT_TIME 9 /* APHY slot time */ +#define APHY_SIFS_TIME 16 /* APHY SIFS time */ +#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME)) /* APHY DIFS time */ +#define APHY_PREAMBLE_TIME 16 /* APHY preamble time */ +#define APHY_SIGNAL_TIME 4 /* APHY signal time */ +#define APHY_SYMBOL_TIME 4 /* APHY symbol time */ +#define APHY_SERVICE_NBITS 16 /* APHY service nbits */ +#define APHY_TAIL_NBITS 6 /* APHY tail nbits */ +#define APHY_CWMIN 15 /* APHY cwmin */ + +/* 802.11 B PHY constants */ +#define BPHY_SLOT_TIME 20 /* BPHY slot time */ +#define BPHY_SIFS_TIME 10 /* BPHY SIFS time */ +#define BPHY_DIFS_TIME 50 /* BPHY DIFS time */ +#define BPHY_PLCP_TIME 192 /* BPHY PLCP time */ +#define BPHY_PLCP_SHORT_TIME 96 /* BPHY PLCP short time */ +#define BPHY_CWMIN 31 /* BPHY cwmin */ + +/* 802.11 G constants */ +#define DOT11_OFDM_SIGNAL_EXTENSION 6 /* d11 OFDM signal extension */ + +#define PHY_CWMAX 1023 /* PHY cwmax */ + +#define DOT11_MAXNUMFRAGS 16 /* max # fragments per MSDU */ + +/* dot11Counters Table - 802.11 spec., Annex D */ +typedef struct d11cnt { + uint32 txfrag; /* dot11TransmittedFragmentCount */ + uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ + uint32 txfail; /* dot11FailedCount */ + uint32 txretry; /* dot11RetryCount */ + uint32 txretrie; /* dot11MultipleRetryCount */ + uint32 rxdup; /* dot11FrameduplicateCount */ + uint32 txrts; /* dot11RTSSuccessCount */ + uint32 txnocts; /* dot11RTSFailureCount */ + uint32 txnoack; /* dot11ACKFailureCount */ + uint32 rxfrag; /* dot11ReceivedFragmentCount */ + uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ + uint32 rxcrc; /* dot11FCSErrorCount */ + uint32 txfrmsnt; /* dot11TransmittedFrameCount */ + uint32 rxundec; /* dot11WEPUndecryptableCount */ +} d11cnt_t; + +/* BRCM OUI */ +#define BRCM_OUI "\x00\x10\x18" /* Broadcom OUI */ + +/* OUI for BRCM proprietary IE */ +#define BRCM_PROP_OUI "\x00\x90\x4C" /* Broadcom proprietary OUI */ + +/* BRCM info element */ +struct brcm_ie { + uint8 id; /* IE ID, 221, DOT11_MNG_PROPR_ID */ + uint8 len; /* IE length */ + uint8 oui[3]; /* Proprietary OUI, BRCM_OUI */ + uint8 ver; /* type/ver of this IE */ + uint8 assoc; /* # of assoc STAs */ + uint8 flags; /* misc flags */ + uint8 flags1; /* misc flags */ + uint16 amsdu_mtu_pref; /* preferred A-MSDU MTU */ +} PACKED; +typedef struct brcm_ie brcm_ie_t; +#define BRCM_IE_LEN 11 /* BRCM IE length */ +#define BRCM_IE_VER 2 /* BRCM IE version */ +#define BRCM_IE_LEGACY_AES_VER 1 /* BRCM IE legacy AES version */ + +/* brcm_ie flags */ +#define BRF_ABCAP 0x1 /* afterburner capable */ +#define BRF_ABRQRD 0x2 /* afterburner requested */ +#define BRF_LZWDS 0x4 /* lazy wds enabled */ +#define BRF_BLOCKACK 0x8 /* BlockACK capable */ +#define BRF_ABCOUNTER_MASK 0xf0 /* afterburner wds "state" counter */ +#define BRF_ABCOUNTER_SHIFT 4 /* offset of afterburner wds "state" counter */ + +/* brcm_ie flags1 */ +#define BRF1_AMSDU 0x1 /* A-MSDU capable */ + +#define AB_WDS_TIMEOUT_MAX 15 /* afterburner wds Max count indicating not + * locally capable + */ +#define AB_WDS_TIMEOUT_MIN 1 /* afterburner wds, use zero count as indicating + * "downrev" + */ + +/* EWC definitions */ +#define MCSSET_LEN 16 /* 16-bits per 8-bit set to give 128-bits bitmap of MCS Index */ + +struct ewc_cap { + uint16 cap; + uint8 params; + uint8 supp_mcs[MCSSET_LEN]; + uint16 ext_htcap; + uint32 txbf_cap; + uint8 as_cap; +} PACKED; +typedef struct ewc_cap ewc_cap_t; + +/* CAP IE: EWC 1.0 spec. simply stole a 802.11 IE, we use our prop. IE until this is resolved */ +/* the capability IE is primarily used to convey this nodes abilities */ +struct ewc_cap_ie { + uint8 id; /* IE ID, 221, DOT11_MNG_PROPR_ID */ + uint8 len; /* IE length */ + uint8 oui[3]; /* Proprietary OUI, BRCM_PROP_OUI */ + uint8 type; /* type inidicates what follows */ + ewc_cap_t cap; +} PACKED; +typedef struct ewc_cap_ie ewc_cap_ie_t; + +#define EWC_CAP_IE_LEN (26+4) +#define EWC_CAP_IE_TYPE 51 + +#define EWC_CAP_ADC_CODING 0x0001 /* Advance coding support */ +#define EWC_CAP_40MHZ 0x0002 /* FALSE:20Mhz, TRUE: 20 and 40MHZ supported */ +#define EWC_CAP_MIMO_PS_MASK 0x000C /* Mimo PS mask */ +#define EWC_CAP_MIMO_PS_SHIFT 0x0002 /* Mimo PS shift */ +#define EWC_CAP_MIMO_PS_OFF 0x0003 /* Mimo PS, no restriction */ +#define EWC_CAP_MIMO_PS_RTS 0x0001 /* Mimo PS, send RTS/CTS around MIMO frames */ +#define EWC_CAP_MIMO_PS_ON 0x0000 /* Mimo PS, MIMO disallowed */ +#define EWC_CAP_GF 0x0010 /* Greenfield preamble support */ +#define EWC_CAP_SHORT_GI_20 0x0020 /* 20MHZ short guard interval support */ +#define EWC_CAP_SHORT_GI_40 0x0040 /* 40Mhz short guard interval support */ +#define EWC_CAP_TX_STBC 0x0080 /* Tx STBC support */ +#define EWC_CAP_RX_STBC_MASK 0x0300 /* Rx STBC mask */ +#define EWC_CAP_RX_STBC_SHIFT 8 /* Rx STBC shift */ +#define EWC_CAP_DELAYED_BA 0x0400 /* delayed BA support */ +#define EWC_CAP_MAX_AMSDU 0x0800 /* Max AMSDU size in bytes , 0=3839, 1=7935 */ +#define EWC_CAP_DSSS_CCK 0x1000 /* DSSS/CCK supported by the BSS */ +#define EWC_CAP_PSMP 0x2000 /* Power Save Multi Poll support */ +#define EWC_CAP_STBC_CTL 0x4000 /* STBC control frame support */ +#define EWC_CAP_LSIG_TXOP 0x8000 /* L-SIG TXOP protection support */ + +#define EWC_MAX_AMSDU 7935 /* max amsdu size (bytes) per the EWC spec */ +#define EWC_MIN_AMSDU 3835 /* min amsdu size (bytes) per the EWC spec */ + +#define EWC_PARAMS_RX_FACTOR_MASK 0x03 /* ampdu rcv factor mask */ +#define EWC_PARAMS_DENSITY_MASK 0x1C /* ampdu density mask */ +#define EWC_PARAMS_DENSITY_SHIFT 2 /* ampdu density shift */ + +/* EWC/AMPDU specific define */ +#define AMPDU_MAX_MPDU_DENSITY 7 /* max mpdu density; in 1/8 usec units */ +#define AMPDU_MAX_RX_FACTOR 3 /* max rcv ampdu len (64kb) */ +#define AMPDU_RX_FACTOR_BASE 8*1024 /* ampdu factor base for rx len */ +#define AMPDU_DELIMITER_LEN 4 /* length of ampdu delimiter */ + +struct ewc_add { + uint8 ctl_ch; /* control channel number */ + uint8 byte1; /* ext ch,rec. ch. width, RIFS support */ + uint16 opmode; /* operation mode */ + uint16 misc_bits; /* misc bits */ + uint8 basic_mcs[MCSSET_LEN]; /* required MCS set */ +} PACKED; +typedef struct ewc_add ewc_add_t; + +/* ADD IE: EWC 1.0 spec. simply stole a 802.11 IE, we use our prop. IE until this is resolved */ +/* the additional IE is primarily used to convey the current BSS configuration */ +struct ewc_add_ie { + uint8 id; /* IE ID, 221, DOT11_MNG_PROPR_ID */ + uint8 len; /* IE length */ + uint8 oui[3]; /* Proprietary OUI, BRCM_PROP_OUI */ + uint8 type; /* indicates what follows */ + ewc_add_t add; +} PACKED; +typedef struct ewc_add_ie ewc_add_ie_t; + +#define EWC_ADD_IE_LEN (22+4) +#define EWC_ADD_IE_TYPE 52 + +/* byte1 defn's */ +#define EWC_EXT_CH_MASK 0x03 /* extension channel mask */ +#define EWC_EXT_CH_UPPER 0x01 /* ext. ch. on upper sb */ +#define EWC_EXT_CH_LOWER 0x03 /* ext. ch. on lower sb */ +#define EWC_EXT_CH_NONE 0x00 /* extension channel mask */ +#define EWC_BW_ANY 0x04 /* set, STA can use 20 or 40MHz */ +#define EWC_RIFS_PERMITTED 0x08 /* RIFS allowed */ + +/* opmode defn's */ +#define EWC_OPMODE_MASK 0x0003 /* protection mode mask */ +#define EWC_OPMODE_PURE 0x0000 /* protection mode PURE */ +#define EWC_OPMODE_HT20IN40 0x0002 /* protection mode 20MHz HT in 40MHz BSS */ +#define EWC_OPMODE_MIXED 0x0003 /* protection mode Mixed Mode */ +#define EWC_NONGF_PRESENT 0x0004 /* protection mode non-GF */ + +/* misc_bites defn's */ +#define EWC_BASIC_STBC_MCS 0x007f /* basic STBC MCS */ +#define EWC_DUAL_STBC_PROT 0x0080 /* Dual STBC Protection */ +#define EWC_SECOND_BCN 0x0100 /* Secondary beacon support */ +#define EWC_LSIG_TXOP 0x0200 /* L-SIG TXOP Protection full support */ +#define EWC_PCO_ACTIVE 0x0400 /* PCO active */ +#define EWC_PCO_PHASE 0x0800 /* PCO phase */ + +/* Macros for opmode */ +#define EWC_MIXEDMODE_PRESENT(add) ((ltoh16_ua(&add.opmode) & EWC_OPMODE_MASK) \ + == EWC_OPMODE_MIXED) /* mixed mode present */ +#define EWC_HT20_PRESENT(add) ((ltoh16_ua(&add.opmode) & EWC_OPMODE_MASK) \ + == EWC_OPMODE_HT20IN40) /* 20MHz HT present */ +#define EWC_USE_PROTECTION(add) (EWC_HT20_PRESENT((add)) || \ + EWC_MIXEDMODE_PRESENT((add))) /* use protection */ + +/* Vendor IE structure */ +struct vndr_ie { + uchar id; + uchar len; + uchar oui [3]; + uchar data [1]; /* Variable size data */ +}PACKED; +typedef struct vndr_ie vndr_ie_t; + +#define VNDR_IE_HDR_LEN 2 /* id + len field */ +#define VNDR_IE_MIN_LEN 3 /* size of the oui field */ +#define VNDR_IE_MAX_LEN 256 /* verdor IE max length */ + +/* WPA definitions */ +#define WPA_VERSION 1 /* WPA version */ +#define WPA_OUI "\x00\x50\xF2" /* WPA OUI */ + +#define WPA2_VERSION 1 /* WPA2 version */ +#define WPA2_VERSION_LEN 2 /* WAP2 version length */ +#define WPA2_OUI "\x00\x0F\xAC" /* WPA2 OUI */ + +#define WPA_OUI_LEN 3 /* WPA OUI length */ + +/* RSN authenticated key managment suite */ +#define RSN_AKM_NONE 0 /* None (IBSS) */ +#define RSN_AKM_UNSPECIFIED 1 /* Over 802.1x */ +#define RSN_AKM_PSK 2 /* Pre-shared Key */ + +/* Key related defines */ +#define DOT11_MAX_DEFAULT_KEYS 4 /* number of default keys */ +#define DOT11_MAX_KEY_SIZE 32 /* max size of any key */ +#define DOT11_MAX_IV_SIZE 16 /* max size of any IV */ +#define DOT11_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ + +#define WEP1_KEY_SIZE 5 /* max size of any WEP key */ +#define WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ +#define WEP128_KEY_SIZE 13 /* max size of any WEP key */ +#define WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ +#define TKIP_MIC_SIZE 8 /* size of TKIP MIC */ +#define TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ +#define TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ +#define TKIP_KEY_SIZE 32 /* size of any TKIP key */ +#define TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ +#define TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ +#define TKIP_MIC_SUP_RX TKIP_MIC_AUTH_TX /* offset to Supplicant MIC RX key */ +#define TKIP_MIC_SUP_TX TKIP_MIC_AUTH_RX /* offset to Supplicant MIC TX key */ +#define AES_KEY_SIZE 16 /* size of AES key */ + +#undef PACKED +#if !defined(__GNUC__) +#pragma pack() +#endif + +#endif /* _802_11_H_ */ diff --git a/openwrt/package/wlc/src/include/proto/bcmeth.h b/openwrt/package/wlc/src/include/proto/bcmeth.h new file mode 100644 index 00000000000..7b3295389a2 --- /dev/null +++ b/openwrt/package/wlc/src/include/proto/bcmeth.h @@ -0,0 +1,101 @@ +/* + * Broadcom Ethernettype protocol definitions + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: bcmeth.h,v 1.1.1.4 2006/02/27 03:43:16 honor Exp $ + */ + +/* + * Broadcom Ethernet protocol defines + */ + +#ifndef _BCMETH_H_ +#define _BCMETH_H_ + +/* enable structure packing */ +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#pragma pack(1) +#define PACKED +#endif + +/* ETHER_TYPE_BRCM is defined in ethernet.h */ + +/* + * Following the 2byte BRCM ether_type is a 16bit BRCM subtype field + * in one of two formats: (only subtypes 32768-65535 are in use now) + * + * subtypes 0-32767: + * 8 bit subtype (0-127) + * 8 bit length in bytes (0-255) + * + * subtypes 32768-65535: + * 16 bit big-endian subtype + * 16 bit big-endian length in bytes (0-65535) + * + * length is the number of additional bytes beyond the 4 or 6 byte header + * + * Reserved values: + * 0 reserved + * 5-15 reserved for iLine protocol assignments + * 17-126 reserved, assignable + * 127 reserved + * 32768 reserved + * 32769-65534 reserved, assignable + * 65535 reserved + */ + +/* + * While adding the subtypes and their specific processing code make sure + * bcmeth_bcm_hdr_t is the first data structure in the user specific data structure definition + */ + +#define BCMILCP_SUBTYPE_RATE 1 +#define BCMILCP_SUBTYPE_LINK 2 +#define BCMILCP_SUBTYPE_CSA 3 +#define BCMILCP_SUBTYPE_LARQ 4 +#define BCMILCP_SUBTYPE_VENDOR 5 +#define BCMILCP_SUBTYPE_FLH 17 + +#define BCMILCP_SUBTYPE_VENDOR_LONG 32769 +#define BCMILCP_SUBTYPE_CERT 32770 +#define BCMILCP_SUBTYPE_SES 32771 + + +#define BCMILCP_BCM_SUBTYPE_RESERVED 0 +#define BCMILCP_BCM_SUBTYPE_EVENT 1 +#define BCMILCP_BCM_SUBTYPE_SES 2 +/* + * The EAPOL type is not used anymore. Instead EAPOL messages are now embedded + * within BCMILCP_BCM_SUBTYPE_EVENT type messages + */ +/* #define BCMILCP_BCM_SUBTYPE_EAPOL 3 */ + +#define BCMILCP_BCM_SUBTYPEHDR_MINLENGTH 8 +#define BCMILCP_BCM_SUBTYPEHDR_VERSION 0 + +/* These fields are stored in network order */ +typedef struct bcmeth_hdr +{ + uint16 subtype; /* Vendor specific..32769 */ + uint16 length; + uint8 version; /* Version is 0 */ + uint8 oui[3]; /* Broadcom OUI */ + /* user specific Data */ + uint16 usr_subtype; +} PACKED bcmeth_hdr_t; + +#undef PACKED +#if !defined(__GNUC__) +#pragma pack() +#endif + +#endif /* _BCMETH_H_ */ diff --git a/openwrt/package/wlc/src/include/proto/bcmevent.h b/openwrt/package/wlc/src/include/proto/bcmevent.h new file mode 100644 index 00000000000..d922a5d2151 --- /dev/null +++ b/openwrt/package/wlc/src/include/proto/bcmevent.h @@ -0,0 +1,152 @@ +/* + * Broadcom Event protocol definitions + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * + * Dependencies: proto/bcmeth.h + * + * $Id: bcmevent.h,v 1.1.1.3 2006/02/27 03:43:16 honor Exp $ + * + */ + +/* + * Broadcom Ethernet Events protocol defines + * + */ + +#ifndef _BCMEVENT_H_ +#define _BCMEVENT_H_ + +/* enable structure packing */ +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#pragma pack(1) +#define PACKED +#endif /* defined(__GNUC__) */ + +#define BCM_EVENT_MSG_VERSION 1 /* wl_event_msg_t struct version */ +#define BCM_MSG_IFNAME_MAX 16 /* max length of interface name */ + +/* flags */ +#define WLC_EVENT_MSG_LINK 0x01 /* link is up */ +#define WLC_EVENT_MSG_FLUSHTXQ 0x02 /* flush tx queue on MIC error */ +#define WLC_EVENT_MSG_GROUP 0x04 /* group MIC error */ + +/* theses fields are stored in network order */ +typedef struct +{ + uint16 version; + uint16 flags; /* see flags below */ + uint32 event_type; /* Message (see below) */ + uint32 status; /* Status code (see below) */ + uint32 reason; /* Reason code (if applicable) */ + uint32 auth_type; /* WLC_E_AUTH */ + uint32 datalen; /* data buf */ + struct ether_addr addr; /* Station address (if applicable) */ + char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */ +} PACKED wl_event_msg_t; + +/* used by driver msgs */ +typedef struct bcm_event { + struct ether_header eth; + bcmeth_hdr_t bcm_hdr; + wl_event_msg_t event; + /* data portion follows */ +} PACKED bcm_event_t; + +#define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header)) + +/* Event messages */ +#define WLC_E_SET_SSID 0 /* indicates status of set SSID */ +#define WLC_E_JOIN 1 /* differentiates join IBSS from found (WLC_E_START) IBSS */ +#define WLC_E_START 2 /* STA founded an IBSS or AP started a BSS */ +#define WLC_E_AUTH 3 /* 802.11 AUTH request */ +#define WLC_E_AUTH_IND 4 /* 802.11 AUTH indication */ +#define WLC_E_DEAUTH 5 /* 802.11 DEAUTH request */ +#define WLC_E_DEAUTH_IND 6 /* 802.11 DEAUTH indication */ +#define WLC_E_ASSOC 7 /* 802.11 ASSOC request */ +#define WLC_E_ASSOC_IND 8 /* 802.11 ASSOC indication */ +#define WLC_E_REASSOC 9 /* 802.11 REASSOC request */ +#define WLC_E_REASSOC_IND 10 /* 802.11 REASSOC indication */ +#define WLC_E_DISASSOC 11 /* 802.11 DISASSOC request */ +#define WLC_E_DISASSOC_IND 12 /* 802.11 DISASSOC indication */ +#define WLC_E_QUIET_START 13 /* 802.11h Quiet period started */ +#define WLC_E_QUIET_END 14 /* 802.11h Quiet period ended */ +#define WLC_E_BEACON_RX 15 /* BEACONS received/lost indication */ +#define WLC_E_LINK 16 /* generic link indication */ +#define WLC_E_MIC_ERROR 17 /* TKIP MIC error occurred */ +#define WLC_E_NDIS_LINK 18 /* NDIS style link indication */ +#define WLC_E_ROAM 19 /* roam attempt occurred: indicate status & reason */ +#define WLC_E_TXFAIL 20 /* change in dot11FailedCount (txfail) */ +#define WLC_E_PMKID_CACHE 21 /* WPA2 pmkid cache indication */ +#define WLC_E_RETROGRADE_TSF 22 /* current AP's TSF value went backward */ +#define WLC_E_PRUNE 23 /* AP was pruned from join list for reason */ +#define WLC_E_AUTOAUTH 24 /* report AutoAuth table entry match for join attempt */ +#define WLC_E_EAPOL_MSG 25 /* Event encapsulating an EAPOL message */ +#define WLC_E_SCAN_COMPLETE 26 /* Scan results are ready or scan was aborted */ +#define WLC_E_ADDTS_IND 27 /* indicate to host addts fail/success */ +#define WLC_E_DELTS_IND 28 /* indicate to host delts fail/success */ +#define WLC_E_BCNSENT_IND 29 /* indicate to host of beacon transmit */ +#define WLC_E_BCNRX_MSG 30 /* Send the received beacon up to the host */ +#define WLC_E_LAST 31 /* highest val + 1 for range checking */ + +/* Event status codes */ +#define WLC_E_STATUS_SUCCESS 0 /* operation was successful */ +#define WLC_E_STATUS_FAIL 1 /* operation failed */ +#define WLC_E_STATUS_TIMEOUT 2 /* operation timed out */ +#define WLC_E_STATUS_NO_NETWORKS 3 /* failed due to no matching network found */ +#define WLC_E_STATUS_ABORT 4 /* operation was aborted */ +#define WLC_E_STATUS_NO_ACK 5 /* protocol failure: packet not ack'd */ +#define WLC_E_STATUS_UNSOLICITED 6 /* AUTH or ASSOC packet was unsolicited */ +#define WLC_E_STATUS_ATTEMPT 7 /* attempt to assoc to an auto auth configuration */ + +/* roam reason codes */ +#define WLC_E_REASON_INITIAL_ASSOC 0 /* initial assoc */ +#define WLC_E_REASON_LOW_RSSI 1 /* roamed due to low RSSI */ +#define WLC_E_REASON_DEAUTH 2 /* roamed due to DEAUTH indication */ +#define WLC_E_REASON_DISASSOC 3 /* roamed due to DISASSOC indication */ +#define WLC_E_REASON_BCNS_LOST 4 /* roamed due to lost beacons */ +#define WLC_E_REASON_FAST_ROAM_FAILED 5 /* roamed due to fast roam failure */ +#define WLC_E_REASON_DIRECTED_ROAM 6 /* roamed due to request by AP */ +#define WLC_E_REASON_TSPEC_REJECTED 7 /* roamed due to TSPEC rejection */ +#define WLC_E_REASON_BETTER_AP 8 /* roamed due to finding better AP */ + +/* prune reason codes */ +#define WLC_E_PRUNE_ENCR_MISMATCH 1 /* ecryption mismatch */ +#define WLC_E_PRUNE_BCAST_BSSID 2 /* AP uses a broadcast BSSID */ +#define WLC_E_PRUNE_MAC_DENY 3 /* STA's MAC addr is in AP's MAC deny list */ +#define WLC_E_PRUNE_MAC_NA 4 /* STA's MAC addr is not in AP's MAC allow list */ +#define WLC_E_PRUNE_REG_PASSV 5 /* AP not allowed due to regulatory restriction */ +#define WLC_E_PRUNE_SPCT_MGMT 6 /* AP does not support STA locale spectrum mgmt */ +#define WLC_E_PRUNE_RADAR 7 /* AP is on a radar channel of STA locale */ +#define WLC_E_RSN_MISMATCH 8 /* STA does not support AP's RSN */ +#define WLC_E_PRUNE_NO_COMMON_RATES 9 /* No rates in common with AP */ +#define WLC_E_PRUNE_BASIC_RATES 10 /* STA does not support all basic rates of BSS */ +#define WLC_E_PRUNE_CCXFAST_PREVAP 11 /* CCX FAST ROAM: prune previous AP */ +#define WLC_E_PRUNE_CIPHER_NA 12 /* BSS's cipher not supported */ +#define WLC_E_PRUNE_KNOWN_STA 13 /* AP is already known to us as a STA */ +#define WLC_E_PRUNE_CCXFAST_DROAM 14 /* CCX FAST ROAM: prune unqulified AP */ +#define WLC_E_PRUNE_WDS_PEER 15 /* AP is already known to us as a WDS peer */ +#define WLC_E_PRUNE_QBSS_LOAD 16 /* QBSS LOAD - AAC is too low */ +#define WLC_E_PRUNE_HOME_AP 17 /* prune home AP */ + +/* WLC_SET_CALLBACK data type */ +typedef struct wlc_event_cb { + void (*fn)(void *, bcm_event_t *); /* Callback function */ + void *context; /* Passed to callback function */ +} wlc_event_cb_t; + +#undef PACKED +#if !defined(__GNUC__) +#pragma pack() +#endif /* PACKED */ + +#endif /* _BCMEVENT_H_ */ diff --git a/openwrt/package/wlc/src/include/proto/ethernet.h b/openwrt/package/wlc/src/include/proto/ethernet.h new file mode 100644 index 00000000000..03fd4f654cd --- /dev/null +++ b/openwrt/package/wlc/src/include/proto/ethernet.h @@ -0,0 +1,165 @@ +/* + * From FreeBSD 2.2.7: Fundamental constants relating to ethernet. + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: ethernet.h,v 1.1.1.14 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _NET_ETHERNET_H_ /* use native BSD ethernet.h when available */ +#define _NET_ETHERNET_H_ + +#ifndef _TYPEDEFS_H_ +#include "typedefs.h" +#endif + +/* enable structure packing */ +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#pragma pack(1) +#define PACKED +#endif + +/* + * The number of bytes in an ethernet (MAC) address. + */ +#define ETHER_ADDR_LEN 6 + +/* + * The number of bytes in the type field. + */ +#define ETHER_TYPE_LEN 2 + +/* + * The number of bytes in the trailing CRC field. + */ +#define ETHER_CRC_LEN 4 + +/* + * The length of the combined header. + */ +#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN) + +/* + * The minimum packet length. + */ +#define ETHER_MIN_LEN 64 + +/* + * The minimum packet user data length. + */ +#define ETHER_MIN_DATA 46 + +/* + * The maximum packet length. + */ +#define ETHER_MAX_LEN 1518 + +/* + * The maximum packet user data length. + */ +#define ETHER_MAX_DATA 1500 + +/* ether types */ +#define ETHER_TYPE_IP 0x0800 /* IP */ +#define ETHER_TYPE_ARP 0x0806 /* ARP */ +#define ETHER_TYPE_8021Q 0x8100 /* 802.1Q */ +#define ETHER_TYPE_BRCM 0x886c /* Broadcom Corp. */ +#define ETHER_TYPE_802_1X 0x888e /* 802.1x */ +#ifdef BCMWPA2 +#define ETHER_TYPE_802_1X_PREAUTH 0x88c7 /* 802.1x preauthentication */ +#endif + +/* Broadcom subtype follows ethertype; First 2 bytes are reserved; Next 2 are subtype; */ +#define ETHER_BRCM_SUBTYPE_LEN 4 /* Broadcom 4 byte subtype */ +#define ETHER_BRCM_CRAM 0x1 /* Broadcom subtype cram protocol */ + +/* ether header */ +#define ETHER_DEST_OFFSET 0 /* dest address offset */ +#define ETHER_SRC_OFFSET 6 /* src address offset */ +#define ETHER_TYPE_OFFSET 12 /* ether type offset */ + +/* + * A macro to validate a length with + */ +#define ETHER_IS_VALID_LEN(foo) \ + ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) + + +#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */ +/* + * Structure of a 10Mb/s Ethernet header. + */ +struct ether_header { + uint8 ether_dhost[ETHER_ADDR_LEN]; + uint8 ether_shost[ETHER_ADDR_LEN]; + uint16 ether_type; +} PACKED; + +/* + * Structure of a 48-bit Ethernet address. + */ +struct ether_addr { + uint8 octet[ETHER_ADDR_LEN]; +} PACKED; +#endif /* !__INCif_etherh Quick and ugly hack for VxWorks */ + +/* + * Takes a pointer, sets locally admininistered + * address bit in the 48-bit Ethernet address. + */ +#define ETHER_SET_LOCALADDR(ea) (((uint8 *)(ea))[0] = (((uint8 *)(ea))[0] | 2)) + +/* + * Takes a pointer, returns true if a 48-bit multicast address + * (including broadcast, since it is all ones) + */ +#define ETHER_ISMULTI(ea) (((uint8 *)(ea))[0] & 1) + + +/* compare two ethernet addresses - assumes the pointers can be referenced as shorts */ +#define ether_cmp(a, b) (!(((short*)a)[0] == ((short*)b)[0]) | \ + !(((short*)a)[1] == ((short*)b)[1]) | \ + !(((short*)a)[2] == ((short*)b)[2])) + +/* copy an ethernet address - assumes the pointers can be referenced as shorts */ +#define ether_copy(s, d) { \ + ((short*)d)[0] = ((short*)s)[0]; \ + ((short*)d)[1] = ((short*)s)[1]; \ + ((short*)d)[2] = ((short*)s)[2]; } + +/* + * Takes a pointer, returns true if a 48-bit broadcast (all ones) + */ +#define ETHER_ISBCAST(ea) ((((uint8 *)(ea))[0] & \ + ((uint8 *)(ea))[1] & \ + ((uint8 *)(ea))[2] & \ + ((uint8 *)(ea))[3] & \ + ((uint8 *)(ea))[4] & \ + ((uint8 *)(ea))[5]) == 0xff) + +static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}}; + +/* + * Takes a pointer, returns true if a 48-bit null address (all zeros) + */ +#define ETHER_ISNULLADDR(ea) ((((uint8 *)(ea))[0] | \ + ((uint8 *)(ea))[1] | \ + ((uint8 *)(ea))[2] | \ + ((uint8 *)(ea))[3] | \ + ((uint8 *)(ea))[4] | \ + ((uint8 *)(ea))[5]) == 0) + +#undef PACKED +#if !defined(__GNUC__) +#pragma pack() +#endif + +#endif /* _NET_ETHERNET_H_ */ diff --git a/openwrt/package/wlc/src/include/proto/wpa.h b/openwrt/package/wlc/src/include/proto/wpa.h new file mode 100644 index 00000000000..dd35dbef027 --- /dev/null +++ b/openwrt/package/wlc/src/include/proto/wpa.h @@ -0,0 +1,148 @@ +/* + * Fundamental types and constants relating to WPA + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: wpa.h,v 1.1.1.4 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _proto_wpa_h_ +#define _proto_wpa_h_ + +#include <typedefs.h> +#include <proto/ethernet.h> + +/* enable structure packing */ +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#pragma pack(1) +#define PACKED +#endif + +/* Reason Codes */ + +/* 10 and 11 are from TGh. */ +#define DOT11_RC_BAD_PC 10 /* Unacceptable power capability element */ +#define DOT11_RC_BAD_CHANNELS 11 /* Unacceptable supported channels element */ +/* 12 is unused */ +/* 13 through 23 taken from P802.11i/D3.0, November 2002 */ +#define DOT11_RC_INVALID_WPA_IE 13 /* Invalid info. element */ +#define DOT11_RC_MIC_FAILURE 14 /* Michael failure */ +#define DOT11_RC_4WH_TIMEOUT 15 /* 4-way handshake timeout */ +#define DOT11_RC_GTK_UPDATE_TIMEOUT 16 /* Group key update timeout */ +#define DOT11_RC_WPA_IE_MISMATCH 17 /* WPA IE in 4-way handshake differs from + * (re-)assoc. request/probe response + */ +#define DOT11_RC_INVALID_MC_CIPHER 18 /* Invalid multicast cipher */ +#define DOT11_RC_INVALID_UC_CIPHER 19 /* Invalid unicast cipher */ +#define DOT11_RC_INVALID_AKMP 20 /* Invalid authenticated key management protocol */ +#define DOT11_RC_BAD_WPA_VERSION 21 /* Unsupported WPA version */ +#define DOT11_RC_INVALID_WPA_CAP 22 /* Invalid WPA IE capabilities */ +#define DOT11_RC_8021X_AUTH_FAIL 23 /* 802.1X authentication failure */ + +#define WPA2_PMKID_LEN 16 + +/* WPA IE fixed portion */ +typedef struct +{ + uint8 tag; /* TAG */ + uint8 length; /* TAG length */ + uint8 oui[3]; /* IE OUI */ + uint8 oui_type; /* OUI type */ + struct { + uint8 low; + uint8 high; + } PACKED version; /* IE version */ +} PACKED wpa_ie_fixed_t; +#define WPA_IE_OUITYPE_LEN 4 +#define WPA_IE_FIXED_LEN 8 +#define WPA_IE_TAG_FIXED_LEN 6 + +#ifdef BCMWPA2 +typedef struct { + uint8 tag; /* TAG */ + uint8 length; /* TAG length */ + struct { + uint8 low; + uint8 high; + } PACKED version; /* IE version */ +} PACKED wpa_rsn_ie_fixed_t; +#define WPA_RSN_IE_FIXED_LEN 4 +#define WPA_RSN_IE_TAG_FIXED_LEN 2 +typedef uint8 wpa_pmkid_t[WPA2_PMKID_LEN]; +#endif + +/* WPA suite/multicast suite */ +typedef struct +{ + uint8 oui[3]; + uint8 type; +} PACKED wpa_suite_t, wpa_suite_mcast_t; +#define WPA_SUITE_LEN 4 + +/* WPA unicast suite list/key management suite list */ +typedef struct +{ + struct { + uint8 low; + uint8 high; + } PACKED count; + wpa_suite_t list[1]; +} PACKED wpa_suite_ucast_t, wpa_suite_auth_key_mgmt_t; +#define WPA_IE_SUITE_COUNT_LEN 2 +#ifdef BCMWPA2 +typedef struct +{ + struct { + uint8 low; + uint8 high; + } PACKED count; + wpa_pmkid_t list[1]; +} PACKED wpa_pmkid_list_t; +#endif + +/* WPA cipher suites */ +#define WPA_CIPHER_NONE 0 /* None */ +#define WPA_CIPHER_WEP_40 1 /* WEP (40-bit) */ +#define WPA_CIPHER_TKIP 2 /* TKIP: default for WPA */ +#define WPA_CIPHER_AES_OCB 3 /* AES (OCB) */ +#define WPA_CIPHER_AES_CCM 4 /* AES (CCM) */ +#define WPA_CIPHER_WEP_104 5 /* WEP (104-bit) */ + +#define IS_WPA_CIPHER(cipher) ((cipher) == WPA_CIPHER_NONE || \ + (cipher) == WPA_CIPHER_WEP_40 || \ + (cipher) == WPA_CIPHER_WEP_104 || \ + (cipher) == WPA_CIPHER_TKIP || \ + (cipher) == WPA_CIPHER_AES_OCB || \ + (cipher) == WPA_CIPHER_AES_CCM) + +/* WPA TKIP countermeasures parameters */ +#define WPA_TKIP_CM_DETECT 60 /* multiple MIC failure window (seconds) */ +#define WPA_TKIP_CM_BLOCK 60 /* countermeasures active window (seconds) */ + +/* WPA capabilities defined in 802.11i */ +#define WPA_CAP_4_REPLAY_CNTRS 2 +#define WPA_CAP_16_REPLAY_CNTRS 3 +#define WPA_CAP_REPLAY_CNTR_SHIFT 2 +#define WPA_CAP_REPLAY_CNTR_MASK 0x000c + +/* WPA Specific defines */ +#define WPA_CAP_LEN 2 /* Length of RSN capabilities in RSN IE (2 octets) */ + +#ifdef BCMWPA2 +#define WPA_CAP_WPA2_PREAUTH 1 +#endif /* BCMWPA2 */ + +#undef PACKED +#if !defined(__GNUC__) +#pragma pack() +#endif + +#endif /* _proto_wpa_h_ */ diff --git a/openwrt/package/wlc/src/include/typedefs.h b/openwrt/package/wlc/src/include/typedefs.h new file mode 100644 index 00000000000..6c498bbcb2a --- /dev/null +++ b/openwrt/package/wlc/src/include/typedefs.h @@ -0,0 +1,230 @@ +/* + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id: typedefs.h,v 1.1.1.12 2006/04/08 06:13:40 honor Exp $ + */ + +#ifndef _TYPEDEFS_H_ +#define _TYPEDEFS_H_ + +/* + * Inferred Typedefs + * + */ + +/* Infer the compile environment based on preprocessor symbols and pramas. + * Override type definitions as needed, and include configuration dependent + * header files to define types. + */ + +#ifdef __cplusplus + +#define TYPEDEF_BOOL +#ifndef FALSE +#define FALSE false +#endif +#ifndef TRUE +#define TRUE true +#endif + +#endif /* __cplusplus */ + +#if defined(_NEED_SIZE_T_) +typedef long unsigned int size_t; +#endif + +#define TYPEDEF_UINT +#define TYPEDEF_USHORT +#define TYPEDEF_ULONG + + +/* Do not support the (u)int64 types with strict ansi for GNU C */ +#if defined(__GNUC__) && defined(__STRICT_ANSI__) +#define TYPEDEF_INT64 +#define TYPEDEF_UINT64 +#endif + +/* pick up ushort & uint from standard types.h */ +#if defined(linux) && defined(__KERNEL__) +#include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */ +#else +#include <sys/types.h> +#endif + +/* use the default typedefs in the next section of this file */ +#define USE_TYPEDEF_DEFAULTS + +/* + * Default Typedefs + * + */ + +#ifdef USE_TYPEDEF_DEFAULTS +#undef USE_TYPEDEF_DEFAULTS + +#ifndef TYPEDEF_BOOL +typedef /* @abstract@ */ unsigned char bool; +#endif + +/* define uchar, ushort, uint, ulong */ + +#ifndef TYPEDEF_UCHAR +typedef unsigned char uchar; +#endif + +#ifndef TYPEDEF_USHORT +typedef unsigned short ushort; +#endif + +#ifndef TYPEDEF_UINT +typedef unsigned int uint; +#endif + +#ifndef TYPEDEF_ULONG +typedef unsigned long ulong; +#endif + +/* define [u]int8/16/32/64, uintptr */ + +#ifndef TYPEDEF_UINT8 +typedef unsigned char uint8; +#endif + +#ifndef TYPEDEF_UINT16 +typedef unsigned short uint16; +#endif + +#ifndef TYPEDEF_UINT32 +typedef unsigned int uint32; +#endif + +#ifndef TYPEDEF_UINT64 +typedef unsigned long long uint64; +#endif + +#ifndef TYPEDEF_UINTPTR +typedef unsigned int uintptr; +#endif + +#ifndef TYPEDEF_INT8 +typedef signed char int8; +#endif + +#ifndef TYPEDEF_INT16 +typedef signed short int16; +#endif + +#ifndef TYPEDEF_INT32 +typedef signed int int32; +#endif + +#ifndef TYPEDEF_INT64 +typedef signed long long int64; +#endif + +/* define float32/64, float_t */ + +#ifndef TYPEDEF_FLOAT32 +typedef float float32; +#endif + +#ifndef TYPEDEF_FLOAT64 +typedef double float64; +#endif + +/* + * abstracted floating point type allows for compile time selection of + * single or double precision arithmetic. Compiling with -DFLOAT32 + * selects single precision; the default is double precision. + */ + +#ifndef TYPEDEF_FLOAT_T + +#if defined(FLOAT32) +typedef float32 float_t; +#else /* default to double precision floating point */ +typedef float64 float_t; +#endif + +#endif /* TYPEDEF_FLOAT_T */ + +/* define macro values */ + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef TRUE +#define TRUE 1 /* TRUE */ +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef OFF +#define OFF 0 +#endif + +#ifndef ON +#define ON 1 /* ON = 1 */ +#endif + +#define AUTO (-1) /* Auto = -1 */ + +/* define PTRSZ, INLINE */ + +#ifndef PTRSZ +#define PTRSZ sizeof(char*) +#endif + +#ifndef INLINE + +#ifdef _MSC_VER + +#define INLINE __inline + +#elif __GNUC__ + +#define INLINE __inline__ + +#else + +#define INLINE + +#endif /* _MSC_VER */ + +#endif /* INLINE */ + +#undef TYPEDEF_BOOL +#undef TYPEDEF_UCHAR +#undef TYPEDEF_USHORT +#undef TYPEDEF_UINT +#undef TYPEDEF_ULONG +#undef TYPEDEF_UINT8 +#undef TYPEDEF_UINT16 +#undef TYPEDEF_UINT32 +#undef TYPEDEF_UINT64 +#undef TYPEDEF_UINTPTR +#undef TYPEDEF_INT8 +#undef TYPEDEF_INT16 +#undef TYPEDEF_INT32 +#undef TYPEDEF_INT64 +#undef TYPEDEF_FLOAT32 +#undef TYPEDEF_FLOAT64 +#undef TYPEDEF_FLOAT_T + +#endif /* USE_TYPEDEF_DEFAULTS */ + +/* + * Including the bcmdefs.h here, to make sure everyone including typedefs.h + * gets this automatically +*/ +#include <bcmdefs.h> + +#endif /* _TYPEDEFS_H_ */ diff --git a/openwrt/package/wlc/src/include/wlioctl.h b/openwrt/package/wlc/src/include/wlioctl.h new file mode 100644 index 00000000000..0558415d339 --- /dev/null +++ b/openwrt/package/wlc/src/include/wlioctl.h @@ -0,0 +1,1384 @@ +/* + * Custom OID/ioctl definitions for + * Broadcom 802.11abg Networking Device Driver + * + * Definitions subject to change without notice. + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: wlioctl.h,v 1.1.1.22 2006/04/15 01:29:08 michael Exp $ + */ + +#ifndef _wlioctl_h_ +#define _wlioctl_h_ + +#include <typedefs.h> +#include <proto/ethernet.h> +#include <proto/bcmeth.h> +#include <proto/bcmevent.h> +#include <proto/802.11.h> + +#ifdef __NetBSD__ +/* NetBSD 2.0 does not have SIOCDEVPRIVATE. This is NetBSD 2.0 specific */ +#define SIOCDEVPRIVATE _IOWR('i', 139, struct ifreq) +#endif + +/* require default structure packing */ +#if !defined(__GNUC__) +#pragma pack(push, 8) +#endif + +/* A chanspec holds the channel number, band, bandwidth and control sideband */ +typedef uint16 chanspec_t; +#define WL_CHANSPEC_CHAN_MASK 0x00ff + +#define WL_CHANSPEC_CTL_SB_MASK 0x0300 +#define WL_CHANSPEC_CTL_SB_SHIFT 8 +#define WL_CHANSPEC_CTL_SB_LOWER 0x0100 +#define WL_CHANSPEC_CTL_SB_UPPER 0x0200 +#define WL_CHANSPEC_CTL_SB_NONE 0x0300 + +#define WL_CHANSPEC_BW_MASK 0x0C00 +#define WL_CHANSPEC_BW_SHIFT 10 +#define WL_CHANSPEC_BW_10 0x0400 +#define WL_CHANSPEC_BW_20 0x0800 +#define WL_CHANSPEC_BW_40 0x0C00 + +#define WL_CHANSPEC_BAND_MASK 0xf000 +#define WL_CHANSPEC_BAND_SHIFT 12 +#define WL_CHANSPEC_BAND_5G 0x1000 +#define WL_CHANSPEC_BAND_2G 0x2000 +#define INVCHANSPEC 255 + +/* Legacy structure to help keep backward compatible wl tool and tray app */ + +#define LEGACY_WL_BSS_INFO_VERSION 107 /* older version of wl_bss_info struct */ + +typedef struct wl_bss_info_107 { + uint32 version; /* version field */ + uint32 length; /* byte length of data in this record, + * starting at version and including IEs + */ + struct ether_addr BSSID; + uint16 beacon_period; /* units are Kusec */ + uint16 capability; /* Capability information */ + uint8 SSID_len; + uint8 SSID[32]; + struct { + uint count; /* # rates in this set */ + uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ + } rateset; /* supported rates */ + uint8 channel; /* Channel no. */ + uint16 atim_window; /* units are Kusec */ + uint8 dtim_period; /* DTIM period */ + int16 RSSI; /* receive signal strength (in dBm) */ + int8 phy_noise; /* noise (in dBm) */ + uint32 ie_length; /* byte length of Information Elements */ + /* variable length Information Elements */ +} wl_bss_info_107_t; + +/* + * Per-bss information structure. + */ + +#define WL_BSS_INFO_VERSION 108 /* current version of wl_bss_info struct */ + +/* BSS info structure + * Applications MUST CHECK ie_offset field and length field to access IEs and + * next bss_info structure in a vector (in wl_scan_results_t) + */ +typedef struct wl_bss_info { + uint32 version; /* version field */ + uint32 length; /* byte length of data in this record, + * starting at version and including IEs + */ + struct ether_addr BSSID; + uint16 beacon_period; /* units are Kusec */ + uint16 capability; /* Capability information */ + uint8 SSID_len; + uint8 SSID[32]; + struct { + uint count; /* # rates in this set */ + uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ + } rateset; /* supported rates */ + chanspec_t chanspec; /* chanspec for bss */ + uint16 atim_window; /* units are Kusec */ + uint8 dtim_period; /* DTIM period */ + int16 RSSI; /* receive signal strength (in dBm) */ + int8 phy_noise; /* noise (in dBm) */ + + bool n_cap; /* BSS is 802.11N Capable */ + uint32 nbss_cap; /* 802.11N BSS Capabilities (based on EWC_CAP_*) */ + uint8 ctl_ch; /* 802.11N BSS control channel number */ + uint32 reserved[2]; /* Reserved for expansion of BSS properties */ + uint8 basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */ + + uint16 ie_offset; /* offset at which IEs start, from beginning */ + uint32 ie_length; /* byte length of Information Elements */ + /* Add new fields here */ + /* variable length Information Elements */ +} wl_bss_info_t; + +typedef struct wlc_ssid { + uint32 SSID_len; + uchar SSID[32]; +} wlc_ssid_t; + +typedef struct wl_scan_params { + wlc_ssid_t ssid; /* default: {0, ""} */ + struct ether_addr bssid; /* default: bcast */ + int8 bss_type; /* default: any, + * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT + */ + int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */ + int32 nprobes; /* -1 use default, number of probes per channel */ + int32 active_time; /* -1 use default, dwell time per channel for + * active scanning + */ + int32 passive_time; /* -1 use default, dwell time per channel + * for passive scanning + */ + int32 home_time; /* -1 use default, dwell time for the home channel + * between channel scans + */ + int32 channel_num; /* 0 use default (all available channels), count of + * channels in channel_list + */ + uint16 channel_list[1]; /* list of chanspecs */ +} wl_scan_params_t; +/* size of wl_scan_params not including variable length array */ +#define WL_SCAN_PARAMS_FIXED_SIZE 64 + +typedef struct wl_scan_results { + uint32 buflen; + uint32 version; + uint32 count; + wl_bss_info_t bss_info[1]; +} wl_scan_results_t; +/* size of wl_scan_results not including variable length array */ +#define WL_SCAN_RESULTS_FIXED_SIZE 12 + + +#define WL_NUMRATES 255 /* max # of rates in a rateset */ +typedef struct wl_rateset { + uint32 count; /* # rates in this set */ + uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */ +} wl_rateset_t; + +/* uint32 list */ +typedef struct wl_uint32_list { + /* in - # of elements, out - # of entries */ + uint32 count; + /* variable length uint32 list */ + uint32 element[1]; +} wl_uint32_list_t; + +#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */ + +/* defines used by the nrate iovar */ +#define NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */ +#define NRATE_RATE_MASK 0x0000007f /* rate/mcs value */ +#define NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */ +#define NRATE_STF_SHIFT 8 /* stf mode shift */ + +#define ANTENNA_NUM_1 1 /* total number of antennas to be used */ +#define ANTENNA_NUM_2 2 +#define ANTENNA_NUM_3 3 +#define ANTENNA_NUM_4 4 + +typedef struct wl_channels_in_country { + uint32 buflen; + uint32 band; + char country_abbrev[WLC_CNTRY_BUF_SZ]; + uint32 count; + uint32 channel[1]; +} wl_channels_in_country_t; + +typedef struct wl_country_list { + uint32 buflen; + uint32 band_set; + uint32 band; + uint32 count; + char country_abbrev[1]; +} wl_country_list_t; + +#define WL_RM_TYPE_BASIC 1 +#define WL_RM_TYPE_CCA 2 +#define WL_RM_TYPE_RPI 3 + +#define WL_RM_FLAG_PARALLEL (1<<0) + +#define WL_RM_FLAG_LATE (1<<1) +#define WL_RM_FLAG_INCAPABLE (1<<2) +#define WL_RM_FLAG_REFUSED (1<<3) + +typedef struct wl_rm_req_elt { + int8 type; + int8 flags; + chanspec_t chanspec; + uint32 token; /* token for this measurement */ + uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ + uint32 tsf_l; /* TSF low 32-bits */ + uint32 dur; /* TUs */ +} wl_rm_req_elt_t; + +typedef struct wl_rm_req { + uint32 token; /* overall measurement set token */ + uint32 count; /* number of measurement requests */ + wl_rm_req_elt_t req[1]; /* variable length block of requests */ +} wl_rm_req_t; +#define WL_RM_REQ_FIXED_LEN 8 + +typedef struct wl_rm_rep_elt { + int8 type; + int8 flags; + chanspec_t chanspec; + uint32 token; /* token for this measurement */ + uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ + uint32 tsf_l; /* TSF low 32-bits */ + uint32 dur; /* TUs */ + uint32 len; /* byte length of data block */ + uint8 data[1]; /* variable length data block */ +} wl_rm_rep_elt_t; +#define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */ + +#define WL_RPI_REP_BIN_NUM 8 +typedef struct wl_rm_rpi_rep { + uint8 rpi[WL_RPI_REP_BIN_NUM]; + int8 rpi_max[WL_RPI_REP_BIN_NUM]; +} wl_rm_rpi_rep_t; + +typedef struct wl_rm_rep { + uint32 token; /* overall measurement set token */ + uint32 len; /* length of measurement report block */ + wl_rm_rep_elt_t rep[1]; /* variable length block of reports */ +} wl_rm_rep_t; +#define WL_RM_REP_FIXED_LEN 8 + + +#if defined(BCMSUP_PSK) +typedef enum sup_auth_status { + WLC_SUP_DISCONNECTED = 0, + WLC_SUP_CONNECTING, + WLC_SUP_IDREQUIRED, + WLC_SUP_AUTHENTICATING, + WLC_SUP_AUTHENTICATED, + WLC_SUP_KEYXCHANGE, + WLC_SUP_KEYED, + WLC_SUP_TIMEOUT +} sup_auth_status_t; +#endif /* BCMCCX | BCMSUP_PSK */ + +/* Enumerate crypto algorithms */ +#define CRYPTO_ALGO_OFF 0 +#define CRYPTO_ALGO_WEP1 1 +#define CRYPTO_ALGO_TKIP 2 +#define CRYPTO_ALGO_WEP128 3 +#define CRYPTO_ALGO_AES_CCM 4 +#define CRYPTO_ALGO_AES_OCB_MSDU 5 +#define CRYPTO_ALGO_AES_OCB_MPDU 6 +#define CRYPTO_ALGO_NALG 7 + +#define WSEC_GEN_MIC_ERROR 0x0001 +#define WSEC_GEN_REPLAY 0x0002 + +#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */ +#define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ +#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */ +#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */ + +typedef struct wl_wsec_key { + uint32 index; /* key index */ + uint32 len; /* key length */ + uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */ + uint32 pad_1[18]; + uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ + uint32 flags; /* misc flags */ + uint32 pad_2[2]; + int pad_3; + int iv_initialized; /* has IV been initialized already? */ + int pad_4; + /* Rx IV */ + struct { + uint32 hi; /* upper 32 bits of IV */ + uint16 lo; /* lower 16 bits of IV */ + } rxiv; + uint32 pad_5[2]; + struct ether_addr ea; /* per station */ +} wl_wsec_key_t; + +#define WSEC_MIN_PSK_LEN 8 +#define WSEC_MAX_PSK_LEN 64 + +/* Flag for key material needing passhash'ing */ +#define WSEC_PASSPHRASE (1<<0) + +/* receptacle for WLC_SET_WSEC_PMK parameter */ +typedef struct { + ushort key_len; /* octets in key material */ + ushort flags; /* key handling qualification */ + uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */ +} wsec_pmk_t; + +/* wireless security bitvec */ +#define WEP_ENABLED 0x0001 +#define TKIP_ENABLED 0x0002 +#define AES_ENABLED 0x0004 +#define WSEC_SWFLAG 0x0008 +#define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */ +#define FIPS_ENABLED 0x0080 + +/* WPA authentication mode bitvec */ +#define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */ +#define WPA_AUTH_NONE 0x0001 /* none (IBSS) */ +#define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */ +#define WPA_AUTH_PSK 0x0004 /* Pre-shared key */ +/* #define WPA_AUTH_8021X 0x0020 */ /* 802.1x, reserved */ +#ifdef BCMWPA2 +#define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */ +#define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */ +#endif /* BCMWPA2 */ + +#ifdef BCMWPA2 +/* pmkid */ +#define MAXPMKID 16 + +typedef struct _pmkid +{ + struct ether_addr BSSID; + uint8 PMKID[WPA2_PMKID_LEN]; +} pmkid_t; + +typedef struct _pmkid_list +{ + uint32 npmkid; + pmkid_t pmkid[1]; +} pmkid_list_t; + +typedef struct _pmkid_cand { + struct ether_addr BSSID; + uint8 preauth; +} pmkid_cand_t; + +typedef struct _pmkid_cand_list { + uint32 npmkid_cand; + pmkid_cand_t pmkid_cand[1]; +} pmkid_cand_list_t; +#endif /* BCMWPA2 */ + +typedef struct wl_led_info { + uint32 index; /* led index */ + uint32 behavior; + bool activehi; +} wl_led_info_t; + +typedef struct wlc_assoc_info { + uint32 req_len; + uint32 resp_len; + uint32 flags; + struct dot11_assoc_req req; + struct ether_addr reassoc_bssid; /* used in reassoc's */ + struct dot11_assoc_resp resp; +} wl_assoc_info_t; +/* flags */ +#define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc */ +/* srom read/write struct passed through ioctl */ +typedef struct { + uint byteoff; /* byte offset */ + uint nbytes; /* number of bytes */ + uint16 buf[1]; +} srom_rw_t; + +/* R_REG and W_REG struct passed through ioctl */ +typedef struct { + uint32 byteoff; /* byte offset of the field in d11regs_t */ + uint32 val; /* read/write value of the field */ + uint32 size; /* sizeof the field */ + uint band; /* band (optional) */ +} rw_reg_t; + +/* Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band */ +/* PCL - Power Control Loop */ +/* current gain setting is replaced by user input */ +#define WL_ATTEN_APP_INPUT_PCL_OFF 0 /* turn off PCL, apply supplied input */ +#define WL_ATTEN_PCL_ON 1 /* turn on PCL */ +/* current gain setting is maintained */ +#define WL_ATTEN_PCL_OFF 2 /* turn off PCL. */ +typedef struct { + uint16 auto_ctrl; /* WL_ATTEN_XX */ + uint16 bb; /* Baseband attenuation */ + uint16 radio; /* Radio attenuation */ + uint16 txctl1; /* Radio TX_CTL1 value */ +} atten_t; + +/* defines used by poweridx iovar - it controls power in a-band */ +/* current gain setting is maintained */ +#define WL_PWRIDX_PCL_OFF -2 /* turn off PCL. */ +#define WL_PWRIDX_PCL_ON -1 /* turn on PCL */ +#define WL_PWRIDX_LOWER_LIMIT -2 /* lower limit */ +#define WL_PWRIDX_UPPER_LIMIT 63 /* upper limit */ +/* value >= 0 causes + * - input to be set to that value + * - PCL to be off + */ + +/* Used to get specific STA parameters */ +typedef struct { + uint32 val; + struct ether_addr ea; +} scb_val_t; + + +/* Event data type */ +typedef struct wlc_event { + wl_event_msg_t event; /* encapsulated event */ + struct ether_addr *addr; /* used to keep a trace of the potential present of + * an address in wlc_event_msg_t + */ + void *data; /* used to hang additional data on an event */ + struct wlc_event *next; /* enables ordered list of pending events */ +} wlc_event_t; + +#define BCM_MAC_STATUS_INDICATION (0x40010200L) + +/* Please update the following when modifying this structure: + * StaInfo Twiki page flags section - description of the sta_info_t struct + * src/wl/exe/wlu.c - print of sta_info_t + * Pay attention to version if structure changes. + */ +typedef struct { + uint16 ver; /* version of this struct */ + uint16 len; /* length in bytes of this structure */ + uint16 cap; /* sta's advertised capabilities */ + uint32 flags; /* flags defined below */ + uint32 idle; /* time since data pkt rx'd from sta */ + struct ether_addr ea; /* Station address */ + wl_rateset_t rateset; /* rateset in use */ + uint32 in; /* seconds elapsed since associated */ + uint32 listen_interval_inms; /* Min Listen interval in ms for this STA */ +} sta_info_t; + +#define WL_STA_VER 2 + +/* Flags for sta_info_t indicating properties of STA */ +#define WL_STA_BRCM 0x1 /* Running a Broadcom driver */ +#define WL_STA_WME 0x2 /* WMM association */ +#define WL_STA_ABCAP 0x4 /* Afterburner-capable */ +#define WL_STA_AUTHE 0x8 /* Authenticated */ +#define WL_STA_ASSOC 0x10 /* Associated */ +#define WL_STA_AUTHO 0x20 /* Authorized */ +#define WL_STA_WDS 0x40 /* Wireless Distribution System */ +#define WL_STA_WDS_LINKUP 0x80 /* WDS traffic/probes flowing properly */ +#define WL_STA_PS 0x100 /* STA is in power save mode from AP's viewpoint */ +#define WL_STA_APSD_BE 0x200 /* APSD delv/trigger for AC_BE is default enabled */ +#define WL_STA_APSD_BK 0x400 /* APSD delv/trigger for AC_BK is default enabled */ +#define WL_STA_APSD_VI 0x800 /* APSD delv/trigger for AC_VI is default enabled */ +#define WL_STA_APSD_VO 0x1000 /* APSD delv/trigger for AC_VO is default enabled */ +#define WL_STA_N_CAP 0x2000 /* STA 802.11n capable */ + +#define WL_WDS_LINKUP WL_STA_WDS_LINKUP /* deprecated */ + +/* + * Country locale determines which channels are available to us. + */ +typedef enum _wlc_locale { + WLC_WW = 0, /* Worldwide */ + WLC_THA, /* Thailand */ + WLC_ISR, /* Israel */ + WLC_JDN, /* Jordan */ + WLC_PRC, /* China */ + WLC_JPN, /* Japan */ + WLC_FCC, /* USA */ + WLC_EUR, /* Europe */ + WLC_USL, /* US Low Band only */ + WLC_JPH, /* Japan High Band only */ + WLC_ALL, /* All the channels in this band */ + WLC_11D, /* Represents locale received by 11d beacons */ + WLC_LAST_LOCALE, + WLC_UNDEFINED_LOCALE = 0xf +} wlc_locale_t; + +/* channel encoding */ +typedef struct channel_info { + int hw_channel; + int target_channel; + int scan_channel; +} channel_info_t; + +/* For ioctls that take a list of MAC addresses */ +struct maclist { + uint count; /* number of MAC addresses */ + struct ether_addr ea[1]; /* variable length array of MAC addresses */ +}; + +/* get pkt count struct passed through ioctl */ +typedef struct get_pktcnt { + uint rx_good_pkt; + uint rx_bad_pkt; + uint tx_good_pkt; + uint tx_bad_pkt; +} get_pktcnt_t; + +/* Linux network driver ioctl encoding */ +typedef struct wl_ioctl { + uint cmd; /* common ioctl definition */ + void *buf; /* pointer to user buffer */ + uint len; /* length of user buffer */ + bool set; /* get or set request (optional) */ + uint used; /* bytes read or written (optional) */ + uint needed; /* bytes needed (optional) */ +} wl_ioctl_t; + +/* + * Structure for passing hardware and software + * revision info up from the driver. + */ +typedef struct wlc_rev_info { + uint vendorid; /* PCI vendor id */ + uint deviceid; /* device id of chip */ + uint radiorev; /* radio revision */ + uint chiprev; /* chip revision */ + uint corerev; /* core revision */ + uint boardid; /* board identifier (usu. PCI sub-device id) */ + uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */ + uint boardrev; /* board revision */ + uint driverrev; /* driver version */ + uint ucoderev; /* microcode version */ + uint bus; /* bus type */ + uint chipnum; /* chip number */ +} wlc_rev_info_t; + +#define WL_BRAND_MAX 10 +typedef struct wl_instance_info { + uint instance; + char brand[WL_BRAND_MAX]; +} wl_instance_info_t; + +/* check this magic number */ +#define WLC_IOCTL_MAGIC 0x14e46c77 + +/* bump this number if you change the ioctl interface */ +#define WLC_IOCTL_VERSION 1 + +#define WLC_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */ +#define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */ + +/* common ioctl definitions */ +#define WLC_GET_MAGIC 0 +#define WLC_GET_VERSION 1 +#define WLC_UP 2 +#define WLC_DOWN 3 +#define WLC_DUMP 6 +#define WLC_GET_MSGLEVEL 7 +#define WLC_SET_MSGLEVEL 8 +#define WLC_GET_PROMISC 9 +#define WLC_SET_PROMISC 10 +#define WLC_GET_RATE 12 +/* #define WLC_SET_RATE 13 */ /* no longer supported */ +#define WLC_GET_INSTANCE 14 +/* #define WLC_GET_FRAG 15 */ /* no longer supported */ +/* #define WLC_SET_FRAG 16 */ /* no longer supported */ +/* #define WLC_GET_RTS 17 */ /* no longer supported */ +/* #define WLC_SET_RTS 18 */ /* no longer supported */ +#define WLC_GET_INFRA 19 +#define WLC_SET_INFRA 20 +#define WLC_GET_AUTH 21 +#define WLC_SET_AUTH 22 +#define WLC_GET_BSSID 23 +#define WLC_SET_BSSID 24 +#define WLC_GET_SSID 25 +#define WLC_SET_SSID 26 +#define WLC_RESTART 27 +#define WLC_GET_CHANNEL 29 +#define WLC_SET_CHANNEL 30 +#define WLC_GET_SRL 31 +#define WLC_SET_SRL 32 +#define WLC_GET_LRL 33 +#define WLC_SET_LRL 34 +#define WLC_GET_PLCPHDR 35 +#define WLC_SET_PLCPHDR 36 +#define WLC_GET_RADIO 37 +#define WLC_SET_RADIO 38 +#define WLC_GET_PHYTYPE 39 +/* #define WLC_GET_WEP 42 */ /* no longer supported */ +/* #define WLC_SET_WEP 43 */ /* no longer supported */ +#define WLC_GET_KEY 44 +#define WLC_SET_KEY 45 +#define WLC_GET_REGULATORY 46 +#define WLC_SET_REGULATORY 47 +#define WLC_GET_PASSIVE 48 +#define WLC_SET_PASSIVE 49 +#define WLC_SCAN 50 +#define WLC_SCAN_RESULTS 51 +#define WLC_DISASSOC 52 +#define WLC_REASSOC 53 +#define WLC_GET_ROAM_TRIGGER 54 +#define WLC_SET_ROAM_TRIGGER 55 +#define WLC_GET_TXANT 61 +#define WLC_SET_TXANT 62 +#define WLC_GET_ANTDIV 63 +#define WLC_SET_ANTDIV 64 +/* #define WLC_GET_TXPWR 65 */ /* no longer supported */ +/* #define WLC_SET_TXPWR 66 */ /* no longer supported */ +#define WLC_GET_CLOSED 67 +#define WLC_SET_CLOSED 68 +#define WLC_GET_MACLIST 69 +#define WLC_SET_MACLIST 70 +#define WLC_GET_RATESET 71 +#define WLC_SET_RATESET 72 +#define WLC_GET_LOCALE 73 +#define WLC_LONGTRAIN 74 +#define WLC_GET_BCNPRD 75 +#define WLC_SET_BCNPRD 76 +#define WLC_GET_DTIMPRD 77 +#define WLC_SET_DTIMPRD 78 +#define WLC_GET_SROM 79 +#define WLC_SET_SROM 80 +#define WLC_GET_WEP_RESTRICT 81 +#define WLC_SET_WEP_RESTRICT 82 +#define WLC_GET_COUNTRY 83 +#define WLC_SET_COUNTRY 84 +#define WLC_GET_PM 85 +#define WLC_SET_PM 86 +#define WLC_GET_WAKE 87 +#define WLC_SET_WAKE 88 +#define WLC_GET_D11CNTS 89 +#define WLC_GET_FORCELINK 90 /* ndis only */ +#define WLC_SET_FORCELINK 91 /* ndis only */ +#define WLC_FREQ_ACCURACY 92 +#define WLC_CARRIER_SUPPRESS 93 +#define WLC_GET_PHYREG 94 +#define WLC_SET_PHYREG 95 +#define WLC_GET_RADIOREG 96 +#define WLC_SET_RADIOREG 97 +#define WLC_GET_REVINFO 98 +#define WLC_GET_UCANTDIV 99 +#define WLC_SET_UCANTDIV 100 +#define WLC_R_REG 101 +#define WLC_W_REG 102 +#define WLC_DIAG_LOOPBACK 103 +#define WLC_RESET_D11CNTS 104 +#define WLC_GET_MACMODE 105 +#define WLC_SET_MACMODE 106 +#define WLC_GET_MONITOR 107 +#define WLC_SET_MONITOR 108 +#define WLC_GET_GMODE 109 +#define WLC_SET_GMODE 110 +#define WLC_GET_LEGACY_ERP 111 +#define WLC_SET_LEGACY_ERP 112 +#define WLC_GET_RX_ANT 113 +#define WLC_GET_CURR_RATESET 114 /* current rateset */ +#define WLC_GET_SCANSUPPRESS 115 +#define WLC_SET_SCANSUPPRESS 116 +#define WLC_GET_AP 117 +#define WLC_SET_AP 118 +#define WLC_GET_EAP_RESTRICT 119 +#define WLC_SET_EAP_RESTRICT 120 +#define WLC_SCB_AUTHORIZE 121 +#define WLC_SCB_DEAUTHORIZE 122 +#define WLC_GET_WDSLIST 123 +#define WLC_SET_WDSLIST 124 +#define WLC_GET_ATIM 125 +#define WLC_SET_ATIM 126 +#define WLC_GET_RSSI 127 +#define WLC_GET_PHYANTDIV 128 +#define WLC_SET_PHYANTDIV 129 +#define WLC_AP_RX_ONLY 130 +#define WLC_GET_TX_PATH_PWR 131 +#define WLC_SET_TX_PATH_PWR 132 +#define WLC_GET_WSEC 133 +#define WLC_SET_WSEC 134 +#define WLC_GET_PHY_NOISE 135 +#define WLC_GET_BSS_INFO 136 +#define WLC_GET_PKTCNTS 137 +#define WLC_GET_LAZYWDS 138 +#define WLC_SET_LAZYWDS 139 +#define WLC_GET_BANDLIST 140 +#define WLC_GET_BAND 141 +#define WLC_SET_BAND 142 +#define WLC_SCB_DEAUTHENTICATE 143 +#define WLC_GET_SHORTSLOT 144 +#define WLC_GET_SHORTSLOT_OVERRIDE 145 +#define WLC_SET_SHORTSLOT_OVERRIDE 146 +#define WLC_GET_SHORTSLOT_RESTRICT 147 +#define WLC_SET_SHORTSLOT_RESTRICT 148 +#define WLC_GET_GMODE_PROTECTION 149 +#define WLC_GET_GMODE_PROTECTION_OVERRIDE 150 +#define WLC_SET_GMODE_PROTECTION_OVERRIDE 151 +#define WLC_UPGRADE 152 +/* #define WLC_GET_MRATE 153 */ /* no longer supported */ +/* #define WLC_SET_MRATE 154 */ /* no longer supported */ +#define WLC_GET_ASSOCLIST 159 +#define WLC_GET_CLK 160 +#define WLC_SET_CLK 161 +#define WLC_GET_UP 162 +#define WLC_OUT 163 +#define WLC_GET_WPA_AUTH 164 +#define WLC_SET_WPA_AUTH 165 +#define WLC_GET_PROTECTION_CONTROL 178 +#define WLC_SET_PROTECTION_CONTROL 179 +#define WLC_GET_PHYLIST 180 +#define WLC_GET_KEY_SEQ 183 +/* #define WLC_GET_GMODE_PROTECTION_CTS 198 */ /* no longer supported */ +/* #define WLC_SET_GMODE_PROTECTION_CTS 199 */ /* no longer supported */ +#define WLC_GET_PIOMODE 203 +#define WLC_SET_PIOMODE 204 +#define WLC_SET_LED 209 +#define WLC_GET_LED 210 +#define WLC_GET_CHANNEL_SEL 215 +#define WLC_START_CHANNEL_SEL 216 +#define WLC_GET_VALID_CHANNELS 217 +#define WLC_GET_FAKEFRAG 218 +#define WLC_SET_FAKEFRAG 219 +#define WLC_GET_WET 230 +#define WLC_SET_WET 231 +#define WLC_GET_KEY_PRIMARY 235 +#define WLC_SET_KEY_PRIMARY 236 +#define WLC_GET_RADAR 242 +#define WLC_SET_RADAR 243 +#define WLC_SET_SPECT_MANAGMENT 244 +#define WLC_GET_SPECT_MANAGMENT 245 +#define WLC_WDS_GET_REMOTE_HWADDR 246 /* handled in wl_linux.c/wl_vx.c */ +#define WLC_SET_CS_SCAN_TIMER 248 +#define WLC_GET_CS_SCAN_TIMER 249 +#define WLC_SEND_PWR_CONSTRAINT 254 +#define WLC_CURRENT_PWR 256 +#define WLC_GET_CHANNELS_IN_COUNTRY 260 +#define WLC_GET_COUNTRY_LIST 261 +#define WLC_GET_VAR 262 /* get value of named variable */ +#define WLC_SET_VAR 263 /* set named variable to value */ +#define WLC_NVRAM_GET 264 /* deprecated */ +#define WLC_NVRAM_SET 265 +#define WLC_SET_WSEC_PMK 268 +#define WLC_GET_AUTH_MODE 269 +#define WLC_SET_AUTH_MODE 270 +#define WLC_NDCONFIG_ITEM 273 /* currently handled in wl_oid.c */ +#define WLC_NVOTPW 274 +#define WLC_OTPW 275 +#define WLC_SET_LOCALE 278 +#define WLC_LAST 279 /* do not change - use get_var/set_var */ + +/* + * Minor kludge alert: + * Duplicate a few definitions that irelay requires from epiioctl.h here + * so caller doesn't have to include this file and epiioctl.h . + * If this grows any more, it would be time to move these irelay-specific + * definitions out of the epiioctl.h and into a separate driver common file. + */ +#ifndef EPICTRL_COOKIE +#define EPICTRL_COOKIE 0xABADCEDE +#endif + +/* vx wlc ioctl's offset */ +#define CMN_IOCTL_OFF 0x180 + +/* + * custom OID support + * + * 0xFF - implementation specific OID + * 0xE4 - first byte of Broadcom PCI vendor ID + * 0x14 - second byte of Broadcom PCI vendor ID + * 0xXX - the custom OID number + */ + +/* begin 0x1f values beyond the start of the ET driver range. */ +#define WL_OID_BASE 0xFFE41420 + +/* NDIS overrides */ +#define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE) +#define OID_WL_NDCONFIG_ITEM (WL_OID_BASE + WLC_NDCONFIG_ITEM) + +#define WL_DECRYPT_STATUS_SUCCESS 1 +#define WL_DECRYPT_STATUS_FAILURE 2 +#define WL_DECRYPT_STATUS_UNKNOWN 3 + +/* allows user-mode app to poll the status of USB image upgrade */ +#define WLC_UPGRADE_SUCCESS 0 +#define WLC_UPGRADE_PENDING 1 + +#ifdef CONFIG_USBRNDIS_RETAIL +/* struct passed in for WLC_NDCONFIG_ITEM */ +typedef struct { + char *name; + void *param; +} ndconfig_item_t; +#endif + +/* Bit masks for radio disabled status - returned by WL_GET_RADIO */ +#define WL_RADIO_SW_DISABLE (1<<0) +#define WL_RADIO_HW_DISABLE (1<<1) +#define WL_RADIO_MPC_DISABLE (1<<2) +#define WL_RADIO_COUNTRY_DISABLE (1<<3) /* some countries don't support any channel */ + +/* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */ +#define WL_TXPWR_OVERRIDE (1<<31) + +/* "diag" iovar argument and error code */ +#define WL_DIAG_INTERRUPT 1 /* d11 loopback interrupt test */ +#define WL_DIAG_MEMORY 3 /* d11 memory test */ +#define WL_DIAG_LED 4 /* LED test */ +#define WL_DIAG_REG 5 /* d11/phy register test */ +#define WL_DIAG_SROM 6 /* srom read/crc test */ +#define WL_DIAG_DMA 7 /* DMA test */ + +#define WL_DIAGERR_SUCCESS 0 +#define WL_DIAGERR_FAIL_TO_RUN 1 /* unable to run requested diag */ +#define WL_DIAGERR_NOT_SUPPORTED 2 /* diag requested is not supported */ +#define WL_DIAGERR_INTERRUPT_FAIL 3 /* loopback interrupt test failed */ +#define WL_DIAGERR_LOOPBACK_FAIL 4 /* loopback data test failed */ +#define WL_DIAGERR_SROM_FAIL 5 /* srom read failed */ +#define WL_DIAGERR_SROM_BADCRC 6 /* srom crc failed */ +#define WL_DIAGERR_REG_FAIL 7 /* d11/phy register test failed */ +#define WL_DIAGERR_MEMORY_FAIL 8 /* d11 memory test failed */ +#define WL_DIAGERR_NOMEM 9 /* diag test failed due to no memory */ +#define WL_DIAGERR_DMA_FAIL 10 /* DMA test failed */ + +/* band types */ +#define WLC_BAND_AUTO 0 /* auto-select */ +#define WLC_BAND_5G 1 /* 5 Ghz */ +#define WLC_BAND_2G 2 /* 2.4 Ghz */ +#define WLC_BAND_ALL 3 /* all bands */ + +/* phy types (returned by WLC_GET_PHYTPE) */ +#define WLC_PHY_TYPE_A 0 +#define WLC_PHY_TYPE_B 1 +#define WLC_PHY_TYPE_G 2 +#define WLC_PHY_TYPE_N 4 +#define WLC_PHY_TYPE_NULL 0xf + +/* MAC list modes */ +#define WLC_MACMODE_DISABLED 0 /* MAC list disabled */ +#define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */ +#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */ + +/* + * + */ +#define GMODE_LEGACY_B 0 +#define GMODE_AUTO 1 +#define GMODE_ONLY 2 +#define GMODE_B_DEFERRED 3 +#define GMODE_PERFORMANCE 4 +#define GMODE_LRS 5 +#define GMODE_MAX 6 + +/* values for PLCPHdr_override */ +#define WLC_PLCP_AUTO -1 +#define WLC_PLCP_SHORT 0 +#define WLC_PLCP_LONG 1 + +/* values for g_protection_override and n_protection_override */ +#define WLC_PROTECTION_AUTO -1 +#define WLC_PROTECTION_OFF 0 +#define WLC_PROTECTION_ON 1 + +/* values for g_protection_control and n_protection_control */ +#define WLC_PROTECTION_CTL_OFF 0 +#define WLC_PROTECTION_CTL_LOCAL 1 +#define WLC_PROTECTION_CTL_OVERLAP 2 + +/* deprecated const names for g_protection_override */ +#define WLC_G_PROTECTION_AUTO WLC_PROTECTION_AUTO +#define WLC_G_PROTECTION_OFF WLC_PROTECTION_OFF +#define WLC_G_PROTECTION_ON WLC_PROTECTION_ON + +/* deprecated const names for g_protection_control */ +#define WLC_G_PROTECTION_CTL_OFF WLC_PROTECTION_CTL_OFF +#define WLC_G_PROTECTION_CTL_LOCAL WLC_PROTECTION_CTL_LOCAL +#define WLC_G_PROTECTION_CTL_OVERLAP WLC_PROTECTION_CTL_OVERLAP + +/* deprecated const names for get/set g_protection_control */ +#define WLC_GET_GMODE_PROTECTION_CONTROL WLC_GET_PROTECTION_CONTROL +#define WLC_SET_GMODE_PROTECTION_CONTROL WLC_SET_PROTECTION_CONTROL + +/* values for n_protection */ +#define WLC_N_PROTECTION_OFF 0 +#define WLC_N_PROTECTION_MIXEDMODE 1 +#define WLC_N_PROTECTION_CTS 2 + +/* values for n_preamble_type */ +#define WLC_N_PREAMBLE_MIXEDMODE 0 +#define WLC_N_PREAMBLE_GF 1 + +/* Values for PM */ +#define PM_OFF 0 +#define PM_MAX 1 +#define PM_FAST 2 + + + +typedef struct { + int npulses; /* required number of pulses at n * t_int */ + int ncontig; /* required number of pulses at t_int */ + int min_pw; /* minimum pulse width (20 MHz clocks) */ + int max_pw; /* maximum pulse width (20 MHz clocks) */ + uint16 thresh0; /* Radar detection, thresh 0 */ + uint16 thresh1; /* Radar detection, thresh 1 */ + int npulses_lp; /* Radar detection, minimum long pulses */ + int min_pw_lp; /* Minimum pulsewidth for long pulses */ + int max_pw_lp; /* Maximum pulsewidth for long pulses */ + int min_fm_lp; /* Minimum fm for long pulses */ + int max_deltat_lp; /* Maximum deltat for long pulses */ + int min_deltat; /* Minimum spacing between pulses */ +} wl_radar_args_t; + +/* radar iovar SET defines */ +#define WL_RADAR_DETECTOR_OFF 0 /* radar detector off */ +#define WL_RADAR_DETECTOR_ON 1 /* radar detector on */ +#define WL_RADAR_SIMULATED 2 /* force radar detector to declare + * detection once + */ + +/* dfs_status iovar-related defines */ + +/* cac - channel availability check, + * ism - in-service monitoring + * csa - channel switching announcement + */ + +/* cac state values */ +#define WL_DFS_CACSTATE_IDLE 0 /* state for operating in non-radar channel */ +#define WL_DFS_CACSTATE_PREISM_CAC 1 /* CAC in progress */ +#define WL_DFS_CACSTATE_ISM 2 /* ISM in progress */ +#define WL_DFS_CACSTATE_CSA 3 /* csa */ +#define WL_DFS_CACSTATE_POSTISM_CAC 4 /* ISM CAC */ +#define WL_DFS_CACSTATE_PREISM_OOC 5 /* PREISM OOC */ +#define WL_DFS_CACSTATE_POSTISM_OOC 6 /* POSTISM OOC */ +#define WL_DFS_CACSTATES 7 /* this many states exist */ + +/* data structure used in 'dfs_status' wl interface, which is used to query dfs status */ +typedef struct { + uint state; /* noted by WL_DFS_CACSTATE_XX. */ + uint duration; /* time spent in ms in state. */ + /* as dfs enters ISM state, it removes the operational channel from quiet channel + * list and notes the channel in channel_cleared. set to 0 if no channel is cleared + */ + chanspec_t chanspec_cleared; + /* chanspec cleared used to be a uint, add another to uint16 to maintain size */ + uint16 pad; +} wl_dfs_status_t; + +#define NUM_PWRCTRL_RATES 12 + +typedef struct tx_inst_power { +} tx_inst_power_t; + + +/* regulatory enforcement levels */ +#define SPECT_MNGMT_OFF 0 /* both 11h and 11d disabled */ +#define SPECT_MNGMT_LOOSE_11H 1 /* allow non-11h APs in scan lists */ +#define SPECT_MNGMT_STRICT_11H 2 /* prune out non-11h APs from scan list */ +#define SPECT_MNGMT_STRICT_11D 3 /* switch to 802.11D mode */ +/* SPECT_MNGMT_LOOSE_11H_D - same as SPECT_MNGMT_LOOSE with the exception that Country IE + * adoption is done irregardless of capability-spectrum_management + */ +#define SPECT_MNGMT_LOOSE_11H_D 4 /* operation defined above */ + +#define WL_CHAN_VALID_HW (1 << 0) /* valid with current HW */ +#define WL_CHAN_VALID_SW (1 << 1) /* valid with current country setting */ +#define WL_CHAN_BAND_5G (1 << 2) /* 5GHz-band channel */ +#define WL_CHAN_RADAR (1 << 3) /* radar sensitive channel */ +#define WL_CHAN_INACTIVE (1 << 4) /* temporarily inactive due to radar */ +#define WL_CHAN_PASSIVE (1 << 5) /* channel is in passive mode */ +#define WL_CHAN_RESTRICTED (1 << 6) /* restricted use channel */ + +/* BTC mode used by "btc_mode" iovar */ +#define WL_BTC_DISABLE 0 /* disable BT coexistance */ +#define WL_BTC_ENABLE 1 /* enable BT coexistance */ +#define WL_BTC_PREMPT 2 /* enable BT coexistance and BT pre-emption */ + +#define WL_MPC_VAL 0x00400000 +#define WL_APSTA_VAL 0x00800000 +#define WL_DFS_VAL 0x01000000 +#define WL_BA_VAL 0x02000000 +#define WL_NITRO_VAL 0x04000000 +#define WL_CAC_VAL 0x08000000 +#define WL_AMSDU_VAL 0x10000000 +#define WL_AMPDU_VAL 0x20000000 + +/* max # of leds supported by GPIO (gpio pin# == led index#) */ +#define WL_LED_NUMGPIO 16 /* gpio 0-15 */ + +/* led per-pin behaviors */ +#define WL_LED_OFF 0 /* always off */ +#define WL_LED_ON 1 /* always on */ +#define WL_LED_ACTIVITY 2 /* activity */ +#define WL_LED_RADIO 3 /* radio enabled */ +#define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */ +#define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */ +#define WL_LED_BGMODE 6 /* on if gmode, off if bmode */ +#define WL_LED_WI1 7 +#define WL_LED_WI2 8 +#define WL_LED_WI3 9 +#define WL_LED_ASSOC 10 /* associated state indicator */ +#define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */ +#define WL_LED_NUMBEHAVIOR 12 + +/* led behavior numeric value format */ +#define WL_LED_BEH_MASK 0x7f /* behavior mask */ +#define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */ + +/* max # of channels returnd by the get valid channels iovar */ +#define WL_NUMCHANSPECS 100 + +/* WDS link local endpoint WPA role */ +#define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */ +#define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */ +#define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */ + +/* number of bytes needed to define a 128-bit mask for MAC event reporting */ +#define WL_EVENTING_MASK_LEN 16 + +/* Structures and constants used for "vndr_ie" IOVar interface */ +#define VNDR_IE_CMD_LEN 4 /* length of the set command string: + * "add", "del" (+ NULL) + */ + +/* 802.11 Mgmt Packet flags */ +#define VNDR_IE_BEACON_FLAG 0x1 +#define VNDR_IE_PRBRSP_FLAG 0x2 +#define VNDR_IE_ASSOCRSP_FLAG 0x4 +#define VNDR_IE_AUTHRSP_FLAG 0x8 + +#define VNDR_IE_INFO_HDR_LEN (sizeof(uint32)) + +typedef struct { + uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */ + vndr_ie_t vndr_ie_data; /* vendor IE data */ +} vndr_ie_info_t; + +typedef struct { + int iecount; /* number of entries in the vndr_ie_list[] array */ + vndr_ie_info_t vndr_ie_list[1]; /* variable size list of vndr_ie_info_t structs */ +} vndr_ie_buf_t; + +typedef struct { + char cmd[VNDR_IE_CMD_LEN]; /* vndr_ie IOVar set command : "add", "del" + NULL */ + vndr_ie_buf_t vndr_ie_buffer; /* buffer containing Vendor IE list information */ +} vndr_ie_setbuf_t; + +/* join target preference types */ +#define WL_JOIN_PREF_RSSI 1 /* by RSSI, mandatory */ +#define WL_JOIN_PREF_WPA 2 /* by akm and ciphers, optional, RSN and WPA as values */ +#define WL_JOIN_PREF_BAND 3 /* by 802.11 band, optional, WLC_BAND_XXXX as values */ + +/* band preference */ +#define WLJP_BAND_ASSOC_PREF 255 /* use assoc preference settings */ + /* others use WLC_BAND_XXXX as values */ + +/* any multicast cipher suite */ +#define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00" + +struct tsinfo_arg { + uint8 octets[3]; +}; + +#if !defined(__GNUC__) +#pragma pack(pop) +#endif + +#define NFIFO 6 /* # tx/rx fifopairs */ + +#define WL_CNT_T_VERSION 1 /* current version of wl_cnt_t struct */ + +typedef struct { + uint16 version; /* see definition of WL_CNT_T_VERSION */ + uint16 length; /* length of entire structure */ + + /* transmit stat counters */ + uint32 txframe; /* tx data frames */ + uint32 txbyte; /* tx data bytes */ + uint32 txretrans; /* tx mac retransmits */ + uint32 txerror; /* tx data errors (derived: sum of others) */ + uint32 txctl; /* tx management frames */ + uint32 txprshort; /* tx short preamble frames */ + uint32 txserr; /* tx status errors */ + uint32 txnobuf; /* tx out of buffers errors */ + uint32 txnoassoc; /* tx discard because we're not associated */ + uint32 txrunt; /* tx runt frames */ + uint32 txchit; /* tx header cache hit (fastpath) */ + uint32 txcmiss; /* tx header cache miss (slowpath) */ + + /* transmit chip error counters */ + uint32 txuflo; /* tx fifo underflows */ + uint32 txphyerr; /* tx phy errors (indicated in tx status) */ + uint32 txphycrs; + + /* receive stat counters */ + uint32 rxframe; /* rx data frames */ + uint32 rxbyte; /* rx data bytes */ + uint32 rxerror; /* rx data errors (derived: sum of others) */ + uint32 rxctl; /* rx management frames */ + uint32 rxnobuf; /* rx out of buffers errors */ + uint32 rxnondata; /* rx non data frames in the data channel errors */ + uint32 rxbadds; /* rx bad DS errors */ + uint32 rxbadcm; /* rx bad control or management frames */ + uint32 rxfragerr; /* rx fragmentation errors */ + uint32 rxrunt; /* rx runt frames */ + uint32 rxgiant; /* rx giant frames */ + uint32 rxnoscb; /* rx no scb error */ + uint32 rxbadproto; /* rx invalid frames */ + uint32 rxbadsrcmac; /* rx frames with Invalid Src Mac */ + uint32 rxbadda; /* rx frames tossed for invalid da */ + uint32 rxfilter; /* rx frames filtered out */ + + /* receive chip error counters */ + uint32 rxoflo; /* rx fifo overflow errors */ + uint32 rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ + + uint32 d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ + uint32 d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ + uint32 d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ + + /* misc counters */ + uint32 dmade; /* tx/rx dma descriptor errors */ + uint32 dmada; /* tx/rx dma data errors */ + uint32 dmape; /* tx/rx dma descriptor protocol errors */ + uint32 reset; /* reset count */ + uint32 tbtt; /* cnts the TBTT int's */ + uint32 txdmawar; + uint32 pkt_callback_reg_fail; /* callbacks register failure */ + + /* MAC counters: 32-bit version of d11.h's macstat_t */ + uint32 txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, + * Control Management (includes retransmissions) + */ + uint32 txrtsfrm; /* number of RTS sent out by the MAC */ + uint32 txctsfrm; /* number of CTS sent out by the MAC */ + uint32 txackfrm; /* number of ACK frames sent out */ + uint32 txdnlfrm; /* Not used */ + uint32 txbcnfrm; /* beacons transmitted */ + uint32 txfunfl[8]; /* per-fifo tx underflows */ + uint32 txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS + * or BCN) + */ + uint32 txphyerror; /* Transmit phy error, type of error is reported in tx-status for + * driver enqueued frames + */ + uint32 rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ + uint32 rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ + uint32 rxinvmachdr; /* Either the protocol version != 0 or frame type not + * data/control/management + */ + uint32 rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ + uint32 rxbadplcp; /* parity check of the PLCP header failed */ + uint32 rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ + uint32 rxstrt; /* Number of received frames with a good PLCP + * (i.e. passing parity check) + */ + uint32 rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ + uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ + uint32 rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ + uint32 rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ + uint32 rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ + uint32 rxackucast; /* number of ucast ACKS received (good FCS) */ + uint32 rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ + uint32 rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ + uint32 rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ + uint32 rxrtsocast; /* number of received RTS not addressed to the MAC */ + uint32 rxctsocast; /* number of received CTS not addressed to the MAC */ + uint32 rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ + uint32 rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ + uint32 rxcfrmmcast; /* number of RX Control multicast frames received by the MAC + * (unlikely to see these) + */ + uint32 rxbeaconmbss; /* beacons received from member of BSS */ + uint32 rxdfrmucastobss; /* number of unicast frames addressed to the MAC from + * other BSS (WDS FRAME) + */ + uint32 rxbeaconobss; /* beacons received from other BSS */ + uint32 rxrsptmout; /* Number of response timeouts for transmitted frames + * expecting a response + */ + uint32 bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ + uint32 rxf0ovfl; /* Number of receive fifo 0 overflows */ + uint32 rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ + uint32 rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ + uint32 txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ + uint32 pmqovfl; /* Number of PMQ overflows */ + uint32 rxcgprqfrm; /* Number of received Probe requests that made it into + * the PRQ fifo + */ + uint32 rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ + uint32 txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did + * not get ACK + */ + uint32 txcgprssuc; /* Tx Probe Response Success (ACK was received) */ + uint32 prs_timeout; /* Number of probe requests that were dropped from the PRQ + * fifo because a probe response could not be sent out within + * the time limit defined in M_PRS_MAXTIME + */ + uint32 rxnack; /* Number of NACKS received (Afterburner) */ + uint32 frmscons; /* Number of frames completed without transmission because of an + * Afterburner re-queue + */ + uint32 txnack; /* Number of NACKs transmitted (Afterburner) */ + uint32 txglitch_nack; /* obsolete */ + uint32 txburst; /* obsolete */ + + /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ + uint32 txfrag; /* dot11TransmittedFragmentCount */ + uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ + uint32 txfail; /* dot11FailedCount */ + uint32 txretry; /* dot11RetryCount */ + uint32 txretrie; /* dot11MultipleRetryCount */ + uint32 rxdup; /* dot11FrameduplicateCount */ + uint32 txrts; /* dot11RTSSuccessCount */ + uint32 txnocts; /* dot11RTSFailureCount */ + uint32 txnoack; /* dot11ACKFailureCount */ + uint32 rxfrag; /* dot11ReceivedFragmentCount */ + uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ + uint32 rxcrc; /* dot11FCSErrorCount */ + uint32 txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ + uint32 rxundec; /* dot11WEPUndecryptableCount */ + + /* WPA2 counters (see rxundec for DecryptFailureCount) */ + uint32 tkipmicfaill; /* TKIPLocalMICFailures */ + uint32 tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ + uint32 tkipreplay; /* TKIPReplays */ + uint32 ccmpfmterr; /* CCMPFormatErrors */ + uint32 ccmpreplay; /* CCMPReplays */ + uint32 ccmpundec; /* CCMPDecryptErrors */ + uint32 fourwayfail; /* FourWayHandshakeFailures */ + uint32 wepundec; /* dot11WEPUndecryptableCount */ + uint32 wepicverr; /* dot11WEPICVErrorCount */ + uint32 decsuccess; /* DecryptSuccessCount */ + uint32 tkipicverr; /* TKIPICVErrorCount */ + uint32 wepexcluded; /* dot11WEPExcludedCount */ + + uint32 txchanrej; /* Tx frames suppressed due to channel rejection */ + uint32 psmwds; /* Count PSM watchdogs */ + uint32 phywatchdog; /* Count Phy lockups */ +} wl_cnt_t; + +#define WL_WME_CNT_VERSION 1 /* current version of wl_wme_cnt_t */ + +typedef struct { + uint32 packets; + uint32 bytes; +} wl_traffic_stats_t; + +typedef struct { + uint16 version; /* see definition of WL_CNT_T_VERSION */ + uint16 length; /* length of entire structure */ + + wl_traffic_stats_t tx[AC_COUNT]; /* Packets transmitted */ + wl_traffic_stats_t tx_failed[AC_COUNT]; /* Packets dropped or failed to transmit */ + wl_traffic_stats_t rx[AC_COUNT]; /* Packets received */ + wl_traffic_stats_t rx_failed[AC_COUNT]; /* Packets failed to receive */ + + wl_traffic_stats_t forward[AC_COUNT]; /* Packets forwarded by AP */ + + wl_traffic_stats_t tx_expired[AC_COUNT]; /* packets dropped due to lifetime expiry */ + +} wl_wme_cnt_t; + +#ifdef WLBA + +#define WLC_BA_CNT_VERSION 1 /* current version of wlc_ba_cnt_t */ + +/* block ack related stats */ +typedef struct wlc_ba_cnt { + uint16 version; /* WLC_BA_CNT_VERSION */ + uint16 length; /* length of entire structure */ + + /* transmit stat counters */ + uint32 txpdu; /* pdus sent */ + uint32 txsdu; /* sdus sent */ + uint32 txfc; /* tx side flow controlled packets */ + uint32 txfci; /* tx side flow control initiated */ + uint32 txretrans; /* retransmitted pdus */ + uint32 txbatimer; /* ba resend due to timer */ + uint32 txdrop; /* dropped packets */ + uint32 txaddbareq; /* addba req sent */ + uint32 txaddbaresp; /* addba resp sent */ + uint32 txdelba; /* delba sent */ + uint32 txba; /* ba sent */ + uint32 txbar; /* bar sent */ + uint32 txpad[4]; /* future */ + + /* receive side counters */ + uint32 rxpdu; /* pdus recd */ + uint32 rxqed; /* pdus buffered before sending up */ + uint32 rxdup; /* duplicate pdus */ + uint32 rxnobuf; /* pdus discarded due to no buf */ + uint32 rxaddbareq; /* addba req recd */ + uint32 rxaddbaresp; /* addba resp recd */ + uint32 rxdelba; /* delba recd */ + uint32 rxba; /* ba recd */ + uint32 rxbar; /* bar recd */ + uint32 rxinvba; /* invalid ba recd */ + uint32 rxbaholes; /* ba recd with holes */ + uint32 rxunexp; /* unexpected packets */ + uint32 rxpad[4]; /* future */ +} wlc_ba_cnt_t; +#endif /* WLBA */ + +/* structure for per-tid ampdu control */ +struct ampdu_tid_control { + uint8 tid; /* tid */ + uint8 enable; /* enable/disable */ +}; + +/* structure for addts arguments */ +/* For ioctls that take a list of TSPEC */ +struct tslist { + int count; /* number of tspecs */ + struct tsinfo_arg tsinfo[1]; /* variable length array of tsinfo */ +}; + +/* structure for addts/delts arguments */ +typedef struct tspec_arg { + uint16 version; /* see definition of TSPEC_ARG_VERSION */ + uint16 length; /* length of entire structure */ + uint flag; /* bit field */ + /* TSPEC Arguments */ + struct tsinfo_arg tsinfo; /* TS Info bit field */ + uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */ + uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */ + uint min_srv_interval; /* Minimum Service Interval (us) */ + uint max_srv_interval; /* Maximum Service Interval (us) */ + uint inactivity_interval; /* Inactivity Interval (us) */ + uint suspension_interval; /* Suspension Interval (us) */ + uint srv_start_time; /* Service Start Time (us) */ + uint min_data_rate; /* Minimum Data Rate (bps) */ + uint mean_data_rate; /* Mean Data Rate (bps) */ + uint peak_data_rate; /* Peak Data Rate (bps) */ + uint max_burst_size; /* Maximum Burst Size (bytes) */ + uint delay_bound; /* Delay Bound (us) */ + uint min_phy_rate; /* Minimum PHY Rate (bps) */ + uint16 surplus_bw; /* Surplus Bandwidth Allowance Factor */ + uint16 medium_time; /* Medium Time (32 us/s periods) */ +} tspec_arg_t; + +/* current version of wl_tspec_arg_t struct */ +#define TSPEC_ARG_VERSION 1 /* current version of wl_tspec_arg_t struct */ +#define TSPEC_ARG_LENGTH 55 /* argment length from tsinfo to medium_time */ + +/* define for flag */ +#define TSPEC_PENDING 0 /* TSPEC pending */ +#define TSPEC_ACCEPTED 1 /* TSPEC accepted */ +#define TSPEC_REJECTED 2 /* TSPEC rejected */ +#define TSPEC_UNKNOWN 3 /* TSPEC unknown */ +#define TSPEC_STATUS_MASK 7 /* TSPEC status mask */ + + +/* Software feature flag defines used by wlfeatureflag */ +#define WL_SWFL_ABBFL 0x0001 /* Allow Afterburner on systems w/o hardware BFL */ +#define WL_SWFL_ABENCORE 0x0002 /* Allow AB on non-4318E chips */ + +#define WL_LIFETIME_MAX 0xFFFF /* Max value in ms */ + +/* Packet lifetime configuration per ac */ +typedef struct wl_lifetime { + uint32 ac; /* access class */ + uint32 lifetime; /* Packet lifetime value in ms */ +} wl_lifetime_t; + +#endif /* _wlioctl_h_ */ diff --git a/openwrt/package/wlc/src/include/wlutils.h b/openwrt/package/wlc/src/include/wlutils.h new file mode 100644 index 00000000000..a5aa1fd663b --- /dev/null +++ b/openwrt/package/wlc/src/include/wlutils.h @@ -0,0 +1,102 @@ +/* + * Broadcom wireless network adapter utility functions + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: wlutils.h,v 1.1.1.12 2006/02/27 03:43:20 honor Exp $ + */ + +#ifndef _wlutils_h_ +#define _wlutils_h_ + +#include <typedefs.h> +#include <wlioctl.h> + +/* + * Pass a wlioctl request to the specified interface. + * @param name interface name + * @param cmd WLC_GET_MAGIC <= cmd < WLC_LAST + * @param buf buffer for passing in and/or receiving data + * @param len length of buf + * @return >= 0 if successful or < 0 otherwise + */ +extern int wl_ioctl(char *name, int cmd, void *buf, int len); + +/* + * Probe the specified interface. + * @param name interface name + * @return >= 0 if a Broadcom wireless device or < 0 otherwise + */ +extern int wl_probe(char *name); + +extern int wl_iovar_set(char *ifname, char *iovar, void *param, int paramlen); +extern int wl_iovar_get(char *ifname, char *iovar, void *bufptr, int buflen); +/* + * Set/Get named variable. + * @param ifname interface name + * @param iovar variable name + * @param param input param value/buffer + * @param paramlen input param value/buffer length + * @param bufptr io buffer + * @param buflen io buffer length + * @param val val or val pointer for int routines + * @return success == 0, failure != 0 + */ +/* + * set named driver variable to int value + * calling example: wl_iovar_setint(ifname, "arate", rate) +*/ +static inline int +wl_iovar_setint(char *ifname, char *iovar, int val) +{ + return wl_iovar_set(ifname, iovar, &val, sizeof(val)); +} + +/* + * get named driver variable to int value and return error indication + * calling example: wl_iovar_getint(ifname, "arate", &rate) + */ +static inline int +wl_iovar_getint(char *ifname, char *iovar, int *val) +{ + return wl_iovar_get(ifname, iovar, val, sizeof(int)); +} + +/* + * Set/Get named variable indexed by BSS Configuration + * @param ifname interface name + * @param iovar variable name + * @param bssidx bsscfg index + * @param param input param value/buffer + * @param paramlen input param value/buffer length + * @param bufptr io buffer + * @param buflen io buffer length + * @param val val or val pointer for int routines + * @return success == 0, failure != 0 + */ +extern int wl_bssiovar_get(char *ifname, char *iovar, int bssidx, void *outbuf, int len); +extern int wl_bssiovar_set(char *ifname, char *iovar, int bssidx, void *param, int paramlen); +/* + * set named & bss indexed driver variable to int value + */ +static inline int +wl_bssiovar_setint(char *ifname, char *iovar, int bssidx, int val) +{ + return wl_bssiovar_set(ifname, iovar, bssidx, &val, sizeof(int)); +} + +static inline int +wl_bssiovar_getint(char *ifname, char *iovar, int bssidx, int *val) +{ + return wl_bssiovar_get(ifname, iovar, bssidx, val, sizeof(int)); +} + +extern int wl_bssiovar_setint(char *ifname, char *iovar, int bssidx, int val); + +#endif /* _wlutils_h_ */ diff --git a/openwrt/package/wlc/src/ioctl.c b/openwrt/package/wlc/src/ioctl.c new file mode 100644 index 00000000000..6c676c7c9bf --- /dev/null +++ b/openwrt/package/wlc/src/ioctl.c @@ -0,0 +1,298 @@ +/* + * Wireless network adapter utilities + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: wl.c,v 1.1.1.11 2006/02/27 03:43:20 honor Exp $ + */ +#include <stdio.h> +#include <unistd.h> +#include <string.h> +#include <errno.h> +#include <sys/ioctl.h> +#include <net/if.h> +#include <linux/types.h> + +typedef u_int64_t u64; +typedef u_int32_t u32; +typedef u_int16_t u16; +typedef u_int8_t u8; +#include <linux/sockios.h> +#include <linux/ethtool.h> + +#include <typedefs.h> +#include <wlioctl.h> +#include <bcmutils.h> +#include <wlutils.h> + +int +wl_ioctl(char *name, int cmd, void *buf, int len) +{ + struct ifreq ifr; + wl_ioctl_t ioc; + int ret = 0; + int s; + + /* open socket to kernel */ + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("socket"); + return errno; + } + + /* do it */ + ioc.cmd = cmd; + ioc.buf = buf; + ioc.len = len; + strncpy(ifr.ifr_name, name, IFNAMSIZ); + ifr.ifr_data = (caddr_t) &ioc; + if ((ret = ioctl(s, SIOCDEVPRIVATE, &ifr)) < 0) + + /* cleanup */ + close(s); + return ret; +} + +static inline int +wl_get_dev_type(char *name, void *buf, int len) +{ + int s; + int ret; + struct ifreq ifr; + struct ethtool_drvinfo info; + + /* open socket to kernel */ + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("socket"); + return -1; + } + + /* get device type */ + memset(&info, 0, sizeof(info)); + info.cmd = ETHTOOL_GDRVINFO; + ifr.ifr_data = (caddr_t)&info; + strncpy(ifr.ifr_name, name, IFNAMSIZ); + if ((ret = ioctl(s, SIOCETHTOOL, &ifr)) < 0) { + *(char *)buf = '\0'; + } else + strncpy(buf, info.driver, len); + + close(s); + return ret; +} + +int +wl_probe(char *name) +{ + int ret, val; + char buf[3]; + if ((ret = wl_get_dev_type(name, buf, 3)) < 0) + return ret; + /* Check interface */ + if (strncmp(buf, "wl", 2)) + return -1; + if ((ret = wl_ioctl(name, WLC_GET_VERSION, &val, sizeof(val)))) + return ret; + if (val > WLC_IOCTL_VERSION) + return -1; + + return ret; +} + +static int +wl_iovar_getbuf(char *ifname, char *iovar, void *param, int paramlen, void *bufptr, int buflen) +{ + int err; + uint namelen; + uint iolen; + + namelen = strlen(iovar) + 1; /* length of iovar name plus null */ + iolen = namelen + paramlen; + + /* check for overflow */ + if (iolen > buflen) + return (BCME_BUFTOOSHORT); + + memcpy(bufptr, iovar, namelen); /* copy iovar name including null */ + memcpy((int8*)bufptr + namelen, param, paramlen); + + err = wl_ioctl(ifname, WLC_GET_VAR, bufptr, buflen); + + return (err); +} + +static int +wl_iovar_setbuf(char *ifname, char *iovar, void *param, int paramlen, void *bufptr, int buflen) +{ + uint namelen; + uint iolen; + + namelen = strlen(iovar) + 1; /* length of iovar name plus null */ + iolen = namelen + paramlen; + + /* check for overflow */ + if (iolen > buflen) + return (BCME_BUFTOOSHORT); + + memcpy(bufptr, iovar, namelen); /* copy iovar name including null */ + memcpy((int8*)bufptr + namelen, param, paramlen); + + return wl_ioctl(ifname, WLC_SET_VAR, bufptr, iolen); +} + +int +wl_iovar_set(char *ifname, char *iovar, void *param, int paramlen) +{ + char smbuf[WLC_IOCTL_SMLEN]; + + return wl_iovar_setbuf(ifname, iovar, param, paramlen, smbuf, sizeof(smbuf)); +} + +int +wl_iovar_get(char *ifname, char *iovar, void *bufptr, int buflen) +{ + char smbuf[WLC_IOCTL_SMLEN]; + int ret; + + /* use the return buffer if it is bigger than what we have on the stack */ + if (buflen > sizeof(smbuf)) { + ret = wl_iovar_getbuf(ifname, iovar, NULL, 0, bufptr, buflen); + } else { + ret = wl_iovar_getbuf(ifname, iovar, NULL, 0, smbuf, sizeof(smbuf)); + if (ret == 0) + memcpy(bufptr, smbuf, buflen); + } + + return ret; +} + + +/* + * format a bsscfg indexed iovar buffer + */ +static int +wl_bssiovar_mkbuf(char *iovar, int bssidx, void *param, int paramlen, void *bufptr, int buflen, + int *plen) +{ + char *prefix = "bsscfg:"; + int8* p; + uint prefixlen; + uint namelen; + uint iolen; + + prefixlen = strlen(prefix); /* length of bsscfg prefix */ + namelen = strlen(iovar) + 1; /* length of iovar name + null */ + iolen = prefixlen + namelen + sizeof(int) + paramlen; + + /* check for overflow */ + if (buflen < 0 || iolen > (uint)buflen) { + *plen = 0; + return BCME_BUFTOOSHORT; + } + + p = (int8*)bufptr; + + /* copy prefix, no null */ + memcpy(p, prefix, prefixlen); + p += prefixlen; + + /* copy iovar name including null */ + memcpy(p, iovar, namelen); + p += namelen; + + /* bss config index as first param */ + memcpy(p, &bssidx, sizeof(int32)); + p += sizeof(int32); + + /* parameter buffer follows */ + if (paramlen) + memcpy(p, param, paramlen); + + *plen = iolen; + return 0; +} + +/* + * set named & bss indexed driver variable to buffer value + */ +static int +wl_bssiovar_setbuf(char *ifname, char *iovar, int bssidx, void *param, int paramlen, void *bufptr, + int buflen) +{ + int err; + int iolen; + + err = wl_bssiovar_mkbuf(iovar, bssidx, param, paramlen, bufptr, buflen, &iolen); + if (err) + return err; + + return wl_ioctl(ifname, WLC_SET_VAR, bufptr, iolen); +} + +/* + * get named & bss indexed driver variable buffer value + */ +static int +wl_bssiovar_getbuf(char *ifname, char *iovar, int bssidx, void *param, int paramlen, void *bufptr, + int buflen) +{ + int err; + int iolen; + + err = wl_bssiovar_mkbuf(iovar, bssidx, param, paramlen, bufptr, buflen, &iolen); + if (err) + return err; + + return wl_ioctl(ifname, WLC_GET_VAR, bufptr, buflen); +} + +/* + * set named & bss indexed driver variable to buffer value + */ +int +wl_bssiovar_set(char *ifname, char *iovar, int bssidx, void *param, int paramlen) +{ + char smbuf[WLC_IOCTL_SMLEN]; + + return wl_bssiovar_setbuf(ifname, iovar, bssidx, param, paramlen, smbuf, sizeof(smbuf)); +} + +/* + * get named & bss indexed driver variable buffer value + */ +int +wl_bssiovar_get(char *ifname, char *iovar, int bssidx, void *outbuf, int len) +{ + char smbuf[WLC_IOCTL_SMLEN]; + int err; + + /* use the return buffer if it is bigger than what we have on the stack */ + if (len > (int)sizeof(smbuf)) { + err = wl_bssiovar_getbuf(ifname, iovar, bssidx, NULL, 0, outbuf, len); + } else { + memset(smbuf, 0, sizeof(smbuf)); + err = wl_bssiovar_getbuf(ifname, iovar, bssidx, NULL, 0, smbuf, sizeof(smbuf)); + if (err == 0) + memcpy(outbuf, smbuf, len); + } + + return err; +} + +void +wl_printlasterror(char *name) +{ + char err_buf[WLC_IOCTL_SMLEN]; + strcpy(err_buf, "bcmerrstr"); + + fprintf(stderr, "Error: "); + if ( wl_ioctl(name, WLC_GET_VAR, err_buf, sizeof (err_buf)) != 0) + fprintf(stderr, "Error getting the Errorstring from driver\n"); + else + fprintf(stderr, err_buf); +} diff --git a/openwrt/package/wlc/src/wlc.c b/openwrt/package/wlc/src/wlc.c new file mode 100644 index 00000000000..99237c095a3 --- /dev/null +++ b/openwrt/package/wlc/src/wlc.c @@ -0,0 +1,1138 @@ +/* + * wlc - Broadcom Wireless Driver Control Utility + * + * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.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 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. + */ + +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <fcntl.h> +#include <glob.h> +#include <ctype.h> + +#include <typedefs.h> +#include <wlutils.h> +#include <proto/802.11.h> + +#define VERSION "0.1" +#define BUFSIZE 8192 +#define PTABLE_MAGIC 0xbadc0ded +#define PTABLE_SLT1 1 +#define PTABLE_SLT2 2 +#define PTABLE_ACKW 3 +#define PTABLE_ADHM 4 +#define PTABLE_END 0xffffffff + +/* + * Copy each token in wordlist delimited by space into word + * Taken from Broadcom shutils.h + */ +#define foreach(word, wordlist, next) \ + for (next = &wordlist[strspn(wordlist, " ")], \ + strncpy(word, next, sizeof(word)), \ + word[strcspn(word, " ")] = '\0', \ + word[sizeof(word) - 1] = '\0', \ + next = strchr(next, ' '); \ + strlen(word); \ + next = next ? &next[strspn(next, " ")] : "", \ + strncpy(word, next, sizeof(word)), \ + word[strcspn(word, " ")] = '\0', \ + word[sizeof(word) - 1] = '\0', \ + next = strchr(next, ' ')) + +static char wlbuf[8192]; +static char interface[16] = "wl0"; +static unsigned long ptable[128]; +static unsigned long kmem_offset = 0; +static int vif = 0, debug = 1, fromstdin = 0; + +typedef enum { + NONE = 0x00, + + /* types */ + PARAM_TYPE = 0x00f, + INT = 0x001, + STRING = 0x002, + + /* options */ + PARAM_OPTIONS = 0x0f0, + NOARG = 0x010, + + /* modes */ + PARAM_MODE = 0xf00, + GET = 0x100, + SET = 0x200, +} wlc_param; + +struct wlc_call { + const char *name; + wlc_param param; + int (*handler)(wlc_param param, void *data, void *value); + union { + int num; + char *str; + void *ptr; + } data; + const char *desc; +}; + +/* can't use the system include because of the stupid broadcom header files */ +extern struct ether_addr *ether_aton(const char *asc); +extern char *ether_ntoa(const struct ether_addr *addr); + +/* + * find the starting point of wl.o in memory + * by reading /proc/ksyms + */ +static inline void wlc_get_mem_offset(void) +{ + FILE *f; + char s[64]; + + /* yes, i'm lazy ;) */ + f = popen("grep '\\[wl]' /proc/ksyms | sort", "r"); + if (fgets(s, 64, f) == 0) + return; + + pclose(f); + + s[8] = 0; + kmem_offset = strtoul(s, NULL, 16); + + /* sanity check */ + if (kmem_offset < 0xc0000000) + kmem_offset = 0; +} + + +static int ptable_init(void) +{ + glob_t globbuf; + struct stat statbuf; + int fd; + + if (ptable[0] == PTABLE_MAGIC) + return 0; + + glob("/lib/modules/2.4.*/wl.o", 0, NULL, &globbuf); + + if (globbuf.gl_pathv[0] == NULL) + return -1; + + if ((fd = open(globbuf.gl_pathv[0], O_RDONLY)) < 0) + return -1; + + if (fstat(fd, &statbuf) < 0) + goto failed; + + if (statbuf.st_size <= 512) + goto failed; + + if (lseek(fd, statbuf.st_size - 512, SEEK_SET) < 0) { + perror("lseek"); + goto failed; + } + + if (read(fd, ptable, 512) < 512) + goto failed; + + if (ptable[0] != PTABLE_MAGIC) + goto failed; + + close(fd); + + wlc_get_mem_offset(); + if (kmem_offset == 0) + return -1; + + return 0; + +failed: + close(fd); + + return -1; +} + +static inline unsigned long wlc_kmem_read(unsigned long offset) +{ + int fd; + unsigned long ret; + + if ((fd = open("/dev/kmem", O_RDONLY )) < 0) + return -1; + + lseek(fd, 0x70000000, SEEK_SET); + lseek(fd, (kmem_offset - 0x70000000) + offset, SEEK_CUR); + read(fd, &ret, 4); + close(fd); + + return ret; +} + +static inline void wlc_kmem_write(unsigned long offset, unsigned long value) +{ + int fd; + + if ((fd = open("/dev/kmem", O_WRONLY )) < 0) + return; + + lseek(fd, 0x70000000, SEEK_SET); + lseek(fd, (kmem_offset - 0x70000000) + offset, SEEK_CUR); + write(fd, &value, 4); + close(fd); +} + +static int wlc_patcher_getval(unsigned long key, unsigned long *val) +{ + unsigned long *pt = &ptable[1]; + unsigned long tmp; + + if (ptable_init() < 0) { + fprintf(stderr, "Could not load the ptable\n"); + return -1; + } + + while (*pt != PTABLE_END) { + if (*pt == key) { + tmp = wlc_kmem_read(pt[1]); + + if (tmp == pt[2]) + *val = 0xffffffff; + else + *val = tmp; + + return 0; + } + pt += 3; + } + + return -1; +} + +static int wlc_patcher_setval(unsigned long key, unsigned long val) +{ + unsigned long *pt = &ptable[1]; + + if (ptable_init() < 0) { + fprintf(stderr, "Could not load the ptable\n"); + return -1; + } + + if (val != 0xffffffff) + val = (pt[2] & ~(0xffff)) | (val & 0xffff); + + while (*pt != PTABLE_END) { + if (*pt == key) { + if (val == 0xffffffff) /* default */ + val = pt[2]; + + wlc_kmem_write(pt[1], val); + } + pt += 3; + } + + return 0; +} + +static int wlc_slottime(wlc_param param, void *data, void *value) +{ + int *val = (int *) value; + int ret = 0; + + if ((param & PARAM_MODE) == SET) { + wlc_patcher_setval(PTABLE_SLT1, *val); + wlc_patcher_setval(PTABLE_SLT2, ((*val == -1) ? *val : *val + 510)); + } else if ((param & PARAM_MODE) == GET) { + ret = wlc_patcher_getval(PTABLE_SLT1, (unsigned long *) val); + if (*val != 0xffffffff) + *val &= 0xffff; + } + + return ret; +} + +static int wlc_noack(wlc_param param, void *data, void *value) +{ + int *val = (int *) value; + int ret = 0; + + if ((param & PARAM_MODE) == SET) { + wlc_patcher_setval(PTABLE_ACKW, ((*val) ? 1 : 0)); + } else if ((param & PARAM_MODE) == GET) { + ret = wlc_patcher_getval(PTABLE_ACKW, (unsigned long *) val); + *val &= 0xffff; + *val = (*val ? 1 : 0); + } + + return ret; +} + +static int wlc_ibss_merge(wlc_param param, void *data, void *value) +{ + int *val = (int *) value; + int ret = 0; + + if ((param & PARAM_MODE) == SET) { + /* overwrite the instruction with 'lui v0,0x0' - fake a return + * status of 0 for wlc_bcn_tsf_later */ + wlc_patcher_setval(PTABLE_ACKW, ((*val) ? -1 : 0x3c020000)); + } else if ((param & PARAM_MODE) == GET) { + ret = wlc_patcher_getval(PTABLE_ACKW, (unsigned long *) val); + *val = ((*val == -1) ? 1 : 0); + } + + return ret; +} + +static int wlc_ioctl(wlc_param param, void *data, void *value) +{ + unsigned int *var = ((unsigned int *) data); + unsigned int ioc = *var; + + if (param & NOARG) { + return wl_ioctl(interface, ioc, NULL, 0); + } + switch(param & PARAM_TYPE) { + case INT: + return wl_ioctl(interface, ((param & SET) ? (ioc) : (ioc >> 16)) & 0xffff, value, sizeof(int)); + case STRING: + return wl_ioctl(interface, ((param & SET) ? (ioc) : (ioc >> 16)) & 0xffff, value, BUFSIZE); + } + return 0; +} + +static int wlc_iovar(wlc_param param, void *data, void *value) +{ + int *val = (int *) value; + char *iov = *((char **) data); + int ret = 0; + + if (param & SET) { + switch(param & PARAM_TYPE) { + case INT: + ret = wl_iovar_setint(interface, iov, *val); + } + } + if (param & GET) { + switch(param & PARAM_TYPE) { + case INT: + ret = wl_iovar_getint(interface, iov, val); + } + } + + return ret; +} + +static int wlc_bssiovar(wlc_param param, void *data, void *value) +{ + int *val = (int *) value; + char *iov = *((char **) data); + int ret = 0; + + if (param & SET) { + switch(param & PARAM_TYPE) { + case INT: + ret = wl_bssiovar_setint(interface, iov, vif, *val); + } + } + if (param & GET) { + switch(param & PARAM_TYPE) { + case INT: + ret = wl_bssiovar_getint(interface, iov, vif, val); + } + } + + return ret; +} + +static int wlc_vif_enabled(wlc_param param, void *data, void *value) +{ + int *val = (int *) value; + int buf[3]; + int ret = 0; + + sprintf((char *) buf, "bss"); + buf[1] = vif; + if (param & SET) { + buf[2] = (*val ? 1 : 0); + ret = wl_ioctl(interface, WLC_SET_VAR, buf, sizeof(buf)); + } else if (param & GET) { + ret = wl_ioctl(interface, WLC_GET_VAR, buf, sizeof(buf)); + *val = buf[0]; + } + + return ret; +} + +static int wlc_ssid(wlc_param param, void *data, void *value) +{ + int ret = -1, ret2 = -1; + char *dest = (char *) value; + wlc_ssid_t ssid; + + if ((param & PARAM_MODE) == GET) { + ret = wl_bssiovar_get(interface, "ssid", vif, &ssid, sizeof(ssid)); + + if (ret) + /* if we can't get the ssid through the bssiovar, try WLC_GET_SSID */ + ret = wl_ioctl(interface, WLC_GET_SSID, &ssid, sizeof(ssid)); + + if (!ret) { + memcpy(dest, ssid.SSID, ssid.SSID_len); + dest[ssid.SSID_len] = 0; + } + } else if ((param & PARAM_MODE) == SET) { + strncpy(ssid.SSID, value, 32); + ssid.SSID_len = strlen(value); + + if (ssid.SSID_len > 32) + ssid.SSID_len = 32; + + if (vif == 0) { + /* for the main interface, also try the WLC_SET_SSID call */ + ret2 = wl_ioctl(interface, WLC_SET_SSID, &ssid, sizeof(ssid)); + } + + ret = wl_bssiovar_set(interface, "ssid", vif, &ssid, sizeof(ssid)); + ret = (!ret2 ? 0 : ret); + } + + return ret; +} + +static int wlc_int(wlc_param param, void *data, void *value) +{ + int *var = *((int **) data); + int *val = (int *) value; + + if ((param & PARAM_MODE) == SET) { + *var = *val; + } else if ((param & PARAM_MODE) == GET) { + *val = *var; + } + + return 0; +} + +static int wlc_flag(wlc_param param, void *data, void *value) +{ + int *var = *((int **) data); + + *var = 1; + + return 0; +} + +static int wlc_string(wlc_param param, void *data, void *value) +{ + char *var = *((char **) data); + + if ((param & PARAM_MODE) == GET) { + strcpy(value, var); + } + + return 0; +} + +static int wlc_afterburner(wlc_param param, void *data, void *value) +{ + int *val = (int *) value; + int ret = 0; + + if ((param & PARAM_MODE) == GET) { + ret = wl_iovar_getint(interface, "afterburner", val); + } else { + wl_iovar_setint(interface, "wlfeatureflag", (*val ? 3 : 0)); + ret = wl_iovar_setint(interface, "afterburner", (*val ? 1 : 0)); + wl_iovar_setint(interface, "afterburner_override", *val); + } + + return ret; +} + +static int wlc_maclist(wlc_param param, void *data, void *value) +{ + unsigned int *var = ((unsigned int *) data); + unsigned int ioc = *var; + int limit = (sizeof(wlbuf) - 4) / sizeof(struct ether_addr); + struct maclist *list = (struct maclist *) wlbuf; + char *str = (char *) value; + char astr[30], *p; + struct ether_addr *addr; + int isset = 0; + int ret; + + if ((param & PARAM_MODE) == GET) { + list->count = limit; + ret = wl_ioctl(interface, (ioc >> 16) & 0xffff, wlbuf, sizeof(wlbuf)); + + if (!ret) + while (list->count) + str += sprintf(str, "%s%s", ((((char *) value) == str) ? "" : " "), ether_ntoa(&list->ea[list->count-- - 1])); + + return ret; + } else { + while (*str && isspace(*str)) + *str++; + + if (*str == '+') { + str++; + + list->count = limit; + if (wl_ioctl(interface, (ioc >> 16) & 0xffff, wlbuf, sizeof(wlbuf)) == 0) + isset = 1; + + while (*str && isspace(*str)) + str++; + } + + if (!isset) + memset(wlbuf, 0, sizeof(wlbuf)); + + foreach(astr, str, p) { + if (list->count >= limit) + break; + + if ((addr = ether_aton(astr)) != NULL) + memcpy(&list->ea[list->count++], addr, sizeof(struct ether_addr)); + } + + return wl_ioctl(interface, ioc & 0xffff, wlbuf, sizeof(wlbuf)); + } +} + +static int wlc_radio(wlc_param param, void *data, void *value) +{ + int *val = (int *) value; + int ret; + + if ((param & PARAM_MODE) == GET) { + ret = wl_ioctl(interface, WLC_GET_RADIO, val, sizeof(int)); + *val = ((*val & 1) ? 0 : 1); + } else { + *val = (1 << 16) | (*val ? 0 : 1); + ret = wl_ioctl(interface, WLC_SET_RADIO, val, sizeof(int)); + } + + return ret; +} + +static int wlc_wsec_key(wlc_param param, void *null, void *value) +{ + wl_wsec_key_t wsec_key; + unsigned char *index = value; + unsigned char *key; + unsigned char *data; + unsigned char hex[3]; + + if ((param & PARAM_MODE) != SET) + return 0; + + memset(&wsec_key, 0, sizeof(wsec_key)); + if (index[0] == '=') { + wsec_key.flags = WL_PRIMARY_KEY; + index++; + } + + if ((index[0] < '1') || (index[0] > '4') || (index[1] != ',')) + return -1; + + key = index + 2; + if (strncmp(key, "d:", 2) == 0) { /* delete key */ + } else if (strncmp(key, "s:", 2) == 0) { /* ascii key */ + key += 2; + wsec_key.len = strlen(key); + + if ((wsec_key.len != 5) && (wsec_key.len != 13)) + return -1; + + strcpy(wsec_key.data, key); + } else { /* hex key */ + wsec_key.len = strlen(key); + if ((wsec_key.len != 10) && (wsec_key.len != 26)) + return -1; + + wsec_key.len /= 2; + data = wsec_key.data; + hex[2] = 0; + do { + hex[0] = *(key++); + hex[1] = *(key++); + *(data++) = (unsigned char) strtoul(hex, NULL, 16); + } while (*key != 0); + } + + return wl_bssiovar_set(interface, "wsec_key", vif, &wsec_key, sizeof(wsec_key)); +} + +static inline int cw2ecw(int cw) +{ + int i; + for (cw++, i = 0; cw; i++) cw >>=1; + return i - 1; +} + +static int wlc_wme_ac(wlc_param param, void *data, void *value) +{ + char *type = *((char **) data); + char *settings = (char *) value; + char cmd[100], *p, *val; + edcf_acparam_t params[AC_COUNT]; + int ret; + int intval; + int cur = -1; + char *buf = wlbuf; + + if ((param & PARAM_MODE) != SET) + return -1; + + memset(params, 0, sizeof(params)); + ret = wl_iovar_get(interface, type, params, sizeof(params)); + memset(buf, 0, BUFSIZE); + strcpy(buf, type); + buf += strlen(buf) + 1; + + foreach(cmd, settings, p) { + val = strchr(cmd, '='); + if (val == NULL) { + if (strcmp(cmd, "be") == 0) + cur = AC_BE; + else if (strcmp(cmd, "bk") == 0) + cur = AC_BK; + else if (strcmp(cmd, "vi") == 0) + cur = AC_VI; + else if (strcmp(cmd, "vo") == 0) + cur = AC_VO; + else + return -1; + + /* just in case */ + params[cur].ACI = (params[cur].ACI & (0x3 << 5)) | (cur << 5); + } else { + *(val++) = 0; + + intval = strtoul(val, NULL, 10); + if (strcmp(cmd, "cwmin") == 0) + params[cur].ECW = (params[cur].ECW & ~(0xf)) | cw2ecw(intval); + else if (strcmp(cmd, "ecwmin") == 0) + params[cur].ECW = (params[cur].ECW & ~(0xf)) | (intval & 0xf); + else if (strcmp(cmd, "cwmax") == 0) + params[cur].ECW = (params[cur].ECW & ~(0xf << 4)) | (cw2ecw(intval) << 4); + else if (strcmp(cmd, "ecwmax") == 0) + params[cur].ECW = (params[cur].ECW & ~(0xf << 4)) | ((intval & 0xf) << 4); + else if (strcmp(cmd, "aifsn") == 0) + params[cur].ACI = (params[cur].ACI & ~(0xf)) | (intval & 0xf); + else if (strcmp(cmd, "txop") == 0) + params[cur].TXOP = intval >> 5; + else if (strcmp(cmd, "force") == 0) + params[cur].ACI = (params[cur].ACI & ~(1 << 4)) | ((intval) ? (1 << 4) : 0); + else return -1; + + memcpy(buf, ¶ms[cur], sizeof(edcf_acparam_t)); + wl_ioctl(interface, WLC_SET_VAR, wlbuf, BUFSIZE); + } + } + return ret; +} + +static const struct wlc_call wlc_calls[] = { + { + .name = "version", + .param = STRING|NOARG, + .handler = wlc_string, + .data.str = VERSION, + .desc = "Version of this program" + }, + { + .name = "debug", + .param = INT, + .handler = wlc_int, + .data.ptr = &debug, + .desc = "wlc debug level" + }, + { + .name = "stdin", + .param = NOARG, + .handler = wlc_flag, + .data.ptr = &fromstdin, + .desc = "Accept input from stdin" + }, + { + .name = "up", + .param = NOARG, + .handler = wlc_ioctl, + .data.num = WLC_UP, + .desc = "Bring the interface up" + }, + { + .name = "down", + .param = NOARG, + .handler = wlc_ioctl, + .data.num = WLC_DOWN, + .desc = "Bring the interface down" + }, + { + .name = "radio", + .param = INT, + .handler = wlc_radio, + .desc = "Radio enabled flag" + }, + { + .name = "ap", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_AP << 16) | WLC_SET_AP), + .desc = "Access Point mode" + }, + { + .name = "mssid", + .param = INT, + .handler = wlc_iovar, + .data.str = "mssid", + .desc = "Multi-ssid mode" + }, + { + .name = "apsta", + .param = INT, + .handler = wlc_iovar, + .data.str = "apsta", + .desc = "AP+STA mode" + }, + { + .name = "infra", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_INFRA << 16) | WLC_SET_INFRA), + .desc = "Infrastructure mode" + }, + { + .name = "wet", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_WET << 16) | WLC_SET_WET), + .desc = "Wireless repeater mode", + }, + { + .name = "statimeout", + .param = INT, + .handler = wlc_iovar, + .data.str = "sta_retry_time", + .desc = "STA connection timeout" + }, + { + .name = "country", + .param = STRING, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_COUNTRY << 16) | WLC_SET_COUNTRY), + .desc = "Country code" + }, + { + .name = "channel", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_CHANNEL << 16) | WLC_SET_CHANNEL), + .desc = "Channel", + }, + { + .name = "vif", + .param = INT, + .handler = wlc_int, + .data.ptr = &vif, + .desc = "Current vif index" + }, + { + .name = "enabled", + .param = INT, + .handler = wlc_vif_enabled, + .desc = "vif enabled flag" + }, + { + .name = "ssid", + .param = STRING, + .handler = wlc_ssid, + .desc = "Interface ESSID" + }, + { + .name = "closed", + .param = INT, + .handler = wlc_bssiovar, + .data.str = "closednet", + .desc = "Hidden ESSID flag" + }, + { + .name = "wsec", + .param = INT, + .handler = wlc_bssiovar, + .data.str = "wsec", + .desc = "Security mode flags" + }, + { + .name = "wepkey", + .param = STRING, + .handler = wlc_wsec_key, + .desc = "Set/Remove WEP keys" + }, + { + .name = "wsec_restrict", + .param = INT, + .handler = wlc_bssiovar, + .data.str = "wsec_restrict", + .desc = "Drop unencrypted traffic" + }, + { + .name = "eap_restrict", + .param = INT, + .handler = wlc_bssiovar, + .data.str = "eap_restrict", + .desc = "Only allow 802.1X traffic until 802.1X authorized" + }, + { + .name = "wpa_auth", + .param = INT, + .handler = wlc_bssiovar, + .data.str = "wpa_auth", + .desc = "WPA authentication modes" + }, + { + .name = "ap_isolate", + .param = INT, + .handler = wlc_bssiovar, + .data.str = "ap_isolate", + .desc = "Isolate connected clients" + }, + { + .name = "supplicant", + .param = INT, + .handler = wlc_iovar, + .data.str = "sup_wpa", + .desc = "Built-in WPA supplicant" + }, + { + .name = "maxassoc", + .param = INT, + .handler = wlc_iovar, + .data.str = "maxassoc", + .desc = "Max. number of associated clients", + }, + { + .name = "wme", + .param = INT, + .handler = wlc_iovar, + .data.str = "wme", + .desc = "WME enabled" + }, + { + .name = "wme_ac_ap", + .param = STRING, + .handler = wlc_wme_ac, + .data.str = "wme_ac_ap", + .desc = "Set WME AC options for AP mode", + }, + { + .name = "wme_ac_sta", + .param = STRING, + .handler = wlc_wme_ac, + .data.str = "wme_ac_sta", + .desc = "Set WME AC options for STA mode", + }, + { + .name = "wme_noack", + .param = INT, + .handler = wlc_iovar, + .data.str = "wme_noack", + .desc = "WME ACK disable request", + }, + { + .name = "fragthresh", + .param = INT, + .handler = wlc_iovar, + .data.str = "fragthresh", + .desc = "Fragmentation threshold", + }, + { + .name = "rtsthresh", + .param = INT, + .handler = wlc_iovar, + .data.str = "rtsthresh", + .desc = "RTS threshold" + }, + { + .name = "rxant", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_ANTDIV << 16) | WLC_SET_ANTDIV), + .desc = "Rx antenna selection" + }, + { + .name = "txant", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_TXANT << 16) | WLC_SET_TXANT), + .desc = "Tx antenna selection" + }, + { + .name = "dtim", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_DTIMPRD << 16) | WLC_SET_DTIMPRD), + .desc = "DTIM period", + }, + { + .name = "bcn", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_BCNPRD << 16) | WLC_SET_BCNPRD), + .desc = "Beacon interval" + }, + { + .name = "frameburst", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_FAKEFRAG << 16) | WLC_SET_FAKEFRAG), + .desc = "Framebursting" + }, + { + .name = "monitor", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_MONITOR << 16) | WLC_SET_MONITOR), + .desc = "Monitor mode" + }, + { + .name = "passive", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_PASSIVE << 16) | WLC_SET_PASSIVE), + .desc = "Passive mode" + }, + { + .name = "macfilter", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_MACMODE << 16) | WLC_SET_MACMODE), + .desc = "MAC filter mode (0:disabled, 1:deny, 2:allow)" + }, + { + .name = "maclist", + .param = STRING, + .data.num = ((WLC_GET_MACLIST << 16) | WLC_SET_MACLIST), + .handler = wlc_maclist, + .desc = "MAC filter list" + }, + { + .name = "autowds", + .param = INT, + .handler = wlc_ioctl, + .data.num = ((WLC_GET_LAZYWDS << 16) | WLC_SET_LAZYWDS), + .desc = "Automatic WDS" + }, + { + .name = "wds", + .param = STRING, + .data.num = ((WLC_GET_WDSLIST << 16) | WLC_SET_WDSLIST), + .handler = wlc_maclist, + .desc = "WDS connection list" + }, + { + .name = "wdstimeout", + .param = INT, + .handler = wlc_iovar, + .data.str = "wdstimeout", + .desc = "WDS link detection timeout" + }, + { + .name = "afterburner", + .param = INT, + .handler = wlc_afterburner, + .desc = "Broadcom Afterburner" + }, + { + .name = "slottime", + .param = INT, + .handler = wlc_slottime, + .desc = "Slot time (-1 = auto)" + }, + { + .name = "txack", + .param = INT, + .handler = wlc_noack, + .desc = "Tx ACK enabled flag" + }, + { + .name = "ibss_merge", + .param = INT, + .handler = wlc_ibss_merge, + .desc = "Allow IBSS merge in Ad-Hoc mode" + } +}; +#define wlc_calls_size (sizeof(wlc_calls) / sizeof(struct wlc_call)) + +static void usage(char *cmd) +{ + int i; + fprintf(stderr, "Usage: %s <command> [<argument> ...]\n" + "\n" + "Available commands:\n", cmd); + for (i = 0; i < wlc_calls_size; i++) { + fprintf(stderr, "\t%-16s\t%s\n", wlc_calls[i].name ?: "", wlc_calls[i].desc ?: ""); + } + fprintf(stderr, "\n"); + exit(1); +} + +static int do_command(const struct wlc_call *cmd, char *arg) +{ + static char buf[BUFSIZE]; + int set; + int ret = 0; + char *format, *end; + int intval; + + if (debug >= 10) { + fprintf(stderr, "do_command %-16s\t'%s'\n", cmd->name, arg); + } + + if ((arg == NULL) && ((cmd->param & PARAM_TYPE) != NONE)) { + set = 0; + ret = cmd->handler(cmd->param | GET, (void *) &cmd->data, (void *) buf); + if (ret == 0) { + switch(cmd->param & PARAM_TYPE) { + case INT: + intval = *((int *) buf); + + if (intval > 65535) + format = "0x%08x\n"; + else if (intval > 255) + format = "0x%04x\n"; + else + format = "%d\n"; + + fprintf(stdout, format, intval); + break; + case STRING: + fprintf(stdout, "%s\n", buf); + } + } + } else { /* SET */ + set = 1; + switch(cmd->param & PARAM_TYPE) { + case INT: + intval = strtoul(arg, &end, 10); + if (end && !(*end)) { + memcpy(buf, &intval, sizeof(intval)); + } else { + fprintf(stderr, "%s: Invalid argument\n", cmd->name); + return -1; + } + break; + case STRING: + strncpy(buf, arg, BUFSIZE); + buf[BUFSIZE - 1] = 0; + } + + ret = cmd->handler(cmd->param | SET, (void *) &cmd->data, (void *) buf); + } + + if ((debug > 0) && (ret != 0)) + fprintf(stderr, "Command '%s %s' failed: %d\n", (set == 1 ? "set" : "get"), cmd->name, ret); + + return ret; +} + +static struct wlc_call *find_cmd(char *name) +{ + int found = 0, i = 0; + + while (!found && (i < wlc_calls_size)) { + if (strcmp(name, wlc_calls[i].name) == 0) + found = 1; + else + i++; + } + + return (struct wlc_call *) (found ? &wlc_calls[i] : NULL); +} + +int main(int argc, char **argv) +{ + static char buf[BUFSIZE]; + char *s, *s2; + char *cmd = argv[0]; + struct wlc_call *call; + int ret = 0; + + if (argc < 2) + usage(argv[0]); + + for(interface[2] = '0'; (interface[2] < '3') && (wl_probe(interface) != 0); interface[2]++); + if (interface[2] == '3') { + fprintf(stderr, "No Broadcom wl interface found!\n"); + return -1; + } + + argv++; + argc--; + while ((argc > 0) && (argv[0] != NULL)) { + if ((call = find_cmd(argv[0])) == NULL) { + fprintf(stderr, "Invalid command: %s\n\n", argv[0]); + usage(cmd); + } + if ((argc > 1) && (!(call->param & NOARG))) { + ret = do_command(call, argv[1]); + argv += 2; + argc -= 2; + } else { + ret = do_command(call, NULL); + argv++; + argc--; + } + } + + while (fromstdin && !feof(stdin)) { + *buf = 0; + fgets(buf, BUFSIZE - 1, stdin); + + if (*buf == 0) + continue; + + if ((s = strchr(buf, '\r')) != NULL) + *s = 0; + if ((s = strchr(buf, '\n')) != NULL) + *s = 0; + + s = buf; + while (isspace(*s)) + s++; + + if (!*s) + continue; + + if ((s2 = strchr(buf, ' ')) != NULL) + *(s2++) = 0; + + while (s2 && isspace(*s2)) + s2++; + + if ((call = find_cmd(buf)) == NULL) { + fprintf(stderr, "Invalid command: %s\n", buf); + ret = -1; + } else + ret = do_command(call, ((call->param & NOARG) ? NULL : s2)); + } + + return ret; +} From 52f8d5bdce1bce9fc1119c1674fd5be24453a22c Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 18:05:20 +0000 Subject: [PATCH 214/757] move source files to src/. SVN-Revision: 3993 --- openwrt/package/robocfg/Makefile | 11 ++++++++--- openwrt/package/robocfg/src/Makefile | 12 ++++++++++++ openwrt/package/robocfg/{ => src}/etc53xx.h | 0 openwrt/package/robocfg/{ => src}/robocfg.c | 0 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 openwrt/package/robocfg/src/Makefile rename openwrt/package/robocfg/{ => src}/etc53xx.h (100%) rename openwrt/package/robocfg/{ => src}/robocfg.c (100%) diff --git a/openwrt/package/robocfg/Makefile b/openwrt/package/robocfg/Makefile index 81cf99ac237..49f60056997 100644 --- a/openwrt/package/robocfg/Makefile +++ b/openwrt/package/robocfg/Makefile @@ -16,15 +16,20 @@ TITLE:=BCM5325E/536x switch configuration utility DESCRIPTION:=Broadcom BCM5325E/536x switch configuration utility endef +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/robocfg robocfg.c + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + all endef define Package/robocfg/install install -d -m0755 $(1)/sbin install -m0755 $(PKG_BUILD_DIR)/robocfg $(1)/sbin/ - $(RSTRIP) $(1) - $(IPKG_BUILD) $(1) $(PACKAGE_DIR) endef $(eval $(call BuildPackage,robocfg)) diff --git a/openwrt/package/robocfg/src/Makefile b/openwrt/package/robocfg/src/Makefile new file mode 100644 index 00000000000..fa763edbc83 --- /dev/null +++ b/openwrt/package/robocfg/src/Makefile @@ -0,0 +1,12 @@ +# $Id$ + +all: robocfg + +%.o: %.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $^ + +robocfg: robocfg.o + $(CC) -o $@ $^ + +clean: + rm -f *.o robocfg diff --git a/openwrt/package/robocfg/etc53xx.h b/openwrt/package/robocfg/src/etc53xx.h similarity index 100% rename from openwrt/package/robocfg/etc53xx.h rename to openwrt/package/robocfg/src/etc53xx.h diff --git a/openwrt/package/robocfg/robocfg.c b/openwrt/package/robocfg/src/robocfg.c similarity index 100% rename from openwrt/package/robocfg/robocfg.c rename to openwrt/package/robocfg/src/robocfg.c From 5bdf5b84cb2c0c96cbe82222ee7b4c9ae836abd5 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 18:10:41 +0000 Subject: [PATCH 215/757] remove ipkg directory, add conffiles, normalize Makefile. SVN-Revision: 3994 --- openwrt/package/hostapd/Makefile | 55 ++++++++++--------- .../hostapd/ipkg/hostapd-mini.conffiles | 1 - .../package/hostapd/ipkg/hostapd.conffiles | 1 - 3 files changed, 30 insertions(+), 27 deletions(-) delete mode 100644 openwrt/package/hostapd/ipkg/hostapd-mini.conffiles delete mode 100644 openwrt/package/hostapd/ipkg/hostapd.conffiles diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile index f4a6145213a..4a1c3f92650 100644 --- a/openwrt/package/hostapd/Makefile +++ b/openwrt/package/hostapd/Makefile @@ -16,6 +16,36 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(TOPDIR)/package/rules.mk +define Package/hostapd +SECTION:=net +CATEGORY:=Network +DEPENDS:=+libopenssl +TITLE:=IEEE 802.1x Authenticator +DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator +URL:=http://hostap.epitest.fi/ +endef + +define Package/hostapd/conffiles +/etc/hostapd.conf +endef + +define Package/hostapd-mini +$(call Package/hostapd) +TITLE:=IEEE 802.1x Authenticator (WPA-PSK only) +DEPENDS:= +DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (WPA-PSK only) +endef + +define Package/hostapd-mini/conffiles +/etc/hostapd.conf +endef + +define Package/hostapd-utils +$(call Package/hostapd) +DEPENDS:=@PACKAGE_hostapd||PACKAGE_hostapd-mini +TITLE:=IEEE 802.1x Authenticator (utils) +DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (command line utils) +endef define Build/ConfigureTarget $(CP) $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)_$(1) @@ -73,39 +103,14 @@ define Build/Clean rm -rf $(PKG_BUILD_DIR)_mini endef -define Package/hostapd -SECTION:=net -CATEGORY:=Network -DEPENDS:=+libopenssl -TITLE:=IEEE 802.1x Authenticator -DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator -URL:=http://hostap.epitest.fi/ -endef - -define Package/hostapd-mini -$(call Package/hostapd) -TITLE:=IEEE 802.1x Authenticator (WPA-PSK only) -DEPENDS:= -DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (WPA-PSK only) -endef - -define Package/hostapd-utils -$(call Package/hostapd) -DEPENDS:=@PACKAGE_hostapd||PACKAGE_hostapd-mini -TITLE:=IEEE 802.1x Authenticator (utils) -DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (command line utils) -endef - define Package/hostapd-utils/install install -m0755 -d $(1)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(1)/usr/sbin/ endef - $(eval $(call Package/Template,hostapd,default)) $(eval $(call Package/Template,hostapd-mini,mini)) $(eval $(call BuildPackage,hostapd)) $(eval $(call BuildPackage,hostapd-mini)) $(eval $(call BuildPackage,hostapd-utils)) - diff --git a/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles b/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles deleted file mode 100644 index f61980010e6..00000000000 --- a/openwrt/package/hostapd/ipkg/hostapd-mini.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/hostapd.conf diff --git a/openwrt/package/hostapd/ipkg/hostapd.conffiles b/openwrt/package/hostapd/ipkg/hostapd.conffiles deleted file mode 100644 index f61980010e6..00000000000 --- a/openwrt/package/hostapd/ipkg/hostapd.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/hostapd.conf From b418646d03619ff973bff5a79b8dad5b03fe6a97 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 18:22:24 +0000 Subject: [PATCH 216/757] remove unneeded autoconf call and flags, rename S50dropbear to dropbear.init, normalize Makefile: - indent configure invocation, - use "install -d" instead of "mkdir -p". SVN-Revision: 3995 --- openwrt/package/dropbear/Makefile | 84 +++++++++---------- .../files/{S50dropbear => dropbear.init} | 0 2 files changed, 41 insertions(+), 43 deletions(-) rename openwrt/package/dropbear/files/{S50dropbear => dropbear.init} (100%) diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index db79dd5c413..bda4d8fc913 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -34,44 +34,42 @@ define Build/Configure $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ - autoconf; \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + CFLAGS="$(TARGET_CFLAGS)" \ ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --infodir=/usr/share/info \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - $(DISABLE_LARGEFILE) \ - $(DISABLE_NLS) \ - --with-shared \ - --disable-pam \ - --enable-openpty \ - --enable-syslog \ - --disable-shadow \ - --disable-lastlog \ - --disable-utmp \ - --disable-utmpx \ - --disable-wtmp \ - --disable-wtmpx \ - --disable-loginfunc \ - --disable-pututline \ - --disable-pututxline \ - --disable-zlib \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + $(DISABLE_LARGEFILE) \ + $(DISABLE_NLS) \ + --with-shared \ + --disable-pam \ + --enable-openpty \ + --enable-syslog \ + --disable-shadow \ + --disable-lastlog \ + --disable-utmp \ + --disable-utmpx \ + --disable-wtmp \ + --disable-wtmpx \ + --disable-loginfunc \ + --disable-pututline \ + --disable-pututxline \ + --disable-zlib \ ); endef @@ -86,21 +84,21 @@ define Build/Compile endef define Package/dropbear/install - mkdir -p $(1)/usr/bin - mkdir -p $(1)/usr/sbin - install -m 755 $(PKG_BUILD_DIR)/dropbearmulti \ + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/dropbearmulti \ $(1)/usr/sbin/dropbear + install -d -m0755 $(1)/usr/bin ln -sf ../sbin/dropbear $(1)/usr/bin/scp ln -sf ../sbin/dropbear $(1)/usr/bin/ssh ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey - mkdir -p $(1)/etc/init.d - install -m 755 ./files/S50dropbear $(1)/etc/init.d/ + install -d -m0755 $(1)/etc/init.d + install -m0755 ./files/dropbear.init $(1)/etc/init.d/S50dropbear endef define Package/dropbearconvert/install - mkdir -p $(1)/usr/bin - install -m 755 $(PKG_BUILD_DIR)/dropbearconvert \ + install -d -m0755 $(1)/usr/bin + install -m0755 $(PKG_BUILD_DIR)/dropbearconvert \ $(1)/usr/bin/dropbearconvert endef diff --git a/openwrt/package/dropbear/files/S50dropbear b/openwrt/package/dropbear/files/dropbear.init similarity index 100% rename from openwrt/package/dropbear/files/S50dropbear rename to openwrt/package/dropbear/files/dropbear.init From adbb4c3e335459cffc016f328fdcac44be09ce9a Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 18:26:00 +0000 Subject: [PATCH 217/757] rename br2684.init to br2684.hotplug, normalize Makefile. SVN-Revision: 3996 --- openwrt/package/linux-atm/Makefile | 31 ++++++++++--------- .../files/{br2684.init => br2684.hotplug} | 0 2 files changed, 16 insertions(+), 15 deletions(-) rename openwrt/package/linux-atm/files/{br2684.init => br2684.hotplug} (100%) diff --git a/openwrt/package/linux-atm/Makefile b/openwrt/package/linux-atm/Makefile index 5b75e195522..e37d5bdceb5 100644 --- a/openwrt/package/linux-atm/Makefile +++ b/openwrt/package/linux-atm/Makefile @@ -17,18 +17,18 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/linux-atm - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Linux ATM Library - DESCRIPTION:=Library for accessing the Linux ATM subsystem +SECTION:=libs +CATEGORY:=Libraries +TITLE:=Linux ATM Library +DESCRIPTION:=Library for accessing the Linux ATM subsystem endef define Package/br2684ctl - SECTION:=net - CATEGORY:=Network - TITLE:=RFC2684 bridging - DEPENDS:=+linux-atm - DESCRIPTION:=ATM RFC2684 bridging utility +SECTION:=net +CATEGORY:=Network +TITLE:=RFC2684 bridging +DEPENDS:=+linux-atm +DESCRIPTION:=ATM RFC2684 bridging utility endef define Build/Configure @@ -51,22 +51,23 @@ define Package/linux-atm/install endef define Package/br2684ctl/install + install -d -m0755 $(1)/etc/hotplug.d/net + install -m0644 ./files/br2684.hotplug $(1)/etc/hotplug.d/net/30-br2684 install -d -m0755 $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl $(1)/usr/sbin/ - install -d -m0755 $(1)/etc/hotplug.d/net - install -m0644 ./files/br2684.init $(1)/etc/hotplug.d/net/30-br2684 endef define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/atm{,d,sap}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/atm{,d,sap}.h \ + $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.{a,so*} \ + $(STAGING_DIR)/usr/lib/ endef define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/atm{,d,sap}.h \ + rm -rf $(STAGING_DIR)/usr/include/atm{,d,sap}.h \ $(STAGING_DIR)/usr/lib/libatm.{a,so*} endef diff --git a/openwrt/package/linux-atm/files/br2684.init b/openwrt/package/linux-atm/files/br2684.hotplug similarity index 100% rename from openwrt/package/linux-atm/files/br2684.init rename to openwrt/package/linux-atm/files/br2684.hotplug From f24397711b6a1c2605939b8349dfbe6ab3ea64aa Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 18:27:23 +0000 Subject: [PATCH 218/757] add conffiles, use proper optimization flags when building. SVN-Revision: 3997 --- openwrt/package/dnsmasq/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index d3ce64736b7..6efaf370a1e 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -24,12 +24,24 @@ coupled DNS and DHCP service to a LAN. URL:=http://www.thekelleys.org.uk/dnsmasq/ endef +define Package/dnsmasq/conffiles +/etc/dnsmasq.conf +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + BINDIR="/usr/sbin" MANDIR="/usr/man" \ + all +endef + define Package/dnsmasq/install - install -m0755 -d $(1)/usr/sbin - install -m0755 -d $(1)/etc/init.d/ - install -m0755 $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/ + install -m0755 -d $(1)/etc install -m0644 ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf + install -m0755 -d $(1)/etc/init.d install -m0755 ./files/dnsmasq.init $(1)/etc/init.d/S50dnsmasq + install -m0755 -d $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/src/dnsmasq $(1)/usr/sbin/ endef $(eval $(call BuildPackage,dnsmasq)) From b65701e8874616ebcdcf7dfa4883a034c52eaf93 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 18:30:40 +0000 Subject: [PATCH 219/757] normalize Makefiles. SVN-Revision: 3998 --- openwrt/package/base-files/Makefile | 32 +++++----- openwrt/package/fuse/Makefile | 59 +++++++++---------- openwrt/package/hostap/Makefile | 38 +++++------- openwrt/package/ipsec-tools/Makefile | 4 +- openwrt/package/ipset/Makefile | 2 +- openwrt/package/iptables/Makefile | 6 -- openwrt/package/libpcap/Makefile | 44 ++++++-------- openwrt/package/mini_fo/Makefile | 17 +++--- openwrt/package/nvram/Makefile | 11 ++-- openwrt/package/openswan/Makefile | 17 +++--- openwrt/package/ppp/Makefile | 77 ++++++++++++------------- openwrt/package/pptp/Makefile | 6 +- openwrt/package/shfs/Makefile | 16 ++--- openwrt/package/spca5xx/Makefile | 17 +++--- openwrt/package/switch/Makefile | 26 ++++----- openwrt/package/ueagle-atm/Makefile | 16 ++--- openwrt/package/wireless-tools/Makefile | 26 +++++---- openwrt/package/zd1211/Makefile | 19 +++--- openwrt/package/zlib/Makefile | 35 +++++------ 19 files changed, 218 insertions(+), 250 deletions(-) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index c790efeab18..ec3dc889238 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -23,12 +23,12 @@ endif CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) define Package/base-files$(TARGET) - SECTION:=base - CATEGORY:=Base system - DEFAULT:=y - TITLE:=OpenWrt system scripts - DESCRIPTION:=Base filesystem for OpenWrt - VERSION:=$(PKG_RELEASE) +SECTION:=base +CATEGORY:=Base system +DEFAULT:=y +TITLE:=OpenWrt system scripts +DESCRIPTION:=Base filesystem for OpenWrt +VERSION:=$(PKG_RELEASE) endef define -ar7-2.4/conffiles @@ -74,19 +74,19 @@ $(call $(TARGET)/conffiles) endef define Package/libgcc - SECTION:=libs - CATEGORY:=Libraries - DEFAULT:=y - TITLE:=GCC support library - VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) - DESCRIPTION:=$(TITLE) +SECTION:=libs +CATEGORY:=Libraries +DEFAULT:=y +TITLE:=GCC support library +VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) +DESCRIPTION:=$(TITLE) endef define Package/uclibc - $(call Package/base-files$(TARGET)) - VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) - TITLE:=C library - DESCRIPTION:=C library for embedded systems +$(call Package/base-files$(TARGET)) +VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) +TITLE:=C library +DESCRIPTION:=C library for embedded systems endef define Build/Prepare diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile index 09780e0d383..91d4dd6074d 100644 --- a/openwrt/package/fuse/Makefile +++ b/openwrt/package/fuse/Makefile @@ -8,23 +8,23 @@ PKG_VERSION:=2.5.3 PKG_RELEASE:=1 PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/kmod-fuse - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:= - TITLE:=FUSE (Filesystem in UserSpacE) - DESCRIPTION:=FUSE (Filesystem in UserSpacE) - URL:=http://fuse.sourceforge.net/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=FUSE (Filesystem in UserSpacE) +DESCRIPTION:=FUSE (Filesystem in UserSpacE) +URL:=http://fuse.sourceforge.net/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Configure @@ -81,6 +81,25 @@ define Build/Compile all install endef +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} \ + $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} \ + $(STAGING_DIR)/usr/lib/ + mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(SED) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc + $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/fuse{,.h} \ + $(STAGING_DIR)/usr/lib/libfuse.{a,so*} \ + $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc +endef + define Package/kmod-fuse/install install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \ @@ -91,28 +110,4 @@ define Package/kmod-fuse/install $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/ endef - -define Build/InstallDev - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse.h $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so* $(STAGING_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - $(SED) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc - $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc -endef - -define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/fuse \ - $(STAGING_DIR)/usr/include/fuse.h \ - $(STAGING_DIR)/usr/lib/libfuse.a \ - $(STAGING_DIR)/usr/lib/libfuse.so* \ - $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc -endef - - $(eval $(call BuildPackage,kmod-fuse)) diff --git a/openwrt/package/hostap/Makefile b/openwrt/package/hostap/Makefile index b546c0b2557..80f820187bf 100644 --- a/openwrt/package/hostap/Makefile +++ b/openwrt/package/hostap/Makefile @@ -8,21 +8,21 @@ PKG_VERSION:=0.4.9 PKG_RELEASE:=1 PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/kmod-hostap - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_4_BRCM||LINUX_2_4_X86 - TITLE:=Host AP support for Prism2/2.5/3 IEEE 802.11b - DESCRIPTION:=Host AP support for Prism2/2.5/3 IEEE 802.11b \\\ +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@LINUX_2_4_BRCM||LINUX_2_4_X86 +TITLE:=Host AP support for Prism2/2.5/3 IEEE 802.11b +DESCRIPTION:=Host AP support for Prism2/2.5/3 IEEE 802.11b \\\ A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3 \\\ chipset. This driver supports so called Host AP mode that allows the card \\\ to act as an IEEE 802.11 access point. \\\ @@ -30,28 +30,22 @@ to act as an IEEE 802.11 access point. \\\ This option includes the base Host AP driver code that is shared by \\\ different hardware models. You will also need to enable support for \\\ PLX/PCI/CS version of the driver to actually use the driver. \\\ - URL:=http://hostap.epitest.fi/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +URL:=http://hostap.epitest.fi/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Package/kmod-hostap-pci - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=kmod-hostap - TITLE:=Host AP driver for Prism2.5 PCI adaptors - DESCRIPTION:=Host AP driver for Prism2.5 PCI adaptors - URL:=http://hostap.epitest.fi/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +$(call Package/kmod-hostap) +DEPENDS:=kmod-hostap +TITLE:=Host AP driver for Prism2.5 PCI adaptors +DESCRIPTION:=Host AP driver for Prism2.5 PCI adaptors endef define Package/kmod-hostap-plx - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=kmod-hostap - TITLE:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors - DESCRIPTION:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors - URL:=http://hostap.epitest.fi/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +$(call Package/kmod-hostap) +DEPENDS:=kmod-hostap +TITLE:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors +DESCRIPTION:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors endef diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 4b6bfe09ecb..58dccca62ad 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -74,11 +74,11 @@ endef define Package/ipsec-tools/install install -d -m0755 $(1)/etc + install -m0600 $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/ install -d -m0755 $(1)/usr/lib/ - install -d -m0755 $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/ + install -d -m0755 $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/ diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index b5b9c784ed7..456f8b6be4a 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -6,7 +6,7 @@ PKG_NAME:=ipset PKG_VERSION:=2.2.3 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/ipset-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-20050914.tar.bz2 PKG_SOURCE_URL:=http://ipset.netfilter.org PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index f47b936f056..623a64ed84f 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -50,7 +50,6 @@ Includes: \\\ * libipt_conntrack \\\ * libipt_helper \\\ * libipt_connmark/CONNMARK - endef define Package/iptables-mod-filter @@ -62,7 +61,6 @@ DESCRIPTION:=iptables extensions for packet content inspection\\\ Includes: \\\ * libipt_ipp2p \\\ * libipt_layer7 - endef define Package/iptables-mod-imq @@ -73,7 +71,6 @@ TITLE:=IMQ support DESCRIPTION:=iptables extension for IMQ support\\\ Includes: \\\ * libipt_IMQ - endef define Package/iptables-mod-ipopt @@ -91,7 +88,6 @@ Includes: \\\ * libipt_tcpmms \\\ * libipt_ttl/TTL \\\ * libipt_unclean - endef define Package/iptables-mod-ipsec @@ -103,7 +99,6 @@ DESCRIPTION:=iptables extensions for matching ipsec traffic\\\ Includes: \\\ * libipt_ah \\\ * libipt_esp - endef define Package/iptables-mod-nat @@ -138,7 +133,6 @@ Includes: \\\ * libipt_physdev \\\ * libipt_pkttype \\\ * libipt_recent - endef define Package/iptables-utils diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile index 960caf133d7..d4d7e216726 100644 --- a/openwrt/package/libpcap/Makefile +++ b/openwrt/package/libpcap/Makefile @@ -17,11 +17,11 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/libpcap - SECTION:=base - CATEGORY:=Libraries - TITLE:=Low-level packet capture library - DESCRIPTION:=A system-independent library for user-level network packet capture. - URL:=http://www.tcpdump.org/ +SECTION:=base +CATEGORY:=Libraries +TITLE:=Low-level packet capture library +DESCRIPTION:=A system-independent library for user-level network packet capture. +URL:=http://www.tcpdump.org/ endef define Build/Configure @@ -69,29 +69,23 @@ define Build/Compile all install endef +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap{,-bpf,-namedb}.h \ + $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} \ + $(STAGING_DIR)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/pcap{,-bpf,-named}.h \ + $(STAGING_DIR)/usr/lib/libpcap.{a,so*} +endef + define Package/libpcap/install install -m0755 -d $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/ endef -define Build/InstallDev - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap.h \ - $(PKG_INSTALL_DIR)/usr/include/pcap-bpf.h \ - $(PKG_INSTALL_DIR)/usr/include/pcap-namedb.h \ - $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.a \ - $(PKG_INSTALL_DIR)/usr/lib/libpcap.so* \ - $(STAGING_DIR)/usr/lib/ -endef - -define Build/UninstallDev - rm -rf $(STAGING_DIR)/usr/include/pcap.h \ - $(STAGING_DIR)/usr/include/pcap-bpf.h \ - $(STAGING_DIR)/usr/include/pcap-namedb.h \ - $(STAGING_DIR)/usr/lib/libpcap.a \ - $(STAGING_DIR)/usr/lib/libpcap.so* -endef - $(eval $(call BuildPackage,libpcap)) diff --git a/openwrt/package/mini_fo/Makefile b/openwrt/package/mini_fo/Makefile index a6319f4f7ee..f2c46c9ec3c 100644 --- a/openwrt/package/mini_fo/Makefile +++ b/openwrt/package/mini_fo/Makefile @@ -8,22 +8,21 @@ PKG_VERSION:=0.6.2pre1 PKG_RELEASE:=1 PKG_MD5SUM:=acd12157be25d7b3c8df90914049403e +PKG_BUILD_DIR:=$(BUILD_DIR)/mini_fo-0-6-2-pre1 PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/ PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2 PKG_CAT:=bzcat -PKG_BUILD_DIR:=$(BUILD_DIR)/mini_fo-0-6-2-pre1 - include $(TOPDIR)/package/rules.mk define Package/kmod-mini-fo - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:= - TITLE:=The mini fanout overlay file system - DESCRIPTION:=The mini fanout overlay file system - URL:=http://www.denx.de/wiki/Know.MiniFOHome - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=The mini fanout overlay file system +DESCRIPTION:=The mini fanout overlay file system +URL:=http://www.denx.de/wiki/Know.MiniFOHome +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/openwrt/package/nvram/Makefile b/openwrt/package/nvram/Makefile index 5900f6f05b1..019800a0c6e 100644 --- a/openwrt/package/nvram/Makefile +++ b/openwrt/package/nvram/Makefile @@ -22,20 +22,19 @@ define Build/Prepare endef define Package/nvram/install - install -d -m0755 $(1)/usr/lib + install -d -m0755 $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib{nvram,shared}*.so $(1)/usr/lib/ install -d -m0755 $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib - install -m0755 $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/ endef define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib{nvram,shared}*.so $(STAGING_DIR)/usr/lib/ endef define Build/UninstallDev - rm -f $(STAGING_DIR)/usr/lib/libshared*.so \ - $(STAGING_DIR)/usr/lib/libnvram*.so + rm -f $(STAGING_DIR)/usr/lib/lib{nvram,shared}*.so endef $(eval $(call BuildPackage,nvram)) diff --git a/openwrt/package/openswan/Makefile b/openwrt/package/openswan/Makefile index 1f41ccff916..4a1a42cc07d 100644 --- a/openwrt/package/openswan/Makefile +++ b/openwrt/package/openswan/Makefile @@ -8,23 +8,22 @@ PKG_VERSION:=2.4.5 PKG_RELEASE:=1 PKG_MD5SUM:=a9a8e88313faceebfc5ceb1a9da9a3c4 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://www.openswan.org/download PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - include $(TOPDIR)/package/rules.mk define Package/kmod-openswan - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:= - TITLE:=Openswan kernel module - DESCRIPTION:=Openswan kernel module \\\ +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=Openswan kernel module +DESCRIPTION:=Openswan kernel module \\\ Openswan is an implementation of IPsec for Linux. - URL:=http://www.openswan.org/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +URL:=http://www.openswan.org/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 2f014003089..55986f95c05 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -18,65 +18,64 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/ppp - SECTION:=net - CATEGORY:=Network - MENU:=1 - DEFAULT:=y - TITLE:=PPP daemon - DESCRIPTION:=PPP (Point-to-Point Protocol) daemon - URL:=http://ppp.samba.org/ +SECTION:=net +CATEGORY:=Network +MENU:=1 +DEFAULT:=y +TITLE:=PPP daemon +DESCRIPTION:=PPP (Point-to-Point Protocol) daemon +URL:=http://ppp.samba.org/ endef define Package/ppp-mod-pppoa - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp +linux-atm - TITLE:=PPPoA plugin - DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +linux-atm +TITLE:=PPPoA plugin +DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp endef define Package/ppp-mod-pppoe - SECTION:=net - CATEGORY:=Network - DEFAULT:=y - DEPENDS:=ppp - TITLE:=PPPoE plugin - DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp +SECTION:=net +CATEGORY:=Network +DEFAULT:=y +DEPENDS:=ppp +TITLE:=PPPoE plugin +DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp endef define Package/ppp-mod-radius - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp - TITLE:=RADIUS plugin - DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +TITLE:=RADIUS plugin +DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp endef define Package/chat - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp - TITLE:=Establish conversation with a modem - DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem) +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +TITLE:=Establish conversation with a modem +DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem) endef define Package/pppdump - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp - TITLE:=Read PPP record file - DESCRIPTION:=Utility to read PPP record file +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +TITLE:=Read PPP record file +DESCRIPTION:=Utility to read PPP record file endef define Package/pppstats - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp - TITLE:=Report PPP statistics - DESCRIPTION:=Utility to report PPP statistics +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +TITLE:=Report PPP statistics +DESCRIPTION:=Utility to report PPP statistics endef - define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR)/usr diff --git a/openwrt/package/pptp/Makefile b/openwrt/package/pptp/Makefile index 776a6686400..08cb43a7c29 100644 --- a/openwrt/package/pptp/Makefile +++ b/openwrt/package/pptp/Makefile @@ -23,11 +23,11 @@ URL:=http://pptpclient.sourceforge.net/ endef define Package/pptp/install - install -d -m0755 $(1)/sbin install -d -m0755 $(1)/etc/ppp - install -d -m0755 $(1)/usr/sbin - install -m0755 ./files/ifup.pptp $(1)/sbin/ifup.pptp install -m0644 ./files/options.pptp $(1)/etc/ppp/ + install -d -m0755 $(1)/sbin + install -m0755 ./files/ifup.pptp $(1)/sbin/ + install -d -m0755 $(1)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/pptp $(1)/usr/sbin/ endef diff --git a/openwrt/package/shfs/Makefile b/openwrt/package/shfs/Makefile index dacbf8d75f5..69f8d83a467 100644 --- a/openwrt/package/shfs/Makefile +++ b/openwrt/package/shfs/Makefile @@ -8,27 +8,27 @@ PKG_VERSION:=0.35 PKG_RELEASE:=2 PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@SF/shfs PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/kmod-shfs - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:= - TITLE:=Shell FileSystem (ShFS) - DESCRIPTION:=Shell FileSystem (ShFS) \\\ +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=Shell FileSystem (ShFS) +DESCRIPTION:=Shell FileSystem (ShFS) \\\ ShFS is a simple and easy to use Linux kernel module which allows you to \\\ mount remote filesystems using a plain shell (SSH) connection. When using \\\ ShFS, you can access all remote files just like the local ones, only the \\\ access is governed through the transport security of SSH. - URL:=http://shfs.sourceforge.net/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +URL:=http://shfs.sourceforge.net/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/openwrt/package/spca5xx/Makefile b/openwrt/package/spca5xx/Makefile index 0a84d980c94..93eea633cd1 100644 --- a/openwrt/package/spca5xx/Makefile +++ b/openwrt/package/spca5xx/Makefile @@ -8,23 +8,22 @@ PKG_VERSION:=20060301 PKG_RELEASE:=1 PKG_MD5SUM:=4160e03c408ac254111febacf058b88a +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - include $(TOPDIR)/package/rules.mk #FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages define Package/kmod-spca5xx - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@PACKAGE_KMOD_USB&&PACKAGE_KMOD_VIDEODEV - TITLE:=Driver for SPCA5xx based USB cameras - DESCRIPTION:=Driver for SPCA5xx based USB cameras - URL:=http://mxhaard.free.fr/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@PACKAGE_KMOD_USB&&PACKAGE_KMOD_VIDEODEV +TITLE:=Driver for SPCA5xx based USB cameras +DESCRIPTION:=Driver for SPCA5xx based USB cameras +URL:=http://mxhaard.free.fr/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/openwrt/package/switch/Makefile b/openwrt/package/switch/Makefile index be99a6064d0..e8aa6a02a48 100644 --- a/openwrt/package/switch/Makefile +++ b/openwrt/package/switch/Makefile @@ -3,12 +3,22 @@ include $(TOPDIR)/rules.mk include $(TOPDIR)/package/kernel.mk -PKG_NAME := kmod-switch -PKG_RELEASE := 1 -PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME) +PKG_NAME:=kmod-switch +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME) include $(TOPDIR)/package/rules.mk +define Package/kmod-switch +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@LINUX_2_6_BRCM||LINUX_2_4_BRCM +DEFAULT:=y +TITLE:=Switch drivers +DESCRIPTION:=Switch drivers for ADM6996L and BCM53XX RoboSwitch +VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef define Build/Prepare mkdir -p $(PKG_BUILD_DIR) @@ -25,16 +35,6 @@ define Build/Compile modules endef -define Package/kmod-switch - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_6_BRCM||LINUX_2_4_BRCM - DEFAULT:=y - TITLE:=Switch drivers - DESCRIPTION:=Switch drivers for ADM6996L and BCM53XX RoboSwitch - VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) -endef - define Package/kmod-switch/install install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \ diff --git a/openwrt/package/ueagle-atm/Makefile b/openwrt/package/ueagle-atm/Makefile index 630bcf74b67..6f227a1bf49 100644 --- a/openwrt/package/ueagle-atm/Makefile +++ b/openwrt/package/ueagle-atm/Makefile @@ -8,24 +8,24 @@ PKG_VERSION:=1.0d1 PKG_RELEASE:=1 PKG_MD5SUM:=5da1fceb15168f4c7ad407a3e38ddecb +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://castet.matthieu.free.fr/eagle/release/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk #FIXME: add dependency on kmod-usb-core define Package/kmod-ueagle-atm - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_6_BRCM - TITLE:=Driver for Eagle 8051 based USB ADSL modems - DESCRIPTION:=Driver for Eagle 8051 based USB ADSL modems - URL:=http://www.eagle-usb.org/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@LINUX_2_6_BRCM @PACKAGE_KMOD_USB +TITLE:=Driver for Eagle 8051 based USB ADSL modems +DESCRIPTION:=Driver for Eagle 8051 based USB ADSL modems +URL:=http://www.eagle-usb.org/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index 4839563e74c..ad4eddab8c9 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -26,10 +26,11 @@ URL:=http://hplabs.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html endef define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -I." \ libiw.so.28 iwmulticall - mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX="$(PKG_INSTALL_DIR)" \ INSTALL_DIR="$(PKG_INSTALL_DIR)/usr/sbin" \ @@ -37,23 +38,24 @@ define Build/Compile install-iwmulticall endef -define Package/wireless-tools/install - install -d -m0755 $(1)/usr/lib - install -d -m0755 $(1)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/libiw.so.28 $(1)/usr/lib/ - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(1)/usr/sbin/ -endef - define Build/InstallDev - mkdir -p $(STAGING_DIR)/usr/{lib,include} + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib $(CP) $(PKG_BUILD_DIR)/libiw.so* $(STAGING_DIR)/usr/lib/ ln -sf libiw.so.28 $(STAGING_DIR)/usr/lib/libiw.so - $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(STAGING_DIR)/usr/include/ endef define Build/UninstallDev - rm -f $(STAGING_DIR)/usr/lib/libiw.* - rm -f $(STAGING_DIR)/usr/include/{iwlib,wireless}.h + rm -f $(STAGING_DIR)/usr/include/{iwlib,wireless}.h \ + $(STAGING_DIR)/usr/lib/libiw.so* +endef + +define Package/wireless-tools/install + install -d -m0755 $(1)/usr/lib + install -m0755 $(PKG_BUILD_DIR)/libiw.so.28 $(1)/usr/lib/ + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(1)/usr/sbin/ endef $(eval $(call BuildPackage,wireless-tools)) diff --git a/openwrt/package/zd1211/Makefile b/openwrt/package/zd1211/Makefile index e73c0dc5221..a71873b9f7f 100644 --- a/openwrt/package/zd1211/Makefile +++ b/openwrt/package/zd1211/Makefile @@ -8,25 +8,25 @@ PKG_VERSION:=r69 PKG_RELEASE:=1 PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) - include $(TOPDIR)/package/rules.mk +#FIXME: add proper dependency handling on kmod-usb-core packages define Package/kmod-zd1211 - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_6 - TITLE:=Driver for Zydas 1211 based USB devices - DESCRIPTION:=Driver for Zydas 1211 based USB devices \\\ +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@LINUX_2_6 +TITLE:=Driver for Zydas 1211 based USB devices +DESCRIPTION:=Driver for Zydas 1211 based USB devices \\\ Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip.\\\ Initially contributed by ZyDAS, this driver is actively maintained by the \\\ open source community. - URL:=http://zd1211.ath.cx/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +URL:=http://zd1211.ath.cx/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile @@ -54,4 +54,3 @@ define Package/kmod-zd1211/install endef $(eval $(call BuildPackage,kmod-zd1211)) - diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index 33cbcceb276..02659bb9ac1 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -8,8 +8,7 @@ PKG_RELEASE:=3 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.zlib.net \ - @SF/zlib +PKG_SOURCE_URL:=http://www.zlib.net @SF/zlib PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6 PKG_CAT:=bzcat @@ -47,27 +46,23 @@ define Build/Compile install endef +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \ + $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \ + $(STAGING_DIR)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h \ + $(STAGING_DIR)/usr/lib/libz.{a,so*} +endef + define Package/zlib/install install -m0755 -d $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/ endef -define Build/InstallDev - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/zconf.h \ - $(PKG_INSTALL_DIR)/usr/include/zlib.h \ - $(STAGING_DIR)/usr/include/ - mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.a \ - $(PKG_INSTALL_DIR)/usr/lib/libz.so* \ - $(STAGING_DIR)/usr/lib/ -endef - -define Build/UninstallDev - rm -rf $(STAGING_DIR)/usr/include/zconf.h \ - $(STAGING_DIR)/usr/include/zlib.h \ - $(STAGING_DIR)/usr/lib/libz.a \ - $(STAGING_DIR)/usr/lib/libz.so* -endef - $(eval $(call BuildPackage,zlib)) From ebcc9327e866f847387f30bbe159d2a72384ac6b Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 19:16:04 +0000 Subject: [PATCH 220/757] override LDOPTS to remove madwifi compile warning SVN-Revision: 3999 --- openwrt/package/madwifi/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index b3eb338cb9e..c689054811e 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -51,6 +51,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ TOOLPREFIX="$(KERNEL_CROSS)" \ TOOLPATH="$(KERNEL_CROSS)" \ KERNELPATH="$(LINUX_DIR)" \ + LDOPTS="" \ DOMULTI=1 include $(TOPDIR)/package/rules.mk From c0ea6ab40c584e1d25adc990a58326c83e09f185 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 19:16:08 +0000 Subject: [PATCH 221/757] add util-linux SVN-Revision: 4000 --- openwrt/package/util-linux/Makefile | 77 +++++++++++++++++++ .../util-linux/patches/501-mconfig.patch | 68 ++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 openwrt/package/util-linux/Makefile create mode 100644 openwrt/package/util-linux/patches/501-mconfig.patch diff --git a/openwrt/package/util-linux/Makefile b/openwrt/package/util-linux/Makefile new file mode 100644 index 00000000000..ef28bdb69e9 --- /dev/null +++ b/openwrt/package/util-linux/Makefile @@ -0,0 +1,77 @@ +# $Id: Makefile 3822 2006-05-24 07:01:52Z nico $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=util-linux +PKG_VERSION:=2.12r +PKG_RELEASE:=1 +PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3 + +PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \ + http://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \ + ftp://ftp.de.kernel.org/pub/linux/utils/$(PKG_NAME)/ \ + http://ftp.de.kernel.org/pub/linux/utils/$(PKG_NAME)/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(TOPDIR)/package/rules.mk + +define Package/fdisk +SECTION:=base +CATEGORY:=Utilities +TITLE:=Partition table manipulation utility +DESCRIPTION:=A partition table manipulation utility +URL:=http://www.kernel.org/pub/linux/utils/util-linux/ +endef + +define Package/losetup +$(call Package/fdisk) +TITLE:=Loopback devices setup and control utility +DESCRIPTION:=A loopback devices setup and control utility +endef + +define Package/swap-utils +$(call Package/fdisk) +TITLE:=Swap space management utilities +DESCRIPTION:=A collection of tools to manage swap space \\\ + * mkswap\\\ + * swapon\\\ + * swapoff +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + OPT="$(TARGET_CFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + INSTALLSUID="install -m 4755" \ + all install +endef + +define Package/Template + @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \ + rm -f $(PKG_BUILD_DIR)/.built; \ + $(MAKE) $(PKG_BUILD_DIR)/.built; \ + fi + install -d -m0755 $(2) + $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/ +endef + +define Package/fdisk/install + $(call Package/Template,sbin/fdisk,$(1)/usr/sbin) +endef +define Package/losetup/install + $(call Package/Template,sbin/losetup,$(1)/usr/sbin) +endef +define Package/swap-utils/install + $(call Package/Template,sbin/mkswap,$(1)/usr/sbin) + $(call Package/Template,sbin/swapon,$(1)/usr/sbin) + $(call Package/Template,sbin/swapoff,$(1)/usr/sbin) +endef +$(eval $(call BuildPackage,fdisk)) +$(eval $(call BuildPackage,losetup)) +$(eval $(call BuildPackage,swap-utils)) diff --git a/openwrt/package/util-linux/patches/501-mconfig.patch b/openwrt/package/util-linux/patches/501-mconfig.patch new file mode 100644 index 00000000000..67e6530de9e --- /dev/null +++ b/openwrt/package/util-linux/patches/501-mconfig.patch @@ -0,0 +1,68 @@ +--- util-linux-2.12r-orig/MCONFIG 2004-12-13 00:15:48.000000000 +0100 ++++ util-linux-2.12r/MCONFIG 2005-10-03 17:54:15.945049312 +0200 +@@ -16,8 +16,8 @@ + # Select for ARCH one of intel, alpha, sparc, arm, m68k, mips + # Select for CPU i386 if the binaries must be able to run on an intel 386 + # (by default i486 code is generated, see below) +-CPU=$(shell uname -m) +-ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') ++CPU= ++ARCH=mips + + # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp + # will use PAM for authentication. Additionally, passwd will not be +@@ -64,12 +64,12 @@ + # If HAVE_WRITE is set to "yes", then write will not be built or + # installed from the misc-utils subdirectory. + # (There is a network aware write in netwrite from NetKit 0.16 or later.) +-HAVE_WRITE=no ++HAVE_WRITE=yes + + # If HAVE_GETTY is set to "yes", then agetty will not be built or + # installed from the login-utils subdirectory. Note that agetty can + # co-exist with other gettys, so this option should never be used. +-HAVE_GETTY=no ++HAVE_GETTY=yes + + # If USE_TTY_GROUP is set to "yes", then wall and write will be installed + # setgid to the "tty" group, and mesg will only set the group write bit. +@@ -82,13 +82,13 @@ + # If HAVE_KILL is set to "yes", then kill will not be built or + # installed from the misc-utils subdirectory. + # (There is also a kill in the procps package.) +-HAVE_KILL=no ++HAVE_KILL=yes + + # If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN + # to the current user, allowing her to make a screendump and do other + # nifty things on the console, but also allowing him to keep an open + # file descriptor after logging out to trick the next user. +-ALLOW_VCS_USE=yes ++ALLOW_VCS_USE=no + + # If DO_STAT_MAIL is set to "yes", then login will stat() the mailbox + # and tell the user that she has new mail. This can hang the login if +@@ -102,19 +102,19 @@ + # If HAVE_SLN is set to "yes", then sln won't be installed + # (but the man page sln.8 will be installed anyway). + # sln also comes with libc and glibc. +-HAVE_SLN=no ++HAVE_SLN=yes + + # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed. +-HAVE_FDUTILS=no ++HAVE_FDUTILS=yes + + # If SILENT_PG is set to "yes", then pg will not ring the bell + # when an invalid key is pressed +-SILENT_PG=no ++SILENT_PG=yes + + # If configure decides that Native Language Support (NLS) is available, + # it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set + # DISABLE_NLS to "yes". +-DISABLE_NLS=no ++DISABLE_NLS=yes + + # Different optimizations for different cpus. + # Before gcc 2.8.0 only -m486 From 465dff41c8b67a4852f7b97a7da1b602d1eedd85 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Sun, 18 Jun 2006 20:25:54 +0000 Subject: [PATCH 222/757] follow the xtables changes in 2.6.17 SVN-Revision: 4001 --- openwrt/target/linux/netfilter.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrt/target/linux/netfilter.mk b/openwrt/target/linux/netfilter.mk index 0d44df2fc9a..66cb747deaa 100644 --- a/openwrt/target/linux/netfilter.mk +++ b/openwrt/target/linux/netfilter.mk @@ -26,7 +26,8 @@ IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_CONNBYTES) += $(P_XT)xt_connbytes IPT_EXTRA-$(CONFIG_IP_NF_MATCH_LIMIT) += $(P_V4)ipt_limit IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += $(P_XT)xt_limit IPT_EXTRA-$(CONFIG_IP_NF_TARGET_LOG) += $(P_V4)ipt_LOG -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_MULTIPORT) += $(P_V4)ipt_multiport +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_MULTIPORT) += $(P_XT)xt_multiport +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_MULTIPORT) += $(P_XT)xt_multiport IPT_EXTRA-$(CONFIG_IP_NF_MATCH_OWNER) += $(P_V4)ipt_owner IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PHYSDEV) += $(P_V4)ipt_physdev IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PKTTYPE) += $(P_V4)ipt_pkttype @@ -69,6 +70,8 @@ IPT_IPOPT-$(CONFIG_IP_NF_MATCH_UNCLEAN) += $(P_V4)ipt_unclean IPT_IPSEC-m := IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH_ESP) += $(P_V4)ipt_ah $(P_V4)ipt_esp +IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH) += $(P_V4)ipt_ah +IPT_IPSEC-$(CONFIG_NETFILTER_XT_MATCH_ESP) += $(P_XT)xt_esp IPT_NAT-m := IPT_NAT-$(CONFIG_IP_NF_NAT) += $(P_V4)ipt_SNAT $(P_V4)ipt_DNAT From 6f3aa200b3011fc296f167a57f99ad04b68c48b1 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 18 Jun 2006 20:44:34 +0000 Subject: [PATCH 223/757] move wlcompat from target/linux/package/ to package/. SVN-Revision: 4002 --- openwrt/package/wlcompat/Makefile | 54 + .../package/wlcompat/src/include/bcmnvram.h | 148 +++ .../package/wlcompat/src/include/bcmutils.h | 157 +++ .../package/wlcompat/src/include/cy_conf.h | 69 ++ .../package/wlcompat/src/include/epivers.h | 69 ++ .../wlcompat/src/include/proto/802.11.h | 852 +++++++++++++ .../wlcompat/src/include/proto/ethernet.h | 179 +++ .../package/wlcompat/src/include/shutils.h | 200 +++ .../package/wlcompat/src/include/typedefs.h | 293 +++++ openwrt/package/wlcompat/src/include/utils.h | 131 ++ .../package/wlcompat/src/include/wlcompat.h | 36 + .../package/wlcompat/src/include/wlioctl.h | 1094 +++++++++++++++++ .../package/wlcompat/src/include/wlutils.h | 59 + .../linux => }/package/wlcompat/wlcompat.c | 0 .../target/linux/package/wlcompat/Config.in | 17 - .../target/linux/package/wlcompat/Makefile | 43 - .../wlcompat/ipkg/kmod-wlcompat-debug.control | 5 - .../wlcompat/ipkg/kmod-wlcompat.control | 5 - 18 files changed, 3341 insertions(+), 70 deletions(-) create mode 100644 openwrt/package/wlcompat/Makefile create mode 100644 openwrt/package/wlcompat/src/include/bcmnvram.h create mode 100644 openwrt/package/wlcompat/src/include/bcmutils.h create mode 100644 openwrt/package/wlcompat/src/include/cy_conf.h create mode 100644 openwrt/package/wlcompat/src/include/epivers.h create mode 100644 openwrt/package/wlcompat/src/include/proto/802.11.h create mode 100644 openwrt/package/wlcompat/src/include/proto/ethernet.h create mode 100644 openwrt/package/wlcompat/src/include/shutils.h create mode 100644 openwrt/package/wlcompat/src/include/typedefs.h create mode 100644 openwrt/package/wlcompat/src/include/utils.h create mode 100644 openwrt/package/wlcompat/src/include/wlcompat.h create mode 100644 openwrt/package/wlcompat/src/include/wlioctl.h create mode 100644 openwrt/package/wlcompat/src/include/wlutils.h rename openwrt/{target/linux => }/package/wlcompat/wlcompat.c (100%) delete mode 100644 openwrt/target/linux/package/wlcompat/Config.in delete mode 100644 openwrt/target/linux/package/wlcompat/Makefile delete mode 100644 openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat-debug.control delete mode 100644 openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat.control diff --git a/openwrt/package/wlcompat/Makefile b/openwrt/package/wlcompat/Makefile new file mode 100644 index 00000000000..4c3632d9810 --- /dev/null +++ b/openwrt/package/wlcompat/Makefile @@ -0,0 +1,54 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kmod-wlcompat +PKG_RELEASE:=3 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(TOPDIR)/package/rules.mk + +WLCOMPAT_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \ + -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \ + -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -funsigned-char -nostdinc \ + -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(STAGING_DIR)/usr/include -I./src/include + +define Package/kmod-wlcompat +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=Wrapper providing Wireless Extensions for Broadcom wl module +DESCRIPTION:= \\\ +A wrapper module, that provides Wireless Extension support for the \\\ +proprietary Broadcom wl module. +VERSION:=$(LINUX_VERSION)+$(BOARD)-$(PKG_RELEASE) +endef + +define Package/kmod-wlcompat-debug +$(call Package/kmod-wlcompat) +TITLE:=Wrapper providing Wireless Extensions for Broadcom wl module (debug) +DESCRIPTION:= \\\ +A wrapper module, that provides Wireless Extension support for the \\\ +proprietary Broadcom wl module. +endef + +define Build/Compile + $(TARGET_CC) -c -o $(PKG_BUILD_DIR)/wlcompat.o $(WLCOMPAT_FLAGS) wlcompat.c + $(TARGET_CC) -c -o $(PKG_BUILD_DIR)/wlcompat-debug.o $(WLCOMPAT_FLAGS) -DDEBUG wlcompat.c +endef + +define Package/kmod-wlcompat/install + install -d -m0755 $(1)/etc/modules.d + echo "wlcompat" > $(1)/etc/modules.d/30-wlcompat + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/wlcompat.o $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +define Package/kmod-wlcompat-debug/install + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/wlcompat-debug.o $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +$(eval $(call BuildPackage,kmod-wlcompat)) +$(eval $(call BuildPackage,kmod-wlcompat-debug)) diff --git a/openwrt/package/wlcompat/src/include/bcmnvram.h b/openwrt/package/wlcompat/src/include/bcmnvram.h new file mode 100644 index 00000000000..3c452634e81 --- /dev/null +++ b/openwrt/package/wlcompat/src/include/bcmnvram.h @@ -0,0 +1,148 @@ +/* + * NVRAM variable manipulation + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#ifndef _bcmnvram_h_ +#define _bcmnvram_h_ + +#ifndef _LANGUAGE_ASSEMBLY + +#include <typedefs.h> + +struct nvram_header { + uint32 magic; + uint32 len; + uint32 crc_ver_init; /* 0:7 crc, 8:15 ver, 16:27 init, mem. test 28, 29-31 reserved */ + uint32 config_refresh; /* 0:15 config, 16:31 refresh */ + uint32 config_ncdl; /* ncdl values for memc */ +}; + +struct nvram_tuple { + char *name; + char *value; + struct nvram_tuple *next; +}; + +/* + * Initialize NVRAM access. May be unnecessary or undefined on certain + * platforms. + */ +extern int nvram_init(void *sbh); + +/* + * Disable NVRAM access. May be unnecessary or undefined on certain + * platforms. + */ +extern void nvram_exit(void); + +/* + * Get the value of an NVRAM variable. The pointer returned may be + * invalid after a set. + * @param name name of variable to get + * @return value of variable or NULL if undefined + */ +extern char * nvram_get(const char *name); + +/* + * Get the value of an NVRAM variable. + * @param name name of variable to get + * @return value of variable or NUL if undefined + */ +#define nvram_safe_get(name) (nvram_get(name) ? : "") + +#define nvram_safe_unset(name) ({ \ + if(nvram_get(name)) \ + nvram_unset(name); \ +}) + +#define nvram_safe_set(name, value) ({ \ + if(!nvram_get(name) || strcmp(nvram_get(name), value)) \ + nvram_set(name, value); \ +}) + +/* + * Match an NVRAM variable. + * @param name name of variable to match + * @param match value to compare against value of variable + * @return TRUE if variable is defined and its value is string equal + * to match or FALSE otherwise + */ +static INLINE int +nvram_match(char *name, char *match) { + const char *value = nvram_get(name); + return (value && !strcmp(value, match)); +} + +/* + * Inversely match an NVRAM variable. + * @param name name of variable to match + * @param match value to compare against value of variable + * @return TRUE if variable is defined and its value is not string + * equal to invmatch or FALSE otherwise + */ +static INLINE int +nvram_invmatch(char *name, char *invmatch) { + const char *value = nvram_get(name); + return (value && strcmp(value, invmatch)); +} + +/* + * Set the value of an NVRAM variable. The name and value strings are + * copied into private storage. Pointers to previously set values + * may become invalid. The new value may be immediately + * retrieved but will not be permanently stored until a commit. + * @param name name of variable to set + * @param value value of variable + * @return 0 on success and errno on failure + */ +extern int nvram_set(const char *name, const char *value); + +/* + * Unset an NVRAM variable. Pointers to previously set values + * remain valid until a set. + * @param name name of variable to unset + * @return 0 on success and errno on failure + * NOTE: use nvram_commit to commit this change to flash. + */ +extern int nvram_unset(const char *name); + +/* + * Commit NVRAM variables to permanent storage. All pointers to values + * may be invalid after a commit. + * NVRAM values are undefined after a commit. + * @return 0 on success and errno on failure + */ +extern int nvram_commit(void); + +/* + * Get all NVRAM variables (format name=value\0 ... \0\0). + * @param buf buffer to store variables + * @param count size of buffer in bytes + * @return 0 on success and errno on failure + */ +extern int nvram_getall(char *buf, int count); + +extern int file2nvram(char *filename, char *varname); +extern int nvram2file(char *varname, char *filename); + +#endif /* _LANGUAGE_ASSEMBLY */ + +#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */ +#define NVRAM_VERSION 1 +#define NVRAM_HEADER_SIZE 20 +#define NVRAM_SPACE 0x8000 +#define FLASH_BASE 0xbfc00000 /* Extif core */ +#define FLASH_MIN 0x00100000 /* Minimum flash size */ +#define FLASH_MAX 0x00400000 /* Maximum flash size with extif */ + +#endif /* _bcmnvram_h_ */ diff --git a/openwrt/package/wlcompat/src/include/bcmutils.h b/openwrt/package/wlcompat/src/include/bcmutils.h new file mode 100644 index 00000000000..05ad41d9d80 --- /dev/null +++ b/openwrt/package/wlcompat/src/include/bcmutils.h @@ -0,0 +1,157 @@ +/* + * Misc useful os-independent macros and functions. + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id$ + */ + +#ifndef _bcmutils_h_ +#define _bcmutils_h_ + +#ifndef MIN +#define MIN(a, b) (((a)<(b))?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a, b) (((a)>(b))?(a):(b)) +#endif + +#define CEIL(x, y) (((x) + ((y)-1)) / (y)) +#define ROUNDUP(x, y) ((((ulong)(x)+((y)-1))/(y))*(y)) +#define ISALIGNED(a, x) (((uint)(a) & ((x)-1)) == 0) +#define ISPOWEROF2(x) ((((x)-1)&(x))==0) +#define OFFSETOF(type, member) ((uint) &((type *)0)->member) +#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) + +/* bit map related macros */ +#ifndef setbit +#define NBBY 8 /* 8 bits per byte */ +#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) +#endif + +#define NBITS(type) (sizeof (type) * 8) + +#define _BCM_U 0x01 /* upper */ +#define _BCM_L 0x02 /* lower */ +#define _BCM_D 0x04 /* digit */ +#define _BCM_C 0x08 /* cntrl */ +#define _BCM_P 0x10 /* punct */ +#define _BCM_S 0x20 /* white space (space/lf/tab) */ +#define _BCM_X 0x40 /* hex digit */ +#define _BCM_SP 0x80 /* hard space (0x20) */ + +extern unsigned char bcm_ctype[]; +#define bcm_ismask(x) (bcm_ctype[(int)(unsigned char)(x)]) + +#define bcm_isalnum(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L|_BCM_D)) != 0) +#define bcm_isalpha(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L)) != 0) +#define bcm_iscntrl(c) ((bcm_ismask(c)&(_BCM_C)) != 0) +#define bcm_isdigit(c) ((bcm_ismask(c)&(_BCM_D)) != 0) +#define bcm_isgraph(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D)) != 0) +#define bcm_islower(c) ((bcm_ismask(c)&(_BCM_L)) != 0) +#define bcm_isprint(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D|_BCM_SP)) != 0) +#define bcm_ispunct(c) ((bcm_ismask(c)&(_BCM_P)) != 0) +#define bcm_isspace(c) ((bcm_ismask(c)&(_BCM_S)) != 0) +#define bcm_isupper(c) ((bcm_ismask(c)&(_BCM_U)) != 0) +#define bcm_isxdigit(c) ((bcm_ismask(c)&(_BCM_D|_BCM_X)) != 0) + +/* + * Spin at most 'us' microseconds while 'exp' is true. + * Caller should explicitly test 'exp' when this completes + * and take appropriate error action if 'exp' is still true. + */ +#define SPINWAIT(exp, us) { \ + uint countdown = (us) + 9; \ + while ((exp) && (countdown >= 10)) {\ + OSL_DELAY(10); \ + countdown -= 10; \ + } \ +} + +/* generic osl packet queue */ +struct pktq { + void *head; /* first packet to dequeue */ + void *tail; /* last packet to dequeue */ + uint len; /* number of queued packets */ + uint maxlen; /* maximum number of queued packets */ + bool priority; /* enqueue by packet priority */ +}; +#define DEFAULT_QLEN 128 + +#define pktq_len(q) ((q)->len) +#define pktq_avail(q) ((q)->maxlen - (q)->len) +#define pktq_head(q) ((q)->head) +#define pktq_full(q) ((q)->len >= (q)->maxlen) + +/* crc defines */ +#define CRC8_INIT_VALUE 0xff /* Initial CRC8 checksum value */ +#define CRC8_GOOD_VALUE 0x9f /* Good final CRC8 checksum value */ +#define CRC16_INIT_VALUE 0xffff /* Initial CRC16 checksum value */ +#define CRC16_GOOD_VALUE 0xf0b8 /* Good final CRC16 checksum value */ +#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ +#define CRC32_GOOD_VALUE 0xdebb20e3 /* Good final CRC32 checksum value */ + +/* tag_ID/length/value_buffer tuple */ +typedef struct bcm_tlv { + uint8 id; + uint8 len; + uint8 data[1]; +} bcm_tlv_t; + +/* Check that bcm_tlv_t fits into the given buflen */ +#define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (buflen) >= 2 + (elt)->len) + +/* buffer length for ethernet address from bcm_ether_ntoa() */ +#define ETHER_ADDR_STR_LEN 18 + +/* +* load 32-bit value from unaligned byte array +*/ +#ifdef IL_BIGENDIAN +#define load32_ua(a) ((((uint8 *)(a))[0] << 24) + (((uint8 *)(a))[1] << 16) + \ + (((uint8 *)(a))[2] << 8) + ((uint8 *)(a))[3]) +#else +#define load32_ua(a) ((((uint8 *)(a))[3] << 24) + (((uint8 *)(a))[2] << 16) + \ + (((uint8 *)(a))[1] << 8) + ((uint8 *)(a))[0]) +#endif + +/* externs */ +extern uint bcm_atoi(char *s); +extern uchar bcm_toupper(uchar c); +extern ulong bcm_strtoul(char *cp, char **endp, uint base); +extern void deadbeef(char *p, uint len); +extern void prhex(char *msg, uchar *buf, uint len); +extern void prpkt(char *msg, void *drv, void *p0); +extern uint pktcopy(void *drv, void *p, uint offset, int len, uchar *buf); +extern uint pkttotlen(void *drv, void *); +extern uchar *bcm_ether_ntoa(char *ea, char *buf); +extern int bcm_ether_atoe(char *p, char *ea); +extern void bcm_mdelay(uint ms); +extern char *getvar(char *vars, char *name); +extern int getintvar(char *vars, char *name); +extern char *bcmstrstr(char *haystack, char *needle); + +extern uint8 crc8(uint8 *p, uint nbytes, uint8 crc); +extern uint16 crc16(uint8 *p, uint nbytes, uint16 crc); +extern uint32 crc32(uint8 *p, uint nbytes, uint32 crc); +extern bcm_tlv_t *bcm_next_tlv(bcm_tlv_t *elt, int *buflen); +extern bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen, uint key); +extern bcm_tlv_t *bcm_parse_ordered_tlvs(void *buf, int buflen, uint key); +extern void pktq_init(struct pktq *q, uint maxlen, bool priority); +extern bool pktenq(struct pktq *q, void *p, bool lifo); +extern void *pktdeq(struct pktq *q); + +#define bcmlog(fmt, a1, a2) +#define bcmdumplog(buf, size) *buf = '\0' +#define bcmdumplogent(buf, idx) -1 + +#endif /* _bcmutils_h_ */ diff --git a/openwrt/package/wlcompat/src/include/cy_conf.h b/openwrt/package/wlcompat/src/include/cy_conf.h new file mode 100644 index 00000000000..dbe387b83bc --- /dev/null +++ b/openwrt/package/wlcompat/src/include/cy_conf.h @@ -0,0 +1,69 @@ + +#define DNSMASQ_SUPPORT 1 +#define CONFIG_DNSMASQ y +#define UDHCPD_SUPPORT 1 +#define CONFIG_UDHCPD y +#define UDHCPC_SUPPORT 1 +#define CONFIG_UDHCPC y +#define PPPOE_SUPPORT 1 +#define CONFIG_PPPOE y +#define PPTP_SUPPORT 1 +#define CONFIG_PPTP y +#define L2TP_SUPPORT 1 +#define CONFIG_L2TP y +#define PPPD_SUPPORT 1 +#define CONFIG_PPPD y +#define ZEBRA_SUPPORT 1 +#define CONFIG_ZEBRA y +#define TFTPD_SUPPORT 1 +#define CONFIG_TFTPD y +#define DDNS_SUPPORT 1 +#define CONFIG_DDNS y +#define CRON_SUPPORT 1 +#define CONFIG_CRON y +#define HTTPD_SUPPORT 1 +#define CONFIG_HTTPD y +#define GET_POST_SUPPORT 1 +#define CONFIG_GET_POST y + +#if 1 +#define HEARTBEAT_SUPPORT 1 +#define CONFIG_HEARTBEAT y +#define MULTICAST_SUPPORT 1 +#define CONFIG_MULTICAST y +#define SETUP_WIZARD_SUPPORT 1 +#define CONFIG_SETUP_WIZARD y +#define PARENTAL_CONTROL_SUPPORT 1 +#define CONFIG_PARENTAL_CONTROL y +#define HTTPS_SUPPORT 1 +#define CONFIG_HTTPS y +#define EOU_SUPPORT 1 +#define CONFIG_EOU y +#define EZC_SUPPORT 1 +#define CONFIG_EZC y +#define WRITE_MAC_SUPPORT 1 +#define CONFIG_WRITE_MAC y +#define DIAG_SUPPORT 1 +#define CONFIG_DIAG y +#endif + +#define SPEED_BOOSTER_SUPPORT 1 +#define CONFIG_SPEED_BOOSTER y +#define XBOX_SUPPORT 1 +#define CONFIG_XBOX y + +#if 0 +#define MPPPOE_SUPPORT 1 +#define CONFIG_MPPPOE y +#define UNNUMBERIP_SUPPORT 1 +#define CONFIG_UNNUMBERIP y +#endif + +#define WL_STA_SUPPORT 1 +#define CONFIG_WL_STA y +#define BACKUP_RESTORE_SUPPORT 1 +#define CONFIG_BACKUP_RESTORE y +#define PORT_TRIGGER_SUPPORT 1 +#define CONFIG_PORT_TRIGGER y +#define HW_QOS_SUPPORT 1 +#define CONFIG_HW_QOS y diff --git a/openwrt/package/wlcompat/src/include/epivers.h b/openwrt/package/wlcompat/src/include/epivers.h new file mode 100644 index 00000000000..e174fb50d83 --- /dev/null +++ b/openwrt/package/wlcompat/src/include/epivers.h @@ -0,0 +1,69 @@ +/* + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + * +*/ + +#ifndef _epivers_h_ +#define _epivers_h_ + +#ifdef linux +#include <linux/config.h> +#endif + +/* Vendor Name, ASCII, 32 chars max */ +#ifdef COMPANYNAME +#define HPNA_VENDOR COMPANYNAME +#else +#define HPNA_VENDOR "Broadcom Corporation" +#endif + +/* Driver Date, ASCII, 32 chars max */ +#define HPNA_DRV_BUILD_DATE __DATE__ + +/* Hardware Manufacture Date, ASCII, 32 chars max */ +#define HPNA_HW_MFG_DATE "Not Specified" + +/* See documentation for Device Type values, 32 values max */ +#ifndef HPNA_DEV_TYPE + +#if defined(CONFIG_BRCM_VJ) +#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_DISPLAY } + +#elif defined(CONFIG_BCRM_93725) +#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_CM_BRIDGE, CDCF_V0_DEVICE_DISPLAY } + +#else +#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_PCINIC } + +#endif + +#endif /* !HPNA_DEV_TYPE */ + + +#define EPI_MAJOR_VERSION 3 + +#define EPI_MINOR_VERSION 60 + +#define EPI_RC_NUMBER 13 + +#define EPI_INCREMENTAL_NUMBER 0 + +#define EPI_BUILD_NUMBER 0 + +#define EPI_VERSION 3,60,13,0 + +#define EPI_VERSION_NUM 0x033c0d00 + +/* Driver Version String, ASCII, 32 chars max */ +#define EPI_VERSION_STR "3.60.13.0" +#define EPI_ROUTER_VERSION_STR "3.61.13.0" + +#endif /* _epivers_h_ */ diff --git a/openwrt/package/wlcompat/src/include/proto/802.11.h b/openwrt/package/wlcompat/src/include/proto/802.11.h new file mode 100644 index 00000000000..ea57850ce56 --- /dev/null +++ b/openwrt/package/wlcompat/src/include/proto/802.11.h @@ -0,0 +1,852 @@ +/* + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * Fundamental types and constants relating to 802.11 + * + * $Id$ + */ + +#ifndef _802_11_H_ +#define _802_11_H_ + +#ifndef _TYPEDEFS_H_ +#include <typedefs.h> +#endif + +#ifndef _NET_ETHERNET_H_ +#include <proto/ethernet.h> +#endif + +/* enable structure packing */ +#if !defined(__GNUC__) +#pragma pack(1) +#endif + +/* some platforms require stronger medicine */ +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#define PACKED +#endif + + +#define DOT11_TU_TO_US 1024 /* 802.11 Time Unit is 1024 microseconds */ + +/* Generic 802.11 frame constants */ +#define DOT11_A3_HDR_LEN 24 +#define DOT11_A4_HDR_LEN 30 +#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN +#define DOT11_FCS_LEN 4 +#define DOT11_ICV_LEN 4 +#define DOT11_ICV_AES_LEN 8 +#define DOT11_QOS_LEN 2 + +#define DOT11_KEY_INDEX_SHIFT 6 +#define DOT11_IV_LEN 4 +#define DOT11_IV_TKIP_LEN 8 +#define DOT11_IV_AES_OCB_LEN 4 +#define DOT11_IV_AES_CCM_LEN 8 + +/* Includes MIC */ +#define DOT11_MAX_MPDU_BODY_LEN 2304 +/* A4 header + QoS + CCMP + PDU + ICV + FCS = 2352 */ +#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \ + DOT11_QOS_LEN + \ + DOT11_IV_AES_CCM_LEN + \ + DOT11_MAX_MPDU_BODY_LEN + \ + DOT11_ICV_LEN + \ + DOT11_FCS_LEN) + +#define DOT11_MAX_SSID_LEN 32 + +/* dot11RTSThreshold */ +#define DOT11_DEFAULT_RTS_LEN 2347 +#define DOT11_MAX_RTS_LEN 2347 + +/* dot11FragmentationThreshold */ +#define DOT11_MIN_FRAG_LEN 256 +#define DOT11_MAX_FRAG_LEN 2346 /* Max frag is also limited by aMPDUMaxLength of the attached PHY */ +#define DOT11_DEFAULT_FRAG_LEN 2346 + +/* dot11BeaconPeriod */ +#define DOT11_MIN_BEACON_PERIOD 1 +#define DOT11_MAX_BEACON_PERIOD 0xFFFF + +/* dot11DTIMPeriod */ +#define DOT11_MIN_DTIM_PERIOD 1 +#define DOT11_MAX_DTIM_PERIOD 0xFF + +/* 802.2 LLC/SNAP header used by 802.11 per 802.1H */ +#define DOT11_LLC_SNAP_HDR_LEN 8 +#define DOT11_OUI_LEN 3 +struct dot11_llc_snap_header { + uint8 dsap; /* always 0xAA */ + uint8 ssap; /* always 0xAA */ + uint8 ctl; /* always 0x03 */ + uint8 oui[DOT11_OUI_LEN]; /* RFC1042: 0x00 0x00 0x00 + Bridge-Tunnel: 0x00 0x00 0xF8 */ + uint16 type; /* ethertype */ +} PACKED; + +/* RFC1042 header used by 802.11 per 802.1H */ +#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN) + +/* Generic 802.11 MAC header */ +/* + * N.B.: This struct reflects the full 4 address 802.11 MAC header. + * The fields are defined such that the shorter 1, 2, and 3 + * address headers just use the first k fields. + */ +struct dot11_header { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr a1; /* address 1 */ + struct ether_addr a2; /* address 2 */ + struct ether_addr a3; /* address 3 */ + uint16 seq; /* sequence control */ + struct ether_addr a4; /* address 4 */ +} PACKED; + +/* Control frames */ + +struct dot11_rts_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ + struct ether_addr ta; /* transmitter address */ +} PACKED; +#define DOT11_RTS_LEN 16 + +struct dot11_cts_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ +} PACKED; +#define DOT11_CTS_LEN 10 + +struct dot11_ack_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ +} PACKED; +#define DOT11_ACK_LEN 10 + +struct dot11_ps_poll_frame { + uint16 fc; /* frame control */ + uint16 durid; /* AID */ + struct ether_addr bssid; /* receiver address, STA in AP */ + struct ether_addr ta; /* transmitter address */ +} PACKED; +#define DOT11_PS_POLL_LEN 16 + +struct dot11_cf_end_frame { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr ra; /* receiver address */ + struct ether_addr bssid; /* transmitter address, STA in AP */ +} PACKED; +#define DOT11_CS_END_LEN 16 + +/* Management frame header */ +struct dot11_management_header { + uint16 fc; /* frame control */ + uint16 durid; /* duration/ID */ + struct ether_addr da; /* receiver address */ + struct ether_addr sa; /* transmitter address */ + struct ether_addr bssid; /* BSS ID */ + uint16 seq; /* sequence control */ +} PACKED; +#define DOT11_MGMT_HDR_LEN 24 + +/* Management frame payloads */ + +struct dot11_bcn_prb { + uint32 timestamp[2]; + uint16 beacon_interval; + uint16 capability; +} PACKED; +#define DOT11_BCN_PRB_LEN 12 + +struct dot11_auth { + uint16 alg; /* algorithm */ + uint16 seq; /* sequence control */ + uint16 status; /* status code */ +} PACKED; +#define DOT11_AUTH_FIXED_LEN 6 /* length of auth frame without challenge info elt */ + +struct dot11_assoc_req { + uint16 capability; /* capability information */ + uint16 listen; /* listen interval */ +} PACKED; + +struct dot11_assoc_resp { + uint16 capability; /* capability information */ + uint16 status; /* status code */ + uint16 aid; /* association ID */ +} PACKED; + +struct dot11_action_measure { + uint8 category; + uint8 action; + uint8 token; + uint8 data[1]; +} PACKED; +#define DOT11_ACTION_MEASURE_LEN 3 + +/************** + 802.11h related definitions. +**************/ +typedef struct { + uint8 id; + uint8 len; + uint8 power; +} dot11_power_cnst_t; + +typedef struct { + uint8 min; + uint8 max; +} dot11_power_cap_t; + +typedef struct { + uint8 id; + uint8 len; + uint8 tx_pwr; + uint8 margin; +} dot11_tpc_rep_t; +#define DOT11_MNG_IE_TPC_REPORT_LEN 2 /* length of IE data, not including 2 byte header */ + +typedef struct { + uint8 id; + uint8 len; + uint8 first_channel; + uint8 num_channels; +} dot11_supp_channels_t; + +struct dot11_channel_switch { + uint8 id; + uint8 len; + uint8 mode; + uint8 channel; + uint8 count; +} PACKED; +typedef struct dot11_channel_switch dot11_channel_switch_t; + +/* 802.11h Measurement Request/Report IEs */ +/* Measurement Type field */ +#define DOT11_MEASURE_TYPE_BASIC 0 +#define DOT11_MEASURE_TYPE_CCA 1 +#define DOT11_MEASURE_TYPE_RPI 2 + +/* Measurement Mode field */ + +/* Measurement Request Modes */ +#define DOT11_MEASURE_MODE_ENABLE (1<<1) +#define DOT11_MEASURE_MODE_REQUEST (1<<2) +#define DOT11_MEASURE_MODE_REPORT (1<<3) +/* Measurement Report Modes */ +#define DOT11_MEASURE_MODE_LATE (1<<0) +#define DOT11_MEASURE_MODE_INCAPABLE (1<<1) +#define DOT11_MEASURE_MODE_REFUSED (1<<2) +/* Basic Measurement Map bits */ +#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0)) +#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1)) +#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2)) +#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3)) +#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4)) + +typedef struct { + uint8 id; + uint8 len; + uint8 token; + uint8 mode; + uint8 type; + uint8 channel; + uint8 start_time[8]; + uint16 duration; +} dot11_meas_req_t; +#define DOT11_MNG_IE_MREQ_LEN 14 +/* length of Measure Request IE data not including variable len */ +#define DOT11_MNG_IE_MREQ_FIXED_LEN 3 + +struct dot11_meas_rep { + uint8 id; + uint8 len; + uint8 token; + uint8 mode; + uint8 type; + union + { + struct { + uint8 channel; + uint8 start_time[8]; + uint16 duration; + uint8 map; + } PACKED basic; + uint8 data[1]; + } PACKED rep; +} PACKED; +typedef struct dot11_meas_rep dot11_meas_rep_t; + +/* length of Measure Report IE data not including variable len */ +#define DOT11_MNG_IE_MREP_FIXED_LEN 3 + +struct dot11_meas_rep_basic { + uint8 channel; + uint8 start_time[8]; + uint16 duration; + uint8 map; +} PACKED; +typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t; +#define DOT11_MEASURE_BASIC_REP_LEN 12 + +struct dot11_quiet { + uint8 id; + uint8 len; + uint8 count; /* TBTTs until beacon interval in quiet starts */ + uint8 period; /* Beacon intervals between periodic quiet periods ? */ + uint16 duration;/* Length of quiet period, in TU's */ + uint16 offset; /* TU's offset from TBTT in Count field */ +} PACKED; +typedef struct dot11_quiet dot11_quiet_t; + +typedef struct { + uint8 channel; + uint8 map; +} chan_map_tuple_t; + +typedef struct { + uint8 id; + uint8 len; + uint8 eaddr[ETHER_ADDR_LEN]; + uint8 interval; + chan_map_tuple_t map[1]; +} dot11_ibss_dfs_t; + +/* WME Elements */ +#define WME_OUI "\x00\x50\xf2" +#define WME_VER 1 +#define WME_TYPE 2 +#define WME_SUBTYPE_IE 0 /* Information Element */ +#define WME_SUBTYPE_PARAM_IE 1 /* Parameter Element */ +#define WME_SUBTYPE_TSPEC 2 /* Traffic Specification */ + +/* WME Access Category Indices (ACIs) */ +#define AC_BE 0 /* Best Effort */ +#define AC_BK 1 /* Background */ +#define AC_VI 2 /* Video */ +#define AC_VO 3 /* Voice */ +#define AC_MAX 4 + +/* WME Information Element (IE) */ +struct wme_ie { + uint8 oui[3]; + uint8 type; + uint8 subtype; + uint8 version; + uint8 acinfo; +} PACKED; +typedef struct wme_ie wme_ie_t; +#define WME_IE_LEN 7 + +struct wme_acparam { + uint8 ACI; + uint8 ECW; + uint16 TXOP; /* stored in network order (ls octet first) */ +} PACKED; +typedef struct wme_acparam wme_acparam_t; + +/* WME Parameter Element (PE) */ +struct wme_params { + uint8 oui[3]; + uint8 type; + uint8 subtype; + uint8 version; + uint8 acinfo; + uint8 rsvd; + wme_acparam_t acparam[4]; +} PACKED; +typedef struct wme_params wme_params_t; +#define WME_PARAMS_IE_LEN 24 + +/* acinfo */ +#define WME_COUNT_MASK 0x0f +/* ACI */ +#define WME_AIFS_MASK 0x0f +#define WME_ACM_MASK 0x10 +#define WME_ACI_MASK 0x60 +#define WME_ACI_SHIFT 5 +/* ECW */ +#define WME_CWMIN_MASK 0x0f +#define WME_CWMAX_MASK 0xf0 +#define WME_CWMAX_SHIFT 4 + +#define WME_TXOP_UNITS 32 + +/* WME Traffic Specification (TSPEC) element */ +#define WME_SUBTYPE_TSPEC 2 +#define WME_TSPEC_HDR_LEN 2 +#define WME_TSPEC_BODY_OFF 2 +struct wme_tspec { + uint8 oui[DOT11_OUI_LEN]; /* WME_OUI */ + uint8 type; /* WME_TYPE */ + uint8 subtype; /* WME_SUBTYPE_TSPEC */ + uint8 version; /* WME_VERSION */ + uint16 ts_info; /* TS Info */ + uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */ + uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */ + uint32 min_service_interval; /* Minimum Service Interval (us) */ + uint32 max_service_interval; /* Maximum Service Interval (us) */ + uint32 inactivity_interval; /* Inactivity Interval (us) */ + uint32 service_start; /* Service Start Time (us) */ + uint32 min_rate; /* Minimum Data Rate (bps) */ + uint32 mean_rate; /* Mean Data Rate (bps) */ + uint32 max_burst_size; /* Maximum Burst Size (bytes) */ + uint32 min_phy_rate; /* Minimum PHY Rate (bps) */ + uint32 peak_rate; /* Peak Data Rate (bps) */ + uint32 delay_bound; /* Delay Bound (us) */ + uint16 surplus_bandwidth; /* Surplus Bandwidth Allowance Factor */ + uint16 medium_time; /* Medium Time (32 us/s periods) */ +} PACKED; +typedef struct wme_tspec wme_tspec_t; +#define WME_TSPEC_LEN 56 /* not including 2-byte header */ + +/* ts_info */ +/* 802.1D priority is duplicated - bits 13-11 AND bits 3-1 */ +#define TS_INFO_PRIO_SHIFT_HI 11 +#define TS_INFO_PRIO_MASK_HI (0x7 << TS_INFO_PRIO_SHIFT_HI) +#define TS_INFO_PRIO_SHIFT_LO 1 +#define TS_INFO_PRIO_MASK_LO (0x7 << TS_INFO_PRIO_SHIFT_LO) +#define TS_INFO_CONTENTION_SHIFT 7 +#define TS_INFO_CONTENTION_MASK (0x1 << TS_INFO_CONTENTION_SHIFT) +#define TS_INFO_DIRECTION_SHIFT 5 +#define TS_INFO_DIRECTION_MASK (0x3 << TS_INFO_DIRECTION_SHIFT) +#define TS_INFO_UPLINK (0 << TS_INFO_DIRECTION_SHIFT) +#define TS_INFO_DOWNLINK (1 << TS_INFO_DIRECTION_SHIFT) +#define TS_INFO_BIDIRECTIONAL (3 << TS_INFO_DIRECTION_SHIFT) + +/* nom_msdu_size */ +#define FIXED_MSDU_SIZE 0x8000 /* MSDU size is fixed */ +#define MSDU_SIZE_MASK 0x7fff /* (Nominal or fixed) MSDU size */ + +/* surplus_bandwidth */ +/* Represented as 3 bits of integer, binary point, 13 bits fraction */ +#define INTEGER_SHIFT 13 +#define FRACTION_MASK 0x1FFF + +/* Management Notification Frame */ +struct dot11_management_notification { + uint8 category; /* DOT11_ACTION_NOTIFICATION */ + uint8 action; + uint8 token; + uint8 status; + uint8 data[1]; /* Elements */ +} PACKED; +#define DOT11_MGMT_NOTIFICATION_LEN 4 /* Fixed length */ + +/* WME Action Codes */ +#define WME_SETUP_REQUEST 0 +#define WME_SETUP_RESPONSE 1 +#define WME_TEARDOWN 2 + +/* WME Setup Response Status Codes */ +#define WME_ADMISSION_ACCEPTED 0 +#define WME_INVALID_PARAMETERS 1 +#define WME_ADMISSION_REFUSED 3 + +/* Macro to take a pointer to a beacon or probe response + * header and return the char* pointer to the SSID info element + */ +#define BCN_PRB_SSID(hdr) ((char*)(hdr) + DOT11_MGMT_HDR_LEN + DOT11_BCN_PRB_LEN) + +/* Authentication frame payload constants */ +#define DOT11_OPEN_SYSTEM 0 +#define DOT11_SHARED_KEY 1 +#define DOT11_CHALLENGE_LEN 128 + +/* Frame control macros */ +#define FC_PVER_MASK 0x3 +#define FC_PVER_SHIFT 0 +#define FC_TYPE_MASK 0xC +#define FC_TYPE_SHIFT 2 +#define FC_SUBTYPE_MASK 0xF0 +#define FC_SUBTYPE_SHIFT 4 +#define FC_TODS 0x100 +#define FC_TODS_SHIFT 8 +#define FC_FROMDS 0x200 +#define FC_FROMDS_SHIFT 9 +#define FC_MOREFRAG 0x400 +#define FC_MOREFRAG_SHIFT 10 +#define FC_RETRY 0x800 +#define FC_RETRY_SHIFT 11 +#define FC_PM 0x1000 +#define FC_PM_SHIFT 12 +#define FC_MOREDATA 0x2000 +#define FC_MOREDATA_SHIFT 13 +#define FC_WEP 0x4000 +#define FC_WEP_SHIFT 14 +#define FC_ORDER 0x8000 +#define FC_ORDER_SHIFT 15 + +/* sequence control macros */ +#define SEQNUM_SHIFT 4 +#define FRAGNUM_MASK 0xF + +/* Frame Control type/subtype defs */ + +/* FC Types */ +#define FC_TYPE_MNG 0 +#define FC_TYPE_CTL 1 +#define FC_TYPE_DATA 2 + +/* Management Subtypes */ +#define FC_SUBTYPE_ASSOC_REQ 0 +#define FC_SUBTYPE_ASSOC_RESP 1 +#define FC_SUBTYPE_REASSOC_REQ 2 +#define FC_SUBTYPE_REASSOC_RESP 3 +#define FC_SUBTYPE_PROBE_REQ 4 +#define FC_SUBTYPE_PROBE_RESP 5 +#define FC_SUBTYPE_BEACON 8 +#define FC_SUBTYPE_ATIM 9 +#define FC_SUBTYPE_DISASSOC 10 +#define FC_SUBTYPE_AUTH 11 +#define FC_SUBTYPE_DEAUTH 12 +#define FC_SUBTYPE_ACTION 13 + +/* Control Subtypes */ +#define FC_SUBTYPE_PS_POLL 10 +#define FC_SUBTYPE_RTS 11 +#define FC_SUBTYPE_CTS 12 +#define FC_SUBTYPE_ACK 13 +#define FC_SUBTYPE_CF_END 14 +#define FC_SUBTYPE_CF_END_ACK 15 + +/* Data Subtypes */ +#define FC_SUBTYPE_DATA 0 +#define FC_SUBTYPE_DATA_CF_ACK 1 +#define FC_SUBTYPE_DATA_CF_POLL 2 +#define FC_SUBTYPE_DATA_CF_ACK_POLL 3 +#define FC_SUBTYPE_NULL 4 +#define FC_SUBTYPE_CF_ACK 5 +#define FC_SUBTYPE_CF_POLL 6 +#define FC_SUBTYPE_CF_ACK_POLL 7 +#define FC_SUBTYPE_QOS_DATA 8 +#define FC_SUBTYPE_QOS_NULL 12 + +/* type-subtype combos */ +#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK) + +#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT)) + +#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ) +#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP) +#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ) +#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP) +#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ) +#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP) +#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON) +#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC) +#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH) +#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH) +#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION) + +#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL) +#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS) +#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS) +#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK) +#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END) +#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK) + +#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA) +#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL) +#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK) +#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA) +#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL) + +/* QoS Control Field */ + +/* 802.1D Tag */ +#define QOS_PRIO_SHIFT 0 +#define QOS_PRIO_MASK 0x0007 +#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT) + +/* Ack Policy (0 means Acknowledge) */ +#define QOS_ACK_SHIFT 5 +#define QOS_ACK_MASK 0x0060 +#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT) + +/* Management Frames */ + +/* Management Frame Constants */ + +/* Fixed fields */ +#define DOT11_MNG_AUTH_ALGO_LEN 2 +#define DOT11_MNG_AUTH_SEQ_LEN 2 +#define DOT11_MNG_BEACON_INT_LEN 2 +#define DOT11_MNG_CAP_LEN 2 +#define DOT11_MNG_AP_ADDR_LEN 6 +#define DOT11_MNG_LISTEN_INT_LEN 2 +#define DOT11_MNG_REASON_LEN 2 +#define DOT11_MNG_AID_LEN 2 +#define DOT11_MNG_STATUS_LEN 2 +#define DOT11_MNG_TIMESTAMP_LEN 8 + +/* DUR/ID field in assoc resp is 0xc000 | AID */ +#define DOT11_AID_MASK 0x3fff + +/* Reason Codes */ +#define DOT11_RC_RESERVED 0 +#define DOT11_RC_UNSPECIFIED 1 /* Unspecified reason */ +#define DOT11_RC_AUTH_INVAL 2 /* Previous authentication no longer valid */ +#define DOT11_RC_DEAUTH_LEAVING 3 /* Deauthenticated because sending station is + leaving (or has left) IBSS or ESS */ +#define DOT11_RC_INACTIVITY 4 /* Disassociated due to inactivity */ +#define DOT11_RC_BUSY 5 /* Disassociated because AP is unable to handle + all currently associated stations */ +#define DOT11_RC_INVAL_CLASS_2 6 /* Class 2 frame received from + nonauthenticated station */ +#define DOT11_RC_INVAL_CLASS_3 7 /* Class 3 frame received from + nonassociated station */ +#define DOT11_RC_DISASSOC_LEAVING 8 /* Disassociated because sending station is + leaving (or has left) BSS */ +#define DOT11_RC_NOT_AUTH 9 /* Station requesting (re)association is + not authenticated with responding station */ +#define DOT11_RC_MAX 23 /* Reason codes > 23 are reserved */ + +/* Status Codes */ +#define DOT11_STATUS_SUCCESS 0 /* Successful */ +#define DOT11_STATUS_FAILURE 1 /* Unspecified failure */ +#define DOT11_STATUS_CAP_MISMATCH 10 /* Cannot support all requested capabilities + in the Capability Information field */ +#define DOT11_STATUS_REASSOC_FAIL 11 /* Reassociation denied due to inability to + confirm that association exists */ +#define DOT11_STATUS_ASSOC_FAIL 12 /* Association denied due to reason outside + the scope of this standard */ +#define DOT11_STATUS_AUTH_MISMATCH 13 /* Responding station does not support the + specified authentication algorithm */ +#define DOT11_STATUS_AUTH_SEQ 14 /* Received an Authentication frame with + authentication transaction sequence number + out of expected sequence */ +#define DOT11_STATUS_AUTH_CHALLENGE_FAIL 15 /* Authentication rejected because of challenge failure */ +#define DOT11_STATUS_AUTH_TIMEOUT 16 /* Authentication rejected due to timeout waiting + for next frame in sequence */ +#define DOT11_STATUS_ASSOC_BUSY_FAIL 17 /* Association denied because AP is unable to + handle additional associated stations */ +#define DOT11_STATUS_ASSOC_RATE_MISMATCH 18 /* Association denied due to requesting station + not supporting all of the data rates in the + BSSBasicRateSet parameter */ +#define DOT11_STATUS_ASSOC_SHORT_REQUIRED 19 /* Association denied due to requesting station + not supporting the Short Preamble option */ +#define DOT11_STATUS_ASSOC_PBCC_REQUIRED 20 /* Association denied due to requesting station + not supporting the PBCC Modulation option */ +#define DOT11_STATUS_ASSOC_AGILITY_REQUIRED 21 /* Association denied due to requesting station + not supporting the Channel Agility option */ +#define DOT11_STATUS_ASSOC_SPECTRUM_REQUIRED 22 /* Association denied because Spectrum Management + capability is required. */ +#define DOT11_STATUS_ASSOC_BAD_POWER_CAP 23 /* Association denied because the info in the + Power Cap element is unacceptable. */ +#define DOT11_STATUS_ASSOC_BAD_SUP_CHANNELS 24 /* Association denied because the info in the + Supported Channel element is unacceptable */ +#define DOT11_STATUS_ASSOC_SHORTSLOT_REQUIRED 25 /* Association denied due to requesting station + not supporting the Short Slot Time option */ +#define DOT11_STATUS_ASSOC_ERPBCC_REQUIRED 26 /* Association denied due to requesting station + not supporting the ER-PBCC Modulation option */ +#define DOT11_STATUS_ASSOC_DSSOFDM_REQUIRED 27 /* Association denied due to requesting station + not supporting the DSS-OFDM option */ + +/* Info Elts, length of INFORMATION portion of Info Elts */ +#define DOT11_MNG_DS_PARAM_LEN 1 +#define DOT11_MNG_IBSS_PARAM_LEN 2 + +/* TIM Info element has 3 bytes fixed info in INFORMATION field, + * followed by 1 to 251 bytes of Partial Virtual Bitmap */ +#define DOT11_MNG_TIM_FIXED_LEN 3 +#define DOT11_MNG_TIM_DTIM_COUNT 0 +#define DOT11_MNG_TIM_DTIM_PERIOD 1 +#define DOT11_MNG_TIM_BITMAP_CTL 2 +#define DOT11_MNG_TIM_PVB 3 + +/* TLV defines */ +#define TLV_TAG_OFF 0 +#define TLV_LEN_OFF 1 +#define TLV_HDR_LEN 2 +#define TLV_BODY_OFF 2 + +/* Management Frame Information Element IDs */ +#define DOT11_MNG_SSID_ID 0 +#define DOT11_MNG_RATES_ID 1 +#define DOT11_MNG_FH_PARMS_ID 2 +#define DOT11_MNG_DS_PARMS_ID 3 +#define DOT11_MNG_CF_PARMS_ID 4 +#define DOT11_MNG_TIM_ID 5 +#define DOT11_MNG_IBSS_PARMS_ID 6 +#define DOT11_MNG_COUNTRY_ID 7 +#define DOT11_MNG_HOPPING_PARMS_ID 8 +#define DOT11_MNG_HOPPING_TABLE_ID 9 +#define DOT11_MNG_REQUEST_ID 10 +#define DOT11_MNG_CHALLENGE_ID 16 +#define DOT11_MNG_PWR_CONSTRAINT_ID 32 /* 11H PowerConstraint */ +#define DOT11_MNG_PWR_CAP_ID 33 /* 11H PowerCapability */ +#define DOT11_MNG_TPC_REQUEST_ID 34 /* 11H TPC Request */ +#define DOT11_MNG_TPC_REPORT_ID 35 /* 11H TPC Report */ +#define DOT11_MNG_SUPP_CHANNELS_ID 36 /* 11H Supported Channels */ +#define DOT11_MNG_CHANNEL_SWITCH_ID 37 /* 11H ChannelSwitch Announcement*/ +#define DOT11_MNG_MEASURE_REQUEST_ID 38 /* 11H MeasurementRequest */ +#define DOT11_MNG_MEASURE_REPORT_ID 39 /* 11H MeasurementReport */ +#define DOT11_MNG_QUIET_ID 40 /* 11H Quiet */ +#define DOT11_MNG_IBSS_DFS_ID 41 /* 11H IBSS_DFS */ +#define DOT11_MNG_ERP_ID 42 +#define DOT11_MNG_NONERP_ID 47 +#define DOT11_MNG_EXT_RATES_ID 50 +#define DOT11_MNG_WPA_ID 221 +#define DOT11_MNG_PROPR_ID 221 + +/* ERP info element bit values */ +#define DOT11_MNG_ERP_LEN 1 /* ERP is currently 1 byte long */ +#define DOT11_MNG_NONERP_PRESENT 0x01 /* NonERP (802.11b) STAs are present in the BSS */ +#define DOT11_MNG_USE_PROTECTION 0x02 /* Use protection mechanisms for ERP-OFDM frames */ +#define DOT11_MNG_BARKER_PREAMBLE 0x04 /* Short Preambles: 0 == allowed, 1 == not allowed */ + +/* Capability Information Field */ +#define DOT11_CAP_ESS 0x0001 +#define DOT11_CAP_IBSS 0x0002 +#define DOT11_CAP_POLLABLE 0x0004 +#define DOT11_CAP_POLL_RQ 0x0008 +#define DOT11_CAP_PRIVACY 0x0010 +#define DOT11_CAP_SHORT 0x0020 +#define DOT11_CAP_PBCC 0x0040 +#define DOT11_CAP_AGILITY 0x0080 +#define DOT11_CAP_SPECTRUM 0x0100 +#define DOT11_CAP_SHORTSLOT 0x0400 +#define DOT11_CAP_CCK_OFDM 0x2000 + +/* Action Frame Constants */ +#define DOT11_ACTION_CAT_ERR_MASK 0x80 +#define DOT11_ACTION_CAT_SPECT_MNG 0x00 +#define DOT11_ACTION_NOTIFICATION 0x11 /* 17 */ + +#define DOT11_ACTION_ID_M_REQ 0 +#define DOT11_ACTION_ID_M_REP 1 +#define DOT11_ACTION_ID_TPC_REQ 2 +#define DOT11_ACTION_ID_TPC_REP 3 +#define DOT11_ACTION_ID_CHANNEL_SWITCH 4 + +/* MLME Enumerations */ +#define DOT11_BSSTYPE_INFRASTRUCTURE 0 +#define DOT11_BSSTYPE_INDEPENDENT 1 +#define DOT11_BSSTYPE_ANY 2 +#define DOT11_SCANTYPE_ACTIVE 0 +#define DOT11_SCANTYPE_PASSIVE 1 + +/* 802.11 A PHY constants */ +#define APHY_SLOT_TIME 9 +#define APHY_SIFS_TIME 16 +#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME)) +#define APHY_PREAMBLE_TIME 16 +#define APHY_SIGNAL_TIME 4 +#define APHY_SYMBOL_TIME 4 +#define APHY_SERVICE_NBITS 16 +#define APHY_TAIL_NBITS 6 +#define APHY_CWMIN 15 + +/* 802.11 B PHY constants */ +#define BPHY_SLOT_TIME 20 +#define BPHY_SIFS_TIME 10 +#define BPHY_DIFS_TIME 50 +#define BPHY_PLCP_TIME 192 +#define BPHY_PLCP_SHORT_TIME 96 +#define BPHY_CWMIN 31 + +/* 802.11 G constants */ +#define DOT11_OFDM_SIGNAL_EXTENSION 6 + +#define PHY_CWMAX 1023 + +#define DOT11_MAXNUMFRAGS 16 /* max # fragments per MSDU */ + +/* dot11Counters Table - 802.11 spec., Annex D */ +typedef struct d11cnt { + uint32 txfrag; /* dot11TransmittedFragmentCount */ + uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ + uint32 txfail; /* dot11FailedCount */ + uint32 txretry; /* dot11RetryCount */ + uint32 txretrie; /* dot11MultipleRetryCount */ + uint32 rxdup; /* dot11FrameduplicateCount */ + uint32 txrts; /* dot11RTSSuccessCount */ + uint32 txnocts; /* dot11RTSFailureCount */ + uint32 txnoack; /* dot11ACKFailureCount */ + uint32 rxfrag; /* dot11ReceivedFragmentCount */ + uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ + uint32 rxcrc; /* dot11FCSErrorCount */ + uint32 txfrmsnt; /* dot11TransmittedFrameCount */ + uint32 rxundec; /* dot11WEPUndecryptableCount */ +} d11cnt_t; + +/* BRCM OUI */ +#define BRCM_OUI "\x00\x10\x18" + +/* BRCM info element */ +struct brcm_ie { + uchar id; + uchar len; + uchar oui[3]; + uchar ver; + uchar assoc; /* # of assoc STAs */ + uchar flags; /* misc flags */ +} PACKED; +#define BRCM_IE_LEN 8 +typedef struct brcm_ie brcm_ie_t; +#define BRCM_IE_VER 1 + +/* brcm_ie flags */ +#define BRF_ABCAP 0x1 /* afterburner capable */ +#define BRF_ABRQRD 0x2 /* afterburner requested */ + +/* WPA definitions */ +#define WPA_VERSION 1 +#define WPA_OUI "\x00\x50\xF2" + +#define WPA_OUI_LEN 3 + +/* WPA authentication modes */ +#define WPA_AUTH_NONE 0 /* None */ +#define WPA_AUTH_UNSPECIFIED 1 /* Unspecified authentication over 802.1X: default for WPA */ +#define WPA_AUTH_PSK 2 /* Pre-shared Key over 802.1X */ +#define WPA_AUTH_DISABLED 255 /* Legacy (i.e., non-WPA) */ + +#define IS_WPA_AUTH(auth) ((auth) == WPA_AUTH_NONE || \ + (auth) == WPA_AUTH_UNSPECIFIED || \ + (auth) == WPA_AUTH_PSK) + + +/* Key related defines */ +#define DOT11_MAX_DEFAULT_KEYS 4 /* number of default keys */ +#define DOT11_MAX_KEY_SIZE 32 /* max size of any key */ +#define DOT11_MAX_IV_SIZE 16 /* max size of any IV */ +#define DOT11_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ + +#define WEP1_KEY_SIZE 5 /* max size of any WEP key */ +#define WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ +#define WEP128_KEY_SIZE 13 /* max size of any WEP key */ +#define WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ +#define TKIP_MIC_SIZE 8 /* size of TKIP MIC */ +#define TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ +#define TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ +#define TKIP_KEY_SIZE 32 /* size of any TKIP key */ +#define TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ +#define TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ +#define TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ +#define TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ +#define AES_KEY_SIZE 16 /* size of AES key */ + +#undef PACKED +#if !defined(__GNUC__) +#pragma pack() +#endif + +#endif /* _802_11_H_ */ diff --git a/openwrt/package/wlcompat/src/include/proto/ethernet.h b/openwrt/package/wlcompat/src/include/proto/ethernet.h new file mode 100644 index 00000000000..173464af639 --- /dev/null +++ b/openwrt/package/wlcompat/src/include/proto/ethernet.h @@ -0,0 +1,179 @@ +/******************************************************************************* + * $Id$ + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * From FreeBSD 2.2.7: Fundamental constants relating to ethernet. + ******************************************************************************/ + +#ifndef _NET_ETHERNET_H_ /* use native BSD ethernet.h when available */ +#define _NET_ETHERNET_H_ + +#ifndef _TYPEDEFS_H_ +#include "typedefs.h" +#endif + +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#define PACKED +#endif + +/* + * The number of bytes in an ethernet (MAC) address. + */ +#ifndef ETHER_ADDR_LEN +#define ETHER_ADDR_LEN 6 +#endif + +/* + * The number of bytes in the type field. + */ +#ifndef ETHER_TYPE_LEN +#define ETHER_TYPE_LEN 2 +#endif + +/* + * The number of bytes in the trailing CRC field. + */ +#ifndef ETHER_CRC_LEN +#define ETHER_CRC_LEN 4 +#endif + +/* + * The length of the combined header. + */ +#ifndef ETHER_HDR_LEN +#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN) +#endif + +/* + * The minimum packet length. + */ +#ifndef ETHER_MIN_LEN +#define ETHER_MIN_LEN 64 +#endif + +/* + * The minimum packet user data length. + */ +#ifndef ETHER_MIN_DATA +#define ETHER_MIN_DATA 46 +#endif + +/* + * The maximum packet length. + */ +#ifndef ETHER_MAX_LEN +#define ETHER_MAX_LEN 1518 +#endif + +/* + * The maximum packet user data length. + */ +#define ETHER_MAX_DATA 1500 + +/* + * Used to uniquely identify a 802.1q VLAN-tagged header. + */ +#define VLAN_TAG 0x8100 + +/* + * Located after dest & src address in ether header. + */ +#define VLAN_FIELDS_OFFSET (ETHER_ADDR_LEN * 2) + +/* + * 4 bytes of vlan field info. + */ +#define VLAN_FIELDS_SIZE 4 + +/* location of bits in 16-bit vlan fields */ +#define VLAN_PRI_SHIFT 13 /* user priority */ +#define VLAN_CFI_SHIFT 12 /* canonical format indicator bit */ + +/* 3 bits of priority */ +#define VLAN_PRI_MASK 7 +/* 12 bits of vlan identfier (VID) */ +#define VLAN_VID_MASK 0xFFF /* VLAN identifier (VID) field */ + +struct vlan_tags { + uint16 tag_type; /* 0x8100 for VLAN */ + uint16 tag_control; /* prio | cfi | vid */ +} PACKED ; + +/* 802.1X ethertype */ + +#define ETHER_TYPE_IP 0x0800 /* IP */ +#define ETHER_TYPE_BRCM 0x886c /* Broadcom Corp. */ +#define ETHER_TYPE_802_1X 0x888e /* 802.1x */ + +#define ETHER_BRCM_SUBTYPE_LEN 4 /* Broadcom 4byte subtype follows ethertype */ +#define ETHER_BRCM_CRAM 0x1 /* Broadcom subtype cram protocol */ + +/* + * A macro to validate a length with + */ +#define ETHER_IS_VALID_LEN(foo) \ + ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) + +#ifndef __NET_ETHERNET_H +#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */ +/* + * Structure of a 10Mb/s Ethernet header. + */ +struct ether_header { + uint8 ether_dhost[ETHER_ADDR_LEN]; + uint8 ether_shost[ETHER_ADDR_LEN]; + uint16 ether_type; +} PACKED ; + +/* + * Structure of a 48-bit Ethernet address. + */ +struct ether_addr { + uint8 octet[ETHER_ADDR_LEN]; +} PACKED ; +#endif +#endif + +/* + * Takes a pointer, returns true if a 48-bit multicast address + * (including broadcast, since it is all ones) + */ +#define ETHER_ISMULTI(ea) (((uint8 *)(ea))[0] & 1) + +/* + * Takes a pointer, returns true if a 48-bit broadcast (all ones) + */ +#define ETHER_ISBCAST(ea) ((((uint8 *)(ea))[0] & \ + ((uint8 *)(ea))[1] & \ + ((uint8 *)(ea))[2] & \ + ((uint8 *)(ea))[3] & \ + ((uint8 *)(ea))[4] & \ + ((uint8 *)(ea))[5]) == 0xff) + +static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}}; + +/* + * Takes a pointer, returns true if a 48-bit null address (all zeros) + */ +#define ETHER_ISNULLADDR(ea) ((((uint8 *)(ea))[0] | \ + ((uint8 *)(ea))[1] | \ + ((uint8 *)(ea))[2] | \ + ((uint8 *)(ea))[3] | \ + ((uint8 *)(ea))[4] | \ + ((uint8 *)(ea))[5]) == 0) + +/* Differentiated Services Codepoint - lower 6 bits of tos in iphdr */ +#define DSCP_PRI_MASK 0x3F /* bits 0-6 */ +#define DSCP_WME_PRI_MASK 0x38 /* bits 3-6 */ +#define DSCP_WME_PRI_SHIFT 3 + +#undef PACKED + +#endif /* _NET_ETHERNET_H_ */ diff --git a/openwrt/package/wlcompat/src/include/shutils.h b/openwrt/package/wlcompat/src/include/shutils.h new file mode 100644 index 00000000000..783ee9ede14 --- /dev/null +++ b/openwrt/package/wlcompat/src/include/shutils.h @@ -0,0 +1,200 @@ +/* + * Shell-like utility functions + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#ifndef _shutils_h_ +#define _shutils_h_ +#include <string.h> +/* + * Reads file and returns contents + * @param fd file descriptor + * @return contents of file or NULL if an error occurred + */ +extern char * fd2str(int fd); + +/* + * Reads file and returns contents + * @param path path to file + * @return contents of file or NULL if an error occurred + */ +extern char * file2str(const char *path); + +/* + * Waits for a file descriptor to become available for reading or unblocked signal + * @param fd file descriptor + * @param timeout seconds to wait before timing out or 0 for no timeout + * @return 1 if descriptor changed status or 0 if timed out or -1 on error + */ +extern int waitfor(int fd, int timeout); + +/* + * Concatenates NULL-terminated list of arguments into a single + * commmand and executes it + * @param argv argument list + * @param path NULL, ">output", or ">>output" + * @param timeout seconds to wait before timing out or 0 for no timeout + * @param ppid NULL to wait for child termination or pointer to pid + * @return return value of executed command or errno + */ +extern int _eval(char *const argv[], char *path, int timeout, pid_t *ppid); + +/* + * Concatenates NULL-terminated list of arguments into a single + * commmand and executes it + * @param argv argument list + * @return stdout of executed command or NULL if an error occurred + */ +extern char * _backtick(char *const argv[]); + +/* + * Kills process whose PID is stored in plaintext in pidfile + * @param pidfile PID file + * @return 0 on success and errno on failure + */ +extern int kill_pidfile(char *pidfile); + +/* + * fread() with automatic retry on syscall interrupt + * @param ptr location to store to + * @param size size of each element of data + * @param nmemb number of elements + * @param stream file stream + * @return number of items successfully read + */ +extern int safe_fread(void *ptr, size_t size, size_t nmemb, FILE *stream); + +/* + * fwrite() with automatic retry on syscall interrupt + * @param ptr location to read from + * @param size size of each element of data + * @param nmemb number of elements + * @param stream file stream + * @return number of items successfully written + */ +extern int safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); + +/* + * Convert Ethernet address string representation to binary data + * @param a string in xx:xx:xx:xx:xx:xx notation + * @param e binary data + * @return TRUE if conversion was successful and FALSE otherwise + */ +extern int ether_atoe(const char *a, unsigned char *e); + +/* + * Convert Ethernet address binary data to string representation + * @param e binary data + * @param a string in xx:xx:xx:xx:xx:xx notation + * @return a + */ +extern char * ether_etoa(const unsigned char *e, char *a); + +/* + * Concatenate two strings together into a caller supplied buffer + * @param s1 first string + * @param s2 second string + * @param buf buffer large enough to hold both strings + * @return buf + */ +static inline char * strcat_r(const char *s1, const char *s2, char *buf) +{ + strcpy(buf, s1); + strcat(buf, s2); + return buf; +} + +/* Check for a blank character; that is, a space or a tab */ +#define isblank(c) ((c) == ' ' || (c) == '\t') + +/* Strip trailing CR/NL from string <s> */ +#define chomp(s) ({ \ + char *c = (s) + strlen((s)) - 1; \ + while ((c > (s)) && (*c == '\n' || *c == '\r' || *c == ' ')) \ + *c-- = '\0'; \ + s; \ +}) + +/* Simple version of _backtick() */ +#define backtick(cmd, args...) ({ \ + char *argv[] = { cmd, ## args, NULL }; \ + _backtick(argv); \ +}) + +/* Simple version of _eval() (no timeout and wait for child termination) */ +#define eval(cmd, args...) ({ \ + char *argv[] = { cmd, ## args, NULL }; \ + _eval(argv, ">/dev/console", 0, NULL); \ +}) + +/* Copy each token in wordlist delimited by space into word */ +#define foreach(word, wordlist, next) \ + for (next = &wordlist[strspn(wordlist, " ")], \ + strncpy(word, next, sizeof(word)), \ + word[strcspn(word, " ")] = '\0', \ + word[sizeof(word) - 1] = '\0', \ + next = strchr(next, ' '); \ + strlen(word); \ + next = next ? &next[strspn(next, " ")] : "", \ + strncpy(word, next, sizeof(word)), \ + word[strcspn(word, " ")] = '\0', \ + word[sizeof(word) - 1] = '\0', \ + next = strchr(next, ' ')) + +/* Return NUL instead of NULL if undefined */ +#define safe_getenv(s) (getenv(s) ? : "") + +/* Print directly to the console */ +#define cprintf(fmt, args...) do { \ + FILE *fp = fopen("/dev/console", "w"); \ + if (fp) { \ + fprintf(fp, fmt, ## args); \ + fclose(fp); \ + } \ +} while (0) + +/* Debug print */ +#ifdef DEBUG +#define dprintf(fmt, args...) cprintf("%s: " fmt, __FUNCTION__, ## args) +#else +#define dprintf(fmt, args...) +#endif + +#ifdef vxworks + +#include <inetLib.h> +#define inet_aton(a, n) ((inet_aton((a), (n)) == ERROR) ? 0 : 1) +#define inet_ntoa(n) ({ char a[INET_ADDR_LEN]; inet_ntoa_b ((n), a); a; }) + +#include <typedefs.h> +#include <bcmutils.h> +#define ether_atoe(a, e) bcm_ether_atoe((a), (e)) +#define ether_etoa(e, a) bcm_ether_ntoa((e), (a)) + +/* These declarations are not available where you would expect them */ +extern int vsnprintf (char *, size_t, const char *, va_list); +extern int snprintf(char *str, size_t count, const char *fmt, ...); +extern char *strdup(const char *); +extern char *strsep(char **stringp, char *delim); +extern int strcasecmp(const char *s1, const char *s2); +extern int strncasecmp(const char *s1, const char *s2, size_t n); + +/* Neither are socket() and connect() */ +#include <sockLib.h> + +#ifdef DEBUG +#undef dprintf +#define dprintf printf +#endif +#endif + +#endif /* _shutils_h_ */ diff --git a/openwrt/package/wlcompat/src/include/typedefs.h b/openwrt/package/wlcompat/src/include/typedefs.h new file mode 100644 index 00000000000..6b0c25e0424 --- /dev/null +++ b/openwrt/package/wlcompat/src/include/typedefs.h @@ -0,0 +1,293 @@ +/* + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id$ + */ + +#ifndef _TYPEDEFS_H_ +#define _TYPEDEFS_H_ + + +/* Define 'SITE_TYPEDEFS' in the compile to include a site specific + * typedef file "site_typedefs.h". + * + * If 'SITE_TYPEDEFS' is not defined, then the "Inferred Typedefs" + * section of this file makes inferences about the compile environment + * based on defined symbols and possibly compiler pragmas. + * + * Following these two sections is the "Default Typedefs" + * section. This section is only prcessed if 'USE_TYPEDEF_DEFAULTS' is + * defined. This section has a default set of typedefs and a few + * proprocessor symbols (TRUE, FALSE, NULL, ...). + */ + +#ifdef SITE_TYPEDEFS + +/******************************************************************************* + * Site Specific Typedefs + *******************************************************************************/ + +#include "site_typedefs.h" + +#else + +/******************************************************************************* + * Inferred Typedefs + *******************************************************************************/ + +/* Infer the compile environment based on preprocessor symbols and pramas. + * Override type definitions as needed, and include configuration dependent + * header files to define types. + */ + +#ifdef __cplusplus + +#define TYPEDEF_BOOL +#ifndef FALSE +#define FALSE false +#endif +#ifndef TRUE +#define TRUE true +#endif + +#else /* ! __cplusplus */ + +/* for Windows build, define bool as a uchar instead of the default int */ +#if defined(_WIN32) + +#define TYPEDEF_BOOL +typedef unsigned char bool; + +#endif /* _WIN32 */ + +#endif /* ! __cplusplus */ + +#ifdef _MSC_VER /* Microsoft C */ +#define TYPEDEF_INT64 +#define TYPEDEF_UINT64 +typedef signed __int64 int64; +typedef unsigned __int64 uint64; +#endif + +#if defined(MACOSX) && defined(KERNEL) +#define TYPEDEF_BOOL +#endif + + +#if defined(linux) +#define TYPEDEF_UINT +#define TYPEDEF_USHORT +#define TYPEDEF_ULONG +#endif + +#if !defined(linux) && !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) +#define TYPEDEF_UINT +#define TYPEDEF_USHORT +#endif + + +/* Do not support the (u)int64 types with strict ansi for GNU C */ +#if defined(__GNUC__) && defined(__STRICT_ANSI__) +#define TYPEDEF_INT64 +#define TYPEDEF_UINT64 +#endif + +/* ICL accepts unsigned 64 bit type only, and complains in ANSI mode + * for singned or unsigned */ +#if defined(__ICL) + +#define TYPEDEF_INT64 + +#if defined(__STDC__) +#define TYPEDEF_UINT64 +#endif + +#endif /* __ICL */ + + +#if !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) + +/* pick up ushort & uint from standard types.h */ +#if defined(linux) && defined(__KERNEL__) + +#include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */ + +#else + +#include <sys/types.h> + +#endif + +#endif /* !_WIN32 && !PMON && !_CFE_ */ + +#if defined(MACOSX) && defined(KERNEL) +#include <IOKit/IOTypes.h> +#endif + + +/* use the default typedefs in the next section of this file */ +#define USE_TYPEDEF_DEFAULTS + +#endif /* SITE_TYPEDEFS */ + + +/******************************************************************************* + * Default Typedefs + *******************************************************************************/ + +#ifdef USE_TYPEDEF_DEFAULTS +#undef USE_TYPEDEF_DEFAULTS + +#ifndef TYPEDEF_BOOL +typedef int bool; +#endif + +/*----------------------- define uchar, ushort, uint, ulong ----------------*/ + +#ifndef TYPEDEF_UCHAR +typedef unsigned char uchar; +#endif + +#ifndef TYPEDEF_USHORT +typedef unsigned short ushort; +#endif + +#ifndef TYPEDEF_UINT +typedef unsigned int uint; +#endif + +#ifndef TYPEDEF_ULONG +typedef unsigned long ulong; +#endif + +/*----------------------- define [u]int8/16/32/64 --------------------------*/ + +#ifndef TYPEDEF_UINT8 +typedef unsigned char uint8; +#endif + +#ifndef TYPEDEF_UINT16 +typedef unsigned short uint16; +#endif + +#ifndef TYPEDEF_UINT32 +typedef unsigned int uint32; +#endif + +#ifndef TYPEDEF_UINT64 +typedef unsigned long long uint64; +#endif + +#ifndef TYPEDEF_INT8 +typedef signed char int8; +#endif + +#ifndef TYPEDEF_INT16 +typedef signed short int16; +#endif + +#ifndef TYPEDEF_INT32 +typedef signed int int32; +#endif + +#ifndef TYPEDEF_INT64 +typedef signed long long int64; +#endif + +/*----------------------- define float32/64, float_t -----------------------*/ + +#ifndef TYPEDEF_FLOAT32 +typedef float float32; +#endif + +#ifndef TYPEDEF_FLOAT64 +typedef double float64; +#endif + +/* + * abstracted floating point type allows for compile time selection of + * single or double precision arithmetic. Compiling with -DFLOAT32 + * selects single precision; the default is double precision. + */ + +#ifndef TYPEDEF_FLOAT_T + +#if defined(FLOAT32) +typedef float32 float_t; +#else /* default to double precision floating point */ +typedef float64 float_t; +#endif + +#endif /* TYPEDEF_FLOAT_T */ + +/*----------------------- define macro values -----------------------------*/ + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef OFF +#define OFF 0 +#endif + +#ifndef ON +#define ON 1 +#endif + +/*----------------------- define PTRSZ, INLINE ----------------------------*/ + +#ifndef PTRSZ +#define PTRSZ sizeof (char*) +#endif + +#ifndef INLINE + +#ifdef _MSC_VER + +#define INLINE __inline + +#elif __GNUC__ + +#define INLINE __inline__ + +#else + +#define INLINE + +#endif /* _MSC_VER */ + +#endif /* INLINE */ + +#undef TYPEDEF_BOOL +#undef TYPEDEF_UCHAR +#undef TYPEDEF_USHORT +#undef TYPEDEF_UINT +#undef TYPEDEF_ULONG +#undef TYPEDEF_UINT8 +#undef TYPEDEF_UINT16 +#undef TYPEDEF_UINT32 +#undef TYPEDEF_UINT64 +#undef TYPEDEF_INT8 +#undef TYPEDEF_INT16 +#undef TYPEDEF_INT32 +#undef TYPEDEF_INT64 +#undef TYPEDEF_FLOAT32 +#undef TYPEDEF_FLOAT64 +#undef TYPEDEF_FLOAT_T + +#endif /* USE_TYPEDEF_DEFAULTS */ + +#endif /* _TYPEDEFS_H_ */ diff --git a/openwrt/package/wlcompat/src/include/utils.h b/openwrt/package/wlcompat/src/include/utils.h new file mode 100644 index 00000000000..b8d1cdb7bfd --- /dev/null +++ b/openwrt/package/wlcompat/src/include/utils.h @@ -0,0 +1,131 @@ +#include <cy_conf.h> + +extern int diag_led(int type, int act); +extern int C_led(int i); +extern int get_single_ip(char *ipaddr, int which); +extern char *get_mac_from_ip(char *ip); +extern struct dns_lists *get_dns_list(int no); +extern int dns_to_resolv(void); +extern char *get_wan_face(void); +extern int check_wan_link(int num); +extern char *get_complete_lan_ip(char *ip); +extern int get_int_len(int num); +extern int file_to_buf(char *path, char *buf, int len); +extern int buf_to_file(char *path, char *buf); +extern pid_t* find_pid_by_name( char* pidName); +extern int find_pid_by_ps(char* pidName); +extern int *find_all_pid_by_ps(char* pidName); +extern char *find_name_by_proc(int pid); +extern int get_ppp_pid(char *file); +extern long convert_ver(char *ver); +extern int check_flash(void); +extern int check_action(void); +extern int check_now_boot(void); +extern int check_hw_type(void); +extern int is_exist(char *filename); +extern void set_ip_forward(char c); +struct mtu_lists *get_mtu(char *proto); +extern void set_host_domain_name(void); + +extern void encode(char *buf, int len); +extern void decode(char *buf, int len); + +extern int sys_netdev_ioctl(int family, int socket, char *if_name, int cmd, struct ifreq *ifr); + +int ct_openlog(const char *ident, int option, int facility, char *log_name); +void ct_syslog(int level, int enable, const char *fmt,...); +void ct_logger(int level, const char *fmt,...); +struct wl_assoc_mac * get_wl_assoc_mac(int *c); + + + +enum { DMZ, SESSION, DIAG , WL}; + +enum { START_LED, STOP_LED }; + +typedef enum { ACT_IDLE, + ACT_TFTP_UPGRADE, + ACT_WEB_UPGRADE, + ACT_WEBS_UPGRADE, + ACT_SW_RESTORE, + ACT_HW_RESTORE } ACTION; + +enum { UNKNOWN_BOOT = -1, PMON_BOOT, CFE_BOOT }; + +enum { BCM4702_CHIP, BCM4712_CHIP, BCM5325E_CHIP }; + +enum { FIRST, SECOND }; + +enum { SYSLOG_LOG=1, SYSLOG_DEBUG, CONSOLE_ONLY, LOG_CONSOLE, DEBUG_CONSOLE }; + +#define ACTION(cmd) buf_to_file(ACTION_FILE, cmd) + +struct dns_lists { + int num_servers; + char dns_server[4][16]; +}; + +#define NOT_USING 0 +#define USING 1 + +struct wl_assoc_mac +{ + char mac[18]; +}; + +struct mtu_lists { + char *proto; /* protocol */ + char *min; /* min mtu */ + char *max; /* max mtu */ +}; + + +#define PPP_PSEUDO_IP "10.64.64.64" +#define PPP_PSEUDO_NM "255.255.255.255" +#define PPP_PSEUDO_GW "10.112.112.112" + +#define PING_TMP "/tmp/ping.log" +#define TRACEROUTE_TMP "/tmp/traceroute.log" +#define MAX_BUF_LEN 254 + +#define RESOLV_FILE "/tmp/resolv.conf" +#define HOSTS_FILE "/tmp/hosts" + +#define LOG_FILE "/var/log/mess" + +#define ACTION_FILE "/tmp/action" + + +#define split(word, wordlist, next, delim) \ + for (next = wordlist, \ + strncpy(word, next, sizeof(word)), \ + word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \ + next = next ? next + sizeof(delim) - 1 : NULL ; \ + strlen(word); \ + next = next ? : "", \ + strncpy(word, next, sizeof(word)), \ + word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \ + next = next ? next + sizeof(delim) - 1 : NULL) + +#define STRUCT_LEN(name) sizeof(name)/sizeof(name[0]) + +#define printHEX(str,len) { \ + int i; \ + for (i=0 ; i<len ; i++) { \ + printf("%02X ", (unsigned char)*(str+i)); \ + if(((i+1)%16) == 0) printf("- "); \ + if(((i+1)%32) == 0) printf("\n"); \ + } \ + printf("\n\n"); \ +} + + +#define printASC(str,len) { \ + int i; \ + for (i=0 ; i<len ; i++) { \ + printf("%c", (unsigned char)*(str+i)); \ + if(((i+1)%16) == 0) printf("- "); \ + if(((i+1)%32) == 0) printf("\n"); \ + } \ + printf("\n\n"); \ +} diff --git a/openwrt/package/wlcompat/src/include/wlcompat.h b/openwrt/package/wlcompat/src/include/wlcompat.h new file mode 100644 index 00000000000..a4fc13439dd --- /dev/null +++ b/openwrt/package/wlcompat/src/include/wlcompat.h @@ -0,0 +1,36 @@ +/* + * wlcompat.h + * + * Copyright (C) 2005 Felix Fietkau <nbd@vd-s.ath.cx> + * + * 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. + * + * $Id$ + */ +#include <linux/wireless.h> + +#ifndef WLCOMPAT_H +#define WLCOMPAT_H + +#define WLCOMPAT_SET_MONITOR SIOCIWFIRSTPRIV + 0 +#define WLCOMPAT_GET_MONITOR SIOCIWFIRSTPRIV + 1 +#define WLCOMPAT_SET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 2 +#define WLCOMPAT_GET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 3 +#define WLCOMPAT_SET_ANTDIV SIOCIWFIRSTPRIV + 4 +#define WLCOMPAT_GET_ANTDIV SIOCIWFIRSTPRIV + 5 +#define WLCOMPAT_SET_TXANT SIOCIWFIRSTPRIV + 6 +#define WLCOMPAT_GET_TXANT SIOCIWFIRSTPRIV + 7 + +#endif diff --git a/openwrt/package/wlcompat/src/include/wlioctl.h b/openwrt/package/wlcompat/src/include/wlioctl.h new file mode 100644 index 00000000000..d5ef11f9ed0 --- /dev/null +++ b/openwrt/package/wlcompat/src/include/wlioctl.h @@ -0,0 +1,1094 @@ +/* + * Custom OID/ioctl definitions for + * Broadcom 802.11abg Networking Device Driver + * + * Definitions subject to change without notice. + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#ifndef _wlioctl_h_ +#define _wlioctl_h_ + +#include <typedefs.h> +#include <proto/ethernet.h> +#include <proto/802.11.h> + +#if defined(__GNUC__) +#define PACKED __attribute__((packed)) +#else +#define PACKED +#endif + +#define WLC_ESSID_MAX_SIZE 32 + +#define WL_NUMRATES 255 /* max # of rates in a rateset */ + +typedef struct wl_rateset { + uint32 count; /* # rates in this set */ + uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */ +} wl_rateset_t; + +#define WL_CHANSPEC_CHAN_MASK 0x0fff +#define WL_CHANSPEC_BAND_MASK 0xf000 +#define WL_CHANSPEC_BAND_SHIFT 12 +#define WL_CHANSPEC_BAND_A 0x1000 +#define WL_CHANSPEC_BAND_B 0x2000 + +/* + * Per-bss information structure. + */ + +#define WL_LEGACY_BSS_INFO_VERSION 106 /* an older supported version of wl_bss_info struct */ +#define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */ + +typedef struct wl_bss_info106 { + uint version; /* version field */ + struct ether_addr BSSID; + uint8 SSID_len; + uint8 SSID[32]; + uint8 Privacy; /* 0=No WEP, 1=Use WEP */ + int16 RSSI; /* receive signal strength (in dBm) */ + uint16 beacon_period; /* units are Kusec */ + uint16 atim_window; /* units are Kusec */ + uint8 channel; /* Channel no. */ + int8 infra; /* 0=IBSS, 1=infrastructure, 2=unknown */ + struct { + uint count; /* # rates in this set */ + uint8 rates[12]; /* rates in 500kbps units w/hi bit set if basic */ + } rateset; /* supported rates */ + uint8 dtim_period; /* DTIM period */ + int8 phy_noise; /* noise right after tx (in dBm) */ + uint16 capability; /* Capability information */ + struct dot11_bcn_prb *prb; /* probe response frame (ioctl na) */ + uint16 prb_len; /* probe response frame length (ioctl na) */ + struct { + uint8 supported; /* wpa supported */ + uint8 multicast; /* multicast cipher */ + uint8 ucount; /* count of unicast ciphers */ + uint8 unicast[4]; /* unicast ciphers */ + uint8 acount; /* count of auth modes */ + uint8 auth[4]; /* Authentication modes */ + } wpa; +} wl_bss_info106_t; + +typedef struct wl_bss_info { + uint32 version; /* version field */ + uint32 length; /* byte length of data in this record, starting at version and including IEs */ + struct ether_addr BSSID; + uint16 beacon_period; /* units are Kusec */ + uint16 capability; /* Capability information */ + uint8 SSID_len; + uint8 SSID[32]; + struct { + uint count; /* # rates in this set */ + uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ + } rateset; /* supported rates */ + uint8 channel; /* Channel no. */ + uint16 atim_window; /* units are Kusec */ + uint8 dtim_period; /* DTIM period */ + int16 RSSI; /* receive signal strength (in dBm) */ + int8 phy_noise; /* noise (in dBm) */ + uint32 ie_length; /* byte length of Information Elements */ + /* variable length Information Elements */ +} wl_bss_info_t; + +typedef struct wlc_ssid { + uint32 SSID_len; + uchar SSID[32]; +} wlc_ssid_t; + +typedef struct wl_scan_params { + wlc_ssid_t ssid; /* default is {0, ""} */ + struct ether_addr bssid;/* default is bcast */ + int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */ + int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */ + int32 nprobes; /* -1 use default, number of probes per channel */ + int32 active_time; /* -1 use default, dwell time per channel for active scanning */ + int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */ + int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */ + int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */ + uint16 channel_list[1]; /* list of chanspecs */ +} wl_scan_params_t; +/* size of wl_scan_params not including variable length array */ +#define WL_SCAN_PARAMS_FIXED_SIZE 64 + +typedef struct wl_scan_results { + uint32 buflen; + uint32 version; + uint32 count; + wl_bss_info_t bss_info[1]; +} wl_scan_results_t; +/* size of wl_scan_results not including variable length array */ +#define WL_SCAN_RESULTS_FIXED_SIZE 12 + +/* uint32 list */ +typedef struct wl_uint32_list { + /* in - # of elements, out - # of entries */ + uint32 count; + /* variable length uint32 list */ + uint32 element[1]; +} wl_uint32_list_t; + +#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */ + +typedef struct wl_channels_in_country { + uint32 buflen; + uint32 band; + char country_abbrev[WLC_CNTRY_BUF_SZ]; + uint32 count; + uint32 channel[1]; +} wl_channels_in_country_t; + +typedef struct wl_country_list { + uint32 buflen; + uint32 band_set; + uint32 band; + uint32 count; + char country_abbrev[1]; +} wl_country_list_t; + +#define WL_RM_TYPE_BASIC 1 +#define WL_RM_TYPE_CCA 2 +#define WL_RM_TYPE_RPI 3 + +#define WL_RM_FLAG_PARALLEL (1<<0) + +#define WL_RM_FLAG_LATE (1<<1) +#define WL_RM_FLAG_INCAPABLE (1<<2) +#define WL_RM_FLAG_REFUSED (1<<3) + +typedef struct wl_rm_req_elt { + int8 type; + int8 flags; + uint16 chanspec; + uint32 token; /* token for this measurement */ + uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ + uint32 tsf_l; /* TSF low 32-bits */ + uint32 dur; /* TUs */ +} wl_rm_req_elt_t; + +typedef struct wl_rm_req { + uint32 token; /* overall measurement set token */ + uint32 count; /* number of measurement reqests */ + wl_rm_req_elt_t req[1]; /* variable length block of requests */ +} wl_rm_req_t; +#define WL_RM_REQ_FIXED_LEN 8 + +typedef struct wl_rm_rep_elt { + int8 type; + int8 flags; + uint16 chanspec; + uint32 token; /* token for this measurement */ + uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ + uint32 tsf_l; /* TSF low 32-bits */ + uint32 dur; /* TUs */ + uint32 len; /* byte length of data block */ + uint8 data[1]; /* variable length data block */ +} wl_rm_rep_elt_t; +#define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */ + +#define WL_RPI_REP_BIN_NUM 8 +typedef struct wl_rm_rpi_rep { + uint8 rpi[WL_RPI_REP_BIN_NUM]; + int8 rpi_max[WL_RPI_REP_BIN_NUM]; +} wl_rm_rpi_rep_t; + +typedef struct wl_rm_rep { + uint32 token; /* overall measurement set token */ + uint32 len; /* length of measurement report block */ + wl_rm_rep_elt_t rep[1]; /* variable length block of reports */ +} wl_rm_rep_t; +#define WL_RM_REP_FIXED_LEN 8 + + +#define WLC_MAX_KEY_SIZE 32 /* max size of any key */ +#define WLC_MAX_IV_SIZE 16 /* max size of any IV */ +#define WLC_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ +#define WLC_MAX_DEFAULT_KEYS 4 /* # of default WEP keys */ +#define WLC_MAX_KEYS 54 /* Max # of WEP keys */ +#define WLC_WEP1_KEY_SIZE 5 /* max size of any WEP key */ +#define WLC_WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ +#define WLC_WEP128_KEY_SIZE 13 /* max size of any WEP key */ +#define WLC_WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ +#define WLC_TKIP_MIC_SIZE 8 /* size of TKIP MIC */ +#define WLC_TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ +#define WLC_TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ +#define WLC_TKIP_KEY_SIZE 32 /* size of any TKIP key */ +#define WLC_TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ +#define WLC_TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ +#define WLC_TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ +#define WLC_TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ +#define WLC_TKIP_P1_KEY_SIZE 10 /* size of TKHash Phase1 output, in bytes */ +#define WLC_TKIP_P2_KEY_SIZE 16 /* size of TKHash Phase2 output */ +#define WLC_AES_KEY_SIZE 16 /* size of AES key */ + + +typedef enum sup_auth_status { + WLC_SUP_DISCONNECTED = 0, + WLC_SUP_CONNECTING, + WLC_SUP_IDREQUIRED, + WLC_SUP_AUTHENTICATING, + WLC_SUP_AUTHENTICATED, + WLC_SUP_KEYXCHANGE, + WLC_SUP_KEYED +} sup_auth_status_t; + +/* Enumerate crypto algorithms */ +#define CRYPTO_ALGO_OFF 0 +#define CRYPTO_ALGO_WEP1 1 +#define CRYPTO_ALGO_TKIP 2 +#define CRYPTO_ALGO_WEP128 3 +#define CRYPTO_ALGO_AES_CCM 4 +#define CRYPTO_ALGO_AES_OCB_MSDU 5 +#define CRYPTO_ALGO_AES_OCB_MPDU 6 +#define CRYPTO_ALGO_NALG 7 + +#define WSEC_GEN_MIC_ERROR 0x0001 +#define WSEC_GEN_REPLAY 0x0002 + +#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */ +#define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ +#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */ +#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */ + + +typedef struct wlc_tkip_info { + uint16 phase1[WLC_TKIP_P1_KEY_SIZE/sizeof(uint16)]; /* tkhash phase1 result */ + uint8 phase2[WLC_TKIP_P2_KEY_SIZE]; /* tkhash phase2 result */ + uint32 micl; + uint32 micr; +} tkip_info_t; + +typedef struct _wsec_iv { + uint32 hi; /* upper 32 bits of IV */ + uint16 lo; /* lower 16 bits of IV */ +} wsec_iv_t; + +typedef struct wsec_key { + uint32 index; /* key index */ + uint32 len; /* key length */ + uint8 data[WLC_MAX_KEY_SIZE]; /* key data */ + tkip_info_t tkip_tx; /* tkip transmit state */ + tkip_info_t tkip_rx; /* tkip receive state */ + uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ + uint32 flags; /* misc flags */ + uint32 algo_hw; /* cache for hw register*/ + uint32 aes_mode; /* cache for hw register*/ + int iv_len; /* IV length */ + int iv_initialized; /* has IV been initialized already? */ + int icv_len; /* ICV length */ + wsec_iv_t rxiv; /* Rx IV */ + wsec_iv_t txiv; /* Tx IV */ + struct ether_addr ea; /* per station */ +} wsec_key_t; + + + +typedef struct wl_wsec_key { + uint32 index; /* key index */ + uint32 len; /* key length */ + uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */ + uint32 pad_1[18]; + uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ + uint32 flags; /* misc flags */ + uint32 pad_2[2]; + int pad_3; + int iv_initialized; /* has IV been initialized already? */ + int pad_4; + /* Rx IV */ + struct { + uint32 hi; /* upper 32 bits of IV */ + uint16 lo; /* lower 16 bits of IV */ + } rxiv; + uint32 pad_5[2]; + struct ether_addr ea; /* per station */ +} wl_wsec_key_t; + +/* For use with wlc_wep_key.flags */ +#define WSEC_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ +#define WSEC_TKIP_ERROR (1 << 2) /* Provoke deliberate error */ + +#define WSEC_MIN_PSK_LEN 8 +#define WSEC_MAX_PSK_LEN 64 + +/* Flag for key material needing passhash'ing */ +#define WSEC_PASSPHRASE (1<<0) + +/* recepticle for WLC_SET_WSEC_PMK parameter */ +typedef struct { + ushort key_len; /* octets in key material */ + ushort flags; /* key handling qualification */ + uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */ +} wsec_pmk_t; + +/* wireless security bitvec */ +#define WEP_ENABLED 1 +#define TKIP_ENABLED 2 +#define AES_ENABLED 4 +#define WSEC_SWFLAG 8 + +#define WSEC_SW(wsec) ((wsec) & WSEC_SWFLAG) +#define WSEC_HW(wsec) (!WSEC_SW(wsec)) +#define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED) +#define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED) +#define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED) +#define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED)) + + +/* wireless authentication bit vector */ +#define WPA_ENABLED 1 +#define PSK_ENABLED 2 + +#define WAUTH_WPA_ENABLED(wauth) ((wauth) & WPA_ENABLED) +#define WAUTH_PSK_ENABLED(wauth) ((wauth) & PSK_ENABLED) +#define WAUTH_ENABLED(wauth) ((wauth) & (WPA_ENABLED | PSK_ENABLED)) + +/* group/mcast cipher */ +#define WPA_MCAST_CIPHER(wsec) (((wsec) & TKIP_ENABLED) ? WPA_CIPHER_TKIP : \ + ((wsec) & AES_ENABLED) ? WPA_CIPHER_AES_CCM : \ + WPA_CIPHER_NONE) + + +typedef struct wl_led_info { + uint32 index; /* led index */ + uint32 behavior; + bool activehi; +} wl_led_info_t; + +/* + * definitions for driver messages passed from WL to NAS. + */ +/* Use this to recognize wpa and 802.1x driver messages. */ +static const uint8 wl_wpa_snap_template[] = + { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c }; + +#define WL_WPA_MSG_IFNAME_MAX 16 + +/* WPA driver message */ +typedef struct wl_wpa_header { + struct ether_header eth; + struct dot11_llc_snap_header snap; + uint8 version; + uint8 type; + /* version 2 additions */ + char ifname[WL_WPA_MSG_IFNAME_MAX]; + /* version specific data */ + /* uint8 data[1]; */ +} wl_wpa_header_t PACKED; + +/* + * definitions for 802.2 messages passed from WL to NAS. + */ +/* This seems not to be defined outside the kernel on linux. */ +#ifndef ETH_P_802_2 +#define ETH_P_802_2 4 +#endif + +#define WL_WPA_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX) + +/* WPA driver message ethertype - private between wlc and nas */ +#define WL_WPA_ETHER_TYPE 0x9999 + +/* WPA driver message current version */ +#define WL_WPA_MSG_VERSION 2 + +/* Type field values for the 802.2 driver messages for WPA. */ +#define WLC_ASSOC_MSG 1 +#define WLC_DISASSOC_MSG 2 +#define WLC_PTK_MIC_MSG 3 +#define WLC_GTK_MIC_MSG 4 + +/* Use this to recognize 802.2 driver messages. */ +static const uint8 wpa_snap_template[] = + { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c }; + + +/* 802.1x driver message */ +typedef struct wl_eapol_header { + struct ether_header eth; + struct dot11_llc_snap_header snap; + uint8 version; + uint8 reserved; + char ifname[WL_WPA_MSG_IFNAME_MAX]; + /* version specific data */ + /* uint8 802_1x_msg[1]; */ +} wl_eapol_header_t PACKED; + +#define WL_EAPOL_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX) + +/* 802.1x driver message ethertype - private between wlc and nas */ +#define WL_EAPOL_ETHER_TYPE 0x999A + +/* 802.1x driver message current version */ +#define WL_EAPOL_MSG_VERSION 1 + +/* srom read/write struct passed through ioctl */ +typedef struct { + uint byteoff; /* byte offset */ + uint nbytes; /* number of bytes */ + uint16 buf[1]; +} srom_rw_t; + +/* R_REG and W_REG struct passed through ioctl */ +typedef struct { + uint32 byteoff; /* byte offset of the field in d11regs_t */ + uint32 val; /* read/write value of the field */ + uint32 size; /* sizeof the field */ +} rw_reg_t; + +/* Structure used by GET/SET_ATTEN ioctls */ +typedef struct { + uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */ + uint16 bb; /* Baseband attenuation */ + uint16 radio; /* Radio attenuation */ + uint16 txctl1; /* Radio TX_CTL1 value */ +} atten_t; + +/* Used to get specific STA parameters */ +typedef struct { + uint32 val; + struct ether_addr ea; +} scb_val_t; + +/* callback registration data types */ + +typedef struct _mac_event_params { + uint msg; + struct ether_addr *addr; + uint result; + uint status; + uint auth_type; +} mac_event_params_t; + +typedef struct _mic_error_params { + struct ether_addr *ea; + bool group; + bool flush_txq; +} mic_error_params_t; + +typedef enum _wl_callback { + WL_MAC_EVENT_CALLBACK = 0, + WL_LINK_UP_CALLBACK, + WL_LINK_DOWN_CALLBACK, + WL_MIC_ERROR_CALLBACK, + WL_LAST_CALLBACK +} wl_callback_t; + +typedef struct _callback { + void (*fn)(void *, void *); + void *context; +} callback_t; + +typedef struct _scan_callback { + void (*fn)(void *); + void *context; +} scan_callback_t; + +/* used to register an arbitrary callback via the IOCTL interface */ +typedef struct _set_callback { + int index; + callback_t callback; +} set_callback_t; + + + +/* Event data type */ +typedef struct { + uint msg; /* Message (see below) */ + struct ether_addr *addr; /* Station address (if applicable) */ + uint status; /* Status code (see below) */ + uint reason; /* Reason code (if applicable) */ + uint auth_type; /* WLC_E_AUTH */ + bool link; /* WLC_E_LINK */ + bool group; /* WLC_E_MIC_ERROR */ + bool flush_txq; /* WLC_E_MIC_ERROR */ +} wlc_event_t; + +typedef struct { + uint16 ver; /* version of this struct */ + uint16 cap; /* sta's advertized capabilities */ + uint32 flags; /* flags defined below */ + uint32 idle; /* time since data pkt rx'd from sta */ + struct ether_addr ea; /* Station address */ + wl_rateset_t rateset; /* rateset in use */ +} sta_info_t; + +#define WL_STA_INFO_LEN 300 +#define WL_STA_VER 1 + +/* flags fields */ +#define WL_STA_BRCM 0x01 +#define WL_STA_WME 0x02 +#define WL_STA_ABCAP 0x04 +#define WL_STA_AUTHE 0x08 +#define WL_STA_ASSOC 0x10 +#define WL_STA_AUTHO 0x20 + +/* Event messages */ +#define WLC_E_SET_SSID 1 +#define WLC_E_JOIN 2 +#define WLC_E_START 3 +#define WLC_E_AUTH 4 +#define WLC_E_AUTH_IND 5 +#define WLC_E_DEAUTH 6 +#define WLC_E_DEAUTH_IND 7 +#define WLC_E_ASSOC 8 +#define WLC_E_ASSOC_IND 9 +#define WLC_E_REASSOC 10 +#define WLC_E_REASSOC_IND 11 +#define WLC_E_DISASSOC 12 +#define WLC_E_DISASSOC_IND 13 +#define WLC_E_QUIET_START 14 /* 802.11h Quiet period started */ +#define WLC_E_QUIET_END 15 /* 802.11h Quiet period ended */ +#define WLC_E_GOT_BEACONS 16 +#define WLC_E_LINK 17 /* Link indication */ +#define WLC_E_MIC_ERROR 18 /* TKIP MIC error occurred */ +#define WLC_E_NDIS_LINK 19 /* NDIS style link indication */ +#define WLC_E_ROAM 20 +#define WLC_E_LAST 21 + +/* Event status codes */ +#define WLC_E_STATUS_SUCCESS 0 +#define WLC_E_STATUS_FAIL 1 +#define WLC_E_STATUS_TIMEOUT 2 +#define WLC_E_STATUS_NO_NETWORKS 3 +#define WLC_E_STATUS_ABORT 4 + +typedef struct wlc_event_cb { + uint msg; /* Event message or 0 for all */ + void (*fn)(void *, wlc_event_t *); /* Callback function */ + void *context; /* Passed to callback function */ + struct wlc_event_cb *next; /* Next in the chain */ +} wlc_event_cb_t; + +/* + * Country locale determines which channels are available to us. + */ +typedef enum _wlc_locale { + WLC_WW = 0, /* Worldwide */ + WLC_THA, /* Thailand */ + WLC_ISR, /* Israel */ + WLC_JDN, /* Jordan */ + WLC_PRC, /* China */ + WLC_JPN, /* Japan */ + WLC_FCC, /* USA */ + WLC_EUR, /* Europe */ + WLC_USL, /* US Low Band only */ + WLC_JPH, /* Japan High Band only */ + WLC_ALL, /* All the channels in this band */ + WLC_11D, /* Represents locale recieved by 11d beacons */ + WLC_LAST_LOCALE, + WLC_UNDEFINED_LOCALE = 0xf +} wlc_locale_t; + +/* channel encoding */ +typedef struct channel_info { + int hw_channel; + int target_channel; + int scan_channel; +} channel_info_t; + +/* For ioctls that take a list of MAC addresses */ +struct maclist { + uint count; /* number of MAC addresses */ + struct ether_addr ea[1]; /* variable length array of MAC addresses */ +}; + +/* get pkt count struct passed through ioctl */ +typedef struct get_pktcnt { + uint rx_good_pkt; + uint rx_bad_pkt; + uint tx_good_pkt; + uint tx_bad_pkt; +} get_pktcnt_t; + +/* Linux network driver ioctl encoding */ +typedef struct wl_ioctl { + uint cmd; /* common ioctl definition */ + void *buf; /* pointer to user buffer */ + uint len; /* length of user buffer */ + bool set; /* get or set request (optional) */ + uint used; /* bytes read or written (optional) */ + uint needed; /* bytes needed (optional) */ +} wl_ioctl_t; + +/* + * Structure for passing hardware and software + * revision info up from the driver. + */ +typedef struct wlc_rev_info { + uint vendorid; /* PCI vendor id */ + uint deviceid; /* device id of chip */ + uint radiorev; /* radio revision */ + uint chiprev; /* chip revision */ + uint corerev; /* core revision */ + uint boardid; /* board identifier (usu. PCI sub-device id) */ + uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */ + uint boardrev; /* board revision */ + uint driverrev; /* driver version */ + uint ucoderev; /* microcode version */ + uint bus; /* bus type */ + uint chipnum; /* chip number */ +} wlc_rev_info_t; + +/* check this magic number */ +#define WLC_IOCTL_MAGIC 0x14e46c77 + +/* bump this number if you change the ioctl interface */ +#define WLC_IOCTL_VERSION 1 + +/* maximum length buffer required */ +#define WLC_IOCTL_MAXLEN 8192 + +/* common ioctl definitions */ +#define WLC_GET_MAGIC 0 +#define WLC_GET_VERSION 1 +#define WLC_UP 2 +#define WLC_DOWN 3 +#define WLC_GET_LOOP 4 +#define WLC_SET_LOOP 5 +#define WLC_DUMP 6 +#define WLC_GET_MSGLEVEL 7 +#define WLC_SET_MSGLEVEL 8 +#define WLC_GET_PROMISC 9 +#define WLC_SET_PROMISC 10 +#define WLC_OBSOLETE 11 +#define WLC_GET_RATE 12 +#define WLC_SET_RATE 13 +#define WLC_GET_INSTANCE 14 +#define WLC_GET_FRAG 15 +#define WLC_SET_FRAG 16 +#define WLC_GET_RTS 17 +#define WLC_SET_RTS 18 +#define WLC_GET_INFRA 19 +#define WLC_SET_INFRA 20 +#define WLC_GET_AUTH 21 +#define WLC_SET_AUTH 22 +#define WLC_GET_BSSID 23 +#define WLC_SET_BSSID 24 +#define WLC_GET_SSID 25 +#define WLC_SET_SSID 26 +#define WLC_RESTART 27 +#define WLC_DUMP_SCB 28 +#define WLC_GET_CHANNEL 29 +#define WLC_SET_CHANNEL 30 +#define WLC_GET_SRL 31 +#define WLC_SET_SRL 32 +#define WLC_GET_LRL 33 +#define WLC_SET_LRL 34 +#define WLC_GET_PLCPHDR 35 +#define WLC_SET_PLCPHDR 36 +#define WLC_GET_RADIO 37 +#define WLC_SET_RADIO 38 +#define WLC_GET_PHYTYPE 39 +#define WLC_DUMP_RATE 40 +#define WLC_SET_RATE_PARAMS 41 +#define WLC_GET_WEP 42 +#define WLC_SET_WEP 43 +#define WLC_GET_KEY 44 +#define WLC_SET_KEY 45 +#define WLC_GET_REGULATORY 46 +#define WLC_SET_REGULATORY 47 +#define WLC_GET_PASSIVE 48 /* added by nbd */ +#define WLC_SET_PASSIVE 49 /* added by nbd */ +#define WLC_SCAN 50 +#define WLC_SCAN_RESULTS 51 +#define WLC_DISASSOC 52 +#define WLC_REASSOC 53 +#define WLC_GET_ROAM_TRIGGER 54 +#define WLC_SET_ROAM_TRIGGER 55 +#define WLC_GET_ROAM_DELTA 56 +#define WLC_SET_ROAM_DELTA 57 +#define WLC_GET_ROAM_SCAN_PERIOD 58 +#define WLC_SET_ROAM_SCAN_PERIOD 59 +#define WLC_EVM 60 +#define WLC_GET_TXANT 61 +#define WLC_SET_TXANT 62 +#define WLC_GET_ANTDIV 63 +#define WLC_SET_ANTDIV 64 +#define WLC_GET_TXPWR 65 +#define WLC_SET_TXPWR 66 +#define WLC_GET_CLOSED 67 +#define WLC_SET_CLOSED 68 +#define WLC_GET_MACLIST 69 +#define WLC_SET_MACLIST 70 +#define WLC_GET_RATESET 71 +#define WLC_SET_RATESET 72 +#define WLC_GET_LOCALE 73 +#define WLC_SET_LOCALE 74 +#define WLC_GET_BCNPRD 75 +#define WLC_SET_BCNPRD 76 +#define WLC_GET_DTIMPRD 77 +#define WLC_SET_DTIMPRD 78 +#define WLC_GET_SROM 79 +#define WLC_SET_SROM 80 +#define WLC_GET_WEP_RESTRICT 81 +#define WLC_SET_WEP_RESTRICT 82 +#define WLC_GET_COUNTRY 83 +#define WLC_SET_COUNTRY 84 +#define WLC_GET_PM 85 +#define WLC_SET_PM 86 +#define WLC_GET_WAKE 87 +#define WLC_SET_WAKE 88 +#define WLC_GET_D11CNTS 89 +#define WLC_GET_FORCELINK 90 /* ndis only */ +#define WLC_SET_FORCELINK 91 /* ndis only */ +#define WLC_FREQ_ACCURACY 92 +#define WLC_CARRIER_SUPPRESS 93 +#define WLC_GET_PHYREG 94 +#define WLC_SET_PHYREG 95 +#define WLC_GET_RADIOREG 96 +#define WLC_SET_RADIOREG 97 +#define WLC_GET_REVINFO 98 +#define WLC_GET_UCANTDIV 99 +#define WLC_SET_UCANTDIV 100 +#define WLC_R_REG 101 +#define WLC_W_REG 102 +#define WLC_DIAG_LOOPBACK 103 +#define WLC_RESET_D11CNTS 104 +#define WLC_GET_MACMODE 105 +#define WLC_SET_MACMODE 106 +#define WLC_GET_MONITOR 107 /* added by nbd */ +#define WLC_SET_MONITOR 108 /* added by nbd */ +#define WLC_GET_GMODE 109 +#define WLC_SET_GMODE 110 +#define WLC_GET_LEGACY_ERP 111 +#define WLC_SET_LEGACY_ERP 112 +#define WLC_GET_RX_ANT 113 +#define WLC_GET_CURR_RATESET 114 /* current rateset */ +#define WLC_GET_SCANSUPPRESS 115 +#define WLC_SET_SCANSUPPRESS 116 +#define WLC_GET_AP 117 +#define WLC_SET_AP 118 +#define WLC_GET_EAP_RESTRICT 119 +#define WLC_SET_EAP_RESTRICT 120 +#define WLC_SCB_AUTHORIZE 121 +#define WLC_SCB_DEAUTHORIZE 122 +#define WLC_GET_WDSLIST 123 +#define WLC_SET_WDSLIST 124 +#define WLC_GET_ATIM 125 +#define WLC_SET_ATIM 126 +#define WLC_GET_RSSI 127 +#define WLC_GET_PHYANTDIV 128 +#define WLC_SET_PHYANTDIV 129 +#define WLC_AP_RX_ONLY 130 +#define WLC_GET_TX_PATH_PWR 131 +#define WLC_SET_TX_PATH_PWR 132 +#define WLC_GET_WSEC 133 +#define WLC_SET_WSEC 134 +#define WLC_GET_PHY_NOISE 135 +#define WLC_GET_BSS_INFO 136 +#define WLC_GET_PKTCNTS 137 +#define WLC_GET_LAZYWDS 138 +#define WLC_SET_LAZYWDS 139 +#define WLC_GET_BANDLIST 140 +#define WLC_GET_BAND 141 +#define WLC_SET_BAND 142 +#define WLC_SCB_DEAUTHENTICATE 143 +#define WLC_GET_SHORTSLOT 144 +#define WLC_GET_SHORTSLOT_OVERRIDE 145 +#define WLC_SET_SHORTSLOT_OVERRIDE 146 +#define WLC_GET_SHORTSLOT_RESTRICT 147 +#define WLC_SET_SHORTSLOT_RESTRICT 148 +#define WLC_GET_GMODE_PROTECTION 149 +#define WLC_GET_GMODE_PROTECTION_OVERRIDE 150 +#define WLC_SET_GMODE_PROTECTION_OVERRIDE 151 +#define WLC_UPGRADE 152 +#define WLC_GET_MRATE 153 +#define WLC_SET_MRATE 154 +#define WLC_GET_IGNORE_BCNS 155 +#define WLC_SET_IGNORE_BCNS 156 +#define WLC_GET_SCB_TIMEOUT 157 +#define WLC_SET_SCB_TIMEOUT 158 +#define WLC_GET_ASSOCLIST 159 +#define WLC_GET_CLK 160 +#define WLC_SET_CLK 161 +#define WLC_GET_UP 162 +#define WLC_OUT 163 +#define WLC_GET_WPA_AUTH 164 +#define WLC_SET_WPA_AUTH 165 +#define WLC_GET_UCFLAGS 166 +#define WLC_SET_UCFLAGS 167 +#define WLC_GET_PWRIDX 168 +#define WLC_SET_PWRIDX 169 +#define WLC_GET_TSSI 170 +#define WLC_GET_SUP_RATESET_OVERRIDE 171 +#define WLC_SET_SUP_RATESET_OVERRIDE 172 +#define WLC_SET_FAST_TIMER 173 +#define WLC_GET_FAST_TIMER 174 +#define WLC_SET_SLOW_TIMER 175 +#define WLC_GET_SLOW_TIMER 176 +#define WLC_DUMP_PHYREGS 177 +#define WLC_GET_GMODE_PROTECTION_CONTROL 178 +#define WLC_SET_GMODE_PROTECTION_CONTROL 179 +#define WLC_GET_PHYLIST 180 +#define WLC_ENCRYPT_STRENGTH 181 /* ndis only */ +#define WLC_DECRYPT_STATUS 182 /* ndis only */ +#define WLC_GET_KEY_SEQ 183 +#define WLC_GET_SCAN_CHANNEL_TIME 184 +#define WLC_SET_SCAN_CHANNEL_TIME 185 +#define WLC_GET_SCAN_UNASSOC_TIME 186 +#define WLC_SET_SCAN_UNASSOC_TIME 187 +#define WLC_GET_SCAN_HOME_TIME 188 +#define WLC_SET_SCAN_HOME_TIME 189 +#define WLC_GET_SCAN_PASSES 190 +#define WLC_SET_SCAN_PASSES 191 +#define WLC_GET_PRB_RESP_TIMEOUT 192 +#define WLC_SET_PRB_RESP_TIMEOUT 193 +#define WLC_GET_ATTEN 194 +#define WLC_SET_ATTEN 195 +#define WLC_GET_SHMEM 196 /* diag */ +#define WLC_SET_SHMEM 197 /* diag */ +#define WLC_GET_GMODE_PROTECTION_CTS 198 +#define WLC_SET_GMODE_PROTECTION_CTS 199 +#define WLC_SET_TKIP_MIC_FLAG 200 +#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201 +#define WLC_TKIP_COUNTERMEASURES 202 +#define WLC_GET_PIOMODE 203 +#define WLC_SET_PIOMODE 204 +#define WLC_SET_LED 209 +#define WLC_GET_LED 210 +#define WLC_GET_INTERFERENCE_MODE 211 +#define WLC_SET_INTERFERENCE_MODE 212 +#define WLC_GET_CHANNEL_QA 213 +#define WLC_START_CHANNEL_QA 214 +#define WLC_GET_CHANNEL_SEL 215 +#define WLC_START_CHANNEL_SEL 216 +#define WLC_GET_VALID_CHANNELS 217 +#define WLC_GET_FAKEFRAG 218 +#define WLC_SET_FAKEFRAG 219 +#define WLC_GET_PWROUT_PERCENTAGE 220 +#define WLC_SET_PWROUT_PERCENTAGE 221 +#define WLC_SET_BAD_FRAME_PREEMPT 222 +#define WLC_GET_BAD_FRAME_PREEMPT 223 +#define WLC_SET_LEAP_LIST 224 +#define WLC_GET_LEAP_LIST 225 +#define WLC_GET_CWMIN 226 +#define WLC_SET_CWMIN 227 +#define WLC_GET_CWMAX 228 +#define WLC_SET_CWMAX 229 +#define WLC_GET_WET 230 +#define WLC_SET_WET 231 +#define WLC_GET_KEY_PRIMARY 235 +#define WLC_SET_KEY_PRIMARY 236 +#define WLC_SCAN_WITH_CALLBACK 240 +#define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */ +#define WLC_SET_CS_SCAN_TIMER 248 +#define WLC_GET_CS_SCAN_TIMER 249 +#define WLC_CURRENT_PWR 256 +#define WLC_GET_CHANNELS_IN_COUNTRY 260 +#define WLC_GET_COUNTRY_LIST 261 +#define WLC_GET_VAR 262 /* get value of named variable */ +#define WLC_SET_VAR 263 /* set named variable to value */ +#define WLC_NVRAM_GET 264 +#define WLC_NVRAM_SET 265 +#define WLC_SET_WSEC_PMK 268 +#define WLC_GET_AUTH_MODE 269 +#define WLC_SET_AUTH_MODE 270 +#define WLC_LAST 273 /* do not change - use get_var/set_var */ + +/* + * Minor kludge alert: + * Duplicate a few definitions that irelay requires from epiioctl.h here + * so caller doesn't have to include this file and epiioctl.h . + * If this grows any more, it would be time to move these irelay-specific + * definitions out of the epiioctl.h and into a separate driver common file. + */ +#ifndef EPICTRL_COOKIE +#define EPICTRL_COOKIE 0xABADCEDE +#endif + +/* vx wlc ioctl's offset */ +#define CMN_IOCTL_OFF 0x180 + +/* + * custom OID support + * + * 0xFF - implementation specific OID + * 0xE4 - first byte of Broadcom PCI vendor ID + * 0x14 - second byte of Broadcom PCI vendor ID + * 0xXX - the custom OID number + */ + +/* begin 0x1f values beyond the start of the ET driver range. */ +#define WL_OID_BASE 0xFFE41420 + +/* NDIS overrides */ +#define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE) +#define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK) +#define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK) +#define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH) +#define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS) + +#define WL_DECRYPT_STATUS_SUCCESS 1 +#define WL_DECRYPT_STATUS_FAILURE 2 +#define WL_DECRYPT_STATUS_UNKNOWN 3 + +/* allows user-mode app to poll the status of USB image upgrade */ +#define WLC_UPGRADE_SUCCESS 0 +#define WLC_UPGRADE_PENDING 1 + +/* Bit masks for radio disabled status - returned by WL_GET_RADIO */ +#define WL_RADIO_SW_DISABLE (1<<0) +#define WL_RADIO_HW_DISABLE (1<<1) + +/* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */ +#define WL_TXPWR_OVERRIDE (1<<31) + + +/* Bus types */ +#define WL_SB_BUS 0 /* Silicon Backplane */ +#define WL_PCI_BUS 1 /* PCI target */ +#define WL_PCMCIA_BUS 2 /* PCMCIA target */ + +/* band types */ +#define WLC_BAND_AUTO 0 /* auto-select */ +#define WLC_BAND_A 1 /* "a" band (5 Ghz) */ +#define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */ + +/* MAC list modes */ +#define WLC_MACMODE_DISABLED 0 /* MAC list disabled */ +#define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */ +#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */ + + +/* 54g modes (basic bits may still be overridden) */ +#define GMODE_LEGACY_B 0 /* Rateset: 1b, 2b, 5.5, 11 */ + /* Preamble: Long */ + /* Shortslot: Off */ +#define GMODE_AUTO 1 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ + /* Extended Rateset: 6, 9, 12, 48 */ + /* Preamble: Long */ + /* Shortslot: Auto */ +#define GMODE_ONLY 2 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 */ + /* Extended Rateset: 6b, 9, 12b, 48 */ + /* Preamble: Short required */ + /* Shortslot: Auto */ +#define GMODE_B_DEFERRED 3 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ + /* Extended Rateset: 6, 9, 12, 48 */ + /* Preamble: Long */ + /* Shortslot: On */ +#define GMODE_PERFORMANCE 4 /* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 */ + /* Preamble: Short required */ + /* Shortslot: On and required */ +#define GMODE_LRS 5 /* Rateset: 1b, 2b, 5.5b, 11b */ + /* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 */ + /* Preamble: Long */ + /* Shortslot: Auto */ +#define GMODE_MAX 6 + + +/* values for PLCPHdr_override */ +#define WLC_PLCP_AUTO -1 +#define WLC_PLCP_SHORT 0 +#define WLC_PLCP_LONG 1 + +/* values for g_protection_override */ +#define WLC_G_PROTECTION_AUTO -1 +#define WLC_G_PROTECTION_OFF 0 +#define WLC_G_PROTECTION_ON 1 + +/* values for g_protection_control */ +#define WLC_G_PROTECTION_CTL_OFF 0 +#define WLC_G_PROTECTION_CTL_LOCAL 1 +#define WLC_G_PROTECTION_CTL_OVERLAP 2 + +/* Values for PM */ +#define PM_OFF 0 +#define PM_MAX 1 +#define PM_FAST 2 + +/* interference mitigation options */ +#define INTERFERE_NONE 0 /* off */ +#define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */ +#define WLAN_MANUAL 2 /* ACI: no auto detection */ +#define WLAN_AUTO 3 /* ACI: auto - detact */ + +/* Message levels */ +#define WL_ERROR_VAL 0x0001 +#define WL_TRACE_VAL 0x0002 +#define WL_PRHDRS_VAL 0x0004 +#define WL_PRPKT_VAL 0x0008 +#define WL_INFORM_VAL 0x0010 +#define WL_TMP_VAL 0x0020 +#define WL_OID_VAL 0x0040 +#define WL_RATE_VAL 0x0080 +#define WL_ASSOC_VAL 0x0100 +#define WL_PRUSR_VAL 0x0200 +#define WL_PS_VAL 0x0400 +#define WL_TXPWR_VAL 0x0800 +#define WL_GMODE_VAL 0x1000 +#define WL_DUAL_VAL 0x2000 +#define WL_WSEC_VAL 0x4000 +#define WL_WSEC_DUMP_VAL 0x8000 +#define WL_LOG_VAL 0x10000 +#define WL_NRSSI_VAL 0x20000 +#define WL_LOFT_VAL 0x40000 +#define WL_REGULATORY_VAL 0x80000 +#define WL_ACI_VAL 0x100000 + + +/* 802.11h enforcement levels */ +#define SPECT_MNGMT_OFF 0 /* 11h disabled */ +#define SPECT_MNGMT_LOOSE 1 /* Allow scan lists to contain non-11h AP */ + /* when 11h is enabled */ +#define SPECT_MNGMT_STRICT 2 /* Prine out non-11h APs from scan list */ + + + +/* max # of leds supported by GPIO (gpio pin# == led index#) */ +#define WL_LED_NUMGPIO 16 /* gpio 0-15 */ + +/* led per-pin behaviors */ +#define WL_LED_OFF 0 /* always off */ +#define WL_LED_ON 1 /* always on */ +#define WL_LED_ACTIVITY 2 /* activity */ +#define WL_LED_RADIO 3 /* radio enabled */ +#define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */ +#define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */ +#define WL_LED_BGMODE 6 /* on if gmode, off if bmode */ +#define WL_LED_WI1 7 +#define WL_LED_WI2 8 +#define WL_LED_WI3 9 +#define WL_LED_ASSOC 10 /* associated state indicator */ +#define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */ +#define WL_LED_NUMBEHAVIOR 12 + +/* led behavior numeric value format */ +#define WL_LED_BEH_MASK 0x7f /* behavior mask */ +#define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */ + + +/* maximum channels */ +#define WL_NUMCHANNELS 64 /* max # of channels in the band */ + +/* rate check */ +#define WL_RATE_OFDM(r) (((r) & 0x7f) == 12 || ((r) & 0x7f) == 18 || \ + ((r) & 0x7f) == 24 || ((r) & 0x7f) == 36 || \ + ((r) & 0x7f) == 48 || ((r) & 0x7f) == 72 || \ + ((r) & 0x7f) == 96 || ((r) & 0x7f) == 108) + +/* WDS link local endpoint WPA role */ +#define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */ +#define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */ +#define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */ + +/* afterburner_override */ +#define ABO_AUTO -1 /* auto - no override */ +#define ABO_OFF 0 /* force afterburner off */ +#define ABO_ON 1 /* force afterburner on */ + +#define GMODE_AFTERBURNER 6 + +#undef PACKED + +#endif /* _wlioctl_h_ */ diff --git a/openwrt/package/wlcompat/src/include/wlutils.h b/openwrt/package/wlcompat/src/include/wlutils.h new file mode 100644 index 00000000000..07e2536ca3c --- /dev/null +++ b/openwrt/package/wlcompat/src/include/wlutils.h @@ -0,0 +1,59 @@ +/* + * Broadcom wireless network adapter utility functions + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#ifndef _wlutils_h_ +#define _wlutils_h_ + +#include <typedefs.h> +#include <wlioctl.h> + +/* + * Pass a wlioctl request to the specified interface. + * @param name interface name + * @param cmd WLC_GET_MAGIC <= cmd < WLC_LAST + * @param buf buffer for passing in and/or receiving data + * @param len length of buf + * @return >= 0 if successful or < 0 otherwise + */ +extern int wl_ioctl(char *name, int cmd, void *buf, int len); + +/* + * Get the MAC (hardware) address of the specified interface. + * @param name interface name + * @param hwaddr 6-byte buffer for receiving address + * @return >= 0 if successful or < 0 otherwise + */ +extern int wl_hwaddr(char *name, unsigned char *hwaddr); + +/* + * Probe the specified interface. + * @param name interface name + * @return >= 0 if a Broadcom wireless device or < 0 otherwise + */ +extern int wl_probe(char *name); + +/* + * Set/Get named variable. + * @param name interface name + * @param var variable name + * @param val variable value/buffer + * @param len variable value/buffer length + * @return success == 0, failure != 0 + */ +extern int wl_set_val(char *name, char *var, void *val, int len); +extern int wl_get_val(char *name, char *var, void *val, int len); +extern int wl_set_int(char *name, char *var, int val); +extern int wl_get_int(char *name, char *var, int *val); + +#endif /* _wlutils_h_ */ diff --git a/openwrt/target/linux/package/wlcompat/wlcompat.c b/openwrt/package/wlcompat/wlcompat.c similarity index 100% rename from openwrt/target/linux/package/wlcompat/wlcompat.c rename to openwrt/package/wlcompat/wlcompat.c diff --git a/openwrt/target/linux/package/wlcompat/Config.in b/openwrt/target/linux/package/wlcompat/Config.in deleted file mode 100644 index 00774c17929..00000000000 --- a/openwrt/target/linux/package/wlcompat/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config PACKAGE_KMOD_WLCOMPAT - prompt "kmod-wlcompat..................... Wrapper providing Wireless Extensions for Broadcom wl module" - tristate - default y - depends PACKAGE_KMOD_BRCM_WL - help - A wrapper module, that provides Wireless Extension support for the - proprietary Broadcom wl module. - -config PACKAGE_KMOD_WLCOMPAT_DEBUG - prompt "kmod-wlcompat-debug............... Wrapper providing Wireless Extensions for Broadcom wl module (debug)" - tristate - default m - depends PACKAGE_KMOD_BRCM_WL - help - A wrapper module, that provides Wireless Extension support for the - proprietary Broadcom wl module. (debug version) diff --git a/openwrt/target/linux/package/wlcompat/Makefile b/openwrt/target/linux/package/wlcompat/Makefile deleted file mode 100644 index cdc02ea229c..00000000000 --- a/openwrt/target/linux/package/wlcompat/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME := kmod-wlcompat -PKG_RELEASE := 3 -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_WLCOMPAT,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) -$(eval $(call PKG_template,KMOD_WLCOMPAT_DEBUG,$(PKG_NAME)-debug,$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -WLCOMPAT_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \ - -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \ - -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -funsigned-char -nostdinc \ - -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -I$(STAGING_DIR)/usr/include -c - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/wlcompat.o $(PKG_BUILD_DIR)/wlcompat-debug.o - touch $@ - -$(PKG_BUILD_DIR)/wlcompat.o: $(PKG_BUILD_DIR)/.prepared - $(TARGET_CC) $(WLCOMPAT_FLAGS) -o $@ wlcompat.c - -$(PKG_BUILD_DIR)/wlcompat-debug.o: $(PKG_BUILD_DIR)/.prepared - $(TARGET_CC) -DDEBUG $(WLCOMPAT_FLAGS) -o $@ wlcompat.c - -$(IPKG_KMOD_WLCOMPAT): $(PKG_BUILD_DIR)/wlcompat.o - mkdir -p $(IDIR_KMOD_WLCOMPAT)/etc/modules.d - echo "wlcompat" > $(IDIR_KMOD_WLCOMPAT)/etc/modules.d/30-wlcompat - mkdir -p $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/wlcompat.o $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_WLCOMPAT) $(PACKAGE_DIR) - -$(IPKG_KMOD_WLCOMPAT_DEBUG): $(PKG_BUILD_DIR)/wlcompat-debug.o - mkdir -p $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/wlcompat-debug.o $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION)/ - $(IPKG_BUILD) $(IDIR_KMOD_WLCOMPAT_DEBUG) $(PACKAGE_DIR) - diff --git a/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat-debug.control b/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat-debug.control deleted file mode 100644 index 583b05b926c..00000000000 --- a/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat-debug.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: kmod-wlcompat-debug -Priority: optional -Section: sys -Depends: kmod-brcm-wl -Description: Compatibility module for using the Wireless Extension with broadcom's wl (debug) diff --git a/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat.control b/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat.control deleted file mode 100644 index b9857172f00..00000000000 --- a/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: kmod-wlcompat -Priority: optional -Section: sys -Depends: kmod-brcm-wl -Description: Compatibility module for using the Wireless Extension with broadcom's wl From e68bb5af4a4f2892c77d9a098a0ebc314916cd6f Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 18 Jun 2006 22:30:14 +0000 Subject: [PATCH 224/757] fix typo in brcm-2.4 system code SVN-Revision: 4003 --- openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch index b17b5439452..e1bd00bae2d 100644 --- a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch +++ b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch @@ -11723,7 +11723,7 @@ diff -urN linux.old/arch/mips/bcm947xx/sbpci.c linux.dev/arch/mips/bcm947xx/sbpc + return -1; + } + -+ if ((chip == 0x4710) && (chiprev == 0)) ++ if ((chip == 0x4310) && (chiprev == 0)) + pci_disabled = TRUE; + + sb = (sbconfig_t *)((ulong) pci + SBCONFIGOFF); From efe08c7da9d11781f5ca3b2bb69d09601e54eac3 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 19 Jun 2006 00:18:32 +0000 Subject: [PATCH 225/757] move source file to src/ and let the kernel tree build the modules. SVN-Revision: 4004 --- openwrt/package/wlcompat/Makefile | 28 ++++++++++++++----- openwrt/package/wlcompat/src/Makefile | 19 +++++++++++++ openwrt/package/wlcompat/{ => src}/wlcompat.c | 0 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 openwrt/package/wlcompat/src/Makefile rename openwrt/package/wlcompat/{ => src}/wlcompat.c (100%) diff --git a/openwrt/package/wlcompat/Makefile b/openwrt/package/wlcompat/Makefile index 4c3632d9810..c6dc6d894ff 100644 --- a/openwrt/package/wlcompat/Makefile +++ b/openwrt/package/wlcompat/Makefile @@ -1,6 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk PKG_NAME:=kmod-wlcompat PKG_RELEASE:=3 @@ -9,11 +10,6 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) include $(TOPDIR)/package/rules.mk -WLCOMPAT_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \ - -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \ - -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -funsigned-char -nostdinc \ - -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(STAGING_DIR)/usr/include -I./src/include - define Package/kmod-wlcompat SECTION:=drivers CATEGORY:=Drivers @@ -33,9 +29,27 @@ A wrapper module, that provides Wireless Extension support for the \\\ proprietary Broadcom wl module. endef +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + define Build/Compile - $(TARGET_CC) -c -o $(PKG_BUILD_DIR)/wlcompat.o $(WLCOMPAT_FLAGS) wlcompat.c - $(TARGET_CC) -c -o $(PKG_BUILD_DIR)/wlcompat-debug.o $(WLCOMPAT_FLAGS) -DDEBUG wlcompat.c + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + PATH="$(TARGET_PATH)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="-DDEBUG -I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(PKG_BUILD_DIR)/include" \ + modules + mv $(PKG_BUILD_DIR)/wlcompat.o $(PKG_BUILD_DIR)/wlcompat-debug.o + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + PATH="$(TARGET_PATH)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="-I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(PKG_BUILD_DIR)/include" \ + modules endef define Package/kmod-wlcompat/install diff --git a/openwrt/package/wlcompat/src/Makefile b/openwrt/package/wlcompat/src/Makefile new file mode 100644 index 00000000000..4290d9a33a7 --- /dev/null +++ b/openwrt/package/wlcompat/src/Makefile @@ -0,0 +1,19 @@ +# $Id$ +# +# Makefile for diag driver +# +# Copyright (C) 2005 Felix Fietkau <nbd@openwrt.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 the Free Software Foundation; either version +# 2 of the License, or (at your option) any later version. +# + +obj-m := wlcompat.o + +ifeq ($(MAKING_MODULES),1) +export-objs := wlcompat.o + +-include $(TOPDIR)/Rules.make +endif diff --git a/openwrt/package/wlcompat/wlcompat.c b/openwrt/package/wlcompat/src/wlcompat.c similarity index 100% rename from openwrt/package/wlcompat/wlcompat.c rename to openwrt/package/wlcompat/src/wlcompat.c From 6f50a3edc553fc1a64b08e1b91faa2e97f4c7d2b Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 19 Jun 2006 02:05:27 +0000 Subject: [PATCH 226/757] fix module params on 2.6.17, suppress warnings. SVN-Revision: 4005 --- openwrt/package/switch/src/switch-adm.c | 14 +++++++++++--- openwrt/package/switch/src/switch-core.c | 8 ++++---- openwrt/package/switch/src/switch-robo.c | 10 +++++++--- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/openwrt/package/switch/src/switch-adm.c b/openwrt/package/switch/src/switch-adm.c index 8d271200186..921ad50a4c0 100644 --- a/openwrt/package/switch/src/switch-adm.c +++ b/openwrt/package/switch/src/switch-adm.c @@ -49,11 +49,19 @@ static int force = 0; MODULE_AUTHOR("Felix Fietkau <openwrt@nbd.name>"); MODULE_LICENSE("GPL"); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) +module_param(eecs, int, 0); +module_param(eesk, int, 0); +module_param(eedi, int, 0); +module_param(eerc, int, 0); +module_param(force, int, 0); +#else MODULE_PARM(eecs, "i"); MODULE_PARM(eesk, "i"); MODULE_PARM(eedi, "i"); MODULE_PARM(eerc, "i"); MODULE_PARM(force, "i"); +#endif /* Minimum timing constants */ #define EECK_EDGE_TIME 3 /* 3us - max(adm 2.5us, 93c 1us) */ @@ -484,7 +492,7 @@ static int handle_counters(void *driver, char *buf, int nr) return len; } -static int detect_adm() +static int detect_adm(void) { int ret = 0; @@ -525,7 +533,7 @@ static int detect_adm() return ret; } -static int __init adm_init() +static int __init adm_init(void) { switch_config cfg[] = { {"registers", handle_registers, NULL}, @@ -561,7 +569,7 @@ static int __init adm_init() return switch_register_driver(&driver); } -static void __exit adm_exit() +static void __exit adm_exit(void) { switch_unregister_driver(DRIVER_NAME); } diff --git a/openwrt/package/switch/src/switch-core.c b/openwrt/package/switch/src/switch-core.c index 6b59b9ba24a..7bf705afe47 100644 --- a/openwrt/package/switch/src/switch-core.c +++ b/openwrt/package/switch/src/switch-core.c @@ -64,8 +64,8 @@ static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff static ssize_t switch_proc_write(struct file *file, const char *buf, size_t count, void *data); static struct file_operations switch_proc_fops = { - read: switch_proc_read, - write: switch_proc_write + .read = (ssize_t (*) (struct file *, char __user *, size_t, loff_t *))switch_proc_read, + .write = (ssize_t (*) (struct file *, const char __user *, size_t, loff_t *))switch_proc_write }; static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos) @@ -436,7 +436,7 @@ void switch_unregister_driver(char *name) { } } -static int __init switch_init() +static int __init switch_init(void) { if ((switch_root = proc_mkdir("switch", NULL)) == NULL) { printk("%s: proc_mkdir failed.\n", __FILE__); @@ -448,7 +448,7 @@ static int __init switch_init() return 0; } -static void __exit switch_exit() +static void __exit switch_exit(void) { remove_proc_entry("switch", NULL); } diff --git a/openwrt/package/switch/src/switch-robo.c b/openwrt/package/switch/src/switch-robo.c index eb93f4b98d1..32cf2b39603 100644 --- a/openwrt/package/switch/src/switch-robo.c +++ b/openwrt/package/switch/src/switch-robo.c @@ -162,6 +162,7 @@ static int robo_reg(__u8 page, __u8 reg, __u8 op) return 0; } +/* static void robo_read(__u8 page, __u8 reg, __u16 *val, int count) { int i; @@ -171,6 +172,7 @@ static void robo_read(__u8 page, __u8 reg, __u16 *val, int count) for (i = 0; i < count; i++) val[i] = mdio_read(ROBO_PHY_ADDR, REG_MII_DATA0 + i); } +*/ static __u16 robo_read16(__u8 page, __u8 reg) { @@ -205,7 +207,7 @@ static void robo_write32(__u8 page, __u8 reg, __u32 val32) } /* checks that attached switch is 5325E/5350 */ -static int robo_vlan5350() +static int robo_vlan5350(void) { /* set vlan access id to 15 and read it back */ __u16 val16 = 15; @@ -220,7 +222,9 @@ static int robo_vlan5350() static int robo_probe(char *devname) { struct ethtool_drvinfo info; +/* int i; +*/ __u32 phyid; printk("Probing device %s: ", devname); @@ -426,7 +430,7 @@ static int handle_reset(void *driver, char *buf, int nr) return 0; } -static int __init robo_init() +static int __init robo_init(void) { int notfound = 1; @@ -466,7 +470,7 @@ static int __init robo_init() } } -static void __exit robo_exit() +static void __exit robo_exit(void) { switch_unregister_driver(DRIVER_NAME); kfree(device); From 77f666e354c517dad0368fcd654c3a7081f1c34a Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Mon, 19 Jun 2006 11:17:46 +0000 Subject: [PATCH 227/757] fix the Aruba ethernet drivers for 2.6.17 SVN-Revision: 4006 --- .../linux/aruba-2.6/patches/000-aruba.patch | 7 +- .../aruba-2.6/patches/010-ar2313_enet.patch | 1069 +++++++++-------- 2 files changed, 548 insertions(+), 528 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch index 52fb3bab0a5..83f023cfe06 100644 --- a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch +++ b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch @@ -1200,7 +1200,7 @@ diff -Nur linux-2.6.17/drivers/net/natsemi.c linux-2.6.17-owrt/drivers/net/natse diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/rc32434_eth.c --- linux-2.6.17/drivers/net/rc32434_eth.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.17-owrt/drivers/net/rc32434_eth.c 2006-06-18 12:44:28.000000000 +0200 -@@ -0,0 +1,1268 @@ +@@ -0,0 +1,1273 @@ +/************************************************************************** + * + * BRIEF MODULE DESCRIPTION @@ -1242,6 +1242,7 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/r + */ + +#include <linux/config.h> ++#include <linux/version.h> +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/moduleparam.h> @@ -1287,7 +1288,11 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/r +#define MII_CLOCK 1250000 /* no more than 2.5MHz */ +static char mac0[18] = "08:00:06:05:40:01"; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++module_param_string(mac0, mac0, 18, 0); ++#else +MODULE_PARM(mac0, "c18"); ++#endif +MODULE_PARM_DESC(mac0, "MAC address for RC32434 ethernet0"); + +static struct rc32434_if_t { diff --git a/openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch b/openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch index 01fe26fac54..b5ef4d324a4 100644 --- a/openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch +++ b/openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch @@ -1,525 +1,12 @@ -diff -urN linux.old/drivers/net/Kconfig linux.net/drivers/net/Kconfig ---- linux.old/drivers/net/Kconfig 2006-01-21 20:15:08.279272000 +0100 -+++ linux.net/drivers/net/Kconfig 2006-01-30 01:18:34.910315000 +0100 -@@ -176,6 +176,13 @@ - - source "drivers/net/arm/Kconfig" - -+ -+config AR2313 -+ tristate "AR2313 Ethernet support" -+ depends on NET_ETHERNET && MACH_ARUBA -+ help -+ Support for the AR2313 Ethernet part on Aruba AP60/61 -+ - config IDT_RC32434_ETH - tristate "IDT RC32434 Local Ethernet support" - depends on NET_ETHERNET -diff -urN linux.old/drivers/net/Makefile linux.net/drivers/net/Makefile ---- linux.old/drivers/net/Makefile 2006-01-21 20:15:08.383226000 +0100 -+++ linux.net/drivers/net/Makefile 2006-01-30 01:18:34.914315250 +0100 -@@ -35,6 +35,7 @@ - - obj-$(CONFIG_OAKNET) += oaknet.o 8390.o - -+obj-$(CONFIG_AR2313) += ar2313.o - obj-$(CONFIG_IDT_RC32434_ETH) += rc32434_eth.o - obj-$(CONFIG_DGRS) += dgrs.o - obj-$(CONFIG_VORTEX) += 3c59x.o -diff -urN linux.old/drivers/net/ar2313/ar2313.h linux.net/drivers/net/ar2313/ar2313.h ---- linux.old/drivers/net/ar2313/ar2313.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.net/drivers/net/ar2313/ar2313.h 2006-01-25 00:35:55.000000000 +0100 -@@ -0,0 +1,190 @@ -+#ifndef _AR2313_H_ -+#define _AR2313_H_ -+ -+#include <linux/config.h> -+#include <asm/bootinfo.h> -+#include "platform.h" -+ -+extern unsigned long mips_machtype; -+ -+#undef ETHERNET_BASE -+#define ETHERNET_BASE ar_eth_base -+#define ETHERNET_SIZE 0x00100000 -+#define ETHERNET_MACS 2 -+ -+#undef DMA_BASE -+#define DMA_BASE ar_dma_base -+#define DMA_SIZE 0x00100000 -+ -+ -+/* -+ * probe link timer - 5 secs -+ */ -+#define LINK_TIMER (5*HZ) -+ -+/* -+ * Interrupt register base address -+ */ -+#define INTERRUPT_BASE PHYS_TO_K1(ar_int_base) -+ -+/* -+ * Reset Register -+ */ -+#define AR531X_RESET (AR531X_RESETTMR + 0x0020) -+#define RESET_SYSTEM 0x00000001 /* cold reset full system */ -+#define RESET_PROC 0x00000002 /* cold reset MIPS core */ -+#define RESET_WLAN0 0x00000004 /* cold reset WLAN MAC and BB */ -+#define RESET_EPHY0 0x00000008 /* cold reset ENET0 phy */ -+#define RESET_EPHY1 0x00000010 /* cold reset ENET1 phy */ -+#define RESET_ENET0 0x00000020 /* cold reset ENET0 mac */ -+#define RESET_ENET1 0x00000040 /* cold reset ENET1 mac */ -+ -+#define IS_DMA_TX_INT(X) (((X) & (DMA_STATUS_TI)) != 0) -+#define IS_DMA_RX_INT(X) (((X) & (DMA_STATUS_RI)) != 0) -+#define IS_DRIVER_OWNED(X) (((X) & (DMA_TX_OWN)) == 0) -+ -+#ifndef K1_TO_PHYS -+// hack -+#define K1_TO_PHYS(x) (((unsigned int)(x)) & 0x1FFFFFFF) /* kseg1 to physical */ -+#endif -+ -+#ifndef PHYS_TO_K1 -+// hack -+#define PHYS_TO_K1(x) (((unsigned int)(x)) | 0xA0000000) /* physical to kseg1 */ -+#endif -+ -+#define AR2313_TX_TIMEOUT (HZ/4) -+ -+/* -+ * Rings -+ */ -+#define DSC_RING_ENTRIES_SIZE (AR2313_DESCR_ENTRIES * sizeof(struct desc)) -+#define DSC_NEXT(idx) ((idx + 1) & (AR2313_DESCR_ENTRIES - 1)) -+ -+static inline int tx_space (u32 csm, u32 prd) -+{ -+ return (csm - prd - 1) & (AR2313_DESCR_ENTRIES - 1); -+} -+ -+#if MAX_SKB_FRAGS -+#define TX_RESERVED (MAX_SKB_FRAGS+1) /* +1 for message header */ -+#define tx_ring_full(csm, prd) (tx_space(csm, prd) <= TX_RESERVED) -+#else -+#define tx_ring_full 0 -+#endif -+ -+#define AR2313_MBGET 2 -+#define AR2313_MBSET 3 -+#define AR2313_PCI_RECONFIG 4 -+#define AR2313_PCI_DUMP 5 -+#define AR2313_TEST_PANIC 6 -+#define AR2313_TEST_NULLPTR 7 -+#define AR2313_READ_DATA 8 -+#define AR2313_WRITE_DATA 9 -+#define AR2313_GET_VERSION 10 -+#define AR2313_TEST_HANG 11 -+#define AR2313_SYNC 12 -+ -+ -+struct ar2313_cmd { -+ u32 cmd; -+ u32 address; /* virtual address of image */ -+ u32 length; /* size of image to download */ -+ u32 mailbox; /* mailbox to get/set */ -+ u32 data[2]; /* contents of mailbox to read/write */ -+}; -+ -+ -+/* -+ * Struct private for the Sibyte. -+ * -+ * Elements are grouped so variables used by the tx handling goes -+ * together, and will go into the same cache lines etc. in order to -+ * avoid cache line contention between the rx and tx handling on SMP. -+ * -+ * Frequently accessed variables are put at the beginning of the -+ * struct to help the compiler generate better/shorter code. -+ */ -+struct ar2313_private -+{ -+ int version; -+ u32 mb[2]; -+ -+ volatile ETHERNET_STRUCT *eth_regs; -+ volatile DMA *dma_regs; -+ volatile u32 *int_regs; -+ -+ spinlock_t lock; /* Serialise access to device */ -+ -+ /* -+ * RX and TX descriptors, must be adjacent -+ */ -+ ar2313_descr_t *rx_ring; -+ ar2313_descr_t *tx_ring; -+ -+ -+ struct sk_buff **rx_skb; -+ struct sk_buff **tx_skb; -+ -+ /* -+ * RX elements -+ */ -+ u32 rx_skbprd; -+ u32 cur_rx; -+ -+ /* -+ * TX elements -+ */ -+ u32 tx_prd; -+ u32 tx_csm; -+ -+ /* -+ * Misc elements -+ */ -+ int board_idx; -+ char name[48]; -+ struct net_device_stats stats; -+ struct { -+ u32 address; -+ u32 length; -+ char *mapping; -+ } desc; -+ -+ -+ struct timer_list link_timer; -+ unsigned short phy; /* merlot phy = 1, samsung phy = 0x1f */ -+ unsigned short mac; -+ unsigned short link; /* 0 - link down, 1 - link up */ -+ u16 phyData; -+ -+ struct tasklet_struct rx_tasklet; -+ int unloading; -+}; -+ -+ -+/* -+ * Prototypes -+ */ -+static int ar2313_init(struct net_device *dev); -+#ifdef TX_TIMEOUT -+static void ar2313_tx_timeout(struct net_device *dev); -+#endif -+#if 0 -+static void ar2313_multicast_list(struct net_device *dev); -+#endif -+static int ar2313_restart(struct net_device *dev); -+#if DEBUG -+static void ar2313_dump_regs(struct net_device *dev); -+#endif -+static void ar2313_load_rx_ring(struct net_device *dev, int bufs); -+static irqreturn_t ar2313_interrupt(int irq, void *dev_id, struct pt_regs *regs); -+static int ar2313_open(struct net_device *dev); -+static int ar2313_start_xmit(struct sk_buff *skb, struct net_device *dev); -+static int ar2313_close(struct net_device *dev); -+static int ar2313_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); -+static void ar2313_init_cleanup(struct net_device *dev); -+static int ar2313_setup_timer(struct net_device *dev); -+static void ar2313_link_timer_fn(unsigned long data); -+static void ar2313_check_link(struct net_device *dev); -+static struct net_device_stats *ar2313_get_stats(struct net_device *dev); -+#endif /* _AR2313_H_ */ -diff -urN linux.old/drivers/net/ar2313/ar2313_msg.h linux.net/drivers/net/ar2313/ar2313_msg.h ---- linux.old/drivers/net/ar2313/ar2313_msg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.net/drivers/net/ar2313/ar2313_msg.h 2006-01-24 22:57:25.000000000 +0100 -@@ -0,0 +1,17 @@ -+#ifndef _AR2313_MSG_H_ -+#define _AR2313_MSG_H_ -+ -+#define AR2313_MTU 1692 -+#define AR2313_PRIOS 1 -+#define AR2313_QUEUES (2*AR2313_PRIOS) -+ -+#define AR2313_DESCR_ENTRIES 64 -+ -+typedef struct { -+ volatile unsigned int status; // OWN, Device control and status. -+ volatile unsigned int devcs; // pkt Control bits + Length -+ volatile unsigned int addr; // Current Address. -+ volatile unsigned int descr; // Next descriptor in chain. -+} ar2313_descr_t; -+ -+#endif /* _AR2313_MSG_H_ */ -diff -urN linux.old/drivers/net/ar2313/dma.h linux.net/drivers/net/ar2313/dma.h ---- linux.old/drivers/net/ar2313/dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.net/drivers/net/ar2313/dma.h 2006-01-24 22:58:45.000000000 +0100 -@@ -0,0 +1,135 @@ -+#ifndef __ARUBA_DMA_H__ -+#define __ARUBA_DMA_H__ -+ -+/******************************************************************************* -+ * -+ * Copyright 2002 Integrated Device Technology, Inc. -+ * All rights reserved. -+ * -+ * DMA register definition. -+ * -+ * File : $Id: dma.h,v 1.3 2002/06/06 18:34:03 astichte Exp $ -+ * -+ * Author : ryan.holmQVist@idt.com -+ * Date : 20011005 -+ * Update : -+ * $Log: dma.h,v $ -+ * Revision 1.3 2002/06/06 18:34:03 astichte -+ * Added XXX_PhysicalAddress and XXX_VirtualAddress -+ * -+ * Revision 1.2 2002/06/05 18:30:46 astichte -+ * Removed IDTField -+ * -+ * Revision 1.1 2002/05/29 17:33:21 sysarch -+ * jba File moved from vcode/include/idt/acacia -+ * -+ * -+ ******************************************************************************/ -+ -+#define AR_BIT(x) (1 << (x)) -+#define DMA_RX_ERR_CRC AR_BIT(1) -+#define DMA_RX_ERR_DRIB AR_BIT(2) -+#define DMA_RX_ERR_MII AR_BIT(3) -+#define DMA_RX_EV2 AR_BIT(5) -+#define DMA_RX_ERR_COL AR_BIT(6) -+#define DMA_RX_LONG AR_BIT(7) -+#define DMA_RX_LS AR_BIT(8) /* last descriptor */ -+#define DMA_RX_FS AR_BIT(9) /* first descriptor */ -+#define DMA_RX_MF AR_BIT(10) /* multicast frame */ -+#define DMA_RX_ERR_RUNT AR_BIT(11) /* runt frame */ -+#define DMA_RX_ERR_LENGTH AR_BIT(12) /* length error */ -+#define DMA_RX_ERR_DESC AR_BIT(14) /* descriptor error */ -+#define DMA_RX_ERROR AR_BIT(15) /* error summary */ -+#define DMA_RX_LEN_MASK 0x3fff0000 -+#define DMA_RX_LEN_SHIFT 16 -+#define DMA_RX_FILT AR_BIT(30) -+#define DMA_RX_OWN AR_BIT(31) /* desc owned by DMA controller */ -+ -+#define DMA_RX1_BSIZE_MASK 0x000007ff -+#define DMA_RX1_BSIZE_SHIFT 0 -+#define DMA_RX1_CHAINED AR_BIT(24) -+#define DMA_RX1_RER AR_BIT(25) -+ -+#define DMA_TX_ERR_UNDER AR_BIT(1) /* underflow error */ -+#define DMA_TX_ERR_DEFER AR_BIT(2) /* excessive deferral */ -+#define DMA_TX_COL_MASK 0x78 -+#define DMA_TX_COL_SHIFT 3 -+#define DMA_TX_ERR_HB AR_BIT(7) /* hearbeat failure */ -+#define DMA_TX_ERR_COL AR_BIT(8) /* excessive collisions */ -+#define DMA_TX_ERR_LATE AR_BIT(9) /* late collision */ -+#define DMA_TX_ERR_LINK AR_BIT(10) /* no carrier */ -+#define DMA_TX_ERR_LOSS AR_BIT(11) /* loss of carrier */ -+#define DMA_TX_ERR_JABBER AR_BIT(14) /* transmit jabber timeout */ -+#define DMA_TX_ERROR AR_BIT(15) /* frame aborted */ -+#define DMA_TX_OWN AR_BIT(31) /* descr owned by DMA controller */ -+ -+#define DMA_TX1_BSIZE_MASK 0x000007ff -+#define DMA_TX1_BSIZE_SHIFT 0 -+#define DMA_TX1_CHAINED AR_BIT(24) /* chained descriptors */ -+#define DMA_TX1_TER AR_BIT(25) /* transmit end of ring */ -+#define DMA_TX1_FS AR_BIT(29) /* first segment */ -+#define DMA_TX1_LS AR_BIT(30) /* last segment */ -+#define DMA_TX1_IC AR_BIT(31) /* interrupt on completion */ -+ -+#define RCVPKT_LENGTH(X) (X >> 16) /* Received pkt Length */ -+ -+#define MAC_CONTROL_RE AR_BIT(2) /* receive enable */ -+#define MAC_CONTROL_TE AR_BIT(3) /* transmit enable */ -+#define MAC_CONTROL_DC AR_BIT(5) /* Deferral check*/ -+#define MAC_CONTROL_ASTP AR_BIT(8) /* Auto pad strip */ -+#define MAC_CONTROL_DRTY AR_BIT(10) /* Disable retry */ -+#define MAC_CONTROL_DBF AR_BIT(11) /* Disable bcast frames */ -+#define MAC_CONTROL_LCC AR_BIT(12) /* late collision ctrl */ -+#define MAC_CONTROL_HP AR_BIT(13) /* Hash Perfect filtering */ -+#define MAC_CONTROL_HASH AR_BIT(14) /* Unicast hash filtering */ -+#define MAC_CONTROL_HO AR_BIT(15) /* Hash only filtering */ -+#define MAC_CONTROL_PB AR_BIT(16) /* Pass Bad frames */ -+#define MAC_CONTROL_IF AR_BIT(17) /* Inverse filtering */ -+#define MAC_CONTROL_PR AR_BIT(18) /* promiscuous mode (valid frames only) */ -+#define MAC_CONTROL_PM AR_BIT(19) /* pass multicast */ -+#define MAC_CONTROL_F AR_BIT(20) /* full-duplex */ -+#define MAC_CONTROL_DRO AR_BIT(23) /* Disable Receive Own */ -+#define MAC_CONTROL_HBD AR_BIT(28) /* heart-beat disabled (MUST BE SET) */ -+#define MAC_CONTROL_BLE AR_BIT(30) /* big endian mode */ -+#define MAC_CONTROL_RA AR_BIT(31) /* receive all (valid and invalid frames) */ -+ -+#define MII_ADDR_BUSY AR_BIT(0) -+#define MII_ADDR_WRITE AR_BIT(1) -+#define MII_ADDR_REG_SHIFT 6 -+#define MII_ADDR_PHY_SHIFT 11 -+#define MII_DATA_SHIFT 0 -+ -+#define FLOW_CONTROL_FCE AR_BIT(1) -+ -+#define DMA_BUS_MODE_SWR AR_BIT(0) /* software reset */ -+#define DMA_BUS_MODE_BLE AR_BIT(7) /* big endian mode */ -+#define DMA_BUS_MODE_PBL_SHIFT 8 /* programmable burst length 32 */ -+#define DMA_BUS_MODE_DBO AR_BIT(20) /* big-endian descriptors */ -+ -+#define DMA_STATUS_TI AR_BIT(0) /* transmit interrupt */ -+#define DMA_STATUS_TPS AR_BIT(1) /* transmit process stopped */ -+#define DMA_STATUS_TU AR_BIT(2) /* transmit buffer unavailable */ -+#define DMA_STATUS_TJT AR_BIT(3) /* transmit buffer timeout */ -+#define DMA_STATUS_UNF AR_BIT(5) /* transmit underflow */ -+#define DMA_STATUS_RI AR_BIT(6) /* receive interrupt */ -+#define DMA_STATUS_RU AR_BIT(7) /* receive buffer unavailable */ -+#define DMA_STATUS_RPS AR_BIT(8) /* receive process stopped */ -+#define DMA_STATUS_ETI AR_BIT(10) /* early transmit interrupt */ -+#define DMA_STATUS_FBE AR_BIT(13) /* fatal bus interrupt */ -+#define DMA_STATUS_ERI AR_BIT(14) /* early receive interrupt */ -+#define DMA_STATUS_AIS AR_BIT(15) /* abnormal interrupt summary */ -+#define DMA_STATUS_NIS AR_BIT(16) /* normal interrupt summary */ -+#define DMA_STATUS_RS_SHIFT 17 /* receive process state */ -+#define DMA_STATUS_TS_SHIFT 20 /* transmit process state */ -+#define DMA_STATUS_EB_SHIFT 23 /* error bits */ -+ -+#define DMA_CONTROL_SR AR_BIT(1) /* start receive */ -+#define DMA_CONTROL_ST AR_BIT(13) /* start transmit */ -+#define DMA_CONTROL_SF AR_BIT(21) /* store and forward */ -+ -+#endif // __ARUBA_DMA_H__ -+ -+ -+ -+ -+ -diff -urN linux.old/drivers/net/ar2313/platform.h linux.net/drivers/net/ar2313/platform.h ---- linux.old/drivers/net/ar2313/platform.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.net/drivers/net/ar2313/platform.h 2006-01-25 00:10:25.000000000 +0100 -@@ -0,0 +1,128 @@ -+/******************************************************************************** -+ Title: $Source: platform.h,v $ -+ -+ Author: Dan Steinberg -+ Copyright Integrated Device Technology 2001 -+ -+ Purpose: AR2313 Register/Bit Definitions -+ -+ Update: -+ $Log: platform.h,v $ -+ -+ Notes: See Merlot architecture spec for complete details. Note, all -+ addresses are virtual addresses in kseg1 (Uncached, Unmapped). -+ -+********************************************************************************/ -+ -+#ifndef PLATFORM_H -+#define PLATFORM_H -+ -+#define BIT(x) (1 << (x)) -+ -+#define RESET_BASE 0xBC003020 -+#define RESET_VALUE 0x00000001 -+ -+/******************************************************************** -+ * Device controller -+ ********************************************************************/ -+typedef struct { -+ volatile unsigned int flash0; -+} DEVICE; -+ -+#define device (*((volatile DEVICE *) DEV_CTL_BASE)) -+ -+// DDRC register -+#define DEV_WP (1<<26) -+ -+/******************************************************************** -+ * DDR controller -+ ********************************************************************/ -+typedef struct { -+ volatile unsigned int ddrc0; -+ volatile unsigned int ddrc1; -+ volatile unsigned int ddrrefresh; -+} DDR; -+ -+#define ddr (*((volatile DDR *) DDR_BASE)) -+ -+// DDRC register -+#define DDRC_CS(i) ((i&0x3)<<0) -+#define DDRC_WE (1<<2) -+ -+/******************************************************************** -+ * Ethernet interfaces -+ ********************************************************************/ -+#define ETHERNET_BASE 0xB8200000 -+ -+// -+// New Combo structure for Both Eth0 AND eth1 -+// -+typedef struct { -+ volatile unsigned int mac_control; /* 0x00 */ -+ volatile unsigned int mac_addr[2]; /* 0x04 - 0x08*/ -+ volatile unsigned int mcast_table[2]; /* 0x0c - 0x10 */ -+ volatile unsigned int mii_addr; /* 0x14 */ -+ volatile unsigned int mii_data; /* 0x18 */ -+ volatile unsigned int flow_control; /* 0x1c */ -+ volatile unsigned int vlan_tag; /* 0x20 */ -+ volatile unsigned int pad[7]; /* 0x24 - 0x3c */ -+ volatile unsigned int ucast_table[8]; /* 0x40-0x5c */ -+ -+} ETHERNET_STRUCT; -+ -+/******************************************************************** -+ * Interrupt controller -+ ********************************************************************/ -+ -+typedef struct { -+ volatile unsigned int wdog_control; /* 0x08 */ -+ volatile unsigned int wdog_timer; /* 0x0c */ -+ volatile unsigned int misc_status; /* 0x10 */ -+ volatile unsigned int misc_mask; /* 0x14 */ -+ volatile unsigned int global_status; /* 0x18 */ -+ volatile unsigned int reserved; /* 0x1c */ -+ volatile unsigned int reset_control; /* 0x20 */ -+} INTERRUPT; -+ -+#define interrupt (*((volatile INTERRUPT *) INTERRUPT_BASE)) -+ -+#define INTERRUPT_MISC_TIMER BIT(0) -+#define INTERRUPT_MISC_AHBPROC BIT(1) -+#define INTERRUPT_MISC_AHBDMA BIT(2) -+#define INTERRUPT_MISC_GPIO BIT(3) -+#define INTERRUPT_MISC_UART BIT(4) -+#define INTERRUPT_MISC_UARTDMA BIT(5) -+#define INTERRUPT_MISC_WATCHDOG BIT(6) -+#define INTERRUPT_MISC_LOCAL BIT(7) -+ -+#define INTERRUPT_GLOBAL_ETH BIT(2) -+#define INTERRUPT_GLOBAL_WLAN BIT(3) -+#define INTERRUPT_GLOBAL_MISC BIT(4) -+#define INTERRUPT_GLOBAL_ITIMER BIT(5) -+ -+/******************************************************************** -+ * DMA controller -+ ********************************************************************/ -+#define DMA_BASE 0xB8201000 -+ -+typedef struct { -+ volatile unsigned int bus_mode; /* 0x00 (CSR0) */ -+ volatile unsigned int xmt_poll; /* 0x04 (CSR1) */ -+ volatile unsigned int rcv_poll; /* 0x08 (CSR2) */ -+ volatile unsigned int rcv_base; /* 0x0c (CSR3) */ -+ volatile unsigned int xmt_base; /* 0x10 (CSR4) */ -+ volatile unsigned int status; /* 0x14 (CSR5) */ -+ volatile unsigned int control; /* 0x18 (CSR6) */ -+ volatile unsigned int intr_ena; /* 0x1c (CSR7) */ -+ volatile unsigned int rcv_missed; /* 0x20 (CSR8) */ -+ volatile unsigned int reserved[11]; /* 0x24-0x4c (CSR9-19) */ -+ volatile unsigned int cur_tx_buf_addr; /* 0x50 (CSR20) */ -+ volatile unsigned int cur_rx_buf_addr; /* 0x50 (CSR21) */ -+} DMA; -+ -+#define dma (*((volatile DMA *) DMA_BASE)) -+ -+// macro to convert from virtual to physical address -+#define phys_addr(x) (x & 0x1fffffff) -+ -+#endif /* PLATFORM_H */ -diff -urN linux.old/drivers/net/ar2313.c linux.net/drivers/net/ar2313.c ---- linux.old/drivers/net/ar2313.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.net/drivers/net/ar2313.c 2006-01-30 01:21:56.822933750 +0100 -@@ -0,0 +1,1642 @@ +diff -Nur linux-2.6.17/drivers/net/ar2313/ar2313.c linux-2.6.17-owrt/drivers/net/ar2313/ar2313.c +--- linux-2.6.17/drivers/net/ar2313/ar2313.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/net/ar2313/ar2313.c 2006-06-19 12:57:27.000000000 +0200 +@@ -0,0 +1,1649 @@ +/* + * ar2313.c: Linux driver for the Atheros AR2313 Ethernet device. + * + * Copyright 2004 by Sameer Dekate, <sdekate@arubanetworks.com>. ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> + * + * Thanks to Atheros for providing hardware and documentation + * enabling me to write this driver. @@ -599,10 +86,16 @@ diff -urN linux.old/drivers/net/ar2313.c linux.net/drivers/net/ar2313.c + +#define PHYSADDR(a) ((_ACAST32_ (a)) & 0x1fffffff) + -+MODULE_PARM(ethaddr, "s"); -+static char *ethaddr = "00:00:00:00:00:00"; -+MODULE_PARM(ifname, "s"); -+static char *ifname = "bond" ; ++static char ethaddr[18] = "00:00:00:00:00:00"; ++static char ifname[5] = "bond"; ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++module_param_string(ethaddr, ethaddr, 18, 0); ++module_param_string(ifname, ifname, 5, 0); ++#else ++MODULE_PARM(ethaddr, "c18"); ++MODULE_PARM(ifname, "c5"); ++#endif + +#define AR2313_MBOX_SET_BIT 0x8 + @@ -612,10 +105,10 @@ diff -urN linux.old/drivers/net/ar2313.c linux.net/drivers/net/ar2313.c +/* margot includes */ +#include <asm/idt-boards/rc32434/rc32434.h> + -+#include "ar2313/ar2313_msg.h" -+#include "ar2313/platform.h" -+#include "ar2313/dma.h" -+#include "ar2313/ar2313.h" ++#include "ar2313_msg.h" ++#include "platform.h" ++#include "dma.h" ++#include "ar2313.h" + +/* + * New interrupt handler strategy: @@ -680,7 +173,7 @@ diff -urN linux.old/drivers/net/ar2313.c linux.net/drivers/net/ar2313.c + +#if DEBUG +static char version[] __initdata = -+ "ar2313.c: v0.01 2004/01/06 sdekate@arubanetworks.com\n"; ++ "ar2313.c: v0.02 2006/06/19 sdekate@arubanetworks.com\n"; +#endif /* DEBUG */ + +#define virt_to_phys(x) ((u32)(x) & 0x1fffffff) @@ -2158,3 +1651,525 @@ diff -urN linux.old/drivers/net/ar2313.c linux.net/drivers/net/ar2313.c + MII_ADDR_WRITE); +} + +diff -Nur linux-2.6.17/drivers/net/ar2313/ar2313.h linux-2.6.17-owrt/drivers/net/ar2313/ar2313.h +--- linux-2.6.17/drivers/net/ar2313/ar2313.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/net/ar2313/ar2313.h 2006-06-19 12:05:29.000000000 +0200 +@@ -0,0 +1,190 @@ ++#ifndef _AR2313_H_ ++#define _AR2313_H_ ++ ++#include <linux/config.h> ++#include <asm/bootinfo.h> ++#include "platform.h" ++ ++extern unsigned long mips_machtype; ++ ++#undef ETHERNET_BASE ++#define ETHERNET_BASE ar_eth_base ++#define ETHERNET_SIZE 0x00100000 ++#define ETHERNET_MACS 2 ++ ++#undef DMA_BASE ++#define DMA_BASE ar_dma_base ++#define DMA_SIZE 0x00100000 ++ ++ ++/* ++ * probe link timer - 5 secs ++ */ ++#define LINK_TIMER (5*HZ) ++ ++/* ++ * Interrupt register base address ++ */ ++#define INTERRUPT_BASE PHYS_TO_K1(ar_int_base) ++ ++/* ++ * Reset Register ++ */ ++#define AR531X_RESET (AR531X_RESETTMR + 0x0020) ++#define RESET_SYSTEM 0x00000001 /* cold reset full system */ ++#define RESET_PROC 0x00000002 /* cold reset MIPS core */ ++#define RESET_WLAN0 0x00000004 /* cold reset WLAN MAC and BB */ ++#define RESET_EPHY0 0x00000008 /* cold reset ENET0 phy */ ++#define RESET_EPHY1 0x00000010 /* cold reset ENET1 phy */ ++#define RESET_ENET0 0x00000020 /* cold reset ENET0 mac */ ++#define RESET_ENET1 0x00000040 /* cold reset ENET1 mac */ ++ ++#define IS_DMA_TX_INT(X) (((X) & (DMA_STATUS_TI)) != 0) ++#define IS_DMA_RX_INT(X) (((X) & (DMA_STATUS_RI)) != 0) ++#define IS_DRIVER_OWNED(X) (((X) & (DMA_TX_OWN)) == 0) ++ ++#ifndef K1_TO_PHYS ++// hack ++#define K1_TO_PHYS(x) (((unsigned int)(x)) & 0x1FFFFFFF) /* kseg1 to physical */ ++#endif ++ ++#ifndef PHYS_TO_K1 ++// hack ++#define PHYS_TO_K1(x) (((unsigned int)(x)) | 0xA0000000) /* physical to kseg1 */ ++#endif ++ ++#define AR2313_TX_TIMEOUT (HZ/4) ++ ++/* ++ * Rings ++ */ ++#define DSC_RING_ENTRIES_SIZE (AR2313_DESCR_ENTRIES * sizeof(struct desc)) ++#define DSC_NEXT(idx) ((idx + 1) & (AR2313_DESCR_ENTRIES - 1)) ++ ++static inline int tx_space (u32 csm, u32 prd) ++{ ++ return (csm - prd - 1) & (AR2313_DESCR_ENTRIES - 1); ++} ++ ++#if MAX_SKB_FRAGS ++#define TX_RESERVED (MAX_SKB_FRAGS+1) /* +1 for message header */ ++#define tx_ring_full(csm, prd) (tx_space(csm, prd) <= TX_RESERVED) ++#else ++#define tx_ring_full 0 ++#endif ++ ++#define AR2313_MBGET 2 ++#define AR2313_MBSET 3 ++#define AR2313_PCI_RECONFIG 4 ++#define AR2313_PCI_DUMP 5 ++#define AR2313_TEST_PANIC 6 ++#define AR2313_TEST_NULLPTR 7 ++#define AR2313_READ_DATA 8 ++#define AR2313_WRITE_DATA 9 ++#define AR2313_GET_VERSION 10 ++#define AR2313_TEST_HANG 11 ++#define AR2313_SYNC 12 ++ ++ ++struct ar2313_cmd { ++ u32 cmd; ++ u32 address; /* virtual address of image */ ++ u32 length; /* size of image to download */ ++ u32 mailbox; /* mailbox to get/set */ ++ u32 data[2]; /* contents of mailbox to read/write */ ++}; ++ ++ ++/* ++ * Struct private for the Sibyte. ++ * ++ * Elements are grouped so variables used by the tx handling goes ++ * together, and will go into the same cache lines etc. in order to ++ * avoid cache line contention between the rx and tx handling on SMP. ++ * ++ * Frequently accessed variables are put at the beginning of the ++ * struct to help the compiler generate better/shorter code. ++ */ ++struct ar2313_private ++{ ++ int version; ++ u32 mb[2]; ++ ++ volatile ETHERNET_STRUCT *eth_regs; ++ volatile DMA *dma_regs; ++ volatile u32 *int_regs; ++ ++ spinlock_t lock; /* Serialise access to device */ ++ ++ /* ++ * RX and TX descriptors, must be adjacent ++ */ ++ ar2313_descr_t *rx_ring; ++ ar2313_descr_t *tx_ring; ++ ++ ++ struct sk_buff **rx_skb; ++ struct sk_buff **tx_skb; ++ ++ /* ++ * RX elements ++ */ ++ u32 rx_skbprd; ++ u32 cur_rx; ++ ++ /* ++ * TX elements ++ */ ++ u32 tx_prd; ++ u32 tx_csm; ++ ++ /* ++ * Misc elements ++ */ ++ int board_idx; ++ char name[48]; ++ struct net_device_stats stats; ++ struct { ++ u32 address; ++ u32 length; ++ char *mapping; ++ } desc; ++ ++ ++ struct timer_list link_timer; ++ unsigned short phy; /* merlot phy = 1, samsung phy = 0x1f */ ++ unsigned short mac; ++ unsigned short link; /* 0 - link down, 1 - link up */ ++ u16 phyData; ++ ++ struct tasklet_struct rx_tasklet; ++ int unloading; ++}; ++ ++ ++/* ++ * Prototypes ++ */ ++static int ar2313_init(struct net_device *dev); ++#ifdef TX_TIMEOUT ++static void ar2313_tx_timeout(struct net_device *dev); ++#endif ++#if 0 ++static void ar2313_multicast_list(struct net_device *dev); ++#endif ++static int ar2313_restart(struct net_device *dev); ++#if DEBUG ++static void ar2313_dump_regs(struct net_device *dev); ++#endif ++static void ar2313_load_rx_ring(struct net_device *dev, int bufs); ++static irqreturn_t ar2313_interrupt(int irq, void *dev_id, struct pt_regs *regs); ++static int ar2313_open(struct net_device *dev); ++static int ar2313_start_xmit(struct sk_buff *skb, struct net_device *dev); ++static int ar2313_close(struct net_device *dev); ++static int ar2313_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); ++static void ar2313_init_cleanup(struct net_device *dev); ++static int ar2313_setup_timer(struct net_device *dev); ++static void ar2313_link_timer_fn(unsigned long data); ++static void ar2313_check_link(struct net_device *dev); ++static struct net_device_stats *ar2313_get_stats(struct net_device *dev); ++#endif /* _AR2313_H_ */ +diff -Nur linux-2.6.17/drivers/net/ar2313/ar2313_msg.h linux-2.6.17-owrt/drivers/net/ar2313/ar2313_msg.h +--- linux-2.6.17/drivers/net/ar2313/ar2313_msg.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/net/ar2313/ar2313_msg.h 2006-06-19 12:05:29.000000000 +0200 +@@ -0,0 +1,17 @@ ++#ifndef _AR2313_MSG_H_ ++#define _AR2313_MSG_H_ ++ ++#define AR2313_MTU 1692 ++#define AR2313_PRIOS 1 ++#define AR2313_QUEUES (2*AR2313_PRIOS) ++ ++#define AR2313_DESCR_ENTRIES 64 ++ ++typedef struct { ++ volatile unsigned int status; // OWN, Device control and status. ++ volatile unsigned int devcs; // pkt Control bits + Length ++ volatile unsigned int addr; // Current Address. ++ volatile unsigned int descr; // Next descriptor in chain. ++} ar2313_descr_t; ++ ++#endif /* _AR2313_MSG_H_ */ +diff -Nur linux-2.6.17/drivers/net/ar2313/dma.h linux-2.6.17-owrt/drivers/net/ar2313/dma.h +--- linux-2.6.17/drivers/net/ar2313/dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/net/ar2313/dma.h 2006-06-19 12:05:29.000000000 +0200 +@@ -0,0 +1,135 @@ ++#ifndef __ARUBA_DMA_H__ ++#define __ARUBA_DMA_H__ ++ ++/******************************************************************************* ++ * ++ * Copyright 2002 Integrated Device Technology, Inc. ++ * All rights reserved. ++ * ++ * DMA register definition. ++ * ++ * File : $Id: dma.h,v 1.3 2002/06/06 18:34:03 astichte Exp $ ++ * ++ * Author : ryan.holmQVist@idt.com ++ * Date : 20011005 ++ * Update : ++ * $Log: dma.h,v $ ++ * Revision 1.3 2002/06/06 18:34:03 astichte ++ * Added XXX_PhysicalAddress and XXX_VirtualAddress ++ * ++ * Revision 1.2 2002/06/05 18:30:46 astichte ++ * Removed IDTField ++ * ++ * Revision 1.1 2002/05/29 17:33:21 sysarch ++ * jba File moved from vcode/include/idt/acacia ++ * ++ * ++ ******************************************************************************/ ++ ++#define AR_BIT(x) (1 << (x)) ++#define DMA_RX_ERR_CRC AR_BIT(1) ++#define DMA_RX_ERR_DRIB AR_BIT(2) ++#define DMA_RX_ERR_MII AR_BIT(3) ++#define DMA_RX_EV2 AR_BIT(5) ++#define DMA_RX_ERR_COL AR_BIT(6) ++#define DMA_RX_LONG AR_BIT(7) ++#define DMA_RX_LS AR_BIT(8) /* last descriptor */ ++#define DMA_RX_FS AR_BIT(9) /* first descriptor */ ++#define DMA_RX_MF AR_BIT(10) /* multicast frame */ ++#define DMA_RX_ERR_RUNT AR_BIT(11) /* runt frame */ ++#define DMA_RX_ERR_LENGTH AR_BIT(12) /* length error */ ++#define DMA_RX_ERR_DESC AR_BIT(14) /* descriptor error */ ++#define DMA_RX_ERROR AR_BIT(15) /* error summary */ ++#define DMA_RX_LEN_MASK 0x3fff0000 ++#define DMA_RX_LEN_SHIFT 16 ++#define DMA_RX_FILT AR_BIT(30) ++#define DMA_RX_OWN AR_BIT(31) /* desc owned by DMA controller */ ++ ++#define DMA_RX1_BSIZE_MASK 0x000007ff ++#define DMA_RX1_BSIZE_SHIFT 0 ++#define DMA_RX1_CHAINED AR_BIT(24) ++#define DMA_RX1_RER AR_BIT(25) ++ ++#define DMA_TX_ERR_UNDER AR_BIT(1) /* underflow error */ ++#define DMA_TX_ERR_DEFER AR_BIT(2) /* excessive deferral */ ++#define DMA_TX_COL_MASK 0x78 ++#define DMA_TX_COL_SHIFT 3 ++#define DMA_TX_ERR_HB AR_BIT(7) /* hearbeat failure */ ++#define DMA_TX_ERR_COL AR_BIT(8) /* excessive collisions */ ++#define DMA_TX_ERR_LATE AR_BIT(9) /* late collision */ ++#define DMA_TX_ERR_LINK AR_BIT(10) /* no carrier */ ++#define DMA_TX_ERR_LOSS AR_BIT(11) /* loss of carrier */ ++#define DMA_TX_ERR_JABBER AR_BIT(14) /* transmit jabber timeout */ ++#define DMA_TX_ERROR AR_BIT(15) /* frame aborted */ ++#define DMA_TX_OWN AR_BIT(31) /* descr owned by DMA controller */ ++ ++#define DMA_TX1_BSIZE_MASK 0x000007ff ++#define DMA_TX1_BSIZE_SHIFT 0 ++#define DMA_TX1_CHAINED AR_BIT(24) /* chained descriptors */ ++#define DMA_TX1_TER AR_BIT(25) /* transmit end of ring */ ++#define DMA_TX1_FS AR_BIT(29) /* first segment */ ++#define DMA_TX1_LS AR_BIT(30) /* last segment */ ++#define DMA_TX1_IC AR_BIT(31) /* interrupt on completion */ ++ ++#define RCVPKT_LENGTH(X) (X >> 16) /* Received pkt Length */ ++ ++#define MAC_CONTROL_RE AR_BIT(2) /* receive enable */ ++#define MAC_CONTROL_TE AR_BIT(3) /* transmit enable */ ++#define MAC_CONTROL_DC AR_BIT(5) /* Deferral check*/ ++#define MAC_CONTROL_ASTP AR_BIT(8) /* Auto pad strip */ ++#define MAC_CONTROL_DRTY AR_BIT(10) /* Disable retry */ ++#define MAC_CONTROL_DBF AR_BIT(11) /* Disable bcast frames */ ++#define MAC_CONTROL_LCC AR_BIT(12) /* late collision ctrl */ ++#define MAC_CONTROL_HP AR_BIT(13) /* Hash Perfect filtering */ ++#define MAC_CONTROL_HASH AR_BIT(14) /* Unicast hash filtering */ ++#define MAC_CONTROL_HO AR_BIT(15) /* Hash only filtering */ ++#define MAC_CONTROL_PB AR_BIT(16) /* Pass Bad frames */ ++#define MAC_CONTROL_IF AR_BIT(17) /* Inverse filtering */ ++#define MAC_CONTROL_PR AR_BIT(18) /* promiscuous mode (valid frames only) */ ++#define MAC_CONTROL_PM AR_BIT(19) /* pass multicast */ ++#define MAC_CONTROL_F AR_BIT(20) /* full-duplex */ ++#define MAC_CONTROL_DRO AR_BIT(23) /* Disable Receive Own */ ++#define MAC_CONTROL_HBD AR_BIT(28) /* heart-beat disabled (MUST BE SET) */ ++#define MAC_CONTROL_BLE AR_BIT(30) /* big endian mode */ ++#define MAC_CONTROL_RA AR_BIT(31) /* receive all (valid and invalid frames) */ ++ ++#define MII_ADDR_BUSY AR_BIT(0) ++#define MII_ADDR_WRITE AR_BIT(1) ++#define MII_ADDR_REG_SHIFT 6 ++#define MII_ADDR_PHY_SHIFT 11 ++#define MII_DATA_SHIFT 0 ++ ++#define FLOW_CONTROL_FCE AR_BIT(1) ++ ++#define DMA_BUS_MODE_SWR AR_BIT(0) /* software reset */ ++#define DMA_BUS_MODE_BLE AR_BIT(7) /* big endian mode */ ++#define DMA_BUS_MODE_PBL_SHIFT 8 /* programmable burst length 32 */ ++#define DMA_BUS_MODE_DBO AR_BIT(20) /* big-endian descriptors */ ++ ++#define DMA_STATUS_TI AR_BIT(0) /* transmit interrupt */ ++#define DMA_STATUS_TPS AR_BIT(1) /* transmit process stopped */ ++#define DMA_STATUS_TU AR_BIT(2) /* transmit buffer unavailable */ ++#define DMA_STATUS_TJT AR_BIT(3) /* transmit buffer timeout */ ++#define DMA_STATUS_UNF AR_BIT(5) /* transmit underflow */ ++#define DMA_STATUS_RI AR_BIT(6) /* receive interrupt */ ++#define DMA_STATUS_RU AR_BIT(7) /* receive buffer unavailable */ ++#define DMA_STATUS_RPS AR_BIT(8) /* receive process stopped */ ++#define DMA_STATUS_ETI AR_BIT(10) /* early transmit interrupt */ ++#define DMA_STATUS_FBE AR_BIT(13) /* fatal bus interrupt */ ++#define DMA_STATUS_ERI AR_BIT(14) /* early receive interrupt */ ++#define DMA_STATUS_AIS AR_BIT(15) /* abnormal interrupt summary */ ++#define DMA_STATUS_NIS AR_BIT(16) /* normal interrupt summary */ ++#define DMA_STATUS_RS_SHIFT 17 /* receive process state */ ++#define DMA_STATUS_TS_SHIFT 20 /* transmit process state */ ++#define DMA_STATUS_EB_SHIFT 23 /* error bits */ ++ ++#define DMA_CONTROL_SR AR_BIT(1) /* start receive */ ++#define DMA_CONTROL_ST AR_BIT(13) /* start transmit */ ++#define DMA_CONTROL_SF AR_BIT(21) /* store and forward */ ++ ++#endif // __ARUBA_DMA_H__ ++ ++ ++ ++ ++ +diff -Nur linux-2.6.17/drivers/net/ar2313/Makefile linux-2.6.17-owrt/drivers/net/ar2313/Makefile +--- linux-2.6.17/drivers/net/ar2313/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/net/ar2313/Makefile 2006-06-19 12:25:58.000000000 +0200 +@@ -0,0 +1,5 @@ ++# ++# Makefile for the AR2313 ethernet driver ++# ++ ++obj-$(CONFIG_AR2313) += ar2313.o +diff -Nur linux-2.6.17/drivers/net/ar2313/platform.h linux-2.6.17-owrt/drivers/net/ar2313/platform.h +--- linux-2.6.17/drivers/net/ar2313/platform.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/net/ar2313/platform.h 2006-06-19 12:05:29.000000000 +0200 +@@ -0,0 +1,128 @@ ++/******************************************************************************** ++ Title: $Source: platform.h,v $ ++ ++ Author: Dan Steinberg ++ Copyright Integrated Device Technology 2001 ++ ++ Purpose: AR2313 Register/Bit Definitions ++ ++ Update: ++ $Log: platform.h,v $ ++ ++ Notes: See Merlot architecture spec for complete details. Note, all ++ addresses are virtual addresses in kseg1 (Uncached, Unmapped). ++ ++********************************************************************************/ ++ ++#ifndef PLATFORM_H ++#define PLATFORM_H ++ ++#define BIT(x) (1 << (x)) ++ ++#define RESET_BASE 0xBC003020 ++#define RESET_VALUE 0x00000001 ++ ++/******************************************************************** ++ * Device controller ++ ********************************************************************/ ++typedef struct { ++ volatile unsigned int flash0; ++} DEVICE; ++ ++#define device (*((volatile DEVICE *) DEV_CTL_BASE)) ++ ++// DDRC register ++#define DEV_WP (1<<26) ++ ++/******************************************************************** ++ * DDR controller ++ ********************************************************************/ ++typedef struct { ++ volatile unsigned int ddrc0; ++ volatile unsigned int ddrc1; ++ volatile unsigned int ddrrefresh; ++} DDR; ++ ++#define ddr (*((volatile DDR *) DDR_BASE)) ++ ++// DDRC register ++#define DDRC_CS(i) ((i&0x3)<<0) ++#define DDRC_WE (1<<2) ++ ++/******************************************************************** ++ * Ethernet interfaces ++ ********************************************************************/ ++#define ETHERNET_BASE 0xB8200000 ++ ++// ++// New Combo structure for Both Eth0 AND eth1 ++// ++typedef struct { ++ volatile unsigned int mac_control; /* 0x00 */ ++ volatile unsigned int mac_addr[2]; /* 0x04 - 0x08*/ ++ volatile unsigned int mcast_table[2]; /* 0x0c - 0x10 */ ++ volatile unsigned int mii_addr; /* 0x14 */ ++ volatile unsigned int mii_data; /* 0x18 */ ++ volatile unsigned int flow_control; /* 0x1c */ ++ volatile unsigned int vlan_tag; /* 0x20 */ ++ volatile unsigned int pad[7]; /* 0x24 - 0x3c */ ++ volatile unsigned int ucast_table[8]; /* 0x40-0x5c */ ++ ++} ETHERNET_STRUCT; ++ ++/******************************************************************** ++ * Interrupt controller ++ ********************************************************************/ ++ ++typedef struct { ++ volatile unsigned int wdog_control; /* 0x08 */ ++ volatile unsigned int wdog_timer; /* 0x0c */ ++ volatile unsigned int misc_status; /* 0x10 */ ++ volatile unsigned int misc_mask; /* 0x14 */ ++ volatile unsigned int global_status; /* 0x18 */ ++ volatile unsigned int reserved; /* 0x1c */ ++ volatile unsigned int reset_control; /* 0x20 */ ++} INTERRUPT; ++ ++#define interrupt (*((volatile INTERRUPT *) INTERRUPT_BASE)) ++ ++#define INTERRUPT_MISC_TIMER BIT(0) ++#define INTERRUPT_MISC_AHBPROC BIT(1) ++#define INTERRUPT_MISC_AHBDMA BIT(2) ++#define INTERRUPT_MISC_GPIO BIT(3) ++#define INTERRUPT_MISC_UART BIT(4) ++#define INTERRUPT_MISC_UARTDMA BIT(5) ++#define INTERRUPT_MISC_WATCHDOG BIT(6) ++#define INTERRUPT_MISC_LOCAL BIT(7) ++ ++#define INTERRUPT_GLOBAL_ETH BIT(2) ++#define INTERRUPT_GLOBAL_WLAN BIT(3) ++#define INTERRUPT_GLOBAL_MISC BIT(4) ++#define INTERRUPT_GLOBAL_ITIMER BIT(5) ++ ++/******************************************************************** ++ * DMA controller ++ ********************************************************************/ ++#define DMA_BASE 0xB8201000 ++ ++typedef struct { ++ volatile unsigned int bus_mode; /* 0x00 (CSR0) */ ++ volatile unsigned int xmt_poll; /* 0x04 (CSR1) */ ++ volatile unsigned int rcv_poll; /* 0x08 (CSR2) */ ++ volatile unsigned int rcv_base; /* 0x0c (CSR3) */ ++ volatile unsigned int xmt_base; /* 0x10 (CSR4) */ ++ volatile unsigned int status; /* 0x14 (CSR5) */ ++ volatile unsigned int control; /* 0x18 (CSR6) */ ++ volatile unsigned int intr_ena; /* 0x1c (CSR7) */ ++ volatile unsigned int rcv_missed; /* 0x20 (CSR8) */ ++ volatile unsigned int reserved[11]; /* 0x24-0x4c (CSR9-19) */ ++ volatile unsigned int cur_tx_buf_addr; /* 0x50 (CSR20) */ ++ volatile unsigned int cur_rx_buf_addr; /* 0x50 (CSR21) */ ++} DMA; ++ ++#define dma (*((volatile DMA *) DMA_BASE)) ++ ++// macro to convert from virtual to physical address ++#define phys_addr(x) (x & 0x1fffffff) ++ ++#endif /* PLATFORM_H */ +diff -Nur linux-2.6.17/drivers/net/Kconfig linux-2.6.17-owrt/drivers/net/Kconfig +--- linux-2.6.17/drivers/net/Kconfig 2006-06-19 12:05:01.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/net/Kconfig 2006-06-19 12:26:35.000000000 +0200 +@@ -310,6 +310,12 @@ + + source "drivers/net/arm/Kconfig" + ++config AR2313 ++ tristate "AR2313 Ethernet support" ++ depends on NET_ETHERNET && MACH_ARUBA ++ help ++ Support for the AR2313 Ethernet part on Aruba AP60/61 ++ + config IDT_RC32434_ETH + tristate "IDT RC32434 Local Ethernet support" + depends on NET_ETHERNET +diff -Nur linux-2.6.17/drivers/net/Makefile linux-2.6.17-owrt/drivers/net/Makefile +--- linux-2.6.17/drivers/net/Makefile 2006-06-19 12:05:01.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/net/Makefile 2006-06-19 12:27:02.000000000 +0200 +@@ -12,6 +12,7 @@ + obj-$(CONFIG_CHELSIO_T1) += chelsio/ + obj-$(CONFIG_BONDING) += bonding/ + obj-$(CONFIG_GIANFAR) += gianfar_driver.o ++obj-$(CONFIG_AR2313) += ar2313/ + + gianfar_driver-objs := gianfar.o \ + gianfar_ethtool.o \ From dec62c0d0d6000ea955f459e6d40415cabb21ff2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 19 Jun 2006 18:13:02 +0000 Subject: [PATCH 228/757] fix rb532 for 2.6.17 SVN-Revision: 4007 --- openwrt/target/linux/rb532-2.6/config | 321 +++------------ .../rb532-2.6/patches/100-rb5xx_support.patch | 386 ++++++++---------- 2 files changed, 227 insertions(+), 480 deletions(-) diff --git a/openwrt/target/linux/rb532-2.6/config b/openwrt/target/linux/rb532-2.6/config index 7ff1f4a1308..6921ad5a446 100644 --- a/openwrt/target/linux/rb532-2.6/config +++ b/openwrt/target/linux/rb532-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.19 -# Thu Jun 15 19:40:52 2006 +# Linux kernel version: 2.6.17 +# Sun Jun 18 17:29:23 2006 # CONFIG_MIPS=y @@ -65,7 +65,10 @@ CONFIG_MIKROTIK_RB500=y # CONFIG_TOSHIBA_RBTX4927 is not set # CONFIG_TOSHIBA_RBTX4938 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -115,7 +118,6 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_CPU_HAS_PREFETCH=y # CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set -# CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -153,6 +155,7 @@ CONFIG_SYSVIPC=y CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_EMBEDDED=y @@ -165,10 +168,6 @@ CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 @@ -180,7 +179,6 @@ CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set @@ -189,6 +187,8 @@ CONFIG_OBSOLETE_MODPARM=y # Block layer # # CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set # # IO Schedulers @@ -208,7 +208,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # CONFIG_HW_HAS_PCI=y CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set CONFIG_MMU=y # @@ -252,8 +251,6 @@ CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -277,6 +274,7 @@ CONFIG_IPSEC_NAT_TRAVERSAL=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set CONFIG_INET_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m @@ -300,9 +298,12 @@ CONFIG_TCP_CONG_SCALABLE=m # CONFIG_IP_VS is not set CONFIG_IPV6=m # CONFIG_IPV6_PRIVACY is not set +CONFIG_IPV6_ROUTER_PREF=y +# CONFIG_IPV6_ROUTE_INFO is not set # CONFIG_INET6_AH is not set # CONFIG_INET6_ESP is not set # CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set # CONFIG_IPV6_TUNNEL is not set CONFIG_NETFILTER=y @@ -318,21 +319,24 @@ CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set # CONFIG_NETFILTER_XT_MATCH_COMMENT is not set # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set CONFIG_NETFILTER_XT_MATCH_CONNMARK=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y # CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set # CONFIG_NETFILTER_XT_MATCH_REALM is not set # CONFIG_NETFILTER_XT_MATCH_SCTP is not set CONFIG_NETFILTER_XT_MATCH_STATE=y -# CONFIG_NETFILTER_XT_MATCH_STRING is not set +CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=y # @@ -349,25 +353,24 @@ CONFIG_IP_NF_IRC=y CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_LAYER7=m -# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_TIME=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_MATCH_HASHLIMIT is not set -# CONFIG_IP_NF_MATCH_POLICY is not set +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_IMQ=m @@ -386,6 +389,7 @@ CONFIG_IP_NF_NAT_FTP=y CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m @@ -393,7 +397,7 @@ CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_TTL=m # CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_RAW is not set +CONFIG_IP_NF_RAW=m # CONFIG_IP_NF_ARPTABLES is not set CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 @@ -416,12 +420,10 @@ CONFIG_IP6_NF_IPTABLES=m # CONFIG_IP6_NF_MATCH_OPTS is not set # CONFIG_IP6_NF_MATCH_FRAG is not set # CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_MULTIPORT=m CONFIG_IP6_NF_MATCH_OWNER=m # CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -# CONFIG_IP6_NF_MATCH_AHESP is not set +CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m -# CONFIG_IP6_NF_MATCH_POLICY is not set CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP6_NF_TARGET_LOG is not set @@ -468,16 +470,11 @@ CONFIG_BRIDGE_EBT_ULOG=m # TIPC Configuration (EXPERIMENTAL) # # CONFIG_TIPC is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -CONFIG_ATM_BR2684_IPFILTER=y +# CONFIG_ATM is not set CONFIG_BRIDGE=y CONFIG_VLAN_8021Q=y # CONFIG_DECNET is not set +CONFIG_LLC=y # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -501,7 +498,6 @@ CONFIG_NET_SCH_CLK_JIFFIES=y CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_RED=m CONFIG_NET_SCH_SFQ=m @@ -557,32 +553,15 @@ CONFIG_MKISS=m # CONFIG_BAYCOM_SER_HDX is not set # CONFIG_YAM is not set # CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -# CONFIG_BT_HCIDTL1 is not set -# CONFIG_BT_HCIBT3C is not set -# CONFIG_BT_HCIBLUECARD is not set -# CONFIG_BT_HCIBTUART is not set -# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT is not set CONFIG_IEEE80211=m # CONFIG_IEEE80211_DEBUG is not set CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -653,7 +632,6 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set CONFIG_MTD_BLOCK2MTD=y # @@ -695,7 +673,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set CONFIG_BLK_DEV_CF_MIPS=y @@ -709,74 +687,7 @@ CONFIG_BLK_DEV_CF_MIPS=y # SCSI device support # # CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -787,9 +698,6 @@ CONFIG_BLK_DEV_SD=m # Fusion MPT device support # # CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support @@ -862,7 +770,7 @@ CONFIG_NET_PCI=y # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set CONFIG_VIA_RHINE=y -CONFIG_VIA_RHINE_MMIO=y +# CONFIG_VIA_RHINE_MMIO is not set # CONFIG_LAN_SAA9730 is not set # @@ -899,6 +807,7 @@ CONFIG_VIA_RHINE_MMIO=y # Wireless LAN (non-hamradio) # CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y # # Obsolete Wireless cards support (pre-802.11) @@ -936,6 +845,7 @@ CONFIG_HOSTAP_FIRMWARE_NVRAM=y # CONFIG_HOSTAP_PLX is not set # CONFIG_HOSTAP_PCI is not set CONFIG_HOSTAP_CS=m +# CONFIG_BCM43XX is not set CONFIG_NET_WIRELESS=y # @@ -947,23 +857,6 @@ CONFIG_NET_WIRELESS=y # Wan interfaces # # CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_DUMMY=m -CONFIG_ATM_TCP=m -# CONFIG_ATM_LANAI is not set -# CONFIG_ATM_ENI is not set -# CONFIG_ATM_FIRESTREAM is not set -# CONFIG_ATM_ZATM is not set -# CONFIG_ATM_NICSTAR is not set -# CONFIG_ATM_IDT77252 is not set -# CONFIG_ATM_AMBASSADOR is not set -# CONFIG_ATM_HORIZON is not set -# CONFIG_ATM_IA is not set -# CONFIG_ATM_FORE200E_MAYBE is not set -# CONFIG_ATM_HE is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set CONFIG_PPP=m @@ -975,9 +868,7 @@ CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m CONFIG_PPP_MPPE=m CONFIG_PPPOE=m -CONFIG_PPPOATM=m # CONFIG_SLIP is not set -# CONFIG_NET_FC is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set @@ -996,7 +887,7 @@ CONFIG_PPPOATM=m # # Input device support # -CONFIG_INPUT=m +CONFIG_INPUT=y # # Userland interfaces @@ -1004,7 +895,7 @@ CONFIG_INPUT=m # CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # @@ -1033,7 +924,8 @@ CONFIG_INPUT_EVDEV=m # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m +# CONFIG_SERIAL_8250_PCI is not set +# CONFIG_SERIAL_8250_CS is not set CONFIG_SERIAL_8250_NR_UARTS=2 CONFIG_SERIAL_8250_RUNTIME_UARTS=2 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -1107,36 +999,11 @@ CONFIG_UNIX98_PTYS=y # Misc devices # -# -# Multimedia Capabilities Port drivers -# - # # Multimedia devices # -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set +# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -1151,91 +1018,14 @@ CONFIG_VIDEO_DEV=m # # Sound # -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# PCI devices -# -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALI5451 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AZT3328 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_EMU10K1 is not set -# CONFIG_SND_EMU10K1X is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_ES1938 is not set -# CONFIG_SND_ES1968 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDA_INTEL is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1712 is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_MAESTRO3 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_TRIDENT is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# ALSA MIPS devices -# - -# -# PCMCIA devices -# - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set +# CONFIG_SOUND is not set # # USB support # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_USB is not set # @@ -1252,6 +1042,22 @@ CONFIG_USB_ARCH_HAS_OHCI=y # # CONFIG_MMC is not set +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y + # # InfiniBand support # @@ -1261,6 +1067,11 @@ CONFIG_USB_ARCH_HAS_OHCI=y # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + # # File systems # @@ -1324,7 +1135,6 @@ CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1465,6 +1275,7 @@ CONFIG_NLS_UTF8=m # CONFIG_MAGIC_SYSRQ is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_FS is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200" @@ -1516,3 +1327,7 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m diff --git a/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch b/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch index 9c4ead2ce6c..ae78d452ba8 100644 --- a/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch +++ b/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch @@ -1,6 +1,6 @@ -diff -Nur linux-2.6.17/arch/mips/Kconfig linux-2.6.17-owrt/arch/mips/Kconfig ---- linux-2.6.17/arch/mips/Kconfig 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/arch/mips/Kconfig 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig +--- linux.old/arch/mips/Kconfig 2006-06-18 17:31:54.000000000 +0200 ++++ linux.dev/arch/mips/Kconfig 2006-06-18 17:18:16.000000000 +0200 @@ -742,6 +742,19 @@ select SYS_SUPPORTS_BIG_ENDIAN select TOSHIBA_BOARDS @@ -30,9 +30,9 @@ diff -Nur linux-2.6.17/arch/mips/Kconfig linux-2.6.17-owrt/arch/mips/Kconfig default "7" if SGI_IP27 default "5" -diff -Nur linux-2.6.17/arch/mips/Makefile linux-2.6.17-owrt/arch/mips/Makefile ---- linux-2.6.17/arch/mips/Makefile 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/arch/mips/Makefile 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile +--- linux.old/arch/mips/Makefile 2006-06-18 17:31:54.000000000 +0200 ++++ linux.dev/arch/mips/Makefile 2006-06-18 17:18:16.000000000 +0200 @@ -580,6 +580,13 @@ load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000 @@ -47,9 +47,9 @@ diff -Nur linux-2.6.17/arch/mips/Makefile linux-2.6.17-owrt/arch/mips/Makefile # Toshiba RBTX4927 board or # Toshiba RBTX4937 board # -diff -Nur linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-owrt/arch/mips/mm/tlbex.c ---- linux-2.6.17/arch/mips/mm/tlbex.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/arch/mips/mm/tlbex.c 2006-06-18 15:26:55.000000000 +0200 +diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c +--- linux.old/arch/mips/mm/tlbex.c 2006-06-18 17:31:54.000000000 +0200 ++++ linux.dev/arch/mips/mm/tlbex.c 2006-06-18 17:18:16.000000000 +0200 @@ -876,7 +876,6 @@ case CPU_R10000: case CPU_R12000: @@ -66,9 +66,9 @@ diff -Nur linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-owrt/arch/mips/mm/tlbex case CPU_4KEC: case CPU_24K: case CPU_34K: -diff -Nur linux-2.6.17/arch/mips/pci/fixup-rb500.c linux-2.6.17-owrt/arch/mips/pci/fixup-rb500.c ---- linux-2.6.17/arch/mips/pci/fixup-rb500.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/pci/fixup-rb500.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb500.c +--- linux.old/arch/mips/pci/fixup-rb500.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/fixup-rb500.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,49 @@ +/* + * Copyright 2001 MontaVista Software Inc. @@ -119,17 +119,17 @@ diff -Nur linux-2.6.17/arch/mips/pci/fixup-rb500.c linux-2.6.17-owrt/arch/mips/p + return irq + GROUP4_IRQ_BASE + 4; +} + -diff -Nur linux-2.6.17/arch/mips/pci/Makefile linux-2.6.17-owrt/arch/mips/pci/Makefile ---- linux-2.6.17/arch/mips/pci/Makefile 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/arch/mips/pci/Makefile 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile +--- linux.old/arch/mips/pci/Makefile 2006-06-18 17:31:54.000000000 +0200 ++++ linux.dev/arch/mips/pci/Makefile 2006-06-18 17:18:16.000000000 +0200 @@ -57,3 +57,4 @@ obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup-tx4938.o ops-tx4938.o obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o +obj-$(CONFIG_MIKROTIK_RB500) += pci-rc32434.o ops-rc32434.o fixup-rb500.o -diff -Nur linux-2.6.17/arch/mips/pci/ops-rc32434.c linux-2.6.17-owrt/arch/mips/pci/ops-rc32434.c ---- linux-2.6.17/arch/mips/pci/ops-rc32434.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/pci/ops-rc32434.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32434.c +--- linux.old/arch/mips/pci/ops-rc32434.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/ops-rc32434.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,195 @@ +/************************************************************************** + * @@ -326,9 +326,9 @@ diff -Nur linux-2.6.17/arch/mips/pci/ops-rc32434.c linux-2.6.17-owrt/arch/mips/p + .read = pci_config_read, + .write = pci_config_write, +}; -diff -Nur linux-2.6.17/arch/mips/pci/pci-rc32434.c linux-2.6.17-owrt/arch/mips/pci/pci-rc32434.c ---- linux-2.6.17/arch/mips/pci/pci-rc32434.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/pci/pci-rc32434.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32434.c +--- linux.old/arch/mips/pci/pci-rc32434.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/pci-rc32434.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,234 @@ +/************************************************************************** + * @@ -564,9 +564,9 @@ diff -Nur linux-2.6.17/arch/mips/pci/pci-rc32434.c linux-2.6.17-owrt/arch/mips/p + +arch_initcall(rc32434_pci_init); + -diff -Nur linux-2.6.17/arch/mips/rb500/devices.c linux-2.6.17-owrt/arch/mips/rb500/devices.c ---- linux-2.6.17/arch/mips/rb500/devices.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/devices.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/rb500/devices.c linux.dev/arch/mips/rb500/devices.c +--- linux.old/arch/mips/rb500/devices.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/devices.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,211 @@ +#include <linux/kernel.h> +#include <linux/init.h> @@ -779,9 +779,9 @@ diff -Nur linux-2.6.17/arch/mips/rb500/devices.c linux-2.6.17-owrt/arch/mips/rb5 + +late_initcall(setup_mtd); +#endif -diff -Nur linux-2.6.17/arch/mips/rb500/early_serial.c linux-2.6.17-owrt/arch/mips/rb500/early_serial.c ---- linux-2.6.17/arch/mips/rb500/early_serial.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/early_serial.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/rb500/early_serial.c linux.dev/arch/mips/rb500/early_serial.c +--- linux.old/arch/mips/rb500/early_serial.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/early_serial.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,199 @@ +/************************************************************************** + * @@ -982,10 +982,10 @@ diff -Nur linux-2.6.17/arch/mips/rb500/early_serial.c linux-2.6.17-owrt/arch/mip + /* the modem controls don't leave the chip on this port, so leave them alone */ + *(port + (UART_MCR << s)) = 0; +} -diff -Nur linux-2.6.17/arch/mips/rb500/irq.c linux-2.6.17-owrt/arch/mips/rb500/irq.c ---- linux-2.6.17/arch/mips/rb500/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/irq.c 2006-06-18 15:24:39.000000000 +0200 -@@ -0,0 +1,266 @@ +diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c +--- linux.old/arch/mips/rb500/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/irq.c 2006-06-18 17:31:37.000000000 +0200 +@@ -0,0 +1,264 @@ +/* + * BRIEF MODULE DESCRIPTION + * RC32434 interrupt routines. @@ -1214,31 +1214,10 @@ diff -Nur linux-2.6.17/arch/mips/rb500/irq.c linux-2.6.17-owrt/arch/mips/rb500/i +}; + + -+/* Main Interrupt dispatcher */ -+asmlinkage void plat_irq_dispatch(struct pt_regs *regs) -+{ -+ unsigned int ip, pend, group; -+ volatile unsigned int *addr; -+ unsigned int cp0_cause = read_c0_cause() & read_c0_status(); -+ -+ if ((ip = (cp0_cause & 0x7c00))) { -+ group = 21 - rc32434_clz(ip); -+ -+ addr = intr_group[group].base_addr; -+ -+ pend = READ_PEND(addr); -+ pend &= ~READ_MASK(addr); // only unmasked interrupts -+ pend = 39 - rc32434_clz(pend); -+ do_IRQ((group << 5) + pend, regs); -+ } -+} -+ +void __init arch_init_irq(void) +{ + int i; -+ extern void rbIRQ(void); + -+ set_except_vector(0, rbIRQ); + printk("Initializing IRQ's: %d out of %d\n", RC32434_NR_IRQS, NR_IRQS); + memset(irq_desc, 0, sizeof(irq_desc)); + @@ -1251,19 +1230,38 @@ diff -Nur linux-2.6.17/arch/mips/rb500/irq.c linux-2.6.17-owrt/arch/mips/rb500/i + } +} + ++/* Main Interrupt dispatcher */ ++asmlinkage void plat_irq_dispatch(struct pt_regs *regs) ++{ ++ unsigned int ip, pend, group; ++ volatile unsigned int *addr; ++ unsigned int cp0_cause = read_c0_cause() & read_c0_status(); + -diff -Nur linux-2.6.17/arch/mips/rb500/Makefile linux-2.6.17-owrt/arch/mips/rb500/Makefile ---- linux-2.6.17/arch/mips/rb500/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/Makefile 2006-06-18 15:24:39.000000000 +0200 ++ if (cp0_cause & CAUSEF_IP7) { ++ ll_timer_interrupt(7, regs); ++ } else if ((ip = (cp0_cause & 0x7c00))) { ++ group = 21 - rc32434_clz(ip); ++ ++ addr = intr_group[group].base_addr; ++ ++ pend = READ_PEND(addr); ++ pend &= ~READ_MASK(addr); // only unmasked interrupts ++ pend = 39 - rc32434_clz(pend); ++ do_IRQ((group << 5) + pend, regs); ++ } ++} +diff -urN linux.old/arch/mips/rb500/Makefile linux.dev/arch/mips/rb500/Makefile +--- linux.old/arch/mips/rb500/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/Makefile 2006-06-18 17:36:48.000000000 +0200 @@ -0,0 +1,5 @@ +# +# Makefile for the RB500 board specific parts of the kernel +# + -+obj-y += irq.o time.o setup.o serial.o early_serial.o prom.o misc.o devices.o rbIRQ.o -diff -Nur linux-2.6.17/arch/mips/rb500/misc.c linux-2.6.17-owrt/arch/mips/rb500/misc.c ---- linux-2.6.17/arch/mips/rb500/misc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/misc.c 2006-06-18 15:24:39.000000000 +0200 ++obj-y += irq.o time.o setup.o serial.o early_serial.o prom.o misc.o devices.o +diff -urN linux.old/arch/mips/rb500/misc.c linux.dev/arch/mips/rb500/misc.c +--- linux.old/arch/mips/rb500/misc.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/misc.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,54 @@ +#include <linux/module.h> +#include <linux/kernel.h> /* printk() */ @@ -1319,9 +1317,9 @@ diff -Nur linux-2.6.17/arch/mips/rb500/misc.c linux-2.6.17-owrt/arch/mips/rb500/ +EXPORT_SYMBOL(gpio_get); +EXPORT_SYMBOL(set434Reg); +EXPORT_SYMBOL(changeLatchU5); -diff -Nur linux-2.6.17/arch/mips/rb500/prom.c linux-2.6.17-owrt/arch/mips/rb500/prom.c ---- linux-2.6.17/arch/mips/rb500/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/prom.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c +--- linux.old/arch/mips/rb500/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/prom.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,181 @@ +/* +* prom.c @@ -1504,75 +1502,9 @@ diff -Nur linux-2.6.17/arch/mips/rb500/prom.c linux-2.6.17-owrt/arch/mips/rb500/ + strcpy(arcs_cmdline,cmd_line); +} + -diff -Nur linux-2.6.17/arch/mips/rb500/rbIRQ.S linux-2.6.17-owrt/arch/mips/rb500/rbIRQ.S ---- linux-2.6.17/arch/mips/rb500/rbIRQ.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/rbIRQ.S 2006-06-18 15:24:39.000000000 +0200 -@@ -0,0 +1,62 @@ -+/* -+ * Copyright 2001 MontaVista Software Inc. -+ * Author: stevel@mvista.com -+ * -+ * Interrupt dispatcher for RB500 board. -+ * -+ * 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. -+ */ -+ -+#define __ASSEMBLY__ 1 -+ -+#include <asm/asm.h> -+#include <asm/mipsregs.h> -+#include <asm/regdef.h> -+#include <asm/stackframe.h> -+ -+ .text -+ .set noreorder -+ .set noat -+ .align 5 -+ NESTED(rbIRQ, PT_SIZE, sp) -+ .set noat -+ SAVE_ALL -+ CLI -+ -+ .set at -+ .set noreorder -+ -+ /* Get the pending interrupts */ -+ mfc0 t0, CP0_CAUSE -+ nop -+ -+ /* Isolate the allowed ones by anding the irq mask */ -+ mfc0 t2, CP0_STATUS -+ move a1, sp /* need a nop here, hence we anticipate */ -+ andi t0, CAUSEF_IP -+ and t0, t2 -+ -+ /* check for r4k counter/timer IRQ. */ -+ -+ andi t1, t0, CAUSEF_IP7 -+ beqz t1, 1f -+ nop -+ -+ jal ll_timer_interrupt -+ -+ li a0, 7 -+ -+ j ret_from_irq -+ nop -+1: -+ jal plat_irq_dispatch -+ move a0, t0 -+ j ret_from_irq -+ nop -+ -+ END(rbIRQ) -+ -+ -diff -Nur linux-2.6.17/arch/mips/rb500/serial.c linux-2.6.17-owrt/arch/mips/rb500/serial.c ---- linux-2.6.17/arch/mips/rb500/serial.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/serial.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c +--- linux.old/arch/mips/rb500/serial.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/serial.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,79 @@ +/************************************************************************** + * @@ -1653,9 +1585,9 @@ diff -Nur linux-2.6.17/arch/mips/rb500/serial.c linux-2.6.17-owrt/arch/mips/rb50 + + return(0); +} -diff -Nur linux-2.6.17/arch/mips/rb500/setup.c linux-2.6.17-owrt/arch/mips/rb500/setup.c ---- linux-2.6.17/arch/mips/rb500/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/setup.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c +--- linux.old/arch/mips/rb500/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/setup.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,84 @@ +/* + * setup.c - boot time setup code @@ -1741,9 +1673,9 @@ diff -Nur linux-2.6.17/arch/mips/rb500/setup.c linux-2.6.17-owrt/arch/mips/rb500 +{ + return "MIPS RB500"; +} -diff -Nur linux-2.6.17/arch/mips/rb500/time.c linux-2.6.17-owrt/arch/mips/rb500/time.c ---- linux-2.6.17/arch/mips/rb500/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/arch/mips/rb500/time.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c +--- linux.old/arch/mips/rb500/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/rb500/time.c 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,94 @@ +/* +**************************************************************************** @@ -1839,9 +1771,9 @@ diff -Nur linux-2.6.17/arch/mips/rb500/time.c linux-2.6.17-owrt/arch/mips/rb500/ + write_c0_compare(r4k_cur); +} + -diff -Nur linux-2.6.17/drivers/mtd/devices/block2mtd.c linux-2.6.17-owrt/drivers/mtd/devices/block2mtd.c ---- linux-2.6.17/drivers/mtd/devices/block2mtd.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/drivers/mtd/devices/block2mtd.c 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/devices/block2mtd.c +--- linux.old/drivers/mtd/devices/block2mtd.c 2006-06-18 17:31:54.000000000 +0200 ++++ linux.dev/drivers/mtd/devices/block2mtd.c 2006-06-18 17:18:16.000000000 +0200 @@ -26,7 +26,6 @@ #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) #define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) @@ -1942,9 +1874,9 @@ diff -Nur linux-2.6.17/drivers/mtd/devices/block2mtd.c linux-2.6.17-owrt/drivers static int __init block2mtd_init(void) { -diff -Nur linux-2.6.17/drivers/pci/Makefile linux-2.6.17-owrt/drivers/pci/Makefile ---- linux-2.6.17/drivers/pci/Makefile 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/drivers/pci/Makefile 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/drivers/pci/Makefile linux.dev/drivers/pci/Makefile +--- linux.old/drivers/pci/Makefile 2006-06-18 17:31:54.000000000 +0200 ++++ linux.dev/drivers/pci/Makefile 2006-06-18 17:18:16.000000000 +0200 @@ -27,6 +27,7 @@ obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o obj-$(CONFIG_X86_VISWS) += setup-irq.o @@ -1953,9 +1885,9 @@ diff -Nur linux-2.6.17/drivers/pci/Makefile linux-2.6.17-owrt/drivers/pci/Makefi # # ACPI Related PCI FW Functions -diff -Nur linux-2.6.17/include/asm-mips/bootinfo.h linux-2.6.17-owrt/include/asm-mips/bootinfo.h ---- linux-2.6.17/include/asm-mips/bootinfo.h 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/include/asm-mips/bootinfo.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h +--- linux.old/include/asm-mips/bootinfo.h 2006-06-18 17:31:54.000000000 +0200 ++++ linux.dev/include/asm-mips/bootinfo.h 2006-06-18 17:18:16.000000000 +0200 @@ -218,6 +218,8 @@ #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ @@ -1965,9 +1897,9 @@ diff -Nur linux-2.6.17/include/asm-mips/bootinfo.h linux-2.6.17-owrt/include/asm #define CL_SIZE COMMAND_LINE_SIZE const char *get_system_type(void); -diff -Nur linux-2.6.17/include/asm-mips/cpu.h linux-2.6.17-owrt/include/asm-mips/cpu.h ---- linux-2.6.17/include/asm-mips/cpu.h 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/include/asm-mips/cpu.h 2006-06-18 15:25:55.000000000 +0200 +diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h +--- linux.old/include/asm-mips/cpu.h 2006-06-18 17:31:54.000000000 +0200 ++++ linux.dev/include/asm-mips/cpu.h 2006-06-18 17:18:16.000000000 +0200 @@ -200,7 +200,8 @@ #define CPU_SB1A 62 #define CPU_74K 63 @@ -1978,9 +1910,9 @@ diff -Nur linux-2.6.17/include/asm-mips/cpu.h linux-2.6.17-owrt/include/asm-mips /* * ISA Level encodings -diff -Nur linux-2.6.17/include/asm-mips/rc32434/crom.h linux-2.6.17-owrt/include/asm-mips/rc32434/crom.h ---- linux-2.6.17/include/asm-mips/rc32434/crom.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/crom.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/crom.h linux.dev/include/asm-mips/rc32434/crom.h +--- linux.old/include/asm-mips/rc32434/crom.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/crom.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,98 @@ +#ifndef __IDT_CROM_H__ +#define __IDT_CROM_H__ @@ -2080,9 +2012,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/crom.h linux-2.6.17-owrt/include +} ; + +#endif // __IDT_CROM_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/ddr.h linux-2.6.17-owrt/include/asm-mips/rc32434/ddr.h ---- linux-2.6.17/include/asm-mips/rc32434/ddr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/ddr.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/ddr.h linux.dev/include/asm-mips/rc32434/ddr.h +--- linux.old/include/asm-mips/rc32434/ddr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/ddr.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,175 @@ +#ifndef __IDT_DDR_H__ +#define __IDT_DDR_H__ @@ -2259,9 +2191,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/ddr.h linux-2.6.17-owrt/include/ +} ; + +#endif // __IDT_DDR_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/dev.h linux-2.6.17-owrt/include/asm-mips/rc32434/dev.h ---- linux-2.6.17/include/asm-mips/rc32434/dev.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/dev.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/dev.h linux.dev/include/asm-mips/rc32434/dev.h +--- linux.old/include/asm-mips/rc32434/dev.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/dev.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,134 @@ +#ifndef __IDT_DEV_H__ +#define __IDT_DEV_H__ @@ -2397,9 +2329,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/dev.h linux-2.6.17-owrt/include/ + +#endif //__IDT_DEV_H__ + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/dma.h linux-2.6.17-owrt/include/asm-mips/rc32434/dma.h ---- linux-2.6.17/include/asm-mips/rc32434/dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/dma.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/dma.h linux.dev/include/asm-mips/rc32434/dma.h +--- linux.old/include/asm-mips/rc32434/dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/dma.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,202 @@ +#ifndef __IDT_DMA_H__ +#define __IDT_DMA_H__ @@ -2603,9 +2535,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/dma.h linux-2.6.17-owrt/include/ + +#endif // __IDT_DMA_H__ + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/dma_v.h linux-2.6.17-owrt/include/asm-mips/rc32434/dma_v.h ---- linux-2.6.17/include/asm-mips/rc32434/dma_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/dma_v.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/dma_v.h linux.dev/include/asm-mips/rc32434/dma_v.h +--- linux.old/include/asm-mips/rc32434/dma_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/dma_v.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,73 @@ +#ifndef __IDT_DMA_V_H__ +#define __IDT_DMA_V_H__ @@ -2680,9 +2612,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/dma_v.h linux-2.6.17-owrt/includ + + + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/eth.h linux-2.6.17-owrt/include/asm-mips/rc32434/eth.h ---- linux-2.6.17/include/asm-mips/rc32434/eth.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/eth.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/eth.h linux.dev/include/asm-mips/rc32434/eth.h +--- linux.old/include/asm-mips/rc32434/eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/eth.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,322 @@ +#ifndef __IDT_ETH_H__ +#define __IDT_ETH_H__ @@ -3006,9 +2938,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/eth.h linux-2.6.17-owrt/include/ + + + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/eth_v.h linux-2.6.17-owrt/include/asm-mips/rc32434/eth_v.h ---- linux-2.6.17/include/asm-mips/rc32434/eth_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/eth_v.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/eth_v.h linux.dev/include/asm-mips/rc32434/eth_v.h +--- linux.old/include/asm-mips/rc32434/eth_v.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/eth_v.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,64 @@ +#ifndef __IDT_ETH_V_H__ +#define __IDT_ETH_V_H__ @@ -3074,9 +3006,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/eth_v.h linux-2.6.17-owrt/includ + + + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/gpio.h linux-2.6.17-owrt/include/asm-mips/rc32434/gpio.h ---- linux-2.6.17/include/asm-mips/rc32434/gpio.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/gpio.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/gpio.h linux.dev/include/asm-mips/rc32434/gpio.h +--- linux.old/include/asm-mips/rc32434/gpio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/gpio.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,182 @@ +#ifndef __IDT_GPIO_H__ +#define __IDT_GPIO_H__ @@ -3260,9 +3192,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/gpio.h linux-2.6.17-owrt/include + +#endif // __IDT_GPIO_H__ + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/i2c.h linux-2.6.17-owrt/include/asm-mips/rc32434/i2c.h ---- linux-2.6.17/include/asm-mips/rc32434/i2c.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/i2c.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/i2c.h linux.dev/include/asm-mips/rc32434/i2c.h +--- linux.old/include/asm-mips/rc32434/i2c.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/i2c.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,147 @@ +#ifndef __IDT_I2C_H__ +#define __IDT_I2C_H__ @@ -3411,9 +3343,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/i2c.h linux-2.6.17-owrt/include/ + +} ; +#endif // __IDT_I2C_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/integ.h linux-2.6.17-owrt/include/asm-mips/rc32434/integ.h ---- linux-2.6.17/include/asm-mips/rc32434/integ.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/integ.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/integ.h linux.dev/include/asm-mips/rc32434/integ.h +--- linux.old/include/asm-mips/rc32434/integ.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/integ.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,78 @@ +#ifndef __IDT_INTEG_H__ +#define __IDT_INTEG_H__ @@ -3493,9 +3425,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/integ.h linux-2.6.17-owrt/includ +} ; + +#endif // __IDT_INTEG_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/int.h linux-2.6.17-owrt/include/asm-mips/rc32434/int.h ---- linux-2.6.17/include/asm-mips/rc32434/int.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/int.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/int.h linux.dev/include/asm-mips/rc32434/int.h +--- linux.old/include/asm-mips/rc32434/int.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/int.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,167 @@ +#ifndef __IDT_INT_H__ +#define __IDT_INT_H__ @@ -3664,9 +3596,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/int.h linux-2.6.17-owrt/include/ +#endif // __IDT_INT_H__ + + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/iparb.h linux-2.6.17-owrt/include/asm-mips/rc32434/iparb.h ---- linux-2.6.17/include/asm-mips/rc32434/iparb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/iparb.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/iparb.h linux.dev/include/asm-mips/rc32434/iparb.h +--- linux.old/include/asm-mips/rc32434/iparb.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/iparb.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,95 @@ +#ifndef __IDT_IPARB_H__ +#define __IDT_IPARB_H__ @@ -3763,9 +3695,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/iparb.h linux-2.6.17-owrt/includ +}; + +#endif // __IDT_IPARB_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/irm.h linux-2.6.17-owrt/include/asm-mips/rc32434/irm.h ---- linux-2.6.17/include/asm-mips/rc32434/irm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/irm.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/irm.h linux.dev/include/asm-mips/rc32434/irm.h +--- linux.old/include/asm-mips/rc32434/irm.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/irm.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,55 @@ +#ifndef __IDT_IRM_H__ +#define __IDT_IRM_H__ @@ -3822,9 +3754,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/irm.h linux-2.6.17-owrt/include/ +} IRM_Offset_t ; + +#endif // __IDT_IRM_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/irq.h linux-2.6.17-owrt/include/asm-mips/rc32434/irq.h ---- linux-2.6.17/include/asm-mips/rc32434/irq.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/irq.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/irq.h linux.dev/include/asm-mips/rc32434/irq.h +--- linux.old/include/asm-mips/rc32434/irq.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/irq.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,8 @@ +#ifndef __ASM_MACH_MIPS_IRQ_H +#define __ASM_MACH_MIPS_IRQ_H @@ -3834,9 +3766,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/irq.h linux-2.6.17-owrt/include/ +#define NR_IRQS 256 + +#endif /* __ASM_MACH_MIPS_IRQ_H */ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/nvram.h linux-2.6.17-owrt/include/asm-mips/rc32434/nvram.h ---- linux-2.6.17/include/asm-mips/rc32434/nvram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/nvram.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/nvram.h linux.dev/include/asm-mips/rc32434/nvram.h +--- linux.old/include/asm-mips/rc32434/nvram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/nvram.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,97 @@ +#ifndef __IDT_NVRAM_H +#define __IDT_NVRAM_H @@ -3935,9 +3867,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/nvram.h linux-2.6.17-owrt/includ + +#endif // __IDT_NVRAM_H__ + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/pci.h linux-2.6.17-owrt/include/asm-mips/rc32434/pci.h ---- linux-2.6.17/include/asm-mips/rc32434/pci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/pci.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/pci.h linux.dev/include/asm-mips/rc32434/pci.h +--- linux.old/include/asm-mips/rc32434/pci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/pci.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,695 @@ +/************************************************************************** + * @@ -4634,9 +4566,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/pci.h linux-2.6.17-owrt/include/ + + + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/pcikorina.h linux-2.6.17-owrt/include/asm-mips/rc32434/pcikorina.h ---- linux-2.6.17/include/asm-mips/rc32434/pcikorina.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/pcikorina.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/pcikorina.h linux.dev/include/asm-mips/rc32434/pcikorina.h +--- linux.old/include/asm-mips/rc32434/pcikorina.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/pcikorina.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,209 @@ +/* $Id: pciacacia.h,v 1.5 2001/05/01 10:09:17 carstenl Exp $ + * @@ -4847,9 +4779,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/pcikorina.h linux-2.6.17-owrt/in + + + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/pci_regs.h linux-2.6.17-owrt/include/asm-mips/rc32434/pci_regs.h ---- linux-2.6.17/include/asm-mips/rc32434/pci_regs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/pci_regs.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/pci_regs.h linux.dev/include/asm-mips/rc32434/pci_regs.h +--- linux.old/include/asm-mips/rc32434/pci_regs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/pci_regs.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,8 @@ +/* Override the default address space for this arch +*/ @@ -4859,9 +4791,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/pci_regs.h linux-2.6.17-owrt/inc +//#undef PCI_BASE_ADDRESS_SPACE +//#define PCI_BASE_ADDRESS_SPACE PCI_BASE_ADDRESS_SPACE_MEMORY + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/rb.h linux-2.6.17-owrt/include/asm-mips/rc32434/rb.h ---- linux-2.6.17/include/asm-mips/rc32434/rb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/rb.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/rb.h linux.dev/include/asm-mips/rc32434/rb.h +--- linux.old/include/asm-mips/rc32434/rb.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/rb.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,69 @@ +#ifndef __MIPS_RB_H__ +#define __MIPS_RB_H__ @@ -4932,9 +4864,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/rb.h linux-2.6.17-owrt/include/a +}; + +#endif -diff -Nur linux-2.6.17/include/asm-mips/rc32434/rc32434.h linux-2.6.17-owrt/include/asm-mips/rc32434/rc32434.h ---- linux-2.6.17/include/asm-mips/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/rc32434.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mips/rc32434/rc32434.h +--- linux.old/include/asm-mips/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/rc32434.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,126 @@ +/* + *************************************************************************** @@ -5062,9 +4994,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/rc32434.h linux-2.6.17-owrt/incl +extern void cons_puts(char *s); + +#endif /* _RC32434_H_ */ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/rst.h linux-2.6.17-owrt/include/asm-mips/rc32434/rst.h ---- linux-2.6.17/include/asm-mips/rc32434/rst.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/rst.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/rst.h linux.dev/include/asm-mips/rc32434/rst.h +--- linux.old/include/asm-mips/rc32434/rst.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/rst.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,105 @@ +#ifndef __IDT_RST_H__ +#define __IDT_RST_H__ @@ -5171,9 +5103,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/rst.h linux-2.6.17-owrt/include/ + BCV_delayByPass_m = 0x00008000, +} ; +#endif // __IDT_RST_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/spi.h linux-2.6.17-owrt/include/asm-mips/rc32434/spi.h ---- linux-2.6.17/include/asm-mips/rc32434/spi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/spi.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/spi.h linux.dev/include/asm-mips/rc32434/spi.h +--- linux.old/include/asm-mips/rc32434/spi.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/spi.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,100 @@ +#ifndef __IDT_SPI_H__ +#define __IDT_SPI_H__ @@ -5275,9 +5207,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/spi.h linux-2.6.17-owrt/include/ + SIOD_sck_m = 0x00000004, +} ; +#endif // __IDT_SPI_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/timer.h linux-2.6.17-owrt/include/asm-mips/rc32434/timer.h ---- linux-2.6.17/include/asm-mips/rc32434/timer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/timer.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/timer.h linux.dev/include/asm-mips/rc32434/timer.h +--- linux.old/include/asm-mips/rc32434/timer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/timer.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,91 @@ +/************************************************************************** + * @@ -5370,9 +5302,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/timer.h linux-2.6.17-owrt/includ +} ; +#endif // __IDT_TIM_H__ + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/tim.h linux-2.6.17-owrt/include/asm-mips/rc32434/tim.h ---- linux-2.6.17/include/asm-mips/rc32434/tim.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/tim.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/tim.h linux.dev/include/asm-mips/rc32434/tim.h +--- linux.old/include/asm-mips/rc32434/tim.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/tim.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,78 @@ +#ifndef __IDT_TIM_H__ +#define __IDT_TIM_H__ @@ -5452,9 +5384,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/tim.h linux-2.6.17-owrt/include/ +} ; +#endif // __IDT_TIM_H__ + -diff -Nur linux-2.6.17/include/asm-mips/rc32434/types.h linux-2.6.17-owrt/include/asm-mips/rc32434/types.h ---- linux-2.6.17/include/asm-mips/rc32434/types.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/types.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/types.h linux.dev/include/asm-mips/rc32434/types.h +--- linux.old/include/asm-mips/rc32434/types.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/types.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,39 @@ +#ifndef __IDT_TYPES_H__ +#define __IDT_TYPES_H__ @@ -5495,9 +5427,9 @@ diff -Nur linux-2.6.17/include/asm-mips/rc32434/types.h linux-2.6.17-owrt/includ +#endif // __cplusplus + +#endif // __IDT_TYPES_H__ -diff -Nur linux-2.6.17/include/asm-mips/rc32434/uart.h linux-2.6.17-owrt/include/asm-mips/rc32434/uart.h ---- linux-2.6.17/include/asm-mips/rc32434/uart.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/include/asm-mips/rc32434/uart.h 2006-06-18 15:24:39.000000000 +0200 +diff -urN linux.old/include/asm-mips/rc32434/uart.h linux.dev/include/asm-mips/rc32434/uart.h +--- linux.old/include/asm-mips/rc32434/uart.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/rc32434/uart.h 2006-06-18 17:18:16.000000000 +0200 @@ -0,0 +1,178 @@ +#ifndef __IDT_UART_H__ +#define __IDT_UART_H__ From 0c327ae79d2df80a7a01fd8528096729d1ebbe99 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Mon, 19 Jun 2006 18:28:08 +0000 Subject: [PATCH 229/757] update Aruba config for 2.6.17 SVN-Revision: 4008 --- openwrt/target/linux/aruba-2.6/config | 121 ++++++++++++++------------ 1 file changed, 65 insertions(+), 56 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/config b/openwrt/target/linux/aruba-2.6/config index d49ea058ebb..7385a47f869 100644 --- a/openwrt/target/linux/aruba-2.6/config +++ b/openwrt/target/linux/aruba-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16 -# Mon Mar 20 14:06:58 2006 +# Linux kernel version: 2.6.17 +# Mon Jun 19 13:09:29 2006 # CONFIG_MIPS=y @@ -65,7 +65,10 @@ CONFIG_MACH_ARUBA=y # CONFIG_TOSHIBA_RBTX4927 is not set # CONFIG_TOSHIBA_RBTX4938 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -114,9 +117,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_CPU_HAS_PREFETCH=y # CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set -CONFIG_CPU_ADVANCED=y CONFIG_CPU_HAS_LLSC=y -# CONFIG_CPU_HAS_WB is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -153,6 +154,7 @@ CONFIG_SYSVIPC=y CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_EMBEDDED=y @@ -165,10 +167,6 @@ CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 @@ -181,7 +179,6 @@ CONFIG_OBSOLETE_INTERMODULE=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set @@ -190,6 +187,8 @@ CONFIG_OBSOLETE_MODPARM=y # Block layer # # CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set # # IO Schedulers @@ -209,7 +208,6 @@ CONFIG_DEFAULT_IOSCHED="deadline" # CONFIG_HW_HAS_PCI=y CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set CONFIG_MMU=y # @@ -249,12 +247,13 @@ CONFIG_IP_FIB_HASH=y # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set +# CONFIG_IPSEC_NAT_TRAVERSAL is not set # CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set -# CONFIG_IPSEC_NAT_TRAVERSAL is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set # CONFIG_INET_DIAG is not set # CONFIG_TCP_CONG_ADVANCED is not set @@ -266,9 +265,11 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IP_VS is not set CONFIG_IPV6=m # CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_INET6_AH is not set # CONFIG_INET6_ESP is not set # CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set # CONFIG_IPV6_TUNNEL is not set CONFIG_NETFILTER=y @@ -287,11 +288,13 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y # CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set # CONFIG_NETFILTER_XT_MATCH_REALM is not set # CONFIG_NETFILTER_XT_MATCH_SCTP is not set @@ -313,24 +316,24 @@ CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=y CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_LAYER7=m -# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_TIME=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_IMQ=m @@ -349,6 +352,7 @@ CONFIG_IP_NF_NAT_FTP=y CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m @@ -398,6 +402,7 @@ CONFIG_IP_NF_TARGET_SET=m CONFIG_BRIDGE=y CONFIG_VLAN_8021Q=y # CONFIG_DECNET is not set +CONFIG_LLC=y # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -493,6 +498,7 @@ CONFIG_BT_HCIUART_BCSP=y # CONFIG_BT_HCIBFUSB is not set # CONFIG_BT_HCIVHCI is not set # CONFIG_IEEE80211 is not set +CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -554,7 +560,6 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_OTP is not set # CONFIG_MTD_CFI_INTELEXT is not set CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_AMDSTD_RETRY=0 # CONFIG_MTD_CFI_STAA is not set CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set @@ -580,7 +585,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1 # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set # CONFIG_MTD_BLOCK2MTD is not set # @@ -623,7 +627,7 @@ CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 +# CONFIG_BLK_DEV_INITRD is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -687,7 +691,6 @@ CONFIG_BLK_DEV_SD=m # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -818,6 +821,7 @@ CONFIG_NATSEMI=y # Wireless LAN (non-hamradio) # CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y # # Obsolete Wireless cards support (pre-802.11) @@ -827,6 +831,8 @@ CONFIG_NET_RADIO=y # # Wireless 802.11b ISA/PCI cards support # +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set # CONFIG_HERMES is not set # CONFIG_ATMEL is not set @@ -909,6 +915,7 @@ CONFIG_INPUT=m # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_PCI is not set CONFIG_SERIAL_8250_NR_UARTS=2 CONFIG_SERIAL_8250_RUNTIME_UARTS=2 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -992,41 +999,42 @@ CONFIG_WATCHDOG=y # Misc devices # -# -# Multimedia Capabilities Port drivers -# - # # Multimedia devices # CONFIG_VIDEO_DEV=m +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y # -# Video For Linux +# Video Capture Adapters # # -# Video Adapters +# Video Capture Adapters # # CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VIDEO_CPIA2 is not set + +# +# Encoders and Decoders +# + +# +# V4L USB devices +# # # Radio Adapters # -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set # # Graphics support @@ -1051,6 +1059,7 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_PCM_OSS is not set # CONFIG_SND_DYNAMIC_MINORS is not set # CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set @@ -1066,6 +1075,7 @@ CONFIG_SND_RAWMIDI=m # PCI devices # # CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP_MODEM is not set @@ -1126,6 +1136,7 @@ CONFIG_SND_USB_AUDIO=m # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=m # CONFIG_USB_DEBUG is not set @@ -1151,9 +1162,6 @@ CONFIG_USB_UHCI_HCD=m # # USB Device Class drivers # -CONFIG_OBSOLETE_OSS_USB_DRIVER=y -CONFIG_USB_AUDIO=m -# CONFIG_USB_MIDI is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m @@ -1191,9 +1199,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set +# CONFIG_USB_TOUCHSCREEN is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1207,21 +1213,6 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -CONFIG_USB_PWC=m - # # USB Network Adapters # @@ -1274,6 +1265,19 @@ CONFIG_USB_MON=y # # CONFIG_MMC is not set +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + # # InfiniBand support # @@ -1283,6 +1287,11 @@ CONFIG_USB_MON=y # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + # # File systems # @@ -1342,7 +1351,6 @@ CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1461,6 +1469,7 @@ CONFIG_NLS_UTF8=m # CONFIG_MAGIC_SYSRQ is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_FS is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" From 3763da2cc535cb34897819a1337f7abf4a60bf22 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 19 Jun 2006 19:59:53 +0000 Subject: [PATCH 230/757] remove the wl.o build from the kernel patch and move the driver along with wl, nas and wlc into packages/broadcom-wl SVN-Revision: 4009 --- openwrt/package/broadcom-wl/Makefile | 96 + openwrt/package/broadcom-wl/src/kmod/Makefile | 32 + openwrt/package/broadcom-wl/src/kmod/bcmip.h | 101 + .../package/broadcom-wl/src/kmod/bcmutils.c | 857 +++++ openwrt/package/broadcom-wl/src/kmod/hnddma.c | 1157 ++++++ openwrt/package/broadcom-wl/src/kmod/hnddma.h | 156 + .../package/broadcom-wl/src/kmod/linux_osl.c | 269 ++ .../package/broadcom-wl/src/kmod/linux_osl.h | 171 + .../broadcom-wl/src/kmod/patchtable.pl | 54 + openwrt/package/broadcom-wl/src/kmod/pktq.h | 97 + .../package/broadcom-wl/src/kmod/sbhnddma.h | 284 ++ .../{wlc/src => broadcom-wl/src/wlc}/Makefile | 0 .../src/wlc}/include/bcmdefs.h | 0 .../src/wlc}/include/bcmutils.h | 0 .../src/wlc}/include/proto/802.11.h | 0 .../src/wlc}/include/proto/bcmeth.h | 0 .../src/wlc}/include/proto/bcmevent.h | 0 .../src/wlc}/include/proto/ethernet.h | 0 .../src/wlc}/include/proto/wpa.h | 0 .../src/wlc}/include/typedefs.h | 0 .../src/wlc}/include/wlioctl.h | 0 .../src/wlc}/include/wlutils.h | 0 .../{wlc/src => broadcom-wl/src/wlc}/ioctl.c | 0 .../{wlc/src => broadcom-wl/src/wlc}/wlc.c | 0 openwrt/package/wlc/Makefile | 40 - openwrt/target/linux/brcm-2.4/Config.in | 8 - openwrt/target/linux/brcm-2.4/Makefile | 39 - openwrt/target/linux/brcm-2.4/config | 3 - .../linux/brcm-2.4/patches/001-bcm47xx.patch | 3252 +---------------- 29 files changed, 3275 insertions(+), 3341 deletions(-) create mode 100644 openwrt/package/broadcom-wl/Makefile create mode 100644 openwrt/package/broadcom-wl/src/kmod/Makefile create mode 100644 openwrt/package/broadcom-wl/src/kmod/bcmip.h create mode 100644 openwrt/package/broadcom-wl/src/kmod/bcmutils.c create mode 100644 openwrt/package/broadcom-wl/src/kmod/hnddma.c create mode 100644 openwrt/package/broadcom-wl/src/kmod/hnddma.h create mode 100644 openwrt/package/broadcom-wl/src/kmod/linux_osl.c create mode 100644 openwrt/package/broadcom-wl/src/kmod/linux_osl.h create mode 100644 openwrt/package/broadcom-wl/src/kmod/patchtable.pl create mode 100644 openwrt/package/broadcom-wl/src/kmod/pktq.h create mode 100644 openwrt/package/broadcom-wl/src/kmod/sbhnddma.h rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/Makefile (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/bcmdefs.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/bcmutils.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/proto/802.11.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/proto/bcmeth.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/proto/bcmevent.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/proto/ethernet.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/proto/wpa.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/typedefs.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/wlioctl.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/include/wlutils.h (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/ioctl.c (100%) rename openwrt/package/{wlc/src => broadcom-wl/src/wlc}/wlc.c (100%) delete mode 100644 openwrt/package/wlc/Makefile delete mode 100644 openwrt/target/linux/brcm-2.4/Config.in diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile new file mode 100644 index 00000000000..782dfdaf574 --- /dev/null +++ b/openwrt/package/broadcom-wl/Makefile @@ -0,0 +1,96 @@ +# $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=broadcom-wl +PKG_VERSION:=4.80.9.2 +PKG_RELEASE:=1 +WLC_VERSION:=0.1 + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources +PKG_MD5SUM:=8ff7481425e0b04fc66f2bf950474cbc +PKG_CAT:=bzcat + +include $(TOPDIR)/package/rules.mk + +define Package/kmod-brcm-wl + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@LINUX_2_4_BRCM + DEFAULT:=y + MENU:=1 + TITLE:=Proprietary BCM43xx WiFi driver + DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE) +endef + +define Package/wlc + $(call Package/kmod-brcm-wl) + DEPENDS:=kmod-brcm-wl + TITLE:=Setup utility + DESCRIPTION:=Utility for initializing the Broadcom wl driver + VERSION:=$(WLC_VERSION)-$(PKG_RELEASE) +endef + +define Package/wl + $(call Package/wlc) + TITLE:=Utility for changing the driver's parameters + DESCRIPTION:=Utility for changing the Broadcom wl driver's parameters + VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) +endef + +define Package/nas + $(call Package/wl) + TITLE:=Proprietary WPA/WPA2 authenticator + DESCRIPTION:=Proprietary WPA/WPA2 authenticator for the Broadcom wl driver +endef + +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + # Compile the kernel part + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + PATH="$(TARGET_PATH)" \ + SUBDIRS="$(PKG_BUILD_DIR)/kmod" \ + modules + + # Compile wlc + $(MAKE) -C $(PKG_BUILD_DIR)/wlc \ + $(TARGET_CONFIGURE_OPTS) \ + CC="$(TARGET_CC)" \ + CFLAGS="-I$(PKG_BUILD_DIR)/wlc/include $(TARGET_CFLAGS)" \ + all +endef + +define Package/kmod-brcm-wl/install + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) + install -m0644 $(PKG_BUILD_DIR)/kmod/wl.o $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +define Package/wlc/install + install -d -m0755 $(1)/sbin + install -m0755 $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/ +endef + +define Package/wl/install + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/ +endef + +define Package/nas/install + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,kmod-brcm-wl)) +$(eval $(call BuildPackage,wlc)) +$(eval $(call BuildPackage,wl)) +$(eval $(call BuildPackage,nas)) diff --git a/openwrt/package/broadcom-wl/src/kmod/Makefile b/openwrt/package/broadcom-wl/src/kmod/Makefile new file mode 100644 index 00000000000..672384035f9 --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/Makefile @@ -0,0 +1,32 @@ +# +# Makefile for the Broadcom wl driver +# +# Copyright 2004, Broadcom Corporation +# All Rights Reserved. +# +# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY +# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM +# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS +# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. +# +# $Id: Makefile,v 1.2 2005/03/29 03:32:18 mbm Exp $ + +EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER + +O_TARGET := wl_link.o + +obj-y := wl_mod.o +obj-y += bcmutils.o hnddma.o linux_osl.o + +obj-m := $(O_TARGET) + +wl_mod.o: wl_apsta.o + sed -e 's,eth%d,wl%d\x00,g' < $< > $@ + +wl.o: wl_link.o + $(OBJDUMP) -d $< | perl patchtable.pl > patchtable.bin + cat wl_link.o patchtable.bin > $@ + +modules: wl.o + +include $(TOPDIR)/Rules.make diff --git a/openwrt/package/broadcom-wl/src/kmod/bcmip.h b/openwrt/package/broadcom-wl/src/kmod/bcmip.h new file mode 100644 index 00000000000..423a0e5c5c1 --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/bcmip.h @@ -0,0 +1,101 @@ +/* + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * Fundamental constants relating to IP Protocol + * + * $Id: bcmip.h,v 1.1.1.3 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _bcmip_h_ +#define _bcmip_h_ + +/* IPV4 and IPV6 common */ +#define IP_VER_OFFSET 0x0 /* offset to version field */ +#define IP_VER_MASK 0xf0 /* version mask */ +#define IP_VER_SHIFT 4 /* version shift */ +#define IP_VER_4 4 /* version number for IPV4 */ +#define IP_VER_6 6 /* version number for IPV6 */ + +#define IP_VER(ip_body) \ + ((((uint8 *)(ip_body))[IP_VER_OFFSET] & IP_VER_MASK) >> IP_VER_SHIFT) + +#define IP_PROT_ICMP 0x1 /* ICMP protocol */ +#define IP_PROT_TCP 0x6 /* TCP protocol */ +#define IP_PROT_UDP 0x11 /* UDP protocol type */ + +/* IPV4 field offsets */ +#define IPV4_VER_HL_OFFSET 0 /* version and ihl byte offset */ +#define IPV4_TOS_OFFSET 1 /* type of service offset */ +#define IPV4_PROT_OFFSET 9 /* protocol type offset */ +#define IPV4_CHKSUM_OFFSET 10 /* IP header checksum offset */ +#define IPV4_SRC_IP_OFFSET 12 /* src IP addr offset */ +#define IPV4_DEST_IP_OFFSET 16 /* dest IP addr offset */ + +/* IPV4 field decodes */ +#define IPV4_VER_MASK 0xf0 /* IPV4 version mask */ +#define IPV4_VER_SHIFT 4 /* IPV4 version shift */ + +#define IPV4_HLEN_MASK 0x0f /* IPV4 header length mask */ +#define IPV4_HLEN(ipv4_body) (4 * (((uint8 *)(ipv4_body))[IPV4_VER_HL_OFFSET] & IPV4_HLEN_MASK)) + +#define IPV4_ADDR_LEN 4 /* IPV4 address length */ + +#define IPV4_ADDR_NULL(a) ((((uint8 *)(a))[0] | ((uint8 *)(a))[1] | \ + ((uint8 *)(a))[2] | ((uint8 *)(a))[3]) == 0) + +#define IPV4_TOS_DSCP_MASK 0xfc /* DiffServ codepoint mask */ +#define IPV4_TOS_DSCP_SHIFT 2 /* DiffServ codepoint shift */ + +#define IPV4_TOS(ipv4_body) (((uint8 *)(ipv4_body))[IPV4_TOS_OFFSET]) + +#define IPV4_TOS_PREC_MASK 0xe0 /* Historical precedence mask */ +#define IPV4_TOS_PREC_SHIFT 5 /* Historical precedence shift */ + +#define IPV4_TOS_LOWDELAY 0x10 /* Lowest delay requested */ +#define IPV4_TOS_THROUGHPUT 0x8 /* Best throughput requested */ +#define IPV4_TOS_RELIABILITY 0x4 /* Most reliable delivery requested */ + +#define IPV4_PROT(ipv4_body) (((uint8 *)(ipv4_body))[IPV4_PROT_OFFSET]) + +#define IPV4_ADDR_STR_LEN 16 /* Max IP address length in string format */ + +/* IPV6 field offsets */ +#define IPV6_PAYLOAD_LEN_OFFSET 4 /* payload length offset */ +#define IPV6_NEXT_HDR_OFFSET 6 /* next header/protocol offset */ +#define IPV6_HOP_LIMIT_OFFSET 7 /* hop limit offset */ +#define IPV6_SRC_IP_OFFSET 8 /* src IP addr offset */ +#define IPV6_DEST_IP_OFFSET 24 /* dst IP addr offset */ + +/* IPV6 field decodes */ +#define IPV6_TRAFFIC_CLASS(ipv6_body) \ + (((((uint8 *)(ipv6_body))[0] & 0x0f) << 4) | \ + ((((uint8 *)(ipv6_body))[1] & 0xf0) >> 4)) + +#define IPV6_FLOW_LABEL(ipv6_body) \ + (((((uint8 *)(ipv6_body))[1] & 0x0f) << 16) | \ + (((uint8 *)(ipv6_body))[2] << 8) | \ + (((uint8 *)(ipv6_body))[3])) + +#define IPV6_PAYLOAD_LEN(ipv6_body) \ + ((((uint8 *)(ipv6_body))[IPV6_PAYLOAD_LEN_OFFSET + 0] << 8) | \ + ((uint8 *)(ipv6_body))[IPV6_PAYLOAD_LEN_OFFSET + 1]) + +#define IPV6_NEXT_HDR(ipv6_body) \ + (((uint8 *)(ipv6_body))[IPV6_NEXT_HDR_OFFSET]) + +#define IPV6_PROT(ipv6_body) IPV6_NEXT_HDR(ipv6_body) + +#define IPV6_ADDR_LEN 16 /* IPV6 address length */ + +/* IPV4 TOS or IPV6 Traffic Classifier or 0 */ +#define IP_TOS(ip_body) \ + (IP_VER(ip_body) == IP_VER_4 ? IPV4_TOS(ip_body) : \ + IP_VER(ip_body) == IP_VER_6 ? IPV6_TRAFFIC_CLASS(ip_body) : 0) + +#endif /* _bcmip_h_ */ diff --git a/openwrt/package/broadcom-wl/src/kmod/bcmutils.c b/openwrt/package/broadcom-wl/src/kmod/bcmutils.c new file mode 100644 index 00000000000..c264ea500b7 --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/bcmutils.c @@ -0,0 +1,857 @@ +/* + * Misc useful OS-independent routines. + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id: bcmutils.c,v 1.1.1.12 2006/02/27 03:43:16 honor Exp $ + */ + +#include <typedefs.h> +#include <bcmdefs.h> +#include <stdarg.h> +#include <osl.h> +#include "linux_osl.h" +#include "pktq.h" +#include <bcmutils.h> +#include <sbutils.h> +#include <bcmnvram.h> +#include <bcmendian.h> +#include <bcmdevs.h> +#include "bcmip.h" + +#define ETHER_TYPE_8021Q 0x8100 +#define ETHER_TYPE_IP 0x0800 +#define VLAN_PRI_SHIFT 13 +#define VLAN_PRI_MASK 7 + + +struct ether_header { + uint8 ether_dhost[6]; + uint8 ether_shost[6]; + uint16 ether_type; +} __attribute__((packed)); + + +struct ethervlan_header { + uint8 ether_dhost[6]; + uint8 ether_shost[6]; + uint16 vlan_type; /* 0x8100 */ + uint16 vlan_tag; /* priority, cfi and vid */ + uint16 ether_type; +}; + +/* copy a pkt buffer chain into a buffer */ +uint +pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf) +{ + uint n, ret = 0; + + if (len < 0) + len = 4096; /* "infinite" */ + + /* skip 'offset' bytes */ + for (; p && offset; p = PKTNEXT(osh, p)) { + if (offset < (uint)PKTLEN(osh, p)) + break; + offset -= PKTLEN(osh, p); + } + + if (!p) + return 0; + + /* copy the data */ + for (; p && len; p = PKTNEXT(osh, p)) { + n = MIN((uint)PKTLEN(osh, p) - offset, (uint)len); + bcopy(PKTDATA(osh, p) + offset, buf, n); + buf += n; + len -= n; + ret += n; + offset = 0; + } + + return ret; +} + +/* return total length of buffer chain */ +uint +pkttotlen(osl_t *osh, void *p) +{ + uint total; + + total = 0; + for (; p; p = PKTNEXT(osh, p)) + total += PKTLEN(osh, p); + return (total); +} + +/* return the last buffer of chained pkt */ +void * +pktlast(osl_t *osh, void *p) +{ + for (; PKTNEXT(osh, p); p = PKTNEXT(osh, p)) + ; + + return (p); +} + + +/* + * osl multiple-precedence packet queue + * hi_prec is always >= the number of the highest non-empty queue + */ +void * +pktq_penq(struct pktq *pq, int prec, void *p) +{ + struct pktq_prec *q; + + ASSERT(prec >= 0 && prec < pq->num_prec); + ASSERT(PKTLINK(p) == NULL); /* queueing chains not allowed */ + + ASSERT(!pktq_full(pq)); + ASSERT(!pktq_pfull(pq, prec)); + + q = &pq->q[prec]; + + if (q->head) + PKTSETLINK(q->tail, p); + else + q->head = p; + + q->tail = p; + q->len++; + + pq->len++; + + if (pq->hi_prec < prec) + pq->hi_prec = (uint8)prec; + + return p; +} + +void * +pktq_penq_head(struct pktq *pq, int prec, void *p) +{ + struct pktq_prec *q; + + ASSERT(prec >= 0 && prec < pq->num_prec); + ASSERT(PKTLINK(p) == NULL); /* queueing chains not allowed */ + + ASSERT(!pktq_full(pq)); + ASSERT(!pktq_pfull(pq, prec)); + + q = &pq->q[prec]; + + if (q->head == NULL) + q->tail = p; + + PKTSETLINK(p, q->head); + q->head = p; + q->len++; + + pq->len++; + + if (pq->hi_prec < prec) + pq->hi_prec = (uint8)prec; + + return p; +} + +void * +pktq_pdeq(struct pktq *pq, int prec) +{ + struct pktq_prec *q; + void *p; + + ASSERT(prec >= 0 && prec < pq->num_prec); + + q = &pq->q[prec]; + + if ((p = q->head) == NULL) + return NULL; + + if ((q->head = PKTLINK(p)) == NULL) + q->tail = NULL; + + q->len--; + + pq->len--; + + PKTSETLINK(p, NULL); + + return p; +} + +void * +pktq_pdeq_tail(struct pktq *pq, int prec) +{ + struct pktq_prec *q; + void *p, *prev; + + ASSERT(prec >= 0 && prec < pq->num_prec); + + q = &pq->q[prec]; + + if ((p = q->head) == NULL) + return NULL; + + for (prev = NULL; p != q->tail; p = PKTLINK(p)) + prev = p; + + if (prev) + PKTSETLINK(prev, NULL); + else + q->head = NULL; + + q->tail = prev; + q->len--; + + pq->len--; + + return p; +} + +void +pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir) +{ + struct pktq_prec *q; + void *p; + + q = &pq->q[prec]; + p = q->head; + while (p) { + q->head = PKTLINK(p); + PKTSETLINK(p, NULL); + PKTFREE(osh, p, dir); + q->len--; + pq->len--; + p = q->head; + } + ASSERT(q->len == 0); + q->tail = NULL; +} + +bool +pktq_pdel(struct pktq *pq, void *pktbuf, int prec) +{ + struct pktq_prec *q; + void *p; + + ASSERT(prec >= 0 && prec < pq->num_prec); + + if (!pktbuf) + return FALSE; + + q = &pq->q[prec]; + + if (q->head == pktbuf) { + if ((q->head = PKTLINK(pktbuf)) == NULL) + q->tail = NULL; + } else { + for (p = q->head; p && PKTLINK(p) != pktbuf; p = PKTLINK(p)) + ; + if (p == NULL) + return FALSE; + + PKTSETLINK(p, PKTLINK(pktbuf)); + if (q->tail == pktbuf) + q->tail = p; + } + + q->len--; + pq->len--; + PKTSETLINK(pktbuf, NULL); + return TRUE; +} + +void +pktq_init(struct pktq *pq, int num_prec, int max_len) +{ + int prec; + + ASSERT(num_prec > 0 && num_prec <= PKTQ_MAX_PREC); + + bzero(pq, sizeof(*pq)); + + pq->num_prec = (uint16)num_prec; + + pq->max = (uint16)max_len; + + for (prec = 0; prec < num_prec; prec++) + pq->q[prec].max = pq->max; +} + +void * +pktq_deq(struct pktq *pq, int *prec_out) +{ + struct pktq_prec *q; + void *p; + int prec; + + if (pq->len == 0) + return NULL; + + while ((prec = pq->hi_prec) > 0 && pq->q[prec].head == NULL) + pq->hi_prec--; + + q = &pq->q[prec]; + + if ((p = q->head) == NULL) + return NULL; + + if ((q->head = PKTLINK(p)) == NULL) + q->tail = NULL; + + q->len--; + + pq->len--; + + if (prec_out) + *prec_out = prec; + + PKTSETLINK(p, NULL); + + return p; +} + +void * +pktq_deq_tail(struct pktq *pq, int *prec_out) +{ + struct pktq_prec *q; + void *p, *prev; + int prec; + + if (pq->len == 0) + return NULL; + + for (prec = 0; prec < pq->hi_prec; prec++) + if (pq->q[prec].head) + break; + + q = &pq->q[prec]; + + if ((p = q->head) == NULL) + return NULL; + + for (prev = NULL; p != q->tail; p = PKTLINK(p)) + prev = p; + + if (prev) + PKTSETLINK(prev, NULL); + else + q->head = NULL; + + q->tail = prev; + q->len--; + + pq->len--; + + if (prec_out) + *prec_out = prec; + + PKTSETLINK(p, NULL); + + return p; +} + +void * +pktq_peek(struct pktq *pq, int *prec_out) +{ + int prec; + + if (pq->len == 0) + return NULL; + + while ((prec = pq->hi_prec) > 0 && pq->q[prec].head == NULL) + pq->hi_prec--; + + if (prec_out) + *prec_out = prec; + + return (pq->q[prec].head); +} + +void * +pktq_peek_tail(struct pktq *pq, int *prec_out) +{ + int prec; + + if (pq->len == 0) + return NULL; + + for (prec = 0; prec < pq->hi_prec; prec++) + if (pq->q[prec].head) + break; + + if (prec_out) + *prec_out = prec; + + return (pq->q[prec].tail); +} + +void +pktq_flush(osl_t *osh, struct pktq *pq, bool dir) +{ + int prec; + for (prec = 0; prec < pq->num_prec; prec++) + pktq_pflush(osh, pq, prec, dir); + ASSERT(pq->len == 0); +} + +/* Return sum of lengths of a specific set of precedences */ +int +pktq_mlen(struct pktq *pq, uint prec_bmp) +{ + int prec, len; + + len = 0; + + for (prec = 0; prec <= pq->hi_prec; prec++) + if (prec_bmp & (1 << prec)) + len += pq->q[prec].len; + + return len; +} + +/* Priority dequeue from a specific set of precedences */ +void * +pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out) +{ + struct pktq_prec *q; + void *p; + int prec; + + if (pq->len == 0) + return NULL; + + while ((prec = pq->hi_prec) > 0 && pq->q[prec].head == NULL) + pq->hi_prec--; + + while ((prec_bmp & (1 << prec)) == 0 || pq->q[prec].head == NULL) + if (prec-- == 0) + return NULL; + + q = &pq->q[prec]; + + if ((p = q->head) == NULL) + return NULL; + + if ((q->head = PKTLINK(p)) == NULL) + q->tail = NULL; + + q->len--; + + if (prec_out) + *prec_out = prec; + + pq->len--; + + PKTSETLINK(p, NULL); + + return p; +} + +char* +bcmstrcat(char *dest, const char *src) +{ + strcpy(&dest[strlen(dest)], src); + return (dest); +} + +char* +bcm_ether_ntoa(struct ether_addr *ea, char *buf) +{ + sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", + ea->octet[0]&0xff, ea->octet[1]&0xff, ea->octet[2]&0xff, + ea->octet[3]&0xff, ea->octet[4]&0xff, ea->octet[5]&0xff); + return (buf); +} + +/* parse a xx:xx:xx:xx:xx:xx format ethernet address */ +int +bcm_ether_atoe(char *p, struct ether_addr *ea) +{ + int i = 0; + + for (;;) { + ea->octet[i++] = (char) bcm_strtoul(p, &p, 16); + if (!*p++ || i == 6) + break; + } + + return (i == 6); +} + +/* Takes an Ethernet frame and sets out-of-bound PKTPRIO + * Also updates the inplace vlan tag if requested + */ +void +pktsetprio(void *pkt, bool update_vtag) +{ + struct ether_header *eh; + struct ethervlan_header *evh; + uint8 *pktdata; + int priority = 0; + + pktdata = (uint8 *) PKTDATA(NULL, pkt); + ASSERT(ISALIGNED((uintptr)pktdata, sizeof(uint16))); + + eh = (struct ether_header *) pktdata; + + if (ntoh16(eh->ether_type) == ETHER_TYPE_8021Q) { + uint16 vlan_tag; + int vlan_prio, dscp_prio = 0; + + evh = (struct ethervlan_header *)eh; + + vlan_tag = ntoh16(evh->vlan_tag); + vlan_prio = (int) (vlan_tag >> VLAN_PRI_SHIFT) & VLAN_PRI_MASK; + + if (ntoh16(evh->ether_type) == ETHER_TYPE_IP) { + uint8 *ip_body = pktdata + sizeof(struct ethervlan_header); + uint8 tos_tc = IP_TOS(ip_body); + dscp_prio = (int)(tos_tc >> IPV4_TOS_PREC_SHIFT); + } + + /* DSCP priority gets precedence over 802.1P (vlan tag) */ + priority = (dscp_prio != 0) ? dscp_prio : vlan_prio; + + /* + * If the DSCP priority is not the same as the VLAN priority, + * then overwrite the priority field in the vlan tag, with the + * DSCP priority value. This is required for Linux APs because + * the VLAN driver on Linux, overwrites the skb->priority field + * with the priority value in the vlan tag + */ + if (update_vtag && (priority != vlan_prio)) { + vlan_tag &= ~(VLAN_PRI_MASK << VLAN_PRI_SHIFT); + vlan_tag |= (uint16)priority << VLAN_PRI_SHIFT; + evh->vlan_tag = hton16(vlan_tag); + } + } else if (ntoh16(eh->ether_type) == ETHER_TYPE_IP) { + uint8 *ip_body = pktdata + sizeof(struct ether_header); + uint8 tos_tc = IP_TOS(ip_body); + priority = (int)(tos_tc >> IPV4_TOS_PREC_SHIFT); + } + + ASSERT(priority >= 0 && priority <= MAXPRIO); + PKTSETPRIO(pkt, priority); +} + +static char bcm_undeferrstr[BCME_STRLEN]; + +static const char *bcmerrorstrtable[] = BCMERRSTRINGTABLE; + +/* Convert the Error codes into related Error strings */ +const char * +bcmerrorstr(int bcmerror) +{ + int abs_bcmerror; + + abs_bcmerror = ABS(bcmerror); + + /* check if someone added a bcmerror code but forgot to add errorstring */ + ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(bcmerrorstrtable) - 1)); + if ((bcmerror > 0) || (abs_bcmerror > ABS(BCME_LAST))) { + sprintf(bcm_undeferrstr, "undefined Error %d", bcmerror); + return bcm_undeferrstr; + } + + ASSERT((strlen((char*)bcmerrorstrtable[abs_bcmerror])) < BCME_STRLEN); + + return bcmerrorstrtable[abs_bcmerror]; +} + + +int +bcm_iovar_lencheck(const bcm_iovar_t *vi, void *arg, int len, bool set) +{ + int bcmerror = 0; + + /* length check on io buf */ + switch (vi->type) { + case IOVT_BOOL: + case IOVT_INT8: + case IOVT_INT16: + case IOVT_INT32: + case IOVT_UINT8: + case IOVT_UINT16: + case IOVT_UINT32: + /* all integers are int32 sized args at the ioctl interface */ + if (len < (int)sizeof(int)) { + bcmerror = BCME_BUFTOOSHORT; + } + break; + + case IOVT_BUFFER: + /* buffer must meet minimum length requirement */ + if (len < vi->minlen) { + bcmerror = BCME_BUFTOOSHORT; + } + break; + + case IOVT_VOID: + if (!set) { + /* Cannot return nil... */ + bcmerror = BCME_UNSUPPORTED; + } else if (len) { + /* Set is an action w/o parameters */ + bcmerror = BCME_BUFTOOLONG; + } + break; + + default: + /* unknown type for length check in iovar info */ + ASSERT(0); + bcmerror = BCME_UNSUPPORTED; + } + + return bcmerror; +} + +#define CRC_INNER_LOOP(n, c, x) \ + (c) = ((c) >> 8) ^ crc##n##_table[((c) ^ (x)) & 0xff] + +static uint32 crc32_table[256] = { + 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, + 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, + 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, + 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, + 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, + 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, + 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, + 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, + 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, + 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, + 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, + 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, + 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, + 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, + 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, + 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, + 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, + 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, + 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, + 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, + 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, + 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, + 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, + 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, + 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, + 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, + 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, + 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, + 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, + 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, + 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, + 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, + 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, + 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, + 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, + 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, + 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, + 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, + 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, + 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, + 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, + 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, + 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, + 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, + 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, + 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, + 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, + 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, + 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, + 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, + 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, + 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, + 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, + 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, + 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, + 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, + 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, + 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, + 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, + 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, + 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, + 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, + 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, + 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D +}; + +uint32 +hndcrc32( + uint8 *pdata, /* pointer to array of data to process */ + uint nbytes, /* number of input data bytes to process */ + uint32 crc /* either CRC32_INIT_VALUE or previous return value */ +) +{ + uint8 *pend; +#ifdef __mips__ + uint8 tmp[4]; + ulong *tptr = (ulong *)tmp; + + /* in case the beginning of the buffer isn't aligned */ + pend = (uint8 *)((uint)(pdata + 3) & 0xfffffffc); + nbytes -= (pend - pdata); + while (pdata < pend) + CRC_INNER_LOOP(32, crc, *pdata++); + + /* handle bulk of data as 32-bit words */ + pend = pdata + (nbytes & 0xfffffffc); + while (pdata < pend) { + *tptr = *(ulong *)pdata; + pdata += sizeof(ulong *); + CRC_INNER_LOOP(32, crc, tmp[0]); + CRC_INNER_LOOP(32, crc, tmp[1]); + CRC_INNER_LOOP(32, crc, tmp[2]); + CRC_INNER_LOOP(32, crc, tmp[3]); + } + + /* 1-3 bytes at end of buffer */ + pend = pdata + (nbytes & 0x03); + while (pdata < pend) + CRC_INNER_LOOP(32, crc, *pdata++); +#else + pend = pdata + nbytes; + while (pdata < pend) + CRC_INNER_LOOP(32, crc, *pdata++); +#endif /* __mips__ */ + + return crc; +} + + +/* + * Advance from the current 1-byte tag/1-byte length/variable-length value + * triple, to the next, returning a pointer to the next. + * If the current or next TLV is invalid (does not fit in given buffer length), + * NULL is returned. + * *buflen is not modified if the TLV elt parameter is invalid, or is decremented + * by the TLV paramter's length if it is valid. + */ +bcm_tlv_t * +bcm_next_tlv(bcm_tlv_t *elt, int *buflen) +{ + int len; + + /* validate current elt */ + if (!bcm_valid_tlv(elt, *buflen)) + return NULL; + + /* advance to next elt */ + len = elt->len; + elt = (bcm_tlv_t*)(elt->data + len); + *buflen -= (2 + len); + + /* validate next elt */ + if (!bcm_valid_tlv(elt, *buflen)) + return NULL; + + return elt; +} + +/* + * Traverse a string of 1-byte tag/1-byte length/variable-length value + * triples, returning a pointer to the substring whose first element + * matches tag + */ +bcm_tlv_t * +bcm_parse_tlvs(void *buf, int buflen, uint key) +{ + bcm_tlv_t *elt; + int totlen; + + elt = (bcm_tlv_t*)buf; + totlen = buflen; + + /* find tagged parameter */ + while (totlen >= 2) { + int len = elt->len; + + /* validate remaining totlen */ + if ((elt->id == key) && (totlen >= (len + 2))) + return (elt); + + elt = (bcm_tlv_t*)((uint8*)elt + (len + 2)); + totlen -= (len + 2); + } + + return NULL; +} + +/* + * Traverse a string of 1-byte tag/1-byte length/variable-length value + * triples, returning a pointer to the substring whose first element + * matches tag. Stop parsing when we see an element whose ID is greater + * than the target key. + */ +bcm_tlv_t * +bcm_parse_ordered_tlvs(void *buf, int buflen, uint key) +{ + bcm_tlv_t *elt; + int totlen; + + elt = (bcm_tlv_t*)buf; + totlen = buflen; + + /* find tagged parameter */ + while (totlen >= 2) { + uint id = elt->id; + int len = elt->len; + + /* Punt if we start seeing IDs > than target key */ + if (id > key) + return (NULL); + + /* validate remaining totlen */ + if ((id == key) && (totlen >= (len + 2))) + return (elt); + + elt = (bcm_tlv_t*)((uint8*)elt + (len + 2)); + totlen -= (len + 2); + } + return NULL; +} + + +/* Initialization of bcmstrbuf structure */ +void +bcm_binit(struct bcmstrbuf *b, char *buf, uint size) +{ + b->origsize = b->size = size; + b->origbuf = b->buf = buf; +} + +/* Buffer sprintf wrapper to guard against buffer overflow */ +int +bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...) +{ + va_list ap; + int r; + + va_start(ap, fmt); + r = vsnprintf(b->buf, b->size, fmt, ap); + + /* Non Ansi C99 compliant returns -1, + * Ansi compliant return r >= b->size, + * bcmstdlib returns 0, handle all + */ + if ((r == -1) || (r >= (int)b->size) || (r == 0)) + { + b->size = 0; + } + else + { + b->size -= r; + b->buf += r; + } + + va_end(ap); + + return r; +} diff --git a/openwrt/package/broadcom-wl/src/kmod/hnddma.c b/openwrt/package/broadcom-wl/src/kmod/hnddma.c new file mode 100644 index 00000000000..4336560888c --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/hnddma.c @@ -0,0 +1,1157 @@ +/* + * Generic Broadcom Home Networking Division (HND) DMA module. + * This supports the following chips: BCM42xx, 44xx, 47xx . + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: hnddma.c,v 1.11 2006/04/08 07:12:42 honor Exp $ + */ + +#include <typedefs.h> +#include <bcmdefs.h> +#include <osl.h> +#include "linux_osl.h" +#include <bcmendian.h> +#include <sbconfig.h> +#include <bcmutils.h> +#include <bcmdevs.h> +#include <sbutils.h> + +#include "sbhnddma.h" +#include "hnddma.h" + +/* debug/trace */ +#define DMA_ERROR(args) +#define DMA_TRACE(args) + +/* default dma message level (if input msg_level pointer is null in dma_attach()) */ +static uint dma_msg_level = + 0; + +#define MAXNAMEL 8 /* 8 char names */ + +#define DI_INFO(dmah) (dma_info_t *)dmah + +/* dma engine software state */ +typedef struct dma_info { + struct hnddma_pub hnddma; /* exported structure, don't use hnddma_t, + * which could be const + */ + uint *msg_level; /* message level pointer */ + char name[MAXNAMEL]; /* callers name for diag msgs */ + + void *osh; /* os handle */ + sb_t *sbh; /* sb handle */ + + bool dma64; /* dma64 enabled */ + bool addrext; /* this dma engine supports DmaExtendedAddrChanges */ + + dma32regs_t *d32txregs; /* 32 bits dma tx engine registers */ + dma32regs_t *d32rxregs; /* 32 bits dma rx engine registers */ + dma64regs_t *d64txregs; /* 64 bits dma tx engine registers */ + dma64regs_t *d64rxregs; /* 64 bits dma rx engine registers */ + + uint32 dma64align; /* either 8k or 4k depends on number of dd */ + dma32dd_t *txd32; /* pointer to dma32 tx descriptor ring */ + dma64dd_t *txd64; /* pointer to dma64 tx descriptor ring */ + uint ntxd; /* # tx descriptors tunable */ + uint txin; /* index of next descriptor to reclaim */ + uint txout; /* index of next descriptor to post */ + void **txp; /* pointer to parallel array of pointers to packets */ + osldma_t *tx_dmah; /* DMA TX descriptor ring handle */ + osldma_t **txp_dmah; /* DMA TX packet data handle */ + ulong txdpa; /* physical address of descriptor ring */ + uint txdalign; /* #bytes added to alloc'd mem to align txd */ + uint txdalloc; /* #bytes allocated for the ring */ + + dma32dd_t *rxd32; /* pointer to dma32 rx descriptor ring */ + dma64dd_t *rxd64; /* pointer to dma64 rx descriptor ring */ + uint nrxd; /* # rx descriptors tunable */ + uint rxin; /* index of next descriptor to reclaim */ + uint rxout; /* index of next descriptor to post */ + void **rxp; /* pointer to parallel array of pointers to packets */ + osldma_t *rx_dmah; /* DMA RX descriptor ring handle */ + osldma_t **rxp_dmah; /* DMA RX packet data handle */ + ulong rxdpa; /* physical address of descriptor ring */ + uint rxdalign; /* #bytes added to alloc'd mem to align rxd */ + uint rxdalloc; /* #bytes allocated for the ring */ + + /* tunables */ + uint rxbufsize; /* rx buffer size in bytes, + not including the extra headroom + */ + uint nrxpost; /* # rx buffers to keep posted */ + uint rxoffset; /* rxcontrol offset */ + uint ddoffsetlow; /* add to get dma address of descriptor ring, low 32 bits */ + uint ddoffsethigh; /* high 32 bits */ + uint dataoffsetlow; /* add to get dma address of data buffer, low 32 bits */ + uint dataoffsethigh; /* high 32 bits */ +} dma_info_t; + +/* descriptor bumping macros */ +#define XXD(x, n) ((x) & ((n) - 1)) /* faster than %, but n must be power of 2 */ +#define TXD(x) XXD((x), di->ntxd) +#define RXD(x) XXD((x), di->nrxd) +#define NEXTTXD(i) TXD(i + 1) +#define PREVTXD(i) TXD(i - 1) +#define NEXTRXD(i) RXD(i + 1) +#define NTXDACTIVE(h, t) TXD(t - h) +#define NRXDACTIVE(h, t) RXD(t - h) + +/* macros to convert between byte offsets and indexes */ +#define B2I(bytes, type) ((bytes) / sizeof(type)) +#define I2B(index, type) ((index) * sizeof(type)) + +#define PCI32ADDR_HIGH 0xc0000000 /* address[31:30] */ +#define PCI32ADDR_HIGH_SHIFT 30 /* address[31:30] */ + + +/* common prototypes */ +static bool _dma_isaddrext(dma_info_t *di); +static bool dma32_alloc(dma_info_t *di, uint direction); +static void _dma_detach(dma_info_t *di); +static void _dma_ddtable_init(dma_info_t *di, uint direction, ulong pa); +static void _dma_rxinit(dma_info_t *di); +static void *_dma_rx(dma_info_t *di); +static void _dma_rxfill(dma_info_t *di); +static void _dma_rxreclaim(dma_info_t *di); +static void _dma_rxenable(dma_info_t *di); +static void * _dma_getnextrxp(dma_info_t *di, bool forceall); + +static void _dma_txblock(dma_info_t *di); +static void _dma_txunblock(dma_info_t *di); +static uint _dma_txactive(dma_info_t *di); + +static void* _dma_peeknexttxp(dma_info_t *di); +static uintptr _dma_getvar(dma_info_t *di, char *name); +static void _dma_counterreset(dma_info_t *di); +static void _dma_fifoloopbackenable(dma_info_t *di); + +/* ** 32 bit DMA prototypes */ +static bool dma32_alloc(dma_info_t *di, uint direction); +static bool dma32_txreset(dma_info_t *di); +static bool dma32_rxreset(dma_info_t *di); +static bool dma32_txsuspendedidle(dma_info_t *di); +static int dma32_txfast(dma_info_t *di, void *p0, bool commit); +static void *dma32_getnexttxp(dma_info_t *di, bool forceall); +static void *dma32_getnextrxp(dma_info_t *di, bool forceall); +static void dma32_txrotate(dma_info_t *di); +static bool dma32_rxidle(dma_info_t *di); +static void dma32_txinit(dma_info_t *di); +static bool dma32_txenabled(dma_info_t *di); +static void dma32_txsuspend(dma_info_t *di); +static void dma32_txresume(dma_info_t *di); +static bool dma32_txsuspended(dma_info_t *di); +static void dma32_txreclaim(dma_info_t *di, bool forceall); +static bool dma32_txstopped(dma_info_t *di); +static bool dma32_rxstopped(dma_info_t *di); +static bool dma32_rxenabled(dma_info_t *di); +static bool _dma32_addrext(osl_t *osh, dma32regs_t *dma32regs); + + +static di_fcn_t dma32proc = { + (di_detach_t)_dma_detach, + (di_txinit_t)dma32_txinit, + (di_txreset_t)dma32_txreset, + (di_txenabled_t)dma32_txenabled, + (di_txsuspend_t)dma32_txsuspend, + (di_txresume_t)dma32_txresume, + (di_txsuspended_t)dma32_txsuspended, + (di_txsuspendedidle_t)dma32_txsuspendedidle, + (di_txfast_t)dma32_txfast, + (di_txstopped_t)dma32_txstopped, + (di_txreclaim_t)dma32_txreclaim, + (di_getnexttxp_t)dma32_getnexttxp, + (di_peeknexttxp_t)_dma_peeknexttxp, + (di_txblock_t)_dma_txblock, + (di_txunblock_t)_dma_txunblock, + (di_txactive_t)_dma_txactive, + (di_txrotate_t)dma32_txrotate, + + (di_rxinit_t)_dma_rxinit, + (di_rxreset_t)dma32_rxreset, + (di_rxidle_t)dma32_rxidle, + (di_rxstopped_t)dma32_rxstopped, + (di_rxenable_t)_dma_rxenable, + (di_rxenabled_t)dma32_rxenabled, + (di_rx_t)_dma_rx, + (di_rxfill_t)_dma_rxfill, + (di_rxreclaim_t)_dma_rxreclaim, + (di_getnextrxp_t)_dma_getnextrxp, + + (di_fifoloopbackenable_t)_dma_fifoloopbackenable, + (di_getvar_t)_dma_getvar, + (di_counterreset_t)_dma_counterreset, + + NULL, + NULL, + NULL, + 34 +}; + +hnddma_t * +dma_attach(osl_t *osh, char *name, sb_t *sbh, void *dmaregstx, void *dmaregsrx, + uint ntxd, uint nrxd, uint rxbufsize, uint nrxpost, uint rxoffset, uint *msg_level) +{ + dma_info_t *di; + uint size; + + /* allocate private info structure */ + if ((di = MALLOC(osh, sizeof (dma_info_t))) == NULL) { + return (NULL); + } + bzero((char *)di, sizeof(dma_info_t)); + + di->msg_level = msg_level ? msg_level : &dma_msg_level; + + /* old chips w/o sb is no longer supported */ + ASSERT(sbh != NULL); + + /* check arguments */ + ASSERT(ISPOWEROF2(ntxd)); + ASSERT(ISPOWEROF2(nrxd)); + if (nrxd == 0) + ASSERT(dmaregsrx == NULL); + if (ntxd == 0) + ASSERT(dmaregstx == NULL); + + + /* init dma reg pointer */ + ASSERT(ntxd <= D32MAXDD); + ASSERT(nrxd <= D32MAXDD); + di->d32txregs = (dma32regs_t *)dmaregstx; + di->d32rxregs = (dma32regs_t *)dmaregsrx; + + DMA_TRACE(("%s: dma_attach: %s osh %p ntxd %d nrxd %d rxbufsize %d nrxpost %d " + "rxoffset %d dmaregstx %p dmaregsrx %p\n", + name, "DMA32", osh, ntxd, nrxd, rxbufsize, + nrxpost, rxoffset, dmaregstx, dmaregsrx)); + + /* make a private copy of our callers name */ + strncpy(di->name, name, MAXNAMEL); + di->name[MAXNAMEL-1] = '\0'; + + di->osh = osh; + di->sbh = sbh; + + /* save tunables */ + di->ntxd = ntxd; + di->nrxd = nrxd; + + /* the actual dma size doesn't include the extra headroom */ + if (rxbufsize > BCMEXTRAHDROOM) + di->rxbufsize = rxbufsize - BCMEXTRAHDROOM; + else + di->rxbufsize = rxbufsize; + + di->nrxpost = nrxpost; + di->rxoffset = rxoffset; + + /* + * figure out the DMA physical address offset for dd and data + * for old chips w/o sb, use zero + * for new chips w sb, + * PCI/PCIE: they map silicon backplace address to zero based memory, need offset + * Other bus: use zero + * SB_BUS BIGENDIAN kludge: use sdram swapped region for data buffer, not descriptor + */ + di->ddoffsetlow = 0; + di->dataoffsetlow = 0; + /* for pci bus, add offset */ + if (sbh->bustype == PCI_BUS) { + di->ddoffsetlow = SB_PCI_DMA; + di->ddoffsethigh = 0; + di->dataoffsetlow = di->ddoffsetlow; + di->dataoffsethigh = di->ddoffsethigh; + } + +#if defined(__mips__) && defined(IL_BIGENDIAN) + di->dataoffsetlow = di->dataoffsetlow + SB_SDRAM_SWAPPED; +#endif + + di->addrext = _dma_isaddrext(di); + + /* allocate tx packet pointer vector */ + if (ntxd) { + size = ntxd * sizeof(void *); + if ((di->txp = MALLOC(osh, size)) == NULL) { + DMA_ERROR(("%s: dma_attach: out of tx memory, malloced %d bytes\n", + di->name, MALLOCED(osh))); + goto fail; + } + bzero((char *)di->txp, size); + } + + /* allocate rx packet pointer vector */ + if (nrxd) { + size = nrxd * sizeof(void *); + if ((di->rxp = MALLOC(osh, size)) == NULL) { + DMA_ERROR(("%s: dma_attach: out of rx memory, malloced %d bytes\n", + di->name, MALLOCED(osh))); + goto fail; + } + bzero((char *)di->rxp, size); + } + + /* allocate transmit descriptor ring, only need ntxd descriptors but it must be aligned */ + if (ntxd) { + if (!dma32_alloc(di, DMA_TX)) + goto fail; + } + + /* allocate receive descriptor ring, only need nrxd descriptors but it must be aligned */ + if (nrxd) { + if (!dma32_alloc(di, DMA_RX)) + goto fail; + } + + if ((di->ddoffsetlow == SB_PCI_DMA) && (di->txdpa > SB_PCI_DMA_SZ) && !di->addrext) { + DMA_ERROR(("%s: dma_attach: txdpa 0x%lx: addrext not supported\n", + di->name, di->txdpa)); + goto fail; + } + if ((di->ddoffsetlow == SB_PCI_DMA) && (di->rxdpa > SB_PCI_DMA_SZ) && !di->addrext) { + DMA_ERROR(("%s: dma_attach: rxdpa 0x%lx: addrext not supported\n", + di->name, di->rxdpa)); + goto fail; + } + + DMA_TRACE(("ddoffsetlow 0x%x ddoffsethigh 0x%x dataoffsetlow 0x%x dataoffsethigh " + "0x%x addrext %d\n", di->ddoffsetlow, di->ddoffsethigh, di->dataoffsetlow, + di->dataoffsethigh, di->addrext)); + + /* allocate tx packet pointer vector and DMA mapping vectors */ + if (ntxd) { + + size = ntxd * sizeof(osldma_t **); + if ((di->txp_dmah = (osldma_t **)MALLOC(osh, size)) == NULL) + goto fail; + bzero((char*)di->txp_dmah, size); + }else + di->txp_dmah = NULL; + + /* allocate rx packet pointer vector and DMA mapping vectors */ + if (nrxd) { + + size = nrxd * sizeof(osldma_t **); + if ((di->rxp_dmah = (osldma_t **)MALLOC(osh, size)) == NULL) + goto fail; + bzero((char*)di->rxp_dmah, size); + + } else + di->rxp_dmah = NULL; + + /* initialize opsvec of function pointers */ + di->hnddma.di_fn = dma32proc; + + return ((hnddma_t *)di); + +fail: + _dma_detach(di); + return (NULL); +} + +/* init the tx or rx descriptor */ +static INLINE void +dma32_dd_upd(dma_info_t *di, dma32dd_t *ddring, ulong pa, uint outidx, uint32 *flags, + uint32 bufcount) +{ + /* dma32 uses 32 bits control to fit both flags and bufcounter */ + *flags = *flags | (bufcount & CTRL_BC_MASK); + + if ((di->dataoffsetlow != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { + W_SM(&ddring[outidx].addr, BUS_SWAP32(pa + di->dataoffsetlow)); + W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*flags)); + } else { + /* address extension */ + uint32 ae; + ASSERT(di->addrext); + ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; + pa &= ~PCI32ADDR_HIGH; + + *flags |= (ae << CTRL_AE_SHIFT); + W_SM(&ddring[outidx].addr, BUS_SWAP32(pa + di->dataoffsetlow)); + W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*flags)); + } +} + +static bool +_dma32_addrext(osl_t *osh, dma32regs_t *dma32regs) +{ + uint32 w; + + OR_REG(osh, &dma32regs->control, XC_AE); + w = R_REG(osh, &dma32regs->control); + AND_REG(osh, &dma32regs->control, ~XC_AE); + return ((w & XC_AE) == XC_AE); +} + +/* !! may be called with core in reset */ +static void +_dma_detach(dma_info_t *di) +{ + if (di == NULL) + return; + + DMA_TRACE(("%s: dma_detach\n", di->name)); + + /* shouldn't be here if descriptors are unreclaimed */ + ASSERT(di->txin == di->txout); + ASSERT(di->rxin == di->rxout); + + /* free dma descriptor rings */ + if (di->txd32) + DMA_FREE_CONSISTENT(di->osh, ((int8*)di->txd32 - di->txdalign), + di->txdalloc, (di->txdpa - di->txdalign), &di->tx_dmah); + if (di->rxd32) + DMA_FREE_CONSISTENT(di->osh, ((int8*)di->rxd32 - di->rxdalign), + di->rxdalloc, (di->rxdpa - di->rxdalign), &di->rx_dmah); + + /* free packet pointer vectors */ + if (di->txp) + MFREE(di->osh, (void *)di->txp, (di->ntxd * sizeof(void *))); + if (di->rxp) + MFREE(di->osh, (void *)di->rxp, (di->nrxd * sizeof(void *))); + + /* free tx packet DMA handles */ + if (di->txp_dmah) + MFREE(di->osh, (void *)di->txp_dmah, di->ntxd * sizeof(osldma_t **)); + + /* free rx packet DMA handles */ + if (di->rxp_dmah) + MFREE(di->osh, (void *)di->rxp_dmah, di->nrxd * sizeof(osldma_t **)); + + /* free our private info structure */ + MFREE(di->osh, (void *)di, sizeof(dma_info_t)); + +} + +/* return TRUE if this dma engine supports DmaExtendedAddrChanges, otherwise FALSE */ +static bool +_dma_isaddrext(dma_info_t *di) +{ + if (di->d32txregs) + return (_dma32_addrext(di->osh, di->d32txregs)); + else if (di->d32rxregs) + return (_dma32_addrext(di->osh, di->d32rxregs)); + return FALSE; +} + +/* initialize descriptor table base address */ +static void +_dma_ddtable_init(dma_info_t *di, uint direction, ulong pa) +{ + if ((di->ddoffsetlow != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { + if (direction == DMA_TX) + W_REG(di->osh, &di->d32txregs->addr, (pa + di->ddoffsetlow)); + else + W_REG(di->osh, &di->d32rxregs->addr, (pa + di->ddoffsetlow)); + } else { + /* dma32 address extension */ + uint32 ae; + ASSERT(di->addrext); + + /* shift the high bit(s) from pa to ae */ + ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; + pa &= ~PCI32ADDR_HIGH; + + if (direction == DMA_TX) { + W_REG(di->osh, &di->d32txregs->addr, (pa + di->ddoffsetlow)); + SET_REG(di->osh, &di->d32txregs->control, XC_AE, ae <<XC_AE_SHIFT); + } else { + W_REG(di->osh, &di->d32rxregs->addr, (pa + di->ddoffsetlow)); + SET_REG(di->osh, &di->d32rxregs->control, RC_AE, ae <<RC_AE_SHIFT); + } + } +} + +static void +_dma_fifoloopbackenable(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_fifoloopbackenable\n", di->name)); + OR_REG(di->osh, &di->d32txregs->control, XC_LE); +} + +static void +_dma_rxinit(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_rxinit\n", di->name)); + + if (di->nrxd == 0) + return; + + di->rxin = di->rxout = 0; + + /* clear rx descriptor ring */ + BZERO_SM((void *)di->rxd32, (di->nrxd * sizeof(dma32dd_t))); + _dma_rxenable(di); + _dma_ddtable_init(di, DMA_RX, di->rxdpa); +} + +static void +_dma_rxenable(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_rxenable\n", di->name)); + + W_REG(di->osh, &di->d32rxregs->control, ((di->rxoffset << RC_RO_SHIFT) | RC_RE)); +} + +/* !! rx entry routine, returns a pointer to the next frame received, + * or NULL if there are no more + */ +static void * +_dma_rx(dma_info_t *di) +{ + void *p; + uint len; + int skiplen = 0; + + while ((p = _dma_getnextrxp(di, FALSE))) { + /* skip giant packets which span multiple rx descriptors */ + if (skiplen > 0) { + skiplen -= di->rxbufsize; + if (skiplen < 0) + skiplen = 0; + PKTFREE(di->osh, p, FALSE); + continue; + } + + len = ltoh16(*(uint16*)(PKTDATA(di->osh, p))); + DMA_TRACE(("%s: dma_rx len %d\n", di->name, len)); + + /* bad frame length check */ + if (len > (di->rxbufsize - di->rxoffset)) { + DMA_ERROR(("%s: dma_rx: bad frame length (%d)\n", di->name, len)); + if (len > 0) + skiplen = len - (di->rxbufsize - di->rxoffset); + PKTFREE(di->osh, p, FALSE); + di->hnddma.rxgiants++; + continue; + } + + /* set actual length */ + PKTSETLEN(di->osh, p, (di->rxoffset + len)); + + break; + } + + return (p); +} + +/* post receive buffers */ +static void +_dma_rxfill(dma_info_t *di) +{ + void *p; + uint rxin, rxout; + uint32 flags = 0; + uint n; + uint i; + uint32 pa; + uint extra_offset = 0; + + /* + * Determine how many receive buffers we're lacking + * from the full complement, allocate, initialize, + * and post them, then update the chip rx lastdscr. + */ + + rxin = di->rxin; + rxout = di->rxout; + + n = di->nrxpost - NRXDACTIVE(rxin, rxout); + + DMA_TRACE(("%s: dma_rxfill: post %d\n", di->name, n)); + + if (di->rxbufsize > BCMEXTRAHDROOM) + extra_offset = BCMEXTRAHDROOM; + + for (i = 0; i < n; i++) { + /* the di->rxbufsize doesn't include the extra headroom, we need to add it to the + size to be allocated + */ + if ((p = PKTGET(di->osh, di->rxbufsize + extra_offset, + FALSE)) == NULL) { + DMA_ERROR(("%s: dma_rxfill: out of rxbufs\n", di->name)); + di->hnddma.rxnobuf++; + break; + } + /* reserve an extra headroom, if applicable */ + if (extra_offset) + PKTPULL(di->osh, p, extra_offset); + + /* Do a cached write instead of uncached write since DMA_MAP + * will flush the cache. + */ + *(uint32*)(PKTDATA(di->osh, p)) = 0; + + pa = (uint32) DMA_MAP(di->osh, PKTDATA(di->osh, p), + di->rxbufsize, DMA_RX, p); + + ASSERT(ISALIGNED(pa, 4)); + + /* save the free packet pointer */ + ASSERT(di->rxp[rxout] == NULL); + di->rxp[rxout] = p; + + /* reset flags for each descriptor */ + flags = 0; + if (rxout == (di->nrxd - 1)) + flags = CTRL_EOT; + dma32_dd_upd(di, di->rxd32, pa, rxout, &flags, di->rxbufsize); + rxout = NEXTRXD(rxout); + } + + di->rxout = rxout; + + /* update the chip lastdscr pointer */ + W_REG(di->osh, &di->d32rxregs->ptr, I2B(rxout, dma32dd_t)); +} + +/* like getnexttxp but no reclaim */ +static void * +_dma_peeknexttxp(dma_info_t *di) +{ + uint end, i; + + if (di->ntxd == 0) + return (NULL); + + end = B2I(R_REG(di->osh, &di->d32txregs->status) & XS_CD_MASK, dma32dd_t); + + for (i = di->txin; i != end; i = NEXTTXD(i)) + if (di->txp[i]) + return (di->txp[i]); + + return (NULL); +} + +static void +_dma_rxreclaim(dma_info_t *di) +{ + void *p; + + /* "unused local" warning suppression for OSLs that + * define PKTFREE() without using the di->osh arg + */ + di = di; + + DMA_TRACE(("%s: dma_rxreclaim\n", di->name)); + + while ((p = _dma_getnextrxp(di, TRUE))) + PKTFREE(di->osh, p, FALSE); +} + +static void * +_dma_getnextrxp(dma_info_t *di, bool forceall) +{ + if (di->nrxd == 0) + return (NULL); + + return dma32_getnextrxp(di, forceall); +} + +static void +_dma_txblock(dma_info_t *di) +{ + di->hnddma.txavail = 0; +} + +static void +_dma_txunblock(dma_info_t *di) +{ + di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; +} + +static uint +_dma_txactive(dma_info_t *di) +{ + return (NTXDACTIVE(di->txin, di->txout)); +} + +static void +_dma_counterreset(dma_info_t *di) +{ + /* reset all software counter */ + di->hnddma.rxgiants = 0; + di->hnddma.rxnobuf = 0; + di->hnddma.txnobuf = 0; +} + +/* get the address of the var in order to change later */ +static uintptr +_dma_getvar(dma_info_t *di, char *name) +{ + if (!strcmp(name, "&txavail")) + return ((uintptr) &(di->hnddma.txavail)); + else { + ASSERT(0); + } + return (0); +} + +void +dma_txpioloopback(osl_t *osh, dma32regs_t *regs) +{ + OR_REG(osh, ®s->control, XC_LE); +} + + + +/* 32 bits DMA functions */ +static void +dma32_txinit(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_txinit\n", di->name)); + + if (di->ntxd == 0) + return; + + di->txin = di->txout = 0; + di->hnddma.txavail = di->ntxd - 1; + + /* clear tx descriptor ring */ + BZERO_SM((void *)di->txd32, (di->ntxd * sizeof(dma32dd_t))); + W_REG(di->osh, &di->d32txregs->control, XC_XE); + _dma_ddtable_init(di, DMA_TX, di->txdpa); +} + +static bool +dma32_txenabled(dma_info_t *di) +{ + uint32 xc; + + /* If the chip is dead, it is not enabled :-) */ + xc = R_REG(di->osh, &di->d32txregs->control); + return ((xc != 0xffffffff) && (xc & XC_XE)); +} + +static void +dma32_txsuspend(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_txsuspend\n", di->name)); + + if (di->ntxd == 0) + return; + + OR_REG(di->osh, &di->d32txregs->control, XC_SE); +} + +static void +dma32_txresume(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_txresume\n", di->name)); + + if (di->ntxd == 0) + return; + + AND_REG(di->osh, &di->d32txregs->control, ~XC_SE); +} + +static bool +dma32_txsuspended(dma_info_t *di) +{ + return (di->ntxd == 0) || ((R_REG(di->osh, &di->d32txregs->control) & XC_SE) == XC_SE); +} + +static void +dma32_txreclaim(dma_info_t *di, bool forceall) +{ + void *p; + + DMA_TRACE(("%s: dma_txreclaim %s\n", di->name, forceall ? "all" : "")); + + while ((p = dma32_getnexttxp(di, forceall))) + PKTFREE(di->osh, p, TRUE); +} + +static bool +dma32_txstopped(dma_info_t *di) +{ + return ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) == XS_XS_STOPPED); +} + +static bool +dma32_rxstopped(dma_info_t *di) +{ + return ((R_REG(di->osh, &di->d32rxregs->status) & RS_RS_MASK) == RS_RS_STOPPED); +} + +static bool +dma32_alloc(dma_info_t *di, uint direction) +{ + uint size; + uint ddlen; + void *va; + + ddlen = sizeof(dma32dd_t); + + size = (direction == DMA_TX) ? (di->ntxd * ddlen) : (di->nrxd * ddlen); + + if (!ISALIGNED(DMA_CONSISTENT_ALIGN, D32RINGALIGN)) + size += D32RINGALIGN; + + + if (direction == DMA_TX) { + if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->txdpa, &di->tx_dmah)) == NULL) { + DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(ntxd) failed\n", + di->name)); + return FALSE; + } + + di->txd32 = (dma32dd_t *) ROUNDUP((uintptr)va, D32RINGALIGN); + di->txdalign = (uint)((int8*)di->txd32 - (int8*)va); + di->txdpa += di->txdalign; + di->txdalloc = size; + ASSERT(ISALIGNED((uintptr)di->txd32, D32RINGALIGN)); + } else { + if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->rxdpa, &di->rx_dmah)) == NULL) { + DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(nrxd) failed\n", + di->name)); + return FALSE; + } + di->rxd32 = (dma32dd_t *) ROUNDUP((uintptr)va, D32RINGALIGN); + di->rxdalign = (uint)((int8*)di->rxd32 - (int8*)va); + di->rxdpa += di->rxdalign; + di->rxdalloc = size; + ASSERT(ISALIGNED((uintptr)di->rxd32, D32RINGALIGN)); + } + + return TRUE; +} + +static bool +dma32_txreset(dma_info_t *di) +{ + uint32 status; + + if (di->ntxd == 0) + return TRUE; + + /* suspend tx DMA first */ + W_REG(di->osh, &di->d32txregs->control, XC_SE); + SPINWAIT(((status = (R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK)) + != XS_XS_DISABLED) && + (status != XS_XS_IDLE) && + (status != XS_XS_STOPPED), + (10000)); + + W_REG(di->osh, &di->d32txregs->control, 0); + SPINWAIT(((status = (R_REG(di->osh, + &di->d32txregs->status) & XS_XS_MASK)) != XS_XS_DISABLED), + 10000); + + /* wait for the last transaction to complete */ + OSL_DELAY(300); + + return (status == XS_XS_DISABLED); +} + +static bool +dma32_rxidle(dma_info_t *di) +{ + DMA_TRACE(("%s: dma_rxidle\n", di->name)); + + if (di->nrxd == 0) + return TRUE; + + return ((R_REG(di->osh, &di->d32rxregs->status) & RS_CD_MASK) == + R_REG(di->osh, &di->d32rxregs->ptr)); +} + +static bool +dma32_rxreset(dma_info_t *di) +{ + uint32 status; + + if (di->nrxd == 0) + return TRUE; + + W_REG(di->osh, &di->d32rxregs->control, 0); + SPINWAIT(((status = (R_REG(di->osh, + &di->d32rxregs->status) & RS_RS_MASK)) != RS_RS_DISABLED), + 10000); + + return (status == RS_RS_DISABLED); +} + +static bool +dma32_rxenabled(dma_info_t *di) +{ + uint32 rc; + + rc = R_REG(di->osh, &di->d32rxregs->control); + return ((rc != 0xffffffff) && (rc & RC_RE)); +} + +static bool +dma32_txsuspendedidle(dma_info_t *di) +{ + if (di->ntxd == 0) + return TRUE; + + if (!(R_REG(di->osh, &di->d32txregs->control) & XC_SE)) + return 0; + + if ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) != XS_XS_IDLE) + return 0; + + OSL_DELAY(2); + return ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) == XS_XS_IDLE); +} + +/* !! tx entry routine + * supports full 32bit dma engine buffer addressing so + * dma buffers can cross 4 Kbyte page boundaries. + */ +static int +dma32_txfast(dma_info_t *di, void *p0, bool commit) +{ + void *p, *next; + uchar *data; + uint len; + uint txout; + uint32 flags = 0; + uint32 pa; + + DMA_TRACE(("%s: dma_txfast\n", di->name)); + + txout = di->txout; + + /* + * Walk the chain of packet buffers + * allocating and initializing transmit descriptor entries. + */ + for (p = p0; p; p = next) { + data = PKTDATA(di->osh, p); + len = PKTLEN(di->osh, p); + next = PKTNEXT(di->osh, p); + + /* return nonzero if out of tx descriptors */ + if (NEXTTXD(txout) == di->txin) + goto outoftxd; + + if (len == 0) + continue; + + /* get physical address of buffer start */ + pa = (uint32) DMA_MAP(di->osh, data, len, DMA_TX, p); + + flags = 0; + if (p == p0) + flags |= CTRL_SOF; + if (next == NULL) + flags |= (CTRL_IOC | CTRL_EOF); + if (txout == (di->ntxd - 1)) + flags |= CTRL_EOT; + + dma32_dd_upd(di, di->txd32, pa, txout, &flags, len); + ASSERT(di->txp[txout] == NULL); + + txout = NEXTTXD(txout); + } + + /* if last txd eof not set, fix it */ + if (!(flags & CTRL_EOF)) + W_SM(&di->txd32[PREVTXD(txout)].ctrl, BUS_SWAP32(flags | CTRL_IOC | CTRL_EOF)); + + /* save the packet */ + di->txp[PREVTXD(txout)] = p0; + + /* bump the tx descriptor index */ + di->txout = txout; + + /* kick the chip */ + if (commit) + W_REG(di->osh, &di->d32txregs->ptr, I2B(txout, dma32dd_t)); + + /* tx flow control */ + di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; + + return (0); + +outoftxd: + DMA_ERROR(("%s: dma_txfast: out of txds\n", di->name)); + PKTFREE(di->osh, p0, TRUE); + di->hnddma.txavail = 0; + di->hnddma.txnobuf++; + return (-1); +} + +/* + * Reclaim next completed txd (txds if using chained buffers) and + * return associated packet. + * If 'force' is true, reclaim txd(s) and return associated packet + * regardless of the value of the hardware "curr" pointer. + */ +static void * +dma32_getnexttxp(dma_info_t *di, bool forceall) +{ + uint start, end, i; + void *txp; + + DMA_TRACE(("%s: dma_getnexttxp %s\n", di->name, forceall ? "all" : "")); + + if (di->ntxd == 0) + return (NULL); + + txp = NULL; + + start = di->txin; + if (forceall) + end = di->txout; + else + end = B2I(R_REG(di->osh, &di->d32txregs->status) & XS_CD_MASK, dma32dd_t); + + if ((start == 0) && (end > di->txout)) + goto bogus; + + for (i = start; i != end && !txp; i = NEXTTXD(i)) { + DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->txd32[i].addr)) - di->dataoffsetlow), + (BUS_SWAP32(R_SM(&di->txd32[i].ctrl)) & CTRL_BC_MASK), + DMA_TX, di->txp[i]); + + W_SM(&di->txd32[i].addr, 0xdeadbeef); + txp = di->txp[i]; + di->txp[i] = NULL; + } + + di->txin = i; + + /* tx flow control */ + di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; + + return (txp); + +bogus: +/* + DMA_ERROR(("dma_getnexttxp: bogus curr: start %d end %d txout %d force %d\n", + start, end, di->txout, forceall)); +*/ + return (NULL); +} + +static void * +dma32_getnextrxp(dma_info_t *di, bool forceall) +{ + uint i; + void *rxp; + + /* if forcing, dma engine must be disabled */ + ASSERT(!forceall || !dma32_rxenabled(di)); + + i = di->rxin; + + /* return if no packets posted */ + if (i == di->rxout) + return (NULL); + + /* ignore curr if forceall */ + if (!forceall && (i == B2I(R_REG(di->osh, &di->d32rxregs->status) & RS_CD_MASK, dma32dd_t))) + return (NULL); + + /* get the packet pointer that corresponds to the rx descriptor */ + rxp = di->rxp[i]; + ASSERT(rxp); + di->rxp[i] = NULL; + + /* clear this packet from the descriptor ring */ + DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->rxd32[i].addr)) - di->dataoffsetlow), + di->rxbufsize, DMA_RX, rxp); + + W_SM(&di->rxd32[i].addr, 0xdeadbeef); + + di->rxin = NEXTRXD(i); + + return (rxp); +} + +/* + * Rotate all active tx dma ring entries "forward" by (ActiveDescriptor - txin). + */ +static void +dma32_txrotate(dma_info_t *di) +{ + uint ad; + uint nactive; + uint rot; + uint old, new; + uint32 w; + uint first, last; + + ASSERT(dma32_txsuspendedidle(di)); + + nactive = _dma_txactive(di); + ad = B2I(((R_REG(di->osh, &di->d32txregs->status) & XS_AD_MASK) >> XS_AD_SHIFT), dma32dd_t); + rot = TXD(ad - di->txin); + + ASSERT(rot < di->ntxd); + + /* full-ring case is a lot harder - don't worry about this */ + if (rot >= (di->ntxd - nactive)) { + DMA_ERROR(("%s: dma_txrotate: ring full - punt\n", di->name)); + return; + } + + first = di->txin; + last = PREVTXD(di->txout); + + /* move entries starting at last and moving backwards to first */ + for (old = last; old != PREVTXD(first); old = PREVTXD(old)) { + new = TXD(old + rot); + + /* + * Move the tx dma descriptor. + * EOT is set only in the last entry in the ring. + */ + w = BUS_SWAP32(R_SM(&di->txd32[old].ctrl)) & ~CTRL_EOT; + if (new == (di->ntxd - 1)) + w |= CTRL_EOT; + W_SM(&di->txd32[new].ctrl, BUS_SWAP32(w)); + W_SM(&di->txd32[new].addr, R_SM(&di->txd32[old].addr)); + + /* zap the old tx dma descriptor address field */ + W_SM(&di->txd32[old].addr, BUS_SWAP32(0xdeadbeef)); + + /* move the corresponding txp[] entry */ + ASSERT(di->txp[new] == NULL); + di->txp[new] = di->txp[old]; + di->txp[old] = NULL; + } + + /* update txin and txout */ + di->txin = ad; + di->txout = TXD(di->txout + rot); + di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; + + /* kick the chip */ + W_REG(di->osh, &di->d32txregs->ptr, I2B(di->txout, dma32dd_t)); +} + + +uint +dma_addrwidth(sb_t *sbh, void *dmaregs) +{ + dma32regs_t *dma32regs; + osl_t *osh; + + osh = sb_osh(sbh); + + /* Start checking for 32-bit / 30-bit addressing */ + dma32regs = (dma32regs_t *)dmaregs; + + /* For System Backplane, PCIE bus or addrext feature, 32-bits ok */ + if ((BUSTYPE(sbh->bustype) == SB_BUS) || + ((BUSTYPE(sbh->bustype) == PCI_BUS) && sbh->buscoretype == SB_PCIE) || + (_dma32_addrext(osh, dma32regs))) + return (DMADDRWIDTH_32); + + /* Fallthru */ + return (DMADDRWIDTH_30); +} diff --git a/openwrt/package/broadcom-wl/src/kmod/hnddma.h b/openwrt/package/broadcom-wl/src/kmod/hnddma.h new file mode 100644 index 00000000000..de74c067b2a --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/hnddma.h @@ -0,0 +1,156 @@ +/* + * Generic Broadcom Home Networking Division (HND) DMA engine SW interface + * This supports the following chips: BCM42xx, 44xx, 47xx . + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id: hnddma.h,v 1.1.1.13 2006/04/08 06:13:39 honor Exp $ + */ + +#ifndef _hnddma_h_ +#define _hnddma_h_ + +typedef const struct hnddma_pub hnddma_t; + +/* dma function type */ +typedef void (*di_detach_t)(hnddma_t *dmah); +typedef bool (*di_txreset_t)(hnddma_t *dmah); +typedef bool (*di_rxreset_t)(hnddma_t *dmah); +typedef bool (*di_rxidle_t)(hnddma_t *dmah); +typedef void (*di_txinit_t)(hnddma_t *dmah); +typedef bool (*di_txenabled_t)(hnddma_t *dmah); +typedef void (*di_rxinit_t)(hnddma_t *dmah); +typedef void (*di_txsuspend_t)(hnddma_t *dmah); +typedef void (*di_txresume_t)(hnddma_t *dmah); +typedef bool (*di_txsuspended_t)(hnddma_t *dmah); +typedef bool (*di_txsuspendedidle_t)(hnddma_t *dmah); +typedef int (*di_txfast_t)(hnddma_t *dmah, void *p, bool commit); +typedef void (*di_fifoloopbackenable_t)(hnddma_t *dmah); +typedef bool (*di_txstopped_t)(hnddma_t *dmah); +typedef bool (*di_rxstopped_t)(hnddma_t *dmah); +typedef bool (*di_rxenable_t)(hnddma_t *dmah); +typedef bool (*di_rxenabled_t)(hnddma_t *dmah); +typedef void* (*di_rx_t)(hnddma_t *dmah); +typedef void (*di_rxfill_t)(hnddma_t *dmah); +typedef void (*di_txreclaim_t)(hnddma_t *dmah, bool forceall); +typedef void (*di_rxreclaim_t)(hnddma_t *dmah); +typedef uintptr (*di_getvar_t)(hnddma_t *dmah, char *name); +typedef void* (*di_getnexttxp_t)(hnddma_t *dmah, bool forceall); +typedef void* (*di_getnextrxp_t)(hnddma_t *dmah, bool forceall); +typedef void* (*di_peeknexttxp_t)(hnddma_t *dmah); +typedef void (*di_txblock_t)(hnddma_t *dmah); +typedef void (*di_txunblock_t)(hnddma_t *dmah); +typedef uint (*di_txactive_t)(hnddma_t *dmah); +typedef void (*di_txrotate_t)(hnddma_t *dmah); +typedef void (*di_counterreset_t)(hnddma_t *dmah); +typedef char* (*di_dump_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); +typedef char* (*di_dumptx_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); +typedef char* (*di_dumprx_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); + +/* dma opsvec */ +typedef struct di_fcn_s { + di_detach_t detach; + di_txinit_t txinit; + di_txreset_t txreset; + di_txenabled_t txenabled; + di_txsuspend_t txsuspend; + di_txresume_t txresume; + di_txsuspended_t txsuspended; + di_txsuspendedidle_t txsuspendedidle; + di_txfast_t txfast; + di_txstopped_t txstopped; + di_txreclaim_t txreclaim; + di_getnexttxp_t getnexttxp; + di_peeknexttxp_t peeknexttxp; + di_txblock_t txblock; + di_txunblock_t txunblock; + di_txactive_t txactive; + di_txrotate_t txrotate; + + di_rxinit_t rxinit; + di_rxreset_t rxreset; + di_rxidle_t rxidle; + di_rxstopped_t rxstopped; + di_rxenable_t rxenable; + di_rxenabled_t rxenabled; + di_rx_t rx; + di_rxfill_t rxfill; + di_rxreclaim_t rxreclaim; + di_getnextrxp_t getnextrxp; + + di_fifoloopbackenable_t fifoloopbackenable; + di_getvar_t d_getvar; + di_counterreset_t counterreset; + di_dump_t dump; + di_dumptx_t dumptx; + di_dumprx_t dumprx; + uint endnum; +} di_fcn_t; + +/* + * Exported data structure (read-only) + */ +/* export structure */ +struct hnddma_pub { + di_fcn_t di_fn; /* DMA function pointers */ + uint txavail; /* # free tx descriptors */ + + /* rx error counters */ + uint rxgiants; /* rx giant frames */ + uint rxnobuf; /* rx out of dma descriptors */ + /* tx error counters */ + uint txnobuf; /* tx out of dma descriptors */ +}; + + +extern hnddma_t * dma_attach(osl_t *osh, char *name, sb_t *sbh, void *dmaregstx, void *dmaregsrx, + uint ntxd, uint nrxd, uint rxbufsize, uint nrxpost, uint rxoffset, + uint *msg_level); +#define dma_detach(di) ((di)->di_fn.detach(di)) +#define dma_txreset(di) ((di)->di_fn.txreset(di)) +#define dma_rxreset(di) ((di)->di_fn.rxreset(di)) +#define dma_rxidle(di) ((di)->di_fn.rxidle(di)) +#define dma_txinit(di) ((di)->di_fn.txinit(di)) +#define dma_txenabled(di) ((di)->di_fn.txenabled(di)) +#define dma_rxinit(di) ((di)->di_fn.rxinit(di)) +#define dma_txsuspend(di) ((di)->di_fn.txsuspend(di)) +#define dma_txresume(di) ((di)->di_fn.txresume(di)) +#define dma_txsuspended(di) ((di)->di_fn.txsuspended(di)) +#define dma_txsuspendedidle(di) ((di)->di_fn.txsuspendedidle(di)) +#define dma_txfast(di, p, commit) ((di)->di_fn.txfast(di, p, commit)) +#define dma_fifoloopbackenable(di) ((di)->di_fn.fifoloopbackenable(di)) +#define dma_txstopped(di) ((di)->di_fn.txstopped(di)) +#define dma_rxstopped(di) ((di)->di_fn.rxstopped(di)) +#define dma_rxenable(di) ((di)->di_fn.rxenable(di)) +#define dma_rxenabled(di) ((di)->di_fn.rxenabled(di)) +#define dma_rx(di) ((di)->di_fn.rx(di)) +#define dma_rxfill(di) ((di)->di_fn.rxfill(di)) +#define dma_txreclaim(di, forceall) ((di)->di_fn.txreclaim(di, forceall)) +#define dma_rxreclaim(di) ((di)->di_fn.rxreclaim(di)) +#define dma_getvar(di, name) ((di)->di_fn.d_getvar(di, name)) +#define dma_getnexttxp(di, forceall) ((di)->di_fn.getnexttxp(di, forceall)) +#define dma_getnextrxp(di, forceall) ((di)->di_fn.getnextrxp(di, forceall)) +#define dma_peeknexttxp(di) ((di)->di_fn.peeknexttxp(di)) +#define dma_txblock(di) ((di)->di_fn.txblock(di)) +#define dma_txunblock(di) ((di)->di_fn.txunblock(di)) +#define dma_txactive(di) ((di)->di_fn.txactive(di)) +#define dma_txrotate(di) ((di)->di_fn.txrotate(di)) +#define dma_counterreset(di) ((di)->di_fn.counterreset(di)) + +#define DMA_DUMP_SIZE 2048 +/* return addresswidth allowed + * This needs to be done after SB attach but before dma attach. + * SB attach provides ability to probe backplane and dma core capabilities + * This info is needed by DMA_ALLOC_CONSISTENT in dma attach + */ +extern uint dma_addrwidth(sb_t *sbh, void *dmaregs); + +/* pio helpers */ +void dma_txpioloopback(osl_t *osh, dma32regs_t *); + +#endif /* _hnddma_h_ */ diff --git a/openwrt/package/broadcom-wl/src/kmod/linux_osl.c b/openwrt/package/broadcom-wl/src/kmod/linux_osl.c new file mode 100644 index 00000000000..d702961032a --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/linux_osl.c @@ -0,0 +1,269 @@ +/* + * Linux OS Independent Layer + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: linux_osl.c,v 1.1.1.14 2006/04/08 06:13:39 honor Exp $ + */ + +#define LINUX_OSL + +#include <typedefs.h> +#include <bcmendian.h> +#include <linux/module.h> +#include <linuxver.h> +#include <bcmdefs.h> +#include <osl.h> +#include "linux_osl.h" +#include <bcmutils.h> +#include <linux/delay.h> +#ifdef mips +#include <asm/paccess.h> +#endif /* mips */ +#include <pcicfg.h> + +#define PCI_CFG_RETRY 10 + +#define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */ +#define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */ + +typedef struct bcm_mem_link { + struct bcm_mem_link *prev; + struct bcm_mem_link *next; + uint size; + int line; + char file[BCM_MEM_FILENAME_LEN]; +} bcm_mem_link_t; + +static int16 linuxbcmerrormap[] = \ +{ 0, /* 0 */ + -EINVAL, /* BCME_ERROR */ + -EINVAL, /* BCME_BADARG */ + -EINVAL, /* BCME_BADOPTION */ + -EINVAL, /* BCME_NOTUP */ + -EINVAL, /* BCME_NOTDOWN */ + -EINVAL, /* BCME_NOTAP */ + -EINVAL, /* BCME_NOTSTA */ + -EINVAL, /* BCME_BADKEYIDX */ + -EINVAL, /* BCME_RADIOOFF */ + -EINVAL, /* BCME_NOTBANDLOCKED */ + -EINVAL, /* BCME_NOCLK */ + -EINVAL, /* BCME_BADRATESET */ + -EINVAL, /* BCME_BADBAND */ + -E2BIG, /* BCME_BUFTOOSHORT */ + -E2BIG, /* BCME_BUFTOOLONG */ + -EBUSY, /* BCME_BUSY */ + -EINVAL, /* BCME_NOTASSOCIATED */ + -EINVAL, /* BCME_BADSSIDLEN */ + -EINVAL, /* BCME_OUTOFRANGECHAN */ + -EINVAL, /* BCME_BADCHAN */ + -EFAULT, /* BCME_BADADDR */ + -ENOMEM, /* BCME_NORESOURCE */ + -EOPNOTSUPP, /* BCME_UNSUPPORTED */ + -EMSGSIZE, /* BCME_BADLENGTH */ + -EINVAL, /* BCME_NOTREADY */ + -EPERM, /* BCME_NOTPERMITTED */ + -ENOMEM, /* BCME_NOMEM */ + -EINVAL, /* BCME_ASSOCIATED */ + -ERANGE, /* BCME_RANGE */ + -EINVAL, /* BCME_NOTFOUND */ + -EINVAL, /* BCME_WME_NOT_ENABLED */ + -EINVAL, /* BCME_TSPEC_NOTFOUND */ + -EINVAL, /* BCME_ACM_NOTSUPPORTED */ + -EINVAL, /* BCME_NOT_WME_ASSOCIATION */ + -EIO, /* BCME_SDIO_ERROR */ + -ENODEV /* BCME_DONGLE_DOWN */ +}; + +/* translate bcmerrors into linux errors */ +int +osl_error(int bcmerror) +{ + int abs_bcmerror; + int array_size = ARRAYSIZE(linuxbcmerrormap); + + abs_bcmerror = ABS(bcmerror); + + if (bcmerror > 0) + abs_bcmerror = 0; + + else if (abs_bcmerror >= array_size) + abs_bcmerror = BCME_ERROR; + + return linuxbcmerrormap[abs_bcmerror]; +} + +osl_t * +osl_attach(void *pdev, bool pkttag) +{ + osl_t *osh; + + osh = kmalloc(sizeof(osl_t), GFP_ATOMIC); + ASSERT(osh); + + bzero(osh, sizeof(osl_t)); + + /* + * check the cases where + * 1.Error code Added to bcmerror table, but forgot to add it to the OS + * dependent error code + * 2. Error code is added to the bcmerror table, but forgot to add the + * corresponding errorstring(dummy call to bcmerrorstr) + */ + bcmerrorstr(0); + ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(linuxbcmerrormap) - 1)); + + osh->magic = OS_HANDLE_MAGIC; + osh->malloced = 0; + osh->failed = 0; + osh->dbgmem_list = NULL; + osh->pdev = pdev; + osh->pub.pkttag = pkttag; + + return osh; +} + +void +osl_detach(osl_t *osh) +{ + if (osh == NULL) + return; + + ASSERT(osh->magic == OS_HANDLE_MAGIC); + kfree(osh); +} + +/* Return a new packet. zero out pkttag */ +void* +osl_pktget(osl_t *osh, uint len, bool send) +{ + struct sk_buff *skb; + + if ((skb = dev_alloc_skb(len))) { + skb_put(skb, len); + skb->priority = 0; + +#ifdef BCMDBG_PKT + pktlist_add(&(osh->pktlist), (void *) skb); +#endif /* BCMDBG_PKT */ + + osh->pub.pktalloced++; + } + + return ((void*) skb); +} + +/* Free the driver packet. Free the tag if present */ +void +osl_pktfree(osl_t *osh, void *p) +{ + struct sk_buff *skb, *nskb; + + skb = (struct sk_buff*) p; + + /* perversion: we use skb->next to chain multi-skb packets */ + while (skb) { + nskb = skb->next; + skb->next = NULL; + +#ifdef BCMDBG_PKT + pktlist_remove(&(osh->pktlist), (void *) skb); +#endif /* BCMDBG_PKT */ + + if (skb->destructor) { + /* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if destructor exists + */ + dev_kfree_skb_any(skb); + } else { + /* can free immediately (even in_irq()) if destructor does not exist */ + dev_kfree_skb(skb); + } + + osh->pub.pktalloced--; + + skb = nskb; + } +} + +void* +osl_malloc(osl_t *osh, uint size) +{ + void *addr; + + /* only ASSERT if osh is defined */ + if (osh) + ASSERT(osh->magic == OS_HANDLE_MAGIC); + + if ((addr = kmalloc(size, GFP_ATOMIC)) == NULL) { + if (osh) + osh->failed++; + return (NULL); + } + if (osh) + osh->malloced += size; + + return (addr); +} + +void +osl_mfree(osl_t *osh, void *addr, uint size) +{ + if (osh) { + ASSERT(osh->magic == OS_HANDLE_MAGIC); + osh->malloced -= size; + } + kfree(addr); +} + +uint +osl_malloced(osl_t *osh) +{ + ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); + return (osh->malloced); +} + +uint osl_malloc_failed(osl_t *osh) +{ + ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); + return (osh->failed); +} + +#undef osl_delay +void +osl_delay(uint usec) +{ + OSL_DELAY(usec); +} + +/* Clone a packet. + * The pkttag contents are NOT cloned. + */ +void * +osl_pktdup(osl_t *osh, void *skb) +{ + void * p; + + if ((p = skb_clone((struct sk_buff*)skb, GFP_ATOMIC)) == NULL) + return NULL; + + /* skb_clone copies skb->cb.. we don't want that */ + if (osh->pub.pkttag) + bzero((void*)((struct sk_buff *)p)->cb, OSL_PKTTAG_SZ); + + /* Increment the packet counter */ + osh->pub.pktalloced++; + return (p); +} + +uint +osl_pktalloced(osl_t *osh) +{ + return (osh->pub.pktalloced); +} + diff --git a/openwrt/package/broadcom-wl/src/kmod/linux_osl.h b/openwrt/package/broadcom-wl/src/kmod/linux_osl.h new file mode 100644 index 00000000000..f6af6124c6c --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/linux_osl.h @@ -0,0 +1,171 @@ +/* + * Linux OS Independent Layer + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: linux_osl.h,v 1.1.1.13 2006/04/08 06:13:39 honor Exp $ + */ + +#ifndef _linux_osl_h_ +#define _linux_osl_h_ + +#include <typedefs.h> +#include <linuxver.h> +#include <osl.h> + +#define OSL_PKTTAG_SZ 32 /* Size of PktTag */ + +/* osl handle type forward declaration */ +typedef struct osl_dmainfo osldma_t; + +/* OSL initialization */ +extern osl_t *osl_attach(void *pdev, bool pkttag); +extern void osl_detach(osl_t *osh); + +/* host/bus architecture-specific byte swap */ +#define BUS_SWAP32(v) (v) +#define MALLOC_FAILED(osh) osl_malloc_failed((osh)) + +extern void *osl_malloc(osl_t *osh, uint size); +extern void osl_mfree(osl_t *osh, void *addr, uint size); +extern uint osl_malloced(osl_t *osh); +extern uint osl_malloc_failed(osl_t *osh); + +/* API for DMA addressing capability */ +#define DMA_MAP(osh, va, size, direction, p) \ + osl_dma_map((osh), (va), (size), (direction)) +#define DMA_UNMAP(osh, pa, size, direction, p) \ + osl_dma_unmap((osh), (pa), (size), (direction)) +static inline uint +osl_dma_map(void *osh, void *va, uint size, int direction) +{ + int dir; + struct pci_dev *dev; + + dev = (osh == NULL ? NULL : ((osl_t *)osh)->pdev); + dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; + return (pci_map_single(dev, va, size, dir)); +} + +static inline void +osl_dma_unmap(void *osh, uint pa, uint size, int direction) +{ + int dir; + struct pci_dev *dev; + + dev = (osh == NULL ? NULL : ((osl_t *)osh)->pdev); + dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; + pci_unmap_single(dev, (uint32)pa, size, dir); +} + +#define OSL_DMADDRWIDTH(osh, addrwidth) do {} while (0) +#define DMA_CONSISTENT_ALIGN PAGE_SIZE +#define DMA_ALLOC_CONSISTENT(osh, size, pap, dmah) \ + osl_dma_alloc_consistent((osh), (size), (pap)) +#define DMA_FREE_CONSISTENT(osh, va, size, pa, dmah) \ + osl_dma_free_consistent((osh), (void*)(va), (size), (pa)) +static inline void* +osl_dma_alloc_consistent(osl_t *osh, uint size, ulong *pap) +{ + return (pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap)); +} + +static inline void +osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa) +{ + pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); +} + + +/* register access macros */ +#if defined(BCMJTAG) +#include <bcmjtag.h> +#define R_REG(osh, r) bcmjtag_read(NULL, (uint32)(r), sizeof(*(r))) +#define W_REG(osh, r, v) bcmjtag_write(NULL, (uint32)(r), (uint32)(v), sizeof(*(r))) +#endif /* defined(BCMSDIO) */ + +/* packet primitives */ +#define PKTGET(osh, len, send) osl_pktget((osh), (len), (send)) +#define PKTFREE(osh, skb, send) osl_pktfree((osh), (skb)) +#define PKTDATA(osh, skb) (((struct sk_buff*)(skb))->data) +#define PKTLEN(osh, skb) (((struct sk_buff*)(skb))->len) +#define PKTHEADROOM(osh, skb) (PKTDATA(osh, skb)-(((struct sk_buff*)(skb))->head)) +#define PKTTAILROOM(osh, skb) ((((struct sk_buff*)(skb))->end)-(((struct sk_buff*)(skb))->tail)) +#define PKTNEXT(osh, skb) (((struct sk_buff*)(skb))->next) +#define PKTSETNEXT(osh, skb, x) (((struct sk_buff*)(skb))->next = (struct sk_buff*)(x)) +#define PKTSETLEN(osh, skb, len) __skb_trim((struct sk_buff*)(skb), (len)) +#define PKTPUSH(osh, skb, bytes) skb_push((struct sk_buff*)(skb), (bytes)) +#define PKTPULL(osh, skb, bytes) skb_pull((struct sk_buff*)(skb), (bytes)) +#define PKTDUP(osh, skb) osl_pktdup((osh), (skb)) +#define PKTTAG(skb) ((void*)(((struct sk_buff*)(skb))->cb)) +#define PKTALLOCED(osh) osl_pktalloced((osh)) +#define PKTLIST_DUMP(osh, buf) + +/* Convert a native(OS) packet to driver packet. + * In the process, native packet is destroyed, there is no copying + * Also, a packettag is zeroed out + */ +static INLINE void * +osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb) +{ + struct sk_buff *nskb; + + if (osh->pkttag) + bzero((void*)skb->cb, OSL_PKTTAG_SZ); + + /* Increment the packet counter */ + for (nskb = skb; nskb; nskb = nskb->next) { + osh->pktalloced++; + } + + return (void *)skb; +} +#define PKTFRMNATIVE(osh, skb) osl_pkt_frmnative(((struct osl_pubinfo *)osh), \ + (struct sk_buff*)(skb)) + +/* Convert a driver packet to native(OS) packet + * In the process, packettag is zeroed out before sending up + * IP code depends on skb->cb to be setup correctly with various options + * In our case, that means it should be 0 + */ +static INLINE struct sk_buff * +osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt) +{ + struct sk_buff *nskb; + + if (osh->pkttag) + bzero(((struct sk_buff*)pkt)->cb, OSL_PKTTAG_SZ); + + /* Decrement the packet counter */ + for (nskb = (struct sk_buff *)pkt; nskb; nskb = nskb->next) { + osh->pktalloced--; + } + + return (struct sk_buff *)pkt; +} +#define PKTTONATIVE(osh, pkt) osl_pkt_tonative((struct osl_pubinfo *)(osh), (pkt)) + +#define PKTLINK(skb) (((struct sk_buff*)(skb))->prev) +#define PKTSETLINK(skb, x) (((struct sk_buff*)(skb))->prev = (struct sk_buff*)(x)) +#define PKTPRIO(skb) (((struct sk_buff*)(skb))->priority) +#define PKTSETPRIO(skb, x) (((struct sk_buff*)(skb))->priority = (x)) +#define PKTSHARED(skb) (((struct sk_buff*)(skb))->cloned) + +extern void *osl_pktget(osl_t *osh, uint len, bool send); +extern void osl_pktfree(osl_t *osh, void *skb); +extern void *osl_pktdup(osl_t *osh, void *skb); +extern uint osl_pktalloced(osl_t *osh); + +#define OSL_ERROR(bcmerror) osl_error(bcmerror) +extern int osl_error(int bcmerror); + +/* the largest reasonable packet buffer driver uses for ethernet MTU in bytes */ +#define PKTBUFSZ 2048 /* largest reasonable packet buffer, driver uses for ethernet MTU */ + +#endif /* _linux_osl_h_ */ diff --git a/openwrt/package/broadcom-wl/src/kmod/patchtable.pl b/openwrt/package/broadcom-wl/src/kmod/patchtable.pl new file mode 100644 index 00000000000..6144d8b9253 --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/patchtable.pl @@ -0,0 +1,54 @@ +#!/usr/bin/perl +use strict; + +my $TABLE = pack("V", 0xbadc0ded); +my $TABLE_SIZE = 512; +my $SLT1 = "\x01\x00\x00\x00"; +my $SLT2 = "\x02\x00\x00\x00"; +my $ACKW = "\x03\x00\x00\x00"; +my $PTABLE_END = "\xff\xff\xff\xff"; + +my $addr = ""; +my $opcode = ""; +my $function = ""; + +sub add_entry { + my $key = shift; + my $value = shift; + my $default = shift; + + $TABLE .= $key; + $TABLE .= pack("V", $value); + $TABLE .= pack("V", $default); +} + +while (<>) { + $addr = $opcode = ""; + /^\w{8}\s*<(.*)>:$/ and $function = $1; + /^\s*(\w+):\s*(\w{8})\s*/ and do { + $addr = $1; + $opcode = $2; + }; + + ($function eq 'wlc_update_slot_timing') and do { + # li a2,9 -- short slot time + ($opcode eq '24060009') and add_entry($SLT1, hex($addr), hex($opcode)); + # li v0,519 -- 510 + short slot time + ($opcode eq '24020207') and add_entry($SLT2, hex($addr), hex($opcode)); + + # li a2,20 -- long slot time + ($opcode eq '24060014') and add_entry($SLT1, hex($addr), hex($opcode)); + # li v0,530 -- 510 + long slot time + ($opcode eq '24020212') and add_entry($SLT2, hex($addr), hex($opcode)); + }; + ($function eq 'wlc_d11hdrs') and do { + # ori s6,s6,0x1 -- ack flag (new) + ($opcode eq '36d60001') and add_entry($ACKW, hex($addr), hex($opcode)); + # ori s3,s3,0x1 -- ack flag (old) + ($opcode eq '36730001') and add_entry($ACKW, hex($addr), hex($opcode)); + } +} + +$TABLE .= $PTABLE_END; +$TABLE .= ("\x00" x ($TABLE_SIZE - length($TABLE))); +print $TABLE; diff --git a/openwrt/package/broadcom-wl/src/kmod/pktq.h b/openwrt/package/broadcom-wl/src/kmod/pktq.h new file mode 100644 index 00000000000..7fe21815e85 --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/pktq.h @@ -0,0 +1,97 @@ +/* + * Misc useful os-independent macros and functions. + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id: bcmutils.h,v 1.1.1.16 2006/04/08 06:13:39 honor Exp $ + */ + +#ifndef _pktq_h_ +#define _pktq_h_ +#include <osl.h> + +/* osl multi-precedence packet queue */ + +#define PKTQ_LEN_DEFAULT 128 /* Max 128 packets */ +#define PKTQ_MAX_PREC 16 /* Maximum precedence levels */ + +struct pktq { + struct pktq_prec { + void *head; /* first packet to dequeue */ + void *tail; /* last packet to dequeue */ + uint16 len; /* number of queued packets */ + uint16 max; /* maximum number of queued packets */ + } q[PKTQ_MAX_PREC]; + uint16 num_prec; /* number of precedences in use */ + uint16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */ + uint16 max; /* total max packets */ + uint16 len; /* total number of packets */ +}; + +#define PKTQ_PREC_ITER(pq, prec) for (prec = (pq)->num_prec - 1; prec >= 0; prec--) + +/* forward definition of ether_addr structure used by some function prototypes */ + +struct ether_addr; + +/* operations on a specific precedence in packet queue */ + +#define pktq_psetmax(pq, prec, _max) ((pq)->q[prec].max = (_max)) +#define pktq_plen(pq, prec) ((pq)->q[prec].len) +#define pktq_pavail(pq, prec) ((pq)->q[prec].max - (pq)->q[prec].len) +#define pktq_pfull(pq, prec) ((pq)->q[prec].len >= (pq)->q[prec].max) +#define pktq_pempty(pq, prec) ((pq)->q[prec].len == 0) + +#define pktq_ppeek(pq, prec) ((pq)->q[prec].head) +#define pktq_ppeek_tail(pq, prec) ((pq)->q[prec].tail) + +extern void *pktq_penq(struct pktq *pq, int prec, void *p); +extern void *pktq_penq_head(struct pktq *pq, int prec, void *p); +extern void *pktq_pdeq(struct pktq *pq, int prec); +extern void *pktq_pdeq_tail(struct pktq *pq, int prec); +/* Empty the queue at particular precedence level */ +extern void pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir); +/* Remove a specified packet from its queue */ +extern bool pktq_pdel(struct pktq *pq, void *p, int prec); + +/* operations on a set of precedences in packet queue */ + +extern int pktq_mlen(struct pktq *pq, uint prec_bmp); +extern void *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out); + +/* operations on packet queue as a whole */ + +#define pktq_len(pq) ((int)(pq)->len) +#define pktq_max(pq) ((int)(pq)->max) +#define pktq_avail(pq) ((int)((pq)->max - (pq)->len)) +#define pktq_full(pq) ((pq)->len >= (pq)->max) +#define pktq_empty(pq) ((pq)->len == 0) + +/* operations for single precedence queues */ +#define pktenq(pq, p) pktq_penq((pq), 0, (p)) +#define pktenq_head(pq, p) pktq_penq_head((pq), 0, (p)) +#define pktdeq(pq) pktq_pdeq((pq), 0) +#define pktdeq_tail(pq) pktq_pdeq_tail((pq), 0) + +extern void pktq_init(struct pktq *pq, int num_prec, int max_len); +/* prec_out may be NULL if caller is not interested in return value */ +extern void *pktq_deq(struct pktq *pq, int *prec_out); +extern void *pktq_deq_tail(struct pktq *pq, int *prec_out); +extern void *pktq_peek(struct pktq *pq, int *prec_out); +extern void *pktq_peek_tail(struct pktq *pq, int *prec_out); +extern void pktq_flush(osl_t *osh, struct pktq *pq, bool dir); /* Empty the entire queue */ + +/* externs */ +/* packet */ +extern uint pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf); +extern uint pkttotlen(osl_t *osh, void *p); +extern void *pktlast(osl_t *osh, void *p); + +extern void pktsetprio(void *pkt, bool update_vtag); + +#endif /* _pktq_h_ */ diff --git a/openwrt/package/broadcom-wl/src/kmod/sbhnddma.h b/openwrt/package/broadcom-wl/src/kmod/sbhnddma.h new file mode 100644 index 00000000000..a26db7395ee --- /dev/null +++ b/openwrt/package/broadcom-wl/src/kmod/sbhnddma.h @@ -0,0 +1,284 @@ +/* + * Generic Broadcom Home Networking Division (HND) DMA engine HW interface + * This supports the following chips: BCM42xx, 44xx, 47xx . + * + * Copyright 2006, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id: sbhnddma.h,v 1.1.1.2 2006/02/27 03:43:16 honor Exp $ + */ + +#ifndef _sbhnddma_h_ +#define _sbhnddma_h_ + +/* DMA structure: + * support two DMA engines: 32 bits address or 64 bit addressing + * basic DMA register set is per channel(transmit or receive) + * a pair of channels is defined for convenience + */ + + +/* 32 bits addressing */ + +/* dma registers per channel(xmt or rcv) */ +typedef volatile struct { + uint32 control; /* enable, et al */ + uint32 addr; /* descriptor ring base address (4K aligned) */ + uint32 ptr; /* last descriptor posted to chip */ + uint32 status; /* current active descriptor, et al */ +} dma32regs_t; + +typedef volatile struct { + dma32regs_t xmt; /* dma tx channel */ + dma32regs_t rcv; /* dma rx channel */ +} dma32regp_t; + +typedef volatile struct { /* diag access */ + uint32 fifoaddr; /* diag address */ + uint32 fifodatalow; /* low 32bits of data */ + uint32 fifodatahigh; /* high 32bits of data */ + uint32 pad; /* reserved */ +} dma32diag_t; + +/* + * DMA Descriptor + * Descriptors are only read by the hardware, never written back. + */ +typedef volatile struct { + uint32 ctrl; /* misc control bits & bufcount */ + uint32 addr; /* data buffer address */ +} dma32dd_t; + +/* + * Each descriptor ring must be 4096byte aligned, and fit within a single 4096byte page. + */ +#define D32MAXRINGSZ 4096 +#define D32RINGALIGN 4096 +#define D32MAXDD (D32MAXRINGSZ / sizeof (dma32dd_t)) + +/* transmit channel control */ +#define XC_XE ((uint32)1 << 0) /* transmit enable */ +#define XC_SE ((uint32)1 << 1) /* transmit suspend request */ +#define XC_LE ((uint32)1 << 2) /* loopback enable */ +#define XC_FL ((uint32)1 << 4) /* flush request */ +#define XC_AE ((uint32)3 << 16) /* address extension bits */ +#define XC_AE_SHIFT 16 + +/* transmit descriptor table pointer */ +#define XP_LD_MASK 0xfff /* last valid descriptor */ + +/* transmit channel status */ +#define XS_CD_MASK 0x0fff /* current descriptor pointer */ +#define XS_XS_MASK 0xf000 /* transmit state */ +#define XS_XS_SHIFT 12 +#define XS_XS_DISABLED 0x0000 /* disabled */ +#define XS_XS_ACTIVE 0x1000 /* active */ +#define XS_XS_IDLE 0x2000 /* idle wait */ +#define XS_XS_STOPPED 0x3000 /* stopped */ +#define XS_XS_SUSP 0x4000 /* suspend pending */ +#define XS_XE_MASK 0xf0000 /* transmit errors */ +#define XS_XE_SHIFT 16 +#define XS_XE_NOERR 0x00000 /* no error */ +#define XS_XE_DPE 0x10000 /* descriptor protocol error */ +#define XS_XE_DFU 0x20000 /* data fifo underrun */ +#define XS_XE_BEBR 0x30000 /* bus error on buffer read */ +#define XS_XE_BEDA 0x40000 /* bus error on descriptor access */ +#define XS_AD_MASK 0xfff00000 /* active descriptor */ +#define XS_AD_SHIFT 20 + +/* receive channel control */ +#define RC_RE ((uint32)1 << 0) /* receive enable */ +#define RC_RO_MASK 0xfe /* receive frame offset */ +#define RC_RO_SHIFT 1 +#define RC_FM ((uint32)1 << 8) /* direct fifo receive (pio) mode */ +#define RC_AE ((uint32)3 << 16) /* address extension bits */ +#define RC_AE_SHIFT 16 + +/* receive descriptor table pointer */ +#define RP_LD_MASK 0xfff /* last valid descriptor */ + +/* receive channel status */ +#define RS_CD_MASK 0x0fff /* current descriptor pointer */ +#define RS_RS_MASK 0xf000 /* receive state */ +#define RS_RS_SHIFT 12 +#define RS_RS_DISABLED 0x0000 /* disabled */ +#define RS_RS_ACTIVE 0x1000 /* active */ +#define RS_RS_IDLE 0x2000 /* idle wait */ +#define RS_RS_STOPPED 0x3000 /* reserved */ +#define RS_RE_MASK 0xf0000 /* receive errors */ +#define RS_RE_SHIFT 16 +#define RS_RE_NOERR 0x00000 /* no error */ +#define RS_RE_DPE 0x10000 /* descriptor protocol error */ +#define RS_RE_DFO 0x20000 /* data fifo overflow */ +#define RS_RE_BEBW 0x30000 /* bus error on buffer write */ +#define RS_RE_BEDA 0x40000 /* bus error on descriptor access */ +#define RS_AD_MASK 0xfff00000 /* active descriptor */ +#define RS_AD_SHIFT 20 + +/* fifoaddr */ +#define FA_OFF_MASK 0xffff /* offset */ +#define FA_SEL_MASK 0xf0000 /* select */ +#define FA_SEL_SHIFT 16 +#define FA_SEL_XDD 0x00000 /* transmit dma data */ +#define FA_SEL_XDP 0x10000 /* transmit dma pointers */ +#define FA_SEL_RDD 0x40000 /* receive dma data */ +#define FA_SEL_RDP 0x50000 /* receive dma pointers */ +#define FA_SEL_XFD 0x80000 /* transmit fifo data */ +#define FA_SEL_XFP 0x90000 /* transmit fifo pointers */ +#define FA_SEL_RFD 0xc0000 /* receive fifo data */ +#define FA_SEL_RFP 0xd0000 /* receive fifo pointers */ +#define FA_SEL_RSD 0xe0000 /* receive frame status data */ +#define FA_SEL_RSP 0xf0000 /* receive frame status pointers */ + +/* descriptor control flags */ +#define CTRL_BC_MASK 0x1fff /* buffer byte count */ +#define CTRL_AE ((uint32)3 << 16) /* address extension bits */ +#define CTRL_AE_SHIFT 16 +#define CTRL_EOT ((uint32)1 << 28) /* end of descriptor table */ +#define CTRL_IOC ((uint32)1 << 29) /* interrupt on completion */ +#define CTRL_EOF ((uint32)1 << 30) /* end of frame */ +#define CTRL_SOF ((uint32)1 << 31) /* start of frame */ + +/* control flags in the range [27:20] are core-specific and not defined here */ +#define CTRL_CORE_MASK 0x0ff00000 + +/* 64 bits addressing */ + +/* dma registers per channel(xmt or rcv) */ +typedef volatile struct { + uint32 control; /* enable, et al */ + uint32 ptr; /* last descriptor posted to chip */ + uint32 addrlow; /* descriptor ring base address low 32-bits (8K aligned) */ + uint32 addrhigh; /* descriptor ring base address bits 63:32 (8K aligned) */ + uint32 status0; /* current descriptor, xmt state */ + uint32 status1; /* active descriptor, xmt error */ +} dma64regs_t; + +typedef volatile struct { + dma64regs_t tx; /* dma64 tx channel */ + dma64regs_t rx; /* dma64 rx channel */ +} dma64regp_t; + +typedef volatile struct { /* diag access */ + uint32 fifoaddr; /* diag address */ + uint32 fifodatalow; /* low 32bits of data */ + uint32 fifodatahigh; /* high 32bits of data */ + uint32 pad; /* reserved */ +} dma64diag_t; + +/* + * DMA Descriptor + * Descriptors are only read by the hardware, never written back. + */ +typedef volatile struct { + uint32 ctrl1; /* misc control bits & bufcount */ + uint32 ctrl2; /* buffer count and address extension */ + uint32 addrlow; /* memory address of the date buffer, bits 31:0 */ + uint32 addrhigh; /* memory address of the date buffer, bits 63:32 */ +} dma64dd_t; + +/* + * Each descriptor ring must be 8kB aligned, and fit within a contiguous 8kB physical addresss. + */ +#define D64MAXRINGSZ 8192 +#define D64RINGALIGN 8192 +#define D64MAXDD (D64MAXRINGSZ / sizeof (dma64dd_t)) + +/* transmit channel control */ +#define D64_XC_XE 0x00000001 /* transmit enable */ +#define D64_XC_SE 0x00000002 /* transmit suspend request */ +#define D64_XC_LE 0x00000004 /* loopback enable */ +#define D64_XC_FL 0x00000010 /* flush request */ +#define D64_XC_AE 0x00030000 /* address extension bits */ +#define D64_XC_AE_SHIFT 16 + +/* transmit descriptor table pointer */ +#define D64_XP_LD_MASK 0x00000fff /* last valid descriptor */ + +/* transmit channel status */ +#define D64_XS0_CD_MASK 0x00001fff /* current descriptor pointer */ +#define D64_XS0_XS_MASK 0xf0000000 /* transmit state */ +#define D64_XS0_XS_SHIFT 28 +#define D64_XS0_XS_DISABLED 0x00000000 /* disabled */ +#define D64_XS0_XS_ACTIVE 0x10000000 /* active */ +#define D64_XS0_XS_IDLE 0x20000000 /* idle wait */ +#define D64_XS0_XS_STOPPED 0x30000000 /* stopped */ +#define D64_XS0_XS_SUSP 0x40000000 /* suspend pending */ + +#define D64_XS1_AD_MASK 0x0001ffff /* active descriptor */ +#define D64_XS1_XE_MASK 0xf0000000 /* transmit errors */ +#define D64_XS1_XE_SHIFT 28 +#define D64_XS1_XE_NOERR 0x00000000 /* no error */ +#define D64_XS1_XE_DPE 0x10000000 /* descriptor protocol error */ +#define D64_XS1_XE_DFU 0x20000000 /* data fifo underrun */ +#define D64_XS1_XE_DTE 0x30000000 /* data transfer error */ +#define D64_XS1_XE_DESRE 0x40000000 /* descriptor read error */ +#define D64_XS1_XE_COREE 0x50000000 /* core error */ + +/* receive channel control */ +#define D64_RC_RE 0x00000001 /* receive enable */ +#define D64_RC_RO_MASK 0x000000fe /* receive frame offset */ +#define D64_RC_RO_SHIFT 1 +#define D64_RC_FM 0x00000100 /* direct fifo receive (pio) mode */ +#define D64_RC_AE 0x00030000 /* address extension bits */ +#define D64_RC_AE_SHIFT 16 + +/* receive descriptor table pointer */ +#define D64_RP_LD_MASK 0x00000fff /* last valid descriptor */ + +/* receive channel status */ +#define D64_RS0_CD_MASK 0x00001fff /* current descriptor pointer */ +#define D64_RS0_RS_MASK 0xf0000000 /* receive state */ +#define D64_RS0_RS_SHIFT 28 +#define D64_RS0_RS_DISABLED 0x00000000 /* disabled */ +#define D64_RS0_RS_ACTIVE 0x10000000 /* active */ +#define D64_RS0_RS_IDLE 0x20000000 /* idle wait */ +#define D64_RS0_RS_STOPPED 0x30000000 /* stopped */ +#define D64_RS0_RS_SUSP 0x40000000 /* suspend pending */ + +#define D64_RS1_AD_MASK 0x0001ffff /* active descriptor */ +#define D64_RS1_RE_MASK 0xf0000000 /* receive errors */ +#define D64_RS1_RE_SHIFT 28 +#define D64_RS1_RE_NOERR 0x00000000 /* no error */ +#define D64_RS1_RE_DPO 0x10000000 /* descriptor protocol error */ +#define D64_RS1_RE_DFU 0x20000000 /* data fifo overflow */ +#define D64_RS1_RE_DTE 0x30000000 /* data transfer error */ +#define D64_RS1_RE_DESRE 0x40000000 /* descriptor read error */ +#define D64_RS1_RE_COREE 0x50000000 /* core error */ + +/* fifoaddr */ +#define D64_FA_OFF_MASK 0xffff /* offset */ +#define D64_FA_SEL_MASK 0xf0000 /* select */ +#define D64_FA_SEL_SHIFT 16 +#define D64_FA_SEL_XDD 0x00000 /* transmit dma data */ +#define D64_FA_SEL_XDP 0x10000 /* transmit dma pointers */ +#define D64_FA_SEL_RDD 0x40000 /* receive dma data */ +#define D64_FA_SEL_RDP 0x50000 /* receive dma pointers */ +#define D64_FA_SEL_XFD 0x80000 /* transmit fifo data */ +#define D64_FA_SEL_XFP 0x90000 /* transmit fifo pointers */ +#define D64_FA_SEL_RFD 0xc0000 /* receive fifo data */ +#define D64_FA_SEL_RFP 0xd0000 /* receive fifo pointers */ +#define D64_FA_SEL_RSD 0xe0000 /* receive frame status data */ +#define D64_FA_SEL_RSP 0xf0000 /* receive frame status pointers */ + +/* descriptor control flags 1 */ +#define D64_CTRL1_EOT ((uint32)1 << 28) /* end of descriptor table */ +#define D64_CTRL1_IOC ((uint32)1 << 29) /* interrupt on completion */ +#define D64_CTRL1_EOF ((uint32)1 << 30) /* end of frame */ +#define D64_CTRL1_SOF ((uint32)1 << 31) /* start of frame */ + +/* descriptor control flags 2 */ +#define D64_CTRL2_BC_MASK 0x00007fff /* buffer byte count mask */ +#define D64_CTRL2_AE 0x00030000 /* address extension bits */ +#define D64_CTRL2_AE_SHIFT 16 + +/* control flags in the range [27:20] are core-specific and not defined here */ +#define D64_CTRL_CORE_MASK 0x0ff00000 + + +#endif /* _sbhnddma_h_ */ diff --git a/openwrt/package/wlc/src/Makefile b/openwrt/package/broadcom-wl/src/wlc/Makefile similarity index 100% rename from openwrt/package/wlc/src/Makefile rename to openwrt/package/broadcom-wl/src/wlc/Makefile diff --git a/openwrt/package/wlc/src/include/bcmdefs.h b/openwrt/package/broadcom-wl/src/wlc/include/bcmdefs.h similarity index 100% rename from openwrt/package/wlc/src/include/bcmdefs.h rename to openwrt/package/broadcom-wl/src/wlc/include/bcmdefs.h diff --git a/openwrt/package/wlc/src/include/bcmutils.h b/openwrt/package/broadcom-wl/src/wlc/include/bcmutils.h similarity index 100% rename from openwrt/package/wlc/src/include/bcmutils.h rename to openwrt/package/broadcom-wl/src/wlc/include/bcmutils.h diff --git a/openwrt/package/wlc/src/include/proto/802.11.h b/openwrt/package/broadcom-wl/src/wlc/include/proto/802.11.h similarity index 100% rename from openwrt/package/wlc/src/include/proto/802.11.h rename to openwrt/package/broadcom-wl/src/wlc/include/proto/802.11.h diff --git a/openwrt/package/wlc/src/include/proto/bcmeth.h b/openwrt/package/broadcom-wl/src/wlc/include/proto/bcmeth.h similarity index 100% rename from openwrt/package/wlc/src/include/proto/bcmeth.h rename to openwrt/package/broadcom-wl/src/wlc/include/proto/bcmeth.h diff --git a/openwrt/package/wlc/src/include/proto/bcmevent.h b/openwrt/package/broadcom-wl/src/wlc/include/proto/bcmevent.h similarity index 100% rename from openwrt/package/wlc/src/include/proto/bcmevent.h rename to openwrt/package/broadcom-wl/src/wlc/include/proto/bcmevent.h diff --git a/openwrt/package/wlc/src/include/proto/ethernet.h b/openwrt/package/broadcom-wl/src/wlc/include/proto/ethernet.h similarity index 100% rename from openwrt/package/wlc/src/include/proto/ethernet.h rename to openwrt/package/broadcom-wl/src/wlc/include/proto/ethernet.h diff --git a/openwrt/package/wlc/src/include/proto/wpa.h b/openwrt/package/broadcom-wl/src/wlc/include/proto/wpa.h similarity index 100% rename from openwrt/package/wlc/src/include/proto/wpa.h rename to openwrt/package/broadcom-wl/src/wlc/include/proto/wpa.h diff --git a/openwrt/package/wlc/src/include/typedefs.h b/openwrt/package/broadcom-wl/src/wlc/include/typedefs.h similarity index 100% rename from openwrt/package/wlc/src/include/typedefs.h rename to openwrt/package/broadcom-wl/src/wlc/include/typedefs.h diff --git a/openwrt/package/wlc/src/include/wlioctl.h b/openwrt/package/broadcom-wl/src/wlc/include/wlioctl.h similarity index 100% rename from openwrt/package/wlc/src/include/wlioctl.h rename to openwrt/package/broadcom-wl/src/wlc/include/wlioctl.h diff --git a/openwrt/package/wlc/src/include/wlutils.h b/openwrt/package/broadcom-wl/src/wlc/include/wlutils.h similarity index 100% rename from openwrt/package/wlc/src/include/wlutils.h rename to openwrt/package/broadcom-wl/src/wlc/include/wlutils.h diff --git a/openwrt/package/wlc/src/ioctl.c b/openwrt/package/broadcom-wl/src/wlc/ioctl.c similarity index 100% rename from openwrt/package/wlc/src/ioctl.c rename to openwrt/package/broadcom-wl/src/wlc/ioctl.c diff --git a/openwrt/package/wlc/src/wlc.c b/openwrt/package/broadcom-wl/src/wlc/wlc.c similarity index 100% rename from openwrt/package/wlc/src/wlc.c rename to openwrt/package/broadcom-wl/src/wlc/wlc.c diff --git a/openwrt/package/wlc/Makefile b/openwrt/package/wlc/Makefile deleted file mode 100644 index e40fcd8d15f..00000000000 --- a/openwrt/package/wlc/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wlc -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/wlc - -include $(TOPDIR)/package/rules.mk - -define Package/wlc -SECTION:=base -CATEGORY:=Base system -DEPENDS:=@PACKAGE_KMOD_BRCM_WL -DEFAULT:=y -TITLE:=Utility for configuring the Broadcom wl driver -DESCRIPTION:=Utility for configuring the Broadcom wl driver -endef - - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) src/* $(PKG_BUILD_DIR)/ -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)\ - $(TARGET_CONFIGURE_OPTS) \ - CC="$(TARGET_CC)" \ - CFLAGS="-I$(PKG_BUILD_DIR)/include $(TARGET_CFLAGS)" \ - all -endef - -define Package/wlc/install - install -d -m0755 $(1)/sbin - install -m0755 $(PKG_BUILD_DIR)/wlc $(1)/sbin/ -endef - -$(eval $(call BuildPackage,wlc)) diff --git a/openwrt/target/linux/brcm-2.4/Config.in b/openwrt/target/linux/brcm-2.4/Config.in deleted file mode 100644 index c766a45c3d9..00000000000 --- a/openwrt/target/linux/brcm-2.4/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config PACKAGE_KMOD_BRCM_WL - prompt "kmod-brcm-wl...................... Broadcom Wireless Network Driver" - tristate - depends LINUX_2_4_BRCM - default y - help - Proprietary driver for Broadcom Wireless chipsets - diff --git a/openwrt/target/linux/brcm-2.4/Makefile b/openwrt/target/linux/brcm-2.4/Makefile index 384a1ea9186..022f3352c5d 100644 --- a/openwrt/target/linux/brcm-2.4/Makefile +++ b/openwrt/target/linux/brcm-2.4/Makefile @@ -8,10 +8,6 @@ include ../rules.mk include ./config # broadcom specific kmod packages -$(eval $(call KMOD_template,BRCM_WL,brcm-wl,\ - $(MODULES_DIR)/kernel/drivers/net/wl/wl.o \ -,CONFIG_WL,,20,wl)) - $(eval $(call KMOD_template,LP,lp,\ $(MODULES_DIR)/kernel/drivers/parport/parport.o \ $(MODULES_DIR)/kernel/drivers/parport/parport_splink.o \ @@ -29,38 +25,3 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked @$(CP) config $(LINUX_DIR)/.config touch $@ - -############################################### -# Proprietary driver for BCM43xx -############################################### - -LINUX_BINARY_DRIVER_SITE=http://downloads.openwrt.org/sources -# proprietary driver, extracted from Linksys GPL sourcetree WRT54GS 4.70.6 -LINUX_BINARY_WL_DRIVER=kernel-binary-wl-0.7.tar.gz -LINUX_BINARY_WL_MD5SUM=ff50130914790cbae9b73a13513da5ee - -$(DL_DIR)/$(LINUX_BINARY_WL_DRIVER): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_BINARY_WL_DRIVER) $(LINUX_BINARY_WL_MD5SUM) $(LINUX_BINARY_DRIVER_SITE) - -$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) -$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.drivers-unpacked -$(LINUX_DIR)/.modules_done: $(LINUX_DIR)/.drivers-unpacked -$(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.drivers-installed - -$(LINUX_DIR)/.drivers-unpacked: $(LINUX_DIR)/.unpacked - -mkdir -p $(BUILD_DIR) - zcat $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - # copy binary wlan driver - mkdir -p $(LINUX_DIR)/drivers/net/wl - $(CP) $(BUILD_DIR)/kernel-binary-wl/*.o $(LINUX_DIR)/drivers/net/wl - touch $@ - -$(LINUX_DIR)/.drivers-installed: $(LINUX_DIR)/.modules_done - mkdir -p $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl - @-[ -f $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl/wl.o ] || $(CP) $(LINUX_DIR)/drivers/net/wl/wl.o $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl/ - touch $@ - -linux-dirclean: drivers-clean - -drivers-clean: FORCE - rm -rf $(BUILD_DIR)/kernel-binary-wl diff --git a/openwrt/target/linux/brcm-2.4/config b/openwrt/target/linux/brcm-2.4/config index c4cf5340ea9..7185e9f3998 100644 --- a/openwrt/target/linux/brcm-2.4/config +++ b/openwrt/target/linux/brcm-2.4/config @@ -91,7 +91,6 @@ CONFIG_PCI=y CONFIG_NONCOHERENT_IO=y CONFIG_NEW_TIME_C=y CONFIG_NEW_IRQ=y -CONFIG_HND=y # CONFIG_MIPS_AU1000 is not set # @@ -726,7 +725,6 @@ CONFIG_SCSI_MULTI_LUN=y # Network device support # CONFIG_NETDEVICES=y -CONFIG_HND=y # # ARCnet devices @@ -832,7 +830,6 @@ CONFIG_NET_RADIO=y # CONFIG_AIRONET4500_PROC is not set # CONFIG_AIRO is not set # CONFIG_HERMES is not set -CONFIG_WL=m # CONFIG_PLX_HERMES is not set # CONFIG_TMD_HERMES is not set # CONFIG_PCI_HERMES is not set diff --git a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch index e1bd00bae2d..dc0805e5996 100644 --- a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch +++ b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch @@ -15886,7 +15886,7 @@ diff -urN linux.old/arch/mips/config-shared.in linux.dev/arch/mips/config-shared # Select some configuration options automatically based on user selections. # if [ "$CONFIG_ACER_PICA_61" = "y" ]; then -@@ -554,6 +567,13 @@ +@@ -554,6 +567,12 @@ define_bool CONFIG_SWAP_IO_SPACE_L y define_bool CONFIG_BOOT_ELF32 y fi @@ -15895,7 +15895,6 @@ diff -urN linux.old/arch/mips/config-shared.in linux.dev/arch/mips/config-shared + define_bool CONFIG_NONCOHERENT_IO y + define_bool CONFIG_NEW_TIME_C y + define_bool CONFIG_NEW_IRQ y -+ define_bool CONFIG_HND y +fi if [ "$CONFIG_SNI_RM200_PCI" = "y" ]; then define_bool CONFIG_ARC32 y @@ -16265,18 +16264,6 @@ diff -urN linux.old/drivers/char/serial.c linux.dev/drivers/char/serial.c cval = cflag & (CSIZE | CSTOPB); #if defined(__powerpc__) || defined(__alpha__) cval >>= 8; -diff -urN linux.old/drivers/net/Config.in linux.dev/drivers/net/Config.in ---- linux.old/drivers/net/Config.in 2006-04-27 18:04:38.000000000 +0200 -+++ linux.dev/drivers/net/Config.in 2006-04-27 19:24:19.000000000 +0200 -@@ -2,6 +2,8 @@ - # Network device configuration - # - -+tristate 'Broadcom Home Network Division' CONFIG_HND $CONFIG_PCI -+ - source drivers/net/arcnet/Config.in - - tristate 'Dummy net driver support' CONFIG_DUMMY diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile --- linux.old/drivers/net/Makefile 2006-04-27 18:04:38.000000000 +0200 +++ linux.dev/drivers/net/Makefile 2006-05-04 01:41:03.000000000 +0200 @@ -16289,3243 +16276,6 @@ diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile obj-y := obj-m := obj-n := -@@ -39,6 +41,7 @@ - obj-$(CONFIG_ISDN) += slhc.o - endif - -+subdir-$(CONFIG_WL) += wl - subdir-$(CONFIG_NET_PCMCIA) += pcmcia - subdir-$(CONFIG_NET_WIRELESS) += wireless - subdir-$(CONFIG_TULIP) += tulip -diff -urN linux.old/drivers/net/wireless/Config.in linux.dev/drivers/net/wireless/Config.in ---- linux.old/drivers/net/wireless/Config.in 2006-04-27 18:04:38.000000000 +0200 -+++ linux.dev/drivers/net/wireless/Config.in 2006-05-04 01:42:48.000000000 +0200 -@@ -13,6 +13,7 @@ - fi - - if [ "$CONFIG_PCI" = "y" ]; then -+ dep_tristate ' Proprietary Broadcom BCM43xx 802.11 Wireless support' CONFIG_WL - dep_tristate ' Hermes in PLX9052 based PCI adaptor support (Netgear MA301 etc.) (EXPERIMENTAL)' CONFIG_PLX_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL - dep_tristate ' Hermes in TMD7160/NCP130 based PCI adaptor support (Pheecom WL-PCI etc.) (EXPERIMENTAL)' CONFIG_TMD_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL - dep_tristate ' Prism 2.5 PCI 802.11b adaptor support (EXPERIMENTAL)' CONFIG_PCI_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL -diff -urN linux.old/drivers/net/wl/patchtable.pl linux.dev/drivers/net/wl/patchtable.pl ---- linux.old/drivers/net/wl/patchtable.pl 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/patchtable.pl 2006-04-28 01:33:52.000000000 +0200 -@@ -0,0 +1,54 @@ -+#!/usr/bin/perl -+use strict; -+ -+my $TABLE = pack("V", 0xbadc0ded); -+my $TABLE_SIZE = 512; -+my $SLT1 = "\x01\x00\x00\x00"; -+my $SLT2 = "\x02\x00\x00\x00"; -+my $ACKW = "\x03\x00\x00\x00"; -+my $PTABLE_END = "\xff\xff\xff\xff"; -+ -+my $addr = ""; -+my $opcode = ""; -+my $function = ""; -+ -+sub add_entry { -+ my $key = shift; -+ my $value = shift; -+ my $default = shift; -+ -+ $TABLE .= $key; -+ $TABLE .= pack("V", $value); -+ $TABLE .= pack("V", $default); -+} -+ -+while (<>) { -+ $addr = $opcode = ""; -+ /^\w{8}\s*<(.*)>:$/ and $function = $1; -+ /^\s*(\w+):\s*(\w{8})\s*/ and do { -+ $addr = $1; -+ $opcode = $2; -+ }; -+ -+ ($function eq 'wlc_update_slot_timing') and do { -+ # li a2,9 -- short slot time -+ ($opcode eq '24060009') and add_entry($SLT1, hex($addr), hex($opcode)); -+ # li v0,519 -- 510 + short slot time -+ ($opcode eq '24020207') and add_entry($SLT2, hex($addr), hex($opcode)); -+ -+ # li a2,20 -- long slot time -+ ($opcode eq '24060014') and add_entry($SLT1, hex($addr), hex($opcode)); -+ # li v0,530 -- 510 + long slot time -+ ($opcode eq '24020212') and add_entry($SLT2, hex($addr), hex($opcode)); -+ }; -+ ($function eq 'wlc_d11hdrs') and do { -+ # ori s6,s6,0x1 -- ack flag (new) -+ ($opcode eq '36d60001') and add_entry($ACKW, hex($addr), hex($opcode)); -+ # ori s3,s3,0x1 -- ack flag (old) -+ ($opcode eq '36730001') and add_entry($ACKW, hex($addr), hex($opcode)); -+ } -+} -+ -+$TABLE .= $PTABLE_END; -+$TABLE .= ("\x00" x ($TABLE_SIZE - length($TABLE))); -+print $TABLE; -diff -urN linux.old/drivers/net/wl/Makefile linux.dev/drivers/net/wl/Makefile ---- linux.old/drivers/net/wl/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/Makefile 2006-04-28 01:33:52.000000000 +0200 -@@ -0,0 +1,32 @@ -+# -+# Makefile for the Broadcom wl driver -+# -+# Copyright 2004, Broadcom Corporation -+# All Rights Reserved. -+# -+# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+# -+# $Id: Makefile,v 1.2 2005/03/29 03:32:18 mbm Exp $ -+ -+EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER -+ -+O_TARGET := wl_link.o -+ -+obj-y := wl_mod.o -+obj-y += bcmutils.o hnddma.o linux_osl.o -+ -+obj-m := $(O_TARGET) -+ -+wl_mod.o: wl_apsta.o -+ sed -e 's,eth%d,wl%d\x00,g' < $< > $@ -+ -+wl.o: wl_link.o -+ $(OBJDUMP) -d $< | perl patchtable.pl > patchtable.bin -+ cat wl_link.o patchtable.bin > $@ -+ -+modules: wl.o -+ -+include $(TOPDIR)/Rules.make -diff -urN linux.old/drivers/net/wl/bcmip.h linux.dev/drivers/net/wl/bcmip.h ---- linux.old/drivers/net/wl/bcmip.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/bcmip.h 2006-04-28 02:11:28.000000000 +0200 -@@ -0,0 +1,101 @@ -+/* -+ * Copyright 2006, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * Fundamental constants relating to IP Protocol -+ * -+ * $Id: bcmip.h,v 1.1.1.3 2006/02/27 03:43:16 honor Exp $ -+ */ -+ -+#ifndef _bcmip_h_ -+#define _bcmip_h_ -+ -+/* IPV4 and IPV6 common */ -+#define IP_VER_OFFSET 0x0 /* offset to version field */ -+#define IP_VER_MASK 0xf0 /* version mask */ -+#define IP_VER_SHIFT 4 /* version shift */ -+#define IP_VER_4 4 /* version number for IPV4 */ -+#define IP_VER_6 6 /* version number for IPV6 */ -+ -+#define IP_VER(ip_body) \ -+ ((((uint8 *)(ip_body))[IP_VER_OFFSET] & IP_VER_MASK) >> IP_VER_SHIFT) -+ -+#define IP_PROT_ICMP 0x1 /* ICMP protocol */ -+#define IP_PROT_TCP 0x6 /* TCP protocol */ -+#define IP_PROT_UDP 0x11 /* UDP protocol type */ -+ -+/* IPV4 field offsets */ -+#define IPV4_VER_HL_OFFSET 0 /* version and ihl byte offset */ -+#define IPV4_TOS_OFFSET 1 /* type of service offset */ -+#define IPV4_PROT_OFFSET 9 /* protocol type offset */ -+#define IPV4_CHKSUM_OFFSET 10 /* IP header checksum offset */ -+#define IPV4_SRC_IP_OFFSET 12 /* src IP addr offset */ -+#define IPV4_DEST_IP_OFFSET 16 /* dest IP addr offset */ -+ -+/* IPV4 field decodes */ -+#define IPV4_VER_MASK 0xf0 /* IPV4 version mask */ -+#define IPV4_VER_SHIFT 4 /* IPV4 version shift */ -+ -+#define IPV4_HLEN_MASK 0x0f /* IPV4 header length mask */ -+#define IPV4_HLEN(ipv4_body) (4 * (((uint8 *)(ipv4_body))[IPV4_VER_HL_OFFSET] & IPV4_HLEN_MASK)) -+ -+#define IPV4_ADDR_LEN 4 /* IPV4 address length */ -+ -+#define IPV4_ADDR_NULL(a) ((((uint8 *)(a))[0] | ((uint8 *)(a))[1] | \ -+ ((uint8 *)(a))[2] | ((uint8 *)(a))[3]) == 0) -+ -+#define IPV4_TOS_DSCP_MASK 0xfc /* DiffServ codepoint mask */ -+#define IPV4_TOS_DSCP_SHIFT 2 /* DiffServ codepoint shift */ -+ -+#define IPV4_TOS(ipv4_body) (((uint8 *)(ipv4_body))[IPV4_TOS_OFFSET]) -+ -+#define IPV4_TOS_PREC_MASK 0xe0 /* Historical precedence mask */ -+#define IPV4_TOS_PREC_SHIFT 5 /* Historical precedence shift */ -+ -+#define IPV4_TOS_LOWDELAY 0x10 /* Lowest delay requested */ -+#define IPV4_TOS_THROUGHPUT 0x8 /* Best throughput requested */ -+#define IPV4_TOS_RELIABILITY 0x4 /* Most reliable delivery requested */ -+ -+#define IPV4_PROT(ipv4_body) (((uint8 *)(ipv4_body))[IPV4_PROT_OFFSET]) -+ -+#define IPV4_ADDR_STR_LEN 16 /* Max IP address length in string format */ -+ -+/* IPV6 field offsets */ -+#define IPV6_PAYLOAD_LEN_OFFSET 4 /* payload length offset */ -+#define IPV6_NEXT_HDR_OFFSET 6 /* next header/protocol offset */ -+#define IPV6_HOP_LIMIT_OFFSET 7 /* hop limit offset */ -+#define IPV6_SRC_IP_OFFSET 8 /* src IP addr offset */ -+#define IPV6_DEST_IP_OFFSET 24 /* dst IP addr offset */ -+ -+/* IPV6 field decodes */ -+#define IPV6_TRAFFIC_CLASS(ipv6_body) \ -+ (((((uint8 *)(ipv6_body))[0] & 0x0f) << 4) | \ -+ ((((uint8 *)(ipv6_body))[1] & 0xf0) >> 4)) -+ -+#define IPV6_FLOW_LABEL(ipv6_body) \ -+ (((((uint8 *)(ipv6_body))[1] & 0x0f) << 16) | \ -+ (((uint8 *)(ipv6_body))[2] << 8) | \ -+ (((uint8 *)(ipv6_body))[3])) -+ -+#define IPV6_PAYLOAD_LEN(ipv6_body) \ -+ ((((uint8 *)(ipv6_body))[IPV6_PAYLOAD_LEN_OFFSET + 0] << 8) | \ -+ ((uint8 *)(ipv6_body))[IPV6_PAYLOAD_LEN_OFFSET + 1]) -+ -+#define IPV6_NEXT_HDR(ipv6_body) \ -+ (((uint8 *)(ipv6_body))[IPV6_NEXT_HDR_OFFSET]) -+ -+#define IPV6_PROT(ipv6_body) IPV6_NEXT_HDR(ipv6_body) -+ -+#define IPV6_ADDR_LEN 16 /* IPV6 address length */ -+ -+/* IPV4 TOS or IPV6 Traffic Classifier or 0 */ -+#define IP_TOS(ip_body) \ -+ (IP_VER(ip_body) == IP_VER_4 ? IPV4_TOS(ip_body) : \ -+ IP_VER(ip_body) == IP_VER_6 ? IPV6_TRAFFIC_CLASS(ip_body) : 0) -+ -+#endif /* _bcmip_h_ */ -diff -urN linux.old/drivers/net/wl/bcmutils.c linux.dev/drivers/net/wl/bcmutils.c ---- linux.old/drivers/net/wl/bcmutils.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/bcmutils.c 2006-04-28 02:27:20.000000000 +0200 -@@ -0,0 +1,857 @@ -+/* -+ * Misc useful OS-independent routines. -+ * -+ * Copyright 2006, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id: bcmutils.c,v 1.1.1.12 2006/02/27 03:43:16 honor Exp $ -+ */ -+ -+#include <typedefs.h> -+#include <bcmdefs.h> -+#include <stdarg.h> -+#include <osl.h> -+#include "linux_osl.h" -+#include "pktq.h" -+#include <bcmutils.h> -+#include <sbutils.h> -+#include <bcmnvram.h> -+#include <bcmendian.h> -+#include <bcmdevs.h> -+#include "bcmip.h" -+ -+#define ETHER_TYPE_8021Q 0x8100 -+#define ETHER_TYPE_IP 0x0800 -+#define VLAN_PRI_SHIFT 13 -+#define VLAN_PRI_MASK 7 -+ -+ -+struct ether_header { -+ uint8 ether_dhost[6]; -+ uint8 ether_shost[6]; -+ uint16 ether_type; -+} __attribute__((packed)); -+ -+ -+struct ethervlan_header { -+ uint8 ether_dhost[6]; -+ uint8 ether_shost[6]; -+ uint16 vlan_type; /* 0x8100 */ -+ uint16 vlan_tag; /* priority, cfi and vid */ -+ uint16 ether_type; -+}; -+ -+/* copy a pkt buffer chain into a buffer */ -+uint -+pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf) -+{ -+ uint n, ret = 0; -+ -+ if (len < 0) -+ len = 4096; /* "infinite" */ -+ -+ /* skip 'offset' bytes */ -+ for (; p && offset; p = PKTNEXT(osh, p)) { -+ if (offset < (uint)PKTLEN(osh, p)) -+ break; -+ offset -= PKTLEN(osh, p); -+ } -+ -+ if (!p) -+ return 0; -+ -+ /* copy the data */ -+ for (; p && len; p = PKTNEXT(osh, p)) { -+ n = MIN((uint)PKTLEN(osh, p) - offset, (uint)len); -+ bcopy(PKTDATA(osh, p) + offset, buf, n); -+ buf += n; -+ len -= n; -+ ret += n; -+ offset = 0; -+ } -+ -+ return ret; -+} -+ -+/* return total length of buffer chain */ -+uint -+pkttotlen(osl_t *osh, void *p) -+{ -+ uint total; -+ -+ total = 0; -+ for (; p; p = PKTNEXT(osh, p)) -+ total += PKTLEN(osh, p); -+ return (total); -+} -+ -+/* return the last buffer of chained pkt */ -+void * -+pktlast(osl_t *osh, void *p) -+{ -+ for (; PKTNEXT(osh, p); p = PKTNEXT(osh, p)) -+ ; -+ -+ return (p); -+} -+ -+ -+/* -+ * osl multiple-precedence packet queue -+ * hi_prec is always >= the number of the highest non-empty queue -+ */ -+void * -+pktq_penq(struct pktq *pq, int prec, void *p) -+{ -+ struct pktq_prec *q; -+ -+ ASSERT(prec >= 0 && prec < pq->num_prec); -+ ASSERT(PKTLINK(p) == NULL); /* queueing chains not allowed */ -+ -+ ASSERT(!pktq_full(pq)); -+ ASSERT(!pktq_pfull(pq, prec)); -+ -+ q = &pq->q[prec]; -+ -+ if (q->head) -+ PKTSETLINK(q->tail, p); -+ else -+ q->head = p; -+ -+ q->tail = p; -+ q->len++; -+ -+ pq->len++; -+ -+ if (pq->hi_prec < prec) -+ pq->hi_prec = (uint8)prec; -+ -+ return p; -+} -+ -+void * -+pktq_penq_head(struct pktq *pq, int prec, void *p) -+{ -+ struct pktq_prec *q; -+ -+ ASSERT(prec >= 0 && prec < pq->num_prec); -+ ASSERT(PKTLINK(p) == NULL); /* queueing chains not allowed */ -+ -+ ASSERT(!pktq_full(pq)); -+ ASSERT(!pktq_pfull(pq, prec)); -+ -+ q = &pq->q[prec]; -+ -+ if (q->head == NULL) -+ q->tail = p; -+ -+ PKTSETLINK(p, q->head); -+ q->head = p; -+ q->len++; -+ -+ pq->len++; -+ -+ if (pq->hi_prec < prec) -+ pq->hi_prec = (uint8)prec; -+ -+ return p; -+} -+ -+void * -+pktq_pdeq(struct pktq *pq, int prec) -+{ -+ struct pktq_prec *q; -+ void *p; -+ -+ ASSERT(prec >= 0 && prec < pq->num_prec); -+ -+ q = &pq->q[prec]; -+ -+ if ((p = q->head) == NULL) -+ return NULL; -+ -+ if ((q->head = PKTLINK(p)) == NULL) -+ q->tail = NULL; -+ -+ q->len--; -+ -+ pq->len--; -+ -+ PKTSETLINK(p, NULL); -+ -+ return p; -+} -+ -+void * -+pktq_pdeq_tail(struct pktq *pq, int prec) -+{ -+ struct pktq_prec *q; -+ void *p, *prev; -+ -+ ASSERT(prec >= 0 && prec < pq->num_prec); -+ -+ q = &pq->q[prec]; -+ -+ if ((p = q->head) == NULL) -+ return NULL; -+ -+ for (prev = NULL; p != q->tail; p = PKTLINK(p)) -+ prev = p; -+ -+ if (prev) -+ PKTSETLINK(prev, NULL); -+ else -+ q->head = NULL; -+ -+ q->tail = prev; -+ q->len--; -+ -+ pq->len--; -+ -+ return p; -+} -+ -+void -+pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir) -+{ -+ struct pktq_prec *q; -+ void *p; -+ -+ q = &pq->q[prec]; -+ p = q->head; -+ while (p) { -+ q->head = PKTLINK(p); -+ PKTSETLINK(p, NULL); -+ PKTFREE(osh, p, dir); -+ q->len--; -+ pq->len--; -+ p = q->head; -+ } -+ ASSERT(q->len == 0); -+ q->tail = NULL; -+} -+ -+bool -+pktq_pdel(struct pktq *pq, void *pktbuf, int prec) -+{ -+ struct pktq_prec *q; -+ void *p; -+ -+ ASSERT(prec >= 0 && prec < pq->num_prec); -+ -+ if (!pktbuf) -+ return FALSE; -+ -+ q = &pq->q[prec]; -+ -+ if (q->head == pktbuf) { -+ if ((q->head = PKTLINK(pktbuf)) == NULL) -+ q->tail = NULL; -+ } else { -+ for (p = q->head; p && PKTLINK(p) != pktbuf; p = PKTLINK(p)) -+ ; -+ if (p == NULL) -+ return FALSE; -+ -+ PKTSETLINK(p, PKTLINK(pktbuf)); -+ if (q->tail == pktbuf) -+ q->tail = p; -+ } -+ -+ q->len--; -+ pq->len--; -+ PKTSETLINK(pktbuf, NULL); -+ return TRUE; -+} -+ -+void -+pktq_init(struct pktq *pq, int num_prec, int max_len) -+{ -+ int prec; -+ -+ ASSERT(num_prec > 0 && num_prec <= PKTQ_MAX_PREC); -+ -+ bzero(pq, sizeof(*pq)); -+ -+ pq->num_prec = (uint16)num_prec; -+ -+ pq->max = (uint16)max_len; -+ -+ for (prec = 0; prec < num_prec; prec++) -+ pq->q[prec].max = pq->max; -+} -+ -+void * -+pktq_deq(struct pktq *pq, int *prec_out) -+{ -+ struct pktq_prec *q; -+ void *p; -+ int prec; -+ -+ if (pq->len == 0) -+ return NULL; -+ -+ while ((prec = pq->hi_prec) > 0 && pq->q[prec].head == NULL) -+ pq->hi_prec--; -+ -+ q = &pq->q[prec]; -+ -+ if ((p = q->head) == NULL) -+ return NULL; -+ -+ if ((q->head = PKTLINK(p)) == NULL) -+ q->tail = NULL; -+ -+ q->len--; -+ -+ pq->len--; -+ -+ if (prec_out) -+ *prec_out = prec; -+ -+ PKTSETLINK(p, NULL); -+ -+ return p; -+} -+ -+void * -+pktq_deq_tail(struct pktq *pq, int *prec_out) -+{ -+ struct pktq_prec *q; -+ void *p, *prev; -+ int prec; -+ -+ if (pq->len == 0) -+ return NULL; -+ -+ for (prec = 0; prec < pq->hi_prec; prec++) -+ if (pq->q[prec].head) -+ break; -+ -+ q = &pq->q[prec]; -+ -+ if ((p = q->head) == NULL) -+ return NULL; -+ -+ for (prev = NULL; p != q->tail; p = PKTLINK(p)) -+ prev = p; -+ -+ if (prev) -+ PKTSETLINK(prev, NULL); -+ else -+ q->head = NULL; -+ -+ q->tail = prev; -+ q->len--; -+ -+ pq->len--; -+ -+ if (prec_out) -+ *prec_out = prec; -+ -+ PKTSETLINK(p, NULL); -+ -+ return p; -+} -+ -+void * -+pktq_peek(struct pktq *pq, int *prec_out) -+{ -+ int prec; -+ -+ if (pq->len == 0) -+ return NULL; -+ -+ while ((prec = pq->hi_prec) > 0 && pq->q[prec].head == NULL) -+ pq->hi_prec--; -+ -+ if (prec_out) -+ *prec_out = prec; -+ -+ return (pq->q[prec].head); -+} -+ -+void * -+pktq_peek_tail(struct pktq *pq, int *prec_out) -+{ -+ int prec; -+ -+ if (pq->len == 0) -+ return NULL; -+ -+ for (prec = 0; prec < pq->hi_prec; prec++) -+ if (pq->q[prec].head) -+ break; -+ -+ if (prec_out) -+ *prec_out = prec; -+ -+ return (pq->q[prec].tail); -+} -+ -+void -+pktq_flush(osl_t *osh, struct pktq *pq, bool dir) -+{ -+ int prec; -+ for (prec = 0; prec < pq->num_prec; prec++) -+ pktq_pflush(osh, pq, prec, dir); -+ ASSERT(pq->len == 0); -+} -+ -+/* Return sum of lengths of a specific set of precedences */ -+int -+pktq_mlen(struct pktq *pq, uint prec_bmp) -+{ -+ int prec, len; -+ -+ len = 0; -+ -+ for (prec = 0; prec <= pq->hi_prec; prec++) -+ if (prec_bmp & (1 << prec)) -+ len += pq->q[prec].len; -+ -+ return len; -+} -+ -+/* Priority dequeue from a specific set of precedences */ -+void * -+pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out) -+{ -+ struct pktq_prec *q; -+ void *p; -+ int prec; -+ -+ if (pq->len == 0) -+ return NULL; -+ -+ while ((prec = pq->hi_prec) > 0 && pq->q[prec].head == NULL) -+ pq->hi_prec--; -+ -+ while ((prec_bmp & (1 << prec)) == 0 || pq->q[prec].head == NULL) -+ if (prec-- == 0) -+ return NULL; -+ -+ q = &pq->q[prec]; -+ -+ if ((p = q->head) == NULL) -+ return NULL; -+ -+ if ((q->head = PKTLINK(p)) == NULL) -+ q->tail = NULL; -+ -+ q->len--; -+ -+ if (prec_out) -+ *prec_out = prec; -+ -+ pq->len--; -+ -+ PKTSETLINK(p, NULL); -+ -+ return p; -+} -+ -+char* -+bcmstrcat(char *dest, const char *src) -+{ -+ strcpy(&dest[strlen(dest)], src); -+ return (dest); -+} -+ -+char* -+bcm_ether_ntoa(struct ether_addr *ea, char *buf) -+{ -+ sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", -+ ea->octet[0]&0xff, ea->octet[1]&0xff, ea->octet[2]&0xff, -+ ea->octet[3]&0xff, ea->octet[4]&0xff, ea->octet[5]&0xff); -+ return (buf); -+} -+ -+/* parse a xx:xx:xx:xx:xx:xx format ethernet address */ -+int -+bcm_ether_atoe(char *p, struct ether_addr *ea) -+{ -+ int i = 0; -+ -+ for (;;) { -+ ea->octet[i++] = (char) bcm_strtoul(p, &p, 16); -+ if (!*p++ || i == 6) -+ break; -+ } -+ -+ return (i == 6); -+} -+ -+/* Takes an Ethernet frame and sets out-of-bound PKTPRIO -+ * Also updates the inplace vlan tag if requested -+ */ -+void -+pktsetprio(void *pkt, bool update_vtag) -+{ -+ struct ether_header *eh; -+ struct ethervlan_header *evh; -+ uint8 *pktdata; -+ int priority = 0; -+ -+ pktdata = (uint8 *) PKTDATA(NULL, pkt); -+ ASSERT(ISALIGNED((uintptr)pktdata, sizeof(uint16))); -+ -+ eh = (struct ether_header *) pktdata; -+ -+ if (ntoh16(eh->ether_type) == ETHER_TYPE_8021Q) { -+ uint16 vlan_tag; -+ int vlan_prio, dscp_prio = 0; -+ -+ evh = (struct ethervlan_header *)eh; -+ -+ vlan_tag = ntoh16(evh->vlan_tag); -+ vlan_prio = (int) (vlan_tag >> VLAN_PRI_SHIFT) & VLAN_PRI_MASK; -+ -+ if (ntoh16(evh->ether_type) == ETHER_TYPE_IP) { -+ uint8 *ip_body = pktdata + sizeof(struct ethervlan_header); -+ uint8 tos_tc = IP_TOS(ip_body); -+ dscp_prio = (int)(tos_tc >> IPV4_TOS_PREC_SHIFT); -+ } -+ -+ /* DSCP priority gets precedence over 802.1P (vlan tag) */ -+ priority = (dscp_prio != 0) ? dscp_prio : vlan_prio; -+ -+ /* -+ * If the DSCP priority is not the same as the VLAN priority, -+ * then overwrite the priority field in the vlan tag, with the -+ * DSCP priority value. This is required for Linux APs because -+ * the VLAN driver on Linux, overwrites the skb->priority field -+ * with the priority value in the vlan tag -+ */ -+ if (update_vtag && (priority != vlan_prio)) { -+ vlan_tag &= ~(VLAN_PRI_MASK << VLAN_PRI_SHIFT); -+ vlan_tag |= (uint16)priority << VLAN_PRI_SHIFT; -+ evh->vlan_tag = hton16(vlan_tag); -+ } -+ } else if (ntoh16(eh->ether_type) == ETHER_TYPE_IP) { -+ uint8 *ip_body = pktdata + sizeof(struct ether_header); -+ uint8 tos_tc = IP_TOS(ip_body); -+ priority = (int)(tos_tc >> IPV4_TOS_PREC_SHIFT); -+ } -+ -+ ASSERT(priority >= 0 && priority <= MAXPRIO); -+ PKTSETPRIO(pkt, priority); -+} -+ -+static char bcm_undeferrstr[BCME_STRLEN]; -+ -+static const char *bcmerrorstrtable[] = BCMERRSTRINGTABLE; -+ -+/* Convert the Error codes into related Error strings */ -+const char * -+bcmerrorstr(int bcmerror) -+{ -+ int abs_bcmerror; -+ -+ abs_bcmerror = ABS(bcmerror); -+ -+ /* check if someone added a bcmerror code but forgot to add errorstring */ -+ ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(bcmerrorstrtable) - 1)); -+ if ((bcmerror > 0) || (abs_bcmerror > ABS(BCME_LAST))) { -+ sprintf(bcm_undeferrstr, "undefined Error %d", bcmerror); -+ return bcm_undeferrstr; -+ } -+ -+ ASSERT((strlen((char*)bcmerrorstrtable[abs_bcmerror])) < BCME_STRLEN); -+ -+ return bcmerrorstrtable[abs_bcmerror]; -+} -+ -+ -+int -+bcm_iovar_lencheck(const bcm_iovar_t *vi, void *arg, int len, bool set) -+{ -+ int bcmerror = 0; -+ -+ /* length check on io buf */ -+ switch (vi->type) { -+ case IOVT_BOOL: -+ case IOVT_INT8: -+ case IOVT_INT16: -+ case IOVT_INT32: -+ case IOVT_UINT8: -+ case IOVT_UINT16: -+ case IOVT_UINT32: -+ /* all integers are int32 sized args at the ioctl interface */ -+ if (len < (int)sizeof(int)) { -+ bcmerror = BCME_BUFTOOSHORT; -+ } -+ break; -+ -+ case IOVT_BUFFER: -+ /* buffer must meet minimum length requirement */ -+ if (len < vi->minlen) { -+ bcmerror = BCME_BUFTOOSHORT; -+ } -+ break; -+ -+ case IOVT_VOID: -+ if (!set) { -+ /* Cannot return nil... */ -+ bcmerror = BCME_UNSUPPORTED; -+ } else if (len) { -+ /* Set is an action w/o parameters */ -+ bcmerror = BCME_BUFTOOLONG; -+ } -+ break; -+ -+ default: -+ /* unknown type for length check in iovar info */ -+ ASSERT(0); -+ bcmerror = BCME_UNSUPPORTED; -+ } -+ -+ return bcmerror; -+} -+ -+#define CRC_INNER_LOOP(n, c, x) \ -+ (c) = ((c) >> 8) ^ crc##n##_table[((c) ^ (x)) & 0xff] -+ -+static uint32 crc32_table[256] = { -+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, -+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, -+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, -+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, -+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, -+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, -+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, -+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, -+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, -+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, -+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, -+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, -+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, -+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, -+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, -+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, -+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, -+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, -+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, -+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, -+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, -+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, -+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, -+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, -+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, -+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, -+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, -+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, -+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, -+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, -+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, -+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, -+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, -+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, -+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, -+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, -+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, -+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, -+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, -+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, -+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, -+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, -+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, -+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, -+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, -+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, -+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, -+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, -+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, -+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, -+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, -+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, -+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, -+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, -+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, -+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, -+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, -+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, -+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, -+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, -+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, -+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, -+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, -+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D -+}; -+ -+uint32 -+hndcrc32( -+ uint8 *pdata, /* pointer to array of data to process */ -+ uint nbytes, /* number of input data bytes to process */ -+ uint32 crc /* either CRC32_INIT_VALUE or previous return value */ -+) -+{ -+ uint8 *pend; -+#ifdef __mips__ -+ uint8 tmp[4]; -+ ulong *tptr = (ulong *)tmp; -+ -+ /* in case the beginning of the buffer isn't aligned */ -+ pend = (uint8 *)((uint)(pdata + 3) & 0xfffffffc); -+ nbytes -= (pend - pdata); -+ while (pdata < pend) -+ CRC_INNER_LOOP(32, crc, *pdata++); -+ -+ /* handle bulk of data as 32-bit words */ -+ pend = pdata + (nbytes & 0xfffffffc); -+ while (pdata < pend) { -+ *tptr = *(ulong *)pdata; -+ pdata += sizeof(ulong *); -+ CRC_INNER_LOOP(32, crc, tmp[0]); -+ CRC_INNER_LOOP(32, crc, tmp[1]); -+ CRC_INNER_LOOP(32, crc, tmp[2]); -+ CRC_INNER_LOOP(32, crc, tmp[3]); -+ } -+ -+ /* 1-3 bytes at end of buffer */ -+ pend = pdata + (nbytes & 0x03); -+ while (pdata < pend) -+ CRC_INNER_LOOP(32, crc, *pdata++); -+#else -+ pend = pdata + nbytes; -+ while (pdata < pend) -+ CRC_INNER_LOOP(32, crc, *pdata++); -+#endif /* __mips__ */ -+ -+ return crc; -+} -+ -+ -+/* -+ * Advance from the current 1-byte tag/1-byte length/variable-length value -+ * triple, to the next, returning a pointer to the next. -+ * If the current or next TLV is invalid (does not fit in given buffer length), -+ * NULL is returned. -+ * *buflen is not modified if the TLV elt parameter is invalid, or is decremented -+ * by the TLV paramter's length if it is valid. -+ */ -+bcm_tlv_t * -+bcm_next_tlv(bcm_tlv_t *elt, int *buflen) -+{ -+ int len; -+ -+ /* validate current elt */ -+ if (!bcm_valid_tlv(elt, *buflen)) -+ return NULL; -+ -+ /* advance to next elt */ -+ len = elt->len; -+ elt = (bcm_tlv_t*)(elt->data + len); -+ *buflen -= (2 + len); -+ -+ /* validate next elt */ -+ if (!bcm_valid_tlv(elt, *buflen)) -+ return NULL; -+ -+ return elt; -+} -+ -+/* -+ * Traverse a string of 1-byte tag/1-byte length/variable-length value -+ * triples, returning a pointer to the substring whose first element -+ * matches tag -+ */ -+bcm_tlv_t * -+bcm_parse_tlvs(void *buf, int buflen, uint key) -+{ -+ bcm_tlv_t *elt; -+ int totlen; -+ -+ elt = (bcm_tlv_t*)buf; -+ totlen = buflen; -+ -+ /* find tagged parameter */ -+ while (totlen >= 2) { -+ int len = elt->len; -+ -+ /* validate remaining totlen */ -+ if ((elt->id == key) && (totlen >= (len + 2))) -+ return (elt); -+ -+ elt = (bcm_tlv_t*)((uint8*)elt + (len + 2)); -+ totlen -= (len + 2); -+ } -+ -+ return NULL; -+} -+ -+/* -+ * Traverse a string of 1-byte tag/1-byte length/variable-length value -+ * triples, returning a pointer to the substring whose first element -+ * matches tag. Stop parsing when we see an element whose ID is greater -+ * than the target key. -+ */ -+bcm_tlv_t * -+bcm_parse_ordered_tlvs(void *buf, int buflen, uint key) -+{ -+ bcm_tlv_t *elt; -+ int totlen; -+ -+ elt = (bcm_tlv_t*)buf; -+ totlen = buflen; -+ -+ /* find tagged parameter */ -+ while (totlen >= 2) { -+ uint id = elt->id; -+ int len = elt->len; -+ -+ /* Punt if we start seeing IDs > than target key */ -+ if (id > key) -+ return (NULL); -+ -+ /* validate remaining totlen */ -+ if ((id == key) && (totlen >= (len + 2))) -+ return (elt); -+ -+ elt = (bcm_tlv_t*)((uint8*)elt + (len + 2)); -+ totlen -= (len + 2); -+ } -+ return NULL; -+} -+ -+ -+/* Initialization of bcmstrbuf structure */ -+void -+bcm_binit(struct bcmstrbuf *b, char *buf, uint size) -+{ -+ b->origsize = b->size = size; -+ b->origbuf = b->buf = buf; -+} -+ -+/* Buffer sprintf wrapper to guard against buffer overflow */ -+int -+bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...) -+{ -+ va_list ap; -+ int r; -+ -+ va_start(ap, fmt); -+ r = vsnprintf(b->buf, b->size, fmt, ap); -+ -+ /* Non Ansi C99 compliant returns -1, -+ * Ansi compliant return r >= b->size, -+ * bcmstdlib returns 0, handle all -+ */ -+ if ((r == -1) || (r >= (int)b->size) || (r == 0)) -+ { -+ b->size = 0; -+ } -+ else -+ { -+ b->size -= r; -+ b->buf += r; -+ } -+ -+ va_end(ap); -+ -+ return r; -+} -diff -urN linux.old/drivers/net/wl/hnddma.c linux.dev/drivers/net/wl/hnddma.c ---- linux.old/drivers/net/wl/hnddma.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/hnddma.c 2006-05-02 17:42:13.000000000 +0200 -@@ -0,0 +1,1157 @@ -+/* -+ * Generic Broadcom Home Networking Division (HND) DMA module. -+ * This supports the following chips: BCM42xx, 44xx, 47xx . -+ * -+ * Copyright 2006, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id: hnddma.c,v 1.11 2006/04/08 07:12:42 honor Exp $ -+ */ -+ -+#include <typedefs.h> -+#include <bcmdefs.h> -+#include <osl.h> -+#include "linux_osl.h" -+#include <bcmendian.h> -+#include <sbconfig.h> -+#include <bcmutils.h> -+#include <bcmdevs.h> -+#include <sbutils.h> -+ -+#include "sbhnddma.h" -+#include "hnddma.h" -+ -+/* debug/trace */ -+#define DMA_ERROR(args) -+#define DMA_TRACE(args) -+ -+/* default dma message level (if input msg_level pointer is null in dma_attach()) */ -+static uint dma_msg_level = -+ 0; -+ -+#define MAXNAMEL 8 /* 8 char names */ -+ -+#define DI_INFO(dmah) (dma_info_t *)dmah -+ -+/* dma engine software state */ -+typedef struct dma_info { -+ struct hnddma_pub hnddma; /* exported structure, don't use hnddma_t, -+ * which could be const -+ */ -+ uint *msg_level; /* message level pointer */ -+ char name[MAXNAMEL]; /* callers name for diag msgs */ -+ -+ void *osh; /* os handle */ -+ sb_t *sbh; /* sb handle */ -+ -+ bool dma64; /* dma64 enabled */ -+ bool addrext; /* this dma engine supports DmaExtendedAddrChanges */ -+ -+ dma32regs_t *d32txregs; /* 32 bits dma tx engine registers */ -+ dma32regs_t *d32rxregs; /* 32 bits dma rx engine registers */ -+ dma64regs_t *d64txregs; /* 64 bits dma tx engine registers */ -+ dma64regs_t *d64rxregs; /* 64 bits dma rx engine registers */ -+ -+ uint32 dma64align; /* either 8k or 4k depends on number of dd */ -+ dma32dd_t *txd32; /* pointer to dma32 tx descriptor ring */ -+ dma64dd_t *txd64; /* pointer to dma64 tx descriptor ring */ -+ uint ntxd; /* # tx descriptors tunable */ -+ uint txin; /* index of next descriptor to reclaim */ -+ uint txout; /* index of next descriptor to post */ -+ void **txp; /* pointer to parallel array of pointers to packets */ -+ osldma_t *tx_dmah; /* DMA TX descriptor ring handle */ -+ osldma_t **txp_dmah; /* DMA TX packet data handle */ -+ ulong txdpa; /* physical address of descriptor ring */ -+ uint txdalign; /* #bytes added to alloc'd mem to align txd */ -+ uint txdalloc; /* #bytes allocated for the ring */ -+ -+ dma32dd_t *rxd32; /* pointer to dma32 rx descriptor ring */ -+ dma64dd_t *rxd64; /* pointer to dma64 rx descriptor ring */ -+ uint nrxd; /* # rx descriptors tunable */ -+ uint rxin; /* index of next descriptor to reclaim */ -+ uint rxout; /* index of next descriptor to post */ -+ void **rxp; /* pointer to parallel array of pointers to packets */ -+ osldma_t *rx_dmah; /* DMA RX descriptor ring handle */ -+ osldma_t **rxp_dmah; /* DMA RX packet data handle */ -+ ulong rxdpa; /* physical address of descriptor ring */ -+ uint rxdalign; /* #bytes added to alloc'd mem to align rxd */ -+ uint rxdalloc; /* #bytes allocated for the ring */ -+ -+ /* tunables */ -+ uint rxbufsize; /* rx buffer size in bytes, -+ not including the extra headroom -+ */ -+ uint nrxpost; /* # rx buffers to keep posted */ -+ uint rxoffset; /* rxcontrol offset */ -+ uint ddoffsetlow; /* add to get dma address of descriptor ring, low 32 bits */ -+ uint ddoffsethigh; /* high 32 bits */ -+ uint dataoffsetlow; /* add to get dma address of data buffer, low 32 bits */ -+ uint dataoffsethigh; /* high 32 bits */ -+} dma_info_t; -+ -+/* descriptor bumping macros */ -+#define XXD(x, n) ((x) & ((n) - 1)) /* faster than %, but n must be power of 2 */ -+#define TXD(x) XXD((x), di->ntxd) -+#define RXD(x) XXD((x), di->nrxd) -+#define NEXTTXD(i) TXD(i + 1) -+#define PREVTXD(i) TXD(i - 1) -+#define NEXTRXD(i) RXD(i + 1) -+#define NTXDACTIVE(h, t) TXD(t - h) -+#define NRXDACTIVE(h, t) RXD(t - h) -+ -+/* macros to convert between byte offsets and indexes */ -+#define B2I(bytes, type) ((bytes) / sizeof(type)) -+#define I2B(index, type) ((index) * sizeof(type)) -+ -+#define PCI32ADDR_HIGH 0xc0000000 /* address[31:30] */ -+#define PCI32ADDR_HIGH_SHIFT 30 /* address[31:30] */ -+ -+ -+/* common prototypes */ -+static bool _dma_isaddrext(dma_info_t *di); -+static bool dma32_alloc(dma_info_t *di, uint direction); -+static void _dma_detach(dma_info_t *di); -+static void _dma_ddtable_init(dma_info_t *di, uint direction, ulong pa); -+static void _dma_rxinit(dma_info_t *di); -+static void *_dma_rx(dma_info_t *di); -+static void _dma_rxfill(dma_info_t *di); -+static void _dma_rxreclaim(dma_info_t *di); -+static void _dma_rxenable(dma_info_t *di); -+static void * _dma_getnextrxp(dma_info_t *di, bool forceall); -+ -+static void _dma_txblock(dma_info_t *di); -+static void _dma_txunblock(dma_info_t *di); -+static uint _dma_txactive(dma_info_t *di); -+ -+static void* _dma_peeknexttxp(dma_info_t *di); -+static uintptr _dma_getvar(dma_info_t *di, char *name); -+static void _dma_counterreset(dma_info_t *di); -+static void _dma_fifoloopbackenable(dma_info_t *di); -+ -+/* ** 32 bit DMA prototypes */ -+static bool dma32_alloc(dma_info_t *di, uint direction); -+static bool dma32_txreset(dma_info_t *di); -+static bool dma32_rxreset(dma_info_t *di); -+static bool dma32_txsuspendedidle(dma_info_t *di); -+static int dma32_txfast(dma_info_t *di, void *p0, bool commit); -+static void *dma32_getnexttxp(dma_info_t *di, bool forceall); -+static void *dma32_getnextrxp(dma_info_t *di, bool forceall); -+static void dma32_txrotate(dma_info_t *di); -+static bool dma32_rxidle(dma_info_t *di); -+static void dma32_txinit(dma_info_t *di); -+static bool dma32_txenabled(dma_info_t *di); -+static void dma32_txsuspend(dma_info_t *di); -+static void dma32_txresume(dma_info_t *di); -+static bool dma32_txsuspended(dma_info_t *di); -+static void dma32_txreclaim(dma_info_t *di, bool forceall); -+static bool dma32_txstopped(dma_info_t *di); -+static bool dma32_rxstopped(dma_info_t *di); -+static bool dma32_rxenabled(dma_info_t *di); -+static bool _dma32_addrext(osl_t *osh, dma32regs_t *dma32regs); -+ -+ -+static di_fcn_t dma32proc = { -+ (di_detach_t)_dma_detach, -+ (di_txinit_t)dma32_txinit, -+ (di_txreset_t)dma32_txreset, -+ (di_txenabled_t)dma32_txenabled, -+ (di_txsuspend_t)dma32_txsuspend, -+ (di_txresume_t)dma32_txresume, -+ (di_txsuspended_t)dma32_txsuspended, -+ (di_txsuspendedidle_t)dma32_txsuspendedidle, -+ (di_txfast_t)dma32_txfast, -+ (di_txstopped_t)dma32_txstopped, -+ (di_txreclaim_t)dma32_txreclaim, -+ (di_getnexttxp_t)dma32_getnexttxp, -+ (di_peeknexttxp_t)_dma_peeknexttxp, -+ (di_txblock_t)_dma_txblock, -+ (di_txunblock_t)_dma_txunblock, -+ (di_txactive_t)_dma_txactive, -+ (di_txrotate_t)dma32_txrotate, -+ -+ (di_rxinit_t)_dma_rxinit, -+ (di_rxreset_t)dma32_rxreset, -+ (di_rxidle_t)dma32_rxidle, -+ (di_rxstopped_t)dma32_rxstopped, -+ (di_rxenable_t)_dma_rxenable, -+ (di_rxenabled_t)dma32_rxenabled, -+ (di_rx_t)_dma_rx, -+ (di_rxfill_t)_dma_rxfill, -+ (di_rxreclaim_t)_dma_rxreclaim, -+ (di_getnextrxp_t)_dma_getnextrxp, -+ -+ (di_fifoloopbackenable_t)_dma_fifoloopbackenable, -+ (di_getvar_t)_dma_getvar, -+ (di_counterreset_t)_dma_counterreset, -+ -+ NULL, -+ NULL, -+ NULL, -+ 34 -+}; -+ -+hnddma_t * -+dma_attach(osl_t *osh, char *name, sb_t *sbh, void *dmaregstx, void *dmaregsrx, -+ uint ntxd, uint nrxd, uint rxbufsize, uint nrxpost, uint rxoffset, uint *msg_level) -+{ -+ dma_info_t *di; -+ uint size; -+ -+ /* allocate private info structure */ -+ if ((di = MALLOC(osh, sizeof (dma_info_t))) == NULL) { -+ return (NULL); -+ } -+ bzero((char *)di, sizeof(dma_info_t)); -+ -+ di->msg_level = msg_level ? msg_level : &dma_msg_level; -+ -+ /* old chips w/o sb is no longer supported */ -+ ASSERT(sbh != NULL); -+ -+ /* check arguments */ -+ ASSERT(ISPOWEROF2(ntxd)); -+ ASSERT(ISPOWEROF2(nrxd)); -+ if (nrxd == 0) -+ ASSERT(dmaregsrx == NULL); -+ if (ntxd == 0) -+ ASSERT(dmaregstx == NULL); -+ -+ -+ /* init dma reg pointer */ -+ ASSERT(ntxd <= D32MAXDD); -+ ASSERT(nrxd <= D32MAXDD); -+ di->d32txregs = (dma32regs_t *)dmaregstx; -+ di->d32rxregs = (dma32regs_t *)dmaregsrx; -+ -+ DMA_TRACE(("%s: dma_attach: %s osh %p ntxd %d nrxd %d rxbufsize %d nrxpost %d " -+ "rxoffset %d dmaregstx %p dmaregsrx %p\n", -+ name, "DMA32", osh, ntxd, nrxd, rxbufsize, -+ nrxpost, rxoffset, dmaregstx, dmaregsrx)); -+ -+ /* make a private copy of our callers name */ -+ strncpy(di->name, name, MAXNAMEL); -+ di->name[MAXNAMEL-1] = '\0'; -+ -+ di->osh = osh; -+ di->sbh = sbh; -+ -+ /* save tunables */ -+ di->ntxd = ntxd; -+ di->nrxd = nrxd; -+ -+ /* the actual dma size doesn't include the extra headroom */ -+ if (rxbufsize > BCMEXTRAHDROOM) -+ di->rxbufsize = rxbufsize - BCMEXTRAHDROOM; -+ else -+ di->rxbufsize = rxbufsize; -+ -+ di->nrxpost = nrxpost; -+ di->rxoffset = rxoffset; -+ -+ /* -+ * figure out the DMA physical address offset for dd and data -+ * for old chips w/o sb, use zero -+ * for new chips w sb, -+ * PCI/PCIE: they map silicon backplace address to zero based memory, need offset -+ * Other bus: use zero -+ * SB_BUS BIGENDIAN kludge: use sdram swapped region for data buffer, not descriptor -+ */ -+ di->ddoffsetlow = 0; -+ di->dataoffsetlow = 0; -+ /* for pci bus, add offset */ -+ if (sbh->bustype == PCI_BUS) { -+ di->ddoffsetlow = SB_PCI_DMA; -+ di->ddoffsethigh = 0; -+ di->dataoffsetlow = di->ddoffsetlow; -+ di->dataoffsethigh = di->ddoffsethigh; -+ } -+ -+#if defined(__mips__) && defined(IL_BIGENDIAN) -+ di->dataoffsetlow = di->dataoffsetlow + SB_SDRAM_SWAPPED; -+#endif -+ -+ di->addrext = _dma_isaddrext(di); -+ -+ /* allocate tx packet pointer vector */ -+ if (ntxd) { -+ size = ntxd * sizeof(void *); -+ if ((di->txp = MALLOC(osh, size)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: out of tx memory, malloced %d bytes\n", -+ di->name, MALLOCED(osh))); -+ goto fail; -+ } -+ bzero((char *)di->txp, size); -+ } -+ -+ /* allocate rx packet pointer vector */ -+ if (nrxd) { -+ size = nrxd * sizeof(void *); -+ if ((di->rxp = MALLOC(osh, size)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: out of rx memory, malloced %d bytes\n", -+ di->name, MALLOCED(osh))); -+ goto fail; -+ } -+ bzero((char *)di->rxp, size); -+ } -+ -+ /* allocate transmit descriptor ring, only need ntxd descriptors but it must be aligned */ -+ if (ntxd) { -+ if (!dma32_alloc(di, DMA_TX)) -+ goto fail; -+ } -+ -+ /* allocate receive descriptor ring, only need nrxd descriptors but it must be aligned */ -+ if (nrxd) { -+ if (!dma32_alloc(di, DMA_RX)) -+ goto fail; -+ } -+ -+ if ((di->ddoffsetlow == SB_PCI_DMA) && (di->txdpa > SB_PCI_DMA_SZ) && !di->addrext) { -+ DMA_ERROR(("%s: dma_attach: txdpa 0x%lx: addrext not supported\n", -+ di->name, di->txdpa)); -+ goto fail; -+ } -+ if ((di->ddoffsetlow == SB_PCI_DMA) && (di->rxdpa > SB_PCI_DMA_SZ) && !di->addrext) { -+ DMA_ERROR(("%s: dma_attach: rxdpa 0x%lx: addrext not supported\n", -+ di->name, di->rxdpa)); -+ goto fail; -+ } -+ -+ DMA_TRACE(("ddoffsetlow 0x%x ddoffsethigh 0x%x dataoffsetlow 0x%x dataoffsethigh " -+ "0x%x addrext %d\n", di->ddoffsetlow, di->ddoffsethigh, di->dataoffsetlow, -+ di->dataoffsethigh, di->addrext)); -+ -+ /* allocate tx packet pointer vector and DMA mapping vectors */ -+ if (ntxd) { -+ -+ size = ntxd * sizeof(osldma_t **); -+ if ((di->txp_dmah = (osldma_t **)MALLOC(osh, size)) == NULL) -+ goto fail; -+ bzero((char*)di->txp_dmah, size); -+ }else -+ di->txp_dmah = NULL; -+ -+ /* allocate rx packet pointer vector and DMA mapping vectors */ -+ if (nrxd) { -+ -+ size = nrxd * sizeof(osldma_t **); -+ if ((di->rxp_dmah = (osldma_t **)MALLOC(osh, size)) == NULL) -+ goto fail; -+ bzero((char*)di->rxp_dmah, size); -+ -+ } else -+ di->rxp_dmah = NULL; -+ -+ /* initialize opsvec of function pointers */ -+ di->hnddma.di_fn = dma32proc; -+ -+ return ((hnddma_t *)di); -+ -+fail: -+ _dma_detach(di); -+ return (NULL); -+} -+ -+/* init the tx or rx descriptor */ -+static INLINE void -+dma32_dd_upd(dma_info_t *di, dma32dd_t *ddring, ulong pa, uint outidx, uint32 *flags, -+ uint32 bufcount) -+{ -+ /* dma32 uses 32 bits control to fit both flags and bufcounter */ -+ *flags = *flags | (bufcount & CTRL_BC_MASK); -+ -+ if ((di->dataoffsetlow != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { -+ W_SM(&ddring[outidx].addr, BUS_SWAP32(pa + di->dataoffsetlow)); -+ W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*flags)); -+ } else { -+ /* address extension */ -+ uint32 ae; -+ ASSERT(di->addrext); -+ ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; -+ pa &= ~PCI32ADDR_HIGH; -+ -+ *flags |= (ae << CTRL_AE_SHIFT); -+ W_SM(&ddring[outidx].addr, BUS_SWAP32(pa + di->dataoffsetlow)); -+ W_SM(&ddring[outidx].ctrl, BUS_SWAP32(*flags)); -+ } -+} -+ -+static bool -+_dma32_addrext(osl_t *osh, dma32regs_t *dma32regs) -+{ -+ uint32 w; -+ -+ OR_REG(osh, &dma32regs->control, XC_AE); -+ w = R_REG(osh, &dma32regs->control); -+ AND_REG(osh, &dma32regs->control, ~XC_AE); -+ return ((w & XC_AE) == XC_AE); -+} -+ -+/* !! may be called with core in reset */ -+static void -+_dma_detach(dma_info_t *di) -+{ -+ if (di == NULL) -+ return; -+ -+ DMA_TRACE(("%s: dma_detach\n", di->name)); -+ -+ /* shouldn't be here if descriptors are unreclaimed */ -+ ASSERT(di->txin == di->txout); -+ ASSERT(di->rxin == di->rxout); -+ -+ /* free dma descriptor rings */ -+ if (di->txd32) -+ DMA_FREE_CONSISTENT(di->osh, ((int8*)di->txd32 - di->txdalign), -+ di->txdalloc, (di->txdpa - di->txdalign), &di->tx_dmah); -+ if (di->rxd32) -+ DMA_FREE_CONSISTENT(di->osh, ((int8*)di->rxd32 - di->rxdalign), -+ di->rxdalloc, (di->rxdpa - di->rxdalign), &di->rx_dmah); -+ -+ /* free packet pointer vectors */ -+ if (di->txp) -+ MFREE(di->osh, (void *)di->txp, (di->ntxd * sizeof(void *))); -+ if (di->rxp) -+ MFREE(di->osh, (void *)di->rxp, (di->nrxd * sizeof(void *))); -+ -+ /* free tx packet DMA handles */ -+ if (di->txp_dmah) -+ MFREE(di->osh, (void *)di->txp_dmah, di->ntxd * sizeof(osldma_t **)); -+ -+ /* free rx packet DMA handles */ -+ if (di->rxp_dmah) -+ MFREE(di->osh, (void *)di->rxp_dmah, di->nrxd * sizeof(osldma_t **)); -+ -+ /* free our private info structure */ -+ MFREE(di->osh, (void *)di, sizeof(dma_info_t)); -+ -+} -+ -+/* return TRUE if this dma engine supports DmaExtendedAddrChanges, otherwise FALSE */ -+static bool -+_dma_isaddrext(dma_info_t *di) -+{ -+ if (di->d32txregs) -+ return (_dma32_addrext(di->osh, di->d32txregs)); -+ else if (di->d32rxregs) -+ return (_dma32_addrext(di->osh, di->d32rxregs)); -+ return FALSE; -+} -+ -+/* initialize descriptor table base address */ -+static void -+_dma_ddtable_init(dma_info_t *di, uint direction, ulong pa) -+{ -+ if ((di->ddoffsetlow != SB_PCI_DMA) || !(pa & PCI32ADDR_HIGH)) { -+ if (direction == DMA_TX) -+ W_REG(di->osh, &di->d32txregs->addr, (pa + di->ddoffsetlow)); -+ else -+ W_REG(di->osh, &di->d32rxregs->addr, (pa + di->ddoffsetlow)); -+ } else { -+ /* dma32 address extension */ -+ uint32 ae; -+ ASSERT(di->addrext); -+ -+ /* shift the high bit(s) from pa to ae */ -+ ae = (pa & PCI32ADDR_HIGH) >> PCI32ADDR_HIGH_SHIFT; -+ pa &= ~PCI32ADDR_HIGH; -+ -+ if (direction == DMA_TX) { -+ W_REG(di->osh, &di->d32txregs->addr, (pa + di->ddoffsetlow)); -+ SET_REG(di->osh, &di->d32txregs->control, XC_AE, ae <<XC_AE_SHIFT); -+ } else { -+ W_REG(di->osh, &di->d32rxregs->addr, (pa + di->ddoffsetlow)); -+ SET_REG(di->osh, &di->d32rxregs->control, RC_AE, ae <<RC_AE_SHIFT); -+ } -+ } -+} -+ -+static void -+_dma_fifoloopbackenable(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_fifoloopbackenable\n", di->name)); -+ OR_REG(di->osh, &di->d32txregs->control, XC_LE); -+} -+ -+static void -+_dma_rxinit(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_rxinit\n", di->name)); -+ -+ if (di->nrxd == 0) -+ return; -+ -+ di->rxin = di->rxout = 0; -+ -+ /* clear rx descriptor ring */ -+ BZERO_SM((void *)di->rxd32, (di->nrxd * sizeof(dma32dd_t))); -+ _dma_rxenable(di); -+ _dma_ddtable_init(di, DMA_RX, di->rxdpa); -+} -+ -+static void -+_dma_rxenable(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_rxenable\n", di->name)); -+ -+ W_REG(di->osh, &di->d32rxregs->control, ((di->rxoffset << RC_RO_SHIFT) | RC_RE)); -+} -+ -+/* !! rx entry routine, returns a pointer to the next frame received, -+ * or NULL if there are no more -+ */ -+static void * -+_dma_rx(dma_info_t *di) -+{ -+ void *p; -+ uint len; -+ int skiplen = 0; -+ -+ while ((p = _dma_getnextrxp(di, FALSE))) { -+ /* skip giant packets which span multiple rx descriptors */ -+ if (skiplen > 0) { -+ skiplen -= di->rxbufsize; -+ if (skiplen < 0) -+ skiplen = 0; -+ PKTFREE(di->osh, p, FALSE); -+ continue; -+ } -+ -+ len = ltoh16(*(uint16*)(PKTDATA(di->osh, p))); -+ DMA_TRACE(("%s: dma_rx len %d\n", di->name, len)); -+ -+ /* bad frame length check */ -+ if (len > (di->rxbufsize - di->rxoffset)) { -+ DMA_ERROR(("%s: dma_rx: bad frame length (%d)\n", di->name, len)); -+ if (len > 0) -+ skiplen = len - (di->rxbufsize - di->rxoffset); -+ PKTFREE(di->osh, p, FALSE); -+ di->hnddma.rxgiants++; -+ continue; -+ } -+ -+ /* set actual length */ -+ PKTSETLEN(di->osh, p, (di->rxoffset + len)); -+ -+ break; -+ } -+ -+ return (p); -+} -+ -+/* post receive buffers */ -+static void -+_dma_rxfill(dma_info_t *di) -+{ -+ void *p; -+ uint rxin, rxout; -+ uint32 flags = 0; -+ uint n; -+ uint i; -+ uint32 pa; -+ uint extra_offset = 0; -+ -+ /* -+ * Determine how many receive buffers we're lacking -+ * from the full complement, allocate, initialize, -+ * and post them, then update the chip rx lastdscr. -+ */ -+ -+ rxin = di->rxin; -+ rxout = di->rxout; -+ -+ n = di->nrxpost - NRXDACTIVE(rxin, rxout); -+ -+ DMA_TRACE(("%s: dma_rxfill: post %d\n", di->name, n)); -+ -+ if (di->rxbufsize > BCMEXTRAHDROOM) -+ extra_offset = BCMEXTRAHDROOM; -+ -+ for (i = 0; i < n; i++) { -+ /* the di->rxbufsize doesn't include the extra headroom, we need to add it to the -+ size to be allocated -+ */ -+ if ((p = PKTGET(di->osh, di->rxbufsize + extra_offset, -+ FALSE)) == NULL) { -+ DMA_ERROR(("%s: dma_rxfill: out of rxbufs\n", di->name)); -+ di->hnddma.rxnobuf++; -+ break; -+ } -+ /* reserve an extra headroom, if applicable */ -+ if (extra_offset) -+ PKTPULL(di->osh, p, extra_offset); -+ -+ /* Do a cached write instead of uncached write since DMA_MAP -+ * will flush the cache. -+ */ -+ *(uint32*)(PKTDATA(di->osh, p)) = 0; -+ -+ pa = (uint32) DMA_MAP(di->osh, PKTDATA(di->osh, p), -+ di->rxbufsize, DMA_RX, p); -+ -+ ASSERT(ISALIGNED(pa, 4)); -+ -+ /* save the free packet pointer */ -+ ASSERT(di->rxp[rxout] == NULL); -+ di->rxp[rxout] = p; -+ -+ /* reset flags for each descriptor */ -+ flags = 0; -+ if (rxout == (di->nrxd - 1)) -+ flags = CTRL_EOT; -+ dma32_dd_upd(di, di->rxd32, pa, rxout, &flags, di->rxbufsize); -+ rxout = NEXTRXD(rxout); -+ } -+ -+ di->rxout = rxout; -+ -+ /* update the chip lastdscr pointer */ -+ W_REG(di->osh, &di->d32rxregs->ptr, I2B(rxout, dma32dd_t)); -+} -+ -+/* like getnexttxp but no reclaim */ -+static void * -+_dma_peeknexttxp(dma_info_t *di) -+{ -+ uint end, i; -+ -+ if (di->ntxd == 0) -+ return (NULL); -+ -+ end = B2I(R_REG(di->osh, &di->d32txregs->status) & XS_CD_MASK, dma32dd_t); -+ -+ for (i = di->txin; i != end; i = NEXTTXD(i)) -+ if (di->txp[i]) -+ return (di->txp[i]); -+ -+ return (NULL); -+} -+ -+static void -+_dma_rxreclaim(dma_info_t *di) -+{ -+ void *p; -+ -+ /* "unused local" warning suppression for OSLs that -+ * define PKTFREE() without using the di->osh arg -+ */ -+ di = di; -+ -+ DMA_TRACE(("%s: dma_rxreclaim\n", di->name)); -+ -+ while ((p = _dma_getnextrxp(di, TRUE))) -+ PKTFREE(di->osh, p, FALSE); -+} -+ -+static void * -+_dma_getnextrxp(dma_info_t *di, bool forceall) -+{ -+ if (di->nrxd == 0) -+ return (NULL); -+ -+ return dma32_getnextrxp(di, forceall); -+} -+ -+static void -+_dma_txblock(dma_info_t *di) -+{ -+ di->hnddma.txavail = 0; -+} -+ -+static void -+_dma_txunblock(dma_info_t *di) -+{ -+ di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+} -+ -+static uint -+_dma_txactive(dma_info_t *di) -+{ -+ return (NTXDACTIVE(di->txin, di->txout)); -+} -+ -+static void -+_dma_counterreset(dma_info_t *di) -+{ -+ /* reset all software counter */ -+ di->hnddma.rxgiants = 0; -+ di->hnddma.rxnobuf = 0; -+ di->hnddma.txnobuf = 0; -+} -+ -+/* get the address of the var in order to change later */ -+static uintptr -+_dma_getvar(dma_info_t *di, char *name) -+{ -+ if (!strcmp(name, "&txavail")) -+ return ((uintptr) &(di->hnddma.txavail)); -+ else { -+ ASSERT(0); -+ } -+ return (0); -+} -+ -+void -+dma_txpioloopback(osl_t *osh, dma32regs_t *regs) -+{ -+ OR_REG(osh, ®s->control, XC_LE); -+} -+ -+ -+ -+/* 32 bits DMA functions */ -+static void -+dma32_txinit(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txinit\n", di->name)); -+ -+ if (di->ntxd == 0) -+ return; -+ -+ di->txin = di->txout = 0; -+ di->hnddma.txavail = di->ntxd - 1; -+ -+ /* clear tx descriptor ring */ -+ BZERO_SM((void *)di->txd32, (di->ntxd * sizeof(dma32dd_t))); -+ W_REG(di->osh, &di->d32txregs->control, XC_XE); -+ _dma_ddtable_init(di, DMA_TX, di->txdpa); -+} -+ -+static bool -+dma32_txenabled(dma_info_t *di) -+{ -+ uint32 xc; -+ -+ /* If the chip is dead, it is not enabled :-) */ -+ xc = R_REG(di->osh, &di->d32txregs->control); -+ return ((xc != 0xffffffff) && (xc & XC_XE)); -+} -+ -+static void -+dma32_txsuspend(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txsuspend\n", di->name)); -+ -+ if (di->ntxd == 0) -+ return; -+ -+ OR_REG(di->osh, &di->d32txregs->control, XC_SE); -+} -+ -+static void -+dma32_txresume(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_txresume\n", di->name)); -+ -+ if (di->ntxd == 0) -+ return; -+ -+ AND_REG(di->osh, &di->d32txregs->control, ~XC_SE); -+} -+ -+static bool -+dma32_txsuspended(dma_info_t *di) -+{ -+ return (di->ntxd == 0) || ((R_REG(di->osh, &di->d32txregs->control) & XC_SE) == XC_SE); -+} -+ -+static void -+dma32_txreclaim(dma_info_t *di, bool forceall) -+{ -+ void *p; -+ -+ DMA_TRACE(("%s: dma_txreclaim %s\n", di->name, forceall ? "all" : "")); -+ -+ while ((p = dma32_getnexttxp(di, forceall))) -+ PKTFREE(di->osh, p, TRUE); -+} -+ -+static bool -+dma32_txstopped(dma_info_t *di) -+{ -+ return ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) == XS_XS_STOPPED); -+} -+ -+static bool -+dma32_rxstopped(dma_info_t *di) -+{ -+ return ((R_REG(di->osh, &di->d32rxregs->status) & RS_RS_MASK) == RS_RS_STOPPED); -+} -+ -+static bool -+dma32_alloc(dma_info_t *di, uint direction) -+{ -+ uint size; -+ uint ddlen; -+ void *va; -+ -+ ddlen = sizeof(dma32dd_t); -+ -+ size = (direction == DMA_TX) ? (di->ntxd * ddlen) : (di->nrxd * ddlen); -+ -+ if (!ISALIGNED(DMA_CONSISTENT_ALIGN, D32RINGALIGN)) -+ size += D32RINGALIGN; -+ -+ -+ if (direction == DMA_TX) { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->txdpa, &di->tx_dmah)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(ntxd) failed\n", -+ di->name)); -+ return FALSE; -+ } -+ -+ di->txd32 = (dma32dd_t *) ROUNDUP((uintptr)va, D32RINGALIGN); -+ di->txdalign = (uint)((int8*)di->txd32 - (int8*)va); -+ di->txdpa += di->txdalign; -+ di->txdalloc = size; -+ ASSERT(ISALIGNED((uintptr)di->txd32, D32RINGALIGN)); -+ } else { -+ if ((va = DMA_ALLOC_CONSISTENT(di->osh, size, &di->rxdpa, &di->rx_dmah)) == NULL) { -+ DMA_ERROR(("%s: dma_attach: DMA_ALLOC_CONSISTENT(nrxd) failed\n", -+ di->name)); -+ return FALSE; -+ } -+ di->rxd32 = (dma32dd_t *) ROUNDUP((uintptr)va, D32RINGALIGN); -+ di->rxdalign = (uint)((int8*)di->rxd32 - (int8*)va); -+ di->rxdpa += di->rxdalign; -+ di->rxdalloc = size; -+ ASSERT(ISALIGNED((uintptr)di->rxd32, D32RINGALIGN)); -+ } -+ -+ return TRUE; -+} -+ -+static bool -+dma32_txreset(dma_info_t *di) -+{ -+ uint32 status; -+ -+ if (di->ntxd == 0) -+ return TRUE; -+ -+ /* suspend tx DMA first */ -+ W_REG(di->osh, &di->d32txregs->control, XC_SE); -+ SPINWAIT(((status = (R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK)) -+ != XS_XS_DISABLED) && -+ (status != XS_XS_IDLE) && -+ (status != XS_XS_STOPPED), -+ (10000)); -+ -+ W_REG(di->osh, &di->d32txregs->control, 0); -+ SPINWAIT(((status = (R_REG(di->osh, -+ &di->d32txregs->status) & XS_XS_MASK)) != XS_XS_DISABLED), -+ 10000); -+ -+ /* wait for the last transaction to complete */ -+ OSL_DELAY(300); -+ -+ return (status == XS_XS_DISABLED); -+} -+ -+static bool -+dma32_rxidle(dma_info_t *di) -+{ -+ DMA_TRACE(("%s: dma_rxidle\n", di->name)); -+ -+ if (di->nrxd == 0) -+ return TRUE; -+ -+ return ((R_REG(di->osh, &di->d32rxregs->status) & RS_CD_MASK) == -+ R_REG(di->osh, &di->d32rxregs->ptr)); -+} -+ -+static bool -+dma32_rxreset(dma_info_t *di) -+{ -+ uint32 status; -+ -+ if (di->nrxd == 0) -+ return TRUE; -+ -+ W_REG(di->osh, &di->d32rxregs->control, 0); -+ SPINWAIT(((status = (R_REG(di->osh, -+ &di->d32rxregs->status) & RS_RS_MASK)) != RS_RS_DISABLED), -+ 10000); -+ -+ return (status == RS_RS_DISABLED); -+} -+ -+static bool -+dma32_rxenabled(dma_info_t *di) -+{ -+ uint32 rc; -+ -+ rc = R_REG(di->osh, &di->d32rxregs->control); -+ return ((rc != 0xffffffff) && (rc & RC_RE)); -+} -+ -+static bool -+dma32_txsuspendedidle(dma_info_t *di) -+{ -+ if (di->ntxd == 0) -+ return TRUE; -+ -+ if (!(R_REG(di->osh, &di->d32txregs->control) & XC_SE)) -+ return 0; -+ -+ if ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) != XS_XS_IDLE) -+ return 0; -+ -+ OSL_DELAY(2); -+ return ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) == XS_XS_IDLE); -+} -+ -+/* !! tx entry routine -+ * supports full 32bit dma engine buffer addressing so -+ * dma buffers can cross 4 Kbyte page boundaries. -+ */ -+static int -+dma32_txfast(dma_info_t *di, void *p0, bool commit) -+{ -+ void *p, *next; -+ uchar *data; -+ uint len; -+ uint txout; -+ uint32 flags = 0; -+ uint32 pa; -+ -+ DMA_TRACE(("%s: dma_txfast\n", di->name)); -+ -+ txout = di->txout; -+ -+ /* -+ * Walk the chain of packet buffers -+ * allocating and initializing transmit descriptor entries. -+ */ -+ for (p = p0; p; p = next) { -+ data = PKTDATA(di->osh, p); -+ len = PKTLEN(di->osh, p); -+ next = PKTNEXT(di->osh, p); -+ -+ /* return nonzero if out of tx descriptors */ -+ if (NEXTTXD(txout) == di->txin) -+ goto outoftxd; -+ -+ if (len == 0) -+ continue; -+ -+ /* get physical address of buffer start */ -+ pa = (uint32) DMA_MAP(di->osh, data, len, DMA_TX, p); -+ -+ flags = 0; -+ if (p == p0) -+ flags |= CTRL_SOF; -+ if (next == NULL) -+ flags |= (CTRL_IOC | CTRL_EOF); -+ if (txout == (di->ntxd - 1)) -+ flags |= CTRL_EOT; -+ -+ dma32_dd_upd(di, di->txd32, pa, txout, &flags, len); -+ ASSERT(di->txp[txout] == NULL); -+ -+ txout = NEXTTXD(txout); -+ } -+ -+ /* if last txd eof not set, fix it */ -+ if (!(flags & CTRL_EOF)) -+ W_SM(&di->txd32[PREVTXD(txout)].ctrl, BUS_SWAP32(flags | CTRL_IOC | CTRL_EOF)); -+ -+ /* save the packet */ -+ di->txp[PREVTXD(txout)] = p0; -+ -+ /* bump the tx descriptor index */ -+ di->txout = txout; -+ -+ /* kick the chip */ -+ if (commit) -+ W_REG(di->osh, &di->d32txregs->ptr, I2B(txout, dma32dd_t)); -+ -+ /* tx flow control */ -+ di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ return (0); -+ -+outoftxd: -+ DMA_ERROR(("%s: dma_txfast: out of txds\n", di->name)); -+ PKTFREE(di->osh, p0, TRUE); -+ di->hnddma.txavail = 0; -+ di->hnddma.txnobuf++; -+ return (-1); -+} -+ -+/* -+ * Reclaim next completed txd (txds if using chained buffers) and -+ * return associated packet. -+ * If 'force' is true, reclaim txd(s) and return associated packet -+ * regardless of the value of the hardware "curr" pointer. -+ */ -+static void * -+dma32_getnexttxp(dma_info_t *di, bool forceall) -+{ -+ uint start, end, i; -+ void *txp; -+ -+ DMA_TRACE(("%s: dma_getnexttxp %s\n", di->name, forceall ? "all" : "")); -+ -+ if (di->ntxd == 0) -+ return (NULL); -+ -+ txp = NULL; -+ -+ start = di->txin; -+ if (forceall) -+ end = di->txout; -+ else -+ end = B2I(R_REG(di->osh, &di->d32txregs->status) & XS_CD_MASK, dma32dd_t); -+ -+ if ((start == 0) && (end > di->txout)) -+ goto bogus; -+ -+ for (i = start; i != end && !txp; i = NEXTTXD(i)) { -+ DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->txd32[i].addr)) - di->dataoffsetlow), -+ (BUS_SWAP32(R_SM(&di->txd32[i].ctrl)) & CTRL_BC_MASK), -+ DMA_TX, di->txp[i]); -+ -+ W_SM(&di->txd32[i].addr, 0xdeadbeef); -+ txp = di->txp[i]; -+ di->txp[i] = NULL; -+ } -+ -+ di->txin = i; -+ -+ /* tx flow control */ -+ di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ return (txp); -+ -+bogus: -+/* -+ DMA_ERROR(("dma_getnexttxp: bogus curr: start %d end %d txout %d force %d\n", -+ start, end, di->txout, forceall)); -+*/ -+ return (NULL); -+} -+ -+static void * -+dma32_getnextrxp(dma_info_t *di, bool forceall) -+{ -+ uint i; -+ void *rxp; -+ -+ /* if forcing, dma engine must be disabled */ -+ ASSERT(!forceall || !dma32_rxenabled(di)); -+ -+ i = di->rxin; -+ -+ /* return if no packets posted */ -+ if (i == di->rxout) -+ return (NULL); -+ -+ /* ignore curr if forceall */ -+ if (!forceall && (i == B2I(R_REG(di->osh, &di->d32rxregs->status) & RS_CD_MASK, dma32dd_t))) -+ return (NULL); -+ -+ /* get the packet pointer that corresponds to the rx descriptor */ -+ rxp = di->rxp[i]; -+ ASSERT(rxp); -+ di->rxp[i] = NULL; -+ -+ /* clear this packet from the descriptor ring */ -+ DMA_UNMAP(di->osh, (BUS_SWAP32(R_SM(&di->rxd32[i].addr)) - di->dataoffsetlow), -+ di->rxbufsize, DMA_RX, rxp); -+ -+ W_SM(&di->rxd32[i].addr, 0xdeadbeef); -+ -+ di->rxin = NEXTRXD(i); -+ -+ return (rxp); -+} -+ -+/* -+ * Rotate all active tx dma ring entries "forward" by (ActiveDescriptor - txin). -+ */ -+static void -+dma32_txrotate(dma_info_t *di) -+{ -+ uint ad; -+ uint nactive; -+ uint rot; -+ uint old, new; -+ uint32 w; -+ uint first, last; -+ -+ ASSERT(dma32_txsuspendedidle(di)); -+ -+ nactive = _dma_txactive(di); -+ ad = B2I(((R_REG(di->osh, &di->d32txregs->status) & XS_AD_MASK) >> XS_AD_SHIFT), dma32dd_t); -+ rot = TXD(ad - di->txin); -+ -+ ASSERT(rot < di->ntxd); -+ -+ /* full-ring case is a lot harder - don't worry about this */ -+ if (rot >= (di->ntxd - nactive)) { -+ DMA_ERROR(("%s: dma_txrotate: ring full - punt\n", di->name)); -+ return; -+ } -+ -+ first = di->txin; -+ last = PREVTXD(di->txout); -+ -+ /* move entries starting at last and moving backwards to first */ -+ for (old = last; old != PREVTXD(first); old = PREVTXD(old)) { -+ new = TXD(old + rot); -+ -+ /* -+ * Move the tx dma descriptor. -+ * EOT is set only in the last entry in the ring. -+ */ -+ w = BUS_SWAP32(R_SM(&di->txd32[old].ctrl)) & ~CTRL_EOT; -+ if (new == (di->ntxd - 1)) -+ w |= CTRL_EOT; -+ W_SM(&di->txd32[new].ctrl, BUS_SWAP32(w)); -+ W_SM(&di->txd32[new].addr, R_SM(&di->txd32[old].addr)); -+ -+ /* zap the old tx dma descriptor address field */ -+ W_SM(&di->txd32[old].addr, BUS_SWAP32(0xdeadbeef)); -+ -+ /* move the corresponding txp[] entry */ -+ ASSERT(di->txp[new] == NULL); -+ di->txp[new] = di->txp[old]; -+ di->txp[old] = NULL; -+ } -+ -+ /* update txin and txout */ -+ di->txin = ad; -+ di->txout = TXD(di->txout + rot); -+ di->hnddma.txavail = di->ntxd - NTXDACTIVE(di->txin, di->txout) - 1; -+ -+ /* kick the chip */ -+ W_REG(di->osh, &di->d32txregs->ptr, I2B(di->txout, dma32dd_t)); -+} -+ -+ -+uint -+dma_addrwidth(sb_t *sbh, void *dmaregs) -+{ -+ dma32regs_t *dma32regs; -+ osl_t *osh; -+ -+ osh = sb_osh(sbh); -+ -+ /* Start checking for 32-bit / 30-bit addressing */ -+ dma32regs = (dma32regs_t *)dmaregs; -+ -+ /* For System Backplane, PCIE bus or addrext feature, 32-bits ok */ -+ if ((BUSTYPE(sbh->bustype) == SB_BUS) || -+ ((BUSTYPE(sbh->bustype) == PCI_BUS) && sbh->buscoretype == SB_PCIE) || -+ (_dma32_addrext(osh, dma32regs))) -+ return (DMADDRWIDTH_32); -+ -+ /* Fallthru */ -+ return (DMADDRWIDTH_30); -+} -diff -urN linux.old/drivers/net/wl/hnddma.h linux.dev/drivers/net/wl/hnddma.h ---- linux.old/drivers/net/wl/hnddma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/hnddma.h 2006-04-28 02:20:44.000000000 +0200 -@@ -0,0 +1,156 @@ -+/* -+ * Generic Broadcom Home Networking Division (HND) DMA engine SW interface -+ * This supports the following chips: BCM42xx, 44xx, 47xx . -+ * -+ * Copyright 2006, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id: hnddma.h,v 1.1.1.13 2006/04/08 06:13:39 honor Exp $ -+ */ -+ -+#ifndef _hnddma_h_ -+#define _hnddma_h_ -+ -+typedef const struct hnddma_pub hnddma_t; -+ -+/* dma function type */ -+typedef void (*di_detach_t)(hnddma_t *dmah); -+typedef bool (*di_txreset_t)(hnddma_t *dmah); -+typedef bool (*di_rxreset_t)(hnddma_t *dmah); -+typedef bool (*di_rxidle_t)(hnddma_t *dmah); -+typedef void (*di_txinit_t)(hnddma_t *dmah); -+typedef bool (*di_txenabled_t)(hnddma_t *dmah); -+typedef void (*di_rxinit_t)(hnddma_t *dmah); -+typedef void (*di_txsuspend_t)(hnddma_t *dmah); -+typedef void (*di_txresume_t)(hnddma_t *dmah); -+typedef bool (*di_txsuspended_t)(hnddma_t *dmah); -+typedef bool (*di_txsuspendedidle_t)(hnddma_t *dmah); -+typedef int (*di_txfast_t)(hnddma_t *dmah, void *p, bool commit); -+typedef void (*di_fifoloopbackenable_t)(hnddma_t *dmah); -+typedef bool (*di_txstopped_t)(hnddma_t *dmah); -+typedef bool (*di_rxstopped_t)(hnddma_t *dmah); -+typedef bool (*di_rxenable_t)(hnddma_t *dmah); -+typedef bool (*di_rxenabled_t)(hnddma_t *dmah); -+typedef void* (*di_rx_t)(hnddma_t *dmah); -+typedef void (*di_rxfill_t)(hnddma_t *dmah); -+typedef void (*di_txreclaim_t)(hnddma_t *dmah, bool forceall); -+typedef void (*di_rxreclaim_t)(hnddma_t *dmah); -+typedef uintptr (*di_getvar_t)(hnddma_t *dmah, char *name); -+typedef void* (*di_getnexttxp_t)(hnddma_t *dmah, bool forceall); -+typedef void* (*di_getnextrxp_t)(hnddma_t *dmah, bool forceall); -+typedef void* (*di_peeknexttxp_t)(hnddma_t *dmah); -+typedef void (*di_txblock_t)(hnddma_t *dmah); -+typedef void (*di_txunblock_t)(hnddma_t *dmah); -+typedef uint (*di_txactive_t)(hnddma_t *dmah); -+typedef void (*di_txrotate_t)(hnddma_t *dmah); -+typedef void (*di_counterreset_t)(hnddma_t *dmah); -+typedef char* (*di_dump_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); -+typedef char* (*di_dumptx_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); -+typedef char* (*di_dumprx_t)(hnddma_t *dmah, struct bcmstrbuf *b, bool dumpring); -+ -+/* dma opsvec */ -+typedef struct di_fcn_s { -+ di_detach_t detach; -+ di_txinit_t txinit; -+ di_txreset_t txreset; -+ di_txenabled_t txenabled; -+ di_txsuspend_t txsuspend; -+ di_txresume_t txresume; -+ di_txsuspended_t txsuspended; -+ di_txsuspendedidle_t txsuspendedidle; -+ di_txfast_t txfast; -+ di_txstopped_t txstopped; -+ di_txreclaim_t txreclaim; -+ di_getnexttxp_t getnexttxp; -+ di_peeknexttxp_t peeknexttxp; -+ di_txblock_t txblock; -+ di_txunblock_t txunblock; -+ di_txactive_t txactive; -+ di_txrotate_t txrotate; -+ -+ di_rxinit_t rxinit; -+ di_rxreset_t rxreset; -+ di_rxidle_t rxidle; -+ di_rxstopped_t rxstopped; -+ di_rxenable_t rxenable; -+ di_rxenabled_t rxenabled; -+ di_rx_t rx; -+ di_rxfill_t rxfill; -+ di_rxreclaim_t rxreclaim; -+ di_getnextrxp_t getnextrxp; -+ -+ di_fifoloopbackenable_t fifoloopbackenable; -+ di_getvar_t d_getvar; -+ di_counterreset_t counterreset; -+ di_dump_t dump; -+ di_dumptx_t dumptx; -+ di_dumprx_t dumprx; -+ uint endnum; -+} di_fcn_t; -+ -+/* -+ * Exported data structure (read-only) -+ */ -+/* export structure */ -+struct hnddma_pub { -+ di_fcn_t di_fn; /* DMA function pointers */ -+ uint txavail; /* # free tx descriptors */ -+ -+ /* rx error counters */ -+ uint rxgiants; /* rx giant frames */ -+ uint rxnobuf; /* rx out of dma descriptors */ -+ /* tx error counters */ -+ uint txnobuf; /* tx out of dma descriptors */ -+}; -+ -+ -+extern hnddma_t * dma_attach(osl_t *osh, char *name, sb_t *sbh, void *dmaregstx, void *dmaregsrx, -+ uint ntxd, uint nrxd, uint rxbufsize, uint nrxpost, uint rxoffset, -+ uint *msg_level); -+#define dma_detach(di) ((di)->di_fn.detach(di)) -+#define dma_txreset(di) ((di)->di_fn.txreset(di)) -+#define dma_rxreset(di) ((di)->di_fn.rxreset(di)) -+#define dma_rxidle(di) ((di)->di_fn.rxidle(di)) -+#define dma_txinit(di) ((di)->di_fn.txinit(di)) -+#define dma_txenabled(di) ((di)->di_fn.txenabled(di)) -+#define dma_rxinit(di) ((di)->di_fn.rxinit(di)) -+#define dma_txsuspend(di) ((di)->di_fn.txsuspend(di)) -+#define dma_txresume(di) ((di)->di_fn.txresume(di)) -+#define dma_txsuspended(di) ((di)->di_fn.txsuspended(di)) -+#define dma_txsuspendedidle(di) ((di)->di_fn.txsuspendedidle(di)) -+#define dma_txfast(di, p, commit) ((di)->di_fn.txfast(di, p, commit)) -+#define dma_fifoloopbackenable(di) ((di)->di_fn.fifoloopbackenable(di)) -+#define dma_txstopped(di) ((di)->di_fn.txstopped(di)) -+#define dma_rxstopped(di) ((di)->di_fn.rxstopped(di)) -+#define dma_rxenable(di) ((di)->di_fn.rxenable(di)) -+#define dma_rxenabled(di) ((di)->di_fn.rxenabled(di)) -+#define dma_rx(di) ((di)->di_fn.rx(di)) -+#define dma_rxfill(di) ((di)->di_fn.rxfill(di)) -+#define dma_txreclaim(di, forceall) ((di)->di_fn.txreclaim(di, forceall)) -+#define dma_rxreclaim(di) ((di)->di_fn.rxreclaim(di)) -+#define dma_getvar(di, name) ((di)->di_fn.d_getvar(di, name)) -+#define dma_getnexttxp(di, forceall) ((di)->di_fn.getnexttxp(di, forceall)) -+#define dma_getnextrxp(di, forceall) ((di)->di_fn.getnextrxp(di, forceall)) -+#define dma_peeknexttxp(di) ((di)->di_fn.peeknexttxp(di)) -+#define dma_txblock(di) ((di)->di_fn.txblock(di)) -+#define dma_txunblock(di) ((di)->di_fn.txunblock(di)) -+#define dma_txactive(di) ((di)->di_fn.txactive(di)) -+#define dma_txrotate(di) ((di)->di_fn.txrotate(di)) -+#define dma_counterreset(di) ((di)->di_fn.counterreset(di)) -+ -+#define DMA_DUMP_SIZE 2048 -+/* return addresswidth allowed -+ * This needs to be done after SB attach but before dma attach. -+ * SB attach provides ability to probe backplane and dma core capabilities -+ * This info is needed by DMA_ALLOC_CONSISTENT in dma attach -+ */ -+extern uint dma_addrwidth(sb_t *sbh, void *dmaregs); -+ -+/* pio helpers */ -+void dma_txpioloopback(osl_t *osh, dma32regs_t *); -+ -+#endif /* _hnddma_h_ */ -diff -urN linux.old/drivers/net/wl/linux_osl.c linux.dev/drivers/net/wl/linux_osl.c ---- linux.old/drivers/net/wl/linux_osl.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/linux_osl.c 2006-04-28 02:29:46.000000000 +0200 -@@ -0,0 +1,269 @@ -+/* -+ * Linux OS Independent Layer -+ * -+ * Copyright 2006, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id: linux_osl.c,v 1.1.1.14 2006/04/08 06:13:39 honor Exp $ -+ */ -+ -+#define LINUX_OSL -+ -+#include <typedefs.h> -+#include <bcmendian.h> -+#include <linux/module.h> -+#include <linuxver.h> -+#include <bcmdefs.h> -+#include <osl.h> -+#include "linux_osl.h" -+#include <bcmutils.h> -+#include <linux/delay.h> -+#ifdef mips -+#include <asm/paccess.h> -+#endif /* mips */ -+#include <pcicfg.h> -+ -+#define PCI_CFG_RETRY 10 -+ -+#define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */ -+#define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */ -+ -+typedef struct bcm_mem_link { -+ struct bcm_mem_link *prev; -+ struct bcm_mem_link *next; -+ uint size; -+ int line; -+ char file[BCM_MEM_FILENAME_LEN]; -+} bcm_mem_link_t; -+ -+static int16 linuxbcmerrormap[] = \ -+{ 0, /* 0 */ -+ -EINVAL, /* BCME_ERROR */ -+ -EINVAL, /* BCME_BADARG */ -+ -EINVAL, /* BCME_BADOPTION */ -+ -EINVAL, /* BCME_NOTUP */ -+ -EINVAL, /* BCME_NOTDOWN */ -+ -EINVAL, /* BCME_NOTAP */ -+ -EINVAL, /* BCME_NOTSTA */ -+ -EINVAL, /* BCME_BADKEYIDX */ -+ -EINVAL, /* BCME_RADIOOFF */ -+ -EINVAL, /* BCME_NOTBANDLOCKED */ -+ -EINVAL, /* BCME_NOCLK */ -+ -EINVAL, /* BCME_BADRATESET */ -+ -EINVAL, /* BCME_BADBAND */ -+ -E2BIG, /* BCME_BUFTOOSHORT */ -+ -E2BIG, /* BCME_BUFTOOLONG */ -+ -EBUSY, /* BCME_BUSY */ -+ -EINVAL, /* BCME_NOTASSOCIATED */ -+ -EINVAL, /* BCME_BADSSIDLEN */ -+ -EINVAL, /* BCME_OUTOFRANGECHAN */ -+ -EINVAL, /* BCME_BADCHAN */ -+ -EFAULT, /* BCME_BADADDR */ -+ -ENOMEM, /* BCME_NORESOURCE */ -+ -EOPNOTSUPP, /* BCME_UNSUPPORTED */ -+ -EMSGSIZE, /* BCME_BADLENGTH */ -+ -EINVAL, /* BCME_NOTREADY */ -+ -EPERM, /* BCME_NOTPERMITTED */ -+ -ENOMEM, /* BCME_NOMEM */ -+ -EINVAL, /* BCME_ASSOCIATED */ -+ -ERANGE, /* BCME_RANGE */ -+ -EINVAL, /* BCME_NOTFOUND */ -+ -EINVAL, /* BCME_WME_NOT_ENABLED */ -+ -EINVAL, /* BCME_TSPEC_NOTFOUND */ -+ -EINVAL, /* BCME_ACM_NOTSUPPORTED */ -+ -EINVAL, /* BCME_NOT_WME_ASSOCIATION */ -+ -EIO, /* BCME_SDIO_ERROR */ -+ -ENODEV /* BCME_DONGLE_DOWN */ -+}; -+ -+/* translate bcmerrors into linux errors */ -+int -+osl_error(int bcmerror) -+{ -+ int abs_bcmerror; -+ int array_size = ARRAYSIZE(linuxbcmerrormap); -+ -+ abs_bcmerror = ABS(bcmerror); -+ -+ if (bcmerror > 0) -+ abs_bcmerror = 0; -+ -+ else if (abs_bcmerror >= array_size) -+ abs_bcmerror = BCME_ERROR; -+ -+ return linuxbcmerrormap[abs_bcmerror]; -+} -+ -+osl_t * -+osl_attach(void *pdev, bool pkttag) -+{ -+ osl_t *osh; -+ -+ osh = kmalloc(sizeof(osl_t), GFP_ATOMIC); -+ ASSERT(osh); -+ -+ bzero(osh, sizeof(osl_t)); -+ -+ /* -+ * check the cases where -+ * 1.Error code Added to bcmerror table, but forgot to add it to the OS -+ * dependent error code -+ * 2. Error code is added to the bcmerror table, but forgot to add the -+ * corresponding errorstring(dummy call to bcmerrorstr) -+ */ -+ bcmerrorstr(0); -+ ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(linuxbcmerrormap) - 1)); -+ -+ osh->magic = OS_HANDLE_MAGIC; -+ osh->malloced = 0; -+ osh->failed = 0; -+ osh->dbgmem_list = NULL; -+ osh->pdev = pdev; -+ osh->pub.pkttag = pkttag; -+ -+ return osh; -+} -+ -+void -+osl_detach(osl_t *osh) -+{ -+ if (osh == NULL) -+ return; -+ -+ ASSERT(osh->magic == OS_HANDLE_MAGIC); -+ kfree(osh); -+} -+ -+/* Return a new packet. zero out pkttag */ -+void* -+osl_pktget(osl_t *osh, uint len, bool send) -+{ -+ struct sk_buff *skb; -+ -+ if ((skb = dev_alloc_skb(len))) { -+ skb_put(skb, len); -+ skb->priority = 0; -+ -+#ifdef BCMDBG_PKT -+ pktlist_add(&(osh->pktlist), (void *) skb); -+#endif /* BCMDBG_PKT */ -+ -+ osh->pub.pktalloced++; -+ } -+ -+ return ((void*) skb); -+} -+ -+/* Free the driver packet. Free the tag if present */ -+void -+osl_pktfree(osl_t *osh, void *p) -+{ -+ struct sk_buff *skb, *nskb; -+ -+ skb = (struct sk_buff*) p; -+ -+ /* perversion: we use skb->next to chain multi-skb packets */ -+ while (skb) { -+ nskb = skb->next; -+ skb->next = NULL; -+ -+#ifdef BCMDBG_PKT -+ pktlist_remove(&(osh->pktlist), (void *) skb); -+#endif /* BCMDBG_PKT */ -+ -+ if (skb->destructor) { -+ /* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if destructor exists -+ */ -+ dev_kfree_skb_any(skb); -+ } else { -+ /* can free immediately (even in_irq()) if destructor does not exist */ -+ dev_kfree_skb(skb); -+ } -+ -+ osh->pub.pktalloced--; -+ -+ skb = nskb; -+ } -+} -+ -+void* -+osl_malloc(osl_t *osh, uint size) -+{ -+ void *addr; -+ -+ /* only ASSERT if osh is defined */ -+ if (osh) -+ ASSERT(osh->magic == OS_HANDLE_MAGIC); -+ -+ if ((addr = kmalloc(size, GFP_ATOMIC)) == NULL) { -+ if (osh) -+ osh->failed++; -+ return (NULL); -+ } -+ if (osh) -+ osh->malloced += size; -+ -+ return (addr); -+} -+ -+void -+osl_mfree(osl_t *osh, void *addr, uint size) -+{ -+ if (osh) { -+ ASSERT(osh->magic == OS_HANDLE_MAGIC); -+ osh->malloced -= size; -+ } -+ kfree(addr); -+} -+ -+uint -+osl_malloced(osl_t *osh) -+{ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ return (osh->malloced); -+} -+ -+uint osl_malloc_failed(osl_t *osh) -+{ -+ ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); -+ return (osh->failed); -+} -+ -+#undef osl_delay -+void -+osl_delay(uint usec) -+{ -+ OSL_DELAY(usec); -+} -+ -+/* Clone a packet. -+ * The pkttag contents are NOT cloned. -+ */ -+void * -+osl_pktdup(osl_t *osh, void *skb) -+{ -+ void * p; -+ -+ if ((p = skb_clone((struct sk_buff*)skb, GFP_ATOMIC)) == NULL) -+ return NULL; -+ -+ /* skb_clone copies skb->cb.. we don't want that */ -+ if (osh->pub.pkttag) -+ bzero((void*)((struct sk_buff *)p)->cb, OSL_PKTTAG_SZ); -+ -+ /* Increment the packet counter */ -+ osh->pub.pktalloced++; -+ return (p); -+} -+ -+uint -+osl_pktalloced(osl_t *osh) -+{ -+ return (osh->pub.pktalloced); -+} -+ -diff -urN linux.old/drivers/net/wl/linux_osl.h linux.dev/drivers/net/wl/linux_osl.h ---- linux.old/drivers/net/wl/linux_osl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/linux_osl.h 2006-05-02 17:44:29.000000000 +0200 -@@ -0,0 +1,171 @@ -+/* -+ * Linux OS Independent Layer -+ * -+ * Copyright 2006, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id: linux_osl.h,v 1.1.1.13 2006/04/08 06:13:39 honor Exp $ -+ */ -+ -+#ifndef _linux_osl_h_ -+#define _linux_osl_h_ -+ -+#include <typedefs.h> -+#include <linuxver.h> -+#include <osl.h> -+ -+#define OSL_PKTTAG_SZ 32 /* Size of PktTag */ -+ -+/* osl handle type forward declaration */ -+typedef struct osl_dmainfo osldma_t; -+ -+/* OSL initialization */ -+extern osl_t *osl_attach(void *pdev, bool pkttag); -+extern void osl_detach(osl_t *osh); -+ -+/* host/bus architecture-specific byte swap */ -+#define BUS_SWAP32(v) (v) -+#define MALLOC_FAILED(osh) osl_malloc_failed((osh)) -+ -+extern void *osl_malloc(osl_t *osh, uint size); -+extern void osl_mfree(osl_t *osh, void *addr, uint size); -+extern uint osl_malloced(osl_t *osh); -+extern uint osl_malloc_failed(osl_t *osh); -+ -+/* API for DMA addressing capability */ -+#define DMA_MAP(osh, va, size, direction, p) \ -+ osl_dma_map((osh), (va), (size), (direction)) -+#define DMA_UNMAP(osh, pa, size, direction, p) \ -+ osl_dma_unmap((osh), (pa), (size), (direction)) -+static inline uint -+osl_dma_map(void *osh, void *va, uint size, int direction) -+{ -+ int dir; -+ struct pci_dev *dev; -+ -+ dev = (osh == NULL ? NULL : ((osl_t *)osh)->pdev); -+ dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; -+ return (pci_map_single(dev, va, size, dir)); -+} -+ -+static inline void -+osl_dma_unmap(void *osh, uint pa, uint size, int direction) -+{ -+ int dir; -+ struct pci_dev *dev; -+ -+ dev = (osh == NULL ? NULL : ((osl_t *)osh)->pdev); -+ dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; -+ pci_unmap_single(dev, (uint32)pa, size, dir); -+} -+ -+#define OSL_DMADDRWIDTH(osh, addrwidth) do {} while (0) -+#define DMA_CONSISTENT_ALIGN PAGE_SIZE -+#define DMA_ALLOC_CONSISTENT(osh, size, pap, dmah) \ -+ osl_dma_alloc_consistent((osh), (size), (pap)) -+#define DMA_FREE_CONSISTENT(osh, va, size, pa, dmah) \ -+ osl_dma_free_consistent((osh), (void*)(va), (size), (pa)) -+static inline void* -+osl_dma_alloc_consistent(osl_t *osh, uint size, ulong *pap) -+{ -+ return (pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap)); -+} -+ -+static inline void -+osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa) -+{ -+ pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); -+} -+ -+ -+/* register access macros */ -+#if defined(BCMJTAG) -+#include <bcmjtag.h> -+#define R_REG(osh, r) bcmjtag_read(NULL, (uint32)(r), sizeof(*(r))) -+#define W_REG(osh, r, v) bcmjtag_write(NULL, (uint32)(r), (uint32)(v), sizeof(*(r))) -+#endif /* defined(BCMSDIO) */ -+ -+/* packet primitives */ -+#define PKTGET(osh, len, send) osl_pktget((osh), (len), (send)) -+#define PKTFREE(osh, skb, send) osl_pktfree((osh), (skb)) -+#define PKTDATA(osh, skb) (((struct sk_buff*)(skb))->data) -+#define PKTLEN(osh, skb) (((struct sk_buff*)(skb))->len) -+#define PKTHEADROOM(osh, skb) (PKTDATA(osh, skb)-(((struct sk_buff*)(skb))->head)) -+#define PKTTAILROOM(osh, skb) ((((struct sk_buff*)(skb))->end)-(((struct sk_buff*)(skb))->tail)) -+#define PKTNEXT(osh, skb) (((struct sk_buff*)(skb))->next) -+#define PKTSETNEXT(osh, skb, x) (((struct sk_buff*)(skb))->next = (struct sk_buff*)(x)) -+#define PKTSETLEN(osh, skb, len) __skb_trim((struct sk_buff*)(skb), (len)) -+#define PKTPUSH(osh, skb, bytes) skb_push((struct sk_buff*)(skb), (bytes)) -+#define PKTPULL(osh, skb, bytes) skb_pull((struct sk_buff*)(skb), (bytes)) -+#define PKTDUP(osh, skb) osl_pktdup((osh), (skb)) -+#define PKTTAG(skb) ((void*)(((struct sk_buff*)(skb))->cb)) -+#define PKTALLOCED(osh) osl_pktalloced((osh)) -+#define PKTLIST_DUMP(osh, buf) -+ -+/* Convert a native(OS) packet to driver packet. -+ * In the process, native packet is destroyed, there is no copying -+ * Also, a packettag is zeroed out -+ */ -+static INLINE void * -+osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb) -+{ -+ struct sk_buff *nskb; -+ -+ if (osh->pkttag) -+ bzero((void*)skb->cb, OSL_PKTTAG_SZ); -+ -+ /* Increment the packet counter */ -+ for (nskb = skb; nskb; nskb = nskb->next) { -+ osh->pktalloced++; -+ } -+ -+ return (void *)skb; -+} -+#define PKTFRMNATIVE(osh, skb) osl_pkt_frmnative(((struct osl_pubinfo *)osh), \ -+ (struct sk_buff*)(skb)) -+ -+/* Convert a driver packet to native(OS) packet -+ * In the process, packettag is zeroed out before sending up -+ * IP code depends on skb->cb to be setup correctly with various options -+ * In our case, that means it should be 0 -+ */ -+static INLINE struct sk_buff * -+osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt) -+{ -+ struct sk_buff *nskb; -+ -+ if (osh->pkttag) -+ bzero(((struct sk_buff*)pkt)->cb, OSL_PKTTAG_SZ); -+ -+ /* Decrement the packet counter */ -+ for (nskb = (struct sk_buff *)pkt; nskb; nskb = nskb->next) { -+ osh->pktalloced--; -+ } -+ -+ return (struct sk_buff *)pkt; -+} -+#define PKTTONATIVE(osh, pkt) osl_pkt_tonative((struct osl_pubinfo *)(osh), (pkt)) -+ -+#define PKTLINK(skb) (((struct sk_buff*)(skb))->prev) -+#define PKTSETLINK(skb, x) (((struct sk_buff*)(skb))->prev = (struct sk_buff*)(x)) -+#define PKTPRIO(skb) (((struct sk_buff*)(skb))->priority) -+#define PKTSETPRIO(skb, x) (((struct sk_buff*)(skb))->priority = (x)) -+#define PKTSHARED(skb) (((struct sk_buff*)(skb))->cloned) -+ -+extern void *osl_pktget(osl_t *osh, uint len, bool send); -+extern void osl_pktfree(osl_t *osh, void *skb); -+extern void *osl_pktdup(osl_t *osh, void *skb); -+extern uint osl_pktalloced(osl_t *osh); -+ -+#define OSL_ERROR(bcmerror) osl_error(bcmerror) -+extern int osl_error(int bcmerror); -+ -+/* the largest reasonable packet buffer driver uses for ethernet MTU in bytes */ -+#define PKTBUFSZ 2048 /* largest reasonable packet buffer, driver uses for ethernet MTU */ -+ -+#endif /* _linux_osl_h_ */ -diff -urN linux.old/drivers/net/wl/pktq.h linux.dev/drivers/net/wl/pktq.h ---- linux.old/drivers/net/wl/pktq.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/pktq.h 2006-04-28 02:11:49.000000000 +0200 -@@ -0,0 +1,97 @@ -+/* -+ * Misc useful os-independent macros and functions. -+ * -+ * Copyright 2006, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * $Id: bcmutils.h,v 1.1.1.16 2006/04/08 06:13:39 honor Exp $ -+ */ -+ -+#ifndef _pktq_h_ -+#define _pktq_h_ -+#include <osl.h> -+ -+/* osl multi-precedence packet queue */ -+ -+#define PKTQ_LEN_DEFAULT 128 /* Max 128 packets */ -+#define PKTQ_MAX_PREC 16 /* Maximum precedence levels */ -+ -+struct pktq { -+ struct pktq_prec { -+ void *head; /* first packet to dequeue */ -+ void *tail; /* last packet to dequeue */ -+ uint16 len; /* number of queued packets */ -+ uint16 max; /* maximum number of queued packets */ -+ } q[PKTQ_MAX_PREC]; -+ uint16 num_prec; /* number of precedences in use */ -+ uint16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */ -+ uint16 max; /* total max packets */ -+ uint16 len; /* total number of packets */ -+}; -+ -+#define PKTQ_PREC_ITER(pq, prec) for (prec = (pq)->num_prec - 1; prec >= 0; prec--) -+ -+/* forward definition of ether_addr structure used by some function prototypes */ -+ -+struct ether_addr; -+ -+/* operations on a specific precedence in packet queue */ -+ -+#define pktq_psetmax(pq, prec, _max) ((pq)->q[prec].max = (_max)) -+#define pktq_plen(pq, prec) ((pq)->q[prec].len) -+#define pktq_pavail(pq, prec) ((pq)->q[prec].max - (pq)->q[prec].len) -+#define pktq_pfull(pq, prec) ((pq)->q[prec].len >= (pq)->q[prec].max) -+#define pktq_pempty(pq, prec) ((pq)->q[prec].len == 0) -+ -+#define pktq_ppeek(pq, prec) ((pq)->q[prec].head) -+#define pktq_ppeek_tail(pq, prec) ((pq)->q[prec].tail) -+ -+extern void *pktq_penq(struct pktq *pq, int prec, void *p); -+extern void *pktq_penq_head(struct pktq *pq, int prec, void *p); -+extern void *pktq_pdeq(struct pktq *pq, int prec); -+extern void *pktq_pdeq_tail(struct pktq *pq, int prec); -+/* Empty the queue at particular precedence level */ -+extern void pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir); -+/* Remove a specified packet from its queue */ -+extern bool pktq_pdel(struct pktq *pq, void *p, int prec); -+ -+/* operations on a set of precedences in packet queue */ -+ -+extern int pktq_mlen(struct pktq *pq, uint prec_bmp); -+extern void *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out); -+ -+/* operations on packet queue as a whole */ -+ -+#define pktq_len(pq) ((int)(pq)->len) -+#define pktq_max(pq) ((int)(pq)->max) -+#define pktq_avail(pq) ((int)((pq)->max - (pq)->len)) -+#define pktq_full(pq) ((pq)->len >= (pq)->max) -+#define pktq_empty(pq) ((pq)->len == 0) -+ -+/* operations for single precedence queues */ -+#define pktenq(pq, p) pktq_penq((pq), 0, (p)) -+#define pktenq_head(pq, p) pktq_penq_head((pq), 0, (p)) -+#define pktdeq(pq) pktq_pdeq((pq), 0) -+#define pktdeq_tail(pq) pktq_pdeq_tail((pq), 0) -+ -+extern void pktq_init(struct pktq *pq, int num_prec, int max_len); -+/* prec_out may be NULL if caller is not interested in return value */ -+extern void *pktq_deq(struct pktq *pq, int *prec_out); -+extern void *pktq_deq_tail(struct pktq *pq, int *prec_out); -+extern void *pktq_peek(struct pktq *pq, int *prec_out); -+extern void *pktq_peek_tail(struct pktq *pq, int *prec_out); -+extern void pktq_flush(osl_t *osh, struct pktq *pq, bool dir); /* Empty the entire queue */ -+ -+/* externs */ -+/* packet */ -+extern uint pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf); -+extern uint pkttotlen(osl_t *osh, void *p); -+extern void *pktlast(osl_t *osh, void *p); -+ -+extern void pktsetprio(void *pkt, bool update_vtag); -+ -+#endif /* _pktq_h_ */ -diff -urN linux.old/drivers/net/wl/sbhnddma.h linux.dev/drivers/net/wl/sbhnddma.h ---- linux.old/drivers/net/wl/sbhnddma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/drivers/net/wl/sbhnddma.h 2006-04-28 02:20:47.000000000 +0200 -@@ -0,0 +1,284 @@ -+/* -+ * Generic Broadcom Home Networking Division (HND) DMA engine HW interface -+ * This supports the following chips: BCM42xx, 44xx, 47xx . -+ * -+ * Copyright 2006, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * -+ * $Id: sbhnddma.h,v 1.1.1.2 2006/02/27 03:43:16 honor Exp $ -+ */ -+ -+#ifndef _sbhnddma_h_ -+#define _sbhnddma_h_ -+ -+/* DMA structure: -+ * support two DMA engines: 32 bits address or 64 bit addressing -+ * basic DMA register set is per channel(transmit or receive) -+ * a pair of channels is defined for convenience -+ */ -+ -+ -+/* 32 bits addressing */ -+ -+/* dma registers per channel(xmt or rcv) */ -+typedef volatile struct { -+ uint32 control; /* enable, et al */ -+ uint32 addr; /* descriptor ring base address (4K aligned) */ -+ uint32 ptr; /* last descriptor posted to chip */ -+ uint32 status; /* current active descriptor, et al */ -+} dma32regs_t; -+ -+typedef volatile struct { -+ dma32regs_t xmt; /* dma tx channel */ -+ dma32regs_t rcv; /* dma rx channel */ -+} dma32regp_t; -+ -+typedef volatile struct { /* diag access */ -+ uint32 fifoaddr; /* diag address */ -+ uint32 fifodatalow; /* low 32bits of data */ -+ uint32 fifodatahigh; /* high 32bits of data */ -+ uint32 pad; /* reserved */ -+} dma32diag_t; -+ -+/* -+ * DMA Descriptor -+ * Descriptors are only read by the hardware, never written back. -+ */ -+typedef volatile struct { -+ uint32 ctrl; /* misc control bits & bufcount */ -+ uint32 addr; /* data buffer address */ -+} dma32dd_t; -+ -+/* -+ * Each descriptor ring must be 4096byte aligned, and fit within a single 4096byte page. -+ */ -+#define D32MAXRINGSZ 4096 -+#define D32RINGALIGN 4096 -+#define D32MAXDD (D32MAXRINGSZ / sizeof (dma32dd_t)) -+ -+/* transmit channel control */ -+#define XC_XE ((uint32)1 << 0) /* transmit enable */ -+#define XC_SE ((uint32)1 << 1) /* transmit suspend request */ -+#define XC_LE ((uint32)1 << 2) /* loopback enable */ -+#define XC_FL ((uint32)1 << 4) /* flush request */ -+#define XC_AE ((uint32)3 << 16) /* address extension bits */ -+#define XC_AE_SHIFT 16 -+ -+/* transmit descriptor table pointer */ -+#define XP_LD_MASK 0xfff /* last valid descriptor */ -+ -+/* transmit channel status */ -+#define XS_CD_MASK 0x0fff /* current descriptor pointer */ -+#define XS_XS_MASK 0xf000 /* transmit state */ -+#define XS_XS_SHIFT 12 -+#define XS_XS_DISABLED 0x0000 /* disabled */ -+#define XS_XS_ACTIVE 0x1000 /* active */ -+#define XS_XS_IDLE 0x2000 /* idle wait */ -+#define XS_XS_STOPPED 0x3000 /* stopped */ -+#define XS_XS_SUSP 0x4000 /* suspend pending */ -+#define XS_XE_MASK 0xf0000 /* transmit errors */ -+#define XS_XE_SHIFT 16 -+#define XS_XE_NOERR 0x00000 /* no error */ -+#define XS_XE_DPE 0x10000 /* descriptor protocol error */ -+#define XS_XE_DFU 0x20000 /* data fifo underrun */ -+#define XS_XE_BEBR 0x30000 /* bus error on buffer read */ -+#define XS_XE_BEDA 0x40000 /* bus error on descriptor access */ -+#define XS_AD_MASK 0xfff00000 /* active descriptor */ -+#define XS_AD_SHIFT 20 -+ -+/* receive channel control */ -+#define RC_RE ((uint32)1 << 0) /* receive enable */ -+#define RC_RO_MASK 0xfe /* receive frame offset */ -+#define RC_RO_SHIFT 1 -+#define RC_FM ((uint32)1 << 8) /* direct fifo receive (pio) mode */ -+#define RC_AE ((uint32)3 << 16) /* address extension bits */ -+#define RC_AE_SHIFT 16 -+ -+/* receive descriptor table pointer */ -+#define RP_LD_MASK 0xfff /* last valid descriptor */ -+ -+/* receive channel status */ -+#define RS_CD_MASK 0x0fff /* current descriptor pointer */ -+#define RS_RS_MASK 0xf000 /* receive state */ -+#define RS_RS_SHIFT 12 -+#define RS_RS_DISABLED 0x0000 /* disabled */ -+#define RS_RS_ACTIVE 0x1000 /* active */ -+#define RS_RS_IDLE 0x2000 /* idle wait */ -+#define RS_RS_STOPPED 0x3000 /* reserved */ -+#define RS_RE_MASK 0xf0000 /* receive errors */ -+#define RS_RE_SHIFT 16 -+#define RS_RE_NOERR 0x00000 /* no error */ -+#define RS_RE_DPE 0x10000 /* descriptor protocol error */ -+#define RS_RE_DFO 0x20000 /* data fifo overflow */ -+#define RS_RE_BEBW 0x30000 /* bus error on buffer write */ -+#define RS_RE_BEDA 0x40000 /* bus error on descriptor access */ -+#define RS_AD_MASK 0xfff00000 /* active descriptor */ -+#define RS_AD_SHIFT 20 -+ -+/* fifoaddr */ -+#define FA_OFF_MASK 0xffff /* offset */ -+#define FA_SEL_MASK 0xf0000 /* select */ -+#define FA_SEL_SHIFT 16 -+#define FA_SEL_XDD 0x00000 /* transmit dma data */ -+#define FA_SEL_XDP 0x10000 /* transmit dma pointers */ -+#define FA_SEL_RDD 0x40000 /* receive dma data */ -+#define FA_SEL_RDP 0x50000 /* receive dma pointers */ -+#define FA_SEL_XFD 0x80000 /* transmit fifo data */ -+#define FA_SEL_XFP 0x90000 /* transmit fifo pointers */ -+#define FA_SEL_RFD 0xc0000 /* receive fifo data */ -+#define FA_SEL_RFP 0xd0000 /* receive fifo pointers */ -+#define FA_SEL_RSD 0xe0000 /* receive frame status data */ -+#define FA_SEL_RSP 0xf0000 /* receive frame status pointers */ -+ -+/* descriptor control flags */ -+#define CTRL_BC_MASK 0x1fff /* buffer byte count */ -+#define CTRL_AE ((uint32)3 << 16) /* address extension bits */ -+#define CTRL_AE_SHIFT 16 -+#define CTRL_EOT ((uint32)1 << 28) /* end of descriptor table */ -+#define CTRL_IOC ((uint32)1 << 29) /* interrupt on completion */ -+#define CTRL_EOF ((uint32)1 << 30) /* end of frame */ -+#define CTRL_SOF ((uint32)1 << 31) /* start of frame */ -+ -+/* control flags in the range [27:20] are core-specific and not defined here */ -+#define CTRL_CORE_MASK 0x0ff00000 -+ -+/* 64 bits addressing */ -+ -+/* dma registers per channel(xmt or rcv) */ -+typedef volatile struct { -+ uint32 control; /* enable, et al */ -+ uint32 ptr; /* last descriptor posted to chip */ -+ uint32 addrlow; /* descriptor ring base address low 32-bits (8K aligned) */ -+ uint32 addrhigh; /* descriptor ring base address bits 63:32 (8K aligned) */ -+ uint32 status0; /* current descriptor, xmt state */ -+ uint32 status1; /* active descriptor, xmt error */ -+} dma64regs_t; -+ -+typedef volatile struct { -+ dma64regs_t tx; /* dma64 tx channel */ -+ dma64regs_t rx; /* dma64 rx channel */ -+} dma64regp_t; -+ -+typedef volatile struct { /* diag access */ -+ uint32 fifoaddr; /* diag address */ -+ uint32 fifodatalow; /* low 32bits of data */ -+ uint32 fifodatahigh; /* high 32bits of data */ -+ uint32 pad; /* reserved */ -+} dma64diag_t; -+ -+/* -+ * DMA Descriptor -+ * Descriptors are only read by the hardware, never written back. -+ */ -+typedef volatile struct { -+ uint32 ctrl1; /* misc control bits & bufcount */ -+ uint32 ctrl2; /* buffer count and address extension */ -+ uint32 addrlow; /* memory address of the date buffer, bits 31:0 */ -+ uint32 addrhigh; /* memory address of the date buffer, bits 63:32 */ -+} dma64dd_t; -+ -+/* -+ * Each descriptor ring must be 8kB aligned, and fit within a contiguous 8kB physical addresss. -+ */ -+#define D64MAXRINGSZ 8192 -+#define D64RINGALIGN 8192 -+#define D64MAXDD (D64MAXRINGSZ / sizeof (dma64dd_t)) -+ -+/* transmit channel control */ -+#define D64_XC_XE 0x00000001 /* transmit enable */ -+#define D64_XC_SE 0x00000002 /* transmit suspend request */ -+#define D64_XC_LE 0x00000004 /* loopback enable */ -+#define D64_XC_FL 0x00000010 /* flush request */ -+#define D64_XC_AE 0x00030000 /* address extension bits */ -+#define D64_XC_AE_SHIFT 16 -+ -+/* transmit descriptor table pointer */ -+#define D64_XP_LD_MASK 0x00000fff /* last valid descriptor */ -+ -+/* transmit channel status */ -+#define D64_XS0_CD_MASK 0x00001fff /* current descriptor pointer */ -+#define D64_XS0_XS_MASK 0xf0000000 /* transmit state */ -+#define D64_XS0_XS_SHIFT 28 -+#define D64_XS0_XS_DISABLED 0x00000000 /* disabled */ -+#define D64_XS0_XS_ACTIVE 0x10000000 /* active */ -+#define D64_XS0_XS_IDLE 0x20000000 /* idle wait */ -+#define D64_XS0_XS_STOPPED 0x30000000 /* stopped */ -+#define D64_XS0_XS_SUSP 0x40000000 /* suspend pending */ -+ -+#define D64_XS1_AD_MASK 0x0001ffff /* active descriptor */ -+#define D64_XS1_XE_MASK 0xf0000000 /* transmit errors */ -+#define D64_XS1_XE_SHIFT 28 -+#define D64_XS1_XE_NOERR 0x00000000 /* no error */ -+#define D64_XS1_XE_DPE 0x10000000 /* descriptor protocol error */ -+#define D64_XS1_XE_DFU 0x20000000 /* data fifo underrun */ -+#define D64_XS1_XE_DTE 0x30000000 /* data transfer error */ -+#define D64_XS1_XE_DESRE 0x40000000 /* descriptor read error */ -+#define D64_XS1_XE_COREE 0x50000000 /* core error */ -+ -+/* receive channel control */ -+#define D64_RC_RE 0x00000001 /* receive enable */ -+#define D64_RC_RO_MASK 0x000000fe /* receive frame offset */ -+#define D64_RC_RO_SHIFT 1 -+#define D64_RC_FM 0x00000100 /* direct fifo receive (pio) mode */ -+#define D64_RC_AE 0x00030000 /* address extension bits */ -+#define D64_RC_AE_SHIFT 16 -+ -+/* receive descriptor table pointer */ -+#define D64_RP_LD_MASK 0x00000fff /* last valid descriptor */ -+ -+/* receive channel status */ -+#define D64_RS0_CD_MASK 0x00001fff /* current descriptor pointer */ -+#define D64_RS0_RS_MASK 0xf0000000 /* receive state */ -+#define D64_RS0_RS_SHIFT 28 -+#define D64_RS0_RS_DISABLED 0x00000000 /* disabled */ -+#define D64_RS0_RS_ACTIVE 0x10000000 /* active */ -+#define D64_RS0_RS_IDLE 0x20000000 /* idle wait */ -+#define D64_RS0_RS_STOPPED 0x30000000 /* stopped */ -+#define D64_RS0_RS_SUSP 0x40000000 /* suspend pending */ -+ -+#define D64_RS1_AD_MASK 0x0001ffff /* active descriptor */ -+#define D64_RS1_RE_MASK 0xf0000000 /* receive errors */ -+#define D64_RS1_RE_SHIFT 28 -+#define D64_RS1_RE_NOERR 0x00000000 /* no error */ -+#define D64_RS1_RE_DPO 0x10000000 /* descriptor protocol error */ -+#define D64_RS1_RE_DFU 0x20000000 /* data fifo overflow */ -+#define D64_RS1_RE_DTE 0x30000000 /* data transfer error */ -+#define D64_RS1_RE_DESRE 0x40000000 /* descriptor read error */ -+#define D64_RS1_RE_COREE 0x50000000 /* core error */ -+ -+/* fifoaddr */ -+#define D64_FA_OFF_MASK 0xffff /* offset */ -+#define D64_FA_SEL_MASK 0xf0000 /* select */ -+#define D64_FA_SEL_SHIFT 16 -+#define D64_FA_SEL_XDD 0x00000 /* transmit dma data */ -+#define D64_FA_SEL_XDP 0x10000 /* transmit dma pointers */ -+#define D64_FA_SEL_RDD 0x40000 /* receive dma data */ -+#define D64_FA_SEL_RDP 0x50000 /* receive dma pointers */ -+#define D64_FA_SEL_XFD 0x80000 /* transmit fifo data */ -+#define D64_FA_SEL_XFP 0x90000 /* transmit fifo pointers */ -+#define D64_FA_SEL_RFD 0xc0000 /* receive fifo data */ -+#define D64_FA_SEL_RFP 0xd0000 /* receive fifo pointers */ -+#define D64_FA_SEL_RSD 0xe0000 /* receive frame status data */ -+#define D64_FA_SEL_RSP 0xf0000 /* receive frame status pointers */ -+ -+/* descriptor control flags 1 */ -+#define D64_CTRL1_EOT ((uint32)1 << 28) /* end of descriptor table */ -+#define D64_CTRL1_IOC ((uint32)1 << 29) /* interrupt on completion */ -+#define D64_CTRL1_EOF ((uint32)1 << 30) /* end of frame */ -+#define D64_CTRL1_SOF ((uint32)1 << 31) /* start of frame */ -+ -+/* descriptor control flags 2 */ -+#define D64_CTRL2_BC_MASK 0x00007fff /* buffer byte count mask */ -+#define D64_CTRL2_AE 0x00030000 /* address extension bits */ -+#define D64_CTRL2_AE_SHIFT 16 -+ -+/* control flags in the range [27:20] are core-specific and not defined here */ -+#define D64_CTRL_CORE_MASK 0x0ff00000 -+ -+ -+#endif /* _sbhnddma_h_ */ diff -urN linux.old/drivers/parport/Config.in linux.dev/drivers/parport/Config.in --- linux.old/drivers/parport/Config.in 2006-04-27 18:04:38.000000000 +0200 +++ linux.dev/drivers/parport/Config.in 2006-04-27 19:24:19.000000000 +0200 From 55b66e9d15509c663eb43a65f55d841e78669013 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 19 Jun 2006 20:22:43 +0000 Subject: [PATCH 231/757] fix broadcom trx alignment SVN-Revision: 4010 --- openwrt/target/linux/image/brcm/Makefile | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/openwrt/target/linux/image/brcm/Makefile b/openwrt/target/linux/image/brcm/Makefile index 1d8e7ea2612..df2a42ea5cc 100644 --- a/openwrt/target/linux/image/brcm/Makefile +++ b/openwrt/target/linux/image/brcm/Makefile @@ -1,16 +1,5 @@ include ../image.mk -ifeq ($(FS),jffs2-8MB) -TRXALIGN:=-a 0x20000 -endif -ifeq ($(FS),jffs2-4MB) -TRXALIGN:=-a 0x10000 -endif -ifeq ($(FS),squashfs) -# see ticket #155 -TRXALIGN:=-a 1024 -endif - define Build/Compile rm -f $(KDIR)/loader.gz $(MAKE) -C lzma-loader \ @@ -41,8 +30,18 @@ define Image/Build/Motorola $(STAGING_DIR)/bin/motorola-bin -$(3) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(4).bin endef +define trxalign/jffs2-128k +-a 0x20000 +endef +define trxalign/jffs2-64k +-a 0x10000 +endef +define trxalign/squashfs +-a 1024 +endef + define Image/Build - $(STAGING_DIR)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx $(KDIR)/loader.gz $(KDIR)/vmlinux.lzma $(TRXALIGN) $(KDIR)/root.$(1) + $(STAGING_DIR)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx $(KDIR)/loader.gz $(KDIR)/vmlinux.lzma $(call trxalign/$(1)) $(KDIR)/root.$(1) ifneq ($(1),jffs2-128k) $(call Image/Build/CyberTAN,$(1),wrt54g3g,W54F,1.99.5,$(patsubst jffs2-%,jffs2,$(1))) $(call Image/Build/CyberTAN,$(1),wrt54g,W54G,4.40.1,$(patsubst jffs2-%,jffs2,$(1))) From c271dd6017c7e73a8b9a3b3d2853637f8acb2f99 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 19 Jun 2006 20:30:20 +0000 Subject: [PATCH 232/757] add modules.d file for wl SVN-Revision: 4011 --- openwrt/package/broadcom-wl/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 782dfdaf574..497f392be88 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -71,6 +71,8 @@ define Build/Compile endef define Package/kmod-brcm-wl/install + install -d -m0755 $(1)/etc/modules.d + echo "wl" > $(1)/etc/modules.d/20-wl install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) install -m0644 $(PKG_BUILD_DIR)/kmod/wl.o $(1)/lib/modules/$(LINUX_VERSION)/ endef From 5ddbc45eda82dffeeda3b2ed6d419d874f47cd2e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 19 Jun 2006 20:31:52 +0000 Subject: [PATCH 233/757] fix wlcompat depends/default SVN-Revision: 4012 --- openwrt/package/wlcompat/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openwrt/package/wlcompat/Makefile b/openwrt/package/wlcompat/Makefile index c6dc6d894ff..af1f07593fd 100644 --- a/openwrt/package/wlcompat/Makefile +++ b/openwrt/package/wlcompat/Makefile @@ -13,7 +13,8 @@ include $(TOPDIR)/package/rules.mk define Package/kmod-wlcompat SECTION:=drivers CATEGORY:=Drivers -DEPENDS:= +DEPENDS:=kmod-brcm-wl +DEFAULT:=y TITLE:=Wrapper providing Wireless Extensions for Broadcom wl module DESCRIPTION:= \\\ A wrapper module, that provides Wireless Extension support for the \\\ @@ -23,6 +24,7 @@ endef define Package/kmod-wlcompat-debug $(call Package/kmod-wlcompat) +DEFAULT:=m TITLE:=Wrapper providing Wireless Extensions for Broadcom wl module (debug) DESCRIPTION:= \\\ A wrapper module, that provides Wireless Extension support for the \\\ From 1e5f02e9d06a817352c4ce20338274b03f281b82 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 19 Jun 2006 21:11:35 +0000 Subject: [PATCH 234/757] build mimo version of the broadcom wl driver as well SVN-Revision: 4013 --- openwrt/package/broadcom-wl/Makefile | 38 +++++++++++++++---- openwrt/package/broadcom-wl/src/kmod/Makefile | 12 +++--- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 497f392be88..5c9d8ce75dc 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -27,8 +27,16 @@ define Package/kmod-brcm-wl VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE) endef -define Package/wlc +define Package/kmod-brcm-wl-mimo $(call Package/kmod-brcm-wl) + DEFAULT:=m if ALL + MENU:= + TITLE:=Proprietary BCM43xx WiFi driver (MIMO version) + DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset (MIMO version) +endef + +define Package/wlc + $(call Package/kmod-brcm-wl-mimo) DEPENDS:=kmod-brcm-wl TITLE:=Setup utility DESCRIPTION:=Utility for initializing the Broadcom wl driver @@ -53,13 +61,18 @@ define Build/Prepare $(CP) src/* $(PKG_BUILD_DIR)/ endef -define Build/Compile - # Compile the kernel part - $(MAKE) -C "$(LINUX_DIR)" \ +MAKEFLAGS_KMOD = -C "$(LINUX_DIR)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ PATH="$(TARGET_PATH)" \ - SUBDIRS="$(PKG_BUILD_DIR)/kmod" \ + SUBDIRS="$(PKG_BUILD_DIR)/kmod" + + +define Build/Compile + # Compile the kernel part + $(MAKE) $(MAKEFLAGS_KMOD) \ + modules + $(MAKE) $(MAKEFLAGS_KMOD) MOD_NAME="_mimo" \ modules # Compile wlc @@ -70,11 +83,19 @@ define Build/Compile all endef -define Package/kmod-brcm-wl/install +define wl_template install -d -m0755 $(1)/etc/modules.d - echo "wl" > $(1)/etc/modules.d/20-wl + echo "wl$(2)" > $(1)/etc/modules.d/20-wl$(2) install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) - install -m0644 $(PKG_BUILD_DIR)/kmod/wl.o $(1)/lib/modules/$(LINUX_VERSION)/ + install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +define Package/kmod-brcm-wl/install + $(call wl_template,$(1)) +endef + +define Package/kmod-brcm-wl-mimo/install + $(call wl_template,$(1),_mimo) endef define Package/wlc/install @@ -93,6 +114,7 @@ define Package/nas/install endef $(eval $(call BuildPackage,kmod-brcm-wl)) +$(eval $(call BuildPackage,kmod-brcm-wl-mimo)) $(eval $(call BuildPackage,wlc)) $(eval $(call BuildPackage,wl)) $(eval $(call BuildPackage,nas)) diff --git a/openwrt/package/broadcom-wl/src/kmod/Makefile b/openwrt/package/broadcom-wl/src/kmod/Makefile index 672384035f9..9a7cb898183 100644 --- a/openwrt/package/broadcom-wl/src/kmod/Makefile +++ b/openwrt/package/broadcom-wl/src/kmod/Makefile @@ -13,20 +13,20 @@ EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER -O_TARGET := wl_link.o +O_TARGET := wl_link$(MOD_NAME).o -obj-y := wl_mod.o +obj-y := wl_mod$(MOD_NAME).o obj-y += bcmutils.o hnddma.o linux_osl.o obj-m := $(O_TARGET) -wl_mod.o: wl_apsta.o +wl_mod$(MOD_NAME).o: wl_apsta$(MOD_NAME).o sed -e 's,eth%d,wl%d\x00,g' < $< > $@ -wl.o: wl_link.o +wl$(MOD_NAME).o: wl_link$(MOD_NAME).o $(OBJDUMP) -d $< | perl patchtable.pl > patchtable.bin - cat wl_link.o patchtable.bin > $@ + cat wl_link$(MOD_NAME).o patchtable.bin > $@ -modules: wl.o +modules: wl$(MOD_NAME).o include $(TOPDIR)/Rules.make From 5e01d653fab3ba1bbb5859e58615923645c9925d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 19 Jun 2006 21:45:07 +0000 Subject: [PATCH 235/757] add a list append function to functions.sh SVN-Revision: 4014 --- openwrt/package/base-files/default/etc/functions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index d54a346315c..fbb5a160c45 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -1,6 +1,10 @@ #!/bin/sh alias debug=${DEBUG:-:} +# newline +N=" +" + # valid interface? if_valid () ( ifconfig "$1" >&- 2>&- || @@ -12,6 +16,13 @@ hotplug_dev() { env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net } +append() { + local var="$1" + local value="$2" + local sep="${3:- }" + eval "export ${var}=\"\${${var}:+\${${var}}${value:+$sep}}$value\"" +} + config_cb() { return 0 } From 67b741fe7795cd3b305909c9a9c2be89ee94ac45 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 19 Jun 2006 22:28:58 +0000 Subject: [PATCH 236/757] reintroduce the -ffreestanding to avoid gcc inline errors SVN-Revision: 4015 --- .../generic-2.6/patches/202-mips-freestanding.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 openwrt/target/linux/generic-2.6/patches/202-mips-freestanding.patch diff --git a/openwrt/target/linux/generic-2.6/patches/202-mips-freestanding.patch b/openwrt/target/linux/generic-2.6/patches/202-mips-freestanding.patch new file mode 100644 index 00000000000..04412619d75 --- /dev/null +++ b/openwrt/target/linux/generic-2.6/patches/202-mips-freestanding.patch @@ -0,0 +1,12 @@ +--- linux-2.6.17/arch/mips/Makefile 2006-06-19 15:12:09.000000000 -0700 ++++ linux-2.6.17/arch/mips/Makefile 2006-06-19 15:11:59.000000000 -0700 +@@ -602,6 +602,9 @@ + core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/ + load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000 + ++# temporary until string.h is fixed ++cflags-y += -ffreestanding ++ + cflags-y += -Iinclude/asm-mips/mach-generic + drivers-$(CONFIG_PCI) += arch/mips/pci/ + From bf97626352ea76fcb251658b9b2d2d9016473930 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 19 Jun 2006 23:55:09 +0000 Subject: [PATCH 237/757] fix MODULE_PARM removal in 2.6.17. SVN-Revision: 4016 --- .../patches/102-new_module_param.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 openwrt/package/openswan/patches/102-new_module_param.patch diff --git a/openwrt/package/openswan/patches/102-new_module_param.patch b/openwrt/package/openswan/patches/102-new_module_param.patch new file mode 100644 index 00000000000..1e133e61fb5 --- /dev/null +++ b/openwrt/package/openswan/patches/102-new_module_param.patch @@ -0,0 +1,37 @@ +diff -ruN openswan-2.4.5-old/linux/net/ipsec/aes/ipsec_alg_aes.c openswan-2.4.5-new/linux/net/ipsec/aes/ipsec_alg_aes.c +--- openswan-2.4.5-old/linux/net/ipsec/aes/ipsec_alg_aes.c 2005-05-20 18:48:55.000000000 +0200 ++++ openswan-2.4.5-new/linux/net/ipsec/aes/ipsec_alg_aes.c 2006-06-20 00:17:57.000000000 +0200 +@@ -59,12 +59,20 @@ + static int keymaxbits=0; + #if defined(CONFIG_KLIPS_ENC_AES_MODULE) + MODULE_AUTHOR("JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>"); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++module_param(debug_aes, int, 0); ++module_param(test_aes, int, 0); ++module_param(excl_aes, int, 0); ++module_param(keyminbits, int, 0); ++module_param(keymaxbits, int, 0); ++#else + MODULE_PARM(debug_aes, "i"); + MODULE_PARM(test_aes, "i"); + MODULE_PARM(excl_aes, "i"); + MODULE_PARM(keyminbits, "i"); + MODULE_PARM(keymaxbits, "i"); + #endif ++#endif + + #if CONFIG_KLIPS_ENC_AES_MAC + #include "crypto/aes_xcbc_mac.h" +@@ -79,8 +87,12 @@ + #else + static int auth_id=9; + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++module_param(auth_id, int, 0); ++#else + MODULE_PARM(auth_id, "i"); + #endif ++#endif + + #define ESP_AES 12 /* truely _constant_ :) */ + From c67deeeafa24a9c83f94e46cb9afdf890625b079 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 20 Jun 2006 00:24:18 +0000 Subject: [PATCH 238/757] fix irq handling on 2.6.17 SVN-Revision: 4017 --- .../linux/aruba-2.6/patches/000-aruba.patch | 8 +- .../linux/aruba-2.6/patches/002-irq.patch | 109 ++---------------- 2 files changed, 16 insertions(+), 101 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch index 83f023cfe06..b9e602be4ec 100644 --- a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch +++ b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch @@ -45,7 +45,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/Makefile linux-2.6.17-owrt/arch/mips/arub +# .S.o: +# $(CC) $(CFLAGS) -c $< -o $*.o + -+obj-y := prom.o setup.o idtIRQ.o irq.o time.o flash_lock.o ++obj-y := prom.o setup.o irq.o time.o flash_lock.o +obj-$(CONFIG_SERIAL_8250) += serial.o + +subdir-y += nvram @@ -921,7 +921,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/setup.c linux-2.6.17-owrt/arch/mips/aruba diff -Nur linux-2.6.17/arch/mips/aruba/time.c linux-2.6.17-owrt/arch/mips/aruba/time.c --- linux-2.6.17/arch/mips/aruba/time.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.17-owrt/arch/mips/aruba/time.c 2006-06-18 12:44:28.000000000 +0200 -@@ -0,0 +1,108 @@ +@@ -0,0 +1,110 @@ +/************************************************************************** + * + * BRIEF MODULE DESCRIPTION @@ -1022,8 +1022,10 @@ diff -Nur linux-2.6.17/arch/mips/aruba/time.c linux-2.6.17-owrt/arch/mips/aruba/ + +} + -+asmlinkage void aruba_timer_interrupt(int irq, struct pt_regs *regs) ++asmlinkage void aruba_timer_interrupt(struct pt_regs *regs) +{ ++ int irq = MIPS_CPU_TIMER_IRQ; ++ + irq_enter(); + kstat_this_cpu.irqs[irq]++; + diff --git a/openwrt/target/linux/aruba-2.6/patches/002-irq.patch b/openwrt/target/linux/aruba-2.6/patches/002-irq.patch index 8faffaf9bbb..6ddc154ac95 100644 --- a/openwrt/target/linux/aruba-2.6/patches/002-irq.patch +++ b/openwrt/target/linux/aruba-2.6/patches/002-irq.patch @@ -1,98 +1,7 @@ -diff -Nur linux-2.6.15/arch/mips/aruba/idtIRQ.S linux-2.6.15-openwrt/arch/mips/aruba/idtIRQ.S ---- linux-2.6.15/arch/mips/aruba/idtIRQ.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.15-openwrt/arch/mips/aruba/idtIRQ.S 2006-01-10 00:32:32.000000000 +0100 -@@ -0,0 +1,87 @@ -+/************************************************************************** -+ * -+ * BRIEF MODULE DESCRIPTION -+ * Intterrupt dispatcher code for IDT boards -+ * -+ * Copyright 2004 IDT Inc. (rischelp@idt.com) -+ * -+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * 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., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ * -+ ************************************************************************** -+ * May 2004 rkt, neb -+ * -+ * Initial Release -+ * -+ * -+ * -+ ************************************************************************** -+ */ -+ -+ -+#include <asm/asm.h> -+#include <asm/mipsregs.h> -+#include <asm/regdef.h> -+#include <asm/stackframe.h> -+ -+ .text -+ .set noreorder -+ .set noat -+ .align 5 -+ NESTED(idtIRQ, PT_SIZE, sp) -+ .set noat -+ SAVE_ALL -+ CLI -+ -+ .set at -+ .set noreorder -+ -+ /* Get the pending interrupts */ -+ mfc0 t0, CP0_CAUSE -+ nop -+ -+ /* Isolate the allowed ones by anding the irq mask */ -+ mfc0 t2, CP0_STATUS -+ move a1, sp /* need a nop here, hence we anticipate */ -+ andi t0, CAUSEF_IP -+ and t0, t2 -+ -+ /* check for r4k counter/timer IRQ. */ -+ -+ andi t1, t0, CAUSEF_IP7 -+ beqz t1, 1f -+ nop -+ -+ jal aruba_timer_interrupt -+ -+ li a0, 7 -+ -+ j ret_from_irq -+ nop -+1: -+ jal aruba_irqdispatch -+ move a0, t0 -+ j ret_from_irq -+ nop -+ -+ END(idtIRQ) -+ -+ -diff -Nur linux-2.6.15/arch/mips/aruba/irq.c linux-2.6.15-openwrt/arch/mips/aruba/irq.c ---- linux-2.6.15/arch/mips/aruba/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.15-openwrt/arch/mips/aruba/irq.c 2006-01-10 00:32:32.000000000 +0100 -@@ -0,0 +1,429 @@ +diff -Nur linux-2.6.17/arch/mips/aruba/irq.c linux-2.6.17-openwrt/arch/mips/aruba/irq.c +--- linux-2.6.17/arch/mips/aruba/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-openwrt/arch/mips/aruba/irq.c 2006-01-10 00:32:32.000000000 +0100 +@@ -0,0 +1,433 @@ +/************************************************************************** + * + * BRIEF MODULE DESCRIPTION @@ -164,7 +73,7 @@ diff -Nur linux-2.6.15/arch/mips/aruba/irq.c linux-2.6.15-openwrt/arch/mips/arub +#define DPRINTK(fmt, args...) +#endif + -+extern asmlinkage void idtIRQ(void); ++extern void aruba_timer_interrupt(struct pt_regs *regs); +static unsigned int startup_irq(unsigned int irq); +static void end_irq(unsigned int irq_nr); +static void mask_and_ack_irq(unsigned int irq_nr); @@ -436,7 +345,6 @@ diff -Nur linux-2.6.15/arch/mips/aruba/irq.c linux-2.6.15-openwrt/arch/mips/arub + int i; + printk("Initializing IRQ's: %d out of %d\n", RC32434_NR_IRQS, NR_IRQS); + memset(irq_desc, 0, sizeof(irq_desc)); -+ set_except_vector(0, idtIRQ); + + set_c0_status(0xFF00); + @@ -450,10 +358,15 @@ diff -Nur linux-2.6.15/arch/mips/aruba/irq.c linux-2.6.15-openwrt/arch/mips/arub +} + +/* Main Interrupt dispatcher */ -+void aruba_irqdispatch(unsigned long cp0_cause, struct pt_regs *regs) ++ ++void plat_irq_dispatch(struct pt_regs *regs) +{ + unsigned int pend, group, ip; + volatile unsigned int *addr; ++ unsigned long cp0_cause = read_c0_cause() & read_c0_status() & CAUSEF_IP; ++ ++ if (cp0_cause & CAUSEF_IP7) ++ aruba_timer_interrupt(regs); + + if(cp0_cause == 0) { + printk("INTERRUPT(S) FIRED WHILE MASKED\n"); From fbacc12b30f5bc2082b1c9065f6a94f28b31b520 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 20 Jun 2006 04:48:01 +0000 Subject: [PATCH 239/757] add libbcmcrypto to the nas package SVN-Revision: 4018 --- openwrt/package/broadcom-wl/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 5c9d8ce75dc..227352b1568 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -11,7 +11,7 @@ WLC_VERSION:=0.1 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources -PKG_MD5SUM:=8ff7481425e0b04fc66f2bf950474cbc +PKG_MD5SUM:=7d9fab2c611369bbe075c3924ea77450 PKG_CAT:=bzcat include $(TOPDIR)/package/rules.mk @@ -109,8 +109,12 @@ define Package/wl/install endef define Package/nas/install + install -d -m0755 $(1)/usr/lib + install -m0755 $(PKG_BUILD_DIR)/libbcmcrypto.so $(1)/usr/lib/ install -d -m0755 $(1)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/ + ln -sf nas $(1)/usr/sbin/nas4not + ln -sf nas $(1)/usr/sbin/nas4wds endef $(eval $(call BuildPackage,kmod-brcm-wl)) From adf95c2d033a9f9adf1c5f1963441635252216e3 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Tue, 20 Jun 2006 08:28:06 +0000 Subject: [PATCH 240/757] be politically correct SVN-Revision: 4019 --- openwrt/package/openswan/patches/102-new_module_param.patch | 4 ++-- openwrt/package/switch/src/switch-adm.c | 2 +- openwrt/target/linux/aruba-2.6/patches/000-aruba.patch | 2 +- openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openwrt/package/openswan/patches/102-new_module_param.patch b/openwrt/package/openswan/patches/102-new_module_param.patch index 1e133e61fb5..80c4a2f589a 100644 --- a/openwrt/package/openswan/patches/102-new_module_param.patch +++ b/openwrt/package/openswan/patches/102-new_module_param.patch @@ -5,7 +5,7 @@ diff -ruN openswan-2.4.5-old/linux/net/ipsec/aes/ipsec_alg_aes.c openswan-2.4.5- static int keymaxbits=0; #if defined(CONFIG_KLIPS_ENC_AES_MODULE) MODULE_AUTHOR("JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>"); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52) +module_param(debug_aes, int, 0); +module_param(test_aes, int, 0); +module_param(excl_aes, int, 0); @@ -26,7 +26,7 @@ diff -ruN openswan-2.4.5-old/linux/net/ipsec/aes/ipsec_alg_aes.c openswan-2.4.5- #else static int auth_id=9; #endif -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52) +module_param(auth_id, int, 0); +#else MODULE_PARM(auth_id, "i"); diff --git a/openwrt/package/switch/src/switch-adm.c b/openwrt/package/switch/src/switch-adm.c index 921ad50a4c0..083b6ebc470 100644 --- a/openwrt/package/switch/src/switch-adm.c +++ b/openwrt/package/switch/src/switch-adm.c @@ -49,7 +49,7 @@ static int force = 0; MODULE_AUTHOR("Felix Fietkau <openwrt@nbd.name>"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52) module_param(eecs, int, 0); module_param(eesk, int, 0); module_param(eedi, int, 0); diff --git a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch index b9e602be4ec..1db6831f4c0 100644 --- a/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch +++ b/openwrt/target/linux/aruba-2.6/patches/000-aruba.patch @@ -1290,7 +1290,7 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/r +#define MII_CLOCK 1250000 /* no more than 2.5MHz */ +static char mac0[18] = "08:00:06:05:40:01"; + -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52) +module_param_string(mac0, mac0, 18, 0); +#else +MODULE_PARM(mac0, "c18"); diff --git a/openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch b/openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch index b5ef4d324a4..529315a2c97 100644 --- a/openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch +++ b/openwrt/target/linux/aruba-2.6/patches/010-ar2313_enet.patch @@ -89,7 +89,7 @@ diff -Nur linux-2.6.17/drivers/net/ar2313/ar2313.c linux-2.6.17-owrt/drivers/net +static char ethaddr[18] = "00:00:00:00:00:00"; +static char ifname[5] = "bond"; + -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52) +module_param_string(ethaddr, ethaddr, 18, 0); +module_param_string(ifname, ifname, 5, 0); +#else From 3b33c72d469ec460b9a4e99eae995bf05caac9f5 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 20 Jun 2006 09:57:42 +0000 Subject: [PATCH 241/757] Update alchemy kernel configuration SVN-Revision: 4020 --- openwrt/target/linux/au1000-2.6/config | 125 +++++++++++++++++-------- 1 file changed, 87 insertions(+), 38 deletions(-) diff --git a/openwrt/target/linux/au1000-2.6/config b/openwrt/target/linux/au1000-2.6/config index 70558108105..8a24bd557e0 100644 --- a/openwrt/target/linux/au1000-2.6/config +++ b/openwrt/target/linux/au1000-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.7 -# Sat Apr 29 20:33:29 2006 +# Linux kernel version: 2.6.17 +# Tue Jun 20 11:35:00 2006 # CONFIG_MIPS=y @@ -64,7 +64,10 @@ CONFIG_MIPS_MTX1=y # CONFIG_TOSHIBA_RBTX4927 is not set # CONFIG_TOSHIBA_RBTX4938 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -114,7 +117,6 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_CPU_HAS_PREFETCH=y # CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y -# CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -154,6 +156,7 @@ CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y +# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_EMBEDDED=y @@ -167,10 +170,6 @@ CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 @@ -183,7 +182,6 @@ CONFIG_OBSOLETE_INTERMODULE=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y @@ -192,16 +190,18 @@ CONFIG_KMOD=y # Block layer # # CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set # # IO Schedulers # -# CONFIG_IOSCHED_NOOP is not set +CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set # CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="deadline" @@ -211,7 +211,6 @@ CONFIG_DEFAULT_IOSCHED="deadline" # CONFIG_HW_HAS_PCI=y CONFIG_PCI=y -CONFIG_PCI_LEGACY_PROC=y CONFIG_MMU=y # @@ -272,6 +271,7 @@ CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m # CONFIG_INET_DIAG is not set CONFIG_TCP_CONG_ADVANCED=y @@ -294,9 +294,12 @@ CONFIG_TCP_CONG_SCALABLE=m # CONFIG_IP_VS is not set CONFIG_IPV6=m CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y CONFIG_INET6_AH=m CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m +CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m CONFIG_IPV6_TUNNEL=m CONFIG_NETFILTER=y @@ -320,11 +323,14 @@ CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m CONFIG_NETFILTER_XT_MATCH_REALM=m @@ -348,25 +354,24 @@ CONFIG_IP_NF_NETBIOS_NS=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_LAYER7=m -CONFIG_IP_NF_MATCH_LAYER7_DEBUG=y -CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_TIME=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m +CONFIG_IP_NF_MATCH_LAYER7=m +CONFIG_IP_NF_MATCH_LAYER7_DEBUG=y CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_IMQ=m @@ -385,6 +390,7 @@ CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m @@ -530,7 +536,14 @@ CONFIG_NET_PKTGEN=m # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_IEEE80211 is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -587,7 +600,6 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I8 is not set # CONFIG_MTD_CFI_INTELEXT is not set CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_AMDSTD_RETRY=0 # CONFIG_MTD_CFI_STAA is not set CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set @@ -611,7 +623,6 @@ CONFIG_MTD_MTX1=y # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set # CONFIG_MTD_BLOCK2MTD is not set # @@ -656,6 +667,7 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=m CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -719,7 +731,6 @@ CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -830,6 +841,7 @@ CONFIG_MIPS_AU1X00_ENET=y # Wireless LAN (non-hamradio) # CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y # # Obsolete Wireless cards support (pre-802.11) @@ -839,6 +851,13 @@ CONFIG_STRIP=m # # Wireless 802.11b ISA/PCI cards support # +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +CONFIG_IPW2100_DEBUG=y +CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW_QOS=y +CONFIG_IPW2200_DEBUG=y CONFIG_HERMES=m # CONFIG_PLX_HERMES is not set # CONFIG_TMD_HERMES is not set @@ -852,6 +871,13 @@ CONFIG_PCI_ATMEL=m # CONFIG_PRISM54=m # CONFIG_HOSTAP is not set +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_PIO=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +# CONFIG_BCM43XX_PIO_MODE is not set CONFIG_NET_WIRELESS=y # @@ -928,6 +954,7 @@ CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_PCI=m CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -936,7 +963,6 @@ CONFIG_SERIAL_8250_AU1X00=y # # Non-8250 serial port support # -# CONFIG_SERIAL_AU1X00 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set @@ -1014,19 +1040,17 @@ CONFIG_MTX1_WATCHDOG=y # Misc devices # -# -# Multimedia Capabilities Port drivers -# - # # Multimedia devices # # CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set +CONFIG_USB_DABUSB=m # # Graphics support @@ -1049,6 +1073,7 @@ CONFIG_DUMMY_CONSOLE=y # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=m # CONFIG_USB_DEBUG is not set @@ -1109,9 +1134,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set +# CONFIG_USB_TOUCHSCREEN is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1125,15 +1148,6 @@ CONFIG_USB_STORAGE_JUMPSHOT=y CONFIG_USB_MDC800=m CONFIG_USB_MICROTEK=m -# -# USB Multimedia devices -# -CONFIG_USB_DABUSB=m - -# -# Video4Linux support is needed for USB Multimedia device support -# - # # USB Network Adapters # @@ -1164,6 +1178,7 @@ CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m # CONFIG_USB_SERIAL_ANYDATA is not set +# CONFIG_USB_SERIAL_ARK3116 is not set CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m @@ -1171,6 +1186,7 @@ CONFIG_USB_SERIAL_CP2101=m CONFIG_USB_SERIAL_CYPRESS_M8=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set CONFIG_USB_SERIAL_VISOR=m CONFIG_USB_SERIAL_IPAQ=m CONFIG_USB_SERIAL_IR=m @@ -1183,6 +1199,7 @@ CONFIG_USB_SERIAL_KEYSPAN_PDA=m CONFIG_USB_SERIAL_KLSI=m CONFIG_USB_SERIAL_KOBIL_SCT=m CONFIG_USB_SERIAL_MCT_U232=m +# CONFIG_USB_SERIAL_NAVMAN is not set CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m @@ -1224,6 +1241,19 @@ CONFIG_USB_TEST=m # # CONFIG_MMC is not set +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + # # InfiniBand support # @@ -1233,6 +1263,25 @@ CONFIG_USB_TEST=m # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # +# +# Real Time Clock +# +CONFIG_RTC_LIB=m +CONFIG_RTC_CLASS=m + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=m +CONFIG_RTC_INTF_PROC=m +CONFIG_RTC_INTF_DEV=m + +# +# RTC drivers +# +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_TEST is not set + # # File systems # @@ -1290,7 +1339,6 @@ CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set CONFIG_CONFIGFS_FS=y # @@ -1420,6 +1468,7 @@ CONFIG_NLS_UTF8=m CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_FS is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="init=/etc/preinit" From e600bdeccaecb40dabdbcb15484c14320328b878 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 20 Jun 2006 15:40:14 +0000 Subject: [PATCH 242/757] mount /proc earlier in /sbin/mount_root SVN-Revision: 4022 --- openwrt/package/base-files/au1000-2.6/sbin/mount_root | 1 + openwrt/package/base-files/default/sbin/mount_root | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/package/base-files/au1000-2.6/sbin/mount_root b/openwrt/package/base-files/au1000-2.6/sbin/mount_root index 5dd1b0c5627..bc4165ca300 100755 --- a/openwrt/package/base-files/au1000-2.6/sbin/mount_root +++ b/openwrt/package/base-files/au1000-2.6/sbin/mount_root @@ -1,4 +1,5 @@ #!/bin/sh +mount none /proc -t proc size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) mount none /tmp -t tmpfs -o size=$size diff --git a/openwrt/package/base-files/default/sbin/mount_root b/openwrt/package/base-files/default/sbin/mount_root index 6c8805c0805..647c25327ad 100755 --- a/openwrt/package/base-files/default/sbin/mount_root +++ b/openwrt/package/base-files/default/sbin/mount_root @@ -1,6 +1,6 @@ #!/bin/sh -size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) mount none /proc -t proc +size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777 mkdir -p /dev/pts mount none /dev/pts -t devpts From 879a46444f578f52b61ad80bd2bfa329675d9962 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 20 Jun 2006 17:50:49 +0000 Subject: [PATCH 243/757] fix for multiple dependency flags SVN-Revision: 4023 --- openwrt/scripts/gen_menuconfig.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index c40e1caedce..eff78dcd90e 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -29,7 +29,7 @@ sub print_category($) { } foreach my $depend (@{$pkg->{depends}}) { my $m = "depends"; - $depend =~ s/^([@\+])//; + $depend =~ s/^([@\+]+)//; my $flags = $1; $flags =~ /@/ or $depend = "PACKAGE_$depend"; $flags =~ /\+/ and $m = "select"; From ea435239915386927dc9c6e8d9200ce70e9aa89b Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 20 Jun 2006 17:54:30 +0000 Subject: [PATCH 244/757] more dependency fixes SVN-Revision: 4024 --- openwrt/scripts/gen_deps.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index 0983186f861..de8572c762b 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -22,7 +22,7 @@ while ($line = <>) { $line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do { $pkg{$name}->{depends} ||= []; foreach my $v (split /\s+/, $2) { - next if $v =~ /^@/; + next if $v =~ /^[\+]?@/; $v =~ s/^\+//; push @{$pkg{$name}->{depends}}, $v; } From 5dbe7cac540bda9ff26e37cd7a0ae4dd1622c642 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 20 Jun 2006 18:57:30 +0000 Subject: [PATCH 245/757] annoying initrd bug introduced by 2.6.17 SVN-Revision: 4027 --- .../patches/203-fix_initrd_duplication.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 openwrt/target/linux/generic-2.6/patches/203-fix_initrd_duplication.patch diff --git a/openwrt/target/linux/generic-2.6/patches/203-fix_initrd_duplication.patch b/openwrt/target/linux/generic-2.6/patches/203-fix_initrd_duplication.patch new file mode 100644 index 00000000000..4cef8930035 --- /dev/null +++ b/openwrt/target/linux/generic-2.6/patches/203-fix_initrd_duplication.patch @@ -0,0 +1,13 @@ +diff -Nurb linux-2.6.17/usr/Makefile linux-2.6.17/usr/Makefile +--- linux-2.6.17/usr/Makefile 2006-06-20 11:51:27.000000000 -0700 ++++ linux-2.6.17/usr/Makefile 2006-06-20 11:51:34.000000000 -0700 +@@ -21,8 +21,7 @@ + $(CONFIG_INITRAMFS_SOURCE),-d) + ramfs-args := \ + $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \ +- $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \ +- $(ramfs-input) ++ $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) + + # .initramfs_data.cpio.gz.d is used to identify all files included + # in initramfs and to detect if any files are added/removed. From c1f706433081c5341c3526551f3a485149c44336 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 20 Jun 2006 23:40:02 +0000 Subject: [PATCH 246/757] add package/download target SVN-Revision: 4028 --- openwrt/package/Makefile | 5 +++++ openwrt/package/rules.mk | 21 +++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 7548e069a71..2b7f0db7647 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -3,12 +3,16 @@ include $(TOPDIR)/rules.mk include $(TOPDIR)/.config include $(TOPDIR)/.pkgdeps +SOURCE_PACKAGES:=$(patsubst %,%-source,$(package-y) $(package-m)) COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) $(STAMP_DIR) $(TARGET_DIR): mkdir -p $@ +%-source: $(STAMP_DIR) $(TARGET_DIR) + $(MAKE) -C $(patsubst %-source,%,$@) source MAKEFLAGS="$(BUILD_MAKEFLAGS)" + %-prepare: $(STAMP_DIR) $(TARGET_DIR) $(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)" @@ -29,6 +33,7 @@ $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo all: compile clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) +download: $(SOURCE_PACKAGES) compile-targets: $(COMPILE_PACKAGES) compile: $(MAKE) -j$(CONFIG_JLEVEL) compile-targets diff --git a/openwrt/package/rules.mk b/openwrt/package/rules.mk index 40e07f839fe..82298b02498 100644 --- a/openwrt/package/rules.mk +++ b/openwrt/package/rules.mk @@ -19,7 +19,8 @@ define Build/DefaultTargets endif endif - $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) + + $(PKG_BUILD_DIR)/.prepared: @-rm -rf $(PKG_BUILD_DIR) @mkdir -p $(PKG_BUILD_DIR) $(call Build/Prepare) @@ -199,11 +200,6 @@ define BuildPackage endef -ifneq ($(strip $(PKG_SOURCE)),) - $(DL_DIR)/$(PKG_SOURCE): - $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) -endif - ifneq ($(strip $(PKG_CAT)),) define Build/Prepare/Default @if [ "$(PKG_CAT)" = "unzip" ]; then \ @@ -273,11 +269,20 @@ ifneq ($(DUMP),) dumpinfo: FORCE @$(DUMPINFO) else - $(PACKAGE_DIR): mkdir -p $@ + + ifneq ($(strip $(PKG_SOURCE)),) + source: $(DL_DIR)/$(PKG_SOURCE) - source: $(DL_DIR)/$(PKG_SOURCE) + $(DL_DIR)/$(PKG_SOURCE): + mkdir -p $(DL_DIR) + $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) + + $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) + endif + + source: prepare: $(PKG_BUILD_DIR)/.prepared configure: $(PKG_BUILD_DIR)/.configured From 96930ce1ee4e0743700f57151e997e379134777c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 20 Jun 2006 23:49:23 +0000 Subject: [PATCH 247/757] add toolchain/download target SVN-Revision: 4029 --- openwrt/toolchain/Makefile | 7 ++++++- openwrt/toolchain/sed/Makefile | 8 ++++++-- openwrt/toolchain/sed/sedcheck.sh | 19 ++++++++++++++----- openwrt/toolchain/utils/Makefile | 1 + 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index 8e26db562b7..fac04682852 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -1,12 +1,14 @@ # Main makefile for the toolchain include $(TOPDIR)/rules.mk -TARGETS-y:=sed utils binutils gcc uClibc ipkg-utils libnotimpl +TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl TARGETS-$(CONFIG_GDB) += gdb +TARGETS_DOWNLOAD:=$(patsubst %,%-source,$(TARGETS-y)) TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y)) TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y)) all: install +download: $(TARGETS_DOWNLOAD) install: $(TARGETS_INSTALL) clean: $(TARGETS_CLEAN) @@ -30,6 +32,9 @@ $(STAGING_DIR): $(TOOL_BUILD_DIR): @mkdir -p $@ +%-source: FORCE + $(MAKE) -C $(patsubst %-source,%,$@) source + %-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \ diff --git a/openwrt/toolchain/sed/Makefile b/openwrt/toolchain/sed/Makefile index e14aadd8ff1..bbf85028af5 100644 --- a/openwrt/toolchain/sed/Makefile +++ b/openwrt/toolchain/sed/Makefile @@ -13,14 +13,16 @@ SED_DIR1:=$(TOOL_BUILD_DIR)/sed-$(SED_VER) SED_DIR2:=$(BUILD_DIR)/sed-$(SED_VER) SED_BINARY:=sed/sed SED_TARGET_BINARY:=bin/sed +SED_MD5SUM:=928f0e06422f414091917401f1a834d0 ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64 endif HOST_SED_TARGET=$(shell ./sedcheck.sh) +DOWNLOAD_TARGET=$(shell ./sedcheck.sh) $(DL_DIR)/$(SED_SOURCE): mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SED_SOURCE) x $(SED_SITE) + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SED_SOURCE) $(SED_MD5SUM) $(SED_SITE) ############################################################# # @@ -65,7 +67,9 @@ use-sed-host-binary: FORCE rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); \ ln -s $$SED $(STAGING_DIR)/$(SED_TARGET_BINARY) -source: +download-sed-binary: sed-$(SED_VER).tar.gz + +source: $(DOWNLOAD_TARGET) prepare: compile: install: $(HOST_SED_TARGET) diff --git a/openwrt/toolchain/sed/sedcheck.sh b/openwrt/toolchain/sed/sedcheck.sh index 4d645b6ab0f..5af1d886bd2 100755 --- a/openwrt/toolchain/sed/sedcheck.sh +++ b/openwrt/toolchain/sed/sedcheck.sh @@ -11,11 +11,20 @@ fi; echo "HELLO" > .sedtest $SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1 -if [ $? != 0 ] ; then - echo build-sed-host-binary -else - echo use-sed-host-binary -fi; +case "$1" in + download) + if [ $? != 0 ] ; then + echo download-sed-binary + fi; + ;; + *) + if [ $? != 0 ] ; then + echo build-sed-host-binary + else + echo use-sed-host-binary + fi; + ;; +esac rm -f .sedtest diff --git a/openwrt/toolchain/utils/Makefile b/openwrt/toolchain/utils/Makefile index 65e488f4e5e..f79ed891e45 100644 --- a/openwrt/toolchain/utils/Makefile +++ b/openwrt/toolchain/utils/Makefile @@ -8,6 +8,7 @@ ifeq ($(OS),Darwin) CFLAGS += -I./include endif +source: prepare: $(UTILS_BUILD_DIR) compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) install: compile From 991cba3cc9b6ebc5c06e39b4b12766452b3e0946 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 20 Jun 2006 23:56:49 +0000 Subject: [PATCH 248/757] add target/download SVN-Revision: 4030 --- openwrt/target/Makefile | 7 ++++++- openwrt/target/linux/Makefile | 4 ++++ openwrt/target/linux/ar7-2.4/Makefile | 1 + openwrt/target/linux/image/image.mk | 1 + openwrt/target/linux/image/jffs2.mk | 4 ++++ openwrt/target/linux/image/squashfs.mk | 3 +++ openwrt/target/lzma/Makefile | 2 +- openwrt/target/utils/Makefile | 1 + 8 files changed, 21 insertions(+), 2 deletions(-) diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 709a2080a51..d64053cbd40 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -5,19 +5,24 @@ all: install $(BIN_DIR): mkdir -p $(BIN_DIR) +TARGETS:=linux utils lzma + linux-compile: utils-install lzma-install linux-install: $(BIN_DIR) +download: $(patsubst %,%-source,$(TARGETS)) prepare: linux-prepare compile: linux-compile install: image_clean linux-install -clean: linux-clean utils-clean lzma-clean image_clean +clean: $(patsubst %,%-clean,$(TARGETS)) image_clean image_clean: FORCE rm -f $(BIN_DIR)/openwrt-* %-clean: FORCE $(MAKE) -C $(patsubst %-clean,%,$@) clean +%-source: FORCE + $(MAKE) -C $(patsubst %-source,%,$@) source %-prepare: FORCE $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: %-prepare diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index c08bb4c89c0..2caee31b366 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -25,6 +25,10 @@ $(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE)) export BOARD export KERNEL +source: + $(MAKE) -C $(BOARD)-$(KERNEL) source + $(MAKE) -C image/$(BOARD) source + prepare: $(MAKE) -C $(BOARD)-$(KERNEL) prepare diff --git a/openwrt/target/linux/ar7-2.4/Makefile b/openwrt/target/linux/ar7-2.4/Makefile index 7775e888846..20ad3523ac2 100644 --- a/openwrt/target/linux/ar7-2.4/Makefile +++ b/openwrt/target/linux/ar7-2.4/Makefile @@ -49,6 +49,7 @@ ATM_FIRMWARE_MD5SUM=8bfcb31109796502d66b11baaeb2fba6 $(DL_DIR)/$(ATM_FIRMWARE_FILE): $(SCRIPT_DIR)/download.pl $(DL_DIR) $(ATM_FIRMWARE_FILE) $(ATM_FIRMWARE_MD5SUM) $(DOWNLOAD_SITE) +source: $(DL_DIR)/$(ATM_FIRMWARE_FILE) $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(ATM_FIRMWARE_FILE) $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.drivers-unpacked $(LINUX_DIR)/.modules_done: $(LINUX_DIR)/.drivers-unpacked diff --git a/openwrt/target/linux/image/image.mk b/openwrt/target/linux/image/image.mk index 1c9341dd760..92143d64e8d 100644 --- a/openwrt/target/linux/image/image.mk +++ b/openwrt/target/linux/image/image.mk @@ -48,6 +48,7 @@ compile-targets: install-targets: clean-targets: +source: prepare: compile: compile-targets install: compile install-targets diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk index dd5edd01c0f..a0e14daa90c 100644 --- a/openwrt/target/linux/image/jffs2.mk +++ b/openwrt/target/linux/image/jffs2.mk @@ -14,6 +14,9 @@ define Image/mkfs/jffs2 $(call Image/Build,jffs2-128k) endef +jffs2-source: FORCE + $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 source + $(STAGING_DIR)/bin/mkfs.jffs2: $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 compile @@ -21,6 +24,7 @@ jffs2-clean: FORCE $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 clean rm -f $(KDIR)/root.jffs2* +source: jffs2-source compile-targets: $(STAGING_DIR)/bin/mkfs.jffs2 clean-targets: jffs2-clean diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk index 6890daec680..e01766c0cab 100644 --- a/openwrt/target/linux/image/squashfs.mk +++ b/openwrt/target/linux/image/squashfs.mk @@ -4,6 +4,9 @@ else ENDIAN := be endif +squashfs-source: FORCE + $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs source + $(STAGING_DIR)/bin/mksquashfs-lzma: $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs compile diff --git a/openwrt/target/lzma/Makefile b/openwrt/target/lzma/Makefile index b358a9efce8..214967a15de 100644 --- a/openwrt/target/lzma/Makefile +++ b/openwrt/target/lzma/Makefile @@ -34,7 +34,6 @@ $(LZMA_DIR)/.built: $(LZMA_DIR)/.unpacked lzma: $(TARGETS) $(CP) $^ $(LZMA_DIR) -lzma-source: $(DL_DIR)/$(LZMA_SOURCE) lzma-clean: FORCE -$(MAKE) -C $(LZMA_LIB_DIR) clean @@ -46,6 +45,7 @@ lzma-dirclean: FORCE ############################################################# +source: $(DL_DIR)/$(LZMA_SOURCE) prepare: $(LZMA_DIR)/.unpacked compile: lzma install: lzma FORCE diff --git a/openwrt/target/utils/Makefile b/openwrt/target/utils/Makefile index fe354754ce6..bcd1e653e42 100644 --- a/openwrt/target/utils/Makefile +++ b/openwrt/target/utils/Makefile @@ -4,6 +4,7 @@ TARGETS := addpattern trx motorola-bin dgfirmware UTILS_BUILD_DIR:=$(BUILD_DIR)/target-utils +source: prepare: $(UTILS_BUILD_DIR) compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) FORCE mkdir -p $(STAGING_DIR)/bin From 99bc02a12be0b7725b2917e2b25c25e446f67717 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 20 Jun 2006 23:57:10 +0000 Subject: [PATCH 249/757] add global make download target SVN-Revision: 4031 --- openwrt/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 92a49bf9e81..faeecaa4881 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -86,9 +86,16 @@ target/%: .pkginfo FORCE toolchain/%: FORCE $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) -world: ./scripts/config/conf FORCE - touch .config +.config: ./scripts/config/conf FORCE + @[ -f .config ] || $(MAKE) menuconfig $< -D .config Config.in >/dev/null 2>/dev/null + +download: .config FORCE + $(MAKE) toolchain/download + $(MAKE) package/download + $(MAKE) target/download + +world: .config FORCE $(MAKE) toolchain/install $(MAKE) target/compile $(MAKE) package/compile From 4e24e35fa9083cfe57d7b1fe7b51c5f2f6515f18 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 02:16:37 +0000 Subject: [PATCH 250/757] build system cleanup. move shared include files into $(TOPDIR)/include, move lzma, mkfs.* into toolchain/ SVN-Revision: 4032 --- openwrt/include/image.mk | 77 +++++++++++++++++++ .../kernel.mk => include/kernel-build.mk} | 33 ++++---- .../linux/rules.mk => include/kernel.mk} | 36 ++++----- .../modules.mk => include/modules-2.4.mk} | 2 +- .../modules.mk => include/modules-2.6.mk} | 2 +- .../{target/linux => include}/netfilter.mk | 0 .../{package/rules.mk => include/package.mk} | 0 openwrt/package/alsa/Makefile | 4 +- openwrt/package/base-files/Makefile | 4 +- openwrt/package/bridge/Makefile | 2 +- openwrt/package/broadcom-wl/Makefile | 4 +- openwrt/package/busybox/Makefile | 2 +- openwrt/package/diag/Makefile | 4 +- openwrt/package/dnsmasq/Makefile | 2 +- openwrt/package/dropbear/Makefile | 2 +- openwrt/package/ebtables/Makefile | 2 +- openwrt/package/fuse/Makefile | 4 +- openwrt/package/haserl/Makefile | 2 +- openwrt/package/hostap/Makefile | 4 +- openwrt/package/hostapd/Makefile | 2 +- openwrt/package/iproute2/Makefile | 2 +- openwrt/package/ipsec-tools/Makefile | 2 +- openwrt/package/ipset/Makefile | 2 +- openwrt/package/iptables/Makefile | 6 +- openwrt/package/kernel.mk | 31 -------- openwrt/package/libpcap/Makefile | 2 +- openwrt/package/linux-atm/Makefile | 2 +- openwrt/package/madwifi/Makefile | 4 +- openwrt/package/mini_fo/Makefile | 4 +- openwrt/package/mtd/Makefile | 2 +- openwrt/package/nvram/Makefile | 2 +- openwrt/package/openssl/Makefile | 2 +- openwrt/package/openswan/Makefile | 4 +- openwrt/package/pcmcia-cs/Makefile | 2 +- openwrt/package/ppp/Makefile | 2 +- openwrt/package/pptp/Makefile | 2 +- openwrt/package/robocfg/Makefile | 2 +- openwrt/package/shfs/Makefile | 4 +- openwrt/package/spca5xx/Makefile | 4 +- openwrt/package/switch/Makefile | 4 +- openwrt/package/udev/Makefile | 2 +- openwrt/package/ueagle-atm/Makefile | 4 +- openwrt/package/util-linux/Makefile | 2 +- openwrt/package/wireless-tools/Makefile | 2 +- openwrt/package/wlcompat/Makefile | 4 +- openwrt/package/zd1211/Makefile | 4 +- openwrt/package/zlib/Makefile | 2 +- openwrt/target/Makefile | 9 +-- openwrt/target/linux/Config.in | 4 +- openwrt/target/linux/Makefile | 1 + openwrt/target/linux/ar531x-2.4/Makefile | 5 +- openwrt/target/linux/ar7-2.4/Makefile | 5 +- openwrt/target/linux/aruba-2.6/Makefile | 7 +- openwrt/target/linux/au1000-2.6/Makefile | 7 +- openwrt/target/linux/brcm-2.4/Makefile | 5 +- openwrt/target/linux/brcm-2.6/Makefile | 6 +- openwrt/target/linux/image/ar7/Makefile | 2 +- openwrt/target/linux/image/aruba/Makefile | 2 +- openwrt/target/linux/image/au1000/Makefile | 2 +- openwrt/target/linux/image/brcm/Makefile | 2 +- openwrt/target/linux/image/generic/Makefile | 2 +- openwrt/target/linux/image/image.mk | 55 ------------- openwrt/target/linux/image/jffs2.mk | 30 -------- openwrt/target/linux/image/rb532/Makefile | 2 +- openwrt/target/linux/image/squashfs.mk | 25 ------ openwrt/target/linux/image/tgz.mk | 3 - openwrt/target/linux/image/x86/Makefile | 2 +- openwrt/target/linux/image/xscale/Makefile | 2 +- openwrt/target/linux/rb532-2.6/Makefile | 6 +- openwrt/target/linux/sibyte-2.6/Makefile | 7 +- openwrt/target/linux/x86-2.4/Makefile | 7 +- openwrt/target/linux/x86-2.6/Makefile | 7 +- openwrt/target/linux/xscale-2.6/Makefile | 7 +- openwrt/toolchain/Makefile | 3 +- .../linux/image => toolchain}/jffs2/Makefile | 0 .../jffs2/patches/100-gcc4_fix.patch} | 0 openwrt/{target => toolchain}/lzma/Makefile | 2 +- .../lzma/patches/100-lzma_zlib.patch} | 0 .../image => toolchain}/squashfs/Makefile | 0 .../squashfs/patches/100-lzma.patch | 0 80 files changed, 205 insertions(+), 305 deletions(-) create mode 100644 openwrt/include/image.mk rename openwrt/{target/linux/kernel.mk => include/kernel-build.mk} (80%) rename openwrt/{target/linux/rules.mk => include/kernel.mk} (77%) rename openwrt/{target/linux/generic-2.4/modules.mk => include/modules-2.4.mk} (99%) rename openwrt/{target/linux/generic-2.6/modules.mk => include/modules-2.6.mk} (99%) rename openwrt/{target/linux => include}/netfilter.mk (100%) rename openwrt/{package/rules.mk => include/package.mk} (100%) delete mode 100644 openwrt/package/kernel.mk delete mode 100644 openwrt/target/linux/image/image.mk delete mode 100644 openwrt/target/linux/image/jffs2.mk delete mode 100644 openwrt/target/linux/image/squashfs.mk delete mode 100644 openwrt/target/linux/image/tgz.mk rename openwrt/{target/linux/image => toolchain}/jffs2/Makefile (100%) rename openwrt/{target/linux/image/jffs2/patches/gcc4-fix.patch => toolchain/jffs2/patches/100-gcc4_fix.patch} (100%) rename openwrt/{target => toolchain}/lzma/Makefile (96%) rename openwrt/{target/lzma/lzma-zlib.patch => toolchain/lzma/patches/100-lzma_zlib.patch} (100%) rename openwrt/{target/linux/image => toolchain}/squashfs/Makefile (100%) rename openwrt/{target/linux/image => toolchain}/squashfs/patches/100-lzma.patch (100%) diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk new file mode 100644 index 00000000000..f30f0997eee --- /dev/null +++ b/openwrt/include/image.mk @@ -0,0 +1,77 @@ +include $(TOPDIR)/rules.mk + +KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) + +ifneq ($(CONFIG_BIG_ENDIAN),y) +JFFS2OPTS := --pad --little-endian --squash +SQUASHFS_OPTS := -le +else +JFFS2OPTS := --pad --big-endian --squash +SQUASHFS_OPTS := -be +endif + +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y) + define Image/mkfs/jffs2 + rm -rf $(BUILD_DIR)/root/jffs + + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root + + $(call Image/Build,jffs2-64k) + $(call Image/Build,jffs2-128k) + endef + endif + + ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),y) + define Image/mkfs/squashfs + @mkdir -p $(BUILD_DIR)/root/jffs + $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned $(SQUASHFS_OPTS) + $(call Image/Build,squashfs) + endef + endif + + ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y) + define Image/mkfs/tgz + tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ . + endef + endif +endif + +define Image/mkfs/prepare/default + find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 + find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 + find $(BUILD_DIR)/root -type d | xargs chmod 0755 + mkdir -p $(BUILD_DIR)/root/tmp + chmod 0777 $(BUILD_DIR)/root/tmp +endef + +define Image/mkfs/prepare + $(call Image/mkfs/prepare/default) +endef + +define BuildImage +compile: + $(call Build/Compile) + +install: + $(call Image/Prepare) + $(call Image/mkfs/prepare) + $(call Image/BuildKernel) + $(call Image/mkfs/jffs2) + $(call Image/mkfs/squashfs) + $(call Image/mkfs/tgz) + +clean: + $(call Build/Clean) +endef + +compile-targets: +install-targets: +clean-targets: + +source: +prepare: +compile: compile-targets +install: compile install-targets +clean: clean-targets diff --git a/openwrt/target/linux/kernel.mk b/openwrt/include/kernel-build.mk similarity index 80% rename from openwrt/target/linux/kernel.mk rename to openwrt/include/kernel-build.mk index cd74fccfb8a..9fbbe4504c1 100644 --- a/openwrt/target/linux/kernel.mk +++ b/openwrt/include/kernel-build.mk @@ -1,10 +1,14 @@ -LINUX_SOURCE:=$(LINUX_NAME).tar.bz2 +include $(TOPDIR)/include/modules-$(KERNEL).mk + +LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \ http://www.de.kernel.org/pub/linux/kernel/v$(KERNEL) -KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg +KERNEL_IDIR:=$(KERNEL_BUILD_DIR)/kernel-ipkg +KERNEL_IPKG:=$(KERNEL_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk +INSTALL_TARGETS += $(KERNEL_IPKG) $(TARGETS): $(PACKAGE_DIR) @@ -19,8 +23,8 @@ $(DL_DIR)/$(LINUX_SOURCE): $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) - -mkdir -p $(LINUX_BUILD_DIR) - bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) - + -mkdir -p $(KERNEL_BUILD_DIR) + bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS) - touch $@ ifeq ($(KERNEL),2.4) @@ -65,14 +69,14 @@ $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux touch -c $(LINUX_KERNEL) $(LINUX_DIR)/.modules_done: - rm -rf $(LINUX_BUILD_DIR)/modules + rm -rf $(KERNEL_BUILD_DIR)/modules $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done $(STAMP_DIR)/.linux-compile: @$(MAKE) $(LINUX_DIR)/.modules_done $(TARGETS) $(KERNEL_IPKG) - ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux + ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux touch $@ $(KERNEL_IPKG): @@ -82,11 +86,10 @@ $(KERNEL_IPKG): if [ -f ./config/$(BOARD).modules ]; then \ cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \ fi - $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) + $(IPKG_BUILD) $(KERNEL_IDIR) $(KERNEL_BUILD_DIR) -$(BUILD_DIR)/kernel.mk: $(LINUX_DIR) FORCE +$(TOPDIR)/.kernel.mk: echo "BOARD:=$(BOARD)" > $@ - echo "LINUX_NAME:=$(LINUX_NAME)" >> $@ echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ @@ -94,7 +97,7 @@ pkg-install: FORCE @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; } source: $(DL_DIR)/$(LINUX_SOURCE) -prepare: $(BUILD_DIR)/kernel.mk +prepare: @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) @$(MAKE) $(LINUX_DIR)/.configured @@ -104,9 +107,9 @@ install: compile $(LINUX_KERNEL) mostlyclean: FORCE rm -f $(STAMP_DIR)/.linux-compile - rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done - rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked - $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean + rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done + rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked + $(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean rm -f $(LINUX_KERNEL) rebuild: FORCE @@ -118,5 +121,5 @@ rebuild: FORCE clean: FORCE rm -f $(STAMP_DIR)/.linux-compile - rm -rf $(LINUX_BUILD_DIR) + rm -rf $(KERNEL_BUILD_DIR) rm -f $(TARGETS) diff --git a/openwrt/target/linux/rules.mk b/openwrt/include/kernel.mk similarity index 77% rename from openwrt/target/linux/rules.mk rename to openwrt/include/kernel.mk index 166bfe24b62..5c64ee4e12c 100644 --- a/openwrt/target/linux/rules.mk +++ b/openwrt/include/kernel.mk @@ -1,22 +1,16 @@ +ifneq ($(DUMP),1) +include $(TOPDIR)/.kernel.mk + KERNEL:=unknown ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) KERNEL:=2.4 +LINUX_KMOD_SUFFIX=o endif ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) KERNEL:=2.6 +LINUX_KMOD_SUFFIX=ko endif -MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) - -LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -ifeq ($(LINUX_NAME),) -LINUX_NAME:=linux-$(LINUX_VERSION) -endif -LINUX_DIR := $(LINUX_BUILD_DIR)/$(LINUX_NAME) -LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux - -LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root - LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/mipsel/mips/' \ -e 's/mipseb/mips/' \ @@ -25,16 +19,18 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/armeb/arm/' \ ) -KMOD_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules -MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR) -TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) +KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) +LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) -ifeq ($(KERNEL),2.6) -LINUX_KMOD_SUFFIX=ko -else -LINUX_KMOD_SUFFIX=o +MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) +MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) +TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) +KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules + +LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux endif +# FIXME: remove this crap define KMOD_template ifeq ($$(strip $(4)),) KDEPEND_$(1):=m @@ -79,7 +75,3 @@ endif $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) endef -KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk -INSTALL_TARGETS := $(KERNEL_IPKG) -TARGETS := - diff --git a/openwrt/target/linux/generic-2.4/modules.mk b/openwrt/include/modules-2.4.mk similarity index 99% rename from openwrt/target/linux/generic-2.4/modules.mk rename to openwrt/include/modules-2.4.mk index 540ac715cc2..71864ad8eb7 100644 --- a/openwrt/target/linux/generic-2.4/modules.mk +++ b/openwrt/include/modules-2.4.mk @@ -1,4 +1,4 @@ -include ../netfilter.mk +include $(TOPDIR)/include/netfilter.mk # Networking diff --git a/openwrt/target/linux/generic-2.6/modules.mk b/openwrt/include/modules-2.6.mk similarity index 99% rename from openwrt/target/linux/generic-2.6/modules.mk rename to openwrt/include/modules-2.6.mk index b582400bd63..ec9f5da44f4 100644 --- a/openwrt/target/linux/generic-2.6/modules.mk +++ b/openwrt/include/modules-2.6.mk @@ -1,5 +1,5 @@ NF_2_6:=1 -include ../netfilter.mk +include $(TOPDIR)/include/netfilter.mk # Networking diff --git a/openwrt/target/linux/netfilter.mk b/openwrt/include/netfilter.mk similarity index 100% rename from openwrt/target/linux/netfilter.mk rename to openwrt/include/netfilter.mk diff --git a/openwrt/package/rules.mk b/openwrt/include/package.mk similarity index 100% rename from openwrt/package/rules.mk rename to openwrt/include/package.mk diff --git a/openwrt/package/alsa/Makefile b/openwrt/package/alsa/Makefile index b1b9997c199..5f6a3305b5a 100644 --- a/openwrt/package/alsa/Makefile +++ b/openwrt/package/alsa/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=alsa-driver PKG_VERSION:=1.0.11 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk ifeq ($(LINUX_KARCH),i386) KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index ec3dc889238..bb208940960 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=base-files PKG_RELEASE:=8 @@ -12,7 +12,7 @@ ifeq ($(REV),) REV:=0 endif -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk ifneq ($(DUMP),1) TARGET:=-$(BOARD)-$(KERNEL) diff --git a/openwrt/package/bridge/Makefile b/openwrt/package/bridge/Makefile index 65fd8358e86..f2b178a6101 100644 --- a/openwrt/package/bridge/Makefile +++ b/openwrt/package/bridge/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/bridge PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/bridge SECTION:=base diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 227352b1568..6fe22edb0f1 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=broadcom-wl PKG_VERSION:=4.80.9.2 @@ -14,7 +14,7 @@ PKG_SOURCE_URL:=http://downloads.openwrt.org/sources PKG_MD5SUM:=7d9fab2c611369bbe075c3924ea77450 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-brcm-wl SECTION:=drivers diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index aac9d21e323..6b2e0c5be46 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/busybox SECTION:=base diff --git a/openwrt/package/diag/Makefile b/openwrt/package/diag/Makefile index 6fed3b51bfd..ab28e7218e6 100644 --- a/openwrt/package/diag/Makefile +++ b/openwrt/package/diag/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=kmod-diag PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-diag SECTION:=drivers diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index 6efaf370a1e..a05ec0e22cb 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq PKG_MD5SUM:=489198ec87101087043adc98bbe062dc PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/dnsmasq SECTION:=base diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index bda4d8fc913..0409e66dbf2 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/ PKG_MD5SUM:=ca8e53a766faec831882831364568421 PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/dropbear SECTION:=base diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index f4359a6675d..814ac68a223 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/ebtables PKG_MD5SUM:=f07111fcc1966be669278433c35dcc28 PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ebtables SECTION:=base diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile index 91d4dd6074d..b7084236df8 100644 --- a/openwrt/package/fuse/Makefile +++ b/openwrt/package/fuse/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=fuse PKG_VERSION:=2.5.3 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-fuse SECTION:=drivers diff --git a/openwrt/package/haserl/Makefile b/openwrt/package/haserl/Makefile index e6215c9547f..ec940ea4376 100644 --- a/openwrt/package/haserl/Makefile +++ b/openwrt/package/haserl/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/haserl PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/haserl SECTION:=base diff --git a/openwrt/package/hostap/Makefile b/openwrt/package/hostap/Makefile index 80f820187bf..21abfe256ba 100644 --- a/openwrt/package/hostap/Makefile +++ b/openwrt/package/hostap/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=hostap-driver PKG_VERSION:=0.4.9 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-hostap SECTION:=drivers diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile index 4a1c3f92650..867cda6922b 100644 --- a/openwrt/package/hostapd/Makefile +++ b/openwrt/package/hostapd/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/hostapd SECTION:=net diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index 1fa638d39d7..9cf1eb9909e 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/ PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5 PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ip SECTION:=base diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 58dccca62ad..667884debea 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ipsec-tools SECTION:=base diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index 456f8b6be4a..d245090a689 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://ipset.netfilter.org PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ipset SECTION:=base diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 623a64ed84f..74902774406 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=iptables PKG_VERSION:=1.3.5 @@ -20,10 +20,10 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_MENU:=IPv4 / IPv6 firewall administration -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk ifeq ($(DUMP),) include $(LINUX_DIR)/.config -include $(TOPDIR)/target/linux/netfilter.mk +include $(TOPDIR)/include/netfilter.mk endif define Package/iptables diff --git a/openwrt/package/kernel.mk b/openwrt/package/kernel.mk deleted file mode 100644 index 39f9cc0c9c6..00000000000 --- a/openwrt/package/kernel.mk +++ /dev/null @@ -1,31 +0,0 @@ -ifneq ($(DUMP),1) -include $(BUILD_DIR)/kernel.mk - -KERNEL:=unknown -ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) -KERNEL:=2.4 -LINUX_KMOD_SUFFIX=o -endif -ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) -KERNEL:=2.6 -LINUX_KMOD_SUFFIX=ko -endif - -LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ - -e 's/mipsel/mips/' \ - -e 's/mipseb/mips/' \ - -e 's/powerpc/ppc/' \ - -e 's/sh[234]/sh/' \ - -e 's/armeb/arm/' \ -) - -KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -ifeq ($(LINUX_NAME),) -LINUX_NAME:=linux-$(LINUX_VERSION) -endif -LINUX_DIR := $(KERNEL_BUILD_DIR)/$(LINUX_NAME) - -KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules -MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) -TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) -endif diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile index d4d7e216726..2d7aecf5514 100644 --- a/openwrt/package/libpcap/Makefile +++ b/openwrt/package/libpcap/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/libpcap SECTION:=base diff --git a/openwrt/package/linux-atm/Makefile b/openwrt/package/linux-atm/Makefile index e37d5bdceb5..15b3f7d4daa 100644 --- a/openwrt/package/linux-atm/Makefile +++ b/openwrt/package/linux-atm/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/linux-atm SECTION:=libs diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index c689054811e..7bdb7ec11aa 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=madwifi PKG_VERSION:=0.9.0 @@ -54,7 +54,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ LDOPTS="" \ DOMULTI=1 -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk ifeq ($(findstring AHB,$(BUS)),AHB) define Build/Compile/ahb diff --git a/openwrt/package/mini_fo/Makefile b/openwrt/package/mini_fo/Makefile index f2c46c9ec3c..0180f81c319 100644 --- a/openwrt/package/mini_fo/Makefile +++ b/openwrt/package/mini_fo/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=mini_fo PKG_VERSION:=0.6.2pre1 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/ PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-mini-fo SECTION:=drivers diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index f6e94303af8..01dfcd6b541 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -7,7 +7,7 @@ PKG_RELEASE:=4 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/mtd SECTION:=base diff --git a/openwrt/package/nvram/Makefile b/openwrt/package/nvram/Makefile index 019800a0c6e..cf76c7c8122 100644 --- a/openwrt/package/nvram/Makefile +++ b/openwrt/package/nvram/Makefile @@ -7,7 +7,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/nvram SECTION:=base diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile index 82f20d6b0dd..39fe6b4c3d9 100644 --- a/openwrt/package/openssl/Makefile +++ b/openwrt/package/openssl/Makefile @@ -20,7 +20,7 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192 OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/libopenssl SECTION:=base diff --git a/openwrt/package/openswan/Makefile b/openwrt/package/openswan/Makefile index 4a1a42cc07d..f81096547b9 100644 --- a/openwrt/package/openswan/Makefile +++ b/openwrt/package/openswan/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=openswan PKG_VERSION:=2.4.5 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.openswan.org/download PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-openswan SECTION:=drivers diff --git a/openwrt/package/pcmcia-cs/Makefile b/openwrt/package/pcmcia-cs/Makefile index a389fd63e19..2c7b229781c 100644 --- a/openwrt/package/pcmcia-cs/Makefile +++ b/openwrt/package/pcmcia-cs/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/pcmcia-cs SECTION:=base diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 55986f95c05..edd9a5ea866 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ppp SECTION:=net diff --git a/openwrt/package/pptp/Makefile b/openwrt/package/pptp/Makefile index 08cb43a7c29..6d01ce19f34 100644 --- a/openwrt/package/pptp/Makefile +++ b/openwrt/package/pptp/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/pptpclient PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631 PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/pptp SECTION:=base diff --git a/openwrt/package/robocfg/Makefile b/openwrt/package/robocfg/Makefile index 49f60056997..ca0f83d3ddb 100644 --- a/openwrt/package/robocfg/Makefile +++ b/openwrt/package/robocfg/Makefile @@ -8,7 +8,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/robocfg -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/robocfg SECTION:=base diff --git a/openwrt/package/shfs/Makefile b/openwrt/package/shfs/Makefile index 69f8d83a467..057358b34d4 100644 --- a/openwrt/package/shfs/Makefile +++ b/openwrt/package/shfs/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=shfs PKG_VERSION:=0.35 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-shfs SECTION:=drivers diff --git a/openwrt/package/spca5xx/Makefile b/openwrt/package/spca5xx/Makefile index 93eea633cd1..86233fc64a1 100644 --- a/openwrt/package/spca5xx/Makefile +++ b/openwrt/package/spca5xx/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=spca5xx PKG_VERSION:=20060301 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk #FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages define Package/kmod-spca5xx diff --git a/openwrt/package/switch/Makefile b/openwrt/package/switch/Makefile index e8aa6a02a48..cb5f3467480 100644 --- a/openwrt/package/switch/Makefile +++ b/openwrt/package/switch/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=kmod-switch PKG_RELEASE:=1 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-switch SECTION:=drivers diff --git a/openwrt/package/udev/Makefile b/openwrt/package/udev/Makefile index 54e06dcff61..5d397161b19 100644 --- a/openwrt/package/udev/Makefile +++ b/openwrt/package/udev/Makefile @@ -19,7 +19,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/udev SECTION:=base diff --git a/openwrt/package/ueagle-atm/Makefile b/openwrt/package/ueagle-atm/Makefile index 6f227a1bf49..6d003f6c0da 100644 --- a/openwrt/package/ueagle-atm/Makefile +++ b/openwrt/package/ueagle-atm/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=ueagle-atm PKG_VERSION:=1.0d1 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk #FIXME: add dependency on kmod-usb-core define Package/kmod-ueagle-atm diff --git a/openwrt/package/util-linux/Makefile b/openwrt/package/util-linux/Makefile index ef28bdb69e9..673ade433f8 100644 --- a/openwrt/package/util-linux/Makefile +++ b/openwrt/package/util-linux/Makefile @@ -16,7 +16,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/fdisk SECTION:=base diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index ad4eddab8c9..368d3ebb015 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/wireless-tools SECTION:=base diff --git a/openwrt/package/wlcompat/Makefile b/openwrt/package/wlcompat/Makefile index af1f07593fd..d5feede6c95 100644 --- a/openwrt/package/wlcompat/Makefile +++ b/openwrt/package/wlcompat/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=kmod-wlcompat PKG_RELEASE:=3 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-wlcompat SECTION:=drivers diff --git a/openwrt/package/zd1211/Makefile b/openwrt/package/zd1211/Makefile index a71873b9f7f..1c79922cfca 100644 --- a/openwrt/package/zd1211/Makefile +++ b/openwrt/package/zd1211/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 3297 2006-03-02 23:42:52Z florian $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=zd1211 PKG_VERSION:=r69 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk #FIXME: add proper dependency handling on kmod-usb-core packages define Package/kmod-zd1211 diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index 02659bb9ac1..8e497c2f28c 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/zlib SECTION:=base diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index d64053cbd40..9205f5b9867 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -5,9 +5,9 @@ all: install $(BIN_DIR): mkdir -p $(BIN_DIR) -TARGETS:=linux utils lzma +TARGETS:=linux utils -linux-compile: utils-install lzma-install +linux-compile: utils-install linux-install: $(BIN_DIR) download: $(patsubst %,%-source,$(TARGETS)) @@ -27,11 +27,6 @@ image_clean: FORCE $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: %-prepare $(MAKE) -C $(patsubst %-compile,%,$@) compile -%-rebuild: FORCE - $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild %-install: %-compile $(MAKE) -C $(patsubst %-install,%,$@) install -linux-imagebuilder: FORCE - $(MAKE) -C linux imagebuilder - diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 946ace32045..23c96b76df8 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -13,8 +13,8 @@ menu "Target Root Filesystem" help Build a jffs2 root filesystem - config TARGET_ROOTFS_SQUASHFS_LZMA - bool "squashfs-lzma" + config TARGET_ROOTFS_SQUASHFS + bool "squashfs" default y depends !LINUX_2_6_ARUBA depends !LINUX_2_6_XSCALE diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index 2caee31b366..e1a314d1d83 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -30,6 +30,7 @@ source: $(MAKE) -C image/$(BOARD) source prepare: + rm -f $(TOPDIR)/.kernel.mk $(MAKE) -C $(BOARD)-$(KERNEL) prepare compile: diff --git a/openwrt/target/linux/ar531x-2.4/Makefile b/openwrt/target/linux/ar531x-2.4/Makefile index 3abb30d4877..96a32848e7c 100644 --- a/openwrt/target/linux/ar531x-2.4/Makefile +++ b/openwrt/target/linux/ar531x-2.4/Makefile @@ -4,10 +4,9 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ../rules.mk include ./config -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/ar7-2.4/Makefile b/openwrt/target/linux/ar7-2.4/Makefile index 20ad3523ac2..c8688da044e 100644 --- a/openwrt/target/linux/ar7-2.4/Makefile +++ b/openwrt/target/linux/ar7-2.4/Makefile @@ -4,8 +4,8 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ../rules.mk include ./config +include $(TOPDIR)/include/kernel.mk ATM_FIRMWARE_VERSION:=0.4 ATM_FIRMWARE_DIR=sangam-atm-firmware-$(ATM_FIRMWARE_VERSION) @@ -26,8 +26,7 @@ $(eval $(call KMOD_template,CPMAC,cpmac,\ $(MODULES_DIR)/kernel/drivers/net/avalanche_cpmac/avalanche_cpmac.o \ ,CONFIG_MIPS_AVALANCHE_CPMAC,,10,avalanche_cpmac)) -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/openwrt/target/linux/aruba-2.6/Makefile b/openwrt/target/linux/aruba-2.6/Makefile index 1f68614254d..652e4b91328 100644 --- a/openwrt/target/linux/aruba-2.6/Makefile +++ b/openwrt/target/linux/aruba-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) diff --git a/openwrt/target/linux/au1000-2.6/Makefile b/openwrt/target/linux/au1000-2.6/Makefile index 39d8d4c8b02..b1ca0fee344 100644 --- a/openwrt/target/linux/au1000-2.6/Makefile +++ b/openwrt/target/linux/au1000-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/brcm-2.4/Makefile b/openwrt/target/linux/brcm-2.4/Makefile index 022f3352c5d..20a6210666a 100644 --- a/openwrt/target/linux/brcm-2.4/Makefile +++ b/openwrt/target/linux/brcm-2.4/Makefile @@ -4,8 +4,8 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ../rules.mk include ./config +include $(TOPDIR)/include/kernel.mk # broadcom specific kmod packages $(eval $(call KMOD_template,LP,lp,\ @@ -15,8 +15,7 @@ $(eval $(call KMOD_template,LP,lp,\ $(MODULES_DIR)/kernel/drivers/char/ppdev.o \ ,CONFIG_PARPORT,,50,parport parport_splink lp)) -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/openwrt/target/linux/brcm-2.6/Makefile b/openwrt/target/linux/brcm-2.6/Makefile index 1f68614254d..a3b8177c203 100644 --- a/openwrt/target/linux/brcm-2.6/Makefile +++ b/openwrt/target/linux/brcm-2.6/Makefile @@ -4,11 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/openwrt/target/linux/image/ar7/Makefile b/openwrt/target/linux/image/ar7/Makefile index 4ac6d3015ff..4b22f90df26 100644 --- a/openwrt/target/linux/image/ar7/Makefile +++ b/openwrt/target/linux/image/ar7/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk PKG_BUILD_DIR:=$(BUILD_DIR)/ar7loader diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index c8dab056a00..5091d3f40cd 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80100000 diff --git a/openwrt/target/linux/image/au1000/Makefile b/openwrt/target/linux/image/au1000/Makefile index 2607ed9eb3b..682670a22c3 100644 --- a/openwrt/target/linux/image/au1000/Makefile +++ b/openwrt/target/linux/image/au1000/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk LOADADDR = 0x8108c8f4 # RAM start + 16M KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile diff --git a/openwrt/target/linux/image/brcm/Makefile b/openwrt/target/linux/image/brcm/Makefile index df2a42ea5cc..d219dc354b3 100644 --- a/openwrt/target/linux/image/brcm/Makefile +++ b/openwrt/target/linux/image/brcm/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk define Build/Compile rm -f $(KDIR)/loader.gz diff --git a/openwrt/target/linux/image/generic/Makefile b/openwrt/target/linux/image/generic/Makefile index f87fb116dd1..b9efc95b9be 100644 --- a/openwrt/target/linux/image/generic/Makefile +++ b/openwrt/target/linux/image/generic/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk # use default targets for everything diff --git a/openwrt/target/linux/image/image.mk b/openwrt/target/linux/image/image.mk deleted file mode 100644 index 92143d64e8d..00000000000 --- a/openwrt/target/linux/image/image.mk +++ /dev/null @@ -1,55 +0,0 @@ -include $(TOPDIR)/rules.mk - -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) -ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y) -include $(TOPDIR)/target/linux/image/jffs2.mk -endif - -ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_LZMA),y) -include $(TOPDIR)/target/linux/image/squashfs.mk -endif - -ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y) -include $(TOPDIR)/target/linux/image/tgz.mk -endif -endif - -define Image/mkfs/prepare/default - find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 - find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 - find $(BUILD_DIR)/root -type d | xargs chmod 0755 - mkdir -p $(BUILD_DIR)/root/tmp - chmod 0777 $(BUILD_DIR)/root/tmp -endef - -define Image/mkfs/prepare - $(call Image/mkfs/prepare/default) -endef - -define BuildImage -compile: - $(call Build/Compile) - -install: - $(call Image/Prepare) - $(call Image/mkfs/prepare) - $(call Image/BuildKernel) - $(call Image/mkfs/jffs2) - $(call Image/mkfs/squashfs) - $(call Image/mkfs/tgz) - -clean: - $(call Build/Clean) -endef - -compile-targets: -install-targets: -clean-targets: - -source: -prepare: -compile: compile-targets -install: compile install-targets -clean: clean-targets diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk deleted file mode 100644 index a0e14daa90c..00000000000 --- a/openwrt/target/linux/image/jffs2.mk +++ /dev/null @@ -1,30 +0,0 @@ -ifneq ($(CONFIG_BIG_ENDIAN),y) -JFFS2OPTS := --pad --little-endian --squash -else -JFFS2OPTS := --pad --big-endian --squash -endif - -define Image/mkfs/jffs2 - rm -rf $(BUILD_DIR)/root/jffs - - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root - - $(call Image/Build,jffs2-64k) - $(call Image/Build,jffs2-128k) -endef - -jffs2-source: FORCE - $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 source - -$(STAGING_DIR)/bin/mkfs.jffs2: - $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 compile - -jffs2-clean: FORCE - $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 clean - rm -f $(KDIR)/root.jffs2* - -source: jffs2-source -compile-targets: $(STAGING_DIR)/bin/mkfs.jffs2 -clean-targets: jffs2-clean - diff --git a/openwrt/target/linux/image/rb532/Makefile b/openwrt/target/linux/image/rb532/Makefile index ed419c8c6d0..53adfc432f7 100644 --- a/openwrt/target/linux/image/rb532/Makefile +++ b/openwrt/target/linux/image/rb532/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80101000 diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk deleted file mode 100644 index e01766c0cab..00000000000 --- a/openwrt/target/linux/image/squashfs.mk +++ /dev/null @@ -1,25 +0,0 @@ -ifneq ($(CONFIG_BIG_ENDIAN),y) -ENDIAN := le -else -ENDIAN := be -endif - -squashfs-source: FORCE - $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs source - -$(STAGING_DIR)/bin/mksquashfs-lzma: - $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs compile - -squashfs-clean: FORCE - $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs clean - rm -f $(KDIR)/root.squashfs - -define Image/mkfs/squashfs - @mkdir -p $(BUILD_DIR)/root/jffs - $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned -$(ENDIAN) - $(call Image/Build,squashfs) -endef - -FILESYSTEMS += squashfs -compile-targets: $(STAGING_DIR)/bin/mksquashfs-lzma -clean-targets: squashfs-clean diff --git a/openwrt/target/linux/image/tgz.mk b/openwrt/target/linux/image/tgz.mk deleted file mode 100644 index 39adb692575..00000000000 --- a/openwrt/target/linux/image/tgz.mk +++ /dev/null @@ -1,3 +0,0 @@ -define Image/mkfs/tgz - tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ . -endef diff --git a/openwrt/target/linux/image/x86/Makefile b/openwrt/target/linux/image/x86/Makefile index 69f9bf470e5..d76294f1504 100644 --- a/openwrt/target/linux/image/x86/Makefile +++ b/openwrt/target/linux/image/x86/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk define Image/Build cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img diff --git a/openwrt/target/linux/image/xscale/Makefile b/openwrt/target/linux/image/xscale/Makefile index 09616d409f6..d94d7f07cab 100644 --- a/openwrt/target/linux/image/xscale/Makefile +++ b/openwrt/target/linux/image/xscale/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk define Image/Build ifneq ($(FS),jffs2-64k) diff --git a/openwrt/target/linux/rb532-2.6/Makefile b/openwrt/target/linux/rb532-2.6/Makefile index 9bb7bba71c9..4b0901987fc 100644 --- a/openwrt/target/linux/rb532-2.6/Makefile +++ b/openwrt/target/linux/rb532-2.6/Makefile @@ -4,11 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/sibyte-2.6/Makefile b/openwrt/target/linux/sibyte-2.6/Makefile index 210c195adff..4b0901987fc 100644 --- a/openwrt/target/linux/sibyte-2.6/Makefile +++ b/openwrt/target/linux/sibyte-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/x86-2.4/Makefile b/openwrt/target/linux/x86-2.4/Makefile index bcc8bd05d28..a6208dbbbb5 100644 --- a/openwrt/target/linux/x86-2.4/Makefile +++ b/openwrt/target/linux/x86-2.4/Makefile @@ -4,17 +4,14 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ../rules.mk include ./config +include $(TOPDIR)/include/kernel.mk $(eval $(call KMOD_template,WD1100,wd1100,\ $(MODULES_DIR)/kernel/drivers/char/wd1100.o \ ,CONFIG_WD1100)) - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/x86-2.6/Makefile b/openwrt/target/linux/x86-2.6/Makefile index 7b2f1b068d2..ab88d58dfb0 100644 --- a/openwrt/target/linux/x86-2.6/Makefile +++ b/openwrt/target/linux/x86-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/xscale-2.6/Makefile b/openwrt/target/linux/xscale-2.6/Makefile index 608a49408bd..a4d93efc5fb 100644 --- a/openwrt/target/linux/xscale-2.6/Makefile +++ b/openwrt/target/linux/xscale-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index fac04682852..f9fb3a54d6e 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -1,6 +1,6 @@ # Main makefile for the toolchain include $(TOPDIR)/rules.mk -TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl +TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma TARGETS-$(CONFIG_GDB) += gdb TARGETS_DOWNLOAD:=$(patsubst %,%-source,$(TARGETS-y)) @@ -17,6 +17,7 @@ binutils-prepare: uClibc-prepare gcc-prepare: binutils-install uClibc-compile: gcc-prepare gcc-compile: uClibc-install +squashfs-compile: lzma-compile TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles diff --git a/openwrt/target/linux/image/jffs2/Makefile b/openwrt/toolchain/jffs2/Makefile similarity index 100% rename from openwrt/target/linux/image/jffs2/Makefile rename to openwrt/toolchain/jffs2/Makefile diff --git a/openwrt/target/linux/image/jffs2/patches/gcc4-fix.patch b/openwrt/toolchain/jffs2/patches/100-gcc4_fix.patch similarity index 100% rename from openwrt/target/linux/image/jffs2/patches/gcc4-fix.patch rename to openwrt/toolchain/jffs2/patches/100-gcc4_fix.patch diff --git a/openwrt/target/lzma/Makefile b/openwrt/toolchain/lzma/Makefile similarity index 96% rename from openwrt/target/lzma/Makefile rename to openwrt/toolchain/lzma/Makefile index 214967a15de..cace2a4e2b3 100644 --- a/openwrt/target/lzma/Makefile +++ b/openwrt/toolchain/lzma/Makefile @@ -22,7 +22,7 @@ $(DL_DIR)/$(LZMA_SOURCE): $(LZMA_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE) @rm -rf $(LZMA_DIR) && mkdir -p $(LZMA_DIR) tar xjf $^ -C $(LZMA_DIR) - patch -d $(LZMA_DIR) -p1 < lzma-zlib.patch + $(PATCH) $(LZMA_DIR) ./patches touch $(LZMA_DIR)/.unpacked $(LZMA_ALONE_DIR)/lzma $(LZMA_LIB_DIR)/liblzma.a: $(LZMA_DIR)/.built diff --git a/openwrt/target/lzma/lzma-zlib.patch b/openwrt/toolchain/lzma/patches/100-lzma_zlib.patch similarity index 100% rename from openwrt/target/lzma/lzma-zlib.patch rename to openwrt/toolchain/lzma/patches/100-lzma_zlib.patch diff --git a/openwrt/target/linux/image/squashfs/Makefile b/openwrt/toolchain/squashfs/Makefile similarity index 100% rename from openwrt/target/linux/image/squashfs/Makefile rename to openwrt/toolchain/squashfs/Makefile diff --git a/openwrt/target/linux/image/squashfs/patches/100-lzma.patch b/openwrt/toolchain/squashfs/patches/100-lzma.patch similarity index 100% rename from openwrt/target/linux/image/squashfs/patches/100-lzma.patch rename to openwrt/toolchain/squashfs/patches/100-lzma.patch From 4ced39ac6f9b653d884b4753c92cac87f5107df5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 02:32:39 +0000 Subject: [PATCH 251/757] add INCLUDE_DIR variable for $(TOPDIR)/include SVN-Revision: 4033 --- openwrt/include/kernel-build.mk | 2 +- openwrt/include/modules-2.4.mk | 2 +- openwrt/include/modules-2.6.mk | 2 +- openwrt/package/alsa/Makefile | 4 ++-- openwrt/package/base-files/Makefile | 4 ++-- openwrt/package/bridge/Makefile | 2 +- openwrt/package/broadcom-wl/Makefile | 4 ++-- openwrt/package/busybox/Makefile | 2 +- openwrt/package/diag/Makefile | 4 ++-- openwrt/package/dnsmasq/Makefile | 2 +- openwrt/package/dropbear/Makefile | 2 +- openwrt/package/ebtables/Makefile | 2 +- openwrt/package/fuse/Makefile | 4 ++-- openwrt/package/haserl/Makefile | 2 +- openwrt/package/hostap/Makefile | 4 ++-- openwrt/package/hostapd/Makefile | 2 +- openwrt/package/iproute2/Makefile | 2 +- openwrt/package/ipsec-tools/Makefile | 2 +- openwrt/package/ipset/Makefile | 2 +- openwrt/package/iptables/Makefile | 6 +++--- openwrt/package/libpcap/Makefile | 2 +- openwrt/package/linux-atm/Makefile | 2 +- openwrt/package/madwifi/Makefile | 4 ++-- openwrt/package/mini_fo/Makefile | 4 ++-- openwrt/package/mtd/Makefile | 2 +- openwrt/package/nvram/Makefile | 2 +- openwrt/package/openssl/Makefile | 2 +- openwrt/package/openswan/Makefile | 4 ++-- openwrt/package/pcmcia-cs/Makefile | 2 +- openwrt/package/ppp/Makefile | 2 +- openwrt/package/pptp/Makefile | 2 +- openwrt/package/robocfg/Makefile | 2 +- openwrt/package/shfs/Makefile | 4 ++-- openwrt/package/spca5xx/Makefile | 4 ++-- openwrt/package/switch/Makefile | 4 ++-- openwrt/package/udev/Makefile | 2 +- openwrt/package/ueagle-atm/Makefile | 4 ++-- openwrt/package/util-linux/Makefile | 2 +- openwrt/package/wireless-tools/Makefile | 2 +- openwrt/package/wlcompat/Makefile | 4 ++-- openwrt/package/zd1211/Makefile | 4 ++-- openwrt/package/zlib/Makefile | 2 +- openwrt/rules.mk | 1 + openwrt/target/linux/ar531x-2.4/Makefile | 4 ++-- openwrt/target/linux/ar7-2.4/Makefile | 4 ++-- openwrt/target/linux/aruba-2.6/Makefile | 4 ++-- openwrt/target/linux/au1000-2.6/Makefile | 4 ++-- openwrt/target/linux/brcm-2.4/Makefile | 4 ++-- openwrt/target/linux/brcm-2.6/Makefile | 4 ++-- openwrt/target/linux/image/ar7/Makefile | 2 +- openwrt/target/linux/image/aruba/Makefile | 2 +- openwrt/target/linux/image/au1000/Makefile | 2 +- openwrt/target/linux/image/brcm/Makefile | 2 +- openwrt/target/linux/image/generic/Makefile | 2 +- openwrt/target/linux/image/rb532/Makefile | 2 +- openwrt/target/linux/image/x86/Makefile | 2 +- openwrt/target/linux/image/xscale/Makefile | 2 +- openwrt/target/linux/rb532-2.6/Makefile | 4 ++-- openwrt/target/linux/sibyte-2.6/Makefile | 4 ++-- openwrt/target/linux/x86-2.4/Makefile | 4 ++-- openwrt/target/linux/x86-2.6/Makefile | 4 ++-- openwrt/target/linux/xscale-2.6/Makefile | 4 ++-- 62 files changed, 90 insertions(+), 89 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 9fbbe4504c1..fc62127ca26 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/modules-$(KERNEL).mk +include $(INCLUDE_DIR)/modules-$(KERNEL).mk LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ diff --git a/openwrt/include/modules-2.4.mk b/openwrt/include/modules-2.4.mk index 71864ad8eb7..553db03270f 100644 --- a/openwrt/include/modules-2.4.mk +++ b/openwrt/include/modules-2.4.mk @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/netfilter.mk +include $(INCLUDE_DIR)/netfilter.mk # Networking diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index ec9f5da44f4..aada707fbcc 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -1,5 +1,5 @@ NF_2_6:=1 -include $(TOPDIR)/include/netfilter.mk +include $(INCLUDE_DIR)/netfilter.mk # Networking diff --git a/openwrt/package/alsa/Makefile b/openwrt/package/alsa/Makefile index 5f6a3305b5a..7046bfee927 100644 --- a/openwrt/package/alsa/Makefile +++ b/openwrt/package/alsa/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=alsa-driver PKG_VERSION:=1.0.11 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk ifeq ($(LINUX_KARCH),i386) KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index bb208940960..7db0d0503cf 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=base-files PKG_RELEASE:=8 @@ -12,7 +12,7 @@ ifeq ($(REV),) REV:=0 endif -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk ifneq ($(DUMP),1) TARGET:=-$(BOARD)-$(KERNEL) diff --git a/openwrt/package/bridge/Makefile b/openwrt/package/bridge/Makefile index f2b178a6101..c3e682cc7f8 100644 --- a/openwrt/package/bridge/Makefile +++ b/openwrt/package/bridge/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/bridge PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/bridge SECTION:=base diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 6fe22edb0f1..79839434527 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=broadcom-wl PKG_VERSION:=4.80.9.2 @@ -14,7 +14,7 @@ PKG_SOURCE_URL:=http://downloads.openwrt.org/sources PKG_MD5SUM:=7d9fab2c611369bbe075c3924ea77450 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-brcm-wl SECTION:=drivers diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 6b2e0c5be46..b4441291757 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/busybox SECTION:=base diff --git a/openwrt/package/diag/Makefile b/openwrt/package/diag/Makefile index ab28e7218e6..de6ab8d64f0 100644 --- a/openwrt/package/diag/Makefile +++ b/openwrt/package/diag/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-diag PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-diag SECTION:=drivers diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index a05ec0e22cb..09770dac28e 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq PKG_MD5SUM:=489198ec87101087043adc98bbe062dc PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/dnsmasq SECTION:=base diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index 0409e66dbf2..b76d3dacf27 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/ PKG_MD5SUM:=ca8e53a766faec831882831364568421 PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/dropbear SECTION:=base diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index 814ac68a223..87f93defe7a 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/ebtables PKG_MD5SUM:=f07111fcc1966be669278433c35dcc28 PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ebtables SECTION:=base diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile index b7084236df8..06777c8528a 100644 --- a/openwrt/package/fuse/Makefile +++ b/openwrt/package/fuse/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=fuse PKG_VERSION:=2.5.3 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-fuse SECTION:=drivers diff --git a/openwrt/package/haserl/Makefile b/openwrt/package/haserl/Makefile index ec940ea4376..53a28a77132 100644 --- a/openwrt/package/haserl/Makefile +++ b/openwrt/package/haserl/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/haserl PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/haserl SECTION:=base diff --git a/openwrt/package/hostap/Makefile b/openwrt/package/hostap/Makefile index 21abfe256ba..612b2b72e06 100644 --- a/openwrt/package/hostap/Makefile +++ b/openwrt/package/hostap/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=hostap-driver PKG_VERSION:=0.4.9 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-hostap SECTION:=drivers diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile index 867cda6922b..7fc77f81a3d 100644 --- a/openwrt/package/hostapd/Makefile +++ b/openwrt/package/hostapd/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/hostapd SECTION:=net diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index 9cf1eb9909e..bbbcc758c3a 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/ PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5 PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ip SECTION:=base diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 667884debea..5567036f83f 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ipsec-tools SECTION:=base diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index d245090a689..0991148566c 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://ipset.netfilter.org PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ipset SECTION:=base diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 74902774406..f1a7de1f4b0 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=iptables PKG_VERSION:=1.3.5 @@ -20,10 +20,10 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_MENU:=IPv4 / IPv6 firewall administration -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) include $(LINUX_DIR)/.config -include $(TOPDIR)/include/netfilter.mk +include $(INCLUDE_DIR)/netfilter.mk endif define Package/iptables diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile index 2d7aecf5514..0ded09a9086 100644 --- a/openwrt/package/libpcap/Makefile +++ b/openwrt/package/libpcap/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/libpcap SECTION:=base diff --git a/openwrt/package/linux-atm/Makefile b/openwrt/package/linux-atm/Makefile index 15b3f7d4daa..48a94ed046a 100644 --- a/openwrt/package/linux-atm/Makefile +++ b/openwrt/package/linux-atm/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/linux-atm SECTION:=libs diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index 7bdb7ec11aa..57210c0dd06 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=madwifi PKG_VERSION:=0.9.0 @@ -54,7 +54,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ LDOPTS="" \ DOMULTI=1 -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk ifeq ($(findstring AHB,$(BUS)),AHB) define Build/Compile/ahb diff --git a/openwrt/package/mini_fo/Makefile b/openwrt/package/mini_fo/Makefile index 0180f81c319..2922908631d 100644 --- a/openwrt/package/mini_fo/Makefile +++ b/openwrt/package/mini_fo/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mini_fo PKG_VERSION:=0.6.2pre1 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/ PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-mini-fo SECTION:=drivers diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index 01dfcd6b541..80409a90822 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -7,7 +7,7 @@ PKG_RELEASE:=4 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/mtd SECTION:=base diff --git a/openwrt/package/nvram/Makefile b/openwrt/package/nvram/Makefile index cf76c7c8122..11e89363fc4 100644 --- a/openwrt/package/nvram/Makefile +++ b/openwrt/package/nvram/Makefile @@ -7,7 +7,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/nvram SECTION:=base diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile index 39fe6b4c3d9..78e17a2195f 100644 --- a/openwrt/package/openssl/Makefile +++ b/openwrt/package/openssl/Makefile @@ -20,7 +20,7 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192 OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/libopenssl SECTION:=base diff --git a/openwrt/package/openswan/Makefile b/openwrt/package/openswan/Makefile index f81096547b9..61aefe457b4 100644 --- a/openwrt/package/openswan/Makefile +++ b/openwrt/package/openswan/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=openswan PKG_VERSION:=2.4.5 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.openswan.org/download PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-openswan SECTION:=drivers diff --git a/openwrt/package/pcmcia-cs/Makefile b/openwrt/package/pcmcia-cs/Makefile index 2c7b229781c..388b431ef02 100644 --- a/openwrt/package/pcmcia-cs/Makefile +++ b/openwrt/package/pcmcia-cs/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/pcmcia-cs SECTION:=base diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index edd9a5ea866..813b7227d27 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ppp SECTION:=net diff --git a/openwrt/package/pptp/Makefile b/openwrt/package/pptp/Makefile index 6d01ce19f34..0478b4c2b88 100644 --- a/openwrt/package/pptp/Makefile +++ b/openwrt/package/pptp/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/pptpclient PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631 PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/pptp SECTION:=base diff --git a/openwrt/package/robocfg/Makefile b/openwrt/package/robocfg/Makefile index ca0f83d3ddb..8451ac5a951 100644 --- a/openwrt/package/robocfg/Makefile +++ b/openwrt/package/robocfg/Makefile @@ -8,7 +8,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/robocfg -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/robocfg SECTION:=base diff --git a/openwrt/package/shfs/Makefile b/openwrt/package/shfs/Makefile index 057358b34d4..56176930154 100644 --- a/openwrt/package/shfs/Makefile +++ b/openwrt/package/shfs/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=shfs PKG_VERSION:=0.35 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-shfs SECTION:=drivers diff --git a/openwrt/package/spca5xx/Makefile b/openwrt/package/spca5xx/Makefile index 86233fc64a1..001a64f76d7 100644 --- a/openwrt/package/spca5xx/Makefile +++ b/openwrt/package/spca5xx/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=spca5xx PKG_VERSION:=20060301 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk #FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages define Package/kmod-spca5xx diff --git a/openwrt/package/switch/Makefile b/openwrt/package/switch/Makefile index cb5f3467480..befae3410e4 100644 --- a/openwrt/package/switch/Makefile +++ b/openwrt/package/switch/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-switch PKG_RELEASE:=1 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-switch SECTION:=drivers diff --git a/openwrt/package/udev/Makefile b/openwrt/package/udev/Makefile index 5d397161b19..01561153629 100644 --- a/openwrt/package/udev/Makefile +++ b/openwrt/package/udev/Makefile @@ -19,7 +19,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/udev SECTION:=base diff --git a/openwrt/package/ueagle-atm/Makefile b/openwrt/package/ueagle-atm/Makefile index 6d003f6c0da..6d9c739c3c5 100644 --- a/openwrt/package/ueagle-atm/Makefile +++ b/openwrt/package/ueagle-atm/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ueagle-atm PKG_VERSION:=1.0d1 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk #FIXME: add dependency on kmod-usb-core define Package/kmod-ueagle-atm diff --git a/openwrt/package/util-linux/Makefile b/openwrt/package/util-linux/Makefile index 673ade433f8..798e3c85710 100644 --- a/openwrt/package/util-linux/Makefile +++ b/openwrt/package/util-linux/Makefile @@ -16,7 +16,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/fdisk SECTION:=base diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index 368d3ebb015..5f1205884c5 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/wireless-tools SECTION:=base diff --git a/openwrt/package/wlcompat/Makefile b/openwrt/package/wlcompat/Makefile index d5feede6c95..e6ec27ee81f 100644 --- a/openwrt/package/wlcompat/Makefile +++ b/openwrt/package/wlcompat/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-wlcompat PKG_RELEASE:=3 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-wlcompat SECTION:=drivers diff --git a/openwrt/package/zd1211/Makefile b/openwrt/package/zd1211/Makefile index 1c79922cfca..ba7308cc017 100644 --- a/openwrt/package/zd1211/Makefile +++ b/openwrt/package/zd1211/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 3297 2006-03-02 23:42:52Z florian $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=zd1211 PKG_VERSION:=r69 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk #FIXME: add proper dependency handling on kmod-usb-core packages define Package/kmod-zd1211 diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index 8e497c2f28c..6c560624f0d 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/zlib SECTION:=base diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 79807e093dd..3f96d320e7b 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -46,6 +46,7 @@ TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) OPTIMIZE_FOR_CPU=$(ARCH) HOSTCC:=gcc BASE_DIR:=$(TOPDIR) +INCLUDE_DIR:=$(TOPDIR)/include DL_DIR:=$(BASE_DIR)/dl BUILD_DIR:=$(BASE_DIR)/build_$(ARCH) STAGING_DIR:=$(BASE_DIR)/staging_dir_$(ARCH) diff --git a/openwrt/target/linux/ar531x-2.4/Makefile b/openwrt/target/linux/ar531x-2.4/Makefile index 96a32848e7c..b33898754b6 100644 --- a/openwrt/target/linux/ar531x-2.4/Makefile +++ b/openwrt/target/linux/ar531x-2.4/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/ar7-2.4/Makefile b/openwrt/target/linux/ar7-2.4/Makefile index c8688da044e..02a553a1eea 100644 --- a/openwrt/target/linux/ar7-2.4/Makefile +++ b/openwrt/target/linux/ar7-2.4/Makefile @@ -5,7 +5,7 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c include ./config -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk ATM_FIRMWARE_VERSION:=0.4 ATM_FIRMWARE_DIR=sangam-atm-firmware-$(ATM_FIRMWARE_VERSION) @@ -26,7 +26,7 @@ $(eval $(call KMOD_template,CPMAC,cpmac,\ $(MODULES_DIR)/kernel/drivers/net/avalanche_cpmac/avalanche_cpmac.o \ ,CONFIG_MIPS_AVALANCHE_CPMAC,,10,avalanche_cpmac)) -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/openwrt/target/linux/aruba-2.6/Makefile b/openwrt/target/linux/aruba-2.6/Makefile index 652e4b91328..4d7955b1031 100644 --- a/openwrt/target/linux/aruba-2.6/Makefile +++ b/openwrt/target/linux/aruba-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) diff --git a/openwrt/target/linux/au1000-2.6/Makefile b/openwrt/target/linux/au1000-2.6/Makefile index b1ca0fee344..a301fabcfe1 100644 --- a/openwrt/target/linux/au1000-2.6/Makefile +++ b/openwrt/target/linux/au1000-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/brcm-2.4/Makefile b/openwrt/target/linux/brcm-2.4/Makefile index 20a6210666a..7945db91715 100644 --- a/openwrt/target/linux/brcm-2.4/Makefile +++ b/openwrt/target/linux/brcm-2.4/Makefile @@ -5,7 +5,7 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c include ./config -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk # broadcom specific kmod packages $(eval $(call KMOD_template,LP,lp,\ @@ -15,7 +15,7 @@ $(eval $(call KMOD_template,LP,lp,\ $(MODULES_DIR)/kernel/drivers/char/ppdev.o \ ,CONFIG_PARPORT,,50,parport parport_splink lp)) -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/openwrt/target/linux/brcm-2.6/Makefile b/openwrt/target/linux/brcm-2.6/Makefile index a3b8177c203..35a778fdf25 100644 --- a/openwrt/target/linux/brcm-2.6/Makefile +++ b/openwrt/target/linux/brcm-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/openwrt/target/linux/image/ar7/Makefile b/openwrt/target/linux/image/ar7/Makefile index 4b22f90df26..a98f53efb6f 100644 --- a/openwrt/target/linux/image/ar7/Makefile +++ b/openwrt/target/linux/image/ar7/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk PKG_BUILD_DIR:=$(BUILD_DIR)/ar7loader diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index 5091d3f40cd..7c735b5cdbd 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80100000 diff --git a/openwrt/target/linux/image/au1000/Makefile b/openwrt/target/linux/image/au1000/Makefile index 682670a22c3..956d6738e33 100644 --- a/openwrt/target/linux/image/au1000/Makefile +++ b/openwrt/target/linux/image/au1000/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk LOADADDR = 0x8108c8f4 # RAM start + 16M KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile diff --git a/openwrt/target/linux/image/brcm/Makefile b/openwrt/target/linux/image/brcm/Makefile index d219dc354b3..e4ccffdb652 100644 --- a/openwrt/target/linux/image/brcm/Makefile +++ b/openwrt/target/linux/image/brcm/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk define Build/Compile rm -f $(KDIR)/loader.gz diff --git a/openwrt/target/linux/image/generic/Makefile b/openwrt/target/linux/image/generic/Makefile index b9efc95b9be..a11574b3b45 100644 --- a/openwrt/target/linux/image/generic/Makefile +++ b/openwrt/target/linux/image/generic/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk # use default targets for everything diff --git a/openwrt/target/linux/image/rb532/Makefile b/openwrt/target/linux/image/rb532/Makefile index 53adfc432f7..b589f045be8 100644 --- a/openwrt/target/linux/image/rb532/Makefile +++ b/openwrt/target/linux/image/rb532/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80101000 diff --git a/openwrt/target/linux/image/x86/Makefile b/openwrt/target/linux/image/x86/Makefile index d76294f1504..94d1dade115 100644 --- a/openwrt/target/linux/image/x86/Makefile +++ b/openwrt/target/linux/image/x86/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk define Image/Build cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img diff --git a/openwrt/target/linux/image/xscale/Makefile b/openwrt/target/linux/image/xscale/Makefile index d94d7f07cab..ba203705e1b 100644 --- a/openwrt/target/linux/image/xscale/Makefile +++ b/openwrt/target/linux/image/xscale/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk define Image/Build ifneq ($(FS),jffs2-64k) diff --git a/openwrt/target/linux/rb532-2.6/Makefile b/openwrt/target/linux/rb532-2.6/Makefile index 4b0901987fc..11e34e7910b 100644 --- a/openwrt/target/linux/rb532-2.6/Makefile +++ b/openwrt/target/linux/rb532-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/sibyte-2.6/Makefile b/openwrt/target/linux/sibyte-2.6/Makefile index 4b0901987fc..11e34e7910b 100644 --- a/openwrt/target/linux/sibyte-2.6/Makefile +++ b/openwrt/target/linux/sibyte-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/x86-2.4/Makefile b/openwrt/target/linux/x86-2.4/Makefile index a6208dbbbb5..8a690afd012 100644 --- a/openwrt/target/linux/x86-2.4/Makefile +++ b/openwrt/target/linux/x86-2.4/Makefile @@ -5,13 +5,13 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c include ./config -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk $(eval $(call KMOD_template,WD1100,wd1100,\ $(MODULES_DIR)/kernel/drivers/char/wd1100.o \ ,CONFIG_WD1100)) -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/x86-2.6/Makefile b/openwrt/target/linux/x86-2.6/Makefile index ab88d58dfb0..04b13a3908c 100644 --- a/openwrt/target/linux/x86-2.6/Makefile +++ b/openwrt/target/linux/x86-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/openwrt/target/linux/xscale-2.6/Makefile b/openwrt/target/linux/xscale-2.6/Makefile index a4d93efc5fb..bd17ba76456 100644 --- a/openwrt/target/linux/xscale-2.6/Makefile +++ b/openwrt/target/linux/xscale-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches From 00dee08dd9d1bb11593f211d15f797915378de29 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 02:45:02 +0000 Subject: [PATCH 252/757] add sdk option for gen_deps.pl SVN-Revision: 4034 --- openwrt/scripts/gen_deps.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index de8572c762b..32bf1f5dfb1 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -4,8 +4,15 @@ use strict; my $name; my $src; my $makefile; +my %conf; my %pkg; my %dep; +my %options; +my $opt; + +while ($opt = shift @ARGV) { + $opt =~ /^-s/ and $options{SDK} = 1; +} my $line; while ($line = <>) { @@ -32,7 +39,12 @@ while ($line = <>) { $line=""; foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { - print "package-\$(CONFIG_PACKAGE_$name) += $pkg{$name}->{src}\n"; + if ($options{SDK}) { + $conf{$pkg{$name}->{src}} or print "package-m += $pkg{$name}->{src}\n"; + $conf{$pkg{$name}->{src}} = 1; + } else { + print "package-\$(CONFIG_PACKAGE_$name) += $pkg{$name}->{src}\n"; + } my $hasdeps = 0; my $depline = ""; From fb710194e7f8192fb6e6d9f1d4e6e9e481f03c97 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 03:01:40 +0000 Subject: [PATCH 253/757] don't generate invalid dependency lines in sdk mode SVN-Revision: 4035 --- openwrt/scripts/gen_deps.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index 32bf1f5dfb1..04998715d41 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -52,7 +52,7 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { my $idx; if (defined $pkg{$dep}->{src}) { ($pkg{$name}->{src} ne $pkg{$dep}->{src}) and $idx = $pkg{$dep}->{src}; - } elsif (defined $pkg{$dep}) { + } elsif (defined($pkg{$dep}) && !$options{SDK}) { $idx = $dep; } if ($idx) { From 6449bbd082dc0fdfa2b41efd0283d281be1e6c07 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 03:13:25 +0000 Subject: [PATCH 254/757] include $(TOPDIR)/rules.mk in the image makefiles SVN-Revision: 4036 --- openwrt/target/linux/image/ar7/Makefile | 1 + openwrt/target/linux/image/aruba/Makefile | 1 + openwrt/target/linux/image/au1000/Makefile | 1 + openwrt/target/linux/image/brcm/Makefile | 1 + openwrt/target/linux/image/generic/Makefile | 1 + openwrt/target/linux/image/rb532/Makefile | 1 + openwrt/target/linux/image/x86/Makefile | 1 + openwrt/target/linux/image/xscale/Makefile | 1 + 8 files changed, 8 insertions(+) diff --git a/openwrt/target/linux/image/ar7/Makefile b/openwrt/target/linux/image/ar7/Makefile index a98f53efb6f..5ee6b0dc103 100644 --- a/openwrt/target/linux/image/ar7/Makefile +++ b/openwrt/target/linux/image/ar7/Makefile @@ -1,3 +1,4 @@ +include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk PKG_BUILD_DIR:=$(BUILD_DIR)/ar7loader diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/linux/image/aruba/Makefile index 7c735b5cdbd..ad13ffd5417 100644 --- a/openwrt/target/linux/image/aruba/Makefile +++ b/openwrt/target/linux/image/aruba/Makefile @@ -1,3 +1,4 @@ +include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk LOADADDR = 0x81000000 # RAM start + 16M diff --git a/openwrt/target/linux/image/au1000/Makefile b/openwrt/target/linux/image/au1000/Makefile index 956d6738e33..3aaf665ca9b 100644 --- a/openwrt/target/linux/image/au1000/Makefile +++ b/openwrt/target/linux/image/au1000/Makefile @@ -1,3 +1,4 @@ +include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk LOADADDR = 0x8108c8f4 # RAM start + 16M diff --git a/openwrt/target/linux/image/brcm/Makefile b/openwrt/target/linux/image/brcm/Makefile index e4ccffdb652..30bad50f20d 100644 --- a/openwrt/target/linux/image/brcm/Makefile +++ b/openwrt/target/linux/image/brcm/Makefile @@ -1,3 +1,4 @@ +include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk define Build/Compile diff --git a/openwrt/target/linux/image/generic/Makefile b/openwrt/target/linux/image/generic/Makefile index a11574b3b45..3cb3b2e0b67 100644 --- a/openwrt/target/linux/image/generic/Makefile +++ b/openwrt/target/linux/image/generic/Makefile @@ -1,3 +1,4 @@ +include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk # use default targets for everything diff --git a/openwrt/target/linux/image/rb532/Makefile b/openwrt/target/linux/image/rb532/Makefile index b589f045be8..bba89522ac8 100644 --- a/openwrt/target/linux/image/rb532/Makefile +++ b/openwrt/target/linux/image/rb532/Makefile @@ -1,3 +1,4 @@ +include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk LOADADDR = 0x81000000 # RAM start + 16M diff --git a/openwrt/target/linux/image/x86/Makefile b/openwrt/target/linux/image/x86/Makefile index 94d1dade115..e4b3a9e4460 100644 --- a/openwrt/target/linux/image/x86/Makefile +++ b/openwrt/target/linux/image/x86/Makefile @@ -1,3 +1,4 @@ +include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk define Image/Build diff --git a/openwrt/target/linux/image/xscale/Makefile b/openwrt/target/linux/image/xscale/Makefile index ba203705e1b..683c6028f69 100644 --- a/openwrt/target/linux/image/xscale/Makefile +++ b/openwrt/target/linux/image/xscale/Makefile @@ -1,3 +1,4 @@ +include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk define Image/Build From 1f20179ce5c9774f17d843070cd39da3f2e62268 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 03:17:13 +0000 Subject: [PATCH 255/757] fix and enable the sdk SVN-Revision: 4037 --- openwrt/Config.in | 35 ++++++++++ openwrt/package/Makefile | 5 +- openwrt/target/Makefile | 10 +-- openwrt/target/linux/Config.in | 33 ---------- openwrt/target/sdk/Config.in | 8 +-- openwrt/target/sdk/Makefile | 19 +++--- openwrt/target/sdk/files/Makefile.sdk | 92 +++++++++++++++++---------- openwrt/target/sdk/files/depend.mk | 6 -- 8 files changed, 115 insertions(+), 93 deletions(-) delete mode 100644 openwrt/target/sdk/files/depend.mk diff --git a/openwrt/Config.in b/openwrt/Config.in index 740205e3ec0..74bd6484650 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -40,7 +40,42 @@ config JLEVEL help Number of jobs to run simultanesouly +source "target/sdk/Config.in" source "toolchain/Config.in" + +menu "Target Images" + config TARGET_ROOTFS_INITRAMFS + bool "ramdisk" + default n + depends LINUX_2_6 + help + Embed the rootfs into the kernel (initramfs) + + config TARGET_ROOTFS_JFFS2 + bool "jffs2" + default y + depends !TARGET_ROOTFS_INITRAMFS + help + Build a jffs2 root filesystem + + config TARGET_ROOTFS_SQUASHFS + bool "squashfs" + default y + depends !LINUX_2_6_ARUBA + depends !LINUX_2_6_XSCALE + depends !TARGET_ROOTFS_INITRAMFS + help + Build a squashfs-lzma root filesystem + + config TARGET_ROOTFS_TGZ + bool "tgz" + default y if !LINUX_2_4_BRCM && !LINUX_2_6_BRCM && !LINUX_2_6_ARUBA && !LINUX_2_4_AR531X + depends !TARGET_ROOTFS_INITRAMFS + help + Build a compressed tar archive of the the root filesystem + +endmenu + source "target/linux/Config.in" source ".config.in" diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 2b7f0db7647..e947bcfaeaa 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -27,9 +27,12 @@ $(STAMP_DIR) $(TARGET_DIR): %-clean: $(STAMP_DIR) $(TARGET_DIR) $(MAKE) -C $(patsubst %-clean,%,$@) clean MAKEFLAGS="$(BUILD_MAKEFLAGS)" +ifeq ($(SDK),1) +GENDEP_OPTS := -s +endif $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo - @$(TOPDIR)/scripts/gen_deps.pl < $< > $@ || rm -f $@ + @$(TOPDIR)/scripts/gen_deps.pl $(GENDEP_OPTS) < $< > $@ || rm -f $@ all: compile clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 9205f5b9867..0a1434472a8 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -5,16 +5,18 @@ all: install $(BIN_DIR): mkdir -p $(BIN_DIR) -TARGETS:=linux utils +TARGETS-y := linux utils +TARGETS-$(CONFIG_SDK) += sdk linux-compile: utils-install linux-install: $(BIN_DIR) +sdk-compile: linux-install -download: $(patsubst %,%-source,$(TARGETS)) +download: $(patsubst %,%-source,$(TARGETS-y)) prepare: linux-prepare compile: linux-compile -install: image_clean linux-install -clean: $(patsubst %,%-clean,$(TARGETS)) image_clean +install: image_clean $(patsubst %,%-install,$(TARGETS-y)) +clean: $(patsubst %,%-clean,$(TARGETS-y)) image_clean image_clean: FORCE rm -f $(BIN_DIR)/openwrt-* diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 23c96b76df8..71f88d7a527 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -1,36 +1,3 @@ -menu "Target Root Filesystem" - config TARGET_ROOTFS_INITRAMFS - bool "ramdisk" - default n - depends LINUX_2_6 - help - Embed the rootfs into the kernel (initramfs) - - config TARGET_ROOTFS_JFFS2 - bool "jffs2" - default y - depends !TARGET_ROOTFS_INITRAMFS - help - Build a jffs2 root filesystem - - config TARGET_ROOTFS_SQUASHFS - bool "squashfs" - default y - depends !LINUX_2_6_ARUBA - depends !LINUX_2_6_XSCALE - depends !TARGET_ROOTFS_INITRAMFS - help - Build a squashfs-lzma root filesystem - - config TARGET_ROOTFS_TGZ - bool "tgz" - default y if !LINUX_2_4_BRCM && !LINUX_2_6_BRCM && !LINUX_2_6_ARUBA && !LINUX_2_4_AR531X - depends !TARGET_ROOTFS_INITRAMFS - help - Build a compressed tar archive of the the root filesystem - -endmenu - menu "Kernel Configuration / Device Support" comment "Device specific configuration" diff --git a/openwrt/target/sdk/Config.in b/openwrt/target/sdk/Config.in index 343352ad050..538b473d001 100644 --- a/openwrt/target/sdk/Config.in +++ b/openwrt/target/sdk/Config.in @@ -1,9 +1,9 @@ -config PACKAGE_SDK - bool "OpenWrt SDK" - default y if DEVEL +config SDK + bool "Build the OpenWrt SDK" + default n help - Build an OpenWrt SDK. This is essentially a stripped-down version of the buildroot with a precompiled toolchain. It can be used to develop and test packages for OpenWrt before including them in the buildroot + diff --git a/openwrt/target/sdk/Makefile b/openwrt/target/sdk/Makefile index cfcf8c5e058..01438a6e0d7 100644 --- a/openwrt/target/sdk/Makefile +++ b/openwrt/target/sdk/Makefile @@ -1,33 +1,30 @@ # $Id$ include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk PKG_OS:=$(shell uname -s) PKG_CPU:=$(shell uname -m) -PKG_RELEASE:=1 -SDK_NAME:=OpenWrt-SDK-$(PKG_OS)-$(PKG_CPU)-$(PKG_RELEASE) - +SDK_NAME:=OpenWrt-SDK-$(BOARD)-$(KERNEL)-for-$(PKG_OS)-$(PKG_CPU) SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME) all: compile $(BIN_DIR)/$(SDK_NAME).tar.bz2: (cd $(STAGING_DIR); \ - rm -rf info man share; \ + rm -rf info man share stampfiles; \ cd usr; \ rm -rf doc info man share; \ ) rm -rf $(SDK_BUILD_DIR) - mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/examples $(SDK_BUILD_DIR)/package - $(CP) $(STAGING_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/ - $(CP) $(TOPDIR)/package/strace $(TOPDIR)/package/iproute2 $(SDK_BUILD_DIR)/examples - $(CP) $(TOPDIR)/rules.mk $(SDK_BUILD_DIR)/ + mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/package + $(CP) $(STAGING_DIR) $(INCLUDE_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/ + $(CP) $(TOPDIR)/rules.mk $(TOPDIR)/.config $(SDK_BUILD_DIR)/ + $(CP) $(TOPDIR)/package/Makefile $(SDK_BUILD_DIR)/package/ $(CP) ./files/Makefile.sdk $(SDK_BUILD_DIR)/Makefile $(CP) ./files/README.SDK $(SDK_BUILD_DIR)/ - $(CP) ./files/depend.mk $(SDK_BUILD_DIR)/package/ - $(CP) $(TOPDIR)/package/rules.mk $(SDK_BUILD_DIR)/package/ - egrep '^CONFIG_(ARCH|WGET|STAGING|JLEVEL|LARGEFILE|TARGET_OPT)' $(TOPDIR)/.config > $(SDK_BUILD_DIR)/.config + echo OPENWRTVERSION:=$(OPENWRTVERSION) > $(SDK_BUILD_DIR)/.version.mk find $(SDK_BUILD_DIR) -name .svn | xargs rm -rf find $(SDK_BUILD_DIR) -name CVS | xargs rm -rf (cd $(BUILD_DIR); \ diff --git a/openwrt/target/sdk/files/Makefile.sdk b/openwrt/target/sdk/files/Makefile.sdk index 6d5f61ad111..50723232bc1 100644 --- a/openwrt/target/sdk/files/Makefile.sdk +++ b/openwrt/target/sdk/files/Makefile.sdk @@ -1,42 +1,66 @@ -# OpenWrt SDK Makefile -TOPDIR:=${shell pwd} +# Makefile for OpenWrt +# +# Copyright (C) 2006 by Felix Fietkau <openwrt@nbd.name> +# +# 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 +# + +RELEASE:=Kamikaze +#VERSION:=2.0 # uncomment for final release + +#-------------------------------------------------------------- +# Just run 'make menuconfig', configure stuff, then run 'make'. +# You shouldn't need to mess with anything beyond this point... +#-------------------------------------------------------------- +TOPDIR=${shell pwd} export TOPDIR -DEVELOPER:=1 + +include $(TOPDIR)/.version.mk +export OPENWRTVERSION + +DEVELOPER=1 export DEVELOPER -include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/depend.mk +all: world -PACKAGES:=$(filter-out %.mk,$(shell ls $(TOPDIR)/package)) -PACKAGES_PREPARE:=$(foreach package,$(PACKAGES),$(package)-prepare) -PACKAGES_COMPILE:=$(foreach package,$(PACKAGES),$(package)-compile) -PACKAGES_CLEAN:=$(foreach package,$(PACKAGES),$(package)-clean) +.pkginfo: FORCE +ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) + @echo Collecting package info... + @-for dir in package/*/; do \ + echo Source-Makefile: $${dir}Makefile; \ + $(MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \ + done > $@ +endif -all: compile package_index -compile: $(PACKAGES_COMPILE) -clean: $(PACKAGES_CLEAN) - rm -rf $(BUILD_DIR) - rm -rf bin +pkginfo-clean: FORCE + -rm -f .pkginfo .config.in + +package/%: .pkginfo FORCE + $(MAKE) -C package $(patsubst package/%,%,$@) SDK=1 + +download: FORCE + $(MAKE) package/download + +world: FORCE + $(MAKE) package/compile + +clean: FORCE + rm -rf build_* bin distclean: clean - rm -rf $(DL_DIR) - -%-prepare: $(BUILD_DIR) - @$(MAKE) -C package/$(patsubst %-prepare,%,$@) prepare - -%-compile: %-prepare - @$(MAKE) -C package/$(patsubst %-compile,%,$@) compile - -%-clean: - @$(MAKE) -C package/$(patsubst %-clean,%,$@) clean - - -$(BUILD_DIR): - mkdir -p $@ - mkdir -p $(DL_DIR) - -package_index: - (cd $(PACKAGE_DIR); \ - $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages \ - ) + rm -rf dl .pkg* +.PHONY: FORCE +FORCE: diff --git a/openwrt/target/sdk/files/depend.mk b/openwrt/target/sdk/files/depend.mk deleted file mode 100644 index d7b844db558..00000000000 --- a/openwrt/target/sdk/files/depend.mk +++ /dev/null @@ -1,6 +0,0 @@ -# You can put your package dependencies in here -# Example (make openvpn depend on openssl): -# openvpn-compile: openssl-compile -# -# Note: This file is not present in the full buildroot. There you -# have to put your package dependencies in buildroot/package/Makefile From e248cf0f00917eb91b93a3d16c36a4aa544f575c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 06:19:43 +0000 Subject: [PATCH 256/757] massive cleanup of toolchain/ SVN-Revision: 4038 --- openwrt/include/host-build.mk | 114 ++ openwrt/include/package.mk | 13 +- openwrt/toolchain/Makefile | 11 +- openwrt/toolchain/binutils/Makefile | 116 +- .../2.15.94.0.2/100-uclibc-conf.patch | 0 .../300-001_ld_makefile_patch.patch | 0 .../300-006_better_file_error.patch | 0 .../300-012_check_ldrunpath_length.patch | 0 ...00-120_mips_xgot_multigot_workaround.patch | 0 .../702-binutils-skip-comments.patch | 0 .../2.16.1/100-uclibc-conf.patch | 0 .../2.16.1/110-uclibc-libtool-conf.patch | 0 .../2.16.1/300-001_ld_makefile_patch.patch | 0 .../2.16.1/300-006_better_file_error.patch | 0 .../300-012_check_ldrunpath_length.patch | 0 .../2.16.1/702-binutils-skip-comments.patch | 0 .../2.16.90.0.3/100-uclibc-conf.patch | 0 .../300-001_ld_makefile_patch.patch | 0 .../300-006_better_file_error.patch | 0 .../300-012_check_ldrunpath_length.patch | 0 .../702-binutils-skip-comments.patch | 0 .../2.16.91.0.1/100-uclibc-conf.patch | 0 .../300-001_ld_makefile_patch.patch | 0 .../300-006_better_file_error.patch | 0 .../300-012_check_ldrunpath_length.patch | 0 .../702-binutils-skip-comments.patch | 0 .../2.16.91.0.2/100-uclibc-conf.patch | 0 .../300-001_ld_makefile_patch.patch | 0 .../300-006_better_file_error.patch | 0 .../300-012_check_ldrunpath_length.patch | 0 .../702-binutils-skip-comments.patch | 0 .../2.16.91.0.6/100-uclibc-conf.patch | 0 .../300-001_ld_makefile_patch.patch | 0 .../300-006_better_file_error.patch | 0 .../300-012_check_ldrunpath_length.patch | 0 .../702-binutils-skip-comments.patch | 0 .../400-mips-ELF_MAXPAGESIZE-4k.patch | 0 openwrt/toolchain/gcc/Makefile | 171 ++- .../{ => patches}/3.4.4/100-uclibc-conf.patch | 0 .../3.4.4/200-uclibc-locale.patch | 0 .../3.4.4/300-libstdc++-pic.patch | 0 .../3.4.4/601-gcc34-arm-ldm.patch | 0 .../3.4.4/602-sdk-libstdc++-includes.patch | 0 .../{ => patches}/3.4.4/700-pr15068-fix.patch | 0 .../3.4.4/800-arm-bigendian.patch | 0 .../3.4.4/810-arm-bigendian-uclibc.patch | 0 .../3.4.4/830-gcc-bug-num-22167.patch | 0 .../3.4.4/arm-softfloat.patch.conditional | 0 .../{ => patches}/3.4.5/100-uclibc-conf.patch | 0 .../3.4.5/200-uclibc-locale.patch | 0 .../3.4.5/300-libstdc++-pic.patch | 0 .../3.4.5/600-gcc34-arm-ldm-peephole.patch | 0 .../3.4.5/601-gcc34-arm-ldm-peephole2.patch | 0 .../3.4.5/601-gcc34-arm-ldm.patch | 0 .../3.4.5/602-sdk-libstdc++-includes.patch | 0 .../{ => patches}/3.4.5/700-pr15068-fix.patch | 0 .../3.4.5/71_all_sh-pr16665-fix.patch | 0 .../3.4.5/72_all_sh-no-reorder-blocks.patch | 0 .../3.4.5/73_all_sh-pr20617.patch | 0 .../3.4.5/800-arm-bigendian.patch | 0 .../800-powerpc-libc_stack_end-uclibc.patch | 0 .../{ => patches}/3.4.6/100-uclibc-conf.patch | 0 .../3.4.6/200-uclibc-locale.patch | 0 .../3.4.6/300-libstdc++-pic.patch | 0 .../3.4.6/601-gcc34-arm-ldm.patch | 0 .../3.4.6/602-sdk-libstdc++-includes.patch | 0 .../{ => patches}/3.4.6/700-pr15068-fix.patch | 0 .../3.4.6/800-arm-bigendian.patch | 0 .../3.4.6/810-arm-bigendian-uclibc.patch | 0 .../3.4.6/arm-softfloat.patch.conditional | 0 .../{ => patches}/4.0.2/100-uclibc-conf.patch | 0 .../4.0.2/200-uclibc-locale.patch | 0 .../{ => patches}/4.0.3/100-uclibc-conf.patch | 0 .../4.0.3/200-uclibc-locale.patch | 0 .../4.0.3/300-libstdc++-pic.patch | 0 .../4.0.3/301-missing-execinfo_h.patch | 0 .../4.0.3/302-c99-snprintf.patch | 0 .../4.0.3/303-c99-complex-ugly-hack.patch | 0 .../4.0.3/602-sdk-libstdc++-includes.patch | 0 .../{ => patches}/4.1.0/100-uclibc-conf.patch | 0 .../{ => patches}/4.1.0/110-arm-eabi.patch | 0 .../4.1.0/200-uclibc-locale.patch | 0 .../4.1.0/300-libstdc++-pic.patch | 0 .../4.1.0/301-missing-execinfo_h.patch | 0 .../4.1.0/302-c99-snprintf.patch | 0 .../4.1.0/303-c99-complex-ugly-hack.patch | 0 .../4.1.0/602-sdk-libstdc++-includes.patch | 0 .../{ => patches}/4.1.0/740-sh-pr24836.patch | 0 .../4.1.0/800-arm-bigendian.patch | 0 .../{ => patches}/4.1.1/100-uclibc-conf.patch | 0 .../{ => patches}/4.1.1/110-arm-eabi.patch | 0 .../4.1.1/200-uclibc-locale.patch | 0 .../4.1.1/300-libstdc++-pic.patch | 0 .../4.1.1/301-missing-execinfo_h.patch | 0 .../4.1.1/302-c99-snprintf.patch | 0 .../4.1.1/303-c99-complex-ugly-hack.patch | 0 .../{ => patches}/4.1.1/304-index_macro.patch | 0 .../4.1.1/602-sdk-libstdc++-includes.patch | 0 .../{ => patches}/4.1.1/740-sh-pr24836.patch | 0 .../4.1.1/800-arm-bigendian.patch | 0 openwrt/toolchain/gdb/Makefile | 59 +- openwrt/toolchain/ipkg-utils/Makefile | 44 +- .../100-build_clean.patch} | 0 .../110-buildpackage.patch} | 0 .../120-build_tar.patch} | 0 openwrt/toolchain/jffs2/Makefile | 36 +- openwrt/toolchain/kernel-headers/Makefile | 75 +- openwrt/toolchain/kernel-headers/config.mips | 1045 ----------------- openwrt/toolchain/libnotimpl/Makefile | 42 +- .../libnotimpl/{files => src}/math.c | 0 openwrt/toolchain/lzma/Makefile | 68 +- openwrt/toolchain/sed/Makefile | 103 +- openwrt/toolchain/sed/sedcheck.sh | 5 - openwrt/toolchain/squashfs/Makefile | 36 +- openwrt/toolchain/sstrip/Makefile | 23 + .../toolchain/{utils => sstrip}/include/elf.h | 0 .../toolchain/{utils => sstrip}/src/sstrip.c | 0 openwrt/toolchain/uClibc/Makefile | 91 +- openwrt/toolchain/utils/Makefile | 27 - 119 files changed, 484 insertions(+), 1595 deletions(-) create mode 100644 openwrt/include/host-build.mk rename openwrt/toolchain/binutils/{ => patches}/2.15.94.0.2/100-uclibc-conf.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.15.94.0.2/300-001_ld_makefile_patch.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.15.94.0.2/300-006_better_file_error.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.15.94.0.2/300-012_check_ldrunpath_length.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.15.94.0.2/702-binutils-skip-comments.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.1/100-uclibc-conf.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.1/110-uclibc-libtool-conf.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.1/300-001_ld_makefile_patch.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.1/300-006_better_file_error.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.1/300-012_check_ldrunpath_length.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.1/702-binutils-skip-comments.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.90.0.3/100-uclibc-conf.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.90.0.3/300-001_ld_makefile_patch.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.90.0.3/300-006_better_file_error.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.90.0.3/300-012_check_ldrunpath_length.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.90.0.3/702-binutils-skip-comments.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.1/100-uclibc-conf.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.1/300-001_ld_makefile_patch.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.1/300-006_better_file_error.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.1/300-012_check_ldrunpath_length.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.1/702-binutils-skip-comments.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.2/100-uclibc-conf.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.2/300-001_ld_makefile_patch.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.2/300-006_better_file_error.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.2/300-012_check_ldrunpath_length.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.2/702-binutils-skip-comments.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.6/100-uclibc-conf.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.6/300-001_ld_makefile_patch.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.6/300-006_better_file_error.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.6/300-012_check_ldrunpath_length.patch (100%) rename openwrt/toolchain/binutils/{ => patches}/2.16.91.0.6/702-binutils-skip-comments.patch (100%) rename openwrt/toolchain/binutils/{all => patches}/400-mips-ELF_MAXPAGESIZE-4k.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/100-uclibc-conf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/200-uclibc-locale.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/300-libstdc++-pic.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/601-gcc34-arm-ldm.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/602-sdk-libstdc++-includes.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/700-pr15068-fix.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/800-arm-bigendian.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/810-arm-bigendian-uclibc.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/830-gcc-bug-num-22167.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.4/arm-softfloat.patch.conditional (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/100-uclibc-conf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/200-uclibc-locale.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/300-libstdc++-pic.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/600-gcc34-arm-ldm-peephole.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/601-gcc34-arm-ldm-peephole2.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/601-gcc34-arm-ldm.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/602-sdk-libstdc++-includes.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/700-pr15068-fix.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/71_all_sh-pr16665-fix.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/72_all_sh-no-reorder-blocks.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/73_all_sh-pr20617.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/800-arm-bigendian.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.5/800-powerpc-libc_stack_end-uclibc.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/100-uclibc-conf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/200-uclibc-locale.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/300-libstdc++-pic.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/601-gcc34-arm-ldm.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/602-sdk-libstdc++-includes.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/700-pr15068-fix.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/800-arm-bigendian.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/810-arm-bigendian-uclibc.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/3.4.6/arm-softfloat.patch.conditional (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.2/100-uclibc-conf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.2/200-uclibc-locale.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.3/100-uclibc-conf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.3/200-uclibc-locale.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.3/300-libstdc++-pic.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.3/301-missing-execinfo_h.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.3/302-c99-snprintf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.3/303-c99-complex-ugly-hack.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.0.3/602-sdk-libstdc++-includes.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/100-uclibc-conf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/110-arm-eabi.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/200-uclibc-locale.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/300-libstdc++-pic.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/301-missing-execinfo_h.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/302-c99-snprintf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/303-c99-complex-ugly-hack.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/602-sdk-libstdc++-includes.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/740-sh-pr24836.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.0/800-arm-bigendian.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/100-uclibc-conf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/110-arm-eabi.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/200-uclibc-locale.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/300-libstdc++-pic.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/301-missing-execinfo_h.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/302-c99-snprintf.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/303-c99-complex-ugly-hack.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/304-index_macro.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/602-sdk-libstdc++-includes.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/740-sh-pr24836.patch (100%) rename openwrt/toolchain/gcc/{ => patches}/4.1.1/800-arm-bigendian.patch (100%) rename openwrt/toolchain/ipkg-utils/{1.7/ipkg-utils-1.7-ipkg_build_clean.patch => patches/100-build_clean.patch} (100%) rename openwrt/toolchain/ipkg-utils/{1.7/ipkg-utils-1.7-ipkg_buildpackage.patch => patches/110-buildpackage.patch} (100%) rename openwrt/toolchain/ipkg-utils/{1.7/ipkg-utils-1.7-ipkg_build_tar.patch => patches/120-build_tar.patch} (100%) delete mode 100644 openwrt/toolchain/kernel-headers/config.mips rename openwrt/toolchain/libnotimpl/{files => src}/math.c (100%) create mode 100644 openwrt/toolchain/sstrip/Makefile rename openwrt/toolchain/{utils => sstrip}/include/elf.h (100%) rename openwrt/toolchain/{utils => sstrip}/src/sstrip.c (100%) delete mode 100644 openwrt/toolchain/utils/Makefile diff --git a/openwrt/include/host-build.mk b/openwrt/include/host-build.mk new file mode 100644 index 00000000000..0d103e2a02b --- /dev/null +++ b/openwrt/include/host-build.mk @@ -0,0 +1,114 @@ +ifneq ($(strip $(PKG_CAT)),) + ifeq ($(PKG_CAT),unzip) + UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) + else + UNPACK=$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - + endif + define Build/Prepare/Default + $(UNPACK) + @if [ -d ./patches ]; then \ + $(PATCH) $(PKG_BUILD_DIR) ./patches; \ + fi + endef +endif + +define Build/Prepare + $(call Build/Prepare/Default) +endef + +define Build/Configure/Default + @(cd $(PKG_BUILD_DIR)/$(3); \ + [ -x configure ] && \ + $(2) \ + CPPFLAGS="-I$(STAGING_DIR)/host/include" \ + LDFLAGS="-L$(STAGING_DIR)/host/lib" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(1); \ + true; \ + ) +endef + +define Build/Configure + $(call Build/Configure/Default) +endef + +define Build/Compile/Default + $(MAKE) -C $(PKG_BUILD_DIR) $(1) +endef + +define Build/Compile + $(call Build/Compile/Default) +endef + + +ifneq ($(strip $(PKG_SOURCE)),) + source: $(DL_DIR)/$(PKG_SOURCE) + + $(DL_DIR)/$(PKG_SOURCE): + mkdir -p $(DL_DIR) + $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) + + $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) +endif + +define HostBuild + $(PKG_BUILD_DIR)/.prepared: + @-rm -rf $(PKG_BUILD_DIR) + @mkdir -p $(PKG_BUILD_DIR) + $(call Build/Prepare) + touch $$@ + + $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared + $(call Build/Configure) + touch $$@ + + $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured + $(call Build/Compile) + touch $$@ + + $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built + $(call Build/Install) + touch $$@ + + ifdef Build/Install + install-targets: $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed + endif + + package-clean: FORCE + $(call Build/Clean) + $(call Build/Uninstall) + rm -f $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed + + source: + prepare: $(PKG_BUILD_DIR)/.prepared + configure: $(PKG_BUILD_DIR)/.configured + + compile-targets: $(PKG_BUILD_DIR)/.built + compile: compile-targets + + install-targets: + install: install-targets + + clean-targets: + clean: FORCE + @$(MAKE) clean-targets + $(call Build/Clean) + rm -rf $(PKG_BUILD_DIR) + +endef diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 82298b02498..9b863074f91 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -201,14 +201,15 @@ define BuildPackage endef ifneq ($(strip $(PKG_CAT)),) + ifeq ($(PKG_CAT),unzip) + UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) + else + UNPACK=$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - + endif define Build/Prepare/Default - @if [ "$(PKG_CAT)" = "unzip" ]; then \ - unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \ - else \ - $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - ; \ - fi + $(UNPACK) @if [ -d ./patches ]; then \ - $(PATCH) $(PKG_BUILD_DIR) ./patches ; \ + $(PATCH) $(PKG_BUILD_DIR) ./patches; \ fi endef endif diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index f9fb3a54d6e..6481ed0d101 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -1,6 +1,6 @@ # Main makefile for the toolchain include $(TOPDIR)/rules.mk -TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma +TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma TARGETS-$(CONFIG_GDB) += gdb TARGETS_DOWNLOAD:=$(patsubst %,%-source,$(TARGETS-y)) @@ -12,12 +12,13 @@ download: $(TARGETS_DOWNLOAD) install: $(TARGETS_INSTALL) clean: $(TARGETS_CLEAN) -uClibc-prepare: kernel-headers-prepare sed-install utils-install +kernel-headers-prepare: sed-install +uClibc-prepare: kernel-headers-prepare sstrip-install binutils-prepare: uClibc-prepare gcc-prepare: binutils-install -uClibc-compile: gcc-prepare -gcc-compile: uClibc-install -squashfs-compile: lzma-compile +uClibc-compile: gcc-compile +gcc-install: uClibc-install +squashfs-compile: lzma-install TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles diff --git a/openwrt/toolchain/binutils/Makefile b/openwrt/toolchain/binutils/Makefile index c161370e99a..6d4f96f9143 100644 --- a/openwrt/toolchain/binutils/Makefile +++ b/openwrt/toolchain/binutils/Makefile @@ -1,105 +1,59 @@ include $(TOPDIR)/rules.mk -############################################################# -# -# build binutils for use on the host system -# -############################################################# -BINUTILS_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#")) +PKG_NAME:=binutils +PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#")) -BINUTILS_SITE:=http://www.fr.kernel.org/pub/linux/devel/binutils \ - http://www.fi.kernel.org/pub/linux/devel/binutils \ - http://ftp.kernel.org/pub/linux/devel/binutils \ - http://www.de.kernel.org/pub/linux/devel/binutils - -BINUTILS_STABLE_SITE:=http://ftp.gnu.org/gnu/binutils/ \ +STABLE_SITE:=http://ftp.gnu.org/gnu/binutils/ \ ftp://gatekeeper.dec.com/pub/GNU/ \ ftp://ftp.uu.net/archive/systems/gnu/ \ ftp://ftp.eu.uu.net/pub/gnu/ \ ftp://ftp.funet.fi/pub/gnu/prep/ \ ftp://ftp.leo.org/pub/comp/os/unix/gnu/ +DEVEL_SITE:=http://www.fr.kernel.org/pub/linux/devel/binutils \ + http://www.fi.kernel.org/pub/linux/devel/binutils \ + http://ftp.kernel.org/pub/linux/devel/binutils \ + http://www.de.kernel.org/pub/linux/devel/binutils + ifeq ($(BINUTILS_VERSION),2.16.1) -BINUTILS_SITE:=$(BINUTILS_STABLE_SITE) +PKG_SOURCE_URL:=$(STABLE_SITE) +else +PKG_SOURCE_URL:=$(DEVEL_SITE) endif -BINUTILS_SOURCE:=binutils-$(BINUTILS_VERSION).tar.bz2 -BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION) -BINUTILS_CAT:=bzcat +PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=unknown +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_CAT:=bzcat -BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION)-build +include $(INCLUDE_DIR)/host-build.mk -$(DL_DIR)/$(BINUTILS_SOURCE): - mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(BINUTILS_SOURCE) x $(BINUTILS_SITE) -$(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - $(BINUTILS_CAT) $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - - touch $(BINUTILS_DIR)/.unpacked +define Build/Prepare + $(call Build/Prepare/Default) + if [ -d ./patches/$(PKG_VERSION) ]; then \ + $(SCRIPT_DIR)/patch-kernel.sh $(PKG_BUILD_DIR) ./patches/$(PKG_VERSION); \ + fi +endef -$(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked - # Apply appropriate binutils patches. - $(SCRIPT_DIR)/patch-kernel.sh $(BINUTILS_DIR) ./all \*.patch - $(SCRIPT_DIR)/patch-kernel.sh $(BINUTILS_DIR) ./$(BINUTILS_VERSION) \*.patch - touch $(BINUTILS_DIR)/.patched - -$(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched - mkdir -p $(BINUTILS_DIR1) - (cd $(BINUTILS_DIR1); \ - $(BINUTILS_DIR)/configure \ +define Build/Configure + (cd $(PKG_BUILD_DIR); \ + ./configure \ --prefix=$(STAGING_DIR) \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ --target=$(REAL_GNU_TARGET_NAME) \ --disable-werror \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) ); - touch $(BINUTILS_DIR1)/.configured + --disable-nls \ + ); +endef -$(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured - $(MAKE) -C $(BINUTILS_DIR1) -j $(CONFIG_JLEVEL) all - -# Make install will put gettext data in staging_dir/share/locale. -# Unfortunatey, it isn't configureable. -$(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-ld: $(BINUTILS_DIR1)/binutils/objdump - $(MAKE) -C $(BINUTILS_DIR1) -j $(CONFIG_JLEVEL) install - - -############################################################# -# -# build binutils for use on the target system -# -############################################################# -BINUTILS_DIR2:=$(BUILD_DIR)/binutils-$(BINUTILS_VERSION)-target -$(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched - mkdir -p $(BINUTILS_DIR2) - (cd $(BINUTILS_DIR2); \ - PATH=$(TARGET_PATH) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CFLAGS_FOR_BUILD="-O2 -g" \ - $(BINUTILS_DIR)/configure \ - --prefix=/usr \ - --exec-prefix=/usr \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) ); - touch $(BINUTILS_DIR2)/.configured - -$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured - PATH=$(TARGET_PATH) \ - $(MAKE) -C $(BINUTILS_DIR2) -j $(CONFIG_JLEVEL) all - -source: $(DL_DIR)/$(BINUTILS_SOURCE) -prepare: $(BINUTILS_DIR)/.patched -compile: $(BINUTILS_DIR1)/binutils/objdump -install: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-ld -clean: FORCE - rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - rm -rf $(BINUTILS_DIR) $(BINUTILS_DIR1) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) -j $(CONFIG_JLEVEL) all +endef +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR) -j $(CONFIG_JLEVEL) install +endef +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/binutils/2.15.94.0.2/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/binutils/2.15.94.0.2/100-uclibc-conf.patch rename to openwrt/toolchain/binutils/patches/2.15.94.0.2/100-uclibc-conf.patch diff --git a/openwrt/toolchain/binutils/2.15.94.0.2/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-001_ld_makefile_patch.patch similarity index 100% rename from openwrt/toolchain/binutils/2.15.94.0.2/300-001_ld_makefile_patch.patch rename to openwrt/toolchain/binutils/patches/2.15.94.0.2/300-001_ld_makefile_patch.patch diff --git a/openwrt/toolchain/binutils/2.15.94.0.2/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-006_better_file_error.patch similarity index 100% rename from openwrt/toolchain/binutils/2.15.94.0.2/300-006_better_file_error.patch rename to openwrt/toolchain/binutils/patches/2.15.94.0.2/300-006_better_file_error.patch diff --git a/openwrt/toolchain/binutils/2.15.94.0.2/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-012_check_ldrunpath_length.patch similarity index 100% rename from openwrt/toolchain/binutils/2.15.94.0.2/300-012_check_ldrunpath_length.patch rename to openwrt/toolchain/binutils/patches/2.15.94.0.2/300-012_check_ldrunpath_length.patch diff --git a/openwrt/toolchain/binutils/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch similarity index 100% rename from openwrt/toolchain/binutils/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch rename to openwrt/toolchain/binutils/patches/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch diff --git a/openwrt/toolchain/binutils/2.15.94.0.2/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/702-binutils-skip-comments.patch similarity index 100% rename from openwrt/toolchain/binutils/2.15.94.0.2/702-binutils-skip-comments.patch rename to openwrt/toolchain/binutils/patches/2.15.94.0.2/702-binutils-skip-comments.patch diff --git a/openwrt/toolchain/binutils/2.16.1/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.1/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.1/100-uclibc-conf.patch rename to openwrt/toolchain/binutils/patches/2.16.1/100-uclibc-conf.patch diff --git a/openwrt/toolchain/binutils/2.16.1/110-uclibc-libtool-conf.patch b/openwrt/toolchain/binutils/patches/2.16.1/110-uclibc-libtool-conf.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.1/110-uclibc-libtool-conf.patch rename to openwrt/toolchain/binutils/patches/2.16.1/110-uclibc-libtool-conf.patch diff --git a/openwrt/toolchain/binutils/2.16.1/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.16.1/300-001_ld_makefile_patch.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.1/300-001_ld_makefile_patch.patch rename to openwrt/toolchain/binutils/patches/2.16.1/300-001_ld_makefile_patch.patch diff --git a/openwrt/toolchain/binutils/2.16.1/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.1/300-006_better_file_error.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.1/300-006_better_file_error.patch rename to openwrt/toolchain/binutils/patches/2.16.1/300-006_better_file_error.patch diff --git a/openwrt/toolchain/binutils/2.16.1/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.1/300-012_check_ldrunpath_length.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.1/300-012_check_ldrunpath_length.patch rename to openwrt/toolchain/binutils/patches/2.16.1/300-012_check_ldrunpath_length.patch diff --git a/openwrt/toolchain/binutils/2.16.1/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.16.1/702-binutils-skip-comments.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.1/702-binutils-skip-comments.patch rename to openwrt/toolchain/binutils/patches/2.16.1/702-binutils-skip-comments.patch diff --git a/openwrt/toolchain/binutils/2.16.90.0.3/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.90.0.3/100-uclibc-conf.patch rename to openwrt/toolchain/binutils/patches/2.16.90.0.3/100-uclibc-conf.patch diff --git a/openwrt/toolchain/binutils/2.16.90.0.3/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-001_ld_makefile_patch.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.90.0.3/300-001_ld_makefile_patch.patch rename to openwrt/toolchain/binutils/patches/2.16.90.0.3/300-001_ld_makefile_patch.patch diff --git a/openwrt/toolchain/binutils/2.16.90.0.3/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-006_better_file_error.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.90.0.3/300-006_better_file_error.patch rename to openwrt/toolchain/binutils/patches/2.16.90.0.3/300-006_better_file_error.patch diff --git a/openwrt/toolchain/binutils/2.16.90.0.3/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-012_check_ldrunpath_length.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.90.0.3/300-012_check_ldrunpath_length.patch rename to openwrt/toolchain/binutils/patches/2.16.90.0.3/300-012_check_ldrunpath_length.patch diff --git a/openwrt/toolchain/binutils/2.16.90.0.3/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/702-binutils-skip-comments.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.90.0.3/702-binutils-skip-comments.patch rename to openwrt/toolchain/binutils/patches/2.16.90.0.3/702-binutils-skip-comments.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.1/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.1/100-uclibc-conf.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.1/100-uclibc-conf.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.1/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-001_ld_makefile_patch.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.1/300-001_ld_makefile_patch.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.1/300-001_ld_makefile_patch.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.1/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-006_better_file_error.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.1/300-006_better_file_error.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.1/300-006_better_file_error.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.1/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-012_check_ldrunpath_length.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.1/300-012_check_ldrunpath_length.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.1/300-012_check_ldrunpath_length.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.1/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/702-binutils-skip-comments.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.1/702-binutils-skip-comments.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.1/702-binutils-skip-comments.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.2/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.2/100-uclibc-conf.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.2/100-uclibc-conf.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.2/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-001_ld_makefile_patch.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.2/300-001_ld_makefile_patch.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.2/300-001_ld_makefile_patch.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.2/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-006_better_file_error.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.2/300-006_better_file_error.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.2/300-006_better_file_error.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.2/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-012_check_ldrunpath_length.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.2/300-012_check_ldrunpath_length.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.2/300-012_check_ldrunpath_length.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.2/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/702-binutils-skip-comments.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.2/702-binutils-skip-comments.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.2/702-binutils-skip-comments.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.6/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.6/100-uclibc-conf.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.6/100-uclibc-conf.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.6/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-001_ld_makefile_patch.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.6/300-001_ld_makefile_patch.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.6/300-001_ld_makefile_patch.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.6/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-006_better_file_error.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.6/300-006_better_file_error.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.6/300-006_better_file_error.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.6/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-012_check_ldrunpath_length.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.6/300-012_check_ldrunpath_length.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.6/300-012_check_ldrunpath_length.patch diff --git a/openwrt/toolchain/binutils/2.16.91.0.6/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/702-binutils-skip-comments.patch similarity index 100% rename from openwrt/toolchain/binutils/2.16.91.0.6/702-binutils-skip-comments.patch rename to openwrt/toolchain/binutils/patches/2.16.91.0.6/702-binutils-skip-comments.patch diff --git a/openwrt/toolchain/binutils/all/400-mips-ELF_MAXPAGESIZE-4k.patch b/openwrt/toolchain/binutils/patches/400-mips-ELF_MAXPAGESIZE-4k.patch similarity index 100% rename from openwrt/toolchain/binutils/all/400-mips-ELF_MAXPAGESIZE-4k.patch rename to openwrt/toolchain/binutils/patches/400-mips-ELF_MAXPAGESIZE-4k.patch diff --git a/openwrt/toolchain/gcc/Makefile b/openwrt/toolchain/gcc/Makefile index e76b60b0bac..a13ab2ebf76 100644 --- a/openwrt/toolchain/gcc/Makefile +++ b/openwrt/toolchain/gcc/Makefile @@ -2,7 +2,7 @@ # # Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org> # Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org> -# Copyright (C) 2005 Felix Fietkau <openwrt@nbd.name> +# Copyright (C) 2005-2006 Felix Fietkau <nbd@openwrt.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 @@ -20,68 +20,36 @@ include $(TOPDIR)/rules.mk -GCC_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION)))#")) +PKG_NAME:=gcc +PKG_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION)))#")) -#GCC_SITE:=ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(GCC_VERSION) -GCC_SITE:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(GCC_VERSION) \ - http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(GCC_VERSION) +PKG_SOURCE:=gcc-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=unknown +PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \ + http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \ + ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION) +PKG_CAT:=bzcat -GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2 -GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION) -GCC_CAT:=bzcat +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/gcc-$(PKG_VERSION) -############################################################# -# -# Setup some initial stuff -# -############################################################# - -ifeq ($(CONFIG_INSTALL_LIBGCJ),y) -TARGET_LANGUAGES:=c,c++,java -else -ifeq ($(CONFIG_INSTALL_LIBSTDCPP),y) -TARGET_LANGUAGES:=c,c++ -else TARGET_LANGUAGES:=c +ifeq ($(CONFIG_INSTALL_LIBSTDCPP),y) +TARGET_LANGUAGES:=$(TARGET_LANGUAGES),c++ endif +ifeq ($(CONFIG_INSTALL_LIBGCJ),y) +TARGET_LANGUAGES:=$(TARGET_LANGUAGES),java endif -############################################################# -# -# build the first pass gcc compiler -# -############################################################# +include $(INCLUDE_DIR)/host-build.mk -GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-initial +BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-$(PKG_VERSION)-initial +BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-$(PKG_VERSION)-final -$(DL_DIR)/$(GCC_SOURCE): - mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(GCC_SOURCE) x $(GCC_SITE) -$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - $(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - - touch $(GCC_DIR)/.unpacked - -$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked - # Apply any files named gcc-*.patch from the source directory to gcc - $(SCRIPT_DIR)/patch-kernel.sh $(GCC_DIR) ./$(GCC_VERSION) \*.patch - # Note: The soft float situation has improved considerably with gcc 3.4.x. - # We can dispense with the custom spec files, as well as libfloat for the arm case. - # However, we still need a patch for arm. There's a similar patch for gcc 3.3.x - # which needs to be integrated so we can kill of libfloat for good. - $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(GCC_DIR)/gcc/version.c - $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(GCC_DIR)/gcc/version.c - touch $(GCC_DIR)/.patched - -# The --without-headers option stopped working with gcc 3.0 and has never been -# # fixed, so we need to actually have working C library header files prior to -# # the step or libgcc will not build... - -$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched - mkdir -p $(GCC_BUILD_DIR1) - (cd $(GCC_BUILD_DIR1); rm -f config.cache; PATH=$(TARGET_PATH) \ - $(GCC_DIR)/configure \ +define Stage1/Configure + mkdir -p $(BUILD_DIR1) + (cd $(BUILD_DIR1); rm -f config.cache; PATH=$(TARGET_PATH) \ + $(PKG_BUILD_DIR)/configure \ --prefix=$(STAGING_DIR) \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ @@ -92,41 +60,25 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched --disable-__cxa_atexit \ --enable-target-optspace \ --with-gnu-ld \ - $(DISABLE_NLS) \ - $(MULTILIB) \ + --disable-nls \ ); - touch $(GCC_BUILD_DIR1)/.configured +endef +define Stage1/Compile + PATH=$(TARGET_PATH) $(MAKE) -C $(BUILD_DIR1) all-gcc +endef +define Stage1/Install + PATH=$(TARGET_PATH) $(MAKE) -C $(BUILD_DIR1) install-gcc +endef -$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc - touch $(GCC_BUILD_DIR1)/.compiled - -$(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) install-gcc - -############################################################# -# -# second pass compiler build. Build the compiler targeting -# the newly built shared uClibc library. -# -############################################################# -# -# Sigh... I had to rework things because using --with-gxx-include-dir -# causes issues with include dir search order for g++. This seems to -# have something to do with "path translations" and possibly doesn't -# affect gcc-target. However, I haven't tested gcc-target yet so no -# guarantees. mjn3 - -GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-final -$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/lib/libc.a - mkdir -p $(GCC_BUILD_DIR2) +define Stage2/Configure + mkdir -p $(BUILD_DIR2) # Important! Required for limits.h to be fixed. rm -rf $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include ln -sf ../include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include rm -rf $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib - (cd $(GCC_BUILD_DIR2); rm -f config.cache; PATH=$(TARGET_PATH) \ - $(GCC_DIR)/configure \ + (cd $(BUILD_DIR2); rm -f config.cache; PATH=$(TARGET_PATH) \ + $(PKG_BUILD_DIR)/configure \ --prefix=$(STAGING_DIR) \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ @@ -136,18 +88,15 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/lib/libc.a --disable-__cxa_atexit \ --enable-target-optspace \ --with-gnu-ld \ - $(DISABLE_NLS) \ - $(MULTILIB) \ + --disable-nls \ ); - touch $(GCC_BUILD_DIR2)/.configured - -$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) all - touch $(GCC_BUILD_DIR2)/.compiled - -gcc-install: $(GCC_BUILD_DIR2)/.compiled FORCE - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install - echo $(GCC_VERSION) > $(STAGING_DIR)/gcc_version +endef +define Stage2/Compile + PATH=$(TARGET_PATH) $(MAKE) -C $(BUILD_DIR2) all +endef +define Stage2/Install + PATH=$(TARGET_PATH) $(MAKE) -C $(BUILD_DIR2) install + echo $(PKG_VERSION) > $(STAGING_DIR)/gcc_version # Set up the symlinks to enable lying about target name. set -e; \ (cd $(STAGING_DIR); \ @@ -158,14 +107,36 @@ gcc-install: $(GCC_BUILD_DIR2)/.compiled FORCE $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ done; \ ); +endef -source: $(DL_DIR)/$(GCC_SOURCE) -prepare: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc -compile: gcc-install -install: -clean: gcc-clean - rm -rf $(GCC_DIR) - rm -rf $(GCC_BUILD_DIR1) - rm -rf $(GCC_BUILD_DIR2) +define Build/Prepare + $(call Build/Prepare/Default) + $(SCRIPT_DIR)/patch-kernel.sh $(PKG_BUILD_DIR) ./patches/$(PKG_VERSION) \*.patch + $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c + $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(PKG_BUILD_DIR)/gcc/version.c +endef + +define Build/Configure + $(call Stage1/Configure) +endef + +define Build/Compile + $(call Stage1/Compile) + $(call Stage1/Install) +endef + +define Build/Install + $(call Stage2/Configure) + $(call Stage2/Compile) + $(call Stage2/Install) +endef + +define Build/Clean + rm -rf $(PKG_BUILD_DIR) + rm -rf $(BUILD_DIR1) + rm -rf $(BUILD_DIR2) rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gc* rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c* +endef + +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/gcc/3.4.4/100-uclibc-conf.patch b/openwrt/toolchain/gcc/patches/3.4.4/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/100-uclibc-conf.patch rename to openwrt/toolchain/gcc/patches/3.4.4/100-uclibc-conf.patch diff --git a/openwrt/toolchain/gcc/3.4.4/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/3.4.4/200-uclibc-locale.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/200-uclibc-locale.patch rename to openwrt/toolchain/gcc/patches/3.4.4/200-uclibc-locale.patch diff --git a/openwrt/toolchain/gcc/3.4.4/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/patches/3.4.4/300-libstdc++-pic.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/300-libstdc++-pic.patch rename to openwrt/toolchain/gcc/patches/3.4.4/300-libstdc++-pic.patch diff --git a/openwrt/toolchain/gcc/3.4.4/601-gcc34-arm-ldm.patch b/openwrt/toolchain/gcc/patches/3.4.4/601-gcc34-arm-ldm.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/601-gcc34-arm-ldm.patch rename to openwrt/toolchain/gcc/patches/3.4.4/601-gcc34-arm-ldm.patch diff --git a/openwrt/toolchain/gcc/3.4.4/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/patches/3.4.4/602-sdk-libstdc++-includes.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/602-sdk-libstdc++-includes.patch rename to openwrt/toolchain/gcc/patches/3.4.4/602-sdk-libstdc++-includes.patch diff --git a/openwrt/toolchain/gcc/3.4.4/700-pr15068-fix.patch b/openwrt/toolchain/gcc/patches/3.4.4/700-pr15068-fix.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/700-pr15068-fix.patch rename to openwrt/toolchain/gcc/patches/3.4.4/700-pr15068-fix.patch diff --git a/openwrt/toolchain/gcc/3.4.4/800-arm-bigendian.patch b/openwrt/toolchain/gcc/patches/3.4.4/800-arm-bigendian.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/800-arm-bigendian.patch rename to openwrt/toolchain/gcc/patches/3.4.4/800-arm-bigendian.patch diff --git a/openwrt/toolchain/gcc/3.4.4/810-arm-bigendian-uclibc.patch b/openwrt/toolchain/gcc/patches/3.4.4/810-arm-bigendian-uclibc.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/810-arm-bigendian-uclibc.patch rename to openwrt/toolchain/gcc/patches/3.4.4/810-arm-bigendian-uclibc.patch diff --git a/openwrt/toolchain/gcc/3.4.4/830-gcc-bug-num-22167.patch b/openwrt/toolchain/gcc/patches/3.4.4/830-gcc-bug-num-22167.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/830-gcc-bug-num-22167.patch rename to openwrt/toolchain/gcc/patches/3.4.4/830-gcc-bug-num-22167.patch diff --git a/openwrt/toolchain/gcc/3.4.4/arm-softfloat.patch.conditional b/openwrt/toolchain/gcc/patches/3.4.4/arm-softfloat.patch.conditional similarity index 100% rename from openwrt/toolchain/gcc/3.4.4/arm-softfloat.patch.conditional rename to openwrt/toolchain/gcc/patches/3.4.4/arm-softfloat.patch.conditional diff --git a/openwrt/toolchain/gcc/3.4.5/100-uclibc-conf.patch b/openwrt/toolchain/gcc/patches/3.4.5/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/100-uclibc-conf.patch rename to openwrt/toolchain/gcc/patches/3.4.5/100-uclibc-conf.patch diff --git a/openwrt/toolchain/gcc/3.4.5/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/3.4.5/200-uclibc-locale.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/200-uclibc-locale.patch rename to openwrt/toolchain/gcc/patches/3.4.5/200-uclibc-locale.patch diff --git a/openwrt/toolchain/gcc/3.4.5/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/patches/3.4.5/300-libstdc++-pic.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/300-libstdc++-pic.patch rename to openwrt/toolchain/gcc/patches/3.4.5/300-libstdc++-pic.patch diff --git a/openwrt/toolchain/gcc/3.4.5/600-gcc34-arm-ldm-peephole.patch b/openwrt/toolchain/gcc/patches/3.4.5/600-gcc34-arm-ldm-peephole.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/600-gcc34-arm-ldm-peephole.patch rename to openwrt/toolchain/gcc/patches/3.4.5/600-gcc34-arm-ldm-peephole.patch diff --git a/openwrt/toolchain/gcc/3.4.5/601-gcc34-arm-ldm-peephole2.patch b/openwrt/toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/601-gcc34-arm-ldm-peephole2.patch rename to openwrt/toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch diff --git a/openwrt/toolchain/gcc/3.4.5/601-gcc34-arm-ldm.patch b/openwrt/toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/601-gcc34-arm-ldm.patch rename to openwrt/toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm.patch diff --git a/openwrt/toolchain/gcc/3.4.5/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/patches/3.4.5/602-sdk-libstdc++-includes.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/602-sdk-libstdc++-includes.patch rename to openwrt/toolchain/gcc/patches/3.4.5/602-sdk-libstdc++-includes.patch diff --git a/openwrt/toolchain/gcc/3.4.5/700-pr15068-fix.patch b/openwrt/toolchain/gcc/patches/3.4.5/700-pr15068-fix.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/700-pr15068-fix.patch rename to openwrt/toolchain/gcc/patches/3.4.5/700-pr15068-fix.patch diff --git a/openwrt/toolchain/gcc/3.4.5/71_all_sh-pr16665-fix.patch b/openwrt/toolchain/gcc/patches/3.4.5/71_all_sh-pr16665-fix.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/71_all_sh-pr16665-fix.patch rename to openwrt/toolchain/gcc/patches/3.4.5/71_all_sh-pr16665-fix.patch diff --git a/openwrt/toolchain/gcc/3.4.5/72_all_sh-no-reorder-blocks.patch b/openwrt/toolchain/gcc/patches/3.4.5/72_all_sh-no-reorder-blocks.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/72_all_sh-no-reorder-blocks.patch rename to openwrt/toolchain/gcc/patches/3.4.5/72_all_sh-no-reorder-blocks.patch diff --git a/openwrt/toolchain/gcc/3.4.5/73_all_sh-pr20617.patch b/openwrt/toolchain/gcc/patches/3.4.5/73_all_sh-pr20617.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/73_all_sh-pr20617.patch rename to openwrt/toolchain/gcc/patches/3.4.5/73_all_sh-pr20617.patch diff --git a/openwrt/toolchain/gcc/3.4.5/800-arm-bigendian.patch b/openwrt/toolchain/gcc/patches/3.4.5/800-arm-bigendian.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/800-arm-bigendian.patch rename to openwrt/toolchain/gcc/patches/3.4.5/800-arm-bigendian.patch diff --git a/openwrt/toolchain/gcc/3.4.5/800-powerpc-libc_stack_end-uclibc.patch b/openwrt/toolchain/gcc/patches/3.4.5/800-powerpc-libc_stack_end-uclibc.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.5/800-powerpc-libc_stack_end-uclibc.patch rename to openwrt/toolchain/gcc/patches/3.4.5/800-powerpc-libc_stack_end-uclibc.patch diff --git a/openwrt/toolchain/gcc/3.4.6/100-uclibc-conf.patch b/openwrt/toolchain/gcc/patches/3.4.6/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/100-uclibc-conf.patch rename to openwrt/toolchain/gcc/patches/3.4.6/100-uclibc-conf.patch diff --git a/openwrt/toolchain/gcc/3.4.6/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/3.4.6/200-uclibc-locale.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/200-uclibc-locale.patch rename to openwrt/toolchain/gcc/patches/3.4.6/200-uclibc-locale.patch diff --git a/openwrt/toolchain/gcc/3.4.6/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/patches/3.4.6/300-libstdc++-pic.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/300-libstdc++-pic.patch rename to openwrt/toolchain/gcc/patches/3.4.6/300-libstdc++-pic.patch diff --git a/openwrt/toolchain/gcc/3.4.6/601-gcc34-arm-ldm.patch b/openwrt/toolchain/gcc/patches/3.4.6/601-gcc34-arm-ldm.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/601-gcc34-arm-ldm.patch rename to openwrt/toolchain/gcc/patches/3.4.6/601-gcc34-arm-ldm.patch diff --git a/openwrt/toolchain/gcc/3.4.6/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/patches/3.4.6/602-sdk-libstdc++-includes.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/602-sdk-libstdc++-includes.patch rename to openwrt/toolchain/gcc/patches/3.4.6/602-sdk-libstdc++-includes.patch diff --git a/openwrt/toolchain/gcc/3.4.6/700-pr15068-fix.patch b/openwrt/toolchain/gcc/patches/3.4.6/700-pr15068-fix.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/700-pr15068-fix.patch rename to openwrt/toolchain/gcc/patches/3.4.6/700-pr15068-fix.patch diff --git a/openwrt/toolchain/gcc/3.4.6/800-arm-bigendian.patch b/openwrt/toolchain/gcc/patches/3.4.6/800-arm-bigendian.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/800-arm-bigendian.patch rename to openwrt/toolchain/gcc/patches/3.4.6/800-arm-bigendian.patch diff --git a/openwrt/toolchain/gcc/3.4.6/810-arm-bigendian-uclibc.patch b/openwrt/toolchain/gcc/patches/3.4.6/810-arm-bigendian-uclibc.patch similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/810-arm-bigendian-uclibc.patch rename to openwrt/toolchain/gcc/patches/3.4.6/810-arm-bigendian-uclibc.patch diff --git a/openwrt/toolchain/gcc/3.4.6/arm-softfloat.patch.conditional b/openwrt/toolchain/gcc/patches/3.4.6/arm-softfloat.patch.conditional similarity index 100% rename from openwrt/toolchain/gcc/3.4.6/arm-softfloat.patch.conditional rename to openwrt/toolchain/gcc/patches/3.4.6/arm-softfloat.patch.conditional diff --git a/openwrt/toolchain/gcc/4.0.2/100-uclibc-conf.patch b/openwrt/toolchain/gcc/patches/4.0.2/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.2/100-uclibc-conf.patch rename to openwrt/toolchain/gcc/patches/4.0.2/100-uclibc-conf.patch diff --git a/openwrt/toolchain/gcc/4.0.2/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/4.0.2/200-uclibc-locale.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.2/200-uclibc-locale.patch rename to openwrt/toolchain/gcc/patches/4.0.2/200-uclibc-locale.patch diff --git a/openwrt/toolchain/gcc/4.0.3/100-uclibc-conf.patch b/openwrt/toolchain/gcc/patches/4.0.3/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.3/100-uclibc-conf.patch rename to openwrt/toolchain/gcc/patches/4.0.3/100-uclibc-conf.patch diff --git a/openwrt/toolchain/gcc/4.0.3/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/4.0.3/200-uclibc-locale.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.3/200-uclibc-locale.patch rename to openwrt/toolchain/gcc/patches/4.0.3/200-uclibc-locale.patch diff --git a/openwrt/toolchain/gcc/4.0.3/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/patches/4.0.3/300-libstdc++-pic.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.3/300-libstdc++-pic.patch rename to openwrt/toolchain/gcc/patches/4.0.3/300-libstdc++-pic.patch diff --git a/openwrt/toolchain/gcc/4.0.3/301-missing-execinfo_h.patch b/openwrt/toolchain/gcc/patches/4.0.3/301-missing-execinfo_h.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.3/301-missing-execinfo_h.patch rename to openwrt/toolchain/gcc/patches/4.0.3/301-missing-execinfo_h.patch diff --git a/openwrt/toolchain/gcc/4.0.3/302-c99-snprintf.patch b/openwrt/toolchain/gcc/patches/4.0.3/302-c99-snprintf.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.3/302-c99-snprintf.patch rename to openwrt/toolchain/gcc/patches/4.0.3/302-c99-snprintf.patch diff --git a/openwrt/toolchain/gcc/4.0.3/303-c99-complex-ugly-hack.patch b/openwrt/toolchain/gcc/patches/4.0.3/303-c99-complex-ugly-hack.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.3/303-c99-complex-ugly-hack.patch rename to openwrt/toolchain/gcc/patches/4.0.3/303-c99-complex-ugly-hack.patch diff --git a/openwrt/toolchain/gcc/4.0.3/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/patches/4.0.3/602-sdk-libstdc++-includes.patch similarity index 100% rename from openwrt/toolchain/gcc/4.0.3/602-sdk-libstdc++-includes.patch rename to openwrt/toolchain/gcc/patches/4.0.3/602-sdk-libstdc++-includes.patch diff --git a/openwrt/toolchain/gcc/4.1.0/100-uclibc-conf.patch b/openwrt/toolchain/gcc/patches/4.1.0/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/100-uclibc-conf.patch rename to openwrt/toolchain/gcc/patches/4.1.0/100-uclibc-conf.patch diff --git a/openwrt/toolchain/gcc/4.1.0/110-arm-eabi.patch b/openwrt/toolchain/gcc/patches/4.1.0/110-arm-eabi.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/110-arm-eabi.patch rename to openwrt/toolchain/gcc/patches/4.1.0/110-arm-eabi.patch diff --git a/openwrt/toolchain/gcc/4.1.0/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/4.1.0/200-uclibc-locale.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/200-uclibc-locale.patch rename to openwrt/toolchain/gcc/patches/4.1.0/200-uclibc-locale.patch diff --git a/openwrt/toolchain/gcc/4.1.0/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/patches/4.1.0/300-libstdc++-pic.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/300-libstdc++-pic.patch rename to openwrt/toolchain/gcc/patches/4.1.0/300-libstdc++-pic.patch diff --git a/openwrt/toolchain/gcc/4.1.0/301-missing-execinfo_h.patch b/openwrt/toolchain/gcc/patches/4.1.0/301-missing-execinfo_h.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/301-missing-execinfo_h.patch rename to openwrt/toolchain/gcc/patches/4.1.0/301-missing-execinfo_h.patch diff --git a/openwrt/toolchain/gcc/4.1.0/302-c99-snprintf.patch b/openwrt/toolchain/gcc/patches/4.1.0/302-c99-snprintf.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/302-c99-snprintf.patch rename to openwrt/toolchain/gcc/patches/4.1.0/302-c99-snprintf.patch diff --git a/openwrt/toolchain/gcc/4.1.0/303-c99-complex-ugly-hack.patch b/openwrt/toolchain/gcc/patches/4.1.0/303-c99-complex-ugly-hack.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/303-c99-complex-ugly-hack.patch rename to openwrt/toolchain/gcc/patches/4.1.0/303-c99-complex-ugly-hack.patch diff --git a/openwrt/toolchain/gcc/4.1.0/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/patches/4.1.0/602-sdk-libstdc++-includes.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/602-sdk-libstdc++-includes.patch rename to openwrt/toolchain/gcc/patches/4.1.0/602-sdk-libstdc++-includes.patch diff --git a/openwrt/toolchain/gcc/4.1.0/740-sh-pr24836.patch b/openwrt/toolchain/gcc/patches/4.1.0/740-sh-pr24836.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/740-sh-pr24836.patch rename to openwrt/toolchain/gcc/patches/4.1.0/740-sh-pr24836.patch diff --git a/openwrt/toolchain/gcc/4.1.0/800-arm-bigendian.patch b/openwrt/toolchain/gcc/patches/4.1.0/800-arm-bigendian.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.0/800-arm-bigendian.patch rename to openwrt/toolchain/gcc/patches/4.1.0/800-arm-bigendian.patch diff --git a/openwrt/toolchain/gcc/4.1.1/100-uclibc-conf.patch b/openwrt/toolchain/gcc/patches/4.1.1/100-uclibc-conf.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/100-uclibc-conf.patch rename to openwrt/toolchain/gcc/patches/4.1.1/100-uclibc-conf.patch diff --git a/openwrt/toolchain/gcc/4.1.1/110-arm-eabi.patch b/openwrt/toolchain/gcc/patches/4.1.1/110-arm-eabi.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/110-arm-eabi.patch rename to openwrt/toolchain/gcc/patches/4.1.1/110-arm-eabi.patch diff --git a/openwrt/toolchain/gcc/4.1.1/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/200-uclibc-locale.patch rename to openwrt/toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch diff --git a/openwrt/toolchain/gcc/4.1.1/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/300-libstdc++-pic.patch rename to openwrt/toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch diff --git a/openwrt/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch b/openwrt/toolchain/gcc/patches/4.1.1/301-missing-execinfo_h.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch rename to openwrt/toolchain/gcc/patches/4.1.1/301-missing-execinfo_h.patch diff --git a/openwrt/toolchain/gcc/4.1.1/302-c99-snprintf.patch b/openwrt/toolchain/gcc/patches/4.1.1/302-c99-snprintf.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/302-c99-snprintf.patch rename to openwrt/toolchain/gcc/patches/4.1.1/302-c99-snprintf.patch diff --git a/openwrt/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch b/openwrt/toolchain/gcc/patches/4.1.1/303-c99-complex-ugly-hack.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch rename to openwrt/toolchain/gcc/patches/4.1.1/303-c99-complex-ugly-hack.patch diff --git a/openwrt/toolchain/gcc/4.1.1/304-index_macro.patch b/openwrt/toolchain/gcc/patches/4.1.1/304-index_macro.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/304-index_macro.patch rename to openwrt/toolchain/gcc/patches/4.1.1/304-index_macro.patch diff --git a/openwrt/toolchain/gcc/4.1.1/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/patches/4.1.1/602-sdk-libstdc++-includes.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/602-sdk-libstdc++-includes.patch rename to openwrt/toolchain/gcc/patches/4.1.1/602-sdk-libstdc++-includes.patch diff --git a/openwrt/toolchain/gcc/4.1.1/740-sh-pr24836.patch b/openwrt/toolchain/gcc/patches/4.1.1/740-sh-pr24836.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/740-sh-pr24836.patch rename to openwrt/toolchain/gcc/patches/4.1.1/740-sh-pr24836.patch diff --git a/openwrt/toolchain/gcc/4.1.1/800-arm-bigendian.patch b/openwrt/toolchain/gcc/patches/4.1.1/800-arm-bigendian.patch similarity index 100% rename from openwrt/toolchain/gcc/4.1.1/800-arm-bigendian.patch rename to openwrt/toolchain/gcc/patches/4.1.1/800-arm-bigendian.patch diff --git a/openwrt/toolchain/gdb/Makefile b/openwrt/toolchain/gdb/Makefile index f122881a741..538ef512072 100644 --- a/openwrt/toolchain/gdb/Makefile +++ b/openwrt/toolchain/gdb/Makefile @@ -1,35 +1,21 @@ -# $Id$ - include $(TOPDIR)/rules.mk -GDB_NAME:=gdb -GDB_SITE:=http://ftp.gnu.org/gnu/gdb -GDB_VERSION:=6.3 -GDB_SOURCE:=$(GDB_NAME)-$(GDB_VERSION).tar.bz2 -GDB_CAT:=bzcat +PKG_NAME:=gdb +PKG_VERSION:=6.3 -GDB_DIR:=$(TOOL_BUILD_DIR)/$(GDB_NAME)-$(GDB_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=05b928f41fa5b482e49ca2c24762a0ae +PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/gdb +PKG_CAT:=bzcat -$(DL_DIR)/$(GDB_SOURCE): - $(WGET) -P $(DL_DIR) $(GDB_SITE)/$(GDB_SOURCE) +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -$(GDB_DIR)/.patched: $(DL_DIR)/$(GDB_SOURCE) - $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - - $(PATCH) $(GDB_DIR) ./patches - # Copy a config.sub from gcc. This is only necessary until - # gdb's config.sub supports <arch>-linux-uclibc tuples. - # Should probably integrate this into the patch. - touch $(GDB_DIR)/.patched +include $(INCLUDE_DIR)/host-build.mk -# gdb client - -GDB_CLIENT_DIR:=$(TOOL_BUILD_DIR)/gdbclient-$(GDB_VERSION) - -$(GDB_CLIENT_DIR)/.configured: $(GDB_DIR)/.patched - mkdir -p $(GDB_CLIENT_DIR) - (cd $(GDB_CLIENT_DIR); \ +define Build/Configure + (cd $(PKG_BUILD_DIR); \ gdb_cv_func_sigsetjmp=yes \ - $(GDB_DIR)/configure \ + $(PKG_BUILD_DIR)/configure \ --prefix=$(STAGING_DIR) \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ @@ -40,20 +26,17 @@ $(GDB_CLIENT_DIR)/.configured: $(GDB_DIR)/.patched --without-included-gettext \ --enable-threads \ ); - touch $(GDB_CLIENT_DIR)/.configured +endef -$(GDB_CLIENT_DIR)/gdb/gdb: $(GDB_CLIENT_DIR)/.configured - $(MAKE) -C $(GDB_CLIENT_DIR) - strip $(GDB_CLIENT_DIR)/gdb/gdb +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) + strip $(PKG_BUILD_DIR)/gdb/gdb +endef -$(TARGET_CROSS)gdb: $(GDB_CLIENT_DIR)/gdb/gdb - install -c $(GDB_CLIENT_DIR)/gdb/gdb $(TARGET_CROSS)gdb +define Build/Install + install -c $(PKG_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb cd $(STAGING_DIR)/bin && \ - ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb + ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb +endef -source: $(DL_DIR)/$(GDB_SOURCE) -prepare: $(GDB_DIR)/.patched -compile: -install: $(TARGET_CROSS)gdb -clean: FORCE - rm -rf $(GDB_CLIENT_DIR) $(GDB_DIR) +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/ipkg-utils/Makefile b/openwrt/toolchain/ipkg-utils/Makefile index 0183257b3d1..5d324f728aa 100644 --- a/openwrt/toolchain/ipkg-utils/Makefile +++ b/openwrt/toolchain/ipkg-utils/Makefile @@ -1,35 +1,18 @@ -# ipkg-utils -# -# http://handhelds.org/packages/ipkg-utils -# +include $(TOPDIR)/rules.mk PKG_NAME := ipkg-utils PKG_VERSION := 1.7 -PKG_SOURCE_SITE := http://handhelds.org/packages/ipkg-utils/ -PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_CAT := zcat -PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM := da3e3ef772973d7370a6ac95f0fef9b8 +PKG_SOURCE_URL := http://handhelds.org/packages/ipkg-utils/ +PKG_CAT := zcat -include $(TOPDIR)/rules.mk +PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR) +include $(INCLUDE_DIR)/host-build.mk - -$(DL_DIR)/$(PKG_SOURCE_FILE): - mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) x $(PKG_SOURCE_SITE) - -$(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE_FILE) - mkdir -p $(BUILD_DIR) - $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - touch $(PKG_BUILD_DIR)/.unpacked - -$(PKG_BUILD_DIR)/.patched: $(PKG_BUILD_DIR)/.unpacked - $(PATCH) $(PKG_BUILD_DIR) $(PKG_VERSION)/ \*.patch - touch $(PKG_BUILD_DIR)/.patched - -$(STAGING_DIR)/usr/bin/ipkg-build: $(PKG_BUILD_DIR)/.patched +define Build/Install mkdir -p $(STAGING_DIR)/etc echo "dest root /" > $(STAGING_DIR)/etc/ipkg.conf echo "option offline_root $(TARGET_DIR)" >> $(STAGING_DIR)/etc/ipkg.conf @@ -38,15 +21,12 @@ $(STAGING_DIR)/usr/bin/ipkg-build: $(PKG_BUILD_DIR)/.patched install -m0755 $(PKG_BUILD_DIR)/ipkg-buildpackage $(STAGING_DIR)/usr/bin install -m0755 $(PKG_BUILD_DIR)/ipkg-make-index $(STAGING_DIR)/usr/bin install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin +endef -source: $(DL_DIR)/$(PKG_SOURCE_FILE) -prepare: $(PKG_BUILD_DIR)/.patched -compile: -install: $(STAGING_DIR)/usr/bin/ipkg-build - -clean: FORCE +define Build/Clean rm -f $(STAGING_DIR)/etc/ipkg.conf rm -f $(STAGING_DIR)/usr/bin/ipkg* rm -rf $(PKG_BUILD_DIR) +endef - +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_clean.patch b/openwrt/toolchain/ipkg-utils/patches/100-build_clean.patch similarity index 100% rename from openwrt/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_clean.patch rename to openwrt/toolchain/ipkg-utils/patches/100-build_clean.patch diff --git a/openwrt/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_buildpackage.patch b/openwrt/toolchain/ipkg-utils/patches/110-buildpackage.patch similarity index 100% rename from openwrt/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_buildpackage.patch rename to openwrt/toolchain/ipkg-utils/patches/110-buildpackage.patch diff --git a/openwrt/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_tar.patch b/openwrt/toolchain/ipkg-utils/patches/120-build_tar.patch similarity index 100% rename from openwrt/toolchain/ipkg-utils/1.7/ipkg-utils-1.7-ipkg_build_tar.patch rename to openwrt/toolchain/ipkg-utils/patches/120-build_tar.patch diff --git a/openwrt/toolchain/jffs2/Makefile b/openwrt/toolchain/jffs2/Makefile index b673c438a6c..02364020a4a 100644 --- a/openwrt/toolchain/jffs2/Makefile +++ b/openwrt/toolchain/jffs2/Makefile @@ -1,29 +1,23 @@ include $(TOPDIR)/rules.mk -MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig -MTD_SOURCE=mtd_20050122.orig.tar.gz -MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd -MTD_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 -MKFS_JFFS2=$(MTD_DIR)/util/mkfs.jffs2 +PKG_NAME:=mtd +PKG_VERSION:=20050122 -$(DL_DIR)/$(MTD_SOURCE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(MTD_SOURCE) $(MTD_MD5SUM) $(MTD_SITE) +PKG_SOURCE=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 +PKG_SOURCE_URL=http://ftp.debian.org/debian/pool/main/m/mtd +PKG_CAT:=zcat -$(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) - zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) -xvf - - $(PATCH) $(MTD_DIR) ./patches - touch $(MTD_DIR)/.unpacked +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/mtd-20050122.orig -$(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked - $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util +include $(INCLUDE_DIR)/host-build.mk -$(STAGING_DIR)/bin/mkfs.jffs2: $(MTD_DIR)/util/mkfs.jffs2 - $(CP) $< $@ +define Build/Compile + $(MAKE) LINUXDIR=$(LINUX_HEADERS_DIR) -C $(PKG_BUILD_DIR)/util +endef -source: $(DL_DIR)/$(MTD_SOURCE) -prepare: $(MTD_DIR)/.unpacked -compile: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2 -install: -clean: FORCE - rm -rf $(MTD_DIR) $(STAGING_DIR)/bin/mkfs.jffs2 +define Build/Install + $(CP) $(PKG_BUILD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/ +endef +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/kernel-headers/Makefile b/openwrt/toolchain/kernel-headers/Makefile index 027c3e722c6..9d2f32e8633 100644 --- a/openwrt/toolchain/kernel-headers/Makefile +++ b/openwrt/toolchain/kernel-headers/Makefile @@ -1,52 +1,53 @@ include $(TOPDIR)/rules.mk -# linux kernel headers for toolchain +PKG_NAME=kernel-headers +PKG_VERSION=2.4.32 -LINUX_HEADERS_VERSION=2.4.32 -LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -LINUX_HEADERS_SITE= \ +PKG_SOURCE=linux-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c +PKG_SOURCE_URL= \ http://www.de.kernel.org/pub/linux/kernel/v2.4 \ http://www.fi.kernel.org/pub/linux/kernel/v2.4 \ http://www.fr.kernel.org/pub/linux/kernel/v2.4 \ - http://www.kernel.org/pub/linux/kernel/v2.4 \ + http://www.kernel.org/pub/linux/kernel/v2.4 -LINUX_HEADERS_SOURCE=linux-$(LINUX_HEADERS_VERSION).tar.bz2 -LINUX_HEADERS_ARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ - -e 's/mipseb/mips/' \ +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/linux-$(PKG_VERSION) + +include $(INCLUDE_DIR)/host-build.mk + +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/mipsel/mips/' \ + -e 's/mipseb/mips/' \ -e 's/powerpc/ppc/' \ -e 's/sh[234]/sh/' \ - ) + -e 's/armeb/arm/' \ +) -$(DL_DIR)/$(LINUX_HEADERS_SOURCE): - -mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_HEADERS_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_HEADERS_SITE) - -$(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) +define Build/Prepare mkdir -p $(TOOL_BUILD_DIR) - bzcat $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - \ - linux-$(LINUX_HEADERS_VERSION)/include \ - linux-$(LINUX_HEADERS_VERSION)/Makefile \ - linux-$(LINUX_HEADERS_VERSION)/Rules.make \ - linux-$(LINUX_HEADERS_VERSION)/arch/$(LINUX_HEADERS_ARCH)/Makefile \ - linux-$(LINUX_HEADERS_VERSION)/scripts \ - linux-$(LINUX_HEADERS_VERSION)/arch/$(LINUX_HEADERS_ARCH)/config*.in \ - linux-$(LINUX_HEADERS_VERSION)/*/*/Config.in \ - linux-$(LINUX_HEADERS_VERSION)/*/Config.in - (cd $(LINUX_HEADERS_DIR)-$(LINUX_HEADERS_VERSION) ; patch -p1 < $(TOPDIR)/toolchain/kernel-headers/patches/include.patch) - ln -sf $(LINUX_HEADERS_DIR)-$(LINUX_HEADERS_VERSION) $(LINUX_HEADERS_DIR) - $(SED) 's/@expr length/@-expr length/' $(LINUX_HEADERS_DIR)/Makefile - touch $(LINUX_HEADERS_DIR)/.unpacked + bzcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - \ + linux-$(PKG_VERSION)/include \ + linux-$(PKG_VERSION)/Makefile \ + linux-$(PKG_VERSION)/Rules.make \ + linux-$(PKG_VERSION)/arch/$(LINUX_KARCH)/Makefile \ + linux-$(PKG_VERSION)/scripts \ + linux-$(PKG_VERSION)/arch/$(LINUX_KARCH)/config*.in \ + linux-$(PKG_VERSION)/*/*/Config.in \ + linux-$(PKG_VERSION)/*/Config.in + $(PATCH) $(PKG_BUILD_DIR) ./patches + $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile + ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR) +endef -$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.unpacked - -$(CP) ./files/config.$(LINUX_HEADERS_ARCH) $(LINUX_HEADERS_DIR)/.config - $(MAKE) -C $(LINUX_HEADERS_DIR) ARCH=$(LINUX_HEADERS_ARCH) oldconfig include/linux/version.h - touch $(LINUX_HEADERS_DIR)/.configured +define Build/Configure + -$(CP) ./files/config.$(LINUX_KARCH) $(PKG_BUILD_DIR)/.config + $(MAKE) -C $(PKG_BUILD_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h +endef -source: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) -prepare: $(LINUX_HEADERS_DIR)/.configured -compile: -install: -clean: - rm -rf $(LINUX_HEADERS_DIR) +define Build/Compile +endef +define Build/Install +endef + +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/kernel-headers/config.mips b/openwrt/toolchain/kernel-headers/config.mips deleted file mode 100644 index d6412028b4d..00000000000 --- a/openwrt/toolchain/kernel-headers/config.mips +++ /dev/null @@ -1,1045 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_MIPS=y -CONFIG_MIPS32=y -# CONFIG_MIPS64 is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y - -# -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set - -# -# Machine selection -# -# CONFIG_ACER_PICA_61 is not set -# CONFIG_MIPS_BOSPORUS is not set -# CONFIG_MIPS_MIRAGE is not set -# CONFIG_MIPS_DB1000 is not set -# CONFIG_MIPS_DB1100 is not set -# CONFIG_MIPS_DB1500 is not set -# CONFIG_MIPS_DB1550 is not set -# CONFIG_MIPS_PB1000 is not set -# CONFIG_MIPS_PB1100 is not set -# CONFIG_MIPS_PB1500 is not set -# CONFIG_MIPS_HYDROGEN3 is not set -# CONFIG_MIPS_PB1550 is not set -# CONFIG_MIPS_XXS1500 is not set -# CONFIG_MIPS_MTX1 is not set -# CONFIG_COGENT_CSB250 is not set -# CONFIG_BAGET_MIPS is not set -# CONFIG_CASIO_E55 is not set -# CONFIG_MIPS_COBALT is not set -# CONFIG_DECSTATION is not set -# CONFIG_MIPS_EV64120 is not set -# CONFIG_MIPS_EV96100 is not set -# CONFIG_MIPS_IVR is not set -# CONFIG_HP_LASERJET is not set -# CONFIG_IBM_WORKPAD is not set -# CONFIG_LASAT is not set -# CONFIG_MIPS_ITE8172 is not set -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_MAGNUM_4000 is not set -# CONFIG_MIPS_MALTA is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_MOMENCO_OCELOT is not set -# CONFIG_MOMENCO_OCELOT_G is not set -# CONFIG_MOMENCO_OCELOT_C is not set -# CONFIG_MOMENCO_JAGUAR_ATX is not set -# CONFIG_PMC_BIG_SUR is not set -# CONFIG_PMC_STRETCH is not set -# CONFIG_PMC_YOSEMITE is not set -# CONFIG_DDB5074 is not set -# CONFIG_DDB5476 is not set -# CONFIG_DDB5477 is not set -# CONFIG_NEC_OSPREY is not set -# CONFIG_NEC_EAGLE is not set -# CONFIG_OLIVETTI_M700 is not set -# CONFIG_NINO is not set -# CONFIG_SGI_IP22 is not set -# CONFIG_SGI_IP27 is not set -# CONFIG_SIBYTE_SB1xxx_SOC is not set -# CONFIG_SNI_RM200_PCI is not set -# CONFIG_TANBAC_TB0226 is not set -# CONFIG_TANBAC_TB0229 is not set -# CONFIG_TOSHIBA_JMR3927 is not set -# CONFIG_TOSHIBA_RBTX4927 is not set -# CONFIG_VICTOR_MPC30X is not set -# CONFIG_ZAO_CAPCELLA is not set -# CONFIG_HIGHMEM is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_MIPS_AU1000 is not set - -# -# CPU selection -# -CONFIG_CPU_MIPS32=y -# CONFIG_CPU_MIPS64 is not set -# CONFIG_CPU_R3000 is not set -# CONFIG_CPU_TX39XX is not set -# CONFIG_CPU_VR41XX is not set -# CONFIG_CPU_R4300 is not set -# CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_TX49XX is not set -# CONFIG_CPU_R5000 is not set -# CONFIG_CPU_R5432 is not set -# CONFIG_CPU_R6000 is not set -# CONFIG_CPU_NEVADA is not set -# CONFIG_CPU_R8000 is not set -# CONFIG_CPU_R10000 is not set -# CONFIG_CPU_RM7000 is not set -# CONFIG_CPU_RM9000 is not set -# CONFIG_CPU_SB1 is not set -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_16KB is not set -# CONFIG_PAGE_SIZE_64KB is not set -CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set -# CONFIG_64BIT_PHYS_ADDR is not set -# CONFIG_CPU_ADVANCED is not set -CONFIG_CPU_HAS_LLSC=y -# CONFIG_CPU_HAS_LLDSCD is not set -# CONFIG_CPU_HAS_WB is not set -CONFIG_CPU_HAS_SYNC=y - -# -# General setup -# -CONFIG_CPU_LITTLE_ENDIAN=y -# CONFIG_BUILD_ELF64 is not set -CONFIG_NET=y -CONFIG_PCI=y -# CONFIG_PCI_NEW is not set -CONFIG_PCI_AUTO=y -# CONFIG_PCI_NAMES is not set -# CONFIG_ISA is not set -# CONFIG_TC is not set -# CONFIG_MCA is not set -# CONFIG_SBUS is not set -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -# CONFIG_HOTPLUG_PCI is not set -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_ELF=y -# CONFIG_MIPS32_COMPAT is not set -# CONFIG_MIPS32_O32 is not set -# CONFIG_MIPS32_N32 is not set -# CONFIG_BINFMT_ELF32 is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_OOM_KILLER is not set -# CONFIG_CMDLINE_BOOL is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_CONCAT is not set -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_B1 is not set -CONFIG_MTD_CFI_B2=y -# CONFIG_MTD_CFI_B4 is not set -# CONFIG_MTD_CFI_B8 is not set -CONFIG_MTD_CFI_I1=y -# CONFIG_MTD_CFI_I2 is not set -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -# CONFIG_MTD_CFI_STAA is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_AMDSTD is not set -# CONFIG_MTD_SHARP is not set -# CONFIG_MTD_JEDEC is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PB1000 is not set -# CONFIG_MTD_PB1500 is not set -# CONFIG_MTD_PB1100 is not set -# CONFIG_MTD_CSTM_MIPS_IXX is not set -# CONFIG_MTD_OCELOT is not set -# CONFIG_MTD_LASAT is not set -# CONFIG_MTD_PCI is not set -# CONFIG_MTD_PCMCIA is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC1000 is not set -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play configuration -# -# CONFIG_PNP is not set -# CONFIG_ISAPNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_CISS_MONITOR_THREAD is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_BLK_STATS is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_FILTER is not set -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_TOS=y -# CONFIG_IP_ROUTE_VERBOSE is not set -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -# CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_FTP=y -# CONFIG_IP_NF_AMANDA is not set -CONFIG_IP_NF_TFTP=y -CONFIG_IP_NF_IRC=y -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_MAC=m -CONFIG_IP_NF_MATCH_PKTTYPE=m -CONFIG_IP_NF_MATCH_MARK=y -CONFIG_IP_NF_MATCH_MULTIPORT=y -CONFIG_IP_NF_MATCH_TOS=m -# CONFIG_IP_NF_MATCH_RECENT is not set -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=y -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=y -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_UNCLEAN=m -# CONFIG_IP_NF_MATCH_OWNER is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_MIRROR=m -CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=y -CONFIG_IP_NF_NAT_FTP=y -CONFIG_IP_NF_NAT_TFTP=y -CONFIG_IP_NF_MANGLE=y -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=y -CONFIG_IP_NF_TARGET_LOG=y -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m - -# -# IPv6: Netfilter Configuration -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_LIMIT=m -CONFIG_IP6_NF_MATCH_MAC=m -# CONFIG_IP6_NF_MATCH_RT is not set -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_FRAG is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_MARK=m -# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -# CONFIG_IP6_NF_MATCH_AHESP is not set -CONFIG_IP6_NF_MATCH_LENGTH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_MARK=m -# CONFIG_KHTTPD is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -CONFIG_VLAN_8021Q=y - -# -# -# -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_DECNET is not set -CONFIG_BRIDGE=y -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_LLC is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_CSZ=m -# CONFIG_NET_SCH_HFSC is not set -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -# CONFIG_NET_SCH_NETEM is not set -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_QOS=y -CONFIG_NET_ESTIMATOR=y -CONFIG_NET_CLS=y -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_POLICE=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set -# CONFIG_PHONE_IXJ is not set -# CONFIG_PHONE_IXJ_PCMCIA is not set - -# -# ATA/IDE/MFM/RLL support -# -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI support -# -CONFIG_SCSI=m - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_SD_EXTRA_DEVS=5 -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_DEBUG_QUEUES is not set -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AHA1740 is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_SCSI_AM53C974 is not set -# CONFIG_SCSI_MEGARAID is not set -# CONFIG_SCSI_MEGARAID2 is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_SATA_AHCI is not set -# CONFIG_SCSI_SATA_SVW is not set -# CONFIG_SCSI_ATA_PIIX is not set -# CONFIG_SCSI_SATA_NV is not set -# CONFIG_SCSI_SATA_PROMISE is not set -# CONFIG_SCSI_SATA_SX4 is not set -# CONFIG_SCSI_SATA_SIL is not set -# CONFIG_SCSI_SATA_SIS is not set -# CONFIG_SCSI_SATA_ULI is not set -# CONFIG_SCSI_SATA_VIA is not set -# CONFIG_SCSI_SATA_VITESSE is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_DMA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_NCR53C7xx is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_NCR53C8XX is not set -# CONFIG_SCSI_SYM53C8XX is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_SIM710 is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_BOOT is not set -# CONFIG_FUSION_ISENSE is not set -# CONFIG_FUSION_CTL is not set -# CONFIG_FUSION_LAN is not set - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set -# CONFIG_I2O_PCI is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_ETHERTAP is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -# CONFIG_SUNLANCE is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNBMAC is not set -# CONFIG_SUNQE is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_LANCE is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -# CONFIG_NET_PCI is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_MYRI_SBUS is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=y -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPPOE=m -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -CONFIG_SHAPER=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input core support -# -# CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_UINPUT is not set - -# -# Character devices -# -# CONFIG_VT is not set -CONFIG_SERIAL=y -CONFIG_SERIAL_CONSOLE=y -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=128 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set - -# -# Joysticks -# -# CONFIG_INPUT_GAMEPORT is not set - -# -# Input core support is needed for gameports -# - -# -# Input core support is needed for joysticks -# -# CONFIG_QIC02_TAPE is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_IPMI_PANIC_EVENT is not set -# CONFIG_IPMI_DEVICE_INTERFACE is not set -# CONFIG_IPMI_KCS is not set -# CONFIG_IPMI_WATCHDOG is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -# CONFIG_ALIM1535_WDT is not set -# CONFIG_ALIM7101_WDT is not set -# CONFIG_SC520_WDT is not set -# CONFIG_PCWATCHDOG is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -# CONFIG_WAFER_WDT is not set -# CONFIG_I810_TCO is not set -# CONFIG_MIXCOMWD is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SC1200_WDT is not set -# CONFIG_SCx200_WDT is not set -CONFIG_SOFT_WATCHDOG=y -# CONFIG_W83877F_WDT is not set -# CONFIG_WDT is not set -# CONFIG_WDTPCI is not set -# CONFIG_MACHZ_WDT is not set -# CONFIG_SCx200 is not set -# CONFIG_SCx200_GPIO is not set -# CONFIG_AMD_PM768 is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_MIPS_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set - -# -# Direct Rendering Manager (XFree86 DRI support) -# -# CONFIG_DRM is not set - -# -# File systems -# -# CONFIG_QUOTA is not set -# CONFIG_QFMT_V2 is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BEFS_DEBUG is not set -# CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -# CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=m -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_CRAMFS=y -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_JFS_FS is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_RW is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=m -# CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set -# CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_XFS_FS is not set -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_RT is not set -# CONFIG_XFS_TRACE is not set -# CONFIG_XFS_DEBUG is not set - -# -# Network File Systems -# -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_ROOT_NFS is not set -# CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_SUNRPC=m -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -# CONFIG_SMB_FS is not set -# CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set -# CONFIG_ZISOFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_EFI_PARTITION is not set -# CONFIG_SMB_NLS is not set -CONFIG_NLS=y - -# -# Native Language Support -# -CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_EHCI_HCD is not set -# CONFIG_USB_UHCI is not set -# CONFIG_USB_UHCI_ALT is not set -CONFIG_USB_OHCI=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_BLUETOOTH is not set -# CONFIG_USB_MIDI is not set -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -# CONFIG_USB_STORAGE_ISD200 is not set -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_HP8200e=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -# CONFIG_USB_ACM is not set -CONFIG_USB_PRINTER=m - -# -# USB Human Interface Devices (HID) -# -# CONFIG_USB_HID is not set - -# -# Input core support is needed for USB HID input layer or HIDBP support -# -# CONFIG_USB_HIDINPUT is not set -# CONFIG_USB_HIDDEV is not set -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set - -# -# USB Imaging devices -# -# CONFIG_USB_DC2XX is not set -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set - -# -# USB Multimedia devices -# - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_CATC is not set -# CONFIG_USB_CDCETHER is not set -# CONFIG_USB_USBNET is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_TIGL is not set -# CONFIG_USB_BRLVGER is not set -# CONFIG_USB_LCD is not set - -# -# Support for USB gadgets -# -# CONFIG_USB_GADGET is not set - -# -# Bluetooth support -# -# CONFIG_BLUEZ is not set - -# -# Kernel hacking -# -CONFIG_CROSSCOMPILE=y -# CONFIG_RUNTIME_DEBUG is not set -# CONFIG_KGDB is not set -# CONFIG_GDB_CONSOLE is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_MIPS_UNCACHED is not set -CONFIG_LOG_BUF_SHIFT=0 - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -# CONFIG_CRC32 is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y diff --git a/openwrt/toolchain/libnotimpl/Makefile b/openwrt/toolchain/libnotimpl/Makefile index 86ab927c124..aae7aef34a3 100644 --- a/openwrt/toolchain/libnotimpl/Makefile +++ b/openwrt/toolchain/libnotimpl/Makefile @@ -1,30 +1,34 @@ include $(TOPDIR)/rules.mk -LIBNOTIMPL_DIR:=$(TOOL_BUILD_DIR)/libnotimpl +PKG_NAME := libnotimpl +PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/libnotimpl -LIBNOTIMPL_SRCS+=./files/math.c -LIBNOTIMPL_OBJS:=$(patsubst ./files/%.c,$(LIBNOTIMPL_DIR)/%.o,$(LIBNOTIMPL_SRCS)) +include $(INCLUDE_DIR)/host-build.mk -$(LIBNOTIMPL_DIR)/.prepared: - mkdir -p $(LIBNOTIMPL_DIR) - touch $@ +define cc + $(TARGET_CC) $(TARGET_CFLAGS) -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o +endef -$(LIBNOTIMPL_OBJS): $(LIBNOTIMPL_DIR)/%.o : ./files/%.c - $(TARGET_CC) $(TARGET_CFLAGS) -c $< -o $@ +define Build/Prepare + rm -rf $(PKG_BUILD_DIR) + mkdir -p $(PKG_BUILD_DIR) +endef -$(LIBNOTIMPL_DIR)/libnotimpl.a: $(LIBNOTIMPL_OBJS) - $(TARGET_CROSS)ar rc $(LIBNOTIMPL_DIR)/libnotimpl.a $(LIBNOTIMPL_OBJS) +define Build/Compile + $(call cc,math) + $(TARGET_CROSS)ar rc $(PKG_BUILD_DIR)/libnotimpl.a $(PKG_BUILD_DIR)/*.o +endef -$(STAGING_DIR)/usr/lib/libnotimpl.a: $(LIBNOTIMPL_DIR)/libnotimpl.a +define Build/Install mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $< $@ - touch -c $@ + $(CP) $(PKG_BUILD_DIR)/libnotimpl.a $(STAGING_DIR)/usr/lib/ +endef -source: -prepare: $(LIBNOTIMPL_DIR)/.prepared -compile: $(LIBNOTIMPL_DIR)/libnotimpl.a -install: $(STAGING_DIR)/usr/lib/libnotimpl.a -clean: FORCE +define Build/Clean rm -rf \ $(STAGING_DIR)/usr/lib/libnotimpl.a \ - $(LIBNOTIMPL_DIR) \ + $(PKG_BUILD_DIR) +endef + +$(eval $(call HostBuild)) + diff --git a/openwrt/toolchain/libnotimpl/files/math.c b/openwrt/toolchain/libnotimpl/src/math.c similarity index 100% rename from openwrt/toolchain/libnotimpl/files/math.c rename to openwrt/toolchain/libnotimpl/src/math.c diff --git a/openwrt/toolchain/lzma/Makefile b/openwrt/toolchain/lzma/Makefile index cace2a4e2b3..6488a062803 100644 --- a/openwrt/toolchain/lzma/Makefile +++ b/openwrt/toolchain/lzma/Makefile @@ -1,53 +1,37 @@ -############################################################# -# -# lzma target -# -############################################################# - include $(TOPDIR)/rules.mk -LZMA_DIR=$(BUILD_DIR)/lzma -LZMA_SOURCE=lzma432.tar.bz2 -LZMA_SITE=@SF/sevenzip -LZMA_MD5=155c1ebce5bc6710ae7ecc926226d9d7 +PKG_NAME := lzma +PKG_VERSION := 432 -LZMA_LIB_DIR=$(LZMA_DIR)/C/7zip/Compress/LZMA_Lib -LZMA_ALONE_DIR=$(LZMA_DIR)/C/7zip/Compress/LZMA_Alone +PKG_SOURCE := $(PKG_NAME)$(PKG_VERSION).tar.bz2 +PKG_MD5SUM := 155c1ebce5bc6710ae7ecc926226d9d7 +PKG_SOURCE_URL := @SF/sevenzip -TARGETS=$(LZMA_LIB_DIR)/liblzma.a $(LZMA_ALONE_DIR)/lzma +PKG_BUILD_DIR=$(TOOL_BUILD_DIR)/lzma-$(PKG_VERSION)/lzma -$(DL_DIR)/$(LZMA_SOURCE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LZMA_SOURCE) $(LZMA_MD5) $(LZMA_SITE) +include $(INCLUDE_DIR)/host-build.mk -$(LZMA_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE) - @rm -rf $(LZMA_DIR) && mkdir -p $(LZMA_DIR) - tar xjf $^ -C $(LZMA_DIR) - $(PATCH) $(LZMA_DIR) ./patches - touch $(LZMA_DIR)/.unpacked - -$(LZMA_ALONE_DIR)/lzma $(LZMA_LIB_DIR)/liblzma.a: $(LZMA_DIR)/.built -$(LZMA_DIR)/.built: $(LZMA_DIR)/.unpacked - $(MAKE) -C $(LZMA_LIB_DIR) - $(MAKE) -f makefile.gcc -C $(LZMA_ALONE_DIR) - touch $@ +LIB_DIR=$(PKG_BUILD_DIR)/C/7zip/Compress/LZMA_Lib +ALONE_DIR=$(PKG_BUILD_DIR)/C/7zip/Compress/LZMA_Alone -lzma: $(TARGETS) - $(CP) $^ $(LZMA_DIR) +define Build/Prepare + bzcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/ $(TAR_OPTIONS) - + $(PATCH) $(PKG_BUILD_DIR) ./patches +endef +define Build/Compile + $(MAKE) -C $(LIB_DIR) + $(MAKE) -f makefile.gcc -C $(ALONE_DIR) +endef -lzma-clean: FORCE - -$(MAKE) -C $(LZMA_LIB_DIR) clean - -$(MAKE) -C $(LZMA_ALONE_DIR) clean - rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma +define Build/Install + mkdir -p $(STAGING_DIR)/host/lib + $(CP) $(LIB_DIR)/liblzma.a $(STAGING_DIR)/host/lib/ + $(CP) $(ALONE_DIR)/lzma $(STAGING_DIR)/bin/ +endef -lzma-dirclean: FORCE - rm -rf $(LZMA_DIR) +define Build/Clean + rm -f $(PKG_BUILD_DIR)/liblzma.a $(PKG_BUILD_DIR)/lzma +endef -############################################################# - -source: $(DL_DIR)/$(LZMA_SOURCE) -prepare: $(LZMA_DIR)/.unpacked -compile: lzma -install: lzma FORCE - $(CP) $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/ -clean: lzma-dirclean +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/sed/Makefile b/openwrt/toolchain/sed/Makefile index bbf85028af5..0832ede2804 100644 --- a/openwrt/toolchain/sed/Makefile +++ b/openwrt/toolchain/sed/Makefile @@ -1,79 +1,56 @@ include $(TOPDIR)/rules.mk -############################################################# -# -# sed -# -############################################################# -SED_VER:=4.1.2 -SED_SOURCE:=sed-$(SED_VER).tar.gz -SED_SITE:=ftp://ftp.gnu.org/gnu/sed -SED_CAT:=zcat -SED_DIR1:=$(TOOL_BUILD_DIR)/sed-$(SED_VER) -SED_DIR2:=$(BUILD_DIR)/sed-$(SED_VER) -SED_BINARY:=sed/sed -SED_TARGET_BINARY:=bin/sed -SED_MD5SUM:=928f0e06422f414091917401f1a834d0 -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) -SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64 +PKG_NAME := sed +PKG_VERSION := 4.1.2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/$(PKG_NAME) +PKG_MD5SUM:=928f0e06422f414091917401f1a834d0 +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/sed-$(PKG_VERSION) + +HOST_SED_TARGET=$(strip $(shell ./sedcheck.sh)) + +ifneq ($(HOST_SED_TARGET),build-sed-host-binary) + PKG_SOURCE:= + PKG_CAT:= endif -HOST_SED_TARGET=$(shell ./sedcheck.sh) -DOWNLOAD_TARGET=$(shell ./sedcheck.sh) -$(DL_DIR)/$(SED_SOURCE): - mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SED_SOURCE) $(SED_MD5SUM) $(SED_SITE) +include $(INCLUDE_DIR)/host-build.mk -############################################################# -# -# build sed for use on the host system -# -############################################################# - -$(SED_DIR1)/.unpacked: $(DL_DIR)/$(SED_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - mkdir -p $(STAGING_DIR)/bin; - $(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - - touch $(SED_DIR1)/.unpacked - -$(SED_DIR1)/.configured: $(SED_DIR1)/.unpacked - (cd $(SED_DIR1); rm -rf config.cache; \ +ifeq ($(HOST_SED_TARGET),build-sed-host-binary) + define Build/Configure + (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ ./configure \ --prefix=$(STAGING_DIR) \ --prefix=/usr \ ); - touch $(SED_DIR1)/.configured + endef -$(SED_DIR1)/$(SED_BINARY): $(SED_DIR1)/.configured - $(MAKE) -C $(SED_DIR1) + define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) + endef -# This stuff is needed to work around GNU make deficiencies -build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) FORCE - @if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \ - rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi; - @if [ ! -f $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) \ - -ot $(SED_DIR1)/$(SED_BINARY) ] ; then \ + define Build/Install + @if [ -L $(STAGING_DIR)/bin/sed ] ; then \ + rm -f $(STAGING_DIR)/bin/sed; fi; + @if [ ! -f $(STAGING_DIR)/bin/sed -o $(STAGING_DIR)/bin/sed -ot $(PKG_BUILD_DIR)/sed/sed ]; then \ set -x; \ mkdir -p $(STAGING_DIR)/bin; \ - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(SED_DIR1) install; \ + $(MAKE) DESTDIR=$(STAGING_DIR) -C $(PKG_BUILD_DIR) install; \ mv $(STAGING_DIR)/usr/bin/sed $(STAGING_DIR)/bin/; \ rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \ - $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi - -use-sed-host-binary: FORCE - @if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \ - if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \ - mkdir -p $(STAGING_DIR)/bin; \ - rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); \ - ln -s $$SED $(STAGING_DIR)/$(SED_TARGET_BINARY) - -download-sed-binary: sed-$(SED_VER).tar.gz - -source: $(DOWNLOAD_TARGET) -prepare: -compile: -install: $(HOST_SED_TARGET) -clean: FORCE - rm -rf $(SED_DIR1) - rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY) + $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; \ + fi + endef +else + define Build/Compile + endef + define Build/Install + rm -rf $(STAGING_DIR)/bin/sed + mkdir -p $(STAGING_DIR)/bin + ln -s `which sed` $(STAGING_DIR)/bin/sed + endef +endif +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/sed/sedcheck.sh b/openwrt/toolchain/sed/sedcheck.sh index 5af1d886bd2..de15ac2f198 100755 --- a/openwrt/toolchain/sed/sedcheck.sh +++ b/openwrt/toolchain/sed/sedcheck.sh @@ -12,11 +12,6 @@ echo "HELLO" > .sedtest $SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1 case "$1" in - download) - if [ $? != 0 ] ; then - echo download-sed-binary - fi; - ;; *) if [ $? != 0 ] ; then echo build-sed-host-binary diff --git a/openwrt/toolchain/squashfs/Makefile b/openwrt/toolchain/squashfs/Makefile index a2b36718764..7b3eed5d609 100644 --- a/openwrt/toolchain/squashfs/Makefile +++ b/openwrt/toolchain/squashfs/Makefile @@ -1,27 +1,23 @@ include $(TOPDIR)/rules.mk -SQUASHFSLZMA_DIR=$(BUILD_DIR)/squashfs3.0 -SQUASHFSLZMA_SOURCE=squashfs3.0.tar.gz -SQUASHFSLZMA_SITE=@SF/squashfs -SQUASHFSLZMA_MD5SUM=9fd05d0bfbb712f5fb95edafea5bc733 +PKG_NAME := squashfs +PKG_VERSION := 3.0 -$(DL_DIR)/$(SQUASHFSLZMA_SOURCE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SQUASHFSLZMA_SOURCE) $(SQUASHFSLZMA_MD5SUM) $(SQUASHFSLZMA_SITE) +PKG_SOURCE := $(PKG_NAME)$(PKG_VERSION).tar.gz +PKG_SOURCE_URL := @SF/squashfs +PKG_MD5SUM := 9fd05d0bfbb712f5fb95edafea5bc733 +PKG_CAT := zcat -$(SQUASHFSLZMA_DIR)/.unpacked: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) - zcat $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) | tar -C $(BUILD_DIR) -xvf - - $(PATCH) $(SQUASHFSLZMA_DIR) ./patches - touch $(SQUASHFSLZMA_DIR)/.unpacked +PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/squashfs$(PKG_VERSION) -$(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/.unpacked - $(MAKE) -C $(SQUASHFSLZMA_DIR)/squashfs-tools mksquashfs-lzma LZMAPATH=$(BUILD_DIR)/lzma +include $(INCLUDE_DIR)/host-build.mk -$(STAGING_DIR)/bin/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma - $(CP) $< $@ +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools mksquashfs-lzma LZMAPATH=$(STAGING_DIR)/host/lib +endef -source: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) -prepare: $(SQUASHFSLZMA_DIR)/.unpacked -compile: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/mksquashfs-lzma -install: -clean: FORCE - rm -rf $(SQUASHFSLZMA_DIR) +define Build/Install + $(CP) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/ +endef + +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/sstrip/Makefile b/openwrt/toolchain/sstrip/Makefile new file mode 100644 index 00000000000..aa18e21c5fe --- /dev/null +++ b/openwrt/toolchain/sstrip/Makefile @@ -0,0 +1,23 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/host-build.mk + +PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/sstrip + +OS:=$(shell uname) +ifeq ($(OS),Darwin) +CFLAGS += -I./include +endif + +define Build/Compile + $(CC) $(CFLAGS) -o $(PKG_BUILD_DIR)/sstrip src/sstrip.c +endef + +define Build/Install + $(CP) $(PKG_BUILD_DIR)/sstrip $(STAGING_DIR)/bin +endef + +define Build/Clean + rm -f $(STAGING_DIR)/bin/sstrip +endef + +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/utils/include/elf.h b/openwrt/toolchain/sstrip/include/elf.h similarity index 100% rename from openwrt/toolchain/utils/include/elf.h rename to openwrt/toolchain/sstrip/include/elf.h diff --git a/openwrt/toolchain/utils/src/sstrip.c b/openwrt/toolchain/sstrip/src/sstrip.c similarity index 100% rename from openwrt/toolchain/utils/src/sstrip.c rename to openwrt/toolchain/sstrip/src/sstrip.c diff --git a/openwrt/toolchain/uClibc/Makefile b/openwrt/toolchain/uClibc/Makefile index f7691e4f1b0..22c59134573 100644 --- a/openwrt/toolchain/uClibc/Makefile +++ b/openwrt/toolchain/uClibc/Makefile @@ -1,25 +1,16 @@ include $(TOPDIR)/rules.mk -############################################################# -# -# uClibc (the C library) -# -############################################################# +PKG_NAME:=uClibc +PKG_VERSION:=0.9.28 -ifeq ($(CONFIG_UCLIBC_VERSION_SNAPSHOT),y) -# Be aware that this changes daily.... -UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc -UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(CONFIG_USE_UCLIBC_SNAPSHOT))).tar.bz2#")) -UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots -UCLIBC_VER:=PKG_VERSION:=0.${shell date +"%G%m%d"} -UCLIBC_MD5SUM:=x -else -UCLIBC_VER:=0.9.28 -UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_VER) -UCLIBC_SOURCE:=uClibc-$(UCLIBC_VER).tar.bz2 -UCLIBC_SITE:=http://www.uclibc.org/downloads -UCLIBC_MD5SUM:=1ada58d919a82561061e4741fb6abd29 -endif +PKG_SOURCE:=uClibc-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.uclibc.org/downloads +PKG_MD5SUM:=1ada58d919a82561061e4741fb6abd29 +PKG_CAT:=bzcat + +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(PKG_VERSION) + +include $(INCLUDE_DIR)/host-build.mk UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ -e 's/i.86/i386/' \ @@ -35,70 +26,62 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ -e 's/cris.*/cris/' \ ) - -$(DL_DIR)/$(UCLIBC_SOURCE): - mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(UCLIBC_SOURCE) $(UCLIBC_MD5SUM) $(UCLIBC_SITE) - -$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - - $(PATCH) $(UCLIBC_DIR) ./patches - touch $(UCLIBC_DIR)/.unpacked - -$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked - $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(UCLIBC_DIR)/Rules.mak - $(CP) ./files/config.$(ARCH) $(UCLIBC_DIR)/.config +define Build/Prepare + $(call Build/Prepare/Default) + $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak + $(CP) ./files/config.$(ARCH) $(PKG_BUILD_DIR)/.config $(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \ - $(UCLIBC_DIR)/.config + $(PKG_BUILD_DIR)/.config ifeq ($(CONFIG_LARGEFILE),y) - $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(UCLIBC_DIR)/.config + $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(PKG_BUILD_DIR)/.config else - $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(UCLIBC_DIR)/.config + $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(PKG_BUILD_DIR)/.config endif - $(SED) 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(UCLIBC_DIR)/.config + $(SED) 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(PKG_BUILD_DIR)/.config ifeq ($(CONFIG_SOFT_FLOAT),y) - $(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(UCLIBC_DIR)/.config + $(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(PKG_BUILD_DIR)/.config endif mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/lib - $(MAKE) -C $(UCLIBC_DIR) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \ DEVEL_PREFIX=/usr/ \ RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \ HOSTCC="$(HOSTCC)" \ CPU_CFLAGS="$(TARGET_CFLAGS)" \ pregen install_dev; - touch $(UCLIBC_DIR)/.configured +endef -$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET) - $(MAKE) -C $(UCLIBC_DIR) \ +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX= \ DEVEL_PREFIX=/ \ RUNTIME_PREFIX=/ \ HOSTCC="$(HOSTCC)" \ CPU_CFLAGS="$(TARGET_CFLAGS)" \ all - touch -c $(UCLIBC_DIR)/lib/libc.a +endef -$(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a - $(MAKE) -C $(UCLIBC_DIR) \ +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX=$(STAGING_DIR)/ \ DEVEL_PREFIX=/ \ RUNTIME_PREFIX=/ \ install_runtime - $(MAKE) -C $(UCLIBC_DIR) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX=$(STAGING_DIR)/ \ DEVEL_PREFIX=/ \ RUNTIME_PREFIX=/ \ install_dev - echo $(UCLIBC_VER) > $(STAGING_DIR)/uclibc_version - touch -c $(STAGING_DIR)/lib/libc.a + echo $(PKG_VERSION) > $(STAGING_DIR)/uclibc_version +endef -source: $(DL_DIR)/$(UCLIBC_SOURCE) -prepare: $(UCLIBC_DIR)/.configured -compile: $(UCLIBC_DIR)/lib/libc.a -install: $(STAGING_DIR)/lib/libc.a $(UCLIBC_TARGETS) -clean: FORCE - rm -rf $(UCLIBC_DIR) $(TOOL_BUILD_DIR)/uClibc_dev +define Build/Clean + rm -rf $(PKG_BUILD_DIR) $(TOOL_BUILD_DIR)/uClibc_dev +endef + +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/utils/Makefile b/openwrt/toolchain/utils/Makefile deleted file mode 100644 index f79ed891e45..00000000000 --- a/openwrt/toolchain/utils/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -include $(TOPDIR)/rules.mk - -TARGETS:=sstrip -UTILS_BUILD_DIR:=$(TOOL_BUILD_DIR)/utils - -OS:=$(shell uname) -ifeq ($(OS),Darwin) -CFLAGS += -I./include -endif - -source: -prepare: $(UTILS_BUILD_DIR) -compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) -install: compile - mkdir -p $(STAGING_DIR)/bin - $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ -package: -clean: FORCE - rm -rf $(UTILS_BUILD_DIR) - -$(UTILS_BUILD_DIR): - mkdir -p $(UTILS_BUILD_DIR) - -$(UTILS_BUILD_DIR)/%: src/%.c - $(CC) $(CFLAGS) -o $@ $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@) - chmod 755 $@ - From 98cca36b432b3e5366d363a5ffc9e8f2874123f2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 13:02:37 +0000 Subject: [PATCH 257/757] reorder sdk menuconfig entry, so that it does not force the toolchain selection into the main menu SVN-Revision: 4039 --- openwrt/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Config.in b/openwrt/Config.in index 74bd6484650..573cda50a70 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -40,8 +40,8 @@ config JLEVEL help Number of jobs to run simultanesouly -source "target/sdk/Config.in" source "toolchain/Config.in" +source "target/sdk/Config.in" menu "Target Images" config TARGET_ROOTFS_INITRAMFS From b0cf6af7c2c5bcb6d0d42f2493c529ca100b1744 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 14:02:29 +0000 Subject: [PATCH 258/757] move target/linux/image to target/image SVN-Revision: 4040 --- openwrt/include/target.mk | 23 +++++++++++++ openwrt/target/Makefile | 13 ++++++-- openwrt/target/{linux => }/image/ar7/Makefile | 0 .../{linux => }/image/ar7/sercomm/adam2.bin | Bin .../{linux => }/image/ar7/sercomm/dg834 | Bin .../{linux => }/image/ar7/sercomm/jdr454wb | Bin .../{linux => }/image/ar7/src/LzmaDecode.c | 0 .../{linux => }/image/ar7/src/LzmaDecode.h | 0 .../target/{linux => }/image/ar7/src/gzip.h | 0 .../{linux => }/image/ar7/src/ld.script.in | 0 .../target/{linux => }/image/ar7/src/loader.c | 0 .../{linux => }/image/ar7/src/srec2bin.c | 0 .../image/ar7/src/zimage.script.in | 0 .../target/{linux => }/image/aruba/Makefile | 0 .../target/{linux => }/image/aruba/addVersion | Bin .../target/{linux => }/image/aruba/version | 0 .../target/{linux => }/image/au1000/Makefile | 0 .../target/{linux => }/image/brcm/Makefile | 0 .../image/brcm/lzma-loader/Makefile | 0 .../image/brcm/lzma-loader/src/LzmaDecode.c | 0 .../image/brcm/lzma-loader/src/LzmaDecode.h | 0 .../image/brcm/lzma-loader/src/Makefile | 0 .../image/brcm/lzma-loader/src/README | 0 .../image/brcm/lzma-loader/src/decompress.c | 0 .../brcm/lzma-loader/src/decompress.lds.in | 0 .../image/brcm/lzma-loader/src/head.S | 0 .../image/brcm/lzma-loader/src/loader.lds.in | 0 .../target/{linux => }/image/generic/Makefile | 0 .../image/generic/lzma-loader/Makefile | 0 .../generic/lzma-loader/src/LzmaDecode.c | 0 .../generic/lzma-loader/src/LzmaDecode.h | 0 .../image/generic/lzma-loader/src/Makefile | 0 .../generic/lzma-loader/src/decompress.c | 0 .../generic/lzma-loader/src/lzma-copy.lds.in | 0 .../image/generic/lzma-loader/src/lzma.lds.in | 0 .../image/generic/lzma-loader/src/print.c | 0 .../image/generic/lzma-loader/src/print.h | 0 .../image/generic/lzma-loader/src/printf.c | 0 .../image/generic/lzma-loader/src/printf.h | 0 .../image/generic/lzma-loader/src/start.S | 0 .../image/generic/lzma-loader/src/uart16550.c | 0 .../image/generic/lzma-loader/src/uart16550.h | 0 .../target/{linux => }/image/rb532/Makefile | 0 openwrt/target/{linux => }/image/x86/Makefile | 0 .../target/{linux => }/image/xscale/Makefile | 0 openwrt/target/linux/Makefile | 31 +----------------- 46 files changed, 35 insertions(+), 32 deletions(-) create mode 100644 openwrt/include/target.mk rename openwrt/target/{linux => }/image/ar7/Makefile (100%) rename openwrt/target/{linux => }/image/ar7/sercomm/adam2.bin (100%) rename openwrt/target/{linux => }/image/ar7/sercomm/dg834 (100%) rename openwrt/target/{linux => }/image/ar7/sercomm/jdr454wb (100%) rename openwrt/target/{linux => }/image/ar7/src/LzmaDecode.c (100%) rename openwrt/target/{linux => }/image/ar7/src/LzmaDecode.h (100%) rename openwrt/target/{linux => }/image/ar7/src/gzip.h (100%) rename openwrt/target/{linux => }/image/ar7/src/ld.script.in (100%) rename openwrt/target/{linux => }/image/ar7/src/loader.c (100%) rename openwrt/target/{linux => }/image/ar7/src/srec2bin.c (100%) rename openwrt/target/{linux => }/image/ar7/src/zimage.script.in (100%) rename openwrt/target/{linux => }/image/aruba/Makefile (100%) rename openwrt/target/{linux => }/image/aruba/addVersion (100%) rename openwrt/target/{linux => }/image/aruba/version (100%) rename openwrt/target/{linux => }/image/au1000/Makefile (100%) rename openwrt/target/{linux => }/image/brcm/Makefile (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/Makefile (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/src/LzmaDecode.c (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/src/LzmaDecode.h (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/src/Makefile (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/src/README (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/src/decompress.c (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/src/decompress.lds.in (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/src/head.S (100%) rename openwrt/target/{linux => }/image/brcm/lzma-loader/src/loader.lds.in (100%) rename openwrt/target/{linux => }/image/generic/Makefile (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/Makefile (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/LzmaDecode.c (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/LzmaDecode.h (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/Makefile (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/decompress.c (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/lzma-copy.lds.in (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/lzma.lds.in (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/print.c (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/print.h (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/printf.c (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/printf.h (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/start.S (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/uart16550.c (100%) rename openwrt/target/{linux => }/image/generic/lzma-loader/src/uart16550.h (100%) rename openwrt/target/{linux => }/image/rb532/Makefile (100%) rename openwrt/target/{linux => }/image/x86/Makefile (100%) rename openwrt/target/{linux => }/image/xscale/Makefile (100%) diff --git a/openwrt/include/target.mk b/openwrt/include/target.mk new file mode 100644 index 00000000000..afdf5d8ae69 --- /dev/null +++ b/openwrt/include/target.mk @@ -0,0 +1,23 @@ +define kernel_template +ifeq ($(CONFIG_LINUX_$(3)),y) +KERNEL:=$(1) +BOARD:=$(2) +endif +endef + +$(eval $(call kernel_template,2.4,brcm,2_4_BRCM)) +$(eval $(call kernel_template,2.4,ar7,2_4_AR7)) +$(eval $(call kernel_template,2.4,x86,2_4_X86)) +$(eval $(call kernel_template,2.6,brcm,2_6_BRCM)) +$(eval $(call kernel_template,2.6,rb532,2_6_RB532)) +$(eval $(call kernel_template,2.6,x86,2_6_X86)) +$(eval $(call kernel_template,2.4,ar531x,2_4_AR531X)) +$(eval $(call kernel_template,2.6,aruba,2_6_ARUBA)) +$(eval $(call kernel_template,2.6,au1000,2_6_AU1000)) +$(eval $(call kernel_template,2.6,xscale,2_6_XSCALE)) +$(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE)) + +export BOARD +export KERNEL + + diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 0a1434472a8..836469d171b 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -1,4 +1,5 @@ include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/target.mk all: install @@ -11,15 +12,23 @@ TARGETS-$(CONFIG_SDK) += sdk linux-compile: utils-install linux-install: $(BIN_DIR) sdk-compile: linux-install +image_install: linux-install download: $(patsubst %,%-source,$(TARGETS-y)) prepare: linux-prepare -compile: linux-compile -install: image_clean $(patsubst %,%-install,$(TARGETS-y)) +compile: linux-compile image_compile +install: image_clean $(patsubst %,%-install,$(TARGETS-y)) image_install clean: $(patsubst %,%-clean,$(TARGETS-y)) image_clean image_clean: FORCE + $(MAKE) -C image/$(BOARD) clean rm -f $(BIN_DIR)/openwrt-* + +image_compile: FORCE + $(MAKE) -C image/$(BOARD) compile + +image_install: image_compile + $(MAKE) -C image/$(BOARD) install %-clean: FORCE $(MAKE) -C $(patsubst %-clean,%,$@) clean diff --git a/openwrt/target/linux/image/ar7/Makefile b/openwrt/target/image/ar7/Makefile similarity index 100% rename from openwrt/target/linux/image/ar7/Makefile rename to openwrt/target/image/ar7/Makefile diff --git a/openwrt/target/linux/image/ar7/sercomm/adam2.bin b/openwrt/target/image/ar7/sercomm/adam2.bin similarity index 100% rename from openwrt/target/linux/image/ar7/sercomm/adam2.bin rename to openwrt/target/image/ar7/sercomm/adam2.bin diff --git a/openwrt/target/linux/image/ar7/sercomm/dg834 b/openwrt/target/image/ar7/sercomm/dg834 similarity index 100% rename from openwrt/target/linux/image/ar7/sercomm/dg834 rename to openwrt/target/image/ar7/sercomm/dg834 diff --git a/openwrt/target/linux/image/ar7/sercomm/jdr454wb b/openwrt/target/image/ar7/sercomm/jdr454wb similarity index 100% rename from openwrt/target/linux/image/ar7/sercomm/jdr454wb rename to openwrt/target/image/ar7/sercomm/jdr454wb diff --git a/openwrt/target/linux/image/ar7/src/LzmaDecode.c b/openwrt/target/image/ar7/src/LzmaDecode.c similarity index 100% rename from openwrt/target/linux/image/ar7/src/LzmaDecode.c rename to openwrt/target/image/ar7/src/LzmaDecode.c diff --git a/openwrt/target/linux/image/ar7/src/LzmaDecode.h b/openwrt/target/image/ar7/src/LzmaDecode.h similarity index 100% rename from openwrt/target/linux/image/ar7/src/LzmaDecode.h rename to openwrt/target/image/ar7/src/LzmaDecode.h diff --git a/openwrt/target/linux/image/ar7/src/gzip.h b/openwrt/target/image/ar7/src/gzip.h similarity index 100% rename from openwrt/target/linux/image/ar7/src/gzip.h rename to openwrt/target/image/ar7/src/gzip.h diff --git a/openwrt/target/linux/image/ar7/src/ld.script.in b/openwrt/target/image/ar7/src/ld.script.in similarity index 100% rename from openwrt/target/linux/image/ar7/src/ld.script.in rename to openwrt/target/image/ar7/src/ld.script.in diff --git a/openwrt/target/linux/image/ar7/src/loader.c b/openwrt/target/image/ar7/src/loader.c similarity index 100% rename from openwrt/target/linux/image/ar7/src/loader.c rename to openwrt/target/image/ar7/src/loader.c diff --git a/openwrt/target/linux/image/ar7/src/srec2bin.c b/openwrt/target/image/ar7/src/srec2bin.c similarity index 100% rename from openwrt/target/linux/image/ar7/src/srec2bin.c rename to openwrt/target/image/ar7/src/srec2bin.c diff --git a/openwrt/target/linux/image/ar7/src/zimage.script.in b/openwrt/target/image/ar7/src/zimage.script.in similarity index 100% rename from openwrt/target/linux/image/ar7/src/zimage.script.in rename to openwrt/target/image/ar7/src/zimage.script.in diff --git a/openwrt/target/linux/image/aruba/Makefile b/openwrt/target/image/aruba/Makefile similarity index 100% rename from openwrt/target/linux/image/aruba/Makefile rename to openwrt/target/image/aruba/Makefile diff --git a/openwrt/target/linux/image/aruba/addVersion b/openwrt/target/image/aruba/addVersion similarity index 100% rename from openwrt/target/linux/image/aruba/addVersion rename to openwrt/target/image/aruba/addVersion diff --git a/openwrt/target/linux/image/aruba/version b/openwrt/target/image/aruba/version similarity index 100% rename from openwrt/target/linux/image/aruba/version rename to openwrt/target/image/aruba/version diff --git a/openwrt/target/linux/image/au1000/Makefile b/openwrt/target/image/au1000/Makefile similarity index 100% rename from openwrt/target/linux/image/au1000/Makefile rename to openwrt/target/image/au1000/Makefile diff --git a/openwrt/target/linux/image/brcm/Makefile b/openwrt/target/image/brcm/Makefile similarity index 100% rename from openwrt/target/linux/image/brcm/Makefile rename to openwrt/target/image/brcm/Makefile diff --git a/openwrt/target/linux/image/brcm/lzma-loader/Makefile b/openwrt/target/image/brcm/lzma-loader/Makefile similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/Makefile rename to openwrt/target/image/brcm/lzma-loader/Makefile diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/LzmaDecode.c b/openwrt/target/image/brcm/lzma-loader/src/LzmaDecode.c similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/src/LzmaDecode.c rename to openwrt/target/image/brcm/lzma-loader/src/LzmaDecode.c diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/LzmaDecode.h b/openwrt/target/image/brcm/lzma-loader/src/LzmaDecode.h similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/src/LzmaDecode.h rename to openwrt/target/image/brcm/lzma-loader/src/LzmaDecode.h diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/Makefile b/openwrt/target/image/brcm/lzma-loader/src/Makefile similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/src/Makefile rename to openwrt/target/image/brcm/lzma-loader/src/Makefile diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/README b/openwrt/target/image/brcm/lzma-loader/src/README similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/src/README rename to openwrt/target/image/brcm/lzma-loader/src/README diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/decompress.c b/openwrt/target/image/brcm/lzma-loader/src/decompress.c similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/src/decompress.c rename to openwrt/target/image/brcm/lzma-loader/src/decompress.c diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/decompress.lds.in b/openwrt/target/image/brcm/lzma-loader/src/decompress.lds.in similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/src/decompress.lds.in rename to openwrt/target/image/brcm/lzma-loader/src/decompress.lds.in diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/head.S b/openwrt/target/image/brcm/lzma-loader/src/head.S similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/src/head.S rename to openwrt/target/image/brcm/lzma-loader/src/head.S diff --git a/openwrt/target/linux/image/brcm/lzma-loader/src/loader.lds.in b/openwrt/target/image/brcm/lzma-loader/src/loader.lds.in similarity index 100% rename from openwrt/target/linux/image/brcm/lzma-loader/src/loader.lds.in rename to openwrt/target/image/brcm/lzma-loader/src/loader.lds.in diff --git a/openwrt/target/linux/image/generic/Makefile b/openwrt/target/image/generic/Makefile similarity index 100% rename from openwrt/target/linux/image/generic/Makefile rename to openwrt/target/image/generic/Makefile diff --git a/openwrt/target/linux/image/generic/lzma-loader/Makefile b/openwrt/target/image/generic/lzma-loader/Makefile similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/Makefile rename to openwrt/target/image/generic/lzma-loader/Makefile diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/LzmaDecode.c b/openwrt/target/image/generic/lzma-loader/src/LzmaDecode.c similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/LzmaDecode.c rename to openwrt/target/image/generic/lzma-loader/src/LzmaDecode.c diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/LzmaDecode.h b/openwrt/target/image/generic/lzma-loader/src/LzmaDecode.h similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/LzmaDecode.h rename to openwrt/target/image/generic/lzma-loader/src/LzmaDecode.h diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/Makefile b/openwrt/target/image/generic/lzma-loader/src/Makefile similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/Makefile rename to openwrt/target/image/generic/lzma-loader/src/Makefile diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/decompress.c b/openwrt/target/image/generic/lzma-loader/src/decompress.c similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/decompress.c rename to openwrt/target/image/generic/lzma-loader/src/decompress.c diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/lzma-copy.lds.in b/openwrt/target/image/generic/lzma-loader/src/lzma-copy.lds.in similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/lzma-copy.lds.in rename to openwrt/target/image/generic/lzma-loader/src/lzma-copy.lds.in diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/lzma.lds.in b/openwrt/target/image/generic/lzma-loader/src/lzma.lds.in similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/lzma.lds.in rename to openwrt/target/image/generic/lzma-loader/src/lzma.lds.in diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/print.c b/openwrt/target/image/generic/lzma-loader/src/print.c similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/print.c rename to openwrt/target/image/generic/lzma-loader/src/print.c diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/print.h b/openwrt/target/image/generic/lzma-loader/src/print.h similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/print.h rename to openwrt/target/image/generic/lzma-loader/src/print.h diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/printf.c b/openwrt/target/image/generic/lzma-loader/src/printf.c similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/printf.c rename to openwrt/target/image/generic/lzma-loader/src/printf.c diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/printf.h b/openwrt/target/image/generic/lzma-loader/src/printf.h similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/printf.h rename to openwrt/target/image/generic/lzma-loader/src/printf.h diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/start.S b/openwrt/target/image/generic/lzma-loader/src/start.S similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/start.S rename to openwrt/target/image/generic/lzma-loader/src/start.S diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/uart16550.c b/openwrt/target/image/generic/lzma-loader/src/uart16550.c similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/uart16550.c rename to openwrt/target/image/generic/lzma-loader/src/uart16550.c diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/uart16550.h b/openwrt/target/image/generic/lzma-loader/src/uart16550.h similarity index 100% rename from openwrt/target/linux/image/generic/lzma-loader/src/uart16550.h rename to openwrt/target/image/generic/lzma-loader/src/uart16550.h diff --git a/openwrt/target/linux/image/rb532/Makefile b/openwrt/target/image/rb532/Makefile similarity index 100% rename from openwrt/target/linux/image/rb532/Makefile rename to openwrt/target/image/rb532/Makefile diff --git a/openwrt/target/linux/image/x86/Makefile b/openwrt/target/image/x86/Makefile similarity index 100% rename from openwrt/target/linux/image/x86/Makefile rename to openwrt/target/image/x86/Makefile diff --git a/openwrt/target/linux/image/xscale/Makefile b/openwrt/target/image/xscale/Makefile similarity index 100% rename from openwrt/target/linux/image/xscale/Makefile rename to openwrt/target/image/xscale/Makefile diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index e1a314d1d83..bab26845a15 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -1,33 +1,8 @@ include $(TOPDIR)/rules.mk - -PKG_OS:=$(shell uname -s) -PKG_CPU:=$(shell uname -m) - -define kernel_template -ifeq ($(CONFIG_LINUX_$(3)),y) -KERNEL:=$(1) -BOARD:=$(2) -endif -endef - -$(eval $(call kernel_template,2.4,brcm,2_4_BRCM)) -$(eval $(call kernel_template,2.4,ar7,2_4_AR7)) -$(eval $(call kernel_template,2.4,x86,2_4_X86)) -$(eval $(call kernel_template,2.6,brcm,2_6_BRCM)) -$(eval $(call kernel_template,2.6,rb532,2_6_RB532)) -$(eval $(call kernel_template,2.6,x86,2_6_X86)) -$(eval $(call kernel_template,2.4,ar531x,2_4_AR531X)) -$(eval $(call kernel_template,2.6,aruba,2_6_ARUBA)) -$(eval $(call kernel_template,2.6,au1000,2_6_AU1000)) -$(eval $(call kernel_template,2.6,xscale,2_6_XSCALE)) -$(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE)) - -export BOARD -export KERNEL +include $(INCLUDE_DIR)/target.mk source: $(MAKE) -C $(BOARD)-$(KERNEL) source - $(MAKE) -C image/$(BOARD) source prepare: rm -f $(TOPDIR)/.kernel.mk @@ -38,10 +13,6 @@ compile: install: $(MAKE) -C $(BOARD)-$(KERNEL) install - $(MAKE) -C image/$(BOARD) install clean: $(MAKE) -C $(BOARD)-$(KERNEL) clean - -image/%: - $(MAKE) -C image $(patsubst image/%,%,$@) From 76872dcad5659fe6b13bb10584a1743895cabee0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 14:04:12 +0000 Subject: [PATCH 259/757] move uClibc/files/config.* to uClibc/config/* and allow board-specific config overrides SVN-Revision: 4041 --- openwrt/toolchain/uClibc/Makefile | 7 ++++++- .../toolchain/uClibc/{files/config.i386 => config/i386} | 0 .../toolchain/uClibc/{files/config.mips => config/mips} | 0 .../uClibc/{files/config.mipsel => config/mipsel} | 0 .../uClibc/{files/config.powerpc => config/powerpc} | 0 5 files changed, 6 insertions(+), 1 deletion(-) rename openwrt/toolchain/uClibc/{files/config.i386 => config/i386} (100%) rename openwrt/toolchain/uClibc/{files/config.mips => config/mips} (100%) rename openwrt/toolchain/uClibc/{files/config.mipsel => config/mipsel} (100%) rename openwrt/toolchain/uClibc/{files/config.powerpc => config/powerpc} (100%) diff --git a/openwrt/toolchain/uClibc/Makefile b/openwrt/toolchain/uClibc/Makefile index 22c59134573..1499573cedc 100644 --- a/openwrt/toolchain/uClibc/Makefile +++ b/openwrt/toolchain/uClibc/Makefile @@ -1,4 +1,5 @@ include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/target.mk PKG_NAME:=uClibc PKG_VERSION:=0.9.28 @@ -29,7 +30,11 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ define Build/Prepare $(call Build/Prepare/Default) $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak - $(CP) ./files/config.$(ARCH) $(PKG_BUILD_DIR)/.config + if [ -e config/$(ARCH).$(BOARD) ]; then \ + $(CP) config/$(ARCH).$(BOARD) $(PKG_BUILD_DIR)/.config; \ + else \ + $(CP) config/$(ARCH) $(PKG_BUILD_DIR)/.config; \ + fi $(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \ $(PKG_BUILD_DIR)/.config ifeq ($(CONFIG_LARGEFILE),y) diff --git a/openwrt/toolchain/uClibc/files/config.i386 b/openwrt/toolchain/uClibc/config/i386 similarity index 100% rename from openwrt/toolchain/uClibc/files/config.i386 rename to openwrt/toolchain/uClibc/config/i386 diff --git a/openwrt/toolchain/uClibc/files/config.mips b/openwrt/toolchain/uClibc/config/mips similarity index 100% rename from openwrt/toolchain/uClibc/files/config.mips rename to openwrt/toolchain/uClibc/config/mips diff --git a/openwrt/toolchain/uClibc/files/config.mipsel b/openwrt/toolchain/uClibc/config/mipsel similarity index 100% rename from openwrt/toolchain/uClibc/files/config.mipsel rename to openwrt/toolchain/uClibc/config/mipsel diff --git a/openwrt/toolchain/uClibc/files/config.powerpc b/openwrt/toolchain/uClibc/config/powerpc similarity index 100% rename from openwrt/toolchain/uClibc/files/config.powerpc rename to openwrt/toolchain/uClibc/config/powerpc From 37334222488481b6b03a7ae5578dce4aba796ddc Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 19:57:41 +0000 Subject: [PATCH 260/757] move jffs2 end-of-filesystem detection to the generic 2.6 patches SVN-Revision: 4042 --- .../patches/204-jffs2_eofdetect.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename openwrt/target/linux/{rb532-2.6/patches/140-jffs2_eofdetect.patch => generic-2.6/patches/204-jffs2_eofdetect.patch} (100%) diff --git a/openwrt/target/linux/rb532-2.6/patches/140-jffs2_eofdetect.patch b/openwrt/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch similarity index 100% rename from openwrt/target/linux/rb532-2.6/patches/140-jffs2_eofdetect.patch rename to openwrt/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch From ee438066a30fdc46269b927cb86939bd1d43acbb Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 21 Jun 2006 20:09:34 +0000 Subject: [PATCH 261/757] add STRIP to TARGET_CONFIGURE_OPTS (closes #606) SVN-Revision: 4043 --- openwrt/rules.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 3f96d320e7b..c8d823ff637 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -92,7 +92,8 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ CC=$(TARGET_CROSS)gcc \ GCC=$(TARGET_CROSS)gcc \ CXX=$(TARGET_CROSS)g++ \ - RANLIB=$(TARGET_CROSS)ranlib + RANLIB=$(TARGET_CROSS)ranlib \ + STRIP=$(TARGET_CROSS)strip ifeq ($(ENABLE_LOCALE),true) DISABLE_NLS:= From 62b5f4818e793322a71026a9fbcc8860e2a9deca Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 22:30:26 +0000 Subject: [PATCH 262/757] backport jffs2 eofdetect patch to linux 2.4 SVN-Revision: 4044 --- .../patches/227-jffs2_eofdetect.patch | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch diff --git a/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch b/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch new file mode 100644 index 00000000000..6288bd5753e --- /dev/null +++ b/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch @@ -0,0 +1,87 @@ +diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c +--- linux.old/fs/jffs2/scan.c 2003-11-28 19:26:21.000000000 +0100 ++++ linux.dev/fs/jffs2/scan.c 2006-06-22 00:29:02.000000000 +0200 +@@ -31,6 +31,10 @@ + * provisions above, a recipient may use your version of this file + * under either the RHEPL or the GPL. + * ++ * Modification for automatically cleaning the filesystem after ++ * a specially marked block ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> ++ * + * $Id: scan.c,v 1.51.2.4 2003/11/02 13:51:18 dwmw2 Exp $ + * + */ +@@ -88,7 +92,12 @@ + for (i=0; i<c->nr_blocks; i++) { + struct jffs2_eraseblock *jeb = &c->blocks[i]; + +- ret = jffs2_scan_eraseblock(c, jeb); ++ ++ if (c->flags & (1 << 7)) ++ ret = 1; ++ else ++ ret = jffs2_scan_eraseblock(c, jeb); ++ + if (ret < 0) + return ret; + +@@ -145,15 +154,22 @@ + c->nr_erasing_blocks++; + } + } +- /* Rotate the lists by some number to ensure wear levelling */ +- jffs2_rotate_lists(c); + +- if (c->nr_erasing_blocks) { +- if (!c->used_size && empty_blocks != c->nr_blocks) { +- printk(KERN_NOTICE "Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes\n"); +- return -EIO; ++ if (c->flags & (1 << 7)) { ++ printk("jffs2_scan_medium(): erasing all blocks after the end marker...\n"); ++ jffs2_erase_pending_blocks(c); ++ printk("jffs2_scan_medium(): done.\n"); ++ } else { ++ /* Rotate the lists by some number to ensure wear levelling */ ++ jffs2_rotate_lists(c); ++ ++ if (c->nr_erasing_blocks) { ++ if (!c->used_size && empty_blocks != c->nr_blocks) { ++ printk(KERN_NOTICE "Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes\n"); ++ return -EIO; ++ } ++ jffs2_erase_pending_trigger(c); + } +- jffs2_erase_pending_trigger(c); + } + return 0; + } +@@ -181,6 +197,7 @@ + + while(ofs < jeb->offset + c->sector_size) { + ssize_t retlen; ++ unsigned char *buf = (unsigned char *) &node; + ACCT_PARANOIA_CHECK(jeb); + + if (ofs & 3) { +@@ -202,8 +219,18 @@ + break; + } + +- err = c->mtd->read(c->mtd, ofs, sizeof(node), &retlen, (char *)&node); ++ err = c->mtd->read(c->mtd, ofs, sizeof(node), &retlen, buf); ++ if ((buf[0] == 0xde) && ++ (buf[1] == 0xad) && ++ (buf[2] == 0xc0) && ++ (buf[3] == 0xde)) { ++ ++ /* end of filesystem. erase everything after this point */ ++ c->flags |= (1 << 7); ++ printk("jffs2_scan_eraseblock(): End of filesystem marker found at 0x%x\n", jeb->offset); + ++ return 1; ++ } + if (err) { + D1(printk(KERN_WARNING "mtd->read(0x%x bytes from 0x%x) returned %d\n", sizeof(node), ofs, err)); + return err; + From 858ab2e3f9a27fe59cad14c81cb219f5889429ff Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 21 Jun 2006 23:27:47 +0000 Subject: [PATCH 263/757] avoid includes that aren't required for current target (make download) SVN-Revision: 4045 --- openwrt/package/iptables/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index f1a7de1f4b0..35bba6dacb2 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -21,10 +21,6 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_MENU:=IPv4 / IPv6 firewall administration include $(INCLUDE_DIR)/package.mk -ifeq ($(DUMP),) -include $(LINUX_DIR)/.config -include $(INCLUDE_DIR)/netfilter.mk -endif define Package/iptables SECTION:=net @@ -213,6 +209,9 @@ define Package/ip6tables/install endef define BuildPlugin +include $(LINUX_DIR)/.config +include $(INCLUDE_DIR)/netfilter.mk + define Package/$(1)/install install -m0755 -d $$(1)/usr/lib/iptables for m in $$(patsubst xt_%,ipt_%,$(2)); do \ From 32a56766a8fd913e6bb2e228e687aa3a3b3d9dc2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 21 Jun 2006 23:45:47 +0000 Subject: [PATCH 264/757] revert last change and add a different fix SVN-Revision: 4046 --- openwrt/package/iptables/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 35bba6dacb2..f8f590991af 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -21,6 +21,10 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_MENU:=IPv4 / IPv6 firewall administration include $(INCLUDE_DIR)/package.mk +ifeq ($(DUMP),) +-include $(LINUX_DIR)/.config +include $(INCLUDE_DIR)/netfilter.mk +endif define Package/iptables SECTION:=net @@ -209,9 +213,6 @@ define Package/ip6tables/install endef define BuildPlugin -include $(LINUX_DIR)/.config -include $(INCLUDE_DIR)/netfilter.mk - define Package/$(1)/install install -m0755 -d $$(1)/usr/lib/iptables for m in $$(patsubst xt_%,ipt_%,$(2)); do \ From f6d85c09dd3a588e7afb72d0bb9c4120499c0ed4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 22 Jun 2006 00:07:36 +0000 Subject: [PATCH 265/757] sstrip binaries that have been stripped by the regular strip before SVN-Revision: 4047 --- openwrt/scripts/rstrip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/scripts/rstrip.sh b/openwrt/scripts/rstrip.sh index f71aaaf4f9f..619af00d535 100755 --- a/openwrt/scripts/rstrip.sh +++ b/openwrt/scripts/rstrip.sh @@ -16,7 +16,7 @@ TARGETS=$* } find $TARGETS -type f -a -exec file {} \; | \ - sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*, not stripped/\1:\2/p' | \ + sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*,.* stripped/\1:\2/p' | \ ( IFS=":" while read F S; do From 03c1cb3444dcfe4bcc8df3f7eead9ba681324055 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 22 Jun 2006 00:59:47 +0000 Subject: [PATCH 266/757] add 0xdeadc0de to the jffs2 filesystem images SVN-Revision: 4048 --- openwrt/include/image.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk index f30f0997eee..bf80e279902 100644 --- a/openwrt/include/image.mk +++ b/openwrt/include/image.mk @@ -17,6 +17,10 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root + + # add End-of-Filesystem markers + echo -ne '\xde\xad\xc0\xde' >> $(KDIR)/root.jffs2-64k + echo -ne '\xde\xad\xc0\xde' >> $(KDIR)/root.jffs2-128k $(call Image/Build,jffs2-64k) $(call Image/Build,jffs2-128k) From 373a64d3f784fff0f816d77d68ca0f3abfc16fa8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 22 Jun 2006 01:00:13 +0000 Subject: [PATCH 267/757] remove stale reference to package/rules.mk - not that useful in the dependency handling anyway SVN-Revision: 4049 --- openwrt/include/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 9b863074f91..cf8756ea63e 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -6,7 +6,7 @@ endif define Build/DefaultTargets ifeq ($(DUMP),) - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(TOPDIR)/package/rules.mk),$(PKG_BUILD_DIR)) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR)) ifeq ($(CONFIG_AUTOREBUILD),y) $(PKG_BUILD_DIR)/.prepared: package-clean endif From a05b20431385952f5b2ab3a7b99d0202c1452d90 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 22 Jun 2006 22:32:51 +0000 Subject: [PATCH 268/757] cosmetic fix for irq error messages SVN-Revision: 4050 --- openwrt/target/linux/aruba-2.6/patches/002-irq.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/aruba-2.6/patches/002-irq.patch b/openwrt/target/linux/aruba-2.6/patches/002-irq.patch index 6ddc154ac95..101ed78a55a 100644 --- a/openwrt/target/linux/aruba-2.6/patches/002-irq.patch +++ b/openwrt/target/linux/aruba-2.6/patches/002-irq.patch @@ -366,7 +366,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/irq.c linux-2.6.17-openwrt/arch/mips/arub + unsigned long cp0_cause = read_c0_cause() & read_c0_status() & CAUSEF_IP; + + if (cp0_cause & CAUSEF_IP7) -+ aruba_timer_interrupt(regs); ++ return aruba_timer_interrupt(regs); + + if(cp0_cause == 0) { + printk("INTERRUPT(S) FIRED WHILE MASKED\n"); From e6dd6901e6a0937f1bf63ed0013fc32b61a584ef Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 22 Jun 2006 22:33:56 +0000 Subject: [PATCH 269/757] cleanup SVN-Revision: 4051 --- openwrt/rules.mk | 155 ++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 82 deletions(-) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index c8d823ff637..d762ae79ed4 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -1,119 +1,110 @@ -ifeq ($(DUMP),) -include $(TOPDIR)/.config -endif +-include $(TOPDIR)/.config -SHELL=/bin/bash -export SHELL +export SHELL=/bin/bash -ifdef V - ifeq ("$(origin V)", "command line") - KBUILD_VERBOSE = $(V) - endif -endif -ifndef KBUILD_VERBOSE - KBUILD_VERBOSE = 0 -endif - -ifneq ($(KBUILD_VERBOSE),0) - quiet = - Q = -else - quiet=quiet_ - Q = @ -endif - - -CP=cp -fpR -BUILD_MAKEFLAGS= V=$(V) $(EXTRA_MAKEFLAGS) -MAKEFLAGS=$(BUILD_MAKEFLAGS) -# Strip off the annoying quoting ARCH:=$(strip $(subst ",, $(CONFIG_ARCH))) -WGET:=$(strip $(subst ",, $(CONFIG_WGET))) TARGET_OPTIMIZATION:=$(strip $(subst ",, $(CONFIG_TARGET_OPTIMIZATION))) -#"))"))"))"))")) # for vim's broken syntax highlighting :) +WGET:=$(strip $(subst ",, $(CONFIG_WGET))) +#"))"))")) # fix vim's broken syntax highlighting -ifeq ($(CONFIG_TAR_VERBOSITY),y) -TAR_OPTIONS=-xvf -else -TAR_OPTIONS=-xf -endif +OPTIMIZE_FOR_CPU:=$(ARCH) -ifneq ($(CONFIG_LARGEFILE),y) -DISABLE_LARGEFILE= --disable-largefile -endif -TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) +# DIRECTORIES # -OPTIMIZE_FOR_CPU=$(ARCH) -HOSTCC:=gcc -BASE_DIR:=$(TOPDIR) +DL_DIR:=$(TOPDIR)/dl INCLUDE_DIR:=$(TOPDIR)/include -DL_DIR:=$(BASE_DIR)/dl -BUILD_DIR:=$(BASE_DIR)/build_$(ARCH) -STAGING_DIR:=$(BASE_DIR)/staging_dir_$(ARCH) -SCRIPT_DIR:=$(BASE_DIR)/scripts -BIN_DIR:=$(BASE_DIR)/bin -STAMP_DIR:=$(BUILD_DIR)/stamp +SCRIPT_DIR:=$(TOPDIR)/scripts +TOOL_BUILD_DIR:=$(TOPDIR)/toolchain_build_$(ARCH) +STAGING_DIR:=$(TOPDIR)/staging_dir_$(ARCH) +BIN_DIR:=$(TOPDIR)/bin PACKAGE_DIR:=$(BIN_DIR)/packages +IPKG_TARGET_DIR:=$(PACKAGE_DIR) +BUILD_DIR:=$(TOPDIR)/build_$(ARCH) STAMP_DIR:=$(BUILD_DIR)/stamp TARGET_DIR:=$(BUILD_DIR)/root -TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH) -TARGET_PATH=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin -IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) +IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg + REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux KERNEL_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- TARGET_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- -TARGET_CC:=$(TARGET_CROSS)gcc -STRIP:=$(STAGING_DIR)/bin/sstrip -PATCH=$(SCRIPT_DIR)/patch-kernel.sh -SED:=$(STAGING_DIR)/bin/sed -i -e +IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) + +TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin +TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) + LINUX_DIR:=$(BUILD_DIR)/linux LINUX_HEADERS_DIR:=$(TOOL_BUILD_DIR)/linux +# APPLICATIONS # +HOSTCC:=gcc +TARGET_CC:=$(TARGET_CROSS)gcc +STRIP:=$(STAGING_DIR)/bin/sstrip +PATCH:=$(SCRIPT_DIR)/patch-kernel.sh +SED:=$(STAGING_DIR)/bin/sed -i -e +CP:=cp -fpR HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ -e 's/sparc.*/sparc/' \ - -e 's/arm.*/arm/g' \ + -e 's/arm.*/arm/' \ -e 's/m68k.*/m68k/' \ - -e 's/ppc/powerpc/g' \ - -e 's/v850.*/v850/g' \ + -e 's/ppc/powerpc/' \ + -e 's/v850.*/v850/' \ -e 's/sh[234]/sh/' \ -e 's/mips-.*/mips/' \ -e 's/mipsel-.*/mipsel/' \ -e 's/cris.*/cris/' \ -e 's/i[3-9]86/i386/' \ ) + GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu -TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ - AR=$(TARGET_CROSS)ar \ - AS=$(TARGET_CROSS)as \ - LD=$(TARGET_CROSS)ld \ - NM=$(TARGET_CROSS)nm \ - CC=$(TARGET_CROSS)gcc \ - GCC=$(TARGET_CROSS)gcc \ - CXX=$(TARGET_CROSS)g++ \ - RANLIB=$(TARGET_CROSS)ranlib \ - STRIP=$(TARGET_CROSS)strip -ifeq ($(ENABLE_LOCALE),true) -DISABLE_NLS:= -else -DISABLE_NLS:=--disable-nls -endif +TARGET_CONFIGURE_OPTS:= \ + PATH=$(TARGET_PATH) \ + AR=$(TARGET_CROSS)ar \ + AS=$(TARGET_CROSS)as \ + LD=$(TARGET_CROSS)ld \ + NM=$(TARGET_CROSS)nm \ + CC=$(TARGET_CROSS)gcc \ + GCC=$(TARGET_CROSS)gcc \ + CXX=$(TARGET_CROSS)g++ \ + RANLIB=$(TARGET_CROSS)ranlib \ + STRIP=$(TARGET_CROSS)strip -ifeq ($(CONFIG_ENABLE_MULTILIB),y) -MULTILIB:=--enable-multilib -endif +# strip an entire directory +RSTRIP:= \ + STRIP="$(STRIP)" \ + STRIP_KMOD="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" \ + $(SCRIPT_DIR)/rstrip.sh + +# where to build (and put) .ipk packages +IPKG:= \ + IPKG_TMP=$(BUILD_DIR)/tmp \ + IPKG_INSTROOT=$(TARGET_DIR) \ + IPKG_CONF_DIR=$(STAGING_DIR)/etc \ + IPKG_OFFLINE_ROOT=$(BUILD_DIR)/root \ + $(SCRIPT_DIR)/ipkg -force-defaults -force-depends # invoke ipkg-build with some default options -IPKG_BUILD := PATH="$(TARGET_PATH)" ipkg-build -c -o root -g root -# where to build (and put) .ipk packages -IPKG_TARGET_DIR := $(PACKAGE_DIR) -IPKG:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(TARGET_DIR) IPKG_CONF_DIR=$(STAGING_DIR)/etc IPKG_OFFLINE_ROOT=$(BUILD_DIR)/root $(SCRIPT_DIR)/ipkg -force-defaults -force-depends -IPKG_STATE_DIR := $(TARGET_DIR)/usr/lib/ipkg +IPKG_BUILD:= \ + PATH="$(TARGET_PATH)" ipkg-build -c -o root -g root -RSTRIP:=STRIP="$(STRIP)" STRIP_KMOD="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" $(SCRIPT_DIR)/rstrip.sh +ifeq ($(CONFIG_ENABLE_LOCALE),true) + DISABLE_NLS:= +else + DISABLE_NLS:=--disable-nls +endif + +ifneq ($(CONFIG_LARGEFILE),y) + DISABLE_LARGEFILE= --disable-largefile +endif + +ifeq ($(CONFIG_TAR_VERBOSITY),y) + TAR_OPTIONS=-xvf +else + TAR_OPTIONS=-xf +endif all: +FORCE: ; .PHONY: FORCE -FORCE: From f2113df321e059913fa3220f3fb0cf0cbc2c64ba Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 00:04:24 +0000 Subject: [PATCH 270/757] set defaults for .pkginfo SVN-Revision: 4052 --- openwrt/include/kernel.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index 5c64ee4e12c..8492998020c 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -1,7 +1,10 @@ +KERNEL:=kernel +BOARD:=board +LINUX_VERSION:=kernel + ifneq ($(DUMP),1) include $(TOPDIR)/.kernel.mk -KERNEL:=unknown ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) KERNEL:=2.4 LINUX_KMOD_SUFFIX=o From a9aeddb065f388787a6f75533c383ed55956b02a Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 00:49:42 +0000 Subject: [PATCH 271/757] .pkginfo cleanup #2 SVN-Revision: 4053 --- openwrt/include/kernel-build.mk | 2 +- openwrt/include/kernel.mk | 12 ++++++------ openwrt/package/base-files/Makefile | 3 +++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index fc62127ca26..d3c47281faa 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -1,4 +1,4 @@ -include $(INCLUDE_DIR)/modules-$(KERNEL).mk +-include $(INCLUDE_DIR)/modules-$(KERNEL).mk LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index 8492998020c..c110f687a34 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -1,9 +1,9 @@ -KERNEL:=kernel -BOARD:=board -LINUX_VERSION:=kernel - -ifneq ($(DUMP),1) -include $(TOPDIR)/.kernel.mk +ifeq ($(DUMP),1) + KERNEL:=<KERNEL> + BOARD:=<BOARD> + LINUX_VERSION:=<LINUX_VERSION> +else +-include $(TOPDIR)/.kernel.mk ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) KERNEL:=2.4 diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 7db0d0503cf..f81c681c264 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -18,6 +18,9 @@ ifneq ($(DUMP),1) TARGET:=-$(BOARD)-$(KERNEL) UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +else +UCLIBC_VERSION:=<UCLIBC_VERSION> +LIBGCC_VERSION:=<LIBGCC_VERSION> endif CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) From 98bdf458d53d073c6be4958e8d28aaa6d89d8bed Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 16:28:12 +0000 Subject: [PATCH 272/757] jffs2 eof detect: mark erased blocks after erasing them SVN-Revision: 4054 --- .../target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch b/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch index 6288bd5753e..ad0ac0c23ee 100644 --- a/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch +++ b/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch @@ -26,7 +26,7 @@ diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c if (ret < 0) return ret; -@@ -145,15 +154,22 @@ +@@ -145,15 +154,23 @@ c->nr_erasing_blocks++; } } @@ -40,6 +40,7 @@ diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c + if (c->flags & (1 << 7)) { + printk("jffs2_scan_medium(): erasing all blocks after the end marker...\n"); + jffs2_erase_pending_blocks(c); ++ jffs2_mark_erased_blocks(c); + printk("jffs2_scan_medium(): done.\n"); + } else { + /* Rotate the lists by some number to ensure wear levelling */ From f963856ef3b32d6480dd05e326e75229652caa6c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 16:30:30 +0000 Subject: [PATCH 273/757] broadcom 2.4: update the trx for jffs2 directly in the flash map driver SVN-Revision: 4055 --- .../linux/brcm-2.4/patches/004-flash.patch | 206 ++++++++++++++---- 1 file changed, 167 insertions(+), 39 deletions(-) diff --git a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch index 3511091ed23..4fbf3da7e9f 100644 --- a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch +++ b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch @@ -1,6 +1,6 @@ -diff -Nur linux-2.4.32/drivers/mtd/devices/Config.in linux-2.4.32-flash/drivers/mtd/devices/Config.in ---- linux-2.4.32/drivers/mtd/devices/Config.in 2003-06-13 16:51:34.000000000 +0200 -+++ linux-2.4.32-flash/drivers/mtd/devices/Config.in 2006-03-27 17:10:51.000000000 +0200 +diff -urN linux.old/drivers/mtd/devices/Config.in linux.dev/drivers/mtd/devices/Config.in +--- linux.old/drivers/mtd/devices/Config.in 2006-06-22 17:35:39.000000000 +0200 ++++ linux.dev/drivers/mtd/devices/Config.in 2006-06-21 21:41:24.000000000 +0200 @@ -5,6 +5,7 @@ mainmenu_option next_comment @@ -9,9 +9,9 @@ diff -Nur linux-2.4.32/drivers/mtd/devices/Config.in linux-2.4.32-flash/drivers/ dep_tristate ' Ramix PMC551 PCI Mezzanine RAM card support' CONFIG_MTD_PMC551 $CONFIG_MTD $CONFIG_PCI if [ "$CONFIG_MTD_PMC551" = "y" -o "$CONFIG_MTD_PMC551" = "m" ]; then bool ' PMC551 256M DRAM Bugfix' CONFIG_MTD_PMC551_BUGFIX -diff -Nur linux-2.4.32/drivers/mtd/devices/Makefile linux-2.4.32-flash/drivers/mtd/devices/Makefile ---- linux-2.4.32/drivers/mtd/devices/Makefile 2002-11-29 00:53:13.000000000 +0100 -+++ linux-2.4.32-flash/drivers/mtd/devices/Makefile 2006-03-27 17:10:51.000000000 +0200 +diff -urN linux.old/drivers/mtd/devices/Makefile linux.dev/drivers/mtd/devices/Makefile +--- linux.old/drivers/mtd/devices/Makefile 2006-06-22 17:35:39.000000000 +0200 ++++ linux.dev/drivers/mtd/devices/Makefile 2006-06-21 21:41:24.000000000 +0200 @@ -3,6 +3,8 @@ # # $Id: Makefile,v 1.4 2001/06/26 21:10:05 spse Exp $ @@ -29,9 +29,9 @@ diff -Nur linux-2.4.32/drivers/mtd/devices/Makefile linux-2.4.32-flash/drivers/m obj-$(CONFIG_MTD_DOC1000) += doc1000.o obj-$(CONFIG_MTD_DOC2000) += doc2000.o obj-$(CONFIG_MTD_DOC2001) += doc2001.o -diff -Nur linux-2.4.32/drivers/mtd/devices/sflash.c linux-2.4.32-flash/drivers/mtd/devices/sflash.c ---- linux-2.4.32/drivers/mtd/devices/sflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.4.32-flash/drivers/mtd/devices/sflash.c 2006-03-27 17:10:51.000000000 +0200 +diff -urN linux.old/drivers/mtd/devices/sflash.c linux.dev/drivers/mtd/devices/sflash.c +--- linux.old/drivers/mtd/devices/sflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/mtd/devices/sflash.c 2006-06-21 21:41:24.000000000 +0200 @@ -0,0 +1,298 @@ +/* + * Broadcom SiliconBackplane chipcommon serial flash interface @@ -331,10 +331,10 @@ diff -Nur linux-2.4.32/drivers/mtd/devices/sflash.c linux-2.4.32-flash/drivers/m + +module_init(sflash_mtd_init); +module_exit(sflash_mtd_exit); -diff -Nur linux-2.4.32/drivers/mtd/maps/bcm947xx-flash.c linux-2.4.32-flash/drivers/mtd/maps/bcm947xx-flash.c ---- linux-2.4.32/drivers/mtd/maps/bcm947xx-flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.4.32-flash/drivers/mtd/maps/bcm947xx-flash.c 2006-03-27 17:07:27.000000000 +0200 -@@ -0,0 +1,416 @@ +diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps/bcm947xx-flash.c +--- linux.old/drivers/mtd/maps/bcm947xx-flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/mtd/maps/bcm947xx-flash.c 2006-06-23 18:08:46.000000000 +0200 +@@ -0,0 +1,544 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) + * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org> @@ -377,13 +377,17 @@ diff -Nur linux-2.4.32/drivers/mtd/maps/bcm947xx-flash.c linux-2.4.32-flash/driv +#include <linux/module.h> +#include <linux/types.h> +#include <linux/kernel.h> -+#include <asm/io.h> ++#include <linux/wait.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/map.h> +#ifdef CONFIG_MTD_PARTITIONS +#include <linux/mtd/partitions.h> +#endif +#include <linux/config.h> ++#include <linux/squashfs_fs.h> ++#include <linux/jffs2.h> ++#include <linux/crc32.h> ++#include <asm/io.h> + +#include <typedefs.h> +#include <osl.h> @@ -521,7 +525,7 @@ diff -Nur linux-2.4.32/drivers/mtd/maps/bcm947xx-flash.c linux-2.4.32-flash/driv + + /* found a TRX header */ + if (le32_to_cpu(trx->magic) == TRX_MAGIC) { -+ goto done; ++ goto found; + } + } + @@ -530,47 +534,115 @@ diff -Nur linux-2.4.32/drivers/mtd/maps/bcm947xx-flash.c linux-2.4.32-flash/driv + mtd->name); + return -1; + -+ done: ++ found: + printk(KERN_NOTICE "bootloader size: %d\n", off); + return off; + +} + ++/* ++ * Copied from mtdblock.c ++ * ++ * Cache stuff... ++ * ++ * Since typical flash erasable sectors are much larger than what Linux's ++ * buffer cache can handle, we must implement read-modify-write on flash ++ * sectors for each block write requests. To avoid over-erasing flash sectors ++ * and to speed things up, we locally cache a whole flash sector while it is ++ * being written to until a different sector is required. ++ */ ++ ++static void erase_callback(struct erase_info *done) ++{ ++ wait_queue_head_t *wait_q = (wait_queue_head_t *)done->priv; ++ wake_up(wait_q); ++} ++ ++static int erase_write (struct mtd_info *mtd, unsigned long pos, ++ int len, const char *buf) ++{ ++ struct erase_info erase; ++ DECLARE_WAITQUEUE(wait, current); ++ wait_queue_head_t wait_q; ++ size_t retlen; ++ int ret; ++ ++ /* ++ * First, let's erase the flash block. ++ */ ++ ++ init_waitqueue_head(&wait_q); ++ erase.mtd = mtd; ++ erase.callback = erase_callback; ++ erase.addr = pos; ++ erase.len = len; ++ erase.priv = (u_long)&wait_q; ++ ++ set_current_state(TASK_INTERRUPTIBLE); ++ add_wait_queue(&wait_q, &wait); ++ ++ ret = MTD_ERASE(mtd, &erase); ++ if (ret) { ++ set_current_state(TASK_RUNNING); ++ remove_wait_queue(&wait_q, &wait); ++ printk (KERN_WARNING "erase of region [0x%lx, 0x%x] " ++ "on \"%s\" failed\n", ++ pos, len, mtd->name); ++ return ret; ++ } ++ ++ schedule(); /* Wait for erase to finish. */ ++ remove_wait_queue(&wait_q, &wait); ++ ++ /* ++ * Next, writhe data to flash. ++ */ ++ ++ ret = MTD_WRITE (mtd, pos, len, &retlen, buf); ++ if (ret) ++ return ret; ++ if (retlen != len) ++ return -EIO; ++ return 0; ++} ++ ++ ++ ++ +static int __init +find_root(struct mtd_info *mtd, size_t size, struct mtd_partition *part) +{ -+ struct trx_header *trx; -+ unsigned char buf[512]; -+ int off; ++ struct trx_header trx, *trx2; ++ unsigned char buf[512], *block; ++ int off, blocksize; ++ u32 i, crc = ~0; + size_t len; -+ int blocksize; -+ -+ trx = (struct trx_header *) buf; ++ struct squashfs_super_block *sb = (struct squashfs_super_block *) buf; + + blocksize = mtd->erasesize; + if (blocksize < 0x10000) + blocksize = 0x10000; + + for (off = (128*1024); off < size; off += blocksize) { -+ memset(buf, 0xe5, sizeof(buf)); ++ memset(&trx, 0xe5, sizeof(trx)); + + /* + * Read into buffer + */ -+ if (MTD_READ(mtd, off, sizeof(buf), &len, buf) || -+ len != sizeof(buf)) ++ if (MTD_READ(mtd, off, sizeof(trx), &len, (char *) &trx) || ++ len != sizeof(trx)) + continue; + + /* found a TRX header */ -+ if (le32_to_cpu(trx->magic) == TRX_MAGIC) { -+ part->offset = le32_to_cpu(trx->offsets[2]) ? : -+ le32_to_cpu(trx->offsets[1]); -+ part->size = le32_to_cpu(trx->len); ++ if (le32_to_cpu(trx.magic) == TRX_MAGIC) { ++ part->offset = le32_to_cpu(trx.offsets[2]) ? : ++ le32_to_cpu(trx.offsets[1]); ++ part->size = le32_to_cpu(trx.len); + + part->size -= part->offset; + part->offset += off; + -+ goto done; ++ goto found; + } + } + @@ -579,17 +651,73 @@ diff -Nur linux-2.4.32/drivers/mtd/maps/bcm947xx-flash.c linux-2.4.32-flash/driv + mtd->name); + return -1; + -+ done: ++ found: ++ if (part->size == 0) ++ return 0; ++ ++ if (MTD_READ(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf)) ++ return 0; ++ ++ if (*((__u32 *) buf) == SQUASHFS_MAGIC) { ++ printk(KERN_INFO "%s: Filesystem type: squashfs, size=0x%x\n", mtd->name, (u32) sb->bytes_used); ++ ++ /* Update the squashfs partition size based on the superblock info */ ++ part->size = sb->bytes_used; ++ part->size += (mtd->erasesize - 1); ++ part->size &= ~(mtd->erasesize - 1); ++ } else if (*((__u16 *) buf) == JFFS2_MAGIC_BITMASK) { ++ printk(KERN_INFO "%s: Filesystem type: jffs2\n", mtd->name); ++ ++ /* Move the squashfs outside of the trx */ ++ part->size = 0; ++ } else { ++ printk(KERN_INFO "%s: Filesystem type: unknown\n", mtd->name); ++ return 0; ++ } ++ ++ if (trx.len != part->offset + part->size - off) { ++ /* Update the trx offsets and length */ ++ trx.len = part->offset + part->size - off; ++ ++ /* Update the trx crc32 */ ++ for (i = (u32) &(((struct trx_header *)NULL)->flag_version); i <= trx.len; i += sizeof(buf)) { ++ if (MTD_READ(mtd, off + i, sizeof(buf), &len, buf) || len != sizeof(buf)) ++ return 0; ++ crc = crc32_le(crc, buf, min(sizeof(buf), trx.len - i)); ++ } ++ trx.crc32 = crc; ++ ++ /* read first eraseblock from the trx */ ++ trx2 = block = kmalloc(mtd->erasesize, GFP_KERNEL); ++ if (MTD_READ(mtd, off, mtd->erasesize, &len, block) || len != mtd->erasesize) { ++ printk("Error accessing the first trx eraseblock\n"); ++ return 0; ++ } ++ ++ printk("Updating TRX offsets and length:\n"); ++ printk("old trx = [0x%08x, 0x%08x, 0x%08x], len=0x%08x crc32=0x%08x\n", trx2->offsets[0], trx2->offsets[1], trx2->offsets[2], trx2->len, trx2->crc32); ++ printk("new trx = [0x%08x, 0x%08x, 0x%08x], len=0x%08x crc32=0x%08x\n", trx.offsets[0], trx.offsets[1], trx.offsets[2], trx.len, trx.crc32); ++ ++ /* Write updated trx header to the flash */ ++ memcpy(block, &trx, sizeof(trx)); ++ if (mtd->unlock) ++ mtd->unlock(mtd, off, mtd->erasesize); ++ erase_write(mtd, off, mtd->erasesize, block); ++ if (mtd->sync) ++ mtd->sync(mtd); ++ kfree(block); ++ printk("Done\n"); ++ } ++ + return part->size; +} + +struct mtd_partition * __init +init_mtd_partitions(struct mtd_info *mtd, size_t size) +{ -+ + int cfe_size; + -+ cfe_size = find_cfe_size(mtd,size); ++ cfe_size = find_cfe_size(mtd,size); + + /* boot loader */ + bcm947xx_parts[0].offset = 0; @@ -751,9 +879,9 @@ diff -Nur linux-2.4.32/drivers/mtd/maps/bcm947xx-flash.c linux-2.4.32-flash/driv + +module_init(init_bcm947xx_map); +module_exit(cleanup_bcm947xx_map); -diff -Nur linux-2.4.32/drivers/mtd/maps/Config.in linux-2.4.32-flash/drivers/mtd/maps/Config.in ---- linux-2.4.32/drivers/mtd/maps/Config.in 2003-06-13 16:51:34.000000000 +0200 -+++ linux-2.4.32-flash/drivers/mtd/maps/Config.in 2006-01-31 22:03:50.000000000 +0100 +diff -urN linux.old/drivers/mtd/maps/Config.in linux.dev/drivers/mtd/maps/Config.in +--- linux.old/drivers/mtd/maps/Config.in 2006-06-22 17:35:39.000000000 +0200 ++++ linux.dev/drivers/mtd/maps/Config.in 2006-06-21 21:41:24.000000000 +0200 @@ -48,6 +48,7 @@ fi @@ -762,9 +890,9 @@ diff -Nur linux-2.4.32/drivers/mtd/maps/Config.in linux-2.4.32-flash/drivers/mtd dep_tristate ' Pb1000 MTD support' CONFIG_MTD_PB1000 $CONFIG_MIPS_PB1000 dep_tristate ' Pb1500 MTD support' CONFIG_MTD_PB1500 $CONFIG_MIPS_PB1500 dep_tristate ' Pb1100 MTD support' CONFIG_MTD_PB1100 $CONFIG_MIPS_PB1100 -diff -Nur linux-2.4.32/drivers/mtd/maps/Makefile linux-2.4.32-flash/drivers/mtd/maps/Makefile ---- linux-2.4.32/drivers/mtd/maps/Makefile 2003-06-13 16:51:34.000000000 +0200 -+++ linux-2.4.32-flash/drivers/mtd/maps/Makefile 2006-01-31 22:03:50.000000000 +0100 +diff -urN linux.old/drivers/mtd/maps/Makefile linux.dev/drivers/mtd/maps/Makefile +--- linux.old/drivers/mtd/maps/Makefile 2006-06-22 17:35:39.000000000 +0200 ++++ linux.dev/drivers/mtd/maps/Makefile 2006-06-21 21:41:24.000000000 +0200 @@ -3,6 +3,8 @@ # # $Id: Makefile,v 1.37 2003/01/24 14:26:38 dwmw2 Exp $ From 5985a4d56c42c26ee27d63067ee825a91989b7c6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 17:10:32 +0000 Subject: [PATCH 274/757] update kernel config for brcm-2.6 SVN-Revision: 4056 --- openwrt/target/linux/brcm-2.6/config | 158 ++++++++++++++------------- 1 file changed, 84 insertions(+), 74 deletions(-) diff --git a/openwrt/target/linux/brcm-2.6/config b/openwrt/target/linux/brcm-2.6/config index 588f8f79c55..180a45f5862 100644 --- a/openwrt/target/linux/brcm-2.6/config +++ b/openwrt/target/linux/brcm-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16 -# Wed Mar 29 00:13:01 2006 +# Linux kernel version: 2.6.17 +# Fri Jun 23 19:00:36 2006 # CONFIG_MIPS=y @@ -65,7 +65,10 @@ CONFIG_BCM947XX=y # CONFIG_TOSHIBA_RBTX4927 is not set # CONFIG_TOSHIBA_RBTX4938 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -114,7 +117,6 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_CPU_HAS_PREFETCH=y # CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set -# CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -152,6 +154,7 @@ CONFIG_SYSVIPC=y CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_EMBEDDED=y @@ -164,10 +167,6 @@ CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 @@ -180,7 +179,6 @@ CONFIG_OBSOLETE_INTERMODULE=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set @@ -189,11 +187,13 @@ CONFIG_OBSOLETE_MODPARM=y # Block layer # # CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set # # IO Schedulers # -# CONFIG_IOSCHED_NOOP is not set +CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set @@ -208,7 +208,6 @@ CONFIG_DEFAULT_IOSCHED="deadline" # CONFIG_HW_HAS_PCI=y CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set CONFIG_MMU=y # @@ -257,8 +256,6 @@ CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -282,6 +279,7 @@ CONFIG_IPSEC_NAT_TRAVERSAL=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set CONFIG_INET_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m @@ -305,9 +303,12 @@ CONFIG_TCP_CONG_SCALABLE=m # CONFIG_IP_VS is not set CONFIG_IPV6=m # CONFIG_IPV6_PRIVACY is not set +CONFIG_IPV6_ROUTER_PREF=y +# CONFIG_IPV6_ROUTE_INFO is not set # CONFIG_INET6_AH is not set # CONFIG_INET6_ESP is not set # CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set # CONFIG_IPV6_TUNNEL is not set CONFIG_NETFILTER=y @@ -323,21 +324,24 @@ CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set # CONFIG_NETFILTER_XT_MATCH_COMMENT is not set # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set CONFIG_NETFILTER_XT_MATCH_CONNMARK=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y # CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set # CONFIG_NETFILTER_XT_MATCH_REALM is not set # CONFIG_NETFILTER_XT_MATCH_SCTP is not set CONFIG_NETFILTER_XT_MATCH_STATE=y -# CONFIG_NETFILTER_XT_MATCH_STRING is not set +CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=y # @@ -354,25 +358,24 @@ CONFIG_IP_NF_IRC=y CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_LAYER7=m -# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_TIME=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_MATCH_HASHLIMIT is not set -# CONFIG_IP_NF_MATCH_POLICY is not set +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_IMQ=m @@ -391,6 +394,7 @@ CONFIG_IP_NF_NAT_FTP=y CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m @@ -398,7 +402,7 @@ CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_TTL=m # CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_RAW is not set +CONFIG_IP_NF_RAW=m # CONFIG_IP_NF_ARPTABLES is not set CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 @@ -421,12 +425,10 @@ CONFIG_IP6_NF_IPTABLES=m # CONFIG_IP6_NF_MATCH_OPTS is not set # CONFIG_IP6_NF_MATCH_FRAG is not set # CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_MULTIPORT=m CONFIG_IP6_NF_MATCH_OWNER=m # CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -# CONFIG_IP6_NF_MATCH_AHESP is not set +CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m -# CONFIG_IP6_NF_MATCH_POLICY is not set CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP6_NF_TARGET_LOG is not set @@ -483,6 +485,7 @@ CONFIG_ATM_BR2684_IPFILTER=y CONFIG_BRIDGE=y CONFIG_VLAN_8021Q=y # CONFIG_DECNET is not set +CONFIG_LLC=y # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -588,17 +591,13 @@ CONFIG_BT_HCIUART_BCSP=y # CONFIG_BT_HCIBLUECARD is not set # CONFIG_BT_HCIBTUART is not set # CONFIG_BT_HCIVHCI is not set -CONFIG_D80211=m -CONFIG_D80211_DEBUG=y -CONFIG_D80211_VERBOSE_DEBUG=y -# CONFIG_TKIP_DEBUG is not set -# CONFIG_D80211_DEBUG_COUNTERS is not set -# CONFIG_HOSTAPD_WPA_TESTING is not set CONFIG_IEEE80211=m # CONFIG_IEEE80211_DEBUG is not set CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_CRYPT_TKIP=m +# CONFIG_IEEE80211_SOFTMAC is not set +CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -655,7 +654,6 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_AMDSTD_RETRY=0 # CONFIG_MTD_CFI_STAA is not set CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set @@ -679,7 +677,6 @@ CONFIG_MTD_BCM47XX=y # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set # CONFIG_MTD_BLOCK2MTD is not set # @@ -722,7 +719,7 @@ CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -786,7 +783,6 @@ CONFIG_BLK_DEV_SD=m # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -923,6 +919,7 @@ CONFIG_B44=y # Wireless LAN (non-hamradio) # CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y # # Obsolete Wireless cards support (pre-802.11) @@ -943,6 +940,8 @@ CONFIG_IPW2100=m CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set # CONFIG_HERMES is not set # CONFIG_ATMEL is not set @@ -963,13 +962,6 @@ CONFIG_HOSTAP_FIRMWARE_NVRAM=y CONFIG_HOSTAP_PLX=m CONFIG_HOSTAP_PCI=m CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX_D80211=m -CONFIG_BCM43XX_D80211_DEBUG=y -CONFIG_BCM43XX_D80211_DMA=y -CONFIG_BCM43XX_D80211_PIO=y -CONFIG_BCM43XX_D80211_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_D80211_DMA_MODE is not set -# CONFIG_BCM43XX_D80211_PIO_MODE is not set CONFIG_NET_WIRELESS=y # @@ -1067,6 +1059,7 @@ CONFIG_INPUT_EVDEV=m # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_PCI is not set CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=2 CONFIG_SERIAL_8250_RUNTIME_UARTS=2 @@ -1141,41 +1134,42 @@ CONFIG_UNIX98_PTYS=y # Misc devices # -# -# Multimedia Capabilities Port drivers -# - # # Multimedia devices # CONFIG_VIDEO_DEV=m +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y # -# Video For Linux +# Video Capture Adapters # # -# Video Adapters +# Video Capture Adapters # # CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VIDEO_CPIA2 is not set + +# +# Encoders and Decoders +# + +# +# V4L USB devices +# # # Radio Adapters # -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set # # Graphics support @@ -1200,6 +1194,7 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_PCM_OSS is not set # CONFIG_SND_DYNAMIC_MINORS is not set # CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set @@ -1215,6 +1210,7 @@ CONFIG_SND_RAWMIDI=m # PCI devices # # CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP_MODEM is not set @@ -1246,6 +1242,7 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set # CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set @@ -1268,6 +1265,8 @@ CONFIG_SND_USB_AUDIO=m # # PCMCIA devices # +# CONFIG_SND_VXPOCKET is not set +# CONFIG_SND_PDAUDIOCF is not set # # Open Sound System @@ -1279,6 +1278,7 @@ CONFIG_SND_USB_AUDIO=m # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=m # CONFIG_USB_DEBUG is not set @@ -1306,7 +1306,6 @@ CONFIG_USB_UHCI_HCD=m # # USB Device Class drivers # -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m @@ -1345,9 +1344,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set +# CONFIG_USB_TOUCHSCREEN is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1361,21 +1358,6 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - # # USB Network Adapters # @@ -1398,6 +1380,7 @@ CONFIG_USB_SERIAL=m # CONFIG_USB_SERIAL_GENERIC is not set # CONFIG_USB_SERIAL_AIRPRIME is not set # CONFIG_USB_SERIAL_ANYDATA is not set +# CONFIG_USB_SERIAL_ARK3116 is not set CONFIG_USB_SERIAL_BELKIN=m # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set @@ -1405,6 +1388,7 @@ CONFIG_USB_SERIAL_BELKIN=m # CONFIG_USB_SERIAL_CYPRESS_M8 is not set # CONFIG_USB_SERIAL_EMPEG is not set CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set CONFIG_USB_SERIAL_VISOR=m # CONFIG_USB_SERIAL_IPAQ is not set # CONFIG_USB_SERIAL_IR is not set @@ -1417,6 +1401,7 @@ CONFIG_USB_SERIAL_VISOR=m # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set # CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_NAVMAN is not set CONFIG_USB_SERIAL_PL2303=m # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set @@ -1463,6 +1448,22 @@ CONFIG_USB_UEAGLEATM=m # # CONFIG_MMC is not set +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y + # # InfiniBand support # @@ -1472,6 +1473,11 @@ CONFIG_USB_UEAGLEATM=m # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + # # File systems # @@ -1535,7 +1541,6 @@ CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1675,6 +1680,7 @@ CONFIG_NLS_UTF8=m # CONFIG_MAGIC_SYSRQ is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_FS is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200" @@ -1726,3 +1732,7 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m From 21ba6dba2643fcadcbba39523d5f4540a8d9aadd Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 17:14:34 +0000 Subject: [PATCH 275/757] new verbose/trace script for make SVN-Revision: 4057 --- openwrt/include/verbose.mk | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 openwrt/include/verbose.mk diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk new file mode 100644 index 00000000000..77a877efe3c --- /dev/null +++ b/openwrt/include/verbose.mk @@ -0,0 +1,25 @@ +# OpenWrt.org 2006 +# $Id:$ + +ifeq ($(DUMP),) + ifndef KBUILD_VERBOSE + KBUILD_VERBOSE=0 + ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE=$(V) + endif + endif + + ifeq ($(QUIET),1) + $(MAKECMDGOALS): trace + trace: FORCE + @[ -f "$(MAKECMDGOALS)" ] || { \ + [ -z "$${PWD##$$TOPDIR}" ] || DIR=" -C $${PWD##$$TOPDIR/}"; \ + echo -e "\33[33mmake[$$(($(MAKELEVEL)+1))]$$DIR $(MAKECMDGOALS)\33[m" >&3; \ + } + else + export QUIET:=1 + MAKE:=3>&1 4>&2 $(MAKE) + endif + + .SILENT: $(MAKECMDGOALS) +endif From 2fc5aae018be96666d27d1a804b7b80918f217a9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 17:18:41 +0000 Subject: [PATCH 276/757] add copyright statement SVN-Revision: 4058 --- openwrt/target/linux/brcm-2.4/patches/004-flash.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch index 4fbf3da7e9f..7a070128ed1 100644 --- a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch +++ b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch @@ -334,10 +334,11 @@ diff -urN linux.old/drivers/mtd/devices/sflash.c linux.dev/drivers/mtd/devices/s diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps/bcm947xx-flash.c --- linux.old/drivers/mtd/maps/bcm947xx-flash.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/drivers/mtd/maps/bcm947xx-flash.c 2006-06-23 18:08:46.000000000 +0200 -@@ -0,0 +1,544 @@ +@@ -0,0 +1,545 @@ +/* -+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> + * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org> ++ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) + * + * original functions for finding root filesystem from Mike Baker + * From 7158bfb110130fc7adbdd2d48acae558a130f480 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 17:59:23 +0000 Subject: [PATCH 277/757] fix partition align SVN-Revision: 4059 --- openwrt/target/linux/brcm-2.4/patches/004-flash.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch index 7a070128ed1..14ba3b15f4e 100644 --- a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch +++ b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch @@ -334,7 +334,7 @@ diff -urN linux.old/drivers/mtd/devices/sflash.c linux.dev/drivers/mtd/devices/s diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps/bcm947xx-flash.c --- linux.old/drivers/mtd/maps/bcm947xx-flash.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/drivers/mtd/maps/bcm947xx-flash.c 2006-06-23 18:08:46.000000000 +0200 -@@ -0,0 +1,545 @@ +@@ -0,0 +1,547 @@ +/* + * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> + * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org> @@ -664,8 +664,10 @@ diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps + + /* Update the squashfs partition size based on the superblock info */ + part->size = sb->bytes_used; -+ part->size += (mtd->erasesize - 1); -+ part->size &= ~(mtd->erasesize - 1); ++ len = part->offset + part->size; ++ len += (mtd->erasesize - 1); ++ len &= ~(mtd->erasesize - 1); ++ part->size = len - part->offset; + } else if (*((__u16 *) buf) == JFFS2_MAGIC_BITMASK) { + printk(KERN_INFO "%s: Filesystem type: jffs2\n", mtd->name); + From f7591f99b3f184a4ff3b02e67165577c4b013be0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 19:51:50 +0000 Subject: [PATCH 278/757] fix the jffs2 eof detect patch for linux 2.6 (unlocking required for erasing blocks) SVN-Revision: 4060 --- .../patches/204-jffs2_eofdetect.patch | 50 +++++++++++-------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/openwrt/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch b/openwrt/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch index b93efa68abd..9f248c93dd8 100644 --- a/openwrt/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch +++ b/openwrt/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch @@ -1,12 +1,35 @@ -diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c ---- linux.old/fs/jffs2/scan.c 2006-05-31 02:31:44.000000000 +0200 -+++ linux.dev/fs/jffs2/scan.c 2006-06-15 02:20:32.000000000 +0200 -@@ -120,8 +120,11 @@ +diff -urN linux.old/fs/jffs2/build.c linux.dev/fs/jffs2/build.c +--- linux.old/fs/jffs2/build.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux.dev/fs/jffs2/build.c 2006-06-23 21:46:48.000000000 +0200 +@@ -107,6 +107,17 @@ + dbg_fsbuild("scanned flash completely\n"); + jffs2_dbg_dump_block_lists_nolock(c); + ++ if (c->flags & (1 << 7)) { ++ printk("%s(): unlocking the mtd device... ", __func__); ++ if (c->mtd->unlock) ++ c->mtd->unlock(c->mtd, 0, c->mtd->size); ++ printk("done.\n"); ++ ++ printk("%s(): erasing all blocks after the end marker... ", __func__); ++ jffs2_erase_pending_blocks(c, -1); ++ printk("done.\n"); ++ } ++ + dbg_fsbuild("pass 1 starting\n"); + c->flags |= JFFS2_SB_FLAG_BUILDING; + /* Now scan the directory tree, increasing nlink according to every dirent found. */ +diff -urN linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c +--- linux.old/fs/jffs2/scan.c 2006-06-23 21:39:38.000000000 +0200 ++++ linux.dev/fs/jffs2/scan.c 2006-06-23 21:42:18.000000000 +0200 +@@ -119,9 +119,12 @@ + /* reset summary info for next eraseblock scan */ jffs2_sum_reset_collected(s); - +- - ret = jffs2_scan_eraseblock(c, jeb, buf_size?flashbuf:(flashbuf+jeb->offset), - buf_size, s); ++ + if (c->flags & (1 << 7)) + ret = BLK_STATE_ALLFF; + else @@ -15,20 +38,7 @@ diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c if (ret < 0) goto out; -@@ -222,6 +225,12 @@ - } - } - -+ if (c->flags & (1 << 7)) { -+ printk("jffs2_scan_medium(): erasing all blocks after the end marker...\n"); -+ jffs2_erase_pending_blocks(c, -1); -+ printk("jffs2_scan_medium(): done.\n"); -+ } -+ - if (jffs2_sum_active() && s) - kfree(s); - -@@ -389,6 +398,17 @@ +@@ -389,6 +392,17 @@ return err; } @@ -37,7 +47,7 @@ diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c + (buf[2] == 0xc0) && + (buf[3] == 0xde)) { + /* end of filesystem. erase everything after this point */ -+ printk("jffs2_scan_eraseblock(): End of filesystem marker found at 0x%x\n", jeb->offset); ++ printk("%s(): End of filesystem marker found at 0x%x\n", __func__, jeb->offset); + c->flags |= (1 << 7); + + return BLK_STATE_ALLFF; From ef6788dd04f341c64e34bf95d10edd5bec188d03 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 19:53:20 +0000 Subject: [PATCH 279/757] port the brcm-2.4 flash map driver changes to 2.6 SVN-Revision: 4061 --- .../brcm-2.6/patches/002-flash-map.patch | 241 ++++++++++++++---- 1 file changed, 188 insertions(+), 53 deletions(-) diff --git a/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch b/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch index b8aeafa6024..a8ed9092c0b 100644 --- a/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch +++ b/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch @@ -1,10 +1,11 @@ -diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.15-rc5-flash/drivers/mtd/maps/bcm47xx-flash.c ---- linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.15-rc5-flash/drivers/mtd/maps/bcm47xx-flash.c 2005-12-19 00:33:31.276241000 +0100 -@@ -0,0 +1,316 @@ +diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/bcm47xx-flash.c +--- linux.old/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/mtd/maps/bcm47xx-flash.c 2006-06-23 19:54:06.000000000 +0200 +@@ -0,0 +1,451 @@ +/* -+ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> + * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org> ++ * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) + * + * original functions for finding root filesystem from Mike Baker + * @@ -43,18 +44,24 @@ diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.15-rc5-fla +#include <linux/module.h> +#include <linux/types.h> +#include <linux/kernel.h> -+#include <asm/io.h> ++#include <linux/wait.h> ++#include <linux/config.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/map.h> +#ifdef CONFIG_MTD_PARTITIONS +#include <linux/mtd/partitions.h> +#endif -+#include <linux/config.h> ++#include <linux/squashfs_fs.h> ++#include <linux/jffs2.h> ++#include <linux/crc32.h> ++#include <asm/io.h> + +#include <trxhdr.h> + ++#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) ++#define NVRAM_SPACE 0x8000 +#define WINDOW_ADDR 0x1c000000 -+#define WINDOW_SIZE (0x400000*2) ++#define WINDOW_SIZE 0x800000 +#define BUSWIDTH 2 + +static struct mtd_info *bcm947xx_mtd; @@ -104,13 +111,15 @@ diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.15-rc5-fla + unsigned char buf[512]; + int off; + size_t len; -+ int cfe_size_flag; ++ int blocksize; + + trx = (struct trx_header *) buf; + -+ cfe_size_flag=0; ++ blocksize = mtd->erasesize; ++ if (blocksize < 0x10000) ++ blocksize = 0x10000; + -+ for (off = (256*1024); off < size; off += mtd->erasesize) { ++ for (off = (128*1024); off < size; off += blocksize) { + memset(buf, 0xe5, sizeof(buf)); + + /* @@ -122,9 +131,8 @@ diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.15-rc5-fla + + /* found a TRX header */ + if (le32_to_cpu(trx->magic) == TRX_MAGIC) { -+ goto done; ++ goto found; + } -+ cfe_size_flag += 1; + } + + printk(KERN_NOTICE @@ -132,42 +140,115 @@ diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.15-rc5-fla + mtd->name); + return -1; + -+ done: -+ printk(KERN_NOTICE "bootloader size flag: %d\n", cfe_size_flag); -+ return cfe_size_flag; ++ found: ++ printk(KERN_NOTICE "bootloader size: %d\n", off); ++ return off; + +} + ++/* ++ * Copied from mtdblock.c ++ * ++ * Cache stuff... ++ * ++ * Since typical flash erasable sectors are much larger than what Linux's ++ * buffer cache can handle, we must implement read-modify-write on flash ++ * sectors for each block write requests. To avoid over-erasing flash sectors ++ * and to speed things up, we locally cache a whole flash sector while it is ++ * being written to until a different sector is required. ++ */ ++ ++static void erase_callback(struct erase_info *done) ++{ ++ wait_queue_head_t *wait_q = (wait_queue_head_t *)done->priv; ++ wake_up(wait_q); ++} ++ ++static int erase_write (struct mtd_info *mtd, unsigned long pos, ++ int len, const char *buf) ++{ ++ struct erase_info erase; ++ DECLARE_WAITQUEUE(wait, current); ++ wait_queue_head_t wait_q; ++ size_t retlen; ++ int ret; ++ ++ /* ++ * First, let's erase the flash block. ++ */ ++ ++ init_waitqueue_head(&wait_q); ++ erase.mtd = mtd; ++ erase.callback = erase_callback; ++ erase.addr = pos; ++ erase.len = len; ++ erase.priv = (u_long)&wait_q; ++ ++ set_current_state(TASK_INTERRUPTIBLE); ++ add_wait_queue(&wait_q, &wait); ++ ++ ret = MTD_ERASE(mtd, &erase); ++ if (ret) { ++ set_current_state(TASK_RUNNING); ++ remove_wait_queue(&wait_q, &wait); ++ printk (KERN_WARNING "erase of region [0x%lx, 0x%x] " ++ "on \"%s\" failed\n", ++ pos, len, mtd->name); ++ return ret; ++ } ++ ++ schedule(); /* Wait for erase to finish. */ ++ remove_wait_queue(&wait_q, &wait); ++ ++ /* ++ * Next, writhe data to flash. ++ */ ++ ++ ret = MTD_WRITE (mtd, pos, len, &retlen, buf); ++ if (ret) ++ return ret; ++ if (retlen != len) ++ return -EIO; ++ return 0; ++} ++ ++ ++ ++ +static int __init +find_root(struct mtd_info *mtd, size_t size, struct mtd_partition *part) +{ -+ struct trx_header *trx; -+ unsigned char buf[512]; -+ int off; ++ struct trx_header trx, *trx2; ++ unsigned char buf[512], *block; ++ int off, blocksize; ++ u32 i, crc = ~0; + size_t len; ++ struct squashfs_super_block *sb = (struct squashfs_super_block *) buf; + -+ trx = (struct trx_header *) buf; ++ blocksize = mtd->erasesize; ++ if (blocksize < 0x10000) ++ blocksize = 0x10000; + -+ for (off = (256*1024); off < size; off += mtd->erasesize) { -+ memset(buf, 0xe5, sizeof(buf)); ++ for (off = (128*1024); off < size; off += blocksize) { ++ memset(&trx, 0xe5, sizeof(trx)); + + /* + * Read into buffer + */ -+ if (MTD_READ(mtd, off, sizeof(buf), &len, buf) || -+ len != sizeof(buf)) ++ if (MTD_READ(mtd, off, sizeof(trx), &len, (char *) &trx) || ++ len != sizeof(trx)) + continue; + + /* found a TRX header */ -+ if (le32_to_cpu(trx->magic) == TRX_MAGIC) { -+ part->offset = le32_to_cpu(trx->offsets[2]) ? : -+ le32_to_cpu(trx->offsets[1]); -+ part->size = le32_to_cpu(trx->len); ++ if (le32_to_cpu(trx.magic) == TRX_MAGIC) { ++ part->offset = le32_to_cpu(trx.offsets[2]) ? : ++ le32_to_cpu(trx.offsets[1]); ++ part->size = le32_to_cpu(trx.len); + + part->size -= part->offset; + part->offset += off; + -+ goto done; ++ goto found; + } + } + @@ -176,39 +257,93 @@ diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.15-rc5-fla + mtd->name); + return -1; + -+ done: ++ found: ++ if (part->size == 0) ++ return 0; ++ ++ if (MTD_READ(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf)) ++ return 0; ++ ++ if (*((__u32 *) buf) == SQUASHFS_MAGIC) { ++ printk(KERN_INFO "%s: Filesystem type: squashfs, size=0x%x\n", mtd->name, (u32) sb->bytes_used); ++ ++ /* Update the squashfs partition size based on the superblock info */ ++ part->size = sb->bytes_used; ++ len = part->offset + part->size; ++ len += (mtd->erasesize - 1); ++ len &= ~(mtd->erasesize - 1); ++ part->size = len - part->offset; ++ } else if (*((__u16 *) buf) == JFFS2_MAGIC_BITMASK) { ++ printk(KERN_INFO "%s: Filesystem type: jffs2\n", mtd->name); ++ ++ /* Move the squashfs outside of the trx */ ++ part->size = 0; ++ } else { ++ printk(KERN_INFO "%s: Filesystem type: unknown\n", mtd->name); ++ return 0; ++ } ++ ++ if (trx.len != part->offset + part->size - off) { ++ /* Update the trx offsets and length */ ++ trx.len = part->offset + part->size - off; ++ ++ /* Update the trx crc32 */ ++ for (i = (u32) &(((struct trx_header *)NULL)->flag_version); i <= trx.len; i += sizeof(buf)) { ++ if (MTD_READ(mtd, off + i, sizeof(buf), &len, buf) || len != sizeof(buf)) ++ return 0; ++ crc = crc32_le(crc, buf, min(sizeof(buf), trx.len - i)); ++ } ++ trx.crc32 = crc; ++ ++ /* read first eraseblock from the trx */ ++ block = kmalloc(mtd->erasesize, GFP_KERNEL); ++ trx2 = (struct trx_header *) block; ++ if (MTD_READ(mtd, off, mtd->erasesize, &len, block) || len != mtd->erasesize) { ++ printk("Error accessing the first trx eraseblock\n"); ++ return 0; ++ } ++ ++ printk("Updating TRX offsets and length:\n"); ++ printk("old trx = [0x%08x, 0x%08x, 0x%08x], len=0x%08x crc32=0x%08x\n", trx2->offsets[0], trx2->offsets[1], trx2->offsets[2], trx2->len, trx2->crc32); ++ printk("new trx = [0x%08x, 0x%08x, 0x%08x], len=0x%08x crc32=0x%08x\n", trx.offsets[0], trx.offsets[1], trx.offsets[2], trx.len, trx.crc32); ++ ++ /* Write updated trx header to the flash */ ++ memcpy(block, &trx, sizeof(trx)); ++ if (mtd->unlock) ++ mtd->unlock(mtd, off, mtd->erasesize); ++ erase_write(mtd, off, mtd->erasesize, block); ++ if (mtd->sync) ++ mtd->sync(mtd); ++ kfree(block); ++ printk("Done\n"); ++ } ++ + return part->size; +} + +struct mtd_partition * __init +init_mtd_partitions(struct mtd_info *mtd, size_t size) +{ ++ int cfe_size; + -+ int cfe_size_flag; -+ -+ /* if cfe_size_flag=0, cfe size is 256 kb, else 384 kb */ -+ cfe_size_flag = find_cfe_size(mtd, size); ++ cfe_size = find_cfe_size(mtd,size); + + /* boot loader */ + bcm947xx_parts[0].offset = 0; -+ if (cfe_size_flag == 0) { -+ bcm947xx_parts[0].size = 1024*256; -+ } else { -+ /* netgear wgt634u has 384 kb bootloader */ -+ bcm947xx_parts[0].size = 1024*384; -+ } ++ bcm947xx_parts[0].size = cfe_size; + + /* nvram */ -+ if (cfe_size_flag == 0) { -+ bcm947xx_parts[3].offset = size - mtd->erasesize; ++ if (cfe_size != 384 * 1024) { ++ bcm947xx_parts[3].offset = size - ROUNDUP(NVRAM_SPACE, mtd->erasesize); ++ bcm947xx_parts[3].size = ROUNDUP(NVRAM_SPACE, mtd->erasesize); + } else { + /* nvram (old 128kb config partition on netgear wgt634u) */ + bcm947xx_parts[3].offset = bcm947xx_parts[0].size; ++ bcm947xx_parts[3].size = ROUNDUP(NVRAM_SPACE, mtd->erasesize); + } -+ bcm947xx_parts[3].size = mtd->erasesize; + + /* linux (kernel and rootfs) */ -+ if (cfe_size_flag == 0) { ++ if (cfe_size != 384 * 1024) { + bcm947xx_parts[1].offset = bcm947xx_parts[0].size; + bcm947xx_parts[1].size = bcm947xx_parts[3].offset - + bcm947xx_parts[1].offset; @@ -227,11 +362,11 @@ diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.15-rc5-fla + /* entirely jffs2 */ + bcm947xx_parts[4].name = NULL; + bcm947xx_parts[2].size = size - bcm947xx_parts[2].offset - -+ bcm947xx_parts[3].size; ++ bcm947xx_parts[3].size; + } else { + /* legacy setup */ + /* calculate leftover flash, and assign it to the jffs2 partition */ -+ if (cfe_size_flag == 0) { ++ if (cfe_size != 384 * 1024) { + bcm947xx_parts[4].offset = bcm947xx_parts[2].offset + + bcm947xx_parts[2].size; + if ((bcm947xx_parts[4].offset % mtd->erasesize) > 0) { @@ -318,9 +453,9 @@ diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.15-rc5-fla + +module_init(init_bcm947xx_map); +module_exit(cleanup_bcm947xx_map); -diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/Kconfig linux-2.6.15-rc5-flash/drivers/mtd/maps/Kconfig ---- linux-2.6.15-rc5/drivers/mtd/maps/Kconfig 2005-12-04 06:10:42.000000000 +0100 -+++ linux-2.6.15-rc5-flash/drivers/mtd/maps/Kconfig 2005-12-18 19:36:11.555087000 +0100 +diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig +--- linux.old/drivers/mtd/maps/Kconfig 2006-06-23 19:13:51.000000000 +0200 ++++ linux.dev/drivers/mtd/maps/Kconfig 2006-06-23 18:47:58.000000000 +0200 @@ -299,6 +299,12 @@ Mapping for the Flaga digital module. If you don't have one, ignore this setting. @@ -334,10 +469,10 @@ diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/Kconfig linux-2.6.15-rc5-flash/drive config MTD_BEECH tristate "CFI Flash device mapped on IBM 405LP Beech" depends on MTD_CFI && BEECH -diff -Nur linux-2.6.15-rc5/drivers/mtd/maps/Makefile linux-2.6.15-rc5-flash/drivers/mtd/maps/Makefile ---- linux-2.6.15-rc5/drivers/mtd/maps/Makefile 2005-12-04 06:10:42.000000000 +0100 -+++ linux-2.6.15-rc5-flash/drivers/mtd/maps/Makefile 2005-12-18 19:36:11.555087000 +0100 -@@ -31,6 +31,7 @@ +diff -urN linux.old/drivers/mtd/maps/Makefile linux.dev/drivers/mtd/maps/Makefile +--- linux.old/drivers/mtd/maps/Makefile 2006-06-23 19:13:51.000000000 +0200 ++++ linux.dev/drivers/mtd/maps/Makefile 2006-06-23 18:47:58.000000000 +0200 +@@ -30,6 +30,7 @@ obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o obj-$(CONFIG_MTD_TQM8XXL) += tqm8xxl.o From 9a2279b3f537e4a0948bae0443f39213b89aaf8c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 20:21:09 +0000 Subject: [PATCH 280/757] backport jffs2 eof detect changes from 2.6 SVN-Revision: 4062 --- .../patches/227-jffs2_eofdetect.patch | 81 ++++++++++--------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch b/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch index ad0ac0c23ee..fe97be5b3fe 100644 --- a/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch +++ b/openwrt/target/linux/generic-2.4/patches/227-jffs2_eofdetect.patch @@ -1,6 +1,47 @@ +diff -ur linux.old/fs/jffs2/build.c linux.dev/fs/jffs2/build.c +--- linux.old/fs/jffs2/build.c 2003-06-13 16:51:37.000000000 +0200 ++++ linux.dev/fs/jffs2/build.c 2006-06-23 22:15:21.000000000 +0200 +@@ -31,6 +31,10 @@ + * provisions above, a recipient may use your version of this file + * under either the RHEPL or the GPL. + * ++ * Modification for automatically cleaning the filesystem after ++ * a specially marked block ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> ++ * + * $Id: build.c,v 1.16.2.3 2003/04/30 09:43:32 dwmw2 Exp $ + * + */ +@@ -38,6 +42,7 @@ + #include <linux/kernel.h> + #include <linux/jffs2.h> + #include <linux/slab.h> ++#include <linux/mtd/mtd.h> + #include "nodelist.h" + + int jffs2_build_inode_pass1(struct jffs2_sb_info *, struct jffs2_inode_cache *); +@@ -89,6 +94,18 @@ + if (ret) + return ret; + ++ if (c->flags & (1 << 7)) { ++ printk("%s(): unlocking the mtd device... ", __func__); ++ if (c->mtd->unlock) ++ c->mtd->unlock(c->mtd, 0, c->mtd->size); ++ printk("done.\n"); ++ ++ printk("%s(): erasing all blocks after the end marker... ", __func__); ++ jffs2_erase_pending_blocks(c); ++ jffs2_mark_erased_blocks(c); ++ printk("done.\n"); ++ } ++ + D1(printk(KERN_DEBUG "Scanned flash completely\n")); + /* Now build the data map for each inode, marking obsoleted nodes + as such, and also increase nlink of any children. */ diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c ---- linux.old/fs/jffs2/scan.c 2003-11-28 19:26:21.000000000 +0100 -+++ linux.dev/fs/jffs2/scan.c 2006-06-22 00:29:02.000000000 +0200 +--- linux.old/fs/jffs2/scan.c 2006-06-23 21:57:32.000000000 +0200 ++++ linux.dev/fs/jffs2/scan.c 2006-06-23 22:01:35.000000000 +0200 @@ -31,6 +31,10 @@ * provisions above, a recipient may use your version of this file * under either the RHEPL or the GPL. @@ -26,38 +67,7 @@ diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c if (ret < 0) return ret; -@@ -145,15 +154,23 @@ - c->nr_erasing_blocks++; - } - } -- /* Rotate the lists by some number to ensure wear levelling */ -- jffs2_rotate_lists(c); - -- if (c->nr_erasing_blocks) { -- if (!c->used_size && empty_blocks != c->nr_blocks) { -- printk(KERN_NOTICE "Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes\n"); -- return -EIO; -+ if (c->flags & (1 << 7)) { -+ printk("jffs2_scan_medium(): erasing all blocks after the end marker...\n"); -+ jffs2_erase_pending_blocks(c); -+ jffs2_mark_erased_blocks(c); -+ printk("jffs2_scan_medium(): done.\n"); -+ } else { -+ /* Rotate the lists by some number to ensure wear levelling */ -+ jffs2_rotate_lists(c); -+ -+ if (c->nr_erasing_blocks) { -+ if (!c->used_size && empty_blocks != c->nr_blocks) { -+ printk(KERN_NOTICE "Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes\n"); -+ return -EIO; -+ } -+ jffs2_erase_pending_trigger(c); - } -- jffs2_erase_pending_trigger(c); - } - return 0; - } -@@ -181,6 +197,7 @@ +@@ -181,6 +190,7 @@ while(ofs < jeb->offset + c->sector_size) { ssize_t retlen; @@ -65,7 +75,7 @@ diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c ACCT_PARANOIA_CHECK(jeb); if (ofs & 3) { -@@ -202,8 +219,18 @@ +@@ -202,8 +212,18 @@ break; } @@ -85,4 +95,3 @@ diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c if (err) { D1(printk(KERN_WARNING "mtd->read(0x%x bytes from 0x%x) returned %d\n", sizeof(node), ofs, err)); return err; - From e6bd5e37795418e433e38d0d41ecaa269087a1fe Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 23 Jun 2006 20:22:54 +0000 Subject: [PATCH 281/757] nuke jffs2root --move from init scripts SVN-Revision: 4063 --- openwrt/package/base-files/brcm-2.4/sbin/mount_root | 8 +------- openwrt/package/base-files/brcm-2.6/sbin/mount_root | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/openwrt/package/base-files/brcm-2.4/sbin/mount_root b/openwrt/package/base-files/brcm-2.4/sbin/mount_root index 88a836c808f..8edac78543e 100755 --- a/openwrt/package/base-files/brcm-2.4/sbin/mount_root +++ b/openwrt/package/base-files/brcm-2.4/sbin/mount_root @@ -12,12 +12,7 @@ if [ "$1" != "failsafe" ]; then mtd unlock linux mount | grep jffs2 >&- if [ $? = 0 ] ; then - if [ $(cat /proc/mtd | wc -l) = 6 ]; then - mtd erase OpenWrt - jffs2root --move - else - mount -o remount,rw /dev/root / - fi + mount -o remount,rw /dev/root / else . /bin/firstboot is_dirty @@ -35,4 +30,3 @@ fi mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 mkdir -p /dev/pts mount none /dev/pts -t devpts -mount -t sysfs none /sys 2>&- diff --git a/openwrt/package/base-files/brcm-2.6/sbin/mount_root b/openwrt/package/base-files/brcm-2.6/sbin/mount_root index 88a836c808f..a3ada589089 100755 --- a/openwrt/package/base-files/brcm-2.6/sbin/mount_root +++ b/openwrt/package/base-files/brcm-2.6/sbin/mount_root @@ -12,12 +12,7 @@ if [ "$1" != "failsafe" ]; then mtd unlock linux mount | grep jffs2 >&- if [ $? = 0 ] ; then - if [ $(cat /proc/mtd | wc -l) = 6 ]; then - mtd erase OpenWrt - jffs2root --move - else - mount -o remount,rw /dev/root / - fi + mount -o remount,rw /dev/root / else . /bin/firstboot is_dirty From 1ef7c9e055a572539e5e7ada6f69a89a3b51fcbe Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 21:47:24 +0000 Subject: [PATCH 282/757] switch on new verbose system SVN-Revision: 4064 --- openwrt/Makefile | 1 + openwrt/include/image.mk | 2 -- openwrt/include/verbose.mk | 20 ++++++++++++++------ openwrt/package/Makefile | 2 -- openwrt/rules.mk | 1 + 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index faeecaa4881..a554a1d867f 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -26,6 +26,7 @@ RELEASE:=Kamikaze #-------------------------------------------------------------- TOPDIR=${shell pwd} export TOPDIR +include $(TOPDIR)/include/verbose.mk OPENWRTVERSION:=$(RELEASE) ifneq ($(VERSION),) diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk index bf80e279902..ca0d688f170 100644 --- a/openwrt/include/image.mk +++ b/openwrt/include/image.mk @@ -1,5 +1,3 @@ -include $(TOPDIR)/rules.mk - KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) ifneq ($(CONFIG_BIG_ENDIAN),y) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 77a877efe3c..31e0cea1b31 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -1,14 +1,19 @@ # OpenWrt.org 2006 # $Id:$ -ifeq ($(DUMP),) - ifndef KBUILD_VERBOSE - KBUILD_VERBOSE=0 - ifeq ("$(origin V)", "command line") - KBUILD_VERBOSE=$(V) - endif +ifndef KBUILD_VERBOSE + ifeq ($(DUMP),) + KBUILD_VERBOSE=1 + else + KBUILD_VERBOSE=99 endif + ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE=$(V) + endif +endif + +ifneq ($(KBUILD_VERBOSE),99) ifeq ($(QUIET),1) $(MAKECMDGOALS): trace trace: FORCE @@ -18,6 +23,9 @@ ifeq ($(DUMP),) } else export QUIET:=1 + ifeq ($(KBUILD_VERBOSE),0) + MAKE:=&>/dev/null $(MAKE) + endif MAKE:=3>&1 4>&2 $(MAKE) endif diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index e947bcfaeaa..4b924a390c0 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -17,11 +17,9 @@ $(STAMP_DIR) $(TARGET_DIR): $(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)" %-compile: $(STAMP_DIR) $(TARGET_DIR) - @echo "-> make $@" $(MAKE) -C $(patsubst %-compile,%,$@) compile MAKEFLAGS="$(BUILD_MAKEFLAGS)" %-install: $(STAMP_DIR) $(TARGET_DIR) - @echo "-> make $@" $(MAKE) -C $(patsubst %-install,%,$@) install MAKEFLAGS="$(BUILD_MAKEFLAGS)" %-clean: $(STAMP_DIR) $(TARGET_DIR) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index d762ae79ed4..42aedcfe542 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -1,4 +1,5 @@ -include $(TOPDIR)/.config +include $(TOPDIR)/include/verbose.mk export SHELL=/bin/bash From 3460c78ea1867d492471b3ae2b3e26097e8f8ad6 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 22:10:43 +0000 Subject: [PATCH 283/757] fix kernel configure target SVN-Revision: 4065 --- openwrt/include/kernel-build.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index d3c47281faa..dfd42274479 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -97,9 +97,8 @@ pkg-install: FORCE @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; } source: $(DL_DIR)/$(LINUX_SOURCE) -prepare: +prepare: $(LINUX_DIR)/.configured @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) - @$(MAKE) $(LINUX_DIR)/.configured compile: prepare $(STAMP_DIR)/.linux-compile From 53349e67e39452ae4960288529377c44e3ff9c95 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 22:20:05 +0000 Subject: [PATCH 284/757] set default verbosity to 0 SVN-Revision: 4066 --- openwrt/include/verbose.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 31e0cea1b31..1ef403ccfb9 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -3,7 +3,7 @@ ifndef KBUILD_VERBOSE ifeq ($(DUMP),) - KBUILD_VERBOSE=1 + KBUILD_VERBOSE=0 else KBUILD_VERBOSE=99 endif From b7efe798c86ff6716c1ba1cec39d3532859c5a89 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 22:46:07 +0000 Subject: [PATCH 285/757] prevent verbose script from corrupting .pkginfo SVN-Revision: 4067 --- openwrt/Makefile | 2 +- openwrt/include/verbose.mk | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index a554a1d867f..10652c07a33 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -46,7 +46,7 @@ ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) @echo Collecting package info... @-for dir in package/*/; do \ echo Source-Makefile: $${dir}Makefile; \ - $(MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \ + $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \ done > $@ endif diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 1ef403ccfb9..6d7c7ef6c16 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -2,17 +2,12 @@ # $Id:$ ifndef KBUILD_VERBOSE - ifeq ($(DUMP),) - KBUILD_VERBOSE=0 - else - KBUILD_VERBOSE=99 - endif + KBUILD_VERBOSE=0 ifeq ("$(origin V)", "command line") KBUILD_VERBOSE=$(V) endif endif - ifneq ($(KBUILD_VERBOSE),99) ifeq ($(QUIET),1) $(MAKECMDGOALS): trace @@ -23,6 +18,7 @@ ifneq ($(KBUILD_VERBOSE),99) } else export QUIET:=1 + NO_TRACE_MAKE:=$(MAKE) V=99 ifeq ($(KBUILD_VERBOSE),0) MAKE:=&>/dev/null $(MAKE) endif From e39d6be3dd6e45b96f32d03ac251435456e2a38d Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 23:03:23 +0000 Subject: [PATCH 286/757] mini_fo patch from upstream (fixes 2.6.17 compile) SVN-Revision: 4068 --- .../patches/103-remove_dead_code.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 openwrt/package/mini_fo/patches/103-remove_dead_code.patch diff --git a/openwrt/package/mini_fo/patches/103-remove_dead_code.patch b/openwrt/package/mini_fo/patches/103-remove_dead_code.patch new file mode 100644 index 00000000000..cf816017412 --- /dev/null +++ b/openwrt/package/mini_fo/patches/103-remove_dead_code.patch @@ -0,0 +1,47 @@ +From: Markus Klotzbuecher <mk@creamnet.de> +Date: Tue, 20 Jun 2006 14:50:26 +0000 (+0200) +Subject: Removed some dead code (mini_fo_lock) that caused compiling to fail on +X-Git-Url: http://www.denx.de/cgi-bin/gitweb.cgi?p=mini_fo.git;a=commitdiff;h=240ede43ad8342334494d36d6d762666f75a1c8e + +Removed some dead code (mini_fo_lock) that caused compiling to fail on +recent kernels. +--- + +--- a/file.c ++++ b/file.c +@@ -668,35 +668,6 @@ mini_fo_fasync(int fd, file_t *file, int + return (err1 || err2); + } + +- +-STATIC int +-mini_fo_lock(file_t *file, int cmd, struct file_lock *fl) +-{ +- int err = -EINVAL; +- file_t *hidden_file = NULL; +- +- if(!check_mini_fo_file(file)) +- goto out; +- +- /* which file shall we lock? */ +- if(ftohf2(file)) +- hidden_file = ftohf2(file); +- else +- hidden_file = ftohf(file); +- +- if (hidden_file->f_op->lock) { +- fl->fl_file = hidden_file; +- err = hidden_file->f_op->lock(hidden_file, F_GETLK, fl); +- fl->fl_file = file; +- } else { +- if(posix_test_lock(hidden_file, fl)) +- err = 0; +- } +- out: +- return err; +-} +- +- + struct file_operations mini_fo_dir_fops = + { + llseek: mini_fo_llseek, From 7a79b788e45cb87888b57e43ff7cf98d7aee8d1f Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 23 Jun 2006 23:29:09 +0000 Subject: [PATCH 287/757] fix ipsec compile (FIXME: move DESTDIR to build template?) SVN-Revision: 4069 --- openwrt/package/ipsec-tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 5567036f83f..1a5ae5b4fd9 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -69,7 +69,7 @@ define Build/Configure endef define Build/Compile - $(call Build/Compile/Default,install) + $(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" all install) endef define Package/ipsec-tools/install From 9813eb4983b64150d3e0f7f3593e6850e559c576 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 13:55:24 +0000 Subject: [PATCH 288/757] enable wlc by default SVN-Revision: 4070 --- openwrt/package/broadcom-wl/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 79839434527..43a0780f472 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -37,6 +37,7 @@ endef define Package/wlc $(call Package/kmod-brcm-wl-mimo) + DEFAULT:=y DEPENDS:=kmod-brcm-wl TITLE:=Setup utility DESCRIPTION:=Utility for initializing the Broadcom wl driver From 292fb9eaeeb53a7cb60a0cecb7e46f11d8626b91 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 15:32:30 +0000 Subject: [PATCH 289/757] fixes for common config functions SVN-Revision: 4071 --- .../base-files/default/etc/functions.sh | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index fbb5a160c45..e87515d6eaa 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -5,6 +5,8 @@ alias debug=${DEBUG:-:} N=" " +_C=0 + # valid interface? if_valid () ( ifconfig "$1" >&- 2>&- || @@ -23,18 +25,24 @@ append() { eval "export ${var}=\"\${${var}:+\${${var}}${value:+$sep}}$value\"" } -config_cb() { - return 0 -} -option_cb() { - return 0 +reset_cb() { + config_cb() { + return 0 + } + option_cb() { + return 0 + } } +reset_cb config () { - config_cb "$@" - _C=$((${_C:-0} + 1)) - export CONFIG_SECTION="${2:-cfg${_C}}" - export CONFIG_${CONFIG_SECTION}_TYPE="$1" + local type="$1" + local name="$2" + _C=$(($_C + 1)) + name="${name:-cfg${_C}}" + config_cb "$type" "$name" + export CONFIG_SECTION="$name" + export CONFIG_${CONFIG_SECTION}_TYPE="$type" } option () { @@ -53,12 +61,16 @@ config_clear() { } config_load() { - local CD="" - if [ \! -e "$1" -a -e "/etc/config/$1" ]; then - cd /etc/config && local CD=1 - fi - [ -e "$1" ] && . $1 - ${CD:+cd - >/dev/null} + local DIR="./" + _C=0 + [ \! -e "$1" -a -e "/etc/config/$1" ] && { + DIR="/etc/config/" + } + [ -e "$DIR$1" ] && { + CONFIG_FILENAME="$DIR$1" + . ${CONFIG_FILENAME} + } || return 1 + ${CD:+cd -} >/dev/null ${CONFIG_SECTION:+config_cb} } From f59462b0e74a806c59057aa7f4138d27bb257a17 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 15:42:53 +0000 Subject: [PATCH 290/757] add a simple /sbin/wifi script with support for the new broadcom driver (incomplete, but works) SVN-Revision: 4072 --- .../base-files/brcm-2.4/etc/config/wireless | 12 ++ openwrt/package/base-files/default/sbin/wifi | 47 +++++ openwrt/package/broadcom-wl/Makefile | 1 + .../broadcom-wl/files/lib/wifi/broadcom.sh | 161 ++++++++++++++++++ 4 files changed, 221 insertions(+) create mode 100644 openwrt/package/base-files/brcm-2.4/etc/config/wireless create mode 100755 openwrt/package/base-files/default/sbin/wifi create mode 100644 openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh diff --git a/openwrt/package/base-files/brcm-2.4/etc/config/wireless b/openwrt/package/base-files/brcm-2.4/etc/config/wireless new file mode 100644 index 00000000000..a7e67435cff --- /dev/null +++ b/openwrt/package/base-files/brcm-2.4/etc/config/wireless @@ -0,0 +1,12 @@ +config wifi-device wl0 + option type broadcom + option channel 5 + +config wifi-iface + option device wl0 + option mode ap + option ssid OpenWrt + option hidden 0 + option encryption none + + diff --git a/openwrt/package/base-files/default/sbin/wifi b/openwrt/package/base-files/default/sbin/wifi new file mode 100755 index 00000000000..c983fe0dfaa --- /dev/null +++ b/openwrt/package/base-files/default/sbin/wifi @@ -0,0 +1,47 @@ +#!/bin/sh +. /etc/functions.sh + +config_get_bool() { + local _tmp + config_get "$1" "$2" "$3" + eval "_tmp=\$$1" + case "$_tmp" in + 1|on|enabled) eval "$1=1";; + 0|off|disabled) eval "$1=0";; + *) eval "$1=${4:-0}";; + esac +} + +config_cb() { + config_get TYPE "$CONFIG_SECTION" TYPE + case "$TYPE" in + wifi-device) + append DEVICES "$CONFIG_SECTION" + ;; + wifi-iface) + config_get device "$CONFIG_SECTION" device + config_get vifs "$device" vifs + append vifs "$CONFIG_SECTION" + config_set "$device" vifs "$vifs" + ;; + esac +} + +config_load wireless + +[ -d /lib/wifi -a -n "$(ls /lib/wifi/*.sh 2>&-)" ] && { + for script in /lib/wifi/*.sh; do + . $script + done +} + +for device in $DEVICES; do ( + config_get type "$device" type + eval "type setup_$type 2>&- >&-" && { + eval "scan_$type '$device'" + eval "setup_$type '$device'" && { + # TODO: set up network settings + /bin/true + } || echo "$device($type): Setup failed" || true + } || echo "$device($type): Interface type not supported" +); done diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 43a0780f472..8b68e752f10 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -100,6 +100,7 @@ define Package/kmod-brcm-wl-mimo/install endef define Package/wlc/install + $(CP) ./files/* $(1)/ install -d -m0755 $(1)/sbin install -m0755 $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/ endef diff --git a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh new file mode 100644 index 00000000000..33a3ebb8fa9 --- /dev/null +++ b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -0,0 +1,161 @@ +scan_broadcom() { + local device="$1" + + config_get vifs "$device" vifs + for vif in $vifs; do + config_get mode "$vif" mode + case "$mode" in + adhoc) + adhoc=1 + adhoc_if="$vif" + ;; + sta) + sta=1 + sta_if="$vif" + ;; + ap) + ap=1 + ap_if="${ap_if:+$ap_if }$vif" + ;; + *) echo "$device($vif): Invalid mode";; + esac + done + + local _c= + for vif in ${adhoc_if:-$sta_if $ap_if}; do + config_set "$vif" ifname "wl0${_c:+.$_c}" + _c=$((${_c:-0} + 1)) + done + + ifdown="down" + for vif in 0 1 2 3; do + append ifdown "vif $vif" "$N" + append ifdown "enabled 0" "$N" + done + + ap=1 + infra=1 + mssid=1 + apsta=0 + radio=1 + case "$adhoc:$sta:$ap" in + 1*) + ap=0 + mssid=0 + infra=0 + ;; + :1:1) + apsta=1 + wet=1 + ;; + :1:) + wet=1 + ap=0 + mssid=0 + ;; + ::) + radio=0 + ;; + esac +} + + +setup_broadcom() { + local _c + config_get channel "$device" channel + config_get country "$device" country + config_get maxassoc "$device" maxassoc + + _c=0 + nas="$(which nas)" + nas_cmd= + for vif in ${adhoc_if:-$sta_if $ap_if}; do + append vif_pre_up "vif $_c" "$N" + append vif_post_up "vif $_c" "$N" + + [ "$vif" = "$sta_if" ] || { + config_get_bool hidden "$vif" hidden 1 + append vif_pre_up "closed $hidden" "$N" + config_get_bool isolate "$vif" isolate + append vif_pre_up "ap_isolate $hidden" "$N" + } + + wsec_r=0 + eap_r=0 + wsec=0 + auth=0 + nasopts= + config_get enc "$vif" encryption + case "$enc" in + WEP|wep) + wsec_r=1 + ;; + *psk*|*PSK*) + wsec_r=1 + config_get key "$vif" key + case "$enc" in + wpa2*|WPA2*|PSK2*|psk2*) auth=128; wsec=4;; + *) auth=4; crypto=2;; + esac + eval "${vif}_key=\"\$key\"" + nasopts="-k \"\$${vif}_key\"" + ;; + *wpa*|*WPA*) + wsec_r=1 + eap_r=1 + config_get key "$vif" key + config_get server "$vif" server + config_get port "$vif" port + case "$enc" in + wpa2*|WPA2*) auth=64; wsec=4;; + *) auth=2; crypto=2;; + esac + eval "${vif}_key=\"\$key\"" + nasopts="-r \"\$${vif}_key\" -h $server -p $port" + ;; + esac + append vif_post_up "wsec $wsec" "$N" + append vif_post_up "wpa_auth $auth" "$N" + append vif_post_up "wsec_restrict $wsec_r" "$N" + append vif_post_up "eap_restrict $eap_r" "$N" + + config_get ssid "$vif" ssid + append vif_post_up "ssid $ssid" "$N" + append vif_post_up "enabled 1" "$N" + + [ -z "$nasopts" ] || { + config_get ifname "$vif" ifname + config_get bridge "$vif" bridge # XXX: integrate with /etc/config/network later + eval "${vif}_ssid=\"\$ssid\"" + mode="-A" + [ "$vif" = "$sta_if" ] && mode="-S" + [ -z "$nas" ] || nas_cmd="${nas_cmd:+$nas_cmd$N}$nas -P /var/run/nas.$ifname.pid -H 34954 -i $ifname${bridge:+ -l $bridge} $mode -m $auth -w $crypto -s \"\$${vif}_ssid\" -g 3600 $nasopts &" + } + _c=$(($_c + 1)) + done + killall -KILL nas >&- 2>&- + cat <<EOF +$ifdown + +mssid $mssid +ap $ap +apsta $apsta +infra $infra +${wet:+wet 1} + +radio ${radio:-1} +macfilter 0 +maclist none +wds none +channel ${channel:-0} +country ${country:-IL0} +maxassoc ${maxassoc:-128} + +$vif_pre_up +up +$vif_post_up +EOF + eval "$nas_cmd" +} + + From 44746a7f68a3f19739d302b3fa48f3831a59631f Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 16:05:43 +0000 Subject: [PATCH 291/757] move the broadcom driver stuff into its own submenu SVN-Revision: 4073 --- openwrt/include/package.mk | 6 ++++++ openwrt/package/broadcom-wl/Makefile | 7 +++---- openwrt/scripts/gen_menuconfig.pl | 12 ++++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index cf8756ea63e..0996574d26d 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -74,6 +74,7 @@ define Package/Default PRIORITY:=optional DEFAULT:= MENU:= + SUBMENU:= TITLE:= DESCRIPTION:= endef @@ -124,6 +125,11 @@ define BuildPackage echo "Menu: $(MENU)"; endif + ifneq ($(SUBMENU),) + DUMPINFO += \ + echo "Submenu: $(SUBMENU)"; + endif + ifneq ($(DEFAULT),) DUMPINFO += \ echo "Default: $(DEFAULT)"; diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 8b68e752f10..79586a3a57b 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -21,8 +21,8 @@ define Package/kmod-brcm-wl CATEGORY:=Drivers DEPENDS:=@LINUX_2_4_BRCM DEFAULT:=y - MENU:=1 - TITLE:=Proprietary BCM43xx WiFi driver + SUBMENU:=Proprietary BCM43xx WiFi driver + TITLE:=Kernel driver (normal version) DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE) endef @@ -30,8 +30,7 @@ endef define Package/kmod-brcm-wl-mimo $(call Package/kmod-brcm-wl) DEFAULT:=m if ALL - MENU:= - TITLE:=Proprietary BCM43xx WiFi driver (MIMO version) + TITLE:=Kernel driver (MIMO version) DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset (MIMO version) endef diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index eff78dcd90e..c1510b0d584 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -5,6 +5,7 @@ my $src; my $makefile; my $pkg; my %category; +my $cur_menu; sub print_category($) { my $cat = shift; @@ -15,6 +16,16 @@ sub print_category($) { my %spkg = %{$category{$cat}}; foreach my $spkg (sort {uc($a) cmp uc($b)} keys %spkg) { foreach my $pkg (@{$spkg{$spkg}}) { + if ($cur_menu ne $pkg->{submenu}) { + if ($cur_menu) { + print "endmenu\n"; + undef $cur_menu; + } + if ($pkg->{submenu}) { + $cur_menu = $pkg->{submenu}; + print "menu \"$cur_menu\"\n"; + } + } my $title = $pkg->{name}; my $c = (72 - length($pkg->{name}) - length($pkg->{title})); if ($c > 0) { @@ -65,6 +76,7 @@ while ($line = <>) { $line =~ /^Version: \s*(.+)\s*$/ and $pkg->{version} = $1; $line =~ /^Title: \s*(.+)\s*$/ and $pkg->{title} = $1; $line =~ /^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1; + $line =~ /^Submenu: \s*(.+)\s*$/ and $pkg->{submenu} = $1; $line =~ /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1; $line =~ /^Depends: \s*(.+)\s*$/ and do { my @dep = split /\s+/, $1; From bf2ce6070e5e011d3afa910a85a99b26fdf6d851 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 16:20:13 +0000 Subject: [PATCH 292/757] small bugfixes for wifi (broadcom) SVN-Revision: 4074 --- openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh index 33a3ebb8fa9..f5c1ccb0262 100644 --- a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -69,6 +69,7 @@ setup_broadcom() { _c=0 nas="$(which nas)" nas_cmd= + if_up= for vif in ${adhoc_if:-$sta_if $ap_if}; do append vif_pre_up "vif $_c" "$N" append vif_post_up "vif $_c" "$N" @@ -123,8 +124,9 @@ setup_broadcom() { append vif_post_up "ssid $ssid" "$N" append vif_post_up "enabled 1" "$N" + config_get ifname "$vif" ifname + append if_up "ifconfig $ifname up" ";$N" [ -z "$nasopts" ] || { - config_get ifname "$vif" ifname config_get bridge "$vif" bridge # XXX: integrate with /etc/config/network later eval "${vif}_ssid=\"\$ssid\"" mode="-A" @@ -134,7 +136,7 @@ setup_broadcom() { _c=$(($_c + 1)) done killall -KILL nas >&- 2>&- - cat <<EOF + wlc stdin <<EOF $ifdown mssid $mssid @@ -156,6 +158,7 @@ up $vif_post_up EOF eval "$nas_cmd" + eval "$if_up" } From 75e490000274dcc5ffe3ed9ea8763be69fb1c1e8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 16:24:45 +0000 Subject: [PATCH 293/757] work around a busybox bug SVN-Revision: 4075 --- openwrt/package/base-files/default/sbin/wifi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/base-files/default/sbin/wifi b/openwrt/package/base-files/default/sbin/wifi index c983fe0dfaa..b8b995bab2d 100755 --- a/openwrt/package/base-files/default/sbin/wifi +++ b/openwrt/package/base-files/default/sbin/wifi @@ -37,7 +37,7 @@ config_load wireless for device in $DEVICES; do ( config_get type "$device" type - eval "type setup_$type 2>&- >&-" && { + eval "type setup_$type" 2>/dev/null >/dev/null && { eval "scan_$type '$device'" eval "setup_$type '$device'" && { # TODO: set up network settings From 95c014f19d1b264acaf11ddbefcfa866031a3742 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 16:28:10 +0000 Subject: [PATCH 294/757] make nas depend on nvram SVN-Revision: 4076 --- openwrt/package/broadcom-wl/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 79586a3a57b..23ea6744170 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -52,6 +52,7 @@ endef define Package/nas $(call Package/wl) + DEPENDS:=nvram TITLE:=Proprietary WPA/WPA2 authenticator DESCRIPTION:=Proprietary WPA/WPA2 authenticator for the Broadcom wl driver endef From b70d752456156b816961fdc43bb2892c0f0611c1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 16:32:13 +0000 Subject: [PATCH 295/757] reorder nas command line parameters (required for bridge operation) SVN-Revision: 4077 --- openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh index f5c1ccb0262..6cac60c0b76 100644 --- a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -131,7 +131,7 @@ setup_broadcom() { eval "${vif}_ssid=\"\$ssid\"" mode="-A" [ "$vif" = "$sta_if" ] && mode="-S" - [ -z "$nas" ] || nas_cmd="${nas_cmd:+$nas_cmd$N}$nas -P /var/run/nas.$ifname.pid -H 34954 -i $ifname${bridge:+ -l $bridge} $mode -m $auth -w $crypto -s \"\$${vif}_ssid\" -g 3600 $nasopts &" + [ -z "$nas" ] || nas_cmd="${nas_cmd:+$nas_cmd$N}$nas -P /var/run/nas.$ifname.pid -H 34954 ${bridge:+ -l $bridge} -i $ifname $mode -m $auth -w $crypto -s \"\$${vif}_ssid\" -g 3600 $nasopts &" } _c=$(($_c + 1)) done From 965adec3bedfc4e64e88d217e10cd96fb6b55b0a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 16:59:19 +0000 Subject: [PATCH 296/757] add extra targets to improve make tracing output SVN-Revision: 4078 --- openwrt/include/kernel-build.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index dfd42274479..706764db581 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -8,6 +8,7 @@ LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ KERNEL_IDIR:=$(KERNEL_BUILD_DIR)/kernel-ipkg KERNEL_IPKG:=$(KERNEL_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk +TARGETS += $(KERNEL_IPKG) INSTALL_TARGETS += $(KERNEL_IPKG) $(TARGETS): $(PACKAGE_DIR) @@ -74,8 +75,12 @@ $(LINUX_DIR)/.modules_done: $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done +modules: $(LINUX_DIR)/.modules_done +packages: $(TARGETS) + $(STAMP_DIR)/.linux-compile: - @$(MAKE) $(LINUX_DIR)/.modules_done $(TARGETS) $(KERNEL_IPKG) + @$(MAKE) modules + @$(MAKE) packages ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux touch $@ From 611f3ded07fb4f1cb767e753e1f6a8b716dfeb3a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 17:00:55 +0000 Subject: [PATCH 297/757] use NO_TRACE_MAKE for menuconfig SVN-Revision: 4079 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 10652c07a33..f5d49fed270 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -88,7 +88,7 @@ toolchain/%: FORCE $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) .config: ./scripts/config/conf FORCE - @[ -f .config ] || $(MAKE) menuconfig + @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig $< -D .config Config.in >/dev/null 2>/dev/null download: .config FORCE From 49e12766bcd39a771cb85bb5671ab0ea3ee8d7ad Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 25 Jun 2006 20:06:59 +0000 Subject: [PATCH 298/757] add 'reset to defaults' to menuconfig SVN-Revision: 4080 --- openwrt/scripts/config/confdata.c | 23 +++++++++++++++++++++++ openwrt/scripts/config/lkc_proto.h | 1 + openwrt/scripts/config/mconf.c | 5 +++++ 3 files changed, 29 insertions(+) diff --git a/openwrt/scripts/config/confdata.c b/openwrt/scripts/config/confdata.c index a1abdeb0873..641aa489153 100644 --- a/openwrt/scripts/config/confdata.c +++ b/openwrt/scripts/config/confdata.c @@ -83,6 +83,29 @@ char *conf_get_default_confname(void) return name; } +void conf_reset(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) { + sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED; + if (sym_is_choice(sym)) + sym->flags &= ~SYMBOL_NEW; + sym->flags &= ~SYMBOL_VALID; + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + if (sym->user.val) + free(sym->user.val); + default: + sym->user.val = NULL; + sym->user.tri = no; + } + } +} + int conf_read_simple(const char *name) { FILE *in = NULL; diff --git a/openwrt/scripts/config/lkc_proto.h b/openwrt/scripts/config/lkc_proto.h index b6a389c5fcb..15fafd01b08 100644 --- a/openwrt/scripts/config/lkc_proto.h +++ b/openwrt/scripts/config/lkc_proto.h @@ -2,6 +2,7 @@ /* confdata.c */ P(conf_parse,void,(const char *name)); P(conf_read,int,(const char *name)); +P(conf_reset,void,(void)); P(conf_read_simple,int,(const char *name)); P(conf_write,int,(const char *name)); diff --git a/openwrt/scripts/config/mconf.c b/openwrt/scripts/config/mconf.c index 2ef24aa5b69..5caf82280de 100644 --- a/openwrt/scripts/config/mconf.c +++ b/openwrt/scripts/config/mconf.c @@ -737,6 +737,8 @@ static void conf(struct menu *menu) if (menu == &rootmenu) { cprint(":"); cprint("--- "); + cprint("D"); + cprint(_(" Reset to defaults")); cprint("L"); cprint(_(" Load an Alternate Configuration File")); cprint("S"); @@ -783,6 +785,9 @@ static void conf(struct menu *menu) case 's': conf_string(submenu); break; + case 'D': + conf_reset(); + break; case 'L': conf_load(); break; From 152909a65fdf2387cddfaf82e72e0c3b53dda621 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 25 Jun 2006 21:37:07 +0000 Subject: [PATCH 299/757] fix inclusion of kernel modules selected for install in images (closes: #598). SVN-Revision: 4081 --- openwrt/include/kernel.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index c110f687a34..b40f65f480d 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -47,10 +47,10 @@ PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_ I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(2) ifeq ($$(KDEPEND_$(1)),m) -ifneq ($(CONFIG_PACKAGE_KMOD_$(1)),) +ifneq ($$(CONFIG_PACKAGE_KMOD_$(1)),) TARGETS += $$(PKG_$(1)) endif -ifeq ($(CONFIG_PACKAGE_KMOD_$(1)),y) +ifeq ($$(CONFIG_PACKAGE_KMOD_$(1)),y) INSTALL_TARGETS += $$(PKG_$(1)) endif endif From b33647bf27f5b28c83398e96ad213c24302f5fd8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 26 Jun 2006 01:55:47 +0000 Subject: [PATCH 300/757] add support for new modules.mk format (no autogenerated Config.in yet) SVN-Revision: 4083 --- openwrt/include/kernel-build.mk | 90 +++++++++++++++++++++++++++++++++ openwrt/include/modules-2.4.mk | 5 -- openwrt/include/modules-2.6.mk | 5 -- openwrt/include/modules.mk | 27 ++++++++++ openwrt/target/linux/Config.in | 20 ++++++-- 5 files changed, 134 insertions(+), 13 deletions(-) create mode 100644 openwrt/include/modules.mk diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 706764db581..3a455a812ec 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -127,3 +127,93 @@ clean: FORCE rm -f $(STAMP_DIR)/.linux-compile rm -rf $(KERNEL_BUILD_DIR) rm -f $(TARGETS) + + +define AutoLoad +add_module $(1) "$(2)"; +endef + +define KernelPackage/Defaults + VERSION:=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) + DEPENDS:= + MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org> + SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) + PKGARCH:=$(ARCH) + PRIORITY:=optional + KCONFIG:= + FILES:= + BUILD:= + MODULES:= + TITLE:= + DESCRIPTION:= +endef + +define KernelPackage + NAME:=$(1) + $(eval $(call KernelPackage/Defaults)) + $(eval $(call KernelPackage/$(1))) + $(eval $(call KernelPackage/$(1)/$(KERNEL))) + + PKG_$(1) := $(PACKAGE_DIR)/kmod-$(1)_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk + I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(1) + + IDEPEND_$(1):='kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))' $(DEPENDS) + + ifeq ($$(strip $(KCONFIG)),) + KDEPEND_$(1):=m + else + KDEPEND_$(1):=$($(KCONFIG)) + endif + ifeq ($$(KDEPEND_$(1)),m) + ifneq ($(CONFIG_PACKAGE_kmod-$(1)),) + packages: $$(PKG_$(1)) + endif + ifeq ($(CONFIG_PACKAGE_kmod-$(1)),y) + install-kmod-$(1): FORCE + $(IPKG) install $$(PKG_$(1)) + pkg-install: install-kmod-$(1) + endif + endif + + $$(PKG_$(1)): $(LINUX_DIR)/.modules_done + rm -rf $$(I_$(1)) + install -d -m0755 $$(I_$(1))/CONTROL + echo "Package: kmod-$(1)" > $$(I_$(1))/CONTROL/control + echo "Version: $(VERSION)" >> $$(I_$(1))/CONTROL/control + ( \ + DEPENDS=; \ + for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \ + DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \ + done; \ + echo "Depends: $$$$DEPENDS" >> $$(I_$(1))/CONTROL/control; \ + ) + echo "Source: $(SOURCE)" >> $$(I_$(1))/CONTROL/control + echo "Section: kernel" >> $$(I_$(1))/CONTROL/control + echo "Priority: $(PRIORITY)" >> $$(I_$(1))/CONTROL/control + echo "Maintainer: $(MAINTAINER)" >> $$(I_$(1))/CONTROL/control + echo "Architecture: $(PKGARCH)" >> $$(I_$(1))/CONTROL/control + echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(I_$(1))/CONTROL/control + ifneq ($(strip $(FILES)),) + mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION) + $(CP) $(FILES) $$(I_$(1))/lib/modules/$(LINUX_VERSION)/ + endif + ifneq ($(MODULES),) + export modules=; \ + add_module() { \ + mkdir -p $$(I_$(1))/etc/modules.d; \ + echo "$$$$2" > $$(I_$(1))/etc/modules.d/$$$$1-$(1); \ + modules="$$$${modules:+$$$$modules }$$$$1-$(1)"; \ + }; \ + $(MODULES) \ + mkdir -p $$(I_$(1))/etc/modules.d; \ + echo "#!/bin/sh" >> $$(I_$(1))/CONTROL/postinst; \ + echo "[ -z \"\$$$$IPKG_INSTROOT\" ] || exit" >> $$(I_$(1))/CONTROL/postinst; \ + echo ". /etc/functions.sh" >> $$(I_$(1))/CONTROL/postinst; \ + echo "load_modules $$$$modules" >> $$(I_$(1))/CONTROL/postinst; \ + chmod 0755 $$(I_$(1))/CONTROL/postinst; + endif + $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) +endef + +-include $(INCLUDE_DIR)/modules.mk + diff --git a/openwrt/include/modules-2.4.mk b/openwrt/include/modules-2.4.mk index 553db03270f..325cf16bccb 100644 --- a/openwrt/include/modules-2.4.mk +++ b/openwrt/include/modules-2.4.mk @@ -107,11 +107,6 @@ $(eval $(call KMOD_template,IP6TABLES,ip6tables,\ # Block devices -$(eval $(call KMOD_template,IDE,ide,\ - $(MODULES_DIR)/kernel/drivers/ide/*.o \ - $(MODULES_DIR)/kernel/drivers/ide/*/*.o \ -,CONFIG_IDE,,20,pdc202xx_old ide-core ide-detect ide-disk)) - $(eval $(call KMOD_template,LOOP,loop,\ $(MODULES_DIR)/kernel/drivers/block/loop.o \ ,CONFIG_BLK_DEV_LOOP,,20,loop)) diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index aada707fbcc..6e8a2ded70f 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -112,11 +112,6 @@ $(eval $(call KMOD_template,IP6TABLES,ip6tables,\ # Block devices -$(eval $(call KMOD_template,IDE,ide,\ - $(MODULES_DIR)/kernel/drivers/ide/*.ko \ - $(MODULES_DIR)/kernel/drivers/ide/*/*.ko \ -,CONFIG_IDE)) - $(eval $(call KMOD_template,LOOP,loop,\ $(MODULES_DIR)/kernel/drivers/block/loop.ko \ ,CONFIG_BLK_DEV_LOOP,,20,loop)) diff --git a/openwrt/include/modules.mk b/openwrt/include/modules.mk new file mode 100644 index 00000000000..026c4a61031 --- /dev/null +++ b/openwrt/include/modules.mk @@ -0,0 +1,27 @@ +include $(TOPDIR)/include/kernel.mk + +define KernelPackage/ide-core +TITLE:=Kernel support for IDE +DESCRIPTION:=Kernel modules for IDE support\\\ + useful for usb mass storage devices (e.g. on WL-HDD)\\\ + \\\ + Includes: \\\ + - ide-core \\\ + - ide-detect \\\ + - ide-disk \\\ + - pdc202xx_old +KCONFIG:=CONFIG_IDE +FILES:=$(MODULES_DIR)/kernel/drivers/ide/*.$(LINUX_KMOD_SUFFIX) +MODULES:=$(call AutoLoad,20,ide-core) $(call AutoLoad,90,ide-detect ide-disk) +endef +$(eval $(call KernelPackage,ide-core)) + +define KernelPackage/ide-pdc202xx +TITLE:=PDC202xx IDE driver +DESCRIPTION:=PDC202xx IDE driver +KCONFIG:=CONFIG_BLK_DEV_PDC202XX_OLD +FILES:=$(MODULES_DIR)/kernel/drivers/ide/pci/pdc202xx_old.$(LINUX_KMOD_SUFFIX) +MODULES:=$(call AutoLoad,30,pdc202xx_old) +endef +$(eval $(call KernelPackage,ide-pdc202xx)) + diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 71f88d7a527..65b8592abdc 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -265,8 +265,8 @@ endmenu menu "Block devices support" -config PACKAGE_KMOD_IDE - prompt "kmod-ide.......................... IDE support" +config PACKAGE_kmod-ide-core + prompt "kmod-ide-core..................... IDE support" tristate default m depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM @@ -278,7 +278,21 @@ config PACKAGE_KMOD_IDE - ide-core - ide-detect - ide-disk - - pdc202xx_old + +config PACKAGE_kmod-ide-pdc202xx + prompt "kmod-ide-pdc202xx................. PDC202xx driver" + tristate + default m + depends PACKAGE_kmod-ide-core + depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM + help + Kernel modules for IDE support + useful for usb mass storage devices (e.g. on WL-HDD) + + Includes: + - ide-core + - ide-detect + - ide-disk config PACKAGE_KMOD_LOOP prompt "kmod-loop......................... Loop mount support" From 9fd0b05b294a0b247a9ec3b2001b074297c7b16c Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Mon, 26 Jun 2006 11:45:23 +0000 Subject: [PATCH 301/757] Merge premilinary Broadcom 63xx support (Livebox, Siemens SE515...) Kernel compiles fine, does not include linux-2.6.8.1 linux-mips specific fixes and neither includes broadcom changes to netfiler Needs testing of course :) SVN-Revision: 4084 --- openwrt/target/Config.in | 10 + openwrt/target/image/brcm63xx/Makefile | 27 + openwrt/target/linux/au1000-2.6/config | 105 +- openwrt/target/linux/brcm63xx-2.6/Makefile | 18 + openwrt/target/linux/brcm63xx-2.6/config | 988 + .../linux/brcm63xx-2.6/files/built-in.o | Bin 0 -> 279454 bytes .../brcm63xx-2.6/patches/001-bcm963xx.patch | 48189 ++++++++++++++++ 7 files changed, 49318 insertions(+), 19 deletions(-) create mode 100644 openwrt/target/image/brcm63xx/Makefile create mode 100644 openwrt/target/linux/brcm63xx-2.6/Makefile create mode 100644 openwrt/target/linux/brcm63xx-2.6/config create mode 100644 openwrt/target/linux/brcm63xx-2.6/files/built-in.o create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 47e62d41e62..8037a88c0b8 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -43,6 +43,16 @@ config LINUX_2_6_BRCM Build firmware images for Broadcom based routers (e.g. Netgear WGT634u) +config LINUX_2_6_BRCM63XX + bool "Broadcom BCM63xx [2.6]" + select mips + select LINUX_2_6 + select PCI_SUPPORT + select PCMCIA_SUPPORT + help + Build firmware images for Broadcom based xDSL/routers + (e.g. Inventel Livebox, Siemens SE515) + config LINUX_2_6_RB532 bool "Mikrotik RB532 [2.6]" select mipsel diff --git a/openwrt/target/image/brcm63xx/Makefile b/openwrt/target/image/brcm63xx/Makefile new file mode 100644 index 00000000000..19799e88af1 --- /dev/null +++ b/openwrt/target/image/brcm63xx/Makefile @@ -0,0 +1,27 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +LOADADDR = 0x8108c8f4 # RAM start + 16M +KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile +RAMSIZE = 0x01000000 # 64MB + +LOADER_MAKEOPTS= \ + KDIR=$(KDIR) \ + LOADADDR=$(LOADADDR) \ + KERNEL_ENTRY=$(KERNEL_ENTRY) \ + RAMSIZE=$(RAMSIZE) + +define Build/Clean + $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean +endef + +define Image/Prepare + cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma + $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile +endef + +define Image/Build + cp $(KDIR)/vmlinux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img +endef + +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/au1000-2.6/config b/openwrt/target/linux/au1000-2.6/config index 8a24bd557e0..fbb0d7e96dc 100644 --- a/openwrt/target/linux/au1000-2.6/config +++ b/openwrt/target/linux/au1000-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Tue Jun 20 11:35:00 2006 +# Mon Jun 26 09:27:40 2006 # CONFIG_MIPS=y @@ -255,32 +255,39 @@ CONFIG_IP_FIB_HASH=y CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_FWMARK=y CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_DRR=m CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m CONFIG_NET_IPGRE_BROADCAST=y -# CONFIG_IPSEC_NAT_TRAVERSAL is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_ARPD=y CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -# CONFIG_INET_DIAG is not set +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m CONFIG_TCP_CONG_ADVANCED=y # # TCP congestion control # CONFIG_TCP_CONG_BIC=y -# CONFIG_TCP_CONG_CUBIC is not set +CONFIG_TCP_CONG_CUBIC=m CONFIG_TCP_CONG_WESTWOOD=m CONFIG_TCP_CONG_HTCP=m CONFIG_TCP_CONG_HSTCP=m @@ -291,7 +298,36 @@ CONFIG_TCP_CONG_SCALABLE=m # # IP: Virtual Server Configuration # -# CONFIG_IP_VS is not set +CONFIG_IP_VS=m +# CONFIG_IP_VS_DEBUG is not set +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m CONFIG_IPV6=m CONFIG_IPV6_PRIVACY=y CONFIG_IPV6_ROUTER_PREF=y @@ -314,10 +350,10 @@ CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NETFILTER_NETLINK_LOG=m CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -418,7 +454,22 @@ CONFIG_IP_NF_TARGET_SET=m # IPv6: Netfilter Configuration (EXPERIMENTAL) # CONFIG_IP6_NF_QUEUE=m -# CONFIG_IP6_NF_IPTABLES is not set +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_IMQ=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_RAW=m # # Bridge: Netfilter Configuration @@ -447,17 +498,33 @@ CONFIG_BRIDGE_EBT_ULOG=m # # DCCP Configuration (EXPERIMENTAL) # -# CONFIG_IP_DCCP is not set +CONFIG_IP_DCCP=m +CONFIG_INET_DCCP_DIAG=m +CONFIG_IP_DCCP_ACKVEC=y + +# +# DCCP CCIDs Configuration (EXPERIMENTAL) +# +CONFIG_IP_DCCP_CCID2=m +CONFIG_IP_DCCP_CCID3=m +CONFIG_IP_DCCP_TFRC_LIB=m # # SCTP Configuration (EXPERIMENTAL) # -# CONFIG_IP_SCTP is not set +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y # # TIPC Configuration (EXPERIMENTAL) # -# CONFIG_TIPC is not set +CONFIG_TIPC=m +# CONFIG_TIPC_ADVANCED is not set +# CONFIG_TIPC_DEBUG is not set # CONFIG_ATM is not set CONFIG_BRIDGE=m CONFIG_VLAN_8021Q=m @@ -489,7 +556,7 @@ CONFIG_NET_SCH_HFSC=m CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_RED=m CONFIG_NET_SCH_SFQ=m -# CONFIG_NET_SCH_ESFQ is not set +CONFIG_NET_SCH_ESFQ=m CONFIG_NET_SCH_TEQL=m CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_GRED=m @@ -523,10 +590,10 @@ CONFIG_NET_ACT_POLICE=m CONFIG_NET_ACT_GACT=m CONFIG_GACT_PROB=y CONFIG_NET_ACT_MIRRED=m -# CONFIG_NET_ACT_IPT is not set +CONFIG_NET_ACT_IPT=m CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_SIMP=m -# CONFIG_NET_CLS_IND is not set +CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y # diff --git a/openwrt/target/linux/brcm63xx-2.6/Makefile b/openwrt/target/linux/brcm63xx-2.6/Makefile new file mode 100644 index 00000000000..a48442a69f3 --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/Makefile @@ -0,0 +1,18 @@ +include $(TOPDIR)/rules.mk + +LINUX_VERSION:=2.6.8.1 +LINUX_RELEASE:=1 +LINUX_KERNEL_MD5SUM:=9517ca999e822b898fbdc7e72796b1aa + +include ./config +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk + + +$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked + #[ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) + @$(CP) config $(LINUX_DIR)/.config + @$(CP) ./files/built-in.o $(LINUX_DIR)/bcmdrivers/broadcom/ + touch $@ + diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config new file mode 100644 index 00000000000..f774cfc276c --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -0,0 +1,988 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_MIPS=y +# CONFIG_MIPS64 is not set +# CONFIG_64BIT is not set +CONFIG_MIPS32=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Machine selection +# +CONFIG_MIPS_BRCM=y +# CONFIG_BCM96338 is not set +# CONFIG_BCM96345 is not set +CONFIG_BCM96348=y +CONFIG_BCM_BOARD=y +CONFIG_BCM_SERIAL=y +CONFIG_BCM_ENET=y +CONFIG_BCM_USB=m +CONFIG_BCM_WLAN=m +CONFIG_BCM_PCI=y +CONFIG_BCM_ATMAPI=y +CONFIG_BCM_ATMTEST=m +CONFIG_BCM_ADSL=y +CONFIG_BCM_ENDPOINT=m +CONFIG_BCM_PROCFS=m +CONFIG_BCM_VDSL=m +CONFIG_BCM_SECURITY=m +CONFIG_BCM_HPNA=m +CONFIG_BCM_BOARD_IMPL=1 +CONFIG_BCM_SERIAL_IMPL=1 +CONFIG_BCM_ENET_IMPL=2 +CONFIG_BCM_USB_IMPL=2 +CONFIG_BCM_WLAN_IMPL=1 +CONFIG_BCM_ATMAPI_IMPL=1 +CONFIG_BCM_ATMTEST_IMPL=1 +CONFIG_BCM_BLAA_IMPL=1 +CONFIG_BCM_ADSL_IMPL=1 +CONFIG_BCM_ENDPOINT_IMPL=1 +CONFIG_BCM_PROCFS_IMPL=1 +CONFIG_BCM_VDSL_IMPL=1 +CONFIG_BCM_SECURITY_IMPL=1 +CONFIG_BCM_HPNA_IMPL=0 +# CONFIG_ROOTFS_SQUASHFS is not set +CONFIG_ROOTFS_CRAMFS=y +# CONFIG_ROOTFS_JFFS2 is not set +# CONFIG_ROOTFS_NFS is not set +CONFIG_ROOT_FLASHFS="root=31:0 ro noinitrd" +# CONFIG_MACH_JAZZ is not set +# CONFIG_BAGET_MIPS is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MIPS_EV64120 is not set +# CONFIG_MIPS_EV96100 is not set +# CONFIG_MIPS_IVR is not set +# CONFIG_LASAT is not set +# CONFIG_MIPS_ITE8172 is not set +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MOMENCO_OCELOT is not set +# CONFIG_MOMENCO_OCELOT_G is not set +# CONFIG_MOMENCO_OCELOT_C is not set +# CONFIG_MOMENCO_JAGUAR_ATX is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set +# CONFIG_DDB5477 is not set +# CONFIG_NEC_OSPREY is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SOC_AU1X00 is not set +# CONFIG_SIBYTE_SB1xxx_SOC is not set +# CONFIG_SNI_RM200_PCI is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_HAVE_DEC_LOCK=y +CONFIG_DMA_NONCOHERENT=y +# CONFIG_CPU_LITTLE_ENDIAN is not set +CONFIG_MIPS_L1_CACHE_SHIFT=5 +# CONFIG_FB is not set + +# +# CPU selection +# +CONFIG_CPU_MIPS32=y +# CONFIG_CPU_MIPS64 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +# CONFIG_CPU_SB1 is not set +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +CONFIG_CPU_HAS_PREFETCH=y +# CONFIG_VTAG_ICACHE is not set +# CONFIG_64BIT_PHYS_ADDR is not set +# CONFIG_CPU_ADVANCED is not set +CONFIG_CPU_HAS_LLSC=y +CONFIG_CPU_HAS_SYNC=y +# CONFIG_PREEMPT is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +CONFIG_PCI=y +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y +CONFIG_MMU=y + +# +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_MISC=m +CONFIG_TRAD_SIGNALS=y +# CONFIG_BINFMT_IRIX is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +# CONFIG_STANDALONE is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y +CONFIG_MTD_REDBOOT_PARTS_READONLY=y +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +# CONFIG_MTD_CHAR is not set +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_CFI_INTELEXT is not set +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_AMDSTD_RETRY=0 +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +CONFIG_MTD_COMPLEX_MAPPINGS=y +# CONFIG_MTD_PHYSMAP is not set +CONFIG_MTD_BCM963XX=y +# CONFIG_MTD_PCI is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_LBD is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +CONFIG_IP_MROUTE=y +# CONFIG_IP_PIMSM_V1 is not set +# CONFIG_IP_PIMSM_V2 is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_BRIDGE_NETFILTER is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_H323=y +CONFIG_IP_NF_IRC=y +CONFIG_IP_NF_TFTP=y +# CONFIG_IP_NF_AMANDA is not set +# CONFIG_IP_NF_DTX8 is not set +CONFIG_IP_NF_WM=m +CONFIG_IP_NF_PT=m +CONFIG_IP_NF_IPSEC=m +# CONFIG_IP_NF_RTSP is not set +# CONFIG_IP_NF_QUEUE is not set +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_LIMIT=y +CONFIG_IP_NF_MATCH_IPRANGE=y +CONFIG_IP_NF_MATCH_MAC=y +# CONFIG_IP_NF_MATCH_PKTTYPE is not set +CONFIG_IP_NF_MATCH_MARK=y +# CONFIG_IP_NF_MATCH_MULTIPORT is not set +# CONFIG_IP_NF_MATCH_TOS is not set +# CONFIG_IP_NF_MATCH_RECENT is not set +# CONFIG_IP_NF_MATCH_ECN is not set +# CONFIG_IP_NF_MATCH_DSCP is not set +# CONFIG_IP_NF_MATCH_AH_ESP is not set +# CONFIG_IP_NF_MATCH_LENGTH is not set +# CONFIG_IP_NF_MATCH_TTL is not set +# CONFIG_IP_NF_MATCH_TCPMSS is not set +# CONFIG_IP_NF_MATCH_HELPER is not set +CONFIG_IP_NF_MATCH_STATE=y +# CONFIG_IP_NF_MATCH_CONNTRACK is not set +# CONFIG_IP_NF_MATCH_OWNER is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_REDIRECT=y +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set +CONFIG_IP_NF_NAT_LOCAL=y +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_IRC=y +CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_H323=y +CONFIG_IP_NF_NAT_TFTP=y +CONFIG_IP_NF_NAT_IPSEC=m +CONFIG_IP_NF_MANGLE=y +# CONFIG_IP_NF_TARGET_TOS is not set +# CONFIG_IP_NF_TARGET_FTOS is not set +# CONFIG_IP_NF_TARGET_ECN is not set +# CONFIG_IP_NF_TARGET_DSCP is not set +CONFIG_IP_NF_TARGET_MARK=y +# CONFIG_IP_NF_TARGET_CLASSIFY is not set +CONFIG_IP_NF_TARGET_LOG=y +# CONFIG_IP_NF_TARGET_ULOG is not set +CONFIG_IP_NF_TARGET_TCPMSS=y +# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_REALM is not set +# CONFIG_IP_NF_PPTP is not set + +# +# Bridge: Netfilter Configuration +# +# CONFIG_BRIDGE_NF_EBTABLES is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +CONFIG_ATM=y +CONFIG_ATM_CLIP=y +# CONFIG_ATM_CLIP_NO_ICMP is not set +# CONFIG_ATM_LANE is not set +CONFIG_ATM_BR2684=y +# CONFIG_ATM_BR2684_IPFILTER is not set +CONFIG_ATM_RT2684=y +CONFIG_BRIDGE=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_BCSP_TXCRC=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +# CONFIG_NET_PCI is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +# CONFIG_HERMES is not set +# CONFIG_ATMEL is not set + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +# CONFIG_PRISM54 is not set +CONFIG_NET_WIRELESS=y + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# ATM drivers +# +# CONFIG_ATM_TCP is not set +# CONFIG_ATM_LANAI is not set +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_ZATM is not set +# CONFIG_ATM_NICSTAR is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_AMBASSADOR is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PPP=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=y +CONFIG_PPPOATM=y +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=2 +# CONFIG_QIC02_TAPE is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_BANDWIDTH=y +CONFIG_USB_DYNAMIC_MINORS=y + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=m +CONFIG_USB_EHCI_SPLIT_ISO=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_OHCI_HCD=m +CONFIG_USB_UHCI_HCD=m + +# +# USB Device Class drivers +# + +# +# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_STORAGE is not set + +# +# USB Human Interface Devices (HID) +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + +# +# USB Network adaptors +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_SPEEDTOUCH is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_TEST is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_SQUASHFS is not set +CONFIG_CRAMFS=y +# CONFIG_LZMA_FS_INFLATE is not set +CONFIG_ZLIB_FS_INFLATE=y +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +# CONFIG_NFS_FS is not set +# CONFIG_NFSD is not set +# CONFIG_EXPORTFS is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +# CONFIG_MSDOS_PARTITION is not set + +# +# Native Language Support +# +# CONFIG_NLS is not set + +# +# Kernel hacking +# +CONFIG_CROSSCOMPILE=y +CONFIG_CMDLINE="" +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_KGDB is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_RUNTIME_DEBUG is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_MIPS_UNCACHED is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +# CONFIG_CRYPTO_TEST is not set + +# +# Library routines +# +CONFIG_CRC_CCITT=y +CONFIG_CRC32=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff --git a/openwrt/target/linux/brcm63xx-2.6/files/built-in.o b/openwrt/target/linux/brcm63xx-2.6/files/built-in.o new file mode 100644 index 0000000000000000000000000000000000000000..721d8f9174fc4684d94196823337b037175505c9 GIT binary patch literal 279454 zcmd?S4RjpWb?14jx&Smmh%ACFxFx|-H(2<P2`eobagYqg(*{5aj+t4=!#GTao4_Dt zGl^!Fwv~x@*Js@ZDVdwJ0Ep7cnw?C71tE$Vw*cCaZDmKcu#hav8O<(_$4->9&KxYI zShAh7NAXb{#g^6k`@gDcG(qai<K!f>IHyrxuim@we!u(fd-btB`}TUiXN^D4vYc<+ z@V{7{w9vC5S7N~4YH#^&ef!Ie@{N;^J+IULFTDJsS)sV{h-V$TzRzBqTe24;-!hzs zD~lF#?&%rl6Wp7~m2I0@si=D@JCZTu-j?VP*Ne8VHf>pslN>uZ9^{zgxSwM<M>`|F zSu|>vS+{Ke7rZR>?_8R(sq}tr#ztxtJE-gG7>#7YvW<mB^TSmgM>02khx5wNq1&#p zF}uPn49(v$qxyJv-)r<~b!E|3oB9;0pRds;^+A1_O8Rs(>C-K*(x-0qX~?hFfywoS zK7UPp`%(KfIAa}PqT6f$9DtV~tbp?&;iL*at?YO~|9(qlbc|Z+f0!IslH<3N;|t00 z`Q&&kIet7jejz#DPaQuHZfzkfg4^=SA9zdf%fl;Q^d4IIy!YVB=e)BkpY>`h4|-=- zKI1K{eA@e+m9yTxR=Kx0f836M>z3syTPhv1`t3IZ^|ZCle!xU`pYsgIZMkXhmME-$ zJM!x<hv&V+^v1$PZ(4LxU!mC`zdYA%(V_6}l|^s9blmD(x2&A9!peemul#{U90&N7 z!WrAiacE%1TESUslyU9&+^5}ooxc5%>QLLdw{psx=iXQJY{;+J%7VM54E0h@FhuXS z!=>-l>!r`v>-}G}u>XD=j-IfE>Kc6ds0G!>EL;7ObwrO_SUYc4d)k89Gw|e}TSxAR z`uCz|Eu?HfS^g?T$^?|*Z=rZYVD<j{yc4v0!pYi#SM3WW*8@e#8vNPPf4^6aWzIV> zx9C;<nT6tYz6H5*{V(;t<qE5M9<|uHu<TuK<$2z%@H^q^*E6+YI|f!&x4&ng=-*k| zb;-JWPBiKk4@W!db+a?YuJe}j*Gt8r*80nx72DyL3q`+DDc*g|g1(S)$KjLrhr7G1 z{sWsXZOxk3gL2qiodHLbvC5gEzdBr80cSjW=L&e!^QcYrSBg8#x>e`UmU_MGE4Kaa z84F6I^?GivbqZ5=-)60Lf4Cc(qJyY2t#@I#sJfGS|FP;#-V5A&;)D0r|Fh0r-*e$^ z@b;|WrGGDnYgUB+>f!TtO=h*=bQ^kM7~EX0{?9Gi$Q(S98?zm{ZYq-(e;F{tORezI z7ConLzofP}{wv`h-2Zyxx_qM8dEVeCv#vGErT0&twN||gj<<6ZOqb~yIOz~hqD;N+ za1BnthcA3Dfm7jH{h+Pi6#qi2V>)*B)bCP#dRMgf3zcG5!R{IXBTm=uwZr|tZ|i3B zMXxYi{84$?D-0Bc5An0w5l@4+e+kZB;^_JbY)et6mBCe8|6}%ol?RHVU38!0nJ~9d zf5{((UpwjTdz`MXL^r`}g&6jjr|lQ53_sH!$wl0!QnAms+_G=sa;J4Hhi3c&mFX<o z)hg%u`tHk~kJ`<Tw%E2Pi!NwGkF=UMi~K~#Y-BluEY4$hra6w$hu<<gIc-OB?`pvR z9~Vwou<!}W&)C4i?Y5=%+m@@%SV$cm(S7FGqT{LWK#Osh^*Z`r8p(XDK6I#F2fpkl z7cKY6CF`2K+0LG(o#n%pT|R0{wNrL<cG}L;?x0}3d(^U}QS-nRD#>hZ+H7dl{PP^c za{VRU%bK6VmOfn0Oxe);%!B*A^2etjvX#>xb-MSKIhMUCD;+X#h;k}x@5}d=k6l<k zt<x;Qd059r_@VfP<96iZIKLO@TdUgEefsMB1|K}@-W)bz4x2ECO_;+b%wZGeuorXK zg*oiPoa};y#mu_1{j2?7sIRYl#_}Unx^fnO;}P`jr!Chv8sovxEeS5RRPVH<)fw9K z>OZu1hS56b;Nu6zAMj1+SoXokJ1>n7^p8aW?;g%a&^yKncy8e2ondczX6gbQb{1@_ zV40098&=>e{=|3sTP|2O=D|X7*=#9=IfYkc)_e!=%Yyej=S}eb#vFZpHF#%%5qMvI zBk-!uIq*3L4(GsUjAtu==O@7J(8_~W!cGo?^8xT2f%8J-d)ew;wq&al#T@o7%GST# z|Dc7|){V98^!-XKZ^%nW=_ad}K4kUF3)WeB-s&kXBHz4~MGH@zwcM#s+vTS|1E0g+ zekGPu$(m#mo(6~IhCZ}%8NRWhIpCTDE?^%3_6XPuUV~3;82Fz8_5!dw{-7_B_(nWa zJqhgi8n%F5E!(?fPiOal>(AIY@)TB2VJDU>7#j7g1`pI0o&GBfjrvwQj69#MKgPX4 zeOP{*4KMn(WqF6?XM1e5G-lhQ>3V%|6rC$Q&)@7WyEVN>f1s+_V#c;m{+ZbT+dpFg z=TjWBCl5LQ$IngM&g9)Gm6OjlKU%NTRtxnt-+P&RdjA>SPs;s}du`~;Y&2T`q3WF- zPk0Zx1BQ<ax3go|U>{x9$q#sI(~ehv9la7DA9X7);1l}wC|Ca|zaO9<?&aN9e4DyI z1&zxuZt)B98#A~1m9RL6ZlnE3{gz%5uMQ(G34c33wn<mDtAA@f_Kj$)UO&Ifz7bBv zx=PnP+D^SCm3dX3=e<b!l4IFJXT64e=B8}a)frCN+r3N6y<o@p)>tBn0`sZc$#Cr^ zi`2#q_(G`;@V!cJd4B2w9gyM!dVE7Xg3r23b-uyA|95{2eGf#ZR0lblAs5I}0a?0~ z9vDE5o<nwWPHt|;pT_o8zih+R^R`so1J7ve1;1dEEL_LN;jdT!#_ru&kj{^Fimk&d ztJr+>U;h`-HSmde=#BEq>RQYz>yKWNSN{EL;R`?7@k)*3>*N)*0{r&|c!j!SUfKJ4 zc_r|LCkNZB@XBlS{ri6leQ$I0OKG@T(D;z?KlDrPCAK2(Y%=y^<&jvwioVr(Ol;*u zF+zu~a4k8=tyzoUob|UHL4TghTJYxOmMurB$DLoElRnXN>?CFIcY65kut4?EX2V9I z(*#FB?W=CuUtRe;wo2o<M{H!}i#ELSIqcSFv0D#fw?2a%_%wFltmUgu+md9_)*pf= z?=4nuw1*(?=c?y``LB?B;Otto&j=1+kYD;M@^?=@9qZ+LuC|WZ9J+lP{oQHV`88|v zPv(n#@3G9nG$q$8;OKE|;pkVNx1iJPcU52Yds~iluG+ux!R73los+LwJHO?K`ii}K zs&?L-KfJsXb#iim@j?ChXvwzQOd;wUwda@D>?z=DJH2Lq9P6ks=l^bg*Yacb7d(4% z`B7V6{;EwapR;qzU$<{8f6bm*{*pbn_;vdlzpvN+7y7hje^JAx>bO+KF2u+7<bFr0 zr)D3srxLxLo&Bbrh5yPn9v0U*ZupeJzn(pBcb7A->{C{g_i7xS%)N$Bsrr2M1-$W` zkIn!$+1ZeBkJW!De_zl1a>GX`V2^Gz#z)mrJIuL1J7mv6w#%@GQ|RBn@K2(9G(I?- z-wi)aLF?A#$etU)GOM2G@y;hweK>p6LccO!gkFvhXIsEiYhpLc&@6!k*#1zkU=JP7 z$`+=0YvAk|tF1cwYu-A?CY*iqHF1`_SL66ba3))v$`CL<kIalT!>H>yWMd9lnL|G2 zkPmeK0J=ZIk1F6tb<ZIqiCmY}CuHkPwAXWdf&5G&U;Cp;dxBWW1o4cJF<=QAzma$b zl29lzR-O>v;d#Xb-8uIZSIeqhZ13vaqLuMU_9fSkrPt6QPr1wJ&;I0D5+mIC7ttaA zfKUB4HBemk8RKPQ`r&Ug{;~b^Z!+oM0h%|RW4VY^)z7G|Xu>P^e~NKM($~`C*eT)+ z-qb{~x82HjQ05NCes=_xy`#lCdb1Wj&|~(%E(;#O=YOErIxcUof3Npi3kTN-G%|i= zlwYxTr!hBl+`9O?<-LHX7{a%8+zcD=5Erxk2^<GBu9-W|I0t>`?+ANs#`#$pTgVsT zQ~vVBh?oOo%3ge&?&SHE{ipEBricZ!+KBVLPiN74g<@_M|C0Oe9&gVb6E6=J`+R)x z9_pXYN7NIHQ1^11d~o8ZoJaS)<pt3%x2|z+9Me_nz<&V#X~ypqeRvM|HAc(1cGL&g zPC@MizQ559@8_0jMeXPuI;CR~*_U(Z@W%Lq`UX``M10d`PW0Lb^O5iayt)3*Aj4&J zgdy9EKQ{Hb10Hj*+_mIl)$&Dhj$dwa_zav*NZ*V5b-@@z{DSQ%0n<8t%d1`B=~g@a zah*BA=J43mKeZwLRyp9x(#K|5D>V8@-=Mo2XKnPcfv2A_^po1T0L~4XzKwbZ=T3ne zVtP$+@Cv@xE+ZJE_5}-k*)P3`?1f1?0X&n^9lnBJZ=*2uK-RjKd!ccHJH=SI*Reu; zHGSXa(Xo1evQbCi!ynQ~jt0~uT=$Jxwr?D|9nSYA{$B=o^UK^<TMj<zcl~G@+cn|+ z3G9449(@EGpW=$Tqr0g0u13A3*TB_)a5T3F-}{v^gVv&jl?umQIyT|yYKJFiCp_6% z`nh;PKU?E|CbE>!!d8i$VTaOqlyK+pr8>&+|0w<aXAN8-OUM~xv`sj;XpEcSLF3zd z;lBg$-V``EcnMy4t9aA#%B5wY4;)WHKgX}g(yP(`%9Z=D5AaI=r>zjvXh1x$HQ|A@ zj-e(V3PgK&edq%EqmTQ7OVFSDiR@3IM-C$Y2a>)Xaed`p+F$WebSHJ(*`W2V*XV1v z>nk*Hcv@r*L^O<b+~wG@f^>2N)(v^O%+_Q6Ro^e5A9~VmYSa;^e)QL?^<e<`6;n9} zy`D_y6{h$S{OGT@%BBjIM1MJbVH@y>X6Jw<pS=H?G!wm4-zJ)MH`Q?_g+cm0q1l;D zH0yw7;U<~w#<o(->FaaQ>`7?$L_)KtpqcdblWCtFymwN^oiWam{=U8c0VW?8Ua`MF z;rfeyP#F^+PurRPWh(&dcAFmVP2q$#-D<<h7V*_4+PvAxmUs?Wv)1-*S0_9qAHiFt z-W#3n-wFNWekb@=o7l<AywwdI_A2d&2hPC*uZELVbk`8JthDk7W0X&$$Ijw^#kwok zq`Tg}Nq5EebAu0rm*F|hZ%NPll~v(EdL5a}NME6Q#4E$%+qu)0PxUbTCE80D6&$`^ zkKVq`#aBD}#-ZOh^jnO55A=37dfWBa?z-T9f%|yvVX?Eo_zgH5d<Cc1hw(Ru@Hb2F z%pg27knl_yo+*HjbKvGFaPzf<#~U&N&9B=e=bPoDpSGS-|B`oKO+Kzlb(-*V3BBg< zl+;tZgpAbGC;d6QhAg~>j66kuzea!0CH-BezaOE$AECb$`uowOtz6nxA|uyr(g~Y+ zL4B??$@6RVd4T?Q)8Bzh=mqKcRJZI);b_te`!@ACq|docdZB<`aI|-DsbBOl>GKKt zyh>k(=(m%BM3;9r>GI1r(b)M`O*-(h)Q1CB>Er?7Es^_tliWMLLmu;qjv5C4L%>o> z`K`)$+sO+w%v$!RYu{u%ve&vf1}alq1y4;rEM9yl*s3$muSeH2P8qcTUkaJq@TG;L zS@fmk5ga&QR)sGeJ9+sD=EDb=569>8@RhwG=E+OUlM}n}h+li%%#r7rBhNAB(p>c* zbG})A9SOfQ<ijdw8BY*rneyJ!|5;>y0lkXuLa%L-6K~htl9zRJ)YD$2I$<5eL4xWb z&hbm|p{L|SJAI2zTsg(K?|#N2i})L7u+51N5bZSIwNV}@qSvPSKksGL_x=Yx<sDoT z5li8h;l0Ci<ahX#Q+ci{Tx)FeQTiNkeVpq9Tp!_g3)jq7JA3~T)ys92e&4FPIUc3% zHY-<(&GSh{-O%tkintg~XOHtuO6VWQvcTbUZwto>!Nhrs#(TW;F#RoY{6m%DH%WU# zdZzo)O@$}vr`HdkHTwE#bT?xyU?I1`#uK=d=K>#81jnB)SAb)*{)53$CdA5?o4p^v z)}e=RrT6vj!UgZP=-uVJ&?n^0P{+5I&zs$Ip9S}vCjWu=<9W60H>2Yl_nUD5?n3l_ z&CwPK?BfR?2C@;HcQDVERjgO=GVj)rK63~v-&?%!`b076G_P~Y-YdAk<9=RaKFZ!B zUKelZJ$P#XoaGl81CRI*KRh)0@WaGe{LYgWEZz{)zl(8Ng4;~zjKeW=NY=8*7_cuQ z*P<n!7ox60*0v0Audk_GpmLg@rrsWYt^C^gZR6L;uZ!Q6{I1q})b(o#TrOW^v0&Hn z`w3zJNsOTIJm)#uFA--8m#3Lioif|GYHiCO#QzbE7UI6iuLqu=RbE8jO#S7AmJSx) z&!lj1+@kl?uKYHY2TxhiMzj+RMY9;s!>V&X?@KnkuF-hT9z44-fU9GQx#&XEb%ASZ zy0${Gt8CZ%&_%fd@XG-0?UL-H+Xt#^jQ>}iFW|563_cs=eJ0A$S8+@t&V|^6?pm;| zz>%LnMSuicsLcE#I)wZY(UZ9_Uo^#6?z2p#o%hkTah!IJy2*)nMr~66Ht`*O`)zc( zY@$UO^J-(NkvXxz9De$)H}5+5gZKWE-q$<m)kfb{ST>>WQS9ks=-Z8PBKq7LBDM*N z<a2sM@Nfy99%Sx#fVpGlF+AomJmxVxV#OYM*9)b`$r;ml=?L-Q<Jj7}i4V^cFRl_J zK0$oAf((BYpX?*Z<*mrj(Tnx!8TsbVVu$lihT)Hkb*inS>+eo<>b%pbd(o-rQ}pV* z-dkC;VHaZ>eajQ%6L?%tkQX%2zeqgcKJ>vUY~pEb;~8`d`qJs#g+%AyAL|QX-v>Pp zh)*~kgicw>C%8NS?*Eea4(pltEo<%n1{-;}Sw~oTK)&Ip=x0O>us|JC)^%bx{05~S za&gS+cv1&?1HKwo{TIr7>p|@PKwpcE^tIY#Uz=4Fe?l`C7shOo95Zil+Dg#)CEaU! zru;LWwR|Ie2JiWjP06?9D8bKPBr@8T$k?Yiwo<mVNVkaP<(ILqijPKq%QtGoDQb(@ z>)V-!THySCd`|l9WC?ks57-O(7Q}ebec>T~j*VWlsc6(ZdvAVsZmRwWIGl22D8~5_ zaC1<2(mnY23F<!L&Rce#5RZpr^;4>QZq4b(f2#WCzKZT0wQlI+uW)~56_}ECRR2l* z2JFMj#EUgoyj|r4)?(R$lgy{Zcz`yUd<EGnR^K1%e;0#;wyypA$T=CcHs-E7PVTjq zlQ&u`b%)$@x+m2++{?{QS_nVPMmcjiEa1eAi)MGYygHY&aosNRvntr=LaC^CZR|w5 z+UdI+J3wB888!l4oZ^xAMR9&l3`^gK$q)OW%V+s(UU9a{!ALzx{QkV&Yup=+^@#io z;F=Kb?7i;&(|SLpA95NweQ*kWfWOzI4-_|wmboA61G}5p_B^reDtvu{*!FR3U1bj0 zW~}iMe3o11knN1q2X=4ue6#P@{?Mg-Kc@_VMS411B>!iz{u27K9eT;8ZyO=!3fTWI zcmQ2lf0^Tsq0zFbjoMgH(!IuYIVkB|_w}4=-CsgybX5I0_&9)vv$aoH2fQsmKrsWX zI5wq1{vUp)Y$Q6&jRBxh4mliZvc)-MV<PoAlfLHvF57T@2llkh&DZL<`bK{rLYI}H z?+AK$7~Q;)YoeImBQ}msR{slC_!rt9w1qR^;Y6|YC*+iTPjPv2ILO_A7XQd{J8YI% zH}bh(JZ97L=&VX{wwF1aKIZItVt+iNTtZ~T@!?K4H`gyeeHNL+$5Pz1Os<A(eI1$F zYSRN-p~Hc}XU!je7M=Zh#vGrE@lQQ@!*7zjAivvv8!nz~v0ml=SPNF|rm$F>MD~zJ zIL2M8UG5EaRpL3OtZhBGT#DyE1c#pM$o*-5DlE>@_r7E1m2Ne11h@A3GvRLChsNXJ zqzu20!0*HG`z3Q?5+0ZU-%nxZ7)vlm8_(5htj%}^Jb_bu+_u@0<vPteeRLypusLLX zAN=N_r<9Mjk3Mcm^GNzWTz9!Vn_#{J`|jp2H8-F#x^8`6{abzG7xF3aW2=cpH02&i zjuUtXfOj3dYmDgTZBv>_4v<H|b8E_DoTv8VDEz;V-z2~N{0{It$Zv|@VSY#W-9p=& zWAA^bZ8`jdd-|5I&RC#6RgW_ULno3uP2SCmTcRD-lGwzfPLJGJhBHb<H<xsy=8{@q zl&;aH{F<wxN73yqwr{c3jz*^}xO<x4;W%Fhj|+VsMpfe2HdE*w@j)6#aG4>8E30~E z8T*W6JhNlORmqRnT&7JIwx(^$*UVZ+Yi+#6O7F*Rt!cil{*B~a`8vqMi(42+bod3w zqxfO*_&1?zL3Dk+{ZI90bu0+2Oy8vkkq!Ay_K7gCX%~mup<GJkg;pO8lxI*UZb8;g z*su6*je943J1W?vwTILvJ)h3^>KXm{>E#x?b#T%7q~AuTX2HYj>Pz(#*k^LnM3<1< z7xD!UR>67nIR5h<%h;C-yQzQDrpm=!rT#bgK7+!8^3>)}0Mo)m@p{HSw5@r<pR&qu zv3k4hgBK24%eCcb4f>&%?jE()`Qz|OrW-GTl8%1f%j#e0K5xCZhn&A-h2BBz($J}G zHvhQo9J-GQZgf{Oox?TTHb9-!AYZDDpU=Iv>%kdt-aeA4znojMj^z5bq5G5v)^VI; zEB11dV`c~)yTKa+TUA!?4IP3%ll2z0J*~m~dHR=LkGGoo4Fj9C3{-3h{~5z6yn(Z9 zX$_i5KWbgVm@Nr^;god_ei`4{`H{qW`Qto?4w8zr`DyDV=V+*Q%qHBs<LKHk@@SYZ z7ER>O0sBgg>)d*s$PNRj1o!Zu=8!bUmPZDM(B~KBid4T&KUc9Y$Y$4qwN(EY*<?*Y z4W7py4RFknujqUO#*g{jjBTC$5c;!h{{ym{VcaBMYzwCoJWt2DFP-D?1%Fw)Y)s|g zwOi=Zzu?@jp7LCM)mv@2YX*ArM?YJ5t~C#S@=lhzbJRP<J8kgpKD{SB98KHNWgi`v zvBS*!2b@oG%yQh%(anW&et`Pktr+oj@C)ZClGra(9bAv=*(~}#)$P?i7Qr*SHLlfp zYNN23+1#zfRCeH4iZ)}euR0H#-p#5$;BW8h(OMMzLEjEn$Gm}g#z)-u7<W=-p0Njf zG**Vr!60zJz@j;5@WWB*BJTP4Sf0wBY_p?k!=ECa!kn*QV*Hc?M}umQ<3AQoy9$mD zPA{UDvgnF{VT7}@;NlkD!)70i`&3d4#Ko|DbdB&$zI7gWHI~hQ*ITNx<>)xIz5K73 zv;GbG8tb~(lT)E_=tf>@Yy;xFRP-dWaEoG1;<@m{qW^;MmH|J%C|o%BJBhggo8TpH z^OhLyLQy)7{?@~r#QzS*w+=#I=!W8V*8%T48{_N?c7}f4Izqni&~b2n3>_<Zy{Soe za*r~~!Mc@xH*~w&ax#CoEZS5|vR7`glNmcY2<>UJjk)L5_<pOYysO)lYYnJ#A99|` zhm(ighhqKER7YSR&Ii>Qf8NHz-Wtcv?|~cT$qEG~8YX&_u}|73e_s5>e8q-6I7U4g z{2Ioa3)7xrOGlyeL-Gq48!`Rs?AEL1M9S}gj?bZEvhtzi&!R`-xIDB=X(ArM*SH}5 z`+DC^-^-x06gU1+-viEbPS+{_?GgNG<-(!&9IpvCl@mp9ShfXn;bxG_QJa)cfvk-T zA0m(Kl#7|xDU*S=Em_;vN^ai-G;V>$j`mggvv7jwfDbuw@<YV+M(ZyP#{9SQXNWD& z9&+^VhyvnWHx{;%M;+pq@54VoJUig@Ksz#)wHxzW=aJF7zijPyKdyCF7T)1YC&e+R zlYOz=I~*hXz<Ifq(S7JzVri|k`!ac7N3a72VjHmSXRrYW5?Ho^*Ma2uy~*=`#PfUA zS71~8cZ-b`+Eot!^n$!7gEta-l)%eY?EgMn!2V};%vk1HB(*qdnX9ezF7TSUS~}Y+ z9p{IC@_=t0!TYeg-?WFZr4Os^nvTA8>DdnQWre@$8nIG6)6us#=^0o~pM}XY$xhxq zTWCBZ*W10PxaSpmCRkPH{35U(hv%g`{T;q^DYjEF`qt<;@L+4)yE^i2ZL#TH`pG>{ z@2hX>m-?YHychRFNBVKWdrR2&Aod|?hx2fazGbVAVn<Urg>xVI;hx@A8Nn8p?{c`H zd_F1Pq1X}Sw^2SHmlxM{WrBCQwnl|J%6D%nzn${karqt2j>Prv@RRa|P33n`zL1o6 zxJuwp>yI{-@1%T`z~899Gy~3Jcm_9>&ryC*<yD5dU9MqLwzR42<&-U{Y)VVyS$Rhq zJ2b{}8?sD{;5K4{({?#=gemCb=IavsjSo$pB=%c+iP(NdGQ_;VFnZPc-osceSqBA7 znRLEb{L}i*x{K)`6Bmrv5?PQ>zhTqTbru?90%vs*KT5jgCdXUh$z6={@JX!VY+D{! zN2xdBzGy37;2mmn7G6Xb1<qClb_+25l*aSXdzgorVl1FswIjp^){vP;Df<|_^(AEH zaro&xW9+Air949{<<Bo(OG(URgfcFUPdUQ|BymS<s*g?YWGN{w+H#IKW0`y7=r8#+ z1;)i?`m{Ip5tcd5HuVeGCG$J7wtb)GLlz6f#47kG*lYDsb1$36yb@6K`@kzbPjIa9 z@FmCZ8?<M9voJ4RKBu_I{8_E-sJ~PiV|)Qz;ICJBMHjTAGkdrv-$3%7jMtqn8+65S z)|T0x*bYb@DZhhqEj-hhp;ga#yD|3Ux#rbcd45Q3B+qA>#-{(RyWfkxkL<8t*1XF0 zr{s&B9JO}hom;W-isOt^PaE&!A41o0ue*w0nffb~-Ab9ORfe{<_yyuN=z7H~D0fh@ zBc85tPW`K@o3cJ-vnrG5{oiRS_d8AHGV0%^Ixi@z`e?t!mFbJyReSJUunA`8E4e;9 zT<vJ!iubQfae-`{1$SM-Ly8yGr$69&NwFnha=Jf(eZOGm*>~vUe(0OdNjV=rDRZ~e zA=7p@@Mc*9S`obRp%%Hu-tGg|{j>epN7@x`6MFnmaV22N*#hOc@8);82X9`)w<%wu zWAc*I>MvS0Q;6-2bky7{#BSur0H4MrhR>zA%ti4U+I!vcnIEOTDl#v5f;T+oe+o_U zhzMWF=~Y`tp77;r>x}KD?QQbKvD+GdmP8-=J;nKM$r?I$5`DX$=UNZ5kE8Y#IKZ(Z zB+r)fgGipn7L(+YGp>sLcT;Y9c|l{X{Vsk!?ba!`^u5O$?5xyZi1{GY`T*;y#JFu9 zp9p?phj~(vKLkFfR4y5(OjW_Lqpc~H7=BoOt;)&A<(GLqey-?v30pIzcG2O1@WZ*r zCt4HI?Zzj_n_v+itDnHMAD-uuIHNJH+>C=ekzw`!J?P5Oc>bX8dT%h{4Hw6A{BY?w zVd3@q#eYwH@e;9yRbt%_!*jKjN5}{KygddFJ_O%Ah;M!te4mj|j=$ybYzt?Lxf%OY zTRl_6&dGRd%=2~ZcRMn?pSaT>oA8XDnSGq+jLECh9JRjq{=)8%d7<c#H%R>H`+iwG zu;UBh^ND*Nbupk!>2SSH{pc9@vj-oKh)|;QonJzG0na}vUW}i|{v$L!se2{X-pw*E zL%D7E(3$8>#A?PKlFwMEeG)sm7~5HnThKlG%^2G**tN571KvaEqc!J)$nIb5w-k0$ z29uaCmZp=K&>nQsBrzd;zfQAY@UV-|m1y7TJo@!Lm8D-loxm8JyqTN{bn-o4CT=xK z+*vwqU3Qq?LLz&_0Md7;<Inm&><x15)+lzF%?MXcx9s&6`k8}JY@f9bZ`9wAziap= zK}|XVy@O98TQRBl2RKr{+c(8M+Kjd?ihC&L$$jwCn9t~cker%IJZG?ipGAG!b<G@x z))Tq%+?OAgmpn3uNxaqyisJx7j3;m;TwQ=C>S)Fj@9fY!PNsP#8lvB;^J8v~YJPr{ z%E!V!_@)kBTJa;D9TqIt`TdF!J6)#t`<HAoJ%aCth3AvRs)1c=s)%`;e2;wz4{p~r z_Z6>{-y!~VJ~l9EoYTs)F8Q*_vl+by44tYMo0|1kV|q(oxWCoP;74=K@T2Pw`~V#P zUi}+Bh7U@7g?ckKHs7u~BrD9ZJT`~iGRN{TKHNk2a1YKQtHiczbI5CA3(ui1wN^63 zCv&n3Y+Hy``}1qD9hMDV;Jk`$5Kl6G#4Zf04RU@PW6S*Ov7h*`hnIb4Loc$Q(g*4r zJfK|bTQ;t}VcL4bw)Mx@);zlI0D5i`{kIQX9YOycMkh|86Az*Tl@m50`wR^{TVKEi zpGa-+C#0jWsfsfmr+c!&%76H{*;(1(ec0ehp3C;i7HbamK)7nZR{d-6YiDBp_Vbk@ z@t<MU4}E??^_+yq;EkV$_F3r&#}@?`TbLAINDrK3u8?(5PqP0--YfhVbwQ?~2Wa+< z#X#lPx%qmHhv1`?-`|LXf){)X<os#$>CQrh{9NJ``3my0%Dnw9*31;E+6##I9qWCH z(WIR<Y;o-va}V$jyi<<G<G3jEmGBU2Idp#wy5PSvzr>v8n{4ng+sgRVt^Y-jzNnn) ztaVng-;=^8ayi-e$Jq9@#JBk@zD>FQZ-sZt{T|P)3t85+<Tb^;=(BvMe4EaHx7=d~ zRnGY~yO?7crMz@H{pb0ooUC)7_FSAC+1;AR?h$17FtR&^>>fmR4<Nhyk=;pTcOSAl zk;v{*`GfGD#?=u#O5WuK<LiThXOqwK7Gx=E@_7zA*ul}P&nlR*_L+iz@ejFnJ|FQ} zPdO9PK`J}{9&|Z+&(X2W7zSIV{3zjC{S!^!LLMXf^Lq|I)Z0fchUS2|_ifp%xJ}lR zpbs|W9RE6=_uMBK>GwtcyIDiu4EzK0p|lpPQ2HwVL1$P=_I_D~W&_YHLa!*!sl56; z&sg&mR;tj|X25%8p~xOFw}>X4AlJ>WgMV_hV8(EUvGRz05PyU5J~flyvAsUDmwCn8 z@O4jzQ8<yr+K!vS>u$|8!u7N8ty#;P{9MHf%fz#E&HGn58JjV?zQwk~!_rs5NE>_g zJX?Pr*^!?d>Ymp&4CntOnW>6%1JAStZrx$qPy1ZEJtt<l53hyftcUQ)xZ{6#hW2lm zMZ0nQHO6biXXEQ6N8r`gcgAbj;#`2dcwhF&>BaMQt*zpN;=6Dyf3t7+X=1^|S-1|l zhOf)T>i>+4w^{p+g2nTe*tT9a?qTlpa&Jq1cXh21OTL0~TbP#&++6aw^XU#lgPq)W zaVW)B&{^9R*KvLt*Wzu-0)4t)_sPwAHhNrs+RiiZbzU$5kM`#AZERRE+s1rzlRZ^@ zDz(e5f3`4Ov;}k+8jQZs%s_D-J*mDeoL3*~6*oV;ZXFBUherDod(E2Bva{Ek!_BP6 zv3Un(^3SyeF0n_rNsJ#W^qKmj<HWMlydBnJBCq33@><v=zh$l;YkEG#^%DJaa|y1# zR^`gN*pd8&=S081%Qmqh?N(vUX{)utuj88Ujvi<4x+xpyw-o#z_3z`eGe&e}wo~RX zW&EVfVV?g$&)xeo_9V|*+_Q>3wp6h{;`ao&dy;Z5g1aRC>DK8!h5T#YHrCNeoKbl! zjF}|2t$vwt<|y(ux)D3lJ>+8>^AlMg{Y$%^@>Af!Y-2nQK9>t_e4%#(Cu3G9lE3m@ z<+04hdO>ptg{1zCI8WSOx86~?<udtxuM#(L_U6Biez^UZ(7P_)3thUA7fZ&l8dnfc zns@fh<+d<(aJXlkG<)ort>%k<nBO|gJBmkzC#}<_EA7P8yumf)MaH%dI%Swythk)2 z_c*^o{(^AaP3$R;O>fA41{xAmMLu%BYpbk*yg26s_$rQHV)%&lKsUkXV9U6*JkrC8 z?RkS=vhB>PZWX_>@7VX@N7-$cTTlCW*FOE9Lk64LUW0$L#M3k;_Xek_gEi~UwkPvu z(YVts%Bjz&PT>7B=UW|$%hUH4!4No#bq#YiE^gKAn@H}#dEsK5gJ<OuttPm~HW<9D zTs8FaleDL}Zu{Ud{N=COllN$Rl_6g}F!a^E#icd-quQhPSeEIvrN`_Ebnkb;h4Sbm z8}VE)_)qN2MgB!*-O*rxxv#n<IUnF+oHnUHUnEC&iMqRLr-}KJKdJII6&B<2VP#Nx zO5=IO3Q%(e#>40j@FaBbUSEy96?KdP^ahzR?)?gO<%~*9V4vvcj6Ej$<tD7n<&qq; zCxAiY%(R}L!iGIbe#l>e52s_i0)9f%UqiQ6xCzfBy8I|Ok8?0vt%lw3mVG;lj_z*K z*+cZpjU{=ewUUZu<v9++5&^#!ey!Y-uhzjY<fr`2SIk>mHm{psfnUT=a|SWbt;crg z9~i9hoKft5G~%w}=aiSDAS}acP7f2a<jQ_|xyLJ<?16^xg5oCd!2LseCTwWWyNFMD zg(&kpghIcM;uMWlq7gr|p$RK9U8=mXvg}Rm10ec#^J_OVZaIQ{A`62v<g%1qj+VwO zI26=DE-38}j_f4A3jOf*50&gBJl{9!M}1>H7CcXW)iw1Y@*{mejB3-26Jywj7o#7j zrvX3E1Ajm8Gk+K|mI2NLzPI1}vkpd$7X+t+{|&+_IAa}V<z|?cNBtagYl^GL*V)zt z*Raa#8XU4uB=M3M-mLD=MqYvYFE1Cof`g0a@Y^NF5|Ta5VZncjZN_=L>3$7b=c@Jk z%Hu_U0S9{vppzKa+v<YmtM+MZ9^H=Y;Fm=wh@Y>4H+;?4Ij86L5CQfyZ()n%j=7L@ zjNhVb=%PF-mp`Oy)~AY(TCmfsr9&>kpJI=SS@r(``VIY|@fXga0e?8hx=5_gE`Onc zC&!l-6jq@tcAvNc@6WMDM0H4yH{M<3-7-0m_<<Vx2@k-VjgAw0oyG^c4|~R#R`WK% zk!5V*=3ATTA%4tS*CDkZT~7R-BlLK!yx%f3xp3YvwHGlhyqFf~wbgq?3*sS)J$v2s zbw6FVS^q*miu@ebCXin<TE-&hE7iThzUrP}ygD9~@tGOJ1{2j^4GvTf1(S9gc-V_R z%?zOROUx1uLxFPHPJxHV!0)$)i=JQBoWR4gTWoc<-CmmA>e+0E-8y@jeZ*R?H)|uT zn|&wR@>;Vekd6DpqSrT3^lqFidPfcvy_u<^cj`z{ZS`#<|BbqqscV_KmZ@u*x|XTS zXZ+x;l9QbEw5RSH;jfEgxSdnzkY^aTt<pbeDmtTA8g?MTS!^Q%uN%63%`d<=8LwM8 zX-)>lPHfdZX!we@6WU#vD|<WZhsd?$eJ{2}<nF9lY3KtbBR^Cb=WhiR%bm72Ew?Z> z^U;|z_!g4=8FI4ttDg76p+oO{-w?c3<6N*TOry6%*CcPs#fc6>%jqEJ%5kJm<jTIO zt2Pr1ZmQSC;Z-kljV}}9j8yMQ{D=mh1ci#t!1u?3T&=A4DM#+AtB-raNrJO-s*^@C zPd+(x=*j<R?AHyBSicUguoall5ct-xql({ziSCKVcrkD1=5I%)w#GOTzU)5~fQJ3Q zKTx)zLnX7Ba)0z|zD3i1fn-MFj1%Zx^!;V#;cvX%_D*gEo{s9%L81C=U=Q?o2Z<2| zL-=J6><S8sDcHM^!%SA|IdXb-$3UQUmY(fXu34#KKH;Ceq4qfGwe!Qhz}#<74@VF5 z2Z}caDhKcPKEQk6zJ)ahFO`U&4~{}BNy{O(SG9C@AiCW#YTBFCdw?UbO@=?`#;d;G z4T+C~qg?ne;<AbDa{I~&M>tUUjrghO1EWuY+aq*Bbc$iAtp|hbPqdLEM;Y;h<AV>x zd|>0UZ;lUS(_V>A&_{c#hil8kyqf6K7^AKLXTuIu$cvt~f?1_FKSMvt#7q_#mw$pB zp5K3+`$~PKu}`+M1MJO|>ivudP2sT>N0&rSg-h;z9(LBV&qYAXFQaSW@D*X6;l&Db zSAwyru2~;lSvI1j1;zP<8#e}2JM!0fUfA^9+1KQGf#=byJdaYCz-uGkAbRRAJvu!B zodq9us)Xz#=U6a&-^EtOqP}J4&szZQ-P#ZGU0UW?<4nw>g=gApe|Ry2FG_wW*Ln7L z4bdB024}n-z=rRD^i|^KvX<Wh|F)n{oZO=e$al$WK41Q;a_w7KFVf&;y)Rg2W84gJ z{dVMii>{-<yy_@$YwSgAlxM8d^}5j=@>c@w|1SRLyhSpDTqyrU^FeLVO#LPCDA$V1 zW^@f4H&RcgNsicuwEkDBhjNmo?XqvWH#9maS}CSnqI`)t1(&Z!9sdXz2IOB$uS=F_ zcZ+hTbgp}%zxoNhf%KAKSZ0DS(dQfE(Dis6T3T~`Ya#YET4hc`aS)x?Dt3Uj)o(qU z;o1J=*$mJ2H$7Y9nTwxLPUFhM8_&pNn;{p$)w#px*;LarwRbRiruGgtp3w`Q9dXY% z=h+eIQt=u5^qgQ`N%Sf3VLKQv3--nsEPosErUS@MtNN1Et92xCKQ_wEQEq=yE}frK zxwuao<^DD04kzW-HtI|Iw^8mC<)-3tjk##*+Y$G5quc|OJD8N)fG_R$M!AP5cLcis z?<(7A&=efRbQb+D)(hZ4Is1$u^XQQLmwEpd_^8$4Z;CM}dEB|1d6jp;>n$-}!S`1f z+x!;$#`Rb*f1`QxW9H9KSZ014pfcEtww;<s#fyBWiv?SNdqE6%X%QShGu#WG6>9&^ zY>D-)%p(T1RqME87q+JdTW|<jK<*ykT<tx;edsvA8oP7Mu|3Hgo7Ox$Ozi9-^uX8f z)0KCyO5El_=zNxOamd^~xq8oQzFl#ftYT_T#@@@i$KPZwQFCDE2jplOz4Wz{*hBF? z*Fc4gBTu{+IC+k9_D)G|P7)J7iTokg8S?hcvZzp><>;)zp^v^>(}|x~x|JNn5;1uC z@3obCf99Bz$!-1=@zcwh+eZF;d^pxepK<gVJF^uZekAt`7WNIeeF)G+SNs&YcO!!3 z<Q~_LA%6is4ISfGE)`q8;;>*}<eMlN>h=r6#s04_R#~GjkMjOw#AseAuW-ZmxNkJn z&O7`RG|vwV;EH+Xo~GQw9>(_r=*b(%-6hxZfiCEDIr|3+cYB;~^E&b#>R(~K{Tapx zF7KhsO#2yqZNx{H?e(qyza&@TG5Y%`y5Kx9A^cnQ1GsE<FLvxkZvdR;85>RdQ=4)Q zxW>l5TF${Wg83C`!uuQfrfw}I%wY=5o7$4@!A8Ayz5!*Ee1pGIdA;A?ly4wBv1ald zbAnGYC-?+&f{!sbwmOGg5I=kf|MEfX|5?co{?b#(Pn<iS?jNiCdF9SO3TTR}RZbMc zDf=gimmvpylf-Tk-0+U(XaeL26@ZSKgs=Vj4+rt>WHTu1<~(c_zUI8kcX^5d<Gm^A zTJB+2Huekj%bEkZ;#<T!rzo3_;SW-lF~o)CD05Kd*-yZ&i4i<myYd?467uX8?6|YX z4!32^A2psG;aQ}2fg{V>9``Mu>NI+Uy6#4v?mx>mta1K0`8HR4=l(^@C38aZLAMRy zhXRw!)leU}=f)hg@n&eRHA@#<bN@<W_Uv2Wj{B42VeTD)zt0JFz2{`N43D5&q2Wb& z`3b#B=w;<1T5~QUx>;khFgk7l#*IJr+`Ys-)uE^9QS%mN_@cZ=y+*&<b*^~gz?yuK zcz#3u%&iHhvISSZ8#}-p+?C^sExEdYnR^-P2xM!uS2;Ez2;S$u!4a3iPB<S<^8rn9 zbdAlUdD@KEiCN$EagH{yWPI=;ya?vjV*N$%azSo35U2iPL1ogv3)<lw*?8#=7q1`3 z{<7zTcthV;Ftq``qSip`J$`n1H2&t3>Y5#Aty*K>7XN^*<FfHyU(xaAd)~b2<lg)& zbub2G{=^*_eo@yX-+0PYWc!NCe&FV#iG|oQdfe%?_&i-xuKVf!2s(HB#U|z5KDEiY z>sNA~YpN$*53hH-o9??@!lXQLL*R|uZH8yC=|1cG8)e*nK}q>x^=&gfkbN)VQ?=tM zW(X~wV_da+g>i@IU=^qP+J(ot84LLyjp1kb;JJ{}1$0TCStA^Or=&_-X6WBZw>}CS zV~@+Wleqp3ksoRds&C(H!8d2z$2EM4ui)8X#(O-2k6%)qjHiQHbhx8aVCPi7+F7QL z#Qwk47ZTe_#z(f$;4PP{<ak!RB>trz=#i_$Pr^?OAAFp^$2^MDUw!0zUN>qtNRCuD za&$x2D0|3Ik8~RPxZy`jFg2f(!l&o-2RvNWrG9P3b&6+)-vxMhl{JFoSgCK4Y05L| zd(&D{PJMWaJ}7U%t&MVU!;>yXNqOOSHY5HuPc|Jrzjg37@Y|}G-o}`q4_)9>p7nAD z-q1H!{WrBy<bI+4Jbmn--Nqiv>70(@rjjG|QT3^9bZz=Q7kI&Jb%tkS=B*z?svF-( zfQDw<Y2&|FnX*6i>fbSe<~80gds8OgI{kiuUE&)i-BaoOh-%)@iQs7!8V^f1%#L{m z&W50O3A~LED~gQqCo<p>C(xc9DgXYD@tCV(w#V^e$y)Nns9&j{_4<YVOuq$j)gK6! z*X}3!^>y}>bxeW!A-)hDbxuDD$j?88AJvb7`jPHopSA8S8spi`*oI7gRY&F*7=7kf zhem(yKiRZh;do~+`qO{+Cx%8J_?Ih-8#;#bg6hR530D@JFA>G@tZQd%&p^9<30{L& z1rPfGIX!hDFANmdz?=JC2K>0e3k@7OS$;JfIX>3+GI;;>@B%n$5xgmmq!-d_eLn?U z1;UBs!frazu5<W&1o<7FgFoh)_S=&@N<Y9aIqhSkb<5%z@eX5`I;-2;#XHr-*fvy` zlJ(HXpb1zO{RKy@64NEok8U39Qv4L-%DnRz;3}1y?g`QSwQ*(M>&2DoLw2N(TpTIU zTX}F0rn*KrPi3$C@hLGL8b1E1jQArdbIowkuGT%3b2<wBfmc<YJBI!mhYyv@$B})h zLh`VwYhX1uMULyb_M;D{9ZxRW73dd_y`(~ZIk*Phcm0g;XpghE33Vp0IXhP!<397# zx+i-qS$$1@AC-QtzlbiQ%ZkrlF=NNjyW`=m0iLNYtp#$j@rzs+R8BGi4{W|3^;~)8 z5eA~bDuNxo=sEpJ4s<gQG0xU}k|!R5KYlX0E%pVPWX83#MqJB|g}vvA>AHRRkA=jZ zyT4+7es?*59v?RkTwnY>Eb;(md52gm_8LCmT(r@e&Xk7s@j`F;_|ye-ga*uUrFJ3d zCwM^i0?iRGhpZuSzK%uJ1ZL+u`0R(enRk-wghmZ}JA#dw?MDYEHW!)dCI)}NR?)%i z+ow3HY(4V1+ba0H-^Cw`VqF&<$5?2U_GH3C97i(fG5Bfd5PFQ5`|K`c)A7p3XZ&z} zYwbh+LETIB8vE?uTAL=vc8c}!)az(TAFIdwgX$aWwLcn{heq75P5Z}nP0alO=O^?I zaNH_B6b_iXMX&h>=>LU&>{P?oC~VN1TrqOeqT4S`@71N4-s_9a^nNqm_p8&JxO4|` zkOsYLoWE{*uPW9Y|2f&=^i_DZB|1)w+c#hRhp&hglS_XwtzF()j9chYnJ8+#adac` zdX2Q0TdO|JT&47Y=Gpwxs$?JjV}HXs`*NTIM9)WMmtuQVI}gp)W7|^Q6U$HSTjY*C z=i(2@?)5Xax72Q@V>`t9NxJ29dP9ftP0#06?qgrl(_UfaelL>W%C{!Fon3pxbG9OC ziFr-;*sCvj*Nger`MMPXKa4FH|A}|S$HIktNn|A1*I=O77sO)+mF?T%Jtf{&IlsVs zA8S_C&o1`a)S98bASk(KDjNioP3K3O&gau}>1+Agx<<!L^3H?M!L2zu&6Zw^*7A;J z3(hu`DRcb-<;crvyvMy3{o>sECcib2*#dmv)=^1M{r{-XPiX!Rd!N^LC>h7zGBjG2 zzADtlGHCXB`Q#h>t|Ym;qKV=S_(!4WqCYr2Yvn?*D*b|QoQ``{HfvX3rSh}mEyHPS zgP1{gT4uT2GTb)_-!Q+R@~TtgXvWMh^@ZNx?09gN_XZWinH>vWAf9tAJoP+$xt(zm zdyJonY-S;v9Sw%$$429P^Rq%M^q57JX^!M;`_aH|X1{k(ep2~if|>IBo66_<PF+-< zby*wb>Bn^Z9&4CcKO^{~z<U8#8&3(C*<bHE)(SCR`ZHa-evHTb-ZvieI!DLn9OsjM zxp%=w182+S;4H8`2u|JD!Y@~pE9sukI{ptHWULa*`oV*=^*3sZx?Z5qm#XUp>Uxp7 zwrr~BMdakgq@EYkdeCpL_{|yVm_%NNoxEtSmoX$f66*zYhU;?_IQb><>u6so>3@{U zdI3N5<$=x~YwPRro(d<er7wK>YkDu?l~3t@Tu-c5*fZAY8ji9(jWOp1vir9K%m4XC zVM%l27)PP&uTcDam*!~6mGk9qF?Suru_kX_w!gL(`(B0(#dgAvF^+4e65FJ;N}u4q z?8=u*yK}3o^IAa8crL#R8+#d!QoFU4$~-UL(PNX=TB>lqOGoJ5s_}sEslTjU15aU} z_y8Wb44ZSLq3OmxB<KX_>h>Z@+tMBZqPIp<@?n7G?dl6L%Sm{zRrSyIH1Tl(JzcQ< zorJ%z34=}kOocagnLl5ld>}dU(H+Ekv?fEbxPUdY`=w7bui$v2Tq;t}7LDB_<|KtX z-knrFvQ6X5jPt#LRhO?k$o#}D;-yRIs4c2fI*L4?Nsb+An>|kU$GmsVxZY9S;O3$j zrf8J#obvLY6HUO8993{iUes~#sp<^lgJ+@39%~(Z8k(=h@b~uV+tb(lnw87Sk^dfL z<wtJD|GM)Po8pVr8TbU7q*%7<r`|U7q}%gTb@v6Cz)$I0X8yC_{D2GmvnDxdjO{ds zAm7H(aoYN^tuEe88}ot@I`nX_J=&}I34ME))vE9+@4eyqmfF+gMg-|Nk?${S%^hve z&$#(n#iD)i=5oVmH!#tdd&|C5sEY-;v076+Mm|c3xiQU`J%&H>Fg8qcW>12@RjrGN zza6?D9z`cs91p2)Su0%TBV%d*fu)Qt&qOD&KcVPI+sD0i`LVMz;D}f<xy7279^!r+ zTiolHG@fIv>B8&6$)@jw`&00Bg)#bRw-1Jk=LtuQ1GN8ap1inhIOg`2@z~R%EFP6? zHRs!)C*mBA9_%XR!IyM_%Oj$XndM#N3G|R7eb}2<TgoYp<w$#57vOv3ccK2c*0Bp8 z@Zyuqvpm5(%VTrkkhs9ZjENsgc;}oO+krpvz2kX!k?$^pFLF=B^Nhb7&mY;~d0W?< zNTJ`#6UED|iRa<bq+aK1iY}Y^UVQ0v*7|%=^ONvJ3At})e3t6HL9SU-N<3%`zTC7A zMc=jdpmc@DTp{z0FI3M{=4p8M8RiPvZv+_)Yw&Xoey%ZpSY!S$_Z%=jj=nul8R$XT zfHGOiSSR+Aasg`-9`Xto_@w)UdvN_AI_sfL@HEyQ82ShtUm%xOY2ZQr=M&&S-%4`d z8v(~d!a<ewII3TImpKgS(e_zid9dhU{=n~9?qyaMtk4(5`Ug5(4j(~e{?HMW?XvQ` z;-juE@yW`fa*hhKE2or8!v4qNy9{$`%ooYdN)PJ&+L*pUUick!ZCU)U*x?{^;^?qH z=beJ?i$C$PZfWLE`To>Vi21a#=3t>d=!hTF@Dp8LiTrJqr=9!sj$d~Cc&YD?499$^ z`6&2+aY=%=f_zoSN9p$@H`bYz<lpw~k9`QO(bqg%#Jsa|K!K;2>Qj!b;Ofor)kg#` z*Ma0@_Qn?G3tGy)Np6{cF2_1uIP5g`W9B|IVGfoxt*K4f!yK&2PbKzip_KA*OIn_? z)E~=sqPJhs_e$hNe%BKkPmvoCe>bzapUJ*qvF;;ULSLgh@v#>9KDzczD=?OWf5eM@ zhtP4;4u{?#dDh{Ld<)_bdl0NLXLg^~Zxyc>9ULCCZc%vn0C<=N5A;cW=zG8W4us<q z>J7j}r`}OJ4o?elZm!CL=XS?~;3@65?x*c2PRaRB;Pevu|9!&6tsA)Tmi`uT;o3=X z@!mIr3vwul?~wC*=!K!7QIx|vdW$h!{}=xHp--O5zW<Yp*<W6HFk6~?Fnd6;ALMxZ z%BgIQao_VRpUV#0*xBf=#q6QJyX*DqPWZO+#cX+HF-sgcJHGPy?8wSzvwXWX%QxM! zd^0M`zMNTP?)l=%ec630r?c#XpWVN*kj)eF+7tQC4o!Y&rr^)5NzSCh87mzp&TuNb zuYXBC7V$3lkGP3%?`4u`m81UJ@Ml{k-T6-O9x!%yR_unk#q4Be;h|#m^YxcL^j_*c zo9!Oq+a`UVrT$6wTOO@!^*i%@YR`_{3$Ni*PNAn`+tIbW$oOJPGML8vn7>=oK2-w_ zHt8SucbmqTE^hHO`6}8k{b;zmc9^l<U!yw@F;B!?nBC*}_CNcR^Sj{LKc~OIFu$v- zT>n$fC%N~n56x7R$Id)+&$aX+?~aRE>00no@r4KBK<zm>gbtz!`?*JIUwxPT0!Hlf z28_Iyw_DvD%^q-)x1Gd+7l{qFEEs!Ug?{fqFZW&kCVD)ywGwe=LLubxrfUvtEsT`c zqcH~cg?&91sjmyC&=VQ_u3Z+@$d~8Yk=ie_kJ~u5a?ElI*g$?+ep~sqQ>Fv|K4eXQ zP^&QaNW0j9$)y?V5d3pX+5O<_i~g-{&;G9qUhq(!gQwL0DtKkw(8l>B{lqTBx{z}F zs9Ug23ODGEEjCpVE?k+}AdbbwV^{f2@fcY3ySm}sIe2yszMg|`;d#E%m*pFgS-wM` z<vaA*g5;zB3)u<u=^65_Ch#Liu)Rar-TmZaO_Gnb4;?#>k6Fep4`V}0$vDW@elOCo z*wG(q52D1E)E+zEM`knHBN*Rsvbu(@!@qdd{G`M;#Lv^d=$>%U_nYi_dMLS`dU4D0 zG<vuB`h1cHep}hl<MYT7-&6<+_pDjhNGm$v_;|Ut7(_#lj{gcWhxQh~)PFd%RyOAK z^$YNIw@0Hb>@CM!9Jp@v>OX}4;(YM2GT#QkUk|lzw9S=ao}jnJIpy4%P~_Gd8oT}X z%qm6b;PDL!wehmfNBo!TL&RX5KBBHo^^l|7Tu;1CAsTH}xobAVbMjFuAT#o98DE|$ zo<wG&%RTbg$pXU{A@;M?lmW{=?pU!^9Y-=ZeTVbP(4pI|QJkFbeQ++F1FT=Q?!FIt zPr+6A&pSr>mC=X2Zm-ls;Ac7rpnC}YbI#Twi#N1dU27AhE7U)ym++UYyg)7!I*7O? zJow!{);zLjPy0RiljP$bxaXX8-t$%3EuSgcp)*@Yc97>jUTE+8&7ichWCL&SrTKMy z1o;N<nUBYGla+Szum<}6r(iO(8tVbd6{HLL4#%-0u0wt$za0DY+@Gi2j;OV@JUGp~ z#dL{1)hc#+x@831ZC{*jd58Q!Yw0FZ1+FsP8KzXWl=jr?CwX?yA<8kgN1S4`G;a0N zT$9`Lf_twuha$>lf+QBDvZZOt#yJb@FPbl_4!tAaQ15hA>}~!!dtHFXdw>Dhw&5$~ zR8Bg%@8;kv*Nq&HzV`<Y;)l9#h;d(YySs$jxkbJ^w<^3Birm*a2yBw#=I$FB8}Hvt zy!ZXVi+b15X2E^aqf>Q=u8vost>%aNJ_`*lkDzl#^Z0Hr_aV&{jk3Sx%^BA5XF{Ik zYEv2f-d(@QJvTlR3|#+`U%_^6?9H{GT(wDZ)%KCAHZh03U<_4e40WlwRr#vtT)b62 z8@`(CH2Oy0V08QESI084hpbiG`X6li-bg;JlOf8Hqfv%(zpA*Q{13$~Z|I5lU-C!u z#T$?jp0_I2S)C>~T;qdsYU|9d>(TeE+0!PhjCNW5yLy-Yth+emDEXYJ?meYkqu+Du z<*;|5>_&7mxLF`K0vh1E!4F+)3yW^78qSYm4;ES55I<vm!kg0kVU1-)Gd;&P#QAnS zPxE}0-yX8pVHVs6X&LJ4;Jn>E<GV|xQ9H-AzVD#?Hs+qmlRxEh@v_9BI_8$BgFJZ3 zZI{gZqm1px`6f;!-osD)pue=QDvQkf@VN(UA$13X$H?CyXOFn@Wwk}q9;X%b9r^?` z&lGkUYh(QJ0`od0jWJwoQnov-vkFf-{4K!S&_`|dGk!uJ{yx`7vljibV3@rS&*VEb z<GB<?UyAX(uz-DCps%a4p_UWO#3RT@v+boDZ9CT;$Vl7W$4uXPVjT+dh);L-X#M-N zbyaPR+!SO~NASje+tF3zGH;o?k2!t6&CwQH762Q%A|KIj#*)efTEI^@(R*^N<sIzD zfi0+*d;-0vKKXtHH^2V>!mq0Hm(@3PmA-kG1C9n?%+oG-ZROqt{6GoqZ7F&?o=Bdj z{D4(&Ja_y+JsqO;{1Wr!_$$ED&b`aD?nZneo5Va?yZD1$+?#1n;ME{x{FlONZ9gu$ z$9>;K_oE5jbI|>^RBmhkETeeE_0q4wJDFqQm_FMq?_E=M<t1DccZ_`%_dRRnK;_UG z8++dnbFbcxoK}dDtTMlR7x|UoJvvu^9(nJoew9HPE)sL}WziQJ_A<^#&%}JNL4V~V zRG@#Mx28D9v<;*>0r*=Nkq`Ny>Ld1M5?}Y5vOgz#T+W$W9|ui7wy5ii=hw9E^pbl* zFs}^ke2Z<tuBx(^5I7B@vkvyltAF5N-}$=XUIOl(818#|TSiXyU~hn#d5DtWRv*Ce zv$EqS;X!b{0k^Kft%H3d7i2&j1nlbx-s3%3W|F<N!FhGYjb|JBllHae!2o*F=>)Cs zCq7r^{<z}g^M|NVe#%UxSo(l;a8#dVxO0b}=nx(+^Sj4qZ#-gnvZ<_l@t1iYUwhou zvx|NCA}hOkrro+MQyu7rI^(Zxp0U?FD?U#8jHbSs-xa+J{qW6!-Qc*z+ZDd$o*qPF zFY)&qS*O_(z6IZ9ohD7NTQ<KN|9=Ab<F%3W1w1w8T=1LH*j)jipFE#<Ed$43^R;5A z(k&ythrM-W-Tpf8B^=0g+1*p_u545Dy{vd%WqurW=({6>=p)+5;bSxBPQ|RmBtK$Z zdehmoa@=0ldjC0PGSOPSUK(Rf5*mzqzch%e)^sn!bp~14>fppDkW6dtXYLGmYZ<5v zjopZSzY(Uxj-1LD?|R5~-nC+Hs-eegGmhR_t4tMH|5aD6*dX&bW=AnN2i*Jyu#WL5 z9CFygir@v-7dOMoI=V=*i5=W)Hi<pzyC&LZndH8*-mbW##X5lhY}79Km#=+eSui~S z&Q(s&X<J_5mOC!99Ov4HxR3G`>Q)_&4r$#<dsnNz^d9wpp6k`LKAm&#(|RAic5U3T z6<=U9&ac0N@6lqvE>jz69Zm0+lQvpJ|MYos+zJnG745*ucFnO39U3j$v|UAgzRD|p zfNk!i{V&CPOyKw0L~#fHE;|#)@4fq#-ka#$f!!4i?6Rcn&%ILF1Dy>$KFWBCb>d!c zephMqpR8+K(X_8}+tFi3e7;Lo@7=}kFtWI3V5|M=#8&(516wVBMcM5-!WiU^6Tshk zC0X3bn$#B7;BbFvJnIeZH4j>$w?Bsce%|ado?*M~6Q!-!_iV4To){ZB+<V6i<IPbN z{*7RQKdvQPSL$5%!*|=8+<mZxZhF~$OK49RJ;3!H$0;+zQ`&SqN?kQrIH`jY$m_eg zKE}zHLdJ3Nd6gqJ-P5(?!COTh0&+(w7x|q-jNKSSaQ+GXXRO0_j7p3Tu}N*pmD4%V zL+3YwHyb|I`ZmdI@V~LQ3NjYCe16ZCo}pi5;v~<SuXa?MvnxriN_5=KSvG8=o3C6a zhXK9re1TPR1AO-lL#@;Dum_SKk6hq@{lv3;Yt)um6N~;G;x~L67lL0O=VgB6n(#eS zI>2!|zjQB<3GR*a(|24-sm&b8u;)bVmqpY$sP=vIa%yv4(MJB))0fm{HgeA4ts!{v zM)@k@GuDu>9-F<}u$3br<1)q|Z>IqJci^LV<D!i<eJ5&}d$T>xzKX|_xfRyG^%&!K z4+P`4lP6ajYttSdy^ZU#ZN9Eh&jj{VW2&tjM^rDm{xJ1+2oA>bp33k%bKRI-&3wmS zi{E5BnFG?i_5|Ll;@TaqtPew!4KK^hZN%dN%EK4#9pVOzC;R?ypZ$~77VTu!4t9Kq zy7U|7C%ZmCFWTUf?xb9I%2Pa-ExvFLsmUHA3yt|*$M2O&?5_pb?@Q&a!D}nre;s8n z{0`uQ%u}U%hn&S1)pr23rwDt9h_0e9xb*0w@>%!W0=~|lU>iSYQ+GXR|6KjK>x=d) z%lK;G?B6n|@cOV#gRHGbk8hLDmbLzO$Y*u<j<l!3HO_Z-GIgvF;cM1wi&m*E$wu^l zaIw#Q(+}aS*H8CCL!X>j?R9|;vrJ{x(KJA2dmImHAVVHT8gtb!6}<%QG_DgqC^szp zLyuwlF{t+i*F6#RXWtU?2TW@}<1rKZ`f$F8-!!TBs*A*qBHHC0@wc-RV`X%qTWiRh zw1p2^ofgm3zpS{jbll*Y+uw%y7w5;iy|Y+TDfw``4$Lhl-)6m?zd_yuvH=`fbSs(` zIM*yfcedK}Li^%7&`(3`>-<yf1+&P$-6i&BSZB>ckCiBwl^&w5jEkT7;co6b9+>@- zMONlJX+Ll6`0?9_eTK-<cJ@ozuXp4(uh2K)hnOia%@@0vFQczcz9hqM&y*`p?(nNv z58=yy1utdV7&%=)m*T@h6New+MmV~p%ro9g<vs1ca0;#e$S>owVb}C7_l9Em*W5=r z)&aClI}Mqtal4@pc*b=_bs!UO==+TMb#l0|OT=g_Li+JT7`yU~w+Y7H<7k6Nb+41P z8%)NGhke-5zUW!}$UXHs`&Ydn8fRp;7Tj90RpQLU#2Mpnn<*wlPCjxJ&+Db@8JW9e zydN?S=Do8;#!D0O8COob{5xj#@c4;ETjqPKrC+f6Eb&Hsq|C{$n~PfkkztpN@1R{U zCb@^)+*xwlpw%ioQ(V3WR~5aZ`-?NIu`b&O#AEjyvc7u`!}B+@XTvo5c-*ecL1ER4 z^}dYqd)>NdD`-E0DLchl;u&&OpgZ-nEx!X^9+lnZ9^;X&MU4k4mRSpX;fX-)okm6} zqkXUS4U3R1!&aB!Db_a<gTRiC!YA@|_<o+dkM5i!PIbBmKHX(oPOe!iypEqc@aynx zwsVm>kX62?8~9U&B4erR*jI`@1YWY!oQr>%s}1hS*mWu=e@FMV4;6Ln2QK6~FCC!u za{)Y-!1AII589YV(HfIYa4i-r%Wn(5=`O*?K7-*b{T#`Fv}X!#uMzco5k0b8R(v$Z zukcl39FRL~{%PT43i?db?zr>koc>{*FE(Ug$LxE!f7nJuo8@VnSU4sfIPeLTU#{?M z+D0Pgo`|XD=10*s=t|Y8=M7ncAJ7dsWMG6C<}fkL*Yj<(GB!qgyDDa>Z}Um_53-j_ zq&Z8zTNy<s(F=*)@zJNiQ74z>%^G_*`OC!1T@H}PTuwFzzd`p_^jU;H%ZRn;&x4ET z>qT?;%d*Bj)OTAOI?E@X+{#{&(3O5_PmAqp54hr7#JF$F`Or^bC6}cj*<<}fsdk$i zcXrn*<XOk#){tXP&pGB_>v^-CMGq;~db#?{d53gOatxBA_9oT+4vl4#Hr2MiD;ic0 zkslur2RsgsPci>BUSQuix5r#K>pS1QRd$JU(Qd;R07cL)&Wqac0hnKl|I(xLkDK;M zhGw$)1=`lW8Wnpyzg1&W>Lw0Tadz7>Co0md@}HN1LGy_8akuPr0!QF%n{4Pf^GMiH zzDF7vvL<;_t`X(0;a!&-u$)2P13$FRDL0^+*i-pW#G;5vE*QRd2eQOBPg8jhBfSTI z8}AB#L2}G;40w;&2r<rSbQ909HQJji;GOPeAA1+;cNgEel&?+y^?kK&<;5$<9y*wv za`UQzoht0Au3=Zlh>`3m6vY=-aW*GUtgRaz98|}6=P}+nOqs=jU3RRr3m;%N@eViE zQ>?(fN0F2k>Cy2Ixqs3_`h$+4%EFt<hjRH<ukh>=`GHg*-aAgt(kSCB<j~Qkg}75I zK4b=Y1kd!x^$~h$FBW3u0~MYLr#U;u_!+nzFd9D-AD}K9$t<|BprPA|3DS>i|5xcm zY^%Ww%0t@FC&+Pv^9%gbq+f-!@9FV1`uQW^0R7XzL1hC6yEM-f^OR5gx;hO%?Q%N3 zn;am|PHpPDU#dtp$Ug|d(`E9xW_vV#oi8$Pu5U#vP8Lu{-WE5<9YW@g-17~*M6Zq) zwUp?aK(Z6j2jM6}>R;*pMKY~;up2j$*K{Xx&}rLcvowxS{fXYsiZA#spfUgR1Nn1W zn;}~A?XVY^Hwv&Rn)%S!qmaC_p>L*`?@8jNmy)Nyr!bwvPaVLgx@f<6bfEI=!n+rl zr$8@j%z~XnE*2{Oarl1{c{+}qPfMoelYLt8v)0cz-ZDE|?1W4XztTtJDD4@$x(}J+ z9oDRpD>7|YD(7T5aC#}**Tz`!$d8sY%9@~fuMg}Xw$fYn$v3>*LnhzyF?8NT9DivR zuLs_2=DncH>?i$I_O*-e$9g;P6cc)@mC^UD9(<9`6XG+CI@ry@jqa!J;J*ZJ`S=ak zu?K<~*vXT0aOT95@M_@SsXfeS&yV|1JL>dV8iU5~f6E`LA5j-&Il_yBj3)<}bA7e_ zE|sUf@!dP-B@_#S_VQic80}>b&Fx8#J_Sbb;{4h%+tCMo;UQfI#OjGZB4fx4Wz4@* zdziiD*&6m~85@)I+sUG2kY|6Xdp>n@{wFC7g%kQ1xqXW-@oj)i!PyJVt8CZ=t<kz< zzmV$ji+MV=6Y#M!H{xM*y1pgU;`sPb+$a3E!1WpaLU*`0NYal6eITu9a!K6}jOQ*X zgTM+c2AsY{{+zry8+Im<w*}-4nRB>D|5~Nk*N1*%fBx#D=(j1>LWJR}?I-4PGjM;_ z+Wno*hPMb_@so6D)^^`mo55FM%&Ytj=~&r&VmjYdIgQbR|EK;P#%ICie&HjNuN3o{ zbU*X^1!w2*sV<=hORhfOGQ=k22O3BDfdNPPfmx3FCT9mn?V%fT%yHDWHRTWLo0;01 zTi?Qzk5=Fqan!dfg{J|Iim~Y1l-f&0-<=%cIK;8cahT%-$B_*F1n2uSR;`W#2W6Vh zhtqRcZpOyb>(X&@3Kob@R0ib3WuzNYo2|0w9zQMnnq|hoMkRFf=JE|S7i49{cH+Ma z>iY*&Rx&3Xz`J?(T?*Gn#)9<C&`ln4%?@wyuI>#N8KJwpd<mJxD)3WYeaGJ`I9yKf zV1cr#hkO_JK6U9m)pJRFy}@^!o<R3$P4bHLU@Uvx$dln4E+|IFn5;u{v62C3-_AFG zS^tmRU~jNxtr6b^Rv&7Q+JcU5Tud4Eg*Ent4Q98pMz{liyp0@^401JXOUxgHK7FbE zsxA3OK0dgq{VekEZp#8nTWz1)bK?S8Qh$XT@N~g_@m`8I`g6%Wb2oVN-lF>Ico`m6 z?5ghuTcTflBqUzb%TvWAI%Eg&=a!OwZjmmNF8ASC^m!ooor0u1{u2Fgy6zRn78@}9 z!<QlO+=wY}^sD0H-i#j=ao7F?(qYmw*;rRQJEH4A*Rpf?)3Oiocy+2VhwS74yt79) z@1q0I5iMM+UN}g)JN^^hb@t;f*W5q#L1QU+WUKUEN^|V^0x(GiS|kH$KN3E@WNck< zu4ru-eUkpAPT6xe=BpmIdv&fl6Ml}zeaNKR*W8(JZY-cWT)Z`E#aG8k;5~=K!O@L( zf%{(SzeraLUy}O-mRRP|0et7zB5YYhp3AWVAUbsxti>;E^j$d6HSJz92jC((OvWPe zsU?4+rF06o`<1@8!52MF<_-!r)g1*b<B~szYjDmQ8tY^NR%<W%j>d6kJ?r}*atM4e zJjt30;5s=<erSd<ZQ`SFJ%G%1C=XV-e|Mv|h7JdspDZkK4qVC`BnPQdQM{q1Ys%tJ z$Ubi8zOkM#lE%gs9yNdG8gT_5pCLRtQ}9dE)<*u(uwo75KCZEU;lR=9Vc*W9zc-De zMPC@IlOPuBgzYl<EF=D*31C?vw!pql&Mvep0&_}><tbYb{b`TCxSxy#FJo*59awu} z$(jmu67MrgJb`XY@WMU#V2kcKd{RT!-uhd90eyCeI@zPl(PON!2h1z#FtwikiGMQ4 zAA9UPqjUN$e?qyXZ(btit7kR#E!7cD*FI_UuG~bX)c+}byt8~m?h(61acl5V^rj|? zz3n!62X)<%VQ<WUTm<qEdinV213hLB>|)<V#?22fk8^o@{d>LFy6?*el-0M)x+tS@ zs`k%h@X8tU`I0fGd)DQzy!A2Z=qRjzJJHp*%mIVo!>$}{mU)LKWNz*l<GeCsVjn*9 zna?4vOH4#En`8XOpVRqH_L6!ev-%e31by45_oEr)cP4(<s8jhH)RFC9!Ujs7TVwgR z(^>31{?ID*-{;m}dB9v>!S@r-xFddF|NR7Bl<%;Z@14U(gl8gX-lqK{s4H@?Cv~}8 zk#8Pphj%=0p;U~He`zS@0rnsRe(mKWo?>o^zc_DL?aUo#y%+H_{QXdIa3j8*L-)?{ z41Gft%58~hE}LGPj&-njK-b{MeWPvjeegUfJn24oS_emsee+VBr+n_N;aTDE68O(+ zudW3D4IPxwpzvd)Wy8*;@coE9p?xG=44gi@oMzD<T<4PhWt;g+I!(EvY7?3&rn~vu zkMX`|)Jc5>$7jTN?9L57gU2rKUxa?}Z^CEp8+|FC<yIM!^33&%c2ZbUekW(XncoYF zS0wmu?1h%#J05S!7Qm0u9l&u1`@_b3*`;+4>Z`3gUcUf_=se>y!SQp2-cRBKi>H>x zymijWqjBfw9gnkzIXo`8%hz}(rF#>-&w<|o$rt!=c@+tMqXfVCSHZ7r^&q-nAgPb| z!1oV0nLFFE0A84bYguwQW-OM<GWf+eueiP?_;qs(P58ZnI_h)ui<sd~<;x<sJIIaA z53aTR20D2M-=>Ro%p$nfp7XJOX@PD74ca8K44#nIm`<WuqkrHWIn~}PdAA>LjQ0%f zx>$LPE8wRuasOJ*ARiwg=J8Q*_7U(^N&1#c`=)-;zb*ZrMn@GI{NsF%w10`7a{fxz zeqsVV6@)YT_$Hmx&m3hgCr(@(Sc99&jF(SY;SKirD!n7z(Z){-C#p|2Fx6M+!*0XI zp?d=Sp8!7D=H6L?A5SAU(&4u=hLR56z%g1X_BC`QSGnNcLBD~=9N$Cs$arg~AKl_V zKVXh7;X$AFHD8g)rsm2j%q4vk{`pA4KPSNNh4Lx6aPrxZ3pY0;8oq*TYCpw-+L&w7 z6Y9To;Tx3AAD0e$2!1KUFXIWnWK(_-uWXWq3*;O=$UsBZ7XQR&#Ulxybb?=}{~~0J z`Gu7KFN6PyAzf_Gkbzdw%jqnhQ{O|X1N!AeC&j0rUv`rm<d(Ug=!|jbR8HtL0iDYK zA9wEp9oKQ*dDgw%0GcEyHo+DJDX`QHG{Ck5YuYrdU=+k|H9!fLX@`<1g;M0O4N?-5 z(az8^oz>3BK5dYcs7VWeX<FfAya@z8MCY^s>S0^E<0Kg9VL8VqQM{h4X4e^GDaDa9 zo|sOYM3!Y?fB)~^+qeKhS<dX4-5s3MsJeCQ@zwXLufBR*`lLGoz7qB+yF#DZLmC-9 zV*IZ@aVC~M`ip&f2k`WbPccTbzYd<{3x~zI-Z^&-d<hKbbKjS)&7#*!E6D=<d@uNH zmd`+Ay7e_0&q<?R<6YYA7T>a$rWZJh$Xy4#(oWmjKXdV0v|Tt~+q5g)(=Xh|+ZFu; zd)Q_H_={?bekWMpZ=(GGH&Gtp;5hJ{#1H!@-xr!f&oCCLZq-XX!>=!-nPe`zjAnh% zjDtyLU&ZennB@*D)|$P-%xNz>^M_vV%;TQv_~mvMeObNf3Hccs`YTvl3vr2V%hIo; zWLfm1Z@&smg1KEXr?e1O^h<w^okMG&WtDfvvn%P8NG}Li(4`&va9)xh{EWXm9n&i| zR{Aad-M&MgT}N~1FnA;ZZDMPH+y_Em$JIyr8}O|s|MemGR`&B=^!VK?$m8m_l1KX9 z9`qd<3;O=BXks)6cJ)83^ZJ-P1h{H;*GKu@Qtr^%)9jN7X}A|18Mn9Z{qIvpzWGwf zm*?>03OaHLKQ7AHyX8;ykSU#M(|G!G#+UFAJlNh__B{9`DL&<UACe`FbM2y+^oi-w z#c{4l^M&Pl1U=efG^U)<a$f$|cdt=9#<PJgZAC8A%j8nu!=s4gatTk$2K?`F%sYjA zZPhv;vbG%`={DgD*&E)NW$zL`hJ4cY#7DY<@!;Kel9p`ah9~Hk+SuvV^>o^|pZtwo zruWP~wQ^=tFWNF}FE+ia^3?M`$_B=!(cSa!8mE1w=bI9*Mz)XgD^G36FEQg?Yw<w< z)NXzDwAnr`!sTaQp`XsVjxt~0s{Y6hVI9PC=pyDFCF`U1$e<HUe;s$FO|q{?(yKKV z+Iz-;uz&i7(RTQ$)Oh!V-G{l-_qun`oc&3cDFWXtt^?tNcGXGN22L>-o@mTb2N?C) zN7|7;5X@Ec&nGgR^LNlhdyY(RL6fxBr|EgqKsxkYq5D&Av+lGi2xj@7xEsmt5a{Vn zXm8m@?Z13Dk!X`1#*g#<LfOV{eG|&z)47a3a-O)rxtm1#_`yWml00a)#XMQ|rD=?O z_kTJ*lwcnkKR;pf7~LtdvFZ}XOa316c=@5{%@<N1q92qIZ1tP{3cjf~M7M$Dq@}r` zY`5NN3{$8-@tn$NPM<&U#}oBIf4A&mrD-kE>MD_uGD?%rv_9n9H_pX7!o~U4N6DQN zU6`jA73vxK*uD$ZRVy2Qbyu13yWk0ZxM^2ulx^%+`B}<<XaD#pJ~i+|=%V%&DlLK| z!UO$)%ICIuzW2s#KpWNbv%vQMhcf5ucLe)C_I-r6<>7yAy(^VR*LflTiHGKq?_l5F zWUxLKdoLf)Jo>5F$b)?ePcS|<>QElz-FV+)?;Cs?f4_{U8g0y|er#6dC9ZiNYyJ)X zTd}R!`^Fx;p9a%%JV(#!uifMDd@@+83-&D7+J5aBm((8Q;%E4tX}8Uzy6dFX=1>Ps zg-xd0InPt)+4f_nlWq(@9^=Vs?f21qa+>D|4|?a;w{OyW`Ela!*cWtGb<qDM>u@36 zga`A*n13Sl#Yi7Bj<9#p-;FQiS9<Zeqo-}{nX#&B>w>!y6ViP(bc`znV*~isH`-Fz zH`xKcRMK~XJ8_@m?uI0JnDV6Dd#=%#Ap56rZ}yzKShiE-M^rxLwm<IF=G&BLmqK8B zHNA6`I&PINP=4aKsJ^!wSKbI`rcVX~eJ<Oow#Bbd-+j|bf4BBF<KOo(qwd09be!tv zzU3V%bL84Yo8|?5E!<D~Ro48Y^eu^W`cdgPxTwPXYnFM!B)?gWznjl0o%%neka3Lf zrBP?tzS_2Zqr8jY(|Dk<E;G9DEoisI-(_XXR!=z3dykzBOUws!FrH<66&>LXjk}y@ z=DdA47O9Ooc1P4!6tZWPzm?bcRHxddu5^vE((&-dDqw>)LHh<5W0%r2c1ac(n{0hh zq23FBee5SnKNt86j|?Wb1vNNpm%hX93h)efm0;a<fZcE4?Q8XU-+X+o65y0?U+%zG zFuX?nR(r?*cG2Q^q&D@Q`L(S(DlVRl(utcL5T>W#?WBC5nJUfRk-mcVea_^q*1mFg zMz)#3^PlmF+czZYLt3YTmd{$9mua6ndDihQ$~=Dhb<psvop*TvxTgwv_NS=rc6V3% z70lJ-xAW`Ix+JnL`A-Ut`g80jmal(GJR<leog2lcwO@De$ghap@s4(~l0oXZLgmzN z^~?IFciaoF_w4O`!``DC8u?WJ3Gz;XkCWJ`I!D7@yl#Isj~!$CBn_71!QJ1&pJ3sA zm!%KM?pT<WY+!>jA@-7#7k@-P1L^mE<%RYo^2#68FP_8(9AK`(T9)SrW!=S;E6t#% zd1tcDyrx}w!uRb;*L(4*-cfgHoO;HoGi+m6@XVN>!%GM*@~6Y{?^_0&#)GJwU|V7{ zX-|yW$q!jO*xu>O!!{b@g6V`&aI)X<-OFC20=Vu<mI6A|&VARTI;iW4*t>jKuJO)b z3HEiEtvLbSoz|g%3B7TF<kM(8v?#xVg}uOC$!l2KK7h<~B2)0QcbGr;qqMS2+qWU6 zfd3@FW7ZGtWpC9!GwC1tW9yr$Mf_Hy%>;dbU(?I_pP`)Ao>uCA^sdpzSpQqYa*cOU z-z-GWkT<P1#mC@g2Rw8XUOCR(ZW5mOJaXDB{3w6Oqmpm-eJgF@Z~DrYO#t`Z`j$!$ zxP*sWDU<M%$i`mba_9Yy^Y`%YrM9m|Jfry)`fY}Fy{XOs&$O%a&c;_M_uf@gS=wuI z(Vhvn(bt|qJF6!7OY_W*8hG%8n;4&R6WZqvKU$pguRqp1>0|b<eLsS$0dLve&AN1# z+T-jjFi!r<AVhCN18W=j;Nj!!Uz<b@K93w66`qi_QxQL#US|v<pW#qCIL=?9x#&pW z*&V?e0_z^)AI^Y8{F53(AA*bb@y_;4@GSdY_he~3JovsEeW49oS0$|!>HR1zgv<25 zzC&T-BI}oltYn2dR3*2_qtP51<r7|d2K!^vG4AieHo!Nxm1p@n+C>|c3HGQI)whNm zt3T=={b`0?b}kY)`PL$P>yKGKcJpj#Y2|9p+HuEsD%cxNpX|OXXasFXw0A)F9T3XS zGT*rG43A6Jj@2*GQ8<(=X&lgarG5a%e7?LPHV1A!o&U?V-=d#^jSQawdwYnR?55xU zG3PUrrI{}!`)3|cvWAu9&b}mP$&!5Mox7%<Omc5u5<hA(tNKkZOrFKQI3yqQN7+;B zNw=~$k}<!vWcZndcYsYal}|J=8|XFdK_JhtpGC%PUnW|j#5pqEwR916oV7Z7_0F#< z&ne|EM$c`te0PeqUe3Ph?jW5_(p{vP!<~%1e&ZXZv>f09oPIePe-)CqU3qPcV+^9a z2VJwaH)1mU7Cg2j<^BjBz?P&B<WnA33f8@S^68yqSNpgxnbi6Cqq)O9v`K!^%XGNP zaSo4j1391js`KTfD{u#q=IHcUcb+!p##WAWwWYG$jp_Mi_N(d+!B5y78?UNQdM8+V z&LAu0)~&$#+rra0G#iJ8<Irs!I*voTacDOV?Z%<qICLF{egVys!?GnfH)`<aj}sr^ zyufH+kBFBzFJrvK{+3pLsXF{!pCunSl&(S6*6GfI`XG<!_~fS--r$|Bi!z@uS%BYc zofe(cF(8c;d{@v@-`#vk-?c#3VP|6FKh(K6rlj0eI;Wgg8ttSW^MiMf6-?GmKL-6U zonq(2b#6sC)ZRqlP(C5u9}EmO?=iufM=!$}^1b`e(s%um;U#ku@v8(2eT7^wkD^Z1 zqdFzm4t-CZvIzno`1~QGwP>!N=?7=$m)Hjt@Dnx2?tTYtwM$0xFGIUK*~dFVQ<YLq zcd6vJ=)MBRQ2chJC&7)=n1<b!YoD}lrnT4ql>IKux3uR)_s_aP&I}zhyDU*VL;h>A zw@6oCA7ej^+Cx7Fx)Gfn;!ORrbw0C)(4EF_;03xg^$=3d%7l23y|YC3{MVM3joZ)- z=u@?WB%1$dV2yL#yTCQ{uib@xC|ehpT&2R=N2yEn$^R97r(BaKd$g#1|H+3aBYb&& zDd%xtG#5D0t#s}oc$&RcT^{G=HKsi@V)=9*dGfIb1N~b2OVa}j^fNwIop;~A+1xJ% z@{zxh`l?5BZgSG--?QFzv^m|8!JaAjc5JY9K=Z5m9Px5%zh4Q)59vRi`~2#X=RM+0 z({<vfl6b1$c*^*fzM`)L=UbgwC>Y<;wq!wk8jeRD0j%h3{J$EPXy5cKJ#dUQZtT|9 zqTr(bB{Gp<tdu+~Pgfrkj6<QUygC3Oqp`0W9a8%$^m_(6AT#bRY()55Wk}PWEysER z{L5TxG8o^3F}QVD{pap%^oshAzcR7Nld>bkFZB`9kjJq7zz4M0*LK-cV_jra+qB8N zc&)3*o(c4(+Tg95?v%dfF4vf>sNInF)#ru`MSTtUHH%#=|0|VDq8|<fdc&0ph7+9| zP=48)qKD|9wSj>o-zw*xpS}at)*0#+U4^rNzC4twrca1j|CKKIda>)U-F~F<ZvDS@ zlsDVps&0JPq$!`$G@g;~jVMjkyq!8@^?6a*SbaZU2@fuLIrhiG-$@@RZ{G>$(WhXZ zM4#~e7+hB+8*u%Yxb)Hz{W9?YFjm3gnS~d{-}H4gx`_EkDaV}E<J7mC_$ql)?Nzsj zvF8=O8|!c6%MtA*J8!@}4ZR2WZVGo!=JzbT=!JY)KS{Ow(HAIY`~}(<yoyk3Ejt-= z?3@j2s99|3RoKJ2>(r}4uk^JGKM~r}TLN1-J;<Hbywi9mnu_jWy_>0Ljhz9-M(i7L z6LoBds`C17FFu?E_lBNk?CelK^t1A_0pEx>2KXj;t?XV!cjei4iqycLq}K)=K97a7 zmLFTN20t0^YR(_cEe74)%#HZIXts;FdBW|dUfJu+?X4VjMZ6cvWxI6#m``1_WczEM z*BEQ}Jzg-C<sA|l@uK3Urx`mm7m4!#_-Kri@pQEt>4UIM?q&(vgr@67`^bjW*s5`r z^fioor!;3=-gd+*vG$gHYfrp4gWitHMIktn-!a`+E^4lmz@EuVcM$f<W+Bb153V~} zFRin=i|`)a_4#q(tZ%pL?<;?CxDGAU59nB+9n+_^k5S(L@q*uppLApq=ASBOz;snt zatR*$hTeY!e_uf`32*RCRc%J}3t_rx5vHf+{$GHpwge{nq4_vCUVzu~eS>b&?ap2? zkk~a04`bm#(<=PPU!W@&!$!ZTBcu)b#`yGAqsswwJ9LTDRCE;2g!Eg)4Qa@U;Fx#p zJB9Zhq3(2~M#%zo4T)Bv+yRf$67VQ8=Q34vCs2~+<;#CkQo87A;qD->@{z~O@A{LH z8*C4J1?=|{JtF-djj^&p-7Mn`V}N)?yqG`0zw~-$IM{OQ4}l||!+VA%;UoIi7+*-A z)qC+l1dG~<>X*D~Jkxj()z8^_8z0n`;*u%(OB7F*c(sjh1RY!CQKchq&8j2b_FIj2 zz#v`pCT*HLf%7c1%0{wAJxj)6;l<7)&6aF@WDcD+Jb)KhF`L|Q;|2D2V;&muf!c|1 zx2*1089TMlp(V;gw<XIy`XiW2jbvA=jOd?$p5htRtNsZF!>5f+$Ted!y5F<=hMH~c zGPq;|%PvqTJJVp{J!#rACf`fY7WNovsdzrwqoggdy%PZ(*=2C(dmUN&anASA&^NkU z0KWA$=<Gx7h}+7zmE&&CZG{m}{&al19_!JbzUa7_w4`Xtv(g=DGlD$juI^E|!gH1~ z7lmamqKv-VenH+(-W@CRuSoAE{gaZJC|!MsXcMJ5hb;u2)OYrf1U^)J47GCNo3wFQ zFhsl(m078tfeXPoybFJIxCD2tV#`qeR^r@~gA67TNAqd#>&&~?s6OzXmM@?!>qbRy zzq*b6mOFAiHE;HFW#>M}{Xw4_a>>u}Ev3(0>r$V)&aM93uxtI?2iyhS*SqwI5$8_q za{h_kE_vb(*L>nmmpXBmTYX}WYd!I6?t%-qF8p=(KXYm7T1{P!x_s(NQdcu|r6|9e z@{aO8<&%_erhLl!z?@h2_=SDw;X7bo=brDc`;`#JyZ_t3*z@i;`_2m|Fin@abLxg* zZ-?j@(FeUJ_#+xXThS1|75n`)myOd8`D;S&Cm$Z-i(#YkV_kir^Q+b3e#QseUlQ1~ zm|^Hfqt`~!i~DFYK0G5@YTlu?fhCw%lNP}e@s8yyF>itvveDsB`2x9xg!`Iqq95Bi zOYj!op9|%%A04n~({Woj&{^&Y)r((9KCy`~&r#*UpU=K3Z-er_MZU&dT7Gi!HRjXs zCx3zdkZi!qO@f<tme{}1bJ%vf=D-iZn+5|gIk!z^*#}(8VF7O_Jjgv#XTYuQZfbr9 zzCzA-Ou17oS*QwDcy8VLEIt;}RgdoDKwtOLmy6X;>+dQ0w%U2LJ>iuax>EhFpno*} zeqM9L<C8AUuZ>@Z-^MzA&^$ISc5_1CPLrP~`R}8<|B+qf4p_fRy`PWh#`B!b4dsKz zC*9qWs8GH|zS!!^3~8h2I_lzHM%`7bbp)?tcHu{~(*h6Fjn-4>XUbOzncw`i@R@SI zaJBp?t?uWa)I0r@w;I6kfbvWyUHeIngjM%TpJHW?xW2-O8v-Wzl5gU74QaYJs!aF} zwN0Bp5aoEzDJ1`P^6QSFkMjEf=~<;m`QX94p2vLV0Of=?O-Oqld5gSb-r>3Ye(q)R z9rub}{R8~T6Ja~^8i!R*A$Fj?S;m=<pZ{7^zxt&2l=oDQ@@L7HQW{}N`Qz{V%3e}w z!pZpY04LQU`cie|Zr5E_ZIWN>FKf(&QE;-@w`<s=yE<t57m!iPjRtcP@{bU=IWu^- zchwR4i2k(xlowtk{X*Jz%hUVHzV6LpFV!MUF*?D((g8pJdDhD&1T%ScXE{pYQjD=n z6U^N+%ELOw@50-fA6^2?Y0-Z9{x#WF`SSl!rH+llaa8Za3Ad4+=9I3wRMvcE&Fxj2 zW9qKI5$J`C_TrylZR9oaFnzjp9C=WgD8Ji_9vi`rQD$EobGqK=obKf1+swd2J$x7K z@9GupdGjtd-4V$gGNd|HUnuL7$lE-!*6`ER@K?#s)0_!A!p=zdVADyK<X?|uN;D5_ z$%c;JG+7}(Ww`5KYYXj~Tk>tfMp}H1Y54{{%_Yy$#|P<8x6Whp9IRV0w`BguT?3$S zOV#F=ej=D(`ab$(&TCa2^08<vsBQ65wL85fb`SVRMgn`5emCsgu<u#=uDe#hY5Vh@ za4(MCbK6(I#Y@;_Uq=VM0Pf5lqYCMiUv{By#PE}#&0V}G*|+N3<zwq<=6kR70X_=K zl_qQsFj2PhIlYsOBb|&~&2Hi+x<-2`NyBCV#f#(i`pBLZt~qz>3WKznNUw3D*(;E# zHO%*^6Fo=>yd`LE{#WWMf!F^%Xft@Pxab$br)T=rG=7Zr=GZ$uQ;+sI@Es0sBRV95 z-t35vxmFMOp^YC=rS{C|>|Yakbx*&})a2v&X@?$!{DY2EdEaTw{e@$~^VrC3Uui1? z3;4Hp<!sk9^w2Zkqxj}H^cjaP@a_wVd9$nMq2Fnn7qAxIcSF&52b;D8?fUy}yletm z>bp2Ys;@Y~z1e=Sc7%*^pWS!PDqVky>s_03>lvpSK8NYfbw|ZR15Mly2A!s}>yAcc zsH0i^)B7Mze&m6FBO8Xfz+R>K@P_Jzrb+P_w$9ypp1y~9Vaa$m3+=u=-Nk)HU9Lb_ zAmrOd>|^Q#f6RHXZG6pBIk#_qgQ$J+qV|wdx4xxk=g$}4Mff$}<vQ+|em{DFyS*0v zHiRcCw?0lI$zp9w(0|nx$j`vI;E3nbJ7~t9rhx~cyN%~0A&Zb0xZnfvPM7j1FKd^& ze=Q}Q8^Ne@;;r<^!gt{por`JI6XnyG1mAmoyZBB|0RQ(?=VDo>^P+}-qf>ydgzzOg zh?c<k+wjn^@Txgl--yc!w@QPrhTyBlUJ8dDmk4-k8@x3O|Ma5^`rxNxgg0>g8LdA_ zKPpW+F<*wJzUURjTYF=1D;wl#wS8n^+}3=<_&_XwDHb1!#fM|@t+DvFSbTddz9SaD zJr=LT;=5z<J+Zj)X$afiSo*$L{N7mnzF52(iyw%^55?lOSbQQDKN5={jm1B2Iyb~G z>z3fVbyB><+1idMA384^i#O;&dI6qHNx!0VvxFJTC*Ny}t4bgHl3VC#{K^`wLZwOn zD%7)lh4FQ6EAu?*f5}VgP<i+z;Cb3$Uy<n?l@%{q9q^#+Ao#Bzeb$FQE4oU9?@Hq5 z$X6hLZ||rcOEyLzLsuE^A!hkq3BGW`2!Kt24j>Eb_@uLD<!U3mPw5`EU;Jc#khwh1 zwOy80%3r7b`lRo2dzPgK`FFWfvGf%ATf_X>SbCOp<lpKkEKBG7qoohW(p3-Ryrute zS^67%x6ug)^+y@nkiYs1=$B<@G(<1!XXxW%3`=j)xy_P8v$i+%%Em0`_f8sYzl)yW zzDCXYSmT+6jO4351FrU_FV`HNMe_tEa-*!zd+3sdE*;Q?F}*>T!g=ADt>SAsloKq1 z33%4U;Smh3#5z(I|HOIP9fvQ~w%yNkp7zBT*k+7X=CA)=+?G;$ZP0yB`dj#uE%g@u z`tP~7@Yf5^szbPr;__h{{s$FS?Y-InlfhpyJqv#3nbmZmE7>zvts(~*?8anx9>wHI z`d7S<J<Zw&KDxcoyu!GfWiGU3;Z@N}ykYD5Q^?F64j(DsYdf*<if93C&avSnEBcea zih2_kr;hq)&<~Xpeq<l1Us@M4TI&2p(?rSV8w_!nMN7XK`%GszP6+;^np0=vvP(Ny z$mhWS+FQW?LqGVwTNS+JboK#Vp)=y=y}!cxH48pg=$FX~{vPWOKBMLRbH}q?;P8zB zKY!RIv!i|G4|Kax_7lUNDq{$1LL#{1*L=aF0iO#dy{m#RSA|Zcz?VKT!n2>=G)aiw zV1D|(5$0IV>Z-~n58~n(rIq|)=MHAO*xOnXPgon;SLe6SlJ}av@`G2AuJv%+>nVS+ zTlNhM+886%e8~fN8T)pzpPFyssSnu4qk2c5mVGxP-4^vPl2?rzW1Z+_a1EW?X)`Mx z6g?yRgivRPGLl2=5!;`p_x2as{E^*3o(#4KC#C}3+dJq6n5+E*V@kt*p{}&sR_*c= z%kJjno1oZu^0}W+$IJ^xSFMWYm_x4&W4wL*>+FlQ_BFRNy(JvThtK#R{DXIBO{le; zzFod(S*njPfA<$0AvP#?(Gy0vQ%IVfW0BsGeB=-8yjOeafy?|$SEY+Ko(V@|tNhGZ zlb;@I_S?r={Nz~5cVkK4#v}IiXbmJ&XTL)oAE@rrs^bGy-z49_Y`!S*kbLE8Teh+E z3ATK@?OhzAZQctf(kmvf$f?yq-m$@*_ioMy_PwPI?%b!bP;J|IIP5a$$0W9Gs&;KK z#|q9CFlV5D(+NM5KS0>xr>C3z_UUFHABOLyQ+{wZ99Rvvz{A*J@M4#HA<Tw1jqiFE z><XiP2#<mV{4S;s1#!uX^i-5z&-6R;4Yt!?`II6XTJ(+k2P^XTQGW@X93k&f@G=pt zt7a%Cp2fzFY#Q$I-nmD1D>Bg1liaymxYFO4zjHTfcAjaPc*?zh&vbU@p4!~birEyq z$g~B0Z~I7gR)FIucsMdnd+H~2n*?sHgBoqrAMkCuBA`cL`#5CD=lfl4phtQ1t~Rvu zZiV@ztyu)P1!rNs#t*y}URVP%9*FP3=k96h7^Qq!zLo%=z=v%T@RQ<EUED#>T-kNi z_cISX<~+hAp--5q9%GG`y=H_-!ZcwMVTN!OVLM?nVF%%A!YpA6VV+R;PZtPNguR5? zuU4eqNy0wDM+o}~e}`~@@OKGIgj0k=gvSVn2~QAiB|JsA?Z7eba>DI|n+bOiUQKvA zVVSTpam>4(a5v$H3HOkGBjMeIw-N3o93k9C`0IrClJ6eE`v`x7uzKK_d!6tA?|tEi z_#yUT&dY|$H|yL^5}!~KdM5EbCruY=El4yJ9iZW*`5R2Pc7Uz@&cB#balv{6=L|i@ zNbZTLcIkVl_}RC*bhe7^9q35**z+zo)`^c_>C%^rJ`cWP64=|6+opW7(cq8EMPI?k zUPJZ=C6UD>{E`gmo6JT!BhnG@V~3jrX7nj*c0kP?osVlTte2SP30}w&O4k)7&nJC1 zOgu4_aMzRGI-THbEOYB=1|7FPGl%cbL!+kXe`&0Y-sD-jmGpb@g{sb0z3Uq)-NU@T z>a#vi{wwhTXEt|vRoboMAMyLJ>B*a6ow&)ZZ!3=xmrqq`dJfycM^QpHN#kB4y<^=0 zSZ%+e?<&k!lCE+xiT{;78GH`_7%v|cj<iNeJrTScG>0KiJ1}R)64b~2AdDg1^e<y+ zyrUnRNVj_}Qm%BD-bHYNlM1-$P(Ar6<gM&FLKwG6->A+p_DRxreQ&cH7=PEX9<DmT zUlaXL(N3~>!`T+u=afy*#wWSYs|EZtZSHg){nU3AjUIYdy4niUJ^G)D+ID^eM=frB zdNjfpU61mYlpna#z{Omz<ob4D2pDYcP5ROUE#&7N?mLhaAAFkifE;tdX68-0_dN^j zY0>Q@_f$=_xWW{dhsWCY!#3B^euG}I_C-r;pSnLq9cA`!h`)xY>sso%PW20S`LBY{ zm*LYyP!D>To#pAdu>Py_bM&c+x{Qa;+BYcp#x{OAaLkz+!#R5nHe-?WP2s;MpX^|@ z&vU23pN1pqSg-npAL7X%EJgVGMc~GlY<SyD*fHh1KEkUB-@6=-YM(ZH)j#~vtl_mq zxN5P!2rh7;_aV=xlwO0U&;e22UzUGdyu-bmTVuR~ws)>?{aMy!uF;u555Dej>#y*O zQ^qrEfGa(gpwGzwpMAT$EWD(9^~IkyHxf>i?-BTra2=t}2`k=8yy+3T&d=lLKQic6 z5jOK%&98;u8h$B$t%7@^>@EZDIoeoD`BVr8^dUZKFo|ZSW5V`4>YOD0h@~gAcVL~q zC8ql{Jb2L4+&#a_Wyte8dB5ew6GNW=$QF0(k!#(l6W4h+o+x{_of!5;PJF=o^+yK1 zd#LYsc|XPb6TH8i{F`}yHSf#3zy6Vu_hEj&abn25F1+T?H1J&x`Rq3sCp$uXZ#xgZ z_h{b%IvISwhnr#oe7p4<%7$<ImW+ILE8|=F!nWkA^x(IYYich`=Ft`1;h2$xf1s0x zZ6BOJ04DpU3NXPR4OwdicWHyOe6~fli}(UPEtyk!(<S0#(Or2%+y}G{=}dZpbkTQ_ z-sht=I9o>RRUr;U>s2A$MQiQl^9YM-6WTl?dWY%%O=&Hf;@@o8tf3vGadHo1qxs#C zI|uJJ%T|OgX1^lS4V#fVA{#HhCjAcOR~;H}WTP(2XKT{DH$R)&kljf;>$E1VGWs*y za>UY;YP&WRypvBrd6ZYUG`I#A=L%sz+HJhYCtzi1gZkTm!+Z^@Uv&u1Fl@~6;EVYD ztq{$hBDhpX*oJUreUS~J{<LAcI+x9jp(ptUb2ch7z^bMC(+wQVk>&5(rf0<|vytbm zI)eaP<hnP}x0K7)=IHY?E?Ik)dC7C=ljoTmouTZ@*r2aqll=wfwO&~Gd;E)O<?Zg` z9q-lOlq-LTIxVg_hkWI&u5>{+I0SyPqaz!5VhThA^Z6!x8s6k6yi6K(=nS#PzD+yV zI9WA2+vZ)GW6|FZ^;><EO?70D@eqAQxRK(`#5JdC$F@pRBl*hPp;<H5t=Wh*_R$na zv|etyQTLRY4&Zqe@__UO;~dYdQG-`*XbN?NbTKwU`5<GDJ4yRIr`g+nInO<2hxi32 ze+$ptmr>p>->lz;ZHkQ|7#eBVk9wB>4ZJLo2kPIhd2&Q!#uM#{w)w626&j1DpklyF z@ep0pz;nne;>VW?jKT69Y3>@cL$kIw4_xY82>o5Hd*LVcTfgl53H?j*tUG#>m>=Ns z{qI+MiVJqX#Ceg5ofkRBXB5&|KFYVdXC#_qo_GI=>eOEpTHVa|z|RrmdHRBEHo0{5 z3ieE_lANJ8Ha6y~oEcO;rGw|!!Tk}<)szO$33u`NBf91FZ8KkPIzIEorq9nj)pT^` z$tLEsO{ZqQ)HFHsMAO8~<4v`h(@lrO`$x)DQZ43=JO?jQSM5(-aueTr+w`Q%K8h{^ zm!ALG_O4@7t_?fs`-B@FJ?=7(o?uP>6HR-Xv*iDBxCTI7ekb#SId%1P&hMPawQY76 z`8VLdIi0@3pQ^4g{3Ex1h5LPf;B0+$`YiLCeT6QaeKLHU=6-I*#3K7o;iH0IJjD6t zh5u5##Vy!-!{uO>fW9}K8mF)0^lhB}j?>?9`a4cP$LS~cA07&Ls_C@h<qyDva3fsA z@e|?Y51Z=3jhj8iT<0|Y=(9Q9hnT;pX$N@WZn6pazX^}#{3qzw+4d{)e$x&&SY4C& z2E0Wdq?e}OgPn9$KqKxkPWhiHc1gzEi$&|B@X&)iH~P2@UdGle-n7_9|7Q91_(nDD zXs)L6{=s6G>Q(*11#6ky6WUZCr(bUu4-P*g-!4j_Z&<&8=FlCU)cS7S*6&ZdN$IMd z-8=6^_H-B0ad?%~z)xg%^uRkBW5#v`{v<qjO?7-lV@No>+lK6+J>Z8>-UO@UFYqDm z+>0*Q5Uk&W6W7>pcod$ubzyuad*xfyzQarjJ0wYacO+h_-I@4S?XJXpZ6xuEcwhBO zPNH_xBkm&hLvEmcY!y%YA+>&bHK9*<iQrASA$`~8G|xrywv$);ExEVT_D*s?@{&B8 z<Ik<`eRr#0lxdRuL}My-(tpV~VF|pT&yk&rX+!$>V}w|X_P$y5MLLQ6;WKq5T{e0~ zUka`ZfvKJT>Ab4$-Sfi!a;9;yobVbwhwW<bK#ST@8QwKbckbM)ve=4ArK|s}+19aX zPK`rf{7;jN8MX$Nm^VMv)9^$E`rH07c;JZn#6<V9^&j7AI5sVvZ?uK_%jlvuZM~5( zKyk^l)*M}1`U<W0imsyLRA+Dx{}f}{6s$6pbv`hD9{5)9kG+n~wW!DV<{UbV@hYrK z?TA++{ig98m@*B0mM!K&efB-&l};1PiuZJDE#Vy9aWt;G!RadGVIngMO|b<c9#DB? zU=R4d2iPabw}w2T|7wGY_t87a2e>eLlH5p#-WLfL@wCd!9K-%tYB#<JEu!!36|^Qq z=S`<jpS45Cm@Qm;y-~ZtvujZp^_6^n_}sAPc-J1c>HN;%t_a|<F^J;uzV>hg^i+Q2 zlXFWUeW4|N{30+H*o)BKJGJ4E<V*Qi$`el$Ebv4FC;8-p>3hwUuJqXtQ(Ac5>Rt8? zKln7*w;Akfmwy^t&hA#9RQ>pTt`Ls_=UUk!k_ojn4KFJM4|Z=%+zwHG(OiCX+B6$5 zF>i7q+oa*2Re1;RSx7XjZ?nR{_5hZU_hp0Y7u6TlAHhEp+DocWWutuRe=P4Xa(Ifo zr{ROTcwF)*9jS8aoBZJQD!$Vyc5hWS!<PSv5FZ$MM@)9vTTZ?T`IhBXzVT7VzS9NO z`D+mkl$Uz`B`}?i`U+jw;&<{Qelq+W$1ap#k$q3&@C<X%^mGFMAM<v~Uo+jrxQP3R zyeWSAZgwz^fja2mr-wKzhTbnQ-;<67&P4iS+B@Z%R35ZyFQ?|ANrifj(v@ay_(2-& zI@&jy0OMqYE9%`OzR)v!6enwC#xP(S>)yGKxpEh4YgN{?bB=YlKL4*OF3Iz@^yQS( zUCX(`NaDNT=E6AdBDWXPMpn2%R<iVevd{m?t6{m-(_O5igs_OWV&h1%kq*BrUfaKO zH-0C5OXD;+oP>WHFkS9{ST=7HI=im6>eZdQEg#S5@KcHThVFh<dyU`|^YJg22kK}J z;1C9lCs*|IYYdQ1qE8xsbUt7Anx2;4bCV_Qy({wkl$#wk{p;qp<y5b$6mlMRkeBV( zns6|NOtJsx_t0&}SU)_44*NoIKObqm)R9M!wC{tPa?<hvwUSm8KCC{z<vp<_prv$# z@<(~0IZI63u|r<rMEQB&yFz_^Z&6=wtiHMB^{HOzI&i&Y&u7R}9j;o*jq`m2V2^w= z?c-kv>|%T!@9plgGxaUSE#7PSlMAnbQ@4H>;9lF`g^w!fnzlXTtu`KO@e1^HXyFZy z^O4;t?(ip_K7Ma<H+`F9Z-AeE#_Jr;dDU!ghBhSx;4%~HB^x(LlAa0u`N7$G;S+wa zIsFXd3-9A|^Ju>FPRTR*Ce-IJ-%`It_%6~7$n9>Gp-<~pDq})QT~Qe6Ps^+GJIG<Z z6pRmwYkkz7i7QXN#M&8gXy@e*yqS@`NLp2C;rshUSLrvs!}r%J9<X;Ki)&(f)}Mu? zz+ONO5>Z~gTddP`s`*l)a?v~4y-}J%>1vxtpGdq2E=->R19th+_02ltlExF&lR!@O zoF8=?g^ym=<Fy|IyqhnZ{n?y_V6ROjnD5u-(0fyEmCCC9$mXa&M|zd@HtLFCB1L0I zgZ2^LmxqG6c6?`r@>gnqRp?{IZe4g&X8}|0+NZSt22C6BwBG$BdM6lo7x@|V?#Hor zd<ClEd)K>vh`n3Geg;4EPoU!$zCVzt%1>!+%BQWnyc+Klvd<U39ln3MKDDz_pWIoY z{Z+!FtEBC|0pTvf!Q1J7gb%9&I%cYjk>FRqJUDL9DU55Jjr>rt^Mh-&52k*<OV+Ed zRdo@vj=QkOcoG}~*93HS`D5UlZ%wm~p5$&E+h>E!TqYR{<i~l$Gw8?m8Sb#3VehZ{ z!<jqnv24hoYu>E++N?WiYYaC2%0C<G>2$D`%^3{jfVTUo&ulm9mj3D&jPPNJI$pxQ z*V_2vH!;IK0r|rVZ?HxN-RzDY(QiTW&T`8yNyhM9r&t$1IDj<bJ5Fb|xcxl`h+oV4 z*%0d=&!+RF$&c?vc%bbS?>dnD$>$_`09S!={hdU$2T49)&D&%LXuSVL)sb?;7wFr2 z8nb)y0pDw1F>TxVWZ75&A4KPM3`Tt;;A<-1(+Td&oC_$q=T%P+^bVh&VNTSce#+)L zAG{Hq5wBT@K2hI&pLqxEYu>AL^$lEUO_B3Q+>ORvZnoB>Jl*C;J1<V6b_RURZDfPJ zI}ZQQdb@joy=(Xyb<RBGS?&G5?tV9VsJk{8J6Endp!P?1Kxs~-JD>=$Nh3T7R>3S- zMO(+XE!Z_b8w2m)>0b#Krh9H>Tv_28l=9;yvc^{h@j-3W%EA4C90|XS>3j4nJf&w{ zQvE1C>BLk2tD6OXW!r=J?jGiIf{(U?{T0wz`|()cNJYALjCtBL?+@SPHt=ot49~4? zccAyV57Yc46}!`EMcnGnh6uNulSr|4u5b9d9{jIvsK3jdO<&>8RM)t0?c4_+<Y^^O z%CFeoR8Mz)p`R9}Nt@=K+7!-w+7<kEU&b6bID>5?+=*AaNk2v(rby=-?2-*+1r6#p z3NPqkyU)>ho%1|Bqmqf?)jhyw;~IRaaZ&9=a|*_rLO{pT1<GS|gO-$ArSf`qv+@rF z&ql*CX}U9Gp6^PKNA**03L9Tz)`~bw%m=j9H&Wy`b5;Cf(7fSajQnT#&X}7|TD#n% zBLDT??P;HTq`5SZxvl)U$FxV2F_XIjH8=P77Q3XQw5LGjq^B;ax(?xVb0;`%v-SL7 zp1`@%2-m9Hl_*~cabLo(NL{MieIxX<Q9tXs(jzUpqY1nxgfoMWw){T3kLf$A(|l}{ z_3yyPMmy6P7tKxNWBY0T#Z&0hiup;x{X<9gBU3(io{qR{#OnooGROdaFPqQkyzje6 zlU&$*hIIL=boN6!?^0-i-(mRM*!o9!E|AV`sP1yW7JdJd-t#;{9c#imY~7SJttsn% zj9Zq~q4Zs(Z;00s;UcQDw%;X_m0({HHnG;O#sAFThX1@i66w}O7^3nDgE1n2EqK=b zoxwBTn@-{gu>DG^H`tG2-~3H+w#j^a(m~=0tFzQEzO{auzw%%}5BwSzMd|Uj)hCA@ zE|eLwN{$0(0j$s)-Rqf8h5p+eW3pX{zaKfavlZewo=fmyR(0}h`*c*cr)lBMpf8K< zO23)C$-F~&nGErQFI9U{&+%Ca7W;dy&{aI9v$PxL+(^2sIJmITe}HH1`*3~-`#FfS z4;>EJB$?AQd^JCVtqyOohX^^ELaeLR+`~<-t$4%2!jS{+5_mgv62!H-;a4{IEG!Ve z<mCEb4G;c_`!BN8_rlDV`R4WV?_me)R7JB1DAUjtw52<d-0ai#4PNdMALe_@Tj9C8 z%|875iCoW+D;bWOTvq3Td3Ogk<qz41ZQoJRJ6B?@uglG!>~yvVk@Y+u{rL)G1M|gV zu6CV!CI70+9y)_2c-bWnv2J&Wb-SZyT;k}<uI1<}Zq3oZaO+OZIrsFOOPqSfC7*uA zwVYzj@9Af`cZ9XQQ_s29r=N4{GOsTDwblURb;avBUmX)?(B<fq$vM|bd@bSHv7(y? zuRk!I<vVv^(7DS;@mXfvKap&}Hy-PEy;Hus(x1n#pL9j_S7Sljq-*jwWOML!(Vq<X z+Ml)YWWHyR{Y+i1k}t#ZgY7xuuTFQmS4tQ@S9#9kwkWUk>52rR6#YtG#r5UfWxTso z@2nkkm&0eGcbl0T^WMt(UbVY4v9vtASsaJ<Z}q)w+0&uE?}t}jWL+SST~vZEvhbkp zV3W;Quyr`bZ8tvw4x0AqUJPjdCVk2C?d4qWP}3)_^qW3m_wjK*1Twh>yXs2gt08nn zOVd7`RpOWFd3V!3^`$5MdM)KX@NZRLrplQlpD~lX{;p~l?Wg_0L%GPF)fx<Wf7`i< zoaM=KAH@^E$yucEKDYvK=f{B?8L<7lwEwPf?AP~HOs=&46}2+~U*#WVuFm(LHMR&o z!6g{MU3|X$0^hOj1rNoUr?^jscH;Qa{Rd-HjOiu!N$jP<I6gJLndoK+(H;1w8M|f= z<?@4X{-k$=cP*S<ag&mptJN?0;)A&cl!%>6p`=3>w${*vf;oTV&a=h?$d=DfarP2= zDR=!Q>ik>jsr&{{dr0@nhElp4ne3L1XWY=;pqEltig-71+1a`$B6($J(<jJVP<yVa zP~zSS&aO~)@~HOFYhJLMd|F$+lQH!I<)0XJss6I_!g<>&rD5x^cbWDnPd~ajJCHi^ zS;oIVU3f$9X>*<b9_|k~j!n~4b?z?;-CCcGcq78S-uG;2+Sk+bdd;tDT)6&&;5^-1 zwmL4<`+T}-A2#-z{`zW{>SBD!NA>CcKIjzClJ!*OH(Oys_Ac*2I;*?Xt#K2n57&z0 zWuG)YD53*<jjqf1E99+ymA5?0-Y3xM%yA@F#y=6Ch=(+nYVeWxDw4GmZh-k<iFx3V z&QQQ3|D@;ezc_0=TLxf!P7&V0=R4Ilbh(_hhf90zCm&Y0ctdk6<Bw){`KDuhD||OR ze&dAhA<+G~=wQ|o(DgcJ9F?*Bl+)f*zdVuK=oVgMtg*2#KZ4{z?+MCI5l*2Odv0`| z+HB)q4a0E-9OC1O@Egj}dGQy+&#aBvC)^NyAD%hR*f$l-lQ&I)2N%p!kiUNLvNag5 zKk#SNzkH6{*gw<iKJaJOzXbhD!Y|=ErECsxwq&12^c=#2&;QNSGhgybGhg%uW}fu= z`2G~K?+wp<*&CX9%IoLbR7Ji4R4}=u{`^QXYc|UR;PwzQ{{fe*?Mh}{(^KpX-|#)z z&w|0-a(cDeN2e9=;q~GdO*1ZsYc1#j2Tj&bR#{^&_`g*(`5vPjJaDD#U-19X;p<#& z3>phRhs$m(n#=K=;dxy0M7*82_P}=#e#Yc#inFq1_X>6W9FVx$P0XPxoL}DSE*ra( zdC^_?qG(I-DZlJ8|F_bt$wGH%ec0n2bkB5gmk#3&YxF->y34lb+(+BH7{<Va<mrR0 zV;^VZP6b^6kIN3fveWsj=lqfSMw`DWdYUg`)Y+U5J)Je)OS%tFlLn0Z$M3*@zl8tq zM)u%NL~z;Om3#G0dGLEQ*S5L&yq|I>eRlzUtg+w4myJK|yVS$rL3Q)4b!<OA2mGS- z5m)59y6Lf9^m~f#?r!J)a^~0EXDS>REZ{-!=+B*F2Z^)Jk)EV`{KfN_TyC*`-${PM zVN{;7cMC?rqBQ97B7L(p0HyQ(i_=wbi>-gS$@z!5o8vI|aFZ`hn)&RBXNcQc9&y>N zTd+Owzh>1ZY~6(_&q`lUc<~fxu}`w%%5NjTOE~MSdydjQ?8gNk9oApkCZ0V44w<+3 z&^)R8N;CK4)8k%8&bKUZZs7`GZRukk%4(c%cI*gpc+mDKyrDE^D4T%c67e`;{^Um2 zLz|cLD+t$qsgSFUKpSixaQ=$Y2K@Ig=)QZNzx6O@1B5^MGtnRHKZM7y)%9%YLy}c* zcpSMKM;^zK$8qFu9GT>sX+^%7#y1W;Y?H`_@wRC{*+bW<{I?hSKExV}5Z^L<#lV{P zFFZv1!u$Fx=ji^2_WVQFI``f^3kwq?j9I(gx9D#ozl)C%A7TyjQPvUJ^TqeJv@hcy zR8ncg|60++e83Cn_C4sO3Bk*_YjETDBSX5(J%^*kEsT-)IHlh<$=42TB`ea6(9C>* z@Ri2m_m4ws{2sn&uIG^6B|@8@pc}L3s)lbcIG0p(%;kHnefnLm`2GBfwL8MJ;YFCp z<3VTkDqptXS~_P%2RB#Ddr9W!q67H0kh1bUSo}`EPjTS+bbZ7xx|aS~OTUYDqCDpd z!?roM6x0=l!kyA=Tnv1Y#TDl$;T%Y3ned&+XYyTJyX!Q)QDin9`J-8BOqb!Etic8y z^jt(=nY^XNSDu|IHeO5e+~i(#$<En8R<mw8sB`rgc+flDz0L-w+5Ca5=>z1&{J|-= zbsM}J_^euhV?LPUrrd`*r@@10AJ?P#rsm^TXW}gSbDidU_%yeE-0H)A(V2Vj2)>0+ zzbJV0r#rRBUMAeg&(FI2?z9_wo)@D9oi)&Yb0>R3dNiWj^syj5jlN3Hx=*9IbI3c| zAUm5+wCEevIg_mo)V+(}3Dtd>$s={<-9hYzUG8ihn{R9{@9<+uUQiX%vu1nhJMH+< zT>fB7Hb3fVU45Q=in_+SNGrRuJiiplIPq_BMmabi)#Sc6onX$BaIZ{beel~2XdkPO zwq(bA&fq419o?unVXMO9CG>L;u7;l->&bQ|TQn79!j)h{_uNZe9~Vw)Wg9;>>AmKd zW6l5Hm}gGL=a`+0i-RSzpN?$tGJFp?!@Scyob)cyoc`fvkNLfK$r$;-#n~|YVHm!q zaI)k%-D4r0I`*t^pJLA}pNbgDUNKEN=YKyv%{#-%P#Bg$N-{eu-?AI!jO?i0l~dIG z(Cl@d$6it1Y_RrmK>4uasZaAr)rFnAqR&uvF5}r7;ze}SPn~xr&;cqVy4M76Fds>( zEwz&ZRQgW%!8eEo{U{Rwe&(Ga{O|$tG?19ozK?Fz$-Ju=@xf2a3$K`6t#aZU^ignk zG=5QR^Cf#xCDW2M=0k356doIKAJW`zAi+4Z3tcgID1W%qbEd1hY%F2U7L0Y|9Rw%9 z8T1wYEz0J$_ctvpOl6Uy_qcBf57V9S_@I~78Vu#^o=c@8Tg>x5^abJPALld3zAc{t zuq|m*?FqI_)y@-mQ|cqI^Bn}vk1o<B&wgm}U!8R9sN{6)-E>)W{Lrn!q42<5>YTl} z32318AftisPo8sV;L|R30i%7-N%8iQyG45+q(^IIf57a@1Hc80Mf5E`c$7pN{K8!7 z<95$ngAVG0o$CO%>ZjQZ()**(vWtGwp7x&i<gpK4rN2GUwF0kfQQm;InYmzo6wyfa zFc1D=dKlY=W*_PdX!jVQ((7jk`H7wupK@<Zce*#QTOD>RI##|XY~M~dk4}99+wDs7 z`kaf-VRz$0@_Nz1uTJODq4<wfPUoSJmDd{d7@~e?VR8VhncbXgf*#`AY4WQK>vf6R zTnGnYH162Dn-;z-+wFX`f&!7xs36=!vsY(WkL}w64Vc>)-hc^QHPwJc?bJ!PJ`-mg z-$32zNKT>QI*S8iW8B6@a_DyPBdNgmp~n@b+=t(%vIcJ@D;QBy4S39FqkIuek<6iA zRy+1>V8=9cjOvh%iTY0652~&PKMlf9KJe2A@j-Fdx`l^2DU`T`^|=0A`nnMA>q)DY za$a^v?x8$5-H-PA^>mNtx39)evJmy*v992Lz|3_Ef3Ny<x86haGJTi6L&02Y#GTFW z_WJU7c}3>=bM9Kc_cT~s(>_bLYyE57EPG_nh_-g;UJCz;(>x42HTe*5T3>gGrYWr* zCLdE8Kgo&WZg%Njfla^vqdhZEG*@T-u=&W$mzpPLzSvxwd8+x)%#+OrW*%?m+wsl! zO5cIA%hDs>E7}8E7~xKChAz_np5F%2M@h5$M0n<IQ!L*R?<=HftwVP0x@5)skK-rx z9qn!1`4Qc7>fOtGeVbFZf&5Etq<x&U7s!L%0yajxyLsN2DS7`~Wy#Y{+Fhiv2hr0V zr|kE2?;!2V%gS}}{13Fvep>fBzaOAS|D3eHAx Kjim)%5@Q*CG1#Qp0BTsxW6Os z_jvy|Vc9rbkMsV=VO?*M=QZ;DB56M&?OTF9<$mdRr0Yok2I-<ddm7vVzc)xLkk+U# zGva+#&(Rv+m~5_6V2{@Z1Nx;a-Vu$f>8khHacDIrS}yKA3gtsBTibBfB2RD32J`ZW z#}zUUIThKctb<Kk+DZ2fa9>mXdZ#pWy77->M0}*QU`!73aj$L4ZD>mzn{q#5Uf*== zN%xw3BJzcY?Yz!f;OqW|Q#tuI@bm8VHym2i^Ck4zO_N<(U)9`LKJrbEHt$s#_-`+K zu}=QjNcP63n)hOpzqaY5du?ipF@$GydV;t&PC4dMY5y+y34dvfbph>Pc!T{4@BJ)i zwS{-aqs?kZZKzGPgEZquXFi*`Bq865e2KDm>C5Z>Y&JJ_jI$8cpdV9Dp)>Q~?X-K% z-`Ag08$RU)liD`8C-Er(m%p7pQJ$M8yJmP^4zKc#pKRVMxK*d>5$p!{vihR;J$Jbz zefv$dhkro+0`KrDmpq)nXOLq40lh>k;eCer<qYeq_?CjbUtb9Bd6EuOJq<igI&W$c ze8=FA=pXoeZ4FK9kREmR9vCscvG2kY_bG?Hx9vgR^{G#4-$Hy1je77a*je4@(Ltm9 z;EmcdF5~!4rRFeo;+8J|L+l*2(p8uK8g-3^<7}BkTZh~BoAnST^7P5Sr!_~jtH1|# zzkSoJ0oMth*VE4W^>g98uub*jOG}ZrmG7S|@!iDEfy)$CeeLA6y~9y|p~?THcX4^q zJLam;>s(oi(&VRCKGCF+2JGPa!iO~;1oxWi{=iL=fk^(|Zb+RSQQp8-p{;8J8D>rt zj0x9=;RnKSI1EFbqcJ1mE8EA(o<s2zycPH&rUIXx@3h|_=qt8EQsu-irnAxYQ5}*s z^_h3J9*+(x$X=n(>gPwKcMPw|#H)G-J%t<bS3&En3J)DZi#+I(hgicn#Jb3#QI|RN z0PY&@nK(M?E;@RMwZjKlJ3PqR;r(vi(Ffdyqx<=``YC*^U%<zHf<37x@gYyS6744F z%g}|sTZ>P5AV0;vf&K8N#$E0j^3WH&m%m1Pv`QiDLs4J#?8W+y{}=jsT5m3FdX(|% z1-I?c9PmB^ysTLsVy*J%9PqJ*d6f0bqpVx9?zGam#lJxpNQNF19>gocsVg;nh#E&t zPYVX&CVJL5!dSyS>WmT4LidAN9ioYR&d^0=^rt-IjQQh?`QwcF<Ba*^*aG8>`{RuJ ziFw)M%||2qN&XO}N#+*Qg8N2H4nrF-s^4@s?ILUX4s7Gz67gk}N4A@U3%g%;z1zJx z`2$xyI}_P=jxhjvP=2)$FNc&wHfU(`1<zz{{0W95Wv#0_`GHpJ#q20NH|V_i{nSw5 zTipEVnP44w{0lvoeAZpB3D#9hpRPzrm!hB9L%W<;r+mq)sDF($Sa(gjyEM8qe@7)4 ze@%%{w{S>cav>Wvf8b+h(a8%@pYzTBjzDJi4a@hUKI40NQMiI<y?`#k+N7RU$M^~6 z@AL3$18?kyI%a#3v`2Z9^Dmkcj*Whm0EVzEz8ZKVT6^MtC9U)3w|(ragSW@PJ^Itr zTof5yQ#i;tN_q^g)*hd^9xzT5*5SF7yP;b?BJR>X%X~%m$}X<QF2b*Q-m6RdZF!gU zkvy|%o3+-)eUkKXK<hd>i@+Fvx#n0s<@3>bVPPqqncEqiZ`eurHt39>`fbuV`B8VR zpG_ORgd_N^tY`4S$a5&LWd@~VKlngj`LTcQ?r7IotveXKe0ebKDt2y3`X<ZRT0mZd z@%uD;7+2`u9CXXGpX3ZQTIAzK|9<PI_0MR_JYt&iZ-<ZRU&F2p``55L(J{zz&`<HJ zp0&rAy@#uX19)J7b@_hQ<@?6Dw=v}5l6XKo`?JgG4S({}`uC5JQ|;vm=9N^gxMU=f zH^Eqgeo>nE0{CCrguUge*pVfZzby0%>_Ns2>c~d<L*K@$ZgNph;eV6ssEtTR2rnj= ztW(+^pzHPx*Uq5+ChabIZkcBv3VUT(^GC-c2Y0b<!Pu5^H)6pukDNmO_~w*w<Pz1A zpJ3lcx>{AJdh=y;i=H{-E!agf(bT6bFvs@~+5UCu(0sy0YyByenLUmzwLjfGKc#sd zdX)XCwEy#*r@5k(M1OwzJo@t(;~8bNCel|%j}kZjL(fEeS=^_y-K7JSC3-g_Jqqq3 z90_OYUYsuO1ou0$M+e%Z>?JZ~{T&2<BQCG+*CChSFDpNH9=)2Be#_jibsyIk)M@kZ zMf@f4PV8olGr`I^q3V-<)-!m#J%0dP?nWolZY0}`Rjsaqul*q32YP^|2aTJR@SBHk zbx)mm<{12>GeE)pbU%Wh#79f-r&GuIgHN7brW>^%W?=lY*fGp2^c{eis^a0Chxxnq zYuWgMUZwBOFBNhdJDI092lkxmg^n+Xk2Gg8d1mbs`e*g5deit8R8IAf_baML`51>X z*nRC$IiGgvkA25QdGJYWP`R<BONIHfl<A1-RhlbRbJSsN={c;!o@sYg)Na(Kida5i zi{Q3;NS^@@YJVJ^Dw_^Gmd1sjb9K?M>PbK+?5$K7CKW<MdnQcQt9*y5YG>`z_72>J zd0WHK(y1d#w>l{s)g9O>)zDUnLU66}(iQbd^vtN82j)zOzLjv}YxOPIKL@!B@Hu?L ztdrJQOQ<~qpA4nN$6lSd!J~9+VU<J1bWc_&GdHcO&ryD)Q8!#nopaQ8ko^kJQ0@S~ zIqDRzbGIk&f;#mMc;u^5y};2<z6^5ffG1<{C{I{6^zkj01^;fcA3amFGw;Gp%H8xX z$_MZO12P%FbB4NKrp{Lgv6tyrrv9w8mnJ<;y7m?2+;R2<MDURhIne!&I>%)DCTpL8 z=dlsmSm%v+QT=7iYlZi8*H)MAN@eV8o#uJ06W#;{Y?utT4E$@na?brP!m;Ec2m_k_ z<Db*HKE_DdH{fCb|7geLq{~A862BpSd42`biiCZ<?<a12#j~AD9iQUeqwwWPXfeeZ zFXkTLAWb|)+-!Z~vcZ;&W#H=+``NbQW4C+WvHu3ZUq5BHp-)N^Pk=vkhuw=Xe+b$g z&AIPP=ER?EW!H9j8LKkz?fGrNog|-1x$QfIW8Q1bOAx}f4ul2ihr7Y?l$+6h5T)hY zoHr(_`<c0DKNEFo4*V(YKY&NR0X;fYj<ZmYs9gUPcU5AqsCD>WYd$%~CP!U9bx>ye zj;M_4Q5nh}wzjzMO=Ydz!E_IHJL|i&7}mjBu<u5*J@7*Ze3A#Y0yghDzk(g?0~h1p z3^uj)(&IBLP_kM0A3x^$Xfv;R2n+C3Z&aRn{KvHhOZy4>^AqvbVFp^tUW`8>e;B^Y zKf@j>^=*sGPCf^Z(mr+A8U=eT8gRz@8;4bWo?<`~ZHRBee}yf!ebW@}s1N>UvR%g} z;d#DQ>qgrzXPjQ+cOv7n{pj~XuC2>p3GM>_An>eqpW+U!Pfi>Mzs+So{jV3ki*4a$ zm{)Vorzd?(-^ykm7>z2ue+b=5dW6r(S19+vkS_Wz%&~?4;`zm%&jOd`7SqkHgZ^ix zTflJ=A3&4q?SKC4)6^*(`}n-qxCgRbz@9?RyEq?~o;ksK5b_~fg!pggeO`18X<krY zGiSJeB%qgQpnJ>n(2D!0Ut5Jut?#WQ^`7|Kqa$rlkJd(eoIkO8W8XqaeV=OMe(Xup z5!+Y~-O75_Id|eqM_}{qs7;v+2XZTT`1S&_$38M=V>PnZhwSOB=CH<cWUm<PwVh<I zZ57$Wclw>9xhu<dp5Tv-|J(Rh%C2NlJXeGNT}gTg-s!|NxyJp5#k;s`vC|E~!`xZo zK1ICMpUg)1(|y}(Bxmq&JLjT1;N#46Cp9sq$TlNB#QIGO>rBJS$8*1Q72&{C))l9- zu8;Mps15Fmu{I>n(Vh&Q!}t_@==^<Y?z6<7>Q8n-uNldN`91e$yEIl~2cti3zRs^y zbIKpk_2%nTW~`G8OLasd&=1?6m0SrXm62U0U7#|ghx*{=>jJo4LV56~+Iq8OsejZZ zBA$)w0F{>>P~C!w{`Uie@R|+r+TYK-skj?|{^-K~-ar>7r@LG~b!LU1eA0b#Drx=T z9DAc5s$-q%IGpE>lEt!#70NX)DF=OhaAmlmzk<<Vqb)*flQU69i?M?1XZ&82b${4w zR^dAz$oD5F9tDV0r!V>SS{7y3<aQ9a&ouhg;`Wz%CjW>uzL%5!+QKXSXLN7L&F`3; zb8hmhL3-wE3;)@01J6v;{xq<l>$}`+H3#nW4T-dP4|(j6EFzN{tK@5I>}7=?H!2VL zTSFO_o{V_30FU;<qx!zbavoiEJ{~n3!KctNxpBinQ8F~OnZ5Z{ligutcL>=%pG~-p zwagOoD;Z+s$mY;_#onP{PUxruS$<V>GL5;$#|K-V(pVeHK6a1nH*iGy&zN@}y%5a( zKGXV?Y#G`xe?b1=+Fn$9FlR%5$K$4({I&N_xwQwT-P$VQLEt&Zj$yyq2H7p?S<V;o zSHFMl*Xsw@z91PwpTzHz<g9vonR?k>dGo)m?_c{O`Ce2z_0hH8tXJ2*q`3O4dg$ZR z(q-eP-R;t4^@FXab$<}@UCQ6T_5u2^MDNM2Fk2lPgL;zaTJFTgAI}+ictt$2qi0|1 zQ+|cHX_Yy)c(}z|$5;^fqQ78!G;~fOuX-p`U_IZ<|K-iB^Kjnnj<vn4KQzHdtgqVK z4PVR6+7~OIgW{hjuCp(Se<iG=U2_n%hfSDJJq9E715d@Lp6SZk>h#Fkd)4=;5%67E zdw}0T((eP`EAo`91a>21!f?bB0p3DBnm?D1BHYS%XJrl;A64k@5%4?#K9AN$*S=Ug zxb~&m{<UA9tggL(?^M6<O5h1T5#P9%4~4vf4PGi4zc8b{Ofoo@So_jg^V)A7ZdrQ} zo#?qci#@Knef6}`efpR1_}bfmbFcPygLBORcN^{>WlY5m0*>Hr+Y_j0coICfh(?sX z58QE=>)NXHbIRS)tGMtuPFcend<w44IXfjep>Ju)Ovv}aS`hd-Oc~lp1U!GU`8TM; z{1tIrX>Y3Pu{|Jz_*R3tK?Z%NyUjiLp1D;O*}Ub3$<eh3bskBuP3~WNP<8h-tu@<O zG8Fb}O;1znQxP8kL$mC`sf6`miN8eoBbbnxABlERpP(1(U2E?%x-iF5eaMk;rFC#` zivB^9D&wy9M`VOY^+9kmMs@X;H$15N$-hQ;R(WW5|KX+p?x<bn@}6tzMJR76t9|6L zp_72+r4S!W_Se)#Tc2Wlx>>NH_Z({(I)mNHomr9})~`LSVZVzs?Z03QxaC#m(j7eO zyRD69#g)z+yP<c)yTDPPUfK6|QszR|D((vEb$5|=2Wh&et5FZnI-lBjMh~;OZKLh! zr2p?y8?}?nJ5R{hbIZ4dmx;&Ss)^CH2Wn5Ux4qM~)Sh5Y4Ic?l;3VW5Yy{}r(}_Jo z8E}4J^R=9JsPr4%e>(hLGvmQpwLftX-hmFn^~&W8|Am#_g=0hk&>DZx=0(l}6wsZ) z`M*D8-HQEo*opzIpd<5VXZMNo#m@Q^`g*_7>LNFJItR{X^N;JSkKJ>oZ^~XKy0OOr zd^6GqbYw2*={)L2HJoxg?iefM!y9o>eaZ8;DWfr1wD0D3DS7_G(mdX!q;rPf!{fhL zmU~MU3T5r@@CK!KfjMdWtX^iFpc9x!*^~Zm)(wcWKj!)<&VKaaC|(=UIMn82qiOAC zt<rg4RvE&fC?Dmojm58v;tEwqSUxTI9xj{xps**(cereKlo>3<-x;NYlWY{Xx^@9i zBG^+5|Hbc`UZ1C5)L9g4gqx#s)Ylh_zc-3gcW)F|sPaL78~0#D@D7A^zAws8ouyd( znkY`4{ZU*Y&uNt<Y>m>1bM`L4J8*VH@v!X(*Xxwd9;o1Zg4`*<diGZ7NX-|SL+Tt^ zBFMAzex7r+xxg<Yeq5n1|30dVdbVL--2GN{!H*-VFXSQJNAN_%L+VeQcZfIomU6%R z1D+)xMoZ*Ex<=obmG2;_yrgCF&+=_J>_Eo57MH+^^^eXmKgp5C?DN$Ao+)TMn!P+z zbw|`LI7{Wze4kKz=wkSE6Wr4tJf|Z(#_`KN5ba8r?$Mb@o;!LD&<5o!?LD#$cl5an z)71vd$c5xl<--1R51P9t>c7d*Uj#A~;Z*p<cW3gXc2=a%R7jt>fFJVTIkygIWBqtL zG!Au!_HG2YCPdzM1FOj*>AELDYtvYA8za8DK>aG>cgr*Pa(;C`ef){;%%a>sHC%6T ztr5OBB~hiFyL88B)K_5SJkE|=)#ngD&6K@dWsd+u&lYHv#HUBw@ON`WmpC0_b!AkK z>f^n9oKasIx+%(QzESe3p7Y^Hwlh2=``LVyf?e_;SghPt?OlumZ}%*2a9%YU2Lk)0 zV^P;1%Ha>RaR8lsf1bS~=jwd-#QAmptsfl&UdsNu^kT|2o{z4e^J~lUOb0sO{kwR& z>SJD-q|e&JAH}tQ-{O-~?)oTxe98?UMmCk7csUjyit>>E+F1O$C{BL)=B!TQJyD$e z@&QF{y)%jfkNjX!{$eb?If_%ZFBX4q6sK%&6sN6$Sp0oaoU)}@{F*3E+5T8O9gFL1 zgTX@{Y`g|+@=rzSTcbF%*+sr>(KGQC@k@H6-mpw~PilZ?^x&_+GfT@R!uF0WmX%(l zE`9&OvBotg8X>QCPn*_I0zH}D&)l8$MAq6^&(b;~b$3|1oZVar))1x!KfKL;++?tX zcqt5`V=C^QRyKs)B^vtW9l($(j-X#mmj^HcA3EdKU4k)!OF9C2HgMs)LhfWI`ht5Y zq<`r15?ms~EA|OE8vRil<ZBha2$OzWTJpZc4i0U;EOuUSSGeZ*<dHod%J!wQ?MyE5 zl_HCmVf(Ny<YoEkz7Xw;Vy|qlmxVTesI$&I|Egq>cZ%;(8t?v2?MoMfk4`sddiHKh z(;iL63iTCS=v=6D-hJ|MNMGrhIpR*~t+7G$8Q)9HvrZcM8>2j&4MBG={DbmEut<-x zFX6X)xpxHEKg<~HvEGs_j$EZRmWu^vaRk3GbH&1(o&Rfwukt+e-N)3vs2-lLX~6%u z=@pIrrrQY{V=nQAO+(qUJTq6mRknb1dZu?M^$AX|uMT*ky1xg#6XN2Xs^7+U>UZgC z6?&@gY0V45J~rxJKAzLY-|DVv#+jt}Nn?-7oNwHrUe>*C{Q<bLu|{^f+5^U5tOQ=+ zQFSO34Fz9(9_8j6K7^HdXcXi!FVKAhVcqNzd2<0;Xm0);wTTT|4c0-D+ah{8cuaHw zmUG5H;W6cI`@UdW@jZ4HbGbI^-=I9i<y-!zgh@iJX*LnpN=t{v`((wv;BPMA2fpnt z^&NiA^Imoi-xJqZbX$q%)%<!WvpPSr@GS8z;x-OZpYB=KKJ<$z^F`G~o|k(AKkVc2 zy0J-Clc(;GZ`L_mV?1A=9nnJj>so7rjMH7#_Qsm%37nK&Puc%@g|eMt*&)H7e`et) z@Ro-?!>tSLm!qF1;$_JDkV|JvVLr2a!hH8DAMYO(Y}D0G9_cQt3qD0ItUlxt_|HQd z;aoh!`xRwE^+tKx;10!UufuFb;F1ooKeM-P`+?o*zSve|*WG62B3@;GMNIG7TxwD8 zF0t!A6yZYh72#j<B^*kA8vP3Fb=`%OR9nzl_h$WKNYC$+Piym0UmG?WdQ&{N8~%8A zSWfq0CuFD5hRTV5|0@6d!cSC3h+{v*ZTDN?*4jW1{v2(z=J`fBzM}-|Q~BBmdK2F{ zV`T##&OpX=;cb5-xFdLJf1}zKOu)fC$G85vUy_c#?FZVA5#<y7DtC_DPo78aV|JmF zuaB`KzZ-cUbvdmeX)H>YygjlNZQV$Ed{^?D%jI6<V#?iKRDQ)3qCXn(l>3$M@~m$u z1@GAVqkM(^uFcx0*nWUi0Um@7SBRg8FUtRDApc5FR=w*KQs+%$oyh;F>maY>|02TG zq?h!bcp(3y$p5Ix|7H4ytI7YUgOx20I>37mYbl}pM}CN)?qKY{{bRsbh{aQ}_>f>= zzhY}3cj-ae|Ez4AFpV{!U%7$j{pznPWpm)p?%`9vnID|x{jV`!wDY*=5x!%#IB#CO zi%;h{bQhoa{`QZtUeT~G;&?V3FXBI*CvHFLTVw$pPNP#9OM!1tFw4eK{m@(Mqn0PM znf}V!3CqP~H+6oS>GqGA%@oo+U3LGleq6G2`!3CO1Ov42js7F<F!e+-`zN9e`OLm< zz{-2^53(wHh&R?#pYEdh7sRioE{z2PJg?$ezQ#NG=?=8_$d;nMk4r9iz99Zg{(In^ zCzVEgAMs6$2M_iJ<H2J=-d}l1a6~wH+jtIfXgHlhj{-OMOzacRV*N5(S?}Ph_TK&2 z8?3RzPw4v4PLAjjvyD|Jdb?FTt-W(PuO++&JazleF^^y2ZpW;AFFE;K#81?reA-Wi zd|zzz4(n<Hx5l43ze~Q2qQB~|ox`J6XCkUoq4F~xsy|8kbzjt1$%O2Oh|kDlIzjbX z|7r7W*8efpFM8-+K$S(Vy1_?G=NNt(_Vsyfc5HQxVY1yLJVf|Zy&*ntq+jQe(G~kI z_!>69aBK1t^)u9kE3|X>Kcbz6oU8xh*X8;@F>iYb0-G<IGsrifdBX&23WwQSQDvXb zB<p0{%cc2D2R=IO50-voFJV{j2zx~C<Xn{9|FZbq?>y%~k++TVp|Do-hMUUf2mG6V z&rP)F`pRv6^%3Mo^B?GC`_0Otm3=3GwI1GevFB$nIHM_?!8^yN;cI@G{C=lBwM%W- z#dWZFe}ca3H~(G6`oek#>k$d*T-wK{lI=nVv2Iy}_u=DhG`_cLa~RnZk~j7ozajl> zdQ19gNc6w?_tX#B721QQzTk!G0zSJFdmMa@gGZf>JO|Ig_}X53K<hTF8N#cqr**sQ zSYKzn6@G<t;aX!m{LJ;HhU@ka*B#mi9obmGBV1q9!1buULkO-PkKx(}*9l-{eMs;# zhVY$Y>J_d79hOGhH|cpgA$)(tO*8-Cm&qS9d^grzVr!1);(B5c*TSFfa|`fo_dm9Z zXIO{A4;{=C)!tGZ<M-V~+LmQFo(yr^^wv05eKrpc*STj{r>^0L3HZ3G`ARaNeQQ-~ zjmkgP**bxY_p)cGLuu@xDzK+Yzdrb^(eH?k^{U&)Z#Ta^{O(pd;a=LErM-UI%hXuc ztes*HA?u;oaCYXWew|Bt?zL6*Ygw<1-Jy&hWNUrYZKI9~;a0-!{C0%(-cG&2{Q;~E zu{Nr?z3zz%c>4)_=-6cWrwCd1ZaXYqrcWcSx2rEceC}8H$wt(^WY)2@4&CZLa{bti z>O1zMW6u_O=yEQ=iG0W(`DX!cIC022iS|1xPgIY}t1guv+vK({FR%RcG0#4T71r%O zvP0{3^l_M9KfeKfrLez4Mn97s)|Mxchi1+N2K{EQ!bh$bEs=?S;9BKM$VX@EKBF6- z4kf(^Klj(AU&u49XP;|TjP90qZ<H7M_VXJSp8{)x&h-6Z;LD~!fYv-$;3pP!t2y|3 zm0*eFP<>WhdNPQAq*rm;5WO4qM|?!R!Ma?0EpDlAwijNaE%sN>qKD_%FIk<;vA<;7 z_?O&v$rU<gN7VlGO{~q_VEYM5qWg3i9mGBp!X)7^q4sZX1&2F`GroP~VdXQJ3Gew2 zMSuEc*FJp<dj+@QzZq?<^$fX!@zJDsgS!q&?keZ3?q1&Cr*}O`^Sd-tXP;kHee@f; zq};Dwt-O~wcfoXt{V@)@4dD|VZ9QP+-i@Av7kM7AHpn}s^)B@A#_Yo10Yfp$t8&zz zAKOpf3UXVb-bwg!(&{Xb?}%Rs_}8CBSL|=yOPRd*L-~7XOLh9caa3(!A5`U|lJ5yS z=2w4#x*afzPH*i?uQv3#eCaREu$DX{xs1_`HSZm|<IvVqXOSy#B>MI2LbeCt%QEjt z6OV9T&NhXlv$htbb4SiL;UId}d+uJ@25jfZQpig>_cRYIjr(1JVPEYy{RcmsJP%<2 z*PZO6A)o5U?&7YiV4RA0Qekb>^;vzfK2di^Z4TWz3oll=a~ppGyl|o903MYrGKx3` zRFjzmGFMa@?ey1#TghRPd{t+92AMUQs|@lnAUWh$;x~l+%J;4PQMRv*y!Q%Ul!u<+ zB9Ld^nLHN_ztlsy4&K?`Tf!mgDCL`+2W@3nTb<Cmi)Za!UTQxqoeRHYG+i7+vZ8O$ z|0?~5wtjF&l<<q~bER|??X{x!OW=K&{R2bz0(2j%+HGYnm&@GYF4CSdo|9vnZ4KFU zm|tqAzKLhtVPMm~Hr~5?CUg(#S7mohD}SDKf|1rf;~RLI_#V>w4KLl`FUx!MdvVTe zfnoZW#fBQ@xnFhrgXX7Q<L<$Zt2Fd@Lix1kAnp&8-jjajUXp?IEW9F^)Q?VZnrDpE zITF@uRVOrF?d~abMX<S9czPLZDO|pkzngTOP0vUC=nqbG3GPcu#x@$Wwp)L!U-0Tk zYp?a!NlxhdjfF1Bvh=mpmv_6_pEwL$NyealcMy9`drV26rakpDKBm#uFhAX^c}|~W zaum=$;(hXp#%2?ra9excqj7d3M?E{ZEB;dPFErQLBUc|Gt}u{g8-HcTfj{~M%;nZ$ z^+#pE+gj;9-t8dWcv$`7`F5Tc``zVk7axJcJLpq|@LKx3b&PWGov*rpWjoK?f7X7f zPi{8UQ}nSu3m$2Yx+>VUEham=kex71bf^6<p^IA8K7F__?AO*<ztV53UwL=C>eswb z{ZgG)_ioywFVsyv;H=Z_lMiK@5WJM4c7SP*><;#&@(pRLV~<aM(OWi_?905*UL4Y7 zv$VRMzd#$T`!9Tzy0$CdO89b%dO$k$99}R!m~yw*o`Gk<nc<K9(sj~=KX~DGc%Xvr zx>9^XTzJ~B98bbgzyn6}1`ilL&(8yI2v;F~HvT_=A73~Tj)WiKNw`@FFOhsi{mUPB zTj^s`c&3kA@dxzuUK{S&WX_|0M1T5L0<`csGlAU?=BG?Y$rq!$e|45(t<qDjf{!no z<5?<5exM|Alb7fnVNd=5cI*LsYrI!_eU7{bIG^&IbAnTQXn%$_hu@-2dq*3CVVhca zP@BVHo2~IS;g=T+XE^^adv2LcFvDHf+Hd9NPr)<QT=5CciBxUuNTGjAXn*zBzBjAB zPkfUzG5dotHRV3qCKxrg>ThG&J*MZwc!DUi23h_2p3cl0_^DdqDdAOj_{+!D(v#oN zM|nHH$uk-%jV_@+Xx`JgVW{U(_DbBCU6Y>2hYvk;S7_#&?iS4@Gv9I0m%pm?PvtS{ zOiv6tk5K;ffR-ahOPe>Q@8r8{{E_!}1RwddA8e79_~7F2$@g!T;q`amN71r%nmHiv z|2MVWlh2%r;KW48ErS)FF<1=-<)_{4DyzEq-j`S8e2?bTz3dMJKc=&RtQxFWHC51S zxmp>>N&&2t{aT*;cEgaluss*}F369F|1t2j6aQft?<Ma5ZHh0xVep?=_&#|`;=xu| zd6!>d|4gZbUJ@RmMJ3IiK)j{QNz|{yU73GJ*+1`j=Y`u2cU`!Sa3VABSW{c?ysUh? zA5B|dP6a%2p)X%}HV3b1AJaR<@9e!#fR`TOmmQGYC+hGekj{ES@t9kHH*{Zu__vw3 z*3B+(Egaw7qrJ7l^+%y6vKP`ddRD)B^6dj^-{9EPKH%k{E#FAttlQamAFWKu=-wzZ zU1%Q=9O5_hN`bk{igQBc33ZI@>ZfP^fc^7-;C66-r_PXNk)NTNFL9Rai=1nDigPVb zvWM{rWQsl7y1&ZJKb@2Bggxkq@jr7egDzITdYU${e_-Tf-cQ~=ankU2UwY1+Da^S~ zhWPj-ee5RfyM(_=81m@I)7W2c^8A02zL1{t*6EqL{ulZ&gdb*sIuhtXtvRPQeZjR0 z*W}gx0pFCIO^l-3@Ph^T9YH5rnji9_{L#O!cQIakYB?`zeJMT5Sj--;i9<pC|2KPY z10L5^-FxpjGb72e?2IK@RveQYNu#lFgfnqOFu4khM<21NlPI<Vp`^7w{Xt|~*mB}P zZkfn(5~xrV;{+GdR>+EDK*;7cp}xFnF-}O`HuSo;E=}+CTU6sfdI?}?fB+_XfB${X zkw)@ILTR6;@AJNTJl^N*kG0ocd+oK>Ui;(F|A#HlANSiBRvTN#soNRcMc>k=38yId z28dsO>)ooK__xr8IbW<&f40pxDaH$R#CL-Q^)Mwa8>BAVj$ZSat>?MPdR)Jr;=y5X z@y1jh?N~6Q9WTyo2jzwYoAA?#+#<nI827^}o^=-&W2klLi{-YTA_|F5T0F;*1L2Z~ zNLM@WoQ`uU8|O_ka7Gr`GEdpDFkKc<1AkMp;I#|j{r8DTkzkxi<Q3iLhZ#Q{^<+Y; z^7Q#}FM6`U#vM-N72EX-(*Du53)w*4Q~tP#g<MZIsEv{jY8Sj4RevPH#Tu_eN>kaa zeo3m0@Sn#2J0(y2@qfLVGvE~6hc8hwV3|$3gbdI)j&%ew0Db^2GN4d!EZv2ZWI(vI zRyZhbESE8z>t@V@*jwD2>2S|)ysv0HyG^!i>H=jWlm#Z~%**jb9)OQFXfJ;oav2|$ z|1R5bF>52p&-Wa{ZXo>&n#;$xO-w9FqxZgK#~ow!VA<eP-nb~~H5tL!bDe#U6r!8_ zc6>qcf&NT{=X3wz{8#Z`IfXaT_BMC+o(fKb^_Xsp19}S`YvqUTB%p5OhsoQMFyU&( zJp8_1`HG(n@*Gs2Taihn#ed<|spt5k;^($6=$jpb`#qeXZKZHR25bMjY#8Zl>C;j_ zUhwTR@gd@;$sOJo`T4X*k^Zt{C6{=+2L>IyFk4RT?QO0HhkN3?OY8mT1M%He_Bp<r zT`aUs+F&Z5>!;NOX_=|C`Tz#-R@Wl~oOlCz6&nqluaR7|>%md22j{GwIhNwPOR(`R zEjfo#;>%^jo{6^4@ct4%Tc_IX$DJX3g7}s3-3!>mYRi`L?2;$N`xoF1o%_%oM2c@I zmi!;lUL8+<o1xOO!f}&(=sEmy&)G4-dC-Y-;ss}%u?H^-Z*)zHyJ&0it1U-I)!?^G zVwY7jFRsEz5`P#SBz_H#+cgvH!l^&Sd9uA^j-K(2<f6mu9V7wIQ3v1dm^fFRHenxz z&TnweiSMgw9@d+gZZm4$$^1ccj6x)o<{1`ebhMK!EpxgFm+_694{=_Yyn}7<0dwD> zUOPs=8)sh?_)nYH`}J0t5zc50d%Qa|Wb^+dj*RfyLAx@g(p^R{*oVmeD)uM@>APa= zKPYOldATobZ!dO4CRJ9QW`Q9knCOpP*onQYhqNuPc!c}o9|@bnM<S-^5$-uNr<a#K z!dYGO?d4_W49{Wq=e$JdV3&P|IN~kr)5tXL8~}dF;BIp{-{)Q^ej0oby0C^pTp4GN zm8Tq8XYUrU<;WwtGXAFd<l?;xPQ(Wn96V&{%Dim|+BRfn+x~&J@UPWj*kr!UXip7P zEQs@~!VZ&92?-I)2nXzL?v-<o!gm^<*6u9fo<j9Qo@xJ(=+1k&|GrgrmD0sA1*ZK< zhj;S*wrnEabM>xg<4{k1tfIG~<Rx2IeXK0fiVw^whgl1iCcjfAJFE?_{S@=#WKDbT zADTMkhO^*VcsgdnmxqySTJt;4*O6sw1%AV6w2}=$|3$3Nc_>rX-4=6nHz+=>NdNQ1 zhf8;jMcLoL+NkAGtw%!_@L*qhdoFWG@Vz|6yd0V_#B|3Ab9DK@>>Z~OH!}te$5>yo z^ssIB^DD2)1o_FUGR%7;_;t?n+o{jxtG9j5IAWaYPN!nwz88BB8?iJ&T{o1or=SpD zRomd~1C8iXWEXeNUoAcvPSf6D=53ZY_LcD-<~<_c4bQes!{`cVfAz3q<!!j6+{_hi z_tcs2V`<t;`>WC+jRDE?oIUN$njZ(ebaJ@8<jinO$(alFhu?-O=F#>(9AM0oZ+Zxw z!H>^o8E0g~L<WzU$OyWSFicoT=nxj{rN>F1D+`W3(EY7>Bm2EO9mI217C{^2V^TIU z?d0rR`~QkRP!bdGC87&fCUQzjz|F2%!khmKnwIwOVjXMPhr@Tqrr;DUnt}s8A}f~b zJl>d7nyQ6L@$~PzW6pwypo25)*`X1_xA5K@59>Y*YwLx_!X;+dDS2tk%zt$(JpVPq za{&%MO(xH{NncE_lk+vv68Sm3b9xc!1M9ae?eASMf(#CGcY~F+$XqMi2762D1$VG_ zK{a~9vA8z;zN@&=-3uP-|APe&g<Z*VpJu?8Y_>82y0H(IZ(}sqi)Nl&w>~7Veq=!w z&L^x7Kt4o&-f!iR?@tE5!Twzf`t8`^`xv!o|C;p8e`nBPCi)I~GsgXD^LClWgB4~z zGU0Y#_S|mA|53iRP+@lHKB5Kvg+t~6a3A#Wp`<;-hYgr6s)Ap8p+kr``>poj^ny?E z+sp6KJk!xf_!#-R2I`6)AE+-n4)191StyR&A0vK@_%Y&#Q<O<9c$D8`{60mQQD=Cl zY)Nmp4_<w@=rypm=)NUwCgQa1D@$}wOt9uNn`UHK|CP)-YSys+QCT#eNMO@)KZEeq z_kgZ66Te_>=EX!)QJ>bzCes>=^YpHKiW>v|z}n&?GwPUQVz@Re?D?rgVt$jKp9>{8 z&t5q{L!6}zFk;m8Q|daKxUKl8-sSH~G<szcP4kO+9#p(wsBX`1XzOR3OyUwt>^*ni z*xLC8W8ecVUaT#GUd_cP#+r*p$C|kw7}{LlcH2ksV#+^$1#LT=Xe>IF1*1yOYL}%$ zQ}M~fZS$)vPJTU!#^RU3M`!*$d|dF!!XX<s>dH91L#%5QN5JC@c)SQ6@^fEwzU}jB zl5dY7w<4OuhCg{w-<6CQ)3CgvbR2t97U~Fc8@&^+uda`GR@Fo8ocMS7w#l$DeY+qO z>t~eB=gA<CbZ_BhvKi#h;yr{OLJCldd?UTk@_FO~wnXvx#P{JdM|i00G(0{x4G(-u z;4mT_s_M<N&<!4)=bDJwkXj-;MYs!ua2n!$KK(2n4q!9x=YZF1*bSA68{!>VX1_^? zevogW8lQrE3EDGXijUJU*16*dyPz$^*;U<7&AHW-{3jv4p%OyxN7fQrKNxhb&NG|- z2Ah#Hi{V$uD?bx@AmsAn3}i&QA}dei%ItUQ(;Sg|sLk*6f64A$yPWb1iMxe)g7!eq zBV53beUPE0#Ou49`+3jz>M@t$+ro;Ew0Uql|7f6T!3eltm0b^IucQq7=R=ak5paHC zI9*atKJAygRrL`6r~KXl{Hux6`jqt9yZLE<^g6=p^GxSwL~q`|#QSQ(XQ$QEX5@=J zLfKjH(`xc`ljm22@{fF(=O4|;e@O7i+g#ihxmIbye>hcA&+iN}r+PTmd>g;j{2Iqn z3r0#z_&Eo=fi`?Y`OQ3J&23iJq@)9l^Re)f@?T}(jhuMoSD7W{&i#(-mZ1~4IL*Nx zaoH2P=>_DQo9QiiiM90D=p)#A^T67J6Tq|KrR}WJ3S@EBKzhMQP1-mb(_=gXDNi`6 z-DByJ7m=xq_l_Ghw?+S+wP_JkZ)HHkg4ZVHK|=}Ok2WbUzGP*dS^qFFqFH#xe*-+@ z!c%pFD|iIBhW}1<6s}6k##Qf16MtjdPWu)jw!&F#g(Q4#3d_yHCFP6_+Kp~iU*{30 zJ6vLfG4(NRxmxfP51rZDY|m=o$97cS%8{%*%<rels2pk4(9g+wj$}P!V@pnVCRI*2 z9Y{A@`YI2$N3^)klz3?%XV$+*>4k21ui7VC*fi|L;=1s|ic`4@wHq9`OQjQErM}bI znN*(wPyOUDKdS2ARdmNdL(x<HeMJxLX<V=uTH8AnC6^@sL|^pl9q`{n#YgdXlNUYQ zfgavVxuby|R$ldq^fviB$iJ7oNB5w^q1|kyQLcw_Ba}OlT~2zQGCh<Tq09-&JXV|v zzhCV_Z@oY{_DB>B&CvTV`1L(T*=~(5$`7ec%$t9S9FJ?<jH->jB`?zEezi@{+3DhU z;IPlxlQBb?=Eec+13Tu@%~~IiR1ceX$5P>%fe-2Xj!@q78+230G=Ka+C+iwR;j4wW zWIXfe*OBKF*mcOfa6<jF1m2--`o?G+yY?V-<8F~nzs)$xV?RYf`~l{F=v#`<=ZA~d z6!9zMH;>;H{1)=NoFBe}^<QJ^P~w+67>rBlU)g?%h9Y>X{T_6B4d1wnB+?}X;uD+h zE{FfxKj-<ZJlVuI;R?88tTxfOAj!OyZ}co!X^xf79_mDA^_tL7n+Xv*gbwrF$Ov@m z@5Lr<<2#qVrhxYX!nuTV31fsY!a~AA!eY^sXB!SZvfzTUFvsQG2e>aO&sjGm2XlTm zOAbn=1Tt?@h6*-vu|TqiuoyXcnd735|BZ6e_J5sxx)v@zARF%UWn1C-aIqb3ll_Yw z?8)V$my*SKX2UYheN}KDyYf?RvQ0;A-RUC6D?AhnnLUlojp&0Y`hfXnCcpbc(sAa+ zmWbaR=b_nVo{Mx!rkqCYhuieN`17Up$Tic?8F%2OecO7D_=N2(Ws*Jk6kX)O<%fot zZ!tE-7knenMLxJn1HUce4dwUF({0$Sasgby!bTm>f<HUEykJ`Rg5kkV1#qatKC3R( zuY8hc;BIwf|E}hhl-IrJZzEiwc8c!uP3m4Y-Or`DHho-VcDa>C7SA-F1AT#i!uExY zpO<=rzIfF3MTEYv<>(8)9P(kDdL8P#O8$3^d5vb`PY@r*XV4qOd;L~&61?99-bJF( zP^PMWBvW0FOu>Hid}GFWs1A&irYM=(1D){GnBK;cm*}T3{u6710{<jwQTcG7^Ut&5 zPY^$g_`E$4e8LWDBD~1({lpyZ#j|C>z0x$emGL5z8~GZ3nG86eM<cI|m!gYkqV`kY zZ0gIO!l9^IxH~!UhU5vdB+qPot8@$B^Z1^X+sFcAn2R=;`I3cBA^gR?U9|DtOK8(j zZ}ZK3yXEJ|Kkm?wPLlj>zD>_1<=%d(!QSTEpp%AyzV%fwSjPq|_&T1Rb(sFROum=F zHWKNp!F2O#!2s^+fjY}S3&7=gpc~Z}X5K?}78v~iTze<GXe&C+7%Ov4QB}%`W^DW5 z>vsj?Lik}D{mhOHkFS3(v3O$KZ$D*{WlJhT;@ffVY8p3n%V%qJ`iTNa)Vc%5&B z;#)%2-nQU1@j3gB3KC7MBi9w5W310E9+5m8Dsx(_5AJo%r@$R5K!;-1-ZR{f{hkG{ zdGoCH*OiYI-7<9OUi9vq>SOTXuc5D%pK_N8rl*Ik?_avx>R@#D3o~@L)xXlc=<XL( zj=h3;pGe#DEOwn8IG+M$U<2$#mmdVq$r*4yg&yAtoP)qQIk1T{*egrz`3LsIm9nQ! z`<^509b3e=Dw3h9hbpX`{SY$#5!(DE_746nvh7F9%f_G%e!EiqcGdX*B4d={zQrUu zuy~-MRObx}fT{Zzmz%Hqa0CNblr5laoU+U9cVQb!wO>zXD_qLe*!-$fGM+Nz!-vG4 zPx5@C4xG_>1C1rRGqHkiOO}oC{E2$%ZReLRsUE<7=8oA4$q~j@HTn6DSjnP+`V#qz zE5y@dynll8w2~R5#pBQOopF1o9rclqv;vI>VAoPEl~pcId>lODdm2hEw>aR-j17@j z`Eur&J#{6e@<&^JQ)jLyZt-{tNy6TiSRs6T61<XQsgfl1RDn11g_0WTS;?L40p2yF zEvK&K;J2FgHf7<rlJ>F(kl#%u8wXaEbTK}IcC7}t6ltk}l_lLy3w<_4rzX-wkLnQo zi!D=c)9}NO0f)3CX}a^VB2>PzYz(-(*AQQ0<D8V$ePh5i^D-%orKL_@D2^rPIPPr5 z+xrrY_4QL}G172fO{Ue<?;UKew>mW$TjG>wX5$<BQ>_!k`&QS-b6y|R+<!35xZ_?= zbC$bA<u5uGtB}6{S@s$>vuwGG%=6}18xwo<0(MW3R&oj-z)Q<2^eu)>e~zp?i=FW- z&)BgGBK^Bcbst|b?bUoFg3VrqKl59puV7zOyrvgk#9kM#S($_F5a=f9EN{L!FD!XO zJ{NnoG~2F_O(A=t&@~^nGQ1P}0ox+c=+^7~Lh}nbMKrhQA6zhk%!`a-Uyo)Mj0|N; z>ScQqp24QRjo)fCTf6M*i@}oqz~6U+;O!kYk-dB$S30CRO<TEJJJw>>E?;Fri9G99 z$(LS6w}jCJ6Y`<skH?b7l;~JqiC&QnKai|9mysu=`zlSu^YLhZ1#($=!pT1Lh<2Q; zVNCqb(z2lr^z}{E^^dU+1+NKoo;VW%2VmKL_4Eg0wjI6PF#pv={rq#<V^RGq@~(yb zF1=N=?HnOTYm2#E^wqREg6~6_+&@KsqR&idl#n|91R83ul+}mCMd0x~#-l>kB=G~J zORQV~;|OE<CHg-@{MXRcmB}{qQRTr`@)G#v^<!(3{|>@Z!aE5U5w;K(5O!RwAHw5y zts*&^Daq3_VFW+a_@S(Q+gk6lw6OkW`P56!3h%LbB`@>*%9ts6l^?$Hl5=A$Sy9({ z=L&q-y0d`uKFHKIyY3k_omE#Ovm*48&UJhAA+-5-8R7Dx)=untBzx1qYjSV<KzYeo z?OTiYmAnd#Si{%(olQRwtVFzo_0&y2(ELaF1}aKk8Mv<GWz92KZz*%u#@MgKJ>A#_ zW6Mfj$ul2ZG3J(>4f@>XqbzXCJ-C7j+o?S9an4}ayeaGk&OGYeJNF%7GvB<@M9NG} zdi(cHFTV50;%AwIo^{xdjLek}J#6YT6|CxCQ35y%)XL-1LbE@%#0;0tuIjMgb1OFW zrTN|6N#qQ;RroZgE!agLu4yb3ozGuKJ36@@%v`vrig~ctuRL3t?k-IQYbMaLINn>d zsCWo_4?3C@?bSXH)=mOCP<M-Cv_J2I>kMtx7}Yy<+cgHkWDILf<T&sy{B7f4-?G-i zzQjKCUiK1ahRU>-rM>$0?rruUJBts4!=TPyBsHhizFNmUQsxY^KRms!Vj=65qQCYo z2tTI<oAf%)TJ#pI4)Tkh^jVQ`CBE9iu&_M1!MpRf$qHn^5(}>`nXk56n7}K%-Z1-; zU+06nE$nyLbBb^JJFk|${yGgl7f8l=1kPWKg^P55MhJf3KK7!5;YiUH{7U&T&o8<> z5t(y#%oM&hYzoiu;|}ejJmE`NJetBjaJ;h^iAdpnGv4*x>OA!c<xjERn0*K0ICq|o zk3Kl(4ELFydU)90ziiKBa37<+f0DSGew|?fPvTzDe)f3ZoU_!oJQ0~&ARH3WxpD8k zu*rKb?6L3B!n^Hzr0`DOYlWMApI5j~>2|!>@`ca%<wyMTM|rOa(lw@Nr=0+Z_OxYE zhDg@<eC8@tAA6x)SD(B;7XD+M4H_XQEN@Y-_^Y2WAeiV_ttsI1)44y7mV(t^N4g7N zq5rvqJ2c9>w|0nqS3c*Aa1+jw1NiGg*|=rxztDQ`G+b=mPZ-*Cmm{3u%ga>X9{lRq zm{!)Yc3V17USzN<i)Z2_UI8EWnB28OI4Pf@9r5(Japj+e2lGDBgs~_*jvr!QuhyBN z$@DR)JqW>?-<KtGMK9#xQE$Aluxsh%)9O*`NV3P>I~znE(JCHce{M%<TsZCNH4ACi z$MnstVV=pmQnd2mF$S~F5$xGTUhO$Z?JJ|)<toGcnR#{9QEZo^H4P@Srw#uE^&}p( zdsf2Onw7)E0jJjMgCl~uQF1+~hj%;92iSvc$G!jV4B7ibi<daze*(us(O!ATzuJ~H zM}Ps2yKUUY0N&W3eNTFM+_HhX0?xEhUkmL5Cgp9KSD(&qomanCmb|+2B1l(R-8tf1 zhdgsK6>KiE{1D*d!NZ16nYWLjCxd!~cQ%}?b~3(vItcbzt(%4a1s=z)2)}IJm#F|o z%_OZn+&4;o25lYAaHmyD^Ub>|os89YrRsC_D{xBmEo@*+^*>_?9TwbkH(RJpOZWKW zhXH>KqzhlGNpl8}a4cibvi&-8RO?~E`O+%8ejV^NG7jENO&{y~upc8Kjb&(<uQ>;8 zx#)T$<BGd;;qUUoQ@VTBX<=+JUUfgJ#yT)&Cu#~$3ErjQcy=-4*YbYi?S*Ho9xM0t z5A?NsRt~-z8`PsU=y*E(-9(IjYBCE;s8+Pp+)Vv}j4H&&lRsJe*vf`?;Rj~?P>1C$ zW#!r9WAck%4B@o&iWz)c4lfJ|7s)c@?R8$;)bE#W-(5F}PM6B#%O35MJ|WpTDSzmv z_})2ZrCSa$uQ;STUxTv<$RX`{iedZ4`{puN_s){pwxLU$jE8Gt-rRyE>F~M4d%2sk zXl`j@{@g0RkLNLuh){0h<T#*=WWC>}OP-sY?EmTYPJ<<#H91~dpf7oyqyG5u-ZzTR zY`^|`b?d%l(aY+L_#=h)$;MSXpc8vc@A|oDMt$Dcb3NHhA6UJJUWizo;1qF=u*m8X z_ORs1#>mqDo-SYvPtslEM`J3>CZoQj^gw(Mx*I)Z`Hwqx?Kz_HBRbo=@{@<nt!m>Z zpE7HuPksIHeyd9>3STS9m~ajL5c>Xy*!J<U^1|2l9Ahzq6_nxf!e{oB7cCrfi}IL* zhK70GQ&F^#zH`i<uz#td@Xz4!T<7b|x$EhD?g(HUhLo0Px?UaXz;@tlro{^!63N1S z&W@NJ>y*nMsGv{O2Q7>(W5>Xhen`oV+q^_Pr8H~Xh-b>PbO?EPuL15zqLX_SsN+I# z3NxPVL0+#<DCg_LDS1b`vG0D!T+q^hy)bitdzdoIopGN}z(e&-@|E|#F=(IUb%E*n zZ{l&^-grZqnPrD8ho=t1ODpNu)yx$P{gr*s{U3_2m>U>$tF?KVyUS+Y2XCz&h!mc} zTWs$q3wTeoQ=j8k2-X*(q7OWJQzBY;3i^KEmUW8opB0{!kEYtwL%S5e$0>XjITl8r z_;&T?@5@e=&Y4y|QuvyQOzM{Fc<yE2I53NJXG#Ebi(gls4-=m<^u{N`{=PK+fspKG z?2OCC9QuMi6WlZY%AsM_Ivn#Z!Z@M*c4@#5+=qa_&-UB5Y`^hLJ6_|<K7pRQO?Aed z*ZIz$)*8WIdHk^{n^*Ml$3%nZW%~~r1+-BbG%i+}-=<hro96zScz$&f&uR3T{okQ+ z!qSKN1$6(V{I2NhW7I9#P(a&tXINBxfiFUL3Gm&H&1aAu+yPTm08Mp26{+}*Oc64< zsDSU>rR1v&$^?5S@hupY>u0@jAX>y86l^!zEI%4_F7?)Xy8eo1*{Z9NODlan(G<u% z$-G0HdzL(!<W>07j6a0m(&Gg)ZuNP!l{G%ig`XXJQT(Nyo-G>mhsKTVk2S3I%MRc@ zNSiDdnfTeHjRFnnPtA9xWUa^Vy?(#V(Ky7bYUc?-zARY3oDPe5o;OdJw%0jpj7l!c zHXr9K(J5rJ_6ENI4UR*PqjnG85Vq;jeb52D`LsESK0TrNDYpA_CUsagrNuQ-Kj-We z?>Y2HY1tn7d{2E5`}Gf&VMDM^UsSqhJ$>3ynxKzzW5-y{=`o?IWB9RX6LEFIH}-7k zd7h)OW5K?N?t{({XD^PKC&*h*UhTWNpWh1N9#&eO>HZvjJI?!GXTM{|hl}f+cPWlN zG+kD<d3<qLw#VXOofq=%TY*0~!{?mc(*ZxO4E387e%N$~^_0|XWNu`*er|kEy66h4 zI|%ihxNUA#d_MD|H2XQzb1P}H<1C9+#2bE`H(WP2q56@-8OBM1^u>=jCXcY{QHA9u z^a(;1svMpjJrjn>Q$QFYkHRSN@V?EHqi5oB2Tz+j3G?=P;jDf_KTp1%Nt;ccm4pT4 zQ8<VAm42SNdM55N@-!31$fIx`@y&joLOl~#M4meci^-#KKJj<>c}nz5+ye465tfoi z;pN0P`FR%VnYb$kPlu}s7wz@JxAYVGd9KtmX;+b_me3`S!ZPA({XFG*Ca!`!DZ)5; z6jl<Cq_Ff!=$W|1<Wc*o$fNMB#0PC(qG$N!3F5D&zjU6<VcqU&@d*88Y+t9(?`zq3 z*?pa7wx)&~>0=Lu_Pgg;egGcNSBUSa$MUYmjQ(Wb%LbQy&%D~+ee1Z~$q|vQg}<<2 zE_U^D=1<zsCLb8K*kbfG-{(>~<?_grvd<B%nQyHEujRovD+J3=%OgHd?Ges}nb21F zZjyh&>(h+KD=yjI@WlP%;Yr@^wzLWrGByR%(!=_Kp(VVn@kRc{-WUVt$#Isn<4kyI zj4{3<c5FGOO!SKNn*AD!RlTO1HfwKy)s4j8N}N`aqr^pGgVLSyJ$ElueWY(8K1x_J zBmOg#tE3!z>`W!Ua`Jqf>J85oJbyyZz`0!Ic>lDYmf-mhvtiLjXSiu@m95h?A^F+k zZMlPk=+VLU+(D(Oo%@H)AMD?6_90K68YZ7;fIi=cUbB1N)NYgFJPqlzS?f4y@SCr) zrp5YkTl%1a)_Le-$2`lr*VNiSzT5EY)%D>C!@au3S?CN`7z6)?1W&NcY5B1^KX<Lx zgSP&w;(c8A`nc}R!u7M@Is~pqvTz-`0Io+YuENp7SKmrLVp@`AeaFBxVqUkr=^*dY ztW`O&XRG=4i>Y&G4~^Knc8=I}D-XASWj#8;?TC-tJ|DMzS-5=;+zx`<Gg-JDyZ~;` z%)sq3aC>GZZt=8(!F?WH&t&2Cs_=qd&!~^tJK!L%G<F!pg<;8R;uk26U*rPuk<4lQ z*T@Ft?c-VfLf&Fq9=Wb(%Rk6=o?{n)5kn>&&5qZ*Uk1H7cQMcV;EM?36@3!Yw}DEN z^{fHyGPzF<b4O!~=}UZwarJ=ieKv*IPWGHT&t34@e-(dIHnOKec32^6QL!@0xqHBm za=Gv?>v|?ya*TZ*@D}kQt#R2iDcD>I@;$lVTnQd&=v)oli3G5KaV5A^e~L74Xcvsa zWAdeCn2AwyUB=2I$5`9x1M(m7t=VeLLFDJuI4Lk6>;PtLAU)@0;NORBQSHgpkoJ8$ zq?K|Gvxs^YRndN+O8?t)xUn|#mTY}r+-B0Yt;|aWPw*+{YA(fiWdGWfJoa(AUO2HQ z{+w`1U_+{maLdLEd&mVZZ0_z4D*aM&Q#xT%W`c)s1+RSM%Kh>~v9H01U&xb^KT7h3 zeF*H&=-#Kkw!eDpil}Vj?k6N`WoyWe5D!ekZnHLrwK3?=O6GXt*TvZU>unp*XR?X# zot=6Z+m8A3N!C+Oun+Kshq3V<#)iWdKAL3@zKlJ1LhZEe#b-767p!;EpX^zW3?4Vp z!M|irDmn~2jFEkO6#E$aN&N?%?Ki@#oaZ}XQ*$`ZomRkmPT^14W4aKWs;1el=_$WB zeLGiku^?SAWM8XJ^%wpIXH>pD>Q_Cg8ybBFT7@(ZRE(Zg2krCDCJs&dq~+%r#LnG_ zE!%-D+k&lo$Dyy9F6`brX?HX2Zkn?H2g~%0pGo`w=t1n@A^dUddpG*Vj(=y(ICBkj zI`Oy4e#IuP4(9IiG4pPHWx`*)wuEuW9lG_(Tj+-Bz_kndIPo?UOL}`Z#pAgSI#K#u zen7QVeVS*s-3(ukYkW#3%NC`K=5#q1%M1T;1~#N~wX(AV+u7cMA$kFGmH3je^!wTG z;G{8jKeiF`!oYT()axrn`^Ce2KPYJ;fo_*xXWv!`{37fXbJ!z>ELa5cC06Fx{bKbo z?|a9m!}>OBg#1zR=8%`~!(23PoV<DDokiY!^3J|^-pEGs7La!idFPV%vP<M`CU1<q z^T=CB-l9w7Z6R+ldFPY2guDwbk+*}qrR2SwybH;D#U=9IN!~@|eG7T7Brp5^E=mXd z7|89gDI;$=dFiE#<`vvHc`M1AAn)Q!<W<|M$op3EE+OyL!9G9fitK)aUsjHu4sYBO zN3QKM4~l1yY1%8%r{_WBQgOYVpJ5|e+4p<mAKxBaDLxk8*!3)UD4TcKdtE$OXJuvu z{J2281>eTuTg?w;7e<JGD<S7kg8L{Y`B!H&Dv8JTp5p60;zf8e(0e}qM=lcoR1gmx zJpT3fJ6?ni&jtBsz-KQmvZyWh@xhhYiiB#nZ!4Bc7eRy7vTODqG?!cXIi&jsnFAyl z%hzFZDgRmSSWaUnSC|B6hVu(^+0zy^6ST*m36I7)8KddfHHIrkdW{*$P@X-HCAkwn zi}!Kw8snO@Ms&wV^^7b_Cp~$=*@KY$Pm}&Af4pa6^dEGzW1n>PV$FHQ;_m5CS8#ym z`KWjvsGH`aqMYZS8dI8=*YiW#_c`N&CEv9(l%$RLI5W(%=^x2K^wdW5R0n#h1wC~q zdg>13cr$vcDN9dv_xE~j$&!C|56e(*;jhBukb^&Dy<JyEzH^tX@_T+XY@=N1F40<l z@Rsh(wSJ>vr|?4OEDxg}>d_Ciz|uE^Q|O81?5klu5xUYl3&p;^%(U-^=sR$l2kM(} z;#vQ^#`eZN<%PfE{kMr14|4`uyz0dVI0f(h!;FRW#LLxbq<zYKPI-eoygw26!tkN7 z9?IMyOn%NI57iqJX|>-;C>X#mj^4x`o2PH|2KwT$G2*Q*ckG<QSU)d*IPvIMWl=GG zZ+&O*&r3WP@5T0jFGARg<;nfraiixU<L-ZgIhE`ib^~+A!mR53Cc<8(Jmz^Z;@B^| z(7~pUQ?7FVh)F0N-giwS{;&;pk5%qtohC;xJ)4m=spn0IdcQTa8!cnw3!NeOn|JnM zv(E{e9h@{*3<+<>lPetY^)Zj``m1c3+O=i)OnV8Yd{pMWDvSUBisACPiRJD1aAZ%F z&#fGG=f;PLA85lC1UBQ1wS&2fAK+cK70=8Gy#DgnD{3qs!`E5x-z6OIuh#}?s!MgU z4$))l>#*Z2cQ{_SgSfkcI(fcFd%eip3tc0E!}9~!kc;r)H_2zO5H(=O5BQzGj-Y+L z`1;A`ttXS0eTJ;v`}ZX3y?pxGgW9U~9w()HJ-qfo1Mavhr~#*)w!RkV2t6)R)=^o@ z-`H{Dtzoy&JKOd|etkB71-zxcQophGsr6acuGf?oo`bi8^5;ae_!If7-?)6psJzC9 z@-ohK@4!mIj)##+{#pofr5?GGLax*zSC&g&um;v7I+td+DL{YhV@PtR5EFEJhL`7D z6LC|#FEb<T;aFuZoA2ryxBMMws=W3+COn^YYQ1u|vFZPuiS&P-IpY^h!RT@BJ^V}7 z$^MFcZGX)@m<L%i{v0yt^XwD(f>}g*jPzpCOG#gZZR-|~O#A>IcZHi^_5ri+bH?fW zyovOE!Q}Lfn!LU*ntVPwT+nxj^Dopf@|VUL`709{`D>Fi@&f1FzhUx6{>BuH{0}o1 zm@yxw-IJ3IGbl@*2zh=%y^)|^<*Nk)E`nv?dAKMp_=8?WdWJq>XcM#X5jP_my%8OJ zoPJ7ulQ^mT8`NjlE`t8y)J2ZUWT4LwGyrA@cp>iJnh*|(&wS2=ls5F2#N%7>+vvQh zHcCffhttkH)nlG>%Z9#AJ=9VB9Q#lBdsA?fk-vZX;-CL8RN>v}r}xEw_N(KE{?uVz z)ZvV+!~NAx^3c-`-yd~YA9YxdaJb9b(YKS$U^;h5cX=%y;TzJ-OX4}93E?JwN4CZW zP9tx=Z6d}nC-cr8BZJ(s)ch86{bx-Giz1Y|zlFhJQo*m59vg7-TNrO_VjZHb`}hqq zAI@)a*c;H#jEejGU$03=3XpAvx?>vG+*J}!Y-e8~`_Y{Ya}@4{hqhKXRpY}Nz&_C) zlf+&VO041TpO%U5sjgJ0#VmUoSqm=0$NB8R%G9INaZ-C!Py9C0|CT*|+_m5w<9x|& z{Mt(6#VyF?qgLi~jz?piKAN}S*|8t7@BXyjwNJuft<quL-C^H_!@X(_dlVhkK^)et z9rg@5G4YW4Zt<Tv-dd$}`<Kx3hmG!Pu=GZMEdZA??V%E_wI1Zt+a-Rvo{@)+)uXhZ zI2XBt{h2J=wcq@gT~C^K?iw~X>^f*_cYV&>xa$CSaA=-Pe;qpL`FsyCSJu4Aw$q8R zkCS%Zl+{-HQ2I@EnQ_{hOIsJy)^hJ%G7ec*k1R`N-Kmc}t18RvA`fQ=wZ>{K2yA)m zgA>*5CLen}9Ouksp6NNrT}3A>A2V0B{e4rUpmd0_6)9be&&sgsQaMT(@Vbpdo@U2g zu-uG17lOqd|F74yM<QCsv-J?hh726!3!J0UNBj|D(|LQ_{Ixpzihg{kEL8}Pueb=0 zJILcYc%1Lp#hdb51{~~^lqnZTo(qa^Ggn#M>mxd&VfX(^SCB`X?!AXg@xk?29n#-R zB;#w8P_XR&G4$0K&y<hBpPFNbw6{)u#u<{lJhMaJ?I}fv6H8oHn&N?D@ZbKU((D*n zlQl+G3|6N0w7}RV75oIhgmoazG5XszM&ZNsj+Lyla&~(M{s-jmRJ?sB?aI;H>>B8d z^}wn!`BX$>^q`xX)neZ6kI(bu1@-u}oD*M}-(sRwDb}RaZ=#oN+ZS_8!56VfzL;xt zfq1FXY1?bcqqbf9)~U9I%2rmUJ~q8=Va6m7WxpTC?ykn>uEAH6#O}6t8q(*kIpE0! z__~s_B~~tIof6tdu`Oe2za1|J^6*h%C#{W@4W*2MP5uwuRaT1@N%R`C7rVK(kkOhp z@}cA>>UX%u(mPz;-*>uhhZ}2Q9|nJVC*X|4jz{#Ka#~EyMfh!ia<ak42-RM}4&)sx zmX)dAmT7$%X*CgKgq3B2t!L`{<7(!=;IvP8%I3B6$@W=8@Sf~Uknre)-EY?z;?aqT z#fQ14fKYAMe4xPeJZbH=l>9c*Wu7m|D>Id*ytM6Kl_wjX_^Q9o^4FZ2#w$J)kA$uk zeC_M&J{DueR(d1Gcc=9oHGA*nMDcFUw~?M_?p`Wb+3-}4#SIwe!w!G<O~8JQrqS@b z-wLc)Htb8a9XTGlRNIvf%wo==hCYdYWqe(0BJ7L|Un$=$a_~y^i~Q=`@pL8UYHa-( zJ(D+yoqjdAWJGUtz&r!Jq34g!kGs2&IOY*k`FMxQQ+?yN?^^Y{+7$F*Eqe@Vo<L6S z_xje<KNR8oSmh}1(m(2FOI!31d}Hk*>B4~C;A~-L$4!m_%AY?5OlbNT5Dhg3?p`At zFEs}G_iGH8&?sRl)bfU7V3BlsOU&Xb*m_2<UGT0s$p_?=boPtLg3?-~j%*9gOqzHf zzi8;o$P9f4#Oh3R`XY^;(Y75O>`$-mZ{N}3$;;VIDywp%_?T4IqgCk3e*TSq{*7M# z{IfP6d?($?_vsjCJ%5{JL(P@#B>T(SPf5mUBXfXy#!v&_%)|~-ey1tJJ`n1?7JZPK z_=(C(1`T-Q%+${Ntp|zYuBaW=lG)c^`^7DZ*xz+)oltTO8D1cHJ=(;)A?4W+gvCMm zKo7(V=`ZrDoGqjLYnW$HR_#<-+s<wDRmTn&dQZE*BHqiKMZdJpzZiRN!^%!*CVrED zMKpufR(8q$6Fn^r`*y6<GcaTEz8&1}Vs(qoXIT9$oh{vM>7T^bWj~={l`!J4r#>$j z`WpzFeb@!n%nd`(zMA*PdFNb<eJ4G9GW%WS1|rdF^_OJ3&(qfTa;%&_4zW*XMJ#@r z=U9q68~DpJ_vp+*>81F2pn|dy%Cg^ljORDQ(}IazX3wXHZefpa-GB!1M`$-RP}@sf zYz=%;qQ?{;n&)S<!|KIjj)|-NrwM6;)lanH9coJ|j9zNJupI=?*>Yoq7JvCXd_8Yk zODj{mTBhkGOUrn)dLSM?iNEi4$td6UiCf#J650<>%8e3mol~<49g#Qjy1tvPw5n%K z2lB1hti)F29UH7bHsFWiF5Zplx?=!%npXud85=(|{0)?weYS4SYWnLx)dQ9A1?!Mn z1M&NKo@k}9X7RY`iVsyCW3^mofWxM^``e}LJDOf!c6sX3I&kQX`b>SLJ}b_szaE;| zU*EMjXdFux9b;cwg;|}=hv<sXG5CkOB`Qs?n>fukA7UB!u+3#{@t!Z3h<kM^N*{jq zB7I1H=n+?caE?&lXkmY+-=EBVC;RiWRh6mT)BBTIz>R93@XEqTe)YTnCm$cqfm?k3 z2loHfsR;Poe-V6Wi||Rdn>=_@-_>PRfHEOuKKM=IbH7`e>YI)aw%X;wCk0bnAG$Dn z(KDW=U+eHwqbH$fQhbR#b5+MOeBD7EPAF5E8k}B7c7F!rZ*Q+@jz8eIfj<}?iS&Qn z@{?r2&(#j`AT<7&=sU`@%8)<cwXFO*qvUt|{J#qFt1i$q3gf*_v(;6|g7}v-ulM&o z>kJ{hq`l|f_}@2!pF+1j+>887hs+_uf%5S2s<b%{zI}qtxO@THkI+X)wJ&ln{!6?Y zjN#&NBxOEAd`9JwDHA$pF8dq%C8xjB9F(lf@&(^0c%pR{U*s$9=&(5@+jo4wId#4* zyt7$(E+sdyRZhtk#zr}1c>=i=^w))KVR#~KVZJ$@Kqj*uyx-F~qYd6Tcq5+3GduS| z%NHzej7My@iho1fKlvZf_OM`D-8UrvZ1@Fam%V$Cb#rHo_c2#}9=35+b>=vJmER-& zcnNzi0-2N5huZ%XI#!n@Z|bw<&Cb7gLwQ5~f%FV{!@KRvH<mZGYR?7bjgQl54<BFN z?EKyv${WfFpGkSc^RFRq*oz9kzB%6V<V~F~Z`Qmyd6Q@E9nhE?NQ93UANBZ3@++%P zJRJ_+$c@lx!YLhoZ<WO_d<h-ymm4Freeec4T)2SK!|)Nd;PNu=TRIc}HnOA5wCwHV z9)sRknTeLNe~bAovd-*s<Ig;5OmQ#zez#l3cey8!8LoINe)>(f;{(X16RCg4b_gCi zA6bVM;~tFBwdNpeBxh=!t0roMJ9n+iHz=G(cj1RACx3+*p}j5G2uEpK*+{*WnVbtU ze^K0Pa+J<p+}zLlBQt{RgiiM{zD`hw%^wf{vl(IB2^M`Af(C*)q%k$x2CR0zHxuVx ziAuA)dcFP5MJ?Z|o(&Dlu;C)u!=W+K#>ivs0{DP_Tdh7Z>>oilop)}Uez3BB(%xns zBs=?1aE^Bb4#5{G88P@o^igoh$DXryWg-jb0n^%>#D}DNfWw`Q*i~o-aMqm$vdiLG zcGCtx&6NGJ3EZRmJ-IPHVr7OuM(;iOMq?DY8dn{RQ5PO}(VxH07_AdNsT{_@*Dh`o z%p6ZgheL7o(Kun&c>0y-o(f-lJoWqKMhV}{coID7DaFo=#P^%mM(da#4HI?{?h<W7 zeDf+4;hw07Y<clrp80SA@XhFc(t3^NE_t$_ZGG6Bllt&$$;#9NEz@jp^`ZLG@=ONb zOxm*rtiIyAfARe}Uxi<F*GZgjX~v(qov~ZT*kzAR|8wCp{l~&Df@jQ*5AJ1|953Y8 zI3fK^|Fhv2gE0~h=ZNP`|1p!txR3TfYaUnq@D6uDd^jbT{(Gtae5=NiV8q*<opEQ- zA4?y;b@XWX%+y%Q*s-Mg)K8<T_gMH8<xcwVr+m0ZZPhqX+Yj*!|FcHopB<YzhgrjS zP*^Krp0BfHI!C6t)Dxz*zZW_`O+PWe()Z|)9jDCg+?`T)aJIv`2@+(Z;mj@Z;{z46 z-H!KU+1_KuN#2Ak$(^*J`r^Bpk34H4d!N%7$r#<)0G>@_mErN?Ve<bGem*xm?%_OX zr=5~KMP8gzeDd2`55QkQoA5Kem}s6ji=ES<whbhsqlLzNz%l51$DBy~%!D+y$I7Fl z><c`bsL#2Kc|tsq&M}Phm*Y;(S;7|y_1*#>IFjx0^!HO^5%UUhFN}rFso}6W$?xyS zip}^~p*eHFm~W2FGbhBO1CDuR@w1vYCd=>vaBk7OqWVWtI@@nvA<S1u8s~0I2Yiqt z9|F&3fZgKr^szDUv9=2MVuu>RNPLrav+qgq$VGF&F*`}CL2iO7a*@6_zsG$;#MyQd zUwG6z2ZWqG#XQXJ#TI{K^IN#JIT^z^YkHV_0v}fY5?||l)XIJ5G&+mB)MWz>wBw$- z-M!lRPL++LpBIb~SA0NwE#%+(uza|JxmxEk9oNH$_}9Q^HSzU{2JXo4<B6*;Fdw#S zyyW=@;Upg5`J2w^BbAquQRr7>thd(&`h^pn<~54XQP@8M&D+guz>C$Skqf)%?>766 zymX9}CByp0?=*eu`7nTs593?bhr#od591@t)wWC7;?yZ0#<#2wgJ&y$=#NSHa{=G< zn~_nrukjPe$ASK-;d>Epcur7bTRuGXOYt%G@?}{6Vmt)$t-m)qid;Q0`cib%i=UDQ z(BJln%5r8mR>e4EP83!9V?*pi`Ixy=@byj}eOryaw|LNp@dbR$^aN>n<|8}f51BiN z>+qjjRMvmqNLshW@3d!<+dZ(yOmy%$_QQT1cIQ4o#zG~Uz^+@F=u)Hgh%eG_gU9$i z3$N#rrv27!rIpaV@{1MToKUzS*X%vZ@lRSmkj`OM$!95lWl0O|InN*DtfmjGKTPX~ zj0f!(_0}y4O@F`VCzGD94)O(ho^f@KJO2CSn{-+-?9q%S)i!*Pp+qFQ+)44x7WOD1 zpK{cn`qQ{yQZD%rt<kuJF36W?jpF2+VciNl2481;G&$G??db#jl`+Be^ZY_^s3*c& z)n)RRN)GyEYWh1!d?0o;<-#hbZ-qN<RasW~pQ*g={lSjgr!*&(#P<2fI{E3%JeD4| z>s*%!4Yfs+A5R<e>9h%twndlkNt+09wR`HpiFD#>hB~4*X3<Q0Lv(M|KE;V<dS`FQ zG#{vV1wPfj;jF!6jBWY``%c_teFE`5(=U4AGdL^y@vXQ~@O)S@&$snFKOpv;4^zI- zqxAQ3`n{GuuR(t$ky+o+xjVrCW&v}ZA>=T38-!1Kp{JMe^*%0H1m5W7`w|27@_E|# zQauAF2M`|P5-LtG)z5qCqI*RXyRPBqiDNtJ7vveJ!`IMeeGMOxAD{YP7$c6w^^AC7 zjCa<nwJ%}9?4ga=6X>*@{@wpxzJ>el0<}xZGdq9(Pv={>?+~>64Sfsuef~e7?P0-G z|C%9e4RC}9ju*F0>{b*!bp2Q={DPB$ujiRt2Ux%3p2`WvX2hiYwN&zrnefXwWfQM4 z_Bmg{&GXtz$zN@Rd6@Rx)Vp!<p{=Lat%Pr0Bu~yo(^(%0_D-k_YiBY2Y<Xk_->Ek6 z@+`)t?7Ea>h3fOty-<0S{xD++e|yctj3enHf1IUcKUN>(J4cM|K)y2OWIK9y+p~sb zzgvtSE|zl8BlvYyi@i?`H`t8zR&03L##TSe7RfXJHHR@F1IOAddhSR5e4ezg)S2+- zdHzb8wR+MyUt|)EXoV+@%N)u3KJJLgJ9rF>^q2`B#MV6WEO&zrn}UPSnY<&<nc1Wj zAZuczUsn9&#E<b)$5d80_IGm1kg|+XTOOGjNu<q^gVb}Rf%8V}`8!w-%z9vU0J8y@ z4Q4j+G2#n|zl``|;$y@Y4R)G^gX{TTU%R=S^kUK%zz_994QAm`qbVJ->%AF$o10#W z9aY~k_T_striJr7x9NT(?%hD966ZMBnBdO(AK#q7SF3&_t$0ZoyRv2C2ihZ)XMXRO zjvFhB$M|OPZw^;Jv1xDvx=VNb2h+Xc-<j?=o=<n?E58}tn=V8j@v-IGhAF-!F7NZa z4>p>)gYe2=+RXV%gUN-j^Wf{*!^8~}H%$7#`tXa{<2X@o<Hp&;W%qH4FVy$q1@fLz zzbpT=_zmGx+40J2%j9q-N4(xae#(j09ehCWa0DJT@MxH{JZK*o+yI_@YZd;T13%}I zo=5s@_;$|FO{M@I23IqJjd3BoUdXOL3*QqLjNcGGo*kcs?{WBeC`jX8g6Zv?o)(!# zgXw8`)6>EyFAj5B+6<V}(q_Qq>=iUsJ<#QG^@&}NF2??AF(tM0q5JcGKdA58&Er9S z-M1hbB`7l^-mWhvcApoIt@3+6O91B*Fs<yr08GBiL|x~@<V>FjbDI1`<{jJ*Z|sLR z;Mar9xdt1|9C*0kE6BothZEbwFT=wH!=xeSxQ`auhDR*m%|L$Hx{+VVttPdfG4xaR zKSl!CHM4H+e%?1(KQj08-~%3B-MoWGjIlHuJPH^~mw`i!dxmYj0Ut4j6c=F(**%xj zcp=B@w*b#cUd`bitqYAU?jycPeDy`*lNX7v$&MH8g>U}@tjq86b@?&Jjh}GPo0-{a zljGYD%BS{NoYTy`c^BR~6Gyz|!wa;hAiKVxor+84Y@F<;09Nw(2`eK~IW6a<)y5`X zr=APKBR-a0PXJHoDPH;s8zaftlndTT>)RUIlj42fD)33M=4bs<!JSk1uVg>?@~j&> zA<qmQ)ER>l_AKT2kd>4D+%aWR+DnotD@>UNd_k|qi!L)u%k{~-eX|Fi<F4Ze*)!9` zU1=HfHq9}rPjk*M#hJ9+V6RyIqM5c!p84oI(Z=Z9kG_++9&<Vy;`_EC`<iSBU)wP1 z%?I!M7tz6_xPzm`6q*+7{ch%J>+PMubCncn@w##VpW;9-H0#(`p?O1fC-XG+o-XMK znK9DFNMpU5wr0whJr_8Ky?uP#ty#%kWK;Wl!BKaFslPR6q5VHLjovp2#ZM0Q9sP01 zd$s&N(cJC0wfnMdKG}lIv*{b|YBW{MTOc*QJ?1vXsNS9V`06?PWU8vt`hJGFOJjWC zHpVD2abS4I&IJ2bh_4waiuP$fHAWosYR#>*XKZo2cw%C}G1bM*^pne(;b@d^i+yx> z%$VxM*mG*zp&_(+3ZMOc#(FvP`-n+C7L5*>x>EL)0#k9oFuUB!V(dA5e0(3`qnrZR zceUUNF5f(>wBrbPq&+=0v|}e_g!fh8XYa<t4_HmTD*F^+mC9P$syt^@WwVb_#+FS- z`wH94HEJ*WB`e0(M*9N!h8HCzo?_m6RAFuSw(s$rscGMRmBBXD+>##F{j$B#Z&0*g zeRWo?6a9(o^gRt;z3^3OFn5+suXJ$xhnn<1%Z}bxlYT5S&;YF?*bIHPUH=R`zW?II zjit;Wzr9Ke+8%@!*R+4fALA7|awjn~zQ8wn!sC;B$zt%s8Ri9==a17bFV;98`?2<T z#CI|JkD1@<*IIp}<@qAge$H<t@d-aJkM~vl8i{)!;Z1~Zd3eOUm}fFC!>cdz9w+`s zgjdgq|8y3NUy|ol^86RV*9h%*bAa((mErv$_kS;;U+o;8Jm-jeDjVKlTlCQp?C&`E zKF0aNz3`g&B>B9#N;KkI#8(0DI|m&66<K*6<AlqMJhsmMwrF1>3=fA(D-R8Gj=Y!s zJggOh!+!YqMfo@cmp(;qWd4~)*$z>KLI2tGXwHp^xYG>#1^Mx{dF|5P_k@EE(B5~? zm(U;I?Hta6&Hm)f|MX$owUwan<I$X`Up|sm{yx~bjJf0~;bnQ_fVUU8_^7!TKj@Dc zb6RuISlz+<1LB)_V}6S7mB&IZXA+N_qy5LwZOqB~nTz#*op~5@uhG-SjDFihM$fR0 z^Ah{VkMm8n?=mMNZ_r-lS<F6v;9oU(KX94<47D;cT<h!N{#VY~us<fqPu`k0%ImlB zxvVzUg<O1MQ}ln1QJI$f5?$3s^h${KBi}QJ@PQp1ZHXQf{iOpeO&};~-%-EzcSHwS z%fZsNabGzEzwK>{4%t5U`X`&d@r(8SVEd#Dyvow~{IZuPDs!{@HUi#7$_p-btf=0L z@LbN!dMO*=Y}>4{tMQ;Qhd<y9{(y0lne+#oRr@CYa%wUr`nIF}ea;bcpsKRgX>lY^ z;e|OhY4);(+2`C=>WuC-#erNgZQ4gx%07SgJL7*se=PF+u-<tfz1JYSM+tc@mW<K- z*Z6g*9$Vj&s;BAStv=PGI?;FD841ZNe5WR3@4U2YGVnr3{32hfKW0PFX=<OM|6NR9 zF1oatZva3WXynnwqt9sP)HhUZIxzd&0y-GGR-t!%in<#M|0}d;LvHx+@$DPcp?(3U zg>u%%b5|2#<;X(X@FF_f-VZJN$?lc(?_A$g8GUq;e`%ZE)ux)83Mn1%^&mQJdLLe_ z|AO)XJ&f}Q=>+F5mbKv{O_}hLy70^N_4fsDM&77Np+B?E6|)wHq?~t5{GhU0o8vv5 zWFLXxNmmljJ%X7^jeT2ZABPGl=gXqVGRKn(dFK8nkP-5$M^LG0<qzUKenW3&#Rak? z7}qM}=d<5mW({s1b*L|Nhw6EI55n|^_8o|SM8}%kj6o*`_A5Rz@9dKqVxQ_HZB4$$ z$HizXy(2m7;gp0{MLumNexbB%-t+5sbsk7}qSUlgigRB>Z6;+hE6Yqv3c1CpF?|!G zp00iw-#=%~s!khcsKcy~OjVkhHIFrRC;WtiJl5H@x&nJAfkz9@L?e@d>9A`K=iYMK zLY|e>^|FPVF;9AM&3B|{Cw>8JBi!hTvZ`ao5ia!MB7FUvVesJB95X558Njr-&cIXf zrsH|JhhMtDu&*_&b$8j=tfe?Jag}{<acGH^?cJ4oj5b6xwy>?{RCRK~Ye+Isa=-U# z@e#i$X?)+&p1;t04)0Ke@kKcci?K&vPkrlC_ORBVu!#o;bD!?-%{{0-*ZKD1ChFUh zdk}j#5^J#gOxSbM`xe22ce%HtG&PpYJvg?O`)S%utHuR#Iz~TEFuue4v2XVeYklGV zbNm0q6w>dPT5H+IntluZ+B=Z}cff=8UKVic;1Uq`vAXCm?V%sQjd_H<lLZ@-wVRz) zw2{8~81OrI)_mvz;Rs#6pwL8bFg5TDdhtr}B)G*)%*Hw5N5vCo*FlWQASb;zKkq!| zZF6ecbq)r;-{m@X9@h?_UD63I`+~hQFpT%`67>NxKz>i_a|6~4c%{KRbzZJIOp5lf zhtqK~y0^^14xhWE&05_$Qx@SDA}&|$qfKYAX<KH#6aRzZLEGjZ9Pq<2Li#JID%5YP z*Ur1s(TDV`zJljCs~<}tuUo)J=lq$Y-2eCcIfDXCYgDIbGH{VH%CB<t`RleE{Y|+_ z>CjJ-mbD(vCAyw$K3{fBoh5>P%)2Jeh<^HRGOmO|;i~#);+s|X*`RLclk9ozF0BB@ zkMzxB;Q(#^_fXr!gxVt7!86nDn9#UD25w|r46;7ZaRDCODBhGldaNSgL+0uBZXkUV z7d|{}GCm)6QO`!74>yVSd1lug3bn>i7}mY(d@Gvq3ZG2%uR}lZN8SqYYvGJ{;>!nr zWYf#{687^8_}WQL<JVa5PQO_FzijcugyIal<+H}X<yrY$%ZJFttT<nOBYWq2<0nW9 z#>LF{Uu&H7+HvA0I4f+&3HZ^*9?@<Z&kFBUs%)S<`jBkc{ZE^DSv=c{KVi1`z$wC} zU?0!o1Kj6%8rmE{p0gLv9CnvT?lVSzq3<+@4Et5EjU|)BPpS|9&ZYRG8@@QgUZmPX zUuNA_=MlfkT_8{U=M!~S(Z4$j*$EejFOJ|-n0UQ9%{?zeru4}nvk?1qkumH;N}1n5 zhy1vB2pR26j5D@B${I+>r)7<F@Zu*;DQ%+fdVgx|AoOC8PM?O)PiGDVo#@*d(xXAT z$_j=t`^vaaEVlS5v(Wk1jMn;`AiwTo(OoQ09ySYYeP5FN2A{SVTIBK!a=~TZS4rRM z&fv<R9QEW;&m!gtizK56ZC%&Lk|rxp&IMpk)(s4sPQACQd>|jNpDt-%EMY%}#!lj! zCiJOc?qhI@tj)ui{}*s^@X>~rw&^b6iDwf}OaIw@mnrT<t9_V0q`xnC#>}8+eOa)Q zKKIU{s&C~(QonNsRWe{tg`Ml@o|l-`5E<*iSeDL}e$Mr5wB5DwJ}e0NLLwTw-n;Ck zJkwXIb-|g>ij$0~1_o_>i_(Gap97t(J}B!?6PE%6e}4IQ#vA|ro-Hi!wc{N8_r(47 zGOv+6S=BqEy}g0#+Wp(Imtwur8QKH6`vZ(G?K$~l?9Z6&XvW>sPK(AmH(T)6&mIhT zOy72`4)W3dKdQlofNpB3Nw%4HSHXwS1OGy@j6J5@vtvTshaE{a`u12uM0;GhQEd5Q z-6er<rIPtZ<bm?&AF(epCOGWDn$$t&K{r0iJNGIMN*{efbe=iK8`eIHzTX$DX=NX9 zE8k36&hzUWiR!d##DxBN+Q@Ic`7^J5pB3G*X=mpn(9oB|k>I`Nrij;P*7tG$dp$aP zeR3f>i-yoWnZ<93EMBXg$!mhA{*w-YF8};kd330j^KpCG3!1EBt{X1QzMD>V%S27P zV@7saJ;&b2Xg}q~2_I5f`V%`%cj%cu!4BGJ4p&twT{ZyuPvZMnqVW^(qhEH3<fhK4 zR5R9rQ7T!Rh5yQ#_+tx{!fUcgOa14(tmjD9vy=5Ko2b;vXmFGcLT+6q85_uF;hr5I z$X($xqugA--0jLkJ4Udvqo3qn&uO^vj&69^!qpx!uTEPQoBBfadTG>WWht;Z&kPK6 ze{z@Z@?%`^r~bg#W1q9-k&j0{bJpy;qS(JdnLdy1D$jUkPvykKo@Jh|rzCB1Y2)RT zAC|96{tk3r4)$MIxRW2d2feI*@^n*#_G9xR?}g)jb9t=W+P6+@oAjZb!-U`uELVT+ z1^xOkvKOCD{9)v8c--^d3ZLK)SuOvq&QyB-ntC&2d4=^A_+pW@uTx$hDZVD>xpS;F zvIc{V5HWwj9gGFKJBG0k8SOTCk^4ED$DAw?p7jyhdsg4}lz(!}%xY2o0cX}mKmUob z@T`r>&$`E1@DGhK)*TObyZ6h-*Pd4vo}#Dl6duA^G}ii;;<f(doiA3)n4==KfcFe- zXwbY<W%Q@{2e=*~{@scn2%Bf9yP!4)%d*WR{P&p38{?J{w-_I0pUP{ERr55-B-W6k zqxI%!02g>s!3g>tF}hLt132;LLw8&R#&cOPJiSD_)Fzb=(n$EI_{Yk_Mz0;U&Tl;k z?T*)^zqo}qSy>r>-nk>5E_%hlL&U{KTeu@>JvySrqnqvoG3a#ZYxK)>ItyRgU}^mX zI6QCZjcvkn#OT|KP-RljU%X#@IFvaNtP6tIVcTDV0Ik%%thW8>v_4`^B-+QH|MH#6 zW9dl0iS{Zx+UBH!vb=+F>9liz$}f09`?72k?IGNWJ$hg50@kEX@92S_`q&qr!9LxI zUE0H3rJFfS7dFdAY|{?-tfe^RU>{EWLcR;uq_tNGyJFNy{;uI(hxX-#!`d_1zLL=Q zFPVQ*`xYZdEbXG2C7N8-7w|`bKbP5m57^(AeH%|pW;@><BcFLMei=&P=f-ZqXNRv} zasnBFy%c&43@rWPk*1@_j2ycr1>e~Es9SJk<HgsowhZ5lZFgMObgIYRYw`}<9<4g? zyU`^d2j<7arr_gv%RU}8#h+$=^=Ze<{&d6?eVV&E$LgZ{#_FSwk2OSx#?sNfk2&7m z0s8()_-L{$=)(i)=!n`C)IIGP-_&0GDm5M5_?V2oH=lz~MEk*V$LcvN(Hn}zcd^!) zw&#Qv<(bgc?3+AEe3E$KJY?S;b0s*~J(=2@Inc=dP5Em2zB8hFoz%2_nyjA%^kL@a z<?B!$izEIDJC5p2hkf^C-K*KME}oNPd2I6D6V8q#!a488n`6(8pjW4z9kJ&`Zey-E zFBY#24;k6};6CElW5+&n`~>Zut$JA7BQ0ahBRV%6`kZ0!UpC!{+q0zHG>PY>!#up5 zOrqDAy%rbeqnE@5UJ;H{xNzQt{fq2FJ<h(xQ~b{G8|Qa|-wT>wCz`@9&!mfiX6%{& zM+ZD4pS8c=-*4Q+9N|^$jEL}rzZWLzqF;4r+ne4GDH_DCnz$ZcL+w0hG3dtCPH0j& zP|v<C-t}zbh=!+^i$>Bb(kaN7Tk&m-PU@4o=xCr%pzq`C`9*AEbM!I>`ar(Uo$b+) z@5XpMSfG5YIfyqM)&g{=#N*Hj8N<4~_ngl&YiXfxQfA1{t9u@@^Tx9B@(pQ!4|1L5 zY3-E`_9f@3Uezi7rwlycpT}#%-tBepw}igO9?+9B;`x>zV*)-NO{rdcKFx<~_c;TX zkUcYgIHMl+noX}qw2W%)c}Bb&>~*&DF7N&n%?(QBL##=6=W-8Yq^91qm|d}a?DJBe zj`Rw;1NjJC?8Fw|PrFg$dfz}3e)KSR(>f0OF0mD8gMZg%gt!c8B{Spc0|$Pq9^i)@ z4Cbikh>v8&_u|iB-N3ukL46BtJ^#P(0W0uXBRNI6D)DbT9Q`rR?ii~M{PKv?I-+ck z<*f6U4m4sT9p?O@bjTB)3?Vx{`KfWJc@+IOOLmUsN8qb&$=d>R-(?yr)cf+1W88D5 zI@7Zc!vpcrZIGqKn|nAdRd&y8f7_1k1ox9br-<~q)#clFbdQx2=YkJB3=Hlz`PB${ z7O_qo8RKlNPwVZ|Xx*m%h*qnPG1iZ~a{oIy))vwo-M~0i!*jFuJYL1~9p3Z*{W8z& z$p{Tn?x>&c@?7gZ|4`{&-t)Jf;#v2*0B_<r&)wehzjW|?C$zM3lV{F6m_{q>&}Y)e z@@Y%QNxyNorajMuj*MZy2j?;%BWoq-`gmLZ^1Y2F(oY!BSTyr|CB{5?fVDC5TK(AV zt#3F**qzwROB~tJ6F+C|px>S;fF1!1^^@SJto&Z=aqG`c^UKTs@pGl`=`@chUFF0_ zwAJc=`BiC)-6x^6flBUgWju+Om@`=GG1$8i^f}{q9(-Z-a=<5o4QqPx9r&bwPw(O- z@lSE;SHChPv7?e>*fV{c70Td?xes5=PJA&v_+-2B$#!AqZ^X{;z|L<mLz6bzL)M@K zKkS}y)rCz{takV|zqL<l=YfB@IU-vXIUbSDQJeG!4;~r7j#gROT9iE=q}g^y%rlIe zXTWW8O*A}i=NYcb$d<&$@@z=z%^p|K!`hU>5g+oTJ(-<9s7vLjBWCS<?8=~w+C~1! zbx-k*#uT{DA%Cf!jd+SS@@)&3_^{W$`!4Hejb<#lqr1dR{M2!+pX<Cfz_+ZiN7>=1 z`>CR`!S((J3jJs9v{YJ-=AESFyniY!=fC=C`~0-O%u4$|URo};qsryt>#^Z`{O|!k z>{sYN|2MzP-(<!8(2L8P?d8c^>V>md^AWuK177&HZ+hWU_E;!>>GgiN$`3!_hkN|+ zDL=%<RsL)4^+Ssf?_cxYlYV{4Kla~``QhJt;kAB!*ZTEcYwHt_Fji(O6rTkl`gOIQ zxtju?Z}8_NjmgUdZ^q1e*_ix;Q|~jMLMOR>^%TD|{9fVrDnHI|IuU-bl>H$;oGN~* zhf)3iia)sf*ZrHnkz1mw`SlpHAdeq@h0=^Mmp^38LgKDiZum@y!Ch+1m3JC*)oSKm zDYV%UW6GMSjk%cN-G&4<%*=QX;uT)#k2#wC6D<AB!gIs@NEiH@*%v{XAiPka0KU>@ zmcLN`|3q<*(jSjPd;6;=?Bb`mm+@wU=VK@RUw_tfDbG9kDeftL%Ez<*{?z5Sk)7Ow z{9ZBUzt`})kKYTNuAzUwa>|(hs~VAAV9cL&@q5jfKTjF+)na3g9yjJ|<U2;$XBYA7 zFy^@yey;%7|9gS@z5!o+16;qcoL@CRH%K++C$;=Y{|Pw!B*SkXzr*~1{gd&h%`MG0 zt!ch_GJmM5)P$-Y_kYb<&q3S;!o?>|NWUt;<Uhm@eEq-B8aQ+fX={PIR^c7|fI+<e zLLVGAp}Pi6Xk!cE5%2fGl~d0_oWhN%srU~*#k1?b4|(CHXQt8xGrR1xXFva43i)l> zYeHSi`L&qPhp0!tEd^80L7c*_`l<LWT_&{kHSfK<$qP4+`tLm^)O~m=Z#E1)cSDQG zkpA)iLc5lmX}{jHCe%wEy9__3Bh!8^@5M8Iic3!a?Y_^19(c%vc8{CTL*N<w9-!TN zevo!NK)WV?t9fqbcPGCNem(roP5(W}E{q2Y_)-6Zi)Q?)cn61RzgpgboBjJZ{rqw2 z`FIPzjr^$R<M;9F<2T4}$b|loI{pwGK7EuQba)cDLr)QR+=Tx4IpQ*2oZ=t9(}X^A zc<O!Rr1$*z3DSU}Jip0rB+rCK;`~zQ!x=e9eE<3JL470O8a#jIW$=mcqwPUl5Pk;O z_6NKJBmVEWm+yezo&%JBvOpZ8O$8IIwzC*)e*qi)|Ka~fDG>Sxc;rRKiv1x=CZAif zo`dv@g#Q4KzsT>K!1`vNSMDD&mZG75ebt11!Z`j3y!q4TOz7wE{4erM=$HJ?G4{?K z;RoDv@a#Fp-MJU}jhk3$yWb=K2Ak<WabG&IllVjW`R(I3!tXG@XZRgwEx(>$hFws6 zyG7sso%VZ~_fz~%@OzHm5w)_dtF^VG;|5pZx{l7C&h{R+b4$;*d-F+a-`v`>*%<yy zX6Iesx~Z$P!|mDXwr}ff?dfzYx0BnL_U`uW$~X;Xdsk=cmL1&z&>(GVcjp$jbKAD9 z+uX_yTN?LV^STu)Rwvgrt*HC0hUTgFx`x%O*VV15Qyt{Fb;Zr=8sENdZNp7BH{3$D zthk0->en^jx{kolyGDkF2lwrMxNO~u)hn{%m#u4le^bM{>w<j#`?XW=jcZoi+~C1! zUbEtswM{G5*ovV`Yd5=;yzmCs3)jtPu`yd)H#c`~?^)5))7rlA1~=Wlc}36Wb!$6& z-rL?@w|+y_TPF!oW+_p->|M8SX>IH31fq(#n_IWEZs^=hzqs$Mt8?$}-gM2~?VBLn zHI*Ii)-CR)Ej^vv*0;9P6SiBncW&u$A(PwQ+12G%1!R8f(tL9s?B5h1beVz)OH8kO z>)oB(-1j!Ey5_xgt9*Q?p<`~jwRv5AL*uGj8tNzM*t2PK=hhuPE?l^2%Leh;w$Ap> zO?P*?U0b(yx3#w4<*wh>y17$a7tp?8&6-=+EOi6odbEbV6z$ouZ42yL*|j5o>BaJ| zg<==TJq5qMwWk$6ci-mLZQ9npV^fdYd~bK>4VLxSc-UbpPvu|R)7rCRyDF`AVd`aW z-Ku(W>-F~A-3~!p&ik^Z%er<>MZJA0s<Eqe!}j1ce-iKXj`aX>yE?brXn_fmE~6Br zoi3KJaOl|H1vm2lx=mZaG#Jl{A=##D%%3-ol>q?!Z^ye{FPP6C?@IUUIgjVX<Rq_K z1p=E|yEc8e^Ty=P%H;Aps@)Cix*NCLvbAT^`g`kIySmh$ej0VdODpQvu6DaNZMn<c z(OvEFHZtVy&W>t#$9BKfHdI^B%fG&Ld(Q<j2KjDU`p$ROz*((OX3GXU9&CMzU*>M_ zY2DV-DS4Egf0^69v31Lq&Mud6*mdvrO)%c{ba-()Bh>BOshk@+r_yaZI=0@k1(-fh zATv8G?RRX0foxCGwCz1h+qZUfdhO%o?$)jydIK2|vTp0P&bqCeH*ejtcBNZYw{^>w zRa@3?ed`UbR|o(UxUtgm;D-9`UGHt(wp~;ey>EKwJKr(meOdQ)x8A++=ItA@<5kbi zo7yI$#4D}{^A2yk!R$A<-HqGa8(j}FxbqB-#;jS}Wa@6NH?EfzHWg=dZ1ZslT3N*q zYFe`jF~vh=$6LLTaHIQ1<?MhVn^DCC<c9`5w)h7sJKpv?;9;8Y01tj^Tkn?KxV7PC z5B&OVTQ^&b>4P;0;;q{*noRnJ9bK*4T+!mz&dnP3D`<w-<gPo!a^{+@O>Ng~-rBLF zt8@D`tz=x+z46|qZJV}`7WCE1d#I_i=LXkpoYa<GTj_YqZA~lR?{3;Gj;VqO0(ySA zsf@u8YVFyCu=k}Sh0ZS{HAB6Y=u><%iHizcq*3R?nylY1p}`@MX4!WViEFQ4Z<f;k z2*#$Z_aN*gRA6k^vn4t^mU=B-t?{gJfDT%++L(01n&x#4cK~hsj;<c~s%L9YYgc+x zk3~MYyz35xMHk$Q@;WaTdinB2!{Vlnwz|!Tv-Zs$t0fjYJg!LojwJ(mZ`tZLtzPZ+ zKpejj#!N<Zw{G7q(b9d7I@u1O$uv(uPNn7BKJ5|rC{HU|HlPyKuvk*d5Z~70UVmN9 za+{-lV`uwa=3Vc4*Yp?$?dI+-j4k?5!tUl(O=}T!t?fN1xuvd@k*$OO#2Zt!PUg0J zxN~!lt*?3O7Aq;LU1Dz8v03jDkhE%B``t6L5R;w7&8LhC+}zr2^+<A=9bft6%Zj#o zh4D?7HPo$Zy#1Csx3$NPDYv^7T@2N4@cYseLh57UW{ECf;wrpUTRM9-dN$^^q^aL_ zcm1Z;4YpJ3ZoTD}hPq}<pzc7FY~9d|fuMfgzU}T+-5Q=Y$=z^I_FKpHo~EtaddR1G zJ38-H_inF}0C}ss@g7^O@{Sv(|Fd-6w7zv+S8E&cUL{aLwhm7O+yN%r@A99?Ekv<- zw#m-fv|Ywn&&E!7JJyN2eMj4t&Ylb8+0nCoQ%8_4U8T<6fFXTP>%H!(CM!2lD3g`U ztYcbv%Y|FEPL|)^-Pyir{U!}OuiTFAZpeVR>E611`zEYP+eS!t^NKoOv`wc0B*`}& zw5xt|Yr1P|`(10Ly({4+MK;@Ux??>|G#OXlxxKx)P2>`FEquQZZ*W)Ndeb^F&f52_ zYOY(kZq0kHy%qz1)f#eHZiaB%CDt~f&TeoKj5mtp6enEjrgv=W>Je3MWnSXexXY5s zx4YLayW!fm-*DaA#Z%e5Qom}g&o24q=2huQtNI3a>n2|`RO=BurGTdX0VhBc0FA3| zTDKw#HbxlosjjZ^Cb3!99qx+BN911fwwwLvwHt${o1v1%A3$hIC#vFRn8wd$-`|U} zw!lQJ^JwKGQ73D&b<5%&<i(ctn>I+SuD}l2xxxix=Vo_3vnLx-=h2+*LC)^j=`!Yf zHf`_O)V}?OeAl)8wu(tz9U4<@w{d>w&WKyv`5}6iGFka<z1x<Y7Pt084cn%{V*tO; z&o)_>IC9zOSphua(mS@_OSN89cKeawp4gHtBfBEs_!A-K09Jc0uH3#D4Z;@XNv&%2 zk*7>IVp&NAN#FZ9XXIObGe&`zIXl;R@YdEd=etlw*-{N#+a;oJ$Wrb1Y}>><7(TCd zdzcrfZ|^Y5TZieo%`brcW~Dv_HKTObG`t7V)}S&wF~u~ZD7Sp+@~)k>KUH3$ZX4Wp zbG^%q*{X$}ts=&j4NEDus-sIo)2OaVo9+(u0(n=Hr&04Hl<Us5o!)a@PnVm%eeL_J zp_0XtnzGBTX}`N^+tzl(4<%N#-{l*aY7aK*j<!14sQz2$hE?<za>0Ao{{h~UxSS8~ z=GJX@1#QVUH#M!gwKBO(W6_r78JT>M|LFIv7+E+U%;r`O&7rxsVPajQDa4NMYwp>) z?XGKZTD<f6>vry3ciqzDveiqI*D9uC8;W(?_G{X<VS=H2uR$<h)2aWw>@~~vpopdI zntEs=jSRG<u7P7KA^iHSRB!Sd5S!QLd*L#|o}F&nj`izdyAGt_woTobm##H1w_AG& zZcW$ELX2ALZ5D>`hMtYHyfj)|nY^xJ7N*Wl{;Sbbjo0`2{||fb0~ckL{g2;gW-v5T zQZy{oNh!(D&`_yRN5v!~qr#$=3Jnzvl@ybTYAPx!D%x<PmWnnj+I5Q(i^_^ED%z+> zsj#TnVq0n{$!N1(s^9zloC6FpGWD^3zx{rHpXo*KIe+iD=bn3>`#dwk+Q5FPlfA~i z`Nuv-A6d1So!C8LZSI_mb;l1JXgeO{%TL4(Icasq(p*UGjQiN6U`zFqt<9Z{E5>r% zJj0zk>h#<>3HG7A%a(KZJATeS#?Q&!_xL%vea6qpJ#p>QrS{k<{>Dx?Wwv{+-kITU z03FhvvAuf`8pZ5-_MO7oHCe~7E3RM1q{s&I)nS9~vBo+hxBdB7alih3b@uk(<sLUN z2rUccBQsdPR_dfHNYzVPv%#H`iNkW{nyd`O$<}C8mbhYhW*?!-a399foSlUN>@qWh zP_P3R<Jg2<&P{iOR3P6<UE?IT9G4I57@G%Qasle*55!)VEJC(waW3y-QPzIs$Z@}N zyL#8I&(4u^RoB2h10bdzoxWlO#svBq*%*x7pP2FuICZUE#g5e1wdvZ$I6Y~$dcxuc zUV6-uOK?-+UbAc&ZuNR(a}v7lm3W7M)bxnZ3)~m1U%Qr%^0KAR;_&AqpPL-xzF_hC zbxQ{dlih$kX&61s<awu`IC17lYcG<*>Ryj-z81TWYZE_x=A5~w*v)a?!g(p~)oXHa zgjm0twY0Zv$(qG$Gu${UQ3<nSA;cfs%l>$G&&3(faoFLOy3s=M82REAcow-XXYKk6 z@bGOZpK8w0&g(`5N2KB&ejd)rcrKUYUbr-ejT`4A+X~}c95d<IJ_o*-<719veKL-z zd&R-su?okmwU^jugFbO;KztZxKZ}wZY5TD#W9y^8UY@@8JmBV1$zwEIf67dr2yr3k zstb4K;&pbWmMq01k?wJpB7>{l3(v&Wo`H24@zjm2cf1>O;d8sx;}!eHf~%6fUc5A& zk0_Qb)u(p2wX+{=vLV|!VN7oOE_+cj2E+5IE;`}VvliNU@m+ijZIEUYKW(pE&R(Ch zX5#9l%kg|p(!^W+jEQ(2%VGNJPmYOkpEAdN;`*$ti3#g*zR7h*Emj|RveC!C>L)JF zTJ{t5`*ZKlKlOXNU$<^O=3qZ(=@ZYQ)fcYDV+r1Q*he?a5=|YYxj2hF&Us$$UUXOK zp0Qy?&IOq`qh>5!hC@RJFE{ca-agmR_LPK^PIaHLZt40AJcPgyJsNmUm3)%>j4V9a z#2tSYKX}0%a33B%hv>tb;)jRNFE|#*lq(7DT6k4hvmRFmd0^Y`+@-_o<)<qXe%9OG zHM}G1-oTOtHi`Aw{%d5PHfxviShf@oKu+?p=Nx=qq59sfXg?>wdymrm2#BwA`~Sw| zDi$l2E7mABDz*t)!HVIEv5I(t!Izb8gR$}yOB5>=>lD>r*Vm66VZ!Hk%=mJ6@ISm9 zsfsy@MT!-QwTexO?fA6l)O86ck({MxEXC(>Hhnti#p`T_(ig4A11>7q^j!O+xgLF? zd4^cb`_e9-i!U(-59F7v<^#Yp_>t5+Tu?8WmkS+VKJ=6H!<SQV3(!lZHuf_)`-833 z87XTQuU>~IL%7cI5vn||Q`srYR|#`Y*9T$tXD@r{<;-53HAPQ%CuOW-E>u5ZDL)kJ zq2;q4pAmg@MaB{5;-fHlQ6Jr(5BccYkJ);EF43)z%<L`km38lGHef!O?;2;m{UIN( z#d16D!|%57k#_qOJ6<SyVzyU@9~k<?EPB0p(ChYXOLWfA^~;AolDBNxiVJx6ur`IC zJo?1>vt)c!<YU`C-bt)Ejbjl$dFlF4sEc<}568a0JAVo8!Y<@Q&G2Fy%<v9i2)@Ud z2E^Vvg!?T5-(}=}!X6t*K6=AQ^5gK`M)DKz{YL1RBw!gZ1t##pUJ+3RL>Y~81GDkn z$53D{5Wb8TSPd+|_aWiaAcirOz*0Q%i3FAdD}eYp(hG#I2}QtaeD^LHSPNDnupWpX z(}?fiF^*;+Q_+g=;dy}VK<Ju1_)cC2dJWz_+XM{8ck-fup}<aHI9yi%-S}=^4iK^z zp=-qeF*hp?-_c71dVuvnynhMfS;<iPFMowKN`PUA`+xFscwtq5pF;eU;->;XHTXdu zO$&b7@WUKp-7VzA)}_AwSkZXj{TdqE{q}#~{BH*QWZ(&}FrUcvBMiv;5iet2F6vVJ zv>o50(-(MX0B?HA(z~SiHy4NYy!ZF+OnH3XOXL^|5`OVYt}eGM=U`(7Z#BuFoet{& zhy9@p#`03b&uha0F~9qA@Z#t@2cGuy0jp|8X0PnH^|K2en0imf#`_1qUohp8rm9WN zZ+|xWj_o@O20oE=^c9cgJ^PQUi3b!tKkBwoPljf!tZ?uC`l*W&^Pijj;i2y}T)ygq zmVb6MY(4Fo9oN1xEUV<qj0?-FzhCm*r8h2pwJpp_JN1GASv&tdWX1(I2Osp!39H?; zNh?Cndpmu0%O93sv^L(^^47_&hWXnMy7v1A25r4?>eljq&w0Eg>-}e5eP{Ew?>ti) zvp$*kQQG>ZcMf{<PjAgQ`^cR!n@{`D9AEqHY2N4S7mql+vSaI+TWZF=`Siv+tDb#e zNR*@Mp7VnWf?p2V`S@c8einJmn!M{%Gm{Sf%i>XgdScnc85cLrF0$UgXh6w!_qJVc zhfcWYv1@M_@Wj?J_deh9Kx<XQvAGAl`iCLryV&0iEWhP%gG<7%TzSwl!K-FWye%W^ zj!!R0vo5^ww2laTcy#U3n8w{p%)+bz8^1Wrdf>9FgFF86&5)Y2mR9V1dFYd$CExU1 z)#sg0733}XVAMy$-<x<+;f}no|I?7P^pwXJryjrcv^VbGW^x*yiTQZJM-R-N(YW#5 zO>fn#+VM`uf99_EY-Q}~ot=MPUU1@j=~eX!u8Hf8b&mS`9|t9!|G`0duO<gw6hGcE z`;X5Z7#jL&i2J&;GPfS#UUTi1r<OGgd}DFTz2|-S-Qc5kzFJaIUo!TUcgri!-ZJBm zNtFj(_2jc@CsaS3_2)0Du5sV>{FW!2PkbDb^Vs&gK7V`uad&Uu@TlwkBZseR8gb1h z7aTaWIOBx;gI2AadFje?%3B7%dEo5>f4qB;d1U<M2i)^m`;glct`EL{`)F%-=86F? z{P69Pv(EJ{UH;n0tZ5gmzHq=lerP!C;v04x-5mPfrROaFU_sq?PkprJmgjbTcgT~^ z%}uYk<?VOgxxe+kw{E{8uJMJMQ$N~$`diN||LVbQXDy$#b-)LSk54<f@t~vMdvwrY zNz<GQ{x#cmY5GU$yIw3`{?Vezt8dwL;)>@kd2R8Q!fng0IrNA%+sjVR{CHYj$cBy2 z95~-O)-mF#ML|a%^U~8NJooss2Sy!TdCqUswybo$@a~TfZLNQEa`eu7Zu-rKkBs_# z#tRi~7wkTA{mT1G9jk61R620L!~YySZPwZYmR}oW&KkDy`2|;hTy<&KWse>GNXQe1 z#r<~sEx-T!+s_@8*R<=&1K<DX@auMLZ}_U=<2jihY}qsBy=zuq_1uWp|Mk?7zgbhU z;cwwj&ficFe9oso4q2JKY`_VBJ=i)h?bfCD{J3YyBP$kP_~VWdS#QoO8}xDRy9aIm za-r**l;fORUU+Evk&EloM|^wIiutF^T)pA_N8VbwVCOsMG<iNcaM|?66WSl%_Q)9@ zK6B4Y^B;fn%9yP`e)jCMyCeSk^b0qhvE}xd$jbX4e7b&G(ChCGxIN{=vyK|KbNTaI zmR&ljX7Pfmb2ATfOjvVtapi%}O@A@umix{L`slEUj$Jn!bMOu0hEDnYiIHdhdFiyA z=L-|>{>!81Jh$VoS?~Y-vn%#|8+w%$eC+LG4?XjN`O)j2%$QmF>dl_#-+$!v_r7>7 z<GUYQFFxE6bCV-<*qzIdy!g?C*hSC&dBL_9Z%MuPt$(im_dja$c78MY8uy@~w>iT% zJhW_5%GP=D&%U;K&OJMCP5#fW&zCiR|7y-0*BLi29+7>o%RT(z@l&Qf^G4D~FMV-d z=eq@&cmC~9mp=XV>DSH;x#*7c(P8%mMNQvw<nbTA{$|4WAGMuX^4SgP&-~|)YcCkE z_Et~WX?GtnHug^gVh(v~*TNrOsZ0Cd?T1%ZeR5;&@4s4i{gT1S8)rvMy+3loh{q0y z`|-^$Pi*?&^^~XnS-#}1?{3P@58imyLx(<b`wP)K9{AhL_9ufqBVRrG^yA-Om~s9W zt1iy_vG|5-&6B@>aOn0wzZm(|^Uc%3|1vP~gdG#kIq&bMW?lYm))fy7s=Vg9@H=k% zWYX@3s^j0<deoe_*9IjYwsXz0D|RL2ocsOOn>IOqcjxt?UqAZsk@e61CHA-%qZS<c z)`6*4{$us(v~NzydpYFYYyUpF;|_1sZTH=O{Nq~|B>d*}6=&vt6p}vbvt!oI{Lec# zzvBAl-j)$X4`1cp^2{Hmob%GjNte8vd0xcd4$7SM^`uMxG5BBC*F?O%@xBQa_g@`% z`(qcLc<GyoDQAB$aY_6?2WOA@?%P{G9nf(1OJR@wsch_TpSmXIvR76vOnv*Lv>Bg7 zuN?i=kX-(@QzxzouHM%L7f+`83i_$<@hem;`XbUF@d(98#c_&b6%PkmCdk@~C#7>w z0b$bz*naTG!F+}m8UF9(JGrj%9fpyYjehv{)O`3|K7(oI!|(EA%lG1U+2~Myz<R6J z5BHa2S@j;<ne}$sFXz<9lhqmOL;cckaSvlQ;fH5`p#AUh;_>U~n$7&VbB}jN&0o0a zDEG0GVkhBI*Z*?<Hyb~_5>QZH{9wQC0qDzq#y1MY82sdSareS5d4m^%ecM~9d)al7 zUG~O{?g0DFE&(tcKV9-o0p!MurrCRZ<L<GyHsig&m-=_aRO1e#_xM&d3{)QM_442E z^p4NnBOlo6MV9uG$MwhumHUxL^~euu?|**ym9PEIFSNLC{KnJce^{Fz|6G%<`G<Hx z?3F*?{O9y9-{*4(^&i&Q|M<f*{md^NA*ua{Xg~Ho@r}swvpz9B_J;)fv3L8(Q~S3M z_j-r)$&b(ajx6vKe`b&WLv#9<9~S3F-q>Rw5!JtZRJ@<~JU#ZK)BM;s_sGX2`H>g& z$lV@4a*vO^4)6WFbp6}`>ih8IzV*xJb6x9yWL00eDd~|<sP#9vkGw5_9M2K`zBGQn zGBW>Pll!UPaNqF*$@ejXUo3t<>yy|kzP|e>s+YWP|9Af^dB6P;*S7$2jOFk3i{;0A zWq;QP#Mk%w5hy=DYyAV&hoAo8(?9*C#^(KE`Ps(^-TwXbXE$tm<bm=Rp#B1mzrXbv zD87Er7pRZE<Nvbj|6`x)TYazmg6QXb;4eORFZ;gn_m=k^Kf9NGp#1gq|I6m5@A$p; zN1*=V#bkbF{(e^caPRNcvp)jVzn}fzyZ;2L&;9JLfyVbYIq<sYx4-iJ-d}y|qj&yh z^;v(9Z~TGgAF#fD<@(?6{O)gk1eo9c#uv!m&-tb?!20#-4}tvupDqu0eGb$=0<3R9 z|43lJ{k3oX_1d5Nn}0v?dEm3VKLzS9`#nA!>^1-WonNqT{QDc<{@Mr1pP&4@e@^@X z{lnQ_`R#pu?jz^-Pkh!tQ2hsz_q~3^_441hzTH1Z4qbn*?)vp71g~4}1<`MQ`kp^} z^~Zqrf$|fmfAqaR*Zang_x@f#eSU%B>nrcIe*OjruY3GJa&Mse*iU(&@%vsMgA;w@ z?<+T{zH&e3pWgM+w|;u{H$V2h<pK6bp!xluE)STWK>6)kzwTb^7ij+lko&2RUiA|w z|9<Q}z2fT|f3Nxq<Uf!+(DfsbeIR+D^$TSGYs<YDpx^!<NZxmS+%Wmc{SUhSUfuRy zNdK$j3$*_N$*;8M=ll6tulf%7d@(@&{ajyq`S+K6@VfK=|980;3D~Rt++h7;`3ZFX z{crCd$c4XGcYc2D{_1aV@VdtjBo7py7Y_DX|K9fp0j`e$#}9D6*}wIFVqf2v(fl~# z1I&L@|MTDH_kz{`6J9_5vyl^(Kk4=(_sQ>*nSSKSJ@!>a{Xbu;^7r|<kN>A){rLBl z=lPMld&YmN&d>Nh=hvsxyineðhoZt~;br$0aA=kxQR@}BXxh4>l2phx~}mLIuK ze9!LjGrrIKpY!;UC-(S%KFp82x<_7J+qb{*-*I%U|6ly&FSkejg1`0kiT}k2KjZtv z|6)d8IsZLL*Z4K*{pY79K>fTF+joAx_eVY7eaD!-ukQY|zt?9kyzW(BKJ)kY{h(go z&+(1P_kDMKzD%F@-EuFOzvlS+>;J#q9_jP<>dvn}A$UJo?uGLHtk3_z-i;x<<MU%5 zNdB|xcYpmOR)4Sl;_nroKV$H^?e|aqTD714;_mTZ=kNOH(_i;7x=(z4`=f7vc%#S* z7yZ@GK1TS7^MBK`fA;&Z_L<*4G=5@y`>^izU%xMfU&#Ny-2e3Y^1{Vl>*oQhJ3c?x zKcDNn-|I(j`@a5v(f!eXePVF`ukQKz7x&CRklfGyD~C<De=mr=^4n|v`y0O>{~iq4 zGyeYGfAo#t?d!kq^Ep?q`hc##S5JJ9_M4wT&o2Vq9|f5IuaN)V>)ZG937_*N_D`Vs z1&Tkw{QV^#yzcz}+Hybr!|gkM|M~wgyZ`t;4DkKbk0SfG--pyEKl>NI-~QOUJ_4*? zpz-%HgYNb9LZQF?70CYAmIs<&KzV@qdHc%UVEyF$__6P`e(>e*)#E?F`uZ~lug5;n z=X+4zYkf<4*$0vb>MuXvzO2{y0p{=L`Bif-`@YY|lY7bg`uF(C@!sF7JHP&f;C0LW z)L-xZ-FN(6@<9H7ZMmQL-M;ht)yMC<e*abZ*}wUJSFwNg`>_5w_1Aa*y5Y6Ee)loL zPnP$8eGYtn+28T|x9{xqLZRRO*LQ!G!K8csf#wHYe=oKFA<PTuUgQ6~>qDROpUVxG z;@>iH0ndkh$N#nae@}cEyWjj-1KF$ny?XNBXa2?wgC2R``tFrqKi7|5{lyDsd#%sU z$`8!_y}IM`Cj_rs?k7LJ$NzEf_=4C|y6yYkU-gy;9KUb>t@8Enr@qR1$@}b|pkDC@ z93Kk(=D&}B{@$vd`TNOV_%AB&JAUu{^o>8z_+`HF;l00C_xgGv-77!6{r8o-!RpVx z<mbqt>+jX=-=7e?Zh64<fpUNI3*`UTmV5up<NLMeAIQI-`~<2m4}A92N1*2)eeQ33 zKflEFrSJYM>-KMrE5dt!FB#t&SL4Ut4TGNe`t)D^zC0g!-~QRVKS6n~`tI>>jZgLS z`CV`SedfQ{_<j9*!0L%V(Dkv;{OsR@*KH49{$Aa3FQj|TuV?+OW7_>0gV$r<XZ+st z3uOOm%lrNQlr^oUUpa#F;%Be?goD*Rf4uki>Xv&U?a#jNzb_rolYf7nh1czWA1d8) zFBJM6KY%=t|9<7x+|YjI5PI>`Uwps1ec%2Q=zQ60{r#M;Jc#)x=l_2&zn>LfK>q>y zOCbCGmHRngxZ$%We|`INqOW{^$Nyh@zZvMxzh9}(`uyK64|KlxzkUAyU(e5r0Q$Q= z_&I;2!sI8{uOIv5pKNa}%I-HlYf%w=`Flxx)}m4`r2CwowP>3^WAM7?x4-r2=lt`F z_Sb&rw~xtn&(Aum#n1f8y5)G|=laoeeYVc__xpo-<bmud?|c2}ef_=CUcY^Rf4{%y zU)IucKj#NGhV5D3{_Gjw{>uBFe|nF<KXNOl!q58k@{cL_d+GjIALWH~ul?Zxt4p4a z_x@fz`5V(`eR|f<x|qGf->b(y!2JCggZGo|`=0;zdOjAY{`NP%K=sq#_*Pz9!2Qvm zJrWhjzTf;>UQYmdW&iT4qWtv#7}#{LU*G4mrl&tzH@W-uzYn3We=mr=>brM;3Xs2j z4AC9`e#x!Eh<@#@!rXr45ca#i*3C`*_Al#}P5s;7n%VF8)~(h3UmtGW)2}__4{(1J zNFK=luPV2SS_AnH6o0?_!@9kxU;kEdMgVzrzj6ruoKJe~&w%#((;uyessj4|mG@`A z>tj7!<PGrrtzUcQcYpG;kK}+Y{m0rI+^>IYb8-LjKS%UCKkLz!{_FFxl76qR*5kGP zkH00V-|?BhzWpJ&d;XLMy1w>ZKknJ?{_Q8eUiI&1e%ZeEc<=Ak<G*kGfv!Kj=I77( ze+>`6H@ffoIpPqX*5_OP*1u<d*7nkU%%wYj`z5z_B=l=<?Z^&PKmFUko#v;1_RJr~ ze*8y)-90}qh<%<<toLL5)Tg`K-fD{NU;aUB|MHIloZp%`mcN&-Z*x@t=Z8=I{QEGU zfB#^8y2+n&@YH{6X8-cfGOA^N``#b+<lp+j)4%-}dHu`3^!NK?d-{X5tJP0`>e=5` zd%U0ZXG}W3uQ&PWuRig2hWhD0J>$cXpZOQ``2W6t|M;Eh{ny8j{`PNsw}1YQb^ovK z`t~pGssBLoe&gGRG1$M@`1=?_{5yhD`>lV+fQEkKcN~z?zyAZ6Ykw~tKRCyq5WFsV zwV(KU>c=rK#ZUj@o>Th+8~xO0cDEdF`u2aH`!~w_p5J=vd(yf~R^=>SVkY6wy9#D@ zz2l$I<=?)Ww03FMq@1O>Ir5Hw?ahZ=n%j$9wjy_Zwwbhi_4-NtlW%KQU$Asi&ZP6t zSr|7v<&^VhCnqOOlRx-3@8W*7ro{OBJ9hJur^Mn<7yAAUyX3`dSJ{8#a8<wlCQq~f z-d<MH;&nOvGla{R&hu+9c?#n^bM9O_R{vJa$J#X+{6mO}%--Zlv37#aKmS6_Y4^MH zA;#YYUZ?V<x#uI*_^W(&W_zV-EmD<oW_PaksnI*keXAYI*_<-}loWe9`_!8fL%o#K zXD>V>dG_h^7W%5|JTYf3^#%CT!1f#Q#bO|9+9bY16)jnZS=#@@-(|<2VArC_&RA<E zt;$%sWc~6<i<hi87Jmog=e!O>!4H5z*Wd7n#e4Snu9pjMNb|am)1Ivhz~9Jn3@_pv zeT6DU0`<>k;hp29Vq<ROo;#Wpe&{b4KMb?SpJRA4{-#AMcwH~*@ihrQJ^q|$;#xSM z89e%<PM5#gc<<xy@LG`Ei(RiSe>1@F@po<$^f*8IV;;KvCF8x1zi}i}@xQJYWqc*! z$H(7!9nkZDM}M4Wm%p>{-p5}geNo=^>Wc4jFnsmWLHpBteJ{PtedztLmmZeegy5&^ zrQ_PU;<!==jz}-oBOP?tOV`(8efZ2b9rS_a;BmhA>uFu{wR1p!QjU&en(=ogQ48HK zjtjYUhG5sY3v$5gswFCS#dj*+`;2=b*3IDtkK-PUAL<3e_FSOPJWkGs9%`oh)#Z<W zC)G!9p%<j5TdQZ>HQ@P-y9&PSzoW=;!|>BJ?$vnj<L}gJ&~E&6y$~B;))n}lkH73Z z&{6oIzY+N9^0x`^ef>3qcH^h()#a}Y3}1h=>+;9C?(+8<-uw7tdHePE3i!VM>Ogn- z<6qe8^7l2~`}%W(=1<qFE52P|`1<Pr-Q_O=@714UEZ)<f6F*3CvIk}ATL=2yF&a`I ze;2`rT`$ZZWnKQF@!rQ@8Yk@Qk9v4H7>kd;wX}2NhyI9N{$}C5ufKHA{`{Q)zOTO| z&~E(DALrQRkM$f32Rh%hY|y^1uJ{&#$z1yAt@rvUY7CBZz+-&!a?qc{BZU2bl{uD! z^3gl5!kBZ@ee}A<y#PGld1T@5$g*c~9^>)TH4pH8{cY2Dz?E0mSlpvB2l5@%b6hGa z_W!%|h|+_|cHU5fKSfKQSQiI#$#F?DwjO`Z4;qYF`d9F}US0k|jH8M+QO5Z^G2S?y zA|{|M1ObzP?E5)N=PF%@@hC3>QeJ9Y8KldAq?^@mr}#w;+J12@agB$b<px3ze_vMU zB&9ROuZ6tPuazTytz7YIRiTa2z8Xk5=H)=VR+D0jVw)oNlP&KQ<a_%kL@`Ve`^4sN z0>Zze5<l?o*n=O~I91=NdQR*M#^H>XIGn{YUuT7JzDE6e6Eum~CVW?j@LlQR&y}aB z@dt$)=S$EJiZ{+&B5H}_2C04!^FlgXu|Tm-vDG-fr5y1xt{}{p`5BNbeg~-ifK3wD zfNjP#75W2OU=RHPtw87>5GDQ&C^F6+;15m_3_*R6KA;##J*)%c3D&#>hs*fEZsn_= z;CTGid)Ng>3I<_4Y}x~apWp=J8b&__;y<`V{0G;HpMjA=4~#XgFQ7NjBjXHAQhu)J z4f4o*24$F_LC_nd`~$a{ASdVpn?;XjD8_wYyI_c}e+cr<`Gt7IZ%CHPTd=LjM}CtK zZ^$0wx)SyWMT-2OII%m3_K+Wxsr(ufG!}Y;Getf)OXPz~L_P%jfqsXCiQgfS;&({0 z$}_}n2<_o_NU`!e#cybm(4jTP905O}^+4zyoGy7dxBznS4=x0f-z@$PZV`V&L&Scl z#yhmYxZXj$Lu<uuDE!fGXoGRyL4JpEbO5<l%-=B7EAurhLi`QGdfNPQ#WtzKVOVe0 z;jldtXBcc5XBhel`%YM@^oOtvl_MToo})C@(WZ-}4}=v<9|&U}F@9Jnkp3!7&_w!c zl5xYZ-W+#$qQo;C^?oAc!|RRnMk4kH?T51tfIM2z&xlatdKU5#amMi=u|n)d)JVJ| zT7^CYeXI`hLr{10dkEsQv0C<5IJW*t;D@7b$q!GLx((Mj!dpdeWQ52^LN5|}BQr#A zr0N~&lKdR1ehw`c{X?4-JB;&Q*x@$C9_O$s+3$yGoDrx8jvs;j{4uc_^CYT$#2(>~ zLVu;+s1k{5)Hdl?quPW&8u?&<8Ljgi-6Z{dOo+(G<SW)2*B<D(jnM8KMeOf?k>4oe zA08q84v$n+|A$wJ{^519j)$WTxsHc(U4dhRrM}0yWu9a6B>u6e^UYYtu|+`Y6-!?k z%lg2$V_DBc9e->qXzF7e8(9ai8y6=1cU+|CkHdZ3?XVk%x}^O$uVS7te}?_Id?4*G z?jxkJPah#&BIA$4dc95lW+3@B#(6#cU|-pY{YZ>N9@&p^-y@hV<3w&!dK+l?iRAjh zPbBJRH1!!b@Q4WMb4NrQ^C<L=hyz0Jh<J(Phy>M3mwX?Qt>_gz5(`E@N1~6V5!0mK zj@R`a4>_+Z<0EAq#>XmpU`IavW4!TLXI{U?Yu?8re)f!`upug_R}Q4!W*KjMr7@3@ zUj-x|bx-~As88l?e2e65e5>Rs3U$RiMWxHQQ5iCB)MlA~6!P>q?4qiH@E27h{-Ww+ zo>A~qO8ZXZ<n{TeVB=taI|}PN8g@rz0bzF()^`i(d?4uporl+$O7aVV<YPWtNn<`+ zNmr;I*Nc8pZ%<I(3Z%SU<P#u!68s6lK=3DoDL+~<%9tw3V}O)<lpnAB1m&m5I1{pD zy(Tm$jdKV0>(QY?ADwJmoZrzYK=?Zv^I;y3MxEMNsdDT;Ti&MpPQmDKkw-^}JUU8g z#7q6?IHlv2#&z^`_>ac=HxO%0&=J6i$TzQ_6EU9}VzR_HG1a&hkxm!8iJ8jBIxvq| zE62yg5Yd~2eM<k6B2<n(V$0!|^O=-qf~F7)jq_a0dlLHJxrlQT_KnR)-?RCs1M-n( zdz_eh!O387+{su!8(S6I1*d5J9-Aoiu^Q*G+l=E1*d5zwTx~?G_X=Pv;@?b+HjXoi zCB_v&EED_Ka>ZKXyqkR3KT2#dK?f4sL_QV!D+%<}BIEcsaGI|7bX+GmpXoSfaz4|s zPK}UHM_%3}#!0@WV_j^$MAbvyZM}5W%T>8o<wYtl5qX^EDXzdcE`;B>3W+OD^L9do z%=ZNBH_rD2)X{Cg_(tP=1@Xl<0TJH})B(>EGa|))2Kww`(&&rzz?quYnPtXtDrwEn z%v$5(I?vScW_B27G3Z&L#&I1H^}}<_tW5DcD_>F9(Gw@@@9`MNCy2+B07N{V0_7vG zHXrAC@@FR+*D>%nJ6rtB&X@I=U95Da;x@rKQL;XBa6WaxZjSn!gZ$CooO0v(k^BnD z=Nw!QSjTgaFOEB>LG{r0Y(4B_uHRhL59M=1L_QbmOZi+~-?`N?enN?2jjT^XozhK; zs3Z3Agl5Hd>ErW?Wq;1AlKnXk<8poHbs87*dLs6_jkrFXPdY*N;fYD&_eAuMMDj5Y zuH%VXm-BNauk*deQG{{l=L3<4`N#wJ>HI21)H(O%e2i=BwToUN`XcobBNdUC9i%%X z{=`m+|D-b6PbXo&QGY?C#I-=<TaYg6wm{c$L6OK$j*#^_8T%mwb|+)KxUWuzKl(Wt z>%n+V#(9TvpN#nKA|K~ru1iv|tY1>7=p}`VUQ(3kCB>*-qRNw1p04stk)IMO@tmS@ zoucb_iuQ+v=-WXUZ()|K%fcMdUzjg=s`kB8lO^s`(-pH73l*_WoY$!}iVcd$EBVPr zu~GWzX=Q?^Z<cY+h*C^bY!^(?Jf~<pDTT_f6I_J8P5+B@9T(}kFRB;*nL6*Yv~JF7 z6T8%Q<4A?w+0lx5!vBrd#cyJjMjfzEr)eDLRvKp>Xg<Fo|GaI+`43`^(i+$KSU>X5 zM_vAfSSXloL@zx|u~ZTJhW^sqjPq&WVk7oTf`z{%Mln^<t5~jBuc-ZKNvrgU3qpmT zQ6POWqfF^qS?>(BTN-N|e?>hmjRT?{m!eL%pO+#&o{yIW%RXL)d|iq7mZgdPvMkxZ z%SseC%RXL)dRPR#<*0vNpO<GF=U<7rGXC-sr8gVbH{@3;zt%WEBCT;{>ijcxJu(wS zFH_eeGezk%#ci_gnY#WfB80ypQW15@^WTalIsdKDbMlH#xgT7qb-EJc^8RpTsQ6nM zuC&(K%4ntIRPIqaQ8C##D=?3hh|l(uVS<jvxGOV(^qXxQJm;^>0g}!$u5U?ufusv? zjwD?OBwcJ=calb)?<8GjoV+htxd}*mvvE92x&lbL$~dQ!Mtx2vjlP{l8ta}#8qbl2 zkZu5yMn0|~-3%m+`iUitdW<FAVO-6m_W(g(h&-(Zjb83rO*#bUU(%sK(&$%fNaKEN z4Qb?`dAJbgC!UWl%$N1Jun>Ie6{)=0IG0i0Ch{!i8S<<ck!K-aJbz|+jdKJM_S`pF zI3H~zwy1uq=&uTs^;rc!)LWIRbh<oeSd}5q8CGF@Ti#||S3z$zemL%Gt%KF5V?LKy zoh16JwT@S#PC2jDsH;zD*Q7M+iT>8O<@v%I)D53su8B24N5Rh;oEMHFjk@6Tg*92? ze+~8tpUbQ%ReR){ezURvf{Cmz*k>onIN2GBS&GQZDb&OMV!YX<;xD^a{9P0+^ScOj z!2Wa*)}7B+FT%PrzO|@#(rb}7n~pcG4@rA~lw<z94_u4-=6&GWG>K<zx{SXz*Era} z)|ScmYf+z^&srUSU9@rTfqY%8jI%CI##xtQg2ut`x>O+a*I}P9FY5}#|2nKQ^So}G zVzqHLQQoRF@=bY8m}0p2&xsKKIaq&N9wX!AU>!J4PQ3CH6_aJ$74(aEa#EFFB=gBB zmigpVNj}%(I?ws6haJ~veU8|zM}2U-^|cbm`Z|eYeVh2dIMO%|h5p4@58jtvoMv1+ zpI)449JRz8<61+^H_jJ`$mc`E&5GFHwq1=P>W|mKi%~Dc4Izrj;&%i3HT`bL6u%pC z#qS2phkiGx{|)d@zZ=y52E=dsYZJt@Y&ti~IFE#0uI`)MYPr5$f_$;=FG2tMoQS;H zh<daU;}9>!{GK4@8Rv;a%+tmq<2Z+OiDIP*VxBI=y3_BaHOBQa5&68Gh<Q%{UWT~n z@3LU=b6Kb&`VakG7OChFf0tps>F+Y+hyE^06@Qndi@&@uxnAZ)h+ba3(3ivSk<h<9 zPWYE2-Y-a(DBWUQhm-CQyaM(8J?JaLjB6%Q{au+R*ViktZ+LyZ5`Fu5$h}7Vc*Bje zfwWuc6gj7Oah~9Ph!^{T@q4j8^nVrBmFsj>oA9qj9(Yc<I!ft8<Klk0I$3F~JLhqA zmC{Yd@jKFpzYKT{_7DAD6D#NMYZBys`<e`VHbj1raoq^aPZ0b3B$4N58`s0+7aG?y z#LX(#ajw<zuSLE&ziac1>kmZK$9u#sy&AE*PV4V_x6JSQ4B=m&rHF(v57%oxt}j*^ zb;5iUAYX;VQsLi}Zkz)^-&AEBjPIs8Ma<u(+XM^Cjq`Bq|3d7C!?8Yv*bmvzFKjig z?c`%WY$v}{_%~}k-Hdu-9p0QO<J}S>=b~G59c~3(3i++*Q;hpo#KZNxHB)J?aq_%) ztM02?JB42qs)#z^e2OxJzAae%-KO%}QpMkG=_=0^f4{~4r`_$SYa4Z4Hln_G&fAFi zSce<q#crdn)5dz0H>iA%$bYBf{VqjmjsJJqO6M!;IKQh?8h$wMJMcp+!F@0DTv7nU z_$4KRcZM0~P{{8@oid+yHVb_h@<sahC1Q_U+V_p6$m=NZOJkJAzO(5X)oT~L+aq;x z59<22(7y-!y_(o0@_TVV$9V3=b(!&$A-~r_UZ(TD&uttfpzqT>-KTc<b%^~R^2P5T zYJ|Sui2wUhC+vHh5U-7e62}ARk6!Q}K>gcTZh|b*HG&Un9X*IVQ2t=4BA!c9@4;HZ zhpNTjLydwDx5@YqYg~WCe7PU~sQLd>k;wm~>+`27q5rJw`bdazK8QR#f`0cP^6*Hw zaehxa0!TX2IC=m2NEDDXuBTH;<6JY9G_Hq-VZ29>Pn(Z?+WZ{j*iAmx-R5K6ZGM?? zJwkqk^3nHgKKAFI$Zt}9v-0;C*Ja>88Z7)rLxle*`aJvSqZ-en8qcH2#&I9{j015# znx*<B#??eV@@exqKH`5A{r+<DIUe;}gpV`5i_e8B@LZhyifH9~6cZJ(-~L9u4C6{A zW-4FDt<d>b==>{+RgQHmpnfN4_<zg@|1q8CW8q38|GfS^#(5&%$5P~TkjK)L_5x|o zaVRe~t~u1-r2KN_R~aX-3y;+*zfSor#`zoaJCwgi_>YGgS3dZUyM_OFr1Im9a~k=n z%GWp^uT;89^{}3csn?|ZX61Jn$JgL*aS4A5=Zm<vM3|s3@)M1N>%9f%Bj$Ar=Y{!g zDO9~8#ZnU#PI<L)eo1*Pkbdfoa{~FD#&tEYGF0p<IS<Gybsm+`#(5s)G0KlM&dH<` zjH{BEB+q3kOH_{WZ2NM#o>f*F=XcaA03YL5Zc}-^ah*kelL?wdY%#6`;8x_H<87@r zj+ddowFZcIwjxjeA-~zUHWNFH>nk97pZ)pa6Ctu+pGcPT<`d`>Ja0aMbL7SF^F%t3 zbiVZOCkmv0KWW77Nz`o|{5@GJpNl<NseD}DP9(n*H2hTIJwJb`3O0^vystuk_?-N3 zAo*d&c{yqHh094t8dom$u-|SZAJ?lJ$xoGjQk5qCqzZlfkCbNsDbJMtQk5h9r7G9B zo~9h<gQqF?O24TplzvlHW?X;aIOQ4-`j{P0g>fE7KKero@F|aRah^}1-_9Ub%KV;o zDdIl$_uxNWp!6om=hN`Zd_G;FH1cE9ZN`NjZk`Df{bw>1)$cQP#`z57+Y*GoElu*e z4fVmiZmU+h!MI)n{jB<V7Uu@apT)dvtTc{gpr3OYXDcyV_|N5w{c}}H*BKZ0$8*}( zpVx7pM?LWR`n>8rUoUiZjM!BtD4lK`#n7wHR2p?V3^a0U$MF}p@c$BPT)cnyOQ!NS z3%+0!BSh~7?4yIA_d=5LYZM!eljp)0alLqzSS<V(k!QwPqkd|z9)BmT<JPEN4e~df z{5{5b0Pv+m<2r$eI=Y{z@xN4PTsfr6<UaHz*x5AJk>k9CzK*pwFEz@#zQlD!oxRi~ z>-$oR+^@aVD)(zIhs%1u94(*Izl{C=FWA3~dbJVuye__614O;NjB{l*=~^J@*O3=~ zK2}#O`0_TzI{7^C<tDlRdl}<iLHl;&!kU|x_ei|20QP`>C0O)d2{En_q_GeA`PeJ; zPxL4zC~7`lfiA~?B}@4kN@olGa+}gQD$kXCypk{Zc%=XV(7q7Jaf(!*^C4X-&$(VH zQM)p=!#<pXv0p*`aXzn98&?RiUi~$wKduA)==@)4H4dJ$Uuib3Ope<Iq`X7@cZz;3 z%()M1J;)pMY7-=Xwdgx-<mV_qSNXUP_?~=R=UharZyxYf)ZM>{p`!n4nCQRiHZJ^U zUZr37e--t{^?5bLxLBXB(l7bwPd2~6I8P>jv+^sHzs)$<w_j~GPR50=%Gvq&tJ^qd zla4d4n~0c46*18`*Ame$nZLj08YiCv{I$e5t|B6z=|t3xjh)6h6ZC5l#_<?2(F6@9 z;yQUc5q)zMvB)?hiRH$*orv|RB*NbSU|pnfT|h(}Hs(s6>hdJ-b@`I_x>C8G)M1@@ zzfi|@q#f${2jrs;>-huu?Z*5_8te8W=+}{7_LbMeMgR3kMK`|12));%fYggoezdVH z@?(MI$16Y1Sggm_JwWmkm7icNC;3T0@{^6_BAo&xovP!fOZ~o{A@%!urp)j4Y?<Hd zIpXgX%!hs9^<3qn{%yKQ>0<R$qJGMizghVe%7-83=XK4~>&+@}QF*KSZBu*nw_VVG zBSPx`4b&m)|BYzz^M=;r8(NQV;GB6k^)Wy0mp9T?AJ^4S$j>s)8sN+IQkQRVU(jE% z>X)iM;%1z0R7yN=R7pH<;5@>8_6Fh~P5+G&_ZuxrBmU9w_hyLLzZoiaZw8B>H{D7{ zsvPGj?t?c`=MnJtW-^fWDN5sfVAJU9wmeg5%)_Q}KCtDeL&p1NiSo;oze#D-xvjTZ zY1F$-HwxAp;p3T`&98SW#wkBuX^o>E`J{b)p~|tJY`WYyUc)@<alL+x@@>YMg1G7% zmEWv<>{IgJ!ugGQZ-p!E5xuw2w`_i@@^ehk4ETKu`)~&Jy~dGC`x4{aLM&7HCY6^f zRx8#h;=F0w<D5;z-VYiDzuSX>q$9v5jdQRqk2KDB_}`BGcM$p5ZwFBieS!OTdxq*~ zsy^;#Y`bhloWpHe<J+$BZP)m=Ykb=^zU>;{_OAH$z@FoFik}@=C-#vYSSR+89Wj#s z9jGJbe+TP_a@G%N<c;&&Q6Tf%f%}7l5%&(QmmP?U^WLHH?5NUl+QhygOvY=#`f$7k z<cInV3F4<A(^!07(vS-z-)mgQ!hb`#aitN_?|IE_XfUox)N2G%uS4lQLcfhZ#QJ?3 z{l!L&^KIC(p5Dg3V?DgR*;xFX=IvS_Y1|jseAXNJIM3KL&K)-0pfs)zjO!irkxQWW z4*JL?uzx33^xlaRy>}AvHGay`H$y2$AF=InRWDEV>Lkv05XZsPuLn}U!B|5{Hv&nw z7;6~mRv_t4<Kp%FUHovK?}ivF4DxqFfsnt8_-r})nvL<s8csRl8cunZ#Pe>Bu||-e z2P7YPxAjX^zDeSISNqtzEyh(reO%`&sNZHBt4X&5Nn<}g1-cP+^%UsFFyS|b8`oi^ zgN?J6@(3Vl)W6M7l6q@o-I0%eYV&iA6MGx~^i}5BSfKo3sRy)8*J1QmqWmgj9YVSq zNIwn6>7;#=<h`*|=Cc!ayr0>LyoE!5XBZIrJEKH@XN+<19J4dYxGo~5$vk(a%Y1g` zD^@C2OFTP~2ivYg$I<cL3pTDN;paW|`(CWb--}mFG%m*ZUIu8y^B&F_tiSiNCC>Nq zWc>HMGTwVds#mId8pnH0D#!V5C;Ywdmi)Yra|rYKew5g~k8?NuH>RkZNO`f0_dfRt z;&`9^7W^jEHP^W*LHsu%POf*8)^ii$v-Qf1V;#nA+GOnYZ>j;(u2yNpN54(Ys*iqe z%h4xTFCVzX{sY7v3qKz)PUwH2`T8KvxYm=OWt`6vQ74xZy^4j#HJ>!DQ??v=VIDrH zRe6JAv+C^;y$>-i^*;0{ouo9@f&7m!-?tFQN1)$AoF8EwY%Es9^@IKLqf)8gk1$VL zAM>>JTJTR4D93)`_YgnYV_Y4?PLbpI;=C2(GzY7GE9B5`4imj*)agjlkwDlrN6B@g zIa$VOPEkMUYL}sQh?nCwXUVwDSTDxYoTuaED_vl$L#bB`q#XNc7~?_y9wlxwt_{Gy z#Yq1C7O#l9WxoGbqcqM#T#vss3IAj4>py}181dB+vt>O$)_VE4z&OguFP7`m$E9-J z_?Xub#PjiHrBOf3@5gnL-;bM=Zc)13*!NQ(cK{Lp$DMLL_!#?u*9)B4?CZrR!AgfH z9V&L8go)iJn9p5^=M$_y>-m#3<NSj5nLyIW+h?Q;fTYWf%R~Lms$Xebe7^8WmD1ac z<4)>V1F2u5{CcGuq+fi3da=jrFwPj*w?rA2m&iC^--7&6-hw*heMSq`t(1uT*?h#o z=d&#s_Z4D;37Sl7RC%Xy@;>PAm?riAjykh3RQPXKfW|m~k5GQ3@OQQ<KSud+>L<-O zuxHGBQ7TVYc`XLuIB3i^b_#yV{DS|f+c;B!pG1q@r;%d!X_U%6#_<C6QjF_Cn+ z8pj2+D^a^FwaZpHt`n?}Pq99{etf#gxDJ8-Kd_%k|D(g$=ZJrF#e;cMzttu3)^PFD ziut?`yOvxTr<HNSzSX00#6`cYsN)Wzo-<m#vQJtIR1fDhu48M7oNrp&jcY9E&%zZw z#?cPC1$Dr@f0iKQw6rLlDD-Ez9xk9A=D(Eam3{G9zU+$~@XvknS)I_Ip|5eA&*QMK z!T&s7_V?$g>n-G`$o<9V>2iPZd7;GndAVYR;6II`uFF4l9sZfAe6OO;_n)Oo*9h`n zgzMerR*X|jRm@S;^G{og%%iPU=J7>{$Uo=)$2`6W7k-=eg)ib%59`7Ce&Ln*eo-Lv z{i0A2*B7q;7w9j%AO9j>*8L0iYw}BtgP)Ilf&IgN`$d)X%`dj8eVroKiGA}6tdEWC zH?-R$^p~g`^1npA*vS0?e_!f4eu+M~0{UN~UU|R!CF+LHXTB^n&iUk*8dnh!b<2MB zCF0@v_V20c2l22DzpRn_m@m->*_Xbom%j9Agz7b_UWfFFT_Mtcc7;m6*@bgB``4~; z>0i4LFZ<H2SVfQIb629w@6!zNyDLfj?m{1;eru%i86WM_jO$gzzYF?2|9l32oc}J= ztsQrn(mAS+{hCO9%$wJlT_wiiIc`@Okp4EApd-oOEOG3@e7O&H)v6!v8|pR5zSz}b zoHtS4rurR{Uo4X|6#VvJrIU?)J!?;u^=?PpybiZ#%Jr>1NA6SF(MNcn((W}D`$T&o zkaVeWWYAx^v3Nh!z8Oe<h0LS9O2%);^>8`$5VviQb+YZzms!v4dSBMA_4HMQTsOap z75P_DQr}<2DL+B3r(dP1JYD74GVWJd#^Q5?uW+8{bAzw)m5=zxkdN#881f4xzOPDD zj_bXf@=_q>Ws>)=%2f~Z;`RJ1%!76MRg>iTt3ATs?UJ~5$B4h((Z=HEyt`w8@V7fj z{Ord5<GgpXUy;8_)^Yb{S;yTtuLV<H0i?XjIPM{hy1$1s>YnG%-8cvE+_@Y1<oE7& z<9yHW-R(wPr;%<3l5RB)J~!Ll1|;2K950dH0|foGF|H+`zefB^NQao9V@ZbsNn?NP zCLIAJ9cf%^Nk;)mV}GAP8g+gK>3IB8P|_YCY3%!rq_J-{l1?#Bp5MMs1(HrTu9c)S zfTXjGllP-vX9G#+8VCO!%GY^7()q^m0qFuD=_2E7CtVCAU22^7kuC$0E;o+1Nh7~+ zldd!l{`-}$kyrlvm9MLfi{F>~x&}xZ>-#uq<n?jVjmC8(=_Vj))aebRk=GkYw;R{F zq;Xw6mvpCbUI7~0&Uppsj$q^B=UE*%XYuo+j&S2*yd9`>#@i8Qoc|>429l04PTVt^ z4&-$M`N-=A^5czjENKsrH1c{aY2@`<(iz6Vb?HF9xGo)e#u-OH`NnlG5&8L)i2DNm zdxj3wJ^wvJM=9=)NN)y`E;Ft(Nu%D+B)!SFSbrT=K+@I5c_97N8`pWnI`l!x8>An0 zAYUoqe}lTZh4N0R?{8dE-{0UmI2iihL;~UOn>bu2NXN_d;v0{m_T6vLr+6LtCPgt_ z_R%+)N@pqJI>PJFH(sStC$?RY@=KI1Rn&d`O@-2^3tPWh^=p;J{A_-s@|%@L9gzR8 zFd*XpSGdx##yJRa{3}89|CKH0qknBuy>ivVKDPB*MgFb&`BwdWi}k1f_9n6WHbLlb z6Qz%Sn<Rbo+dSiF#rWT1zOB&zwm|73rHhru{B3!IadKVuM4KRfzO@H+LHawF(BG9w z-1r-ZuBGt%9oBs*{C?MFocW~NfuQ-B2J`*z5Ty|h<^N7rI>R`VDbG?w9kPG^8~fGf z!>>&@iT;0rh5w&WMf7K$5B^gu*Q@`ODZkt}r^3&FYK`*(%IkoL=RYmRHHQ3Fr8|t{ zVaR#ReHil25b@U;D*ig7#9wE$alA-*jPm29emgx%C&)ORiQ=~t^W=D)sJl1lKL<z} z`-<nUPOPszZl#V}Wt;`n+Xkc_`VIS2XDyI)y~?pJwjBG%mN%;$^RnqyrQ211kLZ6N zD&u~ite7fsf1jb4Df9du=T_$P`)r$U4G&j3PxZXAp5Jrc)XP_Xfg<L2I{8IF#QlA# z@~chIO!8}h<YPUaL>|7cR~pxOuFLm0&+`88`xf=zruOafeTyH$js5w;4{jj*{19zi z{2b<o7$E65<Fa7?1J=i;6O0QrYkoxiZXlM+e)tjfbdC$3^|%zVpO%2O&|iK_lzCcK ziM@|3tJJo$EX0L+wj9AiJHi#IHvs%rU=XlPXlICx=EpMOI~#>>B`b|}qMa*J{92oZ z?~*vJpfsU_(nT)_b<Xi!h@0aKz`SUGK&ElM2>O65An9D=#P|BG1M+~Rv9C~f)&ZLp z>r}s9_0d02pVk4*#);4OtOL+*KBIjbko*o4bPVY|K+>JYu?Tv>2#4}um-r117C-pa zCieKjVKRPjjMA}6dkjAZwSp7vy0e0j5A1g<IM@E%)Cxu(7LvyP!2Yp<x2fMM<HYw$ ztl(-O$Ho4bMH=&&MY_=hMUid>f*u&IsQDe~F|GxW4@CXg7zLzWw9=>}n~sw_4@5mM zF9Q>e;}XO(FjM*HoAsotl&+EW7+5RoF^GwQd=UDDjc#L2!MKBP&YJ>%gA$aF=gc@q zS%dJL8RsZ#koq6wHT*t~H3;j*bsbb7>of@Ky_0-gk53|Q5<aiB9Opn>4_+W9$$A`^ ztq4C`$uG2@6Ich98OI+<SF0R(980=h{WRI<Q|mxHPmjg;2Q~u{Ur2<p@O>gH1oOf7 zjjWJN!|(Z6Az47u@Y?}DAr;0snpkg~>BL6ydyrS;2NfH~#o!-QDe{9*f20Syjg$6+ z*=ON*aJ;?$t-)F!gHw&Gko+_t#v7b2{h<@<W$S0Deu4TcQodXttihG`=j_&CtQ+np zt--a%nnr(3K+?_jb9`$^sK|$eN!&wXmBu*C^AM~b?S~{Povf(qHw1m3`*29M^0AM( zABW^f{SQH0wjYgaNQu&AiksAbx&3^~8d9PBO66nUa=nH$D!)nj*uTTcZ&kkZPisi0 z$V0VGLW7k?e>w*Gp_nJ<6Pj#am#okf`?_R>rb}IiW=LI!dS%?uLRq)aeC$KaD-?Cf z^$$gzazBQmKDi%5%VhtC;#|Xh6uMdM+l+;O7i5LD1Ifp^_*ll#DfM-*k@`B=E%kD6 zwA9nViN^I2^bSV74JIPrT=#>KXU2bUj?DXD#DQ~@b+G37V8n4c>2j5ClQ<4Wzh-?N zjO)u|#63a}h1zYPhoYa6KQz?X{b?w!KNpflow8pIO)}2wh*)165f|q%G}Bmdh-+vz z5OEFFxP}&~ywF(3QI7k`<0#klABz2K+m{*Zc*@Ixlp}BK2SY1OkegU-96thwAx|ej zZ&)x8dicF1w*9aO*&oB)#`PxkLS^3!i&lP=v2g!o4T}TPE?(`@)o-S8meVd<@-Yn8 zlMhIHjpJX$0=Z5ME0lFTph4Do82TdDc^KB8^*O9U;vI&*xQ;aHllx#;i|m6it;ets z>=*FELiL;#rgVhtqcEIn?}h!44CSLAbAN>;VWGee!*i|YiHLh3u~7M_JNCJ-I;C3_ z+ZFc+V$ay?IUI4|TxJbN95@eJ!y}}=hDS<$4UbYfTIqDj+we4F;eOp3o<t_T9l5 zs$Zb`y8gql{x}a=!?FH24_U)?{fA?}bDqO1)UHzP&>!)P&>Fr;`OU%~mM?i9fjlwq zBe34g`v~k8uHT3(V{t!@$N^GbCVhQGwXr<p*8s_{SH9+FM7z@1r?aWo0fgQm_`H;M zhlGjUAsBBM#yKQb@_2|x>3Cz!p<V)zcG$O!>k#cHhiE@J#4GV1!g)}yR{h}lCinLt z9ma7rFdX&pI1zP9KjEp8r*Qb={tefBhv%E1<4B`F;kmRGUTU1-#7$Cn;pI|y;hQCo z;hNv@3fUjwRkA<AtEC>oYb4L%tRKuLydH=+!x1O@PB{86`%ZYXac$%{?8D?Ek2b&6 zIA14?zVbTtI_>Y%TH$S?H`0jSNSA%SwMK>*=L7IF67xNc7-5_||BQ?T!hU3waqT8Q z);Mk<#>jpc87KQ;WP;)MZLE>W_V>H2kx6o{8HxSDbInLxKR=^9-2@#%%(U;bt&v&w zeYQ0+$ME}K*2n_c2P3h+xerDb%Q<8u_BHq2$XYoEj>Pqy`*~!8<aH$a6VHhwasJ{t zaU|-N=g5(*a!wrCX6$p+p)TW!#yE$D7#GjshlUyFwM5--hq@&%hsH}i9Ga?_qgbSf zed3@U*TseV2Iw>Yhc<{kejkz0x=x3-o1jSOABOR>h}iF!62puuh8SU7bBVFWISzgf zivwaFhs7JmcchVT8xw%!qYv41lF~S**mfyumuFnRp&hPAzoCAiajhbjC?cOWzgp@# zBG}mHponCdS45V`Bl5*h#3rT7#Xe%Qah#8MBQRg)A)-n3P>=K*(PA8p<YPatLL3nt zYPU!Dqm1<DQJ6pVM@5Q!6yj&U9+hTX(}@|zHJO;Fc3#!zJm7Z}_6_GXYMaVY-;8He zi<}=ub;$W)bhyMfIzsG6yG4IA>Y9E=M~k1)sAtAKI$rgdU&@mu&!cmckG$A+$S=nq zy-CI$U8!=$MZ0Y(uTg9;u2bp1N$4@*#`!JiF&;T@jLA}3#~DNa@H0l&Zw&k~Ut_9e zyu*+WTdw}cpr0(Ie!cx%#2V8e`5e<E{b~fRFWlE-us+<^V_L<}7_8G+#?h#9^gmm^ zN9CO|F1Clg?(SgWN2G%ff9?>K!$0%oMjv6Fj^aE>yG0(M^KnPY{N1_6bpytAS4jQ2 z>y&OZ&acVG{_P-kiu`coi+%TSkJ8l=$Klv#TzAYt5c}DtF-|A>(Mre5eZyFf+&7F( zQhti`hp}l&XUMr{Y?k!<vAX}q<{4)T{pG7(vHB}ff18ap7xNuk0mS^rq7IIwzQ&2) zmu25)jO~gS=aN;FW1eRN#~C^2jf<7_7>9Uy?i-hAf;gXXx<AKd7<+!>(hR@fWR1%N zV!UyPm*>rK?IMqiH_i_skMsZ`kIXWz10atqFwO*GiE(bC9M`E$kROpKc1I)|D+&A~ zQh?;=$~qiTq}Xg6Uf3U5EdGy#ANoIXvvKh{aAc+UIkH;iH7ajZd9%uKoub|NFyW7n z68-TwN7(!X<>x9N`M3G#uY(cac;t03?VF_Ej)z}f|Hh-fS0aw_=)1VaS>v^iqe5le zsCY$P|EO~D8&xgiMb#>;>lCGN9u+F`qfm#8<EUuk;<_CbEB=m3QaR4Ar;uL;J;Zqw z@@wnEALBc!$+-STelrmC1S9+jusH?%2_Zo8F<v%!6FiDIH!q|-0Z4hOu}&q8bKt3@ zGX#&?Ecuv#y5)EiG;b3MCB6x567SI=is8mehM%J&fzUrXM(Xxx*fY;Z=SrTBE>tWv z7Cy(Zj@|^MKI(j!3yAtYnuv27p2t~7?*T#{9WL@{kFoH1j1`>#BtKF4x}TyqOFc$c zNIgbxlX{It{jffx;ort4#b&AF=r*AzVw|ZMf1+Dy^*<5grC{8NNkI6Sm?HC@n5ueN z630Z`KP{pj?w=M>F9&kcs6UQ7F;DH#$2i}K`Nlev@<JfxMJg{f&c&2hC|#-cxUV{k z`t?BSqYmh2QlZGBi)6e>s2h$qsZ#1>67tJBnS}cMJ?tmd0!h~yXEkZ$r5ZHuse?j6 z9}^5D9cG+=AdP(dfpm=W^Th8lUh#WOzW6z&K>Z*t^iu1XPVpCm>oxtwpdML&G1#xH zzZm5EucRY@q~nciC~4H|P}11H50S>cc!+eeaj?!}Qh}s1jg!xzVzPmxk#Bq+X2l@i z_&m&t!F9ihv=>M^-?-i-jr_k$8hPXVVvsk^FQ(Wy@I2d!DFKo$HIDO0mjOv{GOoKx zZw8WXlsv>>zRYh-i_WK2=7Y0`ozKad&&h73BPAb`qZDHef3Jr%8S`fzCMPIARr&Zl znE9KmeS31I>Y?tKzscE3Ykf`Db(xIkh+NOf`D$N)Uk6Vb^_EJ1MN&VLOVqwx>TNRS zXU9=v93L^RIvuB8`3>r~S^c(2-X`ynyiGC2^#J@&aT(`4Vz8|D6s)_=j{+ZYOo<lx z<aY2$$EZ9>_*2qlKTgR|znO|ySFX>LZPFj7U_Y}zPH9nWmwkP#k^OKi;^2Nbwp{Fv z-KJP0^F6j+=|;t7MO;@o&av>vc^umz^O&3~^FMZv&c73K#2*_hdXuR~I#l#y!$d!p z>j6KpsCUjc)(r$b8S~^i#-iSt_t+%0PgQ%b#2K5e<6yrrp4dvMzt}3Nzt|eZI^*~! z)-ASH_GN6n?912&^@Dn~$8VPLr(%6bPYqET^~k!JiqE?l@6<He2UD>Q+y_&29j0b0 zjef)H)YMIq|EblA4YJ>+VxMroO~v(<=a8w`C#0w0oX2y(v_#pb(~@MLPQ!VM`*j-j zH}~_jEZNV~bi8Rf(kG_nN}rgzS@n<??)$0v67RG^iEkSBH~kdLKA%>ma_n=?XIiPm zH4XXTb#)rz<9?pjCjD|6>XZEv_Y}6D=~!p>i|HY#59m+FJXj~wqoiL=kCuKlJx2N1 z*X&=@(~OJxoUZwso@?xWHXZexOg`ea5plAgO;3^jHXYXko8F}M<%+RDj$fg)*7bC) z>**abejKL9_~KlWw>Ydf`)gdN<RK36GY?aep$C6)5vuQ&c}`7Nex&fHcj-l`9_DGs zjs4I592X~a9OnHX)^~c5+9#-fvE(<d#JJWmjzS>qFh85de0ZITtCYOQZ8Jf9-W^vB zq<)jES6qu?oBjElbzGRN-*MsM|2V7%*YP;S$Ng{|`b{<b92YD5;kY>CdVze8_&E;w zW}O^|>pIu>III`@{c#!6?~luo{2ixtcU->m%M=kmuM5W^e%lW5+jOVk@kZ>AcS-(_ z4^@7cjC*{zj=NdxkB?A!nZ$RzuIurgLZ1+?n5I~uxLL8<xPHL=;tC`$C)7wjPN*~X z=QAhN0}<~D+CNX&rh2Wa*D3ce@h<Tfk9ubw;}IA079VN&@9?bnXk(p?JjKTV;V&L} zMbEY3HLvkWa-E4!G}bxP!~MZI)I+}6H{y|R_V4&~^_wPf#Aiqx@tHb4_A~G2;xVs( z6Vcaf`v$R}VMK2R*8MfeXP}Qze@2?hv2MJ-n6XLtC(sV#&!|v&t;#*hr+>sXL+fn@ z&ZE2^ozV#de<s$C^PGuwqo0`(qCXS!=QuNU{xh>Bu9+Br82BgP`kO}mJRtpe<@1u6 zx_&c@<vw~Q`V;S?XV%I6<xK70GuzZ(v)r%GY?u4>nR|pkE7(})!v8Eh?>rawv%+QE zSs42~@*{xcCnz81>hsCR`kYUGrt&k4l}>&ZkbIrTtUQ(H%KgJEuiQ7x$~XM?nbs_v z^V#QTm8f2^u@=)0&i#w&N9%bO`u54xt5p34=>xMGr4P(%l72c1^JM>=)gt|6R;%=v zS#8oEXSGXzoYf)MfmwUxIxq|M%kv+Xf!7mHu#Dqz$#uySBG(}g){*_kgZ{z(<3YZ7 z?)0F}Ij+Yoeby5xeb$4%$3EwYmN+~y5{D;N;_$>t9G-ZIgTL3*jsyMAjw4aW$G+fo z(1ZQ3g#K{9yo5CJ&${wt8|OwM?w^=X5At{c^-6%$E0g?s%H_Q6sh0bFPrc~RM%`Zm zyV)5^XUXS6vvZWLQ*1WQwbW}>y4^T3NozgL!Mw+Uo|7Vdc}}YI<vAIOh?o6(PL|TS zintz6rClNRG37--#671>`pBG8$?Kd=lGi!q@;S{M^vxG&w+->oj(v}Ib;f>PJ*QFa zaSr8mVNR1=7v`W&Xg4?1@b|Y_bHjkJo2&b9F2=ixa`eX|C`a8LK{@iqIOo<XA9=C) zs7Lbgtb@NF&q|0Dc|xMd6EI&}o-cVzs8Skr$ng_Uha7)il*s4h+rN*_npdne;>m#C zJgj2|^$-u|JFf~zy58{jxLNZW#m|YsVs|3){weq;<{19oH0#7X<>Q=h(^WG5iQCk! zRpj#%Wd8HhWZe1bGVc5W`}f&d^YJ}w-iOSuHvBz-)_mpx@yu_O`C{639VSK!KN0g{ zo)S^-P0&wFk#Q4KW!yxs>bDsFo;NG8L&i<qBjcWg?_+X)CxwZ>lfuQ{Nf}C`-_ZX_ znM&s<T_K-yoP>EM!+rt!ZW%GkSSt|k0$hhyz;1y@_QwJQ?w}mkgU^ZZW7FBjT1kEM zv6a-%GmdL0$92Zm!#=x^a`deWDc>y5Ul&xXUcKtI8Vlc3wHCAisfT{dKED9xp|gM| zYu-){R=PpPPr`f|M^d@qDdG4YEa-*kNAD4JT^AOMe4*+s#JbRKVT*C$-}6`t+khDN zR2}D3xA0GmRDP-GpNjoM{ZpHi-y!^DwM!0GI$rdWkw5xPR=v|&jQu?4v^F64r*9Jd z)3IO65zpz|uSAXSbm-Z1r}#U=h`%#Jg?|R)Lp*0hDIbAQ{|ue)8S3W@^>c>CkrFO; zDV!(bNXZntMe27^o^j5ApGC#S^%N0(<z`~Faoj{~mi#Wl^<ydNJ;urF)|t5OM<AXv z6M*o0W}5gtv(oT;{nnY7#|J>Hsl89nV!ohvmRsparK6ROQ94fPc%?DU82U*yE`EM= z7W%i1HO6@YX{=8;FctN%g_vV3d|%c|MV)TIc&R1uLw=cYt|T@Z=U}4d>FiKr<wE~# zHxT+~GY-hlju-v2lZ=!7{p@t(JeXLd@(TOk8(C*J7>mz^&u#?LzFq9j(fpp1CHm*& zDVCU^3Gj1HjnWN@djx+IZk(Nv|0dEnUnZs+=bc0yH!W85(h?MPJ=45Om&&@NVZL0K zb8{7|1kcM?)bY>j6ua|_4gbBJb$+>Gh4NMJ{ASo;p69oSeR`Clj-QV8pnZD1*rm4! zE=Ip0f3e2B81+U!i@jpMxKQ+#L@CB8YCSE<5&8nnQwHk@{xWpF8Kp|=xJ$!@UYa1| zE=^Hd^S`uR=w%^_F~)f+{4G=YGM(>oBl6`s-tr9bw_MkAx#nwmndoIAem=j=jF$bL znX3HFit2ZT`dbkx{#HPr^I73hOgFAp(wRyZD^?1wj1~Dx)nB<u{H)Y*RyK;>g`tX? zj|&TwE>SF3tPsqKkodDACH|~<<?B4M)PI)FV^y%oSA{9M6?HzV5|q~bugXzc*MBvh zSFjFNX&tQEB=XfR#U#ZH#X`j<#Wuk;I=?j<=bBRGZ&s{Ttd{ZC)Jxs1(K^Uh`)s$! zv#~DRH`$3|mz|}^eS~<k^Hr|-%dS)T9$ANr)Zazw?;`bgk@~yHEBY4|h`);p#otA` z4r`;0^HQw;+I-Pl+iL&&8*454?~jOUZHI9l2Kl-Y!{5(ft?LlIoKzDu6!iKAq1P+_ z;xM5vPF5^b)cIeGxY=(uAYS(O4H%#OeM6k+Z77p|yP;m`M#X01Tmrq^7@>1jKet)v zOW}upFGD{h=4riNuJgKF<G3P3^smTNtP#AjK(R&8t8%Z}d)3~n>+RLL@a_@)tBhi( zqUQZ7<h>B_Tve@no!8Yap|95YT%D|Rs-lj6b*|EtijA^wuEzMh&R^ZGe2wE8jpG`f z=QZIXza~mCUNK2ALs8?sM(2Nxu4jI*$n)Kb>L*|4ldpQ$>Uh^Ch~BmE%l>pN=D|3x z-K6{)Ma{#tm=F8Wb!vZIwAfvTywL7C^>>}ddtHj^rzvJBYW&v~Dy{Kd*P{Mf)nBK` zuXibiD26HOJg?VzULUJ`jpO=Mr85+D-0R_=^SEBup+Nl>L<_$_{S+iBt@9{QKLvTp z&sWs=3u>i)ZZN{XAyQG-@dnkup;Gy3cSD`hO^O=d4I1B#F5%x8s)#tbUN<66=KaPb z<?DQJOjkNfF-KA3zOg{*5=D*Y#s=g15_!2P-u`#J)=k(CyguJlA$m783l=sR{<}r1 zutVsZ5fAfuv(EEojpybR<);bWqI$O|eXHi_R*%SUZBT3%EQ+xIU7%G&JIuETb;fgI z5$=DNW4t1q_iSubd6UR*Gsbxo<hO;{|DMUZ4bQ1cNvr?grpP>ho2{59etwJl63+j( z)rvUZ+BEJ%Y{a>h<J}&tm?Zq$)09?!w|kXesQePajam;IwXQbmdTrGFZmdT9@V}As z0sbyjF-lSOe^;us>fM3ovYg)?n)f?2?{}ojxOZeJ<|=x{{tm38ZMR40k_bihQ<AN; z>X#HMU81;2QR6SEmbxj?xJp`uzB63(?sO~aeD3TN`YxU4T{`|<G0Klu)Oha7kh;Gs zOX~ivDwVej{@x{d|9zO!>gV@yN|z~?D>f@?9Hlx=sphXVP2{DU6>Al7zxqD%eYft* zyF=u9eRrr_ukY4z?^b_ztDn0wR4-HYip1aDn#a3!K6h6O{~nF|9<S1<WA3|q^Mt;4 zn_`PGqp?5kZ3SX~V48OQltqeu8P2ghpOnSRxMi6tS3hMsewog*tV;S=S+nTfr~d9w z5E|;X|4k8!8t0~brOOmGzD;#XH!AKCd>~5l_&|=V+XFSie=t-rO%ZwHb@{;pS^o!- zH}<^;t5vT4A8b}y{XgUq`k`#Y-=koahYMXEshF&oD*K=udR5fJInKs5kw1)m#Qp!U z=I!BZ;r|iP0sbHL`S>3*g#V{T<9HqX&6>~6>gQ1%uOdP8D)79r4C_*n3dDRW3g!Or zu`H24u6mE_JRjHjZNWOTKU795Dt~K~tn*f!uXs+~nke(ynlE}=3l();w$><JC-_93 zVwqyO;FBKX;P=~}OaQ{~lS#_Qb2EOA|H)h+`Ca-A633H`5=T{stn>dv+xx&rRh{YM z@7#L>2?-J)Xi(HqqoSgQ5dJCZKmvpsAVS2bXeK0qq~@Q=fU%|RY)g09F5S|WcG;HQ zownGrE4v#lZE1@-RobFrjf#qjI$E@}r4|)6D(d%n&Ut6%B*xv(@ALWX{Scn}ocFx% zIp;m^`E$>mOn%;E^?trlajW7!;rDcee!1K7U!JhIC#;A#>4$s|<~g2A?U@Bcd3z$Z zU-n=gzJ_wlbGby!a|Yw8zftvY9%b~lsGgR0Phj)igL7!s<DQsu_18V>uX_$^y88c~ zV>TY|Id0?e9@Lw0c`wEt?cBS?=D&BF&37;SYUJ>fLChn}cVDT^ci$|V@4h)!eqW^` z&YMj>?Wg+=Ykri+I7m)bj3};DY*9o#neSIPCpv`)yM}8#{%WK0KE>Ud?~roUzhC?P z{-{mAU)y*8aS447{c`^R5bb{e>n_hz9%zx!_mTbp&Rf3EbUfdg^bJ=30rl?#8ZQrM zyzIsNxCi=syKKI_Tg1PGe4FyUiU%zII@kK=H|Php>$iwg`s=q^4!$4MrteZzKmPWF z<@<^hCt3gR3tPYMgJ0QC`)aJced?!u+im^__ed}i<vdhs`9oET$j|ZrP@VFa9fuFa zF;3u*hj6~k@$yj8j;n_d{~T8j9k%%&Ua7c6QS1M(_QS&iHhq7;qQ>PT1(rX8c5pp- z1oh{7@QB96Bd}}ITQohc`7s{Yj^7;?kDs^r-4P)4@O_AeKZ^O$aMY9XNB3LaUub!M zk#gAOzO=s$2>t#I_8h-IY0K?Lzp+03sINi9&3@#6tN@7g#|rJ|>mI9>oE+5WG3=uj z5RspDA3J32K6c#NeH{C|6y%TRqK%M04m*#)&f}ODx|ojnfclT4T*k!{QS&{$p(k1- zh>@co>5nIN*!n!tr+C!nKM=P04#1DpKY;b~2Sn71?;8%FeSF_=V52=(Kd{N3s~^yQ zJFrdV36-Nfp2Hv5Z_n!w9JA#gIBv^*Y>M&|mOlx7*8fSY$9xa+<R1Gz;K_b#=g9+# z@C)re345&PQ$?0PHAxZk<Eu=^I?DGbPqBYs@2M{9&!;wu@yAnJZTp@=eT|)6!tW^# zJ+(*qenpH^`r#=&=Z9$LFc5a1MtRhG8tV|{PnRpgZ_M{}MDz7(KKPIQ@HFDj;5JR~ zv*kX$Te+6|^nm3D3l+7zgC)vK6=x}89J2lg>y)pw?LXM0e6#p3QN9r|kNO?l0z^9w zZnyP5xKs1>sUGG<*7IOex%&U$LF?y(DMj=r{qRh&<xlPf!u~U1%b%&S?~k6@C_aB* z^%<=DlTq$78!)!WHv`EN;zwu)@oDr?ANKPzyA*fZczI@zjhAQks+}ap813u_GJn6? zVLh3CNc9gZ9#K0-t(|AZ*8kbSrazmj>6OaSE{@-4)!)xn+41l!;*8_r*&18Uvn#Fr zXX{`O<>Gt#%=6o`nEx(DyPn;o`8R9+Et-F~%9EN-|H1CTeaeX}2lEI0^_*CLJ%{JA zJ85^o`t>>N%jwtWitPKm=L)U<bErS{pPQt-L^(c3$bG|e5efZ;cB_HRS7+ZtJ-6BZ zp3ZX^CmfH@ZL@Lk9O}pZK7{=o^$yiqy+f*ZC~ET`((!j_qvk&(=J$M`FSg_3d5jm1 zqvsJ1952r!KFMD|`)KzCl)?JEfOd|@{R@~cIS+k!$l?b_E&e%;+Al8@SwFvka#-&d zCfRzwP;Kk+!Y<{A3%29MsPON%hhA&~qP!Pl!oLe2da>Wi5#}aeO52;#_NKJGsr|N` z6ylEaP3nZr{}R?g+I^|l+I?xGwfhp{ndQE;&+5HIedxV3VAEg5dT=)6FT*da|I6?T z<uC8C^52(O{(EiD@B3{zzdvBh`Tb#A&SCUF%Q+mjb`GoFVbwdlUFGVJ!$+;%SBh-< zEBh_JI@$X9)hX7mul7oC4(z_V(Z<KC+KyMX9j_j<dVh%7a{th4?fzk#rXREQ{X;_W zxUKgQ#3k!{q*VN$puI=XZ$Cl%kIYg|JLK!Fy(33${y!qVsrRQ^yH5To4vu_(V%)*b zpVY5^2K_7Y{TXplNt`48>qPV;<Lb{VZTtSb)7ty9#`&KS0JQ(-BZ|i@9$jhcbCmIp za*k@8|0S?~`Af{^`-}G5U-l_KVDYu6jq}%<Y@EN=V&nX^0}_lzd9P{v{;GD471`&n zW0S1@F`RRA{2tq&9P{VR<U7T?k%;-xaKs1s>sY7gzt^YO`o3Og^<LNbd0pe@b&a1l zG=AP-+(7RQ>Z6@+)LOka`fQxOq3wDD`>1zN&YQ)Gcy2Mg5^aG#zV|5f8uZ_+w)>Sg z;djnoZ(@A(5#!>2NIYoQ>o?(d?yKHBA)&uQ|2XD_zk(kRZ28Br4>BD4pktI50x2(2 zoPxG8y%fmw^{6{}97v9JkoXqtzKQg=N`U00wtjC_+H&5)^Qw_U-^ekJx!-zA<N2-a zutohHK<Z<jW;t)+`GEG{hJAy0E})&a@wound3%So^R~vv+k2ry`92`!SkH*>pnY#6 z{T;OLZF0<SEdL#hM}sA}ryT8khw@5IpCh3GrdI)(j(Ll}C-u%sAbC{twMgharndo^ z9#h<_@;wrIpK{deeabQansN_F=mgVKK&Btp^rI5`faz%e2S^`4T|WdLKs!Dp*M0AR z)_))@p^qp>{rO&Jpvu}Az`3k2y&A~$CQYvskL$%i3y|s9pRzs!G4VL=2Q~nij{T%b z-z=Wb^aPOUyEPr-Bw+d;Ak&X%`cX_D;O~m%?_xZUATL%vNxYHdr8Yj^Ef+7Be2(g4 zJmtXdyAid6dCAlR<7))dQGa8vP16s;9@D$ju8!w{6znn`^Q^JINxVFAv?q_{ZBc~& zD5f6<GF{v8o~~Q(<%*XN`FjOG$lohetP!t(>9s(nV?45+?{z7{zoRLS0V&_8>2dM6 zpMDSZ;rM(nq3K)28^iSNK&Gpo-|G{vkm>MqA=CRc|32}?G97*y%k*@;(Qf`e$9w39 zaY%nZ-HrkA#v}cG^v8InPqud6M|+BxJ_X41a`7gRBYq~3M>L<d?|roUWXe|pDcAPC zkM^FzbhP&rrlXz3<QswHo7B!W@g_1I?VQN;9h#n0+$|nIpYr}*Am#nyokos+I*nY% z&xu*Wzl$3>fw*}R=_hK%|2z2q#8x~1oxuD;|DNa*v;Lget(a8QdG|!Wa?G1tr%oKU z_(9Y@Pkqp3=iv`j{sAUZ?u$Pdu=~Id3lue;KZM^{j}K$k&WC9K6XctfZ_)f(uMhV~ za2MsM2ltsDq94sZ?WkQ(KPs1CG2|arTm6rs;_-a;qb4Bof7GJs@cZdZj{}*$!LElN z!S9z-e~Y#I(N<&ElM<un$s9#%$CFLU`%Jl>SigC4K>Y6@cI1$ihjNX7yilQX%tP3B zdZ7}t9(y6g7xtZA2>pc5>v`q_p+w9>cuw^~ZK{WP-RP}Xy}0TjE=<1tra!$9{Dc1V zJj5%W!#%GENFEXIO!7(~`9`bfZMF8j9g6TX&WSv4uX5X;o*&r!et}K*5$`P5uTj2U zx%$P&J`eM!=N~isZ7;w+hCIMN2J@*G>=gEw7oa?1PL=grPK|QdGwEA2eW%sW>9hJd z`&B+*aRll^KaN0L;XKG2Q3*sjBUak_ji?iE7Sp3Zrgv$2n|QOCj<}f3^bMLG7w<Br zBQ7svI_9Cv$u|SZ5htcRw2%EgGS}8`WPz>UNc1b~pS#)G%RON+uT)X}owvv8=N(i$ zV)aIewKpoT_C_H-Xm3=t;(BXml=^!V#tX)!hwm}6xLt9l;x5IM#r$H$N?T4o{Lg;L zS3CKAR$id>El@uev}t-wQR`8#)z-fN{X~BhBo%c$6dbX9G}=Y^=tA3$(UWcYqo>&N zN7q@qqoayC-bQOYo}~PwjaGh=w(lg3(=pnvG38c1rbe;FmNTZ!mQy&{rWcloHwXP% zh<SYu+Fv+J)5|p-@nq5~H9aEU70h1+WPY_@SS{X_Os@qp9r1?m3GoV70?FYotY=<f zuN|L-o7EoTD#G+FK<3l_E8HsHT&5?0Oy8mTw~IHA={tc;-=*n&;#DwxH<0N`P2VG4 zCDZo;nZ94s_lY;3>HR>atN#iQh_`_0hk#6P6K^4T3P_IlWZV}X7O#rwM}bHmt9~D= zejPi<mNQoUHWqQf_!@gu(-XEo#ueK1aiz-3m1~@hgTENp<1k+_{>N>z@iR{2dz|+F zxRmwpxWm@J<4#yT)Ya&Z*ZPcKsa)-k@3rk29}{m8+B1GV5cM3Nu=d8I9L}djxmK^J zL@}ZmSKOw!PjRn!pMt%j{Xps;5$|ep`0Hx&W47F)0h@n<`fY->D^g(AZ4rzUtlJ_* zX5AK<V%7-})C>J2g7%}IM0Oc__(OCe=r57IK&B^6J48?~v_qs{{QUtC{f+fmxK3d` z6+yo?F#VXOAGhftBvH=w%OL##J*;1t1c8$!z~>nxG(`k)fM4vh`k^_RKO+8Hlw+L0 zzxY5bkooFF0;U&3kLfE_zgq3LsQosz-z5S+;sa1>Kd$ySsQoQ!f2-P$B0ueJQ@w=s zPiTjh+h^8!yzn#Yyo7eE-K5&xuk|>f^}z3OU5xsA1tLF(T@UsCIqHLTmgn8rWSH|i z@$ej5!F*^xzh4&Xt?>J0J<QuC7SaBrOh^5WGQCOj*Qp(}8|$@rZ6a9j#p?x<V?8wb z8*Kf(P2%Ho6XK!W><<s^WPf;QC;P+OF6Qqha$RRXd%JAAyxrDc-aZjLFXN9Q0IAon z_TlG0F&*vx6VnG&|Af`|QGfOu)_pIGd_Ly6F!K3PG>Pe`H{-<b67MX^F|N)cx8qFw zxax0KMEy;E{2pB%^|c;8#?9H($9!})^$*(oL8*A>AU&7^M0yah^$yg(0p{fr%2B@( z%Ij2KD<1uTeTc{M0xdu2Gv^oB^q{SjCxMh>{Nfovf<r1ltnwo&Kc?~lJ5GaxiYM%N zg(>c{C1;WyuQ_3JzJV{xG3OhS6Setsu+QW8&cXU*@^3(y)Z1+9owG^2^I$Az3y}G? zs(gpqMg5;Z`iMenZ$y!`Hv;ERv^Sy@^(D5L{kd@eg7Xp?v0ZVewKw9JwTFF+DSxE; zXC(Tc^~tSK+%NtL@|1F{6X&CTBl;}n9tNU5dBx^DM)D?^^BBnso97n6{)gx9k{1yV z=k$_S31t2%+ul5s!}{jcS^IfWJ1+8??6}B7JmGT#lDFQ*Wgg;*{h6n6l(!xFw7Uby zbo49hpLa;pQE!vZeq_F*%8x5Ydnw2M%gC|+vb;!nvGTC;66I5r)8EverF@R^O666` zYwb83)nw~GDyFzz{1nRMeh&Ku8MW2U+oKYS=(h`)z5~c|blxAuc2N)O%!QO=ow<;5 z^eg9${6M^mke;6lM0$RKrepp#@)Gf;P(B4nd8wTr^ULl0m|tn<zx=59U#C69(@VrI z>)-rdTYmmVwHFufV%kIeUQBzNHD5}CuR>4ogY}T>oM1f^DYkkt$@Z&+tv{sH#;L%c z>}NiQ8H{K?_|x!eb51D&zmBH;I!!Opd@Gg5wH)~S7c74RkajoPd7aO7oYw{8<Z0U3 zCg$(*N}uX&7r{9p*IU84py0XBJHUKNJFjz{<-Cq{*6JV8@)2jIo&y#`h1OqYeTBVH zvC3hK{YbwUEK&?BPF7@`F(2cLSgBa8i1wTGsA7vE`pcyED#jJjZj+9<Gni1^q1dOm zTQRA)PqAO|pkhk#h~hED0gG%m%fa)p#X`km#jxUJ#ZtvtiV?*s#Ttu@E6;;*+9lF| zMA{{mE7A@*{YQ)_(vRe{OQb)Ev`?&6tW!i>ne?bd^Zbr{A+-}yJ0Z2heGv0=A7oJN zaQ|a?+D?=57R5HjF2$H)ui|=(UP|$>;t|E8ipLa>D-I~0u;`<StcM>c<|-B_7Ah7g z7AsCt3@er>PF5^cELWVRI7cy}SgBa0sDATnl-DZODXvtEDmE#$D5~GEAF=I<DfTL^ zSBxueP~5DzMRBX*HpPVEcEvu$U5dLE_b4V6_bTpF+^?8YJgj&`@u=c4#p8+tiYF`v zqKF&zUy!R<pjfC_q*$ytNimE^4eFIBmTG#r;w;5EiV?+1#VW-b#ahKW#g&Rt#U{lT zMeV1cOL<JOS8=^!TycZqM#W8vn-#YxZdKf-m{8oVxI=NLVxQtJ#odZ~6qAa3756Fb zSL|0jpm<R6kYY;lu;LNLql(8Ak1Gx+p0LQJhy9Ds@>tAOEKn>|EK)31oTM05EK!`S zI7P8kv0QPM;vB_@Vx?l0Vzpw8Vy$9Su}QH-u}!f{F{aq7xLz@?xIuBF;wHt-idz)7 zDsEFuC~jBWp}14APjQ#xZpA%{NyWX2`xN&p_A4GxJg9g`F{OA|@rdG4#bb)c6$cbg zSmaiM{XHU3%vCH<EL1E~ELNPP7*;G%oUAxSu~e~KahBp7#fW01VwGaGVvS<0Vx8hj z#i(MFVvAy%VwYk}u~%`uVq9^9;zq?yiklU;C~j5UrkGINuDC;Sr(&PtF2&u7dlZw3 zdlmO7?pN$rJfL_`@sMIl@v!0%#iNSH6pt$oD4wu5QWOKlT*U&#Ld7D*V#P^{VZ{=~ z$%<1HOBKr%XDQB6j3`zrRw-61)+p90)+w%3j4C!MwkWnKb}7abdllC!#uYaxZnT(} zP~5J#Lvg2KpW-gX-HLk@lZty4_bKjI>{mRXcu?_>VoLF_;t|E8ipLa>D-KvR&y^U@ z=DCuXtLX)bg^ERr#fp;@!-^$}lNF~ZmMWH8%vXE)YR{bequhM8m#_Bn)n2~Z!*igS zckmo&F>P;_@;QnT#Y)90#cIVG#ahKWi-IlYOw@z>_3=bJm)=8!9}F)Pe<wNWZ8)9} z|Ct>1HasleVsg~maJ)yjgdFuY9On$1$x&~^XNms-IqGeAMEoC;quz#BiGK<?>TP(9 z<eWi{dK-?<!T97Wl}9CK6nT^K776}B-ln`uytU*p<-Ov4lYG7MIF7`~Hz?mI{yg$c z$~WWKf_#f|ykB{ne4Fxw1Ow#TmG2Pm=j1z;<6P)r@?FYt?)NhJ9_2~#e@(tu`9AUg zjeNiIe(~=kKcF1vTP5U&l&8dBM1ENL5efE_A60%#yxru-l@H)Kn*4<2c>eRh0v-yK zqyK+FUZDArmFphkBbTV-gz;gx#x>)^a2+R%55vQ%U!q*&n(<-e8rO^u!!@oMABIO% zzf!rzHRHp`HLe*ShNt6trShoiHz{vX-ln`uc}#h)^7YE&$~P$AsC<+1&C0hZ->Q6@ z@`Up3%6BN=sk~45F6FzG?@^vqzE}A^<@=TQD?gz8pz=e?Q_2r3Kcf7o@?*-6D<4pP z!g6yypz%TfnsWkTfyxVQ{!o$fV&#*Rhn1HopR9a}@>1pH%4aE`V>#k2xQKCAApTWE z%tv1&;(WD+SS&f05s_~$u|T|6iG>mzB;xb2Clirx5)tuzFA?^>K}5cfh{M=3;~e>N zY(DQh!{rOx`iizoqV~Cs^AVrpq(!k!u}d+g*sHi+F|N2laiiiU#m$Oa6t^mFQ%qRI zdjvCXy@M8g^bg0eul~k!xPK0LLcD(g<|V~{fQWPDtwhW-e;^(fzleBD{4W7V4Olz* zb&6;&?dI>ch!)ETaLyM7a}^OUhEt?+gOD49+#uv;z6mQv6r+l9ydR@}Lh~opZpz9t z@fubhQH(0a6%&d{#gs);HT>s=tz9po=~2bFVnQ*gn6j8Tw+SncC`J|IiV4M}V#*@i zX4)Tw6(fpK#kgWZF{zlcn0YP@+i{W;vEw8M>m<iXPTY=zoP^|*ktZeiJ7P+_M}c_G zG2?9n^f}%}K%e7gL{z-@h;i|ohzarko|qKx^Td<{M}gQU2d%`gc-%LPjEJ{_7?ptQ z%*ePMmm?E)oQ_P|aXT_4!9PKcaPZi_xzJxqj7ab@F)IERVqCnxC8GWu*SSf&sv<&v z8!%7A|1A;vcMzff@5HDCza+-(c+W%qIsOs%W<JP+{(pdDU+BF_3`_79F(TedBJ{sc zjEny)F(GC?7=`jVKj7Ry;Czvf^8bqneWvF}B!}ZCKPvu<#JJ>4Awqv2F)1F~m!A^v zR$zfh!2L-<SaR}-5%H^u&_9nD7oX#`AR)nCVp4+tCZ;5)0*;10^+t!qzn=*GUl60> zabGk#F5Xkbg!t=;N%1+(M??QC;7KChuZSrBRANND4aBJU9KR>UaU@AhNN_1JDZvxO zl=ua}F(Up$#IX415+mZXyfG->q{k(gPY!+d+ZgE6-(yk|TnH>g`QIjnB}fn>5?oA- zN^l)9F5Z6<6B4{bOp4im;&TyZUpf}$&qVrI)c*n^%4ZyoMfu#<j)i_3F(El)h)KI& z9h(xL@iR`uV;qhPi(gJe`JDI0q5KpvE<pzo`kX(<L7(-;=N@v3f#XGjFA~GzbrK_z z!}V)?RQ&6Saq-_JCM5VNF)6_=VoCyz$0CuO(}>W2gBX#3@l+HQ?@nS|g3l5Y;xkT) zlH%P*Oo{hB-~_>|QX=#}M}$7d&4j1~8;Q`LM}$88Iw2|kjl`4$?B|n3{29bBUfB{O z;&&0F63~w)$Him$CnqF$oCtl!&B-YVI4)0t{`<tR_~VEX2_7Rt|8!zpf^QHL5+sSx zryov9Nl*<eM*A5z#n7)OM#R612>ok`DE|w@gm_%1ij(5qLWKU;ffEI<wuxcMIiCpq zKM|vn6Cy(YYeeY(l9-f$<xNb9FThhp0>;;=Ve!WkBNALqjEcX27#E-8<J5!%Z0D&- z@qa{2N$?rqX(HYY#ISgqh!OE0B}OG+Je-E|*ASuq8zS@%5TSo1aFR&y0TKH2|D=fI zTt$R_B@z0&iO}Cqg#IET^h<!Ji+x@=J#3#VPLGIr-Z(vKpF>WEKA%rchyDODX`g3K zPub^=GsHgcoDsIqL1#q7JRhAAwa-mwK%dW3XF&fi#H4-xIwNJD%gz-0ymlt^Pl5bQ z=)XpUKHGa{T!Pn$3Gt^AllFP!%#?i&38VaVNDt%2BSw%wjAD%;#x*^mm{d$zJWCYA ziV?-AVq7tym{d$zJX;jQiV?-AVq7tym{d$zJVzA6iV?-AVq7tym=urW;2ijG7O(`( zJxmNsV0c7=E6AhbeU})QU^@~1WBisRC3u*a5^pu|ToL~W5&9E|5%EV7qY^wqgnkh* zAvvRoC_hGo{wu)qL;{Yx^TOhD-8>Ka4-%pOS7KbeuMiUwa9uesDgJ*Dq0f2deDpuZ z&G}&oo+Cyi;5v7HRQxH#xcE;Kq5o%MQi8jQDKY&$Sro%|Upg83zk+;nRMVlqgghZW z=eNm8O;6#YGvF79_+esL0<HrWK%a4TK~#dJ#JJ6WK|%t?=LJdeo+YNlrynj936>MX z;{7)<A~~f*=yM-%VO(;?5>ftb#H9G2B|?88@FEfaABbTI;>3sqn~72JIe%Rg7oY9E zC?UbW5|iTR5>w)T8aM^j>n5W7FB2o;F&?Hs-zP%<ATc5S*~Fv-D~KuaSf7hUf|H10 z2}Thk5^z4hI4VIo5%n)2CdBI@CM9SiLZ9>3B_aXadr4S)j=xJH;@?AziuVi=`i!ef z5)%BHsQ$ksC8qx_6~(XwKZg9$hy<+HrO@X(c4=IKGl>a&<cXLR|4w2`f}4S*B0kG0 z4U6|hVnn>35Tg>jL5z!c4H5cWM@pezNK8o%?M@Z(?k9#NxQ`f-;J3u6c#PAjaq;tr z2?@SUOyYZMi7D|f1C~L*nFxKBTNV+I@mUs?9L_&wX#aUc=yM$}gMKYBCEh;*r-=kF z62s!t|I;FpGn*I{pW|T~%4d8{gFeT@H0a+zMEUIRa+LohF)ZHCh!F`cAVQz@D343P z^2-zW`|CvL-$aBy_u<n;f<F<%5*#C<{E5UU3=^TxaWg$30poRgQv6~f^rOHTB0l47 z2J{){Goa7$G$ShBN5r^zUneH;_ce*o|68K=|4bA^f6oky&-rF%M11;rrj|c5E<W2k zGa>%p5R*_Krto)jfwMrbC5FX2N{rxpt%*?y?j^>Nfe8J%#3cSM95IFO`v%Sy!6$5h zsQ)X(i1=3%qvE|zjEhgZvl9}WAVU8*F(v*4;AMipM@K~Y%ZL&2uOmjq?<B^>yNd|@ zM~O-CcMwzJb39#+>irurEI9!&BEcVtQOV)BygV*G+jDtB{4!!v0{Z>(lz8;V91;IY zVpsysBXgj?n;4a#fC&9=VnPDeb52rnIIibFpK*8v^#4i>i_dX>MMV6^iBa))5#tgt zj;~0Fe>yQ~&jGGTNzO>{D^dR+5X0hep1Cq2UOf@|?-1kSwGb1M!+y9D`rjgI|6e6A z0De_i0`|*Q5ecp*LjMe+_TN<r@m7&1C74D`iMI|I5eYsdhQ;GJia`H<V$|A=#Kq(M z8A*uWPDJ@{5>pazJj_KlmNz#n!4HWr$okAh`5aGk;}V332?;8QNeR{yQ{qnt&O`RM ziDCR*P+~-KP9Z}74kGjy5fj$#yrg&o<j~&>tPlzEh+zphpHxJ|XIxf5pYd1`7yo=> zLIV1^A}M|iF(tt*z)BIH^GIb_axN!EB%psQqmmOL#_^F-VnVzwVp4)eVoJOw;CvD9 zUx{JyJBShS+lW!|uOUL8{+$o~UlXCfikOld_QL{{{{}HE0pn~zM7-rhls|_Eeb#3| zLi~wD=zp4+5`PSEp@{cWVpu%-Z(&4y&O-~M;(w1AmtZR~Azp%*6z@S|O1ztZRU-a( ziO~N(F(MxQS_S=EiE;7SzN&<HKO&<1XNf8C&jc=l{y!7L;{S#S{T~yf;xld+#YH?~ zLNTeBviK>HoC_iU6!cq(5%FgcqvCO#e=08CTf~F}&k&R1rHHD3wMZ}<{OYi^cXdPp z_S@A_3E0l7<KnYES0^NA98t@^Iwk&Rz^et{b4d(K5GJC0`n?+E_Y&h0(9hKgYri@v z{wi`Uf3eu~#bNQAk-j*hJSsltyTx(w?<FQA_%bnx?<*#z#OM69M8s#@EkXIk#EAG; z5Tg?OoEW$EmL$acDtS^o&QnXEKNh%D%U>F{`Ic(=OQZOn8Ol|EDfFKshd#&O(iFb8 z2v{Td$P5wXGhS;@{w8A7+N)9hnuPefnV!`2l*MaAF{~I-jEa8&@?R5|faB|$1U{-w zOiIpFBFdi#TqfebN>u%25eYb-FN;dBni#kCmL(LEiYf6q|1O7q9Wg8(<9>NWycdX3 zn{Rns{7;c5#N)VKo|ND_M3lc4SSvPPZCE_6pS2P3^NCUM>F?UO1dNATEx%UFuT5FK zYgPZ+u=0pvR1xKuLjT%?_>U2j;&a})HYNTZ;0lr8R$^EJ&X+4968OZZ_*F!de}oAA zr9|j|jhK>v<KsFMvxKPSU#I0?r{!N4$M=s=p1}8w5R<lE*QG4h0e*q>y0G$y_-n|c z;vFEyH9eu2R7_dCUKGQM5yhxtTrr`TR7_dCK@`J^5yhxtToLtWf83B%p0dxUH;Uyq zhQ&O$-Wb8}%OKy4QT)CPF)qPf#DsWH5R>@*OJWM2=LN2W+Brn%bDmlmQH(0a6%&d{ z#gxUHL@_J@`|~FFZw2s^FCQ;+Tq*dV{NVVPy+DF2Gs2u9e8dnwatO~I!t;jkQA2qC z5MD5Zj~>EL8p6j6;e|u^*dct}5I%kgFB-xp4B;ma;inAY#Y6bSA^g-K{Inr_(hz?7 z5PrrGe&!G!9>UKW!p|PU&l$o?hVXNT@biZ7^M~-sL-++l_=Q9GMML-$@J!4G^3m(y z>6i&12!m(ZfM8}kUWy-HlvB0<KiioAIpcX5es<%Ba<&Hp(Ol)=jHgw|S;`dT$3K3) zAUE#t+wd;oh{OL5Rodb3uj76Xe$w{8i~FR*nRl<le~No^X?c`wV1n}B;r4*TpNC5@ zd1mCS%Rc-}()PTAGv=dNc?e@RwA0~eBYyW0m$e^4jE+9$aQLLq#J$RALe@n&E{vzp z9DAGLb8(lBQ_AV@63s(?HSVW4yaxBx4(CEv>u^rY=Cb`ATCFq}?ZfyDeL?vcaE#Z` zR`6W@sQhl+qg*Le`F`bT`K#dJtQ@Vxp)!6{?s1Hk;z#X!Ww;OHCoNxs`v`u<S^M6n zaX%S9X*ui1_T;OazNWpjd>8Jc_&HhS2XH?NKWX`UxbMXe`xEW+!?=&&N9F#NxTnn` zl{0>;9Qohieg}R|Q~3{ZPoJmt8DIQK>%WZqI!FEy?hoQ;ywwlbw^974esC4;kK$*d z%2(mO#gTsoeUb})lFGk<`z}ZR6Ud9f)A}r{*O9*qc{%tgRzHVxWIQX+nGQMQXRONE zwvCQ_E#y&fZGX;paKG7+-vjx2a4kP4h5M~pIljZg#+3Sh#1zO9jvW1u-(f_|*z);% z?Z)5gpAoPXV$7YP@+9v2@ROEv{L+8w-x2KZ-C6m_33l2^w{K)AWJyPk@#GbOYx_s8 z#{E7=j`_%&46gngxdZq8j{HH$Bj9QIpKyN=KU%-sLdfgDwf(s>aG!GIh&M0h$iImD zBaVD0<eS06w*9$J;r^H-e;e{XaE<@GlW{+gmFJ=F`MZ+o_{_t64NIB&<#j-Q2wcZs z-dAuR@CUiVn47obp7j&YtOt2N#%)@DHslXMQlN6A=dpggqR_{Bn)fn_ra!2Ue|die z?|1n7c!$=K<@`M1$x|GTJ;2H7@}WO!GF**3X?vq8!0BJLKk5dAQrzLUA~ZKT{7ZP} z<l6fdLVK1Y{~o#uWn}FAC*JkUariIMEc97MegN-csvZ6ZxGm!F4{^r7JInL2ew<a~ zaJ28j;|@Ou`uiO|1DyS>?aN<`+bDi2t$*|Dp}!A2EpG=un&lys6>1{KRfzj*@w3HJ z^8C+%8~ZB9`s7tQ@-KpKayWeHB^~}%a7RD?n>xob3+?|ixNGm<z-t`+JHU51{7!Jw z9@W1Kygw`FdYM@>VLvn%Kd$|sX<h^=_c!?u4B_Z6d#U`DA^gq3yZ{uQw&USkd|n`T zh&;0gwe||m8zP@RgfAMxZyv&1z*&Zlzk)dKx8sNXi@CG_{?5qH2LC=J>G%x5cY^mJ zPt?Xo!B0hg8VA?-DEJk4ufrck`woMzM1HpKS;(FEE`ZF7K(70*f@2~-3xlh@JdEF; zvChgles^!q@`3?yCmu(S!tW=RXXT?$17Gj(i^2Ch9P8sRocfH$LCG%;Ir2u4Urup2 z#`~TEhkrrjo;HX7132oGuJ7n?i`*N@@=+MC_Z4ONX!tj|&*482`ITG0`$g_|+B^C& zkq0I@`4L|aG&%eoY!{+g&fk&Ud(`3MM1Jk~=cF+DCk44@`{$%G@Rzfk`@z7}7ioo% z&B1s%fO}r#bHR;$<qN=%8>yAoK;P6?<(MA=*f1CLPlA1W+4w#Q>xWs-G#*a63HFfB z)DQFhNtl0pv?0SWzwk43CVnXYy2x)f)1qhoowOam_(`{~54Tb9wEf?L(|>9Hgvjq) z{g)tL>BzCZJe&ki+eduvcjA-&!SB@D3-zXd0%H$J<nT|Bbma8!5r@}^pv&yV{P0&! zah7vF&6$<uA<U;aPI+Sx|Ms%}95X@W(FjwlKgN{eY-A6pws#ETzn|i?e1*shT@J_m z@q!bNV^)j2SmMY(3;##KxgUZ5+5Vh1a9*rG+Mk0yFc&%6pX0_4+CL)f$kE;rRawsV zj;PLZt~Vp_V=mf5`$ufd@-hDi-k0V0eQO!9+u>gYH|;?h^z*+6-tWk<o{VtnHwNp? zh+|p#7|2IL&s@MUSZ_v_JNypt8i(Hr?$+-vaQdGY^|79eJY=ci_rR684j;0<j6r<b zOZyk`Ssz78x<6kBcj9@>N8l}4dEsbq_K)T-JXz%3K5*^-!V4kqb>#4GeazvN_=x%m zCqL%L4~rb$f#uA^r;WG5O%mdF7G&(hpY>g!>GHo19(OqWRlh#V8Be(pa9;2i<0%() zFc&%EDYweuh^JiEmlx$V;A{^sa>Q4z8xM#td?$mwC`Ws92eO>;lxNy!^%+ljPCVu# zp7Q8#UeISe<;4xN9PwiIxGHBn@jDmHh5U@CQNRpGJdG-LIO2(W(u^GOGipkf7yd-= zbw5&w?}t2RGt<=n&x7xEIOebVW2_p+>$$)a5<0&wD<6A`NGIf;%E#h+*e(T6+Z%g@ zgl0JQ*gvC;KC%?Tf9Ri4E14e`Ir@j+;b1Ou^v@{9A20G6@GeWq>2H3wgSo)zZ+vG% zmc!rtT^(~#4u9uI91efxJLS>e`P;K{`a9q4U--LVh`$TgJNXfh1xbg){{;sfj`3UI zw0|sOWAr3Pj`2J?H_OLjeH$HdICMux9gg{S^ah8cEu;5mIrqOOx$;k|O#6Rqx5%x> z&|7u3f5+Y~{F}PCY&?ub+hSFq{VIq5>}BT@_UB0nO@bc#^Q7GlM}MA_aya^PjN3l+ zkG-tDvD=35e;>kk4dK7U5ba``)^|VnW`{oqZfvR?-*bBH9!LJZgswZB<>N+5=z3E> zo1g9D8fY$U-<XvSNBhPY`$&U)Tv%o5-*Fd8sCfs|ti5rtXD{2{armCsSRYeVe!Ya& zPIh=Fc+}xvkkC34Kbrq*IPN&=$bZ0lUTVKjLh%T>=KmeI@uBi#68ambJbYKDURHnn z7zzDDm`OJO__HLmX_CX|fcHB5IthLCki&10&_8Z>_y!4mt;OO00-kjEPrwHp{)mJ& zA8|PP^P8@H)PD<NK3zY2uUKeH(&1-e{-l3-UWolh5&GjtCO&O@iZFlM%eJ>@0se;0 zW~Qhd-@m&v*WvBpX1-DRMhX3=<By^rNa(+vcq&Rt=&r4f{?ih=d!NJKkkF4OXZeIY z%wLt@IkvtNior2Qq`8SlqmMMi8|TBqfcm(|v0mXj^Xvsa;e5T<c$o0F68c?A)6j$o z-v!^}@c#sFark}UMGk)wJnHb*z)d_M4fam<!4GETC!_xMvi?1JorE4moz2DkUjaA% zLkjsnfmb>5AL+f;pWpTR=-#aSl!@Tm9FG2dbfd#B15Y@7A-L1tQ?654+CJj1zre}= zAo3q~_*0Ol{f+vb^6Fsy;(0?j+G5U2_57`PC7O8*c}Ags$K!0M3%615&9=XbZwIG5 zs{D%*dTbxK#$)lfupZHWY5BjRJ`qQL7yiZu%E;vZwS*ow{y}B&uNdS13C3629^&x{ z)FH$FAhMSJ=lLMk`{K93r(`+4Ls!;@!3(T>;%M+DaNVCx#Qtz?i^I>vy}6LT1iqMy z_>5~(Avoqwes`m}$gw^Y_Bp%;JRM(@Gro6c<r63Cz4qV4GH~`E>l4OVTP^NQJfiU< zz;AKnXM=wQ{!Af_{y@J@{8!Y!3pCxHJ0WL%)ZY^^9!{VhX@5<`{PbL@!(Wupp>l^~ zd_R9A%TLAn@}g-E%EP}?&%on!*pW{KH*HdRg@j(Ef3?3(tpnfg@Ky;Op}*7e&r0Zz zZvL-I=r0jRekb^Phu@3u6Px4ketbW>Ti=&(9Ouf9OXy9fe0(>utc^im{dF4Fiw|7+ z`4akQU)KI<mmz;|Hb3XH!abDZf?pXQV<%Z^IO1ch@vq7eA7f`Z@*41n!x0~2P5W(r zJ`awKJ95nTW4C5G_m5+p^0|K;yFV-Eetqm=hkp@kyi(SW=ZWK-`f~r6S>qw+{&8G& zR-ey*<DB}9xdS}z$PsV&PELDKAN$8~yB&`G<G6zk$9|FD&1o*==YDd0vBQ^v&vJMj z_)3Rk|A_DGv={YJxABQA=l*g09*3j;;}1F<^&fxS;i!L6;BeHx2zJc{JS_rV;&AkD z5z@>>IqF{&bvWu@6n8l4U$oufsDDw?;i!MnA%|nXTjcoXv@Wc9lN|Xv@L3LD4_@nV z^!Ehln2Ys8d`#HvaKz69w?13IcRTX$fcHB*fi=U72c*&755XOOp0*SGsFVM0aJT-j zJ;9aVi#0RX$-ftTio+iQZ*e&4ax&^@E|&ikc%Q=$f$wto%isqbegyRi9R3=3xx<fx zw>kVh@OYNf^`~rfIOdO2HaomP?{z+(G(kLjUS;RQNoR^@&s&sVBHqYa>L{NHe$3%> z#k0@%D!&Fi>Bv`!m*?uYi<fWu!{+DwRLtzW;4jWk#if=Sj`%H(Ivn#;vC|&z&x(^- zIp>$+V-CmsG_feld7dz_B+EHJO)SrH&PNmL9R5Y{sKYVeOkAJkoR20t_2GOp(TP{i zM-vfK<|@Q|gYi6Zzr!(}CssNf<9Xr%hhsjPc+}yTk4_C|Ip?EOjen5_`;&TAMuKY+ z+Sj&|cjHVKPD)@uQ|fTYX6HKm6`V)(g9l^H{$$ddBENU!r;nCUA^I$B@AS#oQfza0 zrG!p3{<h_vzDhzPw>on8t}Nnkj8A*n`kvk=vU9T||AU04oBpx(_}#TXOlIY0oW^@z zR{sq2?ZPH<&A&!Mi;Yi|e*x`d|7iQp_(uty=E{fE=Zs(CGxw-d#@;Iuy1;4A86V(z z24$w@XXZ<2(J_agF7n5~;g^a$==k$Y#QTp@j{GJGO`7EJ9_&|Vf#;z=&cM4z#J9a{ zd(Zs3$iJ~Y+TJsNj`N0y!!bXNV);3$kNIfDA@D-mzh}OL{X(0Q|8>;g>Ax_BX-zyU z51%UXq|+ba=_1c19eI_=L#(gXCma>IJM3_re_TYGmVaC18OI;tA4{kQHZpST|8gfg z{D{b*U0HrsNaU+df1HK$v43#tch(G%_(~^#FFxWFaX56h)i}JL_q?os&%%DQ*eU<4 z_eEabLAi~mvx|7o%jQ2DeN?}RT;=f3lTQDfy%fI#;n+L-+n9fy_&6K$L45-18lPvQ zKk>I#vi1(bzkLq>vxGiB;BeIMhwNW1|C}==^trtbpDOak28UmX*Nu+-bFQNd*QB%X zgWtF7#`*GYCfN3zgSP#?#NnvRUB?~%TfC1kKGFO*Pq-R$Oj^GL{ndg#%y9G-&&M*n z0`XkuaKxt1^5_rvwq!j%Lk=Hg@?(D8=hUy{XE@Jr{8REU-XEbInf%Y9J`soG@9~V^ zp5^D}VZLZ_IQr`IhaG-1<QpCSdCVVG4*!9KsvLiu`(u%a<F9l7Dzd8}oBuo?_I5b@ zRGgQ&9J)8qp2ov@@YmsfCqK$wKg;2m@25KTIqz<fTPhtn){m6S58&u=yCeS#?|BuP z|IhnKLSt)qYy0#3lQEyg9e#m?u5t9wNByoxe}{B_IUi-c?8M{wnBS@cM<4x(zj=g9 z?SDt)zhEQ7(U<=Xdl`=B>jS8Bh9efXJN`WXUCMab`cEDy(lv+N+Mj$1eg|d0!!JSq z7CXEN?<==D{5FxBk2)OnJM7xK3;lBpa_yhVzd?U)cJikXZ!w1ti2OL7<rnxOACx$J z0zTuv#o<@NUYEl$K3ldqd;^yCjrho1t)0&=K>w#uM!LNhY?sh~xcPsI&rs7f>ox!H z@bN;Y{TIB5_mfWiT<`|$$B|##cLCyIgHxXiv40FwkgI<$#QD&(#~nUf<eff;*C9S! zj`IO~u~PUf%QlQB^g+fR#?SLkeJ<RCc!iCO{Bg|plO6tN%%4ectuNM^P_>i)BAl=O z$SMD#X%f0L$m(BIjq!KL;ifL+wtg3(FKcogIpV=woG(ws@2CD3=6fezFZwm+>j-n$ z_`B$N>?hpv-Za|y&)T1YZ2lBb)*tiTl=Bf^1Io_@$9!!s&A(7WrA~XM)MLMuWDZ;2 zl+WPfiIW@-|Jh6RF+UFC2jQQUOi_KTFZfRE48Iuj_h)xId@6n?YmUQPdC$w*zqkwj zbn18Umn1Z=g>q~E;&1Vum*&TLX@%pzi|>R#x*%46Tnv9+?3RDnC};KGQNGf~_ay=R z5oMY!?~*ex9$k+5pK$u)l1h;~oOrp!j9u#6`dzXC@i>`W?fnz_`<TPg{|)61e-*#G zbRf$aYxP?kj<O!y?(kdiab-9E-(bEu<jA*)yp`+l-4eRfsn4YkiZqsF<)x!|&&$@o z^mGZ`UQBN5Us?)(>~(kz)_14BOR?U?3mka|K0e#)a6BK~vDM)}!hW*|T=$!$Kb6o) z<mvJr<vlO0&$E~h;ggK~Es^&svwZ3()Nhx=&*42Ut3UN(3Egs-+_q=x6^NH|&?$EO zOkIrmWRfGt`=0Y%z5(;=QAhrD%zw2GNBn(bi^HG6ai?29oIjpcl9iX?MeV6a9F94m z(TV3W_;-1!Bggot?05L*c+bnWuk7!zpK<!T48HD(Q*PT^b{Fq?Y5oVW|Jq2d@`EB@ zbo?_7>-Vir|4qZRbz*-u|Fqc>`ibM8X;-6vjydus3EA@#YkyiC@w^Xmoo}bXf8BGO z{NKZPcl<eR7e1cv_-7jS8||(f@4r{TX1f06IlSj(+gE-bJ}#Rgx8;}5L_BYIIOgx} zK8K^ew;y*n-j5X5ID892WtPM5;5{!b5Bo{}?S@Qwk6^#+mS@`H<R9QYFRMQt`;U6& zQU6RIgYmM5a$EoDi08+Qj`A52deG^w>8R^}ZE*6pVSaY}Hy!UU@?H5q<5x7`<Ba`% zyyvC$If(u60dg%5@oR^q<#=2QEnJzE&%pEk)pZV^!h2rU-i&Ej-;2mqe+k|XI`(HY ziag=UKP%oCr+qUp{tDgv-$wh;=8Qeer|TjP$Nc}HTc1B7zMb(q^IYcTW$QN+4Kf$k z=VGkAi<GD3H;8=4@!!lC=AQxPvF(}p<stcTUa;1fR{8hPzg5UnjQIv-&%}P^k`_n* zHRO*w{3G7;vh|x)D4}PZ_?k6ILf1O&pLG$&!(`^S<;}Vr>x0wYSyxMFchZqJqrY5z ztheR69Qk)3XMNN5evbXU%bybY+k&io_Bogzw>li}qbDXDz6{S#wGKyr_eUKLfBJn0 zfBy0b_A|4;gx|G8dqexJzh-|8@$cHl`O97V9DR(xQ(Sx4@2zp#KRX5egp>bW>~Gt$ z{Ib(9pO-rv_wSZEyc+9O3AnCTm(_{<AneGozJ1i|@H=?V>uf0ES^k#*`YWyfF!pP# zpN{v-u%CWs3-jClyX-y8w@&<Dj%0fk8n_(u!3~tF{^hd}PX{Qn`j_|M`O#_L<%rM6 zn;dxppBFHuG(YzT1CIP5jPHcQAH(?XayaTM$MBOb|1F$PRA%LK(AIgI9gg~bZnwj4 zL?2UM>pN$wgwAs6J7*`xFKlGw_wk-rq4|H#@8Hi#xK)47!SnhOC;sQWg6EAX%xc>= z=dXy*c$QxQGq)ac_~}@0UHMAnPdIYyXZoD}xMIk7zXIdE+VS5NJ22kyllIRQh|kBJ z{<-2_$kE1({I^*DT>a-DBUk@k@mHMJYy;Q!TzRsD#yR!5vJ}q`HI5wf*F(o0j=q0s zlfyrQ_4I_p@qBe-0Iua-iTSF!%8?K8|CR8+y=;G6`I5+Yo%&yi{n>z1pQ{QabYqel zwm+^q4f`Rdf3KQpt)=_-stA5vXoHg<^VO`F!{dnGK8IsH^LoLx{#RjsSmD(Fs=YY> zNjdrP{BnQ4!%^SoBM$!%pYL(n6B&c`)rpq~_80Xj<k#{dWmvBdX7wX=BG)?o73oC0 zmTP{@Z;{XA`Q@mSe>2W6avhHS&^22eeiw8K9sWFi*Lw<|x$XQI!T#u>uB?16_7jbB z9KIO#qYgLs<i@DXy%pyRyBzu7V?RFG;orykbDzT>6`50%<?{jw{VeJ5v(dkdC++Wf zm+_vLEpJ|h$iF-7<y=vZK1%y@9?Dzo_-7v4`|u9x+xVIHhRD;0v%JE``B9U@k*&&U zf5i%sw;g|0U_9H))~5pR>*uX^^f#eCY_Ilj#W(St432*)_NltIr{d5M{(Jbl+_8uE z^`pA79DlP?-mh{v*7M4p4##@F`GCXWua#RJj(B>|X<ua=>*r+1Szp9gCF=WwD7gBo z@^0)0-29JXKj`?Q@(5z-^T-~u@iZU){PC2m{(PJ_o;u0lmtekg^ye?3jF<K2{3!Mh z@L{_A`RlR2Fg~*VHy`_p(FKm2zBZTYCo$g^F+uYmLOePCnE!^!jQ?zY{>{kS%Cq?w z(4VCazX;ExEe^j5<Gah@*W&&-ezd<AU_97M?SBsb4I@SUyI>RiH;XxJ{T5)n&UWH` z!EUV2Cp7=L`1R<Av0vZj<VQT;6?gdCm~S1vupI4m+Q0A`=H+GUv+zcoXZ4fY@)u&i zU%~pP`FfFO!w$#%UVF^psBiHWhu_6}UTPope<nq)_HkYro8)k;|MmO9)n5zIAMeMr z@~T|O*<O`bO`wdIwO<8W4-Sx9`&E~KcR73>?|Etddh8b+e^=r8?DnIStNu4JURa+r zzXPAo??X)MezIy8?qd+A>+>r-&sAmfFFFbF;pi_qn=)K{9yl4_Z&Ql%(w$7O<t@5G zLbs+Ij``(gr+$mRB=U+gA1(S0_D3~Ne$?&1@RPBJvhOHyIQFLl(JcSeMBK0Bj~$<% z!g*h)5M0~ysp-gH?&QaO-;#281KK;;;oaD8u6H=%qqWZAKSjKkg3~_clTZB)=T(QZ z@~aW+&xak3Jdd_H9KQI>F^4ae(1p7l-i7$=b@)c!^J1fL7WOsBqr9{Jz8d}csLPXB z&)xE##;@z|b@Jo=Yo*iPtKXuGm$hGw=hdBtTl>|>yDz~6<q?rP3mo2#{ZSu$uFoUY zct3glR!5Hho(Y|dKK3JDJmheEUURl<?;Z5N!x!hGzhFPDzxZO_^Ro3_JR8p=PWu*L zhw+@C+}3w7&VR5(Wck0KzO=9Lu^8j~js$o*|F5yXI_mJ(#PgF5NB!z4SN$a+_}}TT zC8sejFAS7?tc{$Hj*;8?EcrCzCjqMQvjk(Wf0HBMfX4@?f0k^)`_&Rhz60lHJ01RW z#Anjs4~l&GxWnI+(0P$8Uz&sX-stetF(3DX>-(mq*uOpIjF+YJ;okx$|IOG>gdN_E z{Z*C2zl`}a*WusgJukFBz`L0rVf}N)*V6m&zC59F5Auh2&&&4j(#PR1#*_MM>8ld@ zdMV}BpG(ocM^oe&kI=8dk5>z-{ZoVaYpPTKnoCjs9_F|DHTZn{!Y+p|$NO=o{WUG{ zPZDzVPtC13pKEjSe*ycyeGcErdtSEwHM=DAKp(l5hv&tsw>bPSh^K?#>H40)=Utup zUW5JPzt73$zh*ps-?YZzn1)~6?{Lg__Oj()17CPpqtpABYp_51;dbV*^||KDc>Zj1 z_&pN3tkmKC=zqsw*ZdLoSiaWxniI^+%a*qc-SBvV+}dAuF7J7%{6c(QVhXv+5ntWa z4##=Ymkv4n>k_(+G@U;o@=cbX=D!fRXqUr}iTsVjmzUx5FHSrzhi=*4Z2sk6LA-8o z_#No)BjDP;<!HP4JT%J-@GOk|;pX*D{?~cW%eHU%hiLx*xoux<k;wN~Ivnx!Et6H{ zpT&2ARXK9(Pvbisj_3D<PJGqE|F6_J@)MX}d$au7ad<wDI=oDz?SRAQBA&_}4u9A0 z2G{mp+k)?EbnSf$@~w{i``9nnIr{g)AIBYz@!RUy$MP>Xr0}2GUx8*X?9b+3aV<V# z-RJOCSZ|UJhp+25gQxY;U(+Lw9Q{?#_NC?ceEg&AKlT5L2k?9tbNEMi--don%db0` z_q<G}$aRxN{@#ht>o8vKVEJnAx-EEr=k&*Q&tkoaX61DSc)mUg9>G9B?AI0JyahUG z{W|PV9;Uz5Ufo=b-zJBnKR)Af%r}2@>Qnb+d|e6Zn9<*X{j<|wb-zG7Z*t^VU)}vi z-7A={`yKgvsOsJ<zaF1YwBN^L<MVo)m)Oht=X$&k$aU;re>>i<Iptsf4~TEa-`D>J z=jC%8`_JKhu`7QA>v1mR+J85UfImyK`ES7D{esip8?MIJojCe8tU>u(o&2cJ!*Pe> z{OpDjhyMrSh5eB(5BoVRnYe6wZ+HazkEp{jKR<Xd%WuTzO->CQeg<Y%$DcP&!+yo_ z=Z$sPKW}vMw~2h+wTJbw(Y1$ovX}Mujj16V^|6=AG2hhhL5jAA+hBKmtek@P$GfRv z+qZHK=7&Cqe+vGJIvneJyw>5HG5?|s8U26dJuh4S${*wL@C3QqhyS`)I{bOm?=X0} zewe>z@5;(=I#)s^MGlAm_RVrQ&gb)^4#)G3y=?h6#c+Pa@uBCPH^n9NNI!Gf`rPz2 z2~8Mq_ztXR5r<>{^swWPn;sV_b>uf=e|L9vHvi3Iu%C1Mar2oNPn#V%>i%w%!<XQ^ zz-jNz&DcL3apc%Pv>bFe=6|mXT+bVB{t@QONsjzwJP#LUIo;9b@=-WnNjdVfMP6%h zINnc=+U@Y=*bi)R_-Ekn;|~7@_WMU2z6YN_ta5n2$Xr*Bdmnuw=O7Tzz^|oX|MdeW zKBDJKC|r}(k7EA2+wo7d7Vkq~Gu?kt%zySWjg)9F=0n#W`uDUc%whXGYHX2f{(E`P zOF826?w#bC|5d#2Ga}0y#^a-+w6F2hfHpi-oXy`bRYE6691dUH>hyO*9pe2E<Qne{ z@cm<LPX5nHsA0du{}J(5?r^NHi(UDXc%H0r<S&R^9?$Ysc)v7nkHay3V(T4_`TJcr zKjzE&4UYWtSkK)2cTmO)fiqfU)x(HK$~7KWVLab`h;r+%Rj*_Ib^OP<?EQ^dd1Ddo z`(Q)Q8yYX8jF(Z8#s!!!;^fv|BQ^}r!A6GPBJ$5pyf$tT`HSPv#=8+;5hp+DcH<`S z62#xRm|Opf^ZaO5-W0<7!F>+T$NN#Iyrxs|3=($a5#IB%^=+!QEW=S>e;d-+--wl_ z)p(xkXCB+0CiM5_y$=5d_Nz4x--qXc4Gzci`Kbk2j_E=|Vf?q-wx=26yM7nA##b}^ zo0kNiW6N(wx9uwh*YcZj|F+Y<X2h$#kP+oH<M*=`CYfUE+uVWrY<Ku(^d0M$E)VO~ zjTEQ(og)7kXM*Zu|4~(&;j7vj8k(9eX_Wf<=HAv=V?$e8J=5wN+nO6X@QZANNPT^4 zhnuOXIo8}5vw8G>O?}t0-bEd&J7rD%(yksW>+C|c)lz3qv%T$Uj`egl-qP8n26~!1 znxND*H`ZR+yiV_yG{=-wbT#%UYlyYiuW63e_rw}vJwgUssB0s#I08ehWKI3z)>W)k zZEJgTx6DHe(+QojxS?x)cXy{vUe>s-VwK6Tpu4%bvdbaMZ&|gpyRsqHASKlmGx=XB z|C`GH%J|<j{#VZbrn6QJU9C;s>x^%2>AAf<*08D`ZClz?+1v)dEpKjz({JgCb$^1u z(O3qJhMwV6hDZkK+`6{8CpJtm%bEvC9G!~p=7wQwHdyd6joKC{HVti#RdQsG9(>Sn z`%r~!qRok5SluzVsi$pub8JQ9{Ek@n?elvbrB9ZBTpymV?(FPZ)zEm$;?Ab#Pp~pv zu8-T&x_p8SS88?VHMYZW{c;3&ZFfUQPgg^Cb4ScXQZ@qqmrNhCw0KSX|6pQ}^kcd! z8XG^kbXPb;Gd8!Ot*oM@p`)X@ZBbK?<A6-<hs!d^N@a7bp|R!Ts!sZ#{BvW>@A&QG zs>5d)#tOYs(cIQHOwFy0!5N0J0Ox#C`DxK0t!2%afR=Q|T36p*fw`68_i_DC$~4Fl z#=!q(XZS2btt{$@HFvLWXl$--?YPCv)WZZ}Z1`M*Y%S!dY+Q~>xV0zN+Bl3;hs`n6 zMy90y#nLC`8)^@An%mUW{fX7d3I}PLIi|5<^_q|O&tTCYE!)CjwFZj@X~AHoHN)x- zmtl|v82_Iw43}Y$1r&inwR&}HV`XzsV|Q)Csy264%ns<`a}BbE!iLXf7dN%_iMjq) zTgzKNGfdrvvzN&^)Mmz8i`;c8TeG3^LHgHraNpC~&^By6J|-QcyXb$=93;!^zZ%Te zA+rM;LY+OBN?14DZ<zgA`hImM_Fw5dosF@!G%?$;%1)>B%FaQJsO)sZ2OcvCAM0Y{ z?BPYw7&gELTW0K=j2Z9S6qJrpoRMbkZMq%6gDp98hY<{(m<E@TnfEF?Yq3K@4VE@! zHU}n!dyeYnrivKeBy={kFKcdWZe7=$-ajyj*~|tJ+rgTK?)Dz+6T5moQ_<SpxVAM` zdwW-N&n2azid<_UADSQg#2MTyPBlBo+2+>lD9dcJ*;AI8jb_;_O3O^1X{ELwyV@>k z?CMJ2V-wldoK9#>Px0x54zmKKS!YjMYscDN>`bwPG8+LzNmqAgV{=bWXLmXmHi>I9 z7JE8Z$9ftvvUQD(t=LTuD)hGQhOVyW?xt?IN;ATZ=^b!3x{;WTZI`%_&2$^rgYRri zn=~8IyfyK>rrxBk)~5oJ9`jUS1p4Gq*;&!jj3pS@iA_vnthKWPq0`MEa8o+Fkbr2b zX}O)z2ER1-AO#^kBn8h7b88pZbauxURWb*3vUbekTG?6I+OVdgv%S3m&o?H=(p8^c z(a^TGnHE|2y!p#&&3$K=-onP})-`LpnZ=syi8Z&?bfROmloie0J*Yg@nq$kGx*OW( z;RylMY$iAyDmvFP47A=$o7)km4efaH=ti!2&D}9mHa660*4YKZ(AO3qWY^TM?U@^E zU(nDKGi~Gpnn^JO77r!snwwP607Vl~%RV)AYE46HH?l75YVBOQ79~1-5&WL!T?;yf z>}eJ?wKWe(T2nu-v!T0*V~VA>4Hk3oA(>;EjcyiB>Fj*_q_@Um6?~874X#@DX{}v4 zAGOx@XuG=+@R?iI#Y!_<w>CI}Ni@DVtF)*GVPQIf(IU%Z-DOMGwiB1%(%O|Vh`Qn- zF4k1hz=;`^L?<H8+>XW;3_COQ%{ZTG9weulC&{VP&Aeb|1Tz;*wRy~3P*$2TzJQ&J z+H1QiI!#*|8f);>(b}<Q{yIEzpw!0dX=p$<T7Y3drcZ;-P14$ZYh_m>W_!m(MMH-P zDCt3~tI>L+*9C(a;^dy+!C7c|NB81}?lr9)W@>?$b%ABqE_xz6PE26ZTNPcm%PKQM z8K3ie;ghDWMi$v42>ot*rv-9Yq1(+o#`{HG*LF1_0*rnS+|NXt#EMko2!f43G4s~0 zhGnPT%z0gRD;|AqFtl~9p$hX&#ddH=&dT-%E}b-BS_WmdjuW&!3$PQn>BKVAiDlE7 zd1;RsA9y0~;a3E$siziWbwMkqZdr~wwh~M`vZ|@A(cEJ)6_R<k$Cz#5?AbFFn7XW& z^Hi+cq}znb&W`2`tsN?_?aj#NcQ*2&)a0$eXztbo%vN1IqmTt{4Y62r2a3}>>!9Ur zowrH4s;pk-esOdAe4Ha?6P7i1VRBTzX0p}dh-gr*AskJr?KO=z4#HUt=1i1>8;Iz$ z8a%_8J*!T0^gve1XVm{a2W(P}=Aa7mdS_=C4*zrt3gsNg9_U%rF{ok?VKQtRPQ)Nb zMa;oP+R~uFHwy#{EkpT`kT2-&Y+u;a9-C@3h7n{ewRGMV!#uQnfjPahvk~mr+Glb# z$L6)h=5{nKY-sHmlGxVP*@%ZXtRmWQQ~`%0YtiXQG!rgP=P;9Dv}g{@Z!^jnFJ)cR zmac1A+_Q$U!HDI6sp!N2c7=8AIDqPCvJM+YP_eeVdwKJk;dGWX_d<7AQFUj>nol&j ztfy<JIc!`zdR8}gSG1c@&s1G&$K<y3JP3l;ww3C%NIF$6<#YSmu1jz0?7rpFRgLYl zXH4tut)F&DX<79prBj(=cRf9quIlb=Xlm?izqGNXq5IMXbgkwupLHqsP)wKyx8JfH zQ$C!%uKAMXlDS{hu@27|O=e%6N#tPT)-#)pp*T1N3(4)7)cGAv8RbtD44XSs)c-+) z*=gF|^sU?6bed@wS}=(JA5@3qRjZS}b*qz3<FaYGBb~6csfo9e=IQzl;{QkW#X8Z3 zaA8rr9a>+exz)+=|9`79clmPcSL>HAx?w&l)7EU?9;8pW!SMnCyD{e&C7Z@OtkDh9 z-q2WY_VRq}sORZ%eI|*ShR6md-NvQ5K9k0qhFE7S>tY`ocw;J2&k3^I2v%dzIJ5_& z%B47sHwLj3+sg5VDIBbV5#HR<9K&4az9+GX_3fN8n={Wens;cj^K>&Lhk4E!F0DD% zQs3R#8LMx?`w$Z2EIjRWn+dunn`VyRVZzKytf_q_8kEx5W?sFxndqI)wRr#1XkMYz zx36uBwKmdGZ8*|na@HUo2fML5bCY`8v4#&y>1w&XzO|=&a3T{LdU{&dbkukE)~{N- z8dEV|47rxNI@{U?r>w@?m-?PtR@HZQ+lWD{SL1=Ly&=}vQg0$aY#cCd8tg+FP4KDD z#1hjoHrJXH9OKAA1vjm2?-ICm6~eeQliPTZb<zkKq|$00JbRkku`poIH_iTUUjUgs z-!!x5n`Sod)6B+wn%THdGaGmO0y4D9&2GQk=$0GZa{Knk=$0GZa-%!LNbzf^(3)Y= zXP9*SVleF(o8`vlbYpY6u{qsnO*dN8jm_ysce>G<ZnUNwtr<pZ##A=Gy|on~j{o)1 z+1z2(!T^O=rKhXa3{`Vuy8uzyb6Y(HJw5fUO^nDi$2%*$8?*`C-B`)(?QOh8XVy1% zt*x);n#gc9lLDSJm-Y;LYvjx|Qh&pesbzTBu3u46Q9rk)rh4iuySv9riRpUY(=)$j z>U5X^<$i<@hdt874SIXS(skVx9Wk?!;kF(7HoGg$JlxH*PmUB~Bg734p9{>}qDtMC zFTucDM^!%k;PC*F>^?`(W^>zW9uDED34^J}m2xM9EeAJZ+;V)ZJ!PfKv1w?={u#&V z9cyZPui**I{C4TNy$7=kM=y0|rG2ny$%3WzwR7iH&!0LKCC_bZ<I`u){PvourPc@J z?KSOgCD<fnhCj?UgpaA2iY!<*e}4VE%4;g8&R-{H0OFC5;<8efS-WiRlI1mXm(5>N zYy4kPX1oo_(&hD76ILv$n7_PcYB}?=e{9{_Yu3qN_wgLeZr|85*Ksm8b#bdXcXczp zh#tb(%)Bntcz&#<xf`LfxS`Q(n=`deheJ92J6!)e{mRyx0;@aMq_?!_>*|_ihGE6T zDPKd=qV|S0cJI$%$efj=D_C!;WsYh-p+hRm;6bNcZ4S1}vc}mvuRx7EyYa-muBWRT z54fvMUsz|?u_vaX2Zw1=i<qHO+1kVBZ9IPTNKZ%i>Sb6)8CfV|<}y4!Rm`*bOm%r= zVdlf7J?7SqGgIJ@9y66^_?uw@TY7k94^iy%Qd)#DfWApLwI26_4w~o!y!rh23p&R) z>=Qc@mv>;Bi%Pm>FT&{s9#Wcll)A39G4n`j2cOo=bZNR0tXlSL!Jb~Y7ES1(qI|$G z&7a1Aty#7d(Yt)<vZ-Y?_9WDtn4lY}i^r-(J-jKybTEukSs4tXAMA@Yw#L2^<5-*t z4-69ZI72QSycn@&g<R3t+JrJ0R!$hqu$?u(y`{aSrKYSL7Tv>mPILAl6B~tkb8cI2 z)@H}ci1LN28_QNS;>422HyI~Gu)K2F+{HXT<a}Xfo3@_jX6)cl3*($cOKRsYTQIj` z{>MVYc3e6#J~k$&mg^K9YiG{kre`~0!$GUjDwD}9K-@z1nA4d0MssA#xq^?2cB)8s zsOd~jC^&dn(8-e>v$@cQ<CS~*g9DPDgSz$nBU9J(tfynmxV>`mTns-~2mPBqD`0?` z;|rRY&fr;ASD&_G=Fa*XYF7+DXSzYUta)8?_o|xPy3NtcpbpVTdwYzwxD#h3otPii z812k>%D$|2n#);p_$AA@iam_eY#uV;?96ttY4MV!wTl*9KXocHq!+~bH4D~pI*+y6 zBL%aX&bLzvPvY!RI-THzYI;$w=x&@^I`4KqtMtsrsd=k8@TBXimoDZ6#ONB{M>Fh4 z0kShFyK&IDJA2;@Nw#4wPVv`e&wcgyBi-G0#kO&QKEx^Dnpn%=Ug*IDHaL4Wpp4V- zDmgt8GSkFt6Iy&nh56Z8Zfj=4U)X+_msf*!4Oyc@qSVZ#s2UcY%&caP-xjRxXymp` zXKV}(EQXn?EMB<y|LZ!;I6?Rfe%Cjsl8c(kOp|$pGPA<$IU3+>R?!rXV`4hr^do$a zv=}xl*-B;ngU!q^FNNp-50lq$vm(~?*s|UgU9FfGD;nCd7ef7)_F${inLVe+6p!K2 zjD?4LzD)hnD+gnwvh%hMS=)iFC+21BJ+Y7AGnI}T(>l~PJ#^A7G+k^b*7W&nZLf)A zEo(X6e`Lx-bPb+J2glU>4ou8;494d1V<72LOj<TLG~%?Y++{^i=Fx#}D!afgHs*0v zpS_2fnbM0$&5HJRxrKWvJl@z3ZW*V#A0<nNdnU$oTGRC))626_6C3QGJPOpw^_()( zuh7%>GYiYqGB+r7)zyK4V_G~(*f(bBU^L6RzS@w%jyAzz2htD;D(j4Y_;C@QOr03e zse>bI$d;&Ls@a7N-s%pqZpyWTCo@Jf?VG_4uIw6SFNc>fsQ(JQ8p=cj;;yEx4WqB| zmbs;a4m0g;ChdgmF2}w>L9yoHfSd2ZE47(F&9=E~E{3l=R4|XiFRqXI)aNX}J!aZz zzug?Tq(2r)E9@Q{&>W6-0oLgKxC3UP5QZwZ0K@HwoWa@H(miBw>h{?zx@*vu|JT{I zEw^zUL4J}zUHwQ|l$0ttW<)AV<z)*XKnfNB(f}xmf1mE2%g$LWWyMwTgTTF<GuNJ; zIU6=Idug#~n)CG#v3|8JAq!R}oA@EBp3hrQ<}3zV%aMzk<(#0qf8*669%m(h8l=Tu zh+G+R-mdO;UlcL1NlD=B=4KV3XrZQ9H`{`n@Oo-!UeBf1)3ekbW8uZW4Sb~!=8n%; zE4*3E?)3JsU}nh%d{YTc!Tjb491FKDw%fbg{Su`^w_7b1x82P~L<gy$u&t<Lg(c$0 zs9w?3xJD*mT`J~jL?+Tz`MtMQSV2u=y^BD2mQJ4|9wlPNPiJE_?-8-?l$O_R(0%|h z*WHpY+HaR;8>u$D4k@avrD!t^HAC9*GpwVcYjv5(0iU9h&g)YvQFc}gFyRgw4r0An zUs`WuSWWr5XiL^UJ^Fe@L&opFqt}!%b9T9Y1R-EeX*iQ-2A-Te*cpg=KV1R#OQh61 zXGXeZOiC2NR3&i)qJ;+R*fq`2UXw!<eEbwb1h;VVZMs~sMm=3Ez@WnWza6bm<n1~# zKz}T+t{&2=&1;(!P7oqve=Mv{UdnR<37_2Ft`J{Tv!sHgv~i><he(yCB~G67avzEN zUkvbZ?g7S$3U81sKzO)JyJBf49x)jN?{*O!;#b;!PNaMUsOqx;{#4ys0)k+&izQDx z+{7_jSUXvA3>=$u#w8(>phwLY0g_Vv=+H$AueFFKUN)G<$cDHYC6}71T%<~c^Y<rb zryr42OQnk%3WUdaqFqnFQzpT06pQV7A`WrTak^V@H^#fc%DHs4|8D!4>vB6vo#hN{ zItFJNTc^x#bYK9~%*MHyPn#=ihnosBRH8KD2xTbUQ47?`nH}q;`s7Y|GyUCYi-4BW zW3dO#lbm5Qy_>a6#Y-l<v#<LxP?67p2T=yu(JxDoPRhUOZM;?%c4$zOXHJY@T8=~1 zW3T0118;bBx<MR}W3H{3!2ra?^y`AOJ6b>JZ$#2o9c%%BD4zm(vp_wM^dA1wk;2y* zkJ*F8ecwPgzWNO7lV9Wx2JwET!nMN)MLb!qBhNOV%#58^!r=54MB1%Z95s9R{;))F zP;$Qb(*X${@%v7A;#W+)XH_etVQgQYg8IDyPz{FUNj$M~w?C+Icg_&BydCkNz+`i% z1<oIEDkU8M%>$PGZo0b-p@%U=G)rgMe#C^`*5@I7Ld5Wsxd<J$TpW`qMW~P^R>`g< zTkHZGu%S$63ecCp80h!OT#!T1g(?q#r=rKLQMjssR?kPVHE>D7mS{zEdkmBTEnqZ2 z9RjRdqE&#hV5FiaHeYsBqp$rO%%v{@i#k9MVdNAdVgnd{aQh>$#L&u!BY{iH0@nN~ z#e|%CImN-PFP(wS5KxB~*&Ja%_Qt9rn(O9|TrCNiHUzpJ*$5G31mVnANNphx-1Yiy zxtg=8z)V$8ipb)vNaA{E+Wue<7Rk3Hq^QcA&&Xf%7CcAcfZ~Ersh5&5DJ>r@h)lMO zyP)-1lk)+`n6jJBmMZ`#q=Um-!PC%ZfYK1i8t^vsn;jfc9p1gSONGrFWDN@v72l%# zLW{jbhS+a!9@^zvjG1n4yQ?LKLp=u>AxLRuj$r`c57q)|-u?f#VUUllWa$)1OV;!% zPkM>G<jLFOE5@>1e_iMEY656iO+>^YI?okUXKbrdaj=F`ibGx0o}!!&*Nxo-lM7=k zMx%&J+2p|Mh_a19e?9-#>Dk%k`J_9u$|zXd_5RCVZ0B=CqYB(l2dihwbpezmU^iYG zRcpqYQ0UMW1qtReqpc`cu%l0pRajU*=y_YxdMNeohMtMkk_KB}BEwLt^#W6WyLL`5 zU+z!BoGS7=T{T72gWd^s0<Me>4WiAr*FBmIgvpCMcGLYP5E>sptO-W#G+yJ*D@4=- zVUr3TmXWUKhQF^dl6=2F3bLlx)aCr^12_uob6e(fVK`CGMl31X%fyb$j=rK&>n@pl zt+-4N%&TDB5?||tV+7GbWx!r2Ukqh3^Ew+A7D5}o+i5>Bf5|^tU1Th`pS^3G%~)E* ze?;~pbw^?r2_vRs2Pnz!Sf0SRM$!SjNo3{JmPZ+MC(mIiwLT}<pySlv4n=f)obCE2 z#E)<@?s%*xRINfh2g69w*t_}cV!Hc!r1=muQGoe3%S-k^aaP03A)?pE@5(gy>@pv< zK}GIpw3WFuYA(Vr_BLn=G~xl6og8E9uOF~<2BKl&Xe?szvg4k;9Y{|!ijFX}%X`CP zx*luh7XEQmfazOAFQzuJeIlk+h=#F%auKQ<(S5Izh<oGZR*|$pz_Sk@6lLQ@q?%f; z+i&3?Aj1aFrFj=t6T_{PbUBGU4fo9|IKbd|!76^Uo3C+FUCz4Pd?Tq1AWLWGc?gZ| zQHLcBH>_v|Fk=@+g08QLsZZD7(drt5#?vtq3A8+Z^77qcL+?}fOYwb>@S&kB4!qNC z{*6bwbF<R*7C!o&FaW)!?ZdvJP^sqr@g21v8KWZ9J{e=2_5{|m3kEgpZHr+6QJ5Z^ zu$IP^X?;Le0*NV5gUByFF4h=gMOHO2d*hT>wJTP!zrNn=LA!>J;&s38D(^4*LU6<a z;9_i{^=|Bl1rKiA><7g9HPpr_a)^+8Y#Q$m07IV*Us4;_i*lfA=<P$O&@P_w!M;tv zf;H+7Uc*!;@sf&*63hLEf3q|Y6$K@!?8ixge&T05neyUBIzLmhS6iu6fq6w)Sakz@ zYvIm@wjNm^%wayq@c#-2jR%tJJETt4rPO0oOHuB#82Up?0_CUUc!Q@Z16Amj`fk=8 z(TG1PPR0*rhxE1afb+uO7v9<$_E@3qaRb4yGIvLN#Aa0AHlyl-rPo?)ozJe{ECema z7f|+nV0sz(FdY>T8TAJK7gmY2xJwm{`ku=#xa{-X2#p!N6I>076dnbkoLJn&G4!z9 zLj@gAvg|~Z_d?)iTQKGM-cPzsT~a<1zy<`LH-wI*dJ1(h(%o!4-o;v)jey7sA|pZE z`Ij82FtXiX1wzh{Xey6FG}0{4QN&9tWNJg#nnma;gH_*}d2)Dla0ed5^x-+Zyn#l5 zKcYQF_KOM(<5fTaX7_s{j?@M=77wLlzzzsspWrMhgMZhB6-HUxr<X){3f7_jGAO20 z=j1Ib?+{2N5DOU<c?`jTYEAFHJDbYwp3MKK>qQ9kQ;`E9p<yfFH+8%5f3ua>hOzwz zJK$x)8L&Z*`uK$N1{jml=m2N~IQ!7mn%R+zEN_>a<qj;tku{{K`V%Y>{vtHMqg6i0 zfe_#V<pri*F80ukhTMjt75hk-Sg!XzjhfGF#9e|pHo__BMMYE&dlrFeen)33b>S(j zOz2W{_t&_x=aBLj;{m;`#@S4=OFGw?hdp`nvu|N&u9YoXtANvNaH~wFwo6@Zs_kG0 zh&)~}PhMofthD|CQx6nd)`lcJMT6SlEVVbFa(*~GXU)B0;yKEdZ|LQY0M?3~OTF6} zqkpK&7qF}G-ex{>5XxAjvDv<DYBXxkO!|;t<XeY<^Y{s4&fS_vK^F7UgbM?b_(uvM zeLE>zg!1U~oija$_nO~x0TQ3hlEuhKO0S_)v92h|1L)VAF<ymXUY=QXEt(4(k*yhq z9x4T!KjK3wRsW(p7~45?=KPCS6dDW8vZ8IqsIn-|#gHy*FvBPeDHqOnRqh;ay+g&B zFT|fI0F!I}+AKrllE08Xny1-enS6YI|BQ*8Vbe3YfrZa#!Q9>YY@vcG?#ia(z#8K{ z&{{KyN0pDD)2s@hQt@d@Y1ewbaXMU~!3;j4!K`67hO;s!O|YZE7jPaKQ1r!mQiW&^ z`fv=Tl<N6n%b8-Mhl}Yxg08zuoNvVW_jc%CgcJ92y282c#r%^!?tnRf>>gnbBCvAB z)P%#bG;@wXY;Uf3A}M{$I~2^q`P+rHP{+pd*QA~pQ?`*8kS#v_nidDys%VypOIvtq zdhXvD=A(Rx7jdear$S+b=EC_(kT_%y^WX394F?alBXhXe?OU6MSvAuUys34_$uEgQ zv)bbLK{_U(7B1<%jxzAm8wyF&t3^x8)``NBpTa-;Sn6mk{(uL^JXffikZp`ICQ7%7 zLj`63lwKsvJbr=~5c9~h;nnz*8fPik=$Jz6j4&sw`{@G+mYs(csKWeBIlf0F*WHH8 z)S+z(v2jJ6E4i5OwIbm6b{*J4G|9D)bIuZ_I;k&71a^M}QTmw*>h1LkH1h|bCBASZ ze2lYFaYO<S&M*}k0mosn@?eDpaL?ghfY`7GRhB&5cXM^61w%SmrdrPsM)`(dst{eJ zn3}Wr`O#-dv&e`dBs5^hqm?tG)<^*d|7I-Kq3u4$Y7)^CIE*o@9_OfS8ugGP1>ztT zuC54}V5ymb&sgXA(RRArVE_yVut;a&zYs>BSv9_ck^x^Uki%JE8kS1#i#oatyk?E- z5r+hnCOnIDtb<AefR+}97Fe8jQe3vs#u9inU9K(YWq2C3mr?Tla8(LzDe5SmAa4}m zh0%^bg#U)nX*E{0B`#<@sAmoGXOcJv$h1Be&unOeFsR?~B^4^#5CxsTKb?u@_$+I5 zc|Af~e&42Vjahx-1y~xluq!JD9&w<Iip)7;bs24B0C@~<{b-82zuoG@2}guc-rXSy z&*2O>$FP4m#RM{6GsuyTW&Rg<1jq~S+mF=@I<}B9yLSBrK52pvYz&I67-8_4^;AlZ z%(elfAY;WB?-1BS!Hq=lKq$nKdwq_<2nMgHIQqsw&CNFNqEPuwsgVlPZhi1GaiJpu zGJUIPFg%9HrNS_^X5f4B%!t{*#*aXyFs*EEai!z*)6YAZC4<HKT|Jfo6~ZFjBsGbw zaE!UBi`fc5WDv{*ot3Kc{HFdzVP*znRU^?V^Jm-Y=T}Ohwf8C@Z^dcXfs?$jhokL` zpp7(paD|!PY)Bon^Wvqz^kKI#q}FdJ-=!+<py2zF7mm8ugdN`34>(W3LuQy_Y%DTQ z4FX#XPGE&{G-D+{NWLS?lOAegI9}--N~|gWDur-(>A`7$n)9)V4^LxB%2k7S87>S~ zN?*Eh(<0<5Uy(gfeIKf25=lyr5WIGh*`i|iZ8hC^>j{`9V8Q$Qzyrmy;Q{_xuaFz_ z3d2@G_7*pL^m_W`uTK5N1}!~%SGl}a=)gZf79L-b02MF@#bUx<KUlm6fdF&KbnC4i zOUW3mn$Az&p2}=Tuw0{c1S>BBV#yX34hl4ZePyNSgOq3yy4PvbayEp|1UZ679{7rq zbG(z4aiX?(7!3(`HU&Ttp(zu6Q0=ppieruc{vuQ6BQWn3>z^NuQnrRTc?Ao`)_!W9 zxBKtr{ttY~f>QzA4%6$_jIw|8<1{$nESdU2@Xu(I?eInBVWR2>E~t~rS!8QYHAXMo zJ<TmS9c>{anF<PIYF3!Se}y05LG^T9%V~Xk_nzZ{Xq@!(X978NogDiS4!yX!CC^9- zUE4#Ehtc=LeH~BwX#~vBI(ismeA|jK?4_YxIOkK0CEFXAR>i?HEV~@Jz@&9QC!<uB zAM2^lNQ09kB3vl=#wY<R6)HtP!gljOa}(E(b+}~vZSfmF?hyzKh123YU^G_^pYe|` z^EL3%oF6Gl9X~v*SLc~Qe;BNkHI{Y|V}Ty0sjs_TfRf%#oG~Pu!2soz7DxHel`qpu znd1w7DkgMD*Yg$Qc*X(~%TciqzIKSQ0g_qHVn?KAMuIwSsi&vXgQCV8CzD*Xsv~%k zhv*xIE0K(ZQJ$v&RxEq1#zK!v6xafq-hc4{*fq@M*)7|1m_=NHfA}XMrA9dUX#y^N z$RH1SO$ATHjB?Ogg!E<(xv79IJHw&}pbs6%6+Xll_I&z%znxx^QxqgDw=&C*ABdgv z+#={Ud{jok4apc^9bKd?<Idq{%183saU|;DDD9uC4RukfX^kV48DkiznKM6dVpDet zJyzwzPz<tO;Pa>}$cbH-*ss&7)+WgF1paGi6hNha@}u_qjG72uz-4dr_&sNxA|<!6 z;BOqtb)BS%X{+Zx5*t)NEM4Zz67>=TIH-MwU@$?|W2GJsUqOQQ9ff}orJ74L+nBJO z^6$$PKf+>T8sMg;mljMFVW`1~ZIlx^2N`E50`C}cWd`m(C>g++{IcGG^Bqj}fE3X& zEp>S%k`TqkO=?>xhF}9pX!zLCB1J51EYTb19t)Y#9`n)BXC)I@*kdiUAG*R)EvfHF z5;7Eehlhb+00_sUSjVqixi>;01~>A}L2$;7f~_Oy{bWobvJDW;5?^QP$D0#qj=po0 z*LgEMz4Lat9s58J?506@*ZhCv=&MnE{q$P=BK%(sMmPUX&C*`8gOURR%T<qB=M|am wgH=)xZ<mYJoZ7`_8IDBx|A!yvPa(omMOQMua~{Jx7Be<=z;9>@0iP27AFXb@4*&oF literal 0 HcmV?d00001 diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch new file mode 100644 index 00000000000..185575f670a --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch @@ -0,0 +1,48189 @@ +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig +--- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,169 @@ ++# Kernel and Driver configuration for Broadcom Commengine ADSL board ++choice ++ prompt "Broadcom Commengine ADSL board" ++ depends on MIPS_BRCM ++ default BCM96345 ++ help ++ Select different Broadcom ADSL board ++ ++config BCM96338 ++ bool "96338 ADSL board" ++ select DMA_NONCOHERENT ++ ++config BCM96345 ++ bool "96345 ADSL board" ++ select DMA_NONCOHERENT ++ ++config BCM96348 ++ bool "96348 ADSL board" ++ select DMA_NONCOHERENT ++ ++endchoice ++ ++config BCM_BOARD ++ bool "Support for Broadcom Board" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SERIAL ++ bool "Support for Serial Port" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENET ++ tristate "Support for Ethernet" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_USB ++ tristate "Support for USB" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_WLAN ++ tristate "Support for Wireless" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PCI ++ bool "Support for PCI" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ select PCI ++ ++config BCM_ATMAPI ++ tristate "Support for ATM" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMTEST ++ tristate "Support for ATM Diagnostic" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ADSL ++ tristate "Support for ADSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENDPOINT ++ tristate "Support for VOICE" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PROCFS ++ tristate "Support for PROCFS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_VDSL ++ tristate "Support for VDSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SECURITY ++ tristate "Support for SECURITY" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_HPNA ++ tristate "Support for HPNA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_BOARD_IMPL ++ int "Implementation index for ADSL Board" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SERIAL_IMPL ++ int "Implementation index for Serial" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENET_IMPL ++ int "Implementation index for Ethernet" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_USB_IMPL ++ int "Implementation index for USB" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_WLAN_IMPL ++ int "Implementation index for WIRELESS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMAPI_IMPL ++ int "Implementation index for ATM" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMTEST_IMPL ++ int "Implementation index for ATM Diagnostic" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_BLAA_IMPL ++ int "Implementation index for BLAA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ADSL_IMPL ++ int "Implementation index for ADSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENDPOINT_IMPL ++ int "Implementation index for VOICE" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PROCFS_IMPL ++ int "Implementation index for PROCFS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_VDSL_IMPL ++ int "Implementation index for VDSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SECURITY_IMPL ++ int "Implementation index for SECURITY" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_HPNA_IMPL ++ int "Implementation index for HPNA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++choice ++ prompt "Root File System" ++ depends on MIPS_BRCM ++ default ROOTFS_SQUASHFS ++ help ++ Select root file system on the board flash. ++ ++config ROOTFS_SQUASHFS ++ bool "SQUASHFS" ++config ROOTFS_CRAMFS ++ bool "CRAMFS" ++config ROOTFS_JFFS2 ++ bool "JFFS2" ++config ROOTFS_NFS ++ bool "NFS" ++ ++endchoice ++ ++config ROOT_FLASHFS ++ string "flash partition" ++ depends on ROOTFS_SQUASHFS || ROOTFS_CRAMFS || ROOTFS_JFFS2 ++ default "root=31:0 ro noinitrd" if ROOTFS_SQUASHFS = y || ROOTFS_CRAMFS = y ++ default "root=31:2 ro noinitrd" if ROOTFS_JFFS2 = y ++ help ++ This is the root file system partition on flash memory ++ ++config ROOT_NFS_DIR ++ string "NFS server path" ++ depends on ROOTFS_NFS ++ default "/opt/bcm96338/targets/96338R/fs" if BCM96338 = y ++ default "/opt/bcm96345/targets/96345R/fs" if BCM96345 = y ++ default "/opt/bcm96348/targets/96348R/fs" if BCM96348 = y ++ help ++ This is the path of NFS server (host system) +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile +--- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,23 @@ ++# ++# Makefile for generic Broadcom MIPS boards ++# ++# Copyright (C) 2004 Broadcom Corporation ++# ++obj-y := irq.o prom.o setup.o time.o ser_init.o ++ ++SRCBASE := $(TOPDIR) ++EXTRA_CFLAGS += -I$(INC_BRCMBOARDPARMS_PATH)/$(BRCM_BOARD) -I$(SRCBASE)/include -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++#EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -DDBG ++EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) ++ ++ ++ifeq "$(ADSL)" "ANNEX_B" ++EXTRA_CFLAGS += -DADSL_ANNEXB ++endif ++ifeq "$(ADSL)" "SADSL" ++EXTRA_CFLAGS += -DADSL_SADSL ++endif ++ifeq "$(ADSL)" "ANNEX_C" ++EXTRA_CFLAGS += -DADSL_ANNEXC ++endif ++ +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c +--- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,276 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Interrupt control functions for Broadcom 963xx MIPS boards ++ */ ++ ++#include <asm/atomic.h> ++ ++#include <linux/delay.h> ++#include <linux/init.h> ++#include <linux/ioport.h> ++#include <linux/irq.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/slab.h> ++#include <linux/module.h> ++ ++#include <asm/irq.h> ++#include <asm/mipsregs.h> ++#include <asm/addrspace.h> ++#include <asm/signal.h> ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++extern asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs); ++ ++static void irq_dispatch_int(struct pt_regs *regs) ++{ ++ unsigned int pendingIrqs; ++ static unsigned int irqBit; ++ static unsigned int isrNumber = 31; ++ ++ pendingIrqs = PERF->IrqStatus & PERF->IrqMask; ++ if (!pendingIrqs) { ++ return; ++ } ++ ++ while (1) { ++ irqBit <<= 1; ++ isrNumber++; ++ if (isrNumber == 32) { ++ isrNumber = 0; ++ irqBit = 0x1; ++ } ++ if (pendingIrqs & irqBit) { ++ PERF->IrqMask &= ~irqBit; // mask ++ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET, regs); ++ break; ++ } ++ } ++} ++ ++static void irq_dispatch_ext(uint32 irq, struct pt_regs *regs) ++{ ++ if (!(PERF->ExtIrqCfg & (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)))) { ++ printk("**** Ext IRQ mask. Should not dispatch ****\n"); ++ } ++ /* disable and clear interrupt in the controller */ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ do_IRQ(irq, regs); ++} ++ ++void brcm_irq_dispatch(struct pt_regs *regs) ++{ ++ u32 cause; ++ while((cause = (read_c0_cause()& CAUSEF_IP))) { ++ if (cause & CAUSEF_IP7) ++ do_IRQ(MIPS_TIMER_INT, regs); ++ else if (cause & CAUSEF_IP2) ++ irq_dispatch_int(regs); ++ else if (cause & CAUSEF_IP3) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); ++ else if (cause & CAUSEF_IP4) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); ++ else if (cause & CAUSEF_IP5) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); ++ else if (cause & CAUSEF_IP6) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); ++ cli(); ++ } ++} ++ ++ ++void enable_brcm_irq(unsigned int irq) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { ++ PERF->IrqMask |= (1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); ++ } ++ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { ++ /* enable and clear interrupt in the controller */ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ } ++ local_irq_restore(flags); ++} ++ ++void disable_brcm_irq(unsigned int irq) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { ++ PERF->IrqMask &= ~(1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); ++ } ++ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { ++ /* disable interrupt in the controller */ ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ } ++ local_irq_restore(flags); ++} ++ ++void ack_brcm_irq(unsigned int irq) ++{ ++ /* Already done in brcm_irq_dispatch */ ++} ++ ++unsigned int startup_brcm_irq(unsigned int irq) ++{ ++ enable_brcm_irq(irq); ++ ++ return 0; /* never anything pending */ ++} ++ ++unsigned int startup_brcm_none(unsigned int irq) ++{ ++ return 0; ++} ++ ++void end_brcm_irq(unsigned int irq) ++{ ++ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) ++ enable_brcm_irq(irq); ++} ++ ++void end_brcm_none(unsigned int irq) ++{ ++} ++ ++#define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) ++ ++static void __init brcm_irq_setup(void) ++{ ++ extern asmlinkage void brcmIRQ(void); ++ ++ clear_c0_status(ST0_BEV); ++ set_except_vector(0, brcmIRQ); ++ change_c0_status(ST0_IM, ALLINTS_NOTIMER); ++ ++#ifdef CONFIG_REMOTE_DEBUG ++ rs_kgdb_hook(0); ++#endif ++} ++ ++static struct hw_interrupt_type brcm_irq_type = { ++ .typename = "MIPS", ++ .startup = startup_brcm_irq, ++ .shutdown = disable_brcm_irq, ++ .enable = enable_brcm_irq, ++ .disable = disable_brcm_irq, ++ .ack = ack_brcm_irq, ++ .end = end_brcm_irq, ++ .set_affinity = NULL ++}; ++ ++static struct hw_interrupt_type brcm_irq_no_end_type = { ++ .typename = "MIPS", ++ .startup = startup_brcm_none, ++ .shutdown = disable_brcm_irq, ++ .enable = enable_brcm_irq, ++ .disable = disable_brcm_irq, ++ .ack = ack_brcm_irq, ++ .end = end_brcm_none, ++ .set_affinity = NULL ++}; ++ ++void __init arch_init_irq(void) ++{ ++ int i; ++ ++ for (i = 0; i < NR_IRQS; i++) { ++ irq_desc[i].status = IRQ_DISABLED; ++ irq_desc[i].action = 0; ++ irq_desc[i].depth = 1; ++ irq_desc[i].handler = &brcm_irq_type; ++ } ++ ++ brcm_irq_setup(); ++} ++ ++int request_external_irq(unsigned int irq, ++ FN_HANDLER handler, ++ unsigned long irqflags, ++ const char * devname, ++ void *dev_id) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); // Clear ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); // Mask ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_INSENS_SHFT)); // Edge insesnsitive ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_LEVEL_SHFT)); // Level triggered ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_SENSE_SHFT)); // Low level ++ ++ local_irq_restore(flags); ++ ++ return( request_irq(irq, handler, irqflags, devname, dev_id) ); ++} ++ ++/* VxWorks compatibility function(s). */ ++ ++unsigned int BcmHalMapInterrupt(FN_HANDLER pfunc, unsigned int param, ++ unsigned int interruptId) ++{ ++ int nRet = -1; ++ char *devname; ++ ++ devname = kmalloc(16, GFP_KERNEL); ++ if (devname) ++ sprintf( devname, "brcm_%d", interruptId ); ++ ++ /* Set the IRQ description to not automatically enable the interrupt at ++ * the end of an ISR. The driver that handles the interrupt must ++ * explicitly call BcmHalInterruptEnable or enable_brcm_irq. This behavior ++ * is consistent with interrupt handling on VxWorks. ++ */ ++ irq_desc[interruptId].handler = &brcm_irq_no_end_type; ++ ++ if( interruptId >= INTERNAL_ISR_TABLE_OFFSET ) ++ { ++ nRet = request_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, ++ devname, (void *) param ); ++ } ++ else if (interruptId >= INTERRUPT_ID_EXTERNAL_0 && interruptId <= INTERRUPT_ID_EXTERNAL_3) ++ { ++ nRet = request_external_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, ++ devname, (void *) param ); ++ } ++ ++ return( nRet ); ++} ++ ++ ++/* Debug function. */ ++ ++void dump_intr_regs(void) ++{ ++ printk("PERF->ExtIrqCfg [%08x]\n", *(&(PERF->ExtIrqCfg))); ++} ++ ++EXPORT_SYMBOL(enable_brcm_irq); ++EXPORT_SYMBOL(disable_brcm_irq); ++EXPORT_SYMBOL(request_external_irq); ++EXPORT_SYMBOL(BcmHalMapInterrupt); ++ +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c +--- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,233 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * prom.c: PROM library initialization code. ++ * ++ */ ++#include <linux/init.h> ++#include <linux/mm.h> ++#include <linux/sched.h> ++#include <linux/bootmem.h> ++#include <linux/blkdev.h> ++#include <asm/addrspace.h> ++#include <asm/bootinfo.h> ++#include <asm/cpu.h> ++#include <asm/time.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include "boardparms.h" ++#include "softdsl/AdslCoreDefs.h" ++ ++ ++extern int do_syslog(int, char *, int); ++extern void serial_init(void); ++extern void __init InitNvramInfo( void ); ++extern void kerSysFlashInit( void ); ++extern unsigned long get_nvram_start_addr(void); ++void __init create_root_nfs_cmdline( char *cmdline ); ++ ++#if defined(CONFIG_BCM96338) ++#define CPU_CLOCK 240000000 ++#define MACH_BCM MACH_BCM96338 ++#endif ++#if defined(CONFIG_BCM96345) ++#define CPU_CLOCK 140000000 ++#define MACH_BCM MACH_BCM96345 ++#endif ++#if defined(CONFIG_BCM96348) ++void __init calculateCpuSpeed(void); ++static unsigned long cpu_speed; ++#define CPU_CLOCK cpu_speed ++#define MACH_BCM MACH_BCM96348 ++#endif ++ ++const char *get_system_type(void) ++{ ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ ++ return( pNvramData->szBoardId ); ++} ++ ++unsigned long getMemorySize(void) ++{ ++ unsigned long ulSdramType = BOARD_SDRAM_TYPE; ++ ++ unsigned long ulSdramSize; ++ ++ switch( ulSdramType ) ++ { ++ case BP_MEMORY_16MB_1_CHIP: ++ case BP_MEMORY_16MB_2_CHIP: ++ ulSdramSize = 16 * 1024 * 1024; ++ break; ++ case BP_MEMORY_32MB_1_CHIP: ++ case BP_MEMORY_32MB_2_CHIP: ++ ulSdramSize = 32 * 1024 * 1024; ++ break; ++ case BP_MEMORY_64MB_2_CHIP: ++ ulSdramSize = 64 * 1024 * 1024; ++ break; ++ default: ++ ulSdramSize = 8 * 1024 * 1024; ++ break; ++ } ++ ++ return ulSdramSize; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: prom_init ++ -------------------------------------------------------------------------- */ ++void __init prom_init(void) ++{ ++ extern ulong r4k_interval; ++ ++ serial_init(); ++ ++ kerSysFlashInit(); ++ ++ do_syslog(8, NULL, 8); ++ ++ printk( "%s prom init\n", get_system_type() ); ++ ++ PERF->IrqMask = 0; ++ ++ arcs_cmdline[0] = '\0'; ++ ++#if defined(CONFIG_ROOT_NFS) ++ create_root_nfs_cmdline( arcs_cmdline ); ++#elif defined(CONFIG_ROOT_FLASHFS) ++ strcpy(arcs_cmdline, CONFIG_ROOT_FLASHFS); ++#endif ++ ++ add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); ++ ++#if defined(CONFIG_BCM96348) ++ calculateCpuSpeed(); ++#endif ++ /* Count register increments every other clock */ ++ r4k_interval = CPU_CLOCK / HZ / 2; ++ mips_hpt_frequency = CPU_CLOCK / 2; ++ ++ mips_machgroup = MACH_GROUP_BRCM; ++ mips_machtype = MACH_BCM; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: prom_free_prom_memory ++Abstract: ++ -------------------------------------------------------------------------- */ ++void __init prom_free_prom_memory(void) ++{ ++ ++} ++ ++ ++#if defined(CONFIG_ROOT_NFS) ++/* This function reads in a line that looks something like this: ++ * ++ * ++ * CFE bootline=bcmEnet(0,0)host:vmlinux e=192.169.0.100:ffffff00 h=192.169.0.1 ++ * ++ * ++ * and retuns in the cmdline parameter some that looks like this: ++ * ++ * CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/opt/targets/96345R/fs ++ * ip=192.168.0.100:192.168.0.1::255.255.255.0::eth0:off rw" ++ */ ++#define BOOT_LINE_ADDR 0x0 ++#define HEXDIGIT(d) ((d >= '0' && d <= '9') ? (d - '0') : ((d | 0x20) - 'W')) ++#define HEXBYTE(b) (HEXDIGIT((b)[0]) << 4) + HEXDIGIT((b)[1]) ++extern unsigned long get_nvram_start_addr(void); ++ ++void __init create_root_nfs_cmdline( char *cmdline ) ++{ ++ char root_nfs_cl[] = "root=/dev/nfs nfsroot=%s:" CONFIG_ROOT_NFS_DIR ++ " ip=%s:%s::%s::eth0:off rw"; ++ ++ char *localip = NULL; ++ char *hostip = NULL; ++ char mask[16] = ""; ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ char bootline[128] = ""; ++ char *p = bootline; ++ ++ memcpy(bootline, pNvramData->szBootline, sizeof(bootline)); ++ while( *p ) ++ { ++ if( p[0] == 'e' && p[1] == '=' ) ++ { ++ /* Found local ip address */ ++ p += 2; ++ localip = p; ++ while( *p && *p != ' ' && *p != ':' ) ++ p++; ++ if( *p == ':' ) ++ { ++ /* Found network mask (eg FFFFFF00 */ ++ *p++ = '\0'; ++ sprintf( mask, "%u.%u.%u.%u", HEXBYTE(p), HEXBYTE(p + 2), ++ HEXBYTE(p + 4), HEXBYTE(p + 6) ); ++ p += 4; ++ } ++ else if( *p == ' ' ) ++ *p++ = '\0'; ++ } ++ else if( p[0] == 'h' && p[1] == '=' ) ++ { ++ /* Found host ip address */ ++ p += 2; ++ hostip = p; ++ while( *p && *p != ' ' ) ++ p++; ++ if( *p == ' ' ) ++ *p++ = '\0'; ++ } ++ else ++ p++; ++ } ++ ++ if( localip && hostip ) ++ sprintf( cmdline, root_nfs_cl, hostip, localip, hostip, mask ); ++} ++#endif ++ ++#if defined(CONFIG_BCM96348) ++/* ********************************************************************* ++ * calculateCpuSpeed() ++ * Calculate the BCM6348 CPU speed by reading the PLL strap register ++ * and applying the following formula: ++ * cpu_clk = (.25 * 64MHz freq) * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) ++ * Input parameters: ++ * none ++ * Return value: ++ * none ++ ********************************************************************* */ ++void __init calculateCpuSpeed(void) ++{ ++ UINT32 pllStrap = PERF->PllStrap; ++ int n1 = (pllStrap & PLL_N1_MASK) >> PLL_N1_SHFT; ++ int n2 = (pllStrap & PLL_N2_MASK) >> PLL_N2_SHFT; ++ int m1cpu = (pllStrap & PLL_M1_CPU_MASK) >> PLL_M1_CPU_SHFT; ++ ++ cpu_speed = (16 * (n1 + 1) * (n2 + 2) / (m1cpu + 1)) * 1000000; ++} ++#endif ++ +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c +--- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,180 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Broadcom bcm63xx serial port initialization, also prepare for printk ++ * by registering with console_init ++ * ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/console.h> ++#include <linux/sched.h> ++ ++#include <asm/addrspace.h> ++#include <asm/irq.h> ++#include <asm/reboot.h> ++#include <asm/gdb-stub.h> ++#include <asm/mc146818rtc.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define SER63XX_DEFAULT_BAUD 115200 ++#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) ++#define stUart ((volatile Uart * const) UART_BASE) ++ ++// Transmit interrupts ++#define TXINT (TXFIFOEMT | TXUNDERR | TXOVFERR) ++// Receive interrupts ++#define RXINT (RXFIFONE | RXOVFERR) ++ ++/* -------------------------------------------------------------------------- ++ Name: serial_init ++ Purpose: Initalize the UART ++-------------------------------------------------------------------------- */ ++void __init serial_init(void) ++{ ++ UINT32 tmpVal = SER63XX_DEFAULT_BAUD; ++ ULONG clockFreqHz; ++ ++#if defined(CONFIG_BCM96345) ++ // Make sure clock is ticking ++ PERF->blkEnables |= UART_CLK_EN; ++#endif ++ ++ /* Dissable channel's receiver and transmitter. */ ++ stUart->control &= ~(BRGEN|TXEN|RXEN); ++ ++ /*--------------------------------------------------------------------*/ ++ /* Write the table value to the clock select register. */ ++ /* DPullen - this is the equation to use: */ ++ /* value = clockFreqHz / baud / 32-1; */ ++ /* (snmod) Actually you should also take into account any necessary */ ++ /* rounding. Divide by 16, look at lsb, if 0, divide by 2 */ ++ /* and subtract 1. If 1, just divide by 2 */ ++ /*--------------------------------------------------------------------*/ ++ clockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; ++ tmpVal = (clockFreqHz / tmpVal) / 16; ++ if( tmpVal & 0x01 ) ++ tmpVal /= 2; //Rounding up, so sub is already accounted for ++ else ++ tmpVal = (tmpVal / 2) - 1; // Rounding down so we must sub 1 ++ stUart->baudword = tmpVal; ++ ++ /* Finally, re-enable the transmitter and receiver. */ ++ stUart->control |= (BRGEN|TXEN|RXEN); ++ ++ stUart->config = (BITS8SYM | ONESTOP); ++ // Set the FIFO interrupt depth ... stUart->fifocfg = 0xAA; ++ stUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; ++ stUart->intMask = 0; ++ stUart->intMask = RXINT | TXINT; ++} ++ ++ ++/* prom_putc() ++ * Output a character to the UART ++ */ ++void prom_putc(char c) ++{ ++ /* Wait for Tx uffer to empty */ ++ while (! (READ16(stUart->intStatus) & TXFIFOEMT)); ++ /* Send character */ ++ stUart->Data = c; ++} ++ ++/* prom_puts() ++ * Write a string to the UART ++ */ ++void prom_puts(const char *s) ++{ ++ while (*s) { ++ if (*s == '\n') { ++ prom_putc('\r'); ++ } ++ prom_putc(*s++); ++ } ++} ++ ++ ++/* prom_getc_nowait() ++ * Returns a character from the UART ++ * Returns -1 if no characters available or corrupted ++ */ ++int prom_getc_nowait(void) ++{ ++ uint16 uStatus; ++ int cData = -1; ++ ++ uStatus = READ16(stUart->intStatus); ++ ++ if (uStatus & RXFIFONE) { /* Do we have a character? */ ++ cData = READ16(stUart->Data) & 0xff; /* Read character */ ++ if (uStatus & (RXFRAMERR | RXPARERR)) { /* If we got an error, throw it away */ ++ cData = -1; ++ } ++ } ++ ++ return cData; ++} ++ ++/* prom_getc() ++ * Returns a charcter from the serial port ++ * Will block until it receives a valid character ++*/ ++char prom_getc(void) ++{ ++ int cData = -1; ++ ++ /* Loop until we get a valid character */ ++ while(cData == -1) { ++ cData = prom_getc_nowait(); ++ } ++ return (char) cData; ++} ++ ++/* prom_testc() ++ * Returns 0 if no characters available ++ */ ++int prom_testc(void) ++{ ++ uint16 uStatus; ++ ++ uStatus = READ16(stUart->intStatus); ++ ++ return (uStatus & RXFIFONE); ++} ++ ++#if CONFIG_REMOTE_DEBUG ++/* Prevent other code from writing to the serial port */ ++void _putc(char c) { } ++void _puts(const char *ptr) { } ++#else ++/* Low level outputs call prom routines */ ++void _putc(char c) { ++ prom_putc(c); ++} ++void _puts(const char *ptr) { ++ prom_puts(ptr); ++} ++#endif +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c +--- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,519 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Generic setup routines for Broadcom 963xx MIPS boards ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/kdev_t.h> ++#include <linux/types.h> ++#include <linux/console.h> ++#include <linux/sched.h> ++#include <linux/mm.h> ++#include <linux/slab.h> ++#include <linux/module.h> ++ ++#include <asm/addrspace.h> ++#include <asm/bcache.h> ++#include <asm/irq.h> ++#include <asm/time.h> ++#include <asm/reboot.h> ++#include <asm/gdb-stub.h> ++ ++extern void brcm_timer_setup(struct irqaction *irq); ++extern unsigned long getMemorySize(void); ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++#include <linux/pci.h> ++#include <linux/delay.h> ++#include <bcm_map_part.h> ++#include <bcmpci.h> ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++#endif ++ ++/* This function should be in a board specific directory. For now, ++ * assume that all boards that include this file use a Broadcom chip ++ * with a soft reset bit in the PLL control register. ++ */ ++static void brcm_machine_restart(char *command) ++{ ++ const unsigned long ulSoftReset = 0x00000001; ++ unsigned long *pulPllCtrl = (unsigned long *) 0xfffe0008; ++ *pulPllCtrl |= ulSoftReset; ++} ++ ++static void brcm_machine_halt(void) ++{ ++ printk("System halted\n"); ++ while (1); ++} ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++ ++static void mpi_SetLocalPciConfigReg(uint32 reg, uint32 value) ++{ ++ /* write index then value */ ++ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; ++ mpi->pcicfgdata = value; ++} ++ ++static uint32 mpi_GetLocalPciConfigReg(uint32 reg) ++{ ++ /* write index then get value */ ++ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; ++ return mpi->pcicfgdata; ++} ++ ++/* ++ * mpi_ResetPcCard: Set/Reset the PcCard ++ */ ++static void mpi_ResetPcCard(int cardtype, BOOL bReset) ++{ ++ if (cardtype == MPI_CARDTYPE_NONE) { ++ return; ++ } ++ ++ if (cardtype == MPI_CARDTYPE_CARDBUS) { ++ bReset = ! bReset; ++ } ++ ++ if (bReset) { ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); ++ } else { ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 | PCCARD_CARD_RESET); ++ } ++} ++ ++/* ++ * mpi_ConfigCs: Configure an MPI/EBI chip select ++ */ ++static void mpi_ConfigCs(uint32 cs, uint32 base, uint32 size, uint32 flags) ++{ ++ mpi->cs[cs].base = ((base & 0x1FFFFFFF) | size); ++ mpi->cs[cs].config = flags; ++} ++ ++/* ++ * mpi_InitPcmciaSpace ++ */ ++static void mpi_InitPcmciaSpace(void) ++{ ++ // ChipSelect 4 controls PCMCIA Memory accesses ++ mpi_ConfigCs(PCMCIA_COMMON_BASE, pcmciaMem, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); ++ // ChipSelect 5 controls PCMCIA Attribute accesses ++ mpi_ConfigCs(PCMCIA_ATTRIBUTE_BASE, pcmciaAttr, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); ++ // ChipSelect 6 controls PCMCIA I/O accesses ++ mpi_ConfigCs(PCMCIA_IO_BASE, pcmciaIo, EBI_SIZE_64K, (EBI_WORD_WIDE|EBI_ENABLE)); ++ ++ mpi->pcmcia_cntl2 = ((PCMCIA_ATTR_ACTIVE << RW_ACTIVE_CNT_BIT) | ++ (PCMCIA_ATTR_INACTIVE << INACTIVE_CNT_BIT) | ++ (PCMCIA_ATTR_CE_SETUP << CE_SETUP_CNT_BIT) | ++ (PCMCIA_ATTR_CE_HOLD << CE_HOLD_CNT_BIT)); ++ ++ mpi->pcmcia_cntl2 |= (PCMCIA_HALFWORD_EN | PCMCIA_BYTESWAP_DIS); ++} ++ ++/* ++ * cardtype_vcc_detect: PC Card's card detect and voltage sense connection ++ * ++ * CD1#/ CD2#/ VS1#/ VS2#/ Card Initial Vcc ++ * CCD1# CCD2# CVS1 CVS2 Type ++ * ++ * GND GND open open 16-bit 5 vdc ++ * ++ * GND GND GND open 16-bit 3.3 vdc ++ * ++ * GND GND open GND 16-bit x.x vdc ++ * ++ * GND GND GND GND 16-bit 3.3 & x.x vdc ++ * ++ *==================================================================== ++ * ++ * CVS1 GND CCD1# open CardBus 3.3 vdc ++ * ++ * GND CVS2 open CCD2# CardBus x.x vdc ++ * ++ * GND CVS1 CCD2# open CardBus y.y vdc ++ * ++ * GND CVS2 GND CCD2# CardBus 3.3 & x.x vdc ++ * ++ * CVS2 GND open CCD1# CardBus x.x & y.y vdc ++ * ++ * GND CVS1 CCD2# open CardBus 3.3, x.x & y.y vdc ++ * ++ */ ++static int cardtype_vcc_detect(void) ++{ ++ uint32 data32; ++ int cardtype; ++ ++ cardtype = MPI_CARDTYPE_NONE; ++ mpi->pcmcia_cntl1 = 0x0000A000; // Turn on the output enables and drive ++ // the CVS pins to 0. ++ data32 = mpi->pcmcia_cntl1; ++ switch (data32 & 0x00000003) // Test CD1# and CD2#, see if card is plugged in. ++ { ++ case 0x00000003: // No Card is in the slot. ++ printk("mpi: No Card is in the PCMCIA slot\n"); ++ break; ++ ++ case 0x00000002: // Partial insertion, No CD2#. ++ printk("mpi: Card in the PCMCIA slot partial insertion, no CD2 signal\n"); ++ break; ++ ++ case 0x00000001: // Partial insertion, No CD1#. ++ printk("mpi: Card in the PCMCIA slot partial insertion, no CD1 signal\n"); ++ break; ++ ++ case 0x00000000: ++ mpi->pcmcia_cntl1 = 0x0000A0C0; // Turn off the CVS output enables and ++ // float the CVS pins. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ // Read the Register. ++ switch (data32 & 0x0000000C) // See what is on the CVS pins. ++ { ++ case 0x00000000: // CVS1 and CVS2 are tied to ground, only 1 option. ++ printk("mpi: Detected 3.3 & x.x 16-bit PCMCIA card\n"); ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ break; ++ ++ case 0x00000004: // CVS1 is open or tied to CCD1/CCD2 and CVS2 is tied to ground. ++ // 2 valid voltage options. ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ mpi->pcmcia_cntl1 = 0x0000A080; // Drive CVS1 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS2, not valid. ++ printk("mpi: Unknown card plugged into slot\n"); ++ } else { // CCD2 is tied to CVS1. ++ printk("mpi: Detected 3.3, x.x and y.y Cardbus card\n"); ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ } ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ printk("mpi: Detected x.x vdc 16-bit PCMCIA card\n"); ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ break; ++ } ++ break; ++ ++ case 0x00000008: // CVS2 is open or tied to CCD1/CCD2 and CVS1 is tied to ground. ++ // 2 valid voltage options. ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS1, not valid. ++ printk("mpi: Unknown card plugged into slot\n"); ++ } else {// CCD2 is tied to CVS2. ++ printk("mpi: Detected 3.3 and x.x Cardbus card\n"); ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ } ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ printk("mpi: Detected 3.3 vdc 16-bit PCMCIA card\n"); ++ break; ++ } ++ break; ++ ++ case 0x0000000C: // CVS1 and CVS2 are open or tied to CCD1/CCD2. ++ // 5 valid voltage options. ++ ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ // CCD1 is tied to ground. ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS1. ++ printk("mpi: Detected y.y vdc Cardbus card\n"); ++ } else { // CCD2 is tied to CVS2. ++ printk("mpi: Detected x.x vdc Cardbus card\n"); ++ } ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // CCD2 is tied to ground. ++ ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000001) {// CCD1 is tied to CVS1. ++ printk("mpi: Detected 3.3 vdc Cardbus card\n"); ++ } else { // CCD1 is tied to CVS2. ++ printk("mpi: Detected x.x and y.y Cardbus card\n"); ++ } ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ printk("mpi: Detected 5 vdc 16-bit PCMCIA card\n"); ++ break; ++ } ++ break; ++ ++ default: ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ } ++ } ++ return cardtype; ++} ++ ++/* ++ * mpi_DetectPcCard: Detect the plugged in PC-Card ++ * Return: < 0 => Unknown card detected ++ * 0 => No card detected ++ * 1 => 16-bit card detected ++ * 2 => 32-bit CardBus card detected ++ */ ++static int mpi_DetectPcCard(void) ++{ ++ int cardtype; ++ ++ cardtype = cardtype_vcc_detect(); ++ switch(cardtype) { ++ case MPI_CARDTYPE_PCMCIA: ++ mpi->pcmcia_cntl1 &= ~0x0000e000; // disable enable bits ++ //mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); ++ mpi->pcmcia_cntl1 |= (PCMCIA_ENABLE | PCMCIA_GPIO_ENABLE); ++ mpi_InitPcmciaSpace(); ++ mpi_ResetPcCard(cardtype, FALSE); ++ // Hold card in reset for 10ms ++ mdelay(10); ++ mpi_ResetPcCard(cardtype, TRUE); ++ // Let card come out of reset ++ mdelay(100); ++ break; ++ case MPI_CARDTYPE_CARDBUS: ++ // 8 => CardBus Enable ++ // 1 => PCI Slot Number ++ // C => Float VS1 & VS2 ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & 0xFFFF0000) | ++ CARDBUS_ENABLE | ++ (CARDBUS_SLOT << 8)| ++ VS2_OEN | ++ VS1_OEN; ++ /* access to this memory window will be to/from CardBus */ ++ mpi->l2pmremap1 |= CARDBUS_MEM; ++ ++ // Need to reset the Cardbus Card. There's no CardManager to do this, ++ // and we need to be ready for PCI configuration. ++ mpi_ResetPcCard(cardtype, FALSE); ++ // Hold card in reset for 10ms ++ mdelay(10); ++ mpi_ResetPcCard(cardtype, TRUE); ++ // Let card come out of reset ++ mdelay(100); ++ break; ++ default: ++ break; ++ } ++ return cardtype; ++} ++ ++static int mpi_init(void) ++{ ++ unsigned long data; ++ unsigned int chipid; ++ unsigned int chiprev; ++ unsigned int sdramsize; ++ ++ chipid = (PERF->RevID & 0xFFFF0000) >> 16; ++ chiprev = (PERF->RevID & 0xFF); ++ sdramsize = getMemorySize(); ++ /* ++ * Init the pci interface ++ */ ++ data = GPIO->GPIOMode; // GPIO mode register ++ data |= GROUP2_PCI | GROUP1_MII_PCCARD; // PCI internal arbiter + Cardbus ++ GPIO->GPIOMode = data; // PCI internal arbiter ++ ++ /* ++ * In the BCM6348 CardBus support is defaulted to Slot 0 ++ * because there is no external IDSEL for CardBus. To disable ++ * the CardBus and allow a standard PCI card in Slot 0 ++ * set the cbus_idsel field to 0x1f. ++ */ ++ /* ++ uData = mpi->pcmcia_cntl1; ++ uData |= CARDBUS_IDSEL; ++ mpi->pcmcia_cntl1 = uData; ++ */ ++ // Setup PCI I/O Window range. Give 64K to PCI I/O ++ mpi->l2piorange = ~(BCM_PCI_IO_SIZE_64KB-1); ++ // UBUS to PCI I/O base address ++ mpi->l2piobase = BCM_PCI_IO_BASE & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI I/O Window remap ++ mpi->l2pioremap = (BCM_PCI_IO_BASE | MEM_WINDOW_EN); ++ ++ // enable PCI related GPIO pins and data swap between system and PCI bus ++ mpi->locbuscntrl = (EN_PCI_GPIO | DIR_U2P_NOSWAP); ++ ++ /* Enable 6348 BusMaster and Memory access mode */ ++ data = mpi_GetLocalPciConfigReg(PCI_COMMAND); ++ data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); ++ mpi_SetLocalPciConfigReg(PCI_COMMAND, data); ++ ++ /* Configure two 16 MByte PCI to System memory regions. */ ++ /* These memory regions are used when PCI device is a bus master */ ++ /* Accesses to the SDRAM from PCI bus will be "byte swapped" for this region */ ++ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_3, BCM_HOST_MEM_SPACE1); ++ mpi->sp0remap = 0x0; ++ ++ /* Accesses to the SDRAM from PCI bus will not be "byte swapped" for this region */ ++ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_4, BCM_HOST_MEM_SPACE2); ++ mpi->sp1remap = 0x0; ++ mpi->pcimodesel |= (PCI_BAR2_NOSWAP | 0x40); ++ ++ if ((chipid == 0x6348) && (chiprev == 0xb0)) { ++ mpi->sp0range = ~(sdramsize-1); ++ mpi->sp1range = ~(sdramsize-1); ++ } ++ /* ++ * Change 6348 PCI Cfg Reg. offset 0x40 to PCI memory read retry count infinity ++ * by set 0 in bit 8~15. This resolve read Bcm4306 srom return 0xffff in ++ * first read. ++ */ ++ data = mpi_GetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER); ++ data &= ~BRCM_PCI_CONFIG_TIMER_RETRY_MASK; ++ data |= 0x00000080; ++ mpi_SetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER, data); ++ ++ /* enable pci interrupt */ ++ mpi->locintstat |= (EXT_PCI_INT << 16); ++ ++ mpi_DetectPcCard(); ++ ++ ioport_resource.start = BCM_PCI_IO_BASE; ++ ioport_resource.end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB; ++ ++#if defined(CONFIG_USB) ++ PERF->blkEnables |= USBH_CLK_EN; ++ mdelay(100); ++ *USBH_NON_OHCI = NON_OHCI_BYTE_SWAP; ++#endif ++ ++ return 0; ++} ++#endif ++ ++static int __init brcm63xx_setup(void) ++{ ++ extern int panic_timeout; ++ ++ _machine_restart = brcm_machine_restart; ++ _machine_halt = brcm_machine_halt; ++ _machine_power_off = brcm_machine_halt; ++ ++ board_timer_setup = brcm_timer_setup; ++ ++ panic_timeout = 180; ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++ /* mpi initialization */ ++ mpi_init(); ++#endif ++ return 0; ++} ++ ++early_initcall(brcm63xx_setup); ++ ++/*************************************************************************** ++ * C++ New and delete operator functions ++ ***************************************************************************/ ++ ++/* void *operator new(unsigned int sz) */ ++void *_Znwj(unsigned int sz) ++{ ++ return( kmalloc(sz, GFP_KERNEL) ); ++} ++ ++/* void *operator new[](unsigned int sz)*/ ++void *_Znaj(unsigned int sz) ++{ ++ return( kmalloc(sz, GFP_KERNEL) ); ++} ++ ++/* placement new operator */ ++/* void *operator new (unsigned int size, void *ptr) */ ++void *ZnwjPv(unsigned int size, void *ptr) ++{ ++ return ptr; ++} ++ ++/* void operator delete(void *m) */ ++void _ZdlPv(void *m) ++{ ++ kfree(m); ++} ++ ++/* void operator delete[](void *m) */ ++void _ZdaPv(void *m) ++{ ++ kfree(m); ++} ++ ++EXPORT_SYMBOL(_Znwj); ++EXPORT_SYMBOL(_Znaj); ++EXPORT_SYMBOL(ZnwjPv); ++EXPORT_SYMBOL(_ZdlPv); ++EXPORT_SYMBOL(_ZdaPv); ++ +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c +--- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,277 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Setup time for Broadcom 963xx MIPS boards ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/kernel_stat.h> ++#include <linux/sched.h> ++#include <linux/spinlock.h> ++#include <linux/interrupt.h> ++#include <linux/module.h> ++#include <linux/time.h> ++#include <linux/timex.h> ++ ++#include <asm/mipsregs.h> ++#include <asm/ptrace.h> ++#include <asm/div64.h> ++#include <asm/time.h> ++ ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++unsigned long r4k_interval; /* Amount to increment compare reg each time */ ++static unsigned long r4k_cur; /* What counter should be at next timer irq */ ++ ++/* Cycle counter value at the previous timer interrupt.. */ ++static unsigned int timerhi = 0, timerlo = 0; ++ ++extern volatile unsigned long wall_jiffies; ++ ++/* Optional board-specific timer routine */ ++void (*board_timer_interrupt)(int irq, void *dev_id, struct pt_regs * regs); ++ ++static inline void ack_r4ktimer(unsigned long newval) ++{ ++ write_c0_compare(newval); ++} ++ ++/* ++ * There are a lot of conceptually broken versions of the MIPS timer interrupt ++ * handler floating around. This one is rather different, but the algorithm ++ * is provably more robust. ++ */ ++static irqreturn_t brcm_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) ++{ ++ unsigned int count; ++ ++ if (r4k_interval == 0) ++ goto null; ++ ++ do { ++ do_timer(regs); ++ ++ if (board_timer_interrupt) ++ board_timer_interrupt(irq, dev_id, regs); ++ ++ r4k_cur += r4k_interval; ++ ack_r4ktimer(r4k_cur); ++ ++ } while (((count = (unsigned long)read_c0_count()) ++ - r4k_cur) < 0x7fffffff); ++ ++ if (!jiffies) { ++ /* ++ * If jiffies has overflowed in this timer_interrupt we must ++ * update the timer[hi]/[lo] to make do_fast_gettimeoffset() ++ * quotient calc still valid. -arca ++ */ ++ timerhi = timerlo = 0; ++ } else { ++ /* ++ * The cycle counter is only 32 bit which is good for about ++ * a minute at current count rates of upto 150MHz or so. ++ */ ++ timerhi += (count < timerlo); /* Wrap around */ ++ timerlo = count; ++ } ++ ++ return IRQ_HANDLED; ++ ++null: ++ ack_r4ktimer(0); ++ return IRQ_NONE; ++} ++ ++static struct irqaction brcm_timer_action = { ++ .handler = brcm_timer_interrupt, ++ .flags = SA_INTERRUPT, ++ .mask = CPU_MASK_NONE, ++ .name = "timer", ++ .next = NULL, ++ .dev_id = brcm_timer_interrupt, ++}; ++ ++ ++void __init brcm_timer_setup(struct irqaction *irq) ++{ ++ r4k_cur = (read_c0_count() + r4k_interval); ++ write_c0_compare(r4k_cur); ++ ++ /* we are using the cpu counter for timer interrupts */ ++ irq->handler = no_action; /* we use our own handler */ ++ setup_irq(MIPS_TIMER_INT, &brcm_timer_action); ++ set_c0_status(IE_IRQ5); ++} ++ ++#if 0 ++/* This is for machines which generate the exact clock. */ ++#define USECS_PER_JIFFY (1000000/HZ) ++#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff) ++ ++static void call_do_div64_32( unsigned long *res, unsigned int high, ++ unsigned int low, unsigned long base ) ++{ ++ do_div64_32(*res, high, low, base); ++} ++ ++/* ++ * FIXME: Does playing with the RP bit in c0_status interfere with this code? ++ */ ++static unsigned long do_fast_gettimeoffset(void) ++{ ++ u32 count; ++ unsigned long res, tmp; ++ ++ /* Last jiffy when do_fast_gettimeoffset() was called. */ ++ static unsigned long last_jiffies=0; ++ unsigned long quotient; ++ ++ /* ++ * Cached "1/(clocks per usec)*2^32" value. ++ * It has to be recalculated once each jiffy. ++ */ ++ static unsigned long cached_quotient=0; ++ ++ tmp = jiffies; ++ ++ quotient = cached_quotient; ++ ++ if (tmp && last_jiffies != tmp) { ++ last_jiffies = tmp; ++#ifdef CONFIG_CPU_MIPS32 ++ if (last_jiffies != 0) { ++ ++ unsigned long r0; ++ /* gcc 3.0.1 gets an internal compiler error if there are two ++ * do_div64_32 inline macros. To work around this problem, ++ * do_div64_32 is called as a function. ++ */ ++ call_do_div64_32(&r0, timerhi, timerlo, tmp); ++ call_do_div64_32("ient, USECS_PER_JIFFY, ++ USECS_PER_JIFFY_FRAC, r0); ++ ++ cached_quotient = quotient; ++ ++ } ++#else ++ __asm__(".set\tnoreorder\n\t" ++ ".set\tnoat\n\t" ++ ".set\tmips3\n\t" ++ "lwu\t%0,%2\n\t" ++ "dsll32\t$1,%1,0\n\t" ++ "or\t$1,$1,%0\n\t" ++ "ddivu\t$0,$1,%3\n\t" ++ "mflo\t$1\n\t" ++ "dsll32\t%0,%4,0\n\t" ++ "nop\n\t" ++ "ddivu\t$0,%0,$1\n\t" ++ "mflo\t%0\n\t" ++ ".set\tmips0\n\t" ++ ".set\tat\n\t" ++ ".set\treorder" ++ :"=&r" (quotient) ++ :"r" (timerhi), ++ "m" (timerlo), ++ "r" (tmp), ++ "r" (USECS_PER_JIFFY) ++ :"$1"); ++ cached_quotient = quotient; ++#endif ++ } ++ ++ /* Get last timer tick in absolute kernel time */ ++ count = read_c0_count(); ++ ++ /* .. relative to previous jiffy (32 bits is enough) */ ++ count -= timerlo; ++ ++ __asm__("multu\t%1,%2\n\t" ++ "mfhi\t%0" ++ :"=r" (res) ++ :"r" (count), ++ "r" (quotient)); ++ ++ /* ++ * Due to possible jiffies inconsistencies, we need to check ++ * the result so that we'll get a timer that is monotonic. ++ */ ++ if (res >= USECS_PER_JIFFY) ++ res = USECS_PER_JIFFY-1; ++ ++ return res; ++} ++ ++void do_gettimeofday(struct timeval *tv) ++{ ++ unsigned int flags; ++ ++ read_lock_irqsave (&xtime_lock, flags); ++ tv->tv_sec = xtime.tv_sec; ++ tv->tv_usec = xtime.tv_nsec/1000; ++ tv->tv_usec += do_fast_gettimeoffset(); ++ ++ /* ++ * xtime is atomically updated in timer_bh. jiffies - wall_jiffies ++ * is nonzero if the timer bottom half hasnt executed yet. ++ */ ++ if (jiffies - wall_jiffies) ++ tv->tv_usec += USECS_PER_JIFFY; ++ ++ read_unlock_irqrestore (&xtime_lock, flags); ++ ++ if (tv->tv_usec >= 1000000) { ++ tv->tv_usec -= 1000000; ++ tv->tv_sec++; ++ } ++} ++ ++EXPORT_SYMBOL(do_gettimeofday); ++ ++int do_settimeofday(struct timespec *tv) ++{ ++ write_lock_irq (&xtime_lock); ++ ++ /* This is revolting. We need to set the xtime.tv_usec correctly. ++ * However, the value in this location is is value at the last tick. ++ * Discover what correction gettimeofday would have done, and then ++ * undo it! ++ */ ++ tv->tv_nsec -= do_fast_gettimeoffset()*NSEC_PER_USEC; ++ ++ if (tv->tv_nsec < 0) { ++ tv->tv_nsec += 1000000*NSEC_PER_USEC; ++ tv->tv_sec--; ++ } ++ ++ xtime.tv_sec = tv->tv_sec; ++ xtime.tv_nsec = tv->tv_nsec; ++ time_adjust = 0; /* stop active adjtime() */ ++ time_status |= STA_UNSYNC; ++ time_maxerror = NTP_PHASE_LIMIT; ++ time_esterror = NTP_PHASE_LIMIT; ++ ++ write_unlock_irq (&xtime_lock); ++} ++ ++EXPORT_SYMBOL(do_settimeofday); ++ ++#endif +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/generic/Makefile linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/Makefile +--- linux-2.6.8.1/arch/mips/brcm-boards/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/Makefile 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,11 @@ ++# ++# Makefile for generic Broadcom MIPS boards ++# ++# Copyright (C) 2001 Broadcom Corporation ++# ++obj-y := int-handler.o ++ ++ifdef CONFIG_REMOTE_DEBUG ++obj-y += dbg_io.o ++endif ++ +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c +--- linux-2.6.8.1/arch/mips/brcm-boards/generic/dbg_io.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,260 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/config.h> ++#include <linux/tty.h> ++#include <linux/major.h> ++#include <linux/init.h> ++#include <linux/console.h> ++#include <linux/fs.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/sched.h> ++ ++#include <bcm_map_part.h> ++ ++#undef PRNT /* define for debug printing */ ++ ++#define UART16550_BAUD_2400 2400 ++#define UART16550_BAUD_4800 4800 ++#define UART16550_BAUD_9600 9600 ++#define UART16550_BAUD_19200 19200 ++#define UART16550_BAUD_38400 38400 ++#define UART16550_BAUD_57600 57600 ++#define UART16550_BAUD_115200 115200 ++ ++#define UART16550_PARITY_NONE 0 ++#define UART16550_PARITY_ODD 0x08 ++#define UART16550_PARITY_EVEN 0x18 ++#define UART16550_PARITY_MARK 0x28 ++#define UART16550_PARITY_SPACE 0x38 ++ ++#define UART16550_DATA_5BIT 0x0 ++#define UART16550_DATA_6BIT 0x1 ++#define UART16550_DATA_7BIT 0x2 ++#define UART16550_DATA_8BIT 0x3 ++ ++#define UART16550_STOP_1BIT 0x0 ++#define UART16550_STOP_2BIT 0x4 ++ ++volatile Uart * stUart = UART_BASE; ++ ++#define WRITE16(addr, value) ((*(volatile UINT16 *)((ULONG)&addr)) = value) ++ ++/* Low level UART routines from promcon.c */ ++extern void prom_putc(char c); ++extern char prom_getc(void); ++extern int prom_getc_nowait(void); ++extern int prom_testc(void); ++ ++extern void set_debug_traps(void); ++extern void breakpoint(void); ++extern void enable_brcm_irq(unsigned int); ++extern void set_async_breakpoint(unsigned int epc); ++ ++#ifdef CONFIG_GDB_CONSOLE ++extern void register_gdb_console(void); ++#endif ++ ++int gdb_initialized = 0; ++ ++#define GDB_BUF_SIZE 512 /* power of 2, please */ ++ ++static char gdb_buf[GDB_BUF_SIZE] ; ++static int gdb_buf_in_inx ; ++static atomic_t gdb_buf_in_cnt ; ++static int gdb_buf_out_inx ; ++ ++void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) ++{ ++ /* Do nothing, assume boot loader has already set up serial port */ ++ printk("debugInit called\n"); ++} ++ ++/* ++ * Get a char if available, return -1 if nothing available. ++ * Empty the receive buffer first, then look at the interface hardware. ++ */ ++static int read_char(void) ++{ ++ if (atomic_read(&gdb_buf_in_cnt) != 0) /* intr routine has q'd chars */ ++ { ++ int chr ; ++ ++ chr = gdb_buf[gdb_buf_out_inx++] ; ++ gdb_buf_out_inx &= (GDB_BUF_SIZE - 1) ; ++ atomic_dec(&gdb_buf_in_cnt) ; ++ return(chr) ; ++ } ++ return(prom_getc_nowait()) ; /* read from hardware */ ++} /* read_char */ ++ ++/* ++ * This is the receiver interrupt routine for the GDB stub. ++ * It will receive a limited number of characters of input ++ * from the gdb host machine and save them up in a buffer. ++ * ++ * When the gdb stub routine getDebugChar() is called it ++ * draws characters out of the buffer until it is empty and ++ * then reads directly from the serial port. ++ * ++ * We do not attempt to write chars from the interrupt routine ++ * since the stubs do all of that via putDebugChar() which ++ * writes one byte after waiting for the interface to become ++ * ready. ++ * ++ * The debug stubs like to run with interrupts disabled since, ++ * after all, they run as a consequence of a breakpoint in ++ * the kernel. ++ * ++ * Perhaps someone who knows more about the tty driver than I ++ * care to learn can make this work for any low level serial ++ * driver. ++ */ ++static void gdb_interrupt(int irq, void *dev_id, struct pt_regs * regs) ++{ ++ int chr ; ++ int more; ++ do ++ { ++ chr = prom_getc_nowait() ; ++ more = prom_testc(); ++ if (chr < 0) continue ; ++ ++ /* If we receive a Ctrl-C then this is GDB trying to break in */ ++ if (chr == 3) ++ { ++ /* Replace current instruction with breakpoint */ ++ set_async_breakpoint(regs->cp0_epc); ++ //breakpoint(); ++ } ++ ++#ifdef PRNT ++ printk("gdb_interrupt: chr=%02x '%c', more = %x\n", ++ chr, chr > ' ' && chr < 0x7F ? chr : ' ', more) ; ++#endif ++ ++ if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) ++ { /* buffer overflow, clear it */ ++ gdb_buf_in_inx = 0 ; ++ atomic_set(&gdb_buf_in_cnt, 0) ; ++ gdb_buf_out_inx = 0 ; ++ break ; ++ } ++ ++ gdb_buf[gdb_buf_in_inx++] = chr ; ++ gdb_buf_in_inx &= (GDB_BUF_SIZE - 1) ; ++ atomic_inc(&gdb_buf_in_cnt) ; ++ } ++ while (more !=0); ++ ++} /* gdb_interrupt */ ++ ++/* ++ * getDebugChar ++ * ++ * This is a GDB stub routine. It waits for a character from the ++ * serial interface and then returns it. If there is no serial ++ * interface connection then it returns a bogus value which will ++ * almost certainly cause the system to hang. ++ */ ++int getDebugChar(void) ++{ ++ volatile int chr ; ++ ++#ifdef PRNT ++ printk("getDebugChar: ") ; ++#endif ++ ++ while ( (chr = read_char()) < 0 ) ; ++ ++#ifdef PRNT ++ printk("%c\n", chr > ' ' && chr < 0x7F ? chr : ' ') ; ++#endif ++ return(chr) ; ++ ++} /* getDebugChar */ ++ ++/* ++ * putDebugChar ++ * ++ * This is a GDB stub routine. It waits until the interface is ready ++ * to transmit a char and then sends it. If there is no serial ++ * interface connection then it simply returns to its caller, having ++ * pretended to send the char. ++ */ ++int putDebugChar(unsigned char chr) ++{ ++#ifdef PRNT ++ printk("putDebugChar: chr=%02x '%c'\n", chr, ++ chr > ' ' && chr < 0x7F ? chr : ' ') ; ++#endif ++ ++ prom_putc(chr) ; /* this routine will wait */ ++ return 1; ++ ++} /* putDebugChar */ ++ ++/* Just a NULL routine for testing. */ ++void gdb_null(void) ++{ ++} ++ ++void rs_kgdb_hook(int tty_no) ++{ ++ printk("rs_kgdb_hook: tty %d\n", tty_no); ++ ++ /* Call GDB routine to setup the exception vectors for the debugger */ ++ set_debug_traps(); ++ ++ printk("Breaking into debugger...\n"); ++ breakpoint(); ++ gdb_null() ; ++ printk("Connected.\n"); ++ ++ gdb_initialized = 1; ++ ++#ifdef CONFIG_GDB_CONSOLE ++ register_gdb_console(); ++#endif ++} ++ ++void kgdb_hook_irq() ++{ ++ int retval ; ++ uint16 uMask; ++ ++ printk("GDB: Hooking UART interrupt\n"); ++ ++ retval = request_irq(INTERRUPT_ID_UART, ++ gdb_interrupt, ++ SA_INTERRUPT, ++ "GDB-stub", NULL); ++ ++ if (retval != 0) ++ printk("gdb_hook: request_irq(irq=%d) failed: %d\n", INTERRUPT_ID_UART, retval); ++ ++ // Enable UART config Rx not empty IRQ ++ uMask = READ16(stUart->intMask) ; ++ // printk("intMask: 0x%x\n", uMask); ++ WRITE16(stUart->intMask, uMask | RXFIFONE); ++} ++ ++ +diff -urN linux-2.6.8.1/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S +--- linux-2.6.8.1/arch/mips/brcm-boards/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S 2006-06-26 09:07:08.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Generic interrupt handler for Broadcom MIPS boards ++ */ ++ ++#include <linux/config.h> ++ ++#include <asm/asm.h> ++#include <asm/mipsregs.h> ++#include <asm/regdef.h> ++#include <asm/stackframe.h> ++ ++/* ++ * MIPS IRQ Source ++ * -------- ------ ++ * 0 Software (ignored) ++ * 1 Software (ignored) ++ * 2 Combined hardware interrupt (hw0) ++ * 3 Hardware ++ * 4 Hardware ++ * 5 Hardware ++ * 6 Hardware ++ * 7 R4k timer ++ */ ++ ++ .text ++ .set noreorder ++ .set noat ++ .align 5 ++ NESTED(brcmIRQ, PT_SIZE, sp) ++ SAVE_ALL ++ CLI ++ .set noreorder ++ .set at ++ ++ jal brcm_irq_dispatch ++ move a0, sp ++ ++ j ret_from_irq ++ nop ++ ++ END(brcmIRQ) +--- linux-2.6.8.1/arch/mips/Kconfig 2004-08-14 12:55:32.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/Kconfig 2006-06-26 09:07:08.000000000 +0200 +@@ -27,6 +27,17 @@ + + menu "Machine selection" + ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++ ++config MIPS_BRCM ++ bool "Support for the Broadcom boards" ++ help ++ This is a family of boards based on the Broadcom MIPS32 ++ ++source "arch/mips/brcm-boards/bcm963xx/Kconfig" ++ ++# CONFIG_MIPS_BRCM End Broadcom changed code. ++ + config MACH_JAZZ + bool "Support for the Jazz family of machines" + select ISA +@@ -146,6 +157,7 @@ + depends on MIPS32 + select DMA_NONCOHERENT + select HW_HAS_PCI ++ select SWAP_IO_SPACE + + config MIPS_COBALT + bool "Support for Cobalt Server (EXPERIMENTAL)" +@@ -198,6 +210,7 @@ + select IRQ_CPU + select MIPS_GT96100 + select RM7000_CPU_SCACHE ++ select SWAP_IO_SPACE + help + This is an evaluation board based on the Galileo GT-96100 LAN/WAN + communications controllers containing a MIPS R5000 compatible core +@@ -268,6 +281,7 @@ + bool "Support for MIPS Atlas board" + select DMA_NONCOHERENT + select HW_HAS_PCI ++ select SWAP_IO_SPACE + help + This enables support for the QED R5231-based MIPS Atlas evaluation + board. +@@ -277,6 +291,7 @@ + select HAVE_STD_PC_SERIAL_PORT + select DMA_NONCOHERENT + select HW_HAS_PCI ++ select SWAP_IO_SPACE + help + This enables support for the VR5000-based MIPS Malta evaluation + board. +@@ -294,6 +309,7 @@ + select IRQ_CPU + select IRQ_CPU_RM7K + select RM7000_CPU_SCACHE ++ select SWAP_IO_SPACE + help + The Ocelot is a MIPS-based Single Board Computer (SBC) made by + Momentum Computer <http://www.momenco.com/>. +@@ -306,6 +322,7 @@ + select IRQ_CPU_RM7K + select PCI_MARVELL + select RM7000_CPU_SCACHE ++ select SWAP_IO_SPACE + help + The Ocelot is a MIPS-based Single Board Computer (SBC) made by + Momentum Computer <http://www.momenco.com/>. +@@ -318,6 +335,7 @@ + select IRQ_MV64340 + select PCI_MARVELL + select RM7000_CPU_SCACHE ++ select SWAP_IO_SPACE + help + The Ocelot is a MIPS-based Single Board Computer (SBC) made by + Momentum Computer <http://www.momenco.com/>. +@@ -332,6 +350,7 @@ + select LIMITED_DMA + select PCI_MARVELL + select RM7000_CPU_SCACHE ++ select SWAP_IO_SPACE + help + The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by + Momentum Computer <http://www.momenco.com/>. +@@ -349,6 +368,7 @@ + select HW_HAS_PCI + select IRQ_CPU + select IRQ_CPU_RM7K ++ select SWAP_IO_SPACE + help + Yosemite is an evaluation board for the RM9000x2 processor + manufactured by PMC-Sierra +@@ -411,6 +431,7 @@ + select DMA_NONCOHERENT + select IP22_CPU_SCACHE + select IRQ_CPU ++ select SWAP_IO_SPACE + help + This are the SGI Indy, Challenge S and Indigo2, as well as certain + OEM variants like the Tandem CMN B006S. To compile a Linux kernel +@@ -529,12 +550,14 @@ + depends on SOC_AU1000 + select DMA_NONCOHERENT + select HW_HAS_PCI ++ select SWAP_IO_SPACE + + config MIPS_PB1100 + bool "PB1100 board" + depends on SOC_AU1100 + select DMA_NONCOHERENT + select HW_HAS_PCI ++ select SWAP_IO_SPACE + + config MIPS_PB1500 + bool "PB1500 board" +@@ -596,6 +619,7 @@ + bool "Support for Broadcom BCM1xxx SOCs (EXPERIMENTAL)" + depends on EXPERIMENTAL + select DMA_COHERENT ++ select SWAP_IO_SPACE + + choice + prompt "BCM1xxx SOC-based board" +@@ -818,6 +842,7 @@ + select DMA_NONCOHERENT + select HW_HAS_PCI + select ISA ++ select SWAP_IO_SPACE + + config RWSEM_GENERIC_SPINLOCK + bool +@@ -934,8 +959,6 @@ + + config SWAP_IO_SPACE + bool +- depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927 || SIBYTE_SB1xxx_SOC || SGI_IP22 || MOMENCO_OCELOT_C || MOMENCO_OCELOT_G || MOMENCO_OCELOT || MOMENCO_JAGUAR_ATX || MIPS_MALTA || MIPS_ATLAS || MIPS_EV96100 || MIPS_PB1100 || MIPS_PB1000 +- default y + + # + # Unfortunately not all GT64120 systems run the chip at the same clock. +--- linux-2.6.8.1/arch/mips/kernel/cpu-probe.c 2004-08-14 12:55:10.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/cpu-probe.c 2006-06-26 09:07:09.000000000 +0200 +@@ -538,6 +538,27 @@ + } + } + ++#if defined(CONFIG_MIPS_BRCM) ++static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) ++{ ++ decode_config1(c); ++ switch (c->processor_id & 0xff00) { ++ case PRID_IMP_BCM6338: ++ c->cputype = CPU_BCM6338; ++ break; ++ case PRID_IMP_BCM6345: ++ c->cputype = CPU_BCM6345; ++ break; ++ case PRID_IMP_BCM6348: ++ c->cputype = CPU_BCM6348; ++ break; ++ default: ++ c->cputype = CPU_UNKNOWN; ++ break; ++ } ++} ++#endif ++ + static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c) + { + decode_config1(c); +@@ -576,6 +597,11 @@ + case PRID_COMP_SIBYTE: + cpu_probe_sibyte(c); + break; ++#if defined(CONFIG_MIPS_BRCM) ++ case PRID_COMP_BROADCOM: ++ cpu_probe_broadcom(c); ++ break; ++#endif + + case PRID_COMP_SANDCRAFT: + cpu_probe_sandcraft(c); +--- linux-2.6.8.1/arch/mips/kernel/gdb-stub.c 2004-08-14 12:56:23.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/gdb-stub.c 2006-06-26 09:07:09.000000000 +0200 +@@ -171,6 +171,8 @@ + static unsigned char *mem2hex(char *mem, char *buf, int count, int may_fault); + void handle_exception(struct gdb_regs *regs); + ++int kgdb_enabled; ++ + /* + * spin locks for smp case + */ +--- linux-2.6.8.1/arch/mips/kernel/irq.c 2004-08-14 12:54:50.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/irq.c 2006-06-26 09:07:09.000000000 +0200 +@@ -30,12 +30,7 @@ + /* + * Controller mappings for all interrupt sources: + */ +-irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { +- [0 ... NR_IRQS-1] = { +- .handler = &no_irq_type, +- .lock = SPIN_LOCK_UNLOCKED +- } +-}; ++irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned; + + static void register_irq_proc (unsigned int irq); + +@@ -809,7 +804,20 @@ + return 0; + } + +-void __init init_generic_irq(void) ++#ifdef CONFIG_KGDB ++extern void breakpoint(void); ++extern void set_debug_traps(void); ++ ++static int kgdb_flag = 1; ++static int __init nokgdb(char *str) ++{ ++ kgdb_flag = 0; ++ return 1; ++} ++__setup("nokgdb", nokgdb); ++#endif ++ ++void __init init_IRQ(void) + { + int i; + +@@ -818,7 +826,18 @@ + irq_desc[i].action = NULL; + irq_desc[i].depth = 1; + irq_desc[i].handler = &no_irq_type; ++ irq_desc[i].lock = SPIN_LOCK_UNLOCKED; ++ } ++ ++ arch_init_irq(); ++ ++#ifdef CONFIG_KGDB ++ if (kgdb_flag) { ++ printk("Wait for gdb client connection ...\n"); ++ set_debug_traps(); ++ breakpoint(); + } ++#endif + } + + EXPORT_SYMBOL(disable_irq_nosync); +@@ -833,7 +852,7 @@ + + static struct proc_dir_entry * smp_affinity_entry [NR_IRQS]; + +-static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL }; ++static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL }; + static int irq_affinity_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) + { +--- linux-2.6.8.1/arch/mips/kernel/Makefile 2004-08-14 12:55:19.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/Makefile 2006-06-26 09:07:09.000000000 +0200 +@@ -8,6 +8,13 @@ + ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ + time.o traps.o unaligned.o + ++# CONFIG_MIPS_BRCM Begin Broadcom added code. ++# gcc 3.4.x reorders code with -Os and -O2, breaking the save_static stuff. ++CFLAGS_syscall.o := -O1 ++CFLAGS_signal.o := -O1 ++CFLAGS_signal32.o := -O1 ++# CONFIG_MIPS_BRCM End Broadcom added code. ++ + ifdef CONFIG_MODULES + obj-y += mips_ksyms.o module.o + obj-$(CONFIG_MIPS32) += module-elf32.o +--- linux-2.6.8.1/arch/mips/kernel/proc.c 2004-08-14 12:55:09.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/proc.c 2006-06-26 09:07:09.000000000 +0200 +@@ -75,6 +75,11 @@ + [CPU_VR4133] "NEC VR4133", + [CPU_VR4181] "NEC VR4181", + [CPU_VR4181A] "NEC VR4181A", ++#if defined(CONFIG_MIPS_BRCM) ++ [CPU_BCM6338] "BCM6338", ++ [CPU_BCM6345] "BCM6345", ++ [CPU_BCM6348] "BCM6348", ++#endif + [CPU_SR71000] "Sandcraft SR71000" + }; + +--- linux-2.6.8.1/arch/mips/kernel/scall32-o32.S 2004-08-14 12:54:49.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/scall32-o32.S 2006-06-26 12:42:05.000000000 +0200 +@@ -640,9 +640,9 @@ + syscalltable + .size sys_call_table, . - sys_call_table + +- .macro sys function, nargs ++ /*.macro sys function, nargs + .byte \nargs +- .endm ++ .endm*/ + + sys_narg_table: + syscalltable +--- linux-2.6.8.1/arch/mips/kernel/time.c 2004-08-14 12:55:20.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/time.c 2006-06-26 09:07:09.000000000 +0200 +@@ -274,11 +274,15 @@ + + /* .. relative to previous jiffy (32 bits is enough) */ + count -= timerlo; +- ++ + __asm__("multu %1,%2" + : "=h" (res) + : "r" (count), "r" (sll32_usecs_per_cycle) ++#if defined(CONFIG_MIPS_BRCM) ++ : "lo"); ++#else + : "lo", "accum"); ++#endif + + /* + * Due to possible jiffies inconsistencies, we need to check +@@ -333,7 +337,11 @@ + __asm__("multu %1,%2" + : "=h" (res) + : "r" (count), "r" (quotient) ++#if defined(CONFIG_MIPS_BRCM) ++ : "lo"); ++#else + : "lo", "accum"); ++#endif + + /* + * Due to possible jiffies inconsistencies, we need to check +@@ -375,7 +383,11 @@ + : "r" (timerhi), "m" (timerlo), + "r" (tmp), "r" (USECS_PER_JIFFY), + "r" (USECS_PER_JIFFY_FRAC) ++#if defined(CONFIG_MIPS_BRCM) ++ : "hi", "lo"); ++#else + : "hi", "lo", "accum"); ++#endif + cached_quotient = quotient; + } + } +@@ -389,7 +401,11 @@ + __asm__("multu %1,%2" + : "=h" (res) + : "r" (count), "r" (quotient) ++#if defined(CONFIG_MIPS_BRCM) ++ : "lo"); ++#else + : "lo", "accum"); ++#endif + + /* + * Due to possible jiffies inconsistencies, we need to check +@@ -738,6 +754,7 @@ + board_timer_setup(&timer_irqaction); + } + ++ + #define FEBRUARY 2 + #define STARTOFTIME 1970 + #define SECDAY 86400L +--- linux-2.6.8.1/arch/mips/kernel/traps.c 2004-08-14 12:55:20.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/traps.c 2006-06-26 09:07:09.000000000 +0200 +@@ -246,6 +246,13 @@ + + static spinlock_t die_lock = SPIN_LOCK_UNLOCKED; + ++#if defined(CONFIG_MIPS_BRCM) ++#ifdef CONFIG_REMOTE_DEBUG ++#include <asm/gdb-stub.h> ++extern void handle_exception(struct gdb_regs *regs); ++#endif ++#endif ++ + NORET_TYPE void __die(const char * str, struct pt_regs * regs, + const char * file, const char * func, unsigned long line) + { +@@ -258,7 +265,33 @@ + printk(" in %s:%s, line %ld", file, func, line); + printk("[#%d]:\n", ++die_counter); + show_registers(regs); ++#if defined(CONFIG_MIPS_BRCM) ++#ifdef CONFIG_REMOTE_DEBUG ++ { ++ struct gdb_regs regs2; ++ int i; ++ long *ptr; ++ ++ ptr = ®s2.reg0; ++ /* Copy registers to GDB structure */ ++ for(i=0; i<32;i++) ++ *ptr++ = regs->regs[i]; ++ ++ regs2.lo = regs->lo; ++ regs2.hi = regs->hi; ++ regs2.cp0_epc = regs->cp0_epc; ++ regs2.cp0_badvaddr = regs->cp0_badvaddr; ++ regs2.cp0_status = regs->cp0_status; ++ regs2.cp0_cause = regs->cp0_cause; ++ ++ handle_exception(®s2); /* Break to GDB */ ++ } ++#endif ++#endif + spin_unlock_irq(&die_lock); ++ /* Ron add for kernel crash */ ++ (*(volatile unsigned int *)(0xfffe040c)) &= ~(1<<5); ++ machine_restart(NULL); + do_exit(SIGSEGV); + } + +--- linux-2.6.8.1/arch/mips/Makefile 2004-08-14 12:54:47.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/Makefile 2006-06-26 09:07:09.000000000 +0200 +@@ -41,8 +41,14 @@ + endif + + ifdef CONFIG_CROSSCOMPILE ++# CONFIG_MIPS_BRCM Begin Broadcom added code. ++ifdef CONFIG_MIPS_BRCM ++CROSS_COMPILE := mips-linux-uclibc-#$(tool-prefix) ++else + CROSS_COMPILE := $(tool-prefix) + endif ++# CONFIG_MIPS_BRCM End Broadcom added code. ++endif + + # + # GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel +@@ -57,6 +63,9 @@ + cflags-y := -I $(TOPDIR)/include/asm/gcc + cflags-y += -G 0 -mno-abicalls -fno-pic -pipe + cflags-y += $(call check_gcc, -finline-limit=100000,) ++ifeq ($(strip $(JTAG_KERNEL_DEBUG)),y) ++cflags-y += -g ++endif + LDFLAGS_vmlinux += -G 0 -static -n + MODFLAGS += -mlong-calls + +@@ -64,6 +73,12 @@ + + check_warning = $(shell if $(CC) $(1) -c -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi) + ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++ifdef CONFIG_MIPS_BRCM ++cflags-$(CONFIG_REMOTE_DEBUG) += -ggdb ++endif ++# CONFIG_MIPS_BRCM End Broadcom changed code. ++ + # + # Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>) + # +@@ -302,6 +317,20 @@ + libs-$(CONFIG_BAGET_MIPS) += arch/mips/baget/ arch/mips/baget/prom/ + load-$(CONFIG_BAGET_MIPS) += 0x80001000 + ++# CONFIG_MIPS_BRCM Begin Broadcom added code. ++ifdef CONFIG_MIPS_BRCM ++# ++# Broadcom board ++core-$(CONFIG_BCM96338) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/ ++cflags-$(CONFIG_BCM96338) += -Iinclude/asm-mips/mach-bcm963xx ++core-$(CONFIG_BCM96345) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/ ++cflags-$(CONFIG_BCM96345) += -Iinclude/asm-mips/mach-bcm963xx ++core-$(CONFIG_BCM96348) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/ ++cflags-$(CONFIG_BCM96348) += -Iinclude/asm-mips/mach-bcm963xx ++load-$(CONFIG_MIPS_BRCM) += 0x80010000 ++endif ++# CONFIG_MIPS_BRCM End Broadcom added code. ++ + # + # Cobalt Server + # +--- linux-2.6.8.1/arch/mips/mm/c-r4k.c 2004-08-14 12:56:22.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/mm/c-r4k.c 2006-06-26 09:07:09.000000000 +0200 +@@ -86,7 +86,7 @@ + + static void (* r4k_blast_dcache)(void); + +-static void r4k_blast_dcache_setup(void) ++static inline void r4k_blast_dcache_setup(void) + { + unsigned long dc_lsize = cpu_dcache_line_size(); + +@@ -385,6 +385,7 @@ + static void r4k_flush_icache_range(unsigned long start, unsigned long end) + { + unsigned long dc_lsize = current_cpu_data.dcache.linesz; ++ unsigned long ic_lsize = current_cpu_data.icache.linesz; + unsigned long addr, aend; + + if (!cpu_has_ic_fills_f_dc) { +@@ -407,14 +408,14 @@ + if (end - start > icache_size) + r4k_blast_icache(); + else { +- addr = start & ~(dc_lsize - 1); +- aend = (end - 1) & ~(dc_lsize - 1); ++ addr = start & ~(ic_lsize - 1); ++ aend = (end - 1) & ~(ic_lsize - 1); + while (1) { + /* Hit_Invalidate_I */ + protected_flush_icache_line(addr); + if (addr == aend) + break; +- addr += dc_lsize; ++ addr += ic_lsize; + } + } + } +@@ -802,6 +803,13 @@ + if (!(config & MIPS_CONF_M)) + panic("Don't know how to probe P-caches on this cpu."); + ++#if defined(CONFIG_MIPS_BRCM) ++ if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348){ ++ printk("brcm mips: enabling icache and dcache...\n"); ++ /* Enable caches */ ++ write_c0_diag(read_c0_diag() | 0xC0000000); ++ } ++#endif + /* + * So we seem to be a MIPS32 or MIPS64 CPU + * So let's probe the I-cache ... +--- linux-2.6.8.1/arch/mips/pci/fixup-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/pci/fixup-bcm96348.c 2006-06-26 09:07:09.000000000 +0200 +@@ -0,0 +1,85 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/init.h> ++#include <linux/types.h> ++#include <linux/pci.h> ++ ++#include <bcmpci.h> ++#include <bcm_intr.h> ++#include <bcm_map_part.h> ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++ ++static char irq_tab_bcm96348[] __initdata = { ++ [0] = INTERRUPT_ID_MPI, ++ [1] = INTERRUPT_ID_MPI, ++#if defined(CONFIG_USB) ++ [USB_HOST_SLOT] = INTERRUPT_ID_USBH ++#endif ++}; ++ ++int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ++{ ++ return irq_tab_bcm96348[slot]; ++} ++ ++static void bcm96348_fixup(struct pci_dev *dev) ++{ ++ uint32 memaddr; ++ uint32 size; ++ ++ memaddr = pci_resource_start(dev, 0); ++ size = pci_resource_len(dev, 0); ++ ++ switch (PCI_SLOT(dev->devfn)) { ++ case 0: ++ // UBUS to PCI address range ++ // Memory Window 1. Mask determines which bits are decoded. ++ mpi->l2pmrange1 = ~(size-1); ++ // UBUS to PCI Memory base address. This is akin to the ChipSelect base ++ // register. ++ mpi->l2pmbase1 = memaddr & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI Remap Address. Replaces the masked address bits in the ++ // range register with this setting. ++ // Also, enable direct I/O and direct Memory accesses ++ mpi->l2pmremap1 = (memaddr | MEM_WINDOW_EN); ++ break; ++ ++ case 1: ++ // Memory Window 2 ++ mpi->l2pmrange2 = ~(size-1); ++ // UBUS to PCI Memory base address. ++ mpi->l2pmbase2 = memaddr & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI Remap Address ++ mpi->l2pmremap2 = (memaddr | MEM_WINDOW_EN); ++ break; ++ ++#if defined(CONFIG_USB) ++ case USB_HOST_SLOT: ++ dev->resource[0].start = USB_HOST_BASE; ++ dev->resource[0].end = USB_HOST_BASE+USB_BAR0_MEM_SIZE-1; ++ break; ++#endif ++ } ++} ++ ++struct pci_fixup pcibios_fixups[] = { ++ { PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, bcm96348_fixup }, ++ {0} ++}; +--- linux-2.6.8.1/arch/mips/pci/ops-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/pci/ops-bcm96348.c 2006-06-26 09:07:09.000000000 +0200 +@@ -0,0 +1,276 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <asm/addrspace.h> ++ ++#include <bcm_intr.h> ++#include <bcm_map_part.h> ++#include <bcmpci.h> ++ ++#include <linux/delay.h> ++ ++#if defined(CONFIG_USB) ++#if 0 ++#define DPRINT(x...) printk(x) ++#else ++#define DPRINT(x...) ++#endif ++ ++static int ++pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size); ++static int ++pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size); ++ ++static bool usb_mem_size_rd = FALSE; ++static uint32 usb_mem_base = 0; ++static uint32 usb_cfg_space_cmd_reg = 0; ++#endif ++static bool pci_mem_size_rd = FALSE; ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++ ++static void mpi_SetupPciConfigAccess(uint32 addr) ++{ ++ mpi->l2pcfgctl = (DIR_CFG_SEL | DIR_CFG_USEREG | addr) & ~CONFIG_TYPE; ++} ++ ++static void mpi_ClearPciConfigAccess(void) ++{ ++ mpi->l2pcfgctl = 0x00000000; ++} ++ ++#if defined(CONFIG_USB) ++/* -------------------------------------------------------------------------- ++ Name: pci63xx_int_write ++Abstract: PCI Config write on internal device(s) ++ -------------------------------------------------------------------------- */ ++static int ++pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size) ++{ ++ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { ++ return PCIBIOS_SUCCESSFUL; ++ } ++ ++ switch (size) { ++ case 1: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %02X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 2: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %04X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ switch (where) { ++ case PCI_COMMAND: ++ usb_cfg_space_cmd_reg = *value; ++ break; ++ default: ++ break; ++ } ++ break; ++ case 4: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %08lX\n", ++ PCI_SLOT(devfn), where, size, *value); ++ switch (where) { ++ case PCI_BASE_ADDRESS_0: ++ if (*value == 0xffffffff) { ++ usb_mem_size_rd = TRUE; ++ } else { ++ usb_mem_base = *value; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: pci63xx_int_read ++Abstract: PCI Config read on internal device(s) ++ -------------------------------------------------------------------------- */ ++static int ++pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size) ++{ ++ uint32 retValue = 0xFFFFFFFF; ++ ++ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { ++ return PCIBIOS_SUCCESSFUL; ++ } ++ ++ // For now, this is specific to the USB Host controller. We can ++ // make it more general if we have to... ++ // Emulate PCI Config accesses ++ switch (where) { ++ case PCI_VENDOR_ID: ++ case PCI_DEVICE_ID: ++ retValue = PCI_VENDOR_ID_BROADCOM | 0x63000000; ++ break; ++ case PCI_COMMAND: ++ case PCI_STATUS: ++ retValue = (0x0006 << 16) | usb_cfg_space_cmd_reg; ++ break; ++ case PCI_CLASS_REVISION: ++ case PCI_CLASS_DEVICE: ++ retValue = (PCI_CLASS_SERIAL_USB << 16) | (0x10 << 8) | 0x01; ++ break; ++ case PCI_BASE_ADDRESS_0: ++ if (usb_mem_size_rd) { ++ retValue = USB_BAR0_MEM_SIZE; ++ } else { ++ if (usb_mem_base != 0) ++ retValue = usb_mem_base; ++ else ++ retValue = USB_HOST_BASE; ++ } ++ usb_mem_size_rd = FALSE; ++ break; ++ case PCI_CACHE_LINE_SIZE: ++ case PCI_LATENCY_TIMER: ++ retValue = 0; ++ break; ++ case PCI_HEADER_TYPE: ++ retValue = PCI_HEADER_TYPE_NORMAL; ++ break; ++ case PCI_SUBSYSTEM_VENDOR_ID: ++ retValue = PCI_VENDOR_ID_BROADCOM; ++ break; ++ case PCI_SUBSYSTEM_ID: ++ retValue = 0x6300; ++ break; ++ case PCI_INTERRUPT_LINE: ++ retValue = INTERRUPT_ID_USBH; ++ break; ++ default: ++ break; ++ } ++ ++ switch (size) { ++ case 1: ++ *value = (retValue >> ((where & 3) << 3)) & 0xff; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %02X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 2: ++ *value = (retValue >> ((where & 3) << 3)) & 0xffff; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %04X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 4: ++ *value = retValue; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %08lX\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ default: ++ break; ++ } ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++#endif ++ ++static int bcm96348_pcibios_read(struct pci_bus *bus, unsigned int devfn, ++ int where, int size, u32 * val) ++{ ++ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); ++ uint32 data; ++ ++#if defined(CONFIG_USB) ++ if (PCI_SLOT(devfn) == USB_HOST_SLOT) ++ return pci63xx_int_read(devfn, where, val, size); ++#endif ++ ++ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); ++ data = *(uint32 *)ioBase; ++ switch(size) { ++ case 1: ++ *val = (data >> ((where & 3) << 3)) & 0xff; ++ break; ++ case 2: ++ *val = (data >> ((where & 3) << 3)) & 0xffff; ++ break; ++ case 4: ++ *val = data; ++ /* Special case for reading PCI device range */ ++ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { ++ if (pci_mem_size_rd) { ++ /* bcm6348 PCI memory window minimum size is 64K */ ++ *val &= PCI_SIZE_64K; ++ } ++ } ++ break; ++ default: ++ break; ++ } ++ pci_mem_size_rd = FALSE; ++ mpi_ClearPciConfigAccess(); ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++static int bcm96348_pcibios_write(struct pci_bus *bus, unsigned int devfn, ++ int where, int size, u32 val) ++{ ++ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); ++ uint32 data; ++ ++#if defined(CONFIG_USB) ++ if (PCI_SLOT(devfn) == USB_HOST_SLOT) ++ return pci63xx_int_write(devfn, where, &val, size); ++#endif ++ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); ++ data = *(uint32 *)ioBase; ++ switch(size) { ++ case 1: ++ data = (data & ~(0xff << ((where & 3) << 3))) | ++ (val << ((where & 3) << 3)); ++ break; ++ case 2: ++ data = (data & ~(0xffff << ((where & 3) << 3))) | ++ (val << ((where & 3) << 3)); ++ break; ++ case 4: ++ data = val; ++ /* Special case for reading PCI device range */ ++ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { ++ if (val == 0xffffffff) ++ pci_mem_size_rd = TRUE; ++ } ++ break; ++ default: ++ break; ++ } ++ *(uint32 *)ioBase = data; ++ udelay(500); ++ mpi_ClearPciConfigAccess(); ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++struct pci_ops bcm96348_pci_ops = { ++ .read = bcm96348_pcibios_read, ++ .write = bcm96348_pcibios_write ++}; +--- linux-2.6.8.1/arch/mips/pci/Makefile 2004-08-14 12:54:47.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/arch/mips/pci/Makefile 2006-06-26 09:07:09.000000000 +0200 +@@ -17,6 +17,8 @@ + obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o + obj-$(CONFIG_MIPS_TX3927) += ops-jmr3927.o + obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o ++obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o ++obj-$(CONFIG_BCM_PCI) += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o + + # + # These are still pretty much in the old state, watch, go blind. +@@ -51,3 +53,7 @@ + obj-$(CONFIG_TOSHIBA_RBTX4927) += fixup-rbtx4927.o ops-tx4927.o + obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o + obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o ++ ++ifeq "$(CONFIG_BCM_PCI)" "y" ++EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++endif +--- linux-2.6.8.1/arch/mips/pci/pci-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/arch/mips/pci/pci-bcm96348.c 2006-06-26 09:07:09.000000000 +0200 +@@ -0,0 +1,54 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++ ++#include <asm/pci_channel.h> ++#include <bcmpci.h> ++ ++static struct resource bcm_pci_io_resource = { ++ .name = "bcm96348 pci IO space", ++ .start = BCM_PCI_IO_BASE, ++ .end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB - 1, ++ .flags = IORESOURCE_IO ++}; ++ ++static struct resource bcm_pci_mem_resource = { ++ .name = "bcm96348 pci memory space", ++ .start = BCM_PCI_MEM_BASE, ++ .end = BCM_PCI_MEM_BASE + BCM_PCI_MEM_SIZE_16MB - 1, ++ .flags = IORESOURCE_MEM ++}; ++ ++extern struct pci_ops bcm96348_pci_ops; ++ ++struct pci_controller bcm96348_controller = { ++ .pci_ops = &bcm96348_pci_ops, ++ .io_resource = &bcm_pci_io_resource, ++ .mem_resource = &bcm_pci_mem_resource, ++}; ++ ++static void bcm96348_pci_init(void) ++{ ++ register_pci_controller(&bcm96348_controller); ++} ++ ++arch_initcall(bcm96348_pci_init); +--- linux-2.6.8.1/drivers/mtd/maps/bcm963xx.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/drivers/mtd/maps/bcm963xx.c 2006-06-26 09:07:13.000000000 +0200 +@@ -0,0 +1,162 @@ ++/* ++ * A simple flash mapping code for BCM963xx board flash memory ++ * It is simple because it only treats all the flash memory as ROM ++ * It is used with chips/map_rom.c ++ * ++ * Song Wang (songw@broadcom.com) ++ */ ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <asm/io.h> ++#include <linux/mtd/mtd.h> ++#include <linux/mtd/map.h> ++#include <linux/config.h> ++#include <linux/mtd/partitions.h> ++ ++#include <board.h> ++#include <bcmTag.h> ++#define VERSION "1.0" ++ ++ ++extern PFILE_TAG kerSysImageTagGet(void); ++ ++static struct mtd_info *mymtd; ++static struct mtd_partition brcm_partition_info[4]; ++ ++#define CFE_ADDR 0xbfc00000 ++#define CFE_SIZE 64 << 10 ++#define FLASH_2M_SIZE 2048 << 10 ++#define FLASH_4M_SIZE 4096 << 10 ++#define NVRAM_SIZE 64 << 10 ++#define TAG_SIZE 0x100 ++#define FS_KERNEL_SIZE_4M 0x3E0000 ++#define NVRAM_ADDR_4M 0x3F0000 ++ ++static map_word brcm_physmap_read16(struct map_info *map, unsigned long ofs) ++{ ++ map_word val; ++ ++ val.x[0] = __raw_readw(map->map_priv_1 + ofs); ++ ++ return val; ++} ++ ++void brcm_physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) ++{ ++ memcpy_fromio(to, map->map_priv_1 + from, len); ++} ++ ++static void brcm_physmap_write16(struct map_info *map, __u16 d, unsigned long adr) ++{ ++ __raw_writew(d, map->map_priv_1 + adr); ++ mb(); ++} ++ ++void brcm_physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len) ++{ ++ memcpy_toio(map->map_priv_1 + to, from, len); ++} ++ ++struct map_info brcm_physmap_map = { ++ .name = "Physically mapped flash", ++ .bankwidth = 2, ++ .read = brcm_physmap_read16, ++ .copy_from = brcm_physmap_copy_from, ++ .write = brcm_physmap_write16, ++ .copy_to = brcm_physmap_copy_to ++ ++}; ++ ++ ++ ++int __init init_brcm_physmap(void) ++{ ++ PFILE_TAG pTag = NULL; ++ u_int32_t rootfs_addr, kernel_addr,fs_len,cfe_len; ++ FLASH_ADDR_INFO info; ++ ++ kerSysFlashAddrInfoGet( &info ); ++ ++ /* Read the flash memory map from flash memory. */ ++ if (!(pTag = kerSysImageTagGet())) { ++ printk("Failed to read image tag from flash\n"); ++ return -EIO; ++ } ++ ++ rootfs_addr = (u_int32_t) simple_strtoul(pTag->rootfsAddress, NULL, 10); ++ kernel_addr = (u_int32_t) simple_strtoul(pTag->kernelAddress, NULL, 10); ++ ++ ++ brcm_physmap_map.size = FLASH_4M_SIZE; ++ ++ fs_len = kernel_addr - rootfs_addr; ++ cfe_len=CFE_SIZE; ++ /* Ron mapping from fs */ ++ brcm_physmap_map.map_priv_1 = (unsigned long)CFE_ADDR; ++ ++ if (!brcm_physmap_map.map_priv_1) { ++ printk("Wrong flash starting address\n"); ++ return -EIO; ++ } ++ ++ if (brcm_physmap_map.size <= 0) { ++ printk("Wrong flash size\n"); ++ return -EIO; ++ } ++ ++ mymtd = do_map_probe("cfi_probe", &brcm_physmap_map); ++ if (!mymtd) ++ return -EIO; ++ ++ mymtd->owner = THIS_MODULE; ++ /* Ron file system */ ++ brcm_partition_info[0].name = "fs"; ++ brcm_partition_info[0].offset = (cfe_len + TAG_SIZE); ++ brcm_partition_info[0].size = fs_len; ++ brcm_partition_info[0].mask_flags = 0; ++ ++ /* Ron tag + file system + kernel */ ++ brcm_partition_info[1].name = "tag+fs+kernel"; ++ brcm_partition_info[1].offset = cfe_len; ++ brcm_partition_info[1].size = FS_KERNEL_SIZE_4M; ++ brcm_partition_info[1].mask_flags = 0; ++ ++ /* Ron bootloader */ ++ brcm_partition_info[2].name = "bootloader"; ++ brcm_partition_info[2].offset = 0x00; ++ brcm_partition_info[2].size = cfe_len; ++ brcm_partition_info[2].mask_flags = 0; ++ ++ /* Ron nvram */ ++ brcm_partition_info[3].name = "nvram"; ++ brcm_partition_info[3].offset = NVRAM_ADDR_4M; ++ brcm_partition_info[3].size = NVRAM_SIZE; ++ brcm_partition_info[3].mask_flags = 0; ++ ++ add_mtd_partitions(mymtd, brcm_partition_info, 4); ++ ++ return 0; ++ ++} ++ ++static void __exit cleanup_brcm_physmap(void) ++{ ++if (mymtd) { ++ del_mtd_partitions(mymtd); ++ del_mtd_device(mymtd); ++ map_destroy(mymtd); ++} ++if (brcm_physmap_map.map_priv_1) { ++ brcm_physmap_map.map_priv_1 = 0; ++} ++} ++ ++module_init(init_brcm_physmap); ++module_exit(cleanup_brcm_physmap); ++ ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Song Wang songw@broadcom.com"); ++MODULE_DESCRIPTION("Configurable MTD map driver for read-only root file system"); +--- linux-2.6.8.1/drivers/mtd/maps/Makefile 2004-08-14 12:54:46.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/drivers/mtd/maps/Makefile 2006-06-26 09:07:13.000000000 +0200 +@@ -39,13 +39,13 @@ + obj-$(CONFIG_MTD_SCx200_DOCFLASH)+= scx200_docflash.o + obj-$(CONFIG_MTD_DBOX2) += dbox2-flash.o + obj-$(CONFIG_MTD_OCELOT) += ocelot.o ++obj-$(CONFIG_MTD_LASAT) += lasat.o + obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o + obj-$(CONFIG_MTD_PCI) += pci.o +-obj-$(CONFIG_MTD_PB1XXX) += pb1xxx-flash.o +-obj-$(CONFIG_MTD_DB1X00) += db1x00-flash.o +-obj-$(CONFIG_MTD_PB1550) += pb1550-flash.o +-obj-$(CONFIG_MTD_DB1550) += db1550-flash.o + obj-$(CONFIG_MTD_LASAT) += lasat.o ++obj-$(CONFIG_MTD_DB1X00) += db1x00-flash.o ++obj-$(CONFIG_MTD_PB1550) += pb1550-flash.o ++obj-$(CONFIG_MTD_DB1550) += db1550-flash.o + obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o + obj-$(CONFIG_MTD_EDB7312) += edb7312.o + obj-$(CONFIG_MTD_IMPA7) += impa7.o +@@ -64,3 +64,11 @@ + obj-$(CONFIG_MTD_IXP4XX) += ixp4xx.o + obj-$(CONFIG_MTD_WRSBC8260) += wr_sbc82xx_flash.o + obj-$(CONFIG_MTD_DMV182) += dmv182.o ++obj-$(CONFIG_MTD_PB1000) += pb1xxx-flash.o ++obj-$(CONFIG_MTD_PB1100) += pb1xxx-flash.o ++obj-$(CONFIG_MTD_PB1500) += pb1xxx-flash.o ++obj-$(CONFIG_MTD_DB1X00) += db1x00-flash.o ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++obj-$(CONFIG_MTD_BCM963XX) += bcm963xx.o ++EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++# CONFIG_MIPS_BRCM End Broadcom changed code. +--- linux-2.6.8.1/drivers/mtd/maps/Kconfig 2004-08-14 12:56:23.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/drivers/mtd/maps/Kconfig 2006-06-26 09:07:13.000000000 +0200 +@@ -60,6 +60,12 @@ + Ignore this option if you use run-time physmap configuration + (i.e., run-time calling physmap_configure()). + ++config MTD_BCM963XX ++ tristate "Broadcom 963xx ADSL board flash memory support" ++ depends on MIPS_BRCM ++ help ++ Broadcom 963xx ADSL board flash memory ++ + config MTD_SUN_UFLASH + tristate "Sun Microsystems userflash support" + depends on (SPARC32 || SPARC64) && MTD_CFI +@@ -182,41 +188,12 @@ + help + Support for the flash chip on Tsunami TIG bus. + +-config MTD_LASAT +- tristate "Flash chips on LASAT board" +- depends on LASAT +- help +- Support for the flash chips on the Lasat 100 and 200 boards. +- + config MTD_NETtel + tristate "CFI flash device on SnapGear/SecureEdge" + depends on X86 && MTD_PARTITIONS && MTD_JEDECPROBE + help + Support for flash chips on NETtel/SecureEdge/SnapGear boards. + +-config MTD_PB1XXX +- tristate "Flash devices on Alchemy PB1xxx boards" +- depends on MIPS && ( MIPS_PB1000 || MIPS_PB1100 || MIPS_PB1500 ) +- help +- Flash memory access on Alchemy Pb1000/Pb1100/Pb1500 boards +- +-config MTD_PB1XXX_BOOT +- bool "PB1x00 boot flash device" +- depends on MTD_PB1XXX && ( MIPS_PB1100 || MIPS_PB1500 ) +- help +- Use the first of the two 32MiB flash banks on Pb1100/Pb1500 board. +- You can say 'Y' to both this and 'MTD_PB1XXX_USER' below, to use +- both banks. +- +-config MTD_PB1XXX_USER +- bool "PB1x00 user flash device" +- depends on MTD_PB1XXX && ( MIPS_PB1100 || MIPS_PB1500 ) +- default y if MTD_PB1XX_BOOT = n +- help +- Use the second of the two 32MiB flash banks on Pb1100/Pb1500 board. +- You can say 'Y' to both this and 'MTD_PB1XXX_BOOT' above, to use +- both banks. +- + config MTD_PB1550 + tristate "Flash devices on Alchemy PB1550 board" + depends on MIPS && MIPS_PB1550 +@@ -338,6 +315,80 @@ + Mapping for the Flaga digital module. If you don´t have one, ignore + this setting. + ++config MTD_PB1000 ++ tristate "Pb1000 Boot Flash device" ++ depends on MIPS && MIPS_PB1000 ++ help ++ Flash memory access on Alchemy Pb1000 ++ ++config MTD_PB1100 ++ tristate "Pb1100 Flash device" ++ depends on MIPS && MIPS_PB1100 ++ help ++ Flash memory access on Alchemy Pb1100 ++ ++config MTD_PB1500 ++ tristate "Pb1500 Flash device" ++ depends on MIPS && MIPS_PB1500 ++ help ++ Flash memory access on Alchemy Pb1500 ++ ++config MTD_PB1500_BOOT ++ bool "Pb1100/Pb1500 Boot Flash device" ++ depends on MIPS && (MTD_PB1500 || MTD_PB1100) ++ help ++ Use the first of the two 32MB flash banks on Pb1100/Pb1500 board. ++ You can say 'Y' to both this and the USER flash option, to use ++ both banks. ++ ++config MTD_PB1500_USER ++ bool "Pb1100/Pb1500 User Flash device (2nd 32MB bank)" ++ depends on MIPS && (MTD_PB1500 || MTD_PB1100) ++ help ++ Use the second of the two 32MB flash banks on Pb1100/Pb1500 board. ++ You can say 'Y' to both this and the BOOT flash option, to use ++ both banks. ++ ++config MTD_DB1X00 ++ tristate "Db1X00 Flash device" ++ depends on MIPS && (MIPS_DB1000 || MIPS_DB1100 || MIPS_DB1500) ++ help ++ Flash memory access on Alchemy Db1X00 Boards ++ ++config MTD_DB1X00_BOOT ++ bool "Db1X00 Boot Flash device" ++ depends on MIPS && MTD_DB1X00 ++ help ++ Use the first of the two 32MB flash banks on Db1X00 board. ++ You can say 'Y' to both this and the USER flash option, to use ++ both banks. ++ ++config MTD_DB1X00_USER ++ bool "Db1X00 User Flash device (2nd 32MB bank)" ++ depends on MIPS && MTD_DB1X00 ++ help ++ Use the second of the two 32MB flash banks on Db1X00 boards. ++ You can say 'Y' to both this and the BOOT flash option, to use ++ both banks. ++ ++config MTD_BOSPORUS ++ tristate "Bosporus Flash device" ++ depends on MIPS && MIPS_BOSPORUS ++ help ++ Flash memory access on Alchemy Bosporus Board ++ ++config MTD_XXS1500 ++ tristate "MyCable XXS1500 Flash device" ++ depends on MIPS && MIPS_XXS1500 ++ help ++ Flash memory access on MyCable XXS1500 Board ++ ++config MTD_MTX1 ++ tristate "4-G Systems MTX-1 Flash device" ++ depends on MIPS && MIPS_MTX1 ++ help ++ Flash memory access on 4-G Systems MTX-1 Board ++ + config MTD_BEECH + tristate "CFI Flash device mapped on IBM 405LP Beech" + depends on MTD_CFI && PPC32 && 40x && BEECH +@@ -422,6 +473,12 @@ + NVRAM on the Momenco Ocelot board. If you have one of these boards + and would like access to either of these, say 'Y'. + ++config MTD_LASAT ++ tristate "LASAT flash device" ++ depends on LASAT && MTD_CFI ++ help ++ Support for the flash chips on the Lasat 100 and 200 boards. ++ + config MTD_SOLUTIONENGINE + tristate "CFI Flash device mapped on Hitachi SolutionEngine" + depends on SUPERH && MTD_CFI && MTD_REDBOOT_PARTS +--- linux-2.6.8.1/drivers/usb/host/Makefile 2004-08-14 12:56:23.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/drivers/usb/host/Makefile 2006-06-26 09:07:14.000000000 +0200 +@@ -8,3 +8,7 @@ + obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o + + obj-$(CONFIG_USB_SL811HS) += hc_sl811.o ++ ++ifeq ($(CONFIG_MIPS_BRCM),y) ++EXTRA_CFLAGS += -DCONFIG_SWAP_IO_SPACE -D__MIPSEB__ ++endif +\ No newline at end of file +--- linux-2.6.8.1/include/asm-mips/addrspace.h 2004-08-14 12:54:47.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/include/asm-mips/addrspace.h 2006-06-26 09:07:15.000000000 +0200 +@@ -11,7 +11,13 @@ + #define _ASM_ADDRSPACE_H + + #include <linux/config.h> ++#ifdef __KERNEL__ ++#if defined(CONFIG_BCM_ENDPOINT_MODULE) ++#include <asm/mach-generic/spaces.h> ++#else + #include <spaces.h> ++#endif ++#endif + + /* + * Configure language +--- linux-2.6.8.1/include/asm-mips/bootinfo.h 2004-08-14 12:54:51.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/include/asm-mips/bootinfo.h 2006-06-26 09:07:15.000000000 +0200 +@@ -210,6 +210,16 @@ + #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ + #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ + ++#if defined(CONFIG_MIPS_BRCM) ++/* ++ * Valid machtype for group BRCM ++ */ ++#define MACH_GROUP_BRCM 23 /* Broadcom boards */ ++#define MACH_BCM96338 0 ++#define MACH_BCM96345 1 ++#define MACH_BCM96348 2 ++#endif ++ + #define CL_SIZE COMMAND_LINE_SIZE + + const char *get_system_type(void); +--- linux-2.6.8.1/include/asm-mips/cpu.h 2004-08-14 12:54:50.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/include/asm-mips/cpu.h 2006-06-26 09:07:15.000000000 +0200 +@@ -71,6 +71,11 @@ + #define PRID_IMP_4KEMPR2 0x9100 + #define PRID_IMP_4KSD 0x9200 + #define PRID_IMP_24K 0x9300 ++#if defined(CONFIG_MIPS_BRCM) ++#define PRID_IMP_BCM6338 0x9000 ++#define PRID_IMP_BCM6345 0x8000 ++#define PRID_IMP_BCM6348 0x9100 ++#endif + + #define PRID_IMP_UNKNOWN 0xff00 + +@@ -177,7 +182,14 @@ + #define CPU_VR4133 56 + #define CPU_AU1550 57 + #define CPU_24K 58 ++#if defined(CONFIG_MIPS_BRCM) ++#define CPU_BCM6338 59 ++#define CPU_BCM6345 60 ++#define CPU_BCM6348 61 ++#define CPU_LAST 61 ++#else + #define CPU_LAST 58 ++#endif + + /* + * ISA Level encodings +diff -urN linux-2.6.8.1/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h linux-2.6.8.1-brcm63xx/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h +--- linux-2.6.8.1/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 2006-06-26 09:07:15.000000000 +0200 +@@ -0,0 +1,36 @@ ++#ifndef __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H ++#define __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H ++ ++#define cpu_has_tlb 1 ++#define cpu_has_4kex 4 ++#define cpu_has_4ktlb 8 ++#define cpu_has_fpu 0 ++#define cpu_has_32fpr 0 ++#define cpu_has_counter 0x40 ++#define cpu_has_watch 0 ++#define cpu_has_mips16 0 ++#define cpu_has_divec 0x200 ++#define cpu_has_vce 0 ++#define cpu_has_cache_cdex_p 0 ++#define cpu_has_cache_cdex_s 0 ++#define cpu_has_prefetch 0x40000 ++#define cpu_has_mcheck 0x2000 ++#define cpu_has_ejtag 0x4000 ++#define cpu_has_llsc 0x10000 ++#define cpu_has_vtag_icache 0 ++#define cpu_has_dc_aliases 0 ++#define cpu_has_ic_fills_f_dc 0 ++ ++#define cpu_has_nofpuex 0 ++#define cpu_has_64bits 0 ++#define cpu_has_64bit_zero_reg 0 ++#define cpu_has_64bit_gp_regs 0 ++#define cpu_has_64bit_addresses 0 ++ ++#define cpu_has_subset_pcaches 0 ++ ++#define cpu_dcache_line_size() 16 ++#define cpu_icache_line_size() 16 ++#define cpu_scache_line_size() 0 ++ ++#endif /* __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H */ +--- linux-2.6.8.1/include/asm-mips/mach-generic/param.h 2004-08-14 12:55:10.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/include/asm-mips/mach-generic/param.h 2006-06-26 09:07:15.000000000 +0200 +@@ -8,6 +8,10 @@ + #ifndef __ASM_MACH_GENERIC_PARAM_H + #define __ASM_MACH_GENERIC_PARAM_H + ++#if defined(CONFIG_MIPS_BRCM) ++#define HZ 200 /* Internal kernel timer frequency */ ++#else + #define HZ 1000 /* Internal kernel timer frequency */ ++#endif + + #endif /* __ASM_MACH_GENERIC_PARAM_H */ +--- linux-2.6.8.1/include/asm-mips/page.h 2004-08-14 12:55:10.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/include/asm-mips/page.h 2006-06-26 09:07:15.000000000 +0200 +@@ -13,7 +13,13 @@ + + #ifdef __KERNEL__ + ++#if defined(CONFIG_BCM_ENDPOINT_MODULE) ++#include <asm/mach-generic/spaces.h> ++#else + #include <spaces.h> ++#endif ++ ++#endif + + /* + * PAGE_SHIFT determines the page size +@@ -33,6 +39,7 @@ + #define PAGE_SIZE (1UL << PAGE_SHIFT) + #define PAGE_MASK (~(PAGE_SIZE-1)) + ++#ifdef __KERNEL__ + #ifndef __ASSEMBLY__ + + extern void clear_page(void * page); +--- linux-2.6.8.1/include/asm-mips/param.h 2004-08-14 12:54:51.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/include/asm-mips/param.h 2006-06-26 09:07:15.000000000 +0200 +@@ -12,7 +12,11 @@ + #ifdef __KERNEL__ + + # include <param.h> /* Internal kernel timer frequency */ ++#if defined(CONFIG_BCM_ENDPOINT_MODULE) ++# define USER_HZ HZ /* .. some user interfaces are in "ticks" */ ++#else + # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ ++#endif + # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ + #endif + +--- linux-2.6.8.1/include/asm-mips/timex.h 2004-08-14 12:56:15.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/include/asm-mips/timex.h 2006-06-26 09:07:15.000000000 +0200 +@@ -31,7 +31,11 @@ + * no reason to make this a separate architecture. + */ + ++#if defined(CONFIG_BCM_ENDPOINT_MODULE) ++#include <asm/mach-generic/timex.h> ++#else + #include <timex.h> ++#endif + + /* + * Standard way to access the cycle counter. +diff -urN linux-2.6.8.1/bcmdrivers/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/Makefile +--- linux-2.6.8.1/bcmdrivers/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/Makefile 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,17 @@ ++# File: bcmdrivers/Makefile ++# ++# Makefile for the Linux kernel modules. ++# ++-include $(KERNEL_DIR)/.config ++ ++obj-y += opensource/ ++ ++# If rootfs is nfs, we have to build Ethernet ++# driver as built-n ++ifeq ($(CONFIG_ROOTFS_NFS),y) ++obj-y += broadcom/ ++endif ++ ++obj-y += broadcom/ ++obj-m += broadcom/ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/Makefile +--- linux-2.6.8.1/bcmdrivers/broadcom/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/Makefile 2006-06-26 10:29:23.000000000 +0200 +@@ -0,0 +1,3 @@ ++ ++symlinks: ++ #cp ../../../tools/built-in.o built-in.o +Files linux-2.6.8.1/bcmdrivers/broadcom/built-in.o and linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/built-in.o differ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_defs.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_defs.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_defs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_defs.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,133 @@ ++/* TARGET=bcm6348-dmt-T1-dmtbis-adsl2plus-L2-SRA-firmware-Qproc-HW-RTL-pipeline-IncOneBit-Readsl2-doubleUS */ ++ ++#define SOURCE_FILE_ ++#define BCM6348_SRC ++#define G994_T1P413_1024_FFT ++#define ENABLE_DIG_USPWR_CUTBACK ++#define ADSLCORE_ONLY ++#define TEQ_DF ++#define LOOP_TIMING_PLL ++#define RCV_PHASE_TWEAK_ONLY ++#define ADSL_MAX_POSSIBLE_RCV_RATE ++#define HARDWARE_CHANNEL ++#define ADSL_HARDWARE_AGC ++#define HW_CHANNEL_ADC ++#define HW_CHANNEL_DAC ++#define HW_PGA ++#define DIGITALEC_SINGLE_TAP_UPDATE ++#define ANALOGEC_SINGLE_TAP_UPDATE ++#define HWLOG ++#define G992_TRELLIS_CODE_CLAMPING ++#define G992DECODERTRELLISBOUNDARY ++#define MEMORYLIMIT64K ++#define bcm47xx ++#define DSL_BIG_ENDIAN ++#define MIPS_SRC ++#define VP_INLINE -Winline ++#define USE_ASM_API ++#define RTL_SRC ++#define RSENC_INLINE ++#define BITENC_INLINE ++#define USE_SLOW_DATA ++#define USE_FAST_TEXT ++#define PROFILE_INLINE ++#define CHIP_SRC ++#define G992_RESYNC_PILOT_PHASE_IN_SHOWTIME ++#define G992_APPLY_SSVI ++#define SHARE_TEQ_VARS ++#define ANNEX_M ++#define DOUBLE_UP_STREAM ++#define G994P1_SUPPORT_A43C ++#define USE_ASM_API ++#define MIPS_ASM ++#define MEMORYLIMIT64K ++#define ADSL_FIRMWARE ++#define G992DATA_XMT_COMPACT_WORD ++#define ADSL_MAX_POSSIBLE_RCV_RATE ++#define DSP_FRONTEND_ONLY ++#define G992P3_ONE_BIT_CONSTELLATION ++#define ADSL_MODEM ++#define ATM ++#define ADSL_ATUR ++#define ADSL_SOFTWARE_TIME_ERROR_CALCULATION ++#define DSL_REPORT_ALL_COUNTERS ++#define ADSL_MONITOR_LCD ++#define G994P1 ++#define G994P1_ATUR ++#define G992 ++#define G992_ATUR ++#define ADSL_FRAMER ++#define G997_1 ++#define ATM_I432 ++#define TEQ_DF ++#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define G994P1_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define G992_TRELLISCODE ++#define ADSL_HARDWARE_ECHO_CANCELLOR ++#define G992P1 ++#define G992P1_ATUR ++#define G992P1_ANNEX_A ++#define ADSL_HARDWARE_TIME_ERROR_TRACKING ++#define G992P1_NEWFRAME ++#define G992P1_NEWFRAME_ATUR ++#define G992P1_ANNEX_A_USED_FOR_G992P2 ++#define T1P413 ++#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define G992_CALC_DEBUG_SNR_BEFORE_TEQ ++#define G992P3 ++#define RATE_SELECT_E14 ++#define G992P3_ATUR ++#define G992P3AMENDMENT ++#define GLOBESPAN_DM ++#define G992P3_COMB_MSG_THREE_COPIES ++#define G992P3_POWER_MANAGEMENT ++#define G992P3_SRA ++#define G992P5 ++#define G992P5_ATUR ++#define ADSL_PIPELINE_CODE ++#define ADSL_HARDWARE_TIME_ERROR_TRACKING ++#define G994P1RCV_QPROC ++#define G994P1XMT_QPROC ++#define G992RCV_QPROC ++#define G992XMT_QPROC ++#define G992RCV_RS ++#define VP_SIMULATOR ++#define T1P413RCV_QPROC ++#define T1P413XMT_QPROC ++#define G992ENC_HW_DATAMODE ++#define G992DATA_XMT_HW_RS ++#define G992DATA_XMT_COMPACT_WORD ++#define G992RCV_QPROC_FAST ++#define G992_BIT_SWAP ++#define ADSL_IDENTIFY_VENDOR_FIRMWARE ++#define ADSL_ATUR_FORCE_BIGGER_UPSTREAM_MARGIN ++#define G992_MORE_FRAME_MODE ++#define XMT_RACT2_FOR_ADI_COMPATIBILITY ++#define XMT_FFT_SIZE_2X ++#define SYNCH_SYMBOL_DETECTION ++#define ANSI_CACT12_PING_PONG ++#define ADSL_SPECIAL_FIX_FOR_FRENCH_TELECOM ++#define G994P1_CHECK_SECURITY ++#define G994P1_NON_STD_INFO ++#define I432_HEADER_COMPRESSION ++#define TDC_IOP_FIX_ERICSSON_TI_4000C_350 ++#define TDC_IOP_FIX_SEIMENS_TI ++#define FT_ADI_US_RATE_FIX ++#define ANSI_CACT12_PING_PONG ++#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define G994P1_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define READSL2 ++#define G992_APPLY_SSVI ++#define READSL2_FILTERS ++ ++ ++#define ADSL_PHY_XFACE_OFFSET 0x21F90 ++ ++ ++#define ADSL_PHY_SDRAM_BIAS 0x1A0000 ++ ++ ++#define ADSL_PHY_SDRAM_LINK_OFFSET 0x1A0000 ++ ++ ++#define ADSL_PHY_SDRAM_PAGE_SIZE 0x200000 +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_lmem.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_lmem.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_lmem.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_lmem.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,6 @@ ++/* ++** Don't change! ++** This file has been generated automatically by bin2c program ++*/ ++ ++extern const unsigned char adsl_lmem[51036]; +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_sdram.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_sdram.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_sdram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_sdram.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,6 @@ ++/* ++** Don't change! ++** This file has been generated automatically by bin2c program ++*/ ++ ++extern const unsigned char adsl_sdram[364348]; +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslCoreDefs.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslCoreDefs.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslCoreDefs.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,245 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslCore.c -- Bcm ADSL core driver ++ * ++ * Description: ++ * This file contains BCM ADSL core driver ++ * ++ * ++ * Copyright (c) 2000-2001 Broadcom Corporation ++ * All Rights Reserved ++ * No portions of this material may be reproduced in any form without the ++ * written permission of: ++ * Broadcom Corporation ++ * 16215 Alton Parkway ++ * Irvine, California 92619 ++ * All information contained in this document is Broadcom Corporation ++ * company private, proprietary, and trade secret. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.4 $ ++ * ++ * $Id: AdslCoreDefs.h,v 1.4 2004/07/20 23:45:48 ilyas Exp $ ++ * ++ * $Log: AdslCoreDefs.h,v $ ++ * Revision 1.4 2004/07/20 23:45:48 ilyas ++ * Added driver version info, SoftDslPrintf support. Fixed G.997 related issues ++ * ++ * Revision 1.3 2004/06/10 00:20:33 ilyas ++ * Added L2/L3 and SRA ++ * ++ * Revision 1.2 2004/04/12 23:24:38 ilyas ++ * Added default G992P5 PHY definition ++ * ++ * Revision 1.1 2004/04/08 23:59:15 ilyas ++ * Initial CVS checkin ++ * ++ ****************************************************************************/ ++ ++#ifndef _ADSL_CORE_DEFS_H ++#define _ADSL_CORE_DEFS_H ++ ++#if defined(__KERNEL__) ++#include <linux/config.h> ++#endif ++ ++#if defined(CONFIG_BCM96348) || defined(BOARD_bcm96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(BOARD_bcm96338) || defined(_BCM96338_) ++#ifdef ADSL_ANNEXC ++#include "../adslcore6348C/adsl_defs.h" ++#elif defined(ADSL_ANNEXB) ++#include "../adslcore6348B/adsl_defs.h" ++#elif defined(ADSL_SADSL) ++#include "../adslcore6348SA/adsl_defs.h" ++#else ++#include "../adslcore6348/adsl_defs.h" ++#endif ++#endif ++ ++#if defined(__KERNEL__) || defined(TARG_OS_RTEMS) || defined(_CFE_) ++#if defined(CONFIG_BCM96345) || defined(BOARD_bcm96345) || defined(_BCM96345_) ++#ifdef ADSL_ANNEXC ++#include "../adslcore6345C/adsl_defs.h" ++#elif defined(ADSL_ANNEXB) ++#include "../adslcore6345B/adsl_defs.h" ++#elif defined(ADSL_SADSL) ++#include "../adslcore6345SA/adsl_defs.h" ++#else ++#include "../adslcore6345/adsl_defs.h" ++#endif ++#endif /* of CONFIG_BCM96345 */ ++#else ++#if defined(CONFIG_BCM96345) ++#ifdef ADSL_ANNEXC ++#include "../adslcoreC/adsl_defs.h" ++#elif defined(ADSL_ANNEXB) ++#include "../adslcoreB/adsl_defs.h" ++#elif defined(ADSL_SADSL) ++#include "../adslcoreSA/adsl_defs.h" ++#else ++#include "../adslcore/adsl_defs.h" ++#endif ++#endif /* of CONFIG_BCM96345 */ ++#endif /* __KERNEL__ */ ++ ++#ifdef _WIN32_WCE ++#define ASSERT(a) ++#endif ++ ++#include "AdslXfaceData.h" ++ ++/* adjust some definitions for the HOST */ ++ ++#undef GLOBAL_PTR_BIAS ++#undef ADSLCORE_ONLY ++#undef USE_SLOW_DATA ++#undef USE_FAST_TEXT ++#undef VP_SIMULATOR ++#undef bcm47xx ++#undef ADSL_FRAMER ++#undef ATM ++#undef ATM_I432 ++#undef DSL_OS ++ ++#define HOST_ONLY ++#define G997_1_FRAMER ++#define ADSL_MIB ++ ++#ifndef FLATTEN_ADDR_ADJUST ++#define FLATTEN_ADDR_ADJUST 0xFFF00000 ++#endif ++ ++/* definitions for combo PHY (AnnexA(ADSL2) and AnnexB) */ ++ ++#if !(defined(ADSL_SINGLE_PHY) || defined(G992_ANNEXC)) ++ ++#undef G992P1_ANNEX_A ++#define G992P1_ANNEX_A ++#undef G992P3 ++#define G992P3 ++#undef G992P5 ++#define G992P5 ++#define G992P1_ANNEX_A ++#undef READSL2 ++#define READSL2 ++#undef G992P1_ANNEX_A_USED_FOR_G992P2 ++#define G992P1_ANNEX_A_USED_FOR_G992P2 ++#undef T1P413 ++#define T1P413 ++ ++#undef G992P1_ANNEX_B ++#define G992P1_ANNEX_B ++ ++#endif ++ ++/* ADSL PHY definition */ ++ ++typedef struct { ++ unsigned long sdramPageAddr; ++ unsigned long sdramImageAddr; ++ unsigned long sdramImageSize; ++ unsigned long sdramPhyImageAddr; ++ unsigned short fwType; ++ unsigned short chipType; ++ unsigned short mjVerNum; ++ unsigned short mnVerNum; ++ char *pVerStr; ++ unsigned long features[4]; ++} adslPhyInfo; ++extern adslPhyInfo adslCorePhyDesc; ++ ++/* chip list */ ++ ++#define kAdslPhyChipMjMask 0xFF00 ++#define kAdslPhyChipMnMask 0x00FF ++#define kAdslPhyChipUnknown 0 ++#define kAdslPhyChip6345 0x100 ++#define kAdslPhyChip6348 0x200 ++#define kAdslPhyChipRev0 0 ++#define kAdslPhyChipRev1 1 ++#define kAdslPhyChipRev2 2 ++#define kAdslPhyChipRev3 3 ++#define kAdslPhyChipRev4 4 ++#define kAdslPhyChipRev5 5 ++ ++#define ADSL_PHY_SUPPORT(f) AdslFeatureSupported(adslCorePhyDesc.features,f) ++#define ADSL_PHY_SET_SUPPORT(p,f) AdslFeatureSet((p)->features,f) ++ ++/* ADSL Driver to/from PHY address and data conversion macros */ ++ ++#ifdef ADSLDRV_LITTLE_ENDIAN ++#define ADSL_ENDIAN_CONV_LONG(x) ( ((x) << 24) | (((x) << 8) & 0x00FF0000) | (((x) >> 8) & 0x0000FF00) | ((unsigned long)(x) >> 24) ) ++#define ADSL_ENDIAN_CONV_SHORT(x) ( ((x) << 8) | ((unsigned short)(x) >> 8) ) ++#define ADSL_ENDIAN_CONV_2SHORTS(x) ( ((x) << 16) | ((unsigned long)(x) >> 16) ) ++#else ++#define ADSL_ENDIAN_CONV_LONG(x) x ++#define ADSL_ENDIAN_CONV_SHORT(x) x ++#define ADSL_ENDIAN_CONV_2SHORTS(x) x ++#endif ++ ++#ifndef ADSL_PHY_XFACE_OFFSET ++#define ADSL_PHY_XFACE_OFFSET 0x00017F90 ++#endif ++#define ADSL_LMEM_XFACE_DATA (0xFFF00000 | ADSL_PHY_XFACE_OFFSET) ++ ++#ifndef ADSL_PHY_SDRAM_START ++#define ADSL_PHY_SDRAM_START 0x10000000 ++#endif ++#ifndef ADSL_PHY_SDRAM_BIAS ++#define ADSL_PHY_SDRAM_BIAS 0x00040000 ++#endif ++#define ADSL_PHY_SDRAM_START_4 (ADSL_PHY_SDRAM_START + ADSL_PHY_SDRAM_BIAS) ++ ++#ifndef ADSL_PHY_SDRAM_PAGE_SIZE ++#define ADSL_PHY_SDRAM_PAGE_SIZE 0x00080000 ++#endif ++ ++#ifdef ADSL_PHY_SDRAM_BIAS ++#define ADSL_SDRAM_IMAGE_SIZE (ADSL_PHY_SDRAM_PAGE_SIZE - ADSL_PHY_SDRAM_BIAS) ++#else ++#define ADSL_SDRAM_IMAGE_SIZE (256*1024) ++#endif ++ ++ ++#ifndef ADSL_PHY_SDRAM_LINK_OFFSET ++#define ADSL_PHY_SDRAM_LINK_OFFSET 0x00040000 ++#endif ++ ++#define ADSL_SDRAM_TOTAL_SIZE 0x00800000 ++#define ADSL_SDRAM_HOST_MIPS_DEFAULT (0xA0000000 | (ADSL_SDRAM_TOTAL_SIZE - ADSL_PHY_SDRAM_PAGE_SIZE + ADSL_PHY_SDRAM_BIAS)) ++ ++#define ADSLXF ((AdslXfaceData *) ADSL_LMEM_XFACE_DATA) ++ ++#define ADSL_MIPS_LMEM_ADDR(a) (((ulong)(a) & 0x19000000) == 0x19000000) ++#define SDRAM_ADDR_TO_HOST(a) ((void *) ((ulong)(a) - adslCorePhyDesc.sdramPhyImageAddr + \ ++ (ADSLXF->sdramBaseAddr ? (unsigned long) ADSLXF->sdramBaseAddr : ADSL_SDRAM_HOST_MIPS_DEFAULT))) ++#define SDRAM_ADDR_TO_ADSL(a) ((void *) (adslCorePhyDesc.sdramPhyImageAddr + ((ulong)(a) - \ ++ (ADSLXF->sdramBaseAddr ? (unsigned long) ADSLXF->sdramBaseAddr : ADSL_SDRAM_HOST_MIPS_DEFAULT)))) ++ ++#define ADSL_ADDR_TO_HOST(addr) ADSL_MIPS_LMEM_ADDR(addr) ? (void *) ((ulong) (addr) | FLATTEN_ADDR_ADJUST) : SDRAM_ADDR_TO_HOST(addr) ++ ++ ++#ifndef DEBUG ++#define DEBUG ++#endif ++ ++#ifndef __SoftDslPrintf ++void __SoftDslPrintf(void *gDslVars, char *fmt, int argNum, ...); ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.gh +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.gh 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.gh 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,94 @@ ++/**************************************************************************** ++ * ++ * AdslMib.gh ++ * ++ * Description: ++ * This is a header file which defines the type for AdslMib ++ * global variable structure. ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.8 $ ++ * ++ * $Id: AdslMib.gh,v 1.8 2004/06/04 18:56:01 ilyas Exp $ ++ * ++ * $Log: AdslMib.gh,v $ ++ * Revision 1.8 2004/06/04 18:56:01 ilyas ++ * Added counter for ADSL2 framing and performance ++ * ++ * Revision 1.7 2003/10/17 21:02:12 ilyas ++ * Added more data for ADSL2 ++ * ++ * Revision 1.6 2003/10/14 00:55:27 ilyas ++ * Added UAS, LOSS, SES error seconds counters. ++ * Support for 512 tones (AnnexI) ++ * ++ * Revision 1.5 2003/07/18 19:07:15 ilyas ++ * Merged with ADSL driver ++ * ++ * Revision 1.4 2002/11/13 21:32:49 ilyas ++ * Added adjustK support for Centillium non-standard framing mode ++ * ++ * Revision 1.3 2002/10/31 20:27:13 ilyas ++ * Merged with the latest changes for VxWorks/Linux driver ++ * ++ * Revision 1.2 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.1 2001/12/21 22:39:30 ilyas ++ * Added support for ADSL MIB data objects (RFC2662) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef AdslMibGlobals ++#define AdslMibGlobals ++ ++#include "AdslMib.h" ++ ++typedef struct ++ { ++ /* MIB data */ ++ ++ adslMibInfo adslMib; ++ ++ /* ADSL state data */ ++ ++ adslMibNotifyHandlerType notifyHandlerPtr; ++ ulong timeSec; ++ ulong timeMs; ++ Boolean currSecondErrored; ++ Boolean currSecondLOS; ++ Boolean currSecondSES; ++ Boolean currSecondFEC; ++ ulong rcvPower; ++ ulong rcvRateBps; ++ ulong xmtRateBps; ++ ulong linkStatus; ++ G992CodingParams rcvParams; ++ G992CodingParams xmtParams; ++ ulong shtCounters[kG992ShowtimeNumOfMonitorCounters]; ++ ulong scratchData; ++ long showtimeMarginThld; ++ ++ /* ADSL diag data */ ++ ++ short snr[kAdslMibMaxToneNum]; ++ short showtimeMargin[kAdslMibMaxToneNum]; ++ uchar bitAlloc[kAdslMibMaxToneNum]; ++ short gain[kAdslMibMaxToneNum]; ++ ComplexShort chanCharLin[kAdslMibMaxToneNum]; ++ short chanCharLog[kAdslMibMaxToneNum]; ++ short quietLineNoise[kAdslMibMaxToneNum]; ++ ++ ushort nTones; ++ uchar nMsgCnt; ++ ulong g992MsgType; ++ uchar rsOption[1+4]; ++ Boolean rsOptionValid; ++ } ++ adslMibVarsStruct; ++ ++#endif /* AdslMibGlobals */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,114 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslMib.h ++ * ++ * Description: ++ * This file contains the exported functions and definitions for AdslMib ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.9 $ ++ * ++ * $Id: AdslMib.h,v 1.9 2004/04/12 23:34:52 ilyas Exp $ ++ * ++ * $Log: AdslMib.h,v $ ++ * Revision 1.9 2004/04/12 23:34:52 ilyas ++ * Merged the latest ADSL driver chnages for ADSL2+ ++ * ++ * Revision 1.8 2004/03/03 20:14:05 ilyas ++ * Merged changes for ADSL2+ from ADSL driver ++ * ++ * Revision 1.7 2003/10/14 00:55:27 ilyas ++ * Added UAS, LOSS, SES error seconds counters. ++ * Support for 512 tones (AnnexI) ++ * ++ * Revision 1.6 2003/07/18 19:07:15 ilyas ++ * Merged with ADSL driver ++ * ++ * Revision 1.5 2002/10/31 20:27:13 ilyas ++ * Merged with the latest changes for VxWorks/Linux driver ++ * ++ * Revision 1.4 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.3 2002/01/13 22:25:40 ilyas ++ * Added functions to get channels rate ++ * ++ * Revision 1.2 2002/01/03 06:03:36 ilyas ++ * Handle byte moves tha are not multiple of 2 ++ * ++ * Revision 1.1 2001/12/21 22:39:30 ilyas ++ * Added support for ADSL MIB data objects (RFC2662) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef AdslMibHeader ++#define AdslMibHeader ++ ++#if defined(_CFE_) ++#include "lib_types.h" ++#include "lib_string.h" ++#endif ++ ++#include "AdslMibDef.h" ++ ++/* Interface functions */ ++ ++typedef int (SM_DECL *adslMibNotifyHandlerType) (void *gDslVars, ulong event); ++ ++extern Boolean AdslMibInit(void *gDslVars); ++extern void AdslMibTimer(void *gDslVars, long timeMs); ++extern void AdslMibStatusSnooper (void *gDslVars, dslStatusStruct *status); ++extern void AdslMibSetNotifyHandler(void *gDslVars, adslMibNotifyHandlerType notifyHandlerPtr); ++extern int AdslMibGetModulationType(void *gDslVars); ++extern Boolean AdslMibIsAdsl2Mod(void *gDslVars); ++extern int AdslMibGetActiveChannel(void *gDslVars); ++extern int AdslMibGetGetChannelRate(void *gDslVars, int dir, int channel); ++extern Boolean AdslMibIsLinkActive(void *gDslVars); ++extern int AdslMibPowerState(void *gDslVars); ++extern int AdslMibTrainingState (void *gDslVars); ++extern void AdslMibClearData(void *gDslVars); ++extern void AdslMibClearBertResults(void *gDslVars); ++extern void AdslMibBertStartEx(void *gDslVars, ulong bertSec); ++extern void AdslMibBertStopEx(void *gDslVars); ++extern ulong AdslMibBertContinueEx(void *gDslVars, ulong totalBits, ulong errBits); ++extern void AdslMibSetLPR(void *gDslVars); ++extern void AdslMibSetShowtimeMargin(void *gDslVars, long showtimeMargin); ++extern void AdslMibResetConectionStatCounters(void *gDslVars); ++ ++extern void AdslMibByteMove (int size, void* srcPtr, void* dstPtr); ++extern void AdslMibByteClear(int size, void* dstPtr); ++extern int AdslMibStrCopy(char *srcPtr, char *dstPtr); ++ ++/* AdslMibGetData dataId codes */ ++ ++#define kAdslMibDataAll 0 ++ ++extern void *AdslMibGetData (void *gDslVars, int dataId, void *pAdslMibData); ++ ++extern int AdslMibGetObjectValue ( ++ void *gDslVars, ++ uchar *objId, ++ int objIdLen, ++ uchar *dataBuf, ++ ulong *dataBufLen); ++ ++#endif /* AdslMibHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMibOid.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMibOid.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMibOid.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMibOid.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,177 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslMibOid.h ++ * ++ * Description: ++ * SNMP object identifiers for ADSL MIB and other related MIBs ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.5 $ ++ * ++ * $Id: AdslMibOid.h,v 1.5 2004/06/04 18:56:01 ilyas Exp $ ++ * ++ * $Log: AdslMibOid.h,v $ ++ * Revision 1.5 2004/06/04 18:56:01 ilyas ++ * Added counter for ADSL2 framing and performance ++ * ++ * Revision 1.4 2003/10/17 21:02:12 ilyas ++ * Added more data for ADSL2 ++ * ++ * Revision 1.3 2003/10/14 00:55:27 ilyas ++ * Added UAS, LOSS, SES error seconds counters. ++ * Support for 512 tones (AnnexI) ++ * ++ * Revision 1.2 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.1 2001/12/21 22:39:30 ilyas ++ * Added support for ADSL MIB data objects (RFC2662) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef AdslMibOidHeader ++#define AdslMibOidHeader ++ ++#define kOidAdsl 94 ++#define kOidAdslInterleave 124 ++#define kOidAdslFast 125 ++#define kOidAtm 37 ++ ++#define kOidAdslLine 1 ++#define kOidAdslMibObjects 1 ++ ++#define kOidAdslLineTable 1 ++#define kOidAdslLineEntry 1 ++#define kOidAdslLineCoding 1 ++#define kOidAdslLineType 2 ++#define kOidAdslLineSpecific 3 ++#define kOidAdslLineConfProfile 4 ++#define kOidAdslLineAlarmConfProfile 5 ++ ++#define kOidAdslAtucPhysTable 2 ++#define kOidAdslAturPhysTable 3 ++#define kOidAdslPhysEntry 1 ++#define kOidAdslPhysInvSerialNumber 1 ++#define kOidAdslPhysInvVendorID 2 ++#define kOidAdslPhysInvVersionNumber 3 ++#define kOidAdslPhysCurrSnrMgn 4 ++#define kOidAdslPhysCurrAtn 5 ++#define kOidAdslPhysCurrStatus 6 ++#define kOidAdslPhysCurrOutputPwr 7 ++#define kOidAdslPhysCurrAttainableRate 8 ++ ++#define kOidAdslAtucChanTable 4 ++#define kOidAdslAturChanTable 5 ++#define kOidAdslChanEntry 1 ++#define kOidAdslChanInterleaveDelay 1 ++#define kOidAdslChanCurrTxRate 2 ++#define kOidAdslChanPrevTxRate 3 ++#define kOidAdslChanCrcBlockLength 4 ++ ++#define kOidAdslAtucPerfDataTable 6 ++#define kOidAdslAturPerfDataTable 7 ++#define kOidAdslPerfDataEntry 1 ++#define kOidAdslPerfLofs 1 ++#define kOidAdslPerfLoss 2 ++#define kOidAdslPerfLprs 3 ++#define kOidAdslPerfESs 4 ++#define kOidAdslPerfValidIntervals 5 ++#define kOidAdslPerfInvalidIntervals 6 ++#define kOidAdslPerfCurr15MinTimeElapsed 7 ++#define kOidAdslPerfCurr15MinLofs 8 ++#define kOidAdslPerfCurr15MinLoss 9 ++#define kOidAdslPerfCurr15MinLprs 10 ++#define kOidAdslPerfCurr15MinESs 11 ++#define kOidAdslPerfCurr1DayTimeElapsed 12 ++#define kOidAdslPerfCurr1DayLofs 13 ++#define kOidAdslPerfCurr1DayLoss 14 ++#define kOidAdslPerfCurr1DayLprs 15 ++#define kOidAdslPerfCurr1DayESs 16 ++#define kOidAdslPerfPrev1DayMoniSecs 17 ++#define kOidAdslPerfPrev1DayLofs 18 ++#define kOidAdslPerfPrev1DayLoss 19 ++#define kOidAdslPerfPrev1DayLprs 20 ++#define kOidAdslPerfPrev1DayESs 21 ++ ++#define kOidAdslAtucPerfIntervalTable 8 ++#define kOidAdslAturPerfIntervalTable 9 ++#define kOidAdslPerfIntervalEntry 1 ++#define kOidAdslIntervalNumber 1 ++#define kOidAdslIntervalLofs 2 ++#define kOidAdslIntervalLoss 3 ++#define kOidAdslIntervalLprs 4 ++#define kOidAdslIntervalESs 5 ++#define kOidAdslIntervalValidData 6 ++ ++#define kOidAdslAtucChanPerfTable 10 ++#define kOidAdslAturChanPerfTable 11 ++#define kOidAdslChanPerfEntry 1 ++#define kOidAdslChanReceivedBlks 1 ++#define kOidAdslChanTransmittedBlks 2 ++#define kOidAdslChanCorrectedBlks 3 ++#define kOidAdslChanUncorrectBlks 4 ++#define kOidAdslChanPerfValidIntervals 5 ++#define kOidAdslChanPerfInvalidIntervals 6 ++#define kOidAdslChanPerfCurr15MinTimeElapsed 7 ++#define kOidAdslChanPerfCurr15MinReceivedBlks 8 ++#define kOidAdslChanPerfCurr15MinTransmittedBlks 9 ++#define kOidAdslChanPerfCurr15MinCorrectedBlks 10 ++#define kOidAdslChanPerfCurr15MinUncorrectBlks 11 ++#define kOidAdslChanPerfCurr1DayTimeElapsed 12 ++#define kOidAdslChanPerfCurr1DayReceivedBlks 13 ++#define kOidAdslChanPerfCurr1DayTransmittedBlks 14 ++#define kOidAdslChanPerfCurr1DayCorrectedBlks 15 ++#define kOidAdslChanPerfCurr1DayUncorrectBlks 16 ++#define kOidAdslChanPerfPrev1DayMoniSecs 17 ++#define kOidAdslChanPerfPrev1DayReceivedBlks 18 ++#define kOidAdslChanPerfPrev1DayTransmittedBlks 19 ++#define kOidAdslChanPerfPrev1DayCorrectedBlks 20 ++#define kOidAdslChanPerfPrev1DayUncorrectBlks 21 ++ ++#define kOidAdslAtucChanIntervalTable 12 ++#define kOidAdslAturChanIntervalTable 13 ++#define kOidAdslChanIntervalEntry 1 ++#define kOidAdslChanIntervalNumber 1 ++#define kOidAdslChanIntervalReceivedBlks 2 ++#define kOidAdslChanIntervalTransmittedBlks 3 ++#define kOidAdslChanIntervalCorrectedBlks 4 ++#define kOidAdslChanIntervalUncorrectBlks 5 ++#define kOidAdslChanIntervalValidData 6 ++ ++/* AdslExtra OIDs for kOidAdslPrivate, kOidAdslPrivExtraInfo (defined in AdslMibDef.h) */ ++ ++#define kOidAdslExtraConnectionInfo 1 ++#define kOidAdslExtraConnectionStat 2 ++#define kOidAdslExtraFramingMode 3 ++#define kOidAdslExtraTrainingState 4 ++#define kOidAdslExtraNonStdFramingAdjustK 5 ++#define kOidAdslExtraAtmStat 6 ++#define kOidAdslExtraDiagModeData 7 ++#define kOidAdslExtraAdsl2Info 8 ++#define kOidAdslExtraTxPerfCounterInfo 9 ++ ++#define kOidAtmMibObjects 1 ++#define kOidAtmTcTable 4 ++#define kOidAtmTcEntry 1 ++#define kOidAtmOcdEvents 1 ++#define kOidAtmAlarmState 2 ++ ++#endif /* AdslMibOidHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslXfaceData.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslXfaceData.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslXfaceData.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslXfaceData.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,129 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslXfaceData.h -- ADSL Core interface data structure ++ * ++ * Description: ++ * To be included both in SoftDsl and BcmAdslCore driver ++ * ++ * ++ * Copyright (c) 2000-2001 Broadcom Corporation ++ * All Rights Reserved ++ * No portions of this material may be reproduced in any form without the ++ * written permission of: ++ * Broadcom Corporation ++ * 16215 Alton Parkway ++ * Irvine, California 92619 ++ * All information contained in this document is Broadcom Corporation ++ * company private, proprietary, and trade secret. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.9 $ ++ * ++ * $Id: AdslXfaceData.h,v 1.9 2004/02/03 02:57:22 ilyas Exp $ ++ * ++ * $Log: AdslXfaceData.h,v $ ++ * Revision 1.9 2004/02/03 02:57:22 ilyas ++ * Added PHY feature settings ++ * ++ * Revision 1.8 2003/07/18 04:50:21 ilyas ++ * Added shared buffer for clEoc messages to avoid copying thru command buffer ++ * ++ * Revision 1.7 2003/02/25 00:46:32 ilyas ++ * Added T1.413 EOC vendor ID ++ * ++ * Revision 1.6 2003/02/21 23:29:13 ilyas ++ * Added OEM vendor ID parameter for T1.413 mode ++ * ++ * Revision 1.5 2002/09/13 21:17:12 ilyas ++ * Added pointers to version and build string to OEM interface structure ++ * ++ * Revision 1.4 2002/09/07 04:16:29 ilyas ++ * Fixed HOST to ADSL MIPS SDRAM address translation for relocatable images ++ * ++ * Revision 1.3 2002/09/07 01:43:59 ilyas ++ * Added support for OEM parameters ++ * ++ * Revision 1.2 2002/01/22 19:03:10 khp ++ * -put sdramBaseAddr at end of Xface struct ++ * ++ * Revision 1.1 2002/01/15 06:25:08 ilyas ++ * Initial implementation of ADSL core firmware ++ * ++ ****************************************************************************/ ++ ++#ifndef AdslXfaceDataHeader ++#define AdslXfaceDataHeader ++ ++#include "CircBuf.h" ++ ++typedef struct _AdslXfaceData { ++ stretchBufferStruct sbSta; ++ stretchBufferStruct sbCmd; ++ unsigned long gfcTable[15]; ++ void *sdramBaseAddr; ++} AdslXfaceData; ++ ++/* Shared SDRAM configuration data */ ++ ++#define kAdslOemVendorIdMaxSize 8 ++#define kAdslOemVersionMaxSize 32 ++#define kAdslOemSerNumMaxSize 32 ++#define kAdslOemNonStdInfoMaxSize 64 ++ ++typedef struct _AdslOemSharedData { ++ unsigned long g994VendorIdLen; ++ unsigned long g994XmtNonStdInfoLen; ++ unsigned long g994RcvNonStdInfoLen; ++ unsigned long eocVendorIdLen; ++ unsigned long eocVersionLen; ++ unsigned long eocSerNumLen; ++ unsigned char g994VendorId[kAdslOemVendorIdMaxSize]; ++ unsigned char eocVendorId[kAdslOemVendorIdMaxSize]; ++ unsigned char eocVersion[kAdslOemVersionMaxSize]; ++ unsigned char eocSerNum[kAdslOemSerNumMaxSize]; ++ unsigned char g994XmtNonStdInfo[kAdslOemNonStdInfoMaxSize]; ++ unsigned char g994RcvNonStdInfo[kAdslOemNonStdInfoMaxSize]; ++ char *gDslVerionStringPtr; ++ char *gDslBuildDataStringPtr; ++ unsigned long t1413VendorIdLen; ++ unsigned char t1413VendorId[kAdslOemVendorIdMaxSize]; ++ unsigned long t1413EocVendorIdLen; ++ unsigned char t1413EocVendorId[kAdslOemVendorIdMaxSize]; ++ unsigned long clEocBufLen; ++ unsigned char *clEocBufPtr; ++} AdslOemSharedData; ++ ++/* feature list */ ++ ++#define kAdslPhyAnnexA 0 ++#define kAdslPhyAnnexB 1 ++#define kAdslPhyAnnexC 2 ++#define kAdslPhySADSL 3 ++#define kAdslPhyAdsl2 4 ++#define kAdslPhyAdslG992p3 4 ++#define kAdslPhyAdsl2p 5 ++#define kAdslPhyAdslG992p5 5 ++#define kAdslPhyAnnexI 6 ++#define kAdslPhyAdslReAdsl2 7 ++#define kAdslPhyG992p2Init 8 ++#define kAdslPhyT1P413 9 ++ ++#define AdslFeatureSupported(fa,f) ((fa)[(f) >> 5] & (1 << ((f) & 0x1F))) ++#define AdslFeatureSet(fa,f) (fa)[(f) >> 5] |= (1 << ((f) & 0x1F)) ++ ++#endif /* AdslXfaceDataHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlankList.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlankList.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlankList.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlankList.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,87 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * BlankList.h ++ * ++ * Description: ++ * Definition and implementation (via macros and inline functions) ++ * of blank list - list of unused items of any size (not less than ++ * sizeof(void *) ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ *****************************************************************************/ ++ ++#ifndef BlankListHeader ++#define BlankListHeader ++ ++#define BlankListPeek(head) ((void *) (head)) ++#define BlankListNext(p) (*(void **) (p)) ++ ++#define BlankListAdd(pHead,p) do { \ ++ BlankListNext(p) = BlankListNext(pHead); \ ++ BlankListNext(pHead) = (void *) (p); \ ++} while (0) ++ ++#define BlankListAddList(pHead,pFirst,pLast) do { \ ++ if (NULL != (pLast)) { \ ++ BlankListNext(pLast) = BlankListNext(pHead); \ ++ BlankListNext(pHead) = (void *) (pFirst); \ ++ } \ ++} while (0) ++ ++#define BlankListGet(pHead) \ ++ BlankListNext(pHead); \ ++ { \ ++ void **__p; \ ++ __p = (void **) BlankListNext(pHead); \ ++ if (NULL != __p) \ ++ BlankListNext(pHead) = *__p; \ ++ } ++ ++ ++#define BlankListForEach(pHead,f,ref) do { \ ++ void *p = BlankListNext(pHead); \ ++ \ ++ while (NULL != p) { \ ++ if ( (f)((p), ref) ) break; \ ++ p = BlankListNext(p); \ ++ } \ ++} while (0) ++ ++ ++#include "Que.h" ++ ++#define BlankListAddQue(pHead,pqHdr) do { \ ++ if (NULL != ((QueHeader *)(pqHdr))->tail) { \ ++ BlankListNext(((QueHeader *)(pqHdr))->tail) = BlankListNext(pHead); \ ++ BlankListNext(pHead) = ((QueHeader *)(pqHdr))->head; \ ++ } \ ++} while (0) ++ ++#include "DList.h" ++ ++#define BlankListAddDList(pHead,pDListHead) do { \ ++ if (!DListEmpty(pDListHead)) { \ ++ BlankListNext(DListLast(pDListHead)) = BlankListNext(pHead); \ ++ BlankListNext(pHead) = DListFirst(pDListHead); \ ++ } \ ++} while (0) ++ ++#endif /* BlankListHeader */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlockUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlockUtil.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlockUtil.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlockUtil.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,235 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/* BlockUtil.h ++ * ++ * Description: ++ * This file contains the interfaces for the fixed point block ++ * processing utilities. ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.23 $ ++ * ++ * $Id: BlockUtil.h,v 1.23 2004/04/13 00:31:10 ilyas Exp $ ++ * ++ * $Log: BlockUtil.h,v $ ++ * Revision 1.23 2004/04/13 00:31:10 ilyas ++ * Added standard header for shared ADSL driver files ++ * ++ * Revision 1.22 2003/07/11 01:49:01 gsyu ++ * Added BlockShortClearByLong to speed up performance ++ * ++ * Revision 1.21 2003/07/10 22:35:23 gsyu ++ * Speed up BlockByteXXX performance ++ * ++ * Revision 1.20 2003/07/10 22:15:51 gsyu ++ * Added BlockByteMoveByWord to speed up performance ++ * ++ * Revision 1.19 2002/03/12 00:03:03 yongbing ++ * Modify cplxScaleCplxSymbols to accept a shift value instead of an array of shifts ++ * ++ * Revision 1.18 2001/03/14 00:50:25 georgep ++ * All targets use FEQ_PASS_FFTSHIFT, remove code for case where its not defined ++ * ++ * Revision 1.17 2000/11/30 03:54:09 khp ++ * -BlockRealScaleCplxSymbols instead of BlockScaleComplexSymbols ++ * ++ * Revision 1.16 2000/11/29 20:42:12 liang ++ * Add function for ADSL xmt gains with fixed shift. ++ * ++ * Revision 1.15 2000/10/02 19:24:08 georgep ++ * Modify FEQ for new fft, fft outputs a shift for each block ++ * ++ * Revision 1.14 2000/09/09 00:23:48 liang ++ * Add corresponding functions for the ComplexLong FEQ coef. ++ * ++ * Revision 1.13 2000/05/17 01:36:52 yongbing ++ * Add Pentium MMX assembly codes for more block related functions ++ * ++ * Revision 1.12 2000/04/19 19:22:22 yongbing ++ * Add BlockShortScaleby2 function used in G994p1 ++ * ++ * Revision 1.11 2000/04/04 02:28:01 liang ++ * Merged with SoftDsl_0_2 from old tree. ++ * ++ * Revision 1.11 2000/03/14 23:29:01 yongbing ++ * Add Pentim MMX codes for BlockCplxSymbolUpdateCplxScale function ++ * ++ * Revision 1.10 2000/02/16 01:53:00 yongbing ++ * Add Pentium MMX module for FEQ ++ * ++ * Revision 1.9 1999/11/02 02:49:55 liang ++ * Add BlockComplexPower function. ++ * ++ * Revision 1.8 1999/08/05 19:42:34 liang ++ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. ++ * ++ * Revision 1.7 1999/06/16 00:54:39 liang ++ * BlockRealScaleComplexSymbols takes a scale shift buffer now. ++ * ++ * Revision 1.6 1999/05/22 02:18:29 liang ++ * Add one more parameter to BlockCplxSymbolUpdateCplxScale function. ++ * ++ * Revision 1.5 1999/05/14 22:49:39 liang ++ * Added two more functions. ++ * ++ * Revision 1.4 1999/03/26 03:29:57 liang ++ * Add function BlockComplexMultLongAcc. ++ * ++ * Revision 1.3 1999/02/22 22:40:59 liang ++ * BlockByteSum takes uchar inputs instead of schar. ++ * ++ * Revision 1.2 1999/02/10 01:56:44 liang ++ * Added BlockByteSum, BlockRealScaleComplexSymbols and BlockCplxScaleComplexSymbols. ++ * ++ * Revision 1.1 1998/10/28 01:35:38 liang ++ * *** empty log message *** ++ * ++ * Revision 1.12 1998/07/08 17:09:25 scott ++ * Removed unnecessary undefs ++ * ++ * Revision 1.11 1998/04/02 06:19:44 mwg ++ * Added two new utilities. ++ * ++ * Revision 1.10 1998/03/26 23:20:55 liang ++ * Added function BlockShortMultiply. ++ * ++ * Revision 1.9 1998/02/16 18:41:00 scott ++ * Added MMX autodetect support ++ * ++ * Revision 1.8 1997/12/13 06:11:35 mwg ++ * Added new functions: ++ * BlockLongSubtract() ++ * BlockLongAdd() ++ * BlockLong2ShortSubtract() ++ * BlockShort2LongMove() ++ * BlockShortInterpolate() ++ * BlockLongCorrelate() ++ * BlockMapShort2Short() ++ * ++ * Revision 1.7 1997/03/19 18:35:10 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.6 1997/02/11 00:08:18 mwg ++ * Added BlockByteMove function ++ * ++ * Revision 1.5 1997/02/04 08:40:08 mwg ++ * Changed interface forBlockReal2ComplexMacc() ++ * ++ * Revision 1.4 1997/01/23 02:04:28 mwg ++ * Added return value to BlockShortMove ++ * ++ * Revision 1.3 1996/12/19 22:34:55 mwg ++ * Added new function BlockFullPower(). ++ * ++ * Revision 1.2 1996/02/21 03:59:15 mwg ++ * Added new function BlockReal2ComplexMacc ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.5 1995/04/04 06:09:32 mwg ++ * Changed the SoftModem status reporting: now the status is a structure/union ++ * where different fields used for different status code. This will enable ++ * efficient status snooping for high level protocols on top of the softmodem. ++ * ++ */ ++ ++#ifndef BlockUtilPh ++#define BlockUtilPh ++ ++extern void BlockLongAdd (int, long*, long*, long*); ++extern void BlockLong2ShortSubtract (int, long*, long*, short*); ++extern void BlockShort2LongMove (int, short*, long*); ++extern void BlockShortMultiply (int, int, short*, short*, short*); ++extern void BlockByteMoveUnaligned (int size, uchar *srcPtr, uchar *dstPtr); ++extern void BlockShortOffset (int, short, short*, short*); ++extern long BlockShortInterpolateWithIncrement (int size, long scaleFactor, long increment, int shift, short* src1Ptr, short* src2Ptr, short* dstPtr); ++extern void BlockReal2ComplexMult (int, short*, ComplexShort*, ComplexShort*); ++extern void BlockComplexConjigateMult (int, ComplexShort*, ComplexShort*, ComplexShort*); ++ ++extern long BlockSum (int, short*); ++extern long BlockByteSum (int, uchar*); ++extern void BlockComplexSum (int, ComplexShort*, ComplexLong*); ++extern void BlockComplexPower (int, int, ComplexShort*, long*); ++extern long BlockFullPower (int, short*); ++extern long BlockLongCorrelate (int, long*, long*); ++ ++extern int BlockSymbol2Byte (int, int, ushort*, uchar*); ++extern int BlockByte2Symbol (int, int, uchar*, ushort*); ++ ++extern void BlockMapShort2Complex (int, ushort*, ComplexByte*, ComplexShort*); ++extern void BlockMapShort2Short (int size, ushort *srcPtr, short *mapPtr, short *dstPtr); ++extern void BlockMapByte2Byte (int size, uchar *srcPtr, uchar *mapPtr, uchar *dstPtr); ++extern void BlockMapByte2Short (int size, uchar *srcPtr, short *mapPtr, short *dstPtr); ++extern void BlockShortMult (int size, int shift, short* src1Ptr, short* src2Ptr, short* dstPtr); ++ ++extern int SM_DECL Idle(void); ++ ++extern void BlockGenerateAngles(int size, ComplexShort *anglePtr, ComplexShort *incPtr, ComplexShort *dstPtr); ++extern void BlockExtractRealPart(int size, ComplexShort *srcPtr, short *dstPtr); ++extern void BlockShortScaleByShift (int size, int shift, short* srcPtr, short* dstPtr); ++ ++#ifndef PENTIUM_REDEFS /* only if these have not been redefined to function pointers */ ++extern long BlockPower (int, short*); ++extern void BlockReal2ComplexMacc (int, int, short*, ComplexShort*, ComplexLong*); ++extern void BlockComplexMult (int, ComplexShort*, ComplexShort*, ComplexShort*); ++extern void BlockShortScale (int, short, int, short*, short*); ++extern int SM_DECL BlockShortMove (int, short*, short*); ++extern long BlockCorrelate (int, short*, short*); ++ ++extern void BlockRealScaleComplexSymbols(int, int, uchar*, short*, ComplexShort*, ComplexShort*); ++/* FIXME -- the following 3 functions can be removed */ ++extern void BlockCplxScaleComplexSymbols(int, int, int, ComplexShort*, ComplexShort*, ComplexShort*); ++extern void BlockCplxSymbolUpdateCplxScale(int, int, int, uchar*, ComplexShort*, ++ ComplexShort*, ComplexShort*, ComplexShort*); ++extern void BlockComplexShortFill (int, short, short, ComplexShort*); ++ ++ ++extern void BlockRealScaleCplxSymbols(int, int, int, short*, ComplexShort*, ComplexShort*); ++extern void BlockCplxLongConjigateMultCplxShort(int, ComplexLong*, ComplexShort*, ComplexLong*); ++ ++extern void BlockCplxLongScaleCplxSymbols(int, int, int, ComplexLong*, ComplexShort*, short*, ComplexShort*); ++extern void BlockCplxSymbolUpdateCplxLongScale(int, int, int, int, ++ ComplexShort*, short *, ComplexLong*, ComplexShort*); ++ ++extern void BlockComplexLongFill (int, long, long, ComplexLong*); ++ ++extern void BlockShortSubtract (int, short*, short*, short*); ++extern void BlockLongSubtract (int, long*, long*, long*); ++extern void BlockShortAdd (int, short*, short*, short*); ++extern void BlockByteMove (int, uchar*, uchar*); ++extern void BlockByteMoveByLong (int, uchar*, uchar*); ++extern void SM_DECL BlockByteFill (int, uchar, uchar*); ++extern void BlockByteFillByLong (int, uchar, uchar*); ++extern void BlockByteClear (int, uchar*); ++extern void BlockByteClearByLong (int, uchar*); ++extern void BlockShortFill (int, short, short*); ++extern void BlockShortClear (int, short*); ++extern void BlockShortClearByLong (int, short*); ++extern void BlockLongFill (int, long, long*); ++extern void BlockLongClear (int, long*); ++extern void BlockComplexShortClear (int, ComplexShort*); ++extern void BlockShortInvert (int, short*, short*); ++extern void BlockShortScaleDown (int, short*); ++extern void BlockLongMove (int, long*, long*); ++extern void BlockShortInterpolate (int, short, int, short*, short*, short*); ++extern void BlockComplexMultLongAcc (int, int, ComplexShort*, ComplexShort*, ComplexLong*); ++ ++#endif ++ ++#endif /* BlockUtilPh */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/CircBuf.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/CircBuf.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/CircBuf.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/CircBuf.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,217 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * CircBuf -- Generic Circular Buffer ++ * ++ * Description: ++ * Implementation of generic circular buffer algorithms ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.14 $ ++ * ++ * $Id: CircBuf.h,v 1.14 2004/06/24 03:10:37 ilyas Exp $ ++ * ++ * $Log: CircBuf.h,v $ ++ * Revision 1.14 2004/06/24 03:10:37 ilyas ++ * Added extra macro to be able to use un-cached variable (for status write) ++ * ++ * Revision 1.13 2004/02/09 23:47:02 ilyas ++ * Fixed last change ++ * ++ * Revision 1.12 2004/02/06 22:52:58 ilyas ++ * Improved stretch buffer write ++ * ++ * Revision 1.11 2002/12/30 23:27:55 ilyas ++ * Added macro for HostDma optimizations ++ * ++ * Revision 1.10 2002/10/26 02:15:02 ilyas ++ * Optimized and added new macros for HostDma ++ * ++ * Revision 1.9 2002/01/22 23:59:29 ilyas ++ * Added paraenthesis around macro argument ++ * ++ * Revision 1.8 2002/01/15 22:28:38 ilyas ++ * Extended macro to support readPtr from uncached address ++ * ++ * Revision 1.7 2001/09/21 19:47:05 ilyas ++ * Fixed compiler warnings for VxWorks build ++ * ++ * Revision 1.6 2001/06/07 18:47:56 ilyas ++ * Added more macros for circular buffer arithmetics ++ * ++ * Revision 1.5 2001/04/18 03:58:34 ilyas ++ * Added LOG file write granularity ++ * ++ * Revision 1.4 2001/01/19 04:34:12 ilyas ++ * Added more macros to circular buffer implementation ++ * ++ * Revision 1.3 2001/01/06 04:01:41 ilyas ++ * Changed the way we write status messages ++ * ++ * Revision 1.2 2001/01/04 05:52:21 ilyas ++ * Added implementation of stretchable circular buffer used in LOG and Status ++ * handlers ++ * ++ * Revision 1.1 2000/05/03 03:45:55 ilyas ++ * Original implementation ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef CircBufHeader_H_ ++#define CircBufHeader_H_ ++ ++ ++typedef struct { ++ char *pStart; ++ char *pEnd; ++ char *pRead; ++ char *pWrite; ++} circBufferStruct; ++ ++/* Initialize circular buffer */ ++ ++#define CircBufferInit(pCB,buf,size) do { \ ++ (pCB)->pStart = (char *) (buf); \ ++ (pCB)->pRead = (pCB)->pWrite = (pCB)->pStart; \ ++ (pCB)->pEnd = (pCB)->pStart + size; \ ++} while (0) ++ ++#define CircBufferGetSize(pCB) ((pCB)->pEnd - (pCB)->pStart) ++#define CircBufferGetStartPtr(pCB) ((void *) (pCB)->pStart) ++#define CircBufferGetEndPtr(pCB) ((void *) (pCB)->pEnd) ++ ++#define CircBufferReset(pCB) (pCB)->pRead = (pCB)->pWrite = (pCB)->pStart ++ ++ ++#define CircBufferGetReadPtr(pCB) ((void *) (pCB)->pRead) ++#define CircBufferGetWritePtr(pCB) ((void *) (pCB)->pWrite) ++ ++ ++#ifndef bcm47xx ++#define CircBufferDistance(pCB,p1,p2,d) ((char*)(p2) - (char*)(p1) - d >= 0 ? \ ++ (char*)(p2) - (char*)(p1) - d : \ ++ ((char*)(p2)- (char*)(p1) - d + ((pCB)->pEnd - (pCB)->pStart))) ++ ++#define CircBufferAddContig(pCB,p,n) ((char*)(p) + (n) == (pCB)->pEnd ? (pCB)->pStart : (char*)(p) + (n)) ++#else ++static __inline int CircBufferDistance(circBufferStruct *pCB, char *p1, char *p2, int d) ++{ ++ int tmp = p2 - p1 - d; ++ ++ return (tmp >= 0 ? tmp : tmp + (pCB->pEnd - pCB->pStart)); ++} ++ ++static __inline char * CircBufferAddContig(circBufferStruct *pCB, char *p, int n) ++{ ++ p += n; ++ return (p == pCB->pEnd ? pCB->pStart : p); ++} ++#endif ++ ++#define CircBufferAdd(pCB,p,n) ((char*)(p) + (n) >= (pCB)->pEnd ? \ ++ (pCB)->pStart + ((char*)(p) + (n) - (pCB)->pEnd) : \ ++ (char*)(p) + (n)) ++ ++#define CircBufferReadUpdate(pCB,n) (pCB)->pRead = CircBufferAdd(pCB,(pCB)->pRead,n) ++#define CircBufferWriteUpdate(pCB,n) (pCB)->pWrite= CircBufferAdd(pCB,(pCB)->pWrite,n) ++ ++#define CircBufferReadUpdateContig(pCB,n) (pCB)->pRead = CircBufferAddContig(pCB,(pCB)->pRead,n) ++#define CircBufferWriteUpdateContig(pCB,n) (pCB)->pWrite= CircBufferAddContig(pCB,(pCB)->pWrite,n) ++ ++#define CircBufferGetReadAvail(pCB) CircBufferDistance(pCB,(pCB)->pRead,(pCB)->pWrite,0) ++#define CircBufferIsReadEmpty(pCB) ((pCB)->pRead == (pCB)->pWrite) ++#define CircBufferGetWriteAvail(pCB) CircBufferDistance(pCB,(pCB)->pWrite,(pCB)->pRead,1) ++#define CircBufferGetWriteAvailN(pCB,n) CircBufferDistance(pCB,(pCB)->pWrite,(pCB)->pRead,n) ++ ++#define CircBufferGetReadContig(pCB) ((unsigned long)(pCB)->pWrite >= (unsigned long) (pCB)->pRead ? \ ++ (pCB)->pWrite - (pCB)->pRead : \ ++ (pCB)->pEnd - (pCB)->pRead) ++ ++#define CircBufferGetWriteContig(pCB) ((pCB)->pEnd - (pCB)->pWrite > CircBufferGetWriteAvail(pCB) ? \ ++ CircBufferGetWriteAvail(pCB) : \ ++ (pCB)->pEnd - (pCB)->pWrite) ++ ++/* ++** ++** structure and macros for "strectch" buffer ++** ++*/ ++ ++typedef struct { ++ char *pStart; ++ char *pEnd; ++ char *pExtraEnd; ++ char *pStretchEnd; ++ char *pRead; ++ char *pWrite; ++} stretchBufferStruct; ++ ++#define StretchBufferInit(pSB,buf,size,extra) do { \ ++ (pSB)->pStart = (char *) (buf); \ ++ (pSB)->pRead = (pSB)->pWrite = (pSB)->pStart; \ ++ (pSB)->pEnd = (pSB)->pStart + (size); \ ++ (pSB)->pStretchEnd = (pSB)->pEnd; \ ++ (pSB)->pExtraEnd = (pSB)->pEnd+(extra); \ ++} while (0) ++ ++#define StretchBufferGetSize(pSB) ((pSB)->pEnd - (pSB)->pStart) ++#define StretchBufferGetStartPtr(pSB) ((void *) (pSB)->pStart) ++#define StretchBufferGetReadPtr(pSB) ((void *) (pSB)->pRead) ++#define StretchBufferGetWritePtr(pSB) ((void *) (pSB)->pWrite) ++#define StretchBufferReset(pSB) ((pSB)->pRead = (pSB)->pWrite = (pSB)->pStart) ++ ++#define StretchBufferGetReadToEnd(pSB) ((pSB)->pStretchEnd - (pSB)->pRead) ++ ++#define StretchBufferGetReadAvail(pSB) ((pSB)->pWrite - (pSB)->pRead >= 0 ? \ ++ (pSB)->pWrite - (pSB)->pRead : \ ++ (pSB)->pStretchEnd - (pSB)->pRead) ++#define _StretchBufferGetWriteAvail(pSB,rd) ((rd) - (pSB)->pWrite > 0 ? \ ++ (rd) - (pSB)->pWrite - 1 : \ ++ ((pSB)->pExtraEnd - (pSB)->pWrite)) ++#define StretchBufferGetWriteAvail(pSB) _StretchBufferGetWriteAvail(pSB, (pSB)->pRead) ++ ++#define StretchBufferReadUpdate(pSB,n) do { \ ++ char *p; \ ++ \ ++ p = (pSB)->pRead + (n); \ ++ (pSB)->pRead = (p >= (pSB)->pStretchEnd ? (pSB)->pStart : p); \ ++} while (0) ++ ++#define _StretchBufferWriteUpdate(pSB,rd,n) do { \ ++ char *p; \ ++ \ ++ p = (pSB)->pWrite + (n); \ ++ if (p >= (pSB)->pEnd) { \ ++ if ((rd) != (pSB)->pStart) { \ ++ (pSB)->pStretchEnd = p; \ ++ (pSB)->pWrite = (pSB)->pStart; \ ++ } \ ++ } \ ++ else \ ++ (pSB)->pWrite = p; \ ++} while (0) ++ ++#define StretchBufferWriteUpdate(pSB,n) _StretchBufferWriteUpdate(pSB,(pSB)->pRead,n) ++ ++#endif /* CircBufHeader_H_ */ ++ ++ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DList.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DList.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DList.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DList.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,131 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * DList.h ++ * ++ * Description: ++ * Definition and implementation (via macros and inline functions) ++ * of double-linked list ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ *****************************************************************************/ ++ ++#ifndef DListHeader_H_ ++#define DListHeader_H_ ++ ++typedef struct _DListHeader ++ { ++ struct _DListHeader *next; /* next item in the list */ ++ struct _DListHeader *prev; /* prev item in the list */ ++ } DListHeader; ++ ++typedef struct _DListUpHeader ++ { ++ struct _DListUpHeader *next; /* next item in the list */ ++ struct _DListUpHeader *prev; /* prev item in the list */ ++ struct _DListUpHeader *head; /* head of the list */ ++ } DListUpHeader; ++ ++/* Double linked list DList management macros */ ++ ++#define DListInit(pDListHead) do { \ ++ ((DListHeader *)(pDListHead))->next = pDListHead; \ ++ ((DListHeader *)(pDListHead))->prev = pDListHead; \ ++} while (0) ++ ++#define DListNext(pDListEntry) (((DListHeader *)(pDListEntry))->next) ++#define DListPrev(pDListEntry) (((DListHeader *)(pDListEntry))->prev) ++ ++#define DListEntryLinked(pDListEntry) (NULL != DListNext(pDListEntry)) ++#define DListUnlinkEntry(pDListEntry) (DListNext(pDListEntry) = DListPrev(pDListEntry) = NULL) ++ ++#define DListFirst(pDListHead) DListNext(pDListHead) ++#define DListLast(pDListHead) DListPrev(pDListHead) ++#define DListValid(pDListHead,pEntry) ((void *)(pDListHead) != (pEntry)) ++#define DListEmpty(pDListHead) ((void *)pDListHead == ((DListHeader *)pDListHead)->next) ++ ++#define DListInsertAfter(pDListEntry,pEntry) do { \ ++ ((DListHeader *)(pEntry))->next = ((DListHeader *)(pDListEntry))->next; \ ++ ((DListHeader *)(pEntry))->prev = (DListHeader *)(pDListEntry); \ ++ ((DListHeader *)(pDListEntry))->next->prev = (DListHeader *) (pEntry); \ ++ ((DListHeader *)(pDListEntry))->next = (DListHeader *) (pEntry); \ ++} while (0) ++ ++#define DListInsertBefore(pDListEntry,pEntry) do { \ ++ ((DListHeader *)(pEntry))->next = (DListHeader *)(pDListEntry); \ ++ ((DListHeader *)(pEntry))->prev = ((DListHeader *)(pDListEntry))->prev; \ ++ ((DListHeader *)(pDListEntry))->prev->next = (DListHeader *) (pEntry); \ ++ ((DListHeader *)(pDListEntry))->prev = (DListHeader *) (pEntry); \ ++} while (0) ++ ++#define DListInsertTail(pDListHead,pEntry) DListInsertBefore(pDListHead,pEntry) ++#define DListInsertHead(pDListHead,pEntry) DListInsertAfter(pDListHead,pEntry) ++ ++#define DListRemove(pDListEntry) do { \ ++ ((DListHeader *)(pDListEntry))->prev->next = ((DListHeader *)(pDListEntry))->next; \ ++ ((DListHeader *)(pDListEntry))->next->prev = ((DListHeader *)(pDListEntry))->prev; \ ++} while (0) ++ ++ ++#define DListForEach(pDListHead,f,ref) do { \ ++ DListHeader *p = ((DListHeader *)(pDListHead))->next; \ ++ \ ++ while (DListValid(pDListHead,p)) { \ ++ DListHeader *p0 = p; \ ++ p = DListNext(p); \ ++ if ( (f)((void *)p0, ref) ) break; \ ++ } \ ++} while (0) ++ ++ ++/* Double linked list with up link DListUp management macros */ ++ ++#define DListUpInit(pDListHead) do { \ ++ ((DListUpHeader *)(pDListHead))->next = (DListUpHeader *) (pDListHead); \ ++ ((DListUpHeader *)(pDListHead))->prev = (DListUpHeader *) (pDListHead); \ ++ ((DListUpHeader *)(pDListHead))->head = (DListUpHeader *) (pDListHead); \ ++} while (0) ++ ++#define DListUpNext(pDListEntry) ((DListUpHeader *) DListNext(pDListEntry)) ++#define DListUpPrev(pDListEntry) ((DListUpHeader *) DListPrev(pDListEntry)) ++#define DListUpHead(pDListEntry) (((DListUpHeader *)(pDListEntry))->head) ++ ++#define DListUpFirst(pDListHead) DListUpNext(pDListHead) ++#define DListUpLast(pDListHead) DListUpPrev(pDListHead) ++#define DListUpValid(pEntry) (((DListUpHeader *)(pEntry))->head != (void *) pEntry) ++#define DListUpEmpty(pDListHead) DListEmpty(pDListHead) ++ ++#define DListUpInsertAfter(pDListEntry,pEntry) do { \ ++ DListInsertAfter(pDListEntry,pEntry); \ ++ ((DListUpHeader *)(pEntry))->head = ((DListUpHeader *)(pDListEntry))->head; \ ++} while (0) ++ ++#define DListUpInsertBefore(pDListEntry,pEntry) do { \ ++ DListInsertBefore(pDListEntry,pEntry); \ ++ ((DListUpHeader *)(pEntry))->head = ((DListUpHeader *)(pDListEntry))->head; \ ++} while (0) ++ ++#define DListUpInsertTail(pDListHead,pEntry) DListUpInsertBefore(pDListHead,pEntry) ++#define DListUpInsertHead(pDListHead,pEntry) DListUpInsertAfter(pDListHead,pEntry) ++ ++#define DListUpRemove(pDListEntry) DListRemove(pDListEntry) ++#define DListUpForEach(pDListHead,f,ref) DListForEach((DListHeader *)(pDListHead),f,ref) ++ ++#endif /* DListHeader_H_ */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DslFramer.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DslFramer.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DslFramer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DslFramer.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,159 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * DslFramer.h ++ * ++ * Description: ++ * This file contains common DSL framer definitions ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.3 $ ++ * ++ * $Id: DslFramer.h,v 1.3 2004/07/21 01:39:41 ilyas Exp $ ++ * ++ * $Log: DslFramer.h,v $ ++ * Revision 1.3 2004/07/21 01:39:41 ilyas ++ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK ++ * ++ * Revision 1.2 2004/04/12 23:41:10 ilyas ++ * Added standard header for shared ADSL driver files ++ * ++ * Revision 1.1 2001/12/13 02:28:27 ilyas ++ * Added common framer (DslPacket and G997) and G997 module ++ * ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef DslFramerHeader ++#define DslFramerHeader ++ ++#include "DList.h" ++ ++#define kDslFramerInitialized 0x80000000 ++ ++/* status codes */ ++ ++#define kDslFramerRxFrame 1 ++#define kDslFramerRxFrameErr 2 ++#define kDslFramerTxFrame 3 ++#define kDslFramerTxFrameErr 4 ++ ++#define kDslFramerRxFrameErrFlushed 1 ++#define kDslFramerRxFrameErrAbort 2 ++#define kDslFramerRxFrameErrPhy 3 ++ ++#define kDslFramerTxFrameErrFlushed 1 ++ ++ ++typedef struct _dslFramerBufDesc { ++ long pkId; ++ long bufFlags; ++ void *bufPtr; ++ long bufLen; ++} dslFramerBufDesc; ++ ++/* data bufDesc flags */ ++ ++#define kDslFramerStartNewFrame 1 ++#define kDslFramerEndOfFrame 2 ++#define kDslFramerAbortFrame 4 ++ ++#define kDslFramerExtraByteShift 3 ++#define kDslFramerExtraByteMask (0x7 << kDslFramerExtraByteShift) ++ ++typedef struct _dslFramerControl { ++ bitMap setup; ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslStatusHandlerType statusHandlerPtr; ++ ulong statusCode; ++ ulong statusOffset; ++ ++ int nRxBuffers; ++ int nRxBufSize; ++ int nRxPackets; ++ ++ dslFrame *freeBufListPtr; ++ void *freeBufPool; ++ void *pBufMemory; ++ ++ dslFrame *freePacketListPtr; ++ void *freePacketPool; ++ ++ /* RX working data set */ ++ ++ dslFrame *pRxFrame; ++ dslFrameBuffer *pRxBuf; ++ uchar *pRxBufData; ++ uchar *pRxBufDataEnd; ++ int rxFrameLen; ++ ++ /* TX working data set */ ++ ++ DListHeader dlistTxWaiting; ++ dslFrame *pTxFrame; ++ dslFrameBuffer *pTxBuf; ++ uchar *pTxBufData; ++ uchar *pTxBufDataEnd; ++ ++ /* stats data */ ++ ++ ulong dslByteCntRxTotal; ++ ulong dslByteCntTxTotal; ++ ++ ulong dslFrameCntRxTotal; ++ ulong dslFrameCntRxErr; ++ ulong dslFrameCntTxTotal; ++ ++} dslFramerControl; ++ ++ ++extern Boolean DslFramerInit( ++ void *gDslVars, ++ dslFramerControl *dfCtrl, ++ bitMap setup, ++ ulong statusCode, ++ ulong statusOffset, ++ dslFrameHandlerType rxIndicateHandlerPtr, ++ dslFrameHandlerType txCompleteHandlerPtr, ++ dslStatusHandlerType statusHandlerPtr, ++ ulong rxBufNum, ++ ulong rxBufSize, ++ ulong rxPacketNum); ++extern void DslFramerClose(void *gDslVars, dslFramerControl *dfCtrl); ++extern void DslFramerSendFrame(void *gDslVars, dslFramerControl *dfCtrl, dslFrame *pFrame); ++extern void DslFramerReturnFrame(void *gDslVars, dslFramerControl *dfCtrl, dslFrame *pFrame); ++ ++ ++extern Boolean DslFramerRxGetPtr(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); ++extern void DslFramerRxDone (void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); ++extern Boolean DslFramerTxGetPtr(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); ++extern void DslFramerTxDone(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); ++extern Boolean DslFramerTxIdle (void *gDslVars, dslFramerControl *dfCtrl); ++extern void DslFramerTxFlush(void *gDslVars, dslFramerControl *dfCtrl); ++ ++extern void * DslFramerGetFramePoolHandler(dslFramerControl *dfCtrl); ++extern void DslFramerClearStat(dslFramerControl *dfCtrl); ++ ++extern void DslFramerRxFlushFrame (void *gDslVars, dslFramerControl *dfCtrl, int errCode); ++extern void DslFramerRxFlush(void *gDslVars, dslFramerControl *dfCtrl); ++ ++#endif /* DslFramerHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Flatten.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Flatten.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Flatten.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Flatten.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,115 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * Flatten.h -- Header for Flatten/Unflatten command/status ++ * ++ * Copyright (c) 1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.14 $ ++ * ++ * $Id: Flatten.h,v 1.14 2004/03/04 19:48:52 linyin Exp $ ++ * ++ * $Log: Flatten.h,v $ ++ * Revision 1.14 2004/03/04 19:48:52 linyin ++ * Support adsl2plus ++ * ++ * Revision 1.13 2003/10/17 22:45:14 yongbing ++ * Increase buffer size for large B&G table of G992P3 ++ * ++ * Revision 1.12 2003/08/12 23:16:26 khp ++ * - for Haixiang: added support for ADSL_MARGIN_TWEAK_TEST ++ * ++ * Revision 1.11 2003/02/27 06:33:03 ilyas ++ * Improved free space checking in command buffer (became a problem with ++ * 2 commands SetXmtgain and StartPhy) ++ * ++ * Revision 1.10 2003/01/11 01:27:07 ilyas ++ * Improved checking for available space in status buffer ++ * ++ * Revision 1.9 2002/09/07 01:43:59 ilyas ++ * Added support for OEM parameters ++ * ++ * Revision 1.8 2002/05/16 00:01:52 khp ++ * -added missing #endif ++ * ++ * Revision 1.7 2002/05/15 00:04:48 mprahlad ++ * increase the status buffer size - prevent memory overflow for annexC cases ++ * ++ * Revision 1.6 2002/04/05 04:10:33 linyin ++ * -hack to fit in Annex C firmware in LMEM ++ * ++ * Revision 1.5 2002/04/05 02:45:25 linyin ++ * Make the buffer side larger for annexC ++ * ++ * Revision 1.4 2002/01/30 07:19:06 ilyas ++ * Moved showtime code to LMEM ++ * ++ * Revision 1.3 2001/08/29 02:56:01 ilyas ++ * Added tests for flattening/unflatenning command and statuses (dual mode) ++ * ++ * Revision 1.2 2001/04/25 00:30:54 ilyas ++ * Adjusted MaxFrameLen ++ * ++ * Revision 1.1 2001/04/24 21:41:21 ilyas ++ * Implemented status flattening/unflattaning to transfer statuses between ++ * modules asynchronously through the circular buffer ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef _Flatten_H_ ++#define _Flatten_H_ ++ ++#include "CircBuf.h" ++ ++#ifdef ADSL_MARGIN_TWEAK_TEST ++#define kMaxFlattenedCommandSize 272 /* maximum no. of bytes in flattened cmd */ ++#else ++#define kMaxFlattenedCommandSize 128 /* maximum no. of bytes in flattened cmd */ ++#endif ++#if defined(G992_ANNEXC) || defined(G992P3) ++#if defined(G992P5) ++#define kMaxFlattenedStatusSize 2200 /* maximum no. of bytes in flattened status */ ++#else ++#define kMaxFlattenedStatusSize 1100 /* maximum no. of bytes in flattened status */ ++#endif ++#else ++#define kMaxFlattenedStatusSize 550 /* maximum no. of bytes in flattened status */ ++#endif ++ ++#define kMaxFlattenFramelength (kMaxFlattenedStatusSize - (4*sizeof(long)) - 20) ++ ++extern int SM_DECL FlattenCommand (dslCommandStruct *cmd, ulong *dstPtr, ulong nAvail); ++extern int SM_DECL UnflattenCommand(ulong *srcPtr, dslCommandStruct *cmd); ++extern int SM_DECL FlattenStatus (dslStatusStruct *status, ulong *dstPtr, ulong nAvail); ++extern int SM_DECL UnflattenStatus (ulong *srcPtr, dslStatusStruct *status); ++ ++#define FlattenBufferInit(fb,fbData,bufSize,itemSize) \ ++ StretchBufferInit(fb, fbData, bufSize, itemSize) ++ ++extern int SM_DECL FlattenBufferStatusWrite(stretchBufferStruct *fBuf, dslStatusStruct *status); ++extern int SM_DECL FlattenBufferStatusRead(stretchBufferStruct *fBuf, dslStatusStruct *status); ++ ++extern int SM_DECL FlattenBufferCommandWrite(stretchBufferStruct *fBuf, dslCommandStruct *cmd); ++extern int SM_DECL FlattenBufferCommandRead(stretchBufferStruct *fBuf, dslCommandStruct *cmd); ++ ++#define FlattenBufferReadComplete(fb,nBytes) \ ++ StretchBufferReadUpdate (fb, nBytes) ++ ++#endif /* _Flatten_H_ */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.gh +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.gh 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.gh 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,110 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * G992p3OvhMsg.gh ++ * ++ * Description: ++ * This is a header file which defines the type for the G992p3 overhead ++ * channel messages global variable structure. ++ * ++ * ++ * Copyright (c) 1999-2003 BroadCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.5 $ ++ * ++ * $Id: G992p3OvhMsg.gh,v 1.5 2004/09/11 03:52:25 ilyas Exp $ ++ * ++ * $Log: G992p3OvhMsg.gh,v $ ++ * Revision 1.5 2004/09/11 03:52:25 ilyas ++ * Added support for overhead message segmentation ++ * ++ * Revision 1.4 2004/07/07 01:27:20 ilyas ++ * Fixed OHC message stuck problem on L2 entry/exit ++ * ++ * Revision 1.3 2004/06/10 00:13:31 ilyas ++ * Added L2/L3 and SRA ++ * ++ * Revision 1.2 2004/04/12 23:34:52 ilyas ++ * Merged the latest ADSL driver chnages for ADSL2+ ++ * ++ * Revision 1.1 2003/07/18 19:39:18 ilyas ++ * Initial G.992.3 overhead channel message implementation (from ADSL driver) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef G992p3OvhMsgFramerGlobals ++#define G992p3OvhMsgFramerGlobals ++ ++#define kG992p3OvhMsgMaxCmdSize (16 + 16) ++#define kG992p3OvhMsgMaxRspSize (16 + 2*512) ++ ++typedef struct ++ { ++ dslFrame *segFrame; ++ dslFrameBuffer *segFrBufCur; ++ dslFrameBuffer segFrBuf; ++ ulong timeSegOut; ++ uchar tryCnt; ++ uchar segTotal; ++ uchar segId; ++ } ++ g992p3SegFrameCtlStruct; ++ ++typedef struct ++ { ++ bitMap setup; ++ dslFrameHandlerType rxReturnFramePtr; ++ dslFrameHandlerType txSendFramePtr; ++ dslCommandHandlerType cmdHandlerPtr; ++ dslStatusHandlerType statusHandlerPtr; ++ ++ dslFrame txRspFrame; ++ dslFrameBuffer txRspFrBuf; ++ dslFrameBuffer txRspFrBuf1; ++ uchar txRspBuf[kG992p3OvhMsgMaxRspSize]; ++ dslFrame txPwrRspFrame; ++ dslFrameBuffer txPwrRspFrBuf0; ++ dslFrameBuffer txPwrRspFrBuf0a; ++ dslFrameBuffer txPwrRspFrBuf1; ++ uchar txPwrRspBuf0[8]; ++ dslFrame txCmdFrame; ++ dslFrameBuffer txCmdFrBuf0; ++ dslFrameBuffer txCmdFrBuf0a; ++ dslFrameBuffer txCmdFrBuf1; ++ uchar txCmdBuf[kG992p3OvhMsgMaxCmdSize]; ++ g992p3SegFrameCtlStruct txSegFrameCtl; ++ ulong txFlags; ++ uchar txL0Rq; ++ uchar txL3Rq; ++ ++ ulong timeMs; ++ ulong timeCmdOut; ++ ulong cmdTryCnt; ++ ulong cmdNum; ++ ulong timeRspOut; ++ uchar *txPmdCmd; ++ ++ uchar rxCmdMsgNum; ++ uchar rxRspMsgNum; ++ uchar txCmdMsgNum; ++ uchar txRspMsgNum; ++ } ++ g992p3OvhMsgVarsStruct; ++ ++#endif /* G992p3OvhMsgFramerGlobals */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,64 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * G992p3OvhMsg.h ++ * ++ * Description: ++ * This file contains the exported functions and definitions for G992p3 ++ * overhead channel messages ++ * ++ * ++ * Copyright (c) 1999-2003 BroadCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.1 $ ++ * ++ * $Id: G992p3OvhMsg.h,v 1.1 2003/07/18 19:39:18 ilyas Exp $ ++ * ++ * $Log: G992p3OvhMsg.h,v $ ++ * Revision 1.1 2003/07/18 19:39:18 ilyas ++ * Initial G.992.3 overhead channel message implementation (from ADSL driver) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef G992p3OvhMsgFramerHeader ++#define G992p3OvhMsgFramerHeader ++ ++#define kG992p3OvhMsgFrameBufCnt -1 ++ ++extern Boolean G992p3OvhMsgInit( ++ void *gDslVars, ++ bitMap setup, ++ dslFrameHandlerType rxReturnFramePtr, ++ dslFrameHandlerType txSendFramePtr, ++ dslCommandHandlerType commandHandler, ++ dslStatusHandlerType statusHandler); ++ ++extern void G992p3OvhMsgReset(void *gDslVars); ++extern void G992p3OvhMsgClose(void *gDslVars); ++extern void G992p3OvhMsgTimer(void *gDslVars, long timeQ24ms); ++extern Boolean G992p3OvhMsgCommandHandler (void *gDslVars, dslCommandStruct *cmd); ++extern void G992p3OvhMsgStatusSnooper (void *gDslVars, dslStatusStruct *status); ++ ++extern int G992p3OvhMsgSendCompleteFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); ++extern int G992p3OvhMsgIndicateRcvFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); ++ ++extern void G992p3OvhMsgSetL3(void *gDslVars); ++extern void G992p3OvhMsgSetL0(void *gDslVars); ++ ++#endif /* G992p3OvhMsgFramerHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.gh +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.gh 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.gh 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,66 @@ ++/**************************************************************************** ++ * ++ * G997.gh ++ * ++ * Description: ++ * This is a header file which defines the type for the G997 Framer ++ * global variable structure. ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.5 $ ++ * ++ * $Id: G997.gh,v 1.5 2004/07/21 01:39:41 ilyas Exp $ ++ * ++ * $Log: G997.gh,v $ ++ * Revision 1.5 2004/07/21 01:39:41 ilyas ++ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK ++ * ++ * Revision 1.4 2004/04/27 00:27:16 ilyas ++ * Implemented double buffering to ensure G.997 HDLC frame is continuous ++ * ++ * Revision 1.3 2003/07/18 18:56:59 ilyas ++ * Added support for shared TX buffer (for ADSL driver) ++ * ++ * Revision 1.2 2002/01/11 06:48:27 ilyas ++ * Added command handler pointer ++ * ++ * Revision 1.1 2001/12/13 02:28:27 ilyas ++ * Added common framer (DslPacket and G997) and G997 module ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef G997FramerGlobals ++#define G997FramerGlobals ++ ++#include "DslFramer.h" ++#include "HdlcFramer.h" ++ ++#define kG997MsgBufSize 64 ++ ++typedef struct ++ { ++ bitMap setup; ++ dslFramerControl dslFramer; ++ hdlcByteControl hdlcByte; ++ dslCommandHandlerType commandHandler; ++ ++ ulong timeMs; ++ ulong timeCmdOut; ++ ++ uchar rxMsgNum; ++ uchar txMsgNum; ++ Boolean txIdle; ++ uchar txMsgBuf[kG997MsgBufSize]; ++ ulong txMsgBufLen; ++ uchar *txMsgBufPtr; ++ ulong txMsgLen; ++ ulong txMsgBufs; ++ ulong txMsgBufNum; ++ } ++ g997VarsStruct; ++ ++#endif /* G997FramerGlobals */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,68 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * G997.h ++ * ++ * Description: ++ * This file contains the exported functions and definitions for G97Framer ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.3 $ ++ * ++ * $Id: G997.h,v 1.3 2003/07/18 18:56:59 ilyas Exp $ ++ * ++ * $Log: G997.h,v $ ++ * Revision 1.3 2003/07/18 18:56:59 ilyas ++ * Added support for shared TX buffer (for ADSL driver) ++ * ++ * Revision 1.2 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.1 2001/12/13 02:28:27 ilyas ++ * Added common framer (DslPacket and G997) and G997 module ++ * ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef G997FramerHeader ++#define G997FramerHeader ++ ++extern Boolean G997Init( ++ void *gDslVars, ++ bitMap setup, ++ ulong rxBufNum, ++ ulong rxBufSize, ++ ulong rxPacketNum, ++ upperLayerFunctions *pUpperLayerFunctions, ++ dslCommandHandlerType g997PhyCommandHandler); ++ ++extern void G997Close(void *gDslVars); ++extern void G997Timer(void *gDslVars, long timeQ24ms); ++extern Boolean G997CommandHandler (void *gDslVars, dslCommandStruct *cmd); ++extern void G997StatusSnooper (void *gDslVars, dslStatusStruct *status); ++ ++extern int G997SendFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); ++extern int G997ReturnFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); ++ ++extern Boolean G997SetTxBuffer(void *gDslVars, ulong len, void *bufPtr); ++extern void * G997GetFramePoolHandler(void *gDslVars); ++ ++#endif /* G997FramerHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/HdlcFramer.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/HdlcFramer.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/HdlcFramer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/HdlcFramer.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,237 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * HdlcFramer.h ++ * ++ * Description: ++ * This file contains common HDLC definitions for bit/byte stuffing ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.3 $ ++ * ++ * $Id: HdlcFramer.h,v 1.3 2004/07/21 01:39:41 ilyas Exp $ ++ * ++ * $Log: HdlcFramer.h,v $ ++ * Revision 1.3 2004/07/21 01:39:41 ilyas ++ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK ++ * ++ * Revision 1.2 2003/07/18 18:51:05 ilyas ++ * Added mode (default) to pass address and control field ++ * ++ * Revision 1.1 2001/12/13 02:28:27 ilyas ++ * Added common framer (DslPacket and G997) and G997 module ++ * ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef HdlcFramerHeader ++#define HdlcFramerHeader ++ ++/* setup bitmap definitions */ ++ ++#define kHdlcSetupShift 16 ++#define kHdlcSetupMask ((long)0xFFFF << kHdlcSetupShift) ++ ++#define kHdlcCrcMask 0x00030000 ++#define kHdlcCrcNone 0x00000000 ++#define kHdlcCrc16 0x00010000 ++#define kHdlcCrc32 0x00020000 ++ ++#define kHdlcTxIdleStop 0x00040000 ++#define kHdlcSpecialAddrCtrl 0x00080000 ++ ++extern ushort HdlcCrc16Table[]; ++ ++#define HDLC16_CRC_INIT 0xFFFF ++#define HDLC16_CRC_FINAL(crc) ((crc) ^ 0xFFFF) ++#define HDLC16_GOOD_CRC 0xF0B8 ++#define Hdlc16UpdateCrc(crc,b) ((crc) >> 8) ^ HdlcCrc16Table[((crc) ^ (b)) & 0xFF] ++ ++extern ulong HdlcCrc32Table[]; ++ ++#define HDLC32_CRC_INIT 0xFFFFFFFF ++#define HDLC32_CRC_FINAL(crc) ((crc) ^ 0xFFFFFFFF) ++#define HDLC32_GOOD_CRC 0xDEBB20E3 ++#define Hdlc32UpdateCrc(crc,b) ((crc) >> 8) ^ HdlcCrc32Table[((crc) ^ (b)) & 0xFF] ++ ++extern ulong HdlcCrc32Table[]; ++ ++/* HDLC common fields */ ++ ++#define HDLC_ADDR 0xFF ++#define HDLC_CTRL 0x3 ++ ++#define HDLC_BYTE_FLAG 0x7E ++#define HDLC_BYTE_ESC 0x7D ++ ++/* HDLC frame assembly states */ ++ ++#define HDLC_STATE_START_FLAG 0 ++#define HDLC_STATE_ADDRESS (HDLC_STATE_START_FLAG + 1) ++#define HDLC_STATE_CONTROL (HDLC_STATE_START_FLAG + 2) ++#define HDLC_STATE_DATA (HDLC_STATE_START_FLAG + 3) ++#define HDLC_STATE_FCS1 (HDLC_STATE_START_FLAG + 4) ++#define HDLC_STATE_FCS2 (HDLC_STATE_START_FLAG + 5) ++#define HDLC_STATE_END_FLAG (HDLC_STATE_START_FLAG + 6) ++ ++ ++/* HDLC common types */ ++ ++typedef struct _hdlcByteControl { ++ bitMap setup; ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; ++ dslFramerDataDoneHandlerType rxDataDoneHandler; ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; ++ dslFramerDataDoneHandlerType txDataDoneHandler; ++ ++ /* RX working data set */ ++ ++ uchar rxFrameState; ++ int rxFrameLen; ++ ulong rxCrc; ++ Boolean rxEscChar; ++ ++ uchar *pRxData; ++ uchar *pRxDataEnd; ++ long rxDataLen; ++ ++ /* TX working data set */ ++ ++ uchar txFrameState; ++ int txFrameLen; ++ ulong txCrc; ++ int txCharPending; ++ ++ uchar *pTxData; ++ uchar *pTxDataEnd; ++ long txDataLen; ++} hdlcByteControl; ++ ++typedef struct _hdlcBitControl { ++ bitMap setup; ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; ++ dslFramerDataDoneHandlerType rxDataDoneHandler; ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; ++ dslFramerDataDoneHandlerType txDataDoneHandler; ++ ++ /* RX working data set */ ++ ++ uchar rxFrameState; ++ int rxFrameLen; ++ ulong rxCrc; ++ int rxNibblePending; ++ int rxOutVal; ++ uchar rxOutBits; ++ uchar rxRem1Bits; ++ Boolean rxEscChar; /* ???? */ ++ ++ uchar *pRxData; ++ uchar *pRxDataEnd; ++ long rxDataLen; ++ ++ /* TX working data set */ ++ ++ uchar txFrameState; ++ int txFrameLen; ++ ulong txCrc; ++ int txOutVal; ++ uchar txOutBits; ++ uchar txLast1Bits; ++ int txCharPending; /* ???? */ ++ ++ uchar *pTxData; ++ uchar *pTxDataEnd; ++ long txDataLen; ++} hdlcBitControl; ++ ++/* HDLC common functions */ ++ ++#define HdlcFramerTxFrameInit(ctrl) do { \ ++ ctrl->txFrameState = HDLC_STATE_START_FLAG; \ ++ ctrl->txFrameLen = 0; \ ++ ctrl->txCrc = HDLC16_CRC_INIT; \ ++ ctrl->txCharPending= -1; \ ++} while (0) ++ ++#define HdlcFramerRxFrameInit(ctrl) do { \ ++ ctrl->rxFrameState = HDLC_STATE_START_FLAG; \ ++ ctrl->rxFrameLen = 0; \ ++ ctrl->rxCrc = HDLC16_CRC_INIT; \ ++ ctrl->rxEscChar = false; \ ++} while (0) ++ ++#define HdlcFramerTxGetData(ctrl) do { \ ++ dslFramerBufDesc bufDesc; \ ++ \ ++ if ((ctrl->txDataGetPtrHandler) (gDslVars, &bufDesc)) { \ ++ ctrl->pTxData = bufDesc.bufPtr; \ ++ ctrl->pTxDataEnd = (uchar*)bufDesc.bufPtr + bufDesc.bufLen; \ ++ ctrl->txDataLen = bufDesc.bufLen; \ ++ if (bufDesc.bufFlags & kDslFramerStartNewFrame) \ ++ HdlcFramerTxFrameInit(ctrl); \ ++ } \ ++ else { \ ++ HdlcFramerTxFrameInit(ctrl); \ ++ } \ ++} while (0); ++ ++#define HdlcFramerRxGetData(ctrl, frFlag) do { \ ++ dslFramerBufDesc bufDesc; \ ++ \ ++ bufDesc.bufFlags = frFlag; \ ++ if ((ctrl->rxDataGetPtrHandler) (gDslVars, &bufDesc)) { \ ++ ctrl->pRxData = bufDesc.bufPtr; \ ++ ctrl->pRxDataEnd = (uchar*)bufDesc.bufPtr + bufDesc.bufLen; \ ++ ctrl->rxDataLen = bufDesc.bufLen; \ ++ } \ ++} while (0); ++ ++/* HDLC functions headers */ ++ ++extern Boolean HdlcByteInit( ++ void *gDslVars, ++ hdlcByteControl *hbyCtrl, ++ bitMap setup, ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler, ++ dslFramerDataDoneHandlerType rxDataDoneHandler, ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler, ++ dslFramerDataDoneHandlerType txDataDoneHandler); ++ ++extern void HdlcByteReset(void *gDslVars, hdlcByteControl *hbyCtrl); ++extern void HdlcByteRxFlush(void *gDslVars, hdlcByteControl *hbyCtrl); ++extern int HdlcByteRx(void *gDslVars, hdlcByteControl *hbyCtrl, int nBytes, uchar *srcPtr) FAST_TEXT; ++extern int HdlcByteTx(void *gDslVars, hdlcByteControl *hbyCtrl, int nBytes, uchar *dstPtr) FAST_TEXT; ++extern Boolean HdlcByteTxIdle(void *gDslVars, hdlcByteControl *hbyCtrl); ++ ++extern Boolean HdlcBitInit( ++ void *gDslVars, ++ hdlcBitControl *hbiCtrl, ++ bitMap setup, ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler, ++ dslFramerDataDoneHandlerType rxDataDoneHandler, ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler, ++ dslFramerDataDoneHandlerType txDataDoneHandler); ++ ++extern void HdlcBitReset(void *gDslVars, hdlcByteControl *hbiCtrl); ++extern int HdlcBitRx(void *gDslVars, hdlcBitControl *hbiCtrl, int nBytes, uchar *srcPtr) FAST_TEXT; ++extern int HdlcBitTx(void *gDslVars, hdlcBitControl *hbiCtrl, int nBytes, uchar *dstPtr) FAST_TEXT; ++ ++#endif /* HdlcFramerHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MathUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MathUtil.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MathUtil.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MathUtil.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,135 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/************************************************************************ ++ * ++ * MathUtil.h: ++ * ++ * Description: ++ * This file contains the exported interface for MathUtil.c module. ++ * ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.6 $ ++ * ++ * $Id: MathUtil.h,v 1.6 2004/04/13 00:21:13 ilyas Exp $ ++ * ++ * $Log: MathUtil.h,v $ ++ * Revision 1.6 2004/04/13 00:21:13 ilyas ++ * Added standard header for shared ADSL driver files ++ * ++ * Revision 1.5 2001/08/16 02:18:08 khp ++ * - mark functions with FAST_TEXT to reduce cycle counts for QPROC targets ++ * (replaces use of LMEM_INSN) ++ * ++ * Revision 1.4 1999/10/06 04:55:22 liang ++ * Added function to multiply two long values to save result as VeryLong. ++ * ++ * Revision 1.3 1999/08/05 19:42:52 liang ++ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. ++ * ++ * Revision 1.2 1999/03/26 03:29:59 liang ++ * Export CosSin table. ++ * ++ * Revision 1.1 1998/10/28 01:28:07 liang ++ * *** empty log message *** ++ * ++ * Revision 1.12 1998/02/10 17:19:49 scott ++ * Changed MathVL routines to return arguments using pointers ++ * ++ * Revision 1.11 1997/12/13 06:12:07 mwg ++ * Added more Atan2 flavors ++ * ++ * Revision 1.10 1997/11/18 01:11:48 mwg ++ * Removed <CR> symbols which accidently slipped in. ++ * ++ * Revision 1.9 1997/11/03 19:07:52 scott ++ * No longer redefine max() and min() if already defined ++ * ++ * Revision 1.8 1997/07/30 01:35:20 liang ++ * Add more accurate atan2 function UtilLongLongAtan2. ++ * ++ * Revision 1.7 1997/07/21 20:23:19 mwg ++ * Added new function: UtilBlockCos() ++ * ++ * Revision 1.6 1997/03/21 23:50:10 liang ++ * Added initial version of V8bis module to CVS tree. ++ * ++ * Revision 1.5 1997/03/19 18:35:34 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.4 1997/01/21 00:36:15 mwg ++ * Added new function: UtilBlockCosSin() ++ * ++ * Revision 1.3 1996/06/18 21:14:45 mwg ++ * Modified VLDivVL by allowing to specify the result scaling. ++ * ++ * Revision 1.2 1996/06/12 02:31:59 mwg ++ * Added 64bit arithmetic functions. ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:15 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.4 1995/12/04 23:08:15 liang ++ * Add file Math/LinearToLog.c. ++ * ++ ************************************************************************/ ++#ifndef MathUtilPh ++#define MathUtilPh ++ ++/* Exported tables */ ++extern const short UtilCosTable[]; ++ ++/* Exported functions */ ++extern ComplexShort UtilCosSin(ushort angle); ++extern long UtilBlockCosSin (int nValues, long angle, long delta, ComplexShort *dstPtr); ++extern long UtilBlockCos (int nValues, long angle, long delta, short *dstPtr); ++extern ushort UtilShortShortAtan2(ComplexShort point); ++extern ushort UtilLongShortAtan2(ComplexLong point); ++extern ulong UtilShortLongAtan2(ComplexShort point) FAST_TEXT; ++extern ulong UtilLongLongAtan2(ComplexLong point) FAST_TEXT; ++extern ushort UtilSqrt(ulong y); ++extern ushort UtilMaxMagnitude(int blkSize, ComplexShort *dataPtr); ++extern short UtilQ0LinearToQ4dB (ulong x); ++extern ulong UtilQ4dBToQ12Linear (short x); ++extern void UtilAdjustComplexMagnitude(ComplexShort *srcPtr, short mag, short adjustment); ++ ++extern void VLMultLongByLong(long x, long y, VeryLong *dst); ++extern void VLMultShort (VeryLong x, short y, VeryLong *dst); ++extern void VLAddVL (VeryLong x, VeryLong y, VeryLong *dst); ++extern void VLAddLong (VeryLong x, long y, VeryLong *dst); ++extern void VLSubVL (VeryLong x, VeryLong y, VeryLong *dst); ++extern void VLSubLong (VeryLong x, long y, VeryLong *dst); ++extern void VLDivVL (VeryLong x, VeryLong y, int scale, long *dst); ++extern void VLShiftLeft(VeryLong x, int shift, VeryLong *dst); ++extern void VLShiftRight(VeryLong x, int shift, VeryLong *dst); ++ ++ ++#define UtilAtan2 UtilShortShortAtan2 ++#define UtilLongAtan2 UtilLongShortAtan2 ++ ++/* Standard Macros */ ++#undef abs ++#define abs(x) ((x) >= 0 ? (x) : -(x)) ++ ++#undef max ++#define max(x, y) ((x) >= (y) ? (x) : (y)) ++ ++#undef min ++#define min(x, y) ((x) <= (y) ? (x) : (y)) ++ ++#endif /* MathUtilPh */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MipsAsm.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MipsAsm.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MipsAsm.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MipsAsm.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,264 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/************************************************************************ ++ * ++ * MipsAsm.h: ++ * ++ * Description: ++ * This file contains definitions specific to MIPS assembly ++ * ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.5 $ ++ * ++ * $Id: MipsAsm.h,v 1.5 2004/04/13 00:16:59 ilyas Exp $ ++ * ++ * $Log: MipsAsm.h,v $ ++ * Revision 1.5 2004/04/13 00:16:59 ilyas ++ * Merged the latest ADSL driver changes ++ * ++ * Revision 1.4 2002/09/12 04:08:50 ilyas ++ * Added macros for BCM MIPS specific instructions ++ * ++ * Revision 1.3 2000/11/18 21:28:19 mprahlad ++ * ifdef bcm47xx - ++ * define MSUB(src1,src2) msub src1, src2 ++ * change Mult(dst, src1, src2) to use "mul" instead of "mult; mflo" ++ * define Mul(src1, src2) mult src1, src2 ++ * ++ * Revision 1.2 2000/07/28 21:05:05 mprahlad ++ * Macros specific to bcm47xx added. ++ * ++ * Revision 1.1 1999/08/05 19:52:57 liang ++ * Copied from the softmodem top of the tree on 08/04/99. ++ * ++ * Revision 1.5 1999/04/02 23:16:21 mwg ++ * Fixed a minor comatibility issue with mult ++ * ++ * Revision 1.4 1999/02/03 20:25:43 mwg ++ * Added an option for R4010 ++ * ++ * Revision 1.3 1998/10/30 02:21:34 mwg ++ * Added targets for 4640 ++ * ++ * Revision 1.2 1998/10/16 18:52:09 ilyas ++ * Added ASM_PROLOG[5-7] macros to save on stores ++ * ++ * Revision 1.1 1998/06/03 23:28:39 mwg ++ * Renamed from DinoDefs.h ++ * ++ * Revision 1.6 1998/02/09 18:23:11 scott ++ * Added EMBEDDED_CALLING_CONVENTION (GreenHill) and R3900/R4102 ++ * ++ * Revision 1.5 1997/03/19 18:35:02 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.4 1996/10/02 20:28:41 liang ++ * Remove parameter "acc" from the non-DINO version of MAD. ++ * ++ * Revision 1.3 1996/10/02 19:44:36 liang ++ * Separated MultAdd into MAD and MADW, added NO_DINO_WRITEBACK option. ++ * ++ * Revision 1.2 1996/08/14 03:06:07 liang ++ * Modified macro MultAdd so that the assembly code build works. ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.5 1994/11/04 22:41:29 mwg ++ * Added #ifdefs for different targets. ++ * ++ ************************************************************************/ ++ ++#ifndef _MIPS_ASM_H_ ++#define _MIPS_ASM_H_ ++ ++#define zero $0 ++#define v0 $2 ++#define v1 $3 ++#define a0 $4 ++#define a1 $5 ++#define a2 $6 ++#define a3 $7 ++#define t0 $8 ++#define t1 $9 ++#define t2 $10 ++#define t3 $11 ++#define t4 $12 ++#define t5 $13 ++#define t6 $14 ++#define t7 $15 ++#define s0 $16 ++#define s1 $17 ++#define s2 $18 ++#define s3 $19 ++#define s4 $20 ++#define s5 $21 ++#define s6 $22 ++#define s7 $23 ++#define t8 $24 ++#define t9 $25 ++#define k0 $26 ++#define k1 $27 ++#define gp $28 ++#define sp $29 ++#define fp $30 ++#define s8 $30 ++#define ra $31 ++ ++#ifdef EMBEDDED_CALLING_CONVENTION ++ ++/* Support for GreenHills embedded calling convention */ ++ ++#define ASM_PROLOG subu sp, 32; \ ++ sw $8, 16(sp); \ ++ sw $9, 20(sp); \ ++ sw $10, 24(sp); \ ++ sw $11, 28(sp); ++ ++#define ASM_PROLOG5 subu sp, 32; \ ++ sw $8, 16(sp); ++ ++#define ASM_PROLOG6 subu sp, 32; \ ++ sw $8, 16(sp); \ ++ sw $9, 20(sp); ++ ++#define ASM_PROLOG7 subu sp, 32; \ ++ sw $8, 16(sp); \ ++ sw $9, 20(sp); \ ++ sw $10, 24(sp); ++ ++#define ASM_EPILOG addu sp, 32 ++ ++#else ++#define ASM_PROLOG ++#define ASM_PROLOG5 ++#define ASM_PROLOG6 ++#define ASM_PROLOG7 ++#define ASM_EPILOG ++#endif ++ ++#ifdef DINO /* Special DSP extensions to MIPS core */ ++ ++#ifndef NO_DINO_WRITEBACK /* DSP extensions with writeback register */ ++ ++#define MAD(src1, src2) .set noreorder ; mad $0, src1, src2 ; .set reorder ++#define MADW(acc, src1, src2) .set noreorder ; mad acc, src1, src2 ; .set reorder ++#define Mult(dst, src1, src2) .set noreorder ; mult dst, src1, src2 ; .set reorder ++#define MultU(dst, src1, src2) .set noreorder ; multu dst, src1, src2 ; .set reorder ++ ++#else /* NO_DINO_WRITEBACK */ ++ ++#define MAD(src1, src2) .set noreorder ; mad $0, src1, src2 ; .set reorder ++#define MADW(acc, src1, src2) .set noreorder ; mad $0, src1, src2 ; mflo acc ; .set reorder ++#define Mult(dst, src1, src2) multu src1, src2 ; mflo dst ++#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst ++ ++#endif /* NO_DINO_WRITEBACK */ ++ ++#else /* DINO */ ++ ++#if defined(R3900) ++ ++#define MAD(src1, src2) madd $0, src1, src2 ++#define MADW(acc, src1, src2) madd acc, src1, src2 ++#define Mult(dst, src1, src2) mult dst, src1, src2 ++#define MultU(dst, src1, src2) multu dst, src1, src2 ++ ++#elif defined(bcm47xx_INSTR_MACROS) && defined(bcm47xx) ++ ++#define mips_froo(s1,s2,s3) s1##s2##s3 ++#define MSUB(s1,s2) .set noreorder ; mips_froo(msub_,s1,s2) ; .set reorder ++#define MAD(s1,s2) .set noreorder ; mips_froo(mad_,s1,s2) ; .set reorder ++#define MADW(acc, s1,s2) .set noreorder ; mips_froo(mad_,s1,s2) ; mflo acc ; .set reorder ++ ++#include "BCM4710.h" ++ ++#define Mult(dst, src1, src2) mul dst, src1, src2 ++#define Mul( src1, src2) mult src1, src2 ; ++#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst ++ ++#elif defined(bcm47xx) ++#define MSUB(src1, src2) msub src1, src2 ++#define MAD(src1, src2) madd src1, src2 ++#define MADW(acc, src1, src2) .set noreorder ; madd src1, src2; mflo acc ; .set reorder ++/* ++#define Mult(dst, src1, src2) mult src1, src2 ; mflo dst ++*/ ++#define Mult(dst, src1, src2) mul dst , src1, src2 ; ++#define Mul( src1, src2) mult src1, src2 ; ++#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst ++ ++#else ++ ++#ifdef R4102 ++#define MAD(src1, src2) madd16 src1, src2 ++#define MADW(acc, src1, src2) madd16 src1, src2 ; mflo acc ++#else /* R4102 */ ++ ++#ifdef R4640 ++ ++#define MAD(src1, src2) madd $0, src1, src2 ++#define MADW(acc, src1, src2) madd src1, src2; mflo acc ++ ++#else /* R4640 */ ++ ++#ifdef R4010 ++ ++#define MAD(src1, src2) madd src1, src2 ++#define MADW(acc, src1, src2) madd src1, src2; mflo acc ++ ++#else ++#define MAD(src1, src2) .set noat ;\ ++ mflo $at ;\ ++ sw $2, -4(sp) ;\ ++ multu src1, src2 ;\ ++ mflo $2 ;\ ++ addu $at, $2, $at ;\ ++ lw $2, -4(sp) ;\ ++ mtlo $at ;\ ++ .set at ++ ++#define MADW(acc, src1, src2) .set noat ;\ ++ mflo $at ;\ ++ sw $2, -4(sp) ;\ ++ multu src1, src2 ;\ ++ mflo $2 ;\ ++ addu $at, $2, $at ;\ ++ lw $2, -4(sp) ;\ ++ move acc, $at ;\ ++ mtlo $at ;\ ++ .set at ++#endif /* R4010 */ ++#endif /* R4102 */ ++#endif /* R4640 */ ++ ++#define Mult(dst, src1, src2) mul dst, src1, src2 ++#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst ++ ++#endif /* !3900 */ ++#endif /* DINO */ ++ ++ ++ ++ ++ ++ ++ ++ ++#endif /* _MIPS_ASM_H_ */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MiscUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MiscUtil.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MiscUtil.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MiscUtil.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,65 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * MiscUtil.h -- Miscellaneous utilities ++ * ++ * Description: ++ * ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg Haixiang Liang ++ * ++ * $Revision: 1.4 $ ++ * ++ * $Id: MiscUtil.h,v 1.4 2004/04/13 00:21:46 ilyas Exp $ ++ * ++ * $Log: MiscUtil.h,v $ ++ * Revision 1.4 2004/04/13 00:21:46 ilyas ++ * Added standard header for shared ADSL driver files ++ * ++ * Revision 1.3 2001/07/21 01:21:06 ilyas ++ * Added more functions for int to string conversion used by log file ++ * ++ * Revision 1.2 1999/08/05 19:42:56 liang ++ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. ++ * ++ * Revision 1.1 1999/01/27 22:10:12 liang ++ * Initial version. ++ * ++ * Revision 1.1 1997/07/10 01:18:45 mwg ++ * Initial revision. ++ * ++ * ++ * ++ *****************************************************************************/ ++#ifndef _MISC_UTIL_H_ ++#define _MISC_UTIL_H_ ++ ++extern long SM_DECL GetRateValue(dataRateMap rate); ++extern int SM_DECL DecToString(ulong value, uchar *dstPtr, uint nDigits); ++extern int SM_DECL HexToString(ulong value, uchar *dstPtr, uint nDigits); ++extern char * SM_DECL DecToStr(char *s, ulong num); ++extern char * SM_DECL SignedToStr(char *s, long num); ++extern char * SM_DECL HexToStr(char *s, ulong num); ++ ++#define EvenParityBit(x) ((z = (y = x ^ (x >> 4)) ^ (y >> 2)) ^ (z >> 1)) ++#define OddParityBit(x) (EvenParityBit(x) ^ 1) ++ ++extern void ParityApply(int nBytes, int nDataBits, int parity, uchar *srcPtr, uchar *dstPtr); ++extern void ParityStrip(int nBytes, int nDataBits, int parity, uchar *srcPtr, uchar *dstPtr, statusHandlerType statusHandler); ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Que.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Que.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Que.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Que.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,106 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * Que.h ++ * ++ * Description: ++ * Definition and implementation (via macros and inline functions) ++ * of a simple queue ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ *****************************************************************************/ ++ ++#ifndef QueHeader_H_ ++#define QueHeader_H_ ++ ++typedef void * _QueItem; ++ ++typedef struct _QueHeader ++ { ++ _QueItem *head; /* first item in the queue */ ++ _QueItem *tail; /* last item in the queue */ ++ } QueHeader; ++ ++/* Queue management macros */ ++ ++#define QueInit(pqHdr) (((QueHeader *)(pqHdr))->head = ((QueHeader *)(pqHdr))->tail = NULL) ++#define QueEmpty(pqHdr) (NULL == ((QueHeader *)(pqHdr))->head) ++ ++#define QueFirst(pqHdr) ((QueHeader *)(pqHdr))->head ++#define QueLast(pqHdr) ((QueHeader *)(pqHdr))->tail ++#define QueNext(pqItem) (*((void **)(pqItem))) ++ ++ ++#define QueRemoveFirst(pqHdr) do { \ ++ if (!QueEmpty(pqHdr)) { \ ++ ((QueHeader *)(pqHdr))->head = *((QueHeader *)(pqHdr))->head; \ ++ if (QueEmpty(pqHdr)) \ ++ ((QueHeader *)(pqHdr))->tail = NULL; \ ++ } \ ++} while (0) ++#define QueRemove(pqHdr) QueRemoveFirst(pqHdr) ++ ++ ++#define QueAddLast(pqHdr,pqItem) do { \ ++ QueNext(pqItem) = NULL; \ ++ if (NULL != ((QueHeader *)(pqHdr))->tail) \ ++ *((QueHeader *)(pqHdr))->tail = (pqItem); \ ++ else \ ++ ((QueHeader *)(pqHdr))->head = (_QueItem *)(pqItem); \ ++ ((QueHeader *)(pqHdr))->tail = (_QueItem *)(pqItem); \ ++} while (0) ++#define QueAdd(pqHdr,pItem) QueAddLast(pqHdr,pItem) ++ ++#define QueAddFirst(pqHdr,pqItem) do { \ ++ if (NULL == ((QueHeader *)(pqHdr))->tail) \ ++ ((QueHeader *)(pqHdr))->tail = (_QueItem *)(pqItem); \ ++ QueNext(pqItem) = ((QueHeader *)(pqHdr))->head; \ ++ ((QueHeader *)(pqHdr))->head = (_QueItem *)(pqItem); \ ++} while (0) ++ ++ ++#define QueGet(pqHdr) \ ++ (void *) QueFirst(pqHdr); \ ++ QueRemove(pqHdr); ++ ++#define QueMerge(pqHdr1,pqHdr2) do { \ ++ if (NULL == ((QueHeader *)(pqHdr1))->tail) \ ++ ((QueHeader *)(pqHdr1))->head = ((QueHeader *)(pqHdr2))->head; \ ++ else \ ++ QueNext(((QueHeader *)(pqHdr1))->tail) = ((QueHeader *)(pqHdr2))->head; \ ++ if (NULL != ((QueHeader *)(pqHdr2))->tail) \ ++ ((QueHeader *)(pqHdr1))->tail = ((QueHeader *)(pqHdr2))->tail; \ ++} while (0) ++ ++#define QueCopy(pqHdr1,pqHdr2) do { \ ++ ((QueHeader *)(pqHdr1))->head = ((QueHeader *)(pqHdr2))->head; \ ++ ((QueHeader *)(pqHdr1))->tail = ((QueHeader *)(pqHdr2))->tail; \ ++} while (0) ++ ++#define QueForEach(pqHdr,f,ref) do { \ ++ _QueItem *p = ((QueHeader *)(pqHdr))->head; \ ++ \ ++ while (NULL != p) { \ ++ if ( (f)((void *)p, ref) ) break; \ ++ p = QueNext(p); \ ++ } \ ++} while (0) ++ ++#endif /* QueHeader_H_ */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftAtmVc.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftAtmVc.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftAtmVc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftAtmVc.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,569 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * SoftAtmVc.h ++ * ++ * Description: ++ * This file contains ATM VC definitions ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.27 $ ++ * ++ * $Id: SoftAtmVc.h,v 1.27 2004/06/02 22:26:17 ilyas Exp $ ++ * ++ * $Log: SoftAtmVc.h,v $ ++ * Revision 1.27 2004/06/02 22:26:17 ilyas ++ * Added ATM counters for G.992.3 ++ * ++ * Revision 1.26 2004/03/10 22:57:20 ilyas ++ * Added I.432 scramling control ++ * ++ * Revision 1.25 2003/09/23 00:21:59 ilyas ++ * Added status to indicate ATM header compression ++ * ++ * Revision 1.24 2003/08/27 02:00:50 ilyas ++ * Original implementation of ATM header compression ++ * ++ * Revision 1.23 2003/02/25 04:13:15 ilyas ++ * Added standard Broadcom header ++ * ++ * Revision 1.22 2003/01/10 23:25:48 ilyas ++ * Added ATM status definition ++ * ++ * Revision 1.21 2002/09/12 21:07:19 ilyas ++ * Added HEC, OCD and LCD counters ++ * ++ * Revision 1.20 2002/04/02 09:58:00 ilyas ++ * Initial implementatoin of BERT ++ * ++ * Revision 1.19 2001/10/09 22:35:14 ilyas ++ * Added more ATM statistics and OAM support ++ * ++ * Revision 1.18 2001/06/18 19:49:36 ilyas ++ * Changes to include support for HOST_ONLY mode ++ * ++ * Revision 1.17 2001/02/23 05:49:57 ilyas ++ * Added routed 1483 encapsulation ++ * ++ * Revision 1.16 2001/02/09 04:18:18 ilyas ++ * Added framer for bridged ethernet PDUs ++ * ++ * Revision 1.15 2001/02/09 01:55:27 ilyas ++ * Added status codes and macros to support printing of AAL packets ++ * ++ * Revision 1.14 2000/09/21 17:28:35 ilyas ++ * Added VBR support to traffic management code, separated UBR to a different ++ * Tx list, changed some of the algorithms ++ * ++ * Revision 1.13 2000/08/23 18:42:13 ilyas ++ * Added AAL2, added VcConfigure functions, moved commonly used look-up ++ * tables for CRC calculation to AtmLayer ++ * ++ * Revision 1.12 2000/08/02 03:06:22 ilyas ++ * Added support for reserving space in RX packets for ATm protocols ++ * ++ * Revision 1.11 2000/07/28 17:23:39 ilyas ++ * Added ATM connect/disconnect statuses ++ * ++ * Revision 1.10 2000/07/25 02:16:12 ilyas ++ * Added EClip (with Eth to ATM ARP translation) implementation ++ * ++ * Revision 1.9 2000/07/23 20:57:14 ilyas ++ * Added ATM framer and protocol layers ++ * ++ * Revision 1.8 2000/07/17 21:08:16 lkaplan ++ * removed global pointer ++ * ++ * Revision 1.7 2000/06/09 18:33:04 liang ++ * Fixed Irix compiler warnings. ++ * ++ * Revision 1.6 2000/05/18 21:47:31 ilyas ++ * Added detection of preassigned cells such as OAM F4, F5 ++ * ++ * Revision 1.5 2000/05/14 01:50:11 ilyas ++ * Added more statuses to ATM code ++ * ++ * Revision 1.4 2000/05/10 02:41:28 liang ++ * Added status report for no cell memory ++ * ++ * Revision 1.3 2000/05/09 23:00:27 ilyas ++ * Added ATM status messages, ATM timer, Tx frames flush on timeout ++ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames ++ * ++ * Revision 1.2 2000/05/03 03:53:00 ilyas ++ * Added support for pVc to vcID translation needed for LOG file and other ++ * definitions for ATM data in LOG file ++ * ++ * Revision 1.1 2000/04/19 00:21:35 ilyas ++ * Fixed some problems and added Out Of Band (OOB) support to ATM packets ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef SoftAtmVcHeader ++#define SoftAtmVcHeader ++ ++/* ++** ++** ATM UNI types ++** ++*/ ++ ++#define AtmLinkFlags(bMap,name) (((bMap) >> name##Shift) & name##Mask) ++ ++/* ATM service category types */ ++ ++#define kAtmSrvcCBR 1 /* Constant Bit Rate */ ++#define kAtmSrvcVBR 2 /* Variable Bit Rate */ ++#define kAtmSrvcUBR 4 /* Unspecified Bit Rate */ ++#define kAtmSrvcABR 8 /* Available Bit Rate */ ++#define kAtmSrvcUnknown 0xFF ++ ++/* ATM AAL types (as encoded at UNI) */ ++ ++#define kAtmAalIE 0x58 ++ ++#define kAtmRaw 0 ++#define kAtmAal1 1 ++#define kAtmAal2 2 ++#define kAtmAal34 3 ++#define kAtmAal5 5 ++#define kAtmAalUser 16 ++#define kAtmAalUnknown 0xFF ++ ++/* ATM AAL1 parameters */ ++ ++#define kAal1SubTypeId 0x85 ++ ++#define kAal1TransportShift 0 ++#define kAal1TransportMask 0x7 ++ ++#define kAal1NullTransport 0 ++#define kAal1VoiceTransport 1 ++#define kAal1CircuitTransport 2 ++#define kAal1AudioTransport 4 ++#define kAal1VideoTransport 5 ++ ++ ++#define kAal1CBRId 0x86 ++ ++#define kAal1CBRShift 24 ++#define kAal1CBRMask 0xFF ++ ++#define kAal1CBR64 1 ++#define kAal1CBR1544 4 /* DS1 */ ++#define kAal1CBR6312 5 /* DS2 */ ++#define kAal1CBR32064 6 ++#define kAal1CBR44736 7 /* DS3 */ ++#define kAal1CBR97728 8 ++#define kAal1CBR2048 0x10 /* E1 */ ++#define kAal1CBR8448 0x11 /* E2 */ ++#define kAal1CBR34368 0x12 /* E3 */ ++#define kAal1CBR139264 0x13 ++#define kAal1CBR64xN 0x40 ++#define kAal1CBR8xN 0x41 ++ ++ ++#define kAal1MultiplierId 0x87 ++ ++#define kAal1ClockRecoveryId 0x88 ++ ++#define kAal1ClockRecoveryShift 3 ++#define kAal1ClockRecoveryMask 0x3 ++ ++#define kAal1ClockRecoveryNull 1 /* synchronous transport */ ++#define kAal1ClockRecoverySRTS 1 /* asynchronous transport */ ++#define kAal1ClockRecoveryAdaptive 2 ++ ++ ++#define kAal1ECMId 0x89 /* Error correction method */ ++ ++#define kAal1ECMShift (kAal1ClockRecoveryShift + 2) ++#define kAal1ECMMask 0x3 ++ ++#define kAal1ECMNull 0 ++#define kAal1ECMLossSensitive 1 ++#define kAal1ECMDelaySensitive 2 ++ ++ ++#define kAal1SDTBlockSizeId 0x8A ++ ++#define kAal1CellFillId 0x8B ++ ++/* ATM AAL34 and AAL5 parameters */ ++ ++#define kAalFwdMaxSDUSizeId 0x8C ++#define kAalBacMaxkSDUSizeId 0x81 ++ ++#define kAal34MidRangeId 0x82 ++ ++#define kAalSSCSTypeId 0x84 ++ ++#define kAalSSCSAssured 1 ++#define kAalSSCSNonAssured 2 ++#define kAalSSCSFrameRelay 4 ++ ++/* ATM AAL2 parameters */ ++ ++#define kAal2SSNone 0 ++#define kAal2SSSAR 1 ++#define kAal2SSTED 2 ++#define kAal2SSSARMask 3 ++#define kAal2SSType1 4 ++#define kAal2SSType3 5 ++ ++typedef struct { ++ uchar aalType; ++ union { ++ struct { ++ bitMap aal1Flags; ++ ulong cbrRate; ++ ushort blkSize; ++ uchar sarUsed; ++ } aal1Params; ++ struct { ++ ushort fwdMaxCpSize; /* Max "common part" packet size */ ++ ushort backMaxCpSize; ++ ushort cidLow; ++ ushort cidHigh; ++ ushort fwdMaxSsSize; /* Max "service specific" packet size */ ++ ushort backMaxSsSize; ++ uchar sscsType; ++ } aal2Params; ++ struct { ++ ushort fwdMaxSDUSize; ++ ushort backMaxSDUSize; ++ ushort midLow; ++ ushort midHigh; ++ uchar sscsType; ++ } aal34Params; ++ struct { ++ ushort fwdMaxSDUSize; ++ ushort backMaxSDUSize; ++ uchar sscsType; ++ } aal5Params; ++ } param; ++} atmAalParams; ++ ++/* ATM Traffic Descriptor types (as encoded at UNI) */ ++ ++#define kAtmTrafficIE 0x59 ++ ++#define kTrafficFwdPeakCellRateId0 0x82 ++#define kTrafficBackPeakCellRateId0 0x83 ++#define kTrafficFwdPeakCellRateId 0x84 ++#define kTrafficBackPeakCellRateId 0x85 ++ ++#define kTrafficFwdSustainCellRateId0 0x88 ++#define kTrafficBackSustainCellRateId0 0x89 ++#define kTrafficFwdSustainCellRateId 0x90 ++#define kTrafficBackSustainCellRateId 0x91 ++ ++#define kTrafficFwdMaxBurstSizeId0 0xA0 ++#define kTrafficBackMaxBurstSizeId0 0xA1 ++#define kTrafficFwdMaxBurstSizeId 0xB0 ++#define kTrafficBackMaxBurstSizeId 0xB1 ++ ++#define kTrafficBestEffortId 0xBE ++#define kTrafficMgrOptionsId 0xBF ++ ++#define kTrafficMaxTolerance 0x7FFFFFFF ++ ++/* trafficFlags coding */ ++ ++#define kTrafficTagFwd 1 ++#define kTrafficTagBack 2 ++#define kTrafficBestEffort 4 ++ ++typedef struct { ++ ulong tPCR0; /* CLP = 0, time between cells in us */ ++ ulong tPCR; /* CLP = 0+1 */ ++ ulong tolPCR; /* tolerance for PCR in us */ ++ ++ ulong tSCR0; /* CLP = 0 */ ++ ulong tSCR; /* CLP = 0+1 */ ++ ulong tolSCR; /* tolerance for SCR in us */ ++ ++ uchar atmServiceType; /* CBR, VBR, UBR, etc. */ ++ uchar trafficFlags; ++} atmTrafficParams; ++ ++/* ATM Broadband Bearer Capabilty (BBC) types (as encoded at UNI) */ ++ ++#define kAtmBBCIE 0x5E ++ ++#define kBBCClassShift 0 ++#define kBBCClassMask 0x1F ++ ++#define kBBCClassA 0x1 ++#define kBBCClassC 0x3 ++#define kBBCClassX 0x10 ++ ++ ++#define kBBCTrafficShift (kBBCClassShift + 5) ++#define kBBCTrafficMask 0x7 ++ ++#define kBBCTrafficNull 0 ++#define kBBCTrafficCBR 1 ++#define kBBCTrafficVBR 2 ++ ++ ++#define kBBCTimingShift (kBBCTrafficShift + 3) ++#define kBBCTimingMask 0x3 ++ ++#define kBBCTimingNull 0 ++#define kBBCTimingRequired 1 ++#define kBBCTimingNotRequired 2 ++ ++ ++#define kBBCClippingShift (kBBCTimingShift + 2) ++#define kBBCClippingMask 0x3 ++ ++#define kBBCNoClipping 0 ++#define kBBCClippingOk 1 ++ ++#define kBBCConnectionShift (kBBCClippingShift + 2) ++#define kBBCConnectionMask 0x3 ++ ++#define kBBCPoint2Point 0 ++#define kBBCPoint2MPoint 1 ++ ++/* ATM Broadband High/Low Layer Information (BHLI/BLLI) types (as encoded at UNI) */ ++ ++#define kAtmBHLIIE 0x5D ++#define kAtmBLLIIE 0x5F ++ ++/* ATM QoS types (as encoded at UNI) */ ++ ++#define kAtmQoSIE 0x5C ++ ++#define kQoSNull 0 ++#define kQoSClass1 1 ++#define kQoSClass2 2 ++#define kQoSClass3 3 ++#define kQoSClass4 4 ++#define kQoSReserved 0xFF ++ ++typedef struct { ++ uchar fwdQoSClass; ++ uchar backQoSClass; ++} atmQoSParams; ++ ++/* ATM MID definitions (ConfigureHandler) */ ++ ++#define kAtmMidEntireVc ((ulong) -1) ++ ++typedef struct { ++ void *pUserVc; /* VC id from the caller: has to be 1st !!! */ ++ ulong vci; ++ uchar defaultCLP; /* default CLP for tx packets on this VC */ ++ uchar framerId; ++ uchar protoId; ++ uchar protoRxBytesReserved; /* # bytes reserved by protocol in the beginning of Rx packet */ ++ uchar protoTxBytesReserved; /* # bytes reserved by protocol in the beginning of Tx packet */ ++ ++ atmAalParams aalParams; ++ atmTrafficParams rxTrafficParams; ++ atmTrafficParams txTrafficParams; ++ bitMap bbcFlags; ++ atmQoSParams qosParams; ++} atmVcParams; ++ ++/* ++** ++** ATM Out of Band (OOB) packet information ++** ++*/ ++ ++typedef struct { ++ Boolean clp; /* Cell Loss Prioroty */ ++ uchar aalType; ++ union { ++ struct { ++ uchar payloadType; ++ } aalRawParams; ++ struct { ++ uchar payloadType; ++ ushort mid; ++ } aal34Params; ++ struct { ++ uchar uui; /* Uses to user indicator */ ++ uchar cpi; /* common part indicator */ ++ } aal5Params; ++ } aalParam; ++} atmOobPacketInfo; ++ ++/* ++** ++** ATM setup bit definition ++** ++*/ ++ ++#define kAtmCorrectHecErrors 1 ++#define kCorrectHecErrors kAtmCorrectHecErrors ++#define kAtmPhyHeaderCompression 2 ++#define kAtmPhyNoDataScrambling 4 ++ ++#define kAtmTxIdleTimeoutMask 0x6 ++#define kAtmTxIdleNoTimeout 0 ++#define kAtmTxIdleTimeout10s 2 ++#define kAtmTxIdleTimeout30s 4 ++#define kAtmTxIdleTimeout60s 6 ++ ++/* ++** ++** ATM framer modes and protocol definitions ++** ++*/ ++ ++#define kAtmFramerNone 0 ++#define kAtmFramerISO 1 ++#define kAtmFramerIP 2 ++#define kAtmFramerEth 3 ++#define kAtmFramerEthWithCRC 4 ++ ++#define kAtmProtoNone 0 ++#define kAtmProtoEClip 1 ++#define kAtmProtoERouted1483 2 ++#define kAtmProtoPPP 3 ++ ++ ++/* ++** ++** ATM status codes ++** ++*/ ++ ++typedef void (*atmStatusHandler) (void *gDslVars, ulong statusCode, ...); ++ ++/* physical layer I.432 */ ++ ++#define kAtmStatRxHunt 1 ++#define kAtmStatRxPreSync 2 ++#define kAtmStatRxSync 3 ++#define kAtmStatRxPlOamCell 4 ++#define kAtmStatBertResult 5 ++#define kAtmStatHec 6 ++#define kAtmStatHdrCompr 7 ++#define kAtmStatCounters 8 ++ ++/* ATM layer */ ++ ++#define kAtmLayerStatFirst 100 ++#define kAtmStatRxDiscarded 100 ++#define kAtmStatTxDelayed 101 ++ ++#define kAtmStatVcCreated 102 ++#define kAtmStatVcStarted 103 ++#define kAtmStatVcStopped 104 ++#define kAtmStatVcDeleted 105 ++ ++#define kAtmStatTimeout 106 ++#define kAtmStatNoCellMemory 107 ++#define kAtmStatPrintCell 108 ++#define kAtmStatInvalidCell 109 ++#define kAtmStatUnassignedCell 110 ++#define kAtmStatOamF4SegmentCell 111 ++#define kAtmStatOamF4End2EndCell 112 ++#define kAtmStatOamI371Cell 113 ++#define kAtmStatOamF5SegmentCell 114 ++#define kAtmStatOamF5End2EndCell 115 ++#define kAtmStatReservedCell 116 ++ ++#define kAtmStatConnected 117 ++#define kAtmStatDisconnected 118 ++ ++#define kAtmStatRxPacket 119 ++#define kAtmStatTxPacket 120 ++ ++#define kAtmStatOamLoopback 121 ++ ++ ++typedef struct _atmPhyCounters { ++ ushort id; ++ ushort bertStatus; ++ ulong bertCellTotal; ++ ulong bertCellCnt; ++ ulong bertBitErrors; ++ ++ ulong rxHecCnt; ++ ulong rxCellTotal; ++ ulong rxCellData; ++ ulong rxCellDrop; ++} atmPhyCounters; ++ ++/* AAL layer */ ++ ++ ++ ++/* ++** ++** ATM log file definitions ++** ++*/ ++ ++/* ATM log file flags */ ++ ++#define kAtmLogFrameFlagMask 3 /* mask */ ++ ++#define kAtmLogFrameFlagNone 0 /* nothing */ ++#define kAtmLogFrameFlagNoData 1 /* no data only frame size */ ++#define kAtmLogFrameFlagBinData 2 /* data in binary form */ ++#define kAtmLogFrameFlagTextData 3 /* data in text form */ ++ ++#define kAtmLogSendFrameShift 0 ++#define kAtmLogSendFrameNoData (kAtmLogFrameFlagNoData << kAtmLogSendFrameShift) ++#define kAtmLogSendFrameBinData (kAtmLogFrameFlagBinData << kAtmLogSendFrameShift) ++#define kAtmLogSendFrameTextData (kAtmLogFrameFlagTextData << kAtmLogSendFrameShift) ++ ++#define kAtmLogRcvFrameShift 2 ++#define kAtmLogRcvFrameNone (kAtmLogFrameFlagNone << kAtmLogRcvFrameShift) ++#define kAtmLogRcvFrameNoData (kAtmLogFrameFlagNoData << kAtmLogRcvFrameShift) ++#define kAtmLogRcvFrameBinData (kAtmLogFrameFlagBinData << kAtmLogRcvFrameShift) ++#define kAtmLogRcvFrameTextData (kAtmLogFrameFlagTextData << kAtmLogRcvFrameShift) ++ ++#define kAtmLogSendCompleteFrameShift 4 ++#define kAtmLogSendCompleteFrameNone (kAtmLogFrameFlagNone << kAtmLogSendCompleteFrameShift) ++#define kAtmLogSendCompleteFrameNoData (kAtmLogFrameFlagNoData << kAtmLogSendCompleteFrameShift) ++ ++#define kAtmLogReturnFrameShift 6 ++#define kAtmLogReturnFrameNoData (kAtmLogFrameFlagNoData << kAtmLogReturnFrameShift) ++ ++#define kAtmLogCellFlag (1 << 8) ++ ++/* ATM log codes */ ++ ++#define kAtmLogSendFrame 1 ++#define kAtmLogRcvFrame 2 ++#define kAtmLogSendFrameComplete 3 ++#define kAtmLogReturnFrame 4 ++#define kAtmLogVcAllocate 5 ++#define kAtmLogVcFree 6 ++#define kAtmLogVcActivate 7 ++#define kAtmLogVcDeactivate 8 ++#define kAtmLogTimer 9 ++#define kAtmLogCell 10 ++#define kAtmLogVcConfigure 11 ++ ++#define kAtmLogRxCellHeader 12 ++#define kAtmLogRxCellData 13 ++#define kAtmLogTxCell 14 ++ ++#endif /* SoftAtmVcHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.gh +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.gh 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.gh 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,675 @@ ++/**************************************************************************** ++ * ++ * SoftDsl.gh ++ * ++ * Description: ++ * This is a header file which defines the type for the DSL ++ * global variable structure. ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.72 $ ++ * ++ * $Id: SoftDsl.gh,v 1.72 2004/04/30 23:05:19 kdu Exp $ ++ * ++ * $Log: SoftDsl.gh,v $ ++ * Revision 1.72 2004/04/30 23:05:19 kdu ++ * Fixed interop issues in TDC lab for TMM. ++ * ++ * Revision 1.70 2004/04/10 23:30:48 ilyas ++ * Defined gloval structure for slow (SDRAM) data ++ * ++ * Revision 1.69 2004/04/02 18:33:45 gsyu ++ * Share MuxFramer buffers with scratch memory ++ * ++ * Revision 1.68 2004/02/04 20:12:38 linyin ++ * Support adsl2plus ++ * ++ * Revision 1.67 2004/02/03 19:10:37 gsyu ++ * Added separated carrierInfo structures for G992P5 ++ * ++ * Revision 1.66 2004/01/26 04:21:06 yongbing ++ * Merge changes in ADSL2 branch into Annex A branch ++ * ++ * Revision 1.65 2004/01/13 19:12:07 gsyu ++ * Added two more variables for Double upstream ++ * ++ * Revision 1.64 2003/12/04 02:10:37 linyin ++ * Add a variable for FbmsOL mode ++ * ++ * Revision 1.63 2003/11/20 00:57:50 yongbing ++ * Merge ADSL2 functionalities into Annex A branch ++ * ++ * Revision 1.62 2003/11/05 01:59:12 liang ++ * Add vendor ID code for Infineon. ++ * ++ * Revision 1.61 2003/08/12 22:59:41 khp ++ * - for Haixiang: added support for ADSL_MARGIN_TWEAK_TEST ++ * ++ * Revision 1.60 2003/08/01 00:08:19 liang ++ * Added firmware ID for Samsung ADI 930 DSLAM. ++ * ++ * Revision 1.59 2003/07/14 14:40:08 khp ++ * - AnnexB: added bad SNR2 retrain counter to connectin setup ++ * ++ * Revision 1.58 2003/06/25 02:40:22 liang ++ * Added firmware ID for Annex A UE9000 ADI918 (from Aliant, Canada). ++ * ++ * Revision 1.57 2003/06/25 00:00:40 ilyas ++ * -added firmware IDs for TI 4000C and AC5 (Annex B) ++ * ++ * Revision 1.56 2003/05/31 01:50:38 khp ++ * -add firmware IDs for ECI16 and ECI16A ++ * ++ * Revision 1.55 2003/03/27 19:30:52 liang ++ * Add and initialize new connectionSetup field coVendorFirmwareID under module ADSL_IDENTIFY_VENDOR_FIRMWARE. ++ * ++ * Revision 1.54 2002/12/13 18:35:48 yongbing ++ * Add support for G.992.2 Annex C in start up ++ * ++ * Revision 1.53 2002/12/06 02:06:33 liang ++ * Moved the T1.413 RAck1/RAck2 switching variables to connection setup structure. ++ * ++ * Revision 1.52 2002/11/26 02:49:46 liang ++ * Added variable codingGainDecrement to the connectionSetup structure to solve the C-Rates-RA option failure problem. ++ * ++ * Revision 1.51 2002/10/20 18:56:16 khp ++ * - for linyin: ++ * - #ifdef NEC_NSIF_WORKAROUND: ++ * - add status and fail counter for NSIF ++ * ++ * Revision 1.50 2002/09/28 02:36:50 yongbing ++ * Add retrain in T1.413 with R-Ack1 tone ++ * ++ * Revision 1.49 2002/09/12 21:07:19 ilyas ++ * Added HEC, OCD and LCD counters ++ * ++ * Revision 1.48 2002/07/19 01:51:35 liang ++ * Added vendor ID constant for Alcatel. ++ * ++ * Revision 1.47 2002/06/27 21:51:08 liang ++ * Added xmt and rcv tone selection bitmap in connection setup. ++ * ++ * Revision 1.46 2002/06/11 20:48:06 liang ++ * Added CO vendor ID field to connectionSetup structure. ++ * ++ * Revision 1.45 2002/06/06 03:05:43 khp ++ * -use boolean in connectup setup instead of localCapabilities.features to indicate FBM mode ++ * ++ * Revision 1.44 2002/03/22 19:38:58 yongbing ++ * Modify for co-exist of G994P1 and T1P413 ++ * ++ * Revision 1.43 2002/03/02 00:52:40 ilyas ++ * AnnexC delay needs to be long for prototype ++ * ++ * Revision 1.42 2002/01/19 23:59:17 ilyas ++ * Added support for LOG and eye data to ADSL core target ++ * ++ * Revision 1.41 2002/01/16 19:03:59 ilyas ++ * Added HOST_ONLY ifdefs around ADSL core data ++ * ++ * Revision 1.40 2002/01/14 17:41:04 liang ++ * Move xmt & rcv sample buffers to top level. ++ * ++ * Revision 1.39 2001/12/21 22:45:34 ilyas ++ * Added support for ADSL MIB data object ++ * ++ * Revision 1.38 2001/12/13 02:24:22 ilyas ++ * Added G997 (Clear EOC and G997 framer) support ++ * ++ * Revision 1.37 2001/11/30 05:56:31 liang ++ * Merged top of the branch AnnexBDevelopment onto top of the tree. ++ * ++ * Revision 1.36 2001/10/19 00:12:07 ilyas ++ * Added support for frame oriented (no ATM) data link layer ++ * ++ * Revision 1.29.2.5 2001/10/03 01:44:00 liang ++ * Merged with codes from main tree (tag SoftDsl_2_18). ++ * ++ * Revision 1.29.2.4 2001/08/18 00:00:36 georgep ++ * Add variable to store annexC pathDelay ++ * ++ * Revision 1.29.2.3 2001/08/08 17:33:27 yongbing ++ * Merge with tag SoftDsl_2_17 ++ * ++ * Revision 1.35 2001/08/29 02:56:01 ilyas ++ * Added tests for flattening/unflatenning command and statuses (dual mode) ++ * ++ * Revision 1.34 2001/08/28 03:26:32 ilyas ++ * Added support for running host and adsl core parts separately ("dual" mode) ++ * ++ * Revision 1.33 2001/06/18 19:49:36 ilyas ++ * Changes to include support for HOST_ONLY mode ++ * ++ * Revision 1.32 2001/05/18 21:21:44 liang ++ * Save the current number of rcv samples to line handler for QProc test. ++ * ++ * Revision 1.31 2001/04/25 01:20:11 ilyas ++ * ++ * Don't use DSL frame functions if ATM_LAYER is not defined ++ * ++ * Revision 1.30 2001/03/25 06:11:20 liang ++ * Combined separate loop attenuation status for ATUR & ATUC into one status. ++ * Replace separate hardware AGC info status for ATUR & ATUC into hardware AGC ++ * request status and hardware AGC obtained status. ++ * Use store AGC command to save hardware AGC value instead of returning value ++ * from status report. ++ * ++ * Revision 1.29 2001/03/17 03:00:46 georgep ++ * Added agcInfo to connectionSetupStruct ++ * ++ * Revision 1.28 2001/02/10 03:03:09 ilyas ++ * Added one more DslFrame function ++ * ++ * Revision 1.27 2000/08/31 19:04:24 liang ++ * Added scratch buffer structure definition. ++ * ++ * Revision 1.26 2000/07/23 20:52:52 ilyas ++ * Added xxxFrameBufSetAddress() function for ATM framer layers ++ * Rearranged linkLayer functions in one structure which is passed as a ++ * parameter to xxxLinkLayerInit() function to be set there ++ * ++ * Revision 1.25 2000/07/18 21:42:25 ilyas ++ * Fixed compiler warning about pointer casting ++ * ++ * Revision 1.24 2000/07/18 21:18:45 ilyas ++ * Added GLOBAL_PTR_BIAS feature to utilize full 64K MIPS relative addressing space ++ * ++ * Revision 1.23 2000/07/18 20:03:24 ilyas ++ * Changed DslFrame functions definitions to macros, ++ * Removed gDslVars from their parameter list ++ * ++ * Revision 1.22 2000/07/17 21:08:15 lkaplan ++ * removed global pointer ++ * ++ * Revision 1.21 2000/05/09 23:00:26 ilyas ++ * Added ATM status messages, ATM timer, Tx frames flush on timeout ++ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames ++ * ++ * Revision 1.20 2000/05/03 03:57:04 ilyas ++ * Added LOG file support for writing ATM data ++ * ++ * Revision 1.19 2000/04/19 00:31:47 ilyas ++ * Added global SoftDsl functions for Vc, added OOB info functions ++ * ++ * Revision 1.18 2000/04/13 08:36:22 yura ++ * Added SoftDslSetRefData, SoftDslGetRefData functions ++ * ++ * Revision 1.17 2000/04/13 05:38:54 georgep ++ * Added T1p413 "Activation and Acknowledgement" which can substitute G994P1 ++ * ++ * Revision 1.16 2000/04/05 22:30:42 liang ++ * Changed function & constant names from G992p2 to G992 for the Main module. ++ * ++ * Revision 1.15 2000/04/04 04:16:06 liang ++ * Merged with SoftDsl_0_03 from old tree. ++ * ++ * Revision 1.15 2000/04/04 01:47:21 ilyas ++ * Implemented abstract dslFrame and dslFrameBuffer objects ++ * ++ * Revision 1.14 2000/04/01 02:53:33 georgep ++ * Added pointer to G992p2Profile inside connectionSetup ++ * ++ * Revision 1.13 2000/03/18 01:27:56 georgep ++ * Changed connectionSetup to include G992p1 Capabilities ++ * ++ * Revision 1.12 2000/02/29 01:39:05 georgep ++ * put variable haveRemoteCapabilities inside connectionSetupStruct ++ * ++ * Revision 1.11 2000/02/08 00:44:36 liang ++ * Fix the gDslVars definition for Irix environment. ++ * ++ * Revision 1.10 1999/11/19 00:59:29 george ++ * Define physicalLayerVars as a union ++ * ++ * Revision 1.9 1999/11/11 19:19:42 george ++ * Porting to 16Bit Compiler ++ * ++ * Revision 1.8 1999/11/09 20:26:17 george ++ * Added G992P2_PROFILE to modules list ++ * ++ * Revision 1.7 1999/10/27 23:01:54 wan ++ * Add G.994.1 setup in dslConnectionSetupStruct for setting up Initiation side ++ * ++ * Revision 1.6 1999/08/12 21:16:27 george ++ * Move profileVars definition to G992p2/G992p2Profile.gh ++ * ++ * Revision 1.5 1999/08/10 18:20:43 george ++ * Define fastRetrainVars ++ * ++ * Revision 1.4 1999/07/16 02:03:02 liang ++ * Added Tx & Rx data handler function pointers. ++ * ++ * Revision 1.3 1999/07/03 01:40:15 liang ++ * Redefined dsl command parameter list and added connection setup struct. ++ * ++ * Revision 1.2 1999/02/10 01:56:37 liang ++ * Added hooks for G994.1 and G992.2. ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef SoftDslGlobals ++#define SoftDslGlobals ++ ++#include "SoftDsl.h" ++ ++#ifdef G992P2_PROFILE ++#include "G992p2Profile.gh" ++#endif ++ ++typedef enum ++ { ++ kVendorUnknown = 0, ++ kVendorBroadcom, ++ kVendorGlobespan, ++ kVendorADI, ++ kVendorTI, ++ kVendorCentillium, ++ kVendorAlcatel, ++ kVendorInfineon ++ } VendorIDType; ++ ++#define kDslVendorFirwareUnknown 0 ++typedef enum ++ { ++ kVendorADI_Anaconda = 1, ++ kVendorADI_ECI918, ++ kVendorADI_ECI930, ++ kVendorADI_Cisco, ++ kVendorADI_UE9000_918, ++ kVendorADI_Samsung_930, ++ kVendorTI_4000C_ERICSSON_350, ++ kVendorTI_4000C_SEIMENS, ++ kVendorADI_ECI16_AnnexB = 50, /* leave space for more Annex A types */ ++ kVendorADI_ECI16A_AnnexB, ++ kVendorTI_4000C_AnnexB, ++ kVendorTI_AC5_AnnexB ++ } VendorFirmwareIDType; ++ ++#define kDslXmtToneSelectionStartTone 0 ++#ifdef G992P1_ANNEX_B ++#define kDslXmtToneSelectionEndTone 63 ++#else ++#define kDslXmtToneSelectionEndTone 31 ++#endif ++#define kDslXmtToneSelectionNumOfTones (kDslXmtToneSelectionEndTone-kDslXmtToneSelectionStartTone+1) ++#define kDslXmtToneSelectionNumOfBytes ((kDslXmtToneSelectionNumOfTones+7)/8) ++#define kDslRcvToneSelectionStartTone 32 ++#define kDslRcvToneSelectionEndTone 255 ++#define kDslRcvToneSelectionNumOfTones (kDslRcvToneSelectionEndTone-kDslRcvToneSelectionStartTone+1) ++#define kDslRcvToneSelectionNumOfBytes ((kDslRcvToneSelectionNumOfTones+7)/8) ++ ++#define kDslT1p413RAckModeTryRAck1 0x01 ++#define kDslT1p413RAckModeTryRAck2 0x02 ++#define kDslT1p413RAckModeTrialMask 0x0F ++#define kDslT1p413RAckModeSelected 0x10 ++#define kDslT1p413RAckModeTrialCount 10 /* when in trial mode */ ++#define kDslT1p413RAckModeSwitchCount 20 /* when mode is selected */ ++ ++#ifdef ADSL_MARGIN_TWEAK_TEST ++#define kDslMarginTweakNumOfTones 256 ++#endif ++ ++typedef struct ++ { ++ Boolean haveRemoteCapabilities; ++ dslModulationType selectedModulation; ++ dslModulationType startupModulation; ++#if defined(G992P1_ANNEX_I) || defined(G992P5) ++ ushort downstreamMinCarr, downstreamMaxCarr; ++#else ++ uchar downstreamMinCarr, downstreamMaxCarr; ++#endif ++ uchar upstreamMinCarr, upstreamMaxCarr; ++#if defined(DOUBLE_UP_STREAM) ++ Boolean isDoubleUsEnabled; ++ short selectedPilotTone; ++#endif ++ dslDataPumpCapabilities localCapabilities, remoteCapabilities; ++#ifdef G992P3 ++ g992p3DataPumpCapabilities localCarrierInfoG992p3AnnexA; ++ g992p3DataPumpCapabilities remoteCarrierInfoG992p3AnnexA; ++ g992p3DataPumpCapabilities selectedCarrierInfoG992p3AnnexA; ++ uchar xmtG992p3State; ++#ifdef G992P5 ++ g992p3DataPumpCapabilities localCarrierInfoG992p5AnnexA; ++ g992p3DataPumpCapabilities remoteCarrierInfoG992p5AnnexA; ++ g992p3DataPumpCapabilities selectedCarrierInfoG992p5AnnexA; ++#endif /* G992P5 */ ++#endif /* G992P3 */ ++ uchar handshakingDuplexMode; ++ Boolean handshakingClientInitiation; ++ short handshakingXmtPowerLevel; ++ uchar handshakingXmtCarrierSet; ++ short hwAgcQ4dB; /* for loop attenuation calculation */ ++ uchar coVendorID; ++#ifdef ADSL_IDENTIFY_VENDOR_FIRMWARE ++ uchar coVendorFirmwareID; ++#endif ++ uchar codingGainDecrement; /* coding gain decrement in Q4dB for initial rate calculation */ ++ uchar xmtToneSelection[kDslXmtToneSelectionNumOfBytes]; ++ uchar rcvToneSelection[kDslRcvToneSelectionNumOfBytes]; ++#ifdef G992_ANNEXC ++ Boolean isFbmMode; ++ Boolean isFbmsOLMode; ++ long xmtToRcvPathDelay; ++#endif ++#if defined(T1P413) && defined(XMT_RACT2_FOR_ADI_COMPATIBILITY) ++ uchar t1p413RAckModeUsed; ++ uchar t1p413RAckModeCounter; ++#endif ++#ifdef G992P1_ANNEX_B ++ uchar badSNR2RetrainCounter; ++#endif ++#ifdef ADSL_MARGIN_TWEAK_TEST ++ short marginTweakExtraPowerQ4dB; ++ char marginTweakTableQ4dB[kDslMarginTweakNumOfTones]; ++#endif ++#ifdef G992P2_PROFILE ++ G992p2ProfileVarsStruct* profileVarsPtr; ++#endif ++#ifdef TDC_IOP_FIX_SEIMENS_TI ++ char t1p413RetrainCounter; /* 0: no retrain needed; 1: force to T1.413 mode and retrain after R-MSG1; 2: 2nd T1.413 session, go to showtime */ ++#endif ++#ifdef ANSI_CACT12_PING_PONG ++ char t1p413SkipToneIndex; /* to alternate between CAct1 and CAct2 detection */ ++#endif ++ } dslConnectionSetupStruct; ++ ++#ifdef ADSL_FRAMER ++#include "MuxFramer.gh" ++#endif ++ ++#ifdef ATM ++#include "SoftAtm.gh" ++#endif ++ ++#ifdef DSL_PACKET ++#include "DslPacket.gh" ++#endif ++ ++#ifdef G997_1_FRAMER ++#include "G997.gh" ++#ifdef G992P3 ++#include "G992p3OvhMsg.gh" ++#endif ++#endif ++ ++#ifdef ADSL_MIB ++#include "AdslMib.gh" ++#endif ++ ++#ifndef HOST_ONLY ++#ifdef T1P413 ++#include "T1p413Main.gh" ++#endif ++ ++#ifdef G994P1 ++#include "G994p1Main.gh" ++#endif ++ ++#ifdef G992 ++#include "G992Main.gh" ++#endif ++ ++#include "SoftDslSampleBuffers.gh" ++#endif ++ ++typedef struct __dslSlowVarsStruct ++ { ++ int tmp; ++ } ++ dslSlowVarsStruct; ++ ++typedef struct __dslVarsStruct ++ { ++ bitMap setup; ++ eyeHandlerType eyeHandlerPtr; ++ logHandlerType logHandlerPtr; ++ dslDriverCallbackType driverCallback; ++ ++ rcvHandlerType rcvHandlerPtr; ++ xmtHandlerType xmtHandlerPtr; ++ ++#ifndef ADSLCORE_ONLY ++ dslCommandHandlerType adslCoreCommandHandlerPtr; ++#endif ++ dslCommandHandlerType dataPumpCommandHandlerPtr; ++ ++ dslStatusHandlerType internalStatusHandlerPtr; ++ dslStatusHandlerType externalStatusHandlerPtr; ++#ifndef ADSLCORE_ONLY ++ dslStatusHandlerType externalLinkLayerStatusHandlerPtr; ++#endif ++ ++ dslDirectionType direction; ++ dslConnectionSetupStruct connectionSetup; ++ ++#ifdef NEC_NSIF_WORKAROUND ++ uchar G994NsStatus; ++ uchar G994NsFailCounter; ++#endif ++ ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ ++ linkLayerFunctions LinkLayerFunctions; ++ dslSlowVarsStruct *dslSlowVars; ++ ++#ifdef DSL_FRAME_FUNCTIONS ++ dslFrameFunctions DslFrameFunctions; ++#endif ++ ulong refData; ++ ulong execTime; ++ int currRcvNSamps; ++ ++#ifndef HOST_ONLY ++ DslSampleBuffersStruct sampleBuffersVars; ++ ++#ifdef G992P2_PROFILE ++ G992p2ProfileVarsStruct G992p2ProfileVars; ++#endif ++ ++#ifdef ADSL_FRAMER ++ muxFramerVarsStruct muxFramerVars; ++#endif ++#endif /* HOST_ONLY */ ++ ++#ifdef DSL_LINKLAYER ++ union ++ { ++#ifdef ATM ++ atmVarsStruct atmVars; ++#endif ++#ifdef DSL_PACKET ++ dslPacketVarsStruct dslPacketVars; ++#endif ++ } linkLayerVars; ++#endif ++ ++#ifdef G997_1_FRAMER ++ g997VarsStruct G997Vars; ++#ifdef G992P3 ++ g992p3OvhMsgVarsStruct G992p3OvhMsgVars; ++#endif ++#endif ++ ++#ifdef ADSL_MIB ++ adslMibVarsStruct adslMibVars; ++#endif ++ ++#ifndef HOST_ONLY ++ union ++ { ++#ifdef T1P413 ++ T1p413VarsStruct T1p413Vars; ++#endif ++#ifdef G994P1 ++ G994p1VarsStruct G994p1Vars; ++#endif ++#ifdef G992 ++ G992VarsStruct G992Vars; ++#endif ++ } physicalLayerVars; ++ union ++ { ++#ifdef G992 ++ G992ScratchVarsStruct G992ScratchVars; ++#endif ++#if defined(ADSL_FRAMER) && defined(SHARE_MUX_FRAMER_VARS) ++ muxFramerSharedVarsStruct muxFramerSharedVars; ++#endif ++ } scratchVars; ++#endif /* HOST_ONLY */ ++ ++ } ++ dslVarsStruct; ++ ++#ifndef GLOBAL_PTR_BIAS ++#define gDslGlobalVarPtr ((struct __dslVarsStruct *)gDslVars) ++#define gDslGlobalSlowVarPtr (gDslGlobalVarPtr->dslSlowVars) ++#else ++#define gDslGlobalVarPtr ((struct __dslVarsStruct *) (void*)((uchar*)(gDslVars) - GLOBAL_PTR_BIAS)) ++#define gDslGlobalSlowVarPtr ((struct __dslSlowVarsStruct *) (void*)((uchar*)(gDslGlobalVarPtr->dslSlowVars) - GLOBAL_PTR_BIAS)) ++#endif ++ ++#define gDslSampleBuffersVars (gDslGlobalVarPtr->sampleBuffersVars) ++ ++#define gDslMuxFramerVars (gDslGlobalVarPtr->muxFramerVars) ++#define gDslMuxFramerSharedVars (gDslGlobalVarPtr->scratchVars.muxFramerSharedVars) ++#define gDslLinkLayerVars (gDslGlobalVarPtr->linkLayerVars) ++#define gDslAtmVars (gDslGlobalVarPtr->linkLayerVars.atmVars) ++#define gDslPacketVars (gDslGlobalVarPtr->linkLayerVars.dslPacketVars) ++#define gG997Vars (gDslGlobalVarPtr->G997Vars) ++ ++#ifdef G992P3 ++#define gG992p3OvhMsgVars (gDslGlobalVarPtr->G992p3OvhMsgVars) ++#endif ++ ++#define gAdslMibVars (gDslGlobalVarPtr->adslMibVars) ++ ++#define gT1p413Vars (gDslGlobalVarPtr->physicalLayerVars.T1p413Vars) ++#define gG994p1Vars (gDslGlobalVarPtr->physicalLayerVars.G994p1Vars) ++#define gG992Vars (gDslGlobalVarPtr->physicalLayerVars.G992Vars) ++#define gG992p2ProfileVars (gDslGlobalVarPtr->G992p2ProfileVars) ++ ++#define gG992ScratchVars (gDslGlobalVarPtr->scratchVars.G992ScratchVars) ++ ++#ifndef gEyeHandlerPtr ++#define gEyeHandlerPtr (gDslGlobalVarPtr->eyeHandlerPtr) ++#endif ++ ++#ifndef gLogHandlerPtr ++#define gLogHandlerPtr (gDslGlobalVarPtr->logHandlerPtr) ++#endif ++ ++#ifdef VP_SIMULATOR ++#define gDriverCallback(x) (gDslGlobalVarPtr->driverCallback)(x) ++#else ++#define gDriverCallback(x) ++#endif ++ ++/* ++** ++** Frame functions callouts ++** ++*/ ++ ++#define gDslFrameFunc (gDslGlobalVarPtr->DslFrameFunctions) ++ ++#define DslFrameBufferGetLength(gDslVars, fb) \ ++ gDslFrameFunc.__DslFrameBufferGetLength(fb) ++ ++#define DslFrameBufferGetAddress(gDslVars, fb) \ ++ gDslFrameFunc.__DslFrameBufferGetAddress(fb) ++ ++#define DslFrameBufferSetLength(gDslVars, fb, l) \ ++ gDslFrameFunc.__DslFrameBufferSetLength(fb, l) ++ ++#define DslFrameBufferSetAddress(gDslVars, fb, p) \ ++ gDslFrameFunc.__DslFrameBufferSetAddress(fb, p) ++ ++#define DslFrameInit(gDslVars, f) \ ++ gDslFrameFunc.__DslFrameInit(f) ++ ++#define DslFrameGetLength(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameGetLength(pFrame) ++ ++#define DslFrameGetBufCnt(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameGetBufCnt(pFrame) ++ ++#define DslFrameGetFirstBuffer(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameGetFirstBuffer(pFrame) ++ ++#define DslFrameGetNextBuffer(gDslVars, pFrBuffer) \ ++ gDslFrameFunc.__DslFrameGetNextBuffer(pFrBuffer) ++ ++#define DslFrameSetNextBuffer(gDslVars, pFrBuf, pFrBufNext) \ ++ gDslFrameFunc.__DslFrameSetNextBuffer(pFrBuf, pFrBufNext) ++ ++#define DslFrameGetLastBuffer(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameGetLastBuffer(pFrame) ++ ++#define DslFrameGetLinkFieldAddress(gDslVars, f) \ ++ gDslFrameFunc.__DslFrameGetLinkFieldAddress(f) ++ ++#define DslFrameGetFrameAddressFromLink(gDslVars, lnk) \ ++ gDslFrameFunc.__DslFrameGetFrameAddressFromLink(lnk) ++ ++ ++#define DslFrameGetOobInfo(gDslVars, f, pOobInfo) \ ++ gDslFrameFunc.__DslFrameGetOobInfo(f, pOobInfo) ++ ++#define DslFrameSetOobInfo(gDslVars, f, pOobInfo) \ ++ gDslFrameFunc.__DslFrameSetOobInfo(f, pOobInfo) ++ ++ ++#define DslFrameEnqueBufferAtBack(gDslVars, f, b) \ ++ gDslFrameFunc.__DslFrameEnqueBufferAtBack(f, b) ++ ++#define DslFrameEnqueFrameAtBack(gDslVars, fMain, f) \ ++ gDslFrameFunc.__DslFrameEnqueFrameAtBack(fMain, f) ++ ++#define DslFrameEnqueBufferAtFront(gDslVars, f, b) \ ++ gDslFrameFunc.__DslFrameEnqueBufferAtFront(f, b) ++ ++#define DslFrameEnqueFrameAtFront(gDslVars, fMain, f) \ ++ gDslFrameFunc.__DslFrameEnqueFrameAtFront(fMain, f) ++ ++#define DslFrameDequeBuffer(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameDequeBuffer(pFrame) ++ ++#define DslFrameAllocMemForFrames(gDslVars, frameNum) \ ++ gDslFrameFunc.__DslFrameAllocMemForFrames(frameNum) ++ ++#define DslFrameFreeMemForFrames(gDslVars, hMem) \ ++ gDslFrameFunc.__DslFrameFreeMemForFrames(hMem) ++ ++#define DslFrameAllocFrame(gDslVars, handle) \ ++ gDslFrameFunc.__DslFrameAllocFrame(handle) ++ ++#define DslFrameFreeFrame(gDslVars, handle, pFrame) \ ++ gDslFrameFunc.__DslFrameFreeFrame(handle, pFrame) ++ ++#define DslFrameAllocMemForBuffers(gDslVars, ppMemPool, bufNum, memSize) \ ++ gDslFrameFunc.__DslFrameAllocMemForBuffers(ppMemPool, bufNum, memSize) ++ ++#define DslFrameFreeMemForBuffers(gDslVars, hMem, memSize, pMemPool) \ ++ gDslFrameFunc.__DslFrameFreeMemForBuffers(hMem, memSize, pMemPool) ++ ++#define DslFrameAllocBuffer(gDslVars, handle, pMem, length) \ ++ gDslFrameFunc.__DslFrameAllocBuffer(handle, pMem, length) ++ ++#define DslFrameFreeBuffer(gDslVars, handle, pBuf) \ ++ gDslFrameFunc.__DslFrameFreeBuffer(handle, pBuf) ++ ++#define DslFrame2Id(gDslVars, handle, pFrame) \ ++ gDslFrameFunc.__DslFrame2Id(handle, pFrame) ++ ++#define DslFrameId2Frame(gDslVars, handle, frameId) \ ++ gDslFrameFunc.__DslFrameId2Frame (handle, frameId) ++ ++ ++#endif /* SoftDslGlobals */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,2920 @@ ++/**************************************************************************** ++ * ++ * SoftDsl.h ++ * ++ * ++ * Description: ++ * This file contains the exported interface for SoftDsl.c ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.275 $ ++ * ++ * $Id: SoftDsl.h,v 1.275 2005/04/28 22:55:36 ilyas Exp $ ++ * ++ * $Log: SoftDsl.h,v $ ++ * Revision 1.275 2005/04/28 22:55:36 ilyas ++ * Cleaned up kDslG992RunAnnexaP3ModeInAnnexaP5, kG992EnableAnnexM and kDslAtuChangeTxFilterRequest definitions ++ * ++ * Revision 1.274 2005/04/27 20:57:32 yongbing ++ * Implement 32 frequency break points for TSSI, PR 30211 ++ * ++ * Revision 1.273 2005/04/02 03:27:52 kdu ++ * PR30236: Define kDslEnableRoundUpDSLoopAttn, this is shared with kDslCentilliumCRCWorkAroundEnabled. ++ * ++ * Revision 1.272 2005/04/01 21:56:39 ilyas ++ * Added more test commands definitions ++ * ++ * Revision 1.271 2005/02/11 05:03:57 ilyas ++ * Added support for DslOs ++ * ++ * Revision 1.270 2005/02/11 03:33:22 lke ++ * Support 2X, 4X, and 8X spectrum in ANNEX_I DS ++ * ++ * Revision 1.269 2005/01/08 00:11:58 ilyas ++ * Added definition for AnnexL status ++ * ++ * Revision 1.268 2004/12/18 00:52:35 mprahlad ++ * Add Dig US Pwr cutback status ++ * ++ * Revision 1.267 2004/11/08 22:21:38 ytan ++ * init swap state after retrain ++ * ++ * Revision 1.266 2004/11/05 21:16:50 ilyas ++ * Added support for pwmSyncClock ++ * ++ * Revision 1.265 2004/10/28 20:05:17 gsyu ++ * Fixed compilation errors for simulation targets ++ * ++ * Revision 1.264 2004/10/23 00:16:35 nino ++ * Added kDslHardwareSetRcvAGC status to set absolute rcv agc gain. ++ * ++ * Revision 1.263 2004/10/22 21:21:06 ilyas ++ * Fixed bit definition overlap in demodCapabilities ++ * ++ * Revision 1.262 2004/10/20 00:43:20 gsyu ++ * Added constants to support new xmt sample buffer control scheme ++ * ++ * Revision 1.261 2004/10/12 01:09:28 nino ++ * Remove kDslHardwareEnablePwmSyncClk and kDslHardwareSetPwmSyncClkFreq ++ * status definitions. Add kDslEnablePwmSyncClk and kDslSetPwmSyncClkFreq ++ * command definitions. ++ * ++ * Revision 1.260 2004/10/11 20:21:26 nino ++ * Added kDslHardwareEnablePwmSyncClk and kDslHardwareSetPwmSynClkFreq hardware statuses. ++ * ++ * Revision 1.259 2004/10/07 19:17:29 nino ++ * Added kDslHardwareGetRcvAGC status. ++ * ++ * Revision 1.258 2004/10/02 00:17:14 nino ++ * Added kDslHardwareAGCSetPga2 and kDslSetPilotEyeDisplay status definitions. ++ * ++ * Revision 1.257 2004/08/27 01:00:30 mprahlad ++ * ++ * Keep kDslAtuChangeTxFilterRequest defined by default so ADSL1 only targets can ++ * build ++ * ++ * Revision 1.256 2004/08/20 19:00:34 ilyas ++ * Added power management code for 2+ ++ * ++ * Revision 1.255 2004/08/17 23:18:25 kdu ++ * Merged interop changes for TDC lab from a023e9. ++ * ++ * Revision 1.254 2004/07/22 00:56:03 yongbing ++ * Add ADSL2 Annex B modulation definition ++ * ++ * Revision 1.253 2004/07/16 22:23:28 nino ++ * - Defined macros to extract subcarrier and supported set information ++ * for tssi. Subcarrier and suported set indicator is packed into ++ * dsSubcarrier index array. ++ * ++ * Revision 1.252 2004/07/01 00:11:22 nino ++ * Added preliminary code for debugDataHandler (inside of #if DEBUG_DATA_HANDLER). ++ * ++ * Revision 1.251 2004/06/24 03:08:39 ilyas ++ * Added GFC mapping control for ATM bonding ++ * ++ * Revision 1.250 2004/06/23 00:03:20 khp ++ * - shorten self test result register length to 1 (satisfied requirement ++ * at DT, no known requirement anywhere else) ++ * ++ * Revision 1.249 2004/06/15 20:18:33 ilyas ++ * Made D uchar again for compatibility with older ADSl drivers that use this structure. ADSL driver will rely on G992p3 parameters for large D ++ * ++ * Revision 1.248 2004/06/12 00:26:03 gsyu ++ * Added constants for AnnexM ++ * ++ * Revision 1.247 2004/06/10 18:53:24 yjchen ++ * add large D support ++ * ++ * Revision 1.246 2004/06/04 01:55:00 linyin ++ * Add a constant for SRA enable/disable ++ * ++ * Revision 1.245 2004/05/19 23:22:23 linyin ++ * Support L2 ++ * ++ * Revision 1.244 2004/05/15 03:04:58 ilyas ++ * Added L3 test definition ++ * ++ * Revision 1.243 2004/05/14 03:04:38 ilyas ++ * Fixed structure name typo ++ * ++ * Revision 1.242 2004/05/14 02:01:01 ilyas ++ * Fixed structure name typo ++ * ++ * Revision 1.241 2004/05/14 01:21:49 nino ++ * Added kDslSignalAttenuation, kDslAttainableNetDataRate kDslHLinScale constant definitions. ++ * ++ * Revision 1.240 2004/05/13 19:07:58 ilyas ++ * Added new statuses for ADSL2 ++ * ++ * Revision 1.239 2004/05/01 01:09:51 ilyas ++ * Added power management command and statuses ++ * ++ * Revision 1.238 2004/04/23 22:50:38 ilyas ++ * Implemented double buffering to ensure G.997 HDLC frame (OvhMsg) is continuous ++ * ++ * Revision 1.237 2004/03/31 18:57:39 ilyas ++ * Added drop on data error capability control ++ * ++ * Revision 1.236 2004/03/30 03:11:30 ilyas ++ * Added #ifdef for CFE build ++ * ++ * Revision 1.235 2004/03/29 23:06:39 ilyas ++ * Added status for BG table update ++ * ++ * Revision 1.234 2004/03/17 02:49:49 ilyas ++ * Turn off ATM bit reversal for Alcatel DSLAM only ++ * ++ * Revision 1.233 2004/03/11 03:09:48 mprahlad ++ * Add test mode for afeloopback test ++ * ++ * Revision 1.232 2004/03/10 23:15:53 ilyas ++ * Added ETSI modem support ++ * ++ * Revision 1.231 2004/03/04 19:28:14 linyin ++ * Support adsl2plus ++ * ++ * Revision 1.230 2004/02/28 00:06:21 ilyas ++ * Added OLR message definitions for ADSL2+ ++ * ++ * Revision 1.229 2004/02/13 03:21:15 mprahlad ++ * define kDslAturHwAgcMaxGain correctly for 6348 ++ * ++ * Revision 1.228 2004/02/09 05:06:17 yongbing ++ * Add ADSL2 bit swap function ++ * ++ * Revision 1.227 2004/02/04 02:08:19 linyin ++ * remove the redefined kG992p5AnnexA ++ * ++ * Revision 1.226 2004/02/04 01:41:48 linyin ++ * Add some variables for G992P5 ++ * ++ * Revision 1.225 2004/02/03 19:12:22 gsyu ++ * Added a dedicate structure and constants for G992P5 ++ * ++ * Revision 1.224 2004/01/24 01:18:34 ytan ++ * add multi-section swapping flag ++ * ++ * Revision 1.223 2004/01/17 00:21:48 ilyas ++ * Added commands and statuses for OLR ++ * ++ * Revision 1.222 2004/01/13 19:12:37 gsyu ++ * Added more constants for Double upstream ++ * ++ * Revision 1.221 2003/12/23 21:19:04 mprahlad ++ * Define BCM6348_TEMP_MOVE_TO_LMEM to FAST_TEXT for 6348 targets - this is for ++ * ADSL2/AnnexA multimode builds - move a few functions to Lmem for now to avoid ++ * changes for swap on 6348. ++ * ++ * Revision 1.220 2003/12/19 21:21:53 ilyas ++ * Added dying gasp support for ADSL2 ++ * ++ * Revision 1.219 2003/12/05 02:09:51 mprahlad ++ * Leave the AnalogEC defs in - saves ifdef-ing all uses of these defines. ++ * Include Bcm6345_To_Bcm6348.h - to be able to pick up macros for the ++ * transition ++ * ++ * Revision 1.218 2003/12/04 02:10:58 linyin ++ * Redefine some constants for supporting different pilot and TTR ++ * ++ * Revision 1.217 2003/12/03 02:24:39 gsyu ++ * Reverse previous check in for Double Upstream demo ++ * ++ * Revision 1.215 2003/11/20 00:58:47 yongbing ++ * Merge ADSL2 functionalities into Annex A branch ++ * ++ * Revision 1.214 2003/11/06 00:35:06 nino ++ * Added kDslWriteAfeRegCmd and kDslReadAfeRegCmd commands. ++ * ++ * Revision 1.213 2003/11/05 21:04:23 ilyas ++ * Added more codes for LOG data ++ * ++ * Revision 1.212 2003/10/22 00:51:52 yjchen ++ * define constant for quiet line noise ++ * ++ * Revision 1.211 2003/10/20 22:08:57 nino ++ * Added kDslSetRcvGainCmd and kDslBypassRcvHpfCmd debug commands. ++ * ++ * Revision 1.210 2003/10/18 00:04:59 yjchen ++ * define constants for G992P3 diagnostic mode channel response ++ * ++ * Revision 1.209 2003/10/17 22:41:29 yongbing ++ * Add INP message support ++ * ++ * Revision 1.208 2003/10/16 00:06:09 uid1249 ++ * Moved G.994 definitions from G.994p1MainTypes.h ++ * ++ * Revision 1.207 2003/10/15 20:45:11 linyin ++ * Add some constants for support Revision 2 ++ * ++ * Revision 1.206 2003/10/14 22:04:02 ilyas ++ * Added Nino's AFE statuses for 6348 ++ * ++ * Revision 1.205 2003/10/10 18:49:26 gsyu ++ * Added test modes to workaround the clock domain crossing bug, PR18038 ++ * ++ * Revision 1.204 2003/09/30 19:27:46 mprahlad ++ * ifdef AnalogEC definies with #ifndef BCM6348_SRC ++ * ++ * Revision 1.203 2003/09/26 19:36:34 linyin ++ * Add annexi constant and vars ++ * ++ * Revision 1.202 2003/09/25 20:16:13 yjchen ++ * remove featureNTR definition ++ * ++ * Revision 1.201 2003/09/08 20:29:51 ilyas ++ * Added test commands for chip regression tests ++ * ++ * Revision 1.200 2003/08/26 00:58:14 ilyas ++ * Added I432 reset command (for header compression) ++ * Fixed SoftDsl time (for I432 header compression) ++ * ++ * Revision 1.199 2003/08/26 00:37:29 ilyas ++ * #ifdef'ed DslFrameFunctions in dslCommand structure to save space ++ * ++ * Revision 1.198 2003/08/22 22:45:00 liang ++ * Change the NF field in G992CodingParams from uchar to ushort to support K=256 (dataRate=255*32kbps) in fast path. ++ * ++ * Revision 1.197 2003/08/21 21:19:05 ilyas ++ * Changed dataPumpCapabilities structure for G992P3 ++ * ++ * Revision 1.196 2003/08/12 22:44:28 khp ++ * - for Haixiang: added kDslTestMarginTweak command and marginTweakSpec ++ * ++ * Revision 1.195 2003/07/24 17:28:16 ovandewi ++ * added Tx filter change request code ++ * ++ * Revision 1.194 2003/07/24 15:48:55 yongbing ++ * Reduce TSSI buffer size to avoid crash at the beginning of G.994.1. Need to find out why ++ * ++ * Revision 1.193 2003/07/19 07:11:47 nino ++ * Revert back to version 1.191. ++ * ++ * Revision 1.191 2003/07/17 21:25:25 yongbing ++ * Add support for READSL2 and TSSI ++ * ++ * Revision 1.190 2003/07/14 19:42:33 yjchen ++ * add constants for G992P3 ++ * ++ * Revision 1.189 2003/07/10 23:07:11 liang ++ * Add demodCapability bit to minimize showtime ATUC xmt power through b&g table. ++ * ++ * Revision 1.188 2003/07/08 22:18:50 liang ++ * Added demodCapability bit for G.994.1 Annex A multimode operation. ++ * ++ * Revision 1.187 2003/07/07 23:24:43 ilyas ++ * Added G.dmt.bis definitions ++ * ++ * Revision 1.186 2003/06/25 02:44:02 liang ++ * Added demod capability bit kDslUE9000ADI918FECFixEnabled. ++ * Added back kDslHWEnableAnalogECUpdate & kDslHWEnableAnalogEC for backward compatibility (annex A). ++ * ++ * Revision 1.185 2003/06/18 01:39:19 ilyas ++ * Added AFE test commands. Add #defines for driver's builds ++ * ++ * Revision 1.184 2003/06/06 23:58:09 ilyas ++ * Added command and status for standalone AFE tests ++ * ++ * Revision 1.183 2003/05/29 21:09:32 nino ++ * - kDslHWEnableAnalogECUpdate define replaced with kDslHWSetDigitalEcUpdateMode ++ * - kDslHWEnableAnalogEC define replaced with kDslHWDisableDigitalECUpdate ++ * ++ * Revision 1.182 2003/04/15 22:08:15 liang ++ * Changed one of the demodCapability bit name from last checkin. ++ * ++ * Revision 1.181 2003/04/13 19:25:54 liang ++ * Added three more demodCapability bits. ++ * ++ * Revision 1.180 2003/04/02 02:09:17 liang ++ * Added demodCapability bit for ADI low rate option fix disable. ++ * ++ * Revision 1.179 2003/03/18 18:22:06 yongbing ++ * Use 32 tap TEQ for Annex I ++ * ++ * Revision 1.178 2003/03/06 00:58:07 ilyas ++ * Added SetStausBuffer command ++ * ++ * Revision 1.177 2003/02/25 00:46:26 ilyas ++ * Added T1.413 EOC vendor ID ++ * ++ * Revision 1.176 2003/02/21 23:30:54 ilyas ++ * Added Xmtgain command framing mode status and T1413VendorId parameters ++ * ++ * Revision 1.175 2003/02/07 22:13:55 liang ++ * Add demodCapabilities bits for sub-sample alignment and higher T1.413 level (used internally only). ++ * ++ * Revision 1.174 2003/01/23 02:54:07 liang ++ * Added demod capability bit for bitswap enable. ++ * ++ * Revision 1.173 2002/12/13 18:36:33 yongbing ++ * Add support for G.992.2 Annex C ++ * ++ * Revision 1.172 2002/12/10 23:27:12 ilyas ++ * Extended dslException parameter structure to allow printout from DslDiags ++ * ++ * Revision 1.171 2002/12/06 02:10:19 liang ++ * Moved the T1.413 RAck1/RAck2 switching variables to connection setup structure. ++ * Added/Modified the training progress codes for T1.413 RAck1/RAck2 and upstream 2x IFFT disable. ++ * ++ * Revision 1.170 2002/11/11 00:20:05 liang ++ * Add demod capability constant for internally disabling upstream 2x IFFT in T1.413 mode. ++ * ++ * Revision 1.169 2002/11/06 03:46:19 liang ++ * Add training progress code for upstream 2x IFFT disable. ++ * ++ * Revision 1.168 2002/11/01 01:41:06 ilyas ++ * Added flags for Centillium 4103 workarround ++ * ++ * Revision 1.167 2002/10/26 01:26:11 gsyu ++ * Move SoftDslLineHandler from SDRAM to LMEM ++ * ++ * Revision 1.166 2002/10/20 18:56:20 khp ++ * - for linyin ++ * - #ifdef NEC_NSIF_WORKAROUND: ++ * - add macros to extract NSIF status and fail counter vars ++ * ++ * Revision 1.165 2002/10/14 05:24:35 liang ++ * Add training status code to request alternate xmt filter (for Samsung 6-port ADI918 DSLAMs) to meet KT 2km spec. ++ * ++ * Revision 1.164 2002/10/08 21:44:50 ilyas ++ * Fixed EOC stuffing byte to indicate "no synchronization" action ++ * ++ * Revision 1.163 2002/10/03 19:34:24 ilyas ++ * Added size for EOC serial number register ++ * ++ * Revision 1.162 2002/09/28 02:42:27 yongbing ++ * Add retrain in T1.413 with R-Ack1 tone ++ * ++ * Revision 1.161 2002/09/28 01:23:35 gsyu ++ * Reverse us2xifft change so that we can install new us2xifft on the tree ++ * ++ * Revision 1.160 2002/09/26 23:30:48 yongbing ++ * Add synch symbol detection in Showtime ++ * ++ * Revision 1.159 2002/09/20 23:47:52 khp ++ * - for gsyu: enable 2X IFFT for Annex A (XMT_FFT_SIZE_2X) ++ * ++ * Revision 1.158 2002/09/14 03:26:39 ilyas ++ * Changed far-end RDI reporting ++ * ++ * Revision 1.157 2002/09/13 21:10:54 ilyas ++ * Added reporting of remote modem LOS and RDI. ++ * Moved G992CodingParams definition to SoftDsl.h ++ * ++ * Revision 1.156 2002/09/12 21:07:19 ilyas ++ * Added HEC, OCD and LCD counters ++ * ++ * Revision 1.155 2002/09/09 21:31:30 linyin ++ * Add two constant to support long reach ++ * ++ * Revision 1.154 2002/09/07 01:31:51 ilyas ++ * Added support for OEM parameters ++ * ++ * Revision 1.153 2002/09/04 22:36:14 mprahlad ++ * defines for non standard info added ++ * ++ * Revision 1.152 2002/08/02 21:59:09 liang ++ * Enable G.992.2 carrierInfo in capabitilities when G.992.1 annex A is used for G.992.2. ++ * ++ * Revision 1.151 2002/07/29 20:01:03 ilyas ++ * Added command for Atm VC map table change ++ * ++ * Revision 1.150 2002/07/18 22:30:47 liang ++ * Add xmt power and power cutback related constants. ++ * ++ * Revision 1.149 2002/07/11 01:30:58 ilyas ++ * Changed status for ShowtimeMargin reporting ++ * ++ * Revision 1.148 2002/07/09 19:19:09 ilyas ++ * Added status parameters for ShowtimeSNRMargin info and command to filter ++ * out SNR margin data ++ * ++ * Revision 1.147 2002/06/27 21:50:24 liang ++ * Added test command related demodCapabilities bits. ++ * ++ * Revision 1.146 2002/06/26 21:29:00 liang ++ * Added dsl test cmd structure and showtime margin connection info status. ++ * ++ * Revision 1.145 2002/06/15 05:15:51 ilyas ++ * Added definitions for Ping, Dying Gasp and other test commands ++ * ++ * Revision 1.144 2002/05/30 19:55:15 ilyas ++ * Added status for ADSL PHY MIPS exception ++ * Changed conflicting definition for higher rates (S=1/2) ++ * ++ * Revision 1.143 2002/05/21 23:41:07 yongbing ++ * First check-in of Annex C S=1/2 codes ++ * ++ * Revision 1.142 2002/04/29 22:25:09 georgep ++ * Merge from branch annexC_demo - add status message constants ++ * ++ * Revision 1.141 2002/04/18 19:00:35 ilyas ++ * Added include file for builds in CommEngine environment ++ * ++ * Revision 1.140 2002/04/18 00:18:36 yongbing ++ * Add detailed timeout error messages ++ * ++ * Revision 1.139 2002/04/02 10:03:18 ilyas ++ * Merged BERT from AnnexA branch ++ * ++ * Revision 1.138 2002/03/26 01:42:29 ilyas ++ * Added timeout message constants for annex C ++ * ++ * Revision 1.137 2002/03/22 19:39:22 yongbing ++ * Modify for co-exist of G994P1 and T1P413 ++ * ++ * Revision 1.136 2002/03/22 01:19:40 ilyas ++ * Add status message constants for total FEXT Bits, NEXT bits ++ * ++ * Revision 1.135 2002/03/10 22:32:24 liang ++ * Added report constants for LOS recovery and timing tone index. ++ * ++ * Revision 1.134 2002/03/07 22:06:32 georgep ++ * Replace ifdef G992P1 with G992P1_ANNEX_A for annex A variables ++ * ++ * Revision 1.133 2002/02/16 01:08:18 georgep ++ * Add log constant for showtime mse ++ * ++ * Revision 1.132 2002/02/08 04:36:27 ilyas ++ * Added commands for LOG file and fixed Idle mode pointer update ++ * ++ * Revision 1.131 2002/01/24 20:21:30 georgep ++ * Add logging defines, remove fast retrain defines ++ * ++ * Revision 1.130 2002/01/19 23:59:17 ilyas ++ * Added support for LOG and eye data to ADSL core target ++ * ++ * Revision 1.129 2002/01/16 23:43:54 liang ++ * Remove the carriage return character from last checkin. ++ * ++ * Revision 1.128 2002/01/15 22:27:13 ilyas ++ * Added command for ADSL loopback ++ * ++ * Revision 1.127 2002/01/10 07:18:22 ilyas ++ * Added status for printf (mainly for ADSL core debugging) ++ * ++ * Revision 1.126 2001/12/21 22:45:34 ilyas ++ * Added support for ADSL MIB data object ++ * ++ * Revision 1.125 2001/12/13 02:24:22 ilyas ++ * Added G997 (Clear EOC and G997 framer) support ++ * ++ * Revision 1.124 2001/11/30 05:56:31 liang ++ * Merged top of the branch AnnexBDevelopment onto top of the tree. ++ * ++ * Revision 1.123 2001/11/15 19:01:07 yongbing ++ * Modify only T1.413 part to the top of tree based on AnnexBDevelopment branch ++ * ++ * Revision 1.122 2001/10/19 00:12:07 ilyas ++ * Added support for frame oriented (no ATM) data link layer ++ * ++ * Revision 1.121 2001/10/09 22:35:13 ilyas ++ * Added more ATM statistics and OAM support ++ * ++ * Revision 1.105.2.20 2001/11/27 02:32:03 liang ++ * Combine vendor ID, serial #, and version number into SoftModemVersionNumber.c. ++ * ++ * Revision 1.105.2.19 2001/11/21 01:29:14 georgep ++ * Add a status message define for annexC ++ * ++ * Revision 1.105.2.18 2001/11/08 23:26:28 yongbing ++ * Add carrier selection function for Annex A and B ++ * ++ * Revision 1.105.2.17 2001/11/07 22:55:30 liang ++ * Report G992 rcv msg CRC error as what it is instead of time out. ++ * ++ * Revision 1.105.2.16 2001/11/05 19:56:21 liang ++ * Add DC offset info code. ++ * ++ * Revision 1.105.2.15 2001/10/16 00:47:16 yongbing ++ * Add return-to-T1p413 starting point if in error ++ * ++ * Revision 1.105.2.14 2001/10/15 23:14:01 yjchen ++ * remove ADSL_SINGLE_SYMBOL_BLOCK ++ * ++ * Revision 1.105.2.13 2001/10/12 18:07:16 yongbing ++ * Add support for T1.413 ++ * ++ * Revision 1.105.2.12 2001/10/04 00:23:52 liang ++ * Add connection info constants for TEQ coef and PSD. ++ * ++ * Revision 1.105.2.11 2001/10/03 01:44:01 liang ++ * Merged with codes from main tree (tag SoftDsl_2_18). ++ * ++ * Revision 1.105.2.10 2001/09/28 22:10:04 liang ++ * Add G994 exchange message status reports. ++ * ++ * Revision 1.105.2.9 2001/09/26 18:08:21 georgep ++ * Send status error message in case features field is not setup properly ++ * ++ * Revision 1.105.2.8 2001/09/05 01:58:13 georgep ++ * Added status message for annexC measured delay ++ * ++ * Revision 1.105.2.7 2001/08/29 00:37:52 georgep ++ * Add log constants for annexC ++ * ++ * Revision 1.105.2.6 2001/08/18 00:01:34 georgep ++ * Add constants for annexC ++ * ++ * Revision 1.105.2.5 2001/08/08 17:33:28 yongbing ++ * Merge with tag SoftDsl_2_17 ++ * ++ * Revision 1.120 2001/08/29 02:56:01 ilyas ++ * Added tests for flattening/unflatenning command and statuses (dual mode) ++ * ++ * Revision 1.119 2001/08/28 03:26:32 ilyas ++ * Added support for running host and adsl core parts separately ("dual" mode) ++ * ++ * Revision 1.118 2001/08/16 02:16:10 khp ++ * - mark functions with FAST_TEXT to reduce cycle counts for QPROC targets ++ * (replaces use of LMEM_INSN) ++ * ++ * Revision 1.117 2001/06/18 20:06:35 ilyas ++ * Added forward declaration of dslCommandStruc to avoid gcc warnings ++ * ++ * Revision 1.116 2001/06/18 19:49:36 ilyas ++ * Changes to include support for HOST_ONLY mode ++ * ++ * Revision 1.115 2001/06/01 22:00:33 ilyas ++ * Changed ATM PHY interface to accomodate UTOPIA needs ++ * ++ * Revision 1.114 2001/05/16 06:22:24 liang ++ * Added status reports for xmt & rcv prefix enable position. ++ * ++ * Revision 1.113 2001/05/02 20:34:32 georgep ++ * Added log constants for snr1 calculation ++ * ++ * Revision 1.112 2001/04/25 01:20:11 ilyas ++ * ++ * Don't use DSL frame functions if ATM_LAYER is not defined ++ * ++ * Revision 1.111 2001/04/17 21:13:00 georgep ++ * Define status constant kDslHWSetDigitalEcUpdateShift ++ * ++ * Revision 1.110 2001/04/16 23:38:36 georgep ++ * Add HW AGC constants for ATUR ++ * ++ * Revision 1.109 2001/04/06 23:44:53 georgep ++ * Added status constant for setting up digitalEcGainShift ++ * ++ * Revision 1.108 2001/03/29 05:58:34 liang ++ * Replaced the Aware compatibility codes with automatic detection codes. ++ * ++ * Revision 1.107 2001/03/25 06:11:22 liang ++ * Combined separate loop attenuation status for ATUR & ATUC into one status. ++ * Replace separate hardware AGC info status for ATUR & ATUC into hardware AGC ++ * request status and hardware AGC obtained status. ++ * Use store AGC command to save hardware AGC value instead of returning value ++ * from status report. ++ * ++ * Revision 1.106 2001/03/24 00:43:22 liang ++ * Report more checksum results (NumOfCalls, txSignal, rxSignal & eyeData). ++ * ++ * Revision 1.105 2001/03/16 23:57:31 georgep ++ * Added more loop attenuation reporting status constants ++ * ++ * Revision 1.104 2001/03/15 00:22:07 liang ++ * Back to version 1.101. ++ * ++ * Revision 1.103 2001/03/15 00:03:44 yjchen ++ * use kDslATURHardwareAGCInfo for AltoE14 AGC as well ++ * ++ * Revision 1.102 2001/03/14 23:10:56 yjchen ++ * add defns for AltoE14 AGC ++ * ++ * Revision 1.101 2001/03/08 23:31:34 georgep ++ * Added R, S, D, coding parameters to dslDataPumpCapabilities ++ * ++ * Revision 1.100 2001/02/10 03:03:09 ilyas ++ * Added one more DslFrame function ++ * ++ * Revision 1.99 2001/02/09 01:55:27 ilyas ++ * Added status codes and macros to support printing of AAL packets ++ * ++ * Revision 1.98 2001/01/30 23:28:10 georgep ++ * Added kDslDspControlStatus for handling changes to dsp params ++ * ++ * Revision 1.97 2001/01/12 01:17:18 georgep ++ * Added bit in demodCapabilities for analog echo cancellor ++ * ++ * Revision 1.96 2001/01/04 05:51:03 ilyas ++ * Added more dslStatuses ++ * ++ * Revision 1.95 2000/12/21 05:46:07 ilyas ++ * Added name for struct _dslFrame ++ * ++ * Revision 1.94 2000/12/13 22:04:39 liang ++ * Add Reed-Solomon coding enable bit in demodCapabilities. ++ * ++ * Revision 1.93 2000/11/29 20:42:02 liang ++ * Add defines for SNR & max achivable rate status and DEC enable demodCapabilities bit. ++ * ++ * Revision 1.92 2000/09/22 21:55:13 ilyas ++ * Added support for DSL + Atm physical layer only (I.432) simulations ++ * ++ * Revision 1.91 2000/09/10 09:20:53 lkaplan ++ * Improve interface for sending Eoc messages ++ * ++ * Revision 1.90 2000/09/08 19:37:58 lkaplan ++ * Added code for handling EOC messages ++ * ++ * Revision 1.89 2000/09/07 23:02:27 georgep ++ * Add HarwareAGC Bit to demod Capabilities ++ * ++ * Revision 1.88 2000/09/01 00:57:34 georgep ++ * Added Hardware AGC status defines ++ * ++ * Revision 1.87 2000/08/31 19:04:26 liang ++ * Added external reference for stack size requirement test functions. ++ * ++ * Revision 1.86 2000/08/24 23:16:46 liang ++ * Increased sample block size for noBlock. ++ * ++ * Revision 1.85 2000/08/23 18:34:39 ilyas ++ * Added XxxVcConfigure function ++ * ++ * Revision 1.84 2000/08/05 00:25:04 georgep ++ * Redefine sampling freq constants ++ * ++ * Revision 1.83 2000/08/03 14:04:00 liang ++ * Add hardware time tracking clock error reset code. ++ * ++ * Revision 1.82 2000/07/23 20:52:52 ilyas ++ * Added xxxFrameBufSetAddress() function for ATM framer layers ++ * Rearranged linkLayer functions in one structure which is passed as a ++ * parameter to xxxLinkLayerInit() function to be set there ++ * ++ * Revision 1.81 2000/07/18 20:03:24 ilyas ++ * Changed DslFrame functions definitions to macros, ++ * Removed gDslVars from their parameter list ++ * ++ * Revision 1.80 2000/07/17 21:08:15 lkaplan ++ * removed global pointer ++ * ++ * Revision 1.79 2000/06/21 20:38:44 georgep ++ * Added bit to demodCapabilities for HW_TIME_TRACKING ++ * ++ * Revision 1.78 2000/06/19 19:57:55 georgep ++ * Added constants for logging of HWResampler data ++ * ++ * Revision 1.77 2000/06/02 18:57:21 ilyas ++ * Added support for DSL buffers consisting of many ATM cells ++ * ++ * Revision 1.76 2000/05/27 02:19:28 liang ++ * G992MonitorParams structure is moved here, and Tx/Rx data handler type definitions changed. ++ * ++ * Revision 1.75 2000/05/15 18:17:21 liang ++ * Added statuses for sent and received frames ++ * ++ * Revision 1.74 2000/05/14 01:56:38 ilyas ++ * Added ATM cell printouts ++ * ++ * Revision 1.73 2000/05/09 23:00:26 ilyas ++ * Added ATM status messages, ATM timer, Tx frames flush on timeout ++ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames ++ * ++ * Revision 1.72 2000/05/03 18:01:18 georgep ++ * Removed old function declarations for Eoc/Aoc ++ * ++ * Revision 1.71 2000/05/03 03:57:04 ilyas ++ * Added LOG file support for writing ATM data ++ * ++ * Revision 1.70 2000/05/02 00:04:36 liang ++ * Add showtime monitoring and message exchange info constants. ++ * ++ * Revision 1.69 2000/04/28 23:34:20 yongbing ++ * Add constants for reporting error events in performance monitoring ++ * ++ * Revision 1.68 2000/04/21 23:09:04 liang ++ * Added G992 time out training progress constant. ++ * ++ * Revision 1.67 2000/04/19 00:31:47 ilyas ++ * Added global SoftDsl functions for Vc, added OOB info functions ++ * ++ * Revision 1.66 2000/04/18 00:45:31 yongbing ++ * Add G.DMT new frame structure, define G992P1_NEWFRAME to enable, need ATM layer to work ++ * ++ * Revision 1.65 2000/04/15 01:48:34 georgep ++ * Added T1p413 status constants ++ * ++ * Revision 1.64 2000/04/13 08:36:22 yura ++ * Added SoftDslSetRefData, SoftDslGetRefData functions ++ * ++ * Revision 1.63 2000/04/13 05:42:35 georgep ++ * Added constant for T1p413 ++ * ++ * Revision 1.62 2000/04/05 21:49:54 liang ++ * minor change. ++ * ++ * Revision 1.61 2000/04/04 04:16:06 liang ++ * Merged with SoftDsl_0_03 from old tree. ++ * ++ * Revision 1.65 2000/04/04 01:47:21 ilyas ++ * Implemented abstract dslFrame and dslFrameBuffer objects ++ * ++ * Revision 1.64 2000/04/01 08:12:10 yura ++ * Added preliminary revision of the SoftDsl driver architecture ++ * ++ * Revision 1.63 2000/04/01 02:55:33 georgep ++ * New defines for G992p2Profile Structure ++ * ++ * Revision 1.62 2000/04/01 00:50:36 yongbing ++ * Add initial version of new frame structure for full-rate ++ * ++ * Revision 1.61 2000/03/24 03:30:45 georgep ++ * Define new constant kDslUpstreamSamplingFreq ++ * ++ * Revision 1.60 2000/03/23 19:51:30 georgep ++ * Define new features bits for G992p1 ++ * ++ * Revision 1.59 2000/03/18 01:28:41 georgep ++ * Changed connectionSetup to include G992p1 Capabilities ++ * ++ * Revision 1.58 2000/02/29 01:40:03 georgep ++ * Changed modulationtype defines to be the same as SPAR1 in G994p1 ++ * ++ * Revision 1.57 1999/11/19 01:03:19 george ++ * Use Block Size 256 for single symbol Mode ++ * ++ * Revision 1.56 1999/11/18 02:37:43 george ++ * Porting to 16Bit ++ * ++ * Revision 1.55 1999/11/12 02:12:55 george ++ * Added status constant for reporting of profile channel matching calculation ++ * ++ * Revision 1.54 1999/11/11 19:19:42 george ++ * Porting to 16Bit Compiler ++ * ++ * Revision 1.53 1999/11/05 01:27:06 liang ++ * Add recovery-from-inpulse-noise progress report. ++ * ++ * Revision 1.52 1999/11/02 02:06:27 george ++ * Added SNRMargin training status value ++ * ++ * Revision 1.51 1999/10/27 23:02:03 wan ++ * Add G.994.1 setup in dslConnectionSetupStruct for setting up Initiation side ++ * ++ * Revision 1.50 1999/10/25 21:55:36 liang ++ * Renamed the constant for FEQ output error. ++ * ++ * Revision 1.49 1999/10/23 02:20:55 george ++ * Add debug data codes ++ * ++ * Revision 1.48 1999/10/19 23:59:06 liang ++ * Change line handler interface to work with nonsymmetric sampling freq. ++ * ++ * Revision 1.47 1999/10/09 01:38:04 george ++ * Define maxProfileNumber ++ * ++ * Revision 1.46 1999/10/07 23:30:51 wan ++ * Add G.994.1 Tone and Fast Retrain Recov detections in G.992p2 SHOWTIME and Fast Retrain ++ * ++ * Revision 1.45 1999/10/06 13:59:27 liang ++ * Escape to G994.1 should be done through status instead of command. ++ * ++ * Revision 1.44 1999/10/06 02:01:28 george ++ * Add kDslReturnToG994p1Cmd ++ * ++ * Revision 1.43 1999/09/30 19:29:58 george ++ * Add reporting constant for Fast Retrain ++ * ++ * Revision 1.42 1999/09/16 23:41:56 liang ++ * Added command for host forced retrain. ++ * ++ * Revision 1.41 1999/08/20 00:47:25 wan ++ * Add constants for Fast Retrain progress status ++ * ++ * Revision 1.40 1999/08/16 18:06:01 wan ++ * Add more reporting constants for Fast Retrain ++ * ++ * Revision 1.39 1999/08/12 00:18:10 wan ++ * Add several Fast Retrain Status constants ++ * ++ * Revision 1.38 1999/08/10 18:25:38 george ++ * Define constants used for Fast Retrain ++ * ++ * Revision 1.37 1999/07/31 01:47:43 george ++ * Add status constants for eoc/aoc ++ * ++ * Revision 1.36 1999/07/27 18:19:52 george ++ * declare aoc/eoc functions ++ * ++ * Revision 1.35 1999/07/19 22:44:47 george ++ * Add constants for G994p1 Message Exchange ++ * ++ * Revision 1.34 1999/07/16 02:03:03 liang ++ * Modified Dsl link layer command spec structure. ++ * ++ * Revision 1.33 1999/07/14 22:53:16 george ++ * Add Constants for G994p1 ++ * ++ * Revision 1.32 1999/07/13 00:02:26 liang ++ * Added more feature bits. ++ * ++ * Revision 1.31 1999/07/09 01:58:14 wan ++ * Added more constants G.994.1 testing reports ++ * ++ * Revision 1.30 1999/07/07 23:51:04 liang ++ * Added rcv power and loop attenuation reports. ++ * ++ * Revision 1.29 1999/07/06 21:32:01 liang ++ * Added some aux. feature bits, and field performanceMargin was changed to noiseMargin in Capabilities. ++ * ++ * Revision 1.28 1999/07/03 01:40:17 liang ++ * Redefined dsl command parameter list and added connection setup struct. ++ * ++ * Revision 1.27 1999/07/02 00:41:18 liang ++ * Add bit and gain logging as well as rcv carrier range status. ++ * ++ * Revision 1.26 1999/06/25 21:37:10 wan ++ * Work in progress for G994.1. ++ * ++ * Revision 1.25 1999/06/16 00:54:36 liang ++ * Added Tx/Rx SHOWTIME active training progress codes. ++ * ++ * Revision 1.24 1999/06/11 21:59:37 wan ++ * Added G994.1 fail status constant. ++ * ++ * Revision 1.23 1999/06/11 21:29:01 liang ++ * Constants for C/R-Msgs was changed to C/R-Msg. ++ * ++ * Revision 1.22 1999/06/08 02:49:42 liang ++ * Added SNR data logging. ++ * ++ * Revision 1.21 1999/06/07 21:05:08 liang ++ * Added more training status values. ++ * ++ * Revision 1.20 1999/05/22 02:18:26 liang ++ * More constant defines. ++ * ++ * Revision 1.19 1999/05/14 22:49:35 liang ++ * Added more status codes and debug data codes. ++ * ++ * Revision 1.18 1999/04/12 22:41:39 liang ++ * Work in progress. ++ * ++ * Revision 1.17 1999/04/01 20:28:07 liang ++ * Added RReverb detect event status. ++ * ++ * Revision 1.16 1999/03/26 03:29:54 liang ++ * Add DSL debug data constants. ++ * ++ * Revision 1.15 1999/03/08 21:58:00 liang ++ * Added more constant definitions. ++ * ++ * Revision 1.14 1999/03/02 01:49:36 liang ++ * Added more connection info codes. ++ * ++ * Revision 1.13 1999/03/02 00:25:55 liang ++ * Added DSL tx and rx data handler type definitions. ++ * ++ * Revision 1.12 1999/02/27 01:16:55 liang ++ * Increase allowable static memory size to a VERY large number for now. ++ * ++ * Revision 1.11 1999/02/25 00:24:06 liang ++ * Increased symbol block size to 16. ++ * ++ * Revision 1.10 1999/02/23 22:03:26 liang ++ * Increased maximal static memory size allowed. ++ * ++ * Revision 1.9 1999/02/17 02:39:21 ilyas ++ * Changes for NDIS ++ * ++ * Revision 1.8 1999/02/11 22:44:30 ilyas ++ * More definitions for ATM ++ * ++ * Revision 1.7 1999/02/10 01:56:38 liang ++ * Added hooks for G994.1 and G992.2. ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef SoftDslHeader ++#define SoftDslHeader ++ ++/* for builds in Linux/VxWorks CommEngine environment */ ++#if (defined(__KERNEL__) && !defined(LINUX_DRIVER)) || defined(VXWORKS) || defined(_WIN32_WCE) || defined(TARG_OS_RTEMS) || defined(_CFE_) ++#include "AdslCoreDefs.h" ++#else ++#include "Bcm6345_To_Bcm6348.h" /* File for 45->48 changes */ ++#endif ++ ++#ifndef SoftModemPh ++#include "SoftModem.h" ++#endif ++ ++#ifdef DSL_OS ++#include "DslOs.h" ++#endif ++ ++/* ++** ++** Type definitions ++** ++*/ ++ ++#if defined(ATM) || defined(DSL_PACKET) ++#define DSL_LINKLAYER ++#endif ++ ++#if defined(ATM_LAYER) || defined(DSL_PACKET_LAYER) || defined(G997_1_FRAMER) ++#define DSL_FRAME_FUNCTIONS ++#endif ++ ++#define FLD_OFFSET(type,fld) ((int)(void *)&(((type *)0)->fld)) ++ ++#include "Que.h" ++#include "SoftAtmVc.h" ++ ++typedef struct _dslFrameBuffer ++ { ++ struct _dslFrameBuffer *next; /* link to the next buffer in the frame */ ++ void *pData; /* pointer to data */ ++ ulong length; /* size (in bytes) of data */ ++ } dslFrameBuffer; ++ ++typedef struct _dslFrame ++ { ++ ulong Reserved[3]; ++ ++ ulong totalLength; /* total amount of data in the packet */ ++ int bufCnt; /* buffer counter */ ++ struct _dslFrameBuffer *head; /* first buffer in the chain */ ++ struct _dslFrameBuffer *tail; /* last buffer in the chain */ ++ } dslFrame; ++ ++ ++/* VC types and parameters */ ++ ++#define kDslVcAtm 1 ++ ++typedef struct ++ { ++ ulong vcType; ++ union ++ { ++ atmVcParams atmParams; ++ } params; ++ } dslVcParams; ++ ++/* ++** Assuming that dslVcParams.params is the first field in VC ++** and RefData is the first field in dslVcParams.params ++*/ ++ ++#define DslVcGetRefData(pVc) (*(void **) (pVc)) ++ ++/* Frame OOB types */ ++ ++#define kDslFrameAtm 1 ++ ++typedef struct ++ { ++ ulong frameType; ++ union ++ { ++ atmOobPacketInfo atmInfo; ++ } param; ++ } dslOobFrameInfo; ++ ++ ++typedef struct ++ { ++ ulong (SM_DECL *__DslFrameBufferGetLength) (dslFrameBuffer *fb); ++ void * (SM_DECL *__DslFrameBufferGetAddress) (dslFrameBuffer *fb); ++ void (SM_DECL *__DslFrameBufferSetLength) (dslFrameBuffer *fb, ulong l); ++ void (SM_DECL *__DslFrameBufferSetAddress) (dslFrameBuffer *fb, void *p); ++ ++ void (SM_DECL *__DslFrameInit) (dslFrame *f); ++ ulong (SM_DECL *__DslFrameGetLength) (dslFrame *pFrame); ++ ulong (SM_DECL *__DslFrameGetBufCnt) (dslFrame *pFrame); ++ dslFrameBuffer * (SM_DECL *__DslFrameGetFirstBuffer) (dslFrame *pFrame); ++ dslFrameBuffer * (SM_DECL *__DslFrameGetNextBuffer) (dslFrameBuffer *pFrBuffer); ++ void (SM_DECL *__DslFrameSetNextBuffer) (dslFrameBuffer *pFrBuf, dslFrameBuffer *pFrBufNext); ++ dslFrameBuffer * (SM_DECL *__DslFrameGetLastBuffer) (dslFrame *pFrame); ++ void * (SM_DECL *__DslFrameGetLinkFieldAddress) (dslFrame *f); ++ dslFrame * (SM_DECL *__DslFrameGetFrameAddressFromLink) (void *lnk); ++ ++ Boolean (SM_DECL *__DslFrameGetOobInfo) (dslFrame *f, dslOobFrameInfo *pOobInfo); ++ Boolean (SM_DECL *__DslFrameSetOobInfo) (dslFrame *f, dslOobFrameInfo *pOobInfo); ++ ++ void (SM_DECL *__DslFrameEnqueBufferAtBack) (dslFrame *f, dslFrameBuffer *b); ++ void (SM_DECL *__DslFrameEnqueFrameAtBack) (dslFrame *fMain, dslFrame *f); ++ void (SM_DECL *__DslFrameEnqueBufferAtFront) (dslFrame *f, dslFrameBuffer *b); ++ void (SM_DECL *__DslFrameEnqueFrameAtFront) (dslFrame *fMain, dslFrame *f); ++ dslFrameBuffer * (SM_DECL *__DslFrameDequeBuffer) (dslFrame *pFrame); ++ ++ void * (SM_DECL *__DslFrameAllocMemForFrames) (ulong frameNum); ++ void (SM_DECL *__DslFrameFreeMemForFrames) (void *hMem); ++ dslFrame * (SM_DECL *__DslFrameAllocFrame) (void *handle); ++ void (SM_DECL *__DslFrameFreeFrame) (void *handle, dslFrame *pFrame); ++ void * (SM_DECL *__DslFrameAllocMemForBuffers) (void **ppMemPool, ulong bufNum, ulong memSize); ++ void (SM_DECL *__DslFrameFreeMemForBuffers) (void *hMem, ulong memSize, void *pMemPool); ++ dslFrameBuffer * (SM_DECL *__DslFrameAllocBuffer) (void *handle, void *pMem, ulong length); ++ void (SM_DECL *__DslFrameFreeBuffer) (void *handle, dslFrameBuffer *pBuf); ++ ++ /* for LOG file support */ ++ ++ ulong (SM_DECL *__DslFrame2Id)(void *handle, dslFrame *pFrame); ++ void * (SM_DECL *__DslFrameId2Frame)(void *handle, ulong frameId); ++ } dslFrameFunctions; ++ ++#define DslFrameDeclareFunctions( name_prefix ) \ ++extern ulong SM_DECL name_prefix##BufferGetLength(dslFrameBuffer *fb); \ ++extern void * SM_DECL name_prefix##BufferGetAddress(dslFrameBuffer *fb); \ ++extern void SM_DECL name_prefix##BufferSetLength(dslFrameBuffer *fb, ulong l); \ ++extern void SM_DECL name_prefix##BufferSetAddress(dslFrameBuffer *fb, void *p); \ ++ \ ++extern void SM_DECL name_prefix##Init(dslFrame *f); \ ++extern ulong SM_DECL name_prefix##GetLength (dslFrame *pFrame); \ ++extern ulong SM_DECL name_prefix##GetBufCnt(dslFrame *pFrame); \ ++extern dslFrameBuffer * SM_DECL name_prefix##GetFirstBuffer(dslFrame *pFrame); \ ++extern dslFrameBuffer * SM_DECL name_prefix##GetNextBuffer(dslFrameBuffer *pFrBuffer); \ ++extern void SM_DECL name_prefix##SetNextBuffer(dslFrameBuffer *pFrBuf, dslFrameBuffer *pFrBufNext); \ ++extern dslFrameBuffer * SM_DECL name_prefix##GetLastBuffer(dslFrame *pFrame); \ ++extern void * SM_DECL name_prefix##GetLinkFieldAddress(dslFrame *f); \ ++extern Boolean SM_DECL name_prefix##GetOobInfo(dslFrame *f, dslOobFrameInfo *pOobInfo); \ ++extern Boolean SM_DECL name_prefix##SetOobInfo(dslFrame *f, dslOobFrameInfo *pOobInfo); \ ++extern dslFrame* SM_DECL name_prefix##GetFrameAddressFromLink(void *lnk); \ ++extern void SM_DECL name_prefix##EnqueBufferAtBack(dslFrame *f, dslFrameBuffer *b); \ ++extern void SM_DECL name_prefix##EnqueFrameAtBack(dslFrame *fMain, dslFrame *f); \ ++extern void SM_DECL name_prefix##EnqueBufferAtFront(dslFrame *f, dslFrameBuffer *b); \ ++extern void SM_DECL name_prefix##EnqueFrameAtFront(dslFrame *fMain, dslFrame *f); \ ++extern dslFrameBuffer * SM_DECL name_prefix##DequeBuffer(dslFrame *pFrame); \ ++ \ ++extern void * SM_DECL name_prefix##AllocMemForFrames(ulong frameNum); \ ++extern void SM_DECL name_prefix##FreeMemForFrames(void *hMem); \ ++extern dslFrame * SM_DECL name_prefix##AllocFrame(void *handle); \ ++extern void SM_DECL name_prefix##FreeFrame(void *handle, dslFrame *pFrame); \ ++extern void * SM_DECL name_prefix##AllocMemForBuffers(void **ppMemPool, ulong bufNum, ulong memSize); \ ++extern void SM_DECL name_prefix##FreeMemForBuffers(void *hMem, ulong memSize, void *pMemPool); \ ++extern dslFrameBuffer * SM_DECL name_prefix##AllocBuffer(void *handle, void *pMem, ulong length); \ ++extern void SM_DECL name_prefix##FreeBuffer(void *handle, dslFrameBuffer *pBuf); \ ++extern ulong SM_DECL name_prefix##2Id(void *handle, dslFrame *pFrame); \ ++extern void * SM_DECL name_prefix##Id2Frame(void *handle, ulong frameId); ++ ++ ++#define DslFrameAssignFunctions( var, name_prefix ) do { \ ++ (var).__DslFrameBufferGetLength = name_prefix##BufferGetLength; \ ++ (var).__DslFrameBufferGetAddress= name_prefix##BufferGetAddress; \ ++ (var).__DslFrameBufferSetLength = name_prefix##BufferSetLength; \ ++ (var).__DslFrameBufferSetAddress= name_prefix##BufferSetAddress; \ ++ \ ++ (var).__DslFrameInit = name_prefix##Init; \ ++ (var).__DslFrameGetLength = name_prefix##GetLength; \ ++ (var).__DslFrameGetBufCnt = name_prefix##GetBufCnt; \ ++ (var).__DslFrameGetFirstBuffer = name_prefix##GetFirstBuffer; \ ++ (var).__DslFrameGetNextBuffer = name_prefix##GetNextBuffer; \ ++ (var).__DslFrameSetNextBuffer = name_prefix##SetNextBuffer; \ ++ (var).__DslFrameGetLastBuffer = name_prefix##GetLastBuffer; \ ++ (var).__DslFrameGetLinkFieldAddress = name_prefix##GetLinkFieldAddress; \ ++ (var).__DslFrameGetFrameAddressFromLink = name_prefix##GetFrameAddressFromLink; \ ++ \ ++ (var).__DslFrameGetOobInfo = name_prefix##GetOobInfo; \ ++ (var).__DslFrameSetOobInfo = name_prefix##SetOobInfo; \ ++ \ ++ (var).__DslFrameEnqueBufferAtBack = name_prefix##EnqueBufferAtBack; \ ++ (var).__DslFrameEnqueFrameAtBack = name_prefix##EnqueFrameAtBack; \ ++ (var).__DslFrameEnqueBufferAtFront= name_prefix##EnqueBufferAtFront; \ ++ (var).__DslFrameEnqueFrameAtFront = name_prefix##EnqueFrameAtFront; \ ++ (var).__DslFrameDequeBuffer = name_prefix##DequeBuffer; \ ++ \ ++ (var).__DslFrameAllocMemForFrames = name_prefix##AllocMemForFrames; \ ++ (var).__DslFrameFreeMemForFrames = name_prefix##FreeMemForFrames; \ ++ (var).__DslFrameAllocFrame = name_prefix##AllocFrame; \ ++ (var).__DslFrameFreeFrame = name_prefix##FreeFrame; \ ++ (var).__DslFrameAllocMemForBuffers= name_prefix##AllocMemForBuffers; \ ++ (var).__DslFrameFreeMemForBuffers = name_prefix##FreeMemForBuffers; \ ++ (var).__DslFrameAllocBuffer = name_prefix##AllocBuffer; \ ++ (var).__DslFrameFreeBuffer = name_prefix##FreeBuffer; \ ++ \ ++ (var).__DslFrame2Id = name_prefix##2Id; \ ++ (var).__DslFrameId2Frame = name_prefix##Id2Frame; \ ++} while (0) ++ ++typedef struct ++ { ++ Boolean febe_I; ++ Boolean fecc_I; ++ Boolean los, rdi; ++ Boolean ncd_I; ++ Boolean hec_I; ++#ifdef G992P3 ++ Boolean lpr; ++#endif ++ ++#ifdef G992P1_NEWFRAME ++ ++ Boolean febe_F; ++ Boolean fecc_F; ++ Boolean ncd_F; ++ Boolean hec_F; ++ ++#endif ++ } G992MonitorParams; ++ ++typedef struct ++ { ++ ushort K; ++ uchar S, R; ++ uchar D; ++#ifdef G992P3 ++ uchar T, SEQ; ++#endif ++ directionType direction; ++ ++#ifdef G992P1_NEWFRAME ++ ++ ushort N; ++ ushort NF; ++ uchar RSF; ++ ++ uchar AS0BF, AS1BF, AS2BF, AS3BF, AEXAF; ++ ushort AS0BI; ++ uchar AS1BI, AS2BI, AS3BI, AEXAI; ++ ++ uchar LS0CF, LS1BF, LS2BF, LEXLF; ++ uchar LS0CI, LS1BI, LS2BI, LEXLI; ++ ++ uchar mergedModeEnabled; ++ ++#endif ++ ++ } G992CodingParams; ++ ++typedef struct ++ { ++ uchar Nlp; ++ uchar Nbc; ++ uchar MSGlp; ++ ushort MSGc; ++ ++ ulong L; ++ ushort M; ++ ushort T; ++ ushort D; ++ ushort R; ++ ushort B; ++ } G992p3CodingParams; ++ ++/* Power Management Message definitions (used in command and status) */ ++ ++typedef struct ++ { ++ long msgType; ++ union ++ { ++ long value; ++ struct ++ { ++ long msgLen; ++ void *msgData; ++ } msg; ++ } param; ++ } dslPwrMessage; ++ ++/* Power Management commands and responses */ ++ ++#define kPwrSimpleRequest 1 ++#define kPwrL2Request 2 ++#define kPwrL2TrimRequest 3 ++ ++#define kPwrGrant 0x80 ++#define kPwrReject 0x81 ++#define kPwrL2Grant 0x82 ++#define kPwrL2Reject 0x83 ++#define kPwrL2TrimGrant 0x84 ++#define kPwrL2TrimReject 0x85 ++#define kPwrL2Grant2p 0x86 ++ ++#define kPwrBusy 0x01 ++#define kPwrInvalid 0x02 ++#define kPwrNotDesired 0x03 ++#define kPwrInfeasibleParam 0x04 ++ ++/* Power Management reason codes */ ++ ++/* OLR definitions (used in command and status) */ ++ ++typedef struct ++ { ++ ushort msgType; ++ ushort nCarrs; ++ ushort L[4]; ++ uchar B[4]; ++ void *carrParamPtr; ++ } dslOLRMessage; ++ ++typedef struct ++ { ++ uchar ind; ++ uchar gain; ++ uchar gb; ++ } dslOLRCarrParam; ++ ++typedef struct ++ { ++ ushort ind; ++ uchar gain; ++ uchar gb; ++ } dslOLRCarrParam2p; ++ ++/* OLR messages */ ++ ++#define kOLRRequestType1 1 ++#define kOLRRequestType2 2 ++#define kOLRRequestType3 3 ++#define kOLRRequestType4 4 ++#define kOLRRequestType5 5 ++#define kOLRRequestType6 6 ++ ++#define kOLRDeferType1 0x81 ++#define kOLRRejectType2 0x82 ++#define kOLRRejectType3 0x83 ++ ++/* OLR reason codes */ ++ ++#define kOLRBusy 1 ++#define kOLRInvalidParam 2 ++#define kOLRNotEnabled 3 ++#define kOLRNotSupported 4 ++ ++/* common EOC definitions */ ++#define kG992EocStuffingByte 0x0C ++ ++/* showtime monitor counters */ ++#define kG992ShowtimeRSCodewordsRcved 0 /* number of Reed-Solomon codewords received */ ++#define kG992ShowtimeRSCodewordsRcvedOK 1 /* number of Reed-Solomon codewords received with all symdromes zero */ ++#define kG992ShowtimeRSCodewordsRcvedCorrectable 2 /* number of Reed-Solomon codewords received with correctable errors */ ++#define kG992ShowtimeRSCodewordsRcvedUncorrectable 3 /* number of Reed-Solomon codewords received with un-correctable errors */ ++#define kG992ShowtimeSuperFramesRcvd 4 /* number of super frames received */ ++#define kG992ShowtimeSuperFramesRcvdWrong 5 /* number of super frames received with CRC error */ ++#define kG992ShowtimeLastUncorrectableRSCount 6 /* last recorded value for kG992ShowtimeRSCodewordsRcvedUncorrectable */ ++#define kG992ShowtimeLastWrongSuperFrameCount 7 /* last recorded value for kG992ShowtimeSuperFramesRcvdWrong */ ++#define kG992ShowtimeNumOfShortResync 8 /* number of short interrupt recoveries by FEQ */ ++ ++#define kG992ShowtimeNumOfFEBE 9 /* number of other side superframe errors */ ++#define kG992ShowtimeNumOfFECC 10 /* number of other side superframe FEC errors */ ++#define kG992ShowtimeNumOfFHEC 11 /* number of far-end ATM header CRC errors */ ++#define kG992ShowtimeNumOfFOCD 12 /* number of far-end OCD events */ ++#define kG992ShowtimeNumOfFLCD 13 /* number of far-end LCD events */ ++#define kG992ShowtimeNumOfHEC 14 /* number of ATM header CRC errors */ ++#define kG992ShowtimeNumOfOCD 15 /* number of OCD events */ ++#define kG992ShowtimeNumOfLCD 16 /* number of LCD events */ ++ ++#define kG992ShowtimeNumOfMonitorCounters (kG992ShowtimeNumOfLCD+1) /* always last number + 1 */ ++#define kG992ShowtimeMonitorReportNumber 9 ++ ++#define kG992ShowtimeLCDNumShift 1 ++#define kG992ShowtimeLCDFlag 1 ++ ++typedef int (SM_DECL *dslFrameHandlerType) (void *gDslVars, void *pVc, ulong mid, dslFrame *); ++ ++typedef void* (SM_DECL *dslHeaderHandlerType) (void *gDslVars, ulong hdr, uchar hdrHec); ++typedef void* (SM_DECL *dslTxFrameBufferHandlerType) (void *gDslVars, int*, void*); ++typedef void* (SM_DECL *dslRxFrameBufferHandlerType) (void *gDslVars, int, void*); ++ ++typedef void* (SM_DECL *dslVcAllocateHandlerType) (void *gDslVars, void *); ++typedef void (SM_DECL *dslVcFreeHandlerType) (void *gDslVars, void *); ++typedef Boolean (SM_DECL *dslVcActivateHandlerType) (void *gDslVars, void *); ++typedef void (SM_DECL *dslVcDeactivateHandlerType) (void *gDslVars, void *); ++typedef Boolean (SM_DECL *dslVcConfigureHandlerType) (void *gDslVars, void *pVc, ulong mid, void *); ++ ++typedef ulong (SM_DECL *dslLinkVc2IdHandlerType) (void *gDslVars, void *); ++typedef void* (SM_DECL *dslLinkVcId2VcHandlerType) (void *gDslVars, ulong); ++typedef void* (SM_DECL *dslGetFramePoolHandlerType) (void *gDslVars); ++ ++typedef void (SM_DECL *dslLinkCloseHandlerType) (void *gDslVars); ++typedef int (SM_DECL *dslTxDataHandlerType)(void *gDslVars, int, int, uchar*, G992MonitorParams*); ++typedef int (SM_DECL *dslRxDataHandlerType)(void *gDslVars, int, uchar*, G992MonitorParams*); ++ ++typedef void (SM_DECL *dslLinkStatusHandler) (void *gDslVars, ulong statusCode, ...); ++ ++typedef Boolean (SM_DECL *dslPhyInitType) ( ++ void *gDslVars, ++ bitMap setupMap, ++ dslHeaderHandlerType rxCellHeaderHandlerPtr, ++ dslRxFrameBufferHandlerType rxFrameHandlerPtr, ++ dslTxFrameBufferHandlerType txFrameHandlerPtr, ++ atmStatusHandler statusHandlerPtr); ++ ++struct _dslFramerBufDesc; ++ ++typedef Boolean (SM_DECL *dslFramerDataGetPtrHandlerType) (void *gDslVars, struct _dslFramerBufDesc *pBufDesc); ++typedef void (SM_DECL *dslFramerDataDoneHandlerType) (void *gDslVars, struct _dslFramerBufDesc *pBufDesc); ++ ++typedef void (SM_DECL *dslDriverCallbackType) (void *gDslVars); ++ ++#ifdef DSL_PACKET ++ ++typedef struct ++ { ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; ++ dslFramerDataDoneHandlerType rxDataDoneHandler; ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; ++ dslFramerDataDoneHandlerType txDataDoneHandler; ++ } dslPacketPhyFunctions; ++ ++typedef Boolean (SM_DECL *dslPacketPhyInitType) ( ++ void *gDslVars, ++ bitMap setupMap, ++ dslPacketPhyFunctions dslPhyFunctions, ++ dslLinkStatusHandler statusHandlerPtr); ++ ++ ++#endif /* DSL_PACKET */ ++ ++ ++typedef int dslDirectionType; ++typedef bitMap dslModulationType; ++typedef bitMap dslLinkLayerType; ++ ++/* ++** ++** Log data codes ++** ++*/ ++ ++#define kDslEyeData eyeData ++ ++#define kDslLogComplete (inputSignalData - 1) ++#define kDslLogInputData inputSignalData ++#define kDslLogInputData1 (inputSignalData + 1) ++#define kDslLogInputData2 (inputSignalData + 2) ++#define kDslLogInputData3 (inputSignalData + 3) ++ ++/* ++** ++** Status codes ++** ++*/ ++ ++typedef long dslStatusCode; ++#define kFirstDslStatusCode 256 ++#define kDslError (kFirstDslStatusCode + 0) ++#define kAtmStatus (kFirstDslStatusCode + 1) ++#define kDslTrainingStatus (kFirstDslStatusCode + 2) ++#define kDslConnectInfoStatus (kFirstDslStatusCode + 3) ++#define kDslEscapeToG994p1Status (kFirstDslStatusCode + 4) ++#define kDslFrameStatus (kFirstDslStatusCode + 5) ++#define kDslReceivedEocCommand (kFirstDslStatusCode + 6) ++#define kDslSendEocCommandDone (kFirstDslStatusCode + 7) ++#define kDslSendEocCommandFailed (kFirstDslStatusCode + 8) ++#define kDslWriteRemoteRegisterDone (kFirstDslStatusCode + 9) ++#define kDslReadRemoteRegisterDone (kFirstDslStatusCode + 10) ++#define kDslExternalError (kFirstDslStatusCode + 11) ++#define kDslDspControlStatus (kFirstDslStatusCode + 12) ++#define kDslATUHardwareAGCRequest (kFirstDslStatusCode + 13) ++#define kDslPacketStatus (kFirstDslStatusCode + 14) ++#define kDslG997Status (kFirstDslStatusCode + 15) ++#define kDslPrintfStatus (kFirstDslStatusCode + 16) ++#define kDslPrintfStatus1 (kFirstDslStatusCode + 17) ++#define kDslExceptionStatus (kFirstDslStatusCode + 18) ++#define kDslPingResponse (kFirstDslStatusCode + 19) ++#define kDslShowtimeSNRMarginInfo (kFirstDslStatusCode + 20) ++#define kDslGetOemParameter (kFirstDslStatusCode + 21) ++#define kDslOemDataAddrStatus (kFirstDslStatusCode + 22) ++#define kDslDataAvailStatus (kFirstDslStatusCode + 23) ++/* #define kDslAtuChangeTxFilterRequest (kFirstDslStatusCode + 24) */ ++#define kDslTestPllPhaseResult (kFirstDslStatusCode + 25) ++#ifdef BCM6348_SRC ++#define kDslHardwareAGCSetPga1 (kFirstDslStatusCode + 26) ++#define kDslHardwareAGCDecPga1 (kFirstDslStatusCode + 27) ++#define kDslHardwareAGCIncPga1 (kFirstDslStatusCode + 28) ++#define kDslHardwareAGCSetPga2Delta (kFirstDslStatusCode + 29) ++#endif ++#define kDslOLRRequestStatus (kFirstDslStatusCode + 30) ++#define kDslOLRResponseStatus (kFirstDslStatusCode + 31) ++#define kDslOLRBitGainUpdateStatus (kFirstDslStatusCode + 32) ++#define kDslPwrMgrStatus (kFirstDslStatusCode + 33) ++#define kDslEscapeToT1p413Status (kFirstDslStatusCode + 34) ++#ifdef BCM6348_SRC ++#define kDslHardwareAGCSetPga2 (kFirstDslStatusCode + 35) ++#define kDslHardwareGetRcvAGC (kFirstDslStatusCode + 36) ++#endif ++#define kDslUpdateXmtReadPtr (kFirstDslStatusCode + 37) ++#define kDslHardwareSetRcvAGC (kFirstDslStatusCode + 38) ++#ifdef BCM6348_SRC ++#define kDslSetDigUsPwrCutback (kFirstDslStatusCode + 39) ++#endif ++ ++#define kClientSideInitiation 0 ++#define kClientSideRespond 1 ++#define kCentralSideInitiation 2 ++#define kCentralSideRespond 3 ++ ++/* OEM parameter ID definition */ ++ ++#define kDslOemG994VendorId 1 ++#define kDslOemG994XmtNSInfo 2 ++#define kDslOemG994RcvNSInfo 3 ++#define kDslOemEocVendorId 4 ++#define kDslOemEocVersion 5 ++#define kDslOemEocSerNum 6 ++#define kDslOemT1413VendorId 7 ++#define kDslOemT1413EocVendorId 8 ++ ++typedef long dslErrorCode; ++ ++typedef long atmStatusCode; ++typedef long dslFramerStatusCode; ++ ++typedef long atmErrorCode; ++ ++typedef long dslTrainingStatusCode; ++ ++#define kDslStartedG994p1 0 ++#define kDslStartedT1p413HS 1 ++ ++/* reserved for G.994.1: 1 ~ 8 */ ++ ++#define kDslG994p1MessageDet 100 ++#define kDslG994p1ToneDet 101 ++#define kDslG994p1RToneDet 102 ++#define kDslG994p1FlagDet 103 ++#define kDslG994p1GalfDet 104 ++#define kDslG994p1ErrorFrameDet 105 ++#define kDslG994p1BadFrameDet 106 ++#define kDslG994p1SilenceDet 107 ++#define kDslG994p1RcvTimeout 108 ++#define kDslG994p1XmtFinished 109 ++#define kDslG994p1ReturntoStartup 110 ++#define kDslG994p1InitiateCleardown 111 ++#define kDslG994p1StartupFinished 112 ++#define kDslG994p1RcvNonStandardInfo 113 ++#define kDslG994p1XmtNonStandardInfo 114 ++ ++#define kG994p1MaxNonstdMessageLength 64 ++ ++#define kDslFinishedT1p413 1100 ++#define kDslT1p413DetectedCTone 1101 ++#define kDslT1p413DetectedCAct 1102 ++#define kDslT1p413DetectedCReveille 1103 ++#define kDslT1p413DetectedRActReq 1104 ++#define kDslT1p413DetectedRQuiet1 1105 ++#define kDslT1p413DetectedRAct 1106 ++#define kDslT1p413TimeoutCReveille 1107 ++#define kDslT1p413ReturntoStartup 1108 ++ ++#define kDslG994p1Timeout 8 ++#define kDslFinishedG994p1 9 ++#define kDslStartedG992p2Training 10 ++#define kDslG992p2DetectedPilotSymbol 11 ++#define kDslG992p2DetectedReverbSymbol 12 ++#define kDslG992p2TEQCalculationDone 13 ++#define kDslG992p2TrainingFEQ 14 ++#define kDslG992p2Phase3Started 15 ++#define kDslG992p2ReceivedRates1 16 ++#define kDslG992p2ReceivedMsg1 17 ++#define kDslG992p2Phase4Started 18 ++#define kDslG992p2ReceivedRatesRA 19 ++#define kDslG992p2ReceivedMsgRA 20 ++#define kDslG992p2ReceivedRates2 21 ++#define kDslG992p2ReceivedMsg2 22 ++#define kDslG992p2ReceivedBitGainTable 23 ++#define kDslG992p2TxShowtimeActive 24 ++#define kDslG992p2RxShowtimeActive 25 ++#define kDslG992p2TxAocMessage 26 ++#define kDslG992p2RxAocMessage 27 ++#define kDslG992p2TxEocMessage 28 ++#define kDslG992p2RxEocMessage 29 ++#define kDslFinishedG992p2Training 30 ++#define kDslRecoveredFromImpulseNoise 31 ++#define kDslG992Timeout 32 ++#define kDslT1p413Isu1SglByteSymDetected 33 /* detected T1.413 Issue 1 single byte per symbol mode */ ++#define kDslG992RxPrefixOnInAFewSymbols 34 ++#define kDslG992TxPrefixOnInAFewSymbols 35 ++#define kDslAnnexCXmtCPilot1Starting 36 ++#define kDslXmtToRcvPathDelay 37 ++#define kDslFeaturesUnsupported 38 ++#define kDslG992RcvMsgCrcError 39 ++#define kDslAnnexCDetectedStartHyperframe 40 ++ ++#define kDslG992AnnexCTimeoutCPilot1Detection 41 ++#define kDslG992AnnexCTimeoutCReverb1Detection 42 ++#define kDslG992AnnexCTimeoutECTraining 43 ++#define kDslG992AnnexCTimeoutHyperframeDetector 44 ++#define kDslG992AnnexCTimeoutSendRSegue2 45 ++#define kDslG992AnnexCTimeoutDetectCSegue1 46 ++#define kDslG992AnnexCAlignmentErrDetected 47 ++#define kDslG992AnnexCTimeoutSendRSegueRA 48 ++#define kDslG992AnnexCTimeoutSendRSegue4 49 ++#define kDslG992AnnexCTimeoutCSegue2Detection 50 ++#define kDslG992AnnexCTimeoutCSegue3Detection 51 ++/* Progress report for fast retrain */ ++ ++#define kG994p1EventToneDetected 54 ++#define kDslG992p2RcvVerifiedBitAndGain 55 ++#define kDslG992p2ProfileChannelResponseCalc 56 ++#define kDslG992AnnexCTotalFEXTBits 57 ++#define kDslG992AnnexCTotalNEXTBits 58 ++#define kDslG992AnnexCTotalFEXTCarrs 59 ++#define kDslG992AnnexCTotalNEXTCarrs 60 ++ ++#define kDslG992p3ReceivedMsgFmt 61 ++#define kDslG992p3ReceivedMsgPcb 62 ++ ++#define kDslG992p3AnnexLMode 63 ++ ++/* performance monitoring report */ ++ ++#define kG992DataRcvDetectFastRSCorrection 70 ++#define kG992DataRcvDetectInterleaveRSCorrection 71 ++#define kG992DataRcvDetectFastCRCError 72 ++#define kG992DataRcvDetectInterleaveCRCError 73 ++#define kG992DataRcvDetectFastRSError 74 ++#define kG992DataRcvDetectInterleaveRSError 75 ++#define kG992DataRcvDetectLOS 76 ++#define kG992DecoderDetectRDI 77 ++#define kG992DataRcvDetectLOSRecovery 78 ++#define kG992AtmDetectHEC 79 ++#define kG992AtmDetectOCD 180 ++#define kG992AtmDetectCD 181 ++#define kG992DecoderDetectRemoteLOS 182 ++#define kG992DecoderDetectRemoteLOSRecovery 183 ++#define kG992DecoderDetectRemoteRDI 184 ++#define kG992DecoderDetectRemoteRDIRecovery 185 ++#define kG992RcvDetectSyncSymbolOffset 186 ++#define kG992Upstream2xIfftDisabled 187 ++#if defined(G992P5) ++#define kDslG992RunAnnexaP3ModeInAnnexaP5 188 /* run Annex C mode in Annex I compiled codes */ ++#else ++#define kDslG992RunAnnexCModeInAnnexI 188 /* run Annex C mode in Annex I compiled codes */ ++#endif ++ ++/* OLR PHY status */ ++ ++#define kG992EventSynchSymbolDetected 189 ++#define kG992EventReverseSynchSymbolDetected 190 ++#define kG992EventL2CReverbSymbolDetected 191 ++#define kG992EventL2CSegueSymbolDetected 192 ++ ++/* ANNEX_M */ ++#define kG992EnableAnnexM 191 ++ ++#define kDslAtuChangeTxFilterRequest 192 ++ ++/* detailed error messages reports */ ++ ++#define kDslG992XmtRReverbRAOver4000 80 ++#define kDslG992XmtRReverb5Over4000 81 ++#define kDslG992RcvCSegue2Failed 82 ++#define kDslG992RcvCSegueRAFailed 83 ++#define kDslG992RcvCSegue3Failed 84 ++#define kDslG992RcvShowtimeStartedTooLate 85 ++#define kDslG992XmtRReverb3Over4000 86 ++#define kDslG992RcvFailDetCSegue1InWindow 87 ++#define kDslG992RcvCPilot1Failed 88 ++#define kDslG992RcvCReverb1Failed 89 ++#define kG992ControlAllRateOptionsFailedErr 90 ++#define kG992ControlInvalidRateOptionErr 91 ++#define kDslG992XmtInvalidXmtDErr 92 ++#define kDslG992BitAndGainCalcFailed 93 ++#define kDslG992BitAndGainVerifyFailed 94 ++ ++#define kDslT1p413RetrainToUseCorrectRAck 95 ++#define kDslUseAlternateTxFilter 96 ++#define kDslT1p413RetrainToUseCorrectIFFT 97 ++ ++typedef long dslConnectInfoStatusCode; ++#define kG992p2XmtToneOrderingInfo 0 ++#define kG992p2RcvToneOrderingInfo 1 ++#define kG992p2XmtCodingParamsInfo 2 ++#define kG992p2RcvCodingParamsInfo 3 ++#define kG992p2TrainingRcvCarrEdgeInfo 4 ++#define kG992ShowtimeMonitoringStatus 5 ++#define kG992MessageExchangeRcvInfo 6 ++#define kG992MessageExchangeXmtInfo 7 ++#define kG994MessageExchangeRcvInfo 8 ++#define kG994MessageExchangeXmtInfo 9 ++ ++#define kDslATURClockErrorInfo 10 ++#define kDslATURcvPowerInfo 11 ++#define kDslATUAvgLoopAttenuationInfo 12 ++#define kDslHWTimeTrackingResetClockError 13 ++#define kDslHWTimeTrackingClockTweak 14 ++#define kDslATUHardwareAGCObtained 15 ++#define kDslTEQCoefInfo 16 ++#define kDslRcvCarrierSNRInfo 17 ++#define kDslMaxReceivableBitRateInfo 18 ++#define kDslHWSetDigitalEcUpdateMode 19 ++#define kDslHWEnableDigitalECUpdate 20 ++#define kDslHWDisableDigitalECUpdate 21 ++#define kDslHWEnableDigitalEC 22 ++#define kDslHWSetDigitalEcGainShift 23 ++#define kDslHWSetDigitalEcUpdateShift 24 ++#define kDslRcvPsdInfo 25 ++#define kDslHWdcOffsetInfo 26 ++#define kG994SelectedG994p1CarrierIndex 27 ++#define kDslSelectedTimingTone 28 ++ ++#define kDslHWEnableAnalogECUpdate kDslHWSetDigitalEcUpdateMode ++#define kDslHWEnableAnalogEC kDslHWDisableDigitalECUpdate ++ ++#define kG992AocMessageExchangeRcvInfo 29 ++#define kG992AocMessageExchangeXmtInfo 30 ++#define kG992AocBitswapTxStarted 31 ++#define kG992AocBitswapRxStarted 32 ++#define kG992AocBitswapTxCompleted 33 ++#define kG992AocBitswapRxCompleted 34 ++#define kDslChannelResponseLog 35 ++#define kDslChannelResponseLinear 36 ++#define kDslChannelQuietLineNoise 37 ++ ++#define kDslATUCXmtPowerCutbackInfo 40 ++#define kDslATURXmtPowerCutbackInfo 41 ++#define kDslATUCXmtPowerInfo 42 ++#define kDslATURXmtPowerInfo 43 ++ ++#define kDslFramingModeInfo 50 ++#define kDslG992VendorID 51 ++ ++#ifdef BCM6348_SRC ++#define kDslHWSetRcvFir2OutputScale 52 ++#endif ++ ++#define kDslSignalAttenuation 53 ++#define kDslAttainableNetDataRate 54 ++#define kDslHLinScale 55 ++ ++#define kG992p3XmtCodingParamsInfo 60 ++#define kG992p3RcvCodingParamsInfo 61 ++#define kG992p3PwrStateInfo 62 ++#define kG992PilotToneInfo 63 ++ ++#define kDslSetPilotEyeDisplay 64 ++ ++#define kDslAturHwAgcResolutionMask (0xFFFFFFF8) ++#define kDslAturHwAgcMinGain ((-12)<<4) ++#ifndef BCM6348_SRC ++#define kDslAturHwAgcMaxGain (30<<4) ++#else ++#define kDslAturHwAgcMaxGain (36<<4) ++#endif ++ ++#define kDslFrameStatusSend 1 ++#define kDslFrameStatusSendComplete 2 ++#define kDslFrameStatusRcv 3 ++#define kDslFrameStatusReturn 4 ++ ++typedef struct _dslFramerStatus ++ { ++ dslFramerStatusCode code; ++ union ++ { ++ long value; ++ dslErrorCode error; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long nRxFrameTotal; ++ long nRxFrameError; ++ long nTxFrameTotal; ++ } statistic; ++ } param; ++ } dslFramerStatus; ++ ++typedef struct ++ { ++ dslStatusCode code; ++ union ++ { ++ long value; ++ dslErrorCode error; ++ struct ++ { ++ atmStatusCode code; ++ union ++ { ++ long value; ++ dslErrorCode error; ++ struct ++ { ++ long vci; ++ long mid; ++ long aalType; ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ long vcId; ++ long vci; ++ long aalType; ++ ulong fwdPeakCellTime; ++ ulong backPeakCellTime; ++ } vcInfo; ++ struct ++ { ++ long cellHdr; ++ long oamCmd; ++ } oamInfo; ++ struct ++ { ++ void *pVc; ++ char *pHdr; ++ void *cellHdr; ++ void *cellData; ++ } cellInfo; ++ struct ++ { ++ long totalBits; ++ long errBits; ++ } bertInfo; ++ } param; ++ } atmStatus; ++#ifdef DSL_PACKET ++ dslFramerStatus dslPacketStatus; ++#endif ++#ifdef G997_1_FRAMER ++ dslFramerStatus g997Status; ++#endif ++ struct ++ { ++ dslTrainingStatusCode code; ++ long value; ++ } dslTrainingInfo; ++ struct ++ { ++ dslConnectInfoStatusCode code; ++ long value; ++ void *buffPtr; ++ } dslConnectInfo; ++ struct ++ { ++ long maxMarginCarrier; ++ long maxSNRMargin; ++ long minMarginCarrier; ++ long minSNRMargin; ++ long avgSNRMargin; ++ long nCarriers; ++ void *buffPtr; ++ } dslShowtimeSNRMarginInfo; ++ struct ++ { ++ long code; ++ long vcId; ++ long timeStamp; ++ } dslFrameInfo; ++#ifdef G997_1 ++ struct ++ { ++ long msgId; ++ long msgType; ++ char *dataPtr; ++ } dslClearEocMsg; ++#endif ++ struct ++ { ++ char *fmt; ++ long argNum; ++ void *argPtr; ++ } dslPrintfMsg; ++ struct ++ { ++ ulong nBits; ++ ulong nBlocks; ++ ulong nBitErrors; ++ ulong nBlockErrors; ++ ++ ulong nAudioBits; ++ ulong nAudioBlocks; ++ ulong nAudioSyncErrors; ++ ulong nAudioBlockErrors; ++ } testResults; ++ struct ++ { ++ ulong code; ++ uchar *valuePtr; ++ ulong length; ++ } dslDataRegister; ++ struct ++ { ++ ulong code; ++ char *desc; ++ } dslExternalError; ++ struct ++ { ++ ulong numberOfCalls; ++ ulong txSignalChecksum; ++ ulong rxSignalChecksum; ++ ulong eyeDataChecksum; ++ } checksums; ++ struct ++ { ++ int sp; ++ int argc; ++ int *argv; ++ int *stackPtr; ++ int stackLen; ++ } dslException; ++ struct ++ { ++ ulong paramId; ++ void *dataPtr; ++ ulong dataLen; ++ } dslOemParameter; ++ struct ++ { ++ void *dataPtr; ++ ulong dataLen; ++ } dslDataAvail; ++ dslOLRMessage dslOLRRequest; ++ dslPwrMessage dslPwrMsg; ++ } param; ++ } dslStatusStruct; ++ ++typedef void (SM_DECL *dslStatusHandlerType) (void *gDslVars, dslStatusStruct*); ++ ++ ++/* ++** ++** Command codes ++** ++*/ ++ ++typedef long dslCommandCode; ++#define kFirstDslCommandCode 256 ++#define kDslIdleCmd (kFirstDslCommandCode + 0) ++#define kDslIdleRcvCmd (kFirstDslCommandCode + 1) ++#define kDslIdleXmtCmd (kFirstDslCommandCode + 2) ++#define kDslStartPhysicalLayerCmd (kFirstDslCommandCode + 3) ++#define kDslStartRetrainCmd (kFirstDslCommandCode + 4) ++#define kDslSetFrameFunctions (kFirstDslCommandCode + 5) ++#define kDslSendEocCommand (kFirstDslCommandCode + 6) ++#define kDslWriteRemoteRegister (kFirstDslCommandCode + 7) ++#define kDslReadRemoteRegister (kFirstDslCommandCode + 8) ++#define kDslWriteLocalRegister (kFirstDslCommandCode + 9) ++#define kDslReadLocalRegister (kFirstDslCommandCode + 10) ++#define kDslStoreHardwareAGCCmd (kFirstDslCommandCode + 11) ++#define kDslSetCommandHandlerCmd (kFirstDslCommandCode + 12) ++#define kSetLinkLayerStatusHandlerCmd (kFirstDslCommandCode + 13) ++#define kDslSetG997Cmd (kFirstDslCommandCode + 14) ++#define kDslLoopbackCmd (kFirstDslCommandCode + 15) ++#define kDslDiagSetupCmd (kFirstDslCommandCode + 16) ++#define kDslSetDriverCallbackCmd (kFirstDslCommandCode + 17) ++#define kDslDiagStopLogCmd (kFirstDslCommandCode + 18) ++#define kDslDiagStartBERT (kFirstDslCommandCode + 19) ++#define kDslDiagStopBERT (kFirstDslCommandCode + 20) ++#define kDslPingCmd (kFirstDslCommandCode + 21) ++#define kDslDyingGaspCmd (kFirstDslCommandCode + 22) ++#define kDslTestCmd (kFirstDslCommandCode + 23) ++#define kDslFilterSNRMarginCmd (kFirstDslCommandCode + 24) ++#define kDslAtmVcMapTableChanged (kFirstDslCommandCode + 25) ++#define kDslGetOemDataAddrCmd (kFirstDslCommandCode + 26) ++#define kDslAtmReportHEC (kFirstDslCommandCode + 27) ++#define kDslAtmReportCD (kFirstDslCommandCode + 28) ++#define kDslSetXmtGainCmd (kFirstDslCommandCode + 29) ++#define kDslSetStatusBufferCmd (kFirstDslCommandCode + 30) ++#define kDslAfeTestCmd (kFirstDslCommandCode + 31) ++#define kDslI432ResetCmd (kFirstDslCommandCode + 32) ++#define kDslSetRcvGainCmd (kFirstDslCommandCode + 33) ++#define kDslBypassRcvHpfCmd (kFirstDslCommandCode + 34) ++#define kDslWriteAfeRegCmd (kFirstDslCommandCode + 35) ++#define kDslReadAfeRegCmd (kFirstDslCommandCode + 36) ++#define kDslOLRRequestCmd (kFirstDslCommandCode + 37) ++#define kDslOLRResponseCmd (kFirstDslCommandCode + 38) ++#define kDslI432SetScrambleCmd (kFirstDslCommandCode + 39) ++#define kDslPwrMgrCmd (kFirstDslCommandCode + 40) ++#define kDslAtmGfcMappingCmd (kFirstDslCommandCode + 41) ++ ++#ifdef BCM6348_SRC ++#define kDslEnablePwmSyncClk (kFirstDslCommandCode + 42) ++#define kDslSetPwmSyncClkFreq (kFirstDslCommandCode + 43) ++#endif ++ ++#define kG994p1Duplex 1 ++#define kG994p1HalfDuplex 2 ++ ++/* Eoc Messages from ATU-C to ATU-R */ ++#define kDslEocHoldStateCmd 1 ++#define kDslEocReturnToNormalCmd 2 ++#define kDslEocPerformSelfTestCmd 3 ++#define kDslEocRequestCorruptCRCCmd 4 ++#define kDslEocRequestEndCorruptCRCCmd 5 ++#define kDslEocNotifyCorruptCRCCmd 6 ++#define kDslEocNotifyEndCorruptCRCCmd 7 ++#define kDslEocRequestTestParametersUpdateCmd 8 ++#define kDslEocGrantPowerDownCmd 9 ++#define kDslEocRejectPowerDownCmd 10 ++ ++/* Eoc Messages from ATU-R to ATU-C */ ++#define kDslEocRequestPowerDownCmd 11 ++#define kDslEocDyingGaspCmd 12 ++ ++/* Clear Eoc Messages */ ++#define kDslClearEocFirstCmd 100 ++#define kDslClearEocSendFrame 100 ++#define kDslClearEocSendComplete 101 ++#define kDslClearEocRcvedFrame 102 ++#define kDslClearEocSendComplete2 103 ++ ++#define kDslClearEocMsgLengthMask 0xFFFF ++#define kDslClearEocMsgNumMask 0xFF0000 ++#define kDslClearEocMsgDataVolatileMask 0x1000000 ++#define kDslClearEocMsgDataVolatile kDslClearEocMsgDataVolatileMask ++#define kDslClearEocMsgExtraSendComplete 0x2000000 ++ ++/* ADSL Link Power States */ ++#define kDslPowerFullOn 0 ++#define kDslPowerLow 1 ++#define kDslPowerIdle 3 ++ ++/* ATU-R Data Registers */ ++#define kDslVendorIDRegister 1 ++#define kDslRevisionNumberRegister 2 ++#define kDslSerialNumberRegister 3 ++#define kDslSelfTestResultsRegister 4 ++#define kDslLineAttenuationRegister 5 ++#define kDslSnrMarginRegister 6 ++#define kDslAturConfigurationRegister 7 ++#define kDslLinkStateRegister 8 ++ ++#define kDslVendorIDRegisterLength 8 ++#define kDslRevisionNumberRegisterLength 32 ++#define kDslSerialNumberRegisterLength 32 ++#define kDslSelfTestResultsRegisterLength 1 ++#define kDslLineAttenuationRegisterLength 1 ++#define kDslSnrMarginRegisterLength 1 ++#define kDslAturConfigurationRegisterLength 30 ++#define kDslLinkStateRegisterLength 1 ++ ++/* Dsl Diags setup flags */ ++#define kDslDiagEnableEyeData 1 ++#define kDslDiagEnableLogData 2 ++ ++/* Dsl test commands */ ++typedef long dslTestCmdType; ++#define kDslTestBackToNormal 0 ++#define kDslTestReverb 1 ++#define kDslTestMedley 2 ++#define kDslTestToneSelection 3 ++#define kDslTestNoAutoRetrain 4 ++#define kDslTestMarginTweak 5 ++#define kDslTestEstimatePllPhase 6 ++#define kDslTestReportPllPhaseStatus 7 ++#define kDslTestAfeLoopback 8 ++#define kDslTestL3 9 ++#define kDslTestAdsl2DiagMode 10 ++#define kDslTestRetL0 11 ++ ++/* Xmt gain default setting */ ++#define kDslXmtGainAuto 0x80000000 ++ ++/* Unit (AFE) test commands */ ++#define kDslAfeTestLoadImage 0 ++#define kDslAfeTestPatternSend 1 ++#define kDslAfeTestLoadImageOnly 2 ++#define kDslAfeTestPhyRun 3 ++#define kDslAfeTestLoadBuffer 4 ++ ++typedef struct ++ { ++#if defined(G992P1_ANNEX_I) || defined(G992P5) ++ ushort downstreamMinCarr, downstreamMaxCarr; ++#else ++ uchar downstreamMinCarr, downstreamMaxCarr; ++#endif ++ uchar upstreamMinCarr, upstreamMaxCarr; ++ }carrierInfo; ++ ++#if defined(G992P3) && !defined(BCM6348_SRC) ++#define FAST_TEXT_TYPE ++#else ++#define FAST_TEXT_TYPE FAST_TEXT ++#endif ++ ++#if defined(BCM6348_SRC) ++#define BCM6348_TEMP_MOVE_TO_LMEM ++#else ++#define BCM6348_TEMP_MOVE_TO_LMEM ++#endif ++ ++#ifdef G992P3 ++#define PRINT_DEBUG_INFO ++#else ++#define PRINT_DEBUG_INFO ++#endif ++ ++#ifdef G992P3 ++ ++#define kG992p3MaxSpectBoundsUpSize 16 ++#define kG992p3MaxSpectBoundsDownSize 16 ++ ++/* G.994 definitions */ ++ ++/*** Standard Info SPar2: G.992.3 Annex A Octet 1 ***/ ++ ++#define kG994p1G992p3AnnexASpectrumBoundsUpstream 0x01 ++#define kG994p1G992p3AnnexASpectrumShapingUpstream 0x02 ++#define kG994p1G992p3AnnexASpectrumBoundsDownstream 0x04 ++#define kG994p1G992p3AnnexASpectrumShapingDownstream 0x08 ++#define kG994p1G992p3AnnexATxImageAboveNyquistFreq 0x10 ++#define kG994p1G992p3AnnexLReachExtended 0x20 ++#define kG994p1G992p3AnnexMSubModePSDMasks 0x20 ++ ++#define kG994p1G992p3AnnexLUpNarrowband 0x02 ++#define kG994p1G992p3AnnexLUpWideband 0x01 ++#define kG994p1G992p3AnnexLDownNonoverlap 0x01 ++ ++/*** Standard Info SPar2: G.992.3 Annex A Octet 2 ***/ ++ ++#define kG994p1G992p3AnnexADownOverheadDataRate 0x01 ++#define kG994p1G992p3AnnexAUpOverheadDataRate 0x02 ++#define kG994p1G992p3AnnexAMaxNumberDownTPSTC 0x04 ++#define kG994p1G992p3AnnexAMaxNumberUpTPSTC 0x08 ++ ++/*** Standard Info SPar2: G.992.3 Annex A Octet 3,5,7,9 ***/ ++ ++#define kG994p1G992p3AnnexADownSTM_TPS_TC 0x01 ++#define kG994p1G992p3AnnexAUpSTM_TPS_TC 0x02 ++#define kG994p1G992p3AnnexADownATM_TPS_TC 0x04 ++#define kG994p1G992p3AnnexAUpATM_TPS_TC 0x08 ++#define kG994p1G992p3AnnexADownPTM_TPS_TC 0x10 ++#define kG994p1G992p3AnnexAUpPTM_TPS_TC 0x20 ++ ++/*** Standard Info SPar2: G.992.3 Annex A Octet 4,6,8,10 ***/ ++ ++#define kG994p1G992p3AnnexADownPMS_TC_Latency 0x01 ++#define kG994p1G992p3AnnexAUpPMS_TC_Latency 0x02 ++ ++/*** ++ * TSSI ++ * ++ * TSSI information is specified in 2 parts: subcarrier index, ++ * tssi value, and an indication of whether or no the tone specified ++ * is part of the supported set. ++ * ++ * The subcarrier index information is currently stored in the ++ * dsSubcarrierIndex array defined below. The tssi value are stored ++ * in the dsLog_tss array. ++ * ++ * The subcarrier index information only occupies the lower 12 bits ++ * of the available 16 bits (short type). Therefore, we will pack the ++ * supported set information in bit 15. ++ */ ++#define kG992DsSubCarrierIndexMask (0x0fff) /* AND mask to ectract ds subcarrier index */ ++#define kG992DsSubCarrierSuppSetMask (0x8000) /* AND mask to extract supported set indication */ ++ ++#define G992GetDsSubCarrierIndex(arg) ((arg) & kG992DsSubCarrierIndexMask) ++#define G992GetDsSubCarrierSuppSetIndication(arg) (((arg) & kG992DsSubCarrierSuppSetMask) >> 15) ++ ++/* Caution: Do not change anything in this structure definition, including associated constant */ ++/* This structure definition is used only by the driver and any change impose incompatibility issue in driver */ ++/* The structure following this structure (g992p3PhyDataPumpCapabilities) can be changed in PHY application */ ++ ++typedef struct ++ { ++ Boolean rcvNTREnabled, shortInitEnabled, diagnosticsModeEnabled; ++ ++ char featureSpectrum, featureOverhead; ++ char featureTPS_TC[4], featurePMS_TC[4]; ++ ++ short rcvNOMPSDus, rcvMAXNOMPSDus, rcvMAXNOMATPus; ++ short usSubcarrierIndex[kG992p3MaxSpectBoundsUpSize], ++ usLog_tss[kG992p3MaxSpectBoundsUpSize]; ++ short numUsSubcarrier; ++ short rcvNOMPSDds, rcvMAXNOMPSDds, rcvMAXNOMATPds; ++ short dsSubcarrierIndex[kG992p3MaxSpectBoundsDownSize], ++ dsLog_tss[kG992p3MaxSpectBoundsDownSize]; ++ short numDsSubcarrier; ++ uchar sizeIDFT, fillIFFT; ++ uchar readsl2Upstream, readsl2Downstream; ++ uchar minDownOverheadDataRate, minUpOverheadDataRate; ++ uchar maxDownSTM_TPSTC, maxDownATM_TPSTC, maxDownPTM_TPSTC; ++ uchar maxUpSTM_TPSTC, maxUpATM_TPSTC, maxUpPTM_TPSTC; ++ ++ short minDownSTM_TPS_TC[4], maxDownSTM_TPS_TC[4], ++ minRevDownSTM_TPS_TC[4], maxDelayDownSTM_TPS_TC[4]; ++ uchar maxErrorDownSTM_TPS_TC[4], minINPDownSTM_TPS_TC[4]; ++ short minUpSTM_TPS_TC[4], maxUpSTM_TPS_TC[4], ++ minRevUpSTM_TPS_TC[4], maxDelayUpSTM_TPS_TC[4]; ++ uchar maxErrorUpSTM_TPS_TC[4], minINPUpSTM_TPS_TC[4]; ++ ++ short maxDownPMS_TC_Latency[4], maxUpPMS_TC_Latency[4]; ++ short maxDownR_PMS_TC_Latency[4], maxDownD_PMS_TC_Latency[4]; ++ short maxUpR_PMS_TC_Latency[4], maxUpD_PMS_TC_Latency[4]; ++ ++ short minDownATM_TPS_TC[4], maxDownATM_TPS_TC[4], ++ minRevDownATM_TPS_TC[4], maxDelayDownATM_TPS_TC[4]; ++ uchar maxErrorDownATM_TPS_TC[4], minINPDownATM_TPS_TC[4]; ++ short minUpATM_TPS_TC[4], maxUpATM_TPS_TC[4], ++ minRevUpATM_TPS_TC[4], maxDelayUpATM_TPS_TC[4]; ++ uchar maxErrorUpATM_TPS_TC[4], minINPUpATM_TPS_TC[4]; ++ ++ short minDownPTM_TPS_TC[4], maxDownPTM_TPS_TC[4], ++ minRevDownPTM_TPS_TC[4], maxDelayDownPTM_TPS_TC[4]; ++ uchar maxErrorDownPTM_TPS_TC[4], minINPDownPTM_TPS_TC[4]; ++ short minUpPTM_TPS_TC[4], maxUpPTM_TPS_TC[4], ++ minRevUpPTM_TPS_TC[4], maxDelayUpPTM_TPS_TC[4]; ++ uchar maxErrorUpPTM_TPS_TC[4], minINPUpPTM_TPS_TC[4]; ++ ++ ushort subModePSDMasks; ++ } g992p3DataPumpCapabilities; ++ ++#define kG992p3p5MaxSpectBoundsUpSize 16 ++#define kG992p3p5MaxSpectBoundsDownSize 32 ++ ++typedef struct ++ { ++ Boolean rcvNTREnabled, shortInitEnabled, diagnosticsModeEnabled; ++ ++ char featureSpectrum, featureOverhead; ++ char featureTPS_TC[4], featurePMS_TC[4]; ++ ++ short rcvNOMPSDus, rcvMAXNOMPSDus, rcvMAXNOMATPus; ++ short usSubcarrierIndex[kG992p3p5MaxSpectBoundsUpSize], ++ usLog_tss[kG992p3p5MaxSpectBoundsUpSize]; ++ short numUsSubcarrier; ++ short rcvNOMPSDds, rcvMAXNOMPSDds, rcvMAXNOMATPds; ++ short dsSubcarrierIndex[kG992p3p5MaxSpectBoundsDownSize], ++ dsLog_tss[kG992p3p5MaxSpectBoundsDownSize]; ++ short numDsSubcarrier; ++ uchar sizeIDFT, fillIFFT; ++ uchar readsl2Upstream, readsl2Downstream; ++ uchar minDownOverheadDataRate, minUpOverheadDataRate; ++ uchar maxDownSTM_TPSTC, maxDownATM_TPSTC, maxDownPTM_TPSTC; ++ uchar maxUpSTM_TPSTC, maxUpATM_TPSTC, maxUpPTM_TPSTC; ++ ++ short minDownSTM_TPS_TC[4], maxDownSTM_TPS_TC[4], ++ minRevDownSTM_TPS_TC[4], maxDelayDownSTM_TPS_TC[4]; ++ uchar maxErrorDownSTM_TPS_TC[4], minINPDownSTM_TPS_TC[4]; ++ short minUpSTM_TPS_TC[4], maxUpSTM_TPS_TC[4], ++ minRevUpSTM_TPS_TC[4], maxDelayUpSTM_TPS_TC[4]; ++ uchar maxErrorUpSTM_TPS_TC[4], minINPUpSTM_TPS_TC[4]; ++ ++ short maxDownPMS_TC_Latency[4], maxUpPMS_TC_Latency[4]; ++ short maxDownR_PMS_TC_Latency[4], maxDownD_PMS_TC_Latency[4]; ++ short maxUpR_PMS_TC_Latency[4], maxUpD_PMS_TC_Latency[4]; ++ ++ short minDownATM_TPS_TC[4], maxDownATM_TPS_TC[4], ++ minRevDownATM_TPS_TC[4], maxDelayDownATM_TPS_TC[4]; ++ uchar maxErrorDownATM_TPS_TC[4], minINPDownATM_TPS_TC[4]; ++ short minUpATM_TPS_TC[4], maxUpATM_TPS_TC[4], ++ minRevUpATM_TPS_TC[4], maxDelayUpATM_TPS_TC[4]; ++ uchar maxErrorUpATM_TPS_TC[4], minINPUpATM_TPS_TC[4]; ++ ++ short minDownPTM_TPS_TC[4], maxDownPTM_TPS_TC[4], ++ minRevDownPTM_TPS_TC[4], maxDelayDownPTM_TPS_TC[4]; ++ uchar maxErrorDownPTM_TPS_TC[4], minINPDownPTM_TPS_TC[4]; ++ short minUpPTM_TPS_TC[4], maxUpPTM_TPS_TC[4], ++ minRevUpPTM_TPS_TC[4], maxDelayUpPTM_TPS_TC[4]; ++ uchar maxErrorUpPTM_TPS_TC[4], minINPUpPTM_TPS_TC[4]; ++ ++ ushort subModePSDMasks; ++ } g992p3PhyDataPumpCapabilities; ++#endif ++ ++typedef struct ++ { ++ dslModulationType modulations; ++ bitMap auxFeatures; ++ bitMap features; ++ bitMap demodCapabilities; ++ bitMap demodCapabilities2; ++ ushort noiseMargin; /* Q4 dB */ ++#ifdef G992_ATUC ++ short xmtRSf, xmtRS, xmtS, xmtD; ++ short rcvRSf, rcvRS, rcvS, rcvD; ++#endif ++#ifdef G992P1_ANNEX_A ++ bitMap subChannelInfo; ++ carrierInfo carrierInfoG992p1; ++#endif ++#ifdef G992P1_ANNEX_B ++ bitMap subChannelInfoAnnexB; ++ carrierInfo carrierInfoG992p1AnnexB; ++#endif ++#ifdef G992_ANNEXC ++ bitMap subChannelInfoAnnexC; ++ carrierInfo carrierInfoG992p1AnnexC; ++#endif ++#if defined(G992P1_ANNEX_I) ++ bitMap subChannelInfoAnnexI; ++ carrierInfo carrierInfoG992p1AnnexI; ++#endif ++#ifdef G992P5 ++ bitMap subChannelInfop5; ++ carrierInfo carrierInfoG992p5; ++#endif ++#if defined(G992P2) || (defined(G992P1_ANNEX_A) && defined(G992P1_ANNEX_A_USED_FOR_G992P2)) ++ carrierInfo carrierInfoG992p2; ++#endif ++ ushort maxDataRate; ++ uchar minDataRate; ++#ifdef G992P3 ++ g992p3DataPumpCapabilities *carrierInfoG992p3AnnexA; ++#endif ++#ifdef G992P5 ++ g992p3DataPumpCapabilities *carrierInfoG992p5AnnexA; ++#endif ++ } dslDataPumpCapabilities; ++ ++struct __dslCommandStruct; ++typedef Boolean (*dslCommandHandlerType) (void *gDslVars, struct __dslCommandStruct*); ++typedef struct __dslCommandStruct ++ { ++ dslCommandCode command; ++ union ++ { ++ long value; ++ Boolean flag; ++ struct ++ { ++ dslTestCmdType type; ++ union ++ { ++ struct ++ { ++ ulong xmtStartTone, xmtNumOfTones; ++ ulong rcvStartTone, rcvNumOfTones; ++ uchar *xmtMap, *rcvMap; ++ } toneSelectSpec; ++ struct ++ { ++ long extraPowerRequestQ4dB; ++ long numOfCarriers; ++ char *marginTweakTableQ4dB; ++ } marginTweakSpec; ++ } param; ++ } dslTestSpec; ++ struct ++ { ++ dslDirectionType direction; ++ dslDataPumpCapabilities capabilities; ++ } dslModeSpec; ++ struct ++ { ++ bitMap setup; ++ ulong eyeConstIndex1; ++ ulong eyeConstIndex2; ++ ulong logTime; ++ } dslDiagSpec; ++ struct ++ { ++ void *pBuf; ++ ulong bufSize; ++ } dslStatusBufSpec; ++ struct ++ { ++ ulong type; ++ void *afeParamPtr; ++ ulong afeParamSize; ++ void *imagePtr; ++ ulong imageSize; ++ } dslAfeTestSpec; ++ struct ++ { ++ dslLinkLayerType type; ++ bitMap setup; ++ union ++ { ++ struct ++ { ++ dataRateMap rxDataRate; ++ dataRateMap txDataRate; ++ long rtDelayQ4ms; ++ ulong rxBufNum; ++ ulong rxCellsInBuf; ++ ulong rxPacketNum; ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslPhyInitType atmPhyInitPtr; ++ } atmLinkSpec; ++ struct ++ { ++ dslHeaderHandlerType rxHeaderHandlerPtr; ++ dslRxFrameBufferHandlerType rxDataHandlerPtr; ++ dslTxFrameBufferHandlerType txHandlerPtr; ++ } atmPhyLinkSpec; ++#ifdef DSL_PACKET ++ struct ++ { ++ ulong rxBufNum; ++ ulong rxBufSize; ++ ulong rxPacketNum; ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslPacketPhyInitType dslPhyInitPtr; ++ } dslPacketLinkSpec; ++ dslPacketPhyFunctions dslPacketPhyLinkSpec; ++#endif ++ struct ++ { ++ txDataHandlerType txDataHandlerPtr; ++ rxDataHandlerType rxDataHandlerPtr; ++ } nullLinkSpec; ++ } param; ++ } dslLinkLayerSpec; ++#ifdef G997_1 ++#ifdef G997_1_FRAMER ++ struct ++ { ++ bitMap setup; ++ ulong rxBufNum; ++ ulong rxBufSize; ++ ulong rxPacketNum; ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ } dslG997Cmd; ++#endif ++ struct ++ { ++ long msgId; ++ long msgType; ++ char *dataPtr; ++ } dslClearEocMsg; ++#endif ++ struct ++ { ++ ulong code; ++ uchar *valuePtr; ++ ulong length; ++ } dslDataRegister; ++ union ++ { ++ dslStatusHandlerType statusHandlerPtr; ++ dslCommandHandlerType commandHandlerPtr; ++ eyeHandlerType eyeHandlerPtr; ++ logHandlerType logHandlerPtr; ++#if defined(DEBUG_DATA_HANDLER) ++ debugDataHandlerType debugDataHandlerPtr; ++#endif ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslDriverCallbackType driverCallback; ++ } handlerSpec; ++#if !defined(CHIP_SRC) || defined(DSL_FRAME_FUNCTIONS) ++ dslFrameFunctions DslFunctions; ++#endif ++ dslOLRMessage dslOLRRequest; ++ dslPwrMessage dslPwrMsg; ++ } param; ++ } dslCommandStruct; ++ ++ ++ ++ ++typedef struct ++ { ++ dslCommandHandlerType linkCommandHandlerPtr; ++ timerHandlerType linkTimerHandlerPtr; ++ dslLinkCloseHandlerType linkCloseHandlerPtr; ++ ++ dslFrameHandlerType linkSendHandlerPtr; ++ dslFrameHandlerType linkReturnHandlerPtr; ++ ++ dslVcAllocateHandlerType linkVcAllocateHandlerPtr; ++ dslVcFreeHandlerType linkVcFreeHandlerPtr; ++ dslVcActivateHandlerType linkVcActivateHandlerPtr; ++ dslVcDeactivateHandlerType linkVcDeactivateHandlerPtr; ++ dslVcConfigureHandlerType linkVcConfigureHandlerPtr; ++ ++ dslLinkVc2IdHandlerType linkVc2IdHandlerPtr; ++ dslLinkVcId2VcHandlerType linkVcId2VcHandlerPtr; ++ dslGetFramePoolHandlerType linkGetFramePoolHandlerPtr; ++ ++#ifndef ADSLCORE_ONLY ++ dslHeaderHandlerType linkRxCellHeaderHandlerPtr; ++ dslRxFrameBufferHandlerType linkRxCellDataHandlerPtr; ++ dslTxFrameBufferHandlerType linkTxCellHandlerPtr; ++#endif ++ ++ txDataHandlerType linkTxDataHandlerPtr; ++ rxDataHandlerType linkRxDataHandlerPtr; ++ } linkLayerFunctions; ++ ++#ifndef ADSLCORE_ONLY ++ ++#define LinkLayerAssignFunctions( var, name_prefix ) do { \ ++ (var).linkCommandHandlerPtr = name_prefix##CommandHandler; \ ++ (var).linkTimerHandlerPtr = name_prefix##TimerHandler; \ ++ (var).linkCloseHandlerPtr = name_prefix##CloseHandler; \ ++ \ ++ (var).linkSendHandlerPtr = name_prefix##SendFrameHandler; \ ++ (var).linkReturnHandlerPtr = name_prefix##ReturnFrameHandler; \ ++ \ ++ (var).linkVcAllocateHandlerPtr = name_prefix##VcAllocateHandler; \ ++ (var).linkVcFreeHandlerPtr = name_prefix##VcFreeHandler; \ ++ (var).linkVcActivateHandlerPtr = name_prefix##VcActivateHandler; \ ++ (var).linkVcDeactivateHandlerPtr = name_prefix##VcDeactivateHandler; \ ++ (var).linkVcConfigureHandlerPtr = name_prefix##VcConfigureHandler; \ ++ \ ++ (var).linkVc2IdHandlerPtr = name_prefix##Vc2IdHandler; \ ++ (var).linkVcId2VcHandlerPtr = name_prefix##VcId2VcHandler; \ ++ (var).linkGetFramePoolHandlerPtr = name_prefix##GetFramePoolHandler; \ ++ \ ++ (var).linkRxCellHeaderHandlerPtr = name_prefix##RxCellHeaderHandler; \ ++ (var).linkRxCellDataHandlerPtr = name_prefix##RxCellDataHandler; \ ++ (var).linkTxCellHandlerPtr = name_prefix##TxCellHandler; \ ++ \ ++ (var).linkTxDataHandlerPtr = name_prefix##TxDataHandler; \ ++ (var).linkRxDataHandlerPtr = name_prefix##RxDataHandler; \ ++} while (0) ++ ++#else ++ ++#define LinkLayerAssignFunctions( var, name_prefix ) do { \ ++ (var).linkCommandHandlerPtr = name_prefix##CommandHandler; \ ++ (var).linkTimerHandlerPtr = name_prefix##TimerHandler; \ ++ (var).linkCloseHandlerPtr = name_prefix##CloseHandler; \ ++ \ ++ (var).linkSendHandlerPtr = name_prefix##SendFrameHandler; \ ++ (var).linkReturnHandlerPtr = name_prefix##ReturnFrameHandler; \ ++ \ ++ (var).linkVcAllocateHandlerPtr = name_prefix##VcAllocateHandler; \ ++ (var).linkVcFreeHandlerPtr = name_prefix##VcFreeHandler; \ ++ (var).linkVcActivateHandlerPtr = name_prefix##VcActivateHandler; \ ++ (var).linkVcDeactivateHandlerPtr = name_prefix##VcDeactivateHandler; \ ++ (var).linkVcConfigureHandlerPtr = name_prefix##VcConfigureHandler; \ ++ \ ++ (var).linkVc2IdHandlerPtr = name_prefix##Vc2IdHandler; \ ++ (var).linkVcId2VcHandlerPtr = name_prefix##VcId2VcHandler; \ ++ (var).linkGetFramePoolHandlerPtr = name_prefix##GetFramePoolHandler; \ ++ \ ++ (var).linkTxDataHandlerPtr = name_prefix##TxDataHandler; \ ++ (var).linkRxDataHandlerPtr = name_prefix##RxDataHandler; \ ++} while (0) ++ ++#endif ++ ++typedef struct ++ { ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslStatusHandlerType statusHandlerPtr; ++ } upperLayerFunctions; ++ ++ ++/* ++ * Debug data ++ */ ++#define kDslFirstDebugData 1000 ++#define kDslXmtPerSymTimeCompData (kDslFirstDebugData + 0) ++#define kDslRcvPerSymTimeCompData (kDslFirstDebugData + 1) ++#define kDslXmtAccTimeCompData (kDslFirstDebugData + 2) ++#define kDslRcvAccTimeCompData (kDslFirstDebugData + 3) ++#define kDslRcvPilotToneData (kDslFirstDebugData + 4) ++#define kDslTEQCoefData (kDslFirstDebugData + 5) ++#define kDslTEQInputData (kDslFirstDebugData + 6) ++#define kDslTEQOutputData (kDslFirstDebugData + 7) ++#define kDslRcvFFTInputData (kDslFirstDebugData + 8) ++#define kDslRcvFFTOutputData (kDslFirstDebugData + 9) ++#define kDslRcvCarrierSNRData (kDslFirstDebugData + 10) ++#define kDslXmtToneOrderingData (kDslFirstDebugData + 11) ++#define kDslRcvToneOrderingData (kDslFirstDebugData + 12) ++#define kDslXmtGainData (kDslFirstDebugData + 13) ++#define kDslRcvGainData (kDslFirstDebugData + 14) ++#define kDslMseData (kDslFirstDebugData + 15) ++#define kDslFEQOutErrData (kDslFirstDebugData + 16) ++#define kDslFEQCoefData (kDslFirstDebugData + 17) ++#define kDslShowtimeMseData (kDslFirstDebugData + 18) ++#define kDslTimeEstimationHWPhaseTweak (kDslFirstDebugData + 24) ++#define kDslSlicerInput (kDslFirstDebugData + 40) ++#define kDslXmtConstellations (kDslFirstDebugData + 41) ++#define kDslSnr1ShiftData (kDslFirstDebugData + 50) ++#define kDslSnr1InputData (kDslFirstDebugData + 51) ++#define kDslSnr1ReverbAvgData (kDslFirstDebugData + 52) ++#define kDslAnnexCFextSnrData (kDslFirstDebugData + 53) ++#define kDslAnnexCNextSnrData (kDslFirstDebugData + 54) ++#define kG994p1OutputXmtSample (kDslFirstDebugData + 100) ++#define kG994p1OutputMicroBit (kDslFirstDebugData + 101) ++#define kG994p1OutputBit (kDslFirstDebugData + 102) ++#define kG994p1OutputTimer (kDslFirstDebugData + 103) ++ ++/****************************************************************************/ ++/* 2. Constant definitions. */ ++/* */ ++/* 2.1 Defininitive constants */ ++/****************************************************************************/ ++ ++/* dslDirectionType */ ++ ++#define kATU_C 0 ++#define kATU_R 1 ++ ++/* ATM setup maps */ ++ ++#define kAtmCallMgrEnabled 0x00000001 /* Bit 0 */ ++#define kAtmAAL1FecEnabledMask 0x00000006 /* Bit 1 */ ++#define kAtmAAL1HiDelayFecEnabled 0x00000002 /* Bit 2 */ ++#define kAtmAAL1LoDelayFecEnabled 0x00000004 /* Bit 3 */ ++ ++/* dslLinkLayerType */ ++ ++#define kNoDataLink 0 ++#define kAtmLink 0x00000001 ++#define kAtmPhyLink 0x00000002 ++#define kDslPacketLink 0x00000003 ++#define kDslPacketPhyLink 0x00000004 ++ ++/* dslModulationType */ ++#define kNoCommonModulation 0x00000000 ++#define kG994p1 0x00000020 /* G.994.1 or G.hs */ ++#define kT1p413 0x00000040 /* T1.413 handshaking */ ++#define kG992p1AnnexA 0x00000001 /* G.992.1 or G.dmt Annex A */ ++#define kG992p1AnnexB 0x00000002 /* G.992.1 or G.dmt Annex B */ ++#define kG992p1AnnexC 0x00000004 /* G.992.1 or G.dmt Annex C */ ++#define kG992p2AnnexAB 0x00000008 /* G.992.2 or G.lite Annex A/B */ ++#define kG992p2AnnexC 0x00000010 /* G.992.2 or G.lite Annex C */ ++#define kG992p3AnnexA 0x00000100 /* G.992.3 or G.DMTbis Annex A */ ++#define kG992p3AnnexB 0x00000200 /* G.992.3 or G.DMTbis Annex A */ ++#define kG992p1AnnexI 0x00000400 /* G.992.1 Annex I */ ++#define kG992p5AnnexA 0x00010000 /* G.992.5 Annex A */ ++#define kG992p5AnnexB 0x00020000 /* G.992.5 Annex B */ ++#define kG992p5AnnexI 0x00040000 /* G.992.5 Annex I */ ++#define kG992p3AnnexM 0x00080000 /* G.992.3 Annex M */ ++#define kG992p5AnnexM 0x01000000 /* G.992.5 Annex M */ ++ ++/* demodCapabilities bitmap */ ++#define kEchoCancellorEnabled 0x00000001 ++#define kSoftwareTimeErrorDetectionEnabled 0x00000002 ++#define kSoftwareTimeTrackingEnabled 0x00000004 ++#define kDslTrellisEnabled 0x00000008 ++#define kHardwareTimeTrackingEnabled 0x00000010 ++#define kHardwareAGCEnabled 0x00000020 ++#define kDigitalEchoCancellorEnabled 0x00000040 ++#define kReedSolomonCodingEnabled 0x00000080 ++#define kAnalogEchoCancellorEnabled 0x00000100 ++#define kT1p413Issue1SingleByteSymMode 0x00000200 ++#define kDslAturXmtPowerCutbackEnabled 0x00000400 ++#ifdef G992_ANNEXC_LONG_REACH ++#define kDslAnnexCPilot48 0x00000800 ++#define kDslAnnexCReverb33_63 0x00001000 ++#endif ++#ifdef G992_ANNEXC ++#define kDslCentilliumCRCWorkAroundEnabled 0x00002000 ++#else ++#define kDslEnableRoundUpDSLoopAttn 0x00002000 ++#endif ++#define kDslBitSwapEnabled 0x00004000 ++#define kDslADILowRateOptionFixDisabled 0x00008000 ++#define kDslAnymediaGSPNCrcFixEnabled 0x00010000 ++#define kDslMultiModesPreferT1p413 0x00020000 ++#define kDslT1p413UseRAck1Only 0x00040000 ++#define kDslUE9000ADI918FECFixEnabled 0x00080000 ++#define kDslG994AnnexAMultimodeEnabled 0x00100000 ++#define kDslATUCXmtPowerMinimizeEnabled 0x00200000 ++#define kDropOnDataErrorsDisabled 0x00400000 ++#define kDslSRAEnabled 0x00800000 ++ ++#define kDslT1p413HigherToneLevelNeeded 0x01000000 ++#define kDslT1p413SubsampleAlignmentEnabled 0x02000000 ++#define kDslT1p413DisableUpstream2xIfftMode 0x04000000 ++ ++/* test mode related demodCapabilities, for internal use only */ ++#define kDslTestDemodCapMask 0xF8000000 ++#define kDslSendReverbModeEnabled 0x10000000 ++#define kDslSendMedleyModeEnabled 0x20000000 ++#define kDslAutoRetrainDisabled 0x40000000 ++#define kDslPllWorkaroundEnabled 0x80000000 ++#define kDslAfeLoopbackModeEnabled 0x08000000 ++ ++/* demodCapabilities bitmap2 */ ++ ++#define kDslAnnexCProfile1 0x00000001 ++#define kDslAnnexCProfile2 0x00000002 ++#define kDslAnnexCProfile3 0x00000004 ++#define kDslAnnexCProfile4 0x00000008 ++#define kDslAnnexCProfile5 0x00000010 ++#define kDslAnnexCProfile6 0x00000020 ++#define kDslAnnexCPilot64 0x00000040 ++#define kDslAnnexCPilot48 0x00000080 ++#define kDslAnnexCPilot32 0x00000100 ++#define kDslAnnexCPilot16 0x00000200 ++#define kDslAnnexCA48B48 0x00000400 ++#define kDslAnnexCA24B24 0x00000800 ++#define kDslAnnexCReverb33_63 0x00001000 ++#define kDslAnnexCCReverb6_31 0x00002000 ++ ++#define kDslAnnexIShapedSSVI 0x00004000 ++#define kDslAnnexIFlatSSVI 0x00008000 ++ ++#define kDslAnnexIPilot64 0x00010000 ++#define kDslAnnexIA48B48 0x00020000 ++#define kDslAnnexIPilot128 0x00040000 ++#define kDslAnnexIPilot96 0x00080000 ++ ++/* Features bitmap */ ++#define kG992p2RACK1 0x00000001 ++#define kG992p2RACK2 0x00000002 ++#define kG992p2DBM 0x00000004 ++#define kG992p2FastRetrain 0x00000008 ++#define kG992p2RS16 0x00000010 ++#define kG992p2ClearEOCOAM 0x00000020 ++#define kG992NTREnabled 0x00000040 ++#define kG992p2EraseAllStoredProfiles 0x00000080 ++#define kG992p2FeaturesNPar2Mask 0x0000003B ++#define kG992p2FeaturesNPar2Shift 0 ++ ++#define kG992p1RACK1 0x00000100 ++#define kG992p1RACK2 0x00000200 ++#define kG992p1STM 0x00000800 ++#define kG992p1ATM 0x00001000 ++#define kG992p1ClearEOCOAM 0x00002000 ++#define kG992p1FeaturesNPar2Mask 0x00003B00 ++#define kG992p1FeaturesNPar2Shift 8 ++#define kG992p1DualLatencyUpstream 0x00004000 ++#define kG992p1DualLatencyDownstream 0x00008000 ++#define kG992p1HigherBitRates 0x40000000 ++ ++#if defined(G992P1_ANNEX_I) ++#define kG992p1HigherBitRates1over3 0x80000000 ++#define kG992p1AnnexIShapedSSVI 0x00000001 ++#define kG992p1AnnexIFlatSSVI 0x00000002 ++#define kG992p1AnnexIPilotFlag 0x00000008 ++#define kG992p1AnnexIPilot64 0x00000001 ++#define kG992p1AnnexIPilot128 0x00000004 ++#define kG992p1AnnexIPilot96 0x00000008 ++#define kG992p1AnnexIPilotA48B48 0x00000010 ++#endif ++ ++#define kG992p1AnnexBRACK1 0x00010000 ++#define kG992p1AnnexBRACK2 0x00020000 ++#define kG992p1AnnexBUpstreamTones1to32 0x00040000 ++#define kG992p1AnnexBSTM 0x00080000 ++#define kG992p1AnnexBATM 0x00100000 ++#define kG992p1AnnexBClearEOCOAM 0x00200000 ++#define kG992p1AnnexBFeaturesNPar2Mask 0x003F0000 ++#define kG992p1AnnexBFeaturesNPar2Shift 16 ++ ++#define kG992p1AnnexCRACK1 0x01000000 ++#define kG992p1AnnexCRACK2 0x02000000 ++#define kG992p1AnnexCDBM 0x04000000 ++#define kG992p1AnnexCSTM 0x08000000 ++#define kG992p1AnnexCATM 0x10000000 ++#define kG992p1AnnexCClearEOCOAM 0x20000000 ++#define kG992p1AnnexCFeaturesNPar2Mask 0x3F000000 ++#define kG992p1AnnexCFeaturesNPar2Shift 24 ++ ++#define kG992p1HigherBitRates1over3 0x80000000 ++ ++/* auxFeatures bitmap */ ++#define kG994p1PreferToExchangeCaps 0x00000001 ++#define kG994p1PreferToDecideMode 0x00000002 ++#define kG994p1PreferToMPMode 0x00000004 ++#define kAfePwmSyncClockShift 3 ++#define kAfePwmSyncClockMask (0xF << kAfePwmSyncClockShift) ++#define AfePwmSyncClockEnabled(val) (((val) & kAfePwmSyncClockMask) != 0) ++#define AfePwmGetSyncClockFreq(val) ((((val) & kAfePwmSyncClockMask) >> kAfePwmSyncClockShift) - 1) ++#define AfePwmSetSyncClockFreq(val,freq) ((val) |= ((((freq)+1) << kAfePwmSyncClockShift) & kAfePwmSyncClockMask)) ++ ++/* SubChannel Info bitMap for G992p1 */ ++#define kSubChannelASODownstream 0x00000001 ++#define kSubChannelAS1Downstream 0x00000002 ++#define kSubChannelAS2Downstream 0x00000004 ++#define kSubChannelAS3Downstream 0x00000008 ++#define kSubChannelLSODownstream 0x00000010 ++#define kSubChannelLS1Downstream 0x00000020 ++#define kSubChannelLS2Downstream 0x00000040 ++#define kSubChannelLS0Upstream 0x00000080 ++#define kSubChannelLS1Upstream 0x00000100 ++#define kSubChannelLS2Upstream 0x00000200 ++#define kSubChannelInfoOctet1Mask 0x0000001F ++#define kSubChannelInfoOctet2Mask 0x000003E0 ++#define kSubChannelInfoOctet1Shift 0 ++#define kSubChannelInfoOctet2Shift 5 ++ ++/****************************************************************************/ ++/* 3. Interface functions. */ ++/* */ ++/****************************************************************************/ ++ ++#ifdef G992P1 ++#if defined(G992P1_ANNEX_I2X) || defined(G992P5) ++/* lke */ ++#define kDslSamplingFreq 4416000 ++#define kDslMaxFFTSize 1024 ++#define kDslMaxFFTSizeShift 10 ++#elif defined(G992P1_ANNEX_I4X) ++#define kDslSamplingFreq 8832000 ++#define kDslMaxFFTSize 2048 ++#define kDslMaxFFTSizeShift 11 ++#elif defined(G992P1_ANNEX_I8X) ++#define kDslSamplingFreq 17664000 ++#define kDslMaxFFTSize 4096 ++#define kDslMaxFFTSizeShift 12 ++#else ++#define kDslSamplingFreq 2208000 ++#define kDslMaxFFTSize 512 ++#define kDslMaxFFTSizeShift 9 ++#endif ++#else ++#define kDslSamplingFreq 1104000 ++#define kDslMaxFFTSize 256 ++#define kDslMaxFFTSizeShift 8 ++#endif ++ ++#if defined(G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ) ++#define kDslATURUpstreamSamplingFreq 276000 ++#define kDslATURFFTSizeShiftUpstream 6 ++#elif defined(G992_ATUR_UPSTREAM_SAMPLING_FREQ_552KHZ) ++#define kDslATURUpstreamSamplingFreq 552000 ++#define kDslATURFFTSizeShiftUpstream 7 ++#else ++#define kDslATURUpstreamSamplingFreq kDslSamplingFreq ++#define kDslATURFFTSizeShiftUpstream kDslMaxFFTSizeShift ++#endif ++ ++#if defined(G992_ATUC_UPSTREAM_SAMPLING_FREQ_276KHZ) ++#define kDslATUCUpstreamSamplingFreq 276000 ++#define kDslATUCFFTSizeShiftUpstream 6 ++#elif defined(G992_ATUC_UPSTREAM_SAMPLING_FREQ_552KHZ) ++#define kDslATUCUpstreamSamplingFreq 552000 ++#define kDslATUCFFTSizeShiftUpstream 7 ++#else ++#define kDslATUCUpstreamSamplingFreq kDslSamplingFreq ++#define kDslATUCFFTSizeShiftUpstream kDslMaxFFTSizeShift ++#endif ++ ++#define kDslMaxSamplesPerSymbol (kDslMaxFFTSize+kDslMaxFFTSize/16) ++ ++#if defined(G992P1_ANNEX_I) || defined(G992P5) ++#define kDslMaxTEQLength 32 ++#else ++#define kDslMaxTEQLength 16 ++#endif ++ ++#define kDslMaxSymbolBlockSize 1 ++#define kDslMaxSampleBlockSize (kDslMaxSymbolBlockSize*kDslMaxSamplesPerSymbol) ++ ++#ifdef G992_ANNEXC ++#define kG992AnnexCXmtToRcvPathDelay 512 /* In samples at kDslSamplingFreq */ ++#endif ++ ++/*** For compatibility with existing test codes ***/ ++#if !defined(TARG_OS_RTEMS) ++typedef dslStatusCode modemStatusCode; ++typedef dslStatusStruct modemStatusStruct; ++typedef dslStatusHandlerType statusHandlerType; ++typedef dslCommandCode modemCommandCode; ++typedef dslCommandStruct modemCommandStruct; ++typedef dslCommandHandlerType commandHandlerType; ++#endif ++ ++extern void SM_DECL SoftDslSetRefData (void *gDslVars, ulong refData); ++extern ulong SM_DECL SoftDslGetRefData (void *gDslVars); ++extern int SM_DECL SoftDslGetMemorySize(void); ++extern void SM_DECL SoftDslInit (void *gDslVars); ++extern void SM_DECL SoftDslReset (void *gDslVars); ++extern void SM_DECL SoftDslLineHandler (void *gDslVars, int rxNSamps, int txNSamps, short *rcvPtr, short *xmtPtr) FAST_TEXT; ++extern Boolean SM_DECL SoftDslCommandHandler (void *gDslVars, dslCommandStruct *cmdPtr); ++ ++/* swap Lmem functions */ ++#if defined(bcm47xx) && defined(SWAP_LMEM) ++extern int SoftDslSwapLmem(void *gDslVars, int sectionN, int imageN); ++extern void init_SoftDslSwapLmem(void); ++#endif ++ ++/* SoftDsl time functions */ ++ ++extern ulong SM_DECL SoftDslGetTime(void *gDslVars); ++#define __SoftDslGetTime(gv) gDslGlobalVarPtr->execTime ++ ++extern void SM_DECL SoftDslTimer(void *gDslVars, ulong timeMs); ++ ++/* SoftDsl IO functions */ ++ ++extern void SM_DECL SoftDslClose (void *gDslVars); ++extern int SM_DECL SoftDslSendFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); ++extern int SM_DECL SoftDslReturnFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); ++ ++/* SoftDsl connection functions */ ++ ++extern void* SM_DECL SoftDslVcAllocate(void *gDslVars, dslVcParams *pVcParams); ++extern void SM_DECL SoftDslVcFree(void *gDslVars, void *pVc); ++extern Boolean SM_DECL SoftDslVcActivate(void *gDslVars, void *pVc); ++extern void SM_DECL SoftDslVcDeactivate(void *gDslVars, void *pVc); ++extern Boolean SM_DECL SoftDslVcConfigure(void *gDslVars, void *pVc, ulong mid, dslVcParams *pVcParams); ++ ++/* Special functions for LOG support */ ++ ++extern ulong SM_DECL SoftDslVc2Id(void *gDslVars, void *pVc); ++extern void* SM_DECL SoftDslVcId2Vc(void *gDslVars, ulong vcId); ++extern void* SM_DECL SoftDslGetFramePool(void *gDslVars); ++ ++/* Functions for host mode execution */ ++ ++extern void* SM_DECL SoftDslRxCellHeaderHandler (void *gDslVars, ulong hdr, uchar hdrHec); ++extern void* SM_DECL SoftDslRxCellDataHandler (void *gDslVars, int, void*); ++extern void* SM_DECL SoftDslTxCellHandler (void *gDslVars, int*, void*); ++extern Boolean SM_DECL SoftDslPhyCommandHandler (void *gDslVars, dslCommandStruct *cmdPtr); ++ ++/* Functions getting OEM parameters including G994 non standard info management */ ++ ++extern char* SM_DECL SoftDslGetTrainingVendorIDString(void *gDslVars); ++extern char* SM_DECL SoftDslGetVendorIDString(void *gDslVars); ++extern char* SM_DECL SoftDslGetSerialNumberString(void *gDslVars); ++extern char* SM_DECL SoftDslGetRevString(void *gDslVars); ++extern int SM_DECL SoftDslRevStringSize(void *gDslVars); ++extern int SM_DECL SoftDslSerNumStringSize(void *gDslVars); ++ ++extern void* SM_DECL SoftDslGetG994p1RcvNonStdInfo(void *gDslVars, ulong *pLen); ++extern void* SM_DECL SoftDslGetG994p1XmtNonStdInfo(void *gDslVars, ulong *pLen); ++ ++#ifdef G997_1_FRAMER ++ ++/* G997 functions */ ++ ++extern int SM_DECL SoftDslG997SendFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); ++extern int SM_DECL SoftDslG997ReturnFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); ++ ++#endif ++ ++#ifdef ADSL_MIB ++extern void * SM_DECL SoftDslMibGetData (void *gDslVars, int dataId, void *pAdslMibData); ++#endif ++ ++#define SoftDsl SoftDslLineHandler ++#define kSoftDslMaxMemorySize (32768*16384) ++ ++/* ++ * Internal functions ++ */ ++ ++extern void SoftDslStatusHandler (void *gDslVars, dslStatusStruct *status) FAST_TEXT; ++extern void SoftDslInternalStatusHandler (void *gDslVars, dslStatusStruct *status); ++ ++/* ++ * DSL OS functions ++ */ ++ ++#ifdef DSL_OS ++ ++#define SoftDslIsBgAvailable(gDslVars) (DSLOS_THREAD_INACTIVE == DslOsGetThreadState(&(gDslGlobalVarPtr->tcbDslBg))) ++#define SoftDslGetBgThread(gDslVars) \ ++ ((DSLOS_THREAD_INACTIVE != DslOsGetThreadState(&(gDslGlobalVarPtr->tcbDslBg))) ? &gDslGlobalVarPtr->tcbDslBg : NULL) ++#define SoftDslBgStart(gDslVars, pFunc) \ ++ DslOsCreateThread(&gDslGlobalVarPtr->tcbDslBg, DSLOS_PRIO_HIGHEST - 10, pFunc, gDslVars, \ ++ WB_ADDR(gDslGlobalVarPtr->bgStack), sizeof(gDslGlobalVarPtr->bgStack)) ++#define SoftDslBgStop(gDslVars) DslOsDeleteThread(&gDslGlobalVarPtr->tcbDslBg) ++ ++#define SoftDslEnterCritical() DslOsEnterCritical() ++#define SoftDslLeaveCritical(id) DslOsLeaveCritical(id) ++ ++#else ++ ++#define SoftDslIsBgAvailable(gDslVars) 1 ++#define SoftDslGetBgThread(gDslVars) 1 ++#define SoftDslBgStart(gDslVars, pFunc) (*pFunc)(gDslVars) ++#define SoftDslBgStop(gDslVars) ++ ++#define SoftDslEnterCritical() 0 ++#define SoftDslLeaveCritical(id) ++ ++#endif ++ ++/* ++ * DSL frames and native frame functions ++ */ ++ ++DslFrameDeclareFunctions (DslFrameNative) ++ ++/* ++ * These functions are for testing purpose, they are defined outside. ++ */ ++#ifdef STACK_SIZE_REQUIREMENT_TEST ++extern void StackSizeTestInitializeStackBeforeEntry(void); ++extern void StackSizeTestCheckStackAfterExit(void); ++extern void StackSizeTestBackupStack(void); ++extern void StackSizeTestRestoreStack(void); ++#endif /* STACK_SIZE_REQUIREMENT_TEST */ ++ ++#ifdef NEC_NSIF_WORKAROUND ++#define SoftDslGetG994NsStatus(gDslVars) (gDslGlobalVarPtr->G994NsStatus) ++#define SoftDslGetG994NsFailCounter(gDslVars) (gDslGlobalVarPtr->G994NsFailCounter) ++#endif ++ ++#endif /* SoftDslHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModem.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModem.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModem.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModem.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,3128 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * SoftModem.h ++ * ++ * ++ * Description: ++ * This file contains the exported interface for SoftModem.c ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.16 $ ++ * ++ * $Id: SoftModem.h,v 1.16 2004/04/14 21:16:51 ilyas Exp $ ++ * ++ * $Log: SoftModem.h,v $ ++ * Revision 1.16 2004/04/14 21:16:51 ilyas ++ * Merged with the latest changes in ADSL driver ++ * ++ * Revision 1.15 2004/04/13 00:56:10 ilyas ++ * Merged the latest ADSL driver changes for RTEMS ++ * ++ * Revision 1.14 2004/04/13 00:16:59 ilyas ++ * Merged the latest ADSL driver changes ++ * ++ * Revision 1.13 2003/02/22 05:07:11 ilyas ++ * Added VendorID for T1.413 mode ++ * ++ * Revision 1.12 2002/10/03 19:34:24 ilyas ++ * Added size for EOC serial number register ++ * ++ * Revision 1.11 2002/09/07 01:37:22 ilyas ++ * Added support for OEM parameters ++ * ++ * Revision 1.10 2001/12/13 02:25:34 ilyas ++ * Added definitions for G997 ++ * ++ * Revision 1.9 2001/11/30 05:56:34 liang ++ * Merged top of the branch AnnexBDevelopment onto top of the tree. ++ * ++ * Revision 1.7.2.2 2001/11/27 02:32:05 liang ++ * Combine vendor ID, serial #, and version number into SoftModemVersionNumber.c. ++ * ++ * Revision 1.7.2.1 2001/10/03 01:44:10 liang ++ * Merged with codes from main tree (tag SoftDsl_2_18). ++ * ++ * Revision 1.8 2001/09/21 19:19:01 ilyas ++ * Minor fixes for VxWorks build ++ * ++ * Revision 1.7 2000/07/17 21:08:16 lkaplan ++ * removed global pointer ++ * ++ * Revision 1.6 2000/05/03 04:09:11 ilyas ++ * Added ID for ATM log data ++ * ++ * Revision 1.5 2000/04/01 01:07:44 liang ++ * Changed file names and some module names. ++ * ++ * Revision 1.4 2000/03/02 20:18:12 ilyas ++ * Added test status code for ATM VC finished ++ * ++ * Revision 1.3 1999/08/05 20:02:11 liang ++ * Merged with the softmodem top of the tree on 08/04/99. ++ * ++ * Revision 1.2 1999/01/27 22:19:08 liang ++ * Merge with SoftModem_3_1_02. ++ * Include SoftDsl.h conditionlly so that the test utilities from SoftModem ++ * can be used without major change. It can be merged easily to SoftModem. ++ * ++ * Revision 1.170 1998/12/22 00:52:52 liang ++ * Added auxFeatures bit kV8HoldANSamUntilDetCI. When it is set, ANSam won't be ++ * sent until CI is detected (normally ANSam will be sent after 200ms). This is ++ * useful in V34 half duplex fax mode. ++ * ++ * Revision 1.169 1998/12/19 04:46:52 mwg ++ * Added bits for fax/data calling tones ++ * ++ * Revision 1.168 1998/12/17 02:46:10 scott ++ * Removed overlay-related commands/statuses and added ++ * kSetTrainingDelayReductionCmd ++ * ++ * Revision 1.167 1998/12/12 03:17:42 scott ++ * Added overlay commands and statuses ++ * ++ * Revision 1.166 1998/12/02 05:34:23 mwg ++ * Fixed a problem with bong tone detection ++ * ++ * Revision 1.165 1998/11/26 00:22:44 yura ++ * Added two more log data types: modulatorInputData & modulatorOutputData ++ * ++ * Revision 1.164 1998/11/19 03:08:04 mwg ++ * Added kSetCallProgressParamsCmd ++ * ++ * Revision 1.163 1998/11/18 23:00:03 liang ++ * Added a separate command kLoopbackTestAutoRespEnableCmd to enable or disable ++ * the loopback test auto respond feature when the modem is already on-line. ++ * ++ * Revision 1.162 1998/11/13 20:50:21 scott ++ * SoftModemInternalStatusHandler is now SM_DECL as well ++ * ++ * Revision 1.161 1998/11/13 20:42:25 scott ++ * Added SM_DECL type to entrypoint functions ++ * ++ * Revision 1.160 1998/11/13 03:02:54 scott ++ * Added SoftModemTimer prototype. ++ * Also include V.8bis types if AT_COMMANDS_V8BIS is defined. ++ * ++ * Revision 1.159 1998/11/12 01:22:46 scott ++ * Increased number of AT registers to 46 ++ * ++ * Revision 1.158 1998/11/05 22:35:18 yura ++ * Added two more S-registers ++ * ++ * Revision 1.157 1998/11/05 03:09:54 mwg ++ * Added kLapmRetryFailed to the list of LAPM errors ++ * ++ * Revision 1.156 1998/11/05 00:13:20 liang ++ * Add new connectionInfo status kLoopbackSelfTestNewErrs to report ++ * new bit errors whenever it happens. ++ * ++ * Revision 1.155 1998/11/04 07:11:33 mwg ++ * Moved declaration for SoftModemATPrintf() to SoftModem.h ++ * ++ * Revision 1.154 1998/10/29 07:24:49 mwg ++ * *** empty log message *** ++ * ++ * Revision 1.153 1998/10/15 02:09:37 luisgm ++ * added separate data rate mask for Flex to dataPumpCapabilities structure ++ * ++ * Revision 1.152 1998/10/14 00:12:15 scott ++ * Added kMnpOOBFrameCmd and command.frameSpec ++ * ++ * Revision 1.151 1998/10/09 02:19:22 luisgm ++ * added FlexV8bisStruct member to dataPumpCapabilities struc to store flex v8bis info, added define for kFlexSkipV8bis ++ * ++ * Revision 1.150 1998/10/06 19:36:33 mwg ++ * Limited 56K rates to 53K ++ * ++ * Revision 1.149 1998/10/03 03:43:38 ilyas ++ * Added status codes for Audio ++ * ++ * Revision 1.148 1998/10/01 02:03:17 mwg ++ * Added external pulse dialer option ++ * ++ * Revision 1.147 1998/09/30 01:44:26 mwg ++ * Added new functions SoftModemGetWriteBufferSize() & SoftModemGetReadBufferSize() ++ * ++ * Revision 1.146 1998/09/22 03:44:38 scott ++ * Added ALWAYS_LONG_ALIGN() macro ++ * ++ * Revision 1.145 1998/09/21 21:49:22 scott ++ * Added logDataCodes for mnpDecoder(Input/Output)Data ++ * ++ * Revision 1.144 1998/08/31 22:57:21 luisgm ++ * added constants for Flex data rates + kFlexEventTRN2AFinished ++ * ++ * Revision 1.143 1998/08/18 05:09:53 mwg ++ * Increased AT command buffer size to 128 ++ * ++ * Revision 1.142 1998/08/18 03:45:54 ilyas ++ * Integrated Audio into V70 test ++ * ++ * Revision 1.141 1998/08/14 17:46:04 ilyas ++ * Integrated Audio and G729a ++ * ++ * Revision 1.140 1998/08/10 21:42:19 mwg ++ * Added space and mark parity ++ * ++ * Revision 1.139 1998/08/08 03:39:33 scott ++ * Moved the C6xDefs and PentiumDefs includes before the internal function ++ * prototypes (to permit their redefinitions) ++ * ++ * Revision 1.138 1998/08/07 20:37:27 yura ++ * Added new S-register for &T commands ++ * ++ * Revision 1.137 1998/08/01 05:22:09 mwg ++ * Implemented split memory model ++ * ++ * Revision 1.136 1998/07/22 02:12:22 liang ++ * Added self test mode for loopback test. ++ * ++ * Revision 1.135 1998/07/21 01:19:03 liang ++ * Changed loopback test command parameter interface to use regular modeSpec. ++ * ++ * Revision 1.134 1998/07/18 03:52:10 liang ++ * Added V54 loop 2 test for V22. ++ * ++ * Revision 1.133 1998/07/15 02:45:03 mwg ++ * Added new connection info code: kPCMSpectralShapingBits ++ * ++ * Revision 1.132 1998/07/15 00:18:48 liang ++ * Add special turn off command for V34 fax to handle different turn off procedures. ++ * ++ * Revision 1.131 1998/07/13 22:19:49 liang ++ * Add V8 CI detection status and ANSam disable aux feature. ++ * ++ * Revision 1.130 1998/07/08 17:09:13 scott ++ * Added USE_LONG_ALIGN; support for 6 and PentiumDefs.h files ++ * ++ * Revision 1.129 1998/07/03 23:28:13 mwg ++ * Added Fax Class 2 defines ++ * ++ * Revision 1.128 1998/07/03 23:17:33 mwg ++ * Insuread command/status structures are long aligned ++ * ++ * Revision 1.127 1998/06/23 16:48:01 mwg ++ * Fixed a longstanding problem typical for Win95 VxD: whenever new ++ * VxD is intalled the confuguration profile may not match the old one but ++ * since the crc is correct it is still being downloaded. To avoid the problem ++ * a crc for the version number was added to avoid confusion between profiles ++ * of different versions. ++ * ++ * Revision 1.126 1998/06/19 21:04:06 liang ++ * Add auxiliary feature bit kV90ServerNotDetSbarAfterJdbarFix. ++ * ++ * Revision 1.125 1998/06/11 22:48:14 liang ++ * Add kPCM28000bpsShift constant. ++ * ++ * Revision 1.124 1998/06/05 22:11:51 liang ++ * New V90 DIL works through data mode. ++ * ++ * Revision 1.123 1998/06/01 23:03:41 liang ++ * Add v90RcvdDilDiffData logging. ++ * ++ * Revision 1.122 1998/06/01 21:24:38 mwg ++ * Changed some of the names. ++ * ++ * Revision 1.121 1998/05/13 04:55:22 mwg ++ * Now passing the number of spectral shaping bits in aux features ++ * ++ * Revision 1.120 1998/05/13 02:53:13 liang ++ * Add field "value" to command param structure. ++ * ++ * Revision 1.119 1998/05/12 04:42:23 mwg ++ * Replaced some of the status messages ++ * ++ * Revision 1.118 1998/05/11 23:36:10 mwg ++ * Added 8000Hz symbol rate to the map ++ * ++ * Revision 1.117 1998/05/05 04:28:39 liang ++ * V90 works up to data mode first version. ++ * ++ * Revision 1.116 1998/04/21 09:36:45 mwg ++ * Fixed a few problems for 16Khz and added 32Khz. ++ * ++ * Revision 1.115 1998/04/17 22:33:54 liang ++ * Added V90 DIL for mu-law PCM. ++ * ++ * Revision 1.114 1998/04/15 22:36:39 mwg ++ * Added new parameters to kDialCmd to allow individual control of each ++ * DTMF group attenuation. ++ * ++ * Revision 1.113 1998/04/15 18:16:22 ilyas ++ * Integrated V.8bis and changed coding of LinkLayerType to bitMap ++ * ++ * Revision 1.112 1998/04/15 07:59:06 mwg ++ * Added new status codes for V.90 ++ * ++ * Revision 1.111 1998/04/11 00:29:16 mwg ++ * Fixed the warnings which appeared when Irix builds were upgraded to ++ * gcc 2.8.1 ++ * ++ * Revision 1.110 1998/04/11 00:25:01 ilyas ++ * More V.70 statuses ++ * ++ * Revision 1.109 1998/04/10 23:29:31 mwg ++ * Added new field to capabilities: dataRates56K ++ * ++ * Revision 1.108 1998/04/09 02:02:56 mwg ++ * Added status for Ja detection. ++ * ++ * Revision 1.107 1998/04/03 02:05:30 ilyas ++ * More V.70 commands added ++ * ++ * Revision 1.106 1998/04/02 06:15:39 mwg ++ * Added coding type (Mu-law/A-law) status reporting. ++ * ++ * Revision 1.105 1998/03/30 09:53:57 mwg ++ * Added definition for k56Flex modulation for future use. ++ * ++ * Revision 1.104 1998/03/27 17:56:09 ilyas ++ * Added definitions for V.70 ++ * ++ * Revision 1.103 1998/03/26 23:29:04 liang ++ * Added first version of IMD estimation. ++ * ++ * Revision 1.102 1998/03/20 04:37:26 mwg ++ * Increased the size of the nominal variance to 32 bit. ++ * ++ * Revision 1.101 1998/03/06 01:22:04 yura ++ * Improved Win95 VxD segmentation handling ++ * ++ * Revision 1.100 1998/03/06 01:06:18 liang ++ * Add initial version of V90 phase 1 and 2. ++ * ++ * Revision 1.99 1998/03/05 23:42:22 mwg ++ * (hxl) Implemented enable/disable call waiting command. ++ * ++ * Revision 1.98 1998/02/26 06:13:06 mwg ++ * Increased the number of AT S-registers to account for newly introduced ++ * S9 and S10. ++ * ++ * Revision 1.97 1998/02/25 18:18:25 scott ++ * Added v42bisCycleCount for V42BIS_THROUGHPUT_CONTROL ++ * ++ * Revision 1.96 1998/02/24 05:31:20 mwg ++ * Added stuff required by international version of AT command processor. ++ * ++ * Revision 1.95 1998/02/17 01:14:10 scott ++ * Reenabled sys/types.h for Linux builds ++ * ++ * Revision 1.94 1998/02/16 22:32:23 scott ++ * Changed copyright notice ++ * ++ * Revision 1.93 1998/02/16 22:17:44 scott ++ * Turned off include of sys/types.h for normal builds ++ * ++ * Revision 1.92 1998/02/16 21:53:28 scott ++ * Exclude sys/types.h for another compiler ++ * ++ * Revision 1.91 1998/02/09 18:24:10 scott ++ * Fixed ComplexShort type to work around bugs in MS and GreenHill compilers ++ * ++ * Revision 1.90 1998/01/27 01:37:36 mwg ++ * Added new log identifier for pcm infidelity data. ++ * ++ * Revision 1.89 1998/01/22 19:49:32 liang ++ * Add auxFeature bit kFaxV34HDXAllowAsymCtrlChan. ++ * ++ * Revision 1.88 1998/01/21 02:32:01 liang ++ * Add more V34 half duplex training progress codes. ++ * ++ * Revision 1.87 1997/12/23 03:28:25 liang ++ * Add more half duplex V34 related constants. ++ * ++ * Revision 1.86 1997/12/18 19:38:50 scott ++ * Added agcData log type. ++ * Added kDisableFaxFastClearDown demod capability ++ * ++ * Revision 1.85 1997/12/18 06:02:45 mwg ++ * Added a function to reenable DC offset tracking. ++ * ++ * Revision 1.84 1997/12/17 22:46:30 mwg ++ * Minor modifications to X2 escape status reporting. ++ * ++ * Revision 1.83 1997/12/16 06:49:45 mwg ++ * Implemented proper data rate reporting for PCM modem. ++ * ++ * Revision 1.82 1997/12/13 06:11:08 mwg ++ * Added X2 interface hooks ++ * ++ * Revision 1.81 1997/12/02 06:21:33 mwg ++ * Implemented kSetATRegister command. ++ * ++ * Revision 1.80 1997/11/27 02:11:41 liang ++ * Add code for half duplex V34 control channel. ++ * ++ * Revision 1.79 1997/11/19 19:52:48 guy ++ * Added constant to define V.34 half duplex operation ++ * ++ * Revision 1.78 1997/10/24 05:15:53 scott ++ * Added AGC and phase hit recovery to demodCapabilities ++ * ++ * Revision 1.77 1997/10/01 02:47:50 liang ++ * Add PCM interface. ++ * ++ * Revision 1.76 1997/09/29 15:48:04 yura ++ * Added #pragma statement for W95 Vxd ++ * ++ * Revision 1.75 1997/09/18 20:32:39 scott ++ * Do not include VxD support files if GENERATE_DEPENDENCIES is defined. ++ * ++ * Revision 1.74 1997/09/18 12:40:55 yura ++ * Removed #ifdef statments to be more robust ++ * ++ * Revision 1.73 1997/09/17 17:32:41 scott ++ * Do not include sys/types.h for 6 ++ * ++ * Revision 1.72 1997/08/08 00:53:48 mwg ++ * Added fields for LAP-M frames printout. ++ * Added fields in auxFeatures to pass preemphasis filter parameters ++ * to V.34 phase 3 when doing PTT testing. ++ * ++ * Revision 1.71 1997/08/06 03:41:45 yura ++ * Added a few includes and defines needed by Win 95 driver. ++ * ++ * Revision 1.70 1997/08/05 03:22:10 liang ++ * Add equalizer center tap adjustment calculation related constants. ++ * ++ * Revision 1.69 1997/07/29 02:44:19 mwg ++ * Added new field to dataPumpCapabilities structure. This field is not ++ * yet exposed to external interface and currently is only used to ++ * enable PTT testing. ++ * Added new commands: kStartDataModemPTTTestCmd & kStartDataModemLoopbackTestCmd ++ * ++ * Revision 1.68 1997/07/22 22:05:10 liang ++ * Change sample rate setup as a normal command. ++ * ++ * Revision 1.67 1997/07/21 23:23:30 liang ++ * Define SoftModemSetSampleRate as null when SAMPLE_RATE_CONVERSION is not defined. ++ * ++ * Revision 1.66 1997/07/21 22:38:36 liang ++ * Change sample rate converter structure so that sample rate can be changed ++ * on the fly (at very begining) to either 8KHz or 9600Hz. ++ * ++ * Revision 1.65 1997/07/21 20:22:01 mwg ++ * Added statusInfoData to the log identifiers. ++ * ++ * Revision 1.64 1997/07/16 20:40:07 scott ++ * Added multitone monitor fields ++ * ++ * Revision 1.63 1997/07/10 02:31:08 mwg ++ * 1. Added kRxFrameHDLCFlags detected status for the ++ * framingInfo. ++ * 2. Added kLapmMNPFrameDetected status to lapmStatusCode. ++ * 3. Increased the number of AT registers to 35 ++ * 4. Modified LinkLayerSpec structure in modemCommandStruc ++ * to provide the initial values of rxDataRate & ++ * txDataRate and RT delay for the cases when ++ * link layer is started *after* the data connection ++ * is established and the status snooper is unable ++ * to determine the rates and RT delay. ++ * 5. Added a few extra *empty* constant definitions for ++ * disabled features. ++ * ++ * Revision 1.62 1997/07/02 19:15:05 scott ++ * Added bits for Bel103 & Bel212 modulations. ++ * ++ * Revision 1.61 1997/07/02 05:15:16 mwg ++ * Added MNP code. ++ * ++ * Revision 1.60 1997/07/01 23:52:48 mwg ++ * Modified the record test setup to log and use all the commands. ++ * ++ * Revision 1.59 1997/06/25 19:11:26 mwg ++ * 1. Added new framingInfoCode values for Async framing error reporting; ++ * 2. Added a substructure to pass serial data format for kSetDTERate cmd; ++ * ++ * Revision 1.58 1997/05/28 02:05:08 liang ++ * Add PCM modem phase 2 codes. ++ * ++ * Revision 1.57 1997/05/12 21:55:08 liang ++ * Add call waiting tone detector module. ++ * ++ * Revision 1.56 1997/03/21 23:50:08 liang ++ * Added initial version of V8bis module to CVS tree. ++ * ++ * Revision 1.55 1997/03/19 18:35:05 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.54 1997/03/11 11:11:45 mwg ++ * Added code to report V42bis statistics. ++ * ++ * Revision 1.53 1997/03/04 06:21:08 mwg ++ * Added logging of most commands. ++ * ++ * Revision 1.52 1997/02/28 23:45:13 liang ++ * Added training progress status report kPhaseJitterDeactivated. ++ * ++ * Revision 1.51 1997/02/28 22:23:22 mwg ++ * Implemented the following features: ++ * - Cleardown for fax modulations V.27, V.29 V.17 ++ * - Rockwell compatible bitmap report (needed by a customer) ++ * ++ * Revision 1.50 1997/02/28 03:05:31 mwg ++ * Added more logging data types. ++ * ++ * Revision 1.49 1997/02/27 05:28:58 mwg ++ * Added RxFrameOK report. ++ * ++ * Revision 1.48 1997/02/27 01:48:53 liang ++ * Add kV8MenuDataWord1 and kV8MenuDataWord2 connectionInfo status. ++ * ++ * Revision 1.47 1997/02/24 02:30:27 mwg ++ * Added new log data: predictorErrData ++ * ++ * Revision 1.46 1997/02/22 03:00:22 liang ++ * Add echoCancelledSignalData. ++ * ++ * Revision 1.45 1997/02/21 01:26:42 liang ++ * Add six more bits for the Demodulator capabilities to deal with 2nd order ++ * time tracking & PLLs, as well as shorter NEEC & PFEEC, and front end HBF. ++ * ++ * Revision 1.44 1997/02/17 03:09:00 mwg ++ * Added LAPM statistics printout. ++ * ++ * Revision 1.43 1997/02/04 08:38:47 mwg ++ * Added dc cancelled samples printout. ++ * ++ * Revision 1.42 1997/01/29 21:40:28 mwg ++ * Changed the way timers work: now time is passed as Q4 ms instead of ticks. ++ * Completed the 8KHz front end implementation. ++ * Got rid of kSamplesPerSecond constant. ++ * ++ * Revision 1.41 1997/01/24 07:13:50 mwg ++ * Added new statuses for automoder. ++ * ++ * Revision 1.40 1997/01/23 02:03:08 mwg ++ * Replaced old sample rate conversion with the newer one. ++ * Still has to resolve the automoding issue. ++ * ++ * Revision 1.39 1997/01/21 00:55:04 mwg ++ * Added 8KHz front end functionality. ++ * ++ * Revision 1.38 1996/11/13 00:30:55 liang ++ * Add kAutoLoadReductionEnabled to demodCapabilities so that PFEEC, FEEC, IEEC ++ * can be disabled automatically, but for worst processor loading test they ++ * won't be disabled when this bit is not set. ++ * ++ * Revision 1.37 1996/11/07 23:07:18 mwg ++ * Rearranged global variables to allow V.17 short training. ++ * ++ * Revision 1.36 1996/09/17 23:55:05 liang ++ * Change kMaxDataBlockSize from 16 to 24 to handle high data rates. ++ * ++ * Revision 1.35 1996/09/05 19:43:39 liang ++ * Removed caller ID error status code kCallerIDUnknownMessageType, and ++ * added caller ID status codes kCallerIDUnknownMessage & kCallerIDWholeMessage. ++ * Changed the callerIDStatus report structure. ++ * ++ * Revision 1.34 1996/08/29 00:36:57 liang ++ * Added kLapmTxFrameStatus and kLapmRxFrameStatus. ++ * ++ * Revision 1.33 1996/08/27 22:56:01 liang ++ * Added kResetHardware status code. ++ * ++ * Revision 1.32 1996/08/23 23:35:35 liang ++ * Add kATDebugStatus and function SoftModemGetHybridDelay. ++ * ++ * Revision 1.31 1996/08/22 01:13:19 yg ++ * Added AT command processor. ++ * ++ * Revision 1.30 1996/08/12 21:46:47 mwg ++ * Added code to report capabilities. ++ * ++ * Revision 1.29 1996/08/10 01:59:59 mwg ++ * Added report of the sent rate sequence; ++ * ++ * Revision 1.28 1996/08/07 22:15:02 mwg ++ * Added new status reports: ++ * kRemoteFreqOffset ++ * kIEECDeactivated ++ * kPFEECDeactivated ++ * ++ * Revision 1.27 1996/06/27 05:15:48 mwg ++ * Added V.24 circuit status. ++ * ++ * Revision 1.26 1996/06/27 02:12:43 mwg ++ * Cleaned the code. ++ * ++ * Revision 1.25 1996/06/20 23:57:30 mwg ++ * Added new training progress status. ++ * ++ * Revision 1.24 1996/06/18 21:13:50 mwg ++ * Added trellis MSE data logging. ++ * ++ * Revision 1.23 1996/06/12 02:31:10 mwg ++ * Added new type: VeryLong ++ * ++ * Revision 1.22 1996/06/08 22:15:39 mwg ++ * Added new status report: kCleardownStarted ++ * Added new field for the features: kV34bisEnabled ++ * ++ * Revision 1.21 1996/05/31 00:29:11 liang ++ * Add feature bit kV34ExtraINFOPreamble. ++ * ++ * Revision 1.20 1996/05/30 23:28:31 mwg ++ * Replaced enums with #defines ++ * ++ * Revision 1.19 1996/05/25 00:38:27 mwg ++ * Added kProjectedDataRate training progress report. ++ * ++ * Revision 1.18 1996/05/24 23:27:15 mwg ++ * Added mode status codes. ++ * ++ * Revision 1.17 1996/05/10 05:39:59 liang ++ * Move the includes for DEBUG inside "ifndef SoftModemTypes" so that ++ * cap build won't break. ++ * ++ * Revision 1.16 1996/05/08 01:49:34 mwg ++ * Added capability to setup auxiliary data channel handlers. ++ * ++ * Revision 1.15 1996/05/07 22:51:08 liang ++ * Added group delay estimation and improved symbol rate selection process. ++ * ++ * Revision 1.14 1996/05/06 06:49:09 mwg ++ * Fixed linux problems. ++ * ++ * Revision 1.13 1996/05/02 08:40:16 mwg ++ * Merged in Chromatic bug fixes. ++ * ++ * Revision 1.12 1996/05/02 02:26:21 mwg ++ * Added code to implement dozing functionality for v.34. ++ * ++ * Revision 1.11 1996/05/01 22:43:13 mwg ++ * Added new command: kDozeCmd; ++ * ++ * Revision 1.10 1996/05/01 19:20:16 liang ++ * Add command codes kInitiateRetrainCmd and kInitiateRateRenegotiationCmd. ++ * ++ * Revision 1.9 1996/04/25 01:12:37 mwg ++ * Added new flag: rapid preliminary EC training. ++ * ++ * Revision 1.8 1996/04/20 02:26:22 mwg ++ * Added preliminary far-end echo support ++ * ++ * Revision 1.7 1996/04/15 23:26:16 mwg ++ * Changed flag definitions for v34 modem. ++ * ++ * Revision 1.6 1996/04/04 02:35:50 liang ++ * Change kCid from 0x0080 to 0x0004 (0x0080 is defined as kV32). ++ * ++ * Revision 1.5 1996/03/08 23:07:01 mwg ++ * Added name for the struct. ++ * ++ * Revision 1.4 1996/03/02 00:59:27 liang ++ * Added typedef for V34CodingParameters structure. ++ * ++ * Revision 1.3 1996/02/27 02:28:31 mwg ++ * Fixed a bug in kLapmLongADPEnabled definition. ++ * ++ * Revision 1.2 1996/02/19 23:50:59 liang ++ * Removed compressionSetup parameter from the link layer command structure. ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.5 1996/01/15 23:26:04 liang ++ * Change the softmodem command structure name from SoftwareModemCommand ++ * to SoftwareModemCommandParameters. ++ * ++ *****************************************************************************/ ++#ifndef SoftModemPh ++#define SoftModemPh ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.1 General types */ ++/****************************************************************************/ ++ ++#ifndef SM_DECL ++#define SM_DECL ++#endif ++ ++#ifdef __VxWORKS__ ++#include <types/vxTypesOld.h> ++#endif ++ ++#ifdef DEBUG ++/* We have to define __wchar_t for Linux */ ++#if defined __linux__ && !defined _NO_WHCAR_DEF_ ++typedef long int __wchar_t; ++#endif ++#if !defined(__KERNEL__) && !defined(_CFE_) ++#include <stdio.h> ++#include <stdlib.h> ++#endif ++ ++#if defined(__linux__) || defined (__unix__) || defined (__unix) || (defined (__mips__) && !defined(_CFE_) && !defined(VXWORKS) && !defined(TARG_OS_RTEMS))/* enable if necessary, but not for dos-based builds */ ++#include <linux/types.h> ++#endif ++ ++ ++#endif /* DEBUG */ ++ ++#if defined(W95_DRIVER) ++#pragma code_seg("_LTEXT", "LCODE") ++#pragma data_seg("_LDATA", "LCODE") ++#pragma const_seg("_LDATA", "LCODE") ++#pragma bss_seg("_LDATA", "LCODE") ++#pragma pack(1) ++#endif /* W95_DRIVER */ ++ ++#ifndef SoftModemTypes ++#include "SoftModemTypes.h" ++#endif /* SoftModemTypes */ ++ ++ ++typedef struct ++ { ++ schar x, y; ++ } ComplexByte; ++ ++typedef struct ++ { ++ uchar numerator; ++ uchar denominator; ++ } Ratio; ++ ++#ifdef PEGASUS ++typedef union ++ { ++ struct ++ { ++ short x, y; ++ }; ++ ++ long foo; ++ } ComplexShort; ++#else ++typedef struct ++ { ++ short x, y; ++#ifdef GREENHILL ++ long a[0]; ++#endif ++ } ComplexShort; ++#endif ++ ++typedef struct ++ { ++ long x, y; ++ } ComplexLong; ++ ++typedef struct ++ { ++ ushort x0, x1, x2; ++ short x3; ++ } VeryLong; ++ ++typedef union ++ { ++ struct ++ { ++ uchar number; ++ uchar defaultValue; /* default value */ ++ uchar maxValue; /* max allowed value */ ++ uchar minValue; /* should be greater then maxValue to make reg readonly */ ++ } param; ++ long alignment; ++ } SRegisterDefinition; ++ ++#define MacroPaste2(a,b) a##b ++#define MacroPaste(a,b) MacroPaste2(a,b) ++#define ALWAYS_LONG_ALIGN() long MacroPaste(ALIGNMENT,__LINE__); ++ ++#ifdef USE_LONG_ALIGN ++#define LONG_ALIGN() ALWAYS_LONG_ALIGN() ++#else ++#define LONG_ALIGN() ++#endif ++ ++typedef ulong bitMap; ++ ++typedef int pace; ++#define kStop 0 ++#define kVerySlow 1 ++#define kSlow 2 ++#define kMedium 3 ++#define kFast 4 ++ ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.2 Modem specific types */ ++/****************************************************************************/ ++ ++typedef long directionType; ++#define kXmt 0 ++#define kRcv 1 ++#define kXmtRcv 2 ++ ++ ++#define originating kXmt ++#define answering kRcv ++#define kOrg kXmt ++#define kAns kRcv ++#define kOrgAns kXmtRcv ++ ++#define ORIGINATING originating ++#define ANSWERING answering ++ ++typedef int pcmCodingType; ++#define kMuLawPCM 0 ++#define kALawPCM 1 ++ ++#define kMuLawPCMScaleShift 2 ++#define kALawPCMScaleShift 3 ++ ++/* link layer and framer share defines */ ++typedef bitMap framerType; ++typedef bitMap linkLayerType; ++#define kNoFramer 0 ++#define kSync 0x00000001 ++#define kAsync 0x00000002 ++#define kHDLC 0x00000004 ++#define kLapm 0x00000008 ++#define kMnp 0x00000010 ++#define kV70 0x00000020 ++#define kSAM 0x00000040 ++ ++ ++typedef bitMap modulationMap; ++typedef bitMap symbolRateMap; ++typedef bitMap dataRateMap; ++typedef bitMap featureMap; ++typedef bitMap breakType; ++ ++typedef bitMap audioType; ++#define kRawAudio 0 ++#define kAudioG729A 1 ++#define kAudioG729 2 ++#define kAudioG723 3 ++ ++ ++#ifndef ADSL_MODEM ++typedef long modemStatusCode; ++#endif ++ /* Information status Codes: 1-31 */ ++#define kSetSampleRate 1 ++#define kModulationKnown 2 ++#define kRxSymbolRate 3 ++#define kTxSymbolRate 4 ++#define kRxCarrierFreq 5 ++#define kTxCarrierFreq 6 ++#define kTxPreemphasisFilter 7 ++#define kTxPowerAdjustment 8 ++#define kRemoteTxPreemphasisFilter 9 ++#define kRemoteTxPowerAdjustment 10 ++#define kRxRateKnown 11 ++#define kTxRateKnown 12 ++#define kRxDataModeActive 13 ++#define kTxDataModeActive 14 ++#define kTxSignalCompleted 15 ++#define kDTMFSignalDetected 16 ++#define kModemSignalDetected 17 ++#define kCallProgressSignalDetected 18 ++#define kCustomSignalDetected 19 ++#define kFaxPreambleDetected 20 ++#define kV24CircuitStatusChange 21 ++#define kHookStateChange 22 ++#define kCallWaitingToneDetected 23 ++#define kMultiToneSignalDetected 24 ++#define kPulseShuntStateChange 25 ++#define kRingFrequency 26 ++ ++ ++ /* Warning status Codes: 32-64 */ ++#define kError 32 ++#define kV34Exception 33 ++#define kClearDownLocal 34 ++#define kClearDownRemote 35 ++#define kCarrierPresent 36 ++#define kCarrierLost 37 ++#define kRetrainingLocal 38 ++#define kRetrainingRemote 39 ++#define kRateRenegotiationLocal 40 ++#define kRateRenegotiationRemote 41 ++#define kFallbackStarted 42 ++#define kFallForwardStarted 43 ++#define kCleardownStarted 44 ++#define kIllegalCommand 45 ++ ++ /* Auxiliary status Codes: 64-.. */ ++#define kTrainingProgress 64 ++#define kConnectionInfo 65 ++#define kDialerStatus 66 ++#define kFramingInfo 67 ++#define kBreakReceived 68 ++#define kLapmStatus 69 ++#define kLapmParameter 70 ++#define kV42bisStatus 71 ++#define kCallerIDStatus 72 ++#define kIOStatus 73 ++#define kCapabilitiesStatus 74 ++#define kSpeakerStatus 75 ++#define kATProfileChanged 76 ++#define kATDebugStatus 77 ++#define kResetHardware 78 ++#define kV8bisStatus 79 ++#define kMnpStatus 80 ++#define kMnpParameter 81 ++#define kV70Status 82 ++#define kV70Parameter 83 ++#define kFaxClass2Status 84 ++#define kAudioStatus 85 ++#define kAudioParameter 86 ++#define kOverlayStatus 87 ++#define kCallerIDCircuitStatus 88 ++#define kV80Status 89 ++#define kV80Parameter 90 ++#define kLocalCountryChanged 91 ++#define kDTERateChanged 92 ++#define kATResponse 93 ++#define kFramerConfigured 94 ++#define kA8RStatus 95 ++#define kA8TStatus 96 ++#define kVersionStatus 97 ++ ++ /* Testing status codes: 128-... */ ++ /* These statuses are generated by modem test suit */ ++#define kTestFinished 128 ++#define kConnectivityTestFinished 129 ++#define kTestCheckSum 130 ++#define kLogFileControl 131 ++#define kTestAtmVcFinished 132 ++#define kTestClearEocFinished 133 ++#define kTestG997Finished 134 ++ ++typedef long modemErrorCode; ++#define kNoError 0 ++#define kErrorTimerExpired 1 ++#define kErrorNoSReceived 2 ++#define kErrorNoSbarReceived 3 ++ ++ ++typedef long dialerStatusCode; ++#define kDialCompleted 0 ++#define kNoDialToneDetected 1 ++#define kBongToneDetected 2 ++#define kNoBongToneDetected 3 ++#define kErrorIllegalDialModifier 5 ++#define kDialStarted 6 ++#define kExternalPulseDialDigit 7 ++ ++ ++typedef long framingInfoCode; ++#define kRxFrameOK 0 ++#define kRxFrameTooLong 1 ++#define kRxFrameCRCError 2 ++#define kTxFrameUnderrun 3 ++#define kRxFrameOverrun 4 ++#define kRxFrameAborted 5 ++#define kRxFrameParityError 6 ++#define kRxFrameFormatError 7 ++#define kRxFrameHDLCFlagsDetected 8 ++ ++ ++typedef long IOStatusCode; ++#define kRxDataReady 0 ++#define kRxBufferOverflow 1 ++#define kTxSpaceAvailable 2 ++#define kTxBufferEmpty 3 ++ ++typedef long capabilitiesStatusCode; ++#define kSymbolRates 0 ++#define kDataRates 1 ++#define kFeatures 2 ++#define kDemodCapabilities 3 ++#define kRateThresholdAdjustment 4 ++#define kXmtLevel 5 ++#define kHybridDelay 6 ++#define kAuxFeatures 7 ++ ++ ++typedef long A8TStatusCode; ++#define kA8TFinished 0 ++ ++typedef long callerIDStatusCode; ++#define kCallerIDError 0 ++#define kCallerIDChannelSeizureReceived 1 ++#define kCallerIDMarkSignalReceived 2 ++#define kCallerIDTime 3 ++#define kCallerIDTelnum 4 ++#define kCallerIDName 5 ++#define kCallerIDEnd 6 ++#define kCallerIDUnknownMessage 7 ++#define kCallerIDWholeMessage 8 ++ ++ ++typedef long callerIDErrorCode; ++#define kCallerIDNoError 0 ++#define kCallerIDMarkSignalError 1 ++#define kCallerIDTooManyMarkBits 2 ++#define kCallerIDMessageTooLong 3 ++#define kCallerIDChecksumError 4 ++ ++ ++typedef long connectionInfoCode; ++#define kRTDelay 1 ++#define kRxSignalLevel 2 ++#define kTimingOffset 3 ++#define kFreqOffset 4 ++#define kPhaseJitter 5 ++#define kSNR 6 ++#define kNearEchoLevel 7 ++#define kSER 8 ++#define kNearEndDelay 9 ++#define kFarEchoLevel 10 ++#define kL1L2SNRDifference 11 ++#define kDCOffset 12 ++#define kTotalRxPower 13 ++#define kRemoteFreqOffset 14 ++/* obsolete #define kV8MenuDataWord1 15 */ ++/* obsolete #define kV8MenuDataWord2 16 */ ++#define kPCMP2AnalogDetSNR 17 ++#define kPCMP2DigitalDetSNR 18 ++#define kPCMP2RBSDetSNR 19 ++#define kEqCenterTapOffset 20 ++#define kPCMPadValue 21 ++#define kPCMRBSMap 22 ++#define kPCMCodingType 23 ++#define kPCMSpectralShapingBits 24 ++#define kLoopbackSelfTestResult 25 ++#define kEyeQuality 26 ++#define kLoopbackSelfTestNewErrs 27 ++#define kV34EqlLengthStatus 28 ++#define kV34EqlOffsetStatus 29 ++#define kV8CallMenuData 30 ++#define kV8JointMenuData 31 ++#define kPCMClientIeecLengthStatus 32 ++#define kPCMClientIeecOffsetStatus 33 ++#define kSeamlessRateChange 34 ++ ++typedef long trainingProgressCode; ++#define kPeriodicalSignalDetected 0 ++#define kPhaseReversalDetected 1 ++#define kSignalStartDetected 2 ++#define kSignalEndDetected 3 ++#define kSSignalDetected 4 ++#define kSbarSignalDetected 5 ++#define kJ4SignalDetected 6 ++#define kJ16SignalDetected 7 ++#define kJprimeSignalDetected 8 ++#define kMPSignalDetected 9 ++#define kMPprimeSignalDetected 10 ++#define kMPSignalSent 11 ++#define kMPprimeSignalSent 12 ++#define kRateSignalDetected 13 ++#define kESignalDetected 14 ++#define kRateSignalSent 15 ++ ++#define kAutomodingTryModulation 16 ++#define kAutomodingCompleted 17 ++#define kRCFaxBitMapStatus 18 ++ ++#define kV8CIDetected 19 ++#define kV8ANSToneDetected 20 ++#define kV8ANSamDetected 21 ++#define kV8CMDetected 22 ++#define kV8JMDetected 23 ++#define kV8CJDetected 24 ++#define kV8Finished 25 ++ ++#define kV34Phase2Started 26 ++#define kV34Phase2INFOSequenceDetected 27 ++#define kV34Phase2NearEndEchoDetected 28 ++#define kV34Phase2L1Receiving 29 ++#define kV34Phase2L2Receiving 30 ++#define kV34Phase2Finished 31 ++#define kV34Phase3Started 32 ++#define kV34Phase3Finished 33 ++#define kV34Phase4Started 34 ++#define kV34Phase4Finished 35 ++#define kV34DecoderParameters 36 ++#define kV34EncoderParameters 37 ++ ++#define kMaxLocalRxDataRate 38 ++#define kMaxLocalTxDataRate 39 ++#define kMaxRemoteRxDataRate 40 ++#define kMaxRemoteTxDataRate 41 ++#define kProjectedDataRate 42 ++#define kFEECDeactivated 43 ++#define kIEECDeactivated 44 ++#define kPFEECDeactivated 45 ++#define kPhaseJitterDeactivated 46 ++ ++#define kPCMP2DetectedDigitalConnection 47 ++#define kPCMP2DetectedRBS 48 ++#define kX2DetectedPhase1Escape 49 ++ ++#define kStarted1200BpsTraining 50 ++#define kStarted2400BpsTraining 51 ++#define kUnscrambledOneDetected 52 ++#define kScrambled1200BpsOneDetected 53 ++#define kScrambled2400BpsOneDetected 54 ++#define kV22BisS1Detected 55 ++#define kV22InitiateLoop2Test 56 ++#define kV22RespondLoop2Test 57 ++#define kV22Loop2TestAlt01Detected 58 ++ ++#define kDataModemLoop1TestStarted 59 ++#define kDataModemLoop1TestFinished 60 ++#define kDataModemLoop2TestStarted 61 ++#define kDataModemLoop2TestFinished 62 ++#define kDataModemLoop3TestStarted 63 ++#define kDataModemLoop3TestFinished 64 ++#define kDataModemSelfLoopTestEnabled 65 ++ ++#define kPCMPhase3Started 70 ++#define kPCMPhase3Finished 71 ++#define kPCMPhase4Started 72 ++#define kPCMPhase4Finished 73 ++ ++#define kV90JaSignalDetected 74 ++#define kV90JdSignalDetected 75 ++#define kV90JdPrimeSignalDetected 76 ++#define kV90RSignalDetected 77 ++#define kV90RBarSignalDetected 78 ++#define kV90CPSignalDetected 79 ++ ++#define kV90CPtSignalSent 80 ++#define kV90CPSignalSent 81 ++#define kV90CPprimeSignalSent 82 ++ ++ ++#define kV34SeamlessRateChangeRequestSent 83 ++#define kV34SeamlessRateChangeUpdateSent 84 ++#define kV34SeamlessRateChangeRequestReceived 85 ++#define kV34SeamlessRateChangeUpdateReceived 86 ++#define kV34SeamlessRateChangeUpdateTimeout 87 ++ ++#define kV90JaSignalAcknowledged 88 ++ ++#define kV34HCtrlChanPPhDetected 100 ++#define kV34HCtrlChanMPhDetected 101 ++#define kV34HCtrlChanRatesKnown 102 ++#define kV34HDXCtrlChanBinary1Detected 103 ++#define kV34HDXPhase3Started 104 ++#define kV34HDXPhase3Finished 105 ++#define kV34HDXPrimChanBinary1Detected 106 ++#define kFlexEventTRN2AFinished 107 ++ ++#define kV32RanginigStarted 108 ++#define kV32RangingStarted 108 ++#define kV32RanginigFinished 109 ++#define kV32RangingFinished 109 ++ ++ ++typedef long lapmStatusCode; ++#define kLapmDisconnected 0 /* LAPM disconnected */ ++#define kLapmConnected 1 /* LAPM is connected */ ++#define kLapmV42ODPDetected 2 /* LAPM ODP is detected */ ++#define kLapmV42ADPDetected 3 /* LAPM V.42 ADP is detected */ ++#define kLapmUnknownADPDetected 4 /* LAPM Unsupported ADP is detected */ ++#define kLapmTimeout 5 /* LAPM Timeout */ ++#define kLapmMNPFrameDetected 6 /* LAPM detected MNP frame */ ++#define kLapmDPDetectionTimedOut 7 /* LAPM Unsupported ADP is detected */ ++#define kLapmError 8 /* LAPM Error */ ++#define kLapmTestResult 9 /* LAPM loopback test result */ ++#define kLapmTxFrameStatus 10 ++#define kLapmRxFrameStatus 11 ++#define kLapmTxStatistics 12 ++#define kLapmRxStatistics 13 ++ ++typedef long lapmTakedownReason; ++#define kLapmRemoteDisconnect 0 ++#define kLapmLocalDisconnect 1 ++#define kLapmCannotConnect 2 ++#define kLapmProtocolError 3 ++#define kLapmCompressionError 4 ++#define kLapmInactivityTimer 5 ++#define kLapmRetryFailed 6 ++ ++ ++typedef long lapmParameterCode; ++#define kLapmXmtK 0 ++#define kLapmRcvK 1 ++#define kLapmXmtN401 2 ++#define kLapmRcvN401 3 ++#define kLapmTESTSupport 4 ++#define kLapmSREJSupport 5 ++#define kLapmCompDir 6 ++#define kLapmCompDictSize 7 ++#define kLapmCompStringSize 8 ++ ++ ++typedef long lapmErrorCode; ++#define kLapmNoError 0 ++#define kLapmBufferOverflow 1 ++#define kLapmFrameTooLong 2 ++#define kLapmBadFrame 3 ++#define kLapmUnknownEvent 4 ++/* 6 is reserved for kLapmRetryFailed defined above */ ++ ++ ++typedef long lapmTestResultCode; ++#define kLapmTestPassed 0 ++#define kLapmTestRequestIgnored 1 ++#define kLapmTestAlreadyInProgress 2 ++#define kLapmTestNotSupported 3 ++#define kLapmTestFailed 4 ++ ++ ++typedef long v42bisStatusCode; ++#define kV42bisEncoderTransparentMode 0 /* V.42bis encoder transparent mode active */ ++#define kV42bisEncoderCompressedMode 1 /* V.42bis encoder compressed mode active */ ++#define kV42bisDecoderTransparentMode 2 /* V.42bis decoder transparent mode active */ ++#define kV42bisDecoderCompressedMode 3 /* V.42bis decoder compressed mode active */ ++#define kV42bisError 4 /* V.42bis error */ ++#define kV42bisEncoderStatistics 5 ++#define kV42bisDecoderStatistics 6 ++ ++ ++typedef long v42bisErrorCode; ++#define kV42bisUndefinedEscSequence 0 /* V.42bis undefined escape sequence */ ++#define kV42bisCodewordSizeOverflow 1 /* V.42bis codeword size overflow */ ++#define kV42bisUndefinedCodeword 2 /* V.42bis undefined codeword */ ++ ++typedef long mnpStatusCode; ++#define kMnpDisconnected 0 /* Mnp disconnected */ ++#define kMnpConnected 1 /* Mnp is connected */ ++#define kMnpFallback 2 /* Mnp is falling back to buffer mode */ ++#define kMnpError 3 /* Mnp Error */ ++#define kMnpTimeout 4 /* Mnp Timeout */ ++#define kMnpInvalidLT 5 /* Invalid LT received */ ++#define kMnpRetransmitFrame 6 ++#define kMnpNack 7 ++#define kMnpTxFrameStatus 8 ++#define kMnpRxFrameStatus 9 ++#define kMnpTxStatistics 10 ++#define kMnpRxStatistics 11 ++ ++typedef long mnpTakedownReason; ++#define kMnpRemoteDisconnect 0 ++#define kMnpLocalDisconnect 1 ++#define kMnpCannotConnect 2 ++#define kMnpProtocolError 3 ++#define kMnpCompressionError 4 ++#define kMnpInactivityTimer 5 ++#define kMnpRetryFailed 6 ++ ++ ++typedef long mnpParameterCode; ++#define kMnpProtocolLevel 0 ++#define kMnpServiceClass 1 ++#define kMnpOptimizationSupport 2 ++#define kMnpCompressionSupport 3 ++#define kMnpN401 4 ++#define kMnpK 5 ++ ++ ++typedef long mnpErrorCode; ++#define kMnpNoError 0 ++#define kMnpBufferOverflow 1 ++#define kMnpFrameTooLong 2 ++#define kMnpBadFrame 3 ++#define kMnpUnknownEvent 4 ++ ++ ++typedef long v70StatusCode; ++#define kV70Disconnected 0 /* V70 disconnected */ ++#define kV70Connected 1 /* V70 is connected */ ++#define kV70Error 2 /* V70 Error */ ++#define kV70Timeout 3 /* V70 Timeout */ ++#define kV70ChannelDown 4 /* V70 channel released */ ++#define kV70ChannelUp 5 /* V70 channel established */ ++#define kV70AudioChannelDown 6 /* V70 audio channel released */ ++#define kV70AudioChannelUp 7 /* V70 audio channel established */ ++#define kV70DataChannelDown 8 /* V70 data channel released */ ++#define kV70DataChannelUp 9 /* V70 data channel established */ ++#define kV70OOBChannelDown 10 /* V70 out-of-band channel released */ ++#define kV70OOBChannelUp 11 /* V70 out-of-band channel established */ ++#define kV70TxFrameStatus 12 ++#define kV70RxFrameStatus 13 ++#define kV70TxStatistics 14 ++#define kV70RxStatistics 15 ++#define kV70StateTransition 16 ++ ++typedef long v70TakedownReason; ++#define kV70RemoteDisconnect 0 ++#define kV70LocalDisconnect 1 ++#define kV70CannotConnect 2 ++#define kV70ProtocolError 3 ++#define kV70CompressionError 4 ++#define kV70InactivityTimer 5 ++#define kV70RetryFailed 6 ++ ++ ++typedef long v70ParameterCode; ++#define kV70SuspendResume 0 ++#define kV70CrcLength 1 ++#define kV70NumberOfDLCs 2 ++#define kV70uIH 3 ++ ++#define kV70LapmXmtK 10 ++#define kV70LapmRcvK 11 ++#define kV70LapmXmtN401 12 ++#define kV70LapmRcvN401 13 ++#define kV70LapmTESTSupport 14 ++#define kV70LapmSREJSupport 15 ++#define kV70LapmCompDir 16 ++#define kV70LapmCompDictSize 17 ++#define kV70LapmCompStringSize 18 ++ ++#define kV70AudioHeader 20 /* if audio header is present in audio frames */ ++#define kV70BlockingFactor 21 /* audio blocking factor (default 1) */ ++#define kV70SilenceSuppression 22 /* audio silence suppression */ ++ ++ ++ ++typedef long v70ErrorCode; ++#define kV70NoError 0 ++#define kV70BadFrame 1 ++ ++typedef long audioStatusCode; ++#define kAudioFramesLost 0 /* One or more audio frames were lost */ ++#define kAudioTxBufferOverflow 1 ++#define kAudioRxBufferOverflow 2 ++#define kAudioRxBufferUnderflow 3 ++ ++ ++typedef long v80StatusCode; ++#define kV80Disconnected 0 /* V80 disconnected */ ++#define kV80Connected 1 /* V80 is connected */ ++#define kV80Error 2 /* V80 Error */ ++#define kV80InBandStatus 3 /* V80 in-band SAM status */ ++#define kV80TxFrameStatus 12 ++#define kV80RxFrameStatus 13 ++#define kV80TxStatistics 14 ++#define kV80RxStatistics 15 ++ ++typedef long v80TakedownReason; ++#define kV80RemoteDisconnect 0 ++#define kV80LocalDisconnect 1 ++ ++typedef long v80ErrorCode; ++#define kV80NoError 0 ++#define kV80BadFrame 1 ++ ++typedef long overlayStatusCode; ++#define kOverlayBegin 0 /* DSP has halted */ ++#define kOverlayEnd 1 /* DSP has received entire overlay */ ++#define kOverlayElapsedTime 2 /* time elapsed(as viewed by datapump) during overlay */ ++#define kOverlayRecordingData 3 /* ms of data that we are recording */ ++#define kOverlayReplayingData 4 /* ms of data that we have replayed so far */ ++#define kOverlayReplayDone 5 /* playback is done */ ++ ++/* types for kOverlayRecording/ReplayingData */ ++#define kOverlayTxData 0 ++#define kOverlayRxData 1 ++ ++/* ++ * Rockwell faxmodem compatible bitmap (kRCFaxBitMapStatus) ++ */ ++#define kRCFaxFCD 0x01 ++#define kRCFaxP2 0x02 ++#define kRCFaxPN 0x04 ++#define kRCFaxDCD 0x08 ++#define kRCFaxTX 0x10 ++#define kRCFaxCTS 0x20 ++ ++ ++#ifndef ADSL_MODEM ++typedef long modemCommandCode; ++#endif ++ /* Basic Action commands 00-63 */ ++#define kIdleCmd 0 ++#define kStartFaxModemCmd 1 ++#define kStartDataModemCmd 2 ++#define kStartCallProgressMonitorCmd 3 ++#define kSendTonesCmd 4 ++#define kStartCallerIDRcvCmd 5 ++#define kSetLinkLayerCmd 6 ++#define kSetFramerCmd 7 ++#define kTestLinkLayerCmd 8 ++#define kIdleRcvCmd 9 ++#define kIdleXmtCmd 10 ++#define kSetStatusHandlerCmd 11 ++#define kSetEyeHandlerCmd 12 ++#define kSetLogHandlerCmd 13 ++#define kSendBreakCmd 14 ++#define kSendTestCmd 15 ++#define kDisconnectLinkCmd 16 ++#define kSetXmtGainCmd 17 ++#define kStartADSICmd 18 ++#define kSetHybridDelayCmd 19 ++#define kCleardownCmd 20 ++#define kInitiateRetrainCmd 21 ++#define kInitiateRateRenegotiationCmd 22 ++#define kDialToneIndicator 23 ++#define kSetRxDataHandler 24 /* not used yet */ ++#define kSetTxDataHandler 25 /* not used yet */ ++#define kSetAuxRxDataHandler 26 ++#define kSetAuxTxDataHandler 27 ++#define kRingIndicatorCmd 28 ++#define kDTERateIndicatorCmd 29 ++#define kStartV8bisCmd 30 ++#define kSendMultiTonesCmd 31 ++#define kSetMultiToneParamsCmd 32 ++#define kSetModemSampleRateCmd 33 ++#define kStartDataModemPTTTestCmd 34 ++#define kStartDataModemLoopbackTestCmd 35 ++#define kRingFrequencyCmd 36 ++#define kSetCallWaitingDetectorStateCmd 37 ++#define kV34HDXTurnOffCurrentModeCmd 38 ++#define kSetAudioCmd 39 ++#define kLoopbackTestAutoRespEnableCmd 40 ++#define kSetCallProgressParamsCmd 41 ++#define kSetTrainingDelayReductionCmd 42 ++#define kSetFaxECMPageBufferPtrCmd 43 ++#define kSetLineCurrentStateCmd 44 ++#define kSetFramerParameterCmd 45 ++#define kStartDozeCmd 46 ++#define kEndDozeCmd 47 ++#define kStartRingFrequencyDetectorCmd 48 ++#define kSetBufferingDelayAdjustmentCmd 49 ++ ++ /* Composite action commands 64-127 */ ++#define kDialCmd 64 ++#define kSendCallingToneCmd 65 ++#define kV24CircuitChangeCmd 66 ++#define kStartATModeCmd 67 ++#define kStopATModeCmd 68 ++#define kSetATRegister 69 ++#define kSetATRegisterLimits 70 ++#define kSetATIResponse 71 ++#define kEnableATDebugMode 72 ++#define kSetWhiteListEntry 73 ++#define kSetBlackListEntry 74 ++ ++#define kV70Setup 75 /* additional V70 configuration */ ++#define kEstablishChannel 76 /* Establish new link layer channel (V70) */ ++#define kReleaseChannel 77 /* Release link layer channel (V70) */ ++#define kWaitChannelEstablished 78 /* Wait for establishment of the new link layer channel (V70) */ ++ ++/* unused 79 */ ++#define kMnpOOBFrameCmd 80 ++#define kV80InBandCmd 81 /* V80 In-band commands */ ++#define kSetV250IdString 82 ++#define kSetInternationalTablesCmd 83 ++#define kConfigureCountryCmd 84 ++#define kConigureCountryCmd 84 ++#define kV8ControlCmd 85 ++#define kV8bisSendMessage 86 ++#define kSetHWIdCmd 87 ++#define kSetCodecIdCmd 88 ++#define kOverCurrentDetected 89 ++ ++ ++ ++typedef long v8ControlType; ++#define kEnableDTEControl 1 ++#define kSetV8ControlTimeout 2 ++#define kSetCIValue 3 ++#define kSetCMValue 4 ++#define kSetJMValue 5 ++#define kSendCJ 6 ++#define kSetCallFunctionCategory 7 ++ ++typedef long v250IdStringCode; ++#define kGMIString 1 ++#define kGMMString 2 ++#define kGMRString 3 ++#define kGSNString 4 ++#define kGOIString 5 ++ ++typedef long kCallProgressParameterCode; ++#define kModemSignalPowerThreshold 1 ++#define kDialtonePowerThreshold 2 ++#define kRingBackPowerThreshold 3 ++#define kBusyPowerThreshold 4 ++#define kReorderPowerThreshold 5 ++#define k2ndDTnPowerThreshold 6 ++#define kMinDialtoneTime 7 ++#define kDialtoneFreqRange 8 ++#define kRingBackFreqRange 9 ++#define kBusyFreqRange 10 ++#define kReorderFreqRange 11 ++#define k2ndDTnFreqRange 12 ++ ++ ++typedef long framerParameterCode; ++#define kSetHDLCLeadingFlags 0 ++#define kHDLCResetFlagDetection 1 ++#define kSyncFramerSetup 2 ++#define kHDLCSendCRC 3 ++#define kHDLCSendFlags 4 ++#define kHDLCSendAborts 5 ++ ++ ++typedef long logDataCode; ++#define eyeData 0 ++#define mseData 1 ++#define rxData 2 ++#define txData 3 ++#define neecData 4 ++#define eqlData 5 ++#define ieecData 6 ++#define feecData 7 ++#define eqlPllData 8 ++#define feecPllData 9 ++#define timingData 10 ++#define pjPhaseErrData 11 ++#define pjEstimateData 12 ++#define pjEstDiffData 13 ++#define pjCoefData 14 ++#define inputSignalData 15 ++#define outputSignalData 16 ++#define agcGainData 17 ++#define automoderData 18 ++#define v8CMData 19 ++#define v8JMData 20 ++#define inputAfterNeecData 21 ++#define eqlErrData 22 ++#define dpskMicrobitsData 23 ++#define v34P2LSamplesData 24 ++#define phaseSplittedLData 25 ++#define fftedLData 26 ++#define channelSNRData 27 ++#define noiseEstimateData 28 ++#define signalEstimateData 29 ++#define v34INFOData 30 ++#define v34ChanProbData 31 ++#define v34P2OutputData 32 ++#define v8ANSamDetectData 33 ++#define pFeecData 34 ++#define channelDelayData 35 ++#define timingOffsetData 36 ++#define trellisMSEData 37 ++#define interpolatedSignalData 38 ++#define dcCancelledSignalData 39 ++#define echoCancelledSignalData 40 ++#define predictorErrData 41 ++#define commandInfoData 42 ++#define unusedInfoData 43 ++#define atCommandInfoData 44 ++#define atResponseInfoData 45 ++#define hwTerminalTxData 46 ++#define hwTerminalRxData 47 ++#define statusInfoData 48 ++#define channelResponseData 49 ++#define channelImpulseRespData 50 ++#define x2PcmP1DetectorInData 51 ++#define x2PcmP1DetectorOutData 52 ++#define eqlRealData 53 ++#define ieecRealData 54 ++#define neecOutputData 55 ++#define precodedEqlOutputData 56 ++#define eqlRealErrData 57 ++#define idealEqlOutputData 58 ++#define agcData 59 ++#define pcmInfidelityData 60 ++#define v42bisCycleCount 61 ++#define pcmImdOffsetCoefData 62 ++#define pcmImdOffsetData 63 ++#define v90RcvdDilLongData 64 ++#define v90RcvdDilShortData 65 ++#define v90DilProducedData 66 ++#define pcmEncoderKbitsData 67 ++#define pcmEncoderMbitsData 68 ++#define pcmEncoderSbitsData 69 ++#define pcmDecoderKbitsData 70 ++#define pcmDecoderMbitsData 71 ++#define pcmDecoderSbitsData 72 ++#define v90CPorCPtData 73 ++#define mnpDecoderInputData 74 ++#define mnpDecoderOutputData 75 ++#define v42bisEncoderInputData 76 ++#define v42bisDecoderInputData 77 ++#define modulatorInputData 78 ++#define modulatorOutputData 79 ++#define encodedStatusData 80 ++#define blockFramerTxData 81 ++#define blockFramerRxData 82 ++#define framerTxData 83 ++#define framerRxData 84 ++#define dpskBasebandData 85 ++#define dpskBasebandLPFedData 86 ++#define dpskRealData 87 ++#define bandEdgeCorrectedSignalData 88 ++#define atmLogData 89 ++#define clearEocLogData 90 ++#define g997LogData 91 ++ ++ ++#define kLogDataDelimiter 0xFEFEFEFE ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.3 Handlers */ ++/****************************************************************************/ ++ ++typedef void (SM_DECL *rcvHandlerType) (void *gDslVars, int, short*); ++typedef void (SM_DECL *xmtHandlerType) (void *gDslVars, int, short*); ++typedef int (SM_DECL *xmtHandlerWithRtnValType) (void *gDslVars, int, short*); ++typedef void (SM_DECL *timerHandlerType) (void *gDslVars, long); ++typedef int (SM_DECL *interpolatorHandlerType) (void *gDslVars, int, short*, short*); ++typedef void (SM_DECL *controlHandlerType) (void *gDslVars, int); ++ ++typedef int (SM_DECL *txDataHandlerType) (void *gDslVars, int, uchar*); ++typedef int (SM_DECL *rxDataHandlerType) (void *gDslVars, int, uchar*); ++ ++typedef bitMap (SM_DECL *signalDetectorType) (void *gDslVars, int, long, long*); ++ ++ ++typedef void (SM_DECL *hookHandlerType) (void *gDslVars, Boolean); ++ ++typedef short* (SM_DECL *sampBuffPtrType) (void *gDslVars, int); ++ ++typedef void (SM_DECL *eyeHandlerType) (void *gDslVars, int, ComplexShort*); ++typedef void (SM_DECL *logHandlerType) (void *gDslVars, logDataCode, ...); ++ ++typedef void (SM_DECL *voidFuncType) (void *gDslVars); ++ ++typedef int (SM_DECL *txAudioHandlerType) (void *gDslVars, int, short*); ++typedef int (SM_DECL *rxAudioHandlerType) (void *gDslVars, int, short*); ++ ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.4 Structures */ ++/****************************************************************************/ ++ ++/* ++ * AT command processor definitions ++ */ ++#define kATRegistersNumber 56 ++#define kFirstConfigurationRegister 500 ++#define kLastConfigurationRegister 515 ++#define kFirstInternationalRegister 516 ++#define kLastInternationalRegister 595 ++ ++ ++ ++#define kATMaxDialStringSize 128 ++typedef struct ++ { ++ struct ++ { ++ uchar loadNumber; /* Which profile to load upon powerup/reset */ ++ uchar countryCode; /* T.35 Country Code */ ++ uchar profile[2][kATRegistersNumber]; ++ uchar dialString[4][kATMaxDialStringSize + 1]; ++ } config; ++ ulong versionCode; ++ ulong crcCheckSum; ++ } NVRAMConfiguration; ++ ++/* Structure to hold international settings */ ++typedef struct ++ { ++ char *name; ++ int countryCode; ++ const SRegisterDefinition *userRegisters; ++ const ulong *configRegisters; ++ } CountryDescriptor; ++ ++/* ++ * V.34 coding parameters structure ++ */ ++ ++typedef struct ++ { ++ /* DO NOT CHANGE THE ORDER OF FIELDS IN THIS STRUCTURE! ++ * (Some assembly code depends on it!) If you ++ * must add fields, please do so at the bottom. ++ */ ++ ++ int symbolRateIndex, ++ dataRateIndex, ++ userSNRAdjustment; ++ Boolean auxChannel, ++ expConstellation, ++ precoding, ++ nonlinearCoding; ++ schar J, /* number of data frames in superframe */ ++ P, /* number of mapping frames in a data frame */ ++ r, /* number of high mapping frames in a data frame */ ++ b, /* number of data bits in a mapping frame */ ++ W, /* number of aux bits in a data frame */ ++ K, /* number of S bits in a mapping frame */ ++ q, /* number of Q bits in a 2D symbol */ ++ M; /* number of rings in shell mapping */ ++ long nominalVariance; /* the signal variance which gives 1e-2 BLER Q10 */ ++ int bitsPerDataFrame; ++ short quantRoundOff, ++ quantMask; ++ uchar nTrellisStates, ++ log2NTrellisStates; ++ short gain1xmt, ++ gain2xmt, ++ gain1rcv, ++ gain2rcv; ++ ushort bitInversionPattern; ++ } V34CodingParams; ++ ++typedef long v8bisStatusCode; ++typedef bitMap v8bisConnectionSetup; ++#if defined(V8BIS) || defined(AT_COMMANDS_V8BIS) ++#include "V8bisMainTypes.h" ++#endif ++ ++#define kMaxMultiTones 4 /* MultiTone: search for up to this many tones at once */ ++ ++#ifndef ADSL_MODEM ++typedef struct ++ { ++ modemStatusCode code; ++ union ++ { ++ long value; ++ long freq; ++ modemErrorCode error; ++ modulationMap modulation; ++ modulationMap modemSignal; ++ dataRateMap dataRate; ++ long dtmfSignal; ++ bitMap callProgressSignal; ++ bitMap customSignal; ++ void *ptr; ++ struct ++ { ++ long detected; ++ long numTones; ++ long tones[kMaxMultiTones]; ++ } multiToneInfo; ++ struct ++ { ++ v8bisStatusCode code; ++ long value; ++ } v8bisStatus; ++ struct ++ { ++ trainingProgressCode code; ++ long value; ++ } trainingInfo; ++ struct ++ { ++ long code; ++ long value; ++ } v24Circuit; ++ struct ++ { ++ trainingProgressCode code; ++ void* ptr; ++ } advancedTrainingInfo; ++ struct ++ { ++ capabilitiesStatusCode code; ++ long value; ++ } capabilitiesStatusInfo; ++ struct ++ { ++ connectionInfoCode code; ++ long value; ++ } connectionInfo; ++ struct ++ { ++ connectionInfoCode code; ++ int length; ++ uchar *ptr; ++ } advancedConnectionInfo; ++ struct ++ { ++ dialerStatusCode code; ++ long value; ++ long makeTime; ++ long breakTime; ++ } dialerStatus; ++ struct ++ { ++ long enabled; ++ long volume; ++ } speakerStatus; ++ framingInfoCode framingInfo; ++ IOStatusCode ioStatus; ++ struct ++ { ++ lapmStatusCode code; ++ union ++ { ++ long value; ++ lapmTakedownReason reason; ++ lapmErrorCode error; ++ lapmTestResultCode testResult; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ } param; ++ } lapmStatus; ++ struct ++ { ++ lapmParameterCode code; ++ long value; ++ } lapmParameter; ++ struct ++ { ++ v42bisStatusCode code; ++ union ++ { ++ long value; ++ v42bisErrorCode error; ++ struct ++ { ++ long nBytesIn; ++ long nBytesOut; ++ } statistic; ++ } param; ++ } v42bisStatus; ++ struct ++ { ++ mnpStatusCode code; ++ union ++ { ++ long value; ++ mnpTakedownReason reason; ++ mnpErrorCode error; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ ulong nSize; ++ uchar *Buffer; ++ } fallback; ++ struct ++ { ++ char *header; ++ void *frame; ++ } frame; ++ struct ++ { ++ long nack; ++ long rFrameNo; ++ } timeout; ++ struct ++ { ++ long frameNo; ++ long framesPending; ++ } retrFrame; ++ } param; ++ } mnpStatus; ++ struct ++ { ++ mnpParameterCode code; ++ long value; ++ } mnpParameter; ++ struct ++ { ++ v70StatusCode code; ++ union ++ { ++ long value; ++ v70TakedownReason reason; ++ v70ErrorCode error; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long nack; ++ long rFrameNo; ++ } timeout; ++ struct ++ { ++ long frameNo; ++ long framesPending; ++ } retrFrame; ++ struct ++ { ++ long ChannelId; ++ long DLCI; ++ ulong LcNum; ++ v70TakedownReason reason; ++ } channelInfo; ++ struct ++ { ++ long ChannelId; ++ long stateOld; ++ long stateNew; ++ } stateInfo; ++ } param; ++ ulong v70Time; ++ } v70Status; ++ struct ++ { ++ audioStatusCode code; ++ union ++ { ++ long value; ++ struct ++ { ++ long nReq; ++ long nAvail; ++ } buffer; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ } param; ++ } audioStatus; ++ struct ++ { ++ v80StatusCode code; ++ union ++ { ++ long value; ++ v80TakedownReason reason; ++ v80ErrorCode error; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long code; ++ long value; ++ } inBand; ++ } param; ++ ulong v80Time; ++ } v80Status; ++ struct ++ { ++ v70ParameterCode code; ++ long value; ++ } v70Parameter; ++ struct ++ { ++ breakType type; ++ long length; ++ } breakStatus; ++ struct ++ { ++ callerIDStatusCode code; ++ union ++ { ++ long value; ++ struct ++ { ++ callerIDErrorCode code; ++ long value; ++ } callerIDError; ++ struct ++ { ++ long length; ++ char* ptr; ++ } message; ++ } param; ++ } callerIDStatus; ++ struct ++ { ++ ulong signal; ++ uchar *msg1; ++ long msg1Length; ++ uchar *msg2; ++ long msg2Length; ++ } A8RStatus; ++ struct ++ { ++ overlayStatusCode code; ++ long value; ++ long value2; ++ } overlayStatus; ++ struct ++ { ++ ulong nBits; ++ ulong nBlocks; ++ ulong nBitErrors; ++ ulong nBlockErrors; ++ ++ ulong nAudioBits; ++ ulong nAudioBlocks; ++ ulong nAudioSyncErrors; ++ ulong nAudioBlockErrors; ++ } testResults; ++ ulong checksum; ++ struct ++ { ++ ulong sizeM; ++ uchar *filename; ++ } logFileControlStatus; ++ struct ++ { ++ long direction; ++ long module; ++ long message; ++ long data; ++ } ++ faxClass2Status; ++ ++ } param; ++ } modemStatusStruct; ++ ++typedef void (SM_DECL *statusHandlerType) (void *gDslVars, modemStatusStruct*); ++#endif /* ADSL_MODEM */ ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.5 Command structure */ ++/****************************************************************************/ ++ ++typedef struct ++ { ++ Boolean remoteModemIsFlex; ++ uchar countryCode; ++ ushort manufacturerId; ++ uchar licenseeId; ++ uchar productCapabilities; ++ Boolean digitalModeFlag; ++ Boolean prototypeFlag; ++ uchar version; ++ } ++FlexV8bisStruct; ++ ++typedef struct ++ { ++ symbolRateMap symbolRates; ++ dataRateMap dataRates; ++ dataRateMap dataRates56k; ++ dataRateMap dataRatesFlex; ++ featureMap features; ++ bitMap auxFeatures; ++ bitMap demodCapabilities; ++ long rateThresholdAdjustment; /* dB Q4 */ ++ FlexV8bisStruct flexRemoteV8bisInfo; ++ } dataPumpCapabilities; ++ ++#ifndef ADSL_MODEM ++typedef struct SoftwareModemCommandParameters ++ { ++ modemCommandCode command; ++ union ++ { ++ long xmtGain; ++ ulong hybridDelayQ4ms; ++ long modemSampleRate; ++ long timeInMs; ++ long state; ++ long freq; ++ NVRAMConfiguration *nvramConfigurationPtr; ++ long enabled; ++ long value; ++ uchar *phoneNumber; ++ uchar *faxECMPageBufferPtr; ++ CountryDescriptor *countryDescriptorTable; ++ struct ++ { ++ dataRateMap dteRate; ++ bitMap format; ++ } dteRateSpec; ++ struct ++ { ++ v8ControlType code; ++ long value; ++ uchar *buffer; ++ } v8ControlSpec; ++ struct ++ { ++ directionType direction; ++ v8bisConnectionSetup setup; ++ void *capPtr; ++ voidFuncType confirmMsFunc; ++ voidFuncType genMsFunc; ++ xmtHandlerWithRtnValType ogmFunc; ++ } v8bisSpec; ++ struct ++ { ++ directionType direction; ++ } ADSISpec; ++ struct ++ { ++ directionType direction; ++ modulationMap modulations; ++ dataPumpCapabilities capabilities; ++ } modeSpec; ++ struct ++ { ++ long time, ++ freq1, ++ freq2, ++ freq3, ++ freq4, ++ mag1, ++ mag2, ++ mag3, ++ mag4; ++ } toneSpec; ++ struct ++ { ++ long signal; ++ uchar *msg1; ++ long msg1Length; ++ uchar *msg2; ++ long msg2Length; ++ long sig_en; ++ long msg_en; ++ long supp_delay; ++ } ++ v8bisMessageSpec; ++ struct ++ { ++ linkLayerType type; ++ bitMap setup; ++ dataRateMap rxDataRate; ++ dataRateMap txDataRate; ++ long rtDelayQ4ms; ++ rxDataHandlerType rxDataHandlerPtr; ++ txDataHandlerType txDataHandlerPtr; ++ } linkLayerSpec; ++ struct ++ { ++ framerType type; ++ bitMap setup; ++ directionType direction; ++ long fill[2]; /* need to match linkLayerSpec */ ++ rxDataHandlerType rxDataHandlerPtr; ++ txDataHandlerType txDataHandlerPtr; ++ } framerSpec; ++ struct ++ { ++ framerParameterCode code; ++ long value; ++ } framerParameterSpec; ++ struct ++ { ++ bitMap callProgressDetectorSetup; ++ signalDetectorType callProgressDetectorPtr; /* if nil, use defaults */ ++ signalDetectorType customDetectorPtr; /* if nil, no custom detector */ ++ } callProgressMonitorSpec; ++ struct ++ { ++ ulong maxTones; /* maximum number of simultaneous tones to detect */ ++ ulong allowableVariance; /* maximum cumulative variance in the eight interpolated frequencies */ ++ ulong totalPowerThreshold; /* ignore complete block if power less than this */ ++ ulong powerShiftThreshold; /* ignore a bin if its power is less than (totalPowerValue >> powerShiftThreshold) */ ++ ulong toneMatchThresholdHz; /* tones within +/- this many Hz of original tone are considered the same tone */ ++ ulong binSeparation; /* ignore tones with a spacing of less than this */ ++ ulong outsideFreqDeviation; /* an individual value in the interpolated array can be up to this many Hz outside of the expected angle range */ ++ } multiToneSpec; ++ struct ++ { ++ uchar *dialString; /* nil limited string for DTMF dialing sequence */ ++ long pulseBreakTime, ++ pulseMakeTime, ++ pulseInterDigitTime, ++ toneDigitTime, ++ toneInterDigitTime, ++ toneLoGroupMag, ++ toneHiGroupMag, ++ flashTime, ++ pauseTime, ++ signalWaitTimeout, ++ blindDialingTimeout; ++ bitMap dialerSetup; ++ bitMap callProgressDetectorSetup; ++ signalDetectorType callProgressDetectorPtr; /* if nil, use defaults */ ++ signalDetectorType customDetectorPtr; /* if nil, no custom detector */ ++ hookHandlerType hookHandlerPtr; /* nil if DTMF dialing specified*/ ++ } dialSpec; ++ struct ++ { ++ long timeOn, ++ timeOff, ++ freq; ++ } callingToneSpec; ++ union ++ { ++ statusHandlerType statusHandlerPtr; ++ eyeHandlerType eyeHandlerPtr; ++ logHandlerType logHandlerPtr; ++ rxDataHandlerType rxDataHandlerPtr; ++ txDataHandlerType txDataHandlerPtr; ++ } handlerSpec; ++ struct ++ { ++ breakType type; ++ long length; ++ } breakSpec; ++ struct ++ { ++ long length; ++ uchar *dataPtr; ++ } lapmTestSpec; ++ struct ++ { ++ bitMap setupLapm; ++ rxDataHandlerType rxAudioHandlerPtr; ++ txDataHandlerType txAudioHandlerPtr; ++ } v70SetupSpec; ++ struct ++ { ++ ulong ChannelId; ++ ulong LogChannelNum; ++ ulong PortNum; ++ } EstChannelSpec; ++ struct ++ { ++ ulong ChannelId; ++ } WaitChannelSpec; ++ struct ++ { ++ ulong ChannelId; ++ ulong LogChannelNum; ++ ulong PortNum; ++ ulong DLCI; ++ } RelChannelSpec; ++ struct ++ { ++ audioType type; ++ bitMap setup; ++ dataRateMap rxAudioRate; ++ dataRateMap txAudioRate; ++ rxAudioHandlerType rxAudioHandlerPtr; ++ txAudioHandlerType txAudioHandlerPtr; ++ } audioSpec; ++ struct ++ { ++ long code; ++ long value; ++ } v24Circuit; ++ struct ++ { ++ ulong code; ++ ulong value; ++ ulong minValue; ++ ulong maxValue; ++ } atRegister; ++ struct ++ { ++ long code; ++ uchar *response; ++ } atiSpec; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frameSpec; ++ struct ++ { ++ long code; ++ union ++ { ++ long value; ++ struct ++ { ++ long loFreq1; ++ long hiFreq1; ++ long loFreq2; ++ long hiFreq2; ++ } freqRange; ++ } params; ++ } callProgressParamSpec; ++ struct ++ { ++ v250IdStringCode v250IdCode; ++ uchar *v250IdString; ++ } v250IdSpec; ++ ++ } param; ++ } modemCommandStruct; ++ ++typedef Boolean (*commandHandlerType) (modemCommandStruct*); ++#endif /* ADSL_MODEM */ ++ ++ ++ ++/****************************************************************************/ ++/* 2. Constant definitions. */ ++/* */ ++/* 2.1 Definitive constants */ ++/****************************************************************************/ ++ ++#define kMaxSampleBlockSize 48 ++#define kMaxDataBlockSize 48 ++ ++#define kMaxDialStringLength 127 ++#define kCallProgressSampleRate 7200 ++ ++#define kMaxCallerIDMessageLength 80 ++ ++/****************************************************************************/ ++/* 2. Constant definitions. */ ++/* */ ++/* 2.2 Bit maps */ ++/****************************************************************************/ ++ ++/* modulationMap */ ++ ++#define kIdle 0x00000000 ++#define kV25 0x00000001 ++#define kV8 0x00000002 ++#define kCid 0x00000004 ++#define kV8bis 0x00000008 ++#define kV21 0x00000010 ++#define kV22 0x00000020 ++#define kV23 0x00000040 ++#define kV32 0x00000080 ++#define kV34 0x00000100 ++#define kX2 0x00000200 ++#define kV90 0x00000400 ++#define k56Flex 0x00000800 ++#define kV27 0x00001000 ++#define kV29 0x00002000 ++#define kV17 0x00004000 ++#define kV34HDX 0x00008000 ++#define kV34HDXC 0x00010000 ++#define kBell103 0x00100000 ++#define kBell212 0x00200000 ++#define kDataCallingTone 0x01000000 ++#define kFaxCallingTone 0x02000000 ++ ++#define kV22FastNZConnect 0x04000000 ++#define kV22FastNNZConnect 0x08000000 ++#define kV22FastConnect (kV22FastNZConnect|kV22FastNNZConnect) ++#define kV22bisFastConnect 0x10000000 ++ ++ ++#define kDataModulations (kV25 | kV8 | kV21 | kV22FastConnect | kV22bisFastConnect | kV22 | kV23 | kV32 | kV34 | kBell103 | kBell212) ++#define kDataOnlyModulations (kV21 | kV22 | kV23 | kV32 | kBell103 | kBell212) ++#define kPCMModulations (kV90 | kX2 | k56Flex) ++ ++#define kFaxModulations (kV25 | kV21 | kV27 | kV29 | kV17) ++#define kFaxOnlyModulations (kV27 | kV29 | kV17) ++#define kFaxModulationShift 12 ++ ++/* symbolRateMap */ ++ ++#define k1200Hz 0x00000001 ++#define k1600Hz 0x00000002 ++#define k2400Hz 0x00000004 ++#define k2743Hz 0x00000008 ++#define k2800Hz 0x00000010 ++#define k3000Hz 0x00000020 ++#define k3200Hz 0x00000040 ++#define k3429Hz 0x00000080 ++#define k8000Hz 0x00000100 ++ ++#define kAllSymbolRates ( k1200Hz | k1600Hz | k2400Hz | k2743Hz | \ ++ k2800Hz | k3000Hz | k3429Hz | k8000Hz ) ++ ++/* dataRateMap */ ++ ++#define k75bps 0x00000002 ++#define k300bps 0x00000004 ++#define k600bps 0x00000008 ++#define k1200bps 0x00000010 ++#define k2400bps 0x00000020 ++#define k4800bps 0x00000040 ++#define k7200bps 0x00000080 ++#define k9600bps 0x00000100 ++#define k12000bps 0x00000200 ++#define k14400bps 0x00000400 ++#define k16800bps 0x00000800 ++#define k19200bps 0x00001000 ++#define k21600bps 0x00002000 ++#define k24000bps 0x00004000 ++#define k26400bps 0x00008000 ++#define k28800bps 0x00010000 ++#define k31200bps 0x00020000 ++#define k33600bps 0x00040000 ++#define k36000bps 0x00080000 ++#define k38400bps 0x00100000 ++#define k57600bps 0x00200000 ++#define k115200bps 0x00400000 ++#define k230400bps 0x00800000 ++#define k460800bps 0x01000000 ++#define k921600bps 0x02000000 ++/* ++ * kPCMRate is used to identify that the reported rate is ++ * PCM modulation rate, and is only used for PCM modulation while ++ * reporting rate !!!! ++ */ ++#define kPCMRate 0x40000000 ++#define kPCMFlexRate 0x80000000 ++#define kAllDataRates 0x0FFFFFFF ++ ++/* rates specific for X2 and V.90 */ ++#define kPCM25333bps 0x00000001 ++#define kPCM26666bps 0x00000002 ++#define kPCM28000bps 0x00000004 ++#define kPCM29333bps 0x00000008 ++#define kPCM30666bps 0x00000010 ++#define kPCM32000bps 0x00000020 ++#define kPCM33333bps 0x00000040 ++#define kPCM34666bps 0x00000080 ++#define kPCM36000bps 0x00000100 ++#define kPCM37333bps 0x00000200 ++#define kPCM38666bps 0x00000400 ++#define kPCM40000bps 0x00000800 ++#define kPCM41333bps 0x00001000 ++#define kPCM42666bps 0x00002000 ++#define kPCM44000bps 0x00004000 ++#define kPCM45333bps 0x00008000 ++#define kPCM46666bps 0x00010000 ++#define kPCM48000bps 0x00020000 ++#define kPCM49333bps 0x00040000 ++#define kPCM50666bps 0x00080000 ++#define kPCM52000bps 0x00100000 ++#define kPCM53333bps 0x00200000 ++#define kPCM54666bps 0x00400000 ++#define kPCM56000bps 0x00800000 ++#define kPCM57333bps 0x01000000 ++ ++#define kV90ServerToClientDataRates \ ++ ( kPCM28000bps | kPCM29333bps | kPCM30666bps | \ ++ kPCM32000bps | kPCM33333bps | kPCM34666bps | \ ++ kPCM36000bps | kPCM37333bps | kPCM38666bps | \ ++ kPCM40000bps | kPCM41333bps | kPCM42666bps | \ ++ kPCM44000bps | kPCM45333bps | kPCM46666bps | \ ++ kPCM48000bps | kPCM49333bps | kPCM50666bps | \ ++ kPCM52000bps | kPCM53333bps | kPCM54666bps | \ ++ kPCM56000bps | kPCM57333bps ) ++ ++#define kV90ClientToServerDataRates \ ++ ( k4800bps | k7200bps | k9600bps | k12000bps | \ ++ k14400bps | k16800bps | k19200bps | k21600bps | \ ++ k24000bps | k26400bps | k28800bps | k31200bps | \ ++ k33600bps ) ++ ++ ++ ++#define kX2ServerToClientDataRates \ ++ ( kPCM25333bps | kPCM26666bps | kPCM28000bps | \ ++ kPCM29333bps | kPCM30666bps | kPCM32000bps | \ ++ kPCM33333bps | \ ++ kPCM34666bps | kPCM36000bps | kPCM37333bps | \ ++ kPCM38666bps | kPCM40000bps | kPCM41333bps | \ ++ kPCM42666bps | kPCM44000bps | kPCM45333bps | \ ++ kPCM46666bps | kPCM48000bps | kPCM49333bps | \ ++ kPCM50666bps | kPCM52000bps | kPCM53333bps | \ ++ kPCM54666bps | kPCM56000bps | kPCM57333bps ) ++#define kX2ClientToServerDataRates \ ++ ( k4800bps | k7200bps | k9600bps | k12000bps | k14400bps | \ ++ k16800bps | k19200bps | k21600bps | k24000bps | k26400bps | k28800bps | \ ++ k31200bps ) ++ ++ /* ++ Rates specific for Flex ++ */ ++#define kPCMFlex32000bps 0x00000001 ++#define kPCMFlex34000bps 0x00000002 ++#define kPCMFlex36000bps 0x00000004 ++#define kPCMFlex38000bps 0x00000008 ++#define kPCMFlex40000bps 0x00000010 ++#define kPCMFlex42000bps 0x00000020 ++#define kPCMFlex44000bps 0x00000040 ++#define kPCMFlex46000bps 0x00000080 ++#define kPCMFlex48000bps 0x00000100 ++#define kPCMFlex50000bps 0x00000200 ++#define kPCMFlex52000bps 0x00000400 ++#define kPCMFlex54000bps 0x00000800 ++#define kPCMFlex56000bps 0x00001000 ++#define kPCMFlex58000bps 0x00002000 ++#define kPCMFlex60000bps 0x00004000 ++ ++#define kFlexServerToClientDataRates \ ++ ( kPCMFlex32000bps | kPCMFlex34000bps | kPCMFlex36000bps | kPCMFlex38000bps | \ ++ kPCMFlex40000bps | kPCMFlex42000bps | kPCMFlex44000bps | kPCMFlex46000bps | \ ++ kPCMFlex48000bps | kPCMFlex50000bps | kPCMFlex52000bps | kPCMFlex52000bps | \ ++ kPCMFlex54000bps | kPCMFlex56000bps | kPCMFlex58000bps | kPCMFlex60000bps ) ++ ++#define kFlexClientToServerDataRates \ ++ ( k4800bps | k7200bps | k9600bps | k12000bps | \ ++ k14400bps | k16800bps | k19200bps | k21600bps | \ ++ k24000bps | k26400bps | k28800bps | k31200bps ) ++ ++ ++#define k2400BitShift 5 ++#define k4800BitShift 6 ++ ++#define kPCM28000bpsShift 2 ++ ++#define kV21Rates k300bps ++#define kV22Rates k1200bps ++#define kV22bisRates (k1200bps | k2400bps) ++#define kV23Rates (k75bps | k1200bps) ++#define kCidRates (k1200bps) ++#define kV32Rates (k4800bps | k9600bps) ++#define kV32bisRates (kV32Rates | k7200bps | k12000bps | k14400bps) ++#define kV32terboRates (kV32bisRates | k16800bps | k19200bps) ++#define kV34Rates ( k2400bps | k4800bps | k7200bps | k9600bps | k12000bps | k14400bps | \ ++ k16800bps | k19200bps | k21600bps | k24000bps | k26400bps | k28800bps | \ ++ k31200bps | k33600bps ) ++ ++#define kV27Rates (k2400bps | k4800bps) ++#define kV29Rates (k4800bps | k7200bps | k9600bps) ++#define kBell103Rates k300bps ++#define kBell212Rates k1200bps ++ ++ ++/* Demodulator capabilities */ ++#define kNeecEnabled 0x00000001 ++#define kPFeecEnabled 0x00000002 ++#define kIeecEnabled 0x00000004 ++#define kFeecEnabled 0x00000008 ++ ++#define kRapidEqualizerTraining 0x00000010 ++#define kRapidPECTraining 0x00000020 ++#define kRapidECTraining 0x00000040 ++#define kAutoLoadReductionEnabled 0x00000080 ++ ++#define kTimingTrackingEnabled 0x00000100 ++#define kPhaseLockedLoopEnabled 0x00000200 ++#define kFeecPhaseLockedLoopEnabled 0x00000400 ++#define kPhaseJitterTrackingEnabled 0x00000800 ++ ++#define kClockErrorTrackingEnabled 0x00001000 ++#define kFreqOffsetTrackingEnabled 0x00002000 ++#define kFeecFreqOffsetTrackingEnabled 0x00004000 ++ ++#define kShorterNeecEnabled 0x00008000 ++#define kShorterPFeecEnabled 0x00010000 ++#define kFrondEndHPFilterEnabled 0x00020000 ++#define kGainControlEnabled 0x00040000 ++#define kPhaseHitControlEnabled 0x00080000 ++#define kBandEdgeCorrectorEnabled 0x00100000 ++#define kDisableFaxFastClearDown 0x00200000 ++ ++#define kImdOffsetCompensationEnabled 0x00400000 ++ ++#define kV34ShortEqlLengthExtShift 23 ++#define kV34ShortEqlLengthExtMask (0x3<<kV34ShortEqlLengthExtShift) ++#define kV34EqlLengthReductionEnabled (1<<(kV34ShortEqlLengthExtShift+2)) ++#define kPCMIeecLengthReductionEnabled (1<<(kV34ShortEqlLengthExtShift+3)) ++ ++/* featureMap */ ++ ++#define kAllFeatures 0xFFFFFFFF ++ ++#define kAutomodingEnabled 0x00000001 /* bit 1 */ ++#define kAutomodingDisabled 0x00000000 /* bit 1 */ ++ ++#define kV8SendCIEnabled 0x00000002 /* bit 2 */ ++#define kV8SendCIDisabled 0x00000000 /* bit 2 */ ++ ++#define kV34CMEModem 0x00000004 /* bit 3 */ ++#define kV34NotCMEModem 0x00000000 /* bit 3 */ ++ ++#define kV34ExtraINFOPreamble 0x00000008 /* bit 4 */ ++ ++#define kRetrainingEnabled 0x00000010 ++#define kRateRenegotiationEnabled 0x00000020 ++#define kTrellisCodingEnabled 0x00000040 ++ ++/* Fax specific features */ ++#define kFaxShortTraining 0x00000080 ++#define kFaxEchoSuppressionEnabled 0x00000100 ++ ++/* V.22/V.22bis specific features */ ++#define kV22GuardTone1800HzEnabled 0x00000200 ++#define kV22GuardTone550HzEnabled 0x00000400 ++ ++ ++/* V.34 specific features */ ++ ++#define kV34bisEnabled 0x00000800 ++ ++#define kV34PowerReductionAllowed 0x00001000 ++#define kAuxChannelEnabled 0x00002000 ++#define kAuxChannelDisabled 0x00000000 ++#define kV34TrellisEncoderTypeMask 0x0000C000 ++#define kV34TrellisEncoderTypeShift 14 ++ ++#define kTRN16 0x00010000 ++#define kAssymDataRatesEnabled 0x00020000 ++#define kNonLinearCodingEnabled 0x00040000 ++#define kConstShapingEnabled 0x00080000 ++#define kPrecodingEnabled 0x00100000 ++ ++#define kV34LoFcAt2400HzEnabled 0x00200000 ++#define kV34HiFcAt2400HzEnabled 0x00400000 ++#define kV34LoFcAt2743HzEnabled 0x00800000 ++#define kV34HiFcAt2743HzEnabled 0x01000000 ++#define kV34LoFcAt2800HzEnabled 0x02000000 ++#define kV34HiFcAt2800HzEnabled 0x04000000 ++#define kV34LoFcAt3000HzEnabled 0x08000000 ++#define kV34HiFcAt3000HzEnabled 0x10000000 ++#define kV34LoFcAt3200HzEnabled 0x20000000 ++#define kV34HiFcAt3200HzEnabled 0x40000000 ++#define kV34LoFcAt3429HzEnabled 0x80000000 ++#define kV34HiFcAt3429HzEnabled 0x80000000 ++ ++/* auxiliary features definintions map */ ++ ++#define kLoopbackTestFinish 0x00000000 ++#define kLoopbackTestV54Loop1 0x00000001 ++#define kLoopbackTestV54Loop2 0x00000002 ++#define kLoopbackTestV54Loop3 0x00000003 ++#define kLoopbackTestTypeMask 0x00000003 ++#define kLoopbackTestAutoRespondEnabled 0x00000004 ++#define kLoopbackSelfTest 0x00000008 ++ ++#define kPreempFilterMask 0x000000F0 ++#define kPreempFilterShift 4 ++ ++#define kPcmCodingTypeMuLaw 0x00000100 ++#define kPcmServerToServerEnabled 0x00000200 ++#define kPcmIsServerModem 0x00000400 ++#define kPcmAnalogModemAvailable 0x00000800 ++#define kPcmDigitalModemAvailable 0x00001000 ++#define kPcmDceOnDigitalNetwork 0x00002000 ++#define kPcmDModemPwrCalAtCodecOut 0x00004000 ++#define kPcm3429UpstreamAvailable 0x00008000 ++ ++#define kPcmSpectralShapingBitsMask 0x00070000 ++#define kPcmSpectralShapingBitsShift 16 ++#define kV90ServerNotDetSbarAfterJdbarFix 0x00080000 ++ ++#define kAutomoderPassive 0x00400000 ++ ++#define kV8HoldANSamUntilDetCI 0x00800000 ++#define kFaxSendFromOrgSide 0x01000000 ++#define kFaxV34HDX2400bpsCtrlChan 0x02000000 ++#define kFaxV34HDXAllowAsymCtrlChan 0x04000000 ++#define kV8ANSamStageDisabled 0x08000000 ++ ++#define kFlexSkipV8bis 0x10000000 ++#define kV34ControlChannelEnabled 0x20000000 ++#define kV34SeamlessRateChangeEnabled 0x40000000 ++ ++#define kPTTTest 0x80000000 ++ ++/* call progress detection Map */ ++ ++#define kDialTone 0x00000001 ++#define kRingBack 0x00000002 ++#define kBusy 0x00000004 ++#define kReorder 0x00000008 ++#define k2ndDTn 0x00000010 ++#define kBongTone 0x00000020 ++ ++/* Break type bit settings */ ++#define kExpedited 0x0001 ++#define kDestructive 0x0002 ++ ++/* async Framer setup map */ ++ ++#define kNDataBitsMask 0x03 ++#define k5DataBits 0x00 ++#define k6DataBits 0x01 ++#define k7DataBits 0x02 ++#define k8DataBits 0x03 ++ ++#define kNDataBitsShift 0 ++#define kNDataBitsOffset 5 ++ ++#define kParityTypeMask 0x1C ++#define kNoParity 0x00 ++#define kOddParity 0x04 ++#define kEvenParity 0x08 ++#define kMarkParity 0x0C ++#define kSpaceParity 0x10 ++ ++#define kNStopBitsMask 0x60 ++#define k1StopBits 0x00 ++#define k2StopBits 0x20 ++ ++#define kNStopBitsShift 5 ++#define kNStopBitsOffset 1 ++ ++/* Sync Framer setup map */ ++ ++#define kUnderrunCharMask 0xff ++#define kRepeatLastCharOnUnderrun 0x100 ++ ++/* HDLC sync framer setup maps */ ++#define kNFlagsBeforeFramesMask 0x3F ++#define kNFlagsBeforeFramesShift 0 ++ ++#define kNFlagsBetweenFramesMask 0x3F ++#define kNFlagsBetweenFramesShift 6 ++ ++#define k32BitCRC 0x1000 ++#define kFlagSharingEnabled 0x2000 ++ ++#define kNFlagsBeforeReportMask 0x03 /* no. of *extra* flags reqd before frame */ ++#define kNFlagsBeforeReportShift 14 ++ ++#define kTxDeferredCRC 0x10000 ++#define kRxDeferredCRC 0x20000 ++#define kTxIdleMarks 0x40000 ++#define kNoCRC 0x80000 ++ ++/* SAM framer setup maps */ ++ ++#define kSAMTransparentIdleTypeMask 0x00000003 ++#define kSAMTransparentIdleTypeShift 0 ++#define kSAMFramedIdleTypeMask 0x00000004 ++#define kSAMFramedIdleTypeShift 2 ++#define kSAMFramedOverrunActionMask 0x00000010 ++#define kSAMFramedOverrunActionShift 4 ++#define kSAMHalfDuplexModeMask 0x00000020 ++#define kSAMHalfDuplexModeShift 5 ++#define kSAMCRCTypeMask 0x000000C0 ++#define kSAMCRCTypeShift 6 ++#define kSAMNRZIEnabledMask 0x00000100 ++#define kSAMNRZIEnabledShift 8 ++#define kSAMSyn1Mask 0x00FF0000 ++#define kSAMSyn1Shift 16 ++#define kSAMSyn2Mask 0xFF000000 ++#define kSAMSyn2Shift 24 ++ ++/* <trans_idle> */ ++#define kSAM8bitSYNHuntDisabled 0 ++#define kSAM8bitSYNHuntEnabled ((ulong)1 << kSAMTransparentIdleTypeShift) ++#define kSAM16bitSYNHuntEnabled ((ulong)2 << kSAMTransparentIdleTypeShift) ++ ++/* <framed_idle> */ ++#define kSAMSendFlagsOnIdle 0 ++#define kSAMSendMarksOnIdle ((ulong)1 << kSAMFramedIdleTypeShift) ++ ++/* <framed_un_ov> */ ++#define kSAMAbortOnUnderrun 0 ++#define kSAMFlagsOnUnderrun ((ulong)1 << kSAMFramedOverrunActionShift) ++ ++/* <hd_auto> */ ++#define kSAMHalfDuplexNoAuto 0 ++#define kSAMHalfDuplexAuto ((ulong)1 << kSAMHalfDuplexModeShift) ++ ++ ++/* <crc_type> */ ++#define kSAMNoCRC 0 ++#define kSAM16bitCRC ((ulong)1 << kSAMCRCTypeShift) ++#define kSAM32bitCRC ((ulong)2 << kSAMCRCTypeShift) ++ ++/* <nrzi_en> */ ++#define kSAMNRZIDisabled 0 ++#define kSAMNRZIEnabled ((ulong)1 << kSAMNRZIEnabledShift) ++ ++ ++/* LAPM setup maps */ ++#define kLapmDirection 0x00000001 /* Bit 0 */ ++#define kLapmSREJEnabled 0x00000002 /* Bit 1 */ ++#define kLapmDetectionEnabled 0x00000004 /* Bit 2 */ ++#define kLapmLongADPEnabled 0x00000008 /* Bit 3 */ ++ ++#define kLapmCompressionEnabledMask 0x00000030 ++#define kLapmTxCompressionEnabled 0x00000010 /* Bit 4 */ ++#define kLapmRxCompressionEnabled 0x00000020 /* Bit 5 */ ++#define kLapmCompressionEnabledShift 4 ++ ++#define kLapmRetryLimitMask 0x000000C0 /* Bits 6,7 */ ++ ++#define kLapmNoRetryLimit 0x00000000 ++#define kLapm4Retries 0x00000040 ++#define kLapm8Retries 0x00000080 ++#define kLapm20Retries 0x000000C0 ++ ++#define kLapmWindowSizeMask 0x00001F00 /* Bits 8-12 */ ++#define kLapmWindowSizeShift 8 ++ ++#define kLapmWindowSize8 0x00000800 ++#define kLapmWindowSize15 0x00000F00 ++ ++ ++#define kLapmInfoFieldSizeMask 0x0000E000 /* Bits 13-15 */ ++#define kLapmInfoField8Bytes 0x00000000 ++#define kLapmInfoField16Bytes 0x00002000 ++#define kLapmInfoField32Bytes 0x00004000 ++#define kLapmInfoField64Bytes 0x00006000 ++#define kLapmInfoField128Bytes 0x00008000 ++#define kLapmInfoField192Bytes 0x0000A000 ++#define kLapmInfoField256Bytes 0x0000C000 ++#define kLapmInfoField512Bytes 0x0000E000 ++#define kLapmInfoFieldSizeShift 13 ++ ++#define kLapmT400Mask 0x00030000 /* Bits 16-17 */ ++#define kLapmAutoT400 0x00000000 ++#define kLapm750msT400 0x00010000 ++#define kLapm3secT400 0x00020000 ++#define kLapm30secT400 0x00030000 ++ ++#define kLapmT401Mask 0x000C0000 /* Bits 18-19 */ ++#define kLapmAutoT401 0x00000000 ++#define kLapm750msT401 0x00040000 ++#define kLapm3secT401 0x00080000 ++#define kLapm6secT401 0x000C0000 ++ ++#define kLapmT403Mask 0x00300000 /* Bits 20-21 */ ++#define kLapmAutoT403 0x00000000 ++#define kLapm750msT403 0x00100000 ++#define kLapm2secT403 0x00200000 ++#define kLapm4secT403 0x00300000 ++ ++ ++ ++#define kLapmDictSizeMask 0x00C00000 /* Bits 22-23 */ ++#define kLapmDictSize512 0x00000000 ++#define kLapmDictSize1024 0x00400000 ++#define kLapmDictSize2048 0x00800000 ++#define kLapmDictSize4096 0x00C00000 ++ ++#define kLapmStringSizeMask 0xFF000000 /* Bits 24-31 */ ++#define kLapmStringSizeShift 24 ++ ++/* MNP setup maps */ ++ ++#define kMnpMinPLevel 0x00000001 /* Bit 0: 1 - Minimal, 0 - Standard */ ++#define kMnpStdPLevel 0x00000000 /* Bit 0: 1 - Minimal, 0 - Standard */ ++ ++#define kMnpOptimizationEnabled 0x00000002 /* Bit 1 */ ++#define kMnpOptimizationDisabled 0x00000000 /* Bit 1 */ ++ ++#define kMnpCompressionEnabled 0x00000004 /* Bit 2 */ ++#define kMnpCompressionDisabled 0x00000000 /* Bit 2 */ ++ ++#define kMnpClassMask 0x00000018 ++#define kMnpClassShift 3 ++#define kMnpClass1 0x00000008 ++#define kMnpClass2 0x00000010 ++#define kMnpClass3 0x00000018 /* Bits 3,4 */ ++ ++#define kMnpMaxRetryMask 0x00000060 /* Bits 5,6 */ ++#define kMnpMaxRetryShift 5 ++#define kMnpNoRetryLimit 0x00000000 ++#define kMnp4Retries 0x00000020 ++#define kMnp8Retries 0x00000040 ++#define kMnp20Retries 0x00000060 ++ ++#define kMnpInfoFieldSizeMask 0x00000380 /* Bits 7-9 */ ++#define kMnpInfoFieldSizeShift 7 ++#define kMnpInfoField8Bytes 0x00000000 ++#define kMnpInfoField16Bytes 0x00000080 ++#define kMnpInfoField32Bytes 0x00000100 ++#define kMnpInfoField64Bytes 0x00000180 ++#define kMnpInfoField128Bytes 0x00000200 ++#define kMnpInfoField192Bytes 0x00000280 ++#define kMnpInfoField256Bytes 0x00000300 ++#define kMnpInfoField260Bytes 0x00000380 ++ ++#define kMnpT400Mask 0x00003000 /* Bits 12,13 */ ++#define kMnpT400Shift 12 ++#define kMnpAutoT400 0x00000000 ++#define kMnp750msT400 0x00001000 ++#define kMnp3secT400 0x00002000 ++#define kMnp6secT400 0x00003000 ++ ++#define kMnpT401Mask 0x0000C000 /* Bits 14,15 */ ++#define kMnpT401Shift 14 ++#define kMnpAutoT401 0x00000000 ++#define kMnp750msT401 0x00004000 ++#define kMnp3secT401 0x00008000 ++#define kMnp6secT401 0x0000C000 ++ ++#define kMnpT403Mask 0x00030000 /* Bits 16,17 */ ++#define kMnpT403Shift 16 ++#define kMnpAutoT403 0x00000000 ++#define kMnp60secT403 0x00010000 ++#define kMnp600secT403 0x00020000 ++#define kMnp3600secT403 0x00030000 ++ ++#define kMnpFallbackTypeMask 0x000C0000 /* Bits 18,19 */ ++#define kMnpFallbackTypeShift 18 ++#define kMnpNoFallback 0x00000000 ++#define kMnpFallbackTime 0x00040000 ++#define kMnpFallback200 0x00080000 ++#define kMnpFallbackChar 0x000C0000 ++ ++#define kMnpWindowSizeMask 0x00300000 /* Bits 20,21 */ ++#define kMnpWindowSizeShift 20 ++#define kMnp1Frame 0x00000000 ++#define kMnp4Frames 0x00100000 ++#define kMnp8Frames 0x00200000 ++#define kMnp16Frames 0x00300000 ++ ++#define kMnpDirection 0x00800000 /* Bit 22 */ ++ ++#define kMnpFallbackCharMask 0xFF000000 /* Bit 24-31 */ ++#define kMnpFallbackCharShift 24 ++ ++/* kV34HDXTurnOffCurrentModeCmd state parameter values */ ++ ++#define kV34HDXTurnOffAsClearDown 0 ++#define kV34HDXTurnOffFromControlSource 1 ++#define kV34HDXTurnOffFromControlDestination 2 ++#define kV34HDXTurnOffFromPrimarySource 3 ++#define kV34HDXTurnOffFromPrimaryDestination 4 ++ ++/* V70 setup maps */ ++ ++#define kV70Direction 0x00000001 /* Bit 0 */ ++#define kV70uIHEnabled 0x00000002 /* Bit 1 */ ++#define kV70AudioHeaderEnabled 0x00000004 /* Bit 2 */ ++#define kV70SilenceSupprEnabled 0x00000008 /* Bit 3 */ ++ ++#define kV70SuspendResumeShift 4 ++#define kV70SuspendResumeMask (3 << kV70SuspendResumeShift) ++#define kV70SuspendResumeDisabled 0x00000000 /* Bit 4,5 */ ++#define kV70SuspendResumeWAddr 0x00000010 /* Bit 4 */ ++#define kV70SuspendResumeWoAddr 0x00000020 /* Bit 5 */ ++ ++#define kV70CrcLengthShift 6 ++#define kV70CrcLengthMask (3 << kV70CrcLengthShift) ++#define kV70CrcLength16 0x00000000 /* Bit 6,7 */ ++#define kV70CrcLength8 0x00000040 /* Bit 6 */ ++#define kV70CrcLength32 0x00000080 /* Bit 7 */ ++ ++#define kV70BlockingFactorShift 8 ++#define kV70BlockingFactorMask (3 << kV70BlockingFactorShift) ++#define kV70BlockingFactor1 0x00000000 /* Bit 8,9 */ ++#define kV70BlockingFactor2 0x00000100 /* Bit 8 */ ++#define kV70BlockingFactor3 0x00000200 /* Bit 9 */ ++#define kV70BlockingFactor4 0x00000300 /* Bit 8,9 */ ++ ++#define kV70InitChannelsShift 10 ++#define kV70InitChannelsMask (1 << kV70InitChannelsShift) ++#define kV70InitNoChannels 0x00000000 /* Bit 10,11 */ ++#define kV70InitDataChannel 0x00000400 /* Bit 10,11 */ ++#define kV70InitAudioChannel 0x00000800 /* Bit 10,11 */ ++#define kV70InitBothChannels 0x00000C00 /* Bit 10,11 */ ++ ++#define kV70OOBEnabled 0x00001000 /* Bit 12 */ ++ ++/* V80 setup maps */ ++ ++#define kV80Direction 0x00000001 /* Bit 0 */ ++ ++#define kV80ModeShift 1 ++#define kV80ModeMask (3 << kV80ModeShift) ++#define kV80SyncMode (0 << kV80ModeShift) ++#define kV80TunnellingMode (1 << kV80ModeShift) ++#define kV80SamMode (2 << kV80ModeShift) ++#define kV80SamTransparentMode (2 << kV80ModeShift) ++#define kV80SamFramedMode (3 << kV80ModeShift) ++ ++#define kV80TransIdleShift 3 ++#define kV80TransIdleMask (3 << kV80TransIdleShift) ++#define kV80TransIdleNoHunt (0 << kV80TransIdleShift) ++#define kV80TransIdleHunt8 (1 << kV80TransIdleShift) ++#define kV80TransIdleHunt16 (2 << kV80TransIdleShift) ++ ++#define kV80FrameIdleShift 5 ++#define kV80FrameIdleMask (1 << kV80FrameIdleShift) ++#define kV80FrameIdleFlags (0 << kV80FrameIdleShift) ++#define kV80FrameIdleMarks (1 << kV80FrameIdleShift) ++ ++#define kV80FrameUnOvShift 6 ++#define kV80FrameUnOvMask (1 << kV80FrameUnOvShift) ++#define kV80FrameUnOvAbort (0 << kV80FrameUnOvShift) ++#define kV80FrameUnOvFlag (1 << kV80FrameUnOvShift) ++ ++#define kV80HdAutoShift 7 ++#define kV80HdAutoMask (1 << kV80HdAutoShift) ++#define kV80HdAutoNormal (0 << kV80HdAutoShift) ++#define kV80HdAutoExtended (1 << kV80HdAutoShift) ++ ++#define kV80CrcTypeShift 8 ++#define kV80CrcTypeMask (3 << kV80CrcTypeShift) ++#define kV80NoCrc (0 << kV80CrcTypeShift) ++#define kV80Crc16 (1 << kV80CrcTypeShift) ++#define kV80Crc32 (2 << kV80CrcTypeShift) ++ ++#define kV80NrziShift 10 ++#define kV80NrziMask (1 << kV80NrziShift) ++#define kV80NrziDisabled (0 << kV80NrziShift) ++#define kV80NrziEnabled (1 << kV80NrziShift) ++ ++#define kV80Syn1Mask 0x00FF0000 /* Bit 16-23 */ ++#define kV80Syn1Shift 16 ++#define kV80Syn2Mask 0xFF000000 /* Bit 24-31 */ ++#define kV80Syn2Shift 24 ++ ++/* kStartCallProgressMonitorCmd setup masks */ ++ ++#define kDTMFDetectorDebouncerEnabled 0x0001 ++#define kModemSignalDetectorDebouncerEnabled 0x0002 ++#define kCallProgressDetectorDebouncerEnabled 0x0004 ++#define kCustomSignalDebouncerEnabled 0x0008 ++#define kFaxCallingToneSuppressionEnabled 0x0010 ++#define kDataCallingToneSuppressionEnabled 0x0020 ++#define kCISuppressionEnabled 0x0040 ++#define kAnsSuppressionEnabled 0x0080 ++ ++/* kDialCmd setup masks (dialerSetup bit fields) */ ++ ++#define kDTMFDialingEnabled 0x0001 ++#define kPulseDialingEnabled 0x0002 ++#define kModeSwitchEnabled 0x0004 ++#define kBlindDialingEnabled 0x0008 ++#define kPulseDialingMethodMask 0x0030 ++#define kDialModifierTranslationMask 0x00C0 ++#define kFlashWhilePulseDialingEnabled 0x0100 ++ ++/* Pulse dialing method */ ++#define kPulseDialingNPulsesPerDigit 0x0000 ++#define kPulseDialingNplusOnePulsesPerDigit 0x0010 ++#define kPulseDialingTenMinusNPulsesPerDigit 0x0020 ++ ++/* Dial modifier translation */ ++#define kTreatWasPause 0x0040 /* Tread 'W' modifier as pause */ ++#define kTreatCommaAsWaitForDialtone 0x0080 ++ ++#ifdef TI_C6X ++#include "C6xDefs.h" ++#endif ++#ifdef PENTIUM_MMX ++#include "PentiumDefs.h" ++#endif ++ ++ ++#if defined(DSP16K) && !defined(SoftModemGlobals) ++/* ensure that code generator does not use r5 */ ++register int *softmodem_h_should_not_be_included_after_softmodem_gh asm("r5"); ++#endif ++ ++/****************************************************************************/ ++/* 3. Interface functions. */ ++/* */ ++/****************************************************************************/ ++ ++#ifdef ADSL_MODEM ++ ++#ifndef SoftDslHeader ++#include "SoftDsl.h" ++#endif ++extern char* SM_DECL SoftModemGetRevString(void); ++extern char* SM_DECL SoftModemGetProductName(void); ++extern char* SM_DECL SoftModemGetBuildDate(void); ++extern char* SM_DECL SoftModemGetFullManufacturerName(void); ++extern char* SM_DECL SoftModemGetShortManufacturerName(void); ++extern int SM_DECL SoftModemRevStringSize(void); ++extern char* SM_DECL SoftModemGetVendorIDString(void); ++extern char* SM_DECL SoftModemGetT1413VendorIDString(void); ++extern char* SM_DECL SoftModemGetSerialNumberString(void); ++extern int SM_DECL SoftModemSerNumStringSize(void); ++#define SoftDslGetProductName SoftModemGetProductName ++#define SoftDslGetBuildDate SoftModemGetBuildDate ++#define SoftDslGetFullManufacturerName SoftModemGetFullManufacturerName ++#define SoftDslGetShortManufacturerName SoftModemGetShortManufacturerName ++ ++#else /* !ADSL_MODEM */ ++ ++extern void SM_DECL SoftModemSetMemoryPtr (void *varsPtr); ++extern void* SM_DECL SoftModemGetMemoryPtr (void); ++extern void SM_DECL SoftModemSetRefData (void *varsPtr); ++extern void* SM_DECL SoftModemGetRefData (void); ++extern int SM_DECL SoftModemGetMemorySize (void); ++extern void SM_DECL SoftModemInit (void); ++extern void SM_DECL SoftModemReset (void); ++extern void SM_DECL SoftModemLineHandler (int sampleCount, short *srcPtr, short *dstPtr); ++extern void SM_DECL SoftModemTimer (long timeQ24ms); ++extern Boolean SM_DECL SoftModemCommandHandler (modemCommandStruct *cmdPtr); ++extern int SM_DECL SoftModemGetExternalMemorySize(void); ++extern void SM_DECL SoftModemSetExternalMemoryPtr(void *varsPtr); ++ ++extern void SM_DECL SoftModemSetPcmCoding (pcmCodingType pcmCoding); ++extern void SM_DECL SoftModemPcmLineHandler (int sampleCount, uchar *srcPtr, uchar *dstPtr); ++ ++/* SoftModem IO functions */ ++extern int SM_DECL SoftModemWrite(int nBytes, uchar* srcPtr); ++extern int SM_DECL SoftModemRead(int nBytes, uchar* dstPtr); ++extern int SM_DECL SoftModemWriteFrame(int nBytes, uchar* srcPtr); ++extern int SM_DECL SoftModemReadFrame(int maxFrameSize, uchar* dstPtr); ++extern int SM_DECL SoftModemCountWritePending(void); ++extern int SM_DECL SoftModemCountReadPending(void); ++extern int SM_DECL SoftModemWriteSpaceAvailable(void); ++extern void SM_DECL SoftModemWriteFlush(void); ++extern void SM_DECL SoftModemReadFlush(void); ++extern int SM_DECL SoftModemGetWriteBufferSize(void); ++extern int SM_DECL SoftModemGetReadBufferSize(void); ++ ++#ifdef AUDIO ++extern int SM_DECL SoftModemAudioHandler(int sampleCount, short *srcPtr, short *dstPtr); ++extern int SM_DECL SoftModemAudioRxDataHandler(int nBytes, uchar* srcPtr); ++extern int SM_DECL SoftModemAudioTxDataHandler(int nBytes, uchar* dstPtr); ++#endif ++ ++ ++#define SoftModemSetGlobalPtr SoftModemSetMemoryPtr ++#define SoftModem SoftModemLineHandler ++#ifndef LINKLAYER_V42BIS_LARGE_DICTIONARY ++#define kSoftModemMaxMemorySize (65536) ++#else ++#define kSoftModemMaxMemorySize (65536 + 8192) ++#endif ++ ++/* ++ * Internal functions ++ */ ++extern long SM_DECL SoftModemGetDCOffset(void); ++extern void SM_DECL SoftModemDisableDCOffsetTracking(void); ++extern void SM_DECL SoftModemEnableDCOffsetTracking(void); ++extern long SM_DECL SoftModemGetRcvPower(void); ++extern ulong SM_DECL SoftModemGetHybridDelay(void); ++extern void SM_DECL SoftModemStatusHandler (modemStatusStruct *status); ++extern Boolean SM_DECL SoftModemInternalCommandHandler (modemCommandStruct *cmdPtr); ++extern void SM_DECL SoftModemInternalStatusHandler (modemStatusStruct *status); ++extern void SM_DECL SoftModemSetControllerOnlyMode(commandHandlerType externalDataPumpCommandHandlerPtr); ++extern char* SM_DECL SoftModemGetRevString(void); ++extern char* SM_DECL SoftModemGetProductName(void); ++extern char* SM_DECL SoftModemGetBuildDate(void); ++extern char* SM_DECL SoftModemGetFullManufacturerName(void); ++extern char* SM_DECL SoftModemGetShortManufacturerName(void); ++extern int SM_DECL SoftModemRevStringSize(void); ++extern char* SM_DECL SoftModemGetVendorIDString(void); ++extern char* SM_DECL SoftModemGetSerialNumberString(void); ++extern void SM_DECL SoftModemAuxTxDataHandler(int nBytes, uchar *dataPtr); ++extern void SM_DECL SoftModemAuxRxDataHandler(int nBytes, uchar *dataPtr); ++extern void SM_DECL SoftModemTxDataHandler(int nBytes, uchar *dataPtr); ++extern void SM_DECL SoftModemRxDataHandler(int nBytes, uchar *dataPtr); ++extern void SM_DECL SoftModemATPrintf(uchar *format, void *arg1, void *arg2, void *arg3); ++ ++#define SoftModemSetInputSaturationLimit(limit) (gSystemVars.inputSignalLimit = limit) ++#define SoftModemResetInputSaturationLimit() (gSystemVars.inputSignalLimit = 0) ++ ++#endif /* !ADSL_MODEM */ ++ ++#endif /* SoftModemPh */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModemTypes.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModemTypes.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModemTypes.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModemTypes.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,292 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * SoftModemTypes.h ++ * ++ * ++ * Description: ++ * This file contains some of the type declarations for SoftModem ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.9 $ ++ * ++ * $Id: SoftModemTypes.h,v 1.9 2004/04/13 00:16:59 ilyas Exp $ ++ * ++ * $Log: SoftModemTypes.h,v $ ++ * Revision 1.9 2004/04/13 00:16:59 ilyas ++ * Merged the latest ADSL driver changes ++ * ++ * Revision 1.8 2004/01/24 01:35:33 ytan ++ * add multi-section lmem swap ++ * ++ * Revision 1.7 2001/09/21 19:19:01 ilyas ++ * Minor fixes for VxWorks build ++ * ++ * Revision 1.6 2001/08/16 02:16:39 khp ++ * - added definitions for SLOW_DATA and FAST_TEXT, defined to nothing ++ * except when bcm47xx && USE_SLOW_DATA or USE_FAST_TEXT. Any function ++ * that needs to run fast should be marked with FAST_TEXT. Any data that ++ * is not referenced often should be marked with SLOW_DATA. ++ * ++ * Revision 1.5 2001/03/30 00:49:59 liang ++ * Changed warning output message. ++ * ++ * Revision 1.4 2000/06/21 22:24:40 yongbing ++ * Modify WARN micro to limit the number of same warnings printed ++ * ++ * Revision 1.3 1999/08/05 20:02:13 liang ++ * Merged with the softmodem top of the tree on 08/04/99. ++ * ++ * Revision 1.2 1999/01/27 22:14:29 liang ++ * Merge with SoftModem_3_1_02. ++ * ++ * Revision 1.19 1998/11/17 04:02:39 yura ++ * Fixed WARN and ASSERT redefinition warning for WinNT targets ++ * ++ * Revision 1.18 1998/08/26 19:20:43 scott ++ * Commented out EXCLUDE_CYGWIN32_TYPES define ++ * ++ * Revision 1.17 1998/08/13 19:03:06 scott ++ * Added BitField definition and INT_IS_LONG ++ * ++ * Revision 1.16 1998/08/08 03:39:55 scott ++ * The DEBUG_PTR_ENABLED macro can be used to enable only the DEBUG_PTR macros ++ * ++ * Revision 1.15 1998/07/28 22:21:31 mwg ++ * Fixed problems with NULL & nil being defined incorrectly ++ * ++ * Revision 1.14 1998/07/08 17:09:17 scott ++ * Define ASSERT and WARN only if not already defined ++ * ++ * Revision 1.13 1998/07/02 20:46:34 scott ++ * Added workaround for building certain builds with older SunOS ++ * ++ * Revision 1.12 1998/02/09 18:24:49 scott ++ * Defined "Private" as nothing for GreenHill (to prevent erroneous section ++ * allocations for data) ++ * ++ * Revision 1.11 1997/08/29 21:39:24 scott ++ * Added check for LONG_IS_INT define (for TI C6X support) ++ * ++ * Revision 1.10 1997/05/29 19:50:23 mwg ++ * Added code to avoid type redefintions under SunOS. ++ * ++ * Revision 1.9 1997/03/19 18:35:08 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.8 1997/02/11 00:05:53 mwg ++ * Minor adjustments for Pentium optimization. ++ * ++ * Revision 1.7 1997/01/11 01:30:47 mwg ++ * Added new macro WARN -- the same as ASSERT but without exit. ++ * ++ * Revision 1.6 1996/08/22 20:07:39 liang ++ * When ASSERT fires, only print out information, don't exit. ++ * ++ * Revision 1.5 1996/05/06 06:49:10 mwg ++ * Fixed linux problems. ++ * ++ * Revision 1.4 1996/05/02 08:40:16 mwg ++ * Merged in Chromatic bug fixes. ++ * ++ * Revision 1.3 1996/04/01 20:59:53 mwg ++ * Added macros to setup and use debug pointer. ++ * ++ * Revision 1.2 1996/02/27 01:50:04 mwg ++ * Added ASSERT() macro. ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.2 1995/12/03 06:59:31 mwg ++ * Fixed all gcc varnings. We are now running under Linux on a PC! ++ * ++ *****************************************************************************/ ++#ifndef SoftModemTypesh ++#define SoftModemTypesh ++ ++#ifdef LONG_SHORTS ++#define short long ++#define ushort unsigned long ++#endif ++ ++typedef signed char schar; ++typedef unsigned char uchar; ++ ++#if 0 /* This is not currently required */ ++#if defined(_CYGWIN32) && defined(DEBUG) ++#define EXCLUDE_CYGWIN32_TYPES ++#endif ++#endif ++ ++#if !defined(_SYS_TYPES_H) || !defined(TARG_OS_RTEMS) ++#if defined(_CFE_) ++ typedef unsigned int uint; ++ typedef unsigned long ulong; ++ typedef unsigned short ushort; ++#elif defined(TARG_OS_RTEMS) ++#if defined(HOST_ARCH_LINUX) ++ typedef unsigned int uint; ++#endif ++ typedef unsigned long ulong; ++#if defined(HOST_ARCH_LINUX) ++ typedef unsigned short ushort; ++#endif ++#elif defined(EXCLUDE_CYGWIN32_TYPES) || (!defined _NO_TYPE_DEFS_ && !defined _SYS_TYPES_H && !defined __SYS_TYPES_H__ && !defined _SYS_BSD_TYPES_H && !defined _LINUX_TYPES_H) || defined(__sparc__) ++#ifndef EXCLUDE_CYGWIN32_TYPES ++ typedef unsigned int uint; ++#endif ++#ifndef _LINUX_TYPES_H ++ typedef unsigned long ulong; ++#endif ++#if !defined(ushort) && !defined(EXCLUDE_CYGWIN32_TYPES) && !defined(__INCvxTypesOldh) ++ typedef unsigned short ushort; ++#endif ++#endif ++#else ++typedef unsigned long ulong; ++#endif ++ ++#if defined(GREENHILL) || defined(GNUTX39) /* GH allocates private data to incorrect section */ ++#define Private ++#else ++#define Private static ++#endif ++ ++#define Public ++ ++#ifdef NULL ++#undef NULL ++#endif ++#ifdef nil ++#undef nil ++#endif ++ ++#define NULL 0 ++#define nil 0 ++ ++#define false 0 ++#define true 1 ++typedef unsigned char Boolean; ++typedef unsigned int BitField; /* this must occur BEFORE long_is_int/int_is_long defs */ ++ ++#ifdef LONG_IS_INT ++#define long int ++#define ulong uint ++#endif ++ ++#ifdef INT_IS_LONG ++#define int long ++#define uint ulong ++#endif ++ ++#define POSTULATE(postulate) \ ++ do \ ++ { \ ++ typedef struct \ ++ { \ ++ char NegativeSizeIfPostulateFalse[((int)(postulate))*2 - 1]; \ ++ } PostulateCheckStruct; \ ++ } \ ++ while (0) ++ ++#if defined(DEBUG) && !defined(__KERNEL__) ++#ifndef WARN ++#define kDSLNumberWarnTimes 10 ++#define WARN(assertion) \ ++ { static int warnSeveralTimes=0; \ ++ if ((!(assertion))&(warnSeveralTimes<kDSLNumberWarnTimes)) \ ++ { \ ++ fprintf(stderr, "Warning, failed: %s\n", #assertion); \ ++ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ ++ warnSeveralTimes++; \ ++ } \ ++ } ++#endif ++#ifndef ASSERT ++#define ASSERT(assertion) \ ++ { if (!(assertion)) \ ++ { \ ++ fprintf(stderr, "Assertion failed: %s\n", #assertion); \ ++ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ ++ exit(1); \ ++ } \ ++ } ++#endif ++#else ++ ++#undef WARN ++#define WARN(a) ++ ++#undef ASSERT ++#define ASSERT(a) ++ ++#endif ++ ++/* ++ * memory allocation macros ++ */ ++ ++#if defined(bcm47xx) && defined(USE_SLOW_DATA) ++#define SLOW_DATA __attribute__ ((section(".slow_data"))) ++#else ++#define SLOW_DATA ++#endif ++ ++#if defined(bcm47xx) && defined(USE_FAST_TEXT) ++#define FAST_TEXT __attribute__ ((section(".fast_text"))) ++#else ++#define FAST_TEXT ++#endif ++ ++#if defined(bcm47xx) && defined(SWAP_LMEM) ++#define SWAP_TEXT1_1 __attribute__ ((section(".swap_text1_1"))) ++#define SWAP_TEXT1_2 __attribute__ ((section(".swap_text1_2"))) ++#define SWAP_TEXT2_1 __attribute__ ((section(".swap_text2_1"))) ++#define SWAP_TEXT2_2 __attribute__ ((section(".swap_text2_2"))) ++#define SWAP_TEXT3_1 __attribute__ ((section(".swap_text3_1"))) ++#define SWAP_TEXT3_2 __attribute__ ((section(".swap_text3_2"))) ++#else ++#define SWAP_TEXT1_1 FAST_TEXT ++#define SWAP_TEXT1_2 FAST_TEXT ++#define SWAP_TEXT2_1 FAST_TEXT ++#define SWAP_TEXT2_2 FAST_TEXT ++#define SWAP_TEXT3_1 FAST_TEXT ++#define SWAP_TEXT3_2 FAST_TEXT ++#endif ++ ++/* ++ * Debug stuff ++ */ ++#if defined(DEBUG) || defined(DEBUG_PTR_ENABLED) ++#define DECLARE_DEBUG_PTR(type) static type *gv; ++#define SETUP_DEBUG_PTR() gv = &globalVar ++#else ++#define DECLARE_DEBUG_PTR(type) ++#define SETUP_DEBUG_PTR() ++#endif ++/* ++ * Obsolete stuff ++ */ ++#ifdef DEBUG ++#define HereIsTheGlobalVarPointerMacro SETUP_DEBUG_PTR(); ++#else ++#define HereIsTheGlobalVarPointerMacro ++#endif ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_defs.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_defs.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_defs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_defs.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,133 @@ ++/* TARGET=bcm6348-dmt-T1-dmtbis-adsl2plus-L2-SRA-firmware-Qproc-HW-RTL-pipeline-IncOneBit-Readsl2-doubleUS */ ++ ++#define SOURCE_FILE_ ++#define BCM6348_SRC ++#define G994_T1P413_1024_FFT ++#define ENABLE_DIG_USPWR_CUTBACK ++#define ADSLCORE_ONLY ++#define TEQ_DF ++#define LOOP_TIMING_PLL ++#define RCV_PHASE_TWEAK_ONLY ++#define ADSL_MAX_POSSIBLE_RCV_RATE ++#define HARDWARE_CHANNEL ++#define ADSL_HARDWARE_AGC ++#define HW_CHANNEL_ADC ++#define HW_CHANNEL_DAC ++#define HW_PGA ++#define DIGITALEC_SINGLE_TAP_UPDATE ++#define ANALOGEC_SINGLE_TAP_UPDATE ++#define HWLOG ++#define G992_TRELLIS_CODE_CLAMPING ++#define G992DECODERTRELLISBOUNDARY ++#define MEMORYLIMIT64K ++#define bcm47xx ++#define DSL_BIG_ENDIAN ++#define MIPS_SRC ++#define VP_INLINE -Winline ++#define USE_ASM_API ++#define RTL_SRC ++#define RSENC_INLINE ++#define BITENC_INLINE ++#define USE_SLOW_DATA ++#define USE_FAST_TEXT ++#define PROFILE_INLINE ++#define CHIP_SRC ++#define G992_RESYNC_PILOT_PHASE_IN_SHOWTIME ++#define G992_APPLY_SSVI ++#define SHARE_TEQ_VARS ++#define ANNEX_M ++#define DOUBLE_UP_STREAM ++#define G994P1_SUPPORT_A43C ++#define USE_ASM_API ++#define MIPS_ASM ++#define MEMORYLIMIT64K ++#define ADSL_FIRMWARE ++#define G992DATA_XMT_COMPACT_WORD ++#define ADSL_MAX_POSSIBLE_RCV_RATE ++#define DSP_FRONTEND_ONLY ++#define G992P3_ONE_BIT_CONSTELLATION ++#define ADSL_MODEM ++#define ATM ++#define ADSL_ATUR ++#define ADSL_SOFTWARE_TIME_ERROR_CALCULATION ++#define DSL_REPORT_ALL_COUNTERS ++#define ADSL_MONITOR_LCD ++#define G994P1 ++#define G994P1_ATUR ++#define G992 ++#define G992_ATUR ++#define ADSL_FRAMER ++#define G997_1 ++#define ATM_I432 ++#define TEQ_DF ++#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define G994P1_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define G992_TRELLISCODE ++#define ADSL_HARDWARE_ECHO_CANCELLOR ++#define G992P1 ++#define G992P1_ATUR ++#define G992P1_ANNEX_A ++#define ADSL_HARDWARE_TIME_ERROR_TRACKING ++#define G992P1_NEWFRAME ++#define G992P1_NEWFRAME_ATUR ++#define G992P1_ANNEX_A_USED_FOR_G992P2 ++#define T1P413 ++#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define G992_CALC_DEBUG_SNR_BEFORE_TEQ ++#define G992P3 ++#define RATE_SELECT_E14 ++#define G992P3_ATUR ++#define G992P3AMENDMENT ++#define GLOBESPAN_DM ++#define G992P3_COMB_MSG_THREE_COPIES ++#define G992P3_POWER_MANAGEMENT ++#define G992P3_SRA ++#define G992P5 ++#define G992P5_ATUR ++#define ADSL_PIPELINE_CODE ++#define ADSL_HARDWARE_TIME_ERROR_TRACKING ++#define G994P1RCV_QPROC ++#define G994P1XMT_QPROC ++#define G992RCV_QPROC ++#define G992XMT_QPROC ++#define G992RCV_RS ++#define VP_SIMULATOR ++#define T1P413RCV_QPROC ++#define T1P413XMT_QPROC ++#define G992ENC_HW_DATAMODE ++#define G992DATA_XMT_HW_RS ++#define G992DATA_XMT_COMPACT_WORD ++#define G992RCV_QPROC_FAST ++#define G992_BIT_SWAP ++#define ADSL_IDENTIFY_VENDOR_FIRMWARE ++#define ADSL_ATUR_FORCE_BIGGER_UPSTREAM_MARGIN ++#define G992_MORE_FRAME_MODE ++#define XMT_RACT2_FOR_ADI_COMPATIBILITY ++#define XMT_FFT_SIZE_2X ++#define SYNCH_SYMBOL_DETECTION ++#define ANSI_CACT12_PING_PONG ++#define ADSL_SPECIAL_FIX_FOR_FRENCH_TELECOM ++#define G994P1_CHECK_SECURITY ++#define G994P1_NON_STD_INFO ++#define I432_HEADER_COMPRESSION ++#define TDC_IOP_FIX_ERICSSON_TI_4000C_350 ++#define TDC_IOP_FIX_SEIMENS_TI ++#define FT_ADI_US_RATE_FIX ++#define ANSI_CACT12_PING_PONG ++#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define G994P1_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ ++#define READSL2 ++#define G992_APPLY_SSVI ++#define READSL2_FILTERS ++ ++ ++#define ADSL_PHY_XFACE_OFFSET 0x21F90 ++ ++ ++#define ADSL_PHY_SDRAM_BIAS 0x1A0000 ++ ++ ++#define ADSL_PHY_SDRAM_LINK_OFFSET 0x1A0000 ++ ++ ++#define ADSL_PHY_SDRAM_PAGE_SIZE 0x200000 +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_lmem.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_lmem.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_lmem.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_lmem.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,6 @@ ++/* ++** Don't change! ++** This file has been generated automatically by bin2c program ++*/ ++ ++extern const unsigned char adsl_lmem[51036]; +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_sdram.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_sdram.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_sdram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_sdram.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,6 @@ ++/* ++** Don't change! ++** This file has been generated automatically by bin2c program ++*/ ++ ++extern const unsigned char adsl_sdram[364348]; +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslCoreDefs.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslCoreDefs.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslCoreDefs.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,245 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslCore.c -- Bcm ADSL core driver ++ * ++ * Description: ++ * This file contains BCM ADSL core driver ++ * ++ * ++ * Copyright (c) 2000-2001 Broadcom Corporation ++ * All Rights Reserved ++ * No portions of this material may be reproduced in any form without the ++ * written permission of: ++ * Broadcom Corporation ++ * 16215 Alton Parkway ++ * Irvine, California 92619 ++ * All information contained in this document is Broadcom Corporation ++ * company private, proprietary, and trade secret. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.4 $ ++ * ++ * $Id: AdslCoreDefs.h,v 1.4 2004/07/20 23:45:48 ilyas Exp $ ++ * ++ * $Log: AdslCoreDefs.h,v $ ++ * Revision 1.4 2004/07/20 23:45:48 ilyas ++ * Added driver version info, SoftDslPrintf support. Fixed G.997 related issues ++ * ++ * Revision 1.3 2004/06/10 00:20:33 ilyas ++ * Added L2/L3 and SRA ++ * ++ * Revision 1.2 2004/04/12 23:24:38 ilyas ++ * Added default G992P5 PHY definition ++ * ++ * Revision 1.1 2004/04/08 23:59:15 ilyas ++ * Initial CVS checkin ++ * ++ ****************************************************************************/ ++ ++#ifndef _ADSL_CORE_DEFS_H ++#define _ADSL_CORE_DEFS_H ++ ++#if defined(__KERNEL__) ++#include <linux/config.h> ++#endif ++ ++#if defined(CONFIG_BCM96348) || defined(BOARD_bcm96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(BOARD_bcm96338) || defined(_BCM96338_) ++#ifdef ADSL_ANNEXC ++#include "../adslcore6348C/adsl_defs.h" ++#elif defined(ADSL_ANNEXB) ++#include "../adslcore6348B/adsl_defs.h" ++#elif defined(ADSL_SADSL) ++#include "../adslcore6348SA/adsl_defs.h" ++#else ++#include "../adslcore6348/adsl_defs.h" ++#endif ++#endif ++ ++#if defined(__KERNEL__) || defined(TARG_OS_RTEMS) || defined(_CFE_) ++#if defined(CONFIG_BCM96345) || defined(BOARD_bcm96345) || defined(_BCM96345_) ++#ifdef ADSL_ANNEXC ++#include "../adslcore6345C/adsl_defs.h" ++#elif defined(ADSL_ANNEXB) ++#include "../adslcore6345B/adsl_defs.h" ++#elif defined(ADSL_SADSL) ++#include "../adslcore6345SA/adsl_defs.h" ++#else ++#include "../adslcore6345/adsl_defs.h" ++#endif ++#endif /* of CONFIG_BCM96345 */ ++#else ++#if defined(CONFIG_BCM96345) ++#ifdef ADSL_ANNEXC ++#include "../adslcoreC/adsl_defs.h" ++#elif defined(ADSL_ANNEXB) ++#include "../adslcoreB/adsl_defs.h" ++#elif defined(ADSL_SADSL) ++#include "../adslcoreSA/adsl_defs.h" ++#else ++#include "../adslcore/adsl_defs.h" ++#endif ++#endif /* of CONFIG_BCM96345 */ ++#endif /* __KERNEL__ */ ++ ++#ifdef _WIN32_WCE ++#define ASSERT(a) ++#endif ++ ++#include "AdslXfaceData.h" ++ ++/* adjust some definitions for the HOST */ ++ ++#undef GLOBAL_PTR_BIAS ++#undef ADSLCORE_ONLY ++#undef USE_SLOW_DATA ++#undef USE_FAST_TEXT ++#undef VP_SIMULATOR ++#undef bcm47xx ++#undef ADSL_FRAMER ++#undef ATM ++#undef ATM_I432 ++#undef DSL_OS ++ ++#define HOST_ONLY ++#define G997_1_FRAMER ++#define ADSL_MIB ++ ++#ifndef FLATTEN_ADDR_ADJUST ++#define FLATTEN_ADDR_ADJUST 0xFFF00000 ++#endif ++ ++/* definitions for combo PHY (AnnexA(ADSL2) and AnnexB) */ ++ ++#if !(defined(ADSL_SINGLE_PHY) || defined(G992_ANNEXC)) ++ ++#undef G992P1_ANNEX_A ++#define G992P1_ANNEX_A ++#undef G992P3 ++#define G992P3 ++#undef G992P5 ++#define G992P5 ++#define G992P1_ANNEX_A ++#undef READSL2 ++#define READSL2 ++#undef G992P1_ANNEX_A_USED_FOR_G992P2 ++#define G992P1_ANNEX_A_USED_FOR_G992P2 ++#undef T1P413 ++#define T1P413 ++ ++#undef G992P1_ANNEX_B ++#define G992P1_ANNEX_B ++ ++#endif ++ ++/* ADSL PHY definition */ ++ ++typedef struct { ++ unsigned long sdramPageAddr; ++ unsigned long sdramImageAddr; ++ unsigned long sdramImageSize; ++ unsigned long sdramPhyImageAddr; ++ unsigned short fwType; ++ unsigned short chipType; ++ unsigned short mjVerNum; ++ unsigned short mnVerNum; ++ char *pVerStr; ++ unsigned long features[4]; ++} adslPhyInfo; ++extern adslPhyInfo adslCorePhyDesc; ++ ++/* chip list */ ++ ++#define kAdslPhyChipMjMask 0xFF00 ++#define kAdslPhyChipMnMask 0x00FF ++#define kAdslPhyChipUnknown 0 ++#define kAdslPhyChip6345 0x100 ++#define kAdslPhyChip6348 0x200 ++#define kAdslPhyChipRev0 0 ++#define kAdslPhyChipRev1 1 ++#define kAdslPhyChipRev2 2 ++#define kAdslPhyChipRev3 3 ++#define kAdslPhyChipRev4 4 ++#define kAdslPhyChipRev5 5 ++ ++#define ADSL_PHY_SUPPORT(f) AdslFeatureSupported(adslCorePhyDesc.features,f) ++#define ADSL_PHY_SET_SUPPORT(p,f) AdslFeatureSet((p)->features,f) ++ ++/* ADSL Driver to/from PHY address and data conversion macros */ ++ ++#ifdef ADSLDRV_LITTLE_ENDIAN ++#define ADSL_ENDIAN_CONV_LONG(x) ( ((x) << 24) | (((x) << 8) & 0x00FF0000) | (((x) >> 8) & 0x0000FF00) | ((unsigned long)(x) >> 24) ) ++#define ADSL_ENDIAN_CONV_SHORT(x) ( ((x) << 8) | ((unsigned short)(x) >> 8) ) ++#define ADSL_ENDIAN_CONV_2SHORTS(x) ( ((x) << 16) | ((unsigned long)(x) >> 16) ) ++#else ++#define ADSL_ENDIAN_CONV_LONG(x) x ++#define ADSL_ENDIAN_CONV_SHORT(x) x ++#define ADSL_ENDIAN_CONV_2SHORTS(x) x ++#endif ++ ++#ifndef ADSL_PHY_XFACE_OFFSET ++#define ADSL_PHY_XFACE_OFFSET 0x00017F90 ++#endif ++#define ADSL_LMEM_XFACE_DATA (0xFFF00000 | ADSL_PHY_XFACE_OFFSET) ++ ++#ifndef ADSL_PHY_SDRAM_START ++#define ADSL_PHY_SDRAM_START 0x10000000 ++#endif ++#ifndef ADSL_PHY_SDRAM_BIAS ++#define ADSL_PHY_SDRAM_BIAS 0x00040000 ++#endif ++#define ADSL_PHY_SDRAM_START_4 (ADSL_PHY_SDRAM_START + ADSL_PHY_SDRAM_BIAS) ++ ++#ifndef ADSL_PHY_SDRAM_PAGE_SIZE ++#define ADSL_PHY_SDRAM_PAGE_SIZE 0x00080000 ++#endif ++ ++#ifdef ADSL_PHY_SDRAM_BIAS ++#define ADSL_SDRAM_IMAGE_SIZE (ADSL_PHY_SDRAM_PAGE_SIZE - ADSL_PHY_SDRAM_BIAS) ++#else ++#define ADSL_SDRAM_IMAGE_SIZE (256*1024) ++#endif ++ ++ ++#ifndef ADSL_PHY_SDRAM_LINK_OFFSET ++#define ADSL_PHY_SDRAM_LINK_OFFSET 0x00040000 ++#endif ++ ++#define ADSL_SDRAM_TOTAL_SIZE 0x00800000 ++#define ADSL_SDRAM_HOST_MIPS_DEFAULT (0xA0000000 | (ADSL_SDRAM_TOTAL_SIZE - ADSL_PHY_SDRAM_PAGE_SIZE + ADSL_PHY_SDRAM_BIAS)) ++ ++#define ADSLXF ((AdslXfaceData *) ADSL_LMEM_XFACE_DATA) ++ ++#define ADSL_MIPS_LMEM_ADDR(a) (((ulong)(a) & 0x19000000) == 0x19000000) ++#define SDRAM_ADDR_TO_HOST(a) ((void *) ((ulong)(a) - adslCorePhyDesc.sdramPhyImageAddr + \ ++ (ADSLXF->sdramBaseAddr ? (unsigned long) ADSLXF->sdramBaseAddr : ADSL_SDRAM_HOST_MIPS_DEFAULT))) ++#define SDRAM_ADDR_TO_ADSL(a) ((void *) (adslCorePhyDesc.sdramPhyImageAddr + ((ulong)(a) - \ ++ (ADSLXF->sdramBaseAddr ? (unsigned long) ADSLXF->sdramBaseAddr : ADSL_SDRAM_HOST_MIPS_DEFAULT)))) ++ ++#define ADSL_ADDR_TO_HOST(addr) ADSL_MIPS_LMEM_ADDR(addr) ? (void *) ((ulong) (addr) | FLATTEN_ADDR_ADJUST) : SDRAM_ADDR_TO_HOST(addr) ++ ++ ++#ifndef DEBUG ++#define DEBUG ++#endif ++ ++#ifndef __SoftDslPrintf ++void __SoftDslPrintf(void *gDslVars, char *fmt, int argNum, ...); ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.gh +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.gh 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.gh 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,94 @@ ++/**************************************************************************** ++ * ++ * AdslMib.gh ++ * ++ * Description: ++ * This is a header file which defines the type for AdslMib ++ * global variable structure. ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.8 $ ++ * ++ * $Id: AdslMib.gh,v 1.8 2004/06/04 18:56:01 ilyas Exp $ ++ * ++ * $Log: AdslMib.gh,v $ ++ * Revision 1.8 2004/06/04 18:56:01 ilyas ++ * Added counter for ADSL2 framing and performance ++ * ++ * Revision 1.7 2003/10/17 21:02:12 ilyas ++ * Added more data for ADSL2 ++ * ++ * Revision 1.6 2003/10/14 00:55:27 ilyas ++ * Added UAS, LOSS, SES error seconds counters. ++ * Support for 512 tones (AnnexI) ++ * ++ * Revision 1.5 2003/07/18 19:07:15 ilyas ++ * Merged with ADSL driver ++ * ++ * Revision 1.4 2002/11/13 21:32:49 ilyas ++ * Added adjustK support for Centillium non-standard framing mode ++ * ++ * Revision 1.3 2002/10/31 20:27:13 ilyas ++ * Merged with the latest changes for VxWorks/Linux driver ++ * ++ * Revision 1.2 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.1 2001/12/21 22:39:30 ilyas ++ * Added support for ADSL MIB data objects (RFC2662) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef AdslMibGlobals ++#define AdslMibGlobals ++ ++#include "AdslMib.h" ++ ++typedef struct ++ { ++ /* MIB data */ ++ ++ adslMibInfo adslMib; ++ ++ /* ADSL state data */ ++ ++ adslMibNotifyHandlerType notifyHandlerPtr; ++ ulong timeSec; ++ ulong timeMs; ++ Boolean currSecondErrored; ++ Boolean currSecondLOS; ++ Boolean currSecondSES; ++ Boolean currSecondFEC; ++ ulong rcvPower; ++ ulong rcvRateBps; ++ ulong xmtRateBps; ++ ulong linkStatus; ++ G992CodingParams rcvParams; ++ G992CodingParams xmtParams; ++ ulong shtCounters[kG992ShowtimeNumOfMonitorCounters]; ++ ulong scratchData; ++ long showtimeMarginThld; ++ ++ /* ADSL diag data */ ++ ++ short snr[kAdslMibMaxToneNum]; ++ short showtimeMargin[kAdslMibMaxToneNum]; ++ uchar bitAlloc[kAdslMibMaxToneNum]; ++ short gain[kAdslMibMaxToneNum]; ++ ComplexShort chanCharLin[kAdslMibMaxToneNum]; ++ short chanCharLog[kAdslMibMaxToneNum]; ++ short quietLineNoise[kAdslMibMaxToneNum]; ++ ++ ushort nTones; ++ uchar nMsgCnt; ++ ulong g992MsgType; ++ uchar rsOption[1+4]; ++ Boolean rsOptionValid; ++ } ++ adslMibVarsStruct; ++ ++#endif /* AdslMibGlobals */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,114 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslMib.h ++ * ++ * Description: ++ * This file contains the exported functions and definitions for AdslMib ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.9 $ ++ * ++ * $Id: AdslMib.h,v 1.9 2004/04/12 23:34:52 ilyas Exp $ ++ * ++ * $Log: AdslMib.h,v $ ++ * Revision 1.9 2004/04/12 23:34:52 ilyas ++ * Merged the latest ADSL driver chnages for ADSL2+ ++ * ++ * Revision 1.8 2004/03/03 20:14:05 ilyas ++ * Merged changes for ADSL2+ from ADSL driver ++ * ++ * Revision 1.7 2003/10/14 00:55:27 ilyas ++ * Added UAS, LOSS, SES error seconds counters. ++ * Support for 512 tones (AnnexI) ++ * ++ * Revision 1.6 2003/07/18 19:07:15 ilyas ++ * Merged with ADSL driver ++ * ++ * Revision 1.5 2002/10/31 20:27:13 ilyas ++ * Merged with the latest changes for VxWorks/Linux driver ++ * ++ * Revision 1.4 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.3 2002/01/13 22:25:40 ilyas ++ * Added functions to get channels rate ++ * ++ * Revision 1.2 2002/01/03 06:03:36 ilyas ++ * Handle byte moves tha are not multiple of 2 ++ * ++ * Revision 1.1 2001/12/21 22:39:30 ilyas ++ * Added support for ADSL MIB data objects (RFC2662) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef AdslMibHeader ++#define AdslMibHeader ++ ++#if defined(_CFE_) ++#include "lib_types.h" ++#include "lib_string.h" ++#endif ++ ++#include "AdslMibDef.h" ++ ++/* Interface functions */ ++ ++typedef int (SM_DECL *adslMibNotifyHandlerType) (void *gDslVars, ulong event); ++ ++extern Boolean AdslMibInit(void *gDslVars); ++extern void AdslMibTimer(void *gDslVars, long timeMs); ++extern void AdslMibStatusSnooper (void *gDslVars, dslStatusStruct *status); ++extern void AdslMibSetNotifyHandler(void *gDslVars, adslMibNotifyHandlerType notifyHandlerPtr); ++extern int AdslMibGetModulationType(void *gDslVars); ++extern Boolean AdslMibIsAdsl2Mod(void *gDslVars); ++extern int AdslMibGetActiveChannel(void *gDslVars); ++extern int AdslMibGetGetChannelRate(void *gDslVars, int dir, int channel); ++extern Boolean AdslMibIsLinkActive(void *gDslVars); ++extern int AdslMibPowerState(void *gDslVars); ++extern int AdslMibTrainingState (void *gDslVars); ++extern void AdslMibClearData(void *gDslVars); ++extern void AdslMibClearBertResults(void *gDslVars); ++extern void AdslMibBertStartEx(void *gDslVars, ulong bertSec); ++extern void AdslMibBertStopEx(void *gDslVars); ++extern ulong AdslMibBertContinueEx(void *gDslVars, ulong totalBits, ulong errBits); ++extern void AdslMibSetLPR(void *gDslVars); ++extern void AdslMibSetShowtimeMargin(void *gDslVars, long showtimeMargin); ++extern void AdslMibResetConectionStatCounters(void *gDslVars); ++ ++extern void AdslMibByteMove (int size, void* srcPtr, void* dstPtr); ++extern void AdslMibByteClear(int size, void* dstPtr); ++extern int AdslMibStrCopy(char *srcPtr, char *dstPtr); ++ ++/* AdslMibGetData dataId codes */ ++ ++#define kAdslMibDataAll 0 ++ ++extern void *AdslMibGetData (void *gDslVars, int dataId, void *pAdslMibData); ++ ++extern int AdslMibGetObjectValue ( ++ void *gDslVars, ++ uchar *objId, ++ int objIdLen, ++ uchar *dataBuf, ++ ulong *dataBufLen); ++ ++#endif /* AdslMibHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMibOid.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMibOid.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMibOid.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMibOid.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,177 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslMibOid.h ++ * ++ * Description: ++ * SNMP object identifiers for ADSL MIB and other related MIBs ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.5 $ ++ * ++ * $Id: AdslMibOid.h,v 1.5 2004/06/04 18:56:01 ilyas Exp $ ++ * ++ * $Log: AdslMibOid.h,v $ ++ * Revision 1.5 2004/06/04 18:56:01 ilyas ++ * Added counter for ADSL2 framing and performance ++ * ++ * Revision 1.4 2003/10/17 21:02:12 ilyas ++ * Added more data for ADSL2 ++ * ++ * Revision 1.3 2003/10/14 00:55:27 ilyas ++ * Added UAS, LOSS, SES error seconds counters. ++ * Support for 512 tones (AnnexI) ++ * ++ * Revision 1.2 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.1 2001/12/21 22:39:30 ilyas ++ * Added support for ADSL MIB data objects (RFC2662) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef AdslMibOidHeader ++#define AdslMibOidHeader ++ ++#define kOidAdsl 94 ++#define kOidAdslInterleave 124 ++#define kOidAdslFast 125 ++#define kOidAtm 37 ++ ++#define kOidAdslLine 1 ++#define kOidAdslMibObjects 1 ++ ++#define kOidAdslLineTable 1 ++#define kOidAdslLineEntry 1 ++#define kOidAdslLineCoding 1 ++#define kOidAdslLineType 2 ++#define kOidAdslLineSpecific 3 ++#define kOidAdslLineConfProfile 4 ++#define kOidAdslLineAlarmConfProfile 5 ++ ++#define kOidAdslAtucPhysTable 2 ++#define kOidAdslAturPhysTable 3 ++#define kOidAdslPhysEntry 1 ++#define kOidAdslPhysInvSerialNumber 1 ++#define kOidAdslPhysInvVendorID 2 ++#define kOidAdslPhysInvVersionNumber 3 ++#define kOidAdslPhysCurrSnrMgn 4 ++#define kOidAdslPhysCurrAtn 5 ++#define kOidAdslPhysCurrStatus 6 ++#define kOidAdslPhysCurrOutputPwr 7 ++#define kOidAdslPhysCurrAttainableRate 8 ++ ++#define kOidAdslAtucChanTable 4 ++#define kOidAdslAturChanTable 5 ++#define kOidAdslChanEntry 1 ++#define kOidAdslChanInterleaveDelay 1 ++#define kOidAdslChanCurrTxRate 2 ++#define kOidAdslChanPrevTxRate 3 ++#define kOidAdslChanCrcBlockLength 4 ++ ++#define kOidAdslAtucPerfDataTable 6 ++#define kOidAdslAturPerfDataTable 7 ++#define kOidAdslPerfDataEntry 1 ++#define kOidAdslPerfLofs 1 ++#define kOidAdslPerfLoss 2 ++#define kOidAdslPerfLprs 3 ++#define kOidAdslPerfESs 4 ++#define kOidAdslPerfValidIntervals 5 ++#define kOidAdslPerfInvalidIntervals 6 ++#define kOidAdslPerfCurr15MinTimeElapsed 7 ++#define kOidAdslPerfCurr15MinLofs 8 ++#define kOidAdslPerfCurr15MinLoss 9 ++#define kOidAdslPerfCurr15MinLprs 10 ++#define kOidAdslPerfCurr15MinESs 11 ++#define kOidAdslPerfCurr1DayTimeElapsed 12 ++#define kOidAdslPerfCurr1DayLofs 13 ++#define kOidAdslPerfCurr1DayLoss 14 ++#define kOidAdslPerfCurr1DayLprs 15 ++#define kOidAdslPerfCurr1DayESs 16 ++#define kOidAdslPerfPrev1DayMoniSecs 17 ++#define kOidAdslPerfPrev1DayLofs 18 ++#define kOidAdslPerfPrev1DayLoss 19 ++#define kOidAdslPerfPrev1DayLprs 20 ++#define kOidAdslPerfPrev1DayESs 21 ++ ++#define kOidAdslAtucPerfIntervalTable 8 ++#define kOidAdslAturPerfIntervalTable 9 ++#define kOidAdslPerfIntervalEntry 1 ++#define kOidAdslIntervalNumber 1 ++#define kOidAdslIntervalLofs 2 ++#define kOidAdslIntervalLoss 3 ++#define kOidAdslIntervalLprs 4 ++#define kOidAdslIntervalESs 5 ++#define kOidAdslIntervalValidData 6 ++ ++#define kOidAdslAtucChanPerfTable 10 ++#define kOidAdslAturChanPerfTable 11 ++#define kOidAdslChanPerfEntry 1 ++#define kOidAdslChanReceivedBlks 1 ++#define kOidAdslChanTransmittedBlks 2 ++#define kOidAdslChanCorrectedBlks 3 ++#define kOidAdslChanUncorrectBlks 4 ++#define kOidAdslChanPerfValidIntervals 5 ++#define kOidAdslChanPerfInvalidIntervals 6 ++#define kOidAdslChanPerfCurr15MinTimeElapsed 7 ++#define kOidAdslChanPerfCurr15MinReceivedBlks 8 ++#define kOidAdslChanPerfCurr15MinTransmittedBlks 9 ++#define kOidAdslChanPerfCurr15MinCorrectedBlks 10 ++#define kOidAdslChanPerfCurr15MinUncorrectBlks 11 ++#define kOidAdslChanPerfCurr1DayTimeElapsed 12 ++#define kOidAdslChanPerfCurr1DayReceivedBlks 13 ++#define kOidAdslChanPerfCurr1DayTransmittedBlks 14 ++#define kOidAdslChanPerfCurr1DayCorrectedBlks 15 ++#define kOidAdslChanPerfCurr1DayUncorrectBlks 16 ++#define kOidAdslChanPerfPrev1DayMoniSecs 17 ++#define kOidAdslChanPerfPrev1DayReceivedBlks 18 ++#define kOidAdslChanPerfPrev1DayTransmittedBlks 19 ++#define kOidAdslChanPerfPrev1DayCorrectedBlks 20 ++#define kOidAdslChanPerfPrev1DayUncorrectBlks 21 ++ ++#define kOidAdslAtucChanIntervalTable 12 ++#define kOidAdslAturChanIntervalTable 13 ++#define kOidAdslChanIntervalEntry 1 ++#define kOidAdslChanIntervalNumber 1 ++#define kOidAdslChanIntervalReceivedBlks 2 ++#define kOidAdslChanIntervalTransmittedBlks 3 ++#define kOidAdslChanIntervalCorrectedBlks 4 ++#define kOidAdslChanIntervalUncorrectBlks 5 ++#define kOidAdslChanIntervalValidData 6 ++ ++/* AdslExtra OIDs for kOidAdslPrivate, kOidAdslPrivExtraInfo (defined in AdslMibDef.h) */ ++ ++#define kOidAdslExtraConnectionInfo 1 ++#define kOidAdslExtraConnectionStat 2 ++#define kOidAdslExtraFramingMode 3 ++#define kOidAdslExtraTrainingState 4 ++#define kOidAdslExtraNonStdFramingAdjustK 5 ++#define kOidAdslExtraAtmStat 6 ++#define kOidAdslExtraDiagModeData 7 ++#define kOidAdslExtraAdsl2Info 8 ++#define kOidAdslExtraTxPerfCounterInfo 9 ++ ++#define kOidAtmMibObjects 1 ++#define kOidAtmTcTable 4 ++#define kOidAtmTcEntry 1 ++#define kOidAtmOcdEvents 1 ++#define kOidAtmAlarmState 2 ++ ++#endif /* AdslMibOidHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslXfaceData.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslXfaceData.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslXfaceData.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslXfaceData.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,129 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslXfaceData.h -- ADSL Core interface data structure ++ * ++ * Description: ++ * To be included both in SoftDsl and BcmAdslCore driver ++ * ++ * ++ * Copyright (c) 2000-2001 Broadcom Corporation ++ * All Rights Reserved ++ * No portions of this material may be reproduced in any form without the ++ * written permission of: ++ * Broadcom Corporation ++ * 16215 Alton Parkway ++ * Irvine, California 92619 ++ * All information contained in this document is Broadcom Corporation ++ * company private, proprietary, and trade secret. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.9 $ ++ * ++ * $Id: AdslXfaceData.h,v 1.9 2004/02/03 02:57:22 ilyas Exp $ ++ * ++ * $Log: AdslXfaceData.h,v $ ++ * Revision 1.9 2004/02/03 02:57:22 ilyas ++ * Added PHY feature settings ++ * ++ * Revision 1.8 2003/07/18 04:50:21 ilyas ++ * Added shared buffer for clEoc messages to avoid copying thru command buffer ++ * ++ * Revision 1.7 2003/02/25 00:46:32 ilyas ++ * Added T1.413 EOC vendor ID ++ * ++ * Revision 1.6 2003/02/21 23:29:13 ilyas ++ * Added OEM vendor ID parameter for T1.413 mode ++ * ++ * Revision 1.5 2002/09/13 21:17:12 ilyas ++ * Added pointers to version and build string to OEM interface structure ++ * ++ * Revision 1.4 2002/09/07 04:16:29 ilyas ++ * Fixed HOST to ADSL MIPS SDRAM address translation for relocatable images ++ * ++ * Revision 1.3 2002/09/07 01:43:59 ilyas ++ * Added support for OEM parameters ++ * ++ * Revision 1.2 2002/01/22 19:03:10 khp ++ * -put sdramBaseAddr at end of Xface struct ++ * ++ * Revision 1.1 2002/01/15 06:25:08 ilyas ++ * Initial implementation of ADSL core firmware ++ * ++ ****************************************************************************/ ++ ++#ifndef AdslXfaceDataHeader ++#define AdslXfaceDataHeader ++ ++#include "CircBuf.h" ++ ++typedef struct _AdslXfaceData { ++ stretchBufferStruct sbSta; ++ stretchBufferStruct sbCmd; ++ unsigned long gfcTable[15]; ++ void *sdramBaseAddr; ++} AdslXfaceData; ++ ++/* Shared SDRAM configuration data */ ++ ++#define kAdslOemVendorIdMaxSize 8 ++#define kAdslOemVersionMaxSize 32 ++#define kAdslOemSerNumMaxSize 32 ++#define kAdslOemNonStdInfoMaxSize 64 ++ ++typedef struct _AdslOemSharedData { ++ unsigned long g994VendorIdLen; ++ unsigned long g994XmtNonStdInfoLen; ++ unsigned long g994RcvNonStdInfoLen; ++ unsigned long eocVendorIdLen; ++ unsigned long eocVersionLen; ++ unsigned long eocSerNumLen; ++ unsigned char g994VendorId[kAdslOemVendorIdMaxSize]; ++ unsigned char eocVendorId[kAdslOemVendorIdMaxSize]; ++ unsigned char eocVersion[kAdslOemVersionMaxSize]; ++ unsigned char eocSerNum[kAdslOemSerNumMaxSize]; ++ unsigned char g994XmtNonStdInfo[kAdslOemNonStdInfoMaxSize]; ++ unsigned char g994RcvNonStdInfo[kAdslOemNonStdInfoMaxSize]; ++ char *gDslVerionStringPtr; ++ char *gDslBuildDataStringPtr; ++ unsigned long t1413VendorIdLen; ++ unsigned char t1413VendorId[kAdslOemVendorIdMaxSize]; ++ unsigned long t1413EocVendorIdLen; ++ unsigned char t1413EocVendorId[kAdslOemVendorIdMaxSize]; ++ unsigned long clEocBufLen; ++ unsigned char *clEocBufPtr; ++} AdslOemSharedData; ++ ++/* feature list */ ++ ++#define kAdslPhyAnnexA 0 ++#define kAdslPhyAnnexB 1 ++#define kAdslPhyAnnexC 2 ++#define kAdslPhySADSL 3 ++#define kAdslPhyAdsl2 4 ++#define kAdslPhyAdslG992p3 4 ++#define kAdslPhyAdsl2p 5 ++#define kAdslPhyAdslG992p5 5 ++#define kAdslPhyAnnexI 6 ++#define kAdslPhyAdslReAdsl2 7 ++#define kAdslPhyG992p2Init 8 ++#define kAdslPhyT1P413 9 ++ ++#define AdslFeatureSupported(fa,f) ((fa)[(f) >> 5] & (1 << ((f) & 0x1F))) ++#define AdslFeatureSet(fa,f) (fa)[(f) >> 5] |= (1 << ((f) & 0x1F)) ++ ++#endif /* AdslXfaceDataHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlankList.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlankList.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlankList.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlankList.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,87 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * BlankList.h ++ * ++ * Description: ++ * Definition and implementation (via macros and inline functions) ++ * of blank list - list of unused items of any size (not less than ++ * sizeof(void *) ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ *****************************************************************************/ ++ ++#ifndef BlankListHeader ++#define BlankListHeader ++ ++#define BlankListPeek(head) ((void *) (head)) ++#define BlankListNext(p) (*(void **) (p)) ++ ++#define BlankListAdd(pHead,p) do { \ ++ BlankListNext(p) = BlankListNext(pHead); \ ++ BlankListNext(pHead) = (void *) (p); \ ++} while (0) ++ ++#define BlankListAddList(pHead,pFirst,pLast) do { \ ++ if (NULL != (pLast)) { \ ++ BlankListNext(pLast) = BlankListNext(pHead); \ ++ BlankListNext(pHead) = (void *) (pFirst); \ ++ } \ ++} while (0) ++ ++#define BlankListGet(pHead) \ ++ BlankListNext(pHead); \ ++ { \ ++ void **__p; \ ++ __p = (void **) BlankListNext(pHead); \ ++ if (NULL != __p) \ ++ BlankListNext(pHead) = *__p; \ ++ } ++ ++ ++#define BlankListForEach(pHead,f,ref) do { \ ++ void *p = BlankListNext(pHead); \ ++ \ ++ while (NULL != p) { \ ++ if ( (f)((p), ref) ) break; \ ++ p = BlankListNext(p); \ ++ } \ ++} while (0) ++ ++ ++#include "Que.h" ++ ++#define BlankListAddQue(pHead,pqHdr) do { \ ++ if (NULL != ((QueHeader *)(pqHdr))->tail) { \ ++ BlankListNext(((QueHeader *)(pqHdr))->tail) = BlankListNext(pHead); \ ++ BlankListNext(pHead) = ((QueHeader *)(pqHdr))->head; \ ++ } \ ++} while (0) ++ ++#include "DList.h" ++ ++#define BlankListAddDList(pHead,pDListHead) do { \ ++ if (!DListEmpty(pDListHead)) { \ ++ BlankListNext(DListLast(pDListHead)) = BlankListNext(pHead); \ ++ BlankListNext(pHead) = DListFirst(pDListHead); \ ++ } \ ++} while (0) ++ ++#endif /* BlankListHeader */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlockUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlockUtil.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlockUtil.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlockUtil.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,235 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/* BlockUtil.h ++ * ++ * Description: ++ * This file contains the interfaces for the fixed point block ++ * processing utilities. ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.23 $ ++ * ++ * $Id: BlockUtil.h,v 1.23 2004/04/13 00:31:10 ilyas Exp $ ++ * ++ * $Log: BlockUtil.h,v $ ++ * Revision 1.23 2004/04/13 00:31:10 ilyas ++ * Added standard header for shared ADSL driver files ++ * ++ * Revision 1.22 2003/07/11 01:49:01 gsyu ++ * Added BlockShortClearByLong to speed up performance ++ * ++ * Revision 1.21 2003/07/10 22:35:23 gsyu ++ * Speed up BlockByteXXX performance ++ * ++ * Revision 1.20 2003/07/10 22:15:51 gsyu ++ * Added BlockByteMoveByWord to speed up performance ++ * ++ * Revision 1.19 2002/03/12 00:03:03 yongbing ++ * Modify cplxScaleCplxSymbols to accept a shift value instead of an array of shifts ++ * ++ * Revision 1.18 2001/03/14 00:50:25 georgep ++ * All targets use FEQ_PASS_FFTSHIFT, remove code for case where its not defined ++ * ++ * Revision 1.17 2000/11/30 03:54:09 khp ++ * -BlockRealScaleCplxSymbols instead of BlockScaleComplexSymbols ++ * ++ * Revision 1.16 2000/11/29 20:42:12 liang ++ * Add function for ADSL xmt gains with fixed shift. ++ * ++ * Revision 1.15 2000/10/02 19:24:08 georgep ++ * Modify FEQ for new fft, fft outputs a shift for each block ++ * ++ * Revision 1.14 2000/09/09 00:23:48 liang ++ * Add corresponding functions for the ComplexLong FEQ coef. ++ * ++ * Revision 1.13 2000/05/17 01:36:52 yongbing ++ * Add Pentium MMX assembly codes for more block related functions ++ * ++ * Revision 1.12 2000/04/19 19:22:22 yongbing ++ * Add BlockShortScaleby2 function used in G994p1 ++ * ++ * Revision 1.11 2000/04/04 02:28:01 liang ++ * Merged with SoftDsl_0_2 from old tree. ++ * ++ * Revision 1.11 2000/03/14 23:29:01 yongbing ++ * Add Pentim MMX codes for BlockCplxSymbolUpdateCplxScale function ++ * ++ * Revision 1.10 2000/02/16 01:53:00 yongbing ++ * Add Pentium MMX module for FEQ ++ * ++ * Revision 1.9 1999/11/02 02:49:55 liang ++ * Add BlockComplexPower function. ++ * ++ * Revision 1.8 1999/08/05 19:42:34 liang ++ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. ++ * ++ * Revision 1.7 1999/06/16 00:54:39 liang ++ * BlockRealScaleComplexSymbols takes a scale shift buffer now. ++ * ++ * Revision 1.6 1999/05/22 02:18:29 liang ++ * Add one more parameter to BlockCplxSymbolUpdateCplxScale function. ++ * ++ * Revision 1.5 1999/05/14 22:49:39 liang ++ * Added two more functions. ++ * ++ * Revision 1.4 1999/03/26 03:29:57 liang ++ * Add function BlockComplexMultLongAcc. ++ * ++ * Revision 1.3 1999/02/22 22:40:59 liang ++ * BlockByteSum takes uchar inputs instead of schar. ++ * ++ * Revision 1.2 1999/02/10 01:56:44 liang ++ * Added BlockByteSum, BlockRealScaleComplexSymbols and BlockCplxScaleComplexSymbols. ++ * ++ * Revision 1.1 1998/10/28 01:35:38 liang ++ * *** empty log message *** ++ * ++ * Revision 1.12 1998/07/08 17:09:25 scott ++ * Removed unnecessary undefs ++ * ++ * Revision 1.11 1998/04/02 06:19:44 mwg ++ * Added two new utilities. ++ * ++ * Revision 1.10 1998/03/26 23:20:55 liang ++ * Added function BlockShortMultiply. ++ * ++ * Revision 1.9 1998/02/16 18:41:00 scott ++ * Added MMX autodetect support ++ * ++ * Revision 1.8 1997/12/13 06:11:35 mwg ++ * Added new functions: ++ * BlockLongSubtract() ++ * BlockLongAdd() ++ * BlockLong2ShortSubtract() ++ * BlockShort2LongMove() ++ * BlockShortInterpolate() ++ * BlockLongCorrelate() ++ * BlockMapShort2Short() ++ * ++ * Revision 1.7 1997/03/19 18:35:10 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.6 1997/02/11 00:08:18 mwg ++ * Added BlockByteMove function ++ * ++ * Revision 1.5 1997/02/04 08:40:08 mwg ++ * Changed interface forBlockReal2ComplexMacc() ++ * ++ * Revision 1.4 1997/01/23 02:04:28 mwg ++ * Added return value to BlockShortMove ++ * ++ * Revision 1.3 1996/12/19 22:34:55 mwg ++ * Added new function BlockFullPower(). ++ * ++ * Revision 1.2 1996/02/21 03:59:15 mwg ++ * Added new function BlockReal2ComplexMacc ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.5 1995/04/04 06:09:32 mwg ++ * Changed the SoftModem status reporting: now the status is a structure/union ++ * where different fields used for different status code. This will enable ++ * efficient status snooping for high level protocols on top of the softmodem. ++ * ++ */ ++ ++#ifndef BlockUtilPh ++#define BlockUtilPh ++ ++extern void BlockLongAdd (int, long*, long*, long*); ++extern void BlockLong2ShortSubtract (int, long*, long*, short*); ++extern void BlockShort2LongMove (int, short*, long*); ++extern void BlockShortMultiply (int, int, short*, short*, short*); ++extern void BlockByteMoveUnaligned (int size, uchar *srcPtr, uchar *dstPtr); ++extern void BlockShortOffset (int, short, short*, short*); ++extern long BlockShortInterpolateWithIncrement (int size, long scaleFactor, long increment, int shift, short* src1Ptr, short* src2Ptr, short* dstPtr); ++extern void BlockReal2ComplexMult (int, short*, ComplexShort*, ComplexShort*); ++extern void BlockComplexConjigateMult (int, ComplexShort*, ComplexShort*, ComplexShort*); ++ ++extern long BlockSum (int, short*); ++extern long BlockByteSum (int, uchar*); ++extern void BlockComplexSum (int, ComplexShort*, ComplexLong*); ++extern void BlockComplexPower (int, int, ComplexShort*, long*); ++extern long BlockFullPower (int, short*); ++extern long BlockLongCorrelate (int, long*, long*); ++ ++extern int BlockSymbol2Byte (int, int, ushort*, uchar*); ++extern int BlockByte2Symbol (int, int, uchar*, ushort*); ++ ++extern void BlockMapShort2Complex (int, ushort*, ComplexByte*, ComplexShort*); ++extern void BlockMapShort2Short (int size, ushort *srcPtr, short *mapPtr, short *dstPtr); ++extern void BlockMapByte2Byte (int size, uchar *srcPtr, uchar *mapPtr, uchar *dstPtr); ++extern void BlockMapByte2Short (int size, uchar *srcPtr, short *mapPtr, short *dstPtr); ++extern void BlockShortMult (int size, int shift, short* src1Ptr, short* src2Ptr, short* dstPtr); ++ ++extern int SM_DECL Idle(void); ++ ++extern void BlockGenerateAngles(int size, ComplexShort *anglePtr, ComplexShort *incPtr, ComplexShort *dstPtr); ++extern void BlockExtractRealPart(int size, ComplexShort *srcPtr, short *dstPtr); ++extern void BlockShortScaleByShift (int size, int shift, short* srcPtr, short* dstPtr); ++ ++#ifndef PENTIUM_REDEFS /* only if these have not been redefined to function pointers */ ++extern long BlockPower (int, short*); ++extern void BlockReal2ComplexMacc (int, int, short*, ComplexShort*, ComplexLong*); ++extern void BlockComplexMult (int, ComplexShort*, ComplexShort*, ComplexShort*); ++extern void BlockShortScale (int, short, int, short*, short*); ++extern int SM_DECL BlockShortMove (int, short*, short*); ++extern long BlockCorrelate (int, short*, short*); ++ ++extern void BlockRealScaleComplexSymbols(int, int, uchar*, short*, ComplexShort*, ComplexShort*); ++/* FIXME -- the following 3 functions can be removed */ ++extern void BlockCplxScaleComplexSymbols(int, int, int, ComplexShort*, ComplexShort*, ComplexShort*); ++extern void BlockCplxSymbolUpdateCplxScale(int, int, int, uchar*, ComplexShort*, ++ ComplexShort*, ComplexShort*, ComplexShort*); ++extern void BlockComplexShortFill (int, short, short, ComplexShort*); ++ ++ ++extern void BlockRealScaleCplxSymbols(int, int, int, short*, ComplexShort*, ComplexShort*); ++extern void BlockCplxLongConjigateMultCplxShort(int, ComplexLong*, ComplexShort*, ComplexLong*); ++ ++extern void BlockCplxLongScaleCplxSymbols(int, int, int, ComplexLong*, ComplexShort*, short*, ComplexShort*); ++extern void BlockCplxSymbolUpdateCplxLongScale(int, int, int, int, ++ ComplexShort*, short *, ComplexLong*, ComplexShort*); ++ ++extern void BlockComplexLongFill (int, long, long, ComplexLong*); ++ ++extern void BlockShortSubtract (int, short*, short*, short*); ++extern void BlockLongSubtract (int, long*, long*, long*); ++extern void BlockShortAdd (int, short*, short*, short*); ++extern void BlockByteMove (int, uchar*, uchar*); ++extern void BlockByteMoveByLong (int, uchar*, uchar*); ++extern void SM_DECL BlockByteFill (int, uchar, uchar*); ++extern void BlockByteFillByLong (int, uchar, uchar*); ++extern void BlockByteClear (int, uchar*); ++extern void BlockByteClearByLong (int, uchar*); ++extern void BlockShortFill (int, short, short*); ++extern void BlockShortClear (int, short*); ++extern void BlockShortClearByLong (int, short*); ++extern void BlockLongFill (int, long, long*); ++extern void BlockLongClear (int, long*); ++extern void BlockComplexShortClear (int, ComplexShort*); ++extern void BlockShortInvert (int, short*, short*); ++extern void BlockShortScaleDown (int, short*); ++extern void BlockLongMove (int, long*, long*); ++extern void BlockShortInterpolate (int, short, int, short*, short*, short*); ++extern void BlockComplexMultLongAcc (int, int, ComplexShort*, ComplexShort*, ComplexLong*); ++ ++#endif ++ ++#endif /* BlockUtilPh */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/CircBuf.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/CircBuf.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/CircBuf.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/CircBuf.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,217 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * CircBuf -- Generic Circular Buffer ++ * ++ * Description: ++ * Implementation of generic circular buffer algorithms ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.14 $ ++ * ++ * $Id: CircBuf.h,v 1.14 2004/06/24 03:10:37 ilyas Exp $ ++ * ++ * $Log: CircBuf.h,v $ ++ * Revision 1.14 2004/06/24 03:10:37 ilyas ++ * Added extra macro to be able to use un-cached variable (for status write) ++ * ++ * Revision 1.13 2004/02/09 23:47:02 ilyas ++ * Fixed last change ++ * ++ * Revision 1.12 2004/02/06 22:52:58 ilyas ++ * Improved stretch buffer write ++ * ++ * Revision 1.11 2002/12/30 23:27:55 ilyas ++ * Added macro for HostDma optimizations ++ * ++ * Revision 1.10 2002/10/26 02:15:02 ilyas ++ * Optimized and added new macros for HostDma ++ * ++ * Revision 1.9 2002/01/22 23:59:29 ilyas ++ * Added paraenthesis around macro argument ++ * ++ * Revision 1.8 2002/01/15 22:28:38 ilyas ++ * Extended macro to support readPtr from uncached address ++ * ++ * Revision 1.7 2001/09/21 19:47:05 ilyas ++ * Fixed compiler warnings for VxWorks build ++ * ++ * Revision 1.6 2001/06/07 18:47:56 ilyas ++ * Added more macros for circular buffer arithmetics ++ * ++ * Revision 1.5 2001/04/18 03:58:34 ilyas ++ * Added LOG file write granularity ++ * ++ * Revision 1.4 2001/01/19 04:34:12 ilyas ++ * Added more macros to circular buffer implementation ++ * ++ * Revision 1.3 2001/01/06 04:01:41 ilyas ++ * Changed the way we write status messages ++ * ++ * Revision 1.2 2001/01/04 05:52:21 ilyas ++ * Added implementation of stretchable circular buffer used in LOG and Status ++ * handlers ++ * ++ * Revision 1.1 2000/05/03 03:45:55 ilyas ++ * Original implementation ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef CircBufHeader_H_ ++#define CircBufHeader_H_ ++ ++ ++typedef struct { ++ char *pStart; ++ char *pEnd; ++ char *pRead; ++ char *pWrite; ++} circBufferStruct; ++ ++/* Initialize circular buffer */ ++ ++#define CircBufferInit(pCB,buf,size) do { \ ++ (pCB)->pStart = (char *) (buf); \ ++ (pCB)->pRead = (pCB)->pWrite = (pCB)->pStart; \ ++ (pCB)->pEnd = (pCB)->pStart + size; \ ++} while (0) ++ ++#define CircBufferGetSize(pCB) ((pCB)->pEnd - (pCB)->pStart) ++#define CircBufferGetStartPtr(pCB) ((void *) (pCB)->pStart) ++#define CircBufferGetEndPtr(pCB) ((void *) (pCB)->pEnd) ++ ++#define CircBufferReset(pCB) (pCB)->pRead = (pCB)->pWrite = (pCB)->pStart ++ ++ ++#define CircBufferGetReadPtr(pCB) ((void *) (pCB)->pRead) ++#define CircBufferGetWritePtr(pCB) ((void *) (pCB)->pWrite) ++ ++ ++#ifndef bcm47xx ++#define CircBufferDistance(pCB,p1,p2,d) ((char*)(p2) - (char*)(p1) - d >= 0 ? \ ++ (char*)(p2) - (char*)(p1) - d : \ ++ ((char*)(p2)- (char*)(p1) - d + ((pCB)->pEnd - (pCB)->pStart))) ++ ++#define CircBufferAddContig(pCB,p,n) ((char*)(p) + (n) == (pCB)->pEnd ? (pCB)->pStart : (char*)(p) + (n)) ++#else ++static __inline int CircBufferDistance(circBufferStruct *pCB, char *p1, char *p2, int d) ++{ ++ int tmp = p2 - p1 - d; ++ ++ return (tmp >= 0 ? tmp : tmp + (pCB->pEnd - pCB->pStart)); ++} ++ ++static __inline char * CircBufferAddContig(circBufferStruct *pCB, char *p, int n) ++{ ++ p += n; ++ return (p == pCB->pEnd ? pCB->pStart : p); ++} ++#endif ++ ++#define CircBufferAdd(pCB,p,n) ((char*)(p) + (n) >= (pCB)->pEnd ? \ ++ (pCB)->pStart + ((char*)(p) + (n) - (pCB)->pEnd) : \ ++ (char*)(p) + (n)) ++ ++#define CircBufferReadUpdate(pCB,n) (pCB)->pRead = CircBufferAdd(pCB,(pCB)->pRead,n) ++#define CircBufferWriteUpdate(pCB,n) (pCB)->pWrite= CircBufferAdd(pCB,(pCB)->pWrite,n) ++ ++#define CircBufferReadUpdateContig(pCB,n) (pCB)->pRead = CircBufferAddContig(pCB,(pCB)->pRead,n) ++#define CircBufferWriteUpdateContig(pCB,n) (pCB)->pWrite= CircBufferAddContig(pCB,(pCB)->pWrite,n) ++ ++#define CircBufferGetReadAvail(pCB) CircBufferDistance(pCB,(pCB)->pRead,(pCB)->pWrite,0) ++#define CircBufferIsReadEmpty(pCB) ((pCB)->pRead == (pCB)->pWrite) ++#define CircBufferGetWriteAvail(pCB) CircBufferDistance(pCB,(pCB)->pWrite,(pCB)->pRead,1) ++#define CircBufferGetWriteAvailN(pCB,n) CircBufferDistance(pCB,(pCB)->pWrite,(pCB)->pRead,n) ++ ++#define CircBufferGetReadContig(pCB) ((unsigned long)(pCB)->pWrite >= (unsigned long) (pCB)->pRead ? \ ++ (pCB)->pWrite - (pCB)->pRead : \ ++ (pCB)->pEnd - (pCB)->pRead) ++ ++#define CircBufferGetWriteContig(pCB) ((pCB)->pEnd - (pCB)->pWrite > CircBufferGetWriteAvail(pCB) ? \ ++ CircBufferGetWriteAvail(pCB) : \ ++ (pCB)->pEnd - (pCB)->pWrite) ++ ++/* ++** ++** structure and macros for "strectch" buffer ++** ++*/ ++ ++typedef struct { ++ char *pStart; ++ char *pEnd; ++ char *pExtraEnd; ++ char *pStretchEnd; ++ char *pRead; ++ char *pWrite; ++} stretchBufferStruct; ++ ++#define StretchBufferInit(pSB,buf,size,extra) do { \ ++ (pSB)->pStart = (char *) (buf); \ ++ (pSB)->pRead = (pSB)->pWrite = (pSB)->pStart; \ ++ (pSB)->pEnd = (pSB)->pStart + (size); \ ++ (pSB)->pStretchEnd = (pSB)->pEnd; \ ++ (pSB)->pExtraEnd = (pSB)->pEnd+(extra); \ ++} while (0) ++ ++#define StretchBufferGetSize(pSB) ((pSB)->pEnd - (pSB)->pStart) ++#define StretchBufferGetStartPtr(pSB) ((void *) (pSB)->pStart) ++#define StretchBufferGetReadPtr(pSB) ((void *) (pSB)->pRead) ++#define StretchBufferGetWritePtr(pSB) ((void *) (pSB)->pWrite) ++#define StretchBufferReset(pSB) ((pSB)->pRead = (pSB)->pWrite = (pSB)->pStart) ++ ++#define StretchBufferGetReadToEnd(pSB) ((pSB)->pStretchEnd - (pSB)->pRead) ++ ++#define StretchBufferGetReadAvail(pSB) ((pSB)->pWrite - (pSB)->pRead >= 0 ? \ ++ (pSB)->pWrite - (pSB)->pRead : \ ++ (pSB)->pStretchEnd - (pSB)->pRead) ++#define _StretchBufferGetWriteAvail(pSB,rd) ((rd) - (pSB)->pWrite > 0 ? \ ++ (rd) - (pSB)->pWrite - 1 : \ ++ ((pSB)->pExtraEnd - (pSB)->pWrite)) ++#define StretchBufferGetWriteAvail(pSB) _StretchBufferGetWriteAvail(pSB, (pSB)->pRead) ++ ++#define StretchBufferReadUpdate(pSB,n) do { \ ++ char *p; \ ++ \ ++ p = (pSB)->pRead + (n); \ ++ (pSB)->pRead = (p >= (pSB)->pStretchEnd ? (pSB)->pStart : p); \ ++} while (0) ++ ++#define _StretchBufferWriteUpdate(pSB,rd,n) do { \ ++ char *p; \ ++ \ ++ p = (pSB)->pWrite + (n); \ ++ if (p >= (pSB)->pEnd) { \ ++ if ((rd) != (pSB)->pStart) { \ ++ (pSB)->pStretchEnd = p; \ ++ (pSB)->pWrite = (pSB)->pStart; \ ++ } \ ++ } \ ++ else \ ++ (pSB)->pWrite = p; \ ++} while (0) ++ ++#define StretchBufferWriteUpdate(pSB,n) _StretchBufferWriteUpdate(pSB,(pSB)->pRead,n) ++ ++#endif /* CircBufHeader_H_ */ ++ ++ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DList.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DList.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DList.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DList.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,131 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * DList.h ++ * ++ * Description: ++ * Definition and implementation (via macros and inline functions) ++ * of double-linked list ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ *****************************************************************************/ ++ ++#ifndef DListHeader_H_ ++#define DListHeader_H_ ++ ++typedef struct _DListHeader ++ { ++ struct _DListHeader *next; /* next item in the list */ ++ struct _DListHeader *prev; /* prev item in the list */ ++ } DListHeader; ++ ++typedef struct _DListUpHeader ++ { ++ struct _DListUpHeader *next; /* next item in the list */ ++ struct _DListUpHeader *prev; /* prev item in the list */ ++ struct _DListUpHeader *head; /* head of the list */ ++ } DListUpHeader; ++ ++/* Double linked list DList management macros */ ++ ++#define DListInit(pDListHead) do { \ ++ ((DListHeader *)(pDListHead))->next = pDListHead; \ ++ ((DListHeader *)(pDListHead))->prev = pDListHead; \ ++} while (0) ++ ++#define DListNext(pDListEntry) (((DListHeader *)(pDListEntry))->next) ++#define DListPrev(pDListEntry) (((DListHeader *)(pDListEntry))->prev) ++ ++#define DListEntryLinked(pDListEntry) (NULL != DListNext(pDListEntry)) ++#define DListUnlinkEntry(pDListEntry) (DListNext(pDListEntry) = DListPrev(pDListEntry) = NULL) ++ ++#define DListFirst(pDListHead) DListNext(pDListHead) ++#define DListLast(pDListHead) DListPrev(pDListHead) ++#define DListValid(pDListHead,pEntry) ((void *)(pDListHead) != (pEntry)) ++#define DListEmpty(pDListHead) ((void *)pDListHead == ((DListHeader *)pDListHead)->next) ++ ++#define DListInsertAfter(pDListEntry,pEntry) do { \ ++ ((DListHeader *)(pEntry))->next = ((DListHeader *)(pDListEntry))->next; \ ++ ((DListHeader *)(pEntry))->prev = (DListHeader *)(pDListEntry); \ ++ ((DListHeader *)(pDListEntry))->next->prev = (DListHeader *) (pEntry); \ ++ ((DListHeader *)(pDListEntry))->next = (DListHeader *) (pEntry); \ ++} while (0) ++ ++#define DListInsertBefore(pDListEntry,pEntry) do { \ ++ ((DListHeader *)(pEntry))->next = (DListHeader *)(pDListEntry); \ ++ ((DListHeader *)(pEntry))->prev = ((DListHeader *)(pDListEntry))->prev; \ ++ ((DListHeader *)(pDListEntry))->prev->next = (DListHeader *) (pEntry); \ ++ ((DListHeader *)(pDListEntry))->prev = (DListHeader *) (pEntry); \ ++} while (0) ++ ++#define DListInsertTail(pDListHead,pEntry) DListInsertBefore(pDListHead,pEntry) ++#define DListInsertHead(pDListHead,pEntry) DListInsertAfter(pDListHead,pEntry) ++ ++#define DListRemove(pDListEntry) do { \ ++ ((DListHeader *)(pDListEntry))->prev->next = ((DListHeader *)(pDListEntry))->next; \ ++ ((DListHeader *)(pDListEntry))->next->prev = ((DListHeader *)(pDListEntry))->prev; \ ++} while (0) ++ ++ ++#define DListForEach(pDListHead,f,ref) do { \ ++ DListHeader *p = ((DListHeader *)(pDListHead))->next; \ ++ \ ++ while (DListValid(pDListHead,p)) { \ ++ DListHeader *p0 = p; \ ++ p = DListNext(p); \ ++ if ( (f)((void *)p0, ref) ) break; \ ++ } \ ++} while (0) ++ ++ ++/* Double linked list with up link DListUp management macros */ ++ ++#define DListUpInit(pDListHead) do { \ ++ ((DListUpHeader *)(pDListHead))->next = (DListUpHeader *) (pDListHead); \ ++ ((DListUpHeader *)(pDListHead))->prev = (DListUpHeader *) (pDListHead); \ ++ ((DListUpHeader *)(pDListHead))->head = (DListUpHeader *) (pDListHead); \ ++} while (0) ++ ++#define DListUpNext(pDListEntry) ((DListUpHeader *) DListNext(pDListEntry)) ++#define DListUpPrev(pDListEntry) ((DListUpHeader *) DListPrev(pDListEntry)) ++#define DListUpHead(pDListEntry) (((DListUpHeader *)(pDListEntry))->head) ++ ++#define DListUpFirst(pDListHead) DListUpNext(pDListHead) ++#define DListUpLast(pDListHead) DListUpPrev(pDListHead) ++#define DListUpValid(pEntry) (((DListUpHeader *)(pEntry))->head != (void *) pEntry) ++#define DListUpEmpty(pDListHead) DListEmpty(pDListHead) ++ ++#define DListUpInsertAfter(pDListEntry,pEntry) do { \ ++ DListInsertAfter(pDListEntry,pEntry); \ ++ ((DListUpHeader *)(pEntry))->head = ((DListUpHeader *)(pDListEntry))->head; \ ++} while (0) ++ ++#define DListUpInsertBefore(pDListEntry,pEntry) do { \ ++ DListInsertBefore(pDListEntry,pEntry); \ ++ ((DListUpHeader *)(pEntry))->head = ((DListUpHeader *)(pDListEntry))->head; \ ++} while (0) ++ ++#define DListUpInsertTail(pDListHead,pEntry) DListUpInsertBefore(pDListHead,pEntry) ++#define DListUpInsertHead(pDListHead,pEntry) DListUpInsertAfter(pDListHead,pEntry) ++ ++#define DListUpRemove(pDListEntry) DListRemove(pDListEntry) ++#define DListUpForEach(pDListHead,f,ref) DListForEach((DListHeader *)(pDListHead),f,ref) ++ ++#endif /* DListHeader_H_ */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DslFramer.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DslFramer.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DslFramer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DslFramer.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,159 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * DslFramer.h ++ * ++ * Description: ++ * This file contains common DSL framer definitions ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.3 $ ++ * ++ * $Id: DslFramer.h,v 1.3 2004/07/21 01:39:41 ilyas Exp $ ++ * ++ * $Log: DslFramer.h,v $ ++ * Revision 1.3 2004/07/21 01:39:41 ilyas ++ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK ++ * ++ * Revision 1.2 2004/04/12 23:41:10 ilyas ++ * Added standard header for shared ADSL driver files ++ * ++ * Revision 1.1 2001/12/13 02:28:27 ilyas ++ * Added common framer (DslPacket and G997) and G997 module ++ * ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef DslFramerHeader ++#define DslFramerHeader ++ ++#include "DList.h" ++ ++#define kDslFramerInitialized 0x80000000 ++ ++/* status codes */ ++ ++#define kDslFramerRxFrame 1 ++#define kDslFramerRxFrameErr 2 ++#define kDslFramerTxFrame 3 ++#define kDslFramerTxFrameErr 4 ++ ++#define kDslFramerRxFrameErrFlushed 1 ++#define kDslFramerRxFrameErrAbort 2 ++#define kDslFramerRxFrameErrPhy 3 ++ ++#define kDslFramerTxFrameErrFlushed 1 ++ ++ ++typedef struct _dslFramerBufDesc { ++ long pkId; ++ long bufFlags; ++ void *bufPtr; ++ long bufLen; ++} dslFramerBufDesc; ++ ++/* data bufDesc flags */ ++ ++#define kDslFramerStartNewFrame 1 ++#define kDslFramerEndOfFrame 2 ++#define kDslFramerAbortFrame 4 ++ ++#define kDslFramerExtraByteShift 3 ++#define kDslFramerExtraByteMask (0x7 << kDslFramerExtraByteShift) ++ ++typedef struct _dslFramerControl { ++ bitMap setup; ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslStatusHandlerType statusHandlerPtr; ++ ulong statusCode; ++ ulong statusOffset; ++ ++ int nRxBuffers; ++ int nRxBufSize; ++ int nRxPackets; ++ ++ dslFrame *freeBufListPtr; ++ void *freeBufPool; ++ void *pBufMemory; ++ ++ dslFrame *freePacketListPtr; ++ void *freePacketPool; ++ ++ /* RX working data set */ ++ ++ dslFrame *pRxFrame; ++ dslFrameBuffer *pRxBuf; ++ uchar *pRxBufData; ++ uchar *pRxBufDataEnd; ++ int rxFrameLen; ++ ++ /* TX working data set */ ++ ++ DListHeader dlistTxWaiting; ++ dslFrame *pTxFrame; ++ dslFrameBuffer *pTxBuf; ++ uchar *pTxBufData; ++ uchar *pTxBufDataEnd; ++ ++ /* stats data */ ++ ++ ulong dslByteCntRxTotal; ++ ulong dslByteCntTxTotal; ++ ++ ulong dslFrameCntRxTotal; ++ ulong dslFrameCntRxErr; ++ ulong dslFrameCntTxTotal; ++ ++} dslFramerControl; ++ ++ ++extern Boolean DslFramerInit( ++ void *gDslVars, ++ dslFramerControl *dfCtrl, ++ bitMap setup, ++ ulong statusCode, ++ ulong statusOffset, ++ dslFrameHandlerType rxIndicateHandlerPtr, ++ dslFrameHandlerType txCompleteHandlerPtr, ++ dslStatusHandlerType statusHandlerPtr, ++ ulong rxBufNum, ++ ulong rxBufSize, ++ ulong rxPacketNum); ++extern void DslFramerClose(void *gDslVars, dslFramerControl *dfCtrl); ++extern void DslFramerSendFrame(void *gDslVars, dslFramerControl *dfCtrl, dslFrame *pFrame); ++extern void DslFramerReturnFrame(void *gDslVars, dslFramerControl *dfCtrl, dslFrame *pFrame); ++ ++ ++extern Boolean DslFramerRxGetPtr(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); ++extern void DslFramerRxDone (void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); ++extern Boolean DslFramerTxGetPtr(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); ++extern void DslFramerTxDone(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); ++extern Boolean DslFramerTxIdle (void *gDslVars, dslFramerControl *dfCtrl); ++extern void DslFramerTxFlush(void *gDslVars, dslFramerControl *dfCtrl); ++ ++extern void * DslFramerGetFramePoolHandler(dslFramerControl *dfCtrl); ++extern void DslFramerClearStat(dslFramerControl *dfCtrl); ++ ++extern void DslFramerRxFlushFrame (void *gDslVars, dslFramerControl *dfCtrl, int errCode); ++extern void DslFramerRxFlush(void *gDslVars, dslFramerControl *dfCtrl); ++ ++#endif /* DslFramerHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Flatten.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Flatten.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Flatten.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Flatten.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,115 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * Flatten.h -- Header for Flatten/Unflatten command/status ++ * ++ * Copyright (c) 1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.14 $ ++ * ++ * $Id: Flatten.h,v 1.14 2004/03/04 19:48:52 linyin Exp $ ++ * ++ * $Log: Flatten.h,v $ ++ * Revision 1.14 2004/03/04 19:48:52 linyin ++ * Support adsl2plus ++ * ++ * Revision 1.13 2003/10/17 22:45:14 yongbing ++ * Increase buffer size for large B&G table of G992P3 ++ * ++ * Revision 1.12 2003/08/12 23:16:26 khp ++ * - for Haixiang: added support for ADSL_MARGIN_TWEAK_TEST ++ * ++ * Revision 1.11 2003/02/27 06:33:03 ilyas ++ * Improved free space checking in command buffer (became a problem with ++ * 2 commands SetXmtgain and StartPhy) ++ * ++ * Revision 1.10 2003/01/11 01:27:07 ilyas ++ * Improved checking for available space in status buffer ++ * ++ * Revision 1.9 2002/09/07 01:43:59 ilyas ++ * Added support for OEM parameters ++ * ++ * Revision 1.8 2002/05/16 00:01:52 khp ++ * -added missing #endif ++ * ++ * Revision 1.7 2002/05/15 00:04:48 mprahlad ++ * increase the status buffer size - prevent memory overflow for annexC cases ++ * ++ * Revision 1.6 2002/04/05 04:10:33 linyin ++ * -hack to fit in Annex C firmware in LMEM ++ * ++ * Revision 1.5 2002/04/05 02:45:25 linyin ++ * Make the buffer side larger for annexC ++ * ++ * Revision 1.4 2002/01/30 07:19:06 ilyas ++ * Moved showtime code to LMEM ++ * ++ * Revision 1.3 2001/08/29 02:56:01 ilyas ++ * Added tests for flattening/unflatenning command and statuses (dual mode) ++ * ++ * Revision 1.2 2001/04/25 00:30:54 ilyas ++ * Adjusted MaxFrameLen ++ * ++ * Revision 1.1 2001/04/24 21:41:21 ilyas ++ * Implemented status flattening/unflattaning to transfer statuses between ++ * modules asynchronously through the circular buffer ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef _Flatten_H_ ++#define _Flatten_H_ ++ ++#include "CircBuf.h" ++ ++#ifdef ADSL_MARGIN_TWEAK_TEST ++#define kMaxFlattenedCommandSize 272 /* maximum no. of bytes in flattened cmd */ ++#else ++#define kMaxFlattenedCommandSize 128 /* maximum no. of bytes in flattened cmd */ ++#endif ++#if defined(G992_ANNEXC) || defined(G992P3) ++#if defined(G992P5) ++#define kMaxFlattenedStatusSize 2200 /* maximum no. of bytes in flattened status */ ++#else ++#define kMaxFlattenedStatusSize 1100 /* maximum no. of bytes in flattened status */ ++#endif ++#else ++#define kMaxFlattenedStatusSize 550 /* maximum no. of bytes in flattened status */ ++#endif ++ ++#define kMaxFlattenFramelength (kMaxFlattenedStatusSize - (4*sizeof(long)) - 20) ++ ++extern int SM_DECL FlattenCommand (dslCommandStruct *cmd, ulong *dstPtr, ulong nAvail); ++extern int SM_DECL UnflattenCommand(ulong *srcPtr, dslCommandStruct *cmd); ++extern int SM_DECL FlattenStatus (dslStatusStruct *status, ulong *dstPtr, ulong nAvail); ++extern int SM_DECL UnflattenStatus (ulong *srcPtr, dslStatusStruct *status); ++ ++#define FlattenBufferInit(fb,fbData,bufSize,itemSize) \ ++ StretchBufferInit(fb, fbData, bufSize, itemSize) ++ ++extern int SM_DECL FlattenBufferStatusWrite(stretchBufferStruct *fBuf, dslStatusStruct *status); ++extern int SM_DECL FlattenBufferStatusRead(stretchBufferStruct *fBuf, dslStatusStruct *status); ++ ++extern int SM_DECL FlattenBufferCommandWrite(stretchBufferStruct *fBuf, dslCommandStruct *cmd); ++extern int SM_DECL FlattenBufferCommandRead(stretchBufferStruct *fBuf, dslCommandStruct *cmd); ++ ++#define FlattenBufferReadComplete(fb,nBytes) \ ++ StretchBufferReadUpdate (fb, nBytes) ++ ++#endif /* _Flatten_H_ */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.gh +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.gh 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.gh 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,110 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * G992p3OvhMsg.gh ++ * ++ * Description: ++ * This is a header file which defines the type for the G992p3 overhead ++ * channel messages global variable structure. ++ * ++ * ++ * Copyright (c) 1999-2003 BroadCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.5 $ ++ * ++ * $Id: G992p3OvhMsg.gh,v 1.5 2004/09/11 03:52:25 ilyas Exp $ ++ * ++ * $Log: G992p3OvhMsg.gh,v $ ++ * Revision 1.5 2004/09/11 03:52:25 ilyas ++ * Added support for overhead message segmentation ++ * ++ * Revision 1.4 2004/07/07 01:27:20 ilyas ++ * Fixed OHC message stuck problem on L2 entry/exit ++ * ++ * Revision 1.3 2004/06/10 00:13:31 ilyas ++ * Added L2/L3 and SRA ++ * ++ * Revision 1.2 2004/04/12 23:34:52 ilyas ++ * Merged the latest ADSL driver chnages for ADSL2+ ++ * ++ * Revision 1.1 2003/07/18 19:39:18 ilyas ++ * Initial G.992.3 overhead channel message implementation (from ADSL driver) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef G992p3OvhMsgFramerGlobals ++#define G992p3OvhMsgFramerGlobals ++ ++#define kG992p3OvhMsgMaxCmdSize (16 + 16) ++#define kG992p3OvhMsgMaxRspSize (16 + 2*512) ++ ++typedef struct ++ { ++ dslFrame *segFrame; ++ dslFrameBuffer *segFrBufCur; ++ dslFrameBuffer segFrBuf; ++ ulong timeSegOut; ++ uchar tryCnt; ++ uchar segTotal; ++ uchar segId; ++ } ++ g992p3SegFrameCtlStruct; ++ ++typedef struct ++ { ++ bitMap setup; ++ dslFrameHandlerType rxReturnFramePtr; ++ dslFrameHandlerType txSendFramePtr; ++ dslCommandHandlerType cmdHandlerPtr; ++ dslStatusHandlerType statusHandlerPtr; ++ ++ dslFrame txRspFrame; ++ dslFrameBuffer txRspFrBuf; ++ dslFrameBuffer txRspFrBuf1; ++ uchar txRspBuf[kG992p3OvhMsgMaxRspSize]; ++ dslFrame txPwrRspFrame; ++ dslFrameBuffer txPwrRspFrBuf0; ++ dslFrameBuffer txPwrRspFrBuf0a; ++ dslFrameBuffer txPwrRspFrBuf1; ++ uchar txPwrRspBuf0[8]; ++ dslFrame txCmdFrame; ++ dslFrameBuffer txCmdFrBuf0; ++ dslFrameBuffer txCmdFrBuf0a; ++ dslFrameBuffer txCmdFrBuf1; ++ uchar txCmdBuf[kG992p3OvhMsgMaxCmdSize]; ++ g992p3SegFrameCtlStruct txSegFrameCtl; ++ ulong txFlags; ++ uchar txL0Rq; ++ uchar txL3Rq; ++ ++ ulong timeMs; ++ ulong timeCmdOut; ++ ulong cmdTryCnt; ++ ulong cmdNum; ++ ulong timeRspOut; ++ uchar *txPmdCmd; ++ ++ uchar rxCmdMsgNum; ++ uchar rxRspMsgNum; ++ uchar txCmdMsgNum; ++ uchar txRspMsgNum; ++ } ++ g992p3OvhMsgVarsStruct; ++ ++#endif /* G992p3OvhMsgFramerGlobals */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,64 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * G992p3OvhMsg.h ++ * ++ * Description: ++ * This file contains the exported functions and definitions for G992p3 ++ * overhead channel messages ++ * ++ * ++ * Copyright (c) 1999-2003 BroadCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.1 $ ++ * ++ * $Id: G992p3OvhMsg.h,v 1.1 2003/07/18 19:39:18 ilyas Exp $ ++ * ++ * $Log: G992p3OvhMsg.h,v $ ++ * Revision 1.1 2003/07/18 19:39:18 ilyas ++ * Initial G.992.3 overhead channel message implementation (from ADSL driver) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef G992p3OvhMsgFramerHeader ++#define G992p3OvhMsgFramerHeader ++ ++#define kG992p3OvhMsgFrameBufCnt -1 ++ ++extern Boolean G992p3OvhMsgInit( ++ void *gDslVars, ++ bitMap setup, ++ dslFrameHandlerType rxReturnFramePtr, ++ dslFrameHandlerType txSendFramePtr, ++ dslCommandHandlerType commandHandler, ++ dslStatusHandlerType statusHandler); ++ ++extern void G992p3OvhMsgReset(void *gDslVars); ++extern void G992p3OvhMsgClose(void *gDslVars); ++extern void G992p3OvhMsgTimer(void *gDslVars, long timeQ24ms); ++extern Boolean G992p3OvhMsgCommandHandler (void *gDslVars, dslCommandStruct *cmd); ++extern void G992p3OvhMsgStatusSnooper (void *gDslVars, dslStatusStruct *status); ++ ++extern int G992p3OvhMsgSendCompleteFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); ++extern int G992p3OvhMsgIndicateRcvFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); ++ ++extern void G992p3OvhMsgSetL3(void *gDslVars); ++extern void G992p3OvhMsgSetL0(void *gDslVars); ++ ++#endif /* G992p3OvhMsgFramerHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.gh +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.gh 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.gh 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,66 @@ ++/**************************************************************************** ++ * ++ * G997.gh ++ * ++ * Description: ++ * This is a header file which defines the type for the G997 Framer ++ * global variable structure. ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.5 $ ++ * ++ * $Id: G997.gh,v 1.5 2004/07/21 01:39:41 ilyas Exp $ ++ * ++ * $Log: G997.gh,v $ ++ * Revision 1.5 2004/07/21 01:39:41 ilyas ++ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK ++ * ++ * Revision 1.4 2004/04/27 00:27:16 ilyas ++ * Implemented double buffering to ensure G.997 HDLC frame is continuous ++ * ++ * Revision 1.3 2003/07/18 18:56:59 ilyas ++ * Added support for shared TX buffer (for ADSL driver) ++ * ++ * Revision 1.2 2002/01/11 06:48:27 ilyas ++ * Added command handler pointer ++ * ++ * Revision 1.1 2001/12/13 02:28:27 ilyas ++ * Added common framer (DslPacket and G997) and G997 module ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef G997FramerGlobals ++#define G997FramerGlobals ++ ++#include "DslFramer.h" ++#include "HdlcFramer.h" ++ ++#define kG997MsgBufSize 64 ++ ++typedef struct ++ { ++ bitMap setup; ++ dslFramerControl dslFramer; ++ hdlcByteControl hdlcByte; ++ dslCommandHandlerType commandHandler; ++ ++ ulong timeMs; ++ ulong timeCmdOut; ++ ++ uchar rxMsgNum; ++ uchar txMsgNum; ++ Boolean txIdle; ++ uchar txMsgBuf[kG997MsgBufSize]; ++ ulong txMsgBufLen; ++ uchar *txMsgBufPtr; ++ ulong txMsgLen; ++ ulong txMsgBufs; ++ ulong txMsgBufNum; ++ } ++ g997VarsStruct; ++ ++#endif /* G997FramerGlobals */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,68 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * G997.h ++ * ++ * Description: ++ * This file contains the exported functions and definitions for G97Framer ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.3 $ ++ * ++ * $Id: G997.h,v 1.3 2003/07/18 18:56:59 ilyas Exp $ ++ * ++ * $Log: G997.h,v $ ++ * Revision 1.3 2003/07/18 18:56:59 ilyas ++ * Added support for shared TX buffer (for ADSL driver) ++ * ++ * Revision 1.2 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.1 2001/12/13 02:28:27 ilyas ++ * Added common framer (DslPacket and G997) and G997 module ++ * ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef G997FramerHeader ++#define G997FramerHeader ++ ++extern Boolean G997Init( ++ void *gDslVars, ++ bitMap setup, ++ ulong rxBufNum, ++ ulong rxBufSize, ++ ulong rxPacketNum, ++ upperLayerFunctions *pUpperLayerFunctions, ++ dslCommandHandlerType g997PhyCommandHandler); ++ ++extern void G997Close(void *gDslVars); ++extern void G997Timer(void *gDslVars, long timeQ24ms); ++extern Boolean G997CommandHandler (void *gDslVars, dslCommandStruct *cmd); ++extern void G997StatusSnooper (void *gDslVars, dslStatusStruct *status); ++ ++extern int G997SendFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); ++extern int G997ReturnFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); ++ ++extern Boolean G997SetTxBuffer(void *gDslVars, ulong len, void *bufPtr); ++extern void * G997GetFramePoolHandler(void *gDslVars); ++ ++#endif /* G997FramerHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/HdlcFramer.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/HdlcFramer.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/HdlcFramer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/HdlcFramer.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,237 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * HdlcFramer.h ++ * ++ * Description: ++ * This file contains common HDLC definitions for bit/byte stuffing ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.3 $ ++ * ++ * $Id: HdlcFramer.h,v 1.3 2004/07/21 01:39:41 ilyas Exp $ ++ * ++ * $Log: HdlcFramer.h,v $ ++ * Revision 1.3 2004/07/21 01:39:41 ilyas ++ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK ++ * ++ * Revision 1.2 2003/07/18 18:51:05 ilyas ++ * Added mode (default) to pass address and control field ++ * ++ * Revision 1.1 2001/12/13 02:28:27 ilyas ++ * Added common framer (DslPacket and G997) and G997 module ++ * ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef HdlcFramerHeader ++#define HdlcFramerHeader ++ ++/* setup bitmap definitions */ ++ ++#define kHdlcSetupShift 16 ++#define kHdlcSetupMask ((long)0xFFFF << kHdlcSetupShift) ++ ++#define kHdlcCrcMask 0x00030000 ++#define kHdlcCrcNone 0x00000000 ++#define kHdlcCrc16 0x00010000 ++#define kHdlcCrc32 0x00020000 ++ ++#define kHdlcTxIdleStop 0x00040000 ++#define kHdlcSpecialAddrCtrl 0x00080000 ++ ++extern ushort HdlcCrc16Table[]; ++ ++#define HDLC16_CRC_INIT 0xFFFF ++#define HDLC16_CRC_FINAL(crc) ((crc) ^ 0xFFFF) ++#define HDLC16_GOOD_CRC 0xF0B8 ++#define Hdlc16UpdateCrc(crc,b) ((crc) >> 8) ^ HdlcCrc16Table[((crc) ^ (b)) & 0xFF] ++ ++extern ulong HdlcCrc32Table[]; ++ ++#define HDLC32_CRC_INIT 0xFFFFFFFF ++#define HDLC32_CRC_FINAL(crc) ((crc) ^ 0xFFFFFFFF) ++#define HDLC32_GOOD_CRC 0xDEBB20E3 ++#define Hdlc32UpdateCrc(crc,b) ((crc) >> 8) ^ HdlcCrc32Table[((crc) ^ (b)) & 0xFF] ++ ++extern ulong HdlcCrc32Table[]; ++ ++/* HDLC common fields */ ++ ++#define HDLC_ADDR 0xFF ++#define HDLC_CTRL 0x3 ++ ++#define HDLC_BYTE_FLAG 0x7E ++#define HDLC_BYTE_ESC 0x7D ++ ++/* HDLC frame assembly states */ ++ ++#define HDLC_STATE_START_FLAG 0 ++#define HDLC_STATE_ADDRESS (HDLC_STATE_START_FLAG + 1) ++#define HDLC_STATE_CONTROL (HDLC_STATE_START_FLAG + 2) ++#define HDLC_STATE_DATA (HDLC_STATE_START_FLAG + 3) ++#define HDLC_STATE_FCS1 (HDLC_STATE_START_FLAG + 4) ++#define HDLC_STATE_FCS2 (HDLC_STATE_START_FLAG + 5) ++#define HDLC_STATE_END_FLAG (HDLC_STATE_START_FLAG + 6) ++ ++ ++/* HDLC common types */ ++ ++typedef struct _hdlcByteControl { ++ bitMap setup; ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; ++ dslFramerDataDoneHandlerType rxDataDoneHandler; ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; ++ dslFramerDataDoneHandlerType txDataDoneHandler; ++ ++ /* RX working data set */ ++ ++ uchar rxFrameState; ++ int rxFrameLen; ++ ulong rxCrc; ++ Boolean rxEscChar; ++ ++ uchar *pRxData; ++ uchar *pRxDataEnd; ++ long rxDataLen; ++ ++ /* TX working data set */ ++ ++ uchar txFrameState; ++ int txFrameLen; ++ ulong txCrc; ++ int txCharPending; ++ ++ uchar *pTxData; ++ uchar *pTxDataEnd; ++ long txDataLen; ++} hdlcByteControl; ++ ++typedef struct _hdlcBitControl { ++ bitMap setup; ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; ++ dslFramerDataDoneHandlerType rxDataDoneHandler; ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; ++ dslFramerDataDoneHandlerType txDataDoneHandler; ++ ++ /* RX working data set */ ++ ++ uchar rxFrameState; ++ int rxFrameLen; ++ ulong rxCrc; ++ int rxNibblePending; ++ int rxOutVal; ++ uchar rxOutBits; ++ uchar rxRem1Bits; ++ Boolean rxEscChar; /* ???? */ ++ ++ uchar *pRxData; ++ uchar *pRxDataEnd; ++ long rxDataLen; ++ ++ /* TX working data set */ ++ ++ uchar txFrameState; ++ int txFrameLen; ++ ulong txCrc; ++ int txOutVal; ++ uchar txOutBits; ++ uchar txLast1Bits; ++ int txCharPending; /* ???? */ ++ ++ uchar *pTxData; ++ uchar *pTxDataEnd; ++ long txDataLen; ++} hdlcBitControl; ++ ++/* HDLC common functions */ ++ ++#define HdlcFramerTxFrameInit(ctrl) do { \ ++ ctrl->txFrameState = HDLC_STATE_START_FLAG; \ ++ ctrl->txFrameLen = 0; \ ++ ctrl->txCrc = HDLC16_CRC_INIT; \ ++ ctrl->txCharPending= -1; \ ++} while (0) ++ ++#define HdlcFramerRxFrameInit(ctrl) do { \ ++ ctrl->rxFrameState = HDLC_STATE_START_FLAG; \ ++ ctrl->rxFrameLen = 0; \ ++ ctrl->rxCrc = HDLC16_CRC_INIT; \ ++ ctrl->rxEscChar = false; \ ++} while (0) ++ ++#define HdlcFramerTxGetData(ctrl) do { \ ++ dslFramerBufDesc bufDesc; \ ++ \ ++ if ((ctrl->txDataGetPtrHandler) (gDslVars, &bufDesc)) { \ ++ ctrl->pTxData = bufDesc.bufPtr; \ ++ ctrl->pTxDataEnd = (uchar*)bufDesc.bufPtr + bufDesc.bufLen; \ ++ ctrl->txDataLen = bufDesc.bufLen; \ ++ if (bufDesc.bufFlags & kDslFramerStartNewFrame) \ ++ HdlcFramerTxFrameInit(ctrl); \ ++ } \ ++ else { \ ++ HdlcFramerTxFrameInit(ctrl); \ ++ } \ ++} while (0); ++ ++#define HdlcFramerRxGetData(ctrl, frFlag) do { \ ++ dslFramerBufDesc bufDesc; \ ++ \ ++ bufDesc.bufFlags = frFlag; \ ++ if ((ctrl->rxDataGetPtrHandler) (gDslVars, &bufDesc)) { \ ++ ctrl->pRxData = bufDesc.bufPtr; \ ++ ctrl->pRxDataEnd = (uchar*)bufDesc.bufPtr + bufDesc.bufLen; \ ++ ctrl->rxDataLen = bufDesc.bufLen; \ ++ } \ ++} while (0); ++ ++/* HDLC functions headers */ ++ ++extern Boolean HdlcByteInit( ++ void *gDslVars, ++ hdlcByteControl *hbyCtrl, ++ bitMap setup, ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler, ++ dslFramerDataDoneHandlerType rxDataDoneHandler, ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler, ++ dslFramerDataDoneHandlerType txDataDoneHandler); ++ ++extern void HdlcByteReset(void *gDslVars, hdlcByteControl *hbyCtrl); ++extern void HdlcByteRxFlush(void *gDslVars, hdlcByteControl *hbyCtrl); ++extern int HdlcByteRx(void *gDslVars, hdlcByteControl *hbyCtrl, int nBytes, uchar *srcPtr) FAST_TEXT; ++extern int HdlcByteTx(void *gDslVars, hdlcByteControl *hbyCtrl, int nBytes, uchar *dstPtr) FAST_TEXT; ++extern Boolean HdlcByteTxIdle(void *gDslVars, hdlcByteControl *hbyCtrl); ++ ++extern Boolean HdlcBitInit( ++ void *gDslVars, ++ hdlcBitControl *hbiCtrl, ++ bitMap setup, ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler, ++ dslFramerDataDoneHandlerType rxDataDoneHandler, ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler, ++ dslFramerDataDoneHandlerType txDataDoneHandler); ++ ++extern void HdlcBitReset(void *gDslVars, hdlcByteControl *hbiCtrl); ++extern int HdlcBitRx(void *gDslVars, hdlcBitControl *hbiCtrl, int nBytes, uchar *srcPtr) FAST_TEXT; ++extern int HdlcBitTx(void *gDslVars, hdlcBitControl *hbiCtrl, int nBytes, uchar *dstPtr) FAST_TEXT; ++ ++#endif /* HdlcFramerHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MathUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MathUtil.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MathUtil.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MathUtil.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,135 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/************************************************************************ ++ * ++ * MathUtil.h: ++ * ++ * Description: ++ * This file contains the exported interface for MathUtil.c module. ++ * ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.6 $ ++ * ++ * $Id: MathUtil.h,v 1.6 2004/04/13 00:21:13 ilyas Exp $ ++ * ++ * $Log: MathUtil.h,v $ ++ * Revision 1.6 2004/04/13 00:21:13 ilyas ++ * Added standard header for shared ADSL driver files ++ * ++ * Revision 1.5 2001/08/16 02:18:08 khp ++ * - mark functions with FAST_TEXT to reduce cycle counts for QPROC targets ++ * (replaces use of LMEM_INSN) ++ * ++ * Revision 1.4 1999/10/06 04:55:22 liang ++ * Added function to multiply two long values to save result as VeryLong. ++ * ++ * Revision 1.3 1999/08/05 19:42:52 liang ++ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. ++ * ++ * Revision 1.2 1999/03/26 03:29:59 liang ++ * Export CosSin table. ++ * ++ * Revision 1.1 1998/10/28 01:28:07 liang ++ * *** empty log message *** ++ * ++ * Revision 1.12 1998/02/10 17:19:49 scott ++ * Changed MathVL routines to return arguments using pointers ++ * ++ * Revision 1.11 1997/12/13 06:12:07 mwg ++ * Added more Atan2 flavors ++ * ++ * Revision 1.10 1997/11/18 01:11:48 mwg ++ * Removed <CR> symbols which accidently slipped in. ++ * ++ * Revision 1.9 1997/11/03 19:07:52 scott ++ * No longer redefine max() and min() if already defined ++ * ++ * Revision 1.8 1997/07/30 01:35:20 liang ++ * Add more accurate atan2 function UtilLongLongAtan2. ++ * ++ * Revision 1.7 1997/07/21 20:23:19 mwg ++ * Added new function: UtilBlockCos() ++ * ++ * Revision 1.6 1997/03/21 23:50:10 liang ++ * Added initial version of V8bis module to CVS tree. ++ * ++ * Revision 1.5 1997/03/19 18:35:34 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.4 1997/01/21 00:36:15 mwg ++ * Added new function: UtilBlockCosSin() ++ * ++ * Revision 1.3 1996/06/18 21:14:45 mwg ++ * Modified VLDivVL by allowing to specify the result scaling. ++ * ++ * Revision 1.2 1996/06/12 02:31:59 mwg ++ * Added 64bit arithmetic functions. ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:15 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.4 1995/12/04 23:08:15 liang ++ * Add file Math/LinearToLog.c. ++ * ++ ************************************************************************/ ++#ifndef MathUtilPh ++#define MathUtilPh ++ ++/* Exported tables */ ++extern const short UtilCosTable[]; ++ ++/* Exported functions */ ++extern ComplexShort UtilCosSin(ushort angle); ++extern long UtilBlockCosSin (int nValues, long angle, long delta, ComplexShort *dstPtr); ++extern long UtilBlockCos (int nValues, long angle, long delta, short *dstPtr); ++extern ushort UtilShortShortAtan2(ComplexShort point); ++extern ushort UtilLongShortAtan2(ComplexLong point); ++extern ulong UtilShortLongAtan2(ComplexShort point) FAST_TEXT; ++extern ulong UtilLongLongAtan2(ComplexLong point) FAST_TEXT; ++extern ushort UtilSqrt(ulong y); ++extern ushort UtilMaxMagnitude(int blkSize, ComplexShort *dataPtr); ++extern short UtilQ0LinearToQ4dB (ulong x); ++extern ulong UtilQ4dBToQ12Linear (short x); ++extern void UtilAdjustComplexMagnitude(ComplexShort *srcPtr, short mag, short adjustment); ++ ++extern void VLMultLongByLong(long x, long y, VeryLong *dst); ++extern void VLMultShort (VeryLong x, short y, VeryLong *dst); ++extern void VLAddVL (VeryLong x, VeryLong y, VeryLong *dst); ++extern void VLAddLong (VeryLong x, long y, VeryLong *dst); ++extern void VLSubVL (VeryLong x, VeryLong y, VeryLong *dst); ++extern void VLSubLong (VeryLong x, long y, VeryLong *dst); ++extern void VLDivVL (VeryLong x, VeryLong y, int scale, long *dst); ++extern void VLShiftLeft(VeryLong x, int shift, VeryLong *dst); ++extern void VLShiftRight(VeryLong x, int shift, VeryLong *dst); ++ ++ ++#define UtilAtan2 UtilShortShortAtan2 ++#define UtilLongAtan2 UtilLongShortAtan2 ++ ++/* Standard Macros */ ++#undef abs ++#define abs(x) ((x) >= 0 ? (x) : -(x)) ++ ++#undef max ++#define max(x, y) ((x) >= (y) ? (x) : (y)) ++ ++#undef min ++#define min(x, y) ((x) <= (y) ? (x) : (y)) ++ ++#endif /* MathUtilPh */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MipsAsm.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MipsAsm.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MipsAsm.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MipsAsm.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,264 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/************************************************************************ ++ * ++ * MipsAsm.h: ++ * ++ * Description: ++ * This file contains definitions specific to MIPS assembly ++ * ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.5 $ ++ * ++ * $Id: MipsAsm.h,v 1.5 2004/04/13 00:16:59 ilyas Exp $ ++ * ++ * $Log: MipsAsm.h,v $ ++ * Revision 1.5 2004/04/13 00:16:59 ilyas ++ * Merged the latest ADSL driver changes ++ * ++ * Revision 1.4 2002/09/12 04:08:50 ilyas ++ * Added macros for BCM MIPS specific instructions ++ * ++ * Revision 1.3 2000/11/18 21:28:19 mprahlad ++ * ifdef bcm47xx - ++ * define MSUB(src1,src2) msub src1, src2 ++ * change Mult(dst, src1, src2) to use "mul" instead of "mult; mflo" ++ * define Mul(src1, src2) mult src1, src2 ++ * ++ * Revision 1.2 2000/07/28 21:05:05 mprahlad ++ * Macros specific to bcm47xx added. ++ * ++ * Revision 1.1 1999/08/05 19:52:57 liang ++ * Copied from the softmodem top of the tree on 08/04/99. ++ * ++ * Revision 1.5 1999/04/02 23:16:21 mwg ++ * Fixed a minor comatibility issue with mult ++ * ++ * Revision 1.4 1999/02/03 20:25:43 mwg ++ * Added an option for R4010 ++ * ++ * Revision 1.3 1998/10/30 02:21:34 mwg ++ * Added targets for 4640 ++ * ++ * Revision 1.2 1998/10/16 18:52:09 ilyas ++ * Added ASM_PROLOG[5-7] macros to save on stores ++ * ++ * Revision 1.1 1998/06/03 23:28:39 mwg ++ * Renamed from DinoDefs.h ++ * ++ * Revision 1.6 1998/02/09 18:23:11 scott ++ * Added EMBEDDED_CALLING_CONVENTION (GreenHill) and R3900/R4102 ++ * ++ * Revision 1.5 1997/03/19 18:35:02 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.4 1996/10/02 20:28:41 liang ++ * Remove parameter "acc" from the non-DINO version of MAD. ++ * ++ * Revision 1.3 1996/10/02 19:44:36 liang ++ * Separated MultAdd into MAD and MADW, added NO_DINO_WRITEBACK option. ++ * ++ * Revision 1.2 1996/08/14 03:06:07 liang ++ * Modified macro MultAdd so that the assembly code build works. ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.5 1994/11/04 22:41:29 mwg ++ * Added #ifdefs for different targets. ++ * ++ ************************************************************************/ ++ ++#ifndef _MIPS_ASM_H_ ++#define _MIPS_ASM_H_ ++ ++#define zero $0 ++#define v0 $2 ++#define v1 $3 ++#define a0 $4 ++#define a1 $5 ++#define a2 $6 ++#define a3 $7 ++#define t0 $8 ++#define t1 $9 ++#define t2 $10 ++#define t3 $11 ++#define t4 $12 ++#define t5 $13 ++#define t6 $14 ++#define t7 $15 ++#define s0 $16 ++#define s1 $17 ++#define s2 $18 ++#define s3 $19 ++#define s4 $20 ++#define s5 $21 ++#define s6 $22 ++#define s7 $23 ++#define t8 $24 ++#define t9 $25 ++#define k0 $26 ++#define k1 $27 ++#define gp $28 ++#define sp $29 ++#define fp $30 ++#define s8 $30 ++#define ra $31 ++ ++#ifdef EMBEDDED_CALLING_CONVENTION ++ ++/* Support for GreenHills embedded calling convention */ ++ ++#define ASM_PROLOG subu sp, 32; \ ++ sw $8, 16(sp); \ ++ sw $9, 20(sp); \ ++ sw $10, 24(sp); \ ++ sw $11, 28(sp); ++ ++#define ASM_PROLOG5 subu sp, 32; \ ++ sw $8, 16(sp); ++ ++#define ASM_PROLOG6 subu sp, 32; \ ++ sw $8, 16(sp); \ ++ sw $9, 20(sp); ++ ++#define ASM_PROLOG7 subu sp, 32; \ ++ sw $8, 16(sp); \ ++ sw $9, 20(sp); \ ++ sw $10, 24(sp); ++ ++#define ASM_EPILOG addu sp, 32 ++ ++#else ++#define ASM_PROLOG ++#define ASM_PROLOG5 ++#define ASM_PROLOG6 ++#define ASM_PROLOG7 ++#define ASM_EPILOG ++#endif ++ ++#ifdef DINO /* Special DSP extensions to MIPS core */ ++ ++#ifndef NO_DINO_WRITEBACK /* DSP extensions with writeback register */ ++ ++#define MAD(src1, src2) .set noreorder ; mad $0, src1, src2 ; .set reorder ++#define MADW(acc, src1, src2) .set noreorder ; mad acc, src1, src2 ; .set reorder ++#define Mult(dst, src1, src2) .set noreorder ; mult dst, src1, src2 ; .set reorder ++#define MultU(dst, src1, src2) .set noreorder ; multu dst, src1, src2 ; .set reorder ++ ++#else /* NO_DINO_WRITEBACK */ ++ ++#define MAD(src1, src2) .set noreorder ; mad $0, src1, src2 ; .set reorder ++#define MADW(acc, src1, src2) .set noreorder ; mad $0, src1, src2 ; mflo acc ; .set reorder ++#define Mult(dst, src1, src2) multu src1, src2 ; mflo dst ++#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst ++ ++#endif /* NO_DINO_WRITEBACK */ ++ ++#else /* DINO */ ++ ++#if defined(R3900) ++ ++#define MAD(src1, src2) madd $0, src1, src2 ++#define MADW(acc, src1, src2) madd acc, src1, src2 ++#define Mult(dst, src1, src2) mult dst, src1, src2 ++#define MultU(dst, src1, src2) multu dst, src1, src2 ++ ++#elif defined(bcm47xx_INSTR_MACROS) && defined(bcm47xx) ++ ++#define mips_froo(s1,s2,s3) s1##s2##s3 ++#define MSUB(s1,s2) .set noreorder ; mips_froo(msub_,s1,s2) ; .set reorder ++#define MAD(s1,s2) .set noreorder ; mips_froo(mad_,s1,s2) ; .set reorder ++#define MADW(acc, s1,s2) .set noreorder ; mips_froo(mad_,s1,s2) ; mflo acc ; .set reorder ++ ++#include "BCM4710.h" ++ ++#define Mult(dst, src1, src2) mul dst, src1, src2 ++#define Mul( src1, src2) mult src1, src2 ; ++#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst ++ ++#elif defined(bcm47xx) ++#define MSUB(src1, src2) msub src1, src2 ++#define MAD(src1, src2) madd src1, src2 ++#define MADW(acc, src1, src2) .set noreorder ; madd src1, src2; mflo acc ; .set reorder ++/* ++#define Mult(dst, src1, src2) mult src1, src2 ; mflo dst ++*/ ++#define Mult(dst, src1, src2) mul dst , src1, src2 ; ++#define Mul( src1, src2) mult src1, src2 ; ++#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst ++ ++#else ++ ++#ifdef R4102 ++#define MAD(src1, src2) madd16 src1, src2 ++#define MADW(acc, src1, src2) madd16 src1, src2 ; mflo acc ++#else /* R4102 */ ++ ++#ifdef R4640 ++ ++#define MAD(src1, src2) madd $0, src1, src2 ++#define MADW(acc, src1, src2) madd src1, src2; mflo acc ++ ++#else /* R4640 */ ++ ++#ifdef R4010 ++ ++#define MAD(src1, src2) madd src1, src2 ++#define MADW(acc, src1, src2) madd src1, src2; mflo acc ++ ++#else ++#define MAD(src1, src2) .set noat ;\ ++ mflo $at ;\ ++ sw $2, -4(sp) ;\ ++ multu src1, src2 ;\ ++ mflo $2 ;\ ++ addu $at, $2, $at ;\ ++ lw $2, -4(sp) ;\ ++ mtlo $at ;\ ++ .set at ++ ++#define MADW(acc, src1, src2) .set noat ;\ ++ mflo $at ;\ ++ sw $2, -4(sp) ;\ ++ multu src1, src2 ;\ ++ mflo $2 ;\ ++ addu $at, $2, $at ;\ ++ lw $2, -4(sp) ;\ ++ move acc, $at ;\ ++ mtlo $at ;\ ++ .set at ++#endif /* R4010 */ ++#endif /* R4102 */ ++#endif /* R4640 */ ++ ++#define Mult(dst, src1, src2) mul dst, src1, src2 ++#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst ++ ++#endif /* !3900 */ ++#endif /* DINO */ ++ ++ ++ ++ ++ ++ ++ ++ ++#endif /* _MIPS_ASM_H_ */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MiscUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MiscUtil.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MiscUtil.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MiscUtil.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,65 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * MiscUtil.h -- Miscellaneous utilities ++ * ++ * Description: ++ * ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg Haixiang Liang ++ * ++ * $Revision: 1.4 $ ++ * ++ * $Id: MiscUtil.h,v 1.4 2004/04/13 00:21:46 ilyas Exp $ ++ * ++ * $Log: MiscUtil.h,v $ ++ * Revision 1.4 2004/04/13 00:21:46 ilyas ++ * Added standard header for shared ADSL driver files ++ * ++ * Revision 1.3 2001/07/21 01:21:06 ilyas ++ * Added more functions for int to string conversion used by log file ++ * ++ * Revision 1.2 1999/08/05 19:42:56 liang ++ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. ++ * ++ * Revision 1.1 1999/01/27 22:10:12 liang ++ * Initial version. ++ * ++ * Revision 1.1 1997/07/10 01:18:45 mwg ++ * Initial revision. ++ * ++ * ++ * ++ *****************************************************************************/ ++#ifndef _MISC_UTIL_H_ ++#define _MISC_UTIL_H_ ++ ++extern long SM_DECL GetRateValue(dataRateMap rate); ++extern int SM_DECL DecToString(ulong value, uchar *dstPtr, uint nDigits); ++extern int SM_DECL HexToString(ulong value, uchar *dstPtr, uint nDigits); ++extern char * SM_DECL DecToStr(char *s, ulong num); ++extern char * SM_DECL SignedToStr(char *s, long num); ++extern char * SM_DECL HexToStr(char *s, ulong num); ++ ++#define EvenParityBit(x) ((z = (y = x ^ (x >> 4)) ^ (y >> 2)) ^ (z >> 1)) ++#define OddParityBit(x) (EvenParityBit(x) ^ 1) ++ ++extern void ParityApply(int nBytes, int nDataBits, int parity, uchar *srcPtr, uchar *dstPtr); ++extern void ParityStrip(int nBytes, int nDataBits, int parity, uchar *srcPtr, uchar *dstPtr, statusHandlerType statusHandler); ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Que.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Que.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Que.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Que.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,106 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * Que.h ++ * ++ * Description: ++ * Definition and implementation (via macros and inline functions) ++ * of a simple queue ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ *****************************************************************************/ ++ ++#ifndef QueHeader_H_ ++#define QueHeader_H_ ++ ++typedef void * _QueItem; ++ ++typedef struct _QueHeader ++ { ++ _QueItem *head; /* first item in the queue */ ++ _QueItem *tail; /* last item in the queue */ ++ } QueHeader; ++ ++/* Queue management macros */ ++ ++#define QueInit(pqHdr) (((QueHeader *)(pqHdr))->head = ((QueHeader *)(pqHdr))->tail = NULL) ++#define QueEmpty(pqHdr) (NULL == ((QueHeader *)(pqHdr))->head) ++ ++#define QueFirst(pqHdr) ((QueHeader *)(pqHdr))->head ++#define QueLast(pqHdr) ((QueHeader *)(pqHdr))->tail ++#define QueNext(pqItem) (*((void **)(pqItem))) ++ ++ ++#define QueRemoveFirst(pqHdr) do { \ ++ if (!QueEmpty(pqHdr)) { \ ++ ((QueHeader *)(pqHdr))->head = *((QueHeader *)(pqHdr))->head; \ ++ if (QueEmpty(pqHdr)) \ ++ ((QueHeader *)(pqHdr))->tail = NULL; \ ++ } \ ++} while (0) ++#define QueRemove(pqHdr) QueRemoveFirst(pqHdr) ++ ++ ++#define QueAddLast(pqHdr,pqItem) do { \ ++ QueNext(pqItem) = NULL; \ ++ if (NULL != ((QueHeader *)(pqHdr))->tail) \ ++ *((QueHeader *)(pqHdr))->tail = (pqItem); \ ++ else \ ++ ((QueHeader *)(pqHdr))->head = (_QueItem *)(pqItem); \ ++ ((QueHeader *)(pqHdr))->tail = (_QueItem *)(pqItem); \ ++} while (0) ++#define QueAdd(pqHdr,pItem) QueAddLast(pqHdr,pItem) ++ ++#define QueAddFirst(pqHdr,pqItem) do { \ ++ if (NULL == ((QueHeader *)(pqHdr))->tail) \ ++ ((QueHeader *)(pqHdr))->tail = (_QueItem *)(pqItem); \ ++ QueNext(pqItem) = ((QueHeader *)(pqHdr))->head; \ ++ ((QueHeader *)(pqHdr))->head = (_QueItem *)(pqItem); \ ++} while (0) ++ ++ ++#define QueGet(pqHdr) \ ++ (void *) QueFirst(pqHdr); \ ++ QueRemove(pqHdr); ++ ++#define QueMerge(pqHdr1,pqHdr2) do { \ ++ if (NULL == ((QueHeader *)(pqHdr1))->tail) \ ++ ((QueHeader *)(pqHdr1))->head = ((QueHeader *)(pqHdr2))->head; \ ++ else \ ++ QueNext(((QueHeader *)(pqHdr1))->tail) = ((QueHeader *)(pqHdr2))->head; \ ++ if (NULL != ((QueHeader *)(pqHdr2))->tail) \ ++ ((QueHeader *)(pqHdr1))->tail = ((QueHeader *)(pqHdr2))->tail; \ ++} while (0) ++ ++#define QueCopy(pqHdr1,pqHdr2) do { \ ++ ((QueHeader *)(pqHdr1))->head = ((QueHeader *)(pqHdr2))->head; \ ++ ((QueHeader *)(pqHdr1))->tail = ((QueHeader *)(pqHdr2))->tail; \ ++} while (0) ++ ++#define QueForEach(pqHdr,f,ref) do { \ ++ _QueItem *p = ((QueHeader *)(pqHdr))->head; \ ++ \ ++ while (NULL != p) { \ ++ if ( (f)((void *)p, ref) ) break; \ ++ p = QueNext(p); \ ++ } \ ++} while (0) ++ ++#endif /* QueHeader_H_ */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftAtmVc.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftAtmVc.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftAtmVc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftAtmVc.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,569 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * SoftAtmVc.h ++ * ++ * Description: ++ * This file contains ATM VC definitions ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.27 $ ++ * ++ * $Id: SoftAtmVc.h,v 1.27 2004/06/02 22:26:17 ilyas Exp $ ++ * ++ * $Log: SoftAtmVc.h,v $ ++ * Revision 1.27 2004/06/02 22:26:17 ilyas ++ * Added ATM counters for G.992.3 ++ * ++ * Revision 1.26 2004/03/10 22:57:20 ilyas ++ * Added I.432 scramling control ++ * ++ * Revision 1.25 2003/09/23 00:21:59 ilyas ++ * Added status to indicate ATM header compression ++ * ++ * Revision 1.24 2003/08/27 02:00:50 ilyas ++ * Original implementation of ATM header compression ++ * ++ * Revision 1.23 2003/02/25 04:13:15 ilyas ++ * Added standard Broadcom header ++ * ++ * Revision 1.22 2003/01/10 23:25:48 ilyas ++ * Added ATM status definition ++ * ++ * Revision 1.21 2002/09/12 21:07:19 ilyas ++ * Added HEC, OCD and LCD counters ++ * ++ * Revision 1.20 2002/04/02 09:58:00 ilyas ++ * Initial implementatoin of BERT ++ * ++ * Revision 1.19 2001/10/09 22:35:14 ilyas ++ * Added more ATM statistics and OAM support ++ * ++ * Revision 1.18 2001/06/18 19:49:36 ilyas ++ * Changes to include support for HOST_ONLY mode ++ * ++ * Revision 1.17 2001/02/23 05:49:57 ilyas ++ * Added routed 1483 encapsulation ++ * ++ * Revision 1.16 2001/02/09 04:18:18 ilyas ++ * Added framer for bridged ethernet PDUs ++ * ++ * Revision 1.15 2001/02/09 01:55:27 ilyas ++ * Added status codes and macros to support printing of AAL packets ++ * ++ * Revision 1.14 2000/09/21 17:28:35 ilyas ++ * Added VBR support to traffic management code, separated UBR to a different ++ * Tx list, changed some of the algorithms ++ * ++ * Revision 1.13 2000/08/23 18:42:13 ilyas ++ * Added AAL2, added VcConfigure functions, moved commonly used look-up ++ * tables for CRC calculation to AtmLayer ++ * ++ * Revision 1.12 2000/08/02 03:06:22 ilyas ++ * Added support for reserving space in RX packets for ATm protocols ++ * ++ * Revision 1.11 2000/07/28 17:23:39 ilyas ++ * Added ATM connect/disconnect statuses ++ * ++ * Revision 1.10 2000/07/25 02:16:12 ilyas ++ * Added EClip (with Eth to ATM ARP translation) implementation ++ * ++ * Revision 1.9 2000/07/23 20:57:14 ilyas ++ * Added ATM framer and protocol layers ++ * ++ * Revision 1.8 2000/07/17 21:08:16 lkaplan ++ * removed global pointer ++ * ++ * Revision 1.7 2000/06/09 18:33:04 liang ++ * Fixed Irix compiler warnings. ++ * ++ * Revision 1.6 2000/05/18 21:47:31 ilyas ++ * Added detection of preassigned cells such as OAM F4, F5 ++ * ++ * Revision 1.5 2000/05/14 01:50:11 ilyas ++ * Added more statuses to ATM code ++ * ++ * Revision 1.4 2000/05/10 02:41:28 liang ++ * Added status report for no cell memory ++ * ++ * Revision 1.3 2000/05/09 23:00:27 ilyas ++ * Added ATM status messages, ATM timer, Tx frames flush on timeout ++ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames ++ * ++ * Revision 1.2 2000/05/03 03:53:00 ilyas ++ * Added support for pVc to vcID translation needed for LOG file and other ++ * definitions for ATM data in LOG file ++ * ++ * Revision 1.1 2000/04/19 00:21:35 ilyas ++ * Fixed some problems and added Out Of Band (OOB) support to ATM packets ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef SoftAtmVcHeader ++#define SoftAtmVcHeader ++ ++/* ++** ++** ATM UNI types ++** ++*/ ++ ++#define AtmLinkFlags(bMap,name) (((bMap) >> name##Shift) & name##Mask) ++ ++/* ATM service category types */ ++ ++#define kAtmSrvcCBR 1 /* Constant Bit Rate */ ++#define kAtmSrvcVBR 2 /* Variable Bit Rate */ ++#define kAtmSrvcUBR 4 /* Unspecified Bit Rate */ ++#define kAtmSrvcABR 8 /* Available Bit Rate */ ++#define kAtmSrvcUnknown 0xFF ++ ++/* ATM AAL types (as encoded at UNI) */ ++ ++#define kAtmAalIE 0x58 ++ ++#define kAtmRaw 0 ++#define kAtmAal1 1 ++#define kAtmAal2 2 ++#define kAtmAal34 3 ++#define kAtmAal5 5 ++#define kAtmAalUser 16 ++#define kAtmAalUnknown 0xFF ++ ++/* ATM AAL1 parameters */ ++ ++#define kAal1SubTypeId 0x85 ++ ++#define kAal1TransportShift 0 ++#define kAal1TransportMask 0x7 ++ ++#define kAal1NullTransport 0 ++#define kAal1VoiceTransport 1 ++#define kAal1CircuitTransport 2 ++#define kAal1AudioTransport 4 ++#define kAal1VideoTransport 5 ++ ++ ++#define kAal1CBRId 0x86 ++ ++#define kAal1CBRShift 24 ++#define kAal1CBRMask 0xFF ++ ++#define kAal1CBR64 1 ++#define kAal1CBR1544 4 /* DS1 */ ++#define kAal1CBR6312 5 /* DS2 */ ++#define kAal1CBR32064 6 ++#define kAal1CBR44736 7 /* DS3 */ ++#define kAal1CBR97728 8 ++#define kAal1CBR2048 0x10 /* E1 */ ++#define kAal1CBR8448 0x11 /* E2 */ ++#define kAal1CBR34368 0x12 /* E3 */ ++#define kAal1CBR139264 0x13 ++#define kAal1CBR64xN 0x40 ++#define kAal1CBR8xN 0x41 ++ ++ ++#define kAal1MultiplierId 0x87 ++ ++#define kAal1ClockRecoveryId 0x88 ++ ++#define kAal1ClockRecoveryShift 3 ++#define kAal1ClockRecoveryMask 0x3 ++ ++#define kAal1ClockRecoveryNull 1 /* synchronous transport */ ++#define kAal1ClockRecoverySRTS 1 /* asynchronous transport */ ++#define kAal1ClockRecoveryAdaptive 2 ++ ++ ++#define kAal1ECMId 0x89 /* Error correction method */ ++ ++#define kAal1ECMShift (kAal1ClockRecoveryShift + 2) ++#define kAal1ECMMask 0x3 ++ ++#define kAal1ECMNull 0 ++#define kAal1ECMLossSensitive 1 ++#define kAal1ECMDelaySensitive 2 ++ ++ ++#define kAal1SDTBlockSizeId 0x8A ++ ++#define kAal1CellFillId 0x8B ++ ++/* ATM AAL34 and AAL5 parameters */ ++ ++#define kAalFwdMaxSDUSizeId 0x8C ++#define kAalBacMaxkSDUSizeId 0x81 ++ ++#define kAal34MidRangeId 0x82 ++ ++#define kAalSSCSTypeId 0x84 ++ ++#define kAalSSCSAssured 1 ++#define kAalSSCSNonAssured 2 ++#define kAalSSCSFrameRelay 4 ++ ++/* ATM AAL2 parameters */ ++ ++#define kAal2SSNone 0 ++#define kAal2SSSAR 1 ++#define kAal2SSTED 2 ++#define kAal2SSSARMask 3 ++#define kAal2SSType1 4 ++#define kAal2SSType3 5 ++ ++typedef struct { ++ uchar aalType; ++ union { ++ struct { ++ bitMap aal1Flags; ++ ulong cbrRate; ++ ushort blkSize; ++ uchar sarUsed; ++ } aal1Params; ++ struct { ++ ushort fwdMaxCpSize; /* Max "common part" packet size */ ++ ushort backMaxCpSize; ++ ushort cidLow; ++ ushort cidHigh; ++ ushort fwdMaxSsSize; /* Max "service specific" packet size */ ++ ushort backMaxSsSize; ++ uchar sscsType; ++ } aal2Params; ++ struct { ++ ushort fwdMaxSDUSize; ++ ushort backMaxSDUSize; ++ ushort midLow; ++ ushort midHigh; ++ uchar sscsType; ++ } aal34Params; ++ struct { ++ ushort fwdMaxSDUSize; ++ ushort backMaxSDUSize; ++ uchar sscsType; ++ } aal5Params; ++ } param; ++} atmAalParams; ++ ++/* ATM Traffic Descriptor types (as encoded at UNI) */ ++ ++#define kAtmTrafficIE 0x59 ++ ++#define kTrafficFwdPeakCellRateId0 0x82 ++#define kTrafficBackPeakCellRateId0 0x83 ++#define kTrafficFwdPeakCellRateId 0x84 ++#define kTrafficBackPeakCellRateId 0x85 ++ ++#define kTrafficFwdSustainCellRateId0 0x88 ++#define kTrafficBackSustainCellRateId0 0x89 ++#define kTrafficFwdSustainCellRateId 0x90 ++#define kTrafficBackSustainCellRateId 0x91 ++ ++#define kTrafficFwdMaxBurstSizeId0 0xA0 ++#define kTrafficBackMaxBurstSizeId0 0xA1 ++#define kTrafficFwdMaxBurstSizeId 0xB0 ++#define kTrafficBackMaxBurstSizeId 0xB1 ++ ++#define kTrafficBestEffortId 0xBE ++#define kTrafficMgrOptionsId 0xBF ++ ++#define kTrafficMaxTolerance 0x7FFFFFFF ++ ++/* trafficFlags coding */ ++ ++#define kTrafficTagFwd 1 ++#define kTrafficTagBack 2 ++#define kTrafficBestEffort 4 ++ ++typedef struct { ++ ulong tPCR0; /* CLP = 0, time between cells in us */ ++ ulong tPCR; /* CLP = 0+1 */ ++ ulong tolPCR; /* tolerance for PCR in us */ ++ ++ ulong tSCR0; /* CLP = 0 */ ++ ulong tSCR; /* CLP = 0+1 */ ++ ulong tolSCR; /* tolerance for SCR in us */ ++ ++ uchar atmServiceType; /* CBR, VBR, UBR, etc. */ ++ uchar trafficFlags; ++} atmTrafficParams; ++ ++/* ATM Broadband Bearer Capabilty (BBC) types (as encoded at UNI) */ ++ ++#define kAtmBBCIE 0x5E ++ ++#define kBBCClassShift 0 ++#define kBBCClassMask 0x1F ++ ++#define kBBCClassA 0x1 ++#define kBBCClassC 0x3 ++#define kBBCClassX 0x10 ++ ++ ++#define kBBCTrafficShift (kBBCClassShift + 5) ++#define kBBCTrafficMask 0x7 ++ ++#define kBBCTrafficNull 0 ++#define kBBCTrafficCBR 1 ++#define kBBCTrafficVBR 2 ++ ++ ++#define kBBCTimingShift (kBBCTrafficShift + 3) ++#define kBBCTimingMask 0x3 ++ ++#define kBBCTimingNull 0 ++#define kBBCTimingRequired 1 ++#define kBBCTimingNotRequired 2 ++ ++ ++#define kBBCClippingShift (kBBCTimingShift + 2) ++#define kBBCClippingMask 0x3 ++ ++#define kBBCNoClipping 0 ++#define kBBCClippingOk 1 ++ ++#define kBBCConnectionShift (kBBCClippingShift + 2) ++#define kBBCConnectionMask 0x3 ++ ++#define kBBCPoint2Point 0 ++#define kBBCPoint2MPoint 1 ++ ++/* ATM Broadband High/Low Layer Information (BHLI/BLLI) types (as encoded at UNI) */ ++ ++#define kAtmBHLIIE 0x5D ++#define kAtmBLLIIE 0x5F ++ ++/* ATM QoS types (as encoded at UNI) */ ++ ++#define kAtmQoSIE 0x5C ++ ++#define kQoSNull 0 ++#define kQoSClass1 1 ++#define kQoSClass2 2 ++#define kQoSClass3 3 ++#define kQoSClass4 4 ++#define kQoSReserved 0xFF ++ ++typedef struct { ++ uchar fwdQoSClass; ++ uchar backQoSClass; ++} atmQoSParams; ++ ++/* ATM MID definitions (ConfigureHandler) */ ++ ++#define kAtmMidEntireVc ((ulong) -1) ++ ++typedef struct { ++ void *pUserVc; /* VC id from the caller: has to be 1st !!! */ ++ ulong vci; ++ uchar defaultCLP; /* default CLP for tx packets on this VC */ ++ uchar framerId; ++ uchar protoId; ++ uchar protoRxBytesReserved; /* # bytes reserved by protocol in the beginning of Rx packet */ ++ uchar protoTxBytesReserved; /* # bytes reserved by protocol in the beginning of Tx packet */ ++ ++ atmAalParams aalParams; ++ atmTrafficParams rxTrafficParams; ++ atmTrafficParams txTrafficParams; ++ bitMap bbcFlags; ++ atmQoSParams qosParams; ++} atmVcParams; ++ ++/* ++** ++** ATM Out of Band (OOB) packet information ++** ++*/ ++ ++typedef struct { ++ Boolean clp; /* Cell Loss Prioroty */ ++ uchar aalType; ++ union { ++ struct { ++ uchar payloadType; ++ } aalRawParams; ++ struct { ++ uchar payloadType; ++ ushort mid; ++ } aal34Params; ++ struct { ++ uchar uui; /* Uses to user indicator */ ++ uchar cpi; /* common part indicator */ ++ } aal5Params; ++ } aalParam; ++} atmOobPacketInfo; ++ ++/* ++** ++** ATM setup bit definition ++** ++*/ ++ ++#define kAtmCorrectHecErrors 1 ++#define kCorrectHecErrors kAtmCorrectHecErrors ++#define kAtmPhyHeaderCompression 2 ++#define kAtmPhyNoDataScrambling 4 ++ ++#define kAtmTxIdleTimeoutMask 0x6 ++#define kAtmTxIdleNoTimeout 0 ++#define kAtmTxIdleTimeout10s 2 ++#define kAtmTxIdleTimeout30s 4 ++#define kAtmTxIdleTimeout60s 6 ++ ++/* ++** ++** ATM framer modes and protocol definitions ++** ++*/ ++ ++#define kAtmFramerNone 0 ++#define kAtmFramerISO 1 ++#define kAtmFramerIP 2 ++#define kAtmFramerEth 3 ++#define kAtmFramerEthWithCRC 4 ++ ++#define kAtmProtoNone 0 ++#define kAtmProtoEClip 1 ++#define kAtmProtoERouted1483 2 ++#define kAtmProtoPPP 3 ++ ++ ++/* ++** ++** ATM status codes ++** ++*/ ++ ++typedef void (*atmStatusHandler) (void *gDslVars, ulong statusCode, ...); ++ ++/* physical layer I.432 */ ++ ++#define kAtmStatRxHunt 1 ++#define kAtmStatRxPreSync 2 ++#define kAtmStatRxSync 3 ++#define kAtmStatRxPlOamCell 4 ++#define kAtmStatBertResult 5 ++#define kAtmStatHec 6 ++#define kAtmStatHdrCompr 7 ++#define kAtmStatCounters 8 ++ ++/* ATM layer */ ++ ++#define kAtmLayerStatFirst 100 ++#define kAtmStatRxDiscarded 100 ++#define kAtmStatTxDelayed 101 ++ ++#define kAtmStatVcCreated 102 ++#define kAtmStatVcStarted 103 ++#define kAtmStatVcStopped 104 ++#define kAtmStatVcDeleted 105 ++ ++#define kAtmStatTimeout 106 ++#define kAtmStatNoCellMemory 107 ++#define kAtmStatPrintCell 108 ++#define kAtmStatInvalidCell 109 ++#define kAtmStatUnassignedCell 110 ++#define kAtmStatOamF4SegmentCell 111 ++#define kAtmStatOamF4End2EndCell 112 ++#define kAtmStatOamI371Cell 113 ++#define kAtmStatOamF5SegmentCell 114 ++#define kAtmStatOamF5End2EndCell 115 ++#define kAtmStatReservedCell 116 ++ ++#define kAtmStatConnected 117 ++#define kAtmStatDisconnected 118 ++ ++#define kAtmStatRxPacket 119 ++#define kAtmStatTxPacket 120 ++ ++#define kAtmStatOamLoopback 121 ++ ++ ++typedef struct _atmPhyCounters { ++ ushort id; ++ ushort bertStatus; ++ ulong bertCellTotal; ++ ulong bertCellCnt; ++ ulong bertBitErrors; ++ ++ ulong rxHecCnt; ++ ulong rxCellTotal; ++ ulong rxCellData; ++ ulong rxCellDrop; ++} atmPhyCounters; ++ ++/* AAL layer */ ++ ++ ++ ++/* ++** ++** ATM log file definitions ++** ++*/ ++ ++/* ATM log file flags */ ++ ++#define kAtmLogFrameFlagMask 3 /* mask */ ++ ++#define kAtmLogFrameFlagNone 0 /* nothing */ ++#define kAtmLogFrameFlagNoData 1 /* no data only frame size */ ++#define kAtmLogFrameFlagBinData 2 /* data in binary form */ ++#define kAtmLogFrameFlagTextData 3 /* data in text form */ ++ ++#define kAtmLogSendFrameShift 0 ++#define kAtmLogSendFrameNoData (kAtmLogFrameFlagNoData << kAtmLogSendFrameShift) ++#define kAtmLogSendFrameBinData (kAtmLogFrameFlagBinData << kAtmLogSendFrameShift) ++#define kAtmLogSendFrameTextData (kAtmLogFrameFlagTextData << kAtmLogSendFrameShift) ++ ++#define kAtmLogRcvFrameShift 2 ++#define kAtmLogRcvFrameNone (kAtmLogFrameFlagNone << kAtmLogRcvFrameShift) ++#define kAtmLogRcvFrameNoData (kAtmLogFrameFlagNoData << kAtmLogRcvFrameShift) ++#define kAtmLogRcvFrameBinData (kAtmLogFrameFlagBinData << kAtmLogRcvFrameShift) ++#define kAtmLogRcvFrameTextData (kAtmLogFrameFlagTextData << kAtmLogRcvFrameShift) ++ ++#define kAtmLogSendCompleteFrameShift 4 ++#define kAtmLogSendCompleteFrameNone (kAtmLogFrameFlagNone << kAtmLogSendCompleteFrameShift) ++#define kAtmLogSendCompleteFrameNoData (kAtmLogFrameFlagNoData << kAtmLogSendCompleteFrameShift) ++ ++#define kAtmLogReturnFrameShift 6 ++#define kAtmLogReturnFrameNoData (kAtmLogFrameFlagNoData << kAtmLogReturnFrameShift) ++ ++#define kAtmLogCellFlag (1 << 8) ++ ++/* ATM log codes */ ++ ++#define kAtmLogSendFrame 1 ++#define kAtmLogRcvFrame 2 ++#define kAtmLogSendFrameComplete 3 ++#define kAtmLogReturnFrame 4 ++#define kAtmLogVcAllocate 5 ++#define kAtmLogVcFree 6 ++#define kAtmLogVcActivate 7 ++#define kAtmLogVcDeactivate 8 ++#define kAtmLogTimer 9 ++#define kAtmLogCell 10 ++#define kAtmLogVcConfigure 11 ++ ++#define kAtmLogRxCellHeader 12 ++#define kAtmLogRxCellData 13 ++#define kAtmLogTxCell 14 ++ ++#endif /* SoftAtmVcHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.gh +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.gh 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.gh 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,675 @@ ++/**************************************************************************** ++ * ++ * SoftDsl.gh ++ * ++ * Description: ++ * This is a header file which defines the type for the DSL ++ * global variable structure. ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.72 $ ++ * ++ * $Id: SoftDsl.gh,v 1.72 2004/04/30 23:05:19 kdu Exp $ ++ * ++ * $Log: SoftDsl.gh,v $ ++ * Revision 1.72 2004/04/30 23:05:19 kdu ++ * Fixed interop issues in TDC lab for TMM. ++ * ++ * Revision 1.70 2004/04/10 23:30:48 ilyas ++ * Defined gloval structure for slow (SDRAM) data ++ * ++ * Revision 1.69 2004/04/02 18:33:45 gsyu ++ * Share MuxFramer buffers with scratch memory ++ * ++ * Revision 1.68 2004/02/04 20:12:38 linyin ++ * Support adsl2plus ++ * ++ * Revision 1.67 2004/02/03 19:10:37 gsyu ++ * Added separated carrierInfo structures for G992P5 ++ * ++ * Revision 1.66 2004/01/26 04:21:06 yongbing ++ * Merge changes in ADSL2 branch into Annex A branch ++ * ++ * Revision 1.65 2004/01/13 19:12:07 gsyu ++ * Added two more variables for Double upstream ++ * ++ * Revision 1.64 2003/12/04 02:10:37 linyin ++ * Add a variable for FbmsOL mode ++ * ++ * Revision 1.63 2003/11/20 00:57:50 yongbing ++ * Merge ADSL2 functionalities into Annex A branch ++ * ++ * Revision 1.62 2003/11/05 01:59:12 liang ++ * Add vendor ID code for Infineon. ++ * ++ * Revision 1.61 2003/08/12 22:59:41 khp ++ * - for Haixiang: added support for ADSL_MARGIN_TWEAK_TEST ++ * ++ * Revision 1.60 2003/08/01 00:08:19 liang ++ * Added firmware ID for Samsung ADI 930 DSLAM. ++ * ++ * Revision 1.59 2003/07/14 14:40:08 khp ++ * - AnnexB: added bad SNR2 retrain counter to connectin setup ++ * ++ * Revision 1.58 2003/06/25 02:40:22 liang ++ * Added firmware ID for Annex A UE9000 ADI918 (from Aliant, Canada). ++ * ++ * Revision 1.57 2003/06/25 00:00:40 ilyas ++ * -added firmware IDs for TI 4000C and AC5 (Annex B) ++ * ++ * Revision 1.56 2003/05/31 01:50:38 khp ++ * -add firmware IDs for ECI16 and ECI16A ++ * ++ * Revision 1.55 2003/03/27 19:30:52 liang ++ * Add and initialize new connectionSetup field coVendorFirmwareID under module ADSL_IDENTIFY_VENDOR_FIRMWARE. ++ * ++ * Revision 1.54 2002/12/13 18:35:48 yongbing ++ * Add support for G.992.2 Annex C in start up ++ * ++ * Revision 1.53 2002/12/06 02:06:33 liang ++ * Moved the T1.413 RAck1/RAck2 switching variables to connection setup structure. ++ * ++ * Revision 1.52 2002/11/26 02:49:46 liang ++ * Added variable codingGainDecrement to the connectionSetup structure to solve the C-Rates-RA option failure problem. ++ * ++ * Revision 1.51 2002/10/20 18:56:16 khp ++ * - for linyin: ++ * - #ifdef NEC_NSIF_WORKAROUND: ++ * - add status and fail counter for NSIF ++ * ++ * Revision 1.50 2002/09/28 02:36:50 yongbing ++ * Add retrain in T1.413 with R-Ack1 tone ++ * ++ * Revision 1.49 2002/09/12 21:07:19 ilyas ++ * Added HEC, OCD and LCD counters ++ * ++ * Revision 1.48 2002/07/19 01:51:35 liang ++ * Added vendor ID constant for Alcatel. ++ * ++ * Revision 1.47 2002/06/27 21:51:08 liang ++ * Added xmt and rcv tone selection bitmap in connection setup. ++ * ++ * Revision 1.46 2002/06/11 20:48:06 liang ++ * Added CO vendor ID field to connectionSetup structure. ++ * ++ * Revision 1.45 2002/06/06 03:05:43 khp ++ * -use boolean in connectup setup instead of localCapabilities.features to indicate FBM mode ++ * ++ * Revision 1.44 2002/03/22 19:38:58 yongbing ++ * Modify for co-exist of G994P1 and T1P413 ++ * ++ * Revision 1.43 2002/03/02 00:52:40 ilyas ++ * AnnexC delay needs to be long for prototype ++ * ++ * Revision 1.42 2002/01/19 23:59:17 ilyas ++ * Added support for LOG and eye data to ADSL core target ++ * ++ * Revision 1.41 2002/01/16 19:03:59 ilyas ++ * Added HOST_ONLY ifdefs around ADSL core data ++ * ++ * Revision 1.40 2002/01/14 17:41:04 liang ++ * Move xmt & rcv sample buffers to top level. ++ * ++ * Revision 1.39 2001/12/21 22:45:34 ilyas ++ * Added support for ADSL MIB data object ++ * ++ * Revision 1.38 2001/12/13 02:24:22 ilyas ++ * Added G997 (Clear EOC and G997 framer) support ++ * ++ * Revision 1.37 2001/11/30 05:56:31 liang ++ * Merged top of the branch AnnexBDevelopment onto top of the tree. ++ * ++ * Revision 1.36 2001/10/19 00:12:07 ilyas ++ * Added support for frame oriented (no ATM) data link layer ++ * ++ * Revision 1.29.2.5 2001/10/03 01:44:00 liang ++ * Merged with codes from main tree (tag SoftDsl_2_18). ++ * ++ * Revision 1.29.2.4 2001/08/18 00:00:36 georgep ++ * Add variable to store annexC pathDelay ++ * ++ * Revision 1.29.2.3 2001/08/08 17:33:27 yongbing ++ * Merge with tag SoftDsl_2_17 ++ * ++ * Revision 1.35 2001/08/29 02:56:01 ilyas ++ * Added tests for flattening/unflatenning command and statuses (dual mode) ++ * ++ * Revision 1.34 2001/08/28 03:26:32 ilyas ++ * Added support for running host and adsl core parts separately ("dual" mode) ++ * ++ * Revision 1.33 2001/06/18 19:49:36 ilyas ++ * Changes to include support for HOST_ONLY mode ++ * ++ * Revision 1.32 2001/05/18 21:21:44 liang ++ * Save the current number of rcv samples to line handler for QProc test. ++ * ++ * Revision 1.31 2001/04/25 01:20:11 ilyas ++ * ++ * Don't use DSL frame functions if ATM_LAYER is not defined ++ * ++ * Revision 1.30 2001/03/25 06:11:20 liang ++ * Combined separate loop attenuation status for ATUR & ATUC into one status. ++ * Replace separate hardware AGC info status for ATUR & ATUC into hardware AGC ++ * request status and hardware AGC obtained status. ++ * Use store AGC command to save hardware AGC value instead of returning value ++ * from status report. ++ * ++ * Revision 1.29 2001/03/17 03:00:46 georgep ++ * Added agcInfo to connectionSetupStruct ++ * ++ * Revision 1.28 2001/02/10 03:03:09 ilyas ++ * Added one more DslFrame function ++ * ++ * Revision 1.27 2000/08/31 19:04:24 liang ++ * Added scratch buffer structure definition. ++ * ++ * Revision 1.26 2000/07/23 20:52:52 ilyas ++ * Added xxxFrameBufSetAddress() function for ATM framer layers ++ * Rearranged linkLayer functions in one structure which is passed as a ++ * parameter to xxxLinkLayerInit() function to be set there ++ * ++ * Revision 1.25 2000/07/18 21:42:25 ilyas ++ * Fixed compiler warning about pointer casting ++ * ++ * Revision 1.24 2000/07/18 21:18:45 ilyas ++ * Added GLOBAL_PTR_BIAS feature to utilize full 64K MIPS relative addressing space ++ * ++ * Revision 1.23 2000/07/18 20:03:24 ilyas ++ * Changed DslFrame functions definitions to macros, ++ * Removed gDslVars from their parameter list ++ * ++ * Revision 1.22 2000/07/17 21:08:15 lkaplan ++ * removed global pointer ++ * ++ * Revision 1.21 2000/05/09 23:00:26 ilyas ++ * Added ATM status messages, ATM timer, Tx frames flush on timeout ++ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames ++ * ++ * Revision 1.20 2000/05/03 03:57:04 ilyas ++ * Added LOG file support for writing ATM data ++ * ++ * Revision 1.19 2000/04/19 00:31:47 ilyas ++ * Added global SoftDsl functions for Vc, added OOB info functions ++ * ++ * Revision 1.18 2000/04/13 08:36:22 yura ++ * Added SoftDslSetRefData, SoftDslGetRefData functions ++ * ++ * Revision 1.17 2000/04/13 05:38:54 georgep ++ * Added T1p413 "Activation and Acknowledgement" which can substitute G994P1 ++ * ++ * Revision 1.16 2000/04/05 22:30:42 liang ++ * Changed function & constant names from G992p2 to G992 for the Main module. ++ * ++ * Revision 1.15 2000/04/04 04:16:06 liang ++ * Merged with SoftDsl_0_03 from old tree. ++ * ++ * Revision 1.15 2000/04/04 01:47:21 ilyas ++ * Implemented abstract dslFrame and dslFrameBuffer objects ++ * ++ * Revision 1.14 2000/04/01 02:53:33 georgep ++ * Added pointer to G992p2Profile inside connectionSetup ++ * ++ * Revision 1.13 2000/03/18 01:27:56 georgep ++ * Changed connectionSetup to include G992p1 Capabilities ++ * ++ * Revision 1.12 2000/02/29 01:39:05 georgep ++ * put variable haveRemoteCapabilities inside connectionSetupStruct ++ * ++ * Revision 1.11 2000/02/08 00:44:36 liang ++ * Fix the gDslVars definition for Irix environment. ++ * ++ * Revision 1.10 1999/11/19 00:59:29 george ++ * Define physicalLayerVars as a union ++ * ++ * Revision 1.9 1999/11/11 19:19:42 george ++ * Porting to 16Bit Compiler ++ * ++ * Revision 1.8 1999/11/09 20:26:17 george ++ * Added G992P2_PROFILE to modules list ++ * ++ * Revision 1.7 1999/10/27 23:01:54 wan ++ * Add G.994.1 setup in dslConnectionSetupStruct for setting up Initiation side ++ * ++ * Revision 1.6 1999/08/12 21:16:27 george ++ * Move profileVars definition to G992p2/G992p2Profile.gh ++ * ++ * Revision 1.5 1999/08/10 18:20:43 george ++ * Define fastRetrainVars ++ * ++ * Revision 1.4 1999/07/16 02:03:02 liang ++ * Added Tx & Rx data handler function pointers. ++ * ++ * Revision 1.3 1999/07/03 01:40:15 liang ++ * Redefined dsl command parameter list and added connection setup struct. ++ * ++ * Revision 1.2 1999/02/10 01:56:37 liang ++ * Added hooks for G994.1 and G992.2. ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef SoftDslGlobals ++#define SoftDslGlobals ++ ++#include "SoftDsl.h" ++ ++#ifdef G992P2_PROFILE ++#include "G992p2Profile.gh" ++#endif ++ ++typedef enum ++ { ++ kVendorUnknown = 0, ++ kVendorBroadcom, ++ kVendorGlobespan, ++ kVendorADI, ++ kVendorTI, ++ kVendorCentillium, ++ kVendorAlcatel, ++ kVendorInfineon ++ } VendorIDType; ++ ++#define kDslVendorFirwareUnknown 0 ++typedef enum ++ { ++ kVendorADI_Anaconda = 1, ++ kVendorADI_ECI918, ++ kVendorADI_ECI930, ++ kVendorADI_Cisco, ++ kVendorADI_UE9000_918, ++ kVendorADI_Samsung_930, ++ kVendorTI_4000C_ERICSSON_350, ++ kVendorTI_4000C_SEIMENS, ++ kVendorADI_ECI16_AnnexB = 50, /* leave space for more Annex A types */ ++ kVendorADI_ECI16A_AnnexB, ++ kVendorTI_4000C_AnnexB, ++ kVendorTI_AC5_AnnexB ++ } VendorFirmwareIDType; ++ ++#define kDslXmtToneSelectionStartTone 0 ++#ifdef G992P1_ANNEX_B ++#define kDslXmtToneSelectionEndTone 63 ++#else ++#define kDslXmtToneSelectionEndTone 31 ++#endif ++#define kDslXmtToneSelectionNumOfTones (kDslXmtToneSelectionEndTone-kDslXmtToneSelectionStartTone+1) ++#define kDslXmtToneSelectionNumOfBytes ((kDslXmtToneSelectionNumOfTones+7)/8) ++#define kDslRcvToneSelectionStartTone 32 ++#define kDslRcvToneSelectionEndTone 255 ++#define kDslRcvToneSelectionNumOfTones (kDslRcvToneSelectionEndTone-kDslRcvToneSelectionStartTone+1) ++#define kDslRcvToneSelectionNumOfBytes ((kDslRcvToneSelectionNumOfTones+7)/8) ++ ++#define kDslT1p413RAckModeTryRAck1 0x01 ++#define kDslT1p413RAckModeTryRAck2 0x02 ++#define kDslT1p413RAckModeTrialMask 0x0F ++#define kDslT1p413RAckModeSelected 0x10 ++#define kDslT1p413RAckModeTrialCount 10 /* when in trial mode */ ++#define kDslT1p413RAckModeSwitchCount 20 /* when mode is selected */ ++ ++#ifdef ADSL_MARGIN_TWEAK_TEST ++#define kDslMarginTweakNumOfTones 256 ++#endif ++ ++typedef struct ++ { ++ Boolean haveRemoteCapabilities; ++ dslModulationType selectedModulation; ++ dslModulationType startupModulation; ++#if defined(G992P1_ANNEX_I) || defined(G992P5) ++ ushort downstreamMinCarr, downstreamMaxCarr; ++#else ++ uchar downstreamMinCarr, downstreamMaxCarr; ++#endif ++ uchar upstreamMinCarr, upstreamMaxCarr; ++#if defined(DOUBLE_UP_STREAM) ++ Boolean isDoubleUsEnabled; ++ short selectedPilotTone; ++#endif ++ dslDataPumpCapabilities localCapabilities, remoteCapabilities; ++#ifdef G992P3 ++ g992p3DataPumpCapabilities localCarrierInfoG992p3AnnexA; ++ g992p3DataPumpCapabilities remoteCarrierInfoG992p3AnnexA; ++ g992p3DataPumpCapabilities selectedCarrierInfoG992p3AnnexA; ++ uchar xmtG992p3State; ++#ifdef G992P5 ++ g992p3DataPumpCapabilities localCarrierInfoG992p5AnnexA; ++ g992p3DataPumpCapabilities remoteCarrierInfoG992p5AnnexA; ++ g992p3DataPumpCapabilities selectedCarrierInfoG992p5AnnexA; ++#endif /* G992P5 */ ++#endif /* G992P3 */ ++ uchar handshakingDuplexMode; ++ Boolean handshakingClientInitiation; ++ short handshakingXmtPowerLevel; ++ uchar handshakingXmtCarrierSet; ++ short hwAgcQ4dB; /* for loop attenuation calculation */ ++ uchar coVendorID; ++#ifdef ADSL_IDENTIFY_VENDOR_FIRMWARE ++ uchar coVendorFirmwareID; ++#endif ++ uchar codingGainDecrement; /* coding gain decrement in Q4dB for initial rate calculation */ ++ uchar xmtToneSelection[kDslXmtToneSelectionNumOfBytes]; ++ uchar rcvToneSelection[kDslRcvToneSelectionNumOfBytes]; ++#ifdef G992_ANNEXC ++ Boolean isFbmMode; ++ Boolean isFbmsOLMode; ++ long xmtToRcvPathDelay; ++#endif ++#if defined(T1P413) && defined(XMT_RACT2_FOR_ADI_COMPATIBILITY) ++ uchar t1p413RAckModeUsed; ++ uchar t1p413RAckModeCounter; ++#endif ++#ifdef G992P1_ANNEX_B ++ uchar badSNR2RetrainCounter; ++#endif ++#ifdef ADSL_MARGIN_TWEAK_TEST ++ short marginTweakExtraPowerQ4dB; ++ char marginTweakTableQ4dB[kDslMarginTweakNumOfTones]; ++#endif ++#ifdef G992P2_PROFILE ++ G992p2ProfileVarsStruct* profileVarsPtr; ++#endif ++#ifdef TDC_IOP_FIX_SEIMENS_TI ++ char t1p413RetrainCounter; /* 0: no retrain needed; 1: force to T1.413 mode and retrain after R-MSG1; 2: 2nd T1.413 session, go to showtime */ ++#endif ++#ifdef ANSI_CACT12_PING_PONG ++ char t1p413SkipToneIndex; /* to alternate between CAct1 and CAct2 detection */ ++#endif ++ } dslConnectionSetupStruct; ++ ++#ifdef ADSL_FRAMER ++#include "MuxFramer.gh" ++#endif ++ ++#ifdef ATM ++#include "SoftAtm.gh" ++#endif ++ ++#ifdef DSL_PACKET ++#include "DslPacket.gh" ++#endif ++ ++#ifdef G997_1_FRAMER ++#include "G997.gh" ++#ifdef G992P3 ++#include "G992p3OvhMsg.gh" ++#endif ++#endif ++ ++#ifdef ADSL_MIB ++#include "AdslMib.gh" ++#endif ++ ++#ifndef HOST_ONLY ++#ifdef T1P413 ++#include "T1p413Main.gh" ++#endif ++ ++#ifdef G994P1 ++#include "G994p1Main.gh" ++#endif ++ ++#ifdef G992 ++#include "G992Main.gh" ++#endif ++ ++#include "SoftDslSampleBuffers.gh" ++#endif ++ ++typedef struct __dslSlowVarsStruct ++ { ++ int tmp; ++ } ++ dslSlowVarsStruct; ++ ++typedef struct __dslVarsStruct ++ { ++ bitMap setup; ++ eyeHandlerType eyeHandlerPtr; ++ logHandlerType logHandlerPtr; ++ dslDriverCallbackType driverCallback; ++ ++ rcvHandlerType rcvHandlerPtr; ++ xmtHandlerType xmtHandlerPtr; ++ ++#ifndef ADSLCORE_ONLY ++ dslCommandHandlerType adslCoreCommandHandlerPtr; ++#endif ++ dslCommandHandlerType dataPumpCommandHandlerPtr; ++ ++ dslStatusHandlerType internalStatusHandlerPtr; ++ dslStatusHandlerType externalStatusHandlerPtr; ++#ifndef ADSLCORE_ONLY ++ dslStatusHandlerType externalLinkLayerStatusHandlerPtr; ++#endif ++ ++ dslDirectionType direction; ++ dslConnectionSetupStruct connectionSetup; ++ ++#ifdef NEC_NSIF_WORKAROUND ++ uchar G994NsStatus; ++ uchar G994NsFailCounter; ++#endif ++ ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ ++ linkLayerFunctions LinkLayerFunctions; ++ dslSlowVarsStruct *dslSlowVars; ++ ++#ifdef DSL_FRAME_FUNCTIONS ++ dslFrameFunctions DslFrameFunctions; ++#endif ++ ulong refData; ++ ulong execTime; ++ int currRcvNSamps; ++ ++#ifndef HOST_ONLY ++ DslSampleBuffersStruct sampleBuffersVars; ++ ++#ifdef G992P2_PROFILE ++ G992p2ProfileVarsStruct G992p2ProfileVars; ++#endif ++ ++#ifdef ADSL_FRAMER ++ muxFramerVarsStruct muxFramerVars; ++#endif ++#endif /* HOST_ONLY */ ++ ++#ifdef DSL_LINKLAYER ++ union ++ { ++#ifdef ATM ++ atmVarsStruct atmVars; ++#endif ++#ifdef DSL_PACKET ++ dslPacketVarsStruct dslPacketVars; ++#endif ++ } linkLayerVars; ++#endif ++ ++#ifdef G997_1_FRAMER ++ g997VarsStruct G997Vars; ++#ifdef G992P3 ++ g992p3OvhMsgVarsStruct G992p3OvhMsgVars; ++#endif ++#endif ++ ++#ifdef ADSL_MIB ++ adslMibVarsStruct adslMibVars; ++#endif ++ ++#ifndef HOST_ONLY ++ union ++ { ++#ifdef T1P413 ++ T1p413VarsStruct T1p413Vars; ++#endif ++#ifdef G994P1 ++ G994p1VarsStruct G994p1Vars; ++#endif ++#ifdef G992 ++ G992VarsStruct G992Vars; ++#endif ++ } physicalLayerVars; ++ union ++ { ++#ifdef G992 ++ G992ScratchVarsStruct G992ScratchVars; ++#endif ++#if defined(ADSL_FRAMER) && defined(SHARE_MUX_FRAMER_VARS) ++ muxFramerSharedVarsStruct muxFramerSharedVars; ++#endif ++ } scratchVars; ++#endif /* HOST_ONLY */ ++ ++ } ++ dslVarsStruct; ++ ++#ifndef GLOBAL_PTR_BIAS ++#define gDslGlobalVarPtr ((struct __dslVarsStruct *)gDslVars) ++#define gDslGlobalSlowVarPtr (gDslGlobalVarPtr->dslSlowVars) ++#else ++#define gDslGlobalVarPtr ((struct __dslVarsStruct *) (void*)((uchar*)(gDslVars) - GLOBAL_PTR_BIAS)) ++#define gDslGlobalSlowVarPtr ((struct __dslSlowVarsStruct *) (void*)((uchar*)(gDslGlobalVarPtr->dslSlowVars) - GLOBAL_PTR_BIAS)) ++#endif ++ ++#define gDslSampleBuffersVars (gDslGlobalVarPtr->sampleBuffersVars) ++ ++#define gDslMuxFramerVars (gDslGlobalVarPtr->muxFramerVars) ++#define gDslMuxFramerSharedVars (gDslGlobalVarPtr->scratchVars.muxFramerSharedVars) ++#define gDslLinkLayerVars (gDslGlobalVarPtr->linkLayerVars) ++#define gDslAtmVars (gDslGlobalVarPtr->linkLayerVars.atmVars) ++#define gDslPacketVars (gDslGlobalVarPtr->linkLayerVars.dslPacketVars) ++#define gG997Vars (gDslGlobalVarPtr->G997Vars) ++ ++#ifdef G992P3 ++#define gG992p3OvhMsgVars (gDslGlobalVarPtr->G992p3OvhMsgVars) ++#endif ++ ++#define gAdslMibVars (gDslGlobalVarPtr->adslMibVars) ++ ++#define gT1p413Vars (gDslGlobalVarPtr->physicalLayerVars.T1p413Vars) ++#define gG994p1Vars (gDslGlobalVarPtr->physicalLayerVars.G994p1Vars) ++#define gG992Vars (gDslGlobalVarPtr->physicalLayerVars.G992Vars) ++#define gG992p2ProfileVars (gDslGlobalVarPtr->G992p2ProfileVars) ++ ++#define gG992ScratchVars (gDslGlobalVarPtr->scratchVars.G992ScratchVars) ++ ++#ifndef gEyeHandlerPtr ++#define gEyeHandlerPtr (gDslGlobalVarPtr->eyeHandlerPtr) ++#endif ++ ++#ifndef gLogHandlerPtr ++#define gLogHandlerPtr (gDslGlobalVarPtr->logHandlerPtr) ++#endif ++ ++#ifdef VP_SIMULATOR ++#define gDriverCallback(x) (gDslGlobalVarPtr->driverCallback)(x) ++#else ++#define gDriverCallback(x) ++#endif ++ ++/* ++** ++** Frame functions callouts ++** ++*/ ++ ++#define gDslFrameFunc (gDslGlobalVarPtr->DslFrameFunctions) ++ ++#define DslFrameBufferGetLength(gDslVars, fb) \ ++ gDslFrameFunc.__DslFrameBufferGetLength(fb) ++ ++#define DslFrameBufferGetAddress(gDslVars, fb) \ ++ gDslFrameFunc.__DslFrameBufferGetAddress(fb) ++ ++#define DslFrameBufferSetLength(gDslVars, fb, l) \ ++ gDslFrameFunc.__DslFrameBufferSetLength(fb, l) ++ ++#define DslFrameBufferSetAddress(gDslVars, fb, p) \ ++ gDslFrameFunc.__DslFrameBufferSetAddress(fb, p) ++ ++#define DslFrameInit(gDslVars, f) \ ++ gDslFrameFunc.__DslFrameInit(f) ++ ++#define DslFrameGetLength(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameGetLength(pFrame) ++ ++#define DslFrameGetBufCnt(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameGetBufCnt(pFrame) ++ ++#define DslFrameGetFirstBuffer(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameGetFirstBuffer(pFrame) ++ ++#define DslFrameGetNextBuffer(gDslVars, pFrBuffer) \ ++ gDslFrameFunc.__DslFrameGetNextBuffer(pFrBuffer) ++ ++#define DslFrameSetNextBuffer(gDslVars, pFrBuf, pFrBufNext) \ ++ gDslFrameFunc.__DslFrameSetNextBuffer(pFrBuf, pFrBufNext) ++ ++#define DslFrameGetLastBuffer(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameGetLastBuffer(pFrame) ++ ++#define DslFrameGetLinkFieldAddress(gDslVars, f) \ ++ gDslFrameFunc.__DslFrameGetLinkFieldAddress(f) ++ ++#define DslFrameGetFrameAddressFromLink(gDslVars, lnk) \ ++ gDslFrameFunc.__DslFrameGetFrameAddressFromLink(lnk) ++ ++ ++#define DslFrameGetOobInfo(gDslVars, f, pOobInfo) \ ++ gDslFrameFunc.__DslFrameGetOobInfo(f, pOobInfo) ++ ++#define DslFrameSetOobInfo(gDslVars, f, pOobInfo) \ ++ gDslFrameFunc.__DslFrameSetOobInfo(f, pOobInfo) ++ ++ ++#define DslFrameEnqueBufferAtBack(gDslVars, f, b) \ ++ gDslFrameFunc.__DslFrameEnqueBufferAtBack(f, b) ++ ++#define DslFrameEnqueFrameAtBack(gDslVars, fMain, f) \ ++ gDslFrameFunc.__DslFrameEnqueFrameAtBack(fMain, f) ++ ++#define DslFrameEnqueBufferAtFront(gDslVars, f, b) \ ++ gDslFrameFunc.__DslFrameEnqueBufferAtFront(f, b) ++ ++#define DslFrameEnqueFrameAtFront(gDslVars, fMain, f) \ ++ gDslFrameFunc.__DslFrameEnqueFrameAtFront(fMain, f) ++ ++#define DslFrameDequeBuffer(gDslVars, pFrame) \ ++ gDslFrameFunc.__DslFrameDequeBuffer(pFrame) ++ ++#define DslFrameAllocMemForFrames(gDslVars, frameNum) \ ++ gDslFrameFunc.__DslFrameAllocMemForFrames(frameNum) ++ ++#define DslFrameFreeMemForFrames(gDslVars, hMem) \ ++ gDslFrameFunc.__DslFrameFreeMemForFrames(hMem) ++ ++#define DslFrameAllocFrame(gDslVars, handle) \ ++ gDslFrameFunc.__DslFrameAllocFrame(handle) ++ ++#define DslFrameFreeFrame(gDslVars, handle, pFrame) \ ++ gDslFrameFunc.__DslFrameFreeFrame(handle, pFrame) ++ ++#define DslFrameAllocMemForBuffers(gDslVars, ppMemPool, bufNum, memSize) \ ++ gDslFrameFunc.__DslFrameAllocMemForBuffers(ppMemPool, bufNum, memSize) ++ ++#define DslFrameFreeMemForBuffers(gDslVars, hMem, memSize, pMemPool) \ ++ gDslFrameFunc.__DslFrameFreeMemForBuffers(hMem, memSize, pMemPool) ++ ++#define DslFrameAllocBuffer(gDslVars, handle, pMem, length) \ ++ gDslFrameFunc.__DslFrameAllocBuffer(handle, pMem, length) ++ ++#define DslFrameFreeBuffer(gDslVars, handle, pBuf) \ ++ gDslFrameFunc.__DslFrameFreeBuffer(handle, pBuf) ++ ++#define DslFrame2Id(gDslVars, handle, pFrame) \ ++ gDslFrameFunc.__DslFrame2Id(handle, pFrame) ++ ++#define DslFrameId2Frame(gDslVars, handle, frameId) \ ++ gDslFrameFunc.__DslFrameId2Frame (handle, frameId) ++ ++ ++#endif /* SoftDslGlobals */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,2920 @@ ++/**************************************************************************** ++ * ++ * SoftDsl.h ++ * ++ * ++ * Description: ++ * This file contains the exported interface for SoftDsl.c ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.275 $ ++ * ++ * $Id: SoftDsl.h,v 1.275 2005/04/28 22:55:36 ilyas Exp $ ++ * ++ * $Log: SoftDsl.h,v $ ++ * Revision 1.275 2005/04/28 22:55:36 ilyas ++ * Cleaned up kDslG992RunAnnexaP3ModeInAnnexaP5, kG992EnableAnnexM and kDslAtuChangeTxFilterRequest definitions ++ * ++ * Revision 1.274 2005/04/27 20:57:32 yongbing ++ * Implement 32 frequency break points for TSSI, PR 30211 ++ * ++ * Revision 1.273 2005/04/02 03:27:52 kdu ++ * PR30236: Define kDslEnableRoundUpDSLoopAttn, this is shared with kDslCentilliumCRCWorkAroundEnabled. ++ * ++ * Revision 1.272 2005/04/01 21:56:39 ilyas ++ * Added more test commands definitions ++ * ++ * Revision 1.271 2005/02/11 05:03:57 ilyas ++ * Added support for DslOs ++ * ++ * Revision 1.270 2005/02/11 03:33:22 lke ++ * Support 2X, 4X, and 8X spectrum in ANNEX_I DS ++ * ++ * Revision 1.269 2005/01/08 00:11:58 ilyas ++ * Added definition for AnnexL status ++ * ++ * Revision 1.268 2004/12/18 00:52:35 mprahlad ++ * Add Dig US Pwr cutback status ++ * ++ * Revision 1.267 2004/11/08 22:21:38 ytan ++ * init swap state after retrain ++ * ++ * Revision 1.266 2004/11/05 21:16:50 ilyas ++ * Added support for pwmSyncClock ++ * ++ * Revision 1.265 2004/10/28 20:05:17 gsyu ++ * Fixed compilation errors for simulation targets ++ * ++ * Revision 1.264 2004/10/23 00:16:35 nino ++ * Added kDslHardwareSetRcvAGC status to set absolute rcv agc gain. ++ * ++ * Revision 1.263 2004/10/22 21:21:06 ilyas ++ * Fixed bit definition overlap in demodCapabilities ++ * ++ * Revision 1.262 2004/10/20 00:43:20 gsyu ++ * Added constants to support new xmt sample buffer control scheme ++ * ++ * Revision 1.261 2004/10/12 01:09:28 nino ++ * Remove kDslHardwareEnablePwmSyncClk and kDslHardwareSetPwmSyncClkFreq ++ * status definitions. Add kDslEnablePwmSyncClk and kDslSetPwmSyncClkFreq ++ * command definitions. ++ * ++ * Revision 1.260 2004/10/11 20:21:26 nino ++ * Added kDslHardwareEnablePwmSyncClk and kDslHardwareSetPwmSynClkFreq hardware statuses. ++ * ++ * Revision 1.259 2004/10/07 19:17:29 nino ++ * Added kDslHardwareGetRcvAGC status. ++ * ++ * Revision 1.258 2004/10/02 00:17:14 nino ++ * Added kDslHardwareAGCSetPga2 and kDslSetPilotEyeDisplay status definitions. ++ * ++ * Revision 1.257 2004/08/27 01:00:30 mprahlad ++ * ++ * Keep kDslAtuChangeTxFilterRequest defined by default so ADSL1 only targets can ++ * build ++ * ++ * Revision 1.256 2004/08/20 19:00:34 ilyas ++ * Added power management code for 2+ ++ * ++ * Revision 1.255 2004/08/17 23:18:25 kdu ++ * Merged interop changes for TDC lab from a023e9. ++ * ++ * Revision 1.254 2004/07/22 00:56:03 yongbing ++ * Add ADSL2 Annex B modulation definition ++ * ++ * Revision 1.253 2004/07/16 22:23:28 nino ++ * - Defined macros to extract subcarrier and supported set information ++ * for tssi. Subcarrier and suported set indicator is packed into ++ * dsSubcarrier index array. ++ * ++ * Revision 1.252 2004/07/01 00:11:22 nino ++ * Added preliminary code for debugDataHandler (inside of #if DEBUG_DATA_HANDLER). ++ * ++ * Revision 1.251 2004/06/24 03:08:39 ilyas ++ * Added GFC mapping control for ATM bonding ++ * ++ * Revision 1.250 2004/06/23 00:03:20 khp ++ * - shorten self test result register length to 1 (satisfied requirement ++ * at DT, no known requirement anywhere else) ++ * ++ * Revision 1.249 2004/06/15 20:18:33 ilyas ++ * Made D uchar again for compatibility with older ADSl drivers that use this structure. ADSL driver will rely on G992p3 parameters for large D ++ * ++ * Revision 1.248 2004/06/12 00:26:03 gsyu ++ * Added constants for AnnexM ++ * ++ * Revision 1.247 2004/06/10 18:53:24 yjchen ++ * add large D support ++ * ++ * Revision 1.246 2004/06/04 01:55:00 linyin ++ * Add a constant for SRA enable/disable ++ * ++ * Revision 1.245 2004/05/19 23:22:23 linyin ++ * Support L2 ++ * ++ * Revision 1.244 2004/05/15 03:04:58 ilyas ++ * Added L3 test definition ++ * ++ * Revision 1.243 2004/05/14 03:04:38 ilyas ++ * Fixed structure name typo ++ * ++ * Revision 1.242 2004/05/14 02:01:01 ilyas ++ * Fixed structure name typo ++ * ++ * Revision 1.241 2004/05/14 01:21:49 nino ++ * Added kDslSignalAttenuation, kDslAttainableNetDataRate kDslHLinScale constant definitions. ++ * ++ * Revision 1.240 2004/05/13 19:07:58 ilyas ++ * Added new statuses for ADSL2 ++ * ++ * Revision 1.239 2004/05/01 01:09:51 ilyas ++ * Added power management command and statuses ++ * ++ * Revision 1.238 2004/04/23 22:50:38 ilyas ++ * Implemented double buffering to ensure G.997 HDLC frame (OvhMsg) is continuous ++ * ++ * Revision 1.237 2004/03/31 18:57:39 ilyas ++ * Added drop on data error capability control ++ * ++ * Revision 1.236 2004/03/30 03:11:30 ilyas ++ * Added #ifdef for CFE build ++ * ++ * Revision 1.235 2004/03/29 23:06:39 ilyas ++ * Added status for BG table update ++ * ++ * Revision 1.234 2004/03/17 02:49:49 ilyas ++ * Turn off ATM bit reversal for Alcatel DSLAM only ++ * ++ * Revision 1.233 2004/03/11 03:09:48 mprahlad ++ * Add test mode for afeloopback test ++ * ++ * Revision 1.232 2004/03/10 23:15:53 ilyas ++ * Added ETSI modem support ++ * ++ * Revision 1.231 2004/03/04 19:28:14 linyin ++ * Support adsl2plus ++ * ++ * Revision 1.230 2004/02/28 00:06:21 ilyas ++ * Added OLR message definitions for ADSL2+ ++ * ++ * Revision 1.229 2004/02/13 03:21:15 mprahlad ++ * define kDslAturHwAgcMaxGain correctly for 6348 ++ * ++ * Revision 1.228 2004/02/09 05:06:17 yongbing ++ * Add ADSL2 bit swap function ++ * ++ * Revision 1.227 2004/02/04 02:08:19 linyin ++ * remove the redefined kG992p5AnnexA ++ * ++ * Revision 1.226 2004/02/04 01:41:48 linyin ++ * Add some variables for G992P5 ++ * ++ * Revision 1.225 2004/02/03 19:12:22 gsyu ++ * Added a dedicate structure and constants for G992P5 ++ * ++ * Revision 1.224 2004/01/24 01:18:34 ytan ++ * add multi-section swapping flag ++ * ++ * Revision 1.223 2004/01/17 00:21:48 ilyas ++ * Added commands and statuses for OLR ++ * ++ * Revision 1.222 2004/01/13 19:12:37 gsyu ++ * Added more constants for Double upstream ++ * ++ * Revision 1.221 2003/12/23 21:19:04 mprahlad ++ * Define BCM6348_TEMP_MOVE_TO_LMEM to FAST_TEXT for 6348 targets - this is for ++ * ADSL2/AnnexA multimode builds - move a few functions to Lmem for now to avoid ++ * changes for swap on 6348. ++ * ++ * Revision 1.220 2003/12/19 21:21:53 ilyas ++ * Added dying gasp support for ADSL2 ++ * ++ * Revision 1.219 2003/12/05 02:09:51 mprahlad ++ * Leave the AnalogEC defs in - saves ifdef-ing all uses of these defines. ++ * Include Bcm6345_To_Bcm6348.h - to be able to pick up macros for the ++ * transition ++ * ++ * Revision 1.218 2003/12/04 02:10:58 linyin ++ * Redefine some constants for supporting different pilot and TTR ++ * ++ * Revision 1.217 2003/12/03 02:24:39 gsyu ++ * Reverse previous check in for Double Upstream demo ++ * ++ * Revision 1.215 2003/11/20 00:58:47 yongbing ++ * Merge ADSL2 functionalities into Annex A branch ++ * ++ * Revision 1.214 2003/11/06 00:35:06 nino ++ * Added kDslWriteAfeRegCmd and kDslReadAfeRegCmd commands. ++ * ++ * Revision 1.213 2003/11/05 21:04:23 ilyas ++ * Added more codes for LOG data ++ * ++ * Revision 1.212 2003/10/22 00:51:52 yjchen ++ * define constant for quiet line noise ++ * ++ * Revision 1.211 2003/10/20 22:08:57 nino ++ * Added kDslSetRcvGainCmd and kDslBypassRcvHpfCmd debug commands. ++ * ++ * Revision 1.210 2003/10/18 00:04:59 yjchen ++ * define constants for G992P3 diagnostic mode channel response ++ * ++ * Revision 1.209 2003/10/17 22:41:29 yongbing ++ * Add INP message support ++ * ++ * Revision 1.208 2003/10/16 00:06:09 uid1249 ++ * Moved G.994 definitions from G.994p1MainTypes.h ++ * ++ * Revision 1.207 2003/10/15 20:45:11 linyin ++ * Add some constants for support Revision 2 ++ * ++ * Revision 1.206 2003/10/14 22:04:02 ilyas ++ * Added Nino's AFE statuses for 6348 ++ * ++ * Revision 1.205 2003/10/10 18:49:26 gsyu ++ * Added test modes to workaround the clock domain crossing bug, PR18038 ++ * ++ * Revision 1.204 2003/09/30 19:27:46 mprahlad ++ * ifdef AnalogEC definies with #ifndef BCM6348_SRC ++ * ++ * Revision 1.203 2003/09/26 19:36:34 linyin ++ * Add annexi constant and vars ++ * ++ * Revision 1.202 2003/09/25 20:16:13 yjchen ++ * remove featureNTR definition ++ * ++ * Revision 1.201 2003/09/08 20:29:51 ilyas ++ * Added test commands for chip regression tests ++ * ++ * Revision 1.200 2003/08/26 00:58:14 ilyas ++ * Added I432 reset command (for header compression) ++ * Fixed SoftDsl time (for I432 header compression) ++ * ++ * Revision 1.199 2003/08/26 00:37:29 ilyas ++ * #ifdef'ed DslFrameFunctions in dslCommand structure to save space ++ * ++ * Revision 1.198 2003/08/22 22:45:00 liang ++ * Change the NF field in G992CodingParams from uchar to ushort to support K=256 (dataRate=255*32kbps) in fast path. ++ * ++ * Revision 1.197 2003/08/21 21:19:05 ilyas ++ * Changed dataPumpCapabilities structure for G992P3 ++ * ++ * Revision 1.196 2003/08/12 22:44:28 khp ++ * - for Haixiang: added kDslTestMarginTweak command and marginTweakSpec ++ * ++ * Revision 1.195 2003/07/24 17:28:16 ovandewi ++ * added Tx filter change request code ++ * ++ * Revision 1.194 2003/07/24 15:48:55 yongbing ++ * Reduce TSSI buffer size to avoid crash at the beginning of G.994.1. Need to find out why ++ * ++ * Revision 1.193 2003/07/19 07:11:47 nino ++ * Revert back to version 1.191. ++ * ++ * Revision 1.191 2003/07/17 21:25:25 yongbing ++ * Add support for READSL2 and TSSI ++ * ++ * Revision 1.190 2003/07/14 19:42:33 yjchen ++ * add constants for G992P3 ++ * ++ * Revision 1.189 2003/07/10 23:07:11 liang ++ * Add demodCapability bit to minimize showtime ATUC xmt power through b&g table. ++ * ++ * Revision 1.188 2003/07/08 22:18:50 liang ++ * Added demodCapability bit for G.994.1 Annex A multimode operation. ++ * ++ * Revision 1.187 2003/07/07 23:24:43 ilyas ++ * Added G.dmt.bis definitions ++ * ++ * Revision 1.186 2003/06/25 02:44:02 liang ++ * Added demod capability bit kDslUE9000ADI918FECFixEnabled. ++ * Added back kDslHWEnableAnalogECUpdate & kDslHWEnableAnalogEC for backward compatibility (annex A). ++ * ++ * Revision 1.185 2003/06/18 01:39:19 ilyas ++ * Added AFE test commands. Add #defines for driver's builds ++ * ++ * Revision 1.184 2003/06/06 23:58:09 ilyas ++ * Added command and status for standalone AFE tests ++ * ++ * Revision 1.183 2003/05/29 21:09:32 nino ++ * - kDslHWEnableAnalogECUpdate define replaced with kDslHWSetDigitalEcUpdateMode ++ * - kDslHWEnableAnalogEC define replaced with kDslHWDisableDigitalECUpdate ++ * ++ * Revision 1.182 2003/04/15 22:08:15 liang ++ * Changed one of the demodCapability bit name from last checkin. ++ * ++ * Revision 1.181 2003/04/13 19:25:54 liang ++ * Added three more demodCapability bits. ++ * ++ * Revision 1.180 2003/04/02 02:09:17 liang ++ * Added demodCapability bit for ADI low rate option fix disable. ++ * ++ * Revision 1.179 2003/03/18 18:22:06 yongbing ++ * Use 32 tap TEQ for Annex I ++ * ++ * Revision 1.178 2003/03/06 00:58:07 ilyas ++ * Added SetStausBuffer command ++ * ++ * Revision 1.177 2003/02/25 00:46:26 ilyas ++ * Added T1.413 EOC vendor ID ++ * ++ * Revision 1.176 2003/02/21 23:30:54 ilyas ++ * Added Xmtgain command framing mode status and T1413VendorId parameters ++ * ++ * Revision 1.175 2003/02/07 22:13:55 liang ++ * Add demodCapabilities bits for sub-sample alignment and higher T1.413 level (used internally only). ++ * ++ * Revision 1.174 2003/01/23 02:54:07 liang ++ * Added demod capability bit for bitswap enable. ++ * ++ * Revision 1.173 2002/12/13 18:36:33 yongbing ++ * Add support for G.992.2 Annex C ++ * ++ * Revision 1.172 2002/12/10 23:27:12 ilyas ++ * Extended dslException parameter structure to allow printout from DslDiags ++ * ++ * Revision 1.171 2002/12/06 02:10:19 liang ++ * Moved the T1.413 RAck1/RAck2 switching variables to connection setup structure. ++ * Added/Modified the training progress codes for T1.413 RAck1/RAck2 and upstream 2x IFFT disable. ++ * ++ * Revision 1.170 2002/11/11 00:20:05 liang ++ * Add demod capability constant for internally disabling upstream 2x IFFT in T1.413 mode. ++ * ++ * Revision 1.169 2002/11/06 03:46:19 liang ++ * Add training progress code for upstream 2x IFFT disable. ++ * ++ * Revision 1.168 2002/11/01 01:41:06 ilyas ++ * Added flags for Centillium 4103 workarround ++ * ++ * Revision 1.167 2002/10/26 01:26:11 gsyu ++ * Move SoftDslLineHandler from SDRAM to LMEM ++ * ++ * Revision 1.166 2002/10/20 18:56:20 khp ++ * - for linyin ++ * - #ifdef NEC_NSIF_WORKAROUND: ++ * - add macros to extract NSIF status and fail counter vars ++ * ++ * Revision 1.165 2002/10/14 05:24:35 liang ++ * Add training status code to request alternate xmt filter (for Samsung 6-port ADI918 DSLAMs) to meet KT 2km spec. ++ * ++ * Revision 1.164 2002/10/08 21:44:50 ilyas ++ * Fixed EOC stuffing byte to indicate "no synchronization" action ++ * ++ * Revision 1.163 2002/10/03 19:34:24 ilyas ++ * Added size for EOC serial number register ++ * ++ * Revision 1.162 2002/09/28 02:42:27 yongbing ++ * Add retrain in T1.413 with R-Ack1 tone ++ * ++ * Revision 1.161 2002/09/28 01:23:35 gsyu ++ * Reverse us2xifft change so that we can install new us2xifft on the tree ++ * ++ * Revision 1.160 2002/09/26 23:30:48 yongbing ++ * Add synch symbol detection in Showtime ++ * ++ * Revision 1.159 2002/09/20 23:47:52 khp ++ * - for gsyu: enable 2X IFFT for Annex A (XMT_FFT_SIZE_2X) ++ * ++ * Revision 1.158 2002/09/14 03:26:39 ilyas ++ * Changed far-end RDI reporting ++ * ++ * Revision 1.157 2002/09/13 21:10:54 ilyas ++ * Added reporting of remote modem LOS and RDI. ++ * Moved G992CodingParams definition to SoftDsl.h ++ * ++ * Revision 1.156 2002/09/12 21:07:19 ilyas ++ * Added HEC, OCD and LCD counters ++ * ++ * Revision 1.155 2002/09/09 21:31:30 linyin ++ * Add two constant to support long reach ++ * ++ * Revision 1.154 2002/09/07 01:31:51 ilyas ++ * Added support for OEM parameters ++ * ++ * Revision 1.153 2002/09/04 22:36:14 mprahlad ++ * defines for non standard info added ++ * ++ * Revision 1.152 2002/08/02 21:59:09 liang ++ * Enable G.992.2 carrierInfo in capabitilities when G.992.1 annex A is used for G.992.2. ++ * ++ * Revision 1.151 2002/07/29 20:01:03 ilyas ++ * Added command for Atm VC map table change ++ * ++ * Revision 1.150 2002/07/18 22:30:47 liang ++ * Add xmt power and power cutback related constants. ++ * ++ * Revision 1.149 2002/07/11 01:30:58 ilyas ++ * Changed status for ShowtimeMargin reporting ++ * ++ * Revision 1.148 2002/07/09 19:19:09 ilyas ++ * Added status parameters for ShowtimeSNRMargin info and command to filter ++ * out SNR margin data ++ * ++ * Revision 1.147 2002/06/27 21:50:24 liang ++ * Added test command related demodCapabilities bits. ++ * ++ * Revision 1.146 2002/06/26 21:29:00 liang ++ * Added dsl test cmd structure and showtime margin connection info status. ++ * ++ * Revision 1.145 2002/06/15 05:15:51 ilyas ++ * Added definitions for Ping, Dying Gasp and other test commands ++ * ++ * Revision 1.144 2002/05/30 19:55:15 ilyas ++ * Added status for ADSL PHY MIPS exception ++ * Changed conflicting definition for higher rates (S=1/2) ++ * ++ * Revision 1.143 2002/05/21 23:41:07 yongbing ++ * First check-in of Annex C S=1/2 codes ++ * ++ * Revision 1.142 2002/04/29 22:25:09 georgep ++ * Merge from branch annexC_demo - add status message constants ++ * ++ * Revision 1.141 2002/04/18 19:00:35 ilyas ++ * Added include file for builds in CommEngine environment ++ * ++ * Revision 1.140 2002/04/18 00:18:36 yongbing ++ * Add detailed timeout error messages ++ * ++ * Revision 1.139 2002/04/02 10:03:18 ilyas ++ * Merged BERT from AnnexA branch ++ * ++ * Revision 1.138 2002/03/26 01:42:29 ilyas ++ * Added timeout message constants for annex C ++ * ++ * Revision 1.137 2002/03/22 19:39:22 yongbing ++ * Modify for co-exist of G994P1 and T1P413 ++ * ++ * Revision 1.136 2002/03/22 01:19:40 ilyas ++ * Add status message constants for total FEXT Bits, NEXT bits ++ * ++ * Revision 1.135 2002/03/10 22:32:24 liang ++ * Added report constants for LOS recovery and timing tone index. ++ * ++ * Revision 1.134 2002/03/07 22:06:32 georgep ++ * Replace ifdef G992P1 with G992P1_ANNEX_A for annex A variables ++ * ++ * Revision 1.133 2002/02/16 01:08:18 georgep ++ * Add log constant for showtime mse ++ * ++ * Revision 1.132 2002/02/08 04:36:27 ilyas ++ * Added commands for LOG file and fixed Idle mode pointer update ++ * ++ * Revision 1.131 2002/01/24 20:21:30 georgep ++ * Add logging defines, remove fast retrain defines ++ * ++ * Revision 1.130 2002/01/19 23:59:17 ilyas ++ * Added support for LOG and eye data to ADSL core target ++ * ++ * Revision 1.129 2002/01/16 23:43:54 liang ++ * Remove the carriage return character from last checkin. ++ * ++ * Revision 1.128 2002/01/15 22:27:13 ilyas ++ * Added command for ADSL loopback ++ * ++ * Revision 1.127 2002/01/10 07:18:22 ilyas ++ * Added status for printf (mainly for ADSL core debugging) ++ * ++ * Revision 1.126 2001/12/21 22:45:34 ilyas ++ * Added support for ADSL MIB data object ++ * ++ * Revision 1.125 2001/12/13 02:24:22 ilyas ++ * Added G997 (Clear EOC and G997 framer) support ++ * ++ * Revision 1.124 2001/11/30 05:56:31 liang ++ * Merged top of the branch AnnexBDevelopment onto top of the tree. ++ * ++ * Revision 1.123 2001/11/15 19:01:07 yongbing ++ * Modify only T1.413 part to the top of tree based on AnnexBDevelopment branch ++ * ++ * Revision 1.122 2001/10/19 00:12:07 ilyas ++ * Added support for frame oriented (no ATM) data link layer ++ * ++ * Revision 1.121 2001/10/09 22:35:13 ilyas ++ * Added more ATM statistics and OAM support ++ * ++ * Revision 1.105.2.20 2001/11/27 02:32:03 liang ++ * Combine vendor ID, serial #, and version number into SoftModemVersionNumber.c. ++ * ++ * Revision 1.105.2.19 2001/11/21 01:29:14 georgep ++ * Add a status message define for annexC ++ * ++ * Revision 1.105.2.18 2001/11/08 23:26:28 yongbing ++ * Add carrier selection function for Annex A and B ++ * ++ * Revision 1.105.2.17 2001/11/07 22:55:30 liang ++ * Report G992 rcv msg CRC error as what it is instead of time out. ++ * ++ * Revision 1.105.2.16 2001/11/05 19:56:21 liang ++ * Add DC offset info code. ++ * ++ * Revision 1.105.2.15 2001/10/16 00:47:16 yongbing ++ * Add return-to-T1p413 starting point if in error ++ * ++ * Revision 1.105.2.14 2001/10/15 23:14:01 yjchen ++ * remove ADSL_SINGLE_SYMBOL_BLOCK ++ * ++ * Revision 1.105.2.13 2001/10/12 18:07:16 yongbing ++ * Add support for T1.413 ++ * ++ * Revision 1.105.2.12 2001/10/04 00:23:52 liang ++ * Add connection info constants for TEQ coef and PSD. ++ * ++ * Revision 1.105.2.11 2001/10/03 01:44:01 liang ++ * Merged with codes from main tree (tag SoftDsl_2_18). ++ * ++ * Revision 1.105.2.10 2001/09/28 22:10:04 liang ++ * Add G994 exchange message status reports. ++ * ++ * Revision 1.105.2.9 2001/09/26 18:08:21 georgep ++ * Send status error message in case features field is not setup properly ++ * ++ * Revision 1.105.2.8 2001/09/05 01:58:13 georgep ++ * Added status message for annexC measured delay ++ * ++ * Revision 1.105.2.7 2001/08/29 00:37:52 georgep ++ * Add log constants for annexC ++ * ++ * Revision 1.105.2.6 2001/08/18 00:01:34 georgep ++ * Add constants for annexC ++ * ++ * Revision 1.105.2.5 2001/08/08 17:33:28 yongbing ++ * Merge with tag SoftDsl_2_17 ++ * ++ * Revision 1.120 2001/08/29 02:56:01 ilyas ++ * Added tests for flattening/unflatenning command and statuses (dual mode) ++ * ++ * Revision 1.119 2001/08/28 03:26:32 ilyas ++ * Added support for running host and adsl core parts separately ("dual" mode) ++ * ++ * Revision 1.118 2001/08/16 02:16:10 khp ++ * - mark functions with FAST_TEXT to reduce cycle counts for QPROC targets ++ * (replaces use of LMEM_INSN) ++ * ++ * Revision 1.117 2001/06/18 20:06:35 ilyas ++ * Added forward declaration of dslCommandStruc to avoid gcc warnings ++ * ++ * Revision 1.116 2001/06/18 19:49:36 ilyas ++ * Changes to include support for HOST_ONLY mode ++ * ++ * Revision 1.115 2001/06/01 22:00:33 ilyas ++ * Changed ATM PHY interface to accomodate UTOPIA needs ++ * ++ * Revision 1.114 2001/05/16 06:22:24 liang ++ * Added status reports for xmt & rcv prefix enable position. ++ * ++ * Revision 1.113 2001/05/02 20:34:32 georgep ++ * Added log constants for snr1 calculation ++ * ++ * Revision 1.112 2001/04/25 01:20:11 ilyas ++ * ++ * Don't use DSL frame functions if ATM_LAYER is not defined ++ * ++ * Revision 1.111 2001/04/17 21:13:00 georgep ++ * Define status constant kDslHWSetDigitalEcUpdateShift ++ * ++ * Revision 1.110 2001/04/16 23:38:36 georgep ++ * Add HW AGC constants for ATUR ++ * ++ * Revision 1.109 2001/04/06 23:44:53 georgep ++ * Added status constant for setting up digitalEcGainShift ++ * ++ * Revision 1.108 2001/03/29 05:58:34 liang ++ * Replaced the Aware compatibility codes with automatic detection codes. ++ * ++ * Revision 1.107 2001/03/25 06:11:22 liang ++ * Combined separate loop attenuation status for ATUR & ATUC into one status. ++ * Replace separate hardware AGC info status for ATUR & ATUC into hardware AGC ++ * request status and hardware AGC obtained status. ++ * Use store AGC command to save hardware AGC value instead of returning value ++ * from status report. ++ * ++ * Revision 1.106 2001/03/24 00:43:22 liang ++ * Report more checksum results (NumOfCalls, txSignal, rxSignal & eyeData). ++ * ++ * Revision 1.105 2001/03/16 23:57:31 georgep ++ * Added more loop attenuation reporting status constants ++ * ++ * Revision 1.104 2001/03/15 00:22:07 liang ++ * Back to version 1.101. ++ * ++ * Revision 1.103 2001/03/15 00:03:44 yjchen ++ * use kDslATURHardwareAGCInfo for AltoE14 AGC as well ++ * ++ * Revision 1.102 2001/03/14 23:10:56 yjchen ++ * add defns for AltoE14 AGC ++ * ++ * Revision 1.101 2001/03/08 23:31:34 georgep ++ * Added R, S, D, coding parameters to dslDataPumpCapabilities ++ * ++ * Revision 1.100 2001/02/10 03:03:09 ilyas ++ * Added one more DslFrame function ++ * ++ * Revision 1.99 2001/02/09 01:55:27 ilyas ++ * Added status codes and macros to support printing of AAL packets ++ * ++ * Revision 1.98 2001/01/30 23:28:10 georgep ++ * Added kDslDspControlStatus for handling changes to dsp params ++ * ++ * Revision 1.97 2001/01/12 01:17:18 georgep ++ * Added bit in demodCapabilities for analog echo cancellor ++ * ++ * Revision 1.96 2001/01/04 05:51:03 ilyas ++ * Added more dslStatuses ++ * ++ * Revision 1.95 2000/12/21 05:46:07 ilyas ++ * Added name for struct _dslFrame ++ * ++ * Revision 1.94 2000/12/13 22:04:39 liang ++ * Add Reed-Solomon coding enable bit in demodCapabilities. ++ * ++ * Revision 1.93 2000/11/29 20:42:02 liang ++ * Add defines for SNR & max achivable rate status and DEC enable demodCapabilities bit. ++ * ++ * Revision 1.92 2000/09/22 21:55:13 ilyas ++ * Added support for DSL + Atm physical layer only (I.432) simulations ++ * ++ * Revision 1.91 2000/09/10 09:20:53 lkaplan ++ * Improve interface for sending Eoc messages ++ * ++ * Revision 1.90 2000/09/08 19:37:58 lkaplan ++ * Added code for handling EOC messages ++ * ++ * Revision 1.89 2000/09/07 23:02:27 georgep ++ * Add HarwareAGC Bit to demod Capabilities ++ * ++ * Revision 1.88 2000/09/01 00:57:34 georgep ++ * Added Hardware AGC status defines ++ * ++ * Revision 1.87 2000/08/31 19:04:26 liang ++ * Added external reference for stack size requirement test functions. ++ * ++ * Revision 1.86 2000/08/24 23:16:46 liang ++ * Increased sample block size for noBlock. ++ * ++ * Revision 1.85 2000/08/23 18:34:39 ilyas ++ * Added XxxVcConfigure function ++ * ++ * Revision 1.84 2000/08/05 00:25:04 georgep ++ * Redefine sampling freq constants ++ * ++ * Revision 1.83 2000/08/03 14:04:00 liang ++ * Add hardware time tracking clock error reset code. ++ * ++ * Revision 1.82 2000/07/23 20:52:52 ilyas ++ * Added xxxFrameBufSetAddress() function for ATM framer layers ++ * Rearranged linkLayer functions in one structure which is passed as a ++ * parameter to xxxLinkLayerInit() function to be set there ++ * ++ * Revision 1.81 2000/07/18 20:03:24 ilyas ++ * Changed DslFrame functions definitions to macros, ++ * Removed gDslVars from their parameter list ++ * ++ * Revision 1.80 2000/07/17 21:08:15 lkaplan ++ * removed global pointer ++ * ++ * Revision 1.79 2000/06/21 20:38:44 georgep ++ * Added bit to demodCapabilities for HW_TIME_TRACKING ++ * ++ * Revision 1.78 2000/06/19 19:57:55 georgep ++ * Added constants for logging of HWResampler data ++ * ++ * Revision 1.77 2000/06/02 18:57:21 ilyas ++ * Added support for DSL buffers consisting of many ATM cells ++ * ++ * Revision 1.76 2000/05/27 02:19:28 liang ++ * G992MonitorParams structure is moved here, and Tx/Rx data handler type definitions changed. ++ * ++ * Revision 1.75 2000/05/15 18:17:21 liang ++ * Added statuses for sent and received frames ++ * ++ * Revision 1.74 2000/05/14 01:56:38 ilyas ++ * Added ATM cell printouts ++ * ++ * Revision 1.73 2000/05/09 23:00:26 ilyas ++ * Added ATM status messages, ATM timer, Tx frames flush on timeout ++ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames ++ * ++ * Revision 1.72 2000/05/03 18:01:18 georgep ++ * Removed old function declarations for Eoc/Aoc ++ * ++ * Revision 1.71 2000/05/03 03:57:04 ilyas ++ * Added LOG file support for writing ATM data ++ * ++ * Revision 1.70 2000/05/02 00:04:36 liang ++ * Add showtime monitoring and message exchange info constants. ++ * ++ * Revision 1.69 2000/04/28 23:34:20 yongbing ++ * Add constants for reporting error events in performance monitoring ++ * ++ * Revision 1.68 2000/04/21 23:09:04 liang ++ * Added G992 time out training progress constant. ++ * ++ * Revision 1.67 2000/04/19 00:31:47 ilyas ++ * Added global SoftDsl functions for Vc, added OOB info functions ++ * ++ * Revision 1.66 2000/04/18 00:45:31 yongbing ++ * Add G.DMT new frame structure, define G992P1_NEWFRAME to enable, need ATM layer to work ++ * ++ * Revision 1.65 2000/04/15 01:48:34 georgep ++ * Added T1p413 status constants ++ * ++ * Revision 1.64 2000/04/13 08:36:22 yura ++ * Added SoftDslSetRefData, SoftDslGetRefData functions ++ * ++ * Revision 1.63 2000/04/13 05:42:35 georgep ++ * Added constant for T1p413 ++ * ++ * Revision 1.62 2000/04/05 21:49:54 liang ++ * minor change. ++ * ++ * Revision 1.61 2000/04/04 04:16:06 liang ++ * Merged with SoftDsl_0_03 from old tree. ++ * ++ * Revision 1.65 2000/04/04 01:47:21 ilyas ++ * Implemented abstract dslFrame and dslFrameBuffer objects ++ * ++ * Revision 1.64 2000/04/01 08:12:10 yura ++ * Added preliminary revision of the SoftDsl driver architecture ++ * ++ * Revision 1.63 2000/04/01 02:55:33 georgep ++ * New defines for G992p2Profile Structure ++ * ++ * Revision 1.62 2000/04/01 00:50:36 yongbing ++ * Add initial version of new frame structure for full-rate ++ * ++ * Revision 1.61 2000/03/24 03:30:45 georgep ++ * Define new constant kDslUpstreamSamplingFreq ++ * ++ * Revision 1.60 2000/03/23 19:51:30 georgep ++ * Define new features bits for G992p1 ++ * ++ * Revision 1.59 2000/03/18 01:28:41 georgep ++ * Changed connectionSetup to include G992p1 Capabilities ++ * ++ * Revision 1.58 2000/02/29 01:40:03 georgep ++ * Changed modulationtype defines to be the same as SPAR1 in G994p1 ++ * ++ * Revision 1.57 1999/11/19 01:03:19 george ++ * Use Block Size 256 for single symbol Mode ++ * ++ * Revision 1.56 1999/11/18 02:37:43 george ++ * Porting to 16Bit ++ * ++ * Revision 1.55 1999/11/12 02:12:55 george ++ * Added status constant for reporting of profile channel matching calculation ++ * ++ * Revision 1.54 1999/11/11 19:19:42 george ++ * Porting to 16Bit Compiler ++ * ++ * Revision 1.53 1999/11/05 01:27:06 liang ++ * Add recovery-from-inpulse-noise progress report. ++ * ++ * Revision 1.52 1999/11/02 02:06:27 george ++ * Added SNRMargin training status value ++ * ++ * Revision 1.51 1999/10/27 23:02:03 wan ++ * Add G.994.1 setup in dslConnectionSetupStruct for setting up Initiation side ++ * ++ * Revision 1.50 1999/10/25 21:55:36 liang ++ * Renamed the constant for FEQ output error. ++ * ++ * Revision 1.49 1999/10/23 02:20:55 george ++ * Add debug data codes ++ * ++ * Revision 1.48 1999/10/19 23:59:06 liang ++ * Change line handler interface to work with nonsymmetric sampling freq. ++ * ++ * Revision 1.47 1999/10/09 01:38:04 george ++ * Define maxProfileNumber ++ * ++ * Revision 1.46 1999/10/07 23:30:51 wan ++ * Add G.994.1 Tone and Fast Retrain Recov detections in G.992p2 SHOWTIME and Fast Retrain ++ * ++ * Revision 1.45 1999/10/06 13:59:27 liang ++ * Escape to G994.1 should be done through status instead of command. ++ * ++ * Revision 1.44 1999/10/06 02:01:28 george ++ * Add kDslReturnToG994p1Cmd ++ * ++ * Revision 1.43 1999/09/30 19:29:58 george ++ * Add reporting constant for Fast Retrain ++ * ++ * Revision 1.42 1999/09/16 23:41:56 liang ++ * Added command for host forced retrain. ++ * ++ * Revision 1.41 1999/08/20 00:47:25 wan ++ * Add constants for Fast Retrain progress status ++ * ++ * Revision 1.40 1999/08/16 18:06:01 wan ++ * Add more reporting constants for Fast Retrain ++ * ++ * Revision 1.39 1999/08/12 00:18:10 wan ++ * Add several Fast Retrain Status constants ++ * ++ * Revision 1.38 1999/08/10 18:25:38 george ++ * Define constants used for Fast Retrain ++ * ++ * Revision 1.37 1999/07/31 01:47:43 george ++ * Add status constants for eoc/aoc ++ * ++ * Revision 1.36 1999/07/27 18:19:52 george ++ * declare aoc/eoc functions ++ * ++ * Revision 1.35 1999/07/19 22:44:47 george ++ * Add constants for G994p1 Message Exchange ++ * ++ * Revision 1.34 1999/07/16 02:03:03 liang ++ * Modified Dsl link layer command spec structure. ++ * ++ * Revision 1.33 1999/07/14 22:53:16 george ++ * Add Constants for G994p1 ++ * ++ * Revision 1.32 1999/07/13 00:02:26 liang ++ * Added more feature bits. ++ * ++ * Revision 1.31 1999/07/09 01:58:14 wan ++ * Added more constants G.994.1 testing reports ++ * ++ * Revision 1.30 1999/07/07 23:51:04 liang ++ * Added rcv power and loop attenuation reports. ++ * ++ * Revision 1.29 1999/07/06 21:32:01 liang ++ * Added some aux. feature bits, and field performanceMargin was changed to noiseMargin in Capabilities. ++ * ++ * Revision 1.28 1999/07/03 01:40:17 liang ++ * Redefined dsl command parameter list and added connection setup struct. ++ * ++ * Revision 1.27 1999/07/02 00:41:18 liang ++ * Add bit and gain logging as well as rcv carrier range status. ++ * ++ * Revision 1.26 1999/06/25 21:37:10 wan ++ * Work in progress for G994.1. ++ * ++ * Revision 1.25 1999/06/16 00:54:36 liang ++ * Added Tx/Rx SHOWTIME active training progress codes. ++ * ++ * Revision 1.24 1999/06/11 21:59:37 wan ++ * Added G994.1 fail status constant. ++ * ++ * Revision 1.23 1999/06/11 21:29:01 liang ++ * Constants for C/R-Msgs was changed to C/R-Msg. ++ * ++ * Revision 1.22 1999/06/08 02:49:42 liang ++ * Added SNR data logging. ++ * ++ * Revision 1.21 1999/06/07 21:05:08 liang ++ * Added more training status values. ++ * ++ * Revision 1.20 1999/05/22 02:18:26 liang ++ * More constant defines. ++ * ++ * Revision 1.19 1999/05/14 22:49:35 liang ++ * Added more status codes and debug data codes. ++ * ++ * Revision 1.18 1999/04/12 22:41:39 liang ++ * Work in progress. ++ * ++ * Revision 1.17 1999/04/01 20:28:07 liang ++ * Added RReverb detect event status. ++ * ++ * Revision 1.16 1999/03/26 03:29:54 liang ++ * Add DSL debug data constants. ++ * ++ * Revision 1.15 1999/03/08 21:58:00 liang ++ * Added more constant definitions. ++ * ++ * Revision 1.14 1999/03/02 01:49:36 liang ++ * Added more connection info codes. ++ * ++ * Revision 1.13 1999/03/02 00:25:55 liang ++ * Added DSL tx and rx data handler type definitions. ++ * ++ * Revision 1.12 1999/02/27 01:16:55 liang ++ * Increase allowable static memory size to a VERY large number for now. ++ * ++ * Revision 1.11 1999/02/25 00:24:06 liang ++ * Increased symbol block size to 16. ++ * ++ * Revision 1.10 1999/02/23 22:03:26 liang ++ * Increased maximal static memory size allowed. ++ * ++ * Revision 1.9 1999/02/17 02:39:21 ilyas ++ * Changes for NDIS ++ * ++ * Revision 1.8 1999/02/11 22:44:30 ilyas ++ * More definitions for ATM ++ * ++ * Revision 1.7 1999/02/10 01:56:38 liang ++ * Added hooks for G994.1 and G992.2. ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef SoftDslHeader ++#define SoftDslHeader ++ ++/* for builds in Linux/VxWorks CommEngine environment */ ++#if (defined(__KERNEL__) && !defined(LINUX_DRIVER)) || defined(VXWORKS) || defined(_WIN32_WCE) || defined(TARG_OS_RTEMS) || defined(_CFE_) ++#include "AdslCoreDefs.h" ++#else ++#include "Bcm6345_To_Bcm6348.h" /* File for 45->48 changes */ ++#endif ++ ++#ifndef SoftModemPh ++#include "SoftModem.h" ++#endif ++ ++#ifdef DSL_OS ++#include "DslOs.h" ++#endif ++ ++/* ++** ++** Type definitions ++** ++*/ ++ ++#if defined(ATM) || defined(DSL_PACKET) ++#define DSL_LINKLAYER ++#endif ++ ++#if defined(ATM_LAYER) || defined(DSL_PACKET_LAYER) || defined(G997_1_FRAMER) ++#define DSL_FRAME_FUNCTIONS ++#endif ++ ++#define FLD_OFFSET(type,fld) ((int)(void *)&(((type *)0)->fld)) ++ ++#include "Que.h" ++#include "SoftAtmVc.h" ++ ++typedef struct _dslFrameBuffer ++ { ++ struct _dslFrameBuffer *next; /* link to the next buffer in the frame */ ++ void *pData; /* pointer to data */ ++ ulong length; /* size (in bytes) of data */ ++ } dslFrameBuffer; ++ ++typedef struct _dslFrame ++ { ++ ulong Reserved[3]; ++ ++ ulong totalLength; /* total amount of data in the packet */ ++ int bufCnt; /* buffer counter */ ++ struct _dslFrameBuffer *head; /* first buffer in the chain */ ++ struct _dslFrameBuffer *tail; /* last buffer in the chain */ ++ } dslFrame; ++ ++ ++/* VC types and parameters */ ++ ++#define kDslVcAtm 1 ++ ++typedef struct ++ { ++ ulong vcType; ++ union ++ { ++ atmVcParams atmParams; ++ } params; ++ } dslVcParams; ++ ++/* ++** Assuming that dslVcParams.params is the first field in VC ++** and RefData is the first field in dslVcParams.params ++*/ ++ ++#define DslVcGetRefData(pVc) (*(void **) (pVc)) ++ ++/* Frame OOB types */ ++ ++#define kDslFrameAtm 1 ++ ++typedef struct ++ { ++ ulong frameType; ++ union ++ { ++ atmOobPacketInfo atmInfo; ++ } param; ++ } dslOobFrameInfo; ++ ++ ++typedef struct ++ { ++ ulong (SM_DECL *__DslFrameBufferGetLength) (dslFrameBuffer *fb); ++ void * (SM_DECL *__DslFrameBufferGetAddress) (dslFrameBuffer *fb); ++ void (SM_DECL *__DslFrameBufferSetLength) (dslFrameBuffer *fb, ulong l); ++ void (SM_DECL *__DslFrameBufferSetAddress) (dslFrameBuffer *fb, void *p); ++ ++ void (SM_DECL *__DslFrameInit) (dslFrame *f); ++ ulong (SM_DECL *__DslFrameGetLength) (dslFrame *pFrame); ++ ulong (SM_DECL *__DslFrameGetBufCnt) (dslFrame *pFrame); ++ dslFrameBuffer * (SM_DECL *__DslFrameGetFirstBuffer) (dslFrame *pFrame); ++ dslFrameBuffer * (SM_DECL *__DslFrameGetNextBuffer) (dslFrameBuffer *pFrBuffer); ++ void (SM_DECL *__DslFrameSetNextBuffer) (dslFrameBuffer *pFrBuf, dslFrameBuffer *pFrBufNext); ++ dslFrameBuffer * (SM_DECL *__DslFrameGetLastBuffer) (dslFrame *pFrame); ++ void * (SM_DECL *__DslFrameGetLinkFieldAddress) (dslFrame *f); ++ dslFrame * (SM_DECL *__DslFrameGetFrameAddressFromLink) (void *lnk); ++ ++ Boolean (SM_DECL *__DslFrameGetOobInfo) (dslFrame *f, dslOobFrameInfo *pOobInfo); ++ Boolean (SM_DECL *__DslFrameSetOobInfo) (dslFrame *f, dslOobFrameInfo *pOobInfo); ++ ++ void (SM_DECL *__DslFrameEnqueBufferAtBack) (dslFrame *f, dslFrameBuffer *b); ++ void (SM_DECL *__DslFrameEnqueFrameAtBack) (dslFrame *fMain, dslFrame *f); ++ void (SM_DECL *__DslFrameEnqueBufferAtFront) (dslFrame *f, dslFrameBuffer *b); ++ void (SM_DECL *__DslFrameEnqueFrameAtFront) (dslFrame *fMain, dslFrame *f); ++ dslFrameBuffer * (SM_DECL *__DslFrameDequeBuffer) (dslFrame *pFrame); ++ ++ void * (SM_DECL *__DslFrameAllocMemForFrames) (ulong frameNum); ++ void (SM_DECL *__DslFrameFreeMemForFrames) (void *hMem); ++ dslFrame * (SM_DECL *__DslFrameAllocFrame) (void *handle); ++ void (SM_DECL *__DslFrameFreeFrame) (void *handle, dslFrame *pFrame); ++ void * (SM_DECL *__DslFrameAllocMemForBuffers) (void **ppMemPool, ulong bufNum, ulong memSize); ++ void (SM_DECL *__DslFrameFreeMemForBuffers) (void *hMem, ulong memSize, void *pMemPool); ++ dslFrameBuffer * (SM_DECL *__DslFrameAllocBuffer) (void *handle, void *pMem, ulong length); ++ void (SM_DECL *__DslFrameFreeBuffer) (void *handle, dslFrameBuffer *pBuf); ++ ++ /* for LOG file support */ ++ ++ ulong (SM_DECL *__DslFrame2Id)(void *handle, dslFrame *pFrame); ++ void * (SM_DECL *__DslFrameId2Frame)(void *handle, ulong frameId); ++ } dslFrameFunctions; ++ ++#define DslFrameDeclareFunctions( name_prefix ) \ ++extern ulong SM_DECL name_prefix##BufferGetLength(dslFrameBuffer *fb); \ ++extern void * SM_DECL name_prefix##BufferGetAddress(dslFrameBuffer *fb); \ ++extern void SM_DECL name_prefix##BufferSetLength(dslFrameBuffer *fb, ulong l); \ ++extern void SM_DECL name_prefix##BufferSetAddress(dslFrameBuffer *fb, void *p); \ ++ \ ++extern void SM_DECL name_prefix##Init(dslFrame *f); \ ++extern ulong SM_DECL name_prefix##GetLength (dslFrame *pFrame); \ ++extern ulong SM_DECL name_prefix##GetBufCnt(dslFrame *pFrame); \ ++extern dslFrameBuffer * SM_DECL name_prefix##GetFirstBuffer(dslFrame *pFrame); \ ++extern dslFrameBuffer * SM_DECL name_prefix##GetNextBuffer(dslFrameBuffer *pFrBuffer); \ ++extern void SM_DECL name_prefix##SetNextBuffer(dslFrameBuffer *pFrBuf, dslFrameBuffer *pFrBufNext); \ ++extern dslFrameBuffer * SM_DECL name_prefix##GetLastBuffer(dslFrame *pFrame); \ ++extern void * SM_DECL name_prefix##GetLinkFieldAddress(dslFrame *f); \ ++extern Boolean SM_DECL name_prefix##GetOobInfo(dslFrame *f, dslOobFrameInfo *pOobInfo); \ ++extern Boolean SM_DECL name_prefix##SetOobInfo(dslFrame *f, dslOobFrameInfo *pOobInfo); \ ++extern dslFrame* SM_DECL name_prefix##GetFrameAddressFromLink(void *lnk); \ ++extern void SM_DECL name_prefix##EnqueBufferAtBack(dslFrame *f, dslFrameBuffer *b); \ ++extern void SM_DECL name_prefix##EnqueFrameAtBack(dslFrame *fMain, dslFrame *f); \ ++extern void SM_DECL name_prefix##EnqueBufferAtFront(dslFrame *f, dslFrameBuffer *b); \ ++extern void SM_DECL name_prefix##EnqueFrameAtFront(dslFrame *fMain, dslFrame *f); \ ++extern dslFrameBuffer * SM_DECL name_prefix##DequeBuffer(dslFrame *pFrame); \ ++ \ ++extern void * SM_DECL name_prefix##AllocMemForFrames(ulong frameNum); \ ++extern void SM_DECL name_prefix##FreeMemForFrames(void *hMem); \ ++extern dslFrame * SM_DECL name_prefix##AllocFrame(void *handle); \ ++extern void SM_DECL name_prefix##FreeFrame(void *handle, dslFrame *pFrame); \ ++extern void * SM_DECL name_prefix##AllocMemForBuffers(void **ppMemPool, ulong bufNum, ulong memSize); \ ++extern void SM_DECL name_prefix##FreeMemForBuffers(void *hMem, ulong memSize, void *pMemPool); \ ++extern dslFrameBuffer * SM_DECL name_prefix##AllocBuffer(void *handle, void *pMem, ulong length); \ ++extern void SM_DECL name_prefix##FreeBuffer(void *handle, dslFrameBuffer *pBuf); \ ++extern ulong SM_DECL name_prefix##2Id(void *handle, dslFrame *pFrame); \ ++extern void * SM_DECL name_prefix##Id2Frame(void *handle, ulong frameId); ++ ++ ++#define DslFrameAssignFunctions( var, name_prefix ) do { \ ++ (var).__DslFrameBufferGetLength = name_prefix##BufferGetLength; \ ++ (var).__DslFrameBufferGetAddress= name_prefix##BufferGetAddress; \ ++ (var).__DslFrameBufferSetLength = name_prefix##BufferSetLength; \ ++ (var).__DslFrameBufferSetAddress= name_prefix##BufferSetAddress; \ ++ \ ++ (var).__DslFrameInit = name_prefix##Init; \ ++ (var).__DslFrameGetLength = name_prefix##GetLength; \ ++ (var).__DslFrameGetBufCnt = name_prefix##GetBufCnt; \ ++ (var).__DslFrameGetFirstBuffer = name_prefix##GetFirstBuffer; \ ++ (var).__DslFrameGetNextBuffer = name_prefix##GetNextBuffer; \ ++ (var).__DslFrameSetNextBuffer = name_prefix##SetNextBuffer; \ ++ (var).__DslFrameGetLastBuffer = name_prefix##GetLastBuffer; \ ++ (var).__DslFrameGetLinkFieldAddress = name_prefix##GetLinkFieldAddress; \ ++ (var).__DslFrameGetFrameAddressFromLink = name_prefix##GetFrameAddressFromLink; \ ++ \ ++ (var).__DslFrameGetOobInfo = name_prefix##GetOobInfo; \ ++ (var).__DslFrameSetOobInfo = name_prefix##SetOobInfo; \ ++ \ ++ (var).__DslFrameEnqueBufferAtBack = name_prefix##EnqueBufferAtBack; \ ++ (var).__DslFrameEnqueFrameAtBack = name_prefix##EnqueFrameAtBack; \ ++ (var).__DslFrameEnqueBufferAtFront= name_prefix##EnqueBufferAtFront; \ ++ (var).__DslFrameEnqueFrameAtFront = name_prefix##EnqueFrameAtFront; \ ++ (var).__DslFrameDequeBuffer = name_prefix##DequeBuffer; \ ++ \ ++ (var).__DslFrameAllocMemForFrames = name_prefix##AllocMemForFrames; \ ++ (var).__DslFrameFreeMemForFrames = name_prefix##FreeMemForFrames; \ ++ (var).__DslFrameAllocFrame = name_prefix##AllocFrame; \ ++ (var).__DslFrameFreeFrame = name_prefix##FreeFrame; \ ++ (var).__DslFrameAllocMemForBuffers= name_prefix##AllocMemForBuffers; \ ++ (var).__DslFrameFreeMemForBuffers = name_prefix##FreeMemForBuffers; \ ++ (var).__DslFrameAllocBuffer = name_prefix##AllocBuffer; \ ++ (var).__DslFrameFreeBuffer = name_prefix##FreeBuffer; \ ++ \ ++ (var).__DslFrame2Id = name_prefix##2Id; \ ++ (var).__DslFrameId2Frame = name_prefix##Id2Frame; \ ++} while (0) ++ ++typedef struct ++ { ++ Boolean febe_I; ++ Boolean fecc_I; ++ Boolean los, rdi; ++ Boolean ncd_I; ++ Boolean hec_I; ++#ifdef G992P3 ++ Boolean lpr; ++#endif ++ ++#ifdef G992P1_NEWFRAME ++ ++ Boolean febe_F; ++ Boolean fecc_F; ++ Boolean ncd_F; ++ Boolean hec_F; ++ ++#endif ++ } G992MonitorParams; ++ ++typedef struct ++ { ++ ushort K; ++ uchar S, R; ++ uchar D; ++#ifdef G992P3 ++ uchar T, SEQ; ++#endif ++ directionType direction; ++ ++#ifdef G992P1_NEWFRAME ++ ++ ushort N; ++ ushort NF; ++ uchar RSF; ++ ++ uchar AS0BF, AS1BF, AS2BF, AS3BF, AEXAF; ++ ushort AS0BI; ++ uchar AS1BI, AS2BI, AS3BI, AEXAI; ++ ++ uchar LS0CF, LS1BF, LS2BF, LEXLF; ++ uchar LS0CI, LS1BI, LS2BI, LEXLI; ++ ++ uchar mergedModeEnabled; ++ ++#endif ++ ++ } G992CodingParams; ++ ++typedef struct ++ { ++ uchar Nlp; ++ uchar Nbc; ++ uchar MSGlp; ++ ushort MSGc; ++ ++ ulong L; ++ ushort M; ++ ushort T; ++ ushort D; ++ ushort R; ++ ushort B; ++ } G992p3CodingParams; ++ ++/* Power Management Message definitions (used in command and status) */ ++ ++typedef struct ++ { ++ long msgType; ++ union ++ { ++ long value; ++ struct ++ { ++ long msgLen; ++ void *msgData; ++ } msg; ++ } param; ++ } dslPwrMessage; ++ ++/* Power Management commands and responses */ ++ ++#define kPwrSimpleRequest 1 ++#define kPwrL2Request 2 ++#define kPwrL2TrimRequest 3 ++ ++#define kPwrGrant 0x80 ++#define kPwrReject 0x81 ++#define kPwrL2Grant 0x82 ++#define kPwrL2Reject 0x83 ++#define kPwrL2TrimGrant 0x84 ++#define kPwrL2TrimReject 0x85 ++#define kPwrL2Grant2p 0x86 ++ ++#define kPwrBusy 0x01 ++#define kPwrInvalid 0x02 ++#define kPwrNotDesired 0x03 ++#define kPwrInfeasibleParam 0x04 ++ ++/* Power Management reason codes */ ++ ++/* OLR definitions (used in command and status) */ ++ ++typedef struct ++ { ++ ushort msgType; ++ ushort nCarrs; ++ ushort L[4]; ++ uchar B[4]; ++ void *carrParamPtr; ++ } dslOLRMessage; ++ ++typedef struct ++ { ++ uchar ind; ++ uchar gain; ++ uchar gb; ++ } dslOLRCarrParam; ++ ++typedef struct ++ { ++ ushort ind; ++ uchar gain; ++ uchar gb; ++ } dslOLRCarrParam2p; ++ ++/* OLR messages */ ++ ++#define kOLRRequestType1 1 ++#define kOLRRequestType2 2 ++#define kOLRRequestType3 3 ++#define kOLRRequestType4 4 ++#define kOLRRequestType5 5 ++#define kOLRRequestType6 6 ++ ++#define kOLRDeferType1 0x81 ++#define kOLRRejectType2 0x82 ++#define kOLRRejectType3 0x83 ++ ++/* OLR reason codes */ ++ ++#define kOLRBusy 1 ++#define kOLRInvalidParam 2 ++#define kOLRNotEnabled 3 ++#define kOLRNotSupported 4 ++ ++/* common EOC definitions */ ++#define kG992EocStuffingByte 0x0C ++ ++/* showtime monitor counters */ ++#define kG992ShowtimeRSCodewordsRcved 0 /* number of Reed-Solomon codewords received */ ++#define kG992ShowtimeRSCodewordsRcvedOK 1 /* number of Reed-Solomon codewords received with all symdromes zero */ ++#define kG992ShowtimeRSCodewordsRcvedCorrectable 2 /* number of Reed-Solomon codewords received with correctable errors */ ++#define kG992ShowtimeRSCodewordsRcvedUncorrectable 3 /* number of Reed-Solomon codewords received with un-correctable errors */ ++#define kG992ShowtimeSuperFramesRcvd 4 /* number of super frames received */ ++#define kG992ShowtimeSuperFramesRcvdWrong 5 /* number of super frames received with CRC error */ ++#define kG992ShowtimeLastUncorrectableRSCount 6 /* last recorded value for kG992ShowtimeRSCodewordsRcvedUncorrectable */ ++#define kG992ShowtimeLastWrongSuperFrameCount 7 /* last recorded value for kG992ShowtimeSuperFramesRcvdWrong */ ++#define kG992ShowtimeNumOfShortResync 8 /* number of short interrupt recoveries by FEQ */ ++ ++#define kG992ShowtimeNumOfFEBE 9 /* number of other side superframe errors */ ++#define kG992ShowtimeNumOfFECC 10 /* number of other side superframe FEC errors */ ++#define kG992ShowtimeNumOfFHEC 11 /* number of far-end ATM header CRC errors */ ++#define kG992ShowtimeNumOfFOCD 12 /* number of far-end OCD events */ ++#define kG992ShowtimeNumOfFLCD 13 /* number of far-end LCD events */ ++#define kG992ShowtimeNumOfHEC 14 /* number of ATM header CRC errors */ ++#define kG992ShowtimeNumOfOCD 15 /* number of OCD events */ ++#define kG992ShowtimeNumOfLCD 16 /* number of LCD events */ ++ ++#define kG992ShowtimeNumOfMonitorCounters (kG992ShowtimeNumOfLCD+1) /* always last number + 1 */ ++#define kG992ShowtimeMonitorReportNumber 9 ++ ++#define kG992ShowtimeLCDNumShift 1 ++#define kG992ShowtimeLCDFlag 1 ++ ++typedef int (SM_DECL *dslFrameHandlerType) (void *gDslVars, void *pVc, ulong mid, dslFrame *); ++ ++typedef void* (SM_DECL *dslHeaderHandlerType) (void *gDslVars, ulong hdr, uchar hdrHec); ++typedef void* (SM_DECL *dslTxFrameBufferHandlerType) (void *gDslVars, int*, void*); ++typedef void* (SM_DECL *dslRxFrameBufferHandlerType) (void *gDslVars, int, void*); ++ ++typedef void* (SM_DECL *dslVcAllocateHandlerType) (void *gDslVars, void *); ++typedef void (SM_DECL *dslVcFreeHandlerType) (void *gDslVars, void *); ++typedef Boolean (SM_DECL *dslVcActivateHandlerType) (void *gDslVars, void *); ++typedef void (SM_DECL *dslVcDeactivateHandlerType) (void *gDslVars, void *); ++typedef Boolean (SM_DECL *dslVcConfigureHandlerType) (void *gDslVars, void *pVc, ulong mid, void *); ++ ++typedef ulong (SM_DECL *dslLinkVc2IdHandlerType) (void *gDslVars, void *); ++typedef void* (SM_DECL *dslLinkVcId2VcHandlerType) (void *gDslVars, ulong); ++typedef void* (SM_DECL *dslGetFramePoolHandlerType) (void *gDslVars); ++ ++typedef void (SM_DECL *dslLinkCloseHandlerType) (void *gDslVars); ++typedef int (SM_DECL *dslTxDataHandlerType)(void *gDslVars, int, int, uchar*, G992MonitorParams*); ++typedef int (SM_DECL *dslRxDataHandlerType)(void *gDslVars, int, uchar*, G992MonitorParams*); ++ ++typedef void (SM_DECL *dslLinkStatusHandler) (void *gDslVars, ulong statusCode, ...); ++ ++typedef Boolean (SM_DECL *dslPhyInitType) ( ++ void *gDslVars, ++ bitMap setupMap, ++ dslHeaderHandlerType rxCellHeaderHandlerPtr, ++ dslRxFrameBufferHandlerType rxFrameHandlerPtr, ++ dslTxFrameBufferHandlerType txFrameHandlerPtr, ++ atmStatusHandler statusHandlerPtr); ++ ++struct _dslFramerBufDesc; ++ ++typedef Boolean (SM_DECL *dslFramerDataGetPtrHandlerType) (void *gDslVars, struct _dslFramerBufDesc *pBufDesc); ++typedef void (SM_DECL *dslFramerDataDoneHandlerType) (void *gDslVars, struct _dslFramerBufDesc *pBufDesc); ++ ++typedef void (SM_DECL *dslDriverCallbackType) (void *gDslVars); ++ ++#ifdef DSL_PACKET ++ ++typedef struct ++ { ++ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; ++ dslFramerDataDoneHandlerType rxDataDoneHandler; ++ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; ++ dslFramerDataDoneHandlerType txDataDoneHandler; ++ } dslPacketPhyFunctions; ++ ++typedef Boolean (SM_DECL *dslPacketPhyInitType) ( ++ void *gDslVars, ++ bitMap setupMap, ++ dslPacketPhyFunctions dslPhyFunctions, ++ dslLinkStatusHandler statusHandlerPtr); ++ ++ ++#endif /* DSL_PACKET */ ++ ++ ++typedef int dslDirectionType; ++typedef bitMap dslModulationType; ++typedef bitMap dslLinkLayerType; ++ ++/* ++** ++** Log data codes ++** ++*/ ++ ++#define kDslEyeData eyeData ++ ++#define kDslLogComplete (inputSignalData - 1) ++#define kDslLogInputData inputSignalData ++#define kDslLogInputData1 (inputSignalData + 1) ++#define kDslLogInputData2 (inputSignalData + 2) ++#define kDslLogInputData3 (inputSignalData + 3) ++ ++/* ++** ++** Status codes ++** ++*/ ++ ++typedef long dslStatusCode; ++#define kFirstDslStatusCode 256 ++#define kDslError (kFirstDslStatusCode + 0) ++#define kAtmStatus (kFirstDslStatusCode + 1) ++#define kDslTrainingStatus (kFirstDslStatusCode + 2) ++#define kDslConnectInfoStatus (kFirstDslStatusCode + 3) ++#define kDslEscapeToG994p1Status (kFirstDslStatusCode + 4) ++#define kDslFrameStatus (kFirstDslStatusCode + 5) ++#define kDslReceivedEocCommand (kFirstDslStatusCode + 6) ++#define kDslSendEocCommandDone (kFirstDslStatusCode + 7) ++#define kDslSendEocCommandFailed (kFirstDslStatusCode + 8) ++#define kDslWriteRemoteRegisterDone (kFirstDslStatusCode + 9) ++#define kDslReadRemoteRegisterDone (kFirstDslStatusCode + 10) ++#define kDslExternalError (kFirstDslStatusCode + 11) ++#define kDslDspControlStatus (kFirstDslStatusCode + 12) ++#define kDslATUHardwareAGCRequest (kFirstDslStatusCode + 13) ++#define kDslPacketStatus (kFirstDslStatusCode + 14) ++#define kDslG997Status (kFirstDslStatusCode + 15) ++#define kDslPrintfStatus (kFirstDslStatusCode + 16) ++#define kDslPrintfStatus1 (kFirstDslStatusCode + 17) ++#define kDslExceptionStatus (kFirstDslStatusCode + 18) ++#define kDslPingResponse (kFirstDslStatusCode + 19) ++#define kDslShowtimeSNRMarginInfo (kFirstDslStatusCode + 20) ++#define kDslGetOemParameter (kFirstDslStatusCode + 21) ++#define kDslOemDataAddrStatus (kFirstDslStatusCode + 22) ++#define kDslDataAvailStatus (kFirstDslStatusCode + 23) ++/* #define kDslAtuChangeTxFilterRequest (kFirstDslStatusCode + 24) */ ++#define kDslTestPllPhaseResult (kFirstDslStatusCode + 25) ++#ifdef BCM6348_SRC ++#define kDslHardwareAGCSetPga1 (kFirstDslStatusCode + 26) ++#define kDslHardwareAGCDecPga1 (kFirstDslStatusCode + 27) ++#define kDslHardwareAGCIncPga1 (kFirstDslStatusCode + 28) ++#define kDslHardwareAGCSetPga2Delta (kFirstDslStatusCode + 29) ++#endif ++#define kDslOLRRequestStatus (kFirstDslStatusCode + 30) ++#define kDslOLRResponseStatus (kFirstDslStatusCode + 31) ++#define kDslOLRBitGainUpdateStatus (kFirstDslStatusCode + 32) ++#define kDslPwrMgrStatus (kFirstDslStatusCode + 33) ++#define kDslEscapeToT1p413Status (kFirstDslStatusCode + 34) ++#ifdef BCM6348_SRC ++#define kDslHardwareAGCSetPga2 (kFirstDslStatusCode + 35) ++#define kDslHardwareGetRcvAGC (kFirstDslStatusCode + 36) ++#endif ++#define kDslUpdateXmtReadPtr (kFirstDslStatusCode + 37) ++#define kDslHardwareSetRcvAGC (kFirstDslStatusCode + 38) ++#ifdef BCM6348_SRC ++#define kDslSetDigUsPwrCutback (kFirstDslStatusCode + 39) ++#endif ++ ++#define kClientSideInitiation 0 ++#define kClientSideRespond 1 ++#define kCentralSideInitiation 2 ++#define kCentralSideRespond 3 ++ ++/* OEM parameter ID definition */ ++ ++#define kDslOemG994VendorId 1 ++#define kDslOemG994XmtNSInfo 2 ++#define kDslOemG994RcvNSInfo 3 ++#define kDslOemEocVendorId 4 ++#define kDslOemEocVersion 5 ++#define kDslOemEocSerNum 6 ++#define kDslOemT1413VendorId 7 ++#define kDslOemT1413EocVendorId 8 ++ ++typedef long dslErrorCode; ++ ++typedef long atmStatusCode; ++typedef long dslFramerStatusCode; ++ ++typedef long atmErrorCode; ++ ++typedef long dslTrainingStatusCode; ++ ++#define kDslStartedG994p1 0 ++#define kDslStartedT1p413HS 1 ++ ++/* reserved for G.994.1: 1 ~ 8 */ ++ ++#define kDslG994p1MessageDet 100 ++#define kDslG994p1ToneDet 101 ++#define kDslG994p1RToneDet 102 ++#define kDslG994p1FlagDet 103 ++#define kDslG994p1GalfDet 104 ++#define kDslG994p1ErrorFrameDet 105 ++#define kDslG994p1BadFrameDet 106 ++#define kDslG994p1SilenceDet 107 ++#define kDslG994p1RcvTimeout 108 ++#define kDslG994p1XmtFinished 109 ++#define kDslG994p1ReturntoStartup 110 ++#define kDslG994p1InitiateCleardown 111 ++#define kDslG994p1StartupFinished 112 ++#define kDslG994p1RcvNonStandardInfo 113 ++#define kDslG994p1XmtNonStandardInfo 114 ++ ++#define kG994p1MaxNonstdMessageLength 64 ++ ++#define kDslFinishedT1p413 1100 ++#define kDslT1p413DetectedCTone 1101 ++#define kDslT1p413DetectedCAct 1102 ++#define kDslT1p413DetectedCReveille 1103 ++#define kDslT1p413DetectedRActReq 1104 ++#define kDslT1p413DetectedRQuiet1 1105 ++#define kDslT1p413DetectedRAct 1106 ++#define kDslT1p413TimeoutCReveille 1107 ++#define kDslT1p413ReturntoStartup 1108 ++ ++#define kDslG994p1Timeout 8 ++#define kDslFinishedG994p1 9 ++#define kDslStartedG992p2Training 10 ++#define kDslG992p2DetectedPilotSymbol 11 ++#define kDslG992p2DetectedReverbSymbol 12 ++#define kDslG992p2TEQCalculationDone 13 ++#define kDslG992p2TrainingFEQ 14 ++#define kDslG992p2Phase3Started 15 ++#define kDslG992p2ReceivedRates1 16 ++#define kDslG992p2ReceivedMsg1 17 ++#define kDslG992p2Phase4Started 18 ++#define kDslG992p2ReceivedRatesRA 19 ++#define kDslG992p2ReceivedMsgRA 20 ++#define kDslG992p2ReceivedRates2 21 ++#define kDslG992p2ReceivedMsg2 22 ++#define kDslG992p2ReceivedBitGainTable 23 ++#define kDslG992p2TxShowtimeActive 24 ++#define kDslG992p2RxShowtimeActive 25 ++#define kDslG992p2TxAocMessage 26 ++#define kDslG992p2RxAocMessage 27 ++#define kDslG992p2TxEocMessage 28 ++#define kDslG992p2RxEocMessage 29 ++#define kDslFinishedG992p2Training 30 ++#define kDslRecoveredFromImpulseNoise 31 ++#define kDslG992Timeout 32 ++#define kDslT1p413Isu1SglByteSymDetected 33 /* detected T1.413 Issue 1 single byte per symbol mode */ ++#define kDslG992RxPrefixOnInAFewSymbols 34 ++#define kDslG992TxPrefixOnInAFewSymbols 35 ++#define kDslAnnexCXmtCPilot1Starting 36 ++#define kDslXmtToRcvPathDelay 37 ++#define kDslFeaturesUnsupported 38 ++#define kDslG992RcvMsgCrcError 39 ++#define kDslAnnexCDetectedStartHyperframe 40 ++ ++#define kDslG992AnnexCTimeoutCPilot1Detection 41 ++#define kDslG992AnnexCTimeoutCReverb1Detection 42 ++#define kDslG992AnnexCTimeoutECTraining 43 ++#define kDslG992AnnexCTimeoutHyperframeDetector 44 ++#define kDslG992AnnexCTimeoutSendRSegue2 45 ++#define kDslG992AnnexCTimeoutDetectCSegue1 46 ++#define kDslG992AnnexCAlignmentErrDetected 47 ++#define kDslG992AnnexCTimeoutSendRSegueRA 48 ++#define kDslG992AnnexCTimeoutSendRSegue4 49 ++#define kDslG992AnnexCTimeoutCSegue2Detection 50 ++#define kDslG992AnnexCTimeoutCSegue3Detection 51 ++/* Progress report for fast retrain */ ++ ++#define kG994p1EventToneDetected 54 ++#define kDslG992p2RcvVerifiedBitAndGain 55 ++#define kDslG992p2ProfileChannelResponseCalc 56 ++#define kDslG992AnnexCTotalFEXTBits 57 ++#define kDslG992AnnexCTotalNEXTBits 58 ++#define kDslG992AnnexCTotalFEXTCarrs 59 ++#define kDslG992AnnexCTotalNEXTCarrs 60 ++ ++#define kDslG992p3ReceivedMsgFmt 61 ++#define kDslG992p3ReceivedMsgPcb 62 ++ ++#define kDslG992p3AnnexLMode 63 ++ ++/* performance monitoring report */ ++ ++#define kG992DataRcvDetectFastRSCorrection 70 ++#define kG992DataRcvDetectInterleaveRSCorrection 71 ++#define kG992DataRcvDetectFastCRCError 72 ++#define kG992DataRcvDetectInterleaveCRCError 73 ++#define kG992DataRcvDetectFastRSError 74 ++#define kG992DataRcvDetectInterleaveRSError 75 ++#define kG992DataRcvDetectLOS 76 ++#define kG992DecoderDetectRDI 77 ++#define kG992DataRcvDetectLOSRecovery 78 ++#define kG992AtmDetectHEC 79 ++#define kG992AtmDetectOCD 180 ++#define kG992AtmDetectCD 181 ++#define kG992DecoderDetectRemoteLOS 182 ++#define kG992DecoderDetectRemoteLOSRecovery 183 ++#define kG992DecoderDetectRemoteRDI 184 ++#define kG992DecoderDetectRemoteRDIRecovery 185 ++#define kG992RcvDetectSyncSymbolOffset 186 ++#define kG992Upstream2xIfftDisabled 187 ++#if defined(G992P5) ++#define kDslG992RunAnnexaP3ModeInAnnexaP5 188 /* run Annex C mode in Annex I compiled codes */ ++#else ++#define kDslG992RunAnnexCModeInAnnexI 188 /* run Annex C mode in Annex I compiled codes */ ++#endif ++ ++/* OLR PHY status */ ++ ++#define kG992EventSynchSymbolDetected 189 ++#define kG992EventReverseSynchSymbolDetected 190 ++#define kG992EventL2CReverbSymbolDetected 191 ++#define kG992EventL2CSegueSymbolDetected 192 ++ ++/* ANNEX_M */ ++#define kG992EnableAnnexM 191 ++ ++#define kDslAtuChangeTxFilterRequest 192 ++ ++/* detailed error messages reports */ ++ ++#define kDslG992XmtRReverbRAOver4000 80 ++#define kDslG992XmtRReverb5Over4000 81 ++#define kDslG992RcvCSegue2Failed 82 ++#define kDslG992RcvCSegueRAFailed 83 ++#define kDslG992RcvCSegue3Failed 84 ++#define kDslG992RcvShowtimeStartedTooLate 85 ++#define kDslG992XmtRReverb3Over4000 86 ++#define kDslG992RcvFailDetCSegue1InWindow 87 ++#define kDslG992RcvCPilot1Failed 88 ++#define kDslG992RcvCReverb1Failed 89 ++#define kG992ControlAllRateOptionsFailedErr 90 ++#define kG992ControlInvalidRateOptionErr 91 ++#define kDslG992XmtInvalidXmtDErr 92 ++#define kDslG992BitAndGainCalcFailed 93 ++#define kDslG992BitAndGainVerifyFailed 94 ++ ++#define kDslT1p413RetrainToUseCorrectRAck 95 ++#define kDslUseAlternateTxFilter 96 ++#define kDslT1p413RetrainToUseCorrectIFFT 97 ++ ++typedef long dslConnectInfoStatusCode; ++#define kG992p2XmtToneOrderingInfo 0 ++#define kG992p2RcvToneOrderingInfo 1 ++#define kG992p2XmtCodingParamsInfo 2 ++#define kG992p2RcvCodingParamsInfo 3 ++#define kG992p2TrainingRcvCarrEdgeInfo 4 ++#define kG992ShowtimeMonitoringStatus 5 ++#define kG992MessageExchangeRcvInfo 6 ++#define kG992MessageExchangeXmtInfo 7 ++#define kG994MessageExchangeRcvInfo 8 ++#define kG994MessageExchangeXmtInfo 9 ++ ++#define kDslATURClockErrorInfo 10 ++#define kDslATURcvPowerInfo 11 ++#define kDslATUAvgLoopAttenuationInfo 12 ++#define kDslHWTimeTrackingResetClockError 13 ++#define kDslHWTimeTrackingClockTweak 14 ++#define kDslATUHardwareAGCObtained 15 ++#define kDslTEQCoefInfo 16 ++#define kDslRcvCarrierSNRInfo 17 ++#define kDslMaxReceivableBitRateInfo 18 ++#define kDslHWSetDigitalEcUpdateMode 19 ++#define kDslHWEnableDigitalECUpdate 20 ++#define kDslHWDisableDigitalECUpdate 21 ++#define kDslHWEnableDigitalEC 22 ++#define kDslHWSetDigitalEcGainShift 23 ++#define kDslHWSetDigitalEcUpdateShift 24 ++#define kDslRcvPsdInfo 25 ++#define kDslHWdcOffsetInfo 26 ++#define kG994SelectedG994p1CarrierIndex 27 ++#define kDslSelectedTimingTone 28 ++ ++#define kDslHWEnableAnalogECUpdate kDslHWSetDigitalEcUpdateMode ++#define kDslHWEnableAnalogEC kDslHWDisableDigitalECUpdate ++ ++#define kG992AocMessageExchangeRcvInfo 29 ++#define kG992AocMessageExchangeXmtInfo 30 ++#define kG992AocBitswapTxStarted 31 ++#define kG992AocBitswapRxStarted 32 ++#define kG992AocBitswapTxCompleted 33 ++#define kG992AocBitswapRxCompleted 34 ++#define kDslChannelResponseLog 35 ++#define kDslChannelResponseLinear 36 ++#define kDslChannelQuietLineNoise 37 ++ ++#define kDslATUCXmtPowerCutbackInfo 40 ++#define kDslATURXmtPowerCutbackInfo 41 ++#define kDslATUCXmtPowerInfo 42 ++#define kDslATURXmtPowerInfo 43 ++ ++#define kDslFramingModeInfo 50 ++#define kDslG992VendorID 51 ++ ++#ifdef BCM6348_SRC ++#define kDslHWSetRcvFir2OutputScale 52 ++#endif ++ ++#define kDslSignalAttenuation 53 ++#define kDslAttainableNetDataRate 54 ++#define kDslHLinScale 55 ++ ++#define kG992p3XmtCodingParamsInfo 60 ++#define kG992p3RcvCodingParamsInfo 61 ++#define kG992p3PwrStateInfo 62 ++#define kG992PilotToneInfo 63 ++ ++#define kDslSetPilotEyeDisplay 64 ++ ++#define kDslAturHwAgcResolutionMask (0xFFFFFFF8) ++#define kDslAturHwAgcMinGain ((-12)<<4) ++#ifndef BCM6348_SRC ++#define kDslAturHwAgcMaxGain (30<<4) ++#else ++#define kDslAturHwAgcMaxGain (36<<4) ++#endif ++ ++#define kDslFrameStatusSend 1 ++#define kDslFrameStatusSendComplete 2 ++#define kDslFrameStatusRcv 3 ++#define kDslFrameStatusReturn 4 ++ ++typedef struct _dslFramerStatus ++ { ++ dslFramerStatusCode code; ++ union ++ { ++ long value; ++ dslErrorCode error; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long nRxFrameTotal; ++ long nRxFrameError; ++ long nTxFrameTotal; ++ } statistic; ++ } param; ++ } dslFramerStatus; ++ ++typedef struct ++ { ++ dslStatusCode code; ++ union ++ { ++ long value; ++ dslErrorCode error; ++ struct ++ { ++ atmStatusCode code; ++ union ++ { ++ long value; ++ dslErrorCode error; ++ struct ++ { ++ long vci; ++ long mid; ++ long aalType; ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ long vcId; ++ long vci; ++ long aalType; ++ ulong fwdPeakCellTime; ++ ulong backPeakCellTime; ++ } vcInfo; ++ struct ++ { ++ long cellHdr; ++ long oamCmd; ++ } oamInfo; ++ struct ++ { ++ void *pVc; ++ char *pHdr; ++ void *cellHdr; ++ void *cellData; ++ } cellInfo; ++ struct ++ { ++ long totalBits; ++ long errBits; ++ } bertInfo; ++ } param; ++ } atmStatus; ++#ifdef DSL_PACKET ++ dslFramerStatus dslPacketStatus; ++#endif ++#ifdef G997_1_FRAMER ++ dslFramerStatus g997Status; ++#endif ++ struct ++ { ++ dslTrainingStatusCode code; ++ long value; ++ } dslTrainingInfo; ++ struct ++ { ++ dslConnectInfoStatusCode code; ++ long value; ++ void *buffPtr; ++ } dslConnectInfo; ++ struct ++ { ++ long maxMarginCarrier; ++ long maxSNRMargin; ++ long minMarginCarrier; ++ long minSNRMargin; ++ long avgSNRMargin; ++ long nCarriers; ++ void *buffPtr; ++ } dslShowtimeSNRMarginInfo; ++ struct ++ { ++ long code; ++ long vcId; ++ long timeStamp; ++ } dslFrameInfo; ++#ifdef G997_1 ++ struct ++ { ++ long msgId; ++ long msgType; ++ char *dataPtr; ++ } dslClearEocMsg; ++#endif ++ struct ++ { ++ char *fmt; ++ long argNum; ++ void *argPtr; ++ } dslPrintfMsg; ++ struct ++ { ++ ulong nBits; ++ ulong nBlocks; ++ ulong nBitErrors; ++ ulong nBlockErrors; ++ ++ ulong nAudioBits; ++ ulong nAudioBlocks; ++ ulong nAudioSyncErrors; ++ ulong nAudioBlockErrors; ++ } testResults; ++ struct ++ { ++ ulong code; ++ uchar *valuePtr; ++ ulong length; ++ } dslDataRegister; ++ struct ++ { ++ ulong code; ++ char *desc; ++ } dslExternalError; ++ struct ++ { ++ ulong numberOfCalls; ++ ulong txSignalChecksum; ++ ulong rxSignalChecksum; ++ ulong eyeDataChecksum; ++ } checksums; ++ struct ++ { ++ int sp; ++ int argc; ++ int *argv; ++ int *stackPtr; ++ int stackLen; ++ } dslException; ++ struct ++ { ++ ulong paramId; ++ void *dataPtr; ++ ulong dataLen; ++ } dslOemParameter; ++ struct ++ { ++ void *dataPtr; ++ ulong dataLen; ++ } dslDataAvail; ++ dslOLRMessage dslOLRRequest; ++ dslPwrMessage dslPwrMsg; ++ } param; ++ } dslStatusStruct; ++ ++typedef void (SM_DECL *dslStatusHandlerType) (void *gDslVars, dslStatusStruct*); ++ ++ ++/* ++** ++** Command codes ++** ++*/ ++ ++typedef long dslCommandCode; ++#define kFirstDslCommandCode 256 ++#define kDslIdleCmd (kFirstDslCommandCode + 0) ++#define kDslIdleRcvCmd (kFirstDslCommandCode + 1) ++#define kDslIdleXmtCmd (kFirstDslCommandCode + 2) ++#define kDslStartPhysicalLayerCmd (kFirstDslCommandCode + 3) ++#define kDslStartRetrainCmd (kFirstDslCommandCode + 4) ++#define kDslSetFrameFunctions (kFirstDslCommandCode + 5) ++#define kDslSendEocCommand (kFirstDslCommandCode + 6) ++#define kDslWriteRemoteRegister (kFirstDslCommandCode + 7) ++#define kDslReadRemoteRegister (kFirstDslCommandCode + 8) ++#define kDslWriteLocalRegister (kFirstDslCommandCode + 9) ++#define kDslReadLocalRegister (kFirstDslCommandCode + 10) ++#define kDslStoreHardwareAGCCmd (kFirstDslCommandCode + 11) ++#define kDslSetCommandHandlerCmd (kFirstDslCommandCode + 12) ++#define kSetLinkLayerStatusHandlerCmd (kFirstDslCommandCode + 13) ++#define kDslSetG997Cmd (kFirstDslCommandCode + 14) ++#define kDslLoopbackCmd (kFirstDslCommandCode + 15) ++#define kDslDiagSetupCmd (kFirstDslCommandCode + 16) ++#define kDslSetDriverCallbackCmd (kFirstDslCommandCode + 17) ++#define kDslDiagStopLogCmd (kFirstDslCommandCode + 18) ++#define kDslDiagStartBERT (kFirstDslCommandCode + 19) ++#define kDslDiagStopBERT (kFirstDslCommandCode + 20) ++#define kDslPingCmd (kFirstDslCommandCode + 21) ++#define kDslDyingGaspCmd (kFirstDslCommandCode + 22) ++#define kDslTestCmd (kFirstDslCommandCode + 23) ++#define kDslFilterSNRMarginCmd (kFirstDslCommandCode + 24) ++#define kDslAtmVcMapTableChanged (kFirstDslCommandCode + 25) ++#define kDslGetOemDataAddrCmd (kFirstDslCommandCode + 26) ++#define kDslAtmReportHEC (kFirstDslCommandCode + 27) ++#define kDslAtmReportCD (kFirstDslCommandCode + 28) ++#define kDslSetXmtGainCmd (kFirstDslCommandCode + 29) ++#define kDslSetStatusBufferCmd (kFirstDslCommandCode + 30) ++#define kDslAfeTestCmd (kFirstDslCommandCode + 31) ++#define kDslI432ResetCmd (kFirstDslCommandCode + 32) ++#define kDslSetRcvGainCmd (kFirstDslCommandCode + 33) ++#define kDslBypassRcvHpfCmd (kFirstDslCommandCode + 34) ++#define kDslWriteAfeRegCmd (kFirstDslCommandCode + 35) ++#define kDslReadAfeRegCmd (kFirstDslCommandCode + 36) ++#define kDslOLRRequestCmd (kFirstDslCommandCode + 37) ++#define kDslOLRResponseCmd (kFirstDslCommandCode + 38) ++#define kDslI432SetScrambleCmd (kFirstDslCommandCode + 39) ++#define kDslPwrMgrCmd (kFirstDslCommandCode + 40) ++#define kDslAtmGfcMappingCmd (kFirstDslCommandCode + 41) ++ ++#ifdef BCM6348_SRC ++#define kDslEnablePwmSyncClk (kFirstDslCommandCode + 42) ++#define kDslSetPwmSyncClkFreq (kFirstDslCommandCode + 43) ++#endif ++ ++#define kG994p1Duplex 1 ++#define kG994p1HalfDuplex 2 ++ ++/* Eoc Messages from ATU-C to ATU-R */ ++#define kDslEocHoldStateCmd 1 ++#define kDslEocReturnToNormalCmd 2 ++#define kDslEocPerformSelfTestCmd 3 ++#define kDslEocRequestCorruptCRCCmd 4 ++#define kDslEocRequestEndCorruptCRCCmd 5 ++#define kDslEocNotifyCorruptCRCCmd 6 ++#define kDslEocNotifyEndCorruptCRCCmd 7 ++#define kDslEocRequestTestParametersUpdateCmd 8 ++#define kDslEocGrantPowerDownCmd 9 ++#define kDslEocRejectPowerDownCmd 10 ++ ++/* Eoc Messages from ATU-R to ATU-C */ ++#define kDslEocRequestPowerDownCmd 11 ++#define kDslEocDyingGaspCmd 12 ++ ++/* Clear Eoc Messages */ ++#define kDslClearEocFirstCmd 100 ++#define kDslClearEocSendFrame 100 ++#define kDslClearEocSendComplete 101 ++#define kDslClearEocRcvedFrame 102 ++#define kDslClearEocSendComplete2 103 ++ ++#define kDslClearEocMsgLengthMask 0xFFFF ++#define kDslClearEocMsgNumMask 0xFF0000 ++#define kDslClearEocMsgDataVolatileMask 0x1000000 ++#define kDslClearEocMsgDataVolatile kDslClearEocMsgDataVolatileMask ++#define kDslClearEocMsgExtraSendComplete 0x2000000 ++ ++/* ADSL Link Power States */ ++#define kDslPowerFullOn 0 ++#define kDslPowerLow 1 ++#define kDslPowerIdle 3 ++ ++/* ATU-R Data Registers */ ++#define kDslVendorIDRegister 1 ++#define kDslRevisionNumberRegister 2 ++#define kDslSerialNumberRegister 3 ++#define kDslSelfTestResultsRegister 4 ++#define kDslLineAttenuationRegister 5 ++#define kDslSnrMarginRegister 6 ++#define kDslAturConfigurationRegister 7 ++#define kDslLinkStateRegister 8 ++ ++#define kDslVendorIDRegisterLength 8 ++#define kDslRevisionNumberRegisterLength 32 ++#define kDslSerialNumberRegisterLength 32 ++#define kDslSelfTestResultsRegisterLength 1 ++#define kDslLineAttenuationRegisterLength 1 ++#define kDslSnrMarginRegisterLength 1 ++#define kDslAturConfigurationRegisterLength 30 ++#define kDslLinkStateRegisterLength 1 ++ ++/* Dsl Diags setup flags */ ++#define kDslDiagEnableEyeData 1 ++#define kDslDiagEnableLogData 2 ++ ++/* Dsl test commands */ ++typedef long dslTestCmdType; ++#define kDslTestBackToNormal 0 ++#define kDslTestReverb 1 ++#define kDslTestMedley 2 ++#define kDslTestToneSelection 3 ++#define kDslTestNoAutoRetrain 4 ++#define kDslTestMarginTweak 5 ++#define kDslTestEstimatePllPhase 6 ++#define kDslTestReportPllPhaseStatus 7 ++#define kDslTestAfeLoopback 8 ++#define kDslTestL3 9 ++#define kDslTestAdsl2DiagMode 10 ++#define kDslTestRetL0 11 ++ ++/* Xmt gain default setting */ ++#define kDslXmtGainAuto 0x80000000 ++ ++/* Unit (AFE) test commands */ ++#define kDslAfeTestLoadImage 0 ++#define kDslAfeTestPatternSend 1 ++#define kDslAfeTestLoadImageOnly 2 ++#define kDslAfeTestPhyRun 3 ++#define kDslAfeTestLoadBuffer 4 ++ ++typedef struct ++ { ++#if defined(G992P1_ANNEX_I) || defined(G992P5) ++ ushort downstreamMinCarr, downstreamMaxCarr; ++#else ++ uchar downstreamMinCarr, downstreamMaxCarr; ++#endif ++ uchar upstreamMinCarr, upstreamMaxCarr; ++ }carrierInfo; ++ ++#if defined(G992P3) && !defined(BCM6348_SRC) ++#define FAST_TEXT_TYPE ++#else ++#define FAST_TEXT_TYPE FAST_TEXT ++#endif ++ ++#if defined(BCM6348_SRC) ++#define BCM6348_TEMP_MOVE_TO_LMEM ++#else ++#define BCM6348_TEMP_MOVE_TO_LMEM ++#endif ++ ++#ifdef G992P3 ++#define PRINT_DEBUG_INFO ++#else ++#define PRINT_DEBUG_INFO ++#endif ++ ++#ifdef G992P3 ++ ++#define kG992p3MaxSpectBoundsUpSize 16 ++#define kG992p3MaxSpectBoundsDownSize 16 ++ ++/* G.994 definitions */ ++ ++/*** Standard Info SPar2: G.992.3 Annex A Octet 1 ***/ ++ ++#define kG994p1G992p3AnnexASpectrumBoundsUpstream 0x01 ++#define kG994p1G992p3AnnexASpectrumShapingUpstream 0x02 ++#define kG994p1G992p3AnnexASpectrumBoundsDownstream 0x04 ++#define kG994p1G992p3AnnexASpectrumShapingDownstream 0x08 ++#define kG994p1G992p3AnnexATxImageAboveNyquistFreq 0x10 ++#define kG994p1G992p3AnnexLReachExtended 0x20 ++#define kG994p1G992p3AnnexMSubModePSDMasks 0x20 ++ ++#define kG994p1G992p3AnnexLUpNarrowband 0x02 ++#define kG994p1G992p3AnnexLUpWideband 0x01 ++#define kG994p1G992p3AnnexLDownNonoverlap 0x01 ++ ++/*** Standard Info SPar2: G.992.3 Annex A Octet 2 ***/ ++ ++#define kG994p1G992p3AnnexADownOverheadDataRate 0x01 ++#define kG994p1G992p3AnnexAUpOverheadDataRate 0x02 ++#define kG994p1G992p3AnnexAMaxNumberDownTPSTC 0x04 ++#define kG994p1G992p3AnnexAMaxNumberUpTPSTC 0x08 ++ ++/*** Standard Info SPar2: G.992.3 Annex A Octet 3,5,7,9 ***/ ++ ++#define kG994p1G992p3AnnexADownSTM_TPS_TC 0x01 ++#define kG994p1G992p3AnnexAUpSTM_TPS_TC 0x02 ++#define kG994p1G992p3AnnexADownATM_TPS_TC 0x04 ++#define kG994p1G992p3AnnexAUpATM_TPS_TC 0x08 ++#define kG994p1G992p3AnnexADownPTM_TPS_TC 0x10 ++#define kG994p1G992p3AnnexAUpPTM_TPS_TC 0x20 ++ ++/*** Standard Info SPar2: G.992.3 Annex A Octet 4,6,8,10 ***/ ++ ++#define kG994p1G992p3AnnexADownPMS_TC_Latency 0x01 ++#define kG994p1G992p3AnnexAUpPMS_TC_Latency 0x02 ++ ++/*** ++ * TSSI ++ * ++ * TSSI information is specified in 2 parts: subcarrier index, ++ * tssi value, and an indication of whether or no the tone specified ++ * is part of the supported set. ++ * ++ * The subcarrier index information is currently stored in the ++ * dsSubcarrierIndex array defined below. The tssi value are stored ++ * in the dsLog_tss array. ++ * ++ * The subcarrier index information only occupies the lower 12 bits ++ * of the available 16 bits (short type). Therefore, we will pack the ++ * supported set information in bit 15. ++ */ ++#define kG992DsSubCarrierIndexMask (0x0fff) /* AND mask to ectract ds subcarrier index */ ++#define kG992DsSubCarrierSuppSetMask (0x8000) /* AND mask to extract supported set indication */ ++ ++#define G992GetDsSubCarrierIndex(arg) ((arg) & kG992DsSubCarrierIndexMask) ++#define G992GetDsSubCarrierSuppSetIndication(arg) (((arg) & kG992DsSubCarrierSuppSetMask) >> 15) ++ ++/* Caution: Do not change anything in this structure definition, including associated constant */ ++/* This structure definition is used only by the driver and any change impose incompatibility issue in driver */ ++/* The structure following this structure (g992p3PhyDataPumpCapabilities) can be changed in PHY application */ ++ ++typedef struct ++ { ++ Boolean rcvNTREnabled, shortInitEnabled, diagnosticsModeEnabled; ++ ++ char featureSpectrum, featureOverhead; ++ char featureTPS_TC[4], featurePMS_TC[4]; ++ ++ short rcvNOMPSDus, rcvMAXNOMPSDus, rcvMAXNOMATPus; ++ short usSubcarrierIndex[kG992p3MaxSpectBoundsUpSize], ++ usLog_tss[kG992p3MaxSpectBoundsUpSize]; ++ short numUsSubcarrier; ++ short rcvNOMPSDds, rcvMAXNOMPSDds, rcvMAXNOMATPds; ++ short dsSubcarrierIndex[kG992p3MaxSpectBoundsDownSize], ++ dsLog_tss[kG992p3MaxSpectBoundsDownSize]; ++ short numDsSubcarrier; ++ uchar sizeIDFT, fillIFFT; ++ uchar readsl2Upstream, readsl2Downstream; ++ uchar minDownOverheadDataRate, minUpOverheadDataRate; ++ uchar maxDownSTM_TPSTC, maxDownATM_TPSTC, maxDownPTM_TPSTC; ++ uchar maxUpSTM_TPSTC, maxUpATM_TPSTC, maxUpPTM_TPSTC; ++ ++ short minDownSTM_TPS_TC[4], maxDownSTM_TPS_TC[4], ++ minRevDownSTM_TPS_TC[4], maxDelayDownSTM_TPS_TC[4]; ++ uchar maxErrorDownSTM_TPS_TC[4], minINPDownSTM_TPS_TC[4]; ++ short minUpSTM_TPS_TC[4], maxUpSTM_TPS_TC[4], ++ minRevUpSTM_TPS_TC[4], maxDelayUpSTM_TPS_TC[4]; ++ uchar maxErrorUpSTM_TPS_TC[4], minINPUpSTM_TPS_TC[4]; ++ ++ short maxDownPMS_TC_Latency[4], maxUpPMS_TC_Latency[4]; ++ short maxDownR_PMS_TC_Latency[4], maxDownD_PMS_TC_Latency[4]; ++ short maxUpR_PMS_TC_Latency[4], maxUpD_PMS_TC_Latency[4]; ++ ++ short minDownATM_TPS_TC[4], maxDownATM_TPS_TC[4], ++ minRevDownATM_TPS_TC[4], maxDelayDownATM_TPS_TC[4]; ++ uchar maxErrorDownATM_TPS_TC[4], minINPDownATM_TPS_TC[4]; ++ short minUpATM_TPS_TC[4], maxUpATM_TPS_TC[4], ++ minRevUpATM_TPS_TC[4], maxDelayUpATM_TPS_TC[4]; ++ uchar maxErrorUpATM_TPS_TC[4], minINPUpATM_TPS_TC[4]; ++ ++ short minDownPTM_TPS_TC[4], maxDownPTM_TPS_TC[4], ++ minRevDownPTM_TPS_TC[4], maxDelayDownPTM_TPS_TC[4]; ++ uchar maxErrorDownPTM_TPS_TC[4], minINPDownPTM_TPS_TC[4]; ++ short minUpPTM_TPS_TC[4], maxUpPTM_TPS_TC[4], ++ minRevUpPTM_TPS_TC[4], maxDelayUpPTM_TPS_TC[4]; ++ uchar maxErrorUpPTM_TPS_TC[4], minINPUpPTM_TPS_TC[4]; ++ ++ ushort subModePSDMasks; ++ } g992p3DataPumpCapabilities; ++ ++#define kG992p3p5MaxSpectBoundsUpSize 16 ++#define kG992p3p5MaxSpectBoundsDownSize 32 ++ ++typedef struct ++ { ++ Boolean rcvNTREnabled, shortInitEnabled, diagnosticsModeEnabled; ++ ++ char featureSpectrum, featureOverhead; ++ char featureTPS_TC[4], featurePMS_TC[4]; ++ ++ short rcvNOMPSDus, rcvMAXNOMPSDus, rcvMAXNOMATPus; ++ short usSubcarrierIndex[kG992p3p5MaxSpectBoundsUpSize], ++ usLog_tss[kG992p3p5MaxSpectBoundsUpSize]; ++ short numUsSubcarrier; ++ short rcvNOMPSDds, rcvMAXNOMPSDds, rcvMAXNOMATPds; ++ short dsSubcarrierIndex[kG992p3p5MaxSpectBoundsDownSize], ++ dsLog_tss[kG992p3p5MaxSpectBoundsDownSize]; ++ short numDsSubcarrier; ++ uchar sizeIDFT, fillIFFT; ++ uchar readsl2Upstream, readsl2Downstream; ++ uchar minDownOverheadDataRate, minUpOverheadDataRate; ++ uchar maxDownSTM_TPSTC, maxDownATM_TPSTC, maxDownPTM_TPSTC; ++ uchar maxUpSTM_TPSTC, maxUpATM_TPSTC, maxUpPTM_TPSTC; ++ ++ short minDownSTM_TPS_TC[4], maxDownSTM_TPS_TC[4], ++ minRevDownSTM_TPS_TC[4], maxDelayDownSTM_TPS_TC[4]; ++ uchar maxErrorDownSTM_TPS_TC[4], minINPDownSTM_TPS_TC[4]; ++ short minUpSTM_TPS_TC[4], maxUpSTM_TPS_TC[4], ++ minRevUpSTM_TPS_TC[4], maxDelayUpSTM_TPS_TC[4]; ++ uchar maxErrorUpSTM_TPS_TC[4], minINPUpSTM_TPS_TC[4]; ++ ++ short maxDownPMS_TC_Latency[4], maxUpPMS_TC_Latency[4]; ++ short maxDownR_PMS_TC_Latency[4], maxDownD_PMS_TC_Latency[4]; ++ short maxUpR_PMS_TC_Latency[4], maxUpD_PMS_TC_Latency[4]; ++ ++ short minDownATM_TPS_TC[4], maxDownATM_TPS_TC[4], ++ minRevDownATM_TPS_TC[4], maxDelayDownATM_TPS_TC[4]; ++ uchar maxErrorDownATM_TPS_TC[4], minINPDownATM_TPS_TC[4]; ++ short minUpATM_TPS_TC[4], maxUpATM_TPS_TC[4], ++ minRevUpATM_TPS_TC[4], maxDelayUpATM_TPS_TC[4]; ++ uchar maxErrorUpATM_TPS_TC[4], minINPUpATM_TPS_TC[4]; ++ ++ short minDownPTM_TPS_TC[4], maxDownPTM_TPS_TC[4], ++ minRevDownPTM_TPS_TC[4], maxDelayDownPTM_TPS_TC[4]; ++ uchar maxErrorDownPTM_TPS_TC[4], minINPDownPTM_TPS_TC[4]; ++ short minUpPTM_TPS_TC[4], maxUpPTM_TPS_TC[4], ++ minRevUpPTM_TPS_TC[4], maxDelayUpPTM_TPS_TC[4]; ++ uchar maxErrorUpPTM_TPS_TC[4], minINPUpPTM_TPS_TC[4]; ++ ++ ushort subModePSDMasks; ++ } g992p3PhyDataPumpCapabilities; ++#endif ++ ++typedef struct ++ { ++ dslModulationType modulations; ++ bitMap auxFeatures; ++ bitMap features; ++ bitMap demodCapabilities; ++ bitMap demodCapabilities2; ++ ushort noiseMargin; /* Q4 dB */ ++#ifdef G992_ATUC ++ short xmtRSf, xmtRS, xmtS, xmtD; ++ short rcvRSf, rcvRS, rcvS, rcvD; ++#endif ++#ifdef G992P1_ANNEX_A ++ bitMap subChannelInfo; ++ carrierInfo carrierInfoG992p1; ++#endif ++#ifdef G992P1_ANNEX_B ++ bitMap subChannelInfoAnnexB; ++ carrierInfo carrierInfoG992p1AnnexB; ++#endif ++#ifdef G992_ANNEXC ++ bitMap subChannelInfoAnnexC; ++ carrierInfo carrierInfoG992p1AnnexC; ++#endif ++#if defined(G992P1_ANNEX_I) ++ bitMap subChannelInfoAnnexI; ++ carrierInfo carrierInfoG992p1AnnexI; ++#endif ++#ifdef G992P5 ++ bitMap subChannelInfop5; ++ carrierInfo carrierInfoG992p5; ++#endif ++#if defined(G992P2) || (defined(G992P1_ANNEX_A) && defined(G992P1_ANNEX_A_USED_FOR_G992P2)) ++ carrierInfo carrierInfoG992p2; ++#endif ++ ushort maxDataRate; ++ uchar minDataRate; ++#ifdef G992P3 ++ g992p3DataPumpCapabilities *carrierInfoG992p3AnnexA; ++#endif ++#ifdef G992P5 ++ g992p3DataPumpCapabilities *carrierInfoG992p5AnnexA; ++#endif ++ } dslDataPumpCapabilities; ++ ++struct __dslCommandStruct; ++typedef Boolean (*dslCommandHandlerType) (void *gDslVars, struct __dslCommandStruct*); ++typedef struct __dslCommandStruct ++ { ++ dslCommandCode command; ++ union ++ { ++ long value; ++ Boolean flag; ++ struct ++ { ++ dslTestCmdType type; ++ union ++ { ++ struct ++ { ++ ulong xmtStartTone, xmtNumOfTones; ++ ulong rcvStartTone, rcvNumOfTones; ++ uchar *xmtMap, *rcvMap; ++ } toneSelectSpec; ++ struct ++ { ++ long extraPowerRequestQ4dB; ++ long numOfCarriers; ++ char *marginTweakTableQ4dB; ++ } marginTweakSpec; ++ } param; ++ } dslTestSpec; ++ struct ++ { ++ dslDirectionType direction; ++ dslDataPumpCapabilities capabilities; ++ } dslModeSpec; ++ struct ++ { ++ bitMap setup; ++ ulong eyeConstIndex1; ++ ulong eyeConstIndex2; ++ ulong logTime; ++ } dslDiagSpec; ++ struct ++ { ++ void *pBuf; ++ ulong bufSize; ++ } dslStatusBufSpec; ++ struct ++ { ++ ulong type; ++ void *afeParamPtr; ++ ulong afeParamSize; ++ void *imagePtr; ++ ulong imageSize; ++ } dslAfeTestSpec; ++ struct ++ { ++ dslLinkLayerType type; ++ bitMap setup; ++ union ++ { ++ struct ++ { ++ dataRateMap rxDataRate; ++ dataRateMap txDataRate; ++ long rtDelayQ4ms; ++ ulong rxBufNum; ++ ulong rxCellsInBuf; ++ ulong rxPacketNum; ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslPhyInitType atmPhyInitPtr; ++ } atmLinkSpec; ++ struct ++ { ++ dslHeaderHandlerType rxHeaderHandlerPtr; ++ dslRxFrameBufferHandlerType rxDataHandlerPtr; ++ dslTxFrameBufferHandlerType txHandlerPtr; ++ } atmPhyLinkSpec; ++#ifdef DSL_PACKET ++ struct ++ { ++ ulong rxBufNum; ++ ulong rxBufSize; ++ ulong rxPacketNum; ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslPacketPhyInitType dslPhyInitPtr; ++ } dslPacketLinkSpec; ++ dslPacketPhyFunctions dslPacketPhyLinkSpec; ++#endif ++ struct ++ { ++ txDataHandlerType txDataHandlerPtr; ++ rxDataHandlerType rxDataHandlerPtr; ++ } nullLinkSpec; ++ } param; ++ } dslLinkLayerSpec; ++#ifdef G997_1 ++#ifdef G997_1_FRAMER ++ struct ++ { ++ bitMap setup; ++ ulong rxBufNum; ++ ulong rxBufSize; ++ ulong rxPacketNum; ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ } dslG997Cmd; ++#endif ++ struct ++ { ++ long msgId; ++ long msgType; ++ char *dataPtr; ++ } dslClearEocMsg; ++#endif ++ struct ++ { ++ ulong code; ++ uchar *valuePtr; ++ ulong length; ++ } dslDataRegister; ++ union ++ { ++ dslStatusHandlerType statusHandlerPtr; ++ dslCommandHandlerType commandHandlerPtr; ++ eyeHandlerType eyeHandlerPtr; ++ logHandlerType logHandlerPtr; ++#if defined(DEBUG_DATA_HANDLER) ++ debugDataHandlerType debugDataHandlerPtr; ++#endif ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslDriverCallbackType driverCallback; ++ } handlerSpec; ++#if !defined(CHIP_SRC) || defined(DSL_FRAME_FUNCTIONS) ++ dslFrameFunctions DslFunctions; ++#endif ++ dslOLRMessage dslOLRRequest; ++ dslPwrMessage dslPwrMsg; ++ } param; ++ } dslCommandStruct; ++ ++ ++ ++ ++typedef struct ++ { ++ dslCommandHandlerType linkCommandHandlerPtr; ++ timerHandlerType linkTimerHandlerPtr; ++ dslLinkCloseHandlerType linkCloseHandlerPtr; ++ ++ dslFrameHandlerType linkSendHandlerPtr; ++ dslFrameHandlerType linkReturnHandlerPtr; ++ ++ dslVcAllocateHandlerType linkVcAllocateHandlerPtr; ++ dslVcFreeHandlerType linkVcFreeHandlerPtr; ++ dslVcActivateHandlerType linkVcActivateHandlerPtr; ++ dslVcDeactivateHandlerType linkVcDeactivateHandlerPtr; ++ dslVcConfigureHandlerType linkVcConfigureHandlerPtr; ++ ++ dslLinkVc2IdHandlerType linkVc2IdHandlerPtr; ++ dslLinkVcId2VcHandlerType linkVcId2VcHandlerPtr; ++ dslGetFramePoolHandlerType linkGetFramePoolHandlerPtr; ++ ++#ifndef ADSLCORE_ONLY ++ dslHeaderHandlerType linkRxCellHeaderHandlerPtr; ++ dslRxFrameBufferHandlerType linkRxCellDataHandlerPtr; ++ dslTxFrameBufferHandlerType linkTxCellHandlerPtr; ++#endif ++ ++ txDataHandlerType linkTxDataHandlerPtr; ++ rxDataHandlerType linkRxDataHandlerPtr; ++ } linkLayerFunctions; ++ ++#ifndef ADSLCORE_ONLY ++ ++#define LinkLayerAssignFunctions( var, name_prefix ) do { \ ++ (var).linkCommandHandlerPtr = name_prefix##CommandHandler; \ ++ (var).linkTimerHandlerPtr = name_prefix##TimerHandler; \ ++ (var).linkCloseHandlerPtr = name_prefix##CloseHandler; \ ++ \ ++ (var).linkSendHandlerPtr = name_prefix##SendFrameHandler; \ ++ (var).linkReturnHandlerPtr = name_prefix##ReturnFrameHandler; \ ++ \ ++ (var).linkVcAllocateHandlerPtr = name_prefix##VcAllocateHandler; \ ++ (var).linkVcFreeHandlerPtr = name_prefix##VcFreeHandler; \ ++ (var).linkVcActivateHandlerPtr = name_prefix##VcActivateHandler; \ ++ (var).linkVcDeactivateHandlerPtr = name_prefix##VcDeactivateHandler; \ ++ (var).linkVcConfigureHandlerPtr = name_prefix##VcConfigureHandler; \ ++ \ ++ (var).linkVc2IdHandlerPtr = name_prefix##Vc2IdHandler; \ ++ (var).linkVcId2VcHandlerPtr = name_prefix##VcId2VcHandler; \ ++ (var).linkGetFramePoolHandlerPtr = name_prefix##GetFramePoolHandler; \ ++ \ ++ (var).linkRxCellHeaderHandlerPtr = name_prefix##RxCellHeaderHandler; \ ++ (var).linkRxCellDataHandlerPtr = name_prefix##RxCellDataHandler; \ ++ (var).linkTxCellHandlerPtr = name_prefix##TxCellHandler; \ ++ \ ++ (var).linkTxDataHandlerPtr = name_prefix##TxDataHandler; \ ++ (var).linkRxDataHandlerPtr = name_prefix##RxDataHandler; \ ++} while (0) ++ ++#else ++ ++#define LinkLayerAssignFunctions( var, name_prefix ) do { \ ++ (var).linkCommandHandlerPtr = name_prefix##CommandHandler; \ ++ (var).linkTimerHandlerPtr = name_prefix##TimerHandler; \ ++ (var).linkCloseHandlerPtr = name_prefix##CloseHandler; \ ++ \ ++ (var).linkSendHandlerPtr = name_prefix##SendFrameHandler; \ ++ (var).linkReturnHandlerPtr = name_prefix##ReturnFrameHandler; \ ++ \ ++ (var).linkVcAllocateHandlerPtr = name_prefix##VcAllocateHandler; \ ++ (var).linkVcFreeHandlerPtr = name_prefix##VcFreeHandler; \ ++ (var).linkVcActivateHandlerPtr = name_prefix##VcActivateHandler; \ ++ (var).linkVcDeactivateHandlerPtr = name_prefix##VcDeactivateHandler; \ ++ (var).linkVcConfigureHandlerPtr = name_prefix##VcConfigureHandler; \ ++ \ ++ (var).linkVc2IdHandlerPtr = name_prefix##Vc2IdHandler; \ ++ (var).linkVcId2VcHandlerPtr = name_prefix##VcId2VcHandler; \ ++ (var).linkGetFramePoolHandlerPtr = name_prefix##GetFramePoolHandler; \ ++ \ ++ (var).linkTxDataHandlerPtr = name_prefix##TxDataHandler; \ ++ (var).linkRxDataHandlerPtr = name_prefix##RxDataHandler; \ ++} while (0) ++ ++#endif ++ ++typedef struct ++ { ++ dslFrameHandlerType rxIndicateHandlerPtr; ++ dslFrameHandlerType txCompleteHandlerPtr; ++ dslStatusHandlerType statusHandlerPtr; ++ } upperLayerFunctions; ++ ++ ++/* ++ * Debug data ++ */ ++#define kDslFirstDebugData 1000 ++#define kDslXmtPerSymTimeCompData (kDslFirstDebugData + 0) ++#define kDslRcvPerSymTimeCompData (kDslFirstDebugData + 1) ++#define kDslXmtAccTimeCompData (kDslFirstDebugData + 2) ++#define kDslRcvAccTimeCompData (kDslFirstDebugData + 3) ++#define kDslRcvPilotToneData (kDslFirstDebugData + 4) ++#define kDslTEQCoefData (kDslFirstDebugData + 5) ++#define kDslTEQInputData (kDslFirstDebugData + 6) ++#define kDslTEQOutputData (kDslFirstDebugData + 7) ++#define kDslRcvFFTInputData (kDslFirstDebugData + 8) ++#define kDslRcvFFTOutputData (kDslFirstDebugData + 9) ++#define kDslRcvCarrierSNRData (kDslFirstDebugData + 10) ++#define kDslXmtToneOrderingData (kDslFirstDebugData + 11) ++#define kDslRcvToneOrderingData (kDslFirstDebugData + 12) ++#define kDslXmtGainData (kDslFirstDebugData + 13) ++#define kDslRcvGainData (kDslFirstDebugData + 14) ++#define kDslMseData (kDslFirstDebugData + 15) ++#define kDslFEQOutErrData (kDslFirstDebugData + 16) ++#define kDslFEQCoefData (kDslFirstDebugData + 17) ++#define kDslShowtimeMseData (kDslFirstDebugData + 18) ++#define kDslTimeEstimationHWPhaseTweak (kDslFirstDebugData + 24) ++#define kDslSlicerInput (kDslFirstDebugData + 40) ++#define kDslXmtConstellations (kDslFirstDebugData + 41) ++#define kDslSnr1ShiftData (kDslFirstDebugData + 50) ++#define kDslSnr1InputData (kDslFirstDebugData + 51) ++#define kDslSnr1ReverbAvgData (kDslFirstDebugData + 52) ++#define kDslAnnexCFextSnrData (kDslFirstDebugData + 53) ++#define kDslAnnexCNextSnrData (kDslFirstDebugData + 54) ++#define kG994p1OutputXmtSample (kDslFirstDebugData + 100) ++#define kG994p1OutputMicroBit (kDslFirstDebugData + 101) ++#define kG994p1OutputBit (kDslFirstDebugData + 102) ++#define kG994p1OutputTimer (kDslFirstDebugData + 103) ++ ++/****************************************************************************/ ++/* 2. Constant definitions. */ ++/* */ ++/* 2.1 Defininitive constants */ ++/****************************************************************************/ ++ ++/* dslDirectionType */ ++ ++#define kATU_C 0 ++#define kATU_R 1 ++ ++/* ATM setup maps */ ++ ++#define kAtmCallMgrEnabled 0x00000001 /* Bit 0 */ ++#define kAtmAAL1FecEnabledMask 0x00000006 /* Bit 1 */ ++#define kAtmAAL1HiDelayFecEnabled 0x00000002 /* Bit 2 */ ++#define kAtmAAL1LoDelayFecEnabled 0x00000004 /* Bit 3 */ ++ ++/* dslLinkLayerType */ ++ ++#define kNoDataLink 0 ++#define kAtmLink 0x00000001 ++#define kAtmPhyLink 0x00000002 ++#define kDslPacketLink 0x00000003 ++#define kDslPacketPhyLink 0x00000004 ++ ++/* dslModulationType */ ++#define kNoCommonModulation 0x00000000 ++#define kG994p1 0x00000020 /* G.994.1 or G.hs */ ++#define kT1p413 0x00000040 /* T1.413 handshaking */ ++#define kG992p1AnnexA 0x00000001 /* G.992.1 or G.dmt Annex A */ ++#define kG992p1AnnexB 0x00000002 /* G.992.1 or G.dmt Annex B */ ++#define kG992p1AnnexC 0x00000004 /* G.992.1 or G.dmt Annex C */ ++#define kG992p2AnnexAB 0x00000008 /* G.992.2 or G.lite Annex A/B */ ++#define kG992p2AnnexC 0x00000010 /* G.992.2 or G.lite Annex C */ ++#define kG992p3AnnexA 0x00000100 /* G.992.3 or G.DMTbis Annex A */ ++#define kG992p3AnnexB 0x00000200 /* G.992.3 or G.DMTbis Annex A */ ++#define kG992p1AnnexI 0x00000400 /* G.992.1 Annex I */ ++#define kG992p5AnnexA 0x00010000 /* G.992.5 Annex A */ ++#define kG992p5AnnexB 0x00020000 /* G.992.5 Annex B */ ++#define kG992p5AnnexI 0x00040000 /* G.992.5 Annex I */ ++#define kG992p3AnnexM 0x00080000 /* G.992.3 Annex M */ ++#define kG992p5AnnexM 0x01000000 /* G.992.5 Annex M */ ++ ++/* demodCapabilities bitmap */ ++#define kEchoCancellorEnabled 0x00000001 ++#define kSoftwareTimeErrorDetectionEnabled 0x00000002 ++#define kSoftwareTimeTrackingEnabled 0x00000004 ++#define kDslTrellisEnabled 0x00000008 ++#define kHardwareTimeTrackingEnabled 0x00000010 ++#define kHardwareAGCEnabled 0x00000020 ++#define kDigitalEchoCancellorEnabled 0x00000040 ++#define kReedSolomonCodingEnabled 0x00000080 ++#define kAnalogEchoCancellorEnabled 0x00000100 ++#define kT1p413Issue1SingleByteSymMode 0x00000200 ++#define kDslAturXmtPowerCutbackEnabled 0x00000400 ++#ifdef G992_ANNEXC_LONG_REACH ++#define kDslAnnexCPilot48 0x00000800 ++#define kDslAnnexCReverb33_63 0x00001000 ++#endif ++#ifdef G992_ANNEXC ++#define kDslCentilliumCRCWorkAroundEnabled 0x00002000 ++#else ++#define kDslEnableRoundUpDSLoopAttn 0x00002000 ++#endif ++#define kDslBitSwapEnabled 0x00004000 ++#define kDslADILowRateOptionFixDisabled 0x00008000 ++#define kDslAnymediaGSPNCrcFixEnabled 0x00010000 ++#define kDslMultiModesPreferT1p413 0x00020000 ++#define kDslT1p413UseRAck1Only 0x00040000 ++#define kDslUE9000ADI918FECFixEnabled 0x00080000 ++#define kDslG994AnnexAMultimodeEnabled 0x00100000 ++#define kDslATUCXmtPowerMinimizeEnabled 0x00200000 ++#define kDropOnDataErrorsDisabled 0x00400000 ++#define kDslSRAEnabled 0x00800000 ++ ++#define kDslT1p413HigherToneLevelNeeded 0x01000000 ++#define kDslT1p413SubsampleAlignmentEnabled 0x02000000 ++#define kDslT1p413DisableUpstream2xIfftMode 0x04000000 ++ ++/* test mode related demodCapabilities, for internal use only */ ++#define kDslTestDemodCapMask 0xF8000000 ++#define kDslSendReverbModeEnabled 0x10000000 ++#define kDslSendMedleyModeEnabled 0x20000000 ++#define kDslAutoRetrainDisabled 0x40000000 ++#define kDslPllWorkaroundEnabled 0x80000000 ++#define kDslAfeLoopbackModeEnabled 0x08000000 ++ ++/* demodCapabilities bitmap2 */ ++ ++#define kDslAnnexCProfile1 0x00000001 ++#define kDslAnnexCProfile2 0x00000002 ++#define kDslAnnexCProfile3 0x00000004 ++#define kDslAnnexCProfile4 0x00000008 ++#define kDslAnnexCProfile5 0x00000010 ++#define kDslAnnexCProfile6 0x00000020 ++#define kDslAnnexCPilot64 0x00000040 ++#define kDslAnnexCPilot48 0x00000080 ++#define kDslAnnexCPilot32 0x00000100 ++#define kDslAnnexCPilot16 0x00000200 ++#define kDslAnnexCA48B48 0x00000400 ++#define kDslAnnexCA24B24 0x00000800 ++#define kDslAnnexCReverb33_63 0x00001000 ++#define kDslAnnexCCReverb6_31 0x00002000 ++ ++#define kDslAnnexIShapedSSVI 0x00004000 ++#define kDslAnnexIFlatSSVI 0x00008000 ++ ++#define kDslAnnexIPilot64 0x00010000 ++#define kDslAnnexIA48B48 0x00020000 ++#define kDslAnnexIPilot128 0x00040000 ++#define kDslAnnexIPilot96 0x00080000 ++ ++/* Features bitmap */ ++#define kG992p2RACK1 0x00000001 ++#define kG992p2RACK2 0x00000002 ++#define kG992p2DBM 0x00000004 ++#define kG992p2FastRetrain 0x00000008 ++#define kG992p2RS16 0x00000010 ++#define kG992p2ClearEOCOAM 0x00000020 ++#define kG992NTREnabled 0x00000040 ++#define kG992p2EraseAllStoredProfiles 0x00000080 ++#define kG992p2FeaturesNPar2Mask 0x0000003B ++#define kG992p2FeaturesNPar2Shift 0 ++ ++#define kG992p1RACK1 0x00000100 ++#define kG992p1RACK2 0x00000200 ++#define kG992p1STM 0x00000800 ++#define kG992p1ATM 0x00001000 ++#define kG992p1ClearEOCOAM 0x00002000 ++#define kG992p1FeaturesNPar2Mask 0x00003B00 ++#define kG992p1FeaturesNPar2Shift 8 ++#define kG992p1DualLatencyUpstream 0x00004000 ++#define kG992p1DualLatencyDownstream 0x00008000 ++#define kG992p1HigherBitRates 0x40000000 ++ ++#if defined(G992P1_ANNEX_I) ++#define kG992p1HigherBitRates1over3 0x80000000 ++#define kG992p1AnnexIShapedSSVI 0x00000001 ++#define kG992p1AnnexIFlatSSVI 0x00000002 ++#define kG992p1AnnexIPilotFlag 0x00000008 ++#define kG992p1AnnexIPilot64 0x00000001 ++#define kG992p1AnnexIPilot128 0x00000004 ++#define kG992p1AnnexIPilot96 0x00000008 ++#define kG992p1AnnexIPilotA48B48 0x00000010 ++#endif ++ ++#define kG992p1AnnexBRACK1 0x00010000 ++#define kG992p1AnnexBRACK2 0x00020000 ++#define kG992p1AnnexBUpstreamTones1to32 0x00040000 ++#define kG992p1AnnexBSTM 0x00080000 ++#define kG992p1AnnexBATM 0x00100000 ++#define kG992p1AnnexBClearEOCOAM 0x00200000 ++#define kG992p1AnnexBFeaturesNPar2Mask 0x003F0000 ++#define kG992p1AnnexBFeaturesNPar2Shift 16 ++ ++#define kG992p1AnnexCRACK1 0x01000000 ++#define kG992p1AnnexCRACK2 0x02000000 ++#define kG992p1AnnexCDBM 0x04000000 ++#define kG992p1AnnexCSTM 0x08000000 ++#define kG992p1AnnexCATM 0x10000000 ++#define kG992p1AnnexCClearEOCOAM 0x20000000 ++#define kG992p1AnnexCFeaturesNPar2Mask 0x3F000000 ++#define kG992p1AnnexCFeaturesNPar2Shift 24 ++ ++#define kG992p1HigherBitRates1over3 0x80000000 ++ ++/* auxFeatures bitmap */ ++#define kG994p1PreferToExchangeCaps 0x00000001 ++#define kG994p1PreferToDecideMode 0x00000002 ++#define kG994p1PreferToMPMode 0x00000004 ++#define kAfePwmSyncClockShift 3 ++#define kAfePwmSyncClockMask (0xF << kAfePwmSyncClockShift) ++#define AfePwmSyncClockEnabled(val) (((val) & kAfePwmSyncClockMask) != 0) ++#define AfePwmGetSyncClockFreq(val) ((((val) & kAfePwmSyncClockMask) >> kAfePwmSyncClockShift) - 1) ++#define AfePwmSetSyncClockFreq(val,freq) ((val) |= ((((freq)+1) << kAfePwmSyncClockShift) & kAfePwmSyncClockMask)) ++ ++/* SubChannel Info bitMap for G992p1 */ ++#define kSubChannelASODownstream 0x00000001 ++#define kSubChannelAS1Downstream 0x00000002 ++#define kSubChannelAS2Downstream 0x00000004 ++#define kSubChannelAS3Downstream 0x00000008 ++#define kSubChannelLSODownstream 0x00000010 ++#define kSubChannelLS1Downstream 0x00000020 ++#define kSubChannelLS2Downstream 0x00000040 ++#define kSubChannelLS0Upstream 0x00000080 ++#define kSubChannelLS1Upstream 0x00000100 ++#define kSubChannelLS2Upstream 0x00000200 ++#define kSubChannelInfoOctet1Mask 0x0000001F ++#define kSubChannelInfoOctet2Mask 0x000003E0 ++#define kSubChannelInfoOctet1Shift 0 ++#define kSubChannelInfoOctet2Shift 5 ++ ++/****************************************************************************/ ++/* 3. Interface functions. */ ++/* */ ++/****************************************************************************/ ++ ++#ifdef G992P1 ++#if defined(G992P1_ANNEX_I2X) || defined(G992P5) ++/* lke */ ++#define kDslSamplingFreq 4416000 ++#define kDslMaxFFTSize 1024 ++#define kDslMaxFFTSizeShift 10 ++#elif defined(G992P1_ANNEX_I4X) ++#define kDslSamplingFreq 8832000 ++#define kDslMaxFFTSize 2048 ++#define kDslMaxFFTSizeShift 11 ++#elif defined(G992P1_ANNEX_I8X) ++#define kDslSamplingFreq 17664000 ++#define kDslMaxFFTSize 4096 ++#define kDslMaxFFTSizeShift 12 ++#else ++#define kDslSamplingFreq 2208000 ++#define kDslMaxFFTSize 512 ++#define kDslMaxFFTSizeShift 9 ++#endif ++#else ++#define kDslSamplingFreq 1104000 ++#define kDslMaxFFTSize 256 ++#define kDslMaxFFTSizeShift 8 ++#endif ++ ++#if defined(G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ) ++#define kDslATURUpstreamSamplingFreq 276000 ++#define kDslATURFFTSizeShiftUpstream 6 ++#elif defined(G992_ATUR_UPSTREAM_SAMPLING_FREQ_552KHZ) ++#define kDslATURUpstreamSamplingFreq 552000 ++#define kDslATURFFTSizeShiftUpstream 7 ++#else ++#define kDslATURUpstreamSamplingFreq kDslSamplingFreq ++#define kDslATURFFTSizeShiftUpstream kDslMaxFFTSizeShift ++#endif ++ ++#if defined(G992_ATUC_UPSTREAM_SAMPLING_FREQ_276KHZ) ++#define kDslATUCUpstreamSamplingFreq 276000 ++#define kDslATUCFFTSizeShiftUpstream 6 ++#elif defined(G992_ATUC_UPSTREAM_SAMPLING_FREQ_552KHZ) ++#define kDslATUCUpstreamSamplingFreq 552000 ++#define kDslATUCFFTSizeShiftUpstream 7 ++#else ++#define kDslATUCUpstreamSamplingFreq kDslSamplingFreq ++#define kDslATUCFFTSizeShiftUpstream kDslMaxFFTSizeShift ++#endif ++ ++#define kDslMaxSamplesPerSymbol (kDslMaxFFTSize+kDslMaxFFTSize/16) ++ ++#if defined(G992P1_ANNEX_I) || defined(G992P5) ++#define kDslMaxTEQLength 32 ++#else ++#define kDslMaxTEQLength 16 ++#endif ++ ++#define kDslMaxSymbolBlockSize 1 ++#define kDslMaxSampleBlockSize (kDslMaxSymbolBlockSize*kDslMaxSamplesPerSymbol) ++ ++#ifdef G992_ANNEXC ++#define kG992AnnexCXmtToRcvPathDelay 512 /* In samples at kDslSamplingFreq */ ++#endif ++ ++/*** For compatibility with existing test codes ***/ ++#if !defined(TARG_OS_RTEMS) ++typedef dslStatusCode modemStatusCode; ++typedef dslStatusStruct modemStatusStruct; ++typedef dslStatusHandlerType statusHandlerType; ++typedef dslCommandCode modemCommandCode; ++typedef dslCommandStruct modemCommandStruct; ++typedef dslCommandHandlerType commandHandlerType; ++#endif ++ ++extern void SM_DECL SoftDslSetRefData (void *gDslVars, ulong refData); ++extern ulong SM_DECL SoftDslGetRefData (void *gDslVars); ++extern int SM_DECL SoftDslGetMemorySize(void); ++extern void SM_DECL SoftDslInit (void *gDslVars); ++extern void SM_DECL SoftDslReset (void *gDslVars); ++extern void SM_DECL SoftDslLineHandler (void *gDslVars, int rxNSamps, int txNSamps, short *rcvPtr, short *xmtPtr) FAST_TEXT; ++extern Boolean SM_DECL SoftDslCommandHandler (void *gDslVars, dslCommandStruct *cmdPtr); ++ ++/* swap Lmem functions */ ++#if defined(bcm47xx) && defined(SWAP_LMEM) ++extern int SoftDslSwapLmem(void *gDslVars, int sectionN, int imageN); ++extern void init_SoftDslSwapLmem(void); ++#endif ++ ++/* SoftDsl time functions */ ++ ++extern ulong SM_DECL SoftDslGetTime(void *gDslVars); ++#define __SoftDslGetTime(gv) gDslGlobalVarPtr->execTime ++ ++extern void SM_DECL SoftDslTimer(void *gDslVars, ulong timeMs); ++ ++/* SoftDsl IO functions */ ++ ++extern void SM_DECL SoftDslClose (void *gDslVars); ++extern int SM_DECL SoftDslSendFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); ++extern int SM_DECL SoftDslReturnFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); ++ ++/* SoftDsl connection functions */ ++ ++extern void* SM_DECL SoftDslVcAllocate(void *gDslVars, dslVcParams *pVcParams); ++extern void SM_DECL SoftDslVcFree(void *gDslVars, void *pVc); ++extern Boolean SM_DECL SoftDslVcActivate(void *gDslVars, void *pVc); ++extern void SM_DECL SoftDslVcDeactivate(void *gDslVars, void *pVc); ++extern Boolean SM_DECL SoftDslVcConfigure(void *gDslVars, void *pVc, ulong mid, dslVcParams *pVcParams); ++ ++/* Special functions for LOG support */ ++ ++extern ulong SM_DECL SoftDslVc2Id(void *gDslVars, void *pVc); ++extern void* SM_DECL SoftDslVcId2Vc(void *gDslVars, ulong vcId); ++extern void* SM_DECL SoftDslGetFramePool(void *gDslVars); ++ ++/* Functions for host mode execution */ ++ ++extern void* SM_DECL SoftDslRxCellHeaderHandler (void *gDslVars, ulong hdr, uchar hdrHec); ++extern void* SM_DECL SoftDslRxCellDataHandler (void *gDslVars, int, void*); ++extern void* SM_DECL SoftDslTxCellHandler (void *gDslVars, int*, void*); ++extern Boolean SM_DECL SoftDslPhyCommandHandler (void *gDslVars, dslCommandStruct *cmdPtr); ++ ++/* Functions getting OEM parameters including G994 non standard info management */ ++ ++extern char* SM_DECL SoftDslGetTrainingVendorIDString(void *gDslVars); ++extern char* SM_DECL SoftDslGetVendorIDString(void *gDslVars); ++extern char* SM_DECL SoftDslGetSerialNumberString(void *gDslVars); ++extern char* SM_DECL SoftDslGetRevString(void *gDslVars); ++extern int SM_DECL SoftDslRevStringSize(void *gDslVars); ++extern int SM_DECL SoftDslSerNumStringSize(void *gDslVars); ++ ++extern void* SM_DECL SoftDslGetG994p1RcvNonStdInfo(void *gDslVars, ulong *pLen); ++extern void* SM_DECL SoftDslGetG994p1XmtNonStdInfo(void *gDslVars, ulong *pLen); ++ ++#ifdef G997_1_FRAMER ++ ++/* G997 functions */ ++ ++extern int SM_DECL SoftDslG997SendFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); ++extern int SM_DECL SoftDslG997ReturnFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); ++ ++#endif ++ ++#ifdef ADSL_MIB ++extern void * SM_DECL SoftDslMibGetData (void *gDslVars, int dataId, void *pAdslMibData); ++#endif ++ ++#define SoftDsl SoftDslLineHandler ++#define kSoftDslMaxMemorySize (32768*16384) ++ ++/* ++ * Internal functions ++ */ ++ ++extern void SoftDslStatusHandler (void *gDslVars, dslStatusStruct *status) FAST_TEXT; ++extern void SoftDslInternalStatusHandler (void *gDslVars, dslStatusStruct *status); ++ ++/* ++ * DSL OS functions ++ */ ++ ++#ifdef DSL_OS ++ ++#define SoftDslIsBgAvailable(gDslVars) (DSLOS_THREAD_INACTIVE == DslOsGetThreadState(&(gDslGlobalVarPtr->tcbDslBg))) ++#define SoftDslGetBgThread(gDslVars) \ ++ ((DSLOS_THREAD_INACTIVE != DslOsGetThreadState(&(gDslGlobalVarPtr->tcbDslBg))) ? &gDslGlobalVarPtr->tcbDslBg : NULL) ++#define SoftDslBgStart(gDslVars, pFunc) \ ++ DslOsCreateThread(&gDslGlobalVarPtr->tcbDslBg, DSLOS_PRIO_HIGHEST - 10, pFunc, gDslVars, \ ++ WB_ADDR(gDslGlobalVarPtr->bgStack), sizeof(gDslGlobalVarPtr->bgStack)) ++#define SoftDslBgStop(gDslVars) DslOsDeleteThread(&gDslGlobalVarPtr->tcbDslBg) ++ ++#define SoftDslEnterCritical() DslOsEnterCritical() ++#define SoftDslLeaveCritical(id) DslOsLeaveCritical(id) ++ ++#else ++ ++#define SoftDslIsBgAvailable(gDslVars) 1 ++#define SoftDslGetBgThread(gDslVars) 1 ++#define SoftDslBgStart(gDslVars, pFunc) (*pFunc)(gDslVars) ++#define SoftDslBgStop(gDslVars) ++ ++#define SoftDslEnterCritical() 0 ++#define SoftDslLeaveCritical(id) ++ ++#endif ++ ++/* ++ * DSL frames and native frame functions ++ */ ++ ++DslFrameDeclareFunctions (DslFrameNative) ++ ++/* ++ * These functions are for testing purpose, they are defined outside. ++ */ ++#ifdef STACK_SIZE_REQUIREMENT_TEST ++extern void StackSizeTestInitializeStackBeforeEntry(void); ++extern void StackSizeTestCheckStackAfterExit(void); ++extern void StackSizeTestBackupStack(void); ++extern void StackSizeTestRestoreStack(void); ++#endif /* STACK_SIZE_REQUIREMENT_TEST */ ++ ++#ifdef NEC_NSIF_WORKAROUND ++#define SoftDslGetG994NsStatus(gDslVars) (gDslGlobalVarPtr->G994NsStatus) ++#define SoftDslGetG994NsFailCounter(gDslVars) (gDslGlobalVarPtr->G994NsFailCounter) ++#endif ++ ++#endif /* SoftDslHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModem.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModem.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModem.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModem.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,3128 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * SoftModem.h ++ * ++ * ++ * Description: ++ * This file contains the exported interface for SoftModem.c ++ * ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.16 $ ++ * ++ * $Id: SoftModem.h,v 1.16 2004/04/14 21:16:51 ilyas Exp $ ++ * ++ * $Log: SoftModem.h,v $ ++ * Revision 1.16 2004/04/14 21:16:51 ilyas ++ * Merged with the latest changes in ADSL driver ++ * ++ * Revision 1.15 2004/04/13 00:56:10 ilyas ++ * Merged the latest ADSL driver changes for RTEMS ++ * ++ * Revision 1.14 2004/04/13 00:16:59 ilyas ++ * Merged the latest ADSL driver changes ++ * ++ * Revision 1.13 2003/02/22 05:07:11 ilyas ++ * Added VendorID for T1.413 mode ++ * ++ * Revision 1.12 2002/10/03 19:34:24 ilyas ++ * Added size for EOC serial number register ++ * ++ * Revision 1.11 2002/09/07 01:37:22 ilyas ++ * Added support for OEM parameters ++ * ++ * Revision 1.10 2001/12/13 02:25:34 ilyas ++ * Added definitions for G997 ++ * ++ * Revision 1.9 2001/11/30 05:56:34 liang ++ * Merged top of the branch AnnexBDevelopment onto top of the tree. ++ * ++ * Revision 1.7.2.2 2001/11/27 02:32:05 liang ++ * Combine vendor ID, serial #, and version number into SoftModemVersionNumber.c. ++ * ++ * Revision 1.7.2.1 2001/10/03 01:44:10 liang ++ * Merged with codes from main tree (tag SoftDsl_2_18). ++ * ++ * Revision 1.8 2001/09/21 19:19:01 ilyas ++ * Minor fixes for VxWorks build ++ * ++ * Revision 1.7 2000/07/17 21:08:16 lkaplan ++ * removed global pointer ++ * ++ * Revision 1.6 2000/05/03 04:09:11 ilyas ++ * Added ID for ATM log data ++ * ++ * Revision 1.5 2000/04/01 01:07:44 liang ++ * Changed file names and some module names. ++ * ++ * Revision 1.4 2000/03/02 20:18:12 ilyas ++ * Added test status code for ATM VC finished ++ * ++ * Revision 1.3 1999/08/05 20:02:11 liang ++ * Merged with the softmodem top of the tree on 08/04/99. ++ * ++ * Revision 1.2 1999/01/27 22:19:08 liang ++ * Merge with SoftModem_3_1_02. ++ * Include SoftDsl.h conditionlly so that the test utilities from SoftModem ++ * can be used without major change. It can be merged easily to SoftModem. ++ * ++ * Revision 1.170 1998/12/22 00:52:52 liang ++ * Added auxFeatures bit kV8HoldANSamUntilDetCI. When it is set, ANSam won't be ++ * sent until CI is detected (normally ANSam will be sent after 200ms). This is ++ * useful in V34 half duplex fax mode. ++ * ++ * Revision 1.169 1998/12/19 04:46:52 mwg ++ * Added bits for fax/data calling tones ++ * ++ * Revision 1.168 1998/12/17 02:46:10 scott ++ * Removed overlay-related commands/statuses and added ++ * kSetTrainingDelayReductionCmd ++ * ++ * Revision 1.167 1998/12/12 03:17:42 scott ++ * Added overlay commands and statuses ++ * ++ * Revision 1.166 1998/12/02 05:34:23 mwg ++ * Fixed a problem with bong tone detection ++ * ++ * Revision 1.165 1998/11/26 00:22:44 yura ++ * Added two more log data types: modulatorInputData & modulatorOutputData ++ * ++ * Revision 1.164 1998/11/19 03:08:04 mwg ++ * Added kSetCallProgressParamsCmd ++ * ++ * Revision 1.163 1998/11/18 23:00:03 liang ++ * Added a separate command kLoopbackTestAutoRespEnableCmd to enable or disable ++ * the loopback test auto respond feature when the modem is already on-line. ++ * ++ * Revision 1.162 1998/11/13 20:50:21 scott ++ * SoftModemInternalStatusHandler is now SM_DECL as well ++ * ++ * Revision 1.161 1998/11/13 20:42:25 scott ++ * Added SM_DECL type to entrypoint functions ++ * ++ * Revision 1.160 1998/11/13 03:02:54 scott ++ * Added SoftModemTimer prototype. ++ * Also include V.8bis types if AT_COMMANDS_V8BIS is defined. ++ * ++ * Revision 1.159 1998/11/12 01:22:46 scott ++ * Increased number of AT registers to 46 ++ * ++ * Revision 1.158 1998/11/05 22:35:18 yura ++ * Added two more S-registers ++ * ++ * Revision 1.157 1998/11/05 03:09:54 mwg ++ * Added kLapmRetryFailed to the list of LAPM errors ++ * ++ * Revision 1.156 1998/11/05 00:13:20 liang ++ * Add new connectionInfo status kLoopbackSelfTestNewErrs to report ++ * new bit errors whenever it happens. ++ * ++ * Revision 1.155 1998/11/04 07:11:33 mwg ++ * Moved declaration for SoftModemATPrintf() to SoftModem.h ++ * ++ * Revision 1.154 1998/10/29 07:24:49 mwg ++ * *** empty log message *** ++ * ++ * Revision 1.153 1998/10/15 02:09:37 luisgm ++ * added separate data rate mask for Flex to dataPumpCapabilities structure ++ * ++ * Revision 1.152 1998/10/14 00:12:15 scott ++ * Added kMnpOOBFrameCmd and command.frameSpec ++ * ++ * Revision 1.151 1998/10/09 02:19:22 luisgm ++ * added FlexV8bisStruct member to dataPumpCapabilities struc to store flex v8bis info, added define for kFlexSkipV8bis ++ * ++ * Revision 1.150 1998/10/06 19:36:33 mwg ++ * Limited 56K rates to 53K ++ * ++ * Revision 1.149 1998/10/03 03:43:38 ilyas ++ * Added status codes for Audio ++ * ++ * Revision 1.148 1998/10/01 02:03:17 mwg ++ * Added external pulse dialer option ++ * ++ * Revision 1.147 1998/09/30 01:44:26 mwg ++ * Added new functions SoftModemGetWriteBufferSize() & SoftModemGetReadBufferSize() ++ * ++ * Revision 1.146 1998/09/22 03:44:38 scott ++ * Added ALWAYS_LONG_ALIGN() macro ++ * ++ * Revision 1.145 1998/09/21 21:49:22 scott ++ * Added logDataCodes for mnpDecoder(Input/Output)Data ++ * ++ * Revision 1.144 1998/08/31 22:57:21 luisgm ++ * added constants for Flex data rates + kFlexEventTRN2AFinished ++ * ++ * Revision 1.143 1998/08/18 05:09:53 mwg ++ * Increased AT command buffer size to 128 ++ * ++ * Revision 1.142 1998/08/18 03:45:54 ilyas ++ * Integrated Audio into V70 test ++ * ++ * Revision 1.141 1998/08/14 17:46:04 ilyas ++ * Integrated Audio and G729a ++ * ++ * Revision 1.140 1998/08/10 21:42:19 mwg ++ * Added space and mark parity ++ * ++ * Revision 1.139 1998/08/08 03:39:33 scott ++ * Moved the C6xDefs and PentiumDefs includes before the internal function ++ * prototypes (to permit their redefinitions) ++ * ++ * Revision 1.138 1998/08/07 20:37:27 yura ++ * Added new S-register for &T commands ++ * ++ * Revision 1.137 1998/08/01 05:22:09 mwg ++ * Implemented split memory model ++ * ++ * Revision 1.136 1998/07/22 02:12:22 liang ++ * Added self test mode for loopback test. ++ * ++ * Revision 1.135 1998/07/21 01:19:03 liang ++ * Changed loopback test command parameter interface to use regular modeSpec. ++ * ++ * Revision 1.134 1998/07/18 03:52:10 liang ++ * Added V54 loop 2 test for V22. ++ * ++ * Revision 1.133 1998/07/15 02:45:03 mwg ++ * Added new connection info code: kPCMSpectralShapingBits ++ * ++ * Revision 1.132 1998/07/15 00:18:48 liang ++ * Add special turn off command for V34 fax to handle different turn off procedures. ++ * ++ * Revision 1.131 1998/07/13 22:19:49 liang ++ * Add V8 CI detection status and ANSam disable aux feature. ++ * ++ * Revision 1.130 1998/07/08 17:09:13 scott ++ * Added USE_LONG_ALIGN; support for 6 and PentiumDefs.h files ++ * ++ * Revision 1.129 1998/07/03 23:28:13 mwg ++ * Added Fax Class 2 defines ++ * ++ * Revision 1.128 1998/07/03 23:17:33 mwg ++ * Insuread command/status structures are long aligned ++ * ++ * Revision 1.127 1998/06/23 16:48:01 mwg ++ * Fixed a longstanding problem typical for Win95 VxD: whenever new ++ * VxD is intalled the confuguration profile may not match the old one but ++ * since the crc is correct it is still being downloaded. To avoid the problem ++ * a crc for the version number was added to avoid confusion between profiles ++ * of different versions. ++ * ++ * Revision 1.126 1998/06/19 21:04:06 liang ++ * Add auxiliary feature bit kV90ServerNotDetSbarAfterJdbarFix. ++ * ++ * Revision 1.125 1998/06/11 22:48:14 liang ++ * Add kPCM28000bpsShift constant. ++ * ++ * Revision 1.124 1998/06/05 22:11:51 liang ++ * New V90 DIL works through data mode. ++ * ++ * Revision 1.123 1998/06/01 23:03:41 liang ++ * Add v90RcvdDilDiffData logging. ++ * ++ * Revision 1.122 1998/06/01 21:24:38 mwg ++ * Changed some of the names. ++ * ++ * Revision 1.121 1998/05/13 04:55:22 mwg ++ * Now passing the number of spectral shaping bits in aux features ++ * ++ * Revision 1.120 1998/05/13 02:53:13 liang ++ * Add field "value" to command param structure. ++ * ++ * Revision 1.119 1998/05/12 04:42:23 mwg ++ * Replaced some of the status messages ++ * ++ * Revision 1.118 1998/05/11 23:36:10 mwg ++ * Added 8000Hz symbol rate to the map ++ * ++ * Revision 1.117 1998/05/05 04:28:39 liang ++ * V90 works up to data mode first version. ++ * ++ * Revision 1.116 1998/04/21 09:36:45 mwg ++ * Fixed a few problems for 16Khz and added 32Khz. ++ * ++ * Revision 1.115 1998/04/17 22:33:54 liang ++ * Added V90 DIL for mu-law PCM. ++ * ++ * Revision 1.114 1998/04/15 22:36:39 mwg ++ * Added new parameters to kDialCmd to allow individual control of each ++ * DTMF group attenuation. ++ * ++ * Revision 1.113 1998/04/15 18:16:22 ilyas ++ * Integrated V.8bis and changed coding of LinkLayerType to bitMap ++ * ++ * Revision 1.112 1998/04/15 07:59:06 mwg ++ * Added new status codes for V.90 ++ * ++ * Revision 1.111 1998/04/11 00:29:16 mwg ++ * Fixed the warnings which appeared when Irix builds were upgraded to ++ * gcc 2.8.1 ++ * ++ * Revision 1.110 1998/04/11 00:25:01 ilyas ++ * More V.70 statuses ++ * ++ * Revision 1.109 1998/04/10 23:29:31 mwg ++ * Added new field to capabilities: dataRates56K ++ * ++ * Revision 1.108 1998/04/09 02:02:56 mwg ++ * Added status for Ja detection. ++ * ++ * Revision 1.107 1998/04/03 02:05:30 ilyas ++ * More V.70 commands added ++ * ++ * Revision 1.106 1998/04/02 06:15:39 mwg ++ * Added coding type (Mu-law/A-law) status reporting. ++ * ++ * Revision 1.105 1998/03/30 09:53:57 mwg ++ * Added definition for k56Flex modulation for future use. ++ * ++ * Revision 1.104 1998/03/27 17:56:09 ilyas ++ * Added definitions for V.70 ++ * ++ * Revision 1.103 1998/03/26 23:29:04 liang ++ * Added first version of IMD estimation. ++ * ++ * Revision 1.102 1998/03/20 04:37:26 mwg ++ * Increased the size of the nominal variance to 32 bit. ++ * ++ * Revision 1.101 1998/03/06 01:22:04 yura ++ * Improved Win95 VxD segmentation handling ++ * ++ * Revision 1.100 1998/03/06 01:06:18 liang ++ * Add initial version of V90 phase 1 and 2. ++ * ++ * Revision 1.99 1998/03/05 23:42:22 mwg ++ * (hxl) Implemented enable/disable call waiting command. ++ * ++ * Revision 1.98 1998/02/26 06:13:06 mwg ++ * Increased the number of AT S-registers to account for newly introduced ++ * S9 and S10. ++ * ++ * Revision 1.97 1998/02/25 18:18:25 scott ++ * Added v42bisCycleCount for V42BIS_THROUGHPUT_CONTROL ++ * ++ * Revision 1.96 1998/02/24 05:31:20 mwg ++ * Added stuff required by international version of AT command processor. ++ * ++ * Revision 1.95 1998/02/17 01:14:10 scott ++ * Reenabled sys/types.h for Linux builds ++ * ++ * Revision 1.94 1998/02/16 22:32:23 scott ++ * Changed copyright notice ++ * ++ * Revision 1.93 1998/02/16 22:17:44 scott ++ * Turned off include of sys/types.h for normal builds ++ * ++ * Revision 1.92 1998/02/16 21:53:28 scott ++ * Exclude sys/types.h for another compiler ++ * ++ * Revision 1.91 1998/02/09 18:24:10 scott ++ * Fixed ComplexShort type to work around bugs in MS and GreenHill compilers ++ * ++ * Revision 1.90 1998/01/27 01:37:36 mwg ++ * Added new log identifier for pcm infidelity data. ++ * ++ * Revision 1.89 1998/01/22 19:49:32 liang ++ * Add auxFeature bit kFaxV34HDXAllowAsymCtrlChan. ++ * ++ * Revision 1.88 1998/01/21 02:32:01 liang ++ * Add more V34 half duplex training progress codes. ++ * ++ * Revision 1.87 1997/12/23 03:28:25 liang ++ * Add more half duplex V34 related constants. ++ * ++ * Revision 1.86 1997/12/18 19:38:50 scott ++ * Added agcData log type. ++ * Added kDisableFaxFastClearDown demod capability ++ * ++ * Revision 1.85 1997/12/18 06:02:45 mwg ++ * Added a function to reenable DC offset tracking. ++ * ++ * Revision 1.84 1997/12/17 22:46:30 mwg ++ * Minor modifications to X2 escape status reporting. ++ * ++ * Revision 1.83 1997/12/16 06:49:45 mwg ++ * Implemented proper data rate reporting for PCM modem. ++ * ++ * Revision 1.82 1997/12/13 06:11:08 mwg ++ * Added X2 interface hooks ++ * ++ * Revision 1.81 1997/12/02 06:21:33 mwg ++ * Implemented kSetATRegister command. ++ * ++ * Revision 1.80 1997/11/27 02:11:41 liang ++ * Add code for half duplex V34 control channel. ++ * ++ * Revision 1.79 1997/11/19 19:52:48 guy ++ * Added constant to define V.34 half duplex operation ++ * ++ * Revision 1.78 1997/10/24 05:15:53 scott ++ * Added AGC and phase hit recovery to demodCapabilities ++ * ++ * Revision 1.77 1997/10/01 02:47:50 liang ++ * Add PCM interface. ++ * ++ * Revision 1.76 1997/09/29 15:48:04 yura ++ * Added #pragma statement for W95 Vxd ++ * ++ * Revision 1.75 1997/09/18 20:32:39 scott ++ * Do not include VxD support files if GENERATE_DEPENDENCIES is defined. ++ * ++ * Revision 1.74 1997/09/18 12:40:55 yura ++ * Removed #ifdef statments to be more robust ++ * ++ * Revision 1.73 1997/09/17 17:32:41 scott ++ * Do not include sys/types.h for 6 ++ * ++ * Revision 1.72 1997/08/08 00:53:48 mwg ++ * Added fields for LAP-M frames printout. ++ * Added fields in auxFeatures to pass preemphasis filter parameters ++ * to V.34 phase 3 when doing PTT testing. ++ * ++ * Revision 1.71 1997/08/06 03:41:45 yura ++ * Added a few includes and defines needed by Win 95 driver. ++ * ++ * Revision 1.70 1997/08/05 03:22:10 liang ++ * Add equalizer center tap adjustment calculation related constants. ++ * ++ * Revision 1.69 1997/07/29 02:44:19 mwg ++ * Added new field to dataPumpCapabilities structure. This field is not ++ * yet exposed to external interface and currently is only used to ++ * enable PTT testing. ++ * Added new commands: kStartDataModemPTTTestCmd & kStartDataModemLoopbackTestCmd ++ * ++ * Revision 1.68 1997/07/22 22:05:10 liang ++ * Change sample rate setup as a normal command. ++ * ++ * Revision 1.67 1997/07/21 23:23:30 liang ++ * Define SoftModemSetSampleRate as null when SAMPLE_RATE_CONVERSION is not defined. ++ * ++ * Revision 1.66 1997/07/21 22:38:36 liang ++ * Change sample rate converter structure so that sample rate can be changed ++ * on the fly (at very begining) to either 8KHz or 9600Hz. ++ * ++ * Revision 1.65 1997/07/21 20:22:01 mwg ++ * Added statusInfoData to the log identifiers. ++ * ++ * Revision 1.64 1997/07/16 20:40:07 scott ++ * Added multitone monitor fields ++ * ++ * Revision 1.63 1997/07/10 02:31:08 mwg ++ * 1. Added kRxFrameHDLCFlags detected status for the ++ * framingInfo. ++ * 2. Added kLapmMNPFrameDetected status to lapmStatusCode. ++ * 3. Increased the number of AT registers to 35 ++ * 4. Modified LinkLayerSpec structure in modemCommandStruc ++ * to provide the initial values of rxDataRate & ++ * txDataRate and RT delay for the cases when ++ * link layer is started *after* the data connection ++ * is established and the status snooper is unable ++ * to determine the rates and RT delay. ++ * 5. Added a few extra *empty* constant definitions for ++ * disabled features. ++ * ++ * Revision 1.62 1997/07/02 19:15:05 scott ++ * Added bits for Bel103 & Bel212 modulations. ++ * ++ * Revision 1.61 1997/07/02 05:15:16 mwg ++ * Added MNP code. ++ * ++ * Revision 1.60 1997/07/01 23:52:48 mwg ++ * Modified the record test setup to log and use all the commands. ++ * ++ * Revision 1.59 1997/06/25 19:11:26 mwg ++ * 1. Added new framingInfoCode values for Async framing error reporting; ++ * 2. Added a substructure to pass serial data format for kSetDTERate cmd; ++ * ++ * Revision 1.58 1997/05/28 02:05:08 liang ++ * Add PCM modem phase 2 codes. ++ * ++ * Revision 1.57 1997/05/12 21:55:08 liang ++ * Add call waiting tone detector module. ++ * ++ * Revision 1.56 1997/03/21 23:50:08 liang ++ * Added initial version of V8bis module to CVS tree. ++ * ++ * Revision 1.55 1997/03/19 18:35:05 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.54 1997/03/11 11:11:45 mwg ++ * Added code to report V42bis statistics. ++ * ++ * Revision 1.53 1997/03/04 06:21:08 mwg ++ * Added logging of most commands. ++ * ++ * Revision 1.52 1997/02/28 23:45:13 liang ++ * Added training progress status report kPhaseJitterDeactivated. ++ * ++ * Revision 1.51 1997/02/28 22:23:22 mwg ++ * Implemented the following features: ++ * - Cleardown for fax modulations V.27, V.29 V.17 ++ * - Rockwell compatible bitmap report (needed by a customer) ++ * ++ * Revision 1.50 1997/02/28 03:05:31 mwg ++ * Added more logging data types. ++ * ++ * Revision 1.49 1997/02/27 05:28:58 mwg ++ * Added RxFrameOK report. ++ * ++ * Revision 1.48 1997/02/27 01:48:53 liang ++ * Add kV8MenuDataWord1 and kV8MenuDataWord2 connectionInfo status. ++ * ++ * Revision 1.47 1997/02/24 02:30:27 mwg ++ * Added new log data: predictorErrData ++ * ++ * Revision 1.46 1997/02/22 03:00:22 liang ++ * Add echoCancelledSignalData. ++ * ++ * Revision 1.45 1997/02/21 01:26:42 liang ++ * Add six more bits for the Demodulator capabilities to deal with 2nd order ++ * time tracking & PLLs, as well as shorter NEEC & PFEEC, and front end HBF. ++ * ++ * Revision 1.44 1997/02/17 03:09:00 mwg ++ * Added LAPM statistics printout. ++ * ++ * Revision 1.43 1997/02/04 08:38:47 mwg ++ * Added dc cancelled samples printout. ++ * ++ * Revision 1.42 1997/01/29 21:40:28 mwg ++ * Changed the way timers work: now time is passed as Q4 ms instead of ticks. ++ * Completed the 8KHz front end implementation. ++ * Got rid of kSamplesPerSecond constant. ++ * ++ * Revision 1.41 1997/01/24 07:13:50 mwg ++ * Added new statuses for automoder. ++ * ++ * Revision 1.40 1997/01/23 02:03:08 mwg ++ * Replaced old sample rate conversion with the newer one. ++ * Still has to resolve the automoding issue. ++ * ++ * Revision 1.39 1997/01/21 00:55:04 mwg ++ * Added 8KHz front end functionality. ++ * ++ * Revision 1.38 1996/11/13 00:30:55 liang ++ * Add kAutoLoadReductionEnabled to demodCapabilities so that PFEEC, FEEC, IEEC ++ * can be disabled automatically, but for worst processor loading test they ++ * won't be disabled when this bit is not set. ++ * ++ * Revision 1.37 1996/11/07 23:07:18 mwg ++ * Rearranged global variables to allow V.17 short training. ++ * ++ * Revision 1.36 1996/09/17 23:55:05 liang ++ * Change kMaxDataBlockSize from 16 to 24 to handle high data rates. ++ * ++ * Revision 1.35 1996/09/05 19:43:39 liang ++ * Removed caller ID error status code kCallerIDUnknownMessageType, and ++ * added caller ID status codes kCallerIDUnknownMessage & kCallerIDWholeMessage. ++ * Changed the callerIDStatus report structure. ++ * ++ * Revision 1.34 1996/08/29 00:36:57 liang ++ * Added kLapmTxFrameStatus and kLapmRxFrameStatus. ++ * ++ * Revision 1.33 1996/08/27 22:56:01 liang ++ * Added kResetHardware status code. ++ * ++ * Revision 1.32 1996/08/23 23:35:35 liang ++ * Add kATDebugStatus and function SoftModemGetHybridDelay. ++ * ++ * Revision 1.31 1996/08/22 01:13:19 yg ++ * Added AT command processor. ++ * ++ * Revision 1.30 1996/08/12 21:46:47 mwg ++ * Added code to report capabilities. ++ * ++ * Revision 1.29 1996/08/10 01:59:59 mwg ++ * Added report of the sent rate sequence; ++ * ++ * Revision 1.28 1996/08/07 22:15:02 mwg ++ * Added new status reports: ++ * kRemoteFreqOffset ++ * kIEECDeactivated ++ * kPFEECDeactivated ++ * ++ * Revision 1.27 1996/06/27 05:15:48 mwg ++ * Added V.24 circuit status. ++ * ++ * Revision 1.26 1996/06/27 02:12:43 mwg ++ * Cleaned the code. ++ * ++ * Revision 1.25 1996/06/20 23:57:30 mwg ++ * Added new training progress status. ++ * ++ * Revision 1.24 1996/06/18 21:13:50 mwg ++ * Added trellis MSE data logging. ++ * ++ * Revision 1.23 1996/06/12 02:31:10 mwg ++ * Added new type: VeryLong ++ * ++ * Revision 1.22 1996/06/08 22:15:39 mwg ++ * Added new status report: kCleardownStarted ++ * Added new field for the features: kV34bisEnabled ++ * ++ * Revision 1.21 1996/05/31 00:29:11 liang ++ * Add feature bit kV34ExtraINFOPreamble. ++ * ++ * Revision 1.20 1996/05/30 23:28:31 mwg ++ * Replaced enums with #defines ++ * ++ * Revision 1.19 1996/05/25 00:38:27 mwg ++ * Added kProjectedDataRate training progress report. ++ * ++ * Revision 1.18 1996/05/24 23:27:15 mwg ++ * Added mode status codes. ++ * ++ * Revision 1.17 1996/05/10 05:39:59 liang ++ * Move the includes for DEBUG inside "ifndef SoftModemTypes" so that ++ * cap build won't break. ++ * ++ * Revision 1.16 1996/05/08 01:49:34 mwg ++ * Added capability to setup auxiliary data channel handlers. ++ * ++ * Revision 1.15 1996/05/07 22:51:08 liang ++ * Added group delay estimation and improved symbol rate selection process. ++ * ++ * Revision 1.14 1996/05/06 06:49:09 mwg ++ * Fixed linux problems. ++ * ++ * Revision 1.13 1996/05/02 08:40:16 mwg ++ * Merged in Chromatic bug fixes. ++ * ++ * Revision 1.12 1996/05/02 02:26:21 mwg ++ * Added code to implement dozing functionality for v.34. ++ * ++ * Revision 1.11 1996/05/01 22:43:13 mwg ++ * Added new command: kDozeCmd; ++ * ++ * Revision 1.10 1996/05/01 19:20:16 liang ++ * Add command codes kInitiateRetrainCmd and kInitiateRateRenegotiationCmd. ++ * ++ * Revision 1.9 1996/04/25 01:12:37 mwg ++ * Added new flag: rapid preliminary EC training. ++ * ++ * Revision 1.8 1996/04/20 02:26:22 mwg ++ * Added preliminary far-end echo support ++ * ++ * Revision 1.7 1996/04/15 23:26:16 mwg ++ * Changed flag definitions for v34 modem. ++ * ++ * Revision 1.6 1996/04/04 02:35:50 liang ++ * Change kCid from 0x0080 to 0x0004 (0x0080 is defined as kV32). ++ * ++ * Revision 1.5 1996/03/08 23:07:01 mwg ++ * Added name for the struct. ++ * ++ * Revision 1.4 1996/03/02 00:59:27 liang ++ * Added typedef for V34CodingParameters structure. ++ * ++ * Revision 1.3 1996/02/27 02:28:31 mwg ++ * Fixed a bug in kLapmLongADPEnabled definition. ++ * ++ * Revision 1.2 1996/02/19 23:50:59 liang ++ * Removed compressionSetup parameter from the link layer command structure. ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.5 1996/01/15 23:26:04 liang ++ * Change the softmodem command structure name from SoftwareModemCommand ++ * to SoftwareModemCommandParameters. ++ * ++ *****************************************************************************/ ++#ifndef SoftModemPh ++#define SoftModemPh ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.1 General types */ ++/****************************************************************************/ ++ ++#ifndef SM_DECL ++#define SM_DECL ++#endif ++ ++#ifdef __VxWORKS__ ++#include <types/vxTypesOld.h> ++#endif ++ ++#ifdef DEBUG ++/* We have to define __wchar_t for Linux */ ++#if defined __linux__ && !defined _NO_WHCAR_DEF_ ++typedef long int __wchar_t; ++#endif ++#if !defined(__KERNEL__) && !defined(_CFE_) ++#include <stdio.h> ++#include <stdlib.h> ++#endif ++ ++#if defined(__linux__) || defined (__unix__) || defined (__unix) || (defined (__mips__) && !defined(_CFE_) && !defined(VXWORKS) && !defined(TARG_OS_RTEMS))/* enable if necessary, but not for dos-based builds */ ++#include <linux/types.h> ++#endif ++ ++ ++#endif /* DEBUG */ ++ ++#if defined(W95_DRIVER) ++#pragma code_seg("_LTEXT", "LCODE") ++#pragma data_seg("_LDATA", "LCODE") ++#pragma const_seg("_LDATA", "LCODE") ++#pragma bss_seg("_LDATA", "LCODE") ++#pragma pack(1) ++#endif /* W95_DRIVER */ ++ ++#ifndef SoftModemTypes ++#include "SoftModemTypes.h" ++#endif /* SoftModemTypes */ ++ ++ ++typedef struct ++ { ++ schar x, y; ++ } ComplexByte; ++ ++typedef struct ++ { ++ uchar numerator; ++ uchar denominator; ++ } Ratio; ++ ++#ifdef PEGASUS ++typedef union ++ { ++ struct ++ { ++ short x, y; ++ }; ++ ++ long foo; ++ } ComplexShort; ++#else ++typedef struct ++ { ++ short x, y; ++#ifdef GREENHILL ++ long a[0]; ++#endif ++ } ComplexShort; ++#endif ++ ++typedef struct ++ { ++ long x, y; ++ } ComplexLong; ++ ++typedef struct ++ { ++ ushort x0, x1, x2; ++ short x3; ++ } VeryLong; ++ ++typedef union ++ { ++ struct ++ { ++ uchar number; ++ uchar defaultValue; /* default value */ ++ uchar maxValue; /* max allowed value */ ++ uchar minValue; /* should be greater then maxValue to make reg readonly */ ++ } param; ++ long alignment; ++ } SRegisterDefinition; ++ ++#define MacroPaste2(a,b) a##b ++#define MacroPaste(a,b) MacroPaste2(a,b) ++#define ALWAYS_LONG_ALIGN() long MacroPaste(ALIGNMENT,__LINE__); ++ ++#ifdef USE_LONG_ALIGN ++#define LONG_ALIGN() ALWAYS_LONG_ALIGN() ++#else ++#define LONG_ALIGN() ++#endif ++ ++typedef ulong bitMap; ++ ++typedef int pace; ++#define kStop 0 ++#define kVerySlow 1 ++#define kSlow 2 ++#define kMedium 3 ++#define kFast 4 ++ ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.2 Modem specific types */ ++/****************************************************************************/ ++ ++typedef long directionType; ++#define kXmt 0 ++#define kRcv 1 ++#define kXmtRcv 2 ++ ++ ++#define originating kXmt ++#define answering kRcv ++#define kOrg kXmt ++#define kAns kRcv ++#define kOrgAns kXmtRcv ++ ++#define ORIGINATING originating ++#define ANSWERING answering ++ ++typedef int pcmCodingType; ++#define kMuLawPCM 0 ++#define kALawPCM 1 ++ ++#define kMuLawPCMScaleShift 2 ++#define kALawPCMScaleShift 3 ++ ++/* link layer and framer share defines */ ++typedef bitMap framerType; ++typedef bitMap linkLayerType; ++#define kNoFramer 0 ++#define kSync 0x00000001 ++#define kAsync 0x00000002 ++#define kHDLC 0x00000004 ++#define kLapm 0x00000008 ++#define kMnp 0x00000010 ++#define kV70 0x00000020 ++#define kSAM 0x00000040 ++ ++ ++typedef bitMap modulationMap; ++typedef bitMap symbolRateMap; ++typedef bitMap dataRateMap; ++typedef bitMap featureMap; ++typedef bitMap breakType; ++ ++typedef bitMap audioType; ++#define kRawAudio 0 ++#define kAudioG729A 1 ++#define kAudioG729 2 ++#define kAudioG723 3 ++ ++ ++#ifndef ADSL_MODEM ++typedef long modemStatusCode; ++#endif ++ /* Information status Codes: 1-31 */ ++#define kSetSampleRate 1 ++#define kModulationKnown 2 ++#define kRxSymbolRate 3 ++#define kTxSymbolRate 4 ++#define kRxCarrierFreq 5 ++#define kTxCarrierFreq 6 ++#define kTxPreemphasisFilter 7 ++#define kTxPowerAdjustment 8 ++#define kRemoteTxPreemphasisFilter 9 ++#define kRemoteTxPowerAdjustment 10 ++#define kRxRateKnown 11 ++#define kTxRateKnown 12 ++#define kRxDataModeActive 13 ++#define kTxDataModeActive 14 ++#define kTxSignalCompleted 15 ++#define kDTMFSignalDetected 16 ++#define kModemSignalDetected 17 ++#define kCallProgressSignalDetected 18 ++#define kCustomSignalDetected 19 ++#define kFaxPreambleDetected 20 ++#define kV24CircuitStatusChange 21 ++#define kHookStateChange 22 ++#define kCallWaitingToneDetected 23 ++#define kMultiToneSignalDetected 24 ++#define kPulseShuntStateChange 25 ++#define kRingFrequency 26 ++ ++ ++ /* Warning status Codes: 32-64 */ ++#define kError 32 ++#define kV34Exception 33 ++#define kClearDownLocal 34 ++#define kClearDownRemote 35 ++#define kCarrierPresent 36 ++#define kCarrierLost 37 ++#define kRetrainingLocal 38 ++#define kRetrainingRemote 39 ++#define kRateRenegotiationLocal 40 ++#define kRateRenegotiationRemote 41 ++#define kFallbackStarted 42 ++#define kFallForwardStarted 43 ++#define kCleardownStarted 44 ++#define kIllegalCommand 45 ++ ++ /* Auxiliary status Codes: 64-.. */ ++#define kTrainingProgress 64 ++#define kConnectionInfo 65 ++#define kDialerStatus 66 ++#define kFramingInfo 67 ++#define kBreakReceived 68 ++#define kLapmStatus 69 ++#define kLapmParameter 70 ++#define kV42bisStatus 71 ++#define kCallerIDStatus 72 ++#define kIOStatus 73 ++#define kCapabilitiesStatus 74 ++#define kSpeakerStatus 75 ++#define kATProfileChanged 76 ++#define kATDebugStatus 77 ++#define kResetHardware 78 ++#define kV8bisStatus 79 ++#define kMnpStatus 80 ++#define kMnpParameter 81 ++#define kV70Status 82 ++#define kV70Parameter 83 ++#define kFaxClass2Status 84 ++#define kAudioStatus 85 ++#define kAudioParameter 86 ++#define kOverlayStatus 87 ++#define kCallerIDCircuitStatus 88 ++#define kV80Status 89 ++#define kV80Parameter 90 ++#define kLocalCountryChanged 91 ++#define kDTERateChanged 92 ++#define kATResponse 93 ++#define kFramerConfigured 94 ++#define kA8RStatus 95 ++#define kA8TStatus 96 ++#define kVersionStatus 97 ++ ++ /* Testing status codes: 128-... */ ++ /* These statuses are generated by modem test suit */ ++#define kTestFinished 128 ++#define kConnectivityTestFinished 129 ++#define kTestCheckSum 130 ++#define kLogFileControl 131 ++#define kTestAtmVcFinished 132 ++#define kTestClearEocFinished 133 ++#define kTestG997Finished 134 ++ ++typedef long modemErrorCode; ++#define kNoError 0 ++#define kErrorTimerExpired 1 ++#define kErrorNoSReceived 2 ++#define kErrorNoSbarReceived 3 ++ ++ ++typedef long dialerStatusCode; ++#define kDialCompleted 0 ++#define kNoDialToneDetected 1 ++#define kBongToneDetected 2 ++#define kNoBongToneDetected 3 ++#define kErrorIllegalDialModifier 5 ++#define kDialStarted 6 ++#define kExternalPulseDialDigit 7 ++ ++ ++typedef long framingInfoCode; ++#define kRxFrameOK 0 ++#define kRxFrameTooLong 1 ++#define kRxFrameCRCError 2 ++#define kTxFrameUnderrun 3 ++#define kRxFrameOverrun 4 ++#define kRxFrameAborted 5 ++#define kRxFrameParityError 6 ++#define kRxFrameFormatError 7 ++#define kRxFrameHDLCFlagsDetected 8 ++ ++ ++typedef long IOStatusCode; ++#define kRxDataReady 0 ++#define kRxBufferOverflow 1 ++#define kTxSpaceAvailable 2 ++#define kTxBufferEmpty 3 ++ ++typedef long capabilitiesStatusCode; ++#define kSymbolRates 0 ++#define kDataRates 1 ++#define kFeatures 2 ++#define kDemodCapabilities 3 ++#define kRateThresholdAdjustment 4 ++#define kXmtLevel 5 ++#define kHybridDelay 6 ++#define kAuxFeatures 7 ++ ++ ++typedef long A8TStatusCode; ++#define kA8TFinished 0 ++ ++typedef long callerIDStatusCode; ++#define kCallerIDError 0 ++#define kCallerIDChannelSeizureReceived 1 ++#define kCallerIDMarkSignalReceived 2 ++#define kCallerIDTime 3 ++#define kCallerIDTelnum 4 ++#define kCallerIDName 5 ++#define kCallerIDEnd 6 ++#define kCallerIDUnknownMessage 7 ++#define kCallerIDWholeMessage 8 ++ ++ ++typedef long callerIDErrorCode; ++#define kCallerIDNoError 0 ++#define kCallerIDMarkSignalError 1 ++#define kCallerIDTooManyMarkBits 2 ++#define kCallerIDMessageTooLong 3 ++#define kCallerIDChecksumError 4 ++ ++ ++typedef long connectionInfoCode; ++#define kRTDelay 1 ++#define kRxSignalLevel 2 ++#define kTimingOffset 3 ++#define kFreqOffset 4 ++#define kPhaseJitter 5 ++#define kSNR 6 ++#define kNearEchoLevel 7 ++#define kSER 8 ++#define kNearEndDelay 9 ++#define kFarEchoLevel 10 ++#define kL1L2SNRDifference 11 ++#define kDCOffset 12 ++#define kTotalRxPower 13 ++#define kRemoteFreqOffset 14 ++/* obsolete #define kV8MenuDataWord1 15 */ ++/* obsolete #define kV8MenuDataWord2 16 */ ++#define kPCMP2AnalogDetSNR 17 ++#define kPCMP2DigitalDetSNR 18 ++#define kPCMP2RBSDetSNR 19 ++#define kEqCenterTapOffset 20 ++#define kPCMPadValue 21 ++#define kPCMRBSMap 22 ++#define kPCMCodingType 23 ++#define kPCMSpectralShapingBits 24 ++#define kLoopbackSelfTestResult 25 ++#define kEyeQuality 26 ++#define kLoopbackSelfTestNewErrs 27 ++#define kV34EqlLengthStatus 28 ++#define kV34EqlOffsetStatus 29 ++#define kV8CallMenuData 30 ++#define kV8JointMenuData 31 ++#define kPCMClientIeecLengthStatus 32 ++#define kPCMClientIeecOffsetStatus 33 ++#define kSeamlessRateChange 34 ++ ++typedef long trainingProgressCode; ++#define kPeriodicalSignalDetected 0 ++#define kPhaseReversalDetected 1 ++#define kSignalStartDetected 2 ++#define kSignalEndDetected 3 ++#define kSSignalDetected 4 ++#define kSbarSignalDetected 5 ++#define kJ4SignalDetected 6 ++#define kJ16SignalDetected 7 ++#define kJprimeSignalDetected 8 ++#define kMPSignalDetected 9 ++#define kMPprimeSignalDetected 10 ++#define kMPSignalSent 11 ++#define kMPprimeSignalSent 12 ++#define kRateSignalDetected 13 ++#define kESignalDetected 14 ++#define kRateSignalSent 15 ++ ++#define kAutomodingTryModulation 16 ++#define kAutomodingCompleted 17 ++#define kRCFaxBitMapStatus 18 ++ ++#define kV8CIDetected 19 ++#define kV8ANSToneDetected 20 ++#define kV8ANSamDetected 21 ++#define kV8CMDetected 22 ++#define kV8JMDetected 23 ++#define kV8CJDetected 24 ++#define kV8Finished 25 ++ ++#define kV34Phase2Started 26 ++#define kV34Phase2INFOSequenceDetected 27 ++#define kV34Phase2NearEndEchoDetected 28 ++#define kV34Phase2L1Receiving 29 ++#define kV34Phase2L2Receiving 30 ++#define kV34Phase2Finished 31 ++#define kV34Phase3Started 32 ++#define kV34Phase3Finished 33 ++#define kV34Phase4Started 34 ++#define kV34Phase4Finished 35 ++#define kV34DecoderParameters 36 ++#define kV34EncoderParameters 37 ++ ++#define kMaxLocalRxDataRate 38 ++#define kMaxLocalTxDataRate 39 ++#define kMaxRemoteRxDataRate 40 ++#define kMaxRemoteTxDataRate 41 ++#define kProjectedDataRate 42 ++#define kFEECDeactivated 43 ++#define kIEECDeactivated 44 ++#define kPFEECDeactivated 45 ++#define kPhaseJitterDeactivated 46 ++ ++#define kPCMP2DetectedDigitalConnection 47 ++#define kPCMP2DetectedRBS 48 ++#define kX2DetectedPhase1Escape 49 ++ ++#define kStarted1200BpsTraining 50 ++#define kStarted2400BpsTraining 51 ++#define kUnscrambledOneDetected 52 ++#define kScrambled1200BpsOneDetected 53 ++#define kScrambled2400BpsOneDetected 54 ++#define kV22BisS1Detected 55 ++#define kV22InitiateLoop2Test 56 ++#define kV22RespondLoop2Test 57 ++#define kV22Loop2TestAlt01Detected 58 ++ ++#define kDataModemLoop1TestStarted 59 ++#define kDataModemLoop1TestFinished 60 ++#define kDataModemLoop2TestStarted 61 ++#define kDataModemLoop2TestFinished 62 ++#define kDataModemLoop3TestStarted 63 ++#define kDataModemLoop3TestFinished 64 ++#define kDataModemSelfLoopTestEnabled 65 ++ ++#define kPCMPhase3Started 70 ++#define kPCMPhase3Finished 71 ++#define kPCMPhase4Started 72 ++#define kPCMPhase4Finished 73 ++ ++#define kV90JaSignalDetected 74 ++#define kV90JdSignalDetected 75 ++#define kV90JdPrimeSignalDetected 76 ++#define kV90RSignalDetected 77 ++#define kV90RBarSignalDetected 78 ++#define kV90CPSignalDetected 79 ++ ++#define kV90CPtSignalSent 80 ++#define kV90CPSignalSent 81 ++#define kV90CPprimeSignalSent 82 ++ ++ ++#define kV34SeamlessRateChangeRequestSent 83 ++#define kV34SeamlessRateChangeUpdateSent 84 ++#define kV34SeamlessRateChangeRequestReceived 85 ++#define kV34SeamlessRateChangeUpdateReceived 86 ++#define kV34SeamlessRateChangeUpdateTimeout 87 ++ ++#define kV90JaSignalAcknowledged 88 ++ ++#define kV34HCtrlChanPPhDetected 100 ++#define kV34HCtrlChanMPhDetected 101 ++#define kV34HCtrlChanRatesKnown 102 ++#define kV34HDXCtrlChanBinary1Detected 103 ++#define kV34HDXPhase3Started 104 ++#define kV34HDXPhase3Finished 105 ++#define kV34HDXPrimChanBinary1Detected 106 ++#define kFlexEventTRN2AFinished 107 ++ ++#define kV32RanginigStarted 108 ++#define kV32RangingStarted 108 ++#define kV32RanginigFinished 109 ++#define kV32RangingFinished 109 ++ ++ ++typedef long lapmStatusCode; ++#define kLapmDisconnected 0 /* LAPM disconnected */ ++#define kLapmConnected 1 /* LAPM is connected */ ++#define kLapmV42ODPDetected 2 /* LAPM ODP is detected */ ++#define kLapmV42ADPDetected 3 /* LAPM V.42 ADP is detected */ ++#define kLapmUnknownADPDetected 4 /* LAPM Unsupported ADP is detected */ ++#define kLapmTimeout 5 /* LAPM Timeout */ ++#define kLapmMNPFrameDetected 6 /* LAPM detected MNP frame */ ++#define kLapmDPDetectionTimedOut 7 /* LAPM Unsupported ADP is detected */ ++#define kLapmError 8 /* LAPM Error */ ++#define kLapmTestResult 9 /* LAPM loopback test result */ ++#define kLapmTxFrameStatus 10 ++#define kLapmRxFrameStatus 11 ++#define kLapmTxStatistics 12 ++#define kLapmRxStatistics 13 ++ ++typedef long lapmTakedownReason; ++#define kLapmRemoteDisconnect 0 ++#define kLapmLocalDisconnect 1 ++#define kLapmCannotConnect 2 ++#define kLapmProtocolError 3 ++#define kLapmCompressionError 4 ++#define kLapmInactivityTimer 5 ++#define kLapmRetryFailed 6 ++ ++ ++typedef long lapmParameterCode; ++#define kLapmXmtK 0 ++#define kLapmRcvK 1 ++#define kLapmXmtN401 2 ++#define kLapmRcvN401 3 ++#define kLapmTESTSupport 4 ++#define kLapmSREJSupport 5 ++#define kLapmCompDir 6 ++#define kLapmCompDictSize 7 ++#define kLapmCompStringSize 8 ++ ++ ++typedef long lapmErrorCode; ++#define kLapmNoError 0 ++#define kLapmBufferOverflow 1 ++#define kLapmFrameTooLong 2 ++#define kLapmBadFrame 3 ++#define kLapmUnknownEvent 4 ++/* 6 is reserved for kLapmRetryFailed defined above */ ++ ++ ++typedef long lapmTestResultCode; ++#define kLapmTestPassed 0 ++#define kLapmTestRequestIgnored 1 ++#define kLapmTestAlreadyInProgress 2 ++#define kLapmTestNotSupported 3 ++#define kLapmTestFailed 4 ++ ++ ++typedef long v42bisStatusCode; ++#define kV42bisEncoderTransparentMode 0 /* V.42bis encoder transparent mode active */ ++#define kV42bisEncoderCompressedMode 1 /* V.42bis encoder compressed mode active */ ++#define kV42bisDecoderTransparentMode 2 /* V.42bis decoder transparent mode active */ ++#define kV42bisDecoderCompressedMode 3 /* V.42bis decoder compressed mode active */ ++#define kV42bisError 4 /* V.42bis error */ ++#define kV42bisEncoderStatistics 5 ++#define kV42bisDecoderStatistics 6 ++ ++ ++typedef long v42bisErrorCode; ++#define kV42bisUndefinedEscSequence 0 /* V.42bis undefined escape sequence */ ++#define kV42bisCodewordSizeOverflow 1 /* V.42bis codeword size overflow */ ++#define kV42bisUndefinedCodeword 2 /* V.42bis undefined codeword */ ++ ++typedef long mnpStatusCode; ++#define kMnpDisconnected 0 /* Mnp disconnected */ ++#define kMnpConnected 1 /* Mnp is connected */ ++#define kMnpFallback 2 /* Mnp is falling back to buffer mode */ ++#define kMnpError 3 /* Mnp Error */ ++#define kMnpTimeout 4 /* Mnp Timeout */ ++#define kMnpInvalidLT 5 /* Invalid LT received */ ++#define kMnpRetransmitFrame 6 ++#define kMnpNack 7 ++#define kMnpTxFrameStatus 8 ++#define kMnpRxFrameStatus 9 ++#define kMnpTxStatistics 10 ++#define kMnpRxStatistics 11 ++ ++typedef long mnpTakedownReason; ++#define kMnpRemoteDisconnect 0 ++#define kMnpLocalDisconnect 1 ++#define kMnpCannotConnect 2 ++#define kMnpProtocolError 3 ++#define kMnpCompressionError 4 ++#define kMnpInactivityTimer 5 ++#define kMnpRetryFailed 6 ++ ++ ++typedef long mnpParameterCode; ++#define kMnpProtocolLevel 0 ++#define kMnpServiceClass 1 ++#define kMnpOptimizationSupport 2 ++#define kMnpCompressionSupport 3 ++#define kMnpN401 4 ++#define kMnpK 5 ++ ++ ++typedef long mnpErrorCode; ++#define kMnpNoError 0 ++#define kMnpBufferOverflow 1 ++#define kMnpFrameTooLong 2 ++#define kMnpBadFrame 3 ++#define kMnpUnknownEvent 4 ++ ++ ++typedef long v70StatusCode; ++#define kV70Disconnected 0 /* V70 disconnected */ ++#define kV70Connected 1 /* V70 is connected */ ++#define kV70Error 2 /* V70 Error */ ++#define kV70Timeout 3 /* V70 Timeout */ ++#define kV70ChannelDown 4 /* V70 channel released */ ++#define kV70ChannelUp 5 /* V70 channel established */ ++#define kV70AudioChannelDown 6 /* V70 audio channel released */ ++#define kV70AudioChannelUp 7 /* V70 audio channel established */ ++#define kV70DataChannelDown 8 /* V70 data channel released */ ++#define kV70DataChannelUp 9 /* V70 data channel established */ ++#define kV70OOBChannelDown 10 /* V70 out-of-band channel released */ ++#define kV70OOBChannelUp 11 /* V70 out-of-band channel established */ ++#define kV70TxFrameStatus 12 ++#define kV70RxFrameStatus 13 ++#define kV70TxStatistics 14 ++#define kV70RxStatistics 15 ++#define kV70StateTransition 16 ++ ++typedef long v70TakedownReason; ++#define kV70RemoteDisconnect 0 ++#define kV70LocalDisconnect 1 ++#define kV70CannotConnect 2 ++#define kV70ProtocolError 3 ++#define kV70CompressionError 4 ++#define kV70InactivityTimer 5 ++#define kV70RetryFailed 6 ++ ++ ++typedef long v70ParameterCode; ++#define kV70SuspendResume 0 ++#define kV70CrcLength 1 ++#define kV70NumberOfDLCs 2 ++#define kV70uIH 3 ++ ++#define kV70LapmXmtK 10 ++#define kV70LapmRcvK 11 ++#define kV70LapmXmtN401 12 ++#define kV70LapmRcvN401 13 ++#define kV70LapmTESTSupport 14 ++#define kV70LapmSREJSupport 15 ++#define kV70LapmCompDir 16 ++#define kV70LapmCompDictSize 17 ++#define kV70LapmCompStringSize 18 ++ ++#define kV70AudioHeader 20 /* if audio header is present in audio frames */ ++#define kV70BlockingFactor 21 /* audio blocking factor (default 1) */ ++#define kV70SilenceSuppression 22 /* audio silence suppression */ ++ ++ ++ ++typedef long v70ErrorCode; ++#define kV70NoError 0 ++#define kV70BadFrame 1 ++ ++typedef long audioStatusCode; ++#define kAudioFramesLost 0 /* One or more audio frames were lost */ ++#define kAudioTxBufferOverflow 1 ++#define kAudioRxBufferOverflow 2 ++#define kAudioRxBufferUnderflow 3 ++ ++ ++typedef long v80StatusCode; ++#define kV80Disconnected 0 /* V80 disconnected */ ++#define kV80Connected 1 /* V80 is connected */ ++#define kV80Error 2 /* V80 Error */ ++#define kV80InBandStatus 3 /* V80 in-band SAM status */ ++#define kV80TxFrameStatus 12 ++#define kV80RxFrameStatus 13 ++#define kV80TxStatistics 14 ++#define kV80RxStatistics 15 ++ ++typedef long v80TakedownReason; ++#define kV80RemoteDisconnect 0 ++#define kV80LocalDisconnect 1 ++ ++typedef long v80ErrorCode; ++#define kV80NoError 0 ++#define kV80BadFrame 1 ++ ++typedef long overlayStatusCode; ++#define kOverlayBegin 0 /* DSP has halted */ ++#define kOverlayEnd 1 /* DSP has received entire overlay */ ++#define kOverlayElapsedTime 2 /* time elapsed(as viewed by datapump) during overlay */ ++#define kOverlayRecordingData 3 /* ms of data that we are recording */ ++#define kOverlayReplayingData 4 /* ms of data that we have replayed so far */ ++#define kOverlayReplayDone 5 /* playback is done */ ++ ++/* types for kOverlayRecording/ReplayingData */ ++#define kOverlayTxData 0 ++#define kOverlayRxData 1 ++ ++/* ++ * Rockwell faxmodem compatible bitmap (kRCFaxBitMapStatus) ++ */ ++#define kRCFaxFCD 0x01 ++#define kRCFaxP2 0x02 ++#define kRCFaxPN 0x04 ++#define kRCFaxDCD 0x08 ++#define kRCFaxTX 0x10 ++#define kRCFaxCTS 0x20 ++ ++ ++#ifndef ADSL_MODEM ++typedef long modemCommandCode; ++#endif ++ /* Basic Action commands 00-63 */ ++#define kIdleCmd 0 ++#define kStartFaxModemCmd 1 ++#define kStartDataModemCmd 2 ++#define kStartCallProgressMonitorCmd 3 ++#define kSendTonesCmd 4 ++#define kStartCallerIDRcvCmd 5 ++#define kSetLinkLayerCmd 6 ++#define kSetFramerCmd 7 ++#define kTestLinkLayerCmd 8 ++#define kIdleRcvCmd 9 ++#define kIdleXmtCmd 10 ++#define kSetStatusHandlerCmd 11 ++#define kSetEyeHandlerCmd 12 ++#define kSetLogHandlerCmd 13 ++#define kSendBreakCmd 14 ++#define kSendTestCmd 15 ++#define kDisconnectLinkCmd 16 ++#define kSetXmtGainCmd 17 ++#define kStartADSICmd 18 ++#define kSetHybridDelayCmd 19 ++#define kCleardownCmd 20 ++#define kInitiateRetrainCmd 21 ++#define kInitiateRateRenegotiationCmd 22 ++#define kDialToneIndicator 23 ++#define kSetRxDataHandler 24 /* not used yet */ ++#define kSetTxDataHandler 25 /* not used yet */ ++#define kSetAuxRxDataHandler 26 ++#define kSetAuxTxDataHandler 27 ++#define kRingIndicatorCmd 28 ++#define kDTERateIndicatorCmd 29 ++#define kStartV8bisCmd 30 ++#define kSendMultiTonesCmd 31 ++#define kSetMultiToneParamsCmd 32 ++#define kSetModemSampleRateCmd 33 ++#define kStartDataModemPTTTestCmd 34 ++#define kStartDataModemLoopbackTestCmd 35 ++#define kRingFrequencyCmd 36 ++#define kSetCallWaitingDetectorStateCmd 37 ++#define kV34HDXTurnOffCurrentModeCmd 38 ++#define kSetAudioCmd 39 ++#define kLoopbackTestAutoRespEnableCmd 40 ++#define kSetCallProgressParamsCmd 41 ++#define kSetTrainingDelayReductionCmd 42 ++#define kSetFaxECMPageBufferPtrCmd 43 ++#define kSetLineCurrentStateCmd 44 ++#define kSetFramerParameterCmd 45 ++#define kStartDozeCmd 46 ++#define kEndDozeCmd 47 ++#define kStartRingFrequencyDetectorCmd 48 ++#define kSetBufferingDelayAdjustmentCmd 49 ++ ++ /* Composite action commands 64-127 */ ++#define kDialCmd 64 ++#define kSendCallingToneCmd 65 ++#define kV24CircuitChangeCmd 66 ++#define kStartATModeCmd 67 ++#define kStopATModeCmd 68 ++#define kSetATRegister 69 ++#define kSetATRegisterLimits 70 ++#define kSetATIResponse 71 ++#define kEnableATDebugMode 72 ++#define kSetWhiteListEntry 73 ++#define kSetBlackListEntry 74 ++ ++#define kV70Setup 75 /* additional V70 configuration */ ++#define kEstablishChannel 76 /* Establish new link layer channel (V70) */ ++#define kReleaseChannel 77 /* Release link layer channel (V70) */ ++#define kWaitChannelEstablished 78 /* Wait for establishment of the new link layer channel (V70) */ ++ ++/* unused 79 */ ++#define kMnpOOBFrameCmd 80 ++#define kV80InBandCmd 81 /* V80 In-band commands */ ++#define kSetV250IdString 82 ++#define kSetInternationalTablesCmd 83 ++#define kConfigureCountryCmd 84 ++#define kConigureCountryCmd 84 ++#define kV8ControlCmd 85 ++#define kV8bisSendMessage 86 ++#define kSetHWIdCmd 87 ++#define kSetCodecIdCmd 88 ++#define kOverCurrentDetected 89 ++ ++ ++ ++typedef long v8ControlType; ++#define kEnableDTEControl 1 ++#define kSetV8ControlTimeout 2 ++#define kSetCIValue 3 ++#define kSetCMValue 4 ++#define kSetJMValue 5 ++#define kSendCJ 6 ++#define kSetCallFunctionCategory 7 ++ ++typedef long v250IdStringCode; ++#define kGMIString 1 ++#define kGMMString 2 ++#define kGMRString 3 ++#define kGSNString 4 ++#define kGOIString 5 ++ ++typedef long kCallProgressParameterCode; ++#define kModemSignalPowerThreshold 1 ++#define kDialtonePowerThreshold 2 ++#define kRingBackPowerThreshold 3 ++#define kBusyPowerThreshold 4 ++#define kReorderPowerThreshold 5 ++#define k2ndDTnPowerThreshold 6 ++#define kMinDialtoneTime 7 ++#define kDialtoneFreqRange 8 ++#define kRingBackFreqRange 9 ++#define kBusyFreqRange 10 ++#define kReorderFreqRange 11 ++#define k2ndDTnFreqRange 12 ++ ++ ++typedef long framerParameterCode; ++#define kSetHDLCLeadingFlags 0 ++#define kHDLCResetFlagDetection 1 ++#define kSyncFramerSetup 2 ++#define kHDLCSendCRC 3 ++#define kHDLCSendFlags 4 ++#define kHDLCSendAborts 5 ++ ++ ++typedef long logDataCode; ++#define eyeData 0 ++#define mseData 1 ++#define rxData 2 ++#define txData 3 ++#define neecData 4 ++#define eqlData 5 ++#define ieecData 6 ++#define feecData 7 ++#define eqlPllData 8 ++#define feecPllData 9 ++#define timingData 10 ++#define pjPhaseErrData 11 ++#define pjEstimateData 12 ++#define pjEstDiffData 13 ++#define pjCoefData 14 ++#define inputSignalData 15 ++#define outputSignalData 16 ++#define agcGainData 17 ++#define automoderData 18 ++#define v8CMData 19 ++#define v8JMData 20 ++#define inputAfterNeecData 21 ++#define eqlErrData 22 ++#define dpskMicrobitsData 23 ++#define v34P2LSamplesData 24 ++#define phaseSplittedLData 25 ++#define fftedLData 26 ++#define channelSNRData 27 ++#define noiseEstimateData 28 ++#define signalEstimateData 29 ++#define v34INFOData 30 ++#define v34ChanProbData 31 ++#define v34P2OutputData 32 ++#define v8ANSamDetectData 33 ++#define pFeecData 34 ++#define channelDelayData 35 ++#define timingOffsetData 36 ++#define trellisMSEData 37 ++#define interpolatedSignalData 38 ++#define dcCancelledSignalData 39 ++#define echoCancelledSignalData 40 ++#define predictorErrData 41 ++#define commandInfoData 42 ++#define unusedInfoData 43 ++#define atCommandInfoData 44 ++#define atResponseInfoData 45 ++#define hwTerminalTxData 46 ++#define hwTerminalRxData 47 ++#define statusInfoData 48 ++#define channelResponseData 49 ++#define channelImpulseRespData 50 ++#define x2PcmP1DetectorInData 51 ++#define x2PcmP1DetectorOutData 52 ++#define eqlRealData 53 ++#define ieecRealData 54 ++#define neecOutputData 55 ++#define precodedEqlOutputData 56 ++#define eqlRealErrData 57 ++#define idealEqlOutputData 58 ++#define agcData 59 ++#define pcmInfidelityData 60 ++#define v42bisCycleCount 61 ++#define pcmImdOffsetCoefData 62 ++#define pcmImdOffsetData 63 ++#define v90RcvdDilLongData 64 ++#define v90RcvdDilShortData 65 ++#define v90DilProducedData 66 ++#define pcmEncoderKbitsData 67 ++#define pcmEncoderMbitsData 68 ++#define pcmEncoderSbitsData 69 ++#define pcmDecoderKbitsData 70 ++#define pcmDecoderMbitsData 71 ++#define pcmDecoderSbitsData 72 ++#define v90CPorCPtData 73 ++#define mnpDecoderInputData 74 ++#define mnpDecoderOutputData 75 ++#define v42bisEncoderInputData 76 ++#define v42bisDecoderInputData 77 ++#define modulatorInputData 78 ++#define modulatorOutputData 79 ++#define encodedStatusData 80 ++#define blockFramerTxData 81 ++#define blockFramerRxData 82 ++#define framerTxData 83 ++#define framerRxData 84 ++#define dpskBasebandData 85 ++#define dpskBasebandLPFedData 86 ++#define dpskRealData 87 ++#define bandEdgeCorrectedSignalData 88 ++#define atmLogData 89 ++#define clearEocLogData 90 ++#define g997LogData 91 ++ ++ ++#define kLogDataDelimiter 0xFEFEFEFE ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.3 Handlers */ ++/****************************************************************************/ ++ ++typedef void (SM_DECL *rcvHandlerType) (void *gDslVars, int, short*); ++typedef void (SM_DECL *xmtHandlerType) (void *gDslVars, int, short*); ++typedef int (SM_DECL *xmtHandlerWithRtnValType) (void *gDslVars, int, short*); ++typedef void (SM_DECL *timerHandlerType) (void *gDslVars, long); ++typedef int (SM_DECL *interpolatorHandlerType) (void *gDslVars, int, short*, short*); ++typedef void (SM_DECL *controlHandlerType) (void *gDslVars, int); ++ ++typedef int (SM_DECL *txDataHandlerType) (void *gDslVars, int, uchar*); ++typedef int (SM_DECL *rxDataHandlerType) (void *gDslVars, int, uchar*); ++ ++typedef bitMap (SM_DECL *signalDetectorType) (void *gDslVars, int, long, long*); ++ ++ ++typedef void (SM_DECL *hookHandlerType) (void *gDslVars, Boolean); ++ ++typedef short* (SM_DECL *sampBuffPtrType) (void *gDslVars, int); ++ ++typedef void (SM_DECL *eyeHandlerType) (void *gDslVars, int, ComplexShort*); ++typedef void (SM_DECL *logHandlerType) (void *gDslVars, logDataCode, ...); ++ ++typedef void (SM_DECL *voidFuncType) (void *gDslVars); ++ ++typedef int (SM_DECL *txAudioHandlerType) (void *gDslVars, int, short*); ++typedef int (SM_DECL *rxAudioHandlerType) (void *gDslVars, int, short*); ++ ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.4 Structures */ ++/****************************************************************************/ ++ ++/* ++ * AT command processor definitions ++ */ ++#define kATRegistersNumber 56 ++#define kFirstConfigurationRegister 500 ++#define kLastConfigurationRegister 515 ++#define kFirstInternationalRegister 516 ++#define kLastInternationalRegister 595 ++ ++ ++ ++#define kATMaxDialStringSize 128 ++typedef struct ++ { ++ struct ++ { ++ uchar loadNumber; /* Which profile to load upon powerup/reset */ ++ uchar countryCode; /* T.35 Country Code */ ++ uchar profile[2][kATRegistersNumber]; ++ uchar dialString[4][kATMaxDialStringSize + 1]; ++ } config; ++ ulong versionCode; ++ ulong crcCheckSum; ++ } NVRAMConfiguration; ++ ++/* Structure to hold international settings */ ++typedef struct ++ { ++ char *name; ++ int countryCode; ++ const SRegisterDefinition *userRegisters; ++ const ulong *configRegisters; ++ } CountryDescriptor; ++ ++/* ++ * V.34 coding parameters structure ++ */ ++ ++typedef struct ++ { ++ /* DO NOT CHANGE THE ORDER OF FIELDS IN THIS STRUCTURE! ++ * (Some assembly code depends on it!) If you ++ * must add fields, please do so at the bottom. ++ */ ++ ++ int symbolRateIndex, ++ dataRateIndex, ++ userSNRAdjustment; ++ Boolean auxChannel, ++ expConstellation, ++ precoding, ++ nonlinearCoding; ++ schar J, /* number of data frames in superframe */ ++ P, /* number of mapping frames in a data frame */ ++ r, /* number of high mapping frames in a data frame */ ++ b, /* number of data bits in a mapping frame */ ++ W, /* number of aux bits in a data frame */ ++ K, /* number of S bits in a mapping frame */ ++ q, /* number of Q bits in a 2D symbol */ ++ M; /* number of rings in shell mapping */ ++ long nominalVariance; /* the signal variance which gives 1e-2 BLER Q10 */ ++ int bitsPerDataFrame; ++ short quantRoundOff, ++ quantMask; ++ uchar nTrellisStates, ++ log2NTrellisStates; ++ short gain1xmt, ++ gain2xmt, ++ gain1rcv, ++ gain2rcv; ++ ushort bitInversionPattern; ++ } V34CodingParams; ++ ++typedef long v8bisStatusCode; ++typedef bitMap v8bisConnectionSetup; ++#if defined(V8BIS) || defined(AT_COMMANDS_V8BIS) ++#include "V8bisMainTypes.h" ++#endif ++ ++#define kMaxMultiTones 4 /* MultiTone: search for up to this many tones at once */ ++ ++#ifndef ADSL_MODEM ++typedef struct ++ { ++ modemStatusCode code; ++ union ++ { ++ long value; ++ long freq; ++ modemErrorCode error; ++ modulationMap modulation; ++ modulationMap modemSignal; ++ dataRateMap dataRate; ++ long dtmfSignal; ++ bitMap callProgressSignal; ++ bitMap customSignal; ++ void *ptr; ++ struct ++ { ++ long detected; ++ long numTones; ++ long tones[kMaxMultiTones]; ++ } multiToneInfo; ++ struct ++ { ++ v8bisStatusCode code; ++ long value; ++ } v8bisStatus; ++ struct ++ { ++ trainingProgressCode code; ++ long value; ++ } trainingInfo; ++ struct ++ { ++ long code; ++ long value; ++ } v24Circuit; ++ struct ++ { ++ trainingProgressCode code; ++ void* ptr; ++ } advancedTrainingInfo; ++ struct ++ { ++ capabilitiesStatusCode code; ++ long value; ++ } capabilitiesStatusInfo; ++ struct ++ { ++ connectionInfoCode code; ++ long value; ++ } connectionInfo; ++ struct ++ { ++ connectionInfoCode code; ++ int length; ++ uchar *ptr; ++ } advancedConnectionInfo; ++ struct ++ { ++ dialerStatusCode code; ++ long value; ++ long makeTime; ++ long breakTime; ++ } dialerStatus; ++ struct ++ { ++ long enabled; ++ long volume; ++ } speakerStatus; ++ framingInfoCode framingInfo; ++ IOStatusCode ioStatus; ++ struct ++ { ++ lapmStatusCode code; ++ union ++ { ++ long value; ++ lapmTakedownReason reason; ++ lapmErrorCode error; ++ lapmTestResultCode testResult; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ } param; ++ } lapmStatus; ++ struct ++ { ++ lapmParameterCode code; ++ long value; ++ } lapmParameter; ++ struct ++ { ++ v42bisStatusCode code; ++ union ++ { ++ long value; ++ v42bisErrorCode error; ++ struct ++ { ++ long nBytesIn; ++ long nBytesOut; ++ } statistic; ++ } param; ++ } v42bisStatus; ++ struct ++ { ++ mnpStatusCode code; ++ union ++ { ++ long value; ++ mnpTakedownReason reason; ++ mnpErrorCode error; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ ulong nSize; ++ uchar *Buffer; ++ } fallback; ++ struct ++ { ++ char *header; ++ void *frame; ++ } frame; ++ struct ++ { ++ long nack; ++ long rFrameNo; ++ } timeout; ++ struct ++ { ++ long frameNo; ++ long framesPending; ++ } retrFrame; ++ } param; ++ } mnpStatus; ++ struct ++ { ++ mnpParameterCode code; ++ long value; ++ } mnpParameter; ++ struct ++ { ++ v70StatusCode code; ++ union ++ { ++ long value; ++ v70TakedownReason reason; ++ v70ErrorCode error; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long nack; ++ long rFrameNo; ++ } timeout; ++ struct ++ { ++ long frameNo; ++ long framesPending; ++ } retrFrame; ++ struct ++ { ++ long ChannelId; ++ long DLCI; ++ ulong LcNum; ++ v70TakedownReason reason; ++ } channelInfo; ++ struct ++ { ++ long ChannelId; ++ long stateOld; ++ long stateNew; ++ } stateInfo; ++ } param; ++ ulong v70Time; ++ } v70Status; ++ struct ++ { ++ audioStatusCode code; ++ union ++ { ++ long value; ++ struct ++ { ++ long nReq; ++ long nAvail; ++ } buffer; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ } param; ++ } audioStatus; ++ struct ++ { ++ v80StatusCode code; ++ union ++ { ++ long value; ++ v80TakedownReason reason; ++ v80ErrorCode error; ++ struct ++ { ++ long nFrames; ++ long nFrameErrors; ++ } statistic; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frame; ++ struct ++ { ++ long code; ++ long value; ++ } inBand; ++ } param; ++ ulong v80Time; ++ } v80Status; ++ struct ++ { ++ v70ParameterCode code; ++ long value; ++ } v70Parameter; ++ struct ++ { ++ breakType type; ++ long length; ++ } breakStatus; ++ struct ++ { ++ callerIDStatusCode code; ++ union ++ { ++ long value; ++ struct ++ { ++ callerIDErrorCode code; ++ long value; ++ } callerIDError; ++ struct ++ { ++ long length; ++ char* ptr; ++ } message; ++ } param; ++ } callerIDStatus; ++ struct ++ { ++ ulong signal; ++ uchar *msg1; ++ long msg1Length; ++ uchar *msg2; ++ long msg2Length; ++ } A8RStatus; ++ struct ++ { ++ overlayStatusCode code; ++ long value; ++ long value2; ++ } overlayStatus; ++ struct ++ { ++ ulong nBits; ++ ulong nBlocks; ++ ulong nBitErrors; ++ ulong nBlockErrors; ++ ++ ulong nAudioBits; ++ ulong nAudioBlocks; ++ ulong nAudioSyncErrors; ++ ulong nAudioBlockErrors; ++ } testResults; ++ ulong checksum; ++ struct ++ { ++ ulong sizeM; ++ uchar *filename; ++ } logFileControlStatus; ++ struct ++ { ++ long direction; ++ long module; ++ long message; ++ long data; ++ } ++ faxClass2Status; ++ ++ } param; ++ } modemStatusStruct; ++ ++typedef void (SM_DECL *statusHandlerType) (void *gDslVars, modemStatusStruct*); ++#endif /* ADSL_MODEM */ ++ ++/****************************************************************************/ ++/* 1. Type definitions. */ ++/* */ ++/* 1.5 Command structure */ ++/****************************************************************************/ ++ ++typedef struct ++ { ++ Boolean remoteModemIsFlex; ++ uchar countryCode; ++ ushort manufacturerId; ++ uchar licenseeId; ++ uchar productCapabilities; ++ Boolean digitalModeFlag; ++ Boolean prototypeFlag; ++ uchar version; ++ } ++FlexV8bisStruct; ++ ++typedef struct ++ { ++ symbolRateMap symbolRates; ++ dataRateMap dataRates; ++ dataRateMap dataRates56k; ++ dataRateMap dataRatesFlex; ++ featureMap features; ++ bitMap auxFeatures; ++ bitMap demodCapabilities; ++ long rateThresholdAdjustment; /* dB Q4 */ ++ FlexV8bisStruct flexRemoteV8bisInfo; ++ } dataPumpCapabilities; ++ ++#ifndef ADSL_MODEM ++typedef struct SoftwareModemCommandParameters ++ { ++ modemCommandCode command; ++ union ++ { ++ long xmtGain; ++ ulong hybridDelayQ4ms; ++ long modemSampleRate; ++ long timeInMs; ++ long state; ++ long freq; ++ NVRAMConfiguration *nvramConfigurationPtr; ++ long enabled; ++ long value; ++ uchar *phoneNumber; ++ uchar *faxECMPageBufferPtr; ++ CountryDescriptor *countryDescriptorTable; ++ struct ++ { ++ dataRateMap dteRate; ++ bitMap format; ++ } dteRateSpec; ++ struct ++ { ++ v8ControlType code; ++ long value; ++ uchar *buffer; ++ } v8ControlSpec; ++ struct ++ { ++ directionType direction; ++ v8bisConnectionSetup setup; ++ void *capPtr; ++ voidFuncType confirmMsFunc; ++ voidFuncType genMsFunc; ++ xmtHandlerWithRtnValType ogmFunc; ++ } v8bisSpec; ++ struct ++ { ++ directionType direction; ++ } ADSISpec; ++ struct ++ { ++ directionType direction; ++ modulationMap modulations; ++ dataPumpCapabilities capabilities; ++ } modeSpec; ++ struct ++ { ++ long time, ++ freq1, ++ freq2, ++ freq3, ++ freq4, ++ mag1, ++ mag2, ++ mag3, ++ mag4; ++ } toneSpec; ++ struct ++ { ++ long signal; ++ uchar *msg1; ++ long msg1Length; ++ uchar *msg2; ++ long msg2Length; ++ long sig_en; ++ long msg_en; ++ long supp_delay; ++ } ++ v8bisMessageSpec; ++ struct ++ { ++ linkLayerType type; ++ bitMap setup; ++ dataRateMap rxDataRate; ++ dataRateMap txDataRate; ++ long rtDelayQ4ms; ++ rxDataHandlerType rxDataHandlerPtr; ++ txDataHandlerType txDataHandlerPtr; ++ } linkLayerSpec; ++ struct ++ { ++ framerType type; ++ bitMap setup; ++ directionType direction; ++ long fill[2]; /* need to match linkLayerSpec */ ++ rxDataHandlerType rxDataHandlerPtr; ++ txDataHandlerType txDataHandlerPtr; ++ } framerSpec; ++ struct ++ { ++ framerParameterCode code; ++ long value; ++ } framerParameterSpec; ++ struct ++ { ++ bitMap callProgressDetectorSetup; ++ signalDetectorType callProgressDetectorPtr; /* if nil, use defaults */ ++ signalDetectorType customDetectorPtr; /* if nil, no custom detector */ ++ } callProgressMonitorSpec; ++ struct ++ { ++ ulong maxTones; /* maximum number of simultaneous tones to detect */ ++ ulong allowableVariance; /* maximum cumulative variance in the eight interpolated frequencies */ ++ ulong totalPowerThreshold; /* ignore complete block if power less than this */ ++ ulong powerShiftThreshold; /* ignore a bin if its power is less than (totalPowerValue >> powerShiftThreshold) */ ++ ulong toneMatchThresholdHz; /* tones within +/- this many Hz of original tone are considered the same tone */ ++ ulong binSeparation; /* ignore tones with a spacing of less than this */ ++ ulong outsideFreqDeviation; /* an individual value in the interpolated array can be up to this many Hz outside of the expected angle range */ ++ } multiToneSpec; ++ struct ++ { ++ uchar *dialString; /* nil limited string for DTMF dialing sequence */ ++ long pulseBreakTime, ++ pulseMakeTime, ++ pulseInterDigitTime, ++ toneDigitTime, ++ toneInterDigitTime, ++ toneLoGroupMag, ++ toneHiGroupMag, ++ flashTime, ++ pauseTime, ++ signalWaitTimeout, ++ blindDialingTimeout; ++ bitMap dialerSetup; ++ bitMap callProgressDetectorSetup; ++ signalDetectorType callProgressDetectorPtr; /* if nil, use defaults */ ++ signalDetectorType customDetectorPtr; /* if nil, no custom detector */ ++ hookHandlerType hookHandlerPtr; /* nil if DTMF dialing specified*/ ++ } dialSpec; ++ struct ++ { ++ long timeOn, ++ timeOff, ++ freq; ++ } callingToneSpec; ++ union ++ { ++ statusHandlerType statusHandlerPtr; ++ eyeHandlerType eyeHandlerPtr; ++ logHandlerType logHandlerPtr; ++ rxDataHandlerType rxDataHandlerPtr; ++ txDataHandlerType txDataHandlerPtr; ++ } handlerSpec; ++ struct ++ { ++ breakType type; ++ long length; ++ } breakSpec; ++ struct ++ { ++ long length; ++ uchar *dataPtr; ++ } lapmTestSpec; ++ struct ++ { ++ bitMap setupLapm; ++ rxDataHandlerType rxAudioHandlerPtr; ++ txDataHandlerType txAudioHandlerPtr; ++ } v70SetupSpec; ++ struct ++ { ++ ulong ChannelId; ++ ulong LogChannelNum; ++ ulong PortNum; ++ } EstChannelSpec; ++ struct ++ { ++ ulong ChannelId; ++ } WaitChannelSpec; ++ struct ++ { ++ ulong ChannelId; ++ ulong LogChannelNum; ++ ulong PortNum; ++ ulong DLCI; ++ } RelChannelSpec; ++ struct ++ { ++ audioType type; ++ bitMap setup; ++ dataRateMap rxAudioRate; ++ dataRateMap txAudioRate; ++ rxAudioHandlerType rxAudioHandlerPtr; ++ txAudioHandlerType txAudioHandlerPtr; ++ } audioSpec; ++ struct ++ { ++ long code; ++ long value; ++ } v24Circuit; ++ struct ++ { ++ ulong code; ++ ulong value; ++ ulong minValue; ++ ulong maxValue; ++ } atRegister; ++ struct ++ { ++ long code; ++ uchar *response; ++ } atiSpec; ++ struct ++ { ++ long length; ++ uchar *framePtr; ++ } frameSpec; ++ struct ++ { ++ long code; ++ union ++ { ++ long value; ++ struct ++ { ++ long loFreq1; ++ long hiFreq1; ++ long loFreq2; ++ long hiFreq2; ++ } freqRange; ++ } params; ++ } callProgressParamSpec; ++ struct ++ { ++ v250IdStringCode v250IdCode; ++ uchar *v250IdString; ++ } v250IdSpec; ++ ++ } param; ++ } modemCommandStruct; ++ ++typedef Boolean (*commandHandlerType) (modemCommandStruct*); ++#endif /* ADSL_MODEM */ ++ ++ ++ ++/****************************************************************************/ ++/* 2. Constant definitions. */ ++/* */ ++/* 2.1 Definitive constants */ ++/****************************************************************************/ ++ ++#define kMaxSampleBlockSize 48 ++#define kMaxDataBlockSize 48 ++ ++#define kMaxDialStringLength 127 ++#define kCallProgressSampleRate 7200 ++ ++#define kMaxCallerIDMessageLength 80 ++ ++/****************************************************************************/ ++/* 2. Constant definitions. */ ++/* */ ++/* 2.2 Bit maps */ ++/****************************************************************************/ ++ ++/* modulationMap */ ++ ++#define kIdle 0x00000000 ++#define kV25 0x00000001 ++#define kV8 0x00000002 ++#define kCid 0x00000004 ++#define kV8bis 0x00000008 ++#define kV21 0x00000010 ++#define kV22 0x00000020 ++#define kV23 0x00000040 ++#define kV32 0x00000080 ++#define kV34 0x00000100 ++#define kX2 0x00000200 ++#define kV90 0x00000400 ++#define k56Flex 0x00000800 ++#define kV27 0x00001000 ++#define kV29 0x00002000 ++#define kV17 0x00004000 ++#define kV34HDX 0x00008000 ++#define kV34HDXC 0x00010000 ++#define kBell103 0x00100000 ++#define kBell212 0x00200000 ++#define kDataCallingTone 0x01000000 ++#define kFaxCallingTone 0x02000000 ++ ++#define kV22FastNZConnect 0x04000000 ++#define kV22FastNNZConnect 0x08000000 ++#define kV22FastConnect (kV22FastNZConnect|kV22FastNNZConnect) ++#define kV22bisFastConnect 0x10000000 ++ ++ ++#define kDataModulations (kV25 | kV8 | kV21 | kV22FastConnect | kV22bisFastConnect | kV22 | kV23 | kV32 | kV34 | kBell103 | kBell212) ++#define kDataOnlyModulations (kV21 | kV22 | kV23 | kV32 | kBell103 | kBell212) ++#define kPCMModulations (kV90 | kX2 | k56Flex) ++ ++#define kFaxModulations (kV25 | kV21 | kV27 | kV29 | kV17) ++#define kFaxOnlyModulations (kV27 | kV29 | kV17) ++#define kFaxModulationShift 12 ++ ++/* symbolRateMap */ ++ ++#define k1200Hz 0x00000001 ++#define k1600Hz 0x00000002 ++#define k2400Hz 0x00000004 ++#define k2743Hz 0x00000008 ++#define k2800Hz 0x00000010 ++#define k3000Hz 0x00000020 ++#define k3200Hz 0x00000040 ++#define k3429Hz 0x00000080 ++#define k8000Hz 0x00000100 ++ ++#define kAllSymbolRates ( k1200Hz | k1600Hz | k2400Hz | k2743Hz | \ ++ k2800Hz | k3000Hz | k3429Hz | k8000Hz ) ++ ++/* dataRateMap */ ++ ++#define k75bps 0x00000002 ++#define k300bps 0x00000004 ++#define k600bps 0x00000008 ++#define k1200bps 0x00000010 ++#define k2400bps 0x00000020 ++#define k4800bps 0x00000040 ++#define k7200bps 0x00000080 ++#define k9600bps 0x00000100 ++#define k12000bps 0x00000200 ++#define k14400bps 0x00000400 ++#define k16800bps 0x00000800 ++#define k19200bps 0x00001000 ++#define k21600bps 0x00002000 ++#define k24000bps 0x00004000 ++#define k26400bps 0x00008000 ++#define k28800bps 0x00010000 ++#define k31200bps 0x00020000 ++#define k33600bps 0x00040000 ++#define k36000bps 0x00080000 ++#define k38400bps 0x00100000 ++#define k57600bps 0x00200000 ++#define k115200bps 0x00400000 ++#define k230400bps 0x00800000 ++#define k460800bps 0x01000000 ++#define k921600bps 0x02000000 ++/* ++ * kPCMRate is used to identify that the reported rate is ++ * PCM modulation rate, and is only used for PCM modulation while ++ * reporting rate !!!! ++ */ ++#define kPCMRate 0x40000000 ++#define kPCMFlexRate 0x80000000 ++#define kAllDataRates 0x0FFFFFFF ++ ++/* rates specific for X2 and V.90 */ ++#define kPCM25333bps 0x00000001 ++#define kPCM26666bps 0x00000002 ++#define kPCM28000bps 0x00000004 ++#define kPCM29333bps 0x00000008 ++#define kPCM30666bps 0x00000010 ++#define kPCM32000bps 0x00000020 ++#define kPCM33333bps 0x00000040 ++#define kPCM34666bps 0x00000080 ++#define kPCM36000bps 0x00000100 ++#define kPCM37333bps 0x00000200 ++#define kPCM38666bps 0x00000400 ++#define kPCM40000bps 0x00000800 ++#define kPCM41333bps 0x00001000 ++#define kPCM42666bps 0x00002000 ++#define kPCM44000bps 0x00004000 ++#define kPCM45333bps 0x00008000 ++#define kPCM46666bps 0x00010000 ++#define kPCM48000bps 0x00020000 ++#define kPCM49333bps 0x00040000 ++#define kPCM50666bps 0x00080000 ++#define kPCM52000bps 0x00100000 ++#define kPCM53333bps 0x00200000 ++#define kPCM54666bps 0x00400000 ++#define kPCM56000bps 0x00800000 ++#define kPCM57333bps 0x01000000 ++ ++#define kV90ServerToClientDataRates \ ++ ( kPCM28000bps | kPCM29333bps | kPCM30666bps | \ ++ kPCM32000bps | kPCM33333bps | kPCM34666bps | \ ++ kPCM36000bps | kPCM37333bps | kPCM38666bps | \ ++ kPCM40000bps | kPCM41333bps | kPCM42666bps | \ ++ kPCM44000bps | kPCM45333bps | kPCM46666bps | \ ++ kPCM48000bps | kPCM49333bps | kPCM50666bps | \ ++ kPCM52000bps | kPCM53333bps | kPCM54666bps | \ ++ kPCM56000bps | kPCM57333bps ) ++ ++#define kV90ClientToServerDataRates \ ++ ( k4800bps | k7200bps | k9600bps | k12000bps | \ ++ k14400bps | k16800bps | k19200bps | k21600bps | \ ++ k24000bps | k26400bps | k28800bps | k31200bps | \ ++ k33600bps ) ++ ++ ++ ++#define kX2ServerToClientDataRates \ ++ ( kPCM25333bps | kPCM26666bps | kPCM28000bps | \ ++ kPCM29333bps | kPCM30666bps | kPCM32000bps | \ ++ kPCM33333bps | \ ++ kPCM34666bps | kPCM36000bps | kPCM37333bps | \ ++ kPCM38666bps | kPCM40000bps | kPCM41333bps | \ ++ kPCM42666bps | kPCM44000bps | kPCM45333bps | \ ++ kPCM46666bps | kPCM48000bps | kPCM49333bps | \ ++ kPCM50666bps | kPCM52000bps | kPCM53333bps | \ ++ kPCM54666bps | kPCM56000bps | kPCM57333bps ) ++#define kX2ClientToServerDataRates \ ++ ( k4800bps | k7200bps | k9600bps | k12000bps | k14400bps | \ ++ k16800bps | k19200bps | k21600bps | k24000bps | k26400bps | k28800bps | \ ++ k31200bps ) ++ ++ /* ++ Rates specific for Flex ++ */ ++#define kPCMFlex32000bps 0x00000001 ++#define kPCMFlex34000bps 0x00000002 ++#define kPCMFlex36000bps 0x00000004 ++#define kPCMFlex38000bps 0x00000008 ++#define kPCMFlex40000bps 0x00000010 ++#define kPCMFlex42000bps 0x00000020 ++#define kPCMFlex44000bps 0x00000040 ++#define kPCMFlex46000bps 0x00000080 ++#define kPCMFlex48000bps 0x00000100 ++#define kPCMFlex50000bps 0x00000200 ++#define kPCMFlex52000bps 0x00000400 ++#define kPCMFlex54000bps 0x00000800 ++#define kPCMFlex56000bps 0x00001000 ++#define kPCMFlex58000bps 0x00002000 ++#define kPCMFlex60000bps 0x00004000 ++ ++#define kFlexServerToClientDataRates \ ++ ( kPCMFlex32000bps | kPCMFlex34000bps | kPCMFlex36000bps | kPCMFlex38000bps | \ ++ kPCMFlex40000bps | kPCMFlex42000bps | kPCMFlex44000bps | kPCMFlex46000bps | \ ++ kPCMFlex48000bps | kPCMFlex50000bps | kPCMFlex52000bps | kPCMFlex52000bps | \ ++ kPCMFlex54000bps | kPCMFlex56000bps | kPCMFlex58000bps | kPCMFlex60000bps ) ++ ++#define kFlexClientToServerDataRates \ ++ ( k4800bps | k7200bps | k9600bps | k12000bps | \ ++ k14400bps | k16800bps | k19200bps | k21600bps | \ ++ k24000bps | k26400bps | k28800bps | k31200bps ) ++ ++ ++#define k2400BitShift 5 ++#define k4800BitShift 6 ++ ++#define kPCM28000bpsShift 2 ++ ++#define kV21Rates k300bps ++#define kV22Rates k1200bps ++#define kV22bisRates (k1200bps | k2400bps) ++#define kV23Rates (k75bps | k1200bps) ++#define kCidRates (k1200bps) ++#define kV32Rates (k4800bps | k9600bps) ++#define kV32bisRates (kV32Rates | k7200bps | k12000bps | k14400bps) ++#define kV32terboRates (kV32bisRates | k16800bps | k19200bps) ++#define kV34Rates ( k2400bps | k4800bps | k7200bps | k9600bps | k12000bps | k14400bps | \ ++ k16800bps | k19200bps | k21600bps | k24000bps | k26400bps | k28800bps | \ ++ k31200bps | k33600bps ) ++ ++#define kV27Rates (k2400bps | k4800bps) ++#define kV29Rates (k4800bps | k7200bps | k9600bps) ++#define kBell103Rates k300bps ++#define kBell212Rates k1200bps ++ ++ ++/* Demodulator capabilities */ ++#define kNeecEnabled 0x00000001 ++#define kPFeecEnabled 0x00000002 ++#define kIeecEnabled 0x00000004 ++#define kFeecEnabled 0x00000008 ++ ++#define kRapidEqualizerTraining 0x00000010 ++#define kRapidPECTraining 0x00000020 ++#define kRapidECTraining 0x00000040 ++#define kAutoLoadReductionEnabled 0x00000080 ++ ++#define kTimingTrackingEnabled 0x00000100 ++#define kPhaseLockedLoopEnabled 0x00000200 ++#define kFeecPhaseLockedLoopEnabled 0x00000400 ++#define kPhaseJitterTrackingEnabled 0x00000800 ++ ++#define kClockErrorTrackingEnabled 0x00001000 ++#define kFreqOffsetTrackingEnabled 0x00002000 ++#define kFeecFreqOffsetTrackingEnabled 0x00004000 ++ ++#define kShorterNeecEnabled 0x00008000 ++#define kShorterPFeecEnabled 0x00010000 ++#define kFrondEndHPFilterEnabled 0x00020000 ++#define kGainControlEnabled 0x00040000 ++#define kPhaseHitControlEnabled 0x00080000 ++#define kBandEdgeCorrectorEnabled 0x00100000 ++#define kDisableFaxFastClearDown 0x00200000 ++ ++#define kImdOffsetCompensationEnabled 0x00400000 ++ ++#define kV34ShortEqlLengthExtShift 23 ++#define kV34ShortEqlLengthExtMask (0x3<<kV34ShortEqlLengthExtShift) ++#define kV34EqlLengthReductionEnabled (1<<(kV34ShortEqlLengthExtShift+2)) ++#define kPCMIeecLengthReductionEnabled (1<<(kV34ShortEqlLengthExtShift+3)) ++ ++/* featureMap */ ++ ++#define kAllFeatures 0xFFFFFFFF ++ ++#define kAutomodingEnabled 0x00000001 /* bit 1 */ ++#define kAutomodingDisabled 0x00000000 /* bit 1 */ ++ ++#define kV8SendCIEnabled 0x00000002 /* bit 2 */ ++#define kV8SendCIDisabled 0x00000000 /* bit 2 */ ++ ++#define kV34CMEModem 0x00000004 /* bit 3 */ ++#define kV34NotCMEModem 0x00000000 /* bit 3 */ ++ ++#define kV34ExtraINFOPreamble 0x00000008 /* bit 4 */ ++ ++#define kRetrainingEnabled 0x00000010 ++#define kRateRenegotiationEnabled 0x00000020 ++#define kTrellisCodingEnabled 0x00000040 ++ ++/* Fax specific features */ ++#define kFaxShortTraining 0x00000080 ++#define kFaxEchoSuppressionEnabled 0x00000100 ++ ++/* V.22/V.22bis specific features */ ++#define kV22GuardTone1800HzEnabled 0x00000200 ++#define kV22GuardTone550HzEnabled 0x00000400 ++ ++ ++/* V.34 specific features */ ++ ++#define kV34bisEnabled 0x00000800 ++ ++#define kV34PowerReductionAllowed 0x00001000 ++#define kAuxChannelEnabled 0x00002000 ++#define kAuxChannelDisabled 0x00000000 ++#define kV34TrellisEncoderTypeMask 0x0000C000 ++#define kV34TrellisEncoderTypeShift 14 ++ ++#define kTRN16 0x00010000 ++#define kAssymDataRatesEnabled 0x00020000 ++#define kNonLinearCodingEnabled 0x00040000 ++#define kConstShapingEnabled 0x00080000 ++#define kPrecodingEnabled 0x00100000 ++ ++#define kV34LoFcAt2400HzEnabled 0x00200000 ++#define kV34HiFcAt2400HzEnabled 0x00400000 ++#define kV34LoFcAt2743HzEnabled 0x00800000 ++#define kV34HiFcAt2743HzEnabled 0x01000000 ++#define kV34LoFcAt2800HzEnabled 0x02000000 ++#define kV34HiFcAt2800HzEnabled 0x04000000 ++#define kV34LoFcAt3000HzEnabled 0x08000000 ++#define kV34HiFcAt3000HzEnabled 0x10000000 ++#define kV34LoFcAt3200HzEnabled 0x20000000 ++#define kV34HiFcAt3200HzEnabled 0x40000000 ++#define kV34LoFcAt3429HzEnabled 0x80000000 ++#define kV34HiFcAt3429HzEnabled 0x80000000 ++ ++/* auxiliary features definintions map */ ++ ++#define kLoopbackTestFinish 0x00000000 ++#define kLoopbackTestV54Loop1 0x00000001 ++#define kLoopbackTestV54Loop2 0x00000002 ++#define kLoopbackTestV54Loop3 0x00000003 ++#define kLoopbackTestTypeMask 0x00000003 ++#define kLoopbackTestAutoRespondEnabled 0x00000004 ++#define kLoopbackSelfTest 0x00000008 ++ ++#define kPreempFilterMask 0x000000F0 ++#define kPreempFilterShift 4 ++ ++#define kPcmCodingTypeMuLaw 0x00000100 ++#define kPcmServerToServerEnabled 0x00000200 ++#define kPcmIsServerModem 0x00000400 ++#define kPcmAnalogModemAvailable 0x00000800 ++#define kPcmDigitalModemAvailable 0x00001000 ++#define kPcmDceOnDigitalNetwork 0x00002000 ++#define kPcmDModemPwrCalAtCodecOut 0x00004000 ++#define kPcm3429UpstreamAvailable 0x00008000 ++ ++#define kPcmSpectralShapingBitsMask 0x00070000 ++#define kPcmSpectralShapingBitsShift 16 ++#define kV90ServerNotDetSbarAfterJdbarFix 0x00080000 ++ ++#define kAutomoderPassive 0x00400000 ++ ++#define kV8HoldANSamUntilDetCI 0x00800000 ++#define kFaxSendFromOrgSide 0x01000000 ++#define kFaxV34HDX2400bpsCtrlChan 0x02000000 ++#define kFaxV34HDXAllowAsymCtrlChan 0x04000000 ++#define kV8ANSamStageDisabled 0x08000000 ++ ++#define kFlexSkipV8bis 0x10000000 ++#define kV34ControlChannelEnabled 0x20000000 ++#define kV34SeamlessRateChangeEnabled 0x40000000 ++ ++#define kPTTTest 0x80000000 ++ ++/* call progress detection Map */ ++ ++#define kDialTone 0x00000001 ++#define kRingBack 0x00000002 ++#define kBusy 0x00000004 ++#define kReorder 0x00000008 ++#define k2ndDTn 0x00000010 ++#define kBongTone 0x00000020 ++ ++/* Break type bit settings */ ++#define kExpedited 0x0001 ++#define kDestructive 0x0002 ++ ++/* async Framer setup map */ ++ ++#define kNDataBitsMask 0x03 ++#define k5DataBits 0x00 ++#define k6DataBits 0x01 ++#define k7DataBits 0x02 ++#define k8DataBits 0x03 ++ ++#define kNDataBitsShift 0 ++#define kNDataBitsOffset 5 ++ ++#define kParityTypeMask 0x1C ++#define kNoParity 0x00 ++#define kOddParity 0x04 ++#define kEvenParity 0x08 ++#define kMarkParity 0x0C ++#define kSpaceParity 0x10 ++ ++#define kNStopBitsMask 0x60 ++#define k1StopBits 0x00 ++#define k2StopBits 0x20 ++ ++#define kNStopBitsShift 5 ++#define kNStopBitsOffset 1 ++ ++/* Sync Framer setup map */ ++ ++#define kUnderrunCharMask 0xff ++#define kRepeatLastCharOnUnderrun 0x100 ++ ++/* HDLC sync framer setup maps */ ++#define kNFlagsBeforeFramesMask 0x3F ++#define kNFlagsBeforeFramesShift 0 ++ ++#define kNFlagsBetweenFramesMask 0x3F ++#define kNFlagsBetweenFramesShift 6 ++ ++#define k32BitCRC 0x1000 ++#define kFlagSharingEnabled 0x2000 ++ ++#define kNFlagsBeforeReportMask 0x03 /* no. of *extra* flags reqd before frame */ ++#define kNFlagsBeforeReportShift 14 ++ ++#define kTxDeferredCRC 0x10000 ++#define kRxDeferredCRC 0x20000 ++#define kTxIdleMarks 0x40000 ++#define kNoCRC 0x80000 ++ ++/* SAM framer setup maps */ ++ ++#define kSAMTransparentIdleTypeMask 0x00000003 ++#define kSAMTransparentIdleTypeShift 0 ++#define kSAMFramedIdleTypeMask 0x00000004 ++#define kSAMFramedIdleTypeShift 2 ++#define kSAMFramedOverrunActionMask 0x00000010 ++#define kSAMFramedOverrunActionShift 4 ++#define kSAMHalfDuplexModeMask 0x00000020 ++#define kSAMHalfDuplexModeShift 5 ++#define kSAMCRCTypeMask 0x000000C0 ++#define kSAMCRCTypeShift 6 ++#define kSAMNRZIEnabledMask 0x00000100 ++#define kSAMNRZIEnabledShift 8 ++#define kSAMSyn1Mask 0x00FF0000 ++#define kSAMSyn1Shift 16 ++#define kSAMSyn2Mask 0xFF000000 ++#define kSAMSyn2Shift 24 ++ ++/* <trans_idle> */ ++#define kSAM8bitSYNHuntDisabled 0 ++#define kSAM8bitSYNHuntEnabled ((ulong)1 << kSAMTransparentIdleTypeShift) ++#define kSAM16bitSYNHuntEnabled ((ulong)2 << kSAMTransparentIdleTypeShift) ++ ++/* <framed_idle> */ ++#define kSAMSendFlagsOnIdle 0 ++#define kSAMSendMarksOnIdle ((ulong)1 << kSAMFramedIdleTypeShift) ++ ++/* <framed_un_ov> */ ++#define kSAMAbortOnUnderrun 0 ++#define kSAMFlagsOnUnderrun ((ulong)1 << kSAMFramedOverrunActionShift) ++ ++/* <hd_auto> */ ++#define kSAMHalfDuplexNoAuto 0 ++#define kSAMHalfDuplexAuto ((ulong)1 << kSAMHalfDuplexModeShift) ++ ++ ++/* <crc_type> */ ++#define kSAMNoCRC 0 ++#define kSAM16bitCRC ((ulong)1 << kSAMCRCTypeShift) ++#define kSAM32bitCRC ((ulong)2 << kSAMCRCTypeShift) ++ ++/* <nrzi_en> */ ++#define kSAMNRZIDisabled 0 ++#define kSAMNRZIEnabled ((ulong)1 << kSAMNRZIEnabledShift) ++ ++ ++/* LAPM setup maps */ ++#define kLapmDirection 0x00000001 /* Bit 0 */ ++#define kLapmSREJEnabled 0x00000002 /* Bit 1 */ ++#define kLapmDetectionEnabled 0x00000004 /* Bit 2 */ ++#define kLapmLongADPEnabled 0x00000008 /* Bit 3 */ ++ ++#define kLapmCompressionEnabledMask 0x00000030 ++#define kLapmTxCompressionEnabled 0x00000010 /* Bit 4 */ ++#define kLapmRxCompressionEnabled 0x00000020 /* Bit 5 */ ++#define kLapmCompressionEnabledShift 4 ++ ++#define kLapmRetryLimitMask 0x000000C0 /* Bits 6,7 */ ++ ++#define kLapmNoRetryLimit 0x00000000 ++#define kLapm4Retries 0x00000040 ++#define kLapm8Retries 0x00000080 ++#define kLapm20Retries 0x000000C0 ++ ++#define kLapmWindowSizeMask 0x00001F00 /* Bits 8-12 */ ++#define kLapmWindowSizeShift 8 ++ ++#define kLapmWindowSize8 0x00000800 ++#define kLapmWindowSize15 0x00000F00 ++ ++ ++#define kLapmInfoFieldSizeMask 0x0000E000 /* Bits 13-15 */ ++#define kLapmInfoField8Bytes 0x00000000 ++#define kLapmInfoField16Bytes 0x00002000 ++#define kLapmInfoField32Bytes 0x00004000 ++#define kLapmInfoField64Bytes 0x00006000 ++#define kLapmInfoField128Bytes 0x00008000 ++#define kLapmInfoField192Bytes 0x0000A000 ++#define kLapmInfoField256Bytes 0x0000C000 ++#define kLapmInfoField512Bytes 0x0000E000 ++#define kLapmInfoFieldSizeShift 13 ++ ++#define kLapmT400Mask 0x00030000 /* Bits 16-17 */ ++#define kLapmAutoT400 0x00000000 ++#define kLapm750msT400 0x00010000 ++#define kLapm3secT400 0x00020000 ++#define kLapm30secT400 0x00030000 ++ ++#define kLapmT401Mask 0x000C0000 /* Bits 18-19 */ ++#define kLapmAutoT401 0x00000000 ++#define kLapm750msT401 0x00040000 ++#define kLapm3secT401 0x00080000 ++#define kLapm6secT401 0x000C0000 ++ ++#define kLapmT403Mask 0x00300000 /* Bits 20-21 */ ++#define kLapmAutoT403 0x00000000 ++#define kLapm750msT403 0x00100000 ++#define kLapm2secT403 0x00200000 ++#define kLapm4secT403 0x00300000 ++ ++ ++ ++#define kLapmDictSizeMask 0x00C00000 /* Bits 22-23 */ ++#define kLapmDictSize512 0x00000000 ++#define kLapmDictSize1024 0x00400000 ++#define kLapmDictSize2048 0x00800000 ++#define kLapmDictSize4096 0x00C00000 ++ ++#define kLapmStringSizeMask 0xFF000000 /* Bits 24-31 */ ++#define kLapmStringSizeShift 24 ++ ++/* MNP setup maps */ ++ ++#define kMnpMinPLevel 0x00000001 /* Bit 0: 1 - Minimal, 0 - Standard */ ++#define kMnpStdPLevel 0x00000000 /* Bit 0: 1 - Minimal, 0 - Standard */ ++ ++#define kMnpOptimizationEnabled 0x00000002 /* Bit 1 */ ++#define kMnpOptimizationDisabled 0x00000000 /* Bit 1 */ ++ ++#define kMnpCompressionEnabled 0x00000004 /* Bit 2 */ ++#define kMnpCompressionDisabled 0x00000000 /* Bit 2 */ ++ ++#define kMnpClassMask 0x00000018 ++#define kMnpClassShift 3 ++#define kMnpClass1 0x00000008 ++#define kMnpClass2 0x00000010 ++#define kMnpClass3 0x00000018 /* Bits 3,4 */ ++ ++#define kMnpMaxRetryMask 0x00000060 /* Bits 5,6 */ ++#define kMnpMaxRetryShift 5 ++#define kMnpNoRetryLimit 0x00000000 ++#define kMnp4Retries 0x00000020 ++#define kMnp8Retries 0x00000040 ++#define kMnp20Retries 0x00000060 ++ ++#define kMnpInfoFieldSizeMask 0x00000380 /* Bits 7-9 */ ++#define kMnpInfoFieldSizeShift 7 ++#define kMnpInfoField8Bytes 0x00000000 ++#define kMnpInfoField16Bytes 0x00000080 ++#define kMnpInfoField32Bytes 0x00000100 ++#define kMnpInfoField64Bytes 0x00000180 ++#define kMnpInfoField128Bytes 0x00000200 ++#define kMnpInfoField192Bytes 0x00000280 ++#define kMnpInfoField256Bytes 0x00000300 ++#define kMnpInfoField260Bytes 0x00000380 ++ ++#define kMnpT400Mask 0x00003000 /* Bits 12,13 */ ++#define kMnpT400Shift 12 ++#define kMnpAutoT400 0x00000000 ++#define kMnp750msT400 0x00001000 ++#define kMnp3secT400 0x00002000 ++#define kMnp6secT400 0x00003000 ++ ++#define kMnpT401Mask 0x0000C000 /* Bits 14,15 */ ++#define kMnpT401Shift 14 ++#define kMnpAutoT401 0x00000000 ++#define kMnp750msT401 0x00004000 ++#define kMnp3secT401 0x00008000 ++#define kMnp6secT401 0x0000C000 ++ ++#define kMnpT403Mask 0x00030000 /* Bits 16,17 */ ++#define kMnpT403Shift 16 ++#define kMnpAutoT403 0x00000000 ++#define kMnp60secT403 0x00010000 ++#define kMnp600secT403 0x00020000 ++#define kMnp3600secT403 0x00030000 ++ ++#define kMnpFallbackTypeMask 0x000C0000 /* Bits 18,19 */ ++#define kMnpFallbackTypeShift 18 ++#define kMnpNoFallback 0x00000000 ++#define kMnpFallbackTime 0x00040000 ++#define kMnpFallback200 0x00080000 ++#define kMnpFallbackChar 0x000C0000 ++ ++#define kMnpWindowSizeMask 0x00300000 /* Bits 20,21 */ ++#define kMnpWindowSizeShift 20 ++#define kMnp1Frame 0x00000000 ++#define kMnp4Frames 0x00100000 ++#define kMnp8Frames 0x00200000 ++#define kMnp16Frames 0x00300000 ++ ++#define kMnpDirection 0x00800000 /* Bit 22 */ ++ ++#define kMnpFallbackCharMask 0xFF000000 /* Bit 24-31 */ ++#define kMnpFallbackCharShift 24 ++ ++/* kV34HDXTurnOffCurrentModeCmd state parameter values */ ++ ++#define kV34HDXTurnOffAsClearDown 0 ++#define kV34HDXTurnOffFromControlSource 1 ++#define kV34HDXTurnOffFromControlDestination 2 ++#define kV34HDXTurnOffFromPrimarySource 3 ++#define kV34HDXTurnOffFromPrimaryDestination 4 ++ ++/* V70 setup maps */ ++ ++#define kV70Direction 0x00000001 /* Bit 0 */ ++#define kV70uIHEnabled 0x00000002 /* Bit 1 */ ++#define kV70AudioHeaderEnabled 0x00000004 /* Bit 2 */ ++#define kV70SilenceSupprEnabled 0x00000008 /* Bit 3 */ ++ ++#define kV70SuspendResumeShift 4 ++#define kV70SuspendResumeMask (3 << kV70SuspendResumeShift) ++#define kV70SuspendResumeDisabled 0x00000000 /* Bit 4,5 */ ++#define kV70SuspendResumeWAddr 0x00000010 /* Bit 4 */ ++#define kV70SuspendResumeWoAddr 0x00000020 /* Bit 5 */ ++ ++#define kV70CrcLengthShift 6 ++#define kV70CrcLengthMask (3 << kV70CrcLengthShift) ++#define kV70CrcLength16 0x00000000 /* Bit 6,7 */ ++#define kV70CrcLength8 0x00000040 /* Bit 6 */ ++#define kV70CrcLength32 0x00000080 /* Bit 7 */ ++ ++#define kV70BlockingFactorShift 8 ++#define kV70BlockingFactorMask (3 << kV70BlockingFactorShift) ++#define kV70BlockingFactor1 0x00000000 /* Bit 8,9 */ ++#define kV70BlockingFactor2 0x00000100 /* Bit 8 */ ++#define kV70BlockingFactor3 0x00000200 /* Bit 9 */ ++#define kV70BlockingFactor4 0x00000300 /* Bit 8,9 */ ++ ++#define kV70InitChannelsShift 10 ++#define kV70InitChannelsMask (1 << kV70InitChannelsShift) ++#define kV70InitNoChannels 0x00000000 /* Bit 10,11 */ ++#define kV70InitDataChannel 0x00000400 /* Bit 10,11 */ ++#define kV70InitAudioChannel 0x00000800 /* Bit 10,11 */ ++#define kV70InitBothChannels 0x00000C00 /* Bit 10,11 */ ++ ++#define kV70OOBEnabled 0x00001000 /* Bit 12 */ ++ ++/* V80 setup maps */ ++ ++#define kV80Direction 0x00000001 /* Bit 0 */ ++ ++#define kV80ModeShift 1 ++#define kV80ModeMask (3 << kV80ModeShift) ++#define kV80SyncMode (0 << kV80ModeShift) ++#define kV80TunnellingMode (1 << kV80ModeShift) ++#define kV80SamMode (2 << kV80ModeShift) ++#define kV80SamTransparentMode (2 << kV80ModeShift) ++#define kV80SamFramedMode (3 << kV80ModeShift) ++ ++#define kV80TransIdleShift 3 ++#define kV80TransIdleMask (3 << kV80TransIdleShift) ++#define kV80TransIdleNoHunt (0 << kV80TransIdleShift) ++#define kV80TransIdleHunt8 (1 << kV80TransIdleShift) ++#define kV80TransIdleHunt16 (2 << kV80TransIdleShift) ++ ++#define kV80FrameIdleShift 5 ++#define kV80FrameIdleMask (1 << kV80FrameIdleShift) ++#define kV80FrameIdleFlags (0 << kV80FrameIdleShift) ++#define kV80FrameIdleMarks (1 << kV80FrameIdleShift) ++ ++#define kV80FrameUnOvShift 6 ++#define kV80FrameUnOvMask (1 << kV80FrameUnOvShift) ++#define kV80FrameUnOvAbort (0 << kV80FrameUnOvShift) ++#define kV80FrameUnOvFlag (1 << kV80FrameUnOvShift) ++ ++#define kV80HdAutoShift 7 ++#define kV80HdAutoMask (1 << kV80HdAutoShift) ++#define kV80HdAutoNormal (0 << kV80HdAutoShift) ++#define kV80HdAutoExtended (1 << kV80HdAutoShift) ++ ++#define kV80CrcTypeShift 8 ++#define kV80CrcTypeMask (3 << kV80CrcTypeShift) ++#define kV80NoCrc (0 << kV80CrcTypeShift) ++#define kV80Crc16 (1 << kV80CrcTypeShift) ++#define kV80Crc32 (2 << kV80CrcTypeShift) ++ ++#define kV80NrziShift 10 ++#define kV80NrziMask (1 << kV80NrziShift) ++#define kV80NrziDisabled (0 << kV80NrziShift) ++#define kV80NrziEnabled (1 << kV80NrziShift) ++ ++#define kV80Syn1Mask 0x00FF0000 /* Bit 16-23 */ ++#define kV80Syn1Shift 16 ++#define kV80Syn2Mask 0xFF000000 /* Bit 24-31 */ ++#define kV80Syn2Shift 24 ++ ++/* kStartCallProgressMonitorCmd setup masks */ ++ ++#define kDTMFDetectorDebouncerEnabled 0x0001 ++#define kModemSignalDetectorDebouncerEnabled 0x0002 ++#define kCallProgressDetectorDebouncerEnabled 0x0004 ++#define kCustomSignalDebouncerEnabled 0x0008 ++#define kFaxCallingToneSuppressionEnabled 0x0010 ++#define kDataCallingToneSuppressionEnabled 0x0020 ++#define kCISuppressionEnabled 0x0040 ++#define kAnsSuppressionEnabled 0x0080 ++ ++/* kDialCmd setup masks (dialerSetup bit fields) */ ++ ++#define kDTMFDialingEnabled 0x0001 ++#define kPulseDialingEnabled 0x0002 ++#define kModeSwitchEnabled 0x0004 ++#define kBlindDialingEnabled 0x0008 ++#define kPulseDialingMethodMask 0x0030 ++#define kDialModifierTranslationMask 0x00C0 ++#define kFlashWhilePulseDialingEnabled 0x0100 ++ ++/* Pulse dialing method */ ++#define kPulseDialingNPulsesPerDigit 0x0000 ++#define kPulseDialingNplusOnePulsesPerDigit 0x0010 ++#define kPulseDialingTenMinusNPulsesPerDigit 0x0020 ++ ++/* Dial modifier translation */ ++#define kTreatWasPause 0x0040 /* Tread 'W' modifier as pause */ ++#define kTreatCommaAsWaitForDialtone 0x0080 ++ ++#ifdef TI_C6X ++#include "C6xDefs.h" ++#endif ++#ifdef PENTIUM_MMX ++#include "PentiumDefs.h" ++#endif ++ ++ ++#if defined(DSP16K) && !defined(SoftModemGlobals) ++/* ensure that code generator does not use r5 */ ++register int *softmodem_h_should_not_be_included_after_softmodem_gh asm("r5"); ++#endif ++ ++/****************************************************************************/ ++/* 3. Interface functions. */ ++/* */ ++/****************************************************************************/ ++ ++#ifdef ADSL_MODEM ++ ++#ifndef SoftDslHeader ++#include "SoftDsl.h" ++#endif ++extern char* SM_DECL SoftModemGetRevString(void); ++extern char* SM_DECL SoftModemGetProductName(void); ++extern char* SM_DECL SoftModemGetBuildDate(void); ++extern char* SM_DECL SoftModemGetFullManufacturerName(void); ++extern char* SM_DECL SoftModemGetShortManufacturerName(void); ++extern int SM_DECL SoftModemRevStringSize(void); ++extern char* SM_DECL SoftModemGetVendorIDString(void); ++extern char* SM_DECL SoftModemGetT1413VendorIDString(void); ++extern char* SM_DECL SoftModemGetSerialNumberString(void); ++extern int SM_DECL SoftModemSerNumStringSize(void); ++#define SoftDslGetProductName SoftModemGetProductName ++#define SoftDslGetBuildDate SoftModemGetBuildDate ++#define SoftDslGetFullManufacturerName SoftModemGetFullManufacturerName ++#define SoftDslGetShortManufacturerName SoftModemGetShortManufacturerName ++ ++#else /* !ADSL_MODEM */ ++ ++extern void SM_DECL SoftModemSetMemoryPtr (void *varsPtr); ++extern void* SM_DECL SoftModemGetMemoryPtr (void); ++extern void SM_DECL SoftModemSetRefData (void *varsPtr); ++extern void* SM_DECL SoftModemGetRefData (void); ++extern int SM_DECL SoftModemGetMemorySize (void); ++extern void SM_DECL SoftModemInit (void); ++extern void SM_DECL SoftModemReset (void); ++extern void SM_DECL SoftModemLineHandler (int sampleCount, short *srcPtr, short *dstPtr); ++extern void SM_DECL SoftModemTimer (long timeQ24ms); ++extern Boolean SM_DECL SoftModemCommandHandler (modemCommandStruct *cmdPtr); ++extern int SM_DECL SoftModemGetExternalMemorySize(void); ++extern void SM_DECL SoftModemSetExternalMemoryPtr(void *varsPtr); ++ ++extern void SM_DECL SoftModemSetPcmCoding (pcmCodingType pcmCoding); ++extern void SM_DECL SoftModemPcmLineHandler (int sampleCount, uchar *srcPtr, uchar *dstPtr); ++ ++/* SoftModem IO functions */ ++extern int SM_DECL SoftModemWrite(int nBytes, uchar* srcPtr); ++extern int SM_DECL SoftModemRead(int nBytes, uchar* dstPtr); ++extern int SM_DECL SoftModemWriteFrame(int nBytes, uchar* srcPtr); ++extern int SM_DECL SoftModemReadFrame(int maxFrameSize, uchar* dstPtr); ++extern int SM_DECL SoftModemCountWritePending(void); ++extern int SM_DECL SoftModemCountReadPending(void); ++extern int SM_DECL SoftModemWriteSpaceAvailable(void); ++extern void SM_DECL SoftModemWriteFlush(void); ++extern void SM_DECL SoftModemReadFlush(void); ++extern int SM_DECL SoftModemGetWriteBufferSize(void); ++extern int SM_DECL SoftModemGetReadBufferSize(void); ++ ++#ifdef AUDIO ++extern int SM_DECL SoftModemAudioHandler(int sampleCount, short *srcPtr, short *dstPtr); ++extern int SM_DECL SoftModemAudioRxDataHandler(int nBytes, uchar* srcPtr); ++extern int SM_DECL SoftModemAudioTxDataHandler(int nBytes, uchar* dstPtr); ++#endif ++ ++ ++#define SoftModemSetGlobalPtr SoftModemSetMemoryPtr ++#define SoftModem SoftModemLineHandler ++#ifndef LINKLAYER_V42BIS_LARGE_DICTIONARY ++#define kSoftModemMaxMemorySize (65536) ++#else ++#define kSoftModemMaxMemorySize (65536 + 8192) ++#endif ++ ++/* ++ * Internal functions ++ */ ++extern long SM_DECL SoftModemGetDCOffset(void); ++extern void SM_DECL SoftModemDisableDCOffsetTracking(void); ++extern void SM_DECL SoftModemEnableDCOffsetTracking(void); ++extern long SM_DECL SoftModemGetRcvPower(void); ++extern ulong SM_DECL SoftModemGetHybridDelay(void); ++extern void SM_DECL SoftModemStatusHandler (modemStatusStruct *status); ++extern Boolean SM_DECL SoftModemInternalCommandHandler (modemCommandStruct *cmdPtr); ++extern void SM_DECL SoftModemInternalStatusHandler (modemStatusStruct *status); ++extern void SM_DECL SoftModemSetControllerOnlyMode(commandHandlerType externalDataPumpCommandHandlerPtr); ++extern char* SM_DECL SoftModemGetRevString(void); ++extern char* SM_DECL SoftModemGetProductName(void); ++extern char* SM_DECL SoftModemGetBuildDate(void); ++extern char* SM_DECL SoftModemGetFullManufacturerName(void); ++extern char* SM_DECL SoftModemGetShortManufacturerName(void); ++extern int SM_DECL SoftModemRevStringSize(void); ++extern char* SM_DECL SoftModemGetVendorIDString(void); ++extern char* SM_DECL SoftModemGetSerialNumberString(void); ++extern void SM_DECL SoftModemAuxTxDataHandler(int nBytes, uchar *dataPtr); ++extern void SM_DECL SoftModemAuxRxDataHandler(int nBytes, uchar *dataPtr); ++extern void SM_DECL SoftModemTxDataHandler(int nBytes, uchar *dataPtr); ++extern void SM_DECL SoftModemRxDataHandler(int nBytes, uchar *dataPtr); ++extern void SM_DECL SoftModemATPrintf(uchar *format, void *arg1, void *arg2, void *arg3); ++ ++#define SoftModemSetInputSaturationLimit(limit) (gSystemVars.inputSignalLimit = limit) ++#define SoftModemResetInputSaturationLimit() (gSystemVars.inputSignalLimit = 0) ++ ++#endif /* !ADSL_MODEM */ ++ ++#endif /* SoftModemPh */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModemTypes.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModemTypes.h +--- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModemTypes.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModemTypes.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,292 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * SoftModemTypes.h ++ * ++ * ++ * Description: ++ * This file contains some of the type declarations for SoftModem ++ * ++ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. ++ * Authors: Mark Gonikberg, Haixiang Liang. ++ * ++ * $Revision: 1.9 $ ++ * ++ * $Id: SoftModemTypes.h,v 1.9 2004/04/13 00:16:59 ilyas Exp $ ++ * ++ * $Log: SoftModemTypes.h,v $ ++ * Revision 1.9 2004/04/13 00:16:59 ilyas ++ * Merged the latest ADSL driver changes ++ * ++ * Revision 1.8 2004/01/24 01:35:33 ytan ++ * add multi-section lmem swap ++ * ++ * Revision 1.7 2001/09/21 19:19:01 ilyas ++ * Minor fixes for VxWorks build ++ * ++ * Revision 1.6 2001/08/16 02:16:39 khp ++ * - added definitions for SLOW_DATA and FAST_TEXT, defined to nothing ++ * except when bcm47xx && USE_SLOW_DATA or USE_FAST_TEXT. Any function ++ * that needs to run fast should be marked with FAST_TEXT. Any data that ++ * is not referenced often should be marked with SLOW_DATA. ++ * ++ * Revision 1.5 2001/03/30 00:49:59 liang ++ * Changed warning output message. ++ * ++ * Revision 1.4 2000/06/21 22:24:40 yongbing ++ * Modify WARN micro to limit the number of same warnings printed ++ * ++ * Revision 1.3 1999/08/05 20:02:13 liang ++ * Merged with the softmodem top of the tree on 08/04/99. ++ * ++ * Revision 1.2 1999/01/27 22:14:29 liang ++ * Merge with SoftModem_3_1_02. ++ * ++ * Revision 1.19 1998/11/17 04:02:39 yura ++ * Fixed WARN and ASSERT redefinition warning for WinNT targets ++ * ++ * Revision 1.18 1998/08/26 19:20:43 scott ++ * Commented out EXCLUDE_CYGWIN32_TYPES define ++ * ++ * Revision 1.17 1998/08/13 19:03:06 scott ++ * Added BitField definition and INT_IS_LONG ++ * ++ * Revision 1.16 1998/08/08 03:39:55 scott ++ * The DEBUG_PTR_ENABLED macro can be used to enable only the DEBUG_PTR macros ++ * ++ * Revision 1.15 1998/07/28 22:21:31 mwg ++ * Fixed problems with NULL & nil being defined incorrectly ++ * ++ * Revision 1.14 1998/07/08 17:09:17 scott ++ * Define ASSERT and WARN only if not already defined ++ * ++ * Revision 1.13 1998/07/02 20:46:34 scott ++ * Added workaround for building certain builds with older SunOS ++ * ++ * Revision 1.12 1998/02/09 18:24:49 scott ++ * Defined "Private" as nothing for GreenHill (to prevent erroneous section ++ * allocations for data) ++ * ++ * Revision 1.11 1997/08/29 21:39:24 scott ++ * Added check for LONG_IS_INT define (for TI C6X support) ++ * ++ * Revision 1.10 1997/05/29 19:50:23 mwg ++ * Added code to avoid type redefintions under SunOS. ++ * ++ * Revision 1.9 1997/03/19 18:35:08 mwg ++ * Changed copyright notice. ++ * ++ * Revision 1.8 1997/02/11 00:05:53 mwg ++ * Minor adjustments for Pentium optimization. ++ * ++ * Revision 1.7 1997/01/11 01:30:47 mwg ++ * Added new macro WARN -- the same as ASSERT but without exit. ++ * ++ * Revision 1.6 1996/08/22 20:07:39 liang ++ * When ASSERT fires, only print out information, don't exit. ++ * ++ * Revision 1.5 1996/05/06 06:49:10 mwg ++ * Fixed linux problems. ++ * ++ * Revision 1.4 1996/05/02 08:40:16 mwg ++ * Merged in Chromatic bug fixes. ++ * ++ * Revision 1.3 1996/04/01 20:59:53 mwg ++ * Added macros to setup and use debug pointer. ++ * ++ * Revision 1.2 1996/02/27 01:50:04 mwg ++ * Added ASSERT() macro. ++ * ++ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg ++ * Redesigned the project directory structure. Merged V.34 into the project. ++ * ++ * Revision 1.2 1995/12/03 06:59:31 mwg ++ * Fixed all gcc varnings. We are now running under Linux on a PC! ++ * ++ *****************************************************************************/ ++#ifndef SoftModemTypesh ++#define SoftModemTypesh ++ ++#ifdef LONG_SHORTS ++#define short long ++#define ushort unsigned long ++#endif ++ ++typedef signed char schar; ++typedef unsigned char uchar; ++ ++#if 0 /* This is not currently required */ ++#if defined(_CYGWIN32) && defined(DEBUG) ++#define EXCLUDE_CYGWIN32_TYPES ++#endif ++#endif ++ ++#if !defined(_SYS_TYPES_H) || !defined(TARG_OS_RTEMS) ++#if defined(_CFE_) ++ typedef unsigned int uint; ++ typedef unsigned long ulong; ++ typedef unsigned short ushort; ++#elif defined(TARG_OS_RTEMS) ++#if defined(HOST_ARCH_LINUX) ++ typedef unsigned int uint; ++#endif ++ typedef unsigned long ulong; ++#if defined(HOST_ARCH_LINUX) ++ typedef unsigned short ushort; ++#endif ++#elif defined(EXCLUDE_CYGWIN32_TYPES) || (!defined _NO_TYPE_DEFS_ && !defined _SYS_TYPES_H && !defined __SYS_TYPES_H__ && !defined _SYS_BSD_TYPES_H && !defined _LINUX_TYPES_H) || defined(__sparc__) ++#ifndef EXCLUDE_CYGWIN32_TYPES ++ typedef unsigned int uint; ++#endif ++#ifndef _LINUX_TYPES_H ++ typedef unsigned long ulong; ++#endif ++#if !defined(ushort) && !defined(EXCLUDE_CYGWIN32_TYPES) && !defined(__INCvxTypesOldh) ++ typedef unsigned short ushort; ++#endif ++#endif ++#else ++typedef unsigned long ulong; ++#endif ++ ++#if defined(GREENHILL) || defined(GNUTX39) /* GH allocates private data to incorrect section */ ++#define Private ++#else ++#define Private static ++#endif ++ ++#define Public ++ ++#ifdef NULL ++#undef NULL ++#endif ++#ifdef nil ++#undef nil ++#endif ++ ++#define NULL 0 ++#define nil 0 ++ ++#define false 0 ++#define true 1 ++typedef unsigned char Boolean; ++typedef unsigned int BitField; /* this must occur BEFORE long_is_int/int_is_long defs */ ++ ++#ifdef LONG_IS_INT ++#define long int ++#define ulong uint ++#endif ++ ++#ifdef INT_IS_LONG ++#define int long ++#define uint ulong ++#endif ++ ++#define POSTULATE(postulate) \ ++ do \ ++ { \ ++ typedef struct \ ++ { \ ++ char NegativeSizeIfPostulateFalse[((int)(postulate))*2 - 1]; \ ++ } PostulateCheckStruct; \ ++ } \ ++ while (0) ++ ++#if defined(DEBUG) && !defined(__KERNEL__) ++#ifndef WARN ++#define kDSLNumberWarnTimes 10 ++#define WARN(assertion) \ ++ { static int warnSeveralTimes=0; \ ++ if ((!(assertion))&(warnSeveralTimes<kDSLNumberWarnTimes)) \ ++ { \ ++ fprintf(stderr, "Warning, failed: %s\n", #assertion); \ ++ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ ++ warnSeveralTimes++; \ ++ } \ ++ } ++#endif ++#ifndef ASSERT ++#define ASSERT(assertion) \ ++ { if (!(assertion)) \ ++ { \ ++ fprintf(stderr, "Assertion failed: %s\n", #assertion); \ ++ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ ++ exit(1); \ ++ } \ ++ } ++#endif ++#else ++ ++#undef WARN ++#define WARN(a) ++ ++#undef ASSERT ++#define ASSERT(a) ++ ++#endif ++ ++/* ++ * memory allocation macros ++ */ ++ ++#if defined(bcm47xx) && defined(USE_SLOW_DATA) ++#define SLOW_DATA __attribute__ ((section(".slow_data"))) ++#else ++#define SLOW_DATA ++#endif ++ ++#if defined(bcm47xx) && defined(USE_FAST_TEXT) ++#define FAST_TEXT __attribute__ ((section(".fast_text"))) ++#else ++#define FAST_TEXT ++#endif ++ ++#if defined(bcm47xx) && defined(SWAP_LMEM) ++#define SWAP_TEXT1_1 __attribute__ ((section(".swap_text1_1"))) ++#define SWAP_TEXT1_2 __attribute__ ((section(".swap_text1_2"))) ++#define SWAP_TEXT2_1 __attribute__ ((section(".swap_text2_1"))) ++#define SWAP_TEXT2_2 __attribute__ ((section(".swap_text2_2"))) ++#define SWAP_TEXT3_1 __attribute__ ((section(".swap_text3_1"))) ++#define SWAP_TEXT3_2 __attribute__ ((section(".swap_text3_2"))) ++#else ++#define SWAP_TEXT1_1 FAST_TEXT ++#define SWAP_TEXT1_2 FAST_TEXT ++#define SWAP_TEXT2_1 FAST_TEXT ++#define SWAP_TEXT2_2 FAST_TEXT ++#define SWAP_TEXT3_1 FAST_TEXT ++#define SWAP_TEXT3_2 FAST_TEXT ++#endif ++ ++/* ++ * Debug stuff ++ */ ++#if defined(DEBUG) || defined(DEBUG_PTR_ENABLED) ++#define DECLARE_DEBUG_PTR(type) static type *gv; ++#define SETUP_DEBUG_PTR() gv = &globalVar ++#else ++#define DECLARE_DEBUG_PTR(type) ++#define SETUP_DEBUG_PTR() ++#endif ++/* ++ * Obsolete stuff ++ */ ++#ifdef DEBUG ++#define HereIsTheGlobalVarPointerMacro SETUP_DEBUG_PTR(); ++#else ++#define HereIsTheGlobalVarPointerMacro ++#endif ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6338_common.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6338_common.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6338_common.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6338_common.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,207 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: 6338_common.h */ ++/* DATE: 05/10/04 */ ++/* PURPOSE: Define addresses of major hardware components of */ ++/* BCM6338 */ ++/* */ ++/***********************************************************************/ ++#ifndef __BCM6338_MAP_COMMON_H ++#define __BCM6338_MAP_COMMON_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#define PERF_BASE 0xfffe0000 /* chip control registers */ ++#define BB_BASE 0xfffe0100 /* bus bridge registers */ ++#define TIMR_BASE 0xfffe0200 /* timer registers */ ++#define UART_BASE 0xfffe0300 /* uart registers */ ++#define GPIO_BASE 0xfffe0400 /* gpio registers */ ++#define SPI_BASE 0xfffe0c00 /* SPI master controller registers */ ++ ++#define ADSL_BASE 0xfffe1000 /* ADSL core control registers */ ++#define ATM_BASE 0xfffe2000 /* ATM SAR control registers */ ++#define EMAC_DMA_BASE 0xfffe2400 /* EMAC DMA control registers */ ++#define USB_DMA_BASE 0xfffe2400 /* USB DMA control registers */ ++#define EMAC1_BASE 0xfffe2800 /* EMAC1 control registers */ ++#define USB_CTL_BASE 0xfffe3000 /* USB control registers */ ++#define SDRAM_BASE 0xfffe3100 /* SDRAM control registers */ ++ ++ ++/* ++##################################################################### ++# System PLL Control Register ++##################################################################### ++*/ ++ ++#define SOFT_RESET 0x00000001 ++ ++/* ++##################################################################### ++# SDRAM Control Registers ++##################################################################### ++*/ ++#define SDR_INIT_CTL 0x00 ++ /* Control Bits */ ++#define SDR_PFEN1 (1<<16) ++#define SDR_PFEN0 (1<<15) ++#define SDR_EMPRS (1<<14) ++#define SDR_2_BANKS (1<<13) ++#define SDR_1_BANK (0<<13) ++#define SDR_CS1_EN (1<<12) ++#define SDR_PEND (1<<11) ++#define SDR_32_BIT (1<<10) ++#define SDR_POWER_DOWN (1<<9) ++#define SDR_SELF_REFRESH (1<<8) ++#define SDR_11_COLS (3<<6) ++#define SDR_10_COLS (2<<6) ++#define SDR_9_COLS (1<<6) ++#define SDR_8_COLS (0<<6) ++#define SDR_13_ROWS (2<<4) ++#define SDR_12_ROWS (1<<4) ++#define SDR_11_ROWS (0<<4) ++#define SDR_MASTER_EN (1<<3) ++#define SDR_MRS_CMD (1<<2) ++#define SDR_PRE_CMD (1<<1) ++#define SDR_CBR_CMD (1<<0) ++ ++#define SDR_CFG_REG 0x04 ++ /* Control Bits */ ++#define SDR_FULL_PG 0 ++#define SDR_BURST8 1 ++#define SDR_BURST4 2 ++#define SDR_BURST2 3 ++#define SDR_FAST_MEM (1<<2) ++#define SDR_SLOW_MEM (0<<2) ++ ++#define SDR_REF_CTL 0x0C ++ /* Control Bits */ ++#define SDR_REF_EN (1<<15) ++ ++#define SDR_PRIOR ++ /* Control Bits */ ++#define SDR_EN_PRIOR (1<<31) ++ ++ ++/* ++##################################################################### ++# MPI Control Registers ++##################################################################### ++*/ ++#define CS0BASE 0x00 ++#define CS0CNTL 0x04 ++ ++/* ++# CSxBASE settings ++# Size in low 4 bits ++# Base Address for match in upper 24 bits ++*/ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ ++/* CSxCNTL settings */ ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define ZEROWT 0x00000000 /* .. 0 WS */ ++#define ONEWT 0x00000002 /* .. 1 WS */ ++#define TWOWT 0x00000004 /* .. 2 WS */ ++#define THREEWT 0x00000006 /* .. 3 WS */ ++#define FOURWT 0x00000008 /* .. 4 WS */ ++#define FIVEWT 0x0000000a /* .. 5 WS */ ++#define SIXWT 0x0000000c /* .. 6 WS */ ++#define SEVENWT 0x0000000e /* .. 7 WS */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert chip select polarity */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. enable fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++ ++/* ++##################################################################### ++# UART Control Registers ++##################################################################### ++*/ ++#define UART0CONTROL 0x01 ++#define UART0CONFIG 0x02 ++#define UART0RXTIMEOUT 0x03 ++#define UART0BAUD 0x04 ++#define UART0FIFOCFG 0x0a ++#define UART0INTMASK 0x10 ++#define UART0INTSTAT 0x12 ++#define UART0DATA 0x17 ++ ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++#define XMITBREAK 0x40 /* Config register */ ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ ++#define RSTTXFIFOS 0x80 /* Rx Timeout register */ ++#define RSTRXFIFOS 0x40 ++ ++#define TX4 0x40 /* FIFO config register */ ++#define RX4 0x04 ++ ++#define DELTAIP 0x0001 /* Interrupt Status and Mask registers */ ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++#if __cplusplus ++} ++#endif ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6338_map.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6338_map.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6338_map.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6338_map.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,885 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: 6338_map.h */ ++/* DATE: 05/10/04 */ ++/* PURPOSE: Define addresses of major hardware components of */ ++/* BCM6338 */ ++/* */ ++/***********************************************************************/ ++#ifndef __BCM6338_MAP_H ++#define __BCM6338_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++#include "6338_common.h" ++#include "6338_intr.h" ++ ++/* macro to convert logical data addresses to physical */ ++/* DMA hardware must see physical address */ ++#define LtoP( x ) ( (uint32)x & 0x1fffffff ) ++#define PtoL( x ) ( LtoP(x) | 0xa0000000 ) ++ ++/* ++** Interrupt Controller ++*/ ++typedef struct PerfControl { ++ uint32 RevID; /* (00) */ ++ uint16 testControl; /* (04) */ ++ uint16 blkEnables; /* (06) */ ++ ++#define ADSL_CLK_EN 0x0001 ++#define MPI_CLK_EN 0x0002 ++#define DRAM_CLK_EN 0x0004 ++#define EMAC_CLK_EN 0x0010 ++#define USBS_CLK_EN 0x0010 ++#define SAR_CLK_EN 0x0020 ++#define SPI_CLK_EN 0x0200 ++ ++ uint32 pll_control; /* (08) */ ++#define CHIP_SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; /* (0c) */ ++ uint32 IrqStatus; /* (10) */ ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 5 ++#define EI_CLEAR_SHFT 10 ++#define EI_MASK_SHFT 15 ++#define EI_INSENS_SHFT 20 ++#define EI_LEVEL_SHFT 25 ++ ++ uint32 unused[4]; /* (18) */ ++ uint32 BlockSoftReset; /* (28) */ ++#define BSR_SPI 0x00000001 ++#define BSR_EMAC 0x00000004 ++#define BSR_USBH 0x00000008 ++#define BSR_USBS 0x00000010 ++#define BSR_ADSL 0x00000020 ++#define BSR_DMAMEM 0x00000040 ++#define BSR_SAR 0x00000080 ++#define BSR_ACLC 0x00000100 ++#define BSR_ADSL_MIPS_PLL 0x00000400 ++#define BSR_ALL_BLOCKS \ ++ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ ++ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) ++} PerfControl; ++ ++#define PERF ((volatile PerfControl * const) PERF_BASE) ++ ++/* ++** Bus Bridge Registers ++*/ ++typedef struct BusBridge { ++ uint16 status; ++#define BB_BUSY 0x8000 /* posted operation in progress */ ++#define BB_RD_PND 0x4000 /* read pending */ ++#define BB_RD_CMPLT 0x2000 /* read complete */ ++#define BB_ERROR 0x1000 /* posted write error */ ++#define BB_TEA 0x0800 /* transfer aborted */ ++ uint16 abortTimeoutCnt; /* abort timeout value */ ++ ++ byte writePostEnable; ++#define BB_POST_TIMR_EN 0x08 /* post writes to timer regs */ ++#define BB_POST_GPIO_EN 0x04 /* post writes to gpio regs */ ++#define BB_POST_INTC_EN 0x02 /* post writes to interrupt controller regs */ ++#define BB_POST_UART_EN 0x01 /* post writes to uart regs */ ++ byte unused1[5]; ++ uint16 postAddr; /* posted read address (lower half) */ ++ byte unused2[3]; ++ byte postData; /* posted read data */ ++} BusBridge; ++ ++/* register offsets (needed for EBI master access) */ ++#define BB_STATUS 0 ++#define BB_ABORT_TO_CNT 2 ++#define BB_WR_POST_EN 4 ++#define BB_RD_POST_ADDR 10 ++#define BB_RD_POST_DATA 12 ++ ++#define BRIDGE *bridge ((volatile BusBridge * const) BB_BASE) ++ ++/* ++** Timer ++*/ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++/* ++** UART ++*/ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++/* ++** Gpio Controller ++*/ ++ ++typedef struct GpioControl { ++ uint32 unused0; ++ uint32 GPIODir; /* bits 7:0 */ ++ uint32 unused1; /* bits 36:32 */ ++ uint32 GPIOio; ++ uint32 LEDCtrl; ++#define LED3_STROBE 0x08000000 ++#define LED2_STROBE 0x04000000 ++#define LED1_STROBE 0x02000000 ++#define LED0_STROBE 0x01000000 ++#define LED_TEST 0x00010000 ++#define LED3_DISABLE_LINK_ACT 0x00008000 ++#define LED2_DISABLE_LINK_ACT 0x00004000 ++#define LED1_DISABLE_LINK_ACT 0x00002000 ++#define LED0_DISABLE_LINK_ACT 0x00001000 ++#define LED_INTERVAL_SET_MASK 0x00000f00 ++#define LED_INTERVAL_SET_320MS 0x00000500 ++#define LED_INTERVAL_SET_160MS 0x00000400 ++#define LED_INTERVAL_SET_80MS 0x00000300 ++#define LED_INTERVAL_SET_40MS 0x00000200 ++#define LED_INTERVAL_SET_20MS 0x00000100 ++#define LED3_ON 0x00000080 ++#define LED2_ON 0x00000040 ++#define LED1_ON 0x00000020 ++#define LED0_ON 0x00000010 ++#define LED3_ENABLE 0x00000008 ++#define LED2_ENABLE 0x00000004 ++#define LED1_ENABLE 0x00000002 ++#define LED0_ENABLE 0x00000001 ++ uint32 SpiSlaveCfg; ++#define SPI_SLAVE_RESET 0x00010000 ++#define SPI_RESTRICT 0x00000400 ++#define SPI_DELAY_DISABLE 0x00000200 ++#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 ++#define SPI_SER_ADDR_CFG_MASK 0x0000000c ++#define SPI_MODE 0x00000001 ++ uint32 vRegConfig; ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++/* Number to mask conversion macro used for GPIODir and GPIOio */ ++#define GPIO_NUM_MAX_BITS_MASK 0x0f ++#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) ++ ++/* ++** Spi Controller ++*/ ++ ++typedef struct SpiControl { ++ uint16 spiCmd; /* (0x0): SPI command */ ++#define SPI_CMD_NOOP 0 ++#define SPI_CMD_SOFT_RESET 1 ++#define SPI_CMD_HARD_RESET 2 ++#define SPI_CMD_START_IMMEDIATE 3 ++ ++#define SPI_CMD_COMMAND_SHIFT 0 ++#define SPI_CMD_DEVICE_ID_SHIFT 4 ++#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 ++#define SPI_CMD_ONE_BYTE_SHIFT 11 ++#define SPI_CMD_ONE_WIRE_SHIFT 12 ++#define SPI_DEV_ID_0 0 ++#define SPI_DEV_ID_1 1 ++#define SPI_DEV_ID_2 2 ++#define SPI_DEV_ID_3 3 ++ ++ byte spiIntStatus; /* (0x2): SPI interrupt status */ ++ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ ++ ++ byte spiIntMask; /* (0x4): SPI interrupt mask */ ++#define SPI_INTR_CMD_DONE 0x01 ++#define SPI_INTR_RX_OVERFLOW 0x02 ++#define SPI_INTR_INTR_TX_UNDERFLOW 0x04 ++#define SPI_INTR_TX_OVERFLOW 0x08 ++#define SPI_INTR_RX_UNDERFLOW 0x10 ++#define SPI_INTR_CLEAR_ALL 0x1f ++ ++ byte spiStatus; /* (0x5): SPI status */ ++#define SPI_RX_EMPTY 0x02 ++#define SPI_CMD_BUSY 0x04 ++#define SPI_SERIAL_BUSY 0x08 ++ ++ byte spiClkCfg; /* (0x6): SPI clock configuration */ ++#define SPI_CLK_0_391MHZ 1 ++#define SPI_CLK_0_781MHZ 2 /* default */ ++#define SPI_CLK_1_563MHZ 3 ++#define SPI_CLK_3_125MHZ 4 ++#define SPI_CLK_6_250MHZ 5 ++#define SPI_CLK_12_50MHZ 6 ++#define SPI_CLK_MASK 0x07 ++#define SPI_SSOFFTIME_MASK 0x38 ++#define SPI_SSOFFTIME_SHIFT 3 ++#define SPI_BYTE_SWAP 0x80 ++ ++ byte spiFillByte; /* (0x7): SPI fill byte */ ++ ++ byte unused0; ++ byte spiMsgTail; /* (0x9): msgtail */ ++ byte unused1; ++ byte spiRxTail; /* (0xB): rxtail */ ++ ++ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ ++ ++ byte spiMsgCtl; /* (0x40) control byte */ ++#define FULL_DUPLEX_RW 0 ++#define HALF_DUPLEX_W 1 ++#define HALF_DUPLEX_R 2 ++#define SPI_MSG_TYPE_SHIFT 6 ++#define SPI_BYTE_CNT_SHIFT 0 ++ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ ++ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ ++ byte unused3[64]; /* (0xc0 - 0xff) reserved */ ++} SpiControl; ++ ++#define SPI ((volatile SpiControl * const) SPI_BASE) ++ ++#define IUDMA_MAX_CHANNELS 16 ++ ++/* ++** DMA Channel Configuration (1 .. 16) ++*/ ++typedef struct DmaChannelCfg { ++ uint32 cfg; /* (00) assorted configuration */ ++#define DMA_BURST_HALT 0x00000004 /* idle after finish current memory burst */ ++#define DMA_PKT_HALT 0x00000002 /* idle after an EOP flag is detected */ ++#define DMA_ENABLE 0x00000001 /* set to enable channel */ ++ uint32 intStat; /* (04) interrupts control and status */ ++ uint32 intMask; /* (08) interrupts mask */ ++#define DMA_BUFF_DONE 0x00000001 /* buffer done */ ++#define DMA_DONE 0x00000002 /* packet xfer complete */ ++#define DMA_NO_DESC 0x00000004 /* no valid descriptors */ ++ uint32 maxBurst; /* (0C) max burst length permitted */ ++} DmaChannelCfg; ++ ++/* ++** DMA State RAM (1 .. 16) ++*/ ++typedef struct DmaStateRam { ++ uint32 baseDescPtr; /* (00) descriptor ring start address */ ++ uint32 state_data; /* (04) state/bytes done/ring offset */ ++ uint32 desc_len_status; /* (08) buffer descriptor status and len */ ++ uint32 desc_base_bufptr; /* (0C) buffer descrpitor current processing */ ++} DmaStateRam; ++ ++/* ++** DMA Registers ++*/ ++typedef struct DmaRegs { ++#define DMA_MASTER_EN 0x00000001 ++#define DMA_FLOWC_CH1_EN 0x00000002 ++#define DMA_FLOWC_CH3_EN 0x00000004 ++#define DMA_NUM_CHS_MASK 0x0f000000 ++#define DMA_NUM_CHS_SHIFT 24 ++#define DMA_FLOWCTL_MASK 0x30000000 ++#define DMA_FLOWCTL_CH1 0x10000000 ++#define DMA_FLOWCTL_CH3 0x20000000 ++#define DMA_FLOWCTL_SHIFT 28 ++ uint32 controller_cfg; /* (00) controller configuration */ ++ ++ // Flow control Ch1 ++ uint32 flowctl_ch1_thresh_lo; /* (04) EMAC1 RX DMA channel */ ++ uint32 flowctl_ch1_thresh_hi; /* (08) EMAC1 RX DMA channel */ ++ uint32 flowctl_ch1_alloc; /* (0C) EMAC1 RX DMA channel */ ++#define DMA_BUF_ALLOC_FORCE 0x80000000 ++ ++ // Flow control Ch3 ++ uint32 flowctl_ch3_thresh_lo; /* (10) EMAC2 RX DMA channel */ ++ uint32 flowctl_ch3_thresh_hi; /* (14) EMAC2 RX DMA channel */ ++ uint32 flowctl_ch3_alloc; /* (18) EMAC2 RX DMA channel */ ++ ++ // Unused words ++ uint32 resv[57]; ++ ++ // Per channel registers/state ram ++ DmaChannelCfg chcfg[IUDMA_MAX_CHANNELS]; /* (100) Channel configuration */ ++ union { ++ DmaStateRam s[IUDMA_MAX_CHANNELS]; ++ uint32 u32[4 * IUDMA_MAX_CHANNELS]; ++ } stram; /* (200) state ram */ ++} DmaRegs; ++ ++/* ++** DMA Buffer ++*/ ++typedef struct DmaDesc { ++ uint16 length; /* in bytes of data in buffer */ ++#define DMA_DESC_USEFPM 0x8000 ++#define DMA_DESC_MULTICAST 0x4000 ++#define DMA_DESC_BUFLENGTH 0x0fff ++ uint16 status; /* buffer status */ ++#define DMA_OWN 0x8000 /* cleared by DMA, set by SW */ ++#define DMA_EOP 0x4000 /* last buffer in packet */ ++#define DMA_SOP 0x2000 /* first buffer in packet */ ++#define DMA_WRAP 0x1000 /* */ ++#define DMA_APPEND_CRC 0x0100 ++ ++/* EMAC Descriptor Status definitions */ ++#define EMAC_MISS 0x0080 /* framed address recognition failed (promiscuous) */ ++#define EMAC_BRDCAST 0x0040 /* DA is Broadcast */ ++#define EMAC_MULT 0x0020 /* DA is multicast */ ++#define EMAC_LG 0x0010 /* frame length > RX_LENGTH register value */ ++#define EMAC_NO 0x0008 /* Non-Octet aligned */ ++#define EMAC_RXER 0x0004 /* RX_ERR on MII while RX_DV assereted */ ++#define EMAC_CRC_ERROR 0x0002 /* CRC error */ ++#define EMAC_OV 0x0001 /* Overflow */ ++ ++/* HDLC Descriptor Status definitions */ ++#define DMA_HDLC_TX_ABORT 0x0100 ++#define DMA_HDLC_RX_OVERRUN 0x4000 ++#define DMA_HDLC_RX_TOO_LONG 0x2000 ++#define DMA_HDLC_RX_CRC_OK 0x1000 ++#define DMA_HDLC_RX_ABORT 0x0100 ++ ++ uint32 address; /* address of data */ ++} DmaDesc; ++ ++/* ++** Sdram Controller ++*/ ++typedef struct SdramControllerRegs { ++ uint16 unused1; ++ uint16 initControl; /* 02 */ ++#define SD_POWER_DOWN 0x200 /* put sdram into power down */ ++#define SD_SELF_REFRESH 0x100 /* enable self refresh mode */ ++#define SD_SOFT_RESET 0x080 /* soft reset all sdram controller regs */ ++#define SD_EDO_SELECT 0x040 /* select EDO mode */ ++#define SD_EDO_WAIT_STATE 0x020 /* add an EDO wait state */ ++#define SD_8MEG 0x010 /* map sdram to 8 megs */ ++#define SD_MASTER_ENABLE 0x008 /* enable accesses to external sdram */ ++#define SD_MRS 0x004 /* generate a mode register select cycle */ ++#define SD_PRECHARGE 0x002 /* generate a precharge cycle */ ++#define SD_CBR 0x001 /* generate a refresh cycle */ ++ uint8 unused2[3]; ++ uint8 config; /* 07 */ ++#define SD_FAST_MEM 0x04 /* 1=CAS latency of 2, 0 = CAS latency of 3 */ ++#define SD_BURST_LEN 0x03 /* set burst length */ ++#define SD_BURST_FULL_PAGE 0x00 /* .. full page */ ++#define SD_BURST_8 0x01 /* .. 8 words */ ++#define SD_BURST_4 0x02 /* .. 4 words */ ++#define SD_BURST_2 0x03 /* .. 2 words */ ++ uint16 unused3; ++ uint16 refreshControl; /* 0a */ ++#define SD_REFRESH_ENABLE 0x8000 /* refresh enable */ ++#define SD_REFRESH_PERIOD 0x00ff /* refresh period (16 x n x clock_period) */ ++ ++ uint32 memoryBase; /* 0c */ ++#define SD_MEMBASE_MASK 0xffffe000 /* base address mask */ ++#define SD_MEMSIZE_8MEG 0x00000001 /* memory is 8 meg */ ++#define SD_MEMSIZE_2MEG 0x00000001 /* memory is 2 meg */ ++ ++} SdramControllerRegs; ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct MpiRegisters { ++ EbiChipSelect cs[1]; /* size chip select configuration */ ++} MpiRegisters; ++ ++#define MPI ((volatile MpiRegisters * const) MPI_BASE) ++ ++/* ++** EMAC transmit MIB counters ++*/ ++typedef struct EmacTxMib { ++ uint32 tx_good_octets; /* (200) good byte count */ ++ uint32 tx_good_pkts; /* (204) good pkt count */ ++ uint32 tx_octets; /* (208) good and bad byte count */ ++ uint32 tx_pkts; /* (20c) good and bad pkt count */ ++ uint32 tx_broadcasts_pkts; /* (210) good broadcast packets */ ++ uint32 tx_multicasts_pkts; /* (214) good mulitcast packets */ ++ uint32 tx_len_64; /* (218) RMON tx pkt size buckets */ ++ uint32 tx_len_65_to_127; /* (21c) */ ++ uint32 tx_len_128_to_255; /* (220) */ ++ uint32 tx_len_256_to_511; /* (224) */ ++ uint32 tx_len_512_to_1023; /* (228) */ ++ uint32 tx_len_1024_to_max; /* (22c) */ ++ uint32 tx_jabber_pkts; /* (230) > 1518 with bad crc */ ++ uint32 tx_oversize_pkts; /* (234) > 1518 with good crc */ ++ uint32 tx_fragment_pkts; /* (238) < 63 with bad crc */ ++ uint32 tx_underruns; /* (23c) fifo underrun */ ++ uint32 tx_total_cols; /* (240) total collisions in all tx pkts */ ++ uint32 tx_single_cols; /* (244) tx pkts with single collisions */ ++ uint32 tx_multiple_cols; /* (248) tx pkts with multiple collisions */ ++ uint32 tx_excessive_cols; /* (24c) tx pkts with excessive cols */ ++ uint32 tx_late_cols; /* (250) tx pkts with late cols */ ++ uint32 tx_defered; /* (254) tx pkts deferred */ ++ uint32 tx_carrier_lost; /* (258) tx pkts with CRS lost */ ++ uint32 tx_pause_pkts; /* (25c) tx pause pkts sent */ ++#define NumEmacTxMibVars 24 ++} EmacTxMib; ++ ++/* ++** EMAC receive MIB counters ++*/ ++typedef struct EmacRxMib { ++ uint32 rx_good_octets; /* (280) good byte count */ ++ uint32 rx_good_pkts; /* (284) good pkt count */ ++ uint32 rx_octets; /* (288) good and bad byte count */ ++ uint32 rx_pkts; /* (28c) good and bad pkt count */ ++ uint32 rx_broadcasts_pkts; /* (290) good broadcast packets */ ++ uint32 rx_multicasts_pkts; /* (294) good mulitcast packets */ ++ uint32 rx_len_64; /* (298) RMON rx pkt size buckets */ ++ uint32 rx_len_65_to_127; /* (29c) */ ++ uint32 rx_len_128_to_255; /* (2a0) */ ++ uint32 rx_len_256_to_511; /* (2a4) */ ++ uint32 rx_len_512_to_1023; /* (2a8) */ ++ uint32 rx_len_1024_to_max; /* (2ac) */ ++ uint32 rx_jabber_pkts; /* (2b0) > 1518 with bad crc */ ++ uint32 rx_oversize_pkts; /* (2b4) > 1518 with good crc */ ++ uint32 rx_fragment_pkts; /* (2b8) < 63 with bad crc */ ++ uint32 rx_missed_pkts; /* (2bc) missed packets */ ++ uint32 rx_crc_align_errs; /* (2c0) both or either */ ++ uint32 rx_undersize; /* (2c4) < 63 with good crc */ ++ uint32 rx_crc_errs; /* (2c8) crc errors (only) */ ++ uint32 rx_align_errs; /* (2cc) alignment errors (only) */ ++ uint32 rx_symbol_errs; /* (2d0) pkts with RXERR assertions (symbol errs) */ ++ uint32 rx_pause_pkts; /* (2d4) MAC control, PAUSE */ ++ uint32 rx_nonpause_pkts; /* (2d8) MAC control, not PAUSE */ ++#define NumEmacRxMibVars 23 ++} EmacRxMib; ++ ++typedef struct EmacRegisters { ++ uint32 rxControl; /* (00) receive control */ ++#define EMAC_PM_REJ 0x80 /* - reject DA match in PMx regs */ ++#define EMAC_UNIFLOW 0x40 /* - accept cam match fc */ ++#define EMAC_FC_EN 0x20 /* - enable flow control */ ++#define EMAC_LOOPBACK 0x10 /* - loopback */ ++#define EMAC_PROM 0x08 /* - promiscuous */ ++#define EMAC_RDT 0x04 /* - ignore transmissions */ ++#define EMAC_ALL_MCAST 0x02 /* - ignore transmissions */ ++#define EMAC_NO_BCAST 0x01 /* - ignore transmissions */ ++ ++ ++ uint32 rxMaxLength; /* (04) receive max length */ ++ uint32 txMaxLength; /* (08) transmit max length */ ++ uint32 unused1[1]; ++ uint32 mdioFreq; /* (10) mdio frequency */ ++#define EMAC_MII_PRE_EN 0x00000080 /* prepend preamble sequence */ ++#define EMAC_MDIO_PRE 0x00000080 /* - enable MDIO preamble */ ++#define EMAC_MDC_FREQ 0x0000007f /* - mdio frequency */ ++ ++ uint32 mdioData; /* (14) mdio data */ ++#define MDIO_WR 0x50020000 /* - write framing */ ++#define MDIO_RD 0x60020000 /* - read framing */ ++#define MDIO_PMD_SHIFT 23 ++#define MDIO_REG_SHIFT 18 ++ ++ uint32 intMask; /* (18) int mask */ ++ uint32 intStatus; /* (1c) int status */ ++#define EMAC_FLOW_INT 0x04 /* - flow control event */ ++#define EMAC_MIB_INT 0x02 /* - mib event */ ++#define EMAC_MDIO_INT 0x01 /* - mdio event */ ++ ++ uint32 unused2[3]; ++ uint32 config; /* (2c) config */ ++#define EMAC_ENABLE 0x001 /* - enable emac */ ++#define EMAC_DISABLE 0x002 /* - disable emac */ ++#define EMAC_SOFT_RST 0x004 /* - soft reset */ ++#define EMAC_SOFT_RESET 0x004 /* - emac soft reset */ ++#define EMAC_EXT_PHY 0x008 /* - external PHY select */ ++ ++ uint32 txControl; /* (30) transmit control */ ++#define EMAC_FD 0x001 /* - full duplex */ ++#define EMAC_FLOWMODE 0x002 /* - flow mode */ ++#define EMAC_NOBKOFF 0x004 /* - no backoff in */ ++#define EMAC_SMALLSLT 0x008 /* - small slot time */ ++ ++ uint32 txThreshold; /* (34) transmit threshold */ ++ uint32 mibControl; /* (38) mib control */ ++#define EMAC_NO_CLEAR 0x001 /* don't clear on read */ ++ ++ uint32 unused3[7]; ++ ++ uint32 pm0DataLo; /* (58) perfect match 0 data lo */ ++ uint32 pm0DataHi; /* (5C) perfect match 0 data hi (15:0) */ ++ uint32 pm1DataLo; /* (60) perfect match 1 data lo */ ++ uint32 pm1DataHi; /* (64) perfect match 1 data hi (15:0) */ ++ uint32 pm2DataLo; /* (68) perfect match 2 data lo */ ++ uint32 pm2DataHi; /* (6C) perfect match 2 data hi (15:0) */ ++ uint32 pm3DataLo; /* (70) perfect match 3 data lo */ ++ uint32 pm3DataHi; /* (74) perfect match 3 data hi (15:0) */ ++#define EMAC_CAM_V 0x10000 /* - cam index */ ++#define EMAC_CAM_VALID 0x00010000 ++ ++ uint32 unused4[98]; /* (78-1fc) */ ++ ++ EmacTxMib tx_mib; /* (200) emac tx mib */ ++ uint32 unused5[8]; /* (260-27c) */ ++ ++ EmacRxMib rx_mib; /* (280) rx mib */ ++ ++} EmacRegisters; ++ ++/* register offsets for subrouting access */ ++#define EMAC_RX_CONTROL 0x00 ++#define EMAC_RX_MAX_LENGTH 0x04 ++#define EMAC_TX_MAC_LENGTH 0x08 ++#define EMAC_MDIO_FREQ 0x10 ++#define EMAC_MDIO_DATA 0x14 ++#define EMAC_INT_MASK 0x18 ++#define EMAC_INT_STATUS 0x1C ++#define EMAC_CAM_DATA_LO 0x20 ++#define EMAC_CAM_DATA_HI 0x24 ++#define EMAC_CAM_CONTROL 0x28 ++#define EMAC_CONTROL 0x2C ++#define EMAC_TX_CONTROL 0x30 ++#define EMAC_TX_THRESHOLD 0x34 ++#define EMAC_MIB_CONTROL 0x38 ++ ++ ++#define EMAC1 ((volatile EmacRegisters * const) EMAC1_BASE) ++ ++/* ++** USB Registers ++*/ ++typedef struct UsbRegisters { ++ byte inttf_setting; ++ byte current_config; ++ uint16 status_frameNum; ++#define USB_LINK 0x2000 ++#define USB_BUS_RESET 0x1000 ++#define USB_SUSPENDED 0x0800 ++ byte unused1; ++ byte endpt_prnt; ++ byte endpt_dirn; ++ byte endpt_status; ++#define USB_ENDPOINT_0 0x01 ++#define USB_ENDPOINT_1 0x02 ++#define USB_ENDPOINT_2 0x04 ++#define USB_ENDPOINT_3 0x08 ++#define USB_ENDPOINT_4 0x10 ++#define USB_ENDPOINT_5 0x20 ++#define USB_ENDPOINT_6 0x40 ++#define USB_ENDPOINT_7 0x80 ++ uint32 unused2; ++ byte conf_mem_ctl; ++#define USB_CONF_MEM_RD 0x80 ++#define USB_CONF_MEM_RDY 0x40 ++ byte unused2a; ++ byte conf_mem_read_address; ++ byte conf_mem_write_address; ++ ++ byte unused3; ++ byte dev_req_bytesel; ++ uint16 ext_dev_data; ++ ++ byte unused4; ++ byte clr_fifo; ++ byte endpt_stall_reset; // use same endpoint #'s from above ++ byte usb_cntl; ++#define USB_FORCE_ERR 0x20 ++#define USB_SOFT_RESET 0x10 ++#define USB_RESUME 0x08 ++#define USB_COMMAND_ERR 0x04 ++#define USB_COMMAND_OVER 0x02 ++ byte irq_addr; ++ byte iso_out_in_addr; ++ byte blk_out_in_addr; ++ byte cntl_addr; ++ uint32 unusedx[2]; ++ uint32 tx_ram_write_port; ++ uint32 fifo_status; // (see bcm6338 data sheet for definition) ++ ++ uint32 irq_status; ++ uint32 irq_mask; ++#define USB_NEW_CONFIG 0x00000001 ++#define USB_SETUP_COMMAND_RECV 0x00000002 // non-standard setup cmd rcvd ++#define USB_OUT_FIFO_OV 0x00000004 ++#define USB_RESET_RECV 0x00000008 ++#define USB_SUSPEND_RECV 0x00000010 ++#define USB_FIFO_REWIND 0x00000020 ++#define USB_RX_BULK_FIFO_DATA_AVAIL 0x00000040 ++#define USB_RX_ISO_FIFO_DATA_AVAIL 0x00000080 ++#define USB_LINK_CHANGE 0x00010000 ++ uint32 endpt_cntl; ++#define USB_R_WK_EN 0x0100 ++#define USB_TX_EOP 0x0200 ++#define USB_TX_CNTL_DMA_EN 0x0400 ++#define USB_TX_BULK_DMA_EN 0x0800 ++#define USB_TX_ISO_DMA_EN 0x1000 ++#define USB_RX_CNTL_DMA_EN 0x2000 ++#define USB_RX_BULK_DMA_EN 0x4800 ++#define USB_RX_ISO_DMA_EN 0x8000 ++ uint32 rx_status_read_port; ++ uint32 confmem_read_port; ++ uint32 confmem_write_port; ++ uint32 fifo_ovf_count; ++ uint32 fifo_rewind_cnt; ++ uint32 terminal_count; ++} UsbRegisters; ++ ++#define USB ((volatile UsbRegisters * const) USB_CTL_BASE) ++ ++/* ++** ADSL core Registers ++*/ ++ ++#define _PADLINE(line) pad ## line ++#define _XSTR(line) _PADLINE(line) ++#define PAD _XSTR(__LINE__) ++ ++typedef struct AdslRegisters { ++ uint32 core_control; ++#define ADSL_RESET 0x01 ++ ++ uint32 core_status; ++#define ADSL_HOST_MSG 0x01 ++ ++ uint32 PAD; ++ uint32 bist_status; ++ uint32 PAD[4]; ++ uint32 int_status_i; /* 0x20 */ ++ uint32 int_mask_i; ++ uint32 int_status_f; ++ uint32 int_mask_f; ++#define ADSL_INT_HOST_MSG 0x00000020 ++#define ADSL_INT_DESC_ERR 0x00000400 ++#define ADSL_INT_DATA_ERR 0x00000800 ++#define ADSL_INT_DESC_PROTO_ERR 0x00001000 ++#define ADSL_INT_RCV_DESC_UF 0x00002000 ++#define ADSL_INT_RCV_FIFO_OF 0x00004000 ++#define ADSL_INT_XMT_FIFO_UF 0x00008000 ++#define ADSL_INT_RCV 0x00010000 ++#define ADSL_INT_XMT 0x01000000 ++ ++ uint32 PAD[116]; ++ ++ uint32 xmtcontrol_intr; /* 0x200 */ ++#define ADSL_DMA_XMT_EN 0x00000001 ++#define ADSL_DMA_XMT_LE 0x00000004 ++ uint32 xmtaddr_intr; ++#define ADSL_DMA_ADDR_MASK 0xFFFFF000 ++ uint32 xmtptr_intr; ++#define ADSL_DMA_LAST_DESC_MASK 0x00000FFF ++ uint32 xmtstatus_intr; ++#define ADSL_DMA_CURR_DESC_MASK 0x00000FFF ++#define ADSL_DMA_XMT_STATE_MASK 0x0000F000 ++#define ADSL_DMA_XMT_STATE_DIS 0x00000000 ++#define ADSL_DMA_XMT_STATE_ACT 0x00001000 ++#define ADSL_DMA_XMT_STATE_IDLE 0x00002000 ++#define ADSL_DMA_XMT_STATE_STOP 0x00003000 ++ ++#define ADSL_DMA_XMT_ERR_MASK 0x000F0000 ++#define ADSL_DMA_XMT_ERR_NONE 0x00000000 ++#define ADSL_DMA_XMT_ERR_DPE 0x00010000 ++#define ADSL_DMA_XMT_ERR_FIFO 0x00020000 ++#define ADSL_DMA_XMT_ERR_DTE 0x00030000 ++#define ADSL_DMA_XMT_ERR_DRE 0x00040000 ++ ++ uint32 rcvcontrol_intr; ++#define ADSL_DMA_RCV_EN 0x00000001 ++#define ADSL_DMA_RCV_FO 0x000000FE ++ uint32 rcvaddr_intr; ++ uint32 rcvptr_intr; ++ uint32 rcvstatus_intr; ++#define ADSL_DMA_RCV_STATE_MASK 0x0000F000 ++#define ADSL_DMA_RCV_STATE_DIS 0x00000000 ++#define ADSL_DMA_RCV_STATE_ACT 0x00001000 ++#define ADSL_DMA_RCV_STATE_IDLE 0x00002000 ++#define ADSL_DMA_RCV_STATE_STOP 0x00003000 ++ ++#define ADSL_DMA_RCV_ERR_MASK 0x000F0000 ++#define ADSL_DMA_RCV_ERR_NONE 0x00000000 ++#define ADSL_DMA_RCV_ERR_DPE 0x00010000 ++#define ADSL_DMA_RCV_ERR_FIFO 0x00020000 ++#define ADSL_DMA_RCV_ERR_DTE 0x00030000 ++#define ADSL_DMA_RCV_ERR_DRE 0x00040000 ++ ++ uint32 xmtcontrol_fast; ++ uint32 xmtaddr_fast; ++ uint32 xmtptr_fast; ++ uint32 xmtstatus_fast; ++ uint32 rcvcontrol_fast; ++ uint32 rcvaddr_fast; ++ uint32 rcvptr_fast; ++ uint32 rcvstatus_fast; ++ uint32 PAD[48]; ++ ++ uint32 host_message; /* 0x300 */ ++ uint32 PAD[805]; ++ uint32 core_reset; ++ uint32 core_error; ++ uint32 core_revision; ++ ++#define ADSL_CORE_REV 0x0000000F ++#define ADSL_CORE_TYPE 0x0000FFF0 ++} AdslRegisters; ++ ++#define ADSL ((volatile AdslRegisters * const) ADSL_BASE) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6345_common.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6345_common.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6345_common.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6345_common.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,275 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: 6345_common.h */ ++/* DATE: 96/12/19 */ ++/* PURPOSE: Define addresses of major hardware components of */ ++/* BCM6345 */ ++/* */ ++/***********************************************************************/ ++#ifndef __BCM6345_MAP_COMMON_H ++#define __BCM6345_MAP_COMMON_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++/* matches isb_decoder.v */ ++#define INTC_BASE 0xfffe0000 /* interrupts controller registers */ ++#define BB_BASE 0xfffe0100 /* bus bridge registers */ ++#define TIMR_BASE 0xfffe0200 /* timer registers */ ++#define UART_BASE 0xfffe0300 /* uart registers */ ++#define GPIO_BASE 0xfffe0400 /* gpio registers */ ++#define EMAC_BASE 0xfffe1800 /* EMAC control registers */ ++#define EBIC_BASE 0xfffe2000 /* EBI control registers */ ++#define PCMCIA_BASE 0xfffe2028 /* PCMCIA control registers */ ++#define USB_BASE 0xfffe2100 /* USB controll registers */ ++#define SDRAM_BASE 0xfffe2300 /* SDRAM control registers */ ++#define DMA_BASE 0xfffe2800 /* DMA control registers */ ++ ++/* DMA channel assignments */ ++#define EMAC_RX_CHAN 1 ++#define EMAC_TX_CHAN 2 ++#define EBI_RX_CHAN 5 ++#define EBI_TX_CHAN 6 ++#define RESERVED_RX_CHAN 9 ++#define RESERVED_TX_CHAN 10 ++#define USB_BULK_RX_CHAN 13 ++#define USB_BULK_TX_CHAN 14 ++#define USB_ISO_RX_CHAN 15 ++#define USB_ISO_TX_CHAN 16 ++#define USB_CNTL_RX_CHAN 17 ++#define USB_CNTL_TX_CHAN 18 ++ ++/* ++#-----------------------------------------------------------------------* ++# * ++#************************************************************************ ++*/ ++#define SDR_INIT_CTL 0x00 ++ /* Control Bits */ ++#define SDR_9BIT_COL (1<<11) ++#define SDR_32BIT (1<<10) ++#define SDR_PWR_DN (1<<9) ++#define SDR_SELF_REF (1<<8) ++#define SDR_SOFT_RST (1<<7) ++#define SDR_64x32 (3<<4) ++#define SDR_128MEG (2<<4) ++#define SDR_64MEG (1<<4) ++#define SDR_16MEG (0<<4) ++#define SDR_ENABLE (1<<3) ++#define SDR_MRS_CMD (1<<2) ++#define SDR_PRE_CMD (1<<1) ++#define SDR_CBR_CMD (1<<0) ++ ++#define SDR_CFG_REG 0x04 ++ /* Control Bits */ ++#define SDR_FULL_PG 0x00 ++#define SDR_BURST8 0x01 ++#define SDR_BURST4 0x02 ++#define SDR_BURST2 0x03 ++#define SDR_FAST_MEM (1<<2) ++#define SDR_SLOW_MEM 0x00 ++ ++#define SDR_REF_CTL 0x08 ++ /* Control Bits */ ++#define SDR_REF_EN (1<<15) ++ ++#define SDR_MEM_BASE 0x0c ++ /* Control Bits */ ++#define DRAM2MBSPC 0x00000000 ++#define DRAM8MBSPC 0x00000001 ++#define DRAM16MBSPC 0x00000002 ++#define DRAM32MBSPC 0x00000003 ++#define DRAM64MBSPC 0x00000004 ++ ++#define DRAM2MEG 0x00000000 /* See SDRAM config */ ++#define DRAM8MEG 0x00000001 /* See SDRAM config */ ++#define DRAM16MEG 0x00000002 /* See SDRAM config */ ++#define DRAM32MEG 0x00000003 /* See SDRAM config */ ++#define DRAM64MEG 0x00000004 /* See SDRAM config */ ++ ++/* ++#-----------------------------------------------------------------------* ++# * ++#************************************************************************ ++*/ ++#define CS0BASE 0x00 ++#define CS0CNTL 0x04 ++#define CS1BASE 0x08 ++#define CS1CNTL 0x0c ++#define CS2BASE 0x10 ++#define CS2CNTL 0x14 ++#define CS3BASE 0x18 ++#define CS3CNTL 0x1c ++#define CS4BASE 0x20 ++#define CS4CNTL 0x24 ++#define CS5BASE 0x28 ++#define CS5CNTL 0x2c ++#define CS6BASE 0x30 ++#define CS6CNTL 0x34 ++#define CS7BASE 0x38 ++#define CS7CNTL 0x3c ++#define EBICONFIG 0x40 ++ ++/* ++# CSxBASE settings ++# Size in low 4 bits ++# Base Address for match in upper 24 bits ++*/ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ ++/* CSxCNTL settings */ ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define ZEROWT 0x00000000 /* .. 0 WS */ ++#define ONEWT 0x00000002 /* .. 1 WS */ ++#define TWOWT 0x00000004 /* .. 2 WS */ ++#define THREEWT 0x00000006 /* .. 3 WS */ ++#define FOURWT 0x00000008 /* .. 4 WS */ ++#define FIVEWT 0x0000000a /* .. 5 WS */ ++#define SIXWT 0x0000000c /* .. 6 WS */ ++#define SEVENWT 0x0000000e /* .. 7 WS */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert chip select polarity */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. enable fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++ ++/* EBICONFIG settings */ ++#define EBI_MASTER_ENABLE 0x80000000 /* allow external masters */ ++#define EBI_EXT_MAST_PRIO 0x40000000 /* maximize ext master priority */ ++#define EBI_CTRL_ENABLE 0x20000000 ++#define EBI_TA_ENABLE 0x10000000 ++ ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define BAUD115200 0x0a ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++#define TX4 0x40 ++#define RX4 0x04 ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++#define RXIRQS 0x7fc0 ++#define TXIRQS 0x003e ++ ++#define CPU_CLK_EN 0x0001 ++#define UART_CLK_EN 0x0008 ++ ++#define BLKEN 06 ++ ++#define FMSEL_MASK 0xf0000000 // 31:28 ++#define FMSEL_SHFT 28 ++#define FM_HI_GEAR 0x08000000 // 27 ++#define FMCLKSEL 0x04000000 // 26 ++#define FMDIV_MASK 0x03000000 // 25:24 ++#define FMDIV_SHFT 24 ++#define FBDIV_MASK 0x00f00000 // 23:20 ++#define FBDIV_SHFT 20 ++#define FB_SEL 0x00010000 // 16 ++#define FU2SEL_MASK 0x0000f000 // 15:12 ++#define FU2SEL_SHFT 12 ++#define FU1SEL_MASK 0x00000f00 // 11:8 ++#define FU1SEL_SHFT 8 ++#define FU1PRS_MASK 0x000000e0 // 7:5 ++#define FU1PRS_SHFT 5 ++#define FU1POS_MASK 0x00000018 // 4:3 ++#define FU1POS_SHFT 3 ++#define SOFT_RESET 0x00000001 ++ ++#define FMSEL 0x08 ++ ++#define UART0CONTROL 0x01 ++#define UART0CONFIG 0x02 ++#define UART0RXTIMEOUT 0x03 ++#define UART0BAUD 0x04 ++#define UART0FIFOCFG 0x0a ++#define UART0INTMASK 0x10 ++#define UART0INTSTAT 0x12 ++#define UART0DATA 0x17 ++ ++#define GPIOTBUSSEL 0x03 ++#define GPIODIR 0x06 ++#define GPIOLED 0x09 ++#define GPIOIO 0x0a ++#define GPIOUARTCTL 0x0c ++ ++/*Defines below show which bit enables which UART signals */ ++#define RI1_EN 0x0001 ++#define CTS1_EN 0x0002 ++#define DCD1_EN 0x0004 ++#define DSR1_EN 0x0008 ++#define DTR1_EN 0x0010 ++#define RTS1_EN 0x0020 ++#define DO1_EN 0x0040 ++#define DI1_EN 0x0080 ++#define RI0_EN 0x0100 ++#define CTS0_EN 0x0200 ++#define DCD0_EN 0x0400 ++#define DSR0_EN 0x0800 ++#define DTR0_EN 0x1000 ++#define RTS0_EN 0x2000 ++ ++#if __cplusplus ++} ++#endif ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6345_map.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6345_map.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6345_map.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6345_map.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,939 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: 6345_map.h */ ++/* DATE: 96/12/19 */ ++/* PURPOSE: Define addresses of major hardware components of */ ++/* BCM6345 */ ++/* */ ++/***********************************************************************/ ++#ifndef __BCM6345_MAP_H ++#define __BCM6345_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++#include "6345_common.h" ++#include "6345_intr.h" ++ ++/* macro to convert logical data addresses to physical */ ++/* DMA hardware must see physical address */ ++#define LtoP( x ) ( (uint32)x & 0x1fffffff ) ++#define PtoL( x ) ( LtoP(x) | 0xa0000000 ) ++ ++/* ++** Interrupt Controller ++*/ ++typedef struct IntControl { ++ uint32 RevID; /* (00) */ ++ uint16 testControl; /* (04) */ ++ uint16 blkEnables; /* (06) */ ++ ++#define USB_CLK_EN 0x0100 ++#define EMAC_CLK_EN 0x0080 ++#define ADSL_CLK_EN 0x0010 ++#define UART_CLK_EN 0x0008 ++#define EBI_CLK_EN 0x0004 ++#define BUS_CLK_EN 0x0002 ++#define CPU_CLK_EN 0x0001 ++ ++ uint32 pll_control; /* (08) */ ++#define FMSEL_MASK 0xf0000000 // 31:28 ++#define FMSEL_SHFT 28 ++#define FM_HI_GEAR 0x08000000 // 27 ++#define FMCLKSEL 0x04000000 // 26 ++#define FMDIV_MASK 0x03000000 // 25:24 ++#define FMDIV_SHFT 24 ++#define FBDIV_MASK 0x00f00000 // 23:20 ++#define FBDIV_SHFT 20 ++#define FB_SEL 0x00010000 // 16 ++#define FU2SEL_MASK 0x0000f000 // 15:12 ++#define FU2SEL_SHFT 12 ++#define FU1SEL_MASK 0x00000f00 // 11:8 ++#define FU1SEL_SHFT 8 ++#define FU1PRS_MASK 0x000000e0 // 7:5 ++#define FU1PRS_SHFT 5 ++#define FU1POS_MASK 0x00000018 // 4:3 ++#define FU1POS_SHFT 3 ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; /* (0c) */ ++ uint32 IrqStatus; /* (10) */ ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 4 ++#define EI_CLEAR_SHFT 8 ++#define EI_MASK_SHFT 12 ++#define EI_INSENS_SHFT 16 ++#define EI_LEVEL_SHFT 20 ++} IntControl; ++ ++#define PERF ((volatile IntControl * const) INTC_BASE) ++ ++/* ++** Bus Bridge Registers ++*/ ++typedef struct BusBridge { ++ uint16 status; ++#define BB_BUSY 0x8000 /* posted operation in progress */ ++#define BB_RD_PND 0x4000 /* read pending */ ++#define BB_RD_CMPLT 0x2000 /* read complete */ ++#define BB_ERROR 0x1000 /* posted write error */ ++#define BB_TEA 0x0800 /* transfer aborted */ ++ uint16 abortTimeoutCnt; /* abort timeout value */ ++ ++ byte writePostEnable; ++#define BB_POST_TIMR_EN 0x08 /* post writes to timer regs */ ++#define BB_POST_GPIO_EN 0x04 /* post writes to gpio regs */ ++#define BB_POST_INTC_EN 0x02 /* post writes to interrupt controller regs */ ++#define BB_POST_UART_EN 0x01 /* post writes to uart regs */ ++ byte unused1[5]; ++ uint16 postAddr; /* posted read address (lower half) */ ++ byte unused2[3]; ++ byte postData; /* posted read data */ ++} BusBridge; ++ ++/* register offsets (needed for EBI master access) */ ++#define BB_STATUS 0 ++#define BB_ABORT_TO_CNT 2 ++#define BB_WR_POST_EN 4 ++#define BB_RD_POST_ADDR 10 ++#define BB_RD_POST_DATA 12 ++ ++#define BRIDGE *bridge ((volatile BusBridge * const) BB_BASE) ++ ++/* ++** Timer ++*/ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++/* ++** UART ++*/ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++/* ++** Gpio Controller ++*/ ++typedef struct GpioControl { ++ uint16 unused0; ++ byte unused1; ++ byte TBusSel; ++ ++ /* High in bit location enables output */ ++ uint16 unused2; ++ uint16 GPIODir; ++ byte unused3; ++ byte Leds; //Only bits [3:0] ++ uint16 GPIOio; ++ ++ /* Defines below show which bit enables which UART signals */ ++ uint32 UartCtl; ++#define RI1_EN 0x0001 ++#define CTS1_EN 0x0002 ++#define DCD1_EN 0x0004 ++#define DSR1_EN 0x0008 ++#define DTR1_EN 0x0010 ++#define RTS1_EN 0x0020 ++#define DO1_EN 0x0040 ++#define DI1_EN 0x0080 ++#define RI0_EN 0x0100 ++#define CTS0_EN 0x0200 ++#define DCD0_EN 0x0400 ++#define DSR0_EN 0x0800 ++#define DTR0_EN 0x1000 ++#define RTS0_EN 0x2000 ++ ++ /********************************************************************* ++ * Multiple Use Muxed GPIO ++ * ----------------------- ++ * ++ * ------ ++ * GPIO_A ++ * ------ ++ * ++ * GPIO[0] -> RI1 I Controlled by UartCtl[0] ELSE 0 ++ * GPIO[0] -> DMATC_i I Always ++ * GPIO[0] -> DMATC_o O Controlled by dma_enable_n|dma_drive_n ++ * GPIO[0] -> ebi_bsize[0] I Always ++ * ++ * GPIO[1] -> CTS1 I Controlled by UartCtl[1] ELSE 0 ++ * GPIO[1] -> DMAACK1 (18) O Controlled by dma_enable_n ++ * GPIO[1] -> ebi_bg_b O Controlled by ebi_master_n ++ * ++ * GPIO[2] -> DCD1 I Controlled by UartCtl[2] ELSE 0 ++ * GPIO[2] -> ebi_bsize[1] I Always ++ * ++ * GPIO[3] -> DSR1 I Controlled by UartCtl[3] ELSE 0 ++ * GPIO[3] -> INT2 I Always ++ * GPIO[3] -> ebi_bsize[2] I Always ++ * ++ * GPIO[4] -> DTR1 O Controlled by UartCtl[4]&GpioDir[4] ++ * GPIO[4] -> INT3 I Always ++ * GPIO[4] -> ebi_burst I Always ++ * ++ * GPIO[5] -> RTS1 O Controlled by UartCtl[5]&GpioDir[5] ++ * GPIO[5] -> DMAACK0 (17) O Controlled by dma_enable_n ++ * GPIO[5] -> ebi_tsize I Always ++ * ++ * GPIO[6] -> sDout1 O Controlled by UartCtl[6]&GpioDir[6] ++ * GPIO[6] -> DMARQ1 (18) I Always ++ * GPIO[6] -> ebi_bb_i I Always ++ * GPIO[6] -> ebi_bb_o O Controlled by ebi_master_n|ebi_bb_oen ++ * ++ * GPIO[7] -> sDin1 I Controlled by UartCtl[7] ELSE 0 ++ * GPIO[7] -> ebi_br_b I Always ++ * GPIO[7] -> DMARQ0 (17) I Always ++ * ++ * ------ ++ * GPIO_B ++ * ------ ++ * ++ * GPIO[8] -> RI0 I Controlled by UartCtl[8] ELSE 0 ++ * GPIO[8] -> ebi_cs_b[6] O Controlled by ebi_cs_en[6] ++ * ++ * GPIO[9] -> CTS0 I Controlled by UartCtl[9] ELSE 0 ++ * ++ * GPIO[a] -> DCD0 I Controlled by UartCtl[a] ELSE 0 ++ * GPIO[a] -> ebi_cs_b[7] O Controlled by ebi_cs_en[7] ++ * ++ * GPIO[b] -> DSR0 I Controlled by UartCtl[b] ELSE 0 ++ * GPIO[b] -> ebi_int_cs_b I Always ++ * ++ * GPIO[c] -> DTR0 O Controlled by UartCtl[c]&GpioDir[c] ++ * ++ * GPIO[d] -> RTS0 O Controlled by UartCtl[d]&&GpioDir[d] ++ * ++ * GPIO[e] -> INT0 I Always ++ * ++ * GPIO[f] -> INT1 I Always ++ * ++ * sDout0 -> (bist_en[15]) ? pll_clk48:sDout0_int ++ * ++ *********************************************************************/ ++ ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++#define GPIO_NUM_MAX_BITS_MASK 0x0f ++#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) ++ ++/* ++** DMA Channel (1 .. 20) ++*/ ++typedef struct DmaChannel { ++ uint32 cfg; /* (00) assorted configuration */ ++#define DMA_FLOWC_EN 0x00000010 /* flow control enable */ ++#define DMA_WRAP_EN 0x00000008 /* use DMA_WRAP bit */ ++#define DMA_CHAINING 0x00000004 /* chaining mode */ ++#define DMA_STALL 0x00000002 ++#define DMA_ENABLE 0x00000001 /* set to enable channel */ ++ uint32 maxBurst; /* (04) max burst length permitted */ ++ /* non-chaining / chaining */ ++ uint32 startAddr; /* (08) source addr / ring start address */ ++ uint32 length; /* (0c) xfer len / ring len */ ++#define DMA_KICKOFF 0x80000000 /* start non-chaining xfer */ ++ ++ uint32 bufStat; /* (10) buffer status for non-chaining */ ++ uint32 intStat; /* (14) interrupts control and status */ ++ uint32 intMask; /* (18) interrupts mask */ ++#define DMA_BUFF_DONE 0x00000001 /* buffer done */ ++#define DMA_DONE 0x00000002 /* packet xfer complete */ ++#define DMA_NO_DESC 0x00000004 /* no valid descriptors */ ++ ++// DMA HW bits are clugy in this version of chip (mask/status shifted) ++#define DMA_BUFF_DONE_MASK 0x00000004 /* buffer done */ ++#define DMA_DONE_MASK 0x00000001 /* packet xfer complete */ ++#define DMA_NO_DESC_MASK 0x00000002 /* no valid descriptors */ ++ ++ uint32 fcThreshold; /* (1c) flow control threshold */ ++ uint32 numAlloc; /* */ ++ uint32 unused[7]; /* (20-3c) pad to next descriptor */ ++} DmaChannel; ++/* register offsets, useful for ebi master access */ ++#define DMA_CFG 0 ++#define DMA_MAX_BURST 4 ++#define DMA_START_ADDR 8 ++#define DMA_LENGTH 12 ++#define DMA_BUF_STAT 16 ++#define DMA_INT_STAT 20 ++#define DMA_FC_THRESHOLD 24 ++#define DMA_NUM_ALLOC 28 ++ ++ ++/* paste in your program ... ++DmaChannel *dmaChannels = (DmaChannel *)DMA_BASE; ++DmaChannel *dma1 = dmaChannels[1]; ++*/ ++ ++ ++/* ++** DMA Buffer ++*/ ++typedef struct DmaDesc { ++ uint16 length; /* in bytes of data in buffer */ ++ uint16 status; /* buffer status */ ++#define DMA_OWN 0x8000 /* cleared by DMA, set by SW */ ++#define DMA_EOP 0x0800 /* last buffer in packet */ ++#define DMA_SOP 0x0400 /* first buffer in packet */ ++#define DMA_WRAP 0x0200 /* */ ++#define DMA_APPEND_CRC 0x0100 /* .. for emac tx */ ++#define DATA_FLAG 0x0100 /* .. for secmod rx */ ++#define AUTH_FAIL_FLAG 0x0100 /* .. for secmod tx */ ++ ++/* EMAC Descriptor Status definitions */ ++#define EMAC_UNDERRUN 0x4000 /* Tx underrun, dg-mod ???) */ ++#define EMAC_MISS 0x0080 /* framed address recognition failed (promiscuous) */ ++#define EMAC_BRDCAST 0x0040 /* DA is Broadcast */ ++#define EMAC_MULT 0x0020 /* DA is multicast */ ++#define EMAC_LG 0x0010 /* frame length > RX_LENGTH register value */ ++#define EMAC_NO 0x0008 /* Non-Octet aligned */ ++#define EMAC_RXER 0x0004 /* RX_ERR on MII while RX_DV assereted */ ++#define EMAC_CRC_ERROR 0x0002 /* CRC error */ ++#define EMAC_OV 0x0001 /* Overflow */ ++ ++/* HDLC Descriptor Status definitions */ ++#define DMA_HDLC_TX_ABORT 0x0100 ++#define DMA_HDLC_RX_OVERRUN 0x4000 ++#define DMA_HDLC_RX_TOO_LONG 0x2000 ++#define DMA_HDLC_RX_CRC_OK 0x1000 ++#define DMA_HDLC_RX_ABORT 0x0100 ++ ++ uint32 address; /* address of data */ ++} DmaDesc; ++ ++/* ++** Sdram Controller ++*/ ++typedef struct SdramControllerRegs { ++ uint16 unused1; ++ uint16 initControl; /* 02 */ ++#define SD_POWER_DOWN 0x200 /* put sdram into power down */ ++#define SD_SELF_REFRESH 0x100 /* enable self refresh mode */ ++#define SD_SOFT_RESET 0x080 /* soft reset all sdram controller regs */ ++#define SD_EDO_SELECT 0x040 /* select EDO mode */ ++#define SD_EDO_WAIT_STATE 0x020 /* add an EDO wait state */ ++#define SD_8MEG 0x010 /* map sdram to 8 megs */ ++#define SD_MASTER_ENABLE 0x008 /* enable accesses to external sdram */ ++#define SD_MRS 0x004 /* generate a mode register select cycle */ ++#define SD_PRECHARGE 0x002 /* generate a precharge cycle */ ++#define SD_CBR 0x001 /* generate a refresh cycle */ ++ uint8 unused2[3]; ++ uint8 config; /* 07 */ ++#define SD_FAST_MEM 0x04 /* 1=CAS latency of 2, 0 = CAS latency of 3 */ ++#define SD_BURST_LEN 0x03 /* set burst length */ ++#define SD_BURST_FULL_PAGE 0x00 /* .. full page */ ++#define SD_BURST_8 0x01 /* .. 8 words */ ++#define SD_BURST_4 0x02 /* .. 4 words */ ++#define SD_BURST_2 0x03 /* .. 2 words */ ++ uint16 unused3; ++ uint16 refreshControl; /* 0a */ ++#define SD_REFRESH_ENABLE 0x8000 /* refresh enable */ ++#define SD_REFRESH_PERIOD 0x00ff /* refresh period (16 x n x clock_period) */ ++ ++ uint32 memoryBase; /* 0c */ ++#define SD_MEMBASE_MASK 0xffffe000 /* base address mask */ ++#define SD_MEMSIZE_8MEG 0x00000001 /* memory is 8 meg */ ++#define SD_MEMSIZE_2MEG 0x00000001 /* memory is 2 meg */ ++ ++} SdramControllerRegs; ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct EbiRegisters { ++ EbiChipSelect cs[5]; /* size chip select configuration */ ++ uint32 reserved[6]; ++ uint32 ebi_config; /* configuration */ ++#define EBI_MASTER_ENABLE 0x80000000 /* allow external masters */ ++#define EBI_EXT_MAST_PRIO 0x40000000 /* maximize ext master priority */ ++#define EBI_CTRL_ENABLE 0x20000000 ++#define EBI_TA_ENABLE 0x10000000 ++ uint32 dma_control; ++#define EBI_TX_INV_IRQ_EN 0x00080000 ++#define EBI_RX_INV_IRQ_EN 0x00040000 ++#define EBI_TX_PKT_DN_IRQ_EN 0x00020000 ++#define EBI_RX_PKT_DN_IRQ_EN 0x00010000 ++#define EBI_TX_INV_CLR 0x00001000 ++#define EBI_RX_INV_CLR 0x00000800 ++#define EBI_CHAINING 0x00000400 ++#define EBI_EXT_MODE 0x00000200 ++#define EBI_HALF_WORD 0x00000100 ++#define EBI_TX_PKT_DN_CLR 0x00000080 ++#define EBI_RX_PKT_DN_CLR 0x00000040 ++#define EBI_TX_BUF_DN_CLR 0x00000020 ++#define EBI_RX_BUF_DN_CLR 0x00000010 ++#define EBI_TX_BUF_DN_IRQ_EN 0x00000008 ++#define EBI_RX_BUF_DN_IRQ_EN 0x00000004 ++#define EBI_TX_EN 0x00000002 ++#define EBI_RX_EN 0x00000001 ++ uint32 dma_rx_start_addr; ++ uint32 dma_rx_buf_size; ++ uint32 dma_tx_start_addr; ++ uint32 dma_tx_buf_size; ++ uint32 dma_status; ++#define EBI_TX_INV_DESC 0x00000020 ++#define EBI_RX_INV_DESC 0x00000010 ++#define EBI_TX_PKT_DN 0x00000008 ++#define EBI_RX_PKT_DN 0x00000004 ++#define EBI_TX_BUF_DN 0x00000002 ++#define EBI_RX_BUF_DN 0x00000001 ++} EbiRegisters; ++ ++#define EBIC ((volatile EbiRegisters * const) EBIC_BASE) ++ ++typedef struct PcmciaRegisters { ++ /*Each of base has 24 bits of base address followed by size select field*/ ++ uint32 mem_base; ++ uint32 mem_cntrl; ++ uint32 attr_base; ++ uint32 attr_cntrl; ++ uint32 io_base; ++ uint32 io_cntrl; ++#define PCMCIA_CS_ENABLE 0x00000001 ++#define PCMCIA_CS_FIFO_ENABLE 0x00000200 ++#define PCMCIA_DSTSIZE_16 0x00000010 // 0 -8bit, 1- 16bit ++#define PCMCIA_RENDIAN 0x00000400 ++ /* Skip ECR and EBI-DMA registers */ ++ uint32 other1[7]; ++ ++ byte mem_waitcnt4; // Only bits [5:0] ++ byte mem_waitcnt3; // Only bits [4:0] ++ byte mem_waitcnt2; // Only bits [4:0] ++ byte mem_waitcnt1; // Only bits [4:0] ++ ++ byte attr_waitcnt4; // Only bits [5:0] ++ byte attr_waitcnt3; // Only bits [4:0] ++ byte attr_waitcnt2; // Only bits [4:0] ++ byte attr_waitcnt1; // Only bits [4:0] ++ ++ byte io_waitcnt4; // Only bits [5:0] ++ byte io_waitcnt3; // Only bits [4:0] ++ byte io_waitcnt2; // Only bits [4:0] ++ byte io_waitcnt1; // Only bits [4:0] ++ ++} PcmciaRegisters; ++ ++#define PCMCIA ((volatile PcmciaRegisters * const) PCMCIA_BASE) ++ ++/* ++** EMAC transmit MIB counters ++*/ ++typedef struct EmacTxMib { ++ uint32 tx_good_octets; /* (200) good byte count */ ++ uint32 tx_good_pkts; /* (204) good pkt count */ ++ uint32 tx_octets; /* (208) good and bad byte count */ ++ uint32 tx_pkts; /* (20c) good and bad pkt count */ ++ uint32 tx_broadcasts_pkts; /* (210) good broadcast packets */ ++ uint32 tx_multicasts_pkts; /* (214) good mulitcast packets */ ++ uint32 tx_len_64; /* (218) RMON tx pkt size buckets */ ++ uint32 tx_len_65_to_127; /* (21c) */ ++ uint32 tx_len_128_to_255; /* (220) */ ++ uint32 tx_len_256_to_511; /* (224) */ ++ uint32 tx_len_512_to_1023; /* (228) */ ++ uint32 tx_len_1024_to_max; /* (22c) */ ++ uint32 tx_jabber_pkts; /* (230) > 1518 with bad crc */ ++ uint32 tx_oversize_pkts; /* (234) > 1518 with good crc */ ++ uint32 tx_fragment_pkts; /* (238) < 63 with bad crc */ ++ uint32 tx_underruns; /* (23c) fifo underrun */ ++ uint32 tx_total_cols; /* (240) total collisions in all tx pkts */ ++ uint32 tx_single_cols; /* (244) tx pkts with single collisions */ ++ uint32 tx_multiple_cols; /* (248) tx pkts with multiple collisions */ ++ uint32 tx_excessive_cols; /* (24c) tx pkts with excessive cols */ ++ uint32 tx_late_cols; /* (250) tx pkts with late cols */ ++ uint32 tx_defered; /* (254) tx pkts deferred */ ++ uint32 tx_carrier_lost; /* (258) tx pkts with CRS lost */ ++ uint32 tx_pause_pkts; /* (25c) tx pause pkts sent */ ++#define NumEmacTxMibVars 24 ++} EmacTxMib; ++ ++/* ++** EMAC receive MIB counters ++*/ ++typedef struct EmacRxMib { ++ uint32 rx_good_octets; /* (280) good byte count */ ++ uint32 rx_good_pkts; /* (284) good pkt count */ ++ uint32 rx_octets; /* (288) good and bad byte count */ ++ uint32 rx_pkts; /* (28c) good and bad pkt count */ ++ uint32 rx_broadcasts_pkts; /* (290) good broadcast packets */ ++ uint32 rx_multicasts_pkts; /* (294) good mulitcast packets */ ++ uint32 rx_len_64; /* (298) RMON rx pkt size buckets */ ++ uint32 rx_len_65_to_127; /* (29c) */ ++ uint32 rx_len_128_to_255; /* (2a0) */ ++ uint32 rx_len_256_to_511; /* (2a4) */ ++ uint32 rx_len_512_to_1023; /* (2a8) */ ++ uint32 rx_len_1024_to_max; /* (2ac) */ ++ uint32 rx_jabber_pkts; /* (2b0) > 1518 with bad crc */ ++ uint32 rx_oversize_pkts; /* (2b4) > 1518 with good crc */ ++ uint32 rx_fragment_pkts; /* (2b8) < 63 with bad crc */ ++ uint32 rx_missed_pkts; /* (2bc) missed packets */ ++ uint32 rx_crc_align_errs; /* (2c0) both or either */ ++ uint32 rx_undersize; /* (2c4) < 63 with good crc */ ++ uint32 rx_crc_errs; /* (2c8) crc errors (only) */ ++ uint32 rx_align_errs; /* (2cc) alignment errors (only) */ ++ uint32 rx_symbol_errs; /* (2d0) pkts with RXERR assertions (symbol errs) */ ++ uint32 rx_pause_pkts; /* (2d4) MAC control, PAUSE */ ++ uint32 rx_nonpause_pkts; /* (2d8) MAC control, not PAUSE */ ++#define NumEmacRxMibVars 23 ++} EmacRxMib; ++ ++typedef struct EmacRegisters { ++ uint32 rxControl; /* (00) receive control */ ++#define EMAC_PM_REJ 0x80 /* - reject DA match in PMx regs */ ++#define EMAC_UNIFLOW 0x40 /* - accept cam match fc */ ++#define EMAC_FC_EN 0x20 /* - enable flow control */ ++#define EMAC_LOOPBACK 0x10 /* - loopback */ ++#define EMAC_PROM 0x08 /* - promiscuous */ ++#define EMAC_RDT 0x04 /* - ignore transmissions */ ++#define EMAC_ALL_MCAST 0x02 /* - ignore transmissions */ ++#define EMAC_NO_BCAST 0x01 /* - ignore transmissions */ ++ ++ ++ uint32 rxMaxLength; /* (04) receive max length */ ++ uint32 txMaxLength; /* (08) transmit max length */ ++ uint32 unused1[1]; ++ uint32 mdioFreq; /* (10) mdio frequency */ ++#define EMAC_MII_PRE_EN 0x0100 /* prepend preamble sequence */ ++#define EMAC_MDIO_PRE 0x100 /* - enable MDIO preamble */ ++#define EMAC_MDC_FREQ 0x0ff /* - mdio frequency */ ++ ++ uint32 mdioData; /* (14) mdio data */ ++#define MDIO_WR 0x50020000 /* - write framing */ ++#define MDIO_RD 0x60020000 /* - read framing */ ++#define MDIO_PMD_SHIFT 23 ++#define MDIO_REG_SHIFT 18 ++ ++ uint32 intMask; /* (18) int mask */ ++ uint32 intStatus; /* (1c) int status */ ++#define EMAC_FLOW_INT 0x04 /* - flow control event */ ++#define EMAC_MIB_INT 0x02 /* - mib event */ ++#define EMAC_MDIO_INT 0x01 /* - mdio event */ ++ ++ uint32 unused2[3]; ++ uint32 config; /* (2c) config */ ++#define EMAC_ENABLE 0x001 /* - enable emac */ ++#define EMAC_DISABLE 0x002 /* - disable emac */ ++#define EMAC_SOFT_RST 0x004 /* - soft reset */ ++#define EMAC_SOFT_RESET 0x004 /* - emac soft reset */ ++#define EMAC_EXT_PHY 0x008 /* - external PHY select */ ++ ++ uint32 txControl; /* (30) transmit control */ ++#define EMAC_FD 0x001 /* - full duplex */ ++#define EMAC_FLOWMODE 0x002 /* - flow mode */ ++#define EMAC_NOBKOFF 0x004 /* - no backoff in */ ++#define EMAC_SMALLSLT 0x008 /* - small slot time */ ++ ++ uint32 txThreshold; /* (34) transmit threshold */ ++ uint32 mibControl; /* (38) mib control */ ++#define EMAC_NO_CLEAR 0x001 /* don't clear on read */ ++ ++ uint32 unused3[7]; ++ ++ uint32 pm0DataLo; /* (58) perfect match 0 data lo */ ++ uint32 pm0DataHi; /* (5C) perfect match 0 data hi (15:0) */ ++ uint32 pm1DataLo; /* (60) perfect match 1 data lo */ ++ uint32 pm1DataHi; /* (64) perfect match 1 data hi (15:0) */ ++ uint32 pm2DataLo; /* (68) perfect match 2 data lo */ ++ uint32 pm2DataHi; /* (6C) perfect match 2 data hi (15:0) */ ++ uint32 pm3DataLo; /* (70) perfect match 3 data lo */ ++ uint32 pm3DataHi; /* (74) perfect match 3 data hi (15:0) */ ++#define EMAC_CAM_V 0x10000 /* - cam index */ ++#define EMAC_CAM_VALID 0x00010000 ++ ++ uint32 unused4[98]; /* (78-1fc) */ ++ ++ EmacTxMib tx_mib; /* (200) emac tx mib */ ++ uint32 unused5[8]; /* (260-27c) */ ++ ++ EmacRxMib rx_mib; /* (280) rx mib */ ++ ++} EmacRegisters; ++ ++/* register offsets for subrouting access */ ++#define EMAC_RX_CONTROL 0x00 ++#define EMAC_RX_MAX_LENGTH 0x04 ++#define EMAC_TX_MAC_LENGTH 0x08 ++#define EMAC_MDIO_FREQ 0x10 ++#define EMAC_MDIO_DATA 0x14 ++#define EMAC_INT_MASK 0x18 ++#define EMAC_INT_STATUS 0x1C ++#define EMAC_CAM_DATA_LO 0x20 ++#define EMAC_CAM_DATA_HI 0x24 ++#define EMAC_CAM_CONTROL 0x28 ++#define EMAC_CONTROL 0x2C ++#define EMAC_TX_CONTROL 0x30 ++#define EMAC_TX_THRESHOLD 0x34 ++#define EMAC_MIB_CONTROL 0x38 ++ ++ ++#define EMAC ((volatile EmacRegisters * const) EMAC_BASE) ++ ++/* ++** USB Registers ++*/ ++typedef struct UsbRegisters { ++ byte inttf_setting; ++ byte current_config; ++ uint16 status_frameNum; ++#define USB_BUS_RESET 0x1000 ++#define USB_SUSPENDED 0x0800 ++ byte unused1; ++ byte endpt_prnt; ++ byte endpt_dirn; ++ byte endpt_status; ++#define USB_ENDPOINT_0 0x01 ++#define USB_ENDPOINT_1 0x02 ++#define USB_ENDPOINT_2 0x04 ++#define USB_ENDPOINT_3 0x08 ++#define USB_ENDPOINT_4 0x10 ++#define USB_ENDPOINT_5 0x20 ++#define USB_ENDPOINT_6 0x40 ++#define USB_ENDPOINT_7 0x80 ++ uint32 unused2; ++ byte conf_mem_ctl; ++#define USB_CONF_MEM_RD 0x80 ++#define USB_CONF_MEM_RDY 0x40 ++ byte unused2a; ++ byte conf_mem_read_address; ++ byte conf_mem_write_address; ++ ++ byte unused3; ++ byte dev_req_bytesel; ++ uint16 ext_dev_data; ++ ++ byte unused4; ++ byte clr_fifo; ++ byte endpt_stall_reset; // use same endpoint #'s from above ++ byte usb_cntl; ++#define USB_FORCE_ERR 0x20 ++#define USB_SOFT_RESET 0x10 ++#define USB_RESUME 0x08 ++#define USB_COMMAND_ERR 0x04 ++#define USB_COMMAND_OVER 0x02 ++ byte irq_addr; ++ byte iso_out_in_addr; ++ byte blk_out_in_addr; ++ byte cntl_addr; ++ uint32 mux_cntl; ++#define USB_TX_DMA_OPER 0x00000000 ++#define USB_TX_CNTL_FIFO_OPER 0x00000004 ++#define USB_TX_BULK_FIFO_OPER 0x00000008 ++#define USB_TX_ISO_FIFO_OPER 0x0000000c ++#define USB_TX_IRQ_OPER 0x00000010 ++#define USB_RX_DMA_OPER 0x00000000 ++#define USB_RX_CNTL_FIFO_OPER 0x00000001 ++#define USB_RX_BULK_FIFO_OPER 0x00000002 ++#define USB_RX_ISO_FIFO_OPER 0x00000003 ++ uint32 rx_ram_read_port; ++ uint32 tx_ram_write_port; ++ uint32 fifo_status; ++#define USB_CTRLI_FIFO_FULL 0x00000001 ++#define USB_CTRLI_FIFO_EMPTY 0x00000002 ++#define USB_CTRLO_FIFO_FULL 0x00000100 ++#define USB_CTRLO_FIFO_EMPTY 0x00000200 ++ uint32 irq_status; ++ uint32 irq_mask; ++#define USB_NEW_CONFIG 0x01 ++#define USB_SETUP_COMMAND_RECV 0x02 // non-standard setup command received ++#define USB_OUT_FIFO_OV 0x04 ++#define USB_RESET_RECV 0x08 ++#define USB_SUSPEND_RECV 0x10 ++#define USB_FIFO_REWIND 0x20 ++#define USB_RX_BULK_FIFO_DATA_AVAIL 0x40 ++#define USB_RX_ISO_FIFO_DATA_AVAIL 0x80 ++ uint32 endpt_cntl; ++#define USB_R_WK_EN 0x0100 ++#define USB_TX_EOP 0x0200 ++#define USB_TX_CNTL_DMA_EN 0x0400 ++#define USB_TX_BULK_DMA_EN 0x0800 ++#define USB_TX_ISO_DMA_EN 0x1000 ++#define USB_RX_CNTL_DMA_EN 0x2000 ++#define USB_RX_BULK_DMA_EN 0x4800 ++#define USB_RX_ISO_DMA_EN 0x8000 ++ uint32 rx_status_read_port; ++ uint32 confmem_read_port; ++ uint32 confmem_write_port; ++ uint32 fifo_ovf_count; ++ uint32 fifo_rewind_cnt; ++} UsbRegisters; ++ ++#define USB ((volatile UsbRegisters * const) USB_BASE) ++ ++/* ++** ADSL core Registers ++*/ ++ ++#define _PADLINE(line) pad ## line ++#define _XSTR(line) _PADLINE(line) ++#define PAD _XSTR(__LINE__) ++ ++typedef struct AdslRegisters { ++ uint32 core_control; ++#define ADSL_RESET 0x01 ++ ++ uint32 core_status; ++#define ADSL_HOST_MSG 0x01 ++ ++ uint32 PAD; ++ uint32 bist_status; ++ uint32 PAD[4]; ++ uint32 int_status_i; /* 0x20 */ ++ uint32 int_mask_i; ++ uint32 int_status_f; ++ uint32 int_mask_f; ++#define ADSL_INT_HOST_MSG 0x00000020 ++#define ADSL_INT_DESC_ERR 0x00000400 ++#define ADSL_INT_DATA_ERR 0x00000800 ++#define ADSL_INT_DESC_PROTO_ERR 0x00001000 ++#define ADSL_INT_RCV_DESC_UF 0x00002000 ++#define ADSL_INT_RCV_FIFO_OF 0x00004000 ++#define ADSL_INT_XMT_FIFO_UF 0x00008000 ++#define ADSL_INT_RCV 0x00010000 ++#define ADSL_INT_XMT 0x01000000 ++ ++ uint32 PAD[116]; ++ ++ uint32 xmtcontrol_intr; /* 0x200 */ ++#define ADSL_DMA_XMT_EN 0x00000001 ++#define ADSL_DMA_XMT_LE 0x00000004 ++ uint32 xmtaddr_intr; ++#define ADSL_DMA_ADDR_MASK 0xFFFFF000 ++ uint32 xmtptr_intr; ++#define ADSL_DMA_LAST_DESC_MASK 0x00000FFF ++ uint32 xmtstatus_intr; ++#define ADSL_DMA_CURR_DESC_MASK 0x00000FFF ++#define ADSL_DMA_XMT_STATE_MASK 0x0000F000 ++#define ADSL_DMA_XMT_STATE_DIS 0x00000000 ++#define ADSL_DMA_XMT_STATE_ACT 0x00001000 ++#define ADSL_DMA_XMT_STATE_IDLE 0x00002000 ++#define ADSL_DMA_XMT_STATE_STOP 0x00003000 ++ ++#define ADSL_DMA_XMT_ERR_MASK 0x000F0000 ++#define ADSL_DMA_XMT_ERR_NONE 0x00000000 ++#define ADSL_DMA_XMT_ERR_DPE 0x00010000 ++#define ADSL_DMA_XMT_ERR_FIFO 0x00020000 ++#define ADSL_DMA_XMT_ERR_DTE 0x00030000 ++#define ADSL_DMA_XMT_ERR_DRE 0x00040000 ++ ++ uint32 rcvcontrol_intr; ++#define ADSL_DMA_RCV_EN 0x00000001 ++#define ADSL_DMA_RCV_FO 0x000000FE ++ uint32 rcvaddr_intr; ++ uint32 rcvptr_intr; ++ uint32 rcvstatus_intr; ++#define ADSL_DMA_RCV_STATE_MASK 0x0000F000 ++#define ADSL_DMA_RCV_STATE_DIS 0x00000000 ++#define ADSL_DMA_RCV_STATE_ACT 0x00001000 ++#define ADSL_DMA_RCV_STATE_IDLE 0x00002000 ++#define ADSL_DMA_RCV_STATE_STOP 0x00003000 ++ ++#define ADSL_DMA_RCV_ERR_MASK 0x000F0000 ++#define ADSL_DMA_RCV_ERR_NONE 0x00000000 ++#define ADSL_DMA_RCV_ERR_DPE 0x00010000 ++#define ADSL_DMA_RCV_ERR_FIFO 0x00020000 ++#define ADSL_DMA_RCV_ERR_DTE 0x00030000 ++#define ADSL_DMA_RCV_ERR_DRE 0x00040000 ++ ++ uint32 xmtcontrol_fast; ++ uint32 xmtaddr_fast; ++ uint32 xmtptr_fast; ++ uint32 xmtstatus_fast; ++ uint32 rcvcontrol_fast; ++ uint32 rcvaddr_fast; ++ uint32 rcvptr_fast; ++ uint32 rcvstatus_fast; ++ uint32 PAD[48]; ++ ++ uint32 host_message; /* 0x300 */ ++ uint32 PAD[805]; ++ uint32 core_reset; ++ uint32 core_error; ++ uint32 core_revision; ++ ++#define ADSL_CORE_REV 0x0000000F ++#define ADSL_CORE_TYPE 0x0000FFF0 ++} AdslRegisters; ++ ++#define ADSL ((volatile AdslRegisters * const) ADSL_BASE) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6348_common.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6348_common.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6348_common.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6348_common.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,225 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: 6348_common.h */ ++/* DATE: 04/12/19 */ ++/* PURPOSE: Define addresses of major hardware components of */ ++/* BCM6348 */ ++/* */ ++/***********************************************************************/ ++#ifndef __BCM6348_MAP_COMMON_H ++#define __BCM6348_MAP_COMMON_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#define PERF_BASE 0xfffe0000 /* chip control registers */ ++#define BB_BASE 0xfffe0100 /* bus bridge registers */ ++#define TIMR_BASE 0xfffe0200 /* timer registers */ ++#define UART_BASE 0xfffe0300 /* uart registers */ ++#define GPIO_BASE 0xfffe0400 /* gpio registers */ ++#define SPI_BASE 0xfffe0c00 /* SPI master controller registers */ ++ ++#define USB_CTL_BASE 0xfffe1000 /* USB control registers */ ++#define USB_DMA_BASE 0xfffe1400 /* USB DMA control registers */ ++#define USB_HOST_BASE 0xfffe1b00 /* USB host registers */ ++ ++#define MPI_BASE 0xfffe2000 /* MPI control registers */ ++#define SDRAM_BASE 0xfffe2300 /* SDRAM control registers */ ++ ++#define ADSL_BASE 0xfffe3000 /* ADSL core control registers */ ++#define ATM_BASE 0xfffe4000 /* ATM SAR control registers */ ++#define UBUS_BASE 0xfffe5000 /* UBUS status registers */ ++#define EMAC1_BASE 0xfffe6000 /* EMAC1 control registers */ ++#define EMAC2_BASE 0xfffe6800 /* EMAC2 control registers */ ++#define EMAC_DMA_BASE 0xfffe7000 /* EMAC DMA control registers */ ++ ++/* ++##################################################################### ++# System PLL Control Register ++##################################################################### ++*/ ++#define SYSPLLCFG 0x08 ++ ++#define M_MPI_MASK 0x00000018 // 4:3 ++#define M_MPI_SHFT 3 ++#define M_MPI_50MHZ 0 ++#define M_MPI_40MHZ 1 ++#define M_MPI_33MHZ 2 ++#define M_MPI_25MHZ 3 ++ ++#define M_UTO_MASK 0x00000002 // 1:1 ++#define M_UTO_SHFT 1 ++ ++#define SOFT_RESET 0x00000001 ++ ++#define PLL_STRAP_VALUE 0x34 ++ ++/* ++##################################################################### ++# SDRAM Control Registers ++##################################################################### ++*/ ++#define SDR_INIT_CTL 0x00 ++ /* Control Bits */ ++#define SDR_PFEN1 (1<<16) ++#define SDR_PFEN0 (1<<15) ++#define SDR_EMPRS (1<<14) ++#define SDR_2_BANKS (1<<13) ++#define SDR_1_BANK (0<<13) ++#define SDR_CS1_EN (1<<12) ++#define SDR_PEND (1<<11) ++#define SDR_32_BIT (1<<10) ++#define SDR_POWER_DOWN (1<<9) ++#define SDR_SELF_REFRESH (1<<8) ++#define SDR_11_COLS (3<<6) ++#define SDR_10_COLS (2<<6) ++#define SDR_9_COLS (1<<6) ++#define SDR_8_COLS (0<<6) ++#define SDR_13_ROWS (2<<4) ++#define SDR_12_ROWS (1<<4) ++#define SDR_11_ROWS (0<<4) ++#define SDR_MASTER_EN (1<<3) ++#define SDR_MRS_CMD (1<<2) ++#define SDR_PRE_CMD (1<<1) ++#define SDR_CBR_CMD (1<<0) ++ ++#define SDR_CFG_REG 0x04 ++ /* Control Bits */ ++#define SDR_FULL_PG 0 ++#define SDR_BURST8 1 ++#define SDR_BURST4 2 ++#define SDR_BURST2 3 ++#define SDR_FAST_MEM (1<<2) ++#define SDR_SLOW_MEM (0<<2) ++ ++#define SDR_REF_CTL 0x0C ++ /* Control Bits */ ++#define SDR_REF_EN (1<<15) ++ ++#define SDR_PRIOR ++ /* Control Bits */ ++#define SDR_EN_PRIOR (1<<31) ++ ++ ++/* ++##################################################################### ++# MPI Control Registers ++##################################################################### ++*/ ++#define CS0BASE 0x00 ++#define CS0CNTL 0x04 ++ ++/* ++# CSxBASE settings ++# Size in low 4 bits ++# Base Address for match in upper 24 bits ++*/ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ ++/* CSxCNTL settings */ ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define ZEROWT 0x00000000 /* .. 0 WS */ ++#define ONEWT 0x00000002 /* .. 1 WS */ ++#define TWOWT 0x00000004 /* .. 2 WS */ ++#define THREEWT 0x00000006 /* .. 3 WS */ ++#define FOURWT 0x00000008 /* .. 4 WS */ ++#define FIVEWT 0x0000000a /* .. 5 WS */ ++#define SIXWT 0x0000000c /* .. 6 WS */ ++#define SEVENWT 0x0000000e /* .. 7 WS */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert chip select polarity */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. enable fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++ ++/* ++##################################################################### ++# UART Control Registers ++##################################################################### ++*/ ++#define UART0CONTROL 0x01 ++#define UART0CONFIG 0x02 ++#define UART0RXTIMEOUT 0x03 ++#define UART0BAUD 0x04 ++#define UART0FIFOCFG 0x0a ++#define UART0INTMASK 0x10 ++#define UART0INTSTAT 0x12 ++#define UART0DATA 0x17 ++ ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++#define XMITBREAK 0x40 /* Config register */ ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ ++#define RSTTXFIFOS 0x80 /* Rx Timeout register */ ++#define RSTRXFIFOS 0x40 ++ ++#define TX4 0x40 /* FIFO config register */ ++#define RX4 0x04 ++ ++#define DELTAIP 0x0001 /* Interrupt Status and Mask registers */ ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++#if __cplusplus ++} ++#endif ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6348_map.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6348_map.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6348_map.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6348_map.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,1095 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: 6348_map.h */ ++/* DATE: 11/06/03 */ ++/* PURPOSE: Define addresses of major hardware components of */ ++/* BCM6348 */ ++/* */ ++/***********************************************************************/ ++#ifndef __BCM6348_MAP_H ++#define __BCM6348_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++#include "6348_common.h" ++#include "6348_intr.h" ++ ++/* macro to convert logical data addresses to physical */ ++/* DMA hardware must see physical address */ ++#define LtoP( x ) ( (uint32)x & 0x1fffffff ) ++#define PtoL( x ) ( LtoP(x) | 0xa0000000 ) ++ ++/* ++** Interrupt Controller ++*/ ++typedef struct PerfControl { ++ uint32 RevID; /* (00) */ ++ uint16 testControl; /* (04) */ ++ uint16 blkEnables; /* (06) */ ++ ++#define ADSL_CLK_EN 0x0001 ++#define MPI_CLK_EN 0x0002 ++#define DRAM_CLK_EN 0x0004 ++#define M2M_CLK_EN 0x0008 ++#define EMAC_CLK_EN 0x0010 ++#define SAR_CLK_EN 0x0020 ++#define USBS_CLK_EN 0x0040 ++#define USBH_CLK_EN 0x0100 ++#define SPI_CLK_EN 0x0200 ++ ++ uint32 pll_control; /* (08) */ ++#define CHIP_SOFT_RESET 0x00000001 ++#define MPI_CLK_50MHZ 0x00000000 ++#define MPI_CLK_40MHZ 0x00000008 ++#define MPI_CLK_33MHZ 0x00000010 ++#define MPI_CLK_25MHZ 0x00000018 ++#define MPI_CLK_MASK 0x00000018 ++ ++ uint32 IrqMask; /* (0c) */ ++ uint32 IrqStatus; /* (10) */ ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 5 ++#define EI_CLEAR_SHFT 10 ++#define EI_MASK_SHFT 15 ++#define EI_INSENS_SHFT 20 ++#define EI_LEVEL_SHFT 25 ++ ++ uint32 unused[4]; /* (18) */ ++ uint32 BlockSoftReset; /* (28) */ ++#define BSR_SPI 0x00000001 ++#define BSR_EMAC 0x00000004 ++#define BSR_USBH 0x00000008 ++#define BSR_USBS 0x00000010 ++#define BSR_ADSL 0x00000020 ++#define BSR_DMAMEM 0x00000040 ++#define BSR_SAR 0x00000080 ++#define BSR_ACLC 0x00000100 ++#define BSR_ADSL_MIPS_PLL 0x00000400 ++#define BSR_ALL_BLOCKS \ ++ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ ++ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) ++ uint32 unused2[2]; /* (2c) */ ++ uint32 PllStrap; /* (34) */ ++#define PLL_N1_SHFT 20 ++#define PLL_N1_MASK (7<<PLL_N1_SHFT) ++#define PLL_N2_SHFT 15 ++#define PLL_N2_MASK (0x1f<<PLL_N2_SHFT) ++#define PLL_M1_REF_SHFT 12 ++#define PLL_M1_REF_MASK (7<<PLL_M1_REF_SHFT) ++#define PLL_M2_REF_SHFT 9 ++#define PLL_M2_REF_MASK (7<<PLL_M2_REF_SHFT) ++#define PLL_M1_CPU_SHFT 6 ++#define PLL_M1_CPU_MASK (7<<PLL_M1_CPU_SHFT) ++#define PLL_M1_BUS_SHFT 3 ++#define PLL_M1_BUS_MASK (7<<PLL_M1_BUS_SHFT) ++#define PLL_M2_BUS_SHFT 0 ++#define PLL_M2_BUS_MASK (7<<PLL_M2_BUS_SHFT) ++} PerfControl; ++ ++#define PERF ((volatile PerfControl * const) PERF_BASE) ++ ++/* ++** Bus Bridge Registers ++*/ ++typedef struct BusBridge { ++ uint16 status; ++#define BB_BUSY 0x8000 /* posted operation in progress */ ++#define BB_RD_PND 0x4000 /* read pending */ ++#define BB_RD_CMPLT 0x2000 /* read complete */ ++#define BB_ERROR 0x1000 /* posted write error */ ++#define BB_TEA 0x0800 /* transfer aborted */ ++ uint16 abortTimeoutCnt; /* abort timeout value */ ++ ++ byte writePostEnable; ++#define BB_POST_TIMR_EN 0x08 /* post writes to timer regs */ ++#define BB_POST_GPIO_EN 0x04 /* post writes to gpio regs */ ++#define BB_POST_INTC_EN 0x02 /* post writes to interrupt controller regs */ ++#define BB_POST_UART_EN 0x01 /* post writes to uart regs */ ++ byte unused1[5]; ++ uint16 postAddr; /* posted read address (lower half) */ ++ byte unused2[3]; ++ byte postData; /* posted read data */ ++} BusBridge; ++ ++/* register offsets (needed for EBI master access) */ ++#define BB_STATUS 0 ++#define BB_ABORT_TO_CNT 2 ++#define BB_WR_POST_EN 4 ++#define BB_RD_POST_ADDR 10 ++#define BB_RD_POST_DATA 12 ++ ++#define BRIDGE *bridge ((volatile BusBridge * const) BB_BASE) ++ ++/* ++** Timer ++*/ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++/* ++** UART ++*/ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++/* ++** Gpio Controller ++*/ ++ ++typedef struct GpioControl { ++ uint32 GPIODir_high; /* bits 36:32 */ ++ uint32 GPIODir; /* bits 31:00 */ ++ uint32 GPIOio_high; /* bits 36:32 */ ++ uint32 GPIOio; /* bits 31:00 */ ++ uint32 LEDCtrl; ++#define LED3_STROBE 0x08000000 ++#define LED2_STROBE 0x04000000 ++#define LED1_STROBE 0x02000000 ++#define LED0_STROBE 0x01000000 ++#define LED_TEST 0x00010000 ++#define LED3_DISABLE_LINK_ACT 0x00008000 ++#define LED2_DISABLE_LINK_ACT 0x00004000 ++#define LED1_DISABLE_LINK_ACT 0x00002000 ++#define LED0_DISABLE_LINK_ACT 0x00001000 ++#define LED_INTERVAL_SET_MASK 0x00000f00 ++#define LED_INTERVAL_SET_320MS 0x00000500 ++#define LED_INTERVAL_SET_160MS 0x00000400 ++#define LED_INTERVAL_SET_80MS 0x00000300 ++#define LED_INTERVAL_SET_40MS 0x00000200 ++#define LED_INTERVAL_SET_20MS 0x00000100 ++#define LED3_ON 0x00000080 ++#define LED2_ON 0x00000040 ++#define LED1_ON 0x00000020 ++#define LED0_ON 0x00000010 ++#define LED3_ENABLE 0x00000008 ++#define LED2_ENABLE 0x00000004 ++#define LED1_ENABLE 0x00000002 ++#define LED0_ENABLE 0x00000001 ++ uint32 SpiSlaveCfg; ++#define SPI_SLAVE_RESET 0x00010000 ++#define SPI_RESTRICT 0x00000400 ++#define SPI_DELAY_DISABLE 0x00000200 ++#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 ++#define SPI_SER_ADDR_CFG_MASK 0x0000000c ++#define SPI_MODE 0x00000001 ++ uint32 GPIOMode; ++#define GROUP4_DIAG 0x00090000 ++#define GROUP4_UTOPIA 0x00080000 ++#define GROUP4_LEGACY_LED 0x00030000 ++#define GROUP4_MII_SNOOP 0x00020000 ++#define GROUP4_EXT_EPHY 0x00010000 ++#define GROUP3_DIAG 0x00009000 ++#define GROUP3_UTOPIA 0x00008000 ++#define GROUP3_EXT_MII 0x00007000 ++#define GROUP2_DIAG 0x00000900 ++#define GROUP2_PCI 0x00000500 ++#define GROUP1_DIAG 0x00000090 ++#define GROUP1_UTOPIA 0x00000080 ++#define GROUP1_SPI_UART 0x00000060 ++#define GROUP1_SPI_MASTER 0x00000060 ++#define GROUP1_MII_PCCARD 0x00000040 ++#define GROUP1_MII_SNOOP 0x00000020 ++#define GROUP1_EXT_EPHY 0x00000010 ++#define GROUP0_DIAG 0x00000009 ++#define GROUP0_EXT_MII 0x00000007 ++ ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++/* Number to mask conversion macro used for GPIODir and GPIOio */ ++#define GPIO_NUM_TOTAL_BITS_MASK 0x3f ++#define GPIO_NUM_MAX_BITS_MASK 0x1f ++#define GPIO_NUM_TO_MASK(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) < 32) ? (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) : (0) ) ++ ++/* Number to mask conversion macro used for GPIODir_high and GPIOio_high */ ++#define GPIO_NUM_MAX_BITS_MASK_HIGH 0x07 ++#define GPIO_NUM_TO_MASK_HIGH(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) >= 32) ? (1 << ((X-32) & GPIO_NUM_MAX_BITS_MASK_HIGH)) : (0) ) ++ ++ ++/* ++** Spi Controller ++*/ ++ ++typedef struct SpiControl { ++ uint16 spiCmd; /* (0x0): SPI command */ ++#define SPI_CMD_NOOP 0 ++#define SPI_CMD_SOFT_RESET 1 ++#define SPI_CMD_HARD_RESET 2 ++#define SPI_CMD_START_IMMEDIATE 3 ++ ++#define SPI_CMD_COMMAND_SHIFT 0 ++#define SPI_CMD_DEVICE_ID_SHIFT 4 ++#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 ++#define SPI_CMD_ONE_BYTE_SHIFT 11 ++#define SPI_CMD_ONE_WIRE_SHIFT 12 ++#define SPI_DEV_ID_0 0 ++#define SPI_DEV_ID_1 1 ++#define SPI_DEV_ID_2 2 ++#define SPI_DEV_ID_3 3 ++ ++ byte spiIntStatus; /* (0x2): SPI interrupt status */ ++ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ ++ ++ byte spiIntMask; /* (0x4): SPI interrupt mask */ ++#define SPI_INTR_CMD_DONE 0x01 ++#define SPI_INTR_RX_OVERFLOW 0x02 ++#define SPI_INTR_INTR_TX_UNDERFLOW 0x04 ++#define SPI_INTR_TX_OVERFLOW 0x08 ++#define SPI_INTR_RX_UNDERFLOW 0x10 ++#define SPI_INTR_CLEAR_ALL 0x1f ++ ++ byte spiStatus; /* (0x5): SPI status */ ++#define SPI_RX_EMPTY 0x02 ++#define SPI_CMD_BUSY 0x04 ++#define SPI_SERIAL_BUSY 0x08 ++ ++ byte spiClkCfg; /* (0x6): SPI clock configuration */ ++#define SPI_CLK_0_391MHZ 1 ++#define SPI_CLK_0_781MHZ 2 /* default */ ++#define SPI_CLK_1_563MHZ 3 ++#define SPI_CLK_3_125MHZ 4 ++#define SPI_CLK_6_250MHZ 5 ++#define SPI_CLK_12_50MHZ 6 ++#define SPI_CLK_MASK 0x07 ++#define SPI_SSOFFTIME_MASK 0x38 ++#define SPI_SSOFFTIME_SHIFT 3 ++#define SPI_BYTE_SWAP 0x80 ++ ++ byte spiFillByte; /* (0x7): SPI fill byte */ ++ ++ byte unused0; ++ byte spiMsgTail; /* (0x9): msgtail */ ++ byte unused1; ++ byte spiRxTail; /* (0xB): rxtail */ ++ ++ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ ++ ++ byte spiMsgCtl; /* (0x40) control byte */ ++#define FULL_DUPLEX_RW 0 ++#define HALF_DUPLEX_W 1 ++#define HALF_DUPLEX_R 2 ++#define SPI_MSG_TYPE_SHIFT 6 ++#define SPI_BYTE_CNT_SHIFT 0 ++ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ ++ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ ++ byte unused3[64]; /* (0xc0 - 0xff) reserved */ ++} SpiControl; ++ ++#define SPI ((volatile SpiControl * const) SPI_BASE) ++ ++#define IUDMA_MAX_CHANNELS 16 ++ ++/* ++** DMA Channel Configuration (1 .. 16) ++*/ ++typedef struct DmaChannelCfg { ++ uint32 cfg; /* (00) assorted configuration */ ++#define DMA_BURST_HALT 0x00000004 /* idle after finish current memory burst */ ++#define DMA_PKT_HALT 0x00000002 /* idle after an EOP flag is detected */ ++#define DMA_ENABLE 0x00000001 /* set to enable channel */ ++ uint32 intStat; /* (04) interrupts control and status */ ++ uint32 intMask; /* (08) interrupts mask */ ++#define DMA_BUFF_DONE 0x00000001 /* buffer done */ ++#define DMA_DONE 0x00000002 /* packet xfer complete */ ++#define DMA_NO_DESC 0x00000004 /* no valid descriptors */ ++ uint32 maxBurst; /* (0C) max burst length permitted */ ++} DmaChannelCfg; ++ ++/* ++** DMA State RAM (1 .. 16) ++*/ ++typedef struct DmaStateRam { ++ uint32 baseDescPtr; /* (00) descriptor ring start address */ ++ uint32 state_data; /* (04) state/bytes done/ring offset */ ++ uint32 desc_len_status; /* (08) buffer descriptor status and len */ ++ uint32 desc_base_bufptr; /* (0C) buffer descrpitor current processing */ ++} DmaStateRam; ++ ++/* ++** DMA Registers ++*/ ++typedef struct DmaRegs { ++#define DMA_MASTER_EN 0x00000001 ++#define DMA_FLOWC_CH1_EN 0x00000002 ++#define DMA_FLOWC_CH3_EN 0x00000004 ++#define DMA_NUM_CHS_MASK 0x0f000000 ++#define DMA_NUM_CHS_SHIFT 24 ++#define DMA_FLOWCTL_MASK 0x30000000 ++#define DMA_FLOWCTL_CH1 0x10000000 ++#define DMA_FLOWCTL_CH3 0x20000000 ++#define DMA_FLOWCTL_SHIFT 28 ++ uint32 controller_cfg; /* (00) controller configuration */ ++ ++ // Flow control Ch1 ++ uint32 flowctl_ch1_thresh_lo; /* (04) EMAC1 RX DMA channel */ ++ uint32 flowctl_ch1_thresh_hi; /* (08) EMAC1 RX DMA channel */ ++ uint32 flowctl_ch1_alloc; /* (0C) EMAC1 RX DMA channel */ ++#define DMA_BUF_ALLOC_FORCE 0x80000000 ++ ++ // Flow control Ch3 ++ uint32 flowctl_ch3_thresh_lo; /* (10) EMAC2 RX DMA channel */ ++ uint32 flowctl_ch3_thresh_hi; /* (14) EMAC2 RX DMA channel */ ++ uint32 flowctl_ch3_alloc; /* (18) EMAC2 RX DMA channel */ ++ ++ // Unused words ++ uint32 resv[57]; ++ ++ // Per channel registers/state ram ++ DmaChannelCfg chcfg[IUDMA_MAX_CHANNELS]; /* (100) Channel configuration */ ++ union { ++ DmaStateRam s[IUDMA_MAX_CHANNELS]; ++ uint32 u32[4 * IUDMA_MAX_CHANNELS]; ++ } stram; /* (200) state ram */ ++} DmaRegs; ++ ++/* ++** DMA Buffer ++*/ ++typedef struct DmaDesc { ++ uint16 length; /* in bytes of data in buffer */ ++#define DMA_DESC_USEFPM 0x8000 ++#define DMA_DESC_MULTICAST 0x4000 ++#define DMA_DESC_BUFLENGTH 0x0fff ++ uint16 status; /* buffer status */ ++#define DMA_OWN 0x8000 /* cleared by DMA, set by SW */ ++#define DMA_EOP 0x4000 /* last buffer in packet */ ++#define DMA_SOP 0x2000 /* first buffer in packet */ ++#define DMA_WRAP 0x1000 /* */ ++#define DMA_APPEND_CRC 0x0100 ++ ++/* EMAC Descriptor Status definitions */ ++#define EMAC_MISS 0x0080 /* framed address recognition failed (promiscuous) */ ++#define EMAC_BRDCAST 0x0040 /* DA is Broadcast */ ++#define EMAC_MULT 0x0020 /* DA is multicast */ ++#define EMAC_LG 0x0010 /* frame length > RX_LENGTH register value */ ++#define EMAC_NO 0x0008 /* Non-Octet aligned */ ++#define EMAC_RXER 0x0004 /* RX_ERR on MII while RX_DV assereted */ ++#define EMAC_CRC_ERROR 0x0002 /* CRC error */ ++#define EMAC_OV 0x0001 /* Overflow */ ++ ++/* HDLC Descriptor Status definitions */ ++#define DMA_HDLC_TX_ABORT 0x0100 ++#define DMA_HDLC_RX_OVERRUN 0x4000 ++#define DMA_HDLC_RX_TOO_LONG 0x2000 ++#define DMA_HDLC_RX_CRC_OK 0x1000 ++#define DMA_HDLC_RX_ABORT 0x0100 ++ ++ uint32 address; /* address of data */ ++} DmaDesc; ++ ++/* ++** Sdram Controller ++*/ ++typedef struct SdramControllerRegs { ++ uint16 unused1; ++ uint16 initControl; /* 02 */ ++#define SD_POWER_DOWN 0x200 /* put sdram into power down */ ++#define SD_SELF_REFRESH 0x100 /* enable self refresh mode */ ++#define SD_SOFT_RESET 0x080 /* soft reset all sdram controller regs */ ++#define SD_EDO_SELECT 0x040 /* select EDO mode */ ++#define SD_EDO_WAIT_STATE 0x020 /* add an EDO wait state */ ++#define SD_8MEG 0x010 /* map sdram to 8 megs */ ++#define SD_MASTER_ENABLE 0x008 /* enable accesses to external sdram */ ++#define SD_MRS 0x004 /* generate a mode register select cycle */ ++#define SD_PRECHARGE 0x002 /* generate a precharge cycle */ ++#define SD_CBR 0x001 /* generate a refresh cycle */ ++ uint8 unused2[3]; ++ uint8 config; /* 07 */ ++#define SD_FAST_MEM 0x04 /* 1=CAS latency of 2, 0 = CAS latency of 3 */ ++#define SD_BURST_LEN 0x03 /* set burst length */ ++#define SD_BURST_FULL_PAGE 0x00 /* .. full page */ ++#define SD_BURST_8 0x01 /* .. 8 words */ ++#define SD_BURST_4 0x02 /* .. 4 words */ ++#define SD_BURST_2 0x03 /* .. 2 words */ ++ uint16 unused3; ++ uint16 refreshControl; /* 0a */ ++#define SD_REFRESH_ENABLE 0x8000 /* refresh enable */ ++#define SD_REFRESH_PERIOD 0x00ff /* refresh period (16 x n x clock_period) */ ++ ++ uint32 memoryBase; /* 0c */ ++#define SD_MEMBASE_MASK 0xffffe000 /* base address mask */ ++#define SD_MEMSIZE_8MEG 0x00000001 /* memory is 8 meg */ ++#define SD_MEMSIZE_2MEG 0x00000001 /* memory is 2 meg */ ++ ++} SdramControllerRegs; ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct MpiRegisters { ++ EbiChipSelect cs[7]; /* size chip select configuration */ ++#define EBI_CS0_BASE 0 ++#define EBI_CS1_BASE 1 ++#define EBI_CS2_BASE 2 ++#define EBI_CS3_BASE 3 ++#define PCMCIA_COMMON_BASE 4 ++#define PCMCIA_ATTRIBUTE_BASE 5 ++#define PCMCIA_IO_BASE 6 ++ uint32 unused0[2]; /* reserved */ ++ uint32 ebi_control; /* ebi control */ ++ uint32 unused1[4]; /* reserved */ ++#define EBI_ACCESS_TIMEOUT 0x000007FF ++ uint32 pcmcia_cntl1; /* pcmcia control 1 */ ++#define PCCARD_CARD_RESET 0x00040000 ++#define CARDBUS_ENABLE 0x00008000 ++#define PCMCIA_ENABLE 0x00004000 ++#define PCMCIA_GPIO_ENABLE 0x00002000 ++#define CARDBUS_IDSEL 0x00001F00 ++#define VS2_OEN 0x00000080 ++#define VS1_OEN 0x00000040 ++#define VS2_OUT 0x00000020 ++#define VS1_OUT 0x00000010 ++#define VS2_IN 0x00000008 ++#define VS1_IN 0x00000004 ++#define CD2_IN 0x00000002 ++#define CD1_IN 0x00000001 ++#define VS_MASK 0x0000000C ++#define CD_MASK 0x00000003 ++ uint32 unused2; /* reserved */ ++ uint32 pcmcia_cntl2; /* pcmcia control 2 */ ++#define PCMCIA_BYTESWAP_DIS 0x00000002 ++#define PCMCIA_HALFWORD_EN 0x00000001 ++ uint32 unused3[40]; /* reserved */ ++ ++ uint32 sp0range; /* PCI to internal system bus address space */ ++#define ADDR_SPACE_MASK 0xFFFF0000 ++ uint32 sp0remap; ++ uint32 sp0cfg; ++ uint32 sp1range; ++ uint32 sp1remap; ++ uint32 sp1cfg; ++ ++ uint32 EndianCfg; ++ ++ uint32 l2pcfgctl; /* internal system bus to PCI IO/Cfg control */ ++#define DIR_CFG_SEL 0x80000000 /* change from PCI I/O access to PCI config access */ ++#define DIR_CFG_USEREG 0x40000000 /* use this register info for PCI configuration access */ ++#define DEVICE_NUMBER 0x00007C00 /* device number for the PCI configuration access */ ++#define FUNC_NUMBER 0x00000300 /* function number for the PCI configuration access */ ++#define REG_NUMBER 0x000000FC /* register number for the PCI configuration access */ ++#define CONFIG_TYPE 0x00000003 /* configuration type for the PCI configuration access */ ++ ++ uint32 l2pmrange1; /* internal system bus to PCI memory space */ ++#define PCI_SIZE_64K 0xFFFF0000 ++#define PCI_SIZE_128K 0xFFFE0000 ++#define PCI_SIZE_256K 0xFFFC0000 ++#define PCI_SIZE_512K 0xFFF80000 ++#define PCI_SIZE_1M 0xFFF00000 ++#define PCI_SIZE_2M 0xFFE00000 ++#define PCI_SIZE_4M 0xFFC00000 ++#define PCI_SIZE_8M 0xFF800000 ++#define PCI_SIZE_16M 0xFF000000 ++ uint32 l2pmbase1; /* kseg0 or kseg1 address & 0x1FFFFFFF */ ++ uint32 l2pmremap1; ++#define CARDBUS_MEM 0x00000004 ++#define MEM_WINDOW_EN 0x00000001 ++ uint32 l2pmrange2; ++ uint32 l2pmbase2; ++ uint32 l2pmremap2; ++ uint32 l2piorange; /* internal system bus to PCI I/O space */ ++ uint32 l2piobase; ++ uint32 l2pioremap; ++ ++ uint32 pcimodesel; ++#define PCI2_INT_BUS_RD_PREFECH 0x000000F0 ++#define PCI_BAR2_NOSWAP 0x00000002 /* BAR at offset 0x20 */ ++#define PCI_BAR1_NOSWAP 0x00000001 /* BAR at affset 0x1c */ ++ ++ uint32 pciintstat; /* PCI interrupt mask/status */ ++#define MAILBOX1_SENT 0x08 ++#define MAILBOX0_SENT 0x04 ++#define MAILBOX1_MSG_RCV 0x02 ++#define MAILBOX0_MSG_RCV 0x01 ++ uint32 locbuscntrl; /* internal system bus control */ ++#define DIR_U2P_NOSWAP 0x00000002 ++#define EN_PCI_GPIO 0x00000001 ++ uint32 locintstat; /* internal system bus interrupt mask/status */ ++#define CSERR 0x0200 ++#define SERR 0x0100 ++#define EXT_PCI_INT 0x0080 ++#define DIR_FAILED 0x0040 ++#define DIR_COMPLETE 0x0020 ++#define PCI_CFG 0x0010 ++ uint32 unused4[7]; ++ ++ uint32 mailbox0; ++ uint32 mailbox1; ++ ++ uint32 pcicfgcntrl; /* internal system bus PCI configuration control */ ++#define PCI_CFG_REG_WRITE_EN 0x00000080 ++#define PCI_CFG_ADDR 0x0000003C ++ uint32 pcicfgdata; /* internal system bus PCI configuration data */ ++ ++ uint32 locch2ctl; /* PCI to interrnal system bus DMA (downstream) local control */ ++#define MPI_DMA_HALT 0x00000008 /* idle after finish current memory burst */ ++#define MPI_DMA_PKT_HALT 0x00000004 /* idle after an EOP flag is detected */ ++#define MPI_DMA_STALL 0x00000002 /* idle after an EOP flag is detected */ ++#define MPI_DMA_ENABLE 0x00000001 /* set to enable channel */ ++ uint32 locch2intStat; ++#define MPI_DMA_NO_DESC 0x00000004 /* no valid descriptors */ ++#define MPI_DMA_DONE 0x00000002 /* packet xfer complete */ ++#define MPI_DMA_BUFF_DONE 0x00000001 /* buffer done */ ++ uint32 locch2intMask; ++ uint32 unused5; ++ uint32 locch2descaddr; ++ uint32 locch2status1; ++#define LOCAL_DESC_STATE 0xE0000000 ++#define PCI_DESC_STATE 0x1C000000 ++#define BYTE_DONE 0x03FFC000 ++#define RING_ADDR 0x00003FFF ++ uint32 locch2status2; ++#define BUFPTR_OFFSET 0x1FFF0000 ++#define PCI_MASTER_STATE 0x000000C0 ++#define LOC_MASTER_STATE 0x00000038 ++#define CONTROL_STATE 0x00000007 ++ uint32 unused6; ++ ++ uint32 locch1Ctl; /*internal system bus to PCI DMA (upstream) local control */ ++#define DMA_U2P_LE 0x00000200 /* local bus is little endian */ ++#define DMA_U2P_NOSWAP 0x00000100 /* lccal bus is little endian but no data swapped */ ++ uint32 locch1intstat; ++ uint32 locch1intmask; ++ uint32 unused7; ++ uint32 locch1descaddr; ++ uint32 locch1status1; ++ uint32 locch1status2; ++ uint32 unused8; ++ ++ uint32 pcich1ctl; /* internal system bus to PCI DMA PCI control */ ++ uint32 pcich1intstat; ++ uint32 pcich1intmask; ++ uint32 pcich1descaddr; ++ uint32 pcich1status1; ++ uint32 pcich1status2; ++ ++ uint32 pcich2Ctl; /* PCI to internal system bus DMA PCI control */ ++ uint32 pcich2intstat; ++ uint32 pcich2intmask; ++ uint32 pcich2descaddr; ++ uint32 pcich2status1; ++ uint32 pcich2status2; ++ ++ uint32 perm_id; /* permanent device and vendor id */ ++ uint32 perm_rev; /* permanent revision id */ ++} MpiRegisters; ++ ++#define MPI ((volatile MpiRegisters * const) MPI_BASE) ++ ++/* PCI configuration address space start offset 0x40 */ ++#define BRCM_PCI_CONFIG_TIMER 0x40 ++#define BRCM_PCI_CONFIG_TIMER_RETRY_MASK 0x0000FF00 ++#define BRCM_PCI_CONFIG_TIMER_TRDY_MASK 0x000000FF ++ ++/* ++** EMAC transmit MIB counters ++*/ ++typedef struct EmacTxMib { ++ uint32 tx_good_octets; /* (200) good byte count */ ++ uint32 tx_good_pkts; /* (204) good pkt count */ ++ uint32 tx_octets; /* (208) good and bad byte count */ ++ uint32 tx_pkts; /* (20c) good and bad pkt count */ ++ uint32 tx_broadcasts_pkts; /* (210) good broadcast packets */ ++ uint32 tx_multicasts_pkts; /* (214) good mulitcast packets */ ++ uint32 tx_len_64; /* (218) RMON tx pkt size buckets */ ++ uint32 tx_len_65_to_127; /* (21c) */ ++ uint32 tx_len_128_to_255; /* (220) */ ++ uint32 tx_len_256_to_511; /* (224) */ ++ uint32 tx_len_512_to_1023; /* (228) */ ++ uint32 tx_len_1024_to_max; /* (22c) */ ++ uint32 tx_jabber_pkts; /* (230) > 1518 with bad crc */ ++ uint32 tx_oversize_pkts; /* (234) > 1518 with good crc */ ++ uint32 tx_fragment_pkts; /* (238) < 63 with bad crc */ ++ uint32 tx_underruns; /* (23c) fifo underrun */ ++ uint32 tx_total_cols; /* (240) total collisions in all tx pkts */ ++ uint32 tx_single_cols; /* (244) tx pkts with single collisions */ ++ uint32 tx_multiple_cols; /* (248) tx pkts with multiple collisions */ ++ uint32 tx_excessive_cols; /* (24c) tx pkts with excessive cols */ ++ uint32 tx_late_cols; /* (250) tx pkts with late cols */ ++ uint32 tx_defered; /* (254) tx pkts deferred */ ++ uint32 tx_carrier_lost; /* (258) tx pkts with CRS lost */ ++ uint32 tx_pause_pkts; /* (25c) tx pause pkts sent */ ++#define NumEmacTxMibVars 24 ++} EmacTxMib; ++ ++/* ++** EMAC receive MIB counters ++*/ ++typedef struct EmacRxMib { ++ uint32 rx_good_octets; /* (280) good byte count */ ++ uint32 rx_good_pkts; /* (284) good pkt count */ ++ uint32 rx_octets; /* (288) good and bad byte count */ ++ uint32 rx_pkts; /* (28c) good and bad pkt count */ ++ uint32 rx_broadcasts_pkts; /* (290) good broadcast packets */ ++ uint32 rx_multicasts_pkts; /* (294) good mulitcast packets */ ++ uint32 rx_len_64; /* (298) RMON rx pkt size buckets */ ++ uint32 rx_len_65_to_127; /* (29c) */ ++ uint32 rx_len_128_to_255; /* (2a0) */ ++ uint32 rx_len_256_to_511; /* (2a4) */ ++ uint32 rx_len_512_to_1023; /* (2a8) */ ++ uint32 rx_len_1024_to_max; /* (2ac) */ ++ uint32 rx_jabber_pkts; /* (2b0) > 1518 with bad crc */ ++ uint32 rx_oversize_pkts; /* (2b4) > 1518 with good crc */ ++ uint32 rx_fragment_pkts; /* (2b8) < 63 with bad crc */ ++ uint32 rx_missed_pkts; /* (2bc) missed packets */ ++ uint32 rx_crc_align_errs; /* (2c0) both or either */ ++ uint32 rx_undersize; /* (2c4) < 63 with good crc */ ++ uint32 rx_crc_errs; /* (2c8) crc errors (only) */ ++ uint32 rx_align_errs; /* (2cc) alignment errors (only) */ ++ uint32 rx_symbol_errs; /* (2d0) pkts with RXERR assertions (symbol errs) */ ++ uint32 rx_pause_pkts; /* (2d4) MAC control, PAUSE */ ++ uint32 rx_nonpause_pkts; /* (2d8) MAC control, not PAUSE */ ++#define NumEmacRxMibVars 23 ++} EmacRxMib; ++ ++typedef struct EmacRegisters { ++ uint32 rxControl; /* (00) receive control */ ++#define EMAC_PM_REJ 0x80 /* - reject DA match in PMx regs */ ++#define EMAC_UNIFLOW 0x40 /* - accept cam match fc */ ++#define EMAC_FC_EN 0x20 /* - enable flow control */ ++#define EMAC_LOOPBACK 0x10 /* - loopback */ ++#define EMAC_PROM 0x08 /* - promiscuous */ ++#define EMAC_RDT 0x04 /* - ignore transmissions */ ++#define EMAC_ALL_MCAST 0x02 /* - ignore transmissions */ ++#define EMAC_NO_BCAST 0x01 /* - ignore transmissions */ ++ ++ ++ uint32 rxMaxLength; /* (04) receive max length */ ++ uint32 txMaxLength; /* (08) transmit max length */ ++ uint32 unused1[1]; ++ uint32 mdioFreq; /* (10) mdio frequency */ ++#define EMAC_MII_PRE_EN 0x00000080 /* prepend preamble sequence */ ++#define EMAC_MDIO_PRE 0x00000080 /* - enable MDIO preamble */ ++#define EMAC_MDC_FREQ 0x0000007f /* - mdio frequency */ ++ ++ uint32 mdioData; /* (14) mdio data */ ++#define MDIO_WR 0x50020000 /* - write framing */ ++#define MDIO_RD 0x60020000 /* - read framing */ ++#define MDIO_PMD_SHIFT 23 ++#define MDIO_REG_SHIFT 18 ++ ++ uint32 intMask; /* (18) int mask */ ++ uint32 intStatus; /* (1c) int status */ ++#define EMAC_FLOW_INT 0x04 /* - flow control event */ ++#define EMAC_MIB_INT 0x02 /* - mib event */ ++#define EMAC_MDIO_INT 0x01 /* - mdio event */ ++ ++ uint32 unused2[3]; ++ uint32 config; /* (2c) config */ ++#define EMAC_ENABLE 0x001 /* - enable emac */ ++#define EMAC_DISABLE 0x002 /* - disable emac */ ++#define EMAC_SOFT_RST 0x004 /* - soft reset */ ++#define EMAC_SOFT_RESET 0x004 /* - emac soft reset */ ++#define EMAC_EXT_PHY 0x008 /* - external PHY select */ ++ ++ uint32 txControl; /* (30) transmit control */ ++#define EMAC_FD 0x001 /* - full duplex */ ++#define EMAC_FLOWMODE 0x002 /* - flow mode */ ++#define EMAC_NOBKOFF 0x004 /* - no backoff in */ ++#define EMAC_SMALLSLT 0x008 /* - small slot time */ ++ ++ uint32 txThreshold; /* (34) transmit threshold */ ++ uint32 mibControl; /* (38) mib control */ ++#define EMAC_NO_CLEAR 0x001 /* don't clear on read */ ++ ++ uint32 unused3[7]; ++ ++ uint32 pm0DataLo; /* (58) perfect match 0 data lo */ ++ uint32 pm0DataHi; /* (5C) perfect match 0 data hi (15:0) */ ++ uint32 pm1DataLo; /* (60) perfect match 1 data lo */ ++ uint32 pm1DataHi; /* (64) perfect match 1 data hi (15:0) */ ++ uint32 pm2DataLo; /* (68) perfect match 2 data lo */ ++ uint32 pm2DataHi; /* (6C) perfect match 2 data hi (15:0) */ ++ uint32 pm3DataLo; /* (70) perfect match 3 data lo */ ++ uint32 pm3DataHi; /* (74) perfect match 3 data hi (15:0) */ ++#define EMAC_CAM_V 0x10000 /* - cam index */ ++#define EMAC_CAM_VALID 0x00010000 ++ ++ uint32 unused4[98]; /* (78-1fc) */ ++ ++ EmacTxMib tx_mib; /* (200) emac tx mib */ ++ uint32 unused5[8]; /* (260-27c) */ ++ ++ EmacRxMib rx_mib; /* (280) rx mib */ ++ ++} EmacRegisters; ++ ++/* register offsets for subrouting access */ ++#define EMAC_RX_CONTROL 0x00 ++#define EMAC_RX_MAX_LENGTH 0x04 ++#define EMAC_TX_MAC_LENGTH 0x08 ++#define EMAC_MDIO_FREQ 0x10 ++#define EMAC_MDIO_DATA 0x14 ++#define EMAC_INT_MASK 0x18 ++#define EMAC_INT_STATUS 0x1C ++#define EMAC_CAM_DATA_LO 0x20 ++#define EMAC_CAM_DATA_HI 0x24 ++#define EMAC_CAM_CONTROL 0x28 ++#define EMAC_CONTROL 0x2C ++#define EMAC_TX_CONTROL 0x30 ++#define EMAC_TX_THRESHOLD 0x34 ++#define EMAC_MIB_CONTROL 0x38 ++ ++ ++#define EMAC1 ((volatile EmacRegisters * const) EMAC1_BASE) ++#define EMAC2 ((volatile EmacRegisters * const) EMAC2_BASE) ++ ++/* ++** USB Registers ++*/ ++typedef struct UsbRegisters { ++ byte inttf_setting; ++ byte current_config; ++ uint16 status_frameNum; ++#define USB_LINK 0x2000 ++#define USB_BUS_RESET 0x1000 ++#define USB_SUSPENDED 0x0800 ++ byte unused1; ++ byte endpt_prnt; ++ byte endpt_dirn; ++ byte endpt_status; ++#define USB_ENDPOINT_0 0x01 ++#define USB_ENDPOINT_1 0x02 ++#define USB_ENDPOINT_2 0x04 ++#define USB_ENDPOINT_3 0x08 ++#define USB_ENDPOINT_4 0x10 ++#define USB_ENDPOINT_5 0x20 ++#define USB_ENDPOINT_6 0x40 ++#define USB_ENDPOINT_7 0x80 ++ uint32 unused2; ++ byte conf_mem_ctl; ++#define USB_CONF_MEM_RD 0x80 ++#define USB_CONF_MEM_RDY 0x40 ++ byte unused2a; ++ byte conf_mem_read_address; ++ byte conf_mem_write_address; ++ ++ byte unused3; ++ byte dev_req_bytesel; ++ uint16 ext_dev_data; ++ ++ byte unused4; ++ byte clr_fifo; ++ byte endpt_stall_reset; // use same endpoint #'s from above ++ byte usb_cntl; ++#define USB_FORCE_ERR 0x20 ++#define USB_SOFT_RESET 0x10 ++#define USB_RESUME 0x08 ++#define USB_COMMAND_ERR 0x04 ++#define USB_COMMAND_OVER 0x02 ++ byte irq_addr; ++ byte iso_out_in_addr; ++ byte blk_out_in_addr; ++ byte cntl_addr; ++ uint32 unusedx[2]; ++ uint32 tx_ram_write_port; ++ uint32 fifo_status; // (see bcm6348 data sheet for definition) ++ ++ uint32 irq_status; ++ uint32 irq_mask; ++#define USB_NEW_CONFIG 0x00000001 ++#define USB_SETUP_COMMAND_RECV 0x00000002 // non-standard setup cmd rcvd ++#define USB_OUT_FIFO_OV 0x00000004 ++#define USB_RESET_RECV 0x00000008 ++#define USB_SUSPEND_RECV 0x00000010 ++#define USB_FIFO_REWIND 0x00000020 ++#define USB_RX_BULK_FIFO_DATA_AVAIL 0x00000040 ++#define USB_RX_ISO_FIFO_DATA_AVAIL 0x00000080 ++#define USB_LINK_CHANGE 0x00010000 ++ uint32 endpt_cntl; ++#define USB_R_WK_EN 0x0100 ++#define USB_TX_EOP 0x0200 ++#define USB_TX_CNTL_DMA_EN 0x0400 ++#define USB_TX_BULK_DMA_EN 0x0800 ++#define USB_TX_ISO_DMA_EN 0x1000 ++#define USB_RX_CNTL_DMA_EN 0x2000 ++#define USB_RX_BULK_DMA_EN 0x4800 ++#define USB_RX_ISO_DMA_EN 0x8000 ++ uint32 rx_status_read_port; ++ uint32 confmem_read_port; ++ uint32 confmem_write_port; ++ uint32 fifo_ovf_count; ++ uint32 fifo_rewind_cnt; ++ uint32 terminal_count; ++} UsbRegisters; ++ ++#define USB ((volatile UsbRegisters * const) USB_CTL_BASE) ++ ++/* ++** ADSL core Registers ++*/ ++ ++#define _PADLINE(line) pad ## line ++#define _XSTR(line) _PADLINE(line) ++#define PAD _XSTR(__LINE__) ++ ++typedef struct AdslRegisters { ++ uint32 core_control; ++#define ADSL_RESET 0x01 ++ ++ uint32 core_status; ++#define ADSL_HOST_MSG 0x01 ++ ++ uint32 PAD; ++ uint32 bist_status; ++ uint32 PAD[4]; ++ uint32 int_status_i; /* 0x20 */ ++ uint32 int_mask_i; ++ uint32 int_status_f; ++ uint32 int_mask_f; ++#define ADSL_INT_HOST_MSG 0x00000020 ++#define ADSL_INT_DESC_ERR 0x00000400 ++#define ADSL_INT_DATA_ERR 0x00000800 ++#define ADSL_INT_DESC_PROTO_ERR 0x00001000 ++#define ADSL_INT_RCV_DESC_UF 0x00002000 ++#define ADSL_INT_RCV_FIFO_OF 0x00004000 ++#define ADSL_INT_XMT_FIFO_UF 0x00008000 ++#define ADSL_INT_RCV 0x00010000 ++#define ADSL_INT_XMT 0x01000000 ++ ++ uint32 PAD[116]; ++ ++ uint32 xmtcontrol_intr; /* 0x200 */ ++#define ADSL_DMA_XMT_EN 0x00000001 ++#define ADSL_DMA_XMT_LE 0x00000004 ++ uint32 xmtaddr_intr; ++#define ADSL_DMA_ADDR_MASK 0xFFFFF000 ++ uint32 xmtptr_intr; ++#define ADSL_DMA_LAST_DESC_MASK 0x00000FFF ++ uint32 xmtstatus_intr; ++#define ADSL_DMA_CURR_DESC_MASK 0x00000FFF ++#define ADSL_DMA_XMT_STATE_MASK 0x0000F000 ++#define ADSL_DMA_XMT_STATE_DIS 0x00000000 ++#define ADSL_DMA_XMT_STATE_ACT 0x00001000 ++#define ADSL_DMA_XMT_STATE_IDLE 0x00002000 ++#define ADSL_DMA_XMT_STATE_STOP 0x00003000 ++ ++#define ADSL_DMA_XMT_ERR_MASK 0x000F0000 ++#define ADSL_DMA_XMT_ERR_NONE 0x00000000 ++#define ADSL_DMA_XMT_ERR_DPE 0x00010000 ++#define ADSL_DMA_XMT_ERR_FIFO 0x00020000 ++#define ADSL_DMA_XMT_ERR_DTE 0x00030000 ++#define ADSL_DMA_XMT_ERR_DRE 0x00040000 ++ ++ uint32 rcvcontrol_intr; ++#define ADSL_DMA_RCV_EN 0x00000001 ++#define ADSL_DMA_RCV_FO 0x000000FE ++ uint32 rcvaddr_intr; ++ uint32 rcvptr_intr; ++ uint32 rcvstatus_intr; ++#define ADSL_DMA_RCV_STATE_MASK 0x0000F000 ++#define ADSL_DMA_RCV_STATE_DIS 0x00000000 ++#define ADSL_DMA_RCV_STATE_ACT 0x00001000 ++#define ADSL_DMA_RCV_STATE_IDLE 0x00002000 ++#define ADSL_DMA_RCV_STATE_STOP 0x00003000 ++ ++#define ADSL_DMA_RCV_ERR_MASK 0x000F0000 ++#define ADSL_DMA_RCV_ERR_NONE 0x00000000 ++#define ADSL_DMA_RCV_ERR_DPE 0x00010000 ++#define ADSL_DMA_RCV_ERR_FIFO 0x00020000 ++#define ADSL_DMA_RCV_ERR_DTE 0x00030000 ++#define ADSL_DMA_RCV_ERR_DRE 0x00040000 ++ ++ uint32 xmtcontrol_fast; ++ uint32 xmtaddr_fast; ++ uint32 xmtptr_fast; ++ uint32 xmtstatus_fast; ++ uint32 rcvcontrol_fast; ++ uint32 rcvaddr_fast; ++ uint32 rcvptr_fast; ++ uint32 rcvstatus_fast; ++ uint32 PAD[48]; ++ ++ uint32 host_message; /* 0x300 */ ++ uint32 PAD[805]; ++ uint32 core_reset; ++ uint32 core_error; ++ uint32 core_revision; ++ ++#define ADSL_CORE_REV 0x0000000F ++#define ADSL_CORE_TYPE 0x0000FFF0 ++} AdslRegisters; ++ ++#define ADSL ((volatile AdslRegisters * const) ADSL_BASE) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/AdslMibDef.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/AdslMibDef.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/AdslMibDef.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/AdslMibDef.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,712 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/**************************************************************************** ++ * ++ * AdslMibOid.h ++ * ++ * Description: ++ * SNMP object identifiers for ADSL MIB and other related MIBs ++ * ++ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. ++ * Authors: Ilya Stomakhin ++ * ++ * $Revision: 1.17 $ ++ * ++ * $Id: AdslMibDef.h,v 1.17 2004/07/27 19:24:40 ilyas Exp $ ++ * ++ * $Log: AdslMibDef.h,v $ ++ * Revision 1.17 2004/07/27 19:24:40 ilyas ++ * Added AnnexM configuration option ++ * ++ * Revision 1.16 2004/06/04 18:56:01 ilyas ++ * Added counter for ADSL2 framing and performance ++ * ++ * Revision 1.15 2004/05/25 16:15:04 ilyas ++ * Added ADSL2 framing status ++ * ++ * Revision 1.14 2004/03/31 19:09:48 ilyas ++ * Added ADSL2+ modulation control ++ * ++ * Revision 1.13 2004/03/03 20:14:05 ilyas ++ * Merged changes for ADSL2+ from ADSL driver ++ * ++ * Revision 1.12 2003/10/17 21:02:12 ilyas ++ * Added more data for ADSL2 ++ * ++ * Revision 1.11 2003/10/14 00:55:27 ilyas ++ * Added UAS, LOSS, SES error seconds counters. ++ * Support for 512 tones (AnnexI) ++ * ++ * Revision 1.10 2003/09/29 18:39:51 ilyas ++ * Added new definitions for AnnexI ++ * ++ * Revision 1.9 2003/07/18 19:14:34 ilyas ++ * Merged with ADSL driver ++ * ++ * Revision 1.8 2003/07/08 18:34:16 ilyas ++ * Added fields to adsl configuration structure ++ * ++ * Revision 1.7 2003/03/25 00:07:00 ilyas ++ * Added "long" BERT supprt ++ * ++ * Revision 1.6 2003/02/27 07:10:52 ilyas ++ * Added more configuration and status parameters (for EFNT) ++ * ++ * Revision 1.5 2003/01/23 20:29:37 ilyas ++ * Added structure for ADSL PHY configuration command ++ * ++ * Revision 1.4 2002/11/13 21:32:49 ilyas ++ * Added adjustK support for Centillium non-standard framing mode ++ * ++ * Revision 1.3 2002/10/31 01:35:50 ilyas ++ * Fixed size of K for S=1/2 ++ * ++ * Revision 1.2 2002/10/05 03:28:31 ilyas ++ * Added extra definitions for Linux and VxWorks drivers. ++ * Added definitions for SelfTest support ++ * ++ * Revision 1.1 2002/07/20 00:51:41 ilyas ++ * Merged witchanges made for VxWorks/Linux driver. ++ * ++ * Revision 1.1 2001/12/21 22:39:30 ilyas ++ * Added support for ADSL MIB data objects (RFC2662) ++ * ++ * ++ *****************************************************************************/ ++ ++#ifndef AdslMibDefHeader ++#define AdslMibDefHeader ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++/* ++** ++** ADSL configuration parameters ++** ++*/ ++ ++#define kAdslCfgModMask (0x00000007 | 0x0000F000) ++#define kAdslCfgModAny 0x00000000 ++ ++#define kAdslCfgModGdmtOnly 0x00000001 ++#define kAdslCfgModGliteOnly 0x00000002 ++#define kAdslCfgModT1413Only 0x00000004 ++#define kAdslCfgModAnnexIOnly 0x00000004 ++#define kAdslCfgModAdsl2Only 0x00001000 ++#define kAdslCfgModAdsl2pOnly 0x00002000 ++ ++#define kAdslCfgBitmapMask 0x00000018 ++#define kAdslCfgDBM 0x00000000 ++#define kAdslCfgFBM 0x00000008 ++#define kAdslCfgFBMSoL 0x00000010 ++ ++#define kAdslCfgLinePairMask 0x00000020 ++#define kAdslCfgLineInnerPair 0x00000000 ++#define kAdslCfgLineOuterPair 0x00000020 ++ ++#define kAdslCfgCentilliumCRCWorkAroundMask 0x00000040 ++#define kAdslCfgCentilliumCRCWorkAroundDisabled 0x00000000 ++#define kAdslCfgCentilliumCRCWorkAroundEnabled 0x00000040 ++ ++#define kAdslCfgExtraData 0x00000080 ++#define kAdslCfgTrellisMask (0x00000100 | kAdslCfgExtraData) ++#define kAdslCfgTrellisOn (0x00000100 | kAdslCfgExtraData) ++#define kAdslCfgTrellisOff (0 | kAdslCfgExtraData) ++#define kAdslCfgExtraMask 0xFFFFFF80 ++ ++#define kAdslCfgLOSMonitoringMask 0x00000200 ++#define kAdslCfgLOSMonitoringOff 0x00000200 ++#define kAdslCfgLOSMonitoringOn 0x00000000 ++ ++#define kAdslCfgMarginMonitoringMask 0x00000400 ++#define kAdslCfgMarginMonitoringOn 0x00000400 ++#define kAdslCfgMarginMonitoringOff 0x00000000 ++ ++#define kAdslCfgDemodCapMask 0x00000800 ++#define kAdslCfgDemodCapOn 0x00000800 ++#define kAdslCfgDemodCapOff 0x00000000 ++ ++/* Flags 0x00001000 - 0x00008000 are reserved for modulation (see above) */ ++ ++/* Upstream mode flags 0x00010000 - 0x00030000 */ ++ ++#define kAdslCfgUpstreamModeMask 0x00030000 ++#define kAdslCfgUpstreamMax 0x00000000 ++#define kAdslCfgUpstreamSingle 0x00010000 ++#define kAdslCfgUpstreamDouble 0x00020000 ++#define kAdslCfgUpstreamTriple 0x00030000 ++ ++#define kAdslCfgNoSpectrumOverlap 0x00040000 ++ ++/* Pwm sync clock configuration */ ++ ++#define kAdslCfgPwmSyncClockMask 0x00080000 ++#define kAdslCfgPwmSyncClockOn 0x00080000 ++#define kAdslCfgPwmSyncClockOff 0x00000000 ++ ++#define kAdslCfgDefaultTrainingMargin -1 ++#define kAdslCfgDefaultShowtimeMargin -1 ++#define kAdslCfgDefaultLOMTimeThld -1 ++ ++/* ADSL2 parameters */ ++ ++#define kAdsl2CfgReachExOn 0x00000001 ++#define kAdsl2CfgAnnexMEnabled 0x00000002 ++ ++typedef struct _adslCfgProfile { ++ long adslAnnexCParam; ++ long adslAnnexAParam; ++ long adslTrainingMarginQ4; ++ long adslShowtimeMarginQ4; ++ long adslLOMTimeThldSec; ++ long adslDemodCapMask; ++ long adslDemodCapValue; ++ long adsl2Param; ++ long adslPwmSyncClockFreq; ++} adslCfgProfile; ++ ++/* ++** ++** ADSL PHY configuration ++** ++*/ ++ ++typedef struct _adslPhyCfg { ++ long demodCapMask; ++ long demodCap; ++} adslPhyCfg; ++ ++/* ++** ++** ADSL version info parameters ++** ++*/ ++ ++#define kAdslVersionStringSize 32 ++ ++#define kAdslTypeUnknown 0 ++#define kAdslTypeAnnexA 1 ++#define kAdslTypeAnnexB 2 ++#define kAdslTypeAnnexC 3 ++#define kAdslTypeSADSL 4 ++ ++typedef struct _adslVersionInfo { ++ unsigned short phyType; ++ unsigned short phyMjVerNum; ++ unsigned short phyMnVerNum; ++ char phyVerStr[kAdslVersionStringSize]; ++ unsigned short drvMjVerNum; ++ unsigned short drvMnVerNum; ++ char drvVerStr[kAdslVersionStringSize]; ++} adslVersionInfo; ++ ++/* ++** ++** ADSL self-test parameters ++** ++*/ ++ ++#define kAdslSelfTestLMEM 0x00000001 ++#define kAdslSelfTestSDRAM 0x00000002 ++#define kAdslSelfTestAFE 0x00000004 ++#define kAdslSelfTestQproc 0x00000008 ++#define kAdslSelfTestRS 0x00000010 ++#define kAdslSelfTestHostDma 0x00000020 ++ ++#define kAdslSelfTestAll ((kAdslSelfTestHostDma - 1) | kAdslSelfTestHostDma) ++ ++#define kAdslSelfTestInProgress 0x40000000 ++#define kAdslSelfTestCompleted 0x80000000 ++ ++/* MIB OID's for ADSL objects */ ++ ++#define kOidMaxObjLen 80 ++ ++#define kOidAdsl 94 ++#define kOidAdslInterleave 124 ++#define kOidAdslFast 125 ++#define kOidAtm 37 ++#define kOidAdslPrivate 255 ++#define kOidAdslPrivatePartial 254 ++ ++#define kAdslMibAnnexAToneNum 256 ++#define kAdslMibToneNum kAdslMibAnnexAToneNum ++#define kAdslMibMaxToneNum kAdslMibAnnexAToneNum*2*2 ++ ++#define kOidAdslPrivSNR 1 ++#define kOidAdslPrivBitAlloc 2 ++#define kOidAdslPrivGain 3 ++#define kOidAdslPrivShowtimeMargin 4 ++#define kOidAdslPrivChanCharLin 5 ++#define kOidAdslPrivChanCharLog 6 ++#define kOidAdslPrivQuietLineNoise 7 ++#define kOidAdslPrivExtraInfo 255 ++ ++#define kOidAdslLine 1 ++#define kOidAdslMibObjects 1 ++ ++#define kOidAdslLineTable 1 ++#define kOidAdslLineEntry 1 ++#define kOidAdslLineCoding 1 ++#define kOidAdslLineType 2 ++#define kOidAdslLineSpecific 3 ++#define kOidAdslLineConfProfile 4 ++#define kOidAdslLineAlarmConfProfile 5 ++ ++#define kOidAdslAtucPhysTable 2 ++#define kOidAdslAturPhysTable 3 ++#define kOidAdslPhysEntry 1 ++#define kOidAdslPhysInvSerialNumber 1 ++#define kOidAdslPhysInvVendorID 2 ++#define kOidAdslPhysInvVersionNumber 3 ++#define kOidAdslPhysCurrSnrMgn 4 ++#define kOidAdslPhysCurrAtn 5 ++#define kOidAdslPhysCurrStatus 6 ++#define kOidAdslPhysCurrOutputPwr 7 ++#define kOidAdslPhysCurrAttainableRate 8 ++ ++#define kOidAdslAtucChanTable 4 ++#define kOidAdslAturChanTable 5 ++#define kOidAdslChanEntry 1 ++#define kOidAdslChanInterleaveDelay 1 ++#define kOidAdslChanCurrTxRate 2 ++#define kOidAdslChanPrevTxRate 3 ++#define kOidAdslChanCrcBlockLength 4 ++ ++#define kOidAdslAtucPerfDataTable 6 ++#define kOidAdslAturPerfDataTable 7 ++#define kOidAdslPerfDataEntry 1 ++#define kOidAdslPerfLofs 1 ++#define kOidAdslPerfLoss 2 ++#define kOidAdslPerfLprs 3 ++#define kOidAdslPerfESs 4 ++#define kOidAdslPerfValidIntervals 5 ++#define kOidAdslPerfInvalidIntervals 6 ++#define kOidAdslPerfCurr15MinTimeElapsed 7 ++#define kOidAdslPerfCurr15MinLofs 8 ++#define kOidAdslPerfCurr15MinLoss 9 ++#define kOidAdslPerfCurr15MinLprs 10 ++#define kOidAdslPerfCurr15MinESs 11 ++#define kOidAdslPerfCurr1DayTimeElapsed 12 ++#define kOidAdslPerfCurr1DayLofs 13 ++#define kOidAdslPerfCurr1DayLoss 14 ++#define kOidAdslPerfCurr1DayLprs 15 ++#define kOidAdslPerfCurr1DayESs 16 ++#define kOidAdslPerfPrev1DayMoniSecs 17 ++#define kOidAdslPerfPrev1DayLofs 18 ++#define kOidAdslPerfPrev1DayLoss 19 ++#define kOidAdslPerfPrev1DayLprs 20 ++#define kOidAdslPerfPrev1DayESs 21 ++ ++#define kOidAdslAtucPerfIntervalTable 8 ++#define kOidAdslAturPerfIntervalTable 9 ++#define kOidAdslPerfIntervalEntry 1 ++#define kOidAdslIntervalNumber 1 ++#define kOidAdslIntervalLofs 2 ++#define kOidAdslIntervalLoss 3 ++#define kOidAdslIntervalLprs 4 ++#define kOidAdslIntervalESs 5 ++#define kOidAdslIntervalValidData 6 ++ ++#define kOidAdslAtucChanPerfTable 10 ++#define kOidAdslAturChanPerfTable 11 ++#define kOidAdslChanPerfEntry 1 ++#define kOidAdslChanReceivedBlks 1 ++#define kOidAdslChanTransmittedBlks 2 ++#define kOidAdslChanCorrectedBlks 3 ++#define kOidAdslChanUncorrectBlks 4 ++#define kOidAdslChanPerfValidIntervals 5 ++#define kOidAdslChanPerfInvalidIntervals 6 ++#define kOidAdslChanPerfCurr15MinTimeElapsed 7 ++#define kOidAdslChanPerfCurr15MinReceivedBlks 8 ++#define kOidAdslChanPerfCurr15MinTransmittedBlks 9 ++#define kOidAdslChanPerfCurr15MinCorrectedBlks 10 ++#define kOidAdslChanPerfCurr15MinUncorrectBlks 11 ++#define kOidAdslChanPerfCurr1DayTimeElapsed 12 ++#define kOidAdslChanPerfCurr1DayReceivedBlks 13 ++#define kOidAdslChanPerfCurr1DayTransmittedBlks 14 ++#define kOidAdslChanPerfCurr1DayCorrectedBlks 15 ++#define kOidAdslChanPerfCurr1DayUncorrectBlks 16 ++#define kOidAdslChanPerfPrev1DayMoniSecs 17 ++#define kOidAdslChanPerfPrev1DayReceivedBlks 18 ++#define kOidAdslChanPerfPrev1DayTransmittedBlks 19 ++#define kOidAdslChanPerfPrev1DayCorrectedBlks 20 ++#define kOidAdslChanPerfPrev1DayUncorrectBlks 21 ++ ++#define kOidAdslAtucChanIntervalTable 12 ++#define kOidAdslAturChanIntervalTable 13 ++#define kOidAdslChanIntervalEntry 1 ++#define kOidAdslChanIntervalNumber 1 ++#define kOidAdslChanIntervalReceivedBlks 2 ++#define kOidAdslChanIntervalTransmittedBlks 3 ++#define kOidAdslChanIntervalCorrectedBlks 4 ++#define kOidAdslChanIntervalUncorrectBlks 5 ++#define kOidAdslChanIntervalValidData 6 ++ ++#define kOidAtmMibObjects 1 ++#define kOidAtmTcTable 4 ++#define kOidAtmTcEntry 1 ++#define kOidAtmOcdEvents 1 ++#define kOidAtmAlarmState 2 ++ ++/* Adsl Channel coding */ ++ ++#define kAdslRcvDir 0 ++#define kAdslXmtDir 1 ++ ++#define kAdslRcvActive (1 << kAdslRcvDir) ++#define kAdslXmtActive (1 << kAdslXmtDir) ++ ++#define kAdslIntlChannel 0 ++#define kAdslFastChannel 1 ++ ++#define kAdslTrellisOff 0 ++#define kAdslTrellisOn 1 ++ ++/* AnnexC modulation and bitmap types for the field (adslConnection.modType) */ ++ ++#define kAdslModMask 0x7 ++ ++#define kAdslModGdmt 0 ++#define kAdslModT1413 1 ++#define kAdslModGlite 2 ++#define kAdslModAnnexI 3 ++#define kAdslModAdsl2 4 ++#define kAdslModAdsl2p 5 ++#define kAdslModReAdsl2 6 ++ ++#define kAdslBitmapShift 3 ++#define kAdslBitmapMask kAdslCfgBitmapMask ++#define kAdslDBM (0 << kAdslBitmapShift) ++#define kAdslFBM (1 << kAdslBitmapShift) ++#define kAdslFBMSoL (2 << kAdslBitmapShift) ++ ++#define kAdslUpstreamModeShift 5 ++#define kAdslUpstreamModeMask (3 << kAdslUpstreamModeShift) ++#define kAdslUpstreamModeSingle (0 << kAdslUpstreamModeShift) ++#define kAdslUpstreamModeDouble (1 << kAdslUpstreamModeShift) ++#define kAdslUpstreamModeTriple (2 << kAdslUpstreamModeShift) ++ ++/* AdslLineCodingType definitions */ ++ ++#define kAdslLineCodingOther 1 ++#define kAdslLineCodingDMT 2 ++#define kAdslLineCodingCAP 3 ++#define kAdslLineCodingQAM 4 ++ ++/* AdslLineType definitions */ ++ ++#define kAdslLineTypeNoChannel 1 ++#define kAdslLineTypeFastOnly 2 ++#define kAdslLineTypeIntlOnly 3 ++#define kAdslLineTypeFastOrIntl 4 ++#define kAdslLineTypeFastAndIntl 5 ++ ++typedef struct _adslLineEntry { ++ unsigned char adslLineCoding; ++ unsigned char adslLineType; ++} adslLineEntry; ++ ++ ++/* AdslPhys status definitions */ ++ ++#define kAdslPhysStatusNoDefect (1 << 0) ++#define kAdslPhysStatusLOF (1 << 1) /* lossOfFraming (not receiving valid frame) */ ++#define kAdslPhysStatusLOS (1 << 2) /* lossOfSignal (not receiving signal) */ ++#define kAdslPhysStatusLPR (1 << 3) /* lossOfPower */ ++#define kAdslPhysStatusLOSQ (1 << 4) /* lossOfSignalQuality */ ++#define kAdslPhysStatusLOM (1 << 5) /* lossOfMargin */ ++ ++typedef struct _adslPhysEntry { ++ long adslCurrSnrMgn; ++ long adslCurrAtn; ++ long adslCurrStatus; ++ long adslCurrOutputPwr; ++ long adslCurrAttainableRate; ++} adslPhysEntry; ++ ++#define kAdslPhysVendorIdLen 8 ++#define kAdslPhysSerialNumLen 32 ++#define kAdslPhysVersionNumLen 32 ++ ++typedef struct _adslFullPhysEntry { ++ char adslSerialNumber[kAdslPhysSerialNumLen]; ++ char adslVendorID[kAdslPhysVendorIdLen]; ++ char adslVersionNumber[kAdslPhysVersionNumLen]; ++ long adslCurrSnrMgn; ++ long adslCurrAtn; ++ long adslCurrStatus; ++ long adslCurrOutputPwr; ++ long adslCurrAttainableRate; ++} adslFullPhysEntry; ++ ++/* Adsl channel entry definitions */ ++ ++typedef struct _adslChanEntry { ++ unsigned long adslChanIntlDelay; ++ unsigned long adslChanCurrTxRate; ++ unsigned long adslChanPrevTxRate; ++ unsigned long adslChanCrcBlockLength; ++} adslChanEntry; ++ ++/* Adsl performance data definitions */ ++ ++typedef struct _adslPerfCounters { ++ unsigned long adslLofs; ++ unsigned long adslLoss; ++ unsigned long adslLols; /* Loss of Link failures (ATUC only) */ ++ unsigned long adslLprs; ++ unsigned long adslESs; /* Count of Errored Seconds */ ++ unsigned long adslInits; /* Count of Line initialization attempts (ATUC only) */ ++ unsigned long adslUAS; /* Count of Unavailable Seconds */ ++ unsigned long adslSES; /* Count of Severely Errored Seconds */ ++ unsigned long adslLOSS; /* Count of LOS seconds */ ++ unsigned long adslFECs; /* Count of FEC seconds */ ++} adslPerfCounters; ++ ++typedef struct _adslPerfDataEntry { ++ adslPerfCounters perfTotal; ++ unsigned long adslPerfValidIntervals; ++ unsigned long adslPerfInvalidIntervals; ++ adslPerfCounters perfCurr15Min; ++ unsigned long adslPerfCurr15MinTimeElapsed; ++ adslPerfCounters perfCurr1Day; ++ unsigned long adslPerfCurr1DayTimeElapsed; ++ adslPerfCounters perfPrev1Day; ++ unsigned long adslAturPerfPrev1DayMoniSecs; ++} adslPerfDataEntry; ++ ++#define kAdslMibPerfIntervals 4 ++ ++/* Adsl channel performance data definitions */ ++ ++typedef struct _adslChanCounters { ++ unsigned long adslChanReceivedBlks; ++ unsigned long adslChanTransmittedBlks; ++ unsigned long adslChanCorrectedBlks; ++ unsigned long adslChanUncorrectBlks; ++} adslChanCounters; ++ ++typedef struct _adslChanPerfDataEntry { ++ adslChanCounters perfTotal; ++ unsigned long adslChanPerfValidIntervals; ++ unsigned long adslChanPerfInvalidIntervals; ++ adslChanCounters perfCurr15Min; ++ unsigned long adslPerfCurr15MinTimeElapsed; ++ adslChanCounters perfCurr1Day; ++ unsigned long adslPerfCurr1DayTimeElapsed; ++ adslChanCounters perfPrev1Day; ++ unsigned long adslAturPerfPrev1DayMoniSecs; ++} adslChanPerfDataEntry; ++ ++#define kAdslMibChanPerfIntervals 4 ++ ++/* Adsl trap threshold definitions */ ++ ++#define kAdslEventLinkChange 0x001 ++#define kAdslEventRateChange 0x002 ++#define kAdslEventLofThresh 0x004 ++#define kAdslEventLosThresh 0x008 ++#define kAdslEventLprThresh 0x010 ++#define kAdslEventESThresh 0x020 ++#define kAdslEventFastUpThresh 0x040 ++#define kAdslEventIntlUpThresh 0x080 ++#define kAdslEventFastDownThresh 0x100 ++#define kAdslEventIntlDwonThresh 0x200 ++ ++typedef struct _adslThreshCounters { ++ unsigned long adslThreshLofs; ++ unsigned long adslThreshLoss; ++ unsigned long adslThreshLols; /* Loss of Link failures (ATUC only) */ ++ unsigned long adslThreshLprs; ++ unsigned long adslThreshESs; ++ unsigned long adslThreshFastRateUp; ++ unsigned long adslThreshIntlRateUp; ++ unsigned long adslThreshFastRateDown; ++ unsigned long adslThreshIntlRateDown; ++} adslThreshCounters; ++ ++ ++/* Atm PHY performance data definitions */ ++ ++#define kAtmPhyStateNoAlarm 1 ++#define kAtmPhyStateLcdFailure 2 ++ ++typedef struct _atmPhyDataEntrty { ++ unsigned long atmInterfaceOCDEvents; ++ unsigned long atmInterfaceTCAlarmState; ++} atmPhyDataEntrty; ++ ++typedef struct _adslBertResults { ++ unsigned long bertTotalBits; ++ unsigned long bertErrBits; ++} adslBertResults; ++ ++typedef struct { ++ unsigned long cntHi; ++ unsigned long cntLo; ++} cnt64; ++ ++typedef struct _adslBertStatusEx { ++ unsigned long bertSecTotal; ++ unsigned long bertSecElapsed; ++ unsigned long bertSecCur; ++ cnt64 bertTotalBits; ++ cnt64 bertErrBits; ++} adslBertStatusEx; ++ ++typedef struct _adslDataConnectionInfo { ++ unsigned short K; ++ unsigned char S, R, D; ++} adslDataConnectionInfo; ++ ++typedef struct _adslConnectionInfo { ++ unsigned char chType; /* fast or interleaved */ ++ unsigned char modType; /* modulation type: G.DMT or T1.413 */ ++ unsigned char trellisCoding; /* off(0) or on(1) */ ++ adslDataConnectionInfo rcvInfo; ++ adslDataConnectionInfo xmtInfo; ++} adslConnectionInfo; ++ ++typedef struct _adsl2DataConnectionInfo { ++ unsigned char Nlp; ++ unsigned char Nbc; ++ unsigned char MSGlp; ++ unsigned short MSGc; ++ ++ unsigned long L; ++ unsigned short M; ++ unsigned short T; ++ unsigned short D; ++ unsigned short R; ++ unsigned short B; ++} adsl2DataConnectionInfo; ++ ++typedef struct _adsl2ConnectionInfo { ++ long adsl2Mode; ++ long rcvRate; ++ long xmtRate; ++ unsigned char pwrState; /* Lx state: x = 0..3 */ ++ adsl2DataConnectionInfo rcv2Info; ++ adsl2DataConnectionInfo xmt2Info; ++} adsl2ConnectionInfo; ++ ++typedef struct _adslConnectionDataStat { ++ unsigned long cntRS; ++ unsigned long cntRSCor; ++ unsigned long cntRSUncor; ++ unsigned long cntSF; ++ unsigned long cntSFErr; ++} adslConnectionDataStat; ++ ++typedef struct _adslConnectionStat { ++ adslConnectionDataStat rcvStat; ++ adslConnectionDataStat xmtStat; ++} adslConnectionStat; ++ ++typedef struct _atmConnectionDataStat { ++ unsigned long cntHEC; ++ unsigned long cntOCD; ++ unsigned long cntLCD; ++ unsigned long cntES; ++ unsigned long cntCellTotal; ++ unsigned long cntCellData; ++ unsigned long cntCellDrop; ++ unsigned long cntBitErrs; ++} atmConnectionDataStat; ++ ++typedef struct _atmConnectionStat { ++ atmConnectionDataStat rcvStat; ++ atmConnectionDataStat xmtStat; ++} atmConnectionStat; ++ ++#define kAdslFramingModeMask 0x0F ++#define kAtmFramingModeMask 0xF0 ++#define kAtmHeaderCompression 0x80 ++ ++/* ADSL2 data */ ++ ++typedef struct _adslDiagModeData { ++ long loopAttn; ++ long signalAttn; ++ long snrMargin; ++ long attnDataRate; ++ long actXmtPower; ++ long hlinScaleFactor; ++} adslDiagModeData; ++ ++/* AdslMibGetObjectValue return codes */ ++ ++#define kAdslMibStatusSuccess 0 ++#define kAdslMibStatusFailure -1 ++#define kAdslMibStatusNoObject -2 ++#define kAdslMibStatusObjectInvalid -3 ++#define kAdslMibStatusBufferTooSmall -4 ++#define kAdslMibStatusLastError -4 ++ ++/* Adsl training codes */ ++ ++#define kAdslTrainingIdle 0 ++#define kAdslTrainingG994 1 ++#define kAdslTrainingG992Started 2 ++#define kAdslTrainingG992ChanAnalysis 3 ++#define kAdslTrainingG992Exchange 4 ++#define kAdslTrainingConnected 5 ++ ++/* Global info structure */ ++ ++typedef struct _adslMibInfo { ++ adslLineEntry adslLine; ++ adslPhysEntry adslPhys; ++ adslChanEntry adslChanIntl; ++ adslChanEntry adslChanFast; ++ adslPerfDataEntry adslPerfData; ++ adslPerfCounters adslPerfIntervals[kAdslMibPerfIntervals]; ++ adslChanPerfDataEntry adslChanIntlPerfData; ++ adslChanPerfDataEntry adslChanFastPerfData; ++ adslChanCounters adslChanIntlPerfIntervals[kAdslMibChanPerfIntervals]; ++ adslChanCounters adslChanFastPerfIntervals[kAdslMibChanPerfIntervals]; ++ ++ adslThreshCounters adslAlarm; ++ ++ atmPhyDataEntrty adslChanIntlAtmPhyData; ++ atmPhyDataEntrty adslChanFastAtmPhyData; ++ ++ adslBertResults adslBertRes; ++ ++ adslConnectionInfo adslConnection; ++ adslConnectionStat adslStat; ++ unsigned char adslTrainingState; ++ atmConnectionStat atmStat; ++ ++ adslFullPhysEntry adslAtucPhys; ++ unsigned char adslRxNonStdFramingAdjustK; ++ unsigned char adslFramingMode; ++ adslBertStatusEx adslBertStatus; ++ long afeRxPgaGainQ1; ++ ++ adslDiagModeData adslDiag; ++ adsl2ConnectionInfo adsl2Info; ++ adslPerfCounters adslTxPerfTotal; ++} adslMibInfo; ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif /* AdslMibDefHeader */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/DiagDef.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/DiagDef.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/DiagDef.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/DiagDef.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,209 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++ ++/******************************************************************* ++ * DiagDef.h ++ * ++ * Description: ++ * Diag definitions ++ * ++ * $Revision: 1.22 $ ++ * ++ * $Id: DiagDef.h,v 1.22 2004/10/16 23:43:19 ilyas Exp $ ++ * ++ * $Log: DiagDef.h,v $ ++ * Revision 1.22 2004/10/16 23:43:19 ilyas ++ * Added playback resume command ++ * ++ * Revision 1.21 2004/10/16 23:24:08 ilyas ++ * Improved FileRead command support for LOG file playback (RecordTest on the board) ++ * ++ * Revision 1.20 2004/04/28 16:52:32 ilyas ++ * Added GDB frame processing ++ * ++ * Revision 1.19 2004/03/10 22:26:53 ilyas ++ * Added command-line parameter for IP port number. ++ * Added proxy remote termination ++ * ++ * Revision 1.18 2004/01/24 23:41:37 ilyas ++ * Added DIAG_DEBUG_CMD_LOG_SAMPLES debug command ++ * ++ * Revision 1.17 2003/11/19 02:25:45 ilyas ++ * Added definitions for LOG frame retransmission, time, ADSL2 plots ++ * ++ * Revision 1.16 2003/11/14 18:46:05 ilyas ++ * Added G992p3 debug commands ++ * ++ * Revision 1.15 2003/10/02 19:50:41 ilyas ++ * Added support for buffering data for AnnexI and statistical counters ++ * ++ * Revision 1.14 2003/09/03 19:45:11 ilyas ++ * To refuse connection with older protocol versions ++ * ++ * Revision 1.13 2003/08/30 00:12:39 ilyas ++ * Added support for running chip test regressions via DslDiags ++ * ++ * Revision 1.12 2003/08/12 00:19:28 ilyas ++ * Improved image downloading protocol. ++ * Added DEBUG command support ++ * ++ * Revision 1.11 2003/04/11 00:37:24 ilyas ++ * Added DiagProtoFrame definition ++ * ++ * Revision 1.10 2003/03/25 00:10:07 ilyas ++ * Added command for "long" BERT test ++ * ++ * Revision 1.9 2003/01/30 03:29:32 ilyas ++ * Added PHY_CFG support and fixed printing showtime counters ++ * ++ * Revision 1.8 2002/12/16 20:56:38 ilyas ++ * Added support for binary statuses ++ * ++ * Revision 1.7 2002/12/06 20:19:13 ilyas ++ * Added support for binary statuses and scrambled status strings ++ * ++ * Revision 1.6 2002/11/05 00:18:27 ilyas ++ * Added configuration dialog box for Eye tone selection. ++ * Added Centillium CRC workaround to AnnexC config dialog ++ * Bit allocation update on bit swap messages ++ * ++ * Revision 1.5 2002/07/30 23:23:43 ilyas ++ * Implemented DIAG configuration command for AnnexA and AnnexC ++ * ++ * Revision 1.4 2002/07/30 22:47:15 ilyas ++ * Added DIAG command for configuration ++ * ++ * Revision 1.3 2002/07/15 23:52:51 ilyas ++ * iAdded switch RJ11 pair command ++ * ++ * Revision 1.2 2002/04/25 17:55:51 ilyas ++ * Added mibGet command ++ * ++ * Revision 1.1 2002/04/02 22:56:39 ilyas ++ * Support DIAG connection at any time; BERT commands ++ * ++ * ++ ******************************************************************/ ++ ++#define LOG_PROTO_ID "*L" ++ ++#define DIAG_PARTY_ID_MASK 0x01 ++#define LOG_PARTY_CLIENT 0x01 ++#define LOG_PARTY_SERVER 0x00 ++ ++#define DIAG_DATA_MASK 0x0E ++#define DIAG_DATA_LOG 0x02 ++#define DIAG_DATA_EYE 0x04 ++#define DIAG_DATA_LOG_TIME 0x08 ++ ++#define DIAG_DATA_EX 0x80 ++#define DIAG_PARTY_ID_MASK_EX (DIAG_DATA_EX | DIAG_PARTY_ID_MASK) ++#define LOG_PARTY_SERVER_EX (DIAG_DATA_EX | LOG_PARTY_SERVER) ++ ++#define DIAG_ACK_FRAME_ACK_MASK 0x000000FF ++#define DIAG_ACK_FRAME_RCV_SHIFT 8 ++#define DIAG_ACK_FRAME_RCV_MASK 0x0000FF00 ++#define DIAG_ACK_FRAME_RCV_PRESENT 0x00010000 ++#define DIAG_ACK_TIMEOUT -1 ++#define DIAG_ACK_LEN_INDICATION -1 ++ ++#define LOG_CMD_GDB 236 ++#define LOG_CMD_PROXY 237 ++#define LOG_CMD_RETR 238 ++#define LOG_CMD_DEBUG 239 ++#define LOG_CMD_BERT_EX 240 ++#define LOG_CMD_CFG_PHY 241 ++#define LOG_CMD_RESET 242 ++#define LOG_CMD_SCRAMBLED_STRING 243 ++#define LOG_CMD_EYE_CFG 244 ++#define LOG_CMD_CONFIG_A 245 ++#define LOG_CMD_CONFIG_C 246 ++#define LOG_CMD_SWITCH_RJ11_PAIR 247 ++#define LOG_CMD_MIB_GET 248 ++#define LOG_CMD_LOG_STOP 249 ++#define LOG_CMD_PING_REQ 250 ++#define LOG_CMD_PING_RSP 251 ++#define LOG_CMD_DISCONNECT 252 ++#define LOG_CMD_STRING_DATA 253 ++#define LOG_CMD_TEST_DATA 254 ++#define LOG_CMD_CONNECT 255 ++ ++typedef struct _LogProtoHeader { ++ unsigned char logProtoId[2]; ++ unsigned char logPartyId; ++ unsigned char logCommmand; ++} LogProtoHeader; ++ ++#define LOG_FILE_PORT 5100 ++#define LOG_MAX_BUF_SIZE 1400 ++#define LOG_MAX_DATA_SIZE (LOG_MAX_BUF_SIZE - sizeof(LogProtoHeader)) ++ ++typedef struct { ++ LogProtoHeader diagHdr; ++ unsigned char diagData[LOG_MAX_DATA_SIZE]; ++} DiagProtoFrame; ++ ++#define DIAG_PROXY_TERMINATE 1 ++ ++#define DIAG_DEBUG_CMD_READ_MEM 1 ++#define DIAG_DEBUG_CMD_SET_MEM 2 ++#define DIAG_DEBUG_CMD_RESET_CONNECTION 3 ++#define DIAG_DEBUG_CMD_RESET_PHY 4 ++#define DIAG_DEBUG_CMD_RESET_CHIP 5 ++#define DIAG_DEBUG_CMD_EXEC_FUNC 6 ++#define DIAG_DEBUG_CMD_EXEC_ADSL_FUNC 7 ++#define DIAG_DEBUG_CMD_WRITE_FILE 8 ++#define DIAG_DEBUG_CMD_G992P3_DEBUG 9 ++#define DIAG_DEBUG_CMD_G992P3_DIAG_MODE 10 ++#define DIAG_DEBUG_CMD_CLEAR_TIME 11 ++#define DIAG_DEBUG_CMD_PRINT_TIME 12 ++#define DIAG_DEBUG_CMD_LOG_SAMPLES 13 ++ ++#define DIAG_DEBUG_CMD_PLAYBACK_STOP 14 ++#define DIAG_DEBUG_CMD_PLAYBACK_RESUME 15 ++ ++#define DIAG_DEBUG_CMD_PRINT_STAT 21 ++#define DIAG_DEBUG_CMD_CLEAR_STAT 22 ++ ++typedef struct { ++ unsigned short cmd; ++ unsigned short cmdId; ++ unsigned long param1; ++ unsigned long param2; ++ unsigned char diagData[1]; ++} DiagDebugData; ++ ++#define DIAG_TEST_CMD_LOAD 101 ++#define DIAG_TEST_CMD_READ 102 ++#define DIAG_TEST_CMD_WRITE 103 ++#define DIAG_TEST_CMD_APPEND 104 ++#define DIAG_TEST_CMD_TEST_COMPLETE 105 ++ ++#define DIAG_TEST_FILENAME_LEN 64 ++ ++typedef struct { ++ unsigned short cmd; ++ unsigned short cmdId; ++ unsigned long offset; ++ unsigned long len; ++ unsigned long bufPtr; ++ char fileName[DIAG_TEST_FILENAME_LEN]; ++} DiagTestData; ++ ++typedef struct { ++ unsigned long frStart; ++ unsigned long frNum; ++} DiagLogRetrData; +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/adsldrv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/adsldrv.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/adsldrv.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/adsldrv.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,203 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/*************************************************************************** ++ * File Name : AdslDrv.h ++ * ++ * Description: This file contains the definitions and structures for the ++ * Linux IOCTL interface that used between the user mode ADSL ++ * API library and the kernel ADSL API driver. ++ * ++ * Updates : 11/02/2001 lkaplan. Created. ++ ***************************************************************************/ ++ ++#if !defined(_ADSLDRV_H_) ++#define _ADSLDRV_H_ ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++/* Incldes. */ ++#include <bcmadsl.h> ++ ++/* Defines. */ ++#define DSL_IFNAME "dsl0" ++#define ADSLDRV_MAJOR 208 /* arbitrary unused value */ ++ ++#define ADSLIOCTL_CHECK \ ++ _IOR(ADSLDRV_MAJOR, 0, ADSLDRV_STATUS_ONLY) ++#define ADSLIOCTL_INITIALIZE \ ++ _IOWR(ADSLDRV_MAJOR, 1, ADSLDRV_INITIALIZE) ++#define ADSLIOCTL_UNINITIALIZE \ ++ _IOR(ADSLDRV_MAJOR, 2, ADSLDRV_STATUS_ONLY) ++#define ADSLIOCTL_CONNECTION_START \ ++ _IOWR(ADSLDRV_MAJOR, 3, ADSLDRV_STATUS_ONLY) ++#define ADSLIOCTL_CONNECTION_STOP \ ++ _IOR(ADSLDRV_MAJOR, 4, ADSLDRV_STATUS_ONLY) ++#define ADSLIOCTL_GET_PHY_ADDR \ ++ _IOR(ADSLDRV_MAJOR, 5, ADSLDRV_PHY_ADDR) ++#define ADSLIOCTL_SET_PHY_ADDR \ ++ _IOWR(ADSLDRV_MAJOR, 6, ADSLDRV_PHY_ADDR) ++#define ADSLIOCTL_MAP_ATM_PORT_IDS \ ++ _IOWR(ADSLDRV_MAJOR, 7, ADSLDRV_MAP_ATM_PORT) ++#define ADSLIOCTL_GET_CONNECTION_INFO \ ++ _IOR(ADSLDRV_MAJOR, 8, ADSLDRV_CONNECTION_INFO) ++#define ADSLIOCTL_DIAG_COMMAND \ ++ _IOR(ADSLDRV_MAJOR, 9, ADSLDRV_DIAG) ++#define ADSLIOCTL_GET_OBJ_VALUE \ ++ _IOR(ADSLDRV_MAJOR, 10, ADSLDRV_GET_OBJ) ++#define ADSLIOCTL_START_BERT \ ++ _IOR(ADSLDRV_MAJOR, 11, ADSLDRV_BERT) ++#define ADSLIOCTL_STOP_BERT \ ++ _IOR(ADSLDRV_MAJOR, 12, ADSLDRV_STATUS_ONLY) ++#define ADSLIOCTL_CONFIGURE \ ++ _IOR(ADSLDRV_MAJOR, 13, ADSLDRV_CONFIGURE) ++#define ADSLIOCTL_TEST \ ++ _IOR(ADSLDRV_MAJOR, 14, ADSLDRV_TEST) ++#define ADSLIOCTL_GET_CONSTEL_POINTS \ ++ _IOR(ADSLDRV_MAJOR, 15, ADSLDRV_GET_CONSTEL_POINTS) ++#define ADSLIOCTL_GET_VERSION \ ++ _IOR(ADSLDRV_MAJOR, 16, ADSLDRV_GET_VERSION) ++#define ADSLIOCTL_SET_SDRAM_BASE \ ++ _IOR(ADSLDRV_MAJOR, 17, ADSLDRV_SET_SDRAM_BASE) ++#define ADSLIOCTL_RESET_STAT_COUNTERS \ ++ _IOR(ADSLDRV_MAJOR, 18, ADSLDRV_STATUS_ONLY) ++#define ADSLIOCTL_SET_OEM_PARAM \ ++ _IOR(ADSLDRV_MAJOR, 19, ADSLDRV_SET_OEM_PARAM) ++#define ADSLIOCTL_START_BERT_EX \ ++ _IOR(ADSLDRV_MAJOR, 20, ADSLDRV_BERT_EX) ++#define ADSLIOCTL_STOP_BERT_EX \ ++ _IOR(ADSLDRV_MAJOR, 21, ADSLDRV_STATUS_ONLY) ++ ++#define MAX_ADSLDRV_IOCTL_COMMANDS 22 ++ ++/* Typedefs. */ ++typedef struct ++{ ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_STATUS_ONLY, *PADSLDRV_STATUS_ONLY; ++ ++typedef struct ++{ ++ ADSL_FN_NOTIFY_CB pFnNotifyCb; ++ UINT32 ulParm; ++ adslCfgProfile *pAdslCfg; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_INITIALIZE, *PADSLDRV_INITIALIZE; ++ ++typedef struct ++{ ++ ADSL_CHANNEL_ADDR ChannelAddr; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_PHY_ADDR, *PADSLDRV_PHY_ADDR; ++ ++typedef struct ++{ ++ UINT16 usAtmFastPortId; ++ UINT16 usAtmInterleavedPortId; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_MAP_ATM_PORT, *PADSLDRV_MAP_ATM_PORT; ++ ++typedef struct ++{ ++ ADSL_CONNECTION_INFO ConnectionInfo; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_CONNECTION_INFO, *PADSLDRV_CONNECTION_INFO; ++ ++typedef struct ++{ ++ int diagCmd; ++ int diagMap; ++ int logTime; ++ int srvIpAddr; ++ int gwIpAddr; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_DIAG, *PADSLDRV_DIAG; ++ ++typedef struct ++{ ++ char *objId; ++ int objIdLen; ++ char *dataBuf; ++ long dataBufLen; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_GET_OBJ, *PADSLDRV_GET_OBJ; ++ ++typedef struct ++{ ++ unsigned long totalBits; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_BERT, *PADSLDRV_BERT; ++ ++typedef struct ++{ ++ unsigned long totalSec; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_BERT_EX, *PADSLDRV_BERT_EX; ++ ++typedef struct ++{ ++ adslCfgProfile *pAdslCfg; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_CONFIGURE, *PADSLDRV_CONFIGURE; ++ ++typedef struct ++{ ++ unsigned long testCmd; ++ unsigned long xmtStartTone; ++ unsigned long xmtNumTones; ++ unsigned long rcvStartTone; ++ unsigned long rcvNumTones; ++ char *xmtToneMap; ++ char *rcvToneMap; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_TEST, *PADSLDRV_TEST; ++ ++typedef struct ++{ ++ int toneId; ++ ADSL_CONSTELLATION_POINT *pointBuf; ++ int numPoints; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_GET_CONSTEL_POINTS, *PADSLDRV_GET_CONSTEL_POINTS; ++ ++typedef struct ++{ ++ adslVersionInfo *pAdslVer; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_GET_VERSION, *PADSLDRV_GET_VERSION; ++ ++typedef struct ++{ ++ unsigned long sdramBaseAddr; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_SET_SDRAM_BASE, *PADSLDRV_SET_SDRAM_BASE; ++ ++ ++typedef struct ++{ ++ int paramId; ++ void *buf; ++ int len; ++ BCMADSL_STATUS bvStatus; ++} ADSLDRV_SET_OEM_PARAM, *PADSLDRV_SET_OEM_PARAM; ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif // _ADSLDRV_H_ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmapidrv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmapidrv.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmapidrv.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmapidrv.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,212 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++/*************************************************************************** ++ * File Name : AtmApiDrv.h ++ * ++ * Description: This file contains the definitions and structures for the ++ * Linux IOCTL interface that used between the user mode ATM ++ * API library and the kernel ATM API driver. ++ * ++ * Updates : 09/15/2000 lat. Created. ++ ***************************************************************************/ ++ ++#if !defined(_ATMAPIDRV_H_) ++#define _ATMAPIDRV_H_ ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++/* Incldes. */ ++#include <bcmatmapi.h> ++ ++/* Defines. */ ++#define ATMDRV_MAJOR 205 /* arbitrary unused value */ ++ ++#define ATMIOCTL_INITIALIZE \ ++ _IOWR(ATMDRV_MAJOR, 0, ATMDRV_INITIALIZE) ++#define ATMIOCTL_UNINITIALIZE \ ++ _IOR(ATMDRV_MAJOR, 1, ATMDRV_STATUS_ONLY) ++#define ATMIOCTL_GET_INTERFACE_ID \ ++ _IOWR(ATMDRV_MAJOR, 2, ATMDRV_INTERFACE_ID) ++#define ATMIOCTL_GET_TRAFFIC_DESCR_TABLE_SIZE \ ++ _IOR(ATMDRV_MAJOR, 3, ATMDRV_TRAFFIC_DESCR_TABLE_SIZE) ++#define ATMIOCTL_GET_TRAFFIC_DESCR_TABLE \ ++ _IOWR(ATMDRV_MAJOR, 4, ATMDRV_TRAFFIC_DESCR_TABLE) ++#define ATMIOCTL_SET_TRAFFIC_DESCR_TABLE \ ++ _IOWR(ATMDRV_MAJOR, 5, ATMDRV_TRAFFIC_DESCR_TABLE) ++#define ATMIOCTL_GET_INTERFACE_CFG \ ++ _IOWR(ATMDRV_MAJOR, 6, ATMDRV_INTERFACE_CFG) ++#define ATMIOCTL_SET_INTERFACE_CFG \ ++ _IOWR(ATMDRV_MAJOR, 7, ATMDRV_INTERFACE_CFG) ++#define ATMIOCTL_GET_VCC_CFG \ ++ _IOWR(ATMDRV_MAJOR, 8, ATMDRV_VCC_CFG) ++#define ATMIOCTL_SET_VCC_CFG \ ++ _IOWR(ATMDRV_MAJOR, 9, ATMDRV_VCC_CFG) ++#define ATMIOCTL_GET_VCC_ADDRS \ ++ _IOWR(ATMDRV_MAJOR, 10, ATMDRV_VCC_ADDRS) ++#define ATMIOCTL_GET_INTERFACE_STATISTICS \ ++ _IOWR(ATMDRV_MAJOR, 11, ATMDRV_INTERFACE_STATISTICS) ++#define ATMIOCTL_GET_VCC_STATISTICS \ ++ _IOWR(ATMDRV_MAJOR, 12, ATMDRV_VCC_STATISTICS) ++#define ATMIOCTL_SET_INTERFACE_LINK_INFO \ ++ _IOWR(ATMDRV_MAJOR, 13, ATMDRV_INTERFACE_LINK_INFO) ++#define ATMIOCTL_TEST \ ++ _IOWR(ATMDRV_MAJOR, 14, ATMDRV_TEST) ++#define ATMIOCTL_OAM_LOOPBACK_TEST \ ++ _IOWR(ATMDRV_MAJOR, 15, ATMDRV_OAM_LOOPBACK) ++ ++ ++#define MAX_ATMDRV_IOCTL_COMMANDS 16 ++ ++/* Typedefs. */ ++typedef struct ++{ ++ BCMATM_STATUS baStatus; ++} ATMDRV_STATUS_ONLY, *PATMDRV_STATUS_ONLY; ++ ++typedef struct ++{ PATM_INITIALIZATION_PARMS pInit; ++ BCMATM_STATUS baStatus; ++} ATMDRV_INITIALIZE, *PATMDRV_INITIALIZE; ++ ++typedef struct ++{ ++ UINT8 ucPhyPort; ++ UINT8 ucReserved[3]; ++ UINT32 ulInterfaceId; ++ BCMATM_STATUS baStatus; ++} ATMDRV_INTERFACE_ID, *PATMDRV_INTERFACE_ID; ++ ++typedef struct ++{ ++ UINT32 ulTrafficDescrTableSize; ++ BCMATM_STATUS baStatus; ++} ATMDRV_TRAFFIC_DESCR_TABLE_SIZE, *PATMDRV_TRAFFIC_DESCR_TABLE_SIZE; ++ ++typedef struct ++{ ++ PATM_TRAFFIC_DESCR_PARM_ENTRY pTrafficDescrTable; ++ UINT32 ulTrafficDescrTableSize; ++ BCMATM_STATUS baStatus; ++} ATMDRV_TRAFFIC_DESCR_TABLE, *PATMDRV_TRAFFIC_DESCR_TABLE; ++ ++typedef struct ++{ ++ UINT32 ulInterfaceId; ++ PATM_INTERFACE_CFG pInterfaceCfg; ++ BCMATM_STATUS baStatus; ++} ATMDRV_INTERFACE_CFG, *PATMDRV_INTERFACE_CFG; ++ ++typedef struct ++{ ++ ATM_VCC_ADDR VccAddr; ++ PATM_VCC_CFG pVccCfg; ++ BCMATM_STATUS baStatus; ++} ATMDRV_VCC_CFG, *PATMDRV_VCC_CFG; ++ ++typedef struct ++{ ++ UINT32 ulInterfaceId; ++ PATM_VCC_ADDR pVccAddrs; ++ UINT32 ulNumVccs; ++ UINT32 ulNumReturned; ++ BCMATM_STATUS baStatus; ++} ATMDRV_VCC_ADDRS, *PATMDRV_VCC_ADDRS; ++ ++typedef struct ++{ ++ UINT32 ulInterfaceId; ++ PATM_INTERFACE_STATS pStatistics; ++ UINT32 ulReset; ++ BCMATM_STATUS baStatus; ++} ATMDRV_INTERFACE_STATISTICS, *PATMDRV_INTERFACE_STATISTICS; ++ ++typedef struct ++{ ++ ATM_VCC_ADDR VccAddr; ++ PATM_VCC_STATS pVccStatistics; ++ UINT32 ulReset; ++ BCMATM_STATUS baStatus; ++} ATMDRV_VCC_STATISTICS, *PATMDRV_VCC_STATISTICS; ++ ++typedef struct ++{ ++ UINT32 ulInterfaceId; ++ ATM_INTERFACE_LINK_INFO InterfaceCfg; ++ BCMATM_STATUS baStatus; ++} ATMDRV_INTERFACE_LINK_INFO, *PATMDRV_INTERFACE_LINK_INFO; ++ ++typedef struct ++{ ++ ATM_VCC_ADDR VccAddr; ++ UINT32 ulNumToSend; ++ BCMATM_STATUS baStatus; ++} ATMDRV_TEST, *PATMDRV_TEST; ++ ++typedef struct ++{ ++ ATM_VCC_ADDR VccAddr; ++ UINT32 type; ++ BCMATM_STATUS baStatus; ++} ATMDRV_OAM_LOOPBACK, *PATMDRV_OAM_LOOPBACK; ++ ++#define OAM_TYPE_FUNCTION_BYTE_OFFSET 0 ++#define OAM_LB_INDICATION_BYTE_OFFSET 1 ++#define OAM_LB_CORRELATION_TAG_BYTE_OFFSET 2 ++#define OAM_LB_LOCATION_ID_BYTE_OFFSET 6 ++#define OAM_LB_SRC_ID_BYTE_OFFSET 22 ++#define OAM_LB_UNUSED_BYTE_OFFSET 38 ++#define OAM_RDI_UNUSED_BYTE_OFFSET 1 ++#define OAM_LB_CRC_BYTE_OFFSET 46 ++#define OAM_RDI_CRC_BYTE_OFFSET 46 ++#define OAM_LB_CORRELATION_TAG_LEN 4 ++#define OAM_LB_LOCATION_ID_LEN 16 ++#define OAM_LB_SRC_ID_LEN 16 ++#define OAM_LB_UNUSED_BYTE_LEN 8 ++#define OAM_RDI_UNUSED_BYTE_LEN 45 ++#define OAM_LB_CRC_BYTE_LEN 2 ++#define OAM_RDI_CRC_BYTE_LEN 2 ++#define OAM_FAULT_MANAGEMENT_LB 0x18 ++#define OAM_FAULT_MANAGEMENT_RDI 0x11 ++#define OAM_FAULT_MANAGEMENT_LB_REQUEST 1 ++#define OAM_FAULT_MANAGEMENT_LB_RESPOND 0 ++#define OAM_FAULT_MANAGEMENT_CORRELATION_VAL 0xbcbcbcbc ++#define OAM_FAULT_MANAGEMENT_SRC_ID_3 0xffffffff ++#define OAM_FAULT_MANAGEMENT_SRC_ID_2 0xffffffff ++#define OAM_FAULT_MANAGEMENT_SRC_ID_1 0xffffffff ++#define OAM_FAULT_MANAGEMENT_SRC_ID_0 0xffffffff ++#define OAM_FAULT_MANAGEMENT_LOCATION_ID_3 0xffffffff ++#define OAM_FAULT_MANAGEMENT_LOCATION_ID_2 0xffffffff ++#define OAM_FAULT_MANAGEMENT_LOCATION_ID_1 0xffffffff ++#define OAM_FAULT_MANAGEMENT_LOCATION_ID_0 0xffffffff ++#define OAM_LB_UNUSED_BYTE_DEFAULT 0x6a ++#define OAM_LB_SEGMENT_TYPE 0 ++#define OAM_LB_END_TO_END_TYPE 1 ++#define OAM_F4_LB_SEGMENT_TYPE 2 ++#define OAM_F4_LB_END_TO_END_TYPE 3 ++#define RM_PROT_ID_OFFSET 0 ++#define RM_MESSAGE_TYPE_OFFSET 1 ++#define RM_PROTOCOL_ID 1 ++#define RM_TYPE_DEFAULT 0x20 /* forward/source_generated/congested */ ++#define RM_UNUSED_BYTES_OFFSET 2 ++#define RM_UNUSED_BYTES_LEN 46 ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif // _ATMAPIDRV_H_ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmdiag.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmdiag.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmdiag.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmdiag.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,764 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++ ++#ifndef __ATMDIAG_H__ ++#define __ATMDIAG_H__ ++ ++//#define BRCM_6348 ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++#define ATM_DIAG_FAIL -1 ++#define ATM_DIAG_PASS 0 ++#define ATM_REGADDR 0xFFFE4000 ++#define ATM_REGSIZE 0x800 ++#define ATM_TX_VPI_VCI_CAM_OFFSET 0x500 ++#define ATM_RX_VPI_VCI_CAM_OFFSET 0x600 ++#define ATM_TRAFFIC_SHAPER_OFFSET 0x700 ++#define ATM_TX_STATUS_OFFSET 0x40c ++#define ATM_RX_STATUS_OFFSET 0x41c ++#define ATM_RX_AAL_STATUS_OFFSET 0x428 ++#define ATM_MIP_COUNTERS_OFFSET 0x440 ++#define ATM_UTOPIA_SETTING_OFFSET 0x42c ++#define ATM_ADSL_PHY_PORT_SETTING 0x15c ++#define UT_MAX_TDT_ENTRIES 2 ++#define UT_MAX_MGMT_ENTRIES 4 ++#define UT_LINE_RATE (146200000) /* 344811 cells/sec, CIT = 29ns */ ++#define UT_CELL_RATE (53 * 8) ++#define UT_MIN_PCR_SCR 310 /* ~128Kbps */ ++#define UT_MAX_PCR_SCR 344811 /* ~146.2Kpbs */ ++#define UT_MIN_MBS 2 ++#define UT_MAX_MBS 200000 ++ //#ifdef BRCM_6348 currently, the driver only support 8 VCCS ++ //#define UT_MAX_VCCS 16 ++ //#else ++#define UT_MAX_VCCS 8 ++ //#endif ++#define UT_MAX_PHY_PORTS 2 ++#define UT_BASE_PORT_NUMBER 1 ++#define UT_MIN_QUEUE 1 ++#define UT_MAX_QUEUE UT_MAX_VCCS ++#define UT_MULTI_QUEUE 1 ++#define UT_SINGLE_QUEUE 0 ++#define UT_MIN_PRIORITY 1 ++#define UT_MAX_PRIORITY 4 /* priority ranging from 1-4 */ ++#define UT_BUFFER_SIZE 20 ++#define UT_MGMT_IDX 6 ++#define UT_ENABLED 1 ++#define UT_DISABLED 0 ++#define UT_MAX_TD_INDEX UT_MAX_VCCS ++#define UT_SSTED_TRAILER_SIZE 8 ++#define UT_DIALED_DIGITS 2 ++#define UT_FREE_CELL_Q_SIZE 800 ++#define UT_FREE_PKT_Q_SIZE 800 ++#define UT_FREE_PKT_Q_BUF_SIZE 1600 ++#define UT_RX_PKT_Q_SIZE 800 ++#define UT_RX_CELL_Q_SIZE 800 ++#define UT_AAL5_MAX_SDU_LENGTH 65535 ++#define UT_TX_FIFO_PRIORITY 4 ++#define UT_MIN_DATA_LEN 48 ++#define UT_MAX_DATA_LEN 1500 ++#define UT_BASE_VPI_NUMBER 0 ++#define UT_MAX_VPI_NUMBER 256 ++#define UT_BASE_VCI_NUMBER 32 ++#define UT_MAX_VCI_NUMBER 65536 ++#define UT_UTOPIA_MODE 1 ++#define UT_ADSL_MODE 0 ++#define UT_UTOPIA_ADSL_MODE 0x11 /* utopia port 0, adsl port 1 */ ++#define UT_TOGGLE_DISPLAY_MODE 1 ++#define UT_TOGGLE_CAPTURE_MODE 0 ++#define UT_TOGGLE_VERIFICATION_MODE 2 ++#define UT_TOGGLE_MODE_ON 1 ++#define UT_TOGGLE_MODE_OFF 0 ++#define UT_DUMP_TX_VPI_VCI_TABLE 1 ++#define UT_DUMP_RX_VPI_VCI_TABLE 2 ++#define UT_DISPLAY_STATS 1 ++#define UT_CLEAR_STATS 2 ++#define UT_TRAFFIC_DESCRIPTOR_DISPLAY 1 ++#define UT_TRAFFIC_DESCRIPTOR_MODIFY 2 ++#define UT_PORT_UTOPIA_SETTING 1 ++#define UT_GLOBAL_UTOPIA_SETTING 2 ++#define UT_DISPLAY_CAPTURED 0 ++#define UT_ERASE_CAPTURED 1 ++#define UT_CAPTURED_ERROR_STATS 2 ++#define UT_PATTERN_INCREMENT 1 ++#define UT_PATTERN_FIX 0 ++#define UT_MODIFY_OPERATION 1 ++#define UT_DISPLAY_OPERATION 0 ++#define DIAG_ATM_MODULE "bcmatmtest" ++#define DIAG_ATM_PROC "/proc/atmtest" ++ ++/* command is made up of 2_bytes_command|2_bytes_index */ ++/* index is ranging from 0-7 for 8 VCs */ ++#define UT_PROC_CMD_ADD_VC 1 ++#define UT_PROC_CMD_DELETE_VC 2 ++#define UT_PROC_CMD_START_SEND_VC 3 ++#define UT_PROC_CMD_SEND_MULTI_VC 4 ++#define UT_PROC_CMD_STOP_SEND_VC 5 ++#define UT_PROC_CMD_CAPTURE 6 ++#define UT_PROC_CMD_TOGGLE 7 ++#define UT_PROC_CMD_GET_STATS 8 ++#define UT_PROC_CMD_CLEAR_STATS 9 ++#define UT_PROC_CMD_SEND_MULTI_PRIORITY 10 ++#define UT_PROC_CMD_MODIFY_TRAFFIC_SHAPER 11 ++#define UT_PROC_CMD_START_SEND_ALL_VC 12 ++#define UT_PROC_CMD_ADSL_LOOPBACK 13 ++#define UT_PROC_CMD_SEND_MANAGEMENT 14 ++#define UT_PROC_CMD_ADD_MPVC 15 ++#define UT_PROC_CMD_DELETE_MPVC 16 ++#define UT_PROC_CMD_START_SEND_MPVC 17 ++#define UT_PROC_CMD_UTOPIA_SET 18 ++ ++#define UT_OAM_LB_END_TO_END 10 /* was 1 */ ++#define UT_OAM_LB_SEGMENT 11 /* was 2 */ ++#define UT_OAM_RDI_END_TO_END 3 ++#define UT_OAM_RDI_SEGMENT 4 ++#define UT_VPC_RM_TYPE 5 ++#define UT_VCC_RM_TYPE 6 ++#define UT_OAM_CRC10_SOFTWARE 0 ++#define UT_OAM_CRC10_HARDWARE 1 ++#define UT_TOGGLE_DISPLAY 0 ++#define UT_TOGGLE_CAPTURE 1 ++#define UT_TOGGLE_VERIFY 2 ++ ++#define AP_REG_OFFSET_END 0x7ff ++#define AP_INDIRECT_RAM_ADDRESS_REG ATM_PROCESSOR_BASE + 0x7c0 ++#define AP_INDIRECT_RAM_REG ATM_PROCESSOR_BASE + 0x7c4 ++#define AP_IRQ_MASK AP_INTR_REGS_BASE+0x4 ++#define AP_IRQ_STATUS AP_INTR_REGS_BASE ++#define AP_ROUTE_OAM_TO_RCQ 0 ++#define AP_ROUTE_OAM_TO_MCF 1 ++#define AP_IR_ASSERT 1 ++#define AP_IR_DEASSERT 0 ++#define AP_RX_STATUS_ERR_MASK 0x32ecc /* mask out idleCell, vc & unused */ ++#define AP_RX_AAL_STATUS_ERR_MASK 0x3008 /* only look at rx router stats, discard */ ++ ++typedef struct utVccCfg { ++ UINT8 ulAalType; ++ UINT8 ulAtmVccCpcsAcceptCorruptedPdus; ++}UT_VCC_CFG, *pUT_VCC_CFG; ++ ++typedef struct utTrafficDescrParmEntry { ++ UINT32 ulTrafficDescrIndex; ++ UINT32 ulTrafficDescrType; ++ UINT32 ulTrafficDescrParm1; ++ UINT32 ulTrafficDescrParm2; ++ UINT32 ulTrafficDescrParm3; ++ UINT32 ulTrafficDescrParm4; ++ UINT32 ulTrafficDescrParm5; ++ UINT32 ulTrafficDescrRowStatus; ++ UINT32 ulServiceCategory; ++}UT_TRAFFIC_DESCR_PARM_ENTRY,*pUT_TRAFFIC_DESCR_PARM_ENTRY; ++ ++typedef struct utMultiSendInfo { ++ UINT32 len; ++ UINT8 pattern; ++ UINT8 dataByte; ++ UINT32 numSent; ++ UINT32 rate; ++ UINT8 circuitType; ++ UINT32 cellsPerPdu; ++ UINT32 delay; ++ UINT32 txCount; ++}UT_MULTISEND_INFO, *pUT_MULTISEND_INFO; ++ ++typedef struct utUserSendInfo { ++ UINT32 len; ++ UINT8 incremental; ++ UINT8 dataByte; ++ UINT32 rate; ++ UINT32 aalType; ++ UINT32 delay; ++ UINT32 txCount; /* number of cells/pkt user want to send */ ++ UINT8 multiQPriority; ++ UINT8 basePriority; ++ UINT8 numOfQueues; ++}UT_USER_SEND_INFO, *pUT_USER_SEND_INFO; ++ ++typedef struct utVccAddrInfo { ++ ATM_VCC_ADDR vccAddr; ++ UINT8 priority; /* priority of the queue of this VCC */ ++ UINT8 numOfQueues; ++}UT_VCC_ADDR_INFO, *pUT_VCC_ADDR_INFO; ++ ++typedef struct utVccListInfo { ++ UINT32 handle; ++ UINT32 managementHandle; ++}UT_VCC_LIST_INFO, *pUT_VCC_LIST_INFO; ++ ++typedef struct atmCaptureHdr { ++ UINT8 valid; ++ UINT8 vpi; ++ UINT16 vci; ++ UINT8 circuitType; ++ UINT8 cid; ++ UINT8 uuData8; ++ UINT8 uuData5; ++ UINT8 ucFlags; ++ UINT32 dataLen; ++ UINT8 *dataPtr; ++ UINT8 interface; ++} ATM_CAPTURE_HDR, *pATM_CAPTURE_HDR; ++ ++typedef struct atmTxBufferHdr { ++ ATM_VCC_DATA_PARMS dataParms; ++ struct atmTxBufferHdr *next; ++} ATM_TX_BUFFER_HDR, *pATM_TX_BUFFER_HDR; ++ ++typedef struct tx_buffer_list{ ++ pATM_TX_BUFFER_HDR headPtr; ++ pATM_TX_BUFFER_HDR tailPtr; ++ UINT32 len; ++ UINT32 seqNumber; ++ UINT32 lastSent; ++ UINT32 sentInterval; ++ UINT32 cellsPerPdu; ++} ATM_TX_BUFFER_LIST, *pATM_TX_BUFFER_LIST; ++ ++typedef struct atmTestError { ++ UINT32 total; ++ UINT32 data_err; ++ UINT32 data_length; ++ UINT32 sequence_err; ++ UINT32 aalCrcError; ++ UINT32 aalCpcsLen0; ++ UINT32 aalLenError; ++ UINT32 aalSduLenError; ++ UINT32 gfc; ++ UINT32 crc; ++ UINT32 pti; ++ UINT32 pmi_2sml; ++ UINT32 pmi_2big; ++ UINT32 vcam_mme; ++ UINT32 pne; ++ UINT32 came_1; ++ UINT32 came_0; ++ UINT32 dc_1; ++ UINT32 dc_0; ++ UINT32 ec_1; ++ UINT32 ec_0; ++ UINT32 aal5_drop_cell; ++ UINT32 routerDiscard_1; ++ UINT32 routerDiscard_0; ++ UINT32 camLkup; ++ UINT32 idle; ++ UINT32 hec; ++} ATM_TEST_ERROR, *pATM_TEST_ERROR; ++ ++typedef struct atmMibStats { ++ UINT32 tx_aal5_0; ++ UINT32 tx_aal5_1; ++ UINT32 tx_aal0_0; ++ UINT32 tx_aal0_1; ++ UINT32 rx_aal5_0; ++ UINT32 rx_aal5_1; ++ UINT32 rx_aal0_0; ++ UINT32 rx_aal0_1; ++} ATM_MIB_STATS, *pATM_MIB_STATS; ++ ++/* These are from TX status register; they are collected every 1 second interval */ ++typedef struct atmTxStats { ++ UINT32 fifoFull; /* fifoFull_port0 */ ++ UINT32 aal2bigErr; ++ UINT32 aal5LenErr; ++ UINT32 aal5MaxLenErr; ++ UINT32 droppedCellErr; /* tx aal or tx atm dropped cell port 0 */ ++ UINT32 aal5PortNotEnableErr; /* pne_err_port0 */ ++ UINT32 fifoFullErr; /* ff_err_port0 */ ++ UINT32 aal5CountErr; ++} ATM_TX_STATS, *pATM_TX_STATS; ++ ++/* these are from RX ATM and RX AAL status registers */ ++typedef struct atmRxStats { ++ UINT32 gfcErr; ++ UINT32 crcErr; ++ UINT32 ptiErr; ++ UINT32 vcamMmErr; /* vcam_mme VCAM multiple match error */ ++ UINT32 camLookupErr; /* came_port0 */ ++ UINT32 portNotEnableErr; /* pne_err */ ++ UINT32 discardErr; /* dc_port0 */ ++ UINT32 errCellErr; /* ec_port0 */ ++ UINT32 routerDrop; /* rxRouterStat_port0 */ ++ UINT32 aalDrop; /* aal5d */ ++#ifdef BRCM_6348 ++ UINT32 overflowErr; ++ UINT32 uto2small; ++ UINT32 uto2big; ++#endif ++} ATM_RX_STATS, *pATM_RX_STATS; ++ ++typedef struct atmStats ++{ ++ ATM_MIB_STATS mibStats; ++ ATM_TX_STATS txStats; ++ ATM_RX_STATS rxStats; ++}ATM_STATS, *pATM_STATS; ++ ++typedef struct atm_test_tx_info { ++ UINT32 index; ++ UINT32 len; ++ UINT32 lineTxInterval; ++ UINT32 count; ++ UINT8 incremental; ++ UINT8 dataByte; ++ UINT8 aalType; ++ UINT8 numOfQueues; ++ UINT8 basePriority; ++ UINT32 handle; ++ UINT32 rate; ++ UINT32 sending; ++ UINT8 managementType; /* f4, f5, rm */ ++ UINT8 interleaveManagement; ++ UINT16 managementVpi; ++ UINT16 managementVci; ++ UINT16 managementCrc; ++ UINT32 managementInterface; ++} ATM_TEST_TX_INFO, *pATM_TEST_TX_INFO; ++ ++typedef struct atm_test_info { ++ ATM_TEST_TX_INFO atmTestTxInfo[UT_MAX_VCCS+1]; /* one extra for f4 since it doesn't ++ have a vcc created, index is last one */ ++ UT_TRAFFIC_DESCR_PARM_ENTRY ms_Tdt[UT_MAX_TD_INDEX]; ++ UT_VCC_CFG ms_VccCfgs[UT_MAX_VCCS]; ++ UT_VCC_ADDR_INFO ms_VccAddrs[UT_MAX_VCCS]; ++ UINT32 commandStatus; /* command-2 bytes, status 2 bytes */ ++ ATM_TEST_ERROR m_ucTestError[UT_MAX_VCCS+1]; ++ ATM_STATS atmStats; ++ UINT8 displayData; /* current mode: 0=disable, 1=enable */ ++ UINT8 captureData; /* current mode: 0=disable, 1=enable */ ++ UINT8 verifyData; /* current mode: 0=disable, 1=enable */ ++ UINT32 pduSent[UT_MAX_VCCS+1]; /* one extra for f4 */ ++ UINT32 pduReceived[UT_MAX_VCCS+1]; ++ UINT32 multiPriority; ++} ATM_TEST_INFO, *pATM_TEST_INFO; ++ ++typedef struct atm_verfication_info { ++ int seqNumber; ++ UINT8 incremental; ++ UINT8 dataByte; ++ int len; ++} ATM_VERIFICATION_INFO, *pATM_VERIFICATION_INFO; ++ ++typedef struct atm_data_struct { ++ PATM_VCC_DATA_PARMS data; ++ ATM_VCC_ADDR vccAddr; ++} ATM_DATA_STRUCT, *PATM_DATA_STRUCT; ++ ++typedef struct atmDiagCb { ++ ATM_TRAFFIC_DESCR_PARM_ENTRY ms_Tdt[UT_MAX_TD_INDEX]; ++ ATM_VCC_CFG ms_VccCfgs[UT_MAX_VCCS]; ++ UT_VCC_ADDR_INFO ms_VccAddrs[UT_MAX_VCCS]; ++ UINT32 ms_multiPriority[UT_MAX_VCCS]; ++ ATM_TX_BUFFER_LIST mTxHdrQ[UT_MAX_VCCS+1]; /* tx Q; an extra one for f4 cells */ ++ UT_VCC_LIST_INFO m_ulVccList[UT_MAX_VCCS+1]; /* tx Q; an extra one for f4 cells */ ++ UINT32 managementHandle_port0; ++ UINT32 managementHandle_port1; ++ UINT32 rxTaskId; ++ UINT32 txTaskId; ++ UINT32 statsTaskId; ++ UINT32 rxTaskSem; /* protect Rx Q */ ++ UINT32 txTaskSem; /* protect Tx Q */ ++ UINT32 rxQMuSem; /* rx task semphore */ ++ UINT32 txQMuSem; /* tx task semphore */ ++ UINT32 txTaskExit; /* clean up purpose */ ++ UINT32 rxTaskExit; /* clean up purpose */ ++ ATM_DATA_STRUCT m_pDpHead; /* rx Q */ ++ ATM_DATA_STRUCT m_pDpTail; /* rx Q */ ++ UINT8 displayData; /* 1 to display rx data on screen; default is 0 */ ++ UINT8 captureData; ++ UINT8 verifyData; ++ ATM_CAPTURE_HDR m_ulData[UT_BUFFER_SIZE]; ++ int m_ulBufferPosition; ++ UINT32 m_ulCurSeqNumber; ++ ATM_TEST_ERROR m_ucTestError[UT_MAX_VCCS+1]; ++ ATM_STATS m_atmStats; ++ ATM_VERIFICATION_INFO dataVerficationInfo[UT_MAX_VCCS]; ++ UINT8 txStop; ++} ATM_DIAG_CB, *pATM_DIAG_CB; ++ ++/* 0xfffe15c */ ++typedef union phyLastDescConfig { ++ struct { ++ UINT32 unused:22; ++ UINT32 rxCfg:2; ++ UINT32 unused1:2; ++ UINT32 txCfg:2; ++ UINT32 numRxDesc:2; ++ UINT32 numTxDesc:2; ++ }bit; ++ UINT32 reg; ++} PHY_LAST_DESC_CONFIG, *pPHY_LAST_DESC_CONFIG; ++ ++/* 0xfffe4500-0xfffe45ff */ ++typedef union txAtmVpiVciTable { ++ struct { ++ UINT32 unused:6; ++ UINT32 swFlags:1; ++ UINT32 crcEnable:1; ++ UINT32 vpi: 8; ++ UINT32 vci:16; ++ }bit; ++ UINT32 entry; ++} TX_ATM_VPI_VCI_TABLE, *pTX_ATM_VPI_VCI_TABLE; ++ ++/* 0xfffe4600-0xfffe46ff */ ++typedef union RxAtmVpiVciTable { ++ struct { ++ UINT32 unused:6; ++ UINT32 valid:1; ++ UINT32 vpi:8; ++ UINT32 vci:16; ++ UINT32 port:1; ++ } camSide; /* even; */ ++ struct { ++ UINT32 unused:21; ++ UINT32 userDataIR:1; /* assert IR for user data immediate response */ ++ UINT32 oamIR:1; /* assert IR for OAM immediate response */ ++ UINT32 rmIR:1; /* assert IR for RM immediate response */ ++ UINT32 vcId:3; /* VCID */ ++ UINT32 userDataCrcEnable:1; ++ UINT32 oamRouteCode:1; /* 0=route to rx cell q; 1= route to rx mips cell fifo */ ++ UINT32 udrc:1; /* User Data Routing Code */ ++ UINT32 circuitType:2; ++ } ramSide; /* odd; */ ++ UINT32 entry; ++} RX_ATM_VPI_VCI_TABLE, *pRX_ATM_VPI_VCI_TABLE; ++ ++/* 6345; 0xfffe4300- 0xfffe43ff */ ++typedef union atmIntrRegs { ++ struct { ++ UINT32 unused:20; ++ UINT32 vcamMm:1; /* RX VCAM multiple match */ ++ UINT32 rxRtDc:1; /* Rx Router discard cell due to full rx buffer */ ++ UINT32 rpqIr:1; /* Receive Packet Queue got a packet tagged with immediate response */ ++ UINT32 rcqIr:1; /* Receive Cell Queue got a cell tagged with immediate response */ ++ UINT32 rpqWd:1; /* RX Pkt Q watchdog- no pkt rxed for the duration defined in RCQ wd timer */ ++ UINT32 rcqWd:1; /* RX Cell Q watchdog */ ++ UINT32 mibHf:1; /* one or more of the MIB coutners is half full */ ++ UINT32 fpqAe:1; /* Free Packet Queue almost empty- has fewer buffers than FPQ watermark */ ++ UINT32 rpqAf:1; /* Rx Packet Queue has exceeded RPQ watermark */ ++ UINT32 fcqAe:1; /* Free Cell Queue almost Empty */ ++ UINT32 rcqAf:1; /* Rx Cell Q almost full */ ++ UINT32 txs:1; /* Tx SDRAM Interrupt- one of the TX SDRAM sub-channels intr is set */ ++ }statusMaskBit; /* status & interrupt mask */ ++#ifdef BRCM_6348 ++ struct { ++ UINT32 unused1:8; ++ UINT32 sdqMask:8; /* TX SDRAM watchdog timer interrupt */ ++ UINT32 unused:4; ++ UINT32 irqMask:12; ++ }irqMaskBit; ++ struct { ++ UINT32 unused:28; ++ UINT32 sdWd:4; /* TX SDRAM Watchdog */ ++ }txSdramValue; ++#else /* 6345 */ ++ struct { ++ UINT32 unused:16; ++ UINT32 irqMask:16; ++ }irqMaskBit; ++#endif /* BRCM_6348 */ ++ struct { ++ UINT32 fcqAeWm:16; /* Free Cell Q almost empty watermark */ ++ UINT32 rcqAfWm:16; /* Rx Cell Q almost full watermark */ ++ }rxCellQBit; ++ struct { ++ UINT32 fpqAeWm:16; /* Free Packet Q almost empty watermark */ ++ UINT32 rpqAfWm:16; /* Rx Paket Q almost full watermark */ ++ }rxPktQBit; ++ struct { ++ UINT32 pktWdTo:16; /* Watchdog timeout value in 50 uSec increments */ ++ UINT32 cellWdTo:16; /* Watchdog timeout value in 50 uSec increments */ ++ }rxWdTimer; ++} ATM_INTR_REGS, *pATM_INTR_REGS; ++ ++/* 0xfffe4700-0xfffe47ff */ ++typedef union atmShaperCtrlReg { ++#ifdef BRCM_6348 ++ struct { ++ UINT32 unused:7; ++ UINT32 rst:1; /* reset shaper */ ++ UINT32 pcr:12; /* peak cell rate */ ++ UINT32 mpEn:1; /* Multi-priority enabled */ ++ UINT32 priority:2; /* source scheduling sub-priority */ ++ UINT32 mcrEnable:1;/* Minimum Cell Rate Enabled */ ++ UINT32 alg:2; /* source shaping algorithm */ ++ UINT32 pid:1; /* Source destination Port ID */ ++ UINT32 vcid:4; /* source VC ID */ ++ UINT32 enable:1; /* source shaper enable */ ++ }bit; ++#else /* 6345 */ ++ struct { ++ UINT32 unused:9; ++ UINT32 rst:1; /* reset shaper */ ++ UINT32 pcr:12; /* peak cell rate */ ++ UINT32 mpEn:1; /* Multi-priority enabled */ ++ UINT32 priority:2; /* source scheduling sub-priority */ ++ UINT32 alg:2; /* source shaping algorithm */ ++ UINT32 pid:1; /* Source destination Port ID */ ++ UINT32 vcid:3; /* source VC ID */ ++ UINT32 enable:1; /* source shaper enable */ ++ }bit; ++#endif /* BRCM_6348 */ ++ UINT32 entry; ++} ATM_SHAPER_CTRL_REG, *pATM_SHAPER_CTRL_REG; ++ ++typedef union atmShaperVbrReg { ++ struct { ++ UINT32 unused:1; ++ UINT32 bt:19; ++ UINT32 scr:12; ++ }bit; ++ UINT32 entry; ++} ATM_SHAPER_VBR_REG, *pATM_SHAPER_VBR_REG; ++ ++#ifdef BRCM_6348 ++typedef union atmShaperMcrReg { ++ struct { ++ UINT32 unused:20; ++ UINT32 mcr:12; ++ }bit; ++ UINT32 entry; ++} ATM_SHAPER_MCR_REG, *pATM_SHAPER_MCR_REG; ++#endif /* BRCM_6348 */ ++ ++typedef union atmCellHdr { ++ struct { ++ UINT32 gfc:4; ++ UINT32 msb_vpi:4; ++ UINT32 vpi:4; ++ UINT32 msb_vci:4; ++ UINT32 vci:8; ++ UINT32 lsb_vci:4; ++ UINT32 pt:3; ++ UINT32 clp:1; ++ }bit; ++ UINT32 word1; ++} ATM_CELL_HDR, *pATM_CELL_HDR; ++#define ATM_RX_AAL_STATUS_ERROR_MASK_PORT0 0x108 ++ ++/* 0xfffe4428 */ ++typedef union atmRxAalStatusReg { ++ struct { ++ UINT32 unused:22; ++ UINT32 rxRouterStat_port1:1; /* RX cells dropped due to full cell buffer; */ ++ UINT32 rxRouterStat_port0:1; /* bit 8=port 0 fifo rx drop cell */ ++ UINT32 aal0ccnt_port1:1; /* aal0 cell count has been incremented; bit 4=port0 */ ++ UINT32 aal0ccnt_port0:1; /* aal0 cell count has been incremented; bit 4=port0 */ ++ UINT32 aal5ccnt_port1:1; /* aal5 cell count has been incremented; bit 4=port0 */ ++ UINT32 aal5ccnt_port0:1; /* aal5 cell count has been incremented; bit 4=port0 */ ++ UINT32 aal5d:1; /* aal5 dropped cells */ ++ UINT32 aal5p:1; /* aal5 pdu received */ ++ UINT32 aalxp:1; /* non aal5 received */ ++ UINT32 aal5c:1; /* aal5 received cells */ ++ }bit; ++ UINT32 reg; ++} ATM_RX_AAL_STATUS_REG, *pATM_RX_AAL_STATUS_REG; ++/* 0xfffe441c */ ++#define ATM_RX_STATUS_ERROR_MASK_PORT0 0x32354 ++typedef union atmRxStatusReg { ++ struct { ++ UINT32 unused:14; ++ UINT32 gfc_err:1; /* non zero gfc detected */ ++ UINT32 crc_err:1; /* CRC-10 error detected on OAM/RM cells */ ++#ifdef BRCM_6348 ++ UINT32 rx_flow_err:1; /* Receive cell dropped by RXATM layer 'cause RX cell FIFO full */ ++#else /* 6345 */ ++ UINT32 unused1:1; ++#endif ++ UINT32 idle_err:1; /* Idle cell detected */ ++ UINT32 pti_err:1; /* PTI Error detected (i.e. PT=binary 111) */ ++#ifdef BRCM_6348 ++ UINT32 unused2:1; ++ UINT32 uto2small:1;/* Too small of a cell from RX Utopia */ ++ UINT32 uto2big:1; /* Too big of a cell from RX Utopia */ ++#else /* BRCM_6345 */ ++ UINT32 unused2:3; ++#endif ++ UINT32 vcam_mme:1; /* VCAM multiple match error */ ++ UINT32 pne_err:1; /* port not enable error */ ++ UINT32 came_port1:1; /* PER port cam lookup error; bit6=port 0 */ ++ UINT32 came_port0:1; /* PER port cam lookup error; bit6=port 0 */ ++ UINT32 dc_port1:1; /* per port dropped cell; bit 4= port 0 */ ++ UINT32 dc_port0:1; /* per port dropped cell; bit 4= port 0 */ ++ UINT32 ec_port1:1; /* per port erred cell; bit 2=port 0 */ ++ UINT32 ec_port0:1; /* per port erred cell; bit 2=port 0 */ ++ UINT32 vc_port1:1; /* per port valid cell; bit 0=port 0 */ ++ UINT32 vc_port0:1; /* per port valid cell; bit 0=port 0 */ ++ }bit; ++ UINT32 reg; ++} ATM_RX_STATUS_REG, *pATM_RX_STATUS_REG; ++ ++#define ATM_TX_STATUS_ERROR_MASK_PORT0 0x41e80c54 ++typedef union atmTxStatusReg { ++ struct { ++ UINT32 fifoFull_port1:1; /* per port FIFO Full Status (1=full) */ ++ UINT32 fifoFull_port0:1; /* per port FIFO Full Status (1=full) */ ++ UINT32 unused:1; ++ UINT32 aal0_port1:1; /* aal0_port1 tx */ ++ UINT32 aal0_port0:1; /* aal0_port0 tx */ ++ UINT32 aal5_port1:1; /* aal5_port1 tx */ ++ UINT32 aal5_port0:1; /* aal5_port0 tx */ ++ UINT32 aal2big:1; /* aal too big cell input */ ++ UINT32 aal5liErr:1;/* aal5 length indicator error */ ++ UINT32 aal5mlErr:1;/* aal5 max length error */ ++ UINT32 aal5ctErr:1;/* aal5 count error */ ++ UINT32 unused1:1; ++ UINT32 aal5d:1; /* aal5 drop cell */ ++ UINT32 aal5p:1; /* aal5 pdu passed */ ++ UINT32 aalxc:1; /* non aal5 cell passed */ ++ UINT32 aal5c:1; /* aal cell passed */ ++ UINT32 dropCell_port1:1; /* tx aal or tx atm dropped cell */ ++ UINT32 dropReq_port1:1; /* one of the port dropped request */ ++ UINT32 scheCell_port1:1; /* per port scheduled cell */ ++ UINT32 sit_port1:1; /* per port schedule interval timer count event */ ++ UINT32 dropCell_port0:1; /* tx aal or tx atm dropped cell */ ++ UINT32 dropReq_port0:1; /* one of the port dropped request */ ++ UINT32 scheCell_port0:1; /* per port scheduled cell */ ++ UINT32 sit_port0:1; /* per port schedule interval timer count event */ ++ UINT32 pne_err_port1:1; /* port not enable error */ ++ UINT32 pne_err_port0:1; /* port not enable error */ ++ UINT32 ff_err_port1:1; /* fifo full error */ ++ UINT32 ff_err_port0:1; /* fifo full error */ ++ UINT32 dc_port1:1; /* per port dropped cell */ ++ UINT32 dc_port0:1; /* per port dropped cell */ ++ UINT32 pc_port1:1; /* per port processed cell */ ++ UINT32 pc_port0:1; /* per port processed cell */ ++ }bit; ++ UINT32 reg; ++} ATM_TX_STATUS_REG, *pATM_TX_STATUS_REG; ++ ++ ++typedef union atmTxHdrReg { ++ struct { ++ UINT32 unused1:14; ++ UINT32 aal5SwTrailer:1; /* software trailer enable */ ++ UINT32 schedCrst_1:1; /* scheuler reset */ ++ UINT32 schedCrst_0:1; ++ UINT32 unused:1; ++ UINT32 haltShpt_1:1; /* halt shaper, used for dynamic configuration of shaper */ ++ UINT32 haltShpt_0:1; ++ UINT32 altGFC:4; /* alternate GFC value */ ++ UINT32 altGFCen_1:1; ++ UINT32 altGFCen_0:1; /* alternate GFC mode enable */ ++ UINT32 fRst_1:1; ++ UINT32 fRst_0:1; ++ UINT32 oamCrcEn_1:1; ++ UINT32 oamCrcEn_0:1; ++ UINT32 txEn_1:1; ++ UINT32 txEn_0:1; ++ }bit; ++ UINT32 reg; ++} ATM_TX_HDR_CFG_REG, *pATM_TX_HDR_CFG_REG; ++ ++typedef union rxAalError { ++ struct { ++ UINT8 crc:1; /* aal5 CRC error */ ++ UINT8 cpcsLen0:1; /* aal5 cpcsLen error */ ++ UINT8 length:1; /* aal5 len error */ ++ UINT8 maxSduExceed:1; /* max sdu exceed error */ ++ UINT8 unused:4; ++ }bit; ++ UINT8 entry; ++} RX_AAL_ERROR; ++ ++typedef union rxAtmError { ++ struct { ++ UINT8 pne:1; /* port not enable error */ ++ UINT8 hec:1; /* HEC error */ ++ UINT8 pti:1; /* pti error */ ++ UINT8 idle:1; /* idle rx */ ++ UINT8 camLkup:1; /* cam look up error */ ++ UINT8 unused:1; ++ UINT8 oamCrc:1; /* oam crc */ ++ UINT8 gfc:1; /* gfc error */ ++ }bit; ++ UINT8 entry; ++} RX_ATM_ERROR; ++ ++/* 0xfffe442c */ ++typedef union atmUtopiaCfg { ++ struct { ++ UINT32 unused:26; ++ UINT32 rxLevel2:1; /* when set=level 2, when 0=level 1 */ ++ UINT32 rxEn:1; /* enable RX Utopia Operation */ ++ UINT32 unused1:2; ++ UINT32 txLevel2:1; /* when set=level 2, when 0=level 1 */ ++ UINT32 txEn:1; /* enable TX Utopia Operation */ ++ }bit; ++ UINT32 entry; ++} ATM_UTOPIA_CFG, *pATM_UTOPIA_CFG; ++ ++typedef union portSchedulerCfg { ++ struct { ++ UINT32 cit:16; ++ UINT32 unused:12; ++ UINT32 mode:2; ++ UINT32 arb:1; ++ UINT32 en:1; ++ }bit; ++ UINT32 entry; ++} ATM_PORT_SCHEDULER_CFG, *pATM_PORT_SCHEDULER_CFG; ++ ++/* memory map operation definition */ ++typedef struct atm_regs { ++ int kmem_fd; ++ char *mmap_addr; ++ unsigned long addr; ++ unsigned int size; ++ unsigned int offset; ++} atm_regs; ++ ++int getVccNextIndex(void); ++void removeVccIndex(int index); ++int isVpiVciExisted(UINT32 interface, UINT16 vpi, UINT16 vci); ++void atmDiagInit(void); ++BCMATM_STATUS bcmAtmDiagInit(void); ++BCMATM_STATUS bcmAtmDiagUnInit(void); ++BCMATM_STATUS bcmAtmAddVccCommand(pUT_VCC_ADDR_INFO pVccAddrs, pUT_VCC_CFG pVccCfg, ++ pUT_TRAFFIC_DESCR_PARM_ENTRY pTd); ++BCMATM_STATUS bcmAtmSendVccCommand(pATM_TEST_TX_INFO pAtmInfo); ++BCMATM_STATUS bcmAtmCaptureCommand(int mode); ++BCMATM_STATUS bcmAtmSendManagementCommand(pATM_TEST_TX_INFO pAtmInfo); ++BCMATM_STATUS bcmAtmDeleteVccCommand(pUT_VCC_ADDR_INFO pVccAddrs); ++BCMATM_STATUS bcmAtmSendAllVccsCommand(pATM_TEST_TX_INFO pAtmInfo); ++BCMATM_STATUS bcmAtmSendMultiPriorityCommand(pATM_TEST_TX_INFO pAtmInfo); ++BCMATM_STATUS bcmAtmSendLoopbackCommand(UINT8 mode); ++BCMATM_STATUS bcmAtmAddMPVccCommand(pUT_VCC_ADDR_INFO pVccAddrs, pUT_VCC_CFG pVccCfg, ++ pUT_TRAFFIC_DESCR_PARM_ENTRY pTd); ++BCMATM_STATUS bcmAtmDeleteMPVccCommand(pUT_VCC_ADDR_INFO pVccAddrs); ++BCMATM_STATUS bcmAtmSendMPVccCommand(pATM_TEST_TX_INFO pAtmInfo); ++BCMATM_STATUS bcmAtmSendMultiPriorityCommand(pATM_TEST_TX_INFO pAtmInfo); ++BCMATM_STATUS bcmAtmModifyTDCommand(pUT_TRAFFIC_DESCR_PARM_ENTRY pTD, UINT32 index); ++int bcmAtmGetStatsCommand(int reset); ++int bcmAtmToggleVerifyCommand(void); ++int bcmAtmToggleCaptureCommand(void); ++int bcmAtmToggleDisplayCommand(void); ++int bcmAtmStopTxCommand(void); ++int isVpiVciExisted(UINT32 interface, UINT16 vpi, UINT16 vci); ++int bcmDiag_unmapregs(atm_regs *mapregs); ++atm_regs *bcmDiag_mapregs(unsigned long addr, int size); ++int bcmDiagGetVerificationStats(int vcc,char *pResult); ++void bcmDiagClearSARstats(void); ++void bcmDiagReadSARstats(int parm); ++int bcmDiagGetSARStats(char *pResult); ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmosservices.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmosservices.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmosservices.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmosservices.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,98 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++//************************************************************************** ++// File Name : BcmAtmApi.h ++// ++// Description: This file contains the definitions, structures and function ++// prototypes for the Broadcom Asynchronous Transfer Mode (ATM) ++// Application Program Interface (API). ++// ++// Updates : 09/15/2000 lat. Created. ++//************************************************************************** ++ ++#if !defined(_ATMOSSERVICES_H_) ++#define _ATMOSSERVICES_H_ ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++//************************************************************************** ++// Constant Definitions ++//************************************************************************** ++#define RTN_SUCCESS 0 ++#define RTN_ERROR 1 ++#define USE_CURRENT_THREAD_PRIORITY 0 ++ ++//************************************************************************** ++// Type Definitions ++//************************************************************************** ++typedef void (*FN_GENERIC) (void *); ++typedef struct AtmOsFuncs ++{ ++ FN_GENERIC pfnAlloc; ++ FN_GENERIC pfnFree; ++ FN_GENERIC pfnDelay; ++ FN_GENERIC pfnCreateSem; ++ FN_GENERIC pfnRequestSem; ++ FN_GENERIC pfnReleaseSem; ++ FN_GENERIC pfnDeleteSem; ++ FN_GENERIC pfnDisableInts; ++ FN_GENERIC pfnEnableInts; ++ FN_GENERIC pfnInvalidateCache; ++ FN_GENERIC pfnFlushCache; ++ FN_GENERIC pfnGetTopMemAddr; ++ FN_GENERIC pfnBlinkLed; ++ FN_GENERIC pfnGetSystemTick; ++ FN_GENERIC pfnStartTimer; ++ FN_GENERIC pfnPrintf; ++} ATM_OS_FUNCS, *PATM_OS_FUNCS; ++ ++//************************************************************************** ++// Function Prototypes ++//************************************************************************** ++ ++UINT32 AtmOsInitialize( PATM_OS_FUNCS pFuncs ); ++char *AtmOsAlloc( UINT32 ulSize ); ++void AtmOsFree( char *pBuf ); ++UINT32 AtmOsCreateThread( char *pszName, void *pFnEntry, UINT32 ulFnParm, ++ UINT32 ulPriority, UINT32 ulStackSize, UINT32 *pulThreadId ); ++UINT32 AtmOsCreateSem( UINT32 ulInitialState ); ++UINT32 AtmOsRequestSem( UINT32 ulSem, UINT32 ulTimeoutMs ); ++void AtmOsReleaseSem( UINT32 ulSem ); ++void AtmOsDeleteSem( UINT32 ulSem ); ++UINT32 AtmOsDisableInts( void ); ++void AtmOsEnableInts( UINT32 ulLevel ); ++void AtmOsDelay( UINT32 ulTimeoutMs ); ++UINT32 AtmOsTickGet( void ); ++UINT32 AtmOsTickCheck( UINT32 ulWaitTime, UINT32 ulMsToWait ); ++void AtmOsInvalidateCache( void *pBuf, UINT32 ulLength ); ++void AtmOsFlushCache( void *pBuf, UINT32 ulLength ); ++char *AtmOsTopMemAddr( void ); ++void AtmOsBlinkLed( void ); ++UINT32 AtmOsInitDeferredHandler( void *pFnEntry, UINT32 ulFnParm, ++ UINT32 ulTimeout ); ++void AtmOsScheduleDeferred( UINT32 ulHandle ); ++void AtmOsUninitDeferredHandler( UINT32 ulHandle ); ++UINT32 AtmOsStartTimer( void *pFnEntry, UINT32 ulFnParm, UINT32 ulTimeout ); ++void AtmOsPrintf( char *, ... ); ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif // _ATMOSSERVICES_H_ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcm_common.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcm_common.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcm_common.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcm_common.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,48 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2004 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++ ++#ifndef __BCM_COMMON_H ++#define __BCM_COMMON_H ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_common.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_common.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_common.h> ++#endif ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,5) /* starting from 2.4.5 */ ++#define skb_dataref(x) (&skb_shinfo(x)->dataref) ++#else ++#define skb_dataref(x) skb_datarefp(x) ++#endif ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19) /* starting from 2.4.19 */ ++#define VIRT_TO_PHY(a) (((unsigned long)(a)) & 0x1fffffff) ++#else ++#define VIRT_TO_PHY virt_to_phys ++#endif ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++#define __save_and_cli save_and_cli ++#define __restore_flags restore_flags ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcm_map.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcm_map.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcm_map.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcm_map.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,31 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2004 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++ ++#ifndef __BCM_MAP_H ++#define __BCM_MAP_H ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_map.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_map.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_map.h> ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmadsl.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmadsl.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmadsl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmadsl.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,199 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++//************************************************************************** ++// File Name : Adsl.h ++// ++// Description: This file contains the definitions, structures and function ++// prototypes for ADSL PHY interface ++// ++//************************************************************************** ++#if !defined(_BCMADSL_H_) ++#define _BCMADSL_H_ ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++/* Incldes. */ ++#include "AdslMibDef.h" ++ ++//************************************************************************** ++// Type Definitions ++//************************************************************************** ++ ++// Return status values ++typedef enum BcmAdslStatus ++{ ++ BCMADSL_STATUS_SUCCESS = 0, ++ BCMADSL_STATUS_ERROR ++} BCMADSL_STATUS; ++ ++// Return status values ++typedef enum AdslLinkState ++{ ++ BCM_ADSL_LINK_UP = 0, ++ BCM_ADSL_LINK_DOWN, ++ BCM_ADSL_TRAINING_G992_EXCHANGE, ++ BCM_ADSL_TRAINING_G992_CHANNEL_ANALYSIS, ++ BCM_ADSL_TRAINING_G992_STARTED, ++ BCM_ADSL_TRAINING_G994, ++ BCM_ADSL_G994_NONSTDINFO_RECEIVED, ++ BCM_ADSL_BERT_COMPLETE, ++ BCM_ADSL_ATM_IDLE, ++ BCM_ADSL_EVENT, ++ BCM_ADSL_G997_FRAME_RECEIVED, ++ BCM_ADSL_G997_FRAME_SENT ++} ADSL_LINK_STATE; ++ ++#ifndef DISABLE_ADSL_OLD_DEF ++#define ADSL_LINK_UP BCM_ADSL_LINK_UP ++#define ADSL_LINK_DOWN BCM_ADSL_LINK_DOWN ++#endif ++ ++/* ADSL test modes */ ++typedef enum AdslTestMode ++{ ++ ADSL_TEST_NORMAL = 0, ++ ADSL_TEST_REVERB, ++ ADSL_TEST_MEDLEY, ++ ADSL_TEST_SELECT_TONES, ++ ADSL_TEST_NO_AUTO_RETRAIN, ++ ADSL_TEST_MARGIN_TWEAK, ++ ADSL_TEST_ESTIMATE_PLL_PHASE, ++ ADSL_TEST_REPORT_PLL_PHASE_STATUS, ++ ADSL_TEST_AFELOOPBACK, ++ ADSL_TEST_L3, ++ ADSL_TEST_DIAGMODE, ++ ADSL_TEST_L0 ++} ADSL_TEST_MODE; ++ ++// ADSL_CHANNEL_ADDR Contains ADSL Utopia PHY addresses ++typedef struct AdslChannelAddr ++{ ++ UINT16 usFastChannelAddr; ++ UINT16 usInterleavedChannelAddr; ++} ADSL_CHANNEL_ADDR, *PADSL_CHANNEL_ADDR; ++ ++// ADSL_CONNECTION_INFO Contains ADSL Connection Info ++typedef struct AdslConnectionInfo ++{ ++ ADSL_LINK_STATE LinkState; ++ UINT32 ulFastUpStreamRate; ++ UINT32 ulFastDnStreamRate; ++ UINT32 ulInterleavedUpStreamRate; ++ UINT32 ulInterleavedDnStreamRate; ++} ADSL_CONNECTION_INFO, *PADSL_CONNECTION_INFO; ++ ++/* OEM parameter definition */ ++#define ADSL_OEM_G994_VENDOR_ID 1 /* Vendor ID used during G.994 handshake */ ++#define ADSL_OEM_G994_XMT_NS_INFO 2 /* G.994 non-standard info field to send */ ++#define ADSL_OEM_G994_RCV_NS_INFO 3 /* G.994 received non-standard */ ++#define ADSL_OEM_EOC_VENDOR_ID 4 /* EOC reg. 0 */ ++#define ADSL_OEM_EOC_VERSION 5 /* EOC reg. 1 */ ++#define ADSL_OEM_EOC_SERIAL_NUMBER 6 /* EOC reg. 2 */ ++#define ADSL_OEM_T1413_VENDOR_ID 7 /* Vendor ID used during T1.413 handshake */ ++#define ADSL_OEM_T1413_EOC_VENDOR_ID 8 /* EOC reg. 0 (vendor ID) in T1.413 mode */ ++ ++/* XMT gain definitions */ ++#define ADSL_XMT_GAIN_AUTO 0x80000000 ++ ++typedef struct ++{ ++ int diagCmd; ++ int diagMap; ++ int logTime; ++ int srvIpAddr; ++ int gwIpAddr; ++} ADSL_DIAG, *PADSL_DIAG; ++ ++typedef struct ++{ ++ short x; ++ short y; ++} ADSL_CONSTELLATION_POINT, *PADSL_CONSTELLATION_POINT; ++ ++#define ADSL_CONSTEL_DATA_ID 0 ++#define ADSL_CONSTEL_PILOT_ID 1 ++ ++#define ADSL_MIB_INFO adslMibInfo ++typedef ADSL_MIB_INFO *PADSL_MIB_INFO; ++ ++typedef void (*ADSL_FN_NOTIFY_CB) (ADSL_LINK_STATE AdslLinkState, UINT32 ulParm); ++ ++//************************************************************************** ++// Function Prototypes ++//************************************************************************** ++ ++BCMADSL_STATUS BcmAdsl_Check(void); ++BCMADSL_STATUS BcmAdsl_Initialize(ADSL_FN_NOTIFY_CB pFnNotifyCb, UINT32 ulParm, adslCfgProfile *pAdslCfg); ++#ifdef LINUX ++BCMADSL_STATUS BcmAdsl_MapAtmPortIDs(UINT16 usAtmFastPortId, UINT16 usAtmInterleavedPortId); ++#endif ++BCMADSL_STATUS BcmAdsl_Uninitialize(void); ++BCMADSL_STATUS BcmAdsl_ConnectionStart(void); ++BCMADSL_STATUS BcmAdsl_ConnectionStop(void); ++BCMADSL_STATUS BcmAdsl_GetPhyAddresses(PADSL_CHANNEL_ADDR pChannelAddr); ++BCMADSL_STATUS BcmAdsl_SetPhyAddresses(PADSL_CHANNEL_ADDR pChannelAddr); ++BCMADSL_STATUS BcmAdsl_GetConnectionInfo(PADSL_CONNECTION_INFO pConnectionInfo); ++BCMADSL_STATUS BcmAdsl_DiagCommand(PADSL_DIAG pAdslDiag); ++int BcmAdsl_GetObjectValue(char *objId, int objIdLen, char *dataBuf, long *dataBufLen); ++BCMADSL_STATUS BcmAdsl_StartBERT(unsigned long totalBits); ++BCMADSL_STATUS BcmAdsl_StopBERT(void); ++BCMADSL_STATUS BcmAdsl_BertStartEx(unsigned long bertSec); ++BCMADSL_STATUS BcmAdsl_BertStopEx(void); ++BCMADSL_STATUS BcmAdsl_CheckPowerLoss(void); ++BCMADSL_STATUS BcmAdsl_SendDyingGasp(int powerCtl); ++BCMADSL_STATUS BcmAdsl_Configure(adslCfgProfile *pAdslCfg); ++BCMADSL_STATUS BcmAdsl_GetVersion(adslVersionInfo *pAdslVer); ++BCMADSL_STATUS BcmAdsl_SetSDRAMBaseAddr(void *pAddr); ++BCMADSL_STATUS BcmAdsl_SetVcEntry (int gfc, int port, int vpi, int vci); ++BCMADSL_STATUS BcmAdsl_SetVcEntryEx (int gfc, int port, int vpi, int vci, int pti_clp); ++ ++BCMADSL_STATUS BcmAdsl_ResetStatCounters(void); ++BCMADSL_STATUS BcmAdsl_SetAtmLoopbackMode(void); ++BCMADSL_STATUS BcmAdsl_SetTestMode(ADSL_TEST_MODE testMode); ++BCMADSL_STATUS BcmAdsl_SelectTones( ++ int xmtStartTone, ++ int xmtNumTones, ++ int rcvStartTone, ++ int rcvNumTones, ++ char *xmtToneMap, ++ char *rcvToneMap ++ ); ++BCMADSL_STATUS BcmAdsl_SetDiagMode(int diagMode); ++ ++int BcmAdsl_GetConstellationPoints (int toneId, ADSL_CONSTELLATION_POINT *pointBuf, int numPoints); ++ ++int BcmAdsl_GetOemParameter (int paramId, void *buf, int len); ++int BcmAdsl_SetOemParameter (int paramId, void *buf, int len); ++int BcmAdsl_SetXmtGain(int gain); ++ ++UINT32 BcmAdsl_GetSelfTestMode(void); ++void BcmAdsl_SetSelfTestMode(UINT32 stMode); ++UINT32 BcmAdsl_GetSelfTestResults(void); ++ ++BCMADSL_STATUS BcmAdsl_G997SendData(void *buf, int len); ++void *BcmAdsl_G997FrameGet(int *pLen); ++void *BcmAdsl_G997FrameGetNext(int *pLen); ++void BcmAdsl_G997FrameFinished(void); ++void BcmAdsl_DyingGaspHandler(void *context); ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif // _BCMADSL_H_ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmatmapi.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmatmapi.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmatmapi.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmatmapi.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,699 @@ ++/* ++<:copyright-broadcom ++ ++ Copyright (c) 2002 Broadcom Corporation ++ All Rights Reserved ++ No portions of this material may be reproduced in any form without the ++ written permission of: ++ Broadcom Corporation ++ 16215 Alton Parkway ++ Irvine, California 92619 ++ All information contained in this document is Broadcom Corporation ++ company private, proprietary, and trade secret. ++ ++:> ++*/ ++//************************************************************************** ++// File Name : BcmAtmApi.h ++// ++// Description: This file contains the definitions, structures and function ++// prototypes for the Broadcom Asynchronous Transfer Mode (ATM) ++// Application Program Interface (API). ++// ++// Updates : 09/15/2000 lat. Created. ++//************************************************************************** ++ ++#if !defined(_BCMATMAPI_H_) ++#define _BCMATMAPI_H_ ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++//************************************************************************** ++// Constant Definitions ++//************************************************************************** ++ ++// ATM physical port constants. ++#define PHY_NUM_PORTS 4 ++#define PHY_0 0 ++#define PHY_1 1 ++#define PHY_2 2 // [BCM635x Only] ++#define PHY_3 3 // [BCM635x Only] ++ ++// Used for backwards compatibility. ++#define PHY_UTOPIA0 0 ++#define PHY_UTOPIA1 1 ++#define PHY_UTOPIA2 2 ++#define PHY_UTOPIA3_TC_LOOPBACK 3 ++ ++// Values for ATM_PORT_CFG ucPortType. ++#define PT_DISABLED 0 ++#define PT_UTOPIA 1 ++#define PT_LOOPBACK 2 ++#define PT_TC 3 // [BCM635x Only] ++#define PT_ADSL_INTERLEAVED 4 // [BCM6345 Only] ++#define PT_ADSL_FAST 5 // [BCM6345 Only] ++ ++// Wildcard definitions. ++#define ALL_INTERFACES 0xffffffff ++#define ANY_PRIORITY 0xff ++ ++// Values for ATM_TRAFFIC_DESCR_PARM_ENTRY ulTrafficDescrType. ++#define TDT_ATM_NO_TRAFFIC_DESCRIPTOR 1 ++#define TDT_ATM_NO_CLP_NO_SCR 2 ++#define TDT_ATM_CLP_NO_TAGGING_NO_SCR 3 ++#define TDT_ATM_CLP_TAGGING_NO_SCR 4 ++#define TDT_ATM_NO_CLP_SCR 5 ++#define TDT_ATM_CLP_NO_TAGGING_SCR 6 // [BCM635x Only] ++#define TDT_ATM_CLP_TAGGING_SCR 7 // [BCM635x Only] ++#define TDT_ATM_CLP_NO_TAGGING_MCR 8 // [BCM6348 Only] ++#define TDT_ATM_CLP_TRANSPARENT_NO_SCR 9 ++#define TDT_ATM_CLP_TRANSPARENT_SCR 10 ++#define TDT_ATM_NO_CLP_TAGGING_NO_SCR 11 ++#define TDT_ATM_NO_CLP_NO_SCR_CDVT 12 ++#define TDT_ATM_NO_CLP_SCR_CDVT 13 ++#define TDT_ATM_CLP_NO_TAGGING_SCR_CDVT 14 // [BCM635x Only] ++#define TDT_ATM_CLP_TAGGING_SCR_CDVT 15 // [BCM635x Only] ++ ++// Values for ATM_TRAFFIC_DESCR_PARM_ENTRY ulTrafficDescrRowStatus. ++#define TDRS_ACTIVE 1 ++#define TDRS_NOT_IN_SERVICE 2 ++ ++// Values for ATM_TRAFFIC_DESCR_PARM_ENTRY ulServiceCategory. ++#define SC_OTHER 1 ++#define SC_CBR 2 ++#define SC_RT_VBR 3 ++#define SC_NRT_VBR 4 ++#define SC_UBR 6 ++ ++// Values for ATM_INTERFACE_CFG ulIfAdminStatus and ATM_VCC_CFG ++// ulAtmVclAdminStatus. ++#define ADMSTS_UP 1 ++#define ADMSTS_DOWN 2 ++#define ADMSTS_TESTING 3 ++ ++// Values for ATM_INTERFACE_CFG ulIfOperStatus and ATM_VCC_CFG ++// ulAtmVclOperStatus. ++#define OPRSTS_UP 1 ++#define OPRSTS_DOWN 2 ++#define OPRSTS_UNKNOWN 3 ++ ++// Values for ATM_INTERFACE_LINK_INFO ulLinkState. ++#define LINK_UP 1 ++#define LINK_DOWN 2 ++ ++// Values for ulAalType. ++#define AAL_2 0 // [BCM635x Only] ++#define AAL_TRANSPARENT 1 ++#define AAL_0_PACKET 2 ++#define AAL_0_CELL_CRC 3 ++#define AAL_5 7 ++ ++// Values for ATM_VCC_CFG ulAtmVccEncapsType. ++#define ET_VC_MULTIPLEX_ROUTED_PROTOCOL 1 ++#define ET_VC_MULTIPLEX_BRG_PROTOCOL_8023 2 ++#define ET_VC_MULTIPLEX_BRG_PROTOCOL_8025 3 ++#define ET_VC_MULTIPLEX_BRG_PROTOCOL_8026 4 ++#define ET_VC_MULTIPLEX_LAN_EMULATION_8023 5 ++#define ET_VC_MULTIPLEX_LAN_EMULATION_8025 6 ++#define ET_LLC_ENCAPSULATION 7 ++#define ET_MULTI_PROTOCOL_FRAME_RELAY_SSCS 8 ++#define ET_OTHER 9 ++#define ET_UNKNOWN 10 ++ ++// [BCM635x Only] Values for ATM_AAL2_VCC_CFG ucAal2CpsOptimisation. ++#define OPT_SNG_PKT_PER_PDU_NO_OVERLAP 1 ++#define OPT_MULT_PKTS_PER_PDU_OVERLAP 2 ++ ++// [BCM635x Only] Values for ATM_INTERFACE_STATS ulTcAlarmState. ++#define TCALM_NO_ALARM 1 ++#define TCALM_LCD_FAILURE 2 ++ ++// Values for ATM_NOTIFY_PARMS ulNotificationType. ++#define ATM_NOTIFY_INTERFACE_CHANGE 1 ++ ++// Values for AN_INTF_CHANGE_PARMS ulInterfaceState. ++#define ATM_INTERFACE_UP 1 ++#define ATM_INTERFACE_DOWN 2 ++ ++// Values for AN_VCC_CHANGE_PARMS ulInterfaceState. ++#define ATM_VCC_UP 1 ++#define ATM_VCC_DOWN 2 ++ ++// Values for ATM_VCC_ATTACH_PARMS ulFlags. ++#define AVAP_ALLOW_OAM_F5_SEGMENT_CELLS 0x0001 ++#define AVAP_ALLOW_OAM_F5_END_TO_END_CELLS 0x0002 ++#define AVAP_ALLOW_RM_CELLS 0x0004 ++#define AVAP_ALLOW_OAM_F4_SEGMENT_CELLS 0x0008 ++#define AVAP_ALLOW_OAM_F4_END_TO_END_CELLS 0x0010 ++#define AVAP_ALLOW_CELLS_WITH_ERRORS 0x0020 ++#define AVAP_ADD_AAL0_CRC10 0x0040 ++#define AVAP_DSP 0x8000 // [BCM635x Only] ++ ++// [BCM635x Only] Values for ATM_VCC_AAL2_CHANNEL_ID_PARMS ucVoiceRouting. ++#define VOICE_ROUTE_MIPS 0 ++#define VOICE_ROUTE_DSP 2 ++ ++// [BCM635x Only] Values for ATM_VCC_AAL2_CHANNEL_ID_PARMS ucFlags. ++#define CID_USE_FRAME_MODE 0x01 ++ ++// Values for ATM_VCC_DATA_PARMS ucCircuitType. ++#define CT_AAL0_PACKET 0x02 ++#define CT_AAL0_CELL_CRC 0x03 ++#define CT_OAM_F5_SEGMENT 0x04 ++#define CT_OAM_F5_END_TO_END 0x05 ++#define CT_RM 0x06 ++#define CT_AAL5 0x07 ++#define CT_HDLC_PACKET 0x08 // [BCM6348 Only] ++#define CT_ANY_AAL2_MASK 0x08 // [BCM635x Only] ++#define CT_AAL2_ALARM 0x08 // [BCM635x Only] ++#define CT_AAL2_TYPE_3 0x09 // [BCM635x Only] ++#define CT_AAL2_TYPE_1 0x0A // [BCM635x Only] ++#define CT_AAL2_FRAME 0x0B // [BCM635x Only] ++#define CT_TRANSPARENT 0x10 ++#define CT_OAM_F4_ANY 0x20 ++ ++// OAM F4 VCI values. ++#define VCI_OAM_F4_SEGMENT 3 ++#define VCI_OAM_F4_END_TO_END 4 ++#define VCI_RM 6 ++ ++// Values for ATM_VCC_DATA_PARMS ucFlags. ++#define ATMDATA_CI 0x04 ++#define ATMDATA_CLP 0x08 ++ ++// [BCM635x Only] DSP specific values. ++#define DSP_VCID 31 ++ ++// ATM cell layer interface name ++#define ATM_CELL_LAYER_IFNAME "atm0" ++ ++// AAL5 CPCS layer interface name ++#define AAL5_CPCS_LAYER_IFNAME "cpcs0" ++ ++//************************************************************************** ++// Type Definitions ++//************************************************************************** ++ ++// Return status values ++typedef enum BcmAtmStatus ++{ ++ STS_SUCCESS = 0, ++ STS_ERROR, ++ STS_STATE_ERROR, ++ STS_PARAMETER_ERROR, ++ STS_ALLOC_ERROR, ++ STS_RESOURCE_ERROR, ++ STS_IN_USE, ++ STS_VCC_DOWN, ++ STS_INTERFACE_DOWN, ++ STS_LINK_DOWN, ++ STS_NOT_FOUND, ++ STS_NOT_SUPPORTED, ++ STS_VCAM_MULT_MATCH_ERROR, ++ STS_CCAM_MULT_MATCH_ERROR, ++ STS_PKTERR_INVALID_VPI_VCI, ++ STS_PKTERR_PORT_NOT_ENABLED, ++ STS_PKTERR_HEC_ERROR, ++ STS_PKTERR_PTI_ERROR, ++ STS_PKTERR_RECEIVED_IDLE_CELL, ++ STS_PKTERR_CIRCUIT_TYPE_ERROR, ++ STS_PKTERR_OAM_RM_CRC_ERROR, ++ STS_PKTERR_GFC_ERROR, ++ STS_PKTERR_AAL5_AAL0_CRC_ERROR, ++ STS_PKTERR_AAL5_AAL0_SHORT_PKT_ERROR, ++ STS_PKTERR_AAL5_AAL0_LENGTH_ERROR, ++ STS_PKTERR_AAL5_AAL0_BIG_PKT_ERROR, ++ STS_PKTERR_AAL5_AAL0_SAR_TIMEOUT_ERROR, ++ STS_PKTERR_AAL2F_HEC_ERROR, ++ STS_PKTERR_AAL2F_SEQ_NUM_ERROR, ++ STS_PKTERR_AAL2F_PARITY_ERROR, ++ STS_PKTERR_AAL2F_CRC_ERROR, ++ STS_PKTERR_AAL2F_CAM_ERROR, ++ STS_PKTERR_AAL2F_BIG_PKT_ERROR, ++ STS_PKTERR_AAL2F_RAS_TIMEOUT_ERROR, ++ STS_PKTERR_AAL2F_SHORT_PKT_ERROR, ++ STS_PKTERR_AAL2F_LENGTH_MISMATCH_ERROR, ++ STS_PKTERR_AAL2V_HEC_ERROR, ++ STS_PKTERR_AAL2V_SEQ_NUM_ERROR, ++ STS_PKTERR_AAL2V_PARITY_ERROR, ++ STS_PKTERR_AAL2V_CRC_ERROR, ++ STS_PKTERR_AAL2V_CAM_ERROR, ++ STS_PKTERR_AAL2V_OSF_MISMATCH_ERROR, ++ STS_PKTERR_AAL2V_OSF_ERROR, ++ STS_PKTERR_AAL2V_HEC_OVERLAP_ERROR, ++ STS_PKTERR_AAL2V_BIG_PKT_ERROR, ++ STS_PKTERR_AAL2V_RAS_ERROR, ++ STS_PKTERR_AAL2V_UUI_ERROR ++} BCMATM_STATUS; ++ ++ ++// ATM_VCC_ADDR identifies a Virtual Channel Connection (VCC). ++typedef struct AtmVccAddr ++{ ++ UINT32 ulInterfaceId; ++ UINT16 usVpi; ++ UINT16 usVci; ++} ATM_VCC_ADDR, *PATM_VCC_ADDR; ++ ++ ++// ATM_PORT_CFG contains ATM physical port configuration parameters. ++typedef struct AtmPortCfg ++{ ++ UINT32 ulInterfaceId; ++ UINT8 ucPortType; ++ UINT8 ucPortAddr; ++ UINT8 ucReserved[2]; ++} ATM_PORT_CFG, *PATM_PORT_CFG; ++ ++ ++// ATM_INITIALIZATION_PARMS contains ATM API module initialization parameters. ++#define ID_ATM_INITIALIZATION_PARMS 2 ++typedef struct AtmInitialization ++{ ++ UINT32 ulStructureId; ++ UINT32 ulThreadPriority; ++ UINT16 usFreeCellQSize; ++ UINT16 usFreePktQSize; ++ UINT16 usFreePktQBufferSize; ++ UINT16 usFreePktQBufferOffset; // offset into buffer to start receiving data ++ UINT16 usReceiveCellQSize; ++ UINT16 usReceivePktQSize; ++ UINT8 ucTransmitFifoPriority; // [BCM635x Only] ++ UINT8 ucReserved; ++ UINT16 usAal5CpcsMaxSduLength; ++ UINT16 usAal2SscsMaxSsarSduLength; // [BCM635x Only] ++ ATM_PORT_CFG PortCfg[PHY_NUM_PORTS]; ++} ATM_INITIALIZATION_PARMS, *PATM_INITIALIZATION_PARMS; ++ ++ ++// ATM_TRAFFIC_DESCR_PARM_ENTRY contains the fields needed to create a Traffic ++// Descriptor Table parameter entry. ++#define ID_ATM_TRAFFIC_DESCR_PARM_ENTRY 1 ++typedef struct AtmTrafficDescrParmEntry ++{ ++ UINT32 ulStructureId; ++ UINT32 ulTrafficDescrIndex; ++ UINT32 ulTrafficDescrType; ++ UINT32 ulTrafficDescrParm1; ++ UINT32 ulTrafficDescrParm2; ++ UINT32 ulTrafficDescrParm3; ++ UINT32 ulTrafficDescrParm4; ++ UINT32 ulTrafficDescrParm5; ++ UINT32 ulTrafficDescrRowStatus; ++ UINT32 ulServiceCategory; ++ UINT32 ulTrafficFrameDiscard; ++} ATM_TRAFFIC_DESCR_PARM_ENTRY, *PATM_TRAFFIC_DESCR_PARM_ENTRY; ++ ++ ++// ATM_INTERFACE_CFG contains configuration fields for an ATM interface. ++#define ID_ATM_INTERFACE_CFG 3 ++typedef struct AtmInterfaceCfg ++{ ++ UINT32 ulStructureId; ++ UINT32 ulAtmInterfaceMaxVccs; ++ UINT32 ulAtmInterfaceConfVccs; ++ UINT32 ulAtmInterfaceMaxActiveVpiBits; ++ UINT32 ulAtmInterfaceMaxActiveVciBits; ++ UINT32 ulAtmInterfaceCurrentMaxVpiBits; ++ UINT32 ulAtmInterfaceCurrentMaxVciBits; ++ UINT32 ulIfAdminStatus; ++ UINT32 ulIfOperStatus; // read-only ++ UINT32 ulSendNullCells; ++ UINT32 ulTcScramble; ++ UINT32 ulPortType; // read-only ++ UINT32 ulIfLastChange; ++} ATM_INTERFACE_CFG, *PATM_INTERFACE_CFG; ++ ++ ++// ATM_VCC_TRANSMIT_QUEUE_PARMS contains fields for configuring an transmit ++// queue. ++#define ID_ATM_VCC_TRANSMIT_QUEUE_PARMS 1 ++typedef struct AtmVccTransmitQueueParms ++{ ++ UINT32 ulStructureId; ++ UINT32 ulSize; ++ UINT32 ulPriority; ++ UINT32 ulReserved; ++} ATM_VCC_TRANSMIT_QUEUE_PARMS, *PATM_VCC_TRANSMIT_QUEUE_PARMS; ++ ++ ++// ATM_AAL5_VCC_CFG contains configuration fields for an ATM AAL5 Virtual ++// Channel Connection (VCC). ++typedef struct AtmAal5VccCfg ++{ ++ UINT32 ulAtmVccEncapsType; ++ UINT32 ulAtmVccCpcsAcceptCorruptedPdus; ++} ATM_AAL5_VCC_CFG, *PATM_AAL5_VCC_CFG; ++ ++ ++// [BCM635x Only] ATM_AAL2_VCC_CFG contains configuration fields for an ATM ++// AAL2 Virtual Channel Connection (VCC). ++typedef struct AtmAal2VccCfg ++{ ++ UINT8 ucAal2CpsMaxMultiplexedChannels; ++ UINT8 ucAal2CpsMaxSduLength; ++ UINT8 ucAal2CpsCidLowerLimit; ++ UINT8 ucAal2CpsCidUpperLimit; ++ UINT8 ucAal2CpsOptimisation; ++ UINT8 ucReserved[3]; ++} ATM_AAL2_VCC_CFG, *PATM_AAL2_VCC_CFG; ++ ++ ++// ATM_AAL0_VCC_CFG contains configuration fields for an ATM AAL0 Virtual ++// Channel Connection (VCC). ++typedef struct AtmAal0VccCfg ++{ ++ UINT8 ucReserved; ++ // Reserved for future use. ++} ATM_AAL0_VCC_CFG, *PATM_AAL0_VCC_CFG; ++ ++ ++// ATM_VCC_CFG contains configuration fields for an ATM Virtual Channel ++// Connection (VCC). ++#define ID_ATM_VCC_CFG 2 ++#define TX_Q_PARM_SIZE 8 ++typedef struct AtmVccCfg ++{ ++ UINT32 ulStructureId; ++ UINT32 ulAalType; ++ UINT32 ulAtmVclAdminStatus; ++ UINT32 ulAtmVclOperStatus; ++ UINT32 ulAtmVclLastChange; ++ UINT32 ulAtmVclReceiveTrafficDescrIndex; ++ UINT32 ulAtmVclTransmitTrafficDescrIndex; ++ UINT32 ulTransmitQParmsSize; ++ ATM_VCC_TRANSMIT_QUEUE_PARMS TransmitQParms[TX_Q_PARM_SIZE]; ++ union ++ { ++ ATM_AAL5_VCC_CFG Aal5Cfg; ++ ATM_AAL2_VCC_CFG Aal2Cfg; // [BCM635x Only] ++ ATM_AAL0_VCC_CFG Aal0Cfg; ++ } u; ++} ATM_VCC_CFG, *PATM_VCC_CFG; ++ ++ ++// ATM_INTF_ATM_STATS contains statistics for the ATM layer of an interface. ++typedef struct AtmIntfAtmStats ++{ ++ UINT32 ulIfInOctets; ++ UINT32 ulIfOutOctets; ++ UINT32 ulIfInErrors; ++ UINT32 ulIfInUnknownProtos; ++ UINT32 ulIfOutErrors; ++ ++ // The following fields are added together to calculate ulIfInErrors. ++ UINT32 ulIfInHecErrors; ++ ++ // The following fields are added together to calculate ulIfInUnknownProtos. ++ UINT32 ulIfInInvalidVpiVciErrors; ++ UINT32 ulIfInPortNotEnabledErrors; ++ UINT32 ulIfInPtiErrors; ++ UINT32 ulIfInIdleCells; ++ UINT32 ulIfInCircuitTypeErrors; ++ UINT32 ulIfInOamRmCrcErrors; ++ UINT32 ulIfInGfcErrors; ++} ATM_INTF_ATM_STATS, *PATM_INTF_ATM_STATS; ++ ++ ++// [BCM635x Only] ATM_INTF_ATM_STATS contains statistics for the TC layer. ++typedef struct AtmIntfTcStats ++{ ++ UINT32 ulTcInDataCells; ++ UINT32 ulTcInTotalCells; ++ UINT32 ulTcInHecErrors; ++ UINT32 ulTcInOcdEvents; ++ UINT32 ulTcAlarmState; ++} ATM_INTF_TC_STATS, *PATM_INTF_TC_STATS; ++ ++ ++// ATM_INTF_AAL5_AAL0_STATS contains statistics for all AAL5/AAL0 VCCs on an ++// ATM interface. ++typedef struct AtmIntfAal5Aal0Stats ++{ ++ UINT32 ulIfInOctets; ++ UINT32 ulIfOutOctets; ++ UINT32 ulIfInUcastPkts; ++ UINT32 ulIfOutUcastPkts; ++ UINT32 ulIfInErrors; ++ UINT32 ulIfOutErrors; ++ UINT32 ulIfInDiscards; ++ UINT32 ulIfOutDiscards; ++} ATM_INTF_AAL5_AAL0_STATS, *PATM_INTF_AAL5_AAL0_STATS; ++ ++ ++// [BCM635x Only] ATM_INTF_AAL2_STATS contains statistics for all AAL2 VCCs ++// on an ATM interface. ++typedef struct AtmIntfAal2Stats ++{ ++ UINT32 ulIfInOctets; ++ UINT32 ulIfOutOctets; ++ UINT32 ulIfInUcastPkts; ++ UINT32 ulIfOutUcastPkts; ++ UINT32 ulIfInErrors; ++ UINT32 ulIfOutErrors; ++ UINT32 ulIfInDiscards; ++ UINT32 ulIfOutDiscards; ++} ATM_INTF_AAL2_STATS, *PATM_INTF_AAL2_STATS; ++ ++ ++// ATM_INTERFACE_STATS contains statistics for an ATM interface. ++#define ID_ATM_INTERFACE_STATS 1 ++typedef struct AtmInterfaceStats ++{ ++ UINT32 ulStructureId; ++ ATM_INTF_ATM_STATS AtmIntfStats; ++ ATM_INTF_TC_STATS TcIntfStats; // [BCM635x Only] ++ ATM_INTF_AAL5_AAL0_STATS Aal5IntfStats; ++ ATM_INTF_AAL2_STATS Aal2IntfStats; // [BCM635x Only] ++ ATM_INTF_AAL5_AAL0_STATS Aal0IntfStats; ++} ATM_INTERFACE_STATS, *PATM_INTERFACE_STATS; ++ ++ ++// ATM_VCC_AAL5_STATS contains statistics for an AAL5 VCC. ++typedef struct AtmVccAal5Stats ++{ ++ UINT32 ulAal5VccCrcErrors; ++ UINT32 ulAal5VccSarTimeOuts; ++ UINT32 ulAal5VccOverSizedSdus; ++ UINT32 ulAal5VccShortPacketErrors; ++ UINT32 ulAal5VccLengthErrors; ++} ATM_VCC_AAL5_STATS, *PATM_VCC_AAL5_STATS; ++ ++ ++// [BCM635x Only] ATM_VCC_AAL2_STATS contains statistics for an AAL2 VCC. ++typedef struct AtmVccAal2Stats ++{ ++ UINT32 ulAal2CpsInPkts; ++ UINT32 ulAal2CpsOutPkts; ++ UINT32 ulAal2CpsParityErrors; ++ UINT32 ulAal2CpsSeqNumErrors; ++ UINT32 ulAal2CpsOsfMismatchErrors; ++ UINT32 ulAal2CpsOsfErrors; ++ UINT32 ulAal2CpsHecOverlapErrors; ++ UINT32 ulAal2CpsHecErrors; ++ UINT32 ulAal2CpsOversizedSduErrors; ++ UINT32 ulAal2CpsReassemblyErrors; ++ UINT32 ulAal2CpsUuiErrors; ++ UINT32 ulAal2CpsCidErrors; ++ UINT32 ulAal2SscsOversizedSssarSduErrors; ++ UINT32 ulAal2SscsSssarRasTimerExipiryErrors; ++ UINT32 ulAal2SscsUndersizedSstedPduErrors; ++ UINT32 ulAal2SscsSstedPduLengthMismatchErrors; ++ UINT32 ulAal2SscsSstedCrcMismatchErrors; ++} ATM_VCC_AAL2_STATS, *PATM_VCC_AAL2_STATS; ++ ++ ++// ATM_VCC_AAL0PKT_STATS contains statistics for an AAL0 Packet VCC. ++typedef struct AtmVccAal0PktStats ++{ ++ UINT32 ulAal0VccSarTimeOuts; ++ UINT32 ulAal0VccOverSizedSdus; ++} ATM_VCC_AAL0PKT_STATS, *PATM_VCC_AAL0PKT_STATS; ++ ++ ++// ATM_VCC_AAL0CELL_STATS contains statistics for an AAL0 Cell with CRC VCC. ++typedef struct AtmVccAal0CellStats ++{ ++ UINT32 ulAal0VccCrcErrors; ++} ATM_VCC_AAL0CELL_STATS, *PATM_VCC_AAL0CELL_STATS; ++ ++ ++// ATM_VCC_STATS contains statistics for a VCC. ++#define ID_ATM_VCC_STATS 1 ++typedef struct AtmVccStatistics ++{ ++ UINT32 ulStructureId; ++ UINT32 ulAalType; ++ union ++ { ++ ATM_VCC_AAL5_STATS AtmVccAal5Stats; ++ ATM_VCC_AAL2_STATS AtmVccAal2Stats; // [BCM635x Only] ++ ATM_VCC_AAL0PKT_STATS AtmVccAal0PktStats; ++ ATM_VCC_AAL0CELL_STATS AtmVccAal0CellStats; ++ } u; ++} ATM_VCC_STATS, *PATM_VCC_STATS; ++ ++ ++// ATM_INTERFACE_LINK_INFO contains fields for the physical link that the ++// ATM interface is using. ++#define ID_ATM_INTERFACE_LINK_INFO 1 ++typedef struct AtmInterfaceLinkInfo ++{ ++ UINT32 ulStructureId; ++ UINT32 ulLinkState; ++ UINT32 ulLineRate; ++ UINT32 ulReserved[2]; ++} ATM_INTERFACE_LINK_INFO, *PATM_INTERFACE_LINK_INFO; ++ ++ ++// AN_INTF_CHANGE_PARMS contains notification fields that passed to an ++// application callback function when the ATM interface goes up or down. ++#define ID_AN_INTF_CHANGE_PARMS 1 ++typedef struct AnIntfChangeParms ++{ ++ UINT32 ulInterfaceId; ++ UINT32 ulInterfaceState; ++ UINT32 ulInterfaceLineRate; ++} AN_INTF_CHANGE_PARMS, *PAN_INTF_CHANGE_PARMS; ++ ++ ++// ATM_NOTIFY_PARMS contains notification fields that passed to an application ++// callback function when an ATM notification event occurs. ++typedef struct AtmNotifyParms ++{ ++ UINT32 ulNotifyType; ++ union ++ { ++ AN_INTF_CHANGE_PARMS IntfChangeParms; ++ ++ // Other fields and structures that are specific ++ // to the type of notification are declared here. ++ } u; ++} ATM_NOTIFY_PARMS, *PATM_NOTIFY_PARMS; ++ ++typedef void (*FN_NOTIFY_CB) (PATM_NOTIFY_PARMS pNotifyParms); ++ ++ ++// ATM_VCC_ATTACH_PARMS contains fields for attaching to a VCC. It is used ++// by all BcmAtm_Attach... functions. ++struct AtmVccDataParms; ++typedef void (*FN_RECEIVE_CB) (UINT32 ulHandle, PATM_VCC_ADDR pVccAddr, ++ struct AtmVccDataParms *pDataParms, UINT32 ulParmReceiveData); ++ ++#define ID_ATM_VCC_ATTACH_PARMS 1 ++typedef struct AtmAttachParms ++{ ++ UINT32 ulStructureId; ++ UINT32 ulFlags; ++ FN_RECEIVE_CB pFnReceiveDataCb; ++ UINT32 ulParmReceiveData; ++ ATM_VCC_TRANSMIT_QUEUE_PARMS *pTransmitQParms; ++ UINT32 ulTransmitQParmsSize; ++ UINT32 ulHandle; ++ UINT32 ulReserved; ++} ATM_VCC_ATTACH_PARMS, *PATM_VCC_ATTACH_PARMS; ++ ++ ++// [BCM635x Only] ATM_VCC_AAL2_CHANNEL_ID_PARMS contains fields for ++// configuring an transmit queue. ++#define ID_ATM_VCC_AAL2_CHANNEL_ID_PARMS 1 ++typedef struct AtmVccAal2ChannelIdParms ++{ ++ UINT32 ulStructureId; ++ UINT8 ucChannelId; ++ UINT8 ucVoiceRouting; ++ UINT8 ucFlags; ++ UINT8 ucReserved[5]; ++} ATM_VCC_AAL2_CHANNEL_ID_PARMS, *PATM_VCC_AAL2_CHANNEL_ID_PARMS; ++ ++ ++// ATM_BUFFER contains fields for passing data to, and receive data from, the ++// ATM API. ++typedef struct AtmBuffer ++{ ++ struct AtmBuffer *pNextAtmBuf; ++ UINT8 *pDataBuf; ++ UINT32 ulDataLen; ++ UINT16 usDataOffset; ++ UINT16 usReserved; ++ UINT32 ulReserved; ++} ATM_BUFFER, *PATM_BUFFER; ++ ++ ++// ATM_VCC_DATA_PARMS contains fields for sending or receiving data on a VCC. ++// It is used by all BcmAtm_Send... and receive functions. ++typedef void (*FN_FREE_DATA_PARMS) (struct AtmVccDataParms *pDataParms); ++ ++#define ID_ATM_VCC_DATA_PARMS 2 ++typedef struct AtmVccDataParms ++{ ++ UINT32 ulStructureId; ++ UINT8 ucCircuitType; ++ UINT8 ucAal2ChannelId; // [BCM635x Only] ++ UINT8 ucUuData8; ++ UINT8 ucUuData5; ++ UINT8 ucFlags; ++ UINT8 ucSendPriority; ++ UINT8 ucReserved[2]; ++ BCMATM_STATUS baReceiveStatus; ++ PATM_BUFFER pAtmBuffer; ++ FN_FREE_DATA_PARMS pFnFreeDataParms; ++ UINT32 ulParmFreeDataParms; ++ struct AtmVccDataParms *pApplicationLink; ++ UINT32 ulApplicationDefined[2]; ++} ATM_VCC_DATA_PARMS, *PATM_VCC_DATA_PARMS; ++ ++ ++//************************************************************************** ++// Function Prototypes ++//************************************************************************** ++ ++BCMATM_STATUS BcmAtm_Initialize( PATM_INITIALIZATION_PARMS pInitValues ); ++BCMATM_STATUS BcmAtm_Uninitialize( void ); ++BCMATM_STATUS BcmAtm_GetInterfaceId( UINT8 ucPhyPort, UINT32 *pulInterfaceId ); ++BCMATM_STATUS BcmAtm_GetTrafficDescrTableSize(UINT32 *pulTrafficDescrTableSize); ++BCMATM_STATUS BcmAtm_GetTrafficDescrTable( PATM_TRAFFIC_DESCR_PARM_ENTRY ++ pTrafficDescTable, UINT32 ulTrafficDescrTableSize ); ++BCMATM_STATUS BcmAtm_SetTrafficDescrTable( PATM_TRAFFIC_DESCR_PARM_ENTRY ++ pTrafficDescTable, UINT32 ulTrafficDescrTableSize ); ++BCMATM_STATUS BcmAtm_GetInterfaceCfg( UINT32 ulInterfaceId, PATM_INTERFACE_CFG ++ pInterfaceCfg ); ++BCMATM_STATUS BcmAtm_SetInterfaceCfg( UINT32 ulInterfaceId, PATM_INTERFACE_CFG ++ pInterfaceCfg ); ++BCMATM_STATUS BcmAtm_GetVccCfg( PATM_VCC_ADDR pVccAddr, PATM_VCC_CFG pVccCfg ); ++BCMATM_STATUS BcmAtm_SetVccCfg( PATM_VCC_ADDR pVccAddr, PATM_VCC_CFG pVccCfg ); ++BCMATM_STATUS BcmAtm_GetVccAddrs( UINT32 ulInterfaceId, PATM_VCC_ADDR pVccAddrs, ++ UINT32 ulNumVccs, UINT32 *pulNumReturned ); ++BCMATM_STATUS BcmAtm_GetInterfaceStatistics( UINT32 ulInterfaceId, ++ PATM_INTERFACE_STATS pStatistics, UINT32 ulReset ); ++BCMATM_STATUS BcmAtm_GetVccStatistics( PATM_VCC_ADDR pVccAddr, PATM_VCC_STATS ++ pVccStatistics, UINT32 ulReset ); ++BCMATM_STATUS BcmAtm_SetInterfaceLinkInfo( UINT32 ulInterfaceId, ++ PATM_INTERFACE_LINK_INFO pInterfaceCfg ); ++BCMATM_STATUS BcmAtm_SetNotifyCallback( FN_NOTIFY_CB pFnNotifyCb ); ++BCMATM_STATUS BcmAtm_ResetNotifyCallback( FN_NOTIFY_CB pFnNotifyCb ); ++BCMATM_STATUS BcmAtm_AttachVcc( PATM_VCC_ADDR pVccAddr, PATM_VCC_ATTACH_PARMS ++ pAttachParms ); ++BCMATM_STATUS BcmAtm_AttachMgmtCells( UINT32 ulInterfaceId, ++ PATM_VCC_ATTACH_PARMS pAttachParms ); ++BCMATM_STATUS BcmAtm_AttachTransparent( UINT32 ulInterfaceId, ++ PATM_VCC_ATTACH_PARMS pAttachParms ); ++BCMATM_STATUS BcmAtm_Detach( UINT32 ulHandle ); ++BCMATM_STATUS BcmAtm_SetAal2ChannelIds( UINT32 ulHandle, ++ PATM_VCC_AAL2_CHANNEL_ID_PARMS pChannelIdParms, UINT32 ++ ulNumChannelIdParms ); // [BCM635x Only] ++BCMATM_STATUS BcmAtm_SendVccData( UINT32 ulHandle, ++ PATM_VCC_DATA_PARMS pDataParms ); ++BCMATM_STATUS BcmAtm_SendMgmtData( UINT32 ulHandle, PATM_VCC_ADDR pVccAddr, ++ PATM_VCC_DATA_PARMS pDataParms ); ++BCMATM_STATUS BcmAtm_SendTransparentData( UINT32 ulHandle, UINT32 ulInterfaceId, ++ PATM_VCC_DATA_PARMS pDataParms ); ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif // _BCMATMAPI_H_ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmnet.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmnet.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmnet.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmnet.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,78 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: bcmnet.h */ ++/* DATE: 05/16/02 */ ++/* PURPOSE: network interface ioctl definition */ ++/* */ ++/***********************************************************************/ ++#ifndef _IF_NET_H_ ++#define _IF_NET_H_ ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#define LINKSTATE_DOWN 0 ++#define LINKSTATE_UP 1 ++ ++/*---------------------------------------------------------------------*/ ++/* Ethernet Switch Type */ ++/*---------------------------------------------------------------------*/ ++#define ESW_TYPE_UNDEFINED 0 ++#define ESW_TYPE_BCM5325M 1 ++#define ESW_TYPE_BCM5325E 2 ++#define ESW_TYPE_BCM5325F 3 ++ ++/* ++ * Ioctl definitions. ++ */ ++/* reserved SIOCDEVPRIVATE */ ++enum { ++ SIOCGLINKSTATE = SIOCDEVPRIVATE + 1, ++ SIOCSCLEARMIBCNTR, ++ SIOCGIFTRANSSTART, ++ SIOCMIBINFO, ++ SIOCSDUPLEX, /* 0: auto 1: full 2: half */ ++ SIOCSSPEED, /* 0: auto 1: 100mbps 2: 10mbps */ ++ SIOCCIFSTATS, ++ SIOCGENABLEVLAN, ++ SIOCGDISABLEVLAN, ++ SIOCGQUERYNUMVLANPORTS, ++ SIOCGSWITCHTYPE, ++ SIOCGQUERYNUMPORTS, ++ SIOCLAST ++}; ++ ++#define SPEED_10MBIT 10000000 ++#define SPEED_100MBIT 100000000 ++ ++typedef struct IoctlMibInfo ++{ ++ unsigned long ulIfLastChange; ++ unsigned long ulIfSpeed; ++} IOCTL_MIB_INFO, *PIOCTL_MIB_INFO; ++ ++ ++#if __cplusplus ++} ++#endif ++ ++#endif /* _IF_NET_H_ */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmos.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmos.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmos.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmos.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,98 @@ ++/*************************************************************************** ++* Copyright 2000 Broadcom Corporation ++* All Rights Reserved ++* No portions of this material may be reproduced in any form without the ++* written permission of: ++* Broadcom Corporation ++* 16251 Laguna Canyon Road ++* Irvine, California 92618 ++* All information contained in this document is Broadcom Corporation ++* company private, proprietary, and trade secret. ++* ++**************************************************************************** ++* ++* Filename: bcmos.h ++* Creation Date: 8 June 2000 (v0.00) ++* VSS Info: ++* $Revision: 16 $ ++* $Date: 5/03/01 5:03p $ ++* ++**************************************************************************** ++* Description: ++* ++* Broadcom Generic Operating System Functions. ++* ++****************************************************************************/ ++ ++#ifndef _BCMOS_H ++#define _BCMOS_H ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#ifdef __KERNEL__ ++#include <cxcEnv.h> ++#include <bosSleep.h> ++#include <bosTask.h> ++ ++#include <linux/kernel.h> ++#include <linux/slab.h> ++#include <linux/interrupt.h> ++#include <bcmtypes.h> ++ ++#define malloc(arg) kmalloc(arg, GFP_KERNEL) ++#define free(arg) kfree(arg) ++ ++#define BCMOS_ASSERT(expr) \ ++if ((expr)? 0:1) \ ++{ \ ++ printk(" ASSERT !!! File %s, line %u \n", __FILE__, __LINE__); \ ++ bosSleep( 10 ); \ ++ cli(); /* Disable interrupts */ \ ++ while(1){ ; } \ ++} ++ ++#define CXC_ASSERT BCMOS_ASSERT // For compatibility with CX's endpoint ++ ++/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ ++/* Special BOS definitions */ ++/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ ++#define DSL_NO_RESETSUPPORT ++ ++ ++#define bosSocketHtoNL( num ) ((UINT32)( num )) ++#define bosSocketHtoNS( num ) ((UINT16)( num )) ++#define bosSocketNtoHL( num ) ((UINT32)( num )) ++#define bosSocketNtoHS( num ) ((UINT16)( num )) ++#define bosSocketNtoHS( num ) ((UINT16)( num )) ++#define bosSocketNtoHU16 bosSocketNtoHS ++ ++ ++#else /* LINUX */ ++ ++#include <cxcEnv.h> ++#include <assert.h> ++#include <string.h> ++#include <malloc.h> ++ ++#define BCMOS_TASKNAME( nameVar, nameStr ) char nameVar[] = nameStr ++ ++#define TEN_MSEC 10 ++#define TWENTY_MSEC 20 ++#define ONE_HUNDRED_MSEC 100 ++#define FIVE_HUNDRED_MSEC 500 ++#define ONE_SECOND 1000 ++#define TWO_SECONDS 2000 ++ ++#define BCMOS_ASSERT( expr) assert( expr ) ++ ++#endif ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++ ++#endif /* _BCMOS_H */ ++ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/cxcEnv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/cxcEnv.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/cxcEnv.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/cxcEnv.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,79 @@ ++/*************************************************************************** ++* Copyright 2000 Broadcom Corporation ++* All Rights Reserved ++* No portions of this material may be reproduced in any form without the ++* written permission of: ++* Broadcom Corporation ++* 16251 Laguna Canyon Road ++* Irvine, California 92618 ++* All information contained in this document is Broadcom Corporation ++* company private, proprietary, and trade secret. ++* ++**************************************************************************** ++* ++* Filename: cxcEnv.h ++* Creation Date: ++* VSS Info: ++* $Revision: 43 $ ++* $Date: 12/03/02 5:50p $ ++* ++**************************************************************************** ++* Description: ++* ++* This file is used in CableX to provide system-wide types and definitions. Howewever. ++* since iit tries to include various C run-time library dcefintions (eh stdio.h, it is not ++* appropriate for use "as is" in a Linux kernel environment. So the CableX endpoint source ++* does not need to change, we use this file to recursively include bcmtypes.h ++* ++* NOTE: This file is based upon LDX's hausenv.h, but has been renamed to ++* avoid project dependencies, and allow for CablexChange customizations. ++* ++****************************************************************************/ ++ ++#ifndef CXC_ENV_H ++#define CXC_ENV_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* -------------------------------------------------------------------------- ++** Just include definitions from bcmtypes.h ++*/ ++#include <bcmtypes.h> ++ ++#undef EPT_TEST ++ ++#if !defined( HAUS_SINT16_DEFINED ) ++#define HAUS_SINT16_DEFINED ++typedef signed short SINT16; /* SINT16 is platform independant */ ++#endif ++ ++ ++#if !defined( HAUS_SINT32_DEFINED ) ++#define HAUS_SINT32_DEFINED ++typedef signed long SINT32; ++#endif ++ ++#define SUCCESS 0 ++#define FAILURE 1 ++ ++ ++// GNU definition imported from cxc_compiler.h ++#define CXC_INLINE __inline__ ++ ++// Endian-ness imported from cxc_cpu.h ++#define CXC_CPU_BIG_ENDIAN 1 ++#define CXC_CPU_LITTLE_ENDIAN 0 ++ ++#if defined(__KERNEL__) ++#define CXC_OS_LINUX 1 ++#define PSOS 0 ++#define VXWORKS 0 ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* CXC_ENV_H */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/cxcLog.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/cxcLog.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/cxcLog.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/cxcLog.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,34 @@ ++/*************************************************************************** ++* Copyright 2000 Broadcom Corporation ++* All Rights Reserved ++* No portions of this material may be reproduced in any form without the ++* written permission of: ++* Broadcom Corporation ++* 16251 Laguna Canyon Road ++* Irvine, California 92618 ++* All information contained in this document is Broadcom Corporation ++* company private, proprietary, and trade secret. ++* ++**************************************************************************** ++* ++* Filename: log.h ++* Creation Date: 17 September 2001 (v0.00) ++* VSS Info: ++* $Revision: 3 $ ++* $Date: 11/13/02 3:42p $ ++* ++**************************************************************************** ++* Description: ++* ++* This filename is preserved in order to minimize the changes ++* in the endpoint code, which is shared with the Cablex endpoint. ++* cxcLog.h simply includes log.h, which contains the log macros. ++* ++****************************************************************************/ ++ ++#ifndef CXC_LOG_H ++#define CXC_LOG_H ++ ++#include <log.h> ++ ++#endif /* CXC_LOG_H */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,243 @@ ++/*************************************************************************** ++ * Broadcom Corp. Confidential ++ * Copyright 2001 Broadcom Corp. All Rights Reserved. ++ * ++ * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED ++ * SOFTWARE LICENSE AGREEMENT BETWEEN THE USER AND BROADCOM. ++ * YOU HAVE NO RIGHT TO USE OR EXPLOIT THIS MATERIAL EXCEPT ++ * SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. ++ * ++ *************************************************************************** ++ * File Name : EndpointDrv.h ++ * ++ * Description: This file contains the definitions and structures for the ++ * Linux IOCTL interface that used between the user mode Endpoint ++ * API library and the kernel Endpoint API driver. ++ * ++ * Updates : 04/04/2002 YD. Created. ++ ***************************************************************************/ ++ ++#if !defined(_ENDPOINTDRV_H_) ++#define _ENDPOINTDRV_H_ ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++/* Includes. */ ++#include <bcmtypes.h> ++#include <vrgEndpt.h> ++#include <endptvoicestats.h> ++ ++/* Maximum size for the event data passed with the event callback */ ++#define MAX_EVENTDATA_SIZE 256 ++ ++typedef enum ENDPOINTIOCTL_INDEX ++{ ++ ENDPTIO_INIT_INDEX = 0, ++ ENDPTIO_DEINIT_INDEX, ++ ENDPTIO_CREATE_INDEX, ++ ENDPTIO_CAPABILITIES_INDEX, ++ ENDPTIO_SIGNAL_INDEX, ++ ENDPTIO_CREATE_CONNECTION_INDEX, ++ ENDPTIO_MODIFY_CONNECTION_INDEX, ++ ENDPTIO_DELETE_CONNECTION_INDEX, ++ ENDPTIO_PACKET_INDEX, ++ ENDPTIO_GET_PACKET_INDEX, ++ ENDPTIO_GET_EVENT_INDEX, ++ ENDPTIO_GET_CODECMAP_INDEX, ++ ENDPTIO_VOICESTAT_INDEX, ++ ENDPTIO_ISINITIALIZED_INDEX, ++ ENDPTIO_CONSOLE_CMD_INDEX, ++ ENDPTIO_TEST_INDEX, ++ ENDPTIO_ENDPOINTCOUNT_INDEX, ++ ENDPTIO_MAX_INDEX ++} ENDPOINTIOCTL_INDEX; ++ ++ ++/* Defines. */ ++#define ENDPOINTDRV_MAJOR 209 /* arbitrary unused value */ ++ ++#define ENDPOINTIOCTL_ENDPT_INIT \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_INIT_INDEX, ENDPOINTDRV_INIT_PARAM) ++ ++#define ENDPOINTIOCTL_ENDPT_DEINIT \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_DEINIT_INDEX, ENDPOINTDRV_INIT_PARAM) ++ ++#define ENDPOINTIOCTL_ENDPT_CREATE \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_CREATE_INDEX, ENDPOINTDRV_CREATE_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_CAPABILITIES \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_CAPABILITIES_INDEX, ENDPOINTDRV_CAP_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_SIGNAL \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_SIGNAL_INDEX, ENDPOINTDRV_SIGNAL_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_CREATE_CONNECTION \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_CREATE_CONNECTION_INDEX, ENDPOINTDRV_CONNECTION_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_MODIFY_CONNECTION \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_MODIFY_CONNECTION_INDEX, ENDPOINTDRV_CONNECTION_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_DELETE_CONNECTION \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_DELETE_CONNECTION_INDEX, ENDPOINTDRV_DELCONNECTION_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_PACKET \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_PACKET_INDEX, ENDPOINTDRV_PACKET_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_GET_PACKET \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_GET_PACKET_INDEX, ENDPOINTDRV_PACKET_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_GET_EVENT \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_GET_EVENT_INDEX, ENDPOINTDRV_EVENT_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_GET_CODECMAP \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_GET_CODECMAP_INDEX, ENDPOINTDRV_CODECMAP_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_VOICESTAT \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_VOICESTAT_INDEX, ENDPOINTDRV_VOICESTAT_PARM) ++ ++#define ENDPOINTIOCTL_ISINITIALIZED \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_ISINITIALIZED_INDEX, ENDPOINTDRV_ISINITIALIZED_PARM) ++ ++#define ENDPOINTIOCTL_ENDPT_CONSOLE_CMD \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_CONSOLE_CMD_INDEX, ENDPOINTDRV_CONSOLE_CMD_PARM) ++ ++#define ENDPOINTIOCTL_TEST \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_TEST_INDEX, ENDPOINTDRV_TESTPARM) ++ ++#define ENDPOINTIOCTL_ENDPOINTCOUNT \ ++ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_ENDPOINTCOUNT_INDEX, ENDPOINTDRV_ENDPOINTCOUNT_PARM) ++ ++#define MAX_ENDPOINTDRV_IOCTL_COMMANDS ENDPTIO_MAX_INDEX ++ ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ VRG_COUNTRY country; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_INIT_PARAM, *PENDPOINTDRV_INIT_PARAM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ UINT32 physId; ++ UINT32 lineId; ++ VRG_ENDPT_STATE* endptState; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_CREATE_PARM, *PENDPOINTDRV_CREATE_PARM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ EPZCAP* capabilities; ++ ENDPT_STATE* state; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_CAP_PARM, *PENDPOINTDRV_CAP_PARM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ ENDPT_STATE* state; ++ UINT32 cnxId; ++ EPSIG signal; ++ UINT32 value; // Reserve an array, can be a pointer ++ EPSTATUS epStatus; ++ int duration; ++ int period; ++ int repetition; ++} ENDPOINTDRV_SIGNAL_PARM, *PENDPOINTDRV_SIGNAL_PARM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ ENDPT_STATE* state; ++ int cnxId; ++ EPZCNXPARAM* cnxParam; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_CONNECTION_PARM, *PENDPOINTDRV_CONNECTION_PARM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ ENDPT_STATE* state; ++ int cnxId; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_DELCONNECTION_PARM, *PENDPOINTDRV_DELCONNECTION_PARM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ ENDPT_STATE* state; ++ int cnxId; ++ EPPACKET* epPacket; ++ int length; ++ UINT32 bufDesc; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_PACKET_PARM, *PENDPOINTDRV_PACKET_PARM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ int lineId; ++ int cnxId; ++ int length; ++ EPEVT event; ++ UINT8 eventData[MAX_EVENTDATA_SIZE]; ++} ENDPOINTDRV_EVENT_PARM, *PENDPOINTDRV_EVENT_PARM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ int isInitialized; ++} ENDPOINTDRV_ISINITIALIZED_PARM, *PENDPOINTDRV_ISINITIALIZED_PARM; ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ UINT32 testParm1; ++ UINT32 testParm2; ++ EPZCNXPARAM* testParm3; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_TESTPARM, *PENDPOINTDRV_TESTPARM; ++ ++typedef struct ENDPOINTDRV_PACKET ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ int cnxId; ++ int length; ++ EPMEDIATYPE mediaType; ++ UINT8 data[1024]; ++} ENDPOINTDRV_PACKET; ++ ++typedef struct ENDPOINTDRV_VOICESTAT_PARM ++{ ++ int lineId; ++ ENDPT_VOICE_STATS* stats; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_VOICESTAT_PARM, *PENDPOINTDRV_VOICESTAT_PARM; ++ ++typedef struct ENDPOINTDRV_CONSOLE_CMD_PARM ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ int lineId; ++ int cnxId; ++ int cmd; ++ ENDPT_STATE* state; ++ EPSTATUS epStatus; ++} ENDPOINTDRV_CONSOLE_CMD_PARM, *PENDPOINTDRV_CONSOLE_CMD_PARM; ++ ++ ++typedef struct ++{ ++ UINT32 size; /* Size of the structure (including the size field) */ ++ int endpointNum; ++} ENDPOINTDRV_ENDPOINTCOUNT_PARM, *PENDPOINTDRV_ENDPOINTCOUNT_PARM; ++ ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif // _ENDPOINTDRV_H_ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,106 @@ ++/*************************************************************************** ++ * Broadcom Corp. Confidential ++ * Copyright 2001 Broadcom Corp. All Rights Reserved. ++ * ++ * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED ++ * SOFTWARE LICENSE AGREEMENT BETWEEN THE USER AND BROADCOM. ++ * YOU HAVE NO RIGHT TO USE OR EXPLOIT THIS MATERIAL EXCEPT ++ * SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. ++ * ++ *************************************************************************** ++ * File Name : endptvoicestats.h ++ * ++ * Description: This file contains the definitions of the voice statistics ++ * structures. This file should be used in user space when ++ * working with the voice statistics structure. ++ * ++ * The files hpnet.h and hppve.h ++ * should not be included in user space because of a conflict ++ * in the definitions supplied by hausenv.h (in the endpoint/vocm/ ++ * ldxIntf/dspinc directory) and the definitions supplied by bcmtypes.h ++ * (in the /sgibcm_2_4_17/linux/include/asm-mips/bcm96345 directory). ++ * ++ * Updates : ++ ***************************************************************************/ ++ ++#if !defined(ENDPTSTATS_H) ++#define ENDPTSTATS_H ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++typedef struct ++{ ++#ifdef ENDPT_6345 ++ UINT16 peakHoldingTime; /* Peak Holding Time since last statistic */ ++ ++ /* Total number of superpackets arriving on the egress path */ ++ UINT16 packetCount; /* # of packets received */ ++ ++ /* addTail and reorder are successful additions to the JB */ ++ /* addTail is typically 1..N times the packetCount if superpackets are enabled */ ++ UINT16 addTailCount; /* # of frames added to tail of JB - normal case */ ++ UINT16 reorderCount; /* # of frames reordered */ ++ ++ /* overrun, duplicate, outOfRange, tooLate, jitterMax excess are packets that have been discarded */ ++ UINT16 overrunCount; /* Decoder overrun count */ ++ UINT16 duplicateCount; /* # of duplicate frames deleted */ ++ UINT16 outOfRangeCount; /* # of frames with timestamps too far from current TS to be handled */ ++ UINT16 tooLateCount; /* Packet arrived too late (it's redundant mate already played) */ ++ ++ /* cantDecode are packets that can't be played out due to algorithm not available */ ++ UINT16 cantDecodeCount; /* Can't decode packet - decoder not in load or pkt hdr bad */ ++ ++ /* The following are internal to the AJC module - they do not represent physical packets */ ++ UINT16 ajcUnderrunCount; /* Adaptive Jitter Control: jitter buffer underruns */ ++ UINT16 ajcDeleteCount; /* Adaptive Jitter Control: # of packet deletes done to reduce holding time */ ++ UINT16 ajcRepeatCount; /* Adaptive Jitter Control: # of packet repeats done to either increase holding time ++ or due to late frame or lost frames. */ ++ UINT16 ajcResyncCount; /* Number of times ajb resynced (went through buildout state) */ ++ UINT16 ajcPhaseJitterCount; /* Number of times ajb inserted a phase discontinuity ++ (possibly in silence or during CNG or due to a repeat/delete). */ ++ /* 14 entries. Make sure this is even (!) */ ++#else ++ UINT16 peakHoldingTime; /* Peak Holding Time since last statistic */ ++ UINT16 minimumHoldingTime; /* Long-term tracker of min. Hold Time */ ++ UINT16 targetHoldingTime; /* Target holding Time */ ++ UINT16 inactiveFrameCount; /* Inactive Frame Count */ ++ UINT16 activeFrameCount; /* Active Frame Count */ ++ UINT16 hsxDecoderOverrunCount; /* Decoder overrun count */ ++ UINT16 hsxDecoderUnderrunCount; /* Decoder underrun count */ ++ UINT16 lostFrameCount; /* Lost frames resulting in frame repeat */ ++#endif ++} ENDPT_VOICE_DECODERSTATS; ++ ++/* Encoder Statistics */ ++typedef struct ++{ ++#ifdef ENDPT_6345 ++ UINT16 inactiveFrameCount; /* Inactive Frame Count of Suppressed Frames*/ ++ UINT16 activeFrameCount; /* Active Frame Count - actually sent ingress */ ++ UINT16 sidFrameCount; /* SID Frame Count */ ++ UINT16 toneRelayCount; /* # of tone packets from PTE relayed ingress */ ++#else ++ UINT16 hsxEncoderOverrunCount; /* Encoder overrun count */ ++#endif ++} ENDPT_VOICE_ENCODERSTATS; ++ ++ ++typedef struct ++{ ++ ENDPT_VOICE_DECODERSTATS decoder; ++ ENDPT_VOICE_ENCODERSTATS encoder; ++} ENDPT_VOICE_PVE_STATS; ++ ++typedef struct ++{ ++ ENDPT_VOICE_PVE_STATS hsxPVEstats; /* statistics for PVE encoder and decoder */ ++ ++} ENDPT_VOICE_STATS; ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif /* ENDPTSTATS_H */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/log.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/log.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/log.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/log.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,104 @@ ++/*************************************************************************** ++* Copyright 2000 Broadcom Corporation ++* All Rights Reserved ++* No portions of this material may be reproduced in any form without the ++* written permission of: ++* Broadcom Corporation ++* 16251 Laguna Canyon Road ++* Irvine, California 92618 ++* All information contained in this document is Broadcom Corporation ++* company private, proprietary, and trade secret. ++* ++**************************************************************************** ++* ++* Filename: log.h ++* Creation Date: 4 July 2000 (v0.00) ++* VSS Info: ++* $Revision: 23 $ ++* $Date: 9/14/01 4:54p $ ++* ++**************************************************************************** ++* Description: ++* ++* This header file contains the needed macros and function prototypes ++* for logging on the terminal. ++* ++****************************************************************************/ ++ ++#ifndef LOG_H ++#define LOG_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define LOG_DBG ++ ++#if (! (defined(__KERNEL__) || defined (LINUX)) ) ++ ++extern void Log( char const *format,...); ++extern void LogMsg( char *string ); ++extern void LogDirectSerial( char const *format,...); ++ ++#define PANIC(m) Log(m) ++#define LOG(fmt) Log fmt ++#define LOGERROR(fmt) Log fmt ++#define LOG1(fmt) Log fmt /* Level 1 logging */ ++#define LOG2(fmt) /* Level 2 logging */ ++#define LOGMSG(buf) LogMsg buf ++ ++/*********************************** ++** Error logging * ++***********************************/ ++#elif defined(__KERNEL__) ++ ++#define LOG(fmt) printk fmt ; printk("\n"); ++#define LOG_RAW(fmt) printk fmt ; printk("\n"); ++#define PANIC(fmt) printk("!!! PANIC !!! \n"); printk fmt ; printk("\n"); ++#define LOGERROR(fmt) printk("!!! ERROR !!! \n"); printk fmt ; printk("\n"); ++ ++#elif defined(LINUX) ++ ++#include <stdio.h> ++ ++#ifdef LOG_DBG ++ ++#include <time.h> ++ ++#define LOG(fmt) \ ++{ \ ++ struct tm *tm_ptr; \ ++ time_t curtime; \ ++ time( &curtime ); \ ++ tm_ptr = gmtime( &curtime ); \ ++ printf("%02d:%02d:%02d ", \ ++ tm_ptr->tm_hour, \ ++ tm_ptr->tm_min, \ ++ tm_ptr->tm_sec); \ ++ printf fmt; \ ++ printf("\n"); \ ++} ++#else ++#define LOG(fmt) printf fmt ; printf("\n"); ++#endif /* LOG_DBG */ ++ ++#define PANIC(fmt) printk("!!! PANIC !!! \n"); printk fmt ; printk("\n"); ++#define LOGERROR(fmt) \ ++{ \ ++ printf("ERROR !!! File %s (line %u): ", __FILE__, __LINE__);\ ++ printf fmt; \ ++ printf("\n"); \ ++} ++ ++#else ++#error Unknown OS ++#endif ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif /* LOG_H */ ++ ++ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/mtacfg.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/mtacfg.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/mtacfg.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/mtacfg.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,72 @@ ++/*************************************************************************** ++* Copyright 2000 Broadcom Corporation ++* All Rights Reserved ++* No portions of this material may be reproduced in any form without the ++* written permission of: ++* Broadcom Corporation ++* 16251 Laguna Canyon Road ++* Irvine, California 92618 ++* All information contained in this document is Broadcom Corporation ++* company private, proprietary, and trade secret. ++* ++**************************************************************************** ++* ++* Filename: mtacfg.h ++* Creation Date: 4 July 2000 (v0.00) ++* VSS Info: ++* $Revision: 23 $ ++* $Date: 9/14/01 4:54p $ ++* ++**************************************************************************** ++* Description: ++* ++* This header file contains all the different build options that ++* are required by CablexChange components. ++* ++****************************************************************************/ ++ ++#ifndef _MTACFG_H ++#define _MTACFG_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include <cfg/endptCfg.h> ++#include <cfg/vocmCfg.h> ++#include <cfg/casCfg.h> ++ ++#define MTA_VERSION_INFO "1.0" ++ ++#if ( defined(IP_MGCP) || defined(IP_H323) || defined(IP_SIP) || defined(IP_MEGACO) ) ++#define VOIP ++#endif ++ ++#ifndef VOIP ++#define ENDPOINT_NULL_SHIM ++#endif ++ ++ ++/*************************************************************** ++** Task Priority options ++****************************************************************/ ++ ++#define RTP_TASK_PRIORITY BCMOS_TASK_PRTY_8 /* task priority for rtp */ ++#define HGCP_TASK_PRIORITY BCMOS_TASK_PRTY_8 /* task priority for HGCP */ ++#define RTCP_TASK_PRIORITY BCMOS_TASK_PRTY_13 /* task priority for rtcp */ ++ ++ ++/* Additional DSL specific definitions not provided by Cable Cfg files */ ++ ++/* For backward compatibility with older code */ ++#define MAX_ENDPT VOCM_CFG_MAX_ENDPT ++#define MAX_CNX VOCM_CFG_MAX_CNX ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif /* MTACFG_H */ ++ ++ ++ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/profdrv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/profdrv.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/profdrv.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/profdrv.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,151 @@ ++/*************************************************************************** ++* Copyright 2004 Broadcom Corporation ++* All Rights Reserved ++* No portions of this material may be reproduced in any form without the ++* written permission of: ++* Broadcom Corporation ++* 16215 Alton Parkway ++* P.O. Box 57013 ++* Irvine, California 92619-7013 ++* All information contained in this document is Broadcom Corporation ++* company private, proprietary, and trade secret. ++* ++**************************************************************************** ++* ++* Filename: profdrv.h ++* ++**************************************************************************** ++* Description: ++* ++* This file contains the profiler device driver ++* ++****************************************************************************/ ++#ifndef PROFDRV_DEVICE_DRIVER__H__INCLUDED ++#define PROFDRV_DEVICE_DRIVER__H__INCLUDED ++ ++#include <linux/ioctl.h> ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define PROFILER_NAME_MAX_LENGTH 32 ++#define PROFILER_MAX_RECSEQ 2048 ++ ++#define PROFILER_CPU_UTIL_VALID_START 0x01 ++#define PROFILER_CPU_UTIL_VALID_STOP 0x02 ++ ++#define PROFILER_SOURCE_USER 0x00 ++#define PROFILER_SOURCE_KERNEL 0x01 ++ ++#ifndef __STR ++#define __STR(x) #x ++#endif ++#ifndef STR ++#define STR(x) __STR(x) ++#endif ++ ++#define profdrv_read_32bit_cp0_register(source) \ ++({ int __res; \ ++ __asm__ __volatile__( \ ++ ".set\tpush\n\t" \ ++ ".set\treorder\n\t" \ ++ "mfc0\t%0,"STR(source)"\n\t" \ ++ ".set\tpop" \ ++ : "=r" (__res)); \ ++ __res;}) ++ ++/* ++ Structure used to pass profiling information data at the user/kernel interface. ++*/ ++typedef struct ++{ ++ char name[PROFILER_NAME_MAX_LENGTH]; ++ ++} PROFILER_IOCTL_DATA; ++ ++/* ++ This structure is used to keep track of the CPU utilization during the profiling period. ++*/ ++typedef struct ++{ ++ unsigned tick_uptime_start; ++ unsigned tick_idle_start; ++ unsigned tick_user_start; ++ unsigned tick_kernel_start; ++ unsigned tick_uptime_stop; ++ unsigned tick_idle_stop; ++ unsigned tick_user_stop; ++ unsigned tick_kernel_stop; ++ unsigned char valid_data; ++ ++} PROFILER_CPU_UTILIZATION; ++ ++/* ++ A generic structure to pass information about the profiler status. ++*/ ++typedef struct ++{ ++ unsigned status; ++ unsigned cpu_jiffies_start; ++ unsigned cpu_jiffies_stop; ++ unsigned cpu_jiffies_factor; ++ unsigned cpu_clock; ++ ++} PROFILER_STATUS; ++ ++/* ++ The ioctl action index. ++*/ ++typedef enum ++{ ++ PROFILER_IOCTL_GET_DATA_DUMP_INDEX, ++ PROFILER_IOCTL_GET_RECSEQ_DATA_DUMP_INDEX, ++ PROFILER_IOCTL_SET_DATA_CLEAN_INDEX, ++ PROFILER_IOCTL_SET_PROF_OPS_INDEX, ++ PROFILER_IOCTL_REGISTER_CALL_INDEX, ++ PROFILER_IOCTL_DEREGISTER_CALL_INDEX, ++ PROFILER_IOCTL_START_CALL_INDEX, ++ PROFILER_IOCTL_STOP_CALL_INDEX, ++ PROFILER_IOCTL_PROFILER_STATUS_INDEX, ++ PROFILER_IOCTL_SET_CPU_UTIL_INDEX, ++ PROFILER_IOCTL_GET_CPU_UTIL_INDEX, ++ PROFILER_IOCTL_GET_RECSEQ_DI_INDEX ++ ++} PROFILER_IOCTL_INDEX; ++ ++/* ++ Assigning a device driver major number for the sake of making this application work ++*/ ++#define PROFDRV_DEVICE_DRIVER_MAJOR 224 ++ ++#define PROFILER_IOCTL_GET_DATA_DUMP \ ++ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_GET_DATA_DUMP_INDEX, unsigned ) ++#define PROFILER_IOCTL_GET_RECSEQ_DATA_DUMP \ ++ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_GET_RECSEQ_DATA_DUMP_INDEX, unsigned ) ++#define PROFILER_IOCTL_SET_DATA_CLEAN \ ++ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_SET_DATA_CLEAN_INDEX, unsigned ) ++#define PROFILER_IOCTL_SET_PROF_OPS \ ++ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_SET_PROF_OPS_INDEX, unsigned ) ++#define PROFILER_IOCTL_REGISTER_CALL \ ++ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_REGISTER_CALL_INDEX, PROFILER_IOCTL_DATA ) ++#define PROFILER_IOCTL_DEREGISTER_CALL \ ++ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_DEREGISTER_CALL_INDEX, PROFILER_IOCTL_DATA ) ++#define PROFILER_IOCTL_START_CALL \ ++ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_START_CALL_INDEX, PROFILER_IOCTL_DATA ) ++#define PROFILER_IOCTL_STOP_CALL \ ++ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_STOP_CALL_INDEX, PROFILER_IOCTL_DATA ) ++#define PROFILER_IOCTL_PROFILER_STATUS_DATA \ ++ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_PROFILER_STATUS_INDEX, PROFILER_STATUS ) ++#define PROFILER_IOCTL_SET_CPU_UTIL \ ++ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_SET_CPU_UTIL_INDEX, PROFILER_CPU_UTILIZATION ) ++#define PROFILER_IOCTL_GET_CPU_UTIL \ ++ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_GET_CPU_UTIL_INDEX, PROFILER_CPU_UTILIZATION ) ++#define PROFILER_IOCTL_GET_RECSEQ_DATA_INDEX \ ++ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_GET_RECSEQ_DI_INDEX, unsigned ) ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* PROFDRV_DEVICE_DRIVER__H__INCLUDED */ +diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/profiler.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/profiler.h +--- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/profiler.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/profiler.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,114 @@ ++/*************************************************************************** ++* Copyright 2004 Broadcom Corporation ++* All Rights Reserved ++* No portions of this material may be reproduced in any form without the ++* written permission of: ++* Broadcom Corporation ++* 16215 Alton Parkway ++* P.O. Box 57013 ++* Irvine, California 92619-7013 ++* All information contained in this document is Broadcom Corporation ++* company private, proprietary, and trade secret. ++* ++**************************************************************************** ++* ++* Filename: profiler.h ++* ++**************************************************************************** ++* Description: ++* ++* This file contains the API definition for usage of the profiler tool ++* ++****************************************************************************/ ++#ifndef PROFILER__H__INCLUDED ++#define PROFILER__H__INCLUDED ++ ++#include "profdrv.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define PROFILER_MAX_MONITORED_PROFILE 32 ++#define PROFILER_CPU_UTILIZATION_MIN 0.000001 ++#define PROFILER_MISC_STRING_LENGTH 256 ++#define PROFILER_CPU_TICK_FACTOR 2.0 ++#define PROFILER_S2MS_FACTOR 1000.0 ++ ++#define PROFILER_FLAG_RESOURCE_FREE 0x00 ++#define PROFILER_FLAG_RESOURCE_ALLOCATED 0x01 ++#define PROFILER_FLAG_RESOURCE_ERROR 0x02 ++#define PROFILER_FLAG_RESOURCE_COLLECT_PENDING 0x04 ++ ++/* ++ This structure defines the data collected by the profiler. ++*/ ++typedef struct ++{ ++ unsigned char source; /* User or Kernel */ ++ unsigned char flag; /* Generic flag */ ++ char name[PROFILER_NAME_MAX_LENGTH]; /* Name of the function monitored */ ++ unsigned int now_cycle; /* The current cycle count saved */ ++ unsigned int min_cycle; /* The minimum number of cycles calculated for this function */ ++ unsigned int max_cycle; /* The maximum number of cycles calculated for this function */ ++ unsigned int avg_cycle; /* The average numnber of cycles calculated for this function */ ++ unsigned int count; /* The number of time this function has been profiled */ ++ ++} PROFILER_COLLECTED_DATA; ++ ++ ++/* ++ This structure defines the recorded sequence data collected by the profiler. ++*/ ++typedef struct PROFILER_RECSEQ_DATA ++{ ++ unsigned int id; ++ unsigned long startTime; ++ unsigned long endTime; ++} PROFILER_RECSEQ_DATA; ++ ++ ++void kernel_profiler_register( char *pName, unsigned char src ); ++void kernel_profiler_deregister( char *pName, unsigned char src ); ++void kernel_profiler_start( char *pName, unsigned char src ); ++void kernel_profiler_stop( char *pName, unsigned char src ); ++void kernel_profiler_recseq_start( unsigned int id ); ++void kernel_profiler_recseq_stop( unsigned int id ); ++ ++void kernel_profiler_reinit_collected( void ); ++void kernel_profiler_dump( void ); ++void kernel_profiler_recseq_dump( void ); ++void kernel_profiler_start_collect( void ); ++void kernel_profiler_stop_collect( void ); ++ ++ ++void profiler_init( void ); ++void profiler_get_status( PROFILER_STATUS *pStatus ); ++PROFILER_COLLECTED_DATA *profiler_get_data_dump( void ); ++PROFILER_RECSEQ_DATA* profiler_get_recseq_data_dump( void ); ++void profiler_get_cpu_util( PROFILER_CPU_UTILIZATION *pData ); ++void profiler_set_cpu_util( PROFILER_CPU_UTILIZATION *pData ); ++unsigned int profiler_get_recseq_data_index( void ); ++ ++/* ++ This is the generic API that should be used by clients to access the profiler ++*/ ++#define PROFILER_REGISTER( name ) ( kernel_profiler_register( (name), PROFILER_SOURCE_KERNEL ) ) ++#define PROFILER_DEREGISTER( name ) ( kernel_profiler_deregister( (name), PROFILER_SOURCE_KERNEL ) ) ++#define PROFILER_START( name ) ( kernel_profiler_start( (name), PROFILER_SOURCE_KERNEL ) ) ++#define PROFILER_STOP( name ) ( kernel_profiler_stop( (name), PROFILER_SOURCE_KERNEL ) ) ++#define PROFILER_RECSEQ_START( source ) ( kernel_profiler_recseq_start( (source) ) ) ++#define PROFILER_RECSEQ_STOP( source ) ( kernel_profiler_recseq_stop( (source)) ) ++ ++#define PROFILER_REINIT_COLLECTED() ( kernel_profiler_reinit_collected() ) ++#define PROFILER_DUMP() ( kernel_profiler_dump() ) ++#define PROFILER_RECSEQ_DUMP() ( kernel_profiler_recseq_dump() ) ++#define PROFILER_START_COLLECT() ( kernel_profiler_start_collect() ) ++#define PROFILER_STOP_COLLECT() ( kernel_profiler_stop_collect() ) ++ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* PROFILER__H__INCLUDED */ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/Makefile +--- linux-2.6.8.1/bcmdrivers/opensource/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/Makefile 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,26 @@ ++# File: modules/drivers/Makefile ++# ++# Makefile for the GPLed Linux kernel modules. ++# ++BRCM_BOARD:=bcm963xx ++BRCM_CHIP:=6348 ++LN_NAME=bcm9$(BRCM_CHIP) ++LN_DRIVER_DIRS = ++ ++-include $(KERNEL_DIR)/.config ++ ++ifneq ($(CONFIG_BCM_BOARD),) ++ LN_DRIVER_DIRS +=ln -sn impl$(CONFIG_BCM_BOARD_IMPL) char/board/$(BRCM_BOARD)/$(LN_NAME); ++endif ++ ++ifneq ($(CONFIG_BCM_SERIAL),) ++ LN_DRIVER_DIRS +=ln -sn impl$(CONFIG_BCM_SERIAL_IMPL) char/serial/$(LN_NAME); ++endif ++ ++obj-$(CONFIG_BCM_BOARD) += char/board/$(BRCM_BOARD)/$(LN_NAME)/ ++obj-$(CONFIG_BCM_SERIAL) += char/serial/$(LN_NAME)/ ++ ++ ++symlinks: ++ find . -lname "*" -name "$(LN_NAME)" -print -exec rm -f "{}" ";" ++ $(CONFIG_SHELL) -c "$(LN_DRIVER_DIRS)" +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/Makefile +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/Makefile 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,17 @@ ++# Makefile for the bcm963xx board drivers ++# ++ ++ ++obj-y := board.o cfiflash.o bcm63xx_flash.o bcm63xx_led.o ++ ++EXTRA_CFLAGS += -I. -I$(INC_BRCMBOARDPARMS_PATH)/$(BRCM_BOARD) -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++ ++ifeq ($(strip $(WIRELESS)),1) ++ EXTRA_CFLAGS += -DWIRELESS ++endif ++ ++-include $(TOPDIR)/Rules.make ++ ++clean: ++ rm -f core *.o *.a *.s ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_flash.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_flash.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_flash.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,775 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ *************************************************************************** ++ * File Name : bcm63xx_flash.c ++ * ++ * Description: This file contains the flash device driver APIs for bcm63xx board. ++ * ++ * Created on : 8/10/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) ++ * ++ ***************************************************************************/ ++ ++ ++/* Includes. */ ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#define BCMTAG_EXE_USE ++#include <bcmTag.h> ++#include "cfiflash.h" ++#include "boardparms.h" ++ ++//#define DEBUG_FLASH ++ ++static FLASH_ADDR_INFO fInfo; ++static int flashInitialized = 0; ++ ++void *retriedKmalloc(size_t size) ++{ ++ void *pBuf; ++ int tryCount = 0; ++ ++ // try 1000 times before quit ++ while (((pBuf = kmalloc(size, GFP_KERNEL)) == NULL) && (tryCount++ < 1000)) ++ { ++ current->state = TASK_INTERRUPTIBLE; ++ schedule_timeout(HZ/10); ++ } ++ if (tryCount >= 1000) ++ pBuf = NULL; ++ else ++ memset(pBuf, 0, size); ++ ++ return pBuf; ++} ++ ++void retriedKfree(void *pBuf) ++{ ++ kfree(pBuf); ++} ++ ++/*************************************************************************** ++// Function Name: getCrc32 ++// Description : caculate the CRC 32 of the given data. ++// Parameters : pdata - array of data. ++// size - number of input data bytes. ++// crc - either CRC32_INIT_VALUE or previous return value. ++// Returns : crc. ++****************************************************************************/ ++UINT32 getCrc32(byte *pdata, UINT32 size, UINT32 crc) ++{ ++ while (size-- > 0) ++ crc = (crc >> 8) ^ Crc32_table[(crc ^ *pdata++) & 0xff]; ++ ++ return crc; ++} ++ ++// get the nvram start addr ++// ++unsigned long get_nvram_start_addr(void) ++{ ++ return ((unsigned long) ++ (flash_get_memptr(fInfo.flash_nvram_start_blk) + fInfo.flash_nvram_blk_offset)); ++} ++ ++// get the scratch_pad start addr ++// ++unsigned long get_scratch_pad_start_addr(void) ++{ ++ return ((unsigned long) ++ (flash_get_memptr(fInfo.flash_scratch_pad_start_blk) + fInfo.flash_scratch_pad_blk_offset)); ++} ++ ++ ++ ++/* ********************************************************************* ++ * kerSysImageTagGet() ++ * Get the image tag ++ * Input parameters: ++ * none ++ * Return value: ++ * point to tag -- Found ++ * NULL -- failed ++ ********************************************************************* */ ++PFILE_TAG kerSysImageTagGet(void) ++{ ++ int i; ++ int totalBlks = flash_get_numsectors(); ++ UINT32 crc; ++ unsigned char *sectAddr; ++ PFILE_TAG pTag; ++ ++#if defined(DEBUG_FLASH) ++ printk("totalblks in tagGet=%d\n", totalBlks); ++#endif ++ ++ // start from 2nd blk, assume 1st one is always CFE ++ for (i = 1; i < totalBlks; i++) ++ { ++ sectAddr = flash_get_memptr((byte) i); ++ crc = CRC32_INIT_VALUE; ++ crc = getCrc32(sectAddr, (UINT32)TAG_LEN-TOKEN_LEN, crc); ++ pTag = (PFILE_TAG) sectAddr; ++ ++#if defined(DEBUG_FLASH) ++ printk("Check Tag crc on blk [%d]\n", i); ++#endif ++ ++ if (crc == (UINT32)(*(UINT32*)(pTag->tagValidationToken))) ++ return pTag; ++ } ++ ++ return (PFILE_TAG) NULL; ++} ++ ++// Initialize the flash and fill out the fInfo structure ++void kerSysFlashInit( void ) ++{ ++ int i = 0; ++ int totalBlks = 0; ++ int totalSize = 0; ++ int startAddr = 0; ++ int usedBlkSize = 0; ++ NVRAM_DATA nvramData; ++ UINT32 crc = CRC32_INIT_VALUE, savedCrc; ++ PFILE_TAG pTag = NULL; ++ unsigned long kernelEndAddr = 0; ++ unsigned long spAddr = 0; ++ ++ if (flashInitialized) ++ return; ++ ++ flashInitialized = 1; ++ flash_init(); ++ ++ totalBlks = flash_get_numsectors(); ++ totalSize = flash_get_total_size(); ++ ++ printk("Total Flash size: %dK with %d sectors\n", totalSize/1024, totalBlks); ++ ++ /* nvram is always at the end of flash */ ++ fInfo.flash_nvram_length = FLASH45_LENGTH_NVRAM; ++ fInfo.flash_nvram_start_blk = 0; /* always the first block */ ++ fInfo.flash_nvram_number_blk = 1; /*always fits in the first block */ ++ fInfo.flash_nvram_blk_offset = NVRAM_DATA_OFFSET; ++ ++ // check nvram CRC ++ memcpy((char *)&nvramData, (char *)get_nvram_start_addr(), sizeof(NVRAM_DATA)); ++ savedCrc = nvramData.ulCheckSum; ++ nvramData.ulCheckSum = 0; ++ crc = getCrc32((char *)&nvramData, (UINT32) sizeof(NVRAM_DATA), crc); ++ ++ BpSetBoardId( nvramData.szBoardId ); ++ ++ fInfo.flash_persistent_length = NVRAM_PSI_DEFAULT; ++ if (savedCrc != crc) ++ { ++ printk("***Board is not initialized****: Using the default PSI size: %d\n", ++ fInfo.flash_persistent_length); ++ } ++ else ++ { ++ unsigned long ulPsiSize; ++ if( BpGetPsiSize( &ulPsiSize ) == BP_SUCCESS ) ++ fInfo.flash_persistent_length = ulPsiSize; ++ else ++ { ++ printk("***Board id is not set****: Using the default PSI size: %d\n", ++ fInfo.flash_persistent_length); ++ } ++ } ++ ++ fInfo.flash_persistent_length *= ONEK; ++ startAddr = totalSize - fInfo.flash_persistent_length; ++ fInfo.flash_persistent_start_blk = flash_get_blk(startAddr+FLASH_BASE_ADDR_REG); ++ fInfo.flash_persistent_number_blk = totalBlks - fInfo.flash_persistent_start_blk; ++ // save abs SP address (Scratch Pad). it is before PSI ++ spAddr = startAddr - SP_MAX_LEN ; ++ // find out the offset in the start_blk ++ usedBlkSize = 0; ++ for (i = fInfo.flash_persistent_start_blk; ++ i < (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk); i++) ++ { ++ usedBlkSize += flash_get_sector_size((byte) i); ++ } ++ fInfo.flash_persistent_blk_offset = usedBlkSize - fInfo.flash_persistent_length; ++ ++ // get the info for sp ++ if (!(pTag = kerSysImageTagGet())) ++ { ++ printk("Failed to read image tag from flash\n"); ++ return; ++ } ++ kernelEndAddr = (unsigned long) simple_strtoul(pTag->kernelAddress, NULL, 10) + \ ++ (unsigned long) simple_strtoul(pTag->kernelLen, NULL, 10); ++ ++ // make suer sp does not share kernel block ++ fInfo.flash_scratch_pad_start_blk = flash_get_blk(spAddr+FLASH_BASE_ADDR_REG); ++ if (fInfo.flash_scratch_pad_start_blk != flash_get_blk(kernelEndAddr)) ++ { ++ fInfo.flash_scratch_pad_length = SP_MAX_LEN; ++ if (fInfo.flash_persistent_start_blk == fInfo.flash_scratch_pad_start_blk) // share blk ++ { ++#if 1 /* do not used scratch pad unless it's in its own sector */ ++ printk("Scratch pad is not used for this flash part.\n"); ++ fInfo.flash_scratch_pad_length = 0; // no sp ++#else /* allow scratch pad to share a sector with another section such as PSI */ ++ fInfo.flash_scratch_pad_number_blk = 1; ++ fInfo.flash_scratch_pad_blk_offset = fInfo.flash_persistent_blk_offset - fInfo.flash_scratch_pad_length; ++#endif ++ } ++ else // on different blk ++ { ++ fInfo.flash_scratch_pad_number_blk = fInfo.flash_persistent_start_blk\ ++ - fInfo.flash_scratch_pad_start_blk; ++ // find out the offset in the start_blk ++ usedBlkSize = 0; ++ for (i = fInfo.flash_scratch_pad_start_blk; ++ i < (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk); i++) ++ usedBlkSize += flash_get_sector_size((byte) i); ++ fInfo.flash_scratch_pad_blk_offset = usedBlkSize - fInfo.flash_scratch_pad_length; ++ } ++ } ++ else ++ { ++ printk("No flash for scratch pad!\n"); ++ fInfo.flash_scratch_pad_length = 0; // no sp ++ } ++ ++#if defined(DEBUG_FLASH) ++ printk("fInfo.flash_scratch_pad_start_blk = %d\n", fInfo.flash_scratch_pad_start_blk); ++ printk("fInfo.flash_scratch_pad_number_blk = %d\n", fInfo.flash_scratch_pad_number_blk); ++ printk("fInfo.flash_scratch_pad_length = 0x%x\n", fInfo.flash_scratch_pad_length); ++ printk("fInfo.flash_scratch_pad_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_scratch_pad_blk_offset); ++ ++ printk("fInfo.flash_nvram_start_blk = %d\n", fInfo.flash_nvram_start_blk); ++ printk("fInfo.flash_nvram_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_nvram_blk_offset); ++ printk("fInfo.flash_nvram_number_blk = %d\n", fInfo.flash_nvram_number_blk); ++ ++ printk("psi startAddr = %x\n", startAddr+FLASH_BASE_ADDR_REG); ++ printk("fInfo.flash_persistent_start_blk = %d\n", fInfo.flash_persistent_start_blk); ++ printk("fInfo.flash_persistent_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_persistent_blk_offset); ++ printk("fInfo.flash_persistent_number_blk = %d\n", fInfo.flash_persistent_number_blk); ++#endif ++ ++} ++ ++ ++ ++/*********************************************************************** ++ * Function Name: kerSysFlashAddrInfoGet ++ * Description : Fills in a structure with information about the NVRAM ++ * and persistent storage sections of flash memory. ++ * Fro physmap.c to mount the fs vol. ++ * Returns : None. ++ ***********************************************************************/ ++void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info) ++{ ++ pflash_addr_info->flash_nvram_blk_offset = fInfo.flash_nvram_blk_offset; ++ pflash_addr_info->flash_nvram_length = fInfo.flash_nvram_length; ++ pflash_addr_info->flash_nvram_number_blk = fInfo.flash_nvram_number_blk; ++ pflash_addr_info->flash_nvram_start_blk = fInfo.flash_nvram_start_blk; ++ pflash_addr_info->flash_persistent_blk_offset = fInfo.flash_persistent_blk_offset; ++ pflash_addr_info->flash_persistent_length = fInfo.flash_persistent_length; ++ pflash_addr_info->flash_persistent_number_blk = fInfo.flash_persistent_number_blk; ++ pflash_addr_info->flash_persistent_start_blk = fInfo.flash_persistent_start_blk; ++} ++ ++ ++// get shared blks into *** pTempBuf *** which has to be released bye the caller! ++// return: if pTempBuf != NULL, poits to the data with the dataSize of the buffer ++// !NULL -- ok ++// NULL -- fail ++static char *getSharedBlks(int start_blk, int end_blk) ++{ ++ int i = 0; ++ int usedBlkSize = 0; ++ int sect_size = 0; ++ char *pTempBuf = NULL; ++ char *pBuf = NULL; ++ ++ for (i = start_blk; i < end_blk; i++) ++ usedBlkSize += flash_get_sector_size((byte) i); ++ ++#if defined(DEBUG_FLASH) ++ printk("usedBlkSize = %d\n", usedBlkSize); ++#endif ++ ++ if ((pTempBuf = (char *) retriedKmalloc(usedBlkSize)) == NULL) ++ { ++ printk("failed to allocate memory with size: %d\n", usedBlkSize); ++ return pTempBuf; ++ } ++ ++ pBuf = pTempBuf; ++ for (i = start_blk; i < end_blk; i++) ++ { ++ sect_size = flash_get_sector_size((byte) i); ++ ++#if defined(DEBUG_FLASH) ++ printk("i = %d, sect_size = %d, end_blk = %d\n", i, sect_size, end_blk); ++#endif ++ flash_read_buf((byte)i, 0, pBuf, sect_size); ++ pBuf += sect_size; ++ } ++ ++ return pTempBuf; ++} ++ ++ ++ ++// Set the pTempBuf to flash from start_blk to end_blk ++// return: ++// 0 -- ok ++// -1 -- fail ++static int setSharedBlks(int start_blk, int end_blk, char *pTempBuf) ++{ ++ int i = 0; ++ int sect_size = 0; ++ int sts = 0; ++ char *pBuf = pTempBuf; ++ ++ for (i = start_blk; i < end_blk; i++) ++ { ++ sect_size = flash_get_sector_size((byte) i); ++ flash_sector_erase_int(i); ++ if (flash_write_buf(i, 0, pBuf, sect_size) != sect_size) ++ { ++ printk("Error writing flash sector %d.", i); ++ sts = -1; ++ break; ++ } ++ pBuf += sect_size; ++ } ++ ++ return sts; ++} ++ ++ ++ ++/******************************************************************************* ++ * NVRAM functions ++ *******************************************************************************/ ++ ++// get nvram data ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysNvRamGet(char *string, int strLen, int offset) ++{ ++ char *pBuf = NULL; ++ ++ if (!flashInitialized) ++ kerSysFlashInit(); ++ ++ if (strLen > FLASH45_LENGTH_NVRAM) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) ++ return -1; ++ ++ // get string off the memory buffer ++ memcpy(string, (pBuf + fInfo.flash_nvram_blk_offset + offset), strLen); ++ ++ retriedKfree(pBuf); ++ ++ return 0; ++} ++ ++ ++// set nvram ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysNvRamSet(char *string, int strLen, int offset) ++{ ++ int sts = 0; ++ char *pBuf = NULL; ++ ++ if (strLen > FLASH45_LENGTH_NVRAM) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) ++ return -1; ++ ++ // set string to the memory buffer ++ memcpy((pBuf + fInfo.flash_nvram_blk_offset + offset), string, strLen); ++ ++ if (setSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_number_blk + fInfo.flash_nvram_start_blk), pBuf) != 0) ++ sts = -1; ++ ++ retriedKfree(pBuf); ++ ++ return sts; ++} ++ ++ ++/*********************************************************************** ++ * Function Name: kerSysEraseNvRam ++ * Description : Erase the NVRAM storage section of flash memory. ++ * Returns : 1 -- ok, 0 -- fail ++ ***********************************************************************/ ++int kerSysEraseNvRam(void) ++{ ++ int sts = 1; ++ char *tempStorage = retriedKmalloc(FLASH45_LENGTH_NVRAM); ++ ++ // just write the whole buf with '0xff' to the flash ++ if (!tempStorage) ++ sts = 0; ++ else ++ { ++ memset(tempStorage, 0xff, FLASH45_LENGTH_NVRAM); ++ if (kerSysNvRamSet(tempStorage, FLASH45_LENGTH_NVRAM, 0) != 0) ++ sts = 0; ++ retriedKfree(tempStorage); ++ } ++ ++ return sts; ++} ++ ++ ++/******************************************************************************* ++ * PSI functions ++ *******************************************************************************/ ++// get psi data ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysPersistentGet(char *string, int strLen, int offset) ++{ ++ char *pBuf = NULL; ++ ++ if (strLen > fInfo.flash_persistent_length) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) ++ return -1; ++ ++ // get string off the memory buffer ++ memcpy(string, (pBuf + fInfo.flash_persistent_blk_offset + offset), strLen); ++ ++ retriedKfree(pBuf); ++ ++ return 0; ++} ++ ++ ++// set psi ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysPersistentSet(char *string, int strLen, int offset) ++{ ++ int sts = 0; ++ char *pBuf = NULL; ++ ++ if (strLen > fInfo.flash_persistent_length) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) ++ return -1; ++ ++ // set string to the memory buffer ++ memcpy((pBuf + fInfo.flash_persistent_blk_offset + offset), string, strLen); ++ ++ if (setSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_number_blk + fInfo.flash_persistent_start_blk), pBuf) != 0) ++ sts = -1; ++ ++ retriedKfree(pBuf); ++ ++ return sts; ++} ++ ++ ++// flash bcm image ++// return: ++// 0 - ok ++// !0 - the sector number fail to be flashed (should not be 0) ++int kerSysBcmImageSet( int flash_start_addr, char *string, int size) ++{ ++ int sts; ++ int sect_size; ++ int blk_start; ++ int i; ++ char *pTempBuf = NULL; ++ int whole_image = 0; ++ ++ blk_start = flash_get_blk(flash_start_addr); ++ if( blk_start < 0 ) ++ return( -1 ); ++ ++ if (flash_start_addr == FLASH_BASE && size > FLASH45_LENGTH_BOOT_ROM) ++ whole_image = 1; ++ ++ /* write image to flash memory */ ++ do ++ { ++ sect_size = flash_get_sector_size(blk_start); ++// NOTE: for memory problem in multiple PVC configuration, temporary get rid of kmalloc this 64K for now. ++// if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) ++// { ++// printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); ++// kerSysMipsSoftReset(); // reset the board right away. ++// } ++ // for whole image, no check on psi ++ if (!whole_image && blk_start == fInfo.flash_persistent_start_blk) // share the blk with psi ++ { ++ if (size > (sect_size - fInfo.flash_persistent_length)) ++ { ++ printk("Image is too big\n"); ++ break; // image is too big. Can not overwrite to nvram ++ } ++ if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) ++ { ++ printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); ++ kerSysMipsSoftReset(); // reset the board right away. ++ } ++ flash_read_buf((byte)blk_start, 0, pTempBuf, sect_size); ++ if (copy_from_user((void *)pTempBuf,(void *)string, size) != 0) ++ break; // failed ? ++ flash_sector_erase_int(blk_start); // erase blk before flash ++ if (flash_write_buf(blk_start, 0, pTempBuf, sect_size) == sect_size) ++ size = 0; // break out and say all is ok ++ retriedKfree(pTempBuf); ++ break; ++ } ++ ++ flash_sector_erase_int(blk_start); // erase blk before flash ++ ++ if (sect_size > size) ++ { ++ if (size & 1) ++ size++; ++ sect_size = size; ++ } ++ ++ if ((i = flash_write_buf(blk_start, 0, string, sect_size)) != sect_size) { ++ break; ++ } ++ blk_start++; ++ string += sect_size; ++ size -= sect_size; ++ } while (size > 0); ++ ++ if (whole_image) ++ { ++ // If flashing a whole image, erase to end of flash. ++ int total_blks = flash_get_numsectors(); ++ while( blk_start < total_blks ) ++ { ++ flash_sector_erase_int(blk_start); ++ blk_start++; ++ } ++ } ++ if (pTempBuf) ++ retriedKfree(pTempBuf); ++ ++ if( size == 0 ) ++ sts = 0; // ok ++ else ++ sts = blk_start; // failed to flash this sector ++ ++ return sts; ++} ++ ++/******************************************************************************* ++ * SP functions ++ *******************************************************************************/ ++// get sp data. NOTE: memcpy work here -- not using copy_from/to_user ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysScratchPadGet(char *tokenId, char *tokBuf, int bufLen) ++{ ++ PSP_HEADER pHead = NULL; ++ PSP_TOKEN pToken = NULL; ++ char *pBuf = NULL; ++ char *pShareBuf = NULL; ++ char *startPtr = NULL; ++ char *endPtr = NULL; ++ char *spEndPtr = NULL; ++ int sts = -1; ++ ++ if (fInfo.flash_scratch_pad_length == 0) ++ return sts; ++ ++ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) ++ { ++ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ ++ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); ++ return sts; ++ } ++ ++ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) ++ return sts; ++ ++ // pBuf points to SP buf ++ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; ++ ++ pHead = (PSP_HEADER) pBuf; ++ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) ++ { ++ printk("Scrap pad is not initialized.\n"); ++ return sts; ++ } ++ ++ // search up to SPUsedLen for the token ++ startPtr = pBuf + sizeof(SP_HEADER); ++ endPtr = pBuf + pHead->SPUsedLen; ++ spEndPtr = pBuf + SP_MAX_LEN; ++ while (startPtr < endPtr && startPtr < spEndPtr) ++ { ++ pToken = (PSP_TOKEN) startPtr; ++ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) ++ { ++ memcpy(tokBuf, startPtr + sizeof(SP_TOKEN), bufLen); ++ sts = 0; ++ break; ++ } ++ // get next token ++ startPtr += sizeof(SP_TOKEN) + pToken->tokenLen; ++ } ++ ++ retriedKfree(pShareBuf); ++ ++ return sts; ++} ++ ++ ++// set sp. NOTE: memcpy work here -- not using copy_from/to_user ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysScratchPadSet(char *tokenId, char *tokBuf, int bufLen) ++{ ++ PSP_TOKEN pToken = NULL; ++ PSP_HEADER pHead = NULL; ++ char *pShareBuf = NULL; ++ char *pBuf = NULL; ++ SP_HEADER SPHead; ++ SP_TOKEN SPToken; ++ char *curPtr; ++ int sts = -1; ++ ++ if (fInfo.flash_scratch_pad_length == 0) ++ return sts; ++ ++ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) ++ { ++ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ ++ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); ++ return sts; ++ } ++ ++ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) ++ return sts; ++ ++ // pBuf points to SP buf ++ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; ++ pHead = (PSP_HEADER) pBuf; ++ ++ // form header info. SPUsedLen later on... ++ memset((char *)&SPHead, 0, sizeof(SP_HEADER)); ++ memcpy(SPHead.SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN); ++ SPHead.SPVersion = SP_VERSION; ++ ++ // form token info. ++ memset((char*)&SPToken, 0, sizeof(SP_TOKEN)); ++ strncpy(SPToken.tokenName, tokenId, TOKEN_NAME_LEN - 1); ++ SPToken.tokenLen = bufLen; ++ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) ++ { ++ // new sp, so just flash the token ++ printk("No Scrap pad found. Initialize scratch pad...\n"); ++ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; ++ memcpy(pBuf, (char *)&SPHead, sizeof(SP_HEADER)); ++ curPtr = pBuf + sizeof(SP_HEADER); ++ memcpy(curPtr, (char *)&SPToken, sizeof(SP_TOKEN)); ++ curPtr += sizeof(SP_TOKEN); ++ memcpy(curPtr, tokBuf, bufLen); ++ } ++ else ++ { ++ // need search for the token, if exist with same size overwrite it. if sizes differ, ++ // move over the later token data over and put the new one at the end ++ char *endPtr = pBuf + pHead->SPUsedLen; ++ char *spEndPtr = pBuf + SP_MAX_LEN; ++ curPtr = pBuf + sizeof(SP_HEADER); ++ while (curPtr < endPtr && curPtr < spEndPtr) ++ { ++ pToken = (PSP_TOKEN) curPtr; ++ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) ++ { ++ if (pToken->tokenLen == bufLen) // overwirte it ++ { ++ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); ++ break; ++ } ++ else // move later data over and put the new token at the end ++ { ++ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); // ~~~ ++ break; ++ } ++ } ++ else // not same token ~~~ ++ { ++ } ++ // get next token ++ curPtr += sizeof(SP_TOKEN) + pToken->tokenLen; ++ } // end while ++ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; // ~~~ ++ if (SPHead.SPUsedLen > SP_MAX_LEN) ++ { ++ printk("No more Scratch pad space left! Over limit by %d bytes\n", SPHead.SPUsedLen - SP_MAX_LEN); ++ return sts; ++ } ++ ++ } // else if not new sp ++ ++ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf); ++ ++ retriedKfree(pShareBuf); ++ ++ return sts; ++ ++ ++} ++ ++int kerSysFlashSizeGet(void) ++{ ++ return flash_get_total_size(); ++} ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_led.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_led.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_led.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,582 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : bcm63xx_led.c ++ * ++ * Description: ++ * ++ * This file contains bcm963xx board led control API functions. ++ * ++ * To use it, do the following ++ * ++ * 1). define in the board.c the following led mappping (this is for 6345GW board): ++ * const LED_MAP_PAIR cLedMapping45GW[] = ++ * { // led name Initial state physical pin (ledMask) ++ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, ++ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, ++ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 ++ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, ++ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, ++ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. ++ * ++ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping ++ * pointer from the above struct ++ * ++ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); ++ * ++ * 3). Sample call for kernel mode: ++ * ++ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h ++ * ++ * 4). Sample call for user mode ++ * ++ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h ++ * ++ * ++ * Created on : 10/28/2002 seanl ++ * ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/netdevice.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define k100ms (HZ / 10) // ~100 ms ++#define kFastBlinkCount 0 // ~100ms ++#define kSlowBlinkCount 5 // ~600ms ++ ++#define MAX_VIRT_LEDS 12 ++ ++// uncomment // for debug led ++//#define DEBUG_LED ++ ++// global variables: ++struct timer_list gLedTimer; ++int gTimerOn = FALSE; ++int gLedCount = 0; ++ ++typedef struct ledinfo ++{ ++ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLow; // GPIO bit reset to turn on LED ++ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED ++ BOARD_LED_STATE ledState; // current led state ++ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState ++ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. ++} LED_INFO, *PLED_INFO; ++ ++static PLED_INFO gLed = NULL; ++static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; ++ ++#if 0 /* BROKEN */ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++static int gLedOffInBridgeMode = 1; ++#elif defined(CONFIG_BCM96345) ++static int gLedOffInBridgeMode = 0; ++#endif ++#endif ++ ++void ledTimerExpire(void); ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); ++ ++//************************************************************************************** ++// LED operations ++//************************************************************************************** ++ ++// turn led on and set the ledState ++void ledOn(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMask; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateOn; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOff(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio |= pLed->ledMask; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++// turn led on and set the ledState ++void ledOnFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateFail; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOffFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++ ++// toggle the led and return the current ledState ++BOARD_LED_STATE ledToggle(PLED_INFO pLed) ++{ ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if (GPIO->GPIOio & pLed->ledMask) ++ { ++ GPIO->GPIOio &= ~(pLed->ledMask); ++ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); ++ } ++ else ++ { ++ GPIO->GPIOio |= pLed->ledMask; ++ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); ++ } ++} ++ ++ ++// led timer. Will return if timer is already on ++void ledTimerStart(void) ++{ ++ if (gTimerOn) ++ return; ++ ++#if defined(DEBUG_LED) ++ printk("led: add_timer\n"); ++#endif ++ ++ init_timer(&gLedTimer); ++ gLedTimer.function = (void*)ledTimerExpire; ++ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms ++ add_timer (&gLedTimer); ++ gTimerOn = TRUE; ++} ++ ++ ++// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and ++// restart the timer according to ledState ++void ledTimerExpire(void) ++{ ++ int i; ++ PLED_INFO pCurLed; ++ ++ gTimerOn = FALSE; ++ ++ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) ++ { ++#if defined(DEBUG_LED) ++ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); ++#endif ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ case kLedStateOff: ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ break; ++ ++ case kLedStateBlinkOnce: ++ ledToggle(pCurLed); ++ pCurLed->blinkCountDown = 0; // reset to 0 ++ pCurLed->ledState = pCurLed->savedLedState; ++ if (pCurLed->ledState == kLedStateSlowBlinkContinues || ++ pCurLed->ledState == kLedStateFastBlinkContinues) ++ ledTimerStart(); // start timer if in blinkContinues stats ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ } ++} ++ ++// initialize the gLedCount and allocate and fill gLed struct ++void __init boardLedInit(PLED_MAP_PAIR cLedMapping) ++{ ++ PLED_MAP_PAIR p1, p2; ++ PLED_INFO pCurLed; ++ int needTimer = FALSE; ++ int alreadyUsed = 0; ++ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ ++ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; ++ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; ++#endif ++ ++ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); ++ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); ++ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); ++ ++ gLedCount = 0; ++ ++ // Check for multiple LED names and multiple LED GPIO pins that share the ++ // same physical board LED. ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ gLedCount++; ++ } ++ ++ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); ++ if( gLed == NULL ) ++ { ++ printk( "LED memory allocation error.\n" ); ++ return; ++ } ++ ++ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); ++ ++ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led ++ // (ledMask) the first defined led's ledInitState will be used. ++ pCurLed = gLed; ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ if( (int) p1->ledName > MAX_VIRT_LEDS ) ++ continue; ++ ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ { ++ // Initialize the board LED for the first time. ++ needTimer = initLedInfo( p1, pCurLed ); ++ gpVirtLeds[(int) p1->ledName] = pCurLed; ++ pCurLed++; ++ } ++ else ++ { ++ PLED_INFO pLed; ++ for( pLed = gLed; pLed != pCurLed; pLed++ ) ++ { ++ // Find the LED_INFO structure that has already been initialized. ++ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || ++ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) ++ { ++ // The board LED has already been initialized but possibly ++ // not completely initialized. ++ if( p1->ledMask ) ++ { ++ pLed->ledMask = p1->ledMask; ++ pLed->ledActiveLow = p1->ledActiveLow; ++ } ++ if( p1->ledMaskFail ) ++ { ++ pLed->ledMaskFail = p1->ledMaskFail; ++ pLed->ledActiveLowFail = p1->ledActiveLowFail; ++ } ++ gpVirtLeds[(int) p1->ledName] = pLed; ++ break; ++ } ++ } ++ } ++ } ++ ++ if (needTimer) ++ ledTimerStart(); ++ ++#if defined(DEBUG_LED) ++ int i; ++ for (i=0; i < gLedCount; i++) ++ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); ++#endif ++ ++} ++ ++// Initialize a structure that contains information about a physical board LED ++// control. The board LED may contain more than one GPIO pin to control a ++// normal condition (green) or a failure condition (red). ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) ++{ ++ int needTimer = FALSE; ++ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; ++ pCurLed->ledMask = pCurMap->ledMask; ++ pCurLed->ledActiveLow = pCurMap->ledActiveLow; ++ pCurLed->ledMaskFail = pCurMap->ledMaskFail; ++ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; ++ ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOn(pCurLed); ++ break; ++ case kLedStateOff: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOff(pCurLed); ++ break; ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOnFail(pCurLed); ++ break; ++ case kLedStateBlinkOnce: ++ pCurLed->blinkCountDown = 1; ++ needTimer = TRUE; ++ break; ++ case kLedStateSlowBlinkContinues: ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ needTimer = TRUE; ++ break; ++ case kLedStateFastBlinkContinues: ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ needTimer = TRUE; ++ break; ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ ++ return( needTimer ); ++} ++ ++#if 0 /* BROKEN */ ++// Determines if there is at least one interface in bridge mode. Bridge mode ++// is determined by the cfm convention of naming bridge interfaces nas17 ++// through nas24. ++static int isBridgedProtocol(void) ++{ ++ extern int dev_get(const char *name); ++ const int firstBridgeId = 17; ++ const int lastBridgeId = 24; ++ int i; ++ int ret = FALSE; ++ char name[16]; ++ ++ for( i = firstBridgeId; i <= lastBridgeId; i++ ) ++ { ++ sprintf( name, "nas%d", i ); ++ ++ if( dev_get(name) ) ++ { ++ ret = TRUE; ++ break; ++ } ++ } ++ ++ return(ret); ++} ++#endif ++ ++// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation ++void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ PLED_INFO ledInfoPtr; ++ ++ // do the mapping from virtual to physical led ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ ledInfoPtr = gpVirtLeds[(int) ledName]; ++ else ++ ledInfoPtr = NULL; ++ ++ if (ledInfoPtr == NULL) ++ return; ++ ++ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) ++ { ++ (*gLedHwFunc[(int) ledName]) (ledName, ledState); ++ ledOffFail(ledInfoPtr); ++ return; ++ } ++ else ++ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) ++ { ++ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); ++ ledOff(ledInfoPtr); ++ return; ++ } ++ ++#if 0 /* BROKEN */ ++ // Do not blink the WAN Data LED if at least one interface is in bridge mode. ++ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) ++ { ++ static int BridgedProtocol = -1; ++ ++ if( BridgedProtocol == -1 ) ++ BridgedProtocol = isBridgedProtocol(); ++ ++ if( BridgedProtocol == TRUE ) ++ return; ++ } ++#endif ++ ++ // If the state is kLedStateFail and there is not a failure LED defined ++ // in the board parameters, change the state to kLedStateFastBlinkContinues. ++ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) ++ ledState = kLedStateFastBlinkContinues; ++ ++ switch (ledState) ++ { ++ case kLedStateOn: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on the specified LED GPIO. ++ ledOn(ledInfoPtr); ++ break; ++ ++ case kLedStateOff: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn off the specified LED GPIO. ++ ledOff(ledInfoPtr); ++ break; ++ ++ case kLedStateFail: ++ // First, turn off the complimentary (normal) LED GPIO. ++ if( ledInfoPtr->ledMask ) ++ ledOff(ledInfoPtr); ++ else ++ if( gLedHwFunc[(int) ledName] ) ++ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on (red) the specified LED GPIO. ++ ledOnFail(ledInfoPtr); ++ break; ++ ++ case kLedStateBlinkOnce: ++ // skip blinkOnce if it is already in Slow/Fast blink continues state ++ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || ++ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) ++ ; ++ else ++ { ++ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 ++ { ++ ledToggle(ledInfoPtr); ++ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires ++ ledInfoPtr->ledState = kLedStateBlinkOnce; ++ ledTimerStart(); ++ } ++ } ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ ledInfoPtr->blinkCountDown = kSlowBlinkCount; ++ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ ledInfoPtr->blinkCountDown = kFastBlinkCount; ++ ledInfoPtr->ledState = kLedStateFastBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid led state\n"); ++ } ++} ++ ++// This function is called for an LED that is controlled by hardware. ++void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) ++{ ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ { ++ if( ledFailType == 1 ) ++ gLedHwFailFunc[(int) ledName] = ledHwFunc; ++ else ++ gLedHwFunc[(int) ledName] = ledHwFunc; ++ } ++} ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/board.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/board.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/board.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/board.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,1570 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : board.c ++ * ++ * Description: This file contains Linux character device driver entry ++ * for the board related ioctl calls: flash, get free kernel ++ * page and dump kernel memory, etc. ++ * ++ * Created on : 2/20/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) ++ * ++ ***************************************************************************/ ++ ++ ++/* Includes. */ ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/interrupt.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/pagemap.h> ++#include <asm/uaccess.h> ++#include <linux/wait.h> ++#include <linux/poll.h> ++#include <linux/sched.h> ++#include <linux/list.h> ++#include <linux/if.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include <bcmTag.h> ++#include "boardparms.h" ++#include "cfiflash.h" ++#include "bcm_intr.h" ++#include "board.h" ++#include "bcm_map_part.h" ++ ++/* Typedefs. */ ++#if defined (NON_CONSECUTIVE_MAC) ++// used to be the last octet. Now changed to the first 5 bits of the the forth octet ++// to reduced the duplicated MAC addresses. ++#define CHANGED_OCTET 3 ++#define SHIFT_BITS 3 ++#else ++#define CHANGED_OCTET 1 ++#define SHIFT_BITS 0 ++#endif ++ ++#if defined (WIRELESS) ++#define SES_BTN_PRESSED 0x00000001 ++#define SES_EVENTS SES_BTN_PRESSED /*OR all values if any*/ ++#define SES_LED_OFF 0 ++#define SES_LED_ON 1 ++#define SES_LED_BLINK 2 ++#endif ++ ++typedef struct ++{ ++ unsigned long ulId; ++ char chInUse; ++ char chReserved[3]; ++} MAC_ADDR_INFO, *PMAC_ADDR_INFO; ++ ++typedef struct ++{ ++ unsigned long ulSdramSize; ++ unsigned long ulPsiSize; ++ unsigned long ulNumMacAddrs; ++ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ MAC_ADDR_INFO MacAddrs[1]; ++} NVRAM_INFO, *PNVRAM_INFO; ++ ++typedef struct ++{ ++ unsigned long eventmask; ++} BOARD_IOC, *PBOARD_IOC; ++ ++ ++/*Dyinggasp callback*/ ++typedef void (*cb_dgasp_t)(void *arg); ++typedef struct _CB_DGASP__LIST ++{ ++ struct list_head list; ++ char name[IFNAMSIZ]; ++ cb_dgasp_t cb_dgasp_fn; ++ void *context; ++}CB_DGASP_LIST , *PCB_DGASP_LIST; ++ ++ ++static LED_MAP_PAIR LedMapping[] = ++{ // led name Initial state physical pin (ledMask) ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. ++}; ++ ++/* Externs. */ ++extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); ++extern unsigned int nr_free_pages (void); ++extern const char *get_system_type(void); ++extern void kerSysFlashInit(void); ++extern unsigned long get_nvram_start_addr(void); ++extern unsigned long get_scratch_pad_start_addr(void); ++extern unsigned long getMemorySize(void); ++extern void __init boardLedInit(PLED_MAP_PAIR); ++extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); ++extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); ++ ++/* Prototypes. */ ++void __init InitNvramInfo( void ); ++static int board_open( struct inode *inode, struct file *filp ); ++static int board_ioctl( struct inode *inode, struct file *flip, unsigned int command, unsigned long arg ); ++static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos); ++static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait); ++static int board_release(struct inode *inode, struct file *filp); ++ ++static BOARD_IOC* borad_ioc_alloc(void); ++static void borad_ioc_free(BOARD_IOC* board_ioc); ++ ++/* DyingGasp function prototype */ ++static void __init kerSysDyingGaspMapIntr(void); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); ++#else ++static unsigned int kerSysDyingGaspIsr(void); ++#endif ++static void __init kerSysInitDyingGaspHandler( void ); ++static void __exit kerSysDeinitDyingGaspHandler( void ); ++/* -DyingGasp function prototype - */ ++ ++ ++#if defined (WIRELESS) ++static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs); ++static void __init sesBtn_mapGpio(void); ++static void __init sesBtn_mapIntr(int context); ++static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait); ++static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos); ++static void __init sesLed_mapGpio(void); ++static void sesLed_ctrl(int action); ++static void __init ses_board_init(void); ++static void __exit ses_board_deinit(void); ++#endif ++ ++static PNVRAM_INFO g_pNvramInfo = NULL; ++static int g_ledInitialized = 0; ++static wait_queue_head_t g_board_wait_queue; ++static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; ++ ++static int g_wakeup_monitor = 0; ++static struct file *g_monitor_file = NULL; ++static struct task_struct *g_monitor_task = NULL; ++static unsigned int (*g_orig_fop_poll) ++ (struct file *, struct poll_table_struct *) = NULL; ++ ++static struct file_operations board_fops = ++{ ++ open: board_open, ++ ioctl: board_ioctl, ++ poll: board_poll, ++ read: board_read, ++ release: board_release, ++}; ++ ++uint32 board_major = 0; ++ ++#if defined (WIRELESS) ++static unsigned short sesBtn_irq = BP_NOT_DEFINED; ++static unsigned short sesBtn_gpio = BP_NOT_DEFINED; ++static unsigned short sesLed_gpio = BP_NOT_DEFINED; ++#endif ++ ++#if defined(MODULE) ++int init_module(void) ++{ ++ return( brcm_board_init() ); ++} ++ ++void cleanup_module(void) ++{ ++ if (MOD_IN_USE) ++ printk("brcm flash: cleanup_module failed because module is in use\n"); ++ else ++ brcm_board_cleanup(); ++} ++#endif //MODULE ++ ++ ++ ++static int __init brcm_board_init( void ) ++{ ++ typedef int (*BP_LED_FUNC) (unsigned short *); ++ static struct BpLedInformation ++ { ++ BOARD_LED_NAME ledName; ++ BP_LED_FUNC bpFunc; ++ BP_LED_FUNC bpFuncFail; ++ } bpLedInfo[] = ++ {{kLedAdsl, BpGetAdslLedGpio, BpGetAdslFailLedGpio}, ++ {kLedWireless, BpGetWirelessLedGpio, NULL}, ++ {kLedUsb, BpGetUsbLedGpio, NULL}, ++ {kLedHpna, BpGetHpnaLedGpio, NULL}, ++ {kLedWanData, BpGetWanDataLedGpio, NULL}, ++ {kLedPPP, BpGetPppLedGpio, BpGetPppFailLedGpio}, ++ {kLedVoip, BpGetVoipLedGpio, NULL}, ++ {kLedSes, BpGetWirelessSesLedGpio, NULL}, ++ {kLedEnd, NULL, NULL} ++ }; ++ ++ int ret; ++ ++ ret = register_chrdev(BOARD_DRV_MAJOR, "bcrmboard", &board_fops ); ++ if (ret < 0) ++ printk( "brcm_board_init(major %d): fail to register device.\n",BOARD_DRV_MAJOR); ++ else ++ { ++ PLED_MAP_PAIR pLedMap = LedMapping; ++ unsigned short gpio; ++ struct BpLedInformation *pInfo; ++ ++ printk("brcmboard: brcm_board_init entry\n"); ++ board_major = BOARD_DRV_MAJOR; ++ InitNvramInfo(); ++ ++ for( pInfo = bpLedInfo; pInfo->ledName != kLedEnd; pInfo++ ) ++ { ++ if( pInfo->bpFunc && (*pInfo->bpFunc) (&gpio) == BP_SUCCESS ) ++ { ++ pLedMap->ledName = pInfo->ledName; ++ pLedMap->ledMask = GPIO_NUM_TO_MASK(gpio); ++ pLedMap->ledActiveLow = (gpio & BP_ACTIVE_LOW) ? 1 : 0; ++ } ++ if( pInfo->bpFuncFail && (*pInfo->bpFuncFail) (&gpio) == BP_SUCCESS ) ++ { ++ pLedMap->ledName = pInfo->ledName; ++ pLedMap->ledMaskFail = GPIO_NUM_TO_MASK(gpio); ++ pLedMap->ledActiveLowFail = (gpio & BP_ACTIVE_LOW) ? 1 : 0; ++ } ++ if( pLedMap->ledName != kLedEnd ) ++ pLedMap++; ++ } ++ ++ init_waitqueue_head(&g_board_wait_queue); ++#if defined (WIRELESS) ++ ses_board_init(); ++#endif ++ kerSysInitDyingGaspHandler(); ++ kerSysDyingGaspMapIntr(); ++ ++ boardLedInit(LedMapping); ++ g_ledInitialized = 1; ++ } ++ ++ return ret; ++} ++ ++void __init InitNvramInfo( void ) ++{ ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ unsigned long ulNumMacAddrs = pNvramData->ulNumMacAddrs; ++ ++ if( ulNumMacAddrs > 0 && ulNumMacAddrs <= NVRAM_MAC_COUNT_MAX ) ++ { ++ unsigned long ulNvramInfoSize = ++ sizeof(NVRAM_INFO) + ((sizeof(MAC_ADDR_INFO) - 1) * ulNumMacAddrs); ++ ++ g_pNvramInfo = (PNVRAM_INFO) kmalloc( ulNvramInfoSize, GFP_KERNEL ); ++ ++ if( g_pNvramInfo ) ++ { ++ unsigned long ulPsiSize; ++ if( BpGetPsiSize( &ulPsiSize ) != BP_SUCCESS ) ++ ulPsiSize = NVRAM_PSI_DEFAULT; ++ memset( g_pNvramInfo, 0x00, ulNvramInfoSize ); ++ g_pNvramInfo->ulPsiSize = ulPsiSize * 1024; ++ g_pNvramInfo->ulNumMacAddrs = pNvramData->ulNumMacAddrs; ++ memcpy( g_pNvramInfo->ucaBaseMacAddr, pNvramData->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ g_pNvramInfo->ulSdramSize = getMemorySize(); ++ } ++ else ++ printk("ERROR - Could not allocate memory for NVRAM data\n"); ++ } ++ else ++ printk("ERROR - Invalid number of MAC addresses (%ld) is configured.\n", ++ ulNumMacAddrs); ++} ++ ++void __exit brcm_board_cleanup( void ) ++{ ++ printk("brcm_board_cleanup()\n"); ++ ++ if (board_major != -1) ++ { ++#if defined (WIRELESS) ++ ses_board_deinit(); ++#endif ++ kerSysDeinitDyingGaspHandler(); ++ unregister_chrdev(board_major, "board_ioctl"); ++ } ++} ++ ++static BOARD_IOC* borad_ioc_alloc(void) ++{ ++ BOARD_IOC *board_ioc =NULL; ++ board_ioc = (BOARD_IOC*) kmalloc( sizeof(BOARD_IOC) , GFP_KERNEL ); ++ if(board_ioc) ++ { ++ memset(board_ioc, 0, sizeof(BOARD_IOC)); ++ } ++ return board_ioc; ++} ++ ++static void borad_ioc_free(BOARD_IOC* board_ioc) ++{ ++ if(board_ioc) ++ { ++ kfree(board_ioc); ++ } ++} ++ ++ ++static int board_open( struct inode *inode, struct file *filp ) ++{ ++ filp->private_data = borad_ioc_alloc(); ++ ++ if (filp->private_data == NULL) ++ return -ENOMEM; ++ ++ return( 0 ); ++} ++ ++static int board_release(struct inode *inode, struct file *filp) ++{ ++ BOARD_IOC *board_ioc = filp->private_data; ++ ++ wait_event_interruptible(g_board_wait_queue, 1); ++ borad_ioc_free(board_ioc); ++ ++ return( 0 ); ++} ++ ++ ++static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait) ++{ ++ unsigned int mask = 0; ++#if defined (WIRELESS) ++ BOARD_IOC *board_ioc = filp->private_data; ++#endif ++ ++ poll_wait(filp, &g_board_wait_queue, wait); ++#if defined (WIRELESS) ++ if(board_ioc->eventmask & SES_EVENTS){ ++ mask |= sesBtn_poll(filp, wait); ++ } ++#endif ++ ++ return mask; ++} ++ ++ ++static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) ++{ ++#if defined (WIRELESS) ++ BOARD_IOC *board_ioc = filp->private_data; ++ if(board_ioc->eventmask & SES_EVENTS){ ++ return sesBtn_read(filp, buffer, count, ppos); ++ } ++#endif ++ return 0; ++} ++ ++//************************************************************************************** ++// Utitlities for dump memory, free kernel pages, mips soft reset, etc. ++//************************************************************************************** ++ ++/*********************************************************************** ++ * Function Name: dumpaddr ++ * Description : Display a hex dump of the specified address. ++ ***********************************************************************/ ++void dumpaddr( unsigned char *pAddr, int nLen ) ++{ ++ static char szHexChars[] = "0123456789abcdef"; ++ char szLine[80]; ++ char *p = szLine; ++ unsigned char ch, *q; ++ int i, j; ++ unsigned long ul; ++ ++ while( nLen > 0 ) ++ { ++ sprintf( szLine, "%8.8lx: ", (unsigned long) pAddr ); ++ p = szLine + strlen(szLine); ++ ++ for(i = 0; i < 16 && nLen > 0; i += sizeof(long), nLen -= sizeof(long)) ++ { ++ ul = *(unsigned long *) &pAddr[i]; ++ q = (unsigned char *) &ul; ++ for( j = 0; j < sizeof(long); j++ ) ++ { ++ *p++ = szHexChars[q[j] >> 4]; ++ *p++ = szHexChars[q[j] & 0x0f]; ++ *p++ = ' '; ++ } ++ } ++ ++ for( j = 0; j < 16 - i; j++ ) ++ *p++ = ' ', *p++ = ' ', *p++ = ' '; ++ ++ *p++ = ' ', *p++ = ' ', *p++ = ' '; ++ ++ for( j = 0; j < i; j++ ) ++ { ++ ch = pAddr[j]; ++ *p++ = (ch > ' ' && ch < '~') ? ch : '.'; ++ } ++ ++ *p++ = '\0'; ++ printk( "%s\r\n", szLine ); ++ ++ pAddr += i; ++ } ++ printk( "\r\n" ); ++} /* dumpaddr */ ++ ++ ++void kerSysMipsSoftReset(void) ++{ ++#if defined(CONFIG_BCM96348) ++ if (PERF->RevID == 0x634800A1) { ++ typedef void (*FNPTR) (void); ++ FNPTR bootaddr = (FNPTR) FLASH_BASE; ++ int i; ++ ++ /* Disable interrupts. */ ++ cli(); ++ ++ /* Reset all blocks. */ ++ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; ++ for( i = 0; i < 1000000; i++ ) ++ ; ++ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; ++ /* Jump to the power on address. */ ++ (*bootaddr) (); ++ } ++ else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++#else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++#endif ++} ++ ++ ++int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) ++{ ++ int nRet = 0; ++ PMAC_ADDR_INFO pMai = NULL; ++ PMAC_ADDR_INFO pMaiFreeNoId = NULL; ++ PMAC_ADDR_INFO pMaiFreeId = NULL; ++ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; ++ ++ for( i = 0, pMai = g_pNvramInfo->MacAddrs; i < g_pNvramInfo->ulNumMacAddrs; ++ i++, pMai++ ) ++ { ++ if( ulId == pMai->ulId || ulId == MAC_ADDRESS_ANY ) ++ { ++ /* This MAC address has been used by the caller in the past. */ ++ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ shiftedIdx = i; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMai->chInUse = 1; ++ pMaiFreeNoId = pMaiFreeId = NULL; ++ break; ++ } ++ else ++ if( pMai->chInUse == 0 ) ++ { ++ if( pMai->ulId == 0 && pMaiFreeNoId == NULL ) ++ { ++ /* This is an available MAC address that has never been ++ * used. ++ */ ++ pMaiFreeNoId = pMai; ++ ulIdxNoId = i; ++ } ++ else ++ if( pMai->ulId != 0 && pMaiFreeId == NULL ) ++ { ++ /* This is an available MAC address that has been used ++ * before. Use addresses that have never been used ++ * first, before using this one. ++ */ ++ pMaiFreeId = pMai; ++ ulIdxId = i; ++ } ++ } ++ } ++ ++ if( pMaiFreeNoId || pMaiFreeId ) ++ { ++ /* An available MAC address was found. */ ++ memcpy(pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr,NVRAM_MAC_ADDRESS_LEN); ++ if( pMaiFreeNoId ) ++ { ++ shiftedIdx = ulIdxNoId; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMaiFreeNoId->ulId = ulId; ++ pMaiFreeNoId->chInUse = 1; ++ } ++ else ++ { ++ shiftedIdx = ulIdxId; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMaiFreeId->ulId = ulId; ++ pMaiFreeId->chInUse = 1; ++ } ++ } ++ else ++ if( i == g_pNvramInfo->ulNumMacAddrs ) ++ nRet = -EADDRNOTAVAIL; ++ ++ return( nRet ); ++} /* kerSysGetMacAddr */ ++ ++int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) ++{ ++ int nRet = -EINVAL; ++ unsigned long ulIdx = 0; ++ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - ++ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); ++ ++ // if overflow 255 (negitive), add 256 to have the correct index ++ if (idx < 0) ++ idx += 256; ++ ulIdx = (unsigned long) (idx >> SHIFT_BITS); ++ ++ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) ++ { ++ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; ++ if( pMai->chInUse == 1 ) ++ { ++ pMai->chInUse = 0; ++ nRet = 0; ++ } ++ } ++ ++ return( nRet ); ++} /* kerSysReleaseMacAddr */ ++ ++int kerSysGetSdramSize( void ) ++{ ++ return( (int) g_pNvramInfo->ulSdramSize ); ++} /* kerSysGetSdramSize */ ++ ++ ++void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ if (g_ledInitialized) ++ boardLedCtrl(ledName, ledState); ++} ++ ++unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) ++{ ++ int mask = (*g_orig_fop_poll) (f, t); ++ ++ if( g_wakeup_monitor == 1 && g_monitor_file == f ) ++ { ++ /* If g_wakeup_monitor is non-0, the user mode application needs to ++ * return from a blocking select function. Return POLLPRI which will ++ * cause the select to return with the exception descriptor set. ++ */ ++ mask |= POLLPRI; ++ g_wakeup_monitor = 0; ++ } ++ ++ return( mask ); ++} ++ ++/* Put the user mode application that monitors link state on a run queue. */ ++void kerSysWakeupMonitorTask( void ) ++{ ++ g_wakeup_monitor = 1; ++ if( g_monitor_task ) ++ wake_up_process( g_monitor_task ); ++} ++ ++//******************************************************************************************** ++// misc. ioctl calls come to here. (flash, led, reset, kernel memory access, etc.) ++//******************************************************************************************** ++static int board_ioctl( struct inode *inode, struct file *flip, ++ unsigned int command, unsigned long arg ) ++{ ++ int ret = 0; ++ BOARD_IOCTL_PARMS ctrlParms; ++ unsigned char ucaMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ int allowedSize; ++ ++ switch (command) ++ { ++ case BOARD_IOCTL_FLASH_INIT: ++ // not used for now. kerSysBcmImageInit(); ++ break; ++ ++ ++ case BOARD_IOCTL_FLASH_WRITE: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ NVRAM_DATA SaveNvramData; ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ ++ switch (ctrlParms.action) ++ { ++ case SCRATCH_PAD: ++ ret = kerSysScratchPadSet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); ++ break; ++ ++ case PERSISTENT: ++ ret = kerSysPersistentSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case NVRAM: ++ ret = kerSysNvRamSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case BCM_IMAGE_CFE: ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > FLASH45_LENGTH_BOOT_ROM ) ++ { ++ printk("Illegal CFE size [%d]. Size allowed: [%d]\n", ++ ctrlParms.strLen, FLASH45_LENGTH_BOOT_ROM); ++ ret = -1; ++ break; ++ } ++ ++ // save NVRAM data into a local structure ++ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); ++ ++ // set memory type field ++ BpGetSdramSize( (unsigned long *) &ctrlParms.string[SDRAM_TYPE_ADDRESS_OFFSET] ); ++ ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ ++ // if nvram is not valid, restore the current nvram settings ++ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && ++ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) ++ { ++ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); ++ } ++ break; ++ ++ case BCM_IMAGE_FS: ++ allowedSize = (int) flash_get_total_size() - \ ++ FLASH_RESERVED_AT_END - TAG_LEN - FLASH45_LENGTH_BOOT_ROM; ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize) ++ { ++ printk("Illegal root file system size [%d]. Size allowed: [%d]\n", ++ ctrlParms.strLen, allowedSize); ++ ret = -1; ++ break; ++ } ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ kerSysMipsSoftReset(); ++ break; ++ ++ case BCM_IMAGE_KERNEL: // not used for now. ++ break; ++ case BCM_IMAGE_WHOLE: ++ if(ctrlParms.strLen <= 0) ++ { ++ printk("Illegal flash image size [%d].\n", ctrlParms.strLen); ++ ret = -1; ++ break; ++ } ++ ++ // save NVRAM data into a local structure ++ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); ++ ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ ++ // if nvram is not valid, restore the current nvram settings ++ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && ++ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) ++ { ++ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); ++ } ++ ++ kerSysMipsSoftReset(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ printk("flash_ioctl_command: invalid command %d\n", ctrlParms.action); ++ break; ++ } ++ ctrlParms.result = ret; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_FLASH_READ: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ switch (ctrlParms.action) ++ { ++ case SCRATCH_PAD: ++ ret = kerSysScratchPadGet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); ++ break; ++ ++ case PERSISTENT: ++ ret = kerSysPersistentGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case NVRAM: ++ ret = kerSysNvRamGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case FLASH_SIZE: ++ ret = kerSysFlashSizeGet(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ printk("Not supported. invalid command %d\n", ctrlParms.action); ++ break; ++ } ++ ctrlParms.result = ret; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_NR_PAGES: ++ ctrlParms.result = nr_free_pages() + get_page_cache_size(); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_DUMP_ADDR: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ dumpaddr( (unsigned char *) ctrlParms.string, ctrlParms.strLen ); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_SET_MEMORY: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ unsigned long *pul = (unsigned long *) ctrlParms.string; ++ unsigned short *pus = (unsigned short *) ctrlParms.string; ++ unsigned char *puc = (unsigned char *) ctrlParms.string; ++ switch( ctrlParms.strLen ) ++ { ++ case 4: ++ *pul = (unsigned long) ctrlParms.offset; ++ break; ++ case 2: ++ *pus = (unsigned short) ctrlParms.offset; ++ break; ++ case 1: ++ *puc = (unsigned char) ctrlParms.offset; ++ break; ++ } ++ dumpaddr( (unsigned char *) ctrlParms.string, sizeof(long) ); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_MIPS_SOFT_RESET: ++ kerSysMipsSoftReset(); ++ break; ++ ++ case BOARD_IOCTL_LED_CTRL: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ kerSysLedCtrl((BOARD_LED_NAME)ctrlParms.strLen, (BOARD_LED_STATE)ctrlParms.offset); ++ ret = 0; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_ID: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, ++ sizeof(ctrlParms)) == 0) ++ { ++ if( ctrlParms.string ) ++ { ++ char *p = (char *) get_system_type(); ++ if( strlen(p) + 1 < ctrlParms.strLen ) ++ ctrlParms.strLen = strlen(p) + 1; ++ __copy_to_user(ctrlParms.string, p, ctrlParms.strLen); ++ } ++ ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ ctrlParms.result = kerSysGetMacAddress( ucaMacAddr, ++ ctrlParms.offset ); ++ ++ if( ctrlParms.result == 0 ) ++ { ++ __copy_to_user(ctrlParms.string, ucaMacAddr, ++ sizeof(ucaMacAddr)); ++ } ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_RELEASE_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ if (copy_from_user((void*)ucaMacAddr, (void*)ctrlParms.string, \ ++ NVRAM_MAC_ADDRESS_LEN) == 0) ++ { ++ ctrlParms.result = kerSysReleaseMacAddress( ucaMacAddr ); ++ } ++ else ++ { ++ ctrlParms.result = -EACCES; ++ } ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_PSI_SIZE: ++ ctrlParms.result = (int) g_pNvramInfo->ulPsiSize; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_SDRAM_SIZE: ++ ctrlParms.result = (int) g_pNvramInfo->ulSdramSize; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_BASE_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ __copy_to_user(ctrlParms.string, g_pNvramInfo->ucaBaseMacAddr, NVRAM_MAC_ADDRESS_LEN); ++ ctrlParms.result = 0; ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_CHIP_ID: ++ ctrlParms.result = (int) (PERF->RevID & 0xFFFF0000) >> 16; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_NUM_ENET: { ++ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; ++ int i, numeth = 0; ++ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { ++ for( i = 0; i < BP_MAX_ENET_MACS; i++) { ++ if (EnetInfos[i].ucPhyType != BP_ENET_NO_PHY) { ++ numeth++; ++ } ++ } ++ ctrlParms.result = numeth; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ ++ case BOARD_IOCTL_GET_CFE_VER: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ char *vertag = (char *)(FLASH_BASE + CFE_VERSION_OFFSET); ++ if (ctrlParms.strLen < CFE_VERSION_SIZE) { ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = -EFAULT; ++ } ++ else if (strncmp(vertag, "cfe-v", 5)) { // no tag info in flash ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ ctrlParms.result = 1; ++ __copy_to_user(ctrlParms.string, vertag+CFE_VERSION_MARK_SIZE, CFE_VERSION_SIZE); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_ENET_CFG: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; ++ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { ++ if (ctrlParms.strLen == sizeof(EnetInfos)) { ++ __copy_to_user(ctrlParms.string, EnetInfos, sizeof(EnetInfos)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++#if defined (WIRELESS) ++ case BOARD_IOCTL_GET_WLAN_ANT_INUSE: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ unsigned short antInUse = 0; ++ if (BpGetWirelessAntInUse(&antInUse) == BP_SUCCESS) { ++ if (ctrlParms.strLen == sizeof(antInUse)) { ++ __copy_to_user(ctrlParms.string, &antInUse, sizeof(antInUse)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#endif ++ case BOARD_IOCTL_SET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ ctrlParms.result = -EFAULT; ++ ret = -EFAULT; ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ board_ioc->eventmask |= *((int*)ctrlParms.string); ++#if defined (WIRELESS) ++ if((board_ioc->eventmask & SES_EVENTS)) { ++ if(sesBtn_irq != BP_NOT_DEFINED) { ++ BcmHalInterruptEnable(sesBtn_irq); ++ ctrlParms.result = 0; ++ ret = 0; ++ } ++ } ++#endif ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ __copy_to_user(ctrlParms.string, &board_ioc->eventmask, sizeof(unsigned long)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_UNSET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ board_ioc->eventmask &= (~(*((int*)ctrlParms.string))); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#if defined (WIRELESS) ++ case BOARD_IOCTL_SET_SES_LED: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ if (ctrlParms.strLen == sizeof(int)) { ++ sesLed_ctrl(*(int*)ctrlParms.string); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#endif ++ ++ case BOARD_IOCTL_SET_MONITOR_FD: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ int fput_needed = 0; ++ ++ g_monitor_file = fget_light( ctrlParms.offset, &fput_needed ); ++ if( g_monitor_file ) { ++ /* Hook this file descriptor's poll function in order to set ++ * the exception descriptor when there is a change in link ++ * state. ++ */ ++ g_monitor_task = current; ++ g_orig_fop_poll = g_monitor_file->f_op->poll; ++ g_monitor_file->f_op->poll = kerSysMonitorPollHook; ++ } ++ } ++ break; ++ ++ case BOARD_IOCTL_WAKEUP_MONITOR_TASK: ++ kerSysWakeupMonitorTask(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ ctrlParms.result = 0; ++ printk("board_ioctl: invalid command %x, cmd %d .\n",command,_IOC_NR(command)); ++ break; ++ ++ } /* switch */ ++ ++ return (ret); ++ ++} /* board_ioctl */ ++ ++/*************************************************************************** ++ * SES Button ISR/GPIO/LED functions. ++ ***************************************************************************/ ++#if defined (WIRELESS) ++static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs) ++{ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if (!(*gpio_reg & gpio_mask)){ ++ wake_up_interruptible(&g_board_wait_queue); ++ return IRQ_RETVAL(1); ++ } else { ++ return IRQ_RETVAL(0); ++ } ++} ++ ++static void __init sesBtn_mapGpio() ++{ ++ if( BpGetWirelessSesBtnGpio(&sesBtn_gpio) == BP_SUCCESS ) ++ { ++ printk("SES: Button GPIO 0x%x is enabled\n", sesBtn_gpio); ++ } ++} ++ ++static void __init sesBtn_mapIntr(int context) ++{ ++ if( BpGetWirelessSesExtIntr(&sesBtn_irq) == BP_SUCCESS ) ++ { ++ printk("SES: Button Interrupt 0x%x is enabled\n", sesBtn_irq); ++ } ++ else ++ return; ++ ++ sesBtn_irq += INTERRUPT_ID_EXTERNAL_0; ++ ++ if (BcmHalMapInterrupt((FN_HANDLER)sesBtn_isr, context, sesBtn_irq)) { ++ printk("SES: Interrupt mapping failed\n"); ++ } ++ BcmHalInterruptEnable(sesBtn_irq); ++} ++ ++ ++static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait) ++{ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if (!(*gpio_reg & gpio_mask)){ ++ return POLLIN; ++ } ++ return 0; ++} ++ ++static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) ++{ ++ volatile unsigned int event=0; ++ ssize_t ret=0; ++ ++#if defined(_BCM96338_) || defined (CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined (CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if(*gpio_reg & gpio_mask){ ++ BcmHalInterruptEnable(sesBtn_irq); ++ return ret; ++ } ++ event = SES_EVENTS; ++ __copy_to_user((char*)buffer, (char*)&event, sizeof(event)); ++ BcmHalInterruptEnable(sesBtn_irq); ++ count -= sizeof(event); ++ buffer += sizeof(event); ++ ret += sizeof(event); ++ return ret; ++} ++ ++static void __init sesLed_mapGpio() ++{ ++ if( BpGetWirelessSesBtnGpio(&sesLed_gpio) == BP_SUCCESS ) ++ { ++ printk("SES: LED GPIO 0x%x is enabled\n", sesBtn_gpio); ++ } ++} ++ ++static void sesLed_ctrl(int action) ++{ ++ ++ //char status = ((action >> 8) & 0xff); /* extract status */ ++ //char event = ((action >> 16) & 0xff); /* extract event */ ++ //char blinktype = ((action >> 24) & 0xff); /* extract blink type for SES_LED_BLINK */ ++ ++ BOARD_LED_STATE led; ++ ++ if(sesLed_gpio == BP_NOT_DEFINED) ++ return; ++ ++ action &= 0xff; /* extract led */ ++ ++ //printk("blinktype=%d, event=%d, status=%d\n",(int)blinktype, (int)event, (int)status); ++ ++ switch (action) ++ { ++ case SES_LED_ON: ++ //printk("SES: led on\n"); ++ led = kLedStateOn; ++ break; ++ case SES_LED_BLINK: ++ //printk("SES: led blink\n"); ++ led = kLedStateSlowBlinkContinues; ++ break; ++ case SES_LED_OFF: ++ default: ++ //printk("SES: led off\n"); ++ led = kLedStateOff; ++ } ++ ++ kerSysLedCtrl(kLedSes, led); ++} ++ ++static void __init ses_board_init() ++{ ++ sesBtn_mapGpio(); ++ sesBtn_mapIntr(0); ++ sesLed_mapGpio(); ++} ++static void __exit ses_board_deinit() ++{ ++ if(sesBtn_irq) ++ BcmHalInterruptDisable(sesBtn_irq); ++} ++#endif ++ ++/*************************************************************************** ++ * Dying gasp ISR and functions. ++ ***************************************************************************/ ++#define KERSYS_DBG printk ++ ++#if defined(CONFIG_BCM96345) ++#define CYCLE_PER_US 70 ++#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++/* The BCM6348 cycles per microsecond is really variable since the BCM6348 ++ * MIPS speed can vary depending on the PLL settings. However, an appoximate ++ * value of 120 will still work OK for the test being done. ++ */ ++#define CYCLE_PER_US 120 ++#endif ++#define DG_GLITCH_TO (100*CYCLE_PER_US) ++ ++static void __init kerSysDyingGaspMapIntr() ++{ ++ unsigned long ulIntr; ++ ++#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ } ++#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ ulIntr += INTERRUPT_ID_EXTERNAL_0; ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); ++ BcmHalInterruptEnable( ulIntr ); ++ } ++#endif ++ ++} ++ ++void kerSysSetWdTimer(ulong timeUs) ++{ ++ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); ++ TIMER->WatchDogCtl = 0xFF00; ++ TIMER->WatchDogCtl = 0x00FF; ++} ++ ++ulong kerSysGetCycleCount(void) ++{ ++ ulong cnt; ++#ifdef _WIN32_WCE ++ cnt = 0; ++#else ++ __asm volatile("mfc0 %0, $9":"=d"(cnt)); ++#endif ++ return(cnt); ++} ++ ++static Bool kerSysDyingGaspCheckPowerLoss(void) ++{ ++ ulong clk0; ++ ulong ulIntr; ++ ++ ulIntr = 0; ++ clk0 = kerSysGetCycleCount(); ++ ++ UART->Data = 'D'; ++ UART->Data = '%'; ++ UART->Data = 'G'; ++ ++#if defined(CONFIG_BCM96345) ++ BpGetAdslDyingGaspExtIntr( &ulIntr ); ++ ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ ++ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#endif ++ return 1; ++} ++ ++static void kerSysDyingGaspShutdown( void ) ++{ ++ kerSysSetWdTimer(1000000); ++#if defined(CONFIG_BCM96345) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); ++#elif defined(CONFIG_BCM96348) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); ++#endif ++} ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) ++#else ++static unsigned int kerSysDyingGaspIsr(void) ++#endif ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp, *dsl = NULL; ++ ++ if (kerSysDyingGaspCheckPowerLoss()) { ++ ++ /* first to turn off everything other than dsl */ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(strncmp(tmp->name, "dsl", 3)) { ++ (tmp->cb_dgasp_fn)(tmp->context); ++ }else { ++ dsl = tmp; ++ } ++ } ++ ++ /* now send dgasp */ ++ if(dsl) ++ (dsl->cb_dgasp_fn)(dsl->context); ++ ++ /* reset and shutdown system */ ++ kerSysDyingGaspShutdown(); ++ } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++return( IRQ_HANDLED ); ++#else ++ return( 1 ); ++#endif ++} ++ ++static void __init kerSysInitDyingGaspHandler( void ) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head != NULL) { ++ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); ++ return; ++ } ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ g_cb_dgasp_list_head = new_node; ++ ++} /* kerSysInitDyingGaspHandler */ ++ ++static void __exit kerSysDeinitDyingGaspHandler( void ) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) ++ return; ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ list_del(pos); ++ kfree(tmp); ++ } ++ ++ kfree(g_cb_dgasp_list_head); ++ g_cb_dgasp_list_head = NULL; ++ ++} /* kerSysDeinitDyingGaspHandler */ ++ ++void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if( devname == NULL || cbfn == NULL ) { ++ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); ++ return; ++ } ++ ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ strncpy(new_node->name, devname, IFNAMSIZ); ++ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; ++ new_node->context = context; ++ list_add(&new_node->list, &g_cb_dgasp_list_head->list); ++ ++ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); ++ ++} /* kerSysRegisterDyingGaspHandler */ ++ ++void kerSysDeregisterDyingGaspHandler(char *devname) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if(devname == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); ++ return; ++ } ++ ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(!strcmp(tmp->name, devname)) { ++ list_del(pos); ++ kfree(tmp); ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); ++ return; ++ } ++ } ++ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); ++ ++} /* kerSysDeregisterDyingGaspHandler */ ++ ++/*************************************************************************** ++ * MACRO to call driver initialization and cleanup functions. ++ ***************************************************************************/ ++module_init( brcm_board_init ); ++module_exit( brcm_board_cleanup ); ++ ++EXPORT_SYMBOL(kerSysNvRamGet); ++EXPORT_SYMBOL(dumpaddr); ++EXPORT_SYMBOL(kerSysGetMacAddress); ++EXPORT_SYMBOL(kerSysReleaseMacAddress); ++EXPORT_SYMBOL(kerSysGetSdramSize); ++EXPORT_SYMBOL(kerSysLedCtrl); ++EXPORT_SYMBOL(kerSysLedRegisterHwHandler); ++EXPORT_SYMBOL(BpGetBoardIds); ++EXPORT_SYMBOL(BpGetSdramSize); ++EXPORT_SYMBOL(BpGetPsiSize); ++EXPORT_SYMBOL(BpGetEthernetMacInfo); ++EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); ++EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); ++EXPORT_SYMBOL(BpGetVoipResetGpio); ++EXPORT_SYMBOL(BpGetVoipIntrGpio); ++EXPORT_SYMBOL(BpGetPcmciaResetGpio); ++EXPORT_SYMBOL(BpGetRtsCtsUartGpios); ++EXPORT_SYMBOL(BpGetAdslLedGpio); ++EXPORT_SYMBOL(BpGetAdslFailLedGpio); ++EXPORT_SYMBOL(BpGetWirelessLedGpio); ++EXPORT_SYMBOL(BpGetUsbLedGpio); ++EXPORT_SYMBOL(BpGetHpnaLedGpio); ++EXPORT_SYMBOL(BpGetWanDataLedGpio); ++EXPORT_SYMBOL(BpGetPppLedGpio); ++EXPORT_SYMBOL(BpGetPppFailLedGpio); ++EXPORT_SYMBOL(BpGetVoipLedGpio); ++EXPORT_SYMBOL(BpGetWirelessExtIntr); ++EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); ++EXPORT_SYMBOL(BpGetVoipExtIntr); ++EXPORT_SYMBOL(BpGetHpnaExtIntr); ++EXPORT_SYMBOL(BpGetHpnaChipSelect); ++EXPORT_SYMBOL(BpGetVoipChipSelect); ++EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); ++EXPORT_SYMBOL(BpGetWirelessSesExtIntr); ++EXPORT_SYMBOL(BpGetWirelessSesLedGpio); ++EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysGetCycleCount); ++EXPORT_SYMBOL(kerSysSetWdTimer); ++EXPORT_SYMBOL(kerSysWakeupMonitorTask); ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,692 @@ ++/************************************************************************/ ++/* */ ++/* AMD CFI Enabled Flash Memory Drivers */ ++/* File name: CFIFLASH.C */ ++/* Revision: 1.0 5/07/98 */ ++/* */ ++/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ ++/* This software is unpublished and contains the trade secrets and */ ++/* confidential proprietary information of AMD. Unless otherwise */ ++/* provided in the Software Agreement associated herewith, it is */ ++/* licensed in confidence "AS IS" and is not to be reproduced in whole */ ++/* or part by any means except for backup. Use, duplication, or */ ++/* disclosure by the Government is subject to the restrictions in */ ++/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ ++/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ ++/* Software owned by */ ++/* Advanced Micro Devices, Inc., */ ++/* One AMD Place, */ ++/* P.O. Box 3453 */ ++/* Sunnyvale, CA 94088-3453. */ ++/************************************************************************/ ++/* This software constitutes a basic shell of source code for */ ++/* programming all AMD Flash components. AMD */ ++/* will not be responsible for misuse or illegal use of this */ ++/* software for devices not supported herein. AMD is providing */ ++/* this source code "AS IS" and will not be responsible for */ ++/* issues arising from incorrect user implementation of the */ ++/* source code herein. It is the user's responsibility to */ ++/* properly design-in this source code. */ ++/* */ ++/************************************************************************/ ++#ifdef _CFE_ ++#include "lib_types.h" ++#include "lib_printf.h" ++#include "lib_string.h" ++#include "cfe_timer.h" ++#define printk printf ++#else // linux ++#include <linux/param.h> ++#include <linux/sched.h> ++#include <linux/timer.h> ++#endif ++ ++#include "cfiflash.h" ++ ++static int flash_wait(WORD sector, int offset, UINT16 data); ++static UINT16 flash_get_device_id(void); ++static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily); ++static int flash_write(WORD sector, int offset, byte *buf, int nbytes); ++static void flash_command(int command, WORD sector, int offset, UINT16 data); ++ ++/*********************************************************************/ ++/* 'meminfo' should be a pointer, but most C compilers will not */ ++/* allocate static storage for a pointer without calling */ ++/* non-portable functions such as 'new'. We also want to avoid */ ++/* the overhead of passing this pointer for every driver call. */ ++/* Systems with limited heap space will need to do this. */ ++/*********************************************************************/ ++struct flashinfo meminfo; /* Flash information structure */ ++static int flashFamily = FLASH_UNDEFINED; ++static int totalSize = 0; ++static struct cfi_query query; ++ ++static UINT16 cfi_data_struct_29W160[] = { ++ 0x0020, 0x0049, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0x0051, 0x0052, 0x0059, 0x0002, 0x0000, 0x0040, 0x0000, 0x0000, ++ 0x0000, 0x0000, 0x0000, 0x0027, 0x0036, 0x0000, 0x0000, 0x0004, ++ 0x0000, 0x000a, 0x0000, 0x0004, 0x0000, 0x0003, 0x0000, 0x0015, ++ 0x0002, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0040, ++ 0x0000, 0x0001, 0x0000, 0x0020, 0x0000, 0x0000, 0x0000, 0x0080, ++ 0x0000, 0x001e, 0x0000, 0x0000, 0x0001, 0xffff, 0xffff, 0xffff, ++ 0x0050, 0x0052, 0x0049, 0x0031, 0x0030, 0x0000, 0x0002, 0x0001, ++ 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0002, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0x0888, 0x252b, 0x8c84, 0x7dbc, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff ++}; ++ ++ ++/*********************************************************************/ ++/* Init_flash is used to build a sector table from the information */ ++/* provided through the CFI query. This information is translated */ ++/* from erase_block information to base:offset information for each */ ++/* individual sector. This information is then stored in the meminfo */ ++/* structure, and used throughout the driver to access sector */ ++/* information. */ ++/* */ ++/* This is more efficient than deriving the sector base:offset */ ++/* information every time the memory map switches (since on the */ ++/* development platform can only map 64k at a time). If the entire */ ++/* flash memory array can be mapped in, then the addition static */ ++/* allocation for the meminfo structure can be eliminated, but the */ ++/* drivers will have to be re-written. */ ++/* */ ++/* The meminfo struct occupies 653 bytes of heap space, depending */ ++/* on the value of the define MAXSECTORS. Adjust to suit */ ++/* application */ ++/*********************************************************************/ ++byte flash_init(void) ++{ ++ int i=0, j=0, count=0; ++ int basecount=0L; ++ UINT16 device_id; ++ int flipCFIGeometry = FALSE; ++ ++ /* First, assume ++ * a single 8k sector for sector 0. This is to allow ++ * the system to perform memory mapping to the device, ++ * even though the actual physical layout is unknown. ++ * Once mapped in, the CFI query will produce all ++ * relevant information. ++ */ ++ meminfo.addr = 0L; ++ meminfo.areg = 0; ++ meminfo.nsect = 1; ++ meminfo.bank1start = 0; ++ meminfo.bank2start = 0; ++ ++ meminfo.sec[0].size = 8192; ++ meminfo.sec[0].base = 0x00000; ++ meminfo.sec[0].bank = 1; ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ ++ device_id = flash_get_device_id(); ++ ++ switch (device_id) { ++ case ID_I28F160C3B: ++ case ID_I28F320C3B: ++ case ID_I28F160C3T: ++ case ID_I28F320C3T: ++ flashFamily = FLASH_INTEL; ++ break; ++ case ID_AM29DL800B: ++ case ID_AM29LV800B: ++ case ID_AM29LV400B: ++ case ID_AM29LV160B: ++ case ID_AM29LV320B: ++ case ID_MX29LV320AB: ++ case ID_AM29LV320MB: ++ case ID_AM29DL800T: ++ case ID_AM29LV800T: ++ case ID_AM29LV160T: ++ case ID_AM29LV320T: ++ case ID_MX29LV320AT: ++ case ID_AM29LV320MT: ++ flashFamily = FLASH_AMD; ++ break; ++ case ID_SST39VF1601: ++ case ID_SST39VF3201: ++ flashFamily = FLASH_SST; ++ break; ++ default: ++ printk("Flash memory not supported! Device id = %x\n", device_id); ++ return -1; ++ } ++ ++ if (flash_get_cfi(&query, 0, flashFamily) == -1) { ++ switch(device_id) { ++ case ID_AM29LV160T: ++ case ID_AM29LV160B: ++ flash_get_cfi(&query, cfi_data_struct_29W160, flashFamily); ++ break; ++ default: ++ printk("CFI data structure not found. Device id = %x\n", device_id); ++ return -1; ++ } ++ } ++ ++ // need to determine if it top or bottom boot here ++ switch (device_id) ++ { ++ case ID_AM29DL800B: ++ case ID_AM29LV800B: ++ case ID_AM29LV400B: ++ case ID_AM29LV160B: ++ case ID_AM29LV320B: ++ case ID_MX29LV320AB: ++ case ID_AM29LV320MB: ++ case ID_I28F160C3B: ++ case ID_I28F320C3B: ++ case ID_I28F160C3T: ++ case ID_I28F320C3T: ++ case ID_SST39VF1601: ++ case ID_SST39VF3201: ++ flipCFIGeometry = FALSE; ++ break; ++ case ID_AM29DL800T: ++ case ID_AM29LV800T: ++ case ID_AM29LV160T: ++ case ID_AM29LV320T: ++ case ID_MX29LV320AT: ++ case ID_AM29LV320MT: ++ flipCFIGeometry = TRUE; ++ break; ++ default: ++ printk("Flash memory not supported! Device id = %x\n", device_id); ++ return -1; ++ } ++ ++ count=0;basecount=0L; ++ ++ if (!flipCFIGeometry) ++ { ++ for (i=0; i<query.num_erase_blocks; i++) { ++ for(j=0; j<query.erase_block[i].num_sectors; j++) { ++ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; ++ meminfo.sec[count].base = (int) basecount; ++ basecount += (int) query.erase_block[i].sector_size; ++ count++; ++ } ++ } ++ } ++ else ++ { ++ for (i = (query.num_erase_blocks - 1); i >= 0; i--) { ++ for(j=0; j<query.erase_block[i].num_sectors; j++) { ++ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; ++ meminfo.sec[count].base = (int) basecount; ++ basecount += (int) query.erase_block[i].sector_size; ++ count++; ++ } ++ } ++ } ++ ++ meminfo.nsect = count; ++ totalSize = meminfo.sec[count-1].base + meminfo.sec[count-1].size; ++ return (0); ++} ++ ++/*********************************************************************/ ++/* Flash_sector_erase_int() is identical to flash_sector_erase(), */ ++/* except it will wait until the erase is completed before returning */ ++/* control to the calling function. This can be used in cases which */ ++/* require the program to hold until a sector is erased, without */ ++/* adding the wait check external to this function. */ ++/*********************************************************************/ ++byte flash_sector_erase_int(WORD sector) ++{ ++ int i; ++ ++ for( i = 0; i < 3; i++ ) { ++ flash_command(FLASH_SERASE, sector, 0, 0); ++ if (flash_wait(sector, 0, 0xffff) == STATUS_READY) ++ break; ++ } ++ ++ return(1); ++} ++ ++/*********************************************************************/ ++/* flash_read_buf() reads buffer of data from the specified */ ++/* offset from the sector parameter. */ ++/*********************************************************************/ ++int flash_read_buf(WORD sector, int offset, ++ byte *buffer, int numbytes) ++{ ++ byte *fwp; ++ ++ fwp = (byte *)flash_get_memptr(sector); ++ ++ while (numbytes) { ++ *buffer++ = *(fwp + offset); ++ numbytes--; ++ fwp++; ++ } ++ ++ return (1); ++} ++ ++/*********************************************************************/ ++/* flash_write_buf() utilizes */ ++/* the unlock bypass mode of the flash device. This can remove */ ++/* significant overhead from the bulk programming operation, and */ ++/* when programming bulk data a sizeable performance increase can be */ ++/* observed. */ ++/*********************************************************************/ ++int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes) ++{ ++ int ret = -1; ++ int i; ++ unsigned char *p = flash_get_memptr(sector) + offset; ++ ++ /* After writing the flash block, compare the contents to the source ++ * buffer. Try to write the sector successfully up to three times. ++ */ ++ for( i = 0; i < 3; i++ ) { ++ ret = flash_write(sector, offset, buffer, numbytes); ++ if( !memcmp( p, buffer, numbytes ) ) ++ break; ++ /* Erase and try again */ ++ flash_sector_erase_int(sector); ++ ret = -1; ++ } ++ ++ if( ret == -1 ) ++ printk( "Flash write error. Verify failed\n" ); ++ ++ return( ret ); ++} ++ ++/*********************************************************************/ ++/* Usefull funtion to return the number of sectors in the device. */ ++/* Can be used for functions which need to loop among all the */ ++/* sectors, or wish to know the number of the last sector. */ ++/*********************************************************************/ ++int flash_get_numsectors(void) ++{ ++ return meminfo.nsect; ++} ++ ++/*********************************************************************/ ++/* flash_get_sector_size() is provided for cases in which the size */ ++/* of a sector is required by a host application. The sector size */ ++/* (in bytes) is returned in the data location pointed to by the */ ++/* 'size' parameter. */ ++/*********************************************************************/ ++int flash_get_sector_size(WORD sector) ++{ ++ return meminfo.sec[sector].size; ++} ++ ++/*********************************************************************/ ++/* The purpose of flash_get_memptr() is to return a memory pointer */ ++/* which points to the beginning of memory space allocated for the */ ++/* flash. All function pointers are then referenced from this */ ++/* pointer. */ ++/* */ ++/* Different systems will implement this in different ways: */ ++/* possibilities include: */ ++/* - A direct memory pointer */ ++/* - A pointer to a memory map */ ++/* - A pointer to a hardware port from which the linear */ ++/* address is translated */ ++/* - Output of an MMU function / service */ ++/* */ ++/* Also note that this function expects the pointer to a specific */ ++/* sector of the device. This can be provided by dereferencing */ ++/* the pointer from a translated offset of the sector from a */ ++/* global base pointer (e.g. flashptr = base_pointer + sector_offset)*/ ++/* */ ++/* Important: Many AMD flash devices need both bank and or sector */ ++/* address bits to be correctly set (bank address bits are A18-A16, */ ++/* and sector address bits are A18-A12, or A12-A15). Flash parts */ ++/* which do not need these bits will ignore them, so it is safe to */ ++/* assume that every part will require these bits to be set. */ ++/*********************************************************************/ ++unsigned char *flash_get_memptr(WORD sector) ++{ ++ unsigned char *memptr = (unsigned char*)(FLASH_BASE_ADDR_REG + meminfo.sec[sector].base); ++ ++ return (memptr); ++} ++ ++/*********************************************************************/ ++/* The purpose of flash_get_blk() is to return a the block number */ ++/* for a given memory address. */ ++/*********************************************************************/ ++int flash_get_blk(int addr) ++{ ++ int blk_start, i; ++ int last_blk = flash_get_numsectors(); ++ int relative_addr = addr - (int) FLASH_BASE_ADDR_REG; ++ ++ for(blk_start=0, i=0; i < relative_addr && blk_start < last_blk; blk_start++) ++ i += flash_get_sector_size(blk_start); ++ ++ if( i > relative_addr ) ++ { ++ blk_start--; // last blk, dec by 1 ++ } ++ else ++ if( blk_start == last_blk ) ++ { ++ printk("Address is too big.\n"); ++ blk_start = -1; ++ } ++ ++ return( blk_start ); ++} ++ ++/************************************************************************/ ++/* The purpose of flash_get_total_size() is to return the total size of */ ++/* the flash */ ++/************************************************************************/ ++int flash_get_total_size() ++{ ++ return totalSize; ++} ++ ++/*********************************************************************/ ++/* Flash_command() is the main driver function. It performs */ ++/* every possible command available to AMD B revision */ ++/* flash parts. Note that this command is not used directly, but */ ++/* rather called through the API wrapper functions provided below. */ ++/*********************************************************************/ ++static void flash_command(int command, WORD sector, int offset, UINT16 data) ++{ ++ volatile UINT16 *flashptr; ++ volatile UINT16 *flashbase; ++ ++ flashptr = (UINT16 *) flash_get_memptr(sector); ++ flashbase = (UINT16 *) flash_get_memptr(0); ++ ++ switch (flashFamily) { ++ case FLASH_UNDEFINED: ++ /* These commands should work for AMD, Intel and SST flashes */ ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xF0; ++ flashptr[0] = 0xFF; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0x5555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AAA] = 0x55; /* unlock 2 */ ++ flashptr[0x5555] = 0x90; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_AMD: ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xF0; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashptr[0x55] = 0x98; ++ break; ++ case FLASH_UB: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x20; ++ break; ++ case FLASH_PROG: ++ flashptr[0] = 0xA0; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_UBRESET: ++ flashptr[0] = 0x90; ++ flashptr[0] = 0x00; ++ break; ++ case FLASH_SERASE: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x80; ++ flashptr[0x555] = 0xAA; ++ flashptr[0x2AA] = 0x55; ++ flashptr[0] = 0x30; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_INTEL: ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xFF; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashptr[0] = 0x98; ++ break; ++ case FLASH_PROG: ++ flashptr[0] = 0x40; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_SERASE: ++ flashptr[0] = 0x60; ++ flashptr[0] = 0xD0; ++ flashptr[0] = 0x20; ++ flashptr[0] = 0xD0; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_SST: ++ switch (command) { ++ case FLASH_RESET: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0xf0; ++ break; ++ case FLASH_READ_ID: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x98; ++ break; ++ case FLASH_UB: ++ break; ++ case FLASH_PROG: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0xa0; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_UBRESET: ++ break; ++ case FLASH_SERASE: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x80; ++ flashbase[0x5555] = 0xAA; ++ flashbase[0x2AAA] = 0x55; ++ flashptr[0] = 0x30; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++} ++ ++/*********************************************************************/ ++/* flash_write extends the functionality of flash_program() by */ ++/* providing an faster way to program multiple data words, without */ ++/* needing the function overhead of looping algorithms which */ ++/* program word by word. This function utilizes fast pointers */ ++/* to quickly loop through bulk data. */ ++/*********************************************************************/ ++static int flash_write(WORD sector, int offset, byte *buf, int nbytes) ++{ ++ UINT16 *src; ++ src = (UINT16 *)buf; ++ ++ if ((nbytes | offset) & 1) { ++ return -1; ++ } ++ ++ flash_command(FLASH_UB, 0, 0, 0); ++ while (nbytes > 0) { ++ flash_command(FLASH_PROG, sector, offset, *src); ++ if (flash_wait(sector, offset, *src) != STATUS_READY) ++ break; ++ offset +=2; ++ nbytes -=2; ++ src++; ++ } ++ flash_command(FLASH_UBRESET, 0, 0, 0); ++ ++ return (byte*)src - buf; ++} ++ ++/*********************************************************************/ ++/* flash_wait utilizes the DQ6, DQ5, and DQ2 polling algorithms */ ++/* described in the flash data book. It can quickly ascertain the */ ++/* operational status of the flash device, and return an */ ++/* appropriate status code (defined in flash.h) */ ++/*********************************************************************/ ++static int flash_wait(WORD sector, int offset, UINT16 data) ++{ ++ volatile UINT16 *flashptr; /* flash window */ ++ UINT16 d1; ++ ++ flashptr = (UINT16 *) flash_get_memptr(sector); ++ ++ if (flashFamily == FLASH_AMD || flashFamily == FLASH_SST) { ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ do { ++ d1 = flashptr[offset/2]; ++ if (d1 == data) ++ return STATUS_READY; ++ } while (!(d1 & 0x20)); ++ ++ d1 = flashptr[offset/2]; ++ ++ if (d1 != data) { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++#else ++ do { ++ d1 = *flashptr; /* read data */ ++ d1 ^= *flashptr; /* read it again and see what toggled */ ++ if (d1 == 0) /* no toggles, nothing's happening */ ++ return STATUS_READY; ++ } while (!(d1 & 0x20)); ++ ++ d1 = *flashptr; /* read data */ ++ d1 ^= *flashptr; /* read it again and see what toggled */ ++ ++ if (d1 != 0) { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++#endif ++ } else if (flashFamily == FLASH_INTEL) { ++ flashptr[0] = 0x70; ++ /* Wait for completion */ ++ while(!(*flashptr & 0x80)); ++ if (*flashptr & 0x30) { ++ flashptr[0] = 0x50; ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++ flashptr[0] = 0x50; ++ flash_command(FLASH_RESET, 0, 0, 0); ++ } ++ ++ return STATUS_READY; ++} ++ ++/*********************************************************************/ ++/* flash_get_device_id() will perform an autoselect sequence on the */ ++/* flash device, and return the device id of the component. */ ++/* This function automatically resets to read mode. */ ++/*********************************************************************/ ++static UINT16 flash_get_device_id() ++{ ++ volatile UINT16 *fwp; /* flash window */ ++ UINT16 answer; ++ ++ fwp = (UINT16 *)flash_get_memptr(0); ++ ++ flash_command(FLASH_READ_ID, 0, 0, 0); ++ answer = *(fwp + 1); ++ if (answer == ID_AM29LV320M) { ++ answer = *(fwp + 0xe); ++ answer = *(fwp + 0xf); ++ } ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return( (UINT16) answer ); ++} ++ ++/*********************************************************************/ ++/* flash_get_cfi() is the main CFI workhorse function. Due to it's */ ++/* complexity and size it need only be called once upon */ ++/* initializing the flash system. Once it is called, all operations */ ++/* are performed by looking at the meminfo structure. */ ++/* All possible care was made to make this algorithm as efficient as */ ++/* possible. 90% of all operations are memory reads, and all */ ++/* calculations are done using bit-shifts when possible */ ++/*********************************************************************/ ++static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily) ++{ ++ volatile UINT16 *fwp; /* flash window */ ++ int i=0; ++ ++ flash_command(FLASH_CFIQUERY, 0, 0, 0); ++ ++ if (cfi_struct == 0) ++ fwp = (UINT16 *)flash_get_memptr(0); ++ else ++ fwp = cfi_struct; ++ ++ /* Initial house-cleaning */ ++ for(i=0; i < 8; i++) { ++ query->erase_block[i].sector_size = 0; ++ query->erase_block[i].num_sectors = 0; ++ } ++ ++ /* If not 'QRY', then we dont have a CFI enabled device in the socket */ ++ if( fwp[0x10] != 'Q' && ++ fwp[0x11] != 'R' && ++ fwp[0x12] != 'Y') { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return(-1); ++ } ++ ++ query->num_erase_blocks = fwp[0x2C]; ++ if(flashFamily == FLASH_SST) ++ query->num_erase_blocks = 1; ++ ++ for(i=0; i < query->num_erase_blocks; i++) { ++ query->erase_block[i].num_sectors = fwp[(0x2D+(4*i))] + (fwp[0x2E + (4*i)] << 8); ++ query->erase_block[i].num_sectors++; ++ query->erase_block[i].sector_size = 256 * (256 * fwp[(0x30+(4*i))] + fwp[(0x2F+(4*i))]); ++ } ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return(1); ++} +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.h +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,150 @@ ++/************************************************************************/ ++/* */ ++/* AMD CFI Enabled Flash Memory Drivers */ ++/* File name: CFIFLASH.H */ ++/* Revision: 1.0 5/07/98 */ ++/* */ ++/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ ++/* This software is unpublished and contains the trade secrets and */ ++/* confidential proprietary information of AMD. Unless otherwise */ ++/* provided in the Software Agreement associated herewith, it is */ ++/* licensed in confidence "AS IS" and is not to be reproduced in whole */ ++/* or part by any means except for backup. Use, duplication, or */ ++/* disclosure by the Government is subject to the restrictions in */ ++/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ ++/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ ++/* Software owned by */ ++/* Advanced Micro Devices, Inc., */ ++/* One AMD Place, */ ++/* P.O. Box 3453 */ ++/* Sunnyvale, CA 94088-3453. */ ++/************************************************************************/ ++/* This software constitutes a basic shell of source code for */ ++/* programming all AMD Flash components. AMD */ ++/* will not be responsible for misuse or illegal use of this */ ++/* software for devices not supported herein. AMD is providing */ ++/* this source code "AS IS" and will not be responsible for */ ++/* issues arising from incorrect user implementation of the */ ++/* source code herein. It is the user's responsibility to */ ++/* properly design-in this source code. */ ++/* */ ++/************************************************************************/ ++#ifndef _CFIFLASH_H ++#define _CFIFLASH_H ++ ++#if defined __cplusplus ++extern "C" { ++#endif ++ ++/* include board/CPU specific definitions */ ++#include "bcmtypes.h" ++#include "board.h" ++ ++#define FLASH_BASE_ADDR_REG FLASH_BASE ++ ++#ifndef NULL ++#define NULL 0 ++#endif ++ ++#define MAXSECTORS 1024 /* maximum number of sectors supported */ ++ ++/* A structure for identifying a flash part. There is one for each ++ * of the flash part definitions. We need to keep track of the ++ * sector organization, the address register used, and the size ++ * of the sectors. ++ */ ++struct flashinfo { ++ char *name; /* "Am29DL800T", etc. */ ++ unsigned long addr; /* physical address, once translated */ ++ int areg; /* Can be set to zero for all parts */ ++ int nsect; /* # of sectors -- 19 in LV, 22 in DL */ ++ int bank1start; /* first sector # in bank 1 */ ++ int bank2start; /* first sector # in bank 2, if DL part */ ++ struct { ++ long size; /* # of bytes in this sector */ ++ long base; /* offset from beginning of device */ ++ int bank; /* 1 or 2 for DL; 1 for LV */ ++ } sec[MAXSECTORS]; /* per-sector info */ ++}; ++ ++/* ++ * This structure holds all CFI query information as defined ++ * in the JEDEC standard. All information up to ++ * primary_extended_query is standard among all manufactures ++ * with CFI enabled devices. ++ */ ++ ++struct cfi_query { ++ int num_erase_blocks; /* Number of sector defs. */ ++ struct { ++ unsigned long sector_size; /* byte size of sector */ ++ int num_sectors; /* Num sectors of this size */ ++ } erase_block[8]; /* Max of 256, but 8 is good */ ++}; ++ ++/* Standard Boolean declarations */ ++#define TRUE 1 ++#define FALSE 0 ++ ++/* Define different type of flash */ ++#define FLASH_UNDEFINED 0 ++#define FLASH_AMD 1 ++#define FLASH_INTEL 2 ++#define FLASH_SST 3 ++ ++/* Command codes for the flash_command routine */ ++#define FLASH_RESET 0 /* reset to read mode */ ++#define FLASH_READ_ID 1 /* read device ID */ ++#define FLASH_CFIQUERY 2 /* CFI query */ ++#define FLASH_UB 3 /* go into unlock bypass mode */ ++#define FLASH_PROG 4 /* program a word */ ++#define FLASH_UBRESET 5 /* reset to read mode from unlock bypass mode */ ++#define FLASH_SERASE 6 /* sector erase */ ++ ++/* Return codes from flash_status */ ++#define STATUS_READY 0 /* ready for action */ ++#define STATUS_TIMEOUT 1 /* operation timed out */ ++ ++/* A list of AMD compatible device ID's - add others as needed */ ++#define ID_AM29DL800T 0x224A ++#define ID_AM29DL800B 0x22CB ++#define ID_AM29LV800T 0x22DA ++#define ID_AM29LV800B 0x225B ++#define ID_AM29LV400B 0x22BA ++ ++#define ID_AM29LV160B 0x2249 ++#define ID_AM29LV160T 0x22C4 ++ ++#define ID_AM29LV320T 0x22F6 ++#define ID_MX29LV320AT 0x22A7 ++#define ID_AM29LV320B 0x22F9 ++#define ID_MX29LV320AB 0x22A8 ++ ++#define ID_AM29LV320M 0x227E ++#define ID_AM29LV320MB 0x2200 ++#define ID_AM29LV320MT 0x2201 ++ ++#define ID_SST39VF1601 0x234B ++#define ID_SST39VF3201 0x235B ++ ++/* A list of Intel compatible device ID's - add others as needed */ ++#define ID_I28F160C3T 0x88C2 ++#define ID_I28F160C3B 0x88C3 ++#define ID_I28F320C3T 0x88C4 ++#define ID_I28F320C3B 0x88C5 ++ ++extern byte flash_init(void); ++extern int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes); ++extern int flash_read_buf(WORD sector, int offset, byte *buffer, int numbytes); ++extern byte flash_sector_erase_int(WORD sector); ++extern int flash_get_numsectors(void); ++extern int flash_get_sector_size(WORD sector); ++extern int flash_get_total_size(void); ++extern unsigned char *flash_get_memptr(WORD sector); ++extern int flash_get_blk(int addr); ++ ++#if defined __cplusplus ++} ++#endif ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/Makefile +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/Makefile 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,17 @@ ++# Makefile for the bcm963xx board drivers ++# ++ ++ ++obj-y := board.o cfiflash.o bcm63xx_flash.o bcm63xx_led.o ++ ++EXTRA_CFLAGS += -I. -I$(INC_BRCMBOARDPARMS_PATH)/$(BRCM_BOARD) -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++ ++ifeq ($(strip $(WIRELESS)),1) ++ EXTRA_CFLAGS += -DWIRELESS ++endif ++ ++-include $(TOPDIR)/Rules.make ++ ++clean: ++ rm -f core *.o *.a *.s ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_flash.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_flash.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_flash.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,775 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ *************************************************************************** ++ * File Name : bcm63xx_flash.c ++ * ++ * Description: This file contains the flash device driver APIs for bcm63xx board. ++ * ++ * Created on : 8/10/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) ++ * ++ ***************************************************************************/ ++ ++ ++/* Includes. */ ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#define BCMTAG_EXE_USE ++#include <bcmTag.h> ++#include "cfiflash.h" ++#include "boardparms.h" ++ ++//#define DEBUG_FLASH ++ ++static FLASH_ADDR_INFO fInfo; ++static int flashInitialized = 0; ++ ++void *retriedKmalloc(size_t size) ++{ ++ void *pBuf; ++ int tryCount = 0; ++ ++ // try 1000 times before quit ++ while (((pBuf = kmalloc(size, GFP_KERNEL)) == NULL) && (tryCount++ < 1000)) ++ { ++ current->state = TASK_INTERRUPTIBLE; ++ schedule_timeout(HZ/10); ++ } ++ if (tryCount >= 1000) ++ pBuf = NULL; ++ else ++ memset(pBuf, 0, size); ++ ++ return pBuf; ++} ++ ++void retriedKfree(void *pBuf) ++{ ++ kfree(pBuf); ++} ++ ++/*************************************************************************** ++// Function Name: getCrc32 ++// Description : caculate the CRC 32 of the given data. ++// Parameters : pdata - array of data. ++// size - number of input data bytes. ++// crc - either CRC32_INIT_VALUE or previous return value. ++// Returns : crc. ++****************************************************************************/ ++UINT32 getCrc32(byte *pdata, UINT32 size, UINT32 crc) ++{ ++ while (size-- > 0) ++ crc = (crc >> 8) ^ Crc32_table[(crc ^ *pdata++) & 0xff]; ++ ++ return crc; ++} ++ ++// get the nvram start addr ++// ++unsigned long get_nvram_start_addr(void) ++{ ++ return ((unsigned long) ++ (flash_get_memptr(fInfo.flash_nvram_start_blk) + fInfo.flash_nvram_blk_offset)); ++} ++ ++// get the scratch_pad start addr ++// ++unsigned long get_scratch_pad_start_addr(void) ++{ ++ return ((unsigned long) ++ (flash_get_memptr(fInfo.flash_scratch_pad_start_blk) + fInfo.flash_scratch_pad_blk_offset)); ++} ++ ++ ++ ++/* ********************************************************************* ++ * kerSysImageTagGet() ++ * Get the image tag ++ * Input parameters: ++ * none ++ * Return value: ++ * point to tag -- Found ++ * NULL -- failed ++ ********************************************************************* */ ++PFILE_TAG kerSysImageTagGet(void) ++{ ++ int i; ++ int totalBlks = flash_get_numsectors(); ++ UINT32 crc; ++ unsigned char *sectAddr; ++ PFILE_TAG pTag; ++ ++#if defined(DEBUG_FLASH) ++ printk("totalblks in tagGet=%d\n", totalBlks); ++#endif ++ ++ // start from 2nd blk, assume 1st one is always CFE ++ for (i = 1; i < totalBlks; i++) ++ { ++ sectAddr = flash_get_memptr((byte) i); ++ crc = CRC32_INIT_VALUE; ++ crc = getCrc32(sectAddr, (UINT32)TAG_LEN-TOKEN_LEN, crc); ++ pTag = (PFILE_TAG) sectAddr; ++ ++#if defined(DEBUG_FLASH) ++ printk("Check Tag crc on blk [%d]\n", i); ++#endif ++ ++ if (crc == (UINT32)(*(UINT32*)(pTag->tagValidationToken))) ++ return pTag; ++ } ++ ++ return (PFILE_TAG) NULL; ++} ++ ++// Initialize the flash and fill out the fInfo structure ++void kerSysFlashInit( void ) ++{ ++ int i = 0; ++ int totalBlks = 0; ++ int totalSize = 0; ++ int startAddr = 0; ++ int usedBlkSize = 0; ++ NVRAM_DATA nvramData; ++ UINT32 crc = CRC32_INIT_VALUE, savedCrc; ++ PFILE_TAG pTag = NULL; ++ unsigned long kernelEndAddr = 0; ++ unsigned long spAddr = 0; ++ ++ if (flashInitialized) ++ return; ++ ++ flashInitialized = 1; ++ flash_init(); ++ ++ totalBlks = flash_get_numsectors(); ++ totalSize = flash_get_total_size(); ++ ++ printk("Total Flash size: %dK with %d sectors\n", totalSize/1024, totalBlks); ++ ++ /* nvram is always at the end of flash */ ++ fInfo.flash_nvram_length = FLASH45_LENGTH_NVRAM; ++ fInfo.flash_nvram_start_blk = 0; /* always the first block */ ++ fInfo.flash_nvram_number_blk = 1; /*always fits in the first block */ ++ fInfo.flash_nvram_blk_offset = NVRAM_DATA_OFFSET; ++ ++ // check nvram CRC ++ memcpy((char *)&nvramData, (char *)get_nvram_start_addr(), sizeof(NVRAM_DATA)); ++ savedCrc = nvramData.ulCheckSum; ++ nvramData.ulCheckSum = 0; ++ crc = getCrc32((char *)&nvramData, (UINT32) sizeof(NVRAM_DATA), crc); ++ ++ BpSetBoardId( nvramData.szBoardId ); ++ ++ fInfo.flash_persistent_length = NVRAM_PSI_DEFAULT; ++ if (savedCrc != crc) ++ { ++ printk("***Board is not initialized****: Using the default PSI size: %d\n", ++ fInfo.flash_persistent_length); ++ } ++ else ++ { ++ unsigned long ulPsiSize; ++ if( BpGetPsiSize( &ulPsiSize ) == BP_SUCCESS ) ++ fInfo.flash_persistent_length = ulPsiSize; ++ else ++ { ++ printk("***Board id is not set****: Using the default PSI size: %d\n", ++ fInfo.flash_persistent_length); ++ } ++ } ++ ++ fInfo.flash_persistent_length *= ONEK; ++ startAddr = totalSize - fInfo.flash_persistent_length; ++ fInfo.flash_persistent_start_blk = flash_get_blk(startAddr+FLASH_BASE_ADDR_REG); ++ fInfo.flash_persistent_number_blk = totalBlks - fInfo.flash_persistent_start_blk; ++ // save abs SP address (Scratch Pad). it is before PSI ++ spAddr = startAddr - SP_MAX_LEN ; ++ // find out the offset in the start_blk ++ usedBlkSize = 0; ++ for (i = fInfo.flash_persistent_start_blk; ++ i < (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk); i++) ++ { ++ usedBlkSize += flash_get_sector_size((byte) i); ++ } ++ fInfo.flash_persistent_blk_offset = usedBlkSize - fInfo.flash_persistent_length; ++ ++ // get the info for sp ++ if (!(pTag = kerSysImageTagGet())) ++ { ++ printk("Failed to read image tag from flash\n"); ++ return; ++ } ++ kernelEndAddr = (unsigned long) simple_strtoul(pTag->kernelAddress, NULL, 10) + \ ++ (unsigned long) simple_strtoul(pTag->kernelLen, NULL, 10); ++ ++ // make suer sp does not share kernel block ++ fInfo.flash_scratch_pad_start_blk = flash_get_blk(spAddr+FLASH_BASE_ADDR_REG); ++ if (fInfo.flash_scratch_pad_start_blk != flash_get_blk(kernelEndAddr)) ++ { ++ fInfo.flash_scratch_pad_length = SP_MAX_LEN; ++ if (fInfo.flash_persistent_start_blk == fInfo.flash_scratch_pad_start_blk) // share blk ++ { ++#if 1 /* do not used scratch pad unless it's in its own sector */ ++ printk("Scratch pad is not used for this flash part.\n"); ++ fInfo.flash_scratch_pad_length = 0; // no sp ++#else /* allow scratch pad to share a sector with another section such as PSI */ ++ fInfo.flash_scratch_pad_number_blk = 1; ++ fInfo.flash_scratch_pad_blk_offset = fInfo.flash_persistent_blk_offset - fInfo.flash_scratch_pad_length; ++#endif ++ } ++ else // on different blk ++ { ++ fInfo.flash_scratch_pad_number_blk = fInfo.flash_persistent_start_blk\ ++ - fInfo.flash_scratch_pad_start_blk; ++ // find out the offset in the start_blk ++ usedBlkSize = 0; ++ for (i = fInfo.flash_scratch_pad_start_blk; ++ i < (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk); i++) ++ usedBlkSize += flash_get_sector_size((byte) i); ++ fInfo.flash_scratch_pad_blk_offset = usedBlkSize - fInfo.flash_scratch_pad_length; ++ } ++ } ++ else ++ { ++ printk("No flash for scratch pad!\n"); ++ fInfo.flash_scratch_pad_length = 0; // no sp ++ } ++ ++#if defined(DEBUG_FLASH) ++ printk("fInfo.flash_scratch_pad_start_blk = %d\n", fInfo.flash_scratch_pad_start_blk); ++ printk("fInfo.flash_scratch_pad_number_blk = %d\n", fInfo.flash_scratch_pad_number_blk); ++ printk("fInfo.flash_scratch_pad_length = 0x%x\n", fInfo.flash_scratch_pad_length); ++ printk("fInfo.flash_scratch_pad_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_scratch_pad_blk_offset); ++ ++ printk("fInfo.flash_nvram_start_blk = %d\n", fInfo.flash_nvram_start_blk); ++ printk("fInfo.flash_nvram_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_nvram_blk_offset); ++ printk("fInfo.flash_nvram_number_blk = %d\n", fInfo.flash_nvram_number_blk); ++ ++ printk("psi startAddr = %x\n", startAddr+FLASH_BASE_ADDR_REG); ++ printk("fInfo.flash_persistent_start_blk = %d\n", fInfo.flash_persistent_start_blk); ++ printk("fInfo.flash_persistent_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_persistent_blk_offset); ++ printk("fInfo.flash_persistent_number_blk = %d\n", fInfo.flash_persistent_number_blk); ++#endif ++ ++} ++ ++ ++ ++/*********************************************************************** ++ * Function Name: kerSysFlashAddrInfoGet ++ * Description : Fills in a structure with information about the NVRAM ++ * and persistent storage sections of flash memory. ++ * Fro physmap.c to mount the fs vol. ++ * Returns : None. ++ ***********************************************************************/ ++void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info) ++{ ++ pflash_addr_info->flash_nvram_blk_offset = fInfo.flash_nvram_blk_offset; ++ pflash_addr_info->flash_nvram_length = fInfo.flash_nvram_length; ++ pflash_addr_info->flash_nvram_number_blk = fInfo.flash_nvram_number_blk; ++ pflash_addr_info->flash_nvram_start_blk = fInfo.flash_nvram_start_blk; ++ pflash_addr_info->flash_persistent_blk_offset = fInfo.flash_persistent_blk_offset; ++ pflash_addr_info->flash_persistent_length = fInfo.flash_persistent_length; ++ pflash_addr_info->flash_persistent_number_blk = fInfo.flash_persistent_number_blk; ++ pflash_addr_info->flash_persistent_start_blk = fInfo.flash_persistent_start_blk; ++} ++ ++ ++// get shared blks into *** pTempBuf *** which has to be released bye the caller! ++// return: if pTempBuf != NULL, poits to the data with the dataSize of the buffer ++// !NULL -- ok ++// NULL -- fail ++static char *getSharedBlks(int start_blk, int end_blk) ++{ ++ int i = 0; ++ int usedBlkSize = 0; ++ int sect_size = 0; ++ char *pTempBuf = NULL; ++ char *pBuf = NULL; ++ ++ for (i = start_blk; i < end_blk; i++) ++ usedBlkSize += flash_get_sector_size((byte) i); ++ ++#if defined(DEBUG_FLASH) ++ printk("usedBlkSize = %d\n", usedBlkSize); ++#endif ++ ++ if ((pTempBuf = (char *) retriedKmalloc(usedBlkSize)) == NULL) ++ { ++ printk("failed to allocate memory with size: %d\n", usedBlkSize); ++ return pTempBuf; ++ } ++ ++ pBuf = pTempBuf; ++ for (i = start_blk; i < end_blk; i++) ++ { ++ sect_size = flash_get_sector_size((byte) i); ++ ++#if defined(DEBUG_FLASH) ++ printk("i = %d, sect_size = %d, end_blk = %d\n", i, sect_size, end_blk); ++#endif ++ flash_read_buf((byte)i, 0, pBuf, sect_size); ++ pBuf += sect_size; ++ } ++ ++ return pTempBuf; ++} ++ ++ ++ ++// Set the pTempBuf to flash from start_blk to end_blk ++// return: ++// 0 -- ok ++// -1 -- fail ++static int setSharedBlks(int start_blk, int end_blk, char *pTempBuf) ++{ ++ int i = 0; ++ int sect_size = 0; ++ int sts = 0; ++ char *pBuf = pTempBuf; ++ ++ for (i = start_blk; i < end_blk; i++) ++ { ++ sect_size = flash_get_sector_size((byte) i); ++ flash_sector_erase_int(i); ++ if (flash_write_buf(i, 0, pBuf, sect_size) != sect_size) ++ { ++ printk("Error writing flash sector %d.", i); ++ sts = -1; ++ break; ++ } ++ pBuf += sect_size; ++ } ++ ++ return sts; ++} ++ ++ ++ ++/******************************************************************************* ++ * NVRAM functions ++ *******************************************************************************/ ++ ++// get nvram data ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysNvRamGet(char *string, int strLen, int offset) ++{ ++ char *pBuf = NULL; ++ ++ if (!flashInitialized) ++ kerSysFlashInit(); ++ ++ if (strLen > FLASH45_LENGTH_NVRAM) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) ++ return -1; ++ ++ // get string off the memory buffer ++ memcpy(string, (pBuf + fInfo.flash_nvram_blk_offset + offset), strLen); ++ ++ retriedKfree(pBuf); ++ ++ return 0; ++} ++ ++ ++// set nvram ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysNvRamSet(char *string, int strLen, int offset) ++{ ++ int sts = 0; ++ char *pBuf = NULL; ++ ++ if (strLen > FLASH45_LENGTH_NVRAM) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) ++ return -1; ++ ++ // set string to the memory buffer ++ memcpy((pBuf + fInfo.flash_nvram_blk_offset + offset), string, strLen); ++ ++ if (setSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_number_blk + fInfo.flash_nvram_start_blk), pBuf) != 0) ++ sts = -1; ++ ++ retriedKfree(pBuf); ++ ++ return sts; ++} ++ ++ ++/*********************************************************************** ++ * Function Name: kerSysEraseNvRam ++ * Description : Erase the NVRAM storage section of flash memory. ++ * Returns : 1 -- ok, 0 -- fail ++ ***********************************************************************/ ++int kerSysEraseNvRam(void) ++{ ++ int sts = 1; ++ char *tempStorage = retriedKmalloc(FLASH45_LENGTH_NVRAM); ++ ++ // just write the whole buf with '0xff' to the flash ++ if (!tempStorage) ++ sts = 0; ++ else ++ { ++ memset(tempStorage, 0xff, FLASH45_LENGTH_NVRAM); ++ if (kerSysNvRamSet(tempStorage, FLASH45_LENGTH_NVRAM, 0) != 0) ++ sts = 0; ++ retriedKfree(tempStorage); ++ } ++ ++ return sts; ++} ++ ++ ++/******************************************************************************* ++ * PSI functions ++ *******************************************************************************/ ++// get psi data ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysPersistentGet(char *string, int strLen, int offset) ++{ ++ char *pBuf = NULL; ++ ++ if (strLen > fInfo.flash_persistent_length) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) ++ return -1; ++ ++ // get string off the memory buffer ++ memcpy(string, (pBuf + fInfo.flash_persistent_blk_offset + offset), strLen); ++ ++ retriedKfree(pBuf); ++ ++ return 0; ++} ++ ++ ++// set psi ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysPersistentSet(char *string, int strLen, int offset) ++{ ++ int sts = 0; ++ char *pBuf = NULL; ++ ++ if (strLen > fInfo.flash_persistent_length) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) ++ return -1; ++ ++ // set string to the memory buffer ++ memcpy((pBuf + fInfo.flash_persistent_blk_offset + offset), string, strLen); ++ ++ if (setSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_number_blk + fInfo.flash_persistent_start_blk), pBuf) != 0) ++ sts = -1; ++ ++ retriedKfree(pBuf); ++ ++ return sts; ++} ++ ++ ++// flash bcm image ++// return: ++// 0 - ok ++// !0 - the sector number fail to be flashed (should not be 0) ++int kerSysBcmImageSet( int flash_start_addr, char *string, int size) ++{ ++ int sts; ++ int sect_size; ++ int blk_start; ++ int i; ++ char *pTempBuf = NULL; ++ int whole_image = 0; ++ ++ blk_start = flash_get_blk(flash_start_addr); ++ if( blk_start < 0 ) ++ return( -1 ); ++ ++ if (flash_start_addr == FLASH_BASE && size > FLASH45_LENGTH_BOOT_ROM) ++ whole_image = 1; ++ ++ /* write image to flash memory */ ++ do ++ { ++ sect_size = flash_get_sector_size(blk_start); ++// NOTE: for memory problem in multiple PVC configuration, temporary get rid of kmalloc this 64K for now. ++// if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) ++// { ++// printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); ++// kerSysMipsSoftReset(); // reset the board right away. ++// } ++ // for whole image, no check on psi ++ if (!whole_image && blk_start == fInfo.flash_persistent_start_blk) // share the blk with psi ++ { ++ if (size > (sect_size - fInfo.flash_persistent_length)) ++ { ++ printk("Image is too big\n"); ++ break; // image is too big. Can not overwrite to nvram ++ } ++ if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) ++ { ++ printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); ++ kerSysMipsSoftReset(); // reset the board right away. ++ } ++ flash_read_buf((byte)blk_start, 0, pTempBuf, sect_size); ++ if (copy_from_user((void *)pTempBuf,(void *)string, size) != 0) ++ break; // failed ? ++ flash_sector_erase_int(blk_start); // erase blk before flash ++ if (flash_write_buf(blk_start, 0, pTempBuf, sect_size) == sect_size) ++ size = 0; // break out and say all is ok ++ retriedKfree(pTempBuf); ++ break; ++ } ++ ++ flash_sector_erase_int(blk_start); // erase blk before flash ++ ++ if (sect_size > size) ++ { ++ if (size & 1) ++ size++; ++ sect_size = size; ++ } ++ ++ if ((i = flash_write_buf(blk_start, 0, string, sect_size)) != sect_size) { ++ break; ++ } ++ blk_start++; ++ string += sect_size; ++ size -= sect_size; ++ } while (size > 0); ++ ++ if (whole_image) ++ { ++ // If flashing a whole image, erase to end of flash. ++ int total_blks = flash_get_numsectors(); ++ while( blk_start < total_blks ) ++ { ++ flash_sector_erase_int(blk_start); ++ blk_start++; ++ } ++ } ++ if (pTempBuf) ++ retriedKfree(pTempBuf); ++ ++ if( size == 0 ) ++ sts = 0; // ok ++ else ++ sts = blk_start; // failed to flash this sector ++ ++ return sts; ++} ++ ++/******************************************************************************* ++ * SP functions ++ *******************************************************************************/ ++// get sp data. NOTE: memcpy work here -- not using copy_from/to_user ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysScratchPadGet(char *tokenId, char *tokBuf, int bufLen) ++{ ++ PSP_HEADER pHead = NULL; ++ PSP_TOKEN pToken = NULL; ++ char *pBuf = NULL; ++ char *pShareBuf = NULL; ++ char *startPtr = NULL; ++ char *endPtr = NULL; ++ char *spEndPtr = NULL; ++ int sts = -1; ++ ++ if (fInfo.flash_scratch_pad_length == 0) ++ return sts; ++ ++ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) ++ { ++ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ ++ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); ++ return sts; ++ } ++ ++ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) ++ return sts; ++ ++ // pBuf points to SP buf ++ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; ++ ++ pHead = (PSP_HEADER) pBuf; ++ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) ++ { ++ printk("Scrap pad is not initialized.\n"); ++ return sts; ++ } ++ ++ // search up to SPUsedLen for the token ++ startPtr = pBuf + sizeof(SP_HEADER); ++ endPtr = pBuf + pHead->SPUsedLen; ++ spEndPtr = pBuf + SP_MAX_LEN; ++ while (startPtr < endPtr && startPtr < spEndPtr) ++ { ++ pToken = (PSP_TOKEN) startPtr; ++ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) ++ { ++ memcpy(tokBuf, startPtr + sizeof(SP_TOKEN), bufLen); ++ sts = 0; ++ break; ++ } ++ // get next token ++ startPtr += sizeof(SP_TOKEN) + pToken->tokenLen; ++ } ++ ++ retriedKfree(pShareBuf); ++ ++ return sts; ++} ++ ++ ++// set sp. NOTE: memcpy work here -- not using copy_from/to_user ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysScratchPadSet(char *tokenId, char *tokBuf, int bufLen) ++{ ++ PSP_TOKEN pToken = NULL; ++ PSP_HEADER pHead = NULL; ++ char *pShareBuf = NULL; ++ char *pBuf = NULL; ++ SP_HEADER SPHead; ++ SP_TOKEN SPToken; ++ char *curPtr; ++ int sts = -1; ++ ++ if (fInfo.flash_scratch_pad_length == 0) ++ return sts; ++ ++ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) ++ { ++ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ ++ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); ++ return sts; ++ } ++ ++ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) ++ return sts; ++ ++ // pBuf points to SP buf ++ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; ++ pHead = (PSP_HEADER) pBuf; ++ ++ // form header info. SPUsedLen later on... ++ memset((char *)&SPHead, 0, sizeof(SP_HEADER)); ++ memcpy(SPHead.SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN); ++ SPHead.SPVersion = SP_VERSION; ++ ++ // form token info. ++ memset((char*)&SPToken, 0, sizeof(SP_TOKEN)); ++ strncpy(SPToken.tokenName, tokenId, TOKEN_NAME_LEN - 1); ++ SPToken.tokenLen = bufLen; ++ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) ++ { ++ // new sp, so just flash the token ++ printk("No Scrap pad found. Initialize scratch pad...\n"); ++ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; ++ memcpy(pBuf, (char *)&SPHead, sizeof(SP_HEADER)); ++ curPtr = pBuf + sizeof(SP_HEADER); ++ memcpy(curPtr, (char *)&SPToken, sizeof(SP_TOKEN)); ++ curPtr += sizeof(SP_TOKEN); ++ memcpy(curPtr, tokBuf, bufLen); ++ } ++ else ++ { ++ // need search for the token, if exist with same size overwrite it. if sizes differ, ++ // move over the later token data over and put the new one at the end ++ char *endPtr = pBuf + pHead->SPUsedLen; ++ char *spEndPtr = pBuf + SP_MAX_LEN; ++ curPtr = pBuf + sizeof(SP_HEADER); ++ while (curPtr < endPtr && curPtr < spEndPtr) ++ { ++ pToken = (PSP_TOKEN) curPtr; ++ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) ++ { ++ if (pToken->tokenLen == bufLen) // overwirte it ++ { ++ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); ++ break; ++ } ++ else // move later data over and put the new token at the end ++ { ++ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); // ~~~ ++ break; ++ } ++ } ++ else // not same token ~~~ ++ { ++ } ++ // get next token ++ curPtr += sizeof(SP_TOKEN) + pToken->tokenLen; ++ } // end while ++ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; // ~~~ ++ if (SPHead.SPUsedLen > SP_MAX_LEN) ++ { ++ printk("No more Scratch pad space left! Over limit by %d bytes\n", SPHead.SPUsedLen - SP_MAX_LEN); ++ return sts; ++ } ++ ++ } // else if not new sp ++ ++ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf); ++ ++ retriedKfree(pShareBuf); ++ ++ return sts; ++ ++ ++} ++ ++int kerSysFlashSizeGet(void) ++{ ++ return flash_get_total_size(); ++} ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_led.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_led.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_led.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,582 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : bcm63xx_led.c ++ * ++ * Description: ++ * ++ * This file contains bcm963xx board led control API functions. ++ * ++ * To use it, do the following ++ * ++ * 1). define in the board.c the following led mappping (this is for 6345GW board): ++ * const LED_MAP_PAIR cLedMapping45GW[] = ++ * { // led name Initial state physical pin (ledMask) ++ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, ++ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, ++ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 ++ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, ++ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, ++ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. ++ * ++ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping ++ * pointer from the above struct ++ * ++ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); ++ * ++ * 3). Sample call for kernel mode: ++ * ++ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h ++ * ++ * 4). Sample call for user mode ++ * ++ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h ++ * ++ * ++ * Created on : 10/28/2002 seanl ++ * ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/netdevice.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define k100ms (HZ / 10) // ~100 ms ++#define kFastBlinkCount 0 // ~100ms ++#define kSlowBlinkCount 5 // ~600ms ++ ++#define MAX_VIRT_LEDS 12 ++ ++// uncomment // for debug led ++//#define DEBUG_LED ++ ++// global variables: ++struct timer_list gLedTimer; ++int gTimerOn = FALSE; ++int gLedCount = 0; ++ ++typedef struct ledinfo ++{ ++ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLow; // GPIO bit reset to turn on LED ++ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED ++ BOARD_LED_STATE ledState; // current led state ++ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState ++ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. ++} LED_INFO, *PLED_INFO; ++ ++static PLED_INFO gLed = NULL; ++static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; ++ ++#if 0 /* BROKEN */ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++static int gLedOffInBridgeMode = 1; ++#elif defined(CONFIG_BCM96345) ++static int gLedOffInBridgeMode = 0; ++#endif ++#endif ++ ++void ledTimerExpire(void); ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); ++ ++//************************************************************************************** ++// LED operations ++//************************************************************************************** ++ ++// turn led on and set the ledState ++void ledOn(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMask; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateOn; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOff(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio |= pLed->ledMask; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++// turn led on and set the ledState ++void ledOnFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateFail; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOffFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++ ++// toggle the led and return the current ledState ++BOARD_LED_STATE ledToggle(PLED_INFO pLed) ++{ ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if (GPIO->GPIOio & pLed->ledMask) ++ { ++ GPIO->GPIOio &= ~(pLed->ledMask); ++ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); ++ } ++ else ++ { ++ GPIO->GPIOio |= pLed->ledMask; ++ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); ++ } ++} ++ ++ ++// led timer. Will return if timer is already on ++void ledTimerStart(void) ++{ ++ if (gTimerOn) ++ return; ++ ++#if defined(DEBUG_LED) ++ printk("led: add_timer\n"); ++#endif ++ ++ init_timer(&gLedTimer); ++ gLedTimer.function = (void*)ledTimerExpire; ++ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms ++ add_timer (&gLedTimer); ++ gTimerOn = TRUE; ++} ++ ++ ++// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and ++// restart the timer according to ledState ++void ledTimerExpire(void) ++{ ++ int i; ++ PLED_INFO pCurLed; ++ ++ gTimerOn = FALSE; ++ ++ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) ++ { ++#if defined(DEBUG_LED) ++ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); ++#endif ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ case kLedStateOff: ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ break; ++ ++ case kLedStateBlinkOnce: ++ ledToggle(pCurLed); ++ pCurLed->blinkCountDown = 0; // reset to 0 ++ pCurLed->ledState = pCurLed->savedLedState; ++ if (pCurLed->ledState == kLedStateSlowBlinkContinues || ++ pCurLed->ledState == kLedStateFastBlinkContinues) ++ ledTimerStart(); // start timer if in blinkContinues stats ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ } ++} ++ ++// initialize the gLedCount and allocate and fill gLed struct ++void __init boardLedInit(PLED_MAP_PAIR cLedMapping) ++{ ++ PLED_MAP_PAIR p1, p2; ++ PLED_INFO pCurLed; ++ int needTimer = FALSE; ++ int alreadyUsed = 0; ++ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ ++ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; ++ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; ++#endif ++ ++ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); ++ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); ++ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); ++ ++ gLedCount = 0; ++ ++ // Check for multiple LED names and multiple LED GPIO pins that share the ++ // same physical board LED. ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ gLedCount++; ++ } ++ ++ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); ++ if( gLed == NULL ) ++ { ++ printk( "LED memory allocation error.\n" ); ++ return; ++ } ++ ++ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); ++ ++ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led ++ // (ledMask) the first defined led's ledInitState will be used. ++ pCurLed = gLed; ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ if( (int) p1->ledName > MAX_VIRT_LEDS ) ++ continue; ++ ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ { ++ // Initialize the board LED for the first time. ++ needTimer = initLedInfo( p1, pCurLed ); ++ gpVirtLeds[(int) p1->ledName] = pCurLed; ++ pCurLed++; ++ } ++ else ++ { ++ PLED_INFO pLed; ++ for( pLed = gLed; pLed != pCurLed; pLed++ ) ++ { ++ // Find the LED_INFO structure that has already been initialized. ++ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || ++ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) ++ { ++ // The board LED has already been initialized but possibly ++ // not completely initialized. ++ if( p1->ledMask ) ++ { ++ pLed->ledMask = p1->ledMask; ++ pLed->ledActiveLow = p1->ledActiveLow; ++ } ++ if( p1->ledMaskFail ) ++ { ++ pLed->ledMaskFail = p1->ledMaskFail; ++ pLed->ledActiveLowFail = p1->ledActiveLowFail; ++ } ++ gpVirtLeds[(int) p1->ledName] = pLed; ++ break; ++ } ++ } ++ } ++ } ++ ++ if (needTimer) ++ ledTimerStart(); ++ ++#if defined(DEBUG_LED) ++ int i; ++ for (i=0; i < gLedCount; i++) ++ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); ++#endif ++ ++} ++ ++// Initialize a structure that contains information about a physical board LED ++// control. The board LED may contain more than one GPIO pin to control a ++// normal condition (green) or a failure condition (red). ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) ++{ ++ int needTimer = FALSE; ++ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; ++ pCurLed->ledMask = pCurMap->ledMask; ++ pCurLed->ledActiveLow = pCurMap->ledActiveLow; ++ pCurLed->ledMaskFail = pCurMap->ledMaskFail; ++ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; ++ ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOn(pCurLed); ++ break; ++ case kLedStateOff: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOff(pCurLed); ++ break; ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOnFail(pCurLed); ++ break; ++ case kLedStateBlinkOnce: ++ pCurLed->blinkCountDown = 1; ++ needTimer = TRUE; ++ break; ++ case kLedStateSlowBlinkContinues: ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ needTimer = TRUE; ++ break; ++ case kLedStateFastBlinkContinues: ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ needTimer = TRUE; ++ break; ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ ++ return( needTimer ); ++} ++ ++#if 0 /* BROKEN */ ++// Determines if there is at least one interface in bridge mode. Bridge mode ++// is determined by the cfm convention of naming bridge interfaces nas17 ++// through nas24. ++static int isBridgedProtocol(void) ++{ ++ extern int dev_get(const char *name); ++ const int firstBridgeId = 17; ++ const int lastBridgeId = 24; ++ int i; ++ int ret = FALSE; ++ char name[16]; ++ ++ for( i = firstBridgeId; i <= lastBridgeId; i++ ) ++ { ++ sprintf( name, "nas%d", i ); ++ ++ if( dev_get(name) ) ++ { ++ ret = TRUE; ++ break; ++ } ++ } ++ ++ return(ret); ++} ++#endif ++ ++// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation ++void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ PLED_INFO ledInfoPtr; ++ ++ // do the mapping from virtual to physical led ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ ledInfoPtr = gpVirtLeds[(int) ledName]; ++ else ++ ledInfoPtr = NULL; ++ ++ if (ledInfoPtr == NULL) ++ return; ++ ++ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) ++ { ++ (*gLedHwFunc[(int) ledName]) (ledName, ledState); ++ ledOffFail(ledInfoPtr); ++ return; ++ } ++ else ++ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) ++ { ++ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); ++ ledOff(ledInfoPtr); ++ return; ++ } ++ ++#if 0 /* BROKEN */ ++ // Do not blink the WAN Data LED if at least one interface is in bridge mode. ++ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) ++ { ++ static int BridgedProtocol = -1; ++ ++ if( BridgedProtocol == -1 ) ++ BridgedProtocol = isBridgedProtocol(); ++ ++ if( BridgedProtocol == TRUE ) ++ return; ++ } ++#endif ++ ++ // If the state is kLedStateFail and there is not a failure LED defined ++ // in the board parameters, change the state to kLedStateFastBlinkContinues. ++ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) ++ ledState = kLedStateFastBlinkContinues; ++ ++ switch (ledState) ++ { ++ case kLedStateOn: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on the specified LED GPIO. ++ ledOn(ledInfoPtr); ++ break; ++ ++ case kLedStateOff: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn off the specified LED GPIO. ++ ledOff(ledInfoPtr); ++ break; ++ ++ case kLedStateFail: ++ // First, turn off the complimentary (normal) LED GPIO. ++ if( ledInfoPtr->ledMask ) ++ ledOff(ledInfoPtr); ++ else ++ if( gLedHwFunc[(int) ledName] ) ++ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on (red) the specified LED GPIO. ++ ledOnFail(ledInfoPtr); ++ break; ++ ++ case kLedStateBlinkOnce: ++ // skip blinkOnce if it is already in Slow/Fast blink continues state ++ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || ++ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) ++ ; ++ else ++ { ++ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 ++ { ++ ledToggle(ledInfoPtr); ++ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires ++ ledInfoPtr->ledState = kLedStateBlinkOnce; ++ ledTimerStart(); ++ } ++ } ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ ledInfoPtr->blinkCountDown = kSlowBlinkCount; ++ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ ledInfoPtr->blinkCountDown = kFastBlinkCount; ++ ledInfoPtr->ledState = kLedStateFastBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid led state\n"); ++ } ++} ++ ++// This function is called for an LED that is controlled by hardware. ++void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) ++{ ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ { ++ if( ledFailType == 1 ) ++ gLedHwFailFunc[(int) ledName] = ledHwFunc; ++ else ++ gLedHwFunc[(int) ledName] = ledHwFunc; ++ } ++} ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/board.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/board.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/board.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/board.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,1570 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : board.c ++ * ++ * Description: This file contains Linux character device driver entry ++ * for the board related ioctl calls: flash, get free kernel ++ * page and dump kernel memory, etc. ++ * ++ * Created on : 2/20/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) ++ * ++ ***************************************************************************/ ++ ++ ++/* Includes. */ ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/interrupt.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/pagemap.h> ++#include <asm/uaccess.h> ++#include <linux/wait.h> ++#include <linux/poll.h> ++#include <linux/sched.h> ++#include <linux/list.h> ++#include <linux/if.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include <bcmTag.h> ++#include "boardparms.h" ++#include "cfiflash.h" ++#include "bcm_intr.h" ++#include "board.h" ++#include "bcm_map_part.h" ++ ++/* Typedefs. */ ++#if defined (NON_CONSECUTIVE_MAC) ++// used to be the last octet. Now changed to the first 5 bits of the the forth octet ++// to reduced the duplicated MAC addresses. ++#define CHANGED_OCTET 3 ++#define SHIFT_BITS 3 ++#else ++#define CHANGED_OCTET 1 ++#define SHIFT_BITS 0 ++#endif ++ ++#if defined (WIRELESS) ++#define SES_BTN_PRESSED 0x00000001 ++#define SES_EVENTS SES_BTN_PRESSED /*OR all values if any*/ ++#define SES_LED_OFF 0 ++#define SES_LED_ON 1 ++#define SES_LED_BLINK 2 ++#endif ++ ++typedef struct ++{ ++ unsigned long ulId; ++ char chInUse; ++ char chReserved[3]; ++} MAC_ADDR_INFO, *PMAC_ADDR_INFO; ++ ++typedef struct ++{ ++ unsigned long ulSdramSize; ++ unsigned long ulPsiSize; ++ unsigned long ulNumMacAddrs; ++ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ MAC_ADDR_INFO MacAddrs[1]; ++} NVRAM_INFO, *PNVRAM_INFO; ++ ++typedef struct ++{ ++ unsigned long eventmask; ++} BOARD_IOC, *PBOARD_IOC; ++ ++ ++/*Dyinggasp callback*/ ++typedef void (*cb_dgasp_t)(void *arg); ++typedef struct _CB_DGASP__LIST ++{ ++ struct list_head list; ++ char name[IFNAMSIZ]; ++ cb_dgasp_t cb_dgasp_fn; ++ void *context; ++}CB_DGASP_LIST , *PCB_DGASP_LIST; ++ ++ ++static LED_MAP_PAIR LedMapping[] = ++{ // led name Initial state physical pin (ledMask) ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. ++}; ++ ++/* Externs. */ ++extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); ++extern unsigned int nr_free_pages (void); ++extern const char *get_system_type(void); ++extern void kerSysFlashInit(void); ++extern unsigned long get_nvram_start_addr(void); ++extern unsigned long get_scratch_pad_start_addr(void); ++extern unsigned long getMemorySize(void); ++extern void __init boardLedInit(PLED_MAP_PAIR); ++extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); ++extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); ++ ++/* Prototypes. */ ++void __init InitNvramInfo( void ); ++static int board_open( struct inode *inode, struct file *filp ); ++static int board_ioctl( struct inode *inode, struct file *flip, unsigned int command, unsigned long arg ); ++static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos); ++static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait); ++static int board_release(struct inode *inode, struct file *filp); ++ ++static BOARD_IOC* borad_ioc_alloc(void); ++static void borad_ioc_free(BOARD_IOC* board_ioc); ++ ++/* DyingGasp function prototype */ ++static void __init kerSysDyingGaspMapIntr(void); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); ++#else ++static unsigned int kerSysDyingGaspIsr(void); ++#endif ++static void __init kerSysInitDyingGaspHandler( void ); ++static void __exit kerSysDeinitDyingGaspHandler( void ); ++/* -DyingGasp function prototype - */ ++ ++ ++#if defined (WIRELESS) ++static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs); ++static void __init sesBtn_mapGpio(void); ++static void __init sesBtn_mapIntr(int context); ++static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait); ++static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos); ++static void __init sesLed_mapGpio(void); ++static void sesLed_ctrl(int action); ++static void __init ses_board_init(void); ++static void __exit ses_board_deinit(void); ++#endif ++ ++static PNVRAM_INFO g_pNvramInfo = NULL; ++static int g_ledInitialized = 0; ++static wait_queue_head_t g_board_wait_queue; ++static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; ++ ++static int g_wakeup_monitor = 0; ++static struct file *g_monitor_file = NULL; ++static struct task_struct *g_monitor_task = NULL; ++static unsigned int (*g_orig_fop_poll) ++ (struct file *, struct poll_table_struct *) = NULL; ++ ++static struct file_operations board_fops = ++{ ++ open: board_open, ++ ioctl: board_ioctl, ++ poll: board_poll, ++ read: board_read, ++ release: board_release, ++}; ++ ++uint32 board_major = 0; ++ ++#if defined (WIRELESS) ++static unsigned short sesBtn_irq = BP_NOT_DEFINED; ++static unsigned short sesBtn_gpio = BP_NOT_DEFINED; ++static unsigned short sesLed_gpio = BP_NOT_DEFINED; ++#endif ++ ++#if defined(MODULE) ++int init_module(void) ++{ ++ return( brcm_board_init() ); ++} ++ ++void cleanup_module(void) ++{ ++ if (MOD_IN_USE) ++ printk("brcm flash: cleanup_module failed because module is in use\n"); ++ else ++ brcm_board_cleanup(); ++} ++#endif //MODULE ++ ++ ++ ++static int __init brcm_board_init( void ) ++{ ++ typedef int (*BP_LED_FUNC) (unsigned short *); ++ static struct BpLedInformation ++ { ++ BOARD_LED_NAME ledName; ++ BP_LED_FUNC bpFunc; ++ BP_LED_FUNC bpFuncFail; ++ } bpLedInfo[] = ++ {{kLedAdsl, BpGetAdslLedGpio, BpGetAdslFailLedGpio}, ++ {kLedWireless, BpGetWirelessLedGpio, NULL}, ++ {kLedUsb, BpGetUsbLedGpio, NULL}, ++ {kLedHpna, BpGetHpnaLedGpio, NULL}, ++ {kLedWanData, BpGetWanDataLedGpio, NULL}, ++ {kLedPPP, BpGetPppLedGpio, BpGetPppFailLedGpio}, ++ {kLedVoip, BpGetVoipLedGpio, NULL}, ++ {kLedSes, BpGetWirelessSesLedGpio, NULL}, ++ {kLedEnd, NULL, NULL} ++ }; ++ ++ int ret; ++ ++ ret = register_chrdev(BOARD_DRV_MAJOR, "bcrmboard", &board_fops ); ++ if (ret < 0) ++ printk( "brcm_board_init(major %d): fail to register device.\n",BOARD_DRV_MAJOR); ++ else ++ { ++ PLED_MAP_PAIR pLedMap = LedMapping; ++ unsigned short gpio; ++ struct BpLedInformation *pInfo; ++ ++ printk("brcmboard: brcm_board_init entry\n"); ++ board_major = BOARD_DRV_MAJOR; ++ InitNvramInfo(); ++ ++ for( pInfo = bpLedInfo; pInfo->ledName != kLedEnd; pInfo++ ) ++ { ++ if( pInfo->bpFunc && (*pInfo->bpFunc) (&gpio) == BP_SUCCESS ) ++ { ++ pLedMap->ledName = pInfo->ledName; ++ pLedMap->ledMask = GPIO_NUM_TO_MASK(gpio); ++ pLedMap->ledActiveLow = (gpio & BP_ACTIVE_LOW) ? 1 : 0; ++ } ++ if( pInfo->bpFuncFail && (*pInfo->bpFuncFail) (&gpio) == BP_SUCCESS ) ++ { ++ pLedMap->ledName = pInfo->ledName; ++ pLedMap->ledMaskFail = GPIO_NUM_TO_MASK(gpio); ++ pLedMap->ledActiveLowFail = (gpio & BP_ACTIVE_LOW) ? 1 : 0; ++ } ++ if( pLedMap->ledName != kLedEnd ) ++ pLedMap++; ++ } ++ ++ init_waitqueue_head(&g_board_wait_queue); ++#if defined (WIRELESS) ++ ses_board_init(); ++#endif ++ kerSysInitDyingGaspHandler(); ++ kerSysDyingGaspMapIntr(); ++ ++ boardLedInit(LedMapping); ++ g_ledInitialized = 1; ++ } ++ ++ return ret; ++} ++ ++void __init InitNvramInfo( void ) ++{ ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ unsigned long ulNumMacAddrs = pNvramData->ulNumMacAddrs; ++ ++ if( ulNumMacAddrs > 0 && ulNumMacAddrs <= NVRAM_MAC_COUNT_MAX ) ++ { ++ unsigned long ulNvramInfoSize = ++ sizeof(NVRAM_INFO) + ((sizeof(MAC_ADDR_INFO) - 1) * ulNumMacAddrs); ++ ++ g_pNvramInfo = (PNVRAM_INFO) kmalloc( ulNvramInfoSize, GFP_KERNEL ); ++ ++ if( g_pNvramInfo ) ++ { ++ unsigned long ulPsiSize; ++ if( BpGetPsiSize( &ulPsiSize ) != BP_SUCCESS ) ++ ulPsiSize = NVRAM_PSI_DEFAULT; ++ memset( g_pNvramInfo, 0x00, ulNvramInfoSize ); ++ g_pNvramInfo->ulPsiSize = ulPsiSize * 1024; ++ g_pNvramInfo->ulNumMacAddrs = pNvramData->ulNumMacAddrs; ++ memcpy( g_pNvramInfo->ucaBaseMacAddr, pNvramData->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ g_pNvramInfo->ulSdramSize = getMemorySize(); ++ } ++ else ++ printk("ERROR - Could not allocate memory for NVRAM data\n"); ++ } ++ else ++ printk("ERROR - Invalid number of MAC addresses (%ld) is configured.\n", ++ ulNumMacAddrs); ++} ++ ++void __exit brcm_board_cleanup( void ) ++{ ++ printk("brcm_board_cleanup()\n"); ++ ++ if (board_major != -1) ++ { ++#if defined (WIRELESS) ++ ses_board_deinit(); ++#endif ++ kerSysDeinitDyingGaspHandler(); ++ unregister_chrdev(board_major, "board_ioctl"); ++ } ++} ++ ++static BOARD_IOC* borad_ioc_alloc(void) ++{ ++ BOARD_IOC *board_ioc =NULL; ++ board_ioc = (BOARD_IOC*) kmalloc( sizeof(BOARD_IOC) , GFP_KERNEL ); ++ if(board_ioc) ++ { ++ memset(board_ioc, 0, sizeof(BOARD_IOC)); ++ } ++ return board_ioc; ++} ++ ++static void borad_ioc_free(BOARD_IOC* board_ioc) ++{ ++ if(board_ioc) ++ { ++ kfree(board_ioc); ++ } ++} ++ ++ ++static int board_open( struct inode *inode, struct file *filp ) ++{ ++ filp->private_data = borad_ioc_alloc(); ++ ++ if (filp->private_data == NULL) ++ return -ENOMEM; ++ ++ return( 0 ); ++} ++ ++static int board_release(struct inode *inode, struct file *filp) ++{ ++ BOARD_IOC *board_ioc = filp->private_data; ++ ++ wait_event_interruptible(g_board_wait_queue, 1); ++ borad_ioc_free(board_ioc); ++ ++ return( 0 ); ++} ++ ++ ++static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait) ++{ ++ unsigned int mask = 0; ++#if defined (WIRELESS) ++ BOARD_IOC *board_ioc = filp->private_data; ++#endif ++ ++ poll_wait(filp, &g_board_wait_queue, wait); ++#if defined (WIRELESS) ++ if(board_ioc->eventmask & SES_EVENTS){ ++ mask |= sesBtn_poll(filp, wait); ++ } ++#endif ++ ++ return mask; ++} ++ ++ ++static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) ++{ ++#if defined (WIRELESS) ++ BOARD_IOC *board_ioc = filp->private_data; ++ if(board_ioc->eventmask & SES_EVENTS){ ++ return sesBtn_read(filp, buffer, count, ppos); ++ } ++#endif ++ return 0; ++} ++ ++//************************************************************************************** ++// Utitlities for dump memory, free kernel pages, mips soft reset, etc. ++//************************************************************************************** ++ ++/*********************************************************************** ++ * Function Name: dumpaddr ++ * Description : Display a hex dump of the specified address. ++ ***********************************************************************/ ++void dumpaddr( unsigned char *pAddr, int nLen ) ++{ ++ static char szHexChars[] = "0123456789abcdef"; ++ char szLine[80]; ++ char *p = szLine; ++ unsigned char ch, *q; ++ int i, j; ++ unsigned long ul; ++ ++ while( nLen > 0 ) ++ { ++ sprintf( szLine, "%8.8lx: ", (unsigned long) pAddr ); ++ p = szLine + strlen(szLine); ++ ++ for(i = 0; i < 16 && nLen > 0; i += sizeof(long), nLen -= sizeof(long)) ++ { ++ ul = *(unsigned long *) &pAddr[i]; ++ q = (unsigned char *) &ul; ++ for( j = 0; j < sizeof(long); j++ ) ++ { ++ *p++ = szHexChars[q[j] >> 4]; ++ *p++ = szHexChars[q[j] & 0x0f]; ++ *p++ = ' '; ++ } ++ } ++ ++ for( j = 0; j < 16 - i; j++ ) ++ *p++ = ' ', *p++ = ' ', *p++ = ' '; ++ ++ *p++ = ' ', *p++ = ' ', *p++ = ' '; ++ ++ for( j = 0; j < i; j++ ) ++ { ++ ch = pAddr[j]; ++ *p++ = (ch > ' ' && ch < '~') ? ch : '.'; ++ } ++ ++ *p++ = '\0'; ++ printk( "%s\r\n", szLine ); ++ ++ pAddr += i; ++ } ++ printk( "\r\n" ); ++} /* dumpaddr */ ++ ++ ++void kerSysMipsSoftReset(void) ++{ ++#if defined(CONFIG_BCM96348) ++ if (PERF->RevID == 0x634800A1) { ++ typedef void (*FNPTR) (void); ++ FNPTR bootaddr = (FNPTR) FLASH_BASE; ++ int i; ++ ++ /* Disable interrupts. */ ++ cli(); ++ ++ /* Reset all blocks. */ ++ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; ++ for( i = 0; i < 1000000; i++ ) ++ ; ++ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; ++ /* Jump to the power on address. */ ++ (*bootaddr) (); ++ } ++ else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++#else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++#endif ++} ++ ++ ++int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) ++{ ++ int nRet = 0; ++ PMAC_ADDR_INFO pMai = NULL; ++ PMAC_ADDR_INFO pMaiFreeNoId = NULL; ++ PMAC_ADDR_INFO pMaiFreeId = NULL; ++ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; ++ ++ for( i = 0, pMai = g_pNvramInfo->MacAddrs; i < g_pNvramInfo->ulNumMacAddrs; ++ i++, pMai++ ) ++ { ++ if( ulId == pMai->ulId || ulId == MAC_ADDRESS_ANY ) ++ { ++ /* This MAC address has been used by the caller in the past. */ ++ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ shiftedIdx = i; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMai->chInUse = 1; ++ pMaiFreeNoId = pMaiFreeId = NULL; ++ break; ++ } ++ else ++ if( pMai->chInUse == 0 ) ++ { ++ if( pMai->ulId == 0 && pMaiFreeNoId == NULL ) ++ { ++ /* This is an available MAC address that has never been ++ * used. ++ */ ++ pMaiFreeNoId = pMai; ++ ulIdxNoId = i; ++ } ++ else ++ if( pMai->ulId != 0 && pMaiFreeId == NULL ) ++ { ++ /* This is an available MAC address that has been used ++ * before. Use addresses that have never been used ++ * first, before using this one. ++ */ ++ pMaiFreeId = pMai; ++ ulIdxId = i; ++ } ++ } ++ } ++ ++ if( pMaiFreeNoId || pMaiFreeId ) ++ { ++ /* An available MAC address was found. */ ++ memcpy(pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr,NVRAM_MAC_ADDRESS_LEN); ++ if( pMaiFreeNoId ) ++ { ++ shiftedIdx = ulIdxNoId; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMaiFreeNoId->ulId = ulId; ++ pMaiFreeNoId->chInUse = 1; ++ } ++ else ++ { ++ shiftedIdx = ulIdxId; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMaiFreeId->ulId = ulId; ++ pMaiFreeId->chInUse = 1; ++ } ++ } ++ else ++ if( i == g_pNvramInfo->ulNumMacAddrs ) ++ nRet = -EADDRNOTAVAIL; ++ ++ return( nRet ); ++} /* kerSysGetMacAddr */ ++ ++int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) ++{ ++ int nRet = -EINVAL; ++ unsigned long ulIdx = 0; ++ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - ++ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); ++ ++ // if overflow 255 (negitive), add 256 to have the correct index ++ if (idx < 0) ++ idx += 256; ++ ulIdx = (unsigned long) (idx >> SHIFT_BITS); ++ ++ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) ++ { ++ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; ++ if( pMai->chInUse == 1 ) ++ { ++ pMai->chInUse = 0; ++ nRet = 0; ++ } ++ } ++ ++ return( nRet ); ++} /* kerSysReleaseMacAddr */ ++ ++int kerSysGetSdramSize( void ) ++{ ++ return( (int) g_pNvramInfo->ulSdramSize ); ++} /* kerSysGetSdramSize */ ++ ++ ++void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ if (g_ledInitialized) ++ boardLedCtrl(ledName, ledState); ++} ++ ++unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) ++{ ++ int mask = (*g_orig_fop_poll) (f, t); ++ ++ if( g_wakeup_monitor == 1 && g_monitor_file == f ) ++ { ++ /* If g_wakeup_monitor is non-0, the user mode application needs to ++ * return from a blocking select function. Return POLLPRI which will ++ * cause the select to return with the exception descriptor set. ++ */ ++ mask |= POLLPRI; ++ g_wakeup_monitor = 0; ++ } ++ ++ return( mask ); ++} ++ ++/* Put the user mode application that monitors link state on a run queue. */ ++void kerSysWakeupMonitorTask( void ) ++{ ++ g_wakeup_monitor = 1; ++ if( g_monitor_task ) ++ wake_up_process( g_monitor_task ); ++} ++ ++//******************************************************************************************** ++// misc. ioctl calls come to here. (flash, led, reset, kernel memory access, etc.) ++//******************************************************************************************** ++static int board_ioctl( struct inode *inode, struct file *flip, ++ unsigned int command, unsigned long arg ) ++{ ++ int ret = 0; ++ BOARD_IOCTL_PARMS ctrlParms; ++ unsigned char ucaMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ int allowedSize; ++ ++ switch (command) ++ { ++ case BOARD_IOCTL_FLASH_INIT: ++ // not used for now. kerSysBcmImageInit(); ++ break; ++ ++ ++ case BOARD_IOCTL_FLASH_WRITE: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ NVRAM_DATA SaveNvramData; ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ ++ switch (ctrlParms.action) ++ { ++ case SCRATCH_PAD: ++ ret = kerSysScratchPadSet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); ++ break; ++ ++ case PERSISTENT: ++ ret = kerSysPersistentSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case NVRAM: ++ ret = kerSysNvRamSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case BCM_IMAGE_CFE: ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > FLASH45_LENGTH_BOOT_ROM ) ++ { ++ printk("Illegal CFE size [%d]. Size allowed: [%d]\n", ++ ctrlParms.strLen, FLASH45_LENGTH_BOOT_ROM); ++ ret = -1; ++ break; ++ } ++ ++ // save NVRAM data into a local structure ++ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); ++ ++ // set memory type field ++ BpGetSdramSize( (unsigned long *) &ctrlParms.string[SDRAM_TYPE_ADDRESS_OFFSET] ); ++ ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ ++ // if nvram is not valid, restore the current nvram settings ++ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && ++ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) ++ { ++ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); ++ } ++ break; ++ ++ case BCM_IMAGE_FS: ++ allowedSize = (int) flash_get_total_size() - \ ++ FLASH_RESERVED_AT_END - TAG_LEN - FLASH45_LENGTH_BOOT_ROM; ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize) ++ { ++ printk("Illegal root file system size [%d]. Size allowed: [%d]\n", ++ ctrlParms.strLen, allowedSize); ++ ret = -1; ++ break; ++ } ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ kerSysMipsSoftReset(); ++ break; ++ ++ case BCM_IMAGE_KERNEL: // not used for now. ++ break; ++ case BCM_IMAGE_WHOLE: ++ if(ctrlParms.strLen <= 0) ++ { ++ printk("Illegal flash image size [%d].\n", ctrlParms.strLen); ++ ret = -1; ++ break; ++ } ++ ++ // save NVRAM data into a local structure ++ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); ++ ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ ++ // if nvram is not valid, restore the current nvram settings ++ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && ++ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) ++ { ++ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); ++ } ++ ++ kerSysMipsSoftReset(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ printk("flash_ioctl_command: invalid command %d\n", ctrlParms.action); ++ break; ++ } ++ ctrlParms.result = ret; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_FLASH_READ: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ switch (ctrlParms.action) ++ { ++ case SCRATCH_PAD: ++ ret = kerSysScratchPadGet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); ++ break; ++ ++ case PERSISTENT: ++ ret = kerSysPersistentGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case NVRAM: ++ ret = kerSysNvRamGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case FLASH_SIZE: ++ ret = kerSysFlashSizeGet(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ printk("Not supported. invalid command %d\n", ctrlParms.action); ++ break; ++ } ++ ctrlParms.result = ret; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_NR_PAGES: ++ ctrlParms.result = nr_free_pages() + get_page_cache_size(); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_DUMP_ADDR: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ dumpaddr( (unsigned char *) ctrlParms.string, ctrlParms.strLen ); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_SET_MEMORY: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ unsigned long *pul = (unsigned long *) ctrlParms.string; ++ unsigned short *pus = (unsigned short *) ctrlParms.string; ++ unsigned char *puc = (unsigned char *) ctrlParms.string; ++ switch( ctrlParms.strLen ) ++ { ++ case 4: ++ *pul = (unsigned long) ctrlParms.offset; ++ break; ++ case 2: ++ *pus = (unsigned short) ctrlParms.offset; ++ break; ++ case 1: ++ *puc = (unsigned char) ctrlParms.offset; ++ break; ++ } ++ dumpaddr( (unsigned char *) ctrlParms.string, sizeof(long) ); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_MIPS_SOFT_RESET: ++ kerSysMipsSoftReset(); ++ break; ++ ++ case BOARD_IOCTL_LED_CTRL: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ kerSysLedCtrl((BOARD_LED_NAME)ctrlParms.strLen, (BOARD_LED_STATE)ctrlParms.offset); ++ ret = 0; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_ID: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, ++ sizeof(ctrlParms)) == 0) ++ { ++ if( ctrlParms.string ) ++ { ++ char *p = (char *) get_system_type(); ++ if( strlen(p) + 1 < ctrlParms.strLen ) ++ ctrlParms.strLen = strlen(p) + 1; ++ __copy_to_user(ctrlParms.string, p, ctrlParms.strLen); ++ } ++ ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ ctrlParms.result = kerSysGetMacAddress( ucaMacAddr, ++ ctrlParms.offset ); ++ ++ if( ctrlParms.result == 0 ) ++ { ++ __copy_to_user(ctrlParms.string, ucaMacAddr, ++ sizeof(ucaMacAddr)); ++ } ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_RELEASE_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ if (copy_from_user((void*)ucaMacAddr, (void*)ctrlParms.string, \ ++ NVRAM_MAC_ADDRESS_LEN) == 0) ++ { ++ ctrlParms.result = kerSysReleaseMacAddress( ucaMacAddr ); ++ } ++ else ++ { ++ ctrlParms.result = -EACCES; ++ } ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_PSI_SIZE: ++ ctrlParms.result = (int) g_pNvramInfo->ulPsiSize; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_SDRAM_SIZE: ++ ctrlParms.result = (int) g_pNvramInfo->ulSdramSize; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_BASE_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ __copy_to_user(ctrlParms.string, g_pNvramInfo->ucaBaseMacAddr, NVRAM_MAC_ADDRESS_LEN); ++ ctrlParms.result = 0; ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_CHIP_ID: ++ ctrlParms.result = (int) (PERF->RevID & 0xFFFF0000) >> 16; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_NUM_ENET: { ++ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; ++ int i, numeth = 0; ++ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { ++ for( i = 0; i < BP_MAX_ENET_MACS; i++) { ++ if (EnetInfos[i].ucPhyType != BP_ENET_NO_PHY) { ++ numeth++; ++ } ++ } ++ ctrlParms.result = numeth; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ ++ case BOARD_IOCTL_GET_CFE_VER: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ char *vertag = (char *)(FLASH_BASE + CFE_VERSION_OFFSET); ++ if (ctrlParms.strLen < CFE_VERSION_SIZE) { ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = -EFAULT; ++ } ++ else if (strncmp(vertag, "cfe-v", 5)) { // no tag info in flash ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ ctrlParms.result = 1; ++ __copy_to_user(ctrlParms.string, vertag+CFE_VERSION_MARK_SIZE, CFE_VERSION_SIZE); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_ENET_CFG: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; ++ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { ++ if (ctrlParms.strLen == sizeof(EnetInfos)) { ++ __copy_to_user(ctrlParms.string, EnetInfos, sizeof(EnetInfos)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++#if defined (WIRELESS) ++ case BOARD_IOCTL_GET_WLAN_ANT_INUSE: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ unsigned short antInUse = 0; ++ if (BpGetWirelessAntInUse(&antInUse) == BP_SUCCESS) { ++ if (ctrlParms.strLen == sizeof(antInUse)) { ++ __copy_to_user(ctrlParms.string, &antInUse, sizeof(antInUse)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#endif ++ case BOARD_IOCTL_SET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ ctrlParms.result = -EFAULT; ++ ret = -EFAULT; ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ board_ioc->eventmask |= *((int*)ctrlParms.string); ++#if defined (WIRELESS) ++ if((board_ioc->eventmask & SES_EVENTS)) { ++ if(sesBtn_irq != BP_NOT_DEFINED) { ++ BcmHalInterruptEnable(sesBtn_irq); ++ ctrlParms.result = 0; ++ ret = 0; ++ } ++ } ++#endif ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ __copy_to_user(ctrlParms.string, &board_ioc->eventmask, sizeof(unsigned long)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_UNSET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ board_ioc->eventmask &= (~(*((int*)ctrlParms.string))); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#if defined (WIRELESS) ++ case BOARD_IOCTL_SET_SES_LED: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ if (ctrlParms.strLen == sizeof(int)) { ++ sesLed_ctrl(*(int*)ctrlParms.string); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#endif ++ ++ case BOARD_IOCTL_SET_MONITOR_FD: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ int fput_needed = 0; ++ ++ g_monitor_file = fget_light( ctrlParms.offset, &fput_needed ); ++ if( g_monitor_file ) { ++ /* Hook this file descriptor's poll function in order to set ++ * the exception descriptor when there is a change in link ++ * state. ++ */ ++ g_monitor_task = current; ++ g_orig_fop_poll = g_monitor_file->f_op->poll; ++ g_monitor_file->f_op->poll = kerSysMonitorPollHook; ++ } ++ } ++ break; ++ ++ case BOARD_IOCTL_WAKEUP_MONITOR_TASK: ++ kerSysWakeupMonitorTask(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ ctrlParms.result = 0; ++ printk("board_ioctl: invalid command %x, cmd %d .\n",command,_IOC_NR(command)); ++ break; ++ ++ } /* switch */ ++ ++ return (ret); ++ ++} /* board_ioctl */ ++ ++/*************************************************************************** ++ * SES Button ISR/GPIO/LED functions. ++ ***************************************************************************/ ++#if defined (WIRELESS) ++static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs) ++{ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if (!(*gpio_reg & gpio_mask)){ ++ wake_up_interruptible(&g_board_wait_queue); ++ return IRQ_RETVAL(1); ++ } else { ++ return IRQ_RETVAL(0); ++ } ++} ++ ++static void __init sesBtn_mapGpio() ++{ ++ if( BpGetWirelessSesBtnGpio(&sesBtn_gpio) == BP_SUCCESS ) ++ { ++ printk("SES: Button GPIO 0x%x is enabled\n", sesBtn_gpio); ++ } ++} ++ ++static void __init sesBtn_mapIntr(int context) ++{ ++ if( BpGetWirelessSesExtIntr(&sesBtn_irq) == BP_SUCCESS ) ++ { ++ printk("SES: Button Interrupt 0x%x is enabled\n", sesBtn_irq); ++ } ++ else ++ return; ++ ++ sesBtn_irq += INTERRUPT_ID_EXTERNAL_0; ++ ++ if (BcmHalMapInterrupt((FN_HANDLER)sesBtn_isr, context, sesBtn_irq)) { ++ printk("SES: Interrupt mapping failed\n"); ++ } ++ BcmHalInterruptEnable(sesBtn_irq); ++} ++ ++ ++static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait) ++{ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if (!(*gpio_reg & gpio_mask)){ ++ return POLLIN; ++ } ++ return 0; ++} ++ ++static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) ++{ ++ volatile unsigned int event=0; ++ ssize_t ret=0; ++ ++#if defined(_BCM96338_) || defined (CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined (CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if(*gpio_reg & gpio_mask){ ++ BcmHalInterruptEnable(sesBtn_irq); ++ return ret; ++ } ++ event = SES_EVENTS; ++ __copy_to_user((char*)buffer, (char*)&event, sizeof(event)); ++ BcmHalInterruptEnable(sesBtn_irq); ++ count -= sizeof(event); ++ buffer += sizeof(event); ++ ret += sizeof(event); ++ return ret; ++} ++ ++static void __init sesLed_mapGpio() ++{ ++ if( BpGetWirelessSesBtnGpio(&sesLed_gpio) == BP_SUCCESS ) ++ { ++ printk("SES: LED GPIO 0x%x is enabled\n", sesBtn_gpio); ++ } ++} ++ ++static void sesLed_ctrl(int action) ++{ ++ ++ //char status = ((action >> 8) & 0xff); /* extract status */ ++ //char event = ((action >> 16) & 0xff); /* extract event */ ++ //char blinktype = ((action >> 24) & 0xff); /* extract blink type for SES_LED_BLINK */ ++ ++ BOARD_LED_STATE led; ++ ++ if(sesLed_gpio == BP_NOT_DEFINED) ++ return; ++ ++ action &= 0xff; /* extract led */ ++ ++ //printk("blinktype=%d, event=%d, status=%d\n",(int)blinktype, (int)event, (int)status); ++ ++ switch (action) ++ { ++ case SES_LED_ON: ++ //printk("SES: led on\n"); ++ led = kLedStateOn; ++ break; ++ case SES_LED_BLINK: ++ //printk("SES: led blink\n"); ++ led = kLedStateSlowBlinkContinues; ++ break; ++ case SES_LED_OFF: ++ default: ++ //printk("SES: led off\n"); ++ led = kLedStateOff; ++ } ++ ++ kerSysLedCtrl(kLedSes, led); ++} ++ ++static void __init ses_board_init() ++{ ++ sesBtn_mapGpio(); ++ sesBtn_mapIntr(0); ++ sesLed_mapGpio(); ++} ++static void __exit ses_board_deinit() ++{ ++ if(sesBtn_irq) ++ BcmHalInterruptDisable(sesBtn_irq); ++} ++#endif ++ ++/*************************************************************************** ++ * Dying gasp ISR and functions. ++ ***************************************************************************/ ++#define KERSYS_DBG printk ++ ++#if defined(CONFIG_BCM96345) ++#define CYCLE_PER_US 70 ++#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++/* The BCM6348 cycles per microsecond is really variable since the BCM6348 ++ * MIPS speed can vary depending on the PLL settings. However, an appoximate ++ * value of 120 will still work OK for the test being done. ++ */ ++#define CYCLE_PER_US 120 ++#endif ++#define DG_GLITCH_TO (100*CYCLE_PER_US) ++ ++static void __init kerSysDyingGaspMapIntr() ++{ ++ unsigned long ulIntr; ++ ++#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ } ++#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ ulIntr += INTERRUPT_ID_EXTERNAL_0; ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); ++ BcmHalInterruptEnable( ulIntr ); ++ } ++#endif ++ ++} ++ ++void kerSysSetWdTimer(ulong timeUs) ++{ ++ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); ++ TIMER->WatchDogCtl = 0xFF00; ++ TIMER->WatchDogCtl = 0x00FF; ++} ++ ++ulong kerSysGetCycleCount(void) ++{ ++ ulong cnt; ++#ifdef _WIN32_WCE ++ cnt = 0; ++#else ++ __asm volatile("mfc0 %0, $9":"=d"(cnt)); ++#endif ++ return(cnt); ++} ++ ++static Bool kerSysDyingGaspCheckPowerLoss(void) ++{ ++ ulong clk0; ++ ulong ulIntr; ++ ++ ulIntr = 0; ++ clk0 = kerSysGetCycleCount(); ++ ++ UART->Data = 'D'; ++ UART->Data = '%'; ++ UART->Data = 'G'; ++ ++#if defined(CONFIG_BCM96345) ++ BpGetAdslDyingGaspExtIntr( &ulIntr ); ++ ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ ++ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#endif ++ return 1; ++} ++ ++static void kerSysDyingGaspShutdown( void ) ++{ ++ kerSysSetWdTimer(1000000); ++#if defined(CONFIG_BCM96345) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); ++#elif defined(CONFIG_BCM96348) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); ++#endif ++} ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) ++#else ++static unsigned int kerSysDyingGaspIsr(void) ++#endif ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp, *dsl = NULL; ++ ++ if (kerSysDyingGaspCheckPowerLoss()) { ++ ++ /* first to turn off everything other than dsl */ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(strncmp(tmp->name, "dsl", 3)) { ++ (tmp->cb_dgasp_fn)(tmp->context); ++ }else { ++ dsl = tmp; ++ } ++ } ++ ++ /* now send dgasp */ ++ if(dsl) ++ (dsl->cb_dgasp_fn)(dsl->context); ++ ++ /* reset and shutdown system */ ++ kerSysDyingGaspShutdown(); ++ } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++return( IRQ_HANDLED ); ++#else ++ return( 1 ); ++#endif ++} ++ ++static void __init kerSysInitDyingGaspHandler( void ) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head != NULL) { ++ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); ++ return; ++ } ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ g_cb_dgasp_list_head = new_node; ++ ++} /* kerSysInitDyingGaspHandler */ ++ ++static void __exit kerSysDeinitDyingGaspHandler( void ) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) ++ return; ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ list_del(pos); ++ kfree(tmp); ++ } ++ ++ kfree(g_cb_dgasp_list_head); ++ g_cb_dgasp_list_head = NULL; ++ ++} /* kerSysDeinitDyingGaspHandler */ ++ ++void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if( devname == NULL || cbfn == NULL ) { ++ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); ++ return; ++ } ++ ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ strncpy(new_node->name, devname, IFNAMSIZ); ++ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; ++ new_node->context = context; ++ list_add(&new_node->list, &g_cb_dgasp_list_head->list); ++ ++ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); ++ ++} /* kerSysRegisterDyingGaspHandler */ ++ ++void kerSysDeregisterDyingGaspHandler(char *devname) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if(devname == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); ++ return; ++ } ++ ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(!strcmp(tmp->name, devname)) { ++ list_del(pos); ++ kfree(tmp); ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); ++ return; ++ } ++ } ++ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); ++ ++} /* kerSysDeregisterDyingGaspHandler */ ++ ++/*************************************************************************** ++ * MACRO to call driver initialization and cleanup functions. ++ ***************************************************************************/ ++module_init( brcm_board_init ); ++module_exit( brcm_board_cleanup ); ++ ++EXPORT_SYMBOL(kerSysNvRamGet); ++EXPORT_SYMBOL(dumpaddr); ++EXPORT_SYMBOL(kerSysGetMacAddress); ++EXPORT_SYMBOL(kerSysReleaseMacAddress); ++EXPORT_SYMBOL(kerSysGetSdramSize); ++EXPORT_SYMBOL(kerSysLedCtrl); ++EXPORT_SYMBOL(kerSysLedRegisterHwHandler); ++EXPORT_SYMBOL(BpGetBoardIds); ++EXPORT_SYMBOL(BpGetSdramSize); ++EXPORT_SYMBOL(BpGetPsiSize); ++EXPORT_SYMBOL(BpGetEthernetMacInfo); ++EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); ++EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); ++EXPORT_SYMBOL(BpGetVoipResetGpio); ++EXPORT_SYMBOL(BpGetVoipIntrGpio); ++EXPORT_SYMBOL(BpGetPcmciaResetGpio); ++EXPORT_SYMBOL(BpGetRtsCtsUartGpios); ++EXPORT_SYMBOL(BpGetAdslLedGpio); ++EXPORT_SYMBOL(BpGetAdslFailLedGpio); ++EXPORT_SYMBOL(BpGetWirelessLedGpio); ++EXPORT_SYMBOL(BpGetUsbLedGpio); ++EXPORT_SYMBOL(BpGetHpnaLedGpio); ++EXPORT_SYMBOL(BpGetWanDataLedGpio); ++EXPORT_SYMBOL(BpGetPppLedGpio); ++EXPORT_SYMBOL(BpGetPppFailLedGpio); ++EXPORT_SYMBOL(BpGetVoipLedGpio); ++EXPORT_SYMBOL(BpGetWirelessExtIntr); ++EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); ++EXPORT_SYMBOL(BpGetVoipExtIntr); ++EXPORT_SYMBOL(BpGetHpnaExtIntr); ++EXPORT_SYMBOL(BpGetHpnaChipSelect); ++EXPORT_SYMBOL(BpGetVoipChipSelect); ++EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); ++EXPORT_SYMBOL(BpGetWirelessSesExtIntr); ++EXPORT_SYMBOL(BpGetWirelessSesLedGpio); ++EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysGetCycleCount); ++EXPORT_SYMBOL(kerSysSetWdTimer); ++EXPORT_SYMBOL(kerSysWakeupMonitorTask); ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,692 @@ ++/************************************************************************/ ++/* */ ++/* AMD CFI Enabled Flash Memory Drivers */ ++/* File name: CFIFLASH.C */ ++/* Revision: 1.0 5/07/98 */ ++/* */ ++/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ ++/* This software is unpublished and contains the trade secrets and */ ++/* confidential proprietary information of AMD. Unless otherwise */ ++/* provided in the Software Agreement associated herewith, it is */ ++/* licensed in confidence "AS IS" and is not to be reproduced in whole */ ++/* or part by any means except for backup. Use, duplication, or */ ++/* disclosure by the Government is subject to the restrictions in */ ++/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ ++/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ ++/* Software owned by */ ++/* Advanced Micro Devices, Inc., */ ++/* One AMD Place, */ ++/* P.O. Box 3453 */ ++/* Sunnyvale, CA 94088-3453. */ ++/************************************************************************/ ++/* This software constitutes a basic shell of source code for */ ++/* programming all AMD Flash components. AMD */ ++/* will not be responsible for misuse or illegal use of this */ ++/* software for devices not supported herein. AMD is providing */ ++/* this source code "AS IS" and will not be responsible for */ ++/* issues arising from incorrect user implementation of the */ ++/* source code herein. It is the user's responsibility to */ ++/* properly design-in this source code. */ ++/* */ ++/************************************************************************/ ++#ifdef _CFE_ ++#include "lib_types.h" ++#include "lib_printf.h" ++#include "lib_string.h" ++#include "cfe_timer.h" ++#define printk printf ++#else // linux ++#include <linux/param.h> ++#include <linux/sched.h> ++#include <linux/timer.h> ++#endif ++ ++#include "cfiflash.h" ++ ++static int flash_wait(WORD sector, int offset, UINT16 data); ++static UINT16 flash_get_device_id(void); ++static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily); ++static int flash_write(WORD sector, int offset, byte *buf, int nbytes); ++static void flash_command(int command, WORD sector, int offset, UINT16 data); ++ ++/*********************************************************************/ ++/* 'meminfo' should be a pointer, but most C compilers will not */ ++/* allocate static storage for a pointer without calling */ ++/* non-portable functions such as 'new'. We also want to avoid */ ++/* the overhead of passing this pointer for every driver call. */ ++/* Systems with limited heap space will need to do this. */ ++/*********************************************************************/ ++struct flashinfo meminfo; /* Flash information structure */ ++static int flashFamily = FLASH_UNDEFINED; ++static int totalSize = 0; ++static struct cfi_query query; ++ ++static UINT16 cfi_data_struct_29W160[] = { ++ 0x0020, 0x0049, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0x0051, 0x0052, 0x0059, 0x0002, 0x0000, 0x0040, 0x0000, 0x0000, ++ 0x0000, 0x0000, 0x0000, 0x0027, 0x0036, 0x0000, 0x0000, 0x0004, ++ 0x0000, 0x000a, 0x0000, 0x0004, 0x0000, 0x0003, 0x0000, 0x0015, ++ 0x0002, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0040, ++ 0x0000, 0x0001, 0x0000, 0x0020, 0x0000, 0x0000, 0x0000, 0x0080, ++ 0x0000, 0x001e, 0x0000, 0x0000, 0x0001, 0xffff, 0xffff, 0xffff, ++ 0x0050, 0x0052, 0x0049, 0x0031, 0x0030, 0x0000, 0x0002, 0x0001, ++ 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0002, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0x0888, 0x252b, 0x8c84, 0x7dbc, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff ++}; ++ ++ ++/*********************************************************************/ ++/* Init_flash is used to build a sector table from the information */ ++/* provided through the CFI query. This information is translated */ ++/* from erase_block information to base:offset information for each */ ++/* individual sector. This information is then stored in the meminfo */ ++/* structure, and used throughout the driver to access sector */ ++/* information. */ ++/* */ ++/* This is more efficient than deriving the sector base:offset */ ++/* information every time the memory map switches (since on the */ ++/* development platform can only map 64k at a time). If the entire */ ++/* flash memory array can be mapped in, then the addition static */ ++/* allocation for the meminfo structure can be eliminated, but the */ ++/* drivers will have to be re-written. */ ++/* */ ++/* The meminfo struct occupies 653 bytes of heap space, depending */ ++/* on the value of the define MAXSECTORS. Adjust to suit */ ++/* application */ ++/*********************************************************************/ ++byte flash_init(void) ++{ ++ int i=0, j=0, count=0; ++ int basecount=0L; ++ UINT16 device_id; ++ int flipCFIGeometry = FALSE; ++ ++ /* First, assume ++ * a single 8k sector for sector 0. This is to allow ++ * the system to perform memory mapping to the device, ++ * even though the actual physical layout is unknown. ++ * Once mapped in, the CFI query will produce all ++ * relevant information. ++ */ ++ meminfo.addr = 0L; ++ meminfo.areg = 0; ++ meminfo.nsect = 1; ++ meminfo.bank1start = 0; ++ meminfo.bank2start = 0; ++ ++ meminfo.sec[0].size = 8192; ++ meminfo.sec[0].base = 0x00000; ++ meminfo.sec[0].bank = 1; ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ ++ device_id = flash_get_device_id(); ++ ++ switch (device_id) { ++ case ID_I28F160C3B: ++ case ID_I28F320C3B: ++ case ID_I28F160C3T: ++ case ID_I28F320C3T: ++ flashFamily = FLASH_INTEL; ++ break; ++ case ID_AM29DL800B: ++ case ID_AM29LV800B: ++ case ID_AM29LV400B: ++ case ID_AM29LV160B: ++ case ID_AM29LV320B: ++ case ID_MX29LV320AB: ++ case ID_AM29LV320MB: ++ case ID_AM29DL800T: ++ case ID_AM29LV800T: ++ case ID_AM29LV160T: ++ case ID_AM29LV320T: ++ case ID_MX29LV320AT: ++ case ID_AM29LV320MT: ++ flashFamily = FLASH_AMD; ++ break; ++ case ID_SST39VF1601: ++ case ID_SST39VF3201: ++ flashFamily = FLASH_SST; ++ break; ++ default: ++ printk("Flash memory not supported! Device id = %x\n", device_id); ++ return -1; ++ } ++ ++ if (flash_get_cfi(&query, 0, flashFamily) == -1) { ++ switch(device_id) { ++ case ID_AM29LV160T: ++ case ID_AM29LV160B: ++ flash_get_cfi(&query, cfi_data_struct_29W160, flashFamily); ++ break; ++ default: ++ printk("CFI data structure not found. Device id = %x\n", device_id); ++ return -1; ++ } ++ } ++ ++ // need to determine if it top or bottom boot here ++ switch (device_id) ++ { ++ case ID_AM29DL800B: ++ case ID_AM29LV800B: ++ case ID_AM29LV400B: ++ case ID_AM29LV160B: ++ case ID_AM29LV320B: ++ case ID_MX29LV320AB: ++ case ID_AM29LV320MB: ++ case ID_I28F160C3B: ++ case ID_I28F320C3B: ++ case ID_I28F160C3T: ++ case ID_I28F320C3T: ++ case ID_SST39VF1601: ++ case ID_SST39VF3201: ++ flipCFIGeometry = FALSE; ++ break; ++ case ID_AM29DL800T: ++ case ID_AM29LV800T: ++ case ID_AM29LV160T: ++ case ID_AM29LV320T: ++ case ID_MX29LV320AT: ++ case ID_AM29LV320MT: ++ flipCFIGeometry = TRUE; ++ break; ++ default: ++ printk("Flash memory not supported! Device id = %x\n", device_id); ++ return -1; ++ } ++ ++ count=0;basecount=0L; ++ ++ if (!flipCFIGeometry) ++ { ++ for (i=0; i<query.num_erase_blocks; i++) { ++ for(j=0; j<query.erase_block[i].num_sectors; j++) { ++ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; ++ meminfo.sec[count].base = (int) basecount; ++ basecount += (int) query.erase_block[i].sector_size; ++ count++; ++ } ++ } ++ } ++ else ++ { ++ for (i = (query.num_erase_blocks - 1); i >= 0; i--) { ++ for(j=0; j<query.erase_block[i].num_sectors; j++) { ++ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; ++ meminfo.sec[count].base = (int) basecount; ++ basecount += (int) query.erase_block[i].sector_size; ++ count++; ++ } ++ } ++ } ++ ++ meminfo.nsect = count; ++ totalSize = meminfo.sec[count-1].base + meminfo.sec[count-1].size; ++ return (0); ++} ++ ++/*********************************************************************/ ++/* Flash_sector_erase_int() is identical to flash_sector_erase(), */ ++/* except it will wait until the erase is completed before returning */ ++/* control to the calling function. This can be used in cases which */ ++/* require the program to hold until a sector is erased, without */ ++/* adding the wait check external to this function. */ ++/*********************************************************************/ ++byte flash_sector_erase_int(WORD sector) ++{ ++ int i; ++ ++ for( i = 0; i < 3; i++ ) { ++ flash_command(FLASH_SERASE, sector, 0, 0); ++ if (flash_wait(sector, 0, 0xffff) == STATUS_READY) ++ break; ++ } ++ ++ return(1); ++} ++ ++/*********************************************************************/ ++/* flash_read_buf() reads buffer of data from the specified */ ++/* offset from the sector parameter. */ ++/*********************************************************************/ ++int flash_read_buf(WORD sector, int offset, ++ byte *buffer, int numbytes) ++{ ++ byte *fwp; ++ ++ fwp = (byte *)flash_get_memptr(sector); ++ ++ while (numbytes) { ++ *buffer++ = *(fwp + offset); ++ numbytes--; ++ fwp++; ++ } ++ ++ return (1); ++} ++ ++/*********************************************************************/ ++/* flash_write_buf() utilizes */ ++/* the unlock bypass mode of the flash device. This can remove */ ++/* significant overhead from the bulk programming operation, and */ ++/* when programming bulk data a sizeable performance increase can be */ ++/* observed. */ ++/*********************************************************************/ ++int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes) ++{ ++ int ret = -1; ++ int i; ++ unsigned char *p = flash_get_memptr(sector) + offset; ++ ++ /* After writing the flash block, compare the contents to the source ++ * buffer. Try to write the sector successfully up to three times. ++ */ ++ for( i = 0; i < 3; i++ ) { ++ ret = flash_write(sector, offset, buffer, numbytes); ++ if( !memcmp( p, buffer, numbytes ) ) ++ break; ++ /* Erase and try again */ ++ flash_sector_erase_int(sector); ++ ret = -1; ++ } ++ ++ if( ret == -1 ) ++ printk( "Flash write error. Verify failed\n" ); ++ ++ return( ret ); ++} ++ ++/*********************************************************************/ ++/* Usefull funtion to return the number of sectors in the device. */ ++/* Can be used for functions which need to loop among all the */ ++/* sectors, or wish to know the number of the last sector. */ ++/*********************************************************************/ ++int flash_get_numsectors(void) ++{ ++ return meminfo.nsect; ++} ++ ++/*********************************************************************/ ++/* flash_get_sector_size() is provided for cases in which the size */ ++/* of a sector is required by a host application. The sector size */ ++/* (in bytes) is returned in the data location pointed to by the */ ++/* 'size' parameter. */ ++/*********************************************************************/ ++int flash_get_sector_size(WORD sector) ++{ ++ return meminfo.sec[sector].size; ++} ++ ++/*********************************************************************/ ++/* The purpose of flash_get_memptr() is to return a memory pointer */ ++/* which points to the beginning of memory space allocated for the */ ++/* flash. All function pointers are then referenced from this */ ++/* pointer. */ ++/* */ ++/* Different systems will implement this in different ways: */ ++/* possibilities include: */ ++/* - A direct memory pointer */ ++/* - A pointer to a memory map */ ++/* - A pointer to a hardware port from which the linear */ ++/* address is translated */ ++/* - Output of an MMU function / service */ ++/* */ ++/* Also note that this function expects the pointer to a specific */ ++/* sector of the device. This can be provided by dereferencing */ ++/* the pointer from a translated offset of the sector from a */ ++/* global base pointer (e.g. flashptr = base_pointer + sector_offset)*/ ++/* */ ++/* Important: Many AMD flash devices need both bank and or sector */ ++/* address bits to be correctly set (bank address bits are A18-A16, */ ++/* and sector address bits are A18-A12, or A12-A15). Flash parts */ ++/* which do not need these bits will ignore them, so it is safe to */ ++/* assume that every part will require these bits to be set. */ ++/*********************************************************************/ ++unsigned char *flash_get_memptr(WORD sector) ++{ ++ unsigned char *memptr = (unsigned char*)(FLASH_BASE_ADDR_REG + meminfo.sec[sector].base); ++ ++ return (memptr); ++} ++ ++/*********************************************************************/ ++/* The purpose of flash_get_blk() is to return a the block number */ ++/* for a given memory address. */ ++/*********************************************************************/ ++int flash_get_blk(int addr) ++{ ++ int blk_start, i; ++ int last_blk = flash_get_numsectors(); ++ int relative_addr = addr - (int) FLASH_BASE_ADDR_REG; ++ ++ for(blk_start=0, i=0; i < relative_addr && blk_start < last_blk; blk_start++) ++ i += flash_get_sector_size(blk_start); ++ ++ if( i > relative_addr ) ++ { ++ blk_start--; // last blk, dec by 1 ++ } ++ else ++ if( blk_start == last_blk ) ++ { ++ printk("Address is too big.\n"); ++ blk_start = -1; ++ } ++ ++ return( blk_start ); ++} ++ ++/************************************************************************/ ++/* The purpose of flash_get_total_size() is to return the total size of */ ++/* the flash */ ++/************************************************************************/ ++int flash_get_total_size() ++{ ++ return totalSize; ++} ++ ++/*********************************************************************/ ++/* Flash_command() is the main driver function. It performs */ ++/* every possible command available to AMD B revision */ ++/* flash parts. Note that this command is not used directly, but */ ++/* rather called through the API wrapper functions provided below. */ ++/*********************************************************************/ ++static void flash_command(int command, WORD sector, int offset, UINT16 data) ++{ ++ volatile UINT16 *flashptr; ++ volatile UINT16 *flashbase; ++ ++ flashptr = (UINT16 *) flash_get_memptr(sector); ++ flashbase = (UINT16 *) flash_get_memptr(0); ++ ++ switch (flashFamily) { ++ case FLASH_UNDEFINED: ++ /* These commands should work for AMD, Intel and SST flashes */ ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xF0; ++ flashptr[0] = 0xFF; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0x5555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AAA] = 0x55; /* unlock 2 */ ++ flashptr[0x5555] = 0x90; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_AMD: ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xF0; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashptr[0x55] = 0x98; ++ break; ++ case FLASH_UB: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x20; ++ break; ++ case FLASH_PROG: ++ flashptr[0] = 0xA0; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_UBRESET: ++ flashptr[0] = 0x90; ++ flashptr[0] = 0x00; ++ break; ++ case FLASH_SERASE: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x80; ++ flashptr[0x555] = 0xAA; ++ flashptr[0x2AA] = 0x55; ++ flashptr[0] = 0x30; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_INTEL: ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xFF; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashptr[0] = 0x98; ++ break; ++ case FLASH_PROG: ++ flashptr[0] = 0x40; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_SERASE: ++ flashptr[0] = 0x60; ++ flashptr[0] = 0xD0; ++ flashptr[0] = 0x20; ++ flashptr[0] = 0xD0; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_SST: ++ switch (command) { ++ case FLASH_RESET: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0xf0; ++ break; ++ case FLASH_READ_ID: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x98; ++ break; ++ case FLASH_UB: ++ break; ++ case FLASH_PROG: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0xa0; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_UBRESET: ++ break; ++ case FLASH_SERASE: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x80; ++ flashbase[0x5555] = 0xAA; ++ flashbase[0x2AAA] = 0x55; ++ flashptr[0] = 0x30; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++} ++ ++/*********************************************************************/ ++/* flash_write extends the functionality of flash_program() by */ ++/* providing an faster way to program multiple data words, without */ ++/* needing the function overhead of looping algorithms which */ ++/* program word by word. This function utilizes fast pointers */ ++/* to quickly loop through bulk data. */ ++/*********************************************************************/ ++static int flash_write(WORD sector, int offset, byte *buf, int nbytes) ++{ ++ UINT16 *src; ++ src = (UINT16 *)buf; ++ ++ if ((nbytes | offset) & 1) { ++ return -1; ++ } ++ ++ flash_command(FLASH_UB, 0, 0, 0); ++ while (nbytes > 0) { ++ flash_command(FLASH_PROG, sector, offset, *src); ++ if (flash_wait(sector, offset, *src) != STATUS_READY) ++ break; ++ offset +=2; ++ nbytes -=2; ++ src++; ++ } ++ flash_command(FLASH_UBRESET, 0, 0, 0); ++ ++ return (byte*)src - buf; ++} ++ ++/*********************************************************************/ ++/* flash_wait utilizes the DQ6, DQ5, and DQ2 polling algorithms */ ++/* described in the flash data book. It can quickly ascertain the */ ++/* operational status of the flash device, and return an */ ++/* appropriate status code (defined in flash.h) */ ++/*********************************************************************/ ++static int flash_wait(WORD sector, int offset, UINT16 data) ++{ ++ volatile UINT16 *flashptr; /* flash window */ ++ UINT16 d1; ++ ++ flashptr = (UINT16 *) flash_get_memptr(sector); ++ ++ if (flashFamily == FLASH_AMD || flashFamily == FLASH_SST) { ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ do { ++ d1 = flashptr[offset/2]; ++ if (d1 == data) ++ return STATUS_READY; ++ } while (!(d1 & 0x20)); ++ ++ d1 = flashptr[offset/2]; ++ ++ if (d1 != data) { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++#else ++ do { ++ d1 = *flashptr; /* read data */ ++ d1 ^= *flashptr; /* read it again and see what toggled */ ++ if (d1 == 0) /* no toggles, nothing's happening */ ++ return STATUS_READY; ++ } while (!(d1 & 0x20)); ++ ++ d1 = *flashptr; /* read data */ ++ d1 ^= *flashptr; /* read it again and see what toggled */ ++ ++ if (d1 != 0) { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++#endif ++ } else if (flashFamily == FLASH_INTEL) { ++ flashptr[0] = 0x70; ++ /* Wait for completion */ ++ while(!(*flashptr & 0x80)); ++ if (*flashptr & 0x30) { ++ flashptr[0] = 0x50; ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++ flashptr[0] = 0x50; ++ flash_command(FLASH_RESET, 0, 0, 0); ++ } ++ ++ return STATUS_READY; ++} ++ ++/*********************************************************************/ ++/* flash_get_device_id() will perform an autoselect sequence on the */ ++/* flash device, and return the device id of the component. */ ++/* This function automatically resets to read mode. */ ++/*********************************************************************/ ++static UINT16 flash_get_device_id() ++{ ++ volatile UINT16 *fwp; /* flash window */ ++ UINT16 answer; ++ ++ fwp = (UINT16 *)flash_get_memptr(0); ++ ++ flash_command(FLASH_READ_ID, 0, 0, 0); ++ answer = *(fwp + 1); ++ if (answer == ID_AM29LV320M) { ++ answer = *(fwp + 0xe); ++ answer = *(fwp + 0xf); ++ } ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return( (UINT16) answer ); ++} ++ ++/*********************************************************************/ ++/* flash_get_cfi() is the main CFI workhorse function. Due to it's */ ++/* complexity and size it need only be called once upon */ ++/* initializing the flash system. Once it is called, all operations */ ++/* are performed by looking at the meminfo structure. */ ++/* All possible care was made to make this algorithm as efficient as */ ++/* possible. 90% of all operations are memory reads, and all */ ++/* calculations are done using bit-shifts when possible */ ++/*********************************************************************/ ++static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily) ++{ ++ volatile UINT16 *fwp; /* flash window */ ++ int i=0; ++ ++ flash_command(FLASH_CFIQUERY, 0, 0, 0); ++ ++ if (cfi_struct == 0) ++ fwp = (UINT16 *)flash_get_memptr(0); ++ else ++ fwp = cfi_struct; ++ ++ /* Initial house-cleaning */ ++ for(i=0; i < 8; i++) { ++ query->erase_block[i].sector_size = 0; ++ query->erase_block[i].num_sectors = 0; ++ } ++ ++ /* If not 'QRY', then we dont have a CFI enabled device in the socket */ ++ if( fwp[0x10] != 'Q' && ++ fwp[0x11] != 'R' && ++ fwp[0x12] != 'Y') { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return(-1); ++ } ++ ++ query->num_erase_blocks = fwp[0x2C]; ++ if(flashFamily == FLASH_SST) ++ query->num_erase_blocks = 1; ++ ++ for(i=0; i < query->num_erase_blocks; i++) { ++ query->erase_block[i].num_sectors = fwp[(0x2D+(4*i))] + (fwp[0x2E + (4*i)] << 8); ++ query->erase_block[i].num_sectors++; ++ query->erase_block[i].sector_size = 256 * (256 * fwp[(0x30+(4*i))] + fwp[(0x2F+(4*i))]); ++ } ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return(1); ++} +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.h +--- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,150 @@ ++/************************************************************************/ ++/* */ ++/* AMD CFI Enabled Flash Memory Drivers */ ++/* File name: CFIFLASH.H */ ++/* Revision: 1.0 5/07/98 */ ++/* */ ++/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ ++/* This software is unpublished and contains the trade secrets and */ ++/* confidential proprietary information of AMD. Unless otherwise */ ++/* provided in the Software Agreement associated herewith, it is */ ++/* licensed in confidence "AS IS" and is not to be reproduced in whole */ ++/* or part by any means except for backup. Use, duplication, or */ ++/* disclosure by the Government is subject to the restrictions in */ ++/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ ++/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ ++/* Software owned by */ ++/* Advanced Micro Devices, Inc., */ ++/* One AMD Place, */ ++/* P.O. Box 3453 */ ++/* Sunnyvale, CA 94088-3453. */ ++/************************************************************************/ ++/* This software constitutes a basic shell of source code for */ ++/* programming all AMD Flash components. AMD */ ++/* will not be responsible for misuse or illegal use of this */ ++/* software for devices not supported herein. AMD is providing */ ++/* this source code "AS IS" and will not be responsible for */ ++/* issues arising from incorrect user implementation of the */ ++/* source code herein. It is the user's responsibility to */ ++/* properly design-in this source code. */ ++/* */ ++/************************************************************************/ ++#ifndef _CFIFLASH_H ++#define _CFIFLASH_H ++ ++#if defined __cplusplus ++extern "C" { ++#endif ++ ++/* include board/CPU specific definitions */ ++#include "bcmtypes.h" ++#include "board.h" ++ ++#define FLASH_BASE_ADDR_REG FLASH_BASE ++ ++#ifndef NULL ++#define NULL 0 ++#endif ++ ++#define MAXSECTORS 1024 /* maximum number of sectors supported */ ++ ++/* A structure for identifying a flash part. There is one for each ++ * of the flash part definitions. We need to keep track of the ++ * sector organization, the address register used, and the size ++ * of the sectors. ++ */ ++struct flashinfo { ++ char *name; /* "Am29DL800T", etc. */ ++ unsigned long addr; /* physical address, once translated */ ++ int areg; /* Can be set to zero for all parts */ ++ int nsect; /* # of sectors -- 19 in LV, 22 in DL */ ++ int bank1start; /* first sector # in bank 1 */ ++ int bank2start; /* first sector # in bank 2, if DL part */ ++ struct { ++ long size; /* # of bytes in this sector */ ++ long base; /* offset from beginning of device */ ++ int bank; /* 1 or 2 for DL; 1 for LV */ ++ } sec[MAXSECTORS]; /* per-sector info */ ++}; ++ ++/* ++ * This structure holds all CFI query information as defined ++ * in the JEDEC standard. All information up to ++ * primary_extended_query is standard among all manufactures ++ * with CFI enabled devices. ++ */ ++ ++struct cfi_query { ++ int num_erase_blocks; /* Number of sector defs. */ ++ struct { ++ unsigned long sector_size; /* byte size of sector */ ++ int num_sectors; /* Num sectors of this size */ ++ } erase_block[8]; /* Max of 256, but 8 is good */ ++}; ++ ++/* Standard Boolean declarations */ ++#define TRUE 1 ++#define FALSE 0 ++ ++/* Define different type of flash */ ++#define FLASH_UNDEFINED 0 ++#define FLASH_AMD 1 ++#define FLASH_INTEL 2 ++#define FLASH_SST 3 ++ ++/* Command codes for the flash_command routine */ ++#define FLASH_RESET 0 /* reset to read mode */ ++#define FLASH_READ_ID 1 /* read device ID */ ++#define FLASH_CFIQUERY 2 /* CFI query */ ++#define FLASH_UB 3 /* go into unlock bypass mode */ ++#define FLASH_PROG 4 /* program a word */ ++#define FLASH_UBRESET 5 /* reset to read mode from unlock bypass mode */ ++#define FLASH_SERASE 6 /* sector erase */ ++ ++/* Return codes from flash_status */ ++#define STATUS_READY 0 /* ready for action */ ++#define STATUS_TIMEOUT 1 /* operation timed out */ ++ ++/* A list of AMD compatible device ID's - add others as needed */ ++#define ID_AM29DL800T 0x224A ++#define ID_AM29DL800B 0x22CB ++#define ID_AM29LV800T 0x22DA ++#define ID_AM29LV800B 0x225B ++#define ID_AM29LV400B 0x22BA ++ ++#define ID_AM29LV160B 0x2249 ++#define ID_AM29LV160T 0x22C4 ++ ++#define ID_AM29LV320T 0x22F6 ++#define ID_MX29LV320AT 0x22A7 ++#define ID_AM29LV320B 0x22F9 ++#define ID_MX29LV320AB 0x22A8 ++ ++#define ID_AM29LV320M 0x227E ++#define ID_AM29LV320MB 0x2200 ++#define ID_AM29LV320MT 0x2201 ++ ++#define ID_SST39VF1601 0x234B ++#define ID_SST39VF3201 0x235B ++ ++/* A list of Intel compatible device ID's - add others as needed */ ++#define ID_I28F160C3T 0x88C2 ++#define ID_I28F160C3B 0x88C3 ++#define ID_I28F320C3T 0x88C4 ++#define ID_I28F320C3B 0x88C5 ++ ++extern byte flash_init(void); ++extern int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes); ++extern int flash_read_buf(WORD sector, int offset, byte *buffer, int numbytes); ++extern byte flash_sector_erase_int(WORD sector); ++extern int flash_get_numsectors(void); ++extern int flash_get_sector_size(WORD sector); ++extern int flash_get_total_size(void); ++extern unsigned char *flash_get_memptr(WORD sector); ++extern int flash_get_blk(int addr); ++ ++#if defined __cplusplus ++} ++#endif ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/serial/bcm96348/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/bcm96348/Makefile +--- linux-2.6.8.1/bcmdrivers/opensource/char/serial/bcm96348/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/bcm96348/Makefile 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,13 @@ ++# File: bcmdrivers/opensource/char/serial ++# ++# Makefile for the BCM63xx serial/console driver ++ ++obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o ++ ++EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++ ++-include $(TOPDIR)/Rules.make ++ ++clean: ++ rm -f core *.o *.a *.s ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/serial/bcm96348/bcm63xx_cons.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/bcm96348/bcm63xx_cons.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/serial/bcm96348/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/bcm96348/bcm63xx_cons.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,1035 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++/* Description: Serial port driver for the BCM963XX. */ ++ ++#define CARDNAME "bcm963xx_serial driver" ++#define VERSION "2.0" ++#define VER_STR CARDNAME " v" VERSION "\n" ++ ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/slab.h> ++#include <linux/interrupt.h> ++ ++/* for definition of struct console */ ++#include <linux/console.h> ++#include <linux/tty.h> ++#include <linux/tty_flip.h> ++#include <linux/serial.h> ++#include <asm/uaccess.h> ++ ++#include <bcmtypes.h> ++#include <board.h> ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++extern void _putc(char); ++extern void _puts(const char *); ++ ++typedef struct bcm_serial { ++ volatile Uart * port; ++ int type; ++ int flags; ++ int irq; ++ int baud_base; ++ int blocked_open; ++ unsigned short close_delay; ++ unsigned short closing_wait; ++ unsigned short line; /* port/line number */ ++ unsigned short cflags; /* line configuration flag */ ++ unsigned short x_char; /* xon/xoff character */ ++ unsigned short read_status_mask; /* mask for read condition */ ++ unsigned short ignore_status_mask; /* mask for ignore condition */ ++ unsigned long event; /* mask used in BH */ ++ int xmit_head; /* Position of the head */ ++ int xmit_tail; /* Position of the tail */ ++ int xmit_cnt; /* Count of the chars in the buffer */ ++ int count; /* indicates how many times it has been opened */ ++ int magic; ++ ++ struct async_icount icount; /* keep track of things ... */ ++ struct tty_struct *tty; /* tty associated */ ++ struct termios normal_termios; ++ ++ wait_queue_head_t open_wait; ++ wait_queue_head_t close_wait; ++ ++ long session; /* Session of opening process */ ++ long pgrp; /* pgrp of opening process */ ++ ++ unsigned char is_initialized; ++} Context; ++ ++ ++/*---------------------------------------------------------------------*/ ++/* Define bits in the Interrupt Enable register */ ++/*---------------------------------------------------------------------*/ ++/* Enable receive interrupt */ ++#define RXINT (RXFIFONE|RXOVFERR) ++ ++/* Enable transmit interrupt */ ++#define TXINT (TXFIFOEMT|TXUNDERR|TXOVFERR) ++ ++/* Enable receiver line status interrupt */ ++#define LSINT (RXBRK|RXPARERR|RXFRAMERR) ++ ++#define BCM_NUM_UARTS 1 ++ ++#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) ++ ++ ++static struct bcm_serial multi[BCM_NUM_UARTS]; ++static struct bcm_serial *lines[BCM_NUM_UARTS]; ++static struct tty_driver serial_driver; ++static struct tty_struct *serial_table[BCM_NUM_UARTS]; ++static struct termios *serial_termios[BCM_NUM_UARTS]; ++static struct termios *serial_termios_locked[BCM_NUM_UARTS]; ++static int serial_refcount; ++ ++ ++static void bcm_stop (struct tty_struct *tty); ++static void bcm_start (struct tty_struct *tty); ++static inline void receive_chars (struct bcm_serial * info); ++static int startup (struct bcm_serial *info); ++static void shutdown (struct bcm_serial * info); ++static void change_speed( volatile Uart *pUart, tcflag_t cFlag ); ++static void bcm63xx_cons_flush_chars (struct tty_struct *tty); ++static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++ const unsigned char *buf, int count); ++static int bcm63xx_cons_write_room (struct tty_struct *tty); ++static int bcm_chars_in_buffer (struct tty_struct *tty); ++static void bcm_flush_buffer (struct tty_struct *tty); ++static void bcm_throttle (struct tty_struct *tty); ++static void bcm_unthrottle (struct tty_struct *tty); ++static void bcm_send_xchar (struct tty_struct *tty, char ch); ++static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo); ++static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info); ++static int get_lsr_info (struct bcm_serial *info, unsigned int *value); ++static void send_break (struct bcm_serial *info, int duration); ++static int bcm_ioctl (struct tty_struct * tty, struct file * file, ++ unsigned int cmd, unsigned long arg); ++static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios); ++static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp); ++static void bcm_hangup (struct tty_struct *tty); ++static int block_til_ready (struct tty_struct *tty, struct file *filp, struct bcm_serial *info); ++static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp); ++static int __init bcm63xx_serialinit(void); ++ ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_stop () and rs_start () ++ * ++ * These routines are called before setting or resetting ++ * tty->stopped. They enable or disable transmitter interrupts, ++ * as necessary. ++ * ------------------------------------------------------------ ++ */ ++static void bcm_stop (struct tty_struct *tty) ++{ ++} ++ ++static void bcm_start (struct tty_struct *tty) ++{ ++ _puts(CARDNAME " Start\n"); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * receive_char () ++ * ++ * This routine deals with inputs from any lines. ++ * ------------------------------------------------------------ ++ */ ++static inline void receive_chars (struct bcm_serial * info) ++{ ++ struct tty_struct *tty = 0; ++ struct async_icount * icount; ++ int ignore = 0; ++ unsigned short status, tmp; ++ UCHAR ch = 0; ++ while ((status = info->port->intStatus) & RXINT) ++ { ++ if (status & RXFIFONE) ++ ch = info->port->Data; // Read the character ++ tty = info->tty; /* now tty points to the proper dev */ ++ icount = &info->icount; ++ if (! tty) ++ break; ++ if (tty->flip.count >= TTY_FLIPBUF_SIZE) ++ break; ++ *tty->flip.char_buf_ptr = ch; ++ *tty->flip.flag_buf_ptr = 0; ++ icount->rx++; ++ if (status & RXBRK) ++ { ++ *tty->flip.flag_buf_ptr = TTY_BREAK; ++ icount->brk++; ++ } ++ // keep track of the statistics ++ if (status & (RXFRAMERR | RXPARERR | RXOVFERR)) ++ { ++ if (status & RXPARERR) /* parity error */ ++ icount->parity++; ++ else ++ if (status & RXFRAMERR) /* frame error */ ++ icount->frame++; ++ if (status & RXOVFERR) ++ { ++ // Overflow. Reset the RX FIFO ++ info->port->fifoctl |= RSTRXFIFOS; ++ icount->overrun++; ++ } ++ // check to see if we should ignore the character ++ // and mask off conditions that should be ignored ++ if (status & info->ignore_status_mask) ++ { ++ if (++ignore > 100 ) ++ break; ++ goto ignore_char; ++ } ++ // Mask off the error conditions we want to ignore ++ tmp = status & info->read_status_mask; ++ if (tmp & RXPARERR) ++ { ++ *tty->flip.flag_buf_ptr = TTY_PARITY; ++ } ++ else ++ if (tmp & RXFRAMERR) ++ { ++ *tty->flip.flag_buf_ptr = TTY_FRAME; ++ } ++ if (tmp & RXOVFERR) ++ { ++ if (tty->flip.count < TTY_FLIPBUF_SIZE) ++ { ++ tty->flip.count++; ++ tty->flip.flag_buf_ptr++; ++ tty->flip.char_buf_ptr++; ++ *tty->flip.flag_buf_ptr = TTY_OVERRUN; ++ } ++ } ++ } ++ tty->flip.flag_buf_ptr++; ++ tty->flip.char_buf_ptr++; ++ tty->flip.count++; ++ } ++ignore_char: ++ if (tty) ++ tty_flip_buffer_push(tty); ++} ++ ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm_interrupt () ++ * ++ * this is the main interrupt routine for the chip. ++ * It deals with the multiple ports. ++ * ------------------------------------------------------------ ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++static irqreturn_t bcm_interrupt (int irq, void * dev, struct pt_regs * regs) ++#else ++static void bcm_interrupt (int irq, void * dev, struct pt_regs * regs) ++#endif ++{ ++ struct bcm_serial * info = lines[0]; ++ UINT16 intStat; ++ ++ /* get pending interrupt flags from UART */ ++ ++ /* Mask with only the serial interrupts that are enabled */ ++ intStat = info->port->intStatus & info->port->intMask; ++ while (intStat) ++ { ++ if (intStat & RXINT) ++ receive_chars (info); ++ else ++ if (intStat & TXINT) ++ info->port->intStatus = TXINT; ++ else /* don't know what it was, so let's mask it */ ++ info->port->intMask &= ~intStat; ++ ++ intStat = info->port->intStatus & info->port->intMask; ++ } ++ ++ // Clear the interrupt ++ BcmHalInterruptEnable (INTERRUPT_ID_UART); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ return IRQ_HANDLED; ++#endif ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * startup () ++ * ++ * various initialization tasks ++ * ------------------------------------------------------------------- ++ */ ++static int startup (struct bcm_serial *info) ++{ ++ // Port is already started... ++ return 0; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * shutdown () ++ * ++ * This routine will shutdown a serial port; interrupts are disabled, and ++ * DTR is dropped if the hangup on close termio flag is on. ++ * ------------------------------------------------------------------- ++ */ ++static void shutdown (struct bcm_serial * info) ++{ ++ unsigned long flags; ++ if (!info->is_initialized) ++ return; ++ ++ save_flags (flags); ++ cli (); ++ ++ info->port->control &= ~(BRGEN|TXEN|RXEN); ++ if (info->tty) ++ set_bit (TTY_IO_ERROR, &info->tty->flags); ++ info->is_initialized = 0; ++ ++ restore_flags (flags); ++} ++/* ++ * ------------------------------------------------------------------- ++ * change_speed () ++ * ++ * Set the baud rate, character size, parity and stop bits. ++ * ------------------------------------------------------------------- ++ */ ++static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) ++{ ++ unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; ++ save_flags(ulFlags); ++ cli(); ++ switch( cFlag & (CBAUD | CBAUDEX) ) ++ { ++ case B115200: ++ ulBaud = 115200; ++ break; ++ case B57600: ++ ulBaud = 57600; ++ break; ++ case B38400: ++ ulBaud = 38400; ++ break; ++ case B19200: ++ ulBaud = 19200; ++ break; ++ case B9600: ++ ulBaud = 9600; ++ break; ++ case B4800: ++ ulBaud = 4800; ++ break; ++ case B2400: ++ ulBaud = 2400; ++ break; ++ case B1800: ++ ulBaud = 1800; ++ break; ++ case B1200: ++ ulBaud = 1200; ++ break; ++ case B600: ++ ulBaud = 600; ++ break; ++ case B300: ++ ulBaud = 300; ++ break; ++ case B200: ++ ulBaud = 200; ++ break; ++ case B150: ++ ulBaud = 150; ++ break; ++ case B134: ++ ulBaud = 134; ++ break; ++ case B110: ++ ulBaud = 110; ++ break; ++ case B75: ++ ulBaud = 75; ++ break; ++ case B50: ++ ulBaud = 50; ++ break; ++ default: ++ ulBaud = 115200; ++ break; ++ } ++ ++ /* Calculate buad rate. */ ++ ulClockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; ++ ulTmp = (ulClockFreqHz / ulBaud) / 16; ++ if( ulTmp & 0x01 ) ++ ulTmp /= 2; /* Rounding up, so sub is already accounted for */ ++ else ++ ulTmp = (ulTmp / 2) - 1; /* Rounding down so we must sub 1 */ ++ pUart->baudword = ulTmp; ++ ++ /* Set character size, stop bits and parity. */ ++ switch( cFlag & CSIZE ) ++ { ++ case CS5: ++ ulTmp = BITS5SYM; /* select transmit 5 bit data size */ ++ break; ++ case CS6: ++ ulTmp = BITS6SYM; /* select transmit 6 bit data size */ ++ break; ++ case CS7: ++ ulTmp = BITS7SYM; /* select transmit 7 bit data size */ ++ break; ++ /*case CS8:*/ ++ default: ++ ulTmp = BITS8SYM; /* select transmit 8 bit data size */ ++ break; ++ } ++ if( cFlag & CSTOPB ) ++ ulTmp |= TWOSTOP; /* select 2 stop bits */ ++ else ++ ulTmp |= ONESTOP; /* select one stop bit */ ++ ++ /* Write these values into the config reg. */ ++ pUart->config = ulTmp; ++ pUart->control &= ~(RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN); ++ switch( cFlag & (PARENB | PARODD) ) ++ { ++ case PARENB|PARODD: ++ pUart->control |= RXPARITYEN | TXPARITYEN; ++ break; ++ case PARENB: ++ pUart->control |= RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN; ++ break; ++ default: ++ pUart->control |= 0; ++ break; ++ } ++ ++ /* Reset and flush uart */ ++ pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; ++ restore_flags( ulFlags ); ++} ++ ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_flush_char () ++ * ++ * Nothing to flush. Polled I/O is used. ++ * ------------------------------------------------------------------- ++ */ ++static void bcm63xx_cons_flush_chars (struct tty_struct *tty) ++{ ++} ++ ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm63xx_cons_write () ++ * ++ * Main output routine using polled I/O. ++ * ------------------------------------------------------------------- ++ */ ++static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++ const unsigned char *buf, int count) ++{ ++ int c; ++ ++ for (c = 0; c < count; c++) ++ _putc(buf[c]); ++ return count; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm63xx_cons_write_room () ++ * ++ * Compute the amount of space available for writing. ++ * ------------------------------------------------------------------- ++ */ ++static int bcm63xx_cons_write_room (struct tty_struct *tty) ++{ ++ /* Pick a number. Any number. Polled I/O is used. */ ++ return 1024; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_chars_in_buffer () ++ * ++ * compute the amount of char left to be transmitted ++ * ------------------------------------------------------------------- ++ */ ++static int bcm_chars_in_buffer (struct tty_struct *tty) ++{ ++ return 0; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_flush_buffer () ++ * ++ * Empty the output buffer ++ * ------------------------------------------------------------------- ++ */ ++static void bcm_flush_buffer (struct tty_struct *tty) ++{ ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm_throttle () and bcm_unthrottle () ++ * ++ * This routine is called by the upper-layer tty layer to signal that ++ * incoming characters should be throttled (or not). ++ * ------------------------------------------------------------ ++ */ ++static void bcm_throttle (struct tty_struct *tty) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ if (I_IXOFF(tty)) ++ info->x_char = STOP_CHAR(tty); ++} ++ ++static void bcm_unthrottle (struct tty_struct *tty) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ if (I_IXOFF(tty)) ++ { ++ if (info->x_char) ++ info->x_char = 0; ++ else ++ info->x_char = START_CHAR(tty); ++ } ++} ++ ++static void bcm_send_xchar (struct tty_struct *tty, char ch) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ info->x_char = ch; ++ if (ch) ++ bcm_start (info->tty); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_ioctl () and friends ++ * ------------------------------------------------------------ ++ */ ++static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo) ++{ ++ struct serial_struct tmp; ++ ++ if (!retinfo) ++ return -EFAULT; ++ ++ memset (&tmp, 0, sizeof(tmp)); ++ tmp.type = info->type; ++ tmp.line = info->line; ++ tmp.port = (int) info->port; ++ tmp.irq = info->irq; ++ tmp.flags = 0; ++ tmp.baud_base = info->baud_base; ++ tmp.close_delay = info->close_delay; ++ tmp.closing_wait = info->closing_wait; ++ ++ return copy_to_user (retinfo, &tmp, sizeof(*retinfo)); ++} ++ ++static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info) ++{ ++ struct serial_struct new_serial; ++ struct bcm_serial old_info; ++ int retval = 0; ++ ++ if (!new_info) ++ return -EFAULT; ++ ++ copy_from_user (&new_serial, new_info, sizeof(new_serial)); ++ old_info = *info; ++ ++ if (!capable(CAP_SYS_ADMIN)) ++ return -EPERM; ++ ++ ++ if (info->count > 1) ++ return -EBUSY; ++ ++ /* OK, past this point, all the error checking has been done. ++ * At this point, we start making changes..... ++ */ ++ info->baud_base = new_serial.baud_base; ++ info->type = new_serial.type; ++ info->close_delay = new_serial.close_delay; ++ info->closing_wait = new_serial.closing_wait; ++ retval = startup (info); ++ return retval; ++} ++ ++/* ++ * get_lsr_info - get line status register info ++ * ++ * Purpose: Let user call ioctl() to get info when the UART physically ++ * is emptied. On bus types like RS485, the transmitter must ++ * release the bus after transmitting. This must be done when ++ * the transmit shift register is empty, not be done when the ++ * transmit holding register is empty. This functionality ++ * allows an RS485 driver to be written in user space. ++ */ ++static int get_lsr_info (struct bcm_serial *info, unsigned int *value) ++{ ++ return( 0 ); ++} ++ ++/* ++ * This routine sends a break character out the serial port. ++ */ ++static void send_break (struct bcm_serial *info, int duration) ++{ ++ unsigned long flags; ++ ++ if (!info->port) ++ return; ++ ++ current->state = TASK_INTERRUPTIBLE; ++ ++ save_flags (flags); ++ cli(); ++ ++ info->port->control |= XMITBREAK; ++ schedule_timeout(duration); ++ info->port->control &= ~XMITBREAK; ++ ++ restore_flags (flags); ++} ++ ++static int bcm_ioctl (struct tty_struct * tty, struct file * file, ++ unsigned int cmd, unsigned long arg) ++{ ++ int error; ++ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; ++ int retval; ++ ++ if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && ++ (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) && ++ (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) ++ { ++ if (tty->flags & (1 << TTY_IO_ERROR)) ++ return -EIO; ++ } ++ switch (cmd) ++ { ++ ++ case TCSBRK: /* SVID version: non-zero arg --> no break */ ++ retval = tty_check_change (tty); ++ if (retval) ++ return retval; ++ tty_wait_until_sent (tty, 0); ++ if (!arg) ++ send_break (info, HZ/4); /* 1/4 second */ ++ return 0; ++ ++ case TCSBRKP: /* support for POSIX tcsendbreak() */ ++ retval = tty_check_change (tty); ++ if (retval) ++ return retval; ++ tty_wait_until_sent (tty, 0); ++ send_break (info, arg ? arg*(HZ/10) : HZ/4); ++ return 0; ++ ++ case TIOCGSOFTCAR: ++ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(long)); ++ if (error) ++ return error; ++ put_user (C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg); ++ return 0; ++ ++ case TIOCSSOFTCAR: ++ error = get_user (arg, (unsigned long *)arg); ++ if (error) ++ return error; ++ tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); ++ return 0; ++ ++ case TIOCGSERIAL: ++ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct serial_struct)); ++ if (error) ++ return error; ++ return get_serial_info (info, (struct serial_struct *)arg); ++ ++ case TIOCSSERIAL: ++ return set_serial_info (info, (struct serial_struct *) arg); ++ ++ case TIOCSERGETLSR: /* Get line status register */ ++ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(unsigned int)); ++ if (error) ++ return error; ++ else ++ return get_lsr_info (info, (unsigned int *)arg); ++ ++ case TIOCSERGSTRUCT: ++ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct bcm_serial)); ++ if (error) ++ return error; ++ copy_to_user((struct bcm_serial *)arg, info, sizeof(struct bcm_serial)); ++ return 0; ++ ++ default: ++ return -ENOIOCTLCMD; ++ } ++ return 0; ++} ++ ++static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ ++ if( tty->termios->c_cflag != old_termios->c_cflag ) ++ change_speed (info->port, tty->termios->c_cflag); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm63xx_cons_close() ++ * ++ * This routine is called when the serial port gets closed. First, we ++ * wait for the last remaining data to be sent. Then, we turn off ++ * the transmit enable and receive enable flags. ++ * ------------------------------------------------------------ ++ */ ++static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp) ++{ ++ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; ++ unsigned long flags; ++ ++ if (!info) ++ return; ++ ++ save_flags (flags); ++ cli(); ++ ++ if (tty_hung_up_p (filp)) ++ { ++ restore_flags (flags); ++ return; ++ } ++ ++ if ((tty->count == 1) && (info->count != 1)) ++ { ++ ++ /* Uh, oh. tty->count is 1, which means that the tty ++ * structure will be freed. Info->count should always ++ * be one in these conditions. If it's greater than ++ * one, we've got real problems, since it means the ++ * serial port won't be shutdown. ++ */ ++ printk("bcm63xx_cons_close: bad serial port count; tty->count is 1, " ++ "info->count is %d\n", info->count); ++ info->count = 1; ++ } ++ ++ if (--info->count < 0) ++ { ++ printk("ds_close: bad serial port count for ttys%d: %d\n", ++ info->line, info->count); ++ info->count = 0; ++ } ++ ++ if (info->count) ++ { ++ restore_flags (flags); ++ return; ++ } ++ ++ /* Now we wait for the transmit buffer to clear; and we notify ++ * the line discipline to only process XON/XOFF characters. ++ */ ++ tty->closing = 1; ++ ++ /* At this point we stop accepting input. To do this, we ++ * disable the receive line status interrupts. ++ */ ++ shutdown (info); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ if (tty->driver->flush_buffer) ++ tty->driver->flush_buffer (tty); ++#else ++ if (tty->driver.flush_buffer) ++ tty->driver.flush_buffer (tty); ++#endif ++ if (tty->ldisc.flush_buffer) ++ tty->ldisc.flush_buffer (tty); ++ ++ tty->closing = 0; ++ info->event = 0; ++ info->tty = 0; ++ if (tty->ldisc.num != ldiscs[N_TTY].num) ++ { ++ if (tty->ldisc.close) ++ (tty->ldisc.close)(tty); ++ tty->ldisc = ldiscs[N_TTY]; ++ tty->termios->c_line = N_TTY; ++ if (tty->ldisc.open) ++ (tty->ldisc.open)(tty); ++ } ++ if (info->blocked_open) ++ { ++ if (info->close_delay) ++ { ++ current->state = TASK_INTERRUPTIBLE; ++ schedule_timeout(info->close_delay); ++ } ++ wake_up_interruptible (&info->open_wait); ++ } ++ wake_up_interruptible (&info->close_wait); ++ ++ restore_flags (flags); ++} ++ ++/* ++ * bcm_hangup () --- called by tty_hangup() when a hangup is signaled. ++ */ ++static void bcm_hangup (struct tty_struct *tty) ++{ ++ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ ++ shutdown (info); ++ info->event = 0; ++ info->count = 0; ++ info->tty = 0; ++ wake_up_interruptible (&info->open_wait); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_open() and friends ++ * ------------------------------------------------------------ ++ */ ++static int block_til_ready (struct tty_struct *tty, struct file *filp, ++ struct bcm_serial *info) ++{ ++ return 0; ++} ++ ++/* ++ * This routine is called whenever a serial port is opened. It ++ * enables interrupts for a serial port. It also performs the ++ * serial-specific initialization for the tty structure. ++ */ ++static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp) ++{ ++ struct bcm_serial *info; ++ int retval, line; ++ ++ // Make sure we're only opening on of the ports we support ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ line = MINOR(tty->driver->cdev.dev) - tty->driver->minor_start; ++#else ++ line = MINOR(tty->device) - tty->driver.minor_start; ++#endif ++ ++ if ((line < 0) || (line >= BCM_NUM_UARTS)) ++ return -ENODEV; ++ ++ info = lines[line]; ++ ++ info->port->intMask = 0; /* Clear any pending interrupts */ ++ info->port->intMask = RXINT; /* Enable RX */ ++ ++ info->count++; ++ tty->driver_data = info; ++ info->tty = tty; ++ BcmHalInterruptEnable (INTERRUPT_ID_UART); ++ ++ // Start up serial port ++ retval = startup (info); ++ if (retval) ++ return retval; ++ ++ retval = block_til_ready (tty, filp, info); ++ if (retval) ++ return retval; ++ ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ info->pgrp = process_group(current); ++ info->session = current->signal->session; ++#else ++ info->session = current->session; ++ info->pgrp = current->pgrp; ++#endif ++ ++ return 0; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: bcm63xx_serialinit ++ Purpose: Initialize our BCM63xx serial driver ++-------------------------------------------------------------------------- */ ++static int __init bcm63xx_serialinit(void) ++{ ++ int i, flags; ++ struct bcm_serial * info; ++ ++ // Print the driver version information ++ printk(VER_STR); ++ ++ memset(&serial_driver, 0, sizeof(struct tty_driver)); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ serial_driver.owner = THIS_MODULE; ++ serial_driver.devfs_name = "tts/"; ++#endif ++ serial_driver.magic = TTY_DRIVER_MAGIC; ++ serial_driver.name = "ttyS"; ++ serial_driver.major = TTY_MAJOR; ++ serial_driver.minor_start = 64; ++ serial_driver.num = BCM_NUM_UARTS; ++ serial_driver.type = TTY_DRIVER_TYPE_SERIAL; ++ serial_driver.subtype = SERIAL_TYPE_NORMAL; ++ serial_driver.init_termios = tty_std_termios; ++ serial_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | CLOCAL; ++ serial_driver.flags = TTY_DRIVER_REAL_RAW; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ serial_driver.refcount = serial_refcount; ++ serial_driver.ttys = serial_table; ++#else ++ serial_driver.refcount = &serial_refcount; ++ serial_driver.table = serial_table; ++#endif ++ ++ serial_driver.termios = serial_termios; ++ serial_driver.termios_locked = serial_termios_locked; ++ serial_driver.open = bcm63xx_cons_open; ++ serial_driver.close = bcm63xx_cons_close; ++ serial_driver.write = bcm63xx_cons_write; ++ serial_driver.flush_chars = bcm63xx_cons_flush_chars; ++ serial_driver.write_room = bcm63xx_cons_write_room; ++ serial_driver.chars_in_buffer = bcm_chars_in_buffer; ++ serial_driver.flush_buffer = bcm_flush_buffer; ++ serial_driver.ioctl = bcm_ioctl; ++ serial_driver.throttle = bcm_throttle; ++ serial_driver.unthrottle = bcm_unthrottle; ++ serial_driver.send_xchar = bcm_send_xchar; ++ serial_driver.set_termios = bcm_set_termios; ++ serial_driver.stop = bcm_stop; ++ serial_driver.start = bcm_start; ++ serial_driver.hangup = bcm_hangup; ++ ++ if (tty_register_driver (&serial_driver)) ++ panic("Couldn't register serial driver\n"); ++ ++ save_flags(flags); cli(); ++ for (i = 0; i < BCM_NUM_UARTS; i++) ++ { ++ info = &multi[i]; ++ lines[i] = info; ++ info->port = (Uart *) ((char *)UART_BASE + (i * 0x20)); ++ info->irq = (2 - i) + 8; ++ info->line = i; ++ info->tty = 0; ++ info->close_delay = 50; ++ info->closing_wait = 3000; ++ info->x_char = 0; ++ info->event = 0; ++ info->count = 0; ++ info->blocked_open = 0; ++ info->normal_termios = serial_driver.init_termios; ++ init_waitqueue_head(&info->open_wait); ++ init_waitqueue_head(&info->close_wait); ++ ++ /* If we are pointing to address zero then punt - not correctly ++ * set up in setup.c to handle this. ++ */ ++ if (! info->port) ++ return 0; ++ BcmHalMapInterrupt(bcm_interrupt, 0, INTERRUPT_ID_UART); ++ } ++ ++ /* order matters here... the trick is that flags ++ * is updated... in request_irq - to immediatedly obliterate ++ * it is unwise. ++ */ ++ restore_flags(flags); ++ return 0; ++} ++ ++module_init(bcm63xx_serialinit); ++ ++/* -------------------------------------------------------------------------- ++ Name: bcm_console_print ++ Purpose: bcm_console_print is registered for printk. ++ The console_lock must be held when we get here. ++-------------------------------------------------------------------------- */ ++static void bcm_console_print (struct console * cons, const char * str, ++ unsigned int count) ++{ ++ unsigned int i; ++ //_puts(str); ++ for(i=0; i<count; i++, str++) ++ { ++ _putc(*str); ++ if (*str == 10) ++ { ++ _putc(13); ++ } ++ } ++} ++ ++static struct tty_driver * bcm_console_device(struct console * c, int *index) ++{ ++ *index = c->index; ++ return &serial_driver; ++} ++ ++static int __init bcm_console_setup(struct console * co, char * options) ++{ ++ return 0; ++} ++ ++static struct console bcm_sercons = { ++ .name = "ttyS", ++ .write = bcm_console_print, ++ .device = bcm_console_device, ++ .setup = bcm_console_setup, ++ .flags = CON_PRINTBUFFER, // CON_CONSDEV, CONSOLE_LINE, ++ .index = -1, ++}; ++ ++static int __init bcm63xx_console_init(void) ++{ ++ register_console(&bcm_sercons); ++ return 0; ++} ++ ++console_initcall(bcm63xx_console_init); +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/serial/impl1/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile +--- linux-2.6.8.1/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,13 @@ ++# File: bcmdrivers/opensource/char/serial ++# ++# Makefile for the BCM63xx serial/console driver ++ ++obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o ++ ++EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++ ++-include $(TOPDIR)/Rules.make ++ ++clean: ++ rm -f core *.o *.a *.s ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c +--- linux-2.6.8.1/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,1035 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++/* Description: Serial port driver for the BCM963XX. */ ++ ++#define CARDNAME "bcm963xx_serial driver" ++#define VERSION "2.0" ++#define VER_STR CARDNAME " v" VERSION "\n" ++ ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/slab.h> ++#include <linux/interrupt.h> ++ ++/* for definition of struct console */ ++#include <linux/console.h> ++#include <linux/tty.h> ++#include <linux/tty_flip.h> ++#include <linux/serial.h> ++#include <asm/uaccess.h> ++ ++#include <bcmtypes.h> ++#include <board.h> ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++extern void _putc(char); ++extern void _puts(const char *); ++ ++typedef struct bcm_serial { ++ volatile Uart * port; ++ int type; ++ int flags; ++ int irq; ++ int baud_base; ++ int blocked_open; ++ unsigned short close_delay; ++ unsigned short closing_wait; ++ unsigned short line; /* port/line number */ ++ unsigned short cflags; /* line configuration flag */ ++ unsigned short x_char; /* xon/xoff character */ ++ unsigned short read_status_mask; /* mask for read condition */ ++ unsigned short ignore_status_mask; /* mask for ignore condition */ ++ unsigned long event; /* mask used in BH */ ++ int xmit_head; /* Position of the head */ ++ int xmit_tail; /* Position of the tail */ ++ int xmit_cnt; /* Count of the chars in the buffer */ ++ int count; /* indicates how many times it has been opened */ ++ int magic; ++ ++ struct async_icount icount; /* keep track of things ... */ ++ struct tty_struct *tty; /* tty associated */ ++ struct termios normal_termios; ++ ++ wait_queue_head_t open_wait; ++ wait_queue_head_t close_wait; ++ ++ long session; /* Session of opening process */ ++ long pgrp; /* pgrp of opening process */ ++ ++ unsigned char is_initialized; ++} Context; ++ ++ ++/*---------------------------------------------------------------------*/ ++/* Define bits in the Interrupt Enable register */ ++/*---------------------------------------------------------------------*/ ++/* Enable receive interrupt */ ++#define RXINT (RXFIFONE|RXOVFERR) ++ ++/* Enable transmit interrupt */ ++#define TXINT (TXFIFOEMT|TXUNDERR|TXOVFERR) ++ ++/* Enable receiver line status interrupt */ ++#define LSINT (RXBRK|RXPARERR|RXFRAMERR) ++ ++#define BCM_NUM_UARTS 1 ++ ++#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) ++ ++ ++static struct bcm_serial multi[BCM_NUM_UARTS]; ++static struct bcm_serial *lines[BCM_NUM_UARTS]; ++static struct tty_driver serial_driver; ++static struct tty_struct *serial_table[BCM_NUM_UARTS]; ++static struct termios *serial_termios[BCM_NUM_UARTS]; ++static struct termios *serial_termios_locked[BCM_NUM_UARTS]; ++static int serial_refcount; ++ ++ ++static void bcm_stop (struct tty_struct *tty); ++static void bcm_start (struct tty_struct *tty); ++static inline void receive_chars (struct bcm_serial * info); ++static int startup (struct bcm_serial *info); ++static void shutdown (struct bcm_serial * info); ++static void change_speed( volatile Uart *pUart, tcflag_t cFlag ); ++static void bcm63xx_cons_flush_chars (struct tty_struct *tty); ++static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++ const unsigned char *buf, int count); ++static int bcm63xx_cons_write_room (struct tty_struct *tty); ++static int bcm_chars_in_buffer (struct tty_struct *tty); ++static void bcm_flush_buffer (struct tty_struct *tty); ++static void bcm_throttle (struct tty_struct *tty); ++static void bcm_unthrottle (struct tty_struct *tty); ++static void bcm_send_xchar (struct tty_struct *tty, char ch); ++static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo); ++static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info); ++static int get_lsr_info (struct bcm_serial *info, unsigned int *value); ++static void send_break (struct bcm_serial *info, int duration); ++static int bcm_ioctl (struct tty_struct * tty, struct file * file, ++ unsigned int cmd, unsigned long arg); ++static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios); ++static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp); ++static void bcm_hangup (struct tty_struct *tty); ++static int block_til_ready (struct tty_struct *tty, struct file *filp, struct bcm_serial *info); ++static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp); ++static int __init bcm63xx_serialinit(void); ++ ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_stop () and rs_start () ++ * ++ * These routines are called before setting or resetting ++ * tty->stopped. They enable or disable transmitter interrupts, ++ * as necessary. ++ * ------------------------------------------------------------ ++ */ ++static void bcm_stop (struct tty_struct *tty) ++{ ++} ++ ++static void bcm_start (struct tty_struct *tty) ++{ ++ _puts(CARDNAME " Start\n"); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * receive_char () ++ * ++ * This routine deals with inputs from any lines. ++ * ------------------------------------------------------------ ++ */ ++static inline void receive_chars (struct bcm_serial * info) ++{ ++ struct tty_struct *tty = 0; ++ struct async_icount * icount; ++ int ignore = 0; ++ unsigned short status, tmp; ++ UCHAR ch = 0; ++ while ((status = info->port->intStatus) & RXINT) ++ { ++ if (status & RXFIFONE) ++ ch = info->port->Data; // Read the character ++ tty = info->tty; /* now tty points to the proper dev */ ++ icount = &info->icount; ++ if (! tty) ++ break; ++ if (tty->flip.count >= TTY_FLIPBUF_SIZE) ++ break; ++ *tty->flip.char_buf_ptr = ch; ++ *tty->flip.flag_buf_ptr = 0; ++ icount->rx++; ++ if (status & RXBRK) ++ { ++ *tty->flip.flag_buf_ptr = TTY_BREAK; ++ icount->brk++; ++ } ++ // keep track of the statistics ++ if (status & (RXFRAMERR | RXPARERR | RXOVFERR)) ++ { ++ if (status & RXPARERR) /* parity error */ ++ icount->parity++; ++ else ++ if (status & RXFRAMERR) /* frame error */ ++ icount->frame++; ++ if (status & RXOVFERR) ++ { ++ // Overflow. Reset the RX FIFO ++ info->port->fifoctl |= RSTRXFIFOS; ++ icount->overrun++; ++ } ++ // check to see if we should ignore the character ++ // and mask off conditions that should be ignored ++ if (status & info->ignore_status_mask) ++ { ++ if (++ignore > 100 ) ++ break; ++ goto ignore_char; ++ } ++ // Mask off the error conditions we want to ignore ++ tmp = status & info->read_status_mask; ++ if (tmp & RXPARERR) ++ { ++ *tty->flip.flag_buf_ptr = TTY_PARITY; ++ } ++ else ++ if (tmp & RXFRAMERR) ++ { ++ *tty->flip.flag_buf_ptr = TTY_FRAME; ++ } ++ if (tmp & RXOVFERR) ++ { ++ if (tty->flip.count < TTY_FLIPBUF_SIZE) ++ { ++ tty->flip.count++; ++ tty->flip.flag_buf_ptr++; ++ tty->flip.char_buf_ptr++; ++ *tty->flip.flag_buf_ptr = TTY_OVERRUN; ++ } ++ } ++ } ++ tty->flip.flag_buf_ptr++; ++ tty->flip.char_buf_ptr++; ++ tty->flip.count++; ++ } ++ignore_char: ++ if (tty) ++ tty_flip_buffer_push(tty); ++} ++ ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm_interrupt () ++ * ++ * this is the main interrupt routine for the chip. ++ * It deals with the multiple ports. ++ * ------------------------------------------------------------ ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++static irqreturn_t bcm_interrupt (int irq, void * dev, struct pt_regs * regs) ++#else ++static void bcm_interrupt (int irq, void * dev, struct pt_regs * regs) ++#endif ++{ ++ struct bcm_serial * info = lines[0]; ++ UINT16 intStat; ++ ++ /* get pending interrupt flags from UART */ ++ ++ /* Mask with only the serial interrupts that are enabled */ ++ intStat = info->port->intStatus & info->port->intMask; ++ while (intStat) ++ { ++ if (intStat & RXINT) ++ receive_chars (info); ++ else ++ if (intStat & TXINT) ++ info->port->intStatus = TXINT; ++ else /* don't know what it was, so let's mask it */ ++ info->port->intMask &= ~intStat; ++ ++ intStat = info->port->intStatus & info->port->intMask; ++ } ++ ++ // Clear the interrupt ++ BcmHalInterruptEnable (INTERRUPT_ID_UART); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ return IRQ_HANDLED; ++#endif ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * startup () ++ * ++ * various initialization tasks ++ * ------------------------------------------------------------------- ++ */ ++static int startup (struct bcm_serial *info) ++{ ++ // Port is already started... ++ return 0; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * shutdown () ++ * ++ * This routine will shutdown a serial port; interrupts are disabled, and ++ * DTR is dropped if the hangup on close termio flag is on. ++ * ------------------------------------------------------------------- ++ */ ++static void shutdown (struct bcm_serial * info) ++{ ++ unsigned long flags; ++ if (!info->is_initialized) ++ return; ++ ++ save_flags (flags); ++ cli (); ++ ++ info->port->control &= ~(BRGEN|TXEN|RXEN); ++ if (info->tty) ++ set_bit (TTY_IO_ERROR, &info->tty->flags); ++ info->is_initialized = 0; ++ ++ restore_flags (flags); ++} ++/* ++ * ------------------------------------------------------------------- ++ * change_speed () ++ * ++ * Set the baud rate, character size, parity and stop bits. ++ * ------------------------------------------------------------------- ++ */ ++static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) ++{ ++ unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; ++ save_flags(ulFlags); ++ cli(); ++ switch( cFlag & (CBAUD | CBAUDEX) ) ++ { ++ case B115200: ++ ulBaud = 115200; ++ break; ++ case B57600: ++ ulBaud = 57600; ++ break; ++ case B38400: ++ ulBaud = 38400; ++ break; ++ case B19200: ++ ulBaud = 19200; ++ break; ++ case B9600: ++ ulBaud = 9600; ++ break; ++ case B4800: ++ ulBaud = 4800; ++ break; ++ case B2400: ++ ulBaud = 2400; ++ break; ++ case B1800: ++ ulBaud = 1800; ++ break; ++ case B1200: ++ ulBaud = 1200; ++ break; ++ case B600: ++ ulBaud = 600; ++ break; ++ case B300: ++ ulBaud = 300; ++ break; ++ case B200: ++ ulBaud = 200; ++ break; ++ case B150: ++ ulBaud = 150; ++ break; ++ case B134: ++ ulBaud = 134; ++ break; ++ case B110: ++ ulBaud = 110; ++ break; ++ case B75: ++ ulBaud = 75; ++ break; ++ case B50: ++ ulBaud = 50; ++ break; ++ default: ++ ulBaud = 115200; ++ break; ++ } ++ ++ /* Calculate buad rate. */ ++ ulClockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; ++ ulTmp = (ulClockFreqHz / ulBaud) / 16; ++ if( ulTmp & 0x01 ) ++ ulTmp /= 2; /* Rounding up, so sub is already accounted for */ ++ else ++ ulTmp = (ulTmp / 2) - 1; /* Rounding down so we must sub 1 */ ++ pUart->baudword = ulTmp; ++ ++ /* Set character size, stop bits and parity. */ ++ switch( cFlag & CSIZE ) ++ { ++ case CS5: ++ ulTmp = BITS5SYM; /* select transmit 5 bit data size */ ++ break; ++ case CS6: ++ ulTmp = BITS6SYM; /* select transmit 6 bit data size */ ++ break; ++ case CS7: ++ ulTmp = BITS7SYM; /* select transmit 7 bit data size */ ++ break; ++ /*case CS8:*/ ++ default: ++ ulTmp = BITS8SYM; /* select transmit 8 bit data size */ ++ break; ++ } ++ if( cFlag & CSTOPB ) ++ ulTmp |= TWOSTOP; /* select 2 stop bits */ ++ else ++ ulTmp |= ONESTOP; /* select one stop bit */ ++ ++ /* Write these values into the config reg. */ ++ pUart->config = ulTmp; ++ pUart->control &= ~(RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN); ++ switch( cFlag & (PARENB | PARODD) ) ++ { ++ case PARENB|PARODD: ++ pUart->control |= RXPARITYEN | TXPARITYEN; ++ break; ++ case PARENB: ++ pUart->control |= RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN; ++ break; ++ default: ++ pUart->control |= 0; ++ break; ++ } ++ ++ /* Reset and flush uart */ ++ pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; ++ restore_flags( ulFlags ); ++} ++ ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_flush_char () ++ * ++ * Nothing to flush. Polled I/O is used. ++ * ------------------------------------------------------------------- ++ */ ++static void bcm63xx_cons_flush_chars (struct tty_struct *tty) ++{ ++} ++ ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm63xx_cons_write () ++ * ++ * Main output routine using polled I/O. ++ * ------------------------------------------------------------------- ++ */ ++static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++ const unsigned char *buf, int count) ++{ ++ int c; ++ ++ for (c = 0; c < count; c++) ++ _putc(buf[c]); ++ return count; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm63xx_cons_write_room () ++ * ++ * Compute the amount of space available for writing. ++ * ------------------------------------------------------------------- ++ */ ++static int bcm63xx_cons_write_room (struct tty_struct *tty) ++{ ++ /* Pick a number. Any number. Polled I/O is used. */ ++ return 1024; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_chars_in_buffer () ++ * ++ * compute the amount of char left to be transmitted ++ * ------------------------------------------------------------------- ++ */ ++static int bcm_chars_in_buffer (struct tty_struct *tty) ++{ ++ return 0; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_flush_buffer () ++ * ++ * Empty the output buffer ++ * ------------------------------------------------------------------- ++ */ ++static void bcm_flush_buffer (struct tty_struct *tty) ++{ ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm_throttle () and bcm_unthrottle () ++ * ++ * This routine is called by the upper-layer tty layer to signal that ++ * incoming characters should be throttled (or not). ++ * ------------------------------------------------------------ ++ */ ++static void bcm_throttle (struct tty_struct *tty) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ if (I_IXOFF(tty)) ++ info->x_char = STOP_CHAR(tty); ++} ++ ++static void bcm_unthrottle (struct tty_struct *tty) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ if (I_IXOFF(tty)) ++ { ++ if (info->x_char) ++ info->x_char = 0; ++ else ++ info->x_char = START_CHAR(tty); ++ } ++} ++ ++static void bcm_send_xchar (struct tty_struct *tty, char ch) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ info->x_char = ch; ++ if (ch) ++ bcm_start (info->tty); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_ioctl () and friends ++ * ------------------------------------------------------------ ++ */ ++static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo) ++{ ++ struct serial_struct tmp; ++ ++ if (!retinfo) ++ return -EFAULT; ++ ++ memset (&tmp, 0, sizeof(tmp)); ++ tmp.type = info->type; ++ tmp.line = info->line; ++ tmp.port = (int) info->port; ++ tmp.irq = info->irq; ++ tmp.flags = 0; ++ tmp.baud_base = info->baud_base; ++ tmp.close_delay = info->close_delay; ++ tmp.closing_wait = info->closing_wait; ++ ++ return copy_to_user (retinfo, &tmp, sizeof(*retinfo)); ++} ++ ++static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info) ++{ ++ struct serial_struct new_serial; ++ struct bcm_serial old_info; ++ int retval = 0; ++ ++ if (!new_info) ++ return -EFAULT; ++ ++ copy_from_user (&new_serial, new_info, sizeof(new_serial)); ++ old_info = *info; ++ ++ if (!capable(CAP_SYS_ADMIN)) ++ return -EPERM; ++ ++ ++ if (info->count > 1) ++ return -EBUSY; ++ ++ /* OK, past this point, all the error checking has been done. ++ * At this point, we start making changes..... ++ */ ++ info->baud_base = new_serial.baud_base; ++ info->type = new_serial.type; ++ info->close_delay = new_serial.close_delay; ++ info->closing_wait = new_serial.closing_wait; ++ retval = startup (info); ++ return retval; ++} ++ ++/* ++ * get_lsr_info - get line status register info ++ * ++ * Purpose: Let user call ioctl() to get info when the UART physically ++ * is emptied. On bus types like RS485, the transmitter must ++ * release the bus after transmitting. This must be done when ++ * the transmit shift register is empty, not be done when the ++ * transmit holding register is empty. This functionality ++ * allows an RS485 driver to be written in user space. ++ */ ++static int get_lsr_info (struct bcm_serial *info, unsigned int *value) ++{ ++ return( 0 ); ++} ++ ++/* ++ * This routine sends a break character out the serial port. ++ */ ++static void send_break (struct bcm_serial *info, int duration) ++{ ++ unsigned long flags; ++ ++ if (!info->port) ++ return; ++ ++ current->state = TASK_INTERRUPTIBLE; ++ ++ save_flags (flags); ++ cli(); ++ ++ info->port->control |= XMITBREAK; ++ schedule_timeout(duration); ++ info->port->control &= ~XMITBREAK; ++ ++ restore_flags (flags); ++} ++ ++static int bcm_ioctl (struct tty_struct * tty, struct file * file, ++ unsigned int cmd, unsigned long arg) ++{ ++ int error; ++ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; ++ int retval; ++ ++ if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && ++ (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) && ++ (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) ++ { ++ if (tty->flags & (1 << TTY_IO_ERROR)) ++ return -EIO; ++ } ++ switch (cmd) ++ { ++ ++ case TCSBRK: /* SVID version: non-zero arg --> no break */ ++ retval = tty_check_change (tty); ++ if (retval) ++ return retval; ++ tty_wait_until_sent (tty, 0); ++ if (!arg) ++ send_break (info, HZ/4); /* 1/4 second */ ++ return 0; ++ ++ case TCSBRKP: /* support for POSIX tcsendbreak() */ ++ retval = tty_check_change (tty); ++ if (retval) ++ return retval; ++ tty_wait_until_sent (tty, 0); ++ send_break (info, arg ? arg*(HZ/10) : HZ/4); ++ return 0; ++ ++ case TIOCGSOFTCAR: ++ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(long)); ++ if (error) ++ return error; ++ put_user (C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg); ++ return 0; ++ ++ case TIOCSSOFTCAR: ++ error = get_user (arg, (unsigned long *)arg); ++ if (error) ++ return error; ++ tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); ++ return 0; ++ ++ case TIOCGSERIAL: ++ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct serial_struct)); ++ if (error) ++ return error; ++ return get_serial_info (info, (struct serial_struct *)arg); ++ ++ case TIOCSSERIAL: ++ return set_serial_info (info, (struct serial_struct *) arg); ++ ++ case TIOCSERGETLSR: /* Get line status register */ ++ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(unsigned int)); ++ if (error) ++ return error; ++ else ++ return get_lsr_info (info, (unsigned int *)arg); ++ ++ case TIOCSERGSTRUCT: ++ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct bcm_serial)); ++ if (error) ++ return error; ++ copy_to_user((struct bcm_serial *)arg, info, sizeof(struct bcm_serial)); ++ return 0; ++ ++ default: ++ return -ENOIOCTLCMD; ++ } ++ return 0; ++} ++ ++static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ ++ if( tty->termios->c_cflag != old_termios->c_cflag ) ++ change_speed (info->port, tty->termios->c_cflag); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm63xx_cons_close() ++ * ++ * This routine is called when the serial port gets closed. First, we ++ * wait for the last remaining data to be sent. Then, we turn off ++ * the transmit enable and receive enable flags. ++ * ------------------------------------------------------------ ++ */ ++static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp) ++{ ++ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; ++ unsigned long flags; ++ ++ if (!info) ++ return; ++ ++ save_flags (flags); ++ cli(); ++ ++ if (tty_hung_up_p (filp)) ++ { ++ restore_flags (flags); ++ return; ++ } ++ ++ if ((tty->count == 1) && (info->count != 1)) ++ { ++ ++ /* Uh, oh. tty->count is 1, which means that the tty ++ * structure will be freed. Info->count should always ++ * be one in these conditions. If it's greater than ++ * one, we've got real problems, since it means the ++ * serial port won't be shutdown. ++ */ ++ printk("bcm63xx_cons_close: bad serial port count; tty->count is 1, " ++ "info->count is %d\n", info->count); ++ info->count = 1; ++ } ++ ++ if (--info->count < 0) ++ { ++ printk("ds_close: bad serial port count for ttys%d: %d\n", ++ info->line, info->count); ++ info->count = 0; ++ } ++ ++ if (info->count) ++ { ++ restore_flags (flags); ++ return; ++ } ++ ++ /* Now we wait for the transmit buffer to clear; and we notify ++ * the line discipline to only process XON/XOFF characters. ++ */ ++ tty->closing = 1; ++ ++ /* At this point we stop accepting input. To do this, we ++ * disable the receive line status interrupts. ++ */ ++ shutdown (info); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ if (tty->driver->flush_buffer) ++ tty->driver->flush_buffer (tty); ++#else ++ if (tty->driver.flush_buffer) ++ tty->driver.flush_buffer (tty); ++#endif ++ if (tty->ldisc.flush_buffer) ++ tty->ldisc.flush_buffer (tty); ++ ++ tty->closing = 0; ++ info->event = 0; ++ info->tty = 0; ++ if (tty->ldisc.num != ldiscs[N_TTY].num) ++ { ++ if (tty->ldisc.close) ++ (tty->ldisc.close)(tty); ++ tty->ldisc = ldiscs[N_TTY]; ++ tty->termios->c_line = N_TTY; ++ if (tty->ldisc.open) ++ (tty->ldisc.open)(tty); ++ } ++ if (info->blocked_open) ++ { ++ if (info->close_delay) ++ { ++ current->state = TASK_INTERRUPTIBLE; ++ schedule_timeout(info->close_delay); ++ } ++ wake_up_interruptible (&info->open_wait); ++ } ++ wake_up_interruptible (&info->close_wait); ++ ++ restore_flags (flags); ++} ++ ++/* ++ * bcm_hangup () --- called by tty_hangup() when a hangup is signaled. ++ */ ++static void bcm_hangup (struct tty_struct *tty) ++{ ++ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ ++ shutdown (info); ++ info->event = 0; ++ info->count = 0; ++ info->tty = 0; ++ wake_up_interruptible (&info->open_wait); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_open() and friends ++ * ------------------------------------------------------------ ++ */ ++static int block_til_ready (struct tty_struct *tty, struct file *filp, ++ struct bcm_serial *info) ++{ ++ return 0; ++} ++ ++/* ++ * This routine is called whenever a serial port is opened. It ++ * enables interrupts for a serial port. It also performs the ++ * serial-specific initialization for the tty structure. ++ */ ++static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp) ++{ ++ struct bcm_serial *info; ++ int retval, line; ++ ++ // Make sure we're only opening on of the ports we support ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ line = MINOR(tty->driver->cdev.dev) - tty->driver->minor_start; ++#else ++ line = MINOR(tty->device) - tty->driver.minor_start; ++#endif ++ ++ if ((line < 0) || (line >= BCM_NUM_UARTS)) ++ return -ENODEV; ++ ++ info = lines[line]; ++ ++ info->port->intMask = 0; /* Clear any pending interrupts */ ++ info->port->intMask = RXINT; /* Enable RX */ ++ ++ info->count++; ++ tty->driver_data = info; ++ info->tty = tty; ++ BcmHalInterruptEnable (INTERRUPT_ID_UART); ++ ++ // Start up serial port ++ retval = startup (info); ++ if (retval) ++ return retval; ++ ++ retval = block_til_ready (tty, filp, info); ++ if (retval) ++ return retval; ++ ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ info->pgrp = process_group(current); ++ info->session = current->signal->session; ++#else ++ info->session = current->session; ++ info->pgrp = current->pgrp; ++#endif ++ ++ return 0; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: bcm63xx_serialinit ++ Purpose: Initialize our BCM63xx serial driver ++-------------------------------------------------------------------------- */ ++static int __init bcm63xx_serialinit(void) ++{ ++ int i, flags; ++ struct bcm_serial * info; ++ ++ // Print the driver version information ++ printk(VER_STR); ++ ++ memset(&serial_driver, 0, sizeof(struct tty_driver)); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ serial_driver.owner = THIS_MODULE; ++ serial_driver.devfs_name = "tts/"; ++#endif ++ serial_driver.magic = TTY_DRIVER_MAGIC; ++ serial_driver.name = "ttyS"; ++ serial_driver.major = TTY_MAJOR; ++ serial_driver.minor_start = 64; ++ serial_driver.num = BCM_NUM_UARTS; ++ serial_driver.type = TTY_DRIVER_TYPE_SERIAL; ++ serial_driver.subtype = SERIAL_TYPE_NORMAL; ++ serial_driver.init_termios = tty_std_termios; ++ serial_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | CLOCAL; ++ serial_driver.flags = TTY_DRIVER_REAL_RAW; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ serial_driver.refcount = serial_refcount; ++ serial_driver.ttys = serial_table; ++#else ++ serial_driver.refcount = &serial_refcount; ++ serial_driver.table = serial_table; ++#endif ++ ++ serial_driver.termios = serial_termios; ++ serial_driver.termios_locked = serial_termios_locked; ++ serial_driver.open = bcm63xx_cons_open; ++ serial_driver.close = bcm63xx_cons_close; ++ serial_driver.write = bcm63xx_cons_write; ++ serial_driver.flush_chars = bcm63xx_cons_flush_chars; ++ serial_driver.write_room = bcm63xx_cons_write_room; ++ serial_driver.chars_in_buffer = bcm_chars_in_buffer; ++ serial_driver.flush_buffer = bcm_flush_buffer; ++ serial_driver.ioctl = bcm_ioctl; ++ serial_driver.throttle = bcm_throttle; ++ serial_driver.unthrottle = bcm_unthrottle; ++ serial_driver.send_xchar = bcm_send_xchar; ++ serial_driver.set_termios = bcm_set_termios; ++ serial_driver.stop = bcm_stop; ++ serial_driver.start = bcm_start; ++ serial_driver.hangup = bcm_hangup; ++ ++ if (tty_register_driver (&serial_driver)) ++ panic("Couldn't register serial driver\n"); ++ ++ save_flags(flags); cli(); ++ for (i = 0; i < BCM_NUM_UARTS; i++) ++ { ++ info = &multi[i]; ++ lines[i] = info; ++ info->port = (Uart *) ((char *)UART_BASE + (i * 0x20)); ++ info->irq = (2 - i) + 8; ++ info->line = i; ++ info->tty = 0; ++ info->close_delay = 50; ++ info->closing_wait = 3000; ++ info->x_char = 0; ++ info->event = 0; ++ info->count = 0; ++ info->blocked_open = 0; ++ info->normal_termios = serial_driver.init_termios; ++ init_waitqueue_head(&info->open_wait); ++ init_waitqueue_head(&info->close_wait); ++ ++ /* If we are pointing to address zero then punt - not correctly ++ * set up in setup.c to handle this. ++ */ ++ if (! info->port) ++ return 0; ++ BcmHalMapInterrupt(bcm_interrupt, 0, INTERRUPT_ID_UART); ++ } ++ ++ /* order matters here... the trick is that flags ++ * is updated... in request_irq - to immediatedly obliterate ++ * it is unwise. ++ */ ++ restore_flags(flags); ++ return 0; ++} ++ ++module_init(bcm63xx_serialinit); ++ ++/* -------------------------------------------------------------------------- ++ Name: bcm_console_print ++ Purpose: bcm_console_print is registered for printk. ++ The console_lock must be held when we get here. ++-------------------------------------------------------------------------- */ ++static void bcm_console_print (struct console * cons, const char * str, ++ unsigned int count) ++{ ++ unsigned int i; ++ //_puts(str); ++ for(i=0; i<count; i++, str++) ++ { ++ _putc(*str); ++ if (*str == 10) ++ { ++ _putc(13); ++ } ++ } ++} ++ ++static struct tty_driver * bcm_console_device(struct console * c, int *index) ++{ ++ *index = c->index; ++ return &serial_driver; ++} ++ ++static int __init bcm_console_setup(struct console * co, char * options) ++{ ++ return 0; ++} ++ ++static struct console bcm_sercons = { ++ .name = "ttyS", ++ .write = bcm_console_print, ++ .device = bcm_console_device, ++ .setup = bcm_console_setup, ++ .flags = CON_PRINTBUFFER, // CON_CONSDEV, CONSOLE_LINE, ++ .index = -1, ++}; ++ ++static int __init bcm63xx_console_init(void) ++{ ++ register_console(&bcm_sercons); ++ return 0; ++} ++ ++console_initcall(bcm63xx_console_init); +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6338_intr.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,72 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6338_INTR_H ++#define __6338_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++/*=====================================================================*/ ++/* BCM6338 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6338 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 6) ++#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 7) ++#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) ++#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 10) ++#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 11) ++#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 12) ++#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 13) ++#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) ++#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) ++#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) ++#define INTERRUPT_ID_SDIO (INTERNAL_ISR_TABLE_OFFSET + 17) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif /* __BCM6338_H */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,341 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6338_MAP_H ++#define __BCM6338_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++ ++#define PERF_BASE 0xfffe0000 ++#define TIMR_BASE 0xfffe0200 ++#define UART_BASE 0xfffe0300 ++#define GPIO_BASE 0xfffe0400 ++#define SPI_BASE 0xfffe0c00 ++ ++typedef struct PerfControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define EMAC_CLK_EN 0x0010 ++#define USBS_CLK_EN 0x0010 ++#define SAR_CLK_EN 0x0020 ++ ++#define SPI_CLK_EN 0x0200 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 5 ++#define EI_CLEAR_SHFT 10 ++#define EI_MASK_SHFT 15 ++#define EI_INSENS_SHFT 20 ++#define EI_LEVEL_SHFT 25 ++ ++ uint32 unused[4]; /* (18) */ ++ uint32 BlockSoftReset; /* (28) */ ++#define BSR_SPI 0x00000001 ++#define BSR_EMAC 0x00000004 ++#define BSR_USBH 0x00000008 ++#define BSR_USBS 0x00000010 ++#define BSR_ADSL 0x00000020 ++#define BSR_DMAMEM 0x00000040 ++#define BSR_SAR 0x00000080 ++#define BSR_ACLC 0x00000100 ++#define BSR_ADSL_MIPS_PLL 0x00000400 ++#define BSR_ALL_BLOCKS \ ++ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ ++ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) ++} PerfControl; ++ ++#define PERF ((volatile PerfControl * const) PERF_BASE) ++ ++ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint32 unused0; ++ uint32 GPIODir; /* bits 7:0 */ ++ uint32 unused1; ++ uint32 GPIOio; /* bits 7:0 */ ++ uint32 LEDCtrl; ++#define LED3_STROBE 0x08000000 ++#define LED2_STROBE 0x04000000 ++#define LED1_STROBE 0x02000000 ++#define LED0_STROBE 0x01000000 ++#define LED_TEST 0x00010000 ++#define LED3_DISABLE_LINK_ACT 0x00008000 ++#define LED2_DISABLE_LINK_ACT 0x00004000 ++#define LED1_DISABLE_LINK_ACT 0x00002000 ++#define LED0_DISABLE_LINK_ACT 0x00001000 ++#define LED_INTERVAL_SET_MASK 0x00000f00 ++#define LED_INTERVAL_SET_320MS 0x00000500 ++#define LED_INTERVAL_SET_160MS 0x00000400 ++#define LED_INTERVAL_SET_80MS 0x00000300 ++#define LED_INTERVAL_SET_40MS 0x00000200 ++#define LED_INTERVAL_SET_20MS 0x00000100 ++#define LED3_ON 0x00000080 ++#define LED2_ON 0x00000040 ++#define LED1_ON 0x00000020 ++#define LED0_ON 0x00000010 ++#define LED3_ENABLE 0x00000008 ++#define LED2_ENABLE 0x00000004 ++#define LED1_ENABLE 0x00000002 ++#define LED0_ENABLE 0x00000001 ++ uint32 SpiSlaveCfg; ++#define SPI_SLAVE_RESET 0x00010000 ++#define SPI_RESTRICT 0x00000400 ++#define SPI_DELAY_DISABLE 0x00000200 ++#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 ++#define SPI_SER_ADDR_CFG_MASK 0x0000000c ++#define SPI_MODE 0x00000001 ++ uint32 vRegConfig; ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++/* Number to mask conversion macro used for GPIODir and GPIOio */ ++#define GPIO_NUM_MAX_BITS_MASK 0x0f ++#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) ++ ++/* ++** Spi Controller ++*/ ++ ++typedef struct SpiControl { ++ uint16 spiCmd; /* (0x0): SPI command */ ++#define SPI_CMD_START_IMMEDIATE 3 ++ ++#define SPI_CMD_COMMAND_SHIFT 0 ++#define SPI_CMD_DEVICE_ID_SHIFT 4 ++#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 ++ ++ byte spiIntStatus; /* (0x2): SPI interrupt status */ ++ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ ++ ++ byte spiIntMask; /* (0x4): SPI interrupt mask */ ++#define SPI_INTR_CMD_DONE 0x01 ++#define SPI_INTR_CLEAR_ALL 0x1f ++ ++ byte spiStatus; /* (0x5): SPI status */ ++ ++ byte spiClkCfg; /* (0x6): SPI clock configuration */ ++ ++ byte spiFillByte; /* (0x7): SPI fill byte */ ++ ++ byte unused0; ++ byte spiMsgTail; /* (0x9): msgtail */ ++ byte unused1; ++ byte spiRxTail; /* (0xB): rxtail */ ++ ++ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ ++ ++ byte spiMsgCtl; /* (0x40) control byte */ ++#define HALF_DUPLEX_W 1 ++#define HALF_DUPLEX_R 2 ++#define SPI_MSG_TYPE_SHIFT 6 ++#define SPI_BYTE_CNT_SHIFT 0 ++ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ ++ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ ++ byte unused3[64]; /* (0xc0 - 0xff) reserved */ ++} SpiControl; ++ ++#define SPI ((volatile SpiControl * const) SPI_BASE) ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct MpiRegisters { ++ EbiChipSelect cs[1]; /* size chip select configuration */ ++} MpiRegisters; ++ ++#define MPI ((volatile MpiRegisters * const) MPI_BASE) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6345_intr.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,78 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6345_INTR_H ++#define __6345_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++/*=====================================================================*/ ++/* BCM6345 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6345 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++#define DMA_ISR_TABLE_OFFSET (INTERNAL_ISR_TABLE_OFFSET + 13) ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++/* Internal peripheral interrupt IDs */ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 3) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_USB (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_EMAC (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 12) ++ ++/* DMA channel interrupt IDs */ ++#define INTERRUPT_ID_EMAC_RX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_RX_CHAN) ++#define INTERRUPT_ID_EMAC_TX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_TX_CHAN) ++#define INTERRUPT_ID_EBI_RX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_RX_CHAN) ++#define INTERRUPT_ID_EBI_TX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_TX_CHAN) ++#define INTERRUPT_ID_RESERVED_RX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_RX_CHAN) ++#define INTERRUPT_ID_RESERVED_TX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_TX_CHAN) ++#define INTERRUPT_ID_USB_BULK_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_RX_CHAN) ++#define INTERRUPT_ID_USB_BULK_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_TX_CHAN) ++#define INTERRUPT_ID_USB_CNTL_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_RX_CHAN) ++#define INTERRUPT_ID_USB_CNTL_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_TX_CHAN) ++#define INTERRUPT_ID_USB_ISO_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_RX_CHAN) ++#define INTERRUPT_ID_USB_ISO_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_TX_CHAN) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif /* __BCM6345_H */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,169 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6345_MAP_H ++#define __BCM6345_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++#include "6345_intr.h" ++ ++typedef struct IntControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define USB_CLK_EN 0x0100 ++#define EMAC_CLK_EN 0x0080 ++#define UART_CLK_EN 0x0008 ++#define CPU_CLK_EN 0x0001 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 4 ++#define EI_CLEAR_SHFT 8 ++#define EI_MASK_SHFT 12 ++#define EI_INSENS_SHFT 16 ++#define EI_LEVEL_SHFT 20 ++} IntControl; ++ ++#define INTC_BASE 0xfffe0000 ++#define PERF ((volatile IntControl * const) INTC_BASE) ++ ++#define TIMR_BASE 0xfffe0200 ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ byte config; ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define XMITBREAK 0x40 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ uint32 baudword; ++ ++ byte txf_levl; ++ byte rxf_levl; ++ byte fifocfg; ++ byte prog_out; ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; ++ byte DeltaIPConfig_Mask; ++ byte DeltaIP_SyncIP; ++ uint16 intMask; ++ uint16 intStatus; ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOEMT 0x0020 ++#define RXOVFERR 0x0080 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART_BASE 0xfffe0300 ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint16 unused0; ++ byte unused1; ++ byte TBusSel; ++ ++ uint16 unused2; ++ uint16 GPIODir; ++ byte unused3; ++ byte Leds; ++ uint16 GPIOio; ++ ++ uint32 UartCtl; ++} GpioControl; ++ ++#define GPIO_BASE 0xfffe0400 ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++#define GPIO_NUM_MAX_BITS_MASK 0x0f ++#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6348_intr.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,80 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6348_INTR_H ++#define __6348_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++/*=====================================================================*/ ++/* BCM6348 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6348 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 6) ++#define INTERRUPT_ID_EMAC2 (INTERNAL_ISR_TABLE_OFFSET + 7) ++#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) ++#define INTERRUPT_ID_M2M (INTERNAL_ISR_TABLE_OFFSET + 10) ++#define INTERRUPT_ID_ACLC (INTERNAL_ISR_TABLE_OFFSET + 11) ++#define INTERRUPT_ID_USBH (INTERNAL_ISR_TABLE_OFFSET + 12) ++#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 13) ++#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) ++#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) ++#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) ++#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 17) ++#define INTERRUPT_ID_USB_ISO_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 18) ++#define INTERRUPT_ID_USB_ISO_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 19) ++#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 20) ++#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 21) ++#define INTERRUPT_ID_EMAC2_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 22) ++#define INTERRUPT_ID_EMAC2_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 23) ++#define INTERRUPT_ID_MPI (INTERNAL_ISR_TABLE_OFFSET + 24) ++#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 25) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif /* __BCM6348_H */ ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,508 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6348_MAP_H ++#define __BCM6348_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++ ++#define PERF_BASE 0xfffe0000 ++#define TIMR_BASE 0xfffe0200 ++#define UART_BASE 0xfffe0300 ++#define GPIO_BASE 0xfffe0400 ++#define MPI_BASE 0xfffe2000 /* MPI control registers */ ++#define USB_HOST_BASE 0xfffe1b00 /* USB host registers */ ++#define USB_HOST_NON_OHCI 0xfffe1c00 /* USB host non-OHCI registers */ ++ ++typedef struct PerfControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define EMAC_CLK_EN 0x0010 ++#define SAR_CLK_EN 0x0020 ++#define USBS_CLK_EN 0x0040 ++#define USBH_CLK_EN 0x0100 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 5 ++#define EI_CLEAR_SHFT 10 ++#define EI_MASK_SHFT 15 ++#define EI_INSENS_SHFT 20 ++#define EI_LEVEL_SHFT 25 ++ ++ uint32 unused[4]; /* (18) */ ++ uint32 BlockSoftReset; /* (28) */ ++#define BSR_SPI 0x00000001 ++#define BSR_EMAC 0x00000004 ++#define BSR_USBH 0x00000008 ++#define BSR_USBS 0x00000010 ++#define BSR_ADSL 0x00000020 ++#define BSR_DMAMEM 0x00000040 ++#define BSR_SAR 0x00000080 ++#define BSR_ACLC 0x00000100 ++#define BSR_ADSL_MIPS_PLL 0x00000400 ++#define BSR_ALL_BLOCKS \ ++ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ ++ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) ++ uint32 unused2[2]; /* (2c) */ ++ uint32 PllStrap; /* (34) */ ++#define PLL_N1_SHFT 20 ++#define PLL_N1_MASK (7<<PLL_N1_SHFT) ++#define PLL_N2_SHFT 15 ++#define PLL_N2_MASK (0x1f<<PLL_N2_SHFT) ++#define PLL_M1_REF_SHFT 12 ++#define PLL_M1_REF_MASK (7<<PLL_M1_REF_SHFT) ++#define PLL_M2_REF_SHFT 9 ++#define PLL_M2_REF_MASK (7<<PLL_M2_REF_SHFT) ++#define PLL_M1_CPU_SHFT 6 ++#define PLL_M1_CPU_MASK (7<<PLL_M1_CPU_SHFT) ++#define PLL_M1_BUS_SHFT 3 ++#define PLL_M1_BUS_MASK (7<<PLL_M1_BUS_SHFT) ++#define PLL_M2_BUS_SHFT 0 ++#define PLL_M2_BUS_MASK (7<<PLL_M2_BUS_SHFT) ++} PerfControl; ++ ++#define PERF ((volatile PerfControl * const) PERF_BASE) ++ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint32 GPIODir_high; /* bits 36:32 */ ++ uint32 GPIODir; /* bits 31:00 */ ++ uint32 GPIOio_high; /* bits 36:32 */ ++ uint32 GPIOio; /* bits 31:00 */ ++ uint32 LEDCtrl; ++#define LED3_STROBE 0x08000000 ++#define LED2_STROBE 0x04000000 ++#define LED1_STROBE 0x02000000 ++#define LED0_STROBE 0x01000000 ++#define LED_TEST 0x00010000 ++#define LED3_DISABLE_LINK_ACT 0x00008000 ++#define LED2_DISABLE_LINK_ACT 0x00004000 ++#define LED1_DISABLE_LINK_ACT 0x00002000 ++#define LED0_DISABLE_LINK_ACT 0x00001000 ++#define LED_INTERVAL_SET_MASK 0x00000f00 ++#define LED_INTERVAL_SET_320MS 0x00000500 ++#define LED_INTERVAL_SET_160MS 0x00000400 ++#define LED_INTERVAL_SET_80MS 0x00000300 ++#define LED_INTERVAL_SET_40MS 0x00000200 ++#define LED_INTERVAL_SET_20MS 0x00000100 ++#define LED3_ON 0x00000080 ++#define LED2_ON 0x00000040 ++#define LED1_ON 0x00000020 ++#define LED0_ON 0x00000010 ++#define LED3_ENABLE 0x00000008 ++#define LED2_ENABLE 0x00000004 ++#define LED1_ENABLE 0x00000002 ++#define LED0_ENABLE 0x00000001 ++ uint32 SpiSlaveCfg; ++#define SPI_SLAVE_RESET 0x00010000 ++#define SPI_RESTRICT 0x00000400 ++#define SPI_DELAY_DISABLE 0x00000200 ++#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 ++#define SPI_SER_ADDR_CFG_MASK 0x0000000c ++#define SPI_MODE 0x00000001 ++ uint32 GPIOMode; ++#define GROUP4_DIAG 0x00090000 ++#define GROUP4_UTOPIA 0x00080000 ++#define GROUP4_LEGACY_LED 0x00030000 ++#define GROUP4_MII_SNOOP 0x00020000 ++#define GROUP4_EXT_EPHY 0x00010000 ++#define GROUP3_DIAG 0x00009000 ++#define GROUP3_UTOPIA 0x00008000 ++#define GROUP3_EXT_MII 0x00007000 ++#define GROUP2_DIAG 0x00000900 ++#define GROUP2_PCI 0x00000500 ++#define GROUP1_DIAG 0x00000090 ++#define GROUP1_UTOPIA 0x00000080 ++#define GROUP1_SPI_UART 0x00000060 ++#define GROUP1_SPI_MASTER 0x00000060 ++#define GROUP1_MII_PCCARD 0x00000040 ++#define GROUP1_MII_SNOOP 0x00000020 ++#define GROUP1_EXT_EPHY 0x00000010 ++#define GROUP0_DIAG 0x00000009 ++#define GROUP0_EXT_MII 0x00000007 ++ ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++/* Number to mask conversion macro used for GPIODir and GPIOio */ ++#define GPIO_NUM_TOTAL_BITS_MASK 0x3f ++#define GPIO_NUM_MAX_BITS_MASK 0x1f ++#define GPIO_NUM_TO_MASK(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) < 32) ? (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) : (0) ) ++ ++/* Number to mask conversion macro used for GPIODir_high and GPIOio_high */ ++#define GPIO_NUM_MAX_BITS_MASK_HIGH 0x07 ++#define GPIO_NUM_TO_MASK_HIGH(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) >= 32) ? (1 << ((X-32) & GPIO_NUM_MAX_BITS_MASK_HIGH)) : (0) ) ++ ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct MpiRegisters { ++ EbiChipSelect cs[7]; /* size chip select configuration */ ++#define EBI_CS0_BASE 0 ++#define EBI_CS1_BASE 1 ++#define EBI_CS2_BASE 2 ++#define EBI_CS3_BASE 3 ++#define PCMCIA_COMMON_BASE 4 ++#define PCMCIA_ATTRIBUTE_BASE 5 ++#define PCMCIA_IO_BASE 6 ++ uint32 unused0[2]; /* reserved */ ++ uint32 ebi_control; /* ebi control */ ++ uint32 unused1[4]; /* reserved */ ++#define EBI_ACCESS_TIMEOUT 0x000007FF ++ uint32 pcmcia_cntl1; /* pcmcia control 1 */ ++#define PCCARD_CARD_RESET 0x00040000 ++#define CARDBUS_ENABLE 0x00008000 ++#define PCMCIA_ENABLE 0x00004000 ++#define PCMCIA_GPIO_ENABLE 0x00002000 ++#define CARDBUS_IDSEL 0x00001F00 ++#define VS2_OEN 0x00000080 ++#define VS1_OEN 0x00000040 ++#define VS2_OUT 0x00000020 ++#define VS1_OUT 0x00000010 ++#define VS2_IN 0x00000008 ++#define VS1_IN 0x00000004 ++#define CD2_IN 0x00000002 ++#define CD1_IN 0x00000001 ++#define VS_MASK 0x0000000C ++#define CD_MASK 0x00000003 ++ uint32 unused2; /* reserved */ ++ uint32 pcmcia_cntl2; /* pcmcia control 2 */ ++#define PCMCIA_BYTESWAP_DIS 0x00000002 ++#define PCMCIA_HALFWORD_EN 0x00000001 ++#define RW_ACTIVE_CNT_BIT 2 ++#define INACTIVE_CNT_BIT 8 ++#define CE_SETUP_CNT_BIT 16 ++#define CE_HOLD_CNT_BIT 24 ++ uint32 unused3[40]; /* reserved */ ++ ++ uint32 sp0range; /* PCI to internal system bus address space */ ++ uint32 sp0remap; ++ uint32 sp0cfg; ++ uint32 sp1range; ++ uint32 sp1remap; ++ uint32 sp1cfg; ++ ++ uint32 EndianCfg; ++ ++ uint32 l2pcfgctl; /* internal system bus to PCI IO/Cfg control */ ++#define DIR_CFG_SEL 0x80000000 /* change from PCI I/O access to PCI config access */ ++#define DIR_CFG_USEREG 0x40000000 /* use this register info for PCI configuration access */ ++#define DEVICE_NUMBER 0x00007C00 /* device number for the PCI configuration access */ ++#define FUNC_NUMBER 0x00000300 /* function number for the PCI configuration access */ ++#define REG_NUMBER 0x000000FC /* register number for the PCI configuration access */ ++#define CONFIG_TYPE 0x00000003 /* configuration type for the PCI configuration access */ ++ ++ uint32 l2pmrange1; /* internal system bus to PCI memory space */ ++#define PCI_SIZE_64K 0xFFFF0000 ++#define PCI_SIZE_128K 0xFFFE0000 ++#define PCI_SIZE_256K 0xFFFC0000 ++#define PCI_SIZE_512K 0xFFF80000 ++#define PCI_SIZE_1M 0xFFF00000 ++#define PCI_SIZE_2M 0xFFE00000 ++#define PCI_SIZE_4M 0xFFC00000 ++#define PCI_SIZE_8M 0xFF800000 ++#define PCI_SIZE_16M 0xFF000000 ++#define PCI_SIZE_32M 0xFE000000 ++ uint32 l2pmbase1; /* kseg0 or kseg1 address & 0x1FFFFFFF */ ++ uint32 l2pmremap1; ++#define CARDBUS_MEM 0x00000004 ++#define MEM_WINDOW_EN 0x00000001 ++ uint32 l2pmrange2; ++ uint32 l2pmbase2; ++ uint32 l2pmremap2; ++ uint32 l2piorange; /* internal system bus to PCI I/O space */ ++ uint32 l2piobase; ++ uint32 l2pioremap; ++ ++ uint32 pcimodesel; ++#define PCI2_INT_BUS_RD_PREFECH 0x000000F0 ++#define PCI_BAR2_NOSWAP 0x00000002 /* BAR at offset 0x20 */ ++#define PCI_BAR1_NOSWAP 0x00000001 /* BAR at affset 0x1c */ ++ ++ uint32 pciintstat; /* PCI interrupt mask/status */ ++#define MAILBOX1_SENT 0x08 ++#define MAILBOX0_SENT 0x04 ++#define MAILBOX1_MSG_RCV 0x02 ++#define MAILBOX0_MSG_RCV 0x01 ++ uint32 locbuscntrl; /* internal system bus control */ ++#define DIR_U2P_NOSWAP 0x00000002 ++#define EN_PCI_GPIO 0x00000001 ++ uint32 locintstat; /* internal system bus interrupt mask/status */ ++#define CSERR 0x0200 ++#define SERR 0x0100 ++#define EXT_PCI_INT 0x0080 ++#define DIR_FAILED 0x0040 ++#define DIR_COMPLETE 0x0020 ++#define PCI_CFG 0x0010 ++ uint32 unused5[7]; ++ ++ uint32 mailbox0; ++ uint32 mailbox1; ++ ++ uint32 pcicfgcntrl; /* internal system bus PCI configuration control */ ++#define PCI_CFG_REG_WRITE_EN 0x00000080 ++#define PCI_CFG_ADDR 0x0000003C ++ uint32 pcicfgdata; /* internal system bus PCI configuration data */ ++ ++ uint32 locch2ctl; /* PCI to interrnal system bus DMA (downstream) local control */ ++#define MPI_DMA_HALT 0x00000008 /* idle after finish current memory burst */ ++#define MPI_DMA_PKT_HALT 0x00000004 /* idle after an EOP flag is detected */ ++#define MPI_DMA_STALL 0x00000002 /* idle after an EOP flag is detected */ ++#define MPI_DMA_ENABLE 0x00000001 /* set to enable channel */ ++ uint32 locch2intStat; ++#define MPI_DMA_NO_DESC 0x00000004 /* no valid descriptors */ ++#define MPI_DMA_DONE 0x00000002 /* packet xfer complete */ ++#define MPI_DMA_BUFF_DONE 0x00000001 /* buffer done */ ++ uint32 locch2intMask; ++ uint32 unused6; ++ uint32 locch2descaddr; ++ uint32 locch2status1; ++#define LOCAL_DESC_STATE 0xE0000000 ++#define PCI_DESC_STATE 0x1C000000 ++#define BYTE_DONE 0x03FFC000 ++#define RING_ADDR 0x00003FFF ++ uint32 locch2status2; ++#define BUFPTR_OFFSET 0x1FFF0000 ++#define PCI_MASTER_STATE 0x000000C0 ++#define LOC_MASTER_STATE 0x00000038 ++#define CONTROL_STATE 0x00000007 ++ uint32 unused7; ++ ++ uint32 locch1Ctl; /*internal system bus to PCI DMA (upstream) local control */ ++#define DMA_U2P_LE 0x00000200 /* local bus is little endian */ ++#define DMA_U2P_NOSWAP 0x00000100 /* lccal bus is little endian but no data swapped */ ++ uint32 locch1intstat; ++ uint32 locch1intmask; ++ uint32 unused8; ++ uint32 locch1descaddr; ++ uint32 locch1status1; ++ uint32 locch1status2; ++ uint32 unused9; ++ ++ uint32 pcich1ctl; /* internal system bus to PCI DMA PCI control */ ++ uint32 pcich1intstat; ++ uint32 pcich1intmask; ++ uint32 pcich1descaddr; ++ uint32 pcich1status1; ++ uint32 pcich1status2; ++ ++ uint32 pcich2Ctl; /* PCI to internal system bus DMA PCI control */ ++ uint32 pcich2intstat; ++ uint32 pcich2intmask; ++ uint32 pcich2descaddr; ++ uint32 pcich2status1; ++ uint32 pcich2status2; ++ ++ uint32 perm_id; /* permanent device and vendor id */ ++ uint32 perm_rev; /* permanent revision id */ ++} MpiRegisters; ++ ++#define MPI ((volatile MpiRegisters * const) MPI_BASE) ++ ++/* PCI configuration address space start offset 0x40 */ ++#define BRCM_PCI_CONFIG_TIMER 0x40 ++#define BRCM_PCI_CONFIG_TIMER_RETRY_MASK 0x0000FF00 ++#define BRCM_PCI_CONFIG_TIMER_TRDY_MASK 0x000000FF ++ ++/* USB host non-Open HCI register, USB_HOST_NON_OHCI, bit definitions. */ ++#define NON_OHCI_ENABLE_PORT1 0x00000001 /* Use USB port 1 for host, not dev */ ++#define NON_OHCI_BYTE_SWAP 0x00000008 /* Swap USB host registers */ ++ ++#define USBH_NON_OHCI ((volatile unsigned long * const) USB_HOST_NON_OHCI) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmTag.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,153 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++//************************************************************************************** ++// File Name : bcmTag.h ++// ++// Description: add tag with validation system to the firmware image file to be uploaded ++// via http ++// ++// Created : 02/28/2002 seanl ++//************************************************************************************** ++ ++#ifndef _BCMTAG_H_ ++#define _BCMTAG_H_ ++ ++ ++#define BCM_SIG_1 "Broadcom Corporation" ++#define BCM_SIG_2 "ver. 2.0" // was "firmware version 2.0" now it is split 6 char out for chip id. ++ ++#define BCM_TAG_VER "6" ++#define BCM_TAG_VER_LAST "26" ++ ++// file tag (head) structure all is in clear text except validationTokens (crc, md5, sha1, etc). Total: 128 unsigned chars ++#define TAG_LEN 256 ++#define TAG_VER_LEN 4 ++#define SIG_LEN 20 ++#define SIG_LEN_2 14 // Original second SIG = 20 is now devided into 14 for SIG_LEN_2 and 6 for CHIP_ID ++#define CHIP_ID_LEN 6 ++#define IMAGE_LEN 10 ++#define ADDRESS_LEN 12 ++#define FLAG_LEN 2 ++#define TOKEN_LEN 20 ++#define BOARD_ID_LEN 16 ++#define RESERVED_LEN (TAG_LEN - TAG_VER_LEN - SIG_LEN - SIG_LEN_2 - CHIP_ID_LEN - BOARD_ID_LEN - \ ++ (4*IMAGE_LEN) - (3*ADDRESS_LEN) - (3*FLAG_LEN) - (2*TOKEN_LEN)) ++ ++ ++// TAG for downloadable image (kernel plus file system) ++typedef struct _FILE_TAG ++{ ++ unsigned char tagVersion[TAG_VER_LEN]; // tag version. Will be 2 here. ++ unsigned char signiture_1[SIG_LEN]; // text line for company info ++ unsigned char signiture_2[SIG_LEN_2]; // additional info (can be version number) ++ unsigned char chipId[CHIP_ID_LEN]; // chip id ++ unsigned char boardId[BOARD_ID_LEN]; // board id ++ unsigned char bigEndian[FLAG_LEN]; // if = 1 - big, = 0 - little endia of the host ++ unsigned char totalImageLen[IMAGE_LEN]; // the sum of all the following length ++ unsigned char cfeAddress[ADDRESS_LEN]; // if non zero, cfe starting address ++ unsigned char cfeLen[IMAGE_LEN]; // if non zero, cfe size in clear ASCII text. ++ unsigned char rootfsAddress[ADDRESS_LEN]; // if non zero, filesystem starting address ++ unsigned char rootfsLen[IMAGE_LEN]; // if non zero, filesystem size in clear ASCII text. ++ unsigned char kernelAddress[ADDRESS_LEN]; // if non zero, kernel starting address ++ unsigned char kernelLen[IMAGE_LEN]; // if non zero, kernel size in clear ASCII text. ++ unsigned char dualImage[FLAG_LEN]; // if 1, dual image ++ unsigned char inactiveLen[FLAG_LEN]; // if 1, the image is INACTIVE; if 0, active ++ unsigned char reserved[RESERVED_LEN]; // reserved for later use ++ unsigned char imageValidationToken[TOKEN_LEN];// image validation token - can be crc, md5, sha; for ++ // now will be 4 unsigned char crc ++ unsigned char tagValidationToken[TOKEN_LEN]; // validation token for tag(from signiture_1 to end of // mageValidationToken) ++} FILE_TAG, *PFILE_TAG; ++ ++#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ ++#define CRC_LEN 4 ++ ++// only included if for bcmTag.exe program ++#ifdef BCMTAG_EXE_USE ++ ++static unsigned long Crc32_table[256] = { ++ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, ++ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, ++ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, ++ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, ++ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, ++ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, ++ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, ++ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, ++ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, ++ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, ++ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, ++ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, ++ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, ++ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, ++ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, ++ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, ++ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, ++ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, ++ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, ++ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, ++ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, ++ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, ++ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, ++ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, ++ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, ++ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, ++ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, ++ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, ++ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, ++ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, ++ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, ++ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, ++ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, ++ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, ++ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, ++ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, ++ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, ++ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, ++ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, ++ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, ++ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, ++ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, ++ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, ++ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, ++ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, ++ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, ++ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, ++ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, ++ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, ++ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, ++ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, ++ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, ++ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, ++ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, ++ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, ++ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, ++ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, ++ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, ++ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, ++ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, ++ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, ++ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, ++ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, ++ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D ++}; ++#endif // BCMTAG_USE ++ ++ ++#endif // _BCMTAG_H_ ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM_INTR_H ++#define __BCM_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_intr.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_intr.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_intr.h> ++#endif ++ ++/* defines */ ++struct pt_regs; ++typedef int (*FN_HANDLER) (int, void *, struct pt_regs *); ++ ++/* prototypes */ ++extern void enable_brcm_irq(unsigned int irq); ++extern void disable_brcm_irq(unsigned int irq); ++extern int request_external_irq(unsigned int irq, ++ FN_HANDLER handler, unsigned long irqflags, ++ const char * devname, void *dev_id); ++extern unsigned int BcmHalMapInterrupt(FN_HANDLER isr, unsigned int param, ++ unsigned int interruptId); ++extern void dump_intr_regs(void); ++ ++/* compatibility definitions */ ++#define BcmHalInterruptEnable(irq) enable_brcm_irq( irq ) ++#define BcmHalInterruptDisable(irq) disable_brcm_irq( irq ) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,34 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM_MAP_PART_H ++#define __BCM_MAP_PART_H ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_map_part.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_map_part.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_map_part.h> ++#endif ++ ++#endif ++ +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmpci.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,87 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++// ++// bcmpci.h - bcm96348 PCI, Cardbus, and PCMCIA definition ++// ++#ifndef BCMPCI_H ++#define BCMPCI_H ++ ++/* Memory window in internal system bus address space */ ++#define BCM_PCI_MEM_BASE 0x08000000 ++/* IO window in internal system bus address space */ ++#define BCM_PCI_IO_BASE 0x0C000000 ++ ++#define BCM_PCI_ADDR_MASK 0x1fffffff ++ ++/* Memory window size (range) */ ++#define BCM_PCI_MEM_SIZE_16MB 0x01000000 ++/* IO window size (range) */ ++#define BCM_PCI_IO_SIZE_64KB 0x00010000 ++ ++/* PCI Configuration and I/O space acesss */ ++#define BCM_PCI_CFG(d, f, o) ( (d << 11) | (f << 8) | (o/4 << 2) ) ++ ++/* fake USB PCI slot */ ++#define USB_HOST_SLOT 9 ++#define USB_BAR0_MEM_SIZE 0x0800 ++ ++#define BCM_HOST_MEM_SPACE1 0x10000000 ++#define BCM_HOST_MEM_SPACE2 0x00000000 ++ ++/* ++ * EBI bus clock is 33MHz and share with PCI bus ++ * each clock cycle is 30ns. ++ */ ++/* attribute memory access wait cnt for 4306 */ ++#define PCMCIA_ATTR_CE_HOLD 3 // data hold time 70ns ++#define PCMCIA_ATTR_CE_SETUP 3 // data setup time 50ns ++#define PCMCIA_ATTR_INACTIVE 6 // time between read/write cycles 180ns. For the total cycle time 600ns (cnt1+cnt2+cnt3+cnt4) ++#define PCMCIA_ATTR_ACTIVE 10 // OE/WE pulse width 300ns ++ ++/* common memory access wait cnt for 4306 */ ++#define PCMCIA_MEM_CE_HOLD 1 // data hold time 30ns ++#define PCMCIA_MEM_CE_SETUP 1 // data setup time 30ns ++#define PCMCIA_MEM_INACTIVE 2 // time between read/write cycles 40ns. For the total cycle time 250ns (cnt1+cnt2+cnt3+cnt4) ++#define PCMCIA_MEM_ACTIVE 5 // OE/WE pulse width 150ns ++ ++#define PCCARD_VCC_MASK 0x00070000 // Mask Reset also ++#define PCCARD_VCC_33V 0x00010000 ++#define PCCARD_VCC_50V 0x00020000 ++ ++typedef enum { ++ MPI_CARDTYPE_NONE, // No Card in slot ++ MPI_CARDTYPE_PCMCIA, // 16-bit PCMCIA card in slot ++ MPI_CARDTYPE_CARDBUS, // 32-bit CardBus card in slot ++} CardType; ++ ++#define CARDBUS_SLOT 0 // Slot 0 is default for CardBus ++ ++#define pcmciaAttrOffset 0x00200000 ++#define pcmciaMemOffset 0x00000000 ++// Needs to be right above PCI I/O space. Give 0x8000 (32K) to PCMCIA. ++#define pcmciaIoOffset (BCM_PCI_IO_BASE + 0x80000) ++// Base Address is that mapped into the MPI ChipSelect registers. ++// UBUS bridge MemoryWindow 0 outputs a 0x00 for the base. ++#define pcmciaBase 0xbf000000 ++#define pcmciaAttr (pcmciaAttrOffset | pcmciaBase) ++#define pcmciaMem (pcmciaMemOffset | pcmciaBase) ++#define pcmciaIo (pcmciaIoOffset | pcmciaBase) ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,163 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++// ++// bcmtypes.h - misc useful typedefs ++// ++#ifndef BCMTYPES_H ++#define BCMTYPES_H ++ ++// These are also defined in typedefs.h in the application area, so I need to ++// protect against re-definition. ++ ++#ifndef _TYPEDEFS_H_ ++typedef unsigned char uint8; ++typedef unsigned short uint16; ++typedef unsigned long uint32; ++typedef signed char int8; ++typedef signed short int16; ++typedef signed long int32; ++#if !defined(__cplusplus) ++typedef int bool; ++#endif ++#endif ++ ++typedef unsigned char byte; ++// typedef unsigned long sem_t; ++ ++typedef unsigned long HANDLE,*PULONG,DWORD,*PDWORD; ++typedef signed long LONG,*PLONG; ++ ++typedef unsigned int *PUINT; ++typedef signed int INT; ++ ++typedef unsigned short *PUSHORT; ++typedef signed short SHORT,*PSHORT; ++typedef unsigned short WORD,*PWORD; ++ ++typedef unsigned char *PUCHAR; ++typedef signed char *PCHAR; ++ ++typedef void *PVOID; ++ ++typedef unsigned char BOOLEAN, *PBOOL, *PBOOLEAN; ++ ++typedef unsigned char BYTE,*PBYTE; ++ ++//#ifndef __GNUC__ ++//The following has been defined in Vxworks internally: vxTypesOld.h ++//redefine under vxworks will cause error ++typedef signed int *PINT; ++ ++typedef signed char INT8; ++typedef signed short INT16; ++typedef signed long INT32; ++ ++typedef unsigned char UINT8; ++typedef unsigned short UINT16; ++typedef unsigned long UINT32; ++ ++typedef unsigned char UCHAR; ++typedef unsigned short USHORT; ++typedef unsigned int UINT; ++typedef unsigned long ULONG; ++ ++typedef void VOID; ++typedef unsigned char BOOL; ++ ++//#endif /* __GNUC__ */ ++ ++ ++// These are also defined in typedefs.h in the application area, so I need to ++// protect against re-definition. ++#ifndef TYPEDEFS_H ++ ++// Maximum and minimum values for a signed 16 bit integer. ++#define MAX_INT16 32767 ++#define MIN_INT16 -32768 ++ ++// Useful for true/false return values. This uses the ++// Taligent notation (k for constant). ++typedef enum ++{ ++ kFalse = 0, ++ kTrue = 1 ++} Bool; ++ ++#endif ++ ++/* macros to protect against unaligned accesses */ ++ ++#if 0 ++/* first arg is an address, second is a value */ ++#define PUT16( a, d ) { \ ++ *((byte *)a) = (byte)((d)>>8); \ ++ *(((byte *)a)+1) = (byte)(d); \ ++} ++ ++#define PUT32( a, d ) { \ ++ *((byte *)a) = (byte)((d)>>24); \ ++ *(((byte *)a)+1) = (byte)((d)>>16); \ ++ *(((byte *)a)+2) = (byte)((d)>>8); \ ++ *(((byte *)a)+3) = (byte)(d); \ ++} ++ ++/* first arg is an address, returns a value */ ++#define GET16( a ) ( \ ++ (*((byte *)a) << 8) | \ ++ (*(((byte *)a)+1)) \ ++) ++ ++#define GET32( a ) ( \ ++ (*((byte *)a) << 24) | \ ++ (*(((byte *)a)+1) << 16) | \ ++ (*(((byte *)a)+2) << 8) | \ ++ (*(((byte *)a)+3)) \ ++) ++#endif ++ ++#ifndef YES ++#define YES 1 ++#endif ++ ++#ifndef NO ++#define NO 0 ++#endif ++ ++#ifndef IN ++#define IN ++#endif ++ ++#ifndef OUT ++#define OUT ++#endif ++ ++#ifndef TRUE ++#define TRUE 1 ++#endif ++ ++#ifndef FALSE ++#define FALSE 0 ++#endif ++ ++#define READ32(addr) (*(volatile UINT32 *)((ULONG)&addr)) ++#define READ16(addr) (*(volatile UINT16 *)((ULONG)&addr)) ++#define READ8(addr) (*(volatile UINT8 *)((ULONG)&addr)) ++ ++#endif +diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h +--- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/board.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,368 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: board.h */ ++/* DATE: 97/02/18 */ ++/* PURPOSE: Board specific information. This module should include */ ++/* all base device addresses and board specific macros. */ ++/* */ ++/***********************************************************************/ ++#ifndef _BOARD_H ++#define _BOARD_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++/*****************************************************************************/ ++/* Misc board definitions */ ++/*****************************************************************************/ ++ ++#define DYING_GASP_API ++ ++/*****************************************************************************/ ++/* Physical Memory Map */ ++/*****************************************************************************/ ++ ++#define PHYS_DRAM_BASE 0x00000000 /* Dynamic RAM Base */ ++#define PHYS_FLASH_BASE 0x1FC00000 /* Flash Memory */ ++ ++/*****************************************************************************/ ++/* Note that the addresses above are physical addresses and that programs */ ++/* have to use converted addresses defined below: */ ++/*****************************************************************************/ ++#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ ++#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ ++#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ ++ ++/*****************************************************************************/ ++/* Select the PLL value to get the desired CPU clock frequency. */ ++/* */ ++/* */ ++/*****************************************************************************/ ++#define FPERIPH 50000000 ++ ++#define ONEK 1024 ++#define BLK64K (64*ONEK) ++#define FLASH45_BLKS_BOOT_ROM 1 ++#define FLASH45_LENGTH_BOOT_ROM (FLASH45_BLKS_BOOT_ROM * BLK64K) ++#define FLASH_RESERVED_AT_END (64*ONEK) /*reserved for PSI, scratch pad*/ ++ ++/*****************************************************************************/ ++/* Note that the addresses above are physical addresses and that programs */ ++/* have to use converted addresses defined below: */ ++/*****************************************************************************/ ++#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ ++#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ ++#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ ++ ++/*****************************************************************************/ ++/* Select the PLL value to get the desired CPU clock frequency. */ ++/* */ ++/* */ ++/*****************************************************************************/ ++#define FPERIPH 50000000 ++ ++#define SDRAM_TYPE_ADDRESS_OFFSET 16 ++#define NVRAM_DATA_OFFSET 0x0580 ++#define NVRAM_DATA_ID 0x0f1e2d3c ++#define BOARD_SDRAM_TYPE *(unsigned long *) \ ++ (FLASH_BASE + SDRAM_TYPE_ADDRESS_OFFSET) ++ ++#define ONEK 1024 ++#define BLK64K (64*ONEK) ++ ++// nvram and psi flash definitions for 45 ++#define FLASH45_LENGTH_NVRAM ONEK // 1k nvram ++#define NVRAM_PSI_DEFAULT 24 // default psi in K byes ++ ++/*****************************************************************************/ ++/* NVRAM Offset and definition */ ++/*****************************************************************************/ ++ ++#define NVRAM_VERSION_NUMBER 2 ++#define NVRAM_VERSION_NUMBER_ADDRESS 0 ++ ++#define NVRAM_BOOTLINE_LEN 256 ++#define NVRAM_BOARD_ID_STRING_LEN 16 ++#define NVRAM_MAC_ADDRESS_LEN 6 ++#define NVRAM_MAC_COUNT_MAX 32 ++ ++/*****************************************************************************/ ++/* Misc Offsets */ ++/*****************************************************************************/ ++ ++#define CFE_VERSION_OFFSET 0x0570 ++#define CFE_VERSION_MARK_SIZE 5 ++#define CFE_VERSION_SIZE 5 ++ ++typedef struct ++{ ++ unsigned long ulVersion; ++ char szBootline[NVRAM_BOOTLINE_LEN]; ++ char szBoardId[NVRAM_BOARD_ID_STRING_LEN]; ++ unsigned long ulReserved1[2]; ++ unsigned long ulNumMacAddrs; ++ unsigned char ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ char chReserved[2]; ++ unsigned long ulCheckSum; ++} NVRAM_DATA, *PNVRAM_DATA; ++ ++ ++/*****************************************************************************/ ++/* board ioctl calls for flash, led and some other utilities */ ++/*****************************************************************************/ ++ ++ ++/* Defines. for board driver */ ++#define BOARD_IOCTL_MAGIC 'B' ++#define BOARD_DRV_MAJOR 206 ++ ++#define MAC_ADDRESS_ANY (unsigned long) -1 ++ ++#define BOARD_IOCTL_FLASH_INIT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 0, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_FLASH_WRITE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 1, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_FLASH_READ \ ++ _IOWR(BOARD_IOCTL_MAGIC, 2, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_NR_PAGES \ ++ _IOWR(BOARD_IOCTL_MAGIC, 3, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_DUMP_ADDR \ ++ _IOWR(BOARD_IOCTL_MAGIC, 4, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_MEMORY \ ++ _IOWR(BOARD_IOCTL_MAGIC, 5, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_MIPS_SOFT_RESET \ ++ _IOWR(BOARD_IOCTL_MAGIC, 6, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_LED_CTRL \ ++ _IOWR(BOARD_IOCTL_MAGIC, 7, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_ID \ ++ _IOWR(BOARD_IOCTL_MAGIC, 8, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 9, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_RELEASE_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 10, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_PSI_SIZE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 11, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_SDRAM_SIZE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 12, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_MONITOR_FD \ ++ _IOWR(BOARD_IOCTL_MAGIC, 13, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_WAKEUP_MONITOR_TASK \ ++ _IOWR(BOARD_IOCTL_MAGIC, 14, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_BOOTLINE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 15, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_BOOTLINE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 16, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_BASE_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 17, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_CHIP_ID \ ++ _IOWR(BOARD_IOCTL_MAGIC, 18, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_NUM_ENET \ ++ _IOWR(BOARD_IOCTL_MAGIC, 19, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_CFE_VER \ ++ _IOWR(BOARD_IOCTL_MAGIC, 20, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_ENET_CFG \ ++ _IOWR(BOARD_IOCTL_MAGIC, 21, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_WLAN_ANT_INUSE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 22, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 23, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 24, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_UNSET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 25, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_SES_LED \ ++ _IOWR(BOARD_IOCTL_MAGIC, 26, BOARD_IOCTL_PARMS) ++ ++ ++// for the action in BOARD_IOCTL_PARMS for flash operation ++typedef enum ++{ ++ PERSISTENT, ++ NVRAM, ++ BCM_IMAGE_CFE, ++ BCM_IMAGE_FS, ++ BCM_IMAGE_KERNEL, ++ BCM_IMAGE_WHOLE, ++ SCRATCH_PAD, ++ FLASH_SIZE, ++} BOARD_IOCTL_ACTION; ++ ++ ++typedef struct boardIoctParms ++{ ++ char *string; ++ char *buf; ++ int strLen; ++ int offset; ++ BOARD_IOCTL_ACTION action; /* flash read/write: nvram, persistent, bcm image */ ++ int result; ++} BOARD_IOCTL_PARMS; ++ ++ ++// LED defines ++typedef enum ++{ ++ kLedAdsl, ++ kLedWireless, ++ kLedUsb, ++ kLedHpna, ++ kLedWanData, ++ kLedPPP, ++ kLedVoip, ++ kLedSes, ++ kLedEnd, // NOTE: Insert the new led name before this one. Alway stay at the end. ++} BOARD_LED_NAME; ++ ++typedef enum ++{ ++ kLedStateOff, /* turn led off */ ++ kLedStateOn, /* turn led on */ ++ kLedStateFail, /* turn led on red */ ++ kLedStateBlinkOnce, /* blink once, ~100ms and ignore the same call during the 100ms period */ ++ kLedStateSlowBlinkContinues, /* slow blink continues at ~600ms interval */ ++ kLedStateFastBlinkContinues, /* fast blink continues at ~200ms interval */ ++} BOARD_LED_STATE; ++ ++ ++// virtual and physical map pair defined in board.c ++typedef struct ledmappair ++{ ++ BOARD_LED_NAME ledName; // virtual led name ++ BOARD_LED_STATE ledInitState; // initial led state when the board boots. ++ unsigned short ledMask; // physical GPIO pin mask ++ unsigned short ledActiveLow; // reset bit to turn on LED ++ unsigned short ledMaskFail; // physical GPIO pin mask for state failure ++ unsigned short ledActiveLowFail;// reset bit to turn on LED ++} LED_MAP_PAIR, *PLED_MAP_PAIR; ++ ++typedef void (*HANDLE_LED_FUNC)(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState); ++ ++/* Flash storage address information that is determined by the flash driver. */ ++typedef struct flashaddrinfo ++{ ++ int flash_persistent_start_blk; ++ int flash_persistent_number_blk; ++ int flash_persistent_length; ++ unsigned long flash_persistent_blk_offset; ++ int flash_scratch_pad_start_blk; // start before psi (SP_BUF_LEN) ++ int flash_scratch_pad_number_blk; ++ int flash_scratch_pad_length; ++ unsigned long flash_scratch_pad_blk_offset; ++ int flash_nvram_start_blk; ++ int flash_nvram_number_blk; ++ int flash_nvram_length; ++ unsigned long flash_nvram_blk_offset; ++} FLASH_ADDR_INFO, *PFLASH_ADDR_INFO; ++ ++// scratch pad defines ++/* SP - Persisten Scratch Pad format: ++ sp header : 32 bytes ++ tokenId-1 : 8 bytes ++ tokenId-1 len : 4 bytes ++ tokenId-1 data ++ .... ++ tokenId-n : 8 bytes ++ tokenId-n len : 4 bytes ++ tokenId-n data ++*/ ++ ++#define MAGIC_NUM_LEN 8 ++#define MAGIC_NUMBER "gOGoBrCm" ++#define TOKEN_NAME_LEN 16 ++#define SP_VERSION 1 ++#define SP_MAX_LEN 8 * 1024 // 8k buf before psi ++#define SP_RESERVERD 16 ++ ++typedef struct _SP_HEADER ++{ ++ char SPMagicNum[MAGIC_NUM_LEN]; // 8 bytes of magic number ++ int SPVersion; // version number ++ int SPUsedLen; // used sp len ++ char SPReserved[SP_RESERVERD]; // reservied, total 32 bytes ++} SP_HEADER, *PSP_HEADER; ++ ++typedef struct _TOKEN_DEF ++{ ++ char tokenName[TOKEN_NAME_LEN]; ++ int tokenLen; ++} SP_TOKEN, *PSP_TOKEN; ++ ++ ++/*****************************************************************************/ ++/* Function Prototypes */ ++/*****************************************************************************/ ++#if !defined(__ASM_ASM_H) ++void dumpaddr( unsigned char *pAddr, int nLen ); ++ ++void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info); ++int kerSysNvRamGet(char *string, int strLen, int offset); ++int kerSysNvRamSet(char *string, int strLen, int offset); ++int kerSysPersistentGet(char *string, int strLen, int offset); ++int kerSysPersistentSet(char *string, int strLen, int offset); ++int kerSysScratchPadGet(char *tokName, char *tokBuf, int tokLen); ++int kerSysScratchPadSet(char *tokName, char *tokBuf, int tokLen); ++int kerSysBcmImageSet( int flash_start_addr, char *string, int size); ++int kerSysGetMacAddress( unsigned char *pucaAddr, unsigned long ulId ); ++int kerSysReleaseMacAddress( unsigned char *pucaAddr ); ++int kerSysGetSdramSize( void ); ++void kerSysGetBootline(char *string, int strLen); ++void kerSysSetBootline(char *string, int strLen); ++void kerSysMipsSoftReset(void); ++void kerSysLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); ++void kerSysLedRegisterHwHandler( BOARD_LED_NAME, HANDLE_LED_FUNC, int ); ++int kerSysFlashSizeGet(void); ++void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context); ++void kerSysDeregisterDyingGaspHandler(char *devname); ++void kerSysWakeupMonitorTask( void ); ++#endif ++ ++#if __cplusplus ++} ++#endif ++ ++#endif /* _BOARD_H */ ++ +diff -urN linux-2.6.8.1/boardparams/bcm963xx/Makefile linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/Makefile +--- linux-2.6.8.1/boardparams/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/Makefile 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,16 @@ ++ ++ifeq ($(CONFIG_MIPS_BRCM),y) ++ ++# Linux ++obj-y += boardparms.o ++EXTRA_CFLAGS += -DCONFIG_BCM9$(BRCM_CHIP) ++-include $(TOPDIR)/Rules.make ++ ++else ++ ++# CFE ++BSPOBJS += boardparms.o ++ ++endif ++ ++ +diff -urN linux-2.6.8.1/boardparams/bcm963xx/boardparms.c linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/boardparms.c +--- linux-2.6.8.1/boardparams/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/boardparms.c 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,2382 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.c ++ * ++ * Description: This file contains the implementation for the BCM63xx board ++ * parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include "boardparms.h" ++ ++/* Defines. */ ++ ++/* Default psi size in K bytes */ ++#define BP_PSI_DEFAULT_SIZE 24 ++ ++/* Typedefs */ ++typedef struct boardparameters ++{ ++ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ ++ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; ++ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; ++ unsigned short usSdramSize; /* SDRAM size and type */ ++ unsigned short usPsiSize; /* persistent storage in K bytes */ ++ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ ++ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ ++ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ ++ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ ++ unsigned short usGpioUartRts; /* GPIO pin or not defined */ ++ unsigned short usGpioUartCts; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ ++ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ ++ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ ++ unsigned short usExtIntrWireless; /* ext intr or not defined */ ++ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ ++ unsigned short usExtIntrHpna; /* ext intr or not defined */ ++ unsigned short usCsHpna; /* chip select not defined */ ++ unsigned short usAntInUseWireless; /* antenna in use or not defined */ ++ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ ++ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ ++ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ ++} BOARD_PARAMETERS, *PBOARD_PARAMETERS; ++ ++/* Variables */ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++static BOARD_PARAMETERS g_bcm96338sv = ++{ ++ "96338SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static BOARD_PARAMETERS g_bcm96338l2m8m = ++{ ++ "96338L-2M-8M", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; ++#endif ++ ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++static BOARD_PARAMETERS g_bcm96345r = ++{ ++ "96345R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw2 = ++{ ++ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold ++ * Reset or RTS. ++ */ ++ "96345GW2", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_GPIO_0_AH, /* usGpioPhySpiSck */ ++ BP_GPIO_4_AH, /* usGpioPhySpiSs */ ++ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ ++ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_GPIO, /* usConfigType */ ++ BP_ENET_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_GPIO_13_AH, /* usGpioUartRts */ ++ BP_GPIO_9_AH, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw = ++{ ++ "96345GW", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_GPIO_10_AH, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_EXT_INTR_3, /* usExtIntrHpna */ ++ BP_CS_1, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96335r = ++{ ++ "96335R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_9_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_8_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_9_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345r0 = ++{ ++ "96345R0", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345rs = ++{ ++ "96345RS", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, ++ &g_bcm96345rs, 0}; ++#endif ++ ++#if defined(_BCM96348_) || defined(CONFIG_BCM96348) ++ ++static BOARD_PARAMETERS g_bcm96348r = ++{ ++ "96348R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348lv = ++{ ++ "96348LV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x02, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_GPIO_5_AL, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw = ++{ ++ "96348GW", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_10 = ++{ ++ "96348GW-10", /* szBoardId */ ++ {{BP_ENET_NO_PHY}, /* ucPhyType */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw_11 = ++{ ++ "96348GW-11", /* szBoardId */ ++ {{BP_ENET_NO_PHY}, /* ucPhyType */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348sv = ++{ ++ "96348SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x1f, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_dualDsp = ++{ ++ "96348GW-DualDSP", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_UNEQUIPPED, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_DSP, /* ucDspType */ ++ 0x01, /* ucDspAddress */ ++ BP_EXT_INTR_3, /* usExtIntrVoip */ ++ BP_UNEQUIPPED , /* usGpioVoipReset */ ++ BP_GPIO_35_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_3}}, /* usCsVoip */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcmCustom_01 = ++{ ++ "BCMCUST_01", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_36_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AL, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, ++ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, ++ &g_bcmCustom_01, 0}; ++#endif ++ ++static PBOARD_PARAMETERS g_pCurrentBp = 0; ++ ++/************************************************************************** ++ * Name : bpstrcmp ++ * ++ * Description: String compare for this file so it does not depend on an OS. ++ * (Linux kernel and CFE share this source file.) ++ * ++ * Parameters : [IN] dest - destination string ++ * [IN] src - source string ++ * ++ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src ++ ***************************************************************************/ ++static int bpstrcmp(const char *dest,const char *src); ++static int bpstrcmp(const char *dest,const char *src) ++{ ++ while (*src && *dest) ++ { ++ if (*dest < *src) return -1; ++ if (*dest > *src) return 1; ++ dest++; ++ src++; ++ } ++ ++ if (*dest && !*src) return 1; ++ if (!*dest && *src) return -1; ++ return 0; ++} /* bpstrcmp */ ++ ++/************************************************************************** ++ * Name : BpGetVoipDspConfig ++ * ++ * Description: Gets the DSP configuration from the board parameter ++ * structure for a given DSP index. ++ * ++ * Parameters : [IN] dspNum - DSP index (number) ++ * ++ * Returns : Pointer to DSP configuration block if found/valid, NULL ++ * otherwise. ++ ***************************************************************************/ ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) ++{ ++ VOIP_DSP_INFO *pDspConfig = 0; ++ int i; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) ++ { ++ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && ++ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) ++ { ++ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; ++ break; ++ } ++ } ++ } ++ ++ return pDspConfig; ++} ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ) ++{ ++ int nRet = BP_BOARD_ID_NOT_FOUND; ++ PBOARD_PARAMETERS *ppBp; ++ ++ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) ++ { ++ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) ++ { ++ g_pCurrentBp = *ppBp; ++ nRet = BP_SUCCESS; ++ break; ++ } ++ } ++ ++ return( nRet ); ++} /* BpSetBoardId */ ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) ++{ ++ PBOARD_PARAMETERS *ppBp; ++ int i; ++ char *src; ++ char *dest; ++ ++ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; ++ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) ++ { ++ dest = pszBoardIds; ++ src = (*ppBp)->szBoardId; ++ while( *src ) ++ *dest++ = *src++; ++ *dest = '\0'; ++ } ++ ++ return( i ); ++} /* BpGetBoardIds */ ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) ++{ ++ int i, nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ { ++ if( i < BP_MAX_ENET_MACS ) ++ { ++ unsigned char *src = (unsigned char *) ++ &g_pCurrentBp->EnetMacInfos[i]; ++ unsigned char *dest = (unsigned char *) pEnetInfos; ++ int len = sizeof(ETHERNET_MAC_INFO); ++ while( len-- ) ++ *dest++ = *src++; ++ } ++ else ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ } ++ ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetEthernetMacInfo */ ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulSdramSize = g_pCurrentBp->usSdramSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulSdramSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetSdramSize */ ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulPsiSize = g_pCurrentBp->usPsiSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulPsiSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPsiSize */ ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; ++ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; ++ ++ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusInner = *pusOuter = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetRj11InnerOuterPairGpios */ ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; ++ ++ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPressAndHoldResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipReset; ++ ++ if( *pusValue != BP_NOT_DEFINED || ++ *pusValue == BP_UNEQUIPPED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipIntr; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipIntrGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPcmciaReset; ++ ++ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPcmciaResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, board id input string does not ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusRts = g_pCurrentBp->usGpioUartRts; ++ *pusCts = g_pCurrentBp->usGpioUartCts; ++ ++ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusRts = *pusCts = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUartRtsCtsGpios */ ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdsl; ++ ++ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdslFail; ++ ++ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWireless; ++ ++ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usAntInUseWireless; ++ ++ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessAntInUse */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; ++ ++ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessSesBtnGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; ++ ++ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedSesWireless; ++ ++ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedUsb; ++ ++ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUsbLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedHpna; ++ ++ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWanData; ++ ++ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWanDataLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPpp; ++ ++ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPppFail; ++ ++ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; ++ ++ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderPowerOn */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; ++ ++ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderAlarmLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; ++ ++ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderResetCfgLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlStop; ++ ++ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderStopLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ * ++ * Note : The VoIP structure would allow for having one LED per DSP ++ * however, the board initialization function assumes only one ++ * LED per functionality (ie one LED for VoIP). Therefore in ++ * order to keep this tidy and simple we do not make usage of the ++ * one-LED-per-DSP function. Instead, we assume that the LED for ++ * VoIP is unique and associated with DSP 0 (always present on ++ * any VoIP platform). If changing this to a LED-per-DSP function ++ * then one need to update the board initialization driver in ++ * bcmdrivers\opensource\char\board\bcm963xx\impl1 ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioLedVoip; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrWireless; ++ ++ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; ++ ++ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslDyingGaspExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usExtIntrVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrHpna; ++ ++ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usCsHpna; ++ ++ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaChipSelect */ ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usCsVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipChipSelect */ ++ +diff -urN linux-2.6.8.1/boardparams/bcm963xx/boardparms.h linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/boardparms.h +--- linux-2.6.8.1/boardparams/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/boardparms.h 2006-06-26 09:07:10.000000000 +0200 +@@ -0,0 +1,766 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.h ++ * ++ * Description: This file contains definitions and function prototypes for ++ * the BCM63xx board parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++#if !defined(_BOARDPARMS_H) ++#define _BOARDPARMS_H ++#define CONFIG_BCM96348 ++#if __cplusplus ++extern "C" { ++#endif ++ ++/* Return codes. */ ++#define BP_SUCCESS 0 ++#define BP_BOARD_ID_NOT_FOUND 1 ++#define BP_VALUE_NOT_DEFINED 2 ++#define BP_BOARD_ID_NOT_SET 3 ++ ++/* Values for BpGetSdramSize. */ ++#define BP_MEMORY_8MB_1_CHIP 0 ++#define BP_MEMORY_16MB_1_CHIP 1 ++#define BP_MEMORY_32MB_1_CHIP 2 ++#define BP_MEMORY_64MB_2_CHIP 3 ++#define BP_MEMORY_32MB_2_CHIP 4 ++#define BP_MEMORY_16MB_2_CHIP 5 ++ ++/* Values for EthernetMacInfo PhyType. */ ++#define BP_ENET_NO_PHY 0 ++#define BP_ENET_INTERNAL_PHY 1 ++#define BP_ENET_EXTERNAL_PHY 2 ++#define BP_ENET_EXTERNAL_SWITCH 3 ++ ++/* Values for EthernetMacInfo Configuration type. */ ++#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ ++#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ ++#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ ++ ++/* Values for EthernetMacInfo Reverse MII. */ ++#define BP_ENET_NO_REVERSE_MII 0 ++#define BP_ENET_REVERSE_MII 1 ++ ++/* Values for VoIPDSPInfo DSPType. */ ++#define BP_VOIP_NO_DSP 0 ++#define BP_VOIP_DSP 1 ++ ++ ++/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ ++#define BP_ACTIVE_MASK 0x8000 ++#define BP_ACTIVE_HIGH 0x0000 ++#define BP_ACTIVE_LOW 0x8000 ++#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) ++#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) ++#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) ++#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) ++#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) ++#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) ++#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) ++#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) ++#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) ++#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) ++#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) ++#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) ++#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) ++#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) ++#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) ++#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) ++#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) ++#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) ++#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) ++#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) ++#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) ++#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) ++#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) ++#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) ++#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) ++#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) ++#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) ++#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) ++#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) ++#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) ++#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) ++#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) ++#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) ++#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) ++#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) ++#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) ++#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) ++#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) ++#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) ++#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) ++#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) ++#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) ++#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) ++#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) ++#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) ++#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) ++#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) ++#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) ++#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) ++#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) ++#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) ++#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) ++#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) ++#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) ++#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) ++#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) ++#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) ++#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) ++#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) ++#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) ++#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) ++#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) ++#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) ++#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) ++#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) ++#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) ++#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) ++#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) ++#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) ++#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) ++#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) ++#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) ++#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) ++#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) ++ ++/* Values for external interrupt assignments. */ ++#define BP_EXT_INTR_0 0 ++#define BP_EXT_INTR_1 1 ++#define BP_EXT_INTR_2 2 ++#define BP_EXT_INTR_3 3 ++ ++/* Values for chip select assignments. */ ++#define BP_CS_0 0 ++#define BP_CS_1 1 ++#define BP_CS_2 2 ++#define BP_CS_3 3 ++ ++/* Value for GPIO and external interrupt fields that are not used. */ ++#define BP_NOT_DEFINED 0xffff ++#define BP_HW_DEFINED 0xfff0 ++#define BP_UNEQUIPPED 0xfff1 ++ ++/* Maximum size of the board id string. */ ++#define BP_BOARD_ID_LEN 16 ++ ++/* Maximum number of Ethernet MACs. */ ++#define BP_MAX_ENET_MACS 2 ++ ++/* Maximum number of VoIP DSPs. */ ++#define BP_MAX_VOIP_DSP 2 ++ ++/* Wireless Antenna Settings. */ ++#define BP_WLAN_ANT_MAIN 0 ++#define BP_WLAN_ANT_AUX 1 ++#define BP_WLAN_ANT_BOTH 3 ++ ++#if !defined(__ASSEMBLER__) ++ ++/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, ++ * then the other fields are not valid. ++ */ ++typedef struct EthernetMacInfo ++{ ++ unsigned char ucPhyType; /* BP_ENET_xxx */ ++ unsigned char ucPhyAddress; /* 0 to 31 */ ++ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ ++ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ ++ unsigned short numSwitchPorts; /* Number of PHY ports */ ++ unsigned short usConfigType; /* Configuration type */ ++ unsigned short usReverseMii; /* Reverse MII */ ++} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; ++ ++ ++/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, ++ * then the other fields are not valid. ++ */ ++typedef struct VoIPDspInfo ++{ ++ unsigned char ucDspType; ++ unsigned char ucDspAddress; ++ unsigned short usExtIntrVoip; ++ unsigned short usGpioVoipReset; ++ unsigned short usGpioVoipIntr; ++ unsigned short usGpioLedVoip; ++ unsigned short usCsVoip; ++ ++} VOIP_DSP_INFO; ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ); ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ); ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ); ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ); ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); ++ ++#endif /* __ASSEMBLER__ */ ++ ++#if __cplusplus ++} ++#endif ++ ++#endif /* _BOARDPARMS_H */ ++ +--- linux-2.6.8.1/scripts/kconfig/mconf.c 2004-08-14 12:54:51.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/scripts/kconfig/mconf.c 2006-06-26 10:07:52.000000000 +0200 +@@ -88,7 +88,7 @@ + static int indent; + static struct termios ios_org; + static int rows = 0, cols = 0; +-static struct menu *current_menu; ++struct menu *current_menu; /* Fails while cross-compiling if keeping static */ + static int child_count; + static int do_resize; + static int single_menu_mode; +--- linux-2.6.8.1/Makefile 2004-08-14 12:55:35.000000000 +0200 ++++ linux-2.6.8.1-brcm63xx/Makefile 2006-06-26 10:43:09.000000000 +0200 +@@ -149,9 +149,7 @@ + # then ARCH is assigned, getting whatever value it gets normally, and + # SUBARCH is subsequently ignored. + +-SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ +- -e s/arm.*/arm/ -e s/sa110/arm/ \ +- -e s/s390x/s390/ -e s/parisc64/parisc/ ) ++SUBARCH := mips + + # Cross compiling and selecting different set of gcc/bin-utils + # --------------------------------------------------------------------------- +@@ -294,7 +292,7 @@ + + NOSTDINC_FLAGS = -nostdinc -iwithprefix include + +-CPPFLAGS := -D__KERNEL__ -Iinclude \ ++CPPFLAGS := -D__KERNEL__ -Iinclude -Ibcmdrivers/opensource/include/bcm963xx/ -Iboardparms/bcm963xx/ -Ibcmdrivers/broadcom/include/bcm963xx/ -Ibcmdrivers/broadcom/char/adsl/bcm96348\ + $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) + + CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ +@@ -405,6 +403,13 @@ + core-y := usr/ + endif # KBUILD_EXTMOD + ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++BRCMDRIVERS_DIR := $(TOPDIR)/bcmdrivers ++export HPATH := $(TOPDIR)/include ++brcmdrivers-y := $(TOPDIR)/boardparms/bcm963xx/ $(BRCMDRIVERS_DIR)/ ++BRCMDRIVERS := $(brcmdrivers-y) ++# CONFIG_MIPS_BRCM End Broadcom changed code. ++ + ifeq ($(dot-config),1) + # In this section, we need .config + +@@ -473,6 +478,10 @@ + # makefile but the arguement can be passed to make if needed. + # + ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++INSTALL_MOD_PATH := $(PROFILE_DIR)/modules ++# CONFIG_MIPS_BRCM End Broadcom changed code. ++ + MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) + export MODLIB + +@@ -480,18 +489,25 @@ + ifeq ($(KBUILD_EXTMOD),) + core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ + ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. + vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ + $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ ++ $(brcmdrivers-y) $(brcmdrivers-m) \ + $(net-y) $(net-m) $(libs-y) $(libs-m))) + + vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ + $(init-n) $(init-) \ + $(core-n) $(core-) $(drivers-n) $(drivers-) \ ++ $(brcmdrivers-n) $(brcmdrivers-) \ + $(net-n) $(net-) $(libs-n) $(libs-)))) ++# CONFIG_MIPS_BRCM End Broadcom changed code. + + init-y := $(patsubst %/, %/built-in.o, $(init-y)) + core-y := $(patsubst %/, %/built-in.o, $(core-y)) + drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++brcmdrivers-y := $(patsubst %/, %/built-in.o, $(brcmdrivers-y)) ++# CONFIG_MIPS_BRCM End Broadcom changed code. + net-y := $(patsubst %/, %/built-in.o, $(net-y)) + libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) + libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) +@@ -507,7 +523,8 @@ + # we cannot yet know if we will need to relink vmlinux. + # So we descend into init/ inside the rule for vmlinux again. + head-y += $(HEAD) +-vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y) ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(brcmdrivers-y) $(net-y) + + quiet_cmd_vmlinux__ = LD $@ + define cmd_vmlinux__ +@@ -516,11 +533,13 @@ + $(core-y) \ + $(libs-y) \ + $(drivers-y) \ ++ $(brcmdrivers-y) \ + $(net-y) \ + --end-group \ + $(filter .tmp_kallsyms%,$^) \ + -o $@ + endef ++# CONFIG_MIPS_BRCM End Broadcom changed code. + + # set -e makes the rule exit immediately on error + +@@ -603,9 +622,12 @@ + $(rule_verify_kallsyms) + endef + +-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++vmlinux: preparebrcmdriver $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE + $(call if_changed_rule,vmlinux) + ++# CONFIG_MIPS_BRCM End Broadcom changed code. ++ + # The actual objects are generated when descending, + # make sure no implicit rule kicks in + +@@ -626,7 +648,13 @@ + # A multi level approach is used. prepare1 is updated first, then prepare0. + # prepare-all is the collection point for the prepare targets. + +-.PHONY: prepare-all prepare prepare0 prepare1 prepare2 ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++.PHONY: prepare-all prepare prepare0 prepare1 prepare2 preparebrcmdriver ++ ++preparebrcmdriver: ++# $(Q)$(MAKE) -C $(BRCMDRIVERS_DIR)/opensource symlinks ++ $(Q)$(MAKE) -C $(BRCMDRIVERS_DIR)/broadcom symlinks ++# CONFIG_MIPS_BRCM End Broadcom changed code. + + # prepare 2 generate Makefile to be placed in output directory, if + # using a seperate output directory. This allows convinient use +@@ -743,7 +771,10 @@ + # Build modules + + .PHONY: modules +-modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++modules: preparebrcmdriver $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) ++#modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) ++# CONFIG_MIPS_BRCM End Broadcom changed code. + @echo ' Building modules, stage 2.'; + $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost + +@@ -754,23 +785,31 @@ + + # Target to install modules + .PHONY: modules_install +-modules_install: _modinst_ _modinst_post ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++#modules_install: _modinst_ _modinst_post ++#We have no need for it "_modinst_post" ++modules_install: _modinst_ ++# CONFIG_MIPS_BRCM End Broadcom changed code. + + .PHONY: _modinst_ + _modinst_: +- @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \ +- echo "Warning: you may need to install module-init-tools"; \ +- echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ +- sleep 1; \ +- fi ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. ++# @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \ ++# echo "Warning: you may need to install module-init-tools"; \ ++# echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ ++# sleep 1; \ ++# fi ++# CONFIG_MIPS_BRCM End Broadcom changed code. + @rm -rf $(MODLIB)/kernel + @rm -f $(MODLIB)/source + @mkdir -p $(MODLIB)/kernel +- @ln -s $(srctree) $(MODLIB)/source +- @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ +- rm -f $(MODLIB)/build ; \ +- ln -s $(objtree) $(MODLIB)/build ; \ +- fi ++# CONFIG_MIPS_BRCM Begin Broadcom changed code ++# @ln -s $(srctree) $(MODLIB)/source ++# @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ ++# rm -f $(MODLIB)/build ; \ ++# ln -s $(objtree) $(MODLIB)/build ; \ ++# fi ++# CONFIG_MIPS_BRCM End Broadcom changed code. + $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst + + # If System.map exists, run depmod. This deliberately does not have a +@@ -853,10 +892,12 @@ + clean: archclean $(clean-dirs) + $(call cmd,rmdirs) + $(call cmd,rmfiles) ++# CONFIG_MIPS_BRCM Begin Broadcom changed code. + @find . $(RCS_FIND_IGNORE) \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ + -type f -print | xargs rm -f ++# CONFIG_MIPS_BRCM End Broadcom changed code. + + # mrproper - Delete all generated files, including .config + # +@@ -883,7 +924,7 @@ + -o -name '.*.rej' -o -size 0 \ + -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ + -type f -print | xargs rm -f +- ++ rm vmlinux.bin vmlinux.lz + + # Packaging of the kernel to various formats + # --------------------------------------------------------------------------- From a7354f6fe4fa24e6e78646aa34e94e7bcd48c22d Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Mon, 26 Jun 2006 12:13:00 +0000 Subject: [PATCH 302/757] Remove built-in.o SVN-Revision: 4085 --- .../target/linux/brcm63xx-2.6/files/built-in.o | Bin 279454 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 openwrt/target/linux/brcm63xx-2.6/files/built-in.o diff --git a/openwrt/target/linux/brcm63xx-2.6/files/built-in.o b/openwrt/target/linux/brcm63xx-2.6/files/built-in.o deleted file mode 100644 index 721d8f9174fc4684d94196823337b037175505c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 279454 zcmd?S4RjpWb?14jx&Smmh%ACFxFx|-H(2<P2`eobagYqg(*{5aj+t4=!#GTao4_Dt zGl^!Fwv~x@*Js@ZDVdwJ0Ep7cnw?C71tE$Vw*cCaZDmKcu#hav8O<(_$4->9&KxYI zShAh7NAXb{#g^6k`@gDcG(qai<K!f>IHyrxuim@we!u(fd-btB`}TUiXN^D4vYc<+ z@V{7{w9vC5S7N~4YH#^&ef!Ie@{N;^J+IULFTDJsS)sV{h-V$TzRzBqTe24;-!hzs zD~lF#?&%rl6Wp7~m2I0@si=D@JCZTu-j?VP*Ne8VHf>pslN>uZ9^{zgxSwM<M>`|F zSu|>vS+{Ke7rZR>?_8R(sq}tr#ztxtJE-gG7>#7YvW<mB^TSmgM>02khx5wNq1&#p zF}uPn49(v$qxyJv-)r<~b!E|3oB9;0pRds;^+A1_O8Rs(>C-K*(x-0qX~?hFfywoS zK7UPp`%(KfIAa}PqT6f$9DtV~tbp?&;iL*at?YO~|9(qlbc|Z+f0!IslH<3N;|t00 z`Q&&kIet7jejz#DPaQuHZfzkfg4^=SA9zdf%fl;Q^d4IIy!YVB=e)BkpY>`h4|-=- zKI1K{eA@e+m9yTxR=Kx0f836M>z3syTPhv1`t3IZ^|ZCle!xU`pYsgIZMkXhmME-$ zJM!x<hv&V+^v1$PZ(4LxU!mC`zdYA%(V_6}l|^s9blmD(x2&A9!peemul#{U90&N7 z!WrAiacE%1TESUslyU9&+^5}ooxc5%>QLLdw{psx=iXQJY{;+J%7VM54E0h@FhuXS z!=>-l>!r`v>-}G}u>XD=j-IfE>Kc6ds0G!>EL;7ObwrO_SUYc4d)k89Gw|e}TSxAR z`uCz|Eu?HfS^g?T$^?|*Z=rZYVD<j{yc4v0!pYi#SM3WW*8@e#8vNPPf4^6aWzIV> zx9C;<nT6tYz6H5*{V(;t<qE5M9<|uHu<TuK<$2z%@H^q^*E6+YI|f!&x4&ng=-*k| zb;-JWPBiKk4@W!db+a?YuJe}j*Gt8r*80nx72DyL3q`+DDc*g|g1(S)$KjLrhr7G1 z{sWsXZOxk3gL2qiodHLbvC5gEzdBr80cSjW=L&e!^QcYrSBg8#x>e`UmU_MGE4Kaa z84F6I^?GivbqZ5=-)60Lf4Cc(qJyY2t#@I#sJfGS|FP;#-V5A&;)D0r|Fh0r-*e$^ z@b;|WrGGDnYgUB+>f!TtO=h*=bQ^kM7~EX0{?9Gi$Q(S98?zm{ZYq-(e;F{tORezI z7ConLzofP}{wv`h-2Zyxx_qM8dEVeCv#vGErT0&twN||gj<<6ZOqb~yIOz~hqD;N+ za1BnthcA3Dfm7jH{h+Pi6#qi2V>)*B)bCP#dRMgf3zcG5!R{IXBTm=uwZr|tZ|i3B zMXxYi{84$?D-0Bc5An0w5l@4+e+kZB;^_JbY)et6mBCe8|6}%ol?RHVU38!0nJ~9d zf5{((UpwjTdz`MXL^r`}g&6jjr|lQ53_sH!$wl0!QnAms+_G=sa;J4Hhi3c&mFX<o z)hg%u`tHk~kJ`<Tw%E2Pi!NwGkF=UMi~K~#Y-BluEY4$hra6w$hu<<gIc-OB?`pvR z9~Vwou<!}W&)C4i?Y5=%+m@@%SV$cm(S7FGqT{LWK#Osh^*Z`r8p(XDK6I#F2fpkl z7cKY6CF`2K+0LG(o#n%pT|R0{wNrL<cG}L;?x0}3d(^U}QS-nRD#>hZ+H7dl{PP^c za{VRU%bK6VmOfn0Oxe);%!B*A^2etjvX#>xb-MSKIhMUCD;+X#h;k}x@5}d=k6l<k zt<x;Qd059r_@VfP<96iZIKLO@TdUgEefsMB1|K}@-W)bz4x2ECO_;+b%wZGeuorXK zg*oiPoa};y#mu_1{j2?7sIRYl#_}Unx^fnO;}P`jr!Chv8sovxEeS5RRPVH<)fw9K z>OZu1hS56b;Nu6zAMj1+SoXokJ1>n7^p8aW?;g%a&^yKncy8e2ondczX6gbQb{1@_ zV40098&=>e{=|3sTP|2O=D|X7*=#9=IfYkc)_e!=%Yyej=S}eb#vFZpHF#%%5qMvI zBk-!uIq*3L4(GsUjAtu==O@7J(8_~W!cGo?^8xT2f%8J-d)ew;wq&al#T@o7%GST# z|Dc7|){V98^!-XKZ^%nW=_ad}K4kUF3)WeB-s&kXBHz4~MGH@zwcM#s+vTS|1E0g+ zekGPu$(m#mo(6~IhCZ}%8NRWhIpCTDE?^%3_6XPuUV~3;82Fz8_5!dw{-7_B_(nWa zJqhgi8n%F5E!(?fPiOal>(AIY@)TB2VJDU>7#j7g1`pI0o&GBfjrvwQj69#MKgPX4 zeOP{*4KMn(WqF6?XM1e5G-lhQ>3V%|6rC$Q&)@7WyEVN>f1s+_V#c;m{+ZbT+dpFg z=TjWBCl5LQ$IngM&g9)Gm6OjlKU%NTRtxnt-+P&RdjA>SPs;s}du`~;Y&2T`q3WF- zPk0Zx1BQ<ax3go|U>{x9$q#sI(~ehv9la7DA9X7);1l}wC|Ca|zaO9<?&aN9e4DyI z1&zxuZt)B98#A~1m9RL6ZlnE3{gz%5uMQ(G34c33wn<mDtAA@f_Kj$)UO&Ifz7bBv zx=PnP+D^SCm3dX3=e<b!l4IFJXT64e=B8}a)frCN+r3N6y<o@p)>tBn0`sZc$#Cr^ zi`2#q_(G`;@V!cJd4B2w9gyM!dVE7Xg3r23b-uyA|95{2eGf#ZR0lblAs5I}0a?0~ z9vDE5o<nwWPHt|;pT_o8zih+R^R`so1J7ve1;1dEEL_LN;jdT!#_ru&kj{^Fimk&d ztJr+>U;h`-HSmde=#BEq>RQYz>yKWNSN{EL;R`?7@k)*3>*N)*0{r&|c!j!SUfKJ4 zc_r|LCkNZB@XBlS{ri6leQ$I0OKG@T(D;z?KlDrPCAK2(Y%=y^<&jvwioVr(Ol;*u zF+zu~a4k8=tyzoUob|UHL4TghTJYxOmMurB$DLoElRnXN>?CFIcY65kut4?EX2V9I z(*#FB?W=CuUtRe;wo2o<M{H!}i#ELSIqcSFv0D#fw?2a%_%wFltmUgu+md9_)*pf= z?=4nuw1*(?=c?y``LB?B;Otto&j=1+kYD;M@^?=@9qZ+LuC|WZ9J+lP{oQHV`88|v zPv(n#@3G9nG$q$8;OKE|;pkVNx1iJPcU52Yds~iluG+ux!R73los+LwJHO?K`ii}K zs&?L-KfJsXb#iim@j?ChXvwzQOd;wUwda@D>?z=DJH2Lq9P6ks=l^bg*Yacb7d(4% z`B7V6{;EwapR;qzU$<{8f6bm*{*pbn_;vdlzpvN+7y7hje^JAx>bO+KF2u+7<bFr0 zr)D3srxLxLo&Bbrh5yPn9v0U*ZupeJzn(pBcb7A->{C{g_i7xS%)N$Bsrr2M1-$W` zkIn!$+1ZeBkJW!De_zl1a>GX`V2^Gz#z)mrJIuL1J7mv6w#%@GQ|RBn@K2(9G(I?- z-wi)aLF?A#$etU)GOM2G@y;hweK>p6LccO!gkFvhXIsEiYhpLc&@6!k*#1zkU=JP7 z$`+=0YvAk|tF1cwYu-A?CY*iqHF1`_SL66ba3))v$`CL<kIalT!>H>yWMd9lnL|G2 zkPmeK0J=ZIk1F6tb<ZIqiCmY}CuHkPwAXWdf&5G&U;Cp;dxBWW1o4cJF<=QAzma$b zl29lzR-O>v;d#Xb-8uIZSIeqhZ13vaqLuMU_9fSkrPt6QPr1wJ&;I0D5+mIC7ttaA zfKUB4HBemk8RKPQ`r&Ug{;~b^Z!+oM0h%|RW4VY^)z7G|Xu>P^e~NKM($~`C*eT)+ z-qb{~x82HjQ05NCes=_xy`#lCdb1Wj&|~(%E(;#O=YOErIxcUof3Npi3kTN-G%|i= zlwYxTr!hBl+`9O?<-LHX7{a%8+zcD=5Erxk2^<GBu9-W|I0t>`?+ANs#`#$pTgVsT zQ~vVBh?oOo%3ge&?&SHE{ipEBricZ!+KBVLPiN74g<@_M|C0Oe9&gVb6E6=J`+R)x z9_pXYN7NIHQ1^11d~o8ZoJaS)<pt3%x2|z+9Me_nz<&V#X~ypqeRvM|HAc(1cGL&g zPC@MizQ559@8_0jMeXPuI;CR~*_U(Z@W%Lq`UX``M10d`PW0Lb^O5iayt)3*Aj4&J zgdy9EKQ{Hb10Hj*+_mIl)$&Dhj$dwa_zav*NZ*V5b-@@z{DSQ%0n<8t%d1`B=~g@a zah*BA=J43mKeZwLRyp9x(#K|5D>V8@-=Mo2XKnPcfv2A_^po1T0L~4XzKwbZ=T3ne zVtP$+@Cv@xE+ZJE_5}-k*)P3`?1f1?0X&n^9lnBJZ=*2uK-RjKd!ccHJH=SI*Reu; zHGSXa(Xo1evQbCi!ynQ~jt0~uT=$Jxwr?D|9nSYA{$B=o^UK^<TMj<zcl~G@+cn|+ z3G9449(@EGpW=$Tqr0g0u13A3*TB_)a5T3F-}{v^gVv&jl?umQIyT|yYKJFiCp_6% z`nh;PKU?E|CbE>!!d8i$VTaOqlyK+pr8>&+|0w<aXAN8-OUM~xv`sj;XpEcSLF3zd z;lBg$-V``EcnMy4t9aA#%B5wY4;)WHKgX}g(yP(`%9Z=D5AaI=r>zjvXh1x$HQ|A@ zj-e(V3PgK&edq%EqmTQ7OVFSDiR@3IM-C$Y2a>)Xaed`p+F$WebSHJ(*`W2V*XV1v z>nk*Hcv@r*L^O<b+~wG@f^>2N)(v^O%+_Q6Ro^e5A9~VmYSa;^e)QL?^<e<`6;n9} zy`D_y6{h$S{OGT@%BBjIM1MJbVH@y>X6Jw<pS=H?G!wm4-zJ)MH`Q?_g+cm0q1l;D zH0yw7;U<~w#<o(->FaaQ>`7?$L_)KtpqcdblWCtFymwN^oiWam{=U8c0VW?8Ua`MF z;rfeyP#F^+PurRPWh(&dcAFmVP2q$#-D<<h7V*_4+PvAxmUs?Wv)1-*S0_9qAHiFt z-W#3n-wFNWekb@=o7l<AywwdI_A2d&2hPC*uZELVbk`8JthDk7W0X&$$Ijw^#kwok zq`Tg}Nq5EebAu0rm*F|hZ%NPll~v(EdL5a}NME6Q#4E$%+qu)0PxUbTCE80D6&$`^ zkKVq`#aBD}#-ZOh^jnO55A=37dfWBa?z-T9f%|yvVX?Eo_zgH5d<Cc1hw(Ru@Hb2F z%pg27knl_yo+*HjbKvGFaPzf<#~U&N&9B=e=bPoDpSGS-|B`oKO+Kzlb(-*V3BBg< zl+;tZgpAbGC;d6QhAg~>j66kuzea!0CH-BezaOE$AECb$`uowOtz6nxA|uyr(g~Y+ zL4B??$@6RVd4T?Q)8Bzh=mqKcRJZI);b_te`!@ACq|docdZB<`aI|-DsbBOl>GKKt zyh>k(=(m%BM3;9r>GI1r(b)M`O*-(h)Q1CB>Er?7Es^_tliWMLLmu;qjv5C4L%>o> z`K`)$+sO+w%v$!RYu{u%ve&vf1}alq1y4;rEM9yl*s3$muSeH2P8qcTUkaJq@TG;L zS@fmk5ga&QR)sGeJ9+sD=EDb=569>8@RhwG=E+OUlM}n}h+li%%#r7rBhNAB(p>c* zbG})A9SOfQ<ijdw8BY*rneyJ!|5;>y0lkXuLa%L-6K~htl9zRJ)YD$2I$<5eL4xWb z&hbm|p{L|SJAI2zTsg(K?|#N2i})L7u+51N5bZSIwNV}@qSvPSKksGL_x=Yx<sDoT z5li8h;l0Ci<ahX#Q+ci{Tx)FeQTiNkeVpq9Tp!_g3)jq7JA3~T)ys92e&4FPIUc3% zHY-<(&GSh{-O%tkintg~XOHtuO6VWQvcTbUZwto>!Nhrs#(TW;F#RoY{6m%DH%WU# zdZzo)O@$}vr`HdkHTwE#bT?xyU?I1`#uK=d=K>#81jnB)SAb)*{)53$CdA5?o4p^v z)}e=RrT6vj!UgZP=-uVJ&?n^0P{+5I&zs$Ip9S}vCjWu=<9W60H>2Yl_nUD5?n3l_ z&CwPK?BfR?2C@;HcQDVERjgO=GVj)rK63~v-&?%!`b076G_P~Y-YdAk<9=RaKFZ!B zUKelZJ$P#XoaGl81CRI*KRh)0@WaGe{LYgWEZz{)zl(8Ng4;~zjKeW=NY=8*7_cuQ z*P<n!7ox60*0v0Audk_GpmLg@rrsWYt^C^gZR6L;uZ!Q6{I1q})b(o#TrOW^v0&Hn z`w3zJNsOTIJm)#uFA--8m#3Lioif|GYHiCO#QzbE7UI6iuLqu=RbE8jO#S7AmJSx) z&!lj1+@kl?uKYHY2TxhiMzj+RMY9;s!>V&X?@KnkuF-hT9z44-fU9GQx#&XEb%ASZ zy0${Gt8CZ%&_%fd@XG-0?UL-H+Xt#^jQ>}iFW|563_cs=eJ0A$S8+@t&V|^6?pm;| zz>%LnMSuicsLcE#I)wZY(UZ9_Uo^#6?z2p#o%hkTah!IJy2*)nMr~66Ht`*O`)zc( zY@$UO^J-(NkvXxz9De$)H}5+5gZKWE-q$<m)kfb{ST>>WQS9ks=-Z8PBKq7LBDM*N z<a2sM@Nfy99%Sx#fVpGlF+AomJmxVxV#OYM*9)b`$r;ml=?L-Q<Jj7}i4V^cFRl_J zK0$oAf((BYpX?*Z<*mrj(Tnx!8TsbVVu$lihT)Hkb*inS>+eo<>b%pbd(o-rQ}pV* z-dkC;VHaZ>eajQ%6L?%tkQX%2zeqgcKJ>vUY~pEb;~8`d`qJs#g+%AyAL|QX-v>Pp zh)*~kgicw>C%8NS?*Eea4(pltEo<%n1{-;}Sw~oTK)&Ip=x0O>us|JC)^%bx{05~S za&gS+cv1&?1HKwo{TIr7>p|@PKwpcE^tIY#Uz=4Fe?l`C7shOo95Zil+Dg#)CEaU! zru;LWwR|Ie2JiWjP06?9D8bKPBr@8T$k?Yiwo<mVNVkaP<(ILqijPKq%QtGoDQb(@ z>)V-!THySCd`|l9WC?ks57-O(7Q}ebec>T~j*VWlsc6(ZdvAVsZmRwWIGl22D8~5_ zaC1<2(mnY23F<!L&Rce#5RZpr^;4>QZq4b(f2#WCzKZT0wQlI+uW)~56_}ECRR2l* z2JFMj#EUgoyj|r4)?(R$lgy{Zcz`yUd<EGnR^K1%e;0#;wyypA$T=CcHs-E7PVTjq zlQ&u`b%)$@x+m2++{?{QS_nVPMmcjiEa1eAi)MGYygHY&aosNRvntr=LaC^CZR|w5 z+UdI+J3wB888!l4oZ^xAMR9&l3`^gK$q)OW%V+s(UU9a{!ALzx{QkV&Yup=+^@#io z;F=Kb?7i;&(|SLpA95NweQ*kWfWOzI4-_|wmboA61G}5p_B^reDtvu{*!FR3U1bj0 zW~}iMe3o11knN1q2X=4ue6#P@{?Mg-Kc@_VMS411B>!iz{u27K9eT;8ZyO=!3fTWI zcmQ2lf0^Tsq0zFbjoMgH(!IuYIVkB|_w}4=-CsgybX5I0_&9)vv$aoH2fQsmKrsWX zI5wq1{vUp)Y$Q6&jRBxh4mliZvc)-MV<PoAlfLHvF57T@2llkh&DZL<`bK{rLYI}H z?+AK$7~Q;)YoeImBQ}msR{slC_!rt9w1qR^;Y6|YC*+iTPjPv2ILO_A7XQd{J8YI% zH}bh(JZ97L=&VX{wwF1aKIZItVt+iNTtZ~T@!?K4H`gyeeHNL+$5Pz1Os<A(eI1$F zYSRN-p~Hc}XU!je7M=Zh#vGrE@lQQ@!*7zjAivvv8!nz~v0ml=SPNF|rm$F>MD~zJ zIL2M8UG5EaRpL3OtZhBGT#DyE1c#pM$o*-5DlE>@_r7E1m2Ne11h@A3GvRLChsNXJ zqzu20!0*HG`z3Q?5+0ZU-%nxZ7)vlm8_(5htj%}^Jb_bu+_u@0<vPteeRLypusLLX zAN=N_r<9Mjk3Mcm^GNzWTz9!Vn_#{J`|jp2H8-F#x^8`6{abzG7xF3aW2=cpH02&i zjuUtXfOj3dYmDgTZBv>_4v<H|b8E_DoTv8VDEz;V-z2~N{0{It$Zv|@VSY#W-9p=& zWAA^bZ8`jdd-|5I&RC#6RgW_ULno3uP2SCmTcRD-lGwzfPLJGJhBHb<H<xsy=8{@q zl&;aH{F<wxN73yqwr{c3jz*^}xO<x4;W%Fhj|+VsMpfe2HdE*w@j)6#aG4>8E30~E z8T*W6JhNlORmqRnT&7JIwx(^$*UVZ+Yi+#6O7F*Rt!cil{*B~a`8vqMi(42+bod3w zqxfO*_&1?zL3Dk+{ZI90bu0+2Oy8vkkq!Ay_K7gCX%~mup<GJkg;pO8lxI*UZb8;g z*su6*je943J1W?vwTILvJ)h3^>KXm{>E#x?b#T%7q~AuTX2HYj>Pz(#*k^LnM3<1< z7xD!UR>67nIR5h<%h;C-yQzQDrpm=!rT#bgK7+!8^3>)}0Mo)m@p{HSw5@r<pR&qu zv3k4hgBK24%eCcb4f>&%?jE()`Qz|OrW-GTl8%1f%j#e0K5xCZhn&A-h2BBz($J}G zHvhQo9J-GQZgf{Oox?TTHb9-!AYZDDpU=Iv>%kdt-aeA4znojMj^z5bq5G5v)^VI; zEB11dV`c~)yTKa+TUA!?4IP3%ll2z0J*~m~dHR=LkGGoo4Fj9C3{-3h{~5z6yn(Z9 zX$_i5KWbgVm@Nr^;god_ei`4{`H{qW`Qto?4w8zr`DyDV=V+*Q%qHBs<LKHk@@SYZ z7ER>O0sBgg>)d*s$PNRj1o!Zu=8!bUmPZDM(B~KBid4T&KUc9Y$Y$4qwN(EY*<?*Y z4W7py4RFknujqUO#*g{jjBTC$5c;!h{{ym{VcaBMYzwCoJWt2DFP-D?1%Fw)Y)s|g zwOi=Zzu?@jp7LCM)mv@2YX*ArM?YJ5t~C#S@=lhzbJRP<J8kgpKD{SB98KHNWgi`v zvBS*!2b@oG%yQh%(anW&et`Pktr+oj@C)ZClGra(9bAv=*(~}#)$P?i7Qr*SHLlfp zYNN23+1#zfRCeH4iZ)}euR0H#-p#5$;BW8h(OMMzLEjEn$Gm}g#z)-u7<W=-p0Njf zG**Vr!60zJz@j;5@WWB*BJTP4Sf0wBY_p?k!=ECa!kn*QV*Hc?M}umQ<3AQoy9$mD zPA{UDvgnF{VT7}@;NlkD!)70i`&3d4#Ko|DbdB&$zI7gWHI~hQ*ITNx<>)xIz5K73 zv;GbG8tb~(lT)E_=tf>@Yy;xFRP-dWaEoG1;<@m{qW^;MmH|J%C|o%BJBhggo8TpH z^OhLyLQy)7{?@~r#QzS*w+=#I=!W8V*8%T48{_N?c7}f4Izqni&~b2n3>_<Zy{Soe za*r~~!Mc@xH*~w&ax#CoEZS5|vR7`glNmcY2<>UJjk)L5_<pOYysO)lYYnJ#A99|` zhm(ighhqKER7YSR&Ii>Qf8NHz-Wtcv?|~cT$qEG~8YX&_u}|73e_s5>e8q-6I7U4g z{2Ioa3)7xrOGlyeL-Gq48!`Rs?AEL1M9S}gj?bZEvhtzi&!R`-xIDB=X(ArM*SH}5 z`+DC^-^-x06gU1+-viEbPS+{_?GgNG<-(!&9IpvCl@mp9ShfXn;bxG_QJa)cfvk-T zA0m(Kl#7|xDU*S=Em_;vN^ai-G;V>$j`mggvv7jwfDbuw@<YV+M(ZyP#{9SQXNWD& z9&+^VhyvnWHx{;%M;+pq@54VoJUig@Ksz#)wHxzW=aJF7zijPyKdyCF7T)1YC&e+R zlYOz=I~*hXz<Ifq(S7JzVri|k`!ac7N3a72VjHmSXRrYW5?Ho^*Ma2uy~*=`#PfUA zS71~8cZ-b`+Eot!^n$!7gEta-l)%eY?EgMn!2V};%vk1HB(*qdnX9ezF7TSUS~}Y+ z9p{IC@_=t0!TYeg-?WFZr4Os^nvTA8>DdnQWre@$8nIG6)6us#=^0o~pM}XY$xhxq zTWCBZ*W10PxaSpmCRkPH{35U(hv%g`{T;q^DYjEF`qt<;@L+4)yE^i2ZL#TH`pG>{ z@2hX>m-?YHychRFNBVKWdrR2&Aod|?hx2fazGbVAVn<Urg>xVI;hx@A8Nn8p?{c`H zd_F1Pq1X}Sw^2SHmlxM{WrBCQwnl|J%6D%nzn${karqt2j>Prv@RRa|P33n`zL1o6 zxJuwp>yI{-@1%T`z~899Gy~3Jcm_9>&ryC*<yD5dU9MqLwzR42<&-U{Y)VVyS$Rhq zJ2b{}8?sD{;5K4{({?#=gemCb=IavsjSo$pB=%c+iP(NdGQ_;VFnZPc-osceSqBA7 znRLEb{L}i*x{K)`6Bmrv5?PQ>zhTqTbru?90%vs*KT5jgCdXUh$z6={@JX!VY+D{! zN2xdBzGy37;2mmn7G6Xb1<qClb_+25l*aSXdzgorVl1FswIjp^){vP;Df<|_^(AEH zaro&xW9+Air949{<<Bo(OG(URgfcFUPdUQ|BymS<s*g?YWGN{w+H#IKW0`y7=r8#+ z1;)i?`m{Ip5tcd5HuVeGCG$J7wtb)GLlz6f#47kG*lYDsb1$36yb@6K`@kzbPjIa9 z@FmCZ8?<M9voJ4RKBu_I{8_E-sJ~PiV|)Qz;ICJBMHjTAGkdrv-$3%7jMtqn8+65S z)|T0x*bYb@DZhhqEj-hhp;ga#yD|3Ux#rbcd45Q3B+qA>#-{(RyWfkxkL<8t*1XF0 zr{s&B9JO}hom;W-isOt^PaE&!A41o0ue*w0nffb~-Ab9ORfe{<_yyuN=z7H~D0fh@ zBc85tPW`K@o3cJ-vnrG5{oiRS_d8AHGV0%^Ixi@z`e?t!mFbJyReSJUunA`8E4e;9 zT<vJ!iubQfae-`{1$SM-Ly8yGr$69&NwFnha=Jf(eZOGm*>~vUe(0OdNjV=rDRZ~e zA=7p@@Mc*9S`obRp%%Hu-tGg|{j>epN7@x`6MFnmaV22N*#hOc@8);82X9`)w<%wu zWAc*I>MvS0Q;6-2bky7{#BSur0H4MrhR>zA%ti4U+I!vcnIEOTDl#v5f;T+oe+o_U zhzMWF=~Y`tp77;r>x}KD?QQbKvD+GdmP8-=J;nKM$r?I$5`DX$=UNZ5kE8Y#IKZ(Z zB+r)fgGipn7L(+YGp>sLcT;Y9c|l{X{Vsk!?ba!`^u5O$?5xyZi1{GY`T*;y#JFu9 zp9p?phj~(vKLkFfR4y5(OjW_Lqpc~H7=BoOt;)&A<(GLqey-?v30pIzcG2O1@WZ*r zCt4HI?Zzj_n_v+itDnHMAD-uuIHNJH+>C=ekzw`!J?P5Oc>bX8dT%h{4Hw6A{BY?w zVd3@q#eYwH@e;9yRbt%_!*jKjN5}{KygddFJ_O%Ah;M!te4mj|j=$ybYzt?Lxf%OY zTRl_6&dGRd%=2~ZcRMn?pSaT>oA8XDnSGq+jLECh9JRjq{=)8%d7<c#H%R>H`+iwG zu;UBh^ND*Nbupk!>2SSH{pc9@vj-oKh)|;QonJzG0na}vUW}i|{v$L!se2{X-pw*E zL%D7E(3$8>#A?PKlFwMEeG)sm7~5HnThKlG%^2G**tN571KvaEqc!J)$nIb5w-k0$ z29uaCmZp=K&>nQsBrzd;zfQAY@UV-|m1y7TJo@!Lm8D-loxm8JyqTN{bn-o4CT=xK z+*vwqU3Qq?LLz&_0Md7;<Inm&><x15)+lzF%?MXcx9s&6`k8}JY@f9bZ`9wAziap= zK}|XVy@O98TQRBl2RKr{+c(8M+Kjd?ihC&L$$jwCn9t~cker%IJZG?ipGAG!b<G@x z))Tq%+?OAgmpn3uNxaqyisJx7j3;m;TwQ=C>S)Fj@9fY!PNsP#8lvB;^J8v~YJPr{ z%E!V!_@)kBTJa;D9TqIt`TdF!J6)#t`<HAoJ%aCth3AvRs)1c=s)%`;e2;wz4{p~r z_Z6>{-y!~VJ~l9EoYTs)F8Q*_vl+by44tYMo0|1kV|q(oxWCoP;74=K@T2Pw`~V#P zUi}+Bh7U@7g?ckKHs7u~BrD9ZJT`~iGRN{TKHNk2a1YKQtHiczbI5CA3(ui1wN^63 zCv&n3Y+Hy``}1qD9hMDV;Jk`$5Kl6G#4Zf04RU@PW6S*Ov7h*`hnIb4Loc$Q(g*4r zJfK|bTQ;t}VcL4bw)Mx@);zlI0D5i`{kIQX9YOycMkh|86Az*Tl@m50`wR^{TVKEi zpGa-+C#0jWsfsfmr+c!&%76H{*;(1(ec0ehp3C;i7HbamK)7nZR{d-6YiDBp_Vbk@ z@t<MU4}E??^_+yq;EkV$_F3r&#}@?`TbLAINDrK3u8?(5PqP0--YfhVbwQ?~2Wa+< z#X#lPx%qmHhv1`?-`|LXf){)X<os#$>CQrh{9NJ``3my0%Dnw9*31;E+6##I9qWCH z(WIR<Y;o-va}V$jyi<<G<G3jEmGBU2Idp#wy5PSvzr>v8n{4ng+sgRVt^Y-jzNnn) ztaVng-;=^8ayi-e$Jq9@#JBk@zD>FQZ-sZt{T|P)3t85+<Tb^;=(BvMe4EaHx7=d~ zRnGY~yO?7crMz@H{pb0ooUC)7_FSAC+1;AR?h$17FtR&^>>fmR4<Nhyk=;pTcOSAl zk;v{*`GfGD#?=u#O5WuK<LiThXOqwK7Gx=E@_7zA*ul}P&nlR*_L+iz@ejFnJ|FQ} zPdO9PK`J}{9&|Z+&(X2W7zSIV{3zjC{S!^!LLMXf^Lq|I)Z0fchUS2|_ifp%xJ}lR zpbs|W9RE6=_uMBK>GwtcyIDiu4EzK0p|lpPQ2HwVL1$P=_I_D~W&_YHLa!*!sl56; z&sg&mR;tj|X25%8p~xOFw}>X4AlJ>WgMV_hV8(EUvGRz05PyU5J~flyvAsUDmwCn8 z@O4jzQ8<yr+K!vS>u$|8!u7N8ty#;P{9MHf%fz#E&HGn58JjV?zQwk~!_rs5NE>_g zJX?Pr*^!?d>Ymp&4CntOnW>6%1JAStZrx$qPy1ZEJtt<l53hyftcUQ)xZ{6#hW2lm zMZ0nQHO6biXXEQ6N8r`gcgAbj;#`2dcwhF&>BaMQt*zpN;=6Dyf3t7+X=1^|S-1|l zhOf)T>i>+4w^{p+g2nTe*tT9a?qTlpa&Jq1cXh21OTL0~TbP#&++6aw^XU#lgPq)W zaVW)B&{^9R*KvLt*Wzu-0)4t)_sPwAHhNrs+RiiZbzU$5kM`#AZERRE+s1rzlRZ^@ zDz(e5f3`4Ov;}k+8jQZs%s_D-J*mDeoL3*~6*oV;ZXFBUherDod(E2Bva{Ek!_BP6 zv3Un(^3SyeF0n_rNsJ#W^qKmj<HWMlydBnJBCq33@><v=zh$l;YkEG#^%DJaa|y1# zR^`gN*pd8&=S081%Qmqh?N(vUX{)utuj88Ujvi<4x+xpyw-o#z_3z`eGe&e}wo~RX zW&EVfVV?g$&)xeo_9V|*+_Q>3wp6h{;`ao&dy;Z5g1aRC>DK8!h5T#YHrCNeoKbl! zjF}|2t$vwt<|y(ux)D3lJ>+8>^AlMg{Y$%^@>Af!Y-2nQK9>t_e4%#(Cu3G9lE3m@ z<+04hdO>ptg{1zCI8WSOx86~?<udtxuM#(L_U6Biez^UZ(7P_)3thUA7fZ&l8dnfc zns@fh<+d<(aJXlkG<)ort>%k<nBO|gJBmkzC#}<_EA7P8yumf)MaH%dI%Swythk)2 z_c*^o{(^AaP3$R;O>fA41{xAmMLu%BYpbk*yg26s_$rQHV)%&lKsUkXV9U6*JkrC8 z?RkS=vhB>PZWX_>@7VX@N7-$cTTlCW*FOE9Lk64LUW0$L#M3k;_Xek_gEi~UwkPvu z(YVts%Bjz&PT>7B=UW|$%hUH4!4No#bq#YiE^gKAn@H}#dEsK5gJ<OuttPm~HW<9D zTs8FaleDL}Zu{Ud{N=COllN$Rl_6g}F!a^E#icd-quQhPSeEIvrN`_Ebnkb;h4Sbm z8}VE)_)qN2MgB!*-O*rxxv#n<IUnF+oHnUHUnEC&iMqRLr-}KJKdJII6&B<2VP#Nx zO5=IO3Q%(e#>40j@FaBbUSEy96?KdP^ahzR?)?gO<%~*9V4vvcj6Ej$<tD7n<&qq; zCxAiY%(R}L!iGIbe#l>e52s_i0)9f%UqiQ6xCzfBy8I|Ok8?0vt%lw3mVG;lj_z*K z*+cZpjU{=ewUUZu<v9++5&^#!ey!Y-uhzjY<fr`2SIk>mHm{psfnUT=a|SWbt;crg z9~i9hoKft5G~%w}=aiSDAS}acP7f2a<jQ_|xyLJ<?16^xg5oCd!2LseCTwWWyNFMD zg(&kpghIcM;uMWlq7gr|p$RK9U8=mXvg}Rm10ec#^J_OVZaIQ{A`62v<g%1qj+VwO zI26=DE-38}j_f4A3jOf*50&gBJl{9!M}1>H7CcXW)iw1Y@*{mejB3-26Jywj7o#7j zrvX3E1Ajm8Gk+K|mI2NLzPI1}vkpd$7X+t+{|&+_IAa}V<z|?cNBtagYl^GL*V)zt z*Raa#8XU4uB=M3M-mLD=MqYvYFE1Cof`g0a@Y^NF5|Ta5VZncjZN_=L>3$7b=c@Jk z%Hu_U0S9{vppzKa+v<YmtM+MZ9^H=Y;Fm=wh@Y>4H+;?4Ij86L5CQfyZ()n%j=7L@ zjNhVb=%PF-mp`Oy)~AY(TCmfsr9&>kpJI=SS@r(``VIY|@fXga0e?8hx=5_gE`Onc zC&!l-6jq@tcAvNc@6WMDM0H4yH{M<3-7-0m_<<Vx2@k-VjgAw0oyG^c4|~R#R`WK% zk!5V*=3ATTA%4tS*CDkZT~7R-BlLK!yx%f3xp3YvwHGlhyqFf~wbgq?3*sS)J$v2s zbw6FVS^q*miu@ebCXin<TE-&hE7iThzUrP}ygD9~@tGOJ1{2j^4GvTf1(S9gc-V_R z%?zOROUx1uLxFPHPJxHV!0)$)i=JQBoWR4gTWoc<-CmmA>e+0E-8y@jeZ*R?H)|uT zn|&wR@>;Vekd6DpqSrT3^lqFidPfcvy_u<^cj`z{ZS`#<|BbqqscV_KmZ@u*x|XTS zXZ+x;l9QbEw5RSH;jfEgxSdnzkY^aTt<pbeDmtTA8g?MTS!^Q%uN%63%`d<=8LwM8 zX-)>lPHfdZX!we@6WU#vD|<WZhsd?$eJ{2}<nF9lY3KtbBR^Cb=WhiR%bm72Ew?Z> z^U;|z_!g4=8FI4ttDg76p+oO{-w?c3<6N*TOry6%*CcPs#fc6>%jqEJ%5kJm<jTIO zt2Pr1ZmQSC;Z-kljV}}9j8yMQ{D=mh1ci#t!1u?3T&=A4DM#+AtB-raNrJO-s*^@C zPd+(x=*j<R?AHyBSicUguoall5ct-xql({ziSCKVcrkD1=5I%)w#GOTzU)5~fQJ3Q zKTx)zLnX7Ba)0z|zD3i1fn-MFj1%Zx^!;V#;cvX%_D*gEo{s9%L81C=U=Q?o2Z<2| zL-=J6><S8sDcHM^!%SA|IdXb-$3UQUmY(fXu34#KKH;Ceq4qfGwe!Qhz}#<74@VF5 z2Z}caDhKcPKEQk6zJ)ahFO`U&4~{}BNy{O(SG9C@AiCW#YTBFCdw?UbO@=?`#;d;G z4T+C~qg?ne;<AbDa{I~&M>tUUjrghO1EWuY+aq*Bbc$iAtp|hbPqdLEM;Y;h<AV>x zd|>0UZ;lUS(_V>A&_{c#hil8kyqf6K7^AKLXTuIu$cvt~f?1_FKSMvt#7q_#mw$pB zp5K3+`$~PKu}`+M1MJO|>ivudP2sT>N0&rSg-h;z9(LBV&qYAXFQaSW@D*X6;l&Db zSAwyru2~;lSvI1j1;zP<8#e}2JM!0fUfA^9+1KQGf#=byJdaYCz-uGkAbRRAJvu!B zodq9us)Xz#=U6a&-^EtOqP}J4&szZQ-P#ZGU0UW?<4nw>g=gApe|Ry2FG_wW*Ln7L z4bdB024}n-z=rRD^i|^KvX<Wh|F)n{oZO=e$al$WK41Q;a_w7KFVf&;y)Rg2W84gJ z{dVMii>{-<yy_@$YwSgAlxM8d^}5j=@>c@w|1SRLyhSpDTqyrU^FeLVO#LPCDA$V1 zW^@f4H&RcgNsicuwEkDBhjNmo?XqvWH#9maS}CSnqI`)t1(&Z!9sdXz2IOB$uS=F_ zcZ+hTbgp}%zxoNhf%KAKSZ0DS(dQfE(Dis6T3T~`Ya#YET4hc`aS)x?Dt3Uj)o(qU z;o1J=*$mJ2H$7Y9nTwxLPUFhM8_&pNn;{p$)w#px*;LarwRbRiruGgtp3w`Q9dXY% z=h+eIQt=u5^qgQ`N%Sf3VLKQv3--nsEPosErUS@MtNN1Et92xCKQ_wEQEq=yE}frK zxwuao<^DD04kzW-HtI|Iw^8mC<)-3tjk##*+Y$G5quc|OJD8N)fG_R$M!AP5cLcis z?<(7A&=efRbQb+D)(hZ4Is1$u^XQQLmwEpd_^8$4Z;CM}dEB|1d6jp;>n$-}!S`1f z+x!;$#`Rb*f1`QxW9H9KSZ014pfcEtww;<s#fyBWiv?SNdqE6%X%QShGu#WG6>9&^ zY>D-)%p(T1RqME87q+JdTW|<jK<*ykT<tx;edsvA8oP7Mu|3Hgo7Ox$Ozi9-^uX8f z)0KCyO5El_=zNxOamd^~xq8oQzFl#ftYT_T#@@@i$KPZwQFCDE2jplOz4Wz{*hBF? z*Fc4gBTu{+IC+k9_D)G|P7)J7iTokg8S?hcvZzp><>;)zp^v^>(}|x~x|JNn5;1uC z@3obCf99Bz$!-1=@zcwh+eZF;d^pxepK<gVJF^uZekAt`7WNIeeF)G+SNs&YcO!!3 z<Q~_LA%6is4ISfGE)`q8;;>*}<eMlN>h=r6#s04_R#~GjkMjOw#AseAuW-ZmxNkJn z&O7`RG|vwV;EH+Xo~GQw9>(_r=*b(%-6hxZfiCEDIr|3+cYB;~^E&b#>R(~K{Tapx zF7KhsO#2yqZNx{H?e(qyza&@TG5Y%`y5Kx9A^cnQ1GsE<FLvxkZvdR;85>RdQ=4)Q zxW>l5TF${Wg83C`!uuQfrfw}I%wY=5o7$4@!A8Ayz5!*Ee1pGIdA;A?ly4wBv1ald zbAnGYC-?+&f{!sbwmOGg5I=kf|MEfX|5?co{?b#(Pn<iS?jNiCdF9SO3TTR}RZbMc zDf=gimmvpylf-Tk-0+U(XaeL26@ZSKgs=Vj4+rt>WHTu1<~(c_zUI8kcX^5d<Gm^A zTJB+2Huekj%bEkZ;#<T!rzo3_;SW-lF~o)CD05Kd*-yZ&i4i<myYd?467uX8?6|YX z4!32^A2psG;aQ}2fg{V>9``Mu>NI+Uy6#4v?mx>mta1K0`8HR4=l(^@C38aZLAMRy zhXRw!)leU}=f)hg@n&eRHA@#<bN@<W_Uv2Wj{B42VeTD)zt0JFz2{`N43D5&q2Wb& z`3b#B=w;<1T5~QUx>;khFgk7l#*IJr+`Ys-)uE^9QS%mN_@cZ=y+*&<b*^~gz?yuK zcz#3u%&iHhvISSZ8#}-p+?C^sExEdYnR^-P2xM!uS2;Ez2;S$u!4a3iPB<S<^8rn9 zbdAlUdD@KEiCN$EagH{yWPI=;ya?vjV*N$%azSo35U2iPL1ogv3)<lw*?8#=7q1`3 z{<7zTcthV;Ftq``qSip`J$`n1H2&t3>Y5#Aty*K>7XN^*<FfHyU(xaAd)~b2<lg)& zbub2G{=^*_eo@yX-+0PYWc!NCe&FV#iG|oQdfe%?_&i-xuKVf!2s(HB#U|z5KDEiY z>sNA~YpN$*53hH-o9??@!lXQLL*R|uZH8yC=|1cG8)e*nK}q>x^=&gfkbN)VQ?=tM zW(X~wV_da+g>i@IU=^qP+J(ot84LLyjp1kb;JJ{}1$0TCStA^Or=&_-X6WBZw>}CS zV~@+Wleqp3ksoRds&C(H!8d2z$2EM4ui)8X#(O-2k6%)qjHiQHbhx8aVCPi7+F7QL z#Qwk47ZTe_#z(f$;4PP{<ak!RB>trz=#i_$Pr^?OAAFp^$2^MDUw!0zUN>qtNRCuD za&$x2D0|3Ik8~RPxZy`jFg2f(!l&o-2RvNWrG9P3b&6+)-vxMhl{JFoSgCK4Y05L| zd(&D{PJMWaJ}7U%t&MVU!;>yXNqOOSHY5HuPc|Jrzjg37@Y|}G-o}`q4_)9>p7nAD z-q1H!{WrBy<bI+4Jbmn--Nqiv>70(@rjjG|QT3^9bZz=Q7kI&Jb%tkS=B*z?svF-( zfQDw<Y2&|FnX*6i>fbSe<~80gds8OgI{kiuUE&)i-BaoOh-%)@iQs7!8V^f1%#L{m z&W50O3A~LED~gQqCo<p>C(xc9DgXYD@tCV(w#V^e$y)Nns9&j{_4<YVOuq$j)gK6! z*X}3!^>y}>bxeW!A-)hDbxuDD$j?88AJvb7`jPHopSA8S8spi`*oI7gRY&F*7=7kf zhem(yKiRZh;do~+`qO{+Cx%8J_?Ih-8#;#bg6hR530D@JFA>G@tZQd%&p^9<30{L& z1rPfGIX!hDFANmdz?=JC2K>0e3k@7OS$;JfIX>3+GI;;>@B%n$5xgmmq!-d_eLn?U z1;UBs!frazu5<W&1o<7FgFoh)_S=&@N<Y9aIqhSkb<5%z@eX5`I;-2;#XHr-*fvy` zlJ(HXpb1zO{RKy@64NEok8U39Qv4L-%DnRz;3}1y?g`QSwQ*(M>&2DoLw2N(TpTIU zTX}F0rn*KrPi3$C@hLGL8b1E1jQArdbIowkuGT%3b2<wBfmc<YJBI!mhYyv@$B})h zLh`VwYhX1uMULyb_M;D{9ZxRW73dd_y`(~ZIk*Phcm0g;XpghE33Vp0IXhP!<397# zx+i-qS$$1@AC-QtzlbiQ%ZkrlF=NNjyW`=m0iLNYtp#$j@rzs+R8BGi4{W|3^;~)8 z5eA~bDuNxo=sEpJ4s<gQG0xU}k|!R5KYlX0E%pVPWX83#MqJB|g}vvA>AHRRkA=jZ zyT4+7es?*59v?RkTwnY>Eb;(md52gm_8LCmT(r@e&Xk7s@j`F;_|ye-ga*uUrFJ3d zCwM^i0?iRGhpZuSzK%uJ1ZL+u`0R(enRk-wghmZ}JA#dw?MDYEHW!)dCI)}NR?)%i z+ow3HY(4V1+ba0H-^Cw`VqF&<$5?2U_GH3C97i(fG5Bfd5PFQ5`|K`c)A7p3XZ&z} zYwbh+LETIB8vE?uTAL=vc8c}!)az(TAFIdwgX$aWwLcn{heq75P5Z}nP0alO=O^?I zaNH_B6b_iXMX&h>=>LU&>{P?oC~VN1TrqOeqT4S`@71N4-s_9a^nNqm_p8&JxO4|` zkOsYLoWE{*uPW9Y|2f&=^i_DZB|1)w+c#hRhp&hglS_XwtzF()j9chYnJ8+#adac` zdX2Q0TdO|JT&47Y=Gpwxs$?JjV}HXs`*NTIM9)WMmtuQVI}gp)W7|^Q6U$HSTjY*C z=i(2@?)5Xax72Q@V>`t9NxJ29dP9ftP0#06?qgrl(_UfaelL>W%C{!Fon3pxbG9OC ziFr-;*sCvj*Nger`MMPXKa4FH|A}|S$HIktNn|A1*I=O77sO)+mF?T%Jtf{&IlsVs zA8S_C&o1`a)S98bASk(KDjNioP3K3O&gau}>1+Agx<<!L^3H?M!L2zu&6Zw^*7A;J z3(hu`DRcb-<;crvyvMy3{o>sECcib2*#dmv)=^1M{r{-XPiX!Rd!N^LC>h7zGBjG2 zzADtlGHCXB`Q#h>t|Ym;qKV=S_(!4WqCYr2Yvn?*D*b|QoQ``{HfvX3rSh}mEyHPS zgP1{gT4uT2GTb)_-!Q+R@~TtgXvWMh^@ZNx?09gN_XZWinH>vWAf9tAJoP+$xt(zm zdyJonY-S;v9Sw%$$429P^Rq%M^q57JX^!M;`_aH|X1{k(ep2~if|>IBo66_<PF+-< zby*wb>Bn^Z9&4CcKO^{~z<U8#8&3(C*<bHE)(SCR`ZHa-evHTb-ZvieI!DLn9OsjM zxp%=w182+S;4H8`2u|JD!Y@~pE9sukI{ptHWULa*`oV*=^*3sZx?Z5qm#XUp>Uxp7 zwrr~BMdakgq@EYkdeCpL_{|yVm_%NNoxEtSmoX$f66*zYhU;?_IQb><>u6so>3@{U zdI3N5<$=x~YwPRro(d<er7wK>YkDu?l~3t@Tu-c5*fZAY8ji9(jWOp1vir9K%m4XC zVM%l27)PP&uTcDam*!~6mGk9qF?Suru_kX_w!gL(`(B0(#dgAvF^+4e65FJ;N}u4q z?8=u*yK}3o^IAa8crL#R8+#d!QoFU4$~-UL(PNX=TB>lqOGoJ5s_}sEslTjU15aU} z_y8Wb44ZSLq3OmxB<KX_>h>Z@+tMBZqPIp<@?n7G?dl6L%Sm{zRrSyIH1Tl(JzcQ< zorJ%z34=}kOocagnLl5ld>}dU(H+Ekv?fEbxPUdY`=w7bui$v2Tq;t}7LDB_<|KtX z-knrFvQ6X5jPt#LRhO?k$o#}D;-yRIs4c2fI*L4?Nsb+An>|kU$GmsVxZY9S;O3$j zrf8J#obvLY6HUO8993{iUes~#sp<^lgJ+@39%~(Z8k(=h@b~uV+tb(lnw87Sk^dfL z<wtJD|GM)Po8pVr8TbU7q*%7<r`|U7q}%gTb@v6Cz)$I0X8yC_{D2GmvnDxdjO{ds zAm7H(aoYN^tuEe88}ot@I`nX_J=&}I34ME))vE9+@4eyqmfF+gMg-|Nk?${S%^hve z&$#(n#iD)i=5oVmH!#tdd&|C5sEY-;v076+Mm|c3xiQU`J%&H>Fg8qcW>12@RjrGN zza6?D9z`cs91p2)Su0%TBV%d*fu)Qt&qOD&KcVPI+sD0i`LVMz;D}f<xy7279^!r+ zTiolHG@fIv>B8&6$)@jw`&00Bg)#bRw-1Jk=LtuQ1GN8ap1inhIOg`2@z~R%EFP6? zHRs!)C*mBA9_%XR!IyM_%Oj$XndM#N3G|R7eb}2<TgoYp<w$#57vOv3ccK2c*0Bp8 z@Zyuqvpm5(%VTrkkhs9ZjENsgc;}oO+krpvz2kX!k?$^pFLF=B^Nhb7&mY;~d0W?< zNTJ`#6UED|iRa<bq+aK1iY}Y^UVQ0v*7|%=^ONvJ3At})e3t6HL9SU-N<3%`zTC7A zMc=jdpmc@DTp{z0FI3M{=4p8M8RiPvZv+_)Yw&Xoey%ZpSY!S$_Z%=jj=nul8R$XT zfHGOiSSR+Aasg`-9`Xto_@w)UdvN_AI_sfL@HEyQ82ShtUm%xOY2ZQr=M&&S-%4`d z8v(~d!a<ewII3TImpKgS(e_zid9dhU{=n~9?qyaMtk4(5`Ug5(4j(~e{?HMW?XvQ` z;-juE@yW`fa*hhKE2or8!v4qNy9{$`%ooYdN)PJ&+L*pUUick!ZCU)U*x?{^;^?qH z=beJ?i$C$PZfWLE`To>Vi21a#=3t>d=!hTF@Dp8LiTrJqr=9!sj$d~Cc&YD?499$^ z`6&2+aY=%=f_zoSN9p$@H`bYz<lpw~k9`QO(bqg%#Jsa|K!K;2>Qj!b;Ofor)kg#` z*Ma0@_Qn?G3tGy)Np6{cF2_1uIP5g`W9B|IVGfoxt*K4f!yK&2PbKzip_KA*OIn_? z)E~=sqPJhs_e$hNe%BKkPmvoCe>bzapUJ*qvF;;ULSLgh@v#>9KDzczD=?OWf5eM@ zhtP4;4u{?#dDh{Ld<)_bdl0NLXLg^~Zxyc>9ULCCZc%vn0C<=N5A;cW=zG8W4us<q z>J7j}r`}OJ4o?elZm!CL=XS?~;3@65?x*c2PRaRB;Pevu|9!&6tsA)Tmi`uT;o3=X z@!mIr3vwul?~wC*=!K!7QIx|vdW$h!{}=xHp--O5zW<Yp*<W6HFk6~?Fnd6;ALMxZ z%BgIQao_VRpUV#0*xBf=#q6QJyX*DqPWZO+#cX+HF-sgcJHGPy?8wSzvwXWX%QxM! zd^0M`zMNTP?)l=%ec630r?c#XpWVN*kj)eF+7tQC4o!Y&rr^)5NzSCh87mzp&TuNb zuYXBC7V$3lkGP3%?`4u`m81UJ@Ml{k-T6-O9x!%yR_unk#q4Be;h|#m^YxcL^j_*c zo9!Oq+a`UVrT$6wTOO@!^*i%@YR`_{3$Ni*PNAn`+tIbW$oOJPGML8vn7>=oK2-w_ zHt8SucbmqTE^hHO`6}8k{b;zmc9^l<U!yw@F;B!?nBC*}_CNcR^Sj{LKc~OIFu$v- zT>n$fC%N~n56x7R$Id)+&$aX+?~aRE>00no@r4KBK<zm>gbtz!`?*JIUwxPT0!Hlf z28_Iyw_DvD%^q-)x1Gd+7l{qFEEs!Ug?{fqFZW&kCVD)ywGwe=LLubxrfUvtEsT`c zqcH~cg?&91sjmyC&=VQ_u3Z+@$d~8Yk=ie_kJ~u5a?ElI*g$?+ep~sqQ>Fv|K4eXQ zP^&QaNW0j9$)y?V5d3pX+5O<_i~g-{&;G9qUhq(!gQwL0DtKkw(8l>B{lqTBx{z}F zs9Ug23ODGEEjCpVE?k+}AdbbwV^{f2@fcY3ySm}sIe2yszMg|`;d#E%m*pFgS-wM` z<vaA*g5;zB3)u<u=^65_Ch#Liu)Rar-TmZaO_Gnb4;?#>k6Fep4`V}0$vDW@elOCo z*wG(q52D1E)E+zEM`knHBN*Rsvbu(@!@qdd{G`M;#Lv^d=$>%U_nYi_dMLS`dU4D0 zG<vuB`h1cHep}hl<MYT7-&6<+_pDjhNGm$v_;|Ut7(_#lj{gcWhxQh~)PFd%RyOAK z^$YNIw@0Hb>@CM!9Jp@v>OX}4;(YM2GT#QkUk|lzw9S=ao}jnJIpy4%P~_Gd8oT}X z%qm6b;PDL!wehmfNBo!TL&RX5KBBHo^^l|7Tu;1CAsTH}xobAVbMjFuAT#o98DE|$ zo<wG&%RTbg$pXU{A@;M?lmW{=?pU!^9Y-=ZeTVbP(4pI|QJkFbeQ++F1FT=Q?!FIt zPr+6A&pSr>mC=X2Zm-ls;Ac7rpnC}YbI#Twi#N1dU27AhE7U)ym++UYyg)7!I*7O? zJow!{);zLjPy0RiljP$bxaXX8-t$%3EuSgcp)*@Yc97>jUTE+8&7ichWCL&SrTKMy z1o;N<nUBYGla+Szum<}6r(iO(8tVbd6{HLL4#%-0u0wt$za0DY+@Gi2j;OV@JUGp~ z#dL{1)hc#+x@831ZC{*jd58Q!Yw0FZ1+FsP8KzXWl=jr?CwX?yA<8kgN1S4`G;a0N zT$9`Lf_twuha$>lf+QBDvZZOt#yJb@FPbl_4!tAaQ15hA>}~!!dtHFXdw>Dhw&5$~ zR8Bg%@8;kv*Nq&HzV`<Y;)l9#h;d(YySs$jxkbJ^w<^3Birm*a2yBw#=I$FB8}Hvt zy!ZXVi+b15X2E^aqf>Q=u8vost>%aNJ_`*lkDzl#^Z0Hr_aV&{jk3Sx%^BA5XF{Ik zYEv2f-d(@QJvTlR3|#+`U%_^6?9H{GT(wDZ)%KCAHZh03U<_4e40WlwRr#vtT)b62 z8@`(CH2Oy0V08QESI084hpbiG`X6li-bg;JlOf8Hqfv%(zpA*Q{13$~Z|I5lU-C!u z#T$?jp0_I2S)C>~T;qdsYU|9d>(TeE+0!PhjCNW5yLy-Yth+emDEXYJ?meYkqu+Du z<*;|5>_&7mxLF`K0vh1E!4F+)3yW^78qSYm4;ES55I<vm!kg0kVU1-)Gd;&P#QAnS zPxE}0-yX8pVHVs6X&LJ4;Jn>E<GV|xQ9H-AzVD#?Hs+qmlRxEh@v_9BI_8$BgFJZ3 zZI{gZqm1px`6f;!-osD)pue=QDvQkf@VN(UA$13X$H?CyXOFn@Wwk}q9;X%b9r^?` z&lGkUYh(QJ0`od0jWJwoQnov-vkFf-{4K!S&_`|dGk!uJ{yx`7vljibV3@rS&*VEb z<GB<?UyAX(uz-DCps%a4p_UWO#3RT@v+boDZ9CT;$Vl7W$4uXPVjT+dh);L-X#M-N zbyaPR+!SO~NASje+tF3zGH;o?k2!t6&CwQH762Q%A|KIj#*)efTEI^@(R*^N<sIzD zfi0+*d;-0vKKXtHH^2V>!mq0Hm(@3PmA-kG1C9n?%+oG-ZROqt{6GoqZ7F&?o=Bdj z{D4(&Ja_y+JsqO;{1Wr!_$$ED&b`aD?nZneo5Va?yZD1$+?#1n;ME{x{FlONZ9gu$ z$9>;K_oE5jbI|>^RBmhkETeeE_0q4wJDFqQm_FMq?_E=M<t1DccZ_`%_dRRnK;_UG z8++dnbFbcxoK}dDtTMlR7x|UoJvvu^9(nJoew9HPE)sL}WziQJ_A<^#&%}JNL4V~V zRG@#Mx28D9v<;*>0r*=Nkq`Ny>Ld1M5?}Y5vOgz#T+W$W9|ui7wy5ii=hw9E^pbl* zFs}^ke2Z<tuBx(^5I7B@vkvyltAF5N-}$=XUIOl(818#|TSiXyU~hn#d5DtWRv*Ce zv$EqS;X!b{0k^Kft%H3d7i2&j1nlbx-s3%3W|F<N!FhGYjb|JBllHae!2o*F=>)Cs zCq7r^{<z}g^M|NVe#%UxSo(l;a8#dVxO0b}=nx(+^Sj4qZ#-gnvZ<_l@t1iYUwhou zvx|NCA}hOkrro+MQyu7rI^(Zxp0U?FD?U#8jHbSs-xa+J{qW6!-Qc*z+ZDd$o*qPF zFY)&qS*O_(z6IZ9ohD7NTQ<KN|9=Ab<F%3W1w1w8T=1LH*j)jipFE#<Ed$43^R;5A z(k&ythrM-W-Tpf8B^=0g+1*p_u545Dy{vd%WqurW=({6>=p)+5;bSxBPQ|RmBtK$Z zdehmoa@=0ldjC0PGSOPSUK(Rf5*mzqzch%e)^sn!bp~14>fppDkW6dtXYLGmYZ<5v zjopZSzY(Uxj-1LD?|R5~-nC+Hs-eegGmhR_t4tMH|5aD6*dX&bW=AnN2i*Jyu#WL5 z9CFygir@v-7dOMoI=V=*i5=W)Hi<pzyC&LZndH8*-mbW##X5lhY}79Km#=+eSui~S z&Q(s&X<J_5mOC!99Ov4HxR3G`>Q)_&4r$#<dsnNz^d9wpp6k`LKAm&#(|RAic5U3T z6<=U9&ac0N@6lqvE>jz69Zm0+lQvpJ|MYos+zJnG745*ucFnO39U3j$v|UAgzRD|p zfNk!i{V&CPOyKw0L~#fHE;|#)@4fq#-ka#$f!!4i?6Rcn&%ILF1Dy>$KFWBCb>d!c zephMqpR8+K(X_8}+tFi3e7;Lo@7=}kFtWI3V5|M=#8&(516wVBMcM5-!WiU^6Tshk zC0X3bn$#B7;BbFvJnIeZH4j>$w?Bsce%|ado?*M~6Q!-!_iV4To){ZB+<V6i<IPbN z{*7RQKdvQPSL$5%!*|=8+<mZxZhF~$OK49RJ;3!H$0;+zQ`&SqN?kQrIH`jY$m_eg zKE}zHLdJ3Nd6gqJ-P5(?!COTh0&+(w7x|q-jNKSSaQ+GXXRO0_j7p3Tu}N*pmD4%V zL+3YwHyb|I`ZmdI@V~LQ3NjYCe16ZCo}pi5;v~<SuXa?MvnxriN_5=KSvG8=o3C6a zhXK9re1TPR1AO-lL#@;Dum_SKk6hq@{lv3;Yt)um6N~;G;x~L67lL0O=VgB6n(#eS zI>2!|zjQB<3GR*a(|24-sm&b8u;)bVmqpY$sP=vIa%yv4(MJB))0fm{HgeA4ts!{v zM)@k@GuDu>9-F<}u$3br<1)q|Z>IqJci^LV<D!i<eJ5&}d$T>xzKX|_xfRyG^%&!K z4+P`4lP6ajYttSdy^ZU#ZN9Eh&jj{VW2&tjM^rDm{xJ1+2oA>bp33k%bKRI-&3wmS zi{E5BnFG?i_5|Ll;@TaqtPew!4KK^hZN%dN%EK4#9pVOzC;R?ypZ$~77VTu!4t9Kq zy7U|7C%ZmCFWTUf?xb9I%2Pa-ExvFLsmUHA3yt|*$M2O&?5_pb?@Q&a!D}nre;s8n z{0`uQ%u}U%hn&S1)pr23rwDt9h_0e9xb*0w@>%!W0=~|lU>iSYQ+GXR|6KjK>x=d) z%lK;G?B6n|@cOV#gRHGbk8hLDmbLzO$Y*u<j<l!3HO_Z-GIgvF;cM1wi&m*E$wu^l zaIw#Q(+}aS*H8CCL!X>j?R9|;vrJ{x(KJA2dmImHAVVHT8gtb!6}<%QG_DgqC^szp zLyuwlF{t+i*F6#RXWtU?2TW@}<1rKZ`f$F8-!!TBs*A*qBHHC0@wc-RV`X%qTWiRh zw1p2^ofgm3zpS{jbll*Y+uw%y7w5;iy|Y+TDfw``4$Lhl-)6m?zd_yuvH=`fbSs(` zIM*yfcedK}Li^%7&`(3`>-<yf1+&P$-6i&BSZB>ckCiBwl^&w5jEkT7;co6b9+>@- zMONlJX+Ll6`0?9_eTK-<cJ@ozuXp4(uh2K)hnOia%@@0vFQczcz9hqM&y*`p?(nNv z58=yy1utdV7&%=)m*T@h6New+MmV~p%ro9g<vs1ca0;#e$S>owVb}C7_l9Em*W5=r z)&aClI}Mqtal4@pc*b=_bs!UO==+TMb#l0|OT=g_Li+JT7`yU~w+Y7H<7k6Nb+41P z8%)NGhke-5zUW!}$UXHs`&Ydn8fRp;7Tj90RpQLU#2Mpnn<*wlPCjxJ&+Db@8JW9e zydN?S=Do8;#!D0O8COob{5xj#@c4;ETjqPKrC+f6Eb&Hsq|C{$n~PfkkztpN@1R{U zCb@^)+*xwlpw%ioQ(V3WR~5aZ`-?NIu`b&O#AEjyvc7u`!}B+@XTvo5c-*ecL1ER4 z^}dYqd)>NdD`-E0DLchl;u&&OpgZ-nEx!X^9+lnZ9^;X&MU4k4mRSpX;fX-)okm6} zqkXUS4U3R1!&aB!Db_a<gTRiC!YA@|_<o+dkM5i!PIbBmKHX(oPOe!iypEqc@aynx zwsVm>kX62?8~9U&B4erR*jI`@1YWY!oQr>%s}1hS*mWu=e@FMV4;6Ln2QK6~FCC!u za{)Y-!1AII589YV(HfIYa4i-r%Wn(5=`O*?K7-*b{T#`Fv}X!#uMzco5k0b8R(v$Z zukcl39FRL~{%PT43i?db?zr>koc>{*FE(Ug$LxE!f7nJuo8@VnSU4sfIPeLTU#{?M z+D0Pgo`|XD=10*s=t|Y8=M7ncAJ7dsWMG6C<}fkL*Yj<(GB!qgyDDa>Z}Um_53-j_ zq&Z8zTNy<s(F=*)@zJNiQ74z>%^G_*`OC!1T@H}PTuwFzzd`p_^jU;H%ZRn;&x4ET z>qT?;%d*Bj)OTAOI?E@X+{#{&(3O5_PmAqp54hr7#JF$F`Or^bC6}cj*<<}fsdk$i zcXrn*<XOk#){tXP&pGB_>v^-CMGq;~db#?{d53gOatxBA_9oT+4vl4#Hr2MiD;ic0 zkslur2RsgsPci>BUSQuix5r#K>pS1QRd$JU(Qd;R07cL)&Wqac0hnKl|I(xLkDK;M zhGw$)1=`lW8Wnpyzg1&W>Lw0Tadz7>Co0md@}HN1LGy_8akuPr0!QF%n{4Pf^GMiH zzDF7vvL<;_t`X(0;a!&-u$)2P13$FRDL0^+*i-pW#G;5vE*QRd2eQOBPg8jhBfSTI z8}AB#L2}G;40w;&2r<rSbQ909HQJji;GOPeAA1+;cNgEel&?+y^?kK&<;5$<9y*wv za`UQzoht0Au3=Zlh>`3m6vY=-aW*GUtgRaz98|}6=P}+nOqs=jU3RRr3m;%N@eViE zQ>?(fN0F2k>Cy2Ixqs3_`h$+4%EFt<hjRH<ukh>=`GHg*-aAgt(kSCB<j~Qkg}75I zK4b=Y1kd!x^$~h$FBW3u0~MYLr#U;u_!+nzFd9D-AD}K9$t<|BprPA|3DS>i|5xcm zY^%Ww%0t@FC&+Pv^9%gbq+f-!@9FV1`uQW^0R7XzL1hC6yEM-f^OR5gx;hO%?Q%N3 zn;am|PHpPDU#dtp$Ug|d(`E9xW_vV#oi8$Pu5U#vP8Lu{-WE5<9YW@g-17~*M6Zq) zwUp?aK(Z6j2jM6}>R;*pMKY~;up2j$*K{Xx&}rLcvowxS{fXYsiZA#spfUgR1Nn1W zn;}~A?XVY^Hwv&Rn)%S!qmaC_p>L*`?@8jNmy)Nyr!bwvPaVLgx@f<6bfEI=!n+rl zr$8@j%z~XnE*2{Oarl1{c{+}qPfMoelYLt8v)0cz-ZDE|?1W4XztTtJDD4@$x(}J+ z9oDRpD>7|YD(7T5aC#}**Tz`!$d8sY%9@~fuMg}Xw$fYn$v3>*LnhzyF?8NT9DivR zuLs_2=DncH>?i$I_O*-e$9g;P6cc)@mC^UD9(<9`6XG+CI@ry@jqa!J;J*ZJ`S=ak zu?K<~*vXT0aOT95@M_@SsXfeS&yV|1JL>dV8iU5~f6E`LA5j-&Il_yBj3)<}bA7e_ zE|sUf@!dP-B@_#S_VQic80}>b&Fx8#J_Sbb;{4h%+tCMo;UQfI#OjGZB4fx4Wz4@* zdziiD*&6m~85@)I+sUG2kY|6Xdp>n@{wFC7g%kQ1xqXW-@oj)i!PyJVt8CZ=t<kz< zzmV$ji+MV=6Y#M!H{xM*y1pgU;`sPb+$a3E!1WpaLU*`0NYal6eITu9a!K6}jOQ*X zgTM+c2AsY{{+zry8+Im<w*}-4nRB>D|5~Nk*N1*%fBx#D=(j1>LWJR}?I-4PGjM;_ z+Wno*hPMb_@so6D)^^`mo55FM%&Ytj=~&r&VmjYdIgQbR|EK;P#%ICie&HjNuN3o{ zbU*X^1!w2*sV<=hORhfOGQ=k22O3BDfdNPPfmx3FCT9mn?V%fT%yHDWHRTWLo0;01 zTi?Qzk5=Fqan!dfg{J|Iim~Y1l-f&0-<=%cIK;8cahT%-$B_*F1n2uSR;`W#2W6Vh zhtqRcZpOyb>(X&@3Kob@R0ib3WuzNYo2|0w9zQMnnq|hoMkRFf=JE|S7i49{cH+Ma z>iY*&Rx&3Xz`J?(T?*Gn#)9<C&`ln4%?@wyuI>#N8KJwpd<mJxD)3WYeaGJ`I9yKf zV1cr#hkO_JK6U9m)pJRFy}@^!o<R3$P4bHLU@Uvx$dln4E+|IFn5;u{v62C3-_AFG zS^tmRU~jNxtr6b^Rv&7Q+JcU5Tud4Eg*Ent4Q98pMz{liyp0@^401JXOUxgHK7FbE zsxA3OK0dgq{VekEZp#8nTWz1)bK?S8Qh$XT@N~g_@m`8I`g6%Wb2oVN-lF>Ico`m6 z?5ghuTcTflBqUzb%TvWAI%Eg&=a!OwZjmmNF8ASC^m!ooor0u1{u2Fgy6zRn78@}9 z!<QlO+=wY}^sD0H-i#j=ao7F?(qYmw*;rRQJEH4A*Rpf?)3Oiocy+2VhwS74yt79) z@1q0I5iMM+UN}g)JN^^hb@t;f*W5q#L1QU+WUKUEN^|V^0x(GiS|kH$KN3E@WNck< zu4ru-eUkpAPT6xe=BpmIdv&fl6Ml}zeaNKR*W8(JZY-cWT)Z`E#aG8k;5~=K!O@L( zf%{(SzeraLUy}O-mRRP|0et7zB5YYhp3AWVAUbsxti>;E^j$d6HSJz92jC((OvWPe zsU?4+rF06o`<1@8!52MF<_-!r)g1*b<B~szYjDmQ8tY^NR%<W%j>d6kJ?r}*atM4e zJjt30;5s=<erSd<ZQ`SFJ%G%1C=XV-e|Mv|h7JdspDZkK4qVC`BnPQdQM{q1Ys%tJ z$Ubi8zOkM#lE%gs9yNdG8gT_5pCLRtQ}9dE)<*u(uwo75KCZEU;lR=9Vc*W9zc-De zMPC@IlOPuBgzYl<EF=D*31C?vw!pql&Mvep0&_}><tbYb{b`TCxSxy#FJo*59awu} z$(jmu67MrgJb`XY@WMU#V2kcKd{RT!-uhd90eyCeI@zPl(PON!2h1z#FtwikiGMQ4 zAA9UPqjUN$e?qyXZ(btit7kR#E!7cD*FI_UuG~bX)c+}byt8~m?h(61acl5V^rj|? zz3n!62X)<%VQ<WUTm<qEdinV213hLB>|)<V#?22fk8^o@{d>LFy6?*el-0M)x+tS@ zs`k%h@X8tU`I0fGd)DQzy!A2Z=qRjzJJHp*%mIVo!>$}{mU)LKWNz*l<GeCsVjn*9 zna?4vOH4#En`8XOpVRqH_L6!ev-%e31by45_oEr)cP4(<s8jhH)RFC9!Ujs7TVwgR z(^>31{?ID*-{;m}dB9v>!S@r-xFddF|NR7Bl<%;Z@14U(gl8gX-lqK{s4H@?Cv~}8 zk#8Pphj%=0p;U~He`zS@0rnsRe(mKWo?>o^zc_DL?aUo#y%+H_{QXdIa3j8*L-)?{ z41Gft%58~hE}LGPj&-njK-b{MeWPvjeegUfJn24oS_emsee+VBr+n_N;aTDE68O(+ zudW3D4IPxwpzvd)Wy8*;@coE9p?xG=44gi@oMzD<T<4PhWt;g+I!(EvY7?3&rn~vu zkMX`|)Jc5>$7jTN?9L57gU2rKUxa?}Z^CEp8+|FC<yIM!^33&%c2ZbUekW(XncoYF zS0wmu?1h%#J05S!7Qm0u9l&u1`@_b3*`;+4>Z`3gUcUf_=se>y!SQp2-cRBKi>H>x zymijWqjBfw9gnkzIXo`8%hz}(rF#>-&w<|o$rt!=c@+tMqXfVCSHZ7r^&q-nAgPb| z!1oV0nLFFE0A84bYguwQW-OM<GWf+eueiP?_;qs(P58ZnI_h)ui<sd~<;x<sJIIaA z53aTR20D2M-=>Ro%p$nfp7XJOX@PD74ca8K44#nIm`<WuqkrHWIn~}PdAA>LjQ0%f zx>$LPE8wRuasOJ*ARiwg=J8Q*_7U(^N&1#c`=)-;zb*ZrMn@GI{NsF%w10`7a{fxz zeqsVV6@)YT_$Hmx&m3hgCr(@(Sc99&jF(SY;SKirD!n7z(Z){-C#p|2Fx6M+!*0XI zp?d=Sp8!7D=H6L?A5SAU(&4u=hLR56z%g1X_BC`QSGnNcLBD~=9N$Cs$arg~AKl_V zKVXh7;X$AFHD8g)rsm2j%q4vk{`pA4KPSNNh4Lx6aPrxZ3pY0;8oq*TYCpw-+L&w7 z6Y9To;Tx3AAD0e$2!1KUFXIWnWK(_-uWXWq3*;O=$UsBZ7XQR&#Ulxybb?=}{~~0J z`Gu7KFN6PyAzf_Gkbzdw%jqnhQ{O|X1N!AeC&j0rUv`rm<d(Ug=!|jbR8HtL0iDYK zA9wEp9oKQ*dDgw%0GcEyHo+DJDX`QHG{Ck5YuYrdU=+k|H9!fLX@`<1g;M0O4N?-5 z(az8^oz>3BK5dYcs7VWeX<FfAya@z8MCY^s>S0^E<0Kg9VL8VqQM{h4X4e^GDaDa9 zo|sOYM3!Y?fB)~^+qeKhS<dX4-5s3MsJeCQ@zwXLufBR*`lLGoz7qB+yF#DZLmC-9 zV*IZ@aVC~M`ip&f2k`WbPccTbzYd<{3x~zI-Z^&-d<hKbbKjS)&7#*!E6D=<d@uNH zmd`+Ay7e_0&q<?R<6YYA7T>a$rWZJh$Xy4#(oWmjKXdV0v|Tt~+q5g)(=Xh|+ZFu; zd)Q_H_={?bekWMpZ=(GGH&Gtp;5hJ{#1H!@-xr!f&oCCLZq-XX!>=!-nPe`zjAnh% zjDtyLU&ZennB@*D)|$P-%xNz>^M_vV%;TQv_~mvMeObNf3Hccs`YTvl3vr2V%hIo; zWLfm1Z@&smg1KEXr?e1O^h<w^okMG&WtDfvvn%P8NG}Li(4`&va9)xh{EWXm9n&i| zR{Aad-M&MgT}N~1FnA;ZZDMPH+y_Em$JIyr8}O|s|MemGR`&B=^!VK?$m8m_l1KX9 z9`qd<3;O=BXks)6cJ)83^ZJ-P1h{H;*GKu@Qtr^%)9jN7X}A|18Mn9Z{qIvpzWGwf zm*?>03OaHLKQ7AHyX8;ykSU#M(|G!G#+UFAJlNh__B{9`DL&<UACe`FbM2y+^oi-w z#c{4l^M&Pl1U=efG^U)<a$f$|cdt=9#<PJgZAC8A%j8nu!=s4gatTk$2K?`F%sYjA zZPhv;vbG%`={DgD*&E)NW$zL`hJ4cY#7DY<@!;Kel9p`ah9~Hk+SuvV^>o^|pZtwo zruWP~wQ^=tFWNF}FE+ia^3?M`$_B=!(cSa!8mE1w=bI9*Mz)XgD^G36FEQg?Yw<w< z)NXzDwAnr`!sTaQp`XsVjxt~0s{Y6hVI9PC=pyDFCF`U1$e<HUe;s$FO|q{?(yKKV z+Iz-;uz&i7(RTQ$)Oh!V-G{l-_qun`oc&3cDFWXtt^?tNcGXGN22L>-o@mTb2N?C) zN7|7;5X@Ec&nGgR^LNlhdyY(RL6fxBr|EgqKsxkYq5D&Av+lGi2xj@7xEsmt5a{Vn zXm8m@?Z13Dk!X`1#*g#<LfOV{eG|&z)47a3a-O)rxtm1#_`yWml00a)#XMQ|rD=?O z_kTJ*lwcnkKR;pf7~LtdvFZ}XOa316c=@5{%@<N1q92qIZ1tP{3cjf~M7M$Dq@}r` zY`5NN3{$8-@tn$NPM<&U#}oBIf4A&mrD-kE>MD_uGD?%rv_9n9H_pX7!o~U4N6DQN zU6`jA73vxK*uD$ZRVy2Qbyu13yWk0ZxM^2ulx^%+`B}<<XaD#pJ~i+|=%V%&DlLK| z!UO$)%ICIuzW2s#KpWNbv%vQMhcf5ucLe)C_I-r6<>7yAy(^VR*LflTiHGKq?_l5F zWUxLKdoLf)Jo>5F$b)?ePcS|<>QElz-FV+)?;Cs?f4_{U8g0y|er#6dC9ZiNYyJ)X zTd}R!`^Fx;p9a%%JV(#!uifMDd@@+83-&D7+J5aBm((8Q;%E4tX}8Uzy6dFX=1>Ps zg-xd0InPt)+4f_nlWq(@9^=Vs?f21qa+>D|4|?a;w{OyW`Ela!*cWtGb<qDM>u@36 zga`A*n13Sl#Yi7Bj<9#p-;FQiS9<Zeqo-}{nX#&B>w>!y6ViP(bc`znV*~isH`-Fz zH`xKcRMK~XJ8_@m?uI0JnDV6Dd#=%#Ap56rZ}yzKShiE-M^rxLwm<IF=G&BLmqK8B zHNA6`I&PINP=4aKsJ^!wSKbI`rcVX~eJ<Oow#Bbd-+j|bf4BBF<KOo(qwd09be!tv zzU3V%bL84Yo8|?5E!<D~Ro48Y^eu^W`cdgPxTwPXYnFM!B)?gWznjl0o%%neka3Lf zrBP?tzS_2Zqr8jY(|Dk<E;G9DEoisI-(_XXR!=z3dykzBOUws!FrH<66&>LXjk}y@ z=DdA47O9Ooc1P4!6tZWPzm?bcRHxddu5^vE((&-dDqw>)LHh<5W0%r2c1ac(n{0hh zq23FBee5SnKNt86j|?Wb1vNNpm%hX93h)efm0;a<fZcE4?Q8XU-+X+o65y0?U+%zG zFuX?nR(r?*cG2Q^q&D@Q`L(S(DlVRl(utcL5T>W#?WBC5nJUfRk-mcVea_^q*1mFg zMz)#3^PlmF+czZYLt3YTmd{$9mua6ndDihQ$~=Dhb<psvop*TvxTgwv_NS=rc6V3% z70lJ-xAW`Ix+JnL`A-Ut`g80jmal(GJR<leog2lcwO@De$ghap@s4(~l0oXZLgmzN z^~?IFciaoF_w4O`!``DC8u?WJ3Gz;XkCWJ`I!D7@yl#Isj~!$CBn_71!QJ1&pJ3sA zm!%KM?pT<WY+!>jA@-7#7k@-P1L^mE<%RYo^2#68FP_8(9AK`(T9)SrW!=S;E6t#% zd1tcDyrx}w!uRb;*L(4*-cfgHoO;HoGi+m6@XVN>!%GM*@~6Y{?^_0&#)GJwU|V7{ zX-|yW$q!jO*xu>O!!{b@g6V`&aI)X<-OFC20=Vu<mI6A|&VARTI;iW4*t>jKuJO)b z3HEiEtvLbSoz|g%3B7TF<kM(8v?#xVg}uOC$!l2KK7h<~B2)0QcbGr;qqMS2+qWU6 zfd3@FW7ZGtWpC9!GwC1tW9yr$Mf_Hy%>;dbU(?I_pP`)Ao>uCA^sdpzSpQqYa*cOU z-z-GWkT<P1#mC@g2Rw8XUOCR(ZW5mOJaXDB{3w6Oqmpm-eJgF@Z~DrYO#t`Z`j$!$ zxP*sWDU<M%$i`mba_9Yy^Y`%YrM9m|Jfry)`fY}Fy{XOs&$O%a&c;_M_uf@gS=wuI z(Vhvn(bt|qJF6!7OY_W*8hG%8n;4&R6WZqvKU$pguRqp1>0|b<eLsS$0dLve&AN1# z+T-jjFi!r<AVhCN18W=j;Nj!!Uz<b@K93w66`qi_QxQL#US|v<pW#qCIL=?9x#&pW z*&V?e0_z^)AI^Y8{F53(AA*bb@y_;4@GSdY_he~3JovsEeW49oS0$|!>HR1zgv<25 zzC&T-BI}oltYn2dR3*2_qtP51<r7|d2K!^vG4AieHo!Nxm1p@n+C>|c3HGQI)whNm zt3T=={b`0?b}kY)`PL$P>yKGKcJpj#Y2|9p+HuEsD%cxNpX|OXXasFXw0A)F9T3XS zGT*rG43A6Jj@2*GQ8<(=X&lgarG5a%e7?LPHV1A!o&U?V-=d#^jSQawdwYnR?55xU zG3PUrrI{}!`)3|cvWAu9&b}mP$&!5Mox7%<Omc5u5<hA(tNKkZOrFKQI3yqQN7+;B zNw=~$k}<!vWcZndcYsYal}|J=8|XFdK_JhtpGC%PUnW|j#5pqEwR916oV7Z7_0F#< z&ne|EM$c`te0PeqUe3Ph?jW5_(p{vP!<~%1e&ZXZv>f09oPIePe-)CqU3qPcV+^9a z2VJwaH)1mU7Cg2j<^BjBz?P&B<WnA33f8@S^68yqSNpgxnbi6Cqq)O9v`K!^%XGNP zaSo4j1391js`KTfD{u#q=IHcUcb+!p##WAWwWYG$jp_Mi_N(d+!B5y78?UNQdM8+V z&LAu0)~&$#+rra0G#iJ8<Irs!I*voTacDOV?Z%<qICLF{egVys!?GnfH)`<aj}sr^ zyufH+kBFBzFJrvK{+3pLsXF{!pCunSl&(S6*6GfI`XG<!_~fS--r$|Bi!z@uS%BYc zofe(cF(8c;d{@v@-`#vk-?c#3VP|6FKh(K6rlj0eI;Wgg8ttSW^MiMf6-?GmKL-6U zonq(2b#6sC)ZRqlP(C5u9}EmO?=iufM=!$}^1b`e(s%um;U#ku@v8(2eT7^wkD^Z1 zqdFzm4t-CZvIzno`1~QGwP>!N=?7=$m)Hjt@Dnx2?tTYtwM$0xFGIUK*~dFVQ<YLq zcd6vJ=)MBRQ2chJC&7)=n1<b!YoD}lrnT4ql>IKux3uR)_s_aP&I}zhyDU*VL;h>A zw@6oCA7ej^+Cx7Fx)Gfn;!ORrbw0C)(4EF_;03xg^$=3d%7l23y|YC3{MVM3joZ)- z=u@?WB%1$dV2yL#yTCQ{uib@xC|ehpT&2R=N2yEn$^R97r(BaKd$g#1|H+3aBYb&& zDd%xtG#5D0t#s}oc$&RcT^{G=HKsi@V)=9*dGfIb1N~b2OVa}j^fNwIop;~A+1xJ% z@{zxh`l?5BZgSG--?QFzv^m|8!JaAjc5JY9K=Z5m9Px5%zh4Q)59vRi`~2#X=RM+0 z({<vfl6b1$c*^*fzM`)L=UbgwC>Y<;wq!wk8jeRD0j%h3{J$EPXy5cKJ#dUQZtT|9 zqTr(bB{Gp<tdu+~Pgfrkj6<QUygC3Oqp`0W9a8%$^m_(6AT#bRY()55Wk}PWEysER z{L5TxG8o^3F}QVD{pap%^oshAzcR7Nld>bkFZB`9kjJq7zz4M0*LK-cV_jra+qB8N zc&)3*o(c4(+Tg95?v%dfF4vf>sNInF)#ru`MSTtUHH%#=|0|VDq8|<fdc&0ph7+9| zP=48)qKD|9wSj>o-zw*xpS}at)*0#+U4^rNzC4twrca1j|CKKIda>)U-F~F<ZvDS@ zlsDVps&0JPq$!`$G@g;~jVMjkyq!8@^?6a*SbaZU2@fuLIrhiG-$@@RZ{G>$(WhXZ zM4#~e7+hB+8*u%Yxb)Hz{W9?YFjm3gnS~d{-}H4gx`_EkDaV}E<J7mC_$ql)?Nzsj zvF8=O8|!c6%MtA*J8!@}4ZR2WZVGo!=JzbT=!JY)KS{Ow(HAIY`~}(<yoyk3Ejt-= z?3@j2s99|3RoKJ2>(r}4uk^JGKM~r}TLN1-J;<Hbywi9mnu_jWy_>0Ljhz9-M(i7L z6LoBds`C17FFu?E_lBNk?CelK^t1A_0pEx>2KXj;t?XV!cjei4iqycLq}K)=K97a7 zmLFTN20t0^YR(_cEe74)%#HZIXts;FdBW|dUfJu+?X4VjMZ6cvWxI6#m``1_WczEM z*BEQ}Jzg-C<sA|l@uK3Urx`mm7m4!#_-Kri@pQEt>4UIM?q&(vgr@67`^bjW*s5`r z^fioor!;3=-gd+*vG$gHYfrp4gWitHMIktn-!a`+E^4lmz@EuVcM$f<W+Bb153V~} zFRin=i|`)a_4#q(tZ%pL?<;?CxDGAU59nB+9n+_^k5S(L@q*uppLApq=ASBOz;snt zatR*$hTeY!e_uf`32*RCRc%J}3t_rx5vHf+{$GHpwge{nq4_vCUVzu~eS>b&?ap2? zkk~a04`bm#(<=PPU!W@&!$!ZTBcu)b#`yGAqsswwJ9LTDRCE;2g!Eg)4Qa@U;Fx#p zJB9Zhq3(2~M#%zo4T)Bv+yRf$67VQ8=Q34vCs2~+<;#CkQo87A;qD->@{z~O@A{LH z8*C4J1?=|{JtF-djj^&p-7Mn`V}N)?yqG`0zw~-$IM{OQ4}l||!+VA%;UoIi7+*-A z)qC+l1dG~<>X*D~Jkxj()z8^_8z0n`;*u%(OB7F*c(sjh1RY!CQKchq&8j2b_FIj2 zz#v`pCT*HLf%7c1%0{wAJxj)6;l<7)&6aF@WDcD+Jb)KhF`L|Q;|2D2V;&muf!c|1 zx2*1089TMlp(V;gw<XIy`XiW2jbvA=jOd?$p5htRtNsZF!>5f+$Ted!y5F<=hMH~c zGPq;|%PvqTJJVp{J!#rACf`fY7WNovsdzrwqoggdy%PZ(*=2C(dmUN&anASA&^NkU z0KWA$=<Gx7h}+7zmE&&CZG{m}{&al19_!JbzUa7_w4`Xtv(g=DGlD$juI^E|!gH1~ z7lmamqKv-VenH+(-W@CRuSoAE{gaZJC|!MsXcMJ5hb;u2)OYrf1U^)J47GCNo3wFQ zFhsl(m078tfeXPoybFJIxCD2tV#`qeR^r@~gA67TNAqd#>&&~?s6OzXmM@?!>qbRy zzq*b6mOFAiHE;HFW#>M}{Xw4_a>>u}Ev3(0>r$V)&aM93uxtI?2iyhS*SqwI5$8_q za{h_kE_vb(*L>nmmpXBmTYX}WYd!I6?t%-qF8p=(KXYm7T1{P!x_s(NQdcu|r6|9e z@{aO8<&%_erhLl!z?@h2_=SDw;X7bo=brDc`;`#JyZ_t3*z@i;`_2m|Fin@abLxg* zZ-?j@(FeUJ_#+xXThS1|75n`)myOd8`D;S&Cm$Z-i(#YkV_kir^Q+b3e#QseUlQ1~ zm|^Hfqt`~!i~DFYK0G5@YTlu?fhCw%lNP}e@s8yyF>itvveDsB`2x9xg!`Iqq95Bi zOYj!op9|%%A04n~({Woj&{^&Y)r((9KCy`~&r#*UpU=K3Z-er_MZU&dT7Gi!HRjXs zCx3zdkZi!qO@f<tme{}1bJ%vf=D-iZn+5|gIk!z^*#}(8VF7O_Jjgv#XTYuQZfbr9 zzCzA-Ou17oS*QwDcy8VLEIt;}RgdoDKwtOLmy6X;>+dQ0w%U2LJ>iuax>EhFpno*} zeqM9L<C8AUuZ>@Z-^MzA&^$ISc5_1CPLrP~`R}8<|B+qf4p_fRy`PWh#`B!b4dsKz zC*9qWs8GH|zS!!^3~8h2I_lzHM%`7bbp)?tcHu{~(*h6Fjn-4>XUbOzncw`i@R@SI zaJBp?t?uWa)I0r@w;I6kfbvWyUHeIngjM%TpJHW?xW2-O8v-Wzl5gU74QaYJs!aF} zwN0Bp5aoEzDJ1`P^6QSFkMjEf=~<;m`QX94p2vLV0Of=?O-Oqld5gSb-r>3Ye(q)R z9rub}{R8~T6Ja~^8i!R*A$Fj?S;m=<pZ{7^zxt&2l=oDQ@@L7HQW{}N`Qz{V%3e}w z!pZpY04LQU`cie|Zr5E_ZIWN>FKf(&QE;-@w`<s=yE<t57m!iPjRtcP@{bU=IWu^- zchwR4i2k(xlowtk{X*Jz%hUVHzV6LpFV!MUF*?D((g8pJdDhD&1T%ScXE{pYQjD=n z6U^N+%ELOw@50-fA6^2?Y0-Z9{x#WF`SSl!rH+llaa8Za3Ad4+=9I3wRMvcE&Fxj2 zW9qKI5$J`C_TrylZR9oaFnzjp9C=WgD8Ji_9vi`rQD$EobGqK=obKf1+swd2J$x7K z@9GupdGjtd-4V$gGNd|HUnuL7$lE-!*6`ER@K?#s)0_!A!p=zdVADyK<X?|uN;D5_ z$%c;JG+7}(Ww`5KYYXj~Tk>tfMp}H1Y54{{%_Yy$#|P<8x6Whp9IRV0w`BguT?3$S zOV#F=ej=D(`ab$(&TCa2^08<vsBQ65wL85fb`SVRMgn`5emCsgu<u#=uDe#hY5Vh@ za4(MCbK6(I#Y@;_Uq=VM0Pf5lqYCMiUv{By#PE}#&0V}G*|+N3<zwq<=6kR70X_=K zl_qQsFj2PhIlYsOBb|&~&2Hi+x<-2`NyBCV#f#(i`pBLZt~qz>3WKznNUw3D*(;E# zHO%*^6Fo=>yd`LE{#WWMf!F^%Xft@Pxab$br)T=rG=7Zr=GZ$uQ;+sI@Es0sBRV95 z-t35vxmFMOp^YC=rS{C|>|Yakbx*&})a2v&X@?$!{DY2EdEaTw{e@$~^VrC3Uui1? z3;4Hp<!sk9^w2Zkqxj}H^cjaP@a_wVd9$nMq2Fnn7qAxIcSF&52b;D8?fUy}yletm z>bp2Ys;@Y~z1e=Sc7%*^pWS!PDqVky>s_03>lvpSK8NYfbw|ZR15Mly2A!s}>yAcc zsH0i^)B7Mze&m6FBO8Xfz+R>K@P_Jzrb+P_w$9ypp1y~9Vaa$m3+=u=-Nk)HU9Lb_ zAmrOd>|^Q#f6RHXZG6pBIk#_qgQ$J+qV|wdx4xxk=g$}4Mff$}<vQ+|em{DFyS*0v zHiRcCw?0lI$zp9w(0|nx$j`vI;E3nbJ7~t9rhx~cyN%~0A&Zb0xZnfvPM7j1FKd^& ze=Q}Q8^Ne@;;r<^!gt{por`JI6XnyG1mAmoyZBB|0RQ(?=VDo>^P+}-qf>ydgzzOg zh?c<k+wjn^@Txgl--yc!w@QPrhTyBlUJ8dDmk4-k8@x3O|Ma5^`rxNxgg0>g8LdA_ zKPpW+F<*wJzUURjTYF=1D;wl#wS8n^+}3=<_&_XwDHb1!#fM|@t+DvFSbTddz9SaD zJr=LT;=5z<J+Zj)X$afiSo*$L{N7mnzF52(iyw%^55?lOSbQQDKN5={jm1B2Iyb~G z>z3fVbyB><+1idMA384^i#O;&dI6qHNx!0VvxFJTC*Ny}t4bgHl3VC#{K^`wLZwOn zD%7)lh4FQ6EAu?*f5}VgP<i+z;Cb3$Uy<n?l@%{q9q^#+Ao#Bzeb$FQE4oU9?@Hq5 z$X6hLZ||rcOEyLzLsuE^A!hkq3BGW`2!Kt24j>Eb_@uLD<!U3mPw5`EU;Jc#khwh1 zwOy80%3r7b`lRo2dzPgK`FFWfvGf%ATf_X>SbCOp<lpKkEKBG7qoohW(p3-Ryrute zS^67%x6ug)^+y@nkiYs1=$B<@G(<1!XXxW%3`=j)xy_P8v$i+%%Em0`_f8sYzl)yW zzDCXYSmT+6jO4351FrU_FV`HNMe_tEa-*!zd+3sdE*;Q?F}*>T!g=ADt>SAsloKq1 z33%4U;Smh3#5z(I|HOIP9fvQ~w%yNkp7zBT*k+7X=CA)=+?G;$ZP0yB`dj#uE%g@u z`tP~7@Yf5^szbPr;__h{{s$FS?Y-InlfhpyJqv#3nbmZmE7>zvts(~*?8anx9>wHI z`d7S<J<Zw&KDxcoyu!GfWiGU3;Z@N}ykYD5Q^?F64j(DsYdf*<if93C&avSnEBcea zih2_kr;hq)&<~Xpeq<l1Us@M4TI&2p(?rSV8w_!nMN7XK`%GszP6+;^np0=vvP(Ny z$mhWS+FQW?LqGVwTNS+JboK#Vp)=y=y}!cxH48pg=$FX~{vPWOKBMLRbH}q?;P8zB zKY!RIv!i|G4|Kax_7lUNDq{$1LL#{1*L=aF0iO#dy{m#RSA|Zcz?VKT!n2>=G)aiw zV1D|(5$0IV>Z-~n58~n(rIq|)=MHAO*xOnXPgon;SLe6SlJ}av@`G2AuJv%+>nVS+ zTlNhM+886%e8~fN8T)pzpPFyssSnu4qk2c5mVGxP-4^vPl2?rzW1Z+_a1EW?X)`Mx z6g?yRgivRPGLl2=5!;`p_x2as{E^*3o(#4KC#C}3+dJq6n5+E*V@kt*p{}&sR_*c= z%kJjno1oZu^0}W+$IJ^xSFMWYm_x4&W4wL*>+FlQ_BFRNy(JvThtK#R{DXIBO{le; zzFod(S*njPfA<$0AvP#?(Gy0vQ%IVfW0BsGeB=-8yjOeafy?|$SEY+Ko(V@|tNhGZ zlb;@I_S?r={Nz~5cVkK4#v}IiXbmJ&XTL)oAE@rrs^bGy-z49_Y`!S*kbLE8Teh+E z3ATK@?OhzAZQctf(kmvf$f?yq-m$@*_ioMy_PwPI?%b!bP;J|IIP5a$$0W9Gs&;KK z#|q9CFlV5D(+NM5KS0>xr>C3z_UUFHABOLyQ+{wZ99Rvvz{A*J@M4#HA<Tw1jqiFE z><XiP2#<mV{4S;s1#!uX^i-5z&-6R;4Yt!?`II6XTJ(+k2P^XTQGW@X93k&f@G=pt zt7a%Cp2fzFY#Q$I-nmD1D>Bg1liaymxYFO4zjHTfcAjaPc*?zh&vbU@p4!~birEyq z$g~B0Z~I7gR)FIucsMdnd+H~2n*?sHgBoqrAMkCuBA`cL`#5CD=lfl4phtQ1t~Rvu zZiV@ztyu)P1!rNs#t*y}URVP%9*FP3=k96h7^Qq!zLo%=z=v%T@RQ<EUED#>T-kNi z_cISX<~+hAp--5q9%GG`y=H_-!ZcwMVTN!OVLM?nVF%%A!YpA6VV+R;PZtPNguR5? zuU4eqNy0wDM+o}~e}`~@@OKGIgj0k=gvSVn2~QAiB|JsA?Z7eba>DI|n+bOiUQKvA zVVSTpam>4(a5v$H3HOkGBjMeIw-N3o93k9C`0IrClJ6eE`v`x7uzKK_d!6tA?|tEi z_#yUT&dY|$H|yL^5}!~KdM5EbCruY=El4yJ9iZW*`5R2Pc7Uz@&cB#balv{6=L|i@ zNbZTLcIkVl_}RC*bhe7^9q35**z+zo)`^c_>C%^rJ`cWP64=|6+opW7(cq8EMPI?k zUPJZ=C6UD>{E`gmo6JT!BhnG@V~3jrX7nj*c0kP?osVlTte2SP30}w&O4k)7&nJC1 zOgu4_aMzRGI-THbEOYB=1|7FPGl%cbL!+kXe`&0Y-sD-jmGpb@g{sb0z3Uq)-NU@T z>a#vi{wwhTXEt|vRoboMAMyLJ>B*a6ow&)ZZ!3=xmrqq`dJfycM^QpHN#kB4y<^=0 zSZ%+e?<&k!lCE+xiT{;78GH`_7%v|cj<iNeJrTScG>0KiJ1}R)64b~2AdDg1^e<y+ zyrUnRNVj_}Qm%BD-bHYNlM1-$P(Ar6<gM&FLKwG6->A+p_DRxreQ&cH7=PEX9<DmT zUlaXL(N3~>!`T+u=afy*#wWSYs|EZtZSHg){nU3AjUIYdy4niUJ^G)D+ID^eM=frB zdNjfpU61mYlpna#z{Omz<ob4D2pDYcP5ROUE#&7N?mLhaAAFkifE;tdX68-0_dN^j zY0>Q@_f$=_xWW{dhsWCY!#3B^euG}I_C-r;pSnLq9cA`!h`)xY>sso%PW20S`LBY{ zm*LYyP!D>To#pAdu>Py_bM&c+x{Qa;+BYcp#x{OAaLkz+!#R5nHe-?WP2s;MpX^|@ z&vU23pN1pqSg-npAL7X%EJgVGMc~GlY<SyD*fHh1KEkUB-@6=-YM(ZH)j#~vtl_mq zxN5P!2rh7;_aV=xlwO0U&;e22UzUGdyu-bmTVuR~ws)>?{aMy!uF;u555Dej>#y*O zQ^qrEfGa(gpwGzwpMAT$EWD(9^~IkyHxf>i?-BTra2=t}2`k=8yy+3T&d=lLKQic6 z5jOK%&98;u8h$B$t%7@^>@EZDIoeoD`BVr8^dUZKFo|ZSW5V`4>YOD0h@~gAcVL~q zC8ql{Jb2L4+&#a_Wyte8dB5ew6GNW=$QF0(k!#(l6W4h+o+x{_of!5;PJF=o^+yK1 zd#LYsc|XPb6TH8i{F`}yHSf#3zy6Vu_hEj&abn25F1+T?H1J&x`Rq3sCp$uXZ#xgZ z_h{b%IvISwhnr#oe7p4<%7$<ImW+ILE8|=F!nWkA^x(IYYich`=Ft`1;h2$xf1s0x zZ6BOJ04DpU3NXPR4OwdicWHyOe6~fli}(UPEtyk!(<S0#(Or2%+y}G{=}dZpbkTQ_ z-sht=I9o>RRUr;U>s2A$MQiQl^9YM-6WTl?dWY%%O=&Hf;@@o8tf3vGadHo1qxs#C zI|uJJ%T|OgX1^lS4V#fVA{#HhCjAcOR~;H}WTP(2XKT{DH$R)&kljf;>$E1VGWs*y za>UY;YP&WRypvBrd6ZYUG`I#A=L%sz+HJhYCtzi1gZkTm!+Z^@Uv&u1Fl@~6;EVYD ztq{$hBDhpX*oJUreUS~J{<LAcI+x9jp(ptUb2ch7z^bMC(+wQVk>&5(rf0<|vytbm zI)eaP<hnP}x0K7)=IHY?E?Ik)dC7C=ljoTmouTZ@*r2aqll=wfwO&~Gd;E)O<?Zg` z9q-lOlq-LTIxVg_hkWI&u5>{+I0SyPqaz!5VhThA^Z6!x8s6k6yi6K(=nS#PzD+yV zI9WA2+vZ)GW6|FZ^;><EO?70D@eqAQxRK(`#5JdC$F@pRBl*hPp;<H5t=Wh*_R$na zv|etyQTLRY4&Zqe@__UO;~dYdQG-`*XbN?NbTKwU`5<GDJ4yRIr`g+nInO<2hxi32 ze+$ptmr>p>->lz;ZHkQ|7#eBVk9wB>4ZJLo2kPIhd2&Q!#uM#{w)w626&j1DpklyF z@ep0pz;nne;>VW?jKT69Y3>@cL$kIw4_xY82>o5Hd*LVcTfgl53H?j*tUG#>m>=Ns z{qI+MiVJqX#Ceg5ofkRBXB5&|KFYVdXC#_qo_GI=>eOEpTHVa|z|RrmdHRBEHo0{5 z3ieE_lANJ8Ha6y~oEcO;rGw|!!Tk}<)szO$33u`NBf91FZ8KkPIzIEorq9nj)pT^` z$tLEsO{ZqQ)HFHsMAO8~<4v`h(@lrO`$x)DQZ43=JO?jQSM5(-aueTr+w`Q%K8h{^ zm!ALG_O4@7t_?fs`-B@FJ?=7(o?uP>6HR-Xv*iDBxCTI7ekb#SId%1P&hMPawQY76 z`8VLdIi0@3pQ^4g{3Ex1h5LPf;B0+$`YiLCeT6QaeKLHU=6-I*#3K7o;iH0IJjD6t zh5u5##Vy!-!{uO>fW9}K8mF)0^lhB}j?>?9`a4cP$LS~cA07&Ls_C@h<qyDva3fsA z@e|?Y51Z=3jhj8iT<0|Y=(9Q9hnT;pX$N@WZn6pazX^}#{3qzw+4d{)e$x&&SY4C& z2E0Wdq?e}OgPn9$KqKxkPWhiHc1gzEi$&|B@X&)iH~P2@UdGle-n7_9|7Q91_(nDD zXs)L6{=s6G>Q(*11#6ky6WUZCr(bUu4-P*g-!4j_Z&<&8=FlCU)cS7S*6&ZdN$IMd z-8=6^_H-B0ad?%~z)xg%^uRkBW5#v`{v<qjO?7-lV@No>+lK6+J>Z8>-UO@UFYqDm z+>0*Q5Uk&W6W7>pcod$ubzyuad*xfyzQarjJ0wYacO+h_-I@4S?XJXpZ6xuEcwhBO zPNH_xBkm&hLvEmcY!y%YA+>&bHK9*<iQrASA$`~8G|xrywv$);ExEVT_D*s?@{&B8 z<Ik<`eRr#0lxdRuL}My-(tpV~VF|pT&yk&rX+!$>V}w|X_P$y5MLLQ6;WKq5T{e0~ zUka`ZfvKJT>Ab4$-Sfi!a;9;yobVbwhwW<bK#ST@8QwKbckbM)ve=4ArK|s}+19aX zPK`rf{7;jN8MX$Nm^VMv)9^$E`rH07c;JZn#6<V9^&j7AI5sVvZ?uK_%jlvuZM~5( zKyk^l)*M}1`U<W0imsyLRA+Dx{}f}{6s$6pbv`hD9{5)9kG+n~wW!DV<{UbV@hYrK z?TA++{ig98m@*B0mM!K&efB-&l};1PiuZJDE#Vy9aWt;G!RadGVIngMO|b<c9#DB? zU=R4d2iPabw}w2T|7wGY_t87a2e>eLlH5p#-WLfL@wCd!9K-%tYB#<JEu!!36|^Qq z=S`<jpS45Cm@Qm;y-~ZtvujZp^_6^n_}sAPc-J1c>HN;%t_a|<F^J;uzV>hg^i+Q2 zlXFWUeW4|N{30+H*o)BKJGJ4E<V*Qi$`el$Ebv4FC;8-p>3hwUuJqXtQ(Ac5>Rt8? zKln7*w;Akfmwy^t&hA#9RQ>pTt`Ls_=UUk!k_ojn4KFJM4|Z=%+zwHG(OiCX+B6$5 zF>i7q+oa*2Re1;RSx7XjZ?nR{_5hZU_hp0Y7u6TlAHhEp+DocWWutuRe=P4Xa(Ifo zr{ROTcwF)*9jS8aoBZJQD!$Vyc5hWS!<PSv5FZ$MM@)9vTTZ?T`IhBXzVT7VzS9NO z`D+mkl$Uz`B`}?i`U+jw;&<{Qelq+W$1ap#k$q3&@C<X%^mGFMAM<v~Uo+jrxQP3R zyeWSAZgwz^fja2mr-wKzhTbnQ-;<67&P4iS+B@Z%R35ZyFQ?|ANrifj(v@ay_(2-& zI@&jy0OMqYE9%`OzR)v!6enwC#xP(S>)yGKxpEh4YgN{?bB=YlKL4*OF3Iz@^yQS( zUCX(`NaDNT=E6AdBDWXPMpn2%R<iVevd{m?t6{m-(_O5igs_OWV&h1%kq*BrUfaKO zH-0C5OXD;+oP>WHFkS9{ST=7HI=im6>eZdQEg#S5@KcHThVFh<dyU`|^YJg22kK}J z;1C9lCs*|IYYdQ1qE8xsbUt7Anx2;4bCV_Qy({wkl$#wk{p;qp<y5b$6mlMRkeBV( zns6|NOtJsx_t0&}SU)_44*NoIKObqm)R9M!wC{tPa?<hvwUSm8KCC{z<vp<_prv$# z@<(~0IZI63u|r<rMEQB&yFz_^Z&6=wtiHMB^{HOzI&i&Y&u7R}9j;o*jq`m2V2^w= z?c-kv>|%T!@9plgGxaUSE#7PSlMAnbQ@4H>;9lF`g^w!fnzlXTtu`KO@e1^HXyFZy z^O4;t?(ip_K7Ma<H+`F9Z-AeE#_Jr;dDU!ghBhSx;4%~HB^x(LlAa0u`N7$G;S+wa zIsFXd3-9A|^Ju>FPRTR*Ce-IJ-%`It_%6~7$n9>Gp-<~pDq})QT~Qe6Ps^+GJIG<Z z6pRmwYkkz7i7QXN#M&8gXy@e*yqS@`NLp2C;rshUSLrvs!}r%J9<X;Ki)&(f)}Mu? zz+ONO5>Z~gTddP`s`*l)a?v~4y-}J%>1vxtpGdq2E=->R19th+_02ltlExF&lR!@O zoF8=?g^ym=<Fy|IyqhnZ{n?y_V6ROjnD5u-(0fyEmCCC9$mXa&M|zd@HtLFCB1L0I zgZ2^LmxqG6c6?`r@>gnqRp?{IZe4g&X8}|0+NZSt22C6BwBG$BdM6lo7x@|V?#Hor zd<ClEd)K>vh`n3Geg;4EPoU!$zCVzt%1>!+%BQWnyc+Klvd<U39ln3MKDDz_pWIoY z{Z+!FtEBC|0pTvf!Q1J7gb%9&I%cYjk>FRqJUDL9DU55Jjr>rt^Mh-&52k*<OV+Ed zRdo@vj=QkOcoG}~*93HS`D5UlZ%wm~p5$&E+h>E!TqYR{<i~l$Gw8?m8Sb#3VehZ{ z!<jqnv24hoYu>E++N?WiYYaC2%0C<G>2$D`%^3{jfVTUo&ulm9mj3D&jPPNJI$pxQ z*V_2vH!;IK0r|rVZ?HxN-RzDY(QiTW&T`8yNyhM9r&t$1IDj<bJ5Fb|xcxl`h+oV4 z*%0d=&!+RF$&c?vc%bbS?>dnD$>$_`09S!={hdU$2T49)&D&%LXuSVL)sb?;7wFr2 z8nb)y0pDw1F>TxVWZ75&A4KPM3`Tt;;A<-1(+Td&oC_$q=T%P+^bVh&VNTSce#+)L zAG{Hq5wBT@K2hI&pLqxEYu>AL^$lEUO_B3Q+>ORvZnoB>Jl*C;J1<V6b_RURZDfPJ zI}ZQQdb@joy=(Xyb<RBGS?&G5?tV9VsJk{8J6Endp!P?1Kxs~-JD>=$Nh3T7R>3S- zMO(+XE!Z_b8w2m)>0b#Krh9H>Tv_28l=9;yvc^{h@j-3W%EA4C90|XS>3j4nJf&w{ zQvE1C>BLk2tD6OXW!r=J?jGiIf{(U?{T0wz`|()cNJYALjCtBL?+@SPHt=ot49~4? zccAyV57Yc46}!`EMcnGnh6uNulSr|4u5b9d9{jIvsK3jdO<&>8RM)t0?c4_+<Y^^O z%CFeoR8Mz)p`R9}Nt@=K+7!-w+7<kEU&b6bID>5?+=*AaNk2v(rby=-?2-*+1r6#p z3NPqkyU)>ho%1|Bqmqf?)jhyw;~IRaaZ&9=a|*_rLO{pT1<GS|gO-$ArSf`qv+@rF z&ql*CX}U9Gp6^PKNA**03L9Tz)`~bw%m=j9H&Wy`b5;Cf(7fSajQnT#&X}7|TD#n% zBLDT??P;HTq`5SZxvl)U$FxV2F_XIjH8=P77Q3XQw5LGjq^B;ax(?xVb0;`%v-SL7 zp1`@%2-m9Hl_*~cabLo(NL{MieIxX<Q9tXs(jzUpqY1nxgfoMWw){T3kLf$A(|l}{ z_3yyPMmy6P7tKxNWBY0T#Z&0hiup;x{X<9gBU3(io{qR{#OnooGROdaFPqQkyzje6 zlU&$*hIIL=boN6!?^0-i-(mRM*!o9!E|AV`sP1yW7JdJd-t#;{9c#imY~7SJttsn% zj9Zq~q4Zs(Z;00s;UcQDw%;X_m0({HHnG;O#sAFThX1@i66w}O7^3nDgE1n2EqK=b zoxwBTn@-{gu>DG^H`tG2-~3H+w#j^a(m~=0tFzQEzO{auzw%%}5BwSzMd|Uj)hCA@ zE|eLwN{$0(0j$s)-Rqf8h5p+eW3pX{zaKfavlZewo=fmyR(0}h`*c*cr)lBMpf8K< zO23)C$-F~&nGErQFI9U{&+%Ca7W;dy&{aI9v$PxL+(^2sIJmITe}HH1`*3~-`#FfS z4;>EJB$?AQd^JCVtqyOohX^^ELaeLR+`~<-t$4%2!jS{+5_mgv62!H-;a4{IEG!Ve z<mCEb4G;c_`!BN8_rlDV`R4WV?_me)R7JB1DAUjtw52<d-0ai#4PNdMALe_@Tj9C8 z%|875iCoW+D;bWOTvq3Td3Ogk<qz41ZQoJRJ6B?@uglG!>~yvVk@Y+u{rL)G1M|gV zu6CV!CI70+9y)_2c-bWnv2J&Wb-SZyT;k}<uI1<}Zq3oZaO+OZIrsFOOPqSfC7*uA zwVYzj@9Af`cZ9XQQ_s29r=N4{GOsTDwblURb;avBUmX)?(B<fq$vM|bd@bSHv7(y? zuRk!I<vVv^(7DS;@mXfvKap&}Hy-PEy;Hus(x1n#pL9j_S7Sljq-*jwWOML!(Vq<X z+Ml)YWWHyR{Y+i1k}t#ZgY7xuuTFQmS4tQ@S9#9kwkWUk>52rR6#YtG#r5UfWxTso z@2nkkm&0eGcbl0T^WMt(UbVY4v9vtASsaJ<Z}q)w+0&uE?}t}jWL+SST~vZEvhbkp zV3W;Quyr`bZ8tvw4x0AqUJPjdCVk2C?d4qWP}3)_^qW3m_wjK*1Twh>yXs2gt08nn zOVd7`RpOWFd3V!3^`$5MdM)KX@NZRLrplQlpD~lX{;p~l?Wg_0L%GPF)fx<Wf7`i< zoaM=KAH@^E$yucEKDYvK=f{B?8L<7lwEwPf?AP~HOs=&46}2+~U*#WVuFm(LHMR&o z!6g{MU3|X$0^hOj1rNoUr?^jscH;Qa{Rd-HjOiu!N$jP<I6gJLndoK+(H;1w8M|f= z<?@4X{-k$=cP*S<ag&mptJN?0;)A&cl!%>6p`=3>w${*vf;oTV&a=h?$d=DfarP2= zDR=!Q>ik>jsr&{{dr0@nhElp4ne3L1XWY=;pqEltig-71+1a`$B6($J(<jJVP<yVa zP~zSS&aO~)@~HOFYhJLMd|F$+lQH!I<)0XJss6I_!g<>&rD5x^cbWDnPd~ajJCHi^ zS;oIVU3f$9X>*<b9_|k~j!n~4b?z?;-CCcGcq78S-uG;2+Sk+bdd;tDT)6&&;5^-1 zwmL4<`+T}-A2#-z{`zW{>SBD!NA>CcKIjzClJ!*OH(Oys_Ac*2I;*?Xt#K2n57&z0 zWuG)YD53*<jjqf1E99+ymA5?0-Y3xM%yA@F#y=6Ch=(+nYVeWxDw4GmZh-k<iFx3V z&QQQ3|D@;ezc_0=TLxf!P7&V0=R4Ilbh(_hhf90zCm&Y0ctdk6<Bw){`KDuhD||OR ze&dAhA<+G~=wQ|o(DgcJ9F?*Bl+)f*zdVuK=oVgMtg*2#KZ4{z?+MCI5l*2Odv0`| z+HB)q4a0E-9OC1O@Egj}dGQy+&#aBvC)^NyAD%hR*f$l-lQ&I)2N%p!kiUNLvNag5 zKk#SNzkH6{*gw<iKJaJOzXbhD!Y|=ErECsxwq&12^c=#2&;QNSGhgybGhg%uW}fu= z`2G~K?+wp<*&CX9%IoLbR7Ji4R4}=u{`^QXYc|UR;PwzQ{{fe*?Mh}{(^KpX-|#)z z&w|0-a(cDeN2e9=;q~GdO*1ZsYc1#j2Tj&bR#{^&_`g*(`5vPjJaDD#U-19X;p<#& z3>phRhs$m(n#=K=;dxy0M7*82_P}=#e#Yc#inFq1_X>6W9FVx$P0XPxoL}DSE*ra( zdC^_?qG(I-DZlJ8|F_bt$wGH%ec0n2bkB5gmk#3&YxF->y34lb+(+BH7{<Va<mrR0 zV;^VZP6b^6kIN3fveWsj=lqfSMw`DWdYUg`)Y+U5J)Je)OS%tFlLn0Z$M3*@zl8tq zM)u%NL~z;Om3#G0dGLEQ*S5L&yq|I>eRlzUtg+w4myJK|yVS$rL3Q)4b!<OA2mGS- z5m)59y6Lf9^m~f#?r!J)a^~0EXDS>REZ{-!=+B*F2Z^)Jk)EV`{KfN_TyC*`-${PM zVN{;7cMC?rqBQ97B7L(p0HyQ(i_=wbi>-gS$@z!5o8vI|aFZ`hn)&RBXNcQc9&y>N zTd+Owzh>1ZY~6(_&q`lUc<~fxu}`w%%5NjTOE~MSdydjQ?8gNk9oApkCZ0V44w<+3 z&^)R8N;CK4)8k%8&bKUZZs7`GZRukk%4(c%cI*gpc+mDKyrDE^D4T%c67e`;{^Um2 zLz|cLD+t$qsgSFUKpSixaQ=$Y2K@Ig=)QZNzx6O@1B5^MGtnRHKZM7y)%9%YLy}c* zcpSMKM;^zK$8qFu9GT>sX+^%7#y1W;Y?H`_@wRC{*+bW<{I?hSKExV}5Z^L<#lV{P zFFZv1!u$Fx=ji^2_WVQFI``f^3kwq?j9I(gx9D#ozl)C%A7TyjQPvUJ^TqeJv@hcy zR8ncg|60++e83Cn_C4sO3Bk*_YjETDBSX5(J%^*kEsT-)IHlh<$=42TB`ea6(9C>* z@Ri2m_m4ws{2sn&uIG^6B|@8@pc}L3s)lbcIG0p(%;kHnefnLm`2GBfwL8MJ;YFCp z<3VTkDqptXS~_P%2RB#Ddr9W!q67H0kh1bUSo}`EPjTS+bbZ7xx|aS~OTUYDqCDpd z!?roM6x0=l!kyA=Tnv1Y#TDl$;T%Y3ned&+XYyTJyX!Q)QDin9`J-8BOqb!Etic8y z^jt(=nY^XNSDu|IHeO5e+~i(#$<En8R<mw8sB`rgc+flDz0L-w+5Ca5=>z1&{J|-= zbsM}J_^euhV?LPUrrd`*r@@10AJ?P#rsm^TXW}gSbDidU_%yeE-0H)A(V2Vj2)>0+ zzbJV0r#rRBUMAeg&(FI2?z9_wo)@D9oi)&Yb0>R3dNiWj^syj5jlN3Hx=*9IbI3c| zAUm5+wCEevIg_mo)V+(}3Dtd>$s={<-9hYzUG8ihn{R9{@9<+uUQiX%vu1nhJMH+< zT>fB7Hb3fVU45Q=in_+SNGrRuJiiplIPq_BMmabi)#Sc6onX$BaIZ{beel~2XdkPO zwq(bA&fq419o?unVXMO9CG>L;u7;l->&bQ|TQn79!j)h{_uNZe9~Vw)Wg9;>>AmKd zW6l5Hm}gGL=a`+0i-RSzpN?$tGJFp?!@Scyob)cyoc`fvkNLfK$r$;-#n~|YVHm!q zaI)k%-D4r0I`*t^pJLA}pNbgDUNKEN=YKyv%{#-%P#Bg$N-{eu-?AI!jO?i0l~dIG z(Cl@d$6it1Y_RrmK>4uasZaAr)rFnAqR&uvF5}r7;ze}SPn~xr&;cqVy4M76Fds>( zEwz&ZRQgW%!8eEo{U{Rwe&(Ga{O|$tG?19ozK?Fz$-Ju=@xf2a3$K`6t#aZU^ignk zG=5QR^Cf#xCDW2M=0k356doIKAJW`zAi+4Z3tcgID1W%qbEd1hY%F2U7L0Y|9Rw%9 z8T1wYEz0J$_ctvpOl6Uy_qcBf57V9S_@I~78Vu#^o=c@8Tg>x5^abJPALld3zAc{t zuq|m*?FqI_)y@-mQ|cqI^Bn}vk1o<B&wgm}U!8R9sN{6)-E>)W{Lrn!q42<5>YTl} z32318AftisPo8sV;L|R30i%7-N%8iQyG45+q(^IIf57a@1Hc80Mf5E`c$7pN{K8!7 z<95$ngAVG0o$CO%>ZjQZ()**(vWtGwp7x&i<gpK4rN2GUwF0kfQQm;InYmzo6wyfa zFc1D=dKlY=W*_PdX!jVQ((7jk`H7wupK@<Zce*#QTOD>RI##|XY~M~dk4}99+wDs7 z`kaf-VRz$0@_Nz1uTJODq4<wfPUoSJmDd{d7@~e?VR8VhncbXgf*#`AY4WQK>vf6R zTnGnYH162Dn-;z-+wFX`f&!7xs36=!vsY(WkL}w64Vc>)-hc^QHPwJc?bJ!PJ`-mg z-$32zNKT>QI*S8iW8B6@a_DyPBdNgmp~n@b+=t(%vIcJ@D;QBy4S39FqkIuek<6iA zRy+1>V8=9cjOvh%iTY0652~&PKMlf9KJe2A@j-Fdx`l^2DU`T`^|=0A`nnMA>q)DY za$a^v?x8$5-H-PA^>mNtx39)evJmy*v992Lz|3_Ef3Ny<x86haGJTi6L&02Y#GTFW z_WJU7c}3>=bM9Kc_cT~s(>_bLYyE57EPG_nh_-g;UJCz;(>x42HTe*5T3>gGrYWr* zCLdE8Kgo&WZg%Njfla^vqdhZEG*@T-u=&W$mzpPLzSvxwd8+x)%#+OrW*%?m+wsl! zO5cIA%hDs>E7}8E7~xKChAz_np5F%2M@h5$M0n<IQ!L*R?<=HftwVP0x@5)skK-rx z9qn!1`4Qc7>fOtGeVbFZf&5Etq<x&U7s!L%0yajxyLsN2DS7`~Wy#Y{+Fhiv2hr0V zr|kE2?;!2V%gS}}{13Fvep>fBzaOAS|D3eHAx Kjim)%5@Q*CG1#Qp0BTsxW6Os z_jvy|Vc9rbkMsV=VO?*M=QZ;DB56M&?OTF9<$mdRr0Yok2I-<ddm7vVzc)xLkk+U# zGva+#&(Rv+m~5_6V2{@Z1Nx;a-Vu$f>8khHacDIrS}yKA3gtsBTibBfB2RD32J`ZW z#}zUUIThKctb<Kk+DZ2fa9>mXdZ#pWy77->M0}*QU`!73aj$L4ZD>mzn{q#5Uf*== zN%xw3BJzcY?Yz!f;OqW|Q#tuI@bm8VHym2i^Ck4zO_N<(U)9`LKJrbEHt$s#_-`+K zu}=QjNcP63n)hOpzqaY5du?ipF@$GydV;t&PC4dMY5y+y34dvfbph>Pc!T{4@BJ)i zwS{-aqs?kZZKzGPgEZquXFi*`Bq865e2KDm>C5Z>Y&JJ_jI$8cpdV9Dp)>Q~?X-K% z-`Ag08$RU)liD`8C-Er(m%p7pQJ$M8yJmP^4zKc#pKRVMxK*d>5$p!{vihR;J$Jbz zefv$dhkro+0`KrDmpq)nXOLq40lh>k;eCer<qYeq_?CjbUtb9Bd6EuOJq<igI&W$c ze8=FA=pXoeZ4FK9kREmR9vCscvG2kY_bG?Hx9vgR^{G#4-$Hy1je77a*je4@(Ltm9 z;EmcdF5~!4rRFeo;+8J|L+l*2(p8uK8g-3^<7}BkTZh~BoAnST^7P5Sr!_~jtH1|# zzkSoJ0oMth*VE4W^>g98uub*jOG}ZrmG7S|@!iDEfy)$CeeLA6y~9y|p~?THcX4^q zJLam;>s(oi(&VRCKGCF+2JGPa!iO~;1oxWi{=iL=fk^(|Zb+RSQQp8-p{;8J8D>rt zj0x9=;RnKSI1EFbqcJ1mE8EA(o<s2zycPH&rUIXx@3h|_=qt8EQsu-irnAxYQ5}*s z^_h3J9*+(x$X=n(>gPwKcMPw|#H)G-J%t<bS3&En3J)DZi#+I(hgicn#Jb3#QI|RN z0PY&@nK(M?E;@RMwZjKlJ3PqR;r(vi(Ffdyqx<=``YC*^U%<zHf<37x@gYyS6744F z%g}|sTZ>P5AV0;vf&K8N#$E0j^3WH&m%m1Pv`QiDLs4J#?8W+y{}=jsT5m3FdX(|% z1-I?c9PmB^ysTLsVy*J%9PqJ*d6f0bqpVx9?zGam#lJxpNQNF19>gocsVg;nh#E&t zPYVX&CVJL5!dSyS>WmT4LidAN9ioYR&d^0=^rt-IjQQh?`QwcF<Ba*^*aG8>`{RuJ ziFw)M%||2qN&XO}N#+*Qg8N2H4nrF-s^4@s?ILUX4s7Gz67gk}N4A@U3%g%;z1zJx z`2$xyI}_P=jxhjvP=2)$FNc&wHfU(`1<zz{{0W95Wv#0_`GHpJ#q20NH|V_i{nSw5 zTipEVnP44w{0lvoeAZpB3D#9hpRPzrm!hB9L%W<;r+mq)sDF($Sa(gjyEM8qe@7)4 ze@%%{w{S>cav>Wvf8b+h(a8%@pYzTBjzDJi4a@hUKI40NQMiI<y?`#k+N7RU$M^~6 z@AL3$18?kyI%a#3v`2Z9^Dmkcj*Whm0EVzEz8ZKVT6^MtC9U)3w|(ragSW@PJ^Itr zTof5yQ#i;tN_q^g)*hd^9xzT5*5SF7yP;b?BJR>X%X~%m$}X<QF2b*Q-m6RdZF!gU zkvy|%o3+-)eUkKXK<hd>i@+Fvx#n0s<@3>bVPPqqncEqiZ`eurHt39>`fbuV`B8VR zpG_ORgd_N^tY`4S$a5&LWd@~VKlngj`LTcQ?r7IotveXKe0ebKDt2y3`X<ZRT0mZd z@%uD;7+2`u9CXXGpX3ZQTIAzK|9<PI_0MR_JYt&iZ-<ZRU&F2p``55L(J{zz&`<HJ zp0&rAy@#uX19)J7b@_hQ<@?6Dw=v}5l6XKo`?JgG4S({}`uC5JQ|;vm=9N^gxMU=f zH^Eqgeo>nE0{CCrguUge*pVfZzby0%>_Ns2>c~d<L*K@$ZgNph;eV6ssEtTR2rnj= ztW(+^pzHPx*Uq5+ChabIZkcBv3VUT(^GC-c2Y0b<!Pu5^H)6pukDNmO_~w*w<Pz1A zpJ3lcx>{AJdh=y;i=H{-E!agf(bT6bFvs@~+5UCu(0sy0YyByenLUmzwLjfGKc#sd zdX)XCwEy#*r@5k(M1OwzJo@t(;~8bNCel|%j}kZjL(fEeS=^_y-K7JSC3-g_Jqqq3 z90_OYUYsuO1ou0$M+e%Z>?JZ~{T&2<BQCG+*CChSFDpNH9=)2Be#_jibsyIk)M@kZ zMf@f4PV8olGr`I^q3V-<)-!m#J%0dP?nWolZY0}`Rjsaqul*q32YP^|2aTJR@SBHk zbx)mm<{12>GeE)pbU%Wh#79f-r&GuIgHN7brW>^%W?=lY*fGp2^c{eis^a0Chxxnq zYuWgMUZwBOFBNhdJDI092lkxmg^n+Xk2Gg8d1mbs`e*g5deit8R8IAf_baML`51>X z*nRC$IiGgvkA25QdGJYWP`R<BONIHfl<A1-RhlbRbJSsN={c;!o@sYg)Na(Kida5i zi{Q3;NS^@@YJVJ^Dw_^Gmd1sjb9K?M>PbK+?5$K7CKW<MdnQcQt9*y5YG>`z_72>J zd0WHK(y1d#w>l{s)g9O>)zDUnLU66}(iQbd^vtN82j)zOzLjv}YxOPIKL@!B@Hu?L ztdrJQOQ<~qpA4nN$6lSd!J~9+VU<J1bWc_&GdHcO&ryD)Q8!#nopaQ8ko^kJQ0@S~ zIqDRzbGIk&f;#mMc;u^5y};2<z6^5ffG1<{C{I{6^zkj01^;fcA3amFGw;Gp%H8xX z$_MZO12P%FbB4NKrp{Lgv6tyrrv9w8mnJ<;y7m?2+;R2<MDURhIne!&I>%)DCTpL8 z=dlsmSm%v+QT=7iYlZi8*H)MAN@eV8o#uJ06W#;{Y?utT4E$@na?brP!m;Ec2m_k_ z<Db*HKE_DdH{fCb|7geLq{~A862BpSd42`biiCZ<?<a12#j~AD9iQUeqwwWPXfeeZ zFXkTLAWb|)+-!Z~vcZ;&W#H=+``NbQW4C+WvHu3ZUq5BHp-)N^Pk=vkhuw=Xe+b$g z&AIPP=ER?EW!H9j8LKkz?fGrNog|-1x$QfIW8Q1bOAx}f4ul2ihr7Y?l$+6h5T)hY zoHr(_`<c0DKNEFo4*V(YKY&NR0X;fYj<ZmYs9gUPcU5AqsCD>WYd$%~CP!U9bx>ye zj;M_4Q5nh}wzjzMO=Ydz!E_IHJL|i&7}mjBu<u5*J@7*Ze3A#Y0yghDzk(g?0~h1p z3^uj)(&IBLP_kM0A3x^$Xfv;R2n+C3Z&aRn{KvHhOZy4>^AqvbVFp^tUW`8>e;B^Y zKf@j>^=*sGPCf^Z(mr+A8U=eT8gRz@8;4bWo?<`~ZHRBee}yf!ebW@}s1N>UvR%g} z;d#DQ>qgrzXPjQ+cOv7n{pj~XuC2>p3GM>_An>eqpW+U!Pfi>Mzs+So{jV3ki*4a$ zm{)Vorzd?(-^ykm7>z2ue+b=5dW6r(S19+vkS_Wz%&~?4;`zm%&jOd`7SqkHgZ^ix zTflJ=A3&4q?SKC4)6^*(`}n-qxCgRbz@9?RyEq?~o;ksK5b_~fg!pggeO`18X<krY zGiSJeB%qgQpnJ>n(2D!0Ut5Jut?#WQ^`7|Kqa$rlkJd(eoIkO8W8XqaeV=OMe(Xup z5!+Y~-O75_Id|eqM_}{qs7;v+2XZTT`1S&_$38M=V>PnZhwSOB=CH<cWUm<PwVh<I zZ57$Wclw>9xhu<dp5Tv-|J(Rh%C2NlJXeGNT}gTg-s!|NxyJp5#k;s`vC|E~!`xZo zK1ICMpUg)1(|y}(Bxmq&JLjT1;N#46Cp9sq$TlNB#QIGO>rBJS$8*1Q72&{C))l9- zu8;Mps15Fmu{I>n(Vh&Q!}t_@==^<Y?z6<7>Q8n-uNldN`91e$yEIl~2cti3zRs^y zbIKpk_2%nTW~`G8OLasd&=1?6m0SrXm62U0U7#|ghx*{=>jJo4LV56~+Iq8OsejZZ zBA$)w0F{>>P~C!w{`Uie@R|+r+TYK-skj?|{^-K~-ar>7r@LG~b!LU1eA0b#Drx=T z9DAc5s$-q%IGpE>lEt!#70NX)DF=OhaAmlmzk<<Vqb)*flQU69i?M?1XZ&82b${4w zR^dAz$oD5F9tDV0r!V>SS{7y3<aQ9a&ouhg;`Wz%CjW>uzL%5!+QKXSXLN7L&F`3; zb8hmhL3-wE3;)@01J6v;{xq<l>$}`+H3#nW4T-dP4|(j6EFzN{tK@5I>}7=?H!2VL zTSFO_o{V_30FU;<qx!zbavoiEJ{~n3!KctNxpBinQ8F~OnZ5Z{ligutcL>=%pG~-p zwagOoD;Z+s$mY;_#onP{PUxruS$<V>GL5;$#|K-V(pVeHK6a1nH*iGy&zN@}y%5a( zKGXV?Y#G`xe?b1=+Fn$9FlR%5$K$4({I&N_xwQwT-P$VQLEt&Zj$yyq2H7p?S<V;o zSHFMl*Xsw@z91PwpTzHz<g9vonR?k>dGo)m?_c{O`Ce2z_0hH8tXJ2*q`3O4dg$ZR z(q-eP-R;t4^@FXab$<}@UCQ6T_5u2^MDNM2Fk2lPgL;zaTJFTgAI}+ictt$2qi0|1 zQ+|cHX_Yy)c(}z|$5;^fqQ78!G;~fOuX-p`U_IZ<|K-iB^Kjnnj<vn4KQzHdtgqVK z4PVR6+7~OIgW{hjuCp(Se<iG=U2_n%hfSDJJq9E715d@Lp6SZk>h#Fkd)4=;5%67E zdw}0T((eP`EAo`91a>21!f?bB0p3DBnm?D1BHYS%XJrl;A64k@5%4?#K9AN$*S=Ug zxb~&m{<UA9tggL(?^M6<O5h1T5#P9%4~4vf4PGi4zc8b{Ofoo@So_jg^V)A7ZdrQ} zo#?qci#@Knef6}`efpR1_}bfmbFcPygLBORcN^{>WlY5m0*>Hr+Y_j0coICfh(?sX z58QE=>)NXHbIRS)tGMtuPFcend<w44IXfjep>Ju)Ovv}aS`hd-Oc~lp1U!GU`8TM; z{1tIrX>Y3Pu{|Jz_*R3tK?Z%NyUjiLp1D;O*}Ub3$<eh3bskBuP3~WNP<8h-tu@<O zG8Fb}O;1znQxP8kL$mC`sf6`miN8eoBbbnxABlERpP(1(U2E?%x-iF5eaMk;rFC#` zivB^9D&wy9M`VOY^+9kmMs@X;H$15N$-hQ;R(WW5|KX+p?x<bn@}6tzMJR76t9|6L zp_72+r4S!W_Se)#Tc2Wlx>>NH_Z({(I)mNHomr9})~`LSVZVzs?Z03QxaC#m(j7eO zyRD69#g)z+yP<c)yTDPPUfK6|QszR|D((vEb$5|=2Wh&et5FZnI-lBjMh~;OZKLh! zr2p?y8?}?nJ5R{hbIZ4dmx;&Ss)^CH2Wn5Ux4qM~)Sh5Y4Ic?l;3VW5Yy{}r(}_Jo z8E}4J^R=9JsPr4%e>(hLGvmQpwLftX-hmFn^~&W8|Am#_g=0hk&>DZx=0(l}6wsZ) z`M*D8-HQEo*opzIpd<5VXZMNo#m@Q^`g*_7>LNFJItR{X^N;JSkKJ>oZ^~XKy0OOr zd^6GqbYw2*={)L2HJoxg?iefM!y9o>eaZ8;DWfr1wD0D3DS7_G(mdX!q;rPf!{fhL zmU~MU3T5r@@CK!KfjMdWtX^iFpc9x!*^~Zm)(wcWKj!)<&VKaaC|(=UIMn82qiOAC zt<rg4RvE&fC?Dmojm58v;tEwqSUxTI9xj{xps**(cereKlo>3<-x;NYlWY{Xx^@9i zBG^+5|Hbc`UZ1C5)L9g4gqx#s)Ylh_zc-3gcW)F|sPaL78~0#D@D7A^zAws8ouyd( znkY`4{ZU*Y&uNt<Y>m>1bM`L4J8*VH@v!X(*Xxwd9;o1Zg4`*<diGZ7NX-|SL+Tt^ zBFMAzex7r+xxg<Yeq5n1|30dVdbVL--2GN{!H*-VFXSQJNAN_%L+VeQcZfIomU6%R z1D+)xMoZ*Ex<=obmG2;_yrgCF&+=_J>_Eo57MH+^^^eXmKgp5C?DN$Ao+)TMn!P+z zbw|`LI7{Wze4kKz=wkSE6Wr4tJf|Z(#_`KN5ba8r?$Mb@o;!LD&<5o!?LD#$cl5an z)71vd$c5xl<--1R51P9t>c7d*Uj#A~;Z*p<cW3gXc2=a%R7jt>fFJVTIkygIWBqtL zG!Au!_HG2YCPdzM1FOj*>AELDYtvYA8za8DK>aG>cgr*Pa(;C`ef){;%%a>sHC%6T ztr5OBB~hiFyL88B)K_5SJkE|=)#ngD&6K@dWsd+u&lYHv#HUBw@ON`WmpC0_b!AkK z>f^n9oKasIx+%(QzESe3p7Y^Hwlh2=``LVyf?e_;SghPt?OlumZ}%*2a9%YU2Lk)0 zV^P;1%Ha>RaR8lsf1bS~=jwd-#QAmptsfl&UdsNu^kT|2o{z4e^J~lUOb0sO{kwR& z>SJD-q|e&JAH}tQ-{O-~?)oTxe98?UMmCk7csUjyit>>E+F1O$C{BL)=B!TQJyD$e z@&QF{y)%jfkNjX!{$eb?If_%ZFBX4q6sK%&6sN6$Sp0oaoU)}@{F*3E+5T8O9gFL1 zgTX@{Y`g|+@=rzSTcbF%*+sr>(KGQC@k@H6-mpw~PilZ?^x&_+GfT@R!uF0WmX%(l zE`9&OvBotg8X>QCPn*_I0zH}D&)l8$MAq6^&(b;~b$3|1oZVar))1x!KfKL;++?tX zcqt5`V=C^QRyKs)B^vtW9l($(j-X#mmj^HcA3EdKU4k)!OF9C2HgMs)LhfWI`ht5Y zq<`r15?ms~EA|OE8vRil<ZBha2$OzWTJpZc4i0U;EOuUSSGeZ*<dHod%J!wQ?MyE5 zl_HCmVf(Ny<YoEkz7Xw;Vy|qlmxVTesI$&I|Egq>cZ%;(8t?v2?MoMfk4`sddiHKh z(;iL63iTCS=v=6D-hJ|MNMGrhIpR*~t+7G$8Q)9HvrZcM8>2j&4MBG={DbmEut<-x zFX6X)xpxHEKg<~HvEGs_j$EZRmWu^vaRk3GbH&1(o&Rfwukt+e-N)3vs2-lLX~6%u z=@pIrrrQY{V=nQAO+(qUJTq6mRknb1dZu?M^$AX|uMT*ky1xg#6XN2Xs^7+U>UZgC z6?&@gY0V45J~rxJKAzLY-|DVv#+jt}Nn?-7oNwHrUe>*C{Q<bLu|{^f+5^U5tOQ=+ zQFSO34Fz9(9_8j6K7^HdXcXi!FVKAhVcqNzd2<0;Xm0);wTTT|4c0-D+ah{8cuaHw zmUG5H;W6cI`@UdW@jZ4HbGbI^-=I9i<y-!zgh@iJX*LnpN=t{v`((wv;BPMA2fpnt z^&NiA^Imoi-xJqZbX$q%)%<!WvpPSr@GS8z;x-OZpYB=KKJ<$z^F`G~o|k(AKkVc2 zy0J-Clc(;GZ`L_mV?1A=9nnJj>so7rjMH7#_Qsm%37nK&Puc%@g|eMt*&)H7e`et) z@Ro-?!>tSLm!qF1;$_JDkV|JvVLr2a!hH8DAMYO(Y}D0G9_cQt3qD0ItUlxt_|HQd z;aoh!`xRwE^+tKx;10!UufuFb;F1ooKeM-P`+?o*zSve|*WG62B3@;GMNIG7TxwD8 zF0t!A6yZYh72#j<B^*kA8vP3Fb=`%OR9nzl_h$WKNYC$+Piym0UmG?WdQ&{N8~%8A zSWfq0CuFD5hRTV5|0@6d!cSC3h+{v*ZTDN?*4jW1{v2(z=J`fBzM}-|Q~BBmdK2F{ zV`T##&OpX=;cb5-xFdLJf1}zKOu)fC$G85vUy_c#?FZVA5#<y7DtC_DPo78aV|JmF zuaB`KzZ-cUbvdmeX)H>YygjlNZQV$Ed{^?D%jI6<V#?iKRDQ)3qCXn(l>3$M@~m$u z1@GAVqkM(^uFcx0*nWUi0Um@7SBRg8FUtRDApc5FR=w*KQs+%$oyh;F>maY>|02TG zq?h!bcp(3y$p5Ix|7H4ytI7YUgOx20I>37mYbl}pM}CN)?qKY{{bRsbh{aQ}_>f>= zzhY}3cj-ae|Ez4AFpV{!U%7$j{pznPWpm)p?%`9vnID|x{jV`!wDY*=5x!%#IB#CO zi%;h{bQhoa{`QZtUeT~G;&?V3FXBI*CvHFLTVw$pPNP#9OM!1tFw4eK{m@(Mqn0PM znf}V!3CqP~H+6oS>GqGA%@oo+U3LGleq6G2`!3CO1Ov42js7F<F!e+-`zN9e`OLm< zz{-2^53(wHh&R?#pYEdh7sRioE{z2PJg?$ezQ#NG=?=8_$d;nMk4r9iz99Zg{(In^ zCzVEgAMs6$2M_iJ<H2J=-d}l1a6~wH+jtIfXgHlhj{-OMOzacRV*N5(S?}Ph_TK&2 z8?3RzPw4v4PLAjjvyD|Jdb?FTt-W(PuO++&JazleF^^y2ZpW;AFFE;K#81?reA-Wi zd|zzz4(n<Hx5l43ze~Q2qQB~|ox`J6XCkUoq4F~xsy|8kbzjt1$%O2Oh|kDlIzjbX z|7r7W*8efpFM8-+K$S(Vy1_?G=NNt(_Vsyfc5HQxVY1yLJVf|Zy&*ntq+jQe(G~kI z_!>69aBK1t^)u9kE3|X>Kcbz6oU8xh*X8;@F>iYb0-G<IGsrifdBX&23WwQSQDvXb zB<p0{%cc2D2R=IO50-voFJV{j2zx~C<Xn{9|FZbq?>y%~k++TVp|Do-hMUUf2mG6V z&rP)F`pRv6^%3Mo^B?GC`_0Otm3=3GwI1GevFB$nIHM_?!8^yN;cI@G{C=lBwM%W- z#dWZFe}ca3H~(G6`oek#>k$d*T-wK{lI=nVv2Iy}_u=DhG`_cLa~RnZk~j7ozajl> zdQ19gNc6w?_tX#B721QQzTk!G0zSJFdmMa@gGZf>JO|Ig_}X53K<hTF8N#cqr**sQ zSYKzn6@G<t;aX!m{LJ;HhU@ka*B#mi9obmGBV1q9!1buULkO-PkKx(}*9l-{eMs;# zhVY$Y>J_d79hOGhH|cpgA$)(tO*8-Cm&qS9d^grzVr!1);(B5c*TSFfa|`fo_dm9Z zXIO{A4;{=C)!tGZ<M-V~+LmQFo(yr^^wv05eKrpc*STj{r>^0L3HZ3G`ARaNeQQ-~ zjmkgP**bxY_p)cGLuu@xDzK+Yzdrb^(eH?k^{U&)Z#Ta^{O(pd;a=LErM-UI%hXuc ztes*HA?u;oaCYXWew|Bt?zL6*Ygw<1-Jy&hWNUrYZKI9~;a0-!{C0%(-cG&2{Q;~E zu{Nr?z3zz%c>4)_=-6cWrwCd1ZaXYqrcWcSx2rEceC}8H$wt(^WY)2@4&CZLa{bti z>O1zMW6u_O=yEQ=iG0W(`DX!cIC022iS|1xPgIY}t1guv+vK({FR%RcG0#4T71r%O zvP0{3^l_M9KfeKfrLez4Mn97s)|Mxchi1+N2K{EQ!bh$bEs=?S;9BKM$VX@EKBF6- z4kf(^Klj(AU&u49XP;|TjP90qZ<H7M_VXJSp8{)x&h-6Z;LD~!fYv-$;3pP!t2y|3 zm0*eFP<>WhdNPQAq*rm;5WO4qM|?!R!Ma?0EpDlAwijNaE%sN>qKD_%FIk<;vA<;7 z_?O&v$rU<gN7VlGO{~q_VEYM5qWg3i9mGBp!X)7^q4sZX1&2F`GroP~VdXQJ3Gew2 zMSuEc*FJp<dj+@QzZq?<^$fX!@zJDsgS!q&?keZ3?q1&Cr*}O`^Sd-tXP;kHee@f; zq};Dwt-O~wcfoXt{V@)@4dD|VZ9QP+-i@Av7kM7AHpn}s^)B@A#_Yo10Yfp$t8&zz zAKOpf3UXVb-bwg!(&{Xb?}%Rs_}8CBSL|=yOPRd*L-~7XOLh9caa3(!A5`U|lJ5yS z=2w4#x*afzPH*i?uQv3#eCaREu$DX{xs1_`HSZm|<IvVqXOSy#B>MI2LbeCt%QEjt z6OV9T&NhXlv$htbb4SiL;UId}d+uJ@25jfZQpig>_cRYIjr(1JVPEYy{RcmsJP%<2 z*PZO6A)o5U?&7YiV4RA0Qekb>^;vzfK2di^Z4TWz3oll=a~ppGyl|o903MYrGKx3` zRFjzmGFMa@?ey1#TghRPd{t+92AMUQs|@lnAUWh$;x~l+%J;4PQMRv*y!Q%Ul!u<+ zB9Ld^nLHN_ztlsy4&K?`Tf!mgDCL`+2W@3nTb<Cmi)Za!UTQxqoeRHYG+i7+vZ8O$ z|0?~5wtjF&l<<q~bER|??X{x!OW=K&{R2bz0(2j%+HGYnm&@GYF4CSdo|9vnZ4KFU zm|tqAzKLhtVPMm~Hr~5?CUg(#S7mohD}SDKf|1rf;~RLI_#V>w4KLl`FUx!MdvVTe zfnoZW#fBQ@xnFhrgXX7Q<L<$Zt2Fd@Lix1kAnp&8-jjajUXp?IEW9F^)Q?VZnrDpE zITF@uRVOrF?d~abMX<S9czPLZDO|pkzngTOP0vUC=nqbG3GPcu#x@$Wwp)L!U-0Tk zYp?a!NlxhdjfF1Bvh=mpmv_6_pEwL$NyealcMy9`drV26rakpDKBm#uFhAX^c}|~W zaum=$;(hXp#%2?ra9excqj7d3M?E{ZEB;dPFErQLBUc|Gt}u{g8-HcTfj{~M%;nZ$ z^+#pE+gj;9-t8dWcv$`7`F5Tc``zVk7axJcJLpq|@LKx3b&PWGov*rpWjoK?f7X7f zPi{8UQ}nSu3m$2Yx+>VUEham=kex71bf^6<p^IA8K7F__?AO*<ztV53UwL=C>eswb z{ZgG)_ioywFVsyv;H=Z_lMiK@5WJM4c7SP*><;#&@(pRLV~<aM(OWi_?905*UL4Y7 zv$VRMzd#$T`!9Tzy0$CdO89b%dO$k$99}R!m~yw*o`Gk<nc<K9(sj~=KX~DGc%Xvr zx>9^XTzJ~B98bbgzyn6}1`ilL&(8yI2v;F~HvT_=A73~Tj)WiKNw`@FFOhsi{mUPB zTj^s`c&3kA@dxzuUK{S&WX_|0M1T5L0<`csGlAU?=BG?Y$rq!$e|45(t<qDjf{!no z<5?<5exM|Alb7fnVNd=5cI*LsYrI!_eU7{bIG^&IbAnTQXn%$_hu@-2dq*3CVVhca zP@BVHo2~IS;g=T+XE^^adv2LcFvDHf+Hd9NPr)<QT=5CciBxUuNTGjAXn*zBzBjAB zPkfUzG5dotHRV3qCKxrg>ThG&J*MZwc!DUi23h_2p3cl0_^DdqDdAOj_{+!D(v#oN zM|nHH$uk-%jV_@+Xx`JgVW{U(_DbBCU6Y>2hYvk;S7_#&?iS4@Gv9I0m%pm?PvtS{ zOiv6tk5K;ffR-ahOPe>Q@8r8{{E_!}1RwddA8e79_~7F2$@g!T;q`amN71r%nmHiv z|2MVWlh2%r;KW48ErS)FF<1=-<)_{4DyzEq-j`S8e2?bTz3dMJKc=&RtQxFWHC51S zxmp>>N&&2t{aT*;cEgaluss*}F369F|1t2j6aQft?<Ma5ZHh0xVep?=_&#|`;=xu| zd6!>d|4gZbUJ@RmMJ3IiK)j{QNz|{yU73GJ*+1`j=Y`u2cU`!Sa3VABSW{c?ysUh? zA5B|dP6a%2p)X%}HV3b1AJaR<@9e!#fR`TOmmQGYC+hGekj{ES@t9kHH*{Zu__vw3 z*3B+(Egaw7qrJ7l^+%y6vKP`ddRD)B^6dj^-{9EPKH%k{E#FAttlQamAFWKu=-wzZ zU1%Q=9O5_hN`bk{igQBc33ZI@>ZfP^fc^7-;C66-r_PXNk)NTNFL9Rai=1nDigPVb zvWM{rWQsl7y1&ZJKb@2Bggxkq@jr7egDzITdYU${e_-Tf-cQ~=ankU2UwY1+Da^S~ zhWPj-ee5RfyM(_=81m@I)7W2c^8A02zL1{t*6EqL{ulZ&gdb*sIuhtXtvRPQeZjR0 z*W}gx0pFCIO^l-3@Ph^T9YH5rnji9_{L#O!cQIakYB?`zeJMT5Sj--;i9<pC|2KPY z10L5^-FxpjGb72e?2IK@RveQYNu#lFgfnqOFu4khM<21NlPI<Vp`^7w{Xt|~*mB}P zZkfn(5~xrV;{+GdR>+EDK*;7cp}xFnF-}O`HuSo;E=}+CTU6sfdI?}?fB+_XfB${X zkw)@ILTR6;@AJNTJl^N*kG0ocd+oK>Ui;(F|A#HlANSiBRvTN#soNRcMc>k=38yId z28dsO>)ooK__xr8IbW<&f40pxDaH$R#CL-Q^)Mwa8>BAVj$ZSat>?MPdR)Jr;=y5X z@y1jh?N~6Q9WTyo2jzwYoAA?#+#<nI827^}o^=-&W2klLi{-YTA_|F5T0F;*1L2Z~ zNLM@WoQ`uU8|O_ka7Gr`GEdpDFkKc<1AkMp;I#|j{r8DTkzkxi<Q3iLhZ#Q{^<+Y; z^7Q#}FM6`U#vM-N72EX-(*Du53)w*4Q~tP#g<MZIsEv{jY8Sj4RevPH#Tu_eN>kaa zeo3m0@Sn#2J0(y2@qfLVGvE~6hc8hwV3|$3gbdI)j&%ew0Db^2GN4d!EZv2ZWI(vI zRyZhbESE8z>t@V@*jwD2>2S|)ysv0HyG^!i>H=jWlm#Z~%**jb9)OQFXfJ;oav2|$ z|1R5bF>52p&-Wa{ZXo>&n#;$xO-w9FqxZgK#~ow!VA<eP-nb~~H5tL!bDe#U6r!8_ zc6>qcf&NT{=X3wz{8#Z`IfXaT_BMC+o(fKb^_Xsp19}S`YvqUTB%p5OhsoQMFyU&( zJp8_1`HG(n@*Gs2Taihn#ed<|spt5k;^($6=$jpb`#qeXZKZHR25bMjY#8Zl>C;j_ zUhwTR@gd@;$sOJo`T4X*k^Zt{C6{=+2L>IyFk4RT?QO0HhkN3?OY8mT1M%He_Bp<r zT`aUs+F&Z5>!;NOX_=|C`Tz#-R@Wl~oOlCz6&nqluaR7|>%md22j{GwIhNwPOR(`R zEjfo#;>%^jo{6^4@ct4%Tc_IX$DJX3g7}s3-3!>mYRi`L?2;$N`xoF1o%_%oM2c@I zmi!;lUL8+<o1xOO!f}&(=sEmy&)G4-dC-Y-;ss}%u?H^-Z*)zHyJ&0it1U-I)!?^G zVwY7jFRsEz5`P#SBz_H#+cgvH!l^&Sd9uA^j-K(2<f6mu9V7wIQ3v1dm^fFRHenxz z&TnweiSMgw9@d+gZZm4$$^1ccj6x)o<{1`ebhMK!EpxgFm+_694{=_Yyn}7<0dwD> zUOPs=8)sh?_)nYH`}J0t5zc50d%Qa|Wb^+dj*RfyLAx@g(p^R{*oVmeD)uM@>APa= zKPYOldATobZ!dO4CRJ9QW`Q9knCOpP*onQYhqNuPc!c}o9|@bnM<S-^5$-uNr<a#K z!dYGO?d4_W49{Wq=e$JdV3&P|IN~kr)5tXL8~}dF;BIp{-{)Q^ej0oby0C^pTp4GN zm8Tq8XYUrU<;WwtGXAFd<l?;xPQ(Wn96V&{%Dim|+BRfn+x~&J@UPWj*kr!UXip7P zEQs@~!VZ&92?-I)2nXzL?v-<o!gm^<*6u9fo<j9Qo@xJ(=+1k&|GrgrmD0sA1*ZK< zhj;S*wrnEabM>xg<4{k1tfIG~<Rx2IeXK0fiVw^whgl1iCcjfAJFE?_{S@=#WKDbT zADTMkhO^*VcsgdnmxqySTJt;4*O6sw1%AV6w2}=$|3$3Nc_>rX-4=6nHz+=>NdNQ1 zhf8;jMcLoL+NkAGtw%!_@L*qhdoFWG@Vz|6yd0V_#B|3Ab9DK@>>Z~OH!}te$5>yo z^ssIB^DD2)1o_FUGR%7;_;t?n+o{jxtG9j5IAWaYPN!nwz88BB8?iJ&T{o1or=SpD zRomd~1C8iXWEXeNUoAcvPSf6D=53ZY_LcD-<~<_c4bQes!{`cVfAz3q<!!j6+{_hi z_tcs2V`<t;`>WC+jRDE?oIUN$njZ(ebaJ@8<jinO$(alFhu?-O=F#>(9AM0oZ+Zxw z!H>^o8E0g~L<WzU$OyWSFicoT=nxj{rN>F1D+`W3(EY7>Bm2EO9mI217C{^2V^TIU z?d0rR`~QkRP!bdGC87&fCUQzjz|F2%!khmKnwIwOVjXMPhr@Tqrr;DUnt}s8A}f~b zJl>d7nyQ6L@$~PzW6pwypo25)*`X1_xA5K@59>Y*YwLx_!X;+dDS2tk%zt$(JpVPq za{&%MO(xH{NncE_lk+vv68Sm3b9xc!1M9ae?eASMf(#CGcY~F+$XqMi2762D1$VG_ zK{a~9vA8z;zN@&=-3uP-|APe&g<Z*VpJu?8Y_>82y0H(IZ(}sqi)Nl&w>~7Veq=!w z&L^x7Kt4o&-f!iR?@tE5!Twzf`t8`^`xv!o|C;p8e`nBPCi)I~GsgXD^LClWgB4~z zGU0Y#_S|mA|53iRP+@lHKB5Kvg+t~6a3A#Wp`<;-hYgr6s)Ap8p+kr``>poj^ny?E z+sp6KJk!xf_!#-R2I`6)AE+-n4)191StyR&A0vK@_%Y&#Q<O<9c$D8`{60mQQD=Cl zY)Nmp4_<w@=rypm=)NUwCgQa1D@$}wOt9uNn`UHK|CP)-YSys+QCT#eNMO@)KZEeq z_kgZ66Te_>=EX!)QJ>bzCes>=^YpHKiW>v|z}n&?GwPUQVz@Re?D?rgVt$jKp9>{8 z&t5q{L!6}zFk;m8Q|daKxUKl8-sSH~G<szcP4kO+9#p(wsBX`1XzOR3OyUwt>^*ni z*xLC8W8ecVUaT#GUd_cP#+r*p$C|kw7}{LlcH2ksV#+^$1#LT=Xe>IF1*1yOYL}%$ zQ}M~fZS$)vPJTU!#^RU3M`!*$d|dF!!XX<s>dH91L#%5QN5JC@c)SQ6@^fEwzU}jB zl5dY7w<4OuhCg{w-<6CQ)3CgvbR2t97U~Fc8@&^+uda`GR@Fo8ocMS7w#l$DeY+qO z>t~eB=gA<CbZ_BhvKi#h;yr{OLJCldd?UTk@_FO~wnXvx#P{JdM|i00G(0{x4G(-u z;4mT_s_M<N&<!4)=bDJwkXj-;MYs!ua2n!$KK(2n4q!9x=YZF1*bSA68{!>VX1_^? zevogW8lQrE3EDGXijUJU*16*dyPz$^*;U<7&AHW-{3jv4p%OyxN7fQrKNxhb&NG|- z2Ah#Hi{V$uD?bx@AmsAn3}i&QA}dei%ItUQ(;Sg|sLk*6f64A$yPWb1iMxe)g7!eq zBV53beUPE0#Ou49`+3jz>M@t$+ro;Ew0Uql|7f6T!3eltm0b^IucQq7=R=ak5paHC zI9*atKJAygRrL`6r~KXl{Hux6`jqt9yZLE<^g6=p^GxSwL~q`|#QSQ(XQ$QEX5@=J zLfKjH(`xc`ljm22@{fF(=O4|;e@O7i+g#ihxmIbye>hcA&+iN}r+PTmd>g;j{2Iqn z3r0#z_&Eo=fi`?Y`OQ3J&23iJq@)9l^Re)f@?T}(jhuMoSD7W{&i#(-mZ1~4IL*Nx zaoH2P=>_DQo9QiiiM90D=p)#A^T67J6Tq|KrR}WJ3S@EBKzhMQP1-mb(_=gXDNi`6 z-DByJ7m=xq_l_Ghw?+S+wP_JkZ)HHkg4ZVHK|=}Ok2WbUzGP*dS^qFFqFH#xe*-+@ z!c%pFD|iIBhW}1<6s}6k##Qf16MtjdPWu)jw!&F#g(Q4#3d_yHCFP6_+Kp~iU*{30 zJ6vLfG4(NRxmxfP51rZDY|m=o$97cS%8{%*%<rels2pk4(9g+wj$}P!V@pnVCRI*2 z9Y{A@`YI2$N3^)klz3?%XV$+*>4k21ui7VC*fi|L;=1s|ic`4@wHq9`OQjQErM}bI znN*(wPyOUDKdS2ARdmNdL(x<HeMJxLX<V=uTH8AnC6^@sL|^pl9q`{n#YgdXlNUYQ zfgavVxuby|R$ldq^fviB$iJ7oNB5w^q1|kyQLcw_Ba}OlT~2zQGCh<Tq09-&JXV|v zzhCV_Z@oY{_DB>B&CvTV`1L(T*=~(5$`7ec%$t9S9FJ?<jH->jB`?zEezi@{+3DhU z;IPlxlQBb?=Eec+13Tu@%~~IiR1ceX$5P>%fe-2Xj!@q78+230G=Ka+C+iwR;j4wW zWIXfe*OBKF*mcOfa6<jF1m2--`o?G+yY?V-<8F~nzs)$xV?RYf`~l{F=v#`<=ZA~d z6!9zMH;>;H{1)=NoFBe}^<QJ^P~w+67>rBlU)g?%h9Y>X{T_6B4d1wnB+?}X;uD+h zE{FfxKj-<ZJlVuI;R?88tTxfOAj!OyZ}co!X^xf79_mDA^_tL7n+Xv*gbwrF$Ov@m z@5Lr<<2#qVrhxYX!nuTV31fsY!a~AA!eY^sXB!SZvfzTUFvsQG2e>aO&sjGm2XlTm zOAbn=1Tt?@h6*-vu|TqiuoyXcnd735|BZ6e_J5sxx)v@zARF%UWn1C-aIqb3ll_Yw z?8)V$my*SKX2UYheN}KDyYf?RvQ0;A-RUC6D?AhnnLUlojp&0Y`hfXnCcpbc(sAa+ zmWbaR=b_nVo{Mx!rkqCYhuieN`17Up$Tic?8F%2OecO7D_=N2(Ws*Jk6kX)O<%fot zZ!tE-7knenMLxJn1HUce4dwUF({0$Sasgby!bTm>f<HUEykJ`Rg5kkV1#qatKC3R( zuY8hc;BIwf|E}hhl-IrJZzEiwc8c!uP3m4Y-Or`DHho-VcDa>C7SA-F1AT#i!uExY zpO<=rzIfF3MTEYv<>(8)9P(kDdL8P#O8$3^d5vb`PY@r*XV4qOd;L~&61?99-bJF( zP^PMWBvW0FOu>Hid}GFWs1A&irYM=(1D){GnBK;cm*}T3{u6710{<jwQTcG7^Ut&5 zPY^$g_`E$4e8LWDBD~1({lpyZ#j|C>z0x$emGL5z8~GZ3nG86eM<cI|m!gYkqV`kY zZ0gIO!l9^IxH~!UhU5vdB+qPot8@$B^Z1^X+sFcAn2R=;`I3cBA^gR?U9|DtOK8(j zZ}ZK3yXEJ|Kkm?wPLlj>zD>_1<=%d(!QSTEpp%AyzV%fwSjPq|_&T1Rb(sFROum=F zHWKNp!F2O#!2s^+fjY}S3&7=gpc~Z}X5K?}78v~iTze<GXe&C+7%Ov4QB}%`W^DW5 z>vsj?Lik}D{mhOHkFS3(v3O$KZ$D*{WlJhT;@ffVY8p3n%V%qJ`iTNa)Vc%5&B z;#)%2-nQU1@j3gB3KC7MBi9w5W310E9+5m8Dsx(_5AJo%r@$R5K!;-1-ZR{f{hkG{ zdGoCH*OiYI-7<9OUi9vq>SOTXuc5D%pK_N8rl*Ik?_avx>R@#D3o~@L)xXlc=<XL( zj=h3;pGe#DEOwn8IG+M$U<2$#mmdVq$r*4yg&yAtoP)qQIk1T{*egrz`3LsIm9nQ! z`<^509b3e=Dw3h9hbpX`{SY$#5!(DE_746nvh7F9%f_G%e!EiqcGdX*B4d={zQrUu zuy~-MRObx}fT{Zzmz%Hqa0CNblr5laoU+U9cVQb!wO>zXD_qLe*!-$fGM+Nz!-vG4 zPx5@C4xG_>1C1rRGqHkiOO}oC{E2$%ZReLRsUE<7=8oA4$q~j@HTn6DSjnP+`V#qz zE5y@dynll8w2~R5#pBQOopF1o9rclqv;vI>VAoPEl~pcId>lODdm2hEw>aR-j17@j z`Eur&J#{6e@<&^JQ)jLyZt-{tNy6TiSRs6T61<XQsgfl1RDn11g_0WTS;?L40p2yF zEvK&K;J2FgHf7<rlJ>F(kl#%u8wXaEbTK}IcC7}t6ltk}l_lLy3w<_4rzX-wkLnQo zi!D=c)9}NO0f)3CX}a^VB2>PzYz(-(*AQQ0<D8V$ePh5i^D-%orKL_@D2^rPIPPr5 z+xrrY_4QL}G172fO{Ue<?;UKew>mW$TjG>wX5$<BQ>_!k`&QS-b6y|R+<!35xZ_?= zbC$bA<u5uGtB}6{S@s$>vuwGG%=6}18xwo<0(MW3R&oj-z)Q<2^eu)>e~zp?i=FW- z&)BgGBK^Bcbst|b?bUoFg3VrqKl59puV7zOyrvgk#9kM#S($_F5a=f9EN{L!FD!XO zJ{NnoG~2F_O(A=t&@~^nGQ1P}0ox+c=+^7~Lh}nbMKrhQA6zhk%!`a-Uyo)Mj0|N; z>ScQqp24QRjo)fCTf6M*i@}oqz~6U+;O!kYk-dB$S30CRO<TEJJJw>>E?;Fri9G99 z$(LS6w}jCJ6Y`<skH?b7l;~JqiC&QnKai|9mysu=`zlSu^YLhZ1#($=!pT1Lh<2Q; zVNCqb(z2lr^z}{E^^dU+1+NKoo;VW%2VmKL_4Eg0wjI6PF#pv={rq#<V^RGq@~(yb zF1=N=?HnOTYm2#E^wqREg6~6_+&@KsqR&idl#n|91R83ul+}mCMd0x~#-l>kB=G~J zORQV~;|OE<CHg-@{MXRcmB}{qQRTr`@)G#v^<!(3{|>@Z!aE5U5w;K(5O!RwAHw5y zts*&^Daq3_VFW+a_@S(Q+gk6lw6OkW`P56!3h%LbB`@>*%9ts6l^?$Hl5=A$Sy9({ z=L&q-y0d`uKFHKIyY3k_omE#Ovm*48&UJhAA+-5-8R7Dx)=untBzx1qYjSV<KzYeo z?OTiYmAnd#Si{%(olQRwtVFzo_0&y2(ELaF1}aKk8Mv<GWz92KZz*%u#@MgKJ>A#_ zW6Mfj$ul2ZG3J(>4f@>XqbzXCJ-C7j+o?S9an4}ayeaGk&OGYeJNF%7GvB<@M9NG} zdi(cHFTV50;%AwIo^{xdjLek}J#6YT6|CxCQ35y%)XL-1LbE@%#0;0tuIjMgb1OFW zrTN|6N#qQ;RroZgE!agLu4yb3ozGuKJ36@@%v`vrig~ctuRL3t?k-IQYbMaLINn>d zsCWo_4?3C@?bSXH)=mOCP<M-Cv_J2I>kMtx7}Yy<+cgHkWDILf<T&sy{B7f4-?G-i zzQjKCUiK1ahRU>-rM>$0?rruUJBts4!=TPyBsHhizFNmUQsxY^KRms!Vj=65qQCYo z2tTI<oAf%)TJ#pI4)Tkh^jVQ`CBE9iu&_M1!MpRf$qHn^5(}>`nXk56n7}K%-Z1-; zU+06nE$nyLbBb^JJFk|${yGgl7f8l=1kPWKg^P55MhJf3KK7!5;YiUH{7U&T&o8<> z5t(y#%oM&hYzoiu;|}ejJmE`NJetBjaJ;h^iAdpnGv4*x>OA!c<xjERn0*K0ICq|o zk3Kl(4ELFydU)90ziiKBa37<+f0DSGew|?fPvTzDe)f3ZoU_!oJQ0~&ARH3WxpD8k zu*rKb?6L3B!n^Hzr0`DOYlWMApI5j~>2|!>@`ca%<wyMTM|rOa(lw@Nr=0+Z_OxYE zhDg@<eC8@tAA6x)SD(B;7XD+M4H_XQEN@Y-_^Y2WAeiV_ttsI1)44y7mV(t^N4g7N zq5rvqJ2c9>w|0nqS3c*Aa1+jw1NiGg*|=rxztDQ`G+b=mPZ-*Cmm{3u%ga>X9{lRq zm{!)Yc3V17USzN<i)Z2_UI8EWnB28OI4Pf@9r5(Japj+e2lGDBgs~_*jvr!QuhyBN z$@DR)JqW>?-<KtGMK9#xQE$Aluxsh%)9O*`NV3P>I~znE(JCHce{M%<TsZCNH4ACi z$MnstVV=pmQnd2mF$S~F5$xGTUhO$Z?JJ|)<toGcnR#{9QEZo^H4P@Srw#uE^&}p( zdsf2Onw7)E0jJjMgCl~uQF1+~hj%;92iSvc$G!jV4B7ibi<daze*(us(O!ATzuJ~H zM}Ps2yKUUY0N&W3eNTFM+_HhX0?xEhUkmL5Cgp9KSD(&qomanCmb|+2B1l(R-8tf1 zhdgsK6>KiE{1D*d!NZ16nYWLjCxd!~cQ%}?b~3(vItcbzt(%4a1s=z)2)}IJm#F|o z%_OZn+&4;o25lYAaHmyD^Ub>|os89YrRsC_D{xBmEo@*+^*>_?9TwbkH(RJpOZWKW zhXH>KqzhlGNpl8}a4cibvi&-8RO?~E`O+%8ejV^NG7jENO&{y~upc8Kjb&(<uQ>;8 zx#)T$<BGd;;qUUoQ@VTBX<=+JUUfgJ#yT)&Cu#~$3ErjQcy=-4*YbYi?S*Ho9xM0t z5A?NsRt~-z8`PsU=y*E(-9(IjYBCE;s8+Pp+)Vv}j4H&&lRsJe*vf`?;Rj~?P>1C$ zW#!r9WAck%4B@o&iWz)c4lfJ|7s)c@?R8$;)bE#W-(5F}PM6B#%O35MJ|WpTDSzmv z_})2ZrCSa$uQ;STUxTv<$RX`{iedZ4`{puN_s){pwxLU$jE8Gt-rRyE>F~M4d%2sk zXl`j@{@g0RkLNLuh){0h<T#*=WWC>}OP-sY?EmTYPJ<<#H91~dpf7oyqyG5u-ZzTR zY`^|`b?d%l(aY+L_#=h)$;MSXpc8vc@A|oDMt$Dcb3NHhA6UJJUWizo;1qF=u*m8X z_ORs1#>mqDo-SYvPtslEM`J3>CZoQj^gw(Mx*I)Z`Hwqx?Kz_HBRbo=@{@<nt!m>Z zpE7HuPksIHeyd9>3STS9m~ajL5c>Xy*!J<U^1|2l9Ahzq6_nxf!e{oB7cCrfi}IL* zhK70GQ&F^#zH`i<uz#td@Xz4!T<7b|x$EhD?g(HUhLo0Px?UaXz;@tlro{^!63N1S z&W@NJ>y*nMsGv{O2Q7>(W5>Xhen`oV+q^_Pr8H~Xh-b>PbO?EPuL15zqLX_SsN+I# z3NxPVL0+#<DCg_LDS1b`vG0D!T+q^hy)bitdzdoIopGN}z(e&-@|E|#F=(IUb%E*n zZ{l&^-grZqnPrD8ho=t1ODpNu)yx$P{gr*s{U3_2m>U>$tF?KVyUS+Y2XCz&h!mc} zTWs$q3wTeoQ=j8k2-X*(q7OWJQzBY;3i^KEmUW8opB0{!kEYtwL%S5e$0>XjITl8r z_;&T?@5@e=&Y4y|QuvyQOzM{Fc<yE2I53NJXG#Ebi(gls4-=m<^u{N`{=PK+fspKG z?2OCC9QuMi6WlZY%AsM_Ivn#Z!Z@M*c4@#5+=qa_&-UB5Y`^hLJ6_|<K7pRQO?Aed z*ZIz$)*8WIdHk^{n^*Ml$3%nZW%~~r1+-BbG%i+}-=<hro96zScz$&f&uR3T{okQ+ z!qSKN1$6(V{I2NhW7I9#P(a&tXINBxfiFUL3Gm&H&1aAu+yPTm08Mp26{+}*Oc64< zsDSU>rR1v&$^?5S@hupY>u0@jAX>y86l^!zEI%4_F7?)Xy8eo1*{Z9NODlan(G<u% z$-G0HdzL(!<W>07j6a0m(&Gg)ZuNP!l{G%ig`XXJQT(Nyo-G>mhsKTVk2S3I%MRc@ zNSiDdnfTeHjRFnnPtA9xWUa^Vy?(#V(Ky7bYUc?-zARY3oDPe5o;OdJw%0jpj7l!c zHXr9K(J5rJ_6ENI4UR*PqjnG85Vq;jeb52D`LsESK0TrNDYpA_CUsagrNuQ-Kj-We z?>Y2HY1tn7d{2E5`}Gf&VMDM^UsSqhJ$>3ynxKzzW5-y{=`o?IWB9RX6LEFIH}-7k zd7h)OW5K?N?t{({XD^PKC&*h*UhTWNpWh1N9#&eO>HZvjJI?!GXTM{|hl}f+cPWlN zG+kD<d3<qLw#VXOofq=%TY*0~!{?mc(*ZxO4E387e%N$~^_0|XWNu`*er|kEy66h4 zI|%ihxNUA#d_MD|H2XQzb1P}H<1C9+#2bE`H(WP2q56@-8OBM1^u>=jCXcY{QHA9u z^a(;1svMpjJrjn>Q$QFYkHRSN@V?EHqi5oB2Tz+j3G?=P;jDf_KTp1%Nt;ccm4pT4 zQ8<VAm42SNdM55N@-!31$fIx`@y&joLOl~#M4meci^-#KKJj<>c}nz5+ye465tfoi z;pN0P`FR%VnYb$kPlu}s7wz@JxAYVGd9KtmX;+b_me3`S!ZPA({XFG*Ca!`!DZ)5; z6jl<Cq_Ff!=$W|1<Wc*o$fNMB#0PC(qG$N!3F5D&zjU6<VcqU&@d*88Y+t9(?`zq3 z*?pa7wx)&~>0=Lu_Pgg;egGcNSBUSa$MUYmjQ(Wb%LbQy&%D~+ee1Z~$q|vQg}<<2 zE_U^D=1<zsCLb8K*kbfG-{(>~<?_grvd<B%nQyHEujRovD+J3=%OgHd?Ges}nb21F zZjyh&>(h+KD=yjI@WlP%;Yr@^wzLWrGByR%(!=_Kp(VVn@kRc{-WUVt$#Isn<4kyI zj4{3<c5FGOO!SKNn*AD!RlTO1HfwKy)s4j8N}N`aqr^pGgVLSyJ$ElueWY(8K1x_J zBmOg#tE3!z>`W!Ua`Jqf>J85oJbyyZz`0!Ic>lDYmf-mhvtiLjXSiu@m95h?A^F+k zZMlPk=+VLU+(D(Oo%@H)AMD?6_90K68YZ7;fIi=cUbB1N)NYgFJPqlzS?f4y@SCr) zrp5YkTl%1a)_Le-$2`lr*VNiSzT5EY)%D>C!@au3S?CN`7z6)?1W&NcY5B1^KX<Lx zgSP&w;(c8A`nc}R!u7M@Is~pqvTz-`0Io+YuENp7SKmrLVp@`AeaFBxVqUkr=^*dY ztW`O&XRG=4i>Y&G4~^Knc8=I}D-XASWj#8;?TC-tJ|DMzS-5=;+zx`<Gg-JDyZ~;` z%)sq3aC>GZZt=8(!F?WH&t&2Cs_=qd&!~^tJK!L%G<F!pg<;8R;uk26U*rPuk<4lQ z*T@Ft?c-VfLf&Fq9=Wb(%Rk6=o?{n)5kn>&&5qZ*Uk1H7cQMcV;EM?36@3!Yw}DEN z^{fHyGPzF<b4O!~=}UZwarJ=ieKv*IPWGHT&t34@e-(dIHnOKec32^6QL!@0xqHBm za=Gv?>v|?ya*TZ*@D}kQt#R2iDcD>I@;$lVTnQd&=v)oli3G5KaV5A^e~L74Xcvsa zWAdeCn2AwyUB=2I$5`9x1M(m7t=VeLLFDJuI4Lk6>;PtLAU)@0;NORBQSHgpkoJ8$ zq?K|Gvxs^YRndN+O8?t)xUn|#mTY}r+-B0Yt;|aWPw*+{YA(fiWdGWfJoa(AUO2HQ z{+w`1U_+{maLdLEd&mVZZ0_z4D*aM&Q#xT%W`c)s1+RSM%Kh>~v9H01U&xb^KT7h3 zeF*H&=-#Kkw!eDpil}Vj?k6N`WoyWe5D!ekZnHLrwK3?=O6GXt*TvZU>unp*XR?X# zot=6Z+m8A3N!C+Oun+Kshq3V<#)iWdKAL3@zKlJ1LhZEe#b-767p!;EpX^zW3?4Vp z!M|irDmn~2jFEkO6#E$aN&N?%?Ki@#oaZ}XQ*$`ZomRkmPT^14W4aKWs;1el=_$WB zeLGiku^?SAWM8XJ^%wpIXH>pD>Q_Cg8ybBFT7@(ZRE(Zg2krCDCJs&dq~+%r#LnG_ zE!%-D+k&lo$Dyy9F6`brX?HX2Zkn?H2g~%0pGo`w=t1n@A^dUddpG*Vj(=y(ICBkj zI`Oy4e#IuP4(9IiG4pPHWx`*)wuEuW9lG_(Tj+-Bz_kndIPo?UOL}`Z#pAgSI#K#u zen7QVeVS*s-3(ukYkW#3%NC`K=5#q1%M1T;1~#N~wX(AV+u7cMA$kFGmH3je^!wTG z;G{8jKeiF`!oYT()axrn`^Ce2KPYJ;fo_*xXWv!`{37fXbJ!z>ELa5cC06Fx{bKbo z?|a9m!}>OBg#1zR=8%`~!(23PoV<DDokiY!^3J|^-pEGs7La!idFPV%vP<M`CU1<q z^T=CB-l9w7Z6R+ldFPY2guDwbk+*}qrR2SwybH;D#U=9IN!~@|eG7T7Brp5^E=mXd z7|89gDI;$=dFiE#<`vvHc`M1AAn)Q!<W<|M$op3EE+OyL!9G9fitK)aUsjHu4sYBO zN3QKM4~l1yY1%8%r{_WBQgOYVpJ5|e+4p<mAKxBaDLxk8*!3)UD4TcKdtE$OXJuvu z{J2281>eTuTg?w;7e<JGD<S7kg8L{Y`B!H&Dv8JTp5p60;zf8e(0e}qM=lcoR1gmx zJpT3fJ6?ni&jtBsz-KQmvZyWh@xhhYiiB#nZ!4Bc7eRy7vTODqG?!cXIi&jsnFAyl z%hzFZDgRmSSWaUnSC|B6hVu(^+0zy^6ST*m36I7)8KddfHHIrkdW{*$P@X-HCAkwn zi}!Kw8snO@Ms&wV^^7b_Cp~$=*@KY$Pm}&Af4pa6^dEGzW1n>PV$FHQ;_m5CS8#ym z`KWjvsGH`aqMYZS8dI8=*YiW#_c`N&CEv9(l%$RLI5W(%=^x2K^wdW5R0n#h1wC~q zdg>13cr$vcDN9dv_xE~j$&!C|56e(*;jhBukb^&Dy<JyEzH^tX@_T+XY@=N1F40<l z@Rsh(wSJ>vr|?4OEDxg}>d_Ciz|uE^Q|O81?5klu5xUYl3&p;^%(U-^=sR$l2kM(} z;#vQ^#`eZN<%PfE{kMr14|4`uyz0dVI0f(h!;FRW#LLxbq<zYKPI-eoygw26!tkN7 z9?IMyOn%NI57iqJX|>-;C>X#mj^4x`o2PH|2KwT$G2*Q*ckG<QSU)d*IPvIMWl=GG zZ+&O*&r3WP@5T0jFGARg<;nfraiixU<L-ZgIhE`ib^~+A!mR53Cc<8(Jmz^Z;@B^| z(7~pUQ?7FVh)F0N-giwS{;&;pk5%qtohC;xJ)4m=spn0IdcQTa8!cnw3!NeOn|JnM zv(E{e9h@{*3<+<>lPetY^)Zj``m1c3+O=i)OnV8Yd{pMWDvSUBisACPiRJD1aAZ%F z&#fGG=f;PLA85lC1UBQ1wS&2fAK+cK70=8Gy#DgnD{3qs!`E5x-z6OIuh#}?s!MgU z4$))l>#*Z2cQ{_SgSfkcI(fcFd%eip3tc0E!}9~!kc;r)H_2zO5H(=O5BQzGj-Y+L z`1;A`ttXS0eTJ;v`}ZX3y?pxGgW9U~9w()HJ-qfo1Mavhr~#*)w!RkV2t6)R)=^o@ z-`H{Dtzoy&JKOd|etkB71-zxcQophGsr6acuGf?oo`bi8^5;ae_!If7-?)6psJzC9 z@-ohK@4!mIj)##+{#pofr5?GGLax*zSC&g&um;v7I+td+DL{YhV@PtR5EFEJhL`7D z6LC|#FEb<T;aFuZoA2ryxBMMws=W3+COn^YYQ1u|vFZPuiS&P-IpY^h!RT@BJ^V}7 z$^MFcZGX)@m<L%i{v0yt^XwD(f>}g*jPzpCOG#gZZR-|~O#A>IcZHi^_5ri+bH?fW zyovOE!Q}Lfn!LU*ntVPwT+nxj^Dopf@|VUL`709{`D>Fi@&f1FzhUx6{>BuH{0}o1 zm@yxw-IJ3IGbl@*2zh=%y^)|^<*Nk)E`nv?dAKMp_=8?WdWJq>XcM#X5jP_my%8OJ zoPJ7ulQ^mT8`NjlE`t8y)J2ZUWT4LwGyrA@cp>iJnh*|(&wS2=ls5F2#N%7>+vvQh zHcCffhttkH)nlG>%Z9#AJ=9VB9Q#lBdsA?fk-vZX;-CL8RN>v}r}xEw_N(KE{?uVz z)ZvV+!~NAx^3c-`-yd~YA9YxdaJb9b(YKS$U^;h5cX=%y;TzJ-OX4}93E?JwN4CZW zP9tx=Z6d}nC-cr8BZJ(s)ch86{bx-Giz1Y|zlFhJQo*m59vg7-TNrO_VjZHb`}hqq zAI@)a*c;H#jEejGU$03=3XpAvx?>vG+*J}!Y-e8~`_Y{Ya}@4{hqhKXRpY}Nz&_C) zlf+&VO041TpO%U5sjgJ0#VmUoSqm=0$NB8R%G9INaZ-C!Py9C0|CT*|+_m5w<9x|& z{Mt(6#VyF?qgLi~jz?piKAN}S*|8t7@BXyjwNJuft<quL-C^H_!@X(_dlVhkK^)et z9rg@5G4YW4Zt<Tv-dd$}`<Kx3hmG!Pu=GZMEdZA??V%E_wI1Zt+a-Rvo{@)+)uXhZ zI2XBt{h2J=wcq@gT~C^K?iw~X>^f*_cYV&>xa$CSaA=-Pe;qpL`FsyCSJu4Aw$q8R zkCS%Zl+{-HQ2I@EnQ_{hOIsJy)^hJ%G7ec*k1R`N-Kmc}t18RvA`fQ=wZ>{K2yA)m zgA>*5CLen}9Ouksp6NNrT}3A>A2V0B{e4rUpmd0_6)9be&&sgsQaMT(@Vbpdo@U2g zu-uG17lOqd|F74yM<QCsv-J?hh726!3!J0UNBj|D(|LQ_{Ixpzihg{kEL8}Pueb=0 zJILcYc%1Lp#hdb51{~~^lqnZTo(qa^Ggn#M>mxd&VfX(^SCB`X?!AXg@xk?29n#-R zB;#w8P_XR&G4$0K&y<hBpPFNbw6{)u#u<{lJhMaJ?I}fv6H8oHn&N?D@ZbKU((D*n zlQl+G3|6N0w7}RV75oIhgmoazG5XszM&ZNsj+Lyla&~(M{s-jmRJ?sB?aI;H>>B8d z^}wn!`BX$>^q`xX)neZ6kI(bu1@-u}oD*M}-(sRwDb}RaZ=#oN+ZS_8!56VfzL;xt zfq1FXY1?bcqqbf9)~U9I%2rmUJ~q8=Va6m7WxpTC?ykn>uEAH6#O}6t8q(*kIpE0! z__~s_B~~tIof6tdu`Oe2za1|J^6*h%C#{W@4W*2MP5uwuRaT1@N%R`C7rVK(kkOhp z@}cA>>UX%u(mPz;-*>uhhZ}2Q9|nJVC*X|4jz{#Ka#~EyMfh!ia<ak42-RM}4&)sx zmX)dAmT7$%X*CgKgq3B2t!L`{<7(!=;IvP8%I3B6$@W=8@Sf~Uknre)-EY?z;?aqT z#fQ14fKYAMe4xPeJZbH=l>9c*Wu7m|D>Id*ytM6Kl_wjX_^Q9o^4FZ2#w$J)kA$uk zeC_M&J{DueR(d1Gcc=9oHGA*nMDcFUw~?M_?p`Wb+3-}4#SIwe!w!G<O~8JQrqS@b z-wLc)Htb8a9XTGlRNIvf%wo==hCYdYWqe(0BJ7L|Un$=$a_~y^i~Q=`@pL8UYHa-( zJ(D+yoqjdAWJGUtz&r!Jq34g!kGs2&IOY*k`FMxQQ+?yN?^^Y{+7$F*Eqe@Vo<L6S z_xje<KNR8oSmh}1(m(2FOI!31d}Hk*>B4~C;A~-L$4!m_%AY?5OlbNT5Dhg3?p`At zFEs}G_iGH8&?sRl)bfU7V3BlsOU&Xb*m_2<UGT0s$p_?=boPtLg3?-~j%*9gOqzHf zzi8;o$P9f4#Oh3R`XY^;(Y75O>`$-mZ{N}3$;;VIDywp%_?T4IqgCk3e*TSq{*7M# z{IfP6d?($?_vsjCJ%5{JL(P@#B>T(SPf5mUBXfXy#!v&_%)|~-ey1tJJ`n1?7JZPK z_=(C(1`T-Q%+${Ntp|zYuBaW=lG)c^`^7DZ*xz+)oltTO8D1cHJ=(;)A?4W+gvCMm zKo7(V=`ZrDoGqjLYnW$HR_#<-+s<wDRmTn&dQZE*BHqiKMZdJpzZiRN!^%!*CVrED zMKpufR(8q$6Fn^r`*y6<GcaTEz8&1}Vs(qoXIT9$oh{vM>7T^bWj~={l`!J4r#>$j z`WpzFeb@!n%nd`(zMA*PdFNb<eJ4G9GW%WS1|rdF^_OJ3&(qfTa;%&_4zW*XMJ#@r z=U9q68~DpJ_vp+*>81F2pn|dy%Cg^ljORDQ(}IazX3wXHZefpa-GB!1M`$-RP}@sf zYz=%;qQ?{;n&)S<!|KIjj)|-NrwM6;)lanH9coJ|j9zNJupI=?*>Yoq7JvCXd_8Yk zODj{mTBhkGOUrn)dLSM?iNEi4$td6UiCf#J650<>%8e3mol~<49g#Qjy1tvPw5n%K z2lB1hti)F29UH7bHsFWiF5Zplx?=!%npXud85=(|{0)?weYS4SYWnLx)dQ9A1?!Mn z1M&NKo@k}9X7RY`iVsyCW3^mofWxM^``e}LJDOf!c6sX3I&kQX`b>SLJ}b_szaE;| zU*EMjXdFux9b;cwg;|}=hv<sXG5CkOB`Qs?n>fukA7UB!u+3#{@t!Z3h<kM^N*{jq zB7I1H=n+?caE?&lXkmY+-=EBVC;RiWRh6mT)BBTIz>R93@XEqTe)YTnCm$cqfm?k3 z2loHfsR;Poe-V6Wi||Rdn>=_@-_>PRfHEOuKKM=IbH7`e>YI)aw%X;wCk0bnAG$Dn z(KDW=U+eHwqbH$fQhbR#b5+MOeBD7EPAF5E8k}B7c7F!rZ*Q+@jz8eIfj<}?iS&Qn z@{?r2&(#j`AT<7&=sU`@%8)<cwXFO*qvUt|{J#qFt1i$q3gf*_v(;6|g7}v-ulM&o z>kJ{hq`l|f_}@2!pF+1j+>887hs+_uf%5S2s<b%{zI}qtxO@THkI+X)wJ&ln{!6?Y zjN#&NBxOEAd`9JwDHA$pF8dq%C8xjB9F(lf@&(^0c%pR{U*s$9=&(5@+jo4wId#4* zyt7$(E+sdyRZhtk#zr}1c>=i=^w))KVR#~KVZJ$@Kqj*uyx-F~qYd6Tcq5+3GduS| z%NHzej7My@iho1fKlvZf_OM`D-8UrvZ1@Fam%V$Cb#rHo_c2#}9=35+b>=vJmER-& zcnNzi0-2N5huZ%XI#!n@Z|bw<&Cb7gLwQ5~f%FV{!@KRvH<mZGYR?7bjgQl54<BFN z?EKyv${WfFpGkSc^RFRq*oz9kzB%6V<V~F~Z`Qmyd6Q@E9nhE?NQ93UANBZ3@++%P zJRJ_+$c@lx!YLhoZ<WO_d<h-ymm4Freeec4T)2SK!|)Nd;PNu=TRIc}HnOA5wCwHV z9)sRknTeLNe~bAovd-*s<Ig;5OmQ#zez#l3cey8!8LoINe)>(f;{(X16RCg4b_gCi zA6bVM;~tFBwdNpeBxh=!t0roMJ9n+iHz=G(cj1RACx3+*p}j5G2uEpK*+{*WnVbtU ze^K0Pa+J<p+}zLlBQt{RgiiM{zD`hw%^wf{vl(IB2^M`Af(C*)q%k$x2CR0zHxuVx ziAuA)dcFP5MJ?Z|o(&Dlu;C)u!=W+K#>ivs0{DP_Tdh7Z>>oilop)}Uez3BB(%xns zBs=?1aE^Bb4#5{G88P@o^igoh$DXryWg-jb0n^%>#D}DNfWw`Q*i~o-aMqm$vdiLG zcGCtx&6NGJ3EZRmJ-IPHVr7OuM(;iOMq?DY8dn{RQ5PO}(VxH07_AdNsT{_@*Dh`o z%p6ZgheL7o(Kun&c>0y-o(f-lJoWqKMhV}{coID7DaFo=#P^%mM(da#4HI?{?h<W7 zeDf+4;hw07Y<clrp80SA@XhFc(t3^NE_t$_ZGG6Bllt&$$;#9NEz@jp^`ZLG@=ONb zOxm*rtiIyAfARe}Uxi<F*GZgjX~v(qov~ZT*kzAR|8wCp{l~&Df@jQ*5AJ1|953Y8 zI3fK^|Fhv2gE0~h=ZNP`|1p!txR3TfYaUnq@D6uDd^jbT{(Gtae5=NiV8q*<opEQ- zA4?y;b@XWX%+y%Q*s-Mg)K8<T_gMH8<xcwVr+m0ZZPhqX+Yj*!|FcHopB<YzhgrjS zP*^Krp0BfHI!C6t)Dxz*zZW_`O+PWe()Z|)9jDCg+?`T)aJIv`2@+(Z;mj@Z;{z46 z-H!KU+1_KuN#2Ak$(^*J`r^Bpk34H4d!N%7$r#<)0G>@_mErN?Ve<bGem*xm?%_OX zr=5~KMP8gzeDd2`55QkQoA5Kem}s6ji=ES<whbhsqlLzNz%l51$DBy~%!D+y$I7Fl z><c`bsL#2Kc|tsq&M}Phm*Y;(S;7|y_1*#>IFjx0^!HO^5%UUhFN}rFso}6W$?xyS zip}^~p*eHFm~W2FGbhBO1CDuR@w1vYCd=>vaBk7OqWVWtI@@nvA<S1u8s~0I2Yiqt z9|F&3fZgKr^szDUv9=2MVuu>RNPLrav+qgq$VGF&F*`}CL2iO7a*@6_zsG$;#MyQd zUwG6z2ZWqG#XQXJ#TI{K^IN#JIT^z^YkHV_0v}fY5?||l)XIJ5G&+mB)MWz>wBw$- z-M!lRPL++LpBIb~SA0NwE#%+(uza|JxmxEk9oNH$_}9Q^HSzU{2JXo4<B6*;Fdw#S zyyW=@;Upg5`J2w^BbAquQRr7>thd(&`h^pn<~54XQP@8M&D+guz>C$Skqf)%?>766 zymX9}CByp0?=*eu`7nTs593?bhr#od591@t)wWC7;?yZ0#<#2wgJ&y$=#NSHa{=G< zn~_nrukjPe$ASK-;d>Epcur7bTRuGXOYt%G@?}{6Vmt)$t-m)qid;Q0`cib%i=UDQ z(BJln%5r8mR>e4EP83!9V?*pi`Ixy=@byj}eOryaw|LNp@dbR$^aN>n<|8}f51BiN z>+qjjRMvmqNLshW@3d!<+dZ(yOmy%$_QQT1cIQ4o#zG~Uz^+@F=u)Hgh%eG_gU9$i z3$N#rrv27!rIpaV@{1MToKUzS*X%vZ@lRSmkj`OM$!95lWl0O|InN*DtfmjGKTPX~ zj0f!(_0}y4O@F`VCzGD94)O(ho^f@KJO2CSn{-+-?9q%S)i!*Pp+qFQ+)44x7WOD1 zpK{cn`qQ{yQZD%rt<kuJF36W?jpF2+VciNl2481;G&$G??db#jl`+Be^ZY_^s3*c& z)n)RRN)GyEYWh1!d?0o;<-#hbZ-qN<RasW~pQ*g={lSjgr!*&(#P<2fI{E3%JeD4| z>s*%!4Yfs+A5R<e>9h%twndlkNt+09wR`HpiFD#>hB~4*X3<Q0Lv(M|KE;V<dS`FQ zG#{vV1wPfj;jF!6jBWY``%c_teFE`5(=U4AGdL^y@vXQ~@O)S@&$snFKOpv;4^zI- zqxAQ3`n{GuuR(t$ky+o+xjVrCW&v}ZA>=T38-!1Kp{JMe^*%0H1m5W7`w|27@_E|# zQauAF2M`|P5-LtG)z5qCqI*RXyRPBqiDNtJ7vveJ!`IMeeGMOxAD{YP7$c6w^^AC7 zjCa<nwJ%}9?4ga=6X>*@{@wpxzJ>el0<}xZGdq9(Pv={>?+~>64Sfsuef~e7?P0-G z|C%9e4RC}9ju*F0>{b*!bp2Q={DPB$ujiRt2Ux%3p2`WvX2hiYwN&zrnefXwWfQM4 z_Bmg{&GXtz$zN@Rd6@Rx)Vp!<p{=Lat%Pr0Bu~yo(^(%0_D-k_YiBY2Y<Xk_->Ek6 z@+`)t?7Ea>h3fOty-<0S{xD++e|yctj3enHf1IUcKUN>(J4cM|K)y2OWIK9y+p~sb zzgvtSE|zl8BlvYyi@i?`H`t8zR&03L##TSe7RfXJHHR@F1IOAddhSR5e4ezg)S2+- zdHzb8wR+MyUt|)EXoV+@%N)u3KJJLgJ9rF>^q2`B#MV6WEO&zrn}UPSnY<&<nc1Wj zAZuczUsn9&#E<b)$5d80_IGm1kg|+XTOOGjNu<q^gVb}Rf%8V}`8!w-%z9vU0J8y@ z4Q4j+G2#n|zl``|;$y@Y4R)G^gX{TTU%R=S^kUK%zz_994QAm`qbVJ->%AF$o10#W z9aY~k_T_striJr7x9NT(?%hD966ZMBnBdO(AK#q7SF3&_t$0ZoyRv2C2ihZ)XMXRO zjvFhB$M|OPZw^;Jv1xDvx=VNb2h+Xc-<j?=o=<n?E58}tn=V8j@v-IGhAF-!F7NZa z4>p>)gYe2=+RXV%gUN-j^Wf{*!^8~}H%$7#`tXa{<2X@o<Hp&;W%qH4FVy$q1@fLz zzbpT=_zmGx+40J2%j9q-N4(xae#(j09ehCWa0DJT@MxH{JZK*o+yI_@YZd;T13%}I zo=5s@_;$|FO{M@I23IqJjd3BoUdXOL3*QqLjNcGGo*kcs?{WBeC`jX8g6Zv?o)(!# zgXw8`)6>EyFAj5B+6<V}(q_Qq>=iUsJ<#QG^@&}NF2??AF(tM0q5JcGKdA58&Er9S z-M1hbB`7l^-mWhvcApoIt@3+6O91B*Fs<yr08GBiL|x~@<V>FjbDI1`<{jJ*Z|sLR z;Mar9xdt1|9C*0kE6BothZEbwFT=wH!=xeSxQ`auhDR*m%|L$Hx{+VVttPdfG4xaR zKSl!CHM4H+e%?1(KQj08-~%3B-MoWGjIlHuJPH^~mw`i!dxmYj0Ut4j6c=F(**%xj zcp=B@w*b#cUd`bitqYAU?jycPeDy`*lNX7v$&MH8g>U}@tjq86b@?&Jjh}GPo0-{a zljGYD%BS{NoYTy`c^BR~6Gyz|!wa;hAiKVxor+84Y@F<;09Nw(2`eK~IW6a<)y5`X zr=APKBR-a0PXJHoDPH;s8zaftlndTT>)RUIlj42fD)33M=4bs<!JSk1uVg>?@~j&> zA<qmQ)ER>l_AKT2kd>4D+%aWR+DnotD@>UNd_k|qi!L)u%k{~-eX|Fi<F4Ze*)!9` zU1=HfHq9}rPjk*M#hJ9+V6RyIqM5c!p84oI(Z=Z9kG_++9&<Vy;`_EC`<iSBU)wP1 z%?I!M7tz6_xPzm`6q*+7{ch%J>+PMubCncn@w##VpW;9-H0#(`p?O1fC-XG+o-XMK znK9DFNMpU5wr0whJr_8Ky?uP#ty#%kWK;Wl!BKaFslPR6q5VHLjovp2#ZM0Q9sP01 zd$s&N(cJC0wfnMdKG}lIv*{b|YBW{MTOc*QJ?1vXsNS9V`06?PWU8vt`hJGFOJjWC zHpVD2abS4I&IJ2bh_4waiuP$fHAWosYR#>*XKZo2cw%C}G1bM*^pne(;b@d^i+yx> z%$VxM*mG*zp&_(+3ZMOc#(FvP`-n+C7L5*>x>EL)0#k9oFuUB!V(dA5e0(3`qnrZR zceUUNF5f(>wBrbPq&+=0v|}e_g!fh8XYa<t4_HmTD*F^+mC9P$syt^@WwVb_#+FS- z`wH94HEJ*WB`e0(M*9N!h8HCzo?_m6RAFuSw(s$rscGMRmBBXD+>##F{j$B#Z&0*g zeRWo?6a9(o^gRt;z3^3OFn5+suXJ$xhnn<1%Z}bxlYT5S&;YF?*bIHPUH=R`zW?II zjit;Wzr9Ke+8%@!*R+4fALA7|awjn~zQ8wn!sC;B$zt%s8Ri9==a17bFV;98`?2<T z#CI|JkD1@<*IIp}<@qAge$H<t@d-aJkM~vl8i{)!;Z1~Zd3eOUm}fFC!>cdz9w+`s zgjdgq|8y3NUy|ol^86RV*9h%*bAa((mErv$_kS;;U+o;8Jm-jeDjVKlTlCQp?C&`E zKF0aNz3`g&B>B9#N;KkI#8(0DI|m&66<K*6<AlqMJhsmMwrF1>3=fA(D-R8Gj=Y!s zJggOh!+!YqMfo@cmp(;qWd4~)*$z>KLI2tGXwHp^xYG>#1^Mx{dF|5P_k@EE(B5~? zm(U;I?Hta6&Hm)f|MX$owUwan<I$X`Up|sm{yx~bjJf0~;bnQ_fVUU8_^7!TKj@Dc zb6RuISlz+<1LB)_V}6S7mB&IZXA+N_qy5LwZOqB~nTz#*op~5@uhG-SjDFihM$fR0 z^Ah{VkMm8n?=mMNZ_r-lS<F6v;9oU(KX94<47D;cT<h!N{#VY~us<fqPu`k0%ImlB zxvVzUg<O1MQ}ln1QJI$f5?$3s^h${KBi}QJ@PQp1ZHXQf{iOpeO&};~-%-EzcSHwS z%fZsNabGzEzwK>{4%t5U`X`&d@r(8SVEd#Dyvow~{IZuPDs!{@HUi#7$_p-btf=0L z@LbN!dMO*=Y}>4{tMQ;Qhd<y9{(y0lne+#oRr@CYa%wUr`nIF}ea;bcpsKRgX>lY^ z;e|OhY4);(+2`C=>WuC-#erNgZQ4gx%07SgJL7*se=PF+u-<tfz1JYSM+tc@mW<K- z*Z6g*9$Vj&s;BAStv=PGI?;FD841ZNe5WR3@4U2YGVnr3{32hfKW0PFX=<OM|6NR9 zF1oatZva3WXynnwqt9sP)HhUZIxzd&0y-GGR-t!%in<#M|0}d;LvHx+@$DPcp?(3U zg>u%%b5|2#<;X(X@FF_f-VZJN$?lc(?_A$g8GUq;e`%ZE)ux)83Mn1%^&mQJdLLe_ z|AO)XJ&f}Q=>+F5mbKv{O_}hLy70^N_4fsDM&77Np+B?E6|)wHq?~t5{GhU0o8vv5 zWFLXxNmmljJ%X7^jeT2ZABPGl=gXqVGRKn(dFK8nkP-5$M^LG0<qzUKenW3&#Rak? z7}qM}=d<5mW({s1b*L|Nhw6EI55n|^_8o|SM8}%kj6o*`_A5Rz@9dKqVxQ_HZB4$$ z$HizXy(2m7;gp0{MLumNexbB%-t+5sbsk7}qSUlgigRB>Z6;+hE6Yqv3c1CpF?|!G zp00iw-#=%~s!khcsKcy~OjVkhHIFrRC;WtiJl5H@x&nJAfkz9@L?e@d>9A`K=iYMK zLY|e>^|FPVF;9AM&3B|{Cw>8JBi!hTvZ`ao5ia!MB7FUvVesJB95X558Njr-&cIXf zrsH|JhhMtDu&*_&b$8j=tfe?Jag}{<acGH^?cJ4oj5b6xwy>?{RCRK~Ye+Isa=-U# z@e#i$X?)+&p1;t04)0Ke@kKcci?K&vPkrlC_ORBVu!#o;bD!?-%{{0-*ZKD1ChFUh zdk}j#5^J#gOxSbM`xe22ce%HtG&PpYJvg?O`)S%utHuR#Iz~TEFuue4v2XVeYklGV zbNm0q6w>dPT5H+IntluZ+B=Z}cff=8UKVic;1Uq`vAXCm?V%sQjd_H<lLZ@-wVRz) zw2{8~81OrI)_mvz;Rs#6pwL8bFg5TDdhtr}B)G*)%*Hw5N5vCo*FlWQASb;zKkq!| zZF6ecbq)r;-{m@X9@h?_UD63I`+~hQFpT%`67>NxKz>i_a|6~4c%{KRbzZJIOp5lf zhtqK~y0^^14xhWE&05_$Qx@SDA}&|$qfKYAX<KH#6aRzZLEGjZ9Pq<2Li#JID%5YP z*Ur1s(TDV`zJljCs~<}tuUo)J=lq$Y-2eCcIfDXCYgDIbGH{VH%CB<t`RleE{Y|+_ z>CjJ-mbD(vCAyw$K3{fBoh5>P%)2Jeh<^HRGOmO|;i~#);+s|X*`RLclk9ozF0BB@ zkMzxB;Q(#^_fXr!gxVt7!86nDn9#UD25w|r46;7ZaRDCODBhGldaNSgL+0uBZXkUV z7d|{}GCm)6QO`!74>yVSd1lug3bn>i7}mY(d@Gvq3ZG2%uR}lZN8SqYYvGJ{;>!nr zWYf#{687^8_}WQL<JVa5PQO_FzijcugyIal<+H}X<yrY$%ZJFttT<nOBYWq2<0nW9 z#>LF{Uu&H7+HvA0I4f+&3HZ^*9?@<Z&kFBUs%)S<`jBkc{ZE^DSv=c{KVi1`z$wC} zU?0!o1Kj6%8rmE{p0gLv9CnvT?lVSzq3<+@4Et5EjU|)BPpS|9&ZYRG8@@QgUZmPX zUuNA_=MlfkT_8{U=M!~S(Z4$j*$EejFOJ|-n0UQ9%{?zeru4}nvk?1qkumH;N}1n5 zhy1vB2pR26j5D@B${I+>r)7<F@Zu*;DQ%+fdVgx|AoOC8PM?O)PiGDVo#@*d(xXAT z$_j=t`^vaaEVlS5v(Wk1jMn;`AiwTo(OoQ09ySYYeP5FN2A{SVTIBK!a=~TZS4rRM z&fv<R9QEW;&m!gtizK56ZC%&Lk|rxp&IMpk)(s4sPQACQd>|jNpDt-%EMY%}#!lj! zCiJOc?qhI@tj)ui{}*s^@X>~rw&^b6iDwf}OaIw@mnrT<t9_V0q`xnC#>}8+eOa)Q zKKIU{s&C~(QonNsRWe{tg`Ml@o|l-`5E<*iSeDL}e$Mr5wB5DwJ}e0NLLwTw-n;Ck zJkwXIb-|g>ij$0~1_o_>i_(Gap97t(J}B!?6PE%6e}4IQ#vA|ro-Hi!wc{N8_r(47 zGOv+6S=BqEy}g0#+Wp(Imtwur8QKH6`vZ(G?K$~l?9Z6&XvW>sPK(AmH(T)6&mIhT zOy72`4)W3dKdQlofNpB3Nw%4HSHXwS1OGy@j6J5@vtvTshaE{a`u12uM0;GhQEd5Q z-6er<rIPtZ<bm?&AF(epCOGWDn$$t&K{r0iJNGIMN*{efbe=iK8`eIHzTX$DX=NX9 zE8k36&hzUWiR!d##DxBN+Q@Ic`7^J5pB3G*X=mpn(9oB|k>I`Nrij;P*7tG$dp$aP zeR3f>i-yoWnZ<93EMBXg$!mhA{*w-YF8};kd330j^KpCG3!1EBt{X1QzMD>V%S27P zV@7saJ;&b2Xg}q~2_I5f`V%`%cj%cu!4BGJ4p&twT{ZyuPvZMnqVW^(qhEH3<fhK4 zR5R9rQ7T!Rh5yQ#_+tx{!fUcgOa14(tmjD9vy=5Ko2b;vXmFGcLT+6q85_uF;hr5I z$X($xqugA--0jLkJ4Udvqo3qn&uO^vj&69^!qpx!uTEPQoBBfadTG>WWht;Z&kPK6 ze{z@Z@?%`^r~bg#W1q9-k&j0{bJpy;qS(JdnLdy1D$jUkPvykKo@Jh|rzCB1Y2)RT zAC|96{tk3r4)$MIxRW2d2feI*@^n*#_G9xR?}g)jb9t=W+P6+@oAjZb!-U`uELVT+ z1^xOkvKOCD{9)v8c--^d3ZLK)SuOvq&QyB-ntC&2d4=^A_+pW@uTx$hDZVD>xpS;F zvIc{V5HWwj9gGFKJBG0k8SOTCk^4ED$DAw?p7jyhdsg4}lz(!}%xY2o0cX}mKmUob z@T`r>&$`E1@DGhK)*TObyZ6h-*Pd4vo}#Dl6duA^G}ii;;<f(doiA3)n4==KfcFe- zXwbY<W%Q@{2e=*~{@scn2%Bf9yP!4)%d*WR{P&p38{?J{w-_I0pUP{ERr55-B-W6k zqxI%!02g>s!3g>tF}hLt132;LLw8&R#&cOPJiSD_)Fzb=(n$EI_{Yk_Mz0;U&Tl;k z?T*)^zqo}qSy>r>-nk>5E_%hlL&U{KTeu@>JvySrqnqvoG3a#ZYxK)>ItyRgU}^mX zI6QCZjcvkn#OT|KP-RljU%X#@IFvaNtP6tIVcTDV0Ik%%thW8>v_4`^B-+QH|MH#6 zW9dl0iS{Zx+UBH!vb=+F>9liz$}f09`?72k?IGNWJ$hg50@kEX@92S_`q&qr!9LxI zUE0H3rJFfS7dFdAY|{?-tfe^RU>{EWLcR;uq_tNGyJFNy{;uI(hxX-#!`d_1zLL=Q zFPVQ*`xYZdEbXG2C7N8-7w|`bKbP5m57^(AeH%|pW;@><BcFLMei=&P=f-ZqXNRv} zasnBFy%c&43@rWPk*1@_j2ycr1>e~Es9SJk<HgsowhZ5lZFgMObgIYRYw`}<9<4g? zyU`^d2j<7arr_gv%RU}8#h+$=^=Ze<{&d6?eVV&E$LgZ{#_FSwk2OSx#?sNfk2&7m z0s8()_-L{$=)(i)=!n`C)IIGP-_&0GDm5M5_?V2oH=lz~MEk*V$LcvN(Hn}zcd^!) zw&#Qv<(bgc?3+AEe3E$KJY?S;b0s*~J(=2@Inc=dP5Em2zB8hFoz%2_nyjA%^kL@a z<?B!$izEIDJC5p2hkf^C-K*KME}oNPd2I6D6V8q#!a488n`6(8pjW4z9kJ&`Zey-E zFBY#24;k6};6CElW5+&n`~>Zut$JA7BQ0ahBRV%6`kZ0!UpC!{+q0zHG>PY>!#up5 zOrqDAy%rbeqnE@5UJ;H{xNzQt{fq2FJ<h(xQ~b{G8|Qa|-wT>wCz`@9&!mfiX6%{& zM+ZD4pS8c=-*4Q+9N|^$jEL}rzZWLzqF;4r+ne4GDH_DCnz$ZcL+w0hG3dtCPH0j& zP|v<C-t}zbh=!+^i$>Bb(kaN7Tk&m-PU@4o=xCr%pzq`C`9*AEbM!I>`ar(Uo$b+) z@5XpMSfG5YIfyqM)&g{=#N*Hj8N<4~_ngl&YiXfxQfA1{t9u@@^Tx9B@(pQ!4|1L5 zY3-E`_9f@3Uezi7rwlycpT}#%-tBepw}igO9?+9B;`x>zV*)-NO{rdcKFx<~_c;TX zkUcYgIHMl+noX}qw2W%)c}Bb&>~*&DF7N&n%?(QBL##=6=W-8Yq^91qm|d}a?DJBe zj`Rw;1NjJC?8Fw|PrFg$dfz}3e)KSR(>f0OF0mD8gMZg%gt!c8B{Spc0|$Pq9^i)@ z4Cbikh>v8&_u|iB-N3ukL46BtJ^#P(0W0uXBRNI6D)DbT9Q`rR?ii~M{PKv?I-+ck z<*f6U4m4sT9p?O@bjTB)3?Vx{`KfWJc@+IOOLmUsN8qb&$=d>R-(?yr)cf+1W88D5 zI@7Zc!vpcrZIGqKn|nAdRd&y8f7_1k1ox9br-<~q)#clFbdQx2=YkJB3=Hlz`PB${ z7O_qo8RKlNPwVZ|Xx*m%h*qnPG1iZ~a{oIy))vwo-M~0i!*jFuJYL1~9p3Z*{W8z& z$p{Tn?x>&c@?7gZ|4`{&-t)Jf;#v2*0B_<r&)wehzjW|?C$zM3lV{F6m_{q>&}Y)e z@@Y%QNxyNorajMuj*MZy2j?;%BWoq-`gmLZ^1Y2F(oY!BSTyr|CB{5?fVDC5TK(AV zt#3F**qzwROB~tJ6F+C|px>S;fF1!1^^@SJto&Z=aqG`c^UKTs@pGl`=`@chUFF0_ zwAJc=`BiC)-6x^6flBUgWju+Om@`=GG1$8i^f}{q9(-Z-a=<5o4QqPx9r&bwPw(O- z@lSE;SHChPv7?e>*fV{c70Td?xes5=PJA&v_+-2B$#!AqZ^X{;z|L<mLz6bzL)M@K zKkS}y)rCz{takV|zqL<l=YfB@IU-vXIUbSDQJeG!4;~r7j#gROT9iE=q}g^y%rlIe zXTWW8O*A}i=NYcb$d<&$@@z=z%^p|K!`hU>5g+oTJ(-<9s7vLjBWCS<?8=~w+C~1! zbx-k*#uT{DA%Cf!jd+SS@@)&3_^{W$`!4Hejb<#lqr1dR{M2!+pX<Cfz_+ZiN7>=1 z`>CR`!S((J3jJs9v{YJ-=AESFyniY!=fC=C`~0-O%u4$|URo};qsryt>#^Z`{O|!k z>{sYN|2MzP-(<!8(2L8P?d8c^>V>md^AWuK177&HZ+hWU_E;!>>GgiN$`3!_hkN|+ zDL=%<RsL)4^+Ssf?_cxYlYV{4Kla~``QhJt;kAB!*ZTEcYwHt_Fji(O6rTkl`gOIQ zxtju?Z}8_NjmgUdZ^q1e*_ix;Q|~jMLMOR>^%TD|{9fVrDnHI|IuU-bl>H$;oGN~* zhf)3iia)sf*ZrHnkz1mw`SlpHAdeq@h0=^Mmp^38LgKDiZum@y!Ch+1m3JC*)oSKm zDYV%UW6GMSjk%cN-G&4<%*=QX;uT)#k2#wC6D<AB!gIs@NEiH@*%v{XAiPka0KU>@ zmcLN`|3q<*(jSjPd;6;=?Bb`mm+@wU=VK@RUw_tfDbG9kDeftL%Ez<*{?z5Sk)7Ow z{9ZBUzt`})kKYTNuAzUwa>|(hs~VAAV9cL&@q5jfKTjF+)na3g9yjJ|<U2;$XBYA7 zFy^@yey;%7|9gS@z5!o+16;qcoL@CRH%K++C$;=Y{|Pw!B*SkXzr*~1{gd&h%`MG0 zt!ch_GJmM5)P$-Y_kYb<&q3S;!o?>|NWUt;<Uhm@eEq-B8aQ+fX={PIR^c7|fI+<e zLLVGAp}Pi6Xk!cE5%2fGl~d0_oWhN%srU~*#k1?b4|(CHXQt8xGrR1xXFva43i)l> zYeHSi`L&qPhp0!tEd^80L7c*_`l<LWT_&{kHSfK<$qP4+`tLm^)O~m=Z#E1)cSDQG zkpA)iLc5lmX}{jHCe%wEy9__3Bh!8^@5M8Iic3!a?Y_^19(c%vc8{CTL*N<w9-!TN zevo!NK)WV?t9fqbcPGCNem(roP5(W}E{q2Y_)-6Zi)Q?)cn61RzgpgboBjJZ{rqw2 z`FIPzjr^$R<M;9F<2T4}$b|loI{pwGK7EuQba)cDLr)QR+=Tx4IpQ*2oZ=t9(}X^A zc<O!Rr1$*z3DSU}Jip0rB+rCK;`~zQ!x=e9eE<3JL470O8a#jIW$=mcqwPUl5Pk;O z_6NKJBmVEWm+yezo&%JBvOpZ8O$8IIwzC*)e*qi)|Ka~fDG>Sxc;rRKiv1x=CZAif zo`dv@g#Q4KzsT>K!1`vNSMDD&mZG75ebt11!Z`j3y!q4TOz7wE{4erM=$HJ?G4{?K z;RoDv@a#Fp-MJU}jhk3$yWb=K2Ak<WabG&IllVjW`R(I3!tXG@XZRgwEx(>$hFws6 zyG7sso%VZ~_fz~%@OzHm5w)_dtF^VG;|5pZx{l7C&h{R+b4$;*d-F+a-`v`>*%<yy zX6Iesx~Z$P!|mDXwr}ff?dfzYx0BnL_U`uW$~X;Xdsk=cmL1&z&>(GVcjp$jbKAD9 z+uX_yTN?LV^STu)Rwvgrt*HC0hUTgFx`x%O*VV15Qyt{Fb;Zr=8sENdZNp7BH{3$D zthk0->en^jx{kolyGDkF2lwrMxNO~u)hn{%m#u4le^bM{>w<j#`?XW=jcZoi+~C1! zUbEtswM{G5*ovV`Yd5=;yzmCs3)jtPu`yd)H#c`~?^)5))7rlA1~=Wlc}36Wb!$6& z-rL?@w|+y_TPF!oW+_p->|M8SX>IH31fq(#n_IWEZs^=hzqs$Mt8?$}-gM2~?VBLn zHI*Ii)-CR)Ej^vv*0;9P6SiBncW&u$A(PwQ+12G%1!R8f(tL9s?B5h1beVz)OH8kO z>)oB(-1j!Ey5_xgt9*Q?p<`~jwRv5AL*uGj8tNzM*t2PK=hhuPE?l^2%Leh;w$Ap> zO?P*?U0b(yx3#w4<*wh>y17$a7tp?8&6-=+EOi6odbEbV6z$ouZ42yL*|j5o>BaJ| zg<==TJq5qMwWk$6ci-mLZQ9npV^fdYd~bK>4VLxSc-UbpPvu|R)7rCRyDF`AVd`aW z-Ku(W>-F~A-3~!p&ik^Z%er<>MZJA0s<Eqe!}j1ce-iKXj`aX>yE?brXn_fmE~6Br zoi3KJaOl|H1vm2lx=mZaG#Jl{A=##D%%3-ol>q?!Z^ye{FPP6C?@IUUIgjVX<Rq_K z1p=E|yEc8e^Ty=P%H;Aps@)Cix*NCLvbAT^`g`kIySmh$ej0VdODpQvu6DaNZMn<c z(OvEFHZtVy&W>t#$9BKfHdI^B%fG&Ld(Q<j2KjDU`p$ROz*((OX3GXU9&CMzU*>M_ zY2DV-DS4Egf0^69v31Lq&Mud6*mdvrO)%c{ba-()Bh>BOshk@+r_yaZI=0@k1(-fh zATv8G?RRX0foxCGwCz1h+qZUfdhO%o?$)jydIK2|vTp0P&bqCeH*ejtcBNZYw{^>w zRa@3?ed`UbR|o(UxUtgm;D-9`UGHt(wp~;ey>EKwJKr(meOdQ)x8A++=ItA@<5kbi zo7yI$#4D}{^A2yk!R$A<-HqGa8(j}FxbqB-#;jS}Wa@6NH?EfzHWg=dZ1ZslT3N*q zYFe`jF~vh=$6LLTaHIQ1<?MhVn^DCC<c9`5w)h7sJKpv?;9;8Y01tj^Tkn?KxV7PC z5B&OVTQ^&b>4P;0;;q{*noRnJ9bK*4T+!mz&dnP3D`<w-<gPo!a^{+@O>Ng~-rBLF zt8@D`tz=x+z46|qZJV}`7WCE1d#I_i=LXkpoYa<GTj_YqZA~lR?{3;Gj;VqO0(ySA zsf@u8YVFyCu=k}Sh0ZS{HAB6Y=u><%iHizcq*3R?nylY1p}`@MX4!WViEFQ4Z<f;k z2*#$Z_aN*gRA6k^vn4t^mU=B-t?{gJfDT%++L(01n&x#4cK~hsj;<c~s%L9YYgc+x zk3~MYyz35xMHk$Q@;WaTdinB2!{Vlnwz|!Tv-Zs$t0fjYJg!LojwJ(mZ`tZLtzPZ+ zKpejj#!N<Zw{G7q(b9d7I@u1O$uv(uPNn7BKJ5|rC{HU|HlPyKuvk*d5Z~70UVmN9 za+{-lV`uwa=3Vc4*Yp?$?dI+-j4k?5!tUl(O=}T!t?fN1xuvd@k*$OO#2Zt!PUg0J zxN~!lt*?3O7Aq;LU1Dz8v03jDkhE%B``t6L5R;w7&8LhC+}zr2^+<A=9bft6%Zj#o zh4D?7HPo$Zy#1Csx3$NPDYv^7T@2N4@cYseLh57UW{ECf;wrpUTRM9-dN$^^q^aL_ zcm1Z;4YpJ3ZoTD}hPq}<pzc7FY~9d|fuMfgzU}T+-5Q=Y$=z^I_FKpHo~EtaddR1G zJ38-H_inF}0C}ss@g7^O@{Sv(|Fd-6w7zv+S8E&cUL{aLwhm7O+yN%r@A99?Ekv<- zw#m-fv|Ywn&&E!7JJyN2eMj4t&Ylb8+0nCoQ%8_4U8T<6fFXTP>%H!(CM!2lD3g`U ztYcbv%Y|FEPL|)^-Pyir{U!}OuiTFAZpeVR>E611`zEYP+eS!t^NKoOv`wc0B*`}& zw5xt|Yr1P|`(10Ly({4+MK;@Ux??>|G#OXlxxKx)P2>`FEquQZZ*W)Ndeb^F&f52_ zYOY(kZq0kHy%qz1)f#eHZiaB%CDt~f&TeoKj5mtp6enEjrgv=W>Je3MWnSXexXY5s zx4YLayW!fm-*DaA#Z%e5Qom}g&o24q=2huQtNI3a>n2|`RO=BurGTdX0VhBc0FA3| zTDKw#HbxlosjjZ^Cb3!99qx+BN911fwwwLvwHt${o1v1%A3$hIC#vFRn8wd$-`|U} zw!lQJ^JwKGQ73D&b<5%&<i(ctn>I+SuD}l2xxxix=Vo_3vnLx-=h2+*LC)^j=`!Yf zHf`_O)V}?OeAl)8wu(tz9U4<@w{d>w&WKyv`5}6iGFka<z1x<Y7Pt084cn%{V*tO; z&o)_>IC9zOSphua(mS@_OSN89cKeawp4gHtBfBEs_!A-K09Jc0uH3#D4Z;@XNv&%2 zk*7>IVp&NAN#FZ9XXIObGe&`zIXl;R@YdEd=etlw*-{N#+a;oJ$Wrb1Y}>><7(TCd zdzcrfZ|^Y5TZieo%`brcW~Dv_HKTObG`t7V)}S&wF~u~ZD7Sp+@~)k>KUH3$ZX4Wp zbG^%q*{X$}ts=&j4NEDus-sIo)2OaVo9+(u0(n=Hr&04Hl<Us5o!)a@PnVm%eeL_J zp_0XtnzGBTX}`N^+tzl(4<%N#-{l*aY7aK*j<!14sQz2$hE?<za>0Ao{{h~UxSS8~ z=GJX@1#QVUH#M!gwKBO(W6_r78JT>M|LFIv7+E+U%;r`O&7rxsVPajQDa4NMYwp>) z?XGKZTD<f6>vry3ciqzDveiqI*D9uC8;W(?_G{X<VS=H2uR$<h)2aWw>@~~vpopdI zntEs=jSRG<u7P7KA^iHSRB!Sd5S!QLd*L#|o}F&nj`izdyAGt_woTobm##H1w_AG& zZcW$ELX2ALZ5D>`hMtYHyfj)|nY^xJ7N*Wl{;Sbbjo0`2{||fb0~ckL{g2;gW-v5T zQZy{oNh!(D&`_yRN5v!~qr#$=3Jnzvl@ybTYAPx!D%x<PmWnnj+I5Q(i^_^ED%z+> zsj#TnVq0n{$!N1(s^9zloC6FpGWD^3zx{rHpXo*KIe+iD=bn3>`#dwk+Q5FPlfA~i z`Nuv-A6d1So!C8LZSI_mb;l1JXgeO{%TL4(Icasq(p*UGjQiN6U`zFqt<9Z{E5>r% zJj0zk>h#<>3HG7A%a(KZJATeS#?Q&!_xL%vea6qpJ#p>QrS{k<{>Dx?Wwv{+-kITU z03FhvvAuf`8pZ5-_MO7oHCe~7E3RM1q{s&I)nS9~vBo+hxBdB7alih3b@uk(<sLUN z2rUccBQsdPR_dfHNYzVPv%#H`iNkW{nyd`O$<}C8mbhYhW*?!-a399foSlUN>@qWh zP_P3R<Jg2<&P{iOR3P6<UE?IT9G4I57@G%Qasle*55!)VEJC(waW3y-QPzIs$Z@}N zyL#8I&(4u^RoB2h10bdzoxWlO#svBq*%*x7pP2FuICZUE#g5e1wdvZ$I6Y~$dcxuc zUV6-uOK?-+UbAc&ZuNR(a}v7lm3W7M)bxnZ3)~m1U%Qr%^0KAR;_&AqpPL-xzF_hC zbxQ{dlih$kX&61s<awu`IC17lYcG<*>Ryj-z81TWYZE_x=A5~w*v)a?!g(p~)oXHa zgjm0twY0Zv$(qG$Gu${UQ3<nSA;cfs%l>$G&&3(faoFLOy3s=M82REAcow-XXYKk6 z@bGOZpK8w0&g(`5N2KB&ejd)rcrKUYUbr-ejT`4A+X~}c95d<IJ_o*-<719veKL-z zd&R-su?okmwU^jugFbO;KztZxKZ}wZY5TD#W9y^8UY@@8JmBV1$zwEIf67dr2yr3k zstb4K;&pbWmMq01k?wJpB7>{l3(v&Wo`H24@zjm2cf1>O;d8sx;}!eHf~%6fUc5A& zk0_Qb)u(p2wX+{=vLV|!VN7oOE_+cj2E+5IE;`}VvliNU@m+ijZIEUYKW(pE&R(Ch zX5#9l%kg|p(!^W+jEQ(2%VGNJPmYOkpEAdN;`*$ti3#g*zR7h*Emj|RveC!C>L)JF zTJ{t5`*ZKlKlOXNU$<^O=3qZ(=@ZYQ)fcYDV+r1Q*he?a5=|YYxj2hF&Us$$UUXOK zp0Qy?&IOq`qh>5!hC@RJFE{ca-agmR_LPK^PIaHLZt40AJcPgyJsNmUm3)%>j4V9a z#2tSYKX}0%a33B%hv>tb;)jRNFE|#*lq(7DT6k4hvmRFmd0^Y`+@-_o<)<qXe%9OG zHM}G1-oTOtHi`Aw{%d5PHfxviShf@oKu+?p=Nx=qq59sfXg?>wdymrm2#BwA`~Sw| zDi$l2E7mABDz*t)!HVIEv5I(t!Izb8gR$}yOB5>=>lD>r*Vm66VZ!Hk%=mJ6@ISm9 zsfsy@MT!-QwTexO?fA6l)O86ck({MxEXC(>Hhnti#p`T_(ig4A11>7q^j!O+xgLF? zd4^cb`_e9-i!U(-59F7v<^#Yp_>t5+Tu?8WmkS+VKJ=6H!<SQV3(!lZHuf_)`-833 z87XTQuU>~IL%7cI5vn||Q`srYR|#`Y*9T$tXD@r{<;-53HAPQ%CuOW-E>u5ZDL)kJ zq2;q4pAmg@MaB{5;-fHlQ6Jr(5BccYkJ);EF43)z%<L`km38lGHef!O?;2;m{UIN( z#d16D!|%57k#_qOJ6<SyVzyU@9~k<?EPB0p(ChYXOLWfA^~;AolDBNxiVJx6ur`IC zJo?1>vt)c!<YU`C-bt)Ejbjl$dFlF4sEc<}568a0JAVo8!Y<@Q&G2Fy%<v9i2)@Ud z2E^Vvg!?T5-(}=}!X6t*K6=AQ^5gK`M)DKz{YL1RBw!gZ1t##pUJ+3RL>Y~81GDkn z$53D{5Wb8TSPd+|_aWiaAcirOz*0Q%i3FAdD}eYp(hG#I2}QtaeD^LHSPNDnupWpX z(}?fiF^*;+Q_+g=;dy}VK<Ju1_)cC2dJWz_+XM{8ck-fup}<aHI9yi%-S}=^4iK^z zp=-qeF*hp?-_c71dVuvnynhMfS;<iPFMowKN`PUA`+xFscwtq5pF;eU;->;XHTXdu zO$&b7@WUKp-7VzA)}_AwSkZXj{TdqE{q}#~{BH*QWZ(&}FrUcvBMiv;5iet2F6vVJ zv>o50(-(MX0B?HA(z~SiHy4NYy!ZF+OnH3XOXL^|5`OVYt}eGM=U`(7Z#BuFoet{& zhy9@p#`03b&uha0F~9qA@Z#t@2cGuy0jp|8X0PnH^|K2en0imf#`_1qUohp8rm9WN zZ+|xWj_o@O20oE=^c9cgJ^PQUi3b!tKkBwoPljf!tZ?uC`l*W&^Pijj;i2y}T)ygq zmVb6MY(4Fo9oN1xEUV<qj0?-FzhCm*r8h2pwJpp_JN1GASv&tdWX1(I2Osp!39H?; zNh?Cndpmu0%O93sv^L(^^47_&hWXnMy7v1A25r4?>eljq&w0Eg>-}e5eP{Ew?>ti) zvp$*kQQG>ZcMf{<PjAgQ`^cR!n@{`D9AEqHY2N4S7mql+vSaI+TWZF=`Siv+tDb#e zNR*@Mp7VnWf?p2V`S@c8einJmn!M{%Gm{Sf%i>XgdScnc85cLrF0$UgXh6w!_qJVc zhfcWYv1@M_@Wj?J_deh9Kx<XQvAGAl`iCLryV&0iEWhP%gG<7%TzSwl!K-FWye%W^ zj!!R0vo5^ww2laTcy#U3n8w{p%)+bz8^1Wrdf>9FgFF86&5)Y2mR9V1dFYd$CExU1 z)#sg0733}XVAMy$-<x<+;f}no|I?7P^pwXJryjrcv^VbGW^x*yiTQZJM-R-N(YW#5 zO>fn#+VM`uf99_EY-Q}~ot=MPUU1@j=~eX!u8Hf8b&mS`9|t9!|G`0duO<gw6hGcE z`;X5Z7#jL&i2J&;GPfS#UUTi1r<OGgd}DFTz2|-S-Qc5kzFJaIUo!TUcgri!-ZJBm zNtFj(_2jc@CsaS3_2)0Du5sV>{FW!2PkbDb^Vs&gK7V`uad&Uu@TlwkBZseR8gb1h z7aTaWIOBx;gI2AadFje?%3B7%dEo5>f4qB;d1U<M2i)^m`;glct`EL{`)F%-=86F? z{P69Pv(EJ{UH;n0tZ5gmzHq=lerP!C;v04x-5mPfrROaFU_sq?PkprJmgjbTcgT~^ z%}uYk<?VOgxxe+kw{E{8uJMJMQ$N~$`diN||LVbQXDy$#b-)LSk54<f@t~vMdvwrY zNz<GQ{x#cmY5GU$yIw3`{?Vezt8dwL;)>@kd2R8Q!fng0IrNA%+sjVR{CHYj$cBy2 z95~-O)-mF#ML|a%^U~8NJooss2Sy!TdCqUswybo$@a~TfZLNQEa`eu7Zu-rKkBs_# z#tRi~7wkTA{mT1G9jk61R620L!~YySZPwZYmR}oW&KkDy`2|;hTy<&KWse>GNXQe1 z#r<~sEx-T!+s_@8*R<=&1K<DX@auMLZ}_U=<2jihY}qsBy=zuq_1uWp|Mk?7zgbhU z;cwwj&ficFe9oso4q2JKY`_VBJ=i)h?bfCD{J3YyBP$kP_~VWdS#QoO8}xDRy9aIm za-r**l;fORUU+Evk&EloM|^wIiutF^T)pA_N8VbwVCOsMG<iNcaM|?66WSl%_Q)9@ zK6B4Y^B;fn%9yP`e)jCMyCeSk^b0qhvE}xd$jbX4e7b&G(ChCGxIN{=vyK|KbNTaI zmR&ljX7Pfmb2ATfOjvVtapi%}O@A@umix{L`slEUj$Jn!bMOu0hEDnYiIHdhdFiyA z=L-|>{>!81Jh$VoS?~Y-vn%#|8+w%$eC+LG4?XjN`O)j2%$QmF>dl_#-+$!v_r7>7 z<GUYQFFxE6bCV-<*qzIdy!g?C*hSC&dBL_9Z%MuPt$(im_dja$c78MY8uy@~w>iT% zJhW_5%GP=D&%U;K&OJMCP5#fW&zCiR|7y-0*BLi29+7>o%RT(z@l&Qf^G4D~FMV-d z=eq@&cmC~9mp=XV>DSH;x#*7c(P8%mMNQvw<nbTA{$|4WAGMuX^4SgP&-~|)YcCkE z_Et~WX?GtnHug^gVh(v~*TNrOsZ0Cd?T1%ZeR5;&@4s4i{gT1S8)rvMy+3loh{q0y z`|-^$Pi*?&^^~XnS-#}1?{3P@58imyLx(<b`wP)K9{AhL_9ufqBVRrG^yA-Om~s9W zt1iy_vG|5-&6B@>aOn0wzZm(|^Uc%3|1vP~gdG#kIq&bMW?lYm))fy7s=Vg9@H=k% zWYX@3s^j0<deoe_*9IjYwsXz0D|RL2ocsOOn>IOqcjxt?UqAZsk@e61CHA-%qZS<c z)`6*4{$us(v~NzydpYFYYyUpF;|_1sZTH=O{Nq~|B>d*}6=&vt6p}vbvt!oI{Lec# zzvBAl-j)$X4`1cp^2{Hmob%GjNte8vd0xcd4$7SM^`uMxG5BBC*F?O%@xBQa_g@`% z`(qcLc<GyoDQAB$aY_6?2WOA@?%P{G9nf(1OJR@wsch_TpSmXIvR76vOnv*Lv>Bg7 zuN?i=kX-(@QzxzouHM%L7f+`83i_$<@hem;`XbUF@d(98#c_&b6%PkmCdk@~C#7>w z0b$bz*naTG!F+}m8UF9(JGrj%9fpyYjehv{)O`3|K7(oI!|(EA%lG1U+2~Myz<R6J z5BHa2S@j;<ne}$sFXz<9lhqmOL;cckaSvlQ;fH5`p#AUh;_>U~n$7&VbB}jN&0o0a zDEG0GVkhBI*Z*?<Hyb~_5>QZH{9wQC0qDzq#y1MY82sdSareS5d4m^%ecM~9d)al7 zUG~O{?g0DFE&(tcKV9-o0p!MurrCRZ<L<GyHsig&m-=_aRO1e#_xM&d3{)QM_442E z^p4NnBOlo6MV9uG$MwhumHUxL^~euu?|**ym9PEIFSNLC{KnJce^{Fz|6G%<`G<Hx z?3F*?{O9y9-{*4(^&i&Q|M<f*{md^NA*ua{Xg~Ho@r}swvpz9B_J;)fv3L8(Q~S3M z_j-r)$&b(ajx6vKe`b&WLv#9<9~S3F-q>Rw5!JtZRJ@<~JU#ZK)BM;s_sGX2`H>g& z$lV@4a*vO^4)6WFbp6}`>ih8IzV*xJb6x9yWL00eDd~|<sP#9vkGw5_9M2K`zBGQn zGBW>Pll!UPaNqF*$@ejXUo3t<>yy|kzP|e>s+YWP|9Af^dB6P;*S7$2jOFk3i{;0A zWq;QP#Mk%w5hy=DYyAV&hoAo8(?9*C#^(KE`Ps(^-TwXbXE$tm<bm=Rp#B1mzrXbv zD87Er7pRZE<Nvbj|6`x)TYazmg6QXb;4eORFZ;gn_m=k^Kf9NGp#1gq|I6m5@A$p; zN1*=V#bkbF{(e^caPRNcvp)jVzn}fzyZ;2L&;9JLfyVbYIq<sYx4-iJ-d}y|qj&yh z^;v(9Z~TGgAF#fD<@(?6{O)gk1eo9c#uv!m&-tb?!20#-4}tvupDqu0eGb$=0<3R9 z|43lJ{k3oX_1d5Nn}0v?dEm3VKLzS9`#nA!>^1-WonNqT{QDc<{@Mr1pP&4@e@^@X z{lnQ_`R#pu?jz^-Pkh!tQ2hsz_q~3^_441hzTH1Z4qbn*?)vp71g~4}1<`MQ`kp^} z^~Zqrf$|fmfAqaR*Zang_x@f#eSU%B>nrcIe*OjruY3GJa&Mse*iU(&@%vsMgA;w@ z?<+T{zH&e3pWgM+w|;u{H$V2h<pK6bp!xluE)STWK>6)kzwTb^7ij+lko&2RUiA|w z|9<Q}z2fT|f3Nxq<Uf!+(DfsbeIR+D^$TSGYs<YDpx^!<NZxmS+%Wmc{SUhSUfuRy zNdK$j3$*_N$*;8M=ll6tulf%7d@(@&{ajyq`S+K6@VfK=|980;3D~Rt++h7;`3ZFX z{crCd$c4XGcYc2D{_1aV@VdtjBo7py7Y_DX|K9fp0j`e$#}9D6*}wIFVqf2v(fl~# z1I&L@|MTDH_kz{`6J9_5vyl^(Kk4=(_sQ>*nSSKSJ@!>a{Xbu;^7r|<kN>A){rLBl z=lPMld&YmN&d>Nh=hvsxyineðhoZt~;br$0aA=kxQR@}BXxh4>l2phx~}mLIuK ze9!LjGrrIKpY!;UC-(S%KFp82x<_7J+qb{*-*I%U|6ly&FSkejg1`0kiT}k2KjZtv z|6)d8IsZLL*Z4K*{pY79K>fTF+joAx_eVY7eaD!-ukQY|zt?9kyzW(BKJ)kY{h(go z&+(1P_kDMKzD%F@-EuFOzvlS+>;J#q9_jP<>dvn}A$UJo?uGLHtk3_z-i;x<<MU%5 zNdB|xcYpmOR)4Sl;_nroKV$H^?e|aqTD714;_mTZ=kNOH(_i;7x=(z4`=f7vc%#S* z7yZ@GK1TS7^MBK`fA;&Z_L<*4G=5@y`>^izU%xMfU&#Ny-2e3Y^1{Vl>*oQhJ3c?x zKcDNn-|I(j`@a5v(f!eXePVF`ukQKz7x&CRklfGyD~C<De=mr=^4n|v`y0O>{~iq4 zGyeYGfAo#t?d!kq^Ep?q`hc##S5JJ9_M4wT&o2Vq9|f5IuaN)V>)ZG937_*N_D`Vs z1&Tkw{QV^#yzcz}+Hybr!|gkM|M~wgyZ`t;4DkKbk0SfG--pyEKl>NI-~QOUJ_4*? zpz-%HgYNb9LZQF?70CYAmIs<&KzV@qdHc%UVEyF$__6P`e(>e*)#E?F`uZ~lug5;n z=X+4zYkf<4*$0vb>MuXvzO2{y0p{=L`Bif-`@YY|lY7bg`uF(C@!sF7JHP&f;C0LW z)L-xZ-FN(6@<9H7ZMmQL-M;ht)yMC<e*abZ*}wUJSFwNg`>_5w_1Aa*y5Y6Ee)loL zPnP$8eGYtn+28T|x9{xqLZRRO*LQ!G!K8csf#wHYe=oKFA<PTuUgQ6~>qDROpUVxG z;@>iH0ndkh$N#nae@}cEyWjj-1KF$ny?XNBXa2?wgC2R``tFrqKi7|5{lyDsd#%sU z$`8!_y}IM`Cj_rs?k7LJ$NzEf_=4C|y6yYkU-gy;9KUb>t@8Enr@qR1$@}b|pkDC@ z93Kk(=D&}B{@$vd`TNOV_%AB&JAUu{^o>8z_+`HF;l00C_xgGv-77!6{r8o-!RpVx z<mbqt>+jX=-=7e?Zh64<fpUNI3*`UTmV5up<NLMeAIQI-`~<2m4}A92N1*2)eeQ33 zKflEFrSJYM>-KMrE5dt!FB#t&SL4Ut4TGNe`t)D^zC0g!-~QRVKS6n~`tI>>jZgLS z`CV`SedfQ{_<j9*!0L%V(Dkv;{OsR@*KH49{$Aa3FQj|TuV?+OW7_>0gV$r<XZ+st z3uOOm%lrNQlr^oUUpa#F;%Be?goD*Rf4uki>Xv&U?a#jNzb_rolYf7nh1czWA1d8) zFBJM6KY%=t|9<7x+|YjI5PI>`Uwps1ec%2Q=zQ60{r#M;Jc#)x=l_2&zn>LfK>q>y zOCbCGmHRngxZ$%We|`INqOW{^$Nyh@zZvMxzh9}(`uyK64|KlxzkUAyU(e5r0Q$Q= z_&I;2!sI8{uOIv5pKNa}%I-HlYf%w=`Flxx)}m4`r2CwowP>3^WAM7?x4-r2=lt`F z_Sb&rw~xtn&(Aum#n1f8y5)G|=laoeeYVc__xpo-<bmud?|c2}ef_=CUcY^Rf4{%y zU)IucKj#NGhV5D3{_Gjw{>uBFe|nF<KXNOl!q58k@{cL_d+GjIALWH~ul?Zxt4p4a z_x@fz`5V(`eR|f<x|qGf->b(y!2JCggZGo|`=0;zdOjAY{`NP%K=sq#_*Pz9!2Qvm zJrWhjzTf;>UQYmdW&iT4qWtv#7}#{LU*G4mrl&tzH@W-uzYn3We=mr=>brM;3Xs2j z4AC9`e#x!Eh<@#@!rXr45ca#i*3C`*_Al#}P5s;7n%VF8)~(h3UmtGW)2}__4{(1J zNFK=luPV2SS_AnH6o0?_!@9kxU;kEdMgVzrzj6ruoKJe~&w%#((;uyessj4|mG@`A z>tj7!<PGrrtzUcQcYpG;kK}+Y{m0rI+^>IYb8-LjKS%UCKkLz!{_FFxl76qR*5kGP zkH00V-|?BhzWpJ&d;XLMy1w>ZKknJ?{_Q8eUiI&1e%ZeEc<=Ak<G*kGfv!Kj=I77( ze+>`6H@ffoIpPqX*5_OP*1u<d*7nkU%%wYj`z5z_B=l=<?Z^&PKmFUko#v;1_RJr~ ze*8y)-90}qh<%<<toLL5)Tg`K-fD{NU;aUB|MHIloZp%`mcN&-Z*x@t=Z8=I{QEGU zfB#^8y2+n&@YH{6X8-cfGOA^N``#b+<lp+j)4%-}dHu`3^!NK?d-{X5tJP0`>e=5` zd%U0ZXG}W3uQ&PWuRig2hWhD0J>$cXpZOQ``2W6t|M;Eh{ny8j{`PNsw}1YQb^ovK z`t~pGssBLoe&gGRG1$M@`1=?_{5yhD`>lV+fQEkKcN~z?zyAZ6Ykw~tKRCyq5WFsV zwV(KU>c=rK#ZUj@o>Th+8~xO0cDEdF`u2aH`!~w_p5J=vd(yf~R^=>SVkY6wy9#D@ zz2l$I<=?)Ww03FMq@1O>Ir5Hw?ahZ=n%j$9wjy_Zwwbhi_4-NtlW%KQU$Asi&ZP6t zSr|7v<&^VhCnqOOlRx-3@8W*7ro{OBJ9hJur^Mn<7yAAUyX3`dSJ{8#a8<wlCQq~f z-d<MH;&nOvGla{R&hu+9c?#n^bM9O_R{vJa$J#X+{6mO}%--Zlv37#aKmS6_Y4^MH zA;#YYUZ?V<x#uI*_^W(&W_zV-EmD<oW_PaksnI*keXAYI*_<-}loWe9`_!8fL%o#K zXD>V>dG_h^7W%5|JTYf3^#%CT!1f#Q#bO|9+9bY16)jnZS=#@@-(|<2VArC_&RA<E zt;$%sWc~6<i<hi87Jmog=e!O>!4H5z*Wd7n#e4Snu9pjMNb|am)1Ivhz~9Jn3@_pv zeT6DU0`<>k;hp29Vq<ROo;#Wpe&{b4KMb?SpJRA4{-#AMcwH~*@ihrQJ^q|$;#xSM z89e%<PM5#gc<<xy@LG`Ei(RiSe>1@F@po<$^f*8IV;;KvCF8x1zi}i}@xQJYWqc*! z$H(7!9nkZDM}M4Wm%p>{-p5}geNo=^>Wc4jFnsmWLHpBteJ{PtedztLmmZeegy5&^ zrQ_PU;<!==jz}-oBOP?tOV`(8efZ2b9rS_a;BmhA>uFu{wR1p!QjU&en(=ogQ48HK zjtjYUhG5sY3v$5gswFCS#dj*+`;2=b*3IDtkK-PUAL<3e_FSOPJWkGs9%`oh)#Z<W zC)G!9p%<j5TdQZ>HQ@P-y9&PSzoW=;!|>BJ?$vnj<L}gJ&~E&6y$~B;))n}lkH73Z z&{6oIzY+N9^0x`^ef>3qcH^h()#a}Y3}1h=>+;9C?(+8<-uw7tdHePE3i!VM>Ogn- z<6qe8^7l2~`}%W(=1<qFE52P|`1<Pr-Q_O=@714UEZ)<f6F*3CvIk}ATL=2yF&a`I ze;2`rT`$ZZWnKQF@!rQ@8Yk@Qk9v4H7>kd;wX}2NhyI9N{$}C5ufKHA{`{Q)zOTO| z&~E(DALrQRkM$f32Rh%hY|y^1uJ{&#$z1yAt@rvUY7CBZz+-&!a?qc{BZU2bl{uD! z^3gl5!kBZ@ee}A<y#PGld1T@5$g*c~9^>)TH4pH8{cY2Dz?E0mSlpvB2l5@%b6hGa z_W!%|h|+_|cHU5fKSfKQSQiI#$#F?DwjO`Z4;qYF`d9F}US0k|jH8M+QO5Z^G2S?y zA|{|M1ObzP?E5)N=PF%@@hC3>QeJ9Y8KldAq?^@mr}#w;+J12@agB$b<px3ze_vMU zB&9ROuZ6tPuazTytz7YIRiTa2z8Xk5=H)=VR+D0jVw)oNlP&KQ<a_%kL@`Ve`^4sN z0>Zze5<l?o*n=O~I91=NdQR*M#^H>XIGn{YUuT7JzDE6e6Eum~CVW?j@LlQR&y}aB z@dt$)=S$EJiZ{+&B5H}_2C04!^FlgXu|Tm-vDG-fr5y1xt{}{p`5BNbeg~-ifK3wD zfNjP#75W2OU=RHPtw87>5GDQ&C^F6+;15m_3_*R6KA;##J*)%c3D&#>hs*fEZsn_= z;CTGid)Ng>3I<_4Y}x~apWp=J8b&__;y<`V{0G;HpMjA=4~#XgFQ7NjBjXHAQhu)J z4f4o*24$F_LC_nd`~$a{ASdVpn?;XjD8_wYyI_c}e+cr<`Gt7IZ%CHPTd=LjM}CtK zZ^$0wx)SyWMT-2OII%m3_K+Wxsr(ufG!}Y;Getf)OXPz~L_P%jfqsXCiQgfS;&({0 z$}_}n2<_o_NU`!e#cybm(4jTP905O}^+4zyoGy7dxBznS4=x0f-z@$PZV`V&L&Scl z#yhmYxZXj$Lu<uuDE!fGXoGRyL4JpEbO5<l%-=B7EAurhLi`QGdfNPQ#WtzKVOVe0 z;jldtXBcc5XBhel`%YM@^oOtvl_MToo})C@(WZ-}4}=v<9|&U}F@9Jnkp3!7&_w!c zl5xYZ-W+#$qQo;C^?oAc!|RRnMk4kH?T51tfIM2z&xlatdKU5#amMi=u|n)d)JVJ| zT7^CYeXI`hLr{10dkEsQv0C<5IJW*t;D@7b$q!GLx((Mj!dpdeWQ52^LN5|}BQr#A zr0N~&lKdR1ehw`c{X?4-JB;&Q*x@$C9_O$s+3$yGoDrx8jvs;j{4uc_^CYT$#2(>~ zLVu;+s1k{5)Hdl?quPW&8u?&<8Ljgi-6Z{dOo+(G<SW)2*B<D(jnM8KMeOf?k>4oe zA08q84v$n+|A$wJ{^519j)$WTxsHc(U4dhRrM}0yWu9a6B>u6e^UYYtu|+`Y6-!?k z%lg2$V_DBc9e->qXzF7e8(9ai8y6=1cU+|CkHdZ3?XVk%x}^O$uVS7te}?_Id?4*G z?jxkJPah#&BIA$4dc95lW+3@B#(6#cU|-pY{YZ>N9@&p^-y@hV<3w&!dK+l?iRAjh zPbBJRH1!!b@Q4WMb4NrQ^C<L=hyz0Jh<J(Phy>M3mwX?Qt>_gz5(`E@N1~6V5!0mK zj@R`a4>_+Z<0EAq#>XmpU`IavW4!TLXI{U?Yu?8re)f!`upug_R}Q4!W*KjMr7@3@ zUj-x|bx-~As88l?e2e65e5>Rs3U$RiMWxHQQ5iCB)MlA~6!P>q?4qiH@E27h{-Ww+ zo>A~qO8ZXZ<n{TeVB=taI|}PN8g@rz0bzF()^`i(d?4uporl+$O7aVV<YPWtNn<`+ zNmr;I*Nc8pZ%<I(3Z%SU<P#u!68s6lK=3DoDL+~<%9tw3V}O)<lpnAB1m&m5I1{pD zy(Tm$jdKV0>(QY?ADwJmoZrzYK=?Zv^I;y3MxEMNsdDT;Ti&MpPQmDKkw-^}JUU8g z#7q6?IHlv2#&z^`_>ac=HxO%0&=J6i$TzQ_6EU9}VzR_HG1a&hkxm!8iJ8jBIxvq| zE62yg5Yd~2eM<k6B2<n(V$0!|^O=-qf~F7)jq_a0dlLHJxrlQT_KnR)-?RCs1M-n( zdz_eh!O387+{su!8(S6I1*d5J9-Aoiu^Q*G+l=E1*d5zwTx~?G_X=Pv;@?b+HjXoi zCB_v&EED_Ka>ZKXyqkR3KT2#dK?f4sL_QV!D+%<}BIEcsaGI|7bX+GmpXoSfaz4|s zPK}UHM_%3}#!0@WV_j^$MAbvyZM}5W%T>8o<wYtl5qX^EDXzdcE`;B>3W+OD^L9do z%=ZNBH_rD2)X{Cg_(tP=1@Xl<0TJH})B(>EGa|))2Kww`(&&rzz?quYnPtXtDrwEn z%v$5(I?vScW_B27G3Z&L#&I1H^}}<_tW5DcD_>F9(Gw@@@9`MNCy2+B07N{V0_7vG zHXrAC@@FR+*D>%nJ6rtB&X@I=U95Da;x@rKQL;XBa6WaxZjSn!gZ$CooO0v(k^BnD z=Nw!QSjTgaFOEB>LG{r0Y(4B_uHRhL59M=1L_QbmOZi+~-?`N?enN?2jjT^XozhK; zs3Z3Agl5Hd>ErW?Wq;1AlKnXk<8poHbs87*dLs6_jkrFXPdY*N;fYD&_eAuMMDj5Y zuH%VXm-BNauk*deQG{{l=L3<4`N#wJ>HI21)H(O%e2i=BwToUN`XcobBNdUC9i%%X z{=`m+|D-b6PbXo&QGY?C#I-=<TaYg6wm{c$L6OK$j*#^_8T%mwb|+)KxUWuzKl(Wt z>%n+V#(9TvpN#nKA|K~ru1iv|tY1>7=p}`VUQ(3kCB>*-qRNw1p04stk)IMO@tmS@ zoucb_iuQ+v=-WXUZ()|K%fcMdUzjg=s`kB8lO^s`(-pH73l*_WoY$!}iVcd$EBVPr zu~GWzX=Q?^Z<cY+h*C^bY!^(?Jf~<pDTT_f6I_J8P5+B@9T(}kFRB;*nL6*Yv~JF7 z6T8%Q<4A?w+0lx5!vBrd#cyJjMjfzEr)eDLRvKp>Xg<Fo|GaI+`43`^(i+$KSU>X5 zM_vAfSSXloL@zx|u~ZTJhW^sqjPq&WVk7oTf`z{%Mln^<t5~jBuc-ZKNvrgU3qpmT zQ6POWqfF^qS?>(BTN-N|e?>hmjRT?{m!eL%pO+#&o{yIW%RXL)d|iq7mZgdPvMkxZ z%SseC%RXL)dRPR#<*0vNpO<GF=U<7rGXC-sr8gVbH{@3;zt%WEBCT;{>ijcxJu(wS zFH_eeGezk%#ci_gnY#WfB80ypQW15@^WTalIsdKDbMlH#xgT7qb-EJc^8RpTsQ6nM zuC&(K%4ntIRPIqaQ8C##D=?3hh|l(uVS<jvxGOV(^qXxQJm;^>0g}!$u5U?ufusv? zjwD?OBwcJ=calb)?<8GjoV+htxd}*mvvE92x&lbL$~dQ!Mtx2vjlP{l8ta}#8qbl2 zkZu5yMn0|~-3%m+`iUitdW<FAVO-6m_W(g(h&-(Zjb83rO*#bUU(%sK(&$%fNaKEN z4Qb?`dAJbgC!UWl%$N1Jun>Ie6{)=0IG0i0Ch{!i8S<<ck!K-aJbz|+jdKJM_S`pF zI3H~zwy1uq=&uTs^;rc!)LWIRbh<oeSd}5q8CGF@Ti#||S3z$zemL%Gt%KF5V?LKy zoh16JwT@S#PC2jDsH;zD*Q7M+iT>8O<@v%I)D53su8B24N5Rh;oEMHFjk@6Tg*92? ze+~8tpUbQ%ReR){ezURvf{Cmz*k>onIN2GBS&GQZDb&OMV!YX<;xD^a{9P0+^ScOj z!2Wa*)}7B+FT%PrzO|@#(rb}7n~pcG4@rA~lw<z94_u4-=6&GWG>K<zx{SXz*Era} z)|ScmYf+z^&srUSU9@rTfqY%8jI%CI##xtQg2ut`x>O+a*I}P9FY5}#|2nKQ^So}G zVzqHLQQoRF@=bY8m}0p2&xsKKIaq&N9wX!AU>!J4PQ3CH6_aJ$74(aEa#EFFB=gBB zmigpVNj}%(I?ws6haJ~veU8|zM}2U-^|cbm`Z|eYeVh2dIMO%|h5p4@58jtvoMv1+ zpI)449JRz8<61+^H_jJ`$mc`E&5GFHwq1=P>W|mKi%~Dc4Izrj;&%i3HT`bL6u%pC z#qS2phkiGx{|)d@zZ=y52E=dsYZJt@Y&ti~IFE#0uI`)MYPr5$f_$;=FG2tMoQS;H zh<daU;}9>!{GK4@8Rv;a%+tmq<2Z+OiDIP*VxBI=y3_BaHOBQa5&68Gh<Q%{UWT~n z@3LU=b6Kb&`VakG7OChFf0tps>F+Y+hyE^06@Qndi@&@uxnAZ)h+ba3(3ivSk<h<9 zPWYE2-Y-a(DBWUQhm-CQyaM(8J?JaLjB6%Q{au+R*ViktZ+LyZ5`Fu5$h}7Vc*Bje zfwWuc6gj7Oah~9Ph!^{T@q4j8^nVrBmFsj>oA9qj9(Yc<I!ft8<Klk0I$3F~JLhqA zmC{Yd@jKFpzYKT{_7DAD6D#NMYZBys`<e`VHbj1raoq^aPZ0b3B$4N58`s0+7aG?y z#LX(#ajw<zuSLE&ziac1>kmZK$9u#sy&AE*PV4V_x6JSQ4B=m&rHF(v57%oxt}j*^ zb;5iUAYX;VQsLi}Zkz)^-&AEBjPIs8Ma<u(+XM^Cjq`Bq|3d7C!?8Yv*bmvzFKjig z?c`%WY$v}{_%~}k-Hdu-9p0QO<J}S>=b~G59c~3(3i++*Q;hpo#KZNxHB)J?aq_%) ztM02?JB42qs)#z^e2OxJzAae%-KO%}QpMkG=_=0^f4{~4r`_$SYa4Z4Hln_G&fAFi zSce<q#crdn)5dz0H>iA%$bYBf{VqjmjsJJqO6M!;IKQh?8h$wMJMcp+!F@0DTv7nU z_$4KRcZM0~P{{8@oid+yHVb_h@<sahC1Q_U+V_p6$m=NZOJkJAzO(5X)oT~L+aq;x z59<22(7y-!y_(o0@_TVV$9V3=b(!&$A-~r_UZ(TD&uttfpzqT>-KTc<b%^~R^2P5T zYJ|Sui2wUhC+vHh5U-7e62}ARk6!Q}K>gcTZh|b*HG&Un9X*IVQ2t=4BA!c9@4;HZ zhpNTjLydwDx5@YqYg~WCe7PU~sQLd>k;wm~>+`27q5rJw`bdazK8QR#f`0cP^6*Hw zaehxa0!TX2IC=m2NEDDXuBTH;<6JY9G_Hq-VZ29>Pn(Z?+WZ{j*iAmx-R5K6ZGM?? zJwkqk^3nHgKKAFI$Zt}9v-0;C*Ja>88Z7)rLxle*`aJvSqZ-en8qcH2#&I9{j015# znx*<B#??eV@@exqKH`5A{r+<DIUe;}gpV`5i_e8B@LZhyifH9~6cZJ(-~L9u4C6{A zW-4FDt<d>b==>{+RgQHmpnfN4_<zg@|1q8CW8q38|GfS^#(5&%$5P~TkjK)L_5x|o zaVRe~t~u1-r2KN_R~aX-3y;+*zfSor#`zoaJCwgi_>YGgS3dZUyM_OFr1Im9a~k=n z%GWp^uT;89^{}3csn?|ZX61Jn$JgL*aS4A5=Zm<vM3|s3@)M1N>%9f%Bj$Ar=Y{!g zDO9~8#ZnU#PI<L)eo1*Pkbdfoa{~FD#&tEYGF0p<IS<Gybsm+`#(5s)G0KlM&dH<` zjH{BEB+q3kOH_{WZ2NM#o>f*F=XcaA03YL5Zc}-^ah*kelL?wdY%#6`;8x_H<87@r zj+ddowFZcIwjxjeA-~zUHWNFH>nk97pZ)pa6Ctu+pGcPT<`d`>Ja0aMbL7SF^F%t3 zbiVZOCkmv0KWW77Nz`o|{5@GJpNl<NseD}DP9(n*H2hTIJwJb`3O0^vystuk_?-N3 zAo*d&c{yqHh094t8dom$u-|SZAJ?lJ$xoGjQk5qCqzZlfkCbNsDbJMtQk5h9r7G9B zo~9h<gQqF?O24TplzvlHW?X;aIOQ4-`j{P0g>fE7KKero@F|aRah^}1-_9Ub%KV;o zDdIl$_uxNWp!6om=hN`Zd_G;FH1cE9ZN`NjZk`Df{bw>1)$cQP#`z57+Y*GoElu*e z4fVmiZmU+h!MI)n{jB<V7Uu@apT)dvtTc{gpr3OYXDcyV_|N5w{c}}H*BKZ0$8*}( zpVx7pM?LWR`n>8rUoUiZjM!BtD4lK`#n7wHR2p?V3^a0U$MF}p@c$BPT)cnyOQ!NS z3%+0!BSh~7?4yIA_d=5LYZM!eljp)0alLqzSS<V(k!QwPqkd|z9)BmT<JPEN4e~df z{5{5b0Pv+m<2r$eI=Y{z@xN4PTsfr6<UaHz*x5AJk>k9CzK*pwFEz@#zQlD!oxRi~ z>-$oR+^@aVD)(zIhs%1u94(*Izl{C=FWA3~dbJVuye__614O;NjB{l*=~^J@*O3=~ zK2}#O`0_TzI{7^C<tDlRdl}<iLHl;&!kU|x_ei|20QP`>C0O)d2{En_q_GeA`PeJ; zPxL4zC~7`lfiA~?B}@4kN@olGa+}gQD$kXCypk{Zc%=XV(7q7Jaf(!*^C4X-&$(VH zQM)p=!#<pXv0p*`aXzn98&?RiUi~$wKduA)==@)4H4dJ$Uuib3Ope<Iq`X7@cZz;3 z%()M1J;)pMY7-=Xwdgx-<mV_qSNXUP_?~=R=UharZyxYf)ZM>{p`!n4nCQRiHZJ^U zUZr37e--t{^?5bLxLBXB(l7bwPd2~6I8P>jv+^sHzs)$<w_j~GPR50=%Gvq&tJ^qd zla4d4n~0c46*18`*Ame$nZLj08YiCv{I$e5t|B6z=|t3xjh)6h6ZC5l#_<?2(F6@9 z;yQUc5q)zMvB)?hiRH$*orv|RB*NbSU|pnfT|h(}Hs(s6>hdJ-b@`I_x>C8G)M1@@ zzfi|@q#f${2jrs;>-huu?Z*5_8te8W=+}{7_LbMeMgR3kMK`|12));%fYggoezdVH z@?(MI$16Y1Sggm_JwWmkm7icNC;3T0@{^6_BAo&xovP!fOZ~o{A@%!urp)j4Y?<Hd zIpXgX%!hs9^<3qn{%yKQ>0<R$qJGMizghVe%7-83=XK4~>&+@}QF*KSZBu*nw_VVG zBSPx`4b&m)|BYzz^M=;r8(NQV;GB6k^)Wy0mp9T?AJ^4S$j>s)8sN+IQkQRVU(jE% z>X)iM;%1z0R7yN=R7pH<;5@>8_6Fh~P5+G&_ZuxrBmU9w_hyLLzZoiaZw8B>H{D7{ zsvPGj?t?c`=MnJtW-^fWDN5sfVAJU9wmeg5%)_Q}KCtDeL&p1NiSo;oze#D-xvjTZ zY1F$-HwxAp;p3T`&98SW#wkBuX^o>E`J{b)p~|tJY`WYyUc)@<alL+x@@>YMg1G7% zmEWv<>{IgJ!ugGQZ-p!E5xuw2w`_i@@^ehk4ETKu`)~&Jy~dGC`x4{aLM&7HCY6^f zRx8#h;=F0w<D5;z-VYiDzuSX>q$9v5jdQRqk2KDB_}`BGcM$p5ZwFBieS!OTdxq*~ zsy^;#Y`bhloWpHe<J+$BZP)m=Ykb=^zU>;{_OAH$z@FoFik}@=C-#vYSSR+89Wj#s z9jGJbe+TP_a@G%N<c;&&Q6Tf%f%}7l5%&(QmmP?U^WLHH?5NUl+QhygOvY=#`f$7k z<cInV3F4<A(^!07(vS-z-)mgQ!hb`#aitN_?|IE_XfUox)N2G%uS4lQLcfhZ#QJ?3 z{l!L&^KIC(p5Dg3V?DgR*;xFX=IvS_Y1|jseAXNJIM3KL&K)-0pfs)zjO!irkxQWW z4*JL?uzx33^xlaRy>}AvHGay`H$y2$AF=InRWDEV>Lkv05XZsPuLn}U!B|5{Hv&nw z7;6~mRv_t4<Kp%FUHovK?}ivF4DxqFfsnt8_-r})nvL<s8csRl8cunZ#Pe>Bu||-e z2P7YPxAjX^zDeSISNqtzEyh(reO%`&sNZHBt4X&5Nn<}g1-cP+^%UsFFyS|b8`oi^ zgN?J6@(3Vl)W6M7l6q@o-I0%eYV&iA6MGx~^i}5BSfKo3sRy)8*J1QmqWmgj9YVSq zNIwn6>7;#=<h`*|=Cc!ayr0>LyoE!5XBZIrJEKH@XN+<19J4dYxGo~5$vk(a%Y1g` zD^@C2OFTP~2ivYg$I<cL3pTDN;paW|`(CWb--}mFG%m*ZUIu8y^B&F_tiSiNCC>Nq zWc>HMGTwVds#mId8pnH0D#!V5C;Ywdmi)Yra|rYKew5g~k8?NuH>RkZNO`f0_dfRt z;&`9^7W^jEHP^W*LHsu%POf*8)^ii$v-Qf1V;#nA+GOnYZ>j;(u2yNpN54(Ys*iqe z%h4xTFCVzX{sY7v3qKz)PUwH2`T8KvxYm=OWt`6vQ74xZy^4j#HJ>!DQ??v=VIDrH zRe6JAv+C^;y$>-i^*;0{ouo9@f&7m!-?tFQN1)$AoF8EwY%Es9^@IKLqf)8gk1$VL zAM>>JTJTR4D93)`_YgnYV_Y4?PLbpI;=C2(GzY7GE9B5`4imj*)agjlkwDlrN6B@g zIa$VOPEkMUYL}sQh?nCwXUVwDSTDxYoTuaED_vl$L#bB`q#XNc7~?_y9wlxwt_{Gy z#Yq1C7O#l9WxoGbqcqM#T#vss3IAj4>py}181dB+vt>O$)_VE4z&OguFP7`m$E9-J z_?Xub#PjiHrBOf3@5gnL-;bM=Zc)13*!NQ(cK{Lp$DMLL_!#?u*9)B4?CZrR!AgfH z9V&L8go)iJn9p5^=M$_y>-m#3<NSj5nLyIW+h?Q;fTYWf%R~Lms$Xebe7^8WmD1ac z<4)>V1F2u5{CcGuq+fi3da=jrFwPj*w?rA2m&iC^--7&6-hw*heMSq`t(1uT*?h#o z=d&#s_Z4D;37Sl7RC%Xy@;>PAm?riAjykh3RQPXKfW|m~k5GQ3@OQQ<KSud+>L<-O zuxHGBQ7TVYc`XLuIB3i^b_#yV{DS|f+c;B!pG1q@r;%d!X_U%6#_<C6QjF_Cn+ z8pj2+D^a^FwaZpHt`n?}Pq99{etf#gxDJ8-Kd_%k|D(g$=ZJrF#e;cMzttu3)^PFD ziut?`yOvxTr<HNSzSX00#6`cYsN)Wzo-<m#vQJtIR1fDhu48M7oNrp&jcY9E&%zZw z#?cPC1$Dr@f0iKQw6rLlDD-Ez9xk9A=D(Eam3{G9zU+$~@XvknS)I_Ip|5eA&*QMK z!T&s7_V?$g>n-G`$o<9V>2iPZd7;GndAVYR;6II`uFF4l9sZfAe6OO;_n)Oo*9h`n zgzMerR*X|jRm@S;^G{og%%iPU=J7>{$Uo=)$2`6W7k-=eg)ib%59`7Ce&Ln*eo-Lv z{i0A2*B7q;7w9j%AO9j>*8L0iYw}BtgP)Ilf&IgN`$d)X%`dj8eVroKiGA}6tdEWC zH?-R$^p~g`^1npA*vS0?e_!f4eu+M~0{UN~UU|R!CF+LHXTB^n&iUk*8dnh!b<2MB zCF0@v_V20c2l22DzpRn_m@m->*_Xbom%j9Agz7b_UWfFFT_Mtcc7;m6*@bgB``4~; z>0i4LFZ<H2SVfQIb629w@6!zNyDLfj?m{1;eru%i86WM_jO$gzzYF?2|9l32oc}J= ztsQrn(mAS+{hCO9%$wJlT_wiiIc`@Okp4EApd-oOEOG3@e7O&H)v6!v8|pR5zSz}b zoHtS4rurR{Uo4X|6#VvJrIU?)J!?;u^=?PpybiZ#%Jr>1NA6SF(MNcn((W}D`$T&o zkaVeWWYAx^v3Nh!z8Oe<h0LS9O2%);^>8`$5VviQb+YZzms!v4dSBMA_4HMQTsOap z75P_DQr}<2DL+B3r(dP1JYD74GVWJd#^Q5?uW+8{bAzw)m5=zxkdN#881f4xzOPDD zj_bXf@=_q>Ws>)=%2f~Z;`RJ1%!76MRg>iTt3ATs?UJ~5$B4h((Z=HEyt`w8@V7fj z{Ord5<GgpXUy;8_)^Yb{S;yTtuLV<H0i?XjIPM{hy1$1s>YnG%-8cvE+_@Y1<oE7& z<9yHW-R(wPr;%<3l5RB)J~!Ll1|;2K950dH0|foGF|H+`zefB^NQao9V@ZbsNn?NP zCLIAJ9cf%^Nk;)mV}GAP8g+gK>3IB8P|_YCY3%!rq_J-{l1?#Bp5MMs1(HrTu9c)S zfTXjGllP-vX9G#+8VCO!%GY^7()q^m0qFuD=_2E7CtVCAU22^7kuC$0E;o+1Nh7~+ zldd!l{`-}$kyrlvm9MLfi{F>~x&}xZ>-#uq<n?jVjmC8(=_Vj))aebRk=GkYw;R{F zq;Xw6mvpCbUI7~0&Uppsj$q^B=UE*%XYuo+j&S2*yd9`>#@i8Qoc|>429l04PTVt^ z4&-$M`N-=A^5czjENKsrH1c{aY2@`<(iz6Vb?HF9xGo)e#u-OH`NnlG5&8L)i2DNm zdxj3wJ^wvJM=9=)NN)y`E;Ft(Nu%D+B)!SFSbrT=K+@I5c_97N8`pWnI`l!x8>An0 zAYUoqe}lTZh4N0R?{8dE-{0UmI2iihL;~UOn>bu2NXN_d;v0{m_T6vLr+6LtCPgt_ z_R%+)N@pqJI>PJFH(sStC$?RY@=KI1Rn&d`O@-2^3tPWh^=p;J{A_-s@|%@L9gzR8 zFd*XpSGdx##yJRa{3}89|CKH0qknBuy>ivVKDPB*MgFb&`BwdWi}k1f_9n6WHbLlb z6Qz%Sn<Rbo+dSiF#rWT1zOB&zwm|73rHhru{B3!IadKVuM4KRfzO@H+LHawF(BG9w z-1r-ZuBGt%9oBs*{C?MFocW~NfuQ-B2J`*z5Ty|h<^N7rI>R`VDbG?w9kPG^8~fGf z!>>&@iT;0rh5w&WMf7K$5B^gu*Q@`ODZkt}r^3&FYK`*(%IkoL=RYmRHHQ3Fr8|t{ zVaR#ReHil25b@U;D*ig7#9wE$alA-*jPm29emgx%C&)ORiQ=~t^W=D)sJl1lKL<z} z`-<nUPOPszZl#V}Wt;`n+Xkc_`VIS2XDyI)y~?pJwjBG%mN%;$^RnqyrQ211kLZ6N zD&u~ite7fsf1jb4Df9du=T_$P`)r$U4G&j3PxZXAp5Jrc)XP_Xfg<L2I{8IF#QlA# z@~chIO!8}h<YPUaL>|7cR~pxOuFLm0&+`88`xf=zruOafeTyH$js5w;4{jj*{19zi z{2b<o7$E65<Fa7?1J=i;6O0QrYkoxiZXlM+e)tjfbdC$3^|%zVpO%2O&|iK_lzCcK ziM@|3tJJo$EX0L+wj9AiJHi#IHvs%rU=XlPXlICx=EpMOI~#>>B`b|}qMa*J{92oZ z?~*vJpfsU_(nT)_b<Xi!h@0aKz`SUGK&ElM2>O65An9D=#P|BG1M+~Rv9C~f)&ZLp z>r}s9_0d02pVk4*#);4OtOL+*KBIjbko*o4bPVY|K+>JYu?Tv>2#4}um-r117C-pa zCieKjVKRPjjMA}6dkjAZwSp7vy0e0j5A1g<IM@E%)Cxu(7LvyP!2Yp<x2fMM<HYw$ ztl(-O$Ho4bMH=&&MY_=hMUid>f*u&IsQDe~F|GxW4@CXg7zLzWw9=>}n~sw_4@5mM zF9Q>e;}XO(FjM*HoAsotl&+EW7+5RoF^GwQd=UDDjc#L2!MKBP&YJ>%gA$aF=gc@q zS%dJL8RsZ#koq6wHT*t~H3;j*bsbb7>of@Ky_0-gk53|Q5<aiB9Opn>4_+W9$$A`^ ztq4C`$uG2@6Ich98OI+<SF0R(980=h{WRI<Q|mxHPmjg;2Q~u{Ur2<p@O>gH1oOf7 zjjWJN!|(Z6Az47u@Y?}DAr;0snpkg~>BL6ydyrS;2NfH~#o!-QDe{9*f20Syjg$6+ z*=ON*aJ;?$t-)F!gHw&Gko+_t#v7b2{h<@<W$S0Deu4TcQodXttihG`=j_&CtQ+np zt--a%nnr(3K+?_jb9`$^sK|$eN!&wXmBu*C^AM~b?S~{Povf(qHw1m3`*29M^0AM( zABW^f{SQH0wjYgaNQu&AiksAbx&3^~8d9PBO66nUa=nH$D!)nj*uTTcZ&kkZPisi0 z$V0VGLW7k?e>w*Gp_nJ<6Pj#am#okf`?_R>rb}IiW=LI!dS%?uLRq)aeC$KaD-?Cf z^$$gzazBQmKDi%5%VhtC;#|Xh6uMdM+l+;O7i5LD1Ifp^_*ll#DfM-*k@`B=E%kD6 zwA9nViN^I2^bSV74JIPrT=#>KXU2bUj?DXD#DQ~@b+G37V8n4c>2j5ClQ<4Wzh-?N zjO)u|#63a}h1zYPhoYa6KQz?X{b?w!KNpflow8pIO)}2wh*)165f|q%G}Bmdh-+vz z5OEFFxP}&~ywF(3QI7k`<0#klABz2K+m{*Zc*@Ixlp}BK2SY1OkegU-96thwAx|ej zZ&)x8dicF1w*9aO*&oB)#`PxkLS^3!i&lP=v2g!o4T}TPE?(`@)o-S8meVd<@-Yn8 zlMhIHjpJX$0=Z5ME0lFTph4Do82TdDc^KB8^*O9U;vI&*xQ;aHllx#;i|m6it;ets z>=*FELiL;#rgVhtqcEIn?}h!44CSLAbAN>;VWGee!*i|YiHLh3u~7M_JNCJ-I;C3_ z+ZFc+V$ay?IUI4|TxJbN95@eJ!y}}=hDS<$4UbYfTIqDj+we4F;eOp3o<t_T9l5 zs$Zb`y8gql{x}a=!?FH24_U)?{fA?}bDqO1)UHzP&>!)P&>Fr;`OU%~mM?i9fjlwq zBe34g`v~k8uHT3(V{t!@$N^GbCVhQGwXr<p*8s_{SH9+FM7z@1r?aWo0fgQm_`H;M zhlGjUAsBBM#yKQb@_2|x>3Cz!p<V)zcG$O!>k#cHhiE@J#4GV1!g)}yR{h}lCinLt z9ma7rFdX&pI1zP9KjEp8r*Qb={tefBhv%E1<4B`F;kmRGUTU1-#7$Cn;pI|y;hQCo z;hNv@3fUjwRkA<AtEC>oYb4L%tRKuLydH=+!x1O@PB{86`%ZYXac$%{?8D?Ek2b&6 zIA14?zVbTtI_>Y%TH$S?H`0jSNSA%SwMK>*=L7IF67xNc7-5_||BQ?T!hU3waqT8Q z);Mk<#>jpc87KQ;WP;)MZLE>W_V>H2kx6o{8HxSDbInLxKR=^9-2@#%%(U;bt&v&w zeYQ0+$ME}K*2n_c2P3h+xerDb%Q<8u_BHq2$XYoEj>Pqy`*~!8<aH$a6VHhwasJ{t zaU|-N=g5(*a!wrCX6$p+p)TW!#yE$D7#GjshlUyFwM5--hq@&%hsH}i9Ga?_qgbSf zed3@U*TseV2Iw>Yhc<{kejkz0x=x3-o1jSOABOR>h}iF!62puuh8SU7bBVFWISzgf zivwaFhs7JmcchVT8xw%!qYv41lF~S**mfyumuFnRp&hPAzoCAiajhbjC?cOWzgp@# zBG}mHponCdS45V`Bl5*h#3rT7#Xe%Qah#8MBQRg)A)-n3P>=K*(PA8p<YPatLL3nt zYPU!Dqm1<DQJ6pVM@5Q!6yj&U9+hTX(}@|zHJO;Fc3#!zJm7Z}_6_GXYMaVY-;8He zi<}=ub;$W)bhyMfIzsG6yG4IA>Y9E=M~k1)sAtAKI$rgdU&@mu&!cmckG$A+$S=nq zy-CI$U8!=$MZ0Y(uTg9;u2bp1N$4@*#`!JiF&;T@jLA}3#~DNa@H0l&Zw&k~Ut_9e zyu*+WTdw}cpr0(Ie!cx%#2V8e`5e<E{b~fRFWlE-us+<^V_L<}7_8G+#?h#9^gmm^ zN9CO|F1Clg?(SgWN2G%ff9?>K!$0%oMjv6Fj^aE>yG0(M^KnPY{N1_6bpytAS4jQ2 z>y&OZ&acVG{_P-kiu`coi+%TSkJ8l=$Klv#TzAYt5c}DtF-|A>(Mre5eZyFf+&7F( zQhti`hp}l&XUMr{Y?k!<vAX}q<{4)T{pG7(vHB}ff18ap7xNuk0mS^rq7IIwzQ&2) zmu25)jO~gS=aN;FW1eRN#~C^2jf<7_7>9Uy?i-hAf;gXXx<AKd7<+!>(hR@fWR1%N zV!UyPm*>rK?IMqiH_i_skMsZ`kIXWz10atqFwO*GiE(bC9M`E$kROpKc1I)|D+&A~ zQh?;=$~qiTq}Xg6Uf3U5EdGy#ANoIXvvKh{aAc+UIkH;iH7ajZd9%uKoub|NFyW7n z68-TwN7(!X<>x9N`M3G#uY(cac;t03?VF_Ej)z}f|Hh-fS0aw_=)1VaS>v^iqe5le zsCY$P|EO~D8&xgiMb#>;>lCGN9u+F`qfm#8<EUuk;<_CbEB=m3QaR4Ar;uL;J;Zqw z@@wnEALBc!$+-STelrmC1S9+jusH?%2_Zo8F<v%!6FiDIH!q|-0Z4hOu}&q8bKt3@ zGX#&?Ecuv#y5)EiG;b3MCB6x567SI=is8mehM%J&fzUrXM(Xxx*fY;Z=SrTBE>tWv z7Cy(Zj@|^MKI(j!3yAtYnuv27p2t~7?*T#{9WL@{kFoH1j1`>#BtKF4x}TyqOFc$c zNIgbxlX{It{jffx;ort4#b&AF=r*AzVw|ZMf1+Dy^*<5grC{8NNkI6Sm?HC@n5ueN z630Z`KP{pj?w=M>F9&kcs6UQ7F;DH#$2i}K`Nlev@<JfxMJg{f&c&2hC|#-cxUV{k z`t?BSqYmh2QlZGBi)6e>s2h$qsZ#1>67tJBnS}cMJ?tmd0!h~yXEkZ$r5ZHuse?j6 z9}^5D9cG+=AdP(dfpm=W^Th8lUh#WOzW6z&K>Z*t^iu1XPVpCm>oxtwpdML&G1#xH zzZm5EucRY@q~nciC~4H|P}11H50S>cc!+eeaj?!}Qh}s1jg!xzVzPmxk#Bq+X2l@i z_&m&t!F9ihv=>M^-?-i-jr_k$8hPXVVvsk^FQ(Wy@I2d!DFKo$HIDO0mjOv{GOoKx zZw8WXlsv>>zRYh-i_WK2=7Y0`ozKad&&h73BPAb`qZDHef3Jr%8S`fzCMPIARr&Zl znE9KmeS31I>Y?tKzscE3Ykf`Db(xIkh+NOf`D$N)Uk6Vb^_EJ1MN&VLOVqwx>TNRS zXU9=v93L^RIvuB8`3>r~S^c(2-X`ynyiGC2^#J@&aT(`4Vz8|D6s)_=j{+ZYOo<lx z<aY2$$EZ9>_*2qlKTgR|znO|ySFX>LZPFj7U_Y}zPH9nWmwkP#k^OKi;^2Nbwp{Fv z-KJP0^F6j+=|;t7MO;@o&av>vc^umz^O&3~^FMZv&c73K#2*_hdXuR~I#l#y!$d!p z>j6KpsCUjc)(r$b8S~^i#-iSt_t+%0PgQ%b#2K5e<6yrrp4dvMzt}3Nzt|eZI^*~! z)-ASH_GN6n?912&^@Dn~$8VPLr(%6bPYqET^~k!JiqE?l@6<He2UD>Q+y_&29j0b0 zjef)H)YMIq|EblA4YJ>+VxMroO~v(<=a8w`C#0w0oX2y(v_#pb(~@MLPQ!VM`*j-j zH}~_jEZNV~bi8Rf(kG_nN}rgzS@n<??)$0v67RG^iEkSBH~kdLKA%>ma_n=?XIiPm zH4XXTb#)rz<9?pjCjD|6>XZEv_Y}6D=~!p>i|HY#59m+FJXj~wqoiL=kCuKlJx2N1 z*X&=@(~OJxoUZwso@?xWHXZexOg`ea5plAgO;3^jHXYXko8F}M<%+RDj$fg)*7bC) z>**abejKL9_~KlWw>Ydf`)gdN<RK36GY?aep$C6)5vuQ&c}`7Nex&fHcj-l`9_DGs zjs4I592X~a9OnHX)^~c5+9#-fvE(<d#JJWmjzS>qFh85de0ZITtCYOQZ8Jf9-W^vB zq<)jES6qu?oBjElbzGRN-*MsM|2V7%*YP;S$Ng{|`b{<b92YD5;kY>CdVze8_&E;w zW}O^|>pIu>III`@{c#!6?~luo{2ixtcU->m%M=kmuM5W^e%lW5+jOVk@kZ>AcS-(_ z4^@7cjC*{zj=NdxkB?A!nZ$RzuIurgLZ1+?n5I~uxLL8<xPHL=;tC`$C)7wjPN*~X z=QAhN0}<~D+CNX&rh2Wa*D3ce@h<Tfk9ubw;}IA079VN&@9?bnXk(p?JjKTV;V&L} zMbEY3HLvkWa-E4!G}bxP!~MZI)I+}6H{y|R_V4&~^_wPf#Aiqx@tHb4_A~G2;xVs( z6Vcaf`v$R}VMK2R*8MfeXP}Qze@2?hv2MJ-n6XLtC(sV#&!|v&t;#*hr+>sXL+fn@ z&ZE2^ozV#de<s$C^PGuwqo0`(qCXS!=QuNU{xh>Bu9+Br82BgP`kO}mJRtpe<@1u6 zx_&c@<vw~Q`V;S?XV%I6<xK70GuzZ(v)r%GY?u4>nR|pkE7(})!v8Eh?>rawv%+QE zSs42~@*{xcCnz81>hsCR`kYUGrt&k4l}>&ZkbIrTtUQ(H%KgJEuiQ7x$~XM?nbs_v z^V#QTm8f2^u@=)0&i#w&N9%bO`u54xt5p34=>xMGr4P(%l72c1^JM>=)gt|6R;%=v zS#8oEXSGXzoYf)MfmwUxIxq|M%kv+Xf!7mHu#Dqz$#uySBG(}g){*_kgZ{z(<3YZ7 z?)0F}Ij+Yoeby5xeb$4%$3EwYmN+~y5{D;N;_$>t9G-ZIgTL3*jsyMAjw4aW$G+fo z(1ZQ3g#K{9yo5CJ&${wt8|OwM?w^=X5At{c^-6%$E0g?s%H_Q6sh0bFPrc~RM%`Zm zyV)5^XUXS6vvZWLQ*1WQwbW}>y4^T3NozgL!Mw+Uo|7Vdc}}YI<vAIOh?o6(PL|TS zintz6rClNRG37--#671>`pBG8$?Kd=lGi!q@;S{M^vxG&w+->oj(v}Ib;f>PJ*QFa zaSr8mVNR1=7v`W&Xg4?1@b|Y_bHjkJo2&b9F2=ixa`eX|C`a8LK{@iqIOo<XA9=C) zs7Lbgtb@NF&q|0Dc|xMd6EI&}o-cVzs8Skr$ng_Uha7)il*s4h+rN*_npdne;>m#C zJgj2|^$-u|JFf~zy58{jxLNZW#m|YsVs|3){weq;<{19oH0#7X<>Q=h(^WG5iQCk! zRpj#%Wd8HhWZe1bGVc5W`}f&d^YJ}w-iOSuHvBz-)_mpx@yu_O`C{639VSK!KN0g{ zo)S^-P0&wFk#Q4KW!yxs>bDsFo;NG8L&i<qBjcWg?_+X)CxwZ>lfuQ{Nf}C`-_ZX_ znM&s<T_K-yoP>EM!+rt!ZW%GkSSt|k0$hhyz;1y@_QwJQ?w}mkgU^ZZW7FBjT1kEM zv6a-%GmdL0$92Zm!#=x^a`deWDc>y5Ul&xXUcKtI8Vlc3wHCAisfT{dKED9xp|gM| zYu-){R=PpPPr`f|M^d@qDdG4YEa-*kNAD4JT^AOMe4*+s#JbRKVT*C$-}6`t+khDN zR2}D3xA0GmRDP-GpNjoM{ZpHi-y!^DwM!0GI$rdWkw5xPR=v|&jQu?4v^F64r*9Jd z)3IO65zpz|uSAXSbm-Z1r}#U=h`%#Jg?|R)Lp*0hDIbAQ{|ue)8S3W@^>c>CkrFO; zDV!(bNXZntMe27^o^j5ApGC#S^%N0(<z`~Faoj{~mi#Wl^<ydNJ;urF)|t5OM<AXv z6M*o0W}5gtv(oT;{nnY7#|J>Hsl89nV!ohvmRsparK6ROQ94fPc%?DU82U*yE`EM= z7W%i1HO6@YX{=8;FctN%g_vV3d|%c|MV)TIc&R1uLw=cYt|T@Z=U}4d>FiKr<wE~# zHxT+~GY-hlju-v2lZ=!7{p@t(JeXLd@(TOk8(C*J7>mz^&u#?LzFq9j(fpp1CHm*& zDVCU^3Gj1HjnWN@djx+IZk(Nv|0dEnUnZs+=bc0yH!W85(h?MPJ=45Om&&@NVZL0K zb8{7|1kcM?)bY>j6ua|_4gbBJb$+>Gh4NMJ{ASo;p69oSeR`Clj-QV8pnZD1*rm4! zE=Ip0f3e2B81+U!i@jpMxKQ+#L@CB8YCSE<5&8nnQwHk@{xWpF8Kp|=xJ$!@UYa1| zE=^Hd^S`uR=w%^_F~)f+{4G=YGM(>oBl6`s-tr9bw_MkAx#nwmndoIAem=j=jF$bL znX3HFit2ZT`dbkx{#HPr^I73hOgFAp(wRyZD^?1wj1~Dx)nB<u{H)Y*RyK;>g`tX? zj|&TwE>SF3tPsqKkodDACH|~<<?B4M)PI)FV^y%oSA{9M6?HzV5|q~bugXzc*MBvh zSFjFNX&tQEB=XfR#U#ZH#X`j<#Wuk;I=?j<=bBRGZ&s{Ttd{ZC)Jxs1(K^Uh`)s$! zv#~DRH`$3|mz|}^eS~<k^Hr|-%dS)T9$ANr)Zazw?;`bgk@~yHEBY4|h`);p#otA` z4r`;0^HQw;+I-Pl+iL&&8*454?~jOUZHI9l2Kl-Y!{5(ft?LlIoKzDu6!iKAq1P+_ z;xM5vPF5^b)cIeGxY=(uAYS(O4H%#OeM6k+Z77p|yP;m`M#X01Tmrq^7@>1jKet)v zOW}upFGD{h=4riNuJgKF<G3P3^smTNtP#AjK(R&8t8%Z}d)3~n>+RLL@a_@)tBhi( zqUQZ7<h>B_Tve@no!8Yap|95YT%D|Rs-lj6b*|EtijA^wuEzMh&R^ZGe2wE8jpG`f z=QZIXza~mCUNK2ALs8?sM(2Nxu4jI*$n)Kb>L*|4ldpQ$>Uh^Ch~BmE%l>pN=D|3x z-K6{)Ma{#tm=F8Wb!vZIwAfvTywL7C^>>}ddtHj^rzvJBYW&v~Dy{Kd*P{Mf)nBK` zuXibiD26HOJg?VzULUJ`jpO=Mr85+D-0R_=^SEBup+Nl>L<_$_{S+iBt@9{QKLvTp z&sWs=3u>i)ZZN{XAyQG-@dnkup;Gy3cSD`hO^O=d4I1B#F5%x8s)#tbUN<66=KaPb z<?DQJOjkNfF-KA3zOg{*5=D*Y#s=g15_!2P-u`#J)=k(CyguJlA$m783l=sR{<}r1 zutVsZ5fAfuv(EEojpybR<);bWqI$O|eXHi_R*%SUZBT3%EQ+xIU7%G&JIuETb;fgI z5$=DNW4t1q_iSubd6UR*Gsbxo<hO;{|DMUZ4bQ1cNvr?grpP>ho2{59etwJl63+j( z)rvUZ+BEJ%Y{a>h<J}&tm?Zq$)09?!w|kXesQePajam;IwXQbmdTrGFZmdT9@V}As z0sbyjF-lSOe^;us>fM3ovYg)?n)f?2?{}ojxOZeJ<|=x{{tm38ZMR40k_bihQ<AN; z>X#HMU81;2QR6SEmbxj?xJp`uzB63(?sO~aeD3TN`YxU4T{`|<G0Klu)Oha7kh;Gs zOX~ivDwVej{@x{d|9zO!>gV@yN|z~?D>f@?9Hlx=sphXVP2{DU6>Al7zxqD%eYft* zyF=u9eRrr_ukY4z?^b_ztDn0wR4-HYip1aDn#a3!K6h6O{~nF|9<S1<WA3|q^Mt;4 zn_`PGqp?5kZ3SX~V48OQltqeu8P2ghpOnSRxMi6tS3hMsewog*tV;S=S+nTfr~d9w z5E|;X|4k8!8t0~brOOmGzD;#XH!AKCd>~5l_&|=V+XFSie=t-rO%ZwHb@{;pS^o!- zH}<^;t5vT4A8b}y{XgUq`k`#Y-=koahYMXEshF&oD*K=udR5fJInKs5kw1)m#Qp!U z=I!BZ;r|iP0sbHL`S>3*g#V{T<9HqX&6>~6>gQ1%uOdP8D)79r4C_*n3dDRW3g!Or zu`H24u6mE_JRjHjZNWOTKU795Dt~K~tn*f!uXs+~nke(ynlE}=3l();w$><JC-_93 zVwqyO;FBKX;P=~}OaQ{~lS#_Qb2EOA|H)h+`Ca-A633H`5=T{stn>dv+xx&rRh{YM z@7#L>2?-J)Xi(HqqoSgQ5dJCZKmvpsAVS2bXeK0qq~@Q=fU%|RY)g09F5S|WcG;HQ zownGrE4v#lZE1@-RobFrjf#qjI$E@}r4|)6D(d%n&Ut6%B*xv(@ALWX{Scn}ocFx% zIp;m^`E$>mOn%;E^?trlajW7!;rDcee!1K7U!JhIC#;A#>4$s|<~g2A?U@Bcd3z$Z zU-n=gzJ_wlbGby!a|Yw8zftvY9%b~lsGgR0Phj)igL7!s<DQsu_18V>uX_$^y88c~ zV>TY|Id0?e9@Lw0c`wEt?cBS?=D&BF&37;SYUJ>fLChn}cVDT^ci$|V@4h)!eqW^` z&YMj>?Wg+=Ykri+I7m)bj3};DY*9o#neSIPCpv`)yM}8#{%WK0KE>Ud?~roUzhC?P z{-{mAU)y*8aS447{c`^R5bb{e>n_hz9%zx!_mTbp&Rf3EbUfdg^bJ=30rl?#8ZQrM zyzIsNxCi=syKKI_Tg1PGe4FyUiU%zII@kK=H|Php>$iwg`s=q^4!$4MrteZzKmPWF z<@<^hCt3gR3tPYMgJ0QC`)aJced?!u+im^__ed}i<vdhs`9oET$j|ZrP@VFa9fuFa zF;3u*hj6~k@$yj8j;n_d{~T8j9k%%&Ua7c6QS1M(_QS&iHhq7;qQ>PT1(rX8c5pp- z1oh{7@QB96Bd}}ITQohc`7s{Yj^7;?kDs^r-4P)4@O_AeKZ^O$aMY9XNB3LaUub!M zk#gAOzO=s$2>t#I_8h-IY0K?Lzp+03sINi9&3@#6tN@7g#|rJ|>mI9>oE+5WG3=uj z5RspDA3J32K6c#NeH{C|6y%TRqK%M04m*#)&f}ODx|ojnfclT4T*k!{QS&{$p(k1- zh>@co>5nIN*!n!tr+C!nKM=P04#1DpKY;b~2Sn71?;8%FeSF_=V52=(Kd{N3s~^yQ zJFrdV36-Nfp2Hv5Z_n!w9JA#gIBv^*Y>M&|mOlx7*8fSY$9xa+<R1Gz;K_b#=g9+# z@C)re345&PQ$?0PHAxZk<Eu=^I?DGbPqBYs@2M{9&!;wu@yAnJZTp@=eT|)6!tW^# zJ+(*qenpH^`r#=&=Z9$LFc5a1MtRhG8tV|{PnRpgZ_M{}MDz7(KKPIQ@HFDj;5JR~ zv*kX$Te+6|^nm3D3l+7zgC)vK6=x}89J2lg>y)pw?LXM0e6#p3QN9r|kNO?l0z^9w zZnyP5xKs1>sUGG<*7IOex%&U$LF?y(DMj=r{qRh&<xlPf!u~U1%b%&S?~k6@C_aB* z^%<=DlTq$78!)!WHv`EN;zwu)@oDr?ANKPzyA*fZczI@zjhAQks+}ap813u_GJn6? zVLh3CNc9gZ9#K0-t(|AZ*8kbSrazmj>6OaSE{@-4)!)xn+41l!;*8_r*&18Uvn#Fr zXX{`O<>Gt#%=6o`nEx(DyPn;o`8R9+Et-F~%9EN-|H1CTeaeX}2lEI0^_*CLJ%{JA zJ85^o`t>>N%jwtWitPKm=L)U<bErS{pPQt-L^(c3$bG|e5efZ;cB_HRS7+ZtJ-6BZ zp3ZX^CmfH@ZL@Lk9O}pZK7{=o^$yiqy+f*ZC~ET`((!j_qvk&(=J$M`FSg_3d5jm1 zqvsJ1952r!KFMD|`)KzCl)?JEfOd|@{R@~cIS+k!$l?b_E&e%;+Al8@SwFvka#-&d zCfRzwP;Kk+!Y<{A3%29MsPON%hhA&~qP!Pl!oLe2da>Wi5#}aeO52;#_NKJGsr|N` z6ylEaP3nZr{}R?g+I^|l+I?xGwfhp{ndQE;&+5HIedxV3VAEg5dT=)6FT*da|I6?T z<uC8C^52(O{(EiD@B3{zzdvBh`Tb#A&SCUF%Q+mjb`GoFVbwdlUFGVJ!$+;%SBh-< zEBh_JI@$X9)hX7mul7oC4(z_V(Z<KC+KyMX9j_j<dVh%7a{th4?fzk#rXREQ{X;_W zxUKgQ#3k!{q*VN$puI=XZ$Cl%kIYg|JLK!Fy(33${y!qVsrRQ^yH5To4vu_(V%)*b zpVY5^2K_7Y{TXplNt`48>qPV;<Lb{VZTtSb)7ty9#`&KS0JQ(-BZ|i@9$jhcbCmIp za*k@8|0S?~`Af{^`-}G5U-l_KVDYu6jq}%<Y@EN=V&nX^0}_lzd9P{v{;GD471`&n zW0S1@F`RRA{2tq&9P{VR<U7T?k%;-xaKs1s>sY7gzt^YO`o3Og^<LNbd0pe@b&a1l zG=AP-+(7RQ>Z6@+)LOka`fQxOq3wDD`>1zN&YQ)Gcy2Mg5^aG#zV|5f8uZ_+w)>Sg z;djnoZ(@A(5#!>2NIYoQ>o?(d?yKHBA)&uQ|2XD_zk(kRZ28Br4>BD4pktI50x2(2 zoPxG8y%fmw^{6{}97v9JkoXqtzKQg=N`U00wtjC_+H&5)^Qw_U-^ekJx!-zA<N2-a zutohHK<Z<jW;t)+`GEG{hJAy0E})&a@wound3%So^R~vv+k2ry`92`!SkH*>pnY#6 z{T;OLZF0<SEdL#hM}sA}ryT8khw@5IpCh3GrdI)(j(Ll}C-u%sAbC{twMgharndo^ z9#h<_@;wrIpK{deeabQansN_F=mgVKK&Btp^rI5`faz%e2S^`4T|WdLKs!Dp*M0AR z)_))@p^qp>{rO&Jpvu}Az`3k2y&A~$CQYvskL$%i3y|s9pRzs!G4VL=2Q~nij{T%b z-z=Wb^aPOUyEPr-Bw+d;Ak&X%`cX_D;O~m%?_xZUATL%vNxYHdr8Yj^Ef+7Be2(g4 zJmtXdyAid6dCAlR<7))dQGa8vP16s;9@D$ju8!w{6znn`^Q^JINxVFAv?q_{ZBc~& zD5f6<GF{v8o~~Q(<%*XN`FjOG$lohetP!t(>9s(nV?45+?{z7{zoRLS0V&_8>2dM6 zpMDSZ;rM(nq3K)28^iSNK&Gpo-|G{vkm>MqA=CRc|32}?G97*y%k*@;(Qf`e$9w39 zaY%nZ-HrkA#v}cG^v8InPqud6M|+BxJ_X41a`7gRBYq~3M>L<d?|roUWXe|pDcAPC zkM^FzbhP&rrlXz3<QswHo7B!W@g_1I?VQN;9h#n0+$|nIpYr}*Am#nyokos+I*nY% z&xu*Wzl$3>fw*}R=_hK%|2z2q#8x~1oxuD;|DNa*v;Lget(a8QdG|!Wa?G1tr%oKU z_(9Y@Pkqp3=iv`j{sAUZ?u$Pdu=~Id3lue;KZM^{j}K$k&WC9K6XctfZ_)f(uMhV~ za2MsM2ltsDq94sZ?WkQ(KPs1CG2|arTm6rs;_-a;qb4Bof7GJs@cZdZj{}*$!LElN z!S9z-e~Y#I(N<&ElM<un$s9#%$CFLU`%Jl>SigC4K>Y6@cI1$ihjNX7yilQX%tP3B zdZ7}t9(y6g7xtZA2>pc5>v`q_p+w9>cuw^~ZK{WP-RP}Xy}0TjE=<1tra!$9{Dc1V zJj5%W!#%GENFEXIO!7(~`9`bfZMF8j9g6TX&WSv4uX5X;o*&r!et}K*5$`P5uTj2U zx%$P&J`eM!=N~isZ7;w+hCIMN2J@*G>=gEw7oa?1PL=grPK|QdGwEA2eW%sW>9hJd z`&B+*aRll^KaN0L;XKG2Q3*sjBUak_ji?iE7Sp3Zrgv$2n|QOCj<}f3^bMLG7w<Br zBQ7svI_9Cv$u|SZ5htcRw2%EgGS}8`WPz>UNc1b~pS#)G%RON+uT)X}owvv8=N(i$ zV)aIewKpoT_C_H-Xm3=t;(BXml=^!V#tX)!hwm}6xLt9l;x5IM#r$H$N?T4o{Lg;L zS3CKAR$id>El@uev}t-wQR`8#)z-fN{X~BhBo%c$6dbX9G}=Y^=tA3$(UWcYqo>&N zN7q@qqoayC-bQOYo}~PwjaGh=w(lg3(=pnvG38c1rbe;FmNTZ!mQy&{rWcloHwXP% zh<SYu+Fv+J)5|p-@nq5~H9aEU70h1+WPY_@SS{X_Os@qp9r1?m3GoV70?FYotY=<f zuN|L-o7EoTD#G+FK<3l_E8HsHT&5?0Oy8mTw~IHA={tc;-=*n&;#DwxH<0N`P2VG4 zCDZo;nZ94s_lY;3>HR>atN#iQh_`_0hk#6P6K^4T3P_IlWZV}X7O#rwM}bHmt9~D= zejPi<mNQoUHWqQf_!@gu(-XEo#ueK1aiz-3m1~@hgTENp<1k+_{>N>z@iR{2dz|+F zxRmwpxWm@J<4#yT)Ya&Z*ZPcKsa)-k@3rk29}{m8+B1GV5cM3Nu=d8I9L}djxmK^J zL@}ZmSKOw!PjRn!pMt%j{Xps;5$|ep`0Hx&W47F)0h@n<`fY->D^g(AZ4rzUtlJ_* zX5AK<V%7-})C>J2g7%}IM0Oc__(OCe=r57IK&B^6J48?~v_qs{{QUtC{f+fmxK3d` z6+yo?F#VXOAGhftBvH=w%OL##J*;1t1c8$!z~>nxG(`k)fM4vh`k^_RKO+8Hlw+L0 zzxY5bkooFF0;U&3kLfE_zgq3LsQosz-z5S+;sa1>Kd$ySsQoQ!f2-P$B0ueJQ@w=s zPiTjh+h^8!yzn#Yyo7eE-K5&xuk|>f^}z3OU5xsA1tLF(T@UsCIqHLTmgn8rWSH|i z@$ej5!F*^xzh4&Xt?>J0J<QuC7SaBrOh^5WGQCOj*Qp(}8|$@rZ6a9j#p?x<V?8wb z8*Kf(P2%Ho6XK!W><<s^WPf;QC;P+OF6Qqha$RRXd%JAAyxrDc-aZjLFXN9Q0IAon z_TlG0F&*vx6VnG&|Af`|QGfOu)_pIGd_Ly6F!K3PG>Pe`H{-<b67MX^F|N)cx8qFw zxax0KMEy;E{2pB%^|c;8#?9H($9!})^$*(oL8*A>AU&7^M0yah^$yg(0p{fr%2B@( z%Ij2KD<1uTeTc{M0xdu2Gv^oB^q{SjCxMh>{Nfovf<r1ltnwo&Kc?~lJ5GaxiYM%N zg(>c{C1;WyuQ_3JzJV{xG3OhS6Setsu+QW8&cXU*@^3(y)Z1+9owG^2^I$Az3y}G? zs(gpqMg5;Z`iMenZ$y!`Hv;ERv^Sy@^(D5L{kd@eg7Xp?v0ZVewKw9JwTFF+DSxE; zXC(Tc^~tSK+%NtL@|1F{6X&CTBl;}n9tNU5dBx^DM)D?^^BBnso97n6{)gx9k{1yV z=k$_S31t2%+ul5s!}{jcS^IfWJ1+8??6}B7JmGT#lDFQ*Wgg;*{h6n6l(!xFw7Uby zbo49hpLa;pQE!vZeq_F*%8x5Ydnw2M%gC|+vb;!nvGTC;66I5r)8EverF@R^O666` zYwb83)nw~GDyFzz{1nRMeh&Ku8MW2U+oKYS=(h`)z5~c|blxAuc2N)O%!QO=ow<;5 z^eg9${6M^mke;6lM0$RKrepp#@)Gf;P(B4nd8wTr^ULl0m|tn<zx=59U#C69(@VrI z>)-rdTYmmVwHFufV%kIeUQBzNHD5}CuR>4ogY}T>oM1f^DYkkt$@Z&+tv{sH#;L%c z>}NiQ8H{K?_|x!eb51D&zmBH;I!!Opd@Gg5wH)~S7c74RkajoPd7aO7oYw{8<Z0U3 zCg$(*N}uX&7r{9p*IU84py0XBJHUKNJFjz{<-Cq{*6JV8@)2jIo&y#`h1OqYeTBVH zvC3hK{YbwUEK&?BPF7@`F(2cLSgBa8i1wTGsA7vE`pcyED#jJjZj+9<Gni1^q1dOm zTQRA)PqAO|pkhk#h~hED0gG%m%fa)p#X`km#jxUJ#ZtvtiV?*s#Ttu@E6;;*+9lF| zMA{{mE7A@*{YQ)_(vRe{OQb)Ev`?&6tW!i>ne?bd^Zbr{A+-}yJ0Z2heGv0=A7oJN zaQ|a?+D?=57R5HjF2$H)ui|=(UP|$>;t|E8ipLa>D-I~0u;`<StcM>c<|-B_7Ah7g z7AsCt3@er>PF5^cELWVRI7cy}SgBa0sDATnl-DZODXvtEDmE#$D5~GEAF=I<DfTL^ zSBxueP~5DzMRBX*HpPVEcEvu$U5dLE_b4V6_bTpF+^?8YJgj&`@u=c4#p8+tiYF`v zqKF&zUy!R<pjfC_q*$ytNimE^4eFIBmTG#r;w;5EiV?+1#VW-b#ahKW#g&Rt#U{lT zMeV1cOL<JOS8=^!TycZqM#W8vn-#YxZdKf-m{8oVxI=NLVxQtJ#odZ~6qAa3756Fb zSL|0jpm<R6kYY;lu;LNLql(8Ak1Gx+p0LQJhy9Ds@>tAOEKn>|EK)31oTM05EK!`S zI7P8kv0QPM;vB_@Vx?l0Vzpw8Vy$9Su}QH-u}!f{F{aq7xLz@?xIuBF;wHt-idz)7 zDsEFuC~jBWp}14APjQ#xZpA%{NyWX2`xN&p_A4GxJg9g`F{OA|@rdG4#bb)c6$cbg zSmaiM{XHU3%vCH<EL1E~ELNPP7*;G%oUAxSu~e~KahBp7#fW01VwGaGVvS<0Vx8hj z#i(MFVvAy%VwYk}u~%`uVq9^9;zq?yiklU;C~j5UrkGINuDC;Sr(&PtF2&u7dlZw3 zdlmO7?pN$rJfL_`@sMIl@v!0%#iNSH6pt$oD4wu5QWOKlT*U&#Ld7D*V#P^{VZ{=~ z$%<1HOBKr%XDQB6j3`zrRw-61)+p90)+w%3j4C!MwkWnKb}7abdllC!#uYaxZnT(} zP~5J#Lvg2KpW-gX-HLk@lZty4_bKjI>{mRXcu?_>VoLF_;t|E8ipLa>D-KvR&y^U@ z=DCuXtLX)bg^ERr#fp;@!-^$}lNF~ZmMWH8%vXE)YR{bequhM8m#_Bn)n2~Z!*igS zckmo&F>P;_@;QnT#Y)90#cIVG#ahKWi-IlYOw@z>_3=bJm)=8!9}F)Pe<wNWZ8)9} z|Ct>1HasleVsg~maJ)yjgdFuY9On$1$x&~^XNms-IqGeAMEoC;quz#BiGK<?>TP(9 z<eWi{dK-?<!T97Wl}9CK6nT^K776}B-ln`uytU*p<-Ov4lYG7MIF7`~Hz?mI{yg$c z$~WWKf_#f|ykB{ne4Fxw1Ow#TmG2Pm=j1z;<6P)r@?FYt?)NhJ9_2~#e@(tu`9AUg zjeNiIe(~=kKcF1vTP5U&l&8dBM1ENL5efE_A60%#yxru-l@H)Kn*4<2c>eRh0v-yK zqyK+FUZDArmFphkBbTV-gz;gx#x>)^a2+R%55vQ%U!q*&n(<-e8rO^u!!@oMABIO% zzf!rzHRHp`HLe*ShNt6trShoiHz{vX-ln`uc}#h)^7YE&$~P$AsC<+1&C0hZ->Q6@ z@`Up3%6BN=sk~45F6FzG?@^vqzE}A^<@=TQD?gz8pz=e?Q_2r3Kcf7o@?*-6D<4pP z!g6yypz%TfnsWkTfyxVQ{!o$fV&#*Rhn1HopR9a}@>1pH%4aE`V>#k2xQKCAApTWE z%tv1&;(WD+SS&f05s_~$u|T|6iG>mzB;xb2Clirx5)tuzFA?^>K}5cfh{M=3;~e>N zY(DQh!{rOx`iizoqV~Cs^AVrpq(!k!u}d+g*sHi+F|N2laiiiU#m$Oa6t^mFQ%qRI zdjvCXy@M8g^bg0eul~k!xPK0LLcD(g<|V~{fQWPDtwhW-e;^(fzleBD{4W7V4Olz* zb&6;&?dI>ch!)ETaLyM7a}^OUhEt?+gOD49+#uv;z6mQv6r+l9ydR@}Lh~opZpz9t z@fubhQH(0a6%&d{#gs);HT>s=tz9po=~2bFVnQ*gn6j8Tw+SncC`J|IiV4M}V#*@i zX4)Tw6(fpK#kgWZF{zlcn0YP@+i{W;vEw8M>m<iXPTY=zoP^|*ktZeiJ7P+_M}c_G zG2?9n^f}%}K%e7gL{z-@h;i|ohzarko|qKx^Td<{M}gQU2d%`gc-%LPjEJ{_7?ptQ z%*ePMmm?E)oQ_P|aXT_4!9PKcaPZi_xzJxqj7ab@F)IERVqCnxC8GWu*SSf&sv<&v z8!%7A|1A;vcMzff@5HDCza+-(c+W%qIsOs%W<JP+{(pdDU+BF_3`_79F(TedBJ{sc zjEny)F(GC?7=`jVKj7Ry;Czvf^8bqneWvF}B!}ZCKPvu<#JJ>4Awqv2F)1F~m!A^v zR$zfh!2L-<SaR}-5%H^u&_9nD7oX#`AR)nCVp4+tCZ;5)0*;10^+t!qzn=*GUl60> zabGk#F5Xkbg!t=;N%1+(M??QC;7KChuZSrBRANND4aBJU9KR>UaU@AhNN_1JDZvxO zl=ua}F(Up$#IX415+mZXyfG->q{k(gPY!+d+ZgE6-(yk|TnH>g`QIjnB}fn>5?oA- zN^l)9F5Z6<6B4{bOp4im;&TyZUpf}$&qVrI)c*n^%4ZyoMfu#<j)i_3F(El)h)KI& z9h(xL@iR`uV;qhPi(gJe`JDI0q5KpvE<pzo`kX(<L7(-;=N@v3f#XGjFA~GzbrK_z z!}V)?RQ&6Saq-_JCM5VNF)6_=VoCyz$0CuO(}>W2gBX#3@l+HQ?@nS|g3l5Y;xkT) zlH%P*Oo{hB-~_>|QX=#}M}$7d&4j1~8;Q`LM}$88Iw2|kjl`4$?B|n3{29bBUfB{O z;&&0F63~w)$Him$CnqF$oCtl!&B-YVI4)0t{`<tR_~VEX2_7Rt|8!zpf^QHL5+sSx zryov9Nl*<eM*A5z#n7)OM#R612>ok`DE|w@gm_%1ij(5qLWKU;ffEI<wuxcMIiCpq zKM|vn6Cy(YYeeY(l9-f$<xNb9FThhp0>;;=Ve!WkBNALqjEcX27#E-8<J5!%Z0D&- z@qa{2N$?rqX(HYY#ISgqh!OE0B}OG+Je-E|*ASuq8zS@%5TSo1aFR&y0TKH2|D=fI zTt$R_B@z0&iO}Cqg#IET^h<!Ji+x@=J#3#VPLGIr-Z(vKpF>WEKA%rchyDODX`g3K zPub^=GsHgcoDsIqL1#q7JRhAAwa-mwK%dW3XF&fi#H4-xIwNJD%gz-0ymlt^Pl5bQ z=)XpUKHGa{T!Pn$3Gt^AllFP!%#?i&38VaVNDt%2BSw%wjAD%;#x*^mm{d$zJWCYA ziV?-AVq7tym{d$zJX;jQiV?-AVq7tym{d$zJVzA6iV?-AVq7tym=urW;2ijG7O(`( zJxmNsV0c7=E6AhbeU})QU^@~1WBisRC3u*a5^pu|ToL~W5&9E|5%EV7qY^wqgnkh* zAvvRoC_hGo{wu)qL;{Yx^TOhD-8>Ka4-%pOS7KbeuMiUwa9uesDgJ*Dq0f2deDpuZ z&G}&oo+Cyi;5v7HRQxH#xcE;Kq5o%MQi8jQDKY&$Sro%|Upg83zk+;nRMVlqgghZW z=eNm8O;6#YGvF79_+esL0<HrWK%a4TK~#dJ#JJ6WK|%t?=LJdeo+YNlrynj936>MX z;{7)<A~~f*=yM-%VO(;?5>ftb#H9G2B|?88@FEfaABbTI;>3sqn~72JIe%Rg7oY9E zC?UbW5|iTR5>w)T8aM^j>n5W7FB2o;F&?Hs-zP%<ATc5S*~Fv-D~KuaSf7hUf|H10 z2}Thk5^z4hI4VIo5%n)2CdBI@CM9SiLZ9>3B_aXadr4S)j=xJH;@?AziuVi=`i!ef z5)%BHsQ$ksC8qx_6~(XwKZg9$hy<+HrO@X(c4=IKGl>a&<cXLR|4w2`f}4S*B0kG0 z4U6|hVnn>35Tg>jL5z!c4H5cWM@pezNK8o%?M@Z(?k9#NxQ`f-;J3u6c#PAjaq;tr z2?@SUOyYZMi7D|f1C~L*nFxKBTNV+I@mUs?9L_&wX#aUc=yM$}gMKYBCEh;*r-=kF z62s!t|I;FpGn*I{pW|T~%4d8{gFeT@H0a+zMEUIRa+LohF)ZHCh!F`cAVQz@D343P z^2-zW`|CvL-$aBy_u<n;f<F<%5*#C<{E5UU3=^TxaWg$30poRgQv6~f^rOHTB0l47 z2J{){Goa7$G$ShBN5r^zUneH;_ce*o|68K=|4bA^f6oky&-rF%M11;rrj|c5E<W2k zGa>%p5R*_Krto)jfwMrbC5FX2N{rxpt%*?y?j^>Nfe8J%#3cSM95IFO`v%Sy!6$5h zsQ)X(i1=3%qvE|zjEhgZvl9}WAVU8*F(v*4;AMipM@K~Y%ZL&2uOmjq?<B^>yNd|@ zM~O-CcMwzJb39#+>irurEI9!&BEcVtQOV)BygV*G+jDtB{4!!v0{Z>(lz8;V91;IY zVpsysBXgj?n;4a#fC&9=VnPDeb52rnIIibFpK*8v^#4i>i_dX>MMV6^iBa))5#tgt zj;~0Fe>yQ~&jGGTNzO>{D^dR+5X0hep1Cq2UOf@|?-1kSwGb1M!+y9D`rjgI|6e6A z0De_i0`|*Q5ecp*LjMe+_TN<r@m7&1C74D`iMI|I5eYsdhQ;GJia`H<V$|A=#Kq(M z8A*uWPDJ@{5>pazJj_KlmNz#n!4HWr$okAh`5aGk;}V332?;8QNeR{yQ{qnt&O`RM ziDCR*P+~-KP9Z}74kGjy5fj$#yrg&o<j~&>tPlzEh+zphpHxJ|XIxf5pYd1`7yo=> zLIV1^A}M|iF(tt*z)BIH^GIb_axN!EB%psQqmmOL#_^F-VnVzwVp4)eVoJOw;CvD9 zUx{JyJBShS+lW!|uOUL8{+$o~UlXCfikOld_QL{{{{}HE0pn~zM7-rhls|_Eeb#3| zLi~wD=zp4+5`PSEp@{cWVpu%-Z(&4y&O-~M;(w1AmtZR~Azp%*6z@S|O1ztZRU-a( ziO~N(F(MxQS_S=EiE;7SzN&<HKO&<1XNf8C&jc=l{y!7L;{S#S{T~yf;xld+#YH?~ zLNTeBviK>HoC_iU6!cq(5%FgcqvCO#e=08CTf~F}&k&R1rHHD3wMZ}<{OYi^cXdPp z_S@A_3E0l7<KnYES0^NA98t@^Iwk&Rz^et{b4d(K5GJC0`n?+E_Y&h0(9hKgYri@v z{wi`Uf3eu~#bNQAk-j*hJSsltyTx(w?<FQA_%bnx?<*#z#OM69M8s#@EkXIk#EAG; z5Tg?OoEW$EmL$acDtS^o&QnXEKNh%D%U>F{`Ic(=OQZOn8Ol|EDfFKshd#&O(iFb8 z2v{Td$P5wXGhS;@{w8A7+N)9hnuPefnV!`2l*MaAF{~I-jEa8&@?R5|faB|$1U{-w zOiIpFBFdi#TqfebN>u%25eYb-FN;dBni#kCmL(LEiYf6q|1O7q9Wg8(<9>NWycdX3 zn{Rns{7;c5#N)VKo|ND_M3lc4SSvPPZCE_6pS2P3^NCUM>F?UO1dNATEx%UFuT5FK zYgPZ+u=0pvR1xKuLjT%?_>U2j;&a})HYNTZ;0lr8R$^EJ&X+4968OZZ_*F!de}oAA zr9|j|jhK>v<KsFMvxKPSU#I0?r{!N4$M=s=p1}8w5R<lE*QG4h0e*q>y0G$y_-n|c z;vFEyH9eu2R7_dCUKGQM5yhxtTrr`TR7_dCK@`J^5yhxtToLtWf83B%p0dxUH;Uyq zhQ&O$-Wb8}%OKy4QT)CPF)qPf#DsWH5R>@*OJWM2=LN2W+Brn%bDmlmQH(0a6%&d{ z#gxUHL@_J@`|~FFZw2s^FCQ;+Tq*dV{NVVPy+DF2Gs2u9e8dnwatO~I!t;jkQA2qC z5MD5Zj~>EL8p6j6;e|u^*dct}5I%kgFB-xp4B;ma;inAY#Y6bSA^g-K{Inr_(hz?7 z5PrrGe&!G!9>UKW!p|PU&l$o?hVXNT@biZ7^M~-sL-++l_=Q9GMML-$@J!4G^3m(y z>6i&12!m(ZfM8}kUWy-HlvB0<KiioAIpcX5es<%Ba<&Hp(Ol)=jHgw|S;`dT$3K3) zAUE#t+wd;oh{OL5Rodb3uj76Xe$w{8i~FR*nRl<le~No^X?c`wV1n}B;r4*TpNC5@ zd1mCS%Rc-}()PTAGv=dNc?e@RwA0~eBYyW0m$e^4jE+9$aQLLq#J$RALe@n&E{vzp z9DAGLb8(lBQ_AV@63s(?HSVW4yaxBx4(CEv>u^rY=Cb`ATCFq}?ZfyDeL?vcaE#Z` zR`6W@sQhl+qg*Le`F`bT`K#dJtQ@Vxp)!6{?s1Hk;z#X!Ww;OHCoNxs`v`u<S^M6n zaX%S9X*ui1_T;OazNWpjd>8Jc_&HhS2XH?NKWX`UxbMXe`xEW+!?=&&N9F#NxTnn` zl{0>;9Qohieg}R|Q~3{ZPoJmt8DIQK>%WZqI!FEy?hoQ;ywwlbw^974esC4;kK$*d z%2(mO#gTsoeUb})lFGk<`z}ZR6Ud9f)A}r{*O9*qc{%tgRzHVxWIQX+nGQMQXRONE zwvCQ_E#y&fZGX;paKG7+-vjx2a4kP4h5M~pIljZg#+3Sh#1zO9jvW1u-(f_|*z);% z?Z)5gpAoPXV$7YP@+9v2@ROEv{L+8w-x2KZ-C6m_33l2^w{K)AWJyPk@#GbOYx_s8 z#{E7=j`_%&46gngxdZq8j{HH$Bj9QIpKyN=KU%-sLdfgDwf(s>aG!GIh&M0h$iImD zBaVD0<eS06w*9$J;r^H-e;e{XaE<@GlW{+gmFJ=F`MZ+o_{_t64NIB&<#j-Q2wcZs z-dAuR@CUiVn47obp7j&YtOt2N#%)@DHslXMQlN6A=dpggqR_{Bn)fn_ra!2Ue|die z?|1n7c!$=K<@`M1$x|GTJ;2H7@}WO!GF**3X?vq8!0BJLKk5dAQrzLUA~ZKT{7ZP} z<l6fdLVK1Y{~o#uWn}FAC*JkUariIMEc97MegN-csvZ6ZxGm!F4{^r7JInL2ew<a~ zaJ28j;|@Ou`uiO|1DyS>?aN<`+bDi2t$*|Dp}!A2EpG=un&lys6>1{KRfzj*@w3HJ z^8C+%8~ZB9`s7tQ@-KpKayWeHB^~}%a7RD?n>xob3+?|ixNGm<z-t`+JHU51{7!Jw z9@W1Kygw`FdYM@>VLvn%Kd$|sX<h^=_c!?u4B_Z6d#U`DA^gq3yZ{uQw&USkd|n`T zh&;0gwe||m8zP@RgfAMxZyv&1z*&Zlzk)dKx8sNXi@CG_{?5qH2LC=J>G%x5cY^mJ zPt?Xo!B0hg8VA?-DEJk4ufrck`woMzM1HpKS;(FEE`ZF7K(70*f@2~-3xlh@JdEF; zvChgles^!q@`3?yCmu(S!tW=RXXT?$17Gj(i^2Ch9P8sRocfH$LCG%;Ir2u4Urup2 z#`~TEhkrrjo;HX7132oGuJ7n?i`*N@@=+MC_Z4ONX!tj|&*482`ITG0`$g_|+B^C& zkq0I@`4L|aG&%eoY!{+g&fk&Ud(`3MM1Jk~=cF+DCk44@`{$%G@Rzfk`@z7}7ioo% z&B1s%fO}r#bHR;$<qN=%8>yAoK;P6?<(MA=*f1CLPlA1W+4w#Q>xWs-G#*a63HFfB z)DQFhNtl0pv?0SWzwk43CVnXYy2x)f)1qhoowOam_(`{~54Tb9wEf?L(|>9Hgvjq) z{g)tL>BzCZJe&ki+eduvcjA-&!SB@D3-zXd0%H$J<nT|Bbma8!5r@}^pv&yV{P0&! zah7vF&6$<uA<U;aPI+Sx|Ms%}95X@W(FjwlKgN{eY-A6pws#ETzn|i?e1*shT@J_m z@q!bNV^)j2SmMY(3;##KxgUZ5+5Vh1a9*rG+Mk0yFc&%6pX0_4+CL)f$kE;rRawsV zj;PLZt~Vp_V=mf5`$ufd@-hDi-k0V0eQO!9+u>gYH|;?h^z*+6-tWk<o{VtnHwNp? zh+|p#7|2IL&s@MUSZ_v_JNypt8i(Hr?$+-vaQdGY^|79eJY=ci_rR684j;0<j6r<b zOZyk`Ssz78x<6kBcj9@>N8l}4dEsbq_K)T-JXz%3K5*^-!V4kqb>#4GeazvN_=x%m zCqL%L4~rb$f#uA^r;WG5O%mdF7G&(hpY>g!>GHo19(OqWRlh#V8Be(pa9;2i<0%() zFc&%EDYweuh^JiEmlx$V;A{^sa>Q4z8xM#td?$mwC`Ws92eO>;lxNy!^%+ljPCVu# zp7Q8#UeISe<;4xN9PwiIxGHBn@jDmHh5U@CQNRpGJdG-LIO2(W(u^GOGipkf7yd-= zbw5&w?}t2RGt<=n&x7xEIOebVW2_p+>$$)a5<0&wD<6A`NGIf;%E#h+*e(T6+Z%g@ zgl0JQ*gvC;KC%?Tf9Ri4E14e`Ir@j+;b1Ou^v@{9A20G6@GeWq>2H3wgSo)zZ+vG% zmc!rtT^(~#4u9uI91efxJLS>e`P;K{`a9q4U--LVh`$TgJNXfh1xbg){{;sfj`3UI zw0|sOWAr3Pj`2J?H_OLjeH$HdICMux9gg{S^ah8cEu;5mIrqOOx$;k|O#6Rqx5%x> z&|7u3f5+Y~{F}PCY&?ub+hSFq{VIq5>}BT@_UB0nO@bc#^Q7GlM}MA_aya^PjN3l+ zkG-tDvD=35e;>kk4dK7U5ba``)^|VnW`{oqZfvR?-*bBH9!LJZgswZB<>N+5=z3E> zo1g9D8fY$U-<XvSNBhPY`$&U)Tv%o5-*Fd8sCfs|ti5rtXD{2{armCsSRYeVe!Ya& zPIh=Fc+}xvkkC34Kbrq*IPN&=$bZ0lUTVKjLh%T>=KmeI@uBi#68ambJbYKDURHnn z7zzDDm`OJO__HLmX_CX|fcHB5IthLCki&10&_8Z>_y!4mt;OO00-kjEPrwHp{)mJ& zA8|PP^P8@H)PD<NK3zY2uUKeH(&1-e{-l3-UWolh5&GjtCO&O@iZFlM%eJ>@0se;0 zW~Qhd-@m&v*WvBpX1-DRMhX3=<By^rNa(+vcq&Rt=&r4f{?ih=d!NJKkkF4OXZeIY z%wLt@IkvtNior2Qq`8SlqmMMi8|TBqfcm(|v0mXj^Xvsa;e5T<c$o0F68c?A)6j$o z-v!^}@c#sFark}UMGk)wJnHb*z)d_M4fam<!4GETC!_xMvi?1JorE4moz2DkUjaA% zLkjsnfmb>5AL+f;pWpTR=-#aSl!@Tm9FG2dbfd#B15Y@7A-L1tQ?654+CJj1zre}= zAo3q~_*0Ol{f+vb^6Fsy;(0?j+G5U2_57`PC7O8*c}Ags$K!0M3%615&9=XbZwIG5 zs{D%*dTbxK#$)lfupZHWY5BjRJ`qQL7yiZu%E;vZwS*ow{y}B&uNdS13C3629^&x{ z)FH$FAhMSJ=lLMk`{K93r(`+4Ls!;@!3(T>;%M+DaNVCx#Qtz?i^I>vy}6LT1iqMy z_>5~(Avoqwes`m}$gw^Y_Bp%;JRM(@Gro6c<r63Cz4qV4GH~`E>l4OVTP^NQJfiU< zz;AKnXM=wQ{!Af_{y@J@{8!Y!3pCxHJ0WL%)ZY^^9!{VhX@5<`{PbL@!(Wupp>l^~ zd_R9A%TLAn@}g-E%EP}?&%on!*pW{KH*HdRg@j(Ef3?3(tpnfg@Ky;Op}*7e&r0Zz zZvL-I=r0jRekb^Phu@3u6Px4ketbW>Ti=&(9Ouf9OXy9fe0(>utc^im{dF4Fiw|7+ z`4akQU)KI<mmz;|Hb3XH!abDZf?pXQV<%Z^IO1ch@vq7eA7f`Z@*41n!x0~2P5W(r zJ`awKJ95nTW4C5G_m5+p^0|K;yFV-Eetqm=hkp@kyi(SW=ZWK-`f~r6S>qw+{&8G& zR-ey*<DB}9xdS}z$PsV&PELDKAN$8~yB&`G<G6zk$9|FD&1o*==YDd0vBQ^v&vJMj z_)3Rk|A_DGv={YJxABQA=l*g09*3j;;}1F<^&fxS;i!L6;BeHx2zJc{JS_rV;&AkD z5z@>>IqF{&bvWu@6n8l4U$oufsDDw?;i!MnA%|nXTjcoXv@Wc9lN|Xv@L3LD4_@nV z^!Ehln2Ys8d`#HvaKz69w?13IcRTX$fcHB*fi=U72c*&755XOOp0*SGsFVM0aJT-j zJ;9aVi#0RX$-ftTio+iQZ*e&4ax&^@E|&ikc%Q=$f$wto%isqbegyRi9R3=3xx<fx zw>kVh@OYNf^`~rfIOdO2HaomP?{z+(G(kLjUS;RQNoR^@&s&sVBHqYa>L{NHe$3%> z#k0@%D!&Fi>Bv`!m*?uYi<fWu!{+DwRLtzW;4jWk#if=Sj`%H(Ivn#;vC|&z&x(^- zIp>$+V-CmsG_feld7dz_B+EHJO)SrH&PNmL9R5Y{sKYVeOkAJkoR20t_2GOp(TP{i zM-vfK<|@Q|gYi6Zzr!(}CssNf<9Xr%hhsjPc+}yTk4_C|Ip?EOjen5_`;&TAMuKY+ z+Sj&|cjHVKPD)@uQ|fTYX6HKm6`V)(g9l^H{$$ddBENU!r;nCUA^I$B@AS#oQfza0 zrG!p3{<h_vzDhzPw>on8t}Nnkj8A*n`kvk=vU9T||AU04oBpx(_}#TXOlIY0oW^@z zR{sq2?ZPH<&A&!Mi;Yi|e*x`d|7iQp_(uty=E{fE=Zs(CGxw-d#@;Iuy1;4A86V(z z24$w@XXZ<2(J_agF7n5~;g^a$==k$Y#QTp@j{GJGO`7EJ9_&|Vf#;z=&cM4z#J9a{ zd(Zs3$iJ~Y+TJsNj`N0y!!bXNV);3$kNIfDA@D-mzh}OL{X(0Q|8>;g>Ax_BX-zyU z51%UXq|+ba=_1c19eI_=L#(gXCma>IJM3_re_TYGmVaC18OI;tA4{kQHZpST|8gfg z{D{b*U0HrsNaU+df1HK$v43#tch(G%_(~^#FFxWFaX56h)i}JL_q?os&%%DQ*eU<4 z_eEabLAi~mvx|7o%jQ2DeN?}RT;=f3lTQDfy%fI#;n+L-+n9fy_&6K$L45-18lPvQ zKk>I#vi1(bzkLq>vxGiB;BeIMhwNW1|C}==^trtbpDOak28UmX*Nu+-bFQNd*QB%X zgWtF7#`*GYCfN3zgSP#?#NnvRUB?~%TfC1kKGFO*Pq-R$Oj^GL{ndg#%y9G-&&M*n z0`XkuaKxt1^5_rvwq!j%Lk=Hg@?(D8=hUy{XE@Jr{8REU-XEbInf%Y9J`soG@9~V^ zp5^D}VZLZ_IQr`IhaG-1<QpCSdCVVG4*!9KsvLiu`(u%a<F9l7Dzd8}oBuo?_I5b@ zRGgQ&9J)8qp2ov@@YmsfCqK$wKg;2m@25KTIqz<fTPhtn){m6S58&u=yCeS#?|BuP z|IhnKLSt)qYy0#3lQEyg9e#m?u5t9wNByoxe}{B_IUi-c?8M{wnBS@cM<4x(zj=g9 z?SDt)zhEQ7(U<=Xdl`=B>jS8Bh9efXJN`WXUCMab`cEDy(lv+N+Mj$1eg|d0!!JSq z7CXEN?<==D{5FxBk2)OnJM7xK3;lBpa_yhVzd?U)cJikXZ!w1ti2OL7<rnxOACx$J z0zTuv#o<@NUYEl$K3ldqd;^yCjrho1t)0&=K>w#uM!LNhY?sh~xcPsI&rs7f>ox!H z@bN;Y{TIB5_mfWiT<`|$$B|##cLCyIgHxXiv40FwkgI<$#QD&(#~nUf<eff;*C9S! zj`IO~u~PUf%QlQB^g+fR#?SLkeJ<RCc!iCO{Bg|plO6tN%%4ectuNM^P_>i)BAl=O z$SMD#X%f0L$m(BIjq!KL;ifL+wtg3(FKcogIpV=woG(ws@2CD3=6fezFZwm+>j-n$ z_`B$N>?hpv-Za|y&)T1YZ2lBb)*tiTl=Bf^1Io_@$9!!s&A(7WrA~XM)MLMuWDZ;2 zl+WPfiIW@-|Jh6RF+UFC2jQQUOi_KTFZfRE48Iuj_h)xId@6n?YmUQPdC$w*zqkwj zbn18Umn1Z=g>q~E;&1Vum*&TLX@%pzi|>R#x*%46Tnv9+?3RDnC};KGQNGf~_ay=R z5oMY!?~*ex9$k+5pK$u)l1h;~oOrp!j9u#6`dzXC@i>`W?fnz_`<TPg{|)61e-*#G zbRf$aYxP?kj<O!y?(kdiab-9E-(bEu<jA*)yp`+l-4eRfsn4YkiZqsF<)x!|&&$@o z^mGZ`UQBN5Us?)(>~(kz)_14BOR?U?3mka|K0e#)a6BK~vDM)}!hW*|T=$!$Kb6o) z<mvJr<vlO0&$E~h;ggK~Es^&svwZ3()Nhx=&*42Ut3UN(3Egs-+_q=x6^NH|&?$EO zOkIrmWRfGt`=0Y%z5(;=QAhrD%zw2GNBn(bi^HG6ai?29oIjpcl9iX?MeV6a9F94m z(TV3W_;-1!Bggot?05L*c+bnWuk7!zpK<!T48HD(Q*PT^b{Fq?Y5oVW|Jq2d@`EB@ zbo?_7>-Vir|4qZRbz*-u|Fqc>`ibM8X;-6vjydus3EA@#YkyiC@w^Xmoo}bXf8BGO z{NKZPcl<eR7e1cv_-7jS8||(f@4r{TX1f06IlSj(+gE-bJ}#Rgx8;}5L_BYIIOgx} zK8K^ew;y*n-j5X5ID892WtPM5;5{!b5Bo{}?S@Qwk6^#+mS@`H<R9QYFRMQt`;U6& zQU6RIgYmM5a$EoDi08+Qj`A52deG^w>8R^}ZE*6pVSaY}Hy!UU@?H5q<5x7`<Ba`% zyyvC$If(u60dg%5@oR^q<#=2QEnJzE&%pEk)pZV^!h2rU-i&Ej-;2mqe+k|XI`(HY ziag=UKP%oCr+qUp{tDgv-$wh;=8Qeer|TjP$Nc}HTc1B7zMb(q^IYcTW$QN+4Kf$k z=VGkAi<GD3H;8=4@!!lC=AQxPvF(}p<stcTUa;1fR{8hPzg5UnjQIv-&%}P^k`_n* zHRO*w{3G7;vh|x)D4}PZ_?k6ILf1O&pLG$&!(`^S<;}Vr>x0wYSyxMFchZqJqrY5z ztheR69Qk)3XMNN5evbXU%bybY+k&io_Bogzw>li}qbDXDz6{S#wGKyr_eUKLfBJn0 zfBy0b_A|4;gx|G8dqexJzh-|8@$cHl`O97V9DR(xQ(Sx4@2zp#KRX5egp>bW>~Gt$ z{Ib(9pO-rv_wSZEyc+9O3AnCTm(_{<AneGozJ1i|@H=?V>uf0ES^k#*`YWyfF!pP# zpN{v-u%CWs3-jClyX-y8w@&<Dj%0fk8n_(u!3~tF{^hd}PX{Qn`j_|M`O#_L<%rM6 zn;dxppBFHuG(YzT1CIP5jPHcQAH(?XayaTM$MBOb|1F$PRA%LK(AIgI9gg~bZnwj4 zL?2UM>pN$wgwAs6J7*`xFKlGw_wk-rq4|H#@8Hi#xK)47!SnhOC;sQWg6EAX%xc>= z=dXy*c$QxQGq)ac_~}@0UHMAnPdIYyXZoD}xMIk7zXIdE+VS5NJ22kyllIRQh|kBJ z{<-2_$kE1({I^*DT>a-DBUk@k@mHMJYy;Q!TzRsD#yR!5vJ}q`HI5wf*F(o0j=q0s zlfyrQ_4I_p@qBe-0Iua-iTSF!%8?K8|CR8+y=;G6`I5+Yo%&yi{n>z1pQ{QabYqel zwm+^q4f`Rdf3KQpt)=_-stA5vXoHg<^VO`F!{dnGK8IsH^LoLx{#RjsSmD(Fs=YY> zNjdrP{BnQ4!%^SoBM$!%pYL(n6B&c`)rpq~_80Xj<k#{dWmvBdX7wX=BG)?o73oC0 zmTP{@Z;{XA`Q@mSe>2W6avhHS&^22eeiw8K9sWFi*Lw<|x$XQI!T#u>uB?16_7jbB z9KIO#qYgLs<i@DXy%pyRyBzu7V?RFG;orykbDzT>6`50%<?{jw{VeJ5v(dkdC++Wf zm+_vLEpJ|h$iF-7<y=vZK1%y@9?Dzo_-7v4`|u9x+xVIHhRD;0v%JE``B9U@k*&&U zf5i%sw;g|0U_9H))~5pR>*uX^^f#eCY_Ilj#W(St432*)_NltIr{d5M{(Jbl+_8uE z^`pA79DlP?-mh{v*7M4p4##@F`GCXWua#RJj(B>|X<ua=>*r+1Szp9gCF=WwD7gBo z@^0)0-29JXKj`?Q@(5z-^T-~u@iZU){PC2m{(PJ_o;u0lmtekg^ye?3jF<K2{3!Mh z@L{_A`RlR2Fg~*VHy`_p(FKm2zBZTYCo$g^F+uYmLOePCnE!^!jQ?zY{>{kS%Cq?w z(4VCazX;ExEe^j5<Gah@*W&&-ezd<AU_97M?SBsb4I@SUyI>RiH;XxJ{T5)n&UWH` z!EUV2Cp7=L`1R<Av0vZj<VQT;6?gdCm~S1vupI4m+Q0A`=H+GUv+zcoXZ4fY@)u&i zU%~pP`FfFO!w$#%UVF^psBiHWhu_6}UTPope<nq)_HkYro8)k;|MmO9)n5zIAMeMr z@~T|O*<O`bO`wdIwO<8W4-Sx9`&E~KcR73>?|Etddh8b+e^=r8?DnIStNu4JURa+r zzXPAo??X)MezIy8?qd+A>+>r-&sAmfFFFbF;pi_qn=)K{9yl4_Z&Ql%(w$7O<t@5G zLbs+Ij``(gr+$mRB=U+gA1(S0_D3~Ne$?&1@RPBJvhOHyIQFLl(JcSeMBK0Bj~$<% z!g*h)5M0~ysp-gH?&QaO-;#281KK;;;oaD8u6H=%qqWZAKSjKkg3~_clTZB)=T(QZ z@~aW+&xak3Jdd_H9KQI>F^4ae(1p7l-i7$=b@)c!^J1fL7WOsBqr9{Jz8d}csLPXB z&)xE##;@z|b@Jo=Yo*iPtKXuGm$hGw=hdBtTl>|>yDz~6<q?rP3mo2#{ZSu$uFoUY zct3glR!5Hho(Y|dKK3JDJmheEUURl<?;Z5N!x!hGzhFPDzxZO_^Ro3_JR8p=PWu*L zhw+@C+}3w7&VR5(Wck0KzO=9Lu^8j~js$o*|F5yXI_mJ(#PgF5NB!z4SN$a+_}}TT zC8sejFAS7?tc{$Hj*;8?EcrCzCjqMQvjk(Wf0HBMfX4@?f0k^)`_&Rhz60lHJ01RW z#Anjs4~l&GxWnI+(0P$8Uz&sX-stetF(3DX>-(mq*uOpIjF+YJ;okx$|IOG>gdN_E z{Z*C2zl`}a*WusgJukFBz`L0rVf}N)*V6m&zC59F5Auh2&&&4j(#PR1#*_MM>8ld@ zdMV}BpG(ocM^oe&kI=8dk5>z-{ZoVaYpPTKnoCjs9_F|DHTZn{!Y+p|$NO=o{WUG{ zPZDzVPtC13pKEjSe*ycyeGcErdtSEwHM=DAKp(l5hv&tsw>bPSh^K?#>H40)=Utup zUW5JPzt73$zh*ps-?YZzn1)~6?{Lg__Oj()17CPpqtpABYp_51;dbV*^||KDc>Zj1 z_&pN3tkmKC=zqsw*ZdLoSiaWxniI^+%a*qc-SBvV+}dAuF7J7%{6c(QVhXv+5ntWa z4##=Ymkv4n>k_(+G@U;o@=cbX=D!fRXqUr}iTsVjmzUx5FHSrzhi=*4Z2sk6LA-8o z_#No)BjDP;<!HP4JT%J-@GOk|;pX*D{?~cW%eHU%hiLx*xoux<k;wN~Ivnx!Et6H{ zpT&2ARXK9(Pvbisj_3D<PJGqE|F6_J@)MX}d$au7ad<wDI=oDz?SRAQBA&_}4u9A0 z2G{mp+k)?EbnSf$@~w{i``9nnIr{g)AIBYz@!RUy$MP>Xr0}2GUx8*X?9b+3aV<V# z-RJOCSZ|UJhp+25gQxY;U(+Lw9Q{?#_NC?ceEg&AKlT5L2k?9tbNEMi--don%db0` z_q<G}$aRxN{@#ht>o8vKVEJnAx-EEr=k&*Q&tkoaX61DSc)mUg9>G9B?AI0JyahUG z{W|PV9;Uz5Ufo=b-zJBnKR)Af%r}2@>Qnb+d|e6Zn9<*X{j<|wb-zG7Z*t^VU)}vi z-7A={`yKgvsOsJ<zaF1YwBN^L<MVo)m)Oht=X$&k$aU;re>>i<Iptsf4~TEa-`D>J z=jC%8`_JKhu`7QA>v1mR+J85UfImyK`ES7D{esip8?MIJojCe8tU>u(o&2cJ!*Pe> z{OpDjhyMrSh5eB(5BoVRnYe6wZ+HazkEp{jKR<Xd%WuTzO->CQeg<Y%$DcP&!+yo_ z=Z$sPKW}vMw~2h+wTJbw(Y1$ovX}Mujj16V^|6=AG2hhhL5jAA+hBKmtek@P$GfRv z+qZHK=7&Cqe+vGJIvneJyw>5HG5?|s8U26dJuh4S${*wL@C3QqhyS`)I{bOm?=X0} zewe>z@5;(=I#)s^MGlAm_RVrQ&gb)^4#)G3y=?h6#c+Pa@uBCPH^n9NNI!Gf`rPz2 z2~8Mq_ztXR5r<>{^swWPn;sV_b>uf=e|L9vHvi3Iu%C1Mar2oNPn#V%>i%w%!<XQ^ zz-jNz&DcL3apc%Pv>bFe=6|mXT+bVB{t@QONsjzwJP#LUIo;9b@=-WnNjdVfMP6%h zINnc=+U@Y=*bi)R_-Ekn;|~7@_WMU2z6YN_ta5n2$Xr*Bdmnuw=O7Tzz^|oX|MdeW zKBDJKC|r}(k7EA2+wo7d7Vkq~Gu?kt%zySWjg)9F=0n#W`uDUc%whXGYHX2f{(E`P zOF826?w#bC|5d#2Ga}0y#^a-+w6F2hfHpi-oXy`bRYE6691dUH>hyO*9pe2E<Qne{ z@cm<LPX5nHsA0du{}J(5?r^NHi(UDXc%H0r<S&R^9?$Ysc)v7nkHay3V(T4_`TJcr zKjzE&4UYWtSkK)2cTmO)fiqfU)x(HK$~7KWVLab`h;r+%Rj*_Ib^OP<?EQ^dd1Ddo z`(Q)Q8yYX8jF(Z8#s!!!;^fv|BQ^}r!A6GPBJ$5pyf$tT`HSPv#=8+;5hp+DcH<`S z62#xRm|Opf^ZaO5-W0<7!F>+T$NN#Iyrxs|3=($a5#IB%^=+!QEW=S>e;d-+--wl_ z)p(xkXCB+0CiM5_y$=5d_Nz4x--qXc4Gzci`Kbk2j_E=|Vf?q-wx=26yM7nA##b}^ zo0kNiW6N(wx9uwh*YcZj|F+Y<X2h$#kP+oH<M*=`CYfUE+uVWrY<Ku(^d0M$E)VO~ zjTEQ(og)7kXM*Zu|4~(&;j7vj8k(9eX_Wf<=HAv=V?$e8J=5wN+nO6X@QZANNPT^4 zhnuOXIo8}5vw8G>O?}t0-bEd&J7rD%(yksW>+C|c)lz3qv%T$Uj`egl-qP8n26~!1 znxND*H`ZR+yiV_yG{=-wbT#%UYlyYiuW63e_rw}vJwgUssB0s#I08ehWKI3z)>W)k zZEJgTx6DHe(+QojxS?x)cXy{vUe>s-VwK6Tpu4%bvdbaMZ&|gpyRsqHASKlmGx=XB z|C`GH%J|<j{#VZbrn6QJU9C;s>x^%2>AAf<*08D`ZClz?+1v)dEpKjz({JgCb$^1u z(O3qJhMwV6hDZkK+`6{8CpJtm%bEvC9G!~p=7wQwHdyd6joKC{HVti#RdQsG9(>Sn z`%r~!qRok5SluzVsi$pub8JQ9{Ek@n?elvbrB9ZBTpymV?(FPZ)zEm$;?Ab#Pp~pv zu8-T&x_p8SS88?VHMYZW{c;3&ZFfUQPgg^Cb4ScXQZ@qqmrNhCw0KSX|6pQ}^kcd! z8XG^kbXPb;Gd8!Ot*oM@p`)X@ZBbK?<A6-<hs!d^N@a7bp|R!Ts!sZ#{BvW>@A&QG zs>5d)#tOYs(cIQHOwFy0!5N0J0Ox#C`DxK0t!2%afR=Q|T36p*fw`68_i_DC$~4Fl z#=!q(XZS2btt{$@HFvLWXl$--?YPCv)WZZ}Z1`M*Y%S!dY+Q~>xV0zN+Bl3;hs`n6 zMy90y#nLC`8)^@An%mUW{fX7d3I}PLIi|5<^_q|O&tTCYE!)CjwFZj@X~AHoHN)x- zmtl|v82_Iw43}Y$1r&inwR&}HV`XzsV|Q)Csy264%ns<`a}BbE!iLXf7dN%_iMjq) zTgzKNGfdrvvzN&^)Mmz8i`;c8TeG3^LHgHraNpC~&^By6J|-QcyXb$=93;!^zZ%Te zA+rM;LY+OBN?14DZ<zgA`hImM_Fw5dosF@!G%?$;%1)>B%FaQJsO)sZ2OcvCAM0Y{ z?BPYw7&gELTW0K=j2Z9S6qJrpoRMbkZMq%6gDp98hY<{(m<E@TnfEF?Yq3K@4VE@! zHU}n!dyeYnrivKeBy={kFKcdWZe7=$-ajyj*~|tJ+rgTK?)Dz+6T5moQ_<SpxVAM` zdwW-N&n2azid<_UADSQg#2MTyPBlBo+2+>lD9dcJ*;AI8jb_;_O3O^1X{ELwyV@>k z?CMJ2V-wldoK9#>Px0x54zmKKS!YjMYscDN>`bwPG8+LzNmqAgV{=bWXLmXmHi>I9 z7JE8Z$9ftvvUQD(t=LTuD)hGQhOVyW?xt?IN;ATZ=^b!3x{;WTZI`%_&2$^rgYRri zn=~8IyfyK>rrxBk)~5oJ9`jUS1p4Gq*;&!jj3pS@iA_vnthKWPq0`MEa8o+Fkbr2b zX}O)z2ER1-AO#^kBn8h7b88pZbauxURWb*3vUbekTG?6I+OVdgv%S3m&o?H=(p8^c z(a^TGnHE|2y!p#&&3$K=-onP})-`LpnZ=syi8Z&?bfROmloie0J*Yg@nq$kGx*OW( z;RylMY$iAyDmvFP47A=$o7)km4efaH=ti!2&D}9mHa660*4YKZ(AO3qWY^TM?U@^E zU(nDKGi~Gpnn^JO77r!snwwP607Vl~%RV)AYE46HH?l75YVBOQ79~1-5&WL!T?;yf z>}eJ?wKWe(T2nu-v!T0*V~VA>4Hk3oA(>;EjcyiB>Fj*_q_@Um6?~874X#@DX{}v4 zAGOx@XuG=+@R?iI#Y!_<w>CI}Ni@DVtF)*GVPQIf(IU%Z-DOMGwiB1%(%O|Vh`Qn- zF4k1hz=;`^L?<H8+>XW;3_COQ%{ZTG9weulC&{VP&Aeb|1Tz;*wRy~3P*$2TzJQ&J z+H1QiI!#*|8f);>(b}<Q{yIEzpw!0dX=p$<T7Y3drcZ;-P14$ZYh_m>W_!m(MMH-P zDCt3~tI>L+*9C(a;^dy+!C7c|NB81}?lr9)W@>?$b%ABqE_xz6PE26ZTNPcm%PKQM z8K3ie;ghDWMi$v42>ot*rv-9Yq1(+o#`{HG*LF1_0*rnS+|NXt#EMko2!f43G4s~0 zhGnPT%z0gRD;|AqFtl~9p$hX&#ddH=&dT-%E}b-BS_WmdjuW&!3$PQn>BKVAiDlE7 zd1;RsA9y0~;a3E$siziWbwMkqZdr~wwh~M`vZ|@A(cEJ)6_R<k$Cz#5?AbFFn7XW& z^Hi+cq}znb&W`2`tsN?_?aj#NcQ*2&)a0$eXztbo%vN1IqmTt{4Y62r2a3}>>!9Ur zowrH4s;pk-esOdAe4Ha?6P7i1VRBTzX0p}dh-gr*AskJr?KO=z4#HUt=1i1>8;Iz$ z8a%_8J*!T0^gve1XVm{a2W(P}=Aa7mdS_=C4*zrt3gsNg9_U%rF{ok?VKQtRPQ)Nb zMa;oP+R~uFHwy#{EkpT`kT2-&Y+u;a9-C@3h7n{ewRGMV!#uQnfjPahvk~mr+Glb# z$L6)h=5{nKY-sHmlGxVP*@%ZXtRmWQQ~`%0YtiXQG!rgP=P;9Dv}g{@Z!^jnFJ)cR zmac1A+_Q$U!HDI6sp!N2c7=8AIDqPCvJM+YP_eeVdwKJk;dGWX_d<7AQFUj>nol&j ztfy<JIc!`zdR8}gSG1c@&s1G&$K<y3JP3l;ww3C%NIF$6<#YSmu1jz0?7rpFRgLYl zXH4tut)F&DX<79prBj(=cRf9quIlb=Xlm?izqGNXq5IMXbgkwupLHqsP)wKyx8JfH zQ$C!%uKAMXlDS{hu@27|O=e%6N#tPT)-#)pp*T1N3(4)7)cGAv8RbtD44XSs)c-+) z*=gF|^sU?6bed@wS}=(JA5@3qRjZS}b*qz3<FaYGBb~6csfo9e=IQzl;{QkW#X8Z3 zaA8rr9a>+exz)+=|9`79clmPcSL>HAx?w&l)7EU?9;8pW!SMnCyD{e&C7Z@OtkDh9 z-q2WY_VRq}sORZ%eI|*ShR6md-NvQ5K9k0qhFE7S>tY`ocw;J2&k3^I2v%dzIJ5_& z%B47sHwLj3+sg5VDIBbV5#HR<9K&4az9+GX_3fN8n={Wens;cj^K>&Lhk4E!F0DD% zQs3R#8LMx?`w$Z2EIjRWn+dunn`VyRVZzKytf_q_8kEx5W?sFxndqI)wRr#1XkMYz zx36uBwKmdGZ8*|na@HUo2fML5bCY`8v4#&y>1w&XzO|=&a3T{LdU{&dbkukE)~{N- z8dEV|47rxNI@{U?r>w@?m-?PtR@HZQ+lWD{SL1=Ly&=}vQg0$aY#cCd8tg+FP4KDD z#1hjoHrJXH9OKAA1vjm2?-ICm6~eeQliPTZb<zkKq|$00JbRkku`poIH_iTUUjUgs z-!!x5n`Sod)6B+wn%THdGaGmO0y4D9&2GQk=$0GZa{Knk=$0GZa-%!LNbzf^(3)Y= zXP9*SVleF(o8`vlbYpY6u{qsnO*dN8jm_ysce>G<ZnUNwtr<pZ##A=Gy|on~j{o)1 z+1z2(!T^O=rKhXa3{`Vuy8uzyb6Y(HJw5fUO^nDi$2%*$8?*`C-B`)(?QOh8XVy1% zt*x);n#gc9lLDSJm-Y;LYvjx|Qh&pesbzTBu3u46Q9rk)rh4iuySv9riRpUY(=)$j z>U5X^<$i<@hdt874SIXS(skVx9Wk?!;kF(7HoGg$JlxH*PmUB~Bg734p9{>}qDtMC zFTucDM^!%k;PC*F>^?`(W^>zW9uDED34^J}m2xM9EeAJZ+;V)ZJ!PfKv1w?={u#&V z9cyZPui**I{C4TNy$7=kM=y0|rG2ny$%3WzwR7iH&!0LKCC_bZ<I`u){PvourPc@J z?KSOgCD<fnhCj?UgpaA2iY!<*e}4VE%4;g8&R-{H0OFC5;<8efS-WiRlI1mXm(5>N zYy4kPX1oo_(&hD76ILv$n7_PcYB}?=e{9{_Yu3qN_wgLeZr|85*Ksm8b#bdXcXczp zh#tb(%)Bntcz&#<xf`LfxS`Q(n=`deheJ92J6!)e{mRyx0;@aMq_?!_>*|_ihGE6T zDPKd=qV|S0cJI$%$efj=D_C!;WsYh-p+hRm;6bNcZ4S1}vc}mvuRx7EyYa-muBWRT z54fvMUsz|?u_vaX2Zw1=i<qHO+1kVBZ9IPTNKZ%i>Sb6)8CfV|<}y4!Rm`*bOm%r= zVdlf7J?7SqGgIJ@9y66^_?uw@TY7k94^iy%Qd)#DfWApLwI26_4w~o!y!rh23p&R) z>=Qc@mv>;Bi%Pm>FT&{s9#Wcll)A39G4n`j2cOo=bZNR0tXlSL!Jb~Y7ES1(qI|$G z&7a1Aty#7d(Yt)<vZ-Y?_9WDtn4lY}i^r-(J-jKybTEukSs4tXAMA@Yw#L2^<5-*t z4-69ZI72QSycn@&g<R3t+JrJ0R!$hqu$?u(y`{aSrKYSL7Tv>mPILAl6B~tkb8cI2 z)@H}ci1LN28_QNS;>422HyI~Gu)K2F+{HXT<a}Xfo3@_jX6)cl3*($cOKRsYTQIj` z{>MVYc3e6#J~k$&mg^K9YiG{kre`~0!$GUjDwD}9K-@z1nA4d0MssA#xq^?2cB)8s zsOd~jC^&dn(8-e>v$@cQ<CS~*g9DPDgSz$nBU9J(tfynmxV>`mTns-~2mPBqD`0?` z;|rRY&fr;ASD&_G=Fa*XYF7+DXSzYUta)8?_o|xPy3NtcpbpVTdwYzwxD#h3otPii z812k>%D$|2n#);p_$AA@iam_eY#uV;?96ttY4MV!wTl*9KXocHq!+~bH4D~pI*+y6 zBL%aX&bLzvPvY!RI-THzYI;$w=x&@^I`4KqtMtsrsd=k8@TBXimoDZ6#ONB{M>Fh4 z0kShFyK&IDJA2;@Nw#4wPVv`e&wcgyBi-G0#kO&QKEx^Dnpn%=Ug*IDHaL4Wpp4V- zDmgt8GSkFt6Iy&nh56Z8Zfj=4U)X+_msf*!4Oyc@qSVZ#s2UcY%&caP-xjRxXymp` zXKV}(EQXn?EMB<y|LZ!;I6?Rfe%Cjsl8c(kOp|$pGPA<$IU3+>R?!rXV`4hr^do$a zv=}xl*-B;ngU!q^FNNp-50lq$vm(~?*s|UgU9FfGD;nCd7ef7)_F${inLVe+6p!K2 zjD?4LzD)hnD+gnwvh%hMS=)iFC+21BJ+Y7AGnI}T(>l~PJ#^A7G+k^b*7W&nZLf)A zEo(X6e`Lx-bPb+J2glU>4ou8;494d1V<72LOj<TLG~%?Y++{^i=Fx#}D!afgHs*0v zpS_2fnbM0$&5HJRxrKWvJl@z3ZW*V#A0<nNdnU$oTGRC))626_6C3QGJPOpw^_()( zuh7%>GYiYqGB+r7)zyK4V_G~(*f(bBU^L6RzS@w%jyAzz2htD;D(j4Y_;C@QOr03e zse>bI$d;&Ls@a7N-s%pqZpyWTCo@Jf?VG_4uIw6SFNc>fsQ(JQ8p=cj;;yEx4WqB| zmbs;a4m0g;ChdgmF2}w>L9yoHfSd2ZE47(F&9=E~E{3l=R4|XiFRqXI)aNX}J!aZz zzug?Tq(2r)E9@Q{&>W6-0oLgKxC3UP5QZwZ0K@HwoWa@H(miBw>h{?zx@*vu|JT{I zEw^zUL4J}zUHwQ|l$0ttW<)AV<z)*XKnfNB(f}xmf1mE2%g$LWWyMwTgTTF<GuNJ; zIU6=Idug#~n)CG#v3|8JAq!R}oA@EBp3hrQ<}3zV%aMzk<(#0qf8*669%m(h8l=Tu zh+G+R-mdO;UlcL1NlD=B=4KV3XrZQ9H`{`n@Oo-!UeBf1)3ekbW8uZW4Sb~!=8n%; zE4*3E?)3JsU}nh%d{YTc!Tjb491FKDw%fbg{Su`^w_7b1x82P~L<gy$u&t<Lg(c$0 zs9w?3xJD*mT`J~jL?+Tz`MtMQSV2u=y^BD2mQJ4|9wlPNPiJE_?-8-?l$O_R(0%|h z*WHpY+HaR;8>u$D4k@avrD!t^HAC9*GpwVcYjv5(0iU9h&g)YvQFc}gFyRgw4r0An zUs`WuSWWr5XiL^UJ^Fe@L&opFqt}!%b9T9Y1R-EeX*iQ-2A-Te*cpg=KV1R#OQh61 zXGXeZOiC2NR3&i)qJ;+R*fq`2UXw!<eEbwb1h;VVZMs~sMm=3Ez@WnWza6bm<n1~# zKz}T+t{&2=&1;(!P7oqve=Mv{UdnR<37_2Ft`J{Tv!sHgv~i><he(yCB~G67avzEN zUkvbZ?g7S$3U81sKzO)JyJBf49x)jN?{*O!;#b;!PNaMUsOqx;{#4ys0)k+&izQDx z+{7_jSUXvA3>=$u#w8(>phwLY0g_Vv=+H$AueFFKUN)G<$cDHYC6}71T%<~c^Y<rb zryr42OQnk%3WUdaqFqnFQzpT06pQV7A`WrTak^V@H^#fc%DHs4|8D!4>vB6vo#hN{ zItFJNTc^x#bYK9~%*MHyPn#=ihnosBRH8KD2xTbUQ47?`nH}q;`s7Y|GyUCYi-4BW zW3dO#lbm5Qy_>a6#Y-l<v#<LxP?67p2T=yu(JxDoPRhUOZM;?%c4$zOXHJY@T8=~1 zW3T0118;bBx<MR}W3H{3!2ra?^y`AOJ6b>JZ$#2o9c%%BD4zm(vp_wM^dA1wk;2y* zkJ*F8ecwPgzWNO7lV9Wx2JwET!nMN)MLb!qBhNOV%#58^!r=54MB1%Z95s9R{;))F zP;$Qb(*X${@%v7A;#W+)XH_etVQgQYg8IDyPz{FUNj$M~w?C+Icg_&BydCkNz+`i% z1<oIEDkU8M%>$PGZo0b-p@%U=G)rgMe#C^`*5@I7Ld5Wsxd<J$TpW`qMW~P^R>`g< zTkHZGu%S$63ecCp80h!OT#!T1g(?q#r=rKLQMjssR?kPVHE>D7mS{zEdkmBTEnqZ2 z9RjRdqE&#hV5FiaHeYsBqp$rO%%v{@i#k9MVdNAdVgnd{aQh>$#L&u!BY{iH0@nN~ z#e|%CImN-PFP(wS5KxB~*&Ja%_Qt9rn(O9|TrCNiHUzpJ*$5G31mVnANNphx-1Yiy zxtg=8z)V$8ipb)vNaA{E+Wue<7Rk3Hq^QcA&&Xf%7CcAcfZ~Ersh5&5DJ>r@h)lMO zyP)-1lk)+`n6jJBmMZ`#q=Um-!PC%ZfYK1i8t^vsn;jfc9p1gSONGrFWDN@v72l%# zLW{jbhS+a!9@^zvjG1n4yQ?LKLp=u>AxLRuj$r`c57q)|-u?f#VUUllWa$)1OV;!% zPkM>G<jLFOE5@>1e_iMEY656iO+>^YI?okUXKbrdaj=F`ibGx0o}!!&*Nxo-lM7=k zMx%&J+2p|Mh_a19e?9-#>Dk%k`J_9u$|zXd_5RCVZ0B=CqYB(l2dihwbpezmU^iYG zRcpqYQ0UMW1qtReqpc`cu%l0pRajU*=y_YxdMNeohMtMkk_KB}BEwLt^#W6WyLL`5 zU+z!BoGS7=T{T72gWd^s0<Me>4WiAr*FBmIgvpCMcGLYP5E>sptO-W#G+yJ*D@4=- zVUr3TmXWUKhQF^dl6=2F3bLlx)aCr^12_uob6e(fVK`CGMl31X%fyb$j=rK&>n@pl zt+-4N%&TDB5?||tV+7GbWx!r2Ukqh3^Ew+A7D5}o+i5>Bf5|^tU1Th`pS^3G%~)E* ze?;~pbw^?r2_vRs2Pnz!Sf0SRM$!SjNo3{JmPZ+MC(mIiwLT}<pySlv4n=f)obCE2 z#E)<@?s%*xRINfh2g69w*t_}cV!Hc!r1=muQGoe3%S-k^aaP03A)?pE@5(gy>@pv< zK}GIpw3WFuYA(Vr_BLn=G~xl6og8E9uOF~<2BKl&Xe?szvg4k;9Y{|!ijFX}%X`CP zx*luh7XEQmfazOAFQzuJeIlk+h=#F%auKQ<(S5Izh<oGZR*|$pz_Sk@6lLQ@q?%f; z+i&3?Aj1aFrFj=t6T_{PbUBGU4fo9|IKbd|!76^Uo3C+FUCz4Pd?Tq1AWLWGc?gZ| zQHLcBH>_v|Fk=@+g08QLsZZD7(drt5#?vtq3A8+Z^77qcL+?}fOYwb>@S&kB4!qNC z{*6bwbF<R*7C!o&FaW)!?ZdvJP^sqr@g21v8KWZ9J{e=2_5{|m3kEgpZHr+6QJ5Z^ zu$IP^X?;Le0*NV5gUByFF4h=gMOHO2d*hT>wJTP!zrNn=LA!>J;&s38D(^4*LU6<a z;9_i{^=|Bl1rKiA><7g9HPpr_a)^+8Y#Q$m07IV*Us4;_i*lfA=<P$O&@P_w!M;tv zf;H+7Uc*!;@sf&*63hLEf3q|Y6$K@!?8ixge&T05neyUBIzLmhS6iu6fq6w)Sakz@ zYvIm@wjNm^%wayq@c#-2jR%tJJETt4rPO0oOHuB#82Up?0_CUUc!Q@Z16Amj`fk=8 z(TG1PPR0*rhxE1afb+uO7v9<$_E@3qaRb4yGIvLN#Aa0AHlyl-rPo?)ozJe{ECema z7f|+nV0sz(FdY>T8TAJK7gmY2xJwm{`ku=#xa{-X2#p!N6I>076dnbkoLJn&G4!z9 zLj@gAvg|~Z_d?)iTQKGM-cPzsT~a<1zy<`LH-wI*dJ1(h(%o!4-o;v)jey7sA|pZE z`Ij82FtXiX1wzh{Xey6FG}0{4QN&9tWNJg#nnma;gH_*}d2)Dla0ed5^x-+Zyn#l5 zKcYQF_KOM(<5fTaX7_s{j?@M=77wLlzzzsspWrMhgMZhB6-HUxr<X){3f7_jGAO20 z=j1Ib?+{2N5DOU<c?`jTYEAFHJDbYwp3MKK>qQ9kQ;`E9p<yfFH+8%5f3ua>hOzwz zJK$x)8L&Z*`uK$N1{jml=m2N~IQ!7mn%R+zEN_>a<qj;tku{{K`V%Y>{vtHMqg6i0 zfe_#V<pri*F80ukhTMjt75hk-Sg!XzjhfGF#9e|pHo__BMMYE&dlrFeen)33b>S(j zOz2W{_t&_x=aBLj;{m;`#@S4=OFGw?hdp`nvu|N&u9YoXtANvNaH~wFwo6@Zs_kG0 zh&)~}PhMofthD|CQx6nd)`lcJMT6SlEVVbFa(*~GXU)B0;yKEdZ|LQY0M?3~OTF6} zqkpK&7qF}G-ex{>5XxAjvDv<DYBXxkO!|;t<XeY<^Y{s4&fS_vK^F7UgbM?b_(uvM zeLE>zg!1U~oija$_nO~x0TQ3hlEuhKO0S_)v92h|1L)VAF<ymXUY=QXEt(4(k*yhq z9x4T!KjK3wRsW(p7~45?=KPCS6dDW8vZ8IqsIn-|#gHy*FvBPeDHqOnRqh;ay+g&B zFT|fI0F!I}+AKrllE08Xny1-enS6YI|BQ*8Vbe3YfrZa#!Q9>YY@vcG?#ia(z#8K{ z&{{KyN0pDD)2s@hQt@d@Y1ewbaXMU~!3;j4!K`67hO;s!O|YZE7jPaKQ1r!mQiW&^ z`fv=Tl<N6n%b8-Mhl}Yxg08zuoNvVW_jc%CgcJ92y282c#r%^!?tnRf>>gnbBCvAB z)P%#bG;@wXY;Uf3A}M{$I~2^q`P+rHP{+pd*QA~pQ?`*8kS#v_nidDys%VypOIvtq zdhXvD=A(Rx7jdear$S+b=EC_(kT_%y^WX394F?alBXhXe?OU6MSvAuUys34_$uEgQ zv)bbLK{_U(7B1<%jxzAm8wyF&t3^x8)``NBpTa-;Sn6mk{(uL^JXffikZp`ICQ7%7 zLj`63lwKsvJbr=~5c9~h;nnz*8fPik=$Jz6j4&sw`{@G+mYs(csKWeBIlf0F*WHH8 z)S+z(v2jJ6E4i5OwIbm6b{*J4G|9D)bIuZ_I;k&71a^M}QTmw*>h1LkH1h|bCBASZ ze2lYFaYO<S&M*}k0mosn@?eDpaL?ghfY`7GRhB&5cXM^61w%SmrdrPsM)`(dst{eJ zn3}Wr`O#-dv&e`dBs5^hqm?tG)<^*d|7I-Kq3u4$Y7)^CIE*o@9_OfS8ugGP1>ztT zuC54}V5ymb&sgXA(RRArVE_yVut;a&zYs>BSv9_ck^x^Uki%JE8kS1#i#oatyk?E- z5r+hnCOnIDtb<AefR+}97Fe8jQe3vs#u9inU9K(YWq2C3mr?Tla8(LzDe5SmAa4}m zh0%^bg#U)nX*E{0B`#<@sAmoGXOcJv$h1Be&unOeFsR?~B^4^#5CxsTKb?u@_$+I5 zc|Af~e&42Vjahx-1y~xluq!JD9&w<Iip)7;bs24B0C@~<{b-82zuoG@2}guc-rXSy z&*2O>$FP4m#RM{6GsuyTW&Rg<1jq~S+mF=@I<}B9yLSBrK52pvYz&I67-8_4^;AlZ z%(elfAY;WB?-1BS!Hq=lKq$nKdwq_<2nMgHIQqsw&CNFNqEPuwsgVlPZhi1GaiJpu zGJUIPFg%9HrNS_^X5f4B%!t{*#*aXyFs*EEai!z*)6YAZC4<HKT|Jfo6~ZFjBsGbw zaE!UBi`fc5WDv{*ot3Kc{HFdzVP*znRU^?V^Jm-Y=T}Ohwf8C@Z^dcXfs?$jhokL` zpp7(paD|!PY)Bon^Wvqz^kKI#q}FdJ-=!+<py2zF7mm8ugdN`34>(W3LuQy_Y%DTQ z4FX#XPGE&{G-D+{NWLS?lOAegI9}--N~|gWDur-(>A`7$n)9)V4^LxB%2k7S87>S~ zN?*Eh(<0<5Uy(gfeIKf25=lyr5WIGh*`i|iZ8hC^>j{`9V8Q$Qzyrmy;Q{_xuaFz_ z3d2@G_7*pL^m_W`uTK5N1}!~%SGl}a=)gZf79L-b02MF@#bUx<KUlm6fdF&KbnC4i zOUW3mn$Az&p2}=Tuw0{c1S>BBV#yX34hl4ZePyNSgOq3yy4PvbayEp|1UZ679{7rq zbG(z4aiX?(7!3(`HU&Ttp(zu6Q0=ppieruc{vuQ6BQWn3>z^NuQnrRTc?Ao`)_!W9 zxBKtr{ttY~f>QzA4%6$_jIw|8<1{$nESdU2@Xu(I?eInBVWR2>E~t~rS!8QYHAXMo zJ<TmS9c>{anF<PIYF3!Se}y05LG^T9%V~Xk_nzZ{Xq@!(X978NogDiS4!yX!CC^9- zUE4#Ehtc=LeH~BwX#~vBI(ismeA|jK?4_YxIOkK0CEFXAR>i?HEV~@Jz@&9QC!<uB zAM2^lNQ09kB3vl=#wY<R6)HtP!gljOa}(E(b+}~vZSfmF?hyzKh123YU^G_^pYe|` z^EL3%oF6Gl9X~v*SLc~Qe;BNkHI{Y|V}Ty0sjs_TfRf%#oG~Pu!2soz7DxHel`qpu znd1w7DkgMD*Yg$Qc*X(~%TciqzIKSQ0g_qHVn?KAMuIwSsi&vXgQCV8CzD*Xsv~%k zhv*xIE0K(ZQJ$v&RxEq1#zK!v6xafq-hc4{*fq@M*)7|1m_=NHfA}XMrA9dUX#y^N z$RH1SO$ATHjB?Ogg!E<(xv79IJHw&}pbs6%6+Xll_I&z%znxx^QxqgDw=&C*ABdgv z+#={Ud{jok4apc^9bKd?<Idq{%183saU|;DDD9uC4RukfX^kV48DkiznKM6dVpDet zJyzwzPz<tO;Pa>}$cbH-*ss&7)+WgF1paGi6hNha@}u_qjG72uz-4dr_&sNxA|<!6 z;BOqtb)BS%X{+Zx5*t)NEM4Zz67>=TIH-MwU@$?|W2GJsUqOQQ9ff}orJ74L+nBJO z^6$$PKf+>T8sMg;mljMFVW`1~ZIlx^2N`E50`C}cWd`m(C>g++{IcGG^Bqj}fE3X& zEp>S%k`TqkO=?>xhF}9pX!zLCB1J51EYTb19t)Y#9`n)BXC)I@*kdiUAG*R)EvfHF z5;7Eehlhb+00_sUSjVqixi>;01~>A}L2$;7f~_Oy{bWobvJDW;5?^QP$D0#qj=po0 z*LgEMz4Lat9s58J?506@*ZhCv=&MnE{q$P=BK%(sMmPUX&C*`8gOURR%T<qB=M|am wgH=)xZ<mYJoZ7`_8IDBx|A!yvPa(omMOQMua~{Jx7Be<=z;9>@0iP27AFXb@4*&oF From 49fda362151ccc8045607557381f8d1293c0dcb0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 26 Jun 2006 18:13:00 +0000 Subject: [PATCH 303/757] remove kmod-ide control file SVN-Revision: 4086 --- openwrt/target/linux/control/kmod-ide.control | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 openwrt/target/linux/control/kmod-ide.control diff --git a/openwrt/target/linux/control/kmod-ide.control b/openwrt/target/linux/control/kmod-ide.control deleted file mode 100644 index 2b02d82257c..00000000000 --- a/openwrt/target/linux/control/kmod-ide.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-ide -Priority: optional -Section: sys -Description: Kernel modules IDE support From 4668541b353157b0b090ecec9df87e64c44cf9a4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 26 Jun 2006 22:31:55 +0000 Subject: [PATCH 304/757] enable CRC32 in brcm-2.4 kernel config - no idea why it even worked without SVN-Revision: 4087 --- openwrt/target/linux/brcm-2.4/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/brcm-2.4/config b/openwrt/target/linux/brcm-2.4/config index 7185e9f3998..7b0020722bc 100644 --- a/openwrt/target/linux/brcm-2.4/config +++ b/openwrt/target/linux/brcm-2.4/config @@ -1379,7 +1379,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m # # Library routines # -# CONFIG_CRC32 is not set +CONFIG_CRC32=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y # CONFIG_FW_LOADER is not set From ef52b42f70d40474968a9c0fc7cb30f9e5bb94ce Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 26 Jun 2006 22:44:53 +0000 Subject: [PATCH 305/757] don't rely on temporary variables in config() as they may get overwritten by config_cb() SVN-Revision: 4088 --- openwrt/package/base-files/default/etc/functions.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index e87515d6eaa..3010196171e 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -36,13 +36,11 @@ reset_cb() { reset_cb config () { - local type="$1" - local name="$2" _C=$(($_C + 1)) name="${name:-cfg${_C}}" - config_cb "$type" "$name" - export CONFIG_SECTION="$name" - export CONFIG_${CONFIG_SECTION}_TYPE="$type" + config_cb "$1" "$2" + export CONFIG_SECTION="$2" + export CONFIG_${CONFIG_SECTION}_TYPE="$1" } option () { From 3e639bb44e72036b1b16f07025a7997fa561124d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 26 Jun 2006 23:52:57 +0000 Subject: [PATCH 306/757] add missing exports SVN-Revision: 4089 --- openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch index dc0805e5996..557d24ff3f3 100644 --- a/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch +++ b/openwrt/target/linux/brcm-2.4/patches/001-bcm47xx.patch @@ -1795,7 +1795,7 @@ diff -urN linux.old/arch/mips/bcm947xx/compressed/Makefile linux.dev/arch/mips/b diff -urN linux.old/arch/mips/bcm947xx/export.c linux.dev/arch/mips/bcm947xx/export.c --- linux.old/arch/mips/bcm947xx/export.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/arch/mips/bcm947xx/export.c 2006-04-28 02:57:34.000000000 +0200 -@@ -0,0 +1,62 @@ +@@ -0,0 +1,65 @@ +#include <linux/module.h> + +#define _export(n) \ @@ -1805,6 +1805,7 @@ diff -urN linux.old/arch/mips/bcm947xx/export.c linux.dev/arch/mips/bcm947xx/exp +_export(bcm947xx_sbh) + +_export(sb_attach) ++_export(sb_kattach) +_export(sb_boardtype) +_export(sb_boardvendor) +_export(sb_btcgpiowar) @@ -1827,6 +1828,7 @@ diff -urN linux.old/arch/mips/bcm947xx/export.c linux.dev/arch/mips/bcm947xx/exp +_export(sb_coreunit) +_export(sb_detach) +_export(sb_deviceremoved) ++_export(sb_gpiosetcore) +_export(sb_gpiocontrol) +_export(sb_gpioled) +_export(sb_gpioin) @@ -1858,6 +1860,7 @@ diff -urN linux.old/arch/mips/bcm947xx/export.c linux.dev/arch/mips/bcm947xx/exp + +_export(srom_read) +_export(srom_write) ++ diff -urN linux.old/arch/mips/bcm947xx/generic/Makefile linux.dev/arch/mips/bcm947xx/generic/Makefile --- linux.old/arch/mips/bcm947xx/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/arch/mips/bcm947xx/generic/Makefile 2006-04-27 19:24:19.000000000 +0200 From f804d0ea1d131152acccd2a108c231fe07c4196c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 27 Jun 2006 00:36:13 +0000 Subject: [PATCH 307/757] add copyright headers to base-files scripts and config files SVN-Revision: 4090 --- openwrt/package/base-files/ar7-2.4/bin/firstboot | 2 +- openwrt/package/base-files/aruba-2.6/etc/config/network | 2 ++ openwrt/package/base-files/au1000-2.6/etc/config/network | 1 + openwrt/package/base-files/au1000-2.6/sbin/mount_root | 2 ++ openwrt/package/base-files/brcm-2.4/bin/firstboot | 2 +- openwrt/package/base-files/brcm-2.4/etc/config/wireless | 2 ++ openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net | 2 ++ openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig | 2 ++ openwrt/package/base-files/brcm-2.4/etc/preinit | 2 ++ openwrt/package/base-files/brcm-2.4/sbin/mount_root | 2 ++ openwrt/package/base-files/brcm-2.6/bin/firstboot | 2 +- openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net | 2 ++ openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig | 2 ++ openwrt/package/base-files/brcm-2.6/etc/preinit | 2 ++ openwrt/package/base-files/brcm-2.6/sbin/mount_root | 2 ++ openwrt/package/base-files/default/bin/ipcalc | 1 + openwrt/package/base-files/default/bin/login | 2 ++ openwrt/package/base-files/default/etc/functions.sh | 2 ++ openwrt/package/base-files/default/etc/hotplug.d/net/10-net | 2 ++ openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount | 3 +++ openwrt/package/base-files/default/etc/init.d/S10boot | 2 ++ openwrt/package/base-files/default/etc/init.d/S50httpd | 2 ++ openwrt/package/base-files/default/etc/init.d/S50telnet | 2 ++ openwrt/package/base-files/default/etc/init.d/S60cron | 2 ++ openwrt/package/base-files/default/etc/init.d/S98done | 2 ++ openwrt/package/base-files/default/etc/init.d/rcS | 2 ++ openwrt/package/base-files/default/etc/nvram.sh | 2 ++ openwrt/package/base-files/default/sbin/hotplug | 1 + openwrt/package/base-files/default/sbin/ifdown | 2 ++ openwrt/package/base-files/default/sbin/ifup | 2 ++ openwrt/package/base-files/default/sbin/mount_root | 2 ++ openwrt/package/base-files/default/sbin/wifi | 2 ++ openwrt/package/base-files/default/usr/lib/common.awk | 2 ++ openwrt/package/base-files/default/usr/lib/parse-config.awk | 2 ++ openwrt/package/base-files/rb532-2.6/etc/config/network | 1 + openwrt/package/base-files/sibyte-2.6/etc/config/network | 1 + openwrt/package/base-files/sibyte-2.6/etc/inittab | 2 ++ openwrt/package/base-files/x86-2.4/etc/config/network | 1 + openwrt/package/base-files/x86-2.6/etc/config/network | 1 + openwrt/package/base-files/xscale-2.6/etc/config/network | 1 + 40 files changed, 70 insertions(+), 3 deletions(-) diff --git a/openwrt/package/base-files/ar7-2.4/bin/firstboot b/openwrt/package/base-files/ar7-2.4/bin/firstboot index 955423be093..774bbc754b4 100755 --- a/openwrt/package/base-files/ar7-2.4/bin/firstboot +++ b/openwrt/package/base-files/ar7-2.4/bin/firstboot @@ -1,5 +1,5 @@ #!/bin/sh -# $Id$ +# Copyright (C) 2006 OpenWrt.org rom=$(awk '/squashfs/ {print $2}' /proc/mounts) jffs=$(awk '/jffs2/ {print $2}' /proc/mounts) diff --git a/openwrt/package/base-files/aruba-2.6/etc/config/network b/openwrt/package/base-files/aruba-2.6/etc/config/network index f60332cd8cf..65797797eee 100644 --- a/openwrt/package/base-files/aruba-2.6/etc/config/network +++ b/openwrt/package/base-files/aruba-2.6/etc/config/network @@ -1,4 +1,6 @@ # Network configuration file +# Copyright (C) 2006 OpenWrt.org + ## LAN configuration lan_ifname="eth0" diff --git a/openwrt/package/base-files/au1000-2.6/etc/config/network b/openwrt/package/base-files/au1000-2.6/etc/config/network index 2cc9e267171..576677bf7c4 100644 --- a/openwrt/package/base-files/au1000-2.6/etc/config/network +++ b/openwrt/package/base-files/au1000-2.6/etc/config/network @@ -1,4 +1,5 @@ # Network configuration file +# Copyright (C) 2006 OpenWrt.org ## LAN configuration lan_ifname="br0" diff --git a/openwrt/package/base-files/au1000-2.6/sbin/mount_root b/openwrt/package/base-files/au1000-2.6/sbin/mount_root index bc4165ca300..718394ca4c0 100755 --- a/openwrt/package/base-files/au1000-2.6/sbin/mount_root +++ b/openwrt/package/base-files/au1000-2.6/sbin/mount_root @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + mount none /proc -t proc size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) mount none /tmp -t tmpfs -o size=$size diff --git a/openwrt/package/base-files/brcm-2.4/bin/firstboot b/openwrt/package/base-files/brcm-2.4/bin/firstboot index 28189780bd2..d37ce4f90ba 100755 --- a/openwrt/package/base-files/brcm-2.4/bin/firstboot +++ b/openwrt/package/base-files/brcm-2.4/bin/firstboot @@ -1,5 +1,5 @@ #!/bin/sh -# $Id$ +# Copyright (C) 2006 OpenWrt.org rom=$(awk '/squashfs/ {print $2}' /proc/mounts) jffs=$(awk '/jffs2/ {print $2}' /proc/mounts) diff --git a/openwrt/package/base-files/brcm-2.4/etc/config/wireless b/openwrt/package/base-files/brcm-2.4/etc/config/wireless index a7e67435cff..9dc4945e070 100644 --- a/openwrt/package/base-files/brcm-2.4/etc/config/wireless +++ b/openwrt/package/base-files/brcm-2.4/etc/config/wireless @@ -1,3 +1,5 @@ +# Copyright (C) 2006 OpenWrt.org + config wifi-device wl0 option type broadcom option channel 5 diff --git a/openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net b/openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net index 9dd77963ba9..48abdf4062f 100644 --- a/openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net +++ b/openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + setup_wl() { [ -f /proc/net/wl0 ] && { diff --git a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig index 6a626f54a55..0f53c0c9c97 100755 --- a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + [ -e /etc/config/network ] && exit 0 mkdir -p /etc/config diff --git a/openwrt/package/base-files/brcm-2.4/etc/preinit b/openwrt/package/base-files/brcm-2.4/etc/preinit index 5b676ca3acf..fb13e107e5c 100755 --- a/openwrt/package/base-files/brcm-2.4/etc/preinit +++ b/openwrt/package/base-files/brcm-2.4/etc/preinit @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + export PATH=/bin:/sbin:/usr/bin:/usr/sbin mount none /proc -t proc diff --git a/openwrt/package/base-files/brcm-2.4/sbin/mount_root b/openwrt/package/base-files/brcm-2.4/sbin/mount_root index 8edac78543e..ec82cd40fbe 100755 --- a/openwrt/package/base-files/brcm-2.4/sbin/mount_root +++ b/openwrt/package/base-files/brcm-2.4/sbin/mount_root @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + is_dirty() { grep Broadcom /proc/cpuinfo >&- || return 1 OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))" diff --git a/openwrt/package/base-files/brcm-2.6/bin/firstboot b/openwrt/package/base-files/brcm-2.6/bin/firstboot index 28189780bd2..d37ce4f90ba 100755 --- a/openwrt/package/base-files/brcm-2.6/bin/firstboot +++ b/openwrt/package/base-files/brcm-2.6/bin/firstboot @@ -1,5 +1,5 @@ #!/bin/sh -# $Id$ +# Copyright (C) 2006 OpenWrt.org rom=$(awk '/squashfs/ {print $2}' /proc/mounts) jffs=$(awk '/jffs2/ {print $2}' /proc/mounts) diff --git a/openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net b/openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net index 8bbf604df8d..90a92bd2b0c 100644 --- a/openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net +++ b/openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + setup_eth() { [ -d /proc/switch ] || { diff --git a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig index 6a626f54a55..0f53c0c9c97 100755 --- a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + [ -e /etc/config/network ] && exit 0 mkdir -p /etc/config diff --git a/openwrt/package/base-files/brcm-2.6/etc/preinit b/openwrt/package/base-files/brcm-2.6/etc/preinit index 5b676ca3acf..fb13e107e5c 100755 --- a/openwrt/package/base-files/brcm-2.6/etc/preinit +++ b/openwrt/package/base-files/brcm-2.6/etc/preinit @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + export PATH=/bin:/sbin:/usr/bin:/usr/sbin mount none /proc -t proc diff --git a/openwrt/package/base-files/brcm-2.6/sbin/mount_root b/openwrt/package/base-files/brcm-2.6/sbin/mount_root index a3ada589089..e3bdd3655c0 100755 --- a/openwrt/package/base-files/brcm-2.6/sbin/mount_root +++ b/openwrt/package/base-files/brcm-2.6/sbin/mount_root @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + is_dirty() { grep Broadcom /proc/cpuinfo >&- || return 1 OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))" diff --git a/openwrt/package/base-files/default/bin/ipcalc b/openwrt/package/base-files/default/bin/ipcalc index 318980e5a25..23af6a0c3b3 100755 --- a/openwrt/package/base-files/default/bin/ipcalc +++ b/openwrt/package/base-files/default/bin/ipcalc @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org awk -f /usr/lib/common.awk -f - $* <<EOF BEGIN { diff --git a/openwrt/package/base-files/default/bin/login b/openwrt/package/base-files/default/bin/login index 8f9281726d5..ff5d3660e40 100755 --- a/openwrt/package/base-files/default/bin/login +++ b/openwrt/package/base-files/default/bin/login @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + grep '^root:[^!]' /etc/passwd >&- 2>&- [ "$?" = "0" -a -z "$FAILSAFE" ] && { diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 3010196171e..a7f7c42e22c 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + alias debug=${DEBUG:-:} # newline diff --git a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net index b68ec1be28c..f306ae342d7 100644 --- a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net +++ b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + find_name() { for ifname in lan wan wifi ${ifnames}; do diff --git a/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount b/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount index c28ada204ec..c4d356b0dac 100644 --- a/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount +++ b/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount @@ -1,3 +1,6 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + mount_storage() { cd /dev/discs for dev in disc*; do diff --git a/openwrt/package/base-files/default/etc/init.d/S10boot b/openwrt/package/base-files/default/etc/init.d/S10boot index e0d15db0e06..cb5c6ac4a77 100755 --- a/openwrt/package/base-files/default/etc/init.d/S10boot +++ b/openwrt/package/base-files/default/etc/init.d/S10boot @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + . /etc/functions.sh [ -f /proc/mounts ] || /sbin/mount_root diff --git a/openwrt/package/base-files/default/etc/init.d/S50httpd b/openwrt/package/base-files/default/etc/init.d/S50httpd index a1b883d0a81..d278519e981 100755 --- a/openwrt/package/base-files/default/etc/init.d/S50httpd +++ b/openwrt/package/base-files/default/etc/init.d/S50httpd @@ -1,2 +1,4 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + [ -d /www ] && httpd -p 80 -h /www -r OpenWrt diff --git a/openwrt/package/base-files/default/etc/init.d/S50telnet b/openwrt/package/base-files/default/etc/init.d/S50telnet index fb9687c8aa7..25242bdef87 100755 --- a/openwrt/package/base-files/default/etc/init.d/S50telnet +++ b/openwrt/package/base-files/default/etc/init.d/S50telnet @@ -1,2 +1,4 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null; then telnetd -l /bin/login; fi diff --git a/openwrt/package/base-files/default/etc/init.d/S60cron b/openwrt/package/base-files/default/etc/init.d/S60cron index 17527342675..6df9b7dee99 100755 --- a/openwrt/package/base-files/default/etc/init.d/S60cron +++ b/openwrt/package/base-files/default/etc/init.d/S60cron @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + mkdir -p /var/spool/cron ln -s /etc/crontabs /var/spool/cron/crontabs crond -c /etc/crontabs diff --git a/openwrt/package/base-files/default/etc/init.d/S98done b/openwrt/package/base-files/default/etc/init.d/S98done index 5d5ab49ce33..a1ea5ad4389 100755 --- a/openwrt/package/base-files/default/etc/init.d/S98done +++ b/openwrt/package/base-files/default/etc/init.d/S98done @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + sysctl -p >&- # automagically run firstboot diff --git a/openwrt/package/base-files/default/etc/init.d/rcS b/openwrt/package/base-files/default/etc/init.d/rcS index b38e4497813..dad989fe09e 100755 --- a/openwrt/package/base-files/default/etc/init.d/rcS +++ b/openwrt/package/base-files/default/etc/init.d/rcS @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + ${FAILSAFE:+exit} [ -f /etc/config/network ] && . /etc/config/network diff --git a/openwrt/package/base-files/default/etc/nvram.sh b/openwrt/package/base-files/default/etc/nvram.sh index 4d39a102047..ddbd88b52f5 100644 --- a/openwrt/package/base-files/default/etc/nvram.sh +++ b/openwrt/package/base-files/default/etc/nvram.sh @@ -1,4 +1,6 @@ #!/bin/ash +# Copyright (C) 2006 OpenWrt.org + # allow env to override nvram nvram () { diff --git a/openwrt/package/base-files/default/sbin/hotplug b/openwrt/package/base-files/default/sbin/hotplug index 106299343a3..afe52a446f9 100755 --- a/openwrt/package/base-files/default/sbin/hotplug +++ b/openwrt/package/base-files/default/sbin/hotplug @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org # bypass the normal hotplug path for firmware loading # would otherwise cause problems with drivers like bcm43xx diff --git a/openwrt/package/base-files/default/sbin/ifdown b/openwrt/package/base-files/default/sbin/ifdown index 0d85ca8eab6..50ffee53040 100755 --- a/openwrt/package/base-files/default/sbin/ifdown +++ b/openwrt/package/base-files/default/sbin/ifdown @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + [ $# = 0 ] && { echo " $0 <group>"; exit; } . /etc/functions.sh . /etc/config/network diff --git a/openwrt/package/base-files/default/sbin/ifup b/openwrt/package/base-files/default/sbin/ifup index a86a7671e81..390f9603950 100755 --- a/openwrt/package/base-files/default/sbin/ifup +++ b/openwrt/package/base-files/default/sbin/ifup @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + [ $# = 0 ] && { echo " $0 <group>"; exit; } . /etc/functions.sh . /etc/config/network diff --git a/openwrt/package/base-files/default/sbin/mount_root b/openwrt/package/base-files/default/sbin/mount_root index 647c25327ad..81660f00673 100755 --- a/openwrt/package/base-files/default/sbin/mount_root +++ b/openwrt/package/base-files/default/sbin/mount_root @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + mount none /proc -t proc size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777 diff --git a/openwrt/package/base-files/default/sbin/wifi b/openwrt/package/base-files/default/sbin/wifi index b8b995bab2d..63b2f121bda 100755 --- a/openwrt/package/base-files/default/sbin/wifi +++ b/openwrt/package/base-files/default/sbin/wifi @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + . /etc/functions.sh config_get_bool() { diff --git a/openwrt/package/base-files/default/usr/lib/common.awk b/openwrt/package/base-files/default/usr/lib/common.awk index 63a8cf23d8a..c5ce680fa63 100644 --- a/openwrt/package/base-files/default/usr/lib/common.awk +++ b/openwrt/package/base-files/default/usr/lib/common.awk @@ -1,3 +1,5 @@ +# Copyright (C) 2006 OpenWrt.org + function portstr(type, str) { gsub(/-/, ":", str) if (insmod_mport != 1) { diff --git a/openwrt/package/base-files/default/usr/lib/parse-config.awk b/openwrt/package/base-files/default/usr/lib/parse-config.awk index bde5c0072b4..cf1b09c58cd 100644 --- a/openwrt/package/base-files/default/usr/lib/parse-config.awk +++ b/openwrt/package/base-files/default/usr/lib/parse-config.awk @@ -1,3 +1,5 @@ +# Copyright (C) 2006 OpenWrt.org + { line=$0 gsub(/^[ \t]*/, "") diff --git a/openwrt/package/base-files/rb532-2.6/etc/config/network b/openwrt/package/base-files/rb532-2.6/etc/config/network index f60332cd8cf..2bb48b88639 100644 --- a/openwrt/package/base-files/rb532-2.6/etc/config/network +++ b/openwrt/package/base-files/rb532-2.6/etc/config/network @@ -1,4 +1,5 @@ # Network configuration file +# Copyright (C) 2006 OpenWrt.org ## LAN configuration lan_ifname="eth0" diff --git a/openwrt/package/base-files/sibyte-2.6/etc/config/network b/openwrt/package/base-files/sibyte-2.6/etc/config/network index 2cc9e267171..576677bf7c4 100644 --- a/openwrt/package/base-files/sibyte-2.6/etc/config/network +++ b/openwrt/package/base-files/sibyte-2.6/etc/config/network @@ -1,4 +1,5 @@ # Network configuration file +# Copyright (C) 2006 OpenWrt.org ## LAN configuration lan_ifname="br0" diff --git a/openwrt/package/base-files/sibyte-2.6/etc/inittab b/openwrt/package/base-files/sibyte-2.6/etc/inittab index 6eef29efbad..a6f4e17f015 100644 --- a/openwrt/package/base-files/sibyte-2.6/etc/inittab +++ b/openwrt/package/base-files/sibyte-2.6/etc/inittab @@ -1,3 +1,5 @@ +# Copyright (C) 2006 OpenWrt.org + ::sysinit:/etc/init.d/rcS duart/0::askfirst:/bin/ash --login #tts/1::askfirst:/bin/ash --login diff --git a/openwrt/package/base-files/x86-2.4/etc/config/network b/openwrt/package/base-files/x86-2.4/etc/config/network index fd0f557c049..7bcfd0870a0 100644 --- a/openwrt/package/base-files/x86-2.4/etc/config/network +++ b/openwrt/package/base-files/x86-2.4/etc/config/network @@ -1,4 +1,5 @@ # Network configuration file +# Copyright (C) 2006 OpenWrt.org ## LAN configuration lan_ifname="br0" diff --git a/openwrt/package/base-files/x86-2.6/etc/config/network b/openwrt/package/base-files/x86-2.6/etc/config/network index fd0f557c049..7bcfd0870a0 100644 --- a/openwrt/package/base-files/x86-2.6/etc/config/network +++ b/openwrt/package/base-files/x86-2.6/etc/config/network @@ -1,4 +1,5 @@ # Network configuration file +# Copyright (C) 2006 OpenWrt.org ## LAN configuration lan_ifname="br0" diff --git a/openwrt/package/base-files/xscale-2.6/etc/config/network b/openwrt/package/base-files/xscale-2.6/etc/config/network index f60332cd8cf..2bb48b88639 100644 --- a/openwrt/package/base-files/xscale-2.6/etc/config/network +++ b/openwrt/package/base-files/xscale-2.6/etc/config/network @@ -1,4 +1,5 @@ # Network configuration file +# Copyright (C) 2006 OpenWrt.org ## LAN configuration lan_ifname="eth0" From d62e8a94859aba609ba944e6a5d33e14780177dc Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 27 Jun 2006 00:35:46 +0000 Subject: [PATCH 308/757] credit where credit is due SVN-Revision: 4091 --- openwrt/Makefile | 16 +++------------- openwrt/include/host-build.mk | 6 ++++++ openwrt/include/image.mk | 6 ++++++ openwrt/include/kernel-build.mk | 6 ++++++ openwrt/include/kernel.mk | 6 ++++++ openwrt/include/modules-2.4.mk | 6 ++++++ openwrt/include/modules-2.6.mk | 6 ++++++ openwrt/include/modules.mk | 6 ++++++ openwrt/include/netfilter.mk | 6 ++++++ openwrt/include/package.mk | 6 ++++++ openwrt/include/target.mk | 6 ++++++ openwrt/include/verbose.mk | 7 ++++++- openwrt/package/alsa/Makefile | 6 ++++++ openwrt/package/base-files/Makefile | 6 ++++++ openwrt/package/bridge/Makefile | 6 ++++++ openwrt/package/broadcom-wl/Makefile | 6 ++++++ openwrt/package/busybox/Makefile | 6 ++++++ openwrt/package/diag/Makefile | 6 ++++++ openwrt/package/dnsmasq/Makefile | 6 ++++++ openwrt/package/dropbear/Makefile | 6 ++++++ openwrt/package/ebtables/Makefile | 6 ++++++ openwrt/package/fuse/Makefile | 6 ++++++ openwrt/package/haserl/Makefile | 6 ++++++ openwrt/package/hostap/Makefile | 6 ++++++ openwrt/package/hostapd/Makefile | 6 ++++++ openwrt/package/iproute2/Makefile | 6 ++++++ openwrt/package/ipsec-tools/Makefile | 6 ++++++ openwrt/package/ipset/Makefile | 6 ++++++ openwrt/package/iptables/Makefile | 6 ++++++ openwrt/package/libpcap/Makefile | 6 ++++++ openwrt/package/linux-atm/Makefile | 6 ++++++ openwrt/package/madwifi/Makefile | 6 ++++++ openwrt/package/mini_fo/Makefile | 6 ++++++ openwrt/package/mtd/Makefile | 6 ++++++ openwrt/package/nvram/Makefile | 6 ++++++ openwrt/package/openssl/Makefile | 6 ++++++ openwrt/package/openswan/Makefile | 6 ++++++ openwrt/package/pcmcia-cs/Makefile | 6 ++++++ openwrt/package/ppp/Makefile | 6 ++++++ openwrt/package/pptp/Makefile | 6 ++++++ openwrt/package/robocfg/Makefile | 6 ++++++ openwrt/package/shfs/Makefile | 6 ++++++ openwrt/package/spca5xx/Makefile | 6 ++++++ openwrt/package/switch/Makefile | 8 +++++++- openwrt/package/udev/Makefile | 6 ++++++ openwrt/package/ueagle-atm/Makefile | 6 ++++++ openwrt/package/util-linux/Makefile | 6 ++++++ openwrt/package/wireless-tools/Makefile | 6 ++++++ openwrt/package/wlcompat/Makefile | 6 ++++++ openwrt/package/zd1211/Makefile | 6 ++++++ openwrt/package/zlib/Makefile | 6 ++++++ openwrt/rules.mk | 7 +++++++ openwrt/scripts/configtest.pl | 7 +++++++ openwrt/scripts/download.pl | 7 +++++++ openwrt/scripts/gen_busybox_config.pl | 7 +++++++ openwrt/scripts/gen_busybox_menuconfig.pl | 7 +++++++ openwrt/scripts/gen_deps.pl | 7 +++++++ openwrt/scripts/gen_menuconfig.pl | 7 +++++++ openwrt/scripts/rstrip.sh | 7 +++++++ openwrt/scripts/timestamp.pl | 7 +++++++ openwrt/target/Makefile | 6 ++++++ openwrt/target/image/ar7/Makefile | 6 ++++++ openwrt/target/image/aruba/Makefile | 6 ++++++ openwrt/target/image/au1000/Makefile | 6 ++++++ openwrt/target/image/brcm/Makefile | 6 ++++++ openwrt/target/image/brcm/lzma-loader/Makefile | 6 ++++++ openwrt/target/image/brcm63xx/Makefile | 6 ++++++ openwrt/target/image/generic/Makefile | 6 ++++++ .../target/image/generic/lzma-loader/Makefile | 6 ++++++ .../image/generic/lzma-loader/src/Makefile | 6 ++++++ openwrt/target/image/rb532/Makefile | 6 ++++++ openwrt/target/image/x86/Makefile | 6 ++++++ openwrt/target/image/xscale/Makefile | 6 ++++++ openwrt/target/linux/Makefile | 6 ++++++ openwrt/target/linux/ar531x-2.4/Makefile | 6 ++++++ openwrt/target/linux/ar7-2.4/Makefile | 6 ++++++ openwrt/target/linux/aruba-2.6/Makefile | 6 ++++++ openwrt/target/linux/au1000-2.6/Makefile | 6 ++++++ openwrt/target/linux/brcm-2.4/Makefile | 6 ++++++ openwrt/target/linux/brcm-2.6/Makefile | 6 ++++++ openwrt/target/linux/brcm63xx-2.6/Makefile | 6 ++++++ openwrt/target/linux/imagebuilder/Makefile | 6 ++++++ openwrt/target/linux/package/Makefile | 6 ++++++ openwrt/target/linux/rb532-2.6/Makefile | 6 ++++++ openwrt/target/linux/sibyte-2.6/Makefile | 6 ++++++ openwrt/target/linux/x86-2.4/Makefile | 6 ++++++ openwrt/target/linux/x86-2.6/Makefile | 6 ++++++ openwrt/target/linux/xscale-2.6/Makefile | 6 ++++++ openwrt/target/sdk/Makefile | 6 ++++++ openwrt/target/utils/Makefile | 6 ++++++ 90 files changed, 547 insertions(+), 15 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index f5d49fed270..5c218f155f7 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -1,20 +1,10 @@ # Makefile for OpenWrt # +# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 by Felix Fietkau <openwrt@nbd.name> # -# 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 +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # RELEASE:=Kamikaze diff --git a/openwrt/include/host-build.mk b/openwrt/include/host-build.mk index 0d103e2a02b..43c83142dfe 100644 --- a/openwrt/include/host-build.mk +++ b/openwrt/include/host-build.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# ifneq ($(strip $(PKG_CAT)),) ifeq ($(PKG_CAT),unzip) UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk index ca0d688f170..95accd6e1d1 100644 --- a/openwrt/include/image.mk +++ b/openwrt/include/image.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) ifneq ($(CONFIG_BIG_ENDIAN),y) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 3a455a812ec..6fae4acc535 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# -include $(INCLUDE_DIR)/modules-$(KERNEL).mk LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index b40f65f480d..2c5d0937789 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# ifeq ($(DUMP),1) KERNEL:=<KERNEL> BOARD:=<BOARD> diff --git a/openwrt/include/modules-2.4.mk b/openwrt/include/modules-2.4.mk index 325cf16bccb..f8d966f4013 100644 --- a/openwrt/include/modules-2.4.mk +++ b/openwrt/include/modules-2.4.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(INCLUDE_DIR)/netfilter.mk # Networking diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index 6e8a2ded70f..c98e4ea8a49 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# NF_2_6:=1 include $(INCLUDE_DIR)/netfilter.mk diff --git a/openwrt/include/modules.mk b/openwrt/include/modules.mk index 026c4a61031..d20fd41bb08 100644 --- a/openwrt/include/modules.mk +++ b/openwrt/include/modules.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/include/kernel.mk define KernelPackage/ide-core diff --git a/openwrt/include/netfilter.mk b/openwrt/include/netfilter.mk index 66cb747deaa..236d4b2429f 100644 --- a/openwrt/include/netfilter.mk +++ b/openwrt/include/netfilter.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: netfilter.mk 2411 2005-11-11 03:41:43Z nico $ ifeq ($(NF_2_6),1) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 0996574d26d..bf2376dcd02 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# ifneq ($(DUMP),) all: dumpinfo else diff --git a/openwrt/include/target.mk b/openwrt/include/target.mk index afdf5d8ae69..5a87ab84d79 100644 --- a/openwrt/include/target.mk +++ b/openwrt/include/target.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# define kernel_template ifeq ($(CONFIG_LINUX_$(3)),y) KERNEL:=$(1) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 6d7c7ef6c16..98dfd5632b6 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -1,4 +1,9 @@ -# OpenWrt.org 2006 +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id:$ ifndef KBUILD_VERBOSE diff --git a/openwrt/package/alsa/Makefile b/openwrt/package/alsa/Makefile index 7046bfee927..9a745aa96bc 100644 --- a/openwrt/package/alsa/Makefile +++ b/openwrt/package/alsa/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index f81c681c264..b0fd72c7671 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/bridge/Makefile b/openwrt/package/bridge/Makefile index c3e682cc7f8..e5e7c63f661 100644 --- a/openwrt/package/bridge/Makefile +++ b/openwrt/package/bridge/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 23ea6744170..fc3f035b6ed 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index b4441291757..31ec1035174 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/diag/Makefile b/openwrt/package/diag/Makefile index de6ab8d64f0..8edc4093d47 100644 --- a/openwrt/package/diag/Makefile +++ b/openwrt/package/diag/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index 09770dac28e..8d76f378e79 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index b76d3dacf27..f5e9b154d1f 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/ebtables/Makefile b/openwrt/package/ebtables/Makefile index 87f93defe7a..7609fc7d46d 100644 --- a/openwrt/package/ebtables/Makefile +++ b/openwrt/package/ebtables/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile index 06777c8528a..c9eef883446 100644 --- a/openwrt/package/fuse/Makefile +++ b/openwrt/package/fuse/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/haserl/Makefile b/openwrt/package/haserl/Makefile index 53a28a77132..c58d04c23e3 100644 --- a/openwrt/package/haserl/Makefile +++ b/openwrt/package/haserl/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/hostap/Makefile b/openwrt/package/hostap/Makefile index 612b2b72e06..64b3e40257c 100644 --- a/openwrt/package/hostap/Makefile +++ b/openwrt/package/hostap/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile index 7fc77f81a3d..352d597669a 100644 --- a/openwrt/package/hostapd/Makefile +++ b/openwrt/package/hostapd/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index bbbcc758c3a..d21a92c66b6 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 1a5ae5b4fd9..5d2b3914110 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index 0991148566c..d3ea1318ed7 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ # include $(TOPDIR)/rules.mk diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index f8f590991af..7fdc28422d7 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile index 0ded09a9086..76c88af9c43 100644 --- a/openwrt/package/libpcap/Makefile +++ b/openwrt/package/libpcap/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/linux-atm/Makefile b/openwrt/package/linux-atm/Makefile index 48a94ed046a..0b8c59d4e15 100644 --- a/openwrt/package/linux-atm/Makefile +++ b/openwrt/package/linux-atm/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index 57210c0dd06..07e2c453996 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/mini_fo/Makefile b/openwrt/package/mini_fo/Makefile index 2922908631d..6cba9db170e 100644 --- a/openwrt/package/mini_fo/Makefile +++ b/openwrt/package/mini_fo/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index 80409a90822..50a75a555f0 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/nvram/Makefile b/openwrt/package/nvram/Makefile index 11e89363fc4..b7040deec8b 100644 --- a/openwrt/package/nvram/Makefile +++ b/openwrt/package/nvram/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile index 78e17a2195f..23207714beb 100644 --- a/openwrt/package/openssl/Makefile +++ b/openwrt/package/openssl/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/openswan/Makefile b/openwrt/package/openswan/Makefile index 61aefe457b4..6e518531549 100644 --- a/openwrt/package/openswan/Makefile +++ b/openwrt/package/openswan/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/pcmcia-cs/Makefile b/openwrt/package/pcmcia-cs/Makefile index 388b431ef02..11f32a89239 100644 --- a/openwrt/package/pcmcia-cs/Makefile +++ b/openwrt/package/pcmcia-cs/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 813b7227d27..dcacbafba59 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/pptp/Makefile b/openwrt/package/pptp/Makefile index 0478b4c2b88..061e55395eb 100644 --- a/openwrt/package/pptp/Makefile +++ b/openwrt/package/pptp/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/robocfg/Makefile b/openwrt/package/robocfg/Makefile index 8451ac5a951..e43198de93b 100644 --- a/openwrt/package/robocfg/Makefile +++ b/openwrt/package/robocfg/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/shfs/Makefile b/openwrt/package/shfs/Makefile index 56176930154..3f958ad7319 100644 --- a/openwrt/package/shfs/Makefile +++ b/openwrt/package/shfs/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/spca5xx/Makefile b/openwrt/package/spca5xx/Makefile index 001a64f76d7..b4025d7629f 100644 --- a/openwrt/package/spca5xx/Makefile +++ b/openwrt/package/spca5xx/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/switch/Makefile b/openwrt/package/switch/Makefile index befae3410e4..5513394fd6a 100644 --- a/openwrt/package/switch/Makefile +++ b/openwrt/package/switch/Makefile @@ -1,4 +1,10 @@ -# $Id$ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id:$ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk diff --git a/openwrt/package/udev/Makefile b/openwrt/package/udev/Makefile index 01561153629..942e8cf8f49 100644 --- a/openwrt/package/udev/Makefile +++ b/openwrt/package/udev/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/ueagle-atm/Makefile b/openwrt/package/ueagle-atm/Makefile index 6d9c739c3c5..6db9b830ecb 100644 --- a/openwrt/package/ueagle-atm/Makefile +++ b/openwrt/package/ueagle-atm/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/util-linux/Makefile b/openwrt/package/util-linux/Makefile index 798e3c85710..79517f9dfb0 100644 --- a/openwrt/package/util-linux/Makefile +++ b/openwrt/package/util-linux/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 3822 2006-05-24 07:01:52Z nico $ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index 5f1205884c5..58844248763 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/wlcompat/Makefile b/openwrt/package/wlcompat/Makefile index e6ec27ee81f..a42cdd20503 100644 --- a/openwrt/package/wlcompat/Makefile +++ b/openwrt/package/wlcompat/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/zd1211/Makefile b/openwrt/package/zd1211/Makefile index ba7308cc017..c25d8067f90 100644 --- a/openwrt/package/zd1211/Makefile +++ b/openwrt/package/zd1211/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 3297 2006-03-02 23:42:52Z florian $ include $(TOPDIR)/rules.mk diff --git a/openwrt/package/zlib/Makefile b/openwrt/package/zlib/Makefile index 6c560624f0d..41be6cc8307 100644 --- a/openwrt/package/zlib/Makefile +++ b/openwrt/package/zlib/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 42aedcfe542..533bdc35c32 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -1,3 +1,10 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + -include $(TOPDIR)/.config include $(TOPDIR)/include/verbose.mk diff --git a/openwrt/scripts/configtest.pl b/openwrt/scripts/configtest.pl index 476bba7dcec..289b2fecc09 100755 --- a/openwrt/scripts/configtest.pl +++ b/openwrt/scripts/configtest.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + my %change = ( '^BUSYBOX' => 'make package/busybox-clean', 'OPENVPN_' => 'make package/openvpn-clean', diff --git a/openwrt/scripts/download.pl b/openwrt/scripts/download.pl index 794d8edeb8b..40b8d212a5f 100755 --- a/openwrt/scripts/download.pl +++ b/openwrt/scripts/download.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; use warnings; diff --git a/openwrt/scripts/gen_busybox_config.pl b/openwrt/scripts/gen_busybox_config.pl index 0c70b4a1163..9360052d293 100755 --- a/openwrt/scripts/gen_busybox_config.pl +++ b/openwrt/scripts/gen_busybox_config.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; my $line; diff --git a/openwrt/scripts/gen_busybox_menuconfig.pl b/openwrt/scripts/gen_busybox_menuconfig.pl index 6ce323bb138..5fe64783eb3 100644 --- a/openwrt/scripts/gen_busybox_menuconfig.pl +++ b/openwrt/scripts/gen_busybox_menuconfig.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; my $PATH = $ARGV[0]; ($PATH and -d $PATH) or die 'invalid path'; diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index 04998715d41..0cdcc97a147 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; my $name; diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index c1510b0d584..e62363e6303 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; my $src; diff --git a/openwrt/scripts/rstrip.sh b/openwrt/scripts/rstrip.sh index 619af00d535..e63ccf0895c 100755 --- a/openwrt/scripts/rstrip.sh +++ b/openwrt/scripts/rstrip.sh @@ -1,4 +1,11 @@ #!/bin/sh +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + SELF=${0##*/} diff --git a/openwrt/scripts/timestamp.pl b/openwrt/scripts/timestamp.pl index dc47e24aae4..093ced9935b 100755 --- a/openwrt/scripts/timestamp.pl +++ b/openwrt/scripts/timestamp.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; sub get_ts($$) { diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 836469d171b..2c186119312 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk diff --git a/openwrt/target/image/ar7/Makefile b/openwrt/target/image/ar7/Makefile index 5ee6b0dc103..f56ceffb670 100644 --- a/openwrt/target/image/ar7/Makefile +++ b/openwrt/target/image/ar7/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/image/aruba/Makefile b/openwrt/target/image/aruba/Makefile index ad13ffd5417..1d2aebfb182 100644 --- a/openwrt/target/image/aruba/Makefile +++ b/openwrt/target/image/aruba/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/image/au1000/Makefile b/openwrt/target/image/au1000/Makefile index 3aaf665ca9b..0d25f844974 100644 --- a/openwrt/target/image/au1000/Makefile +++ b/openwrt/target/image/au1000/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/image/brcm/Makefile b/openwrt/target/image/brcm/Makefile index 30bad50f20d..853902627c4 100644 --- a/openwrt/target/image/brcm/Makefile +++ b/openwrt/target/image/brcm/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/image/brcm/lzma-loader/Makefile b/openwrt/target/image/brcm/lzma-loader/Makefile index 3fa00fa4d94..2f9117bcac5 100644 --- a/openwrt/target/image/brcm/lzma-loader/Makefile +++ b/openwrt/target/image/brcm/lzma-loader/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/target/image/brcm63xx/Makefile b/openwrt/target/image/brcm63xx/Makefile index 19799e88af1..6aa72c2920c 100644 --- a/openwrt/target/image/brcm63xx/Makefile +++ b/openwrt/target/image/brcm63xx/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/image/generic/Makefile b/openwrt/target/image/generic/Makefile index 3cb3b2e0b67..64b294d76ed 100644 --- a/openwrt/target/image/generic/Makefile +++ b/openwrt/target/image/generic/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/image/generic/lzma-loader/Makefile b/openwrt/target/image/generic/lzma-loader/Makefile index 3de04a81a8d..29f9f3b0589 100644 --- a/openwrt/target/image/generic/lzma-loader/Makefile +++ b/openwrt/target/image/generic/lzma-loader/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 1823 2005-09-01 20:07:42Z nbd $ include $(TOPDIR)/rules.mk diff --git a/openwrt/target/image/generic/lzma-loader/src/Makefile b/openwrt/target/image/generic/lzma-loader/src/Makefile index 54356889f53..d4a100df4ba 100644 --- a/openwrt/target/image/generic/lzma-loader/src/Makefile +++ b/openwrt/target/image/generic/lzma-loader/src/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# LOADADDR = 0x80400000 # RAM start + 4M KERNEL_ENTRY = 0x80001000 RAMSIZE = 0x00100000 # 1MB diff --git a/openwrt/target/image/rb532/Makefile b/openwrt/target/image/rb532/Makefile index bba89522ac8..2a61a484dcd 100644 --- a/openwrt/target/image/rb532/Makefile +++ b/openwrt/target/image/rb532/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/image/x86/Makefile b/openwrt/target/image/x86/Makefile index e4b3a9e4460..d9ed2945747 100644 --- a/openwrt/target/image/x86/Makefile +++ b/openwrt/target/image/x86/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/image/xscale/Makefile b/openwrt/target/image/xscale/Makefile index 683c6028f69..52c15a93d00 100644 --- a/openwrt/target/image/xscale/Makefile +++ b/openwrt/target/image/xscale/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index bab26845a15..9afda46c860 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk diff --git a/openwrt/target/linux/ar531x-2.4/Makefile b/openwrt/target/linux/ar531x-2.4/Makefile index b33898754b6..33cb47cf507 100644 --- a/openwrt/target/linux/ar531x-2.4/Makefile +++ b/openwrt/target/linux/ar531x-2.4/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.4.32 diff --git a/openwrt/target/linux/ar7-2.4/Makefile b/openwrt/target/linux/ar7-2.4/Makefile index 02a553a1eea..a766b50457b 100644 --- a/openwrt/target/linux/ar7-2.4/Makefile +++ b/openwrt/target/linux/ar7-2.4/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.4.32 diff --git a/openwrt/target/linux/aruba-2.6/Makefile b/openwrt/target/linux/aruba-2.6/Makefile index 4d7955b1031..7ffd11c668c 100644 --- a/openwrt/target/linux/aruba-2.6/Makefile +++ b/openwrt/target/linux/aruba-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/openwrt/target/linux/au1000-2.6/Makefile b/openwrt/target/linux/au1000-2.6/Makefile index a301fabcfe1..a09c029d22c 100644 --- a/openwrt/target/linux/au1000-2.6/Makefile +++ b/openwrt/target/linux/au1000-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/openwrt/target/linux/brcm-2.4/Makefile b/openwrt/target/linux/brcm-2.4/Makefile index 7945db91715..f0bf67a6499 100644 --- a/openwrt/target/linux/brcm-2.4/Makefile +++ b/openwrt/target/linux/brcm-2.4/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.4.32 diff --git a/openwrt/target/linux/brcm-2.6/Makefile b/openwrt/target/linux/brcm-2.6/Makefile index 35a778fdf25..0437338e8e2 100644 --- a/openwrt/target/linux/brcm-2.6/Makefile +++ b/openwrt/target/linux/brcm-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/openwrt/target/linux/brcm63xx-2.6/Makefile b/openwrt/target/linux/brcm63xx-2.6/Makefile index a48442a69f3..ebbb84425ab 100644 --- a/openwrt/target/linux/brcm63xx-2.6/Makefile +++ b/openwrt/target/linux/brcm63xx-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.8.1 diff --git a/openwrt/target/linux/imagebuilder/Makefile b/openwrt/target/linux/imagebuilder/Makefile index 53e8dfc58ba..2c1ab1712e9 100644 --- a/openwrt/target/linux/imagebuilder/Makefile +++ b/openwrt/target/linux/imagebuilder/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# default: clean all TOPDIR:=${shell pwd} diff --git a/openwrt/target/linux/package/Makefile b/openwrt/target/linux/package/Makefile index a8f01ff5eff..d6ce8623ea8 100644 --- a/openwrt/target/linux/package/Makefile +++ b/openwrt/target/linux/package/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # Main makefile for the packages include $(TOPDIR)/rules.mk include ../rules.mk diff --git a/openwrt/target/linux/rb532-2.6/Makefile b/openwrt/target/linux/rb532-2.6/Makefile index 11e34e7910b..30fa1a85a12 100644 --- a/openwrt/target/linux/rb532-2.6/Makefile +++ b/openwrt/target/linux/rb532-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/openwrt/target/linux/sibyte-2.6/Makefile b/openwrt/target/linux/sibyte-2.6/Makefile index 11e34e7910b..30fa1a85a12 100644 --- a/openwrt/target/linux/sibyte-2.6/Makefile +++ b/openwrt/target/linux/sibyte-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/openwrt/target/linux/x86-2.4/Makefile b/openwrt/target/linux/x86-2.4/Makefile index 8a690afd012..12039454e53 100644 --- a/openwrt/target/linux/x86-2.4/Makefile +++ b/openwrt/target/linux/x86-2.4/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.4.32 diff --git a/openwrt/target/linux/x86-2.6/Makefile b/openwrt/target/linux/x86-2.6/Makefile index 04b13a3908c..6aa10005a4e 100644 --- a/openwrt/target/linux/x86-2.6/Makefile +++ b/openwrt/target/linux/x86-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/openwrt/target/linux/xscale-2.6/Makefile b/openwrt/target/linux/xscale-2.6/Makefile index bd17ba76456..59f02b33404 100644 --- a/openwrt/target/linux/xscale-2.6/Makefile +++ b/openwrt/target/linux/xscale-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/openwrt/target/sdk/Makefile b/openwrt/target/sdk/Makefile index 01438a6e0d7..25d2acc57cf 100644 --- a/openwrt/target/sdk/Makefile +++ b/openwrt/target/sdk/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/openwrt/target/utils/Makefile b/openwrt/target/utils/Makefile index bcd1e653e42..855f55267ac 100644 --- a/openwrt/target/utils/Makefile +++ b/openwrt/target/utils/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk TARGETS := addpattern trx motorola-bin dgfirmware From 05e604587a2024cc0e1d0aa030d9f1773903d496 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 27 Jun 2006 00:38:59 +0000 Subject: [PATCH 309/757] add missing copyright SVN-Revision: 4092 --- openwrt/package/broadcom-wl/src/kmod/patchtable.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openwrt/package/broadcom-wl/src/kmod/patchtable.pl b/openwrt/package/broadcom-wl/src/kmod/patchtable.pl index 6144d8b9253..69997351258 100644 --- a/openwrt/package/broadcom-wl/src/kmod/patchtable.pl +++ b/openwrt/package/broadcom-wl/src/kmod/patchtable.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006 Felix Fietkau +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# use strict; my $TABLE = pack("V", 0xbadc0ded); From 7d9a8ed46c2c5526f7b5de121480b2096e5af6cd Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 27 Jun 2006 00:40:19 +0000 Subject: [PATCH 310/757] add missing copyright SVN-Revision: 4093 --- openwrt/package/switch/src/gpio.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openwrt/package/switch/src/gpio.h b/openwrt/package/switch/src/gpio.h index 82576003319..800ae25a9fb 100644 --- a/openwrt/package/switch/src/gpio.h +++ b/openwrt/package/switch/src/gpio.h @@ -1,3 +1,10 @@ +/* + * Copyright (C) 2006 OpenWrt.org + * + * This is free software, licensed under the GNU General Public License v2. + * See /LICENSE for more information. + */ + #ifndef __GPIO_H #define __GPIO_H From 6de1045ad3e27caf858ce107951666cec6c31503 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 27 Jun 2006 00:44:04 +0000 Subject: [PATCH 311/757] add missing copyright SVN-Revision: 4094 --- openwrt/toolchain/Makefile | 7 +++++++ openwrt/toolchain/binutils/Makefile | 6 ++++++ openwrt/toolchain/gdb/Makefile | 6 ++++++ openwrt/toolchain/ipkg-utils/Makefile | 6 ++++++ openwrt/toolchain/jffs2/Makefile | 6 ++++++ openwrt/toolchain/kernel-headers/Makefile | 6 ++++++ openwrt/toolchain/libnotimpl/Makefile | 6 ++++++ openwrt/toolchain/lzma/Makefile | 6 ++++++ openwrt/toolchain/sed/Makefile | 6 ++++++ openwrt/toolchain/squashfs/Makefile | 6 ++++++ openwrt/toolchain/sstrip/Makefile | 6 ++++++ openwrt/toolchain/uClibc/Makefile | 6 ++++++ openwrt/toolchain/uClibc/config/i386 | 7 +++++++ openwrt/toolchain/uClibc/config/mips | 7 +++++++ openwrt/toolchain/uClibc/config/mipsel | 7 +++++++ openwrt/toolchain/uClibc/config/powerpc | 7 +++++++ 16 files changed, 101 insertions(+) diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index 6481ed0d101..043a119b151 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -1,4 +1,11 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # Main makefile for the toolchain +# include $(TOPDIR)/rules.mk TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma TARGETS-$(CONFIG_GDB) += gdb diff --git a/openwrt/toolchain/binutils/Makefile b/openwrt/toolchain/binutils/Makefile index 6d4f96f9143..a5b905eb52d 100644 --- a/openwrt/toolchain/binutils/Makefile +++ b/openwrt/toolchain/binutils/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME:=binutils diff --git a/openwrt/toolchain/gdb/Makefile b/openwrt/toolchain/gdb/Makefile index 538ef512072..f5c0bf37253 100644 --- a/openwrt/toolchain/gdb/Makefile +++ b/openwrt/toolchain/gdb/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME:=gdb diff --git a/openwrt/toolchain/ipkg-utils/Makefile b/openwrt/toolchain/ipkg-utils/Makefile index 5d324f728aa..4520af176e6 100644 --- a/openwrt/toolchain/ipkg-utils/Makefile +++ b/openwrt/toolchain/ipkg-utils/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME := ipkg-utils diff --git a/openwrt/toolchain/jffs2/Makefile b/openwrt/toolchain/jffs2/Makefile index 02364020a4a..93e2589c202 100644 --- a/openwrt/toolchain/jffs2/Makefile +++ b/openwrt/toolchain/jffs2/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME:=mtd diff --git a/openwrt/toolchain/kernel-headers/Makefile b/openwrt/toolchain/kernel-headers/Makefile index 9d2f32e8633..7e08508b636 100644 --- a/openwrt/toolchain/kernel-headers/Makefile +++ b/openwrt/toolchain/kernel-headers/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME=kernel-headers diff --git a/openwrt/toolchain/libnotimpl/Makefile b/openwrt/toolchain/libnotimpl/Makefile index aae7aef34a3..bc515ca0800 100644 --- a/openwrt/toolchain/libnotimpl/Makefile +++ b/openwrt/toolchain/libnotimpl/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME := libnotimpl diff --git a/openwrt/toolchain/lzma/Makefile b/openwrt/toolchain/lzma/Makefile index 6488a062803..ab8fea0e6a8 100644 --- a/openwrt/toolchain/lzma/Makefile +++ b/openwrt/toolchain/lzma/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME := lzma diff --git a/openwrt/toolchain/sed/Makefile b/openwrt/toolchain/sed/Makefile index 0832ede2804..fdeeeea2ab2 100644 --- a/openwrt/toolchain/sed/Makefile +++ b/openwrt/toolchain/sed/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME := sed diff --git a/openwrt/toolchain/squashfs/Makefile b/openwrt/toolchain/squashfs/Makefile index 7b3eed5d609..ac5edd99671 100644 --- a/openwrt/toolchain/squashfs/Makefile +++ b/openwrt/toolchain/squashfs/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME := squashfs diff --git a/openwrt/toolchain/sstrip/Makefile b/openwrt/toolchain/sstrip/Makefile index aa18e21c5fe..49983e9129f 100644 --- a/openwrt/toolchain/sstrip/Makefile +++ b/openwrt/toolchain/sstrip/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/host-build.mk diff --git a/openwrt/toolchain/uClibc/Makefile b/openwrt/toolchain/uClibc/Makefile index 1499573cedc..bb52ee300f8 100644 --- a/openwrt/toolchain/uClibc/Makefile +++ b/openwrt/toolchain/uClibc/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk diff --git a/openwrt/toolchain/uClibc/config/i386 b/openwrt/toolchain/uClibc/config/i386 index b1a9ec3a1c4..e787c580d45 100644 --- a/openwrt/toolchain/uClibc/config/i386 +++ b/openwrt/toolchain/uClibc/config/i386 @@ -1,3 +1,10 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + # # Automatically generated make config: don't edit # diff --git a/openwrt/toolchain/uClibc/config/mips b/openwrt/toolchain/uClibc/config/mips index 06c3d829b6a..3f1f3a7f6a6 100644 --- a/openwrt/toolchain/uClibc/config/mips +++ b/openwrt/toolchain/uClibc/config/mips @@ -1,3 +1,10 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + # # Automatically generated make config: don't edit # diff --git a/openwrt/toolchain/uClibc/config/mipsel b/openwrt/toolchain/uClibc/config/mipsel index 8a7db1a3dcd..acdb2aa2733 100644 --- a/openwrt/toolchain/uClibc/config/mipsel +++ b/openwrt/toolchain/uClibc/config/mipsel @@ -1,3 +1,10 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + # # Automatically generated make config: don't edit # diff --git a/openwrt/toolchain/uClibc/config/powerpc b/openwrt/toolchain/uClibc/config/powerpc index 457c7d5e539..de1ffaab153 100644 --- a/openwrt/toolchain/uClibc/config/powerpc +++ b/openwrt/toolchain/uClibc/config/powerpc @@ -1,4 +1,11 @@ +# +# Copyright (C) 2006 OpenWrt.org # +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# + # Automatically generated make config: don't edit # # TARGET_alpha is not set From db2eecc69a83fbe46d2519851b2230e4f65312c2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 27 Jun 2006 00:51:59 +0000 Subject: [PATCH 312/757] add copyright headers to busybox patches SVN-Revision: 4095 --- .../package/busybox/patches/190-ash_performance.patch | 3 +++ openwrt/package/busybox/patches/210-passwd_limit.patch | 3 +++ openwrt/package/busybox/patches/220-awk_bitops.patch | 3 +++ openwrt/package/busybox/patches/300-netmsg.patch | 10 +++++++++- .../package/busybox/patches/310-passwd_access.patch | 3 +++ .../busybox/patches/320-httpd_address_binding.patch | 3 +++ openwrt/package/busybox/patches/340-lock_util.patch | 10 +++++++++- 7 files changed, 33 insertions(+), 2 deletions(-) diff --git a/openwrt/package/busybox/patches/190-ash_performance.patch b/openwrt/package/busybox/patches/190-ash_performance.patch index 2231fd786ae..09319314194 100644 --- a/openwrt/package/busybox/patches/190-ash_performance.patch +++ b/openwrt/package/busybox/patches/190-ash_performance.patch @@ -1,3 +1,6 @@ + + Copyright (C) 2006 OpenWrt.org + diff -urN busybox.old/shell/ash.c busybox.dev/shell/ash.c --- busybox.old/shell/ash.c 2005-11-12 22:39:19.853826250 +0100 +++ busybox.dev/shell/ash.c 2005-11-12 22:39:42.771258500 +0100 diff --git a/openwrt/package/busybox/patches/210-passwd_limit.patch b/openwrt/package/busybox/patches/210-passwd_limit.patch index 50c7ed8cb1f..6c10916b4ac 100644 --- a/openwrt/package/busybox/patches/210-passwd_limit.patch +++ b/openwrt/package/busybox/patches/210-passwd_limit.patch @@ -1,3 +1,6 @@ + + Copyright (C) 2006 OpenWrt.org + diff -urN busybox.old/loginutils/passwd.c busybox.dev/loginutils/passwd.c --- busybox.old/loginutils/passwd.c 2005-12-11 22:52:46.185150000 +0100 +++ busybox.dev/loginutils/passwd.c 2005-12-11 23:19:15.276596500 +0100 diff --git a/openwrt/package/busybox/patches/220-awk_bitops.patch b/openwrt/package/busybox/patches/220-awk_bitops.patch index 2b85729135e..1567583d2a7 100644 --- a/openwrt/package/busybox/patches/220-awk_bitops.patch +++ b/openwrt/package/busybox/patches/220-awk_bitops.patch @@ -1,3 +1,6 @@ + + Copyright (C) 2006 OpenWrt.org + --- busybox-1.00/editors/awk.c.orig 2004-09-24 05:24:27 -04:00 +++ busybox-1.00/editors/awk.c 2006-03-08 02:16:52 -05:00 @@ -271,7 +271,8 @@ diff --git a/openwrt/package/busybox/patches/300-netmsg.patch b/openwrt/package/busybox/patches/300-netmsg.patch index ef6c0f45074..ad4fcd04d06 100644 --- a/openwrt/package/busybox/patches/300-netmsg.patch +++ b/openwrt/package/busybox/patches/300-netmsg.patch @@ -1,3 +1,6 @@ + + Copyright (C) 2006 OpenWrt.org + diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h --- busybox-1.1.1/include/applets.h 2006-04-01 18:26:21.000000000 +0200 +++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:36:28.000000000 +0200 @@ -39,7 +42,12 @@ diff -Nur busybox-1.1.1/networking/Makefile.in busybox-1.1.1-owrt/networking/Mak diff -Nur busybox-1.1.1/networking/netmsg.c busybox-1.1.1-owrt/networking/netmsg.c --- busybox-1.1.1/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 +++ busybox-1.1.1-owrt/networking/netmsg.c 2006-04-01 18:35:32.000000000 +0200 -@@ -0,0 +1,58 @@ +@@ -0,0 +1,63 @@ ++/* ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> ++ * ++ * This is free software, licensed under the GNU General Public License v2. ++ */ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> diff --git a/openwrt/package/busybox/patches/310-passwd_access.patch b/openwrt/package/busybox/patches/310-passwd_access.patch index 03cfe8b8507..3a09d2a0a6d 100644 --- a/openwrt/package/busybox/patches/310-passwd_access.patch +++ b/openwrt/package/busybox/patches/310-passwd_access.patch @@ -1,3 +1,6 @@ + + Copyright (C) 2006 OpenWrt.org + diff -urN busybox.old/networking/httpd.c busybox.dev/networking/httpd.c --- busybox.old/networking/httpd.c 2004-10-08 10:03:29.000000000 +0200 +++ busybox.dev/networking/httpd.c 2006-02-04 01:54:19.688016250 +0100 diff --git a/openwrt/package/busybox/patches/320-httpd_address_binding.patch b/openwrt/package/busybox/patches/320-httpd_address_binding.patch index 288900b91f6..b9503aa02a2 100644 --- a/openwrt/package/busybox/patches/320-httpd_address_binding.patch +++ b/openwrt/package/busybox/patches/320-httpd_address_binding.patch @@ -1,3 +1,6 @@ + + Copyright (C) 2006 OpenWrt.org + --- busybox-1.1.1/networking/httpd.c 2006-03-22 22:16:19.000000000 +0100 +++ busybox-1.1.1.new/networking/httpd.c 2006-04-01 19:41:42.150744624 +0200 @@ -110,6 +110,7 @@ diff --git a/openwrt/package/busybox/patches/340-lock_util.patch b/openwrt/package/busybox/patches/340-lock_util.patch index bb1cf49a776..ad594e68db5 100644 --- a/openwrt/package/busybox/patches/340-lock_util.patch +++ b/openwrt/package/busybox/patches/340-lock_util.patch @@ -1,3 +1,6 @@ + + Copyright (C) 2006 OpenWrt.org + diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h --- busybox.old/include/applets.h 2006-04-05 01:06:29.000000000 +0200 +++ busybox.dev/include/applets.h 2006-04-05 01:19:09.000000000 +0200 @@ -39,7 +42,12 @@ diff -urN busybox.old/miscutils/Makefile.in busybox.dev/miscutils/Makefile.in diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c --- busybox.old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 +++ busybox.dev/miscutils/lock.c 2006-04-05 01:07:12.000000000 +0200 -@@ -0,0 +1,128 @@ +@@ -0,0 +1,133 @@ ++/* ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> ++ * ++ * This is free software, licensed under the GNU General Public License v2. ++ */ +#include <sys/types.h> +#include <sys/file.h> +#include <sys/stat.h> From 99b2a9aebe53ccf381dc81a8e4922401c0853bad Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 27 Jun 2006 23:52:30 +0000 Subject: [PATCH 313/757] minor changes SVN-Revision: 4096 --- openwrt/include/verbose.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 98dfd5632b6..c998b3d1c99 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -27,7 +27,7 @@ ifneq ($(KBUILD_VERBOSE),99) ifeq ($(KBUILD_VERBOSE),0) MAKE:=&>/dev/null $(MAKE) endif - MAKE:=3>&1 4>&2 $(MAKE) + MAKE:=cmd() { $(MAKE) $$* || { echo "Build failed. Please re-run make with V=99 to see what's going on"; /bin/false; } } 3>&1 4>&2; cmd endif .SILENT: $(MAKECMDGOALS) From 74b7b29d17a8fcbc2147bd4a32f45a955488a083 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 27 Jun 2006 23:53:48 +0000 Subject: [PATCH 314/757] add missing copyright notices SVN-Revision: 4097 --- openwrt/package/iptables/files/firewall.awk | 2 ++ openwrt/package/iptables/files/firewall.config | 2 ++ openwrt/package/iptables/files/firewall.init | 1 + openwrt/package/iptables/files/firewall.user | 2 ++ 4 files changed, 7 insertions(+) diff --git a/openwrt/package/iptables/files/firewall.awk b/openwrt/package/iptables/files/firewall.awk index 1a201a0bce5..53783300453 100644 --- a/openwrt/package/iptables/files/firewall.awk +++ b/openwrt/package/iptables/files/firewall.awk @@ -1,3 +1,5 @@ +# Copyright (C) 2006 OpenWrt.org + BEGIN { print ". /etc/config/network" print "proto=\"$wan_proto\"" diff --git a/openwrt/package/iptables/files/firewall.config b/openwrt/package/iptables/files/firewall.config index 7edd4ba4e44..1b92954c936 100644 --- a/openwrt/package/iptables/files/firewall.config +++ b/openwrt/package/iptables/files/firewall.config @@ -1,3 +1,5 @@ +# Copyright (C) 2006 OpenWrt.org + # RULE SYNTAX: # # forward:<match>:<target>[:<port>] diff --git a/openwrt/package/iptables/files/firewall.init b/openwrt/package/iptables/files/firewall.init index 3804d044f89..e174d84bb23 100755 --- a/openwrt/package/iptables/files/firewall.init +++ b/openwrt/package/iptables/files/firewall.init @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org ## Please make changes in /etc/firewall.user diff --git a/openwrt/package/iptables/files/firewall.user b/openwrt/package/iptables/files/firewall.user index f13f50bf663..1fb862e9b00 100755 --- a/openwrt/package/iptables/files/firewall.user +++ b/openwrt/package/iptables/files/firewall.user @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + . /etc/config/network WAN="$wan_ifname" From 276ad1e336372fa52cdd75f6b83d912e7df03c98 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 28 Jun 2006 17:30:39 +0000 Subject: [PATCH 315/757] add workaround for kernel module install SVN-Revision: 4098 --- openwrt/include/kernel-build.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 6fae4acc535..55a74701c7b 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -105,7 +105,9 @@ $(TOPDIR)/.kernel.mk: echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ pkg-install: FORCE - @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; } + @for pkg in $(INSTALL_TARGETS); do \ + $(IPKG) install $$pkg || echo; \ + done source: $(DL_DIR)/$(LINUX_SOURCE) prepare: $(LINUX_DIR)/.configured From dfd4752eae92d54fc54a4ccb5be9bc735d7ef2af Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Wed, 28 Jun 2006 17:52:04 +0000 Subject: [PATCH 316/757] add binutils 2.17 and remove the beta versions, update some gcc 4.1.1 patches SVN-Revision: 4099 --- openwrt/toolchain/binutils/Config.in | 22 +- openwrt/toolchain/binutils/Makefile | 13 +- .../patches/2.15.94.0.2/100-uclibc-conf.patch | 749 ------------------ .../300-001_ld_makefile_patch.patch | 52 -- ...00-120_mips_xgot_multigot_workaround.patch | 39 - .../702-binutils-skip-comments.patch | 101 --- .../patches/2.16.90.0.3/100-uclibc-conf.patch | 240 ------ .../300-001_ld_makefile_patch.patch | 52 -- .../300-006_better_file_error.patch | 43 - .../300-012_check_ldrunpath_length.patch | 47 -- .../patches/2.16.91.0.1/100-uclibc-conf.patch | 240 ------ .../300-006_better_file_error.patch | 43 - .../300-012_check_ldrunpath_length.patch | 47 -- .../702-binutils-skip-comments.patch | 93 --- .../patches/2.16.91.0.2/100-uclibc-conf.patch | 230 ------ .../300-001_ld_makefile_patch.patch | 50 -- .../300-006_better_file_error.patch | 43 - .../300-012_check_ldrunpath_length.patch | 47 -- .../702-binutils-skip-comments.patch | 93 --- .../patches/2.16.91.0.6/100-uclibc-conf.patch | 200 ----- .../300-001_ld_makefile_patch.patch | 50 -- .../300-006_better_file_error.patch | 43 - .../300-012_check_ldrunpath_length.patch | 47 -- .../702-binutils-skip-comments.patch | 93 --- .../patches/2.17/100-uclibc-conf.patch | 139 ++++ .../patches/2.17/110-arm-eabi-conf.patch | 24 + .../300-001_ld_makefile_patch.patch | 0 .../300-006_better_file_error.patch | 0 .../300-012_check_ldrunpath_length.patch | 0 .../702-binutils-skip-comments.patch | 0 .../gcc/patches/4.1.1/200-uclibc-locale.patch | 110 +-- .../gcc/patches/4.1.1/300-libstdc++-pic.patch | 18 +- .../4.1.1/602-sdk-libstdc++-includes.patch | 20 - 33 files changed, 222 insertions(+), 2766 deletions(-) delete mode 100644 openwrt/toolchain/binutils/patches/2.15.94.0.2/100-uclibc-conf.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.15.94.0.2/300-001_ld_makefile_patch.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.15.94.0.2/702-binutils-skip-comments.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.90.0.3/100-uclibc-conf.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.90.0.3/300-001_ld_makefile_patch.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.90.0.3/300-006_better_file_error.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.90.0.3/300-012_check_ldrunpath_length.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.1/100-uclibc-conf.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.1/300-006_better_file_error.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.1/300-012_check_ldrunpath_length.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.1/702-binutils-skip-comments.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.2/100-uclibc-conf.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.2/300-001_ld_makefile_patch.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.2/300-006_better_file_error.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.2/300-012_check_ldrunpath_length.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.2/702-binutils-skip-comments.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.6/100-uclibc-conf.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.6/300-001_ld_makefile_patch.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.6/300-006_better_file_error.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.6/300-012_check_ldrunpath_length.patch delete mode 100644 openwrt/toolchain/binutils/patches/2.16.91.0.6/702-binutils-skip-comments.patch create mode 100644 openwrt/toolchain/binutils/patches/2.17/100-uclibc-conf.patch create mode 100644 openwrt/toolchain/binutils/patches/2.17/110-arm-eabi-conf.patch rename openwrt/toolchain/binutils/patches/{2.16.91.0.1 => 2.17}/300-001_ld_makefile_patch.patch (100%) rename openwrt/toolchain/binutils/patches/{2.15.94.0.2 => 2.17}/300-006_better_file_error.patch (100%) rename openwrt/toolchain/binutils/patches/{2.15.94.0.2 => 2.17}/300-012_check_ldrunpath_length.patch (100%) rename openwrt/toolchain/binutils/patches/{2.16.90.0.3 => 2.17}/702-binutils-skip-comments.patch (100%) delete mode 100644 openwrt/toolchain/gcc/patches/4.1.1/602-sdk-libstdc++-includes.patch diff --git a/openwrt/toolchain/binutils/Config.in b/openwrt/toolchain/binutils/Config.in index 56b29c3ec11..9b4fe07b7d3 100644 --- a/openwrt/toolchain/binutils/Config.in +++ b/openwrt/toolchain/binutils/Config.in @@ -6,35 +6,19 @@ choice help Select the version of binutils you wish to use. - config BINUTILS_VERSION_2_15_94_0_2 - bool "binutils 2.15.94.0.2" - config BINUTILS_VERSION_2_16_1 bool "binutils 2.16.1" - config BINUTILS_VERSION_2_16_90_0_3 - bool "binutils 2.16.90.0.3" - - config BINUTILS_VERSION_2_16_91_0_1 - bool "binutils 2.16.91.0.1" - - config BINUTILS_VERSION_2_16_91_0_2 - bool "binutils 2.16.91.0.2" - - config BINUTILS_VERSION_2_16_91_0_6 - bool "binutils 2.16.91.0.6" + config BINUTILS_VERSION_2_17 + bool "binutils 2.17" endchoice config BINUTILS_VERSION string prompt "Binutils Version" if (TOOLCHAINOPTS && NULL) - default "2.15.94.0.2" if BINUTILS_VERSION_2_15_94_0_2 default "2.16.1" if BINUTILS_VERSION_2_16_1 - default "2.16.90.0.3" if BINUTILS_VERSION_2_16_90_0_3 - default "2.16.91.0.1" if BINUTILS_VERSION_2_16_91_0_1 - default "2.16.91.0.2" if BINUTILS_VERSION_2_16_91_0_2 - default "2.16.91.0.6" if BINUTILS_VERSION_2_16_91_0_6 + default "2.17" if BINUTILS_VERSION_2_17 default "2.16.1" diff --git a/openwrt/toolchain/binutils/Makefile b/openwrt/toolchain/binutils/Makefile index a5b905eb52d..4d7a22a03c8 100644 --- a/openwrt/toolchain/binutils/Makefile +++ b/openwrt/toolchain/binutils/Makefile @@ -9,24 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#")) -STABLE_SITE:=http://ftp.gnu.org/gnu/binutils/ \ +PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \ ftp://gatekeeper.dec.com/pub/GNU/ \ ftp://ftp.uu.net/archive/systems/gnu/ \ ftp://ftp.eu.uu.net/pub/gnu/ \ ftp://ftp.funet.fi/pub/gnu/prep/ \ ftp://ftp.leo.org/pub/comp/os/unix/gnu/ -DEVEL_SITE:=http://www.fr.kernel.org/pub/linux/devel/binutils \ - http://www.fi.kernel.org/pub/linux/devel/binutils \ - http://ftp.kernel.org/pub/linux/devel/binutils \ - http://www.de.kernel.org/pub/linux/devel/binutils - -ifeq ($(BINUTILS_VERSION),2.16.1) -PKG_SOURCE_URL:=$(STABLE_SITE) -else -PKG_SOURCE_URL:=$(DEVEL_SITE) -endif - PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2 PKG_MD5SUM:=unknown PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/openwrt/toolchain/binutils/patches/2.15.94.0.2/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/100-uclibc-conf.patch deleted file mode 100644 index dc21386f425..00000000000 --- a/openwrt/toolchain/binutils/patches/2.15.94.0.2/100-uclibc-conf.patch +++ /dev/null @@ -1,749 +0,0 @@ -diff -ur binutils-2.15.94.0.2.orig/bfd/config.bfd binutils-2.15.94.0.2/bfd/config.bfd ---- binutils-2.15.94.0.2.orig/bfd/config.bfd 2004-12-22 15:00:57.219024360 -0500 -+++ binutils-2.15.94.0.2/bfd/config.bfd 2004-12-22 15:01:18.982715776 -0500 -@@ -140,7 +140,7 @@ - targ_defvec=ecoffalpha_little_vec - targ_selvecs=bfd_elf64_alpha_vec - ;; -- alpha*-*-linux-gnu* | alpha*-*-elf*) -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*) - targ_defvec=bfd_elf64_alpha_vec - targ_selvecs=ecoffalpha_little_vec - ;; -@@ -150,7 +150,7 @@ - alpha*-*-*) - targ_defvec=ecoffalpha_little_vec - ;; -- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu) -+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-linux-uclibc* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu) - targ_defvec=bfd_elf64_ia64_little_vec - targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" - ;; -@@ -227,7 +227,7 @@ - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec - ;; -- armeb-*-elf | arm*b-*-linux-gnu*) -+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*) - targ_defvec=bfd_elf32_bigarm_vec - targ_selvecs=bfd_elf32_littlearm_vec - ;; -@@ -235,8 +235,8 @@ - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec - ;; -- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ -- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ -+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \ -+ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ - arm*-*-eabi* ) - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec -@@ -381,7 +381,7 @@ - ;; - - #ifdef BFD64 -- hppa*64*-*-linux-gnu*) -+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) - targ_defvec=bfd_elf64_hppa_linux_vec - targ_selvecs=bfd_elf64_hppa_vec - ;; -@@ -392,7 +392,7 @@ - ;; - #endif - -- hppa*-*-linux-gnu*) -+ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) - targ_defvec=bfd_elf32_hppa_linux_vec - targ_selvecs=bfd_elf32_hppa_vec - ;; -@@ -525,7 +525,7 @@ - targ_selvecs=bfd_elf32_i386_vec - targ_underscore=yes - ;; -- i[3-7]86-*-linux-gnu*) -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) - targ_defvec=bfd_elf32_i386_vec - targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec" - targ64_selvecs=bfd_elf64_x86_64_vec -@@ -539,7 +539,7 @@ - targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec" - ;; -- x86_64-*-linux-gnu*) -+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) - targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec" - ;; -@@ -715,7 +715,7 @@ - targ_selvecs=bfd_elf32_m68k_vec - targ_underscore=yes - ;; -- m68*-*-linux-gnu*) -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) - targ_defvec=bfd_elf32_m68k_vec - targ_selvecs=m68klinux_vec - ;; -@@ -1001,7 +1001,8 @@ - ;; - #endif - powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ -- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \ -+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \ -+ powerpc-*-rtems* | \ - powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*) - targ_defvec=bfd_elf32_powerpc_vec - targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec" -@@ -1038,8 +1039,8 @@ - targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" - ;; - powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \ -- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\ -- powerpcle-*-rtems*) -+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\ -+ powerpcle-*-vxworks* | powerpcle-*-rtems*) - targ_defvec=bfd_elf32_powerpcle_vec - targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" - targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec" -@@ -1209,7 +1210,7 @@ - targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" - targ_underscore=yes - ;; -- sparc-*-linux-gnu*) -+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*) - targ_defvec=bfd_elf32_sparc_vec - targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec" - ;; -@@ -1256,7 +1257,7 @@ - targ_defvec=sunos_big_vec - targ_underscore=yes - ;; -- sparc64-*-linux-gnu*) -+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) - targ_defvec=bfd_elf64_sparc_vec - targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec" - ;; -@@ -1325,7 +1326,7 @@ - targ_underscore=yes - ;; - -- vax-*-linux-gnu*) -+ vax-*-linux-gnu* | vax-*-linux-uclibc*) - targ_defvec=bfd_elf32_vax_vec - ;; - -diff -ur binutils-2.15.94.0.2.orig/bfd/configure binutils-2.15.94.0.2/bfd/configure ---- binutils-2.15.94.0.2.orig/bfd/configure 2004-12-22 15:00:57.221024056 -0500 -+++ binutils-2.15.94.0.2/bfd/configure 2004-12-22 15:01:18.996713648 -0500 -@@ -3583,6 +3583,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -@@ -9914,7 +9919,7 @@ - alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) - COREFILE='' - ;; -- alpha*-*-linux-gnu*) -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/alphalinux.h"' - ;; -@@ -9978,7 +9983,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386mach3.h"' - ;; -- i[3-7]86-*-linux-gnu*) -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386linux.h"' - ;; -@@ -10016,7 +10021,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/hp300bsd.h"' - ;; -- m68*-*-linux-gnu*) -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/m68klinux.h"' - ;; -@@ -10150,7 +10155,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; -- vax-*-linux-gnu*) -+ vax-*-linux-gnu* | vax-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxlinux.h"' - ;; -diff -ur binutils-2.15.94.0.2.orig/bfd/configure.in binutils-2.15.94.0.2/bfd/configure.in ---- binutils-2.15.94.0.2.orig/bfd/configure.in 2004-12-22 15:00:57.223023752 -0500 -+++ binutils-2.15.94.0.2/bfd/configure.in 2004-12-22 15:01:18.998713344 -0500 -@@ -163,7 +163,7 @@ - alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) - COREFILE='' - ;; -- alpha*-*-linux-gnu*) -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/alphalinux.h"' - ;; -@@ -248,7 +248,7 @@ - TRAD_HEADER='"hosts/i386mach3.h"' - ;; - changequote(,)dnl -- i[3-7]86-*-linux-gnu*) -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) - changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386linux.h"' -@@ -289,7 +289,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/hp300bsd.h"' - ;; -- m68*-*-linux-gnu*) -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/m68klinux.h"' - ;; -@@ -375,7 +375,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; -- vax-*-linux-gnu*) -+ vax-*-linux-gnu* | vax-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxlinux.h"' - ;; -diff -ur binutils-2.15.94.0.2.orig/binutils/configure binutils-2.15.94.0.2/binutils/configure ---- binutils-2.15.94.0.2.orig/binutils/configure 2004-12-22 15:00:57.351004296 -0500 -+++ binutils-2.15.94.0.2/binutils/configure 2004-12-22 15:01:19.002712736 -0500 -@@ -1575,6 +1575,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -ur binutils-2.15.94.0.2.orig/configure binutils-2.15.94.0.2/configure ---- binutils-2.15.94.0.2.orig/configure 2004-12-22 15:00:57.321008856 -0500 -+++ binutils-2.15.94.0.2/configure 2004-12-22 15:01:19.007711976 -0500 -@@ -1352,6 +1352,18 @@ - i[3456789]86-*-coff | i[3456789]86-*-elf) - noconfigdirs="$noconfigdirs ${libgcj}" - ;; -+ i[3456789]86-*-linux-uclibc*) -+ # This section makes it possible to build newlib natively on linux. -+ # If we are using a cross compiler then don't configure newlib. -+ if test x${is_cross_compiler} != xno ; then -+ noconfigdirs="$noconfigdirs target-newlib" -+ fi -+ noconfigdirs="$noconfigdirs target-libgloss" -+ # If we are not using a cross compiler, do configure newlib. -+ # Note however, that newlib will only be configured in this situation -+ # if the --with-newlib option has been given, because otherwise -+ # 'target-newlib' will appear in skipdirs. -+ ;; - i[3456789]86-*-linux*) - # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's - # not build java stuff by default. -diff -ur binutils-2.15.94.0.2.orig/configure.in binutils-2.15.94.0.2/configure.in ---- binutils-2.15.94.0.2.orig/configure.in 2004-12-22 15:00:57.321008856 -0500 -+++ binutils-2.15.94.0.2/configure.in 2004-12-22 15:01:19.010711520 -0500 -@@ -561,6 +561,18 @@ - i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) - noconfigdirs="$noconfigdirs ${libgcj}" - ;; -+ i[[3456789]]86-*-linux-uclibc*) -+ # This section makes it possible to build newlib natively on linux. -+ # If we are using a cross compiler then don't configure newlib. -+ if test x${is_cross_compiler} != xno ; then -+ noconfigdirs="$noconfigdirs target-newlib" -+ fi -+ noconfigdirs="$noconfigdirs target-libgloss" -+ # If we are not using a cross compiler, do configure newlib. -+ # Note however, that newlib will only be configured in this situation -+ # if the --with-newlib option has been given, because otherwise -+ # 'target-newlib' will appear in skipdirs. -+ ;; - i[[3456789]]86-*-linux*) - # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's - # not build java stuff by default. -diff -ur binutils-2.15.94.0.2.orig/gas/configure binutils-2.15.94.0.2/gas/configure ---- binutils-2.15.94.0.2.orig/gas/configure 2004-12-22 15:00:57.461987424 -0500 -+++ binutils-2.15.94.0.2/gas/configure 2004-12-22 15:01:19.019710152 -0500 -@@ -3420,6 +3420,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -@@ -4256,6 +4261,7 @@ - alpha*-*-osf*) fmt=ecoff ;; - alpha*-*-linuxecoff*) fmt=ecoff ;; - alpha*-*-linux-gnu*) fmt=elf em=linux ;; -+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;; - alpha*-*-netbsd*) fmt=elf em=nbsd ;; - alpha*-*-openbsd*) fmt=elf em=obsd ;; - -@@ -4272,6 +4278,7 @@ - arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnueabi*) fmt=elf em=armlinuxeabi ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; -+ arm*-*-linux-uclibc*) fmt=elf em=linux ;; - arm*-*-uclinux*) fmt=elf em=linux ;; - arm-*-netbsdelf*) fmt=elf em=nbsd ;; - arm-*-*n*bsd*) fmt=aout em=nbsd ;; -@@ -4285,6 +4292,7 @@ - - cris-*-linux-gnu* | crisv32-*-linux-gnu*) - fmt=multi bfd_gas=yes em=linux ;; -+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; - cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;; - - crx-*-elf*) fmt=elf ;; -@@ -4344,7 +4352,9 @@ - i386-*-linux*oldld) fmt=aout em=linux ;; - i386-*-linux*coff*) fmt=coff em=linux ;; - i386-*-linux-gnu*) fmt=elf em=linux ;; -+ i386-*-linux-uclibc*) fmt=elf em=linux ;; - x86_64-*-linux-gnu*) fmt=elf em=linux ;; -+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; - i386-*-sysv[45]*) fmt=elf ;; - i386-*-solaris*) fmt=elf ;; -@@ -4404,6 +4414,7 @@ - ia64-*-elf*) fmt=elf ;; - ia64-*-aix*) fmt=elf em=ia64aix ;; - ia64-*-linux-gnu*) fmt=elf em=linux ;; -+ ia64-*-linux-uclibc*) fmt=elf em=linux ;; - ia64-*-hpux*) fmt=elf em=hpux ;; - ia64-*-netbsd*) fmt=elf em=nbsd ;; - -@@ -4431,6 +4442,7 @@ - m68k-*-hpux*) fmt=hp300 em=hp300 ;; - m68k-*-linux*aout*) fmt=aout em=linux ;; - m68k-*-linux-gnu*) fmt=elf em=linux ;; -+ m68k-*-linux-uclibc*) fmt=elf em=linux ;; - m68k-*-uclinux*) fmt=elf ;; - m68k-*-gnu*) fmt=elf ;; - m68k-*-lynxos*) fmt=coff em=lynx ;; -@@ -4505,6 +4517,7 @@ - ppc-*-beos*) fmt=coff ;; - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; -+ ppc-*-linux-uclibc* | \ - ppc-*-linux-gnu*) fmt=elf em=linux - case "$endian" in - big) ;; -@@ -4532,7 +4545,9 @@ - ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; - - s390x-*-linux-gnu*) fmt=elf em=linux ;; -+ s390x-*-linux-uclibc*) fmt=elf em=linux ;; - s390-*-linux-gnu*) fmt=elf em=linux ;; -+ s390-*-linux-uclibc*) fmt=elf em=linux ;; - s390-*-tpf*) fmt=elf ;; - - sh*-*-linux*) fmt=elf em=linux -@@ -4568,6 +4583,7 @@ - sparc-*-coff) fmt=coff ;; - sparc-*-linux*aout*) fmt=aout em=linux ;; - sparc-*-linux-gnu*) fmt=elf em=linux ;; -+ sparc-*-linux-uclibc*) fmt=elf em=linux ;; - sparc-*-lynxos*) fmt=coff em=lynx ;; - sparc-fujitsu-none) fmt=aout ;; - sparc-*-elf) fmt=elf ;; -diff -ur binutils-2.15.94.0.2.orig/gas/configure.in binutils-2.15.94.0.2/gas/configure.in ---- binutils-2.15.94.0.2.orig/gas/configure.in 2004-12-22 15:00:57.461987424 -0500 -+++ binutils-2.15.94.0.2/gas/configure.in 2004-12-22 15:01:19.022709696 -0500 -@@ -202,6 +202,7 @@ - alpha*-*-osf*) fmt=ecoff ;; - alpha*-*-linuxecoff*) fmt=ecoff ;; - alpha*-*-linux-gnu*) fmt=elf em=linux ;; -+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;; - alpha*-*-netbsd*) fmt=elf em=nbsd ;; - alpha*-*-openbsd*) fmt=elf em=obsd ;; - -@@ -218,6 +219,7 @@ - arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnueabi*) fmt=elf em=armlinuxeabi ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; -+ arm*-*-linux-uclibc*) fmt=elf em=linux ;; - arm*-*-uclinux*) fmt=elf em=linux ;; - arm-*-netbsdelf*) fmt=elf em=nbsd ;; - arm-*-*n*bsd*) fmt=aout em=nbsd ;; -@@ -231,6 +233,7 @@ - - cris-*-linux-gnu* | crisv32-*-linux-gnu*) - fmt=multi bfd_gas=yes em=linux ;; -+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; - cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;; - - crx-*-elf*) fmt=elf ;; -@@ -290,7 +293,9 @@ - i386-*-linux*oldld) fmt=aout em=linux ;; - i386-*-linux*coff*) fmt=coff em=linux ;; - i386-*-linux-gnu*) fmt=elf em=linux ;; -+ i386-*-linux-uclibc*) fmt=elf em=linux ;; - x86_64-*-linux-gnu*) fmt=elf em=linux ;; -+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; - changequote(,)dnl - i386-*-sysv[45]*) fmt=elf ;; -@@ -343,6 +348,7 @@ - ia64-*-elf*) fmt=elf ;; - ia64-*-aix*) fmt=elf em=ia64aix ;; - ia64-*-linux-gnu*) fmt=elf em=linux ;; -+ ia64-*-linux-uclibc*) fmt=elf em=linux ;; - ia64-*-hpux*) fmt=elf em=hpux ;; - ia64-*-netbsd*) fmt=elf em=nbsd ;; - -@@ -370,6 +376,7 @@ - m68k-*-hpux*) fmt=hp300 em=hp300 ;; - m68k-*-linux*aout*) fmt=aout em=linux ;; - m68k-*-linux-gnu*) fmt=elf em=linux ;; -+ m68k-*-linux-uclibc*) fmt=elf em=linux ;; - m68k-*-uclinux*) fmt=elf ;; - m68k-*-gnu*) fmt=elf ;; - m68k-*-lynxos*) fmt=coff em=lynx ;; -@@ -441,6 +448,7 @@ - ppc-*-beos*) fmt=coff ;; - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; -+ ppc-*-linux-uclibc* | \ - ppc-*-linux-gnu*) fmt=elf em=linux - case "$endian" in - big) ;; -@@ -461,7 +469,9 @@ - ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; - - s390x-*-linux-gnu*) fmt=elf em=linux ;; -+ s390x-*-linux-uclibc*) fmt=elf em=linux ;; - s390-*-linux-gnu*) fmt=elf em=linux ;; -+ s390-*-linux-uclibc*) fmt=elf em=linux ;; - s390-*-tpf*) fmt=elf ;; - - sh*-*-linux*) fmt=elf em=linux -@@ -493,6 +503,7 @@ - sparc-*-coff) fmt=coff ;; - sparc-*-linux*aout*) fmt=aout em=linux ;; - sparc-*-linux-gnu*) fmt=elf em=linux ;; -+ sparc-*-linux-uclibc*) fmt=elf em=linux ;; - sparc-*-lynxos*) fmt=coff em=lynx ;; - sparc-fujitsu-none) fmt=aout ;; - sparc-*-elf) fmt=elf ;; -diff -ur binutils-2.15.94.0.2.orig/gprof/configure binutils-2.15.94.0.2/gprof/configure ---- binutils-2.15.94.0.2.orig/gprof/configure 2004-12-22 15:00:57.949913248 -0500 -+++ binutils-2.15.94.0.2/gprof/configure 2004-12-22 15:01:19.030708480 -0500 -@@ -3418,6 +3418,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -ur binutils-2.15.94.0.2.orig/ld/configure binutils-2.15.94.0.2/ld/configure ---- binutils-2.15.94.0.2.orig/ld/configure 2004-12-22 15:00:58.032900632 -0500 -+++ binutils-2.15.94.0.2/ld/configure 2004-12-22 15:01:19.035707720 -0500 -@@ -1579,6 +1579,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -ur binutils-2.15.94.0.2.orig/ld/configure.tgt binutils-2.15.94.0.2/ld/configure.tgt ---- binutils-2.15.94.0.2.orig/ld/configure.tgt 2004-12-22 15:00:58.033900480 -0500 -+++ binutils-2.15.94.0.2/ld/configure.tgt 2004-12-22 15:01:19.036707568 -0500 -@@ -32,6 +32,7 @@ - targ_extra_libpath=$targ_extra_emuls ;; - cris-*-linux-gnu* | cris-*-linux-gnu*) - targ_emul=crislinux ;; -+cris-*-linux-uclibc*) targ_emul=crislinux ;; - cris-*-* | crisv32-*-*) targ_emul=criself - targ_extra_emuls="crisaout crislinux" - targ_extra_libpath=$targ_extra_emuls ;; -@@ -62,14 +63,16 @@ - tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'` - tdir_sun4=sparc-sun-sunos4 - ;; --sparc64-*-linux-gnu*) targ_emul=elf64_sparc -+sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) \ -+ targ_emul=elf64_sparc - targ_extra_emuls="elf32_sparc sparclinux sun4" - targ_extra_libpath=elf32_sparc - tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` - tdir_sparclinux=${tdir_elf32_sparc}aout - tdir_sun4=sparc-sun-sunos4 - ;; --sparc*-*-linux-gnu*) targ_emul=elf32_sparc -+sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \ -+ targ_emul=elf32_sparc - targ_extra_emuls="sparclinux elf64_sparc sun4" - targ_extra_libpath=elf64_sparc - tdir_sparclinux=${targ_alias}aout -@@ -121,7 +124,9 @@ - m32r*le-*-elf*) targ_emul=m32rlelf ;; - m32r*-*-elf*) targ_emul=m32relf ;; - m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;; -+m32r*le-*-linux-uclibc*) targ_emul=m32rlelf_linux ;; - m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;; -+m32r*-*-linux-uclibc*) targ_emul=m32relf_linux ;; - m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf - targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;; - m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf -@@ -132,7 +137,7 @@ - m68*-apple-aux*) targ_emul=m68kaux ;; - maxq-*-coff) targ_emul=maxqcoff;; - *-tandem-none) targ_emul=st2000 ;; --i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;; -+i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;; - i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;; - i[3-7]86-*-vsta) targ_emul=vsta ;; - i[3-7]86-go32-rtems*) targ_emul=i386go32 ;; -@@ -156,14 +161,16 @@ - tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` - ;; - i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;; --i[3-7]86-*-linux-gnu*) targ_emul=elf_i386 -+i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \ -+ targ_emul=elf_i386 - targ_extra_emuls=i386linux - if test x${want64} = xtrue; then - targ_extra_emuls="$targ_extra_emuls elf_x86_64" - fi - tdir_i386linux=${targ_alias}aout - ;; --x86_64-*-linux-gnu*) targ_emul=elf_x86_64 -+x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \ -+ targ_emul=elf_x86_64 - targ_extra_emuls="elf_i386 i386linux" - targ_extra_libpath=elf_i386 - tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'` -@@ -263,11 +270,14 @@ - arm-*-kaos*) targ_emul=armelf ;; - arm9e-*-elf) targ_emul=armelf ;; - arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;; -+arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;; - arm*-*-linux-gnueabi) targ_emul=armelf_linux_eabi ;; - arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; -+arm*-*-linux-uclibc*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - arm*-*-conix*) targ_emul=armelf ;; --thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; -+thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \ -+ targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - strongarm-*-coff) targ_emul=armcoff ;; - strongarm-*-elf) targ_emul=armelf ;; - strongarm-*-kaos*) targ_emul=armelf ;; -@@ -371,7 +381,8 @@ - targ_extra_emuls=m68kelf - tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` - ;; --m68k-*-linux-gnu*) targ_emul=m68kelf -+m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \ -+ targ_emul=m68kelf - targ_extra_emuls=m68klinux - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` - ;; -@@ -388,9 +399,9 @@ - m68*-*-psos*) targ_emul=m68kpsos ;; - m68*-*-rtemscoff*) targ_emul=m68kcoff ;; - m68*-*-rtems*) targ_emul=m68kelf ;; --hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;; -+hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_emul=hppa64linux ;; - hppa*64*-*) targ_emul=elf64hppa ;; --hppa*-*-linux-gnu*) targ_emul=hppalinux ;; -+hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) targ_emul=hppalinux ;; - hppa*-*-*elf*) targ_emul=hppaelf ;; - hppa*-*-lites*) targ_emul=hppaelf ;; - hppa*-*-netbsd*) targ_emul=hppanbsd ;; -@@ -403,6 +414,7 @@ - targ_emul=vaxnbsd - targ_extra_emuls=elf32vax ;; - vax-*-linux-gnu*) targ_emul=elf32vax ;; -+vax-*-linux-uclibc*) targ_emul=elf32vax ;; - mips*-*-pe) targ_emul=mipspe ; - targ_extra_ofiles="deffilep.o pe-dll.o" ;; - mips*-dec-ultrix*) targ_emul=mipslit ;; -@@ -436,16 +448,16 @@ - mips*-*-vxworks*) targ_emul=elf32ebmip - targ_extra_emuls="elf32elmip" ;; - mips*-*-windiss) targ_emul=elf32mipswindiss ;; --mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32 -+mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*) targ_emul=elf32ltsmipn32 - targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" - ;; --mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32 -+mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*) targ_emul=elf32btsmipn32 - targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" - ;; --mips*el-*-linux-gnu*) targ_emul=elf32ltsmip -+mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" - ;; --mips*-*-linux-gnu*) targ_emul=elf32btsmip -+mips*-*-linux-gnu* | mips*-*-linux-uclibc*) targ_emul=elf32btsmip - targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" - ;; - mips*-*-lnews*) targ_emul=mipslnews ;; -@@ -468,6 +480,10 @@ - alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha - tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` - ;; -+alpha*-*-linux-uclibc*) targ_emul=elf64alpha targ_extra_emuls=alpha -+ # The following needs to be checked... -+ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` -+ ;; - alpha*-*-osf*) targ_emul=alpha ;; - alpha*-*-gnu*) targ_emul=elf64alpha ;; - alpha*-*-netware*) targ_emul=alpha ;; -diff -ur binutils-2.15.94.0.2.orig/ld/emultempl/elf32.em binutils-2.15.94.0.2/ld/emultempl/elf32.em ---- binutils-2.15.94.0.2.orig/ld/emultempl/elf32.em 2004-12-22 15:00:58.044898808 -0500 -+++ binutils-2.15.94.0.2/ld/emultempl/elf32.em 2004-12-22 15:01:19.038707264 -0500 -@@ -65,7 +65,7 @@ - - if [ "x${USE_LIBPATH}" = xyes ] ; then - case ${target} in -- *-*-linux-gnu*) -+ *-*-linux-gnu* | *-*-linux-uclibc*) - cat >>e${EMULATION_NAME}.c <<EOF - #include <glob.h> - EOF -@@ -337,7 +337,7 @@ - - EOF - case ${target} in -- *-*-linux-gnu*) -+ *-*-linux-gnu* | *-*-linux-uclibc*) - cat >>e${EMULATION_NAME}.c <<EOF - { - struct bfd_link_needed_list *l; -@@ -510,7 +510,7 @@ - - EOF - case ${target} in -- *-*-linux-gnu*) -+ *-*-linux-gnu* | *-*-linux-uclibc*) - cat >>e${EMULATION_NAME}.c <<EOF - /* For a native linker, check the file /etc/ld.so.conf for directories - in which we may find shared libraries. /etc/ld.so.conf is really -@@ -894,7 +894,7 @@ - EOF - if [ "x${USE_LIBPATH}" = xyes ] ; then - case ${target} in -- *-*-linux-gnu*) -+ *-*-linux-gnu* | *-*-linux-uclibc*) - cat >>e${EMULATION_NAME}.c <<EOF - if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force)) - break; -diff -ur binutils-2.15.94.0.2.orig/libiberty/configure binutils-2.15.94.0.2/libiberty/configure ---- binutils-2.15.94.0.2.orig/libiberty/configure 2004-12-22 15:00:59.263713520 -0500 -+++ binutils-2.15.94.0.2/libiberty/configure 2004-12-22 15:03:55.744884304 -0500 -@@ -3682,6 +3682,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -ur binutils-2.15.94.0.2.orig/libtool.m4 binutils-2.15.94.0.2/libtool.m4 ---- binutils-2.15.94.0.2.orig/libtool.m4 2004-12-22 15:00:57.329007640 -0500 -+++ binutils-2.15.94.0.2/libtool.m4 2004-12-22 15:01:19.039707112 -0500 -@@ -645,6 +645,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] -diff -ur binutils-2.15.94.0.2.orig/ltconfig binutils-2.15.94.0.2/ltconfig ---- binutils-2.15.94.0.2.orig/ltconfig 2004-12-22 15:00:57.330007488 -0500 -+++ binutils-2.15.94.0.2/ltconfig 2004-12-22 15:01:19.041706808 -0500 -@@ -603,6 +603,7 @@ - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in - linux-gnu*) ;; -+linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1270,6 +1271,24 @@ - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ # Note: copied from linux-gnu, and may not be appropriate. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -ur binutils-2.15.94.0.2.orig/opcodes/configure binutils-2.15.94.0.2/opcodes/configure ---- binutils-2.15.94.0.2.orig/opcodes/configure 2004-12-22 15:00:59.334702728 -0500 -+++ binutils-2.15.94.0.2/opcodes/configure 2004-12-22 15:01:19.053704984 -0500 -@@ -3587,6 +3587,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' diff --git a/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-001_ld_makefile_patch.patch deleted file mode 100644 index b25d5b7e21a..00000000000 --- a/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -## 001_ld_makefile_patch.dpatch -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Description: correct where ld scripts are installed -## DP: Author: Chris Chimelis <chris@debian.org> -## DP: Upstream status: N/A -## DP: Date: ?? - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100 -+++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100 -@@ -19,7 +19,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100 -+++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100 -@@ -128,7 +128,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ diff --git a/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch deleted file mode 100644 index ae2033d0694..00000000000 --- a/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch +++ /dev/null @@ -1,39 +0,0 @@ -#! /bin/sh -e -## 120_mips_xgot_multigot_workaround.dpatch -## -## DP: Description: Make multigot/xgot handling mutually exclusive. -## DP: Author: Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> -## DP: Upstream status: Not submitted -## DP: Date: 2004-09-17 - -if [ $# -lt 1 ]; then - echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" - -case "$1" in - -patch) patch -p1 ${patch_opts} < $0;; - -unpatch) patch -R -p1 ${patch_opts} < $0;; - *) - echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c binutils-2.15/bfd/elfxx-mips.c ---- /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:41:37.156466673 +0100 -+++ binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:42:15.998362861 +0100 -@@ -5883,6 +5883,8 @@ - s->size += i * MIPS_ELF_GOT_SIZE (output_bfd); - - if (s->size > MIPS_ELF_GOT_MAX_SIZE (output_bfd) -+ && g->global_gotno <= (MIPS_ELF_GOT_MAX_SIZE (output_bfd) -+ / MIPS_ELF_GOT_SIZE (output_bfd)) - && ! mips_elf_multi_got (output_bfd, info, g, s, local_gotno)) - return FALSE; - diff --git a/openwrt/toolchain/binutils/patches/2.15.94.0.2/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.15.94.0.2/702-binutils-skip-comments.patch deleted file mode 100644 index 804a17e0068..00000000000 --- a/openwrt/toolchain/binutils/patches/2.15.94.0.2/702-binutils-skip-comments.patch +++ /dev/null @@ -1,101 +0,0 @@ -Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html -Fixes -localealias.s:544: Error: junk at end of line, first unrecognized character is `,' -when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3 - -Paths adjusted to match crosstool's patcher. - -Message-Id: m3n052qw2g.fsf@whitebox.m5r.de -From: Andreas Schwab <schwab at suse dot de> -To: Nathan Sidwell <nathan at codesourcery dot com> -Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com -Date: Fri, 23 Apr 2004 22:27:19 +0200 -Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line - -Nathan Sidwell <nathan@codesourcery.com> writes: - -> Index: read.c -> =================================================================== -> RCS file: /cvs/src/src/gas/read.c,v -> retrieving revision 1.76 -> diff -c -3 -p -r1.76 read.c -> *** read.c 12 Mar 2004 17:48:12 -0000 1.76 -> --- read.c 18 Mar 2004 09:56:05 -0000 -> *************** read_a_source_file (char *name) -> *** 1053,1059 **** -> #endif -> input_line_pointer--; -> /* Report unknown char as ignored. */ -> ! ignore_rest_of_line (); -> } -> -> #ifdef md_after_pass_hook -> --- 1053,1059 ---- -> #endif -> input_line_pointer--; -> /* Report unknown char as ignored. */ -> ! demand_empty_rest_of_line (); -> } -> -> #ifdef md_after_pass_hook - -This means that the unknown character is no longer ignored, despite the -comment. As a side effect a line starting with a line comment character -not followed by APP in NO_APP mode now triggers an error instead of just a -warning, breaking builds of glibc on m68k-linux. Earlier in -read_a_source_file where #APP is handled there is another comment that -claims that unknown comments are ignored, when in fact they aren't (only -the initial line comment character is skipped). - -Note that the presence of #APP will mess up the line counters, but -that appears to be difficult to fix. - -Andreas. - -2004-04-23 Andreas Schwab <schwab@suse.de> - - * read.c (read_a_source_file): Ignore unknown text after line - comment character. Fix misleading comment. - ---- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200 -+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200 -@@ -1,6 +1,6 @@ - /* read.c - read a source file - - Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, -- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+ 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - - This file is part of GAS, the GNU Assembler. - -@@ -950,10 +950,14 @@ read_a_source_file (char *name) - unsigned int new_length; - char *tmp_buf = 0; - -- bump_line_counters (); - s = input_line_pointer; - if (strncmp (s, "APP\n", 4)) -- continue; /* We ignore it */ -+ { -+ /* We ignore it */ -+ ignore_rest_of_line (); -+ continue; -+ } -+ bump_line_counters (); - s += 4; - - sb_new (&sbuf); -@@ -1052,7 +1056,7 @@ read_a_source_file (char *name) - continue; - #endif - input_line_pointer--; -- /* Report unknown char as ignored. */ -+ /* Report unknown char as error. */ - demand_empty_rest_of_line (); - } - - --- -Andreas Schwab, SuSE Labs, schwab@suse.de -SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany -Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 -"And now for something completely different." diff --git a/openwrt/toolchain/binutils/patches/2.16.90.0.3/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/100-uclibc-conf.patch deleted file mode 100644 index c7e2c63efc1..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.90.0.3/100-uclibc-conf.patch +++ /dev/null @@ -1,240 +0,0 @@ -diff -urN binutils-2.16.90.0.2-dist/bfd/configure binutils-2.16.90.0.2/bfd/configure ---- binutils-2.16.90.0.2-dist/bfd/configure 2005-04-29 12:50:24.000000000 -0500 -+++ binutils-2.16.90.0.2/bfd/configure 2005-04-30 11:34:59.246377032 -0500 -@@ -3584,6 +3584,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/binutils/configure binutils-2.16.90.0.2/binutils/configure ---- binutils-2.16.90.0.2-dist/binutils/configure 2005-04-29 12:50:26.000000000 -0500 -+++ binutils-2.16.90.0.2/binutils/configure 2005-04-30 11:35:28.900868864 -0500 -@@ -1577,6 +1577,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/configure binutils-2.16.90.0.2/configure ---- binutils-2.16.90.0.2-dist/configure 2005-04-29 12:50:23.000000000 -0500 -+++ binutils-2.16.90.0.2/configure 2005-04-30 11:31:12.525843792 -0500 -@@ -1111,7 +1111,7 @@ - ;; - "") - case "${target}" in -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) -@@ -1207,7 +1207,7 @@ - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -1495,7 +1495,7 @@ - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[3456789]86-*-vsta) ;; # don't add gprof back in - i[3456789]86-*-go32*) ;; # don't add gprof back in -diff -urN binutils-2.16.90.0.2-dist/configure.in binutils-2.16.90.0.2/configure.in ---- binutils-2.16.90.0.2-dist/configure.in 2005-04-29 12:50:23.000000000 -0500 -+++ binutils-2.16.90.0.2/configure.in 2005-04-30 11:29:51.643139832 -0500 -@@ -328,7 +328,7 @@ - ;; - "") - case "${target}" in -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) -@@ -424,7 +424,7 @@ - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -712,7 +712,7 @@ - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[[3456789]]86-*-vsta) ;; # don't add gprof back in - i[[3456789]]86-*-go32*) ;; # don't add gprof back in -diff -urN binutils-2.16.90.0.2-dist/gas/configure binutils-2.16.90.0.2/gas/configure ---- binutils-2.16.90.0.2-dist/gas/configure 2005-04-29 12:50:27.000000000 -0500 -+++ binutils-2.16.90.0.2/gas/configure 2005-04-30 11:35:21.097055224 -0500 -@@ -3421,6 +3421,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/gprof/configure binutils-2.16.90.0.2/gprof/configure ---- binutils-2.16.90.0.2-dist/gprof/configure 2005-04-29 12:50:29.000000000 -0500 -+++ binutils-2.16.90.0.2/gprof/configure 2005-04-30 11:35:36.880655752 -0500 -@@ -3419,6 +3419,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/ld/configure binutils-2.16.90.0.2/ld/configure ---- binutils-2.16.90.0.2-dist/ld/configure 2005-04-29 12:50:30.000000000 -0500 -+++ binutils-2.16.90.0.2/ld/configure 2005-04-30 11:46:15.974498720 -0500 -@@ -1581,6 +1581,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/libtool.m4 binutils-2.16.90.0.2/libtool.m4 ---- binutils-2.16.90.0.2-dist/libtool.m4 2004-07-27 23:36:06.000000000 -0500 -+++ binutils-2.16.90.0.2/libtool.m4 2005-04-30 11:35:54.062043784 -0500 -@@ -645,6 +645,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] -diff -urN binutils-2.16.90.0.2-dist/ltconfig binutils-2.16.90.0.2/ltconfig ---- binutils-2.16.90.0.2-dist/ltconfig 2004-11-22 14:33:30.000000000 -0600 -+++ binutils-2.16.90.0.2/ltconfig 2005-04-30 11:22:10.594229920 -0500 -@@ -602,6 +602,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in -+linux-uclibc*) ;; - linux-gnu*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac -@@ -1270,6 +1271,23 @@ - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -urN binutils-2.16.90.0.2-dist/opcodes/configure binutils-2.16.90.0.2/opcodes/configure ---- binutils-2.16.90.0.2-dist/opcodes/configure 2005-04-29 12:50:31.000000000 -0500 -+++ binutils-2.16.90.0.2/opcodes/configure 2005-04-30 11:17:07.168357664 -0500 -@@ -3588,6 +3588,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2.orig/config.sub binutils-2.16.90.0.2/config.sub ---- binutils-2.16.90.0.2.orig/config.sub 2005-04-29 20:50:23.000000000 +0300 -+++ binutils-2.16.90.0.2/config.sub 2005-05-02 13:34:38.400457452 +0300 -@@ -265,7 +265,7 @@ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234]* | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ -@@ -340,7 +340,7 @@ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]*-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -@@ -891,9 +891,6 @@ - basic_machine=sh-hitachi - os=-hms - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks -@@ -1093,7 +1090,7 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh2* | sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sh64) diff --git a/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-001_ld_makefile_patch.patch deleted file mode 100644 index b25d5b7e21a..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -## 001_ld_makefile_patch.dpatch -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Description: correct where ld scripts are installed -## DP: Author: Chris Chimelis <chris@debian.org> -## DP: Upstream status: N/A -## DP: Date: ?? - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100 -+++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100 -@@ -19,7 +19,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100 -+++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100 -@@ -128,7 +128,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ diff --git a/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-006_better_file_error.patch deleted file mode 100644 index f337611edf4..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-006_better_file_error.patch +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -e -## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Specify which filename is causing an error if the filename is a -## DP: directory. (#45832) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 -+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 -@@ -150,6 +150,13 @@ - { - bfd *nbfd; - const bfd_target *target_vec; -+ struct stat s; -+ -+ if (stat (filename, &s) == 0) -+ if (S_ISDIR(s.st_mode)) { -+ bfd_set_error (bfd_error_file_not_recognized); -+ return NULL; -+ } - - nbfd = _bfd_new_bfd (); - if (nbfd == NULL) diff --git a/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 498651a90ca..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.90.0.3/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -e -## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for -## DP: cases where -rpath isn't specified. (#151024) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em ---- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100 -+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100 -@@ -692,6 +692,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, &n, - force)) - break; -@@ -871,6 +873,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.1/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/100-uclibc-conf.patch deleted file mode 100644 index c7e2c63efc1..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.1/100-uclibc-conf.patch +++ /dev/null @@ -1,240 +0,0 @@ -diff -urN binutils-2.16.90.0.2-dist/bfd/configure binutils-2.16.90.0.2/bfd/configure ---- binutils-2.16.90.0.2-dist/bfd/configure 2005-04-29 12:50:24.000000000 -0500 -+++ binutils-2.16.90.0.2/bfd/configure 2005-04-30 11:34:59.246377032 -0500 -@@ -3584,6 +3584,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/binutils/configure binutils-2.16.90.0.2/binutils/configure ---- binutils-2.16.90.0.2-dist/binutils/configure 2005-04-29 12:50:26.000000000 -0500 -+++ binutils-2.16.90.0.2/binutils/configure 2005-04-30 11:35:28.900868864 -0500 -@@ -1577,6 +1577,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/configure binutils-2.16.90.0.2/configure ---- binutils-2.16.90.0.2-dist/configure 2005-04-29 12:50:23.000000000 -0500 -+++ binutils-2.16.90.0.2/configure 2005-04-30 11:31:12.525843792 -0500 -@@ -1111,7 +1111,7 @@ - ;; - "") - case "${target}" in -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) -@@ -1207,7 +1207,7 @@ - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -1495,7 +1495,7 @@ - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[3456789]86-*-vsta) ;; # don't add gprof back in - i[3456789]86-*-go32*) ;; # don't add gprof back in -diff -urN binutils-2.16.90.0.2-dist/configure.in binutils-2.16.90.0.2/configure.in ---- binutils-2.16.90.0.2-dist/configure.in 2005-04-29 12:50:23.000000000 -0500 -+++ binutils-2.16.90.0.2/configure.in 2005-04-30 11:29:51.643139832 -0500 -@@ -328,7 +328,7 @@ - ;; - "") - case "${target}" in -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) -@@ -424,7 +424,7 @@ - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -712,7 +712,7 @@ - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[[3456789]]86-*-vsta) ;; # don't add gprof back in - i[[3456789]]86-*-go32*) ;; # don't add gprof back in -diff -urN binutils-2.16.90.0.2-dist/gas/configure binutils-2.16.90.0.2/gas/configure ---- binutils-2.16.90.0.2-dist/gas/configure 2005-04-29 12:50:27.000000000 -0500 -+++ binutils-2.16.90.0.2/gas/configure 2005-04-30 11:35:21.097055224 -0500 -@@ -3421,6 +3421,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/gprof/configure binutils-2.16.90.0.2/gprof/configure ---- binutils-2.16.90.0.2-dist/gprof/configure 2005-04-29 12:50:29.000000000 -0500 -+++ binutils-2.16.90.0.2/gprof/configure 2005-04-30 11:35:36.880655752 -0500 -@@ -3419,6 +3419,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/ld/configure binutils-2.16.90.0.2/ld/configure ---- binutils-2.16.90.0.2-dist/ld/configure 2005-04-29 12:50:30.000000000 -0500 -+++ binutils-2.16.90.0.2/ld/configure 2005-04-30 11:46:15.974498720 -0500 -@@ -1581,6 +1581,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2-dist/libtool.m4 binutils-2.16.90.0.2/libtool.m4 ---- binutils-2.16.90.0.2-dist/libtool.m4 2004-07-27 23:36:06.000000000 -0500 -+++ binutils-2.16.90.0.2/libtool.m4 2005-04-30 11:35:54.062043784 -0500 -@@ -645,6 +645,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] -diff -urN binutils-2.16.90.0.2-dist/ltconfig binutils-2.16.90.0.2/ltconfig ---- binutils-2.16.90.0.2-dist/ltconfig 2004-11-22 14:33:30.000000000 -0600 -+++ binutils-2.16.90.0.2/ltconfig 2005-04-30 11:22:10.594229920 -0500 -@@ -602,6 +602,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in -+linux-uclibc*) ;; - linux-gnu*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac -@@ -1270,6 +1271,23 @@ - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -urN binutils-2.16.90.0.2-dist/opcodes/configure binutils-2.16.90.0.2/opcodes/configure ---- binutils-2.16.90.0.2-dist/opcodes/configure 2005-04-29 12:50:31.000000000 -0500 -+++ binutils-2.16.90.0.2/opcodes/configure 2005-04-30 11:17:07.168357664 -0500 -@@ -3588,6 +3588,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.16.90.0.2.orig/config.sub binutils-2.16.90.0.2/config.sub ---- binutils-2.16.90.0.2.orig/config.sub 2005-04-29 20:50:23.000000000 +0300 -+++ binutils-2.16.90.0.2/config.sub 2005-05-02 13:34:38.400457452 +0300 -@@ -265,7 +265,7 @@ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234]* | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ -@@ -340,7 +340,7 @@ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]*-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -@@ -891,9 +891,6 @@ - basic_machine=sh-hitachi - os=-hms - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks -@@ -1093,7 +1090,7 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh2* | sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sh64) diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-006_better_file_error.patch deleted file mode 100644 index f337611edf4..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-006_better_file_error.patch +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -e -## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Specify which filename is causing an error if the filename is a -## DP: directory. (#45832) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 -+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 -@@ -150,6 +150,13 @@ - { - bfd *nbfd; - const bfd_target *target_vec; -+ struct stat s; -+ -+ if (stat (filename, &s) == 0) -+ if (S_ISDIR(s.st_mode)) { -+ bfd_set_error (bfd_error_file_not_recognized); -+ return NULL; -+ } - - nbfd = _bfd_new_bfd (); - if (nbfd == NULL) diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 498651a90ca..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -e -## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for -## DP: cases where -rpath isn't specified. (#151024) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em ---- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100 -+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100 -@@ -692,6 +692,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, &n, - force)) - break; -@@ -871,6 +873,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.1/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.1/702-binutils-skip-comments.patch deleted file mode 100644 index 9ef7a7c9ec3..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.1/702-binutils-skip-comments.patch +++ /dev/null @@ -1,93 +0,0 @@ -Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html -Fixes -localealias.s:544: Error: junk at end of line, first unrecognized character is `,' -when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3 - -Paths adjusted to match crosstool's patcher. - -Message-Id: m3n052qw2g.fsf@whitebox.m5r.de -From: Andreas Schwab <schwab at suse dot de> -To: Nathan Sidwell <nathan at codesourcery dot com> -Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com -Date: Fri, 23 Apr 2004 22:27:19 +0200 -Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line - -Nathan Sidwell <nathan@codesourcery.com> writes: - -> Index: read.c -> =================================================================== -> RCS file: /cvs/src/src/gas/read.c,v -> retrieving revision 1.76 -> diff -c -3 -p -r1.76 read.c -> *** read.c 12 Mar 2004 17:48:12 -0000 1.76 -> --- read.c 18 Mar 2004 09:56:05 -0000 -> *************** read_a_source_file (char *name) -> *** 1053,1059 **** -> #endif -> input_line_pointer--; -> /* Report unknown char as ignored. */ -> ! ignore_rest_of_line (); -> } -> -> #ifdef md_after_pass_hook -> --- 1053,1059 ---- -> #endif -> input_line_pointer--; -> /* Report unknown char as ignored. */ -> ! demand_empty_rest_of_line (); -> } -> -> #ifdef md_after_pass_hook - -This means that the unknown character is no longer ignored, despite the -comment. As a side effect a line starting with a line comment character -not followed by APP in NO_APP mode now triggers an error instead of just a -warning, breaking builds of glibc on m68k-linux. Earlier in -read_a_source_file where #APP is handled there is another comment that -claims that unknown comments are ignored, when in fact they aren't (only -the initial line comment character is skipped). - -Note that the presence of #APP will mess up the line counters, but -that appears to be difficult to fix. - -Andreas. - -2004-04-23 Andreas Schwab <schwab@suse.de> - - * read.c (read_a_source_file): Ignore unknown text after line - comment character. Fix misleading comment. - ---- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200 -+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200 -@@ -950,10 +950,14 @@ read_a_source_file (char *name) - unsigned int new_length; - char *tmp_buf = 0; - -- bump_line_counters (); - s = input_line_pointer; - if (strncmp (s, "APP\n", 4)) -- continue; /* We ignore it */ -+ { -+ /* We ignore it */ -+ ignore_rest_of_line (); -+ continue; -+ } -+ bump_line_counters (); - s += 4; - - sb_new (&sbuf); -@@ -1052,7 +1056,7 @@ read_a_source_file (char *name) - continue; - #endif - input_line_pointer--; -- /* Report unknown char as ignored. */ -+ /* Report unknown char as error. */ - demand_empty_rest_of_line (); - } - - --- -Andreas Schwab, SuSE Labs, schwab@suse.de -SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany -Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 -"And now for something completely different." diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.2/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/100-uclibc-conf.patch deleted file mode 100644 index 85fc30930ed..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.2/100-uclibc-conf.patch +++ /dev/null @@ -1,230 +0,0 @@ -diff -Nurp binutils-2.16.91.0.2.orig/bfd/configure binutils-2.16.91.0.2/bfd/configure ---- binutils-2.16.91.0.2.orig/bfd/configure 2005-07-20 15:27:27.000000000 -0400 -+++ binutils-2.16.91.0.2/bfd/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3585,6 +3585,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/binutils/configure binutils-2.16.91.0.2/binutils/configure ---- binutils-2.16.91.0.2.orig/binutils/configure 2005-07-20 15:27:27.000000000 -0400 -+++ binutils-2.16.91.0.2/binutils/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3420,6 +3420,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/configure binutils-2.16.91.0.2/configure ---- binutils-2.16.91.0.2.orig/configure 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -1130,7 +1130,7 @@ no) - ;; - "") - case "${target}" in -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) -@@ -1235,7 +1235,7 @@ case "${target}" in - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -1530,7 +1530,7 @@ case "${target}" in - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[3456789]86-*-vsta) ;; # don't add gprof back in - i[3456789]86-*-go32*) ;; # don't add gprof back in -diff -Nurp binutils-2.16.91.0.2.orig/configure.in binutils-2.16.91.0.2/configure.in ---- binutils-2.16.91.0.2.orig/configure.in 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/configure.in 2005-08-02 00:17:47.000000000 -0400 -@@ -341,7 +341,7 @@ no) - ;; - "") - case "${target}" in -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) -@@ -446,7 +446,7 @@ case "${target}" in - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -741,7 +741,7 @@ case "${target}" in - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[[3456789]]86-*-vsta) ;; # don't add gprof back in - i[[3456789]]86-*-go32*) ;; # don't add gprof back in -diff -Nurp binutils-2.16.91.0.2.orig/gas/configure binutils-2.16.91.0.2/gas/configure ---- binutils-2.16.91.0.2.orig/gas/configure 2005-07-20 15:27:27.000000000 -0400 -+++ binutils-2.16.91.0.2/gas/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3421,6 +3421,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/gprof/configure binutils-2.16.91.0.2/gprof/configure ---- binutils-2.16.91.0.2.orig/gprof/configure 2005-04-29 13:50:29.000000000 -0400 -+++ binutils-2.16.91.0.2/gprof/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3419,6 +3419,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/ld/configure binutils-2.16.91.0.2/ld/configure ---- binutils-2.16.91.0.2.orig/ld/configure 2005-06-22 16:53:35.000000000 -0400 -+++ binutils-2.16.91.0.2/ld/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3422,6 +3422,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/libtool.m4 binutils-2.16.91.0.2/libtool.m4 ---- binutils-2.16.91.0.2.orig/libtool.m4 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/libtool.m4 2005-08-02 00:17:47.000000000 -0400 -@@ -645,6 +645,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] -diff -Nurp binutils-2.16.91.0.2.orig/ltconfig binutils-2.16.91.0.2/ltconfig ---- binutils-2.16.91.0.2.orig/ltconfig 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/ltconfig 2005-08-02 00:17:47.000000000 -0400 -@@ -602,6 +602,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in -+linux-uclibc*) ;; - linux-gnu*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac -@@ -1270,6 +1271,23 @@ linux-gnu*) - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -Nurp binutils-2.16.91.0.2.orig/opcodes/configure binutils-2.16.91.0.2/opcodes/configure ---- binutils-2.16.91.0.2.orig/opcodes/configure 2005-07-20 15:27:28.000000000 -0400 -+++ binutils-2.16.91.0.2/opcodes/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3588,6 +3588,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/config.sub binutils-2.16.91.0.2/config.sub ---- binutils-2.16.91.0.2.orig/config.sub 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/config.sub 2005-08-02 00:18:58.000000000 -0400 -@@ -268,7 +268,7 @@ case $basic_machine in - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234]* | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ -@@ -348,7 +348,7 @@ case $basic_machine in - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]*-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -@@ -1102,7 +1102,7 @@ case $basic_machine in - we32k) - basic_machine=we32k-att - ;; -- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234]* | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b) diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-001_ld_makefile_patch.patch deleted file mode 100644 index 04a7e61e25d..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -e -## 001_ld_makefile_patch.dpatch -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Description: correct where ld scripts are installed -## DP: Author: Chris Chimelis <chris@debian.org> -## DP: Upstream status: N/A -## DP: Date: ?? - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ ---- binutils-2.16.91.0.1/ld/Makefile.am -+++ binutils-2.16.91.0.1/ld/Makefile.am -@@ -20,7 +20,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- binutils-2.16.91.0.1/ld/Makefile.in -+++ binutils-2.16.91.0.1/ld/Makefile.in -@@ -268,7 +268,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-006_better_file_error.patch deleted file mode 100644 index f337611edf4..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-006_better_file_error.patch +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -e -## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Specify which filename is causing an error if the filename is a -## DP: directory. (#45832) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 -+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 -@@ -150,6 +150,13 @@ - { - bfd *nbfd; - const bfd_target *target_vec; -+ struct stat s; -+ -+ if (stat (filename, &s) == 0) -+ if (S_ISDIR(s.st_mode)) { -+ bfd_set_error (bfd_error_file_not_recognized); -+ return NULL; -+ } - - nbfd = _bfd_new_bfd (); - if (nbfd == NULL) diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 498651a90ca..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.2/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -e -## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for -## DP: cases where -rpath isn't specified. (#151024) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em ---- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100 -+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100 -@@ -692,6 +692,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, &n, - force)) - break; -@@ -871,6 +873,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.2/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.2/702-binutils-skip-comments.patch deleted file mode 100644 index 9ef7a7c9ec3..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.2/702-binutils-skip-comments.patch +++ /dev/null @@ -1,93 +0,0 @@ -Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html -Fixes -localealias.s:544: Error: junk at end of line, first unrecognized character is `,' -when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3 - -Paths adjusted to match crosstool's patcher. - -Message-Id: m3n052qw2g.fsf@whitebox.m5r.de -From: Andreas Schwab <schwab at suse dot de> -To: Nathan Sidwell <nathan at codesourcery dot com> -Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com -Date: Fri, 23 Apr 2004 22:27:19 +0200 -Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line - -Nathan Sidwell <nathan@codesourcery.com> writes: - -> Index: read.c -> =================================================================== -> RCS file: /cvs/src/src/gas/read.c,v -> retrieving revision 1.76 -> diff -c -3 -p -r1.76 read.c -> *** read.c 12 Mar 2004 17:48:12 -0000 1.76 -> --- read.c 18 Mar 2004 09:56:05 -0000 -> *************** read_a_source_file (char *name) -> *** 1053,1059 **** -> #endif -> input_line_pointer--; -> /* Report unknown char as ignored. */ -> ! ignore_rest_of_line (); -> } -> -> #ifdef md_after_pass_hook -> --- 1053,1059 ---- -> #endif -> input_line_pointer--; -> /* Report unknown char as ignored. */ -> ! demand_empty_rest_of_line (); -> } -> -> #ifdef md_after_pass_hook - -This means that the unknown character is no longer ignored, despite the -comment. As a side effect a line starting with a line comment character -not followed by APP in NO_APP mode now triggers an error instead of just a -warning, breaking builds of glibc on m68k-linux. Earlier in -read_a_source_file where #APP is handled there is another comment that -claims that unknown comments are ignored, when in fact they aren't (only -the initial line comment character is skipped). - -Note that the presence of #APP will mess up the line counters, but -that appears to be difficult to fix. - -Andreas. - -2004-04-23 Andreas Schwab <schwab@suse.de> - - * read.c (read_a_source_file): Ignore unknown text after line - comment character. Fix misleading comment. - ---- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200 -+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200 -@@ -950,10 +950,14 @@ read_a_source_file (char *name) - unsigned int new_length; - char *tmp_buf = 0; - -- bump_line_counters (); - s = input_line_pointer; - if (strncmp (s, "APP\n", 4)) -- continue; /* We ignore it */ -+ { -+ /* We ignore it */ -+ ignore_rest_of_line (); -+ continue; -+ } -+ bump_line_counters (); - s += 4; - - sb_new (&sbuf); -@@ -1052,7 +1056,7 @@ read_a_source_file (char *name) - continue; - #endif - input_line_pointer--; -- /* Report unknown char as ignored. */ -+ /* Report unknown char as error. */ - demand_empty_rest_of_line (); - } - - --- -Andreas Schwab, SuSE Labs, schwab@suse.de -SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany -Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 -"And now for something completely different." diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.6/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/100-uclibc-conf.patch deleted file mode 100644 index 4c72f330f18..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.6/100-uclibc-conf.patch +++ /dev/null @@ -1,200 +0,0 @@ -diff -Nurp binutils-2.16.91.0.2.orig/bfd/configure binutils-2.16.91.0.2/bfd/configure ---- binutils-2.16.91.0.2.orig/bfd/configure 2005-07-20 15:27:27.000000000 -0400 -+++ binutils-2.16.91.0.2/bfd/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3585,6 +3585,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/binutils/configure binutils-2.16.91.0.2/binutils/configure ---- binutils-2.16.91.0.2.orig/binutils/configure 2005-07-20 15:27:27.000000000 -0400 -+++ binutils-2.16.91.0.2/binutils/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3420,6 +3420,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/configure binutils-2.16.91.0.2/configure ---- binutils-2.16.91.0.2.orig/configure 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -1130,7 +1130,7 @@ no) - ;; - "") - case "${target}" in -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) -@@ -1235,7 +1235,7 @@ case "${target}" in - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -1530,7 +1530,7 @@ case "${target}" in - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[3456789]86-*-vsta) ;; # don't add gprof back in - i[3456789]86-*-go32*) ;; # don't add gprof back in -diff -Nurp binutils-2.16.91.0.2.orig/configure.in binutils-2.16.91.0.2/configure.in ---- binutils-2.16.91.0.2.orig/configure.in 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/configure.in 2005-08-02 00:17:47.000000000 -0400 -@@ -341,7 +341,7 @@ no) - ;; - "") - case "${target}" in -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) -@@ -446,7 +446,7 @@ case "${target}" in - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -741,7 +741,7 @@ case "${target}" in - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[[3456789]]86-*-vsta) ;; # don't add gprof back in - i[[3456789]]86-*-go32*) ;; # don't add gprof back in -diff -Nurp binutils-2.16.91.0.2.orig/gas/configure binutils-2.16.91.0.2/gas/configure ---- binutils-2.16.91.0.2.orig/gas/configure 2005-07-20 15:27:27.000000000 -0400 -+++ binutils-2.16.91.0.2/gas/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3421,6 +3421,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/gprof/configure binutils-2.16.91.0.2/gprof/configure ---- binutils-2.16.91.0.2.orig/gprof/configure 2005-04-29 13:50:29.000000000 -0400 -+++ binutils-2.16.91.0.2/gprof/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3419,6 +3419,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/ld/configure binutils-2.16.91.0.2/ld/configure ---- binutils-2.16.91.0.2.orig/ld/configure 2005-06-22 16:53:35.000000000 -0400 -+++ binutils-2.16.91.0.2/ld/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3422,6 +3422,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -Nurp binutils-2.16.91.0.2.orig/libtool.m4 binutils-2.16.91.0.2/libtool.m4 ---- binutils-2.16.91.0.2.orig/libtool.m4 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/libtool.m4 2005-08-02 00:17:47.000000000 -0400 -@@ -645,6 +645,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] -diff -Nurp binutils-2.16.91.0.2.orig/ltconfig binutils-2.16.91.0.2/ltconfig ---- binutils-2.16.91.0.2.orig/ltconfig 2005-07-20 15:27:26.000000000 -0400 -+++ binutils-2.16.91.0.2/ltconfig 2005-08-02 00:17:47.000000000 -0400 -@@ -602,6 +602,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in -+linux-uclibc*) ;; - linux-gnu*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac -@@ -1270,6 +1271,23 @@ linux-gnu*) - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -Nurp binutils-2.16.91.0.2.orig/opcodes/configure binutils-2.16.91.0.2/opcodes/configure ---- binutils-2.16.91.0.2.orig/opcodes/configure 2005-07-20 15:27:28.000000000 -0400 -+++ binutils-2.16.91.0.2/opcodes/configure 2005-08-02 00:17:47.000000000 -0400 -@@ -3588,6 +3588,11 @@ linux-gnu*) - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-001_ld_makefile_patch.patch deleted file mode 100644 index 04a7e61e25d..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -e -## 001_ld_makefile_patch.dpatch -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Description: correct where ld scripts are installed -## DP: Author: Chris Chimelis <chris@debian.org> -## DP: Upstream status: N/A -## DP: Date: ?? - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ ---- binutils-2.16.91.0.1/ld/Makefile.am -+++ binutils-2.16.91.0.1/ld/Makefile.am -@@ -20,7 +20,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- binutils-2.16.91.0.1/ld/Makefile.in -+++ binutils-2.16.91.0.1/ld/Makefile.in -@@ -268,7 +268,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-006_better_file_error.patch deleted file mode 100644 index f337611edf4..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-006_better_file_error.patch +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -e -## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Specify which filename is causing an error if the filename is a -## DP: directory. (#45832) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 -+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 -@@ -150,6 +150,13 @@ - { - bfd *nbfd; - const bfd_target *target_vec; -+ struct stat s; -+ -+ if (stat (filename, &s) == 0) -+ if (S_ISDIR(s.st_mode)) { -+ bfd_set_error (bfd_error_file_not_recognized); -+ return NULL; -+ } - - nbfd = _bfd_new_bfd (); - if (nbfd == NULL) diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 498651a90ca..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.6/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -e -## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for -## DP: cases where -rpath isn't specified. (#151024) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em ---- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100 -+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100 -@@ -692,6 +692,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, &n, - force)) - break; -@@ -871,6 +873,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.6/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.16.91.0.6/702-binutils-skip-comments.patch deleted file mode 100644 index 9ef7a7c9ec3..00000000000 --- a/openwrt/toolchain/binutils/patches/2.16.91.0.6/702-binutils-skip-comments.patch +++ /dev/null @@ -1,93 +0,0 @@ -Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html -Fixes -localealias.s:544: Error: junk at end of line, first unrecognized character is `,' -when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3 - -Paths adjusted to match crosstool's patcher. - -Message-Id: m3n052qw2g.fsf@whitebox.m5r.de -From: Andreas Schwab <schwab at suse dot de> -To: Nathan Sidwell <nathan at codesourcery dot com> -Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com -Date: Fri, 23 Apr 2004 22:27:19 +0200 -Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line - -Nathan Sidwell <nathan@codesourcery.com> writes: - -> Index: read.c -> =================================================================== -> RCS file: /cvs/src/src/gas/read.c,v -> retrieving revision 1.76 -> diff -c -3 -p -r1.76 read.c -> *** read.c 12 Mar 2004 17:48:12 -0000 1.76 -> --- read.c 18 Mar 2004 09:56:05 -0000 -> *************** read_a_source_file (char *name) -> *** 1053,1059 **** -> #endif -> input_line_pointer--; -> /* Report unknown char as ignored. */ -> ! ignore_rest_of_line (); -> } -> -> #ifdef md_after_pass_hook -> --- 1053,1059 ---- -> #endif -> input_line_pointer--; -> /* Report unknown char as ignored. */ -> ! demand_empty_rest_of_line (); -> } -> -> #ifdef md_after_pass_hook - -This means that the unknown character is no longer ignored, despite the -comment. As a side effect a line starting with a line comment character -not followed by APP in NO_APP mode now triggers an error instead of just a -warning, breaking builds of glibc on m68k-linux. Earlier in -read_a_source_file where #APP is handled there is another comment that -claims that unknown comments are ignored, when in fact they aren't (only -the initial line comment character is skipped). - -Note that the presence of #APP will mess up the line counters, but -that appears to be difficult to fix. - -Andreas. - -2004-04-23 Andreas Schwab <schwab@suse.de> - - * read.c (read_a_source_file): Ignore unknown text after line - comment character. Fix misleading comment. - ---- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200 -+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200 -@@ -950,10 +950,14 @@ read_a_source_file (char *name) - unsigned int new_length; - char *tmp_buf = 0; - -- bump_line_counters (); - s = input_line_pointer; - if (strncmp (s, "APP\n", 4)) -- continue; /* We ignore it */ -+ { -+ /* We ignore it */ -+ ignore_rest_of_line (); -+ continue; -+ } -+ bump_line_counters (); - s += 4; - - sb_new (&sbuf); -@@ -1052,7 +1056,7 @@ read_a_source_file (char *name) - continue; - #endif - input_line_pointer--; -- /* Report unknown char as ignored. */ -+ /* Report unknown char as error. */ - demand_empty_rest_of_line (); - } - - --- -Andreas Schwab, SuSE Labs, schwab@suse.de -SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany -Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 -"And now for something completely different." diff --git a/openwrt/toolchain/binutils/patches/2.17/100-uclibc-conf.patch b/openwrt/toolchain/binutils/patches/2.17/100-uclibc-conf.patch new file mode 100644 index 00000000000..25222e5df20 --- /dev/null +++ b/openwrt/toolchain/binutils/patches/2.17/100-uclibc-conf.patch @@ -0,0 +1,139 @@ +--- binutils-2.16.91.0.7/bfd/configure ++++ binutils-2.16.91.0.7/bfd/configure +@@ -3576,7 +3576,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- binutils-2.16.91.0.7/binutils/configure ++++ binutils-2.16.91.0.7/binutils/configure +@@ -3411,7 +3411,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- binutils-2.16.91.0.7/configure ++++ binutils-2.16.91.0.7/configure +@@ -1270,7 +1270,7 @@ + am33_2.0-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; +- sh-*-linux*) ++ sh*-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; + sh*-*-pe|mips*-*-pe|*arm-wince-pe) +@@ -1578,7 +1578,7 @@ + romp-*-*) + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${host}" in + i[3456789]86-*-vsta) ;; # don't add gprof back in + i[3456789]86-*-go32*) ;; # don't add gprof back in +--- binutils-2.16.91.0.7/configure.in ++++ binutils-2.16.91.0.7/configure.in +@@ -468,7 +468,7 @@ + am33_2.0-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; +- sh-*-linux*) ++ sh*-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; + sh*-*-pe|mips*-*-pe|*arm-wince-pe) +@@ -776,7 +776,7 @@ + romp-*-*) + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${host}" in + i[[3456789]]86-*-vsta) ;; # don't add gprof back in + i[[3456789]]86-*-go32*) ;; # don't add gprof back in +--- binutils-2.16.91.0.7/gas/configure ++++ binutils-2.16.91.0.7/gas/configure +@@ -3411,7 +3411,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- binutils-2.16.91.0.7/gprof/configure ++++ binutils-2.16.91.0.7/gprof/configure +@@ -3419,6 +3419,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +--- binutils-2.16.91.0.7/ld/configure ++++ binutils-2.16.91.0.7/ld/configure +@@ -3413,7 +3413,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- binutils-2.16.91.0.7/libtool.m4 ++++ binutils-2.16.91.0.7/libtool.m4 +@@ -739,7 +739,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- binutils-2.16.91.0.7/ltconfig ++++ binutils-2.16.91.0.7/ltconfig +@@ -602,6 +602,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in ++linux-uclibc*) ;; + linux-gnu*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac +@@ -1247,7 +1248,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + version_type=linux + need_lib_prefix=no + need_version=no +--- binutils-2.16.91.0.7/opcodes/configure ++++ binutils-2.16.91.0.7/opcodes/configure +@@ -3579,7 +3579,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + diff --git a/openwrt/toolchain/binutils/patches/2.17/110-arm-eabi-conf.patch b/openwrt/toolchain/binutils/patches/2.17/110-arm-eabi-conf.patch new file mode 100644 index 00000000000..be85ceb1091 --- /dev/null +++ b/openwrt/toolchain/binutils/patches/2.17/110-arm-eabi-conf.patch @@ -0,0 +1,24 @@ +diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure +--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300 ++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300 +@@ -1299,7 +1299,7 @@ + arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + ;; +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + noconfigdirs="$noconfigdirs target-libjava target-libobjc" + ;; +diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in +--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300 ++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300 +@@ -497,7 +497,7 @@ + arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + ;; +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + noconfigdirs="$noconfigdirs target-libjava target-libobjc" + ;; diff --git a/openwrt/toolchain/binutils/patches/2.16.91.0.1/300-001_ld_makefile_patch.patch b/openwrt/toolchain/binutils/patches/2.17/300-001_ld_makefile_patch.patch similarity index 100% rename from openwrt/toolchain/binutils/patches/2.16.91.0.1/300-001_ld_makefile_patch.patch rename to openwrt/toolchain/binutils/patches/2.17/300-001_ld_makefile_patch.patch diff --git a/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-006_better_file_error.patch b/openwrt/toolchain/binutils/patches/2.17/300-006_better_file_error.patch similarity index 100% rename from openwrt/toolchain/binutils/patches/2.15.94.0.2/300-006_better_file_error.patch rename to openwrt/toolchain/binutils/patches/2.17/300-006_better_file_error.patch diff --git a/openwrt/toolchain/binutils/patches/2.15.94.0.2/300-012_check_ldrunpath_length.patch b/openwrt/toolchain/binutils/patches/2.17/300-012_check_ldrunpath_length.patch similarity index 100% rename from openwrt/toolchain/binutils/patches/2.15.94.0.2/300-012_check_ldrunpath_length.patch rename to openwrt/toolchain/binutils/patches/2.17/300-012_check_ldrunpath_length.patch diff --git a/openwrt/toolchain/binutils/patches/2.16.90.0.3/702-binutils-skip-comments.patch b/openwrt/toolchain/binutils/patches/2.17/702-binutils-skip-comments.patch similarity index 100% rename from openwrt/toolchain/binutils/patches/2.16.90.0.3/702-binutils-skip-comments.patch rename to openwrt/toolchain/binutils/patches/2.17/702-binutils-skip-comments.patch diff --git a/openwrt/toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch index 9d65a6234e5..6cfbc625097 100644 --- a/openwrt/toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch +++ b/openwrt/toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch @@ -1,6 +1,5 @@ -diff -urN gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 gcc-4.1.0/libstdc++-v3/acinclude.m4 ---- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/acinclude.m4 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 ++++ gcc-4.1.0/libstdc++-v3/acinclude.m4 @@ -1071,7 +1071,7 @@ AC_MSG_CHECKING([for C locale to use]) GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], @@ -61,9 +60,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 gcc-4.1.0/libstdc++-v3/acincl esac # This is where the testsuite looks for locale catalogs, using the -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h @@ -0,0 +1,63 @@ +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- + @@ -128,9 +126,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +#endif + +#endif // GLIBC 2.3 and later -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc @@ -0,0 +1,152 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + @@ -284,9 +281,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0 +{ + const char* const* const locale::_S_categories = __gnu_cxx::category_names; +} // namespace std -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-26 13:03:42.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h @@ -0,0 +1,117 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + @@ -405,9 +401,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/ +} + +#endif -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc @@ -0,0 +1,306 @@ +// std::codecvt implementation details, GNU version -*- C++ -*- + @@ -715,9 +710,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gc + } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc @@ -0,0 +1,80 @@ +// std::collate implementation details, GNU version -*- C++ -*- + @@ -799,9 +793,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gc + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc @@ -0,0 +1,314 @@ +// std::ctype implementation details, GNU version -*- C++ -*- + @@ -1117,9 +1110,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc- + } +#endif // _GLIBCXX_USE_WCHAR_T +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc @@ -0,0 +1,100 @@ +// std::messages implementation details, GNU version -*- C++ -*- + @@ -1221,9 +1213,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc g + } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h @@ -0,0 +1,121 @@ +// std::messages implementation details, GNU version -*- C++ -*- + @@ -1346,9 +1337,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gc + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc @@ -0,0 +1,692 @@ +// std::moneypunct implementation details, GNU version -*- C++ -*- + @@ -2042,9 +2032,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc g + } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc @@ -0,0 +1,173 @@ +// std::numpunct implementation details, GNU version -*- C++ -*- + @@ -2219,9 +2208,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gc + { delete _M_data; } + #endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc @@ -0,0 +1,406 @@ +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- + @@ -2629,9 +2617,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4 + } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h 2005-10-21 02:34:06.000000000 -0600 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h @@ -0,0 +1,76 @@ +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- + @@ -2709,9 +2696,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4. + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h @@ -0,0 +1,64 @@ +// Locale support -*- C++ -*- + @@ -2777,9 +2763,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.0/li + static const mask punct = _ISpunct; + static const mask alnum = _ISalpha | _ISdigit; + }; -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h @@ -0,0 +1,69 @@ +// Locale support -*- C++ -*- + @@ -2850,9 +2835,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.1.0/ + ++__low; + return __low; + } -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h @@ -0,0 +1,92 @@ +// Locale support -*- C++ -*- + @@ -2946,9 +2930,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.1 + } + return __high; + } -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h @@ -0,0 +1,44 @@ +// Specific definitions for GNU/Linux -*- C++ -*- + @@ -2994,9 +2977,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.1.0/li +#define __NO_STRING_INLINES + +#endif -diff -urN gcc-4.1.0-dist/libstdc++-v3/configure gcc-4.1.0/libstdc++-v3/configure ---- gcc-4.1.0-dist/libstdc++-v3/configure 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/configure 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/configure ++++ gcc-4.1.0/libstdc++-v3/configure @@ -4005,6 +4005,11 @@ lt_cv_deplibs_check_method=pass_all ;; @@ -3105,9 +3087,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/configure gcc-4.1.0/libstdc++-v3/configure esac # This is where the testsuite looks for locale catalogs, using the -diff -urN gcc-4.1.0-dist/libstdc++-v3/configure.host gcc-4.1.0/libstdc++-v3/configure.host ---- gcc-4.1.0-dist/libstdc++-v3/configure.host 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/configure.host 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/configure.host ++++ gcc-4.1.0/libstdc++-v3/configure.host @@ -261,6 +261,12 @@ ;; esac @@ -3121,9 +3102,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/configure.host gcc-4.1.0/libstdc++-v3/conf # Set any OS-dependent and CPU-dependent bits. # THIS TABLE IS SORTED. KEEP IT THAT WAY. -diff -urN gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 gcc-4.1.0/libstdc++-v3/crossconfig.m4 ---- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/crossconfig.m4 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 ++++ gcc-4.1.0/libstdc++-v3/crossconfig.m4 @@ -143,6 +143,99 @@ ;; esac @@ -3233,9 +3213,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 gcc-4.1.0/libstdc++-v3/cros ;; *) AC_DEFINE(_GLIBCXX_USE_LFS) -diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h ---- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h ++++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h @@ -101,7 +101,9 @@ using std::wmemcpy; using std::wmemmove; @@ -3246,9 +3225,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.0/ #if _GLIBCXX_USE_C99 using std::wcstold; -diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h ---- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-25 22:06:30.000000000 -0700 +--- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h ++++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h @@ -180,7 +180,9 @@ using ::wcscoll; using ::wcscpy; diff --git a/openwrt/toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch index 89d03a85e53..560bcb237b3 100644 --- a/openwrt/toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch +++ b/openwrt/toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch @@ -1,20 +1,22 @@ # DP: Build and install libstdc++_pic.a library. ---- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600 -+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500 -@@ -214,6 +214,10 @@ +--- gcc/libstdc++-v3/src/Makefile.am ++++ gcc/libstdc++-v3/src/Makefile.am +@@ -214,6 +214,12 @@ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ +install-exec-local: ++ifeq ($(enable_shared),yes) + $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++endif + # Added bits to build debug library. if GLIBCXX_BUILD_DEBUG all-local: build_debug ---- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500 -+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500 +--- gcc/libstdc++-v3/src/Makefile.in ++++ gcc/libstdc++-v3/src/Makefile.in @@ -627,7 +627,7 @@ install-data-am: install-data-local @@ -32,14 +34,16 @@ install-exec-am install-info install-info-am install-man \ install-strip install-toolexeclibLTLIBRARIES installcheck \ installcheck-am installdirs maintainer-clean \ -@@ -745,6 +746,11 @@ +@@ -743,6 +743,13 @@ install_debug: (cd ${debugdir} && $(MAKE) \ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) + +install-exec-local: -+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ifeq ($(enable_shared),yes) ++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++endif + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/openwrt/toolchain/gcc/patches/4.1.1/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/patches/4.1.1/602-sdk-libstdc++-includes.patch deleted file mode 100644 index 23fce7544da..00000000000 --- a/openwrt/toolchain/gcc/patches/4.1.1/602-sdk-libstdc++-includes.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600 -+++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500 -@@ -21,5 +21,5 @@ - $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once - - # -I/-D flags to pass when compiling. --AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include - ---- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600 -+++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500 -@@ -35,7 +35,7 @@ - - libmath_la_SOURCES = stubs.c - --AM_CPPFLAGS = $(CANADIAN_INCLUDES) -+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include - - # Only compiling "C" sources in this directory. - LIBTOOL = @LIBTOOL@ --tag CC From 2af64d31a0b259a13447f6139910c573ffcc5a0b Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 30 Jun 2006 20:59:13 +0000 Subject: [PATCH 317/757] add hack for building c++ with gcc 4.1.1 SVN-Revision: 4100 --- .../gcc/patches/4.1.1/900-c++_fixes.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 openwrt/toolchain/gcc/patches/4.1.1/900-c++_fixes.patch diff --git a/openwrt/toolchain/gcc/patches/4.1.1/900-c++_fixes.patch b/openwrt/toolchain/gcc/patches/4.1.1/900-c++_fixes.patch new file mode 100644 index 00000000000..173c6e2fa5c --- /dev/null +++ b/openwrt/toolchain/gcc/patches/4.1.1/900-c++_fixes.patch @@ -0,0 +1,37 @@ +diff -ur gcc.old/libstdc++-v3/configure gcc.dev/libstdc++-v3/configure +--- gcc.old/libstdc++-v3/configure 2006-06-29 23:26:47.000000000 +0200 ++++ gcc.dev/libstdc++-v3/configure 2006-06-05 15:48:03.000000000 +0200 +@@ -5745,7 +5745,7 @@ + enableval="$enable_clocale" + + case "$enableval" in +- generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;; ++ generic|gnu|ieee_1003.1-2001|yes|no|auto) ;; + *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} + { (exit 1); exit 1; }; } ;; +@@ -6524,23 +6525,6 @@ + echo "${ECHO_T}$enable_long_long" >&6 + + +- +- # Check whether --enable-wchar_t or --disable-wchar_t was given. +-if test "${enable_wchar_t+set}" = set; then +- enableval="$enable_wchar_t" +- +- case "$enableval" in +- yes|no) ;; +- *) { { echo "$as_me:$LINENO: error: Argument to enable/disable wchar_t must be yes or no" >&5 +-echo "$as_me: error: Argument to enable/disable wchar_t must be yes or no" >&2;} +- { (exit 1); exit 1; }; } ;; +- esac +- +-else +- enable_wchar_t=yes +-fi; +- +- + # Test wchar.h for mbstate_t, which is needed for char_traits and fpos. + + for ac_header in wchar.h + From b208f8362947de7a8e5a1c5a11bee5325d3912cf Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 2 Jul 2006 00:56:53 +0000 Subject: [PATCH 318/757] always set NO_TRACE_MAKE SVN-Revision: 4104 --- openwrt/include/verbose.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index c998b3d1c99..be7d5f76bdd 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -6,6 +6,8 @@ # # $Id:$ +NO_TRACE_MAKE:=$(MAKE) V=99 + ifndef KBUILD_VERBOSE KBUILD_VERBOSE=0 ifeq ("$(origin V)", "command line") @@ -23,7 +25,6 @@ ifneq ($(KBUILD_VERBOSE),99) } else export QUIET:=1 - NO_TRACE_MAKE:=$(MAKE) V=99 ifeq ($(KBUILD_VERBOSE),0) MAKE:=&>/dev/null $(MAKE) endif From 67b51ffede25be26443dab525bf93b3e7d20296d Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 2 Jul 2006 13:36:54 +0000 Subject: [PATCH 319/757] move libpthread in since it's part of uclibc, standardize Makefile. SVN-Revision: 4105 --- openwrt/package/base-files/Makefile | 64 ++++++++++++++++++----------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index b0fd72c7671..376bd533481 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -32,12 +32,12 @@ endif CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) define Package/base-files$(TARGET) -SECTION:=base -CATEGORY:=Base system -DEFAULT:=y -TITLE:=OpenWrt system scripts -DESCRIPTION:=Base filesystem for OpenWrt -VERSION:=$(PKG_RELEASE) + SECTION:=base + CATEGORY:=Base system + DEFAULT:=y + TITLE:=OpenWrt system scripts + DESCRIPTION:=Base filesystem for OpenWrt + VERSION:=$(PKG_RELEASE) endef define -ar7-2.4/conffiles @@ -83,19 +83,28 @@ $(call $(TARGET)/conffiles) endef define Package/libgcc -SECTION:=libs -CATEGORY:=Libraries -DEFAULT:=y -TITLE:=GCC support library -VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) -DESCRIPTION:=$(TITLE) + SECTION:=libs + CATEGORY:=Libraries + DEFAULT:=y + TITLE:=GCC support library + VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) + DESCRIPTION:=$(TITLE) endef +define Package/libpthread + $(call Package/base-files$(TARGET)) + DEFAULT:=n + VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + TITLE:=POSIX thread library + DESCRIPTION:=POSIX thread library +endef + + define Package/uclibc -$(call Package/base-files$(TARGET)) -VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) -TITLE:=C library -DESCRIPTION:=C library for embedded systems + $(call Package/base-files$(TARGET)) + VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + TITLE:=C library + DESCRIPTION:=C library for embedded systems endef define Build/Prepare @@ -112,7 +121,7 @@ define Build/Compile/brcm endef define Build/Compile -$(call Build/Compile/$(BOARD)) + $(call Build/Compile/$(BOARD)) endef @@ -126,7 +135,7 @@ define Package/base-files$(TARGET)/install-brcm endef define Package/base-files$(TARGET)/install -$(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) + $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) $(CP) ./default/* $(1)/ if [ -d $(BOARD)-$(KERNEL) ]; then \ $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \ @@ -151,19 +160,26 @@ $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) mkdir -p $(1)/etc endef +define Package/libgcc/install + install -m0755 -d $(1)/lib + $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/ +endef + +define Package/libpthread/install + install -m0755 -d $(1)/lib + $(CP) $(STAGING_DIR)/lib/libpthread.so.* $(1)/lib/ + $(CP) $(STAGING_DIR)/lib/libpthread-$(UCLIBC_VERSION).so $(1)/lib/ +endef + define Package/uclibc/install - mkdir -p $(1)/lib + install -m0755 -d $(1)/lib for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \ $(CP) $(STAGING_DIR)/lib/$$$$file.so.* $(1)/lib/; \ $(CP) $(STAGING_DIR)/lib/$$$$file-$(UCLIBC_VERSION).so $(1)/lib/; \ done endef -define Package/libgcc/install - mkdir -p $(1)/lib - $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/ -endef - $(eval $(call BuildPackage,base-files$(TARGET))) $(eval $(call BuildPackage,libgcc)) +$(eval $(call BuildPackage,libpthread)) $(eval $(call BuildPackage,uclibc)) From a232bc4121cdf7cc81f7e08a92eaebc908f1db8c Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sun, 2 Jul 2006 14:57:44 +0000 Subject: [PATCH 320/757] Avoid menuconfig warnings SVN-Revision: 4106 --- openwrt/toolchain/gcc/Config.version | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openwrt/toolchain/gcc/Config.version b/openwrt/toolchain/gcc/Config.version index 80e26060521..a7bc9f5d6fe 100644 --- a/openwrt/toolchain/gcc/Config.version +++ b/openwrt/toolchain/gcc/Config.version @@ -1,20 +1,18 @@ config GCC_VERSION string - default "3.4.4" if GCC_VERSION_3_4_4 + default "3.4.4" if GCC_VERSION_3_4_4 || LINUX_2_4_BRCM default "3.4.5" if GCC_VERSION_3_4_5 default "3.4.6" if GCC_VERSION_3_4_6 default "4.0.2" if GCC_VERSION_4_0_2 - default "4.0.3" if GCC_VERSION_4_0_3 + default "4.0.3" if GCC_VERSION_4_0_3 || LINUX_2_6_ARUBA default "4.1.0" if GCC_VERSION_4_1_0 default "4.1.1" if GCC_VERSION_4_1_1 default "3.4.6" if !TOOLCHAINOPTS config GCC_VERSION_3_4_4 - default y if LINUX_2_4_BRCM config GCC_VERSION_4_0_3 - default y if LINUX_2_6_ARUBA endif From 3a09c2404f6a66bbab0ac117b066a105ed13e0fb Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sun, 2 Jul 2006 15:10:04 +0000 Subject: [PATCH 321/757] Disable squashfs for au1000 target since it does not allow the user to use the whole flash space SVN-Revision: 4107 --- openwrt/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/Config.in b/openwrt/Config.in index 573cda50a70..a2e6bddd269 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -64,6 +64,7 @@ menu "Target Images" depends !LINUX_2_6_ARUBA depends !LINUX_2_6_XSCALE depends !TARGET_ROOTFS_INITRAMFS + depends !LINUX_2_6_AU1000 help Build a squashfs-lzma root filesystem From d8088204a33a0f2ee47c477b34158d0c1fd25d4e Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sun, 2 Jul 2006 15:11:55 +0000 Subject: [PATCH 322/757] Disable the use of lzma since the alchemy images are zlib compressed and there is a lot of space. Fix makefile error when "touching" zImage.flash.srec SVN-Revision: 4108 --- openwrt/target/image/au1000/Makefile | 17 ++--------------- openwrt/target/linux/au1000-2.6/Makefile | 1 - 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/openwrt/target/image/au1000/Makefile b/openwrt/target/image/au1000/Makefile index 0d25f844974..0fb3cb2229a 100644 --- a/openwrt/target/image/au1000/Makefile +++ b/openwrt/target/image/au1000/Makefile @@ -7,28 +7,15 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -LOADADDR = 0x8108c8f4 # RAM start + 16M -KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile -RAMSIZE = 0x04000000 # 64MB - -LOADER_MAKEOPTS= \ - KDIR=$(KDIR) \ - LOADADDR=$(LOADADDR) \ - KERNEL_ENTRY=$(KERNEL_ENTRY) \ - RAMSIZE=$(RAMSIZE) - define Build/Clean - $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean endef define Image/Prepare - cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma - $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile endef define Image/Build - $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(1) $(KDIR)/root.srec - grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img + $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(1) $(KDIR)/root.$(1).srec + grep -v S7 $(KDIR)/root.$(1).srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img grep -v S0 $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img endef diff --git a/openwrt/target/linux/au1000-2.6/Makefile b/openwrt/target/linux/au1000-2.6/Makefile index a09c029d22c..5d2711cb30b 100644 --- a/openwrt/target/linux/au1000-2.6/Makefile +++ b/openwrt/target/linux/au1000-2.6/Makefile @@ -23,6 +23,5 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked $(LINUX_BUILD_DIR)/zImage.flash.srec: $(LINUX_DIR)/vmlinux $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec $(LINUX_DIR)/zImage.flash.srec $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.srec $(LINUX_DIR)/zImage.srec - touch $@ compile: $(LINUX_BUILD_DIR)/zImage.flash.srec From 20cda3ba0f5a3a85178ec4901500f8cd8b254724 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sun, 2 Jul 2006 15:50:41 +0000 Subject: [PATCH 323/757] Fancy name for au1000 target SVN-Revision: 4109 --- openwrt/target/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 8037a88c0b8..5dd905c75c0 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -84,7 +84,7 @@ config LINUX_2_6_X86 (e.g. Soekris net4521 and net4801, PC Engines WRAP...) config LINUX_2_6_AU1000 - bool "au1000 [2.6]" + bool "AMD Alchemy AUxx [2.6]" select mipsel select LINUX_2_6 select PCMCIA_SUPPORT From 44c74a0c79385ce4cbaee53ffc4f43ff1e39f904 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 3 Jul 2006 06:32:54 +0000 Subject: [PATCH 324/757] fix x86-2.4 SVN-Revision: 4113 --- openwrt/target/linux/x86-2.4/Makefile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/openwrt/target/linux/x86-2.4/Makefile b/openwrt/target/linux/x86-2.4/Makefile index 12039454e53..720fb8039db 100644 --- a/openwrt/target/linux/x86-2.4/Makefile +++ b/openwrt/target/linux/x86-2.4/Makefile @@ -24,10 +24,3 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches @$(CP) config $(LINUX_DIR)/.config touch $@ - -$(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux - $(MAKE) -C $(LINUX_DIR) TOPDIR=$(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage - $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $@ - touch $@ - -compile: $(LINUX_BUILD_DIR)/bzImage From 03d741736e0872172370badbed1ac58c1acf994d Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 3 Jul 2006 06:33:55 +0000 Subject: [PATCH 325/757] fix x86-2.6, update kernel config for 2.6.17. SVN-Revision: 4114 --- openwrt/target/linux/x86-2.6/Makefile | 7 - openwrt/target/linux/x86-2.6/config | 264 ++++++++++++++++---------- 2 files changed, 168 insertions(+), 103 deletions(-) diff --git a/openwrt/target/linux/x86-2.6/Makefile b/openwrt/target/linux/x86-2.6/Makefile index 6aa10005a4e..59f02b33404 100644 --- a/openwrt/target/linux/x86-2.6/Makefile +++ b/openwrt/target/linux/x86-2.6/Makefile @@ -19,10 +19,3 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches @$(CP) config $(LINUX_DIR)/.config touch $@ - -$(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux - $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage - $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $@ - touch $@ - -compile: $(LINUX_BUILD_DIR)/bzImage diff --git a/openwrt/target/linux/x86-2.6/config b/openwrt/target/linux/x86-2.6/config index 16264f59948..1e6397e7a5d 100644 --- a/openwrt/target/linux/x86-2.6/config +++ b/openwrt/target/linux/x86-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16 -# Tue Mar 21 10:24:36 2006 +# Linux kernel version: 2.6.17 +# Tue Jun 27 08:13:32 2006 # CONFIG_X86_32=y CONFIG_SEMAPHORE_SLEEPERS=y @@ -9,6 +9,7 @@ CONFIG_X86=y CONFIG_MMU=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y @@ -23,7 +24,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 # General setup # CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -31,7 +32,7 @@ CONFIG_SYSVIPC=y CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="" +# CONFIG_RELAY is not set CONFIG_UID16=y # CONFIG_VM86 is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -45,10 +46,6 @@ CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 @@ -60,7 +57,6 @@ CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set @@ -69,11 +65,13 @@ CONFIG_OBSOLETE_MODPARM=y # Block layer # # CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set # # IO Schedulers # -# CONFIG_IOSCHED_NOOP is not set +CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set @@ -86,6 +84,8 @@ CONFIG_DEFAULT_IOSCHED="deadline" # # Processor type and features # +CONFIG_SCx200HR_TIMER=y +# CONFIG_SMP is not set CONFIG_X86_PC=y # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set @@ -132,8 +132,6 @@ CONFIG_X86_CMPXCHG64=y CONFIG_X86_ALIGNMENT_16=y CONFIG_X86_TSC=y # CONFIG_HPET_TIMER is not set -CONFIG_SCx200HR_TIMER=y -# CONFIG_SMP is not set CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set @@ -181,7 +179,6 @@ CONFIG_HZ_100=y CONFIG_HZ=100 # CONFIG_KEXEC is not set CONFIG_PHYSICAL_START=0x100000 -CONFIG_DOUBLEFAULT=y # # Power management options (ACPI, APM) @@ -222,7 +219,6 @@ CONFIG_X86_GX_SUSPMOD=m # CONFIG_X86_P4_CLOCKMOD is not set # CONFIG_X86_CPUFREQ_NFORCE2 is not set # CONFIG_X86_LONGRUN is not set -# CONFIG_X86_LONGHAUL is not set # # shared options @@ -240,7 +236,6 @@ CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y # CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_LEGACY_PROC is not set CONFIG_ISA_DMA_API=y CONFIG_ISA=y # CONFIG_EISA is not set @@ -296,8 +291,6 @@ CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -314,18 +307,30 @@ CONFIG_IP_ROUTE_MULTIPATH=y CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m # CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set -CONFIG_IPSEC_NAT_TRAVERSAL=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set CONFIG_INET_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y +CONFIG_TCP_CONG_ADVANCED=y + +# +# TCP congestion control +# +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_SCALABLE=m # # IP: Virtual Server Configuration @@ -333,9 +338,12 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IP_VS is not set CONFIG_IPV6=m # CONFIG_IPV6_PRIVACY is not set +CONFIG_IPV6_ROUTER_PREF=y +# CONFIG_IPV6_ROUTE_INFO is not set # CONFIG_INET6_AH is not set # CONFIG_INET6_ESP is not set # CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set # CONFIG_IPV6_TUNNEL is not set CONFIG_NETFILTER=y @@ -345,29 +353,30 @@ CONFIG_NETFILTER=y # # Core Netfilter Configuration # -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m +# CONFIG_NETFILTER_NETLINK is not set CONFIG_NETFILTER_XTABLES=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set # CONFIG_NETFILTER_XT_MATCH_COMMENT is not set # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set CONFIG_NETFILTER_XT_MATCH_CONNMARK=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y # CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set # CONFIG_NETFILTER_XT_MATCH_REALM is not set # CONFIG_NETFILTER_XT_MATCH_SCTP is not set CONFIG_NETFILTER_XT_MATCH_STATE=y -# CONFIG_NETFILTER_XT_MATCH_STRING is not set +CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=y # @@ -380,29 +389,28 @@ CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=y CONFIG_IP_NF_IRC=y -CONFIG_IP_NF_NETBIOS_NS=m +# CONFIG_IP_NF_NETBIOS_NS is not set CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_LAYER7=m -# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_TIME=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_MATCH_HASHLIMIT is not set -# CONFIG_IP_NF_MATCH_POLICY is not set +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_IMQ=m @@ -421,6 +429,7 @@ CONFIG_IP_NF_NAT_FTP=y CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m @@ -428,10 +437,8 @@ CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_TTL=m # CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_RAW is not set -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_RAW=m +# CONFIG_IP_NF_ARPTABLES is not set CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 @@ -453,12 +460,10 @@ CONFIG_IP6_NF_IPTABLES=m # CONFIG_IP6_NF_MATCH_OPTS is not set # CONFIG_IP6_NF_MATCH_FRAG is not set # CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_MULTIPORT=m CONFIG_IP6_NF_MATCH_OWNER=m # CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -# CONFIG_IP6_NF_MATCH_AHESP is not set +CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m -# CONFIG_IP6_NF_MATCH_POLICY is not set CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP6_NF_TARGET_LOG is not set @@ -494,14 +499,7 @@ CONFIG_BRIDGE_EBT_ULOG=m # # DCCP Configuration (EXPERIMENTAL) # -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m +# CONFIG_IP_DCCP is not set # # SCTP Configuration (EXPERIMENTAL) @@ -522,6 +520,7 @@ CONFIG_ATM_BR2684_IPFILTER=y CONFIG_BRIDGE=y CONFIG_VLAN_8021Q=y # CONFIG_DECNET is not set +CONFIG_LLC=y # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -545,7 +544,7 @@ CONFIG_NET_SCH_CLK_JIFFIES=y CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m -# CONFIG_NET_SCH_ATM is not set +CONFIG_NET_SCH_ATM=m CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_RED=m CONFIG_NET_SCH_SFQ=m @@ -630,10 +629,12 @@ CONFIG_BT_HCIUART_BCSP=y # CONFIG_BT_HCIBTUART is not set # CONFIG_BT_HCIVHCI is not set CONFIG_IEEE80211=m -CONFIG_IEEE80211_DEBUG=y +# CONFIG_IEEE80211_DEBUG is not set CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_CRYPT_TKIP=m +# CONFIG_IEEE80211_SOFTMAC is not set +CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -644,7 +645,7 @@ CONFIG_IEEE80211_CRYPT_TKIP=m # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m +CONFIG_FW_LOADER=y # # Connector - unified userspace <-> kernelspace linker @@ -705,7 +706,6 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set -CONFIG_MTD_BLKMTD=y # CONFIG_MTD_BLOCK2MTD is not set # @@ -758,7 +758,7 @@ CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -876,6 +876,7 @@ CONFIG_BLK_DEV_SD=m # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set @@ -898,7 +899,6 @@ CONFIG_BLK_DEV_SD=m # CONFIG_SCSI_PAS16 is not set # CONFIG_SCSI_PSI240I is not set # CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -953,7 +953,7 @@ CONFIG_BLK_DEV_SD=m # CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set -CONFIG_BONDING=m +# CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set CONFIG_IMQ=m # CONFIG_IMQ_BEHAVIOR_AA is not set @@ -1073,6 +1073,7 @@ CONFIG_SIS190=m # Wireless LAN (non-hamradio) # CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y # # Obsolete Wireless cards support (pre-802.11) @@ -1095,6 +1096,8 @@ CONFIG_IPW2100=m CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1163,7 +1166,7 @@ CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m CONFIG_PPP_MPPE=m CONFIG_PPPOE=m -# CONFIG_PPPOATM is not set +CONFIG_PPPOATM=m # CONFIG_SLIP is not set # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set @@ -1221,7 +1224,9 @@ CONFIG_INPUT_EVDEV=m # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_CS is not set +# CONFIG_SERIAL_8250_PCI is not set +# CONFIG_SERIAL_8250_PNP is not set +CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=2 CONFIG_SERIAL_8250_RUNTIME_UARTS=2 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -1373,9 +1378,7 @@ CONFIG_SCx200_ACB=m # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -1403,26 +1406,27 @@ CONFIG_SCx200_ACB=m # # CONFIG_IBM_ASM is not set -# -# Multimedia Capabilities Port drivers -# - # # Multimedia devices # CONFIG_VIDEO_DEV=m +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y # -# Video For Linux +# Video Capture Adapters # # -# Video Adapters +# Video Capture Adapters # # CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_VIVI is not set # CONFIG_VIDEO_BT848 is not set # CONFIG_VIDEO_PMS is not set # CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_CPIA2 is not set # CONFIG_VIDEO_SAA5246A is not set # CONFIG_VIDEO_SAA5249 is not set # CONFIG_TUNER_3036 is not set @@ -1434,10 +1438,37 @@ CONFIG_VIDEO_DEV=m # CONFIG_VIDEO_HEXIUM_ORION is not set # CONFIG_VIDEO_HEXIUM_GEMINI is not set # CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set # CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set + +# +# Encoders and Decoders +# +# CONFIG_VIDEO_MSP3400 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_WM8775 is not set +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_CX25840 is not set +# CONFIG_VIDEO_SAA711X is not set +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set + +# +# V4L USB devices +# +# CONFIG_VIDEO_EM28XX is not set +# CONFIG_USB_DSBR is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_ET61X251 is not set +# CONFIG_USB_OV511 is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_SN9C102 is not set +# CONFIG_USB_STV680 is not set +# CONFIG_USB_W9968CF is not set +# CONFIG_USB_ZC0301 is not set +# CONFIG_USB_PWC is not set # # Radio Adapters @@ -1461,6 +1492,7 @@ CONFIG_VIDEO_DEV=m # Digital Video Broadcasting Devices # # CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set # # Graphics support @@ -1486,6 +1518,7 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_RTCTIMER is not set # CONFIG_SND_DYNAMIC_MINORS is not set # CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set @@ -1500,6 +1533,7 @@ CONFIG_SND_RAWMIDI=m # # ISA devices # +# CONFIG_SND_ADLIB is not set # CONFIG_SND_AD1816A is not set # CONFIG_SND_AD1848 is not set # CONFIG_SND_ALS100 is not set @@ -1521,6 +1555,7 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_OPTI92X_AD1848 is not set # CONFIG_SND_OPTI92X_CS4231 is not set # CONFIG_SND_OPTI93X is not set +# CONFIG_SND_MIRO is not set # CONFIG_SND_SB8 is not set # CONFIG_SND_SB16 is not set # CONFIG_SND_SBAWE is not set @@ -1532,6 +1567,7 @@ CONFIG_SND_RAWMIDI=m # PCI devices # # CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set # CONFIG_SND_ALS4000 is not set # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set @@ -1565,6 +1601,7 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set # CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set @@ -1597,8 +1634,9 @@ CONFIG_SND_USB_AUDIO=m # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=m -CONFIG_USB_DEBUG=y +# CONFIG_USB_DEBUG is not set # # Miscellaneous USB options @@ -1618,13 +1656,12 @@ CONFIG_USB_EHCI_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_UHCI_HCD is not set +CONFIG_USB_UHCI_HCD=m # CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers # -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m @@ -1636,7 +1673,7 @@ CONFIG_USB_PRINTER=m # may also be needed; see USB_STORAGE Help for more information # CONFIG_USB_STORAGE=m -CONFIG_USB_STORAGE_DEBUG=y +# CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set @@ -1664,9 +1701,7 @@ CONFIG_USB_STORAGE_DEBUG=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set +# CONFIG_USB_TOUCHSCREEN is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1680,21 +1715,6 @@ CONFIG_USB_STORAGE_DEBUG=y # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -CONFIG_USB_PWC=m - # # USB Network Adapters # @@ -1717,6 +1737,7 @@ CONFIG_USB_SERIAL=m # CONFIG_USB_SERIAL_GENERIC is not set # CONFIG_USB_SERIAL_AIRPRIME is not set # CONFIG_USB_SERIAL_ANYDATA is not set +# CONFIG_USB_SERIAL_ARK3116 is not set CONFIG_USB_SERIAL_BELKIN=m # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set @@ -1724,6 +1745,7 @@ CONFIG_USB_SERIAL_BELKIN=m # CONFIG_USB_SERIAL_CYPRESS_M8 is not set # CONFIG_USB_SERIAL_EMPEG is not set CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set CONFIG_USB_SERIAL_VISOR=m # CONFIG_USB_SERIAL_IPAQ is not set # CONFIG_USB_SERIAL_IR is not set @@ -1736,6 +1758,7 @@ CONFIG_USB_SERIAL_VISOR=m # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set CONFIG_USB_SERIAL_MCT_U232=m +# CONFIG_USB_SERIAL_NAVMAN is not set CONFIG_USB_SERIAL_PL2303=m # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set @@ -1766,7 +1789,11 @@ CONFIG_USB_SERIAL_PL2303=m # # USB DSL modem support # -# CONFIG_USB_ATM is not set +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +# CONFIG_USB_CXACRU is not set +CONFIG_USB_UEAGLEATM=m +# CONFIG_USB_XUSBATM is not set # # USB Gadget Support @@ -1778,6 +1805,23 @@ CONFIG_USB_SERIAL_PL2303=m # # CONFIG_MMC is not set +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=m +# CONFIG_LEDS_TRIGGER_IDE_DISK is not set + # # InfiniBand support # @@ -1788,6 +1832,11 @@ CONFIG_USB_SERIAL_PL2303=m # # CONFIG_EDAC is not set +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + # # File systems # @@ -1816,12 +1865,12 @@ CONFIG_XFS_FS=m # CONFIG_OCFS2_FS is not set CONFIG_MINIX_FS=m # CONFIG_ROMFS_FS is not set -# CONFIG_INOTIFY is not set +CONFIG_INOTIFY=y # CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y +# CONFIG_DNOTIFY is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=m +# CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems @@ -1833,7 +1882,7 @@ CONFIG_FUSE_FS=m # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m +# CONFIG_MSDOS_FS is not set CONFIG_VFAT_FS=m CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" @@ -1852,7 +1901,6 @@ CONFIG_TMPFS=y # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1891,10 +1939,25 @@ CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 # # Network File Systems # -# CONFIG_NFS_FS is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1979,7 +2042,11 @@ CONFIG_NLS_UTF8=m # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_UNWIND_INFO is not set CONFIG_EARLY_PRINTK=y +CONFIG_STACK_BACKTRACE_COLS=2 +CONFIG_DOUBLEFAULT=y # # Security options @@ -2031,7 +2098,12 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_X86_BIOS_REBOOT=y CONFIG_KTIME_SCALAR=y +CONFIG_INITRAMFS_SOURCE="" From ae3a5724fe40919bdebc57fd8d7bef5610101b6f Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Mon, 3 Jul 2006 06:38:27 +0000 Subject: [PATCH 326/757] remove unneeded RSTRIP calls. SVN-Revision: 4115 --- openwrt/package/iptables/Makefile | 4 ---- openwrt/package/ppp/Makefile | 1 - 2 files changed, 5 deletions(-) diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 7fdc28422d7..54a94f2c97d 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -199,13 +199,11 @@ define Package/iptables/install (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ $(CP) $(patsubst %,lib%.so,$(IPT_BUILTIN:xt_%=ipt_%)) $(1)/usr/lib/iptables/ \ ) - $(RSTRIP) $(1) endef define Package/iptables-utils/install install -d -m0755 $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables-{save,restore} $(1)/usr/sbin/ - $(RSTRIP) $(1) endef define Package/ip6tables/install @@ -215,7 +213,6 @@ define Package/ip6tables/install (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ $(CP) libip6t_*.so $(1)/usr/lib/iptables/ \ ) - $(RSTRIP) $(1) endef define BuildPlugin @@ -225,7 +222,6 @@ define Package/$(1)/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so $$(1)/usr/lib/iptables/ ; \ done $(3) - $(RSTRIP) $$(1) endef $$(eval $$(call BuildPackage,$(1))) diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index dcacbafba59..85d52d05424 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -151,7 +151,6 @@ endef define Package/pppstats/install install -d -m0755 $(1)/usr/sbin install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/ - $(RSTRIP) $(1) endef $(eval $(call BuildPackage,ppp)) From aab4d0e3cf371170a4d12f563bcf5c57956144a6 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Mon, 3 Jul 2006 13:25:25 +0000 Subject: [PATCH 327/757] Add yamonenv, utility to read and configure variables for the YAMON bootloader SVN-Revision: 4116 --- openwrt/package/yamonenv/Makefile | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 openwrt/package/yamonenv/Makefile diff --git a/openwrt/package/yamonenv/Makefile b/openwrt/package/yamonenv/Makefile new file mode 100644 index 00000000000..dfb0c82f965 --- /dev/null +++ b/openwrt/package/yamonenv/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 4091 2006-06-27 00:35:46Z mbm $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=yamonenv +PKG_VERSION:=20051022 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME)_gruen.4g__$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://meshcube.org/nylon/stable/sources/ +PKG_MD5SUM:=a3e4f24155aa3ba5aa502bc63fdaa6ad +PKG_CAT:=zcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/yamonenv +SECTION:=sys +CATEGORY:=Base system +DEPENDS:=@LINUX_2_6_AU1000@ +TITLE:=YAMON configuration utility +DESCRIPTION:=YAMON bootloader configuration utility +URL:=http://meshcube.org/nylon/stable/sources/ +endef + +define Build/Configure +endef + +define Build/Compile + $(call Build/Compile/Default,all) +endef + +define Package/yamonenv/install + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,yamonenv)) From 574b94a06b7bd9fb2e8076fd5f3414c4e9d5db15 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Fri, 7 Jul 2006 21:04:02 +0000 Subject: [PATCH 328/757] Fix brcm63xx support. Now a kernel is booting, detecting the flash, and can probably mount a filesystem Huge thanks to Nico Huber for providing working patches ! SVN-Revision: 4117 --- openwrt/target/linux/brcm63xx-2.6/Makefile | 5 +- openwrt/target/linux/brcm63xx-2.6/config | 1025 +- .../brcm63xx-2.6/patches/000-arch_mips.patch | 143 + .../brcm63xx-2.6/patches/001-bcm963xx.patch | 48189 ---------------- .../patches/001-brcm_boards.patch | 9059 +++ .../patches/002-pci_bcm96348.patch | 438 + .../patches/010-include_asm_mips.patch | 77 + .../patches/011-include_mach_bcm963xx.patch | 40 + .../brcm63xx-2.6/patches/020-bcmdrivers.patch | 3249 ++ .../brcm63xx-2.6/patches/030-boardparms.patch | 3186 + .../patches/040-bcm963xx_flashmap.patch | 135 + .../patches/050-disable-synchronize_net.patch | 13 + 12 files changed, 16814 insertions(+), 48745 deletions(-) create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/002-pci_bcm96348.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/011-include_mach_bcm963xx.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/030-boardparms.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/050-disable-synchronize_net.patch diff --git a/openwrt/target/linux/brcm63xx-2.6/Makefile b/openwrt/target/linux/brcm63xx-2.6/Makefile index ebbb84425ab..a27147491a5 100644 --- a/openwrt/target/linux/brcm63xx-2.6/Makefile +++ b/openwrt/target/linux/brcm63xx-2.6/Makefile @@ -6,9 +6,9 @@ # include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.8.1 +LINUX_VERSION:=2.6.16.7 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=9517ca999e822b898fbdc7e72796b1aa +LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e include ./config include $(INCLUDE_DIR)/kernel.mk @@ -19,6 +19,5 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked #[ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) @$(CP) config $(LINUX_DIR)/.config - @$(CP) ./files/built-in.o $(LINUX_DIR)/bcmdrivers/broadcom/ touch $@ diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index f774cfc276c..335bd645f92 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -1,77 +1,90 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.16.7 +# Fri Jul 7 21:47:39 2006 # CONFIG_MIPS=y -# CONFIG_MIPS64 is not set -# CONFIG_64BIT is not set -CONFIG_MIPS32=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -# CONFIG_FUTEX is not set -# CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y # # Machine selection # CONFIG_MIPS_BRCM=y +# CONFIG_MIPS_MTX1 is not set +# CONFIG_MIPS_BOSPORUS is not set +# CONFIG_MIPS_PB1000 is not set +# CONFIG_MIPS_PB1100 is not set +# CONFIG_MIPS_PB1500 is not set +# CONFIG_MIPS_PB1550 is not set +# CONFIG_MIPS_PB1200 is not set +# CONFIG_MIPS_DB1000 is not set +# CONFIG_MIPS_DB1100 is not set +# CONFIG_MIPS_DB1500 is not set +# CONFIG_MIPS_DB1550 is not set +# CONFIG_MIPS_DB1200 is not set +# CONFIG_MIPS_MIRAGE is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MIPS_EV64120 is not set +# CONFIG_MIPS_EV96100 is not set +# CONFIG_MIPS_IVR is not set +# CONFIG_MIPS_ITE8172 is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_LASAT is not set +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_MOMENCO_JAGUAR_ATX is not set +# CONFIG_MOMENCO_OCELOT is not set +# CONFIG_MOMENCO_OCELOT_3 is not set +# CONFIG_MOMENCO_OCELOT_C is not set +# CONFIG_MOMENCO_OCELOT_G is not set +# CONFIG_MIPS_XXS1500 is not set +# CONFIG_PNX8550_V2PCI is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set +# CONFIG_DDB5477 is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_QEMU is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SIBYTE_SWARM is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_PTSWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SNI_RM200_PCI is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set # CONFIG_BCM96338 is not set # CONFIG_BCM96345 is not set CONFIG_BCM96348=y -CONFIG_BCM_BOARD=y +# CONFIG_BCM_BOARD is not set CONFIG_BCM_SERIAL=y -CONFIG_BCM_ENET=y -CONFIG_BCM_USB=m -CONFIG_BCM_WLAN=m -CONFIG_BCM_PCI=y -CONFIG_BCM_ATMAPI=y -CONFIG_BCM_ATMTEST=m -CONFIG_BCM_ADSL=y -CONFIG_BCM_ENDPOINT=m -CONFIG_BCM_PROCFS=m -CONFIG_BCM_VDSL=m -CONFIG_BCM_SECURITY=m -CONFIG_BCM_HPNA=m +# CONFIG_BCM_ENET is not set +# CONFIG_BCM_USB is not set +# CONFIG_BCM_WLAN is not set +# CONFIG_BCM_PCI is not set +# CONFIG_BCM_ATMAPI is not set +# CONFIG_BCM_ATMTEST is not set +# CONFIG_BCM_ADSL is not set +# CONFIG_BCM_ENDPOINT is not set +CONFIG_BCM_PROCFS=y +# CONFIG_BCM_VDSL is not set +# CONFIG_BCM_SECURITY is not set +# CONFIG_BCM_HPNA is not set CONFIG_BCM_BOARD_IMPL=1 CONFIG_BCM_SERIAL_IMPL=1 -CONFIG_BCM_ENET_IMPL=2 -CONFIG_BCM_USB_IMPL=2 +CONFIG_BCM_ENET_IMPL=1 +CONFIG_BCM_USB_IMPL=1 CONFIG_BCM_WLAN_IMPL=1 CONFIG_BCM_ATMAPI_IMPL=1 CONFIG_BCM_ATMTEST_IMPL=1 @@ -82,52 +95,28 @@ CONFIG_BCM_PROCFS_IMPL=1 CONFIG_BCM_VDSL_IMPL=1 CONFIG_BCM_SECURITY_IMPL=1 CONFIG_BCM_HPNA_IMPL=0 -# CONFIG_ROOTFS_SQUASHFS is not set -CONFIG_ROOTFS_CRAMFS=y +CONFIG_ROOTFS_SQUASHFS=y +# CONFIG_ROOTFS_CRAMFS is not set # CONFIG_ROOTFS_JFFS2 is not set # CONFIG_ROOTFS_NFS is not set -CONFIG_ROOT_FLASHFS="root=31:0 ro noinitrd" -# CONFIG_MACH_JAZZ is not set -# CONFIG_BAGET_MIPS is not set -# CONFIG_MACH_VR41XX is not set -# CONFIG_TOSHIBA_JMR3927 is not set -# CONFIG_MIPS_COBALT is not set -# CONFIG_MACH_DECSTATION is not set -# CONFIG_MIPS_EV64120 is not set -# CONFIG_MIPS_EV96100 is not set -# CONFIG_MIPS_IVR is not set -# CONFIG_LASAT is not set -# CONFIG_MIPS_ITE8172 is not set -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_MALTA is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_MOMENCO_OCELOT is not set -# CONFIG_MOMENCO_OCELOT_G is not set -# CONFIG_MOMENCO_OCELOT_C is not set -# CONFIG_MOMENCO_JAGUAR_ATX is not set -# CONFIG_PMC_YOSEMITE is not set -# CONFIG_DDB5074 is not set -# CONFIG_DDB5476 is not set -# CONFIG_DDB5477 is not set -# CONFIG_NEC_OSPREY is not set -# CONFIG_SGI_IP22 is not set -# CONFIG_SGI_IP32 is not set -# CONFIG_SOC_AU1X00 is not set -# CONFIG_SIBYTE_SB1xxx_SOC is not set -# CONFIG_SNI_RM200_PCI is not set -# CONFIG_TOSHIBA_RBTX4927 is not set +CONFIG_ROOT_FLASHFS="root=/dev/mtdblock2 rootfstype=cramfs,squashfs,jffs2 noinitrd console=ttyS0,115200" CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_HAVE_DEC_LOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_DMA_NONCOHERENT=y +CONFIG_DMA_NEED_PCI_MAP_STATE=y +CONFIG_CPU_BIG_ENDIAN=y # CONFIG_CPU_LITTLE_ENDIAN is not set +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_IRQ_CPU=y CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set # # CPU selection # -CONFIG_CPU_MIPS32=y -# CONFIG_CPU_MIPS64 is not set +CONFIG_CPU_MIPS32_R1=y +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set # CONFIG_CPU_R3000 is not set # CONFIG_CPU_TX39XX is not set # CONFIG_CPU_VR41XX is not set @@ -143,37 +132,132 @@ CONFIG_CPU_MIPS32=y # CONFIG_CPU_RM7000 is not set # CONFIG_CPU_RM9000 is not set # CONFIG_CPU_SB1 is not set +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y + +# +# Kernel type +# +CONFIG_32BIT=y +# CONFIG_64BIT is not set CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +CONFIG_SLAB=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_OBSOLETE_MODPARM=y +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_LBD=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" # # Bus options (PCI, PCMCIA, EISA, ISA, TC) # -CONFIG_PCI=y -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y +CONFIG_HW_HAS_PCI=y +# CONFIG_PCI is not set CONFIG_MMU=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -# CONFIG_PCMCIA is not set +# CONFIG_PCCARD is not set # # PCI Hotplug Support # -# CONFIG_HOTPLUG_PCI is not set # # Executable file formats @@ -181,7 +265,79 @@ CONFIG_MMU=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_TRAD_SIGNALS=y -# CONFIG_BINFMT_IRIX is not set + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_IEEE80211 is not set # # Device Drivers @@ -190,31 +346,39 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # -# CONFIG_STANDALONE is not set +CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set +# +# Connector - unified userspace <-> kernelspace linker +# +# CONFIG_CONNECTOR is not set + # # Memory Technology Devices (MTD) # CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_DEBUG=y +CONFIG_MTD_DEBUG_VERBOSE=3 +CONFIG_MTD_CONCAT=y CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_CONCAT is not set CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y -# CONFIG_MTD_CMDLINE_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y # # User Modules And Translation Layers # -# CONFIG_MTD_CHAR is not set +CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set # # RAM/ROM/Flash chip drivers @@ -241,6 +405,7 @@ CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access @@ -248,16 +413,16 @@ CONFIG_MTD_CFI_UTIL=y CONFIG_MTD_COMPLEX_MAPPINGS=y # CONFIG_MTD_PHYSMAP is not set CONFIG_MTD_BCM963XX=y -# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PLATRAM is not set # # Self-contained MTD device drivers # -# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -271,6 +436,11 @@ CONFIG_MTD_BCM963XX=y # # CONFIG_MTD_NAND is not set +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + # # Parallel port support # @@ -283,16 +453,13 @@ CONFIG_MTD_BCM963XX=y # # Block devices # -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set -# CONFIG_LBD is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -302,6 +469,7 @@ CONFIG_MTD_BCM963XX=y # # SCSI device support # +# CONFIG_RAID_ATTRS is not set # CONFIG_SCSI is not set # @@ -312,291 +480,61 @@ CONFIG_MTD_BCM963XX=y # # Fusion MPT device support # +# CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # -# CONFIG_IEEE1394 is not set # # I2O device support # -# CONFIG_I2O is not set # -# Networking support +# Network device support # -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -# CONFIG_NETLINK_DEV is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -CONFIG_IP_MROUTE=y -# CONFIG_IP_PIMSM_V1 is not set -# CONFIG_IP_PIMSM_V2 is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_BRIDGE_NETFILTER is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_FTP=y -CONFIG_IP_NF_H323=y -CONFIG_IP_NF_IRC=y -CONFIG_IP_NF_TFTP=y -# CONFIG_IP_NF_AMANDA is not set -# CONFIG_IP_NF_DTX8 is not set -CONFIG_IP_NF_WM=m -CONFIG_IP_NF_PT=m -CONFIG_IP_NF_IPSEC=m -# CONFIG_IP_NF_RTSP is not set -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_LIMIT=y -CONFIG_IP_NF_MATCH_IPRANGE=y -CONFIG_IP_NF_MATCH_MAC=y -# CONFIG_IP_NF_MATCH_PKTTYPE is not set -CONFIG_IP_NF_MATCH_MARK=y -# CONFIG_IP_NF_MATCH_MULTIPORT is not set -# CONFIG_IP_NF_MATCH_TOS is not set -# CONFIG_IP_NF_MATCH_RECENT is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_DSCP is not set -# CONFIG_IP_NF_MATCH_AH_ESP is not set -# CONFIG_IP_NF_MATCH_LENGTH is not set -# CONFIG_IP_NF_MATCH_TTL is not set -# CONFIG_IP_NF_MATCH_TCPMSS is not set -# CONFIG_IP_NF_MATCH_HELPER is not set -CONFIG_IP_NF_MATCH_STATE=y -# CONFIG_IP_NF_MATCH_CONNTRACK is not set -# CONFIG_IP_NF_MATCH_OWNER is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -CONFIG_IP_NF_NAT_LOCAL=y -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=y -CONFIG_IP_NF_NAT_FTP=y -CONFIG_IP_NF_NAT_H323=y -CONFIG_IP_NF_NAT_TFTP=y -CONFIG_IP_NF_NAT_IPSEC=m -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_TOS is not set -# CONFIG_IP_NF_TARGET_FTOS is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_DSCP is not set -CONFIG_IP_NF_TARGET_MARK=y -# CONFIG_IP_NF_TARGET_CLASSIFY is not set -CONFIG_IP_NF_TARGET_LOG=y -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_IP_NF_TARGET_TCPMSS=y -# CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_REALM is not set -# CONFIG_IP_NF_PPTP is not set - -# -# Bridge: Netfilter Configuration -# -# CONFIG_BRIDGE_NF_EBTABLES is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -CONFIG_ATM=y -CONFIG_ATM_CLIP=y -# CONFIG_ATM_CLIP_NO_ICMP is not set -# CONFIG_ATM_LANE is not set -CONFIG_ATM_BR2684=y -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_ATM_RT2684=y -CONFIG_BRIDGE=y -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_BCSP_TXCRC=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # -# ARCnet devices +# PHY device support # -# CONFIG_ARCNET is not set # # Ethernet (10 or 100Mbit) # -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -# CONFIG_NET_PCI is not set +# CONFIG_NET_ETHERNET is not set # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set # # Ethernet (10000 Mbit) # -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set # # Token Ring devices # -# CONFIG_TR is not set # # Wireless LAN (non-hamradio) # -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_HERMES is not set -# CONFIG_ATMEL is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -# CONFIG_PRISM54 is not set -CONFIG_NET_WIRELESS=y +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_TCP is not set -# CONFIG_ATM_LANAI is not set -# CONFIG_ATM_ENI is not set -# CONFIG_ATM_FIRESTREAM is not set -# CONFIG_ATM_ZATM is not set -# CONFIG_ATM_NICSTAR is not set -# CONFIG_ATM_IDT77252 is not set -# CONFIG_ATM_AMBASSADOR is not set -# CONFIG_ATM_HORIZON is not set -# CONFIG_ATM_IA is not set -# CONFIG_ATM_FORE200E_MAYBE is not set -# CONFIG_ATM_HE is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPPOE=y -CONFIG_PPPOATM=y +# CONFIG_PPP is not set # CONFIG_SLIP is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set # # ISDN subsystem @@ -611,73 +549,30 @@ CONFIG_PPPOATM=y # # Input device support # -CONFIG_INPUT=y +# CONFIG_INPUT is not set # -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers +# Hardware I/O ports # +# CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set # # Character devices # -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y +# CONFIG_VT is not set # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=2 -# CONFIG_QIC02_TAPE is not set +# CONFIG_LEGACY_PTYS is not set # # IPMI @@ -692,29 +587,50 @@ CONFIG_LEGACY_PTY_COUNT=2 # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set -# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + # # I2C support # # CONFIG_I2C is not set +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + # # Dallas's 1-wire bus # # CONFIG_W1 is not set +# +# Hardware Monitoring support +# +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + # # Misc devices # +# +# Multimedia Capabilities Port drivers +# + # # Multimedia devices # @@ -728,13 +644,7 @@ CONFIG_LEGACY_PTY_COUNT=2 # # Graphics support # - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB is not set # # Sound @@ -744,122 +654,49 @@ CONFIG_DUMMY_CONSOLE=y # # USB support # -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set # -# Miscellaneous USB options +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # -CONFIG_USB_DEVICEFS=y -CONFIG_USB_BANDWIDTH=y -CONFIG_USB_DYNAMIC_MINORS=y - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# - -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_STORAGE is not set - -# -# USB Human Interface Devices (HID) -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_SPEEDTOUCH is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_TEST is not set # # USB Gadget Support # # CONFIG_USB_GADGET is not set +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# + # # File systems # # CONFIG_EXT2_FS is not set # CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set # CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems @@ -880,13 +717,11 @@ CONFIG_USB_UHCI_HCD=m CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set +# CONFIG_CONFIGFS_FS is not set # # Miscellaneous filesystems @@ -899,11 +734,15 @@ CONFIG_RAMFS=y # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_SQUASHFS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +CONFIG_JFFS2_SUMMARY=y +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=y -# CONFIG_LZMA_FS_INFLATE is not set -CONFIG_ZLIB_FS_INFLATE=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set @@ -915,41 +754,113 @@ CONFIG_ZLIB_FS_INFLATE=y # # CONFIG_NFS_FS is not set # CONFIG_NFSD is not set -# CONFIG_EXPORTFS is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set # # Partition Types # -# CONFIG_PARTITION_ADVANCED is not set -# CONFIG_MSDOS_PARTITION is not set +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set # # Native Language Support # -# CONFIG_NLS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# Profiling support +# +# CONFIG_PROFILING is not set # # Kernel hacking # +# CONFIG_PRINTK_TIME is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DETECT_SOFTLOCKUP is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_VM=y +CONFIG_FORCED_INLINING=y +# CONFIG_RCU_TORTURE_TEST is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_SLAB is not set # CONFIG_KGDB is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_RUNTIME_DEBUG is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_MIPS_UNCACHED is not set +CONFIG_RUNTIME_DEBUG=y +CONFIG_MIPS_UNCACHED=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -957,32 +868,40 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m +# CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=y +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_DEFLATE=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_TEST is not set +# +# Hardware crypto devices +# + # # Library routines # CONFIG_CRC_CCITT=y -CONFIG_CRC32=m -CONFIG_LIBCRC32C=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m +CONFIG_ZLIB_DEFLATE=y diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch b/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch new file mode 100644 index 00000000000..bcb3469769f --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch @@ -0,0 +1,143 @@ +diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/Kconfig linux-2.6.16.7-patched/arch/mips/Kconfig +--- linux-2.6.16.7-generic-patched/arch/mips/Kconfig 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/arch/mips/Kconfig 2006-07-05 15:21:58.000000000 +0200 +@@ -10,7 +10,16 @@ menu "Machine selection" + + choice + prompt "System type" +- default SGI_IP22 ++ default MIPS_BRCM ++ ++config MIPS_BRCM ++ bool "Support for the Broadcom boards" ++ select SYS_SUPPORTS_32BIT_KERNEL ++ select SYS_SUPPORTS_BIG_ENDIAN ++ select SYS_HAS_CPU_MIPS32_R1 ++ select IRQ_CPU ++ help ++ This is a fmaily of boards based on the Broadcom MIPS32 + + config MIPS_MTX1 + bool "Support for 4G Systems MTX-1 board" +@@ -777,6 +786,7 @@ config TOSHIBA_RBTX4938 + + endchoice + ++source "arch/mips/brcm-boards/bcm963xx/Kconfig" + source "arch/mips/ddb5xxx/Kconfig" + source "arch/mips/gt64120/ev64120/Kconfig" + source "arch/mips/jazz/Kconfig" +@@ -1046,7 +1056,7 @@ menu "CPU selection" + + choice + prompt "CPU type" +- default CPU_R4X00 ++ default CPU_MIPS32_R1 + + config CPU_MIPS32_R1 + bool "MIPS32 Release 1" +diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/Makefile linux-2.6.16.7-patched/arch/mips/Makefile +--- linux-2.6.16.7-generic-patched/arch/mips/Makefile 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/arch/mips/Makefile 2006-07-05 15:21:58.000000000 +0200 +@@ -279,6 +279,20 @@ libs-$(CONFIG_SIBYTE_CFE) += arch/mips/s + # + + # ++# Broadcom board ++# ++core-$(CONFIG_MIPS_BRCM) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/ ++core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/serial/impl1/ ++#core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/board/bcm963xx/impl1/ ++#core-$(CONFIG_MIPS_BRCM) += boardparms/bcm963xx/ ++cflags-$(CONFIG_MIPS_BRCM) += -Iinclude/asm-mips/mach-bcm963xx ++cflags-$(CONFIG_MIPS_BRCM) += -Iarch/mips/brcm-boards/generic/include ++cflags-$(CONFIG_MIPS_BRCM) += -Ibcmdrivers/opensource/include/bcm963xx ++cflags-$(CONFIG_MIPS_BRCM) += -Iboardparms/bcm963xx ++load-$(CONFIG_MIPS_BRCM) += 0xffffffff80010000 ++ ++ ++# + # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. + # + core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/ +diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/kernel/cpu-probe.c linux-2.6.16.7-patched/arch/mips/kernel/cpu-probe.c +--- linux-2.6.16.7-generic-patched/arch/mips/kernel/cpu-probe.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/arch/mips/kernel/cpu-probe.c 2006-07-05 15:21:58.000000000 +0200 +@@ -558,6 +558,25 @@ static inline void decode_configs(struct + return; + } + ++static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) ++{ ++ decode_configs(c); ++ switch (c->processor_id & 0xff00) { ++ case PRID_IMP_BCM6338: ++ c->cputype = CPU_BCM6338; ++ break; ++ case PRID_IMP_BCM6345: ++ c->cputype = CPU_BCM6345; ++ break; ++ case PRID_IMP_BCM6348: ++ c->cputype = CPU_BCM6348; ++ break; ++ default: ++ c->cputype = CPU_UNKNOWN; ++ break; ++ } ++} ++ + static inline void cpu_probe_mips(struct cpuinfo_mips *c) + { + decode_configs(c); +@@ -691,6 +710,9 @@ __init void cpu_probe(void) + case PRID_COMP_LEGACY: + cpu_probe_legacy(c); + break; ++ case PRID_COMP_BROADCOM: ++ cpu_probe_broadcom(c); ++ break; + case PRID_COMP_MIPS: + cpu_probe_mips(c); + break; +diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/kernel/proc.c linux-2.6.16.7-patched/arch/mips/kernel/proc.c +--- linux-2.6.16.7-generic-patched/arch/mips/kernel/proc.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/arch/mips/kernel/proc.c 2006-07-05 15:21:58.000000000 +0200 +@@ -81,6 +81,9 @@ static const char *cpu_name[] = { + [CPU_VR4133] = "NEC VR4133", + [CPU_VR4181] = "NEC VR4181", + [CPU_VR4181A] = "NEC VR4181A", ++ [CPU_BCM6338] = "BCM6338", ++ [CPU_BCM6345] = "BCM6345", ++ [CPU_BCM6348] = "BCM6348", + [CPU_SR71000] = "Sandcraft SR71000", + [CPU_PR4450] = "Philips PR4450", + }; +diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/mm/c-r4k.c linux-2.6.16.7-patched/arch/mips/mm/c-r4k.c +--- linux-2.6.16.7-generic-patched/arch/mips/mm/c-r4k.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/arch/mips/mm/c-r4k.c 2006-07-05 15:21:58.000000000 +0200 +@@ -889,6 +889,12 @@ static void __init probe_pcache(void) + if (!(config & MIPS_CONF_M)) + panic("Don't know how to probe P-caches on this cpu."); + ++ if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348){ ++ printk("brcm mips: enabling icache and dcache...\n"); ++ /* Enable caches */ ++ write_c0_diag(read_c0_diag() | 0xC0000000); ++ } ++ + /* + * So we seem to be a MIPS32 or MIPS64 CPU + * So let's probe the I-cache ... +diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/mm/tlbex.c linux-2.6.16.7-patched/arch/mips/mm/tlbex.c +--- linux-2.6.16.7-generic-patched/arch/mips/mm/tlbex.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/arch/mips/mm/tlbex.c 2006-07-05 15:21:58.000000000 +0200 +@@ -858,6 +858,9 @@ static __init void build_tlb_write_entry + case CPU_4KSC: + case CPU_20KC: + case CPU_25KF: ++ case CPU_BCM6338: ++ case CPU_BCM6345: ++ case CPU_BCM6348: + tlbw(p); + break; + diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch deleted file mode 100644 index 185575f670a..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch +++ /dev/null @@ -1,48189 +0,0 @@ -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig ---- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,169 @@ -+# Kernel and Driver configuration for Broadcom Commengine ADSL board -+choice -+ prompt "Broadcom Commengine ADSL board" -+ depends on MIPS_BRCM -+ default BCM96345 -+ help -+ Select different Broadcom ADSL board -+ -+config BCM96338 -+ bool "96338 ADSL board" -+ select DMA_NONCOHERENT -+ -+config BCM96345 -+ bool "96345 ADSL board" -+ select DMA_NONCOHERENT -+ -+config BCM96348 -+ bool "96348 ADSL board" -+ select DMA_NONCOHERENT -+ -+endchoice -+ -+config BCM_BOARD -+ bool "Support for Broadcom Board" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SERIAL -+ bool "Support for Serial Port" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENET -+ tristate "Support for Ethernet" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_USB -+ tristate "Support for USB" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_WLAN -+ tristate "Support for Wireless" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PCI -+ bool "Support for PCI" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ select PCI -+ -+config BCM_ATMAPI -+ tristate "Support for ATM" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMTEST -+ tristate "Support for ATM Diagnostic" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ADSL -+ tristate "Support for ADSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENDPOINT -+ tristate "Support for VOICE" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PROCFS -+ tristate "Support for PROCFS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_VDSL -+ tristate "Support for VDSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SECURITY -+ tristate "Support for SECURITY" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_HPNA -+ tristate "Support for HPNA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_BOARD_IMPL -+ int "Implementation index for ADSL Board" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SERIAL_IMPL -+ int "Implementation index for Serial" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENET_IMPL -+ int "Implementation index for Ethernet" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_USB_IMPL -+ int "Implementation index for USB" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_WLAN_IMPL -+ int "Implementation index for WIRELESS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMAPI_IMPL -+ int "Implementation index for ATM" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMTEST_IMPL -+ int "Implementation index for ATM Diagnostic" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_BLAA_IMPL -+ int "Implementation index for BLAA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ADSL_IMPL -+ int "Implementation index for ADSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENDPOINT_IMPL -+ int "Implementation index for VOICE" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PROCFS_IMPL -+ int "Implementation index for PROCFS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_VDSL_IMPL -+ int "Implementation index for VDSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SECURITY_IMPL -+ int "Implementation index for SECURITY" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_HPNA_IMPL -+ int "Implementation index for HPNA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+choice -+ prompt "Root File System" -+ depends on MIPS_BRCM -+ default ROOTFS_SQUASHFS -+ help -+ Select root file system on the board flash. -+ -+config ROOTFS_SQUASHFS -+ bool "SQUASHFS" -+config ROOTFS_CRAMFS -+ bool "CRAMFS" -+config ROOTFS_JFFS2 -+ bool "JFFS2" -+config ROOTFS_NFS -+ bool "NFS" -+ -+endchoice -+ -+config ROOT_FLASHFS -+ string "flash partition" -+ depends on ROOTFS_SQUASHFS || ROOTFS_CRAMFS || ROOTFS_JFFS2 -+ default "root=31:0 ro noinitrd" if ROOTFS_SQUASHFS = y || ROOTFS_CRAMFS = y -+ default "root=31:2 ro noinitrd" if ROOTFS_JFFS2 = y -+ help -+ This is the root file system partition on flash memory -+ -+config ROOT_NFS_DIR -+ string "NFS server path" -+ depends on ROOTFS_NFS -+ default "/opt/bcm96338/targets/96338R/fs" if BCM96338 = y -+ default "/opt/bcm96345/targets/96345R/fs" if BCM96345 = y -+ default "/opt/bcm96348/targets/96348R/fs" if BCM96348 = y -+ help -+ This is the path of NFS server (host system) -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile ---- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,23 @@ -+# -+# Makefile for generic Broadcom MIPS boards -+# -+# Copyright (C) 2004 Broadcom Corporation -+# -+obj-y := irq.o prom.o setup.o time.o ser_init.o -+ -+SRCBASE := $(TOPDIR) -+EXTRA_CFLAGS += -I$(INC_BRCMBOARDPARMS_PATH)/$(BRCM_BOARD) -I$(SRCBASE)/include -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+#EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -DDBG -+EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -+ -+ -+ifeq "$(ADSL)" "ANNEX_B" -+EXTRA_CFLAGS += -DADSL_ANNEXB -+endif -+ifeq "$(ADSL)" "SADSL" -+EXTRA_CFLAGS += -DADSL_SADSL -+endif -+ifeq "$(ADSL)" "ANNEX_C" -+EXTRA_CFLAGS += -DADSL_ANNEXC -+endif -+ -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c ---- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,276 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Interrupt control functions for Broadcom 963xx MIPS boards -+ */ -+ -+#include <asm/atomic.h> -+ -+#include <linux/delay.h> -+#include <linux/init.h> -+#include <linux/ioport.h> -+#include <linux/irq.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/slab.h> -+#include <linux/module.h> -+ -+#include <asm/irq.h> -+#include <asm/mipsregs.h> -+#include <asm/addrspace.h> -+#include <asm/signal.h> -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+extern asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs); -+ -+static void irq_dispatch_int(struct pt_regs *regs) -+{ -+ unsigned int pendingIrqs; -+ static unsigned int irqBit; -+ static unsigned int isrNumber = 31; -+ -+ pendingIrqs = PERF->IrqStatus & PERF->IrqMask; -+ if (!pendingIrqs) { -+ return; -+ } -+ -+ while (1) { -+ irqBit <<= 1; -+ isrNumber++; -+ if (isrNumber == 32) { -+ isrNumber = 0; -+ irqBit = 0x1; -+ } -+ if (pendingIrqs & irqBit) { -+ PERF->IrqMask &= ~irqBit; // mask -+ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET, regs); -+ break; -+ } -+ } -+} -+ -+static void irq_dispatch_ext(uint32 irq, struct pt_regs *regs) -+{ -+ if (!(PERF->ExtIrqCfg & (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)))) { -+ printk("**** Ext IRQ mask. Should not dispatch ****\n"); -+ } -+ /* disable and clear interrupt in the controller */ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ do_IRQ(irq, regs); -+} -+ -+void brcm_irq_dispatch(struct pt_regs *regs) -+{ -+ u32 cause; -+ while((cause = (read_c0_cause()& CAUSEF_IP))) { -+ if (cause & CAUSEF_IP7) -+ do_IRQ(MIPS_TIMER_INT, regs); -+ else if (cause & CAUSEF_IP2) -+ irq_dispatch_int(regs); -+ else if (cause & CAUSEF_IP3) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); -+ else if (cause & CAUSEF_IP4) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); -+ else if (cause & CAUSEF_IP5) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); -+ else if (cause & CAUSEF_IP6) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); -+ cli(); -+ } -+} -+ -+ -+void enable_brcm_irq(unsigned int irq) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { -+ PERF->IrqMask |= (1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); -+ } -+ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { -+ /* enable and clear interrupt in the controller */ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ } -+ local_irq_restore(flags); -+} -+ -+void disable_brcm_irq(unsigned int irq) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { -+ PERF->IrqMask &= ~(1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); -+ } -+ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { -+ /* disable interrupt in the controller */ -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ } -+ local_irq_restore(flags); -+} -+ -+void ack_brcm_irq(unsigned int irq) -+{ -+ /* Already done in brcm_irq_dispatch */ -+} -+ -+unsigned int startup_brcm_irq(unsigned int irq) -+{ -+ enable_brcm_irq(irq); -+ -+ return 0; /* never anything pending */ -+} -+ -+unsigned int startup_brcm_none(unsigned int irq) -+{ -+ return 0; -+} -+ -+void end_brcm_irq(unsigned int irq) -+{ -+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) -+ enable_brcm_irq(irq); -+} -+ -+void end_brcm_none(unsigned int irq) -+{ -+} -+ -+#define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) -+ -+static void __init brcm_irq_setup(void) -+{ -+ extern asmlinkage void brcmIRQ(void); -+ -+ clear_c0_status(ST0_BEV); -+ set_except_vector(0, brcmIRQ); -+ change_c0_status(ST0_IM, ALLINTS_NOTIMER); -+ -+#ifdef CONFIG_REMOTE_DEBUG -+ rs_kgdb_hook(0); -+#endif -+} -+ -+static struct hw_interrupt_type brcm_irq_type = { -+ .typename = "MIPS", -+ .startup = startup_brcm_irq, -+ .shutdown = disable_brcm_irq, -+ .enable = enable_brcm_irq, -+ .disable = disable_brcm_irq, -+ .ack = ack_brcm_irq, -+ .end = end_brcm_irq, -+ .set_affinity = NULL -+}; -+ -+static struct hw_interrupt_type brcm_irq_no_end_type = { -+ .typename = "MIPS", -+ .startup = startup_brcm_none, -+ .shutdown = disable_brcm_irq, -+ .enable = enable_brcm_irq, -+ .disable = disable_brcm_irq, -+ .ack = ack_brcm_irq, -+ .end = end_brcm_none, -+ .set_affinity = NULL -+}; -+ -+void __init arch_init_irq(void) -+{ -+ int i; -+ -+ for (i = 0; i < NR_IRQS; i++) { -+ irq_desc[i].status = IRQ_DISABLED; -+ irq_desc[i].action = 0; -+ irq_desc[i].depth = 1; -+ irq_desc[i].handler = &brcm_irq_type; -+ } -+ -+ brcm_irq_setup(); -+} -+ -+int request_external_irq(unsigned int irq, -+ FN_HANDLER handler, -+ unsigned long irqflags, -+ const char * devname, -+ void *dev_id) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); // Clear -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); // Mask -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_INSENS_SHFT)); // Edge insesnsitive -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_LEVEL_SHFT)); // Level triggered -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_SENSE_SHFT)); // Low level -+ -+ local_irq_restore(flags); -+ -+ return( request_irq(irq, handler, irqflags, devname, dev_id) ); -+} -+ -+/* VxWorks compatibility function(s). */ -+ -+unsigned int BcmHalMapInterrupt(FN_HANDLER pfunc, unsigned int param, -+ unsigned int interruptId) -+{ -+ int nRet = -1; -+ char *devname; -+ -+ devname = kmalloc(16, GFP_KERNEL); -+ if (devname) -+ sprintf( devname, "brcm_%d", interruptId ); -+ -+ /* Set the IRQ description to not automatically enable the interrupt at -+ * the end of an ISR. The driver that handles the interrupt must -+ * explicitly call BcmHalInterruptEnable or enable_brcm_irq. This behavior -+ * is consistent with interrupt handling on VxWorks. -+ */ -+ irq_desc[interruptId].handler = &brcm_irq_no_end_type; -+ -+ if( interruptId >= INTERNAL_ISR_TABLE_OFFSET ) -+ { -+ nRet = request_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, -+ devname, (void *) param ); -+ } -+ else if (interruptId >= INTERRUPT_ID_EXTERNAL_0 && interruptId <= INTERRUPT_ID_EXTERNAL_3) -+ { -+ nRet = request_external_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, -+ devname, (void *) param ); -+ } -+ -+ return( nRet ); -+} -+ -+ -+/* Debug function. */ -+ -+void dump_intr_regs(void) -+{ -+ printk("PERF->ExtIrqCfg [%08x]\n", *(&(PERF->ExtIrqCfg))); -+} -+ -+EXPORT_SYMBOL(enable_brcm_irq); -+EXPORT_SYMBOL(disable_brcm_irq); -+EXPORT_SYMBOL(request_external_irq); -+EXPORT_SYMBOL(BcmHalMapInterrupt); -+ -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c ---- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,233 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * prom.c: PROM library initialization code. -+ * -+ */ -+#include <linux/init.h> -+#include <linux/mm.h> -+#include <linux/sched.h> -+#include <linux/bootmem.h> -+#include <linux/blkdev.h> -+#include <asm/addrspace.h> -+#include <asm/bootinfo.h> -+#include <asm/cpu.h> -+#include <asm/time.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#include "boardparms.h" -+#include "softdsl/AdslCoreDefs.h" -+ -+ -+extern int do_syslog(int, char *, int); -+extern void serial_init(void); -+extern void __init InitNvramInfo( void ); -+extern void kerSysFlashInit( void ); -+extern unsigned long get_nvram_start_addr(void); -+void __init create_root_nfs_cmdline( char *cmdline ); -+ -+#if defined(CONFIG_BCM96338) -+#define CPU_CLOCK 240000000 -+#define MACH_BCM MACH_BCM96338 -+#endif -+#if defined(CONFIG_BCM96345) -+#define CPU_CLOCK 140000000 -+#define MACH_BCM MACH_BCM96345 -+#endif -+#if defined(CONFIG_BCM96348) -+void __init calculateCpuSpeed(void); -+static unsigned long cpu_speed; -+#define CPU_CLOCK cpu_speed -+#define MACH_BCM MACH_BCM96348 -+#endif -+ -+const char *get_system_type(void) -+{ -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ -+ return( pNvramData->szBoardId ); -+} -+ -+unsigned long getMemorySize(void) -+{ -+ unsigned long ulSdramType = BOARD_SDRAM_TYPE; -+ -+ unsigned long ulSdramSize; -+ -+ switch( ulSdramType ) -+ { -+ case BP_MEMORY_16MB_1_CHIP: -+ case BP_MEMORY_16MB_2_CHIP: -+ ulSdramSize = 16 * 1024 * 1024; -+ break; -+ case BP_MEMORY_32MB_1_CHIP: -+ case BP_MEMORY_32MB_2_CHIP: -+ ulSdramSize = 32 * 1024 * 1024; -+ break; -+ case BP_MEMORY_64MB_2_CHIP: -+ ulSdramSize = 64 * 1024 * 1024; -+ break; -+ default: -+ ulSdramSize = 8 * 1024 * 1024; -+ break; -+ } -+ -+ return ulSdramSize; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: prom_init -+ -------------------------------------------------------------------------- */ -+void __init prom_init(void) -+{ -+ extern ulong r4k_interval; -+ -+ serial_init(); -+ -+ kerSysFlashInit(); -+ -+ do_syslog(8, NULL, 8); -+ -+ printk( "%s prom init\n", get_system_type() ); -+ -+ PERF->IrqMask = 0; -+ -+ arcs_cmdline[0] = '\0'; -+ -+#if defined(CONFIG_ROOT_NFS) -+ create_root_nfs_cmdline( arcs_cmdline ); -+#elif defined(CONFIG_ROOT_FLASHFS) -+ strcpy(arcs_cmdline, CONFIG_ROOT_FLASHFS); -+#endif -+ -+ add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); -+ -+#if defined(CONFIG_BCM96348) -+ calculateCpuSpeed(); -+#endif -+ /* Count register increments every other clock */ -+ r4k_interval = CPU_CLOCK / HZ / 2; -+ mips_hpt_frequency = CPU_CLOCK / 2; -+ -+ mips_machgroup = MACH_GROUP_BRCM; -+ mips_machtype = MACH_BCM; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: prom_free_prom_memory -+Abstract: -+ -------------------------------------------------------------------------- */ -+void __init prom_free_prom_memory(void) -+{ -+ -+} -+ -+ -+#if defined(CONFIG_ROOT_NFS) -+/* This function reads in a line that looks something like this: -+ * -+ * -+ * CFE bootline=bcmEnet(0,0)host:vmlinux e=192.169.0.100:ffffff00 h=192.169.0.1 -+ * -+ * -+ * and retuns in the cmdline parameter some that looks like this: -+ * -+ * CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/opt/targets/96345R/fs -+ * ip=192.168.0.100:192.168.0.1::255.255.255.0::eth0:off rw" -+ */ -+#define BOOT_LINE_ADDR 0x0 -+#define HEXDIGIT(d) ((d >= '0' && d <= '9') ? (d - '0') : ((d | 0x20) - 'W')) -+#define HEXBYTE(b) (HEXDIGIT((b)[0]) << 4) + HEXDIGIT((b)[1]) -+extern unsigned long get_nvram_start_addr(void); -+ -+void __init create_root_nfs_cmdline( char *cmdline ) -+{ -+ char root_nfs_cl[] = "root=/dev/nfs nfsroot=%s:" CONFIG_ROOT_NFS_DIR -+ " ip=%s:%s::%s::eth0:off rw"; -+ -+ char *localip = NULL; -+ char *hostip = NULL; -+ char mask[16] = ""; -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ char bootline[128] = ""; -+ char *p = bootline; -+ -+ memcpy(bootline, pNvramData->szBootline, sizeof(bootline)); -+ while( *p ) -+ { -+ if( p[0] == 'e' && p[1] == '=' ) -+ { -+ /* Found local ip address */ -+ p += 2; -+ localip = p; -+ while( *p && *p != ' ' && *p != ':' ) -+ p++; -+ if( *p == ':' ) -+ { -+ /* Found network mask (eg FFFFFF00 */ -+ *p++ = '\0'; -+ sprintf( mask, "%u.%u.%u.%u", HEXBYTE(p), HEXBYTE(p + 2), -+ HEXBYTE(p + 4), HEXBYTE(p + 6) ); -+ p += 4; -+ } -+ else if( *p == ' ' ) -+ *p++ = '\0'; -+ } -+ else if( p[0] == 'h' && p[1] == '=' ) -+ { -+ /* Found host ip address */ -+ p += 2; -+ hostip = p; -+ while( *p && *p != ' ' ) -+ p++; -+ if( *p == ' ' ) -+ *p++ = '\0'; -+ } -+ else -+ p++; -+ } -+ -+ if( localip && hostip ) -+ sprintf( cmdline, root_nfs_cl, hostip, localip, hostip, mask ); -+} -+#endif -+ -+#if defined(CONFIG_BCM96348) -+/* ********************************************************************* -+ * calculateCpuSpeed() -+ * Calculate the BCM6348 CPU speed by reading the PLL strap register -+ * and applying the following formula: -+ * cpu_clk = (.25 * 64MHz freq) * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) -+ * Input parameters: -+ * none -+ * Return value: -+ * none -+ ********************************************************************* */ -+void __init calculateCpuSpeed(void) -+{ -+ UINT32 pllStrap = PERF->PllStrap; -+ int n1 = (pllStrap & PLL_N1_MASK) >> PLL_N1_SHFT; -+ int n2 = (pllStrap & PLL_N2_MASK) >> PLL_N2_SHFT; -+ int m1cpu = (pllStrap & PLL_M1_CPU_MASK) >> PLL_M1_CPU_SHFT; -+ -+ cpu_speed = (16 * (n1 + 1) * (n2 + 2) / (m1cpu + 1)) * 1000000; -+} -+#endif -+ -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c ---- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,180 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Broadcom bcm63xx serial port initialization, also prepare for printk -+ * by registering with console_init -+ * -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/types.h> -+#include <linux/console.h> -+#include <linux/sched.h> -+ -+#include <asm/addrspace.h> -+#include <asm/irq.h> -+#include <asm/reboot.h> -+#include <asm/gdb-stub.h> -+#include <asm/mc146818rtc.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+ -+#define SER63XX_DEFAULT_BAUD 115200 -+#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) -+#define stUart ((volatile Uart * const) UART_BASE) -+ -+// Transmit interrupts -+#define TXINT (TXFIFOEMT | TXUNDERR | TXOVFERR) -+// Receive interrupts -+#define RXINT (RXFIFONE | RXOVFERR) -+ -+/* -------------------------------------------------------------------------- -+ Name: serial_init -+ Purpose: Initalize the UART -+-------------------------------------------------------------------------- */ -+void __init serial_init(void) -+{ -+ UINT32 tmpVal = SER63XX_DEFAULT_BAUD; -+ ULONG clockFreqHz; -+ -+#if defined(CONFIG_BCM96345) -+ // Make sure clock is ticking -+ PERF->blkEnables |= UART_CLK_EN; -+#endif -+ -+ /* Dissable channel's receiver and transmitter. */ -+ stUart->control &= ~(BRGEN|TXEN|RXEN); -+ -+ /*--------------------------------------------------------------------*/ -+ /* Write the table value to the clock select register. */ -+ /* DPullen - this is the equation to use: */ -+ /* value = clockFreqHz / baud / 32-1; */ -+ /* (snmod) Actually you should also take into account any necessary */ -+ /* rounding. Divide by 16, look at lsb, if 0, divide by 2 */ -+ /* and subtract 1. If 1, just divide by 2 */ -+ /*--------------------------------------------------------------------*/ -+ clockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; -+ tmpVal = (clockFreqHz / tmpVal) / 16; -+ if( tmpVal & 0x01 ) -+ tmpVal /= 2; //Rounding up, so sub is already accounted for -+ else -+ tmpVal = (tmpVal / 2) - 1; // Rounding down so we must sub 1 -+ stUart->baudword = tmpVal; -+ -+ /* Finally, re-enable the transmitter and receiver. */ -+ stUart->control |= (BRGEN|TXEN|RXEN); -+ -+ stUart->config = (BITS8SYM | ONESTOP); -+ // Set the FIFO interrupt depth ... stUart->fifocfg = 0xAA; -+ stUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; -+ stUart->intMask = 0; -+ stUart->intMask = RXINT | TXINT; -+} -+ -+ -+/* prom_putc() -+ * Output a character to the UART -+ */ -+void prom_putc(char c) -+{ -+ /* Wait for Tx uffer to empty */ -+ while (! (READ16(stUart->intStatus) & TXFIFOEMT)); -+ /* Send character */ -+ stUart->Data = c; -+} -+ -+/* prom_puts() -+ * Write a string to the UART -+ */ -+void prom_puts(const char *s) -+{ -+ while (*s) { -+ if (*s == '\n') { -+ prom_putc('\r'); -+ } -+ prom_putc(*s++); -+ } -+} -+ -+ -+/* prom_getc_nowait() -+ * Returns a character from the UART -+ * Returns -1 if no characters available or corrupted -+ */ -+int prom_getc_nowait(void) -+{ -+ uint16 uStatus; -+ int cData = -1; -+ -+ uStatus = READ16(stUart->intStatus); -+ -+ if (uStatus & RXFIFONE) { /* Do we have a character? */ -+ cData = READ16(stUart->Data) & 0xff; /* Read character */ -+ if (uStatus & (RXFRAMERR | RXPARERR)) { /* If we got an error, throw it away */ -+ cData = -1; -+ } -+ } -+ -+ return cData; -+} -+ -+/* prom_getc() -+ * Returns a charcter from the serial port -+ * Will block until it receives a valid character -+*/ -+char prom_getc(void) -+{ -+ int cData = -1; -+ -+ /* Loop until we get a valid character */ -+ while(cData == -1) { -+ cData = prom_getc_nowait(); -+ } -+ return (char) cData; -+} -+ -+/* prom_testc() -+ * Returns 0 if no characters available -+ */ -+int prom_testc(void) -+{ -+ uint16 uStatus; -+ -+ uStatus = READ16(stUart->intStatus); -+ -+ return (uStatus & RXFIFONE); -+} -+ -+#if CONFIG_REMOTE_DEBUG -+/* Prevent other code from writing to the serial port */ -+void _putc(char c) { } -+void _puts(const char *ptr) { } -+#else -+/* Low level outputs call prom routines */ -+void _putc(char c) { -+ prom_putc(c); -+} -+void _puts(const char *ptr) { -+ prom_puts(ptr); -+} -+#endif -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c ---- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,519 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Generic setup routines for Broadcom 963xx MIPS boards -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/kdev_t.h> -+#include <linux/types.h> -+#include <linux/console.h> -+#include <linux/sched.h> -+#include <linux/mm.h> -+#include <linux/slab.h> -+#include <linux/module.h> -+ -+#include <asm/addrspace.h> -+#include <asm/bcache.h> -+#include <asm/irq.h> -+#include <asm/time.h> -+#include <asm/reboot.h> -+#include <asm/gdb-stub.h> -+ -+extern void brcm_timer_setup(struct irqaction *irq); -+extern unsigned long getMemorySize(void); -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+#include <linux/pci.h> -+#include <linux/delay.h> -+#include <bcm_map_part.h> -+#include <bcmpci.h> -+ -+static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); -+#endif -+ -+/* This function should be in a board specific directory. For now, -+ * assume that all boards that include this file use a Broadcom chip -+ * with a soft reset bit in the PLL control register. -+ */ -+static void brcm_machine_restart(char *command) -+{ -+ const unsigned long ulSoftReset = 0x00000001; -+ unsigned long *pulPllCtrl = (unsigned long *) 0xfffe0008; -+ *pulPllCtrl |= ulSoftReset; -+} -+ -+static void brcm_machine_halt(void) -+{ -+ printk("System halted\n"); -+ while (1); -+} -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+ -+static void mpi_SetLocalPciConfigReg(uint32 reg, uint32 value) -+{ -+ /* write index then value */ -+ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; -+ mpi->pcicfgdata = value; -+} -+ -+static uint32 mpi_GetLocalPciConfigReg(uint32 reg) -+{ -+ /* write index then get value */ -+ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; -+ return mpi->pcicfgdata; -+} -+ -+/* -+ * mpi_ResetPcCard: Set/Reset the PcCard -+ */ -+static void mpi_ResetPcCard(int cardtype, BOOL bReset) -+{ -+ if (cardtype == MPI_CARDTYPE_NONE) { -+ return; -+ } -+ -+ if (cardtype == MPI_CARDTYPE_CARDBUS) { -+ bReset = ! bReset; -+ } -+ -+ if (bReset) { -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); -+ } else { -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 | PCCARD_CARD_RESET); -+ } -+} -+ -+/* -+ * mpi_ConfigCs: Configure an MPI/EBI chip select -+ */ -+static void mpi_ConfigCs(uint32 cs, uint32 base, uint32 size, uint32 flags) -+{ -+ mpi->cs[cs].base = ((base & 0x1FFFFFFF) | size); -+ mpi->cs[cs].config = flags; -+} -+ -+/* -+ * mpi_InitPcmciaSpace -+ */ -+static void mpi_InitPcmciaSpace(void) -+{ -+ // ChipSelect 4 controls PCMCIA Memory accesses -+ mpi_ConfigCs(PCMCIA_COMMON_BASE, pcmciaMem, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); -+ // ChipSelect 5 controls PCMCIA Attribute accesses -+ mpi_ConfigCs(PCMCIA_ATTRIBUTE_BASE, pcmciaAttr, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); -+ // ChipSelect 6 controls PCMCIA I/O accesses -+ mpi_ConfigCs(PCMCIA_IO_BASE, pcmciaIo, EBI_SIZE_64K, (EBI_WORD_WIDE|EBI_ENABLE)); -+ -+ mpi->pcmcia_cntl2 = ((PCMCIA_ATTR_ACTIVE << RW_ACTIVE_CNT_BIT) | -+ (PCMCIA_ATTR_INACTIVE << INACTIVE_CNT_BIT) | -+ (PCMCIA_ATTR_CE_SETUP << CE_SETUP_CNT_BIT) | -+ (PCMCIA_ATTR_CE_HOLD << CE_HOLD_CNT_BIT)); -+ -+ mpi->pcmcia_cntl2 |= (PCMCIA_HALFWORD_EN | PCMCIA_BYTESWAP_DIS); -+} -+ -+/* -+ * cardtype_vcc_detect: PC Card's card detect and voltage sense connection -+ * -+ * CD1#/ CD2#/ VS1#/ VS2#/ Card Initial Vcc -+ * CCD1# CCD2# CVS1 CVS2 Type -+ * -+ * GND GND open open 16-bit 5 vdc -+ * -+ * GND GND GND open 16-bit 3.3 vdc -+ * -+ * GND GND open GND 16-bit x.x vdc -+ * -+ * GND GND GND GND 16-bit 3.3 & x.x vdc -+ * -+ *==================================================================== -+ * -+ * CVS1 GND CCD1# open CardBus 3.3 vdc -+ * -+ * GND CVS2 open CCD2# CardBus x.x vdc -+ * -+ * GND CVS1 CCD2# open CardBus y.y vdc -+ * -+ * GND CVS2 GND CCD2# CardBus 3.3 & x.x vdc -+ * -+ * CVS2 GND open CCD1# CardBus x.x & y.y vdc -+ * -+ * GND CVS1 CCD2# open CardBus 3.3, x.x & y.y vdc -+ * -+ */ -+static int cardtype_vcc_detect(void) -+{ -+ uint32 data32; -+ int cardtype; -+ -+ cardtype = MPI_CARDTYPE_NONE; -+ mpi->pcmcia_cntl1 = 0x0000A000; // Turn on the output enables and drive -+ // the CVS pins to 0. -+ data32 = mpi->pcmcia_cntl1; -+ switch (data32 & 0x00000003) // Test CD1# and CD2#, see if card is plugged in. -+ { -+ case 0x00000003: // No Card is in the slot. -+ printk("mpi: No Card is in the PCMCIA slot\n"); -+ break; -+ -+ case 0x00000002: // Partial insertion, No CD2#. -+ printk("mpi: Card in the PCMCIA slot partial insertion, no CD2 signal\n"); -+ break; -+ -+ case 0x00000001: // Partial insertion, No CD1#. -+ printk("mpi: Card in the PCMCIA slot partial insertion, no CD1 signal\n"); -+ break; -+ -+ case 0x00000000: -+ mpi->pcmcia_cntl1 = 0x0000A0C0; // Turn off the CVS output enables and -+ // float the CVS pins. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ // Read the Register. -+ switch (data32 & 0x0000000C) // See what is on the CVS pins. -+ { -+ case 0x00000000: // CVS1 and CVS2 are tied to ground, only 1 option. -+ printk("mpi: Detected 3.3 & x.x 16-bit PCMCIA card\n"); -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ break; -+ -+ case 0x00000004: // CVS1 is open or tied to CCD1/CCD2 and CVS2 is tied to ground. -+ // 2 valid voltage options. -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ mpi->pcmcia_cntl1 = 0x0000A080; // Drive CVS1 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS2, not valid. -+ printk("mpi: Unknown card plugged into slot\n"); -+ } else { // CCD2 is tied to CVS1. -+ printk("mpi: Detected 3.3, x.x and y.y Cardbus card\n"); -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ } -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ printk("mpi: Detected x.x vdc 16-bit PCMCIA card\n"); -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ break; -+ } -+ break; -+ -+ case 0x00000008: // CVS2 is open or tied to CCD1/CCD2 and CVS1 is tied to ground. -+ // 2 valid voltage options. -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS1, not valid. -+ printk("mpi: Unknown card plugged into slot\n"); -+ } else {// CCD2 is tied to CVS2. -+ printk("mpi: Detected 3.3 and x.x Cardbus card\n"); -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ } -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ printk("mpi: Detected 3.3 vdc 16-bit PCMCIA card\n"); -+ break; -+ } -+ break; -+ -+ case 0x0000000C: // CVS1 and CVS2 are open or tied to CCD1/CCD2. -+ // 5 valid voltage options. -+ -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ // CCD1 is tied to ground. -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS1. -+ printk("mpi: Detected y.y vdc Cardbus card\n"); -+ } else { // CCD2 is tied to CVS2. -+ printk("mpi: Detected x.x vdc Cardbus card\n"); -+ } -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // CCD2 is tied to ground. -+ -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000001) {// CCD1 is tied to CVS1. -+ printk("mpi: Detected 3.3 vdc Cardbus card\n"); -+ } else { // CCD1 is tied to CVS2. -+ printk("mpi: Detected x.x and y.y Cardbus card\n"); -+ } -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ printk("mpi: Detected 5 vdc 16-bit PCMCIA card\n"); -+ break; -+ } -+ break; -+ -+ default: -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ } -+ } -+ return cardtype; -+} -+ -+/* -+ * mpi_DetectPcCard: Detect the plugged in PC-Card -+ * Return: < 0 => Unknown card detected -+ * 0 => No card detected -+ * 1 => 16-bit card detected -+ * 2 => 32-bit CardBus card detected -+ */ -+static int mpi_DetectPcCard(void) -+{ -+ int cardtype; -+ -+ cardtype = cardtype_vcc_detect(); -+ switch(cardtype) { -+ case MPI_CARDTYPE_PCMCIA: -+ mpi->pcmcia_cntl1 &= ~0x0000e000; // disable enable bits -+ //mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); -+ mpi->pcmcia_cntl1 |= (PCMCIA_ENABLE | PCMCIA_GPIO_ENABLE); -+ mpi_InitPcmciaSpace(); -+ mpi_ResetPcCard(cardtype, FALSE); -+ // Hold card in reset for 10ms -+ mdelay(10); -+ mpi_ResetPcCard(cardtype, TRUE); -+ // Let card come out of reset -+ mdelay(100); -+ break; -+ case MPI_CARDTYPE_CARDBUS: -+ // 8 => CardBus Enable -+ // 1 => PCI Slot Number -+ // C => Float VS1 & VS2 -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & 0xFFFF0000) | -+ CARDBUS_ENABLE | -+ (CARDBUS_SLOT << 8)| -+ VS2_OEN | -+ VS1_OEN; -+ /* access to this memory window will be to/from CardBus */ -+ mpi->l2pmremap1 |= CARDBUS_MEM; -+ -+ // Need to reset the Cardbus Card. There's no CardManager to do this, -+ // and we need to be ready for PCI configuration. -+ mpi_ResetPcCard(cardtype, FALSE); -+ // Hold card in reset for 10ms -+ mdelay(10); -+ mpi_ResetPcCard(cardtype, TRUE); -+ // Let card come out of reset -+ mdelay(100); -+ break; -+ default: -+ break; -+ } -+ return cardtype; -+} -+ -+static int mpi_init(void) -+{ -+ unsigned long data; -+ unsigned int chipid; -+ unsigned int chiprev; -+ unsigned int sdramsize; -+ -+ chipid = (PERF->RevID & 0xFFFF0000) >> 16; -+ chiprev = (PERF->RevID & 0xFF); -+ sdramsize = getMemorySize(); -+ /* -+ * Init the pci interface -+ */ -+ data = GPIO->GPIOMode; // GPIO mode register -+ data |= GROUP2_PCI | GROUP1_MII_PCCARD; // PCI internal arbiter + Cardbus -+ GPIO->GPIOMode = data; // PCI internal arbiter -+ -+ /* -+ * In the BCM6348 CardBus support is defaulted to Slot 0 -+ * because there is no external IDSEL for CardBus. To disable -+ * the CardBus and allow a standard PCI card in Slot 0 -+ * set the cbus_idsel field to 0x1f. -+ */ -+ /* -+ uData = mpi->pcmcia_cntl1; -+ uData |= CARDBUS_IDSEL; -+ mpi->pcmcia_cntl1 = uData; -+ */ -+ // Setup PCI I/O Window range. Give 64K to PCI I/O -+ mpi->l2piorange = ~(BCM_PCI_IO_SIZE_64KB-1); -+ // UBUS to PCI I/O base address -+ mpi->l2piobase = BCM_PCI_IO_BASE & BCM_PCI_ADDR_MASK; -+ // UBUS to PCI I/O Window remap -+ mpi->l2pioremap = (BCM_PCI_IO_BASE | MEM_WINDOW_EN); -+ -+ // enable PCI related GPIO pins and data swap between system and PCI bus -+ mpi->locbuscntrl = (EN_PCI_GPIO | DIR_U2P_NOSWAP); -+ -+ /* Enable 6348 BusMaster and Memory access mode */ -+ data = mpi_GetLocalPciConfigReg(PCI_COMMAND); -+ data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); -+ mpi_SetLocalPciConfigReg(PCI_COMMAND, data); -+ -+ /* Configure two 16 MByte PCI to System memory regions. */ -+ /* These memory regions are used when PCI device is a bus master */ -+ /* Accesses to the SDRAM from PCI bus will be "byte swapped" for this region */ -+ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_3, BCM_HOST_MEM_SPACE1); -+ mpi->sp0remap = 0x0; -+ -+ /* Accesses to the SDRAM from PCI bus will not be "byte swapped" for this region */ -+ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_4, BCM_HOST_MEM_SPACE2); -+ mpi->sp1remap = 0x0; -+ mpi->pcimodesel |= (PCI_BAR2_NOSWAP | 0x40); -+ -+ if ((chipid == 0x6348) && (chiprev == 0xb0)) { -+ mpi->sp0range = ~(sdramsize-1); -+ mpi->sp1range = ~(sdramsize-1); -+ } -+ /* -+ * Change 6348 PCI Cfg Reg. offset 0x40 to PCI memory read retry count infinity -+ * by set 0 in bit 8~15. This resolve read Bcm4306 srom return 0xffff in -+ * first read. -+ */ -+ data = mpi_GetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER); -+ data &= ~BRCM_PCI_CONFIG_TIMER_RETRY_MASK; -+ data |= 0x00000080; -+ mpi_SetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER, data); -+ -+ /* enable pci interrupt */ -+ mpi->locintstat |= (EXT_PCI_INT << 16); -+ -+ mpi_DetectPcCard(); -+ -+ ioport_resource.start = BCM_PCI_IO_BASE; -+ ioport_resource.end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB; -+ -+#if defined(CONFIG_USB) -+ PERF->blkEnables |= USBH_CLK_EN; -+ mdelay(100); -+ *USBH_NON_OHCI = NON_OHCI_BYTE_SWAP; -+#endif -+ -+ return 0; -+} -+#endif -+ -+static int __init brcm63xx_setup(void) -+{ -+ extern int panic_timeout; -+ -+ _machine_restart = brcm_machine_restart; -+ _machine_halt = brcm_machine_halt; -+ _machine_power_off = brcm_machine_halt; -+ -+ board_timer_setup = brcm_timer_setup; -+ -+ panic_timeout = 180; -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+ /* mpi initialization */ -+ mpi_init(); -+#endif -+ return 0; -+} -+ -+early_initcall(brcm63xx_setup); -+ -+/*************************************************************************** -+ * C++ New and delete operator functions -+ ***************************************************************************/ -+ -+/* void *operator new(unsigned int sz) */ -+void *_Znwj(unsigned int sz) -+{ -+ return( kmalloc(sz, GFP_KERNEL) ); -+} -+ -+/* void *operator new[](unsigned int sz)*/ -+void *_Znaj(unsigned int sz) -+{ -+ return( kmalloc(sz, GFP_KERNEL) ); -+} -+ -+/* placement new operator */ -+/* void *operator new (unsigned int size, void *ptr) */ -+void *ZnwjPv(unsigned int size, void *ptr) -+{ -+ return ptr; -+} -+ -+/* void operator delete(void *m) */ -+void _ZdlPv(void *m) -+{ -+ kfree(m); -+} -+ -+/* void operator delete[](void *m) */ -+void _ZdaPv(void *m) -+{ -+ kfree(m); -+} -+ -+EXPORT_SYMBOL(_Znwj); -+EXPORT_SYMBOL(_Znaj); -+EXPORT_SYMBOL(ZnwjPv); -+EXPORT_SYMBOL(_ZdlPv); -+EXPORT_SYMBOL(_ZdaPv); -+ -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c ---- linux-2.6.8.1/arch/mips/brcm-boards/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,277 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Setup time for Broadcom 963xx MIPS boards -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/kernel_stat.h> -+#include <linux/sched.h> -+#include <linux/spinlock.h> -+#include <linux/interrupt.h> -+#include <linux/module.h> -+#include <linux/time.h> -+#include <linux/timex.h> -+ -+#include <asm/mipsregs.h> -+#include <asm/ptrace.h> -+#include <asm/div64.h> -+#include <asm/time.h> -+ -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+unsigned long r4k_interval; /* Amount to increment compare reg each time */ -+static unsigned long r4k_cur; /* What counter should be at next timer irq */ -+ -+/* Cycle counter value at the previous timer interrupt.. */ -+static unsigned int timerhi = 0, timerlo = 0; -+ -+extern volatile unsigned long wall_jiffies; -+ -+/* Optional board-specific timer routine */ -+void (*board_timer_interrupt)(int irq, void *dev_id, struct pt_regs * regs); -+ -+static inline void ack_r4ktimer(unsigned long newval) -+{ -+ write_c0_compare(newval); -+} -+ -+/* -+ * There are a lot of conceptually broken versions of the MIPS timer interrupt -+ * handler floating around. This one is rather different, but the algorithm -+ * is provably more robust. -+ */ -+static irqreturn_t brcm_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -+{ -+ unsigned int count; -+ -+ if (r4k_interval == 0) -+ goto null; -+ -+ do { -+ do_timer(regs); -+ -+ if (board_timer_interrupt) -+ board_timer_interrupt(irq, dev_id, regs); -+ -+ r4k_cur += r4k_interval; -+ ack_r4ktimer(r4k_cur); -+ -+ } while (((count = (unsigned long)read_c0_count()) -+ - r4k_cur) < 0x7fffffff); -+ -+ if (!jiffies) { -+ /* -+ * If jiffies has overflowed in this timer_interrupt we must -+ * update the timer[hi]/[lo] to make do_fast_gettimeoffset() -+ * quotient calc still valid. -arca -+ */ -+ timerhi = timerlo = 0; -+ } else { -+ /* -+ * The cycle counter is only 32 bit which is good for about -+ * a minute at current count rates of upto 150MHz or so. -+ */ -+ timerhi += (count < timerlo); /* Wrap around */ -+ timerlo = count; -+ } -+ -+ return IRQ_HANDLED; -+ -+null: -+ ack_r4ktimer(0); -+ return IRQ_NONE; -+} -+ -+static struct irqaction brcm_timer_action = { -+ .handler = brcm_timer_interrupt, -+ .flags = SA_INTERRUPT, -+ .mask = CPU_MASK_NONE, -+ .name = "timer", -+ .next = NULL, -+ .dev_id = brcm_timer_interrupt, -+}; -+ -+ -+void __init brcm_timer_setup(struct irqaction *irq) -+{ -+ r4k_cur = (read_c0_count() + r4k_interval); -+ write_c0_compare(r4k_cur); -+ -+ /* we are using the cpu counter for timer interrupts */ -+ irq->handler = no_action; /* we use our own handler */ -+ setup_irq(MIPS_TIMER_INT, &brcm_timer_action); -+ set_c0_status(IE_IRQ5); -+} -+ -+#if 0 -+/* This is for machines which generate the exact clock. */ -+#define USECS_PER_JIFFY (1000000/HZ) -+#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff) -+ -+static void call_do_div64_32( unsigned long *res, unsigned int high, -+ unsigned int low, unsigned long base ) -+{ -+ do_div64_32(*res, high, low, base); -+} -+ -+/* -+ * FIXME: Does playing with the RP bit in c0_status interfere with this code? -+ */ -+static unsigned long do_fast_gettimeoffset(void) -+{ -+ u32 count; -+ unsigned long res, tmp; -+ -+ /* Last jiffy when do_fast_gettimeoffset() was called. */ -+ static unsigned long last_jiffies=0; -+ unsigned long quotient; -+ -+ /* -+ * Cached "1/(clocks per usec)*2^32" value. -+ * It has to be recalculated once each jiffy. -+ */ -+ static unsigned long cached_quotient=0; -+ -+ tmp = jiffies; -+ -+ quotient = cached_quotient; -+ -+ if (tmp && last_jiffies != tmp) { -+ last_jiffies = tmp; -+#ifdef CONFIG_CPU_MIPS32 -+ if (last_jiffies != 0) { -+ -+ unsigned long r0; -+ /* gcc 3.0.1 gets an internal compiler error if there are two -+ * do_div64_32 inline macros. To work around this problem, -+ * do_div64_32 is called as a function. -+ */ -+ call_do_div64_32(&r0, timerhi, timerlo, tmp); -+ call_do_div64_32("ient, USECS_PER_JIFFY, -+ USECS_PER_JIFFY_FRAC, r0); -+ -+ cached_quotient = quotient; -+ -+ } -+#else -+ __asm__(".set\tnoreorder\n\t" -+ ".set\tnoat\n\t" -+ ".set\tmips3\n\t" -+ "lwu\t%0,%2\n\t" -+ "dsll32\t$1,%1,0\n\t" -+ "or\t$1,$1,%0\n\t" -+ "ddivu\t$0,$1,%3\n\t" -+ "mflo\t$1\n\t" -+ "dsll32\t%0,%4,0\n\t" -+ "nop\n\t" -+ "ddivu\t$0,%0,$1\n\t" -+ "mflo\t%0\n\t" -+ ".set\tmips0\n\t" -+ ".set\tat\n\t" -+ ".set\treorder" -+ :"=&r" (quotient) -+ :"r" (timerhi), -+ "m" (timerlo), -+ "r" (tmp), -+ "r" (USECS_PER_JIFFY) -+ :"$1"); -+ cached_quotient = quotient; -+#endif -+ } -+ -+ /* Get last timer tick in absolute kernel time */ -+ count = read_c0_count(); -+ -+ /* .. relative to previous jiffy (32 bits is enough) */ -+ count -= timerlo; -+ -+ __asm__("multu\t%1,%2\n\t" -+ "mfhi\t%0" -+ :"=r" (res) -+ :"r" (count), -+ "r" (quotient)); -+ -+ /* -+ * Due to possible jiffies inconsistencies, we need to check -+ * the result so that we'll get a timer that is monotonic. -+ */ -+ if (res >= USECS_PER_JIFFY) -+ res = USECS_PER_JIFFY-1; -+ -+ return res; -+} -+ -+void do_gettimeofday(struct timeval *tv) -+{ -+ unsigned int flags; -+ -+ read_lock_irqsave (&xtime_lock, flags); -+ tv->tv_sec = xtime.tv_sec; -+ tv->tv_usec = xtime.tv_nsec/1000; -+ tv->tv_usec += do_fast_gettimeoffset(); -+ -+ /* -+ * xtime is atomically updated in timer_bh. jiffies - wall_jiffies -+ * is nonzero if the timer bottom half hasnt executed yet. -+ */ -+ if (jiffies - wall_jiffies) -+ tv->tv_usec += USECS_PER_JIFFY; -+ -+ read_unlock_irqrestore (&xtime_lock, flags); -+ -+ if (tv->tv_usec >= 1000000) { -+ tv->tv_usec -= 1000000; -+ tv->tv_sec++; -+ } -+} -+ -+EXPORT_SYMBOL(do_gettimeofday); -+ -+int do_settimeofday(struct timespec *tv) -+{ -+ write_lock_irq (&xtime_lock); -+ -+ /* This is revolting. We need to set the xtime.tv_usec correctly. -+ * However, the value in this location is is value at the last tick. -+ * Discover what correction gettimeofday would have done, and then -+ * undo it! -+ */ -+ tv->tv_nsec -= do_fast_gettimeoffset()*NSEC_PER_USEC; -+ -+ if (tv->tv_nsec < 0) { -+ tv->tv_nsec += 1000000*NSEC_PER_USEC; -+ tv->tv_sec--; -+ } -+ -+ xtime.tv_sec = tv->tv_sec; -+ xtime.tv_nsec = tv->tv_nsec; -+ time_adjust = 0; /* stop active adjtime() */ -+ time_status |= STA_UNSYNC; -+ time_maxerror = NTP_PHASE_LIMIT; -+ time_esterror = NTP_PHASE_LIMIT; -+ -+ write_unlock_irq (&xtime_lock); -+} -+ -+EXPORT_SYMBOL(do_settimeofday); -+ -+#endif -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/generic/Makefile linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/Makefile ---- linux-2.6.8.1/arch/mips/brcm-boards/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/Makefile 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,11 @@ -+# -+# Makefile for generic Broadcom MIPS boards -+# -+# Copyright (C) 2001 Broadcom Corporation -+# -+obj-y := int-handler.o -+ -+ifdef CONFIG_REMOTE_DEBUG -+obj-y += dbg_io.o -+endif -+ -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c ---- linux-2.6.8.1/arch/mips/brcm-boards/generic/dbg_io.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,260 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/config.h> -+#include <linux/tty.h> -+#include <linux/major.h> -+#include <linux/init.h> -+#include <linux/console.h> -+#include <linux/fs.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/types.h> -+#include <linux/sched.h> -+ -+#include <bcm_map_part.h> -+ -+#undef PRNT /* define for debug printing */ -+ -+#define UART16550_BAUD_2400 2400 -+#define UART16550_BAUD_4800 4800 -+#define UART16550_BAUD_9600 9600 -+#define UART16550_BAUD_19200 19200 -+#define UART16550_BAUD_38400 38400 -+#define UART16550_BAUD_57600 57600 -+#define UART16550_BAUD_115200 115200 -+ -+#define UART16550_PARITY_NONE 0 -+#define UART16550_PARITY_ODD 0x08 -+#define UART16550_PARITY_EVEN 0x18 -+#define UART16550_PARITY_MARK 0x28 -+#define UART16550_PARITY_SPACE 0x38 -+ -+#define UART16550_DATA_5BIT 0x0 -+#define UART16550_DATA_6BIT 0x1 -+#define UART16550_DATA_7BIT 0x2 -+#define UART16550_DATA_8BIT 0x3 -+ -+#define UART16550_STOP_1BIT 0x0 -+#define UART16550_STOP_2BIT 0x4 -+ -+volatile Uart * stUart = UART_BASE; -+ -+#define WRITE16(addr, value) ((*(volatile UINT16 *)((ULONG)&addr)) = value) -+ -+/* Low level UART routines from promcon.c */ -+extern void prom_putc(char c); -+extern char prom_getc(void); -+extern int prom_getc_nowait(void); -+extern int prom_testc(void); -+ -+extern void set_debug_traps(void); -+extern void breakpoint(void); -+extern void enable_brcm_irq(unsigned int); -+extern void set_async_breakpoint(unsigned int epc); -+ -+#ifdef CONFIG_GDB_CONSOLE -+extern void register_gdb_console(void); -+#endif -+ -+int gdb_initialized = 0; -+ -+#define GDB_BUF_SIZE 512 /* power of 2, please */ -+ -+static char gdb_buf[GDB_BUF_SIZE] ; -+static int gdb_buf_in_inx ; -+static atomic_t gdb_buf_in_cnt ; -+static int gdb_buf_out_inx ; -+ -+void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) -+{ -+ /* Do nothing, assume boot loader has already set up serial port */ -+ printk("debugInit called\n"); -+} -+ -+/* -+ * Get a char if available, return -1 if nothing available. -+ * Empty the receive buffer first, then look at the interface hardware. -+ */ -+static int read_char(void) -+{ -+ if (atomic_read(&gdb_buf_in_cnt) != 0) /* intr routine has q'd chars */ -+ { -+ int chr ; -+ -+ chr = gdb_buf[gdb_buf_out_inx++] ; -+ gdb_buf_out_inx &= (GDB_BUF_SIZE - 1) ; -+ atomic_dec(&gdb_buf_in_cnt) ; -+ return(chr) ; -+ } -+ return(prom_getc_nowait()) ; /* read from hardware */ -+} /* read_char */ -+ -+/* -+ * This is the receiver interrupt routine for the GDB stub. -+ * It will receive a limited number of characters of input -+ * from the gdb host machine and save them up in a buffer. -+ * -+ * When the gdb stub routine getDebugChar() is called it -+ * draws characters out of the buffer until it is empty and -+ * then reads directly from the serial port. -+ * -+ * We do not attempt to write chars from the interrupt routine -+ * since the stubs do all of that via putDebugChar() which -+ * writes one byte after waiting for the interface to become -+ * ready. -+ * -+ * The debug stubs like to run with interrupts disabled since, -+ * after all, they run as a consequence of a breakpoint in -+ * the kernel. -+ * -+ * Perhaps someone who knows more about the tty driver than I -+ * care to learn can make this work for any low level serial -+ * driver. -+ */ -+static void gdb_interrupt(int irq, void *dev_id, struct pt_regs * regs) -+{ -+ int chr ; -+ int more; -+ do -+ { -+ chr = prom_getc_nowait() ; -+ more = prom_testc(); -+ if (chr < 0) continue ; -+ -+ /* If we receive a Ctrl-C then this is GDB trying to break in */ -+ if (chr == 3) -+ { -+ /* Replace current instruction with breakpoint */ -+ set_async_breakpoint(regs->cp0_epc); -+ //breakpoint(); -+ } -+ -+#ifdef PRNT -+ printk("gdb_interrupt: chr=%02x '%c', more = %x\n", -+ chr, chr > ' ' && chr < 0x7F ? chr : ' ', more) ; -+#endif -+ -+ if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) -+ { /* buffer overflow, clear it */ -+ gdb_buf_in_inx = 0 ; -+ atomic_set(&gdb_buf_in_cnt, 0) ; -+ gdb_buf_out_inx = 0 ; -+ break ; -+ } -+ -+ gdb_buf[gdb_buf_in_inx++] = chr ; -+ gdb_buf_in_inx &= (GDB_BUF_SIZE - 1) ; -+ atomic_inc(&gdb_buf_in_cnt) ; -+ } -+ while (more !=0); -+ -+} /* gdb_interrupt */ -+ -+/* -+ * getDebugChar -+ * -+ * This is a GDB stub routine. It waits for a character from the -+ * serial interface and then returns it. If there is no serial -+ * interface connection then it returns a bogus value which will -+ * almost certainly cause the system to hang. -+ */ -+int getDebugChar(void) -+{ -+ volatile int chr ; -+ -+#ifdef PRNT -+ printk("getDebugChar: ") ; -+#endif -+ -+ while ( (chr = read_char()) < 0 ) ; -+ -+#ifdef PRNT -+ printk("%c\n", chr > ' ' && chr < 0x7F ? chr : ' ') ; -+#endif -+ return(chr) ; -+ -+} /* getDebugChar */ -+ -+/* -+ * putDebugChar -+ * -+ * This is a GDB stub routine. It waits until the interface is ready -+ * to transmit a char and then sends it. If there is no serial -+ * interface connection then it simply returns to its caller, having -+ * pretended to send the char. -+ */ -+int putDebugChar(unsigned char chr) -+{ -+#ifdef PRNT -+ printk("putDebugChar: chr=%02x '%c'\n", chr, -+ chr > ' ' && chr < 0x7F ? chr : ' ') ; -+#endif -+ -+ prom_putc(chr) ; /* this routine will wait */ -+ return 1; -+ -+} /* putDebugChar */ -+ -+/* Just a NULL routine for testing. */ -+void gdb_null(void) -+{ -+} -+ -+void rs_kgdb_hook(int tty_no) -+{ -+ printk("rs_kgdb_hook: tty %d\n", tty_no); -+ -+ /* Call GDB routine to setup the exception vectors for the debugger */ -+ set_debug_traps(); -+ -+ printk("Breaking into debugger...\n"); -+ breakpoint(); -+ gdb_null() ; -+ printk("Connected.\n"); -+ -+ gdb_initialized = 1; -+ -+#ifdef CONFIG_GDB_CONSOLE -+ register_gdb_console(); -+#endif -+} -+ -+void kgdb_hook_irq() -+{ -+ int retval ; -+ uint16 uMask; -+ -+ printk("GDB: Hooking UART interrupt\n"); -+ -+ retval = request_irq(INTERRUPT_ID_UART, -+ gdb_interrupt, -+ SA_INTERRUPT, -+ "GDB-stub", NULL); -+ -+ if (retval != 0) -+ printk("gdb_hook: request_irq(irq=%d) failed: %d\n", INTERRUPT_ID_UART, retval); -+ -+ // Enable UART config Rx not empty IRQ -+ uMask = READ16(stUart->intMask) ; -+ // printk("intMask: 0x%x\n", uMask); -+ WRITE16(stUart->intMask, uMask | RXFIFONE); -+} -+ -+ -diff -urN linux-2.6.8.1/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S ---- linux-2.6.8.1/arch/mips/brcm-boards/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S 2006-06-26 09:07:08.000000000 +0200 -@@ -0,0 +1,59 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Generic interrupt handler for Broadcom MIPS boards -+ */ -+ -+#include <linux/config.h> -+ -+#include <asm/asm.h> -+#include <asm/mipsregs.h> -+#include <asm/regdef.h> -+#include <asm/stackframe.h> -+ -+/* -+ * MIPS IRQ Source -+ * -------- ------ -+ * 0 Software (ignored) -+ * 1 Software (ignored) -+ * 2 Combined hardware interrupt (hw0) -+ * 3 Hardware -+ * 4 Hardware -+ * 5 Hardware -+ * 6 Hardware -+ * 7 R4k timer -+ */ -+ -+ .text -+ .set noreorder -+ .set noat -+ .align 5 -+ NESTED(brcmIRQ, PT_SIZE, sp) -+ SAVE_ALL -+ CLI -+ .set noreorder -+ .set at -+ -+ jal brcm_irq_dispatch -+ move a0, sp -+ -+ j ret_from_irq -+ nop -+ -+ END(brcmIRQ) ---- linux-2.6.8.1/arch/mips/Kconfig 2004-08-14 12:55:32.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/Kconfig 2006-06-26 09:07:08.000000000 +0200 -@@ -27,6 +27,17 @@ - - menu "Machine selection" - -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+ -+config MIPS_BRCM -+ bool "Support for the Broadcom boards" -+ help -+ This is a family of boards based on the Broadcom MIPS32 -+ -+source "arch/mips/brcm-boards/bcm963xx/Kconfig" -+ -+# CONFIG_MIPS_BRCM End Broadcom changed code. -+ - config MACH_JAZZ - bool "Support for the Jazz family of machines" - select ISA -@@ -146,6 +157,7 @@ - depends on MIPS32 - select DMA_NONCOHERENT - select HW_HAS_PCI -+ select SWAP_IO_SPACE - - config MIPS_COBALT - bool "Support for Cobalt Server (EXPERIMENTAL)" -@@ -198,6 +210,7 @@ - select IRQ_CPU - select MIPS_GT96100 - select RM7000_CPU_SCACHE -+ select SWAP_IO_SPACE - help - This is an evaluation board based on the Galileo GT-96100 LAN/WAN - communications controllers containing a MIPS R5000 compatible core -@@ -268,6 +281,7 @@ - bool "Support for MIPS Atlas board" - select DMA_NONCOHERENT - select HW_HAS_PCI -+ select SWAP_IO_SPACE - help - This enables support for the QED R5231-based MIPS Atlas evaluation - board. -@@ -277,6 +291,7 @@ - select HAVE_STD_PC_SERIAL_PORT - select DMA_NONCOHERENT - select HW_HAS_PCI -+ select SWAP_IO_SPACE - help - This enables support for the VR5000-based MIPS Malta evaluation - board. -@@ -294,6 +309,7 @@ - select IRQ_CPU - select IRQ_CPU_RM7K - select RM7000_CPU_SCACHE -+ select SWAP_IO_SPACE - help - The Ocelot is a MIPS-based Single Board Computer (SBC) made by - Momentum Computer <http://www.momenco.com/>. -@@ -306,6 +322,7 @@ - select IRQ_CPU_RM7K - select PCI_MARVELL - select RM7000_CPU_SCACHE -+ select SWAP_IO_SPACE - help - The Ocelot is a MIPS-based Single Board Computer (SBC) made by - Momentum Computer <http://www.momenco.com/>. -@@ -318,6 +335,7 @@ - select IRQ_MV64340 - select PCI_MARVELL - select RM7000_CPU_SCACHE -+ select SWAP_IO_SPACE - help - The Ocelot is a MIPS-based Single Board Computer (SBC) made by - Momentum Computer <http://www.momenco.com/>. -@@ -332,6 +350,7 @@ - select LIMITED_DMA - select PCI_MARVELL - select RM7000_CPU_SCACHE -+ select SWAP_IO_SPACE - help - The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by - Momentum Computer <http://www.momenco.com/>. -@@ -349,6 +368,7 @@ - select HW_HAS_PCI - select IRQ_CPU - select IRQ_CPU_RM7K -+ select SWAP_IO_SPACE - help - Yosemite is an evaluation board for the RM9000x2 processor - manufactured by PMC-Sierra -@@ -411,6 +431,7 @@ - select DMA_NONCOHERENT - select IP22_CPU_SCACHE - select IRQ_CPU -+ select SWAP_IO_SPACE - help - This are the SGI Indy, Challenge S and Indigo2, as well as certain - OEM variants like the Tandem CMN B006S. To compile a Linux kernel -@@ -529,12 +550,14 @@ - depends on SOC_AU1000 - select DMA_NONCOHERENT - select HW_HAS_PCI -+ select SWAP_IO_SPACE - - config MIPS_PB1100 - bool "PB1100 board" - depends on SOC_AU1100 - select DMA_NONCOHERENT - select HW_HAS_PCI -+ select SWAP_IO_SPACE - - config MIPS_PB1500 - bool "PB1500 board" -@@ -596,6 +619,7 @@ - bool "Support for Broadcom BCM1xxx SOCs (EXPERIMENTAL)" - depends on EXPERIMENTAL - select DMA_COHERENT -+ select SWAP_IO_SPACE - - choice - prompt "BCM1xxx SOC-based board" -@@ -818,6 +842,7 @@ - select DMA_NONCOHERENT - select HW_HAS_PCI - select ISA -+ select SWAP_IO_SPACE - - config RWSEM_GENERIC_SPINLOCK - bool -@@ -934,8 +959,6 @@ - - config SWAP_IO_SPACE - bool -- depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927 || SIBYTE_SB1xxx_SOC || SGI_IP22 || MOMENCO_OCELOT_C || MOMENCO_OCELOT_G || MOMENCO_OCELOT || MOMENCO_JAGUAR_ATX || MIPS_MALTA || MIPS_ATLAS || MIPS_EV96100 || MIPS_PB1100 || MIPS_PB1000 -- default y - - # - # Unfortunately not all GT64120 systems run the chip at the same clock. ---- linux-2.6.8.1/arch/mips/kernel/cpu-probe.c 2004-08-14 12:55:10.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/cpu-probe.c 2006-06-26 09:07:09.000000000 +0200 -@@ -538,6 +538,27 @@ - } - } - -+#if defined(CONFIG_MIPS_BRCM) -+static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) -+{ -+ decode_config1(c); -+ switch (c->processor_id & 0xff00) { -+ case PRID_IMP_BCM6338: -+ c->cputype = CPU_BCM6338; -+ break; -+ case PRID_IMP_BCM6345: -+ c->cputype = CPU_BCM6345; -+ break; -+ case PRID_IMP_BCM6348: -+ c->cputype = CPU_BCM6348; -+ break; -+ default: -+ c->cputype = CPU_UNKNOWN; -+ break; -+ } -+} -+#endif -+ - static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c) - { - decode_config1(c); -@@ -576,6 +597,11 @@ - case PRID_COMP_SIBYTE: - cpu_probe_sibyte(c); - break; -+#if defined(CONFIG_MIPS_BRCM) -+ case PRID_COMP_BROADCOM: -+ cpu_probe_broadcom(c); -+ break; -+#endif - - case PRID_COMP_SANDCRAFT: - cpu_probe_sandcraft(c); ---- linux-2.6.8.1/arch/mips/kernel/gdb-stub.c 2004-08-14 12:56:23.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/gdb-stub.c 2006-06-26 09:07:09.000000000 +0200 -@@ -171,6 +171,8 @@ - static unsigned char *mem2hex(char *mem, char *buf, int count, int may_fault); - void handle_exception(struct gdb_regs *regs); - -+int kgdb_enabled; -+ - /* - * spin locks for smp case - */ ---- linux-2.6.8.1/arch/mips/kernel/irq.c 2004-08-14 12:54:50.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/irq.c 2006-06-26 09:07:09.000000000 +0200 -@@ -30,12 +30,7 @@ - /* - * Controller mappings for all interrupt sources: - */ --irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { -- [0 ... NR_IRQS-1] = { -- .handler = &no_irq_type, -- .lock = SPIN_LOCK_UNLOCKED -- } --}; -+irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned; - - static void register_irq_proc (unsigned int irq); - -@@ -809,7 +804,20 @@ - return 0; - } - --void __init init_generic_irq(void) -+#ifdef CONFIG_KGDB -+extern void breakpoint(void); -+extern void set_debug_traps(void); -+ -+static int kgdb_flag = 1; -+static int __init nokgdb(char *str) -+{ -+ kgdb_flag = 0; -+ return 1; -+} -+__setup("nokgdb", nokgdb); -+#endif -+ -+void __init init_IRQ(void) - { - int i; - -@@ -818,7 +826,18 @@ - irq_desc[i].action = NULL; - irq_desc[i].depth = 1; - irq_desc[i].handler = &no_irq_type; -+ irq_desc[i].lock = SPIN_LOCK_UNLOCKED; -+ } -+ -+ arch_init_irq(); -+ -+#ifdef CONFIG_KGDB -+ if (kgdb_flag) { -+ printk("Wait for gdb client connection ...\n"); -+ set_debug_traps(); -+ breakpoint(); - } -+#endif - } - - EXPORT_SYMBOL(disable_irq_nosync); -@@ -833,7 +852,7 @@ - - static struct proc_dir_entry * smp_affinity_entry [NR_IRQS]; - --static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL }; -+static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL }; - static int irq_affinity_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) - { ---- linux-2.6.8.1/arch/mips/kernel/Makefile 2004-08-14 12:55:19.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/Makefile 2006-06-26 09:07:09.000000000 +0200 -@@ -8,6 +8,13 @@ - ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ - time.o traps.o unaligned.o - -+# CONFIG_MIPS_BRCM Begin Broadcom added code. -+# gcc 3.4.x reorders code with -Os and -O2, breaking the save_static stuff. -+CFLAGS_syscall.o := -O1 -+CFLAGS_signal.o := -O1 -+CFLAGS_signal32.o := -O1 -+# CONFIG_MIPS_BRCM End Broadcom added code. -+ - ifdef CONFIG_MODULES - obj-y += mips_ksyms.o module.o - obj-$(CONFIG_MIPS32) += module-elf32.o ---- linux-2.6.8.1/arch/mips/kernel/proc.c 2004-08-14 12:55:09.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/proc.c 2006-06-26 09:07:09.000000000 +0200 -@@ -75,6 +75,11 @@ - [CPU_VR4133] "NEC VR4133", - [CPU_VR4181] "NEC VR4181", - [CPU_VR4181A] "NEC VR4181A", -+#if defined(CONFIG_MIPS_BRCM) -+ [CPU_BCM6338] "BCM6338", -+ [CPU_BCM6345] "BCM6345", -+ [CPU_BCM6348] "BCM6348", -+#endif - [CPU_SR71000] "Sandcraft SR71000" - }; - ---- linux-2.6.8.1/arch/mips/kernel/scall32-o32.S 2004-08-14 12:54:49.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/scall32-o32.S 2006-06-26 12:42:05.000000000 +0200 -@@ -640,9 +640,9 @@ - syscalltable - .size sys_call_table, . - sys_call_table - -- .macro sys function, nargs -+ /*.macro sys function, nargs - .byte \nargs -- .endm -+ .endm*/ - - sys_narg_table: - syscalltable ---- linux-2.6.8.1/arch/mips/kernel/time.c 2004-08-14 12:55:20.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/time.c 2006-06-26 09:07:09.000000000 +0200 -@@ -274,11 +274,15 @@ - - /* .. relative to previous jiffy (32 bits is enough) */ - count -= timerlo; -- -+ - __asm__("multu %1,%2" - : "=h" (res) - : "r" (count), "r" (sll32_usecs_per_cycle) -+#if defined(CONFIG_MIPS_BRCM) -+ : "lo"); -+#else - : "lo", "accum"); -+#endif - - /* - * Due to possible jiffies inconsistencies, we need to check -@@ -333,7 +337,11 @@ - __asm__("multu %1,%2" - : "=h" (res) - : "r" (count), "r" (quotient) -+#if defined(CONFIG_MIPS_BRCM) -+ : "lo"); -+#else - : "lo", "accum"); -+#endif - - /* - * Due to possible jiffies inconsistencies, we need to check -@@ -375,7 +383,11 @@ - : "r" (timerhi), "m" (timerlo), - "r" (tmp), "r" (USECS_PER_JIFFY), - "r" (USECS_PER_JIFFY_FRAC) -+#if defined(CONFIG_MIPS_BRCM) -+ : "hi", "lo"); -+#else - : "hi", "lo", "accum"); -+#endif - cached_quotient = quotient; - } - } -@@ -389,7 +401,11 @@ - __asm__("multu %1,%2" - : "=h" (res) - : "r" (count), "r" (quotient) -+#if defined(CONFIG_MIPS_BRCM) -+ : "lo"); -+#else - : "lo", "accum"); -+#endif - - /* - * Due to possible jiffies inconsistencies, we need to check -@@ -738,6 +754,7 @@ - board_timer_setup(&timer_irqaction); - } - -+ - #define FEBRUARY 2 - #define STARTOFTIME 1970 - #define SECDAY 86400L ---- linux-2.6.8.1/arch/mips/kernel/traps.c 2004-08-14 12:55:20.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/kernel/traps.c 2006-06-26 09:07:09.000000000 +0200 -@@ -246,6 +246,13 @@ - - static spinlock_t die_lock = SPIN_LOCK_UNLOCKED; - -+#if defined(CONFIG_MIPS_BRCM) -+#ifdef CONFIG_REMOTE_DEBUG -+#include <asm/gdb-stub.h> -+extern void handle_exception(struct gdb_regs *regs); -+#endif -+#endif -+ - NORET_TYPE void __die(const char * str, struct pt_regs * regs, - const char * file, const char * func, unsigned long line) - { -@@ -258,7 +265,33 @@ - printk(" in %s:%s, line %ld", file, func, line); - printk("[#%d]:\n", ++die_counter); - show_registers(regs); -+#if defined(CONFIG_MIPS_BRCM) -+#ifdef CONFIG_REMOTE_DEBUG -+ { -+ struct gdb_regs regs2; -+ int i; -+ long *ptr; -+ -+ ptr = ®s2.reg0; -+ /* Copy registers to GDB structure */ -+ for(i=0; i<32;i++) -+ *ptr++ = regs->regs[i]; -+ -+ regs2.lo = regs->lo; -+ regs2.hi = regs->hi; -+ regs2.cp0_epc = regs->cp0_epc; -+ regs2.cp0_badvaddr = regs->cp0_badvaddr; -+ regs2.cp0_status = regs->cp0_status; -+ regs2.cp0_cause = regs->cp0_cause; -+ -+ handle_exception(®s2); /* Break to GDB */ -+ } -+#endif -+#endif - spin_unlock_irq(&die_lock); -+ /* Ron add for kernel crash */ -+ (*(volatile unsigned int *)(0xfffe040c)) &= ~(1<<5); -+ machine_restart(NULL); - do_exit(SIGSEGV); - } - ---- linux-2.6.8.1/arch/mips/Makefile 2004-08-14 12:54:47.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/Makefile 2006-06-26 09:07:09.000000000 +0200 -@@ -41,8 +41,14 @@ - endif - - ifdef CONFIG_CROSSCOMPILE -+# CONFIG_MIPS_BRCM Begin Broadcom added code. -+ifdef CONFIG_MIPS_BRCM -+CROSS_COMPILE := mips-linux-uclibc-#$(tool-prefix) -+else - CROSS_COMPILE := $(tool-prefix) - endif -+# CONFIG_MIPS_BRCM End Broadcom added code. -+endif - - # - # GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel -@@ -57,6 +63,9 @@ - cflags-y := -I $(TOPDIR)/include/asm/gcc - cflags-y += -G 0 -mno-abicalls -fno-pic -pipe - cflags-y += $(call check_gcc, -finline-limit=100000,) -+ifeq ($(strip $(JTAG_KERNEL_DEBUG)),y) -+cflags-y += -g -+endif - LDFLAGS_vmlinux += -G 0 -static -n - MODFLAGS += -mlong-calls - -@@ -64,6 +73,12 @@ - - check_warning = $(shell if $(CC) $(1) -c -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi) - -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+ifdef CONFIG_MIPS_BRCM -+cflags-$(CONFIG_REMOTE_DEBUG) += -ggdb -+endif -+# CONFIG_MIPS_BRCM End Broadcom changed code. -+ - # - # Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>) - # -@@ -302,6 +317,20 @@ - libs-$(CONFIG_BAGET_MIPS) += arch/mips/baget/ arch/mips/baget/prom/ - load-$(CONFIG_BAGET_MIPS) += 0x80001000 - -+# CONFIG_MIPS_BRCM Begin Broadcom added code. -+ifdef CONFIG_MIPS_BRCM -+# -+# Broadcom board -+core-$(CONFIG_BCM96338) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/ -+cflags-$(CONFIG_BCM96338) += -Iinclude/asm-mips/mach-bcm963xx -+core-$(CONFIG_BCM96345) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/ -+cflags-$(CONFIG_BCM96345) += -Iinclude/asm-mips/mach-bcm963xx -+core-$(CONFIG_BCM96348) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/ -+cflags-$(CONFIG_BCM96348) += -Iinclude/asm-mips/mach-bcm963xx -+load-$(CONFIG_MIPS_BRCM) += 0x80010000 -+endif -+# CONFIG_MIPS_BRCM End Broadcom added code. -+ - # - # Cobalt Server - # ---- linux-2.6.8.1/arch/mips/mm/c-r4k.c 2004-08-14 12:56:22.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/mm/c-r4k.c 2006-06-26 09:07:09.000000000 +0200 -@@ -86,7 +86,7 @@ - - static void (* r4k_blast_dcache)(void); - --static void r4k_blast_dcache_setup(void) -+static inline void r4k_blast_dcache_setup(void) - { - unsigned long dc_lsize = cpu_dcache_line_size(); - -@@ -385,6 +385,7 @@ - static void r4k_flush_icache_range(unsigned long start, unsigned long end) - { - unsigned long dc_lsize = current_cpu_data.dcache.linesz; -+ unsigned long ic_lsize = current_cpu_data.icache.linesz; - unsigned long addr, aend; - - if (!cpu_has_ic_fills_f_dc) { -@@ -407,14 +408,14 @@ - if (end - start > icache_size) - r4k_blast_icache(); - else { -- addr = start & ~(dc_lsize - 1); -- aend = (end - 1) & ~(dc_lsize - 1); -+ addr = start & ~(ic_lsize - 1); -+ aend = (end - 1) & ~(ic_lsize - 1); - while (1) { - /* Hit_Invalidate_I */ - protected_flush_icache_line(addr); - if (addr == aend) - break; -- addr += dc_lsize; -+ addr += ic_lsize; - } - } - } -@@ -802,6 +803,13 @@ - if (!(config & MIPS_CONF_M)) - panic("Don't know how to probe P-caches on this cpu."); - -+#if defined(CONFIG_MIPS_BRCM) -+ if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348){ -+ printk("brcm mips: enabling icache and dcache...\n"); -+ /* Enable caches */ -+ write_c0_diag(read_c0_diag() | 0xC0000000); -+ } -+#endif - /* - * So we seem to be a MIPS32 or MIPS64 CPU - * So let's probe the I-cache ... ---- linux-2.6.8.1/arch/mips/pci/fixup-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/pci/fixup-bcm96348.c 2006-06-26 09:07:09.000000000 +0200 -@@ -0,0 +1,85 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/init.h> -+#include <linux/types.h> -+#include <linux/pci.h> -+ -+#include <bcmpci.h> -+#include <bcm_intr.h> -+#include <bcm_map_part.h> -+ -+static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); -+ -+static char irq_tab_bcm96348[] __initdata = { -+ [0] = INTERRUPT_ID_MPI, -+ [1] = INTERRUPT_ID_MPI, -+#if defined(CONFIG_USB) -+ [USB_HOST_SLOT] = INTERRUPT_ID_USBH -+#endif -+}; -+ -+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -+{ -+ return irq_tab_bcm96348[slot]; -+} -+ -+static void bcm96348_fixup(struct pci_dev *dev) -+{ -+ uint32 memaddr; -+ uint32 size; -+ -+ memaddr = pci_resource_start(dev, 0); -+ size = pci_resource_len(dev, 0); -+ -+ switch (PCI_SLOT(dev->devfn)) { -+ case 0: -+ // UBUS to PCI address range -+ // Memory Window 1. Mask determines which bits are decoded. -+ mpi->l2pmrange1 = ~(size-1); -+ // UBUS to PCI Memory base address. This is akin to the ChipSelect base -+ // register. -+ mpi->l2pmbase1 = memaddr & BCM_PCI_ADDR_MASK; -+ // UBUS to PCI Remap Address. Replaces the masked address bits in the -+ // range register with this setting. -+ // Also, enable direct I/O and direct Memory accesses -+ mpi->l2pmremap1 = (memaddr | MEM_WINDOW_EN); -+ break; -+ -+ case 1: -+ // Memory Window 2 -+ mpi->l2pmrange2 = ~(size-1); -+ // UBUS to PCI Memory base address. -+ mpi->l2pmbase2 = memaddr & BCM_PCI_ADDR_MASK; -+ // UBUS to PCI Remap Address -+ mpi->l2pmremap2 = (memaddr | MEM_WINDOW_EN); -+ break; -+ -+#if defined(CONFIG_USB) -+ case USB_HOST_SLOT: -+ dev->resource[0].start = USB_HOST_BASE; -+ dev->resource[0].end = USB_HOST_BASE+USB_BAR0_MEM_SIZE-1; -+ break; -+#endif -+ } -+} -+ -+struct pci_fixup pcibios_fixups[] = { -+ { PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, bcm96348_fixup }, -+ {0} -+}; ---- linux-2.6.8.1/arch/mips/pci/ops-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/pci/ops-bcm96348.c 2006-06-26 09:07:09.000000000 +0200 -@@ -0,0 +1,276 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/types.h> -+#include <linux/pci.h> -+#include <linux/kernel.h> -+#include <linux/init.h> -+#include <asm/addrspace.h> -+ -+#include <bcm_intr.h> -+#include <bcm_map_part.h> -+#include <bcmpci.h> -+ -+#include <linux/delay.h> -+ -+#if defined(CONFIG_USB) -+#if 0 -+#define DPRINT(x...) printk(x) -+#else -+#define DPRINT(x...) -+#endif -+ -+static int -+pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size); -+static int -+pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size); -+ -+static bool usb_mem_size_rd = FALSE; -+static uint32 usb_mem_base = 0; -+static uint32 usb_cfg_space_cmd_reg = 0; -+#endif -+static bool pci_mem_size_rd = FALSE; -+ -+static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); -+ -+static void mpi_SetupPciConfigAccess(uint32 addr) -+{ -+ mpi->l2pcfgctl = (DIR_CFG_SEL | DIR_CFG_USEREG | addr) & ~CONFIG_TYPE; -+} -+ -+static void mpi_ClearPciConfigAccess(void) -+{ -+ mpi->l2pcfgctl = 0x00000000; -+} -+ -+#if defined(CONFIG_USB) -+/* -------------------------------------------------------------------------- -+ Name: pci63xx_int_write -+Abstract: PCI Config write on internal device(s) -+ -------------------------------------------------------------------------- */ -+static int -+pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size) -+{ -+ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { -+ return PCIBIOS_SUCCESSFUL; -+ } -+ -+ switch (size) { -+ case 1: -+ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %02X\n", -+ PCI_SLOT(devfn), where, size, *value); -+ break; -+ case 2: -+ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %04X\n", -+ PCI_SLOT(devfn), where, size, *value); -+ switch (where) { -+ case PCI_COMMAND: -+ usb_cfg_space_cmd_reg = *value; -+ break; -+ default: -+ break; -+ } -+ break; -+ case 4: -+ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %08lX\n", -+ PCI_SLOT(devfn), where, size, *value); -+ switch (where) { -+ case PCI_BASE_ADDRESS_0: -+ if (*value == 0xffffffff) { -+ usb_mem_size_rd = TRUE; -+ } else { -+ usb_mem_base = *value; -+ } -+ break; -+ default: -+ break; -+ } -+ break; -+ default: -+ break; -+ } -+ -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: pci63xx_int_read -+Abstract: PCI Config read on internal device(s) -+ -------------------------------------------------------------------------- */ -+static int -+pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size) -+{ -+ uint32 retValue = 0xFFFFFFFF; -+ -+ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { -+ return PCIBIOS_SUCCESSFUL; -+ } -+ -+ // For now, this is specific to the USB Host controller. We can -+ // make it more general if we have to... -+ // Emulate PCI Config accesses -+ switch (where) { -+ case PCI_VENDOR_ID: -+ case PCI_DEVICE_ID: -+ retValue = PCI_VENDOR_ID_BROADCOM | 0x63000000; -+ break; -+ case PCI_COMMAND: -+ case PCI_STATUS: -+ retValue = (0x0006 << 16) | usb_cfg_space_cmd_reg; -+ break; -+ case PCI_CLASS_REVISION: -+ case PCI_CLASS_DEVICE: -+ retValue = (PCI_CLASS_SERIAL_USB << 16) | (0x10 << 8) | 0x01; -+ break; -+ case PCI_BASE_ADDRESS_0: -+ if (usb_mem_size_rd) { -+ retValue = USB_BAR0_MEM_SIZE; -+ } else { -+ if (usb_mem_base != 0) -+ retValue = usb_mem_base; -+ else -+ retValue = USB_HOST_BASE; -+ } -+ usb_mem_size_rd = FALSE; -+ break; -+ case PCI_CACHE_LINE_SIZE: -+ case PCI_LATENCY_TIMER: -+ retValue = 0; -+ break; -+ case PCI_HEADER_TYPE: -+ retValue = PCI_HEADER_TYPE_NORMAL; -+ break; -+ case PCI_SUBSYSTEM_VENDOR_ID: -+ retValue = PCI_VENDOR_ID_BROADCOM; -+ break; -+ case PCI_SUBSYSTEM_ID: -+ retValue = 0x6300; -+ break; -+ case PCI_INTERRUPT_LINE: -+ retValue = INTERRUPT_ID_USBH; -+ break; -+ default: -+ break; -+ } -+ -+ switch (size) { -+ case 1: -+ *value = (retValue >> ((where & 3) << 3)) & 0xff; -+ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %02X\n", -+ PCI_SLOT(devfn), where, size, *value); -+ break; -+ case 2: -+ *value = (retValue >> ((where & 3) << 3)) & 0xffff; -+ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %04X\n", -+ PCI_SLOT(devfn), where, size, *value); -+ break; -+ case 4: -+ *value = retValue; -+ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %08lX\n", -+ PCI_SLOT(devfn), where, size, *value); -+ break; -+ default: -+ break; -+ } -+ -+ return PCIBIOS_SUCCESSFUL; -+} -+#endif -+ -+static int bcm96348_pcibios_read(struct pci_bus *bus, unsigned int devfn, -+ int where, int size, u32 * val) -+{ -+ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); -+ uint32 data; -+ -+#if defined(CONFIG_USB) -+ if (PCI_SLOT(devfn) == USB_HOST_SLOT) -+ return pci63xx_int_read(devfn, where, val, size); -+#endif -+ -+ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); -+ data = *(uint32 *)ioBase; -+ switch(size) { -+ case 1: -+ *val = (data >> ((where & 3) << 3)) & 0xff; -+ break; -+ case 2: -+ *val = (data >> ((where & 3) << 3)) & 0xffff; -+ break; -+ case 4: -+ *val = data; -+ /* Special case for reading PCI device range */ -+ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { -+ if (pci_mem_size_rd) { -+ /* bcm6348 PCI memory window minimum size is 64K */ -+ *val &= PCI_SIZE_64K; -+ } -+ } -+ break; -+ default: -+ break; -+ } -+ pci_mem_size_rd = FALSE; -+ mpi_ClearPciConfigAccess(); -+ -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+static int bcm96348_pcibios_write(struct pci_bus *bus, unsigned int devfn, -+ int where, int size, u32 val) -+{ -+ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); -+ uint32 data; -+ -+#if defined(CONFIG_USB) -+ if (PCI_SLOT(devfn) == USB_HOST_SLOT) -+ return pci63xx_int_write(devfn, where, &val, size); -+#endif -+ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); -+ data = *(uint32 *)ioBase; -+ switch(size) { -+ case 1: -+ data = (data & ~(0xff << ((where & 3) << 3))) | -+ (val << ((where & 3) << 3)); -+ break; -+ case 2: -+ data = (data & ~(0xffff << ((where & 3) << 3))) | -+ (val << ((where & 3) << 3)); -+ break; -+ case 4: -+ data = val; -+ /* Special case for reading PCI device range */ -+ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { -+ if (val == 0xffffffff) -+ pci_mem_size_rd = TRUE; -+ } -+ break; -+ default: -+ break; -+ } -+ *(uint32 *)ioBase = data; -+ udelay(500); -+ mpi_ClearPciConfigAccess(); -+ -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+struct pci_ops bcm96348_pci_ops = { -+ .read = bcm96348_pcibios_read, -+ .write = bcm96348_pcibios_write -+}; ---- linux-2.6.8.1/arch/mips/pci/Makefile 2004-08-14 12:54:47.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/arch/mips/pci/Makefile 2006-06-26 09:07:09.000000000 +0200 -@@ -17,6 +17,8 @@ - obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o - obj-$(CONFIG_MIPS_TX3927) += ops-jmr3927.o - obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o -+obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o -+obj-$(CONFIG_BCM_PCI) += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o - - # - # These are still pretty much in the old state, watch, go blind. -@@ -51,3 +53,7 @@ - obj-$(CONFIG_TOSHIBA_RBTX4927) += fixup-rbtx4927.o ops-tx4927.o - obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o - obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o -+ -+ifeq "$(CONFIG_BCM_PCI)" "y" -+EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+endif ---- linux-2.6.8.1/arch/mips/pci/pci-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/arch/mips/pci/pci-bcm96348.c 2006-06-26 09:07:09.000000000 +0200 -@@ -0,0 +1,54 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/types.h> -+#include <linux/pci.h> -+#include <linux/kernel.h> -+#include <linux/init.h> -+ -+#include <asm/pci_channel.h> -+#include <bcmpci.h> -+ -+static struct resource bcm_pci_io_resource = { -+ .name = "bcm96348 pci IO space", -+ .start = BCM_PCI_IO_BASE, -+ .end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB - 1, -+ .flags = IORESOURCE_IO -+}; -+ -+static struct resource bcm_pci_mem_resource = { -+ .name = "bcm96348 pci memory space", -+ .start = BCM_PCI_MEM_BASE, -+ .end = BCM_PCI_MEM_BASE + BCM_PCI_MEM_SIZE_16MB - 1, -+ .flags = IORESOURCE_MEM -+}; -+ -+extern struct pci_ops bcm96348_pci_ops; -+ -+struct pci_controller bcm96348_controller = { -+ .pci_ops = &bcm96348_pci_ops, -+ .io_resource = &bcm_pci_io_resource, -+ .mem_resource = &bcm_pci_mem_resource, -+}; -+ -+static void bcm96348_pci_init(void) -+{ -+ register_pci_controller(&bcm96348_controller); -+} -+ -+arch_initcall(bcm96348_pci_init); ---- linux-2.6.8.1/drivers/mtd/maps/bcm963xx.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/drivers/mtd/maps/bcm963xx.c 2006-06-26 09:07:13.000000000 +0200 -@@ -0,0 +1,162 @@ -+/* -+ * A simple flash mapping code for BCM963xx board flash memory -+ * It is simple because it only treats all the flash memory as ROM -+ * It is used with chips/map_rom.c -+ * -+ * Song Wang (songw@broadcom.com) -+ */ -+#include <linux/module.h> -+#include <linux/types.h> -+#include <linux/kernel.h> -+#include <linux/init.h> -+#include <asm/io.h> -+#include <linux/mtd/mtd.h> -+#include <linux/mtd/map.h> -+#include <linux/config.h> -+#include <linux/mtd/partitions.h> -+ -+#include <board.h> -+#include <bcmTag.h> -+#define VERSION "1.0" -+ -+ -+extern PFILE_TAG kerSysImageTagGet(void); -+ -+static struct mtd_info *mymtd; -+static struct mtd_partition brcm_partition_info[4]; -+ -+#define CFE_ADDR 0xbfc00000 -+#define CFE_SIZE 64 << 10 -+#define FLASH_2M_SIZE 2048 << 10 -+#define FLASH_4M_SIZE 4096 << 10 -+#define NVRAM_SIZE 64 << 10 -+#define TAG_SIZE 0x100 -+#define FS_KERNEL_SIZE_4M 0x3E0000 -+#define NVRAM_ADDR_4M 0x3F0000 -+ -+static map_word brcm_physmap_read16(struct map_info *map, unsigned long ofs) -+{ -+ map_word val; -+ -+ val.x[0] = __raw_readw(map->map_priv_1 + ofs); -+ -+ return val; -+} -+ -+void brcm_physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) -+{ -+ memcpy_fromio(to, map->map_priv_1 + from, len); -+} -+ -+static void brcm_physmap_write16(struct map_info *map, __u16 d, unsigned long adr) -+{ -+ __raw_writew(d, map->map_priv_1 + adr); -+ mb(); -+} -+ -+void brcm_physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len) -+{ -+ memcpy_toio(map->map_priv_1 + to, from, len); -+} -+ -+struct map_info brcm_physmap_map = { -+ .name = "Physically mapped flash", -+ .bankwidth = 2, -+ .read = brcm_physmap_read16, -+ .copy_from = brcm_physmap_copy_from, -+ .write = brcm_physmap_write16, -+ .copy_to = brcm_physmap_copy_to -+ -+}; -+ -+ -+ -+int __init init_brcm_physmap(void) -+{ -+ PFILE_TAG pTag = NULL; -+ u_int32_t rootfs_addr, kernel_addr,fs_len,cfe_len; -+ FLASH_ADDR_INFO info; -+ -+ kerSysFlashAddrInfoGet( &info ); -+ -+ /* Read the flash memory map from flash memory. */ -+ if (!(pTag = kerSysImageTagGet())) { -+ printk("Failed to read image tag from flash\n"); -+ return -EIO; -+ } -+ -+ rootfs_addr = (u_int32_t) simple_strtoul(pTag->rootfsAddress, NULL, 10); -+ kernel_addr = (u_int32_t) simple_strtoul(pTag->kernelAddress, NULL, 10); -+ -+ -+ brcm_physmap_map.size = FLASH_4M_SIZE; -+ -+ fs_len = kernel_addr - rootfs_addr; -+ cfe_len=CFE_SIZE; -+ /* Ron mapping from fs */ -+ brcm_physmap_map.map_priv_1 = (unsigned long)CFE_ADDR; -+ -+ if (!brcm_physmap_map.map_priv_1) { -+ printk("Wrong flash starting address\n"); -+ return -EIO; -+ } -+ -+ if (brcm_physmap_map.size <= 0) { -+ printk("Wrong flash size\n"); -+ return -EIO; -+ } -+ -+ mymtd = do_map_probe("cfi_probe", &brcm_physmap_map); -+ if (!mymtd) -+ return -EIO; -+ -+ mymtd->owner = THIS_MODULE; -+ /* Ron file system */ -+ brcm_partition_info[0].name = "fs"; -+ brcm_partition_info[0].offset = (cfe_len + TAG_SIZE); -+ brcm_partition_info[0].size = fs_len; -+ brcm_partition_info[0].mask_flags = 0; -+ -+ /* Ron tag + file system + kernel */ -+ brcm_partition_info[1].name = "tag+fs+kernel"; -+ brcm_partition_info[1].offset = cfe_len; -+ brcm_partition_info[1].size = FS_KERNEL_SIZE_4M; -+ brcm_partition_info[1].mask_flags = 0; -+ -+ /* Ron bootloader */ -+ brcm_partition_info[2].name = "bootloader"; -+ brcm_partition_info[2].offset = 0x00; -+ brcm_partition_info[2].size = cfe_len; -+ brcm_partition_info[2].mask_flags = 0; -+ -+ /* Ron nvram */ -+ brcm_partition_info[3].name = "nvram"; -+ brcm_partition_info[3].offset = NVRAM_ADDR_4M; -+ brcm_partition_info[3].size = NVRAM_SIZE; -+ brcm_partition_info[3].mask_flags = 0; -+ -+ add_mtd_partitions(mymtd, brcm_partition_info, 4); -+ -+ return 0; -+ -+} -+ -+static void __exit cleanup_brcm_physmap(void) -+{ -+if (mymtd) { -+ del_mtd_partitions(mymtd); -+ del_mtd_device(mymtd); -+ map_destroy(mymtd); -+} -+if (brcm_physmap_map.map_priv_1) { -+ brcm_physmap_map.map_priv_1 = 0; -+} -+} -+ -+module_init(init_brcm_physmap); -+module_exit(cleanup_brcm_physmap); -+ -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Song Wang songw@broadcom.com"); -+MODULE_DESCRIPTION("Configurable MTD map driver for read-only root file system"); ---- linux-2.6.8.1/drivers/mtd/maps/Makefile 2004-08-14 12:54:46.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/drivers/mtd/maps/Makefile 2006-06-26 09:07:13.000000000 +0200 -@@ -39,13 +39,13 @@ - obj-$(CONFIG_MTD_SCx200_DOCFLASH)+= scx200_docflash.o - obj-$(CONFIG_MTD_DBOX2) += dbox2-flash.o - obj-$(CONFIG_MTD_OCELOT) += ocelot.o -+obj-$(CONFIG_MTD_LASAT) += lasat.o - obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o - obj-$(CONFIG_MTD_PCI) += pci.o --obj-$(CONFIG_MTD_PB1XXX) += pb1xxx-flash.o --obj-$(CONFIG_MTD_DB1X00) += db1x00-flash.o --obj-$(CONFIG_MTD_PB1550) += pb1550-flash.o --obj-$(CONFIG_MTD_DB1550) += db1550-flash.o - obj-$(CONFIG_MTD_LASAT) += lasat.o -+obj-$(CONFIG_MTD_DB1X00) += db1x00-flash.o -+obj-$(CONFIG_MTD_PB1550) += pb1550-flash.o -+obj-$(CONFIG_MTD_DB1550) += db1550-flash.o - obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o - obj-$(CONFIG_MTD_EDB7312) += edb7312.o - obj-$(CONFIG_MTD_IMPA7) += impa7.o -@@ -64,3 +64,11 @@ - obj-$(CONFIG_MTD_IXP4XX) += ixp4xx.o - obj-$(CONFIG_MTD_WRSBC8260) += wr_sbc82xx_flash.o - obj-$(CONFIG_MTD_DMV182) += dmv182.o -+obj-$(CONFIG_MTD_PB1000) += pb1xxx-flash.o -+obj-$(CONFIG_MTD_PB1100) += pb1xxx-flash.o -+obj-$(CONFIG_MTD_PB1500) += pb1xxx-flash.o -+obj-$(CONFIG_MTD_DB1X00) += db1x00-flash.o -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+obj-$(CONFIG_MTD_BCM963XX) += bcm963xx.o -+EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+# CONFIG_MIPS_BRCM End Broadcom changed code. ---- linux-2.6.8.1/drivers/mtd/maps/Kconfig 2004-08-14 12:56:23.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/drivers/mtd/maps/Kconfig 2006-06-26 09:07:13.000000000 +0200 -@@ -60,6 +60,12 @@ - Ignore this option if you use run-time physmap configuration - (i.e., run-time calling physmap_configure()). - -+config MTD_BCM963XX -+ tristate "Broadcom 963xx ADSL board flash memory support" -+ depends on MIPS_BRCM -+ help -+ Broadcom 963xx ADSL board flash memory -+ - config MTD_SUN_UFLASH - tristate "Sun Microsystems userflash support" - depends on (SPARC32 || SPARC64) && MTD_CFI -@@ -182,41 +188,12 @@ - help - Support for the flash chip on Tsunami TIG bus. - --config MTD_LASAT -- tristate "Flash chips on LASAT board" -- depends on LASAT -- help -- Support for the flash chips on the Lasat 100 and 200 boards. -- - config MTD_NETtel - tristate "CFI flash device on SnapGear/SecureEdge" - depends on X86 && MTD_PARTITIONS && MTD_JEDECPROBE - help - Support for flash chips on NETtel/SecureEdge/SnapGear boards. - --config MTD_PB1XXX -- tristate "Flash devices on Alchemy PB1xxx boards" -- depends on MIPS && ( MIPS_PB1000 || MIPS_PB1100 || MIPS_PB1500 ) -- help -- Flash memory access on Alchemy Pb1000/Pb1100/Pb1500 boards -- --config MTD_PB1XXX_BOOT -- bool "PB1x00 boot flash device" -- depends on MTD_PB1XXX && ( MIPS_PB1100 || MIPS_PB1500 ) -- help -- Use the first of the two 32MiB flash banks on Pb1100/Pb1500 board. -- You can say 'Y' to both this and 'MTD_PB1XXX_USER' below, to use -- both banks. -- --config MTD_PB1XXX_USER -- bool "PB1x00 user flash device" -- depends on MTD_PB1XXX && ( MIPS_PB1100 || MIPS_PB1500 ) -- default y if MTD_PB1XX_BOOT = n -- help -- Use the second of the two 32MiB flash banks on Pb1100/Pb1500 board. -- You can say 'Y' to both this and 'MTD_PB1XXX_BOOT' above, to use -- both banks. -- - config MTD_PB1550 - tristate "Flash devices on Alchemy PB1550 board" - depends on MIPS && MIPS_PB1550 -@@ -338,6 +315,80 @@ - Mapping for the Flaga digital module. If you don´t have one, ignore - this setting. - -+config MTD_PB1000 -+ tristate "Pb1000 Boot Flash device" -+ depends on MIPS && MIPS_PB1000 -+ help -+ Flash memory access on Alchemy Pb1000 -+ -+config MTD_PB1100 -+ tristate "Pb1100 Flash device" -+ depends on MIPS && MIPS_PB1100 -+ help -+ Flash memory access on Alchemy Pb1100 -+ -+config MTD_PB1500 -+ tristate "Pb1500 Flash device" -+ depends on MIPS && MIPS_PB1500 -+ help -+ Flash memory access on Alchemy Pb1500 -+ -+config MTD_PB1500_BOOT -+ bool "Pb1100/Pb1500 Boot Flash device" -+ depends on MIPS && (MTD_PB1500 || MTD_PB1100) -+ help -+ Use the first of the two 32MB flash banks on Pb1100/Pb1500 board. -+ You can say 'Y' to both this and the USER flash option, to use -+ both banks. -+ -+config MTD_PB1500_USER -+ bool "Pb1100/Pb1500 User Flash device (2nd 32MB bank)" -+ depends on MIPS && (MTD_PB1500 || MTD_PB1100) -+ help -+ Use the second of the two 32MB flash banks on Pb1100/Pb1500 board. -+ You can say 'Y' to both this and the BOOT flash option, to use -+ both banks. -+ -+config MTD_DB1X00 -+ tristate "Db1X00 Flash device" -+ depends on MIPS && (MIPS_DB1000 || MIPS_DB1100 || MIPS_DB1500) -+ help -+ Flash memory access on Alchemy Db1X00 Boards -+ -+config MTD_DB1X00_BOOT -+ bool "Db1X00 Boot Flash device" -+ depends on MIPS && MTD_DB1X00 -+ help -+ Use the first of the two 32MB flash banks on Db1X00 board. -+ You can say 'Y' to both this and the USER flash option, to use -+ both banks. -+ -+config MTD_DB1X00_USER -+ bool "Db1X00 User Flash device (2nd 32MB bank)" -+ depends on MIPS && MTD_DB1X00 -+ help -+ Use the second of the two 32MB flash banks on Db1X00 boards. -+ You can say 'Y' to both this and the BOOT flash option, to use -+ both banks. -+ -+config MTD_BOSPORUS -+ tristate "Bosporus Flash device" -+ depends on MIPS && MIPS_BOSPORUS -+ help -+ Flash memory access on Alchemy Bosporus Board -+ -+config MTD_XXS1500 -+ tristate "MyCable XXS1500 Flash device" -+ depends on MIPS && MIPS_XXS1500 -+ help -+ Flash memory access on MyCable XXS1500 Board -+ -+config MTD_MTX1 -+ tristate "4-G Systems MTX-1 Flash device" -+ depends on MIPS && MIPS_MTX1 -+ help -+ Flash memory access on 4-G Systems MTX-1 Board -+ - config MTD_BEECH - tristate "CFI Flash device mapped on IBM 405LP Beech" - depends on MTD_CFI && PPC32 && 40x && BEECH -@@ -422,6 +473,12 @@ - NVRAM on the Momenco Ocelot board. If you have one of these boards - and would like access to either of these, say 'Y'. - -+config MTD_LASAT -+ tristate "LASAT flash device" -+ depends on LASAT && MTD_CFI -+ help -+ Support for the flash chips on the Lasat 100 and 200 boards. -+ - config MTD_SOLUTIONENGINE - tristate "CFI Flash device mapped on Hitachi SolutionEngine" - depends on SUPERH && MTD_CFI && MTD_REDBOOT_PARTS ---- linux-2.6.8.1/drivers/usb/host/Makefile 2004-08-14 12:56:23.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/drivers/usb/host/Makefile 2006-06-26 09:07:14.000000000 +0200 -@@ -8,3 +8,7 @@ - obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o - - obj-$(CONFIG_USB_SL811HS) += hc_sl811.o -+ -+ifeq ($(CONFIG_MIPS_BRCM),y) -+EXTRA_CFLAGS += -DCONFIG_SWAP_IO_SPACE -D__MIPSEB__ -+endif -\ No newline at end of file ---- linux-2.6.8.1/include/asm-mips/addrspace.h 2004-08-14 12:54:47.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/include/asm-mips/addrspace.h 2006-06-26 09:07:15.000000000 +0200 -@@ -11,7 +11,13 @@ - #define _ASM_ADDRSPACE_H - - #include <linux/config.h> -+#ifdef __KERNEL__ -+#if defined(CONFIG_BCM_ENDPOINT_MODULE) -+#include <asm/mach-generic/spaces.h> -+#else - #include <spaces.h> -+#endif -+#endif - - /* - * Configure language ---- linux-2.6.8.1/include/asm-mips/bootinfo.h 2004-08-14 12:54:51.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/include/asm-mips/bootinfo.h 2006-06-26 09:07:15.000000000 +0200 -@@ -210,6 +210,16 @@ - #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ - #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ - -+#if defined(CONFIG_MIPS_BRCM) -+/* -+ * Valid machtype for group BRCM -+ */ -+#define MACH_GROUP_BRCM 23 /* Broadcom boards */ -+#define MACH_BCM96338 0 -+#define MACH_BCM96345 1 -+#define MACH_BCM96348 2 -+#endif -+ - #define CL_SIZE COMMAND_LINE_SIZE - - const char *get_system_type(void); ---- linux-2.6.8.1/include/asm-mips/cpu.h 2004-08-14 12:54:50.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/include/asm-mips/cpu.h 2006-06-26 09:07:15.000000000 +0200 -@@ -71,6 +71,11 @@ - #define PRID_IMP_4KEMPR2 0x9100 - #define PRID_IMP_4KSD 0x9200 - #define PRID_IMP_24K 0x9300 -+#if defined(CONFIG_MIPS_BRCM) -+#define PRID_IMP_BCM6338 0x9000 -+#define PRID_IMP_BCM6345 0x8000 -+#define PRID_IMP_BCM6348 0x9100 -+#endif - - #define PRID_IMP_UNKNOWN 0xff00 - -@@ -177,7 +182,14 @@ - #define CPU_VR4133 56 - #define CPU_AU1550 57 - #define CPU_24K 58 -+#if defined(CONFIG_MIPS_BRCM) -+#define CPU_BCM6338 59 -+#define CPU_BCM6345 60 -+#define CPU_BCM6348 61 -+#define CPU_LAST 61 -+#else - #define CPU_LAST 58 -+#endif - - /* - * ISA Level encodings -diff -urN linux-2.6.8.1/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h linux-2.6.8.1-brcm63xx/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h ---- linux-2.6.8.1/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 2006-06-26 09:07:15.000000000 +0200 -@@ -0,0 +1,36 @@ -+#ifndef __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H -+#define __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H -+ -+#define cpu_has_tlb 1 -+#define cpu_has_4kex 4 -+#define cpu_has_4ktlb 8 -+#define cpu_has_fpu 0 -+#define cpu_has_32fpr 0 -+#define cpu_has_counter 0x40 -+#define cpu_has_watch 0 -+#define cpu_has_mips16 0 -+#define cpu_has_divec 0x200 -+#define cpu_has_vce 0 -+#define cpu_has_cache_cdex_p 0 -+#define cpu_has_cache_cdex_s 0 -+#define cpu_has_prefetch 0x40000 -+#define cpu_has_mcheck 0x2000 -+#define cpu_has_ejtag 0x4000 -+#define cpu_has_llsc 0x10000 -+#define cpu_has_vtag_icache 0 -+#define cpu_has_dc_aliases 0 -+#define cpu_has_ic_fills_f_dc 0 -+ -+#define cpu_has_nofpuex 0 -+#define cpu_has_64bits 0 -+#define cpu_has_64bit_zero_reg 0 -+#define cpu_has_64bit_gp_regs 0 -+#define cpu_has_64bit_addresses 0 -+ -+#define cpu_has_subset_pcaches 0 -+ -+#define cpu_dcache_line_size() 16 -+#define cpu_icache_line_size() 16 -+#define cpu_scache_line_size() 0 -+ -+#endif /* __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H */ ---- linux-2.6.8.1/include/asm-mips/mach-generic/param.h 2004-08-14 12:55:10.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/include/asm-mips/mach-generic/param.h 2006-06-26 09:07:15.000000000 +0200 -@@ -8,6 +8,10 @@ - #ifndef __ASM_MACH_GENERIC_PARAM_H - #define __ASM_MACH_GENERIC_PARAM_H - -+#if defined(CONFIG_MIPS_BRCM) -+#define HZ 200 /* Internal kernel timer frequency */ -+#else - #define HZ 1000 /* Internal kernel timer frequency */ -+#endif - - #endif /* __ASM_MACH_GENERIC_PARAM_H */ ---- linux-2.6.8.1/include/asm-mips/page.h 2004-08-14 12:55:10.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/include/asm-mips/page.h 2006-06-26 09:07:15.000000000 +0200 -@@ -13,7 +13,13 @@ - - #ifdef __KERNEL__ - -+#if defined(CONFIG_BCM_ENDPOINT_MODULE) -+#include <asm/mach-generic/spaces.h> -+#else - #include <spaces.h> -+#endif -+ -+#endif - - /* - * PAGE_SHIFT determines the page size -@@ -33,6 +39,7 @@ - #define PAGE_SIZE (1UL << PAGE_SHIFT) - #define PAGE_MASK (~(PAGE_SIZE-1)) - -+#ifdef __KERNEL__ - #ifndef __ASSEMBLY__ - - extern void clear_page(void * page); ---- linux-2.6.8.1/include/asm-mips/param.h 2004-08-14 12:54:51.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/include/asm-mips/param.h 2006-06-26 09:07:15.000000000 +0200 -@@ -12,7 +12,11 @@ - #ifdef __KERNEL__ - - # include <param.h> /* Internal kernel timer frequency */ -+#if defined(CONFIG_BCM_ENDPOINT_MODULE) -+# define USER_HZ HZ /* .. some user interfaces are in "ticks" */ -+#else - # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ -+#endif - # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ - #endif - ---- linux-2.6.8.1/include/asm-mips/timex.h 2004-08-14 12:56:15.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/include/asm-mips/timex.h 2006-06-26 09:07:15.000000000 +0200 -@@ -31,7 +31,11 @@ - * no reason to make this a separate architecture. - */ - -+#if defined(CONFIG_BCM_ENDPOINT_MODULE) -+#include <asm/mach-generic/timex.h> -+#else - #include <timex.h> -+#endif - - /* - * Standard way to access the cycle counter. -diff -urN linux-2.6.8.1/bcmdrivers/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/Makefile ---- linux-2.6.8.1/bcmdrivers/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/Makefile 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,17 @@ -+# File: bcmdrivers/Makefile -+# -+# Makefile for the Linux kernel modules. -+# -+-include $(KERNEL_DIR)/.config -+ -+obj-y += opensource/ -+ -+# If rootfs is nfs, we have to build Ethernet -+# driver as built-n -+ifeq ($(CONFIG_ROOTFS_NFS),y) -+obj-y += broadcom/ -+endif -+ -+obj-y += broadcom/ -+obj-m += broadcom/ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/Makefile ---- linux-2.6.8.1/bcmdrivers/broadcom/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/Makefile 2006-06-26 10:29:23.000000000 +0200 -@@ -0,0 +1,3 @@ -+ -+symlinks: -+ #cp ../../../tools/built-in.o built-in.o -Files linux-2.6.8.1/bcmdrivers/broadcom/built-in.o and linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/built-in.o differ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_defs.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_defs.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_defs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_defs.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,133 @@ -+/* TARGET=bcm6348-dmt-T1-dmtbis-adsl2plus-L2-SRA-firmware-Qproc-HW-RTL-pipeline-IncOneBit-Readsl2-doubleUS */ -+ -+#define SOURCE_FILE_ -+#define BCM6348_SRC -+#define G994_T1P413_1024_FFT -+#define ENABLE_DIG_USPWR_CUTBACK -+#define ADSLCORE_ONLY -+#define TEQ_DF -+#define LOOP_TIMING_PLL -+#define RCV_PHASE_TWEAK_ONLY -+#define ADSL_MAX_POSSIBLE_RCV_RATE -+#define HARDWARE_CHANNEL -+#define ADSL_HARDWARE_AGC -+#define HW_CHANNEL_ADC -+#define HW_CHANNEL_DAC -+#define HW_PGA -+#define DIGITALEC_SINGLE_TAP_UPDATE -+#define ANALOGEC_SINGLE_TAP_UPDATE -+#define HWLOG -+#define G992_TRELLIS_CODE_CLAMPING -+#define G992DECODERTRELLISBOUNDARY -+#define MEMORYLIMIT64K -+#define bcm47xx -+#define DSL_BIG_ENDIAN -+#define MIPS_SRC -+#define VP_INLINE -Winline -+#define USE_ASM_API -+#define RTL_SRC -+#define RSENC_INLINE -+#define BITENC_INLINE -+#define USE_SLOW_DATA -+#define USE_FAST_TEXT -+#define PROFILE_INLINE -+#define CHIP_SRC -+#define G992_RESYNC_PILOT_PHASE_IN_SHOWTIME -+#define G992_APPLY_SSVI -+#define SHARE_TEQ_VARS -+#define ANNEX_M -+#define DOUBLE_UP_STREAM -+#define G994P1_SUPPORT_A43C -+#define USE_ASM_API -+#define MIPS_ASM -+#define MEMORYLIMIT64K -+#define ADSL_FIRMWARE -+#define G992DATA_XMT_COMPACT_WORD -+#define ADSL_MAX_POSSIBLE_RCV_RATE -+#define DSP_FRONTEND_ONLY -+#define G992P3_ONE_BIT_CONSTELLATION -+#define ADSL_MODEM -+#define ATM -+#define ADSL_ATUR -+#define ADSL_SOFTWARE_TIME_ERROR_CALCULATION -+#define DSL_REPORT_ALL_COUNTERS -+#define ADSL_MONITOR_LCD -+#define G994P1 -+#define G994P1_ATUR -+#define G992 -+#define G992_ATUR -+#define ADSL_FRAMER -+#define G997_1 -+#define ATM_I432 -+#define TEQ_DF -+#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define G994P1_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define G992_TRELLISCODE -+#define ADSL_HARDWARE_ECHO_CANCELLOR -+#define G992P1 -+#define G992P1_ATUR -+#define G992P1_ANNEX_A -+#define ADSL_HARDWARE_TIME_ERROR_TRACKING -+#define G992P1_NEWFRAME -+#define G992P1_NEWFRAME_ATUR -+#define G992P1_ANNEX_A_USED_FOR_G992P2 -+#define T1P413 -+#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define G992_CALC_DEBUG_SNR_BEFORE_TEQ -+#define G992P3 -+#define RATE_SELECT_E14 -+#define G992P3_ATUR -+#define G992P3AMENDMENT -+#define GLOBESPAN_DM -+#define G992P3_COMB_MSG_THREE_COPIES -+#define G992P3_POWER_MANAGEMENT -+#define G992P3_SRA -+#define G992P5 -+#define G992P5_ATUR -+#define ADSL_PIPELINE_CODE -+#define ADSL_HARDWARE_TIME_ERROR_TRACKING -+#define G994P1RCV_QPROC -+#define G994P1XMT_QPROC -+#define G992RCV_QPROC -+#define G992XMT_QPROC -+#define G992RCV_RS -+#define VP_SIMULATOR -+#define T1P413RCV_QPROC -+#define T1P413XMT_QPROC -+#define G992ENC_HW_DATAMODE -+#define G992DATA_XMT_HW_RS -+#define G992DATA_XMT_COMPACT_WORD -+#define G992RCV_QPROC_FAST -+#define G992_BIT_SWAP -+#define ADSL_IDENTIFY_VENDOR_FIRMWARE -+#define ADSL_ATUR_FORCE_BIGGER_UPSTREAM_MARGIN -+#define G992_MORE_FRAME_MODE -+#define XMT_RACT2_FOR_ADI_COMPATIBILITY -+#define XMT_FFT_SIZE_2X -+#define SYNCH_SYMBOL_DETECTION -+#define ANSI_CACT12_PING_PONG -+#define ADSL_SPECIAL_FIX_FOR_FRENCH_TELECOM -+#define G994P1_CHECK_SECURITY -+#define G994P1_NON_STD_INFO -+#define I432_HEADER_COMPRESSION -+#define TDC_IOP_FIX_ERICSSON_TI_4000C_350 -+#define TDC_IOP_FIX_SEIMENS_TI -+#define FT_ADI_US_RATE_FIX -+#define ANSI_CACT12_PING_PONG -+#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define G994P1_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define READSL2 -+#define G992_APPLY_SSVI -+#define READSL2_FILTERS -+ -+ -+#define ADSL_PHY_XFACE_OFFSET 0x21F90 -+ -+ -+#define ADSL_PHY_SDRAM_BIAS 0x1A0000 -+ -+ -+#define ADSL_PHY_SDRAM_LINK_OFFSET 0x1A0000 -+ -+ -+#define ADSL_PHY_SDRAM_PAGE_SIZE 0x200000 -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_lmem.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_lmem.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_lmem.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_lmem.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,6 @@ -+/* -+** Don't change! -+** This file has been generated automatically by bin2c program -+*/ -+ -+extern const unsigned char adsl_lmem[51036]; -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_sdram.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_sdram.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_sdram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/adslcore6348/adsl_sdram.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,6 @@ -+/* -+** Don't change! -+** This file has been generated automatically by bin2c program -+*/ -+ -+extern const unsigned char adsl_sdram[364348]; -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslCoreDefs.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslCoreDefs.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslCoreDefs.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,245 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslCore.c -- Bcm ADSL core driver -+ * -+ * Description: -+ * This file contains BCM ADSL core driver -+ * -+ * -+ * Copyright (c) 2000-2001 Broadcom Corporation -+ * All Rights Reserved -+ * No portions of this material may be reproduced in any form without the -+ * written permission of: -+ * Broadcom Corporation -+ * 16215 Alton Parkway -+ * Irvine, California 92619 -+ * All information contained in this document is Broadcom Corporation -+ * company private, proprietary, and trade secret. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.4 $ -+ * -+ * $Id: AdslCoreDefs.h,v 1.4 2004/07/20 23:45:48 ilyas Exp $ -+ * -+ * $Log: AdslCoreDefs.h,v $ -+ * Revision 1.4 2004/07/20 23:45:48 ilyas -+ * Added driver version info, SoftDslPrintf support. Fixed G.997 related issues -+ * -+ * Revision 1.3 2004/06/10 00:20:33 ilyas -+ * Added L2/L3 and SRA -+ * -+ * Revision 1.2 2004/04/12 23:24:38 ilyas -+ * Added default G992P5 PHY definition -+ * -+ * Revision 1.1 2004/04/08 23:59:15 ilyas -+ * Initial CVS checkin -+ * -+ ****************************************************************************/ -+ -+#ifndef _ADSL_CORE_DEFS_H -+#define _ADSL_CORE_DEFS_H -+ -+#if defined(__KERNEL__) -+#include <linux/config.h> -+#endif -+ -+#if defined(CONFIG_BCM96348) || defined(BOARD_bcm96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(BOARD_bcm96338) || defined(_BCM96338_) -+#ifdef ADSL_ANNEXC -+#include "../adslcore6348C/adsl_defs.h" -+#elif defined(ADSL_ANNEXB) -+#include "../adslcore6348B/adsl_defs.h" -+#elif defined(ADSL_SADSL) -+#include "../adslcore6348SA/adsl_defs.h" -+#else -+#include "../adslcore6348/adsl_defs.h" -+#endif -+#endif -+ -+#if defined(__KERNEL__) || defined(TARG_OS_RTEMS) || defined(_CFE_) -+#if defined(CONFIG_BCM96345) || defined(BOARD_bcm96345) || defined(_BCM96345_) -+#ifdef ADSL_ANNEXC -+#include "../adslcore6345C/adsl_defs.h" -+#elif defined(ADSL_ANNEXB) -+#include "../adslcore6345B/adsl_defs.h" -+#elif defined(ADSL_SADSL) -+#include "../adslcore6345SA/adsl_defs.h" -+#else -+#include "../adslcore6345/adsl_defs.h" -+#endif -+#endif /* of CONFIG_BCM96345 */ -+#else -+#if defined(CONFIG_BCM96345) -+#ifdef ADSL_ANNEXC -+#include "../adslcoreC/adsl_defs.h" -+#elif defined(ADSL_ANNEXB) -+#include "../adslcoreB/adsl_defs.h" -+#elif defined(ADSL_SADSL) -+#include "../adslcoreSA/adsl_defs.h" -+#else -+#include "../adslcore/adsl_defs.h" -+#endif -+#endif /* of CONFIG_BCM96345 */ -+#endif /* __KERNEL__ */ -+ -+#ifdef _WIN32_WCE -+#define ASSERT(a) -+#endif -+ -+#include "AdslXfaceData.h" -+ -+/* adjust some definitions for the HOST */ -+ -+#undef GLOBAL_PTR_BIAS -+#undef ADSLCORE_ONLY -+#undef USE_SLOW_DATA -+#undef USE_FAST_TEXT -+#undef VP_SIMULATOR -+#undef bcm47xx -+#undef ADSL_FRAMER -+#undef ATM -+#undef ATM_I432 -+#undef DSL_OS -+ -+#define HOST_ONLY -+#define G997_1_FRAMER -+#define ADSL_MIB -+ -+#ifndef FLATTEN_ADDR_ADJUST -+#define FLATTEN_ADDR_ADJUST 0xFFF00000 -+#endif -+ -+/* definitions for combo PHY (AnnexA(ADSL2) and AnnexB) */ -+ -+#if !(defined(ADSL_SINGLE_PHY) || defined(G992_ANNEXC)) -+ -+#undef G992P1_ANNEX_A -+#define G992P1_ANNEX_A -+#undef G992P3 -+#define G992P3 -+#undef G992P5 -+#define G992P5 -+#define G992P1_ANNEX_A -+#undef READSL2 -+#define READSL2 -+#undef G992P1_ANNEX_A_USED_FOR_G992P2 -+#define G992P1_ANNEX_A_USED_FOR_G992P2 -+#undef T1P413 -+#define T1P413 -+ -+#undef G992P1_ANNEX_B -+#define G992P1_ANNEX_B -+ -+#endif -+ -+/* ADSL PHY definition */ -+ -+typedef struct { -+ unsigned long sdramPageAddr; -+ unsigned long sdramImageAddr; -+ unsigned long sdramImageSize; -+ unsigned long sdramPhyImageAddr; -+ unsigned short fwType; -+ unsigned short chipType; -+ unsigned short mjVerNum; -+ unsigned short mnVerNum; -+ char *pVerStr; -+ unsigned long features[4]; -+} adslPhyInfo; -+extern adslPhyInfo adslCorePhyDesc; -+ -+/* chip list */ -+ -+#define kAdslPhyChipMjMask 0xFF00 -+#define kAdslPhyChipMnMask 0x00FF -+#define kAdslPhyChipUnknown 0 -+#define kAdslPhyChip6345 0x100 -+#define kAdslPhyChip6348 0x200 -+#define kAdslPhyChipRev0 0 -+#define kAdslPhyChipRev1 1 -+#define kAdslPhyChipRev2 2 -+#define kAdslPhyChipRev3 3 -+#define kAdslPhyChipRev4 4 -+#define kAdslPhyChipRev5 5 -+ -+#define ADSL_PHY_SUPPORT(f) AdslFeatureSupported(adslCorePhyDesc.features,f) -+#define ADSL_PHY_SET_SUPPORT(p,f) AdslFeatureSet((p)->features,f) -+ -+/* ADSL Driver to/from PHY address and data conversion macros */ -+ -+#ifdef ADSLDRV_LITTLE_ENDIAN -+#define ADSL_ENDIAN_CONV_LONG(x) ( ((x) << 24) | (((x) << 8) & 0x00FF0000) | (((x) >> 8) & 0x0000FF00) | ((unsigned long)(x) >> 24) ) -+#define ADSL_ENDIAN_CONV_SHORT(x) ( ((x) << 8) | ((unsigned short)(x) >> 8) ) -+#define ADSL_ENDIAN_CONV_2SHORTS(x) ( ((x) << 16) | ((unsigned long)(x) >> 16) ) -+#else -+#define ADSL_ENDIAN_CONV_LONG(x) x -+#define ADSL_ENDIAN_CONV_SHORT(x) x -+#define ADSL_ENDIAN_CONV_2SHORTS(x) x -+#endif -+ -+#ifndef ADSL_PHY_XFACE_OFFSET -+#define ADSL_PHY_XFACE_OFFSET 0x00017F90 -+#endif -+#define ADSL_LMEM_XFACE_DATA (0xFFF00000 | ADSL_PHY_XFACE_OFFSET) -+ -+#ifndef ADSL_PHY_SDRAM_START -+#define ADSL_PHY_SDRAM_START 0x10000000 -+#endif -+#ifndef ADSL_PHY_SDRAM_BIAS -+#define ADSL_PHY_SDRAM_BIAS 0x00040000 -+#endif -+#define ADSL_PHY_SDRAM_START_4 (ADSL_PHY_SDRAM_START + ADSL_PHY_SDRAM_BIAS) -+ -+#ifndef ADSL_PHY_SDRAM_PAGE_SIZE -+#define ADSL_PHY_SDRAM_PAGE_SIZE 0x00080000 -+#endif -+ -+#ifdef ADSL_PHY_SDRAM_BIAS -+#define ADSL_SDRAM_IMAGE_SIZE (ADSL_PHY_SDRAM_PAGE_SIZE - ADSL_PHY_SDRAM_BIAS) -+#else -+#define ADSL_SDRAM_IMAGE_SIZE (256*1024) -+#endif -+ -+ -+#ifndef ADSL_PHY_SDRAM_LINK_OFFSET -+#define ADSL_PHY_SDRAM_LINK_OFFSET 0x00040000 -+#endif -+ -+#define ADSL_SDRAM_TOTAL_SIZE 0x00800000 -+#define ADSL_SDRAM_HOST_MIPS_DEFAULT (0xA0000000 | (ADSL_SDRAM_TOTAL_SIZE - ADSL_PHY_SDRAM_PAGE_SIZE + ADSL_PHY_SDRAM_BIAS)) -+ -+#define ADSLXF ((AdslXfaceData *) ADSL_LMEM_XFACE_DATA) -+ -+#define ADSL_MIPS_LMEM_ADDR(a) (((ulong)(a) & 0x19000000) == 0x19000000) -+#define SDRAM_ADDR_TO_HOST(a) ((void *) ((ulong)(a) - adslCorePhyDesc.sdramPhyImageAddr + \ -+ (ADSLXF->sdramBaseAddr ? (unsigned long) ADSLXF->sdramBaseAddr : ADSL_SDRAM_HOST_MIPS_DEFAULT))) -+#define SDRAM_ADDR_TO_ADSL(a) ((void *) (adslCorePhyDesc.sdramPhyImageAddr + ((ulong)(a) - \ -+ (ADSLXF->sdramBaseAddr ? (unsigned long) ADSLXF->sdramBaseAddr : ADSL_SDRAM_HOST_MIPS_DEFAULT)))) -+ -+#define ADSL_ADDR_TO_HOST(addr) ADSL_MIPS_LMEM_ADDR(addr) ? (void *) ((ulong) (addr) | FLATTEN_ADDR_ADJUST) : SDRAM_ADDR_TO_HOST(addr) -+ -+ -+#ifndef DEBUG -+#define DEBUG -+#endif -+ -+#ifndef __SoftDslPrintf -+void __SoftDslPrintf(void *gDslVars, char *fmt, int argNum, ...); -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.gh ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.gh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.gh 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,94 @@ -+/**************************************************************************** -+ * -+ * AdslMib.gh -+ * -+ * Description: -+ * This is a header file which defines the type for AdslMib -+ * global variable structure. -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.8 $ -+ * -+ * $Id: AdslMib.gh,v 1.8 2004/06/04 18:56:01 ilyas Exp $ -+ * -+ * $Log: AdslMib.gh,v $ -+ * Revision 1.8 2004/06/04 18:56:01 ilyas -+ * Added counter for ADSL2 framing and performance -+ * -+ * Revision 1.7 2003/10/17 21:02:12 ilyas -+ * Added more data for ADSL2 -+ * -+ * Revision 1.6 2003/10/14 00:55:27 ilyas -+ * Added UAS, LOSS, SES error seconds counters. -+ * Support for 512 tones (AnnexI) -+ * -+ * Revision 1.5 2003/07/18 19:07:15 ilyas -+ * Merged with ADSL driver -+ * -+ * Revision 1.4 2002/11/13 21:32:49 ilyas -+ * Added adjustK support for Centillium non-standard framing mode -+ * -+ * Revision 1.3 2002/10/31 20:27:13 ilyas -+ * Merged with the latest changes for VxWorks/Linux driver -+ * -+ * Revision 1.2 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.1 2001/12/21 22:39:30 ilyas -+ * Added support for ADSL MIB data objects (RFC2662) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef AdslMibGlobals -+#define AdslMibGlobals -+ -+#include "AdslMib.h" -+ -+typedef struct -+ { -+ /* MIB data */ -+ -+ adslMibInfo adslMib; -+ -+ /* ADSL state data */ -+ -+ adslMibNotifyHandlerType notifyHandlerPtr; -+ ulong timeSec; -+ ulong timeMs; -+ Boolean currSecondErrored; -+ Boolean currSecondLOS; -+ Boolean currSecondSES; -+ Boolean currSecondFEC; -+ ulong rcvPower; -+ ulong rcvRateBps; -+ ulong xmtRateBps; -+ ulong linkStatus; -+ G992CodingParams rcvParams; -+ G992CodingParams xmtParams; -+ ulong shtCounters[kG992ShowtimeNumOfMonitorCounters]; -+ ulong scratchData; -+ long showtimeMarginThld; -+ -+ /* ADSL diag data */ -+ -+ short snr[kAdslMibMaxToneNum]; -+ short showtimeMargin[kAdslMibMaxToneNum]; -+ uchar bitAlloc[kAdslMibMaxToneNum]; -+ short gain[kAdslMibMaxToneNum]; -+ ComplexShort chanCharLin[kAdslMibMaxToneNum]; -+ short chanCharLog[kAdslMibMaxToneNum]; -+ short quietLineNoise[kAdslMibMaxToneNum]; -+ -+ ushort nTones; -+ uchar nMsgCnt; -+ ulong g992MsgType; -+ uchar rsOption[1+4]; -+ Boolean rsOptionValid; -+ } -+ adslMibVarsStruct; -+ -+#endif /* AdslMibGlobals */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMib.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,114 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslMib.h -+ * -+ * Description: -+ * This file contains the exported functions and definitions for AdslMib -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.9 $ -+ * -+ * $Id: AdslMib.h,v 1.9 2004/04/12 23:34:52 ilyas Exp $ -+ * -+ * $Log: AdslMib.h,v $ -+ * Revision 1.9 2004/04/12 23:34:52 ilyas -+ * Merged the latest ADSL driver chnages for ADSL2+ -+ * -+ * Revision 1.8 2004/03/03 20:14:05 ilyas -+ * Merged changes for ADSL2+ from ADSL driver -+ * -+ * Revision 1.7 2003/10/14 00:55:27 ilyas -+ * Added UAS, LOSS, SES error seconds counters. -+ * Support for 512 tones (AnnexI) -+ * -+ * Revision 1.6 2003/07/18 19:07:15 ilyas -+ * Merged with ADSL driver -+ * -+ * Revision 1.5 2002/10/31 20:27:13 ilyas -+ * Merged with the latest changes for VxWorks/Linux driver -+ * -+ * Revision 1.4 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.3 2002/01/13 22:25:40 ilyas -+ * Added functions to get channels rate -+ * -+ * Revision 1.2 2002/01/03 06:03:36 ilyas -+ * Handle byte moves tha are not multiple of 2 -+ * -+ * Revision 1.1 2001/12/21 22:39:30 ilyas -+ * Added support for ADSL MIB data objects (RFC2662) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef AdslMibHeader -+#define AdslMibHeader -+ -+#if defined(_CFE_) -+#include "lib_types.h" -+#include "lib_string.h" -+#endif -+ -+#include "AdslMibDef.h" -+ -+/* Interface functions */ -+ -+typedef int (SM_DECL *adslMibNotifyHandlerType) (void *gDslVars, ulong event); -+ -+extern Boolean AdslMibInit(void *gDslVars); -+extern void AdslMibTimer(void *gDslVars, long timeMs); -+extern void AdslMibStatusSnooper (void *gDslVars, dslStatusStruct *status); -+extern void AdslMibSetNotifyHandler(void *gDslVars, adslMibNotifyHandlerType notifyHandlerPtr); -+extern int AdslMibGetModulationType(void *gDslVars); -+extern Boolean AdslMibIsAdsl2Mod(void *gDslVars); -+extern int AdslMibGetActiveChannel(void *gDslVars); -+extern int AdslMibGetGetChannelRate(void *gDslVars, int dir, int channel); -+extern Boolean AdslMibIsLinkActive(void *gDslVars); -+extern int AdslMibPowerState(void *gDslVars); -+extern int AdslMibTrainingState (void *gDslVars); -+extern void AdslMibClearData(void *gDslVars); -+extern void AdslMibClearBertResults(void *gDslVars); -+extern void AdslMibBertStartEx(void *gDslVars, ulong bertSec); -+extern void AdslMibBertStopEx(void *gDslVars); -+extern ulong AdslMibBertContinueEx(void *gDslVars, ulong totalBits, ulong errBits); -+extern void AdslMibSetLPR(void *gDslVars); -+extern void AdslMibSetShowtimeMargin(void *gDslVars, long showtimeMargin); -+extern void AdslMibResetConectionStatCounters(void *gDslVars); -+ -+extern void AdslMibByteMove (int size, void* srcPtr, void* dstPtr); -+extern void AdslMibByteClear(int size, void* dstPtr); -+extern int AdslMibStrCopy(char *srcPtr, char *dstPtr); -+ -+/* AdslMibGetData dataId codes */ -+ -+#define kAdslMibDataAll 0 -+ -+extern void *AdslMibGetData (void *gDslVars, int dataId, void *pAdslMibData); -+ -+extern int AdslMibGetObjectValue ( -+ void *gDslVars, -+ uchar *objId, -+ int objIdLen, -+ uchar *dataBuf, -+ ulong *dataBufLen); -+ -+#endif /* AdslMibHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMibOid.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMibOid.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMibOid.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslMibOid.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,177 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslMibOid.h -+ * -+ * Description: -+ * SNMP object identifiers for ADSL MIB and other related MIBs -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.5 $ -+ * -+ * $Id: AdslMibOid.h,v 1.5 2004/06/04 18:56:01 ilyas Exp $ -+ * -+ * $Log: AdslMibOid.h,v $ -+ * Revision 1.5 2004/06/04 18:56:01 ilyas -+ * Added counter for ADSL2 framing and performance -+ * -+ * Revision 1.4 2003/10/17 21:02:12 ilyas -+ * Added more data for ADSL2 -+ * -+ * Revision 1.3 2003/10/14 00:55:27 ilyas -+ * Added UAS, LOSS, SES error seconds counters. -+ * Support for 512 tones (AnnexI) -+ * -+ * Revision 1.2 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.1 2001/12/21 22:39:30 ilyas -+ * Added support for ADSL MIB data objects (RFC2662) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef AdslMibOidHeader -+#define AdslMibOidHeader -+ -+#define kOidAdsl 94 -+#define kOidAdslInterleave 124 -+#define kOidAdslFast 125 -+#define kOidAtm 37 -+ -+#define kOidAdslLine 1 -+#define kOidAdslMibObjects 1 -+ -+#define kOidAdslLineTable 1 -+#define kOidAdslLineEntry 1 -+#define kOidAdslLineCoding 1 -+#define kOidAdslLineType 2 -+#define kOidAdslLineSpecific 3 -+#define kOidAdslLineConfProfile 4 -+#define kOidAdslLineAlarmConfProfile 5 -+ -+#define kOidAdslAtucPhysTable 2 -+#define kOidAdslAturPhysTable 3 -+#define kOidAdslPhysEntry 1 -+#define kOidAdslPhysInvSerialNumber 1 -+#define kOidAdslPhysInvVendorID 2 -+#define kOidAdslPhysInvVersionNumber 3 -+#define kOidAdslPhysCurrSnrMgn 4 -+#define kOidAdslPhysCurrAtn 5 -+#define kOidAdslPhysCurrStatus 6 -+#define kOidAdslPhysCurrOutputPwr 7 -+#define kOidAdslPhysCurrAttainableRate 8 -+ -+#define kOidAdslAtucChanTable 4 -+#define kOidAdslAturChanTable 5 -+#define kOidAdslChanEntry 1 -+#define kOidAdslChanInterleaveDelay 1 -+#define kOidAdslChanCurrTxRate 2 -+#define kOidAdslChanPrevTxRate 3 -+#define kOidAdslChanCrcBlockLength 4 -+ -+#define kOidAdslAtucPerfDataTable 6 -+#define kOidAdslAturPerfDataTable 7 -+#define kOidAdslPerfDataEntry 1 -+#define kOidAdslPerfLofs 1 -+#define kOidAdslPerfLoss 2 -+#define kOidAdslPerfLprs 3 -+#define kOidAdslPerfESs 4 -+#define kOidAdslPerfValidIntervals 5 -+#define kOidAdslPerfInvalidIntervals 6 -+#define kOidAdslPerfCurr15MinTimeElapsed 7 -+#define kOidAdslPerfCurr15MinLofs 8 -+#define kOidAdslPerfCurr15MinLoss 9 -+#define kOidAdslPerfCurr15MinLprs 10 -+#define kOidAdslPerfCurr15MinESs 11 -+#define kOidAdslPerfCurr1DayTimeElapsed 12 -+#define kOidAdslPerfCurr1DayLofs 13 -+#define kOidAdslPerfCurr1DayLoss 14 -+#define kOidAdslPerfCurr1DayLprs 15 -+#define kOidAdslPerfCurr1DayESs 16 -+#define kOidAdslPerfPrev1DayMoniSecs 17 -+#define kOidAdslPerfPrev1DayLofs 18 -+#define kOidAdslPerfPrev1DayLoss 19 -+#define kOidAdslPerfPrev1DayLprs 20 -+#define kOidAdslPerfPrev1DayESs 21 -+ -+#define kOidAdslAtucPerfIntervalTable 8 -+#define kOidAdslAturPerfIntervalTable 9 -+#define kOidAdslPerfIntervalEntry 1 -+#define kOidAdslIntervalNumber 1 -+#define kOidAdslIntervalLofs 2 -+#define kOidAdslIntervalLoss 3 -+#define kOidAdslIntervalLprs 4 -+#define kOidAdslIntervalESs 5 -+#define kOidAdslIntervalValidData 6 -+ -+#define kOidAdslAtucChanPerfTable 10 -+#define kOidAdslAturChanPerfTable 11 -+#define kOidAdslChanPerfEntry 1 -+#define kOidAdslChanReceivedBlks 1 -+#define kOidAdslChanTransmittedBlks 2 -+#define kOidAdslChanCorrectedBlks 3 -+#define kOidAdslChanUncorrectBlks 4 -+#define kOidAdslChanPerfValidIntervals 5 -+#define kOidAdslChanPerfInvalidIntervals 6 -+#define kOidAdslChanPerfCurr15MinTimeElapsed 7 -+#define kOidAdslChanPerfCurr15MinReceivedBlks 8 -+#define kOidAdslChanPerfCurr15MinTransmittedBlks 9 -+#define kOidAdslChanPerfCurr15MinCorrectedBlks 10 -+#define kOidAdslChanPerfCurr15MinUncorrectBlks 11 -+#define kOidAdslChanPerfCurr1DayTimeElapsed 12 -+#define kOidAdslChanPerfCurr1DayReceivedBlks 13 -+#define kOidAdslChanPerfCurr1DayTransmittedBlks 14 -+#define kOidAdslChanPerfCurr1DayCorrectedBlks 15 -+#define kOidAdslChanPerfCurr1DayUncorrectBlks 16 -+#define kOidAdslChanPerfPrev1DayMoniSecs 17 -+#define kOidAdslChanPerfPrev1DayReceivedBlks 18 -+#define kOidAdslChanPerfPrev1DayTransmittedBlks 19 -+#define kOidAdslChanPerfPrev1DayCorrectedBlks 20 -+#define kOidAdslChanPerfPrev1DayUncorrectBlks 21 -+ -+#define kOidAdslAtucChanIntervalTable 12 -+#define kOidAdslAturChanIntervalTable 13 -+#define kOidAdslChanIntervalEntry 1 -+#define kOidAdslChanIntervalNumber 1 -+#define kOidAdslChanIntervalReceivedBlks 2 -+#define kOidAdslChanIntervalTransmittedBlks 3 -+#define kOidAdslChanIntervalCorrectedBlks 4 -+#define kOidAdslChanIntervalUncorrectBlks 5 -+#define kOidAdslChanIntervalValidData 6 -+ -+/* AdslExtra OIDs for kOidAdslPrivate, kOidAdslPrivExtraInfo (defined in AdslMibDef.h) */ -+ -+#define kOidAdslExtraConnectionInfo 1 -+#define kOidAdslExtraConnectionStat 2 -+#define kOidAdslExtraFramingMode 3 -+#define kOidAdslExtraTrainingState 4 -+#define kOidAdslExtraNonStdFramingAdjustK 5 -+#define kOidAdslExtraAtmStat 6 -+#define kOidAdslExtraDiagModeData 7 -+#define kOidAdslExtraAdsl2Info 8 -+#define kOidAdslExtraTxPerfCounterInfo 9 -+ -+#define kOidAtmMibObjects 1 -+#define kOidAtmTcTable 4 -+#define kOidAtmTcEntry 1 -+#define kOidAtmOcdEvents 1 -+#define kOidAtmAlarmState 2 -+ -+#endif /* AdslMibOidHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslXfaceData.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslXfaceData.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslXfaceData.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/AdslXfaceData.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,129 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslXfaceData.h -- ADSL Core interface data structure -+ * -+ * Description: -+ * To be included both in SoftDsl and BcmAdslCore driver -+ * -+ * -+ * Copyright (c) 2000-2001 Broadcom Corporation -+ * All Rights Reserved -+ * No portions of this material may be reproduced in any form without the -+ * written permission of: -+ * Broadcom Corporation -+ * 16215 Alton Parkway -+ * Irvine, California 92619 -+ * All information contained in this document is Broadcom Corporation -+ * company private, proprietary, and trade secret. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.9 $ -+ * -+ * $Id: AdslXfaceData.h,v 1.9 2004/02/03 02:57:22 ilyas Exp $ -+ * -+ * $Log: AdslXfaceData.h,v $ -+ * Revision 1.9 2004/02/03 02:57:22 ilyas -+ * Added PHY feature settings -+ * -+ * Revision 1.8 2003/07/18 04:50:21 ilyas -+ * Added shared buffer for clEoc messages to avoid copying thru command buffer -+ * -+ * Revision 1.7 2003/02/25 00:46:32 ilyas -+ * Added T1.413 EOC vendor ID -+ * -+ * Revision 1.6 2003/02/21 23:29:13 ilyas -+ * Added OEM vendor ID parameter for T1.413 mode -+ * -+ * Revision 1.5 2002/09/13 21:17:12 ilyas -+ * Added pointers to version and build string to OEM interface structure -+ * -+ * Revision 1.4 2002/09/07 04:16:29 ilyas -+ * Fixed HOST to ADSL MIPS SDRAM address translation for relocatable images -+ * -+ * Revision 1.3 2002/09/07 01:43:59 ilyas -+ * Added support for OEM parameters -+ * -+ * Revision 1.2 2002/01/22 19:03:10 khp -+ * -put sdramBaseAddr at end of Xface struct -+ * -+ * Revision 1.1 2002/01/15 06:25:08 ilyas -+ * Initial implementation of ADSL core firmware -+ * -+ ****************************************************************************/ -+ -+#ifndef AdslXfaceDataHeader -+#define AdslXfaceDataHeader -+ -+#include "CircBuf.h" -+ -+typedef struct _AdslXfaceData { -+ stretchBufferStruct sbSta; -+ stretchBufferStruct sbCmd; -+ unsigned long gfcTable[15]; -+ void *sdramBaseAddr; -+} AdslXfaceData; -+ -+/* Shared SDRAM configuration data */ -+ -+#define kAdslOemVendorIdMaxSize 8 -+#define kAdslOemVersionMaxSize 32 -+#define kAdslOemSerNumMaxSize 32 -+#define kAdslOemNonStdInfoMaxSize 64 -+ -+typedef struct _AdslOemSharedData { -+ unsigned long g994VendorIdLen; -+ unsigned long g994XmtNonStdInfoLen; -+ unsigned long g994RcvNonStdInfoLen; -+ unsigned long eocVendorIdLen; -+ unsigned long eocVersionLen; -+ unsigned long eocSerNumLen; -+ unsigned char g994VendorId[kAdslOemVendorIdMaxSize]; -+ unsigned char eocVendorId[kAdslOemVendorIdMaxSize]; -+ unsigned char eocVersion[kAdslOemVersionMaxSize]; -+ unsigned char eocSerNum[kAdslOemSerNumMaxSize]; -+ unsigned char g994XmtNonStdInfo[kAdslOemNonStdInfoMaxSize]; -+ unsigned char g994RcvNonStdInfo[kAdslOemNonStdInfoMaxSize]; -+ char *gDslVerionStringPtr; -+ char *gDslBuildDataStringPtr; -+ unsigned long t1413VendorIdLen; -+ unsigned char t1413VendorId[kAdslOemVendorIdMaxSize]; -+ unsigned long t1413EocVendorIdLen; -+ unsigned char t1413EocVendorId[kAdslOemVendorIdMaxSize]; -+ unsigned long clEocBufLen; -+ unsigned char *clEocBufPtr; -+} AdslOemSharedData; -+ -+/* feature list */ -+ -+#define kAdslPhyAnnexA 0 -+#define kAdslPhyAnnexB 1 -+#define kAdslPhyAnnexC 2 -+#define kAdslPhySADSL 3 -+#define kAdslPhyAdsl2 4 -+#define kAdslPhyAdslG992p3 4 -+#define kAdslPhyAdsl2p 5 -+#define kAdslPhyAdslG992p5 5 -+#define kAdslPhyAnnexI 6 -+#define kAdslPhyAdslReAdsl2 7 -+#define kAdslPhyG992p2Init 8 -+#define kAdslPhyT1P413 9 -+ -+#define AdslFeatureSupported(fa,f) ((fa)[(f) >> 5] & (1 << ((f) & 0x1F))) -+#define AdslFeatureSet(fa,f) (fa)[(f) >> 5] |= (1 << ((f) & 0x1F)) -+ -+#endif /* AdslXfaceDataHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlankList.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlankList.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlankList.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlankList.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,87 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * BlankList.h -+ * -+ * Description: -+ * Definition and implementation (via macros and inline functions) -+ * of blank list - list of unused items of any size (not less than -+ * sizeof(void *) -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ *****************************************************************************/ -+ -+#ifndef BlankListHeader -+#define BlankListHeader -+ -+#define BlankListPeek(head) ((void *) (head)) -+#define BlankListNext(p) (*(void **) (p)) -+ -+#define BlankListAdd(pHead,p) do { \ -+ BlankListNext(p) = BlankListNext(pHead); \ -+ BlankListNext(pHead) = (void *) (p); \ -+} while (0) -+ -+#define BlankListAddList(pHead,pFirst,pLast) do { \ -+ if (NULL != (pLast)) { \ -+ BlankListNext(pLast) = BlankListNext(pHead); \ -+ BlankListNext(pHead) = (void *) (pFirst); \ -+ } \ -+} while (0) -+ -+#define BlankListGet(pHead) \ -+ BlankListNext(pHead); \ -+ { \ -+ void **__p; \ -+ __p = (void **) BlankListNext(pHead); \ -+ if (NULL != __p) \ -+ BlankListNext(pHead) = *__p; \ -+ } -+ -+ -+#define BlankListForEach(pHead,f,ref) do { \ -+ void *p = BlankListNext(pHead); \ -+ \ -+ while (NULL != p) { \ -+ if ( (f)((p), ref) ) break; \ -+ p = BlankListNext(p); \ -+ } \ -+} while (0) -+ -+ -+#include "Que.h" -+ -+#define BlankListAddQue(pHead,pqHdr) do { \ -+ if (NULL != ((QueHeader *)(pqHdr))->tail) { \ -+ BlankListNext(((QueHeader *)(pqHdr))->tail) = BlankListNext(pHead); \ -+ BlankListNext(pHead) = ((QueHeader *)(pqHdr))->head; \ -+ } \ -+} while (0) -+ -+#include "DList.h" -+ -+#define BlankListAddDList(pHead,pDListHead) do { \ -+ if (!DListEmpty(pDListHead)) { \ -+ BlankListNext(DListLast(pDListHead)) = BlankListNext(pHead); \ -+ BlankListNext(pHead) = DListFirst(pDListHead); \ -+ } \ -+} while (0) -+ -+#endif /* BlankListHeader */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlockUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlockUtil.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlockUtil.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/BlockUtil.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,235 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/* BlockUtil.h -+ * -+ * Description: -+ * This file contains the interfaces for the fixed point block -+ * processing utilities. -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.23 $ -+ * -+ * $Id: BlockUtil.h,v 1.23 2004/04/13 00:31:10 ilyas Exp $ -+ * -+ * $Log: BlockUtil.h,v $ -+ * Revision 1.23 2004/04/13 00:31:10 ilyas -+ * Added standard header for shared ADSL driver files -+ * -+ * Revision 1.22 2003/07/11 01:49:01 gsyu -+ * Added BlockShortClearByLong to speed up performance -+ * -+ * Revision 1.21 2003/07/10 22:35:23 gsyu -+ * Speed up BlockByteXXX performance -+ * -+ * Revision 1.20 2003/07/10 22:15:51 gsyu -+ * Added BlockByteMoveByWord to speed up performance -+ * -+ * Revision 1.19 2002/03/12 00:03:03 yongbing -+ * Modify cplxScaleCplxSymbols to accept a shift value instead of an array of shifts -+ * -+ * Revision 1.18 2001/03/14 00:50:25 georgep -+ * All targets use FEQ_PASS_FFTSHIFT, remove code for case where its not defined -+ * -+ * Revision 1.17 2000/11/30 03:54:09 khp -+ * -BlockRealScaleCplxSymbols instead of BlockScaleComplexSymbols -+ * -+ * Revision 1.16 2000/11/29 20:42:12 liang -+ * Add function for ADSL xmt gains with fixed shift. -+ * -+ * Revision 1.15 2000/10/02 19:24:08 georgep -+ * Modify FEQ for new fft, fft outputs a shift for each block -+ * -+ * Revision 1.14 2000/09/09 00:23:48 liang -+ * Add corresponding functions for the ComplexLong FEQ coef. -+ * -+ * Revision 1.13 2000/05/17 01:36:52 yongbing -+ * Add Pentium MMX assembly codes for more block related functions -+ * -+ * Revision 1.12 2000/04/19 19:22:22 yongbing -+ * Add BlockShortScaleby2 function used in G994p1 -+ * -+ * Revision 1.11 2000/04/04 02:28:01 liang -+ * Merged with SoftDsl_0_2 from old tree. -+ * -+ * Revision 1.11 2000/03/14 23:29:01 yongbing -+ * Add Pentim MMX codes for BlockCplxSymbolUpdateCplxScale function -+ * -+ * Revision 1.10 2000/02/16 01:53:00 yongbing -+ * Add Pentium MMX module for FEQ -+ * -+ * Revision 1.9 1999/11/02 02:49:55 liang -+ * Add BlockComplexPower function. -+ * -+ * Revision 1.8 1999/08/05 19:42:34 liang -+ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. -+ * -+ * Revision 1.7 1999/06/16 00:54:39 liang -+ * BlockRealScaleComplexSymbols takes a scale shift buffer now. -+ * -+ * Revision 1.6 1999/05/22 02:18:29 liang -+ * Add one more parameter to BlockCplxSymbolUpdateCplxScale function. -+ * -+ * Revision 1.5 1999/05/14 22:49:39 liang -+ * Added two more functions. -+ * -+ * Revision 1.4 1999/03/26 03:29:57 liang -+ * Add function BlockComplexMultLongAcc. -+ * -+ * Revision 1.3 1999/02/22 22:40:59 liang -+ * BlockByteSum takes uchar inputs instead of schar. -+ * -+ * Revision 1.2 1999/02/10 01:56:44 liang -+ * Added BlockByteSum, BlockRealScaleComplexSymbols and BlockCplxScaleComplexSymbols. -+ * -+ * Revision 1.1 1998/10/28 01:35:38 liang -+ * *** empty log message *** -+ * -+ * Revision 1.12 1998/07/08 17:09:25 scott -+ * Removed unnecessary undefs -+ * -+ * Revision 1.11 1998/04/02 06:19:44 mwg -+ * Added two new utilities. -+ * -+ * Revision 1.10 1998/03/26 23:20:55 liang -+ * Added function BlockShortMultiply. -+ * -+ * Revision 1.9 1998/02/16 18:41:00 scott -+ * Added MMX autodetect support -+ * -+ * Revision 1.8 1997/12/13 06:11:35 mwg -+ * Added new functions: -+ * BlockLongSubtract() -+ * BlockLongAdd() -+ * BlockLong2ShortSubtract() -+ * BlockShort2LongMove() -+ * BlockShortInterpolate() -+ * BlockLongCorrelate() -+ * BlockMapShort2Short() -+ * -+ * Revision 1.7 1997/03/19 18:35:10 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.6 1997/02/11 00:08:18 mwg -+ * Added BlockByteMove function -+ * -+ * Revision 1.5 1997/02/04 08:40:08 mwg -+ * Changed interface forBlockReal2ComplexMacc() -+ * -+ * Revision 1.4 1997/01/23 02:04:28 mwg -+ * Added return value to BlockShortMove -+ * -+ * Revision 1.3 1996/12/19 22:34:55 mwg -+ * Added new function BlockFullPower(). -+ * -+ * Revision 1.2 1996/02/21 03:59:15 mwg -+ * Added new function BlockReal2ComplexMacc -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.5 1995/04/04 06:09:32 mwg -+ * Changed the SoftModem status reporting: now the status is a structure/union -+ * where different fields used for different status code. This will enable -+ * efficient status snooping for high level protocols on top of the softmodem. -+ * -+ */ -+ -+#ifndef BlockUtilPh -+#define BlockUtilPh -+ -+extern void BlockLongAdd (int, long*, long*, long*); -+extern void BlockLong2ShortSubtract (int, long*, long*, short*); -+extern void BlockShort2LongMove (int, short*, long*); -+extern void BlockShortMultiply (int, int, short*, short*, short*); -+extern void BlockByteMoveUnaligned (int size, uchar *srcPtr, uchar *dstPtr); -+extern void BlockShortOffset (int, short, short*, short*); -+extern long BlockShortInterpolateWithIncrement (int size, long scaleFactor, long increment, int shift, short* src1Ptr, short* src2Ptr, short* dstPtr); -+extern void BlockReal2ComplexMult (int, short*, ComplexShort*, ComplexShort*); -+extern void BlockComplexConjigateMult (int, ComplexShort*, ComplexShort*, ComplexShort*); -+ -+extern long BlockSum (int, short*); -+extern long BlockByteSum (int, uchar*); -+extern void BlockComplexSum (int, ComplexShort*, ComplexLong*); -+extern void BlockComplexPower (int, int, ComplexShort*, long*); -+extern long BlockFullPower (int, short*); -+extern long BlockLongCorrelate (int, long*, long*); -+ -+extern int BlockSymbol2Byte (int, int, ushort*, uchar*); -+extern int BlockByte2Symbol (int, int, uchar*, ushort*); -+ -+extern void BlockMapShort2Complex (int, ushort*, ComplexByte*, ComplexShort*); -+extern void BlockMapShort2Short (int size, ushort *srcPtr, short *mapPtr, short *dstPtr); -+extern void BlockMapByte2Byte (int size, uchar *srcPtr, uchar *mapPtr, uchar *dstPtr); -+extern void BlockMapByte2Short (int size, uchar *srcPtr, short *mapPtr, short *dstPtr); -+extern void BlockShortMult (int size, int shift, short* src1Ptr, short* src2Ptr, short* dstPtr); -+ -+extern int SM_DECL Idle(void); -+ -+extern void BlockGenerateAngles(int size, ComplexShort *anglePtr, ComplexShort *incPtr, ComplexShort *dstPtr); -+extern void BlockExtractRealPart(int size, ComplexShort *srcPtr, short *dstPtr); -+extern void BlockShortScaleByShift (int size, int shift, short* srcPtr, short* dstPtr); -+ -+#ifndef PENTIUM_REDEFS /* only if these have not been redefined to function pointers */ -+extern long BlockPower (int, short*); -+extern void BlockReal2ComplexMacc (int, int, short*, ComplexShort*, ComplexLong*); -+extern void BlockComplexMult (int, ComplexShort*, ComplexShort*, ComplexShort*); -+extern void BlockShortScale (int, short, int, short*, short*); -+extern int SM_DECL BlockShortMove (int, short*, short*); -+extern long BlockCorrelate (int, short*, short*); -+ -+extern void BlockRealScaleComplexSymbols(int, int, uchar*, short*, ComplexShort*, ComplexShort*); -+/* FIXME -- the following 3 functions can be removed */ -+extern void BlockCplxScaleComplexSymbols(int, int, int, ComplexShort*, ComplexShort*, ComplexShort*); -+extern void BlockCplxSymbolUpdateCplxScale(int, int, int, uchar*, ComplexShort*, -+ ComplexShort*, ComplexShort*, ComplexShort*); -+extern void BlockComplexShortFill (int, short, short, ComplexShort*); -+ -+ -+extern void BlockRealScaleCplxSymbols(int, int, int, short*, ComplexShort*, ComplexShort*); -+extern void BlockCplxLongConjigateMultCplxShort(int, ComplexLong*, ComplexShort*, ComplexLong*); -+ -+extern void BlockCplxLongScaleCplxSymbols(int, int, int, ComplexLong*, ComplexShort*, short*, ComplexShort*); -+extern void BlockCplxSymbolUpdateCplxLongScale(int, int, int, int, -+ ComplexShort*, short *, ComplexLong*, ComplexShort*); -+ -+extern void BlockComplexLongFill (int, long, long, ComplexLong*); -+ -+extern void BlockShortSubtract (int, short*, short*, short*); -+extern void BlockLongSubtract (int, long*, long*, long*); -+extern void BlockShortAdd (int, short*, short*, short*); -+extern void BlockByteMove (int, uchar*, uchar*); -+extern void BlockByteMoveByLong (int, uchar*, uchar*); -+extern void SM_DECL BlockByteFill (int, uchar, uchar*); -+extern void BlockByteFillByLong (int, uchar, uchar*); -+extern void BlockByteClear (int, uchar*); -+extern void BlockByteClearByLong (int, uchar*); -+extern void BlockShortFill (int, short, short*); -+extern void BlockShortClear (int, short*); -+extern void BlockShortClearByLong (int, short*); -+extern void BlockLongFill (int, long, long*); -+extern void BlockLongClear (int, long*); -+extern void BlockComplexShortClear (int, ComplexShort*); -+extern void BlockShortInvert (int, short*, short*); -+extern void BlockShortScaleDown (int, short*); -+extern void BlockLongMove (int, long*, long*); -+extern void BlockShortInterpolate (int, short, int, short*, short*, short*); -+extern void BlockComplexMultLongAcc (int, int, ComplexShort*, ComplexShort*, ComplexLong*); -+ -+#endif -+ -+#endif /* BlockUtilPh */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/CircBuf.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/CircBuf.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/CircBuf.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/CircBuf.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,217 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * CircBuf -- Generic Circular Buffer -+ * -+ * Description: -+ * Implementation of generic circular buffer algorithms -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.14 $ -+ * -+ * $Id: CircBuf.h,v 1.14 2004/06/24 03:10:37 ilyas Exp $ -+ * -+ * $Log: CircBuf.h,v $ -+ * Revision 1.14 2004/06/24 03:10:37 ilyas -+ * Added extra macro to be able to use un-cached variable (for status write) -+ * -+ * Revision 1.13 2004/02/09 23:47:02 ilyas -+ * Fixed last change -+ * -+ * Revision 1.12 2004/02/06 22:52:58 ilyas -+ * Improved stretch buffer write -+ * -+ * Revision 1.11 2002/12/30 23:27:55 ilyas -+ * Added macro for HostDma optimizations -+ * -+ * Revision 1.10 2002/10/26 02:15:02 ilyas -+ * Optimized and added new macros for HostDma -+ * -+ * Revision 1.9 2002/01/22 23:59:29 ilyas -+ * Added paraenthesis around macro argument -+ * -+ * Revision 1.8 2002/01/15 22:28:38 ilyas -+ * Extended macro to support readPtr from uncached address -+ * -+ * Revision 1.7 2001/09/21 19:47:05 ilyas -+ * Fixed compiler warnings for VxWorks build -+ * -+ * Revision 1.6 2001/06/07 18:47:56 ilyas -+ * Added more macros for circular buffer arithmetics -+ * -+ * Revision 1.5 2001/04/18 03:58:34 ilyas -+ * Added LOG file write granularity -+ * -+ * Revision 1.4 2001/01/19 04:34:12 ilyas -+ * Added more macros to circular buffer implementation -+ * -+ * Revision 1.3 2001/01/06 04:01:41 ilyas -+ * Changed the way we write status messages -+ * -+ * Revision 1.2 2001/01/04 05:52:21 ilyas -+ * Added implementation of stretchable circular buffer used in LOG and Status -+ * handlers -+ * -+ * Revision 1.1 2000/05/03 03:45:55 ilyas -+ * Original implementation -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef CircBufHeader_H_ -+#define CircBufHeader_H_ -+ -+ -+typedef struct { -+ char *pStart; -+ char *pEnd; -+ char *pRead; -+ char *pWrite; -+} circBufferStruct; -+ -+/* Initialize circular buffer */ -+ -+#define CircBufferInit(pCB,buf,size) do { \ -+ (pCB)->pStart = (char *) (buf); \ -+ (pCB)->pRead = (pCB)->pWrite = (pCB)->pStart; \ -+ (pCB)->pEnd = (pCB)->pStart + size; \ -+} while (0) -+ -+#define CircBufferGetSize(pCB) ((pCB)->pEnd - (pCB)->pStart) -+#define CircBufferGetStartPtr(pCB) ((void *) (pCB)->pStart) -+#define CircBufferGetEndPtr(pCB) ((void *) (pCB)->pEnd) -+ -+#define CircBufferReset(pCB) (pCB)->pRead = (pCB)->pWrite = (pCB)->pStart -+ -+ -+#define CircBufferGetReadPtr(pCB) ((void *) (pCB)->pRead) -+#define CircBufferGetWritePtr(pCB) ((void *) (pCB)->pWrite) -+ -+ -+#ifndef bcm47xx -+#define CircBufferDistance(pCB,p1,p2,d) ((char*)(p2) - (char*)(p1) - d >= 0 ? \ -+ (char*)(p2) - (char*)(p1) - d : \ -+ ((char*)(p2)- (char*)(p1) - d + ((pCB)->pEnd - (pCB)->pStart))) -+ -+#define CircBufferAddContig(pCB,p,n) ((char*)(p) + (n) == (pCB)->pEnd ? (pCB)->pStart : (char*)(p) + (n)) -+#else -+static __inline int CircBufferDistance(circBufferStruct *pCB, char *p1, char *p2, int d) -+{ -+ int tmp = p2 - p1 - d; -+ -+ return (tmp >= 0 ? tmp : tmp + (pCB->pEnd - pCB->pStart)); -+} -+ -+static __inline char * CircBufferAddContig(circBufferStruct *pCB, char *p, int n) -+{ -+ p += n; -+ return (p == pCB->pEnd ? pCB->pStart : p); -+} -+#endif -+ -+#define CircBufferAdd(pCB,p,n) ((char*)(p) + (n) >= (pCB)->pEnd ? \ -+ (pCB)->pStart + ((char*)(p) + (n) - (pCB)->pEnd) : \ -+ (char*)(p) + (n)) -+ -+#define CircBufferReadUpdate(pCB,n) (pCB)->pRead = CircBufferAdd(pCB,(pCB)->pRead,n) -+#define CircBufferWriteUpdate(pCB,n) (pCB)->pWrite= CircBufferAdd(pCB,(pCB)->pWrite,n) -+ -+#define CircBufferReadUpdateContig(pCB,n) (pCB)->pRead = CircBufferAddContig(pCB,(pCB)->pRead,n) -+#define CircBufferWriteUpdateContig(pCB,n) (pCB)->pWrite= CircBufferAddContig(pCB,(pCB)->pWrite,n) -+ -+#define CircBufferGetReadAvail(pCB) CircBufferDistance(pCB,(pCB)->pRead,(pCB)->pWrite,0) -+#define CircBufferIsReadEmpty(pCB) ((pCB)->pRead == (pCB)->pWrite) -+#define CircBufferGetWriteAvail(pCB) CircBufferDistance(pCB,(pCB)->pWrite,(pCB)->pRead,1) -+#define CircBufferGetWriteAvailN(pCB,n) CircBufferDistance(pCB,(pCB)->pWrite,(pCB)->pRead,n) -+ -+#define CircBufferGetReadContig(pCB) ((unsigned long)(pCB)->pWrite >= (unsigned long) (pCB)->pRead ? \ -+ (pCB)->pWrite - (pCB)->pRead : \ -+ (pCB)->pEnd - (pCB)->pRead) -+ -+#define CircBufferGetWriteContig(pCB) ((pCB)->pEnd - (pCB)->pWrite > CircBufferGetWriteAvail(pCB) ? \ -+ CircBufferGetWriteAvail(pCB) : \ -+ (pCB)->pEnd - (pCB)->pWrite) -+ -+/* -+** -+** structure and macros for "strectch" buffer -+** -+*/ -+ -+typedef struct { -+ char *pStart; -+ char *pEnd; -+ char *pExtraEnd; -+ char *pStretchEnd; -+ char *pRead; -+ char *pWrite; -+} stretchBufferStruct; -+ -+#define StretchBufferInit(pSB,buf,size,extra) do { \ -+ (pSB)->pStart = (char *) (buf); \ -+ (pSB)->pRead = (pSB)->pWrite = (pSB)->pStart; \ -+ (pSB)->pEnd = (pSB)->pStart + (size); \ -+ (pSB)->pStretchEnd = (pSB)->pEnd; \ -+ (pSB)->pExtraEnd = (pSB)->pEnd+(extra); \ -+} while (0) -+ -+#define StretchBufferGetSize(pSB) ((pSB)->pEnd - (pSB)->pStart) -+#define StretchBufferGetStartPtr(pSB) ((void *) (pSB)->pStart) -+#define StretchBufferGetReadPtr(pSB) ((void *) (pSB)->pRead) -+#define StretchBufferGetWritePtr(pSB) ((void *) (pSB)->pWrite) -+#define StretchBufferReset(pSB) ((pSB)->pRead = (pSB)->pWrite = (pSB)->pStart) -+ -+#define StretchBufferGetReadToEnd(pSB) ((pSB)->pStretchEnd - (pSB)->pRead) -+ -+#define StretchBufferGetReadAvail(pSB) ((pSB)->pWrite - (pSB)->pRead >= 0 ? \ -+ (pSB)->pWrite - (pSB)->pRead : \ -+ (pSB)->pStretchEnd - (pSB)->pRead) -+#define _StretchBufferGetWriteAvail(pSB,rd) ((rd) - (pSB)->pWrite > 0 ? \ -+ (rd) - (pSB)->pWrite - 1 : \ -+ ((pSB)->pExtraEnd - (pSB)->pWrite)) -+#define StretchBufferGetWriteAvail(pSB) _StretchBufferGetWriteAvail(pSB, (pSB)->pRead) -+ -+#define StretchBufferReadUpdate(pSB,n) do { \ -+ char *p; \ -+ \ -+ p = (pSB)->pRead + (n); \ -+ (pSB)->pRead = (p >= (pSB)->pStretchEnd ? (pSB)->pStart : p); \ -+} while (0) -+ -+#define _StretchBufferWriteUpdate(pSB,rd,n) do { \ -+ char *p; \ -+ \ -+ p = (pSB)->pWrite + (n); \ -+ if (p >= (pSB)->pEnd) { \ -+ if ((rd) != (pSB)->pStart) { \ -+ (pSB)->pStretchEnd = p; \ -+ (pSB)->pWrite = (pSB)->pStart; \ -+ } \ -+ } \ -+ else \ -+ (pSB)->pWrite = p; \ -+} while (0) -+ -+#define StretchBufferWriteUpdate(pSB,n) _StretchBufferWriteUpdate(pSB,(pSB)->pRead,n) -+ -+#endif /* CircBufHeader_H_ */ -+ -+ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DList.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DList.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DList.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DList.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,131 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * DList.h -+ * -+ * Description: -+ * Definition and implementation (via macros and inline functions) -+ * of double-linked list -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ *****************************************************************************/ -+ -+#ifndef DListHeader_H_ -+#define DListHeader_H_ -+ -+typedef struct _DListHeader -+ { -+ struct _DListHeader *next; /* next item in the list */ -+ struct _DListHeader *prev; /* prev item in the list */ -+ } DListHeader; -+ -+typedef struct _DListUpHeader -+ { -+ struct _DListUpHeader *next; /* next item in the list */ -+ struct _DListUpHeader *prev; /* prev item in the list */ -+ struct _DListUpHeader *head; /* head of the list */ -+ } DListUpHeader; -+ -+/* Double linked list DList management macros */ -+ -+#define DListInit(pDListHead) do { \ -+ ((DListHeader *)(pDListHead))->next = pDListHead; \ -+ ((DListHeader *)(pDListHead))->prev = pDListHead; \ -+} while (0) -+ -+#define DListNext(pDListEntry) (((DListHeader *)(pDListEntry))->next) -+#define DListPrev(pDListEntry) (((DListHeader *)(pDListEntry))->prev) -+ -+#define DListEntryLinked(pDListEntry) (NULL != DListNext(pDListEntry)) -+#define DListUnlinkEntry(pDListEntry) (DListNext(pDListEntry) = DListPrev(pDListEntry) = NULL) -+ -+#define DListFirst(pDListHead) DListNext(pDListHead) -+#define DListLast(pDListHead) DListPrev(pDListHead) -+#define DListValid(pDListHead,pEntry) ((void *)(pDListHead) != (pEntry)) -+#define DListEmpty(pDListHead) ((void *)pDListHead == ((DListHeader *)pDListHead)->next) -+ -+#define DListInsertAfter(pDListEntry,pEntry) do { \ -+ ((DListHeader *)(pEntry))->next = ((DListHeader *)(pDListEntry))->next; \ -+ ((DListHeader *)(pEntry))->prev = (DListHeader *)(pDListEntry); \ -+ ((DListHeader *)(pDListEntry))->next->prev = (DListHeader *) (pEntry); \ -+ ((DListHeader *)(pDListEntry))->next = (DListHeader *) (pEntry); \ -+} while (0) -+ -+#define DListInsertBefore(pDListEntry,pEntry) do { \ -+ ((DListHeader *)(pEntry))->next = (DListHeader *)(pDListEntry); \ -+ ((DListHeader *)(pEntry))->prev = ((DListHeader *)(pDListEntry))->prev; \ -+ ((DListHeader *)(pDListEntry))->prev->next = (DListHeader *) (pEntry); \ -+ ((DListHeader *)(pDListEntry))->prev = (DListHeader *) (pEntry); \ -+} while (0) -+ -+#define DListInsertTail(pDListHead,pEntry) DListInsertBefore(pDListHead,pEntry) -+#define DListInsertHead(pDListHead,pEntry) DListInsertAfter(pDListHead,pEntry) -+ -+#define DListRemove(pDListEntry) do { \ -+ ((DListHeader *)(pDListEntry))->prev->next = ((DListHeader *)(pDListEntry))->next; \ -+ ((DListHeader *)(pDListEntry))->next->prev = ((DListHeader *)(pDListEntry))->prev; \ -+} while (0) -+ -+ -+#define DListForEach(pDListHead,f,ref) do { \ -+ DListHeader *p = ((DListHeader *)(pDListHead))->next; \ -+ \ -+ while (DListValid(pDListHead,p)) { \ -+ DListHeader *p0 = p; \ -+ p = DListNext(p); \ -+ if ( (f)((void *)p0, ref) ) break; \ -+ } \ -+} while (0) -+ -+ -+/* Double linked list with up link DListUp management macros */ -+ -+#define DListUpInit(pDListHead) do { \ -+ ((DListUpHeader *)(pDListHead))->next = (DListUpHeader *) (pDListHead); \ -+ ((DListUpHeader *)(pDListHead))->prev = (DListUpHeader *) (pDListHead); \ -+ ((DListUpHeader *)(pDListHead))->head = (DListUpHeader *) (pDListHead); \ -+} while (0) -+ -+#define DListUpNext(pDListEntry) ((DListUpHeader *) DListNext(pDListEntry)) -+#define DListUpPrev(pDListEntry) ((DListUpHeader *) DListPrev(pDListEntry)) -+#define DListUpHead(pDListEntry) (((DListUpHeader *)(pDListEntry))->head) -+ -+#define DListUpFirst(pDListHead) DListUpNext(pDListHead) -+#define DListUpLast(pDListHead) DListUpPrev(pDListHead) -+#define DListUpValid(pEntry) (((DListUpHeader *)(pEntry))->head != (void *) pEntry) -+#define DListUpEmpty(pDListHead) DListEmpty(pDListHead) -+ -+#define DListUpInsertAfter(pDListEntry,pEntry) do { \ -+ DListInsertAfter(pDListEntry,pEntry); \ -+ ((DListUpHeader *)(pEntry))->head = ((DListUpHeader *)(pDListEntry))->head; \ -+} while (0) -+ -+#define DListUpInsertBefore(pDListEntry,pEntry) do { \ -+ DListInsertBefore(pDListEntry,pEntry); \ -+ ((DListUpHeader *)(pEntry))->head = ((DListUpHeader *)(pDListEntry))->head; \ -+} while (0) -+ -+#define DListUpInsertTail(pDListHead,pEntry) DListUpInsertBefore(pDListHead,pEntry) -+#define DListUpInsertHead(pDListHead,pEntry) DListUpInsertAfter(pDListHead,pEntry) -+ -+#define DListUpRemove(pDListEntry) DListRemove(pDListEntry) -+#define DListUpForEach(pDListHead,f,ref) DListForEach((DListHeader *)(pDListHead),f,ref) -+ -+#endif /* DListHeader_H_ */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DslFramer.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DslFramer.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DslFramer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/DslFramer.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,159 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * DslFramer.h -+ * -+ * Description: -+ * This file contains common DSL framer definitions -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.3 $ -+ * -+ * $Id: DslFramer.h,v 1.3 2004/07/21 01:39:41 ilyas Exp $ -+ * -+ * $Log: DslFramer.h,v $ -+ * Revision 1.3 2004/07/21 01:39:41 ilyas -+ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK -+ * -+ * Revision 1.2 2004/04/12 23:41:10 ilyas -+ * Added standard header for shared ADSL driver files -+ * -+ * Revision 1.1 2001/12/13 02:28:27 ilyas -+ * Added common framer (DslPacket and G997) and G997 module -+ * -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef DslFramerHeader -+#define DslFramerHeader -+ -+#include "DList.h" -+ -+#define kDslFramerInitialized 0x80000000 -+ -+/* status codes */ -+ -+#define kDslFramerRxFrame 1 -+#define kDslFramerRxFrameErr 2 -+#define kDslFramerTxFrame 3 -+#define kDslFramerTxFrameErr 4 -+ -+#define kDslFramerRxFrameErrFlushed 1 -+#define kDslFramerRxFrameErrAbort 2 -+#define kDslFramerRxFrameErrPhy 3 -+ -+#define kDslFramerTxFrameErrFlushed 1 -+ -+ -+typedef struct _dslFramerBufDesc { -+ long pkId; -+ long bufFlags; -+ void *bufPtr; -+ long bufLen; -+} dslFramerBufDesc; -+ -+/* data bufDesc flags */ -+ -+#define kDslFramerStartNewFrame 1 -+#define kDslFramerEndOfFrame 2 -+#define kDslFramerAbortFrame 4 -+ -+#define kDslFramerExtraByteShift 3 -+#define kDslFramerExtraByteMask (0x7 << kDslFramerExtraByteShift) -+ -+typedef struct _dslFramerControl { -+ bitMap setup; -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslStatusHandlerType statusHandlerPtr; -+ ulong statusCode; -+ ulong statusOffset; -+ -+ int nRxBuffers; -+ int nRxBufSize; -+ int nRxPackets; -+ -+ dslFrame *freeBufListPtr; -+ void *freeBufPool; -+ void *pBufMemory; -+ -+ dslFrame *freePacketListPtr; -+ void *freePacketPool; -+ -+ /* RX working data set */ -+ -+ dslFrame *pRxFrame; -+ dslFrameBuffer *pRxBuf; -+ uchar *pRxBufData; -+ uchar *pRxBufDataEnd; -+ int rxFrameLen; -+ -+ /* TX working data set */ -+ -+ DListHeader dlistTxWaiting; -+ dslFrame *pTxFrame; -+ dslFrameBuffer *pTxBuf; -+ uchar *pTxBufData; -+ uchar *pTxBufDataEnd; -+ -+ /* stats data */ -+ -+ ulong dslByteCntRxTotal; -+ ulong dslByteCntTxTotal; -+ -+ ulong dslFrameCntRxTotal; -+ ulong dslFrameCntRxErr; -+ ulong dslFrameCntTxTotal; -+ -+} dslFramerControl; -+ -+ -+extern Boolean DslFramerInit( -+ void *gDslVars, -+ dslFramerControl *dfCtrl, -+ bitMap setup, -+ ulong statusCode, -+ ulong statusOffset, -+ dslFrameHandlerType rxIndicateHandlerPtr, -+ dslFrameHandlerType txCompleteHandlerPtr, -+ dslStatusHandlerType statusHandlerPtr, -+ ulong rxBufNum, -+ ulong rxBufSize, -+ ulong rxPacketNum); -+extern void DslFramerClose(void *gDslVars, dslFramerControl *dfCtrl); -+extern void DslFramerSendFrame(void *gDslVars, dslFramerControl *dfCtrl, dslFrame *pFrame); -+extern void DslFramerReturnFrame(void *gDslVars, dslFramerControl *dfCtrl, dslFrame *pFrame); -+ -+ -+extern Boolean DslFramerRxGetPtr(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); -+extern void DslFramerRxDone (void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); -+extern Boolean DslFramerTxGetPtr(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); -+extern void DslFramerTxDone(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); -+extern Boolean DslFramerTxIdle (void *gDslVars, dslFramerControl *dfCtrl); -+extern void DslFramerTxFlush(void *gDslVars, dslFramerControl *dfCtrl); -+ -+extern void * DslFramerGetFramePoolHandler(dslFramerControl *dfCtrl); -+extern void DslFramerClearStat(dslFramerControl *dfCtrl); -+ -+extern void DslFramerRxFlushFrame (void *gDslVars, dslFramerControl *dfCtrl, int errCode); -+extern void DslFramerRxFlush(void *gDslVars, dslFramerControl *dfCtrl); -+ -+#endif /* DslFramerHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Flatten.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Flatten.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Flatten.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Flatten.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,115 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * Flatten.h -- Header for Flatten/Unflatten command/status -+ * -+ * Copyright (c) 1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.14 $ -+ * -+ * $Id: Flatten.h,v 1.14 2004/03/04 19:48:52 linyin Exp $ -+ * -+ * $Log: Flatten.h,v $ -+ * Revision 1.14 2004/03/04 19:48:52 linyin -+ * Support adsl2plus -+ * -+ * Revision 1.13 2003/10/17 22:45:14 yongbing -+ * Increase buffer size for large B&G table of G992P3 -+ * -+ * Revision 1.12 2003/08/12 23:16:26 khp -+ * - for Haixiang: added support for ADSL_MARGIN_TWEAK_TEST -+ * -+ * Revision 1.11 2003/02/27 06:33:03 ilyas -+ * Improved free space checking in command buffer (became a problem with -+ * 2 commands SetXmtgain and StartPhy) -+ * -+ * Revision 1.10 2003/01/11 01:27:07 ilyas -+ * Improved checking for available space in status buffer -+ * -+ * Revision 1.9 2002/09/07 01:43:59 ilyas -+ * Added support for OEM parameters -+ * -+ * Revision 1.8 2002/05/16 00:01:52 khp -+ * -added missing #endif -+ * -+ * Revision 1.7 2002/05/15 00:04:48 mprahlad -+ * increase the status buffer size - prevent memory overflow for annexC cases -+ * -+ * Revision 1.6 2002/04/05 04:10:33 linyin -+ * -hack to fit in Annex C firmware in LMEM -+ * -+ * Revision 1.5 2002/04/05 02:45:25 linyin -+ * Make the buffer side larger for annexC -+ * -+ * Revision 1.4 2002/01/30 07:19:06 ilyas -+ * Moved showtime code to LMEM -+ * -+ * Revision 1.3 2001/08/29 02:56:01 ilyas -+ * Added tests for flattening/unflatenning command and statuses (dual mode) -+ * -+ * Revision 1.2 2001/04/25 00:30:54 ilyas -+ * Adjusted MaxFrameLen -+ * -+ * Revision 1.1 2001/04/24 21:41:21 ilyas -+ * Implemented status flattening/unflattaning to transfer statuses between -+ * modules asynchronously through the circular buffer -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef _Flatten_H_ -+#define _Flatten_H_ -+ -+#include "CircBuf.h" -+ -+#ifdef ADSL_MARGIN_TWEAK_TEST -+#define kMaxFlattenedCommandSize 272 /* maximum no. of bytes in flattened cmd */ -+#else -+#define kMaxFlattenedCommandSize 128 /* maximum no. of bytes in flattened cmd */ -+#endif -+#if defined(G992_ANNEXC) || defined(G992P3) -+#if defined(G992P5) -+#define kMaxFlattenedStatusSize 2200 /* maximum no. of bytes in flattened status */ -+#else -+#define kMaxFlattenedStatusSize 1100 /* maximum no. of bytes in flattened status */ -+#endif -+#else -+#define kMaxFlattenedStatusSize 550 /* maximum no. of bytes in flattened status */ -+#endif -+ -+#define kMaxFlattenFramelength (kMaxFlattenedStatusSize - (4*sizeof(long)) - 20) -+ -+extern int SM_DECL FlattenCommand (dslCommandStruct *cmd, ulong *dstPtr, ulong nAvail); -+extern int SM_DECL UnflattenCommand(ulong *srcPtr, dslCommandStruct *cmd); -+extern int SM_DECL FlattenStatus (dslStatusStruct *status, ulong *dstPtr, ulong nAvail); -+extern int SM_DECL UnflattenStatus (ulong *srcPtr, dslStatusStruct *status); -+ -+#define FlattenBufferInit(fb,fbData,bufSize,itemSize) \ -+ StretchBufferInit(fb, fbData, bufSize, itemSize) -+ -+extern int SM_DECL FlattenBufferStatusWrite(stretchBufferStruct *fBuf, dslStatusStruct *status); -+extern int SM_DECL FlattenBufferStatusRead(stretchBufferStruct *fBuf, dslStatusStruct *status); -+ -+extern int SM_DECL FlattenBufferCommandWrite(stretchBufferStruct *fBuf, dslCommandStruct *cmd); -+extern int SM_DECL FlattenBufferCommandRead(stretchBufferStruct *fBuf, dslCommandStruct *cmd); -+ -+#define FlattenBufferReadComplete(fb,nBytes) \ -+ StretchBufferReadUpdate (fb, nBytes) -+ -+#endif /* _Flatten_H_ */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.gh ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.gh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.gh 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,110 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * G992p3OvhMsg.gh -+ * -+ * Description: -+ * This is a header file which defines the type for the G992p3 overhead -+ * channel messages global variable structure. -+ * -+ * -+ * Copyright (c) 1999-2003 BroadCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.5 $ -+ * -+ * $Id: G992p3OvhMsg.gh,v 1.5 2004/09/11 03:52:25 ilyas Exp $ -+ * -+ * $Log: G992p3OvhMsg.gh,v $ -+ * Revision 1.5 2004/09/11 03:52:25 ilyas -+ * Added support for overhead message segmentation -+ * -+ * Revision 1.4 2004/07/07 01:27:20 ilyas -+ * Fixed OHC message stuck problem on L2 entry/exit -+ * -+ * Revision 1.3 2004/06/10 00:13:31 ilyas -+ * Added L2/L3 and SRA -+ * -+ * Revision 1.2 2004/04/12 23:34:52 ilyas -+ * Merged the latest ADSL driver chnages for ADSL2+ -+ * -+ * Revision 1.1 2003/07/18 19:39:18 ilyas -+ * Initial G.992.3 overhead channel message implementation (from ADSL driver) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef G992p3OvhMsgFramerGlobals -+#define G992p3OvhMsgFramerGlobals -+ -+#define kG992p3OvhMsgMaxCmdSize (16 + 16) -+#define kG992p3OvhMsgMaxRspSize (16 + 2*512) -+ -+typedef struct -+ { -+ dslFrame *segFrame; -+ dslFrameBuffer *segFrBufCur; -+ dslFrameBuffer segFrBuf; -+ ulong timeSegOut; -+ uchar tryCnt; -+ uchar segTotal; -+ uchar segId; -+ } -+ g992p3SegFrameCtlStruct; -+ -+typedef struct -+ { -+ bitMap setup; -+ dslFrameHandlerType rxReturnFramePtr; -+ dslFrameHandlerType txSendFramePtr; -+ dslCommandHandlerType cmdHandlerPtr; -+ dslStatusHandlerType statusHandlerPtr; -+ -+ dslFrame txRspFrame; -+ dslFrameBuffer txRspFrBuf; -+ dslFrameBuffer txRspFrBuf1; -+ uchar txRspBuf[kG992p3OvhMsgMaxRspSize]; -+ dslFrame txPwrRspFrame; -+ dslFrameBuffer txPwrRspFrBuf0; -+ dslFrameBuffer txPwrRspFrBuf0a; -+ dslFrameBuffer txPwrRspFrBuf1; -+ uchar txPwrRspBuf0[8]; -+ dslFrame txCmdFrame; -+ dslFrameBuffer txCmdFrBuf0; -+ dslFrameBuffer txCmdFrBuf0a; -+ dslFrameBuffer txCmdFrBuf1; -+ uchar txCmdBuf[kG992p3OvhMsgMaxCmdSize]; -+ g992p3SegFrameCtlStruct txSegFrameCtl; -+ ulong txFlags; -+ uchar txL0Rq; -+ uchar txL3Rq; -+ -+ ulong timeMs; -+ ulong timeCmdOut; -+ ulong cmdTryCnt; -+ ulong cmdNum; -+ ulong timeRspOut; -+ uchar *txPmdCmd; -+ -+ uchar rxCmdMsgNum; -+ uchar rxRspMsgNum; -+ uchar txCmdMsgNum; -+ uchar txRspMsgNum; -+ } -+ g992p3OvhMsgVarsStruct; -+ -+#endif /* G992p3OvhMsgFramerGlobals */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G992p3OvhMsg.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,64 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * G992p3OvhMsg.h -+ * -+ * Description: -+ * This file contains the exported functions and definitions for G992p3 -+ * overhead channel messages -+ * -+ * -+ * Copyright (c) 1999-2003 BroadCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.1 $ -+ * -+ * $Id: G992p3OvhMsg.h,v 1.1 2003/07/18 19:39:18 ilyas Exp $ -+ * -+ * $Log: G992p3OvhMsg.h,v $ -+ * Revision 1.1 2003/07/18 19:39:18 ilyas -+ * Initial G.992.3 overhead channel message implementation (from ADSL driver) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef G992p3OvhMsgFramerHeader -+#define G992p3OvhMsgFramerHeader -+ -+#define kG992p3OvhMsgFrameBufCnt -1 -+ -+extern Boolean G992p3OvhMsgInit( -+ void *gDslVars, -+ bitMap setup, -+ dslFrameHandlerType rxReturnFramePtr, -+ dslFrameHandlerType txSendFramePtr, -+ dslCommandHandlerType commandHandler, -+ dslStatusHandlerType statusHandler); -+ -+extern void G992p3OvhMsgReset(void *gDslVars); -+extern void G992p3OvhMsgClose(void *gDslVars); -+extern void G992p3OvhMsgTimer(void *gDslVars, long timeQ24ms); -+extern Boolean G992p3OvhMsgCommandHandler (void *gDslVars, dslCommandStruct *cmd); -+extern void G992p3OvhMsgStatusSnooper (void *gDslVars, dslStatusStruct *status); -+ -+extern int G992p3OvhMsgSendCompleteFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); -+extern int G992p3OvhMsgIndicateRcvFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); -+ -+extern void G992p3OvhMsgSetL3(void *gDslVars); -+extern void G992p3OvhMsgSetL0(void *gDslVars); -+ -+#endif /* G992p3OvhMsgFramerHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.gh ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.gh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.gh 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,66 @@ -+/**************************************************************************** -+ * -+ * G997.gh -+ * -+ * Description: -+ * This is a header file which defines the type for the G997 Framer -+ * global variable structure. -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.5 $ -+ * -+ * $Id: G997.gh,v 1.5 2004/07/21 01:39:41 ilyas Exp $ -+ * -+ * $Log: G997.gh,v $ -+ * Revision 1.5 2004/07/21 01:39:41 ilyas -+ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK -+ * -+ * Revision 1.4 2004/04/27 00:27:16 ilyas -+ * Implemented double buffering to ensure G.997 HDLC frame is continuous -+ * -+ * Revision 1.3 2003/07/18 18:56:59 ilyas -+ * Added support for shared TX buffer (for ADSL driver) -+ * -+ * Revision 1.2 2002/01/11 06:48:27 ilyas -+ * Added command handler pointer -+ * -+ * Revision 1.1 2001/12/13 02:28:27 ilyas -+ * Added common framer (DslPacket and G997) and G997 module -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef G997FramerGlobals -+#define G997FramerGlobals -+ -+#include "DslFramer.h" -+#include "HdlcFramer.h" -+ -+#define kG997MsgBufSize 64 -+ -+typedef struct -+ { -+ bitMap setup; -+ dslFramerControl dslFramer; -+ hdlcByteControl hdlcByte; -+ dslCommandHandlerType commandHandler; -+ -+ ulong timeMs; -+ ulong timeCmdOut; -+ -+ uchar rxMsgNum; -+ uchar txMsgNum; -+ Boolean txIdle; -+ uchar txMsgBuf[kG997MsgBufSize]; -+ ulong txMsgBufLen; -+ uchar *txMsgBufPtr; -+ ulong txMsgLen; -+ ulong txMsgBufs; -+ ulong txMsgBufNum; -+ } -+ g997VarsStruct; -+ -+#endif /* G997FramerGlobals */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/G997.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,68 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * G997.h -+ * -+ * Description: -+ * This file contains the exported functions and definitions for G97Framer -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.3 $ -+ * -+ * $Id: G997.h,v 1.3 2003/07/18 18:56:59 ilyas Exp $ -+ * -+ * $Log: G997.h,v $ -+ * Revision 1.3 2003/07/18 18:56:59 ilyas -+ * Added support for shared TX buffer (for ADSL driver) -+ * -+ * Revision 1.2 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.1 2001/12/13 02:28:27 ilyas -+ * Added common framer (DslPacket and G997) and G997 module -+ * -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef G997FramerHeader -+#define G997FramerHeader -+ -+extern Boolean G997Init( -+ void *gDslVars, -+ bitMap setup, -+ ulong rxBufNum, -+ ulong rxBufSize, -+ ulong rxPacketNum, -+ upperLayerFunctions *pUpperLayerFunctions, -+ dslCommandHandlerType g997PhyCommandHandler); -+ -+extern void G997Close(void *gDslVars); -+extern void G997Timer(void *gDslVars, long timeQ24ms); -+extern Boolean G997CommandHandler (void *gDslVars, dslCommandStruct *cmd); -+extern void G997StatusSnooper (void *gDslVars, dslStatusStruct *status); -+ -+extern int G997SendFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); -+extern int G997ReturnFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); -+ -+extern Boolean G997SetTxBuffer(void *gDslVars, ulong len, void *bufPtr); -+extern void * G997GetFramePoolHandler(void *gDslVars); -+ -+#endif /* G997FramerHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/HdlcFramer.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/HdlcFramer.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/HdlcFramer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/HdlcFramer.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,237 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * HdlcFramer.h -+ * -+ * Description: -+ * This file contains common HDLC definitions for bit/byte stuffing -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.3 $ -+ * -+ * $Id: HdlcFramer.h,v 1.3 2004/07/21 01:39:41 ilyas Exp $ -+ * -+ * $Log: HdlcFramer.h,v $ -+ * Revision 1.3 2004/07/21 01:39:41 ilyas -+ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK -+ * -+ * Revision 1.2 2003/07/18 18:51:05 ilyas -+ * Added mode (default) to pass address and control field -+ * -+ * Revision 1.1 2001/12/13 02:28:27 ilyas -+ * Added common framer (DslPacket and G997) and G997 module -+ * -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef HdlcFramerHeader -+#define HdlcFramerHeader -+ -+/* setup bitmap definitions */ -+ -+#define kHdlcSetupShift 16 -+#define kHdlcSetupMask ((long)0xFFFF << kHdlcSetupShift) -+ -+#define kHdlcCrcMask 0x00030000 -+#define kHdlcCrcNone 0x00000000 -+#define kHdlcCrc16 0x00010000 -+#define kHdlcCrc32 0x00020000 -+ -+#define kHdlcTxIdleStop 0x00040000 -+#define kHdlcSpecialAddrCtrl 0x00080000 -+ -+extern ushort HdlcCrc16Table[]; -+ -+#define HDLC16_CRC_INIT 0xFFFF -+#define HDLC16_CRC_FINAL(crc) ((crc) ^ 0xFFFF) -+#define HDLC16_GOOD_CRC 0xF0B8 -+#define Hdlc16UpdateCrc(crc,b) ((crc) >> 8) ^ HdlcCrc16Table[((crc) ^ (b)) & 0xFF] -+ -+extern ulong HdlcCrc32Table[]; -+ -+#define HDLC32_CRC_INIT 0xFFFFFFFF -+#define HDLC32_CRC_FINAL(crc) ((crc) ^ 0xFFFFFFFF) -+#define HDLC32_GOOD_CRC 0xDEBB20E3 -+#define Hdlc32UpdateCrc(crc,b) ((crc) >> 8) ^ HdlcCrc32Table[((crc) ^ (b)) & 0xFF] -+ -+extern ulong HdlcCrc32Table[]; -+ -+/* HDLC common fields */ -+ -+#define HDLC_ADDR 0xFF -+#define HDLC_CTRL 0x3 -+ -+#define HDLC_BYTE_FLAG 0x7E -+#define HDLC_BYTE_ESC 0x7D -+ -+/* HDLC frame assembly states */ -+ -+#define HDLC_STATE_START_FLAG 0 -+#define HDLC_STATE_ADDRESS (HDLC_STATE_START_FLAG + 1) -+#define HDLC_STATE_CONTROL (HDLC_STATE_START_FLAG + 2) -+#define HDLC_STATE_DATA (HDLC_STATE_START_FLAG + 3) -+#define HDLC_STATE_FCS1 (HDLC_STATE_START_FLAG + 4) -+#define HDLC_STATE_FCS2 (HDLC_STATE_START_FLAG + 5) -+#define HDLC_STATE_END_FLAG (HDLC_STATE_START_FLAG + 6) -+ -+ -+/* HDLC common types */ -+ -+typedef struct _hdlcByteControl { -+ bitMap setup; -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; -+ dslFramerDataDoneHandlerType rxDataDoneHandler; -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; -+ dslFramerDataDoneHandlerType txDataDoneHandler; -+ -+ /* RX working data set */ -+ -+ uchar rxFrameState; -+ int rxFrameLen; -+ ulong rxCrc; -+ Boolean rxEscChar; -+ -+ uchar *pRxData; -+ uchar *pRxDataEnd; -+ long rxDataLen; -+ -+ /* TX working data set */ -+ -+ uchar txFrameState; -+ int txFrameLen; -+ ulong txCrc; -+ int txCharPending; -+ -+ uchar *pTxData; -+ uchar *pTxDataEnd; -+ long txDataLen; -+} hdlcByteControl; -+ -+typedef struct _hdlcBitControl { -+ bitMap setup; -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; -+ dslFramerDataDoneHandlerType rxDataDoneHandler; -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; -+ dslFramerDataDoneHandlerType txDataDoneHandler; -+ -+ /* RX working data set */ -+ -+ uchar rxFrameState; -+ int rxFrameLen; -+ ulong rxCrc; -+ int rxNibblePending; -+ int rxOutVal; -+ uchar rxOutBits; -+ uchar rxRem1Bits; -+ Boolean rxEscChar; /* ???? */ -+ -+ uchar *pRxData; -+ uchar *pRxDataEnd; -+ long rxDataLen; -+ -+ /* TX working data set */ -+ -+ uchar txFrameState; -+ int txFrameLen; -+ ulong txCrc; -+ int txOutVal; -+ uchar txOutBits; -+ uchar txLast1Bits; -+ int txCharPending; /* ???? */ -+ -+ uchar *pTxData; -+ uchar *pTxDataEnd; -+ long txDataLen; -+} hdlcBitControl; -+ -+/* HDLC common functions */ -+ -+#define HdlcFramerTxFrameInit(ctrl) do { \ -+ ctrl->txFrameState = HDLC_STATE_START_FLAG; \ -+ ctrl->txFrameLen = 0; \ -+ ctrl->txCrc = HDLC16_CRC_INIT; \ -+ ctrl->txCharPending= -1; \ -+} while (0) -+ -+#define HdlcFramerRxFrameInit(ctrl) do { \ -+ ctrl->rxFrameState = HDLC_STATE_START_FLAG; \ -+ ctrl->rxFrameLen = 0; \ -+ ctrl->rxCrc = HDLC16_CRC_INIT; \ -+ ctrl->rxEscChar = false; \ -+} while (0) -+ -+#define HdlcFramerTxGetData(ctrl) do { \ -+ dslFramerBufDesc bufDesc; \ -+ \ -+ if ((ctrl->txDataGetPtrHandler) (gDslVars, &bufDesc)) { \ -+ ctrl->pTxData = bufDesc.bufPtr; \ -+ ctrl->pTxDataEnd = (uchar*)bufDesc.bufPtr + bufDesc.bufLen; \ -+ ctrl->txDataLen = bufDesc.bufLen; \ -+ if (bufDesc.bufFlags & kDslFramerStartNewFrame) \ -+ HdlcFramerTxFrameInit(ctrl); \ -+ } \ -+ else { \ -+ HdlcFramerTxFrameInit(ctrl); \ -+ } \ -+} while (0); -+ -+#define HdlcFramerRxGetData(ctrl, frFlag) do { \ -+ dslFramerBufDesc bufDesc; \ -+ \ -+ bufDesc.bufFlags = frFlag; \ -+ if ((ctrl->rxDataGetPtrHandler) (gDslVars, &bufDesc)) { \ -+ ctrl->pRxData = bufDesc.bufPtr; \ -+ ctrl->pRxDataEnd = (uchar*)bufDesc.bufPtr + bufDesc.bufLen; \ -+ ctrl->rxDataLen = bufDesc.bufLen; \ -+ } \ -+} while (0); -+ -+/* HDLC functions headers */ -+ -+extern Boolean HdlcByteInit( -+ void *gDslVars, -+ hdlcByteControl *hbyCtrl, -+ bitMap setup, -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler, -+ dslFramerDataDoneHandlerType rxDataDoneHandler, -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler, -+ dslFramerDataDoneHandlerType txDataDoneHandler); -+ -+extern void HdlcByteReset(void *gDslVars, hdlcByteControl *hbyCtrl); -+extern void HdlcByteRxFlush(void *gDslVars, hdlcByteControl *hbyCtrl); -+extern int HdlcByteRx(void *gDslVars, hdlcByteControl *hbyCtrl, int nBytes, uchar *srcPtr) FAST_TEXT; -+extern int HdlcByteTx(void *gDslVars, hdlcByteControl *hbyCtrl, int nBytes, uchar *dstPtr) FAST_TEXT; -+extern Boolean HdlcByteTxIdle(void *gDslVars, hdlcByteControl *hbyCtrl); -+ -+extern Boolean HdlcBitInit( -+ void *gDslVars, -+ hdlcBitControl *hbiCtrl, -+ bitMap setup, -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler, -+ dslFramerDataDoneHandlerType rxDataDoneHandler, -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler, -+ dslFramerDataDoneHandlerType txDataDoneHandler); -+ -+extern void HdlcBitReset(void *gDslVars, hdlcByteControl *hbiCtrl); -+extern int HdlcBitRx(void *gDslVars, hdlcBitControl *hbiCtrl, int nBytes, uchar *srcPtr) FAST_TEXT; -+extern int HdlcBitTx(void *gDslVars, hdlcBitControl *hbiCtrl, int nBytes, uchar *dstPtr) FAST_TEXT; -+ -+#endif /* HdlcFramerHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MathUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MathUtil.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MathUtil.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MathUtil.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,135 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/************************************************************************ -+ * -+ * MathUtil.h: -+ * -+ * Description: -+ * This file contains the exported interface for MathUtil.c module. -+ * -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.6 $ -+ * -+ * $Id: MathUtil.h,v 1.6 2004/04/13 00:21:13 ilyas Exp $ -+ * -+ * $Log: MathUtil.h,v $ -+ * Revision 1.6 2004/04/13 00:21:13 ilyas -+ * Added standard header for shared ADSL driver files -+ * -+ * Revision 1.5 2001/08/16 02:18:08 khp -+ * - mark functions with FAST_TEXT to reduce cycle counts for QPROC targets -+ * (replaces use of LMEM_INSN) -+ * -+ * Revision 1.4 1999/10/06 04:55:22 liang -+ * Added function to multiply two long values to save result as VeryLong. -+ * -+ * Revision 1.3 1999/08/05 19:42:52 liang -+ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. -+ * -+ * Revision 1.2 1999/03/26 03:29:59 liang -+ * Export CosSin table. -+ * -+ * Revision 1.1 1998/10/28 01:28:07 liang -+ * *** empty log message *** -+ * -+ * Revision 1.12 1998/02/10 17:19:49 scott -+ * Changed MathVL routines to return arguments using pointers -+ * -+ * Revision 1.11 1997/12/13 06:12:07 mwg -+ * Added more Atan2 flavors -+ * -+ * Revision 1.10 1997/11/18 01:11:48 mwg -+ * Removed <CR> symbols which accidently slipped in. -+ * -+ * Revision 1.9 1997/11/03 19:07:52 scott -+ * No longer redefine max() and min() if already defined -+ * -+ * Revision 1.8 1997/07/30 01:35:20 liang -+ * Add more accurate atan2 function UtilLongLongAtan2. -+ * -+ * Revision 1.7 1997/07/21 20:23:19 mwg -+ * Added new function: UtilBlockCos() -+ * -+ * Revision 1.6 1997/03/21 23:50:10 liang -+ * Added initial version of V8bis module to CVS tree. -+ * -+ * Revision 1.5 1997/03/19 18:35:34 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.4 1997/01/21 00:36:15 mwg -+ * Added new function: UtilBlockCosSin() -+ * -+ * Revision 1.3 1996/06/18 21:14:45 mwg -+ * Modified VLDivVL by allowing to specify the result scaling. -+ * -+ * Revision 1.2 1996/06/12 02:31:59 mwg -+ * Added 64bit arithmetic functions. -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:15 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.4 1995/12/04 23:08:15 liang -+ * Add file Math/LinearToLog.c. -+ * -+ ************************************************************************/ -+#ifndef MathUtilPh -+#define MathUtilPh -+ -+/* Exported tables */ -+extern const short UtilCosTable[]; -+ -+/* Exported functions */ -+extern ComplexShort UtilCosSin(ushort angle); -+extern long UtilBlockCosSin (int nValues, long angle, long delta, ComplexShort *dstPtr); -+extern long UtilBlockCos (int nValues, long angle, long delta, short *dstPtr); -+extern ushort UtilShortShortAtan2(ComplexShort point); -+extern ushort UtilLongShortAtan2(ComplexLong point); -+extern ulong UtilShortLongAtan2(ComplexShort point) FAST_TEXT; -+extern ulong UtilLongLongAtan2(ComplexLong point) FAST_TEXT; -+extern ushort UtilSqrt(ulong y); -+extern ushort UtilMaxMagnitude(int blkSize, ComplexShort *dataPtr); -+extern short UtilQ0LinearToQ4dB (ulong x); -+extern ulong UtilQ4dBToQ12Linear (short x); -+extern void UtilAdjustComplexMagnitude(ComplexShort *srcPtr, short mag, short adjustment); -+ -+extern void VLMultLongByLong(long x, long y, VeryLong *dst); -+extern void VLMultShort (VeryLong x, short y, VeryLong *dst); -+extern void VLAddVL (VeryLong x, VeryLong y, VeryLong *dst); -+extern void VLAddLong (VeryLong x, long y, VeryLong *dst); -+extern void VLSubVL (VeryLong x, VeryLong y, VeryLong *dst); -+extern void VLSubLong (VeryLong x, long y, VeryLong *dst); -+extern void VLDivVL (VeryLong x, VeryLong y, int scale, long *dst); -+extern void VLShiftLeft(VeryLong x, int shift, VeryLong *dst); -+extern void VLShiftRight(VeryLong x, int shift, VeryLong *dst); -+ -+ -+#define UtilAtan2 UtilShortShortAtan2 -+#define UtilLongAtan2 UtilLongShortAtan2 -+ -+/* Standard Macros */ -+#undef abs -+#define abs(x) ((x) >= 0 ? (x) : -(x)) -+ -+#undef max -+#define max(x, y) ((x) >= (y) ? (x) : (y)) -+ -+#undef min -+#define min(x, y) ((x) <= (y) ? (x) : (y)) -+ -+#endif /* MathUtilPh */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MipsAsm.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MipsAsm.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MipsAsm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MipsAsm.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,264 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/************************************************************************ -+ * -+ * MipsAsm.h: -+ * -+ * Description: -+ * This file contains definitions specific to MIPS assembly -+ * -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.5 $ -+ * -+ * $Id: MipsAsm.h,v 1.5 2004/04/13 00:16:59 ilyas Exp $ -+ * -+ * $Log: MipsAsm.h,v $ -+ * Revision 1.5 2004/04/13 00:16:59 ilyas -+ * Merged the latest ADSL driver changes -+ * -+ * Revision 1.4 2002/09/12 04:08:50 ilyas -+ * Added macros for BCM MIPS specific instructions -+ * -+ * Revision 1.3 2000/11/18 21:28:19 mprahlad -+ * ifdef bcm47xx - -+ * define MSUB(src1,src2) msub src1, src2 -+ * change Mult(dst, src1, src2) to use "mul" instead of "mult; mflo" -+ * define Mul(src1, src2) mult src1, src2 -+ * -+ * Revision 1.2 2000/07/28 21:05:05 mprahlad -+ * Macros specific to bcm47xx added. -+ * -+ * Revision 1.1 1999/08/05 19:52:57 liang -+ * Copied from the softmodem top of the tree on 08/04/99. -+ * -+ * Revision 1.5 1999/04/02 23:16:21 mwg -+ * Fixed a minor comatibility issue with mult -+ * -+ * Revision 1.4 1999/02/03 20:25:43 mwg -+ * Added an option for R4010 -+ * -+ * Revision 1.3 1998/10/30 02:21:34 mwg -+ * Added targets for 4640 -+ * -+ * Revision 1.2 1998/10/16 18:52:09 ilyas -+ * Added ASM_PROLOG[5-7] macros to save on stores -+ * -+ * Revision 1.1 1998/06/03 23:28:39 mwg -+ * Renamed from DinoDefs.h -+ * -+ * Revision 1.6 1998/02/09 18:23:11 scott -+ * Added EMBEDDED_CALLING_CONVENTION (GreenHill) and R3900/R4102 -+ * -+ * Revision 1.5 1997/03/19 18:35:02 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.4 1996/10/02 20:28:41 liang -+ * Remove parameter "acc" from the non-DINO version of MAD. -+ * -+ * Revision 1.3 1996/10/02 19:44:36 liang -+ * Separated MultAdd into MAD and MADW, added NO_DINO_WRITEBACK option. -+ * -+ * Revision 1.2 1996/08/14 03:06:07 liang -+ * Modified macro MultAdd so that the assembly code build works. -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.5 1994/11/04 22:41:29 mwg -+ * Added #ifdefs for different targets. -+ * -+ ************************************************************************/ -+ -+#ifndef _MIPS_ASM_H_ -+#define _MIPS_ASM_H_ -+ -+#define zero $0 -+#define v0 $2 -+#define v1 $3 -+#define a0 $4 -+#define a1 $5 -+#define a2 $6 -+#define a3 $7 -+#define t0 $8 -+#define t1 $9 -+#define t2 $10 -+#define t3 $11 -+#define t4 $12 -+#define t5 $13 -+#define t6 $14 -+#define t7 $15 -+#define s0 $16 -+#define s1 $17 -+#define s2 $18 -+#define s3 $19 -+#define s4 $20 -+#define s5 $21 -+#define s6 $22 -+#define s7 $23 -+#define t8 $24 -+#define t9 $25 -+#define k0 $26 -+#define k1 $27 -+#define gp $28 -+#define sp $29 -+#define fp $30 -+#define s8 $30 -+#define ra $31 -+ -+#ifdef EMBEDDED_CALLING_CONVENTION -+ -+/* Support for GreenHills embedded calling convention */ -+ -+#define ASM_PROLOG subu sp, 32; \ -+ sw $8, 16(sp); \ -+ sw $9, 20(sp); \ -+ sw $10, 24(sp); \ -+ sw $11, 28(sp); -+ -+#define ASM_PROLOG5 subu sp, 32; \ -+ sw $8, 16(sp); -+ -+#define ASM_PROLOG6 subu sp, 32; \ -+ sw $8, 16(sp); \ -+ sw $9, 20(sp); -+ -+#define ASM_PROLOG7 subu sp, 32; \ -+ sw $8, 16(sp); \ -+ sw $9, 20(sp); \ -+ sw $10, 24(sp); -+ -+#define ASM_EPILOG addu sp, 32 -+ -+#else -+#define ASM_PROLOG -+#define ASM_PROLOG5 -+#define ASM_PROLOG6 -+#define ASM_PROLOG7 -+#define ASM_EPILOG -+#endif -+ -+#ifdef DINO /* Special DSP extensions to MIPS core */ -+ -+#ifndef NO_DINO_WRITEBACK /* DSP extensions with writeback register */ -+ -+#define MAD(src1, src2) .set noreorder ; mad $0, src1, src2 ; .set reorder -+#define MADW(acc, src1, src2) .set noreorder ; mad acc, src1, src2 ; .set reorder -+#define Mult(dst, src1, src2) .set noreorder ; mult dst, src1, src2 ; .set reorder -+#define MultU(dst, src1, src2) .set noreorder ; multu dst, src1, src2 ; .set reorder -+ -+#else /* NO_DINO_WRITEBACK */ -+ -+#define MAD(src1, src2) .set noreorder ; mad $0, src1, src2 ; .set reorder -+#define MADW(acc, src1, src2) .set noreorder ; mad $0, src1, src2 ; mflo acc ; .set reorder -+#define Mult(dst, src1, src2) multu src1, src2 ; mflo dst -+#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst -+ -+#endif /* NO_DINO_WRITEBACK */ -+ -+#else /* DINO */ -+ -+#if defined(R3900) -+ -+#define MAD(src1, src2) madd $0, src1, src2 -+#define MADW(acc, src1, src2) madd acc, src1, src2 -+#define Mult(dst, src1, src2) mult dst, src1, src2 -+#define MultU(dst, src1, src2) multu dst, src1, src2 -+ -+#elif defined(bcm47xx_INSTR_MACROS) && defined(bcm47xx) -+ -+#define mips_froo(s1,s2,s3) s1##s2##s3 -+#define MSUB(s1,s2) .set noreorder ; mips_froo(msub_,s1,s2) ; .set reorder -+#define MAD(s1,s2) .set noreorder ; mips_froo(mad_,s1,s2) ; .set reorder -+#define MADW(acc, s1,s2) .set noreorder ; mips_froo(mad_,s1,s2) ; mflo acc ; .set reorder -+ -+#include "BCM4710.h" -+ -+#define Mult(dst, src1, src2) mul dst, src1, src2 -+#define Mul( src1, src2) mult src1, src2 ; -+#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst -+ -+#elif defined(bcm47xx) -+#define MSUB(src1, src2) msub src1, src2 -+#define MAD(src1, src2) madd src1, src2 -+#define MADW(acc, src1, src2) .set noreorder ; madd src1, src2; mflo acc ; .set reorder -+/* -+#define Mult(dst, src1, src2) mult src1, src2 ; mflo dst -+*/ -+#define Mult(dst, src1, src2) mul dst , src1, src2 ; -+#define Mul( src1, src2) mult src1, src2 ; -+#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst -+ -+#else -+ -+#ifdef R4102 -+#define MAD(src1, src2) madd16 src1, src2 -+#define MADW(acc, src1, src2) madd16 src1, src2 ; mflo acc -+#else /* R4102 */ -+ -+#ifdef R4640 -+ -+#define MAD(src1, src2) madd $0, src1, src2 -+#define MADW(acc, src1, src2) madd src1, src2; mflo acc -+ -+#else /* R4640 */ -+ -+#ifdef R4010 -+ -+#define MAD(src1, src2) madd src1, src2 -+#define MADW(acc, src1, src2) madd src1, src2; mflo acc -+ -+#else -+#define MAD(src1, src2) .set noat ;\ -+ mflo $at ;\ -+ sw $2, -4(sp) ;\ -+ multu src1, src2 ;\ -+ mflo $2 ;\ -+ addu $at, $2, $at ;\ -+ lw $2, -4(sp) ;\ -+ mtlo $at ;\ -+ .set at -+ -+#define MADW(acc, src1, src2) .set noat ;\ -+ mflo $at ;\ -+ sw $2, -4(sp) ;\ -+ multu src1, src2 ;\ -+ mflo $2 ;\ -+ addu $at, $2, $at ;\ -+ lw $2, -4(sp) ;\ -+ move acc, $at ;\ -+ mtlo $at ;\ -+ .set at -+#endif /* R4010 */ -+#endif /* R4102 */ -+#endif /* R4640 */ -+ -+#define Mult(dst, src1, src2) mul dst, src1, src2 -+#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst -+ -+#endif /* !3900 */ -+#endif /* DINO */ -+ -+ -+ -+ -+ -+ -+ -+ -+#endif /* _MIPS_ASM_H_ */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MiscUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MiscUtil.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MiscUtil.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/MiscUtil.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,65 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * MiscUtil.h -- Miscellaneous utilities -+ * -+ * Description: -+ * -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg Haixiang Liang -+ * -+ * $Revision: 1.4 $ -+ * -+ * $Id: MiscUtil.h,v 1.4 2004/04/13 00:21:46 ilyas Exp $ -+ * -+ * $Log: MiscUtil.h,v $ -+ * Revision 1.4 2004/04/13 00:21:46 ilyas -+ * Added standard header for shared ADSL driver files -+ * -+ * Revision 1.3 2001/07/21 01:21:06 ilyas -+ * Added more functions for int to string conversion used by log file -+ * -+ * Revision 1.2 1999/08/05 19:42:56 liang -+ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. -+ * -+ * Revision 1.1 1999/01/27 22:10:12 liang -+ * Initial version. -+ * -+ * Revision 1.1 1997/07/10 01:18:45 mwg -+ * Initial revision. -+ * -+ * -+ * -+ *****************************************************************************/ -+#ifndef _MISC_UTIL_H_ -+#define _MISC_UTIL_H_ -+ -+extern long SM_DECL GetRateValue(dataRateMap rate); -+extern int SM_DECL DecToString(ulong value, uchar *dstPtr, uint nDigits); -+extern int SM_DECL HexToString(ulong value, uchar *dstPtr, uint nDigits); -+extern char * SM_DECL DecToStr(char *s, ulong num); -+extern char * SM_DECL SignedToStr(char *s, long num); -+extern char * SM_DECL HexToStr(char *s, ulong num); -+ -+#define EvenParityBit(x) ((z = (y = x ^ (x >> 4)) ^ (y >> 2)) ^ (z >> 1)) -+#define OddParityBit(x) (EvenParityBit(x) ^ 1) -+ -+extern void ParityApply(int nBytes, int nDataBits, int parity, uchar *srcPtr, uchar *dstPtr); -+extern void ParityStrip(int nBytes, int nDataBits, int parity, uchar *srcPtr, uchar *dstPtr, statusHandlerType statusHandler); -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Que.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Que.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Que.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/Que.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,106 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * Que.h -+ * -+ * Description: -+ * Definition and implementation (via macros and inline functions) -+ * of a simple queue -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ *****************************************************************************/ -+ -+#ifndef QueHeader_H_ -+#define QueHeader_H_ -+ -+typedef void * _QueItem; -+ -+typedef struct _QueHeader -+ { -+ _QueItem *head; /* first item in the queue */ -+ _QueItem *tail; /* last item in the queue */ -+ } QueHeader; -+ -+/* Queue management macros */ -+ -+#define QueInit(pqHdr) (((QueHeader *)(pqHdr))->head = ((QueHeader *)(pqHdr))->tail = NULL) -+#define QueEmpty(pqHdr) (NULL == ((QueHeader *)(pqHdr))->head) -+ -+#define QueFirst(pqHdr) ((QueHeader *)(pqHdr))->head -+#define QueLast(pqHdr) ((QueHeader *)(pqHdr))->tail -+#define QueNext(pqItem) (*((void **)(pqItem))) -+ -+ -+#define QueRemoveFirst(pqHdr) do { \ -+ if (!QueEmpty(pqHdr)) { \ -+ ((QueHeader *)(pqHdr))->head = *((QueHeader *)(pqHdr))->head; \ -+ if (QueEmpty(pqHdr)) \ -+ ((QueHeader *)(pqHdr))->tail = NULL; \ -+ } \ -+} while (0) -+#define QueRemove(pqHdr) QueRemoveFirst(pqHdr) -+ -+ -+#define QueAddLast(pqHdr,pqItem) do { \ -+ QueNext(pqItem) = NULL; \ -+ if (NULL != ((QueHeader *)(pqHdr))->tail) \ -+ *((QueHeader *)(pqHdr))->tail = (pqItem); \ -+ else \ -+ ((QueHeader *)(pqHdr))->head = (_QueItem *)(pqItem); \ -+ ((QueHeader *)(pqHdr))->tail = (_QueItem *)(pqItem); \ -+} while (0) -+#define QueAdd(pqHdr,pItem) QueAddLast(pqHdr,pItem) -+ -+#define QueAddFirst(pqHdr,pqItem) do { \ -+ if (NULL == ((QueHeader *)(pqHdr))->tail) \ -+ ((QueHeader *)(pqHdr))->tail = (_QueItem *)(pqItem); \ -+ QueNext(pqItem) = ((QueHeader *)(pqHdr))->head; \ -+ ((QueHeader *)(pqHdr))->head = (_QueItem *)(pqItem); \ -+} while (0) -+ -+ -+#define QueGet(pqHdr) \ -+ (void *) QueFirst(pqHdr); \ -+ QueRemove(pqHdr); -+ -+#define QueMerge(pqHdr1,pqHdr2) do { \ -+ if (NULL == ((QueHeader *)(pqHdr1))->tail) \ -+ ((QueHeader *)(pqHdr1))->head = ((QueHeader *)(pqHdr2))->head; \ -+ else \ -+ QueNext(((QueHeader *)(pqHdr1))->tail) = ((QueHeader *)(pqHdr2))->head; \ -+ if (NULL != ((QueHeader *)(pqHdr2))->tail) \ -+ ((QueHeader *)(pqHdr1))->tail = ((QueHeader *)(pqHdr2))->tail; \ -+} while (0) -+ -+#define QueCopy(pqHdr1,pqHdr2) do { \ -+ ((QueHeader *)(pqHdr1))->head = ((QueHeader *)(pqHdr2))->head; \ -+ ((QueHeader *)(pqHdr1))->tail = ((QueHeader *)(pqHdr2))->tail; \ -+} while (0) -+ -+#define QueForEach(pqHdr,f,ref) do { \ -+ _QueItem *p = ((QueHeader *)(pqHdr))->head; \ -+ \ -+ while (NULL != p) { \ -+ if ( (f)((void *)p, ref) ) break; \ -+ p = QueNext(p); \ -+ } \ -+} while (0) -+ -+#endif /* QueHeader_H_ */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftAtmVc.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftAtmVc.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftAtmVc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftAtmVc.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,569 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * SoftAtmVc.h -+ * -+ * Description: -+ * This file contains ATM VC definitions -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.27 $ -+ * -+ * $Id: SoftAtmVc.h,v 1.27 2004/06/02 22:26:17 ilyas Exp $ -+ * -+ * $Log: SoftAtmVc.h,v $ -+ * Revision 1.27 2004/06/02 22:26:17 ilyas -+ * Added ATM counters for G.992.3 -+ * -+ * Revision 1.26 2004/03/10 22:57:20 ilyas -+ * Added I.432 scramling control -+ * -+ * Revision 1.25 2003/09/23 00:21:59 ilyas -+ * Added status to indicate ATM header compression -+ * -+ * Revision 1.24 2003/08/27 02:00:50 ilyas -+ * Original implementation of ATM header compression -+ * -+ * Revision 1.23 2003/02/25 04:13:15 ilyas -+ * Added standard Broadcom header -+ * -+ * Revision 1.22 2003/01/10 23:25:48 ilyas -+ * Added ATM status definition -+ * -+ * Revision 1.21 2002/09/12 21:07:19 ilyas -+ * Added HEC, OCD and LCD counters -+ * -+ * Revision 1.20 2002/04/02 09:58:00 ilyas -+ * Initial implementatoin of BERT -+ * -+ * Revision 1.19 2001/10/09 22:35:14 ilyas -+ * Added more ATM statistics and OAM support -+ * -+ * Revision 1.18 2001/06/18 19:49:36 ilyas -+ * Changes to include support for HOST_ONLY mode -+ * -+ * Revision 1.17 2001/02/23 05:49:57 ilyas -+ * Added routed 1483 encapsulation -+ * -+ * Revision 1.16 2001/02/09 04:18:18 ilyas -+ * Added framer for bridged ethernet PDUs -+ * -+ * Revision 1.15 2001/02/09 01:55:27 ilyas -+ * Added status codes and macros to support printing of AAL packets -+ * -+ * Revision 1.14 2000/09/21 17:28:35 ilyas -+ * Added VBR support to traffic management code, separated UBR to a different -+ * Tx list, changed some of the algorithms -+ * -+ * Revision 1.13 2000/08/23 18:42:13 ilyas -+ * Added AAL2, added VcConfigure functions, moved commonly used look-up -+ * tables for CRC calculation to AtmLayer -+ * -+ * Revision 1.12 2000/08/02 03:06:22 ilyas -+ * Added support for reserving space in RX packets for ATm protocols -+ * -+ * Revision 1.11 2000/07/28 17:23:39 ilyas -+ * Added ATM connect/disconnect statuses -+ * -+ * Revision 1.10 2000/07/25 02:16:12 ilyas -+ * Added EClip (with Eth to ATM ARP translation) implementation -+ * -+ * Revision 1.9 2000/07/23 20:57:14 ilyas -+ * Added ATM framer and protocol layers -+ * -+ * Revision 1.8 2000/07/17 21:08:16 lkaplan -+ * removed global pointer -+ * -+ * Revision 1.7 2000/06/09 18:33:04 liang -+ * Fixed Irix compiler warnings. -+ * -+ * Revision 1.6 2000/05/18 21:47:31 ilyas -+ * Added detection of preassigned cells such as OAM F4, F5 -+ * -+ * Revision 1.5 2000/05/14 01:50:11 ilyas -+ * Added more statuses to ATM code -+ * -+ * Revision 1.4 2000/05/10 02:41:28 liang -+ * Added status report for no cell memory -+ * -+ * Revision 1.3 2000/05/09 23:00:27 ilyas -+ * Added ATM status messages, ATM timer, Tx frames flush on timeout -+ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames -+ * -+ * Revision 1.2 2000/05/03 03:53:00 ilyas -+ * Added support for pVc to vcID translation needed for LOG file and other -+ * definitions for ATM data in LOG file -+ * -+ * Revision 1.1 2000/04/19 00:21:35 ilyas -+ * Fixed some problems and added Out Of Band (OOB) support to ATM packets -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef SoftAtmVcHeader -+#define SoftAtmVcHeader -+ -+/* -+** -+** ATM UNI types -+** -+*/ -+ -+#define AtmLinkFlags(bMap,name) (((bMap) >> name##Shift) & name##Mask) -+ -+/* ATM service category types */ -+ -+#define kAtmSrvcCBR 1 /* Constant Bit Rate */ -+#define kAtmSrvcVBR 2 /* Variable Bit Rate */ -+#define kAtmSrvcUBR 4 /* Unspecified Bit Rate */ -+#define kAtmSrvcABR 8 /* Available Bit Rate */ -+#define kAtmSrvcUnknown 0xFF -+ -+/* ATM AAL types (as encoded at UNI) */ -+ -+#define kAtmAalIE 0x58 -+ -+#define kAtmRaw 0 -+#define kAtmAal1 1 -+#define kAtmAal2 2 -+#define kAtmAal34 3 -+#define kAtmAal5 5 -+#define kAtmAalUser 16 -+#define kAtmAalUnknown 0xFF -+ -+/* ATM AAL1 parameters */ -+ -+#define kAal1SubTypeId 0x85 -+ -+#define kAal1TransportShift 0 -+#define kAal1TransportMask 0x7 -+ -+#define kAal1NullTransport 0 -+#define kAal1VoiceTransport 1 -+#define kAal1CircuitTransport 2 -+#define kAal1AudioTransport 4 -+#define kAal1VideoTransport 5 -+ -+ -+#define kAal1CBRId 0x86 -+ -+#define kAal1CBRShift 24 -+#define kAal1CBRMask 0xFF -+ -+#define kAal1CBR64 1 -+#define kAal1CBR1544 4 /* DS1 */ -+#define kAal1CBR6312 5 /* DS2 */ -+#define kAal1CBR32064 6 -+#define kAal1CBR44736 7 /* DS3 */ -+#define kAal1CBR97728 8 -+#define kAal1CBR2048 0x10 /* E1 */ -+#define kAal1CBR8448 0x11 /* E2 */ -+#define kAal1CBR34368 0x12 /* E3 */ -+#define kAal1CBR139264 0x13 -+#define kAal1CBR64xN 0x40 -+#define kAal1CBR8xN 0x41 -+ -+ -+#define kAal1MultiplierId 0x87 -+ -+#define kAal1ClockRecoveryId 0x88 -+ -+#define kAal1ClockRecoveryShift 3 -+#define kAal1ClockRecoveryMask 0x3 -+ -+#define kAal1ClockRecoveryNull 1 /* synchronous transport */ -+#define kAal1ClockRecoverySRTS 1 /* asynchronous transport */ -+#define kAal1ClockRecoveryAdaptive 2 -+ -+ -+#define kAal1ECMId 0x89 /* Error correction method */ -+ -+#define kAal1ECMShift (kAal1ClockRecoveryShift + 2) -+#define kAal1ECMMask 0x3 -+ -+#define kAal1ECMNull 0 -+#define kAal1ECMLossSensitive 1 -+#define kAal1ECMDelaySensitive 2 -+ -+ -+#define kAal1SDTBlockSizeId 0x8A -+ -+#define kAal1CellFillId 0x8B -+ -+/* ATM AAL34 and AAL5 parameters */ -+ -+#define kAalFwdMaxSDUSizeId 0x8C -+#define kAalBacMaxkSDUSizeId 0x81 -+ -+#define kAal34MidRangeId 0x82 -+ -+#define kAalSSCSTypeId 0x84 -+ -+#define kAalSSCSAssured 1 -+#define kAalSSCSNonAssured 2 -+#define kAalSSCSFrameRelay 4 -+ -+/* ATM AAL2 parameters */ -+ -+#define kAal2SSNone 0 -+#define kAal2SSSAR 1 -+#define kAal2SSTED 2 -+#define kAal2SSSARMask 3 -+#define kAal2SSType1 4 -+#define kAal2SSType3 5 -+ -+typedef struct { -+ uchar aalType; -+ union { -+ struct { -+ bitMap aal1Flags; -+ ulong cbrRate; -+ ushort blkSize; -+ uchar sarUsed; -+ } aal1Params; -+ struct { -+ ushort fwdMaxCpSize; /* Max "common part" packet size */ -+ ushort backMaxCpSize; -+ ushort cidLow; -+ ushort cidHigh; -+ ushort fwdMaxSsSize; /* Max "service specific" packet size */ -+ ushort backMaxSsSize; -+ uchar sscsType; -+ } aal2Params; -+ struct { -+ ushort fwdMaxSDUSize; -+ ushort backMaxSDUSize; -+ ushort midLow; -+ ushort midHigh; -+ uchar sscsType; -+ } aal34Params; -+ struct { -+ ushort fwdMaxSDUSize; -+ ushort backMaxSDUSize; -+ uchar sscsType; -+ } aal5Params; -+ } param; -+} atmAalParams; -+ -+/* ATM Traffic Descriptor types (as encoded at UNI) */ -+ -+#define kAtmTrafficIE 0x59 -+ -+#define kTrafficFwdPeakCellRateId0 0x82 -+#define kTrafficBackPeakCellRateId0 0x83 -+#define kTrafficFwdPeakCellRateId 0x84 -+#define kTrafficBackPeakCellRateId 0x85 -+ -+#define kTrafficFwdSustainCellRateId0 0x88 -+#define kTrafficBackSustainCellRateId0 0x89 -+#define kTrafficFwdSustainCellRateId 0x90 -+#define kTrafficBackSustainCellRateId 0x91 -+ -+#define kTrafficFwdMaxBurstSizeId0 0xA0 -+#define kTrafficBackMaxBurstSizeId0 0xA1 -+#define kTrafficFwdMaxBurstSizeId 0xB0 -+#define kTrafficBackMaxBurstSizeId 0xB1 -+ -+#define kTrafficBestEffortId 0xBE -+#define kTrafficMgrOptionsId 0xBF -+ -+#define kTrafficMaxTolerance 0x7FFFFFFF -+ -+/* trafficFlags coding */ -+ -+#define kTrafficTagFwd 1 -+#define kTrafficTagBack 2 -+#define kTrafficBestEffort 4 -+ -+typedef struct { -+ ulong tPCR0; /* CLP = 0, time between cells in us */ -+ ulong tPCR; /* CLP = 0+1 */ -+ ulong tolPCR; /* tolerance for PCR in us */ -+ -+ ulong tSCR0; /* CLP = 0 */ -+ ulong tSCR; /* CLP = 0+1 */ -+ ulong tolSCR; /* tolerance for SCR in us */ -+ -+ uchar atmServiceType; /* CBR, VBR, UBR, etc. */ -+ uchar trafficFlags; -+} atmTrafficParams; -+ -+/* ATM Broadband Bearer Capabilty (BBC) types (as encoded at UNI) */ -+ -+#define kAtmBBCIE 0x5E -+ -+#define kBBCClassShift 0 -+#define kBBCClassMask 0x1F -+ -+#define kBBCClassA 0x1 -+#define kBBCClassC 0x3 -+#define kBBCClassX 0x10 -+ -+ -+#define kBBCTrafficShift (kBBCClassShift + 5) -+#define kBBCTrafficMask 0x7 -+ -+#define kBBCTrafficNull 0 -+#define kBBCTrafficCBR 1 -+#define kBBCTrafficVBR 2 -+ -+ -+#define kBBCTimingShift (kBBCTrafficShift + 3) -+#define kBBCTimingMask 0x3 -+ -+#define kBBCTimingNull 0 -+#define kBBCTimingRequired 1 -+#define kBBCTimingNotRequired 2 -+ -+ -+#define kBBCClippingShift (kBBCTimingShift + 2) -+#define kBBCClippingMask 0x3 -+ -+#define kBBCNoClipping 0 -+#define kBBCClippingOk 1 -+ -+#define kBBCConnectionShift (kBBCClippingShift + 2) -+#define kBBCConnectionMask 0x3 -+ -+#define kBBCPoint2Point 0 -+#define kBBCPoint2MPoint 1 -+ -+/* ATM Broadband High/Low Layer Information (BHLI/BLLI) types (as encoded at UNI) */ -+ -+#define kAtmBHLIIE 0x5D -+#define kAtmBLLIIE 0x5F -+ -+/* ATM QoS types (as encoded at UNI) */ -+ -+#define kAtmQoSIE 0x5C -+ -+#define kQoSNull 0 -+#define kQoSClass1 1 -+#define kQoSClass2 2 -+#define kQoSClass3 3 -+#define kQoSClass4 4 -+#define kQoSReserved 0xFF -+ -+typedef struct { -+ uchar fwdQoSClass; -+ uchar backQoSClass; -+} atmQoSParams; -+ -+/* ATM MID definitions (ConfigureHandler) */ -+ -+#define kAtmMidEntireVc ((ulong) -1) -+ -+typedef struct { -+ void *pUserVc; /* VC id from the caller: has to be 1st !!! */ -+ ulong vci; -+ uchar defaultCLP; /* default CLP for tx packets on this VC */ -+ uchar framerId; -+ uchar protoId; -+ uchar protoRxBytesReserved; /* # bytes reserved by protocol in the beginning of Rx packet */ -+ uchar protoTxBytesReserved; /* # bytes reserved by protocol in the beginning of Tx packet */ -+ -+ atmAalParams aalParams; -+ atmTrafficParams rxTrafficParams; -+ atmTrafficParams txTrafficParams; -+ bitMap bbcFlags; -+ atmQoSParams qosParams; -+} atmVcParams; -+ -+/* -+** -+** ATM Out of Band (OOB) packet information -+** -+*/ -+ -+typedef struct { -+ Boolean clp; /* Cell Loss Prioroty */ -+ uchar aalType; -+ union { -+ struct { -+ uchar payloadType; -+ } aalRawParams; -+ struct { -+ uchar payloadType; -+ ushort mid; -+ } aal34Params; -+ struct { -+ uchar uui; /* Uses to user indicator */ -+ uchar cpi; /* common part indicator */ -+ } aal5Params; -+ } aalParam; -+} atmOobPacketInfo; -+ -+/* -+** -+** ATM setup bit definition -+** -+*/ -+ -+#define kAtmCorrectHecErrors 1 -+#define kCorrectHecErrors kAtmCorrectHecErrors -+#define kAtmPhyHeaderCompression 2 -+#define kAtmPhyNoDataScrambling 4 -+ -+#define kAtmTxIdleTimeoutMask 0x6 -+#define kAtmTxIdleNoTimeout 0 -+#define kAtmTxIdleTimeout10s 2 -+#define kAtmTxIdleTimeout30s 4 -+#define kAtmTxIdleTimeout60s 6 -+ -+/* -+** -+** ATM framer modes and protocol definitions -+** -+*/ -+ -+#define kAtmFramerNone 0 -+#define kAtmFramerISO 1 -+#define kAtmFramerIP 2 -+#define kAtmFramerEth 3 -+#define kAtmFramerEthWithCRC 4 -+ -+#define kAtmProtoNone 0 -+#define kAtmProtoEClip 1 -+#define kAtmProtoERouted1483 2 -+#define kAtmProtoPPP 3 -+ -+ -+/* -+** -+** ATM status codes -+** -+*/ -+ -+typedef void (*atmStatusHandler) (void *gDslVars, ulong statusCode, ...); -+ -+/* physical layer I.432 */ -+ -+#define kAtmStatRxHunt 1 -+#define kAtmStatRxPreSync 2 -+#define kAtmStatRxSync 3 -+#define kAtmStatRxPlOamCell 4 -+#define kAtmStatBertResult 5 -+#define kAtmStatHec 6 -+#define kAtmStatHdrCompr 7 -+#define kAtmStatCounters 8 -+ -+/* ATM layer */ -+ -+#define kAtmLayerStatFirst 100 -+#define kAtmStatRxDiscarded 100 -+#define kAtmStatTxDelayed 101 -+ -+#define kAtmStatVcCreated 102 -+#define kAtmStatVcStarted 103 -+#define kAtmStatVcStopped 104 -+#define kAtmStatVcDeleted 105 -+ -+#define kAtmStatTimeout 106 -+#define kAtmStatNoCellMemory 107 -+#define kAtmStatPrintCell 108 -+#define kAtmStatInvalidCell 109 -+#define kAtmStatUnassignedCell 110 -+#define kAtmStatOamF4SegmentCell 111 -+#define kAtmStatOamF4End2EndCell 112 -+#define kAtmStatOamI371Cell 113 -+#define kAtmStatOamF5SegmentCell 114 -+#define kAtmStatOamF5End2EndCell 115 -+#define kAtmStatReservedCell 116 -+ -+#define kAtmStatConnected 117 -+#define kAtmStatDisconnected 118 -+ -+#define kAtmStatRxPacket 119 -+#define kAtmStatTxPacket 120 -+ -+#define kAtmStatOamLoopback 121 -+ -+ -+typedef struct _atmPhyCounters { -+ ushort id; -+ ushort bertStatus; -+ ulong bertCellTotal; -+ ulong bertCellCnt; -+ ulong bertBitErrors; -+ -+ ulong rxHecCnt; -+ ulong rxCellTotal; -+ ulong rxCellData; -+ ulong rxCellDrop; -+} atmPhyCounters; -+ -+/* AAL layer */ -+ -+ -+ -+/* -+** -+** ATM log file definitions -+** -+*/ -+ -+/* ATM log file flags */ -+ -+#define kAtmLogFrameFlagMask 3 /* mask */ -+ -+#define kAtmLogFrameFlagNone 0 /* nothing */ -+#define kAtmLogFrameFlagNoData 1 /* no data only frame size */ -+#define kAtmLogFrameFlagBinData 2 /* data in binary form */ -+#define kAtmLogFrameFlagTextData 3 /* data in text form */ -+ -+#define kAtmLogSendFrameShift 0 -+#define kAtmLogSendFrameNoData (kAtmLogFrameFlagNoData << kAtmLogSendFrameShift) -+#define kAtmLogSendFrameBinData (kAtmLogFrameFlagBinData << kAtmLogSendFrameShift) -+#define kAtmLogSendFrameTextData (kAtmLogFrameFlagTextData << kAtmLogSendFrameShift) -+ -+#define kAtmLogRcvFrameShift 2 -+#define kAtmLogRcvFrameNone (kAtmLogFrameFlagNone << kAtmLogRcvFrameShift) -+#define kAtmLogRcvFrameNoData (kAtmLogFrameFlagNoData << kAtmLogRcvFrameShift) -+#define kAtmLogRcvFrameBinData (kAtmLogFrameFlagBinData << kAtmLogRcvFrameShift) -+#define kAtmLogRcvFrameTextData (kAtmLogFrameFlagTextData << kAtmLogRcvFrameShift) -+ -+#define kAtmLogSendCompleteFrameShift 4 -+#define kAtmLogSendCompleteFrameNone (kAtmLogFrameFlagNone << kAtmLogSendCompleteFrameShift) -+#define kAtmLogSendCompleteFrameNoData (kAtmLogFrameFlagNoData << kAtmLogSendCompleteFrameShift) -+ -+#define kAtmLogReturnFrameShift 6 -+#define kAtmLogReturnFrameNoData (kAtmLogFrameFlagNoData << kAtmLogReturnFrameShift) -+ -+#define kAtmLogCellFlag (1 << 8) -+ -+/* ATM log codes */ -+ -+#define kAtmLogSendFrame 1 -+#define kAtmLogRcvFrame 2 -+#define kAtmLogSendFrameComplete 3 -+#define kAtmLogReturnFrame 4 -+#define kAtmLogVcAllocate 5 -+#define kAtmLogVcFree 6 -+#define kAtmLogVcActivate 7 -+#define kAtmLogVcDeactivate 8 -+#define kAtmLogTimer 9 -+#define kAtmLogCell 10 -+#define kAtmLogVcConfigure 11 -+ -+#define kAtmLogRxCellHeader 12 -+#define kAtmLogRxCellData 13 -+#define kAtmLogTxCell 14 -+ -+#endif /* SoftAtmVcHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.gh ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.gh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.gh 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,675 @@ -+/**************************************************************************** -+ * -+ * SoftDsl.gh -+ * -+ * Description: -+ * This is a header file which defines the type for the DSL -+ * global variable structure. -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.72 $ -+ * -+ * $Id: SoftDsl.gh,v 1.72 2004/04/30 23:05:19 kdu Exp $ -+ * -+ * $Log: SoftDsl.gh,v $ -+ * Revision 1.72 2004/04/30 23:05:19 kdu -+ * Fixed interop issues in TDC lab for TMM. -+ * -+ * Revision 1.70 2004/04/10 23:30:48 ilyas -+ * Defined gloval structure for slow (SDRAM) data -+ * -+ * Revision 1.69 2004/04/02 18:33:45 gsyu -+ * Share MuxFramer buffers with scratch memory -+ * -+ * Revision 1.68 2004/02/04 20:12:38 linyin -+ * Support adsl2plus -+ * -+ * Revision 1.67 2004/02/03 19:10:37 gsyu -+ * Added separated carrierInfo structures for G992P5 -+ * -+ * Revision 1.66 2004/01/26 04:21:06 yongbing -+ * Merge changes in ADSL2 branch into Annex A branch -+ * -+ * Revision 1.65 2004/01/13 19:12:07 gsyu -+ * Added two more variables for Double upstream -+ * -+ * Revision 1.64 2003/12/04 02:10:37 linyin -+ * Add a variable for FbmsOL mode -+ * -+ * Revision 1.63 2003/11/20 00:57:50 yongbing -+ * Merge ADSL2 functionalities into Annex A branch -+ * -+ * Revision 1.62 2003/11/05 01:59:12 liang -+ * Add vendor ID code for Infineon. -+ * -+ * Revision 1.61 2003/08/12 22:59:41 khp -+ * - for Haixiang: added support for ADSL_MARGIN_TWEAK_TEST -+ * -+ * Revision 1.60 2003/08/01 00:08:19 liang -+ * Added firmware ID for Samsung ADI 930 DSLAM. -+ * -+ * Revision 1.59 2003/07/14 14:40:08 khp -+ * - AnnexB: added bad SNR2 retrain counter to connectin setup -+ * -+ * Revision 1.58 2003/06/25 02:40:22 liang -+ * Added firmware ID for Annex A UE9000 ADI918 (from Aliant, Canada). -+ * -+ * Revision 1.57 2003/06/25 00:00:40 ilyas -+ * -added firmware IDs for TI 4000C and AC5 (Annex B) -+ * -+ * Revision 1.56 2003/05/31 01:50:38 khp -+ * -add firmware IDs for ECI16 and ECI16A -+ * -+ * Revision 1.55 2003/03/27 19:30:52 liang -+ * Add and initialize new connectionSetup field coVendorFirmwareID under module ADSL_IDENTIFY_VENDOR_FIRMWARE. -+ * -+ * Revision 1.54 2002/12/13 18:35:48 yongbing -+ * Add support for G.992.2 Annex C in start up -+ * -+ * Revision 1.53 2002/12/06 02:06:33 liang -+ * Moved the T1.413 RAck1/RAck2 switching variables to connection setup structure. -+ * -+ * Revision 1.52 2002/11/26 02:49:46 liang -+ * Added variable codingGainDecrement to the connectionSetup structure to solve the C-Rates-RA option failure problem. -+ * -+ * Revision 1.51 2002/10/20 18:56:16 khp -+ * - for linyin: -+ * - #ifdef NEC_NSIF_WORKAROUND: -+ * - add status and fail counter for NSIF -+ * -+ * Revision 1.50 2002/09/28 02:36:50 yongbing -+ * Add retrain in T1.413 with R-Ack1 tone -+ * -+ * Revision 1.49 2002/09/12 21:07:19 ilyas -+ * Added HEC, OCD and LCD counters -+ * -+ * Revision 1.48 2002/07/19 01:51:35 liang -+ * Added vendor ID constant for Alcatel. -+ * -+ * Revision 1.47 2002/06/27 21:51:08 liang -+ * Added xmt and rcv tone selection bitmap in connection setup. -+ * -+ * Revision 1.46 2002/06/11 20:48:06 liang -+ * Added CO vendor ID field to connectionSetup structure. -+ * -+ * Revision 1.45 2002/06/06 03:05:43 khp -+ * -use boolean in connectup setup instead of localCapabilities.features to indicate FBM mode -+ * -+ * Revision 1.44 2002/03/22 19:38:58 yongbing -+ * Modify for co-exist of G994P1 and T1P413 -+ * -+ * Revision 1.43 2002/03/02 00:52:40 ilyas -+ * AnnexC delay needs to be long for prototype -+ * -+ * Revision 1.42 2002/01/19 23:59:17 ilyas -+ * Added support for LOG and eye data to ADSL core target -+ * -+ * Revision 1.41 2002/01/16 19:03:59 ilyas -+ * Added HOST_ONLY ifdefs around ADSL core data -+ * -+ * Revision 1.40 2002/01/14 17:41:04 liang -+ * Move xmt & rcv sample buffers to top level. -+ * -+ * Revision 1.39 2001/12/21 22:45:34 ilyas -+ * Added support for ADSL MIB data object -+ * -+ * Revision 1.38 2001/12/13 02:24:22 ilyas -+ * Added G997 (Clear EOC and G997 framer) support -+ * -+ * Revision 1.37 2001/11/30 05:56:31 liang -+ * Merged top of the branch AnnexBDevelopment onto top of the tree. -+ * -+ * Revision 1.36 2001/10/19 00:12:07 ilyas -+ * Added support for frame oriented (no ATM) data link layer -+ * -+ * Revision 1.29.2.5 2001/10/03 01:44:00 liang -+ * Merged with codes from main tree (tag SoftDsl_2_18). -+ * -+ * Revision 1.29.2.4 2001/08/18 00:00:36 georgep -+ * Add variable to store annexC pathDelay -+ * -+ * Revision 1.29.2.3 2001/08/08 17:33:27 yongbing -+ * Merge with tag SoftDsl_2_17 -+ * -+ * Revision 1.35 2001/08/29 02:56:01 ilyas -+ * Added tests for flattening/unflatenning command and statuses (dual mode) -+ * -+ * Revision 1.34 2001/08/28 03:26:32 ilyas -+ * Added support for running host and adsl core parts separately ("dual" mode) -+ * -+ * Revision 1.33 2001/06/18 19:49:36 ilyas -+ * Changes to include support for HOST_ONLY mode -+ * -+ * Revision 1.32 2001/05/18 21:21:44 liang -+ * Save the current number of rcv samples to line handler for QProc test. -+ * -+ * Revision 1.31 2001/04/25 01:20:11 ilyas -+ * -+ * Don't use DSL frame functions if ATM_LAYER is not defined -+ * -+ * Revision 1.30 2001/03/25 06:11:20 liang -+ * Combined separate loop attenuation status for ATUR & ATUC into one status. -+ * Replace separate hardware AGC info status for ATUR & ATUC into hardware AGC -+ * request status and hardware AGC obtained status. -+ * Use store AGC command to save hardware AGC value instead of returning value -+ * from status report. -+ * -+ * Revision 1.29 2001/03/17 03:00:46 georgep -+ * Added agcInfo to connectionSetupStruct -+ * -+ * Revision 1.28 2001/02/10 03:03:09 ilyas -+ * Added one more DslFrame function -+ * -+ * Revision 1.27 2000/08/31 19:04:24 liang -+ * Added scratch buffer structure definition. -+ * -+ * Revision 1.26 2000/07/23 20:52:52 ilyas -+ * Added xxxFrameBufSetAddress() function for ATM framer layers -+ * Rearranged linkLayer functions in one structure which is passed as a -+ * parameter to xxxLinkLayerInit() function to be set there -+ * -+ * Revision 1.25 2000/07/18 21:42:25 ilyas -+ * Fixed compiler warning about pointer casting -+ * -+ * Revision 1.24 2000/07/18 21:18:45 ilyas -+ * Added GLOBAL_PTR_BIAS feature to utilize full 64K MIPS relative addressing space -+ * -+ * Revision 1.23 2000/07/18 20:03:24 ilyas -+ * Changed DslFrame functions definitions to macros, -+ * Removed gDslVars from their parameter list -+ * -+ * Revision 1.22 2000/07/17 21:08:15 lkaplan -+ * removed global pointer -+ * -+ * Revision 1.21 2000/05/09 23:00:26 ilyas -+ * Added ATM status messages, ATM timer, Tx frames flush on timeout -+ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames -+ * -+ * Revision 1.20 2000/05/03 03:57:04 ilyas -+ * Added LOG file support for writing ATM data -+ * -+ * Revision 1.19 2000/04/19 00:31:47 ilyas -+ * Added global SoftDsl functions for Vc, added OOB info functions -+ * -+ * Revision 1.18 2000/04/13 08:36:22 yura -+ * Added SoftDslSetRefData, SoftDslGetRefData functions -+ * -+ * Revision 1.17 2000/04/13 05:38:54 georgep -+ * Added T1p413 "Activation and Acknowledgement" which can substitute G994P1 -+ * -+ * Revision 1.16 2000/04/05 22:30:42 liang -+ * Changed function & constant names from G992p2 to G992 for the Main module. -+ * -+ * Revision 1.15 2000/04/04 04:16:06 liang -+ * Merged with SoftDsl_0_03 from old tree. -+ * -+ * Revision 1.15 2000/04/04 01:47:21 ilyas -+ * Implemented abstract dslFrame and dslFrameBuffer objects -+ * -+ * Revision 1.14 2000/04/01 02:53:33 georgep -+ * Added pointer to G992p2Profile inside connectionSetup -+ * -+ * Revision 1.13 2000/03/18 01:27:56 georgep -+ * Changed connectionSetup to include G992p1 Capabilities -+ * -+ * Revision 1.12 2000/02/29 01:39:05 georgep -+ * put variable haveRemoteCapabilities inside connectionSetupStruct -+ * -+ * Revision 1.11 2000/02/08 00:44:36 liang -+ * Fix the gDslVars definition for Irix environment. -+ * -+ * Revision 1.10 1999/11/19 00:59:29 george -+ * Define physicalLayerVars as a union -+ * -+ * Revision 1.9 1999/11/11 19:19:42 george -+ * Porting to 16Bit Compiler -+ * -+ * Revision 1.8 1999/11/09 20:26:17 george -+ * Added G992P2_PROFILE to modules list -+ * -+ * Revision 1.7 1999/10/27 23:01:54 wan -+ * Add G.994.1 setup in dslConnectionSetupStruct for setting up Initiation side -+ * -+ * Revision 1.6 1999/08/12 21:16:27 george -+ * Move profileVars definition to G992p2/G992p2Profile.gh -+ * -+ * Revision 1.5 1999/08/10 18:20:43 george -+ * Define fastRetrainVars -+ * -+ * Revision 1.4 1999/07/16 02:03:02 liang -+ * Added Tx & Rx data handler function pointers. -+ * -+ * Revision 1.3 1999/07/03 01:40:15 liang -+ * Redefined dsl command parameter list and added connection setup struct. -+ * -+ * Revision 1.2 1999/02/10 01:56:37 liang -+ * Added hooks for G994.1 and G992.2. -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef SoftDslGlobals -+#define SoftDslGlobals -+ -+#include "SoftDsl.h" -+ -+#ifdef G992P2_PROFILE -+#include "G992p2Profile.gh" -+#endif -+ -+typedef enum -+ { -+ kVendorUnknown = 0, -+ kVendorBroadcom, -+ kVendorGlobespan, -+ kVendorADI, -+ kVendorTI, -+ kVendorCentillium, -+ kVendorAlcatel, -+ kVendorInfineon -+ } VendorIDType; -+ -+#define kDslVendorFirwareUnknown 0 -+typedef enum -+ { -+ kVendorADI_Anaconda = 1, -+ kVendorADI_ECI918, -+ kVendorADI_ECI930, -+ kVendorADI_Cisco, -+ kVendorADI_UE9000_918, -+ kVendorADI_Samsung_930, -+ kVendorTI_4000C_ERICSSON_350, -+ kVendorTI_4000C_SEIMENS, -+ kVendorADI_ECI16_AnnexB = 50, /* leave space for more Annex A types */ -+ kVendorADI_ECI16A_AnnexB, -+ kVendorTI_4000C_AnnexB, -+ kVendorTI_AC5_AnnexB -+ } VendorFirmwareIDType; -+ -+#define kDslXmtToneSelectionStartTone 0 -+#ifdef G992P1_ANNEX_B -+#define kDslXmtToneSelectionEndTone 63 -+#else -+#define kDslXmtToneSelectionEndTone 31 -+#endif -+#define kDslXmtToneSelectionNumOfTones (kDslXmtToneSelectionEndTone-kDslXmtToneSelectionStartTone+1) -+#define kDslXmtToneSelectionNumOfBytes ((kDslXmtToneSelectionNumOfTones+7)/8) -+#define kDslRcvToneSelectionStartTone 32 -+#define kDslRcvToneSelectionEndTone 255 -+#define kDslRcvToneSelectionNumOfTones (kDslRcvToneSelectionEndTone-kDslRcvToneSelectionStartTone+1) -+#define kDslRcvToneSelectionNumOfBytes ((kDslRcvToneSelectionNumOfTones+7)/8) -+ -+#define kDslT1p413RAckModeTryRAck1 0x01 -+#define kDslT1p413RAckModeTryRAck2 0x02 -+#define kDslT1p413RAckModeTrialMask 0x0F -+#define kDslT1p413RAckModeSelected 0x10 -+#define kDslT1p413RAckModeTrialCount 10 /* when in trial mode */ -+#define kDslT1p413RAckModeSwitchCount 20 /* when mode is selected */ -+ -+#ifdef ADSL_MARGIN_TWEAK_TEST -+#define kDslMarginTweakNumOfTones 256 -+#endif -+ -+typedef struct -+ { -+ Boolean haveRemoteCapabilities; -+ dslModulationType selectedModulation; -+ dslModulationType startupModulation; -+#if defined(G992P1_ANNEX_I) || defined(G992P5) -+ ushort downstreamMinCarr, downstreamMaxCarr; -+#else -+ uchar downstreamMinCarr, downstreamMaxCarr; -+#endif -+ uchar upstreamMinCarr, upstreamMaxCarr; -+#if defined(DOUBLE_UP_STREAM) -+ Boolean isDoubleUsEnabled; -+ short selectedPilotTone; -+#endif -+ dslDataPumpCapabilities localCapabilities, remoteCapabilities; -+#ifdef G992P3 -+ g992p3DataPumpCapabilities localCarrierInfoG992p3AnnexA; -+ g992p3DataPumpCapabilities remoteCarrierInfoG992p3AnnexA; -+ g992p3DataPumpCapabilities selectedCarrierInfoG992p3AnnexA; -+ uchar xmtG992p3State; -+#ifdef G992P5 -+ g992p3DataPumpCapabilities localCarrierInfoG992p5AnnexA; -+ g992p3DataPumpCapabilities remoteCarrierInfoG992p5AnnexA; -+ g992p3DataPumpCapabilities selectedCarrierInfoG992p5AnnexA; -+#endif /* G992P5 */ -+#endif /* G992P3 */ -+ uchar handshakingDuplexMode; -+ Boolean handshakingClientInitiation; -+ short handshakingXmtPowerLevel; -+ uchar handshakingXmtCarrierSet; -+ short hwAgcQ4dB; /* for loop attenuation calculation */ -+ uchar coVendorID; -+#ifdef ADSL_IDENTIFY_VENDOR_FIRMWARE -+ uchar coVendorFirmwareID; -+#endif -+ uchar codingGainDecrement; /* coding gain decrement in Q4dB for initial rate calculation */ -+ uchar xmtToneSelection[kDslXmtToneSelectionNumOfBytes]; -+ uchar rcvToneSelection[kDslRcvToneSelectionNumOfBytes]; -+#ifdef G992_ANNEXC -+ Boolean isFbmMode; -+ Boolean isFbmsOLMode; -+ long xmtToRcvPathDelay; -+#endif -+#if defined(T1P413) && defined(XMT_RACT2_FOR_ADI_COMPATIBILITY) -+ uchar t1p413RAckModeUsed; -+ uchar t1p413RAckModeCounter; -+#endif -+#ifdef G992P1_ANNEX_B -+ uchar badSNR2RetrainCounter; -+#endif -+#ifdef ADSL_MARGIN_TWEAK_TEST -+ short marginTweakExtraPowerQ4dB; -+ char marginTweakTableQ4dB[kDslMarginTweakNumOfTones]; -+#endif -+#ifdef G992P2_PROFILE -+ G992p2ProfileVarsStruct* profileVarsPtr; -+#endif -+#ifdef TDC_IOP_FIX_SEIMENS_TI -+ char t1p413RetrainCounter; /* 0: no retrain needed; 1: force to T1.413 mode and retrain after R-MSG1; 2: 2nd T1.413 session, go to showtime */ -+#endif -+#ifdef ANSI_CACT12_PING_PONG -+ char t1p413SkipToneIndex; /* to alternate between CAct1 and CAct2 detection */ -+#endif -+ } dslConnectionSetupStruct; -+ -+#ifdef ADSL_FRAMER -+#include "MuxFramer.gh" -+#endif -+ -+#ifdef ATM -+#include "SoftAtm.gh" -+#endif -+ -+#ifdef DSL_PACKET -+#include "DslPacket.gh" -+#endif -+ -+#ifdef G997_1_FRAMER -+#include "G997.gh" -+#ifdef G992P3 -+#include "G992p3OvhMsg.gh" -+#endif -+#endif -+ -+#ifdef ADSL_MIB -+#include "AdslMib.gh" -+#endif -+ -+#ifndef HOST_ONLY -+#ifdef T1P413 -+#include "T1p413Main.gh" -+#endif -+ -+#ifdef G994P1 -+#include "G994p1Main.gh" -+#endif -+ -+#ifdef G992 -+#include "G992Main.gh" -+#endif -+ -+#include "SoftDslSampleBuffers.gh" -+#endif -+ -+typedef struct __dslSlowVarsStruct -+ { -+ int tmp; -+ } -+ dslSlowVarsStruct; -+ -+typedef struct __dslVarsStruct -+ { -+ bitMap setup; -+ eyeHandlerType eyeHandlerPtr; -+ logHandlerType logHandlerPtr; -+ dslDriverCallbackType driverCallback; -+ -+ rcvHandlerType rcvHandlerPtr; -+ xmtHandlerType xmtHandlerPtr; -+ -+#ifndef ADSLCORE_ONLY -+ dslCommandHandlerType adslCoreCommandHandlerPtr; -+#endif -+ dslCommandHandlerType dataPumpCommandHandlerPtr; -+ -+ dslStatusHandlerType internalStatusHandlerPtr; -+ dslStatusHandlerType externalStatusHandlerPtr; -+#ifndef ADSLCORE_ONLY -+ dslStatusHandlerType externalLinkLayerStatusHandlerPtr; -+#endif -+ -+ dslDirectionType direction; -+ dslConnectionSetupStruct connectionSetup; -+ -+#ifdef NEC_NSIF_WORKAROUND -+ uchar G994NsStatus; -+ uchar G994NsFailCounter; -+#endif -+ -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ -+ linkLayerFunctions LinkLayerFunctions; -+ dslSlowVarsStruct *dslSlowVars; -+ -+#ifdef DSL_FRAME_FUNCTIONS -+ dslFrameFunctions DslFrameFunctions; -+#endif -+ ulong refData; -+ ulong execTime; -+ int currRcvNSamps; -+ -+#ifndef HOST_ONLY -+ DslSampleBuffersStruct sampleBuffersVars; -+ -+#ifdef G992P2_PROFILE -+ G992p2ProfileVarsStruct G992p2ProfileVars; -+#endif -+ -+#ifdef ADSL_FRAMER -+ muxFramerVarsStruct muxFramerVars; -+#endif -+#endif /* HOST_ONLY */ -+ -+#ifdef DSL_LINKLAYER -+ union -+ { -+#ifdef ATM -+ atmVarsStruct atmVars; -+#endif -+#ifdef DSL_PACKET -+ dslPacketVarsStruct dslPacketVars; -+#endif -+ } linkLayerVars; -+#endif -+ -+#ifdef G997_1_FRAMER -+ g997VarsStruct G997Vars; -+#ifdef G992P3 -+ g992p3OvhMsgVarsStruct G992p3OvhMsgVars; -+#endif -+#endif -+ -+#ifdef ADSL_MIB -+ adslMibVarsStruct adslMibVars; -+#endif -+ -+#ifndef HOST_ONLY -+ union -+ { -+#ifdef T1P413 -+ T1p413VarsStruct T1p413Vars; -+#endif -+#ifdef G994P1 -+ G994p1VarsStruct G994p1Vars; -+#endif -+#ifdef G992 -+ G992VarsStruct G992Vars; -+#endif -+ } physicalLayerVars; -+ union -+ { -+#ifdef G992 -+ G992ScratchVarsStruct G992ScratchVars; -+#endif -+#if defined(ADSL_FRAMER) && defined(SHARE_MUX_FRAMER_VARS) -+ muxFramerSharedVarsStruct muxFramerSharedVars; -+#endif -+ } scratchVars; -+#endif /* HOST_ONLY */ -+ -+ } -+ dslVarsStruct; -+ -+#ifndef GLOBAL_PTR_BIAS -+#define gDslGlobalVarPtr ((struct __dslVarsStruct *)gDslVars) -+#define gDslGlobalSlowVarPtr (gDslGlobalVarPtr->dslSlowVars) -+#else -+#define gDslGlobalVarPtr ((struct __dslVarsStruct *) (void*)((uchar*)(gDslVars) - GLOBAL_PTR_BIAS)) -+#define gDslGlobalSlowVarPtr ((struct __dslSlowVarsStruct *) (void*)((uchar*)(gDslGlobalVarPtr->dslSlowVars) - GLOBAL_PTR_BIAS)) -+#endif -+ -+#define gDslSampleBuffersVars (gDslGlobalVarPtr->sampleBuffersVars) -+ -+#define gDslMuxFramerVars (gDslGlobalVarPtr->muxFramerVars) -+#define gDslMuxFramerSharedVars (gDslGlobalVarPtr->scratchVars.muxFramerSharedVars) -+#define gDslLinkLayerVars (gDslGlobalVarPtr->linkLayerVars) -+#define gDslAtmVars (gDslGlobalVarPtr->linkLayerVars.atmVars) -+#define gDslPacketVars (gDslGlobalVarPtr->linkLayerVars.dslPacketVars) -+#define gG997Vars (gDslGlobalVarPtr->G997Vars) -+ -+#ifdef G992P3 -+#define gG992p3OvhMsgVars (gDslGlobalVarPtr->G992p3OvhMsgVars) -+#endif -+ -+#define gAdslMibVars (gDslGlobalVarPtr->adslMibVars) -+ -+#define gT1p413Vars (gDslGlobalVarPtr->physicalLayerVars.T1p413Vars) -+#define gG994p1Vars (gDslGlobalVarPtr->physicalLayerVars.G994p1Vars) -+#define gG992Vars (gDslGlobalVarPtr->physicalLayerVars.G992Vars) -+#define gG992p2ProfileVars (gDslGlobalVarPtr->G992p2ProfileVars) -+ -+#define gG992ScratchVars (gDslGlobalVarPtr->scratchVars.G992ScratchVars) -+ -+#ifndef gEyeHandlerPtr -+#define gEyeHandlerPtr (gDslGlobalVarPtr->eyeHandlerPtr) -+#endif -+ -+#ifndef gLogHandlerPtr -+#define gLogHandlerPtr (gDslGlobalVarPtr->logHandlerPtr) -+#endif -+ -+#ifdef VP_SIMULATOR -+#define gDriverCallback(x) (gDslGlobalVarPtr->driverCallback)(x) -+#else -+#define gDriverCallback(x) -+#endif -+ -+/* -+** -+** Frame functions callouts -+** -+*/ -+ -+#define gDslFrameFunc (gDslGlobalVarPtr->DslFrameFunctions) -+ -+#define DslFrameBufferGetLength(gDslVars, fb) \ -+ gDslFrameFunc.__DslFrameBufferGetLength(fb) -+ -+#define DslFrameBufferGetAddress(gDslVars, fb) \ -+ gDslFrameFunc.__DslFrameBufferGetAddress(fb) -+ -+#define DslFrameBufferSetLength(gDslVars, fb, l) \ -+ gDslFrameFunc.__DslFrameBufferSetLength(fb, l) -+ -+#define DslFrameBufferSetAddress(gDslVars, fb, p) \ -+ gDslFrameFunc.__DslFrameBufferSetAddress(fb, p) -+ -+#define DslFrameInit(gDslVars, f) \ -+ gDslFrameFunc.__DslFrameInit(f) -+ -+#define DslFrameGetLength(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameGetLength(pFrame) -+ -+#define DslFrameGetBufCnt(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameGetBufCnt(pFrame) -+ -+#define DslFrameGetFirstBuffer(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameGetFirstBuffer(pFrame) -+ -+#define DslFrameGetNextBuffer(gDslVars, pFrBuffer) \ -+ gDslFrameFunc.__DslFrameGetNextBuffer(pFrBuffer) -+ -+#define DslFrameSetNextBuffer(gDslVars, pFrBuf, pFrBufNext) \ -+ gDslFrameFunc.__DslFrameSetNextBuffer(pFrBuf, pFrBufNext) -+ -+#define DslFrameGetLastBuffer(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameGetLastBuffer(pFrame) -+ -+#define DslFrameGetLinkFieldAddress(gDslVars, f) \ -+ gDslFrameFunc.__DslFrameGetLinkFieldAddress(f) -+ -+#define DslFrameGetFrameAddressFromLink(gDslVars, lnk) \ -+ gDslFrameFunc.__DslFrameGetFrameAddressFromLink(lnk) -+ -+ -+#define DslFrameGetOobInfo(gDslVars, f, pOobInfo) \ -+ gDslFrameFunc.__DslFrameGetOobInfo(f, pOobInfo) -+ -+#define DslFrameSetOobInfo(gDslVars, f, pOobInfo) \ -+ gDslFrameFunc.__DslFrameSetOobInfo(f, pOobInfo) -+ -+ -+#define DslFrameEnqueBufferAtBack(gDslVars, f, b) \ -+ gDslFrameFunc.__DslFrameEnqueBufferAtBack(f, b) -+ -+#define DslFrameEnqueFrameAtBack(gDslVars, fMain, f) \ -+ gDslFrameFunc.__DslFrameEnqueFrameAtBack(fMain, f) -+ -+#define DslFrameEnqueBufferAtFront(gDslVars, f, b) \ -+ gDslFrameFunc.__DslFrameEnqueBufferAtFront(f, b) -+ -+#define DslFrameEnqueFrameAtFront(gDslVars, fMain, f) \ -+ gDslFrameFunc.__DslFrameEnqueFrameAtFront(fMain, f) -+ -+#define DslFrameDequeBuffer(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameDequeBuffer(pFrame) -+ -+#define DslFrameAllocMemForFrames(gDslVars, frameNum) \ -+ gDslFrameFunc.__DslFrameAllocMemForFrames(frameNum) -+ -+#define DslFrameFreeMemForFrames(gDslVars, hMem) \ -+ gDslFrameFunc.__DslFrameFreeMemForFrames(hMem) -+ -+#define DslFrameAllocFrame(gDslVars, handle) \ -+ gDslFrameFunc.__DslFrameAllocFrame(handle) -+ -+#define DslFrameFreeFrame(gDslVars, handle, pFrame) \ -+ gDslFrameFunc.__DslFrameFreeFrame(handle, pFrame) -+ -+#define DslFrameAllocMemForBuffers(gDslVars, ppMemPool, bufNum, memSize) \ -+ gDslFrameFunc.__DslFrameAllocMemForBuffers(ppMemPool, bufNum, memSize) -+ -+#define DslFrameFreeMemForBuffers(gDslVars, hMem, memSize, pMemPool) \ -+ gDslFrameFunc.__DslFrameFreeMemForBuffers(hMem, memSize, pMemPool) -+ -+#define DslFrameAllocBuffer(gDslVars, handle, pMem, length) \ -+ gDslFrameFunc.__DslFrameAllocBuffer(handle, pMem, length) -+ -+#define DslFrameFreeBuffer(gDslVars, handle, pBuf) \ -+ gDslFrameFunc.__DslFrameFreeBuffer(handle, pBuf) -+ -+#define DslFrame2Id(gDslVars, handle, pFrame) \ -+ gDslFrameFunc.__DslFrame2Id(handle, pFrame) -+ -+#define DslFrameId2Frame(gDslVars, handle, frameId) \ -+ gDslFrameFunc.__DslFrameId2Frame (handle, frameId) -+ -+ -+#endif /* SoftDslGlobals */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftDsl.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,2920 @@ -+/**************************************************************************** -+ * -+ * SoftDsl.h -+ * -+ * -+ * Description: -+ * This file contains the exported interface for SoftDsl.c -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.275 $ -+ * -+ * $Id: SoftDsl.h,v 1.275 2005/04/28 22:55:36 ilyas Exp $ -+ * -+ * $Log: SoftDsl.h,v $ -+ * Revision 1.275 2005/04/28 22:55:36 ilyas -+ * Cleaned up kDslG992RunAnnexaP3ModeInAnnexaP5, kG992EnableAnnexM and kDslAtuChangeTxFilterRequest definitions -+ * -+ * Revision 1.274 2005/04/27 20:57:32 yongbing -+ * Implement 32 frequency break points for TSSI, PR 30211 -+ * -+ * Revision 1.273 2005/04/02 03:27:52 kdu -+ * PR30236: Define kDslEnableRoundUpDSLoopAttn, this is shared with kDslCentilliumCRCWorkAroundEnabled. -+ * -+ * Revision 1.272 2005/04/01 21:56:39 ilyas -+ * Added more test commands definitions -+ * -+ * Revision 1.271 2005/02/11 05:03:57 ilyas -+ * Added support for DslOs -+ * -+ * Revision 1.270 2005/02/11 03:33:22 lke -+ * Support 2X, 4X, and 8X spectrum in ANNEX_I DS -+ * -+ * Revision 1.269 2005/01/08 00:11:58 ilyas -+ * Added definition for AnnexL status -+ * -+ * Revision 1.268 2004/12/18 00:52:35 mprahlad -+ * Add Dig US Pwr cutback status -+ * -+ * Revision 1.267 2004/11/08 22:21:38 ytan -+ * init swap state after retrain -+ * -+ * Revision 1.266 2004/11/05 21:16:50 ilyas -+ * Added support for pwmSyncClock -+ * -+ * Revision 1.265 2004/10/28 20:05:17 gsyu -+ * Fixed compilation errors for simulation targets -+ * -+ * Revision 1.264 2004/10/23 00:16:35 nino -+ * Added kDslHardwareSetRcvAGC status to set absolute rcv agc gain. -+ * -+ * Revision 1.263 2004/10/22 21:21:06 ilyas -+ * Fixed bit definition overlap in demodCapabilities -+ * -+ * Revision 1.262 2004/10/20 00:43:20 gsyu -+ * Added constants to support new xmt sample buffer control scheme -+ * -+ * Revision 1.261 2004/10/12 01:09:28 nino -+ * Remove kDslHardwareEnablePwmSyncClk and kDslHardwareSetPwmSyncClkFreq -+ * status definitions. Add kDslEnablePwmSyncClk and kDslSetPwmSyncClkFreq -+ * command definitions. -+ * -+ * Revision 1.260 2004/10/11 20:21:26 nino -+ * Added kDslHardwareEnablePwmSyncClk and kDslHardwareSetPwmSynClkFreq hardware statuses. -+ * -+ * Revision 1.259 2004/10/07 19:17:29 nino -+ * Added kDslHardwareGetRcvAGC status. -+ * -+ * Revision 1.258 2004/10/02 00:17:14 nino -+ * Added kDslHardwareAGCSetPga2 and kDslSetPilotEyeDisplay status definitions. -+ * -+ * Revision 1.257 2004/08/27 01:00:30 mprahlad -+ * -+ * Keep kDslAtuChangeTxFilterRequest defined by default so ADSL1 only targets can -+ * build -+ * -+ * Revision 1.256 2004/08/20 19:00:34 ilyas -+ * Added power management code for 2+ -+ * -+ * Revision 1.255 2004/08/17 23:18:25 kdu -+ * Merged interop changes for TDC lab from a023e9. -+ * -+ * Revision 1.254 2004/07/22 00:56:03 yongbing -+ * Add ADSL2 Annex B modulation definition -+ * -+ * Revision 1.253 2004/07/16 22:23:28 nino -+ * - Defined macros to extract subcarrier and supported set information -+ * for tssi. Subcarrier and suported set indicator is packed into -+ * dsSubcarrier index array. -+ * -+ * Revision 1.252 2004/07/01 00:11:22 nino -+ * Added preliminary code for debugDataHandler (inside of #if DEBUG_DATA_HANDLER). -+ * -+ * Revision 1.251 2004/06/24 03:08:39 ilyas -+ * Added GFC mapping control for ATM bonding -+ * -+ * Revision 1.250 2004/06/23 00:03:20 khp -+ * - shorten self test result register length to 1 (satisfied requirement -+ * at DT, no known requirement anywhere else) -+ * -+ * Revision 1.249 2004/06/15 20:18:33 ilyas -+ * Made D uchar again for compatibility with older ADSl drivers that use this structure. ADSL driver will rely on G992p3 parameters for large D -+ * -+ * Revision 1.248 2004/06/12 00:26:03 gsyu -+ * Added constants for AnnexM -+ * -+ * Revision 1.247 2004/06/10 18:53:24 yjchen -+ * add large D support -+ * -+ * Revision 1.246 2004/06/04 01:55:00 linyin -+ * Add a constant for SRA enable/disable -+ * -+ * Revision 1.245 2004/05/19 23:22:23 linyin -+ * Support L2 -+ * -+ * Revision 1.244 2004/05/15 03:04:58 ilyas -+ * Added L3 test definition -+ * -+ * Revision 1.243 2004/05/14 03:04:38 ilyas -+ * Fixed structure name typo -+ * -+ * Revision 1.242 2004/05/14 02:01:01 ilyas -+ * Fixed structure name typo -+ * -+ * Revision 1.241 2004/05/14 01:21:49 nino -+ * Added kDslSignalAttenuation, kDslAttainableNetDataRate kDslHLinScale constant definitions. -+ * -+ * Revision 1.240 2004/05/13 19:07:58 ilyas -+ * Added new statuses for ADSL2 -+ * -+ * Revision 1.239 2004/05/01 01:09:51 ilyas -+ * Added power management command and statuses -+ * -+ * Revision 1.238 2004/04/23 22:50:38 ilyas -+ * Implemented double buffering to ensure G.997 HDLC frame (OvhMsg) is continuous -+ * -+ * Revision 1.237 2004/03/31 18:57:39 ilyas -+ * Added drop on data error capability control -+ * -+ * Revision 1.236 2004/03/30 03:11:30 ilyas -+ * Added #ifdef for CFE build -+ * -+ * Revision 1.235 2004/03/29 23:06:39 ilyas -+ * Added status for BG table update -+ * -+ * Revision 1.234 2004/03/17 02:49:49 ilyas -+ * Turn off ATM bit reversal for Alcatel DSLAM only -+ * -+ * Revision 1.233 2004/03/11 03:09:48 mprahlad -+ * Add test mode for afeloopback test -+ * -+ * Revision 1.232 2004/03/10 23:15:53 ilyas -+ * Added ETSI modem support -+ * -+ * Revision 1.231 2004/03/04 19:28:14 linyin -+ * Support adsl2plus -+ * -+ * Revision 1.230 2004/02/28 00:06:21 ilyas -+ * Added OLR message definitions for ADSL2+ -+ * -+ * Revision 1.229 2004/02/13 03:21:15 mprahlad -+ * define kDslAturHwAgcMaxGain correctly for 6348 -+ * -+ * Revision 1.228 2004/02/09 05:06:17 yongbing -+ * Add ADSL2 bit swap function -+ * -+ * Revision 1.227 2004/02/04 02:08:19 linyin -+ * remove the redefined kG992p5AnnexA -+ * -+ * Revision 1.226 2004/02/04 01:41:48 linyin -+ * Add some variables for G992P5 -+ * -+ * Revision 1.225 2004/02/03 19:12:22 gsyu -+ * Added a dedicate structure and constants for G992P5 -+ * -+ * Revision 1.224 2004/01/24 01:18:34 ytan -+ * add multi-section swapping flag -+ * -+ * Revision 1.223 2004/01/17 00:21:48 ilyas -+ * Added commands and statuses for OLR -+ * -+ * Revision 1.222 2004/01/13 19:12:37 gsyu -+ * Added more constants for Double upstream -+ * -+ * Revision 1.221 2003/12/23 21:19:04 mprahlad -+ * Define BCM6348_TEMP_MOVE_TO_LMEM to FAST_TEXT for 6348 targets - this is for -+ * ADSL2/AnnexA multimode builds - move a few functions to Lmem for now to avoid -+ * changes for swap on 6348. -+ * -+ * Revision 1.220 2003/12/19 21:21:53 ilyas -+ * Added dying gasp support for ADSL2 -+ * -+ * Revision 1.219 2003/12/05 02:09:51 mprahlad -+ * Leave the AnalogEC defs in - saves ifdef-ing all uses of these defines. -+ * Include Bcm6345_To_Bcm6348.h - to be able to pick up macros for the -+ * transition -+ * -+ * Revision 1.218 2003/12/04 02:10:58 linyin -+ * Redefine some constants for supporting different pilot and TTR -+ * -+ * Revision 1.217 2003/12/03 02:24:39 gsyu -+ * Reverse previous check in for Double Upstream demo -+ * -+ * Revision 1.215 2003/11/20 00:58:47 yongbing -+ * Merge ADSL2 functionalities into Annex A branch -+ * -+ * Revision 1.214 2003/11/06 00:35:06 nino -+ * Added kDslWriteAfeRegCmd and kDslReadAfeRegCmd commands. -+ * -+ * Revision 1.213 2003/11/05 21:04:23 ilyas -+ * Added more codes for LOG data -+ * -+ * Revision 1.212 2003/10/22 00:51:52 yjchen -+ * define constant for quiet line noise -+ * -+ * Revision 1.211 2003/10/20 22:08:57 nino -+ * Added kDslSetRcvGainCmd and kDslBypassRcvHpfCmd debug commands. -+ * -+ * Revision 1.210 2003/10/18 00:04:59 yjchen -+ * define constants for G992P3 diagnostic mode channel response -+ * -+ * Revision 1.209 2003/10/17 22:41:29 yongbing -+ * Add INP message support -+ * -+ * Revision 1.208 2003/10/16 00:06:09 uid1249 -+ * Moved G.994 definitions from G.994p1MainTypes.h -+ * -+ * Revision 1.207 2003/10/15 20:45:11 linyin -+ * Add some constants for support Revision 2 -+ * -+ * Revision 1.206 2003/10/14 22:04:02 ilyas -+ * Added Nino's AFE statuses for 6348 -+ * -+ * Revision 1.205 2003/10/10 18:49:26 gsyu -+ * Added test modes to workaround the clock domain crossing bug, PR18038 -+ * -+ * Revision 1.204 2003/09/30 19:27:46 mprahlad -+ * ifdef AnalogEC definies with #ifndef BCM6348_SRC -+ * -+ * Revision 1.203 2003/09/26 19:36:34 linyin -+ * Add annexi constant and vars -+ * -+ * Revision 1.202 2003/09/25 20:16:13 yjchen -+ * remove featureNTR definition -+ * -+ * Revision 1.201 2003/09/08 20:29:51 ilyas -+ * Added test commands for chip regression tests -+ * -+ * Revision 1.200 2003/08/26 00:58:14 ilyas -+ * Added I432 reset command (for header compression) -+ * Fixed SoftDsl time (for I432 header compression) -+ * -+ * Revision 1.199 2003/08/26 00:37:29 ilyas -+ * #ifdef'ed DslFrameFunctions in dslCommand structure to save space -+ * -+ * Revision 1.198 2003/08/22 22:45:00 liang -+ * Change the NF field in G992CodingParams from uchar to ushort to support K=256 (dataRate=255*32kbps) in fast path. -+ * -+ * Revision 1.197 2003/08/21 21:19:05 ilyas -+ * Changed dataPumpCapabilities structure for G992P3 -+ * -+ * Revision 1.196 2003/08/12 22:44:28 khp -+ * - for Haixiang: added kDslTestMarginTweak command and marginTweakSpec -+ * -+ * Revision 1.195 2003/07/24 17:28:16 ovandewi -+ * added Tx filter change request code -+ * -+ * Revision 1.194 2003/07/24 15:48:55 yongbing -+ * Reduce TSSI buffer size to avoid crash at the beginning of G.994.1. Need to find out why -+ * -+ * Revision 1.193 2003/07/19 07:11:47 nino -+ * Revert back to version 1.191. -+ * -+ * Revision 1.191 2003/07/17 21:25:25 yongbing -+ * Add support for READSL2 and TSSI -+ * -+ * Revision 1.190 2003/07/14 19:42:33 yjchen -+ * add constants for G992P3 -+ * -+ * Revision 1.189 2003/07/10 23:07:11 liang -+ * Add demodCapability bit to minimize showtime ATUC xmt power through b&g table. -+ * -+ * Revision 1.188 2003/07/08 22:18:50 liang -+ * Added demodCapability bit for G.994.1 Annex A multimode operation. -+ * -+ * Revision 1.187 2003/07/07 23:24:43 ilyas -+ * Added G.dmt.bis definitions -+ * -+ * Revision 1.186 2003/06/25 02:44:02 liang -+ * Added demod capability bit kDslUE9000ADI918FECFixEnabled. -+ * Added back kDslHWEnableAnalogECUpdate & kDslHWEnableAnalogEC for backward compatibility (annex A). -+ * -+ * Revision 1.185 2003/06/18 01:39:19 ilyas -+ * Added AFE test commands. Add #defines for driver's builds -+ * -+ * Revision 1.184 2003/06/06 23:58:09 ilyas -+ * Added command and status for standalone AFE tests -+ * -+ * Revision 1.183 2003/05/29 21:09:32 nino -+ * - kDslHWEnableAnalogECUpdate define replaced with kDslHWSetDigitalEcUpdateMode -+ * - kDslHWEnableAnalogEC define replaced with kDslHWDisableDigitalECUpdate -+ * -+ * Revision 1.182 2003/04/15 22:08:15 liang -+ * Changed one of the demodCapability bit name from last checkin. -+ * -+ * Revision 1.181 2003/04/13 19:25:54 liang -+ * Added three more demodCapability bits. -+ * -+ * Revision 1.180 2003/04/02 02:09:17 liang -+ * Added demodCapability bit for ADI low rate option fix disable. -+ * -+ * Revision 1.179 2003/03/18 18:22:06 yongbing -+ * Use 32 tap TEQ for Annex I -+ * -+ * Revision 1.178 2003/03/06 00:58:07 ilyas -+ * Added SetStausBuffer command -+ * -+ * Revision 1.177 2003/02/25 00:46:26 ilyas -+ * Added T1.413 EOC vendor ID -+ * -+ * Revision 1.176 2003/02/21 23:30:54 ilyas -+ * Added Xmtgain command framing mode status and T1413VendorId parameters -+ * -+ * Revision 1.175 2003/02/07 22:13:55 liang -+ * Add demodCapabilities bits for sub-sample alignment and higher T1.413 level (used internally only). -+ * -+ * Revision 1.174 2003/01/23 02:54:07 liang -+ * Added demod capability bit for bitswap enable. -+ * -+ * Revision 1.173 2002/12/13 18:36:33 yongbing -+ * Add support for G.992.2 Annex C -+ * -+ * Revision 1.172 2002/12/10 23:27:12 ilyas -+ * Extended dslException parameter structure to allow printout from DslDiags -+ * -+ * Revision 1.171 2002/12/06 02:10:19 liang -+ * Moved the T1.413 RAck1/RAck2 switching variables to connection setup structure. -+ * Added/Modified the training progress codes for T1.413 RAck1/RAck2 and upstream 2x IFFT disable. -+ * -+ * Revision 1.170 2002/11/11 00:20:05 liang -+ * Add demod capability constant for internally disabling upstream 2x IFFT in T1.413 mode. -+ * -+ * Revision 1.169 2002/11/06 03:46:19 liang -+ * Add training progress code for upstream 2x IFFT disable. -+ * -+ * Revision 1.168 2002/11/01 01:41:06 ilyas -+ * Added flags for Centillium 4103 workarround -+ * -+ * Revision 1.167 2002/10/26 01:26:11 gsyu -+ * Move SoftDslLineHandler from SDRAM to LMEM -+ * -+ * Revision 1.166 2002/10/20 18:56:20 khp -+ * - for linyin -+ * - #ifdef NEC_NSIF_WORKAROUND: -+ * - add macros to extract NSIF status and fail counter vars -+ * -+ * Revision 1.165 2002/10/14 05:24:35 liang -+ * Add training status code to request alternate xmt filter (for Samsung 6-port ADI918 DSLAMs) to meet KT 2km spec. -+ * -+ * Revision 1.164 2002/10/08 21:44:50 ilyas -+ * Fixed EOC stuffing byte to indicate "no synchronization" action -+ * -+ * Revision 1.163 2002/10/03 19:34:24 ilyas -+ * Added size for EOC serial number register -+ * -+ * Revision 1.162 2002/09/28 02:42:27 yongbing -+ * Add retrain in T1.413 with R-Ack1 tone -+ * -+ * Revision 1.161 2002/09/28 01:23:35 gsyu -+ * Reverse us2xifft change so that we can install new us2xifft on the tree -+ * -+ * Revision 1.160 2002/09/26 23:30:48 yongbing -+ * Add synch symbol detection in Showtime -+ * -+ * Revision 1.159 2002/09/20 23:47:52 khp -+ * - for gsyu: enable 2X IFFT for Annex A (XMT_FFT_SIZE_2X) -+ * -+ * Revision 1.158 2002/09/14 03:26:39 ilyas -+ * Changed far-end RDI reporting -+ * -+ * Revision 1.157 2002/09/13 21:10:54 ilyas -+ * Added reporting of remote modem LOS and RDI. -+ * Moved G992CodingParams definition to SoftDsl.h -+ * -+ * Revision 1.156 2002/09/12 21:07:19 ilyas -+ * Added HEC, OCD and LCD counters -+ * -+ * Revision 1.155 2002/09/09 21:31:30 linyin -+ * Add two constant to support long reach -+ * -+ * Revision 1.154 2002/09/07 01:31:51 ilyas -+ * Added support for OEM parameters -+ * -+ * Revision 1.153 2002/09/04 22:36:14 mprahlad -+ * defines for non standard info added -+ * -+ * Revision 1.152 2002/08/02 21:59:09 liang -+ * Enable G.992.2 carrierInfo in capabitilities when G.992.1 annex A is used for G.992.2. -+ * -+ * Revision 1.151 2002/07/29 20:01:03 ilyas -+ * Added command for Atm VC map table change -+ * -+ * Revision 1.150 2002/07/18 22:30:47 liang -+ * Add xmt power and power cutback related constants. -+ * -+ * Revision 1.149 2002/07/11 01:30:58 ilyas -+ * Changed status for ShowtimeMargin reporting -+ * -+ * Revision 1.148 2002/07/09 19:19:09 ilyas -+ * Added status parameters for ShowtimeSNRMargin info and command to filter -+ * out SNR margin data -+ * -+ * Revision 1.147 2002/06/27 21:50:24 liang -+ * Added test command related demodCapabilities bits. -+ * -+ * Revision 1.146 2002/06/26 21:29:00 liang -+ * Added dsl test cmd structure and showtime margin connection info status. -+ * -+ * Revision 1.145 2002/06/15 05:15:51 ilyas -+ * Added definitions for Ping, Dying Gasp and other test commands -+ * -+ * Revision 1.144 2002/05/30 19:55:15 ilyas -+ * Added status for ADSL PHY MIPS exception -+ * Changed conflicting definition for higher rates (S=1/2) -+ * -+ * Revision 1.143 2002/05/21 23:41:07 yongbing -+ * First check-in of Annex C S=1/2 codes -+ * -+ * Revision 1.142 2002/04/29 22:25:09 georgep -+ * Merge from branch annexC_demo - add status message constants -+ * -+ * Revision 1.141 2002/04/18 19:00:35 ilyas -+ * Added include file for builds in CommEngine environment -+ * -+ * Revision 1.140 2002/04/18 00:18:36 yongbing -+ * Add detailed timeout error messages -+ * -+ * Revision 1.139 2002/04/02 10:03:18 ilyas -+ * Merged BERT from AnnexA branch -+ * -+ * Revision 1.138 2002/03/26 01:42:29 ilyas -+ * Added timeout message constants for annex C -+ * -+ * Revision 1.137 2002/03/22 19:39:22 yongbing -+ * Modify for co-exist of G994P1 and T1P413 -+ * -+ * Revision 1.136 2002/03/22 01:19:40 ilyas -+ * Add status message constants for total FEXT Bits, NEXT bits -+ * -+ * Revision 1.135 2002/03/10 22:32:24 liang -+ * Added report constants for LOS recovery and timing tone index. -+ * -+ * Revision 1.134 2002/03/07 22:06:32 georgep -+ * Replace ifdef G992P1 with G992P1_ANNEX_A for annex A variables -+ * -+ * Revision 1.133 2002/02/16 01:08:18 georgep -+ * Add log constant for showtime mse -+ * -+ * Revision 1.132 2002/02/08 04:36:27 ilyas -+ * Added commands for LOG file and fixed Idle mode pointer update -+ * -+ * Revision 1.131 2002/01/24 20:21:30 georgep -+ * Add logging defines, remove fast retrain defines -+ * -+ * Revision 1.130 2002/01/19 23:59:17 ilyas -+ * Added support for LOG and eye data to ADSL core target -+ * -+ * Revision 1.129 2002/01/16 23:43:54 liang -+ * Remove the carriage return character from last checkin. -+ * -+ * Revision 1.128 2002/01/15 22:27:13 ilyas -+ * Added command for ADSL loopback -+ * -+ * Revision 1.127 2002/01/10 07:18:22 ilyas -+ * Added status for printf (mainly for ADSL core debugging) -+ * -+ * Revision 1.126 2001/12/21 22:45:34 ilyas -+ * Added support for ADSL MIB data object -+ * -+ * Revision 1.125 2001/12/13 02:24:22 ilyas -+ * Added G997 (Clear EOC and G997 framer) support -+ * -+ * Revision 1.124 2001/11/30 05:56:31 liang -+ * Merged top of the branch AnnexBDevelopment onto top of the tree. -+ * -+ * Revision 1.123 2001/11/15 19:01:07 yongbing -+ * Modify only T1.413 part to the top of tree based on AnnexBDevelopment branch -+ * -+ * Revision 1.122 2001/10/19 00:12:07 ilyas -+ * Added support for frame oriented (no ATM) data link layer -+ * -+ * Revision 1.121 2001/10/09 22:35:13 ilyas -+ * Added more ATM statistics and OAM support -+ * -+ * Revision 1.105.2.20 2001/11/27 02:32:03 liang -+ * Combine vendor ID, serial #, and version number into SoftModemVersionNumber.c. -+ * -+ * Revision 1.105.2.19 2001/11/21 01:29:14 georgep -+ * Add a status message define for annexC -+ * -+ * Revision 1.105.2.18 2001/11/08 23:26:28 yongbing -+ * Add carrier selection function for Annex A and B -+ * -+ * Revision 1.105.2.17 2001/11/07 22:55:30 liang -+ * Report G992 rcv msg CRC error as what it is instead of time out. -+ * -+ * Revision 1.105.2.16 2001/11/05 19:56:21 liang -+ * Add DC offset info code. -+ * -+ * Revision 1.105.2.15 2001/10/16 00:47:16 yongbing -+ * Add return-to-T1p413 starting point if in error -+ * -+ * Revision 1.105.2.14 2001/10/15 23:14:01 yjchen -+ * remove ADSL_SINGLE_SYMBOL_BLOCK -+ * -+ * Revision 1.105.2.13 2001/10/12 18:07:16 yongbing -+ * Add support for T1.413 -+ * -+ * Revision 1.105.2.12 2001/10/04 00:23:52 liang -+ * Add connection info constants for TEQ coef and PSD. -+ * -+ * Revision 1.105.2.11 2001/10/03 01:44:01 liang -+ * Merged with codes from main tree (tag SoftDsl_2_18). -+ * -+ * Revision 1.105.2.10 2001/09/28 22:10:04 liang -+ * Add G994 exchange message status reports. -+ * -+ * Revision 1.105.2.9 2001/09/26 18:08:21 georgep -+ * Send status error message in case features field is not setup properly -+ * -+ * Revision 1.105.2.8 2001/09/05 01:58:13 georgep -+ * Added status message for annexC measured delay -+ * -+ * Revision 1.105.2.7 2001/08/29 00:37:52 georgep -+ * Add log constants for annexC -+ * -+ * Revision 1.105.2.6 2001/08/18 00:01:34 georgep -+ * Add constants for annexC -+ * -+ * Revision 1.105.2.5 2001/08/08 17:33:28 yongbing -+ * Merge with tag SoftDsl_2_17 -+ * -+ * Revision 1.120 2001/08/29 02:56:01 ilyas -+ * Added tests for flattening/unflatenning command and statuses (dual mode) -+ * -+ * Revision 1.119 2001/08/28 03:26:32 ilyas -+ * Added support for running host and adsl core parts separately ("dual" mode) -+ * -+ * Revision 1.118 2001/08/16 02:16:10 khp -+ * - mark functions with FAST_TEXT to reduce cycle counts for QPROC targets -+ * (replaces use of LMEM_INSN) -+ * -+ * Revision 1.117 2001/06/18 20:06:35 ilyas -+ * Added forward declaration of dslCommandStruc to avoid gcc warnings -+ * -+ * Revision 1.116 2001/06/18 19:49:36 ilyas -+ * Changes to include support for HOST_ONLY mode -+ * -+ * Revision 1.115 2001/06/01 22:00:33 ilyas -+ * Changed ATM PHY interface to accomodate UTOPIA needs -+ * -+ * Revision 1.114 2001/05/16 06:22:24 liang -+ * Added status reports for xmt & rcv prefix enable position. -+ * -+ * Revision 1.113 2001/05/02 20:34:32 georgep -+ * Added log constants for snr1 calculation -+ * -+ * Revision 1.112 2001/04/25 01:20:11 ilyas -+ * -+ * Don't use DSL frame functions if ATM_LAYER is not defined -+ * -+ * Revision 1.111 2001/04/17 21:13:00 georgep -+ * Define status constant kDslHWSetDigitalEcUpdateShift -+ * -+ * Revision 1.110 2001/04/16 23:38:36 georgep -+ * Add HW AGC constants for ATUR -+ * -+ * Revision 1.109 2001/04/06 23:44:53 georgep -+ * Added status constant for setting up digitalEcGainShift -+ * -+ * Revision 1.108 2001/03/29 05:58:34 liang -+ * Replaced the Aware compatibility codes with automatic detection codes. -+ * -+ * Revision 1.107 2001/03/25 06:11:22 liang -+ * Combined separate loop attenuation status for ATUR & ATUC into one status. -+ * Replace separate hardware AGC info status for ATUR & ATUC into hardware AGC -+ * request status and hardware AGC obtained status. -+ * Use store AGC command to save hardware AGC value instead of returning value -+ * from status report. -+ * -+ * Revision 1.106 2001/03/24 00:43:22 liang -+ * Report more checksum results (NumOfCalls, txSignal, rxSignal & eyeData). -+ * -+ * Revision 1.105 2001/03/16 23:57:31 georgep -+ * Added more loop attenuation reporting status constants -+ * -+ * Revision 1.104 2001/03/15 00:22:07 liang -+ * Back to version 1.101. -+ * -+ * Revision 1.103 2001/03/15 00:03:44 yjchen -+ * use kDslATURHardwareAGCInfo for AltoE14 AGC as well -+ * -+ * Revision 1.102 2001/03/14 23:10:56 yjchen -+ * add defns for AltoE14 AGC -+ * -+ * Revision 1.101 2001/03/08 23:31:34 georgep -+ * Added R, S, D, coding parameters to dslDataPumpCapabilities -+ * -+ * Revision 1.100 2001/02/10 03:03:09 ilyas -+ * Added one more DslFrame function -+ * -+ * Revision 1.99 2001/02/09 01:55:27 ilyas -+ * Added status codes and macros to support printing of AAL packets -+ * -+ * Revision 1.98 2001/01/30 23:28:10 georgep -+ * Added kDslDspControlStatus for handling changes to dsp params -+ * -+ * Revision 1.97 2001/01/12 01:17:18 georgep -+ * Added bit in demodCapabilities for analog echo cancellor -+ * -+ * Revision 1.96 2001/01/04 05:51:03 ilyas -+ * Added more dslStatuses -+ * -+ * Revision 1.95 2000/12/21 05:46:07 ilyas -+ * Added name for struct _dslFrame -+ * -+ * Revision 1.94 2000/12/13 22:04:39 liang -+ * Add Reed-Solomon coding enable bit in demodCapabilities. -+ * -+ * Revision 1.93 2000/11/29 20:42:02 liang -+ * Add defines for SNR & max achivable rate status and DEC enable demodCapabilities bit. -+ * -+ * Revision 1.92 2000/09/22 21:55:13 ilyas -+ * Added support for DSL + Atm physical layer only (I.432) simulations -+ * -+ * Revision 1.91 2000/09/10 09:20:53 lkaplan -+ * Improve interface for sending Eoc messages -+ * -+ * Revision 1.90 2000/09/08 19:37:58 lkaplan -+ * Added code for handling EOC messages -+ * -+ * Revision 1.89 2000/09/07 23:02:27 georgep -+ * Add HarwareAGC Bit to demod Capabilities -+ * -+ * Revision 1.88 2000/09/01 00:57:34 georgep -+ * Added Hardware AGC status defines -+ * -+ * Revision 1.87 2000/08/31 19:04:26 liang -+ * Added external reference for stack size requirement test functions. -+ * -+ * Revision 1.86 2000/08/24 23:16:46 liang -+ * Increased sample block size for noBlock. -+ * -+ * Revision 1.85 2000/08/23 18:34:39 ilyas -+ * Added XxxVcConfigure function -+ * -+ * Revision 1.84 2000/08/05 00:25:04 georgep -+ * Redefine sampling freq constants -+ * -+ * Revision 1.83 2000/08/03 14:04:00 liang -+ * Add hardware time tracking clock error reset code. -+ * -+ * Revision 1.82 2000/07/23 20:52:52 ilyas -+ * Added xxxFrameBufSetAddress() function for ATM framer layers -+ * Rearranged linkLayer functions in one structure which is passed as a -+ * parameter to xxxLinkLayerInit() function to be set there -+ * -+ * Revision 1.81 2000/07/18 20:03:24 ilyas -+ * Changed DslFrame functions definitions to macros, -+ * Removed gDslVars from their parameter list -+ * -+ * Revision 1.80 2000/07/17 21:08:15 lkaplan -+ * removed global pointer -+ * -+ * Revision 1.79 2000/06/21 20:38:44 georgep -+ * Added bit to demodCapabilities for HW_TIME_TRACKING -+ * -+ * Revision 1.78 2000/06/19 19:57:55 georgep -+ * Added constants for logging of HWResampler data -+ * -+ * Revision 1.77 2000/06/02 18:57:21 ilyas -+ * Added support for DSL buffers consisting of many ATM cells -+ * -+ * Revision 1.76 2000/05/27 02:19:28 liang -+ * G992MonitorParams structure is moved here, and Tx/Rx data handler type definitions changed. -+ * -+ * Revision 1.75 2000/05/15 18:17:21 liang -+ * Added statuses for sent and received frames -+ * -+ * Revision 1.74 2000/05/14 01:56:38 ilyas -+ * Added ATM cell printouts -+ * -+ * Revision 1.73 2000/05/09 23:00:26 ilyas -+ * Added ATM status messages, ATM timer, Tx frames flush on timeout -+ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames -+ * -+ * Revision 1.72 2000/05/03 18:01:18 georgep -+ * Removed old function declarations for Eoc/Aoc -+ * -+ * Revision 1.71 2000/05/03 03:57:04 ilyas -+ * Added LOG file support for writing ATM data -+ * -+ * Revision 1.70 2000/05/02 00:04:36 liang -+ * Add showtime monitoring and message exchange info constants. -+ * -+ * Revision 1.69 2000/04/28 23:34:20 yongbing -+ * Add constants for reporting error events in performance monitoring -+ * -+ * Revision 1.68 2000/04/21 23:09:04 liang -+ * Added G992 time out training progress constant. -+ * -+ * Revision 1.67 2000/04/19 00:31:47 ilyas -+ * Added global SoftDsl functions for Vc, added OOB info functions -+ * -+ * Revision 1.66 2000/04/18 00:45:31 yongbing -+ * Add G.DMT new frame structure, define G992P1_NEWFRAME to enable, need ATM layer to work -+ * -+ * Revision 1.65 2000/04/15 01:48:34 georgep -+ * Added T1p413 status constants -+ * -+ * Revision 1.64 2000/04/13 08:36:22 yura -+ * Added SoftDslSetRefData, SoftDslGetRefData functions -+ * -+ * Revision 1.63 2000/04/13 05:42:35 georgep -+ * Added constant for T1p413 -+ * -+ * Revision 1.62 2000/04/05 21:49:54 liang -+ * minor change. -+ * -+ * Revision 1.61 2000/04/04 04:16:06 liang -+ * Merged with SoftDsl_0_03 from old tree. -+ * -+ * Revision 1.65 2000/04/04 01:47:21 ilyas -+ * Implemented abstract dslFrame and dslFrameBuffer objects -+ * -+ * Revision 1.64 2000/04/01 08:12:10 yura -+ * Added preliminary revision of the SoftDsl driver architecture -+ * -+ * Revision 1.63 2000/04/01 02:55:33 georgep -+ * New defines for G992p2Profile Structure -+ * -+ * Revision 1.62 2000/04/01 00:50:36 yongbing -+ * Add initial version of new frame structure for full-rate -+ * -+ * Revision 1.61 2000/03/24 03:30:45 georgep -+ * Define new constant kDslUpstreamSamplingFreq -+ * -+ * Revision 1.60 2000/03/23 19:51:30 georgep -+ * Define new features bits for G992p1 -+ * -+ * Revision 1.59 2000/03/18 01:28:41 georgep -+ * Changed connectionSetup to include G992p1 Capabilities -+ * -+ * Revision 1.58 2000/02/29 01:40:03 georgep -+ * Changed modulationtype defines to be the same as SPAR1 in G994p1 -+ * -+ * Revision 1.57 1999/11/19 01:03:19 george -+ * Use Block Size 256 for single symbol Mode -+ * -+ * Revision 1.56 1999/11/18 02:37:43 george -+ * Porting to 16Bit -+ * -+ * Revision 1.55 1999/11/12 02:12:55 george -+ * Added status constant for reporting of profile channel matching calculation -+ * -+ * Revision 1.54 1999/11/11 19:19:42 george -+ * Porting to 16Bit Compiler -+ * -+ * Revision 1.53 1999/11/05 01:27:06 liang -+ * Add recovery-from-inpulse-noise progress report. -+ * -+ * Revision 1.52 1999/11/02 02:06:27 george -+ * Added SNRMargin training status value -+ * -+ * Revision 1.51 1999/10/27 23:02:03 wan -+ * Add G.994.1 setup in dslConnectionSetupStruct for setting up Initiation side -+ * -+ * Revision 1.50 1999/10/25 21:55:36 liang -+ * Renamed the constant for FEQ output error. -+ * -+ * Revision 1.49 1999/10/23 02:20:55 george -+ * Add debug data codes -+ * -+ * Revision 1.48 1999/10/19 23:59:06 liang -+ * Change line handler interface to work with nonsymmetric sampling freq. -+ * -+ * Revision 1.47 1999/10/09 01:38:04 george -+ * Define maxProfileNumber -+ * -+ * Revision 1.46 1999/10/07 23:30:51 wan -+ * Add G.994.1 Tone and Fast Retrain Recov detections in G.992p2 SHOWTIME and Fast Retrain -+ * -+ * Revision 1.45 1999/10/06 13:59:27 liang -+ * Escape to G994.1 should be done through status instead of command. -+ * -+ * Revision 1.44 1999/10/06 02:01:28 george -+ * Add kDslReturnToG994p1Cmd -+ * -+ * Revision 1.43 1999/09/30 19:29:58 george -+ * Add reporting constant for Fast Retrain -+ * -+ * Revision 1.42 1999/09/16 23:41:56 liang -+ * Added command for host forced retrain. -+ * -+ * Revision 1.41 1999/08/20 00:47:25 wan -+ * Add constants for Fast Retrain progress status -+ * -+ * Revision 1.40 1999/08/16 18:06:01 wan -+ * Add more reporting constants for Fast Retrain -+ * -+ * Revision 1.39 1999/08/12 00:18:10 wan -+ * Add several Fast Retrain Status constants -+ * -+ * Revision 1.38 1999/08/10 18:25:38 george -+ * Define constants used for Fast Retrain -+ * -+ * Revision 1.37 1999/07/31 01:47:43 george -+ * Add status constants for eoc/aoc -+ * -+ * Revision 1.36 1999/07/27 18:19:52 george -+ * declare aoc/eoc functions -+ * -+ * Revision 1.35 1999/07/19 22:44:47 george -+ * Add constants for G994p1 Message Exchange -+ * -+ * Revision 1.34 1999/07/16 02:03:03 liang -+ * Modified Dsl link layer command spec structure. -+ * -+ * Revision 1.33 1999/07/14 22:53:16 george -+ * Add Constants for G994p1 -+ * -+ * Revision 1.32 1999/07/13 00:02:26 liang -+ * Added more feature bits. -+ * -+ * Revision 1.31 1999/07/09 01:58:14 wan -+ * Added more constants G.994.1 testing reports -+ * -+ * Revision 1.30 1999/07/07 23:51:04 liang -+ * Added rcv power and loop attenuation reports. -+ * -+ * Revision 1.29 1999/07/06 21:32:01 liang -+ * Added some aux. feature bits, and field performanceMargin was changed to noiseMargin in Capabilities. -+ * -+ * Revision 1.28 1999/07/03 01:40:17 liang -+ * Redefined dsl command parameter list and added connection setup struct. -+ * -+ * Revision 1.27 1999/07/02 00:41:18 liang -+ * Add bit and gain logging as well as rcv carrier range status. -+ * -+ * Revision 1.26 1999/06/25 21:37:10 wan -+ * Work in progress for G994.1. -+ * -+ * Revision 1.25 1999/06/16 00:54:36 liang -+ * Added Tx/Rx SHOWTIME active training progress codes. -+ * -+ * Revision 1.24 1999/06/11 21:59:37 wan -+ * Added G994.1 fail status constant. -+ * -+ * Revision 1.23 1999/06/11 21:29:01 liang -+ * Constants for C/R-Msgs was changed to C/R-Msg. -+ * -+ * Revision 1.22 1999/06/08 02:49:42 liang -+ * Added SNR data logging. -+ * -+ * Revision 1.21 1999/06/07 21:05:08 liang -+ * Added more training status values. -+ * -+ * Revision 1.20 1999/05/22 02:18:26 liang -+ * More constant defines. -+ * -+ * Revision 1.19 1999/05/14 22:49:35 liang -+ * Added more status codes and debug data codes. -+ * -+ * Revision 1.18 1999/04/12 22:41:39 liang -+ * Work in progress. -+ * -+ * Revision 1.17 1999/04/01 20:28:07 liang -+ * Added RReverb detect event status. -+ * -+ * Revision 1.16 1999/03/26 03:29:54 liang -+ * Add DSL debug data constants. -+ * -+ * Revision 1.15 1999/03/08 21:58:00 liang -+ * Added more constant definitions. -+ * -+ * Revision 1.14 1999/03/02 01:49:36 liang -+ * Added more connection info codes. -+ * -+ * Revision 1.13 1999/03/02 00:25:55 liang -+ * Added DSL tx and rx data handler type definitions. -+ * -+ * Revision 1.12 1999/02/27 01:16:55 liang -+ * Increase allowable static memory size to a VERY large number for now. -+ * -+ * Revision 1.11 1999/02/25 00:24:06 liang -+ * Increased symbol block size to 16. -+ * -+ * Revision 1.10 1999/02/23 22:03:26 liang -+ * Increased maximal static memory size allowed. -+ * -+ * Revision 1.9 1999/02/17 02:39:21 ilyas -+ * Changes for NDIS -+ * -+ * Revision 1.8 1999/02/11 22:44:30 ilyas -+ * More definitions for ATM -+ * -+ * Revision 1.7 1999/02/10 01:56:38 liang -+ * Added hooks for G994.1 and G992.2. -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef SoftDslHeader -+#define SoftDslHeader -+ -+/* for builds in Linux/VxWorks CommEngine environment */ -+#if (defined(__KERNEL__) && !defined(LINUX_DRIVER)) || defined(VXWORKS) || defined(_WIN32_WCE) || defined(TARG_OS_RTEMS) || defined(_CFE_) -+#include "AdslCoreDefs.h" -+#else -+#include "Bcm6345_To_Bcm6348.h" /* File for 45->48 changes */ -+#endif -+ -+#ifndef SoftModemPh -+#include "SoftModem.h" -+#endif -+ -+#ifdef DSL_OS -+#include "DslOs.h" -+#endif -+ -+/* -+** -+** Type definitions -+** -+*/ -+ -+#if defined(ATM) || defined(DSL_PACKET) -+#define DSL_LINKLAYER -+#endif -+ -+#if defined(ATM_LAYER) || defined(DSL_PACKET_LAYER) || defined(G997_1_FRAMER) -+#define DSL_FRAME_FUNCTIONS -+#endif -+ -+#define FLD_OFFSET(type,fld) ((int)(void *)&(((type *)0)->fld)) -+ -+#include "Que.h" -+#include "SoftAtmVc.h" -+ -+typedef struct _dslFrameBuffer -+ { -+ struct _dslFrameBuffer *next; /* link to the next buffer in the frame */ -+ void *pData; /* pointer to data */ -+ ulong length; /* size (in bytes) of data */ -+ } dslFrameBuffer; -+ -+typedef struct _dslFrame -+ { -+ ulong Reserved[3]; -+ -+ ulong totalLength; /* total amount of data in the packet */ -+ int bufCnt; /* buffer counter */ -+ struct _dslFrameBuffer *head; /* first buffer in the chain */ -+ struct _dslFrameBuffer *tail; /* last buffer in the chain */ -+ } dslFrame; -+ -+ -+/* VC types and parameters */ -+ -+#define kDslVcAtm 1 -+ -+typedef struct -+ { -+ ulong vcType; -+ union -+ { -+ atmVcParams atmParams; -+ } params; -+ } dslVcParams; -+ -+/* -+** Assuming that dslVcParams.params is the first field in VC -+** and RefData is the first field in dslVcParams.params -+*/ -+ -+#define DslVcGetRefData(pVc) (*(void **) (pVc)) -+ -+/* Frame OOB types */ -+ -+#define kDslFrameAtm 1 -+ -+typedef struct -+ { -+ ulong frameType; -+ union -+ { -+ atmOobPacketInfo atmInfo; -+ } param; -+ } dslOobFrameInfo; -+ -+ -+typedef struct -+ { -+ ulong (SM_DECL *__DslFrameBufferGetLength) (dslFrameBuffer *fb); -+ void * (SM_DECL *__DslFrameBufferGetAddress) (dslFrameBuffer *fb); -+ void (SM_DECL *__DslFrameBufferSetLength) (dslFrameBuffer *fb, ulong l); -+ void (SM_DECL *__DslFrameBufferSetAddress) (dslFrameBuffer *fb, void *p); -+ -+ void (SM_DECL *__DslFrameInit) (dslFrame *f); -+ ulong (SM_DECL *__DslFrameGetLength) (dslFrame *pFrame); -+ ulong (SM_DECL *__DslFrameGetBufCnt) (dslFrame *pFrame); -+ dslFrameBuffer * (SM_DECL *__DslFrameGetFirstBuffer) (dslFrame *pFrame); -+ dslFrameBuffer * (SM_DECL *__DslFrameGetNextBuffer) (dslFrameBuffer *pFrBuffer); -+ void (SM_DECL *__DslFrameSetNextBuffer) (dslFrameBuffer *pFrBuf, dslFrameBuffer *pFrBufNext); -+ dslFrameBuffer * (SM_DECL *__DslFrameGetLastBuffer) (dslFrame *pFrame); -+ void * (SM_DECL *__DslFrameGetLinkFieldAddress) (dslFrame *f); -+ dslFrame * (SM_DECL *__DslFrameGetFrameAddressFromLink) (void *lnk); -+ -+ Boolean (SM_DECL *__DslFrameGetOobInfo) (dslFrame *f, dslOobFrameInfo *pOobInfo); -+ Boolean (SM_DECL *__DslFrameSetOobInfo) (dslFrame *f, dslOobFrameInfo *pOobInfo); -+ -+ void (SM_DECL *__DslFrameEnqueBufferAtBack) (dslFrame *f, dslFrameBuffer *b); -+ void (SM_DECL *__DslFrameEnqueFrameAtBack) (dslFrame *fMain, dslFrame *f); -+ void (SM_DECL *__DslFrameEnqueBufferAtFront) (dslFrame *f, dslFrameBuffer *b); -+ void (SM_DECL *__DslFrameEnqueFrameAtFront) (dslFrame *fMain, dslFrame *f); -+ dslFrameBuffer * (SM_DECL *__DslFrameDequeBuffer) (dslFrame *pFrame); -+ -+ void * (SM_DECL *__DslFrameAllocMemForFrames) (ulong frameNum); -+ void (SM_DECL *__DslFrameFreeMemForFrames) (void *hMem); -+ dslFrame * (SM_DECL *__DslFrameAllocFrame) (void *handle); -+ void (SM_DECL *__DslFrameFreeFrame) (void *handle, dslFrame *pFrame); -+ void * (SM_DECL *__DslFrameAllocMemForBuffers) (void **ppMemPool, ulong bufNum, ulong memSize); -+ void (SM_DECL *__DslFrameFreeMemForBuffers) (void *hMem, ulong memSize, void *pMemPool); -+ dslFrameBuffer * (SM_DECL *__DslFrameAllocBuffer) (void *handle, void *pMem, ulong length); -+ void (SM_DECL *__DslFrameFreeBuffer) (void *handle, dslFrameBuffer *pBuf); -+ -+ /* for LOG file support */ -+ -+ ulong (SM_DECL *__DslFrame2Id)(void *handle, dslFrame *pFrame); -+ void * (SM_DECL *__DslFrameId2Frame)(void *handle, ulong frameId); -+ } dslFrameFunctions; -+ -+#define DslFrameDeclareFunctions( name_prefix ) \ -+extern ulong SM_DECL name_prefix##BufferGetLength(dslFrameBuffer *fb); \ -+extern void * SM_DECL name_prefix##BufferGetAddress(dslFrameBuffer *fb); \ -+extern void SM_DECL name_prefix##BufferSetLength(dslFrameBuffer *fb, ulong l); \ -+extern void SM_DECL name_prefix##BufferSetAddress(dslFrameBuffer *fb, void *p); \ -+ \ -+extern void SM_DECL name_prefix##Init(dslFrame *f); \ -+extern ulong SM_DECL name_prefix##GetLength (dslFrame *pFrame); \ -+extern ulong SM_DECL name_prefix##GetBufCnt(dslFrame *pFrame); \ -+extern dslFrameBuffer * SM_DECL name_prefix##GetFirstBuffer(dslFrame *pFrame); \ -+extern dslFrameBuffer * SM_DECL name_prefix##GetNextBuffer(dslFrameBuffer *pFrBuffer); \ -+extern void SM_DECL name_prefix##SetNextBuffer(dslFrameBuffer *pFrBuf, dslFrameBuffer *pFrBufNext); \ -+extern dslFrameBuffer * SM_DECL name_prefix##GetLastBuffer(dslFrame *pFrame); \ -+extern void * SM_DECL name_prefix##GetLinkFieldAddress(dslFrame *f); \ -+extern Boolean SM_DECL name_prefix##GetOobInfo(dslFrame *f, dslOobFrameInfo *pOobInfo); \ -+extern Boolean SM_DECL name_prefix##SetOobInfo(dslFrame *f, dslOobFrameInfo *pOobInfo); \ -+extern dslFrame* SM_DECL name_prefix##GetFrameAddressFromLink(void *lnk); \ -+extern void SM_DECL name_prefix##EnqueBufferAtBack(dslFrame *f, dslFrameBuffer *b); \ -+extern void SM_DECL name_prefix##EnqueFrameAtBack(dslFrame *fMain, dslFrame *f); \ -+extern void SM_DECL name_prefix##EnqueBufferAtFront(dslFrame *f, dslFrameBuffer *b); \ -+extern void SM_DECL name_prefix##EnqueFrameAtFront(dslFrame *fMain, dslFrame *f); \ -+extern dslFrameBuffer * SM_DECL name_prefix##DequeBuffer(dslFrame *pFrame); \ -+ \ -+extern void * SM_DECL name_prefix##AllocMemForFrames(ulong frameNum); \ -+extern void SM_DECL name_prefix##FreeMemForFrames(void *hMem); \ -+extern dslFrame * SM_DECL name_prefix##AllocFrame(void *handle); \ -+extern void SM_DECL name_prefix##FreeFrame(void *handle, dslFrame *pFrame); \ -+extern void * SM_DECL name_prefix##AllocMemForBuffers(void **ppMemPool, ulong bufNum, ulong memSize); \ -+extern void SM_DECL name_prefix##FreeMemForBuffers(void *hMem, ulong memSize, void *pMemPool); \ -+extern dslFrameBuffer * SM_DECL name_prefix##AllocBuffer(void *handle, void *pMem, ulong length); \ -+extern void SM_DECL name_prefix##FreeBuffer(void *handle, dslFrameBuffer *pBuf); \ -+extern ulong SM_DECL name_prefix##2Id(void *handle, dslFrame *pFrame); \ -+extern void * SM_DECL name_prefix##Id2Frame(void *handle, ulong frameId); -+ -+ -+#define DslFrameAssignFunctions( var, name_prefix ) do { \ -+ (var).__DslFrameBufferGetLength = name_prefix##BufferGetLength; \ -+ (var).__DslFrameBufferGetAddress= name_prefix##BufferGetAddress; \ -+ (var).__DslFrameBufferSetLength = name_prefix##BufferSetLength; \ -+ (var).__DslFrameBufferSetAddress= name_prefix##BufferSetAddress; \ -+ \ -+ (var).__DslFrameInit = name_prefix##Init; \ -+ (var).__DslFrameGetLength = name_prefix##GetLength; \ -+ (var).__DslFrameGetBufCnt = name_prefix##GetBufCnt; \ -+ (var).__DslFrameGetFirstBuffer = name_prefix##GetFirstBuffer; \ -+ (var).__DslFrameGetNextBuffer = name_prefix##GetNextBuffer; \ -+ (var).__DslFrameSetNextBuffer = name_prefix##SetNextBuffer; \ -+ (var).__DslFrameGetLastBuffer = name_prefix##GetLastBuffer; \ -+ (var).__DslFrameGetLinkFieldAddress = name_prefix##GetLinkFieldAddress; \ -+ (var).__DslFrameGetFrameAddressFromLink = name_prefix##GetFrameAddressFromLink; \ -+ \ -+ (var).__DslFrameGetOobInfo = name_prefix##GetOobInfo; \ -+ (var).__DslFrameSetOobInfo = name_prefix##SetOobInfo; \ -+ \ -+ (var).__DslFrameEnqueBufferAtBack = name_prefix##EnqueBufferAtBack; \ -+ (var).__DslFrameEnqueFrameAtBack = name_prefix##EnqueFrameAtBack; \ -+ (var).__DslFrameEnqueBufferAtFront= name_prefix##EnqueBufferAtFront; \ -+ (var).__DslFrameEnqueFrameAtFront = name_prefix##EnqueFrameAtFront; \ -+ (var).__DslFrameDequeBuffer = name_prefix##DequeBuffer; \ -+ \ -+ (var).__DslFrameAllocMemForFrames = name_prefix##AllocMemForFrames; \ -+ (var).__DslFrameFreeMemForFrames = name_prefix##FreeMemForFrames; \ -+ (var).__DslFrameAllocFrame = name_prefix##AllocFrame; \ -+ (var).__DslFrameFreeFrame = name_prefix##FreeFrame; \ -+ (var).__DslFrameAllocMemForBuffers= name_prefix##AllocMemForBuffers; \ -+ (var).__DslFrameFreeMemForBuffers = name_prefix##FreeMemForBuffers; \ -+ (var).__DslFrameAllocBuffer = name_prefix##AllocBuffer; \ -+ (var).__DslFrameFreeBuffer = name_prefix##FreeBuffer; \ -+ \ -+ (var).__DslFrame2Id = name_prefix##2Id; \ -+ (var).__DslFrameId2Frame = name_prefix##Id2Frame; \ -+} while (0) -+ -+typedef struct -+ { -+ Boolean febe_I; -+ Boolean fecc_I; -+ Boolean los, rdi; -+ Boolean ncd_I; -+ Boolean hec_I; -+#ifdef G992P3 -+ Boolean lpr; -+#endif -+ -+#ifdef G992P1_NEWFRAME -+ -+ Boolean febe_F; -+ Boolean fecc_F; -+ Boolean ncd_F; -+ Boolean hec_F; -+ -+#endif -+ } G992MonitorParams; -+ -+typedef struct -+ { -+ ushort K; -+ uchar S, R; -+ uchar D; -+#ifdef G992P3 -+ uchar T, SEQ; -+#endif -+ directionType direction; -+ -+#ifdef G992P1_NEWFRAME -+ -+ ushort N; -+ ushort NF; -+ uchar RSF; -+ -+ uchar AS0BF, AS1BF, AS2BF, AS3BF, AEXAF; -+ ushort AS0BI; -+ uchar AS1BI, AS2BI, AS3BI, AEXAI; -+ -+ uchar LS0CF, LS1BF, LS2BF, LEXLF; -+ uchar LS0CI, LS1BI, LS2BI, LEXLI; -+ -+ uchar mergedModeEnabled; -+ -+#endif -+ -+ } G992CodingParams; -+ -+typedef struct -+ { -+ uchar Nlp; -+ uchar Nbc; -+ uchar MSGlp; -+ ushort MSGc; -+ -+ ulong L; -+ ushort M; -+ ushort T; -+ ushort D; -+ ushort R; -+ ushort B; -+ } G992p3CodingParams; -+ -+/* Power Management Message definitions (used in command and status) */ -+ -+typedef struct -+ { -+ long msgType; -+ union -+ { -+ long value; -+ struct -+ { -+ long msgLen; -+ void *msgData; -+ } msg; -+ } param; -+ } dslPwrMessage; -+ -+/* Power Management commands and responses */ -+ -+#define kPwrSimpleRequest 1 -+#define kPwrL2Request 2 -+#define kPwrL2TrimRequest 3 -+ -+#define kPwrGrant 0x80 -+#define kPwrReject 0x81 -+#define kPwrL2Grant 0x82 -+#define kPwrL2Reject 0x83 -+#define kPwrL2TrimGrant 0x84 -+#define kPwrL2TrimReject 0x85 -+#define kPwrL2Grant2p 0x86 -+ -+#define kPwrBusy 0x01 -+#define kPwrInvalid 0x02 -+#define kPwrNotDesired 0x03 -+#define kPwrInfeasibleParam 0x04 -+ -+/* Power Management reason codes */ -+ -+/* OLR definitions (used in command and status) */ -+ -+typedef struct -+ { -+ ushort msgType; -+ ushort nCarrs; -+ ushort L[4]; -+ uchar B[4]; -+ void *carrParamPtr; -+ } dslOLRMessage; -+ -+typedef struct -+ { -+ uchar ind; -+ uchar gain; -+ uchar gb; -+ } dslOLRCarrParam; -+ -+typedef struct -+ { -+ ushort ind; -+ uchar gain; -+ uchar gb; -+ } dslOLRCarrParam2p; -+ -+/* OLR messages */ -+ -+#define kOLRRequestType1 1 -+#define kOLRRequestType2 2 -+#define kOLRRequestType3 3 -+#define kOLRRequestType4 4 -+#define kOLRRequestType5 5 -+#define kOLRRequestType6 6 -+ -+#define kOLRDeferType1 0x81 -+#define kOLRRejectType2 0x82 -+#define kOLRRejectType3 0x83 -+ -+/* OLR reason codes */ -+ -+#define kOLRBusy 1 -+#define kOLRInvalidParam 2 -+#define kOLRNotEnabled 3 -+#define kOLRNotSupported 4 -+ -+/* common EOC definitions */ -+#define kG992EocStuffingByte 0x0C -+ -+/* showtime monitor counters */ -+#define kG992ShowtimeRSCodewordsRcved 0 /* number of Reed-Solomon codewords received */ -+#define kG992ShowtimeRSCodewordsRcvedOK 1 /* number of Reed-Solomon codewords received with all symdromes zero */ -+#define kG992ShowtimeRSCodewordsRcvedCorrectable 2 /* number of Reed-Solomon codewords received with correctable errors */ -+#define kG992ShowtimeRSCodewordsRcvedUncorrectable 3 /* number of Reed-Solomon codewords received with un-correctable errors */ -+#define kG992ShowtimeSuperFramesRcvd 4 /* number of super frames received */ -+#define kG992ShowtimeSuperFramesRcvdWrong 5 /* number of super frames received with CRC error */ -+#define kG992ShowtimeLastUncorrectableRSCount 6 /* last recorded value for kG992ShowtimeRSCodewordsRcvedUncorrectable */ -+#define kG992ShowtimeLastWrongSuperFrameCount 7 /* last recorded value for kG992ShowtimeSuperFramesRcvdWrong */ -+#define kG992ShowtimeNumOfShortResync 8 /* number of short interrupt recoveries by FEQ */ -+ -+#define kG992ShowtimeNumOfFEBE 9 /* number of other side superframe errors */ -+#define kG992ShowtimeNumOfFECC 10 /* number of other side superframe FEC errors */ -+#define kG992ShowtimeNumOfFHEC 11 /* number of far-end ATM header CRC errors */ -+#define kG992ShowtimeNumOfFOCD 12 /* number of far-end OCD events */ -+#define kG992ShowtimeNumOfFLCD 13 /* number of far-end LCD events */ -+#define kG992ShowtimeNumOfHEC 14 /* number of ATM header CRC errors */ -+#define kG992ShowtimeNumOfOCD 15 /* number of OCD events */ -+#define kG992ShowtimeNumOfLCD 16 /* number of LCD events */ -+ -+#define kG992ShowtimeNumOfMonitorCounters (kG992ShowtimeNumOfLCD+1) /* always last number + 1 */ -+#define kG992ShowtimeMonitorReportNumber 9 -+ -+#define kG992ShowtimeLCDNumShift 1 -+#define kG992ShowtimeLCDFlag 1 -+ -+typedef int (SM_DECL *dslFrameHandlerType) (void *gDslVars, void *pVc, ulong mid, dslFrame *); -+ -+typedef void* (SM_DECL *dslHeaderHandlerType) (void *gDslVars, ulong hdr, uchar hdrHec); -+typedef void* (SM_DECL *dslTxFrameBufferHandlerType) (void *gDslVars, int*, void*); -+typedef void* (SM_DECL *dslRxFrameBufferHandlerType) (void *gDslVars, int, void*); -+ -+typedef void* (SM_DECL *dslVcAllocateHandlerType) (void *gDslVars, void *); -+typedef void (SM_DECL *dslVcFreeHandlerType) (void *gDslVars, void *); -+typedef Boolean (SM_DECL *dslVcActivateHandlerType) (void *gDslVars, void *); -+typedef void (SM_DECL *dslVcDeactivateHandlerType) (void *gDslVars, void *); -+typedef Boolean (SM_DECL *dslVcConfigureHandlerType) (void *gDslVars, void *pVc, ulong mid, void *); -+ -+typedef ulong (SM_DECL *dslLinkVc2IdHandlerType) (void *gDslVars, void *); -+typedef void* (SM_DECL *dslLinkVcId2VcHandlerType) (void *gDslVars, ulong); -+typedef void* (SM_DECL *dslGetFramePoolHandlerType) (void *gDslVars); -+ -+typedef void (SM_DECL *dslLinkCloseHandlerType) (void *gDslVars); -+typedef int (SM_DECL *dslTxDataHandlerType)(void *gDslVars, int, int, uchar*, G992MonitorParams*); -+typedef int (SM_DECL *dslRxDataHandlerType)(void *gDslVars, int, uchar*, G992MonitorParams*); -+ -+typedef void (SM_DECL *dslLinkStatusHandler) (void *gDslVars, ulong statusCode, ...); -+ -+typedef Boolean (SM_DECL *dslPhyInitType) ( -+ void *gDslVars, -+ bitMap setupMap, -+ dslHeaderHandlerType rxCellHeaderHandlerPtr, -+ dslRxFrameBufferHandlerType rxFrameHandlerPtr, -+ dslTxFrameBufferHandlerType txFrameHandlerPtr, -+ atmStatusHandler statusHandlerPtr); -+ -+struct _dslFramerBufDesc; -+ -+typedef Boolean (SM_DECL *dslFramerDataGetPtrHandlerType) (void *gDslVars, struct _dslFramerBufDesc *pBufDesc); -+typedef void (SM_DECL *dslFramerDataDoneHandlerType) (void *gDslVars, struct _dslFramerBufDesc *pBufDesc); -+ -+typedef void (SM_DECL *dslDriverCallbackType) (void *gDslVars); -+ -+#ifdef DSL_PACKET -+ -+typedef struct -+ { -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; -+ dslFramerDataDoneHandlerType rxDataDoneHandler; -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; -+ dslFramerDataDoneHandlerType txDataDoneHandler; -+ } dslPacketPhyFunctions; -+ -+typedef Boolean (SM_DECL *dslPacketPhyInitType) ( -+ void *gDslVars, -+ bitMap setupMap, -+ dslPacketPhyFunctions dslPhyFunctions, -+ dslLinkStatusHandler statusHandlerPtr); -+ -+ -+#endif /* DSL_PACKET */ -+ -+ -+typedef int dslDirectionType; -+typedef bitMap dslModulationType; -+typedef bitMap dslLinkLayerType; -+ -+/* -+** -+** Log data codes -+** -+*/ -+ -+#define kDslEyeData eyeData -+ -+#define kDslLogComplete (inputSignalData - 1) -+#define kDslLogInputData inputSignalData -+#define kDslLogInputData1 (inputSignalData + 1) -+#define kDslLogInputData2 (inputSignalData + 2) -+#define kDslLogInputData3 (inputSignalData + 3) -+ -+/* -+** -+** Status codes -+** -+*/ -+ -+typedef long dslStatusCode; -+#define kFirstDslStatusCode 256 -+#define kDslError (kFirstDslStatusCode + 0) -+#define kAtmStatus (kFirstDslStatusCode + 1) -+#define kDslTrainingStatus (kFirstDslStatusCode + 2) -+#define kDslConnectInfoStatus (kFirstDslStatusCode + 3) -+#define kDslEscapeToG994p1Status (kFirstDslStatusCode + 4) -+#define kDslFrameStatus (kFirstDslStatusCode + 5) -+#define kDslReceivedEocCommand (kFirstDslStatusCode + 6) -+#define kDslSendEocCommandDone (kFirstDslStatusCode + 7) -+#define kDslSendEocCommandFailed (kFirstDslStatusCode + 8) -+#define kDslWriteRemoteRegisterDone (kFirstDslStatusCode + 9) -+#define kDslReadRemoteRegisterDone (kFirstDslStatusCode + 10) -+#define kDslExternalError (kFirstDslStatusCode + 11) -+#define kDslDspControlStatus (kFirstDslStatusCode + 12) -+#define kDslATUHardwareAGCRequest (kFirstDslStatusCode + 13) -+#define kDslPacketStatus (kFirstDslStatusCode + 14) -+#define kDslG997Status (kFirstDslStatusCode + 15) -+#define kDslPrintfStatus (kFirstDslStatusCode + 16) -+#define kDslPrintfStatus1 (kFirstDslStatusCode + 17) -+#define kDslExceptionStatus (kFirstDslStatusCode + 18) -+#define kDslPingResponse (kFirstDslStatusCode + 19) -+#define kDslShowtimeSNRMarginInfo (kFirstDslStatusCode + 20) -+#define kDslGetOemParameter (kFirstDslStatusCode + 21) -+#define kDslOemDataAddrStatus (kFirstDslStatusCode + 22) -+#define kDslDataAvailStatus (kFirstDslStatusCode + 23) -+/* #define kDslAtuChangeTxFilterRequest (kFirstDslStatusCode + 24) */ -+#define kDslTestPllPhaseResult (kFirstDslStatusCode + 25) -+#ifdef BCM6348_SRC -+#define kDslHardwareAGCSetPga1 (kFirstDslStatusCode + 26) -+#define kDslHardwareAGCDecPga1 (kFirstDslStatusCode + 27) -+#define kDslHardwareAGCIncPga1 (kFirstDslStatusCode + 28) -+#define kDslHardwareAGCSetPga2Delta (kFirstDslStatusCode + 29) -+#endif -+#define kDslOLRRequestStatus (kFirstDslStatusCode + 30) -+#define kDslOLRResponseStatus (kFirstDslStatusCode + 31) -+#define kDslOLRBitGainUpdateStatus (kFirstDslStatusCode + 32) -+#define kDslPwrMgrStatus (kFirstDslStatusCode + 33) -+#define kDslEscapeToT1p413Status (kFirstDslStatusCode + 34) -+#ifdef BCM6348_SRC -+#define kDslHardwareAGCSetPga2 (kFirstDslStatusCode + 35) -+#define kDslHardwareGetRcvAGC (kFirstDslStatusCode + 36) -+#endif -+#define kDslUpdateXmtReadPtr (kFirstDslStatusCode + 37) -+#define kDslHardwareSetRcvAGC (kFirstDslStatusCode + 38) -+#ifdef BCM6348_SRC -+#define kDslSetDigUsPwrCutback (kFirstDslStatusCode + 39) -+#endif -+ -+#define kClientSideInitiation 0 -+#define kClientSideRespond 1 -+#define kCentralSideInitiation 2 -+#define kCentralSideRespond 3 -+ -+/* OEM parameter ID definition */ -+ -+#define kDslOemG994VendorId 1 -+#define kDslOemG994XmtNSInfo 2 -+#define kDslOemG994RcvNSInfo 3 -+#define kDslOemEocVendorId 4 -+#define kDslOemEocVersion 5 -+#define kDslOemEocSerNum 6 -+#define kDslOemT1413VendorId 7 -+#define kDslOemT1413EocVendorId 8 -+ -+typedef long dslErrorCode; -+ -+typedef long atmStatusCode; -+typedef long dslFramerStatusCode; -+ -+typedef long atmErrorCode; -+ -+typedef long dslTrainingStatusCode; -+ -+#define kDslStartedG994p1 0 -+#define kDslStartedT1p413HS 1 -+ -+/* reserved for G.994.1: 1 ~ 8 */ -+ -+#define kDslG994p1MessageDet 100 -+#define kDslG994p1ToneDet 101 -+#define kDslG994p1RToneDet 102 -+#define kDslG994p1FlagDet 103 -+#define kDslG994p1GalfDet 104 -+#define kDslG994p1ErrorFrameDet 105 -+#define kDslG994p1BadFrameDet 106 -+#define kDslG994p1SilenceDet 107 -+#define kDslG994p1RcvTimeout 108 -+#define kDslG994p1XmtFinished 109 -+#define kDslG994p1ReturntoStartup 110 -+#define kDslG994p1InitiateCleardown 111 -+#define kDslG994p1StartupFinished 112 -+#define kDslG994p1RcvNonStandardInfo 113 -+#define kDslG994p1XmtNonStandardInfo 114 -+ -+#define kG994p1MaxNonstdMessageLength 64 -+ -+#define kDslFinishedT1p413 1100 -+#define kDslT1p413DetectedCTone 1101 -+#define kDslT1p413DetectedCAct 1102 -+#define kDslT1p413DetectedCReveille 1103 -+#define kDslT1p413DetectedRActReq 1104 -+#define kDslT1p413DetectedRQuiet1 1105 -+#define kDslT1p413DetectedRAct 1106 -+#define kDslT1p413TimeoutCReveille 1107 -+#define kDslT1p413ReturntoStartup 1108 -+ -+#define kDslG994p1Timeout 8 -+#define kDslFinishedG994p1 9 -+#define kDslStartedG992p2Training 10 -+#define kDslG992p2DetectedPilotSymbol 11 -+#define kDslG992p2DetectedReverbSymbol 12 -+#define kDslG992p2TEQCalculationDone 13 -+#define kDslG992p2TrainingFEQ 14 -+#define kDslG992p2Phase3Started 15 -+#define kDslG992p2ReceivedRates1 16 -+#define kDslG992p2ReceivedMsg1 17 -+#define kDslG992p2Phase4Started 18 -+#define kDslG992p2ReceivedRatesRA 19 -+#define kDslG992p2ReceivedMsgRA 20 -+#define kDslG992p2ReceivedRates2 21 -+#define kDslG992p2ReceivedMsg2 22 -+#define kDslG992p2ReceivedBitGainTable 23 -+#define kDslG992p2TxShowtimeActive 24 -+#define kDslG992p2RxShowtimeActive 25 -+#define kDslG992p2TxAocMessage 26 -+#define kDslG992p2RxAocMessage 27 -+#define kDslG992p2TxEocMessage 28 -+#define kDslG992p2RxEocMessage 29 -+#define kDslFinishedG992p2Training 30 -+#define kDslRecoveredFromImpulseNoise 31 -+#define kDslG992Timeout 32 -+#define kDslT1p413Isu1SglByteSymDetected 33 /* detected T1.413 Issue 1 single byte per symbol mode */ -+#define kDslG992RxPrefixOnInAFewSymbols 34 -+#define kDslG992TxPrefixOnInAFewSymbols 35 -+#define kDslAnnexCXmtCPilot1Starting 36 -+#define kDslXmtToRcvPathDelay 37 -+#define kDslFeaturesUnsupported 38 -+#define kDslG992RcvMsgCrcError 39 -+#define kDslAnnexCDetectedStartHyperframe 40 -+ -+#define kDslG992AnnexCTimeoutCPilot1Detection 41 -+#define kDslG992AnnexCTimeoutCReverb1Detection 42 -+#define kDslG992AnnexCTimeoutECTraining 43 -+#define kDslG992AnnexCTimeoutHyperframeDetector 44 -+#define kDslG992AnnexCTimeoutSendRSegue2 45 -+#define kDslG992AnnexCTimeoutDetectCSegue1 46 -+#define kDslG992AnnexCAlignmentErrDetected 47 -+#define kDslG992AnnexCTimeoutSendRSegueRA 48 -+#define kDslG992AnnexCTimeoutSendRSegue4 49 -+#define kDslG992AnnexCTimeoutCSegue2Detection 50 -+#define kDslG992AnnexCTimeoutCSegue3Detection 51 -+/* Progress report for fast retrain */ -+ -+#define kG994p1EventToneDetected 54 -+#define kDslG992p2RcvVerifiedBitAndGain 55 -+#define kDslG992p2ProfileChannelResponseCalc 56 -+#define kDslG992AnnexCTotalFEXTBits 57 -+#define kDslG992AnnexCTotalNEXTBits 58 -+#define kDslG992AnnexCTotalFEXTCarrs 59 -+#define kDslG992AnnexCTotalNEXTCarrs 60 -+ -+#define kDslG992p3ReceivedMsgFmt 61 -+#define kDslG992p3ReceivedMsgPcb 62 -+ -+#define kDslG992p3AnnexLMode 63 -+ -+/* performance monitoring report */ -+ -+#define kG992DataRcvDetectFastRSCorrection 70 -+#define kG992DataRcvDetectInterleaveRSCorrection 71 -+#define kG992DataRcvDetectFastCRCError 72 -+#define kG992DataRcvDetectInterleaveCRCError 73 -+#define kG992DataRcvDetectFastRSError 74 -+#define kG992DataRcvDetectInterleaveRSError 75 -+#define kG992DataRcvDetectLOS 76 -+#define kG992DecoderDetectRDI 77 -+#define kG992DataRcvDetectLOSRecovery 78 -+#define kG992AtmDetectHEC 79 -+#define kG992AtmDetectOCD 180 -+#define kG992AtmDetectCD 181 -+#define kG992DecoderDetectRemoteLOS 182 -+#define kG992DecoderDetectRemoteLOSRecovery 183 -+#define kG992DecoderDetectRemoteRDI 184 -+#define kG992DecoderDetectRemoteRDIRecovery 185 -+#define kG992RcvDetectSyncSymbolOffset 186 -+#define kG992Upstream2xIfftDisabled 187 -+#if defined(G992P5) -+#define kDslG992RunAnnexaP3ModeInAnnexaP5 188 /* run Annex C mode in Annex I compiled codes */ -+#else -+#define kDslG992RunAnnexCModeInAnnexI 188 /* run Annex C mode in Annex I compiled codes */ -+#endif -+ -+/* OLR PHY status */ -+ -+#define kG992EventSynchSymbolDetected 189 -+#define kG992EventReverseSynchSymbolDetected 190 -+#define kG992EventL2CReverbSymbolDetected 191 -+#define kG992EventL2CSegueSymbolDetected 192 -+ -+/* ANNEX_M */ -+#define kG992EnableAnnexM 191 -+ -+#define kDslAtuChangeTxFilterRequest 192 -+ -+/* detailed error messages reports */ -+ -+#define kDslG992XmtRReverbRAOver4000 80 -+#define kDslG992XmtRReverb5Over4000 81 -+#define kDslG992RcvCSegue2Failed 82 -+#define kDslG992RcvCSegueRAFailed 83 -+#define kDslG992RcvCSegue3Failed 84 -+#define kDslG992RcvShowtimeStartedTooLate 85 -+#define kDslG992XmtRReverb3Over4000 86 -+#define kDslG992RcvFailDetCSegue1InWindow 87 -+#define kDslG992RcvCPilot1Failed 88 -+#define kDslG992RcvCReverb1Failed 89 -+#define kG992ControlAllRateOptionsFailedErr 90 -+#define kG992ControlInvalidRateOptionErr 91 -+#define kDslG992XmtInvalidXmtDErr 92 -+#define kDslG992BitAndGainCalcFailed 93 -+#define kDslG992BitAndGainVerifyFailed 94 -+ -+#define kDslT1p413RetrainToUseCorrectRAck 95 -+#define kDslUseAlternateTxFilter 96 -+#define kDslT1p413RetrainToUseCorrectIFFT 97 -+ -+typedef long dslConnectInfoStatusCode; -+#define kG992p2XmtToneOrderingInfo 0 -+#define kG992p2RcvToneOrderingInfo 1 -+#define kG992p2XmtCodingParamsInfo 2 -+#define kG992p2RcvCodingParamsInfo 3 -+#define kG992p2TrainingRcvCarrEdgeInfo 4 -+#define kG992ShowtimeMonitoringStatus 5 -+#define kG992MessageExchangeRcvInfo 6 -+#define kG992MessageExchangeXmtInfo 7 -+#define kG994MessageExchangeRcvInfo 8 -+#define kG994MessageExchangeXmtInfo 9 -+ -+#define kDslATURClockErrorInfo 10 -+#define kDslATURcvPowerInfo 11 -+#define kDslATUAvgLoopAttenuationInfo 12 -+#define kDslHWTimeTrackingResetClockError 13 -+#define kDslHWTimeTrackingClockTweak 14 -+#define kDslATUHardwareAGCObtained 15 -+#define kDslTEQCoefInfo 16 -+#define kDslRcvCarrierSNRInfo 17 -+#define kDslMaxReceivableBitRateInfo 18 -+#define kDslHWSetDigitalEcUpdateMode 19 -+#define kDslHWEnableDigitalECUpdate 20 -+#define kDslHWDisableDigitalECUpdate 21 -+#define kDslHWEnableDigitalEC 22 -+#define kDslHWSetDigitalEcGainShift 23 -+#define kDslHWSetDigitalEcUpdateShift 24 -+#define kDslRcvPsdInfo 25 -+#define kDslHWdcOffsetInfo 26 -+#define kG994SelectedG994p1CarrierIndex 27 -+#define kDslSelectedTimingTone 28 -+ -+#define kDslHWEnableAnalogECUpdate kDslHWSetDigitalEcUpdateMode -+#define kDslHWEnableAnalogEC kDslHWDisableDigitalECUpdate -+ -+#define kG992AocMessageExchangeRcvInfo 29 -+#define kG992AocMessageExchangeXmtInfo 30 -+#define kG992AocBitswapTxStarted 31 -+#define kG992AocBitswapRxStarted 32 -+#define kG992AocBitswapTxCompleted 33 -+#define kG992AocBitswapRxCompleted 34 -+#define kDslChannelResponseLog 35 -+#define kDslChannelResponseLinear 36 -+#define kDslChannelQuietLineNoise 37 -+ -+#define kDslATUCXmtPowerCutbackInfo 40 -+#define kDslATURXmtPowerCutbackInfo 41 -+#define kDslATUCXmtPowerInfo 42 -+#define kDslATURXmtPowerInfo 43 -+ -+#define kDslFramingModeInfo 50 -+#define kDslG992VendorID 51 -+ -+#ifdef BCM6348_SRC -+#define kDslHWSetRcvFir2OutputScale 52 -+#endif -+ -+#define kDslSignalAttenuation 53 -+#define kDslAttainableNetDataRate 54 -+#define kDslHLinScale 55 -+ -+#define kG992p3XmtCodingParamsInfo 60 -+#define kG992p3RcvCodingParamsInfo 61 -+#define kG992p3PwrStateInfo 62 -+#define kG992PilotToneInfo 63 -+ -+#define kDslSetPilotEyeDisplay 64 -+ -+#define kDslAturHwAgcResolutionMask (0xFFFFFFF8) -+#define kDslAturHwAgcMinGain ((-12)<<4) -+#ifndef BCM6348_SRC -+#define kDslAturHwAgcMaxGain (30<<4) -+#else -+#define kDslAturHwAgcMaxGain (36<<4) -+#endif -+ -+#define kDslFrameStatusSend 1 -+#define kDslFrameStatusSendComplete 2 -+#define kDslFrameStatusRcv 3 -+#define kDslFrameStatusReturn 4 -+ -+typedef struct _dslFramerStatus -+ { -+ dslFramerStatusCode code; -+ union -+ { -+ long value; -+ dslErrorCode error; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long nRxFrameTotal; -+ long nRxFrameError; -+ long nTxFrameTotal; -+ } statistic; -+ } param; -+ } dslFramerStatus; -+ -+typedef struct -+ { -+ dslStatusCode code; -+ union -+ { -+ long value; -+ dslErrorCode error; -+ struct -+ { -+ atmStatusCode code; -+ union -+ { -+ long value; -+ dslErrorCode error; -+ struct -+ { -+ long vci; -+ long mid; -+ long aalType; -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ long vcId; -+ long vci; -+ long aalType; -+ ulong fwdPeakCellTime; -+ ulong backPeakCellTime; -+ } vcInfo; -+ struct -+ { -+ long cellHdr; -+ long oamCmd; -+ } oamInfo; -+ struct -+ { -+ void *pVc; -+ char *pHdr; -+ void *cellHdr; -+ void *cellData; -+ } cellInfo; -+ struct -+ { -+ long totalBits; -+ long errBits; -+ } bertInfo; -+ } param; -+ } atmStatus; -+#ifdef DSL_PACKET -+ dslFramerStatus dslPacketStatus; -+#endif -+#ifdef G997_1_FRAMER -+ dslFramerStatus g997Status; -+#endif -+ struct -+ { -+ dslTrainingStatusCode code; -+ long value; -+ } dslTrainingInfo; -+ struct -+ { -+ dslConnectInfoStatusCode code; -+ long value; -+ void *buffPtr; -+ } dslConnectInfo; -+ struct -+ { -+ long maxMarginCarrier; -+ long maxSNRMargin; -+ long minMarginCarrier; -+ long minSNRMargin; -+ long avgSNRMargin; -+ long nCarriers; -+ void *buffPtr; -+ } dslShowtimeSNRMarginInfo; -+ struct -+ { -+ long code; -+ long vcId; -+ long timeStamp; -+ } dslFrameInfo; -+#ifdef G997_1 -+ struct -+ { -+ long msgId; -+ long msgType; -+ char *dataPtr; -+ } dslClearEocMsg; -+#endif -+ struct -+ { -+ char *fmt; -+ long argNum; -+ void *argPtr; -+ } dslPrintfMsg; -+ struct -+ { -+ ulong nBits; -+ ulong nBlocks; -+ ulong nBitErrors; -+ ulong nBlockErrors; -+ -+ ulong nAudioBits; -+ ulong nAudioBlocks; -+ ulong nAudioSyncErrors; -+ ulong nAudioBlockErrors; -+ } testResults; -+ struct -+ { -+ ulong code; -+ uchar *valuePtr; -+ ulong length; -+ } dslDataRegister; -+ struct -+ { -+ ulong code; -+ char *desc; -+ } dslExternalError; -+ struct -+ { -+ ulong numberOfCalls; -+ ulong txSignalChecksum; -+ ulong rxSignalChecksum; -+ ulong eyeDataChecksum; -+ } checksums; -+ struct -+ { -+ int sp; -+ int argc; -+ int *argv; -+ int *stackPtr; -+ int stackLen; -+ } dslException; -+ struct -+ { -+ ulong paramId; -+ void *dataPtr; -+ ulong dataLen; -+ } dslOemParameter; -+ struct -+ { -+ void *dataPtr; -+ ulong dataLen; -+ } dslDataAvail; -+ dslOLRMessage dslOLRRequest; -+ dslPwrMessage dslPwrMsg; -+ } param; -+ } dslStatusStruct; -+ -+typedef void (SM_DECL *dslStatusHandlerType) (void *gDslVars, dslStatusStruct*); -+ -+ -+/* -+** -+** Command codes -+** -+*/ -+ -+typedef long dslCommandCode; -+#define kFirstDslCommandCode 256 -+#define kDslIdleCmd (kFirstDslCommandCode + 0) -+#define kDslIdleRcvCmd (kFirstDslCommandCode + 1) -+#define kDslIdleXmtCmd (kFirstDslCommandCode + 2) -+#define kDslStartPhysicalLayerCmd (kFirstDslCommandCode + 3) -+#define kDslStartRetrainCmd (kFirstDslCommandCode + 4) -+#define kDslSetFrameFunctions (kFirstDslCommandCode + 5) -+#define kDslSendEocCommand (kFirstDslCommandCode + 6) -+#define kDslWriteRemoteRegister (kFirstDslCommandCode + 7) -+#define kDslReadRemoteRegister (kFirstDslCommandCode + 8) -+#define kDslWriteLocalRegister (kFirstDslCommandCode + 9) -+#define kDslReadLocalRegister (kFirstDslCommandCode + 10) -+#define kDslStoreHardwareAGCCmd (kFirstDslCommandCode + 11) -+#define kDslSetCommandHandlerCmd (kFirstDslCommandCode + 12) -+#define kSetLinkLayerStatusHandlerCmd (kFirstDslCommandCode + 13) -+#define kDslSetG997Cmd (kFirstDslCommandCode + 14) -+#define kDslLoopbackCmd (kFirstDslCommandCode + 15) -+#define kDslDiagSetupCmd (kFirstDslCommandCode + 16) -+#define kDslSetDriverCallbackCmd (kFirstDslCommandCode + 17) -+#define kDslDiagStopLogCmd (kFirstDslCommandCode + 18) -+#define kDslDiagStartBERT (kFirstDslCommandCode + 19) -+#define kDslDiagStopBERT (kFirstDslCommandCode + 20) -+#define kDslPingCmd (kFirstDslCommandCode + 21) -+#define kDslDyingGaspCmd (kFirstDslCommandCode + 22) -+#define kDslTestCmd (kFirstDslCommandCode + 23) -+#define kDslFilterSNRMarginCmd (kFirstDslCommandCode + 24) -+#define kDslAtmVcMapTableChanged (kFirstDslCommandCode + 25) -+#define kDslGetOemDataAddrCmd (kFirstDslCommandCode + 26) -+#define kDslAtmReportHEC (kFirstDslCommandCode + 27) -+#define kDslAtmReportCD (kFirstDslCommandCode + 28) -+#define kDslSetXmtGainCmd (kFirstDslCommandCode + 29) -+#define kDslSetStatusBufferCmd (kFirstDslCommandCode + 30) -+#define kDslAfeTestCmd (kFirstDslCommandCode + 31) -+#define kDslI432ResetCmd (kFirstDslCommandCode + 32) -+#define kDslSetRcvGainCmd (kFirstDslCommandCode + 33) -+#define kDslBypassRcvHpfCmd (kFirstDslCommandCode + 34) -+#define kDslWriteAfeRegCmd (kFirstDslCommandCode + 35) -+#define kDslReadAfeRegCmd (kFirstDslCommandCode + 36) -+#define kDslOLRRequestCmd (kFirstDslCommandCode + 37) -+#define kDslOLRResponseCmd (kFirstDslCommandCode + 38) -+#define kDslI432SetScrambleCmd (kFirstDslCommandCode + 39) -+#define kDslPwrMgrCmd (kFirstDslCommandCode + 40) -+#define kDslAtmGfcMappingCmd (kFirstDslCommandCode + 41) -+ -+#ifdef BCM6348_SRC -+#define kDslEnablePwmSyncClk (kFirstDslCommandCode + 42) -+#define kDslSetPwmSyncClkFreq (kFirstDslCommandCode + 43) -+#endif -+ -+#define kG994p1Duplex 1 -+#define kG994p1HalfDuplex 2 -+ -+/* Eoc Messages from ATU-C to ATU-R */ -+#define kDslEocHoldStateCmd 1 -+#define kDslEocReturnToNormalCmd 2 -+#define kDslEocPerformSelfTestCmd 3 -+#define kDslEocRequestCorruptCRCCmd 4 -+#define kDslEocRequestEndCorruptCRCCmd 5 -+#define kDslEocNotifyCorruptCRCCmd 6 -+#define kDslEocNotifyEndCorruptCRCCmd 7 -+#define kDslEocRequestTestParametersUpdateCmd 8 -+#define kDslEocGrantPowerDownCmd 9 -+#define kDslEocRejectPowerDownCmd 10 -+ -+/* Eoc Messages from ATU-R to ATU-C */ -+#define kDslEocRequestPowerDownCmd 11 -+#define kDslEocDyingGaspCmd 12 -+ -+/* Clear Eoc Messages */ -+#define kDslClearEocFirstCmd 100 -+#define kDslClearEocSendFrame 100 -+#define kDslClearEocSendComplete 101 -+#define kDslClearEocRcvedFrame 102 -+#define kDslClearEocSendComplete2 103 -+ -+#define kDslClearEocMsgLengthMask 0xFFFF -+#define kDslClearEocMsgNumMask 0xFF0000 -+#define kDslClearEocMsgDataVolatileMask 0x1000000 -+#define kDslClearEocMsgDataVolatile kDslClearEocMsgDataVolatileMask -+#define kDslClearEocMsgExtraSendComplete 0x2000000 -+ -+/* ADSL Link Power States */ -+#define kDslPowerFullOn 0 -+#define kDslPowerLow 1 -+#define kDslPowerIdle 3 -+ -+/* ATU-R Data Registers */ -+#define kDslVendorIDRegister 1 -+#define kDslRevisionNumberRegister 2 -+#define kDslSerialNumberRegister 3 -+#define kDslSelfTestResultsRegister 4 -+#define kDslLineAttenuationRegister 5 -+#define kDslSnrMarginRegister 6 -+#define kDslAturConfigurationRegister 7 -+#define kDslLinkStateRegister 8 -+ -+#define kDslVendorIDRegisterLength 8 -+#define kDslRevisionNumberRegisterLength 32 -+#define kDslSerialNumberRegisterLength 32 -+#define kDslSelfTestResultsRegisterLength 1 -+#define kDslLineAttenuationRegisterLength 1 -+#define kDslSnrMarginRegisterLength 1 -+#define kDslAturConfigurationRegisterLength 30 -+#define kDslLinkStateRegisterLength 1 -+ -+/* Dsl Diags setup flags */ -+#define kDslDiagEnableEyeData 1 -+#define kDslDiagEnableLogData 2 -+ -+/* Dsl test commands */ -+typedef long dslTestCmdType; -+#define kDslTestBackToNormal 0 -+#define kDslTestReverb 1 -+#define kDslTestMedley 2 -+#define kDslTestToneSelection 3 -+#define kDslTestNoAutoRetrain 4 -+#define kDslTestMarginTweak 5 -+#define kDslTestEstimatePllPhase 6 -+#define kDslTestReportPllPhaseStatus 7 -+#define kDslTestAfeLoopback 8 -+#define kDslTestL3 9 -+#define kDslTestAdsl2DiagMode 10 -+#define kDslTestRetL0 11 -+ -+/* Xmt gain default setting */ -+#define kDslXmtGainAuto 0x80000000 -+ -+/* Unit (AFE) test commands */ -+#define kDslAfeTestLoadImage 0 -+#define kDslAfeTestPatternSend 1 -+#define kDslAfeTestLoadImageOnly 2 -+#define kDslAfeTestPhyRun 3 -+#define kDslAfeTestLoadBuffer 4 -+ -+typedef struct -+ { -+#if defined(G992P1_ANNEX_I) || defined(G992P5) -+ ushort downstreamMinCarr, downstreamMaxCarr; -+#else -+ uchar downstreamMinCarr, downstreamMaxCarr; -+#endif -+ uchar upstreamMinCarr, upstreamMaxCarr; -+ }carrierInfo; -+ -+#if defined(G992P3) && !defined(BCM6348_SRC) -+#define FAST_TEXT_TYPE -+#else -+#define FAST_TEXT_TYPE FAST_TEXT -+#endif -+ -+#if defined(BCM6348_SRC) -+#define BCM6348_TEMP_MOVE_TO_LMEM -+#else -+#define BCM6348_TEMP_MOVE_TO_LMEM -+#endif -+ -+#ifdef G992P3 -+#define PRINT_DEBUG_INFO -+#else -+#define PRINT_DEBUG_INFO -+#endif -+ -+#ifdef G992P3 -+ -+#define kG992p3MaxSpectBoundsUpSize 16 -+#define kG992p3MaxSpectBoundsDownSize 16 -+ -+/* G.994 definitions */ -+ -+/*** Standard Info SPar2: G.992.3 Annex A Octet 1 ***/ -+ -+#define kG994p1G992p3AnnexASpectrumBoundsUpstream 0x01 -+#define kG994p1G992p3AnnexASpectrumShapingUpstream 0x02 -+#define kG994p1G992p3AnnexASpectrumBoundsDownstream 0x04 -+#define kG994p1G992p3AnnexASpectrumShapingDownstream 0x08 -+#define kG994p1G992p3AnnexATxImageAboveNyquistFreq 0x10 -+#define kG994p1G992p3AnnexLReachExtended 0x20 -+#define kG994p1G992p3AnnexMSubModePSDMasks 0x20 -+ -+#define kG994p1G992p3AnnexLUpNarrowband 0x02 -+#define kG994p1G992p3AnnexLUpWideband 0x01 -+#define kG994p1G992p3AnnexLDownNonoverlap 0x01 -+ -+/*** Standard Info SPar2: G.992.3 Annex A Octet 2 ***/ -+ -+#define kG994p1G992p3AnnexADownOverheadDataRate 0x01 -+#define kG994p1G992p3AnnexAUpOverheadDataRate 0x02 -+#define kG994p1G992p3AnnexAMaxNumberDownTPSTC 0x04 -+#define kG994p1G992p3AnnexAMaxNumberUpTPSTC 0x08 -+ -+/*** Standard Info SPar2: G.992.3 Annex A Octet 3,5,7,9 ***/ -+ -+#define kG994p1G992p3AnnexADownSTM_TPS_TC 0x01 -+#define kG994p1G992p3AnnexAUpSTM_TPS_TC 0x02 -+#define kG994p1G992p3AnnexADownATM_TPS_TC 0x04 -+#define kG994p1G992p3AnnexAUpATM_TPS_TC 0x08 -+#define kG994p1G992p3AnnexADownPTM_TPS_TC 0x10 -+#define kG994p1G992p3AnnexAUpPTM_TPS_TC 0x20 -+ -+/*** Standard Info SPar2: G.992.3 Annex A Octet 4,6,8,10 ***/ -+ -+#define kG994p1G992p3AnnexADownPMS_TC_Latency 0x01 -+#define kG994p1G992p3AnnexAUpPMS_TC_Latency 0x02 -+ -+/*** -+ * TSSI -+ * -+ * TSSI information is specified in 2 parts: subcarrier index, -+ * tssi value, and an indication of whether or no the tone specified -+ * is part of the supported set. -+ * -+ * The subcarrier index information is currently stored in the -+ * dsSubcarrierIndex array defined below. The tssi value are stored -+ * in the dsLog_tss array. -+ * -+ * The subcarrier index information only occupies the lower 12 bits -+ * of the available 16 bits (short type). Therefore, we will pack the -+ * supported set information in bit 15. -+ */ -+#define kG992DsSubCarrierIndexMask (0x0fff) /* AND mask to ectract ds subcarrier index */ -+#define kG992DsSubCarrierSuppSetMask (0x8000) /* AND mask to extract supported set indication */ -+ -+#define G992GetDsSubCarrierIndex(arg) ((arg) & kG992DsSubCarrierIndexMask) -+#define G992GetDsSubCarrierSuppSetIndication(arg) (((arg) & kG992DsSubCarrierSuppSetMask) >> 15) -+ -+/* Caution: Do not change anything in this structure definition, including associated constant */ -+/* This structure definition is used only by the driver and any change impose incompatibility issue in driver */ -+/* The structure following this structure (g992p3PhyDataPumpCapabilities) can be changed in PHY application */ -+ -+typedef struct -+ { -+ Boolean rcvNTREnabled, shortInitEnabled, diagnosticsModeEnabled; -+ -+ char featureSpectrum, featureOverhead; -+ char featureTPS_TC[4], featurePMS_TC[4]; -+ -+ short rcvNOMPSDus, rcvMAXNOMPSDus, rcvMAXNOMATPus; -+ short usSubcarrierIndex[kG992p3MaxSpectBoundsUpSize], -+ usLog_tss[kG992p3MaxSpectBoundsUpSize]; -+ short numUsSubcarrier; -+ short rcvNOMPSDds, rcvMAXNOMPSDds, rcvMAXNOMATPds; -+ short dsSubcarrierIndex[kG992p3MaxSpectBoundsDownSize], -+ dsLog_tss[kG992p3MaxSpectBoundsDownSize]; -+ short numDsSubcarrier; -+ uchar sizeIDFT, fillIFFT; -+ uchar readsl2Upstream, readsl2Downstream; -+ uchar minDownOverheadDataRate, minUpOverheadDataRate; -+ uchar maxDownSTM_TPSTC, maxDownATM_TPSTC, maxDownPTM_TPSTC; -+ uchar maxUpSTM_TPSTC, maxUpATM_TPSTC, maxUpPTM_TPSTC; -+ -+ short minDownSTM_TPS_TC[4], maxDownSTM_TPS_TC[4], -+ minRevDownSTM_TPS_TC[4], maxDelayDownSTM_TPS_TC[4]; -+ uchar maxErrorDownSTM_TPS_TC[4], minINPDownSTM_TPS_TC[4]; -+ short minUpSTM_TPS_TC[4], maxUpSTM_TPS_TC[4], -+ minRevUpSTM_TPS_TC[4], maxDelayUpSTM_TPS_TC[4]; -+ uchar maxErrorUpSTM_TPS_TC[4], minINPUpSTM_TPS_TC[4]; -+ -+ short maxDownPMS_TC_Latency[4], maxUpPMS_TC_Latency[4]; -+ short maxDownR_PMS_TC_Latency[4], maxDownD_PMS_TC_Latency[4]; -+ short maxUpR_PMS_TC_Latency[4], maxUpD_PMS_TC_Latency[4]; -+ -+ short minDownATM_TPS_TC[4], maxDownATM_TPS_TC[4], -+ minRevDownATM_TPS_TC[4], maxDelayDownATM_TPS_TC[4]; -+ uchar maxErrorDownATM_TPS_TC[4], minINPDownATM_TPS_TC[4]; -+ short minUpATM_TPS_TC[4], maxUpATM_TPS_TC[4], -+ minRevUpATM_TPS_TC[4], maxDelayUpATM_TPS_TC[4]; -+ uchar maxErrorUpATM_TPS_TC[4], minINPUpATM_TPS_TC[4]; -+ -+ short minDownPTM_TPS_TC[4], maxDownPTM_TPS_TC[4], -+ minRevDownPTM_TPS_TC[4], maxDelayDownPTM_TPS_TC[4]; -+ uchar maxErrorDownPTM_TPS_TC[4], minINPDownPTM_TPS_TC[4]; -+ short minUpPTM_TPS_TC[4], maxUpPTM_TPS_TC[4], -+ minRevUpPTM_TPS_TC[4], maxDelayUpPTM_TPS_TC[4]; -+ uchar maxErrorUpPTM_TPS_TC[4], minINPUpPTM_TPS_TC[4]; -+ -+ ushort subModePSDMasks; -+ } g992p3DataPumpCapabilities; -+ -+#define kG992p3p5MaxSpectBoundsUpSize 16 -+#define kG992p3p5MaxSpectBoundsDownSize 32 -+ -+typedef struct -+ { -+ Boolean rcvNTREnabled, shortInitEnabled, diagnosticsModeEnabled; -+ -+ char featureSpectrum, featureOverhead; -+ char featureTPS_TC[4], featurePMS_TC[4]; -+ -+ short rcvNOMPSDus, rcvMAXNOMPSDus, rcvMAXNOMATPus; -+ short usSubcarrierIndex[kG992p3p5MaxSpectBoundsUpSize], -+ usLog_tss[kG992p3p5MaxSpectBoundsUpSize]; -+ short numUsSubcarrier; -+ short rcvNOMPSDds, rcvMAXNOMPSDds, rcvMAXNOMATPds; -+ short dsSubcarrierIndex[kG992p3p5MaxSpectBoundsDownSize], -+ dsLog_tss[kG992p3p5MaxSpectBoundsDownSize]; -+ short numDsSubcarrier; -+ uchar sizeIDFT, fillIFFT; -+ uchar readsl2Upstream, readsl2Downstream; -+ uchar minDownOverheadDataRate, minUpOverheadDataRate; -+ uchar maxDownSTM_TPSTC, maxDownATM_TPSTC, maxDownPTM_TPSTC; -+ uchar maxUpSTM_TPSTC, maxUpATM_TPSTC, maxUpPTM_TPSTC; -+ -+ short minDownSTM_TPS_TC[4], maxDownSTM_TPS_TC[4], -+ minRevDownSTM_TPS_TC[4], maxDelayDownSTM_TPS_TC[4]; -+ uchar maxErrorDownSTM_TPS_TC[4], minINPDownSTM_TPS_TC[4]; -+ short minUpSTM_TPS_TC[4], maxUpSTM_TPS_TC[4], -+ minRevUpSTM_TPS_TC[4], maxDelayUpSTM_TPS_TC[4]; -+ uchar maxErrorUpSTM_TPS_TC[4], minINPUpSTM_TPS_TC[4]; -+ -+ short maxDownPMS_TC_Latency[4], maxUpPMS_TC_Latency[4]; -+ short maxDownR_PMS_TC_Latency[4], maxDownD_PMS_TC_Latency[4]; -+ short maxUpR_PMS_TC_Latency[4], maxUpD_PMS_TC_Latency[4]; -+ -+ short minDownATM_TPS_TC[4], maxDownATM_TPS_TC[4], -+ minRevDownATM_TPS_TC[4], maxDelayDownATM_TPS_TC[4]; -+ uchar maxErrorDownATM_TPS_TC[4], minINPDownATM_TPS_TC[4]; -+ short minUpATM_TPS_TC[4], maxUpATM_TPS_TC[4], -+ minRevUpATM_TPS_TC[4], maxDelayUpATM_TPS_TC[4]; -+ uchar maxErrorUpATM_TPS_TC[4], minINPUpATM_TPS_TC[4]; -+ -+ short minDownPTM_TPS_TC[4], maxDownPTM_TPS_TC[4], -+ minRevDownPTM_TPS_TC[4], maxDelayDownPTM_TPS_TC[4]; -+ uchar maxErrorDownPTM_TPS_TC[4], minINPDownPTM_TPS_TC[4]; -+ short minUpPTM_TPS_TC[4], maxUpPTM_TPS_TC[4], -+ minRevUpPTM_TPS_TC[4], maxDelayUpPTM_TPS_TC[4]; -+ uchar maxErrorUpPTM_TPS_TC[4], minINPUpPTM_TPS_TC[4]; -+ -+ ushort subModePSDMasks; -+ } g992p3PhyDataPumpCapabilities; -+#endif -+ -+typedef struct -+ { -+ dslModulationType modulations; -+ bitMap auxFeatures; -+ bitMap features; -+ bitMap demodCapabilities; -+ bitMap demodCapabilities2; -+ ushort noiseMargin; /* Q4 dB */ -+#ifdef G992_ATUC -+ short xmtRSf, xmtRS, xmtS, xmtD; -+ short rcvRSf, rcvRS, rcvS, rcvD; -+#endif -+#ifdef G992P1_ANNEX_A -+ bitMap subChannelInfo; -+ carrierInfo carrierInfoG992p1; -+#endif -+#ifdef G992P1_ANNEX_B -+ bitMap subChannelInfoAnnexB; -+ carrierInfo carrierInfoG992p1AnnexB; -+#endif -+#ifdef G992_ANNEXC -+ bitMap subChannelInfoAnnexC; -+ carrierInfo carrierInfoG992p1AnnexC; -+#endif -+#if defined(G992P1_ANNEX_I) -+ bitMap subChannelInfoAnnexI; -+ carrierInfo carrierInfoG992p1AnnexI; -+#endif -+#ifdef G992P5 -+ bitMap subChannelInfop5; -+ carrierInfo carrierInfoG992p5; -+#endif -+#if defined(G992P2) || (defined(G992P1_ANNEX_A) && defined(G992P1_ANNEX_A_USED_FOR_G992P2)) -+ carrierInfo carrierInfoG992p2; -+#endif -+ ushort maxDataRate; -+ uchar minDataRate; -+#ifdef G992P3 -+ g992p3DataPumpCapabilities *carrierInfoG992p3AnnexA; -+#endif -+#ifdef G992P5 -+ g992p3DataPumpCapabilities *carrierInfoG992p5AnnexA; -+#endif -+ } dslDataPumpCapabilities; -+ -+struct __dslCommandStruct; -+typedef Boolean (*dslCommandHandlerType) (void *gDslVars, struct __dslCommandStruct*); -+typedef struct __dslCommandStruct -+ { -+ dslCommandCode command; -+ union -+ { -+ long value; -+ Boolean flag; -+ struct -+ { -+ dslTestCmdType type; -+ union -+ { -+ struct -+ { -+ ulong xmtStartTone, xmtNumOfTones; -+ ulong rcvStartTone, rcvNumOfTones; -+ uchar *xmtMap, *rcvMap; -+ } toneSelectSpec; -+ struct -+ { -+ long extraPowerRequestQ4dB; -+ long numOfCarriers; -+ char *marginTweakTableQ4dB; -+ } marginTweakSpec; -+ } param; -+ } dslTestSpec; -+ struct -+ { -+ dslDirectionType direction; -+ dslDataPumpCapabilities capabilities; -+ } dslModeSpec; -+ struct -+ { -+ bitMap setup; -+ ulong eyeConstIndex1; -+ ulong eyeConstIndex2; -+ ulong logTime; -+ } dslDiagSpec; -+ struct -+ { -+ void *pBuf; -+ ulong bufSize; -+ } dslStatusBufSpec; -+ struct -+ { -+ ulong type; -+ void *afeParamPtr; -+ ulong afeParamSize; -+ void *imagePtr; -+ ulong imageSize; -+ } dslAfeTestSpec; -+ struct -+ { -+ dslLinkLayerType type; -+ bitMap setup; -+ union -+ { -+ struct -+ { -+ dataRateMap rxDataRate; -+ dataRateMap txDataRate; -+ long rtDelayQ4ms; -+ ulong rxBufNum; -+ ulong rxCellsInBuf; -+ ulong rxPacketNum; -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslPhyInitType atmPhyInitPtr; -+ } atmLinkSpec; -+ struct -+ { -+ dslHeaderHandlerType rxHeaderHandlerPtr; -+ dslRxFrameBufferHandlerType rxDataHandlerPtr; -+ dslTxFrameBufferHandlerType txHandlerPtr; -+ } atmPhyLinkSpec; -+#ifdef DSL_PACKET -+ struct -+ { -+ ulong rxBufNum; -+ ulong rxBufSize; -+ ulong rxPacketNum; -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslPacketPhyInitType dslPhyInitPtr; -+ } dslPacketLinkSpec; -+ dslPacketPhyFunctions dslPacketPhyLinkSpec; -+#endif -+ struct -+ { -+ txDataHandlerType txDataHandlerPtr; -+ rxDataHandlerType rxDataHandlerPtr; -+ } nullLinkSpec; -+ } param; -+ } dslLinkLayerSpec; -+#ifdef G997_1 -+#ifdef G997_1_FRAMER -+ struct -+ { -+ bitMap setup; -+ ulong rxBufNum; -+ ulong rxBufSize; -+ ulong rxPacketNum; -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ } dslG997Cmd; -+#endif -+ struct -+ { -+ long msgId; -+ long msgType; -+ char *dataPtr; -+ } dslClearEocMsg; -+#endif -+ struct -+ { -+ ulong code; -+ uchar *valuePtr; -+ ulong length; -+ } dslDataRegister; -+ union -+ { -+ dslStatusHandlerType statusHandlerPtr; -+ dslCommandHandlerType commandHandlerPtr; -+ eyeHandlerType eyeHandlerPtr; -+ logHandlerType logHandlerPtr; -+#if defined(DEBUG_DATA_HANDLER) -+ debugDataHandlerType debugDataHandlerPtr; -+#endif -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslDriverCallbackType driverCallback; -+ } handlerSpec; -+#if !defined(CHIP_SRC) || defined(DSL_FRAME_FUNCTIONS) -+ dslFrameFunctions DslFunctions; -+#endif -+ dslOLRMessage dslOLRRequest; -+ dslPwrMessage dslPwrMsg; -+ } param; -+ } dslCommandStruct; -+ -+ -+ -+ -+typedef struct -+ { -+ dslCommandHandlerType linkCommandHandlerPtr; -+ timerHandlerType linkTimerHandlerPtr; -+ dslLinkCloseHandlerType linkCloseHandlerPtr; -+ -+ dslFrameHandlerType linkSendHandlerPtr; -+ dslFrameHandlerType linkReturnHandlerPtr; -+ -+ dslVcAllocateHandlerType linkVcAllocateHandlerPtr; -+ dslVcFreeHandlerType linkVcFreeHandlerPtr; -+ dslVcActivateHandlerType linkVcActivateHandlerPtr; -+ dslVcDeactivateHandlerType linkVcDeactivateHandlerPtr; -+ dslVcConfigureHandlerType linkVcConfigureHandlerPtr; -+ -+ dslLinkVc2IdHandlerType linkVc2IdHandlerPtr; -+ dslLinkVcId2VcHandlerType linkVcId2VcHandlerPtr; -+ dslGetFramePoolHandlerType linkGetFramePoolHandlerPtr; -+ -+#ifndef ADSLCORE_ONLY -+ dslHeaderHandlerType linkRxCellHeaderHandlerPtr; -+ dslRxFrameBufferHandlerType linkRxCellDataHandlerPtr; -+ dslTxFrameBufferHandlerType linkTxCellHandlerPtr; -+#endif -+ -+ txDataHandlerType linkTxDataHandlerPtr; -+ rxDataHandlerType linkRxDataHandlerPtr; -+ } linkLayerFunctions; -+ -+#ifndef ADSLCORE_ONLY -+ -+#define LinkLayerAssignFunctions( var, name_prefix ) do { \ -+ (var).linkCommandHandlerPtr = name_prefix##CommandHandler; \ -+ (var).linkTimerHandlerPtr = name_prefix##TimerHandler; \ -+ (var).linkCloseHandlerPtr = name_prefix##CloseHandler; \ -+ \ -+ (var).linkSendHandlerPtr = name_prefix##SendFrameHandler; \ -+ (var).linkReturnHandlerPtr = name_prefix##ReturnFrameHandler; \ -+ \ -+ (var).linkVcAllocateHandlerPtr = name_prefix##VcAllocateHandler; \ -+ (var).linkVcFreeHandlerPtr = name_prefix##VcFreeHandler; \ -+ (var).linkVcActivateHandlerPtr = name_prefix##VcActivateHandler; \ -+ (var).linkVcDeactivateHandlerPtr = name_prefix##VcDeactivateHandler; \ -+ (var).linkVcConfigureHandlerPtr = name_prefix##VcConfigureHandler; \ -+ \ -+ (var).linkVc2IdHandlerPtr = name_prefix##Vc2IdHandler; \ -+ (var).linkVcId2VcHandlerPtr = name_prefix##VcId2VcHandler; \ -+ (var).linkGetFramePoolHandlerPtr = name_prefix##GetFramePoolHandler; \ -+ \ -+ (var).linkRxCellHeaderHandlerPtr = name_prefix##RxCellHeaderHandler; \ -+ (var).linkRxCellDataHandlerPtr = name_prefix##RxCellDataHandler; \ -+ (var).linkTxCellHandlerPtr = name_prefix##TxCellHandler; \ -+ \ -+ (var).linkTxDataHandlerPtr = name_prefix##TxDataHandler; \ -+ (var).linkRxDataHandlerPtr = name_prefix##RxDataHandler; \ -+} while (0) -+ -+#else -+ -+#define LinkLayerAssignFunctions( var, name_prefix ) do { \ -+ (var).linkCommandHandlerPtr = name_prefix##CommandHandler; \ -+ (var).linkTimerHandlerPtr = name_prefix##TimerHandler; \ -+ (var).linkCloseHandlerPtr = name_prefix##CloseHandler; \ -+ \ -+ (var).linkSendHandlerPtr = name_prefix##SendFrameHandler; \ -+ (var).linkReturnHandlerPtr = name_prefix##ReturnFrameHandler; \ -+ \ -+ (var).linkVcAllocateHandlerPtr = name_prefix##VcAllocateHandler; \ -+ (var).linkVcFreeHandlerPtr = name_prefix##VcFreeHandler; \ -+ (var).linkVcActivateHandlerPtr = name_prefix##VcActivateHandler; \ -+ (var).linkVcDeactivateHandlerPtr = name_prefix##VcDeactivateHandler; \ -+ (var).linkVcConfigureHandlerPtr = name_prefix##VcConfigureHandler; \ -+ \ -+ (var).linkVc2IdHandlerPtr = name_prefix##Vc2IdHandler; \ -+ (var).linkVcId2VcHandlerPtr = name_prefix##VcId2VcHandler; \ -+ (var).linkGetFramePoolHandlerPtr = name_prefix##GetFramePoolHandler; \ -+ \ -+ (var).linkTxDataHandlerPtr = name_prefix##TxDataHandler; \ -+ (var).linkRxDataHandlerPtr = name_prefix##RxDataHandler; \ -+} while (0) -+ -+#endif -+ -+typedef struct -+ { -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslStatusHandlerType statusHandlerPtr; -+ } upperLayerFunctions; -+ -+ -+/* -+ * Debug data -+ */ -+#define kDslFirstDebugData 1000 -+#define kDslXmtPerSymTimeCompData (kDslFirstDebugData + 0) -+#define kDslRcvPerSymTimeCompData (kDslFirstDebugData + 1) -+#define kDslXmtAccTimeCompData (kDslFirstDebugData + 2) -+#define kDslRcvAccTimeCompData (kDslFirstDebugData + 3) -+#define kDslRcvPilotToneData (kDslFirstDebugData + 4) -+#define kDslTEQCoefData (kDslFirstDebugData + 5) -+#define kDslTEQInputData (kDslFirstDebugData + 6) -+#define kDslTEQOutputData (kDslFirstDebugData + 7) -+#define kDslRcvFFTInputData (kDslFirstDebugData + 8) -+#define kDslRcvFFTOutputData (kDslFirstDebugData + 9) -+#define kDslRcvCarrierSNRData (kDslFirstDebugData + 10) -+#define kDslXmtToneOrderingData (kDslFirstDebugData + 11) -+#define kDslRcvToneOrderingData (kDslFirstDebugData + 12) -+#define kDslXmtGainData (kDslFirstDebugData + 13) -+#define kDslRcvGainData (kDslFirstDebugData + 14) -+#define kDslMseData (kDslFirstDebugData + 15) -+#define kDslFEQOutErrData (kDslFirstDebugData + 16) -+#define kDslFEQCoefData (kDslFirstDebugData + 17) -+#define kDslShowtimeMseData (kDslFirstDebugData + 18) -+#define kDslTimeEstimationHWPhaseTweak (kDslFirstDebugData + 24) -+#define kDslSlicerInput (kDslFirstDebugData + 40) -+#define kDslXmtConstellations (kDslFirstDebugData + 41) -+#define kDslSnr1ShiftData (kDslFirstDebugData + 50) -+#define kDslSnr1InputData (kDslFirstDebugData + 51) -+#define kDslSnr1ReverbAvgData (kDslFirstDebugData + 52) -+#define kDslAnnexCFextSnrData (kDslFirstDebugData + 53) -+#define kDslAnnexCNextSnrData (kDslFirstDebugData + 54) -+#define kG994p1OutputXmtSample (kDslFirstDebugData + 100) -+#define kG994p1OutputMicroBit (kDslFirstDebugData + 101) -+#define kG994p1OutputBit (kDslFirstDebugData + 102) -+#define kG994p1OutputTimer (kDslFirstDebugData + 103) -+ -+/****************************************************************************/ -+/* 2. Constant definitions. */ -+/* */ -+/* 2.1 Defininitive constants */ -+/****************************************************************************/ -+ -+/* dslDirectionType */ -+ -+#define kATU_C 0 -+#define kATU_R 1 -+ -+/* ATM setup maps */ -+ -+#define kAtmCallMgrEnabled 0x00000001 /* Bit 0 */ -+#define kAtmAAL1FecEnabledMask 0x00000006 /* Bit 1 */ -+#define kAtmAAL1HiDelayFecEnabled 0x00000002 /* Bit 2 */ -+#define kAtmAAL1LoDelayFecEnabled 0x00000004 /* Bit 3 */ -+ -+/* dslLinkLayerType */ -+ -+#define kNoDataLink 0 -+#define kAtmLink 0x00000001 -+#define kAtmPhyLink 0x00000002 -+#define kDslPacketLink 0x00000003 -+#define kDslPacketPhyLink 0x00000004 -+ -+/* dslModulationType */ -+#define kNoCommonModulation 0x00000000 -+#define kG994p1 0x00000020 /* G.994.1 or G.hs */ -+#define kT1p413 0x00000040 /* T1.413 handshaking */ -+#define kG992p1AnnexA 0x00000001 /* G.992.1 or G.dmt Annex A */ -+#define kG992p1AnnexB 0x00000002 /* G.992.1 or G.dmt Annex B */ -+#define kG992p1AnnexC 0x00000004 /* G.992.1 or G.dmt Annex C */ -+#define kG992p2AnnexAB 0x00000008 /* G.992.2 or G.lite Annex A/B */ -+#define kG992p2AnnexC 0x00000010 /* G.992.2 or G.lite Annex C */ -+#define kG992p3AnnexA 0x00000100 /* G.992.3 or G.DMTbis Annex A */ -+#define kG992p3AnnexB 0x00000200 /* G.992.3 or G.DMTbis Annex A */ -+#define kG992p1AnnexI 0x00000400 /* G.992.1 Annex I */ -+#define kG992p5AnnexA 0x00010000 /* G.992.5 Annex A */ -+#define kG992p5AnnexB 0x00020000 /* G.992.5 Annex B */ -+#define kG992p5AnnexI 0x00040000 /* G.992.5 Annex I */ -+#define kG992p3AnnexM 0x00080000 /* G.992.3 Annex M */ -+#define kG992p5AnnexM 0x01000000 /* G.992.5 Annex M */ -+ -+/* demodCapabilities bitmap */ -+#define kEchoCancellorEnabled 0x00000001 -+#define kSoftwareTimeErrorDetectionEnabled 0x00000002 -+#define kSoftwareTimeTrackingEnabled 0x00000004 -+#define kDslTrellisEnabled 0x00000008 -+#define kHardwareTimeTrackingEnabled 0x00000010 -+#define kHardwareAGCEnabled 0x00000020 -+#define kDigitalEchoCancellorEnabled 0x00000040 -+#define kReedSolomonCodingEnabled 0x00000080 -+#define kAnalogEchoCancellorEnabled 0x00000100 -+#define kT1p413Issue1SingleByteSymMode 0x00000200 -+#define kDslAturXmtPowerCutbackEnabled 0x00000400 -+#ifdef G992_ANNEXC_LONG_REACH -+#define kDslAnnexCPilot48 0x00000800 -+#define kDslAnnexCReverb33_63 0x00001000 -+#endif -+#ifdef G992_ANNEXC -+#define kDslCentilliumCRCWorkAroundEnabled 0x00002000 -+#else -+#define kDslEnableRoundUpDSLoopAttn 0x00002000 -+#endif -+#define kDslBitSwapEnabled 0x00004000 -+#define kDslADILowRateOptionFixDisabled 0x00008000 -+#define kDslAnymediaGSPNCrcFixEnabled 0x00010000 -+#define kDslMultiModesPreferT1p413 0x00020000 -+#define kDslT1p413UseRAck1Only 0x00040000 -+#define kDslUE9000ADI918FECFixEnabled 0x00080000 -+#define kDslG994AnnexAMultimodeEnabled 0x00100000 -+#define kDslATUCXmtPowerMinimizeEnabled 0x00200000 -+#define kDropOnDataErrorsDisabled 0x00400000 -+#define kDslSRAEnabled 0x00800000 -+ -+#define kDslT1p413HigherToneLevelNeeded 0x01000000 -+#define kDslT1p413SubsampleAlignmentEnabled 0x02000000 -+#define kDslT1p413DisableUpstream2xIfftMode 0x04000000 -+ -+/* test mode related demodCapabilities, for internal use only */ -+#define kDslTestDemodCapMask 0xF8000000 -+#define kDslSendReverbModeEnabled 0x10000000 -+#define kDslSendMedleyModeEnabled 0x20000000 -+#define kDslAutoRetrainDisabled 0x40000000 -+#define kDslPllWorkaroundEnabled 0x80000000 -+#define kDslAfeLoopbackModeEnabled 0x08000000 -+ -+/* demodCapabilities bitmap2 */ -+ -+#define kDslAnnexCProfile1 0x00000001 -+#define kDslAnnexCProfile2 0x00000002 -+#define kDslAnnexCProfile3 0x00000004 -+#define kDslAnnexCProfile4 0x00000008 -+#define kDslAnnexCProfile5 0x00000010 -+#define kDslAnnexCProfile6 0x00000020 -+#define kDslAnnexCPilot64 0x00000040 -+#define kDslAnnexCPilot48 0x00000080 -+#define kDslAnnexCPilot32 0x00000100 -+#define kDslAnnexCPilot16 0x00000200 -+#define kDslAnnexCA48B48 0x00000400 -+#define kDslAnnexCA24B24 0x00000800 -+#define kDslAnnexCReverb33_63 0x00001000 -+#define kDslAnnexCCReverb6_31 0x00002000 -+ -+#define kDslAnnexIShapedSSVI 0x00004000 -+#define kDslAnnexIFlatSSVI 0x00008000 -+ -+#define kDslAnnexIPilot64 0x00010000 -+#define kDslAnnexIA48B48 0x00020000 -+#define kDslAnnexIPilot128 0x00040000 -+#define kDslAnnexIPilot96 0x00080000 -+ -+/* Features bitmap */ -+#define kG992p2RACK1 0x00000001 -+#define kG992p2RACK2 0x00000002 -+#define kG992p2DBM 0x00000004 -+#define kG992p2FastRetrain 0x00000008 -+#define kG992p2RS16 0x00000010 -+#define kG992p2ClearEOCOAM 0x00000020 -+#define kG992NTREnabled 0x00000040 -+#define kG992p2EraseAllStoredProfiles 0x00000080 -+#define kG992p2FeaturesNPar2Mask 0x0000003B -+#define kG992p2FeaturesNPar2Shift 0 -+ -+#define kG992p1RACK1 0x00000100 -+#define kG992p1RACK2 0x00000200 -+#define kG992p1STM 0x00000800 -+#define kG992p1ATM 0x00001000 -+#define kG992p1ClearEOCOAM 0x00002000 -+#define kG992p1FeaturesNPar2Mask 0x00003B00 -+#define kG992p1FeaturesNPar2Shift 8 -+#define kG992p1DualLatencyUpstream 0x00004000 -+#define kG992p1DualLatencyDownstream 0x00008000 -+#define kG992p1HigherBitRates 0x40000000 -+ -+#if defined(G992P1_ANNEX_I) -+#define kG992p1HigherBitRates1over3 0x80000000 -+#define kG992p1AnnexIShapedSSVI 0x00000001 -+#define kG992p1AnnexIFlatSSVI 0x00000002 -+#define kG992p1AnnexIPilotFlag 0x00000008 -+#define kG992p1AnnexIPilot64 0x00000001 -+#define kG992p1AnnexIPilot128 0x00000004 -+#define kG992p1AnnexIPilot96 0x00000008 -+#define kG992p1AnnexIPilotA48B48 0x00000010 -+#endif -+ -+#define kG992p1AnnexBRACK1 0x00010000 -+#define kG992p1AnnexBRACK2 0x00020000 -+#define kG992p1AnnexBUpstreamTones1to32 0x00040000 -+#define kG992p1AnnexBSTM 0x00080000 -+#define kG992p1AnnexBATM 0x00100000 -+#define kG992p1AnnexBClearEOCOAM 0x00200000 -+#define kG992p1AnnexBFeaturesNPar2Mask 0x003F0000 -+#define kG992p1AnnexBFeaturesNPar2Shift 16 -+ -+#define kG992p1AnnexCRACK1 0x01000000 -+#define kG992p1AnnexCRACK2 0x02000000 -+#define kG992p1AnnexCDBM 0x04000000 -+#define kG992p1AnnexCSTM 0x08000000 -+#define kG992p1AnnexCATM 0x10000000 -+#define kG992p1AnnexCClearEOCOAM 0x20000000 -+#define kG992p1AnnexCFeaturesNPar2Mask 0x3F000000 -+#define kG992p1AnnexCFeaturesNPar2Shift 24 -+ -+#define kG992p1HigherBitRates1over3 0x80000000 -+ -+/* auxFeatures bitmap */ -+#define kG994p1PreferToExchangeCaps 0x00000001 -+#define kG994p1PreferToDecideMode 0x00000002 -+#define kG994p1PreferToMPMode 0x00000004 -+#define kAfePwmSyncClockShift 3 -+#define kAfePwmSyncClockMask (0xF << kAfePwmSyncClockShift) -+#define AfePwmSyncClockEnabled(val) (((val) & kAfePwmSyncClockMask) != 0) -+#define AfePwmGetSyncClockFreq(val) ((((val) & kAfePwmSyncClockMask) >> kAfePwmSyncClockShift) - 1) -+#define AfePwmSetSyncClockFreq(val,freq) ((val) |= ((((freq)+1) << kAfePwmSyncClockShift) & kAfePwmSyncClockMask)) -+ -+/* SubChannel Info bitMap for G992p1 */ -+#define kSubChannelASODownstream 0x00000001 -+#define kSubChannelAS1Downstream 0x00000002 -+#define kSubChannelAS2Downstream 0x00000004 -+#define kSubChannelAS3Downstream 0x00000008 -+#define kSubChannelLSODownstream 0x00000010 -+#define kSubChannelLS1Downstream 0x00000020 -+#define kSubChannelLS2Downstream 0x00000040 -+#define kSubChannelLS0Upstream 0x00000080 -+#define kSubChannelLS1Upstream 0x00000100 -+#define kSubChannelLS2Upstream 0x00000200 -+#define kSubChannelInfoOctet1Mask 0x0000001F -+#define kSubChannelInfoOctet2Mask 0x000003E0 -+#define kSubChannelInfoOctet1Shift 0 -+#define kSubChannelInfoOctet2Shift 5 -+ -+/****************************************************************************/ -+/* 3. Interface functions. */ -+/* */ -+/****************************************************************************/ -+ -+#ifdef G992P1 -+#if defined(G992P1_ANNEX_I2X) || defined(G992P5) -+/* lke */ -+#define kDslSamplingFreq 4416000 -+#define kDslMaxFFTSize 1024 -+#define kDslMaxFFTSizeShift 10 -+#elif defined(G992P1_ANNEX_I4X) -+#define kDslSamplingFreq 8832000 -+#define kDslMaxFFTSize 2048 -+#define kDslMaxFFTSizeShift 11 -+#elif defined(G992P1_ANNEX_I8X) -+#define kDslSamplingFreq 17664000 -+#define kDslMaxFFTSize 4096 -+#define kDslMaxFFTSizeShift 12 -+#else -+#define kDslSamplingFreq 2208000 -+#define kDslMaxFFTSize 512 -+#define kDslMaxFFTSizeShift 9 -+#endif -+#else -+#define kDslSamplingFreq 1104000 -+#define kDslMaxFFTSize 256 -+#define kDslMaxFFTSizeShift 8 -+#endif -+ -+#if defined(G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ) -+#define kDslATURUpstreamSamplingFreq 276000 -+#define kDslATURFFTSizeShiftUpstream 6 -+#elif defined(G992_ATUR_UPSTREAM_SAMPLING_FREQ_552KHZ) -+#define kDslATURUpstreamSamplingFreq 552000 -+#define kDslATURFFTSizeShiftUpstream 7 -+#else -+#define kDslATURUpstreamSamplingFreq kDslSamplingFreq -+#define kDslATURFFTSizeShiftUpstream kDslMaxFFTSizeShift -+#endif -+ -+#if defined(G992_ATUC_UPSTREAM_SAMPLING_FREQ_276KHZ) -+#define kDslATUCUpstreamSamplingFreq 276000 -+#define kDslATUCFFTSizeShiftUpstream 6 -+#elif defined(G992_ATUC_UPSTREAM_SAMPLING_FREQ_552KHZ) -+#define kDslATUCUpstreamSamplingFreq 552000 -+#define kDslATUCFFTSizeShiftUpstream 7 -+#else -+#define kDslATUCUpstreamSamplingFreq kDslSamplingFreq -+#define kDslATUCFFTSizeShiftUpstream kDslMaxFFTSizeShift -+#endif -+ -+#define kDslMaxSamplesPerSymbol (kDslMaxFFTSize+kDslMaxFFTSize/16) -+ -+#if defined(G992P1_ANNEX_I) || defined(G992P5) -+#define kDslMaxTEQLength 32 -+#else -+#define kDslMaxTEQLength 16 -+#endif -+ -+#define kDslMaxSymbolBlockSize 1 -+#define kDslMaxSampleBlockSize (kDslMaxSymbolBlockSize*kDslMaxSamplesPerSymbol) -+ -+#ifdef G992_ANNEXC -+#define kG992AnnexCXmtToRcvPathDelay 512 /* In samples at kDslSamplingFreq */ -+#endif -+ -+/*** For compatibility with existing test codes ***/ -+#if !defined(TARG_OS_RTEMS) -+typedef dslStatusCode modemStatusCode; -+typedef dslStatusStruct modemStatusStruct; -+typedef dslStatusHandlerType statusHandlerType; -+typedef dslCommandCode modemCommandCode; -+typedef dslCommandStruct modemCommandStruct; -+typedef dslCommandHandlerType commandHandlerType; -+#endif -+ -+extern void SM_DECL SoftDslSetRefData (void *gDslVars, ulong refData); -+extern ulong SM_DECL SoftDslGetRefData (void *gDslVars); -+extern int SM_DECL SoftDslGetMemorySize(void); -+extern void SM_DECL SoftDslInit (void *gDslVars); -+extern void SM_DECL SoftDslReset (void *gDslVars); -+extern void SM_DECL SoftDslLineHandler (void *gDslVars, int rxNSamps, int txNSamps, short *rcvPtr, short *xmtPtr) FAST_TEXT; -+extern Boolean SM_DECL SoftDslCommandHandler (void *gDslVars, dslCommandStruct *cmdPtr); -+ -+/* swap Lmem functions */ -+#if defined(bcm47xx) && defined(SWAP_LMEM) -+extern int SoftDslSwapLmem(void *gDslVars, int sectionN, int imageN); -+extern void init_SoftDslSwapLmem(void); -+#endif -+ -+/* SoftDsl time functions */ -+ -+extern ulong SM_DECL SoftDslGetTime(void *gDslVars); -+#define __SoftDslGetTime(gv) gDslGlobalVarPtr->execTime -+ -+extern void SM_DECL SoftDslTimer(void *gDslVars, ulong timeMs); -+ -+/* SoftDsl IO functions */ -+ -+extern void SM_DECL SoftDslClose (void *gDslVars); -+extern int SM_DECL SoftDslSendFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); -+extern int SM_DECL SoftDslReturnFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); -+ -+/* SoftDsl connection functions */ -+ -+extern void* SM_DECL SoftDslVcAllocate(void *gDslVars, dslVcParams *pVcParams); -+extern void SM_DECL SoftDslVcFree(void *gDslVars, void *pVc); -+extern Boolean SM_DECL SoftDslVcActivate(void *gDslVars, void *pVc); -+extern void SM_DECL SoftDslVcDeactivate(void *gDslVars, void *pVc); -+extern Boolean SM_DECL SoftDslVcConfigure(void *gDslVars, void *pVc, ulong mid, dslVcParams *pVcParams); -+ -+/* Special functions for LOG support */ -+ -+extern ulong SM_DECL SoftDslVc2Id(void *gDslVars, void *pVc); -+extern void* SM_DECL SoftDslVcId2Vc(void *gDslVars, ulong vcId); -+extern void* SM_DECL SoftDslGetFramePool(void *gDslVars); -+ -+/* Functions for host mode execution */ -+ -+extern void* SM_DECL SoftDslRxCellHeaderHandler (void *gDslVars, ulong hdr, uchar hdrHec); -+extern void* SM_DECL SoftDslRxCellDataHandler (void *gDslVars, int, void*); -+extern void* SM_DECL SoftDslTxCellHandler (void *gDslVars, int*, void*); -+extern Boolean SM_DECL SoftDslPhyCommandHandler (void *gDslVars, dslCommandStruct *cmdPtr); -+ -+/* Functions getting OEM parameters including G994 non standard info management */ -+ -+extern char* SM_DECL SoftDslGetTrainingVendorIDString(void *gDslVars); -+extern char* SM_DECL SoftDslGetVendorIDString(void *gDslVars); -+extern char* SM_DECL SoftDslGetSerialNumberString(void *gDslVars); -+extern char* SM_DECL SoftDslGetRevString(void *gDslVars); -+extern int SM_DECL SoftDslRevStringSize(void *gDslVars); -+extern int SM_DECL SoftDslSerNumStringSize(void *gDslVars); -+ -+extern void* SM_DECL SoftDslGetG994p1RcvNonStdInfo(void *gDslVars, ulong *pLen); -+extern void* SM_DECL SoftDslGetG994p1XmtNonStdInfo(void *gDslVars, ulong *pLen); -+ -+#ifdef G997_1_FRAMER -+ -+/* G997 functions */ -+ -+extern int SM_DECL SoftDslG997SendFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); -+extern int SM_DECL SoftDslG997ReturnFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); -+ -+#endif -+ -+#ifdef ADSL_MIB -+extern void * SM_DECL SoftDslMibGetData (void *gDslVars, int dataId, void *pAdslMibData); -+#endif -+ -+#define SoftDsl SoftDslLineHandler -+#define kSoftDslMaxMemorySize (32768*16384) -+ -+/* -+ * Internal functions -+ */ -+ -+extern void SoftDslStatusHandler (void *gDslVars, dslStatusStruct *status) FAST_TEXT; -+extern void SoftDslInternalStatusHandler (void *gDslVars, dslStatusStruct *status); -+ -+/* -+ * DSL OS functions -+ */ -+ -+#ifdef DSL_OS -+ -+#define SoftDslIsBgAvailable(gDslVars) (DSLOS_THREAD_INACTIVE == DslOsGetThreadState(&(gDslGlobalVarPtr->tcbDslBg))) -+#define SoftDslGetBgThread(gDslVars) \ -+ ((DSLOS_THREAD_INACTIVE != DslOsGetThreadState(&(gDslGlobalVarPtr->tcbDslBg))) ? &gDslGlobalVarPtr->tcbDslBg : NULL) -+#define SoftDslBgStart(gDslVars, pFunc) \ -+ DslOsCreateThread(&gDslGlobalVarPtr->tcbDslBg, DSLOS_PRIO_HIGHEST - 10, pFunc, gDslVars, \ -+ WB_ADDR(gDslGlobalVarPtr->bgStack), sizeof(gDslGlobalVarPtr->bgStack)) -+#define SoftDslBgStop(gDslVars) DslOsDeleteThread(&gDslGlobalVarPtr->tcbDslBg) -+ -+#define SoftDslEnterCritical() DslOsEnterCritical() -+#define SoftDslLeaveCritical(id) DslOsLeaveCritical(id) -+ -+#else -+ -+#define SoftDslIsBgAvailable(gDslVars) 1 -+#define SoftDslGetBgThread(gDslVars) 1 -+#define SoftDslBgStart(gDslVars, pFunc) (*pFunc)(gDslVars) -+#define SoftDslBgStop(gDslVars) -+ -+#define SoftDslEnterCritical() 0 -+#define SoftDslLeaveCritical(id) -+ -+#endif -+ -+/* -+ * DSL frames and native frame functions -+ */ -+ -+DslFrameDeclareFunctions (DslFrameNative) -+ -+/* -+ * These functions are for testing purpose, they are defined outside. -+ */ -+#ifdef STACK_SIZE_REQUIREMENT_TEST -+extern void StackSizeTestInitializeStackBeforeEntry(void); -+extern void StackSizeTestCheckStackAfterExit(void); -+extern void StackSizeTestBackupStack(void); -+extern void StackSizeTestRestoreStack(void); -+#endif /* STACK_SIZE_REQUIREMENT_TEST */ -+ -+#ifdef NEC_NSIF_WORKAROUND -+#define SoftDslGetG994NsStatus(gDslVars) (gDslGlobalVarPtr->G994NsStatus) -+#define SoftDslGetG994NsFailCounter(gDslVars) (gDslGlobalVarPtr->G994NsFailCounter) -+#endif -+ -+#endif /* SoftDslHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModem.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModem.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModem.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModem.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,3128 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * SoftModem.h -+ * -+ * -+ * Description: -+ * This file contains the exported interface for SoftModem.c -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.16 $ -+ * -+ * $Id: SoftModem.h,v 1.16 2004/04/14 21:16:51 ilyas Exp $ -+ * -+ * $Log: SoftModem.h,v $ -+ * Revision 1.16 2004/04/14 21:16:51 ilyas -+ * Merged with the latest changes in ADSL driver -+ * -+ * Revision 1.15 2004/04/13 00:56:10 ilyas -+ * Merged the latest ADSL driver changes for RTEMS -+ * -+ * Revision 1.14 2004/04/13 00:16:59 ilyas -+ * Merged the latest ADSL driver changes -+ * -+ * Revision 1.13 2003/02/22 05:07:11 ilyas -+ * Added VendorID for T1.413 mode -+ * -+ * Revision 1.12 2002/10/03 19:34:24 ilyas -+ * Added size for EOC serial number register -+ * -+ * Revision 1.11 2002/09/07 01:37:22 ilyas -+ * Added support for OEM parameters -+ * -+ * Revision 1.10 2001/12/13 02:25:34 ilyas -+ * Added definitions for G997 -+ * -+ * Revision 1.9 2001/11/30 05:56:34 liang -+ * Merged top of the branch AnnexBDevelopment onto top of the tree. -+ * -+ * Revision 1.7.2.2 2001/11/27 02:32:05 liang -+ * Combine vendor ID, serial #, and version number into SoftModemVersionNumber.c. -+ * -+ * Revision 1.7.2.1 2001/10/03 01:44:10 liang -+ * Merged with codes from main tree (tag SoftDsl_2_18). -+ * -+ * Revision 1.8 2001/09/21 19:19:01 ilyas -+ * Minor fixes for VxWorks build -+ * -+ * Revision 1.7 2000/07/17 21:08:16 lkaplan -+ * removed global pointer -+ * -+ * Revision 1.6 2000/05/03 04:09:11 ilyas -+ * Added ID for ATM log data -+ * -+ * Revision 1.5 2000/04/01 01:07:44 liang -+ * Changed file names and some module names. -+ * -+ * Revision 1.4 2000/03/02 20:18:12 ilyas -+ * Added test status code for ATM VC finished -+ * -+ * Revision 1.3 1999/08/05 20:02:11 liang -+ * Merged with the softmodem top of the tree on 08/04/99. -+ * -+ * Revision 1.2 1999/01/27 22:19:08 liang -+ * Merge with SoftModem_3_1_02. -+ * Include SoftDsl.h conditionlly so that the test utilities from SoftModem -+ * can be used without major change. It can be merged easily to SoftModem. -+ * -+ * Revision 1.170 1998/12/22 00:52:52 liang -+ * Added auxFeatures bit kV8HoldANSamUntilDetCI. When it is set, ANSam won't be -+ * sent until CI is detected (normally ANSam will be sent after 200ms). This is -+ * useful in V34 half duplex fax mode. -+ * -+ * Revision 1.169 1998/12/19 04:46:52 mwg -+ * Added bits for fax/data calling tones -+ * -+ * Revision 1.168 1998/12/17 02:46:10 scott -+ * Removed overlay-related commands/statuses and added -+ * kSetTrainingDelayReductionCmd -+ * -+ * Revision 1.167 1998/12/12 03:17:42 scott -+ * Added overlay commands and statuses -+ * -+ * Revision 1.166 1998/12/02 05:34:23 mwg -+ * Fixed a problem with bong tone detection -+ * -+ * Revision 1.165 1998/11/26 00:22:44 yura -+ * Added two more log data types: modulatorInputData & modulatorOutputData -+ * -+ * Revision 1.164 1998/11/19 03:08:04 mwg -+ * Added kSetCallProgressParamsCmd -+ * -+ * Revision 1.163 1998/11/18 23:00:03 liang -+ * Added a separate command kLoopbackTestAutoRespEnableCmd to enable or disable -+ * the loopback test auto respond feature when the modem is already on-line. -+ * -+ * Revision 1.162 1998/11/13 20:50:21 scott -+ * SoftModemInternalStatusHandler is now SM_DECL as well -+ * -+ * Revision 1.161 1998/11/13 20:42:25 scott -+ * Added SM_DECL type to entrypoint functions -+ * -+ * Revision 1.160 1998/11/13 03:02:54 scott -+ * Added SoftModemTimer prototype. -+ * Also include V.8bis types if AT_COMMANDS_V8BIS is defined. -+ * -+ * Revision 1.159 1998/11/12 01:22:46 scott -+ * Increased number of AT registers to 46 -+ * -+ * Revision 1.158 1998/11/05 22:35:18 yura -+ * Added two more S-registers -+ * -+ * Revision 1.157 1998/11/05 03:09:54 mwg -+ * Added kLapmRetryFailed to the list of LAPM errors -+ * -+ * Revision 1.156 1998/11/05 00:13:20 liang -+ * Add new connectionInfo status kLoopbackSelfTestNewErrs to report -+ * new bit errors whenever it happens. -+ * -+ * Revision 1.155 1998/11/04 07:11:33 mwg -+ * Moved declaration for SoftModemATPrintf() to SoftModem.h -+ * -+ * Revision 1.154 1998/10/29 07:24:49 mwg -+ * *** empty log message *** -+ * -+ * Revision 1.153 1998/10/15 02:09:37 luisgm -+ * added separate data rate mask for Flex to dataPumpCapabilities structure -+ * -+ * Revision 1.152 1998/10/14 00:12:15 scott -+ * Added kMnpOOBFrameCmd and command.frameSpec -+ * -+ * Revision 1.151 1998/10/09 02:19:22 luisgm -+ * added FlexV8bisStruct member to dataPumpCapabilities struc to store flex v8bis info, added define for kFlexSkipV8bis -+ * -+ * Revision 1.150 1998/10/06 19:36:33 mwg -+ * Limited 56K rates to 53K -+ * -+ * Revision 1.149 1998/10/03 03:43:38 ilyas -+ * Added status codes for Audio -+ * -+ * Revision 1.148 1998/10/01 02:03:17 mwg -+ * Added external pulse dialer option -+ * -+ * Revision 1.147 1998/09/30 01:44:26 mwg -+ * Added new functions SoftModemGetWriteBufferSize() & SoftModemGetReadBufferSize() -+ * -+ * Revision 1.146 1998/09/22 03:44:38 scott -+ * Added ALWAYS_LONG_ALIGN() macro -+ * -+ * Revision 1.145 1998/09/21 21:49:22 scott -+ * Added logDataCodes for mnpDecoder(Input/Output)Data -+ * -+ * Revision 1.144 1998/08/31 22:57:21 luisgm -+ * added constants for Flex data rates + kFlexEventTRN2AFinished -+ * -+ * Revision 1.143 1998/08/18 05:09:53 mwg -+ * Increased AT command buffer size to 128 -+ * -+ * Revision 1.142 1998/08/18 03:45:54 ilyas -+ * Integrated Audio into V70 test -+ * -+ * Revision 1.141 1998/08/14 17:46:04 ilyas -+ * Integrated Audio and G729a -+ * -+ * Revision 1.140 1998/08/10 21:42:19 mwg -+ * Added space and mark parity -+ * -+ * Revision 1.139 1998/08/08 03:39:33 scott -+ * Moved the C6xDefs and PentiumDefs includes before the internal function -+ * prototypes (to permit their redefinitions) -+ * -+ * Revision 1.138 1998/08/07 20:37:27 yura -+ * Added new S-register for &T commands -+ * -+ * Revision 1.137 1998/08/01 05:22:09 mwg -+ * Implemented split memory model -+ * -+ * Revision 1.136 1998/07/22 02:12:22 liang -+ * Added self test mode for loopback test. -+ * -+ * Revision 1.135 1998/07/21 01:19:03 liang -+ * Changed loopback test command parameter interface to use regular modeSpec. -+ * -+ * Revision 1.134 1998/07/18 03:52:10 liang -+ * Added V54 loop 2 test for V22. -+ * -+ * Revision 1.133 1998/07/15 02:45:03 mwg -+ * Added new connection info code: kPCMSpectralShapingBits -+ * -+ * Revision 1.132 1998/07/15 00:18:48 liang -+ * Add special turn off command for V34 fax to handle different turn off procedures. -+ * -+ * Revision 1.131 1998/07/13 22:19:49 liang -+ * Add V8 CI detection status and ANSam disable aux feature. -+ * -+ * Revision 1.130 1998/07/08 17:09:13 scott -+ * Added USE_LONG_ALIGN; support for 6 and PentiumDefs.h files -+ * -+ * Revision 1.129 1998/07/03 23:28:13 mwg -+ * Added Fax Class 2 defines -+ * -+ * Revision 1.128 1998/07/03 23:17:33 mwg -+ * Insuread command/status structures are long aligned -+ * -+ * Revision 1.127 1998/06/23 16:48:01 mwg -+ * Fixed a longstanding problem typical for Win95 VxD: whenever new -+ * VxD is intalled the confuguration profile may not match the old one but -+ * since the crc is correct it is still being downloaded. To avoid the problem -+ * a crc for the version number was added to avoid confusion between profiles -+ * of different versions. -+ * -+ * Revision 1.126 1998/06/19 21:04:06 liang -+ * Add auxiliary feature bit kV90ServerNotDetSbarAfterJdbarFix. -+ * -+ * Revision 1.125 1998/06/11 22:48:14 liang -+ * Add kPCM28000bpsShift constant. -+ * -+ * Revision 1.124 1998/06/05 22:11:51 liang -+ * New V90 DIL works through data mode. -+ * -+ * Revision 1.123 1998/06/01 23:03:41 liang -+ * Add v90RcvdDilDiffData logging. -+ * -+ * Revision 1.122 1998/06/01 21:24:38 mwg -+ * Changed some of the names. -+ * -+ * Revision 1.121 1998/05/13 04:55:22 mwg -+ * Now passing the number of spectral shaping bits in aux features -+ * -+ * Revision 1.120 1998/05/13 02:53:13 liang -+ * Add field "value" to command param structure. -+ * -+ * Revision 1.119 1998/05/12 04:42:23 mwg -+ * Replaced some of the status messages -+ * -+ * Revision 1.118 1998/05/11 23:36:10 mwg -+ * Added 8000Hz symbol rate to the map -+ * -+ * Revision 1.117 1998/05/05 04:28:39 liang -+ * V90 works up to data mode first version. -+ * -+ * Revision 1.116 1998/04/21 09:36:45 mwg -+ * Fixed a few problems for 16Khz and added 32Khz. -+ * -+ * Revision 1.115 1998/04/17 22:33:54 liang -+ * Added V90 DIL for mu-law PCM. -+ * -+ * Revision 1.114 1998/04/15 22:36:39 mwg -+ * Added new parameters to kDialCmd to allow individual control of each -+ * DTMF group attenuation. -+ * -+ * Revision 1.113 1998/04/15 18:16:22 ilyas -+ * Integrated V.8bis and changed coding of LinkLayerType to bitMap -+ * -+ * Revision 1.112 1998/04/15 07:59:06 mwg -+ * Added new status codes for V.90 -+ * -+ * Revision 1.111 1998/04/11 00:29:16 mwg -+ * Fixed the warnings which appeared when Irix builds were upgraded to -+ * gcc 2.8.1 -+ * -+ * Revision 1.110 1998/04/11 00:25:01 ilyas -+ * More V.70 statuses -+ * -+ * Revision 1.109 1998/04/10 23:29:31 mwg -+ * Added new field to capabilities: dataRates56K -+ * -+ * Revision 1.108 1998/04/09 02:02:56 mwg -+ * Added status for Ja detection. -+ * -+ * Revision 1.107 1998/04/03 02:05:30 ilyas -+ * More V.70 commands added -+ * -+ * Revision 1.106 1998/04/02 06:15:39 mwg -+ * Added coding type (Mu-law/A-law) status reporting. -+ * -+ * Revision 1.105 1998/03/30 09:53:57 mwg -+ * Added definition for k56Flex modulation for future use. -+ * -+ * Revision 1.104 1998/03/27 17:56:09 ilyas -+ * Added definitions for V.70 -+ * -+ * Revision 1.103 1998/03/26 23:29:04 liang -+ * Added first version of IMD estimation. -+ * -+ * Revision 1.102 1998/03/20 04:37:26 mwg -+ * Increased the size of the nominal variance to 32 bit. -+ * -+ * Revision 1.101 1998/03/06 01:22:04 yura -+ * Improved Win95 VxD segmentation handling -+ * -+ * Revision 1.100 1998/03/06 01:06:18 liang -+ * Add initial version of V90 phase 1 and 2. -+ * -+ * Revision 1.99 1998/03/05 23:42:22 mwg -+ * (hxl) Implemented enable/disable call waiting command. -+ * -+ * Revision 1.98 1998/02/26 06:13:06 mwg -+ * Increased the number of AT S-registers to account for newly introduced -+ * S9 and S10. -+ * -+ * Revision 1.97 1998/02/25 18:18:25 scott -+ * Added v42bisCycleCount for V42BIS_THROUGHPUT_CONTROL -+ * -+ * Revision 1.96 1998/02/24 05:31:20 mwg -+ * Added stuff required by international version of AT command processor. -+ * -+ * Revision 1.95 1998/02/17 01:14:10 scott -+ * Reenabled sys/types.h for Linux builds -+ * -+ * Revision 1.94 1998/02/16 22:32:23 scott -+ * Changed copyright notice -+ * -+ * Revision 1.93 1998/02/16 22:17:44 scott -+ * Turned off include of sys/types.h for normal builds -+ * -+ * Revision 1.92 1998/02/16 21:53:28 scott -+ * Exclude sys/types.h for another compiler -+ * -+ * Revision 1.91 1998/02/09 18:24:10 scott -+ * Fixed ComplexShort type to work around bugs in MS and GreenHill compilers -+ * -+ * Revision 1.90 1998/01/27 01:37:36 mwg -+ * Added new log identifier for pcm infidelity data. -+ * -+ * Revision 1.89 1998/01/22 19:49:32 liang -+ * Add auxFeature bit kFaxV34HDXAllowAsymCtrlChan. -+ * -+ * Revision 1.88 1998/01/21 02:32:01 liang -+ * Add more V34 half duplex training progress codes. -+ * -+ * Revision 1.87 1997/12/23 03:28:25 liang -+ * Add more half duplex V34 related constants. -+ * -+ * Revision 1.86 1997/12/18 19:38:50 scott -+ * Added agcData log type. -+ * Added kDisableFaxFastClearDown demod capability -+ * -+ * Revision 1.85 1997/12/18 06:02:45 mwg -+ * Added a function to reenable DC offset tracking. -+ * -+ * Revision 1.84 1997/12/17 22:46:30 mwg -+ * Minor modifications to X2 escape status reporting. -+ * -+ * Revision 1.83 1997/12/16 06:49:45 mwg -+ * Implemented proper data rate reporting for PCM modem. -+ * -+ * Revision 1.82 1997/12/13 06:11:08 mwg -+ * Added X2 interface hooks -+ * -+ * Revision 1.81 1997/12/02 06:21:33 mwg -+ * Implemented kSetATRegister command. -+ * -+ * Revision 1.80 1997/11/27 02:11:41 liang -+ * Add code for half duplex V34 control channel. -+ * -+ * Revision 1.79 1997/11/19 19:52:48 guy -+ * Added constant to define V.34 half duplex operation -+ * -+ * Revision 1.78 1997/10/24 05:15:53 scott -+ * Added AGC and phase hit recovery to demodCapabilities -+ * -+ * Revision 1.77 1997/10/01 02:47:50 liang -+ * Add PCM interface. -+ * -+ * Revision 1.76 1997/09/29 15:48:04 yura -+ * Added #pragma statement for W95 Vxd -+ * -+ * Revision 1.75 1997/09/18 20:32:39 scott -+ * Do not include VxD support files if GENERATE_DEPENDENCIES is defined. -+ * -+ * Revision 1.74 1997/09/18 12:40:55 yura -+ * Removed #ifdef statments to be more robust -+ * -+ * Revision 1.73 1997/09/17 17:32:41 scott -+ * Do not include sys/types.h for 6 -+ * -+ * Revision 1.72 1997/08/08 00:53:48 mwg -+ * Added fields for LAP-M frames printout. -+ * Added fields in auxFeatures to pass preemphasis filter parameters -+ * to V.34 phase 3 when doing PTT testing. -+ * -+ * Revision 1.71 1997/08/06 03:41:45 yura -+ * Added a few includes and defines needed by Win 95 driver. -+ * -+ * Revision 1.70 1997/08/05 03:22:10 liang -+ * Add equalizer center tap adjustment calculation related constants. -+ * -+ * Revision 1.69 1997/07/29 02:44:19 mwg -+ * Added new field to dataPumpCapabilities structure. This field is not -+ * yet exposed to external interface and currently is only used to -+ * enable PTT testing. -+ * Added new commands: kStartDataModemPTTTestCmd & kStartDataModemLoopbackTestCmd -+ * -+ * Revision 1.68 1997/07/22 22:05:10 liang -+ * Change sample rate setup as a normal command. -+ * -+ * Revision 1.67 1997/07/21 23:23:30 liang -+ * Define SoftModemSetSampleRate as null when SAMPLE_RATE_CONVERSION is not defined. -+ * -+ * Revision 1.66 1997/07/21 22:38:36 liang -+ * Change sample rate converter structure so that sample rate can be changed -+ * on the fly (at very begining) to either 8KHz or 9600Hz. -+ * -+ * Revision 1.65 1997/07/21 20:22:01 mwg -+ * Added statusInfoData to the log identifiers. -+ * -+ * Revision 1.64 1997/07/16 20:40:07 scott -+ * Added multitone monitor fields -+ * -+ * Revision 1.63 1997/07/10 02:31:08 mwg -+ * 1. Added kRxFrameHDLCFlags detected status for the -+ * framingInfo. -+ * 2. Added kLapmMNPFrameDetected status to lapmStatusCode. -+ * 3. Increased the number of AT registers to 35 -+ * 4. Modified LinkLayerSpec structure in modemCommandStruc -+ * to provide the initial values of rxDataRate & -+ * txDataRate and RT delay for the cases when -+ * link layer is started *after* the data connection -+ * is established and the status snooper is unable -+ * to determine the rates and RT delay. -+ * 5. Added a few extra *empty* constant definitions for -+ * disabled features. -+ * -+ * Revision 1.62 1997/07/02 19:15:05 scott -+ * Added bits for Bel103 & Bel212 modulations. -+ * -+ * Revision 1.61 1997/07/02 05:15:16 mwg -+ * Added MNP code. -+ * -+ * Revision 1.60 1997/07/01 23:52:48 mwg -+ * Modified the record test setup to log and use all the commands. -+ * -+ * Revision 1.59 1997/06/25 19:11:26 mwg -+ * 1. Added new framingInfoCode values for Async framing error reporting; -+ * 2. Added a substructure to pass serial data format for kSetDTERate cmd; -+ * -+ * Revision 1.58 1997/05/28 02:05:08 liang -+ * Add PCM modem phase 2 codes. -+ * -+ * Revision 1.57 1997/05/12 21:55:08 liang -+ * Add call waiting tone detector module. -+ * -+ * Revision 1.56 1997/03/21 23:50:08 liang -+ * Added initial version of V8bis module to CVS tree. -+ * -+ * Revision 1.55 1997/03/19 18:35:05 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.54 1997/03/11 11:11:45 mwg -+ * Added code to report V42bis statistics. -+ * -+ * Revision 1.53 1997/03/04 06:21:08 mwg -+ * Added logging of most commands. -+ * -+ * Revision 1.52 1997/02/28 23:45:13 liang -+ * Added training progress status report kPhaseJitterDeactivated. -+ * -+ * Revision 1.51 1997/02/28 22:23:22 mwg -+ * Implemented the following features: -+ * - Cleardown for fax modulations V.27, V.29 V.17 -+ * - Rockwell compatible bitmap report (needed by a customer) -+ * -+ * Revision 1.50 1997/02/28 03:05:31 mwg -+ * Added more logging data types. -+ * -+ * Revision 1.49 1997/02/27 05:28:58 mwg -+ * Added RxFrameOK report. -+ * -+ * Revision 1.48 1997/02/27 01:48:53 liang -+ * Add kV8MenuDataWord1 and kV8MenuDataWord2 connectionInfo status. -+ * -+ * Revision 1.47 1997/02/24 02:30:27 mwg -+ * Added new log data: predictorErrData -+ * -+ * Revision 1.46 1997/02/22 03:00:22 liang -+ * Add echoCancelledSignalData. -+ * -+ * Revision 1.45 1997/02/21 01:26:42 liang -+ * Add six more bits for the Demodulator capabilities to deal with 2nd order -+ * time tracking & PLLs, as well as shorter NEEC & PFEEC, and front end HBF. -+ * -+ * Revision 1.44 1997/02/17 03:09:00 mwg -+ * Added LAPM statistics printout. -+ * -+ * Revision 1.43 1997/02/04 08:38:47 mwg -+ * Added dc cancelled samples printout. -+ * -+ * Revision 1.42 1997/01/29 21:40:28 mwg -+ * Changed the way timers work: now time is passed as Q4 ms instead of ticks. -+ * Completed the 8KHz front end implementation. -+ * Got rid of kSamplesPerSecond constant. -+ * -+ * Revision 1.41 1997/01/24 07:13:50 mwg -+ * Added new statuses for automoder. -+ * -+ * Revision 1.40 1997/01/23 02:03:08 mwg -+ * Replaced old sample rate conversion with the newer one. -+ * Still has to resolve the automoding issue. -+ * -+ * Revision 1.39 1997/01/21 00:55:04 mwg -+ * Added 8KHz front end functionality. -+ * -+ * Revision 1.38 1996/11/13 00:30:55 liang -+ * Add kAutoLoadReductionEnabled to demodCapabilities so that PFEEC, FEEC, IEEC -+ * can be disabled automatically, but for worst processor loading test they -+ * won't be disabled when this bit is not set. -+ * -+ * Revision 1.37 1996/11/07 23:07:18 mwg -+ * Rearranged global variables to allow V.17 short training. -+ * -+ * Revision 1.36 1996/09/17 23:55:05 liang -+ * Change kMaxDataBlockSize from 16 to 24 to handle high data rates. -+ * -+ * Revision 1.35 1996/09/05 19:43:39 liang -+ * Removed caller ID error status code kCallerIDUnknownMessageType, and -+ * added caller ID status codes kCallerIDUnknownMessage & kCallerIDWholeMessage. -+ * Changed the callerIDStatus report structure. -+ * -+ * Revision 1.34 1996/08/29 00:36:57 liang -+ * Added kLapmTxFrameStatus and kLapmRxFrameStatus. -+ * -+ * Revision 1.33 1996/08/27 22:56:01 liang -+ * Added kResetHardware status code. -+ * -+ * Revision 1.32 1996/08/23 23:35:35 liang -+ * Add kATDebugStatus and function SoftModemGetHybridDelay. -+ * -+ * Revision 1.31 1996/08/22 01:13:19 yg -+ * Added AT command processor. -+ * -+ * Revision 1.30 1996/08/12 21:46:47 mwg -+ * Added code to report capabilities. -+ * -+ * Revision 1.29 1996/08/10 01:59:59 mwg -+ * Added report of the sent rate sequence; -+ * -+ * Revision 1.28 1996/08/07 22:15:02 mwg -+ * Added new status reports: -+ * kRemoteFreqOffset -+ * kIEECDeactivated -+ * kPFEECDeactivated -+ * -+ * Revision 1.27 1996/06/27 05:15:48 mwg -+ * Added V.24 circuit status. -+ * -+ * Revision 1.26 1996/06/27 02:12:43 mwg -+ * Cleaned the code. -+ * -+ * Revision 1.25 1996/06/20 23:57:30 mwg -+ * Added new training progress status. -+ * -+ * Revision 1.24 1996/06/18 21:13:50 mwg -+ * Added trellis MSE data logging. -+ * -+ * Revision 1.23 1996/06/12 02:31:10 mwg -+ * Added new type: VeryLong -+ * -+ * Revision 1.22 1996/06/08 22:15:39 mwg -+ * Added new status report: kCleardownStarted -+ * Added new field for the features: kV34bisEnabled -+ * -+ * Revision 1.21 1996/05/31 00:29:11 liang -+ * Add feature bit kV34ExtraINFOPreamble. -+ * -+ * Revision 1.20 1996/05/30 23:28:31 mwg -+ * Replaced enums with #defines -+ * -+ * Revision 1.19 1996/05/25 00:38:27 mwg -+ * Added kProjectedDataRate training progress report. -+ * -+ * Revision 1.18 1996/05/24 23:27:15 mwg -+ * Added mode status codes. -+ * -+ * Revision 1.17 1996/05/10 05:39:59 liang -+ * Move the includes for DEBUG inside "ifndef SoftModemTypes" so that -+ * cap build won't break. -+ * -+ * Revision 1.16 1996/05/08 01:49:34 mwg -+ * Added capability to setup auxiliary data channel handlers. -+ * -+ * Revision 1.15 1996/05/07 22:51:08 liang -+ * Added group delay estimation and improved symbol rate selection process. -+ * -+ * Revision 1.14 1996/05/06 06:49:09 mwg -+ * Fixed linux problems. -+ * -+ * Revision 1.13 1996/05/02 08:40:16 mwg -+ * Merged in Chromatic bug fixes. -+ * -+ * Revision 1.12 1996/05/02 02:26:21 mwg -+ * Added code to implement dozing functionality for v.34. -+ * -+ * Revision 1.11 1996/05/01 22:43:13 mwg -+ * Added new command: kDozeCmd; -+ * -+ * Revision 1.10 1996/05/01 19:20:16 liang -+ * Add command codes kInitiateRetrainCmd and kInitiateRateRenegotiationCmd. -+ * -+ * Revision 1.9 1996/04/25 01:12:37 mwg -+ * Added new flag: rapid preliminary EC training. -+ * -+ * Revision 1.8 1996/04/20 02:26:22 mwg -+ * Added preliminary far-end echo support -+ * -+ * Revision 1.7 1996/04/15 23:26:16 mwg -+ * Changed flag definitions for v34 modem. -+ * -+ * Revision 1.6 1996/04/04 02:35:50 liang -+ * Change kCid from 0x0080 to 0x0004 (0x0080 is defined as kV32). -+ * -+ * Revision 1.5 1996/03/08 23:07:01 mwg -+ * Added name for the struct. -+ * -+ * Revision 1.4 1996/03/02 00:59:27 liang -+ * Added typedef for V34CodingParameters structure. -+ * -+ * Revision 1.3 1996/02/27 02:28:31 mwg -+ * Fixed a bug in kLapmLongADPEnabled definition. -+ * -+ * Revision 1.2 1996/02/19 23:50:59 liang -+ * Removed compressionSetup parameter from the link layer command structure. -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.5 1996/01/15 23:26:04 liang -+ * Change the softmodem command structure name from SoftwareModemCommand -+ * to SoftwareModemCommandParameters. -+ * -+ *****************************************************************************/ -+#ifndef SoftModemPh -+#define SoftModemPh -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.1 General types */ -+/****************************************************************************/ -+ -+#ifndef SM_DECL -+#define SM_DECL -+#endif -+ -+#ifdef __VxWORKS__ -+#include <types/vxTypesOld.h> -+#endif -+ -+#ifdef DEBUG -+/* We have to define __wchar_t for Linux */ -+#if defined __linux__ && !defined _NO_WHCAR_DEF_ -+typedef long int __wchar_t; -+#endif -+#if !defined(__KERNEL__) && !defined(_CFE_) -+#include <stdio.h> -+#include <stdlib.h> -+#endif -+ -+#if defined(__linux__) || defined (__unix__) || defined (__unix) || (defined (__mips__) && !defined(_CFE_) && !defined(VXWORKS) && !defined(TARG_OS_RTEMS))/* enable if necessary, but not for dos-based builds */ -+#include <linux/types.h> -+#endif -+ -+ -+#endif /* DEBUG */ -+ -+#if defined(W95_DRIVER) -+#pragma code_seg("_LTEXT", "LCODE") -+#pragma data_seg("_LDATA", "LCODE") -+#pragma const_seg("_LDATA", "LCODE") -+#pragma bss_seg("_LDATA", "LCODE") -+#pragma pack(1) -+#endif /* W95_DRIVER */ -+ -+#ifndef SoftModemTypes -+#include "SoftModemTypes.h" -+#endif /* SoftModemTypes */ -+ -+ -+typedef struct -+ { -+ schar x, y; -+ } ComplexByte; -+ -+typedef struct -+ { -+ uchar numerator; -+ uchar denominator; -+ } Ratio; -+ -+#ifdef PEGASUS -+typedef union -+ { -+ struct -+ { -+ short x, y; -+ }; -+ -+ long foo; -+ } ComplexShort; -+#else -+typedef struct -+ { -+ short x, y; -+#ifdef GREENHILL -+ long a[0]; -+#endif -+ } ComplexShort; -+#endif -+ -+typedef struct -+ { -+ long x, y; -+ } ComplexLong; -+ -+typedef struct -+ { -+ ushort x0, x1, x2; -+ short x3; -+ } VeryLong; -+ -+typedef union -+ { -+ struct -+ { -+ uchar number; -+ uchar defaultValue; /* default value */ -+ uchar maxValue; /* max allowed value */ -+ uchar minValue; /* should be greater then maxValue to make reg readonly */ -+ } param; -+ long alignment; -+ } SRegisterDefinition; -+ -+#define MacroPaste2(a,b) a##b -+#define MacroPaste(a,b) MacroPaste2(a,b) -+#define ALWAYS_LONG_ALIGN() long MacroPaste(ALIGNMENT,__LINE__); -+ -+#ifdef USE_LONG_ALIGN -+#define LONG_ALIGN() ALWAYS_LONG_ALIGN() -+#else -+#define LONG_ALIGN() -+#endif -+ -+typedef ulong bitMap; -+ -+typedef int pace; -+#define kStop 0 -+#define kVerySlow 1 -+#define kSlow 2 -+#define kMedium 3 -+#define kFast 4 -+ -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.2 Modem specific types */ -+/****************************************************************************/ -+ -+typedef long directionType; -+#define kXmt 0 -+#define kRcv 1 -+#define kXmtRcv 2 -+ -+ -+#define originating kXmt -+#define answering kRcv -+#define kOrg kXmt -+#define kAns kRcv -+#define kOrgAns kXmtRcv -+ -+#define ORIGINATING originating -+#define ANSWERING answering -+ -+typedef int pcmCodingType; -+#define kMuLawPCM 0 -+#define kALawPCM 1 -+ -+#define kMuLawPCMScaleShift 2 -+#define kALawPCMScaleShift 3 -+ -+/* link layer and framer share defines */ -+typedef bitMap framerType; -+typedef bitMap linkLayerType; -+#define kNoFramer 0 -+#define kSync 0x00000001 -+#define kAsync 0x00000002 -+#define kHDLC 0x00000004 -+#define kLapm 0x00000008 -+#define kMnp 0x00000010 -+#define kV70 0x00000020 -+#define kSAM 0x00000040 -+ -+ -+typedef bitMap modulationMap; -+typedef bitMap symbolRateMap; -+typedef bitMap dataRateMap; -+typedef bitMap featureMap; -+typedef bitMap breakType; -+ -+typedef bitMap audioType; -+#define kRawAudio 0 -+#define kAudioG729A 1 -+#define kAudioG729 2 -+#define kAudioG723 3 -+ -+ -+#ifndef ADSL_MODEM -+typedef long modemStatusCode; -+#endif -+ /* Information status Codes: 1-31 */ -+#define kSetSampleRate 1 -+#define kModulationKnown 2 -+#define kRxSymbolRate 3 -+#define kTxSymbolRate 4 -+#define kRxCarrierFreq 5 -+#define kTxCarrierFreq 6 -+#define kTxPreemphasisFilter 7 -+#define kTxPowerAdjustment 8 -+#define kRemoteTxPreemphasisFilter 9 -+#define kRemoteTxPowerAdjustment 10 -+#define kRxRateKnown 11 -+#define kTxRateKnown 12 -+#define kRxDataModeActive 13 -+#define kTxDataModeActive 14 -+#define kTxSignalCompleted 15 -+#define kDTMFSignalDetected 16 -+#define kModemSignalDetected 17 -+#define kCallProgressSignalDetected 18 -+#define kCustomSignalDetected 19 -+#define kFaxPreambleDetected 20 -+#define kV24CircuitStatusChange 21 -+#define kHookStateChange 22 -+#define kCallWaitingToneDetected 23 -+#define kMultiToneSignalDetected 24 -+#define kPulseShuntStateChange 25 -+#define kRingFrequency 26 -+ -+ -+ /* Warning status Codes: 32-64 */ -+#define kError 32 -+#define kV34Exception 33 -+#define kClearDownLocal 34 -+#define kClearDownRemote 35 -+#define kCarrierPresent 36 -+#define kCarrierLost 37 -+#define kRetrainingLocal 38 -+#define kRetrainingRemote 39 -+#define kRateRenegotiationLocal 40 -+#define kRateRenegotiationRemote 41 -+#define kFallbackStarted 42 -+#define kFallForwardStarted 43 -+#define kCleardownStarted 44 -+#define kIllegalCommand 45 -+ -+ /* Auxiliary status Codes: 64-.. */ -+#define kTrainingProgress 64 -+#define kConnectionInfo 65 -+#define kDialerStatus 66 -+#define kFramingInfo 67 -+#define kBreakReceived 68 -+#define kLapmStatus 69 -+#define kLapmParameter 70 -+#define kV42bisStatus 71 -+#define kCallerIDStatus 72 -+#define kIOStatus 73 -+#define kCapabilitiesStatus 74 -+#define kSpeakerStatus 75 -+#define kATProfileChanged 76 -+#define kATDebugStatus 77 -+#define kResetHardware 78 -+#define kV8bisStatus 79 -+#define kMnpStatus 80 -+#define kMnpParameter 81 -+#define kV70Status 82 -+#define kV70Parameter 83 -+#define kFaxClass2Status 84 -+#define kAudioStatus 85 -+#define kAudioParameter 86 -+#define kOverlayStatus 87 -+#define kCallerIDCircuitStatus 88 -+#define kV80Status 89 -+#define kV80Parameter 90 -+#define kLocalCountryChanged 91 -+#define kDTERateChanged 92 -+#define kATResponse 93 -+#define kFramerConfigured 94 -+#define kA8RStatus 95 -+#define kA8TStatus 96 -+#define kVersionStatus 97 -+ -+ /* Testing status codes: 128-... */ -+ /* These statuses are generated by modem test suit */ -+#define kTestFinished 128 -+#define kConnectivityTestFinished 129 -+#define kTestCheckSum 130 -+#define kLogFileControl 131 -+#define kTestAtmVcFinished 132 -+#define kTestClearEocFinished 133 -+#define kTestG997Finished 134 -+ -+typedef long modemErrorCode; -+#define kNoError 0 -+#define kErrorTimerExpired 1 -+#define kErrorNoSReceived 2 -+#define kErrorNoSbarReceived 3 -+ -+ -+typedef long dialerStatusCode; -+#define kDialCompleted 0 -+#define kNoDialToneDetected 1 -+#define kBongToneDetected 2 -+#define kNoBongToneDetected 3 -+#define kErrorIllegalDialModifier 5 -+#define kDialStarted 6 -+#define kExternalPulseDialDigit 7 -+ -+ -+typedef long framingInfoCode; -+#define kRxFrameOK 0 -+#define kRxFrameTooLong 1 -+#define kRxFrameCRCError 2 -+#define kTxFrameUnderrun 3 -+#define kRxFrameOverrun 4 -+#define kRxFrameAborted 5 -+#define kRxFrameParityError 6 -+#define kRxFrameFormatError 7 -+#define kRxFrameHDLCFlagsDetected 8 -+ -+ -+typedef long IOStatusCode; -+#define kRxDataReady 0 -+#define kRxBufferOverflow 1 -+#define kTxSpaceAvailable 2 -+#define kTxBufferEmpty 3 -+ -+typedef long capabilitiesStatusCode; -+#define kSymbolRates 0 -+#define kDataRates 1 -+#define kFeatures 2 -+#define kDemodCapabilities 3 -+#define kRateThresholdAdjustment 4 -+#define kXmtLevel 5 -+#define kHybridDelay 6 -+#define kAuxFeatures 7 -+ -+ -+typedef long A8TStatusCode; -+#define kA8TFinished 0 -+ -+typedef long callerIDStatusCode; -+#define kCallerIDError 0 -+#define kCallerIDChannelSeizureReceived 1 -+#define kCallerIDMarkSignalReceived 2 -+#define kCallerIDTime 3 -+#define kCallerIDTelnum 4 -+#define kCallerIDName 5 -+#define kCallerIDEnd 6 -+#define kCallerIDUnknownMessage 7 -+#define kCallerIDWholeMessage 8 -+ -+ -+typedef long callerIDErrorCode; -+#define kCallerIDNoError 0 -+#define kCallerIDMarkSignalError 1 -+#define kCallerIDTooManyMarkBits 2 -+#define kCallerIDMessageTooLong 3 -+#define kCallerIDChecksumError 4 -+ -+ -+typedef long connectionInfoCode; -+#define kRTDelay 1 -+#define kRxSignalLevel 2 -+#define kTimingOffset 3 -+#define kFreqOffset 4 -+#define kPhaseJitter 5 -+#define kSNR 6 -+#define kNearEchoLevel 7 -+#define kSER 8 -+#define kNearEndDelay 9 -+#define kFarEchoLevel 10 -+#define kL1L2SNRDifference 11 -+#define kDCOffset 12 -+#define kTotalRxPower 13 -+#define kRemoteFreqOffset 14 -+/* obsolete #define kV8MenuDataWord1 15 */ -+/* obsolete #define kV8MenuDataWord2 16 */ -+#define kPCMP2AnalogDetSNR 17 -+#define kPCMP2DigitalDetSNR 18 -+#define kPCMP2RBSDetSNR 19 -+#define kEqCenterTapOffset 20 -+#define kPCMPadValue 21 -+#define kPCMRBSMap 22 -+#define kPCMCodingType 23 -+#define kPCMSpectralShapingBits 24 -+#define kLoopbackSelfTestResult 25 -+#define kEyeQuality 26 -+#define kLoopbackSelfTestNewErrs 27 -+#define kV34EqlLengthStatus 28 -+#define kV34EqlOffsetStatus 29 -+#define kV8CallMenuData 30 -+#define kV8JointMenuData 31 -+#define kPCMClientIeecLengthStatus 32 -+#define kPCMClientIeecOffsetStatus 33 -+#define kSeamlessRateChange 34 -+ -+typedef long trainingProgressCode; -+#define kPeriodicalSignalDetected 0 -+#define kPhaseReversalDetected 1 -+#define kSignalStartDetected 2 -+#define kSignalEndDetected 3 -+#define kSSignalDetected 4 -+#define kSbarSignalDetected 5 -+#define kJ4SignalDetected 6 -+#define kJ16SignalDetected 7 -+#define kJprimeSignalDetected 8 -+#define kMPSignalDetected 9 -+#define kMPprimeSignalDetected 10 -+#define kMPSignalSent 11 -+#define kMPprimeSignalSent 12 -+#define kRateSignalDetected 13 -+#define kESignalDetected 14 -+#define kRateSignalSent 15 -+ -+#define kAutomodingTryModulation 16 -+#define kAutomodingCompleted 17 -+#define kRCFaxBitMapStatus 18 -+ -+#define kV8CIDetected 19 -+#define kV8ANSToneDetected 20 -+#define kV8ANSamDetected 21 -+#define kV8CMDetected 22 -+#define kV8JMDetected 23 -+#define kV8CJDetected 24 -+#define kV8Finished 25 -+ -+#define kV34Phase2Started 26 -+#define kV34Phase2INFOSequenceDetected 27 -+#define kV34Phase2NearEndEchoDetected 28 -+#define kV34Phase2L1Receiving 29 -+#define kV34Phase2L2Receiving 30 -+#define kV34Phase2Finished 31 -+#define kV34Phase3Started 32 -+#define kV34Phase3Finished 33 -+#define kV34Phase4Started 34 -+#define kV34Phase4Finished 35 -+#define kV34DecoderParameters 36 -+#define kV34EncoderParameters 37 -+ -+#define kMaxLocalRxDataRate 38 -+#define kMaxLocalTxDataRate 39 -+#define kMaxRemoteRxDataRate 40 -+#define kMaxRemoteTxDataRate 41 -+#define kProjectedDataRate 42 -+#define kFEECDeactivated 43 -+#define kIEECDeactivated 44 -+#define kPFEECDeactivated 45 -+#define kPhaseJitterDeactivated 46 -+ -+#define kPCMP2DetectedDigitalConnection 47 -+#define kPCMP2DetectedRBS 48 -+#define kX2DetectedPhase1Escape 49 -+ -+#define kStarted1200BpsTraining 50 -+#define kStarted2400BpsTraining 51 -+#define kUnscrambledOneDetected 52 -+#define kScrambled1200BpsOneDetected 53 -+#define kScrambled2400BpsOneDetected 54 -+#define kV22BisS1Detected 55 -+#define kV22InitiateLoop2Test 56 -+#define kV22RespondLoop2Test 57 -+#define kV22Loop2TestAlt01Detected 58 -+ -+#define kDataModemLoop1TestStarted 59 -+#define kDataModemLoop1TestFinished 60 -+#define kDataModemLoop2TestStarted 61 -+#define kDataModemLoop2TestFinished 62 -+#define kDataModemLoop3TestStarted 63 -+#define kDataModemLoop3TestFinished 64 -+#define kDataModemSelfLoopTestEnabled 65 -+ -+#define kPCMPhase3Started 70 -+#define kPCMPhase3Finished 71 -+#define kPCMPhase4Started 72 -+#define kPCMPhase4Finished 73 -+ -+#define kV90JaSignalDetected 74 -+#define kV90JdSignalDetected 75 -+#define kV90JdPrimeSignalDetected 76 -+#define kV90RSignalDetected 77 -+#define kV90RBarSignalDetected 78 -+#define kV90CPSignalDetected 79 -+ -+#define kV90CPtSignalSent 80 -+#define kV90CPSignalSent 81 -+#define kV90CPprimeSignalSent 82 -+ -+ -+#define kV34SeamlessRateChangeRequestSent 83 -+#define kV34SeamlessRateChangeUpdateSent 84 -+#define kV34SeamlessRateChangeRequestReceived 85 -+#define kV34SeamlessRateChangeUpdateReceived 86 -+#define kV34SeamlessRateChangeUpdateTimeout 87 -+ -+#define kV90JaSignalAcknowledged 88 -+ -+#define kV34HCtrlChanPPhDetected 100 -+#define kV34HCtrlChanMPhDetected 101 -+#define kV34HCtrlChanRatesKnown 102 -+#define kV34HDXCtrlChanBinary1Detected 103 -+#define kV34HDXPhase3Started 104 -+#define kV34HDXPhase3Finished 105 -+#define kV34HDXPrimChanBinary1Detected 106 -+#define kFlexEventTRN2AFinished 107 -+ -+#define kV32RanginigStarted 108 -+#define kV32RangingStarted 108 -+#define kV32RanginigFinished 109 -+#define kV32RangingFinished 109 -+ -+ -+typedef long lapmStatusCode; -+#define kLapmDisconnected 0 /* LAPM disconnected */ -+#define kLapmConnected 1 /* LAPM is connected */ -+#define kLapmV42ODPDetected 2 /* LAPM ODP is detected */ -+#define kLapmV42ADPDetected 3 /* LAPM V.42 ADP is detected */ -+#define kLapmUnknownADPDetected 4 /* LAPM Unsupported ADP is detected */ -+#define kLapmTimeout 5 /* LAPM Timeout */ -+#define kLapmMNPFrameDetected 6 /* LAPM detected MNP frame */ -+#define kLapmDPDetectionTimedOut 7 /* LAPM Unsupported ADP is detected */ -+#define kLapmError 8 /* LAPM Error */ -+#define kLapmTestResult 9 /* LAPM loopback test result */ -+#define kLapmTxFrameStatus 10 -+#define kLapmRxFrameStatus 11 -+#define kLapmTxStatistics 12 -+#define kLapmRxStatistics 13 -+ -+typedef long lapmTakedownReason; -+#define kLapmRemoteDisconnect 0 -+#define kLapmLocalDisconnect 1 -+#define kLapmCannotConnect 2 -+#define kLapmProtocolError 3 -+#define kLapmCompressionError 4 -+#define kLapmInactivityTimer 5 -+#define kLapmRetryFailed 6 -+ -+ -+typedef long lapmParameterCode; -+#define kLapmXmtK 0 -+#define kLapmRcvK 1 -+#define kLapmXmtN401 2 -+#define kLapmRcvN401 3 -+#define kLapmTESTSupport 4 -+#define kLapmSREJSupport 5 -+#define kLapmCompDir 6 -+#define kLapmCompDictSize 7 -+#define kLapmCompStringSize 8 -+ -+ -+typedef long lapmErrorCode; -+#define kLapmNoError 0 -+#define kLapmBufferOverflow 1 -+#define kLapmFrameTooLong 2 -+#define kLapmBadFrame 3 -+#define kLapmUnknownEvent 4 -+/* 6 is reserved for kLapmRetryFailed defined above */ -+ -+ -+typedef long lapmTestResultCode; -+#define kLapmTestPassed 0 -+#define kLapmTestRequestIgnored 1 -+#define kLapmTestAlreadyInProgress 2 -+#define kLapmTestNotSupported 3 -+#define kLapmTestFailed 4 -+ -+ -+typedef long v42bisStatusCode; -+#define kV42bisEncoderTransparentMode 0 /* V.42bis encoder transparent mode active */ -+#define kV42bisEncoderCompressedMode 1 /* V.42bis encoder compressed mode active */ -+#define kV42bisDecoderTransparentMode 2 /* V.42bis decoder transparent mode active */ -+#define kV42bisDecoderCompressedMode 3 /* V.42bis decoder compressed mode active */ -+#define kV42bisError 4 /* V.42bis error */ -+#define kV42bisEncoderStatistics 5 -+#define kV42bisDecoderStatistics 6 -+ -+ -+typedef long v42bisErrorCode; -+#define kV42bisUndefinedEscSequence 0 /* V.42bis undefined escape sequence */ -+#define kV42bisCodewordSizeOverflow 1 /* V.42bis codeword size overflow */ -+#define kV42bisUndefinedCodeword 2 /* V.42bis undefined codeword */ -+ -+typedef long mnpStatusCode; -+#define kMnpDisconnected 0 /* Mnp disconnected */ -+#define kMnpConnected 1 /* Mnp is connected */ -+#define kMnpFallback 2 /* Mnp is falling back to buffer mode */ -+#define kMnpError 3 /* Mnp Error */ -+#define kMnpTimeout 4 /* Mnp Timeout */ -+#define kMnpInvalidLT 5 /* Invalid LT received */ -+#define kMnpRetransmitFrame 6 -+#define kMnpNack 7 -+#define kMnpTxFrameStatus 8 -+#define kMnpRxFrameStatus 9 -+#define kMnpTxStatistics 10 -+#define kMnpRxStatistics 11 -+ -+typedef long mnpTakedownReason; -+#define kMnpRemoteDisconnect 0 -+#define kMnpLocalDisconnect 1 -+#define kMnpCannotConnect 2 -+#define kMnpProtocolError 3 -+#define kMnpCompressionError 4 -+#define kMnpInactivityTimer 5 -+#define kMnpRetryFailed 6 -+ -+ -+typedef long mnpParameterCode; -+#define kMnpProtocolLevel 0 -+#define kMnpServiceClass 1 -+#define kMnpOptimizationSupport 2 -+#define kMnpCompressionSupport 3 -+#define kMnpN401 4 -+#define kMnpK 5 -+ -+ -+typedef long mnpErrorCode; -+#define kMnpNoError 0 -+#define kMnpBufferOverflow 1 -+#define kMnpFrameTooLong 2 -+#define kMnpBadFrame 3 -+#define kMnpUnknownEvent 4 -+ -+ -+typedef long v70StatusCode; -+#define kV70Disconnected 0 /* V70 disconnected */ -+#define kV70Connected 1 /* V70 is connected */ -+#define kV70Error 2 /* V70 Error */ -+#define kV70Timeout 3 /* V70 Timeout */ -+#define kV70ChannelDown 4 /* V70 channel released */ -+#define kV70ChannelUp 5 /* V70 channel established */ -+#define kV70AudioChannelDown 6 /* V70 audio channel released */ -+#define kV70AudioChannelUp 7 /* V70 audio channel established */ -+#define kV70DataChannelDown 8 /* V70 data channel released */ -+#define kV70DataChannelUp 9 /* V70 data channel established */ -+#define kV70OOBChannelDown 10 /* V70 out-of-band channel released */ -+#define kV70OOBChannelUp 11 /* V70 out-of-band channel established */ -+#define kV70TxFrameStatus 12 -+#define kV70RxFrameStatus 13 -+#define kV70TxStatistics 14 -+#define kV70RxStatistics 15 -+#define kV70StateTransition 16 -+ -+typedef long v70TakedownReason; -+#define kV70RemoteDisconnect 0 -+#define kV70LocalDisconnect 1 -+#define kV70CannotConnect 2 -+#define kV70ProtocolError 3 -+#define kV70CompressionError 4 -+#define kV70InactivityTimer 5 -+#define kV70RetryFailed 6 -+ -+ -+typedef long v70ParameterCode; -+#define kV70SuspendResume 0 -+#define kV70CrcLength 1 -+#define kV70NumberOfDLCs 2 -+#define kV70uIH 3 -+ -+#define kV70LapmXmtK 10 -+#define kV70LapmRcvK 11 -+#define kV70LapmXmtN401 12 -+#define kV70LapmRcvN401 13 -+#define kV70LapmTESTSupport 14 -+#define kV70LapmSREJSupport 15 -+#define kV70LapmCompDir 16 -+#define kV70LapmCompDictSize 17 -+#define kV70LapmCompStringSize 18 -+ -+#define kV70AudioHeader 20 /* if audio header is present in audio frames */ -+#define kV70BlockingFactor 21 /* audio blocking factor (default 1) */ -+#define kV70SilenceSuppression 22 /* audio silence suppression */ -+ -+ -+ -+typedef long v70ErrorCode; -+#define kV70NoError 0 -+#define kV70BadFrame 1 -+ -+typedef long audioStatusCode; -+#define kAudioFramesLost 0 /* One or more audio frames were lost */ -+#define kAudioTxBufferOverflow 1 -+#define kAudioRxBufferOverflow 2 -+#define kAudioRxBufferUnderflow 3 -+ -+ -+typedef long v80StatusCode; -+#define kV80Disconnected 0 /* V80 disconnected */ -+#define kV80Connected 1 /* V80 is connected */ -+#define kV80Error 2 /* V80 Error */ -+#define kV80InBandStatus 3 /* V80 in-band SAM status */ -+#define kV80TxFrameStatus 12 -+#define kV80RxFrameStatus 13 -+#define kV80TxStatistics 14 -+#define kV80RxStatistics 15 -+ -+typedef long v80TakedownReason; -+#define kV80RemoteDisconnect 0 -+#define kV80LocalDisconnect 1 -+ -+typedef long v80ErrorCode; -+#define kV80NoError 0 -+#define kV80BadFrame 1 -+ -+typedef long overlayStatusCode; -+#define kOverlayBegin 0 /* DSP has halted */ -+#define kOverlayEnd 1 /* DSP has received entire overlay */ -+#define kOverlayElapsedTime 2 /* time elapsed(as viewed by datapump) during overlay */ -+#define kOverlayRecordingData 3 /* ms of data that we are recording */ -+#define kOverlayReplayingData 4 /* ms of data that we have replayed so far */ -+#define kOverlayReplayDone 5 /* playback is done */ -+ -+/* types for kOverlayRecording/ReplayingData */ -+#define kOverlayTxData 0 -+#define kOverlayRxData 1 -+ -+/* -+ * Rockwell faxmodem compatible bitmap (kRCFaxBitMapStatus) -+ */ -+#define kRCFaxFCD 0x01 -+#define kRCFaxP2 0x02 -+#define kRCFaxPN 0x04 -+#define kRCFaxDCD 0x08 -+#define kRCFaxTX 0x10 -+#define kRCFaxCTS 0x20 -+ -+ -+#ifndef ADSL_MODEM -+typedef long modemCommandCode; -+#endif -+ /* Basic Action commands 00-63 */ -+#define kIdleCmd 0 -+#define kStartFaxModemCmd 1 -+#define kStartDataModemCmd 2 -+#define kStartCallProgressMonitorCmd 3 -+#define kSendTonesCmd 4 -+#define kStartCallerIDRcvCmd 5 -+#define kSetLinkLayerCmd 6 -+#define kSetFramerCmd 7 -+#define kTestLinkLayerCmd 8 -+#define kIdleRcvCmd 9 -+#define kIdleXmtCmd 10 -+#define kSetStatusHandlerCmd 11 -+#define kSetEyeHandlerCmd 12 -+#define kSetLogHandlerCmd 13 -+#define kSendBreakCmd 14 -+#define kSendTestCmd 15 -+#define kDisconnectLinkCmd 16 -+#define kSetXmtGainCmd 17 -+#define kStartADSICmd 18 -+#define kSetHybridDelayCmd 19 -+#define kCleardownCmd 20 -+#define kInitiateRetrainCmd 21 -+#define kInitiateRateRenegotiationCmd 22 -+#define kDialToneIndicator 23 -+#define kSetRxDataHandler 24 /* not used yet */ -+#define kSetTxDataHandler 25 /* not used yet */ -+#define kSetAuxRxDataHandler 26 -+#define kSetAuxTxDataHandler 27 -+#define kRingIndicatorCmd 28 -+#define kDTERateIndicatorCmd 29 -+#define kStartV8bisCmd 30 -+#define kSendMultiTonesCmd 31 -+#define kSetMultiToneParamsCmd 32 -+#define kSetModemSampleRateCmd 33 -+#define kStartDataModemPTTTestCmd 34 -+#define kStartDataModemLoopbackTestCmd 35 -+#define kRingFrequencyCmd 36 -+#define kSetCallWaitingDetectorStateCmd 37 -+#define kV34HDXTurnOffCurrentModeCmd 38 -+#define kSetAudioCmd 39 -+#define kLoopbackTestAutoRespEnableCmd 40 -+#define kSetCallProgressParamsCmd 41 -+#define kSetTrainingDelayReductionCmd 42 -+#define kSetFaxECMPageBufferPtrCmd 43 -+#define kSetLineCurrentStateCmd 44 -+#define kSetFramerParameterCmd 45 -+#define kStartDozeCmd 46 -+#define kEndDozeCmd 47 -+#define kStartRingFrequencyDetectorCmd 48 -+#define kSetBufferingDelayAdjustmentCmd 49 -+ -+ /* Composite action commands 64-127 */ -+#define kDialCmd 64 -+#define kSendCallingToneCmd 65 -+#define kV24CircuitChangeCmd 66 -+#define kStartATModeCmd 67 -+#define kStopATModeCmd 68 -+#define kSetATRegister 69 -+#define kSetATRegisterLimits 70 -+#define kSetATIResponse 71 -+#define kEnableATDebugMode 72 -+#define kSetWhiteListEntry 73 -+#define kSetBlackListEntry 74 -+ -+#define kV70Setup 75 /* additional V70 configuration */ -+#define kEstablishChannel 76 /* Establish new link layer channel (V70) */ -+#define kReleaseChannel 77 /* Release link layer channel (V70) */ -+#define kWaitChannelEstablished 78 /* Wait for establishment of the new link layer channel (V70) */ -+ -+/* unused 79 */ -+#define kMnpOOBFrameCmd 80 -+#define kV80InBandCmd 81 /* V80 In-band commands */ -+#define kSetV250IdString 82 -+#define kSetInternationalTablesCmd 83 -+#define kConfigureCountryCmd 84 -+#define kConigureCountryCmd 84 -+#define kV8ControlCmd 85 -+#define kV8bisSendMessage 86 -+#define kSetHWIdCmd 87 -+#define kSetCodecIdCmd 88 -+#define kOverCurrentDetected 89 -+ -+ -+ -+typedef long v8ControlType; -+#define kEnableDTEControl 1 -+#define kSetV8ControlTimeout 2 -+#define kSetCIValue 3 -+#define kSetCMValue 4 -+#define kSetJMValue 5 -+#define kSendCJ 6 -+#define kSetCallFunctionCategory 7 -+ -+typedef long v250IdStringCode; -+#define kGMIString 1 -+#define kGMMString 2 -+#define kGMRString 3 -+#define kGSNString 4 -+#define kGOIString 5 -+ -+typedef long kCallProgressParameterCode; -+#define kModemSignalPowerThreshold 1 -+#define kDialtonePowerThreshold 2 -+#define kRingBackPowerThreshold 3 -+#define kBusyPowerThreshold 4 -+#define kReorderPowerThreshold 5 -+#define k2ndDTnPowerThreshold 6 -+#define kMinDialtoneTime 7 -+#define kDialtoneFreqRange 8 -+#define kRingBackFreqRange 9 -+#define kBusyFreqRange 10 -+#define kReorderFreqRange 11 -+#define k2ndDTnFreqRange 12 -+ -+ -+typedef long framerParameterCode; -+#define kSetHDLCLeadingFlags 0 -+#define kHDLCResetFlagDetection 1 -+#define kSyncFramerSetup 2 -+#define kHDLCSendCRC 3 -+#define kHDLCSendFlags 4 -+#define kHDLCSendAborts 5 -+ -+ -+typedef long logDataCode; -+#define eyeData 0 -+#define mseData 1 -+#define rxData 2 -+#define txData 3 -+#define neecData 4 -+#define eqlData 5 -+#define ieecData 6 -+#define feecData 7 -+#define eqlPllData 8 -+#define feecPllData 9 -+#define timingData 10 -+#define pjPhaseErrData 11 -+#define pjEstimateData 12 -+#define pjEstDiffData 13 -+#define pjCoefData 14 -+#define inputSignalData 15 -+#define outputSignalData 16 -+#define agcGainData 17 -+#define automoderData 18 -+#define v8CMData 19 -+#define v8JMData 20 -+#define inputAfterNeecData 21 -+#define eqlErrData 22 -+#define dpskMicrobitsData 23 -+#define v34P2LSamplesData 24 -+#define phaseSplittedLData 25 -+#define fftedLData 26 -+#define channelSNRData 27 -+#define noiseEstimateData 28 -+#define signalEstimateData 29 -+#define v34INFOData 30 -+#define v34ChanProbData 31 -+#define v34P2OutputData 32 -+#define v8ANSamDetectData 33 -+#define pFeecData 34 -+#define channelDelayData 35 -+#define timingOffsetData 36 -+#define trellisMSEData 37 -+#define interpolatedSignalData 38 -+#define dcCancelledSignalData 39 -+#define echoCancelledSignalData 40 -+#define predictorErrData 41 -+#define commandInfoData 42 -+#define unusedInfoData 43 -+#define atCommandInfoData 44 -+#define atResponseInfoData 45 -+#define hwTerminalTxData 46 -+#define hwTerminalRxData 47 -+#define statusInfoData 48 -+#define channelResponseData 49 -+#define channelImpulseRespData 50 -+#define x2PcmP1DetectorInData 51 -+#define x2PcmP1DetectorOutData 52 -+#define eqlRealData 53 -+#define ieecRealData 54 -+#define neecOutputData 55 -+#define precodedEqlOutputData 56 -+#define eqlRealErrData 57 -+#define idealEqlOutputData 58 -+#define agcData 59 -+#define pcmInfidelityData 60 -+#define v42bisCycleCount 61 -+#define pcmImdOffsetCoefData 62 -+#define pcmImdOffsetData 63 -+#define v90RcvdDilLongData 64 -+#define v90RcvdDilShortData 65 -+#define v90DilProducedData 66 -+#define pcmEncoderKbitsData 67 -+#define pcmEncoderMbitsData 68 -+#define pcmEncoderSbitsData 69 -+#define pcmDecoderKbitsData 70 -+#define pcmDecoderMbitsData 71 -+#define pcmDecoderSbitsData 72 -+#define v90CPorCPtData 73 -+#define mnpDecoderInputData 74 -+#define mnpDecoderOutputData 75 -+#define v42bisEncoderInputData 76 -+#define v42bisDecoderInputData 77 -+#define modulatorInputData 78 -+#define modulatorOutputData 79 -+#define encodedStatusData 80 -+#define blockFramerTxData 81 -+#define blockFramerRxData 82 -+#define framerTxData 83 -+#define framerRxData 84 -+#define dpskBasebandData 85 -+#define dpskBasebandLPFedData 86 -+#define dpskRealData 87 -+#define bandEdgeCorrectedSignalData 88 -+#define atmLogData 89 -+#define clearEocLogData 90 -+#define g997LogData 91 -+ -+ -+#define kLogDataDelimiter 0xFEFEFEFE -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.3 Handlers */ -+/****************************************************************************/ -+ -+typedef void (SM_DECL *rcvHandlerType) (void *gDslVars, int, short*); -+typedef void (SM_DECL *xmtHandlerType) (void *gDslVars, int, short*); -+typedef int (SM_DECL *xmtHandlerWithRtnValType) (void *gDslVars, int, short*); -+typedef void (SM_DECL *timerHandlerType) (void *gDslVars, long); -+typedef int (SM_DECL *interpolatorHandlerType) (void *gDslVars, int, short*, short*); -+typedef void (SM_DECL *controlHandlerType) (void *gDslVars, int); -+ -+typedef int (SM_DECL *txDataHandlerType) (void *gDslVars, int, uchar*); -+typedef int (SM_DECL *rxDataHandlerType) (void *gDslVars, int, uchar*); -+ -+typedef bitMap (SM_DECL *signalDetectorType) (void *gDslVars, int, long, long*); -+ -+ -+typedef void (SM_DECL *hookHandlerType) (void *gDslVars, Boolean); -+ -+typedef short* (SM_DECL *sampBuffPtrType) (void *gDslVars, int); -+ -+typedef void (SM_DECL *eyeHandlerType) (void *gDslVars, int, ComplexShort*); -+typedef void (SM_DECL *logHandlerType) (void *gDslVars, logDataCode, ...); -+ -+typedef void (SM_DECL *voidFuncType) (void *gDslVars); -+ -+typedef int (SM_DECL *txAudioHandlerType) (void *gDslVars, int, short*); -+typedef int (SM_DECL *rxAudioHandlerType) (void *gDslVars, int, short*); -+ -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.4 Structures */ -+/****************************************************************************/ -+ -+/* -+ * AT command processor definitions -+ */ -+#define kATRegistersNumber 56 -+#define kFirstConfigurationRegister 500 -+#define kLastConfigurationRegister 515 -+#define kFirstInternationalRegister 516 -+#define kLastInternationalRegister 595 -+ -+ -+ -+#define kATMaxDialStringSize 128 -+typedef struct -+ { -+ struct -+ { -+ uchar loadNumber; /* Which profile to load upon powerup/reset */ -+ uchar countryCode; /* T.35 Country Code */ -+ uchar profile[2][kATRegistersNumber]; -+ uchar dialString[4][kATMaxDialStringSize + 1]; -+ } config; -+ ulong versionCode; -+ ulong crcCheckSum; -+ } NVRAMConfiguration; -+ -+/* Structure to hold international settings */ -+typedef struct -+ { -+ char *name; -+ int countryCode; -+ const SRegisterDefinition *userRegisters; -+ const ulong *configRegisters; -+ } CountryDescriptor; -+ -+/* -+ * V.34 coding parameters structure -+ */ -+ -+typedef struct -+ { -+ /* DO NOT CHANGE THE ORDER OF FIELDS IN THIS STRUCTURE! -+ * (Some assembly code depends on it!) If you -+ * must add fields, please do so at the bottom. -+ */ -+ -+ int symbolRateIndex, -+ dataRateIndex, -+ userSNRAdjustment; -+ Boolean auxChannel, -+ expConstellation, -+ precoding, -+ nonlinearCoding; -+ schar J, /* number of data frames in superframe */ -+ P, /* number of mapping frames in a data frame */ -+ r, /* number of high mapping frames in a data frame */ -+ b, /* number of data bits in a mapping frame */ -+ W, /* number of aux bits in a data frame */ -+ K, /* number of S bits in a mapping frame */ -+ q, /* number of Q bits in a 2D symbol */ -+ M; /* number of rings in shell mapping */ -+ long nominalVariance; /* the signal variance which gives 1e-2 BLER Q10 */ -+ int bitsPerDataFrame; -+ short quantRoundOff, -+ quantMask; -+ uchar nTrellisStates, -+ log2NTrellisStates; -+ short gain1xmt, -+ gain2xmt, -+ gain1rcv, -+ gain2rcv; -+ ushort bitInversionPattern; -+ } V34CodingParams; -+ -+typedef long v8bisStatusCode; -+typedef bitMap v8bisConnectionSetup; -+#if defined(V8BIS) || defined(AT_COMMANDS_V8BIS) -+#include "V8bisMainTypes.h" -+#endif -+ -+#define kMaxMultiTones 4 /* MultiTone: search for up to this many tones at once */ -+ -+#ifndef ADSL_MODEM -+typedef struct -+ { -+ modemStatusCode code; -+ union -+ { -+ long value; -+ long freq; -+ modemErrorCode error; -+ modulationMap modulation; -+ modulationMap modemSignal; -+ dataRateMap dataRate; -+ long dtmfSignal; -+ bitMap callProgressSignal; -+ bitMap customSignal; -+ void *ptr; -+ struct -+ { -+ long detected; -+ long numTones; -+ long tones[kMaxMultiTones]; -+ } multiToneInfo; -+ struct -+ { -+ v8bisStatusCode code; -+ long value; -+ } v8bisStatus; -+ struct -+ { -+ trainingProgressCode code; -+ long value; -+ } trainingInfo; -+ struct -+ { -+ long code; -+ long value; -+ } v24Circuit; -+ struct -+ { -+ trainingProgressCode code; -+ void* ptr; -+ } advancedTrainingInfo; -+ struct -+ { -+ capabilitiesStatusCode code; -+ long value; -+ } capabilitiesStatusInfo; -+ struct -+ { -+ connectionInfoCode code; -+ long value; -+ } connectionInfo; -+ struct -+ { -+ connectionInfoCode code; -+ int length; -+ uchar *ptr; -+ } advancedConnectionInfo; -+ struct -+ { -+ dialerStatusCode code; -+ long value; -+ long makeTime; -+ long breakTime; -+ } dialerStatus; -+ struct -+ { -+ long enabled; -+ long volume; -+ } speakerStatus; -+ framingInfoCode framingInfo; -+ IOStatusCode ioStatus; -+ struct -+ { -+ lapmStatusCode code; -+ union -+ { -+ long value; -+ lapmTakedownReason reason; -+ lapmErrorCode error; -+ lapmTestResultCode testResult; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ } param; -+ } lapmStatus; -+ struct -+ { -+ lapmParameterCode code; -+ long value; -+ } lapmParameter; -+ struct -+ { -+ v42bisStatusCode code; -+ union -+ { -+ long value; -+ v42bisErrorCode error; -+ struct -+ { -+ long nBytesIn; -+ long nBytesOut; -+ } statistic; -+ } param; -+ } v42bisStatus; -+ struct -+ { -+ mnpStatusCode code; -+ union -+ { -+ long value; -+ mnpTakedownReason reason; -+ mnpErrorCode error; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ ulong nSize; -+ uchar *Buffer; -+ } fallback; -+ struct -+ { -+ char *header; -+ void *frame; -+ } frame; -+ struct -+ { -+ long nack; -+ long rFrameNo; -+ } timeout; -+ struct -+ { -+ long frameNo; -+ long framesPending; -+ } retrFrame; -+ } param; -+ } mnpStatus; -+ struct -+ { -+ mnpParameterCode code; -+ long value; -+ } mnpParameter; -+ struct -+ { -+ v70StatusCode code; -+ union -+ { -+ long value; -+ v70TakedownReason reason; -+ v70ErrorCode error; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long nack; -+ long rFrameNo; -+ } timeout; -+ struct -+ { -+ long frameNo; -+ long framesPending; -+ } retrFrame; -+ struct -+ { -+ long ChannelId; -+ long DLCI; -+ ulong LcNum; -+ v70TakedownReason reason; -+ } channelInfo; -+ struct -+ { -+ long ChannelId; -+ long stateOld; -+ long stateNew; -+ } stateInfo; -+ } param; -+ ulong v70Time; -+ } v70Status; -+ struct -+ { -+ audioStatusCode code; -+ union -+ { -+ long value; -+ struct -+ { -+ long nReq; -+ long nAvail; -+ } buffer; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ } param; -+ } audioStatus; -+ struct -+ { -+ v80StatusCode code; -+ union -+ { -+ long value; -+ v80TakedownReason reason; -+ v80ErrorCode error; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long code; -+ long value; -+ } inBand; -+ } param; -+ ulong v80Time; -+ } v80Status; -+ struct -+ { -+ v70ParameterCode code; -+ long value; -+ } v70Parameter; -+ struct -+ { -+ breakType type; -+ long length; -+ } breakStatus; -+ struct -+ { -+ callerIDStatusCode code; -+ union -+ { -+ long value; -+ struct -+ { -+ callerIDErrorCode code; -+ long value; -+ } callerIDError; -+ struct -+ { -+ long length; -+ char* ptr; -+ } message; -+ } param; -+ } callerIDStatus; -+ struct -+ { -+ ulong signal; -+ uchar *msg1; -+ long msg1Length; -+ uchar *msg2; -+ long msg2Length; -+ } A8RStatus; -+ struct -+ { -+ overlayStatusCode code; -+ long value; -+ long value2; -+ } overlayStatus; -+ struct -+ { -+ ulong nBits; -+ ulong nBlocks; -+ ulong nBitErrors; -+ ulong nBlockErrors; -+ -+ ulong nAudioBits; -+ ulong nAudioBlocks; -+ ulong nAudioSyncErrors; -+ ulong nAudioBlockErrors; -+ } testResults; -+ ulong checksum; -+ struct -+ { -+ ulong sizeM; -+ uchar *filename; -+ } logFileControlStatus; -+ struct -+ { -+ long direction; -+ long module; -+ long message; -+ long data; -+ } -+ faxClass2Status; -+ -+ } param; -+ } modemStatusStruct; -+ -+typedef void (SM_DECL *statusHandlerType) (void *gDslVars, modemStatusStruct*); -+#endif /* ADSL_MODEM */ -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.5 Command structure */ -+/****************************************************************************/ -+ -+typedef struct -+ { -+ Boolean remoteModemIsFlex; -+ uchar countryCode; -+ ushort manufacturerId; -+ uchar licenseeId; -+ uchar productCapabilities; -+ Boolean digitalModeFlag; -+ Boolean prototypeFlag; -+ uchar version; -+ } -+FlexV8bisStruct; -+ -+typedef struct -+ { -+ symbolRateMap symbolRates; -+ dataRateMap dataRates; -+ dataRateMap dataRates56k; -+ dataRateMap dataRatesFlex; -+ featureMap features; -+ bitMap auxFeatures; -+ bitMap demodCapabilities; -+ long rateThresholdAdjustment; /* dB Q4 */ -+ FlexV8bisStruct flexRemoteV8bisInfo; -+ } dataPumpCapabilities; -+ -+#ifndef ADSL_MODEM -+typedef struct SoftwareModemCommandParameters -+ { -+ modemCommandCode command; -+ union -+ { -+ long xmtGain; -+ ulong hybridDelayQ4ms; -+ long modemSampleRate; -+ long timeInMs; -+ long state; -+ long freq; -+ NVRAMConfiguration *nvramConfigurationPtr; -+ long enabled; -+ long value; -+ uchar *phoneNumber; -+ uchar *faxECMPageBufferPtr; -+ CountryDescriptor *countryDescriptorTable; -+ struct -+ { -+ dataRateMap dteRate; -+ bitMap format; -+ } dteRateSpec; -+ struct -+ { -+ v8ControlType code; -+ long value; -+ uchar *buffer; -+ } v8ControlSpec; -+ struct -+ { -+ directionType direction; -+ v8bisConnectionSetup setup; -+ void *capPtr; -+ voidFuncType confirmMsFunc; -+ voidFuncType genMsFunc; -+ xmtHandlerWithRtnValType ogmFunc; -+ } v8bisSpec; -+ struct -+ { -+ directionType direction; -+ } ADSISpec; -+ struct -+ { -+ directionType direction; -+ modulationMap modulations; -+ dataPumpCapabilities capabilities; -+ } modeSpec; -+ struct -+ { -+ long time, -+ freq1, -+ freq2, -+ freq3, -+ freq4, -+ mag1, -+ mag2, -+ mag3, -+ mag4; -+ } toneSpec; -+ struct -+ { -+ long signal; -+ uchar *msg1; -+ long msg1Length; -+ uchar *msg2; -+ long msg2Length; -+ long sig_en; -+ long msg_en; -+ long supp_delay; -+ } -+ v8bisMessageSpec; -+ struct -+ { -+ linkLayerType type; -+ bitMap setup; -+ dataRateMap rxDataRate; -+ dataRateMap txDataRate; -+ long rtDelayQ4ms; -+ rxDataHandlerType rxDataHandlerPtr; -+ txDataHandlerType txDataHandlerPtr; -+ } linkLayerSpec; -+ struct -+ { -+ framerType type; -+ bitMap setup; -+ directionType direction; -+ long fill[2]; /* need to match linkLayerSpec */ -+ rxDataHandlerType rxDataHandlerPtr; -+ txDataHandlerType txDataHandlerPtr; -+ } framerSpec; -+ struct -+ { -+ framerParameterCode code; -+ long value; -+ } framerParameterSpec; -+ struct -+ { -+ bitMap callProgressDetectorSetup; -+ signalDetectorType callProgressDetectorPtr; /* if nil, use defaults */ -+ signalDetectorType customDetectorPtr; /* if nil, no custom detector */ -+ } callProgressMonitorSpec; -+ struct -+ { -+ ulong maxTones; /* maximum number of simultaneous tones to detect */ -+ ulong allowableVariance; /* maximum cumulative variance in the eight interpolated frequencies */ -+ ulong totalPowerThreshold; /* ignore complete block if power less than this */ -+ ulong powerShiftThreshold; /* ignore a bin if its power is less than (totalPowerValue >> powerShiftThreshold) */ -+ ulong toneMatchThresholdHz; /* tones within +/- this many Hz of original tone are considered the same tone */ -+ ulong binSeparation; /* ignore tones with a spacing of less than this */ -+ ulong outsideFreqDeviation; /* an individual value in the interpolated array can be up to this many Hz outside of the expected angle range */ -+ } multiToneSpec; -+ struct -+ { -+ uchar *dialString; /* nil limited string for DTMF dialing sequence */ -+ long pulseBreakTime, -+ pulseMakeTime, -+ pulseInterDigitTime, -+ toneDigitTime, -+ toneInterDigitTime, -+ toneLoGroupMag, -+ toneHiGroupMag, -+ flashTime, -+ pauseTime, -+ signalWaitTimeout, -+ blindDialingTimeout; -+ bitMap dialerSetup; -+ bitMap callProgressDetectorSetup; -+ signalDetectorType callProgressDetectorPtr; /* if nil, use defaults */ -+ signalDetectorType customDetectorPtr; /* if nil, no custom detector */ -+ hookHandlerType hookHandlerPtr; /* nil if DTMF dialing specified*/ -+ } dialSpec; -+ struct -+ { -+ long timeOn, -+ timeOff, -+ freq; -+ } callingToneSpec; -+ union -+ { -+ statusHandlerType statusHandlerPtr; -+ eyeHandlerType eyeHandlerPtr; -+ logHandlerType logHandlerPtr; -+ rxDataHandlerType rxDataHandlerPtr; -+ txDataHandlerType txDataHandlerPtr; -+ } handlerSpec; -+ struct -+ { -+ breakType type; -+ long length; -+ } breakSpec; -+ struct -+ { -+ long length; -+ uchar *dataPtr; -+ } lapmTestSpec; -+ struct -+ { -+ bitMap setupLapm; -+ rxDataHandlerType rxAudioHandlerPtr; -+ txDataHandlerType txAudioHandlerPtr; -+ } v70SetupSpec; -+ struct -+ { -+ ulong ChannelId; -+ ulong LogChannelNum; -+ ulong PortNum; -+ } EstChannelSpec; -+ struct -+ { -+ ulong ChannelId; -+ } WaitChannelSpec; -+ struct -+ { -+ ulong ChannelId; -+ ulong LogChannelNum; -+ ulong PortNum; -+ ulong DLCI; -+ } RelChannelSpec; -+ struct -+ { -+ audioType type; -+ bitMap setup; -+ dataRateMap rxAudioRate; -+ dataRateMap txAudioRate; -+ rxAudioHandlerType rxAudioHandlerPtr; -+ txAudioHandlerType txAudioHandlerPtr; -+ } audioSpec; -+ struct -+ { -+ long code; -+ long value; -+ } v24Circuit; -+ struct -+ { -+ ulong code; -+ ulong value; -+ ulong minValue; -+ ulong maxValue; -+ } atRegister; -+ struct -+ { -+ long code; -+ uchar *response; -+ } atiSpec; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frameSpec; -+ struct -+ { -+ long code; -+ union -+ { -+ long value; -+ struct -+ { -+ long loFreq1; -+ long hiFreq1; -+ long loFreq2; -+ long hiFreq2; -+ } freqRange; -+ } params; -+ } callProgressParamSpec; -+ struct -+ { -+ v250IdStringCode v250IdCode; -+ uchar *v250IdString; -+ } v250IdSpec; -+ -+ } param; -+ } modemCommandStruct; -+ -+typedef Boolean (*commandHandlerType) (modemCommandStruct*); -+#endif /* ADSL_MODEM */ -+ -+ -+ -+/****************************************************************************/ -+/* 2. Constant definitions. */ -+/* */ -+/* 2.1 Definitive constants */ -+/****************************************************************************/ -+ -+#define kMaxSampleBlockSize 48 -+#define kMaxDataBlockSize 48 -+ -+#define kMaxDialStringLength 127 -+#define kCallProgressSampleRate 7200 -+ -+#define kMaxCallerIDMessageLength 80 -+ -+/****************************************************************************/ -+/* 2. Constant definitions. */ -+/* */ -+/* 2.2 Bit maps */ -+/****************************************************************************/ -+ -+/* modulationMap */ -+ -+#define kIdle 0x00000000 -+#define kV25 0x00000001 -+#define kV8 0x00000002 -+#define kCid 0x00000004 -+#define kV8bis 0x00000008 -+#define kV21 0x00000010 -+#define kV22 0x00000020 -+#define kV23 0x00000040 -+#define kV32 0x00000080 -+#define kV34 0x00000100 -+#define kX2 0x00000200 -+#define kV90 0x00000400 -+#define k56Flex 0x00000800 -+#define kV27 0x00001000 -+#define kV29 0x00002000 -+#define kV17 0x00004000 -+#define kV34HDX 0x00008000 -+#define kV34HDXC 0x00010000 -+#define kBell103 0x00100000 -+#define kBell212 0x00200000 -+#define kDataCallingTone 0x01000000 -+#define kFaxCallingTone 0x02000000 -+ -+#define kV22FastNZConnect 0x04000000 -+#define kV22FastNNZConnect 0x08000000 -+#define kV22FastConnect (kV22FastNZConnect|kV22FastNNZConnect) -+#define kV22bisFastConnect 0x10000000 -+ -+ -+#define kDataModulations (kV25 | kV8 | kV21 | kV22FastConnect | kV22bisFastConnect | kV22 | kV23 | kV32 | kV34 | kBell103 | kBell212) -+#define kDataOnlyModulations (kV21 | kV22 | kV23 | kV32 | kBell103 | kBell212) -+#define kPCMModulations (kV90 | kX2 | k56Flex) -+ -+#define kFaxModulations (kV25 | kV21 | kV27 | kV29 | kV17) -+#define kFaxOnlyModulations (kV27 | kV29 | kV17) -+#define kFaxModulationShift 12 -+ -+/* symbolRateMap */ -+ -+#define k1200Hz 0x00000001 -+#define k1600Hz 0x00000002 -+#define k2400Hz 0x00000004 -+#define k2743Hz 0x00000008 -+#define k2800Hz 0x00000010 -+#define k3000Hz 0x00000020 -+#define k3200Hz 0x00000040 -+#define k3429Hz 0x00000080 -+#define k8000Hz 0x00000100 -+ -+#define kAllSymbolRates ( k1200Hz | k1600Hz | k2400Hz | k2743Hz | \ -+ k2800Hz | k3000Hz | k3429Hz | k8000Hz ) -+ -+/* dataRateMap */ -+ -+#define k75bps 0x00000002 -+#define k300bps 0x00000004 -+#define k600bps 0x00000008 -+#define k1200bps 0x00000010 -+#define k2400bps 0x00000020 -+#define k4800bps 0x00000040 -+#define k7200bps 0x00000080 -+#define k9600bps 0x00000100 -+#define k12000bps 0x00000200 -+#define k14400bps 0x00000400 -+#define k16800bps 0x00000800 -+#define k19200bps 0x00001000 -+#define k21600bps 0x00002000 -+#define k24000bps 0x00004000 -+#define k26400bps 0x00008000 -+#define k28800bps 0x00010000 -+#define k31200bps 0x00020000 -+#define k33600bps 0x00040000 -+#define k36000bps 0x00080000 -+#define k38400bps 0x00100000 -+#define k57600bps 0x00200000 -+#define k115200bps 0x00400000 -+#define k230400bps 0x00800000 -+#define k460800bps 0x01000000 -+#define k921600bps 0x02000000 -+/* -+ * kPCMRate is used to identify that the reported rate is -+ * PCM modulation rate, and is only used for PCM modulation while -+ * reporting rate !!!! -+ */ -+#define kPCMRate 0x40000000 -+#define kPCMFlexRate 0x80000000 -+#define kAllDataRates 0x0FFFFFFF -+ -+/* rates specific for X2 and V.90 */ -+#define kPCM25333bps 0x00000001 -+#define kPCM26666bps 0x00000002 -+#define kPCM28000bps 0x00000004 -+#define kPCM29333bps 0x00000008 -+#define kPCM30666bps 0x00000010 -+#define kPCM32000bps 0x00000020 -+#define kPCM33333bps 0x00000040 -+#define kPCM34666bps 0x00000080 -+#define kPCM36000bps 0x00000100 -+#define kPCM37333bps 0x00000200 -+#define kPCM38666bps 0x00000400 -+#define kPCM40000bps 0x00000800 -+#define kPCM41333bps 0x00001000 -+#define kPCM42666bps 0x00002000 -+#define kPCM44000bps 0x00004000 -+#define kPCM45333bps 0x00008000 -+#define kPCM46666bps 0x00010000 -+#define kPCM48000bps 0x00020000 -+#define kPCM49333bps 0x00040000 -+#define kPCM50666bps 0x00080000 -+#define kPCM52000bps 0x00100000 -+#define kPCM53333bps 0x00200000 -+#define kPCM54666bps 0x00400000 -+#define kPCM56000bps 0x00800000 -+#define kPCM57333bps 0x01000000 -+ -+#define kV90ServerToClientDataRates \ -+ ( kPCM28000bps | kPCM29333bps | kPCM30666bps | \ -+ kPCM32000bps | kPCM33333bps | kPCM34666bps | \ -+ kPCM36000bps | kPCM37333bps | kPCM38666bps | \ -+ kPCM40000bps | kPCM41333bps | kPCM42666bps | \ -+ kPCM44000bps | kPCM45333bps | kPCM46666bps | \ -+ kPCM48000bps | kPCM49333bps | kPCM50666bps | \ -+ kPCM52000bps | kPCM53333bps | kPCM54666bps | \ -+ kPCM56000bps | kPCM57333bps ) -+ -+#define kV90ClientToServerDataRates \ -+ ( k4800bps | k7200bps | k9600bps | k12000bps | \ -+ k14400bps | k16800bps | k19200bps | k21600bps | \ -+ k24000bps | k26400bps | k28800bps | k31200bps | \ -+ k33600bps ) -+ -+ -+ -+#define kX2ServerToClientDataRates \ -+ ( kPCM25333bps | kPCM26666bps | kPCM28000bps | \ -+ kPCM29333bps | kPCM30666bps | kPCM32000bps | \ -+ kPCM33333bps | \ -+ kPCM34666bps | kPCM36000bps | kPCM37333bps | \ -+ kPCM38666bps | kPCM40000bps | kPCM41333bps | \ -+ kPCM42666bps | kPCM44000bps | kPCM45333bps | \ -+ kPCM46666bps | kPCM48000bps | kPCM49333bps | \ -+ kPCM50666bps | kPCM52000bps | kPCM53333bps | \ -+ kPCM54666bps | kPCM56000bps | kPCM57333bps ) -+#define kX2ClientToServerDataRates \ -+ ( k4800bps | k7200bps | k9600bps | k12000bps | k14400bps | \ -+ k16800bps | k19200bps | k21600bps | k24000bps | k26400bps | k28800bps | \ -+ k31200bps ) -+ -+ /* -+ Rates specific for Flex -+ */ -+#define kPCMFlex32000bps 0x00000001 -+#define kPCMFlex34000bps 0x00000002 -+#define kPCMFlex36000bps 0x00000004 -+#define kPCMFlex38000bps 0x00000008 -+#define kPCMFlex40000bps 0x00000010 -+#define kPCMFlex42000bps 0x00000020 -+#define kPCMFlex44000bps 0x00000040 -+#define kPCMFlex46000bps 0x00000080 -+#define kPCMFlex48000bps 0x00000100 -+#define kPCMFlex50000bps 0x00000200 -+#define kPCMFlex52000bps 0x00000400 -+#define kPCMFlex54000bps 0x00000800 -+#define kPCMFlex56000bps 0x00001000 -+#define kPCMFlex58000bps 0x00002000 -+#define kPCMFlex60000bps 0x00004000 -+ -+#define kFlexServerToClientDataRates \ -+ ( kPCMFlex32000bps | kPCMFlex34000bps | kPCMFlex36000bps | kPCMFlex38000bps | \ -+ kPCMFlex40000bps | kPCMFlex42000bps | kPCMFlex44000bps | kPCMFlex46000bps | \ -+ kPCMFlex48000bps | kPCMFlex50000bps | kPCMFlex52000bps | kPCMFlex52000bps | \ -+ kPCMFlex54000bps | kPCMFlex56000bps | kPCMFlex58000bps | kPCMFlex60000bps ) -+ -+#define kFlexClientToServerDataRates \ -+ ( k4800bps | k7200bps | k9600bps | k12000bps | \ -+ k14400bps | k16800bps | k19200bps | k21600bps | \ -+ k24000bps | k26400bps | k28800bps | k31200bps ) -+ -+ -+#define k2400BitShift 5 -+#define k4800BitShift 6 -+ -+#define kPCM28000bpsShift 2 -+ -+#define kV21Rates k300bps -+#define kV22Rates k1200bps -+#define kV22bisRates (k1200bps | k2400bps) -+#define kV23Rates (k75bps | k1200bps) -+#define kCidRates (k1200bps) -+#define kV32Rates (k4800bps | k9600bps) -+#define kV32bisRates (kV32Rates | k7200bps | k12000bps | k14400bps) -+#define kV32terboRates (kV32bisRates | k16800bps | k19200bps) -+#define kV34Rates ( k2400bps | k4800bps | k7200bps | k9600bps | k12000bps | k14400bps | \ -+ k16800bps | k19200bps | k21600bps | k24000bps | k26400bps | k28800bps | \ -+ k31200bps | k33600bps ) -+ -+#define kV27Rates (k2400bps | k4800bps) -+#define kV29Rates (k4800bps | k7200bps | k9600bps) -+#define kBell103Rates k300bps -+#define kBell212Rates k1200bps -+ -+ -+/* Demodulator capabilities */ -+#define kNeecEnabled 0x00000001 -+#define kPFeecEnabled 0x00000002 -+#define kIeecEnabled 0x00000004 -+#define kFeecEnabled 0x00000008 -+ -+#define kRapidEqualizerTraining 0x00000010 -+#define kRapidPECTraining 0x00000020 -+#define kRapidECTraining 0x00000040 -+#define kAutoLoadReductionEnabled 0x00000080 -+ -+#define kTimingTrackingEnabled 0x00000100 -+#define kPhaseLockedLoopEnabled 0x00000200 -+#define kFeecPhaseLockedLoopEnabled 0x00000400 -+#define kPhaseJitterTrackingEnabled 0x00000800 -+ -+#define kClockErrorTrackingEnabled 0x00001000 -+#define kFreqOffsetTrackingEnabled 0x00002000 -+#define kFeecFreqOffsetTrackingEnabled 0x00004000 -+ -+#define kShorterNeecEnabled 0x00008000 -+#define kShorterPFeecEnabled 0x00010000 -+#define kFrondEndHPFilterEnabled 0x00020000 -+#define kGainControlEnabled 0x00040000 -+#define kPhaseHitControlEnabled 0x00080000 -+#define kBandEdgeCorrectorEnabled 0x00100000 -+#define kDisableFaxFastClearDown 0x00200000 -+ -+#define kImdOffsetCompensationEnabled 0x00400000 -+ -+#define kV34ShortEqlLengthExtShift 23 -+#define kV34ShortEqlLengthExtMask (0x3<<kV34ShortEqlLengthExtShift) -+#define kV34EqlLengthReductionEnabled (1<<(kV34ShortEqlLengthExtShift+2)) -+#define kPCMIeecLengthReductionEnabled (1<<(kV34ShortEqlLengthExtShift+3)) -+ -+/* featureMap */ -+ -+#define kAllFeatures 0xFFFFFFFF -+ -+#define kAutomodingEnabled 0x00000001 /* bit 1 */ -+#define kAutomodingDisabled 0x00000000 /* bit 1 */ -+ -+#define kV8SendCIEnabled 0x00000002 /* bit 2 */ -+#define kV8SendCIDisabled 0x00000000 /* bit 2 */ -+ -+#define kV34CMEModem 0x00000004 /* bit 3 */ -+#define kV34NotCMEModem 0x00000000 /* bit 3 */ -+ -+#define kV34ExtraINFOPreamble 0x00000008 /* bit 4 */ -+ -+#define kRetrainingEnabled 0x00000010 -+#define kRateRenegotiationEnabled 0x00000020 -+#define kTrellisCodingEnabled 0x00000040 -+ -+/* Fax specific features */ -+#define kFaxShortTraining 0x00000080 -+#define kFaxEchoSuppressionEnabled 0x00000100 -+ -+/* V.22/V.22bis specific features */ -+#define kV22GuardTone1800HzEnabled 0x00000200 -+#define kV22GuardTone550HzEnabled 0x00000400 -+ -+ -+/* V.34 specific features */ -+ -+#define kV34bisEnabled 0x00000800 -+ -+#define kV34PowerReductionAllowed 0x00001000 -+#define kAuxChannelEnabled 0x00002000 -+#define kAuxChannelDisabled 0x00000000 -+#define kV34TrellisEncoderTypeMask 0x0000C000 -+#define kV34TrellisEncoderTypeShift 14 -+ -+#define kTRN16 0x00010000 -+#define kAssymDataRatesEnabled 0x00020000 -+#define kNonLinearCodingEnabled 0x00040000 -+#define kConstShapingEnabled 0x00080000 -+#define kPrecodingEnabled 0x00100000 -+ -+#define kV34LoFcAt2400HzEnabled 0x00200000 -+#define kV34HiFcAt2400HzEnabled 0x00400000 -+#define kV34LoFcAt2743HzEnabled 0x00800000 -+#define kV34HiFcAt2743HzEnabled 0x01000000 -+#define kV34LoFcAt2800HzEnabled 0x02000000 -+#define kV34HiFcAt2800HzEnabled 0x04000000 -+#define kV34LoFcAt3000HzEnabled 0x08000000 -+#define kV34HiFcAt3000HzEnabled 0x10000000 -+#define kV34LoFcAt3200HzEnabled 0x20000000 -+#define kV34HiFcAt3200HzEnabled 0x40000000 -+#define kV34LoFcAt3429HzEnabled 0x80000000 -+#define kV34HiFcAt3429HzEnabled 0x80000000 -+ -+/* auxiliary features definintions map */ -+ -+#define kLoopbackTestFinish 0x00000000 -+#define kLoopbackTestV54Loop1 0x00000001 -+#define kLoopbackTestV54Loop2 0x00000002 -+#define kLoopbackTestV54Loop3 0x00000003 -+#define kLoopbackTestTypeMask 0x00000003 -+#define kLoopbackTestAutoRespondEnabled 0x00000004 -+#define kLoopbackSelfTest 0x00000008 -+ -+#define kPreempFilterMask 0x000000F0 -+#define kPreempFilterShift 4 -+ -+#define kPcmCodingTypeMuLaw 0x00000100 -+#define kPcmServerToServerEnabled 0x00000200 -+#define kPcmIsServerModem 0x00000400 -+#define kPcmAnalogModemAvailable 0x00000800 -+#define kPcmDigitalModemAvailable 0x00001000 -+#define kPcmDceOnDigitalNetwork 0x00002000 -+#define kPcmDModemPwrCalAtCodecOut 0x00004000 -+#define kPcm3429UpstreamAvailable 0x00008000 -+ -+#define kPcmSpectralShapingBitsMask 0x00070000 -+#define kPcmSpectralShapingBitsShift 16 -+#define kV90ServerNotDetSbarAfterJdbarFix 0x00080000 -+ -+#define kAutomoderPassive 0x00400000 -+ -+#define kV8HoldANSamUntilDetCI 0x00800000 -+#define kFaxSendFromOrgSide 0x01000000 -+#define kFaxV34HDX2400bpsCtrlChan 0x02000000 -+#define kFaxV34HDXAllowAsymCtrlChan 0x04000000 -+#define kV8ANSamStageDisabled 0x08000000 -+ -+#define kFlexSkipV8bis 0x10000000 -+#define kV34ControlChannelEnabled 0x20000000 -+#define kV34SeamlessRateChangeEnabled 0x40000000 -+ -+#define kPTTTest 0x80000000 -+ -+/* call progress detection Map */ -+ -+#define kDialTone 0x00000001 -+#define kRingBack 0x00000002 -+#define kBusy 0x00000004 -+#define kReorder 0x00000008 -+#define k2ndDTn 0x00000010 -+#define kBongTone 0x00000020 -+ -+/* Break type bit settings */ -+#define kExpedited 0x0001 -+#define kDestructive 0x0002 -+ -+/* async Framer setup map */ -+ -+#define kNDataBitsMask 0x03 -+#define k5DataBits 0x00 -+#define k6DataBits 0x01 -+#define k7DataBits 0x02 -+#define k8DataBits 0x03 -+ -+#define kNDataBitsShift 0 -+#define kNDataBitsOffset 5 -+ -+#define kParityTypeMask 0x1C -+#define kNoParity 0x00 -+#define kOddParity 0x04 -+#define kEvenParity 0x08 -+#define kMarkParity 0x0C -+#define kSpaceParity 0x10 -+ -+#define kNStopBitsMask 0x60 -+#define k1StopBits 0x00 -+#define k2StopBits 0x20 -+ -+#define kNStopBitsShift 5 -+#define kNStopBitsOffset 1 -+ -+/* Sync Framer setup map */ -+ -+#define kUnderrunCharMask 0xff -+#define kRepeatLastCharOnUnderrun 0x100 -+ -+/* HDLC sync framer setup maps */ -+#define kNFlagsBeforeFramesMask 0x3F -+#define kNFlagsBeforeFramesShift 0 -+ -+#define kNFlagsBetweenFramesMask 0x3F -+#define kNFlagsBetweenFramesShift 6 -+ -+#define k32BitCRC 0x1000 -+#define kFlagSharingEnabled 0x2000 -+ -+#define kNFlagsBeforeReportMask 0x03 /* no. of *extra* flags reqd before frame */ -+#define kNFlagsBeforeReportShift 14 -+ -+#define kTxDeferredCRC 0x10000 -+#define kRxDeferredCRC 0x20000 -+#define kTxIdleMarks 0x40000 -+#define kNoCRC 0x80000 -+ -+/* SAM framer setup maps */ -+ -+#define kSAMTransparentIdleTypeMask 0x00000003 -+#define kSAMTransparentIdleTypeShift 0 -+#define kSAMFramedIdleTypeMask 0x00000004 -+#define kSAMFramedIdleTypeShift 2 -+#define kSAMFramedOverrunActionMask 0x00000010 -+#define kSAMFramedOverrunActionShift 4 -+#define kSAMHalfDuplexModeMask 0x00000020 -+#define kSAMHalfDuplexModeShift 5 -+#define kSAMCRCTypeMask 0x000000C0 -+#define kSAMCRCTypeShift 6 -+#define kSAMNRZIEnabledMask 0x00000100 -+#define kSAMNRZIEnabledShift 8 -+#define kSAMSyn1Mask 0x00FF0000 -+#define kSAMSyn1Shift 16 -+#define kSAMSyn2Mask 0xFF000000 -+#define kSAMSyn2Shift 24 -+ -+/* <trans_idle> */ -+#define kSAM8bitSYNHuntDisabled 0 -+#define kSAM8bitSYNHuntEnabled ((ulong)1 << kSAMTransparentIdleTypeShift) -+#define kSAM16bitSYNHuntEnabled ((ulong)2 << kSAMTransparentIdleTypeShift) -+ -+/* <framed_idle> */ -+#define kSAMSendFlagsOnIdle 0 -+#define kSAMSendMarksOnIdle ((ulong)1 << kSAMFramedIdleTypeShift) -+ -+/* <framed_un_ov> */ -+#define kSAMAbortOnUnderrun 0 -+#define kSAMFlagsOnUnderrun ((ulong)1 << kSAMFramedOverrunActionShift) -+ -+/* <hd_auto> */ -+#define kSAMHalfDuplexNoAuto 0 -+#define kSAMHalfDuplexAuto ((ulong)1 << kSAMHalfDuplexModeShift) -+ -+ -+/* <crc_type> */ -+#define kSAMNoCRC 0 -+#define kSAM16bitCRC ((ulong)1 << kSAMCRCTypeShift) -+#define kSAM32bitCRC ((ulong)2 << kSAMCRCTypeShift) -+ -+/* <nrzi_en> */ -+#define kSAMNRZIDisabled 0 -+#define kSAMNRZIEnabled ((ulong)1 << kSAMNRZIEnabledShift) -+ -+ -+/* LAPM setup maps */ -+#define kLapmDirection 0x00000001 /* Bit 0 */ -+#define kLapmSREJEnabled 0x00000002 /* Bit 1 */ -+#define kLapmDetectionEnabled 0x00000004 /* Bit 2 */ -+#define kLapmLongADPEnabled 0x00000008 /* Bit 3 */ -+ -+#define kLapmCompressionEnabledMask 0x00000030 -+#define kLapmTxCompressionEnabled 0x00000010 /* Bit 4 */ -+#define kLapmRxCompressionEnabled 0x00000020 /* Bit 5 */ -+#define kLapmCompressionEnabledShift 4 -+ -+#define kLapmRetryLimitMask 0x000000C0 /* Bits 6,7 */ -+ -+#define kLapmNoRetryLimit 0x00000000 -+#define kLapm4Retries 0x00000040 -+#define kLapm8Retries 0x00000080 -+#define kLapm20Retries 0x000000C0 -+ -+#define kLapmWindowSizeMask 0x00001F00 /* Bits 8-12 */ -+#define kLapmWindowSizeShift 8 -+ -+#define kLapmWindowSize8 0x00000800 -+#define kLapmWindowSize15 0x00000F00 -+ -+ -+#define kLapmInfoFieldSizeMask 0x0000E000 /* Bits 13-15 */ -+#define kLapmInfoField8Bytes 0x00000000 -+#define kLapmInfoField16Bytes 0x00002000 -+#define kLapmInfoField32Bytes 0x00004000 -+#define kLapmInfoField64Bytes 0x00006000 -+#define kLapmInfoField128Bytes 0x00008000 -+#define kLapmInfoField192Bytes 0x0000A000 -+#define kLapmInfoField256Bytes 0x0000C000 -+#define kLapmInfoField512Bytes 0x0000E000 -+#define kLapmInfoFieldSizeShift 13 -+ -+#define kLapmT400Mask 0x00030000 /* Bits 16-17 */ -+#define kLapmAutoT400 0x00000000 -+#define kLapm750msT400 0x00010000 -+#define kLapm3secT400 0x00020000 -+#define kLapm30secT400 0x00030000 -+ -+#define kLapmT401Mask 0x000C0000 /* Bits 18-19 */ -+#define kLapmAutoT401 0x00000000 -+#define kLapm750msT401 0x00040000 -+#define kLapm3secT401 0x00080000 -+#define kLapm6secT401 0x000C0000 -+ -+#define kLapmT403Mask 0x00300000 /* Bits 20-21 */ -+#define kLapmAutoT403 0x00000000 -+#define kLapm750msT403 0x00100000 -+#define kLapm2secT403 0x00200000 -+#define kLapm4secT403 0x00300000 -+ -+ -+ -+#define kLapmDictSizeMask 0x00C00000 /* Bits 22-23 */ -+#define kLapmDictSize512 0x00000000 -+#define kLapmDictSize1024 0x00400000 -+#define kLapmDictSize2048 0x00800000 -+#define kLapmDictSize4096 0x00C00000 -+ -+#define kLapmStringSizeMask 0xFF000000 /* Bits 24-31 */ -+#define kLapmStringSizeShift 24 -+ -+/* MNP setup maps */ -+ -+#define kMnpMinPLevel 0x00000001 /* Bit 0: 1 - Minimal, 0 - Standard */ -+#define kMnpStdPLevel 0x00000000 /* Bit 0: 1 - Minimal, 0 - Standard */ -+ -+#define kMnpOptimizationEnabled 0x00000002 /* Bit 1 */ -+#define kMnpOptimizationDisabled 0x00000000 /* Bit 1 */ -+ -+#define kMnpCompressionEnabled 0x00000004 /* Bit 2 */ -+#define kMnpCompressionDisabled 0x00000000 /* Bit 2 */ -+ -+#define kMnpClassMask 0x00000018 -+#define kMnpClassShift 3 -+#define kMnpClass1 0x00000008 -+#define kMnpClass2 0x00000010 -+#define kMnpClass3 0x00000018 /* Bits 3,4 */ -+ -+#define kMnpMaxRetryMask 0x00000060 /* Bits 5,6 */ -+#define kMnpMaxRetryShift 5 -+#define kMnpNoRetryLimit 0x00000000 -+#define kMnp4Retries 0x00000020 -+#define kMnp8Retries 0x00000040 -+#define kMnp20Retries 0x00000060 -+ -+#define kMnpInfoFieldSizeMask 0x00000380 /* Bits 7-9 */ -+#define kMnpInfoFieldSizeShift 7 -+#define kMnpInfoField8Bytes 0x00000000 -+#define kMnpInfoField16Bytes 0x00000080 -+#define kMnpInfoField32Bytes 0x00000100 -+#define kMnpInfoField64Bytes 0x00000180 -+#define kMnpInfoField128Bytes 0x00000200 -+#define kMnpInfoField192Bytes 0x00000280 -+#define kMnpInfoField256Bytes 0x00000300 -+#define kMnpInfoField260Bytes 0x00000380 -+ -+#define kMnpT400Mask 0x00003000 /* Bits 12,13 */ -+#define kMnpT400Shift 12 -+#define kMnpAutoT400 0x00000000 -+#define kMnp750msT400 0x00001000 -+#define kMnp3secT400 0x00002000 -+#define kMnp6secT400 0x00003000 -+ -+#define kMnpT401Mask 0x0000C000 /* Bits 14,15 */ -+#define kMnpT401Shift 14 -+#define kMnpAutoT401 0x00000000 -+#define kMnp750msT401 0x00004000 -+#define kMnp3secT401 0x00008000 -+#define kMnp6secT401 0x0000C000 -+ -+#define kMnpT403Mask 0x00030000 /* Bits 16,17 */ -+#define kMnpT403Shift 16 -+#define kMnpAutoT403 0x00000000 -+#define kMnp60secT403 0x00010000 -+#define kMnp600secT403 0x00020000 -+#define kMnp3600secT403 0x00030000 -+ -+#define kMnpFallbackTypeMask 0x000C0000 /* Bits 18,19 */ -+#define kMnpFallbackTypeShift 18 -+#define kMnpNoFallback 0x00000000 -+#define kMnpFallbackTime 0x00040000 -+#define kMnpFallback200 0x00080000 -+#define kMnpFallbackChar 0x000C0000 -+ -+#define kMnpWindowSizeMask 0x00300000 /* Bits 20,21 */ -+#define kMnpWindowSizeShift 20 -+#define kMnp1Frame 0x00000000 -+#define kMnp4Frames 0x00100000 -+#define kMnp8Frames 0x00200000 -+#define kMnp16Frames 0x00300000 -+ -+#define kMnpDirection 0x00800000 /* Bit 22 */ -+ -+#define kMnpFallbackCharMask 0xFF000000 /* Bit 24-31 */ -+#define kMnpFallbackCharShift 24 -+ -+/* kV34HDXTurnOffCurrentModeCmd state parameter values */ -+ -+#define kV34HDXTurnOffAsClearDown 0 -+#define kV34HDXTurnOffFromControlSource 1 -+#define kV34HDXTurnOffFromControlDestination 2 -+#define kV34HDXTurnOffFromPrimarySource 3 -+#define kV34HDXTurnOffFromPrimaryDestination 4 -+ -+/* V70 setup maps */ -+ -+#define kV70Direction 0x00000001 /* Bit 0 */ -+#define kV70uIHEnabled 0x00000002 /* Bit 1 */ -+#define kV70AudioHeaderEnabled 0x00000004 /* Bit 2 */ -+#define kV70SilenceSupprEnabled 0x00000008 /* Bit 3 */ -+ -+#define kV70SuspendResumeShift 4 -+#define kV70SuspendResumeMask (3 << kV70SuspendResumeShift) -+#define kV70SuspendResumeDisabled 0x00000000 /* Bit 4,5 */ -+#define kV70SuspendResumeWAddr 0x00000010 /* Bit 4 */ -+#define kV70SuspendResumeWoAddr 0x00000020 /* Bit 5 */ -+ -+#define kV70CrcLengthShift 6 -+#define kV70CrcLengthMask (3 << kV70CrcLengthShift) -+#define kV70CrcLength16 0x00000000 /* Bit 6,7 */ -+#define kV70CrcLength8 0x00000040 /* Bit 6 */ -+#define kV70CrcLength32 0x00000080 /* Bit 7 */ -+ -+#define kV70BlockingFactorShift 8 -+#define kV70BlockingFactorMask (3 << kV70BlockingFactorShift) -+#define kV70BlockingFactor1 0x00000000 /* Bit 8,9 */ -+#define kV70BlockingFactor2 0x00000100 /* Bit 8 */ -+#define kV70BlockingFactor3 0x00000200 /* Bit 9 */ -+#define kV70BlockingFactor4 0x00000300 /* Bit 8,9 */ -+ -+#define kV70InitChannelsShift 10 -+#define kV70InitChannelsMask (1 << kV70InitChannelsShift) -+#define kV70InitNoChannels 0x00000000 /* Bit 10,11 */ -+#define kV70InitDataChannel 0x00000400 /* Bit 10,11 */ -+#define kV70InitAudioChannel 0x00000800 /* Bit 10,11 */ -+#define kV70InitBothChannels 0x00000C00 /* Bit 10,11 */ -+ -+#define kV70OOBEnabled 0x00001000 /* Bit 12 */ -+ -+/* V80 setup maps */ -+ -+#define kV80Direction 0x00000001 /* Bit 0 */ -+ -+#define kV80ModeShift 1 -+#define kV80ModeMask (3 << kV80ModeShift) -+#define kV80SyncMode (0 << kV80ModeShift) -+#define kV80TunnellingMode (1 << kV80ModeShift) -+#define kV80SamMode (2 << kV80ModeShift) -+#define kV80SamTransparentMode (2 << kV80ModeShift) -+#define kV80SamFramedMode (3 << kV80ModeShift) -+ -+#define kV80TransIdleShift 3 -+#define kV80TransIdleMask (3 << kV80TransIdleShift) -+#define kV80TransIdleNoHunt (0 << kV80TransIdleShift) -+#define kV80TransIdleHunt8 (1 << kV80TransIdleShift) -+#define kV80TransIdleHunt16 (2 << kV80TransIdleShift) -+ -+#define kV80FrameIdleShift 5 -+#define kV80FrameIdleMask (1 << kV80FrameIdleShift) -+#define kV80FrameIdleFlags (0 << kV80FrameIdleShift) -+#define kV80FrameIdleMarks (1 << kV80FrameIdleShift) -+ -+#define kV80FrameUnOvShift 6 -+#define kV80FrameUnOvMask (1 << kV80FrameUnOvShift) -+#define kV80FrameUnOvAbort (0 << kV80FrameUnOvShift) -+#define kV80FrameUnOvFlag (1 << kV80FrameUnOvShift) -+ -+#define kV80HdAutoShift 7 -+#define kV80HdAutoMask (1 << kV80HdAutoShift) -+#define kV80HdAutoNormal (0 << kV80HdAutoShift) -+#define kV80HdAutoExtended (1 << kV80HdAutoShift) -+ -+#define kV80CrcTypeShift 8 -+#define kV80CrcTypeMask (3 << kV80CrcTypeShift) -+#define kV80NoCrc (0 << kV80CrcTypeShift) -+#define kV80Crc16 (1 << kV80CrcTypeShift) -+#define kV80Crc32 (2 << kV80CrcTypeShift) -+ -+#define kV80NrziShift 10 -+#define kV80NrziMask (1 << kV80NrziShift) -+#define kV80NrziDisabled (0 << kV80NrziShift) -+#define kV80NrziEnabled (1 << kV80NrziShift) -+ -+#define kV80Syn1Mask 0x00FF0000 /* Bit 16-23 */ -+#define kV80Syn1Shift 16 -+#define kV80Syn2Mask 0xFF000000 /* Bit 24-31 */ -+#define kV80Syn2Shift 24 -+ -+/* kStartCallProgressMonitorCmd setup masks */ -+ -+#define kDTMFDetectorDebouncerEnabled 0x0001 -+#define kModemSignalDetectorDebouncerEnabled 0x0002 -+#define kCallProgressDetectorDebouncerEnabled 0x0004 -+#define kCustomSignalDebouncerEnabled 0x0008 -+#define kFaxCallingToneSuppressionEnabled 0x0010 -+#define kDataCallingToneSuppressionEnabled 0x0020 -+#define kCISuppressionEnabled 0x0040 -+#define kAnsSuppressionEnabled 0x0080 -+ -+/* kDialCmd setup masks (dialerSetup bit fields) */ -+ -+#define kDTMFDialingEnabled 0x0001 -+#define kPulseDialingEnabled 0x0002 -+#define kModeSwitchEnabled 0x0004 -+#define kBlindDialingEnabled 0x0008 -+#define kPulseDialingMethodMask 0x0030 -+#define kDialModifierTranslationMask 0x00C0 -+#define kFlashWhilePulseDialingEnabled 0x0100 -+ -+/* Pulse dialing method */ -+#define kPulseDialingNPulsesPerDigit 0x0000 -+#define kPulseDialingNplusOnePulsesPerDigit 0x0010 -+#define kPulseDialingTenMinusNPulsesPerDigit 0x0020 -+ -+/* Dial modifier translation */ -+#define kTreatWasPause 0x0040 /* Tread 'W' modifier as pause */ -+#define kTreatCommaAsWaitForDialtone 0x0080 -+ -+#ifdef TI_C6X -+#include "C6xDefs.h" -+#endif -+#ifdef PENTIUM_MMX -+#include "PentiumDefs.h" -+#endif -+ -+ -+#if defined(DSP16K) && !defined(SoftModemGlobals) -+/* ensure that code generator does not use r5 */ -+register int *softmodem_h_should_not_be_included_after_softmodem_gh asm("r5"); -+#endif -+ -+/****************************************************************************/ -+/* 3. Interface functions. */ -+/* */ -+/****************************************************************************/ -+ -+#ifdef ADSL_MODEM -+ -+#ifndef SoftDslHeader -+#include "SoftDsl.h" -+#endif -+extern char* SM_DECL SoftModemGetRevString(void); -+extern char* SM_DECL SoftModemGetProductName(void); -+extern char* SM_DECL SoftModemGetBuildDate(void); -+extern char* SM_DECL SoftModemGetFullManufacturerName(void); -+extern char* SM_DECL SoftModemGetShortManufacturerName(void); -+extern int SM_DECL SoftModemRevStringSize(void); -+extern char* SM_DECL SoftModemGetVendorIDString(void); -+extern char* SM_DECL SoftModemGetT1413VendorIDString(void); -+extern char* SM_DECL SoftModemGetSerialNumberString(void); -+extern int SM_DECL SoftModemSerNumStringSize(void); -+#define SoftDslGetProductName SoftModemGetProductName -+#define SoftDslGetBuildDate SoftModemGetBuildDate -+#define SoftDslGetFullManufacturerName SoftModemGetFullManufacturerName -+#define SoftDslGetShortManufacturerName SoftModemGetShortManufacturerName -+ -+#else /* !ADSL_MODEM */ -+ -+extern void SM_DECL SoftModemSetMemoryPtr (void *varsPtr); -+extern void* SM_DECL SoftModemGetMemoryPtr (void); -+extern void SM_DECL SoftModemSetRefData (void *varsPtr); -+extern void* SM_DECL SoftModemGetRefData (void); -+extern int SM_DECL SoftModemGetMemorySize (void); -+extern void SM_DECL SoftModemInit (void); -+extern void SM_DECL SoftModemReset (void); -+extern void SM_DECL SoftModemLineHandler (int sampleCount, short *srcPtr, short *dstPtr); -+extern void SM_DECL SoftModemTimer (long timeQ24ms); -+extern Boolean SM_DECL SoftModemCommandHandler (modemCommandStruct *cmdPtr); -+extern int SM_DECL SoftModemGetExternalMemorySize(void); -+extern void SM_DECL SoftModemSetExternalMemoryPtr(void *varsPtr); -+ -+extern void SM_DECL SoftModemSetPcmCoding (pcmCodingType pcmCoding); -+extern void SM_DECL SoftModemPcmLineHandler (int sampleCount, uchar *srcPtr, uchar *dstPtr); -+ -+/* SoftModem IO functions */ -+extern int SM_DECL SoftModemWrite(int nBytes, uchar* srcPtr); -+extern int SM_DECL SoftModemRead(int nBytes, uchar* dstPtr); -+extern int SM_DECL SoftModemWriteFrame(int nBytes, uchar* srcPtr); -+extern int SM_DECL SoftModemReadFrame(int maxFrameSize, uchar* dstPtr); -+extern int SM_DECL SoftModemCountWritePending(void); -+extern int SM_DECL SoftModemCountReadPending(void); -+extern int SM_DECL SoftModemWriteSpaceAvailable(void); -+extern void SM_DECL SoftModemWriteFlush(void); -+extern void SM_DECL SoftModemReadFlush(void); -+extern int SM_DECL SoftModemGetWriteBufferSize(void); -+extern int SM_DECL SoftModemGetReadBufferSize(void); -+ -+#ifdef AUDIO -+extern int SM_DECL SoftModemAudioHandler(int sampleCount, short *srcPtr, short *dstPtr); -+extern int SM_DECL SoftModemAudioRxDataHandler(int nBytes, uchar* srcPtr); -+extern int SM_DECL SoftModemAudioTxDataHandler(int nBytes, uchar* dstPtr); -+#endif -+ -+ -+#define SoftModemSetGlobalPtr SoftModemSetMemoryPtr -+#define SoftModem SoftModemLineHandler -+#ifndef LINKLAYER_V42BIS_LARGE_DICTIONARY -+#define kSoftModemMaxMemorySize (65536) -+#else -+#define kSoftModemMaxMemorySize (65536 + 8192) -+#endif -+ -+/* -+ * Internal functions -+ */ -+extern long SM_DECL SoftModemGetDCOffset(void); -+extern void SM_DECL SoftModemDisableDCOffsetTracking(void); -+extern void SM_DECL SoftModemEnableDCOffsetTracking(void); -+extern long SM_DECL SoftModemGetRcvPower(void); -+extern ulong SM_DECL SoftModemGetHybridDelay(void); -+extern void SM_DECL SoftModemStatusHandler (modemStatusStruct *status); -+extern Boolean SM_DECL SoftModemInternalCommandHandler (modemCommandStruct *cmdPtr); -+extern void SM_DECL SoftModemInternalStatusHandler (modemStatusStruct *status); -+extern void SM_DECL SoftModemSetControllerOnlyMode(commandHandlerType externalDataPumpCommandHandlerPtr); -+extern char* SM_DECL SoftModemGetRevString(void); -+extern char* SM_DECL SoftModemGetProductName(void); -+extern char* SM_DECL SoftModemGetBuildDate(void); -+extern char* SM_DECL SoftModemGetFullManufacturerName(void); -+extern char* SM_DECL SoftModemGetShortManufacturerName(void); -+extern int SM_DECL SoftModemRevStringSize(void); -+extern char* SM_DECL SoftModemGetVendorIDString(void); -+extern char* SM_DECL SoftModemGetSerialNumberString(void); -+extern void SM_DECL SoftModemAuxTxDataHandler(int nBytes, uchar *dataPtr); -+extern void SM_DECL SoftModemAuxRxDataHandler(int nBytes, uchar *dataPtr); -+extern void SM_DECL SoftModemTxDataHandler(int nBytes, uchar *dataPtr); -+extern void SM_DECL SoftModemRxDataHandler(int nBytes, uchar *dataPtr); -+extern void SM_DECL SoftModemATPrintf(uchar *format, void *arg1, void *arg2, void *arg3); -+ -+#define SoftModemSetInputSaturationLimit(limit) (gSystemVars.inputSignalLimit = limit) -+#define SoftModemResetInputSaturationLimit() (gSystemVars.inputSignalLimit = 0) -+ -+#endif /* !ADSL_MODEM */ -+ -+#endif /* SoftModemPh */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModemTypes.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModemTypes.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModemTypes.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/bcm96348/softdsl/SoftModemTypes.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,292 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * SoftModemTypes.h -+ * -+ * -+ * Description: -+ * This file contains some of the type declarations for SoftModem -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.9 $ -+ * -+ * $Id: SoftModemTypes.h,v 1.9 2004/04/13 00:16:59 ilyas Exp $ -+ * -+ * $Log: SoftModemTypes.h,v $ -+ * Revision 1.9 2004/04/13 00:16:59 ilyas -+ * Merged the latest ADSL driver changes -+ * -+ * Revision 1.8 2004/01/24 01:35:33 ytan -+ * add multi-section lmem swap -+ * -+ * Revision 1.7 2001/09/21 19:19:01 ilyas -+ * Minor fixes for VxWorks build -+ * -+ * Revision 1.6 2001/08/16 02:16:39 khp -+ * - added definitions for SLOW_DATA and FAST_TEXT, defined to nothing -+ * except when bcm47xx && USE_SLOW_DATA or USE_FAST_TEXT. Any function -+ * that needs to run fast should be marked with FAST_TEXT. Any data that -+ * is not referenced often should be marked with SLOW_DATA. -+ * -+ * Revision 1.5 2001/03/30 00:49:59 liang -+ * Changed warning output message. -+ * -+ * Revision 1.4 2000/06/21 22:24:40 yongbing -+ * Modify WARN micro to limit the number of same warnings printed -+ * -+ * Revision 1.3 1999/08/05 20:02:13 liang -+ * Merged with the softmodem top of the tree on 08/04/99. -+ * -+ * Revision 1.2 1999/01/27 22:14:29 liang -+ * Merge with SoftModem_3_1_02. -+ * -+ * Revision 1.19 1998/11/17 04:02:39 yura -+ * Fixed WARN and ASSERT redefinition warning for WinNT targets -+ * -+ * Revision 1.18 1998/08/26 19:20:43 scott -+ * Commented out EXCLUDE_CYGWIN32_TYPES define -+ * -+ * Revision 1.17 1998/08/13 19:03:06 scott -+ * Added BitField definition and INT_IS_LONG -+ * -+ * Revision 1.16 1998/08/08 03:39:55 scott -+ * The DEBUG_PTR_ENABLED macro can be used to enable only the DEBUG_PTR macros -+ * -+ * Revision 1.15 1998/07/28 22:21:31 mwg -+ * Fixed problems with NULL & nil being defined incorrectly -+ * -+ * Revision 1.14 1998/07/08 17:09:17 scott -+ * Define ASSERT and WARN only if not already defined -+ * -+ * Revision 1.13 1998/07/02 20:46:34 scott -+ * Added workaround for building certain builds with older SunOS -+ * -+ * Revision 1.12 1998/02/09 18:24:49 scott -+ * Defined "Private" as nothing for GreenHill (to prevent erroneous section -+ * allocations for data) -+ * -+ * Revision 1.11 1997/08/29 21:39:24 scott -+ * Added check for LONG_IS_INT define (for TI C6X support) -+ * -+ * Revision 1.10 1997/05/29 19:50:23 mwg -+ * Added code to avoid type redefintions under SunOS. -+ * -+ * Revision 1.9 1997/03/19 18:35:08 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.8 1997/02/11 00:05:53 mwg -+ * Minor adjustments for Pentium optimization. -+ * -+ * Revision 1.7 1997/01/11 01:30:47 mwg -+ * Added new macro WARN -- the same as ASSERT but without exit. -+ * -+ * Revision 1.6 1996/08/22 20:07:39 liang -+ * When ASSERT fires, only print out information, don't exit. -+ * -+ * Revision 1.5 1996/05/06 06:49:10 mwg -+ * Fixed linux problems. -+ * -+ * Revision 1.4 1996/05/02 08:40:16 mwg -+ * Merged in Chromatic bug fixes. -+ * -+ * Revision 1.3 1996/04/01 20:59:53 mwg -+ * Added macros to setup and use debug pointer. -+ * -+ * Revision 1.2 1996/02/27 01:50:04 mwg -+ * Added ASSERT() macro. -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.2 1995/12/03 06:59:31 mwg -+ * Fixed all gcc varnings. We are now running under Linux on a PC! -+ * -+ *****************************************************************************/ -+#ifndef SoftModemTypesh -+#define SoftModemTypesh -+ -+#ifdef LONG_SHORTS -+#define short long -+#define ushort unsigned long -+#endif -+ -+typedef signed char schar; -+typedef unsigned char uchar; -+ -+#if 0 /* This is not currently required */ -+#if defined(_CYGWIN32) && defined(DEBUG) -+#define EXCLUDE_CYGWIN32_TYPES -+#endif -+#endif -+ -+#if !defined(_SYS_TYPES_H) || !defined(TARG_OS_RTEMS) -+#if defined(_CFE_) -+ typedef unsigned int uint; -+ typedef unsigned long ulong; -+ typedef unsigned short ushort; -+#elif defined(TARG_OS_RTEMS) -+#if defined(HOST_ARCH_LINUX) -+ typedef unsigned int uint; -+#endif -+ typedef unsigned long ulong; -+#if defined(HOST_ARCH_LINUX) -+ typedef unsigned short ushort; -+#endif -+#elif defined(EXCLUDE_CYGWIN32_TYPES) || (!defined _NO_TYPE_DEFS_ && !defined _SYS_TYPES_H && !defined __SYS_TYPES_H__ && !defined _SYS_BSD_TYPES_H && !defined _LINUX_TYPES_H) || defined(__sparc__) -+#ifndef EXCLUDE_CYGWIN32_TYPES -+ typedef unsigned int uint; -+#endif -+#ifndef _LINUX_TYPES_H -+ typedef unsigned long ulong; -+#endif -+#if !defined(ushort) && !defined(EXCLUDE_CYGWIN32_TYPES) && !defined(__INCvxTypesOldh) -+ typedef unsigned short ushort; -+#endif -+#endif -+#else -+typedef unsigned long ulong; -+#endif -+ -+#if defined(GREENHILL) || defined(GNUTX39) /* GH allocates private data to incorrect section */ -+#define Private -+#else -+#define Private static -+#endif -+ -+#define Public -+ -+#ifdef NULL -+#undef NULL -+#endif -+#ifdef nil -+#undef nil -+#endif -+ -+#define NULL 0 -+#define nil 0 -+ -+#define false 0 -+#define true 1 -+typedef unsigned char Boolean; -+typedef unsigned int BitField; /* this must occur BEFORE long_is_int/int_is_long defs */ -+ -+#ifdef LONG_IS_INT -+#define long int -+#define ulong uint -+#endif -+ -+#ifdef INT_IS_LONG -+#define int long -+#define uint ulong -+#endif -+ -+#define POSTULATE(postulate) \ -+ do \ -+ { \ -+ typedef struct \ -+ { \ -+ char NegativeSizeIfPostulateFalse[((int)(postulate))*2 - 1]; \ -+ } PostulateCheckStruct; \ -+ } \ -+ while (0) -+ -+#if defined(DEBUG) && !defined(__KERNEL__) -+#ifndef WARN -+#define kDSLNumberWarnTimes 10 -+#define WARN(assertion) \ -+ { static int warnSeveralTimes=0; \ -+ if ((!(assertion))&(warnSeveralTimes<kDSLNumberWarnTimes)) \ -+ { \ -+ fprintf(stderr, "Warning, failed: %s\n", #assertion); \ -+ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ -+ warnSeveralTimes++; \ -+ } \ -+ } -+#endif -+#ifndef ASSERT -+#define ASSERT(assertion) \ -+ { if (!(assertion)) \ -+ { \ -+ fprintf(stderr, "Assertion failed: %s\n", #assertion); \ -+ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ -+ exit(1); \ -+ } \ -+ } -+#endif -+#else -+ -+#undef WARN -+#define WARN(a) -+ -+#undef ASSERT -+#define ASSERT(a) -+ -+#endif -+ -+/* -+ * memory allocation macros -+ */ -+ -+#if defined(bcm47xx) && defined(USE_SLOW_DATA) -+#define SLOW_DATA __attribute__ ((section(".slow_data"))) -+#else -+#define SLOW_DATA -+#endif -+ -+#if defined(bcm47xx) && defined(USE_FAST_TEXT) -+#define FAST_TEXT __attribute__ ((section(".fast_text"))) -+#else -+#define FAST_TEXT -+#endif -+ -+#if defined(bcm47xx) && defined(SWAP_LMEM) -+#define SWAP_TEXT1_1 __attribute__ ((section(".swap_text1_1"))) -+#define SWAP_TEXT1_2 __attribute__ ((section(".swap_text1_2"))) -+#define SWAP_TEXT2_1 __attribute__ ((section(".swap_text2_1"))) -+#define SWAP_TEXT2_2 __attribute__ ((section(".swap_text2_2"))) -+#define SWAP_TEXT3_1 __attribute__ ((section(".swap_text3_1"))) -+#define SWAP_TEXT3_2 __attribute__ ((section(".swap_text3_2"))) -+#else -+#define SWAP_TEXT1_1 FAST_TEXT -+#define SWAP_TEXT1_2 FAST_TEXT -+#define SWAP_TEXT2_1 FAST_TEXT -+#define SWAP_TEXT2_2 FAST_TEXT -+#define SWAP_TEXT3_1 FAST_TEXT -+#define SWAP_TEXT3_2 FAST_TEXT -+#endif -+ -+/* -+ * Debug stuff -+ */ -+#if defined(DEBUG) || defined(DEBUG_PTR_ENABLED) -+#define DECLARE_DEBUG_PTR(type) static type *gv; -+#define SETUP_DEBUG_PTR() gv = &globalVar -+#else -+#define DECLARE_DEBUG_PTR(type) -+#define SETUP_DEBUG_PTR() -+#endif -+/* -+ * Obsolete stuff -+ */ -+#ifdef DEBUG -+#define HereIsTheGlobalVarPointerMacro SETUP_DEBUG_PTR(); -+#else -+#define HereIsTheGlobalVarPointerMacro -+#endif -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_defs.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_defs.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_defs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_defs.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,133 @@ -+/* TARGET=bcm6348-dmt-T1-dmtbis-adsl2plus-L2-SRA-firmware-Qproc-HW-RTL-pipeline-IncOneBit-Readsl2-doubleUS */ -+ -+#define SOURCE_FILE_ -+#define BCM6348_SRC -+#define G994_T1P413_1024_FFT -+#define ENABLE_DIG_USPWR_CUTBACK -+#define ADSLCORE_ONLY -+#define TEQ_DF -+#define LOOP_TIMING_PLL -+#define RCV_PHASE_TWEAK_ONLY -+#define ADSL_MAX_POSSIBLE_RCV_RATE -+#define HARDWARE_CHANNEL -+#define ADSL_HARDWARE_AGC -+#define HW_CHANNEL_ADC -+#define HW_CHANNEL_DAC -+#define HW_PGA -+#define DIGITALEC_SINGLE_TAP_UPDATE -+#define ANALOGEC_SINGLE_TAP_UPDATE -+#define HWLOG -+#define G992_TRELLIS_CODE_CLAMPING -+#define G992DECODERTRELLISBOUNDARY -+#define MEMORYLIMIT64K -+#define bcm47xx -+#define DSL_BIG_ENDIAN -+#define MIPS_SRC -+#define VP_INLINE -Winline -+#define USE_ASM_API -+#define RTL_SRC -+#define RSENC_INLINE -+#define BITENC_INLINE -+#define USE_SLOW_DATA -+#define USE_FAST_TEXT -+#define PROFILE_INLINE -+#define CHIP_SRC -+#define G992_RESYNC_PILOT_PHASE_IN_SHOWTIME -+#define G992_APPLY_SSVI -+#define SHARE_TEQ_VARS -+#define ANNEX_M -+#define DOUBLE_UP_STREAM -+#define G994P1_SUPPORT_A43C -+#define USE_ASM_API -+#define MIPS_ASM -+#define MEMORYLIMIT64K -+#define ADSL_FIRMWARE -+#define G992DATA_XMT_COMPACT_WORD -+#define ADSL_MAX_POSSIBLE_RCV_RATE -+#define DSP_FRONTEND_ONLY -+#define G992P3_ONE_BIT_CONSTELLATION -+#define ADSL_MODEM -+#define ATM -+#define ADSL_ATUR -+#define ADSL_SOFTWARE_TIME_ERROR_CALCULATION -+#define DSL_REPORT_ALL_COUNTERS -+#define ADSL_MONITOR_LCD -+#define G994P1 -+#define G994P1_ATUR -+#define G992 -+#define G992_ATUR -+#define ADSL_FRAMER -+#define G997_1 -+#define ATM_I432 -+#define TEQ_DF -+#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define G994P1_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define G992_TRELLISCODE -+#define ADSL_HARDWARE_ECHO_CANCELLOR -+#define G992P1 -+#define G992P1_ATUR -+#define G992P1_ANNEX_A -+#define ADSL_HARDWARE_TIME_ERROR_TRACKING -+#define G992P1_NEWFRAME -+#define G992P1_NEWFRAME_ATUR -+#define G992P1_ANNEX_A_USED_FOR_G992P2 -+#define T1P413 -+#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define G992_CALC_DEBUG_SNR_BEFORE_TEQ -+#define G992P3 -+#define RATE_SELECT_E14 -+#define G992P3_ATUR -+#define G992P3AMENDMENT -+#define GLOBESPAN_DM -+#define G992P3_COMB_MSG_THREE_COPIES -+#define G992P3_POWER_MANAGEMENT -+#define G992P3_SRA -+#define G992P5 -+#define G992P5_ATUR -+#define ADSL_PIPELINE_CODE -+#define ADSL_HARDWARE_TIME_ERROR_TRACKING -+#define G994P1RCV_QPROC -+#define G994P1XMT_QPROC -+#define G992RCV_QPROC -+#define G992XMT_QPROC -+#define G992RCV_RS -+#define VP_SIMULATOR -+#define T1P413RCV_QPROC -+#define T1P413XMT_QPROC -+#define G992ENC_HW_DATAMODE -+#define G992DATA_XMT_HW_RS -+#define G992DATA_XMT_COMPACT_WORD -+#define G992RCV_QPROC_FAST -+#define G992_BIT_SWAP -+#define ADSL_IDENTIFY_VENDOR_FIRMWARE -+#define ADSL_ATUR_FORCE_BIGGER_UPSTREAM_MARGIN -+#define G992_MORE_FRAME_MODE -+#define XMT_RACT2_FOR_ADI_COMPATIBILITY -+#define XMT_FFT_SIZE_2X -+#define SYNCH_SYMBOL_DETECTION -+#define ANSI_CACT12_PING_PONG -+#define ADSL_SPECIAL_FIX_FOR_FRENCH_TELECOM -+#define G994P1_CHECK_SECURITY -+#define G994P1_NON_STD_INFO -+#define I432_HEADER_COMPRESSION -+#define TDC_IOP_FIX_ERICSSON_TI_4000C_350 -+#define TDC_IOP_FIX_SEIMENS_TI -+#define FT_ADI_US_RATE_FIX -+#define ANSI_CACT12_PING_PONG -+#define G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define G994P1_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ -+#define READSL2 -+#define G992_APPLY_SSVI -+#define READSL2_FILTERS -+ -+ -+#define ADSL_PHY_XFACE_OFFSET 0x21F90 -+ -+ -+#define ADSL_PHY_SDRAM_BIAS 0x1A0000 -+ -+ -+#define ADSL_PHY_SDRAM_LINK_OFFSET 0x1A0000 -+ -+ -+#define ADSL_PHY_SDRAM_PAGE_SIZE 0x200000 -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_lmem.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_lmem.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_lmem.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_lmem.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,6 @@ -+/* -+** Don't change! -+** This file has been generated automatically by bin2c program -+*/ -+ -+extern const unsigned char adsl_lmem[51036]; -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_sdram.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_sdram.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_sdram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/adslcore6348/adsl_sdram.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,6 @@ -+/* -+** Don't change! -+** This file has been generated automatically by bin2c program -+*/ -+ -+extern const unsigned char adsl_sdram[364348]; -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslCoreDefs.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslCoreDefs.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslCoreDefs.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,245 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslCore.c -- Bcm ADSL core driver -+ * -+ * Description: -+ * This file contains BCM ADSL core driver -+ * -+ * -+ * Copyright (c) 2000-2001 Broadcom Corporation -+ * All Rights Reserved -+ * No portions of this material may be reproduced in any form without the -+ * written permission of: -+ * Broadcom Corporation -+ * 16215 Alton Parkway -+ * Irvine, California 92619 -+ * All information contained in this document is Broadcom Corporation -+ * company private, proprietary, and trade secret. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.4 $ -+ * -+ * $Id: AdslCoreDefs.h,v 1.4 2004/07/20 23:45:48 ilyas Exp $ -+ * -+ * $Log: AdslCoreDefs.h,v $ -+ * Revision 1.4 2004/07/20 23:45:48 ilyas -+ * Added driver version info, SoftDslPrintf support. Fixed G.997 related issues -+ * -+ * Revision 1.3 2004/06/10 00:20:33 ilyas -+ * Added L2/L3 and SRA -+ * -+ * Revision 1.2 2004/04/12 23:24:38 ilyas -+ * Added default G992P5 PHY definition -+ * -+ * Revision 1.1 2004/04/08 23:59:15 ilyas -+ * Initial CVS checkin -+ * -+ ****************************************************************************/ -+ -+#ifndef _ADSL_CORE_DEFS_H -+#define _ADSL_CORE_DEFS_H -+ -+#if defined(__KERNEL__) -+#include <linux/config.h> -+#endif -+ -+#if defined(CONFIG_BCM96348) || defined(BOARD_bcm96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(BOARD_bcm96338) || defined(_BCM96338_) -+#ifdef ADSL_ANNEXC -+#include "../adslcore6348C/adsl_defs.h" -+#elif defined(ADSL_ANNEXB) -+#include "../adslcore6348B/adsl_defs.h" -+#elif defined(ADSL_SADSL) -+#include "../adslcore6348SA/adsl_defs.h" -+#else -+#include "../adslcore6348/adsl_defs.h" -+#endif -+#endif -+ -+#if defined(__KERNEL__) || defined(TARG_OS_RTEMS) || defined(_CFE_) -+#if defined(CONFIG_BCM96345) || defined(BOARD_bcm96345) || defined(_BCM96345_) -+#ifdef ADSL_ANNEXC -+#include "../adslcore6345C/adsl_defs.h" -+#elif defined(ADSL_ANNEXB) -+#include "../adslcore6345B/adsl_defs.h" -+#elif defined(ADSL_SADSL) -+#include "../adslcore6345SA/adsl_defs.h" -+#else -+#include "../adslcore6345/adsl_defs.h" -+#endif -+#endif /* of CONFIG_BCM96345 */ -+#else -+#if defined(CONFIG_BCM96345) -+#ifdef ADSL_ANNEXC -+#include "../adslcoreC/adsl_defs.h" -+#elif defined(ADSL_ANNEXB) -+#include "../adslcoreB/adsl_defs.h" -+#elif defined(ADSL_SADSL) -+#include "../adslcoreSA/adsl_defs.h" -+#else -+#include "../adslcore/adsl_defs.h" -+#endif -+#endif /* of CONFIG_BCM96345 */ -+#endif /* __KERNEL__ */ -+ -+#ifdef _WIN32_WCE -+#define ASSERT(a) -+#endif -+ -+#include "AdslXfaceData.h" -+ -+/* adjust some definitions for the HOST */ -+ -+#undef GLOBAL_PTR_BIAS -+#undef ADSLCORE_ONLY -+#undef USE_SLOW_DATA -+#undef USE_FAST_TEXT -+#undef VP_SIMULATOR -+#undef bcm47xx -+#undef ADSL_FRAMER -+#undef ATM -+#undef ATM_I432 -+#undef DSL_OS -+ -+#define HOST_ONLY -+#define G997_1_FRAMER -+#define ADSL_MIB -+ -+#ifndef FLATTEN_ADDR_ADJUST -+#define FLATTEN_ADDR_ADJUST 0xFFF00000 -+#endif -+ -+/* definitions for combo PHY (AnnexA(ADSL2) and AnnexB) */ -+ -+#if !(defined(ADSL_SINGLE_PHY) || defined(G992_ANNEXC)) -+ -+#undef G992P1_ANNEX_A -+#define G992P1_ANNEX_A -+#undef G992P3 -+#define G992P3 -+#undef G992P5 -+#define G992P5 -+#define G992P1_ANNEX_A -+#undef READSL2 -+#define READSL2 -+#undef G992P1_ANNEX_A_USED_FOR_G992P2 -+#define G992P1_ANNEX_A_USED_FOR_G992P2 -+#undef T1P413 -+#define T1P413 -+ -+#undef G992P1_ANNEX_B -+#define G992P1_ANNEX_B -+ -+#endif -+ -+/* ADSL PHY definition */ -+ -+typedef struct { -+ unsigned long sdramPageAddr; -+ unsigned long sdramImageAddr; -+ unsigned long sdramImageSize; -+ unsigned long sdramPhyImageAddr; -+ unsigned short fwType; -+ unsigned short chipType; -+ unsigned short mjVerNum; -+ unsigned short mnVerNum; -+ char *pVerStr; -+ unsigned long features[4]; -+} adslPhyInfo; -+extern adslPhyInfo adslCorePhyDesc; -+ -+/* chip list */ -+ -+#define kAdslPhyChipMjMask 0xFF00 -+#define kAdslPhyChipMnMask 0x00FF -+#define kAdslPhyChipUnknown 0 -+#define kAdslPhyChip6345 0x100 -+#define kAdslPhyChip6348 0x200 -+#define kAdslPhyChipRev0 0 -+#define kAdslPhyChipRev1 1 -+#define kAdslPhyChipRev2 2 -+#define kAdslPhyChipRev3 3 -+#define kAdslPhyChipRev4 4 -+#define kAdslPhyChipRev5 5 -+ -+#define ADSL_PHY_SUPPORT(f) AdslFeatureSupported(adslCorePhyDesc.features,f) -+#define ADSL_PHY_SET_SUPPORT(p,f) AdslFeatureSet((p)->features,f) -+ -+/* ADSL Driver to/from PHY address and data conversion macros */ -+ -+#ifdef ADSLDRV_LITTLE_ENDIAN -+#define ADSL_ENDIAN_CONV_LONG(x) ( ((x) << 24) | (((x) << 8) & 0x00FF0000) | (((x) >> 8) & 0x0000FF00) | ((unsigned long)(x) >> 24) ) -+#define ADSL_ENDIAN_CONV_SHORT(x) ( ((x) << 8) | ((unsigned short)(x) >> 8) ) -+#define ADSL_ENDIAN_CONV_2SHORTS(x) ( ((x) << 16) | ((unsigned long)(x) >> 16) ) -+#else -+#define ADSL_ENDIAN_CONV_LONG(x) x -+#define ADSL_ENDIAN_CONV_SHORT(x) x -+#define ADSL_ENDIAN_CONV_2SHORTS(x) x -+#endif -+ -+#ifndef ADSL_PHY_XFACE_OFFSET -+#define ADSL_PHY_XFACE_OFFSET 0x00017F90 -+#endif -+#define ADSL_LMEM_XFACE_DATA (0xFFF00000 | ADSL_PHY_XFACE_OFFSET) -+ -+#ifndef ADSL_PHY_SDRAM_START -+#define ADSL_PHY_SDRAM_START 0x10000000 -+#endif -+#ifndef ADSL_PHY_SDRAM_BIAS -+#define ADSL_PHY_SDRAM_BIAS 0x00040000 -+#endif -+#define ADSL_PHY_SDRAM_START_4 (ADSL_PHY_SDRAM_START + ADSL_PHY_SDRAM_BIAS) -+ -+#ifndef ADSL_PHY_SDRAM_PAGE_SIZE -+#define ADSL_PHY_SDRAM_PAGE_SIZE 0x00080000 -+#endif -+ -+#ifdef ADSL_PHY_SDRAM_BIAS -+#define ADSL_SDRAM_IMAGE_SIZE (ADSL_PHY_SDRAM_PAGE_SIZE - ADSL_PHY_SDRAM_BIAS) -+#else -+#define ADSL_SDRAM_IMAGE_SIZE (256*1024) -+#endif -+ -+ -+#ifndef ADSL_PHY_SDRAM_LINK_OFFSET -+#define ADSL_PHY_SDRAM_LINK_OFFSET 0x00040000 -+#endif -+ -+#define ADSL_SDRAM_TOTAL_SIZE 0x00800000 -+#define ADSL_SDRAM_HOST_MIPS_DEFAULT (0xA0000000 | (ADSL_SDRAM_TOTAL_SIZE - ADSL_PHY_SDRAM_PAGE_SIZE + ADSL_PHY_SDRAM_BIAS)) -+ -+#define ADSLXF ((AdslXfaceData *) ADSL_LMEM_XFACE_DATA) -+ -+#define ADSL_MIPS_LMEM_ADDR(a) (((ulong)(a) & 0x19000000) == 0x19000000) -+#define SDRAM_ADDR_TO_HOST(a) ((void *) ((ulong)(a) - adslCorePhyDesc.sdramPhyImageAddr + \ -+ (ADSLXF->sdramBaseAddr ? (unsigned long) ADSLXF->sdramBaseAddr : ADSL_SDRAM_HOST_MIPS_DEFAULT))) -+#define SDRAM_ADDR_TO_ADSL(a) ((void *) (adslCorePhyDesc.sdramPhyImageAddr + ((ulong)(a) - \ -+ (ADSLXF->sdramBaseAddr ? (unsigned long) ADSLXF->sdramBaseAddr : ADSL_SDRAM_HOST_MIPS_DEFAULT)))) -+ -+#define ADSL_ADDR_TO_HOST(addr) ADSL_MIPS_LMEM_ADDR(addr) ? (void *) ((ulong) (addr) | FLATTEN_ADDR_ADJUST) : SDRAM_ADDR_TO_HOST(addr) -+ -+ -+#ifndef DEBUG -+#define DEBUG -+#endif -+ -+#ifndef __SoftDslPrintf -+void __SoftDslPrintf(void *gDslVars, char *fmt, int argNum, ...); -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.gh ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.gh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.gh 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,94 @@ -+/**************************************************************************** -+ * -+ * AdslMib.gh -+ * -+ * Description: -+ * This is a header file which defines the type for AdslMib -+ * global variable structure. -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.8 $ -+ * -+ * $Id: AdslMib.gh,v 1.8 2004/06/04 18:56:01 ilyas Exp $ -+ * -+ * $Log: AdslMib.gh,v $ -+ * Revision 1.8 2004/06/04 18:56:01 ilyas -+ * Added counter for ADSL2 framing and performance -+ * -+ * Revision 1.7 2003/10/17 21:02:12 ilyas -+ * Added more data for ADSL2 -+ * -+ * Revision 1.6 2003/10/14 00:55:27 ilyas -+ * Added UAS, LOSS, SES error seconds counters. -+ * Support for 512 tones (AnnexI) -+ * -+ * Revision 1.5 2003/07/18 19:07:15 ilyas -+ * Merged with ADSL driver -+ * -+ * Revision 1.4 2002/11/13 21:32:49 ilyas -+ * Added adjustK support for Centillium non-standard framing mode -+ * -+ * Revision 1.3 2002/10/31 20:27:13 ilyas -+ * Merged with the latest changes for VxWorks/Linux driver -+ * -+ * Revision 1.2 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.1 2001/12/21 22:39:30 ilyas -+ * Added support for ADSL MIB data objects (RFC2662) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef AdslMibGlobals -+#define AdslMibGlobals -+ -+#include "AdslMib.h" -+ -+typedef struct -+ { -+ /* MIB data */ -+ -+ adslMibInfo adslMib; -+ -+ /* ADSL state data */ -+ -+ adslMibNotifyHandlerType notifyHandlerPtr; -+ ulong timeSec; -+ ulong timeMs; -+ Boolean currSecondErrored; -+ Boolean currSecondLOS; -+ Boolean currSecondSES; -+ Boolean currSecondFEC; -+ ulong rcvPower; -+ ulong rcvRateBps; -+ ulong xmtRateBps; -+ ulong linkStatus; -+ G992CodingParams rcvParams; -+ G992CodingParams xmtParams; -+ ulong shtCounters[kG992ShowtimeNumOfMonitorCounters]; -+ ulong scratchData; -+ long showtimeMarginThld; -+ -+ /* ADSL diag data */ -+ -+ short snr[kAdslMibMaxToneNum]; -+ short showtimeMargin[kAdslMibMaxToneNum]; -+ uchar bitAlloc[kAdslMibMaxToneNum]; -+ short gain[kAdslMibMaxToneNum]; -+ ComplexShort chanCharLin[kAdslMibMaxToneNum]; -+ short chanCharLog[kAdslMibMaxToneNum]; -+ short quietLineNoise[kAdslMibMaxToneNum]; -+ -+ ushort nTones; -+ uchar nMsgCnt; -+ ulong g992MsgType; -+ uchar rsOption[1+4]; -+ Boolean rsOptionValid; -+ } -+ adslMibVarsStruct; -+ -+#endif /* AdslMibGlobals */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMib.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,114 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslMib.h -+ * -+ * Description: -+ * This file contains the exported functions and definitions for AdslMib -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.9 $ -+ * -+ * $Id: AdslMib.h,v 1.9 2004/04/12 23:34:52 ilyas Exp $ -+ * -+ * $Log: AdslMib.h,v $ -+ * Revision 1.9 2004/04/12 23:34:52 ilyas -+ * Merged the latest ADSL driver chnages for ADSL2+ -+ * -+ * Revision 1.8 2004/03/03 20:14:05 ilyas -+ * Merged changes for ADSL2+ from ADSL driver -+ * -+ * Revision 1.7 2003/10/14 00:55:27 ilyas -+ * Added UAS, LOSS, SES error seconds counters. -+ * Support for 512 tones (AnnexI) -+ * -+ * Revision 1.6 2003/07/18 19:07:15 ilyas -+ * Merged with ADSL driver -+ * -+ * Revision 1.5 2002/10/31 20:27:13 ilyas -+ * Merged with the latest changes for VxWorks/Linux driver -+ * -+ * Revision 1.4 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.3 2002/01/13 22:25:40 ilyas -+ * Added functions to get channels rate -+ * -+ * Revision 1.2 2002/01/03 06:03:36 ilyas -+ * Handle byte moves tha are not multiple of 2 -+ * -+ * Revision 1.1 2001/12/21 22:39:30 ilyas -+ * Added support for ADSL MIB data objects (RFC2662) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef AdslMibHeader -+#define AdslMibHeader -+ -+#if defined(_CFE_) -+#include "lib_types.h" -+#include "lib_string.h" -+#endif -+ -+#include "AdslMibDef.h" -+ -+/* Interface functions */ -+ -+typedef int (SM_DECL *adslMibNotifyHandlerType) (void *gDslVars, ulong event); -+ -+extern Boolean AdslMibInit(void *gDslVars); -+extern void AdslMibTimer(void *gDslVars, long timeMs); -+extern void AdslMibStatusSnooper (void *gDslVars, dslStatusStruct *status); -+extern void AdslMibSetNotifyHandler(void *gDslVars, adslMibNotifyHandlerType notifyHandlerPtr); -+extern int AdslMibGetModulationType(void *gDslVars); -+extern Boolean AdslMibIsAdsl2Mod(void *gDslVars); -+extern int AdslMibGetActiveChannel(void *gDslVars); -+extern int AdslMibGetGetChannelRate(void *gDslVars, int dir, int channel); -+extern Boolean AdslMibIsLinkActive(void *gDslVars); -+extern int AdslMibPowerState(void *gDslVars); -+extern int AdslMibTrainingState (void *gDslVars); -+extern void AdslMibClearData(void *gDslVars); -+extern void AdslMibClearBertResults(void *gDslVars); -+extern void AdslMibBertStartEx(void *gDslVars, ulong bertSec); -+extern void AdslMibBertStopEx(void *gDslVars); -+extern ulong AdslMibBertContinueEx(void *gDslVars, ulong totalBits, ulong errBits); -+extern void AdslMibSetLPR(void *gDslVars); -+extern void AdslMibSetShowtimeMargin(void *gDslVars, long showtimeMargin); -+extern void AdslMibResetConectionStatCounters(void *gDslVars); -+ -+extern void AdslMibByteMove (int size, void* srcPtr, void* dstPtr); -+extern void AdslMibByteClear(int size, void* dstPtr); -+extern int AdslMibStrCopy(char *srcPtr, char *dstPtr); -+ -+/* AdslMibGetData dataId codes */ -+ -+#define kAdslMibDataAll 0 -+ -+extern void *AdslMibGetData (void *gDslVars, int dataId, void *pAdslMibData); -+ -+extern int AdslMibGetObjectValue ( -+ void *gDslVars, -+ uchar *objId, -+ int objIdLen, -+ uchar *dataBuf, -+ ulong *dataBufLen); -+ -+#endif /* AdslMibHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMibOid.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMibOid.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMibOid.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslMibOid.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,177 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslMibOid.h -+ * -+ * Description: -+ * SNMP object identifiers for ADSL MIB and other related MIBs -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.5 $ -+ * -+ * $Id: AdslMibOid.h,v 1.5 2004/06/04 18:56:01 ilyas Exp $ -+ * -+ * $Log: AdslMibOid.h,v $ -+ * Revision 1.5 2004/06/04 18:56:01 ilyas -+ * Added counter for ADSL2 framing and performance -+ * -+ * Revision 1.4 2003/10/17 21:02:12 ilyas -+ * Added more data for ADSL2 -+ * -+ * Revision 1.3 2003/10/14 00:55:27 ilyas -+ * Added UAS, LOSS, SES error seconds counters. -+ * Support for 512 tones (AnnexI) -+ * -+ * Revision 1.2 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.1 2001/12/21 22:39:30 ilyas -+ * Added support for ADSL MIB data objects (RFC2662) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef AdslMibOidHeader -+#define AdslMibOidHeader -+ -+#define kOidAdsl 94 -+#define kOidAdslInterleave 124 -+#define kOidAdslFast 125 -+#define kOidAtm 37 -+ -+#define kOidAdslLine 1 -+#define kOidAdslMibObjects 1 -+ -+#define kOidAdslLineTable 1 -+#define kOidAdslLineEntry 1 -+#define kOidAdslLineCoding 1 -+#define kOidAdslLineType 2 -+#define kOidAdslLineSpecific 3 -+#define kOidAdslLineConfProfile 4 -+#define kOidAdslLineAlarmConfProfile 5 -+ -+#define kOidAdslAtucPhysTable 2 -+#define kOidAdslAturPhysTable 3 -+#define kOidAdslPhysEntry 1 -+#define kOidAdslPhysInvSerialNumber 1 -+#define kOidAdslPhysInvVendorID 2 -+#define kOidAdslPhysInvVersionNumber 3 -+#define kOidAdslPhysCurrSnrMgn 4 -+#define kOidAdslPhysCurrAtn 5 -+#define kOidAdslPhysCurrStatus 6 -+#define kOidAdslPhysCurrOutputPwr 7 -+#define kOidAdslPhysCurrAttainableRate 8 -+ -+#define kOidAdslAtucChanTable 4 -+#define kOidAdslAturChanTable 5 -+#define kOidAdslChanEntry 1 -+#define kOidAdslChanInterleaveDelay 1 -+#define kOidAdslChanCurrTxRate 2 -+#define kOidAdslChanPrevTxRate 3 -+#define kOidAdslChanCrcBlockLength 4 -+ -+#define kOidAdslAtucPerfDataTable 6 -+#define kOidAdslAturPerfDataTable 7 -+#define kOidAdslPerfDataEntry 1 -+#define kOidAdslPerfLofs 1 -+#define kOidAdslPerfLoss 2 -+#define kOidAdslPerfLprs 3 -+#define kOidAdslPerfESs 4 -+#define kOidAdslPerfValidIntervals 5 -+#define kOidAdslPerfInvalidIntervals 6 -+#define kOidAdslPerfCurr15MinTimeElapsed 7 -+#define kOidAdslPerfCurr15MinLofs 8 -+#define kOidAdslPerfCurr15MinLoss 9 -+#define kOidAdslPerfCurr15MinLprs 10 -+#define kOidAdslPerfCurr15MinESs 11 -+#define kOidAdslPerfCurr1DayTimeElapsed 12 -+#define kOidAdslPerfCurr1DayLofs 13 -+#define kOidAdslPerfCurr1DayLoss 14 -+#define kOidAdslPerfCurr1DayLprs 15 -+#define kOidAdslPerfCurr1DayESs 16 -+#define kOidAdslPerfPrev1DayMoniSecs 17 -+#define kOidAdslPerfPrev1DayLofs 18 -+#define kOidAdslPerfPrev1DayLoss 19 -+#define kOidAdslPerfPrev1DayLprs 20 -+#define kOidAdslPerfPrev1DayESs 21 -+ -+#define kOidAdslAtucPerfIntervalTable 8 -+#define kOidAdslAturPerfIntervalTable 9 -+#define kOidAdslPerfIntervalEntry 1 -+#define kOidAdslIntervalNumber 1 -+#define kOidAdslIntervalLofs 2 -+#define kOidAdslIntervalLoss 3 -+#define kOidAdslIntervalLprs 4 -+#define kOidAdslIntervalESs 5 -+#define kOidAdslIntervalValidData 6 -+ -+#define kOidAdslAtucChanPerfTable 10 -+#define kOidAdslAturChanPerfTable 11 -+#define kOidAdslChanPerfEntry 1 -+#define kOidAdslChanReceivedBlks 1 -+#define kOidAdslChanTransmittedBlks 2 -+#define kOidAdslChanCorrectedBlks 3 -+#define kOidAdslChanUncorrectBlks 4 -+#define kOidAdslChanPerfValidIntervals 5 -+#define kOidAdslChanPerfInvalidIntervals 6 -+#define kOidAdslChanPerfCurr15MinTimeElapsed 7 -+#define kOidAdslChanPerfCurr15MinReceivedBlks 8 -+#define kOidAdslChanPerfCurr15MinTransmittedBlks 9 -+#define kOidAdslChanPerfCurr15MinCorrectedBlks 10 -+#define kOidAdslChanPerfCurr15MinUncorrectBlks 11 -+#define kOidAdslChanPerfCurr1DayTimeElapsed 12 -+#define kOidAdslChanPerfCurr1DayReceivedBlks 13 -+#define kOidAdslChanPerfCurr1DayTransmittedBlks 14 -+#define kOidAdslChanPerfCurr1DayCorrectedBlks 15 -+#define kOidAdslChanPerfCurr1DayUncorrectBlks 16 -+#define kOidAdslChanPerfPrev1DayMoniSecs 17 -+#define kOidAdslChanPerfPrev1DayReceivedBlks 18 -+#define kOidAdslChanPerfPrev1DayTransmittedBlks 19 -+#define kOidAdslChanPerfPrev1DayCorrectedBlks 20 -+#define kOidAdslChanPerfPrev1DayUncorrectBlks 21 -+ -+#define kOidAdslAtucChanIntervalTable 12 -+#define kOidAdslAturChanIntervalTable 13 -+#define kOidAdslChanIntervalEntry 1 -+#define kOidAdslChanIntervalNumber 1 -+#define kOidAdslChanIntervalReceivedBlks 2 -+#define kOidAdslChanIntervalTransmittedBlks 3 -+#define kOidAdslChanIntervalCorrectedBlks 4 -+#define kOidAdslChanIntervalUncorrectBlks 5 -+#define kOidAdslChanIntervalValidData 6 -+ -+/* AdslExtra OIDs for kOidAdslPrivate, kOidAdslPrivExtraInfo (defined in AdslMibDef.h) */ -+ -+#define kOidAdslExtraConnectionInfo 1 -+#define kOidAdslExtraConnectionStat 2 -+#define kOidAdslExtraFramingMode 3 -+#define kOidAdslExtraTrainingState 4 -+#define kOidAdslExtraNonStdFramingAdjustK 5 -+#define kOidAdslExtraAtmStat 6 -+#define kOidAdslExtraDiagModeData 7 -+#define kOidAdslExtraAdsl2Info 8 -+#define kOidAdslExtraTxPerfCounterInfo 9 -+ -+#define kOidAtmMibObjects 1 -+#define kOidAtmTcTable 4 -+#define kOidAtmTcEntry 1 -+#define kOidAtmOcdEvents 1 -+#define kOidAtmAlarmState 2 -+ -+#endif /* AdslMibOidHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslXfaceData.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslXfaceData.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslXfaceData.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/AdslXfaceData.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,129 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslXfaceData.h -- ADSL Core interface data structure -+ * -+ * Description: -+ * To be included both in SoftDsl and BcmAdslCore driver -+ * -+ * -+ * Copyright (c) 2000-2001 Broadcom Corporation -+ * All Rights Reserved -+ * No portions of this material may be reproduced in any form without the -+ * written permission of: -+ * Broadcom Corporation -+ * 16215 Alton Parkway -+ * Irvine, California 92619 -+ * All information contained in this document is Broadcom Corporation -+ * company private, proprietary, and trade secret. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.9 $ -+ * -+ * $Id: AdslXfaceData.h,v 1.9 2004/02/03 02:57:22 ilyas Exp $ -+ * -+ * $Log: AdslXfaceData.h,v $ -+ * Revision 1.9 2004/02/03 02:57:22 ilyas -+ * Added PHY feature settings -+ * -+ * Revision 1.8 2003/07/18 04:50:21 ilyas -+ * Added shared buffer for clEoc messages to avoid copying thru command buffer -+ * -+ * Revision 1.7 2003/02/25 00:46:32 ilyas -+ * Added T1.413 EOC vendor ID -+ * -+ * Revision 1.6 2003/02/21 23:29:13 ilyas -+ * Added OEM vendor ID parameter for T1.413 mode -+ * -+ * Revision 1.5 2002/09/13 21:17:12 ilyas -+ * Added pointers to version and build string to OEM interface structure -+ * -+ * Revision 1.4 2002/09/07 04:16:29 ilyas -+ * Fixed HOST to ADSL MIPS SDRAM address translation for relocatable images -+ * -+ * Revision 1.3 2002/09/07 01:43:59 ilyas -+ * Added support for OEM parameters -+ * -+ * Revision 1.2 2002/01/22 19:03:10 khp -+ * -put sdramBaseAddr at end of Xface struct -+ * -+ * Revision 1.1 2002/01/15 06:25:08 ilyas -+ * Initial implementation of ADSL core firmware -+ * -+ ****************************************************************************/ -+ -+#ifndef AdslXfaceDataHeader -+#define AdslXfaceDataHeader -+ -+#include "CircBuf.h" -+ -+typedef struct _AdslXfaceData { -+ stretchBufferStruct sbSta; -+ stretchBufferStruct sbCmd; -+ unsigned long gfcTable[15]; -+ void *sdramBaseAddr; -+} AdslXfaceData; -+ -+/* Shared SDRAM configuration data */ -+ -+#define kAdslOemVendorIdMaxSize 8 -+#define kAdslOemVersionMaxSize 32 -+#define kAdslOemSerNumMaxSize 32 -+#define kAdslOemNonStdInfoMaxSize 64 -+ -+typedef struct _AdslOemSharedData { -+ unsigned long g994VendorIdLen; -+ unsigned long g994XmtNonStdInfoLen; -+ unsigned long g994RcvNonStdInfoLen; -+ unsigned long eocVendorIdLen; -+ unsigned long eocVersionLen; -+ unsigned long eocSerNumLen; -+ unsigned char g994VendorId[kAdslOemVendorIdMaxSize]; -+ unsigned char eocVendorId[kAdslOemVendorIdMaxSize]; -+ unsigned char eocVersion[kAdslOemVersionMaxSize]; -+ unsigned char eocSerNum[kAdslOemSerNumMaxSize]; -+ unsigned char g994XmtNonStdInfo[kAdslOemNonStdInfoMaxSize]; -+ unsigned char g994RcvNonStdInfo[kAdslOemNonStdInfoMaxSize]; -+ char *gDslVerionStringPtr; -+ char *gDslBuildDataStringPtr; -+ unsigned long t1413VendorIdLen; -+ unsigned char t1413VendorId[kAdslOemVendorIdMaxSize]; -+ unsigned long t1413EocVendorIdLen; -+ unsigned char t1413EocVendorId[kAdslOemVendorIdMaxSize]; -+ unsigned long clEocBufLen; -+ unsigned char *clEocBufPtr; -+} AdslOemSharedData; -+ -+/* feature list */ -+ -+#define kAdslPhyAnnexA 0 -+#define kAdslPhyAnnexB 1 -+#define kAdslPhyAnnexC 2 -+#define kAdslPhySADSL 3 -+#define kAdslPhyAdsl2 4 -+#define kAdslPhyAdslG992p3 4 -+#define kAdslPhyAdsl2p 5 -+#define kAdslPhyAdslG992p5 5 -+#define kAdslPhyAnnexI 6 -+#define kAdslPhyAdslReAdsl2 7 -+#define kAdslPhyG992p2Init 8 -+#define kAdslPhyT1P413 9 -+ -+#define AdslFeatureSupported(fa,f) ((fa)[(f) >> 5] & (1 << ((f) & 0x1F))) -+#define AdslFeatureSet(fa,f) (fa)[(f) >> 5] |= (1 << ((f) & 0x1F)) -+ -+#endif /* AdslXfaceDataHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlankList.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlankList.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlankList.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlankList.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,87 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * BlankList.h -+ * -+ * Description: -+ * Definition and implementation (via macros and inline functions) -+ * of blank list - list of unused items of any size (not less than -+ * sizeof(void *) -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ *****************************************************************************/ -+ -+#ifndef BlankListHeader -+#define BlankListHeader -+ -+#define BlankListPeek(head) ((void *) (head)) -+#define BlankListNext(p) (*(void **) (p)) -+ -+#define BlankListAdd(pHead,p) do { \ -+ BlankListNext(p) = BlankListNext(pHead); \ -+ BlankListNext(pHead) = (void *) (p); \ -+} while (0) -+ -+#define BlankListAddList(pHead,pFirst,pLast) do { \ -+ if (NULL != (pLast)) { \ -+ BlankListNext(pLast) = BlankListNext(pHead); \ -+ BlankListNext(pHead) = (void *) (pFirst); \ -+ } \ -+} while (0) -+ -+#define BlankListGet(pHead) \ -+ BlankListNext(pHead); \ -+ { \ -+ void **__p; \ -+ __p = (void **) BlankListNext(pHead); \ -+ if (NULL != __p) \ -+ BlankListNext(pHead) = *__p; \ -+ } -+ -+ -+#define BlankListForEach(pHead,f,ref) do { \ -+ void *p = BlankListNext(pHead); \ -+ \ -+ while (NULL != p) { \ -+ if ( (f)((p), ref) ) break; \ -+ p = BlankListNext(p); \ -+ } \ -+} while (0) -+ -+ -+#include "Que.h" -+ -+#define BlankListAddQue(pHead,pqHdr) do { \ -+ if (NULL != ((QueHeader *)(pqHdr))->tail) { \ -+ BlankListNext(((QueHeader *)(pqHdr))->tail) = BlankListNext(pHead); \ -+ BlankListNext(pHead) = ((QueHeader *)(pqHdr))->head; \ -+ } \ -+} while (0) -+ -+#include "DList.h" -+ -+#define BlankListAddDList(pHead,pDListHead) do { \ -+ if (!DListEmpty(pDListHead)) { \ -+ BlankListNext(DListLast(pDListHead)) = BlankListNext(pHead); \ -+ BlankListNext(pHead) = DListFirst(pDListHead); \ -+ } \ -+} while (0) -+ -+#endif /* BlankListHeader */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlockUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlockUtil.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlockUtil.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/BlockUtil.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,235 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/* BlockUtil.h -+ * -+ * Description: -+ * This file contains the interfaces for the fixed point block -+ * processing utilities. -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.23 $ -+ * -+ * $Id: BlockUtil.h,v 1.23 2004/04/13 00:31:10 ilyas Exp $ -+ * -+ * $Log: BlockUtil.h,v $ -+ * Revision 1.23 2004/04/13 00:31:10 ilyas -+ * Added standard header for shared ADSL driver files -+ * -+ * Revision 1.22 2003/07/11 01:49:01 gsyu -+ * Added BlockShortClearByLong to speed up performance -+ * -+ * Revision 1.21 2003/07/10 22:35:23 gsyu -+ * Speed up BlockByteXXX performance -+ * -+ * Revision 1.20 2003/07/10 22:15:51 gsyu -+ * Added BlockByteMoveByWord to speed up performance -+ * -+ * Revision 1.19 2002/03/12 00:03:03 yongbing -+ * Modify cplxScaleCplxSymbols to accept a shift value instead of an array of shifts -+ * -+ * Revision 1.18 2001/03/14 00:50:25 georgep -+ * All targets use FEQ_PASS_FFTSHIFT, remove code for case where its not defined -+ * -+ * Revision 1.17 2000/11/30 03:54:09 khp -+ * -BlockRealScaleCplxSymbols instead of BlockScaleComplexSymbols -+ * -+ * Revision 1.16 2000/11/29 20:42:12 liang -+ * Add function for ADSL xmt gains with fixed shift. -+ * -+ * Revision 1.15 2000/10/02 19:24:08 georgep -+ * Modify FEQ for new fft, fft outputs a shift for each block -+ * -+ * Revision 1.14 2000/09/09 00:23:48 liang -+ * Add corresponding functions for the ComplexLong FEQ coef. -+ * -+ * Revision 1.13 2000/05/17 01:36:52 yongbing -+ * Add Pentium MMX assembly codes for more block related functions -+ * -+ * Revision 1.12 2000/04/19 19:22:22 yongbing -+ * Add BlockShortScaleby2 function used in G994p1 -+ * -+ * Revision 1.11 2000/04/04 02:28:01 liang -+ * Merged with SoftDsl_0_2 from old tree. -+ * -+ * Revision 1.11 2000/03/14 23:29:01 yongbing -+ * Add Pentim MMX codes for BlockCplxSymbolUpdateCplxScale function -+ * -+ * Revision 1.10 2000/02/16 01:53:00 yongbing -+ * Add Pentium MMX module for FEQ -+ * -+ * Revision 1.9 1999/11/02 02:49:55 liang -+ * Add BlockComplexPower function. -+ * -+ * Revision 1.8 1999/08/05 19:42:34 liang -+ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. -+ * -+ * Revision 1.7 1999/06/16 00:54:39 liang -+ * BlockRealScaleComplexSymbols takes a scale shift buffer now. -+ * -+ * Revision 1.6 1999/05/22 02:18:29 liang -+ * Add one more parameter to BlockCplxSymbolUpdateCplxScale function. -+ * -+ * Revision 1.5 1999/05/14 22:49:39 liang -+ * Added two more functions. -+ * -+ * Revision 1.4 1999/03/26 03:29:57 liang -+ * Add function BlockComplexMultLongAcc. -+ * -+ * Revision 1.3 1999/02/22 22:40:59 liang -+ * BlockByteSum takes uchar inputs instead of schar. -+ * -+ * Revision 1.2 1999/02/10 01:56:44 liang -+ * Added BlockByteSum, BlockRealScaleComplexSymbols and BlockCplxScaleComplexSymbols. -+ * -+ * Revision 1.1 1998/10/28 01:35:38 liang -+ * *** empty log message *** -+ * -+ * Revision 1.12 1998/07/08 17:09:25 scott -+ * Removed unnecessary undefs -+ * -+ * Revision 1.11 1998/04/02 06:19:44 mwg -+ * Added two new utilities. -+ * -+ * Revision 1.10 1998/03/26 23:20:55 liang -+ * Added function BlockShortMultiply. -+ * -+ * Revision 1.9 1998/02/16 18:41:00 scott -+ * Added MMX autodetect support -+ * -+ * Revision 1.8 1997/12/13 06:11:35 mwg -+ * Added new functions: -+ * BlockLongSubtract() -+ * BlockLongAdd() -+ * BlockLong2ShortSubtract() -+ * BlockShort2LongMove() -+ * BlockShortInterpolate() -+ * BlockLongCorrelate() -+ * BlockMapShort2Short() -+ * -+ * Revision 1.7 1997/03/19 18:35:10 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.6 1997/02/11 00:08:18 mwg -+ * Added BlockByteMove function -+ * -+ * Revision 1.5 1997/02/04 08:40:08 mwg -+ * Changed interface forBlockReal2ComplexMacc() -+ * -+ * Revision 1.4 1997/01/23 02:04:28 mwg -+ * Added return value to BlockShortMove -+ * -+ * Revision 1.3 1996/12/19 22:34:55 mwg -+ * Added new function BlockFullPower(). -+ * -+ * Revision 1.2 1996/02/21 03:59:15 mwg -+ * Added new function BlockReal2ComplexMacc -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.5 1995/04/04 06:09:32 mwg -+ * Changed the SoftModem status reporting: now the status is a structure/union -+ * where different fields used for different status code. This will enable -+ * efficient status snooping for high level protocols on top of the softmodem. -+ * -+ */ -+ -+#ifndef BlockUtilPh -+#define BlockUtilPh -+ -+extern void BlockLongAdd (int, long*, long*, long*); -+extern void BlockLong2ShortSubtract (int, long*, long*, short*); -+extern void BlockShort2LongMove (int, short*, long*); -+extern void BlockShortMultiply (int, int, short*, short*, short*); -+extern void BlockByteMoveUnaligned (int size, uchar *srcPtr, uchar *dstPtr); -+extern void BlockShortOffset (int, short, short*, short*); -+extern long BlockShortInterpolateWithIncrement (int size, long scaleFactor, long increment, int shift, short* src1Ptr, short* src2Ptr, short* dstPtr); -+extern void BlockReal2ComplexMult (int, short*, ComplexShort*, ComplexShort*); -+extern void BlockComplexConjigateMult (int, ComplexShort*, ComplexShort*, ComplexShort*); -+ -+extern long BlockSum (int, short*); -+extern long BlockByteSum (int, uchar*); -+extern void BlockComplexSum (int, ComplexShort*, ComplexLong*); -+extern void BlockComplexPower (int, int, ComplexShort*, long*); -+extern long BlockFullPower (int, short*); -+extern long BlockLongCorrelate (int, long*, long*); -+ -+extern int BlockSymbol2Byte (int, int, ushort*, uchar*); -+extern int BlockByte2Symbol (int, int, uchar*, ushort*); -+ -+extern void BlockMapShort2Complex (int, ushort*, ComplexByte*, ComplexShort*); -+extern void BlockMapShort2Short (int size, ushort *srcPtr, short *mapPtr, short *dstPtr); -+extern void BlockMapByte2Byte (int size, uchar *srcPtr, uchar *mapPtr, uchar *dstPtr); -+extern void BlockMapByte2Short (int size, uchar *srcPtr, short *mapPtr, short *dstPtr); -+extern void BlockShortMult (int size, int shift, short* src1Ptr, short* src2Ptr, short* dstPtr); -+ -+extern int SM_DECL Idle(void); -+ -+extern void BlockGenerateAngles(int size, ComplexShort *anglePtr, ComplexShort *incPtr, ComplexShort *dstPtr); -+extern void BlockExtractRealPart(int size, ComplexShort *srcPtr, short *dstPtr); -+extern void BlockShortScaleByShift (int size, int shift, short* srcPtr, short* dstPtr); -+ -+#ifndef PENTIUM_REDEFS /* only if these have not been redefined to function pointers */ -+extern long BlockPower (int, short*); -+extern void BlockReal2ComplexMacc (int, int, short*, ComplexShort*, ComplexLong*); -+extern void BlockComplexMult (int, ComplexShort*, ComplexShort*, ComplexShort*); -+extern void BlockShortScale (int, short, int, short*, short*); -+extern int SM_DECL BlockShortMove (int, short*, short*); -+extern long BlockCorrelate (int, short*, short*); -+ -+extern void BlockRealScaleComplexSymbols(int, int, uchar*, short*, ComplexShort*, ComplexShort*); -+/* FIXME -- the following 3 functions can be removed */ -+extern void BlockCplxScaleComplexSymbols(int, int, int, ComplexShort*, ComplexShort*, ComplexShort*); -+extern void BlockCplxSymbolUpdateCplxScale(int, int, int, uchar*, ComplexShort*, -+ ComplexShort*, ComplexShort*, ComplexShort*); -+extern void BlockComplexShortFill (int, short, short, ComplexShort*); -+ -+ -+extern void BlockRealScaleCplxSymbols(int, int, int, short*, ComplexShort*, ComplexShort*); -+extern void BlockCplxLongConjigateMultCplxShort(int, ComplexLong*, ComplexShort*, ComplexLong*); -+ -+extern void BlockCplxLongScaleCplxSymbols(int, int, int, ComplexLong*, ComplexShort*, short*, ComplexShort*); -+extern void BlockCplxSymbolUpdateCplxLongScale(int, int, int, int, -+ ComplexShort*, short *, ComplexLong*, ComplexShort*); -+ -+extern void BlockComplexLongFill (int, long, long, ComplexLong*); -+ -+extern void BlockShortSubtract (int, short*, short*, short*); -+extern void BlockLongSubtract (int, long*, long*, long*); -+extern void BlockShortAdd (int, short*, short*, short*); -+extern void BlockByteMove (int, uchar*, uchar*); -+extern void BlockByteMoveByLong (int, uchar*, uchar*); -+extern void SM_DECL BlockByteFill (int, uchar, uchar*); -+extern void BlockByteFillByLong (int, uchar, uchar*); -+extern void BlockByteClear (int, uchar*); -+extern void BlockByteClearByLong (int, uchar*); -+extern void BlockShortFill (int, short, short*); -+extern void BlockShortClear (int, short*); -+extern void BlockShortClearByLong (int, short*); -+extern void BlockLongFill (int, long, long*); -+extern void BlockLongClear (int, long*); -+extern void BlockComplexShortClear (int, ComplexShort*); -+extern void BlockShortInvert (int, short*, short*); -+extern void BlockShortScaleDown (int, short*); -+extern void BlockLongMove (int, long*, long*); -+extern void BlockShortInterpolate (int, short, int, short*, short*, short*); -+extern void BlockComplexMultLongAcc (int, int, ComplexShort*, ComplexShort*, ComplexLong*); -+ -+#endif -+ -+#endif /* BlockUtilPh */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/CircBuf.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/CircBuf.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/CircBuf.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/CircBuf.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,217 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * CircBuf -- Generic Circular Buffer -+ * -+ * Description: -+ * Implementation of generic circular buffer algorithms -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.14 $ -+ * -+ * $Id: CircBuf.h,v 1.14 2004/06/24 03:10:37 ilyas Exp $ -+ * -+ * $Log: CircBuf.h,v $ -+ * Revision 1.14 2004/06/24 03:10:37 ilyas -+ * Added extra macro to be able to use un-cached variable (for status write) -+ * -+ * Revision 1.13 2004/02/09 23:47:02 ilyas -+ * Fixed last change -+ * -+ * Revision 1.12 2004/02/06 22:52:58 ilyas -+ * Improved stretch buffer write -+ * -+ * Revision 1.11 2002/12/30 23:27:55 ilyas -+ * Added macro for HostDma optimizations -+ * -+ * Revision 1.10 2002/10/26 02:15:02 ilyas -+ * Optimized and added new macros for HostDma -+ * -+ * Revision 1.9 2002/01/22 23:59:29 ilyas -+ * Added paraenthesis around macro argument -+ * -+ * Revision 1.8 2002/01/15 22:28:38 ilyas -+ * Extended macro to support readPtr from uncached address -+ * -+ * Revision 1.7 2001/09/21 19:47:05 ilyas -+ * Fixed compiler warnings for VxWorks build -+ * -+ * Revision 1.6 2001/06/07 18:47:56 ilyas -+ * Added more macros for circular buffer arithmetics -+ * -+ * Revision 1.5 2001/04/18 03:58:34 ilyas -+ * Added LOG file write granularity -+ * -+ * Revision 1.4 2001/01/19 04:34:12 ilyas -+ * Added more macros to circular buffer implementation -+ * -+ * Revision 1.3 2001/01/06 04:01:41 ilyas -+ * Changed the way we write status messages -+ * -+ * Revision 1.2 2001/01/04 05:52:21 ilyas -+ * Added implementation of stretchable circular buffer used in LOG and Status -+ * handlers -+ * -+ * Revision 1.1 2000/05/03 03:45:55 ilyas -+ * Original implementation -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef CircBufHeader_H_ -+#define CircBufHeader_H_ -+ -+ -+typedef struct { -+ char *pStart; -+ char *pEnd; -+ char *pRead; -+ char *pWrite; -+} circBufferStruct; -+ -+/* Initialize circular buffer */ -+ -+#define CircBufferInit(pCB,buf,size) do { \ -+ (pCB)->pStart = (char *) (buf); \ -+ (pCB)->pRead = (pCB)->pWrite = (pCB)->pStart; \ -+ (pCB)->pEnd = (pCB)->pStart + size; \ -+} while (0) -+ -+#define CircBufferGetSize(pCB) ((pCB)->pEnd - (pCB)->pStart) -+#define CircBufferGetStartPtr(pCB) ((void *) (pCB)->pStart) -+#define CircBufferGetEndPtr(pCB) ((void *) (pCB)->pEnd) -+ -+#define CircBufferReset(pCB) (pCB)->pRead = (pCB)->pWrite = (pCB)->pStart -+ -+ -+#define CircBufferGetReadPtr(pCB) ((void *) (pCB)->pRead) -+#define CircBufferGetWritePtr(pCB) ((void *) (pCB)->pWrite) -+ -+ -+#ifndef bcm47xx -+#define CircBufferDistance(pCB,p1,p2,d) ((char*)(p2) - (char*)(p1) - d >= 0 ? \ -+ (char*)(p2) - (char*)(p1) - d : \ -+ ((char*)(p2)- (char*)(p1) - d + ((pCB)->pEnd - (pCB)->pStart))) -+ -+#define CircBufferAddContig(pCB,p,n) ((char*)(p) + (n) == (pCB)->pEnd ? (pCB)->pStart : (char*)(p) + (n)) -+#else -+static __inline int CircBufferDistance(circBufferStruct *pCB, char *p1, char *p2, int d) -+{ -+ int tmp = p2 - p1 - d; -+ -+ return (tmp >= 0 ? tmp : tmp + (pCB->pEnd - pCB->pStart)); -+} -+ -+static __inline char * CircBufferAddContig(circBufferStruct *pCB, char *p, int n) -+{ -+ p += n; -+ return (p == pCB->pEnd ? pCB->pStart : p); -+} -+#endif -+ -+#define CircBufferAdd(pCB,p,n) ((char*)(p) + (n) >= (pCB)->pEnd ? \ -+ (pCB)->pStart + ((char*)(p) + (n) - (pCB)->pEnd) : \ -+ (char*)(p) + (n)) -+ -+#define CircBufferReadUpdate(pCB,n) (pCB)->pRead = CircBufferAdd(pCB,(pCB)->pRead,n) -+#define CircBufferWriteUpdate(pCB,n) (pCB)->pWrite= CircBufferAdd(pCB,(pCB)->pWrite,n) -+ -+#define CircBufferReadUpdateContig(pCB,n) (pCB)->pRead = CircBufferAddContig(pCB,(pCB)->pRead,n) -+#define CircBufferWriteUpdateContig(pCB,n) (pCB)->pWrite= CircBufferAddContig(pCB,(pCB)->pWrite,n) -+ -+#define CircBufferGetReadAvail(pCB) CircBufferDistance(pCB,(pCB)->pRead,(pCB)->pWrite,0) -+#define CircBufferIsReadEmpty(pCB) ((pCB)->pRead == (pCB)->pWrite) -+#define CircBufferGetWriteAvail(pCB) CircBufferDistance(pCB,(pCB)->pWrite,(pCB)->pRead,1) -+#define CircBufferGetWriteAvailN(pCB,n) CircBufferDistance(pCB,(pCB)->pWrite,(pCB)->pRead,n) -+ -+#define CircBufferGetReadContig(pCB) ((unsigned long)(pCB)->pWrite >= (unsigned long) (pCB)->pRead ? \ -+ (pCB)->pWrite - (pCB)->pRead : \ -+ (pCB)->pEnd - (pCB)->pRead) -+ -+#define CircBufferGetWriteContig(pCB) ((pCB)->pEnd - (pCB)->pWrite > CircBufferGetWriteAvail(pCB) ? \ -+ CircBufferGetWriteAvail(pCB) : \ -+ (pCB)->pEnd - (pCB)->pWrite) -+ -+/* -+** -+** structure and macros for "strectch" buffer -+** -+*/ -+ -+typedef struct { -+ char *pStart; -+ char *pEnd; -+ char *pExtraEnd; -+ char *pStretchEnd; -+ char *pRead; -+ char *pWrite; -+} stretchBufferStruct; -+ -+#define StretchBufferInit(pSB,buf,size,extra) do { \ -+ (pSB)->pStart = (char *) (buf); \ -+ (pSB)->pRead = (pSB)->pWrite = (pSB)->pStart; \ -+ (pSB)->pEnd = (pSB)->pStart + (size); \ -+ (pSB)->pStretchEnd = (pSB)->pEnd; \ -+ (pSB)->pExtraEnd = (pSB)->pEnd+(extra); \ -+} while (0) -+ -+#define StretchBufferGetSize(pSB) ((pSB)->pEnd - (pSB)->pStart) -+#define StretchBufferGetStartPtr(pSB) ((void *) (pSB)->pStart) -+#define StretchBufferGetReadPtr(pSB) ((void *) (pSB)->pRead) -+#define StretchBufferGetWritePtr(pSB) ((void *) (pSB)->pWrite) -+#define StretchBufferReset(pSB) ((pSB)->pRead = (pSB)->pWrite = (pSB)->pStart) -+ -+#define StretchBufferGetReadToEnd(pSB) ((pSB)->pStretchEnd - (pSB)->pRead) -+ -+#define StretchBufferGetReadAvail(pSB) ((pSB)->pWrite - (pSB)->pRead >= 0 ? \ -+ (pSB)->pWrite - (pSB)->pRead : \ -+ (pSB)->pStretchEnd - (pSB)->pRead) -+#define _StretchBufferGetWriteAvail(pSB,rd) ((rd) - (pSB)->pWrite > 0 ? \ -+ (rd) - (pSB)->pWrite - 1 : \ -+ ((pSB)->pExtraEnd - (pSB)->pWrite)) -+#define StretchBufferGetWriteAvail(pSB) _StretchBufferGetWriteAvail(pSB, (pSB)->pRead) -+ -+#define StretchBufferReadUpdate(pSB,n) do { \ -+ char *p; \ -+ \ -+ p = (pSB)->pRead + (n); \ -+ (pSB)->pRead = (p >= (pSB)->pStretchEnd ? (pSB)->pStart : p); \ -+} while (0) -+ -+#define _StretchBufferWriteUpdate(pSB,rd,n) do { \ -+ char *p; \ -+ \ -+ p = (pSB)->pWrite + (n); \ -+ if (p >= (pSB)->pEnd) { \ -+ if ((rd) != (pSB)->pStart) { \ -+ (pSB)->pStretchEnd = p; \ -+ (pSB)->pWrite = (pSB)->pStart; \ -+ } \ -+ } \ -+ else \ -+ (pSB)->pWrite = p; \ -+} while (0) -+ -+#define StretchBufferWriteUpdate(pSB,n) _StretchBufferWriteUpdate(pSB,(pSB)->pRead,n) -+ -+#endif /* CircBufHeader_H_ */ -+ -+ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DList.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DList.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DList.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DList.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,131 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * DList.h -+ * -+ * Description: -+ * Definition and implementation (via macros and inline functions) -+ * of double-linked list -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ *****************************************************************************/ -+ -+#ifndef DListHeader_H_ -+#define DListHeader_H_ -+ -+typedef struct _DListHeader -+ { -+ struct _DListHeader *next; /* next item in the list */ -+ struct _DListHeader *prev; /* prev item in the list */ -+ } DListHeader; -+ -+typedef struct _DListUpHeader -+ { -+ struct _DListUpHeader *next; /* next item in the list */ -+ struct _DListUpHeader *prev; /* prev item in the list */ -+ struct _DListUpHeader *head; /* head of the list */ -+ } DListUpHeader; -+ -+/* Double linked list DList management macros */ -+ -+#define DListInit(pDListHead) do { \ -+ ((DListHeader *)(pDListHead))->next = pDListHead; \ -+ ((DListHeader *)(pDListHead))->prev = pDListHead; \ -+} while (0) -+ -+#define DListNext(pDListEntry) (((DListHeader *)(pDListEntry))->next) -+#define DListPrev(pDListEntry) (((DListHeader *)(pDListEntry))->prev) -+ -+#define DListEntryLinked(pDListEntry) (NULL != DListNext(pDListEntry)) -+#define DListUnlinkEntry(pDListEntry) (DListNext(pDListEntry) = DListPrev(pDListEntry) = NULL) -+ -+#define DListFirst(pDListHead) DListNext(pDListHead) -+#define DListLast(pDListHead) DListPrev(pDListHead) -+#define DListValid(pDListHead,pEntry) ((void *)(pDListHead) != (pEntry)) -+#define DListEmpty(pDListHead) ((void *)pDListHead == ((DListHeader *)pDListHead)->next) -+ -+#define DListInsertAfter(pDListEntry,pEntry) do { \ -+ ((DListHeader *)(pEntry))->next = ((DListHeader *)(pDListEntry))->next; \ -+ ((DListHeader *)(pEntry))->prev = (DListHeader *)(pDListEntry); \ -+ ((DListHeader *)(pDListEntry))->next->prev = (DListHeader *) (pEntry); \ -+ ((DListHeader *)(pDListEntry))->next = (DListHeader *) (pEntry); \ -+} while (0) -+ -+#define DListInsertBefore(pDListEntry,pEntry) do { \ -+ ((DListHeader *)(pEntry))->next = (DListHeader *)(pDListEntry); \ -+ ((DListHeader *)(pEntry))->prev = ((DListHeader *)(pDListEntry))->prev; \ -+ ((DListHeader *)(pDListEntry))->prev->next = (DListHeader *) (pEntry); \ -+ ((DListHeader *)(pDListEntry))->prev = (DListHeader *) (pEntry); \ -+} while (0) -+ -+#define DListInsertTail(pDListHead,pEntry) DListInsertBefore(pDListHead,pEntry) -+#define DListInsertHead(pDListHead,pEntry) DListInsertAfter(pDListHead,pEntry) -+ -+#define DListRemove(pDListEntry) do { \ -+ ((DListHeader *)(pDListEntry))->prev->next = ((DListHeader *)(pDListEntry))->next; \ -+ ((DListHeader *)(pDListEntry))->next->prev = ((DListHeader *)(pDListEntry))->prev; \ -+} while (0) -+ -+ -+#define DListForEach(pDListHead,f,ref) do { \ -+ DListHeader *p = ((DListHeader *)(pDListHead))->next; \ -+ \ -+ while (DListValid(pDListHead,p)) { \ -+ DListHeader *p0 = p; \ -+ p = DListNext(p); \ -+ if ( (f)((void *)p0, ref) ) break; \ -+ } \ -+} while (0) -+ -+ -+/* Double linked list with up link DListUp management macros */ -+ -+#define DListUpInit(pDListHead) do { \ -+ ((DListUpHeader *)(pDListHead))->next = (DListUpHeader *) (pDListHead); \ -+ ((DListUpHeader *)(pDListHead))->prev = (DListUpHeader *) (pDListHead); \ -+ ((DListUpHeader *)(pDListHead))->head = (DListUpHeader *) (pDListHead); \ -+} while (0) -+ -+#define DListUpNext(pDListEntry) ((DListUpHeader *) DListNext(pDListEntry)) -+#define DListUpPrev(pDListEntry) ((DListUpHeader *) DListPrev(pDListEntry)) -+#define DListUpHead(pDListEntry) (((DListUpHeader *)(pDListEntry))->head) -+ -+#define DListUpFirst(pDListHead) DListUpNext(pDListHead) -+#define DListUpLast(pDListHead) DListUpPrev(pDListHead) -+#define DListUpValid(pEntry) (((DListUpHeader *)(pEntry))->head != (void *) pEntry) -+#define DListUpEmpty(pDListHead) DListEmpty(pDListHead) -+ -+#define DListUpInsertAfter(pDListEntry,pEntry) do { \ -+ DListInsertAfter(pDListEntry,pEntry); \ -+ ((DListUpHeader *)(pEntry))->head = ((DListUpHeader *)(pDListEntry))->head; \ -+} while (0) -+ -+#define DListUpInsertBefore(pDListEntry,pEntry) do { \ -+ DListInsertBefore(pDListEntry,pEntry); \ -+ ((DListUpHeader *)(pEntry))->head = ((DListUpHeader *)(pDListEntry))->head; \ -+} while (0) -+ -+#define DListUpInsertTail(pDListHead,pEntry) DListUpInsertBefore(pDListHead,pEntry) -+#define DListUpInsertHead(pDListHead,pEntry) DListUpInsertAfter(pDListHead,pEntry) -+ -+#define DListUpRemove(pDListEntry) DListRemove(pDListEntry) -+#define DListUpForEach(pDListHead,f,ref) DListForEach((DListHeader *)(pDListHead),f,ref) -+ -+#endif /* DListHeader_H_ */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DslFramer.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DslFramer.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DslFramer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/DslFramer.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,159 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * DslFramer.h -+ * -+ * Description: -+ * This file contains common DSL framer definitions -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.3 $ -+ * -+ * $Id: DslFramer.h,v 1.3 2004/07/21 01:39:41 ilyas Exp $ -+ * -+ * $Log: DslFramer.h,v $ -+ * Revision 1.3 2004/07/21 01:39:41 ilyas -+ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK -+ * -+ * Revision 1.2 2004/04/12 23:41:10 ilyas -+ * Added standard header for shared ADSL driver files -+ * -+ * Revision 1.1 2001/12/13 02:28:27 ilyas -+ * Added common framer (DslPacket and G997) and G997 module -+ * -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef DslFramerHeader -+#define DslFramerHeader -+ -+#include "DList.h" -+ -+#define kDslFramerInitialized 0x80000000 -+ -+/* status codes */ -+ -+#define kDslFramerRxFrame 1 -+#define kDslFramerRxFrameErr 2 -+#define kDslFramerTxFrame 3 -+#define kDslFramerTxFrameErr 4 -+ -+#define kDslFramerRxFrameErrFlushed 1 -+#define kDslFramerRxFrameErrAbort 2 -+#define kDslFramerRxFrameErrPhy 3 -+ -+#define kDslFramerTxFrameErrFlushed 1 -+ -+ -+typedef struct _dslFramerBufDesc { -+ long pkId; -+ long bufFlags; -+ void *bufPtr; -+ long bufLen; -+} dslFramerBufDesc; -+ -+/* data bufDesc flags */ -+ -+#define kDslFramerStartNewFrame 1 -+#define kDslFramerEndOfFrame 2 -+#define kDslFramerAbortFrame 4 -+ -+#define kDslFramerExtraByteShift 3 -+#define kDslFramerExtraByteMask (0x7 << kDslFramerExtraByteShift) -+ -+typedef struct _dslFramerControl { -+ bitMap setup; -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslStatusHandlerType statusHandlerPtr; -+ ulong statusCode; -+ ulong statusOffset; -+ -+ int nRxBuffers; -+ int nRxBufSize; -+ int nRxPackets; -+ -+ dslFrame *freeBufListPtr; -+ void *freeBufPool; -+ void *pBufMemory; -+ -+ dslFrame *freePacketListPtr; -+ void *freePacketPool; -+ -+ /* RX working data set */ -+ -+ dslFrame *pRxFrame; -+ dslFrameBuffer *pRxBuf; -+ uchar *pRxBufData; -+ uchar *pRxBufDataEnd; -+ int rxFrameLen; -+ -+ /* TX working data set */ -+ -+ DListHeader dlistTxWaiting; -+ dslFrame *pTxFrame; -+ dslFrameBuffer *pTxBuf; -+ uchar *pTxBufData; -+ uchar *pTxBufDataEnd; -+ -+ /* stats data */ -+ -+ ulong dslByteCntRxTotal; -+ ulong dslByteCntTxTotal; -+ -+ ulong dslFrameCntRxTotal; -+ ulong dslFrameCntRxErr; -+ ulong dslFrameCntTxTotal; -+ -+} dslFramerControl; -+ -+ -+extern Boolean DslFramerInit( -+ void *gDslVars, -+ dslFramerControl *dfCtrl, -+ bitMap setup, -+ ulong statusCode, -+ ulong statusOffset, -+ dslFrameHandlerType rxIndicateHandlerPtr, -+ dslFrameHandlerType txCompleteHandlerPtr, -+ dslStatusHandlerType statusHandlerPtr, -+ ulong rxBufNum, -+ ulong rxBufSize, -+ ulong rxPacketNum); -+extern void DslFramerClose(void *gDslVars, dslFramerControl *dfCtrl); -+extern void DslFramerSendFrame(void *gDslVars, dslFramerControl *dfCtrl, dslFrame *pFrame); -+extern void DslFramerReturnFrame(void *gDslVars, dslFramerControl *dfCtrl, dslFrame *pFrame); -+ -+ -+extern Boolean DslFramerRxGetPtr(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); -+extern void DslFramerRxDone (void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); -+extern Boolean DslFramerTxGetPtr(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); -+extern void DslFramerTxDone(void *gDslVars, dslFramerControl *dfCtrl, dslFramerBufDesc *pBufDesc); -+extern Boolean DslFramerTxIdle (void *gDslVars, dslFramerControl *dfCtrl); -+extern void DslFramerTxFlush(void *gDslVars, dslFramerControl *dfCtrl); -+ -+extern void * DslFramerGetFramePoolHandler(dslFramerControl *dfCtrl); -+extern void DslFramerClearStat(dslFramerControl *dfCtrl); -+ -+extern void DslFramerRxFlushFrame (void *gDslVars, dslFramerControl *dfCtrl, int errCode); -+extern void DslFramerRxFlush(void *gDslVars, dslFramerControl *dfCtrl); -+ -+#endif /* DslFramerHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Flatten.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Flatten.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Flatten.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Flatten.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,115 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * Flatten.h -- Header for Flatten/Unflatten command/status -+ * -+ * Copyright (c) 1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.14 $ -+ * -+ * $Id: Flatten.h,v 1.14 2004/03/04 19:48:52 linyin Exp $ -+ * -+ * $Log: Flatten.h,v $ -+ * Revision 1.14 2004/03/04 19:48:52 linyin -+ * Support adsl2plus -+ * -+ * Revision 1.13 2003/10/17 22:45:14 yongbing -+ * Increase buffer size for large B&G table of G992P3 -+ * -+ * Revision 1.12 2003/08/12 23:16:26 khp -+ * - for Haixiang: added support for ADSL_MARGIN_TWEAK_TEST -+ * -+ * Revision 1.11 2003/02/27 06:33:03 ilyas -+ * Improved free space checking in command buffer (became a problem with -+ * 2 commands SetXmtgain and StartPhy) -+ * -+ * Revision 1.10 2003/01/11 01:27:07 ilyas -+ * Improved checking for available space in status buffer -+ * -+ * Revision 1.9 2002/09/07 01:43:59 ilyas -+ * Added support for OEM parameters -+ * -+ * Revision 1.8 2002/05/16 00:01:52 khp -+ * -added missing #endif -+ * -+ * Revision 1.7 2002/05/15 00:04:48 mprahlad -+ * increase the status buffer size - prevent memory overflow for annexC cases -+ * -+ * Revision 1.6 2002/04/05 04:10:33 linyin -+ * -hack to fit in Annex C firmware in LMEM -+ * -+ * Revision 1.5 2002/04/05 02:45:25 linyin -+ * Make the buffer side larger for annexC -+ * -+ * Revision 1.4 2002/01/30 07:19:06 ilyas -+ * Moved showtime code to LMEM -+ * -+ * Revision 1.3 2001/08/29 02:56:01 ilyas -+ * Added tests for flattening/unflatenning command and statuses (dual mode) -+ * -+ * Revision 1.2 2001/04/25 00:30:54 ilyas -+ * Adjusted MaxFrameLen -+ * -+ * Revision 1.1 2001/04/24 21:41:21 ilyas -+ * Implemented status flattening/unflattaning to transfer statuses between -+ * modules asynchronously through the circular buffer -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef _Flatten_H_ -+#define _Flatten_H_ -+ -+#include "CircBuf.h" -+ -+#ifdef ADSL_MARGIN_TWEAK_TEST -+#define kMaxFlattenedCommandSize 272 /* maximum no. of bytes in flattened cmd */ -+#else -+#define kMaxFlattenedCommandSize 128 /* maximum no. of bytes in flattened cmd */ -+#endif -+#if defined(G992_ANNEXC) || defined(G992P3) -+#if defined(G992P5) -+#define kMaxFlattenedStatusSize 2200 /* maximum no. of bytes in flattened status */ -+#else -+#define kMaxFlattenedStatusSize 1100 /* maximum no. of bytes in flattened status */ -+#endif -+#else -+#define kMaxFlattenedStatusSize 550 /* maximum no. of bytes in flattened status */ -+#endif -+ -+#define kMaxFlattenFramelength (kMaxFlattenedStatusSize - (4*sizeof(long)) - 20) -+ -+extern int SM_DECL FlattenCommand (dslCommandStruct *cmd, ulong *dstPtr, ulong nAvail); -+extern int SM_DECL UnflattenCommand(ulong *srcPtr, dslCommandStruct *cmd); -+extern int SM_DECL FlattenStatus (dslStatusStruct *status, ulong *dstPtr, ulong nAvail); -+extern int SM_DECL UnflattenStatus (ulong *srcPtr, dslStatusStruct *status); -+ -+#define FlattenBufferInit(fb,fbData,bufSize,itemSize) \ -+ StretchBufferInit(fb, fbData, bufSize, itemSize) -+ -+extern int SM_DECL FlattenBufferStatusWrite(stretchBufferStruct *fBuf, dslStatusStruct *status); -+extern int SM_DECL FlattenBufferStatusRead(stretchBufferStruct *fBuf, dslStatusStruct *status); -+ -+extern int SM_DECL FlattenBufferCommandWrite(stretchBufferStruct *fBuf, dslCommandStruct *cmd); -+extern int SM_DECL FlattenBufferCommandRead(stretchBufferStruct *fBuf, dslCommandStruct *cmd); -+ -+#define FlattenBufferReadComplete(fb,nBytes) \ -+ StretchBufferReadUpdate (fb, nBytes) -+ -+#endif /* _Flatten_H_ */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.gh ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.gh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.gh 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,110 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * G992p3OvhMsg.gh -+ * -+ * Description: -+ * This is a header file which defines the type for the G992p3 overhead -+ * channel messages global variable structure. -+ * -+ * -+ * Copyright (c) 1999-2003 BroadCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.5 $ -+ * -+ * $Id: G992p3OvhMsg.gh,v 1.5 2004/09/11 03:52:25 ilyas Exp $ -+ * -+ * $Log: G992p3OvhMsg.gh,v $ -+ * Revision 1.5 2004/09/11 03:52:25 ilyas -+ * Added support for overhead message segmentation -+ * -+ * Revision 1.4 2004/07/07 01:27:20 ilyas -+ * Fixed OHC message stuck problem on L2 entry/exit -+ * -+ * Revision 1.3 2004/06/10 00:13:31 ilyas -+ * Added L2/L3 and SRA -+ * -+ * Revision 1.2 2004/04/12 23:34:52 ilyas -+ * Merged the latest ADSL driver chnages for ADSL2+ -+ * -+ * Revision 1.1 2003/07/18 19:39:18 ilyas -+ * Initial G.992.3 overhead channel message implementation (from ADSL driver) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef G992p3OvhMsgFramerGlobals -+#define G992p3OvhMsgFramerGlobals -+ -+#define kG992p3OvhMsgMaxCmdSize (16 + 16) -+#define kG992p3OvhMsgMaxRspSize (16 + 2*512) -+ -+typedef struct -+ { -+ dslFrame *segFrame; -+ dslFrameBuffer *segFrBufCur; -+ dslFrameBuffer segFrBuf; -+ ulong timeSegOut; -+ uchar tryCnt; -+ uchar segTotal; -+ uchar segId; -+ } -+ g992p3SegFrameCtlStruct; -+ -+typedef struct -+ { -+ bitMap setup; -+ dslFrameHandlerType rxReturnFramePtr; -+ dslFrameHandlerType txSendFramePtr; -+ dslCommandHandlerType cmdHandlerPtr; -+ dslStatusHandlerType statusHandlerPtr; -+ -+ dslFrame txRspFrame; -+ dslFrameBuffer txRspFrBuf; -+ dslFrameBuffer txRspFrBuf1; -+ uchar txRspBuf[kG992p3OvhMsgMaxRspSize]; -+ dslFrame txPwrRspFrame; -+ dslFrameBuffer txPwrRspFrBuf0; -+ dslFrameBuffer txPwrRspFrBuf0a; -+ dslFrameBuffer txPwrRspFrBuf1; -+ uchar txPwrRspBuf0[8]; -+ dslFrame txCmdFrame; -+ dslFrameBuffer txCmdFrBuf0; -+ dslFrameBuffer txCmdFrBuf0a; -+ dslFrameBuffer txCmdFrBuf1; -+ uchar txCmdBuf[kG992p3OvhMsgMaxCmdSize]; -+ g992p3SegFrameCtlStruct txSegFrameCtl; -+ ulong txFlags; -+ uchar txL0Rq; -+ uchar txL3Rq; -+ -+ ulong timeMs; -+ ulong timeCmdOut; -+ ulong cmdTryCnt; -+ ulong cmdNum; -+ ulong timeRspOut; -+ uchar *txPmdCmd; -+ -+ uchar rxCmdMsgNum; -+ uchar rxRspMsgNum; -+ uchar txCmdMsgNum; -+ uchar txRspMsgNum; -+ } -+ g992p3OvhMsgVarsStruct; -+ -+#endif /* G992p3OvhMsgFramerGlobals */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G992p3OvhMsg.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,64 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * G992p3OvhMsg.h -+ * -+ * Description: -+ * This file contains the exported functions and definitions for G992p3 -+ * overhead channel messages -+ * -+ * -+ * Copyright (c) 1999-2003 BroadCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.1 $ -+ * -+ * $Id: G992p3OvhMsg.h,v 1.1 2003/07/18 19:39:18 ilyas Exp $ -+ * -+ * $Log: G992p3OvhMsg.h,v $ -+ * Revision 1.1 2003/07/18 19:39:18 ilyas -+ * Initial G.992.3 overhead channel message implementation (from ADSL driver) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef G992p3OvhMsgFramerHeader -+#define G992p3OvhMsgFramerHeader -+ -+#define kG992p3OvhMsgFrameBufCnt -1 -+ -+extern Boolean G992p3OvhMsgInit( -+ void *gDslVars, -+ bitMap setup, -+ dslFrameHandlerType rxReturnFramePtr, -+ dslFrameHandlerType txSendFramePtr, -+ dslCommandHandlerType commandHandler, -+ dslStatusHandlerType statusHandler); -+ -+extern void G992p3OvhMsgReset(void *gDslVars); -+extern void G992p3OvhMsgClose(void *gDslVars); -+extern void G992p3OvhMsgTimer(void *gDslVars, long timeQ24ms); -+extern Boolean G992p3OvhMsgCommandHandler (void *gDslVars, dslCommandStruct *cmd); -+extern void G992p3OvhMsgStatusSnooper (void *gDslVars, dslStatusStruct *status); -+ -+extern int G992p3OvhMsgSendCompleteFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); -+extern int G992p3OvhMsgIndicateRcvFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); -+ -+extern void G992p3OvhMsgSetL3(void *gDslVars); -+extern void G992p3OvhMsgSetL0(void *gDslVars); -+ -+#endif /* G992p3OvhMsgFramerHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.gh ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.gh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.gh 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,66 @@ -+/**************************************************************************** -+ * -+ * G997.gh -+ * -+ * Description: -+ * This is a header file which defines the type for the G997 Framer -+ * global variable structure. -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.5 $ -+ * -+ * $Id: G997.gh,v 1.5 2004/07/21 01:39:41 ilyas Exp $ -+ * -+ * $Log: G997.gh,v $ -+ * Revision 1.5 2004/07/21 01:39:41 ilyas -+ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK -+ * -+ * Revision 1.4 2004/04/27 00:27:16 ilyas -+ * Implemented double buffering to ensure G.997 HDLC frame is continuous -+ * -+ * Revision 1.3 2003/07/18 18:56:59 ilyas -+ * Added support for shared TX buffer (for ADSL driver) -+ * -+ * Revision 1.2 2002/01/11 06:48:27 ilyas -+ * Added command handler pointer -+ * -+ * Revision 1.1 2001/12/13 02:28:27 ilyas -+ * Added common framer (DslPacket and G997) and G997 module -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef G997FramerGlobals -+#define G997FramerGlobals -+ -+#include "DslFramer.h" -+#include "HdlcFramer.h" -+ -+#define kG997MsgBufSize 64 -+ -+typedef struct -+ { -+ bitMap setup; -+ dslFramerControl dslFramer; -+ hdlcByteControl hdlcByte; -+ dslCommandHandlerType commandHandler; -+ -+ ulong timeMs; -+ ulong timeCmdOut; -+ -+ uchar rxMsgNum; -+ uchar txMsgNum; -+ Boolean txIdle; -+ uchar txMsgBuf[kG997MsgBufSize]; -+ ulong txMsgBufLen; -+ uchar *txMsgBufPtr; -+ ulong txMsgLen; -+ ulong txMsgBufs; -+ ulong txMsgBufNum; -+ } -+ g997VarsStruct; -+ -+#endif /* G997FramerGlobals */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/G997.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,68 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * G997.h -+ * -+ * Description: -+ * This file contains the exported functions and definitions for G97Framer -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.3 $ -+ * -+ * $Id: G997.h,v 1.3 2003/07/18 18:56:59 ilyas Exp $ -+ * -+ * $Log: G997.h,v $ -+ * Revision 1.3 2003/07/18 18:56:59 ilyas -+ * Added support for shared TX buffer (for ADSL driver) -+ * -+ * Revision 1.2 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.1 2001/12/13 02:28:27 ilyas -+ * Added common framer (DslPacket and G997) and G997 module -+ * -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef G997FramerHeader -+#define G997FramerHeader -+ -+extern Boolean G997Init( -+ void *gDslVars, -+ bitMap setup, -+ ulong rxBufNum, -+ ulong rxBufSize, -+ ulong rxPacketNum, -+ upperLayerFunctions *pUpperLayerFunctions, -+ dslCommandHandlerType g997PhyCommandHandler); -+ -+extern void G997Close(void *gDslVars); -+extern void G997Timer(void *gDslVars, long timeQ24ms); -+extern Boolean G997CommandHandler (void *gDslVars, dslCommandStruct *cmd); -+extern void G997StatusSnooper (void *gDslVars, dslStatusStruct *status); -+ -+extern int G997SendFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); -+extern int G997ReturnFrame(void *gDslVars, void *pVc, ulong mid, dslFrame *pFrame); -+ -+extern Boolean G997SetTxBuffer(void *gDslVars, ulong len, void *bufPtr); -+extern void * G997GetFramePoolHandler(void *gDslVars); -+ -+#endif /* G997FramerHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/HdlcFramer.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/HdlcFramer.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/HdlcFramer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/HdlcFramer.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,237 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * HdlcFramer.h -+ * -+ * Description: -+ * This file contains common HDLC definitions for bit/byte stuffing -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.3 $ -+ * -+ * $Id: HdlcFramer.h,v 1.3 2004/07/21 01:39:41 ilyas Exp $ -+ * -+ * $Log: HdlcFramer.h,v $ -+ * Revision 1.3 2004/07/21 01:39:41 ilyas -+ * Reset entire G.997 state on retrain. Timeout in G.997 if no ACK -+ * -+ * Revision 1.2 2003/07/18 18:51:05 ilyas -+ * Added mode (default) to pass address and control field -+ * -+ * Revision 1.1 2001/12/13 02:28:27 ilyas -+ * Added common framer (DslPacket and G997) and G997 module -+ * -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef HdlcFramerHeader -+#define HdlcFramerHeader -+ -+/* setup bitmap definitions */ -+ -+#define kHdlcSetupShift 16 -+#define kHdlcSetupMask ((long)0xFFFF << kHdlcSetupShift) -+ -+#define kHdlcCrcMask 0x00030000 -+#define kHdlcCrcNone 0x00000000 -+#define kHdlcCrc16 0x00010000 -+#define kHdlcCrc32 0x00020000 -+ -+#define kHdlcTxIdleStop 0x00040000 -+#define kHdlcSpecialAddrCtrl 0x00080000 -+ -+extern ushort HdlcCrc16Table[]; -+ -+#define HDLC16_CRC_INIT 0xFFFF -+#define HDLC16_CRC_FINAL(crc) ((crc) ^ 0xFFFF) -+#define HDLC16_GOOD_CRC 0xF0B8 -+#define Hdlc16UpdateCrc(crc,b) ((crc) >> 8) ^ HdlcCrc16Table[((crc) ^ (b)) & 0xFF] -+ -+extern ulong HdlcCrc32Table[]; -+ -+#define HDLC32_CRC_INIT 0xFFFFFFFF -+#define HDLC32_CRC_FINAL(crc) ((crc) ^ 0xFFFFFFFF) -+#define HDLC32_GOOD_CRC 0xDEBB20E3 -+#define Hdlc32UpdateCrc(crc,b) ((crc) >> 8) ^ HdlcCrc32Table[((crc) ^ (b)) & 0xFF] -+ -+extern ulong HdlcCrc32Table[]; -+ -+/* HDLC common fields */ -+ -+#define HDLC_ADDR 0xFF -+#define HDLC_CTRL 0x3 -+ -+#define HDLC_BYTE_FLAG 0x7E -+#define HDLC_BYTE_ESC 0x7D -+ -+/* HDLC frame assembly states */ -+ -+#define HDLC_STATE_START_FLAG 0 -+#define HDLC_STATE_ADDRESS (HDLC_STATE_START_FLAG + 1) -+#define HDLC_STATE_CONTROL (HDLC_STATE_START_FLAG + 2) -+#define HDLC_STATE_DATA (HDLC_STATE_START_FLAG + 3) -+#define HDLC_STATE_FCS1 (HDLC_STATE_START_FLAG + 4) -+#define HDLC_STATE_FCS2 (HDLC_STATE_START_FLAG + 5) -+#define HDLC_STATE_END_FLAG (HDLC_STATE_START_FLAG + 6) -+ -+ -+/* HDLC common types */ -+ -+typedef struct _hdlcByteControl { -+ bitMap setup; -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; -+ dslFramerDataDoneHandlerType rxDataDoneHandler; -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; -+ dslFramerDataDoneHandlerType txDataDoneHandler; -+ -+ /* RX working data set */ -+ -+ uchar rxFrameState; -+ int rxFrameLen; -+ ulong rxCrc; -+ Boolean rxEscChar; -+ -+ uchar *pRxData; -+ uchar *pRxDataEnd; -+ long rxDataLen; -+ -+ /* TX working data set */ -+ -+ uchar txFrameState; -+ int txFrameLen; -+ ulong txCrc; -+ int txCharPending; -+ -+ uchar *pTxData; -+ uchar *pTxDataEnd; -+ long txDataLen; -+} hdlcByteControl; -+ -+typedef struct _hdlcBitControl { -+ bitMap setup; -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; -+ dslFramerDataDoneHandlerType rxDataDoneHandler; -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; -+ dslFramerDataDoneHandlerType txDataDoneHandler; -+ -+ /* RX working data set */ -+ -+ uchar rxFrameState; -+ int rxFrameLen; -+ ulong rxCrc; -+ int rxNibblePending; -+ int rxOutVal; -+ uchar rxOutBits; -+ uchar rxRem1Bits; -+ Boolean rxEscChar; /* ???? */ -+ -+ uchar *pRxData; -+ uchar *pRxDataEnd; -+ long rxDataLen; -+ -+ /* TX working data set */ -+ -+ uchar txFrameState; -+ int txFrameLen; -+ ulong txCrc; -+ int txOutVal; -+ uchar txOutBits; -+ uchar txLast1Bits; -+ int txCharPending; /* ???? */ -+ -+ uchar *pTxData; -+ uchar *pTxDataEnd; -+ long txDataLen; -+} hdlcBitControl; -+ -+/* HDLC common functions */ -+ -+#define HdlcFramerTxFrameInit(ctrl) do { \ -+ ctrl->txFrameState = HDLC_STATE_START_FLAG; \ -+ ctrl->txFrameLen = 0; \ -+ ctrl->txCrc = HDLC16_CRC_INIT; \ -+ ctrl->txCharPending= -1; \ -+} while (0) -+ -+#define HdlcFramerRxFrameInit(ctrl) do { \ -+ ctrl->rxFrameState = HDLC_STATE_START_FLAG; \ -+ ctrl->rxFrameLen = 0; \ -+ ctrl->rxCrc = HDLC16_CRC_INIT; \ -+ ctrl->rxEscChar = false; \ -+} while (0) -+ -+#define HdlcFramerTxGetData(ctrl) do { \ -+ dslFramerBufDesc bufDesc; \ -+ \ -+ if ((ctrl->txDataGetPtrHandler) (gDslVars, &bufDesc)) { \ -+ ctrl->pTxData = bufDesc.bufPtr; \ -+ ctrl->pTxDataEnd = (uchar*)bufDesc.bufPtr + bufDesc.bufLen; \ -+ ctrl->txDataLen = bufDesc.bufLen; \ -+ if (bufDesc.bufFlags & kDslFramerStartNewFrame) \ -+ HdlcFramerTxFrameInit(ctrl); \ -+ } \ -+ else { \ -+ HdlcFramerTxFrameInit(ctrl); \ -+ } \ -+} while (0); -+ -+#define HdlcFramerRxGetData(ctrl, frFlag) do { \ -+ dslFramerBufDesc bufDesc; \ -+ \ -+ bufDesc.bufFlags = frFlag; \ -+ if ((ctrl->rxDataGetPtrHandler) (gDslVars, &bufDesc)) { \ -+ ctrl->pRxData = bufDesc.bufPtr; \ -+ ctrl->pRxDataEnd = (uchar*)bufDesc.bufPtr + bufDesc.bufLen; \ -+ ctrl->rxDataLen = bufDesc.bufLen; \ -+ } \ -+} while (0); -+ -+/* HDLC functions headers */ -+ -+extern Boolean HdlcByteInit( -+ void *gDslVars, -+ hdlcByteControl *hbyCtrl, -+ bitMap setup, -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler, -+ dslFramerDataDoneHandlerType rxDataDoneHandler, -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler, -+ dslFramerDataDoneHandlerType txDataDoneHandler); -+ -+extern void HdlcByteReset(void *gDslVars, hdlcByteControl *hbyCtrl); -+extern void HdlcByteRxFlush(void *gDslVars, hdlcByteControl *hbyCtrl); -+extern int HdlcByteRx(void *gDslVars, hdlcByteControl *hbyCtrl, int nBytes, uchar *srcPtr) FAST_TEXT; -+extern int HdlcByteTx(void *gDslVars, hdlcByteControl *hbyCtrl, int nBytes, uchar *dstPtr) FAST_TEXT; -+extern Boolean HdlcByteTxIdle(void *gDslVars, hdlcByteControl *hbyCtrl); -+ -+extern Boolean HdlcBitInit( -+ void *gDslVars, -+ hdlcBitControl *hbiCtrl, -+ bitMap setup, -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler, -+ dslFramerDataDoneHandlerType rxDataDoneHandler, -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler, -+ dslFramerDataDoneHandlerType txDataDoneHandler); -+ -+extern void HdlcBitReset(void *gDslVars, hdlcByteControl *hbiCtrl); -+extern int HdlcBitRx(void *gDslVars, hdlcBitControl *hbiCtrl, int nBytes, uchar *srcPtr) FAST_TEXT; -+extern int HdlcBitTx(void *gDslVars, hdlcBitControl *hbiCtrl, int nBytes, uchar *dstPtr) FAST_TEXT; -+ -+#endif /* HdlcFramerHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MathUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MathUtil.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MathUtil.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MathUtil.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,135 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/************************************************************************ -+ * -+ * MathUtil.h: -+ * -+ * Description: -+ * This file contains the exported interface for MathUtil.c module. -+ * -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.6 $ -+ * -+ * $Id: MathUtil.h,v 1.6 2004/04/13 00:21:13 ilyas Exp $ -+ * -+ * $Log: MathUtil.h,v $ -+ * Revision 1.6 2004/04/13 00:21:13 ilyas -+ * Added standard header for shared ADSL driver files -+ * -+ * Revision 1.5 2001/08/16 02:18:08 khp -+ * - mark functions with FAST_TEXT to reduce cycle counts for QPROC targets -+ * (replaces use of LMEM_INSN) -+ * -+ * Revision 1.4 1999/10/06 04:55:22 liang -+ * Added function to multiply two long values to save result as VeryLong. -+ * -+ * Revision 1.3 1999/08/05 19:42:52 liang -+ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. -+ * -+ * Revision 1.2 1999/03/26 03:29:59 liang -+ * Export CosSin table. -+ * -+ * Revision 1.1 1998/10/28 01:28:07 liang -+ * *** empty log message *** -+ * -+ * Revision 1.12 1998/02/10 17:19:49 scott -+ * Changed MathVL routines to return arguments using pointers -+ * -+ * Revision 1.11 1997/12/13 06:12:07 mwg -+ * Added more Atan2 flavors -+ * -+ * Revision 1.10 1997/11/18 01:11:48 mwg -+ * Removed <CR> symbols which accidently slipped in. -+ * -+ * Revision 1.9 1997/11/03 19:07:52 scott -+ * No longer redefine max() and min() if already defined -+ * -+ * Revision 1.8 1997/07/30 01:35:20 liang -+ * Add more accurate atan2 function UtilLongLongAtan2. -+ * -+ * Revision 1.7 1997/07/21 20:23:19 mwg -+ * Added new function: UtilBlockCos() -+ * -+ * Revision 1.6 1997/03/21 23:50:10 liang -+ * Added initial version of V8bis module to CVS tree. -+ * -+ * Revision 1.5 1997/03/19 18:35:34 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.4 1997/01/21 00:36:15 mwg -+ * Added new function: UtilBlockCosSin() -+ * -+ * Revision 1.3 1996/06/18 21:14:45 mwg -+ * Modified VLDivVL by allowing to specify the result scaling. -+ * -+ * Revision 1.2 1996/06/12 02:31:59 mwg -+ * Added 64bit arithmetic functions. -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:15 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.4 1995/12/04 23:08:15 liang -+ * Add file Math/LinearToLog.c. -+ * -+ ************************************************************************/ -+#ifndef MathUtilPh -+#define MathUtilPh -+ -+/* Exported tables */ -+extern const short UtilCosTable[]; -+ -+/* Exported functions */ -+extern ComplexShort UtilCosSin(ushort angle); -+extern long UtilBlockCosSin (int nValues, long angle, long delta, ComplexShort *dstPtr); -+extern long UtilBlockCos (int nValues, long angle, long delta, short *dstPtr); -+extern ushort UtilShortShortAtan2(ComplexShort point); -+extern ushort UtilLongShortAtan2(ComplexLong point); -+extern ulong UtilShortLongAtan2(ComplexShort point) FAST_TEXT; -+extern ulong UtilLongLongAtan2(ComplexLong point) FAST_TEXT; -+extern ushort UtilSqrt(ulong y); -+extern ushort UtilMaxMagnitude(int blkSize, ComplexShort *dataPtr); -+extern short UtilQ0LinearToQ4dB (ulong x); -+extern ulong UtilQ4dBToQ12Linear (short x); -+extern void UtilAdjustComplexMagnitude(ComplexShort *srcPtr, short mag, short adjustment); -+ -+extern void VLMultLongByLong(long x, long y, VeryLong *dst); -+extern void VLMultShort (VeryLong x, short y, VeryLong *dst); -+extern void VLAddVL (VeryLong x, VeryLong y, VeryLong *dst); -+extern void VLAddLong (VeryLong x, long y, VeryLong *dst); -+extern void VLSubVL (VeryLong x, VeryLong y, VeryLong *dst); -+extern void VLSubLong (VeryLong x, long y, VeryLong *dst); -+extern void VLDivVL (VeryLong x, VeryLong y, int scale, long *dst); -+extern void VLShiftLeft(VeryLong x, int shift, VeryLong *dst); -+extern void VLShiftRight(VeryLong x, int shift, VeryLong *dst); -+ -+ -+#define UtilAtan2 UtilShortShortAtan2 -+#define UtilLongAtan2 UtilLongShortAtan2 -+ -+/* Standard Macros */ -+#undef abs -+#define abs(x) ((x) >= 0 ? (x) : -(x)) -+ -+#undef max -+#define max(x, y) ((x) >= (y) ? (x) : (y)) -+ -+#undef min -+#define min(x, y) ((x) <= (y) ? (x) : (y)) -+ -+#endif /* MathUtilPh */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MipsAsm.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MipsAsm.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MipsAsm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MipsAsm.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,264 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/************************************************************************ -+ * -+ * MipsAsm.h: -+ * -+ * Description: -+ * This file contains definitions specific to MIPS assembly -+ * -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.5 $ -+ * -+ * $Id: MipsAsm.h,v 1.5 2004/04/13 00:16:59 ilyas Exp $ -+ * -+ * $Log: MipsAsm.h,v $ -+ * Revision 1.5 2004/04/13 00:16:59 ilyas -+ * Merged the latest ADSL driver changes -+ * -+ * Revision 1.4 2002/09/12 04:08:50 ilyas -+ * Added macros for BCM MIPS specific instructions -+ * -+ * Revision 1.3 2000/11/18 21:28:19 mprahlad -+ * ifdef bcm47xx - -+ * define MSUB(src1,src2) msub src1, src2 -+ * change Mult(dst, src1, src2) to use "mul" instead of "mult; mflo" -+ * define Mul(src1, src2) mult src1, src2 -+ * -+ * Revision 1.2 2000/07/28 21:05:05 mprahlad -+ * Macros specific to bcm47xx added. -+ * -+ * Revision 1.1 1999/08/05 19:52:57 liang -+ * Copied from the softmodem top of the tree on 08/04/99. -+ * -+ * Revision 1.5 1999/04/02 23:16:21 mwg -+ * Fixed a minor comatibility issue with mult -+ * -+ * Revision 1.4 1999/02/03 20:25:43 mwg -+ * Added an option for R4010 -+ * -+ * Revision 1.3 1998/10/30 02:21:34 mwg -+ * Added targets for 4640 -+ * -+ * Revision 1.2 1998/10/16 18:52:09 ilyas -+ * Added ASM_PROLOG[5-7] macros to save on stores -+ * -+ * Revision 1.1 1998/06/03 23:28:39 mwg -+ * Renamed from DinoDefs.h -+ * -+ * Revision 1.6 1998/02/09 18:23:11 scott -+ * Added EMBEDDED_CALLING_CONVENTION (GreenHill) and R3900/R4102 -+ * -+ * Revision 1.5 1997/03/19 18:35:02 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.4 1996/10/02 20:28:41 liang -+ * Remove parameter "acc" from the non-DINO version of MAD. -+ * -+ * Revision 1.3 1996/10/02 19:44:36 liang -+ * Separated MultAdd into MAD and MADW, added NO_DINO_WRITEBACK option. -+ * -+ * Revision 1.2 1996/08/14 03:06:07 liang -+ * Modified macro MultAdd so that the assembly code build works. -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.5 1994/11/04 22:41:29 mwg -+ * Added #ifdefs for different targets. -+ * -+ ************************************************************************/ -+ -+#ifndef _MIPS_ASM_H_ -+#define _MIPS_ASM_H_ -+ -+#define zero $0 -+#define v0 $2 -+#define v1 $3 -+#define a0 $4 -+#define a1 $5 -+#define a2 $6 -+#define a3 $7 -+#define t0 $8 -+#define t1 $9 -+#define t2 $10 -+#define t3 $11 -+#define t4 $12 -+#define t5 $13 -+#define t6 $14 -+#define t7 $15 -+#define s0 $16 -+#define s1 $17 -+#define s2 $18 -+#define s3 $19 -+#define s4 $20 -+#define s5 $21 -+#define s6 $22 -+#define s7 $23 -+#define t8 $24 -+#define t9 $25 -+#define k0 $26 -+#define k1 $27 -+#define gp $28 -+#define sp $29 -+#define fp $30 -+#define s8 $30 -+#define ra $31 -+ -+#ifdef EMBEDDED_CALLING_CONVENTION -+ -+/* Support for GreenHills embedded calling convention */ -+ -+#define ASM_PROLOG subu sp, 32; \ -+ sw $8, 16(sp); \ -+ sw $9, 20(sp); \ -+ sw $10, 24(sp); \ -+ sw $11, 28(sp); -+ -+#define ASM_PROLOG5 subu sp, 32; \ -+ sw $8, 16(sp); -+ -+#define ASM_PROLOG6 subu sp, 32; \ -+ sw $8, 16(sp); \ -+ sw $9, 20(sp); -+ -+#define ASM_PROLOG7 subu sp, 32; \ -+ sw $8, 16(sp); \ -+ sw $9, 20(sp); \ -+ sw $10, 24(sp); -+ -+#define ASM_EPILOG addu sp, 32 -+ -+#else -+#define ASM_PROLOG -+#define ASM_PROLOG5 -+#define ASM_PROLOG6 -+#define ASM_PROLOG7 -+#define ASM_EPILOG -+#endif -+ -+#ifdef DINO /* Special DSP extensions to MIPS core */ -+ -+#ifndef NO_DINO_WRITEBACK /* DSP extensions with writeback register */ -+ -+#define MAD(src1, src2) .set noreorder ; mad $0, src1, src2 ; .set reorder -+#define MADW(acc, src1, src2) .set noreorder ; mad acc, src1, src2 ; .set reorder -+#define Mult(dst, src1, src2) .set noreorder ; mult dst, src1, src2 ; .set reorder -+#define MultU(dst, src1, src2) .set noreorder ; multu dst, src1, src2 ; .set reorder -+ -+#else /* NO_DINO_WRITEBACK */ -+ -+#define MAD(src1, src2) .set noreorder ; mad $0, src1, src2 ; .set reorder -+#define MADW(acc, src1, src2) .set noreorder ; mad $0, src1, src2 ; mflo acc ; .set reorder -+#define Mult(dst, src1, src2) multu src1, src2 ; mflo dst -+#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst -+ -+#endif /* NO_DINO_WRITEBACK */ -+ -+#else /* DINO */ -+ -+#if defined(R3900) -+ -+#define MAD(src1, src2) madd $0, src1, src2 -+#define MADW(acc, src1, src2) madd acc, src1, src2 -+#define Mult(dst, src1, src2) mult dst, src1, src2 -+#define MultU(dst, src1, src2) multu dst, src1, src2 -+ -+#elif defined(bcm47xx_INSTR_MACROS) && defined(bcm47xx) -+ -+#define mips_froo(s1,s2,s3) s1##s2##s3 -+#define MSUB(s1,s2) .set noreorder ; mips_froo(msub_,s1,s2) ; .set reorder -+#define MAD(s1,s2) .set noreorder ; mips_froo(mad_,s1,s2) ; .set reorder -+#define MADW(acc, s1,s2) .set noreorder ; mips_froo(mad_,s1,s2) ; mflo acc ; .set reorder -+ -+#include "BCM4710.h" -+ -+#define Mult(dst, src1, src2) mul dst, src1, src2 -+#define Mul( src1, src2) mult src1, src2 ; -+#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst -+ -+#elif defined(bcm47xx) -+#define MSUB(src1, src2) msub src1, src2 -+#define MAD(src1, src2) madd src1, src2 -+#define MADW(acc, src1, src2) .set noreorder ; madd src1, src2; mflo acc ; .set reorder -+/* -+#define Mult(dst, src1, src2) mult src1, src2 ; mflo dst -+*/ -+#define Mult(dst, src1, src2) mul dst , src1, src2 ; -+#define Mul( src1, src2) mult src1, src2 ; -+#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst -+ -+#else -+ -+#ifdef R4102 -+#define MAD(src1, src2) madd16 src1, src2 -+#define MADW(acc, src1, src2) madd16 src1, src2 ; mflo acc -+#else /* R4102 */ -+ -+#ifdef R4640 -+ -+#define MAD(src1, src2) madd $0, src1, src2 -+#define MADW(acc, src1, src2) madd src1, src2; mflo acc -+ -+#else /* R4640 */ -+ -+#ifdef R4010 -+ -+#define MAD(src1, src2) madd src1, src2 -+#define MADW(acc, src1, src2) madd src1, src2; mflo acc -+ -+#else -+#define MAD(src1, src2) .set noat ;\ -+ mflo $at ;\ -+ sw $2, -4(sp) ;\ -+ multu src1, src2 ;\ -+ mflo $2 ;\ -+ addu $at, $2, $at ;\ -+ lw $2, -4(sp) ;\ -+ mtlo $at ;\ -+ .set at -+ -+#define MADW(acc, src1, src2) .set noat ;\ -+ mflo $at ;\ -+ sw $2, -4(sp) ;\ -+ multu src1, src2 ;\ -+ mflo $2 ;\ -+ addu $at, $2, $at ;\ -+ lw $2, -4(sp) ;\ -+ move acc, $at ;\ -+ mtlo $at ;\ -+ .set at -+#endif /* R4010 */ -+#endif /* R4102 */ -+#endif /* R4640 */ -+ -+#define Mult(dst, src1, src2) mul dst, src1, src2 -+#define MultU(dst, src1, src2) multu src1, src2 ; mflo dst -+ -+#endif /* !3900 */ -+#endif /* DINO */ -+ -+ -+ -+ -+ -+ -+ -+ -+#endif /* _MIPS_ASM_H_ */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MiscUtil.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MiscUtil.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MiscUtil.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/MiscUtil.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,65 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * MiscUtil.h -- Miscellaneous utilities -+ * -+ * Description: -+ * -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg Haixiang Liang -+ * -+ * $Revision: 1.4 $ -+ * -+ * $Id: MiscUtil.h,v 1.4 2004/04/13 00:21:46 ilyas Exp $ -+ * -+ * $Log: MiscUtil.h,v $ -+ * Revision 1.4 2004/04/13 00:21:46 ilyas -+ * Added standard header for shared ADSL driver files -+ * -+ * Revision 1.3 2001/07/21 01:21:06 ilyas -+ * Added more functions for int to string conversion used by log file -+ * -+ * Revision 1.2 1999/08/05 19:42:56 liang -+ * Merged with the softmodem top of the tree on 08/04/99 for assembly files. -+ * -+ * Revision 1.1 1999/01/27 22:10:12 liang -+ * Initial version. -+ * -+ * Revision 1.1 1997/07/10 01:18:45 mwg -+ * Initial revision. -+ * -+ * -+ * -+ *****************************************************************************/ -+#ifndef _MISC_UTIL_H_ -+#define _MISC_UTIL_H_ -+ -+extern long SM_DECL GetRateValue(dataRateMap rate); -+extern int SM_DECL DecToString(ulong value, uchar *dstPtr, uint nDigits); -+extern int SM_DECL HexToString(ulong value, uchar *dstPtr, uint nDigits); -+extern char * SM_DECL DecToStr(char *s, ulong num); -+extern char * SM_DECL SignedToStr(char *s, long num); -+extern char * SM_DECL HexToStr(char *s, ulong num); -+ -+#define EvenParityBit(x) ((z = (y = x ^ (x >> 4)) ^ (y >> 2)) ^ (z >> 1)) -+#define OddParityBit(x) (EvenParityBit(x) ^ 1) -+ -+extern void ParityApply(int nBytes, int nDataBits, int parity, uchar *srcPtr, uchar *dstPtr); -+extern void ParityStrip(int nBytes, int nDataBits, int parity, uchar *srcPtr, uchar *dstPtr, statusHandlerType statusHandler); -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Que.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Que.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Que.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/Que.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,106 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * Que.h -+ * -+ * Description: -+ * Definition and implementation (via macros and inline functions) -+ * of a simple queue -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ *****************************************************************************/ -+ -+#ifndef QueHeader_H_ -+#define QueHeader_H_ -+ -+typedef void * _QueItem; -+ -+typedef struct _QueHeader -+ { -+ _QueItem *head; /* first item in the queue */ -+ _QueItem *tail; /* last item in the queue */ -+ } QueHeader; -+ -+/* Queue management macros */ -+ -+#define QueInit(pqHdr) (((QueHeader *)(pqHdr))->head = ((QueHeader *)(pqHdr))->tail = NULL) -+#define QueEmpty(pqHdr) (NULL == ((QueHeader *)(pqHdr))->head) -+ -+#define QueFirst(pqHdr) ((QueHeader *)(pqHdr))->head -+#define QueLast(pqHdr) ((QueHeader *)(pqHdr))->tail -+#define QueNext(pqItem) (*((void **)(pqItem))) -+ -+ -+#define QueRemoveFirst(pqHdr) do { \ -+ if (!QueEmpty(pqHdr)) { \ -+ ((QueHeader *)(pqHdr))->head = *((QueHeader *)(pqHdr))->head; \ -+ if (QueEmpty(pqHdr)) \ -+ ((QueHeader *)(pqHdr))->tail = NULL; \ -+ } \ -+} while (0) -+#define QueRemove(pqHdr) QueRemoveFirst(pqHdr) -+ -+ -+#define QueAddLast(pqHdr,pqItem) do { \ -+ QueNext(pqItem) = NULL; \ -+ if (NULL != ((QueHeader *)(pqHdr))->tail) \ -+ *((QueHeader *)(pqHdr))->tail = (pqItem); \ -+ else \ -+ ((QueHeader *)(pqHdr))->head = (_QueItem *)(pqItem); \ -+ ((QueHeader *)(pqHdr))->tail = (_QueItem *)(pqItem); \ -+} while (0) -+#define QueAdd(pqHdr,pItem) QueAddLast(pqHdr,pItem) -+ -+#define QueAddFirst(pqHdr,pqItem) do { \ -+ if (NULL == ((QueHeader *)(pqHdr))->tail) \ -+ ((QueHeader *)(pqHdr))->tail = (_QueItem *)(pqItem); \ -+ QueNext(pqItem) = ((QueHeader *)(pqHdr))->head; \ -+ ((QueHeader *)(pqHdr))->head = (_QueItem *)(pqItem); \ -+} while (0) -+ -+ -+#define QueGet(pqHdr) \ -+ (void *) QueFirst(pqHdr); \ -+ QueRemove(pqHdr); -+ -+#define QueMerge(pqHdr1,pqHdr2) do { \ -+ if (NULL == ((QueHeader *)(pqHdr1))->tail) \ -+ ((QueHeader *)(pqHdr1))->head = ((QueHeader *)(pqHdr2))->head; \ -+ else \ -+ QueNext(((QueHeader *)(pqHdr1))->tail) = ((QueHeader *)(pqHdr2))->head; \ -+ if (NULL != ((QueHeader *)(pqHdr2))->tail) \ -+ ((QueHeader *)(pqHdr1))->tail = ((QueHeader *)(pqHdr2))->tail; \ -+} while (0) -+ -+#define QueCopy(pqHdr1,pqHdr2) do { \ -+ ((QueHeader *)(pqHdr1))->head = ((QueHeader *)(pqHdr2))->head; \ -+ ((QueHeader *)(pqHdr1))->tail = ((QueHeader *)(pqHdr2))->tail; \ -+} while (0) -+ -+#define QueForEach(pqHdr,f,ref) do { \ -+ _QueItem *p = ((QueHeader *)(pqHdr))->head; \ -+ \ -+ while (NULL != p) { \ -+ if ( (f)((void *)p, ref) ) break; \ -+ p = QueNext(p); \ -+ } \ -+} while (0) -+ -+#endif /* QueHeader_H_ */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftAtmVc.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftAtmVc.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftAtmVc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftAtmVc.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,569 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * SoftAtmVc.h -+ * -+ * Description: -+ * This file contains ATM VC definitions -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.27 $ -+ * -+ * $Id: SoftAtmVc.h,v 1.27 2004/06/02 22:26:17 ilyas Exp $ -+ * -+ * $Log: SoftAtmVc.h,v $ -+ * Revision 1.27 2004/06/02 22:26:17 ilyas -+ * Added ATM counters for G.992.3 -+ * -+ * Revision 1.26 2004/03/10 22:57:20 ilyas -+ * Added I.432 scramling control -+ * -+ * Revision 1.25 2003/09/23 00:21:59 ilyas -+ * Added status to indicate ATM header compression -+ * -+ * Revision 1.24 2003/08/27 02:00:50 ilyas -+ * Original implementation of ATM header compression -+ * -+ * Revision 1.23 2003/02/25 04:13:15 ilyas -+ * Added standard Broadcom header -+ * -+ * Revision 1.22 2003/01/10 23:25:48 ilyas -+ * Added ATM status definition -+ * -+ * Revision 1.21 2002/09/12 21:07:19 ilyas -+ * Added HEC, OCD and LCD counters -+ * -+ * Revision 1.20 2002/04/02 09:58:00 ilyas -+ * Initial implementatoin of BERT -+ * -+ * Revision 1.19 2001/10/09 22:35:14 ilyas -+ * Added more ATM statistics and OAM support -+ * -+ * Revision 1.18 2001/06/18 19:49:36 ilyas -+ * Changes to include support for HOST_ONLY mode -+ * -+ * Revision 1.17 2001/02/23 05:49:57 ilyas -+ * Added routed 1483 encapsulation -+ * -+ * Revision 1.16 2001/02/09 04:18:18 ilyas -+ * Added framer for bridged ethernet PDUs -+ * -+ * Revision 1.15 2001/02/09 01:55:27 ilyas -+ * Added status codes and macros to support printing of AAL packets -+ * -+ * Revision 1.14 2000/09/21 17:28:35 ilyas -+ * Added VBR support to traffic management code, separated UBR to a different -+ * Tx list, changed some of the algorithms -+ * -+ * Revision 1.13 2000/08/23 18:42:13 ilyas -+ * Added AAL2, added VcConfigure functions, moved commonly used look-up -+ * tables for CRC calculation to AtmLayer -+ * -+ * Revision 1.12 2000/08/02 03:06:22 ilyas -+ * Added support for reserving space in RX packets for ATm protocols -+ * -+ * Revision 1.11 2000/07/28 17:23:39 ilyas -+ * Added ATM connect/disconnect statuses -+ * -+ * Revision 1.10 2000/07/25 02:16:12 ilyas -+ * Added EClip (with Eth to ATM ARP translation) implementation -+ * -+ * Revision 1.9 2000/07/23 20:57:14 ilyas -+ * Added ATM framer and protocol layers -+ * -+ * Revision 1.8 2000/07/17 21:08:16 lkaplan -+ * removed global pointer -+ * -+ * Revision 1.7 2000/06/09 18:33:04 liang -+ * Fixed Irix compiler warnings. -+ * -+ * Revision 1.6 2000/05/18 21:47:31 ilyas -+ * Added detection of preassigned cells such as OAM F4, F5 -+ * -+ * Revision 1.5 2000/05/14 01:50:11 ilyas -+ * Added more statuses to ATM code -+ * -+ * Revision 1.4 2000/05/10 02:41:28 liang -+ * Added status report for no cell memory -+ * -+ * Revision 1.3 2000/05/09 23:00:27 ilyas -+ * Added ATM status messages, ATM timer, Tx frames flush on timeout -+ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames -+ * -+ * Revision 1.2 2000/05/03 03:53:00 ilyas -+ * Added support for pVc to vcID translation needed for LOG file and other -+ * definitions for ATM data in LOG file -+ * -+ * Revision 1.1 2000/04/19 00:21:35 ilyas -+ * Fixed some problems and added Out Of Band (OOB) support to ATM packets -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef SoftAtmVcHeader -+#define SoftAtmVcHeader -+ -+/* -+** -+** ATM UNI types -+** -+*/ -+ -+#define AtmLinkFlags(bMap,name) (((bMap) >> name##Shift) & name##Mask) -+ -+/* ATM service category types */ -+ -+#define kAtmSrvcCBR 1 /* Constant Bit Rate */ -+#define kAtmSrvcVBR 2 /* Variable Bit Rate */ -+#define kAtmSrvcUBR 4 /* Unspecified Bit Rate */ -+#define kAtmSrvcABR 8 /* Available Bit Rate */ -+#define kAtmSrvcUnknown 0xFF -+ -+/* ATM AAL types (as encoded at UNI) */ -+ -+#define kAtmAalIE 0x58 -+ -+#define kAtmRaw 0 -+#define kAtmAal1 1 -+#define kAtmAal2 2 -+#define kAtmAal34 3 -+#define kAtmAal5 5 -+#define kAtmAalUser 16 -+#define kAtmAalUnknown 0xFF -+ -+/* ATM AAL1 parameters */ -+ -+#define kAal1SubTypeId 0x85 -+ -+#define kAal1TransportShift 0 -+#define kAal1TransportMask 0x7 -+ -+#define kAal1NullTransport 0 -+#define kAal1VoiceTransport 1 -+#define kAal1CircuitTransport 2 -+#define kAal1AudioTransport 4 -+#define kAal1VideoTransport 5 -+ -+ -+#define kAal1CBRId 0x86 -+ -+#define kAal1CBRShift 24 -+#define kAal1CBRMask 0xFF -+ -+#define kAal1CBR64 1 -+#define kAal1CBR1544 4 /* DS1 */ -+#define kAal1CBR6312 5 /* DS2 */ -+#define kAal1CBR32064 6 -+#define kAal1CBR44736 7 /* DS3 */ -+#define kAal1CBR97728 8 -+#define kAal1CBR2048 0x10 /* E1 */ -+#define kAal1CBR8448 0x11 /* E2 */ -+#define kAal1CBR34368 0x12 /* E3 */ -+#define kAal1CBR139264 0x13 -+#define kAal1CBR64xN 0x40 -+#define kAal1CBR8xN 0x41 -+ -+ -+#define kAal1MultiplierId 0x87 -+ -+#define kAal1ClockRecoveryId 0x88 -+ -+#define kAal1ClockRecoveryShift 3 -+#define kAal1ClockRecoveryMask 0x3 -+ -+#define kAal1ClockRecoveryNull 1 /* synchronous transport */ -+#define kAal1ClockRecoverySRTS 1 /* asynchronous transport */ -+#define kAal1ClockRecoveryAdaptive 2 -+ -+ -+#define kAal1ECMId 0x89 /* Error correction method */ -+ -+#define kAal1ECMShift (kAal1ClockRecoveryShift + 2) -+#define kAal1ECMMask 0x3 -+ -+#define kAal1ECMNull 0 -+#define kAal1ECMLossSensitive 1 -+#define kAal1ECMDelaySensitive 2 -+ -+ -+#define kAal1SDTBlockSizeId 0x8A -+ -+#define kAal1CellFillId 0x8B -+ -+/* ATM AAL34 and AAL5 parameters */ -+ -+#define kAalFwdMaxSDUSizeId 0x8C -+#define kAalBacMaxkSDUSizeId 0x81 -+ -+#define kAal34MidRangeId 0x82 -+ -+#define kAalSSCSTypeId 0x84 -+ -+#define kAalSSCSAssured 1 -+#define kAalSSCSNonAssured 2 -+#define kAalSSCSFrameRelay 4 -+ -+/* ATM AAL2 parameters */ -+ -+#define kAal2SSNone 0 -+#define kAal2SSSAR 1 -+#define kAal2SSTED 2 -+#define kAal2SSSARMask 3 -+#define kAal2SSType1 4 -+#define kAal2SSType3 5 -+ -+typedef struct { -+ uchar aalType; -+ union { -+ struct { -+ bitMap aal1Flags; -+ ulong cbrRate; -+ ushort blkSize; -+ uchar sarUsed; -+ } aal1Params; -+ struct { -+ ushort fwdMaxCpSize; /* Max "common part" packet size */ -+ ushort backMaxCpSize; -+ ushort cidLow; -+ ushort cidHigh; -+ ushort fwdMaxSsSize; /* Max "service specific" packet size */ -+ ushort backMaxSsSize; -+ uchar sscsType; -+ } aal2Params; -+ struct { -+ ushort fwdMaxSDUSize; -+ ushort backMaxSDUSize; -+ ushort midLow; -+ ushort midHigh; -+ uchar sscsType; -+ } aal34Params; -+ struct { -+ ushort fwdMaxSDUSize; -+ ushort backMaxSDUSize; -+ uchar sscsType; -+ } aal5Params; -+ } param; -+} atmAalParams; -+ -+/* ATM Traffic Descriptor types (as encoded at UNI) */ -+ -+#define kAtmTrafficIE 0x59 -+ -+#define kTrafficFwdPeakCellRateId0 0x82 -+#define kTrafficBackPeakCellRateId0 0x83 -+#define kTrafficFwdPeakCellRateId 0x84 -+#define kTrafficBackPeakCellRateId 0x85 -+ -+#define kTrafficFwdSustainCellRateId0 0x88 -+#define kTrafficBackSustainCellRateId0 0x89 -+#define kTrafficFwdSustainCellRateId 0x90 -+#define kTrafficBackSustainCellRateId 0x91 -+ -+#define kTrafficFwdMaxBurstSizeId0 0xA0 -+#define kTrafficBackMaxBurstSizeId0 0xA1 -+#define kTrafficFwdMaxBurstSizeId 0xB0 -+#define kTrafficBackMaxBurstSizeId 0xB1 -+ -+#define kTrafficBestEffortId 0xBE -+#define kTrafficMgrOptionsId 0xBF -+ -+#define kTrafficMaxTolerance 0x7FFFFFFF -+ -+/* trafficFlags coding */ -+ -+#define kTrafficTagFwd 1 -+#define kTrafficTagBack 2 -+#define kTrafficBestEffort 4 -+ -+typedef struct { -+ ulong tPCR0; /* CLP = 0, time between cells in us */ -+ ulong tPCR; /* CLP = 0+1 */ -+ ulong tolPCR; /* tolerance for PCR in us */ -+ -+ ulong tSCR0; /* CLP = 0 */ -+ ulong tSCR; /* CLP = 0+1 */ -+ ulong tolSCR; /* tolerance for SCR in us */ -+ -+ uchar atmServiceType; /* CBR, VBR, UBR, etc. */ -+ uchar trafficFlags; -+} atmTrafficParams; -+ -+/* ATM Broadband Bearer Capabilty (BBC) types (as encoded at UNI) */ -+ -+#define kAtmBBCIE 0x5E -+ -+#define kBBCClassShift 0 -+#define kBBCClassMask 0x1F -+ -+#define kBBCClassA 0x1 -+#define kBBCClassC 0x3 -+#define kBBCClassX 0x10 -+ -+ -+#define kBBCTrafficShift (kBBCClassShift + 5) -+#define kBBCTrafficMask 0x7 -+ -+#define kBBCTrafficNull 0 -+#define kBBCTrafficCBR 1 -+#define kBBCTrafficVBR 2 -+ -+ -+#define kBBCTimingShift (kBBCTrafficShift + 3) -+#define kBBCTimingMask 0x3 -+ -+#define kBBCTimingNull 0 -+#define kBBCTimingRequired 1 -+#define kBBCTimingNotRequired 2 -+ -+ -+#define kBBCClippingShift (kBBCTimingShift + 2) -+#define kBBCClippingMask 0x3 -+ -+#define kBBCNoClipping 0 -+#define kBBCClippingOk 1 -+ -+#define kBBCConnectionShift (kBBCClippingShift + 2) -+#define kBBCConnectionMask 0x3 -+ -+#define kBBCPoint2Point 0 -+#define kBBCPoint2MPoint 1 -+ -+/* ATM Broadband High/Low Layer Information (BHLI/BLLI) types (as encoded at UNI) */ -+ -+#define kAtmBHLIIE 0x5D -+#define kAtmBLLIIE 0x5F -+ -+/* ATM QoS types (as encoded at UNI) */ -+ -+#define kAtmQoSIE 0x5C -+ -+#define kQoSNull 0 -+#define kQoSClass1 1 -+#define kQoSClass2 2 -+#define kQoSClass3 3 -+#define kQoSClass4 4 -+#define kQoSReserved 0xFF -+ -+typedef struct { -+ uchar fwdQoSClass; -+ uchar backQoSClass; -+} atmQoSParams; -+ -+/* ATM MID definitions (ConfigureHandler) */ -+ -+#define kAtmMidEntireVc ((ulong) -1) -+ -+typedef struct { -+ void *pUserVc; /* VC id from the caller: has to be 1st !!! */ -+ ulong vci; -+ uchar defaultCLP; /* default CLP for tx packets on this VC */ -+ uchar framerId; -+ uchar protoId; -+ uchar protoRxBytesReserved; /* # bytes reserved by protocol in the beginning of Rx packet */ -+ uchar protoTxBytesReserved; /* # bytes reserved by protocol in the beginning of Tx packet */ -+ -+ atmAalParams aalParams; -+ atmTrafficParams rxTrafficParams; -+ atmTrafficParams txTrafficParams; -+ bitMap bbcFlags; -+ atmQoSParams qosParams; -+} atmVcParams; -+ -+/* -+** -+** ATM Out of Band (OOB) packet information -+** -+*/ -+ -+typedef struct { -+ Boolean clp; /* Cell Loss Prioroty */ -+ uchar aalType; -+ union { -+ struct { -+ uchar payloadType; -+ } aalRawParams; -+ struct { -+ uchar payloadType; -+ ushort mid; -+ } aal34Params; -+ struct { -+ uchar uui; /* Uses to user indicator */ -+ uchar cpi; /* common part indicator */ -+ } aal5Params; -+ } aalParam; -+} atmOobPacketInfo; -+ -+/* -+** -+** ATM setup bit definition -+** -+*/ -+ -+#define kAtmCorrectHecErrors 1 -+#define kCorrectHecErrors kAtmCorrectHecErrors -+#define kAtmPhyHeaderCompression 2 -+#define kAtmPhyNoDataScrambling 4 -+ -+#define kAtmTxIdleTimeoutMask 0x6 -+#define kAtmTxIdleNoTimeout 0 -+#define kAtmTxIdleTimeout10s 2 -+#define kAtmTxIdleTimeout30s 4 -+#define kAtmTxIdleTimeout60s 6 -+ -+/* -+** -+** ATM framer modes and protocol definitions -+** -+*/ -+ -+#define kAtmFramerNone 0 -+#define kAtmFramerISO 1 -+#define kAtmFramerIP 2 -+#define kAtmFramerEth 3 -+#define kAtmFramerEthWithCRC 4 -+ -+#define kAtmProtoNone 0 -+#define kAtmProtoEClip 1 -+#define kAtmProtoERouted1483 2 -+#define kAtmProtoPPP 3 -+ -+ -+/* -+** -+** ATM status codes -+** -+*/ -+ -+typedef void (*atmStatusHandler) (void *gDslVars, ulong statusCode, ...); -+ -+/* physical layer I.432 */ -+ -+#define kAtmStatRxHunt 1 -+#define kAtmStatRxPreSync 2 -+#define kAtmStatRxSync 3 -+#define kAtmStatRxPlOamCell 4 -+#define kAtmStatBertResult 5 -+#define kAtmStatHec 6 -+#define kAtmStatHdrCompr 7 -+#define kAtmStatCounters 8 -+ -+/* ATM layer */ -+ -+#define kAtmLayerStatFirst 100 -+#define kAtmStatRxDiscarded 100 -+#define kAtmStatTxDelayed 101 -+ -+#define kAtmStatVcCreated 102 -+#define kAtmStatVcStarted 103 -+#define kAtmStatVcStopped 104 -+#define kAtmStatVcDeleted 105 -+ -+#define kAtmStatTimeout 106 -+#define kAtmStatNoCellMemory 107 -+#define kAtmStatPrintCell 108 -+#define kAtmStatInvalidCell 109 -+#define kAtmStatUnassignedCell 110 -+#define kAtmStatOamF4SegmentCell 111 -+#define kAtmStatOamF4End2EndCell 112 -+#define kAtmStatOamI371Cell 113 -+#define kAtmStatOamF5SegmentCell 114 -+#define kAtmStatOamF5End2EndCell 115 -+#define kAtmStatReservedCell 116 -+ -+#define kAtmStatConnected 117 -+#define kAtmStatDisconnected 118 -+ -+#define kAtmStatRxPacket 119 -+#define kAtmStatTxPacket 120 -+ -+#define kAtmStatOamLoopback 121 -+ -+ -+typedef struct _atmPhyCounters { -+ ushort id; -+ ushort bertStatus; -+ ulong bertCellTotal; -+ ulong bertCellCnt; -+ ulong bertBitErrors; -+ -+ ulong rxHecCnt; -+ ulong rxCellTotal; -+ ulong rxCellData; -+ ulong rxCellDrop; -+} atmPhyCounters; -+ -+/* AAL layer */ -+ -+ -+ -+/* -+** -+** ATM log file definitions -+** -+*/ -+ -+/* ATM log file flags */ -+ -+#define kAtmLogFrameFlagMask 3 /* mask */ -+ -+#define kAtmLogFrameFlagNone 0 /* nothing */ -+#define kAtmLogFrameFlagNoData 1 /* no data only frame size */ -+#define kAtmLogFrameFlagBinData 2 /* data in binary form */ -+#define kAtmLogFrameFlagTextData 3 /* data in text form */ -+ -+#define kAtmLogSendFrameShift 0 -+#define kAtmLogSendFrameNoData (kAtmLogFrameFlagNoData << kAtmLogSendFrameShift) -+#define kAtmLogSendFrameBinData (kAtmLogFrameFlagBinData << kAtmLogSendFrameShift) -+#define kAtmLogSendFrameTextData (kAtmLogFrameFlagTextData << kAtmLogSendFrameShift) -+ -+#define kAtmLogRcvFrameShift 2 -+#define kAtmLogRcvFrameNone (kAtmLogFrameFlagNone << kAtmLogRcvFrameShift) -+#define kAtmLogRcvFrameNoData (kAtmLogFrameFlagNoData << kAtmLogRcvFrameShift) -+#define kAtmLogRcvFrameBinData (kAtmLogFrameFlagBinData << kAtmLogRcvFrameShift) -+#define kAtmLogRcvFrameTextData (kAtmLogFrameFlagTextData << kAtmLogRcvFrameShift) -+ -+#define kAtmLogSendCompleteFrameShift 4 -+#define kAtmLogSendCompleteFrameNone (kAtmLogFrameFlagNone << kAtmLogSendCompleteFrameShift) -+#define kAtmLogSendCompleteFrameNoData (kAtmLogFrameFlagNoData << kAtmLogSendCompleteFrameShift) -+ -+#define kAtmLogReturnFrameShift 6 -+#define kAtmLogReturnFrameNoData (kAtmLogFrameFlagNoData << kAtmLogReturnFrameShift) -+ -+#define kAtmLogCellFlag (1 << 8) -+ -+/* ATM log codes */ -+ -+#define kAtmLogSendFrame 1 -+#define kAtmLogRcvFrame 2 -+#define kAtmLogSendFrameComplete 3 -+#define kAtmLogReturnFrame 4 -+#define kAtmLogVcAllocate 5 -+#define kAtmLogVcFree 6 -+#define kAtmLogVcActivate 7 -+#define kAtmLogVcDeactivate 8 -+#define kAtmLogTimer 9 -+#define kAtmLogCell 10 -+#define kAtmLogVcConfigure 11 -+ -+#define kAtmLogRxCellHeader 12 -+#define kAtmLogRxCellData 13 -+#define kAtmLogTxCell 14 -+ -+#endif /* SoftAtmVcHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.gh linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.gh ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.gh 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.gh 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,675 @@ -+/**************************************************************************** -+ * -+ * SoftDsl.gh -+ * -+ * Description: -+ * This is a header file which defines the type for the DSL -+ * global variable structure. -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.72 $ -+ * -+ * $Id: SoftDsl.gh,v 1.72 2004/04/30 23:05:19 kdu Exp $ -+ * -+ * $Log: SoftDsl.gh,v $ -+ * Revision 1.72 2004/04/30 23:05:19 kdu -+ * Fixed interop issues in TDC lab for TMM. -+ * -+ * Revision 1.70 2004/04/10 23:30:48 ilyas -+ * Defined gloval structure for slow (SDRAM) data -+ * -+ * Revision 1.69 2004/04/02 18:33:45 gsyu -+ * Share MuxFramer buffers with scratch memory -+ * -+ * Revision 1.68 2004/02/04 20:12:38 linyin -+ * Support adsl2plus -+ * -+ * Revision 1.67 2004/02/03 19:10:37 gsyu -+ * Added separated carrierInfo structures for G992P5 -+ * -+ * Revision 1.66 2004/01/26 04:21:06 yongbing -+ * Merge changes in ADSL2 branch into Annex A branch -+ * -+ * Revision 1.65 2004/01/13 19:12:07 gsyu -+ * Added two more variables for Double upstream -+ * -+ * Revision 1.64 2003/12/04 02:10:37 linyin -+ * Add a variable for FbmsOL mode -+ * -+ * Revision 1.63 2003/11/20 00:57:50 yongbing -+ * Merge ADSL2 functionalities into Annex A branch -+ * -+ * Revision 1.62 2003/11/05 01:59:12 liang -+ * Add vendor ID code for Infineon. -+ * -+ * Revision 1.61 2003/08/12 22:59:41 khp -+ * - for Haixiang: added support for ADSL_MARGIN_TWEAK_TEST -+ * -+ * Revision 1.60 2003/08/01 00:08:19 liang -+ * Added firmware ID for Samsung ADI 930 DSLAM. -+ * -+ * Revision 1.59 2003/07/14 14:40:08 khp -+ * - AnnexB: added bad SNR2 retrain counter to connectin setup -+ * -+ * Revision 1.58 2003/06/25 02:40:22 liang -+ * Added firmware ID for Annex A UE9000 ADI918 (from Aliant, Canada). -+ * -+ * Revision 1.57 2003/06/25 00:00:40 ilyas -+ * -added firmware IDs for TI 4000C and AC5 (Annex B) -+ * -+ * Revision 1.56 2003/05/31 01:50:38 khp -+ * -add firmware IDs for ECI16 and ECI16A -+ * -+ * Revision 1.55 2003/03/27 19:30:52 liang -+ * Add and initialize new connectionSetup field coVendorFirmwareID under module ADSL_IDENTIFY_VENDOR_FIRMWARE. -+ * -+ * Revision 1.54 2002/12/13 18:35:48 yongbing -+ * Add support for G.992.2 Annex C in start up -+ * -+ * Revision 1.53 2002/12/06 02:06:33 liang -+ * Moved the T1.413 RAck1/RAck2 switching variables to connection setup structure. -+ * -+ * Revision 1.52 2002/11/26 02:49:46 liang -+ * Added variable codingGainDecrement to the connectionSetup structure to solve the C-Rates-RA option failure problem. -+ * -+ * Revision 1.51 2002/10/20 18:56:16 khp -+ * - for linyin: -+ * - #ifdef NEC_NSIF_WORKAROUND: -+ * - add status and fail counter for NSIF -+ * -+ * Revision 1.50 2002/09/28 02:36:50 yongbing -+ * Add retrain in T1.413 with R-Ack1 tone -+ * -+ * Revision 1.49 2002/09/12 21:07:19 ilyas -+ * Added HEC, OCD and LCD counters -+ * -+ * Revision 1.48 2002/07/19 01:51:35 liang -+ * Added vendor ID constant for Alcatel. -+ * -+ * Revision 1.47 2002/06/27 21:51:08 liang -+ * Added xmt and rcv tone selection bitmap in connection setup. -+ * -+ * Revision 1.46 2002/06/11 20:48:06 liang -+ * Added CO vendor ID field to connectionSetup structure. -+ * -+ * Revision 1.45 2002/06/06 03:05:43 khp -+ * -use boolean in connectup setup instead of localCapabilities.features to indicate FBM mode -+ * -+ * Revision 1.44 2002/03/22 19:38:58 yongbing -+ * Modify for co-exist of G994P1 and T1P413 -+ * -+ * Revision 1.43 2002/03/02 00:52:40 ilyas -+ * AnnexC delay needs to be long for prototype -+ * -+ * Revision 1.42 2002/01/19 23:59:17 ilyas -+ * Added support for LOG and eye data to ADSL core target -+ * -+ * Revision 1.41 2002/01/16 19:03:59 ilyas -+ * Added HOST_ONLY ifdefs around ADSL core data -+ * -+ * Revision 1.40 2002/01/14 17:41:04 liang -+ * Move xmt & rcv sample buffers to top level. -+ * -+ * Revision 1.39 2001/12/21 22:45:34 ilyas -+ * Added support for ADSL MIB data object -+ * -+ * Revision 1.38 2001/12/13 02:24:22 ilyas -+ * Added G997 (Clear EOC and G997 framer) support -+ * -+ * Revision 1.37 2001/11/30 05:56:31 liang -+ * Merged top of the branch AnnexBDevelopment onto top of the tree. -+ * -+ * Revision 1.36 2001/10/19 00:12:07 ilyas -+ * Added support for frame oriented (no ATM) data link layer -+ * -+ * Revision 1.29.2.5 2001/10/03 01:44:00 liang -+ * Merged with codes from main tree (tag SoftDsl_2_18). -+ * -+ * Revision 1.29.2.4 2001/08/18 00:00:36 georgep -+ * Add variable to store annexC pathDelay -+ * -+ * Revision 1.29.2.3 2001/08/08 17:33:27 yongbing -+ * Merge with tag SoftDsl_2_17 -+ * -+ * Revision 1.35 2001/08/29 02:56:01 ilyas -+ * Added tests for flattening/unflatenning command and statuses (dual mode) -+ * -+ * Revision 1.34 2001/08/28 03:26:32 ilyas -+ * Added support for running host and adsl core parts separately ("dual" mode) -+ * -+ * Revision 1.33 2001/06/18 19:49:36 ilyas -+ * Changes to include support for HOST_ONLY mode -+ * -+ * Revision 1.32 2001/05/18 21:21:44 liang -+ * Save the current number of rcv samples to line handler for QProc test. -+ * -+ * Revision 1.31 2001/04/25 01:20:11 ilyas -+ * -+ * Don't use DSL frame functions if ATM_LAYER is not defined -+ * -+ * Revision 1.30 2001/03/25 06:11:20 liang -+ * Combined separate loop attenuation status for ATUR & ATUC into one status. -+ * Replace separate hardware AGC info status for ATUR & ATUC into hardware AGC -+ * request status and hardware AGC obtained status. -+ * Use store AGC command to save hardware AGC value instead of returning value -+ * from status report. -+ * -+ * Revision 1.29 2001/03/17 03:00:46 georgep -+ * Added agcInfo to connectionSetupStruct -+ * -+ * Revision 1.28 2001/02/10 03:03:09 ilyas -+ * Added one more DslFrame function -+ * -+ * Revision 1.27 2000/08/31 19:04:24 liang -+ * Added scratch buffer structure definition. -+ * -+ * Revision 1.26 2000/07/23 20:52:52 ilyas -+ * Added xxxFrameBufSetAddress() function for ATM framer layers -+ * Rearranged linkLayer functions in one structure which is passed as a -+ * parameter to xxxLinkLayerInit() function to be set there -+ * -+ * Revision 1.25 2000/07/18 21:42:25 ilyas -+ * Fixed compiler warning about pointer casting -+ * -+ * Revision 1.24 2000/07/18 21:18:45 ilyas -+ * Added GLOBAL_PTR_BIAS feature to utilize full 64K MIPS relative addressing space -+ * -+ * Revision 1.23 2000/07/18 20:03:24 ilyas -+ * Changed DslFrame functions definitions to macros, -+ * Removed gDslVars from their parameter list -+ * -+ * Revision 1.22 2000/07/17 21:08:15 lkaplan -+ * removed global pointer -+ * -+ * Revision 1.21 2000/05/09 23:00:26 ilyas -+ * Added ATM status messages, ATM timer, Tx frames flush on timeout -+ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames -+ * -+ * Revision 1.20 2000/05/03 03:57:04 ilyas -+ * Added LOG file support for writing ATM data -+ * -+ * Revision 1.19 2000/04/19 00:31:47 ilyas -+ * Added global SoftDsl functions for Vc, added OOB info functions -+ * -+ * Revision 1.18 2000/04/13 08:36:22 yura -+ * Added SoftDslSetRefData, SoftDslGetRefData functions -+ * -+ * Revision 1.17 2000/04/13 05:38:54 georgep -+ * Added T1p413 "Activation and Acknowledgement" which can substitute G994P1 -+ * -+ * Revision 1.16 2000/04/05 22:30:42 liang -+ * Changed function & constant names from G992p2 to G992 for the Main module. -+ * -+ * Revision 1.15 2000/04/04 04:16:06 liang -+ * Merged with SoftDsl_0_03 from old tree. -+ * -+ * Revision 1.15 2000/04/04 01:47:21 ilyas -+ * Implemented abstract dslFrame and dslFrameBuffer objects -+ * -+ * Revision 1.14 2000/04/01 02:53:33 georgep -+ * Added pointer to G992p2Profile inside connectionSetup -+ * -+ * Revision 1.13 2000/03/18 01:27:56 georgep -+ * Changed connectionSetup to include G992p1 Capabilities -+ * -+ * Revision 1.12 2000/02/29 01:39:05 georgep -+ * put variable haveRemoteCapabilities inside connectionSetupStruct -+ * -+ * Revision 1.11 2000/02/08 00:44:36 liang -+ * Fix the gDslVars definition for Irix environment. -+ * -+ * Revision 1.10 1999/11/19 00:59:29 george -+ * Define physicalLayerVars as a union -+ * -+ * Revision 1.9 1999/11/11 19:19:42 george -+ * Porting to 16Bit Compiler -+ * -+ * Revision 1.8 1999/11/09 20:26:17 george -+ * Added G992P2_PROFILE to modules list -+ * -+ * Revision 1.7 1999/10/27 23:01:54 wan -+ * Add G.994.1 setup in dslConnectionSetupStruct for setting up Initiation side -+ * -+ * Revision 1.6 1999/08/12 21:16:27 george -+ * Move profileVars definition to G992p2/G992p2Profile.gh -+ * -+ * Revision 1.5 1999/08/10 18:20:43 george -+ * Define fastRetrainVars -+ * -+ * Revision 1.4 1999/07/16 02:03:02 liang -+ * Added Tx & Rx data handler function pointers. -+ * -+ * Revision 1.3 1999/07/03 01:40:15 liang -+ * Redefined dsl command parameter list and added connection setup struct. -+ * -+ * Revision 1.2 1999/02/10 01:56:37 liang -+ * Added hooks for G994.1 and G992.2. -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef SoftDslGlobals -+#define SoftDslGlobals -+ -+#include "SoftDsl.h" -+ -+#ifdef G992P2_PROFILE -+#include "G992p2Profile.gh" -+#endif -+ -+typedef enum -+ { -+ kVendorUnknown = 0, -+ kVendorBroadcom, -+ kVendorGlobespan, -+ kVendorADI, -+ kVendorTI, -+ kVendorCentillium, -+ kVendorAlcatel, -+ kVendorInfineon -+ } VendorIDType; -+ -+#define kDslVendorFirwareUnknown 0 -+typedef enum -+ { -+ kVendorADI_Anaconda = 1, -+ kVendorADI_ECI918, -+ kVendorADI_ECI930, -+ kVendorADI_Cisco, -+ kVendorADI_UE9000_918, -+ kVendorADI_Samsung_930, -+ kVendorTI_4000C_ERICSSON_350, -+ kVendorTI_4000C_SEIMENS, -+ kVendorADI_ECI16_AnnexB = 50, /* leave space for more Annex A types */ -+ kVendorADI_ECI16A_AnnexB, -+ kVendorTI_4000C_AnnexB, -+ kVendorTI_AC5_AnnexB -+ } VendorFirmwareIDType; -+ -+#define kDslXmtToneSelectionStartTone 0 -+#ifdef G992P1_ANNEX_B -+#define kDslXmtToneSelectionEndTone 63 -+#else -+#define kDslXmtToneSelectionEndTone 31 -+#endif -+#define kDslXmtToneSelectionNumOfTones (kDslXmtToneSelectionEndTone-kDslXmtToneSelectionStartTone+1) -+#define kDslXmtToneSelectionNumOfBytes ((kDslXmtToneSelectionNumOfTones+7)/8) -+#define kDslRcvToneSelectionStartTone 32 -+#define kDslRcvToneSelectionEndTone 255 -+#define kDslRcvToneSelectionNumOfTones (kDslRcvToneSelectionEndTone-kDslRcvToneSelectionStartTone+1) -+#define kDslRcvToneSelectionNumOfBytes ((kDslRcvToneSelectionNumOfTones+7)/8) -+ -+#define kDslT1p413RAckModeTryRAck1 0x01 -+#define kDslT1p413RAckModeTryRAck2 0x02 -+#define kDslT1p413RAckModeTrialMask 0x0F -+#define kDslT1p413RAckModeSelected 0x10 -+#define kDslT1p413RAckModeTrialCount 10 /* when in trial mode */ -+#define kDslT1p413RAckModeSwitchCount 20 /* when mode is selected */ -+ -+#ifdef ADSL_MARGIN_TWEAK_TEST -+#define kDslMarginTweakNumOfTones 256 -+#endif -+ -+typedef struct -+ { -+ Boolean haveRemoteCapabilities; -+ dslModulationType selectedModulation; -+ dslModulationType startupModulation; -+#if defined(G992P1_ANNEX_I) || defined(G992P5) -+ ushort downstreamMinCarr, downstreamMaxCarr; -+#else -+ uchar downstreamMinCarr, downstreamMaxCarr; -+#endif -+ uchar upstreamMinCarr, upstreamMaxCarr; -+#if defined(DOUBLE_UP_STREAM) -+ Boolean isDoubleUsEnabled; -+ short selectedPilotTone; -+#endif -+ dslDataPumpCapabilities localCapabilities, remoteCapabilities; -+#ifdef G992P3 -+ g992p3DataPumpCapabilities localCarrierInfoG992p3AnnexA; -+ g992p3DataPumpCapabilities remoteCarrierInfoG992p3AnnexA; -+ g992p3DataPumpCapabilities selectedCarrierInfoG992p3AnnexA; -+ uchar xmtG992p3State; -+#ifdef G992P5 -+ g992p3DataPumpCapabilities localCarrierInfoG992p5AnnexA; -+ g992p3DataPumpCapabilities remoteCarrierInfoG992p5AnnexA; -+ g992p3DataPumpCapabilities selectedCarrierInfoG992p5AnnexA; -+#endif /* G992P5 */ -+#endif /* G992P3 */ -+ uchar handshakingDuplexMode; -+ Boolean handshakingClientInitiation; -+ short handshakingXmtPowerLevel; -+ uchar handshakingXmtCarrierSet; -+ short hwAgcQ4dB; /* for loop attenuation calculation */ -+ uchar coVendorID; -+#ifdef ADSL_IDENTIFY_VENDOR_FIRMWARE -+ uchar coVendorFirmwareID; -+#endif -+ uchar codingGainDecrement; /* coding gain decrement in Q4dB for initial rate calculation */ -+ uchar xmtToneSelection[kDslXmtToneSelectionNumOfBytes]; -+ uchar rcvToneSelection[kDslRcvToneSelectionNumOfBytes]; -+#ifdef G992_ANNEXC -+ Boolean isFbmMode; -+ Boolean isFbmsOLMode; -+ long xmtToRcvPathDelay; -+#endif -+#if defined(T1P413) && defined(XMT_RACT2_FOR_ADI_COMPATIBILITY) -+ uchar t1p413RAckModeUsed; -+ uchar t1p413RAckModeCounter; -+#endif -+#ifdef G992P1_ANNEX_B -+ uchar badSNR2RetrainCounter; -+#endif -+#ifdef ADSL_MARGIN_TWEAK_TEST -+ short marginTweakExtraPowerQ4dB; -+ char marginTweakTableQ4dB[kDslMarginTweakNumOfTones]; -+#endif -+#ifdef G992P2_PROFILE -+ G992p2ProfileVarsStruct* profileVarsPtr; -+#endif -+#ifdef TDC_IOP_FIX_SEIMENS_TI -+ char t1p413RetrainCounter; /* 0: no retrain needed; 1: force to T1.413 mode and retrain after R-MSG1; 2: 2nd T1.413 session, go to showtime */ -+#endif -+#ifdef ANSI_CACT12_PING_PONG -+ char t1p413SkipToneIndex; /* to alternate between CAct1 and CAct2 detection */ -+#endif -+ } dslConnectionSetupStruct; -+ -+#ifdef ADSL_FRAMER -+#include "MuxFramer.gh" -+#endif -+ -+#ifdef ATM -+#include "SoftAtm.gh" -+#endif -+ -+#ifdef DSL_PACKET -+#include "DslPacket.gh" -+#endif -+ -+#ifdef G997_1_FRAMER -+#include "G997.gh" -+#ifdef G992P3 -+#include "G992p3OvhMsg.gh" -+#endif -+#endif -+ -+#ifdef ADSL_MIB -+#include "AdslMib.gh" -+#endif -+ -+#ifndef HOST_ONLY -+#ifdef T1P413 -+#include "T1p413Main.gh" -+#endif -+ -+#ifdef G994P1 -+#include "G994p1Main.gh" -+#endif -+ -+#ifdef G992 -+#include "G992Main.gh" -+#endif -+ -+#include "SoftDslSampleBuffers.gh" -+#endif -+ -+typedef struct __dslSlowVarsStruct -+ { -+ int tmp; -+ } -+ dslSlowVarsStruct; -+ -+typedef struct __dslVarsStruct -+ { -+ bitMap setup; -+ eyeHandlerType eyeHandlerPtr; -+ logHandlerType logHandlerPtr; -+ dslDriverCallbackType driverCallback; -+ -+ rcvHandlerType rcvHandlerPtr; -+ xmtHandlerType xmtHandlerPtr; -+ -+#ifndef ADSLCORE_ONLY -+ dslCommandHandlerType adslCoreCommandHandlerPtr; -+#endif -+ dslCommandHandlerType dataPumpCommandHandlerPtr; -+ -+ dslStatusHandlerType internalStatusHandlerPtr; -+ dslStatusHandlerType externalStatusHandlerPtr; -+#ifndef ADSLCORE_ONLY -+ dslStatusHandlerType externalLinkLayerStatusHandlerPtr; -+#endif -+ -+ dslDirectionType direction; -+ dslConnectionSetupStruct connectionSetup; -+ -+#ifdef NEC_NSIF_WORKAROUND -+ uchar G994NsStatus; -+ uchar G994NsFailCounter; -+#endif -+ -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ -+ linkLayerFunctions LinkLayerFunctions; -+ dslSlowVarsStruct *dslSlowVars; -+ -+#ifdef DSL_FRAME_FUNCTIONS -+ dslFrameFunctions DslFrameFunctions; -+#endif -+ ulong refData; -+ ulong execTime; -+ int currRcvNSamps; -+ -+#ifndef HOST_ONLY -+ DslSampleBuffersStruct sampleBuffersVars; -+ -+#ifdef G992P2_PROFILE -+ G992p2ProfileVarsStruct G992p2ProfileVars; -+#endif -+ -+#ifdef ADSL_FRAMER -+ muxFramerVarsStruct muxFramerVars; -+#endif -+#endif /* HOST_ONLY */ -+ -+#ifdef DSL_LINKLAYER -+ union -+ { -+#ifdef ATM -+ atmVarsStruct atmVars; -+#endif -+#ifdef DSL_PACKET -+ dslPacketVarsStruct dslPacketVars; -+#endif -+ } linkLayerVars; -+#endif -+ -+#ifdef G997_1_FRAMER -+ g997VarsStruct G997Vars; -+#ifdef G992P3 -+ g992p3OvhMsgVarsStruct G992p3OvhMsgVars; -+#endif -+#endif -+ -+#ifdef ADSL_MIB -+ adslMibVarsStruct adslMibVars; -+#endif -+ -+#ifndef HOST_ONLY -+ union -+ { -+#ifdef T1P413 -+ T1p413VarsStruct T1p413Vars; -+#endif -+#ifdef G994P1 -+ G994p1VarsStruct G994p1Vars; -+#endif -+#ifdef G992 -+ G992VarsStruct G992Vars; -+#endif -+ } physicalLayerVars; -+ union -+ { -+#ifdef G992 -+ G992ScratchVarsStruct G992ScratchVars; -+#endif -+#if defined(ADSL_FRAMER) && defined(SHARE_MUX_FRAMER_VARS) -+ muxFramerSharedVarsStruct muxFramerSharedVars; -+#endif -+ } scratchVars; -+#endif /* HOST_ONLY */ -+ -+ } -+ dslVarsStruct; -+ -+#ifndef GLOBAL_PTR_BIAS -+#define gDslGlobalVarPtr ((struct __dslVarsStruct *)gDslVars) -+#define gDslGlobalSlowVarPtr (gDslGlobalVarPtr->dslSlowVars) -+#else -+#define gDslGlobalVarPtr ((struct __dslVarsStruct *) (void*)((uchar*)(gDslVars) - GLOBAL_PTR_BIAS)) -+#define gDslGlobalSlowVarPtr ((struct __dslSlowVarsStruct *) (void*)((uchar*)(gDslGlobalVarPtr->dslSlowVars) - GLOBAL_PTR_BIAS)) -+#endif -+ -+#define gDslSampleBuffersVars (gDslGlobalVarPtr->sampleBuffersVars) -+ -+#define gDslMuxFramerVars (gDslGlobalVarPtr->muxFramerVars) -+#define gDslMuxFramerSharedVars (gDslGlobalVarPtr->scratchVars.muxFramerSharedVars) -+#define gDslLinkLayerVars (gDslGlobalVarPtr->linkLayerVars) -+#define gDslAtmVars (gDslGlobalVarPtr->linkLayerVars.atmVars) -+#define gDslPacketVars (gDslGlobalVarPtr->linkLayerVars.dslPacketVars) -+#define gG997Vars (gDslGlobalVarPtr->G997Vars) -+ -+#ifdef G992P3 -+#define gG992p3OvhMsgVars (gDslGlobalVarPtr->G992p3OvhMsgVars) -+#endif -+ -+#define gAdslMibVars (gDslGlobalVarPtr->adslMibVars) -+ -+#define gT1p413Vars (gDslGlobalVarPtr->physicalLayerVars.T1p413Vars) -+#define gG994p1Vars (gDslGlobalVarPtr->physicalLayerVars.G994p1Vars) -+#define gG992Vars (gDslGlobalVarPtr->physicalLayerVars.G992Vars) -+#define gG992p2ProfileVars (gDslGlobalVarPtr->G992p2ProfileVars) -+ -+#define gG992ScratchVars (gDslGlobalVarPtr->scratchVars.G992ScratchVars) -+ -+#ifndef gEyeHandlerPtr -+#define gEyeHandlerPtr (gDslGlobalVarPtr->eyeHandlerPtr) -+#endif -+ -+#ifndef gLogHandlerPtr -+#define gLogHandlerPtr (gDslGlobalVarPtr->logHandlerPtr) -+#endif -+ -+#ifdef VP_SIMULATOR -+#define gDriverCallback(x) (gDslGlobalVarPtr->driverCallback)(x) -+#else -+#define gDriverCallback(x) -+#endif -+ -+/* -+** -+** Frame functions callouts -+** -+*/ -+ -+#define gDslFrameFunc (gDslGlobalVarPtr->DslFrameFunctions) -+ -+#define DslFrameBufferGetLength(gDslVars, fb) \ -+ gDslFrameFunc.__DslFrameBufferGetLength(fb) -+ -+#define DslFrameBufferGetAddress(gDslVars, fb) \ -+ gDslFrameFunc.__DslFrameBufferGetAddress(fb) -+ -+#define DslFrameBufferSetLength(gDslVars, fb, l) \ -+ gDslFrameFunc.__DslFrameBufferSetLength(fb, l) -+ -+#define DslFrameBufferSetAddress(gDslVars, fb, p) \ -+ gDslFrameFunc.__DslFrameBufferSetAddress(fb, p) -+ -+#define DslFrameInit(gDslVars, f) \ -+ gDslFrameFunc.__DslFrameInit(f) -+ -+#define DslFrameGetLength(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameGetLength(pFrame) -+ -+#define DslFrameGetBufCnt(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameGetBufCnt(pFrame) -+ -+#define DslFrameGetFirstBuffer(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameGetFirstBuffer(pFrame) -+ -+#define DslFrameGetNextBuffer(gDslVars, pFrBuffer) \ -+ gDslFrameFunc.__DslFrameGetNextBuffer(pFrBuffer) -+ -+#define DslFrameSetNextBuffer(gDslVars, pFrBuf, pFrBufNext) \ -+ gDslFrameFunc.__DslFrameSetNextBuffer(pFrBuf, pFrBufNext) -+ -+#define DslFrameGetLastBuffer(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameGetLastBuffer(pFrame) -+ -+#define DslFrameGetLinkFieldAddress(gDslVars, f) \ -+ gDslFrameFunc.__DslFrameGetLinkFieldAddress(f) -+ -+#define DslFrameGetFrameAddressFromLink(gDslVars, lnk) \ -+ gDslFrameFunc.__DslFrameGetFrameAddressFromLink(lnk) -+ -+ -+#define DslFrameGetOobInfo(gDslVars, f, pOobInfo) \ -+ gDslFrameFunc.__DslFrameGetOobInfo(f, pOobInfo) -+ -+#define DslFrameSetOobInfo(gDslVars, f, pOobInfo) \ -+ gDslFrameFunc.__DslFrameSetOobInfo(f, pOobInfo) -+ -+ -+#define DslFrameEnqueBufferAtBack(gDslVars, f, b) \ -+ gDslFrameFunc.__DslFrameEnqueBufferAtBack(f, b) -+ -+#define DslFrameEnqueFrameAtBack(gDslVars, fMain, f) \ -+ gDslFrameFunc.__DslFrameEnqueFrameAtBack(fMain, f) -+ -+#define DslFrameEnqueBufferAtFront(gDslVars, f, b) \ -+ gDslFrameFunc.__DslFrameEnqueBufferAtFront(f, b) -+ -+#define DslFrameEnqueFrameAtFront(gDslVars, fMain, f) \ -+ gDslFrameFunc.__DslFrameEnqueFrameAtFront(fMain, f) -+ -+#define DslFrameDequeBuffer(gDslVars, pFrame) \ -+ gDslFrameFunc.__DslFrameDequeBuffer(pFrame) -+ -+#define DslFrameAllocMemForFrames(gDslVars, frameNum) \ -+ gDslFrameFunc.__DslFrameAllocMemForFrames(frameNum) -+ -+#define DslFrameFreeMemForFrames(gDslVars, hMem) \ -+ gDslFrameFunc.__DslFrameFreeMemForFrames(hMem) -+ -+#define DslFrameAllocFrame(gDslVars, handle) \ -+ gDslFrameFunc.__DslFrameAllocFrame(handle) -+ -+#define DslFrameFreeFrame(gDslVars, handle, pFrame) \ -+ gDslFrameFunc.__DslFrameFreeFrame(handle, pFrame) -+ -+#define DslFrameAllocMemForBuffers(gDslVars, ppMemPool, bufNum, memSize) \ -+ gDslFrameFunc.__DslFrameAllocMemForBuffers(ppMemPool, bufNum, memSize) -+ -+#define DslFrameFreeMemForBuffers(gDslVars, hMem, memSize, pMemPool) \ -+ gDslFrameFunc.__DslFrameFreeMemForBuffers(hMem, memSize, pMemPool) -+ -+#define DslFrameAllocBuffer(gDslVars, handle, pMem, length) \ -+ gDslFrameFunc.__DslFrameAllocBuffer(handle, pMem, length) -+ -+#define DslFrameFreeBuffer(gDslVars, handle, pBuf) \ -+ gDslFrameFunc.__DslFrameFreeBuffer(handle, pBuf) -+ -+#define DslFrame2Id(gDslVars, handle, pFrame) \ -+ gDslFrameFunc.__DslFrame2Id(handle, pFrame) -+ -+#define DslFrameId2Frame(gDslVars, handle, frameId) \ -+ gDslFrameFunc.__DslFrameId2Frame (handle, frameId) -+ -+ -+#endif /* SoftDslGlobals */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftDsl.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,2920 @@ -+/**************************************************************************** -+ * -+ * SoftDsl.h -+ * -+ * -+ * Description: -+ * This file contains the exported interface for SoftDsl.c -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.275 $ -+ * -+ * $Id: SoftDsl.h,v 1.275 2005/04/28 22:55:36 ilyas Exp $ -+ * -+ * $Log: SoftDsl.h,v $ -+ * Revision 1.275 2005/04/28 22:55:36 ilyas -+ * Cleaned up kDslG992RunAnnexaP3ModeInAnnexaP5, kG992EnableAnnexM and kDslAtuChangeTxFilterRequest definitions -+ * -+ * Revision 1.274 2005/04/27 20:57:32 yongbing -+ * Implement 32 frequency break points for TSSI, PR 30211 -+ * -+ * Revision 1.273 2005/04/02 03:27:52 kdu -+ * PR30236: Define kDslEnableRoundUpDSLoopAttn, this is shared with kDslCentilliumCRCWorkAroundEnabled. -+ * -+ * Revision 1.272 2005/04/01 21:56:39 ilyas -+ * Added more test commands definitions -+ * -+ * Revision 1.271 2005/02/11 05:03:57 ilyas -+ * Added support for DslOs -+ * -+ * Revision 1.270 2005/02/11 03:33:22 lke -+ * Support 2X, 4X, and 8X spectrum in ANNEX_I DS -+ * -+ * Revision 1.269 2005/01/08 00:11:58 ilyas -+ * Added definition for AnnexL status -+ * -+ * Revision 1.268 2004/12/18 00:52:35 mprahlad -+ * Add Dig US Pwr cutback status -+ * -+ * Revision 1.267 2004/11/08 22:21:38 ytan -+ * init swap state after retrain -+ * -+ * Revision 1.266 2004/11/05 21:16:50 ilyas -+ * Added support for pwmSyncClock -+ * -+ * Revision 1.265 2004/10/28 20:05:17 gsyu -+ * Fixed compilation errors for simulation targets -+ * -+ * Revision 1.264 2004/10/23 00:16:35 nino -+ * Added kDslHardwareSetRcvAGC status to set absolute rcv agc gain. -+ * -+ * Revision 1.263 2004/10/22 21:21:06 ilyas -+ * Fixed bit definition overlap in demodCapabilities -+ * -+ * Revision 1.262 2004/10/20 00:43:20 gsyu -+ * Added constants to support new xmt sample buffer control scheme -+ * -+ * Revision 1.261 2004/10/12 01:09:28 nino -+ * Remove kDslHardwareEnablePwmSyncClk and kDslHardwareSetPwmSyncClkFreq -+ * status definitions. Add kDslEnablePwmSyncClk and kDslSetPwmSyncClkFreq -+ * command definitions. -+ * -+ * Revision 1.260 2004/10/11 20:21:26 nino -+ * Added kDslHardwareEnablePwmSyncClk and kDslHardwareSetPwmSynClkFreq hardware statuses. -+ * -+ * Revision 1.259 2004/10/07 19:17:29 nino -+ * Added kDslHardwareGetRcvAGC status. -+ * -+ * Revision 1.258 2004/10/02 00:17:14 nino -+ * Added kDslHardwareAGCSetPga2 and kDslSetPilotEyeDisplay status definitions. -+ * -+ * Revision 1.257 2004/08/27 01:00:30 mprahlad -+ * -+ * Keep kDslAtuChangeTxFilterRequest defined by default so ADSL1 only targets can -+ * build -+ * -+ * Revision 1.256 2004/08/20 19:00:34 ilyas -+ * Added power management code for 2+ -+ * -+ * Revision 1.255 2004/08/17 23:18:25 kdu -+ * Merged interop changes for TDC lab from a023e9. -+ * -+ * Revision 1.254 2004/07/22 00:56:03 yongbing -+ * Add ADSL2 Annex B modulation definition -+ * -+ * Revision 1.253 2004/07/16 22:23:28 nino -+ * - Defined macros to extract subcarrier and supported set information -+ * for tssi. Subcarrier and suported set indicator is packed into -+ * dsSubcarrier index array. -+ * -+ * Revision 1.252 2004/07/01 00:11:22 nino -+ * Added preliminary code for debugDataHandler (inside of #if DEBUG_DATA_HANDLER). -+ * -+ * Revision 1.251 2004/06/24 03:08:39 ilyas -+ * Added GFC mapping control for ATM bonding -+ * -+ * Revision 1.250 2004/06/23 00:03:20 khp -+ * - shorten self test result register length to 1 (satisfied requirement -+ * at DT, no known requirement anywhere else) -+ * -+ * Revision 1.249 2004/06/15 20:18:33 ilyas -+ * Made D uchar again for compatibility with older ADSl drivers that use this structure. ADSL driver will rely on G992p3 parameters for large D -+ * -+ * Revision 1.248 2004/06/12 00:26:03 gsyu -+ * Added constants for AnnexM -+ * -+ * Revision 1.247 2004/06/10 18:53:24 yjchen -+ * add large D support -+ * -+ * Revision 1.246 2004/06/04 01:55:00 linyin -+ * Add a constant for SRA enable/disable -+ * -+ * Revision 1.245 2004/05/19 23:22:23 linyin -+ * Support L2 -+ * -+ * Revision 1.244 2004/05/15 03:04:58 ilyas -+ * Added L3 test definition -+ * -+ * Revision 1.243 2004/05/14 03:04:38 ilyas -+ * Fixed structure name typo -+ * -+ * Revision 1.242 2004/05/14 02:01:01 ilyas -+ * Fixed structure name typo -+ * -+ * Revision 1.241 2004/05/14 01:21:49 nino -+ * Added kDslSignalAttenuation, kDslAttainableNetDataRate kDslHLinScale constant definitions. -+ * -+ * Revision 1.240 2004/05/13 19:07:58 ilyas -+ * Added new statuses for ADSL2 -+ * -+ * Revision 1.239 2004/05/01 01:09:51 ilyas -+ * Added power management command and statuses -+ * -+ * Revision 1.238 2004/04/23 22:50:38 ilyas -+ * Implemented double buffering to ensure G.997 HDLC frame (OvhMsg) is continuous -+ * -+ * Revision 1.237 2004/03/31 18:57:39 ilyas -+ * Added drop on data error capability control -+ * -+ * Revision 1.236 2004/03/30 03:11:30 ilyas -+ * Added #ifdef for CFE build -+ * -+ * Revision 1.235 2004/03/29 23:06:39 ilyas -+ * Added status for BG table update -+ * -+ * Revision 1.234 2004/03/17 02:49:49 ilyas -+ * Turn off ATM bit reversal for Alcatel DSLAM only -+ * -+ * Revision 1.233 2004/03/11 03:09:48 mprahlad -+ * Add test mode for afeloopback test -+ * -+ * Revision 1.232 2004/03/10 23:15:53 ilyas -+ * Added ETSI modem support -+ * -+ * Revision 1.231 2004/03/04 19:28:14 linyin -+ * Support adsl2plus -+ * -+ * Revision 1.230 2004/02/28 00:06:21 ilyas -+ * Added OLR message definitions for ADSL2+ -+ * -+ * Revision 1.229 2004/02/13 03:21:15 mprahlad -+ * define kDslAturHwAgcMaxGain correctly for 6348 -+ * -+ * Revision 1.228 2004/02/09 05:06:17 yongbing -+ * Add ADSL2 bit swap function -+ * -+ * Revision 1.227 2004/02/04 02:08:19 linyin -+ * remove the redefined kG992p5AnnexA -+ * -+ * Revision 1.226 2004/02/04 01:41:48 linyin -+ * Add some variables for G992P5 -+ * -+ * Revision 1.225 2004/02/03 19:12:22 gsyu -+ * Added a dedicate structure and constants for G992P5 -+ * -+ * Revision 1.224 2004/01/24 01:18:34 ytan -+ * add multi-section swapping flag -+ * -+ * Revision 1.223 2004/01/17 00:21:48 ilyas -+ * Added commands and statuses for OLR -+ * -+ * Revision 1.222 2004/01/13 19:12:37 gsyu -+ * Added more constants for Double upstream -+ * -+ * Revision 1.221 2003/12/23 21:19:04 mprahlad -+ * Define BCM6348_TEMP_MOVE_TO_LMEM to FAST_TEXT for 6348 targets - this is for -+ * ADSL2/AnnexA multimode builds - move a few functions to Lmem for now to avoid -+ * changes for swap on 6348. -+ * -+ * Revision 1.220 2003/12/19 21:21:53 ilyas -+ * Added dying gasp support for ADSL2 -+ * -+ * Revision 1.219 2003/12/05 02:09:51 mprahlad -+ * Leave the AnalogEC defs in - saves ifdef-ing all uses of these defines. -+ * Include Bcm6345_To_Bcm6348.h - to be able to pick up macros for the -+ * transition -+ * -+ * Revision 1.218 2003/12/04 02:10:58 linyin -+ * Redefine some constants for supporting different pilot and TTR -+ * -+ * Revision 1.217 2003/12/03 02:24:39 gsyu -+ * Reverse previous check in for Double Upstream demo -+ * -+ * Revision 1.215 2003/11/20 00:58:47 yongbing -+ * Merge ADSL2 functionalities into Annex A branch -+ * -+ * Revision 1.214 2003/11/06 00:35:06 nino -+ * Added kDslWriteAfeRegCmd and kDslReadAfeRegCmd commands. -+ * -+ * Revision 1.213 2003/11/05 21:04:23 ilyas -+ * Added more codes for LOG data -+ * -+ * Revision 1.212 2003/10/22 00:51:52 yjchen -+ * define constant for quiet line noise -+ * -+ * Revision 1.211 2003/10/20 22:08:57 nino -+ * Added kDslSetRcvGainCmd and kDslBypassRcvHpfCmd debug commands. -+ * -+ * Revision 1.210 2003/10/18 00:04:59 yjchen -+ * define constants for G992P3 diagnostic mode channel response -+ * -+ * Revision 1.209 2003/10/17 22:41:29 yongbing -+ * Add INP message support -+ * -+ * Revision 1.208 2003/10/16 00:06:09 uid1249 -+ * Moved G.994 definitions from G.994p1MainTypes.h -+ * -+ * Revision 1.207 2003/10/15 20:45:11 linyin -+ * Add some constants for support Revision 2 -+ * -+ * Revision 1.206 2003/10/14 22:04:02 ilyas -+ * Added Nino's AFE statuses for 6348 -+ * -+ * Revision 1.205 2003/10/10 18:49:26 gsyu -+ * Added test modes to workaround the clock domain crossing bug, PR18038 -+ * -+ * Revision 1.204 2003/09/30 19:27:46 mprahlad -+ * ifdef AnalogEC definies with #ifndef BCM6348_SRC -+ * -+ * Revision 1.203 2003/09/26 19:36:34 linyin -+ * Add annexi constant and vars -+ * -+ * Revision 1.202 2003/09/25 20:16:13 yjchen -+ * remove featureNTR definition -+ * -+ * Revision 1.201 2003/09/08 20:29:51 ilyas -+ * Added test commands for chip regression tests -+ * -+ * Revision 1.200 2003/08/26 00:58:14 ilyas -+ * Added I432 reset command (for header compression) -+ * Fixed SoftDsl time (for I432 header compression) -+ * -+ * Revision 1.199 2003/08/26 00:37:29 ilyas -+ * #ifdef'ed DslFrameFunctions in dslCommand structure to save space -+ * -+ * Revision 1.198 2003/08/22 22:45:00 liang -+ * Change the NF field in G992CodingParams from uchar to ushort to support K=256 (dataRate=255*32kbps) in fast path. -+ * -+ * Revision 1.197 2003/08/21 21:19:05 ilyas -+ * Changed dataPumpCapabilities structure for G992P3 -+ * -+ * Revision 1.196 2003/08/12 22:44:28 khp -+ * - for Haixiang: added kDslTestMarginTweak command and marginTweakSpec -+ * -+ * Revision 1.195 2003/07/24 17:28:16 ovandewi -+ * added Tx filter change request code -+ * -+ * Revision 1.194 2003/07/24 15:48:55 yongbing -+ * Reduce TSSI buffer size to avoid crash at the beginning of G.994.1. Need to find out why -+ * -+ * Revision 1.193 2003/07/19 07:11:47 nino -+ * Revert back to version 1.191. -+ * -+ * Revision 1.191 2003/07/17 21:25:25 yongbing -+ * Add support for READSL2 and TSSI -+ * -+ * Revision 1.190 2003/07/14 19:42:33 yjchen -+ * add constants for G992P3 -+ * -+ * Revision 1.189 2003/07/10 23:07:11 liang -+ * Add demodCapability bit to minimize showtime ATUC xmt power through b&g table. -+ * -+ * Revision 1.188 2003/07/08 22:18:50 liang -+ * Added demodCapability bit for G.994.1 Annex A multimode operation. -+ * -+ * Revision 1.187 2003/07/07 23:24:43 ilyas -+ * Added G.dmt.bis definitions -+ * -+ * Revision 1.186 2003/06/25 02:44:02 liang -+ * Added demod capability bit kDslUE9000ADI918FECFixEnabled. -+ * Added back kDslHWEnableAnalogECUpdate & kDslHWEnableAnalogEC for backward compatibility (annex A). -+ * -+ * Revision 1.185 2003/06/18 01:39:19 ilyas -+ * Added AFE test commands. Add #defines for driver's builds -+ * -+ * Revision 1.184 2003/06/06 23:58:09 ilyas -+ * Added command and status for standalone AFE tests -+ * -+ * Revision 1.183 2003/05/29 21:09:32 nino -+ * - kDslHWEnableAnalogECUpdate define replaced with kDslHWSetDigitalEcUpdateMode -+ * - kDslHWEnableAnalogEC define replaced with kDslHWDisableDigitalECUpdate -+ * -+ * Revision 1.182 2003/04/15 22:08:15 liang -+ * Changed one of the demodCapability bit name from last checkin. -+ * -+ * Revision 1.181 2003/04/13 19:25:54 liang -+ * Added three more demodCapability bits. -+ * -+ * Revision 1.180 2003/04/02 02:09:17 liang -+ * Added demodCapability bit for ADI low rate option fix disable. -+ * -+ * Revision 1.179 2003/03/18 18:22:06 yongbing -+ * Use 32 tap TEQ for Annex I -+ * -+ * Revision 1.178 2003/03/06 00:58:07 ilyas -+ * Added SetStausBuffer command -+ * -+ * Revision 1.177 2003/02/25 00:46:26 ilyas -+ * Added T1.413 EOC vendor ID -+ * -+ * Revision 1.176 2003/02/21 23:30:54 ilyas -+ * Added Xmtgain command framing mode status and T1413VendorId parameters -+ * -+ * Revision 1.175 2003/02/07 22:13:55 liang -+ * Add demodCapabilities bits for sub-sample alignment and higher T1.413 level (used internally only). -+ * -+ * Revision 1.174 2003/01/23 02:54:07 liang -+ * Added demod capability bit for bitswap enable. -+ * -+ * Revision 1.173 2002/12/13 18:36:33 yongbing -+ * Add support for G.992.2 Annex C -+ * -+ * Revision 1.172 2002/12/10 23:27:12 ilyas -+ * Extended dslException parameter structure to allow printout from DslDiags -+ * -+ * Revision 1.171 2002/12/06 02:10:19 liang -+ * Moved the T1.413 RAck1/RAck2 switching variables to connection setup structure. -+ * Added/Modified the training progress codes for T1.413 RAck1/RAck2 and upstream 2x IFFT disable. -+ * -+ * Revision 1.170 2002/11/11 00:20:05 liang -+ * Add demod capability constant for internally disabling upstream 2x IFFT in T1.413 mode. -+ * -+ * Revision 1.169 2002/11/06 03:46:19 liang -+ * Add training progress code for upstream 2x IFFT disable. -+ * -+ * Revision 1.168 2002/11/01 01:41:06 ilyas -+ * Added flags for Centillium 4103 workarround -+ * -+ * Revision 1.167 2002/10/26 01:26:11 gsyu -+ * Move SoftDslLineHandler from SDRAM to LMEM -+ * -+ * Revision 1.166 2002/10/20 18:56:20 khp -+ * - for linyin -+ * - #ifdef NEC_NSIF_WORKAROUND: -+ * - add macros to extract NSIF status and fail counter vars -+ * -+ * Revision 1.165 2002/10/14 05:24:35 liang -+ * Add training status code to request alternate xmt filter (for Samsung 6-port ADI918 DSLAMs) to meet KT 2km spec. -+ * -+ * Revision 1.164 2002/10/08 21:44:50 ilyas -+ * Fixed EOC stuffing byte to indicate "no synchronization" action -+ * -+ * Revision 1.163 2002/10/03 19:34:24 ilyas -+ * Added size for EOC serial number register -+ * -+ * Revision 1.162 2002/09/28 02:42:27 yongbing -+ * Add retrain in T1.413 with R-Ack1 tone -+ * -+ * Revision 1.161 2002/09/28 01:23:35 gsyu -+ * Reverse us2xifft change so that we can install new us2xifft on the tree -+ * -+ * Revision 1.160 2002/09/26 23:30:48 yongbing -+ * Add synch symbol detection in Showtime -+ * -+ * Revision 1.159 2002/09/20 23:47:52 khp -+ * - for gsyu: enable 2X IFFT for Annex A (XMT_FFT_SIZE_2X) -+ * -+ * Revision 1.158 2002/09/14 03:26:39 ilyas -+ * Changed far-end RDI reporting -+ * -+ * Revision 1.157 2002/09/13 21:10:54 ilyas -+ * Added reporting of remote modem LOS and RDI. -+ * Moved G992CodingParams definition to SoftDsl.h -+ * -+ * Revision 1.156 2002/09/12 21:07:19 ilyas -+ * Added HEC, OCD and LCD counters -+ * -+ * Revision 1.155 2002/09/09 21:31:30 linyin -+ * Add two constant to support long reach -+ * -+ * Revision 1.154 2002/09/07 01:31:51 ilyas -+ * Added support for OEM parameters -+ * -+ * Revision 1.153 2002/09/04 22:36:14 mprahlad -+ * defines for non standard info added -+ * -+ * Revision 1.152 2002/08/02 21:59:09 liang -+ * Enable G.992.2 carrierInfo in capabitilities when G.992.1 annex A is used for G.992.2. -+ * -+ * Revision 1.151 2002/07/29 20:01:03 ilyas -+ * Added command for Atm VC map table change -+ * -+ * Revision 1.150 2002/07/18 22:30:47 liang -+ * Add xmt power and power cutback related constants. -+ * -+ * Revision 1.149 2002/07/11 01:30:58 ilyas -+ * Changed status for ShowtimeMargin reporting -+ * -+ * Revision 1.148 2002/07/09 19:19:09 ilyas -+ * Added status parameters for ShowtimeSNRMargin info and command to filter -+ * out SNR margin data -+ * -+ * Revision 1.147 2002/06/27 21:50:24 liang -+ * Added test command related demodCapabilities bits. -+ * -+ * Revision 1.146 2002/06/26 21:29:00 liang -+ * Added dsl test cmd structure and showtime margin connection info status. -+ * -+ * Revision 1.145 2002/06/15 05:15:51 ilyas -+ * Added definitions for Ping, Dying Gasp and other test commands -+ * -+ * Revision 1.144 2002/05/30 19:55:15 ilyas -+ * Added status for ADSL PHY MIPS exception -+ * Changed conflicting definition for higher rates (S=1/2) -+ * -+ * Revision 1.143 2002/05/21 23:41:07 yongbing -+ * First check-in of Annex C S=1/2 codes -+ * -+ * Revision 1.142 2002/04/29 22:25:09 georgep -+ * Merge from branch annexC_demo - add status message constants -+ * -+ * Revision 1.141 2002/04/18 19:00:35 ilyas -+ * Added include file for builds in CommEngine environment -+ * -+ * Revision 1.140 2002/04/18 00:18:36 yongbing -+ * Add detailed timeout error messages -+ * -+ * Revision 1.139 2002/04/02 10:03:18 ilyas -+ * Merged BERT from AnnexA branch -+ * -+ * Revision 1.138 2002/03/26 01:42:29 ilyas -+ * Added timeout message constants for annex C -+ * -+ * Revision 1.137 2002/03/22 19:39:22 yongbing -+ * Modify for co-exist of G994P1 and T1P413 -+ * -+ * Revision 1.136 2002/03/22 01:19:40 ilyas -+ * Add status message constants for total FEXT Bits, NEXT bits -+ * -+ * Revision 1.135 2002/03/10 22:32:24 liang -+ * Added report constants for LOS recovery and timing tone index. -+ * -+ * Revision 1.134 2002/03/07 22:06:32 georgep -+ * Replace ifdef G992P1 with G992P1_ANNEX_A for annex A variables -+ * -+ * Revision 1.133 2002/02/16 01:08:18 georgep -+ * Add log constant for showtime mse -+ * -+ * Revision 1.132 2002/02/08 04:36:27 ilyas -+ * Added commands for LOG file and fixed Idle mode pointer update -+ * -+ * Revision 1.131 2002/01/24 20:21:30 georgep -+ * Add logging defines, remove fast retrain defines -+ * -+ * Revision 1.130 2002/01/19 23:59:17 ilyas -+ * Added support for LOG and eye data to ADSL core target -+ * -+ * Revision 1.129 2002/01/16 23:43:54 liang -+ * Remove the carriage return character from last checkin. -+ * -+ * Revision 1.128 2002/01/15 22:27:13 ilyas -+ * Added command for ADSL loopback -+ * -+ * Revision 1.127 2002/01/10 07:18:22 ilyas -+ * Added status for printf (mainly for ADSL core debugging) -+ * -+ * Revision 1.126 2001/12/21 22:45:34 ilyas -+ * Added support for ADSL MIB data object -+ * -+ * Revision 1.125 2001/12/13 02:24:22 ilyas -+ * Added G997 (Clear EOC and G997 framer) support -+ * -+ * Revision 1.124 2001/11/30 05:56:31 liang -+ * Merged top of the branch AnnexBDevelopment onto top of the tree. -+ * -+ * Revision 1.123 2001/11/15 19:01:07 yongbing -+ * Modify only T1.413 part to the top of tree based on AnnexBDevelopment branch -+ * -+ * Revision 1.122 2001/10/19 00:12:07 ilyas -+ * Added support for frame oriented (no ATM) data link layer -+ * -+ * Revision 1.121 2001/10/09 22:35:13 ilyas -+ * Added more ATM statistics and OAM support -+ * -+ * Revision 1.105.2.20 2001/11/27 02:32:03 liang -+ * Combine vendor ID, serial #, and version number into SoftModemVersionNumber.c. -+ * -+ * Revision 1.105.2.19 2001/11/21 01:29:14 georgep -+ * Add a status message define for annexC -+ * -+ * Revision 1.105.2.18 2001/11/08 23:26:28 yongbing -+ * Add carrier selection function for Annex A and B -+ * -+ * Revision 1.105.2.17 2001/11/07 22:55:30 liang -+ * Report G992 rcv msg CRC error as what it is instead of time out. -+ * -+ * Revision 1.105.2.16 2001/11/05 19:56:21 liang -+ * Add DC offset info code. -+ * -+ * Revision 1.105.2.15 2001/10/16 00:47:16 yongbing -+ * Add return-to-T1p413 starting point if in error -+ * -+ * Revision 1.105.2.14 2001/10/15 23:14:01 yjchen -+ * remove ADSL_SINGLE_SYMBOL_BLOCK -+ * -+ * Revision 1.105.2.13 2001/10/12 18:07:16 yongbing -+ * Add support for T1.413 -+ * -+ * Revision 1.105.2.12 2001/10/04 00:23:52 liang -+ * Add connection info constants for TEQ coef and PSD. -+ * -+ * Revision 1.105.2.11 2001/10/03 01:44:01 liang -+ * Merged with codes from main tree (tag SoftDsl_2_18). -+ * -+ * Revision 1.105.2.10 2001/09/28 22:10:04 liang -+ * Add G994 exchange message status reports. -+ * -+ * Revision 1.105.2.9 2001/09/26 18:08:21 georgep -+ * Send status error message in case features field is not setup properly -+ * -+ * Revision 1.105.2.8 2001/09/05 01:58:13 georgep -+ * Added status message for annexC measured delay -+ * -+ * Revision 1.105.2.7 2001/08/29 00:37:52 georgep -+ * Add log constants for annexC -+ * -+ * Revision 1.105.2.6 2001/08/18 00:01:34 georgep -+ * Add constants for annexC -+ * -+ * Revision 1.105.2.5 2001/08/08 17:33:28 yongbing -+ * Merge with tag SoftDsl_2_17 -+ * -+ * Revision 1.120 2001/08/29 02:56:01 ilyas -+ * Added tests for flattening/unflatenning command and statuses (dual mode) -+ * -+ * Revision 1.119 2001/08/28 03:26:32 ilyas -+ * Added support for running host and adsl core parts separately ("dual" mode) -+ * -+ * Revision 1.118 2001/08/16 02:16:10 khp -+ * - mark functions with FAST_TEXT to reduce cycle counts for QPROC targets -+ * (replaces use of LMEM_INSN) -+ * -+ * Revision 1.117 2001/06/18 20:06:35 ilyas -+ * Added forward declaration of dslCommandStruc to avoid gcc warnings -+ * -+ * Revision 1.116 2001/06/18 19:49:36 ilyas -+ * Changes to include support for HOST_ONLY mode -+ * -+ * Revision 1.115 2001/06/01 22:00:33 ilyas -+ * Changed ATM PHY interface to accomodate UTOPIA needs -+ * -+ * Revision 1.114 2001/05/16 06:22:24 liang -+ * Added status reports for xmt & rcv prefix enable position. -+ * -+ * Revision 1.113 2001/05/02 20:34:32 georgep -+ * Added log constants for snr1 calculation -+ * -+ * Revision 1.112 2001/04/25 01:20:11 ilyas -+ * -+ * Don't use DSL frame functions if ATM_LAYER is not defined -+ * -+ * Revision 1.111 2001/04/17 21:13:00 georgep -+ * Define status constant kDslHWSetDigitalEcUpdateShift -+ * -+ * Revision 1.110 2001/04/16 23:38:36 georgep -+ * Add HW AGC constants for ATUR -+ * -+ * Revision 1.109 2001/04/06 23:44:53 georgep -+ * Added status constant for setting up digitalEcGainShift -+ * -+ * Revision 1.108 2001/03/29 05:58:34 liang -+ * Replaced the Aware compatibility codes with automatic detection codes. -+ * -+ * Revision 1.107 2001/03/25 06:11:22 liang -+ * Combined separate loop attenuation status for ATUR & ATUC into one status. -+ * Replace separate hardware AGC info status for ATUR & ATUC into hardware AGC -+ * request status and hardware AGC obtained status. -+ * Use store AGC command to save hardware AGC value instead of returning value -+ * from status report. -+ * -+ * Revision 1.106 2001/03/24 00:43:22 liang -+ * Report more checksum results (NumOfCalls, txSignal, rxSignal & eyeData). -+ * -+ * Revision 1.105 2001/03/16 23:57:31 georgep -+ * Added more loop attenuation reporting status constants -+ * -+ * Revision 1.104 2001/03/15 00:22:07 liang -+ * Back to version 1.101. -+ * -+ * Revision 1.103 2001/03/15 00:03:44 yjchen -+ * use kDslATURHardwareAGCInfo for AltoE14 AGC as well -+ * -+ * Revision 1.102 2001/03/14 23:10:56 yjchen -+ * add defns for AltoE14 AGC -+ * -+ * Revision 1.101 2001/03/08 23:31:34 georgep -+ * Added R, S, D, coding parameters to dslDataPumpCapabilities -+ * -+ * Revision 1.100 2001/02/10 03:03:09 ilyas -+ * Added one more DslFrame function -+ * -+ * Revision 1.99 2001/02/09 01:55:27 ilyas -+ * Added status codes and macros to support printing of AAL packets -+ * -+ * Revision 1.98 2001/01/30 23:28:10 georgep -+ * Added kDslDspControlStatus for handling changes to dsp params -+ * -+ * Revision 1.97 2001/01/12 01:17:18 georgep -+ * Added bit in demodCapabilities for analog echo cancellor -+ * -+ * Revision 1.96 2001/01/04 05:51:03 ilyas -+ * Added more dslStatuses -+ * -+ * Revision 1.95 2000/12/21 05:46:07 ilyas -+ * Added name for struct _dslFrame -+ * -+ * Revision 1.94 2000/12/13 22:04:39 liang -+ * Add Reed-Solomon coding enable bit in demodCapabilities. -+ * -+ * Revision 1.93 2000/11/29 20:42:02 liang -+ * Add defines for SNR & max achivable rate status and DEC enable demodCapabilities bit. -+ * -+ * Revision 1.92 2000/09/22 21:55:13 ilyas -+ * Added support for DSL + Atm physical layer only (I.432) simulations -+ * -+ * Revision 1.91 2000/09/10 09:20:53 lkaplan -+ * Improve interface for sending Eoc messages -+ * -+ * Revision 1.90 2000/09/08 19:37:58 lkaplan -+ * Added code for handling EOC messages -+ * -+ * Revision 1.89 2000/09/07 23:02:27 georgep -+ * Add HarwareAGC Bit to demod Capabilities -+ * -+ * Revision 1.88 2000/09/01 00:57:34 georgep -+ * Added Hardware AGC status defines -+ * -+ * Revision 1.87 2000/08/31 19:04:26 liang -+ * Added external reference for stack size requirement test functions. -+ * -+ * Revision 1.86 2000/08/24 23:16:46 liang -+ * Increased sample block size for noBlock. -+ * -+ * Revision 1.85 2000/08/23 18:34:39 ilyas -+ * Added XxxVcConfigure function -+ * -+ * Revision 1.84 2000/08/05 00:25:04 georgep -+ * Redefine sampling freq constants -+ * -+ * Revision 1.83 2000/08/03 14:04:00 liang -+ * Add hardware time tracking clock error reset code. -+ * -+ * Revision 1.82 2000/07/23 20:52:52 ilyas -+ * Added xxxFrameBufSetAddress() function for ATM framer layers -+ * Rearranged linkLayer functions in one structure which is passed as a -+ * parameter to xxxLinkLayerInit() function to be set there -+ * -+ * Revision 1.81 2000/07/18 20:03:24 ilyas -+ * Changed DslFrame functions definitions to macros, -+ * Removed gDslVars from their parameter list -+ * -+ * Revision 1.80 2000/07/17 21:08:15 lkaplan -+ * removed global pointer -+ * -+ * Revision 1.79 2000/06/21 20:38:44 georgep -+ * Added bit to demodCapabilities for HW_TIME_TRACKING -+ * -+ * Revision 1.78 2000/06/19 19:57:55 georgep -+ * Added constants for logging of HWResampler data -+ * -+ * Revision 1.77 2000/06/02 18:57:21 ilyas -+ * Added support for DSL buffers consisting of many ATM cells -+ * -+ * Revision 1.76 2000/05/27 02:19:28 liang -+ * G992MonitorParams structure is moved here, and Tx/Rx data handler type definitions changed. -+ * -+ * Revision 1.75 2000/05/15 18:17:21 liang -+ * Added statuses for sent and received frames -+ * -+ * Revision 1.74 2000/05/14 01:56:38 ilyas -+ * Added ATM cell printouts -+ * -+ * Revision 1.73 2000/05/09 23:00:26 ilyas -+ * Added ATM status messages, ATM timer, Tx frames flush on timeout -+ * Fixed a bug - adding flushed Tx frames to the list of free Rx frames -+ * -+ * Revision 1.72 2000/05/03 18:01:18 georgep -+ * Removed old function declarations for Eoc/Aoc -+ * -+ * Revision 1.71 2000/05/03 03:57:04 ilyas -+ * Added LOG file support for writing ATM data -+ * -+ * Revision 1.70 2000/05/02 00:04:36 liang -+ * Add showtime monitoring and message exchange info constants. -+ * -+ * Revision 1.69 2000/04/28 23:34:20 yongbing -+ * Add constants for reporting error events in performance monitoring -+ * -+ * Revision 1.68 2000/04/21 23:09:04 liang -+ * Added G992 time out training progress constant. -+ * -+ * Revision 1.67 2000/04/19 00:31:47 ilyas -+ * Added global SoftDsl functions for Vc, added OOB info functions -+ * -+ * Revision 1.66 2000/04/18 00:45:31 yongbing -+ * Add G.DMT new frame structure, define G992P1_NEWFRAME to enable, need ATM layer to work -+ * -+ * Revision 1.65 2000/04/15 01:48:34 georgep -+ * Added T1p413 status constants -+ * -+ * Revision 1.64 2000/04/13 08:36:22 yura -+ * Added SoftDslSetRefData, SoftDslGetRefData functions -+ * -+ * Revision 1.63 2000/04/13 05:42:35 georgep -+ * Added constant for T1p413 -+ * -+ * Revision 1.62 2000/04/05 21:49:54 liang -+ * minor change. -+ * -+ * Revision 1.61 2000/04/04 04:16:06 liang -+ * Merged with SoftDsl_0_03 from old tree. -+ * -+ * Revision 1.65 2000/04/04 01:47:21 ilyas -+ * Implemented abstract dslFrame and dslFrameBuffer objects -+ * -+ * Revision 1.64 2000/04/01 08:12:10 yura -+ * Added preliminary revision of the SoftDsl driver architecture -+ * -+ * Revision 1.63 2000/04/01 02:55:33 georgep -+ * New defines for G992p2Profile Structure -+ * -+ * Revision 1.62 2000/04/01 00:50:36 yongbing -+ * Add initial version of new frame structure for full-rate -+ * -+ * Revision 1.61 2000/03/24 03:30:45 georgep -+ * Define new constant kDslUpstreamSamplingFreq -+ * -+ * Revision 1.60 2000/03/23 19:51:30 georgep -+ * Define new features bits for G992p1 -+ * -+ * Revision 1.59 2000/03/18 01:28:41 georgep -+ * Changed connectionSetup to include G992p1 Capabilities -+ * -+ * Revision 1.58 2000/02/29 01:40:03 georgep -+ * Changed modulationtype defines to be the same as SPAR1 in G994p1 -+ * -+ * Revision 1.57 1999/11/19 01:03:19 george -+ * Use Block Size 256 for single symbol Mode -+ * -+ * Revision 1.56 1999/11/18 02:37:43 george -+ * Porting to 16Bit -+ * -+ * Revision 1.55 1999/11/12 02:12:55 george -+ * Added status constant for reporting of profile channel matching calculation -+ * -+ * Revision 1.54 1999/11/11 19:19:42 george -+ * Porting to 16Bit Compiler -+ * -+ * Revision 1.53 1999/11/05 01:27:06 liang -+ * Add recovery-from-inpulse-noise progress report. -+ * -+ * Revision 1.52 1999/11/02 02:06:27 george -+ * Added SNRMargin training status value -+ * -+ * Revision 1.51 1999/10/27 23:02:03 wan -+ * Add G.994.1 setup in dslConnectionSetupStruct for setting up Initiation side -+ * -+ * Revision 1.50 1999/10/25 21:55:36 liang -+ * Renamed the constant for FEQ output error. -+ * -+ * Revision 1.49 1999/10/23 02:20:55 george -+ * Add debug data codes -+ * -+ * Revision 1.48 1999/10/19 23:59:06 liang -+ * Change line handler interface to work with nonsymmetric sampling freq. -+ * -+ * Revision 1.47 1999/10/09 01:38:04 george -+ * Define maxProfileNumber -+ * -+ * Revision 1.46 1999/10/07 23:30:51 wan -+ * Add G.994.1 Tone and Fast Retrain Recov detections in G.992p2 SHOWTIME and Fast Retrain -+ * -+ * Revision 1.45 1999/10/06 13:59:27 liang -+ * Escape to G994.1 should be done through status instead of command. -+ * -+ * Revision 1.44 1999/10/06 02:01:28 george -+ * Add kDslReturnToG994p1Cmd -+ * -+ * Revision 1.43 1999/09/30 19:29:58 george -+ * Add reporting constant for Fast Retrain -+ * -+ * Revision 1.42 1999/09/16 23:41:56 liang -+ * Added command for host forced retrain. -+ * -+ * Revision 1.41 1999/08/20 00:47:25 wan -+ * Add constants for Fast Retrain progress status -+ * -+ * Revision 1.40 1999/08/16 18:06:01 wan -+ * Add more reporting constants for Fast Retrain -+ * -+ * Revision 1.39 1999/08/12 00:18:10 wan -+ * Add several Fast Retrain Status constants -+ * -+ * Revision 1.38 1999/08/10 18:25:38 george -+ * Define constants used for Fast Retrain -+ * -+ * Revision 1.37 1999/07/31 01:47:43 george -+ * Add status constants for eoc/aoc -+ * -+ * Revision 1.36 1999/07/27 18:19:52 george -+ * declare aoc/eoc functions -+ * -+ * Revision 1.35 1999/07/19 22:44:47 george -+ * Add constants for G994p1 Message Exchange -+ * -+ * Revision 1.34 1999/07/16 02:03:03 liang -+ * Modified Dsl link layer command spec structure. -+ * -+ * Revision 1.33 1999/07/14 22:53:16 george -+ * Add Constants for G994p1 -+ * -+ * Revision 1.32 1999/07/13 00:02:26 liang -+ * Added more feature bits. -+ * -+ * Revision 1.31 1999/07/09 01:58:14 wan -+ * Added more constants G.994.1 testing reports -+ * -+ * Revision 1.30 1999/07/07 23:51:04 liang -+ * Added rcv power and loop attenuation reports. -+ * -+ * Revision 1.29 1999/07/06 21:32:01 liang -+ * Added some aux. feature bits, and field performanceMargin was changed to noiseMargin in Capabilities. -+ * -+ * Revision 1.28 1999/07/03 01:40:17 liang -+ * Redefined dsl command parameter list and added connection setup struct. -+ * -+ * Revision 1.27 1999/07/02 00:41:18 liang -+ * Add bit and gain logging as well as rcv carrier range status. -+ * -+ * Revision 1.26 1999/06/25 21:37:10 wan -+ * Work in progress for G994.1. -+ * -+ * Revision 1.25 1999/06/16 00:54:36 liang -+ * Added Tx/Rx SHOWTIME active training progress codes. -+ * -+ * Revision 1.24 1999/06/11 21:59:37 wan -+ * Added G994.1 fail status constant. -+ * -+ * Revision 1.23 1999/06/11 21:29:01 liang -+ * Constants for C/R-Msgs was changed to C/R-Msg. -+ * -+ * Revision 1.22 1999/06/08 02:49:42 liang -+ * Added SNR data logging. -+ * -+ * Revision 1.21 1999/06/07 21:05:08 liang -+ * Added more training status values. -+ * -+ * Revision 1.20 1999/05/22 02:18:26 liang -+ * More constant defines. -+ * -+ * Revision 1.19 1999/05/14 22:49:35 liang -+ * Added more status codes and debug data codes. -+ * -+ * Revision 1.18 1999/04/12 22:41:39 liang -+ * Work in progress. -+ * -+ * Revision 1.17 1999/04/01 20:28:07 liang -+ * Added RReverb detect event status. -+ * -+ * Revision 1.16 1999/03/26 03:29:54 liang -+ * Add DSL debug data constants. -+ * -+ * Revision 1.15 1999/03/08 21:58:00 liang -+ * Added more constant definitions. -+ * -+ * Revision 1.14 1999/03/02 01:49:36 liang -+ * Added more connection info codes. -+ * -+ * Revision 1.13 1999/03/02 00:25:55 liang -+ * Added DSL tx and rx data handler type definitions. -+ * -+ * Revision 1.12 1999/02/27 01:16:55 liang -+ * Increase allowable static memory size to a VERY large number for now. -+ * -+ * Revision 1.11 1999/02/25 00:24:06 liang -+ * Increased symbol block size to 16. -+ * -+ * Revision 1.10 1999/02/23 22:03:26 liang -+ * Increased maximal static memory size allowed. -+ * -+ * Revision 1.9 1999/02/17 02:39:21 ilyas -+ * Changes for NDIS -+ * -+ * Revision 1.8 1999/02/11 22:44:30 ilyas -+ * More definitions for ATM -+ * -+ * Revision 1.7 1999/02/10 01:56:38 liang -+ * Added hooks for G994.1 and G992.2. -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef SoftDslHeader -+#define SoftDslHeader -+ -+/* for builds in Linux/VxWorks CommEngine environment */ -+#if (defined(__KERNEL__) && !defined(LINUX_DRIVER)) || defined(VXWORKS) || defined(_WIN32_WCE) || defined(TARG_OS_RTEMS) || defined(_CFE_) -+#include "AdslCoreDefs.h" -+#else -+#include "Bcm6345_To_Bcm6348.h" /* File for 45->48 changes */ -+#endif -+ -+#ifndef SoftModemPh -+#include "SoftModem.h" -+#endif -+ -+#ifdef DSL_OS -+#include "DslOs.h" -+#endif -+ -+/* -+** -+** Type definitions -+** -+*/ -+ -+#if defined(ATM) || defined(DSL_PACKET) -+#define DSL_LINKLAYER -+#endif -+ -+#if defined(ATM_LAYER) || defined(DSL_PACKET_LAYER) || defined(G997_1_FRAMER) -+#define DSL_FRAME_FUNCTIONS -+#endif -+ -+#define FLD_OFFSET(type,fld) ((int)(void *)&(((type *)0)->fld)) -+ -+#include "Que.h" -+#include "SoftAtmVc.h" -+ -+typedef struct _dslFrameBuffer -+ { -+ struct _dslFrameBuffer *next; /* link to the next buffer in the frame */ -+ void *pData; /* pointer to data */ -+ ulong length; /* size (in bytes) of data */ -+ } dslFrameBuffer; -+ -+typedef struct _dslFrame -+ { -+ ulong Reserved[3]; -+ -+ ulong totalLength; /* total amount of data in the packet */ -+ int bufCnt; /* buffer counter */ -+ struct _dslFrameBuffer *head; /* first buffer in the chain */ -+ struct _dslFrameBuffer *tail; /* last buffer in the chain */ -+ } dslFrame; -+ -+ -+/* VC types and parameters */ -+ -+#define kDslVcAtm 1 -+ -+typedef struct -+ { -+ ulong vcType; -+ union -+ { -+ atmVcParams atmParams; -+ } params; -+ } dslVcParams; -+ -+/* -+** Assuming that dslVcParams.params is the first field in VC -+** and RefData is the first field in dslVcParams.params -+*/ -+ -+#define DslVcGetRefData(pVc) (*(void **) (pVc)) -+ -+/* Frame OOB types */ -+ -+#define kDslFrameAtm 1 -+ -+typedef struct -+ { -+ ulong frameType; -+ union -+ { -+ atmOobPacketInfo atmInfo; -+ } param; -+ } dslOobFrameInfo; -+ -+ -+typedef struct -+ { -+ ulong (SM_DECL *__DslFrameBufferGetLength) (dslFrameBuffer *fb); -+ void * (SM_DECL *__DslFrameBufferGetAddress) (dslFrameBuffer *fb); -+ void (SM_DECL *__DslFrameBufferSetLength) (dslFrameBuffer *fb, ulong l); -+ void (SM_DECL *__DslFrameBufferSetAddress) (dslFrameBuffer *fb, void *p); -+ -+ void (SM_DECL *__DslFrameInit) (dslFrame *f); -+ ulong (SM_DECL *__DslFrameGetLength) (dslFrame *pFrame); -+ ulong (SM_DECL *__DslFrameGetBufCnt) (dslFrame *pFrame); -+ dslFrameBuffer * (SM_DECL *__DslFrameGetFirstBuffer) (dslFrame *pFrame); -+ dslFrameBuffer * (SM_DECL *__DslFrameGetNextBuffer) (dslFrameBuffer *pFrBuffer); -+ void (SM_DECL *__DslFrameSetNextBuffer) (dslFrameBuffer *pFrBuf, dslFrameBuffer *pFrBufNext); -+ dslFrameBuffer * (SM_DECL *__DslFrameGetLastBuffer) (dslFrame *pFrame); -+ void * (SM_DECL *__DslFrameGetLinkFieldAddress) (dslFrame *f); -+ dslFrame * (SM_DECL *__DslFrameGetFrameAddressFromLink) (void *lnk); -+ -+ Boolean (SM_DECL *__DslFrameGetOobInfo) (dslFrame *f, dslOobFrameInfo *pOobInfo); -+ Boolean (SM_DECL *__DslFrameSetOobInfo) (dslFrame *f, dslOobFrameInfo *pOobInfo); -+ -+ void (SM_DECL *__DslFrameEnqueBufferAtBack) (dslFrame *f, dslFrameBuffer *b); -+ void (SM_DECL *__DslFrameEnqueFrameAtBack) (dslFrame *fMain, dslFrame *f); -+ void (SM_DECL *__DslFrameEnqueBufferAtFront) (dslFrame *f, dslFrameBuffer *b); -+ void (SM_DECL *__DslFrameEnqueFrameAtFront) (dslFrame *fMain, dslFrame *f); -+ dslFrameBuffer * (SM_DECL *__DslFrameDequeBuffer) (dslFrame *pFrame); -+ -+ void * (SM_DECL *__DslFrameAllocMemForFrames) (ulong frameNum); -+ void (SM_DECL *__DslFrameFreeMemForFrames) (void *hMem); -+ dslFrame * (SM_DECL *__DslFrameAllocFrame) (void *handle); -+ void (SM_DECL *__DslFrameFreeFrame) (void *handle, dslFrame *pFrame); -+ void * (SM_DECL *__DslFrameAllocMemForBuffers) (void **ppMemPool, ulong bufNum, ulong memSize); -+ void (SM_DECL *__DslFrameFreeMemForBuffers) (void *hMem, ulong memSize, void *pMemPool); -+ dslFrameBuffer * (SM_DECL *__DslFrameAllocBuffer) (void *handle, void *pMem, ulong length); -+ void (SM_DECL *__DslFrameFreeBuffer) (void *handle, dslFrameBuffer *pBuf); -+ -+ /* for LOG file support */ -+ -+ ulong (SM_DECL *__DslFrame2Id)(void *handle, dslFrame *pFrame); -+ void * (SM_DECL *__DslFrameId2Frame)(void *handle, ulong frameId); -+ } dslFrameFunctions; -+ -+#define DslFrameDeclareFunctions( name_prefix ) \ -+extern ulong SM_DECL name_prefix##BufferGetLength(dslFrameBuffer *fb); \ -+extern void * SM_DECL name_prefix##BufferGetAddress(dslFrameBuffer *fb); \ -+extern void SM_DECL name_prefix##BufferSetLength(dslFrameBuffer *fb, ulong l); \ -+extern void SM_DECL name_prefix##BufferSetAddress(dslFrameBuffer *fb, void *p); \ -+ \ -+extern void SM_DECL name_prefix##Init(dslFrame *f); \ -+extern ulong SM_DECL name_prefix##GetLength (dslFrame *pFrame); \ -+extern ulong SM_DECL name_prefix##GetBufCnt(dslFrame *pFrame); \ -+extern dslFrameBuffer * SM_DECL name_prefix##GetFirstBuffer(dslFrame *pFrame); \ -+extern dslFrameBuffer * SM_DECL name_prefix##GetNextBuffer(dslFrameBuffer *pFrBuffer); \ -+extern void SM_DECL name_prefix##SetNextBuffer(dslFrameBuffer *pFrBuf, dslFrameBuffer *pFrBufNext); \ -+extern dslFrameBuffer * SM_DECL name_prefix##GetLastBuffer(dslFrame *pFrame); \ -+extern void * SM_DECL name_prefix##GetLinkFieldAddress(dslFrame *f); \ -+extern Boolean SM_DECL name_prefix##GetOobInfo(dslFrame *f, dslOobFrameInfo *pOobInfo); \ -+extern Boolean SM_DECL name_prefix##SetOobInfo(dslFrame *f, dslOobFrameInfo *pOobInfo); \ -+extern dslFrame* SM_DECL name_prefix##GetFrameAddressFromLink(void *lnk); \ -+extern void SM_DECL name_prefix##EnqueBufferAtBack(dslFrame *f, dslFrameBuffer *b); \ -+extern void SM_DECL name_prefix##EnqueFrameAtBack(dslFrame *fMain, dslFrame *f); \ -+extern void SM_DECL name_prefix##EnqueBufferAtFront(dslFrame *f, dslFrameBuffer *b); \ -+extern void SM_DECL name_prefix##EnqueFrameAtFront(dslFrame *fMain, dslFrame *f); \ -+extern dslFrameBuffer * SM_DECL name_prefix##DequeBuffer(dslFrame *pFrame); \ -+ \ -+extern void * SM_DECL name_prefix##AllocMemForFrames(ulong frameNum); \ -+extern void SM_DECL name_prefix##FreeMemForFrames(void *hMem); \ -+extern dslFrame * SM_DECL name_prefix##AllocFrame(void *handle); \ -+extern void SM_DECL name_prefix##FreeFrame(void *handle, dslFrame *pFrame); \ -+extern void * SM_DECL name_prefix##AllocMemForBuffers(void **ppMemPool, ulong bufNum, ulong memSize); \ -+extern void SM_DECL name_prefix##FreeMemForBuffers(void *hMem, ulong memSize, void *pMemPool); \ -+extern dslFrameBuffer * SM_DECL name_prefix##AllocBuffer(void *handle, void *pMem, ulong length); \ -+extern void SM_DECL name_prefix##FreeBuffer(void *handle, dslFrameBuffer *pBuf); \ -+extern ulong SM_DECL name_prefix##2Id(void *handle, dslFrame *pFrame); \ -+extern void * SM_DECL name_prefix##Id2Frame(void *handle, ulong frameId); -+ -+ -+#define DslFrameAssignFunctions( var, name_prefix ) do { \ -+ (var).__DslFrameBufferGetLength = name_prefix##BufferGetLength; \ -+ (var).__DslFrameBufferGetAddress= name_prefix##BufferGetAddress; \ -+ (var).__DslFrameBufferSetLength = name_prefix##BufferSetLength; \ -+ (var).__DslFrameBufferSetAddress= name_prefix##BufferSetAddress; \ -+ \ -+ (var).__DslFrameInit = name_prefix##Init; \ -+ (var).__DslFrameGetLength = name_prefix##GetLength; \ -+ (var).__DslFrameGetBufCnt = name_prefix##GetBufCnt; \ -+ (var).__DslFrameGetFirstBuffer = name_prefix##GetFirstBuffer; \ -+ (var).__DslFrameGetNextBuffer = name_prefix##GetNextBuffer; \ -+ (var).__DslFrameSetNextBuffer = name_prefix##SetNextBuffer; \ -+ (var).__DslFrameGetLastBuffer = name_prefix##GetLastBuffer; \ -+ (var).__DslFrameGetLinkFieldAddress = name_prefix##GetLinkFieldAddress; \ -+ (var).__DslFrameGetFrameAddressFromLink = name_prefix##GetFrameAddressFromLink; \ -+ \ -+ (var).__DslFrameGetOobInfo = name_prefix##GetOobInfo; \ -+ (var).__DslFrameSetOobInfo = name_prefix##SetOobInfo; \ -+ \ -+ (var).__DslFrameEnqueBufferAtBack = name_prefix##EnqueBufferAtBack; \ -+ (var).__DslFrameEnqueFrameAtBack = name_prefix##EnqueFrameAtBack; \ -+ (var).__DslFrameEnqueBufferAtFront= name_prefix##EnqueBufferAtFront; \ -+ (var).__DslFrameEnqueFrameAtFront = name_prefix##EnqueFrameAtFront; \ -+ (var).__DslFrameDequeBuffer = name_prefix##DequeBuffer; \ -+ \ -+ (var).__DslFrameAllocMemForFrames = name_prefix##AllocMemForFrames; \ -+ (var).__DslFrameFreeMemForFrames = name_prefix##FreeMemForFrames; \ -+ (var).__DslFrameAllocFrame = name_prefix##AllocFrame; \ -+ (var).__DslFrameFreeFrame = name_prefix##FreeFrame; \ -+ (var).__DslFrameAllocMemForBuffers= name_prefix##AllocMemForBuffers; \ -+ (var).__DslFrameFreeMemForBuffers = name_prefix##FreeMemForBuffers; \ -+ (var).__DslFrameAllocBuffer = name_prefix##AllocBuffer; \ -+ (var).__DslFrameFreeBuffer = name_prefix##FreeBuffer; \ -+ \ -+ (var).__DslFrame2Id = name_prefix##2Id; \ -+ (var).__DslFrameId2Frame = name_prefix##Id2Frame; \ -+} while (0) -+ -+typedef struct -+ { -+ Boolean febe_I; -+ Boolean fecc_I; -+ Boolean los, rdi; -+ Boolean ncd_I; -+ Boolean hec_I; -+#ifdef G992P3 -+ Boolean lpr; -+#endif -+ -+#ifdef G992P1_NEWFRAME -+ -+ Boolean febe_F; -+ Boolean fecc_F; -+ Boolean ncd_F; -+ Boolean hec_F; -+ -+#endif -+ } G992MonitorParams; -+ -+typedef struct -+ { -+ ushort K; -+ uchar S, R; -+ uchar D; -+#ifdef G992P3 -+ uchar T, SEQ; -+#endif -+ directionType direction; -+ -+#ifdef G992P1_NEWFRAME -+ -+ ushort N; -+ ushort NF; -+ uchar RSF; -+ -+ uchar AS0BF, AS1BF, AS2BF, AS3BF, AEXAF; -+ ushort AS0BI; -+ uchar AS1BI, AS2BI, AS3BI, AEXAI; -+ -+ uchar LS0CF, LS1BF, LS2BF, LEXLF; -+ uchar LS0CI, LS1BI, LS2BI, LEXLI; -+ -+ uchar mergedModeEnabled; -+ -+#endif -+ -+ } G992CodingParams; -+ -+typedef struct -+ { -+ uchar Nlp; -+ uchar Nbc; -+ uchar MSGlp; -+ ushort MSGc; -+ -+ ulong L; -+ ushort M; -+ ushort T; -+ ushort D; -+ ushort R; -+ ushort B; -+ } G992p3CodingParams; -+ -+/* Power Management Message definitions (used in command and status) */ -+ -+typedef struct -+ { -+ long msgType; -+ union -+ { -+ long value; -+ struct -+ { -+ long msgLen; -+ void *msgData; -+ } msg; -+ } param; -+ } dslPwrMessage; -+ -+/* Power Management commands and responses */ -+ -+#define kPwrSimpleRequest 1 -+#define kPwrL2Request 2 -+#define kPwrL2TrimRequest 3 -+ -+#define kPwrGrant 0x80 -+#define kPwrReject 0x81 -+#define kPwrL2Grant 0x82 -+#define kPwrL2Reject 0x83 -+#define kPwrL2TrimGrant 0x84 -+#define kPwrL2TrimReject 0x85 -+#define kPwrL2Grant2p 0x86 -+ -+#define kPwrBusy 0x01 -+#define kPwrInvalid 0x02 -+#define kPwrNotDesired 0x03 -+#define kPwrInfeasibleParam 0x04 -+ -+/* Power Management reason codes */ -+ -+/* OLR definitions (used in command and status) */ -+ -+typedef struct -+ { -+ ushort msgType; -+ ushort nCarrs; -+ ushort L[4]; -+ uchar B[4]; -+ void *carrParamPtr; -+ } dslOLRMessage; -+ -+typedef struct -+ { -+ uchar ind; -+ uchar gain; -+ uchar gb; -+ } dslOLRCarrParam; -+ -+typedef struct -+ { -+ ushort ind; -+ uchar gain; -+ uchar gb; -+ } dslOLRCarrParam2p; -+ -+/* OLR messages */ -+ -+#define kOLRRequestType1 1 -+#define kOLRRequestType2 2 -+#define kOLRRequestType3 3 -+#define kOLRRequestType4 4 -+#define kOLRRequestType5 5 -+#define kOLRRequestType6 6 -+ -+#define kOLRDeferType1 0x81 -+#define kOLRRejectType2 0x82 -+#define kOLRRejectType3 0x83 -+ -+/* OLR reason codes */ -+ -+#define kOLRBusy 1 -+#define kOLRInvalidParam 2 -+#define kOLRNotEnabled 3 -+#define kOLRNotSupported 4 -+ -+/* common EOC definitions */ -+#define kG992EocStuffingByte 0x0C -+ -+/* showtime monitor counters */ -+#define kG992ShowtimeRSCodewordsRcved 0 /* number of Reed-Solomon codewords received */ -+#define kG992ShowtimeRSCodewordsRcvedOK 1 /* number of Reed-Solomon codewords received with all symdromes zero */ -+#define kG992ShowtimeRSCodewordsRcvedCorrectable 2 /* number of Reed-Solomon codewords received with correctable errors */ -+#define kG992ShowtimeRSCodewordsRcvedUncorrectable 3 /* number of Reed-Solomon codewords received with un-correctable errors */ -+#define kG992ShowtimeSuperFramesRcvd 4 /* number of super frames received */ -+#define kG992ShowtimeSuperFramesRcvdWrong 5 /* number of super frames received with CRC error */ -+#define kG992ShowtimeLastUncorrectableRSCount 6 /* last recorded value for kG992ShowtimeRSCodewordsRcvedUncorrectable */ -+#define kG992ShowtimeLastWrongSuperFrameCount 7 /* last recorded value for kG992ShowtimeSuperFramesRcvdWrong */ -+#define kG992ShowtimeNumOfShortResync 8 /* number of short interrupt recoveries by FEQ */ -+ -+#define kG992ShowtimeNumOfFEBE 9 /* number of other side superframe errors */ -+#define kG992ShowtimeNumOfFECC 10 /* number of other side superframe FEC errors */ -+#define kG992ShowtimeNumOfFHEC 11 /* number of far-end ATM header CRC errors */ -+#define kG992ShowtimeNumOfFOCD 12 /* number of far-end OCD events */ -+#define kG992ShowtimeNumOfFLCD 13 /* number of far-end LCD events */ -+#define kG992ShowtimeNumOfHEC 14 /* number of ATM header CRC errors */ -+#define kG992ShowtimeNumOfOCD 15 /* number of OCD events */ -+#define kG992ShowtimeNumOfLCD 16 /* number of LCD events */ -+ -+#define kG992ShowtimeNumOfMonitorCounters (kG992ShowtimeNumOfLCD+1) /* always last number + 1 */ -+#define kG992ShowtimeMonitorReportNumber 9 -+ -+#define kG992ShowtimeLCDNumShift 1 -+#define kG992ShowtimeLCDFlag 1 -+ -+typedef int (SM_DECL *dslFrameHandlerType) (void *gDslVars, void *pVc, ulong mid, dslFrame *); -+ -+typedef void* (SM_DECL *dslHeaderHandlerType) (void *gDslVars, ulong hdr, uchar hdrHec); -+typedef void* (SM_DECL *dslTxFrameBufferHandlerType) (void *gDslVars, int*, void*); -+typedef void* (SM_DECL *dslRxFrameBufferHandlerType) (void *gDslVars, int, void*); -+ -+typedef void* (SM_DECL *dslVcAllocateHandlerType) (void *gDslVars, void *); -+typedef void (SM_DECL *dslVcFreeHandlerType) (void *gDslVars, void *); -+typedef Boolean (SM_DECL *dslVcActivateHandlerType) (void *gDslVars, void *); -+typedef void (SM_DECL *dslVcDeactivateHandlerType) (void *gDslVars, void *); -+typedef Boolean (SM_DECL *dslVcConfigureHandlerType) (void *gDslVars, void *pVc, ulong mid, void *); -+ -+typedef ulong (SM_DECL *dslLinkVc2IdHandlerType) (void *gDslVars, void *); -+typedef void* (SM_DECL *dslLinkVcId2VcHandlerType) (void *gDslVars, ulong); -+typedef void* (SM_DECL *dslGetFramePoolHandlerType) (void *gDslVars); -+ -+typedef void (SM_DECL *dslLinkCloseHandlerType) (void *gDslVars); -+typedef int (SM_DECL *dslTxDataHandlerType)(void *gDslVars, int, int, uchar*, G992MonitorParams*); -+typedef int (SM_DECL *dslRxDataHandlerType)(void *gDslVars, int, uchar*, G992MonitorParams*); -+ -+typedef void (SM_DECL *dslLinkStatusHandler) (void *gDslVars, ulong statusCode, ...); -+ -+typedef Boolean (SM_DECL *dslPhyInitType) ( -+ void *gDslVars, -+ bitMap setupMap, -+ dslHeaderHandlerType rxCellHeaderHandlerPtr, -+ dslRxFrameBufferHandlerType rxFrameHandlerPtr, -+ dslTxFrameBufferHandlerType txFrameHandlerPtr, -+ atmStatusHandler statusHandlerPtr); -+ -+struct _dslFramerBufDesc; -+ -+typedef Boolean (SM_DECL *dslFramerDataGetPtrHandlerType) (void *gDslVars, struct _dslFramerBufDesc *pBufDesc); -+typedef void (SM_DECL *dslFramerDataDoneHandlerType) (void *gDslVars, struct _dslFramerBufDesc *pBufDesc); -+ -+typedef void (SM_DECL *dslDriverCallbackType) (void *gDslVars); -+ -+#ifdef DSL_PACKET -+ -+typedef struct -+ { -+ dslFramerDataGetPtrHandlerType rxDataGetPtrHandler; -+ dslFramerDataDoneHandlerType rxDataDoneHandler; -+ dslFramerDataGetPtrHandlerType txDataGetPtrHandler; -+ dslFramerDataDoneHandlerType txDataDoneHandler; -+ } dslPacketPhyFunctions; -+ -+typedef Boolean (SM_DECL *dslPacketPhyInitType) ( -+ void *gDslVars, -+ bitMap setupMap, -+ dslPacketPhyFunctions dslPhyFunctions, -+ dslLinkStatusHandler statusHandlerPtr); -+ -+ -+#endif /* DSL_PACKET */ -+ -+ -+typedef int dslDirectionType; -+typedef bitMap dslModulationType; -+typedef bitMap dslLinkLayerType; -+ -+/* -+** -+** Log data codes -+** -+*/ -+ -+#define kDslEyeData eyeData -+ -+#define kDslLogComplete (inputSignalData - 1) -+#define kDslLogInputData inputSignalData -+#define kDslLogInputData1 (inputSignalData + 1) -+#define kDslLogInputData2 (inputSignalData + 2) -+#define kDslLogInputData3 (inputSignalData + 3) -+ -+/* -+** -+** Status codes -+** -+*/ -+ -+typedef long dslStatusCode; -+#define kFirstDslStatusCode 256 -+#define kDslError (kFirstDslStatusCode + 0) -+#define kAtmStatus (kFirstDslStatusCode + 1) -+#define kDslTrainingStatus (kFirstDslStatusCode + 2) -+#define kDslConnectInfoStatus (kFirstDslStatusCode + 3) -+#define kDslEscapeToG994p1Status (kFirstDslStatusCode + 4) -+#define kDslFrameStatus (kFirstDslStatusCode + 5) -+#define kDslReceivedEocCommand (kFirstDslStatusCode + 6) -+#define kDslSendEocCommandDone (kFirstDslStatusCode + 7) -+#define kDslSendEocCommandFailed (kFirstDslStatusCode + 8) -+#define kDslWriteRemoteRegisterDone (kFirstDslStatusCode + 9) -+#define kDslReadRemoteRegisterDone (kFirstDslStatusCode + 10) -+#define kDslExternalError (kFirstDslStatusCode + 11) -+#define kDslDspControlStatus (kFirstDslStatusCode + 12) -+#define kDslATUHardwareAGCRequest (kFirstDslStatusCode + 13) -+#define kDslPacketStatus (kFirstDslStatusCode + 14) -+#define kDslG997Status (kFirstDslStatusCode + 15) -+#define kDslPrintfStatus (kFirstDslStatusCode + 16) -+#define kDslPrintfStatus1 (kFirstDslStatusCode + 17) -+#define kDslExceptionStatus (kFirstDslStatusCode + 18) -+#define kDslPingResponse (kFirstDslStatusCode + 19) -+#define kDslShowtimeSNRMarginInfo (kFirstDslStatusCode + 20) -+#define kDslGetOemParameter (kFirstDslStatusCode + 21) -+#define kDslOemDataAddrStatus (kFirstDslStatusCode + 22) -+#define kDslDataAvailStatus (kFirstDslStatusCode + 23) -+/* #define kDslAtuChangeTxFilterRequest (kFirstDslStatusCode + 24) */ -+#define kDslTestPllPhaseResult (kFirstDslStatusCode + 25) -+#ifdef BCM6348_SRC -+#define kDslHardwareAGCSetPga1 (kFirstDslStatusCode + 26) -+#define kDslHardwareAGCDecPga1 (kFirstDslStatusCode + 27) -+#define kDslHardwareAGCIncPga1 (kFirstDslStatusCode + 28) -+#define kDslHardwareAGCSetPga2Delta (kFirstDslStatusCode + 29) -+#endif -+#define kDslOLRRequestStatus (kFirstDslStatusCode + 30) -+#define kDslOLRResponseStatus (kFirstDslStatusCode + 31) -+#define kDslOLRBitGainUpdateStatus (kFirstDslStatusCode + 32) -+#define kDslPwrMgrStatus (kFirstDslStatusCode + 33) -+#define kDslEscapeToT1p413Status (kFirstDslStatusCode + 34) -+#ifdef BCM6348_SRC -+#define kDslHardwareAGCSetPga2 (kFirstDslStatusCode + 35) -+#define kDslHardwareGetRcvAGC (kFirstDslStatusCode + 36) -+#endif -+#define kDslUpdateXmtReadPtr (kFirstDslStatusCode + 37) -+#define kDslHardwareSetRcvAGC (kFirstDslStatusCode + 38) -+#ifdef BCM6348_SRC -+#define kDslSetDigUsPwrCutback (kFirstDslStatusCode + 39) -+#endif -+ -+#define kClientSideInitiation 0 -+#define kClientSideRespond 1 -+#define kCentralSideInitiation 2 -+#define kCentralSideRespond 3 -+ -+/* OEM parameter ID definition */ -+ -+#define kDslOemG994VendorId 1 -+#define kDslOemG994XmtNSInfo 2 -+#define kDslOemG994RcvNSInfo 3 -+#define kDslOemEocVendorId 4 -+#define kDslOemEocVersion 5 -+#define kDslOemEocSerNum 6 -+#define kDslOemT1413VendorId 7 -+#define kDslOemT1413EocVendorId 8 -+ -+typedef long dslErrorCode; -+ -+typedef long atmStatusCode; -+typedef long dslFramerStatusCode; -+ -+typedef long atmErrorCode; -+ -+typedef long dslTrainingStatusCode; -+ -+#define kDslStartedG994p1 0 -+#define kDslStartedT1p413HS 1 -+ -+/* reserved for G.994.1: 1 ~ 8 */ -+ -+#define kDslG994p1MessageDet 100 -+#define kDslG994p1ToneDet 101 -+#define kDslG994p1RToneDet 102 -+#define kDslG994p1FlagDet 103 -+#define kDslG994p1GalfDet 104 -+#define kDslG994p1ErrorFrameDet 105 -+#define kDslG994p1BadFrameDet 106 -+#define kDslG994p1SilenceDet 107 -+#define kDslG994p1RcvTimeout 108 -+#define kDslG994p1XmtFinished 109 -+#define kDslG994p1ReturntoStartup 110 -+#define kDslG994p1InitiateCleardown 111 -+#define kDslG994p1StartupFinished 112 -+#define kDslG994p1RcvNonStandardInfo 113 -+#define kDslG994p1XmtNonStandardInfo 114 -+ -+#define kG994p1MaxNonstdMessageLength 64 -+ -+#define kDslFinishedT1p413 1100 -+#define kDslT1p413DetectedCTone 1101 -+#define kDslT1p413DetectedCAct 1102 -+#define kDslT1p413DetectedCReveille 1103 -+#define kDslT1p413DetectedRActReq 1104 -+#define kDslT1p413DetectedRQuiet1 1105 -+#define kDslT1p413DetectedRAct 1106 -+#define kDslT1p413TimeoutCReveille 1107 -+#define kDslT1p413ReturntoStartup 1108 -+ -+#define kDslG994p1Timeout 8 -+#define kDslFinishedG994p1 9 -+#define kDslStartedG992p2Training 10 -+#define kDslG992p2DetectedPilotSymbol 11 -+#define kDslG992p2DetectedReverbSymbol 12 -+#define kDslG992p2TEQCalculationDone 13 -+#define kDslG992p2TrainingFEQ 14 -+#define kDslG992p2Phase3Started 15 -+#define kDslG992p2ReceivedRates1 16 -+#define kDslG992p2ReceivedMsg1 17 -+#define kDslG992p2Phase4Started 18 -+#define kDslG992p2ReceivedRatesRA 19 -+#define kDslG992p2ReceivedMsgRA 20 -+#define kDslG992p2ReceivedRates2 21 -+#define kDslG992p2ReceivedMsg2 22 -+#define kDslG992p2ReceivedBitGainTable 23 -+#define kDslG992p2TxShowtimeActive 24 -+#define kDslG992p2RxShowtimeActive 25 -+#define kDslG992p2TxAocMessage 26 -+#define kDslG992p2RxAocMessage 27 -+#define kDslG992p2TxEocMessage 28 -+#define kDslG992p2RxEocMessage 29 -+#define kDslFinishedG992p2Training 30 -+#define kDslRecoveredFromImpulseNoise 31 -+#define kDslG992Timeout 32 -+#define kDslT1p413Isu1SglByteSymDetected 33 /* detected T1.413 Issue 1 single byte per symbol mode */ -+#define kDslG992RxPrefixOnInAFewSymbols 34 -+#define kDslG992TxPrefixOnInAFewSymbols 35 -+#define kDslAnnexCXmtCPilot1Starting 36 -+#define kDslXmtToRcvPathDelay 37 -+#define kDslFeaturesUnsupported 38 -+#define kDslG992RcvMsgCrcError 39 -+#define kDslAnnexCDetectedStartHyperframe 40 -+ -+#define kDslG992AnnexCTimeoutCPilot1Detection 41 -+#define kDslG992AnnexCTimeoutCReverb1Detection 42 -+#define kDslG992AnnexCTimeoutECTraining 43 -+#define kDslG992AnnexCTimeoutHyperframeDetector 44 -+#define kDslG992AnnexCTimeoutSendRSegue2 45 -+#define kDslG992AnnexCTimeoutDetectCSegue1 46 -+#define kDslG992AnnexCAlignmentErrDetected 47 -+#define kDslG992AnnexCTimeoutSendRSegueRA 48 -+#define kDslG992AnnexCTimeoutSendRSegue4 49 -+#define kDslG992AnnexCTimeoutCSegue2Detection 50 -+#define kDslG992AnnexCTimeoutCSegue3Detection 51 -+/* Progress report for fast retrain */ -+ -+#define kG994p1EventToneDetected 54 -+#define kDslG992p2RcvVerifiedBitAndGain 55 -+#define kDslG992p2ProfileChannelResponseCalc 56 -+#define kDslG992AnnexCTotalFEXTBits 57 -+#define kDslG992AnnexCTotalNEXTBits 58 -+#define kDslG992AnnexCTotalFEXTCarrs 59 -+#define kDslG992AnnexCTotalNEXTCarrs 60 -+ -+#define kDslG992p3ReceivedMsgFmt 61 -+#define kDslG992p3ReceivedMsgPcb 62 -+ -+#define kDslG992p3AnnexLMode 63 -+ -+/* performance monitoring report */ -+ -+#define kG992DataRcvDetectFastRSCorrection 70 -+#define kG992DataRcvDetectInterleaveRSCorrection 71 -+#define kG992DataRcvDetectFastCRCError 72 -+#define kG992DataRcvDetectInterleaveCRCError 73 -+#define kG992DataRcvDetectFastRSError 74 -+#define kG992DataRcvDetectInterleaveRSError 75 -+#define kG992DataRcvDetectLOS 76 -+#define kG992DecoderDetectRDI 77 -+#define kG992DataRcvDetectLOSRecovery 78 -+#define kG992AtmDetectHEC 79 -+#define kG992AtmDetectOCD 180 -+#define kG992AtmDetectCD 181 -+#define kG992DecoderDetectRemoteLOS 182 -+#define kG992DecoderDetectRemoteLOSRecovery 183 -+#define kG992DecoderDetectRemoteRDI 184 -+#define kG992DecoderDetectRemoteRDIRecovery 185 -+#define kG992RcvDetectSyncSymbolOffset 186 -+#define kG992Upstream2xIfftDisabled 187 -+#if defined(G992P5) -+#define kDslG992RunAnnexaP3ModeInAnnexaP5 188 /* run Annex C mode in Annex I compiled codes */ -+#else -+#define kDslG992RunAnnexCModeInAnnexI 188 /* run Annex C mode in Annex I compiled codes */ -+#endif -+ -+/* OLR PHY status */ -+ -+#define kG992EventSynchSymbolDetected 189 -+#define kG992EventReverseSynchSymbolDetected 190 -+#define kG992EventL2CReverbSymbolDetected 191 -+#define kG992EventL2CSegueSymbolDetected 192 -+ -+/* ANNEX_M */ -+#define kG992EnableAnnexM 191 -+ -+#define kDslAtuChangeTxFilterRequest 192 -+ -+/* detailed error messages reports */ -+ -+#define kDslG992XmtRReverbRAOver4000 80 -+#define kDslG992XmtRReverb5Over4000 81 -+#define kDslG992RcvCSegue2Failed 82 -+#define kDslG992RcvCSegueRAFailed 83 -+#define kDslG992RcvCSegue3Failed 84 -+#define kDslG992RcvShowtimeStartedTooLate 85 -+#define kDslG992XmtRReverb3Over4000 86 -+#define kDslG992RcvFailDetCSegue1InWindow 87 -+#define kDslG992RcvCPilot1Failed 88 -+#define kDslG992RcvCReverb1Failed 89 -+#define kG992ControlAllRateOptionsFailedErr 90 -+#define kG992ControlInvalidRateOptionErr 91 -+#define kDslG992XmtInvalidXmtDErr 92 -+#define kDslG992BitAndGainCalcFailed 93 -+#define kDslG992BitAndGainVerifyFailed 94 -+ -+#define kDslT1p413RetrainToUseCorrectRAck 95 -+#define kDslUseAlternateTxFilter 96 -+#define kDslT1p413RetrainToUseCorrectIFFT 97 -+ -+typedef long dslConnectInfoStatusCode; -+#define kG992p2XmtToneOrderingInfo 0 -+#define kG992p2RcvToneOrderingInfo 1 -+#define kG992p2XmtCodingParamsInfo 2 -+#define kG992p2RcvCodingParamsInfo 3 -+#define kG992p2TrainingRcvCarrEdgeInfo 4 -+#define kG992ShowtimeMonitoringStatus 5 -+#define kG992MessageExchangeRcvInfo 6 -+#define kG992MessageExchangeXmtInfo 7 -+#define kG994MessageExchangeRcvInfo 8 -+#define kG994MessageExchangeXmtInfo 9 -+ -+#define kDslATURClockErrorInfo 10 -+#define kDslATURcvPowerInfo 11 -+#define kDslATUAvgLoopAttenuationInfo 12 -+#define kDslHWTimeTrackingResetClockError 13 -+#define kDslHWTimeTrackingClockTweak 14 -+#define kDslATUHardwareAGCObtained 15 -+#define kDslTEQCoefInfo 16 -+#define kDslRcvCarrierSNRInfo 17 -+#define kDslMaxReceivableBitRateInfo 18 -+#define kDslHWSetDigitalEcUpdateMode 19 -+#define kDslHWEnableDigitalECUpdate 20 -+#define kDslHWDisableDigitalECUpdate 21 -+#define kDslHWEnableDigitalEC 22 -+#define kDslHWSetDigitalEcGainShift 23 -+#define kDslHWSetDigitalEcUpdateShift 24 -+#define kDslRcvPsdInfo 25 -+#define kDslHWdcOffsetInfo 26 -+#define kG994SelectedG994p1CarrierIndex 27 -+#define kDslSelectedTimingTone 28 -+ -+#define kDslHWEnableAnalogECUpdate kDslHWSetDigitalEcUpdateMode -+#define kDslHWEnableAnalogEC kDslHWDisableDigitalECUpdate -+ -+#define kG992AocMessageExchangeRcvInfo 29 -+#define kG992AocMessageExchangeXmtInfo 30 -+#define kG992AocBitswapTxStarted 31 -+#define kG992AocBitswapRxStarted 32 -+#define kG992AocBitswapTxCompleted 33 -+#define kG992AocBitswapRxCompleted 34 -+#define kDslChannelResponseLog 35 -+#define kDslChannelResponseLinear 36 -+#define kDslChannelQuietLineNoise 37 -+ -+#define kDslATUCXmtPowerCutbackInfo 40 -+#define kDslATURXmtPowerCutbackInfo 41 -+#define kDslATUCXmtPowerInfo 42 -+#define kDslATURXmtPowerInfo 43 -+ -+#define kDslFramingModeInfo 50 -+#define kDslG992VendorID 51 -+ -+#ifdef BCM6348_SRC -+#define kDslHWSetRcvFir2OutputScale 52 -+#endif -+ -+#define kDslSignalAttenuation 53 -+#define kDslAttainableNetDataRate 54 -+#define kDslHLinScale 55 -+ -+#define kG992p3XmtCodingParamsInfo 60 -+#define kG992p3RcvCodingParamsInfo 61 -+#define kG992p3PwrStateInfo 62 -+#define kG992PilotToneInfo 63 -+ -+#define kDslSetPilotEyeDisplay 64 -+ -+#define kDslAturHwAgcResolutionMask (0xFFFFFFF8) -+#define kDslAturHwAgcMinGain ((-12)<<4) -+#ifndef BCM6348_SRC -+#define kDslAturHwAgcMaxGain (30<<4) -+#else -+#define kDslAturHwAgcMaxGain (36<<4) -+#endif -+ -+#define kDslFrameStatusSend 1 -+#define kDslFrameStatusSendComplete 2 -+#define kDslFrameStatusRcv 3 -+#define kDslFrameStatusReturn 4 -+ -+typedef struct _dslFramerStatus -+ { -+ dslFramerStatusCode code; -+ union -+ { -+ long value; -+ dslErrorCode error; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long nRxFrameTotal; -+ long nRxFrameError; -+ long nTxFrameTotal; -+ } statistic; -+ } param; -+ } dslFramerStatus; -+ -+typedef struct -+ { -+ dslStatusCode code; -+ union -+ { -+ long value; -+ dslErrorCode error; -+ struct -+ { -+ atmStatusCode code; -+ union -+ { -+ long value; -+ dslErrorCode error; -+ struct -+ { -+ long vci; -+ long mid; -+ long aalType; -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ long vcId; -+ long vci; -+ long aalType; -+ ulong fwdPeakCellTime; -+ ulong backPeakCellTime; -+ } vcInfo; -+ struct -+ { -+ long cellHdr; -+ long oamCmd; -+ } oamInfo; -+ struct -+ { -+ void *pVc; -+ char *pHdr; -+ void *cellHdr; -+ void *cellData; -+ } cellInfo; -+ struct -+ { -+ long totalBits; -+ long errBits; -+ } bertInfo; -+ } param; -+ } atmStatus; -+#ifdef DSL_PACKET -+ dslFramerStatus dslPacketStatus; -+#endif -+#ifdef G997_1_FRAMER -+ dslFramerStatus g997Status; -+#endif -+ struct -+ { -+ dslTrainingStatusCode code; -+ long value; -+ } dslTrainingInfo; -+ struct -+ { -+ dslConnectInfoStatusCode code; -+ long value; -+ void *buffPtr; -+ } dslConnectInfo; -+ struct -+ { -+ long maxMarginCarrier; -+ long maxSNRMargin; -+ long minMarginCarrier; -+ long minSNRMargin; -+ long avgSNRMargin; -+ long nCarriers; -+ void *buffPtr; -+ } dslShowtimeSNRMarginInfo; -+ struct -+ { -+ long code; -+ long vcId; -+ long timeStamp; -+ } dslFrameInfo; -+#ifdef G997_1 -+ struct -+ { -+ long msgId; -+ long msgType; -+ char *dataPtr; -+ } dslClearEocMsg; -+#endif -+ struct -+ { -+ char *fmt; -+ long argNum; -+ void *argPtr; -+ } dslPrintfMsg; -+ struct -+ { -+ ulong nBits; -+ ulong nBlocks; -+ ulong nBitErrors; -+ ulong nBlockErrors; -+ -+ ulong nAudioBits; -+ ulong nAudioBlocks; -+ ulong nAudioSyncErrors; -+ ulong nAudioBlockErrors; -+ } testResults; -+ struct -+ { -+ ulong code; -+ uchar *valuePtr; -+ ulong length; -+ } dslDataRegister; -+ struct -+ { -+ ulong code; -+ char *desc; -+ } dslExternalError; -+ struct -+ { -+ ulong numberOfCalls; -+ ulong txSignalChecksum; -+ ulong rxSignalChecksum; -+ ulong eyeDataChecksum; -+ } checksums; -+ struct -+ { -+ int sp; -+ int argc; -+ int *argv; -+ int *stackPtr; -+ int stackLen; -+ } dslException; -+ struct -+ { -+ ulong paramId; -+ void *dataPtr; -+ ulong dataLen; -+ } dslOemParameter; -+ struct -+ { -+ void *dataPtr; -+ ulong dataLen; -+ } dslDataAvail; -+ dslOLRMessage dslOLRRequest; -+ dslPwrMessage dslPwrMsg; -+ } param; -+ } dslStatusStruct; -+ -+typedef void (SM_DECL *dslStatusHandlerType) (void *gDslVars, dslStatusStruct*); -+ -+ -+/* -+** -+** Command codes -+** -+*/ -+ -+typedef long dslCommandCode; -+#define kFirstDslCommandCode 256 -+#define kDslIdleCmd (kFirstDslCommandCode + 0) -+#define kDslIdleRcvCmd (kFirstDslCommandCode + 1) -+#define kDslIdleXmtCmd (kFirstDslCommandCode + 2) -+#define kDslStartPhysicalLayerCmd (kFirstDslCommandCode + 3) -+#define kDslStartRetrainCmd (kFirstDslCommandCode + 4) -+#define kDslSetFrameFunctions (kFirstDslCommandCode + 5) -+#define kDslSendEocCommand (kFirstDslCommandCode + 6) -+#define kDslWriteRemoteRegister (kFirstDslCommandCode + 7) -+#define kDslReadRemoteRegister (kFirstDslCommandCode + 8) -+#define kDslWriteLocalRegister (kFirstDslCommandCode + 9) -+#define kDslReadLocalRegister (kFirstDslCommandCode + 10) -+#define kDslStoreHardwareAGCCmd (kFirstDslCommandCode + 11) -+#define kDslSetCommandHandlerCmd (kFirstDslCommandCode + 12) -+#define kSetLinkLayerStatusHandlerCmd (kFirstDslCommandCode + 13) -+#define kDslSetG997Cmd (kFirstDslCommandCode + 14) -+#define kDslLoopbackCmd (kFirstDslCommandCode + 15) -+#define kDslDiagSetupCmd (kFirstDslCommandCode + 16) -+#define kDslSetDriverCallbackCmd (kFirstDslCommandCode + 17) -+#define kDslDiagStopLogCmd (kFirstDslCommandCode + 18) -+#define kDslDiagStartBERT (kFirstDslCommandCode + 19) -+#define kDslDiagStopBERT (kFirstDslCommandCode + 20) -+#define kDslPingCmd (kFirstDslCommandCode + 21) -+#define kDslDyingGaspCmd (kFirstDslCommandCode + 22) -+#define kDslTestCmd (kFirstDslCommandCode + 23) -+#define kDslFilterSNRMarginCmd (kFirstDslCommandCode + 24) -+#define kDslAtmVcMapTableChanged (kFirstDslCommandCode + 25) -+#define kDslGetOemDataAddrCmd (kFirstDslCommandCode + 26) -+#define kDslAtmReportHEC (kFirstDslCommandCode + 27) -+#define kDslAtmReportCD (kFirstDslCommandCode + 28) -+#define kDslSetXmtGainCmd (kFirstDslCommandCode + 29) -+#define kDslSetStatusBufferCmd (kFirstDslCommandCode + 30) -+#define kDslAfeTestCmd (kFirstDslCommandCode + 31) -+#define kDslI432ResetCmd (kFirstDslCommandCode + 32) -+#define kDslSetRcvGainCmd (kFirstDslCommandCode + 33) -+#define kDslBypassRcvHpfCmd (kFirstDslCommandCode + 34) -+#define kDslWriteAfeRegCmd (kFirstDslCommandCode + 35) -+#define kDslReadAfeRegCmd (kFirstDslCommandCode + 36) -+#define kDslOLRRequestCmd (kFirstDslCommandCode + 37) -+#define kDslOLRResponseCmd (kFirstDslCommandCode + 38) -+#define kDslI432SetScrambleCmd (kFirstDslCommandCode + 39) -+#define kDslPwrMgrCmd (kFirstDslCommandCode + 40) -+#define kDslAtmGfcMappingCmd (kFirstDslCommandCode + 41) -+ -+#ifdef BCM6348_SRC -+#define kDslEnablePwmSyncClk (kFirstDslCommandCode + 42) -+#define kDslSetPwmSyncClkFreq (kFirstDslCommandCode + 43) -+#endif -+ -+#define kG994p1Duplex 1 -+#define kG994p1HalfDuplex 2 -+ -+/* Eoc Messages from ATU-C to ATU-R */ -+#define kDslEocHoldStateCmd 1 -+#define kDslEocReturnToNormalCmd 2 -+#define kDslEocPerformSelfTestCmd 3 -+#define kDslEocRequestCorruptCRCCmd 4 -+#define kDslEocRequestEndCorruptCRCCmd 5 -+#define kDslEocNotifyCorruptCRCCmd 6 -+#define kDslEocNotifyEndCorruptCRCCmd 7 -+#define kDslEocRequestTestParametersUpdateCmd 8 -+#define kDslEocGrantPowerDownCmd 9 -+#define kDslEocRejectPowerDownCmd 10 -+ -+/* Eoc Messages from ATU-R to ATU-C */ -+#define kDslEocRequestPowerDownCmd 11 -+#define kDslEocDyingGaspCmd 12 -+ -+/* Clear Eoc Messages */ -+#define kDslClearEocFirstCmd 100 -+#define kDslClearEocSendFrame 100 -+#define kDslClearEocSendComplete 101 -+#define kDslClearEocRcvedFrame 102 -+#define kDslClearEocSendComplete2 103 -+ -+#define kDslClearEocMsgLengthMask 0xFFFF -+#define kDslClearEocMsgNumMask 0xFF0000 -+#define kDslClearEocMsgDataVolatileMask 0x1000000 -+#define kDslClearEocMsgDataVolatile kDslClearEocMsgDataVolatileMask -+#define kDslClearEocMsgExtraSendComplete 0x2000000 -+ -+/* ADSL Link Power States */ -+#define kDslPowerFullOn 0 -+#define kDslPowerLow 1 -+#define kDslPowerIdle 3 -+ -+/* ATU-R Data Registers */ -+#define kDslVendorIDRegister 1 -+#define kDslRevisionNumberRegister 2 -+#define kDslSerialNumberRegister 3 -+#define kDslSelfTestResultsRegister 4 -+#define kDslLineAttenuationRegister 5 -+#define kDslSnrMarginRegister 6 -+#define kDslAturConfigurationRegister 7 -+#define kDslLinkStateRegister 8 -+ -+#define kDslVendorIDRegisterLength 8 -+#define kDslRevisionNumberRegisterLength 32 -+#define kDslSerialNumberRegisterLength 32 -+#define kDslSelfTestResultsRegisterLength 1 -+#define kDslLineAttenuationRegisterLength 1 -+#define kDslSnrMarginRegisterLength 1 -+#define kDslAturConfigurationRegisterLength 30 -+#define kDslLinkStateRegisterLength 1 -+ -+/* Dsl Diags setup flags */ -+#define kDslDiagEnableEyeData 1 -+#define kDslDiagEnableLogData 2 -+ -+/* Dsl test commands */ -+typedef long dslTestCmdType; -+#define kDslTestBackToNormal 0 -+#define kDslTestReverb 1 -+#define kDslTestMedley 2 -+#define kDslTestToneSelection 3 -+#define kDslTestNoAutoRetrain 4 -+#define kDslTestMarginTweak 5 -+#define kDslTestEstimatePllPhase 6 -+#define kDslTestReportPllPhaseStatus 7 -+#define kDslTestAfeLoopback 8 -+#define kDslTestL3 9 -+#define kDslTestAdsl2DiagMode 10 -+#define kDslTestRetL0 11 -+ -+/* Xmt gain default setting */ -+#define kDslXmtGainAuto 0x80000000 -+ -+/* Unit (AFE) test commands */ -+#define kDslAfeTestLoadImage 0 -+#define kDslAfeTestPatternSend 1 -+#define kDslAfeTestLoadImageOnly 2 -+#define kDslAfeTestPhyRun 3 -+#define kDslAfeTestLoadBuffer 4 -+ -+typedef struct -+ { -+#if defined(G992P1_ANNEX_I) || defined(G992P5) -+ ushort downstreamMinCarr, downstreamMaxCarr; -+#else -+ uchar downstreamMinCarr, downstreamMaxCarr; -+#endif -+ uchar upstreamMinCarr, upstreamMaxCarr; -+ }carrierInfo; -+ -+#if defined(G992P3) && !defined(BCM6348_SRC) -+#define FAST_TEXT_TYPE -+#else -+#define FAST_TEXT_TYPE FAST_TEXT -+#endif -+ -+#if defined(BCM6348_SRC) -+#define BCM6348_TEMP_MOVE_TO_LMEM -+#else -+#define BCM6348_TEMP_MOVE_TO_LMEM -+#endif -+ -+#ifdef G992P3 -+#define PRINT_DEBUG_INFO -+#else -+#define PRINT_DEBUG_INFO -+#endif -+ -+#ifdef G992P3 -+ -+#define kG992p3MaxSpectBoundsUpSize 16 -+#define kG992p3MaxSpectBoundsDownSize 16 -+ -+/* G.994 definitions */ -+ -+/*** Standard Info SPar2: G.992.3 Annex A Octet 1 ***/ -+ -+#define kG994p1G992p3AnnexASpectrumBoundsUpstream 0x01 -+#define kG994p1G992p3AnnexASpectrumShapingUpstream 0x02 -+#define kG994p1G992p3AnnexASpectrumBoundsDownstream 0x04 -+#define kG994p1G992p3AnnexASpectrumShapingDownstream 0x08 -+#define kG994p1G992p3AnnexATxImageAboveNyquistFreq 0x10 -+#define kG994p1G992p3AnnexLReachExtended 0x20 -+#define kG994p1G992p3AnnexMSubModePSDMasks 0x20 -+ -+#define kG994p1G992p3AnnexLUpNarrowband 0x02 -+#define kG994p1G992p3AnnexLUpWideband 0x01 -+#define kG994p1G992p3AnnexLDownNonoverlap 0x01 -+ -+/*** Standard Info SPar2: G.992.3 Annex A Octet 2 ***/ -+ -+#define kG994p1G992p3AnnexADownOverheadDataRate 0x01 -+#define kG994p1G992p3AnnexAUpOverheadDataRate 0x02 -+#define kG994p1G992p3AnnexAMaxNumberDownTPSTC 0x04 -+#define kG994p1G992p3AnnexAMaxNumberUpTPSTC 0x08 -+ -+/*** Standard Info SPar2: G.992.3 Annex A Octet 3,5,7,9 ***/ -+ -+#define kG994p1G992p3AnnexADownSTM_TPS_TC 0x01 -+#define kG994p1G992p3AnnexAUpSTM_TPS_TC 0x02 -+#define kG994p1G992p3AnnexADownATM_TPS_TC 0x04 -+#define kG994p1G992p3AnnexAUpATM_TPS_TC 0x08 -+#define kG994p1G992p3AnnexADownPTM_TPS_TC 0x10 -+#define kG994p1G992p3AnnexAUpPTM_TPS_TC 0x20 -+ -+/*** Standard Info SPar2: G.992.3 Annex A Octet 4,6,8,10 ***/ -+ -+#define kG994p1G992p3AnnexADownPMS_TC_Latency 0x01 -+#define kG994p1G992p3AnnexAUpPMS_TC_Latency 0x02 -+ -+/*** -+ * TSSI -+ * -+ * TSSI information is specified in 2 parts: subcarrier index, -+ * tssi value, and an indication of whether or no the tone specified -+ * is part of the supported set. -+ * -+ * The subcarrier index information is currently stored in the -+ * dsSubcarrierIndex array defined below. The tssi value are stored -+ * in the dsLog_tss array. -+ * -+ * The subcarrier index information only occupies the lower 12 bits -+ * of the available 16 bits (short type). Therefore, we will pack the -+ * supported set information in bit 15. -+ */ -+#define kG992DsSubCarrierIndexMask (0x0fff) /* AND mask to ectract ds subcarrier index */ -+#define kG992DsSubCarrierSuppSetMask (0x8000) /* AND mask to extract supported set indication */ -+ -+#define G992GetDsSubCarrierIndex(arg) ((arg) & kG992DsSubCarrierIndexMask) -+#define G992GetDsSubCarrierSuppSetIndication(arg) (((arg) & kG992DsSubCarrierSuppSetMask) >> 15) -+ -+/* Caution: Do not change anything in this structure definition, including associated constant */ -+/* This structure definition is used only by the driver and any change impose incompatibility issue in driver */ -+/* The structure following this structure (g992p3PhyDataPumpCapabilities) can be changed in PHY application */ -+ -+typedef struct -+ { -+ Boolean rcvNTREnabled, shortInitEnabled, diagnosticsModeEnabled; -+ -+ char featureSpectrum, featureOverhead; -+ char featureTPS_TC[4], featurePMS_TC[4]; -+ -+ short rcvNOMPSDus, rcvMAXNOMPSDus, rcvMAXNOMATPus; -+ short usSubcarrierIndex[kG992p3MaxSpectBoundsUpSize], -+ usLog_tss[kG992p3MaxSpectBoundsUpSize]; -+ short numUsSubcarrier; -+ short rcvNOMPSDds, rcvMAXNOMPSDds, rcvMAXNOMATPds; -+ short dsSubcarrierIndex[kG992p3MaxSpectBoundsDownSize], -+ dsLog_tss[kG992p3MaxSpectBoundsDownSize]; -+ short numDsSubcarrier; -+ uchar sizeIDFT, fillIFFT; -+ uchar readsl2Upstream, readsl2Downstream; -+ uchar minDownOverheadDataRate, minUpOverheadDataRate; -+ uchar maxDownSTM_TPSTC, maxDownATM_TPSTC, maxDownPTM_TPSTC; -+ uchar maxUpSTM_TPSTC, maxUpATM_TPSTC, maxUpPTM_TPSTC; -+ -+ short minDownSTM_TPS_TC[4], maxDownSTM_TPS_TC[4], -+ minRevDownSTM_TPS_TC[4], maxDelayDownSTM_TPS_TC[4]; -+ uchar maxErrorDownSTM_TPS_TC[4], minINPDownSTM_TPS_TC[4]; -+ short minUpSTM_TPS_TC[4], maxUpSTM_TPS_TC[4], -+ minRevUpSTM_TPS_TC[4], maxDelayUpSTM_TPS_TC[4]; -+ uchar maxErrorUpSTM_TPS_TC[4], minINPUpSTM_TPS_TC[4]; -+ -+ short maxDownPMS_TC_Latency[4], maxUpPMS_TC_Latency[4]; -+ short maxDownR_PMS_TC_Latency[4], maxDownD_PMS_TC_Latency[4]; -+ short maxUpR_PMS_TC_Latency[4], maxUpD_PMS_TC_Latency[4]; -+ -+ short minDownATM_TPS_TC[4], maxDownATM_TPS_TC[4], -+ minRevDownATM_TPS_TC[4], maxDelayDownATM_TPS_TC[4]; -+ uchar maxErrorDownATM_TPS_TC[4], minINPDownATM_TPS_TC[4]; -+ short minUpATM_TPS_TC[4], maxUpATM_TPS_TC[4], -+ minRevUpATM_TPS_TC[4], maxDelayUpATM_TPS_TC[4]; -+ uchar maxErrorUpATM_TPS_TC[4], minINPUpATM_TPS_TC[4]; -+ -+ short minDownPTM_TPS_TC[4], maxDownPTM_TPS_TC[4], -+ minRevDownPTM_TPS_TC[4], maxDelayDownPTM_TPS_TC[4]; -+ uchar maxErrorDownPTM_TPS_TC[4], minINPDownPTM_TPS_TC[4]; -+ short minUpPTM_TPS_TC[4], maxUpPTM_TPS_TC[4], -+ minRevUpPTM_TPS_TC[4], maxDelayUpPTM_TPS_TC[4]; -+ uchar maxErrorUpPTM_TPS_TC[4], minINPUpPTM_TPS_TC[4]; -+ -+ ushort subModePSDMasks; -+ } g992p3DataPumpCapabilities; -+ -+#define kG992p3p5MaxSpectBoundsUpSize 16 -+#define kG992p3p5MaxSpectBoundsDownSize 32 -+ -+typedef struct -+ { -+ Boolean rcvNTREnabled, shortInitEnabled, diagnosticsModeEnabled; -+ -+ char featureSpectrum, featureOverhead; -+ char featureTPS_TC[4], featurePMS_TC[4]; -+ -+ short rcvNOMPSDus, rcvMAXNOMPSDus, rcvMAXNOMATPus; -+ short usSubcarrierIndex[kG992p3p5MaxSpectBoundsUpSize], -+ usLog_tss[kG992p3p5MaxSpectBoundsUpSize]; -+ short numUsSubcarrier; -+ short rcvNOMPSDds, rcvMAXNOMPSDds, rcvMAXNOMATPds; -+ short dsSubcarrierIndex[kG992p3p5MaxSpectBoundsDownSize], -+ dsLog_tss[kG992p3p5MaxSpectBoundsDownSize]; -+ short numDsSubcarrier; -+ uchar sizeIDFT, fillIFFT; -+ uchar readsl2Upstream, readsl2Downstream; -+ uchar minDownOverheadDataRate, minUpOverheadDataRate; -+ uchar maxDownSTM_TPSTC, maxDownATM_TPSTC, maxDownPTM_TPSTC; -+ uchar maxUpSTM_TPSTC, maxUpATM_TPSTC, maxUpPTM_TPSTC; -+ -+ short minDownSTM_TPS_TC[4], maxDownSTM_TPS_TC[4], -+ minRevDownSTM_TPS_TC[4], maxDelayDownSTM_TPS_TC[4]; -+ uchar maxErrorDownSTM_TPS_TC[4], minINPDownSTM_TPS_TC[4]; -+ short minUpSTM_TPS_TC[4], maxUpSTM_TPS_TC[4], -+ minRevUpSTM_TPS_TC[4], maxDelayUpSTM_TPS_TC[4]; -+ uchar maxErrorUpSTM_TPS_TC[4], minINPUpSTM_TPS_TC[4]; -+ -+ short maxDownPMS_TC_Latency[4], maxUpPMS_TC_Latency[4]; -+ short maxDownR_PMS_TC_Latency[4], maxDownD_PMS_TC_Latency[4]; -+ short maxUpR_PMS_TC_Latency[4], maxUpD_PMS_TC_Latency[4]; -+ -+ short minDownATM_TPS_TC[4], maxDownATM_TPS_TC[4], -+ minRevDownATM_TPS_TC[4], maxDelayDownATM_TPS_TC[4]; -+ uchar maxErrorDownATM_TPS_TC[4], minINPDownATM_TPS_TC[4]; -+ short minUpATM_TPS_TC[4], maxUpATM_TPS_TC[4], -+ minRevUpATM_TPS_TC[4], maxDelayUpATM_TPS_TC[4]; -+ uchar maxErrorUpATM_TPS_TC[4], minINPUpATM_TPS_TC[4]; -+ -+ short minDownPTM_TPS_TC[4], maxDownPTM_TPS_TC[4], -+ minRevDownPTM_TPS_TC[4], maxDelayDownPTM_TPS_TC[4]; -+ uchar maxErrorDownPTM_TPS_TC[4], minINPDownPTM_TPS_TC[4]; -+ short minUpPTM_TPS_TC[4], maxUpPTM_TPS_TC[4], -+ minRevUpPTM_TPS_TC[4], maxDelayUpPTM_TPS_TC[4]; -+ uchar maxErrorUpPTM_TPS_TC[4], minINPUpPTM_TPS_TC[4]; -+ -+ ushort subModePSDMasks; -+ } g992p3PhyDataPumpCapabilities; -+#endif -+ -+typedef struct -+ { -+ dslModulationType modulations; -+ bitMap auxFeatures; -+ bitMap features; -+ bitMap demodCapabilities; -+ bitMap demodCapabilities2; -+ ushort noiseMargin; /* Q4 dB */ -+#ifdef G992_ATUC -+ short xmtRSf, xmtRS, xmtS, xmtD; -+ short rcvRSf, rcvRS, rcvS, rcvD; -+#endif -+#ifdef G992P1_ANNEX_A -+ bitMap subChannelInfo; -+ carrierInfo carrierInfoG992p1; -+#endif -+#ifdef G992P1_ANNEX_B -+ bitMap subChannelInfoAnnexB; -+ carrierInfo carrierInfoG992p1AnnexB; -+#endif -+#ifdef G992_ANNEXC -+ bitMap subChannelInfoAnnexC; -+ carrierInfo carrierInfoG992p1AnnexC; -+#endif -+#if defined(G992P1_ANNEX_I) -+ bitMap subChannelInfoAnnexI; -+ carrierInfo carrierInfoG992p1AnnexI; -+#endif -+#ifdef G992P5 -+ bitMap subChannelInfop5; -+ carrierInfo carrierInfoG992p5; -+#endif -+#if defined(G992P2) || (defined(G992P1_ANNEX_A) && defined(G992P1_ANNEX_A_USED_FOR_G992P2)) -+ carrierInfo carrierInfoG992p2; -+#endif -+ ushort maxDataRate; -+ uchar minDataRate; -+#ifdef G992P3 -+ g992p3DataPumpCapabilities *carrierInfoG992p3AnnexA; -+#endif -+#ifdef G992P5 -+ g992p3DataPumpCapabilities *carrierInfoG992p5AnnexA; -+#endif -+ } dslDataPumpCapabilities; -+ -+struct __dslCommandStruct; -+typedef Boolean (*dslCommandHandlerType) (void *gDslVars, struct __dslCommandStruct*); -+typedef struct __dslCommandStruct -+ { -+ dslCommandCode command; -+ union -+ { -+ long value; -+ Boolean flag; -+ struct -+ { -+ dslTestCmdType type; -+ union -+ { -+ struct -+ { -+ ulong xmtStartTone, xmtNumOfTones; -+ ulong rcvStartTone, rcvNumOfTones; -+ uchar *xmtMap, *rcvMap; -+ } toneSelectSpec; -+ struct -+ { -+ long extraPowerRequestQ4dB; -+ long numOfCarriers; -+ char *marginTweakTableQ4dB; -+ } marginTweakSpec; -+ } param; -+ } dslTestSpec; -+ struct -+ { -+ dslDirectionType direction; -+ dslDataPumpCapabilities capabilities; -+ } dslModeSpec; -+ struct -+ { -+ bitMap setup; -+ ulong eyeConstIndex1; -+ ulong eyeConstIndex2; -+ ulong logTime; -+ } dslDiagSpec; -+ struct -+ { -+ void *pBuf; -+ ulong bufSize; -+ } dslStatusBufSpec; -+ struct -+ { -+ ulong type; -+ void *afeParamPtr; -+ ulong afeParamSize; -+ void *imagePtr; -+ ulong imageSize; -+ } dslAfeTestSpec; -+ struct -+ { -+ dslLinkLayerType type; -+ bitMap setup; -+ union -+ { -+ struct -+ { -+ dataRateMap rxDataRate; -+ dataRateMap txDataRate; -+ long rtDelayQ4ms; -+ ulong rxBufNum; -+ ulong rxCellsInBuf; -+ ulong rxPacketNum; -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslPhyInitType atmPhyInitPtr; -+ } atmLinkSpec; -+ struct -+ { -+ dslHeaderHandlerType rxHeaderHandlerPtr; -+ dslRxFrameBufferHandlerType rxDataHandlerPtr; -+ dslTxFrameBufferHandlerType txHandlerPtr; -+ } atmPhyLinkSpec; -+#ifdef DSL_PACKET -+ struct -+ { -+ ulong rxBufNum; -+ ulong rxBufSize; -+ ulong rxPacketNum; -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslPacketPhyInitType dslPhyInitPtr; -+ } dslPacketLinkSpec; -+ dslPacketPhyFunctions dslPacketPhyLinkSpec; -+#endif -+ struct -+ { -+ txDataHandlerType txDataHandlerPtr; -+ rxDataHandlerType rxDataHandlerPtr; -+ } nullLinkSpec; -+ } param; -+ } dslLinkLayerSpec; -+#ifdef G997_1 -+#ifdef G997_1_FRAMER -+ struct -+ { -+ bitMap setup; -+ ulong rxBufNum; -+ ulong rxBufSize; -+ ulong rxPacketNum; -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ } dslG997Cmd; -+#endif -+ struct -+ { -+ long msgId; -+ long msgType; -+ char *dataPtr; -+ } dslClearEocMsg; -+#endif -+ struct -+ { -+ ulong code; -+ uchar *valuePtr; -+ ulong length; -+ } dslDataRegister; -+ union -+ { -+ dslStatusHandlerType statusHandlerPtr; -+ dslCommandHandlerType commandHandlerPtr; -+ eyeHandlerType eyeHandlerPtr; -+ logHandlerType logHandlerPtr; -+#if defined(DEBUG_DATA_HANDLER) -+ debugDataHandlerType debugDataHandlerPtr; -+#endif -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslDriverCallbackType driverCallback; -+ } handlerSpec; -+#if !defined(CHIP_SRC) || defined(DSL_FRAME_FUNCTIONS) -+ dslFrameFunctions DslFunctions; -+#endif -+ dslOLRMessage dslOLRRequest; -+ dslPwrMessage dslPwrMsg; -+ } param; -+ } dslCommandStruct; -+ -+ -+ -+ -+typedef struct -+ { -+ dslCommandHandlerType linkCommandHandlerPtr; -+ timerHandlerType linkTimerHandlerPtr; -+ dslLinkCloseHandlerType linkCloseHandlerPtr; -+ -+ dslFrameHandlerType linkSendHandlerPtr; -+ dslFrameHandlerType linkReturnHandlerPtr; -+ -+ dslVcAllocateHandlerType linkVcAllocateHandlerPtr; -+ dslVcFreeHandlerType linkVcFreeHandlerPtr; -+ dslVcActivateHandlerType linkVcActivateHandlerPtr; -+ dslVcDeactivateHandlerType linkVcDeactivateHandlerPtr; -+ dslVcConfigureHandlerType linkVcConfigureHandlerPtr; -+ -+ dslLinkVc2IdHandlerType linkVc2IdHandlerPtr; -+ dslLinkVcId2VcHandlerType linkVcId2VcHandlerPtr; -+ dslGetFramePoolHandlerType linkGetFramePoolHandlerPtr; -+ -+#ifndef ADSLCORE_ONLY -+ dslHeaderHandlerType linkRxCellHeaderHandlerPtr; -+ dslRxFrameBufferHandlerType linkRxCellDataHandlerPtr; -+ dslTxFrameBufferHandlerType linkTxCellHandlerPtr; -+#endif -+ -+ txDataHandlerType linkTxDataHandlerPtr; -+ rxDataHandlerType linkRxDataHandlerPtr; -+ } linkLayerFunctions; -+ -+#ifndef ADSLCORE_ONLY -+ -+#define LinkLayerAssignFunctions( var, name_prefix ) do { \ -+ (var).linkCommandHandlerPtr = name_prefix##CommandHandler; \ -+ (var).linkTimerHandlerPtr = name_prefix##TimerHandler; \ -+ (var).linkCloseHandlerPtr = name_prefix##CloseHandler; \ -+ \ -+ (var).linkSendHandlerPtr = name_prefix##SendFrameHandler; \ -+ (var).linkReturnHandlerPtr = name_prefix##ReturnFrameHandler; \ -+ \ -+ (var).linkVcAllocateHandlerPtr = name_prefix##VcAllocateHandler; \ -+ (var).linkVcFreeHandlerPtr = name_prefix##VcFreeHandler; \ -+ (var).linkVcActivateHandlerPtr = name_prefix##VcActivateHandler; \ -+ (var).linkVcDeactivateHandlerPtr = name_prefix##VcDeactivateHandler; \ -+ (var).linkVcConfigureHandlerPtr = name_prefix##VcConfigureHandler; \ -+ \ -+ (var).linkVc2IdHandlerPtr = name_prefix##Vc2IdHandler; \ -+ (var).linkVcId2VcHandlerPtr = name_prefix##VcId2VcHandler; \ -+ (var).linkGetFramePoolHandlerPtr = name_prefix##GetFramePoolHandler; \ -+ \ -+ (var).linkRxCellHeaderHandlerPtr = name_prefix##RxCellHeaderHandler; \ -+ (var).linkRxCellDataHandlerPtr = name_prefix##RxCellDataHandler; \ -+ (var).linkTxCellHandlerPtr = name_prefix##TxCellHandler; \ -+ \ -+ (var).linkTxDataHandlerPtr = name_prefix##TxDataHandler; \ -+ (var).linkRxDataHandlerPtr = name_prefix##RxDataHandler; \ -+} while (0) -+ -+#else -+ -+#define LinkLayerAssignFunctions( var, name_prefix ) do { \ -+ (var).linkCommandHandlerPtr = name_prefix##CommandHandler; \ -+ (var).linkTimerHandlerPtr = name_prefix##TimerHandler; \ -+ (var).linkCloseHandlerPtr = name_prefix##CloseHandler; \ -+ \ -+ (var).linkSendHandlerPtr = name_prefix##SendFrameHandler; \ -+ (var).linkReturnHandlerPtr = name_prefix##ReturnFrameHandler; \ -+ \ -+ (var).linkVcAllocateHandlerPtr = name_prefix##VcAllocateHandler; \ -+ (var).linkVcFreeHandlerPtr = name_prefix##VcFreeHandler; \ -+ (var).linkVcActivateHandlerPtr = name_prefix##VcActivateHandler; \ -+ (var).linkVcDeactivateHandlerPtr = name_prefix##VcDeactivateHandler; \ -+ (var).linkVcConfigureHandlerPtr = name_prefix##VcConfigureHandler; \ -+ \ -+ (var).linkVc2IdHandlerPtr = name_prefix##Vc2IdHandler; \ -+ (var).linkVcId2VcHandlerPtr = name_prefix##VcId2VcHandler; \ -+ (var).linkGetFramePoolHandlerPtr = name_prefix##GetFramePoolHandler; \ -+ \ -+ (var).linkTxDataHandlerPtr = name_prefix##TxDataHandler; \ -+ (var).linkRxDataHandlerPtr = name_prefix##RxDataHandler; \ -+} while (0) -+ -+#endif -+ -+typedef struct -+ { -+ dslFrameHandlerType rxIndicateHandlerPtr; -+ dslFrameHandlerType txCompleteHandlerPtr; -+ dslStatusHandlerType statusHandlerPtr; -+ } upperLayerFunctions; -+ -+ -+/* -+ * Debug data -+ */ -+#define kDslFirstDebugData 1000 -+#define kDslXmtPerSymTimeCompData (kDslFirstDebugData + 0) -+#define kDslRcvPerSymTimeCompData (kDslFirstDebugData + 1) -+#define kDslXmtAccTimeCompData (kDslFirstDebugData + 2) -+#define kDslRcvAccTimeCompData (kDslFirstDebugData + 3) -+#define kDslRcvPilotToneData (kDslFirstDebugData + 4) -+#define kDslTEQCoefData (kDslFirstDebugData + 5) -+#define kDslTEQInputData (kDslFirstDebugData + 6) -+#define kDslTEQOutputData (kDslFirstDebugData + 7) -+#define kDslRcvFFTInputData (kDslFirstDebugData + 8) -+#define kDslRcvFFTOutputData (kDslFirstDebugData + 9) -+#define kDslRcvCarrierSNRData (kDslFirstDebugData + 10) -+#define kDslXmtToneOrderingData (kDslFirstDebugData + 11) -+#define kDslRcvToneOrderingData (kDslFirstDebugData + 12) -+#define kDslXmtGainData (kDslFirstDebugData + 13) -+#define kDslRcvGainData (kDslFirstDebugData + 14) -+#define kDslMseData (kDslFirstDebugData + 15) -+#define kDslFEQOutErrData (kDslFirstDebugData + 16) -+#define kDslFEQCoefData (kDslFirstDebugData + 17) -+#define kDslShowtimeMseData (kDslFirstDebugData + 18) -+#define kDslTimeEstimationHWPhaseTweak (kDslFirstDebugData + 24) -+#define kDslSlicerInput (kDslFirstDebugData + 40) -+#define kDslXmtConstellations (kDslFirstDebugData + 41) -+#define kDslSnr1ShiftData (kDslFirstDebugData + 50) -+#define kDslSnr1InputData (kDslFirstDebugData + 51) -+#define kDslSnr1ReverbAvgData (kDslFirstDebugData + 52) -+#define kDslAnnexCFextSnrData (kDslFirstDebugData + 53) -+#define kDslAnnexCNextSnrData (kDslFirstDebugData + 54) -+#define kG994p1OutputXmtSample (kDslFirstDebugData + 100) -+#define kG994p1OutputMicroBit (kDslFirstDebugData + 101) -+#define kG994p1OutputBit (kDslFirstDebugData + 102) -+#define kG994p1OutputTimer (kDslFirstDebugData + 103) -+ -+/****************************************************************************/ -+/* 2. Constant definitions. */ -+/* */ -+/* 2.1 Defininitive constants */ -+/****************************************************************************/ -+ -+/* dslDirectionType */ -+ -+#define kATU_C 0 -+#define kATU_R 1 -+ -+/* ATM setup maps */ -+ -+#define kAtmCallMgrEnabled 0x00000001 /* Bit 0 */ -+#define kAtmAAL1FecEnabledMask 0x00000006 /* Bit 1 */ -+#define kAtmAAL1HiDelayFecEnabled 0x00000002 /* Bit 2 */ -+#define kAtmAAL1LoDelayFecEnabled 0x00000004 /* Bit 3 */ -+ -+/* dslLinkLayerType */ -+ -+#define kNoDataLink 0 -+#define kAtmLink 0x00000001 -+#define kAtmPhyLink 0x00000002 -+#define kDslPacketLink 0x00000003 -+#define kDslPacketPhyLink 0x00000004 -+ -+/* dslModulationType */ -+#define kNoCommonModulation 0x00000000 -+#define kG994p1 0x00000020 /* G.994.1 or G.hs */ -+#define kT1p413 0x00000040 /* T1.413 handshaking */ -+#define kG992p1AnnexA 0x00000001 /* G.992.1 or G.dmt Annex A */ -+#define kG992p1AnnexB 0x00000002 /* G.992.1 or G.dmt Annex B */ -+#define kG992p1AnnexC 0x00000004 /* G.992.1 or G.dmt Annex C */ -+#define kG992p2AnnexAB 0x00000008 /* G.992.2 or G.lite Annex A/B */ -+#define kG992p2AnnexC 0x00000010 /* G.992.2 or G.lite Annex C */ -+#define kG992p3AnnexA 0x00000100 /* G.992.3 or G.DMTbis Annex A */ -+#define kG992p3AnnexB 0x00000200 /* G.992.3 or G.DMTbis Annex A */ -+#define kG992p1AnnexI 0x00000400 /* G.992.1 Annex I */ -+#define kG992p5AnnexA 0x00010000 /* G.992.5 Annex A */ -+#define kG992p5AnnexB 0x00020000 /* G.992.5 Annex B */ -+#define kG992p5AnnexI 0x00040000 /* G.992.5 Annex I */ -+#define kG992p3AnnexM 0x00080000 /* G.992.3 Annex M */ -+#define kG992p5AnnexM 0x01000000 /* G.992.5 Annex M */ -+ -+/* demodCapabilities bitmap */ -+#define kEchoCancellorEnabled 0x00000001 -+#define kSoftwareTimeErrorDetectionEnabled 0x00000002 -+#define kSoftwareTimeTrackingEnabled 0x00000004 -+#define kDslTrellisEnabled 0x00000008 -+#define kHardwareTimeTrackingEnabled 0x00000010 -+#define kHardwareAGCEnabled 0x00000020 -+#define kDigitalEchoCancellorEnabled 0x00000040 -+#define kReedSolomonCodingEnabled 0x00000080 -+#define kAnalogEchoCancellorEnabled 0x00000100 -+#define kT1p413Issue1SingleByteSymMode 0x00000200 -+#define kDslAturXmtPowerCutbackEnabled 0x00000400 -+#ifdef G992_ANNEXC_LONG_REACH -+#define kDslAnnexCPilot48 0x00000800 -+#define kDslAnnexCReverb33_63 0x00001000 -+#endif -+#ifdef G992_ANNEXC -+#define kDslCentilliumCRCWorkAroundEnabled 0x00002000 -+#else -+#define kDslEnableRoundUpDSLoopAttn 0x00002000 -+#endif -+#define kDslBitSwapEnabled 0x00004000 -+#define kDslADILowRateOptionFixDisabled 0x00008000 -+#define kDslAnymediaGSPNCrcFixEnabled 0x00010000 -+#define kDslMultiModesPreferT1p413 0x00020000 -+#define kDslT1p413UseRAck1Only 0x00040000 -+#define kDslUE9000ADI918FECFixEnabled 0x00080000 -+#define kDslG994AnnexAMultimodeEnabled 0x00100000 -+#define kDslATUCXmtPowerMinimizeEnabled 0x00200000 -+#define kDropOnDataErrorsDisabled 0x00400000 -+#define kDslSRAEnabled 0x00800000 -+ -+#define kDslT1p413HigherToneLevelNeeded 0x01000000 -+#define kDslT1p413SubsampleAlignmentEnabled 0x02000000 -+#define kDslT1p413DisableUpstream2xIfftMode 0x04000000 -+ -+/* test mode related demodCapabilities, for internal use only */ -+#define kDslTestDemodCapMask 0xF8000000 -+#define kDslSendReverbModeEnabled 0x10000000 -+#define kDslSendMedleyModeEnabled 0x20000000 -+#define kDslAutoRetrainDisabled 0x40000000 -+#define kDslPllWorkaroundEnabled 0x80000000 -+#define kDslAfeLoopbackModeEnabled 0x08000000 -+ -+/* demodCapabilities bitmap2 */ -+ -+#define kDslAnnexCProfile1 0x00000001 -+#define kDslAnnexCProfile2 0x00000002 -+#define kDslAnnexCProfile3 0x00000004 -+#define kDslAnnexCProfile4 0x00000008 -+#define kDslAnnexCProfile5 0x00000010 -+#define kDslAnnexCProfile6 0x00000020 -+#define kDslAnnexCPilot64 0x00000040 -+#define kDslAnnexCPilot48 0x00000080 -+#define kDslAnnexCPilot32 0x00000100 -+#define kDslAnnexCPilot16 0x00000200 -+#define kDslAnnexCA48B48 0x00000400 -+#define kDslAnnexCA24B24 0x00000800 -+#define kDslAnnexCReverb33_63 0x00001000 -+#define kDslAnnexCCReverb6_31 0x00002000 -+ -+#define kDslAnnexIShapedSSVI 0x00004000 -+#define kDslAnnexIFlatSSVI 0x00008000 -+ -+#define kDslAnnexIPilot64 0x00010000 -+#define kDslAnnexIA48B48 0x00020000 -+#define kDslAnnexIPilot128 0x00040000 -+#define kDslAnnexIPilot96 0x00080000 -+ -+/* Features bitmap */ -+#define kG992p2RACK1 0x00000001 -+#define kG992p2RACK2 0x00000002 -+#define kG992p2DBM 0x00000004 -+#define kG992p2FastRetrain 0x00000008 -+#define kG992p2RS16 0x00000010 -+#define kG992p2ClearEOCOAM 0x00000020 -+#define kG992NTREnabled 0x00000040 -+#define kG992p2EraseAllStoredProfiles 0x00000080 -+#define kG992p2FeaturesNPar2Mask 0x0000003B -+#define kG992p2FeaturesNPar2Shift 0 -+ -+#define kG992p1RACK1 0x00000100 -+#define kG992p1RACK2 0x00000200 -+#define kG992p1STM 0x00000800 -+#define kG992p1ATM 0x00001000 -+#define kG992p1ClearEOCOAM 0x00002000 -+#define kG992p1FeaturesNPar2Mask 0x00003B00 -+#define kG992p1FeaturesNPar2Shift 8 -+#define kG992p1DualLatencyUpstream 0x00004000 -+#define kG992p1DualLatencyDownstream 0x00008000 -+#define kG992p1HigherBitRates 0x40000000 -+ -+#if defined(G992P1_ANNEX_I) -+#define kG992p1HigherBitRates1over3 0x80000000 -+#define kG992p1AnnexIShapedSSVI 0x00000001 -+#define kG992p1AnnexIFlatSSVI 0x00000002 -+#define kG992p1AnnexIPilotFlag 0x00000008 -+#define kG992p1AnnexIPilot64 0x00000001 -+#define kG992p1AnnexIPilot128 0x00000004 -+#define kG992p1AnnexIPilot96 0x00000008 -+#define kG992p1AnnexIPilotA48B48 0x00000010 -+#endif -+ -+#define kG992p1AnnexBRACK1 0x00010000 -+#define kG992p1AnnexBRACK2 0x00020000 -+#define kG992p1AnnexBUpstreamTones1to32 0x00040000 -+#define kG992p1AnnexBSTM 0x00080000 -+#define kG992p1AnnexBATM 0x00100000 -+#define kG992p1AnnexBClearEOCOAM 0x00200000 -+#define kG992p1AnnexBFeaturesNPar2Mask 0x003F0000 -+#define kG992p1AnnexBFeaturesNPar2Shift 16 -+ -+#define kG992p1AnnexCRACK1 0x01000000 -+#define kG992p1AnnexCRACK2 0x02000000 -+#define kG992p1AnnexCDBM 0x04000000 -+#define kG992p1AnnexCSTM 0x08000000 -+#define kG992p1AnnexCATM 0x10000000 -+#define kG992p1AnnexCClearEOCOAM 0x20000000 -+#define kG992p1AnnexCFeaturesNPar2Mask 0x3F000000 -+#define kG992p1AnnexCFeaturesNPar2Shift 24 -+ -+#define kG992p1HigherBitRates1over3 0x80000000 -+ -+/* auxFeatures bitmap */ -+#define kG994p1PreferToExchangeCaps 0x00000001 -+#define kG994p1PreferToDecideMode 0x00000002 -+#define kG994p1PreferToMPMode 0x00000004 -+#define kAfePwmSyncClockShift 3 -+#define kAfePwmSyncClockMask (0xF << kAfePwmSyncClockShift) -+#define AfePwmSyncClockEnabled(val) (((val) & kAfePwmSyncClockMask) != 0) -+#define AfePwmGetSyncClockFreq(val) ((((val) & kAfePwmSyncClockMask) >> kAfePwmSyncClockShift) - 1) -+#define AfePwmSetSyncClockFreq(val,freq) ((val) |= ((((freq)+1) << kAfePwmSyncClockShift) & kAfePwmSyncClockMask)) -+ -+/* SubChannel Info bitMap for G992p1 */ -+#define kSubChannelASODownstream 0x00000001 -+#define kSubChannelAS1Downstream 0x00000002 -+#define kSubChannelAS2Downstream 0x00000004 -+#define kSubChannelAS3Downstream 0x00000008 -+#define kSubChannelLSODownstream 0x00000010 -+#define kSubChannelLS1Downstream 0x00000020 -+#define kSubChannelLS2Downstream 0x00000040 -+#define kSubChannelLS0Upstream 0x00000080 -+#define kSubChannelLS1Upstream 0x00000100 -+#define kSubChannelLS2Upstream 0x00000200 -+#define kSubChannelInfoOctet1Mask 0x0000001F -+#define kSubChannelInfoOctet2Mask 0x000003E0 -+#define kSubChannelInfoOctet1Shift 0 -+#define kSubChannelInfoOctet2Shift 5 -+ -+/****************************************************************************/ -+/* 3. Interface functions. */ -+/* */ -+/****************************************************************************/ -+ -+#ifdef G992P1 -+#if defined(G992P1_ANNEX_I2X) || defined(G992P5) -+/* lke */ -+#define kDslSamplingFreq 4416000 -+#define kDslMaxFFTSize 1024 -+#define kDslMaxFFTSizeShift 10 -+#elif defined(G992P1_ANNEX_I4X) -+#define kDslSamplingFreq 8832000 -+#define kDslMaxFFTSize 2048 -+#define kDslMaxFFTSizeShift 11 -+#elif defined(G992P1_ANNEX_I8X) -+#define kDslSamplingFreq 17664000 -+#define kDslMaxFFTSize 4096 -+#define kDslMaxFFTSizeShift 12 -+#else -+#define kDslSamplingFreq 2208000 -+#define kDslMaxFFTSize 512 -+#define kDslMaxFFTSizeShift 9 -+#endif -+#else -+#define kDslSamplingFreq 1104000 -+#define kDslMaxFFTSize 256 -+#define kDslMaxFFTSizeShift 8 -+#endif -+ -+#if defined(G992_ATUR_UPSTREAM_SAMPLING_FREQ_276KHZ) -+#define kDslATURUpstreamSamplingFreq 276000 -+#define kDslATURFFTSizeShiftUpstream 6 -+#elif defined(G992_ATUR_UPSTREAM_SAMPLING_FREQ_552KHZ) -+#define kDslATURUpstreamSamplingFreq 552000 -+#define kDslATURFFTSizeShiftUpstream 7 -+#else -+#define kDslATURUpstreamSamplingFreq kDslSamplingFreq -+#define kDslATURFFTSizeShiftUpstream kDslMaxFFTSizeShift -+#endif -+ -+#if defined(G992_ATUC_UPSTREAM_SAMPLING_FREQ_276KHZ) -+#define kDslATUCUpstreamSamplingFreq 276000 -+#define kDslATUCFFTSizeShiftUpstream 6 -+#elif defined(G992_ATUC_UPSTREAM_SAMPLING_FREQ_552KHZ) -+#define kDslATUCUpstreamSamplingFreq 552000 -+#define kDslATUCFFTSizeShiftUpstream 7 -+#else -+#define kDslATUCUpstreamSamplingFreq kDslSamplingFreq -+#define kDslATUCFFTSizeShiftUpstream kDslMaxFFTSizeShift -+#endif -+ -+#define kDslMaxSamplesPerSymbol (kDslMaxFFTSize+kDslMaxFFTSize/16) -+ -+#if defined(G992P1_ANNEX_I) || defined(G992P5) -+#define kDslMaxTEQLength 32 -+#else -+#define kDslMaxTEQLength 16 -+#endif -+ -+#define kDslMaxSymbolBlockSize 1 -+#define kDslMaxSampleBlockSize (kDslMaxSymbolBlockSize*kDslMaxSamplesPerSymbol) -+ -+#ifdef G992_ANNEXC -+#define kG992AnnexCXmtToRcvPathDelay 512 /* In samples at kDslSamplingFreq */ -+#endif -+ -+/*** For compatibility with existing test codes ***/ -+#if !defined(TARG_OS_RTEMS) -+typedef dslStatusCode modemStatusCode; -+typedef dslStatusStruct modemStatusStruct; -+typedef dslStatusHandlerType statusHandlerType; -+typedef dslCommandCode modemCommandCode; -+typedef dslCommandStruct modemCommandStruct; -+typedef dslCommandHandlerType commandHandlerType; -+#endif -+ -+extern void SM_DECL SoftDslSetRefData (void *gDslVars, ulong refData); -+extern ulong SM_DECL SoftDslGetRefData (void *gDslVars); -+extern int SM_DECL SoftDslGetMemorySize(void); -+extern void SM_DECL SoftDslInit (void *gDslVars); -+extern void SM_DECL SoftDslReset (void *gDslVars); -+extern void SM_DECL SoftDslLineHandler (void *gDslVars, int rxNSamps, int txNSamps, short *rcvPtr, short *xmtPtr) FAST_TEXT; -+extern Boolean SM_DECL SoftDslCommandHandler (void *gDslVars, dslCommandStruct *cmdPtr); -+ -+/* swap Lmem functions */ -+#if defined(bcm47xx) && defined(SWAP_LMEM) -+extern int SoftDslSwapLmem(void *gDslVars, int sectionN, int imageN); -+extern void init_SoftDslSwapLmem(void); -+#endif -+ -+/* SoftDsl time functions */ -+ -+extern ulong SM_DECL SoftDslGetTime(void *gDslVars); -+#define __SoftDslGetTime(gv) gDslGlobalVarPtr->execTime -+ -+extern void SM_DECL SoftDslTimer(void *gDslVars, ulong timeMs); -+ -+/* SoftDsl IO functions */ -+ -+extern void SM_DECL SoftDslClose (void *gDslVars); -+extern int SM_DECL SoftDslSendFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); -+extern int SM_DECL SoftDslReturnFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); -+ -+/* SoftDsl connection functions */ -+ -+extern void* SM_DECL SoftDslVcAllocate(void *gDslVars, dslVcParams *pVcParams); -+extern void SM_DECL SoftDslVcFree(void *gDslVars, void *pVc); -+extern Boolean SM_DECL SoftDslVcActivate(void *gDslVars, void *pVc); -+extern void SM_DECL SoftDslVcDeactivate(void *gDslVars, void *pVc); -+extern Boolean SM_DECL SoftDslVcConfigure(void *gDslVars, void *pVc, ulong mid, dslVcParams *pVcParams); -+ -+/* Special functions for LOG support */ -+ -+extern ulong SM_DECL SoftDslVc2Id(void *gDslVars, void *pVc); -+extern void* SM_DECL SoftDslVcId2Vc(void *gDslVars, ulong vcId); -+extern void* SM_DECL SoftDslGetFramePool(void *gDslVars); -+ -+/* Functions for host mode execution */ -+ -+extern void* SM_DECL SoftDslRxCellHeaderHandler (void *gDslVars, ulong hdr, uchar hdrHec); -+extern void* SM_DECL SoftDslRxCellDataHandler (void *gDslVars, int, void*); -+extern void* SM_DECL SoftDslTxCellHandler (void *gDslVars, int*, void*); -+extern Boolean SM_DECL SoftDslPhyCommandHandler (void *gDslVars, dslCommandStruct *cmdPtr); -+ -+/* Functions getting OEM parameters including G994 non standard info management */ -+ -+extern char* SM_DECL SoftDslGetTrainingVendorIDString(void *gDslVars); -+extern char* SM_DECL SoftDslGetVendorIDString(void *gDslVars); -+extern char* SM_DECL SoftDslGetSerialNumberString(void *gDslVars); -+extern char* SM_DECL SoftDslGetRevString(void *gDslVars); -+extern int SM_DECL SoftDslRevStringSize(void *gDslVars); -+extern int SM_DECL SoftDslSerNumStringSize(void *gDslVars); -+ -+extern void* SM_DECL SoftDslGetG994p1RcvNonStdInfo(void *gDslVars, ulong *pLen); -+extern void* SM_DECL SoftDslGetG994p1XmtNonStdInfo(void *gDslVars, ulong *pLen); -+ -+#ifdef G997_1_FRAMER -+ -+/* G997 functions */ -+ -+extern int SM_DECL SoftDslG997SendFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); -+extern int SM_DECL SoftDslG997ReturnFrame (void *gDslVars, void *pVc, ulong mid, dslFrame * pFrame); -+ -+#endif -+ -+#ifdef ADSL_MIB -+extern void * SM_DECL SoftDslMibGetData (void *gDslVars, int dataId, void *pAdslMibData); -+#endif -+ -+#define SoftDsl SoftDslLineHandler -+#define kSoftDslMaxMemorySize (32768*16384) -+ -+/* -+ * Internal functions -+ */ -+ -+extern void SoftDslStatusHandler (void *gDslVars, dslStatusStruct *status) FAST_TEXT; -+extern void SoftDslInternalStatusHandler (void *gDslVars, dslStatusStruct *status); -+ -+/* -+ * DSL OS functions -+ */ -+ -+#ifdef DSL_OS -+ -+#define SoftDslIsBgAvailable(gDslVars) (DSLOS_THREAD_INACTIVE == DslOsGetThreadState(&(gDslGlobalVarPtr->tcbDslBg))) -+#define SoftDslGetBgThread(gDslVars) \ -+ ((DSLOS_THREAD_INACTIVE != DslOsGetThreadState(&(gDslGlobalVarPtr->tcbDslBg))) ? &gDslGlobalVarPtr->tcbDslBg : NULL) -+#define SoftDslBgStart(gDslVars, pFunc) \ -+ DslOsCreateThread(&gDslGlobalVarPtr->tcbDslBg, DSLOS_PRIO_HIGHEST - 10, pFunc, gDslVars, \ -+ WB_ADDR(gDslGlobalVarPtr->bgStack), sizeof(gDslGlobalVarPtr->bgStack)) -+#define SoftDslBgStop(gDslVars) DslOsDeleteThread(&gDslGlobalVarPtr->tcbDslBg) -+ -+#define SoftDslEnterCritical() DslOsEnterCritical() -+#define SoftDslLeaveCritical(id) DslOsLeaveCritical(id) -+ -+#else -+ -+#define SoftDslIsBgAvailable(gDslVars) 1 -+#define SoftDslGetBgThread(gDslVars) 1 -+#define SoftDslBgStart(gDslVars, pFunc) (*pFunc)(gDslVars) -+#define SoftDslBgStop(gDslVars) -+ -+#define SoftDslEnterCritical() 0 -+#define SoftDslLeaveCritical(id) -+ -+#endif -+ -+/* -+ * DSL frames and native frame functions -+ */ -+ -+DslFrameDeclareFunctions (DslFrameNative) -+ -+/* -+ * These functions are for testing purpose, they are defined outside. -+ */ -+#ifdef STACK_SIZE_REQUIREMENT_TEST -+extern void StackSizeTestInitializeStackBeforeEntry(void); -+extern void StackSizeTestCheckStackAfterExit(void); -+extern void StackSizeTestBackupStack(void); -+extern void StackSizeTestRestoreStack(void); -+#endif /* STACK_SIZE_REQUIREMENT_TEST */ -+ -+#ifdef NEC_NSIF_WORKAROUND -+#define SoftDslGetG994NsStatus(gDslVars) (gDslGlobalVarPtr->G994NsStatus) -+#define SoftDslGetG994NsFailCounter(gDslVars) (gDslGlobalVarPtr->G994NsFailCounter) -+#endif -+ -+#endif /* SoftDslHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModem.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModem.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModem.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModem.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,3128 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * SoftModem.h -+ * -+ * -+ * Description: -+ * This file contains the exported interface for SoftModem.c -+ * -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.16 $ -+ * -+ * $Id: SoftModem.h,v 1.16 2004/04/14 21:16:51 ilyas Exp $ -+ * -+ * $Log: SoftModem.h,v $ -+ * Revision 1.16 2004/04/14 21:16:51 ilyas -+ * Merged with the latest changes in ADSL driver -+ * -+ * Revision 1.15 2004/04/13 00:56:10 ilyas -+ * Merged the latest ADSL driver changes for RTEMS -+ * -+ * Revision 1.14 2004/04/13 00:16:59 ilyas -+ * Merged the latest ADSL driver changes -+ * -+ * Revision 1.13 2003/02/22 05:07:11 ilyas -+ * Added VendorID for T1.413 mode -+ * -+ * Revision 1.12 2002/10/03 19:34:24 ilyas -+ * Added size for EOC serial number register -+ * -+ * Revision 1.11 2002/09/07 01:37:22 ilyas -+ * Added support for OEM parameters -+ * -+ * Revision 1.10 2001/12/13 02:25:34 ilyas -+ * Added definitions for G997 -+ * -+ * Revision 1.9 2001/11/30 05:56:34 liang -+ * Merged top of the branch AnnexBDevelopment onto top of the tree. -+ * -+ * Revision 1.7.2.2 2001/11/27 02:32:05 liang -+ * Combine vendor ID, serial #, and version number into SoftModemVersionNumber.c. -+ * -+ * Revision 1.7.2.1 2001/10/03 01:44:10 liang -+ * Merged with codes from main tree (tag SoftDsl_2_18). -+ * -+ * Revision 1.8 2001/09/21 19:19:01 ilyas -+ * Minor fixes for VxWorks build -+ * -+ * Revision 1.7 2000/07/17 21:08:16 lkaplan -+ * removed global pointer -+ * -+ * Revision 1.6 2000/05/03 04:09:11 ilyas -+ * Added ID for ATM log data -+ * -+ * Revision 1.5 2000/04/01 01:07:44 liang -+ * Changed file names and some module names. -+ * -+ * Revision 1.4 2000/03/02 20:18:12 ilyas -+ * Added test status code for ATM VC finished -+ * -+ * Revision 1.3 1999/08/05 20:02:11 liang -+ * Merged with the softmodem top of the tree on 08/04/99. -+ * -+ * Revision 1.2 1999/01/27 22:19:08 liang -+ * Merge with SoftModem_3_1_02. -+ * Include SoftDsl.h conditionlly so that the test utilities from SoftModem -+ * can be used without major change. It can be merged easily to SoftModem. -+ * -+ * Revision 1.170 1998/12/22 00:52:52 liang -+ * Added auxFeatures bit kV8HoldANSamUntilDetCI. When it is set, ANSam won't be -+ * sent until CI is detected (normally ANSam will be sent after 200ms). This is -+ * useful in V34 half duplex fax mode. -+ * -+ * Revision 1.169 1998/12/19 04:46:52 mwg -+ * Added bits for fax/data calling tones -+ * -+ * Revision 1.168 1998/12/17 02:46:10 scott -+ * Removed overlay-related commands/statuses and added -+ * kSetTrainingDelayReductionCmd -+ * -+ * Revision 1.167 1998/12/12 03:17:42 scott -+ * Added overlay commands and statuses -+ * -+ * Revision 1.166 1998/12/02 05:34:23 mwg -+ * Fixed a problem with bong tone detection -+ * -+ * Revision 1.165 1998/11/26 00:22:44 yura -+ * Added two more log data types: modulatorInputData & modulatorOutputData -+ * -+ * Revision 1.164 1998/11/19 03:08:04 mwg -+ * Added kSetCallProgressParamsCmd -+ * -+ * Revision 1.163 1998/11/18 23:00:03 liang -+ * Added a separate command kLoopbackTestAutoRespEnableCmd to enable or disable -+ * the loopback test auto respond feature when the modem is already on-line. -+ * -+ * Revision 1.162 1998/11/13 20:50:21 scott -+ * SoftModemInternalStatusHandler is now SM_DECL as well -+ * -+ * Revision 1.161 1998/11/13 20:42:25 scott -+ * Added SM_DECL type to entrypoint functions -+ * -+ * Revision 1.160 1998/11/13 03:02:54 scott -+ * Added SoftModemTimer prototype. -+ * Also include V.8bis types if AT_COMMANDS_V8BIS is defined. -+ * -+ * Revision 1.159 1998/11/12 01:22:46 scott -+ * Increased number of AT registers to 46 -+ * -+ * Revision 1.158 1998/11/05 22:35:18 yura -+ * Added two more S-registers -+ * -+ * Revision 1.157 1998/11/05 03:09:54 mwg -+ * Added kLapmRetryFailed to the list of LAPM errors -+ * -+ * Revision 1.156 1998/11/05 00:13:20 liang -+ * Add new connectionInfo status kLoopbackSelfTestNewErrs to report -+ * new bit errors whenever it happens. -+ * -+ * Revision 1.155 1998/11/04 07:11:33 mwg -+ * Moved declaration for SoftModemATPrintf() to SoftModem.h -+ * -+ * Revision 1.154 1998/10/29 07:24:49 mwg -+ * *** empty log message *** -+ * -+ * Revision 1.153 1998/10/15 02:09:37 luisgm -+ * added separate data rate mask for Flex to dataPumpCapabilities structure -+ * -+ * Revision 1.152 1998/10/14 00:12:15 scott -+ * Added kMnpOOBFrameCmd and command.frameSpec -+ * -+ * Revision 1.151 1998/10/09 02:19:22 luisgm -+ * added FlexV8bisStruct member to dataPumpCapabilities struc to store flex v8bis info, added define for kFlexSkipV8bis -+ * -+ * Revision 1.150 1998/10/06 19:36:33 mwg -+ * Limited 56K rates to 53K -+ * -+ * Revision 1.149 1998/10/03 03:43:38 ilyas -+ * Added status codes for Audio -+ * -+ * Revision 1.148 1998/10/01 02:03:17 mwg -+ * Added external pulse dialer option -+ * -+ * Revision 1.147 1998/09/30 01:44:26 mwg -+ * Added new functions SoftModemGetWriteBufferSize() & SoftModemGetReadBufferSize() -+ * -+ * Revision 1.146 1998/09/22 03:44:38 scott -+ * Added ALWAYS_LONG_ALIGN() macro -+ * -+ * Revision 1.145 1998/09/21 21:49:22 scott -+ * Added logDataCodes for mnpDecoder(Input/Output)Data -+ * -+ * Revision 1.144 1998/08/31 22:57:21 luisgm -+ * added constants for Flex data rates + kFlexEventTRN2AFinished -+ * -+ * Revision 1.143 1998/08/18 05:09:53 mwg -+ * Increased AT command buffer size to 128 -+ * -+ * Revision 1.142 1998/08/18 03:45:54 ilyas -+ * Integrated Audio into V70 test -+ * -+ * Revision 1.141 1998/08/14 17:46:04 ilyas -+ * Integrated Audio and G729a -+ * -+ * Revision 1.140 1998/08/10 21:42:19 mwg -+ * Added space and mark parity -+ * -+ * Revision 1.139 1998/08/08 03:39:33 scott -+ * Moved the C6xDefs and PentiumDefs includes before the internal function -+ * prototypes (to permit their redefinitions) -+ * -+ * Revision 1.138 1998/08/07 20:37:27 yura -+ * Added new S-register for &T commands -+ * -+ * Revision 1.137 1998/08/01 05:22:09 mwg -+ * Implemented split memory model -+ * -+ * Revision 1.136 1998/07/22 02:12:22 liang -+ * Added self test mode for loopback test. -+ * -+ * Revision 1.135 1998/07/21 01:19:03 liang -+ * Changed loopback test command parameter interface to use regular modeSpec. -+ * -+ * Revision 1.134 1998/07/18 03:52:10 liang -+ * Added V54 loop 2 test for V22. -+ * -+ * Revision 1.133 1998/07/15 02:45:03 mwg -+ * Added new connection info code: kPCMSpectralShapingBits -+ * -+ * Revision 1.132 1998/07/15 00:18:48 liang -+ * Add special turn off command for V34 fax to handle different turn off procedures. -+ * -+ * Revision 1.131 1998/07/13 22:19:49 liang -+ * Add V8 CI detection status and ANSam disable aux feature. -+ * -+ * Revision 1.130 1998/07/08 17:09:13 scott -+ * Added USE_LONG_ALIGN; support for 6 and PentiumDefs.h files -+ * -+ * Revision 1.129 1998/07/03 23:28:13 mwg -+ * Added Fax Class 2 defines -+ * -+ * Revision 1.128 1998/07/03 23:17:33 mwg -+ * Insuread command/status structures are long aligned -+ * -+ * Revision 1.127 1998/06/23 16:48:01 mwg -+ * Fixed a longstanding problem typical for Win95 VxD: whenever new -+ * VxD is intalled the confuguration profile may not match the old one but -+ * since the crc is correct it is still being downloaded. To avoid the problem -+ * a crc for the version number was added to avoid confusion between profiles -+ * of different versions. -+ * -+ * Revision 1.126 1998/06/19 21:04:06 liang -+ * Add auxiliary feature bit kV90ServerNotDetSbarAfterJdbarFix. -+ * -+ * Revision 1.125 1998/06/11 22:48:14 liang -+ * Add kPCM28000bpsShift constant. -+ * -+ * Revision 1.124 1998/06/05 22:11:51 liang -+ * New V90 DIL works through data mode. -+ * -+ * Revision 1.123 1998/06/01 23:03:41 liang -+ * Add v90RcvdDilDiffData logging. -+ * -+ * Revision 1.122 1998/06/01 21:24:38 mwg -+ * Changed some of the names. -+ * -+ * Revision 1.121 1998/05/13 04:55:22 mwg -+ * Now passing the number of spectral shaping bits in aux features -+ * -+ * Revision 1.120 1998/05/13 02:53:13 liang -+ * Add field "value" to command param structure. -+ * -+ * Revision 1.119 1998/05/12 04:42:23 mwg -+ * Replaced some of the status messages -+ * -+ * Revision 1.118 1998/05/11 23:36:10 mwg -+ * Added 8000Hz symbol rate to the map -+ * -+ * Revision 1.117 1998/05/05 04:28:39 liang -+ * V90 works up to data mode first version. -+ * -+ * Revision 1.116 1998/04/21 09:36:45 mwg -+ * Fixed a few problems for 16Khz and added 32Khz. -+ * -+ * Revision 1.115 1998/04/17 22:33:54 liang -+ * Added V90 DIL for mu-law PCM. -+ * -+ * Revision 1.114 1998/04/15 22:36:39 mwg -+ * Added new parameters to kDialCmd to allow individual control of each -+ * DTMF group attenuation. -+ * -+ * Revision 1.113 1998/04/15 18:16:22 ilyas -+ * Integrated V.8bis and changed coding of LinkLayerType to bitMap -+ * -+ * Revision 1.112 1998/04/15 07:59:06 mwg -+ * Added new status codes for V.90 -+ * -+ * Revision 1.111 1998/04/11 00:29:16 mwg -+ * Fixed the warnings which appeared when Irix builds were upgraded to -+ * gcc 2.8.1 -+ * -+ * Revision 1.110 1998/04/11 00:25:01 ilyas -+ * More V.70 statuses -+ * -+ * Revision 1.109 1998/04/10 23:29:31 mwg -+ * Added new field to capabilities: dataRates56K -+ * -+ * Revision 1.108 1998/04/09 02:02:56 mwg -+ * Added status for Ja detection. -+ * -+ * Revision 1.107 1998/04/03 02:05:30 ilyas -+ * More V.70 commands added -+ * -+ * Revision 1.106 1998/04/02 06:15:39 mwg -+ * Added coding type (Mu-law/A-law) status reporting. -+ * -+ * Revision 1.105 1998/03/30 09:53:57 mwg -+ * Added definition for k56Flex modulation for future use. -+ * -+ * Revision 1.104 1998/03/27 17:56:09 ilyas -+ * Added definitions for V.70 -+ * -+ * Revision 1.103 1998/03/26 23:29:04 liang -+ * Added first version of IMD estimation. -+ * -+ * Revision 1.102 1998/03/20 04:37:26 mwg -+ * Increased the size of the nominal variance to 32 bit. -+ * -+ * Revision 1.101 1998/03/06 01:22:04 yura -+ * Improved Win95 VxD segmentation handling -+ * -+ * Revision 1.100 1998/03/06 01:06:18 liang -+ * Add initial version of V90 phase 1 and 2. -+ * -+ * Revision 1.99 1998/03/05 23:42:22 mwg -+ * (hxl) Implemented enable/disable call waiting command. -+ * -+ * Revision 1.98 1998/02/26 06:13:06 mwg -+ * Increased the number of AT S-registers to account for newly introduced -+ * S9 and S10. -+ * -+ * Revision 1.97 1998/02/25 18:18:25 scott -+ * Added v42bisCycleCount for V42BIS_THROUGHPUT_CONTROL -+ * -+ * Revision 1.96 1998/02/24 05:31:20 mwg -+ * Added stuff required by international version of AT command processor. -+ * -+ * Revision 1.95 1998/02/17 01:14:10 scott -+ * Reenabled sys/types.h for Linux builds -+ * -+ * Revision 1.94 1998/02/16 22:32:23 scott -+ * Changed copyright notice -+ * -+ * Revision 1.93 1998/02/16 22:17:44 scott -+ * Turned off include of sys/types.h for normal builds -+ * -+ * Revision 1.92 1998/02/16 21:53:28 scott -+ * Exclude sys/types.h for another compiler -+ * -+ * Revision 1.91 1998/02/09 18:24:10 scott -+ * Fixed ComplexShort type to work around bugs in MS and GreenHill compilers -+ * -+ * Revision 1.90 1998/01/27 01:37:36 mwg -+ * Added new log identifier for pcm infidelity data. -+ * -+ * Revision 1.89 1998/01/22 19:49:32 liang -+ * Add auxFeature bit kFaxV34HDXAllowAsymCtrlChan. -+ * -+ * Revision 1.88 1998/01/21 02:32:01 liang -+ * Add more V34 half duplex training progress codes. -+ * -+ * Revision 1.87 1997/12/23 03:28:25 liang -+ * Add more half duplex V34 related constants. -+ * -+ * Revision 1.86 1997/12/18 19:38:50 scott -+ * Added agcData log type. -+ * Added kDisableFaxFastClearDown demod capability -+ * -+ * Revision 1.85 1997/12/18 06:02:45 mwg -+ * Added a function to reenable DC offset tracking. -+ * -+ * Revision 1.84 1997/12/17 22:46:30 mwg -+ * Minor modifications to X2 escape status reporting. -+ * -+ * Revision 1.83 1997/12/16 06:49:45 mwg -+ * Implemented proper data rate reporting for PCM modem. -+ * -+ * Revision 1.82 1997/12/13 06:11:08 mwg -+ * Added X2 interface hooks -+ * -+ * Revision 1.81 1997/12/02 06:21:33 mwg -+ * Implemented kSetATRegister command. -+ * -+ * Revision 1.80 1997/11/27 02:11:41 liang -+ * Add code for half duplex V34 control channel. -+ * -+ * Revision 1.79 1997/11/19 19:52:48 guy -+ * Added constant to define V.34 half duplex operation -+ * -+ * Revision 1.78 1997/10/24 05:15:53 scott -+ * Added AGC and phase hit recovery to demodCapabilities -+ * -+ * Revision 1.77 1997/10/01 02:47:50 liang -+ * Add PCM interface. -+ * -+ * Revision 1.76 1997/09/29 15:48:04 yura -+ * Added #pragma statement for W95 Vxd -+ * -+ * Revision 1.75 1997/09/18 20:32:39 scott -+ * Do not include VxD support files if GENERATE_DEPENDENCIES is defined. -+ * -+ * Revision 1.74 1997/09/18 12:40:55 yura -+ * Removed #ifdef statments to be more robust -+ * -+ * Revision 1.73 1997/09/17 17:32:41 scott -+ * Do not include sys/types.h for 6 -+ * -+ * Revision 1.72 1997/08/08 00:53:48 mwg -+ * Added fields for LAP-M frames printout. -+ * Added fields in auxFeatures to pass preemphasis filter parameters -+ * to V.34 phase 3 when doing PTT testing. -+ * -+ * Revision 1.71 1997/08/06 03:41:45 yura -+ * Added a few includes and defines needed by Win 95 driver. -+ * -+ * Revision 1.70 1997/08/05 03:22:10 liang -+ * Add equalizer center tap adjustment calculation related constants. -+ * -+ * Revision 1.69 1997/07/29 02:44:19 mwg -+ * Added new field to dataPumpCapabilities structure. This field is not -+ * yet exposed to external interface and currently is only used to -+ * enable PTT testing. -+ * Added new commands: kStartDataModemPTTTestCmd & kStartDataModemLoopbackTestCmd -+ * -+ * Revision 1.68 1997/07/22 22:05:10 liang -+ * Change sample rate setup as a normal command. -+ * -+ * Revision 1.67 1997/07/21 23:23:30 liang -+ * Define SoftModemSetSampleRate as null when SAMPLE_RATE_CONVERSION is not defined. -+ * -+ * Revision 1.66 1997/07/21 22:38:36 liang -+ * Change sample rate converter structure so that sample rate can be changed -+ * on the fly (at very begining) to either 8KHz or 9600Hz. -+ * -+ * Revision 1.65 1997/07/21 20:22:01 mwg -+ * Added statusInfoData to the log identifiers. -+ * -+ * Revision 1.64 1997/07/16 20:40:07 scott -+ * Added multitone monitor fields -+ * -+ * Revision 1.63 1997/07/10 02:31:08 mwg -+ * 1. Added kRxFrameHDLCFlags detected status for the -+ * framingInfo. -+ * 2. Added kLapmMNPFrameDetected status to lapmStatusCode. -+ * 3. Increased the number of AT registers to 35 -+ * 4. Modified LinkLayerSpec structure in modemCommandStruc -+ * to provide the initial values of rxDataRate & -+ * txDataRate and RT delay for the cases when -+ * link layer is started *after* the data connection -+ * is established and the status snooper is unable -+ * to determine the rates and RT delay. -+ * 5. Added a few extra *empty* constant definitions for -+ * disabled features. -+ * -+ * Revision 1.62 1997/07/02 19:15:05 scott -+ * Added bits for Bel103 & Bel212 modulations. -+ * -+ * Revision 1.61 1997/07/02 05:15:16 mwg -+ * Added MNP code. -+ * -+ * Revision 1.60 1997/07/01 23:52:48 mwg -+ * Modified the record test setup to log and use all the commands. -+ * -+ * Revision 1.59 1997/06/25 19:11:26 mwg -+ * 1. Added new framingInfoCode values for Async framing error reporting; -+ * 2. Added a substructure to pass serial data format for kSetDTERate cmd; -+ * -+ * Revision 1.58 1997/05/28 02:05:08 liang -+ * Add PCM modem phase 2 codes. -+ * -+ * Revision 1.57 1997/05/12 21:55:08 liang -+ * Add call waiting tone detector module. -+ * -+ * Revision 1.56 1997/03/21 23:50:08 liang -+ * Added initial version of V8bis module to CVS tree. -+ * -+ * Revision 1.55 1997/03/19 18:35:05 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.54 1997/03/11 11:11:45 mwg -+ * Added code to report V42bis statistics. -+ * -+ * Revision 1.53 1997/03/04 06:21:08 mwg -+ * Added logging of most commands. -+ * -+ * Revision 1.52 1997/02/28 23:45:13 liang -+ * Added training progress status report kPhaseJitterDeactivated. -+ * -+ * Revision 1.51 1997/02/28 22:23:22 mwg -+ * Implemented the following features: -+ * - Cleardown for fax modulations V.27, V.29 V.17 -+ * - Rockwell compatible bitmap report (needed by a customer) -+ * -+ * Revision 1.50 1997/02/28 03:05:31 mwg -+ * Added more logging data types. -+ * -+ * Revision 1.49 1997/02/27 05:28:58 mwg -+ * Added RxFrameOK report. -+ * -+ * Revision 1.48 1997/02/27 01:48:53 liang -+ * Add kV8MenuDataWord1 and kV8MenuDataWord2 connectionInfo status. -+ * -+ * Revision 1.47 1997/02/24 02:30:27 mwg -+ * Added new log data: predictorErrData -+ * -+ * Revision 1.46 1997/02/22 03:00:22 liang -+ * Add echoCancelledSignalData. -+ * -+ * Revision 1.45 1997/02/21 01:26:42 liang -+ * Add six more bits for the Demodulator capabilities to deal with 2nd order -+ * time tracking & PLLs, as well as shorter NEEC & PFEEC, and front end HBF. -+ * -+ * Revision 1.44 1997/02/17 03:09:00 mwg -+ * Added LAPM statistics printout. -+ * -+ * Revision 1.43 1997/02/04 08:38:47 mwg -+ * Added dc cancelled samples printout. -+ * -+ * Revision 1.42 1997/01/29 21:40:28 mwg -+ * Changed the way timers work: now time is passed as Q4 ms instead of ticks. -+ * Completed the 8KHz front end implementation. -+ * Got rid of kSamplesPerSecond constant. -+ * -+ * Revision 1.41 1997/01/24 07:13:50 mwg -+ * Added new statuses for automoder. -+ * -+ * Revision 1.40 1997/01/23 02:03:08 mwg -+ * Replaced old sample rate conversion with the newer one. -+ * Still has to resolve the automoding issue. -+ * -+ * Revision 1.39 1997/01/21 00:55:04 mwg -+ * Added 8KHz front end functionality. -+ * -+ * Revision 1.38 1996/11/13 00:30:55 liang -+ * Add kAutoLoadReductionEnabled to demodCapabilities so that PFEEC, FEEC, IEEC -+ * can be disabled automatically, but for worst processor loading test they -+ * won't be disabled when this bit is not set. -+ * -+ * Revision 1.37 1996/11/07 23:07:18 mwg -+ * Rearranged global variables to allow V.17 short training. -+ * -+ * Revision 1.36 1996/09/17 23:55:05 liang -+ * Change kMaxDataBlockSize from 16 to 24 to handle high data rates. -+ * -+ * Revision 1.35 1996/09/05 19:43:39 liang -+ * Removed caller ID error status code kCallerIDUnknownMessageType, and -+ * added caller ID status codes kCallerIDUnknownMessage & kCallerIDWholeMessage. -+ * Changed the callerIDStatus report structure. -+ * -+ * Revision 1.34 1996/08/29 00:36:57 liang -+ * Added kLapmTxFrameStatus and kLapmRxFrameStatus. -+ * -+ * Revision 1.33 1996/08/27 22:56:01 liang -+ * Added kResetHardware status code. -+ * -+ * Revision 1.32 1996/08/23 23:35:35 liang -+ * Add kATDebugStatus and function SoftModemGetHybridDelay. -+ * -+ * Revision 1.31 1996/08/22 01:13:19 yg -+ * Added AT command processor. -+ * -+ * Revision 1.30 1996/08/12 21:46:47 mwg -+ * Added code to report capabilities. -+ * -+ * Revision 1.29 1996/08/10 01:59:59 mwg -+ * Added report of the sent rate sequence; -+ * -+ * Revision 1.28 1996/08/07 22:15:02 mwg -+ * Added new status reports: -+ * kRemoteFreqOffset -+ * kIEECDeactivated -+ * kPFEECDeactivated -+ * -+ * Revision 1.27 1996/06/27 05:15:48 mwg -+ * Added V.24 circuit status. -+ * -+ * Revision 1.26 1996/06/27 02:12:43 mwg -+ * Cleaned the code. -+ * -+ * Revision 1.25 1996/06/20 23:57:30 mwg -+ * Added new training progress status. -+ * -+ * Revision 1.24 1996/06/18 21:13:50 mwg -+ * Added trellis MSE data logging. -+ * -+ * Revision 1.23 1996/06/12 02:31:10 mwg -+ * Added new type: VeryLong -+ * -+ * Revision 1.22 1996/06/08 22:15:39 mwg -+ * Added new status report: kCleardownStarted -+ * Added new field for the features: kV34bisEnabled -+ * -+ * Revision 1.21 1996/05/31 00:29:11 liang -+ * Add feature bit kV34ExtraINFOPreamble. -+ * -+ * Revision 1.20 1996/05/30 23:28:31 mwg -+ * Replaced enums with #defines -+ * -+ * Revision 1.19 1996/05/25 00:38:27 mwg -+ * Added kProjectedDataRate training progress report. -+ * -+ * Revision 1.18 1996/05/24 23:27:15 mwg -+ * Added mode status codes. -+ * -+ * Revision 1.17 1996/05/10 05:39:59 liang -+ * Move the includes for DEBUG inside "ifndef SoftModemTypes" so that -+ * cap build won't break. -+ * -+ * Revision 1.16 1996/05/08 01:49:34 mwg -+ * Added capability to setup auxiliary data channel handlers. -+ * -+ * Revision 1.15 1996/05/07 22:51:08 liang -+ * Added group delay estimation and improved symbol rate selection process. -+ * -+ * Revision 1.14 1996/05/06 06:49:09 mwg -+ * Fixed linux problems. -+ * -+ * Revision 1.13 1996/05/02 08:40:16 mwg -+ * Merged in Chromatic bug fixes. -+ * -+ * Revision 1.12 1996/05/02 02:26:21 mwg -+ * Added code to implement dozing functionality for v.34. -+ * -+ * Revision 1.11 1996/05/01 22:43:13 mwg -+ * Added new command: kDozeCmd; -+ * -+ * Revision 1.10 1996/05/01 19:20:16 liang -+ * Add command codes kInitiateRetrainCmd and kInitiateRateRenegotiationCmd. -+ * -+ * Revision 1.9 1996/04/25 01:12:37 mwg -+ * Added new flag: rapid preliminary EC training. -+ * -+ * Revision 1.8 1996/04/20 02:26:22 mwg -+ * Added preliminary far-end echo support -+ * -+ * Revision 1.7 1996/04/15 23:26:16 mwg -+ * Changed flag definitions for v34 modem. -+ * -+ * Revision 1.6 1996/04/04 02:35:50 liang -+ * Change kCid from 0x0080 to 0x0004 (0x0080 is defined as kV32). -+ * -+ * Revision 1.5 1996/03/08 23:07:01 mwg -+ * Added name for the struct. -+ * -+ * Revision 1.4 1996/03/02 00:59:27 liang -+ * Added typedef for V34CodingParameters structure. -+ * -+ * Revision 1.3 1996/02/27 02:28:31 mwg -+ * Fixed a bug in kLapmLongADPEnabled definition. -+ * -+ * Revision 1.2 1996/02/19 23:50:59 liang -+ * Removed compressionSetup parameter from the link layer command structure. -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.5 1996/01/15 23:26:04 liang -+ * Change the softmodem command structure name from SoftwareModemCommand -+ * to SoftwareModemCommandParameters. -+ * -+ *****************************************************************************/ -+#ifndef SoftModemPh -+#define SoftModemPh -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.1 General types */ -+/****************************************************************************/ -+ -+#ifndef SM_DECL -+#define SM_DECL -+#endif -+ -+#ifdef __VxWORKS__ -+#include <types/vxTypesOld.h> -+#endif -+ -+#ifdef DEBUG -+/* We have to define __wchar_t for Linux */ -+#if defined __linux__ && !defined _NO_WHCAR_DEF_ -+typedef long int __wchar_t; -+#endif -+#if !defined(__KERNEL__) && !defined(_CFE_) -+#include <stdio.h> -+#include <stdlib.h> -+#endif -+ -+#if defined(__linux__) || defined (__unix__) || defined (__unix) || (defined (__mips__) && !defined(_CFE_) && !defined(VXWORKS) && !defined(TARG_OS_RTEMS))/* enable if necessary, but not for dos-based builds */ -+#include <linux/types.h> -+#endif -+ -+ -+#endif /* DEBUG */ -+ -+#if defined(W95_DRIVER) -+#pragma code_seg("_LTEXT", "LCODE") -+#pragma data_seg("_LDATA", "LCODE") -+#pragma const_seg("_LDATA", "LCODE") -+#pragma bss_seg("_LDATA", "LCODE") -+#pragma pack(1) -+#endif /* W95_DRIVER */ -+ -+#ifndef SoftModemTypes -+#include "SoftModemTypes.h" -+#endif /* SoftModemTypes */ -+ -+ -+typedef struct -+ { -+ schar x, y; -+ } ComplexByte; -+ -+typedef struct -+ { -+ uchar numerator; -+ uchar denominator; -+ } Ratio; -+ -+#ifdef PEGASUS -+typedef union -+ { -+ struct -+ { -+ short x, y; -+ }; -+ -+ long foo; -+ } ComplexShort; -+#else -+typedef struct -+ { -+ short x, y; -+#ifdef GREENHILL -+ long a[0]; -+#endif -+ } ComplexShort; -+#endif -+ -+typedef struct -+ { -+ long x, y; -+ } ComplexLong; -+ -+typedef struct -+ { -+ ushort x0, x1, x2; -+ short x3; -+ } VeryLong; -+ -+typedef union -+ { -+ struct -+ { -+ uchar number; -+ uchar defaultValue; /* default value */ -+ uchar maxValue; /* max allowed value */ -+ uchar minValue; /* should be greater then maxValue to make reg readonly */ -+ } param; -+ long alignment; -+ } SRegisterDefinition; -+ -+#define MacroPaste2(a,b) a##b -+#define MacroPaste(a,b) MacroPaste2(a,b) -+#define ALWAYS_LONG_ALIGN() long MacroPaste(ALIGNMENT,__LINE__); -+ -+#ifdef USE_LONG_ALIGN -+#define LONG_ALIGN() ALWAYS_LONG_ALIGN() -+#else -+#define LONG_ALIGN() -+#endif -+ -+typedef ulong bitMap; -+ -+typedef int pace; -+#define kStop 0 -+#define kVerySlow 1 -+#define kSlow 2 -+#define kMedium 3 -+#define kFast 4 -+ -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.2 Modem specific types */ -+/****************************************************************************/ -+ -+typedef long directionType; -+#define kXmt 0 -+#define kRcv 1 -+#define kXmtRcv 2 -+ -+ -+#define originating kXmt -+#define answering kRcv -+#define kOrg kXmt -+#define kAns kRcv -+#define kOrgAns kXmtRcv -+ -+#define ORIGINATING originating -+#define ANSWERING answering -+ -+typedef int pcmCodingType; -+#define kMuLawPCM 0 -+#define kALawPCM 1 -+ -+#define kMuLawPCMScaleShift 2 -+#define kALawPCMScaleShift 3 -+ -+/* link layer and framer share defines */ -+typedef bitMap framerType; -+typedef bitMap linkLayerType; -+#define kNoFramer 0 -+#define kSync 0x00000001 -+#define kAsync 0x00000002 -+#define kHDLC 0x00000004 -+#define kLapm 0x00000008 -+#define kMnp 0x00000010 -+#define kV70 0x00000020 -+#define kSAM 0x00000040 -+ -+ -+typedef bitMap modulationMap; -+typedef bitMap symbolRateMap; -+typedef bitMap dataRateMap; -+typedef bitMap featureMap; -+typedef bitMap breakType; -+ -+typedef bitMap audioType; -+#define kRawAudio 0 -+#define kAudioG729A 1 -+#define kAudioG729 2 -+#define kAudioG723 3 -+ -+ -+#ifndef ADSL_MODEM -+typedef long modemStatusCode; -+#endif -+ /* Information status Codes: 1-31 */ -+#define kSetSampleRate 1 -+#define kModulationKnown 2 -+#define kRxSymbolRate 3 -+#define kTxSymbolRate 4 -+#define kRxCarrierFreq 5 -+#define kTxCarrierFreq 6 -+#define kTxPreemphasisFilter 7 -+#define kTxPowerAdjustment 8 -+#define kRemoteTxPreemphasisFilter 9 -+#define kRemoteTxPowerAdjustment 10 -+#define kRxRateKnown 11 -+#define kTxRateKnown 12 -+#define kRxDataModeActive 13 -+#define kTxDataModeActive 14 -+#define kTxSignalCompleted 15 -+#define kDTMFSignalDetected 16 -+#define kModemSignalDetected 17 -+#define kCallProgressSignalDetected 18 -+#define kCustomSignalDetected 19 -+#define kFaxPreambleDetected 20 -+#define kV24CircuitStatusChange 21 -+#define kHookStateChange 22 -+#define kCallWaitingToneDetected 23 -+#define kMultiToneSignalDetected 24 -+#define kPulseShuntStateChange 25 -+#define kRingFrequency 26 -+ -+ -+ /* Warning status Codes: 32-64 */ -+#define kError 32 -+#define kV34Exception 33 -+#define kClearDownLocal 34 -+#define kClearDownRemote 35 -+#define kCarrierPresent 36 -+#define kCarrierLost 37 -+#define kRetrainingLocal 38 -+#define kRetrainingRemote 39 -+#define kRateRenegotiationLocal 40 -+#define kRateRenegotiationRemote 41 -+#define kFallbackStarted 42 -+#define kFallForwardStarted 43 -+#define kCleardownStarted 44 -+#define kIllegalCommand 45 -+ -+ /* Auxiliary status Codes: 64-.. */ -+#define kTrainingProgress 64 -+#define kConnectionInfo 65 -+#define kDialerStatus 66 -+#define kFramingInfo 67 -+#define kBreakReceived 68 -+#define kLapmStatus 69 -+#define kLapmParameter 70 -+#define kV42bisStatus 71 -+#define kCallerIDStatus 72 -+#define kIOStatus 73 -+#define kCapabilitiesStatus 74 -+#define kSpeakerStatus 75 -+#define kATProfileChanged 76 -+#define kATDebugStatus 77 -+#define kResetHardware 78 -+#define kV8bisStatus 79 -+#define kMnpStatus 80 -+#define kMnpParameter 81 -+#define kV70Status 82 -+#define kV70Parameter 83 -+#define kFaxClass2Status 84 -+#define kAudioStatus 85 -+#define kAudioParameter 86 -+#define kOverlayStatus 87 -+#define kCallerIDCircuitStatus 88 -+#define kV80Status 89 -+#define kV80Parameter 90 -+#define kLocalCountryChanged 91 -+#define kDTERateChanged 92 -+#define kATResponse 93 -+#define kFramerConfigured 94 -+#define kA8RStatus 95 -+#define kA8TStatus 96 -+#define kVersionStatus 97 -+ -+ /* Testing status codes: 128-... */ -+ /* These statuses are generated by modem test suit */ -+#define kTestFinished 128 -+#define kConnectivityTestFinished 129 -+#define kTestCheckSum 130 -+#define kLogFileControl 131 -+#define kTestAtmVcFinished 132 -+#define kTestClearEocFinished 133 -+#define kTestG997Finished 134 -+ -+typedef long modemErrorCode; -+#define kNoError 0 -+#define kErrorTimerExpired 1 -+#define kErrorNoSReceived 2 -+#define kErrorNoSbarReceived 3 -+ -+ -+typedef long dialerStatusCode; -+#define kDialCompleted 0 -+#define kNoDialToneDetected 1 -+#define kBongToneDetected 2 -+#define kNoBongToneDetected 3 -+#define kErrorIllegalDialModifier 5 -+#define kDialStarted 6 -+#define kExternalPulseDialDigit 7 -+ -+ -+typedef long framingInfoCode; -+#define kRxFrameOK 0 -+#define kRxFrameTooLong 1 -+#define kRxFrameCRCError 2 -+#define kTxFrameUnderrun 3 -+#define kRxFrameOverrun 4 -+#define kRxFrameAborted 5 -+#define kRxFrameParityError 6 -+#define kRxFrameFormatError 7 -+#define kRxFrameHDLCFlagsDetected 8 -+ -+ -+typedef long IOStatusCode; -+#define kRxDataReady 0 -+#define kRxBufferOverflow 1 -+#define kTxSpaceAvailable 2 -+#define kTxBufferEmpty 3 -+ -+typedef long capabilitiesStatusCode; -+#define kSymbolRates 0 -+#define kDataRates 1 -+#define kFeatures 2 -+#define kDemodCapabilities 3 -+#define kRateThresholdAdjustment 4 -+#define kXmtLevel 5 -+#define kHybridDelay 6 -+#define kAuxFeatures 7 -+ -+ -+typedef long A8TStatusCode; -+#define kA8TFinished 0 -+ -+typedef long callerIDStatusCode; -+#define kCallerIDError 0 -+#define kCallerIDChannelSeizureReceived 1 -+#define kCallerIDMarkSignalReceived 2 -+#define kCallerIDTime 3 -+#define kCallerIDTelnum 4 -+#define kCallerIDName 5 -+#define kCallerIDEnd 6 -+#define kCallerIDUnknownMessage 7 -+#define kCallerIDWholeMessage 8 -+ -+ -+typedef long callerIDErrorCode; -+#define kCallerIDNoError 0 -+#define kCallerIDMarkSignalError 1 -+#define kCallerIDTooManyMarkBits 2 -+#define kCallerIDMessageTooLong 3 -+#define kCallerIDChecksumError 4 -+ -+ -+typedef long connectionInfoCode; -+#define kRTDelay 1 -+#define kRxSignalLevel 2 -+#define kTimingOffset 3 -+#define kFreqOffset 4 -+#define kPhaseJitter 5 -+#define kSNR 6 -+#define kNearEchoLevel 7 -+#define kSER 8 -+#define kNearEndDelay 9 -+#define kFarEchoLevel 10 -+#define kL1L2SNRDifference 11 -+#define kDCOffset 12 -+#define kTotalRxPower 13 -+#define kRemoteFreqOffset 14 -+/* obsolete #define kV8MenuDataWord1 15 */ -+/* obsolete #define kV8MenuDataWord2 16 */ -+#define kPCMP2AnalogDetSNR 17 -+#define kPCMP2DigitalDetSNR 18 -+#define kPCMP2RBSDetSNR 19 -+#define kEqCenterTapOffset 20 -+#define kPCMPadValue 21 -+#define kPCMRBSMap 22 -+#define kPCMCodingType 23 -+#define kPCMSpectralShapingBits 24 -+#define kLoopbackSelfTestResult 25 -+#define kEyeQuality 26 -+#define kLoopbackSelfTestNewErrs 27 -+#define kV34EqlLengthStatus 28 -+#define kV34EqlOffsetStatus 29 -+#define kV8CallMenuData 30 -+#define kV8JointMenuData 31 -+#define kPCMClientIeecLengthStatus 32 -+#define kPCMClientIeecOffsetStatus 33 -+#define kSeamlessRateChange 34 -+ -+typedef long trainingProgressCode; -+#define kPeriodicalSignalDetected 0 -+#define kPhaseReversalDetected 1 -+#define kSignalStartDetected 2 -+#define kSignalEndDetected 3 -+#define kSSignalDetected 4 -+#define kSbarSignalDetected 5 -+#define kJ4SignalDetected 6 -+#define kJ16SignalDetected 7 -+#define kJprimeSignalDetected 8 -+#define kMPSignalDetected 9 -+#define kMPprimeSignalDetected 10 -+#define kMPSignalSent 11 -+#define kMPprimeSignalSent 12 -+#define kRateSignalDetected 13 -+#define kESignalDetected 14 -+#define kRateSignalSent 15 -+ -+#define kAutomodingTryModulation 16 -+#define kAutomodingCompleted 17 -+#define kRCFaxBitMapStatus 18 -+ -+#define kV8CIDetected 19 -+#define kV8ANSToneDetected 20 -+#define kV8ANSamDetected 21 -+#define kV8CMDetected 22 -+#define kV8JMDetected 23 -+#define kV8CJDetected 24 -+#define kV8Finished 25 -+ -+#define kV34Phase2Started 26 -+#define kV34Phase2INFOSequenceDetected 27 -+#define kV34Phase2NearEndEchoDetected 28 -+#define kV34Phase2L1Receiving 29 -+#define kV34Phase2L2Receiving 30 -+#define kV34Phase2Finished 31 -+#define kV34Phase3Started 32 -+#define kV34Phase3Finished 33 -+#define kV34Phase4Started 34 -+#define kV34Phase4Finished 35 -+#define kV34DecoderParameters 36 -+#define kV34EncoderParameters 37 -+ -+#define kMaxLocalRxDataRate 38 -+#define kMaxLocalTxDataRate 39 -+#define kMaxRemoteRxDataRate 40 -+#define kMaxRemoteTxDataRate 41 -+#define kProjectedDataRate 42 -+#define kFEECDeactivated 43 -+#define kIEECDeactivated 44 -+#define kPFEECDeactivated 45 -+#define kPhaseJitterDeactivated 46 -+ -+#define kPCMP2DetectedDigitalConnection 47 -+#define kPCMP2DetectedRBS 48 -+#define kX2DetectedPhase1Escape 49 -+ -+#define kStarted1200BpsTraining 50 -+#define kStarted2400BpsTraining 51 -+#define kUnscrambledOneDetected 52 -+#define kScrambled1200BpsOneDetected 53 -+#define kScrambled2400BpsOneDetected 54 -+#define kV22BisS1Detected 55 -+#define kV22InitiateLoop2Test 56 -+#define kV22RespondLoop2Test 57 -+#define kV22Loop2TestAlt01Detected 58 -+ -+#define kDataModemLoop1TestStarted 59 -+#define kDataModemLoop1TestFinished 60 -+#define kDataModemLoop2TestStarted 61 -+#define kDataModemLoop2TestFinished 62 -+#define kDataModemLoop3TestStarted 63 -+#define kDataModemLoop3TestFinished 64 -+#define kDataModemSelfLoopTestEnabled 65 -+ -+#define kPCMPhase3Started 70 -+#define kPCMPhase3Finished 71 -+#define kPCMPhase4Started 72 -+#define kPCMPhase4Finished 73 -+ -+#define kV90JaSignalDetected 74 -+#define kV90JdSignalDetected 75 -+#define kV90JdPrimeSignalDetected 76 -+#define kV90RSignalDetected 77 -+#define kV90RBarSignalDetected 78 -+#define kV90CPSignalDetected 79 -+ -+#define kV90CPtSignalSent 80 -+#define kV90CPSignalSent 81 -+#define kV90CPprimeSignalSent 82 -+ -+ -+#define kV34SeamlessRateChangeRequestSent 83 -+#define kV34SeamlessRateChangeUpdateSent 84 -+#define kV34SeamlessRateChangeRequestReceived 85 -+#define kV34SeamlessRateChangeUpdateReceived 86 -+#define kV34SeamlessRateChangeUpdateTimeout 87 -+ -+#define kV90JaSignalAcknowledged 88 -+ -+#define kV34HCtrlChanPPhDetected 100 -+#define kV34HCtrlChanMPhDetected 101 -+#define kV34HCtrlChanRatesKnown 102 -+#define kV34HDXCtrlChanBinary1Detected 103 -+#define kV34HDXPhase3Started 104 -+#define kV34HDXPhase3Finished 105 -+#define kV34HDXPrimChanBinary1Detected 106 -+#define kFlexEventTRN2AFinished 107 -+ -+#define kV32RanginigStarted 108 -+#define kV32RangingStarted 108 -+#define kV32RanginigFinished 109 -+#define kV32RangingFinished 109 -+ -+ -+typedef long lapmStatusCode; -+#define kLapmDisconnected 0 /* LAPM disconnected */ -+#define kLapmConnected 1 /* LAPM is connected */ -+#define kLapmV42ODPDetected 2 /* LAPM ODP is detected */ -+#define kLapmV42ADPDetected 3 /* LAPM V.42 ADP is detected */ -+#define kLapmUnknownADPDetected 4 /* LAPM Unsupported ADP is detected */ -+#define kLapmTimeout 5 /* LAPM Timeout */ -+#define kLapmMNPFrameDetected 6 /* LAPM detected MNP frame */ -+#define kLapmDPDetectionTimedOut 7 /* LAPM Unsupported ADP is detected */ -+#define kLapmError 8 /* LAPM Error */ -+#define kLapmTestResult 9 /* LAPM loopback test result */ -+#define kLapmTxFrameStatus 10 -+#define kLapmRxFrameStatus 11 -+#define kLapmTxStatistics 12 -+#define kLapmRxStatistics 13 -+ -+typedef long lapmTakedownReason; -+#define kLapmRemoteDisconnect 0 -+#define kLapmLocalDisconnect 1 -+#define kLapmCannotConnect 2 -+#define kLapmProtocolError 3 -+#define kLapmCompressionError 4 -+#define kLapmInactivityTimer 5 -+#define kLapmRetryFailed 6 -+ -+ -+typedef long lapmParameterCode; -+#define kLapmXmtK 0 -+#define kLapmRcvK 1 -+#define kLapmXmtN401 2 -+#define kLapmRcvN401 3 -+#define kLapmTESTSupport 4 -+#define kLapmSREJSupport 5 -+#define kLapmCompDir 6 -+#define kLapmCompDictSize 7 -+#define kLapmCompStringSize 8 -+ -+ -+typedef long lapmErrorCode; -+#define kLapmNoError 0 -+#define kLapmBufferOverflow 1 -+#define kLapmFrameTooLong 2 -+#define kLapmBadFrame 3 -+#define kLapmUnknownEvent 4 -+/* 6 is reserved for kLapmRetryFailed defined above */ -+ -+ -+typedef long lapmTestResultCode; -+#define kLapmTestPassed 0 -+#define kLapmTestRequestIgnored 1 -+#define kLapmTestAlreadyInProgress 2 -+#define kLapmTestNotSupported 3 -+#define kLapmTestFailed 4 -+ -+ -+typedef long v42bisStatusCode; -+#define kV42bisEncoderTransparentMode 0 /* V.42bis encoder transparent mode active */ -+#define kV42bisEncoderCompressedMode 1 /* V.42bis encoder compressed mode active */ -+#define kV42bisDecoderTransparentMode 2 /* V.42bis decoder transparent mode active */ -+#define kV42bisDecoderCompressedMode 3 /* V.42bis decoder compressed mode active */ -+#define kV42bisError 4 /* V.42bis error */ -+#define kV42bisEncoderStatistics 5 -+#define kV42bisDecoderStatistics 6 -+ -+ -+typedef long v42bisErrorCode; -+#define kV42bisUndefinedEscSequence 0 /* V.42bis undefined escape sequence */ -+#define kV42bisCodewordSizeOverflow 1 /* V.42bis codeword size overflow */ -+#define kV42bisUndefinedCodeword 2 /* V.42bis undefined codeword */ -+ -+typedef long mnpStatusCode; -+#define kMnpDisconnected 0 /* Mnp disconnected */ -+#define kMnpConnected 1 /* Mnp is connected */ -+#define kMnpFallback 2 /* Mnp is falling back to buffer mode */ -+#define kMnpError 3 /* Mnp Error */ -+#define kMnpTimeout 4 /* Mnp Timeout */ -+#define kMnpInvalidLT 5 /* Invalid LT received */ -+#define kMnpRetransmitFrame 6 -+#define kMnpNack 7 -+#define kMnpTxFrameStatus 8 -+#define kMnpRxFrameStatus 9 -+#define kMnpTxStatistics 10 -+#define kMnpRxStatistics 11 -+ -+typedef long mnpTakedownReason; -+#define kMnpRemoteDisconnect 0 -+#define kMnpLocalDisconnect 1 -+#define kMnpCannotConnect 2 -+#define kMnpProtocolError 3 -+#define kMnpCompressionError 4 -+#define kMnpInactivityTimer 5 -+#define kMnpRetryFailed 6 -+ -+ -+typedef long mnpParameterCode; -+#define kMnpProtocolLevel 0 -+#define kMnpServiceClass 1 -+#define kMnpOptimizationSupport 2 -+#define kMnpCompressionSupport 3 -+#define kMnpN401 4 -+#define kMnpK 5 -+ -+ -+typedef long mnpErrorCode; -+#define kMnpNoError 0 -+#define kMnpBufferOverflow 1 -+#define kMnpFrameTooLong 2 -+#define kMnpBadFrame 3 -+#define kMnpUnknownEvent 4 -+ -+ -+typedef long v70StatusCode; -+#define kV70Disconnected 0 /* V70 disconnected */ -+#define kV70Connected 1 /* V70 is connected */ -+#define kV70Error 2 /* V70 Error */ -+#define kV70Timeout 3 /* V70 Timeout */ -+#define kV70ChannelDown 4 /* V70 channel released */ -+#define kV70ChannelUp 5 /* V70 channel established */ -+#define kV70AudioChannelDown 6 /* V70 audio channel released */ -+#define kV70AudioChannelUp 7 /* V70 audio channel established */ -+#define kV70DataChannelDown 8 /* V70 data channel released */ -+#define kV70DataChannelUp 9 /* V70 data channel established */ -+#define kV70OOBChannelDown 10 /* V70 out-of-band channel released */ -+#define kV70OOBChannelUp 11 /* V70 out-of-band channel established */ -+#define kV70TxFrameStatus 12 -+#define kV70RxFrameStatus 13 -+#define kV70TxStatistics 14 -+#define kV70RxStatistics 15 -+#define kV70StateTransition 16 -+ -+typedef long v70TakedownReason; -+#define kV70RemoteDisconnect 0 -+#define kV70LocalDisconnect 1 -+#define kV70CannotConnect 2 -+#define kV70ProtocolError 3 -+#define kV70CompressionError 4 -+#define kV70InactivityTimer 5 -+#define kV70RetryFailed 6 -+ -+ -+typedef long v70ParameterCode; -+#define kV70SuspendResume 0 -+#define kV70CrcLength 1 -+#define kV70NumberOfDLCs 2 -+#define kV70uIH 3 -+ -+#define kV70LapmXmtK 10 -+#define kV70LapmRcvK 11 -+#define kV70LapmXmtN401 12 -+#define kV70LapmRcvN401 13 -+#define kV70LapmTESTSupport 14 -+#define kV70LapmSREJSupport 15 -+#define kV70LapmCompDir 16 -+#define kV70LapmCompDictSize 17 -+#define kV70LapmCompStringSize 18 -+ -+#define kV70AudioHeader 20 /* if audio header is present in audio frames */ -+#define kV70BlockingFactor 21 /* audio blocking factor (default 1) */ -+#define kV70SilenceSuppression 22 /* audio silence suppression */ -+ -+ -+ -+typedef long v70ErrorCode; -+#define kV70NoError 0 -+#define kV70BadFrame 1 -+ -+typedef long audioStatusCode; -+#define kAudioFramesLost 0 /* One or more audio frames were lost */ -+#define kAudioTxBufferOverflow 1 -+#define kAudioRxBufferOverflow 2 -+#define kAudioRxBufferUnderflow 3 -+ -+ -+typedef long v80StatusCode; -+#define kV80Disconnected 0 /* V80 disconnected */ -+#define kV80Connected 1 /* V80 is connected */ -+#define kV80Error 2 /* V80 Error */ -+#define kV80InBandStatus 3 /* V80 in-band SAM status */ -+#define kV80TxFrameStatus 12 -+#define kV80RxFrameStatus 13 -+#define kV80TxStatistics 14 -+#define kV80RxStatistics 15 -+ -+typedef long v80TakedownReason; -+#define kV80RemoteDisconnect 0 -+#define kV80LocalDisconnect 1 -+ -+typedef long v80ErrorCode; -+#define kV80NoError 0 -+#define kV80BadFrame 1 -+ -+typedef long overlayStatusCode; -+#define kOverlayBegin 0 /* DSP has halted */ -+#define kOverlayEnd 1 /* DSP has received entire overlay */ -+#define kOverlayElapsedTime 2 /* time elapsed(as viewed by datapump) during overlay */ -+#define kOverlayRecordingData 3 /* ms of data that we are recording */ -+#define kOverlayReplayingData 4 /* ms of data that we have replayed so far */ -+#define kOverlayReplayDone 5 /* playback is done */ -+ -+/* types for kOverlayRecording/ReplayingData */ -+#define kOverlayTxData 0 -+#define kOverlayRxData 1 -+ -+/* -+ * Rockwell faxmodem compatible bitmap (kRCFaxBitMapStatus) -+ */ -+#define kRCFaxFCD 0x01 -+#define kRCFaxP2 0x02 -+#define kRCFaxPN 0x04 -+#define kRCFaxDCD 0x08 -+#define kRCFaxTX 0x10 -+#define kRCFaxCTS 0x20 -+ -+ -+#ifndef ADSL_MODEM -+typedef long modemCommandCode; -+#endif -+ /* Basic Action commands 00-63 */ -+#define kIdleCmd 0 -+#define kStartFaxModemCmd 1 -+#define kStartDataModemCmd 2 -+#define kStartCallProgressMonitorCmd 3 -+#define kSendTonesCmd 4 -+#define kStartCallerIDRcvCmd 5 -+#define kSetLinkLayerCmd 6 -+#define kSetFramerCmd 7 -+#define kTestLinkLayerCmd 8 -+#define kIdleRcvCmd 9 -+#define kIdleXmtCmd 10 -+#define kSetStatusHandlerCmd 11 -+#define kSetEyeHandlerCmd 12 -+#define kSetLogHandlerCmd 13 -+#define kSendBreakCmd 14 -+#define kSendTestCmd 15 -+#define kDisconnectLinkCmd 16 -+#define kSetXmtGainCmd 17 -+#define kStartADSICmd 18 -+#define kSetHybridDelayCmd 19 -+#define kCleardownCmd 20 -+#define kInitiateRetrainCmd 21 -+#define kInitiateRateRenegotiationCmd 22 -+#define kDialToneIndicator 23 -+#define kSetRxDataHandler 24 /* not used yet */ -+#define kSetTxDataHandler 25 /* not used yet */ -+#define kSetAuxRxDataHandler 26 -+#define kSetAuxTxDataHandler 27 -+#define kRingIndicatorCmd 28 -+#define kDTERateIndicatorCmd 29 -+#define kStartV8bisCmd 30 -+#define kSendMultiTonesCmd 31 -+#define kSetMultiToneParamsCmd 32 -+#define kSetModemSampleRateCmd 33 -+#define kStartDataModemPTTTestCmd 34 -+#define kStartDataModemLoopbackTestCmd 35 -+#define kRingFrequencyCmd 36 -+#define kSetCallWaitingDetectorStateCmd 37 -+#define kV34HDXTurnOffCurrentModeCmd 38 -+#define kSetAudioCmd 39 -+#define kLoopbackTestAutoRespEnableCmd 40 -+#define kSetCallProgressParamsCmd 41 -+#define kSetTrainingDelayReductionCmd 42 -+#define kSetFaxECMPageBufferPtrCmd 43 -+#define kSetLineCurrentStateCmd 44 -+#define kSetFramerParameterCmd 45 -+#define kStartDozeCmd 46 -+#define kEndDozeCmd 47 -+#define kStartRingFrequencyDetectorCmd 48 -+#define kSetBufferingDelayAdjustmentCmd 49 -+ -+ /* Composite action commands 64-127 */ -+#define kDialCmd 64 -+#define kSendCallingToneCmd 65 -+#define kV24CircuitChangeCmd 66 -+#define kStartATModeCmd 67 -+#define kStopATModeCmd 68 -+#define kSetATRegister 69 -+#define kSetATRegisterLimits 70 -+#define kSetATIResponse 71 -+#define kEnableATDebugMode 72 -+#define kSetWhiteListEntry 73 -+#define kSetBlackListEntry 74 -+ -+#define kV70Setup 75 /* additional V70 configuration */ -+#define kEstablishChannel 76 /* Establish new link layer channel (V70) */ -+#define kReleaseChannel 77 /* Release link layer channel (V70) */ -+#define kWaitChannelEstablished 78 /* Wait for establishment of the new link layer channel (V70) */ -+ -+/* unused 79 */ -+#define kMnpOOBFrameCmd 80 -+#define kV80InBandCmd 81 /* V80 In-band commands */ -+#define kSetV250IdString 82 -+#define kSetInternationalTablesCmd 83 -+#define kConfigureCountryCmd 84 -+#define kConigureCountryCmd 84 -+#define kV8ControlCmd 85 -+#define kV8bisSendMessage 86 -+#define kSetHWIdCmd 87 -+#define kSetCodecIdCmd 88 -+#define kOverCurrentDetected 89 -+ -+ -+ -+typedef long v8ControlType; -+#define kEnableDTEControl 1 -+#define kSetV8ControlTimeout 2 -+#define kSetCIValue 3 -+#define kSetCMValue 4 -+#define kSetJMValue 5 -+#define kSendCJ 6 -+#define kSetCallFunctionCategory 7 -+ -+typedef long v250IdStringCode; -+#define kGMIString 1 -+#define kGMMString 2 -+#define kGMRString 3 -+#define kGSNString 4 -+#define kGOIString 5 -+ -+typedef long kCallProgressParameterCode; -+#define kModemSignalPowerThreshold 1 -+#define kDialtonePowerThreshold 2 -+#define kRingBackPowerThreshold 3 -+#define kBusyPowerThreshold 4 -+#define kReorderPowerThreshold 5 -+#define k2ndDTnPowerThreshold 6 -+#define kMinDialtoneTime 7 -+#define kDialtoneFreqRange 8 -+#define kRingBackFreqRange 9 -+#define kBusyFreqRange 10 -+#define kReorderFreqRange 11 -+#define k2ndDTnFreqRange 12 -+ -+ -+typedef long framerParameterCode; -+#define kSetHDLCLeadingFlags 0 -+#define kHDLCResetFlagDetection 1 -+#define kSyncFramerSetup 2 -+#define kHDLCSendCRC 3 -+#define kHDLCSendFlags 4 -+#define kHDLCSendAborts 5 -+ -+ -+typedef long logDataCode; -+#define eyeData 0 -+#define mseData 1 -+#define rxData 2 -+#define txData 3 -+#define neecData 4 -+#define eqlData 5 -+#define ieecData 6 -+#define feecData 7 -+#define eqlPllData 8 -+#define feecPllData 9 -+#define timingData 10 -+#define pjPhaseErrData 11 -+#define pjEstimateData 12 -+#define pjEstDiffData 13 -+#define pjCoefData 14 -+#define inputSignalData 15 -+#define outputSignalData 16 -+#define agcGainData 17 -+#define automoderData 18 -+#define v8CMData 19 -+#define v8JMData 20 -+#define inputAfterNeecData 21 -+#define eqlErrData 22 -+#define dpskMicrobitsData 23 -+#define v34P2LSamplesData 24 -+#define phaseSplittedLData 25 -+#define fftedLData 26 -+#define channelSNRData 27 -+#define noiseEstimateData 28 -+#define signalEstimateData 29 -+#define v34INFOData 30 -+#define v34ChanProbData 31 -+#define v34P2OutputData 32 -+#define v8ANSamDetectData 33 -+#define pFeecData 34 -+#define channelDelayData 35 -+#define timingOffsetData 36 -+#define trellisMSEData 37 -+#define interpolatedSignalData 38 -+#define dcCancelledSignalData 39 -+#define echoCancelledSignalData 40 -+#define predictorErrData 41 -+#define commandInfoData 42 -+#define unusedInfoData 43 -+#define atCommandInfoData 44 -+#define atResponseInfoData 45 -+#define hwTerminalTxData 46 -+#define hwTerminalRxData 47 -+#define statusInfoData 48 -+#define channelResponseData 49 -+#define channelImpulseRespData 50 -+#define x2PcmP1DetectorInData 51 -+#define x2PcmP1DetectorOutData 52 -+#define eqlRealData 53 -+#define ieecRealData 54 -+#define neecOutputData 55 -+#define precodedEqlOutputData 56 -+#define eqlRealErrData 57 -+#define idealEqlOutputData 58 -+#define agcData 59 -+#define pcmInfidelityData 60 -+#define v42bisCycleCount 61 -+#define pcmImdOffsetCoefData 62 -+#define pcmImdOffsetData 63 -+#define v90RcvdDilLongData 64 -+#define v90RcvdDilShortData 65 -+#define v90DilProducedData 66 -+#define pcmEncoderKbitsData 67 -+#define pcmEncoderMbitsData 68 -+#define pcmEncoderSbitsData 69 -+#define pcmDecoderKbitsData 70 -+#define pcmDecoderMbitsData 71 -+#define pcmDecoderSbitsData 72 -+#define v90CPorCPtData 73 -+#define mnpDecoderInputData 74 -+#define mnpDecoderOutputData 75 -+#define v42bisEncoderInputData 76 -+#define v42bisDecoderInputData 77 -+#define modulatorInputData 78 -+#define modulatorOutputData 79 -+#define encodedStatusData 80 -+#define blockFramerTxData 81 -+#define blockFramerRxData 82 -+#define framerTxData 83 -+#define framerRxData 84 -+#define dpskBasebandData 85 -+#define dpskBasebandLPFedData 86 -+#define dpskRealData 87 -+#define bandEdgeCorrectedSignalData 88 -+#define atmLogData 89 -+#define clearEocLogData 90 -+#define g997LogData 91 -+ -+ -+#define kLogDataDelimiter 0xFEFEFEFE -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.3 Handlers */ -+/****************************************************************************/ -+ -+typedef void (SM_DECL *rcvHandlerType) (void *gDslVars, int, short*); -+typedef void (SM_DECL *xmtHandlerType) (void *gDslVars, int, short*); -+typedef int (SM_DECL *xmtHandlerWithRtnValType) (void *gDslVars, int, short*); -+typedef void (SM_DECL *timerHandlerType) (void *gDslVars, long); -+typedef int (SM_DECL *interpolatorHandlerType) (void *gDslVars, int, short*, short*); -+typedef void (SM_DECL *controlHandlerType) (void *gDslVars, int); -+ -+typedef int (SM_DECL *txDataHandlerType) (void *gDslVars, int, uchar*); -+typedef int (SM_DECL *rxDataHandlerType) (void *gDslVars, int, uchar*); -+ -+typedef bitMap (SM_DECL *signalDetectorType) (void *gDslVars, int, long, long*); -+ -+ -+typedef void (SM_DECL *hookHandlerType) (void *gDslVars, Boolean); -+ -+typedef short* (SM_DECL *sampBuffPtrType) (void *gDslVars, int); -+ -+typedef void (SM_DECL *eyeHandlerType) (void *gDslVars, int, ComplexShort*); -+typedef void (SM_DECL *logHandlerType) (void *gDslVars, logDataCode, ...); -+ -+typedef void (SM_DECL *voidFuncType) (void *gDslVars); -+ -+typedef int (SM_DECL *txAudioHandlerType) (void *gDslVars, int, short*); -+typedef int (SM_DECL *rxAudioHandlerType) (void *gDslVars, int, short*); -+ -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.4 Structures */ -+/****************************************************************************/ -+ -+/* -+ * AT command processor definitions -+ */ -+#define kATRegistersNumber 56 -+#define kFirstConfigurationRegister 500 -+#define kLastConfigurationRegister 515 -+#define kFirstInternationalRegister 516 -+#define kLastInternationalRegister 595 -+ -+ -+ -+#define kATMaxDialStringSize 128 -+typedef struct -+ { -+ struct -+ { -+ uchar loadNumber; /* Which profile to load upon powerup/reset */ -+ uchar countryCode; /* T.35 Country Code */ -+ uchar profile[2][kATRegistersNumber]; -+ uchar dialString[4][kATMaxDialStringSize + 1]; -+ } config; -+ ulong versionCode; -+ ulong crcCheckSum; -+ } NVRAMConfiguration; -+ -+/* Structure to hold international settings */ -+typedef struct -+ { -+ char *name; -+ int countryCode; -+ const SRegisterDefinition *userRegisters; -+ const ulong *configRegisters; -+ } CountryDescriptor; -+ -+/* -+ * V.34 coding parameters structure -+ */ -+ -+typedef struct -+ { -+ /* DO NOT CHANGE THE ORDER OF FIELDS IN THIS STRUCTURE! -+ * (Some assembly code depends on it!) If you -+ * must add fields, please do so at the bottom. -+ */ -+ -+ int symbolRateIndex, -+ dataRateIndex, -+ userSNRAdjustment; -+ Boolean auxChannel, -+ expConstellation, -+ precoding, -+ nonlinearCoding; -+ schar J, /* number of data frames in superframe */ -+ P, /* number of mapping frames in a data frame */ -+ r, /* number of high mapping frames in a data frame */ -+ b, /* number of data bits in a mapping frame */ -+ W, /* number of aux bits in a data frame */ -+ K, /* number of S bits in a mapping frame */ -+ q, /* number of Q bits in a 2D symbol */ -+ M; /* number of rings in shell mapping */ -+ long nominalVariance; /* the signal variance which gives 1e-2 BLER Q10 */ -+ int bitsPerDataFrame; -+ short quantRoundOff, -+ quantMask; -+ uchar nTrellisStates, -+ log2NTrellisStates; -+ short gain1xmt, -+ gain2xmt, -+ gain1rcv, -+ gain2rcv; -+ ushort bitInversionPattern; -+ } V34CodingParams; -+ -+typedef long v8bisStatusCode; -+typedef bitMap v8bisConnectionSetup; -+#if defined(V8BIS) || defined(AT_COMMANDS_V8BIS) -+#include "V8bisMainTypes.h" -+#endif -+ -+#define kMaxMultiTones 4 /* MultiTone: search for up to this many tones at once */ -+ -+#ifndef ADSL_MODEM -+typedef struct -+ { -+ modemStatusCode code; -+ union -+ { -+ long value; -+ long freq; -+ modemErrorCode error; -+ modulationMap modulation; -+ modulationMap modemSignal; -+ dataRateMap dataRate; -+ long dtmfSignal; -+ bitMap callProgressSignal; -+ bitMap customSignal; -+ void *ptr; -+ struct -+ { -+ long detected; -+ long numTones; -+ long tones[kMaxMultiTones]; -+ } multiToneInfo; -+ struct -+ { -+ v8bisStatusCode code; -+ long value; -+ } v8bisStatus; -+ struct -+ { -+ trainingProgressCode code; -+ long value; -+ } trainingInfo; -+ struct -+ { -+ long code; -+ long value; -+ } v24Circuit; -+ struct -+ { -+ trainingProgressCode code; -+ void* ptr; -+ } advancedTrainingInfo; -+ struct -+ { -+ capabilitiesStatusCode code; -+ long value; -+ } capabilitiesStatusInfo; -+ struct -+ { -+ connectionInfoCode code; -+ long value; -+ } connectionInfo; -+ struct -+ { -+ connectionInfoCode code; -+ int length; -+ uchar *ptr; -+ } advancedConnectionInfo; -+ struct -+ { -+ dialerStatusCode code; -+ long value; -+ long makeTime; -+ long breakTime; -+ } dialerStatus; -+ struct -+ { -+ long enabled; -+ long volume; -+ } speakerStatus; -+ framingInfoCode framingInfo; -+ IOStatusCode ioStatus; -+ struct -+ { -+ lapmStatusCode code; -+ union -+ { -+ long value; -+ lapmTakedownReason reason; -+ lapmErrorCode error; -+ lapmTestResultCode testResult; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ } param; -+ } lapmStatus; -+ struct -+ { -+ lapmParameterCode code; -+ long value; -+ } lapmParameter; -+ struct -+ { -+ v42bisStatusCode code; -+ union -+ { -+ long value; -+ v42bisErrorCode error; -+ struct -+ { -+ long nBytesIn; -+ long nBytesOut; -+ } statistic; -+ } param; -+ } v42bisStatus; -+ struct -+ { -+ mnpStatusCode code; -+ union -+ { -+ long value; -+ mnpTakedownReason reason; -+ mnpErrorCode error; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ ulong nSize; -+ uchar *Buffer; -+ } fallback; -+ struct -+ { -+ char *header; -+ void *frame; -+ } frame; -+ struct -+ { -+ long nack; -+ long rFrameNo; -+ } timeout; -+ struct -+ { -+ long frameNo; -+ long framesPending; -+ } retrFrame; -+ } param; -+ } mnpStatus; -+ struct -+ { -+ mnpParameterCode code; -+ long value; -+ } mnpParameter; -+ struct -+ { -+ v70StatusCode code; -+ union -+ { -+ long value; -+ v70TakedownReason reason; -+ v70ErrorCode error; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long nack; -+ long rFrameNo; -+ } timeout; -+ struct -+ { -+ long frameNo; -+ long framesPending; -+ } retrFrame; -+ struct -+ { -+ long ChannelId; -+ long DLCI; -+ ulong LcNum; -+ v70TakedownReason reason; -+ } channelInfo; -+ struct -+ { -+ long ChannelId; -+ long stateOld; -+ long stateNew; -+ } stateInfo; -+ } param; -+ ulong v70Time; -+ } v70Status; -+ struct -+ { -+ audioStatusCode code; -+ union -+ { -+ long value; -+ struct -+ { -+ long nReq; -+ long nAvail; -+ } buffer; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ } param; -+ } audioStatus; -+ struct -+ { -+ v80StatusCode code; -+ union -+ { -+ long value; -+ v80TakedownReason reason; -+ v80ErrorCode error; -+ struct -+ { -+ long nFrames; -+ long nFrameErrors; -+ } statistic; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frame; -+ struct -+ { -+ long code; -+ long value; -+ } inBand; -+ } param; -+ ulong v80Time; -+ } v80Status; -+ struct -+ { -+ v70ParameterCode code; -+ long value; -+ } v70Parameter; -+ struct -+ { -+ breakType type; -+ long length; -+ } breakStatus; -+ struct -+ { -+ callerIDStatusCode code; -+ union -+ { -+ long value; -+ struct -+ { -+ callerIDErrorCode code; -+ long value; -+ } callerIDError; -+ struct -+ { -+ long length; -+ char* ptr; -+ } message; -+ } param; -+ } callerIDStatus; -+ struct -+ { -+ ulong signal; -+ uchar *msg1; -+ long msg1Length; -+ uchar *msg2; -+ long msg2Length; -+ } A8RStatus; -+ struct -+ { -+ overlayStatusCode code; -+ long value; -+ long value2; -+ } overlayStatus; -+ struct -+ { -+ ulong nBits; -+ ulong nBlocks; -+ ulong nBitErrors; -+ ulong nBlockErrors; -+ -+ ulong nAudioBits; -+ ulong nAudioBlocks; -+ ulong nAudioSyncErrors; -+ ulong nAudioBlockErrors; -+ } testResults; -+ ulong checksum; -+ struct -+ { -+ ulong sizeM; -+ uchar *filename; -+ } logFileControlStatus; -+ struct -+ { -+ long direction; -+ long module; -+ long message; -+ long data; -+ } -+ faxClass2Status; -+ -+ } param; -+ } modemStatusStruct; -+ -+typedef void (SM_DECL *statusHandlerType) (void *gDslVars, modemStatusStruct*); -+#endif /* ADSL_MODEM */ -+ -+/****************************************************************************/ -+/* 1. Type definitions. */ -+/* */ -+/* 1.5 Command structure */ -+/****************************************************************************/ -+ -+typedef struct -+ { -+ Boolean remoteModemIsFlex; -+ uchar countryCode; -+ ushort manufacturerId; -+ uchar licenseeId; -+ uchar productCapabilities; -+ Boolean digitalModeFlag; -+ Boolean prototypeFlag; -+ uchar version; -+ } -+FlexV8bisStruct; -+ -+typedef struct -+ { -+ symbolRateMap symbolRates; -+ dataRateMap dataRates; -+ dataRateMap dataRates56k; -+ dataRateMap dataRatesFlex; -+ featureMap features; -+ bitMap auxFeatures; -+ bitMap demodCapabilities; -+ long rateThresholdAdjustment; /* dB Q4 */ -+ FlexV8bisStruct flexRemoteV8bisInfo; -+ } dataPumpCapabilities; -+ -+#ifndef ADSL_MODEM -+typedef struct SoftwareModemCommandParameters -+ { -+ modemCommandCode command; -+ union -+ { -+ long xmtGain; -+ ulong hybridDelayQ4ms; -+ long modemSampleRate; -+ long timeInMs; -+ long state; -+ long freq; -+ NVRAMConfiguration *nvramConfigurationPtr; -+ long enabled; -+ long value; -+ uchar *phoneNumber; -+ uchar *faxECMPageBufferPtr; -+ CountryDescriptor *countryDescriptorTable; -+ struct -+ { -+ dataRateMap dteRate; -+ bitMap format; -+ } dteRateSpec; -+ struct -+ { -+ v8ControlType code; -+ long value; -+ uchar *buffer; -+ } v8ControlSpec; -+ struct -+ { -+ directionType direction; -+ v8bisConnectionSetup setup; -+ void *capPtr; -+ voidFuncType confirmMsFunc; -+ voidFuncType genMsFunc; -+ xmtHandlerWithRtnValType ogmFunc; -+ } v8bisSpec; -+ struct -+ { -+ directionType direction; -+ } ADSISpec; -+ struct -+ { -+ directionType direction; -+ modulationMap modulations; -+ dataPumpCapabilities capabilities; -+ } modeSpec; -+ struct -+ { -+ long time, -+ freq1, -+ freq2, -+ freq3, -+ freq4, -+ mag1, -+ mag2, -+ mag3, -+ mag4; -+ } toneSpec; -+ struct -+ { -+ long signal; -+ uchar *msg1; -+ long msg1Length; -+ uchar *msg2; -+ long msg2Length; -+ long sig_en; -+ long msg_en; -+ long supp_delay; -+ } -+ v8bisMessageSpec; -+ struct -+ { -+ linkLayerType type; -+ bitMap setup; -+ dataRateMap rxDataRate; -+ dataRateMap txDataRate; -+ long rtDelayQ4ms; -+ rxDataHandlerType rxDataHandlerPtr; -+ txDataHandlerType txDataHandlerPtr; -+ } linkLayerSpec; -+ struct -+ { -+ framerType type; -+ bitMap setup; -+ directionType direction; -+ long fill[2]; /* need to match linkLayerSpec */ -+ rxDataHandlerType rxDataHandlerPtr; -+ txDataHandlerType txDataHandlerPtr; -+ } framerSpec; -+ struct -+ { -+ framerParameterCode code; -+ long value; -+ } framerParameterSpec; -+ struct -+ { -+ bitMap callProgressDetectorSetup; -+ signalDetectorType callProgressDetectorPtr; /* if nil, use defaults */ -+ signalDetectorType customDetectorPtr; /* if nil, no custom detector */ -+ } callProgressMonitorSpec; -+ struct -+ { -+ ulong maxTones; /* maximum number of simultaneous tones to detect */ -+ ulong allowableVariance; /* maximum cumulative variance in the eight interpolated frequencies */ -+ ulong totalPowerThreshold; /* ignore complete block if power less than this */ -+ ulong powerShiftThreshold; /* ignore a bin if its power is less than (totalPowerValue >> powerShiftThreshold) */ -+ ulong toneMatchThresholdHz; /* tones within +/- this many Hz of original tone are considered the same tone */ -+ ulong binSeparation; /* ignore tones with a spacing of less than this */ -+ ulong outsideFreqDeviation; /* an individual value in the interpolated array can be up to this many Hz outside of the expected angle range */ -+ } multiToneSpec; -+ struct -+ { -+ uchar *dialString; /* nil limited string for DTMF dialing sequence */ -+ long pulseBreakTime, -+ pulseMakeTime, -+ pulseInterDigitTime, -+ toneDigitTime, -+ toneInterDigitTime, -+ toneLoGroupMag, -+ toneHiGroupMag, -+ flashTime, -+ pauseTime, -+ signalWaitTimeout, -+ blindDialingTimeout; -+ bitMap dialerSetup; -+ bitMap callProgressDetectorSetup; -+ signalDetectorType callProgressDetectorPtr; /* if nil, use defaults */ -+ signalDetectorType customDetectorPtr; /* if nil, no custom detector */ -+ hookHandlerType hookHandlerPtr; /* nil if DTMF dialing specified*/ -+ } dialSpec; -+ struct -+ { -+ long timeOn, -+ timeOff, -+ freq; -+ } callingToneSpec; -+ union -+ { -+ statusHandlerType statusHandlerPtr; -+ eyeHandlerType eyeHandlerPtr; -+ logHandlerType logHandlerPtr; -+ rxDataHandlerType rxDataHandlerPtr; -+ txDataHandlerType txDataHandlerPtr; -+ } handlerSpec; -+ struct -+ { -+ breakType type; -+ long length; -+ } breakSpec; -+ struct -+ { -+ long length; -+ uchar *dataPtr; -+ } lapmTestSpec; -+ struct -+ { -+ bitMap setupLapm; -+ rxDataHandlerType rxAudioHandlerPtr; -+ txDataHandlerType txAudioHandlerPtr; -+ } v70SetupSpec; -+ struct -+ { -+ ulong ChannelId; -+ ulong LogChannelNum; -+ ulong PortNum; -+ } EstChannelSpec; -+ struct -+ { -+ ulong ChannelId; -+ } WaitChannelSpec; -+ struct -+ { -+ ulong ChannelId; -+ ulong LogChannelNum; -+ ulong PortNum; -+ ulong DLCI; -+ } RelChannelSpec; -+ struct -+ { -+ audioType type; -+ bitMap setup; -+ dataRateMap rxAudioRate; -+ dataRateMap txAudioRate; -+ rxAudioHandlerType rxAudioHandlerPtr; -+ txAudioHandlerType txAudioHandlerPtr; -+ } audioSpec; -+ struct -+ { -+ long code; -+ long value; -+ } v24Circuit; -+ struct -+ { -+ ulong code; -+ ulong value; -+ ulong minValue; -+ ulong maxValue; -+ } atRegister; -+ struct -+ { -+ long code; -+ uchar *response; -+ } atiSpec; -+ struct -+ { -+ long length; -+ uchar *framePtr; -+ } frameSpec; -+ struct -+ { -+ long code; -+ union -+ { -+ long value; -+ struct -+ { -+ long loFreq1; -+ long hiFreq1; -+ long loFreq2; -+ long hiFreq2; -+ } freqRange; -+ } params; -+ } callProgressParamSpec; -+ struct -+ { -+ v250IdStringCode v250IdCode; -+ uchar *v250IdString; -+ } v250IdSpec; -+ -+ } param; -+ } modemCommandStruct; -+ -+typedef Boolean (*commandHandlerType) (modemCommandStruct*); -+#endif /* ADSL_MODEM */ -+ -+ -+ -+/****************************************************************************/ -+/* 2. Constant definitions. */ -+/* */ -+/* 2.1 Definitive constants */ -+/****************************************************************************/ -+ -+#define kMaxSampleBlockSize 48 -+#define kMaxDataBlockSize 48 -+ -+#define kMaxDialStringLength 127 -+#define kCallProgressSampleRate 7200 -+ -+#define kMaxCallerIDMessageLength 80 -+ -+/****************************************************************************/ -+/* 2. Constant definitions. */ -+/* */ -+/* 2.2 Bit maps */ -+/****************************************************************************/ -+ -+/* modulationMap */ -+ -+#define kIdle 0x00000000 -+#define kV25 0x00000001 -+#define kV8 0x00000002 -+#define kCid 0x00000004 -+#define kV8bis 0x00000008 -+#define kV21 0x00000010 -+#define kV22 0x00000020 -+#define kV23 0x00000040 -+#define kV32 0x00000080 -+#define kV34 0x00000100 -+#define kX2 0x00000200 -+#define kV90 0x00000400 -+#define k56Flex 0x00000800 -+#define kV27 0x00001000 -+#define kV29 0x00002000 -+#define kV17 0x00004000 -+#define kV34HDX 0x00008000 -+#define kV34HDXC 0x00010000 -+#define kBell103 0x00100000 -+#define kBell212 0x00200000 -+#define kDataCallingTone 0x01000000 -+#define kFaxCallingTone 0x02000000 -+ -+#define kV22FastNZConnect 0x04000000 -+#define kV22FastNNZConnect 0x08000000 -+#define kV22FastConnect (kV22FastNZConnect|kV22FastNNZConnect) -+#define kV22bisFastConnect 0x10000000 -+ -+ -+#define kDataModulations (kV25 | kV8 | kV21 | kV22FastConnect | kV22bisFastConnect | kV22 | kV23 | kV32 | kV34 | kBell103 | kBell212) -+#define kDataOnlyModulations (kV21 | kV22 | kV23 | kV32 | kBell103 | kBell212) -+#define kPCMModulations (kV90 | kX2 | k56Flex) -+ -+#define kFaxModulations (kV25 | kV21 | kV27 | kV29 | kV17) -+#define kFaxOnlyModulations (kV27 | kV29 | kV17) -+#define kFaxModulationShift 12 -+ -+/* symbolRateMap */ -+ -+#define k1200Hz 0x00000001 -+#define k1600Hz 0x00000002 -+#define k2400Hz 0x00000004 -+#define k2743Hz 0x00000008 -+#define k2800Hz 0x00000010 -+#define k3000Hz 0x00000020 -+#define k3200Hz 0x00000040 -+#define k3429Hz 0x00000080 -+#define k8000Hz 0x00000100 -+ -+#define kAllSymbolRates ( k1200Hz | k1600Hz | k2400Hz | k2743Hz | \ -+ k2800Hz | k3000Hz | k3429Hz | k8000Hz ) -+ -+/* dataRateMap */ -+ -+#define k75bps 0x00000002 -+#define k300bps 0x00000004 -+#define k600bps 0x00000008 -+#define k1200bps 0x00000010 -+#define k2400bps 0x00000020 -+#define k4800bps 0x00000040 -+#define k7200bps 0x00000080 -+#define k9600bps 0x00000100 -+#define k12000bps 0x00000200 -+#define k14400bps 0x00000400 -+#define k16800bps 0x00000800 -+#define k19200bps 0x00001000 -+#define k21600bps 0x00002000 -+#define k24000bps 0x00004000 -+#define k26400bps 0x00008000 -+#define k28800bps 0x00010000 -+#define k31200bps 0x00020000 -+#define k33600bps 0x00040000 -+#define k36000bps 0x00080000 -+#define k38400bps 0x00100000 -+#define k57600bps 0x00200000 -+#define k115200bps 0x00400000 -+#define k230400bps 0x00800000 -+#define k460800bps 0x01000000 -+#define k921600bps 0x02000000 -+/* -+ * kPCMRate is used to identify that the reported rate is -+ * PCM modulation rate, and is only used for PCM modulation while -+ * reporting rate !!!! -+ */ -+#define kPCMRate 0x40000000 -+#define kPCMFlexRate 0x80000000 -+#define kAllDataRates 0x0FFFFFFF -+ -+/* rates specific for X2 and V.90 */ -+#define kPCM25333bps 0x00000001 -+#define kPCM26666bps 0x00000002 -+#define kPCM28000bps 0x00000004 -+#define kPCM29333bps 0x00000008 -+#define kPCM30666bps 0x00000010 -+#define kPCM32000bps 0x00000020 -+#define kPCM33333bps 0x00000040 -+#define kPCM34666bps 0x00000080 -+#define kPCM36000bps 0x00000100 -+#define kPCM37333bps 0x00000200 -+#define kPCM38666bps 0x00000400 -+#define kPCM40000bps 0x00000800 -+#define kPCM41333bps 0x00001000 -+#define kPCM42666bps 0x00002000 -+#define kPCM44000bps 0x00004000 -+#define kPCM45333bps 0x00008000 -+#define kPCM46666bps 0x00010000 -+#define kPCM48000bps 0x00020000 -+#define kPCM49333bps 0x00040000 -+#define kPCM50666bps 0x00080000 -+#define kPCM52000bps 0x00100000 -+#define kPCM53333bps 0x00200000 -+#define kPCM54666bps 0x00400000 -+#define kPCM56000bps 0x00800000 -+#define kPCM57333bps 0x01000000 -+ -+#define kV90ServerToClientDataRates \ -+ ( kPCM28000bps | kPCM29333bps | kPCM30666bps | \ -+ kPCM32000bps | kPCM33333bps | kPCM34666bps | \ -+ kPCM36000bps | kPCM37333bps | kPCM38666bps | \ -+ kPCM40000bps | kPCM41333bps | kPCM42666bps | \ -+ kPCM44000bps | kPCM45333bps | kPCM46666bps | \ -+ kPCM48000bps | kPCM49333bps | kPCM50666bps | \ -+ kPCM52000bps | kPCM53333bps | kPCM54666bps | \ -+ kPCM56000bps | kPCM57333bps ) -+ -+#define kV90ClientToServerDataRates \ -+ ( k4800bps | k7200bps | k9600bps | k12000bps | \ -+ k14400bps | k16800bps | k19200bps | k21600bps | \ -+ k24000bps | k26400bps | k28800bps | k31200bps | \ -+ k33600bps ) -+ -+ -+ -+#define kX2ServerToClientDataRates \ -+ ( kPCM25333bps | kPCM26666bps | kPCM28000bps | \ -+ kPCM29333bps | kPCM30666bps | kPCM32000bps | \ -+ kPCM33333bps | \ -+ kPCM34666bps | kPCM36000bps | kPCM37333bps | \ -+ kPCM38666bps | kPCM40000bps | kPCM41333bps | \ -+ kPCM42666bps | kPCM44000bps | kPCM45333bps | \ -+ kPCM46666bps | kPCM48000bps | kPCM49333bps | \ -+ kPCM50666bps | kPCM52000bps | kPCM53333bps | \ -+ kPCM54666bps | kPCM56000bps | kPCM57333bps ) -+#define kX2ClientToServerDataRates \ -+ ( k4800bps | k7200bps | k9600bps | k12000bps | k14400bps | \ -+ k16800bps | k19200bps | k21600bps | k24000bps | k26400bps | k28800bps | \ -+ k31200bps ) -+ -+ /* -+ Rates specific for Flex -+ */ -+#define kPCMFlex32000bps 0x00000001 -+#define kPCMFlex34000bps 0x00000002 -+#define kPCMFlex36000bps 0x00000004 -+#define kPCMFlex38000bps 0x00000008 -+#define kPCMFlex40000bps 0x00000010 -+#define kPCMFlex42000bps 0x00000020 -+#define kPCMFlex44000bps 0x00000040 -+#define kPCMFlex46000bps 0x00000080 -+#define kPCMFlex48000bps 0x00000100 -+#define kPCMFlex50000bps 0x00000200 -+#define kPCMFlex52000bps 0x00000400 -+#define kPCMFlex54000bps 0x00000800 -+#define kPCMFlex56000bps 0x00001000 -+#define kPCMFlex58000bps 0x00002000 -+#define kPCMFlex60000bps 0x00004000 -+ -+#define kFlexServerToClientDataRates \ -+ ( kPCMFlex32000bps | kPCMFlex34000bps | kPCMFlex36000bps | kPCMFlex38000bps | \ -+ kPCMFlex40000bps | kPCMFlex42000bps | kPCMFlex44000bps | kPCMFlex46000bps | \ -+ kPCMFlex48000bps | kPCMFlex50000bps | kPCMFlex52000bps | kPCMFlex52000bps | \ -+ kPCMFlex54000bps | kPCMFlex56000bps | kPCMFlex58000bps | kPCMFlex60000bps ) -+ -+#define kFlexClientToServerDataRates \ -+ ( k4800bps | k7200bps | k9600bps | k12000bps | \ -+ k14400bps | k16800bps | k19200bps | k21600bps | \ -+ k24000bps | k26400bps | k28800bps | k31200bps ) -+ -+ -+#define k2400BitShift 5 -+#define k4800BitShift 6 -+ -+#define kPCM28000bpsShift 2 -+ -+#define kV21Rates k300bps -+#define kV22Rates k1200bps -+#define kV22bisRates (k1200bps | k2400bps) -+#define kV23Rates (k75bps | k1200bps) -+#define kCidRates (k1200bps) -+#define kV32Rates (k4800bps | k9600bps) -+#define kV32bisRates (kV32Rates | k7200bps | k12000bps | k14400bps) -+#define kV32terboRates (kV32bisRates | k16800bps | k19200bps) -+#define kV34Rates ( k2400bps | k4800bps | k7200bps | k9600bps | k12000bps | k14400bps | \ -+ k16800bps | k19200bps | k21600bps | k24000bps | k26400bps | k28800bps | \ -+ k31200bps | k33600bps ) -+ -+#define kV27Rates (k2400bps | k4800bps) -+#define kV29Rates (k4800bps | k7200bps | k9600bps) -+#define kBell103Rates k300bps -+#define kBell212Rates k1200bps -+ -+ -+/* Demodulator capabilities */ -+#define kNeecEnabled 0x00000001 -+#define kPFeecEnabled 0x00000002 -+#define kIeecEnabled 0x00000004 -+#define kFeecEnabled 0x00000008 -+ -+#define kRapidEqualizerTraining 0x00000010 -+#define kRapidPECTraining 0x00000020 -+#define kRapidECTraining 0x00000040 -+#define kAutoLoadReductionEnabled 0x00000080 -+ -+#define kTimingTrackingEnabled 0x00000100 -+#define kPhaseLockedLoopEnabled 0x00000200 -+#define kFeecPhaseLockedLoopEnabled 0x00000400 -+#define kPhaseJitterTrackingEnabled 0x00000800 -+ -+#define kClockErrorTrackingEnabled 0x00001000 -+#define kFreqOffsetTrackingEnabled 0x00002000 -+#define kFeecFreqOffsetTrackingEnabled 0x00004000 -+ -+#define kShorterNeecEnabled 0x00008000 -+#define kShorterPFeecEnabled 0x00010000 -+#define kFrondEndHPFilterEnabled 0x00020000 -+#define kGainControlEnabled 0x00040000 -+#define kPhaseHitControlEnabled 0x00080000 -+#define kBandEdgeCorrectorEnabled 0x00100000 -+#define kDisableFaxFastClearDown 0x00200000 -+ -+#define kImdOffsetCompensationEnabled 0x00400000 -+ -+#define kV34ShortEqlLengthExtShift 23 -+#define kV34ShortEqlLengthExtMask (0x3<<kV34ShortEqlLengthExtShift) -+#define kV34EqlLengthReductionEnabled (1<<(kV34ShortEqlLengthExtShift+2)) -+#define kPCMIeecLengthReductionEnabled (1<<(kV34ShortEqlLengthExtShift+3)) -+ -+/* featureMap */ -+ -+#define kAllFeatures 0xFFFFFFFF -+ -+#define kAutomodingEnabled 0x00000001 /* bit 1 */ -+#define kAutomodingDisabled 0x00000000 /* bit 1 */ -+ -+#define kV8SendCIEnabled 0x00000002 /* bit 2 */ -+#define kV8SendCIDisabled 0x00000000 /* bit 2 */ -+ -+#define kV34CMEModem 0x00000004 /* bit 3 */ -+#define kV34NotCMEModem 0x00000000 /* bit 3 */ -+ -+#define kV34ExtraINFOPreamble 0x00000008 /* bit 4 */ -+ -+#define kRetrainingEnabled 0x00000010 -+#define kRateRenegotiationEnabled 0x00000020 -+#define kTrellisCodingEnabled 0x00000040 -+ -+/* Fax specific features */ -+#define kFaxShortTraining 0x00000080 -+#define kFaxEchoSuppressionEnabled 0x00000100 -+ -+/* V.22/V.22bis specific features */ -+#define kV22GuardTone1800HzEnabled 0x00000200 -+#define kV22GuardTone550HzEnabled 0x00000400 -+ -+ -+/* V.34 specific features */ -+ -+#define kV34bisEnabled 0x00000800 -+ -+#define kV34PowerReductionAllowed 0x00001000 -+#define kAuxChannelEnabled 0x00002000 -+#define kAuxChannelDisabled 0x00000000 -+#define kV34TrellisEncoderTypeMask 0x0000C000 -+#define kV34TrellisEncoderTypeShift 14 -+ -+#define kTRN16 0x00010000 -+#define kAssymDataRatesEnabled 0x00020000 -+#define kNonLinearCodingEnabled 0x00040000 -+#define kConstShapingEnabled 0x00080000 -+#define kPrecodingEnabled 0x00100000 -+ -+#define kV34LoFcAt2400HzEnabled 0x00200000 -+#define kV34HiFcAt2400HzEnabled 0x00400000 -+#define kV34LoFcAt2743HzEnabled 0x00800000 -+#define kV34HiFcAt2743HzEnabled 0x01000000 -+#define kV34LoFcAt2800HzEnabled 0x02000000 -+#define kV34HiFcAt2800HzEnabled 0x04000000 -+#define kV34LoFcAt3000HzEnabled 0x08000000 -+#define kV34HiFcAt3000HzEnabled 0x10000000 -+#define kV34LoFcAt3200HzEnabled 0x20000000 -+#define kV34HiFcAt3200HzEnabled 0x40000000 -+#define kV34LoFcAt3429HzEnabled 0x80000000 -+#define kV34HiFcAt3429HzEnabled 0x80000000 -+ -+/* auxiliary features definintions map */ -+ -+#define kLoopbackTestFinish 0x00000000 -+#define kLoopbackTestV54Loop1 0x00000001 -+#define kLoopbackTestV54Loop2 0x00000002 -+#define kLoopbackTestV54Loop3 0x00000003 -+#define kLoopbackTestTypeMask 0x00000003 -+#define kLoopbackTestAutoRespondEnabled 0x00000004 -+#define kLoopbackSelfTest 0x00000008 -+ -+#define kPreempFilterMask 0x000000F0 -+#define kPreempFilterShift 4 -+ -+#define kPcmCodingTypeMuLaw 0x00000100 -+#define kPcmServerToServerEnabled 0x00000200 -+#define kPcmIsServerModem 0x00000400 -+#define kPcmAnalogModemAvailable 0x00000800 -+#define kPcmDigitalModemAvailable 0x00001000 -+#define kPcmDceOnDigitalNetwork 0x00002000 -+#define kPcmDModemPwrCalAtCodecOut 0x00004000 -+#define kPcm3429UpstreamAvailable 0x00008000 -+ -+#define kPcmSpectralShapingBitsMask 0x00070000 -+#define kPcmSpectralShapingBitsShift 16 -+#define kV90ServerNotDetSbarAfterJdbarFix 0x00080000 -+ -+#define kAutomoderPassive 0x00400000 -+ -+#define kV8HoldANSamUntilDetCI 0x00800000 -+#define kFaxSendFromOrgSide 0x01000000 -+#define kFaxV34HDX2400bpsCtrlChan 0x02000000 -+#define kFaxV34HDXAllowAsymCtrlChan 0x04000000 -+#define kV8ANSamStageDisabled 0x08000000 -+ -+#define kFlexSkipV8bis 0x10000000 -+#define kV34ControlChannelEnabled 0x20000000 -+#define kV34SeamlessRateChangeEnabled 0x40000000 -+ -+#define kPTTTest 0x80000000 -+ -+/* call progress detection Map */ -+ -+#define kDialTone 0x00000001 -+#define kRingBack 0x00000002 -+#define kBusy 0x00000004 -+#define kReorder 0x00000008 -+#define k2ndDTn 0x00000010 -+#define kBongTone 0x00000020 -+ -+/* Break type bit settings */ -+#define kExpedited 0x0001 -+#define kDestructive 0x0002 -+ -+/* async Framer setup map */ -+ -+#define kNDataBitsMask 0x03 -+#define k5DataBits 0x00 -+#define k6DataBits 0x01 -+#define k7DataBits 0x02 -+#define k8DataBits 0x03 -+ -+#define kNDataBitsShift 0 -+#define kNDataBitsOffset 5 -+ -+#define kParityTypeMask 0x1C -+#define kNoParity 0x00 -+#define kOddParity 0x04 -+#define kEvenParity 0x08 -+#define kMarkParity 0x0C -+#define kSpaceParity 0x10 -+ -+#define kNStopBitsMask 0x60 -+#define k1StopBits 0x00 -+#define k2StopBits 0x20 -+ -+#define kNStopBitsShift 5 -+#define kNStopBitsOffset 1 -+ -+/* Sync Framer setup map */ -+ -+#define kUnderrunCharMask 0xff -+#define kRepeatLastCharOnUnderrun 0x100 -+ -+/* HDLC sync framer setup maps */ -+#define kNFlagsBeforeFramesMask 0x3F -+#define kNFlagsBeforeFramesShift 0 -+ -+#define kNFlagsBetweenFramesMask 0x3F -+#define kNFlagsBetweenFramesShift 6 -+ -+#define k32BitCRC 0x1000 -+#define kFlagSharingEnabled 0x2000 -+ -+#define kNFlagsBeforeReportMask 0x03 /* no. of *extra* flags reqd before frame */ -+#define kNFlagsBeforeReportShift 14 -+ -+#define kTxDeferredCRC 0x10000 -+#define kRxDeferredCRC 0x20000 -+#define kTxIdleMarks 0x40000 -+#define kNoCRC 0x80000 -+ -+/* SAM framer setup maps */ -+ -+#define kSAMTransparentIdleTypeMask 0x00000003 -+#define kSAMTransparentIdleTypeShift 0 -+#define kSAMFramedIdleTypeMask 0x00000004 -+#define kSAMFramedIdleTypeShift 2 -+#define kSAMFramedOverrunActionMask 0x00000010 -+#define kSAMFramedOverrunActionShift 4 -+#define kSAMHalfDuplexModeMask 0x00000020 -+#define kSAMHalfDuplexModeShift 5 -+#define kSAMCRCTypeMask 0x000000C0 -+#define kSAMCRCTypeShift 6 -+#define kSAMNRZIEnabledMask 0x00000100 -+#define kSAMNRZIEnabledShift 8 -+#define kSAMSyn1Mask 0x00FF0000 -+#define kSAMSyn1Shift 16 -+#define kSAMSyn2Mask 0xFF000000 -+#define kSAMSyn2Shift 24 -+ -+/* <trans_idle> */ -+#define kSAM8bitSYNHuntDisabled 0 -+#define kSAM8bitSYNHuntEnabled ((ulong)1 << kSAMTransparentIdleTypeShift) -+#define kSAM16bitSYNHuntEnabled ((ulong)2 << kSAMTransparentIdleTypeShift) -+ -+/* <framed_idle> */ -+#define kSAMSendFlagsOnIdle 0 -+#define kSAMSendMarksOnIdle ((ulong)1 << kSAMFramedIdleTypeShift) -+ -+/* <framed_un_ov> */ -+#define kSAMAbortOnUnderrun 0 -+#define kSAMFlagsOnUnderrun ((ulong)1 << kSAMFramedOverrunActionShift) -+ -+/* <hd_auto> */ -+#define kSAMHalfDuplexNoAuto 0 -+#define kSAMHalfDuplexAuto ((ulong)1 << kSAMHalfDuplexModeShift) -+ -+ -+/* <crc_type> */ -+#define kSAMNoCRC 0 -+#define kSAM16bitCRC ((ulong)1 << kSAMCRCTypeShift) -+#define kSAM32bitCRC ((ulong)2 << kSAMCRCTypeShift) -+ -+/* <nrzi_en> */ -+#define kSAMNRZIDisabled 0 -+#define kSAMNRZIEnabled ((ulong)1 << kSAMNRZIEnabledShift) -+ -+ -+/* LAPM setup maps */ -+#define kLapmDirection 0x00000001 /* Bit 0 */ -+#define kLapmSREJEnabled 0x00000002 /* Bit 1 */ -+#define kLapmDetectionEnabled 0x00000004 /* Bit 2 */ -+#define kLapmLongADPEnabled 0x00000008 /* Bit 3 */ -+ -+#define kLapmCompressionEnabledMask 0x00000030 -+#define kLapmTxCompressionEnabled 0x00000010 /* Bit 4 */ -+#define kLapmRxCompressionEnabled 0x00000020 /* Bit 5 */ -+#define kLapmCompressionEnabledShift 4 -+ -+#define kLapmRetryLimitMask 0x000000C0 /* Bits 6,7 */ -+ -+#define kLapmNoRetryLimit 0x00000000 -+#define kLapm4Retries 0x00000040 -+#define kLapm8Retries 0x00000080 -+#define kLapm20Retries 0x000000C0 -+ -+#define kLapmWindowSizeMask 0x00001F00 /* Bits 8-12 */ -+#define kLapmWindowSizeShift 8 -+ -+#define kLapmWindowSize8 0x00000800 -+#define kLapmWindowSize15 0x00000F00 -+ -+ -+#define kLapmInfoFieldSizeMask 0x0000E000 /* Bits 13-15 */ -+#define kLapmInfoField8Bytes 0x00000000 -+#define kLapmInfoField16Bytes 0x00002000 -+#define kLapmInfoField32Bytes 0x00004000 -+#define kLapmInfoField64Bytes 0x00006000 -+#define kLapmInfoField128Bytes 0x00008000 -+#define kLapmInfoField192Bytes 0x0000A000 -+#define kLapmInfoField256Bytes 0x0000C000 -+#define kLapmInfoField512Bytes 0x0000E000 -+#define kLapmInfoFieldSizeShift 13 -+ -+#define kLapmT400Mask 0x00030000 /* Bits 16-17 */ -+#define kLapmAutoT400 0x00000000 -+#define kLapm750msT400 0x00010000 -+#define kLapm3secT400 0x00020000 -+#define kLapm30secT400 0x00030000 -+ -+#define kLapmT401Mask 0x000C0000 /* Bits 18-19 */ -+#define kLapmAutoT401 0x00000000 -+#define kLapm750msT401 0x00040000 -+#define kLapm3secT401 0x00080000 -+#define kLapm6secT401 0x000C0000 -+ -+#define kLapmT403Mask 0x00300000 /* Bits 20-21 */ -+#define kLapmAutoT403 0x00000000 -+#define kLapm750msT403 0x00100000 -+#define kLapm2secT403 0x00200000 -+#define kLapm4secT403 0x00300000 -+ -+ -+ -+#define kLapmDictSizeMask 0x00C00000 /* Bits 22-23 */ -+#define kLapmDictSize512 0x00000000 -+#define kLapmDictSize1024 0x00400000 -+#define kLapmDictSize2048 0x00800000 -+#define kLapmDictSize4096 0x00C00000 -+ -+#define kLapmStringSizeMask 0xFF000000 /* Bits 24-31 */ -+#define kLapmStringSizeShift 24 -+ -+/* MNP setup maps */ -+ -+#define kMnpMinPLevel 0x00000001 /* Bit 0: 1 - Minimal, 0 - Standard */ -+#define kMnpStdPLevel 0x00000000 /* Bit 0: 1 - Minimal, 0 - Standard */ -+ -+#define kMnpOptimizationEnabled 0x00000002 /* Bit 1 */ -+#define kMnpOptimizationDisabled 0x00000000 /* Bit 1 */ -+ -+#define kMnpCompressionEnabled 0x00000004 /* Bit 2 */ -+#define kMnpCompressionDisabled 0x00000000 /* Bit 2 */ -+ -+#define kMnpClassMask 0x00000018 -+#define kMnpClassShift 3 -+#define kMnpClass1 0x00000008 -+#define kMnpClass2 0x00000010 -+#define kMnpClass3 0x00000018 /* Bits 3,4 */ -+ -+#define kMnpMaxRetryMask 0x00000060 /* Bits 5,6 */ -+#define kMnpMaxRetryShift 5 -+#define kMnpNoRetryLimit 0x00000000 -+#define kMnp4Retries 0x00000020 -+#define kMnp8Retries 0x00000040 -+#define kMnp20Retries 0x00000060 -+ -+#define kMnpInfoFieldSizeMask 0x00000380 /* Bits 7-9 */ -+#define kMnpInfoFieldSizeShift 7 -+#define kMnpInfoField8Bytes 0x00000000 -+#define kMnpInfoField16Bytes 0x00000080 -+#define kMnpInfoField32Bytes 0x00000100 -+#define kMnpInfoField64Bytes 0x00000180 -+#define kMnpInfoField128Bytes 0x00000200 -+#define kMnpInfoField192Bytes 0x00000280 -+#define kMnpInfoField256Bytes 0x00000300 -+#define kMnpInfoField260Bytes 0x00000380 -+ -+#define kMnpT400Mask 0x00003000 /* Bits 12,13 */ -+#define kMnpT400Shift 12 -+#define kMnpAutoT400 0x00000000 -+#define kMnp750msT400 0x00001000 -+#define kMnp3secT400 0x00002000 -+#define kMnp6secT400 0x00003000 -+ -+#define kMnpT401Mask 0x0000C000 /* Bits 14,15 */ -+#define kMnpT401Shift 14 -+#define kMnpAutoT401 0x00000000 -+#define kMnp750msT401 0x00004000 -+#define kMnp3secT401 0x00008000 -+#define kMnp6secT401 0x0000C000 -+ -+#define kMnpT403Mask 0x00030000 /* Bits 16,17 */ -+#define kMnpT403Shift 16 -+#define kMnpAutoT403 0x00000000 -+#define kMnp60secT403 0x00010000 -+#define kMnp600secT403 0x00020000 -+#define kMnp3600secT403 0x00030000 -+ -+#define kMnpFallbackTypeMask 0x000C0000 /* Bits 18,19 */ -+#define kMnpFallbackTypeShift 18 -+#define kMnpNoFallback 0x00000000 -+#define kMnpFallbackTime 0x00040000 -+#define kMnpFallback200 0x00080000 -+#define kMnpFallbackChar 0x000C0000 -+ -+#define kMnpWindowSizeMask 0x00300000 /* Bits 20,21 */ -+#define kMnpWindowSizeShift 20 -+#define kMnp1Frame 0x00000000 -+#define kMnp4Frames 0x00100000 -+#define kMnp8Frames 0x00200000 -+#define kMnp16Frames 0x00300000 -+ -+#define kMnpDirection 0x00800000 /* Bit 22 */ -+ -+#define kMnpFallbackCharMask 0xFF000000 /* Bit 24-31 */ -+#define kMnpFallbackCharShift 24 -+ -+/* kV34HDXTurnOffCurrentModeCmd state parameter values */ -+ -+#define kV34HDXTurnOffAsClearDown 0 -+#define kV34HDXTurnOffFromControlSource 1 -+#define kV34HDXTurnOffFromControlDestination 2 -+#define kV34HDXTurnOffFromPrimarySource 3 -+#define kV34HDXTurnOffFromPrimaryDestination 4 -+ -+/* V70 setup maps */ -+ -+#define kV70Direction 0x00000001 /* Bit 0 */ -+#define kV70uIHEnabled 0x00000002 /* Bit 1 */ -+#define kV70AudioHeaderEnabled 0x00000004 /* Bit 2 */ -+#define kV70SilenceSupprEnabled 0x00000008 /* Bit 3 */ -+ -+#define kV70SuspendResumeShift 4 -+#define kV70SuspendResumeMask (3 << kV70SuspendResumeShift) -+#define kV70SuspendResumeDisabled 0x00000000 /* Bit 4,5 */ -+#define kV70SuspendResumeWAddr 0x00000010 /* Bit 4 */ -+#define kV70SuspendResumeWoAddr 0x00000020 /* Bit 5 */ -+ -+#define kV70CrcLengthShift 6 -+#define kV70CrcLengthMask (3 << kV70CrcLengthShift) -+#define kV70CrcLength16 0x00000000 /* Bit 6,7 */ -+#define kV70CrcLength8 0x00000040 /* Bit 6 */ -+#define kV70CrcLength32 0x00000080 /* Bit 7 */ -+ -+#define kV70BlockingFactorShift 8 -+#define kV70BlockingFactorMask (3 << kV70BlockingFactorShift) -+#define kV70BlockingFactor1 0x00000000 /* Bit 8,9 */ -+#define kV70BlockingFactor2 0x00000100 /* Bit 8 */ -+#define kV70BlockingFactor3 0x00000200 /* Bit 9 */ -+#define kV70BlockingFactor4 0x00000300 /* Bit 8,9 */ -+ -+#define kV70InitChannelsShift 10 -+#define kV70InitChannelsMask (1 << kV70InitChannelsShift) -+#define kV70InitNoChannels 0x00000000 /* Bit 10,11 */ -+#define kV70InitDataChannel 0x00000400 /* Bit 10,11 */ -+#define kV70InitAudioChannel 0x00000800 /* Bit 10,11 */ -+#define kV70InitBothChannels 0x00000C00 /* Bit 10,11 */ -+ -+#define kV70OOBEnabled 0x00001000 /* Bit 12 */ -+ -+/* V80 setup maps */ -+ -+#define kV80Direction 0x00000001 /* Bit 0 */ -+ -+#define kV80ModeShift 1 -+#define kV80ModeMask (3 << kV80ModeShift) -+#define kV80SyncMode (0 << kV80ModeShift) -+#define kV80TunnellingMode (1 << kV80ModeShift) -+#define kV80SamMode (2 << kV80ModeShift) -+#define kV80SamTransparentMode (2 << kV80ModeShift) -+#define kV80SamFramedMode (3 << kV80ModeShift) -+ -+#define kV80TransIdleShift 3 -+#define kV80TransIdleMask (3 << kV80TransIdleShift) -+#define kV80TransIdleNoHunt (0 << kV80TransIdleShift) -+#define kV80TransIdleHunt8 (1 << kV80TransIdleShift) -+#define kV80TransIdleHunt16 (2 << kV80TransIdleShift) -+ -+#define kV80FrameIdleShift 5 -+#define kV80FrameIdleMask (1 << kV80FrameIdleShift) -+#define kV80FrameIdleFlags (0 << kV80FrameIdleShift) -+#define kV80FrameIdleMarks (1 << kV80FrameIdleShift) -+ -+#define kV80FrameUnOvShift 6 -+#define kV80FrameUnOvMask (1 << kV80FrameUnOvShift) -+#define kV80FrameUnOvAbort (0 << kV80FrameUnOvShift) -+#define kV80FrameUnOvFlag (1 << kV80FrameUnOvShift) -+ -+#define kV80HdAutoShift 7 -+#define kV80HdAutoMask (1 << kV80HdAutoShift) -+#define kV80HdAutoNormal (0 << kV80HdAutoShift) -+#define kV80HdAutoExtended (1 << kV80HdAutoShift) -+ -+#define kV80CrcTypeShift 8 -+#define kV80CrcTypeMask (3 << kV80CrcTypeShift) -+#define kV80NoCrc (0 << kV80CrcTypeShift) -+#define kV80Crc16 (1 << kV80CrcTypeShift) -+#define kV80Crc32 (2 << kV80CrcTypeShift) -+ -+#define kV80NrziShift 10 -+#define kV80NrziMask (1 << kV80NrziShift) -+#define kV80NrziDisabled (0 << kV80NrziShift) -+#define kV80NrziEnabled (1 << kV80NrziShift) -+ -+#define kV80Syn1Mask 0x00FF0000 /* Bit 16-23 */ -+#define kV80Syn1Shift 16 -+#define kV80Syn2Mask 0xFF000000 /* Bit 24-31 */ -+#define kV80Syn2Shift 24 -+ -+/* kStartCallProgressMonitorCmd setup masks */ -+ -+#define kDTMFDetectorDebouncerEnabled 0x0001 -+#define kModemSignalDetectorDebouncerEnabled 0x0002 -+#define kCallProgressDetectorDebouncerEnabled 0x0004 -+#define kCustomSignalDebouncerEnabled 0x0008 -+#define kFaxCallingToneSuppressionEnabled 0x0010 -+#define kDataCallingToneSuppressionEnabled 0x0020 -+#define kCISuppressionEnabled 0x0040 -+#define kAnsSuppressionEnabled 0x0080 -+ -+/* kDialCmd setup masks (dialerSetup bit fields) */ -+ -+#define kDTMFDialingEnabled 0x0001 -+#define kPulseDialingEnabled 0x0002 -+#define kModeSwitchEnabled 0x0004 -+#define kBlindDialingEnabled 0x0008 -+#define kPulseDialingMethodMask 0x0030 -+#define kDialModifierTranslationMask 0x00C0 -+#define kFlashWhilePulseDialingEnabled 0x0100 -+ -+/* Pulse dialing method */ -+#define kPulseDialingNPulsesPerDigit 0x0000 -+#define kPulseDialingNplusOnePulsesPerDigit 0x0010 -+#define kPulseDialingTenMinusNPulsesPerDigit 0x0020 -+ -+/* Dial modifier translation */ -+#define kTreatWasPause 0x0040 /* Tread 'W' modifier as pause */ -+#define kTreatCommaAsWaitForDialtone 0x0080 -+ -+#ifdef TI_C6X -+#include "C6xDefs.h" -+#endif -+#ifdef PENTIUM_MMX -+#include "PentiumDefs.h" -+#endif -+ -+ -+#if defined(DSP16K) && !defined(SoftModemGlobals) -+/* ensure that code generator does not use r5 */ -+register int *softmodem_h_should_not_be_included_after_softmodem_gh asm("r5"); -+#endif -+ -+/****************************************************************************/ -+/* 3. Interface functions. */ -+/* */ -+/****************************************************************************/ -+ -+#ifdef ADSL_MODEM -+ -+#ifndef SoftDslHeader -+#include "SoftDsl.h" -+#endif -+extern char* SM_DECL SoftModemGetRevString(void); -+extern char* SM_DECL SoftModemGetProductName(void); -+extern char* SM_DECL SoftModemGetBuildDate(void); -+extern char* SM_DECL SoftModemGetFullManufacturerName(void); -+extern char* SM_DECL SoftModemGetShortManufacturerName(void); -+extern int SM_DECL SoftModemRevStringSize(void); -+extern char* SM_DECL SoftModemGetVendorIDString(void); -+extern char* SM_DECL SoftModemGetT1413VendorIDString(void); -+extern char* SM_DECL SoftModemGetSerialNumberString(void); -+extern int SM_DECL SoftModemSerNumStringSize(void); -+#define SoftDslGetProductName SoftModemGetProductName -+#define SoftDslGetBuildDate SoftModemGetBuildDate -+#define SoftDslGetFullManufacturerName SoftModemGetFullManufacturerName -+#define SoftDslGetShortManufacturerName SoftModemGetShortManufacturerName -+ -+#else /* !ADSL_MODEM */ -+ -+extern void SM_DECL SoftModemSetMemoryPtr (void *varsPtr); -+extern void* SM_DECL SoftModemGetMemoryPtr (void); -+extern void SM_DECL SoftModemSetRefData (void *varsPtr); -+extern void* SM_DECL SoftModemGetRefData (void); -+extern int SM_DECL SoftModemGetMemorySize (void); -+extern void SM_DECL SoftModemInit (void); -+extern void SM_DECL SoftModemReset (void); -+extern void SM_DECL SoftModemLineHandler (int sampleCount, short *srcPtr, short *dstPtr); -+extern void SM_DECL SoftModemTimer (long timeQ24ms); -+extern Boolean SM_DECL SoftModemCommandHandler (modemCommandStruct *cmdPtr); -+extern int SM_DECL SoftModemGetExternalMemorySize(void); -+extern void SM_DECL SoftModemSetExternalMemoryPtr(void *varsPtr); -+ -+extern void SM_DECL SoftModemSetPcmCoding (pcmCodingType pcmCoding); -+extern void SM_DECL SoftModemPcmLineHandler (int sampleCount, uchar *srcPtr, uchar *dstPtr); -+ -+/* SoftModem IO functions */ -+extern int SM_DECL SoftModemWrite(int nBytes, uchar* srcPtr); -+extern int SM_DECL SoftModemRead(int nBytes, uchar* dstPtr); -+extern int SM_DECL SoftModemWriteFrame(int nBytes, uchar* srcPtr); -+extern int SM_DECL SoftModemReadFrame(int maxFrameSize, uchar* dstPtr); -+extern int SM_DECL SoftModemCountWritePending(void); -+extern int SM_DECL SoftModemCountReadPending(void); -+extern int SM_DECL SoftModemWriteSpaceAvailable(void); -+extern void SM_DECL SoftModemWriteFlush(void); -+extern void SM_DECL SoftModemReadFlush(void); -+extern int SM_DECL SoftModemGetWriteBufferSize(void); -+extern int SM_DECL SoftModemGetReadBufferSize(void); -+ -+#ifdef AUDIO -+extern int SM_DECL SoftModemAudioHandler(int sampleCount, short *srcPtr, short *dstPtr); -+extern int SM_DECL SoftModemAudioRxDataHandler(int nBytes, uchar* srcPtr); -+extern int SM_DECL SoftModemAudioTxDataHandler(int nBytes, uchar* dstPtr); -+#endif -+ -+ -+#define SoftModemSetGlobalPtr SoftModemSetMemoryPtr -+#define SoftModem SoftModemLineHandler -+#ifndef LINKLAYER_V42BIS_LARGE_DICTIONARY -+#define kSoftModemMaxMemorySize (65536) -+#else -+#define kSoftModemMaxMemorySize (65536 + 8192) -+#endif -+ -+/* -+ * Internal functions -+ */ -+extern long SM_DECL SoftModemGetDCOffset(void); -+extern void SM_DECL SoftModemDisableDCOffsetTracking(void); -+extern void SM_DECL SoftModemEnableDCOffsetTracking(void); -+extern long SM_DECL SoftModemGetRcvPower(void); -+extern ulong SM_DECL SoftModemGetHybridDelay(void); -+extern void SM_DECL SoftModemStatusHandler (modemStatusStruct *status); -+extern Boolean SM_DECL SoftModemInternalCommandHandler (modemCommandStruct *cmdPtr); -+extern void SM_DECL SoftModemInternalStatusHandler (modemStatusStruct *status); -+extern void SM_DECL SoftModemSetControllerOnlyMode(commandHandlerType externalDataPumpCommandHandlerPtr); -+extern char* SM_DECL SoftModemGetRevString(void); -+extern char* SM_DECL SoftModemGetProductName(void); -+extern char* SM_DECL SoftModemGetBuildDate(void); -+extern char* SM_DECL SoftModemGetFullManufacturerName(void); -+extern char* SM_DECL SoftModemGetShortManufacturerName(void); -+extern int SM_DECL SoftModemRevStringSize(void); -+extern char* SM_DECL SoftModemGetVendorIDString(void); -+extern char* SM_DECL SoftModemGetSerialNumberString(void); -+extern void SM_DECL SoftModemAuxTxDataHandler(int nBytes, uchar *dataPtr); -+extern void SM_DECL SoftModemAuxRxDataHandler(int nBytes, uchar *dataPtr); -+extern void SM_DECL SoftModemTxDataHandler(int nBytes, uchar *dataPtr); -+extern void SM_DECL SoftModemRxDataHandler(int nBytes, uchar *dataPtr); -+extern void SM_DECL SoftModemATPrintf(uchar *format, void *arg1, void *arg2, void *arg3); -+ -+#define SoftModemSetInputSaturationLimit(limit) (gSystemVars.inputSignalLimit = limit) -+#define SoftModemResetInputSaturationLimit() (gSystemVars.inputSignalLimit = 0) -+ -+#endif /* !ADSL_MODEM */ -+ -+#endif /* SoftModemPh */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModemTypes.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModemTypes.h ---- linux-2.6.8.1/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModemTypes.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/char/adsl/impl1/softdsl/SoftModemTypes.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,292 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * SoftModemTypes.h -+ * -+ * -+ * Description: -+ * This file contains some of the type declarations for SoftModem -+ * -+ * Copyright (c) 1993-1997 AltoCom, Inc. All rights reserved. -+ * Authors: Mark Gonikberg, Haixiang Liang. -+ * -+ * $Revision: 1.9 $ -+ * -+ * $Id: SoftModemTypes.h,v 1.9 2004/04/13 00:16:59 ilyas Exp $ -+ * -+ * $Log: SoftModemTypes.h,v $ -+ * Revision 1.9 2004/04/13 00:16:59 ilyas -+ * Merged the latest ADSL driver changes -+ * -+ * Revision 1.8 2004/01/24 01:35:33 ytan -+ * add multi-section lmem swap -+ * -+ * Revision 1.7 2001/09/21 19:19:01 ilyas -+ * Minor fixes for VxWorks build -+ * -+ * Revision 1.6 2001/08/16 02:16:39 khp -+ * - added definitions for SLOW_DATA and FAST_TEXT, defined to nothing -+ * except when bcm47xx && USE_SLOW_DATA or USE_FAST_TEXT. Any function -+ * that needs to run fast should be marked with FAST_TEXT. Any data that -+ * is not referenced often should be marked with SLOW_DATA. -+ * -+ * Revision 1.5 2001/03/30 00:49:59 liang -+ * Changed warning output message. -+ * -+ * Revision 1.4 2000/06/21 22:24:40 yongbing -+ * Modify WARN micro to limit the number of same warnings printed -+ * -+ * Revision 1.3 1999/08/05 20:02:13 liang -+ * Merged with the softmodem top of the tree on 08/04/99. -+ * -+ * Revision 1.2 1999/01/27 22:14:29 liang -+ * Merge with SoftModem_3_1_02. -+ * -+ * Revision 1.19 1998/11/17 04:02:39 yura -+ * Fixed WARN and ASSERT redefinition warning for WinNT targets -+ * -+ * Revision 1.18 1998/08/26 19:20:43 scott -+ * Commented out EXCLUDE_CYGWIN32_TYPES define -+ * -+ * Revision 1.17 1998/08/13 19:03:06 scott -+ * Added BitField definition and INT_IS_LONG -+ * -+ * Revision 1.16 1998/08/08 03:39:55 scott -+ * The DEBUG_PTR_ENABLED macro can be used to enable only the DEBUG_PTR macros -+ * -+ * Revision 1.15 1998/07/28 22:21:31 mwg -+ * Fixed problems with NULL & nil being defined incorrectly -+ * -+ * Revision 1.14 1998/07/08 17:09:17 scott -+ * Define ASSERT and WARN only if not already defined -+ * -+ * Revision 1.13 1998/07/02 20:46:34 scott -+ * Added workaround for building certain builds with older SunOS -+ * -+ * Revision 1.12 1998/02/09 18:24:49 scott -+ * Defined "Private" as nothing for GreenHill (to prevent erroneous section -+ * allocations for data) -+ * -+ * Revision 1.11 1997/08/29 21:39:24 scott -+ * Added check for LONG_IS_INT define (for TI C6X support) -+ * -+ * Revision 1.10 1997/05/29 19:50:23 mwg -+ * Added code to avoid type redefintions under SunOS. -+ * -+ * Revision 1.9 1997/03/19 18:35:08 mwg -+ * Changed copyright notice. -+ * -+ * Revision 1.8 1997/02/11 00:05:53 mwg -+ * Minor adjustments for Pentium optimization. -+ * -+ * Revision 1.7 1997/01/11 01:30:47 mwg -+ * Added new macro WARN -- the same as ASSERT but without exit. -+ * -+ * Revision 1.6 1996/08/22 20:07:39 liang -+ * When ASSERT fires, only print out information, don't exit. -+ * -+ * Revision 1.5 1996/05/06 06:49:10 mwg -+ * Fixed linux problems. -+ * -+ * Revision 1.4 1996/05/02 08:40:16 mwg -+ * Merged in Chromatic bug fixes. -+ * -+ * Revision 1.3 1996/04/01 20:59:53 mwg -+ * Added macros to setup and use debug pointer. -+ * -+ * Revision 1.2 1996/02/27 01:50:04 mwg -+ * Added ASSERT() macro. -+ * -+ * Revision 1.1.1.1 1996/02/14 02:35:13 mwg -+ * Redesigned the project directory structure. Merged V.34 into the project. -+ * -+ * Revision 1.2 1995/12/03 06:59:31 mwg -+ * Fixed all gcc varnings. We are now running under Linux on a PC! -+ * -+ *****************************************************************************/ -+#ifndef SoftModemTypesh -+#define SoftModemTypesh -+ -+#ifdef LONG_SHORTS -+#define short long -+#define ushort unsigned long -+#endif -+ -+typedef signed char schar; -+typedef unsigned char uchar; -+ -+#if 0 /* This is not currently required */ -+#if defined(_CYGWIN32) && defined(DEBUG) -+#define EXCLUDE_CYGWIN32_TYPES -+#endif -+#endif -+ -+#if !defined(_SYS_TYPES_H) || !defined(TARG_OS_RTEMS) -+#if defined(_CFE_) -+ typedef unsigned int uint; -+ typedef unsigned long ulong; -+ typedef unsigned short ushort; -+#elif defined(TARG_OS_RTEMS) -+#if defined(HOST_ARCH_LINUX) -+ typedef unsigned int uint; -+#endif -+ typedef unsigned long ulong; -+#if defined(HOST_ARCH_LINUX) -+ typedef unsigned short ushort; -+#endif -+#elif defined(EXCLUDE_CYGWIN32_TYPES) || (!defined _NO_TYPE_DEFS_ && !defined _SYS_TYPES_H && !defined __SYS_TYPES_H__ && !defined _SYS_BSD_TYPES_H && !defined _LINUX_TYPES_H) || defined(__sparc__) -+#ifndef EXCLUDE_CYGWIN32_TYPES -+ typedef unsigned int uint; -+#endif -+#ifndef _LINUX_TYPES_H -+ typedef unsigned long ulong; -+#endif -+#if !defined(ushort) && !defined(EXCLUDE_CYGWIN32_TYPES) && !defined(__INCvxTypesOldh) -+ typedef unsigned short ushort; -+#endif -+#endif -+#else -+typedef unsigned long ulong; -+#endif -+ -+#if defined(GREENHILL) || defined(GNUTX39) /* GH allocates private data to incorrect section */ -+#define Private -+#else -+#define Private static -+#endif -+ -+#define Public -+ -+#ifdef NULL -+#undef NULL -+#endif -+#ifdef nil -+#undef nil -+#endif -+ -+#define NULL 0 -+#define nil 0 -+ -+#define false 0 -+#define true 1 -+typedef unsigned char Boolean; -+typedef unsigned int BitField; /* this must occur BEFORE long_is_int/int_is_long defs */ -+ -+#ifdef LONG_IS_INT -+#define long int -+#define ulong uint -+#endif -+ -+#ifdef INT_IS_LONG -+#define int long -+#define uint ulong -+#endif -+ -+#define POSTULATE(postulate) \ -+ do \ -+ { \ -+ typedef struct \ -+ { \ -+ char NegativeSizeIfPostulateFalse[((int)(postulate))*2 - 1]; \ -+ } PostulateCheckStruct; \ -+ } \ -+ while (0) -+ -+#if defined(DEBUG) && !defined(__KERNEL__) -+#ifndef WARN -+#define kDSLNumberWarnTimes 10 -+#define WARN(assertion) \ -+ { static int warnSeveralTimes=0; \ -+ if ((!(assertion))&(warnSeveralTimes<kDSLNumberWarnTimes)) \ -+ { \ -+ fprintf(stderr, "Warning, failed: %s\n", #assertion); \ -+ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ -+ warnSeveralTimes++; \ -+ } \ -+ } -+#endif -+#ifndef ASSERT -+#define ASSERT(assertion) \ -+ { if (!(assertion)) \ -+ { \ -+ fprintf(stderr, "Assertion failed: %s\n", #assertion); \ -+ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__); \ -+ exit(1); \ -+ } \ -+ } -+#endif -+#else -+ -+#undef WARN -+#define WARN(a) -+ -+#undef ASSERT -+#define ASSERT(a) -+ -+#endif -+ -+/* -+ * memory allocation macros -+ */ -+ -+#if defined(bcm47xx) && defined(USE_SLOW_DATA) -+#define SLOW_DATA __attribute__ ((section(".slow_data"))) -+#else -+#define SLOW_DATA -+#endif -+ -+#if defined(bcm47xx) && defined(USE_FAST_TEXT) -+#define FAST_TEXT __attribute__ ((section(".fast_text"))) -+#else -+#define FAST_TEXT -+#endif -+ -+#if defined(bcm47xx) && defined(SWAP_LMEM) -+#define SWAP_TEXT1_1 __attribute__ ((section(".swap_text1_1"))) -+#define SWAP_TEXT1_2 __attribute__ ((section(".swap_text1_2"))) -+#define SWAP_TEXT2_1 __attribute__ ((section(".swap_text2_1"))) -+#define SWAP_TEXT2_2 __attribute__ ((section(".swap_text2_2"))) -+#define SWAP_TEXT3_1 __attribute__ ((section(".swap_text3_1"))) -+#define SWAP_TEXT3_2 __attribute__ ((section(".swap_text3_2"))) -+#else -+#define SWAP_TEXT1_1 FAST_TEXT -+#define SWAP_TEXT1_2 FAST_TEXT -+#define SWAP_TEXT2_1 FAST_TEXT -+#define SWAP_TEXT2_2 FAST_TEXT -+#define SWAP_TEXT3_1 FAST_TEXT -+#define SWAP_TEXT3_2 FAST_TEXT -+#endif -+ -+/* -+ * Debug stuff -+ */ -+#if defined(DEBUG) || defined(DEBUG_PTR_ENABLED) -+#define DECLARE_DEBUG_PTR(type) static type *gv; -+#define SETUP_DEBUG_PTR() gv = &globalVar -+#else -+#define DECLARE_DEBUG_PTR(type) -+#define SETUP_DEBUG_PTR() -+#endif -+/* -+ * Obsolete stuff -+ */ -+#ifdef DEBUG -+#define HereIsTheGlobalVarPointerMacro SETUP_DEBUG_PTR(); -+#else -+#define HereIsTheGlobalVarPointerMacro -+#endif -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6338_common.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6338_common.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6338_common.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6338_common.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,207 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: 6338_common.h */ -+/* DATE: 05/10/04 */ -+/* PURPOSE: Define addresses of major hardware components of */ -+/* BCM6338 */ -+/* */ -+/***********************************************************************/ -+#ifndef __BCM6338_MAP_COMMON_H -+#define __BCM6338_MAP_COMMON_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#define PERF_BASE 0xfffe0000 /* chip control registers */ -+#define BB_BASE 0xfffe0100 /* bus bridge registers */ -+#define TIMR_BASE 0xfffe0200 /* timer registers */ -+#define UART_BASE 0xfffe0300 /* uart registers */ -+#define GPIO_BASE 0xfffe0400 /* gpio registers */ -+#define SPI_BASE 0xfffe0c00 /* SPI master controller registers */ -+ -+#define ADSL_BASE 0xfffe1000 /* ADSL core control registers */ -+#define ATM_BASE 0xfffe2000 /* ATM SAR control registers */ -+#define EMAC_DMA_BASE 0xfffe2400 /* EMAC DMA control registers */ -+#define USB_DMA_BASE 0xfffe2400 /* USB DMA control registers */ -+#define EMAC1_BASE 0xfffe2800 /* EMAC1 control registers */ -+#define USB_CTL_BASE 0xfffe3000 /* USB control registers */ -+#define SDRAM_BASE 0xfffe3100 /* SDRAM control registers */ -+ -+ -+/* -+##################################################################### -+# System PLL Control Register -+##################################################################### -+*/ -+ -+#define SOFT_RESET 0x00000001 -+ -+/* -+##################################################################### -+# SDRAM Control Registers -+##################################################################### -+*/ -+#define SDR_INIT_CTL 0x00 -+ /* Control Bits */ -+#define SDR_PFEN1 (1<<16) -+#define SDR_PFEN0 (1<<15) -+#define SDR_EMPRS (1<<14) -+#define SDR_2_BANKS (1<<13) -+#define SDR_1_BANK (0<<13) -+#define SDR_CS1_EN (1<<12) -+#define SDR_PEND (1<<11) -+#define SDR_32_BIT (1<<10) -+#define SDR_POWER_DOWN (1<<9) -+#define SDR_SELF_REFRESH (1<<8) -+#define SDR_11_COLS (3<<6) -+#define SDR_10_COLS (2<<6) -+#define SDR_9_COLS (1<<6) -+#define SDR_8_COLS (0<<6) -+#define SDR_13_ROWS (2<<4) -+#define SDR_12_ROWS (1<<4) -+#define SDR_11_ROWS (0<<4) -+#define SDR_MASTER_EN (1<<3) -+#define SDR_MRS_CMD (1<<2) -+#define SDR_PRE_CMD (1<<1) -+#define SDR_CBR_CMD (1<<0) -+ -+#define SDR_CFG_REG 0x04 -+ /* Control Bits */ -+#define SDR_FULL_PG 0 -+#define SDR_BURST8 1 -+#define SDR_BURST4 2 -+#define SDR_BURST2 3 -+#define SDR_FAST_MEM (1<<2) -+#define SDR_SLOW_MEM (0<<2) -+ -+#define SDR_REF_CTL 0x0C -+ /* Control Bits */ -+#define SDR_REF_EN (1<<15) -+ -+#define SDR_PRIOR -+ /* Control Bits */ -+#define SDR_EN_PRIOR (1<<31) -+ -+ -+/* -+##################################################################### -+# MPI Control Registers -+##################################################################### -+*/ -+#define CS0BASE 0x00 -+#define CS0CNTL 0x04 -+ -+/* -+# CSxBASE settings -+# Size in low 4 bits -+# Base Address for match in upper 24 bits -+*/ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ -+/* CSxCNTL settings */ -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define ZEROWT 0x00000000 /* .. 0 WS */ -+#define ONEWT 0x00000002 /* .. 1 WS */ -+#define TWOWT 0x00000004 /* .. 2 WS */ -+#define THREEWT 0x00000006 /* .. 3 WS */ -+#define FOURWT 0x00000008 /* .. 4 WS */ -+#define FIVEWT 0x0000000a /* .. 5 WS */ -+#define SIXWT 0x0000000c /* .. 6 WS */ -+#define SEVENWT 0x0000000e /* .. 7 WS */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert chip select polarity */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. enable fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+ -+/* -+##################################################################### -+# UART Control Registers -+##################################################################### -+*/ -+#define UART0CONTROL 0x01 -+#define UART0CONFIG 0x02 -+#define UART0RXTIMEOUT 0x03 -+#define UART0BAUD 0x04 -+#define UART0FIFOCFG 0x0a -+#define UART0INTMASK 0x10 -+#define UART0INTSTAT 0x12 -+#define UART0DATA 0x17 -+ -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+#define XMITBREAK 0x40 /* Config register */ -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ -+#define RSTTXFIFOS 0x80 /* Rx Timeout register */ -+#define RSTRXFIFOS 0x40 -+ -+#define TX4 0x40 /* FIFO config register */ -+#define RX4 0x04 -+ -+#define DELTAIP 0x0001 /* Interrupt Status and Mask registers */ -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6338_map.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6338_map.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6338_map.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6338_map.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,885 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: 6338_map.h */ -+/* DATE: 05/10/04 */ -+/* PURPOSE: Define addresses of major hardware components of */ -+/* BCM6338 */ -+/* */ -+/***********************************************************************/ -+#ifndef __BCM6338_MAP_H -+#define __BCM6338_MAP_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#include "bcmtypes.h" -+#include "6338_common.h" -+#include "6338_intr.h" -+ -+/* macro to convert logical data addresses to physical */ -+/* DMA hardware must see physical address */ -+#define LtoP( x ) ( (uint32)x & 0x1fffffff ) -+#define PtoL( x ) ( LtoP(x) | 0xa0000000 ) -+ -+/* -+** Interrupt Controller -+*/ -+typedef struct PerfControl { -+ uint32 RevID; /* (00) */ -+ uint16 testControl; /* (04) */ -+ uint16 blkEnables; /* (06) */ -+ -+#define ADSL_CLK_EN 0x0001 -+#define MPI_CLK_EN 0x0002 -+#define DRAM_CLK_EN 0x0004 -+#define EMAC_CLK_EN 0x0010 -+#define USBS_CLK_EN 0x0010 -+#define SAR_CLK_EN 0x0020 -+#define SPI_CLK_EN 0x0200 -+ -+ uint32 pll_control; /* (08) */ -+#define CHIP_SOFT_RESET 0x00000001 -+ -+ uint32 IrqMask; /* (0c) */ -+ uint32 IrqStatus; /* (10) */ -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 5 -+#define EI_CLEAR_SHFT 10 -+#define EI_MASK_SHFT 15 -+#define EI_INSENS_SHFT 20 -+#define EI_LEVEL_SHFT 25 -+ -+ uint32 unused[4]; /* (18) */ -+ uint32 BlockSoftReset; /* (28) */ -+#define BSR_SPI 0x00000001 -+#define BSR_EMAC 0x00000004 -+#define BSR_USBH 0x00000008 -+#define BSR_USBS 0x00000010 -+#define BSR_ADSL 0x00000020 -+#define BSR_DMAMEM 0x00000040 -+#define BSR_SAR 0x00000080 -+#define BSR_ACLC 0x00000100 -+#define BSR_ADSL_MIPS_PLL 0x00000400 -+#define BSR_ALL_BLOCKS \ -+ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ -+ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) -+} PerfControl; -+ -+#define PERF ((volatile PerfControl * const) PERF_BASE) -+ -+/* -+** Bus Bridge Registers -+*/ -+typedef struct BusBridge { -+ uint16 status; -+#define BB_BUSY 0x8000 /* posted operation in progress */ -+#define BB_RD_PND 0x4000 /* read pending */ -+#define BB_RD_CMPLT 0x2000 /* read complete */ -+#define BB_ERROR 0x1000 /* posted write error */ -+#define BB_TEA 0x0800 /* transfer aborted */ -+ uint16 abortTimeoutCnt; /* abort timeout value */ -+ -+ byte writePostEnable; -+#define BB_POST_TIMR_EN 0x08 /* post writes to timer regs */ -+#define BB_POST_GPIO_EN 0x04 /* post writes to gpio regs */ -+#define BB_POST_INTC_EN 0x02 /* post writes to interrupt controller regs */ -+#define BB_POST_UART_EN 0x01 /* post writes to uart regs */ -+ byte unused1[5]; -+ uint16 postAddr; /* posted read address (lower half) */ -+ byte unused2[3]; -+ byte postData; /* posted read data */ -+} BusBridge; -+ -+/* register offsets (needed for EBI master access) */ -+#define BB_STATUS 0 -+#define BB_ABORT_TO_CNT 2 -+#define BB_WR_POST_EN 4 -+#define BB_RD_POST_ADDR 10 -+#define BB_RD_POST_DATA 12 -+ -+#define BRIDGE *bridge ((volatile BusBridge * const) BB_BASE) -+ -+/* -+** Timer -+*/ -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+ -+/* -+** UART -+*/ -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+ byte config; -+#define XMITBREAK 0x40 -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ /* 4-LSBS represent STOP bits/char -+ * in 1/8 bit-time intervals. Zero -+ * represents 1/8 stop bit interval. -+ * Fifteen represents 2 stop bits. -+ */ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ /* 5-bit TimeoutCnt is in low bits of this register. -+ * This count represents the number of characters -+ * idle times before setting receive Irq when below threshold -+ */ -+ uint32 baudword; -+ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate -+ */ -+ -+ byte txf_levl; /* Read-only fifo depth */ -+ byte rxf_levl; /* Read-only fifo depth */ -+ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are -+ * RxThreshold. Irq can be asserted -+ * when rx fifo> thresh, txfifo<thresh -+ */ -+ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) -+ * if these bits are also enabled to GPIO_o -+ */ -+#define DTREN 0x01 -+#define RTSEN 0x02 -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to -+ * detect irq on rising AND falling -+ * edges for corresponding GPIO_i -+ * if enabled (edge insensitive) -+ */ -+ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense -+ * 0 for negedge sense if -+ * not configured for edge -+ * insensitive (see above) -+ * Lower 4 bits: Mask to enable change -+ * detection IRQ for corresponding -+ * GPIO_i -+ */ -+ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits -+ * have changed (may set IRQ). -+ * read automatically clears bit -+ * Lower 4 bits are actual status -+ */ -+ -+ uint16 intMask; /* Same Bit defs for Mask and status */ -+ uint16 intStatus; -+#define DELTAIP 0x0001 -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; /* Write to TX, Read from RX */ -+ /* bits 11:8 are BRK,PAR,FRM errors */ -+ -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART ((volatile Uart * const) UART_BASE) -+ -+/* -+** Gpio Controller -+*/ -+ -+typedef struct GpioControl { -+ uint32 unused0; -+ uint32 GPIODir; /* bits 7:0 */ -+ uint32 unused1; /* bits 36:32 */ -+ uint32 GPIOio; -+ uint32 LEDCtrl; -+#define LED3_STROBE 0x08000000 -+#define LED2_STROBE 0x04000000 -+#define LED1_STROBE 0x02000000 -+#define LED0_STROBE 0x01000000 -+#define LED_TEST 0x00010000 -+#define LED3_DISABLE_LINK_ACT 0x00008000 -+#define LED2_DISABLE_LINK_ACT 0x00004000 -+#define LED1_DISABLE_LINK_ACT 0x00002000 -+#define LED0_DISABLE_LINK_ACT 0x00001000 -+#define LED_INTERVAL_SET_MASK 0x00000f00 -+#define LED_INTERVAL_SET_320MS 0x00000500 -+#define LED_INTERVAL_SET_160MS 0x00000400 -+#define LED_INTERVAL_SET_80MS 0x00000300 -+#define LED_INTERVAL_SET_40MS 0x00000200 -+#define LED_INTERVAL_SET_20MS 0x00000100 -+#define LED3_ON 0x00000080 -+#define LED2_ON 0x00000040 -+#define LED1_ON 0x00000020 -+#define LED0_ON 0x00000010 -+#define LED3_ENABLE 0x00000008 -+#define LED2_ENABLE 0x00000004 -+#define LED1_ENABLE 0x00000002 -+#define LED0_ENABLE 0x00000001 -+ uint32 SpiSlaveCfg; -+#define SPI_SLAVE_RESET 0x00010000 -+#define SPI_RESTRICT 0x00000400 -+#define SPI_DELAY_DISABLE 0x00000200 -+#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 -+#define SPI_SER_ADDR_CFG_MASK 0x0000000c -+#define SPI_MODE 0x00000001 -+ uint32 vRegConfig; -+} GpioControl; -+ -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+/* Number to mask conversion macro used for GPIODir and GPIOio */ -+#define GPIO_NUM_MAX_BITS_MASK 0x0f -+#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) -+ -+/* -+** Spi Controller -+*/ -+ -+typedef struct SpiControl { -+ uint16 spiCmd; /* (0x0): SPI command */ -+#define SPI_CMD_NOOP 0 -+#define SPI_CMD_SOFT_RESET 1 -+#define SPI_CMD_HARD_RESET 2 -+#define SPI_CMD_START_IMMEDIATE 3 -+ -+#define SPI_CMD_COMMAND_SHIFT 0 -+#define SPI_CMD_DEVICE_ID_SHIFT 4 -+#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 -+#define SPI_CMD_ONE_BYTE_SHIFT 11 -+#define SPI_CMD_ONE_WIRE_SHIFT 12 -+#define SPI_DEV_ID_0 0 -+#define SPI_DEV_ID_1 1 -+#define SPI_DEV_ID_2 2 -+#define SPI_DEV_ID_3 3 -+ -+ byte spiIntStatus; /* (0x2): SPI interrupt status */ -+ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ -+ -+ byte spiIntMask; /* (0x4): SPI interrupt mask */ -+#define SPI_INTR_CMD_DONE 0x01 -+#define SPI_INTR_RX_OVERFLOW 0x02 -+#define SPI_INTR_INTR_TX_UNDERFLOW 0x04 -+#define SPI_INTR_TX_OVERFLOW 0x08 -+#define SPI_INTR_RX_UNDERFLOW 0x10 -+#define SPI_INTR_CLEAR_ALL 0x1f -+ -+ byte spiStatus; /* (0x5): SPI status */ -+#define SPI_RX_EMPTY 0x02 -+#define SPI_CMD_BUSY 0x04 -+#define SPI_SERIAL_BUSY 0x08 -+ -+ byte spiClkCfg; /* (0x6): SPI clock configuration */ -+#define SPI_CLK_0_391MHZ 1 -+#define SPI_CLK_0_781MHZ 2 /* default */ -+#define SPI_CLK_1_563MHZ 3 -+#define SPI_CLK_3_125MHZ 4 -+#define SPI_CLK_6_250MHZ 5 -+#define SPI_CLK_12_50MHZ 6 -+#define SPI_CLK_MASK 0x07 -+#define SPI_SSOFFTIME_MASK 0x38 -+#define SPI_SSOFFTIME_SHIFT 3 -+#define SPI_BYTE_SWAP 0x80 -+ -+ byte spiFillByte; /* (0x7): SPI fill byte */ -+ -+ byte unused0; -+ byte spiMsgTail; /* (0x9): msgtail */ -+ byte unused1; -+ byte spiRxTail; /* (0xB): rxtail */ -+ -+ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ -+ -+ byte spiMsgCtl; /* (0x40) control byte */ -+#define FULL_DUPLEX_RW 0 -+#define HALF_DUPLEX_W 1 -+#define HALF_DUPLEX_R 2 -+#define SPI_MSG_TYPE_SHIFT 6 -+#define SPI_BYTE_CNT_SHIFT 0 -+ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ -+ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ -+ byte unused3[64]; /* (0xc0 - 0xff) reserved */ -+} SpiControl; -+ -+#define SPI ((volatile SpiControl * const) SPI_BASE) -+ -+#define IUDMA_MAX_CHANNELS 16 -+ -+/* -+** DMA Channel Configuration (1 .. 16) -+*/ -+typedef struct DmaChannelCfg { -+ uint32 cfg; /* (00) assorted configuration */ -+#define DMA_BURST_HALT 0x00000004 /* idle after finish current memory burst */ -+#define DMA_PKT_HALT 0x00000002 /* idle after an EOP flag is detected */ -+#define DMA_ENABLE 0x00000001 /* set to enable channel */ -+ uint32 intStat; /* (04) interrupts control and status */ -+ uint32 intMask; /* (08) interrupts mask */ -+#define DMA_BUFF_DONE 0x00000001 /* buffer done */ -+#define DMA_DONE 0x00000002 /* packet xfer complete */ -+#define DMA_NO_DESC 0x00000004 /* no valid descriptors */ -+ uint32 maxBurst; /* (0C) max burst length permitted */ -+} DmaChannelCfg; -+ -+/* -+** DMA State RAM (1 .. 16) -+*/ -+typedef struct DmaStateRam { -+ uint32 baseDescPtr; /* (00) descriptor ring start address */ -+ uint32 state_data; /* (04) state/bytes done/ring offset */ -+ uint32 desc_len_status; /* (08) buffer descriptor status and len */ -+ uint32 desc_base_bufptr; /* (0C) buffer descrpitor current processing */ -+} DmaStateRam; -+ -+/* -+** DMA Registers -+*/ -+typedef struct DmaRegs { -+#define DMA_MASTER_EN 0x00000001 -+#define DMA_FLOWC_CH1_EN 0x00000002 -+#define DMA_FLOWC_CH3_EN 0x00000004 -+#define DMA_NUM_CHS_MASK 0x0f000000 -+#define DMA_NUM_CHS_SHIFT 24 -+#define DMA_FLOWCTL_MASK 0x30000000 -+#define DMA_FLOWCTL_CH1 0x10000000 -+#define DMA_FLOWCTL_CH3 0x20000000 -+#define DMA_FLOWCTL_SHIFT 28 -+ uint32 controller_cfg; /* (00) controller configuration */ -+ -+ // Flow control Ch1 -+ uint32 flowctl_ch1_thresh_lo; /* (04) EMAC1 RX DMA channel */ -+ uint32 flowctl_ch1_thresh_hi; /* (08) EMAC1 RX DMA channel */ -+ uint32 flowctl_ch1_alloc; /* (0C) EMAC1 RX DMA channel */ -+#define DMA_BUF_ALLOC_FORCE 0x80000000 -+ -+ // Flow control Ch3 -+ uint32 flowctl_ch3_thresh_lo; /* (10) EMAC2 RX DMA channel */ -+ uint32 flowctl_ch3_thresh_hi; /* (14) EMAC2 RX DMA channel */ -+ uint32 flowctl_ch3_alloc; /* (18) EMAC2 RX DMA channel */ -+ -+ // Unused words -+ uint32 resv[57]; -+ -+ // Per channel registers/state ram -+ DmaChannelCfg chcfg[IUDMA_MAX_CHANNELS]; /* (100) Channel configuration */ -+ union { -+ DmaStateRam s[IUDMA_MAX_CHANNELS]; -+ uint32 u32[4 * IUDMA_MAX_CHANNELS]; -+ } stram; /* (200) state ram */ -+} DmaRegs; -+ -+/* -+** DMA Buffer -+*/ -+typedef struct DmaDesc { -+ uint16 length; /* in bytes of data in buffer */ -+#define DMA_DESC_USEFPM 0x8000 -+#define DMA_DESC_MULTICAST 0x4000 -+#define DMA_DESC_BUFLENGTH 0x0fff -+ uint16 status; /* buffer status */ -+#define DMA_OWN 0x8000 /* cleared by DMA, set by SW */ -+#define DMA_EOP 0x4000 /* last buffer in packet */ -+#define DMA_SOP 0x2000 /* first buffer in packet */ -+#define DMA_WRAP 0x1000 /* */ -+#define DMA_APPEND_CRC 0x0100 -+ -+/* EMAC Descriptor Status definitions */ -+#define EMAC_MISS 0x0080 /* framed address recognition failed (promiscuous) */ -+#define EMAC_BRDCAST 0x0040 /* DA is Broadcast */ -+#define EMAC_MULT 0x0020 /* DA is multicast */ -+#define EMAC_LG 0x0010 /* frame length > RX_LENGTH register value */ -+#define EMAC_NO 0x0008 /* Non-Octet aligned */ -+#define EMAC_RXER 0x0004 /* RX_ERR on MII while RX_DV assereted */ -+#define EMAC_CRC_ERROR 0x0002 /* CRC error */ -+#define EMAC_OV 0x0001 /* Overflow */ -+ -+/* HDLC Descriptor Status definitions */ -+#define DMA_HDLC_TX_ABORT 0x0100 -+#define DMA_HDLC_RX_OVERRUN 0x4000 -+#define DMA_HDLC_RX_TOO_LONG 0x2000 -+#define DMA_HDLC_RX_CRC_OK 0x1000 -+#define DMA_HDLC_RX_ABORT 0x0100 -+ -+ uint32 address; /* address of data */ -+} DmaDesc; -+ -+/* -+** Sdram Controller -+*/ -+typedef struct SdramControllerRegs { -+ uint16 unused1; -+ uint16 initControl; /* 02 */ -+#define SD_POWER_DOWN 0x200 /* put sdram into power down */ -+#define SD_SELF_REFRESH 0x100 /* enable self refresh mode */ -+#define SD_SOFT_RESET 0x080 /* soft reset all sdram controller regs */ -+#define SD_EDO_SELECT 0x040 /* select EDO mode */ -+#define SD_EDO_WAIT_STATE 0x020 /* add an EDO wait state */ -+#define SD_8MEG 0x010 /* map sdram to 8 megs */ -+#define SD_MASTER_ENABLE 0x008 /* enable accesses to external sdram */ -+#define SD_MRS 0x004 /* generate a mode register select cycle */ -+#define SD_PRECHARGE 0x002 /* generate a precharge cycle */ -+#define SD_CBR 0x001 /* generate a refresh cycle */ -+ uint8 unused2[3]; -+ uint8 config; /* 07 */ -+#define SD_FAST_MEM 0x04 /* 1=CAS latency of 2, 0 = CAS latency of 3 */ -+#define SD_BURST_LEN 0x03 /* set burst length */ -+#define SD_BURST_FULL_PAGE 0x00 /* .. full page */ -+#define SD_BURST_8 0x01 /* .. 8 words */ -+#define SD_BURST_4 0x02 /* .. 4 words */ -+#define SD_BURST_2 0x03 /* .. 2 words */ -+ uint16 unused3; -+ uint16 refreshControl; /* 0a */ -+#define SD_REFRESH_ENABLE 0x8000 /* refresh enable */ -+#define SD_REFRESH_PERIOD 0x00ff /* refresh period (16 x n x clock_period) */ -+ -+ uint32 memoryBase; /* 0c */ -+#define SD_MEMBASE_MASK 0xffffe000 /* base address mask */ -+#define SD_MEMSIZE_8MEG 0x00000001 /* memory is 8 meg */ -+#define SD_MEMSIZE_2MEG 0x00000001 /* memory is 2 meg */ -+ -+} SdramControllerRegs; -+ -+/* -+** External Bus Interface -+*/ -+typedef struct EbiChipSelect { -+ uint32 base; /* base address in upper 24 bits */ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ uint32 config; -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_WREN 0x00000020 /* enable posted writes */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert something, -+ ** don't know what yet */ -+#define EBI_FIFO 0x00000200 /* .. use fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+} EbiChipSelect; -+ -+typedef struct MpiRegisters { -+ EbiChipSelect cs[1]; /* size chip select configuration */ -+} MpiRegisters; -+ -+#define MPI ((volatile MpiRegisters * const) MPI_BASE) -+ -+/* -+** EMAC transmit MIB counters -+*/ -+typedef struct EmacTxMib { -+ uint32 tx_good_octets; /* (200) good byte count */ -+ uint32 tx_good_pkts; /* (204) good pkt count */ -+ uint32 tx_octets; /* (208) good and bad byte count */ -+ uint32 tx_pkts; /* (20c) good and bad pkt count */ -+ uint32 tx_broadcasts_pkts; /* (210) good broadcast packets */ -+ uint32 tx_multicasts_pkts; /* (214) good mulitcast packets */ -+ uint32 tx_len_64; /* (218) RMON tx pkt size buckets */ -+ uint32 tx_len_65_to_127; /* (21c) */ -+ uint32 tx_len_128_to_255; /* (220) */ -+ uint32 tx_len_256_to_511; /* (224) */ -+ uint32 tx_len_512_to_1023; /* (228) */ -+ uint32 tx_len_1024_to_max; /* (22c) */ -+ uint32 tx_jabber_pkts; /* (230) > 1518 with bad crc */ -+ uint32 tx_oversize_pkts; /* (234) > 1518 with good crc */ -+ uint32 tx_fragment_pkts; /* (238) < 63 with bad crc */ -+ uint32 tx_underruns; /* (23c) fifo underrun */ -+ uint32 tx_total_cols; /* (240) total collisions in all tx pkts */ -+ uint32 tx_single_cols; /* (244) tx pkts with single collisions */ -+ uint32 tx_multiple_cols; /* (248) tx pkts with multiple collisions */ -+ uint32 tx_excessive_cols; /* (24c) tx pkts with excessive cols */ -+ uint32 tx_late_cols; /* (250) tx pkts with late cols */ -+ uint32 tx_defered; /* (254) tx pkts deferred */ -+ uint32 tx_carrier_lost; /* (258) tx pkts with CRS lost */ -+ uint32 tx_pause_pkts; /* (25c) tx pause pkts sent */ -+#define NumEmacTxMibVars 24 -+} EmacTxMib; -+ -+/* -+** EMAC receive MIB counters -+*/ -+typedef struct EmacRxMib { -+ uint32 rx_good_octets; /* (280) good byte count */ -+ uint32 rx_good_pkts; /* (284) good pkt count */ -+ uint32 rx_octets; /* (288) good and bad byte count */ -+ uint32 rx_pkts; /* (28c) good and bad pkt count */ -+ uint32 rx_broadcasts_pkts; /* (290) good broadcast packets */ -+ uint32 rx_multicasts_pkts; /* (294) good mulitcast packets */ -+ uint32 rx_len_64; /* (298) RMON rx pkt size buckets */ -+ uint32 rx_len_65_to_127; /* (29c) */ -+ uint32 rx_len_128_to_255; /* (2a0) */ -+ uint32 rx_len_256_to_511; /* (2a4) */ -+ uint32 rx_len_512_to_1023; /* (2a8) */ -+ uint32 rx_len_1024_to_max; /* (2ac) */ -+ uint32 rx_jabber_pkts; /* (2b0) > 1518 with bad crc */ -+ uint32 rx_oversize_pkts; /* (2b4) > 1518 with good crc */ -+ uint32 rx_fragment_pkts; /* (2b8) < 63 with bad crc */ -+ uint32 rx_missed_pkts; /* (2bc) missed packets */ -+ uint32 rx_crc_align_errs; /* (2c0) both or either */ -+ uint32 rx_undersize; /* (2c4) < 63 with good crc */ -+ uint32 rx_crc_errs; /* (2c8) crc errors (only) */ -+ uint32 rx_align_errs; /* (2cc) alignment errors (only) */ -+ uint32 rx_symbol_errs; /* (2d0) pkts with RXERR assertions (symbol errs) */ -+ uint32 rx_pause_pkts; /* (2d4) MAC control, PAUSE */ -+ uint32 rx_nonpause_pkts; /* (2d8) MAC control, not PAUSE */ -+#define NumEmacRxMibVars 23 -+} EmacRxMib; -+ -+typedef struct EmacRegisters { -+ uint32 rxControl; /* (00) receive control */ -+#define EMAC_PM_REJ 0x80 /* - reject DA match in PMx regs */ -+#define EMAC_UNIFLOW 0x40 /* - accept cam match fc */ -+#define EMAC_FC_EN 0x20 /* - enable flow control */ -+#define EMAC_LOOPBACK 0x10 /* - loopback */ -+#define EMAC_PROM 0x08 /* - promiscuous */ -+#define EMAC_RDT 0x04 /* - ignore transmissions */ -+#define EMAC_ALL_MCAST 0x02 /* - ignore transmissions */ -+#define EMAC_NO_BCAST 0x01 /* - ignore transmissions */ -+ -+ -+ uint32 rxMaxLength; /* (04) receive max length */ -+ uint32 txMaxLength; /* (08) transmit max length */ -+ uint32 unused1[1]; -+ uint32 mdioFreq; /* (10) mdio frequency */ -+#define EMAC_MII_PRE_EN 0x00000080 /* prepend preamble sequence */ -+#define EMAC_MDIO_PRE 0x00000080 /* - enable MDIO preamble */ -+#define EMAC_MDC_FREQ 0x0000007f /* - mdio frequency */ -+ -+ uint32 mdioData; /* (14) mdio data */ -+#define MDIO_WR 0x50020000 /* - write framing */ -+#define MDIO_RD 0x60020000 /* - read framing */ -+#define MDIO_PMD_SHIFT 23 -+#define MDIO_REG_SHIFT 18 -+ -+ uint32 intMask; /* (18) int mask */ -+ uint32 intStatus; /* (1c) int status */ -+#define EMAC_FLOW_INT 0x04 /* - flow control event */ -+#define EMAC_MIB_INT 0x02 /* - mib event */ -+#define EMAC_MDIO_INT 0x01 /* - mdio event */ -+ -+ uint32 unused2[3]; -+ uint32 config; /* (2c) config */ -+#define EMAC_ENABLE 0x001 /* - enable emac */ -+#define EMAC_DISABLE 0x002 /* - disable emac */ -+#define EMAC_SOFT_RST 0x004 /* - soft reset */ -+#define EMAC_SOFT_RESET 0x004 /* - emac soft reset */ -+#define EMAC_EXT_PHY 0x008 /* - external PHY select */ -+ -+ uint32 txControl; /* (30) transmit control */ -+#define EMAC_FD 0x001 /* - full duplex */ -+#define EMAC_FLOWMODE 0x002 /* - flow mode */ -+#define EMAC_NOBKOFF 0x004 /* - no backoff in */ -+#define EMAC_SMALLSLT 0x008 /* - small slot time */ -+ -+ uint32 txThreshold; /* (34) transmit threshold */ -+ uint32 mibControl; /* (38) mib control */ -+#define EMAC_NO_CLEAR 0x001 /* don't clear on read */ -+ -+ uint32 unused3[7]; -+ -+ uint32 pm0DataLo; /* (58) perfect match 0 data lo */ -+ uint32 pm0DataHi; /* (5C) perfect match 0 data hi (15:0) */ -+ uint32 pm1DataLo; /* (60) perfect match 1 data lo */ -+ uint32 pm1DataHi; /* (64) perfect match 1 data hi (15:0) */ -+ uint32 pm2DataLo; /* (68) perfect match 2 data lo */ -+ uint32 pm2DataHi; /* (6C) perfect match 2 data hi (15:0) */ -+ uint32 pm3DataLo; /* (70) perfect match 3 data lo */ -+ uint32 pm3DataHi; /* (74) perfect match 3 data hi (15:0) */ -+#define EMAC_CAM_V 0x10000 /* - cam index */ -+#define EMAC_CAM_VALID 0x00010000 -+ -+ uint32 unused4[98]; /* (78-1fc) */ -+ -+ EmacTxMib tx_mib; /* (200) emac tx mib */ -+ uint32 unused5[8]; /* (260-27c) */ -+ -+ EmacRxMib rx_mib; /* (280) rx mib */ -+ -+} EmacRegisters; -+ -+/* register offsets for subrouting access */ -+#define EMAC_RX_CONTROL 0x00 -+#define EMAC_RX_MAX_LENGTH 0x04 -+#define EMAC_TX_MAC_LENGTH 0x08 -+#define EMAC_MDIO_FREQ 0x10 -+#define EMAC_MDIO_DATA 0x14 -+#define EMAC_INT_MASK 0x18 -+#define EMAC_INT_STATUS 0x1C -+#define EMAC_CAM_DATA_LO 0x20 -+#define EMAC_CAM_DATA_HI 0x24 -+#define EMAC_CAM_CONTROL 0x28 -+#define EMAC_CONTROL 0x2C -+#define EMAC_TX_CONTROL 0x30 -+#define EMAC_TX_THRESHOLD 0x34 -+#define EMAC_MIB_CONTROL 0x38 -+ -+ -+#define EMAC1 ((volatile EmacRegisters * const) EMAC1_BASE) -+ -+/* -+** USB Registers -+*/ -+typedef struct UsbRegisters { -+ byte inttf_setting; -+ byte current_config; -+ uint16 status_frameNum; -+#define USB_LINK 0x2000 -+#define USB_BUS_RESET 0x1000 -+#define USB_SUSPENDED 0x0800 -+ byte unused1; -+ byte endpt_prnt; -+ byte endpt_dirn; -+ byte endpt_status; -+#define USB_ENDPOINT_0 0x01 -+#define USB_ENDPOINT_1 0x02 -+#define USB_ENDPOINT_2 0x04 -+#define USB_ENDPOINT_3 0x08 -+#define USB_ENDPOINT_4 0x10 -+#define USB_ENDPOINT_5 0x20 -+#define USB_ENDPOINT_6 0x40 -+#define USB_ENDPOINT_7 0x80 -+ uint32 unused2; -+ byte conf_mem_ctl; -+#define USB_CONF_MEM_RD 0x80 -+#define USB_CONF_MEM_RDY 0x40 -+ byte unused2a; -+ byte conf_mem_read_address; -+ byte conf_mem_write_address; -+ -+ byte unused3; -+ byte dev_req_bytesel; -+ uint16 ext_dev_data; -+ -+ byte unused4; -+ byte clr_fifo; -+ byte endpt_stall_reset; // use same endpoint #'s from above -+ byte usb_cntl; -+#define USB_FORCE_ERR 0x20 -+#define USB_SOFT_RESET 0x10 -+#define USB_RESUME 0x08 -+#define USB_COMMAND_ERR 0x04 -+#define USB_COMMAND_OVER 0x02 -+ byte irq_addr; -+ byte iso_out_in_addr; -+ byte blk_out_in_addr; -+ byte cntl_addr; -+ uint32 unusedx[2]; -+ uint32 tx_ram_write_port; -+ uint32 fifo_status; // (see bcm6338 data sheet for definition) -+ -+ uint32 irq_status; -+ uint32 irq_mask; -+#define USB_NEW_CONFIG 0x00000001 -+#define USB_SETUP_COMMAND_RECV 0x00000002 // non-standard setup cmd rcvd -+#define USB_OUT_FIFO_OV 0x00000004 -+#define USB_RESET_RECV 0x00000008 -+#define USB_SUSPEND_RECV 0x00000010 -+#define USB_FIFO_REWIND 0x00000020 -+#define USB_RX_BULK_FIFO_DATA_AVAIL 0x00000040 -+#define USB_RX_ISO_FIFO_DATA_AVAIL 0x00000080 -+#define USB_LINK_CHANGE 0x00010000 -+ uint32 endpt_cntl; -+#define USB_R_WK_EN 0x0100 -+#define USB_TX_EOP 0x0200 -+#define USB_TX_CNTL_DMA_EN 0x0400 -+#define USB_TX_BULK_DMA_EN 0x0800 -+#define USB_TX_ISO_DMA_EN 0x1000 -+#define USB_RX_CNTL_DMA_EN 0x2000 -+#define USB_RX_BULK_DMA_EN 0x4800 -+#define USB_RX_ISO_DMA_EN 0x8000 -+ uint32 rx_status_read_port; -+ uint32 confmem_read_port; -+ uint32 confmem_write_port; -+ uint32 fifo_ovf_count; -+ uint32 fifo_rewind_cnt; -+ uint32 terminal_count; -+} UsbRegisters; -+ -+#define USB ((volatile UsbRegisters * const) USB_CTL_BASE) -+ -+/* -+** ADSL core Registers -+*/ -+ -+#define _PADLINE(line) pad ## line -+#define _XSTR(line) _PADLINE(line) -+#define PAD _XSTR(__LINE__) -+ -+typedef struct AdslRegisters { -+ uint32 core_control; -+#define ADSL_RESET 0x01 -+ -+ uint32 core_status; -+#define ADSL_HOST_MSG 0x01 -+ -+ uint32 PAD; -+ uint32 bist_status; -+ uint32 PAD[4]; -+ uint32 int_status_i; /* 0x20 */ -+ uint32 int_mask_i; -+ uint32 int_status_f; -+ uint32 int_mask_f; -+#define ADSL_INT_HOST_MSG 0x00000020 -+#define ADSL_INT_DESC_ERR 0x00000400 -+#define ADSL_INT_DATA_ERR 0x00000800 -+#define ADSL_INT_DESC_PROTO_ERR 0x00001000 -+#define ADSL_INT_RCV_DESC_UF 0x00002000 -+#define ADSL_INT_RCV_FIFO_OF 0x00004000 -+#define ADSL_INT_XMT_FIFO_UF 0x00008000 -+#define ADSL_INT_RCV 0x00010000 -+#define ADSL_INT_XMT 0x01000000 -+ -+ uint32 PAD[116]; -+ -+ uint32 xmtcontrol_intr; /* 0x200 */ -+#define ADSL_DMA_XMT_EN 0x00000001 -+#define ADSL_DMA_XMT_LE 0x00000004 -+ uint32 xmtaddr_intr; -+#define ADSL_DMA_ADDR_MASK 0xFFFFF000 -+ uint32 xmtptr_intr; -+#define ADSL_DMA_LAST_DESC_MASK 0x00000FFF -+ uint32 xmtstatus_intr; -+#define ADSL_DMA_CURR_DESC_MASK 0x00000FFF -+#define ADSL_DMA_XMT_STATE_MASK 0x0000F000 -+#define ADSL_DMA_XMT_STATE_DIS 0x00000000 -+#define ADSL_DMA_XMT_STATE_ACT 0x00001000 -+#define ADSL_DMA_XMT_STATE_IDLE 0x00002000 -+#define ADSL_DMA_XMT_STATE_STOP 0x00003000 -+ -+#define ADSL_DMA_XMT_ERR_MASK 0x000F0000 -+#define ADSL_DMA_XMT_ERR_NONE 0x00000000 -+#define ADSL_DMA_XMT_ERR_DPE 0x00010000 -+#define ADSL_DMA_XMT_ERR_FIFO 0x00020000 -+#define ADSL_DMA_XMT_ERR_DTE 0x00030000 -+#define ADSL_DMA_XMT_ERR_DRE 0x00040000 -+ -+ uint32 rcvcontrol_intr; -+#define ADSL_DMA_RCV_EN 0x00000001 -+#define ADSL_DMA_RCV_FO 0x000000FE -+ uint32 rcvaddr_intr; -+ uint32 rcvptr_intr; -+ uint32 rcvstatus_intr; -+#define ADSL_DMA_RCV_STATE_MASK 0x0000F000 -+#define ADSL_DMA_RCV_STATE_DIS 0x00000000 -+#define ADSL_DMA_RCV_STATE_ACT 0x00001000 -+#define ADSL_DMA_RCV_STATE_IDLE 0x00002000 -+#define ADSL_DMA_RCV_STATE_STOP 0x00003000 -+ -+#define ADSL_DMA_RCV_ERR_MASK 0x000F0000 -+#define ADSL_DMA_RCV_ERR_NONE 0x00000000 -+#define ADSL_DMA_RCV_ERR_DPE 0x00010000 -+#define ADSL_DMA_RCV_ERR_FIFO 0x00020000 -+#define ADSL_DMA_RCV_ERR_DTE 0x00030000 -+#define ADSL_DMA_RCV_ERR_DRE 0x00040000 -+ -+ uint32 xmtcontrol_fast; -+ uint32 xmtaddr_fast; -+ uint32 xmtptr_fast; -+ uint32 xmtstatus_fast; -+ uint32 rcvcontrol_fast; -+ uint32 rcvaddr_fast; -+ uint32 rcvptr_fast; -+ uint32 rcvstatus_fast; -+ uint32 PAD[48]; -+ -+ uint32 host_message; /* 0x300 */ -+ uint32 PAD[805]; -+ uint32 core_reset; -+ uint32 core_error; -+ uint32 core_revision; -+ -+#define ADSL_CORE_REV 0x0000000F -+#define ADSL_CORE_TYPE 0x0000FFF0 -+} AdslRegisters; -+ -+#define ADSL ((volatile AdslRegisters * const) ADSL_BASE) -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6345_common.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6345_common.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6345_common.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6345_common.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,275 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: 6345_common.h */ -+/* DATE: 96/12/19 */ -+/* PURPOSE: Define addresses of major hardware components of */ -+/* BCM6345 */ -+/* */ -+/***********************************************************************/ -+#ifndef __BCM6345_MAP_COMMON_H -+#define __BCM6345_MAP_COMMON_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+/* matches isb_decoder.v */ -+#define INTC_BASE 0xfffe0000 /* interrupts controller registers */ -+#define BB_BASE 0xfffe0100 /* bus bridge registers */ -+#define TIMR_BASE 0xfffe0200 /* timer registers */ -+#define UART_BASE 0xfffe0300 /* uart registers */ -+#define GPIO_BASE 0xfffe0400 /* gpio registers */ -+#define EMAC_BASE 0xfffe1800 /* EMAC control registers */ -+#define EBIC_BASE 0xfffe2000 /* EBI control registers */ -+#define PCMCIA_BASE 0xfffe2028 /* PCMCIA control registers */ -+#define USB_BASE 0xfffe2100 /* USB controll registers */ -+#define SDRAM_BASE 0xfffe2300 /* SDRAM control registers */ -+#define DMA_BASE 0xfffe2800 /* DMA control registers */ -+ -+/* DMA channel assignments */ -+#define EMAC_RX_CHAN 1 -+#define EMAC_TX_CHAN 2 -+#define EBI_RX_CHAN 5 -+#define EBI_TX_CHAN 6 -+#define RESERVED_RX_CHAN 9 -+#define RESERVED_TX_CHAN 10 -+#define USB_BULK_RX_CHAN 13 -+#define USB_BULK_TX_CHAN 14 -+#define USB_ISO_RX_CHAN 15 -+#define USB_ISO_TX_CHAN 16 -+#define USB_CNTL_RX_CHAN 17 -+#define USB_CNTL_TX_CHAN 18 -+ -+/* -+#-----------------------------------------------------------------------* -+# * -+#************************************************************************ -+*/ -+#define SDR_INIT_CTL 0x00 -+ /* Control Bits */ -+#define SDR_9BIT_COL (1<<11) -+#define SDR_32BIT (1<<10) -+#define SDR_PWR_DN (1<<9) -+#define SDR_SELF_REF (1<<8) -+#define SDR_SOFT_RST (1<<7) -+#define SDR_64x32 (3<<4) -+#define SDR_128MEG (2<<4) -+#define SDR_64MEG (1<<4) -+#define SDR_16MEG (0<<4) -+#define SDR_ENABLE (1<<3) -+#define SDR_MRS_CMD (1<<2) -+#define SDR_PRE_CMD (1<<1) -+#define SDR_CBR_CMD (1<<0) -+ -+#define SDR_CFG_REG 0x04 -+ /* Control Bits */ -+#define SDR_FULL_PG 0x00 -+#define SDR_BURST8 0x01 -+#define SDR_BURST4 0x02 -+#define SDR_BURST2 0x03 -+#define SDR_FAST_MEM (1<<2) -+#define SDR_SLOW_MEM 0x00 -+ -+#define SDR_REF_CTL 0x08 -+ /* Control Bits */ -+#define SDR_REF_EN (1<<15) -+ -+#define SDR_MEM_BASE 0x0c -+ /* Control Bits */ -+#define DRAM2MBSPC 0x00000000 -+#define DRAM8MBSPC 0x00000001 -+#define DRAM16MBSPC 0x00000002 -+#define DRAM32MBSPC 0x00000003 -+#define DRAM64MBSPC 0x00000004 -+ -+#define DRAM2MEG 0x00000000 /* See SDRAM config */ -+#define DRAM8MEG 0x00000001 /* See SDRAM config */ -+#define DRAM16MEG 0x00000002 /* See SDRAM config */ -+#define DRAM32MEG 0x00000003 /* See SDRAM config */ -+#define DRAM64MEG 0x00000004 /* See SDRAM config */ -+ -+/* -+#-----------------------------------------------------------------------* -+# * -+#************************************************************************ -+*/ -+#define CS0BASE 0x00 -+#define CS0CNTL 0x04 -+#define CS1BASE 0x08 -+#define CS1CNTL 0x0c -+#define CS2BASE 0x10 -+#define CS2CNTL 0x14 -+#define CS3BASE 0x18 -+#define CS3CNTL 0x1c -+#define CS4BASE 0x20 -+#define CS4CNTL 0x24 -+#define CS5BASE 0x28 -+#define CS5CNTL 0x2c -+#define CS6BASE 0x30 -+#define CS6CNTL 0x34 -+#define CS7BASE 0x38 -+#define CS7CNTL 0x3c -+#define EBICONFIG 0x40 -+ -+/* -+# CSxBASE settings -+# Size in low 4 bits -+# Base Address for match in upper 24 bits -+*/ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ -+/* CSxCNTL settings */ -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define ZEROWT 0x00000000 /* .. 0 WS */ -+#define ONEWT 0x00000002 /* .. 1 WS */ -+#define TWOWT 0x00000004 /* .. 2 WS */ -+#define THREEWT 0x00000006 /* .. 3 WS */ -+#define FOURWT 0x00000008 /* .. 4 WS */ -+#define FIVEWT 0x0000000a /* .. 5 WS */ -+#define SIXWT 0x0000000c /* .. 6 WS */ -+#define SEVENWT 0x0000000e /* .. 7 WS */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert chip select polarity */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. enable fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+ -+/* EBICONFIG settings */ -+#define EBI_MASTER_ENABLE 0x80000000 /* allow external masters */ -+#define EBI_EXT_MAST_PRIO 0x40000000 /* maximize ext master priority */ -+#define EBI_CTRL_ENABLE 0x20000000 -+#define EBI_TA_ENABLE 0x10000000 -+ -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+#define XMITBREAK 0x40 -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define BAUD115200 0x0a -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+#define TX4 0x40 -+#define RX4 0x04 -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+#define DELTAIP 0x0001 -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+#define RXIRQS 0x7fc0 -+#define TXIRQS 0x003e -+ -+#define CPU_CLK_EN 0x0001 -+#define UART_CLK_EN 0x0008 -+ -+#define BLKEN 06 -+ -+#define FMSEL_MASK 0xf0000000 // 31:28 -+#define FMSEL_SHFT 28 -+#define FM_HI_GEAR 0x08000000 // 27 -+#define FMCLKSEL 0x04000000 // 26 -+#define FMDIV_MASK 0x03000000 // 25:24 -+#define FMDIV_SHFT 24 -+#define FBDIV_MASK 0x00f00000 // 23:20 -+#define FBDIV_SHFT 20 -+#define FB_SEL 0x00010000 // 16 -+#define FU2SEL_MASK 0x0000f000 // 15:12 -+#define FU2SEL_SHFT 12 -+#define FU1SEL_MASK 0x00000f00 // 11:8 -+#define FU1SEL_SHFT 8 -+#define FU1PRS_MASK 0x000000e0 // 7:5 -+#define FU1PRS_SHFT 5 -+#define FU1POS_MASK 0x00000018 // 4:3 -+#define FU1POS_SHFT 3 -+#define SOFT_RESET 0x00000001 -+ -+#define FMSEL 0x08 -+ -+#define UART0CONTROL 0x01 -+#define UART0CONFIG 0x02 -+#define UART0RXTIMEOUT 0x03 -+#define UART0BAUD 0x04 -+#define UART0FIFOCFG 0x0a -+#define UART0INTMASK 0x10 -+#define UART0INTSTAT 0x12 -+#define UART0DATA 0x17 -+ -+#define GPIOTBUSSEL 0x03 -+#define GPIODIR 0x06 -+#define GPIOLED 0x09 -+#define GPIOIO 0x0a -+#define GPIOUARTCTL 0x0c -+ -+/*Defines below show which bit enables which UART signals */ -+#define RI1_EN 0x0001 -+#define CTS1_EN 0x0002 -+#define DCD1_EN 0x0004 -+#define DSR1_EN 0x0008 -+#define DTR1_EN 0x0010 -+#define RTS1_EN 0x0020 -+#define DO1_EN 0x0040 -+#define DI1_EN 0x0080 -+#define RI0_EN 0x0100 -+#define CTS0_EN 0x0200 -+#define DCD0_EN 0x0400 -+#define DSR0_EN 0x0800 -+#define DTR0_EN 0x1000 -+#define RTS0_EN 0x2000 -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6345_map.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6345_map.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6345_map.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6345_map.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,939 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: 6345_map.h */ -+/* DATE: 96/12/19 */ -+/* PURPOSE: Define addresses of major hardware components of */ -+/* BCM6345 */ -+/* */ -+/***********************************************************************/ -+#ifndef __BCM6345_MAP_H -+#define __BCM6345_MAP_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#include "bcmtypes.h" -+#include "6345_common.h" -+#include "6345_intr.h" -+ -+/* macro to convert logical data addresses to physical */ -+/* DMA hardware must see physical address */ -+#define LtoP( x ) ( (uint32)x & 0x1fffffff ) -+#define PtoL( x ) ( LtoP(x) | 0xa0000000 ) -+ -+/* -+** Interrupt Controller -+*/ -+typedef struct IntControl { -+ uint32 RevID; /* (00) */ -+ uint16 testControl; /* (04) */ -+ uint16 blkEnables; /* (06) */ -+ -+#define USB_CLK_EN 0x0100 -+#define EMAC_CLK_EN 0x0080 -+#define ADSL_CLK_EN 0x0010 -+#define UART_CLK_EN 0x0008 -+#define EBI_CLK_EN 0x0004 -+#define BUS_CLK_EN 0x0002 -+#define CPU_CLK_EN 0x0001 -+ -+ uint32 pll_control; /* (08) */ -+#define FMSEL_MASK 0xf0000000 // 31:28 -+#define FMSEL_SHFT 28 -+#define FM_HI_GEAR 0x08000000 // 27 -+#define FMCLKSEL 0x04000000 // 26 -+#define FMDIV_MASK 0x03000000 // 25:24 -+#define FMDIV_SHFT 24 -+#define FBDIV_MASK 0x00f00000 // 23:20 -+#define FBDIV_SHFT 20 -+#define FB_SEL 0x00010000 // 16 -+#define FU2SEL_MASK 0x0000f000 // 15:12 -+#define FU2SEL_SHFT 12 -+#define FU1SEL_MASK 0x00000f00 // 11:8 -+#define FU1SEL_SHFT 8 -+#define FU1PRS_MASK 0x000000e0 // 7:5 -+#define FU1PRS_SHFT 5 -+#define FU1POS_MASK 0x00000018 // 4:3 -+#define FU1POS_SHFT 3 -+#define SOFT_RESET 0x00000001 -+ -+ uint32 IrqMask; /* (0c) */ -+ uint32 IrqStatus; /* (10) */ -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 4 -+#define EI_CLEAR_SHFT 8 -+#define EI_MASK_SHFT 12 -+#define EI_INSENS_SHFT 16 -+#define EI_LEVEL_SHFT 20 -+} IntControl; -+ -+#define PERF ((volatile IntControl * const) INTC_BASE) -+ -+/* -+** Bus Bridge Registers -+*/ -+typedef struct BusBridge { -+ uint16 status; -+#define BB_BUSY 0x8000 /* posted operation in progress */ -+#define BB_RD_PND 0x4000 /* read pending */ -+#define BB_RD_CMPLT 0x2000 /* read complete */ -+#define BB_ERROR 0x1000 /* posted write error */ -+#define BB_TEA 0x0800 /* transfer aborted */ -+ uint16 abortTimeoutCnt; /* abort timeout value */ -+ -+ byte writePostEnable; -+#define BB_POST_TIMR_EN 0x08 /* post writes to timer regs */ -+#define BB_POST_GPIO_EN 0x04 /* post writes to gpio regs */ -+#define BB_POST_INTC_EN 0x02 /* post writes to interrupt controller regs */ -+#define BB_POST_UART_EN 0x01 /* post writes to uart regs */ -+ byte unused1[5]; -+ uint16 postAddr; /* posted read address (lower half) */ -+ byte unused2[3]; -+ byte postData; /* posted read data */ -+} BusBridge; -+ -+/* register offsets (needed for EBI master access) */ -+#define BB_STATUS 0 -+#define BB_ABORT_TO_CNT 2 -+#define BB_WR_POST_EN 4 -+#define BB_RD_POST_ADDR 10 -+#define BB_RD_POST_DATA 12 -+ -+#define BRIDGE *bridge ((volatile BusBridge * const) BB_BASE) -+ -+/* -+** Timer -+*/ -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+ -+/* -+** UART -+*/ -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+ byte config; -+#define XMITBREAK 0x40 -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ /* 4-LSBS represent STOP bits/char -+ * in 1/8 bit-time intervals. Zero -+ * represents 1/8 stop bit interval. -+ * Fifteen represents 2 stop bits. -+ */ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ /* 5-bit TimeoutCnt is in low bits of this register. -+ * This count represents the number of characters -+ * idle times before setting receive Irq when below threshold -+ */ -+ uint32 baudword; -+ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate -+ */ -+ -+ byte txf_levl; /* Read-only fifo depth */ -+ byte rxf_levl; /* Read-only fifo depth */ -+ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are -+ * RxThreshold. Irq can be asserted -+ * when rx fifo> thresh, txfifo<thresh -+ */ -+ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) -+ * if these bits are also enabled to GPIO_o -+ */ -+#define DTREN 0x01 -+#define RTSEN 0x02 -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to -+ * detect irq on rising AND falling -+ * edges for corresponding GPIO_i -+ * if enabled (edge insensitive) -+ */ -+ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense -+ * 0 for negedge sense if -+ * not configured for edge -+ * insensitive (see above) -+ * Lower 4 bits: Mask to enable change -+ * detection IRQ for corresponding -+ * GPIO_i -+ */ -+ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits -+ * have changed (may set IRQ). -+ * read automatically clears bit -+ * Lower 4 bits are actual status -+ */ -+ -+ uint16 intMask; /* Same Bit defs for Mask and status */ -+ uint16 intStatus; -+#define DELTAIP 0x0001 -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; /* Write to TX, Read from RX */ -+ /* bits 11:8 are BRK,PAR,FRM errors */ -+ -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART ((volatile Uart * const) UART_BASE) -+ -+/* -+** Gpio Controller -+*/ -+typedef struct GpioControl { -+ uint16 unused0; -+ byte unused1; -+ byte TBusSel; -+ -+ /* High in bit location enables output */ -+ uint16 unused2; -+ uint16 GPIODir; -+ byte unused3; -+ byte Leds; //Only bits [3:0] -+ uint16 GPIOio; -+ -+ /* Defines below show which bit enables which UART signals */ -+ uint32 UartCtl; -+#define RI1_EN 0x0001 -+#define CTS1_EN 0x0002 -+#define DCD1_EN 0x0004 -+#define DSR1_EN 0x0008 -+#define DTR1_EN 0x0010 -+#define RTS1_EN 0x0020 -+#define DO1_EN 0x0040 -+#define DI1_EN 0x0080 -+#define RI0_EN 0x0100 -+#define CTS0_EN 0x0200 -+#define DCD0_EN 0x0400 -+#define DSR0_EN 0x0800 -+#define DTR0_EN 0x1000 -+#define RTS0_EN 0x2000 -+ -+ /********************************************************************* -+ * Multiple Use Muxed GPIO -+ * ----------------------- -+ * -+ * ------ -+ * GPIO_A -+ * ------ -+ * -+ * GPIO[0] -> RI1 I Controlled by UartCtl[0] ELSE 0 -+ * GPIO[0] -> DMATC_i I Always -+ * GPIO[0] -> DMATC_o O Controlled by dma_enable_n|dma_drive_n -+ * GPIO[0] -> ebi_bsize[0] I Always -+ * -+ * GPIO[1] -> CTS1 I Controlled by UartCtl[1] ELSE 0 -+ * GPIO[1] -> DMAACK1 (18) O Controlled by dma_enable_n -+ * GPIO[1] -> ebi_bg_b O Controlled by ebi_master_n -+ * -+ * GPIO[2] -> DCD1 I Controlled by UartCtl[2] ELSE 0 -+ * GPIO[2] -> ebi_bsize[1] I Always -+ * -+ * GPIO[3] -> DSR1 I Controlled by UartCtl[3] ELSE 0 -+ * GPIO[3] -> INT2 I Always -+ * GPIO[3] -> ebi_bsize[2] I Always -+ * -+ * GPIO[4] -> DTR1 O Controlled by UartCtl[4]&GpioDir[4] -+ * GPIO[4] -> INT3 I Always -+ * GPIO[4] -> ebi_burst I Always -+ * -+ * GPIO[5] -> RTS1 O Controlled by UartCtl[5]&GpioDir[5] -+ * GPIO[5] -> DMAACK0 (17) O Controlled by dma_enable_n -+ * GPIO[5] -> ebi_tsize I Always -+ * -+ * GPIO[6] -> sDout1 O Controlled by UartCtl[6]&GpioDir[6] -+ * GPIO[6] -> DMARQ1 (18) I Always -+ * GPIO[6] -> ebi_bb_i I Always -+ * GPIO[6] -> ebi_bb_o O Controlled by ebi_master_n|ebi_bb_oen -+ * -+ * GPIO[7] -> sDin1 I Controlled by UartCtl[7] ELSE 0 -+ * GPIO[7] -> ebi_br_b I Always -+ * GPIO[7] -> DMARQ0 (17) I Always -+ * -+ * ------ -+ * GPIO_B -+ * ------ -+ * -+ * GPIO[8] -> RI0 I Controlled by UartCtl[8] ELSE 0 -+ * GPIO[8] -> ebi_cs_b[6] O Controlled by ebi_cs_en[6] -+ * -+ * GPIO[9] -> CTS0 I Controlled by UartCtl[9] ELSE 0 -+ * -+ * GPIO[a] -> DCD0 I Controlled by UartCtl[a] ELSE 0 -+ * GPIO[a] -> ebi_cs_b[7] O Controlled by ebi_cs_en[7] -+ * -+ * GPIO[b] -> DSR0 I Controlled by UartCtl[b] ELSE 0 -+ * GPIO[b] -> ebi_int_cs_b I Always -+ * -+ * GPIO[c] -> DTR0 O Controlled by UartCtl[c]&GpioDir[c] -+ * -+ * GPIO[d] -> RTS0 O Controlled by UartCtl[d]&&GpioDir[d] -+ * -+ * GPIO[e] -> INT0 I Always -+ * -+ * GPIO[f] -> INT1 I Always -+ * -+ * sDout0 -> (bist_en[15]) ? pll_clk48:sDout0_int -+ * -+ *********************************************************************/ -+ -+} GpioControl; -+ -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+#define GPIO_NUM_MAX_BITS_MASK 0x0f -+#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) -+ -+/* -+** DMA Channel (1 .. 20) -+*/ -+typedef struct DmaChannel { -+ uint32 cfg; /* (00) assorted configuration */ -+#define DMA_FLOWC_EN 0x00000010 /* flow control enable */ -+#define DMA_WRAP_EN 0x00000008 /* use DMA_WRAP bit */ -+#define DMA_CHAINING 0x00000004 /* chaining mode */ -+#define DMA_STALL 0x00000002 -+#define DMA_ENABLE 0x00000001 /* set to enable channel */ -+ uint32 maxBurst; /* (04) max burst length permitted */ -+ /* non-chaining / chaining */ -+ uint32 startAddr; /* (08) source addr / ring start address */ -+ uint32 length; /* (0c) xfer len / ring len */ -+#define DMA_KICKOFF 0x80000000 /* start non-chaining xfer */ -+ -+ uint32 bufStat; /* (10) buffer status for non-chaining */ -+ uint32 intStat; /* (14) interrupts control and status */ -+ uint32 intMask; /* (18) interrupts mask */ -+#define DMA_BUFF_DONE 0x00000001 /* buffer done */ -+#define DMA_DONE 0x00000002 /* packet xfer complete */ -+#define DMA_NO_DESC 0x00000004 /* no valid descriptors */ -+ -+// DMA HW bits are clugy in this version of chip (mask/status shifted) -+#define DMA_BUFF_DONE_MASK 0x00000004 /* buffer done */ -+#define DMA_DONE_MASK 0x00000001 /* packet xfer complete */ -+#define DMA_NO_DESC_MASK 0x00000002 /* no valid descriptors */ -+ -+ uint32 fcThreshold; /* (1c) flow control threshold */ -+ uint32 numAlloc; /* */ -+ uint32 unused[7]; /* (20-3c) pad to next descriptor */ -+} DmaChannel; -+/* register offsets, useful for ebi master access */ -+#define DMA_CFG 0 -+#define DMA_MAX_BURST 4 -+#define DMA_START_ADDR 8 -+#define DMA_LENGTH 12 -+#define DMA_BUF_STAT 16 -+#define DMA_INT_STAT 20 -+#define DMA_FC_THRESHOLD 24 -+#define DMA_NUM_ALLOC 28 -+ -+ -+/* paste in your program ... -+DmaChannel *dmaChannels = (DmaChannel *)DMA_BASE; -+DmaChannel *dma1 = dmaChannels[1]; -+*/ -+ -+ -+/* -+** DMA Buffer -+*/ -+typedef struct DmaDesc { -+ uint16 length; /* in bytes of data in buffer */ -+ uint16 status; /* buffer status */ -+#define DMA_OWN 0x8000 /* cleared by DMA, set by SW */ -+#define DMA_EOP 0x0800 /* last buffer in packet */ -+#define DMA_SOP 0x0400 /* first buffer in packet */ -+#define DMA_WRAP 0x0200 /* */ -+#define DMA_APPEND_CRC 0x0100 /* .. for emac tx */ -+#define DATA_FLAG 0x0100 /* .. for secmod rx */ -+#define AUTH_FAIL_FLAG 0x0100 /* .. for secmod tx */ -+ -+/* EMAC Descriptor Status definitions */ -+#define EMAC_UNDERRUN 0x4000 /* Tx underrun, dg-mod ???) */ -+#define EMAC_MISS 0x0080 /* framed address recognition failed (promiscuous) */ -+#define EMAC_BRDCAST 0x0040 /* DA is Broadcast */ -+#define EMAC_MULT 0x0020 /* DA is multicast */ -+#define EMAC_LG 0x0010 /* frame length > RX_LENGTH register value */ -+#define EMAC_NO 0x0008 /* Non-Octet aligned */ -+#define EMAC_RXER 0x0004 /* RX_ERR on MII while RX_DV assereted */ -+#define EMAC_CRC_ERROR 0x0002 /* CRC error */ -+#define EMAC_OV 0x0001 /* Overflow */ -+ -+/* HDLC Descriptor Status definitions */ -+#define DMA_HDLC_TX_ABORT 0x0100 -+#define DMA_HDLC_RX_OVERRUN 0x4000 -+#define DMA_HDLC_RX_TOO_LONG 0x2000 -+#define DMA_HDLC_RX_CRC_OK 0x1000 -+#define DMA_HDLC_RX_ABORT 0x0100 -+ -+ uint32 address; /* address of data */ -+} DmaDesc; -+ -+/* -+** Sdram Controller -+*/ -+typedef struct SdramControllerRegs { -+ uint16 unused1; -+ uint16 initControl; /* 02 */ -+#define SD_POWER_DOWN 0x200 /* put sdram into power down */ -+#define SD_SELF_REFRESH 0x100 /* enable self refresh mode */ -+#define SD_SOFT_RESET 0x080 /* soft reset all sdram controller regs */ -+#define SD_EDO_SELECT 0x040 /* select EDO mode */ -+#define SD_EDO_WAIT_STATE 0x020 /* add an EDO wait state */ -+#define SD_8MEG 0x010 /* map sdram to 8 megs */ -+#define SD_MASTER_ENABLE 0x008 /* enable accesses to external sdram */ -+#define SD_MRS 0x004 /* generate a mode register select cycle */ -+#define SD_PRECHARGE 0x002 /* generate a precharge cycle */ -+#define SD_CBR 0x001 /* generate a refresh cycle */ -+ uint8 unused2[3]; -+ uint8 config; /* 07 */ -+#define SD_FAST_MEM 0x04 /* 1=CAS latency of 2, 0 = CAS latency of 3 */ -+#define SD_BURST_LEN 0x03 /* set burst length */ -+#define SD_BURST_FULL_PAGE 0x00 /* .. full page */ -+#define SD_BURST_8 0x01 /* .. 8 words */ -+#define SD_BURST_4 0x02 /* .. 4 words */ -+#define SD_BURST_2 0x03 /* .. 2 words */ -+ uint16 unused3; -+ uint16 refreshControl; /* 0a */ -+#define SD_REFRESH_ENABLE 0x8000 /* refresh enable */ -+#define SD_REFRESH_PERIOD 0x00ff /* refresh period (16 x n x clock_period) */ -+ -+ uint32 memoryBase; /* 0c */ -+#define SD_MEMBASE_MASK 0xffffe000 /* base address mask */ -+#define SD_MEMSIZE_8MEG 0x00000001 /* memory is 8 meg */ -+#define SD_MEMSIZE_2MEG 0x00000001 /* memory is 2 meg */ -+ -+} SdramControllerRegs; -+ -+/* -+** External Bus Interface -+*/ -+typedef struct EbiChipSelect { -+ uint32 base; /* base address in upper 24 bits */ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ uint32 config; -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_WREN 0x00000020 /* enable posted writes */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert something, -+ ** don't know what yet */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. use fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+} EbiChipSelect; -+ -+typedef struct EbiRegisters { -+ EbiChipSelect cs[5]; /* size chip select configuration */ -+ uint32 reserved[6]; -+ uint32 ebi_config; /* configuration */ -+#define EBI_MASTER_ENABLE 0x80000000 /* allow external masters */ -+#define EBI_EXT_MAST_PRIO 0x40000000 /* maximize ext master priority */ -+#define EBI_CTRL_ENABLE 0x20000000 -+#define EBI_TA_ENABLE 0x10000000 -+ uint32 dma_control; -+#define EBI_TX_INV_IRQ_EN 0x00080000 -+#define EBI_RX_INV_IRQ_EN 0x00040000 -+#define EBI_TX_PKT_DN_IRQ_EN 0x00020000 -+#define EBI_RX_PKT_DN_IRQ_EN 0x00010000 -+#define EBI_TX_INV_CLR 0x00001000 -+#define EBI_RX_INV_CLR 0x00000800 -+#define EBI_CHAINING 0x00000400 -+#define EBI_EXT_MODE 0x00000200 -+#define EBI_HALF_WORD 0x00000100 -+#define EBI_TX_PKT_DN_CLR 0x00000080 -+#define EBI_RX_PKT_DN_CLR 0x00000040 -+#define EBI_TX_BUF_DN_CLR 0x00000020 -+#define EBI_RX_BUF_DN_CLR 0x00000010 -+#define EBI_TX_BUF_DN_IRQ_EN 0x00000008 -+#define EBI_RX_BUF_DN_IRQ_EN 0x00000004 -+#define EBI_TX_EN 0x00000002 -+#define EBI_RX_EN 0x00000001 -+ uint32 dma_rx_start_addr; -+ uint32 dma_rx_buf_size; -+ uint32 dma_tx_start_addr; -+ uint32 dma_tx_buf_size; -+ uint32 dma_status; -+#define EBI_TX_INV_DESC 0x00000020 -+#define EBI_RX_INV_DESC 0x00000010 -+#define EBI_TX_PKT_DN 0x00000008 -+#define EBI_RX_PKT_DN 0x00000004 -+#define EBI_TX_BUF_DN 0x00000002 -+#define EBI_RX_BUF_DN 0x00000001 -+} EbiRegisters; -+ -+#define EBIC ((volatile EbiRegisters * const) EBIC_BASE) -+ -+typedef struct PcmciaRegisters { -+ /*Each of base has 24 bits of base address followed by size select field*/ -+ uint32 mem_base; -+ uint32 mem_cntrl; -+ uint32 attr_base; -+ uint32 attr_cntrl; -+ uint32 io_base; -+ uint32 io_cntrl; -+#define PCMCIA_CS_ENABLE 0x00000001 -+#define PCMCIA_CS_FIFO_ENABLE 0x00000200 -+#define PCMCIA_DSTSIZE_16 0x00000010 // 0 -8bit, 1- 16bit -+#define PCMCIA_RENDIAN 0x00000400 -+ /* Skip ECR and EBI-DMA registers */ -+ uint32 other1[7]; -+ -+ byte mem_waitcnt4; // Only bits [5:0] -+ byte mem_waitcnt3; // Only bits [4:0] -+ byte mem_waitcnt2; // Only bits [4:0] -+ byte mem_waitcnt1; // Only bits [4:0] -+ -+ byte attr_waitcnt4; // Only bits [5:0] -+ byte attr_waitcnt3; // Only bits [4:0] -+ byte attr_waitcnt2; // Only bits [4:0] -+ byte attr_waitcnt1; // Only bits [4:0] -+ -+ byte io_waitcnt4; // Only bits [5:0] -+ byte io_waitcnt3; // Only bits [4:0] -+ byte io_waitcnt2; // Only bits [4:0] -+ byte io_waitcnt1; // Only bits [4:0] -+ -+} PcmciaRegisters; -+ -+#define PCMCIA ((volatile PcmciaRegisters * const) PCMCIA_BASE) -+ -+/* -+** EMAC transmit MIB counters -+*/ -+typedef struct EmacTxMib { -+ uint32 tx_good_octets; /* (200) good byte count */ -+ uint32 tx_good_pkts; /* (204) good pkt count */ -+ uint32 tx_octets; /* (208) good and bad byte count */ -+ uint32 tx_pkts; /* (20c) good and bad pkt count */ -+ uint32 tx_broadcasts_pkts; /* (210) good broadcast packets */ -+ uint32 tx_multicasts_pkts; /* (214) good mulitcast packets */ -+ uint32 tx_len_64; /* (218) RMON tx pkt size buckets */ -+ uint32 tx_len_65_to_127; /* (21c) */ -+ uint32 tx_len_128_to_255; /* (220) */ -+ uint32 tx_len_256_to_511; /* (224) */ -+ uint32 tx_len_512_to_1023; /* (228) */ -+ uint32 tx_len_1024_to_max; /* (22c) */ -+ uint32 tx_jabber_pkts; /* (230) > 1518 with bad crc */ -+ uint32 tx_oversize_pkts; /* (234) > 1518 with good crc */ -+ uint32 tx_fragment_pkts; /* (238) < 63 with bad crc */ -+ uint32 tx_underruns; /* (23c) fifo underrun */ -+ uint32 tx_total_cols; /* (240) total collisions in all tx pkts */ -+ uint32 tx_single_cols; /* (244) tx pkts with single collisions */ -+ uint32 tx_multiple_cols; /* (248) tx pkts with multiple collisions */ -+ uint32 tx_excessive_cols; /* (24c) tx pkts with excessive cols */ -+ uint32 tx_late_cols; /* (250) tx pkts with late cols */ -+ uint32 tx_defered; /* (254) tx pkts deferred */ -+ uint32 tx_carrier_lost; /* (258) tx pkts with CRS lost */ -+ uint32 tx_pause_pkts; /* (25c) tx pause pkts sent */ -+#define NumEmacTxMibVars 24 -+} EmacTxMib; -+ -+/* -+** EMAC receive MIB counters -+*/ -+typedef struct EmacRxMib { -+ uint32 rx_good_octets; /* (280) good byte count */ -+ uint32 rx_good_pkts; /* (284) good pkt count */ -+ uint32 rx_octets; /* (288) good and bad byte count */ -+ uint32 rx_pkts; /* (28c) good and bad pkt count */ -+ uint32 rx_broadcasts_pkts; /* (290) good broadcast packets */ -+ uint32 rx_multicasts_pkts; /* (294) good mulitcast packets */ -+ uint32 rx_len_64; /* (298) RMON rx pkt size buckets */ -+ uint32 rx_len_65_to_127; /* (29c) */ -+ uint32 rx_len_128_to_255; /* (2a0) */ -+ uint32 rx_len_256_to_511; /* (2a4) */ -+ uint32 rx_len_512_to_1023; /* (2a8) */ -+ uint32 rx_len_1024_to_max; /* (2ac) */ -+ uint32 rx_jabber_pkts; /* (2b0) > 1518 with bad crc */ -+ uint32 rx_oversize_pkts; /* (2b4) > 1518 with good crc */ -+ uint32 rx_fragment_pkts; /* (2b8) < 63 with bad crc */ -+ uint32 rx_missed_pkts; /* (2bc) missed packets */ -+ uint32 rx_crc_align_errs; /* (2c0) both or either */ -+ uint32 rx_undersize; /* (2c4) < 63 with good crc */ -+ uint32 rx_crc_errs; /* (2c8) crc errors (only) */ -+ uint32 rx_align_errs; /* (2cc) alignment errors (only) */ -+ uint32 rx_symbol_errs; /* (2d0) pkts with RXERR assertions (symbol errs) */ -+ uint32 rx_pause_pkts; /* (2d4) MAC control, PAUSE */ -+ uint32 rx_nonpause_pkts; /* (2d8) MAC control, not PAUSE */ -+#define NumEmacRxMibVars 23 -+} EmacRxMib; -+ -+typedef struct EmacRegisters { -+ uint32 rxControl; /* (00) receive control */ -+#define EMAC_PM_REJ 0x80 /* - reject DA match in PMx regs */ -+#define EMAC_UNIFLOW 0x40 /* - accept cam match fc */ -+#define EMAC_FC_EN 0x20 /* - enable flow control */ -+#define EMAC_LOOPBACK 0x10 /* - loopback */ -+#define EMAC_PROM 0x08 /* - promiscuous */ -+#define EMAC_RDT 0x04 /* - ignore transmissions */ -+#define EMAC_ALL_MCAST 0x02 /* - ignore transmissions */ -+#define EMAC_NO_BCAST 0x01 /* - ignore transmissions */ -+ -+ -+ uint32 rxMaxLength; /* (04) receive max length */ -+ uint32 txMaxLength; /* (08) transmit max length */ -+ uint32 unused1[1]; -+ uint32 mdioFreq; /* (10) mdio frequency */ -+#define EMAC_MII_PRE_EN 0x0100 /* prepend preamble sequence */ -+#define EMAC_MDIO_PRE 0x100 /* - enable MDIO preamble */ -+#define EMAC_MDC_FREQ 0x0ff /* - mdio frequency */ -+ -+ uint32 mdioData; /* (14) mdio data */ -+#define MDIO_WR 0x50020000 /* - write framing */ -+#define MDIO_RD 0x60020000 /* - read framing */ -+#define MDIO_PMD_SHIFT 23 -+#define MDIO_REG_SHIFT 18 -+ -+ uint32 intMask; /* (18) int mask */ -+ uint32 intStatus; /* (1c) int status */ -+#define EMAC_FLOW_INT 0x04 /* - flow control event */ -+#define EMAC_MIB_INT 0x02 /* - mib event */ -+#define EMAC_MDIO_INT 0x01 /* - mdio event */ -+ -+ uint32 unused2[3]; -+ uint32 config; /* (2c) config */ -+#define EMAC_ENABLE 0x001 /* - enable emac */ -+#define EMAC_DISABLE 0x002 /* - disable emac */ -+#define EMAC_SOFT_RST 0x004 /* - soft reset */ -+#define EMAC_SOFT_RESET 0x004 /* - emac soft reset */ -+#define EMAC_EXT_PHY 0x008 /* - external PHY select */ -+ -+ uint32 txControl; /* (30) transmit control */ -+#define EMAC_FD 0x001 /* - full duplex */ -+#define EMAC_FLOWMODE 0x002 /* - flow mode */ -+#define EMAC_NOBKOFF 0x004 /* - no backoff in */ -+#define EMAC_SMALLSLT 0x008 /* - small slot time */ -+ -+ uint32 txThreshold; /* (34) transmit threshold */ -+ uint32 mibControl; /* (38) mib control */ -+#define EMAC_NO_CLEAR 0x001 /* don't clear on read */ -+ -+ uint32 unused3[7]; -+ -+ uint32 pm0DataLo; /* (58) perfect match 0 data lo */ -+ uint32 pm0DataHi; /* (5C) perfect match 0 data hi (15:0) */ -+ uint32 pm1DataLo; /* (60) perfect match 1 data lo */ -+ uint32 pm1DataHi; /* (64) perfect match 1 data hi (15:0) */ -+ uint32 pm2DataLo; /* (68) perfect match 2 data lo */ -+ uint32 pm2DataHi; /* (6C) perfect match 2 data hi (15:0) */ -+ uint32 pm3DataLo; /* (70) perfect match 3 data lo */ -+ uint32 pm3DataHi; /* (74) perfect match 3 data hi (15:0) */ -+#define EMAC_CAM_V 0x10000 /* - cam index */ -+#define EMAC_CAM_VALID 0x00010000 -+ -+ uint32 unused4[98]; /* (78-1fc) */ -+ -+ EmacTxMib tx_mib; /* (200) emac tx mib */ -+ uint32 unused5[8]; /* (260-27c) */ -+ -+ EmacRxMib rx_mib; /* (280) rx mib */ -+ -+} EmacRegisters; -+ -+/* register offsets for subrouting access */ -+#define EMAC_RX_CONTROL 0x00 -+#define EMAC_RX_MAX_LENGTH 0x04 -+#define EMAC_TX_MAC_LENGTH 0x08 -+#define EMAC_MDIO_FREQ 0x10 -+#define EMAC_MDIO_DATA 0x14 -+#define EMAC_INT_MASK 0x18 -+#define EMAC_INT_STATUS 0x1C -+#define EMAC_CAM_DATA_LO 0x20 -+#define EMAC_CAM_DATA_HI 0x24 -+#define EMAC_CAM_CONTROL 0x28 -+#define EMAC_CONTROL 0x2C -+#define EMAC_TX_CONTROL 0x30 -+#define EMAC_TX_THRESHOLD 0x34 -+#define EMAC_MIB_CONTROL 0x38 -+ -+ -+#define EMAC ((volatile EmacRegisters * const) EMAC_BASE) -+ -+/* -+** USB Registers -+*/ -+typedef struct UsbRegisters { -+ byte inttf_setting; -+ byte current_config; -+ uint16 status_frameNum; -+#define USB_BUS_RESET 0x1000 -+#define USB_SUSPENDED 0x0800 -+ byte unused1; -+ byte endpt_prnt; -+ byte endpt_dirn; -+ byte endpt_status; -+#define USB_ENDPOINT_0 0x01 -+#define USB_ENDPOINT_1 0x02 -+#define USB_ENDPOINT_2 0x04 -+#define USB_ENDPOINT_3 0x08 -+#define USB_ENDPOINT_4 0x10 -+#define USB_ENDPOINT_5 0x20 -+#define USB_ENDPOINT_6 0x40 -+#define USB_ENDPOINT_7 0x80 -+ uint32 unused2; -+ byte conf_mem_ctl; -+#define USB_CONF_MEM_RD 0x80 -+#define USB_CONF_MEM_RDY 0x40 -+ byte unused2a; -+ byte conf_mem_read_address; -+ byte conf_mem_write_address; -+ -+ byte unused3; -+ byte dev_req_bytesel; -+ uint16 ext_dev_data; -+ -+ byte unused4; -+ byte clr_fifo; -+ byte endpt_stall_reset; // use same endpoint #'s from above -+ byte usb_cntl; -+#define USB_FORCE_ERR 0x20 -+#define USB_SOFT_RESET 0x10 -+#define USB_RESUME 0x08 -+#define USB_COMMAND_ERR 0x04 -+#define USB_COMMAND_OVER 0x02 -+ byte irq_addr; -+ byte iso_out_in_addr; -+ byte blk_out_in_addr; -+ byte cntl_addr; -+ uint32 mux_cntl; -+#define USB_TX_DMA_OPER 0x00000000 -+#define USB_TX_CNTL_FIFO_OPER 0x00000004 -+#define USB_TX_BULK_FIFO_OPER 0x00000008 -+#define USB_TX_ISO_FIFO_OPER 0x0000000c -+#define USB_TX_IRQ_OPER 0x00000010 -+#define USB_RX_DMA_OPER 0x00000000 -+#define USB_RX_CNTL_FIFO_OPER 0x00000001 -+#define USB_RX_BULK_FIFO_OPER 0x00000002 -+#define USB_RX_ISO_FIFO_OPER 0x00000003 -+ uint32 rx_ram_read_port; -+ uint32 tx_ram_write_port; -+ uint32 fifo_status; -+#define USB_CTRLI_FIFO_FULL 0x00000001 -+#define USB_CTRLI_FIFO_EMPTY 0x00000002 -+#define USB_CTRLO_FIFO_FULL 0x00000100 -+#define USB_CTRLO_FIFO_EMPTY 0x00000200 -+ uint32 irq_status; -+ uint32 irq_mask; -+#define USB_NEW_CONFIG 0x01 -+#define USB_SETUP_COMMAND_RECV 0x02 // non-standard setup command received -+#define USB_OUT_FIFO_OV 0x04 -+#define USB_RESET_RECV 0x08 -+#define USB_SUSPEND_RECV 0x10 -+#define USB_FIFO_REWIND 0x20 -+#define USB_RX_BULK_FIFO_DATA_AVAIL 0x40 -+#define USB_RX_ISO_FIFO_DATA_AVAIL 0x80 -+ uint32 endpt_cntl; -+#define USB_R_WK_EN 0x0100 -+#define USB_TX_EOP 0x0200 -+#define USB_TX_CNTL_DMA_EN 0x0400 -+#define USB_TX_BULK_DMA_EN 0x0800 -+#define USB_TX_ISO_DMA_EN 0x1000 -+#define USB_RX_CNTL_DMA_EN 0x2000 -+#define USB_RX_BULK_DMA_EN 0x4800 -+#define USB_RX_ISO_DMA_EN 0x8000 -+ uint32 rx_status_read_port; -+ uint32 confmem_read_port; -+ uint32 confmem_write_port; -+ uint32 fifo_ovf_count; -+ uint32 fifo_rewind_cnt; -+} UsbRegisters; -+ -+#define USB ((volatile UsbRegisters * const) USB_BASE) -+ -+/* -+** ADSL core Registers -+*/ -+ -+#define _PADLINE(line) pad ## line -+#define _XSTR(line) _PADLINE(line) -+#define PAD _XSTR(__LINE__) -+ -+typedef struct AdslRegisters { -+ uint32 core_control; -+#define ADSL_RESET 0x01 -+ -+ uint32 core_status; -+#define ADSL_HOST_MSG 0x01 -+ -+ uint32 PAD; -+ uint32 bist_status; -+ uint32 PAD[4]; -+ uint32 int_status_i; /* 0x20 */ -+ uint32 int_mask_i; -+ uint32 int_status_f; -+ uint32 int_mask_f; -+#define ADSL_INT_HOST_MSG 0x00000020 -+#define ADSL_INT_DESC_ERR 0x00000400 -+#define ADSL_INT_DATA_ERR 0x00000800 -+#define ADSL_INT_DESC_PROTO_ERR 0x00001000 -+#define ADSL_INT_RCV_DESC_UF 0x00002000 -+#define ADSL_INT_RCV_FIFO_OF 0x00004000 -+#define ADSL_INT_XMT_FIFO_UF 0x00008000 -+#define ADSL_INT_RCV 0x00010000 -+#define ADSL_INT_XMT 0x01000000 -+ -+ uint32 PAD[116]; -+ -+ uint32 xmtcontrol_intr; /* 0x200 */ -+#define ADSL_DMA_XMT_EN 0x00000001 -+#define ADSL_DMA_XMT_LE 0x00000004 -+ uint32 xmtaddr_intr; -+#define ADSL_DMA_ADDR_MASK 0xFFFFF000 -+ uint32 xmtptr_intr; -+#define ADSL_DMA_LAST_DESC_MASK 0x00000FFF -+ uint32 xmtstatus_intr; -+#define ADSL_DMA_CURR_DESC_MASK 0x00000FFF -+#define ADSL_DMA_XMT_STATE_MASK 0x0000F000 -+#define ADSL_DMA_XMT_STATE_DIS 0x00000000 -+#define ADSL_DMA_XMT_STATE_ACT 0x00001000 -+#define ADSL_DMA_XMT_STATE_IDLE 0x00002000 -+#define ADSL_DMA_XMT_STATE_STOP 0x00003000 -+ -+#define ADSL_DMA_XMT_ERR_MASK 0x000F0000 -+#define ADSL_DMA_XMT_ERR_NONE 0x00000000 -+#define ADSL_DMA_XMT_ERR_DPE 0x00010000 -+#define ADSL_DMA_XMT_ERR_FIFO 0x00020000 -+#define ADSL_DMA_XMT_ERR_DTE 0x00030000 -+#define ADSL_DMA_XMT_ERR_DRE 0x00040000 -+ -+ uint32 rcvcontrol_intr; -+#define ADSL_DMA_RCV_EN 0x00000001 -+#define ADSL_DMA_RCV_FO 0x000000FE -+ uint32 rcvaddr_intr; -+ uint32 rcvptr_intr; -+ uint32 rcvstatus_intr; -+#define ADSL_DMA_RCV_STATE_MASK 0x0000F000 -+#define ADSL_DMA_RCV_STATE_DIS 0x00000000 -+#define ADSL_DMA_RCV_STATE_ACT 0x00001000 -+#define ADSL_DMA_RCV_STATE_IDLE 0x00002000 -+#define ADSL_DMA_RCV_STATE_STOP 0x00003000 -+ -+#define ADSL_DMA_RCV_ERR_MASK 0x000F0000 -+#define ADSL_DMA_RCV_ERR_NONE 0x00000000 -+#define ADSL_DMA_RCV_ERR_DPE 0x00010000 -+#define ADSL_DMA_RCV_ERR_FIFO 0x00020000 -+#define ADSL_DMA_RCV_ERR_DTE 0x00030000 -+#define ADSL_DMA_RCV_ERR_DRE 0x00040000 -+ -+ uint32 xmtcontrol_fast; -+ uint32 xmtaddr_fast; -+ uint32 xmtptr_fast; -+ uint32 xmtstatus_fast; -+ uint32 rcvcontrol_fast; -+ uint32 rcvaddr_fast; -+ uint32 rcvptr_fast; -+ uint32 rcvstatus_fast; -+ uint32 PAD[48]; -+ -+ uint32 host_message; /* 0x300 */ -+ uint32 PAD[805]; -+ uint32 core_reset; -+ uint32 core_error; -+ uint32 core_revision; -+ -+#define ADSL_CORE_REV 0x0000000F -+#define ADSL_CORE_TYPE 0x0000FFF0 -+} AdslRegisters; -+ -+#define ADSL ((volatile AdslRegisters * const) ADSL_BASE) -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6348_common.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6348_common.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6348_common.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6348_common.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,225 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: 6348_common.h */ -+/* DATE: 04/12/19 */ -+/* PURPOSE: Define addresses of major hardware components of */ -+/* BCM6348 */ -+/* */ -+/***********************************************************************/ -+#ifndef __BCM6348_MAP_COMMON_H -+#define __BCM6348_MAP_COMMON_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#define PERF_BASE 0xfffe0000 /* chip control registers */ -+#define BB_BASE 0xfffe0100 /* bus bridge registers */ -+#define TIMR_BASE 0xfffe0200 /* timer registers */ -+#define UART_BASE 0xfffe0300 /* uart registers */ -+#define GPIO_BASE 0xfffe0400 /* gpio registers */ -+#define SPI_BASE 0xfffe0c00 /* SPI master controller registers */ -+ -+#define USB_CTL_BASE 0xfffe1000 /* USB control registers */ -+#define USB_DMA_BASE 0xfffe1400 /* USB DMA control registers */ -+#define USB_HOST_BASE 0xfffe1b00 /* USB host registers */ -+ -+#define MPI_BASE 0xfffe2000 /* MPI control registers */ -+#define SDRAM_BASE 0xfffe2300 /* SDRAM control registers */ -+ -+#define ADSL_BASE 0xfffe3000 /* ADSL core control registers */ -+#define ATM_BASE 0xfffe4000 /* ATM SAR control registers */ -+#define UBUS_BASE 0xfffe5000 /* UBUS status registers */ -+#define EMAC1_BASE 0xfffe6000 /* EMAC1 control registers */ -+#define EMAC2_BASE 0xfffe6800 /* EMAC2 control registers */ -+#define EMAC_DMA_BASE 0xfffe7000 /* EMAC DMA control registers */ -+ -+/* -+##################################################################### -+# System PLL Control Register -+##################################################################### -+*/ -+#define SYSPLLCFG 0x08 -+ -+#define M_MPI_MASK 0x00000018 // 4:3 -+#define M_MPI_SHFT 3 -+#define M_MPI_50MHZ 0 -+#define M_MPI_40MHZ 1 -+#define M_MPI_33MHZ 2 -+#define M_MPI_25MHZ 3 -+ -+#define M_UTO_MASK 0x00000002 // 1:1 -+#define M_UTO_SHFT 1 -+ -+#define SOFT_RESET 0x00000001 -+ -+#define PLL_STRAP_VALUE 0x34 -+ -+/* -+##################################################################### -+# SDRAM Control Registers -+##################################################################### -+*/ -+#define SDR_INIT_CTL 0x00 -+ /* Control Bits */ -+#define SDR_PFEN1 (1<<16) -+#define SDR_PFEN0 (1<<15) -+#define SDR_EMPRS (1<<14) -+#define SDR_2_BANKS (1<<13) -+#define SDR_1_BANK (0<<13) -+#define SDR_CS1_EN (1<<12) -+#define SDR_PEND (1<<11) -+#define SDR_32_BIT (1<<10) -+#define SDR_POWER_DOWN (1<<9) -+#define SDR_SELF_REFRESH (1<<8) -+#define SDR_11_COLS (3<<6) -+#define SDR_10_COLS (2<<6) -+#define SDR_9_COLS (1<<6) -+#define SDR_8_COLS (0<<6) -+#define SDR_13_ROWS (2<<4) -+#define SDR_12_ROWS (1<<4) -+#define SDR_11_ROWS (0<<4) -+#define SDR_MASTER_EN (1<<3) -+#define SDR_MRS_CMD (1<<2) -+#define SDR_PRE_CMD (1<<1) -+#define SDR_CBR_CMD (1<<0) -+ -+#define SDR_CFG_REG 0x04 -+ /* Control Bits */ -+#define SDR_FULL_PG 0 -+#define SDR_BURST8 1 -+#define SDR_BURST4 2 -+#define SDR_BURST2 3 -+#define SDR_FAST_MEM (1<<2) -+#define SDR_SLOW_MEM (0<<2) -+ -+#define SDR_REF_CTL 0x0C -+ /* Control Bits */ -+#define SDR_REF_EN (1<<15) -+ -+#define SDR_PRIOR -+ /* Control Bits */ -+#define SDR_EN_PRIOR (1<<31) -+ -+ -+/* -+##################################################################### -+# MPI Control Registers -+##################################################################### -+*/ -+#define CS0BASE 0x00 -+#define CS0CNTL 0x04 -+ -+/* -+# CSxBASE settings -+# Size in low 4 bits -+# Base Address for match in upper 24 bits -+*/ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ -+/* CSxCNTL settings */ -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define ZEROWT 0x00000000 /* .. 0 WS */ -+#define ONEWT 0x00000002 /* .. 1 WS */ -+#define TWOWT 0x00000004 /* .. 2 WS */ -+#define THREEWT 0x00000006 /* .. 3 WS */ -+#define FOURWT 0x00000008 /* .. 4 WS */ -+#define FIVEWT 0x0000000a /* .. 5 WS */ -+#define SIXWT 0x0000000c /* .. 6 WS */ -+#define SEVENWT 0x0000000e /* .. 7 WS */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert chip select polarity */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. enable fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+ -+/* -+##################################################################### -+# UART Control Registers -+##################################################################### -+*/ -+#define UART0CONTROL 0x01 -+#define UART0CONFIG 0x02 -+#define UART0RXTIMEOUT 0x03 -+#define UART0BAUD 0x04 -+#define UART0FIFOCFG 0x0a -+#define UART0INTMASK 0x10 -+#define UART0INTSTAT 0x12 -+#define UART0DATA 0x17 -+ -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+#define XMITBREAK 0x40 /* Config register */ -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ -+#define RSTTXFIFOS 0x80 /* Rx Timeout register */ -+#define RSTRXFIFOS 0x40 -+ -+#define TX4 0x40 /* FIFO config register */ -+#define RX4 0x04 -+ -+#define DELTAIP 0x0001 /* Interrupt Status and Mask registers */ -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6348_map.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6348_map.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/6348_map.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/6348_map.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,1095 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: 6348_map.h */ -+/* DATE: 11/06/03 */ -+/* PURPOSE: Define addresses of major hardware components of */ -+/* BCM6348 */ -+/* */ -+/***********************************************************************/ -+#ifndef __BCM6348_MAP_H -+#define __BCM6348_MAP_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#include "bcmtypes.h" -+#include "6348_common.h" -+#include "6348_intr.h" -+ -+/* macro to convert logical data addresses to physical */ -+/* DMA hardware must see physical address */ -+#define LtoP( x ) ( (uint32)x & 0x1fffffff ) -+#define PtoL( x ) ( LtoP(x) | 0xa0000000 ) -+ -+/* -+** Interrupt Controller -+*/ -+typedef struct PerfControl { -+ uint32 RevID; /* (00) */ -+ uint16 testControl; /* (04) */ -+ uint16 blkEnables; /* (06) */ -+ -+#define ADSL_CLK_EN 0x0001 -+#define MPI_CLK_EN 0x0002 -+#define DRAM_CLK_EN 0x0004 -+#define M2M_CLK_EN 0x0008 -+#define EMAC_CLK_EN 0x0010 -+#define SAR_CLK_EN 0x0020 -+#define USBS_CLK_EN 0x0040 -+#define USBH_CLK_EN 0x0100 -+#define SPI_CLK_EN 0x0200 -+ -+ uint32 pll_control; /* (08) */ -+#define CHIP_SOFT_RESET 0x00000001 -+#define MPI_CLK_50MHZ 0x00000000 -+#define MPI_CLK_40MHZ 0x00000008 -+#define MPI_CLK_33MHZ 0x00000010 -+#define MPI_CLK_25MHZ 0x00000018 -+#define MPI_CLK_MASK 0x00000018 -+ -+ uint32 IrqMask; /* (0c) */ -+ uint32 IrqStatus; /* (10) */ -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 5 -+#define EI_CLEAR_SHFT 10 -+#define EI_MASK_SHFT 15 -+#define EI_INSENS_SHFT 20 -+#define EI_LEVEL_SHFT 25 -+ -+ uint32 unused[4]; /* (18) */ -+ uint32 BlockSoftReset; /* (28) */ -+#define BSR_SPI 0x00000001 -+#define BSR_EMAC 0x00000004 -+#define BSR_USBH 0x00000008 -+#define BSR_USBS 0x00000010 -+#define BSR_ADSL 0x00000020 -+#define BSR_DMAMEM 0x00000040 -+#define BSR_SAR 0x00000080 -+#define BSR_ACLC 0x00000100 -+#define BSR_ADSL_MIPS_PLL 0x00000400 -+#define BSR_ALL_BLOCKS \ -+ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ -+ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) -+ uint32 unused2[2]; /* (2c) */ -+ uint32 PllStrap; /* (34) */ -+#define PLL_N1_SHFT 20 -+#define PLL_N1_MASK (7<<PLL_N1_SHFT) -+#define PLL_N2_SHFT 15 -+#define PLL_N2_MASK (0x1f<<PLL_N2_SHFT) -+#define PLL_M1_REF_SHFT 12 -+#define PLL_M1_REF_MASK (7<<PLL_M1_REF_SHFT) -+#define PLL_M2_REF_SHFT 9 -+#define PLL_M2_REF_MASK (7<<PLL_M2_REF_SHFT) -+#define PLL_M1_CPU_SHFT 6 -+#define PLL_M1_CPU_MASK (7<<PLL_M1_CPU_SHFT) -+#define PLL_M1_BUS_SHFT 3 -+#define PLL_M1_BUS_MASK (7<<PLL_M1_BUS_SHFT) -+#define PLL_M2_BUS_SHFT 0 -+#define PLL_M2_BUS_MASK (7<<PLL_M2_BUS_SHFT) -+} PerfControl; -+ -+#define PERF ((volatile PerfControl * const) PERF_BASE) -+ -+/* -+** Bus Bridge Registers -+*/ -+typedef struct BusBridge { -+ uint16 status; -+#define BB_BUSY 0x8000 /* posted operation in progress */ -+#define BB_RD_PND 0x4000 /* read pending */ -+#define BB_RD_CMPLT 0x2000 /* read complete */ -+#define BB_ERROR 0x1000 /* posted write error */ -+#define BB_TEA 0x0800 /* transfer aborted */ -+ uint16 abortTimeoutCnt; /* abort timeout value */ -+ -+ byte writePostEnable; -+#define BB_POST_TIMR_EN 0x08 /* post writes to timer regs */ -+#define BB_POST_GPIO_EN 0x04 /* post writes to gpio regs */ -+#define BB_POST_INTC_EN 0x02 /* post writes to interrupt controller regs */ -+#define BB_POST_UART_EN 0x01 /* post writes to uart regs */ -+ byte unused1[5]; -+ uint16 postAddr; /* posted read address (lower half) */ -+ byte unused2[3]; -+ byte postData; /* posted read data */ -+} BusBridge; -+ -+/* register offsets (needed for EBI master access) */ -+#define BB_STATUS 0 -+#define BB_ABORT_TO_CNT 2 -+#define BB_WR_POST_EN 4 -+#define BB_RD_POST_ADDR 10 -+#define BB_RD_POST_DATA 12 -+ -+#define BRIDGE *bridge ((volatile BusBridge * const) BB_BASE) -+ -+/* -+** Timer -+*/ -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+ -+/* -+** UART -+*/ -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+ byte config; -+#define XMITBREAK 0x40 -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ /* 4-LSBS represent STOP bits/char -+ * in 1/8 bit-time intervals. Zero -+ * represents 1/8 stop bit interval. -+ * Fifteen represents 2 stop bits. -+ */ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ /* 5-bit TimeoutCnt is in low bits of this register. -+ * This count represents the number of characters -+ * idle times before setting receive Irq when below threshold -+ */ -+ uint32 baudword; -+ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate -+ */ -+ -+ byte txf_levl; /* Read-only fifo depth */ -+ byte rxf_levl; /* Read-only fifo depth */ -+ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are -+ * RxThreshold. Irq can be asserted -+ * when rx fifo> thresh, txfifo<thresh -+ */ -+ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) -+ * if these bits are also enabled to GPIO_o -+ */ -+#define DTREN 0x01 -+#define RTSEN 0x02 -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to -+ * detect irq on rising AND falling -+ * edges for corresponding GPIO_i -+ * if enabled (edge insensitive) -+ */ -+ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense -+ * 0 for negedge sense if -+ * not configured for edge -+ * insensitive (see above) -+ * Lower 4 bits: Mask to enable change -+ * detection IRQ for corresponding -+ * GPIO_i -+ */ -+ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits -+ * have changed (may set IRQ). -+ * read automatically clears bit -+ * Lower 4 bits are actual status -+ */ -+ -+ uint16 intMask; /* Same Bit defs for Mask and status */ -+ uint16 intStatus; -+#define DELTAIP 0x0001 -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; /* Write to TX, Read from RX */ -+ /* bits 11:8 are BRK,PAR,FRM errors */ -+ -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART ((volatile Uart * const) UART_BASE) -+ -+/* -+** Gpio Controller -+*/ -+ -+typedef struct GpioControl { -+ uint32 GPIODir_high; /* bits 36:32 */ -+ uint32 GPIODir; /* bits 31:00 */ -+ uint32 GPIOio_high; /* bits 36:32 */ -+ uint32 GPIOio; /* bits 31:00 */ -+ uint32 LEDCtrl; -+#define LED3_STROBE 0x08000000 -+#define LED2_STROBE 0x04000000 -+#define LED1_STROBE 0x02000000 -+#define LED0_STROBE 0x01000000 -+#define LED_TEST 0x00010000 -+#define LED3_DISABLE_LINK_ACT 0x00008000 -+#define LED2_DISABLE_LINK_ACT 0x00004000 -+#define LED1_DISABLE_LINK_ACT 0x00002000 -+#define LED0_DISABLE_LINK_ACT 0x00001000 -+#define LED_INTERVAL_SET_MASK 0x00000f00 -+#define LED_INTERVAL_SET_320MS 0x00000500 -+#define LED_INTERVAL_SET_160MS 0x00000400 -+#define LED_INTERVAL_SET_80MS 0x00000300 -+#define LED_INTERVAL_SET_40MS 0x00000200 -+#define LED_INTERVAL_SET_20MS 0x00000100 -+#define LED3_ON 0x00000080 -+#define LED2_ON 0x00000040 -+#define LED1_ON 0x00000020 -+#define LED0_ON 0x00000010 -+#define LED3_ENABLE 0x00000008 -+#define LED2_ENABLE 0x00000004 -+#define LED1_ENABLE 0x00000002 -+#define LED0_ENABLE 0x00000001 -+ uint32 SpiSlaveCfg; -+#define SPI_SLAVE_RESET 0x00010000 -+#define SPI_RESTRICT 0x00000400 -+#define SPI_DELAY_DISABLE 0x00000200 -+#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 -+#define SPI_SER_ADDR_CFG_MASK 0x0000000c -+#define SPI_MODE 0x00000001 -+ uint32 GPIOMode; -+#define GROUP4_DIAG 0x00090000 -+#define GROUP4_UTOPIA 0x00080000 -+#define GROUP4_LEGACY_LED 0x00030000 -+#define GROUP4_MII_SNOOP 0x00020000 -+#define GROUP4_EXT_EPHY 0x00010000 -+#define GROUP3_DIAG 0x00009000 -+#define GROUP3_UTOPIA 0x00008000 -+#define GROUP3_EXT_MII 0x00007000 -+#define GROUP2_DIAG 0x00000900 -+#define GROUP2_PCI 0x00000500 -+#define GROUP1_DIAG 0x00000090 -+#define GROUP1_UTOPIA 0x00000080 -+#define GROUP1_SPI_UART 0x00000060 -+#define GROUP1_SPI_MASTER 0x00000060 -+#define GROUP1_MII_PCCARD 0x00000040 -+#define GROUP1_MII_SNOOP 0x00000020 -+#define GROUP1_EXT_EPHY 0x00000010 -+#define GROUP0_DIAG 0x00000009 -+#define GROUP0_EXT_MII 0x00000007 -+ -+} GpioControl; -+ -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+/* Number to mask conversion macro used for GPIODir and GPIOio */ -+#define GPIO_NUM_TOTAL_BITS_MASK 0x3f -+#define GPIO_NUM_MAX_BITS_MASK 0x1f -+#define GPIO_NUM_TO_MASK(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) < 32) ? (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) : (0) ) -+ -+/* Number to mask conversion macro used for GPIODir_high and GPIOio_high */ -+#define GPIO_NUM_MAX_BITS_MASK_HIGH 0x07 -+#define GPIO_NUM_TO_MASK_HIGH(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) >= 32) ? (1 << ((X-32) & GPIO_NUM_MAX_BITS_MASK_HIGH)) : (0) ) -+ -+ -+/* -+** Spi Controller -+*/ -+ -+typedef struct SpiControl { -+ uint16 spiCmd; /* (0x0): SPI command */ -+#define SPI_CMD_NOOP 0 -+#define SPI_CMD_SOFT_RESET 1 -+#define SPI_CMD_HARD_RESET 2 -+#define SPI_CMD_START_IMMEDIATE 3 -+ -+#define SPI_CMD_COMMAND_SHIFT 0 -+#define SPI_CMD_DEVICE_ID_SHIFT 4 -+#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 -+#define SPI_CMD_ONE_BYTE_SHIFT 11 -+#define SPI_CMD_ONE_WIRE_SHIFT 12 -+#define SPI_DEV_ID_0 0 -+#define SPI_DEV_ID_1 1 -+#define SPI_DEV_ID_2 2 -+#define SPI_DEV_ID_3 3 -+ -+ byte spiIntStatus; /* (0x2): SPI interrupt status */ -+ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ -+ -+ byte spiIntMask; /* (0x4): SPI interrupt mask */ -+#define SPI_INTR_CMD_DONE 0x01 -+#define SPI_INTR_RX_OVERFLOW 0x02 -+#define SPI_INTR_INTR_TX_UNDERFLOW 0x04 -+#define SPI_INTR_TX_OVERFLOW 0x08 -+#define SPI_INTR_RX_UNDERFLOW 0x10 -+#define SPI_INTR_CLEAR_ALL 0x1f -+ -+ byte spiStatus; /* (0x5): SPI status */ -+#define SPI_RX_EMPTY 0x02 -+#define SPI_CMD_BUSY 0x04 -+#define SPI_SERIAL_BUSY 0x08 -+ -+ byte spiClkCfg; /* (0x6): SPI clock configuration */ -+#define SPI_CLK_0_391MHZ 1 -+#define SPI_CLK_0_781MHZ 2 /* default */ -+#define SPI_CLK_1_563MHZ 3 -+#define SPI_CLK_3_125MHZ 4 -+#define SPI_CLK_6_250MHZ 5 -+#define SPI_CLK_12_50MHZ 6 -+#define SPI_CLK_MASK 0x07 -+#define SPI_SSOFFTIME_MASK 0x38 -+#define SPI_SSOFFTIME_SHIFT 3 -+#define SPI_BYTE_SWAP 0x80 -+ -+ byte spiFillByte; /* (0x7): SPI fill byte */ -+ -+ byte unused0; -+ byte spiMsgTail; /* (0x9): msgtail */ -+ byte unused1; -+ byte spiRxTail; /* (0xB): rxtail */ -+ -+ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ -+ -+ byte spiMsgCtl; /* (0x40) control byte */ -+#define FULL_DUPLEX_RW 0 -+#define HALF_DUPLEX_W 1 -+#define HALF_DUPLEX_R 2 -+#define SPI_MSG_TYPE_SHIFT 6 -+#define SPI_BYTE_CNT_SHIFT 0 -+ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ -+ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ -+ byte unused3[64]; /* (0xc0 - 0xff) reserved */ -+} SpiControl; -+ -+#define SPI ((volatile SpiControl * const) SPI_BASE) -+ -+#define IUDMA_MAX_CHANNELS 16 -+ -+/* -+** DMA Channel Configuration (1 .. 16) -+*/ -+typedef struct DmaChannelCfg { -+ uint32 cfg; /* (00) assorted configuration */ -+#define DMA_BURST_HALT 0x00000004 /* idle after finish current memory burst */ -+#define DMA_PKT_HALT 0x00000002 /* idle after an EOP flag is detected */ -+#define DMA_ENABLE 0x00000001 /* set to enable channel */ -+ uint32 intStat; /* (04) interrupts control and status */ -+ uint32 intMask; /* (08) interrupts mask */ -+#define DMA_BUFF_DONE 0x00000001 /* buffer done */ -+#define DMA_DONE 0x00000002 /* packet xfer complete */ -+#define DMA_NO_DESC 0x00000004 /* no valid descriptors */ -+ uint32 maxBurst; /* (0C) max burst length permitted */ -+} DmaChannelCfg; -+ -+/* -+** DMA State RAM (1 .. 16) -+*/ -+typedef struct DmaStateRam { -+ uint32 baseDescPtr; /* (00) descriptor ring start address */ -+ uint32 state_data; /* (04) state/bytes done/ring offset */ -+ uint32 desc_len_status; /* (08) buffer descriptor status and len */ -+ uint32 desc_base_bufptr; /* (0C) buffer descrpitor current processing */ -+} DmaStateRam; -+ -+/* -+** DMA Registers -+*/ -+typedef struct DmaRegs { -+#define DMA_MASTER_EN 0x00000001 -+#define DMA_FLOWC_CH1_EN 0x00000002 -+#define DMA_FLOWC_CH3_EN 0x00000004 -+#define DMA_NUM_CHS_MASK 0x0f000000 -+#define DMA_NUM_CHS_SHIFT 24 -+#define DMA_FLOWCTL_MASK 0x30000000 -+#define DMA_FLOWCTL_CH1 0x10000000 -+#define DMA_FLOWCTL_CH3 0x20000000 -+#define DMA_FLOWCTL_SHIFT 28 -+ uint32 controller_cfg; /* (00) controller configuration */ -+ -+ // Flow control Ch1 -+ uint32 flowctl_ch1_thresh_lo; /* (04) EMAC1 RX DMA channel */ -+ uint32 flowctl_ch1_thresh_hi; /* (08) EMAC1 RX DMA channel */ -+ uint32 flowctl_ch1_alloc; /* (0C) EMAC1 RX DMA channel */ -+#define DMA_BUF_ALLOC_FORCE 0x80000000 -+ -+ // Flow control Ch3 -+ uint32 flowctl_ch3_thresh_lo; /* (10) EMAC2 RX DMA channel */ -+ uint32 flowctl_ch3_thresh_hi; /* (14) EMAC2 RX DMA channel */ -+ uint32 flowctl_ch3_alloc; /* (18) EMAC2 RX DMA channel */ -+ -+ // Unused words -+ uint32 resv[57]; -+ -+ // Per channel registers/state ram -+ DmaChannelCfg chcfg[IUDMA_MAX_CHANNELS]; /* (100) Channel configuration */ -+ union { -+ DmaStateRam s[IUDMA_MAX_CHANNELS]; -+ uint32 u32[4 * IUDMA_MAX_CHANNELS]; -+ } stram; /* (200) state ram */ -+} DmaRegs; -+ -+/* -+** DMA Buffer -+*/ -+typedef struct DmaDesc { -+ uint16 length; /* in bytes of data in buffer */ -+#define DMA_DESC_USEFPM 0x8000 -+#define DMA_DESC_MULTICAST 0x4000 -+#define DMA_DESC_BUFLENGTH 0x0fff -+ uint16 status; /* buffer status */ -+#define DMA_OWN 0x8000 /* cleared by DMA, set by SW */ -+#define DMA_EOP 0x4000 /* last buffer in packet */ -+#define DMA_SOP 0x2000 /* first buffer in packet */ -+#define DMA_WRAP 0x1000 /* */ -+#define DMA_APPEND_CRC 0x0100 -+ -+/* EMAC Descriptor Status definitions */ -+#define EMAC_MISS 0x0080 /* framed address recognition failed (promiscuous) */ -+#define EMAC_BRDCAST 0x0040 /* DA is Broadcast */ -+#define EMAC_MULT 0x0020 /* DA is multicast */ -+#define EMAC_LG 0x0010 /* frame length > RX_LENGTH register value */ -+#define EMAC_NO 0x0008 /* Non-Octet aligned */ -+#define EMAC_RXER 0x0004 /* RX_ERR on MII while RX_DV assereted */ -+#define EMAC_CRC_ERROR 0x0002 /* CRC error */ -+#define EMAC_OV 0x0001 /* Overflow */ -+ -+/* HDLC Descriptor Status definitions */ -+#define DMA_HDLC_TX_ABORT 0x0100 -+#define DMA_HDLC_RX_OVERRUN 0x4000 -+#define DMA_HDLC_RX_TOO_LONG 0x2000 -+#define DMA_HDLC_RX_CRC_OK 0x1000 -+#define DMA_HDLC_RX_ABORT 0x0100 -+ -+ uint32 address; /* address of data */ -+} DmaDesc; -+ -+/* -+** Sdram Controller -+*/ -+typedef struct SdramControllerRegs { -+ uint16 unused1; -+ uint16 initControl; /* 02 */ -+#define SD_POWER_DOWN 0x200 /* put sdram into power down */ -+#define SD_SELF_REFRESH 0x100 /* enable self refresh mode */ -+#define SD_SOFT_RESET 0x080 /* soft reset all sdram controller regs */ -+#define SD_EDO_SELECT 0x040 /* select EDO mode */ -+#define SD_EDO_WAIT_STATE 0x020 /* add an EDO wait state */ -+#define SD_8MEG 0x010 /* map sdram to 8 megs */ -+#define SD_MASTER_ENABLE 0x008 /* enable accesses to external sdram */ -+#define SD_MRS 0x004 /* generate a mode register select cycle */ -+#define SD_PRECHARGE 0x002 /* generate a precharge cycle */ -+#define SD_CBR 0x001 /* generate a refresh cycle */ -+ uint8 unused2[3]; -+ uint8 config; /* 07 */ -+#define SD_FAST_MEM 0x04 /* 1=CAS latency of 2, 0 = CAS latency of 3 */ -+#define SD_BURST_LEN 0x03 /* set burst length */ -+#define SD_BURST_FULL_PAGE 0x00 /* .. full page */ -+#define SD_BURST_8 0x01 /* .. 8 words */ -+#define SD_BURST_4 0x02 /* .. 4 words */ -+#define SD_BURST_2 0x03 /* .. 2 words */ -+ uint16 unused3; -+ uint16 refreshControl; /* 0a */ -+#define SD_REFRESH_ENABLE 0x8000 /* refresh enable */ -+#define SD_REFRESH_PERIOD 0x00ff /* refresh period (16 x n x clock_period) */ -+ -+ uint32 memoryBase; /* 0c */ -+#define SD_MEMBASE_MASK 0xffffe000 /* base address mask */ -+#define SD_MEMSIZE_8MEG 0x00000001 /* memory is 8 meg */ -+#define SD_MEMSIZE_2MEG 0x00000001 /* memory is 2 meg */ -+ -+} SdramControllerRegs; -+ -+/* -+** External Bus Interface -+*/ -+typedef struct EbiChipSelect { -+ uint32 base; /* base address in upper 24 bits */ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ uint32 config; -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_WREN 0x00000020 /* enable posted writes */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert something, -+ ** don't know what yet */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. use fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+} EbiChipSelect; -+ -+typedef struct MpiRegisters { -+ EbiChipSelect cs[7]; /* size chip select configuration */ -+#define EBI_CS0_BASE 0 -+#define EBI_CS1_BASE 1 -+#define EBI_CS2_BASE 2 -+#define EBI_CS3_BASE 3 -+#define PCMCIA_COMMON_BASE 4 -+#define PCMCIA_ATTRIBUTE_BASE 5 -+#define PCMCIA_IO_BASE 6 -+ uint32 unused0[2]; /* reserved */ -+ uint32 ebi_control; /* ebi control */ -+ uint32 unused1[4]; /* reserved */ -+#define EBI_ACCESS_TIMEOUT 0x000007FF -+ uint32 pcmcia_cntl1; /* pcmcia control 1 */ -+#define PCCARD_CARD_RESET 0x00040000 -+#define CARDBUS_ENABLE 0x00008000 -+#define PCMCIA_ENABLE 0x00004000 -+#define PCMCIA_GPIO_ENABLE 0x00002000 -+#define CARDBUS_IDSEL 0x00001F00 -+#define VS2_OEN 0x00000080 -+#define VS1_OEN 0x00000040 -+#define VS2_OUT 0x00000020 -+#define VS1_OUT 0x00000010 -+#define VS2_IN 0x00000008 -+#define VS1_IN 0x00000004 -+#define CD2_IN 0x00000002 -+#define CD1_IN 0x00000001 -+#define VS_MASK 0x0000000C -+#define CD_MASK 0x00000003 -+ uint32 unused2; /* reserved */ -+ uint32 pcmcia_cntl2; /* pcmcia control 2 */ -+#define PCMCIA_BYTESWAP_DIS 0x00000002 -+#define PCMCIA_HALFWORD_EN 0x00000001 -+ uint32 unused3[40]; /* reserved */ -+ -+ uint32 sp0range; /* PCI to internal system bus address space */ -+#define ADDR_SPACE_MASK 0xFFFF0000 -+ uint32 sp0remap; -+ uint32 sp0cfg; -+ uint32 sp1range; -+ uint32 sp1remap; -+ uint32 sp1cfg; -+ -+ uint32 EndianCfg; -+ -+ uint32 l2pcfgctl; /* internal system bus to PCI IO/Cfg control */ -+#define DIR_CFG_SEL 0x80000000 /* change from PCI I/O access to PCI config access */ -+#define DIR_CFG_USEREG 0x40000000 /* use this register info for PCI configuration access */ -+#define DEVICE_NUMBER 0x00007C00 /* device number for the PCI configuration access */ -+#define FUNC_NUMBER 0x00000300 /* function number for the PCI configuration access */ -+#define REG_NUMBER 0x000000FC /* register number for the PCI configuration access */ -+#define CONFIG_TYPE 0x00000003 /* configuration type for the PCI configuration access */ -+ -+ uint32 l2pmrange1; /* internal system bus to PCI memory space */ -+#define PCI_SIZE_64K 0xFFFF0000 -+#define PCI_SIZE_128K 0xFFFE0000 -+#define PCI_SIZE_256K 0xFFFC0000 -+#define PCI_SIZE_512K 0xFFF80000 -+#define PCI_SIZE_1M 0xFFF00000 -+#define PCI_SIZE_2M 0xFFE00000 -+#define PCI_SIZE_4M 0xFFC00000 -+#define PCI_SIZE_8M 0xFF800000 -+#define PCI_SIZE_16M 0xFF000000 -+ uint32 l2pmbase1; /* kseg0 or kseg1 address & 0x1FFFFFFF */ -+ uint32 l2pmremap1; -+#define CARDBUS_MEM 0x00000004 -+#define MEM_WINDOW_EN 0x00000001 -+ uint32 l2pmrange2; -+ uint32 l2pmbase2; -+ uint32 l2pmremap2; -+ uint32 l2piorange; /* internal system bus to PCI I/O space */ -+ uint32 l2piobase; -+ uint32 l2pioremap; -+ -+ uint32 pcimodesel; -+#define PCI2_INT_BUS_RD_PREFECH 0x000000F0 -+#define PCI_BAR2_NOSWAP 0x00000002 /* BAR at offset 0x20 */ -+#define PCI_BAR1_NOSWAP 0x00000001 /* BAR at affset 0x1c */ -+ -+ uint32 pciintstat; /* PCI interrupt mask/status */ -+#define MAILBOX1_SENT 0x08 -+#define MAILBOX0_SENT 0x04 -+#define MAILBOX1_MSG_RCV 0x02 -+#define MAILBOX0_MSG_RCV 0x01 -+ uint32 locbuscntrl; /* internal system bus control */ -+#define DIR_U2P_NOSWAP 0x00000002 -+#define EN_PCI_GPIO 0x00000001 -+ uint32 locintstat; /* internal system bus interrupt mask/status */ -+#define CSERR 0x0200 -+#define SERR 0x0100 -+#define EXT_PCI_INT 0x0080 -+#define DIR_FAILED 0x0040 -+#define DIR_COMPLETE 0x0020 -+#define PCI_CFG 0x0010 -+ uint32 unused4[7]; -+ -+ uint32 mailbox0; -+ uint32 mailbox1; -+ -+ uint32 pcicfgcntrl; /* internal system bus PCI configuration control */ -+#define PCI_CFG_REG_WRITE_EN 0x00000080 -+#define PCI_CFG_ADDR 0x0000003C -+ uint32 pcicfgdata; /* internal system bus PCI configuration data */ -+ -+ uint32 locch2ctl; /* PCI to interrnal system bus DMA (downstream) local control */ -+#define MPI_DMA_HALT 0x00000008 /* idle after finish current memory burst */ -+#define MPI_DMA_PKT_HALT 0x00000004 /* idle after an EOP flag is detected */ -+#define MPI_DMA_STALL 0x00000002 /* idle after an EOP flag is detected */ -+#define MPI_DMA_ENABLE 0x00000001 /* set to enable channel */ -+ uint32 locch2intStat; -+#define MPI_DMA_NO_DESC 0x00000004 /* no valid descriptors */ -+#define MPI_DMA_DONE 0x00000002 /* packet xfer complete */ -+#define MPI_DMA_BUFF_DONE 0x00000001 /* buffer done */ -+ uint32 locch2intMask; -+ uint32 unused5; -+ uint32 locch2descaddr; -+ uint32 locch2status1; -+#define LOCAL_DESC_STATE 0xE0000000 -+#define PCI_DESC_STATE 0x1C000000 -+#define BYTE_DONE 0x03FFC000 -+#define RING_ADDR 0x00003FFF -+ uint32 locch2status2; -+#define BUFPTR_OFFSET 0x1FFF0000 -+#define PCI_MASTER_STATE 0x000000C0 -+#define LOC_MASTER_STATE 0x00000038 -+#define CONTROL_STATE 0x00000007 -+ uint32 unused6; -+ -+ uint32 locch1Ctl; /*internal system bus to PCI DMA (upstream) local control */ -+#define DMA_U2P_LE 0x00000200 /* local bus is little endian */ -+#define DMA_U2P_NOSWAP 0x00000100 /* lccal bus is little endian but no data swapped */ -+ uint32 locch1intstat; -+ uint32 locch1intmask; -+ uint32 unused7; -+ uint32 locch1descaddr; -+ uint32 locch1status1; -+ uint32 locch1status2; -+ uint32 unused8; -+ -+ uint32 pcich1ctl; /* internal system bus to PCI DMA PCI control */ -+ uint32 pcich1intstat; -+ uint32 pcich1intmask; -+ uint32 pcich1descaddr; -+ uint32 pcich1status1; -+ uint32 pcich1status2; -+ -+ uint32 pcich2Ctl; /* PCI to internal system bus DMA PCI control */ -+ uint32 pcich2intstat; -+ uint32 pcich2intmask; -+ uint32 pcich2descaddr; -+ uint32 pcich2status1; -+ uint32 pcich2status2; -+ -+ uint32 perm_id; /* permanent device and vendor id */ -+ uint32 perm_rev; /* permanent revision id */ -+} MpiRegisters; -+ -+#define MPI ((volatile MpiRegisters * const) MPI_BASE) -+ -+/* PCI configuration address space start offset 0x40 */ -+#define BRCM_PCI_CONFIG_TIMER 0x40 -+#define BRCM_PCI_CONFIG_TIMER_RETRY_MASK 0x0000FF00 -+#define BRCM_PCI_CONFIG_TIMER_TRDY_MASK 0x000000FF -+ -+/* -+** EMAC transmit MIB counters -+*/ -+typedef struct EmacTxMib { -+ uint32 tx_good_octets; /* (200) good byte count */ -+ uint32 tx_good_pkts; /* (204) good pkt count */ -+ uint32 tx_octets; /* (208) good and bad byte count */ -+ uint32 tx_pkts; /* (20c) good and bad pkt count */ -+ uint32 tx_broadcasts_pkts; /* (210) good broadcast packets */ -+ uint32 tx_multicasts_pkts; /* (214) good mulitcast packets */ -+ uint32 tx_len_64; /* (218) RMON tx pkt size buckets */ -+ uint32 tx_len_65_to_127; /* (21c) */ -+ uint32 tx_len_128_to_255; /* (220) */ -+ uint32 tx_len_256_to_511; /* (224) */ -+ uint32 tx_len_512_to_1023; /* (228) */ -+ uint32 tx_len_1024_to_max; /* (22c) */ -+ uint32 tx_jabber_pkts; /* (230) > 1518 with bad crc */ -+ uint32 tx_oversize_pkts; /* (234) > 1518 with good crc */ -+ uint32 tx_fragment_pkts; /* (238) < 63 with bad crc */ -+ uint32 tx_underruns; /* (23c) fifo underrun */ -+ uint32 tx_total_cols; /* (240) total collisions in all tx pkts */ -+ uint32 tx_single_cols; /* (244) tx pkts with single collisions */ -+ uint32 tx_multiple_cols; /* (248) tx pkts with multiple collisions */ -+ uint32 tx_excessive_cols; /* (24c) tx pkts with excessive cols */ -+ uint32 tx_late_cols; /* (250) tx pkts with late cols */ -+ uint32 tx_defered; /* (254) tx pkts deferred */ -+ uint32 tx_carrier_lost; /* (258) tx pkts with CRS lost */ -+ uint32 tx_pause_pkts; /* (25c) tx pause pkts sent */ -+#define NumEmacTxMibVars 24 -+} EmacTxMib; -+ -+/* -+** EMAC receive MIB counters -+*/ -+typedef struct EmacRxMib { -+ uint32 rx_good_octets; /* (280) good byte count */ -+ uint32 rx_good_pkts; /* (284) good pkt count */ -+ uint32 rx_octets; /* (288) good and bad byte count */ -+ uint32 rx_pkts; /* (28c) good and bad pkt count */ -+ uint32 rx_broadcasts_pkts; /* (290) good broadcast packets */ -+ uint32 rx_multicasts_pkts; /* (294) good mulitcast packets */ -+ uint32 rx_len_64; /* (298) RMON rx pkt size buckets */ -+ uint32 rx_len_65_to_127; /* (29c) */ -+ uint32 rx_len_128_to_255; /* (2a0) */ -+ uint32 rx_len_256_to_511; /* (2a4) */ -+ uint32 rx_len_512_to_1023; /* (2a8) */ -+ uint32 rx_len_1024_to_max; /* (2ac) */ -+ uint32 rx_jabber_pkts; /* (2b0) > 1518 with bad crc */ -+ uint32 rx_oversize_pkts; /* (2b4) > 1518 with good crc */ -+ uint32 rx_fragment_pkts; /* (2b8) < 63 with bad crc */ -+ uint32 rx_missed_pkts; /* (2bc) missed packets */ -+ uint32 rx_crc_align_errs; /* (2c0) both or either */ -+ uint32 rx_undersize; /* (2c4) < 63 with good crc */ -+ uint32 rx_crc_errs; /* (2c8) crc errors (only) */ -+ uint32 rx_align_errs; /* (2cc) alignment errors (only) */ -+ uint32 rx_symbol_errs; /* (2d0) pkts with RXERR assertions (symbol errs) */ -+ uint32 rx_pause_pkts; /* (2d4) MAC control, PAUSE */ -+ uint32 rx_nonpause_pkts; /* (2d8) MAC control, not PAUSE */ -+#define NumEmacRxMibVars 23 -+} EmacRxMib; -+ -+typedef struct EmacRegisters { -+ uint32 rxControl; /* (00) receive control */ -+#define EMAC_PM_REJ 0x80 /* - reject DA match in PMx regs */ -+#define EMAC_UNIFLOW 0x40 /* - accept cam match fc */ -+#define EMAC_FC_EN 0x20 /* - enable flow control */ -+#define EMAC_LOOPBACK 0x10 /* - loopback */ -+#define EMAC_PROM 0x08 /* - promiscuous */ -+#define EMAC_RDT 0x04 /* - ignore transmissions */ -+#define EMAC_ALL_MCAST 0x02 /* - ignore transmissions */ -+#define EMAC_NO_BCAST 0x01 /* - ignore transmissions */ -+ -+ -+ uint32 rxMaxLength; /* (04) receive max length */ -+ uint32 txMaxLength; /* (08) transmit max length */ -+ uint32 unused1[1]; -+ uint32 mdioFreq; /* (10) mdio frequency */ -+#define EMAC_MII_PRE_EN 0x00000080 /* prepend preamble sequence */ -+#define EMAC_MDIO_PRE 0x00000080 /* - enable MDIO preamble */ -+#define EMAC_MDC_FREQ 0x0000007f /* - mdio frequency */ -+ -+ uint32 mdioData; /* (14) mdio data */ -+#define MDIO_WR 0x50020000 /* - write framing */ -+#define MDIO_RD 0x60020000 /* - read framing */ -+#define MDIO_PMD_SHIFT 23 -+#define MDIO_REG_SHIFT 18 -+ -+ uint32 intMask; /* (18) int mask */ -+ uint32 intStatus; /* (1c) int status */ -+#define EMAC_FLOW_INT 0x04 /* - flow control event */ -+#define EMAC_MIB_INT 0x02 /* - mib event */ -+#define EMAC_MDIO_INT 0x01 /* - mdio event */ -+ -+ uint32 unused2[3]; -+ uint32 config; /* (2c) config */ -+#define EMAC_ENABLE 0x001 /* - enable emac */ -+#define EMAC_DISABLE 0x002 /* - disable emac */ -+#define EMAC_SOFT_RST 0x004 /* - soft reset */ -+#define EMAC_SOFT_RESET 0x004 /* - emac soft reset */ -+#define EMAC_EXT_PHY 0x008 /* - external PHY select */ -+ -+ uint32 txControl; /* (30) transmit control */ -+#define EMAC_FD 0x001 /* - full duplex */ -+#define EMAC_FLOWMODE 0x002 /* - flow mode */ -+#define EMAC_NOBKOFF 0x004 /* - no backoff in */ -+#define EMAC_SMALLSLT 0x008 /* - small slot time */ -+ -+ uint32 txThreshold; /* (34) transmit threshold */ -+ uint32 mibControl; /* (38) mib control */ -+#define EMAC_NO_CLEAR 0x001 /* don't clear on read */ -+ -+ uint32 unused3[7]; -+ -+ uint32 pm0DataLo; /* (58) perfect match 0 data lo */ -+ uint32 pm0DataHi; /* (5C) perfect match 0 data hi (15:0) */ -+ uint32 pm1DataLo; /* (60) perfect match 1 data lo */ -+ uint32 pm1DataHi; /* (64) perfect match 1 data hi (15:0) */ -+ uint32 pm2DataLo; /* (68) perfect match 2 data lo */ -+ uint32 pm2DataHi; /* (6C) perfect match 2 data hi (15:0) */ -+ uint32 pm3DataLo; /* (70) perfect match 3 data lo */ -+ uint32 pm3DataHi; /* (74) perfect match 3 data hi (15:0) */ -+#define EMAC_CAM_V 0x10000 /* - cam index */ -+#define EMAC_CAM_VALID 0x00010000 -+ -+ uint32 unused4[98]; /* (78-1fc) */ -+ -+ EmacTxMib tx_mib; /* (200) emac tx mib */ -+ uint32 unused5[8]; /* (260-27c) */ -+ -+ EmacRxMib rx_mib; /* (280) rx mib */ -+ -+} EmacRegisters; -+ -+/* register offsets for subrouting access */ -+#define EMAC_RX_CONTROL 0x00 -+#define EMAC_RX_MAX_LENGTH 0x04 -+#define EMAC_TX_MAC_LENGTH 0x08 -+#define EMAC_MDIO_FREQ 0x10 -+#define EMAC_MDIO_DATA 0x14 -+#define EMAC_INT_MASK 0x18 -+#define EMAC_INT_STATUS 0x1C -+#define EMAC_CAM_DATA_LO 0x20 -+#define EMAC_CAM_DATA_HI 0x24 -+#define EMAC_CAM_CONTROL 0x28 -+#define EMAC_CONTROL 0x2C -+#define EMAC_TX_CONTROL 0x30 -+#define EMAC_TX_THRESHOLD 0x34 -+#define EMAC_MIB_CONTROL 0x38 -+ -+ -+#define EMAC1 ((volatile EmacRegisters * const) EMAC1_BASE) -+#define EMAC2 ((volatile EmacRegisters * const) EMAC2_BASE) -+ -+/* -+** USB Registers -+*/ -+typedef struct UsbRegisters { -+ byte inttf_setting; -+ byte current_config; -+ uint16 status_frameNum; -+#define USB_LINK 0x2000 -+#define USB_BUS_RESET 0x1000 -+#define USB_SUSPENDED 0x0800 -+ byte unused1; -+ byte endpt_prnt; -+ byte endpt_dirn; -+ byte endpt_status; -+#define USB_ENDPOINT_0 0x01 -+#define USB_ENDPOINT_1 0x02 -+#define USB_ENDPOINT_2 0x04 -+#define USB_ENDPOINT_3 0x08 -+#define USB_ENDPOINT_4 0x10 -+#define USB_ENDPOINT_5 0x20 -+#define USB_ENDPOINT_6 0x40 -+#define USB_ENDPOINT_7 0x80 -+ uint32 unused2; -+ byte conf_mem_ctl; -+#define USB_CONF_MEM_RD 0x80 -+#define USB_CONF_MEM_RDY 0x40 -+ byte unused2a; -+ byte conf_mem_read_address; -+ byte conf_mem_write_address; -+ -+ byte unused3; -+ byte dev_req_bytesel; -+ uint16 ext_dev_data; -+ -+ byte unused4; -+ byte clr_fifo; -+ byte endpt_stall_reset; // use same endpoint #'s from above -+ byte usb_cntl; -+#define USB_FORCE_ERR 0x20 -+#define USB_SOFT_RESET 0x10 -+#define USB_RESUME 0x08 -+#define USB_COMMAND_ERR 0x04 -+#define USB_COMMAND_OVER 0x02 -+ byte irq_addr; -+ byte iso_out_in_addr; -+ byte blk_out_in_addr; -+ byte cntl_addr; -+ uint32 unusedx[2]; -+ uint32 tx_ram_write_port; -+ uint32 fifo_status; // (see bcm6348 data sheet for definition) -+ -+ uint32 irq_status; -+ uint32 irq_mask; -+#define USB_NEW_CONFIG 0x00000001 -+#define USB_SETUP_COMMAND_RECV 0x00000002 // non-standard setup cmd rcvd -+#define USB_OUT_FIFO_OV 0x00000004 -+#define USB_RESET_RECV 0x00000008 -+#define USB_SUSPEND_RECV 0x00000010 -+#define USB_FIFO_REWIND 0x00000020 -+#define USB_RX_BULK_FIFO_DATA_AVAIL 0x00000040 -+#define USB_RX_ISO_FIFO_DATA_AVAIL 0x00000080 -+#define USB_LINK_CHANGE 0x00010000 -+ uint32 endpt_cntl; -+#define USB_R_WK_EN 0x0100 -+#define USB_TX_EOP 0x0200 -+#define USB_TX_CNTL_DMA_EN 0x0400 -+#define USB_TX_BULK_DMA_EN 0x0800 -+#define USB_TX_ISO_DMA_EN 0x1000 -+#define USB_RX_CNTL_DMA_EN 0x2000 -+#define USB_RX_BULK_DMA_EN 0x4800 -+#define USB_RX_ISO_DMA_EN 0x8000 -+ uint32 rx_status_read_port; -+ uint32 confmem_read_port; -+ uint32 confmem_write_port; -+ uint32 fifo_ovf_count; -+ uint32 fifo_rewind_cnt; -+ uint32 terminal_count; -+} UsbRegisters; -+ -+#define USB ((volatile UsbRegisters * const) USB_CTL_BASE) -+ -+/* -+** ADSL core Registers -+*/ -+ -+#define _PADLINE(line) pad ## line -+#define _XSTR(line) _PADLINE(line) -+#define PAD _XSTR(__LINE__) -+ -+typedef struct AdslRegisters { -+ uint32 core_control; -+#define ADSL_RESET 0x01 -+ -+ uint32 core_status; -+#define ADSL_HOST_MSG 0x01 -+ -+ uint32 PAD; -+ uint32 bist_status; -+ uint32 PAD[4]; -+ uint32 int_status_i; /* 0x20 */ -+ uint32 int_mask_i; -+ uint32 int_status_f; -+ uint32 int_mask_f; -+#define ADSL_INT_HOST_MSG 0x00000020 -+#define ADSL_INT_DESC_ERR 0x00000400 -+#define ADSL_INT_DATA_ERR 0x00000800 -+#define ADSL_INT_DESC_PROTO_ERR 0x00001000 -+#define ADSL_INT_RCV_DESC_UF 0x00002000 -+#define ADSL_INT_RCV_FIFO_OF 0x00004000 -+#define ADSL_INT_XMT_FIFO_UF 0x00008000 -+#define ADSL_INT_RCV 0x00010000 -+#define ADSL_INT_XMT 0x01000000 -+ -+ uint32 PAD[116]; -+ -+ uint32 xmtcontrol_intr; /* 0x200 */ -+#define ADSL_DMA_XMT_EN 0x00000001 -+#define ADSL_DMA_XMT_LE 0x00000004 -+ uint32 xmtaddr_intr; -+#define ADSL_DMA_ADDR_MASK 0xFFFFF000 -+ uint32 xmtptr_intr; -+#define ADSL_DMA_LAST_DESC_MASK 0x00000FFF -+ uint32 xmtstatus_intr; -+#define ADSL_DMA_CURR_DESC_MASK 0x00000FFF -+#define ADSL_DMA_XMT_STATE_MASK 0x0000F000 -+#define ADSL_DMA_XMT_STATE_DIS 0x00000000 -+#define ADSL_DMA_XMT_STATE_ACT 0x00001000 -+#define ADSL_DMA_XMT_STATE_IDLE 0x00002000 -+#define ADSL_DMA_XMT_STATE_STOP 0x00003000 -+ -+#define ADSL_DMA_XMT_ERR_MASK 0x000F0000 -+#define ADSL_DMA_XMT_ERR_NONE 0x00000000 -+#define ADSL_DMA_XMT_ERR_DPE 0x00010000 -+#define ADSL_DMA_XMT_ERR_FIFO 0x00020000 -+#define ADSL_DMA_XMT_ERR_DTE 0x00030000 -+#define ADSL_DMA_XMT_ERR_DRE 0x00040000 -+ -+ uint32 rcvcontrol_intr; -+#define ADSL_DMA_RCV_EN 0x00000001 -+#define ADSL_DMA_RCV_FO 0x000000FE -+ uint32 rcvaddr_intr; -+ uint32 rcvptr_intr; -+ uint32 rcvstatus_intr; -+#define ADSL_DMA_RCV_STATE_MASK 0x0000F000 -+#define ADSL_DMA_RCV_STATE_DIS 0x00000000 -+#define ADSL_DMA_RCV_STATE_ACT 0x00001000 -+#define ADSL_DMA_RCV_STATE_IDLE 0x00002000 -+#define ADSL_DMA_RCV_STATE_STOP 0x00003000 -+ -+#define ADSL_DMA_RCV_ERR_MASK 0x000F0000 -+#define ADSL_DMA_RCV_ERR_NONE 0x00000000 -+#define ADSL_DMA_RCV_ERR_DPE 0x00010000 -+#define ADSL_DMA_RCV_ERR_FIFO 0x00020000 -+#define ADSL_DMA_RCV_ERR_DTE 0x00030000 -+#define ADSL_DMA_RCV_ERR_DRE 0x00040000 -+ -+ uint32 xmtcontrol_fast; -+ uint32 xmtaddr_fast; -+ uint32 xmtptr_fast; -+ uint32 xmtstatus_fast; -+ uint32 rcvcontrol_fast; -+ uint32 rcvaddr_fast; -+ uint32 rcvptr_fast; -+ uint32 rcvstatus_fast; -+ uint32 PAD[48]; -+ -+ uint32 host_message; /* 0x300 */ -+ uint32 PAD[805]; -+ uint32 core_reset; -+ uint32 core_error; -+ uint32 core_revision; -+ -+#define ADSL_CORE_REV 0x0000000F -+#define ADSL_CORE_TYPE 0x0000FFF0 -+} AdslRegisters; -+ -+#define ADSL ((volatile AdslRegisters * const) ADSL_BASE) -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/AdslMibDef.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/AdslMibDef.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/AdslMibDef.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/AdslMibDef.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,712 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/**************************************************************************** -+ * -+ * AdslMibOid.h -+ * -+ * Description: -+ * SNMP object identifiers for ADSL MIB and other related MIBs -+ * -+ * Copyright (c) 1993-1998 AltoCom, Inc. All rights reserved. -+ * Authors: Ilya Stomakhin -+ * -+ * $Revision: 1.17 $ -+ * -+ * $Id: AdslMibDef.h,v 1.17 2004/07/27 19:24:40 ilyas Exp $ -+ * -+ * $Log: AdslMibDef.h,v $ -+ * Revision 1.17 2004/07/27 19:24:40 ilyas -+ * Added AnnexM configuration option -+ * -+ * Revision 1.16 2004/06/04 18:56:01 ilyas -+ * Added counter for ADSL2 framing and performance -+ * -+ * Revision 1.15 2004/05/25 16:15:04 ilyas -+ * Added ADSL2 framing status -+ * -+ * Revision 1.14 2004/03/31 19:09:48 ilyas -+ * Added ADSL2+ modulation control -+ * -+ * Revision 1.13 2004/03/03 20:14:05 ilyas -+ * Merged changes for ADSL2+ from ADSL driver -+ * -+ * Revision 1.12 2003/10/17 21:02:12 ilyas -+ * Added more data for ADSL2 -+ * -+ * Revision 1.11 2003/10/14 00:55:27 ilyas -+ * Added UAS, LOSS, SES error seconds counters. -+ * Support for 512 tones (AnnexI) -+ * -+ * Revision 1.10 2003/09/29 18:39:51 ilyas -+ * Added new definitions for AnnexI -+ * -+ * Revision 1.9 2003/07/18 19:14:34 ilyas -+ * Merged with ADSL driver -+ * -+ * Revision 1.8 2003/07/08 18:34:16 ilyas -+ * Added fields to adsl configuration structure -+ * -+ * Revision 1.7 2003/03/25 00:07:00 ilyas -+ * Added "long" BERT supprt -+ * -+ * Revision 1.6 2003/02/27 07:10:52 ilyas -+ * Added more configuration and status parameters (for EFNT) -+ * -+ * Revision 1.5 2003/01/23 20:29:37 ilyas -+ * Added structure for ADSL PHY configuration command -+ * -+ * Revision 1.4 2002/11/13 21:32:49 ilyas -+ * Added adjustK support for Centillium non-standard framing mode -+ * -+ * Revision 1.3 2002/10/31 01:35:50 ilyas -+ * Fixed size of K for S=1/2 -+ * -+ * Revision 1.2 2002/10/05 03:28:31 ilyas -+ * Added extra definitions for Linux and VxWorks drivers. -+ * Added definitions for SelfTest support -+ * -+ * Revision 1.1 2002/07/20 00:51:41 ilyas -+ * Merged witchanges made for VxWorks/Linux driver. -+ * -+ * Revision 1.1 2001/12/21 22:39:30 ilyas -+ * Added support for ADSL MIB data objects (RFC2662) -+ * -+ * -+ *****************************************************************************/ -+ -+#ifndef AdslMibDefHeader -+#define AdslMibDefHeader -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+/* -+** -+** ADSL configuration parameters -+** -+*/ -+ -+#define kAdslCfgModMask (0x00000007 | 0x0000F000) -+#define kAdslCfgModAny 0x00000000 -+ -+#define kAdslCfgModGdmtOnly 0x00000001 -+#define kAdslCfgModGliteOnly 0x00000002 -+#define kAdslCfgModT1413Only 0x00000004 -+#define kAdslCfgModAnnexIOnly 0x00000004 -+#define kAdslCfgModAdsl2Only 0x00001000 -+#define kAdslCfgModAdsl2pOnly 0x00002000 -+ -+#define kAdslCfgBitmapMask 0x00000018 -+#define kAdslCfgDBM 0x00000000 -+#define kAdslCfgFBM 0x00000008 -+#define kAdslCfgFBMSoL 0x00000010 -+ -+#define kAdslCfgLinePairMask 0x00000020 -+#define kAdslCfgLineInnerPair 0x00000000 -+#define kAdslCfgLineOuterPair 0x00000020 -+ -+#define kAdslCfgCentilliumCRCWorkAroundMask 0x00000040 -+#define kAdslCfgCentilliumCRCWorkAroundDisabled 0x00000000 -+#define kAdslCfgCentilliumCRCWorkAroundEnabled 0x00000040 -+ -+#define kAdslCfgExtraData 0x00000080 -+#define kAdslCfgTrellisMask (0x00000100 | kAdslCfgExtraData) -+#define kAdslCfgTrellisOn (0x00000100 | kAdslCfgExtraData) -+#define kAdslCfgTrellisOff (0 | kAdslCfgExtraData) -+#define kAdslCfgExtraMask 0xFFFFFF80 -+ -+#define kAdslCfgLOSMonitoringMask 0x00000200 -+#define kAdslCfgLOSMonitoringOff 0x00000200 -+#define kAdslCfgLOSMonitoringOn 0x00000000 -+ -+#define kAdslCfgMarginMonitoringMask 0x00000400 -+#define kAdslCfgMarginMonitoringOn 0x00000400 -+#define kAdslCfgMarginMonitoringOff 0x00000000 -+ -+#define kAdslCfgDemodCapMask 0x00000800 -+#define kAdslCfgDemodCapOn 0x00000800 -+#define kAdslCfgDemodCapOff 0x00000000 -+ -+/* Flags 0x00001000 - 0x00008000 are reserved for modulation (see above) */ -+ -+/* Upstream mode flags 0x00010000 - 0x00030000 */ -+ -+#define kAdslCfgUpstreamModeMask 0x00030000 -+#define kAdslCfgUpstreamMax 0x00000000 -+#define kAdslCfgUpstreamSingle 0x00010000 -+#define kAdslCfgUpstreamDouble 0x00020000 -+#define kAdslCfgUpstreamTriple 0x00030000 -+ -+#define kAdslCfgNoSpectrumOverlap 0x00040000 -+ -+/* Pwm sync clock configuration */ -+ -+#define kAdslCfgPwmSyncClockMask 0x00080000 -+#define kAdslCfgPwmSyncClockOn 0x00080000 -+#define kAdslCfgPwmSyncClockOff 0x00000000 -+ -+#define kAdslCfgDefaultTrainingMargin -1 -+#define kAdslCfgDefaultShowtimeMargin -1 -+#define kAdslCfgDefaultLOMTimeThld -1 -+ -+/* ADSL2 parameters */ -+ -+#define kAdsl2CfgReachExOn 0x00000001 -+#define kAdsl2CfgAnnexMEnabled 0x00000002 -+ -+typedef struct _adslCfgProfile { -+ long adslAnnexCParam; -+ long adslAnnexAParam; -+ long adslTrainingMarginQ4; -+ long adslShowtimeMarginQ4; -+ long adslLOMTimeThldSec; -+ long adslDemodCapMask; -+ long adslDemodCapValue; -+ long adsl2Param; -+ long adslPwmSyncClockFreq; -+} adslCfgProfile; -+ -+/* -+** -+** ADSL PHY configuration -+** -+*/ -+ -+typedef struct _adslPhyCfg { -+ long demodCapMask; -+ long demodCap; -+} adslPhyCfg; -+ -+/* -+** -+** ADSL version info parameters -+** -+*/ -+ -+#define kAdslVersionStringSize 32 -+ -+#define kAdslTypeUnknown 0 -+#define kAdslTypeAnnexA 1 -+#define kAdslTypeAnnexB 2 -+#define kAdslTypeAnnexC 3 -+#define kAdslTypeSADSL 4 -+ -+typedef struct _adslVersionInfo { -+ unsigned short phyType; -+ unsigned short phyMjVerNum; -+ unsigned short phyMnVerNum; -+ char phyVerStr[kAdslVersionStringSize]; -+ unsigned short drvMjVerNum; -+ unsigned short drvMnVerNum; -+ char drvVerStr[kAdslVersionStringSize]; -+} adslVersionInfo; -+ -+/* -+** -+** ADSL self-test parameters -+** -+*/ -+ -+#define kAdslSelfTestLMEM 0x00000001 -+#define kAdslSelfTestSDRAM 0x00000002 -+#define kAdslSelfTestAFE 0x00000004 -+#define kAdslSelfTestQproc 0x00000008 -+#define kAdslSelfTestRS 0x00000010 -+#define kAdslSelfTestHostDma 0x00000020 -+ -+#define kAdslSelfTestAll ((kAdslSelfTestHostDma - 1) | kAdslSelfTestHostDma) -+ -+#define kAdslSelfTestInProgress 0x40000000 -+#define kAdslSelfTestCompleted 0x80000000 -+ -+/* MIB OID's for ADSL objects */ -+ -+#define kOidMaxObjLen 80 -+ -+#define kOidAdsl 94 -+#define kOidAdslInterleave 124 -+#define kOidAdslFast 125 -+#define kOidAtm 37 -+#define kOidAdslPrivate 255 -+#define kOidAdslPrivatePartial 254 -+ -+#define kAdslMibAnnexAToneNum 256 -+#define kAdslMibToneNum kAdslMibAnnexAToneNum -+#define kAdslMibMaxToneNum kAdslMibAnnexAToneNum*2*2 -+ -+#define kOidAdslPrivSNR 1 -+#define kOidAdslPrivBitAlloc 2 -+#define kOidAdslPrivGain 3 -+#define kOidAdslPrivShowtimeMargin 4 -+#define kOidAdslPrivChanCharLin 5 -+#define kOidAdslPrivChanCharLog 6 -+#define kOidAdslPrivQuietLineNoise 7 -+#define kOidAdslPrivExtraInfo 255 -+ -+#define kOidAdslLine 1 -+#define kOidAdslMibObjects 1 -+ -+#define kOidAdslLineTable 1 -+#define kOidAdslLineEntry 1 -+#define kOidAdslLineCoding 1 -+#define kOidAdslLineType 2 -+#define kOidAdslLineSpecific 3 -+#define kOidAdslLineConfProfile 4 -+#define kOidAdslLineAlarmConfProfile 5 -+ -+#define kOidAdslAtucPhysTable 2 -+#define kOidAdslAturPhysTable 3 -+#define kOidAdslPhysEntry 1 -+#define kOidAdslPhysInvSerialNumber 1 -+#define kOidAdslPhysInvVendorID 2 -+#define kOidAdslPhysInvVersionNumber 3 -+#define kOidAdslPhysCurrSnrMgn 4 -+#define kOidAdslPhysCurrAtn 5 -+#define kOidAdslPhysCurrStatus 6 -+#define kOidAdslPhysCurrOutputPwr 7 -+#define kOidAdslPhysCurrAttainableRate 8 -+ -+#define kOidAdslAtucChanTable 4 -+#define kOidAdslAturChanTable 5 -+#define kOidAdslChanEntry 1 -+#define kOidAdslChanInterleaveDelay 1 -+#define kOidAdslChanCurrTxRate 2 -+#define kOidAdslChanPrevTxRate 3 -+#define kOidAdslChanCrcBlockLength 4 -+ -+#define kOidAdslAtucPerfDataTable 6 -+#define kOidAdslAturPerfDataTable 7 -+#define kOidAdslPerfDataEntry 1 -+#define kOidAdslPerfLofs 1 -+#define kOidAdslPerfLoss 2 -+#define kOidAdslPerfLprs 3 -+#define kOidAdslPerfESs 4 -+#define kOidAdslPerfValidIntervals 5 -+#define kOidAdslPerfInvalidIntervals 6 -+#define kOidAdslPerfCurr15MinTimeElapsed 7 -+#define kOidAdslPerfCurr15MinLofs 8 -+#define kOidAdslPerfCurr15MinLoss 9 -+#define kOidAdslPerfCurr15MinLprs 10 -+#define kOidAdslPerfCurr15MinESs 11 -+#define kOidAdslPerfCurr1DayTimeElapsed 12 -+#define kOidAdslPerfCurr1DayLofs 13 -+#define kOidAdslPerfCurr1DayLoss 14 -+#define kOidAdslPerfCurr1DayLprs 15 -+#define kOidAdslPerfCurr1DayESs 16 -+#define kOidAdslPerfPrev1DayMoniSecs 17 -+#define kOidAdslPerfPrev1DayLofs 18 -+#define kOidAdslPerfPrev1DayLoss 19 -+#define kOidAdslPerfPrev1DayLprs 20 -+#define kOidAdslPerfPrev1DayESs 21 -+ -+#define kOidAdslAtucPerfIntervalTable 8 -+#define kOidAdslAturPerfIntervalTable 9 -+#define kOidAdslPerfIntervalEntry 1 -+#define kOidAdslIntervalNumber 1 -+#define kOidAdslIntervalLofs 2 -+#define kOidAdslIntervalLoss 3 -+#define kOidAdslIntervalLprs 4 -+#define kOidAdslIntervalESs 5 -+#define kOidAdslIntervalValidData 6 -+ -+#define kOidAdslAtucChanPerfTable 10 -+#define kOidAdslAturChanPerfTable 11 -+#define kOidAdslChanPerfEntry 1 -+#define kOidAdslChanReceivedBlks 1 -+#define kOidAdslChanTransmittedBlks 2 -+#define kOidAdslChanCorrectedBlks 3 -+#define kOidAdslChanUncorrectBlks 4 -+#define kOidAdslChanPerfValidIntervals 5 -+#define kOidAdslChanPerfInvalidIntervals 6 -+#define kOidAdslChanPerfCurr15MinTimeElapsed 7 -+#define kOidAdslChanPerfCurr15MinReceivedBlks 8 -+#define kOidAdslChanPerfCurr15MinTransmittedBlks 9 -+#define kOidAdslChanPerfCurr15MinCorrectedBlks 10 -+#define kOidAdslChanPerfCurr15MinUncorrectBlks 11 -+#define kOidAdslChanPerfCurr1DayTimeElapsed 12 -+#define kOidAdslChanPerfCurr1DayReceivedBlks 13 -+#define kOidAdslChanPerfCurr1DayTransmittedBlks 14 -+#define kOidAdslChanPerfCurr1DayCorrectedBlks 15 -+#define kOidAdslChanPerfCurr1DayUncorrectBlks 16 -+#define kOidAdslChanPerfPrev1DayMoniSecs 17 -+#define kOidAdslChanPerfPrev1DayReceivedBlks 18 -+#define kOidAdslChanPerfPrev1DayTransmittedBlks 19 -+#define kOidAdslChanPerfPrev1DayCorrectedBlks 20 -+#define kOidAdslChanPerfPrev1DayUncorrectBlks 21 -+ -+#define kOidAdslAtucChanIntervalTable 12 -+#define kOidAdslAturChanIntervalTable 13 -+#define kOidAdslChanIntervalEntry 1 -+#define kOidAdslChanIntervalNumber 1 -+#define kOidAdslChanIntervalReceivedBlks 2 -+#define kOidAdslChanIntervalTransmittedBlks 3 -+#define kOidAdslChanIntervalCorrectedBlks 4 -+#define kOidAdslChanIntervalUncorrectBlks 5 -+#define kOidAdslChanIntervalValidData 6 -+ -+#define kOidAtmMibObjects 1 -+#define kOidAtmTcTable 4 -+#define kOidAtmTcEntry 1 -+#define kOidAtmOcdEvents 1 -+#define kOidAtmAlarmState 2 -+ -+/* Adsl Channel coding */ -+ -+#define kAdslRcvDir 0 -+#define kAdslXmtDir 1 -+ -+#define kAdslRcvActive (1 << kAdslRcvDir) -+#define kAdslXmtActive (1 << kAdslXmtDir) -+ -+#define kAdslIntlChannel 0 -+#define kAdslFastChannel 1 -+ -+#define kAdslTrellisOff 0 -+#define kAdslTrellisOn 1 -+ -+/* AnnexC modulation and bitmap types for the field (adslConnection.modType) */ -+ -+#define kAdslModMask 0x7 -+ -+#define kAdslModGdmt 0 -+#define kAdslModT1413 1 -+#define kAdslModGlite 2 -+#define kAdslModAnnexI 3 -+#define kAdslModAdsl2 4 -+#define kAdslModAdsl2p 5 -+#define kAdslModReAdsl2 6 -+ -+#define kAdslBitmapShift 3 -+#define kAdslBitmapMask kAdslCfgBitmapMask -+#define kAdslDBM (0 << kAdslBitmapShift) -+#define kAdslFBM (1 << kAdslBitmapShift) -+#define kAdslFBMSoL (2 << kAdslBitmapShift) -+ -+#define kAdslUpstreamModeShift 5 -+#define kAdslUpstreamModeMask (3 << kAdslUpstreamModeShift) -+#define kAdslUpstreamModeSingle (0 << kAdslUpstreamModeShift) -+#define kAdslUpstreamModeDouble (1 << kAdslUpstreamModeShift) -+#define kAdslUpstreamModeTriple (2 << kAdslUpstreamModeShift) -+ -+/* AdslLineCodingType definitions */ -+ -+#define kAdslLineCodingOther 1 -+#define kAdslLineCodingDMT 2 -+#define kAdslLineCodingCAP 3 -+#define kAdslLineCodingQAM 4 -+ -+/* AdslLineType definitions */ -+ -+#define kAdslLineTypeNoChannel 1 -+#define kAdslLineTypeFastOnly 2 -+#define kAdslLineTypeIntlOnly 3 -+#define kAdslLineTypeFastOrIntl 4 -+#define kAdslLineTypeFastAndIntl 5 -+ -+typedef struct _adslLineEntry { -+ unsigned char adslLineCoding; -+ unsigned char adslLineType; -+} adslLineEntry; -+ -+ -+/* AdslPhys status definitions */ -+ -+#define kAdslPhysStatusNoDefect (1 << 0) -+#define kAdslPhysStatusLOF (1 << 1) /* lossOfFraming (not receiving valid frame) */ -+#define kAdslPhysStatusLOS (1 << 2) /* lossOfSignal (not receiving signal) */ -+#define kAdslPhysStatusLPR (1 << 3) /* lossOfPower */ -+#define kAdslPhysStatusLOSQ (1 << 4) /* lossOfSignalQuality */ -+#define kAdslPhysStatusLOM (1 << 5) /* lossOfMargin */ -+ -+typedef struct _adslPhysEntry { -+ long adslCurrSnrMgn; -+ long adslCurrAtn; -+ long adslCurrStatus; -+ long adslCurrOutputPwr; -+ long adslCurrAttainableRate; -+} adslPhysEntry; -+ -+#define kAdslPhysVendorIdLen 8 -+#define kAdslPhysSerialNumLen 32 -+#define kAdslPhysVersionNumLen 32 -+ -+typedef struct _adslFullPhysEntry { -+ char adslSerialNumber[kAdslPhysSerialNumLen]; -+ char adslVendorID[kAdslPhysVendorIdLen]; -+ char adslVersionNumber[kAdslPhysVersionNumLen]; -+ long adslCurrSnrMgn; -+ long adslCurrAtn; -+ long adslCurrStatus; -+ long adslCurrOutputPwr; -+ long adslCurrAttainableRate; -+} adslFullPhysEntry; -+ -+/* Adsl channel entry definitions */ -+ -+typedef struct _adslChanEntry { -+ unsigned long adslChanIntlDelay; -+ unsigned long adslChanCurrTxRate; -+ unsigned long adslChanPrevTxRate; -+ unsigned long adslChanCrcBlockLength; -+} adslChanEntry; -+ -+/* Adsl performance data definitions */ -+ -+typedef struct _adslPerfCounters { -+ unsigned long adslLofs; -+ unsigned long adslLoss; -+ unsigned long adslLols; /* Loss of Link failures (ATUC only) */ -+ unsigned long adslLprs; -+ unsigned long adslESs; /* Count of Errored Seconds */ -+ unsigned long adslInits; /* Count of Line initialization attempts (ATUC only) */ -+ unsigned long adslUAS; /* Count of Unavailable Seconds */ -+ unsigned long adslSES; /* Count of Severely Errored Seconds */ -+ unsigned long adslLOSS; /* Count of LOS seconds */ -+ unsigned long adslFECs; /* Count of FEC seconds */ -+} adslPerfCounters; -+ -+typedef struct _adslPerfDataEntry { -+ adslPerfCounters perfTotal; -+ unsigned long adslPerfValidIntervals; -+ unsigned long adslPerfInvalidIntervals; -+ adslPerfCounters perfCurr15Min; -+ unsigned long adslPerfCurr15MinTimeElapsed; -+ adslPerfCounters perfCurr1Day; -+ unsigned long adslPerfCurr1DayTimeElapsed; -+ adslPerfCounters perfPrev1Day; -+ unsigned long adslAturPerfPrev1DayMoniSecs; -+} adslPerfDataEntry; -+ -+#define kAdslMibPerfIntervals 4 -+ -+/* Adsl channel performance data definitions */ -+ -+typedef struct _adslChanCounters { -+ unsigned long adslChanReceivedBlks; -+ unsigned long adslChanTransmittedBlks; -+ unsigned long adslChanCorrectedBlks; -+ unsigned long adslChanUncorrectBlks; -+} adslChanCounters; -+ -+typedef struct _adslChanPerfDataEntry { -+ adslChanCounters perfTotal; -+ unsigned long adslChanPerfValidIntervals; -+ unsigned long adslChanPerfInvalidIntervals; -+ adslChanCounters perfCurr15Min; -+ unsigned long adslPerfCurr15MinTimeElapsed; -+ adslChanCounters perfCurr1Day; -+ unsigned long adslPerfCurr1DayTimeElapsed; -+ adslChanCounters perfPrev1Day; -+ unsigned long adslAturPerfPrev1DayMoniSecs; -+} adslChanPerfDataEntry; -+ -+#define kAdslMibChanPerfIntervals 4 -+ -+/* Adsl trap threshold definitions */ -+ -+#define kAdslEventLinkChange 0x001 -+#define kAdslEventRateChange 0x002 -+#define kAdslEventLofThresh 0x004 -+#define kAdslEventLosThresh 0x008 -+#define kAdslEventLprThresh 0x010 -+#define kAdslEventESThresh 0x020 -+#define kAdslEventFastUpThresh 0x040 -+#define kAdslEventIntlUpThresh 0x080 -+#define kAdslEventFastDownThresh 0x100 -+#define kAdslEventIntlDwonThresh 0x200 -+ -+typedef struct _adslThreshCounters { -+ unsigned long adslThreshLofs; -+ unsigned long adslThreshLoss; -+ unsigned long adslThreshLols; /* Loss of Link failures (ATUC only) */ -+ unsigned long adslThreshLprs; -+ unsigned long adslThreshESs; -+ unsigned long adslThreshFastRateUp; -+ unsigned long adslThreshIntlRateUp; -+ unsigned long adslThreshFastRateDown; -+ unsigned long adslThreshIntlRateDown; -+} adslThreshCounters; -+ -+ -+/* Atm PHY performance data definitions */ -+ -+#define kAtmPhyStateNoAlarm 1 -+#define kAtmPhyStateLcdFailure 2 -+ -+typedef struct _atmPhyDataEntrty { -+ unsigned long atmInterfaceOCDEvents; -+ unsigned long atmInterfaceTCAlarmState; -+} atmPhyDataEntrty; -+ -+typedef struct _adslBertResults { -+ unsigned long bertTotalBits; -+ unsigned long bertErrBits; -+} adslBertResults; -+ -+typedef struct { -+ unsigned long cntHi; -+ unsigned long cntLo; -+} cnt64; -+ -+typedef struct _adslBertStatusEx { -+ unsigned long bertSecTotal; -+ unsigned long bertSecElapsed; -+ unsigned long bertSecCur; -+ cnt64 bertTotalBits; -+ cnt64 bertErrBits; -+} adslBertStatusEx; -+ -+typedef struct _adslDataConnectionInfo { -+ unsigned short K; -+ unsigned char S, R, D; -+} adslDataConnectionInfo; -+ -+typedef struct _adslConnectionInfo { -+ unsigned char chType; /* fast or interleaved */ -+ unsigned char modType; /* modulation type: G.DMT or T1.413 */ -+ unsigned char trellisCoding; /* off(0) or on(1) */ -+ adslDataConnectionInfo rcvInfo; -+ adslDataConnectionInfo xmtInfo; -+} adslConnectionInfo; -+ -+typedef struct _adsl2DataConnectionInfo { -+ unsigned char Nlp; -+ unsigned char Nbc; -+ unsigned char MSGlp; -+ unsigned short MSGc; -+ -+ unsigned long L; -+ unsigned short M; -+ unsigned short T; -+ unsigned short D; -+ unsigned short R; -+ unsigned short B; -+} adsl2DataConnectionInfo; -+ -+typedef struct _adsl2ConnectionInfo { -+ long adsl2Mode; -+ long rcvRate; -+ long xmtRate; -+ unsigned char pwrState; /* Lx state: x = 0..3 */ -+ adsl2DataConnectionInfo rcv2Info; -+ adsl2DataConnectionInfo xmt2Info; -+} adsl2ConnectionInfo; -+ -+typedef struct _adslConnectionDataStat { -+ unsigned long cntRS; -+ unsigned long cntRSCor; -+ unsigned long cntRSUncor; -+ unsigned long cntSF; -+ unsigned long cntSFErr; -+} adslConnectionDataStat; -+ -+typedef struct _adslConnectionStat { -+ adslConnectionDataStat rcvStat; -+ adslConnectionDataStat xmtStat; -+} adslConnectionStat; -+ -+typedef struct _atmConnectionDataStat { -+ unsigned long cntHEC; -+ unsigned long cntOCD; -+ unsigned long cntLCD; -+ unsigned long cntES; -+ unsigned long cntCellTotal; -+ unsigned long cntCellData; -+ unsigned long cntCellDrop; -+ unsigned long cntBitErrs; -+} atmConnectionDataStat; -+ -+typedef struct _atmConnectionStat { -+ atmConnectionDataStat rcvStat; -+ atmConnectionDataStat xmtStat; -+} atmConnectionStat; -+ -+#define kAdslFramingModeMask 0x0F -+#define kAtmFramingModeMask 0xF0 -+#define kAtmHeaderCompression 0x80 -+ -+/* ADSL2 data */ -+ -+typedef struct _adslDiagModeData { -+ long loopAttn; -+ long signalAttn; -+ long snrMargin; -+ long attnDataRate; -+ long actXmtPower; -+ long hlinScaleFactor; -+} adslDiagModeData; -+ -+/* AdslMibGetObjectValue return codes */ -+ -+#define kAdslMibStatusSuccess 0 -+#define kAdslMibStatusFailure -1 -+#define kAdslMibStatusNoObject -2 -+#define kAdslMibStatusObjectInvalid -3 -+#define kAdslMibStatusBufferTooSmall -4 -+#define kAdslMibStatusLastError -4 -+ -+/* Adsl training codes */ -+ -+#define kAdslTrainingIdle 0 -+#define kAdslTrainingG994 1 -+#define kAdslTrainingG992Started 2 -+#define kAdslTrainingG992ChanAnalysis 3 -+#define kAdslTrainingG992Exchange 4 -+#define kAdslTrainingConnected 5 -+ -+/* Global info structure */ -+ -+typedef struct _adslMibInfo { -+ adslLineEntry adslLine; -+ adslPhysEntry adslPhys; -+ adslChanEntry adslChanIntl; -+ adslChanEntry adslChanFast; -+ adslPerfDataEntry adslPerfData; -+ adslPerfCounters adslPerfIntervals[kAdslMibPerfIntervals]; -+ adslChanPerfDataEntry adslChanIntlPerfData; -+ adslChanPerfDataEntry adslChanFastPerfData; -+ adslChanCounters adslChanIntlPerfIntervals[kAdslMibChanPerfIntervals]; -+ adslChanCounters adslChanFastPerfIntervals[kAdslMibChanPerfIntervals]; -+ -+ adslThreshCounters adslAlarm; -+ -+ atmPhyDataEntrty adslChanIntlAtmPhyData; -+ atmPhyDataEntrty adslChanFastAtmPhyData; -+ -+ adslBertResults adslBertRes; -+ -+ adslConnectionInfo adslConnection; -+ adslConnectionStat adslStat; -+ unsigned char adslTrainingState; -+ atmConnectionStat atmStat; -+ -+ adslFullPhysEntry adslAtucPhys; -+ unsigned char adslRxNonStdFramingAdjustK; -+ unsigned char adslFramingMode; -+ adslBertStatusEx adslBertStatus; -+ long afeRxPgaGainQ1; -+ -+ adslDiagModeData adslDiag; -+ adsl2ConnectionInfo adsl2Info; -+ adslPerfCounters adslTxPerfTotal; -+} adslMibInfo; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif /* AdslMibDefHeader */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/DiagDef.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/DiagDef.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/DiagDef.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/DiagDef.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,209 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+ -+/******************************************************************* -+ * DiagDef.h -+ * -+ * Description: -+ * Diag definitions -+ * -+ * $Revision: 1.22 $ -+ * -+ * $Id: DiagDef.h,v 1.22 2004/10/16 23:43:19 ilyas Exp $ -+ * -+ * $Log: DiagDef.h,v $ -+ * Revision 1.22 2004/10/16 23:43:19 ilyas -+ * Added playback resume command -+ * -+ * Revision 1.21 2004/10/16 23:24:08 ilyas -+ * Improved FileRead command support for LOG file playback (RecordTest on the board) -+ * -+ * Revision 1.20 2004/04/28 16:52:32 ilyas -+ * Added GDB frame processing -+ * -+ * Revision 1.19 2004/03/10 22:26:53 ilyas -+ * Added command-line parameter for IP port number. -+ * Added proxy remote termination -+ * -+ * Revision 1.18 2004/01/24 23:41:37 ilyas -+ * Added DIAG_DEBUG_CMD_LOG_SAMPLES debug command -+ * -+ * Revision 1.17 2003/11/19 02:25:45 ilyas -+ * Added definitions for LOG frame retransmission, time, ADSL2 plots -+ * -+ * Revision 1.16 2003/11/14 18:46:05 ilyas -+ * Added G992p3 debug commands -+ * -+ * Revision 1.15 2003/10/02 19:50:41 ilyas -+ * Added support for buffering data for AnnexI and statistical counters -+ * -+ * Revision 1.14 2003/09/03 19:45:11 ilyas -+ * To refuse connection with older protocol versions -+ * -+ * Revision 1.13 2003/08/30 00:12:39 ilyas -+ * Added support for running chip test regressions via DslDiags -+ * -+ * Revision 1.12 2003/08/12 00:19:28 ilyas -+ * Improved image downloading protocol. -+ * Added DEBUG command support -+ * -+ * Revision 1.11 2003/04/11 00:37:24 ilyas -+ * Added DiagProtoFrame definition -+ * -+ * Revision 1.10 2003/03/25 00:10:07 ilyas -+ * Added command for "long" BERT test -+ * -+ * Revision 1.9 2003/01/30 03:29:32 ilyas -+ * Added PHY_CFG support and fixed printing showtime counters -+ * -+ * Revision 1.8 2002/12/16 20:56:38 ilyas -+ * Added support for binary statuses -+ * -+ * Revision 1.7 2002/12/06 20:19:13 ilyas -+ * Added support for binary statuses and scrambled status strings -+ * -+ * Revision 1.6 2002/11/05 00:18:27 ilyas -+ * Added configuration dialog box for Eye tone selection. -+ * Added Centillium CRC workaround to AnnexC config dialog -+ * Bit allocation update on bit swap messages -+ * -+ * Revision 1.5 2002/07/30 23:23:43 ilyas -+ * Implemented DIAG configuration command for AnnexA and AnnexC -+ * -+ * Revision 1.4 2002/07/30 22:47:15 ilyas -+ * Added DIAG command for configuration -+ * -+ * Revision 1.3 2002/07/15 23:52:51 ilyas -+ * iAdded switch RJ11 pair command -+ * -+ * Revision 1.2 2002/04/25 17:55:51 ilyas -+ * Added mibGet command -+ * -+ * Revision 1.1 2002/04/02 22:56:39 ilyas -+ * Support DIAG connection at any time; BERT commands -+ * -+ * -+ ******************************************************************/ -+ -+#define LOG_PROTO_ID "*L" -+ -+#define DIAG_PARTY_ID_MASK 0x01 -+#define LOG_PARTY_CLIENT 0x01 -+#define LOG_PARTY_SERVER 0x00 -+ -+#define DIAG_DATA_MASK 0x0E -+#define DIAG_DATA_LOG 0x02 -+#define DIAG_DATA_EYE 0x04 -+#define DIAG_DATA_LOG_TIME 0x08 -+ -+#define DIAG_DATA_EX 0x80 -+#define DIAG_PARTY_ID_MASK_EX (DIAG_DATA_EX | DIAG_PARTY_ID_MASK) -+#define LOG_PARTY_SERVER_EX (DIAG_DATA_EX | LOG_PARTY_SERVER) -+ -+#define DIAG_ACK_FRAME_ACK_MASK 0x000000FF -+#define DIAG_ACK_FRAME_RCV_SHIFT 8 -+#define DIAG_ACK_FRAME_RCV_MASK 0x0000FF00 -+#define DIAG_ACK_FRAME_RCV_PRESENT 0x00010000 -+#define DIAG_ACK_TIMEOUT -1 -+#define DIAG_ACK_LEN_INDICATION -1 -+ -+#define LOG_CMD_GDB 236 -+#define LOG_CMD_PROXY 237 -+#define LOG_CMD_RETR 238 -+#define LOG_CMD_DEBUG 239 -+#define LOG_CMD_BERT_EX 240 -+#define LOG_CMD_CFG_PHY 241 -+#define LOG_CMD_RESET 242 -+#define LOG_CMD_SCRAMBLED_STRING 243 -+#define LOG_CMD_EYE_CFG 244 -+#define LOG_CMD_CONFIG_A 245 -+#define LOG_CMD_CONFIG_C 246 -+#define LOG_CMD_SWITCH_RJ11_PAIR 247 -+#define LOG_CMD_MIB_GET 248 -+#define LOG_CMD_LOG_STOP 249 -+#define LOG_CMD_PING_REQ 250 -+#define LOG_CMD_PING_RSP 251 -+#define LOG_CMD_DISCONNECT 252 -+#define LOG_CMD_STRING_DATA 253 -+#define LOG_CMD_TEST_DATA 254 -+#define LOG_CMD_CONNECT 255 -+ -+typedef struct _LogProtoHeader { -+ unsigned char logProtoId[2]; -+ unsigned char logPartyId; -+ unsigned char logCommmand; -+} LogProtoHeader; -+ -+#define LOG_FILE_PORT 5100 -+#define LOG_MAX_BUF_SIZE 1400 -+#define LOG_MAX_DATA_SIZE (LOG_MAX_BUF_SIZE - sizeof(LogProtoHeader)) -+ -+typedef struct { -+ LogProtoHeader diagHdr; -+ unsigned char diagData[LOG_MAX_DATA_SIZE]; -+} DiagProtoFrame; -+ -+#define DIAG_PROXY_TERMINATE 1 -+ -+#define DIAG_DEBUG_CMD_READ_MEM 1 -+#define DIAG_DEBUG_CMD_SET_MEM 2 -+#define DIAG_DEBUG_CMD_RESET_CONNECTION 3 -+#define DIAG_DEBUG_CMD_RESET_PHY 4 -+#define DIAG_DEBUG_CMD_RESET_CHIP 5 -+#define DIAG_DEBUG_CMD_EXEC_FUNC 6 -+#define DIAG_DEBUG_CMD_EXEC_ADSL_FUNC 7 -+#define DIAG_DEBUG_CMD_WRITE_FILE 8 -+#define DIAG_DEBUG_CMD_G992P3_DEBUG 9 -+#define DIAG_DEBUG_CMD_G992P3_DIAG_MODE 10 -+#define DIAG_DEBUG_CMD_CLEAR_TIME 11 -+#define DIAG_DEBUG_CMD_PRINT_TIME 12 -+#define DIAG_DEBUG_CMD_LOG_SAMPLES 13 -+ -+#define DIAG_DEBUG_CMD_PLAYBACK_STOP 14 -+#define DIAG_DEBUG_CMD_PLAYBACK_RESUME 15 -+ -+#define DIAG_DEBUG_CMD_PRINT_STAT 21 -+#define DIAG_DEBUG_CMD_CLEAR_STAT 22 -+ -+typedef struct { -+ unsigned short cmd; -+ unsigned short cmdId; -+ unsigned long param1; -+ unsigned long param2; -+ unsigned char diagData[1]; -+} DiagDebugData; -+ -+#define DIAG_TEST_CMD_LOAD 101 -+#define DIAG_TEST_CMD_READ 102 -+#define DIAG_TEST_CMD_WRITE 103 -+#define DIAG_TEST_CMD_APPEND 104 -+#define DIAG_TEST_CMD_TEST_COMPLETE 105 -+ -+#define DIAG_TEST_FILENAME_LEN 64 -+ -+typedef struct { -+ unsigned short cmd; -+ unsigned short cmdId; -+ unsigned long offset; -+ unsigned long len; -+ unsigned long bufPtr; -+ char fileName[DIAG_TEST_FILENAME_LEN]; -+} DiagTestData; -+ -+typedef struct { -+ unsigned long frStart; -+ unsigned long frNum; -+} DiagLogRetrData; -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/adsldrv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/adsldrv.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/adsldrv.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/adsldrv.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,203 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/*************************************************************************** -+ * File Name : AdslDrv.h -+ * -+ * Description: This file contains the definitions and structures for the -+ * Linux IOCTL interface that used between the user mode ADSL -+ * API library and the kernel ADSL API driver. -+ * -+ * Updates : 11/02/2001 lkaplan. Created. -+ ***************************************************************************/ -+ -+#if !defined(_ADSLDRV_H_) -+#define _ADSLDRV_H_ -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+/* Incldes. */ -+#include <bcmadsl.h> -+ -+/* Defines. */ -+#define DSL_IFNAME "dsl0" -+#define ADSLDRV_MAJOR 208 /* arbitrary unused value */ -+ -+#define ADSLIOCTL_CHECK \ -+ _IOR(ADSLDRV_MAJOR, 0, ADSLDRV_STATUS_ONLY) -+#define ADSLIOCTL_INITIALIZE \ -+ _IOWR(ADSLDRV_MAJOR, 1, ADSLDRV_INITIALIZE) -+#define ADSLIOCTL_UNINITIALIZE \ -+ _IOR(ADSLDRV_MAJOR, 2, ADSLDRV_STATUS_ONLY) -+#define ADSLIOCTL_CONNECTION_START \ -+ _IOWR(ADSLDRV_MAJOR, 3, ADSLDRV_STATUS_ONLY) -+#define ADSLIOCTL_CONNECTION_STOP \ -+ _IOR(ADSLDRV_MAJOR, 4, ADSLDRV_STATUS_ONLY) -+#define ADSLIOCTL_GET_PHY_ADDR \ -+ _IOR(ADSLDRV_MAJOR, 5, ADSLDRV_PHY_ADDR) -+#define ADSLIOCTL_SET_PHY_ADDR \ -+ _IOWR(ADSLDRV_MAJOR, 6, ADSLDRV_PHY_ADDR) -+#define ADSLIOCTL_MAP_ATM_PORT_IDS \ -+ _IOWR(ADSLDRV_MAJOR, 7, ADSLDRV_MAP_ATM_PORT) -+#define ADSLIOCTL_GET_CONNECTION_INFO \ -+ _IOR(ADSLDRV_MAJOR, 8, ADSLDRV_CONNECTION_INFO) -+#define ADSLIOCTL_DIAG_COMMAND \ -+ _IOR(ADSLDRV_MAJOR, 9, ADSLDRV_DIAG) -+#define ADSLIOCTL_GET_OBJ_VALUE \ -+ _IOR(ADSLDRV_MAJOR, 10, ADSLDRV_GET_OBJ) -+#define ADSLIOCTL_START_BERT \ -+ _IOR(ADSLDRV_MAJOR, 11, ADSLDRV_BERT) -+#define ADSLIOCTL_STOP_BERT \ -+ _IOR(ADSLDRV_MAJOR, 12, ADSLDRV_STATUS_ONLY) -+#define ADSLIOCTL_CONFIGURE \ -+ _IOR(ADSLDRV_MAJOR, 13, ADSLDRV_CONFIGURE) -+#define ADSLIOCTL_TEST \ -+ _IOR(ADSLDRV_MAJOR, 14, ADSLDRV_TEST) -+#define ADSLIOCTL_GET_CONSTEL_POINTS \ -+ _IOR(ADSLDRV_MAJOR, 15, ADSLDRV_GET_CONSTEL_POINTS) -+#define ADSLIOCTL_GET_VERSION \ -+ _IOR(ADSLDRV_MAJOR, 16, ADSLDRV_GET_VERSION) -+#define ADSLIOCTL_SET_SDRAM_BASE \ -+ _IOR(ADSLDRV_MAJOR, 17, ADSLDRV_SET_SDRAM_BASE) -+#define ADSLIOCTL_RESET_STAT_COUNTERS \ -+ _IOR(ADSLDRV_MAJOR, 18, ADSLDRV_STATUS_ONLY) -+#define ADSLIOCTL_SET_OEM_PARAM \ -+ _IOR(ADSLDRV_MAJOR, 19, ADSLDRV_SET_OEM_PARAM) -+#define ADSLIOCTL_START_BERT_EX \ -+ _IOR(ADSLDRV_MAJOR, 20, ADSLDRV_BERT_EX) -+#define ADSLIOCTL_STOP_BERT_EX \ -+ _IOR(ADSLDRV_MAJOR, 21, ADSLDRV_STATUS_ONLY) -+ -+#define MAX_ADSLDRV_IOCTL_COMMANDS 22 -+ -+/* Typedefs. */ -+typedef struct -+{ -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_STATUS_ONLY, *PADSLDRV_STATUS_ONLY; -+ -+typedef struct -+{ -+ ADSL_FN_NOTIFY_CB pFnNotifyCb; -+ UINT32 ulParm; -+ adslCfgProfile *pAdslCfg; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_INITIALIZE, *PADSLDRV_INITIALIZE; -+ -+typedef struct -+{ -+ ADSL_CHANNEL_ADDR ChannelAddr; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_PHY_ADDR, *PADSLDRV_PHY_ADDR; -+ -+typedef struct -+{ -+ UINT16 usAtmFastPortId; -+ UINT16 usAtmInterleavedPortId; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_MAP_ATM_PORT, *PADSLDRV_MAP_ATM_PORT; -+ -+typedef struct -+{ -+ ADSL_CONNECTION_INFO ConnectionInfo; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_CONNECTION_INFO, *PADSLDRV_CONNECTION_INFO; -+ -+typedef struct -+{ -+ int diagCmd; -+ int diagMap; -+ int logTime; -+ int srvIpAddr; -+ int gwIpAddr; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_DIAG, *PADSLDRV_DIAG; -+ -+typedef struct -+{ -+ char *objId; -+ int objIdLen; -+ char *dataBuf; -+ long dataBufLen; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_GET_OBJ, *PADSLDRV_GET_OBJ; -+ -+typedef struct -+{ -+ unsigned long totalBits; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_BERT, *PADSLDRV_BERT; -+ -+typedef struct -+{ -+ unsigned long totalSec; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_BERT_EX, *PADSLDRV_BERT_EX; -+ -+typedef struct -+{ -+ adslCfgProfile *pAdslCfg; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_CONFIGURE, *PADSLDRV_CONFIGURE; -+ -+typedef struct -+{ -+ unsigned long testCmd; -+ unsigned long xmtStartTone; -+ unsigned long xmtNumTones; -+ unsigned long rcvStartTone; -+ unsigned long rcvNumTones; -+ char *xmtToneMap; -+ char *rcvToneMap; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_TEST, *PADSLDRV_TEST; -+ -+typedef struct -+{ -+ int toneId; -+ ADSL_CONSTELLATION_POINT *pointBuf; -+ int numPoints; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_GET_CONSTEL_POINTS, *PADSLDRV_GET_CONSTEL_POINTS; -+ -+typedef struct -+{ -+ adslVersionInfo *pAdslVer; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_GET_VERSION, *PADSLDRV_GET_VERSION; -+ -+typedef struct -+{ -+ unsigned long sdramBaseAddr; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_SET_SDRAM_BASE, *PADSLDRV_SET_SDRAM_BASE; -+ -+ -+typedef struct -+{ -+ int paramId; -+ void *buf; -+ int len; -+ BCMADSL_STATUS bvStatus; -+} ADSLDRV_SET_OEM_PARAM, *PADSLDRV_SET_OEM_PARAM; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif // _ADSLDRV_H_ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmapidrv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmapidrv.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmapidrv.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmapidrv.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,212 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+/*************************************************************************** -+ * File Name : AtmApiDrv.h -+ * -+ * Description: This file contains the definitions and structures for the -+ * Linux IOCTL interface that used between the user mode ATM -+ * API library and the kernel ATM API driver. -+ * -+ * Updates : 09/15/2000 lat. Created. -+ ***************************************************************************/ -+ -+#if !defined(_ATMAPIDRV_H_) -+#define _ATMAPIDRV_H_ -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+/* Incldes. */ -+#include <bcmatmapi.h> -+ -+/* Defines. */ -+#define ATMDRV_MAJOR 205 /* arbitrary unused value */ -+ -+#define ATMIOCTL_INITIALIZE \ -+ _IOWR(ATMDRV_MAJOR, 0, ATMDRV_INITIALIZE) -+#define ATMIOCTL_UNINITIALIZE \ -+ _IOR(ATMDRV_MAJOR, 1, ATMDRV_STATUS_ONLY) -+#define ATMIOCTL_GET_INTERFACE_ID \ -+ _IOWR(ATMDRV_MAJOR, 2, ATMDRV_INTERFACE_ID) -+#define ATMIOCTL_GET_TRAFFIC_DESCR_TABLE_SIZE \ -+ _IOR(ATMDRV_MAJOR, 3, ATMDRV_TRAFFIC_DESCR_TABLE_SIZE) -+#define ATMIOCTL_GET_TRAFFIC_DESCR_TABLE \ -+ _IOWR(ATMDRV_MAJOR, 4, ATMDRV_TRAFFIC_DESCR_TABLE) -+#define ATMIOCTL_SET_TRAFFIC_DESCR_TABLE \ -+ _IOWR(ATMDRV_MAJOR, 5, ATMDRV_TRAFFIC_DESCR_TABLE) -+#define ATMIOCTL_GET_INTERFACE_CFG \ -+ _IOWR(ATMDRV_MAJOR, 6, ATMDRV_INTERFACE_CFG) -+#define ATMIOCTL_SET_INTERFACE_CFG \ -+ _IOWR(ATMDRV_MAJOR, 7, ATMDRV_INTERFACE_CFG) -+#define ATMIOCTL_GET_VCC_CFG \ -+ _IOWR(ATMDRV_MAJOR, 8, ATMDRV_VCC_CFG) -+#define ATMIOCTL_SET_VCC_CFG \ -+ _IOWR(ATMDRV_MAJOR, 9, ATMDRV_VCC_CFG) -+#define ATMIOCTL_GET_VCC_ADDRS \ -+ _IOWR(ATMDRV_MAJOR, 10, ATMDRV_VCC_ADDRS) -+#define ATMIOCTL_GET_INTERFACE_STATISTICS \ -+ _IOWR(ATMDRV_MAJOR, 11, ATMDRV_INTERFACE_STATISTICS) -+#define ATMIOCTL_GET_VCC_STATISTICS \ -+ _IOWR(ATMDRV_MAJOR, 12, ATMDRV_VCC_STATISTICS) -+#define ATMIOCTL_SET_INTERFACE_LINK_INFO \ -+ _IOWR(ATMDRV_MAJOR, 13, ATMDRV_INTERFACE_LINK_INFO) -+#define ATMIOCTL_TEST \ -+ _IOWR(ATMDRV_MAJOR, 14, ATMDRV_TEST) -+#define ATMIOCTL_OAM_LOOPBACK_TEST \ -+ _IOWR(ATMDRV_MAJOR, 15, ATMDRV_OAM_LOOPBACK) -+ -+ -+#define MAX_ATMDRV_IOCTL_COMMANDS 16 -+ -+/* Typedefs. */ -+typedef struct -+{ -+ BCMATM_STATUS baStatus; -+} ATMDRV_STATUS_ONLY, *PATMDRV_STATUS_ONLY; -+ -+typedef struct -+{ PATM_INITIALIZATION_PARMS pInit; -+ BCMATM_STATUS baStatus; -+} ATMDRV_INITIALIZE, *PATMDRV_INITIALIZE; -+ -+typedef struct -+{ -+ UINT8 ucPhyPort; -+ UINT8 ucReserved[3]; -+ UINT32 ulInterfaceId; -+ BCMATM_STATUS baStatus; -+} ATMDRV_INTERFACE_ID, *PATMDRV_INTERFACE_ID; -+ -+typedef struct -+{ -+ UINT32 ulTrafficDescrTableSize; -+ BCMATM_STATUS baStatus; -+} ATMDRV_TRAFFIC_DESCR_TABLE_SIZE, *PATMDRV_TRAFFIC_DESCR_TABLE_SIZE; -+ -+typedef struct -+{ -+ PATM_TRAFFIC_DESCR_PARM_ENTRY pTrafficDescrTable; -+ UINT32 ulTrafficDescrTableSize; -+ BCMATM_STATUS baStatus; -+} ATMDRV_TRAFFIC_DESCR_TABLE, *PATMDRV_TRAFFIC_DESCR_TABLE; -+ -+typedef struct -+{ -+ UINT32 ulInterfaceId; -+ PATM_INTERFACE_CFG pInterfaceCfg; -+ BCMATM_STATUS baStatus; -+} ATMDRV_INTERFACE_CFG, *PATMDRV_INTERFACE_CFG; -+ -+typedef struct -+{ -+ ATM_VCC_ADDR VccAddr; -+ PATM_VCC_CFG pVccCfg; -+ BCMATM_STATUS baStatus; -+} ATMDRV_VCC_CFG, *PATMDRV_VCC_CFG; -+ -+typedef struct -+{ -+ UINT32 ulInterfaceId; -+ PATM_VCC_ADDR pVccAddrs; -+ UINT32 ulNumVccs; -+ UINT32 ulNumReturned; -+ BCMATM_STATUS baStatus; -+} ATMDRV_VCC_ADDRS, *PATMDRV_VCC_ADDRS; -+ -+typedef struct -+{ -+ UINT32 ulInterfaceId; -+ PATM_INTERFACE_STATS pStatistics; -+ UINT32 ulReset; -+ BCMATM_STATUS baStatus; -+} ATMDRV_INTERFACE_STATISTICS, *PATMDRV_INTERFACE_STATISTICS; -+ -+typedef struct -+{ -+ ATM_VCC_ADDR VccAddr; -+ PATM_VCC_STATS pVccStatistics; -+ UINT32 ulReset; -+ BCMATM_STATUS baStatus; -+} ATMDRV_VCC_STATISTICS, *PATMDRV_VCC_STATISTICS; -+ -+typedef struct -+{ -+ UINT32 ulInterfaceId; -+ ATM_INTERFACE_LINK_INFO InterfaceCfg; -+ BCMATM_STATUS baStatus; -+} ATMDRV_INTERFACE_LINK_INFO, *PATMDRV_INTERFACE_LINK_INFO; -+ -+typedef struct -+{ -+ ATM_VCC_ADDR VccAddr; -+ UINT32 ulNumToSend; -+ BCMATM_STATUS baStatus; -+} ATMDRV_TEST, *PATMDRV_TEST; -+ -+typedef struct -+{ -+ ATM_VCC_ADDR VccAddr; -+ UINT32 type; -+ BCMATM_STATUS baStatus; -+} ATMDRV_OAM_LOOPBACK, *PATMDRV_OAM_LOOPBACK; -+ -+#define OAM_TYPE_FUNCTION_BYTE_OFFSET 0 -+#define OAM_LB_INDICATION_BYTE_OFFSET 1 -+#define OAM_LB_CORRELATION_TAG_BYTE_OFFSET 2 -+#define OAM_LB_LOCATION_ID_BYTE_OFFSET 6 -+#define OAM_LB_SRC_ID_BYTE_OFFSET 22 -+#define OAM_LB_UNUSED_BYTE_OFFSET 38 -+#define OAM_RDI_UNUSED_BYTE_OFFSET 1 -+#define OAM_LB_CRC_BYTE_OFFSET 46 -+#define OAM_RDI_CRC_BYTE_OFFSET 46 -+#define OAM_LB_CORRELATION_TAG_LEN 4 -+#define OAM_LB_LOCATION_ID_LEN 16 -+#define OAM_LB_SRC_ID_LEN 16 -+#define OAM_LB_UNUSED_BYTE_LEN 8 -+#define OAM_RDI_UNUSED_BYTE_LEN 45 -+#define OAM_LB_CRC_BYTE_LEN 2 -+#define OAM_RDI_CRC_BYTE_LEN 2 -+#define OAM_FAULT_MANAGEMENT_LB 0x18 -+#define OAM_FAULT_MANAGEMENT_RDI 0x11 -+#define OAM_FAULT_MANAGEMENT_LB_REQUEST 1 -+#define OAM_FAULT_MANAGEMENT_LB_RESPOND 0 -+#define OAM_FAULT_MANAGEMENT_CORRELATION_VAL 0xbcbcbcbc -+#define OAM_FAULT_MANAGEMENT_SRC_ID_3 0xffffffff -+#define OAM_FAULT_MANAGEMENT_SRC_ID_2 0xffffffff -+#define OAM_FAULT_MANAGEMENT_SRC_ID_1 0xffffffff -+#define OAM_FAULT_MANAGEMENT_SRC_ID_0 0xffffffff -+#define OAM_FAULT_MANAGEMENT_LOCATION_ID_3 0xffffffff -+#define OAM_FAULT_MANAGEMENT_LOCATION_ID_2 0xffffffff -+#define OAM_FAULT_MANAGEMENT_LOCATION_ID_1 0xffffffff -+#define OAM_FAULT_MANAGEMENT_LOCATION_ID_0 0xffffffff -+#define OAM_LB_UNUSED_BYTE_DEFAULT 0x6a -+#define OAM_LB_SEGMENT_TYPE 0 -+#define OAM_LB_END_TO_END_TYPE 1 -+#define OAM_F4_LB_SEGMENT_TYPE 2 -+#define OAM_F4_LB_END_TO_END_TYPE 3 -+#define RM_PROT_ID_OFFSET 0 -+#define RM_MESSAGE_TYPE_OFFSET 1 -+#define RM_PROTOCOL_ID 1 -+#define RM_TYPE_DEFAULT 0x20 /* forward/source_generated/congested */ -+#define RM_UNUSED_BYTES_OFFSET 2 -+#define RM_UNUSED_BYTES_LEN 46 -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif // _ATMAPIDRV_H_ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmdiag.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmdiag.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmdiag.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmdiag.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,764 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+ -+#ifndef __ATMDIAG_H__ -+#define __ATMDIAG_H__ -+ -+//#define BRCM_6348 -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+#define ATM_DIAG_FAIL -1 -+#define ATM_DIAG_PASS 0 -+#define ATM_REGADDR 0xFFFE4000 -+#define ATM_REGSIZE 0x800 -+#define ATM_TX_VPI_VCI_CAM_OFFSET 0x500 -+#define ATM_RX_VPI_VCI_CAM_OFFSET 0x600 -+#define ATM_TRAFFIC_SHAPER_OFFSET 0x700 -+#define ATM_TX_STATUS_OFFSET 0x40c -+#define ATM_RX_STATUS_OFFSET 0x41c -+#define ATM_RX_AAL_STATUS_OFFSET 0x428 -+#define ATM_MIP_COUNTERS_OFFSET 0x440 -+#define ATM_UTOPIA_SETTING_OFFSET 0x42c -+#define ATM_ADSL_PHY_PORT_SETTING 0x15c -+#define UT_MAX_TDT_ENTRIES 2 -+#define UT_MAX_MGMT_ENTRIES 4 -+#define UT_LINE_RATE (146200000) /* 344811 cells/sec, CIT = 29ns */ -+#define UT_CELL_RATE (53 * 8) -+#define UT_MIN_PCR_SCR 310 /* ~128Kbps */ -+#define UT_MAX_PCR_SCR 344811 /* ~146.2Kpbs */ -+#define UT_MIN_MBS 2 -+#define UT_MAX_MBS 200000 -+ //#ifdef BRCM_6348 currently, the driver only support 8 VCCS -+ //#define UT_MAX_VCCS 16 -+ //#else -+#define UT_MAX_VCCS 8 -+ //#endif -+#define UT_MAX_PHY_PORTS 2 -+#define UT_BASE_PORT_NUMBER 1 -+#define UT_MIN_QUEUE 1 -+#define UT_MAX_QUEUE UT_MAX_VCCS -+#define UT_MULTI_QUEUE 1 -+#define UT_SINGLE_QUEUE 0 -+#define UT_MIN_PRIORITY 1 -+#define UT_MAX_PRIORITY 4 /* priority ranging from 1-4 */ -+#define UT_BUFFER_SIZE 20 -+#define UT_MGMT_IDX 6 -+#define UT_ENABLED 1 -+#define UT_DISABLED 0 -+#define UT_MAX_TD_INDEX UT_MAX_VCCS -+#define UT_SSTED_TRAILER_SIZE 8 -+#define UT_DIALED_DIGITS 2 -+#define UT_FREE_CELL_Q_SIZE 800 -+#define UT_FREE_PKT_Q_SIZE 800 -+#define UT_FREE_PKT_Q_BUF_SIZE 1600 -+#define UT_RX_PKT_Q_SIZE 800 -+#define UT_RX_CELL_Q_SIZE 800 -+#define UT_AAL5_MAX_SDU_LENGTH 65535 -+#define UT_TX_FIFO_PRIORITY 4 -+#define UT_MIN_DATA_LEN 48 -+#define UT_MAX_DATA_LEN 1500 -+#define UT_BASE_VPI_NUMBER 0 -+#define UT_MAX_VPI_NUMBER 256 -+#define UT_BASE_VCI_NUMBER 32 -+#define UT_MAX_VCI_NUMBER 65536 -+#define UT_UTOPIA_MODE 1 -+#define UT_ADSL_MODE 0 -+#define UT_UTOPIA_ADSL_MODE 0x11 /* utopia port 0, adsl port 1 */ -+#define UT_TOGGLE_DISPLAY_MODE 1 -+#define UT_TOGGLE_CAPTURE_MODE 0 -+#define UT_TOGGLE_VERIFICATION_MODE 2 -+#define UT_TOGGLE_MODE_ON 1 -+#define UT_TOGGLE_MODE_OFF 0 -+#define UT_DUMP_TX_VPI_VCI_TABLE 1 -+#define UT_DUMP_RX_VPI_VCI_TABLE 2 -+#define UT_DISPLAY_STATS 1 -+#define UT_CLEAR_STATS 2 -+#define UT_TRAFFIC_DESCRIPTOR_DISPLAY 1 -+#define UT_TRAFFIC_DESCRIPTOR_MODIFY 2 -+#define UT_PORT_UTOPIA_SETTING 1 -+#define UT_GLOBAL_UTOPIA_SETTING 2 -+#define UT_DISPLAY_CAPTURED 0 -+#define UT_ERASE_CAPTURED 1 -+#define UT_CAPTURED_ERROR_STATS 2 -+#define UT_PATTERN_INCREMENT 1 -+#define UT_PATTERN_FIX 0 -+#define UT_MODIFY_OPERATION 1 -+#define UT_DISPLAY_OPERATION 0 -+#define DIAG_ATM_MODULE "bcmatmtest" -+#define DIAG_ATM_PROC "/proc/atmtest" -+ -+/* command is made up of 2_bytes_command|2_bytes_index */ -+/* index is ranging from 0-7 for 8 VCs */ -+#define UT_PROC_CMD_ADD_VC 1 -+#define UT_PROC_CMD_DELETE_VC 2 -+#define UT_PROC_CMD_START_SEND_VC 3 -+#define UT_PROC_CMD_SEND_MULTI_VC 4 -+#define UT_PROC_CMD_STOP_SEND_VC 5 -+#define UT_PROC_CMD_CAPTURE 6 -+#define UT_PROC_CMD_TOGGLE 7 -+#define UT_PROC_CMD_GET_STATS 8 -+#define UT_PROC_CMD_CLEAR_STATS 9 -+#define UT_PROC_CMD_SEND_MULTI_PRIORITY 10 -+#define UT_PROC_CMD_MODIFY_TRAFFIC_SHAPER 11 -+#define UT_PROC_CMD_START_SEND_ALL_VC 12 -+#define UT_PROC_CMD_ADSL_LOOPBACK 13 -+#define UT_PROC_CMD_SEND_MANAGEMENT 14 -+#define UT_PROC_CMD_ADD_MPVC 15 -+#define UT_PROC_CMD_DELETE_MPVC 16 -+#define UT_PROC_CMD_START_SEND_MPVC 17 -+#define UT_PROC_CMD_UTOPIA_SET 18 -+ -+#define UT_OAM_LB_END_TO_END 10 /* was 1 */ -+#define UT_OAM_LB_SEGMENT 11 /* was 2 */ -+#define UT_OAM_RDI_END_TO_END 3 -+#define UT_OAM_RDI_SEGMENT 4 -+#define UT_VPC_RM_TYPE 5 -+#define UT_VCC_RM_TYPE 6 -+#define UT_OAM_CRC10_SOFTWARE 0 -+#define UT_OAM_CRC10_HARDWARE 1 -+#define UT_TOGGLE_DISPLAY 0 -+#define UT_TOGGLE_CAPTURE 1 -+#define UT_TOGGLE_VERIFY 2 -+ -+#define AP_REG_OFFSET_END 0x7ff -+#define AP_INDIRECT_RAM_ADDRESS_REG ATM_PROCESSOR_BASE + 0x7c0 -+#define AP_INDIRECT_RAM_REG ATM_PROCESSOR_BASE + 0x7c4 -+#define AP_IRQ_MASK AP_INTR_REGS_BASE+0x4 -+#define AP_IRQ_STATUS AP_INTR_REGS_BASE -+#define AP_ROUTE_OAM_TO_RCQ 0 -+#define AP_ROUTE_OAM_TO_MCF 1 -+#define AP_IR_ASSERT 1 -+#define AP_IR_DEASSERT 0 -+#define AP_RX_STATUS_ERR_MASK 0x32ecc /* mask out idleCell, vc & unused */ -+#define AP_RX_AAL_STATUS_ERR_MASK 0x3008 /* only look at rx router stats, discard */ -+ -+typedef struct utVccCfg { -+ UINT8 ulAalType; -+ UINT8 ulAtmVccCpcsAcceptCorruptedPdus; -+}UT_VCC_CFG, *pUT_VCC_CFG; -+ -+typedef struct utTrafficDescrParmEntry { -+ UINT32 ulTrafficDescrIndex; -+ UINT32 ulTrafficDescrType; -+ UINT32 ulTrafficDescrParm1; -+ UINT32 ulTrafficDescrParm2; -+ UINT32 ulTrafficDescrParm3; -+ UINT32 ulTrafficDescrParm4; -+ UINT32 ulTrafficDescrParm5; -+ UINT32 ulTrafficDescrRowStatus; -+ UINT32 ulServiceCategory; -+}UT_TRAFFIC_DESCR_PARM_ENTRY,*pUT_TRAFFIC_DESCR_PARM_ENTRY; -+ -+typedef struct utMultiSendInfo { -+ UINT32 len; -+ UINT8 pattern; -+ UINT8 dataByte; -+ UINT32 numSent; -+ UINT32 rate; -+ UINT8 circuitType; -+ UINT32 cellsPerPdu; -+ UINT32 delay; -+ UINT32 txCount; -+}UT_MULTISEND_INFO, *pUT_MULTISEND_INFO; -+ -+typedef struct utUserSendInfo { -+ UINT32 len; -+ UINT8 incremental; -+ UINT8 dataByte; -+ UINT32 rate; -+ UINT32 aalType; -+ UINT32 delay; -+ UINT32 txCount; /* number of cells/pkt user want to send */ -+ UINT8 multiQPriority; -+ UINT8 basePriority; -+ UINT8 numOfQueues; -+}UT_USER_SEND_INFO, *pUT_USER_SEND_INFO; -+ -+typedef struct utVccAddrInfo { -+ ATM_VCC_ADDR vccAddr; -+ UINT8 priority; /* priority of the queue of this VCC */ -+ UINT8 numOfQueues; -+}UT_VCC_ADDR_INFO, *pUT_VCC_ADDR_INFO; -+ -+typedef struct utVccListInfo { -+ UINT32 handle; -+ UINT32 managementHandle; -+}UT_VCC_LIST_INFO, *pUT_VCC_LIST_INFO; -+ -+typedef struct atmCaptureHdr { -+ UINT8 valid; -+ UINT8 vpi; -+ UINT16 vci; -+ UINT8 circuitType; -+ UINT8 cid; -+ UINT8 uuData8; -+ UINT8 uuData5; -+ UINT8 ucFlags; -+ UINT32 dataLen; -+ UINT8 *dataPtr; -+ UINT8 interface; -+} ATM_CAPTURE_HDR, *pATM_CAPTURE_HDR; -+ -+typedef struct atmTxBufferHdr { -+ ATM_VCC_DATA_PARMS dataParms; -+ struct atmTxBufferHdr *next; -+} ATM_TX_BUFFER_HDR, *pATM_TX_BUFFER_HDR; -+ -+typedef struct tx_buffer_list{ -+ pATM_TX_BUFFER_HDR headPtr; -+ pATM_TX_BUFFER_HDR tailPtr; -+ UINT32 len; -+ UINT32 seqNumber; -+ UINT32 lastSent; -+ UINT32 sentInterval; -+ UINT32 cellsPerPdu; -+} ATM_TX_BUFFER_LIST, *pATM_TX_BUFFER_LIST; -+ -+typedef struct atmTestError { -+ UINT32 total; -+ UINT32 data_err; -+ UINT32 data_length; -+ UINT32 sequence_err; -+ UINT32 aalCrcError; -+ UINT32 aalCpcsLen0; -+ UINT32 aalLenError; -+ UINT32 aalSduLenError; -+ UINT32 gfc; -+ UINT32 crc; -+ UINT32 pti; -+ UINT32 pmi_2sml; -+ UINT32 pmi_2big; -+ UINT32 vcam_mme; -+ UINT32 pne; -+ UINT32 came_1; -+ UINT32 came_0; -+ UINT32 dc_1; -+ UINT32 dc_0; -+ UINT32 ec_1; -+ UINT32 ec_0; -+ UINT32 aal5_drop_cell; -+ UINT32 routerDiscard_1; -+ UINT32 routerDiscard_0; -+ UINT32 camLkup; -+ UINT32 idle; -+ UINT32 hec; -+} ATM_TEST_ERROR, *pATM_TEST_ERROR; -+ -+typedef struct atmMibStats { -+ UINT32 tx_aal5_0; -+ UINT32 tx_aal5_1; -+ UINT32 tx_aal0_0; -+ UINT32 tx_aal0_1; -+ UINT32 rx_aal5_0; -+ UINT32 rx_aal5_1; -+ UINT32 rx_aal0_0; -+ UINT32 rx_aal0_1; -+} ATM_MIB_STATS, *pATM_MIB_STATS; -+ -+/* These are from TX status register; they are collected every 1 second interval */ -+typedef struct atmTxStats { -+ UINT32 fifoFull; /* fifoFull_port0 */ -+ UINT32 aal2bigErr; -+ UINT32 aal5LenErr; -+ UINT32 aal5MaxLenErr; -+ UINT32 droppedCellErr; /* tx aal or tx atm dropped cell port 0 */ -+ UINT32 aal5PortNotEnableErr; /* pne_err_port0 */ -+ UINT32 fifoFullErr; /* ff_err_port0 */ -+ UINT32 aal5CountErr; -+} ATM_TX_STATS, *pATM_TX_STATS; -+ -+/* these are from RX ATM and RX AAL status registers */ -+typedef struct atmRxStats { -+ UINT32 gfcErr; -+ UINT32 crcErr; -+ UINT32 ptiErr; -+ UINT32 vcamMmErr; /* vcam_mme VCAM multiple match error */ -+ UINT32 camLookupErr; /* came_port0 */ -+ UINT32 portNotEnableErr; /* pne_err */ -+ UINT32 discardErr; /* dc_port0 */ -+ UINT32 errCellErr; /* ec_port0 */ -+ UINT32 routerDrop; /* rxRouterStat_port0 */ -+ UINT32 aalDrop; /* aal5d */ -+#ifdef BRCM_6348 -+ UINT32 overflowErr; -+ UINT32 uto2small; -+ UINT32 uto2big; -+#endif -+} ATM_RX_STATS, *pATM_RX_STATS; -+ -+typedef struct atmStats -+{ -+ ATM_MIB_STATS mibStats; -+ ATM_TX_STATS txStats; -+ ATM_RX_STATS rxStats; -+}ATM_STATS, *pATM_STATS; -+ -+typedef struct atm_test_tx_info { -+ UINT32 index; -+ UINT32 len; -+ UINT32 lineTxInterval; -+ UINT32 count; -+ UINT8 incremental; -+ UINT8 dataByte; -+ UINT8 aalType; -+ UINT8 numOfQueues; -+ UINT8 basePriority; -+ UINT32 handle; -+ UINT32 rate; -+ UINT32 sending; -+ UINT8 managementType; /* f4, f5, rm */ -+ UINT8 interleaveManagement; -+ UINT16 managementVpi; -+ UINT16 managementVci; -+ UINT16 managementCrc; -+ UINT32 managementInterface; -+} ATM_TEST_TX_INFO, *pATM_TEST_TX_INFO; -+ -+typedef struct atm_test_info { -+ ATM_TEST_TX_INFO atmTestTxInfo[UT_MAX_VCCS+1]; /* one extra for f4 since it doesn't -+ have a vcc created, index is last one */ -+ UT_TRAFFIC_DESCR_PARM_ENTRY ms_Tdt[UT_MAX_TD_INDEX]; -+ UT_VCC_CFG ms_VccCfgs[UT_MAX_VCCS]; -+ UT_VCC_ADDR_INFO ms_VccAddrs[UT_MAX_VCCS]; -+ UINT32 commandStatus; /* command-2 bytes, status 2 bytes */ -+ ATM_TEST_ERROR m_ucTestError[UT_MAX_VCCS+1]; -+ ATM_STATS atmStats; -+ UINT8 displayData; /* current mode: 0=disable, 1=enable */ -+ UINT8 captureData; /* current mode: 0=disable, 1=enable */ -+ UINT8 verifyData; /* current mode: 0=disable, 1=enable */ -+ UINT32 pduSent[UT_MAX_VCCS+1]; /* one extra for f4 */ -+ UINT32 pduReceived[UT_MAX_VCCS+1]; -+ UINT32 multiPriority; -+} ATM_TEST_INFO, *pATM_TEST_INFO; -+ -+typedef struct atm_verfication_info { -+ int seqNumber; -+ UINT8 incremental; -+ UINT8 dataByte; -+ int len; -+} ATM_VERIFICATION_INFO, *pATM_VERIFICATION_INFO; -+ -+typedef struct atm_data_struct { -+ PATM_VCC_DATA_PARMS data; -+ ATM_VCC_ADDR vccAddr; -+} ATM_DATA_STRUCT, *PATM_DATA_STRUCT; -+ -+typedef struct atmDiagCb { -+ ATM_TRAFFIC_DESCR_PARM_ENTRY ms_Tdt[UT_MAX_TD_INDEX]; -+ ATM_VCC_CFG ms_VccCfgs[UT_MAX_VCCS]; -+ UT_VCC_ADDR_INFO ms_VccAddrs[UT_MAX_VCCS]; -+ UINT32 ms_multiPriority[UT_MAX_VCCS]; -+ ATM_TX_BUFFER_LIST mTxHdrQ[UT_MAX_VCCS+1]; /* tx Q; an extra one for f4 cells */ -+ UT_VCC_LIST_INFO m_ulVccList[UT_MAX_VCCS+1]; /* tx Q; an extra one for f4 cells */ -+ UINT32 managementHandle_port0; -+ UINT32 managementHandle_port1; -+ UINT32 rxTaskId; -+ UINT32 txTaskId; -+ UINT32 statsTaskId; -+ UINT32 rxTaskSem; /* protect Rx Q */ -+ UINT32 txTaskSem; /* protect Tx Q */ -+ UINT32 rxQMuSem; /* rx task semphore */ -+ UINT32 txQMuSem; /* tx task semphore */ -+ UINT32 txTaskExit; /* clean up purpose */ -+ UINT32 rxTaskExit; /* clean up purpose */ -+ ATM_DATA_STRUCT m_pDpHead; /* rx Q */ -+ ATM_DATA_STRUCT m_pDpTail; /* rx Q */ -+ UINT8 displayData; /* 1 to display rx data on screen; default is 0 */ -+ UINT8 captureData; -+ UINT8 verifyData; -+ ATM_CAPTURE_HDR m_ulData[UT_BUFFER_SIZE]; -+ int m_ulBufferPosition; -+ UINT32 m_ulCurSeqNumber; -+ ATM_TEST_ERROR m_ucTestError[UT_MAX_VCCS+1]; -+ ATM_STATS m_atmStats; -+ ATM_VERIFICATION_INFO dataVerficationInfo[UT_MAX_VCCS]; -+ UINT8 txStop; -+} ATM_DIAG_CB, *pATM_DIAG_CB; -+ -+/* 0xfffe15c */ -+typedef union phyLastDescConfig { -+ struct { -+ UINT32 unused:22; -+ UINT32 rxCfg:2; -+ UINT32 unused1:2; -+ UINT32 txCfg:2; -+ UINT32 numRxDesc:2; -+ UINT32 numTxDesc:2; -+ }bit; -+ UINT32 reg; -+} PHY_LAST_DESC_CONFIG, *pPHY_LAST_DESC_CONFIG; -+ -+/* 0xfffe4500-0xfffe45ff */ -+typedef union txAtmVpiVciTable { -+ struct { -+ UINT32 unused:6; -+ UINT32 swFlags:1; -+ UINT32 crcEnable:1; -+ UINT32 vpi: 8; -+ UINT32 vci:16; -+ }bit; -+ UINT32 entry; -+} TX_ATM_VPI_VCI_TABLE, *pTX_ATM_VPI_VCI_TABLE; -+ -+/* 0xfffe4600-0xfffe46ff */ -+typedef union RxAtmVpiVciTable { -+ struct { -+ UINT32 unused:6; -+ UINT32 valid:1; -+ UINT32 vpi:8; -+ UINT32 vci:16; -+ UINT32 port:1; -+ } camSide; /* even; */ -+ struct { -+ UINT32 unused:21; -+ UINT32 userDataIR:1; /* assert IR for user data immediate response */ -+ UINT32 oamIR:1; /* assert IR for OAM immediate response */ -+ UINT32 rmIR:1; /* assert IR for RM immediate response */ -+ UINT32 vcId:3; /* VCID */ -+ UINT32 userDataCrcEnable:1; -+ UINT32 oamRouteCode:1; /* 0=route to rx cell q; 1= route to rx mips cell fifo */ -+ UINT32 udrc:1; /* User Data Routing Code */ -+ UINT32 circuitType:2; -+ } ramSide; /* odd; */ -+ UINT32 entry; -+} RX_ATM_VPI_VCI_TABLE, *pRX_ATM_VPI_VCI_TABLE; -+ -+/* 6345; 0xfffe4300- 0xfffe43ff */ -+typedef union atmIntrRegs { -+ struct { -+ UINT32 unused:20; -+ UINT32 vcamMm:1; /* RX VCAM multiple match */ -+ UINT32 rxRtDc:1; /* Rx Router discard cell due to full rx buffer */ -+ UINT32 rpqIr:1; /* Receive Packet Queue got a packet tagged with immediate response */ -+ UINT32 rcqIr:1; /* Receive Cell Queue got a cell tagged with immediate response */ -+ UINT32 rpqWd:1; /* RX Pkt Q watchdog- no pkt rxed for the duration defined in RCQ wd timer */ -+ UINT32 rcqWd:1; /* RX Cell Q watchdog */ -+ UINT32 mibHf:1; /* one or more of the MIB coutners is half full */ -+ UINT32 fpqAe:1; /* Free Packet Queue almost empty- has fewer buffers than FPQ watermark */ -+ UINT32 rpqAf:1; /* Rx Packet Queue has exceeded RPQ watermark */ -+ UINT32 fcqAe:1; /* Free Cell Queue almost Empty */ -+ UINT32 rcqAf:1; /* Rx Cell Q almost full */ -+ UINT32 txs:1; /* Tx SDRAM Interrupt- one of the TX SDRAM sub-channels intr is set */ -+ }statusMaskBit; /* status & interrupt mask */ -+#ifdef BRCM_6348 -+ struct { -+ UINT32 unused1:8; -+ UINT32 sdqMask:8; /* TX SDRAM watchdog timer interrupt */ -+ UINT32 unused:4; -+ UINT32 irqMask:12; -+ }irqMaskBit; -+ struct { -+ UINT32 unused:28; -+ UINT32 sdWd:4; /* TX SDRAM Watchdog */ -+ }txSdramValue; -+#else /* 6345 */ -+ struct { -+ UINT32 unused:16; -+ UINT32 irqMask:16; -+ }irqMaskBit; -+#endif /* BRCM_6348 */ -+ struct { -+ UINT32 fcqAeWm:16; /* Free Cell Q almost empty watermark */ -+ UINT32 rcqAfWm:16; /* Rx Cell Q almost full watermark */ -+ }rxCellQBit; -+ struct { -+ UINT32 fpqAeWm:16; /* Free Packet Q almost empty watermark */ -+ UINT32 rpqAfWm:16; /* Rx Paket Q almost full watermark */ -+ }rxPktQBit; -+ struct { -+ UINT32 pktWdTo:16; /* Watchdog timeout value in 50 uSec increments */ -+ UINT32 cellWdTo:16; /* Watchdog timeout value in 50 uSec increments */ -+ }rxWdTimer; -+} ATM_INTR_REGS, *pATM_INTR_REGS; -+ -+/* 0xfffe4700-0xfffe47ff */ -+typedef union atmShaperCtrlReg { -+#ifdef BRCM_6348 -+ struct { -+ UINT32 unused:7; -+ UINT32 rst:1; /* reset shaper */ -+ UINT32 pcr:12; /* peak cell rate */ -+ UINT32 mpEn:1; /* Multi-priority enabled */ -+ UINT32 priority:2; /* source scheduling sub-priority */ -+ UINT32 mcrEnable:1;/* Minimum Cell Rate Enabled */ -+ UINT32 alg:2; /* source shaping algorithm */ -+ UINT32 pid:1; /* Source destination Port ID */ -+ UINT32 vcid:4; /* source VC ID */ -+ UINT32 enable:1; /* source shaper enable */ -+ }bit; -+#else /* 6345 */ -+ struct { -+ UINT32 unused:9; -+ UINT32 rst:1; /* reset shaper */ -+ UINT32 pcr:12; /* peak cell rate */ -+ UINT32 mpEn:1; /* Multi-priority enabled */ -+ UINT32 priority:2; /* source scheduling sub-priority */ -+ UINT32 alg:2; /* source shaping algorithm */ -+ UINT32 pid:1; /* Source destination Port ID */ -+ UINT32 vcid:3; /* source VC ID */ -+ UINT32 enable:1; /* source shaper enable */ -+ }bit; -+#endif /* BRCM_6348 */ -+ UINT32 entry; -+} ATM_SHAPER_CTRL_REG, *pATM_SHAPER_CTRL_REG; -+ -+typedef union atmShaperVbrReg { -+ struct { -+ UINT32 unused:1; -+ UINT32 bt:19; -+ UINT32 scr:12; -+ }bit; -+ UINT32 entry; -+} ATM_SHAPER_VBR_REG, *pATM_SHAPER_VBR_REG; -+ -+#ifdef BRCM_6348 -+typedef union atmShaperMcrReg { -+ struct { -+ UINT32 unused:20; -+ UINT32 mcr:12; -+ }bit; -+ UINT32 entry; -+} ATM_SHAPER_MCR_REG, *pATM_SHAPER_MCR_REG; -+#endif /* BRCM_6348 */ -+ -+typedef union atmCellHdr { -+ struct { -+ UINT32 gfc:4; -+ UINT32 msb_vpi:4; -+ UINT32 vpi:4; -+ UINT32 msb_vci:4; -+ UINT32 vci:8; -+ UINT32 lsb_vci:4; -+ UINT32 pt:3; -+ UINT32 clp:1; -+ }bit; -+ UINT32 word1; -+} ATM_CELL_HDR, *pATM_CELL_HDR; -+#define ATM_RX_AAL_STATUS_ERROR_MASK_PORT0 0x108 -+ -+/* 0xfffe4428 */ -+typedef union atmRxAalStatusReg { -+ struct { -+ UINT32 unused:22; -+ UINT32 rxRouterStat_port1:1; /* RX cells dropped due to full cell buffer; */ -+ UINT32 rxRouterStat_port0:1; /* bit 8=port 0 fifo rx drop cell */ -+ UINT32 aal0ccnt_port1:1; /* aal0 cell count has been incremented; bit 4=port0 */ -+ UINT32 aal0ccnt_port0:1; /* aal0 cell count has been incremented; bit 4=port0 */ -+ UINT32 aal5ccnt_port1:1; /* aal5 cell count has been incremented; bit 4=port0 */ -+ UINT32 aal5ccnt_port0:1; /* aal5 cell count has been incremented; bit 4=port0 */ -+ UINT32 aal5d:1; /* aal5 dropped cells */ -+ UINT32 aal5p:1; /* aal5 pdu received */ -+ UINT32 aalxp:1; /* non aal5 received */ -+ UINT32 aal5c:1; /* aal5 received cells */ -+ }bit; -+ UINT32 reg; -+} ATM_RX_AAL_STATUS_REG, *pATM_RX_AAL_STATUS_REG; -+/* 0xfffe441c */ -+#define ATM_RX_STATUS_ERROR_MASK_PORT0 0x32354 -+typedef union atmRxStatusReg { -+ struct { -+ UINT32 unused:14; -+ UINT32 gfc_err:1; /* non zero gfc detected */ -+ UINT32 crc_err:1; /* CRC-10 error detected on OAM/RM cells */ -+#ifdef BRCM_6348 -+ UINT32 rx_flow_err:1; /* Receive cell dropped by RXATM layer 'cause RX cell FIFO full */ -+#else /* 6345 */ -+ UINT32 unused1:1; -+#endif -+ UINT32 idle_err:1; /* Idle cell detected */ -+ UINT32 pti_err:1; /* PTI Error detected (i.e. PT=binary 111) */ -+#ifdef BRCM_6348 -+ UINT32 unused2:1; -+ UINT32 uto2small:1;/* Too small of a cell from RX Utopia */ -+ UINT32 uto2big:1; /* Too big of a cell from RX Utopia */ -+#else /* BRCM_6345 */ -+ UINT32 unused2:3; -+#endif -+ UINT32 vcam_mme:1; /* VCAM multiple match error */ -+ UINT32 pne_err:1; /* port not enable error */ -+ UINT32 came_port1:1; /* PER port cam lookup error; bit6=port 0 */ -+ UINT32 came_port0:1; /* PER port cam lookup error; bit6=port 0 */ -+ UINT32 dc_port1:1; /* per port dropped cell; bit 4= port 0 */ -+ UINT32 dc_port0:1; /* per port dropped cell; bit 4= port 0 */ -+ UINT32 ec_port1:1; /* per port erred cell; bit 2=port 0 */ -+ UINT32 ec_port0:1; /* per port erred cell; bit 2=port 0 */ -+ UINT32 vc_port1:1; /* per port valid cell; bit 0=port 0 */ -+ UINT32 vc_port0:1; /* per port valid cell; bit 0=port 0 */ -+ }bit; -+ UINT32 reg; -+} ATM_RX_STATUS_REG, *pATM_RX_STATUS_REG; -+ -+#define ATM_TX_STATUS_ERROR_MASK_PORT0 0x41e80c54 -+typedef union atmTxStatusReg { -+ struct { -+ UINT32 fifoFull_port1:1; /* per port FIFO Full Status (1=full) */ -+ UINT32 fifoFull_port0:1; /* per port FIFO Full Status (1=full) */ -+ UINT32 unused:1; -+ UINT32 aal0_port1:1; /* aal0_port1 tx */ -+ UINT32 aal0_port0:1; /* aal0_port0 tx */ -+ UINT32 aal5_port1:1; /* aal5_port1 tx */ -+ UINT32 aal5_port0:1; /* aal5_port0 tx */ -+ UINT32 aal2big:1; /* aal too big cell input */ -+ UINT32 aal5liErr:1;/* aal5 length indicator error */ -+ UINT32 aal5mlErr:1;/* aal5 max length error */ -+ UINT32 aal5ctErr:1;/* aal5 count error */ -+ UINT32 unused1:1; -+ UINT32 aal5d:1; /* aal5 drop cell */ -+ UINT32 aal5p:1; /* aal5 pdu passed */ -+ UINT32 aalxc:1; /* non aal5 cell passed */ -+ UINT32 aal5c:1; /* aal cell passed */ -+ UINT32 dropCell_port1:1; /* tx aal or tx atm dropped cell */ -+ UINT32 dropReq_port1:1; /* one of the port dropped request */ -+ UINT32 scheCell_port1:1; /* per port scheduled cell */ -+ UINT32 sit_port1:1; /* per port schedule interval timer count event */ -+ UINT32 dropCell_port0:1; /* tx aal or tx atm dropped cell */ -+ UINT32 dropReq_port0:1; /* one of the port dropped request */ -+ UINT32 scheCell_port0:1; /* per port scheduled cell */ -+ UINT32 sit_port0:1; /* per port schedule interval timer count event */ -+ UINT32 pne_err_port1:1; /* port not enable error */ -+ UINT32 pne_err_port0:1; /* port not enable error */ -+ UINT32 ff_err_port1:1; /* fifo full error */ -+ UINT32 ff_err_port0:1; /* fifo full error */ -+ UINT32 dc_port1:1; /* per port dropped cell */ -+ UINT32 dc_port0:1; /* per port dropped cell */ -+ UINT32 pc_port1:1; /* per port processed cell */ -+ UINT32 pc_port0:1; /* per port processed cell */ -+ }bit; -+ UINT32 reg; -+} ATM_TX_STATUS_REG, *pATM_TX_STATUS_REG; -+ -+ -+typedef union atmTxHdrReg { -+ struct { -+ UINT32 unused1:14; -+ UINT32 aal5SwTrailer:1; /* software trailer enable */ -+ UINT32 schedCrst_1:1; /* scheuler reset */ -+ UINT32 schedCrst_0:1; -+ UINT32 unused:1; -+ UINT32 haltShpt_1:1; /* halt shaper, used for dynamic configuration of shaper */ -+ UINT32 haltShpt_0:1; -+ UINT32 altGFC:4; /* alternate GFC value */ -+ UINT32 altGFCen_1:1; -+ UINT32 altGFCen_0:1; /* alternate GFC mode enable */ -+ UINT32 fRst_1:1; -+ UINT32 fRst_0:1; -+ UINT32 oamCrcEn_1:1; -+ UINT32 oamCrcEn_0:1; -+ UINT32 txEn_1:1; -+ UINT32 txEn_0:1; -+ }bit; -+ UINT32 reg; -+} ATM_TX_HDR_CFG_REG, *pATM_TX_HDR_CFG_REG; -+ -+typedef union rxAalError { -+ struct { -+ UINT8 crc:1; /* aal5 CRC error */ -+ UINT8 cpcsLen0:1; /* aal5 cpcsLen error */ -+ UINT8 length:1; /* aal5 len error */ -+ UINT8 maxSduExceed:1; /* max sdu exceed error */ -+ UINT8 unused:4; -+ }bit; -+ UINT8 entry; -+} RX_AAL_ERROR; -+ -+typedef union rxAtmError { -+ struct { -+ UINT8 pne:1; /* port not enable error */ -+ UINT8 hec:1; /* HEC error */ -+ UINT8 pti:1; /* pti error */ -+ UINT8 idle:1; /* idle rx */ -+ UINT8 camLkup:1; /* cam look up error */ -+ UINT8 unused:1; -+ UINT8 oamCrc:1; /* oam crc */ -+ UINT8 gfc:1; /* gfc error */ -+ }bit; -+ UINT8 entry; -+} RX_ATM_ERROR; -+ -+/* 0xfffe442c */ -+typedef union atmUtopiaCfg { -+ struct { -+ UINT32 unused:26; -+ UINT32 rxLevel2:1; /* when set=level 2, when 0=level 1 */ -+ UINT32 rxEn:1; /* enable RX Utopia Operation */ -+ UINT32 unused1:2; -+ UINT32 txLevel2:1; /* when set=level 2, when 0=level 1 */ -+ UINT32 txEn:1; /* enable TX Utopia Operation */ -+ }bit; -+ UINT32 entry; -+} ATM_UTOPIA_CFG, *pATM_UTOPIA_CFG; -+ -+typedef union portSchedulerCfg { -+ struct { -+ UINT32 cit:16; -+ UINT32 unused:12; -+ UINT32 mode:2; -+ UINT32 arb:1; -+ UINT32 en:1; -+ }bit; -+ UINT32 entry; -+} ATM_PORT_SCHEDULER_CFG, *pATM_PORT_SCHEDULER_CFG; -+ -+/* memory map operation definition */ -+typedef struct atm_regs { -+ int kmem_fd; -+ char *mmap_addr; -+ unsigned long addr; -+ unsigned int size; -+ unsigned int offset; -+} atm_regs; -+ -+int getVccNextIndex(void); -+void removeVccIndex(int index); -+int isVpiVciExisted(UINT32 interface, UINT16 vpi, UINT16 vci); -+void atmDiagInit(void); -+BCMATM_STATUS bcmAtmDiagInit(void); -+BCMATM_STATUS bcmAtmDiagUnInit(void); -+BCMATM_STATUS bcmAtmAddVccCommand(pUT_VCC_ADDR_INFO pVccAddrs, pUT_VCC_CFG pVccCfg, -+ pUT_TRAFFIC_DESCR_PARM_ENTRY pTd); -+BCMATM_STATUS bcmAtmSendVccCommand(pATM_TEST_TX_INFO pAtmInfo); -+BCMATM_STATUS bcmAtmCaptureCommand(int mode); -+BCMATM_STATUS bcmAtmSendManagementCommand(pATM_TEST_TX_INFO pAtmInfo); -+BCMATM_STATUS bcmAtmDeleteVccCommand(pUT_VCC_ADDR_INFO pVccAddrs); -+BCMATM_STATUS bcmAtmSendAllVccsCommand(pATM_TEST_TX_INFO pAtmInfo); -+BCMATM_STATUS bcmAtmSendMultiPriorityCommand(pATM_TEST_TX_INFO pAtmInfo); -+BCMATM_STATUS bcmAtmSendLoopbackCommand(UINT8 mode); -+BCMATM_STATUS bcmAtmAddMPVccCommand(pUT_VCC_ADDR_INFO pVccAddrs, pUT_VCC_CFG pVccCfg, -+ pUT_TRAFFIC_DESCR_PARM_ENTRY pTd); -+BCMATM_STATUS bcmAtmDeleteMPVccCommand(pUT_VCC_ADDR_INFO pVccAddrs); -+BCMATM_STATUS bcmAtmSendMPVccCommand(pATM_TEST_TX_INFO pAtmInfo); -+BCMATM_STATUS bcmAtmSendMultiPriorityCommand(pATM_TEST_TX_INFO pAtmInfo); -+BCMATM_STATUS bcmAtmModifyTDCommand(pUT_TRAFFIC_DESCR_PARM_ENTRY pTD, UINT32 index); -+int bcmAtmGetStatsCommand(int reset); -+int bcmAtmToggleVerifyCommand(void); -+int bcmAtmToggleCaptureCommand(void); -+int bcmAtmToggleDisplayCommand(void); -+int bcmAtmStopTxCommand(void); -+int isVpiVciExisted(UINT32 interface, UINT16 vpi, UINT16 vci); -+int bcmDiag_unmapregs(atm_regs *mapregs); -+atm_regs *bcmDiag_mapregs(unsigned long addr, int size); -+int bcmDiagGetVerificationStats(int vcc,char *pResult); -+void bcmDiagClearSARstats(void); -+void bcmDiagReadSARstats(int parm); -+int bcmDiagGetSARStats(char *pResult); -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmosservices.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmosservices.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/atmosservices.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/atmosservices.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,98 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+//************************************************************************** -+// File Name : BcmAtmApi.h -+// -+// Description: This file contains the definitions, structures and function -+// prototypes for the Broadcom Asynchronous Transfer Mode (ATM) -+// Application Program Interface (API). -+// -+// Updates : 09/15/2000 lat. Created. -+//************************************************************************** -+ -+#if !defined(_ATMOSSERVICES_H_) -+#define _ATMOSSERVICES_H_ -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+//************************************************************************** -+// Constant Definitions -+//************************************************************************** -+#define RTN_SUCCESS 0 -+#define RTN_ERROR 1 -+#define USE_CURRENT_THREAD_PRIORITY 0 -+ -+//************************************************************************** -+// Type Definitions -+//************************************************************************** -+typedef void (*FN_GENERIC) (void *); -+typedef struct AtmOsFuncs -+{ -+ FN_GENERIC pfnAlloc; -+ FN_GENERIC pfnFree; -+ FN_GENERIC pfnDelay; -+ FN_GENERIC pfnCreateSem; -+ FN_GENERIC pfnRequestSem; -+ FN_GENERIC pfnReleaseSem; -+ FN_GENERIC pfnDeleteSem; -+ FN_GENERIC pfnDisableInts; -+ FN_GENERIC pfnEnableInts; -+ FN_GENERIC pfnInvalidateCache; -+ FN_GENERIC pfnFlushCache; -+ FN_GENERIC pfnGetTopMemAddr; -+ FN_GENERIC pfnBlinkLed; -+ FN_GENERIC pfnGetSystemTick; -+ FN_GENERIC pfnStartTimer; -+ FN_GENERIC pfnPrintf; -+} ATM_OS_FUNCS, *PATM_OS_FUNCS; -+ -+//************************************************************************** -+// Function Prototypes -+//************************************************************************** -+ -+UINT32 AtmOsInitialize( PATM_OS_FUNCS pFuncs ); -+char *AtmOsAlloc( UINT32 ulSize ); -+void AtmOsFree( char *pBuf ); -+UINT32 AtmOsCreateThread( char *pszName, void *pFnEntry, UINT32 ulFnParm, -+ UINT32 ulPriority, UINT32 ulStackSize, UINT32 *pulThreadId ); -+UINT32 AtmOsCreateSem( UINT32 ulInitialState ); -+UINT32 AtmOsRequestSem( UINT32 ulSem, UINT32 ulTimeoutMs ); -+void AtmOsReleaseSem( UINT32 ulSem ); -+void AtmOsDeleteSem( UINT32 ulSem ); -+UINT32 AtmOsDisableInts( void ); -+void AtmOsEnableInts( UINT32 ulLevel ); -+void AtmOsDelay( UINT32 ulTimeoutMs ); -+UINT32 AtmOsTickGet( void ); -+UINT32 AtmOsTickCheck( UINT32 ulWaitTime, UINT32 ulMsToWait ); -+void AtmOsInvalidateCache( void *pBuf, UINT32 ulLength ); -+void AtmOsFlushCache( void *pBuf, UINT32 ulLength ); -+char *AtmOsTopMemAddr( void ); -+void AtmOsBlinkLed( void ); -+UINT32 AtmOsInitDeferredHandler( void *pFnEntry, UINT32 ulFnParm, -+ UINT32 ulTimeout ); -+void AtmOsScheduleDeferred( UINT32 ulHandle ); -+void AtmOsUninitDeferredHandler( UINT32 ulHandle ); -+UINT32 AtmOsStartTimer( void *pFnEntry, UINT32 ulFnParm, UINT32 ulTimeout ); -+void AtmOsPrintf( char *, ... ); -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif // _ATMOSSERVICES_H_ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcm_common.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcm_common.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcm_common.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcm_common.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,48 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2004 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+ -+#ifndef __BCM_COMMON_H -+#define __BCM_COMMON_H -+ -+#if defined(CONFIG_BCM96338) -+#include <6338_common.h> -+#endif -+#if defined(CONFIG_BCM96345) -+#include <6345_common.h> -+#endif -+#if defined(CONFIG_BCM96348) -+#include <6348_common.h> -+#endif -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,5) /* starting from 2.4.5 */ -+#define skb_dataref(x) (&skb_shinfo(x)->dataref) -+#else -+#define skb_dataref(x) skb_datarefp(x) -+#endif -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19) /* starting from 2.4.19 */ -+#define VIRT_TO_PHY(a) (((unsigned long)(a)) & 0x1fffffff) -+#else -+#define VIRT_TO_PHY virt_to_phys -+#endif -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+#define __save_and_cli save_and_cli -+#define __restore_flags restore_flags -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcm_map.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcm_map.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcm_map.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcm_map.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,31 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2004 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+ -+#ifndef __BCM_MAP_H -+#define __BCM_MAP_H -+ -+#if defined(CONFIG_BCM96338) -+#include <6338_map.h> -+#endif -+#if defined(CONFIG_BCM96345) -+#include <6345_map.h> -+#endif -+#if defined(CONFIG_BCM96348) -+#include <6348_map.h> -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmadsl.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmadsl.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmadsl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmadsl.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,199 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+//************************************************************************** -+// File Name : Adsl.h -+// -+// Description: This file contains the definitions, structures and function -+// prototypes for ADSL PHY interface -+// -+//************************************************************************** -+#if !defined(_BCMADSL_H_) -+#define _BCMADSL_H_ -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+/* Incldes. */ -+#include "AdslMibDef.h" -+ -+//************************************************************************** -+// Type Definitions -+//************************************************************************** -+ -+// Return status values -+typedef enum BcmAdslStatus -+{ -+ BCMADSL_STATUS_SUCCESS = 0, -+ BCMADSL_STATUS_ERROR -+} BCMADSL_STATUS; -+ -+// Return status values -+typedef enum AdslLinkState -+{ -+ BCM_ADSL_LINK_UP = 0, -+ BCM_ADSL_LINK_DOWN, -+ BCM_ADSL_TRAINING_G992_EXCHANGE, -+ BCM_ADSL_TRAINING_G992_CHANNEL_ANALYSIS, -+ BCM_ADSL_TRAINING_G992_STARTED, -+ BCM_ADSL_TRAINING_G994, -+ BCM_ADSL_G994_NONSTDINFO_RECEIVED, -+ BCM_ADSL_BERT_COMPLETE, -+ BCM_ADSL_ATM_IDLE, -+ BCM_ADSL_EVENT, -+ BCM_ADSL_G997_FRAME_RECEIVED, -+ BCM_ADSL_G997_FRAME_SENT -+} ADSL_LINK_STATE; -+ -+#ifndef DISABLE_ADSL_OLD_DEF -+#define ADSL_LINK_UP BCM_ADSL_LINK_UP -+#define ADSL_LINK_DOWN BCM_ADSL_LINK_DOWN -+#endif -+ -+/* ADSL test modes */ -+typedef enum AdslTestMode -+{ -+ ADSL_TEST_NORMAL = 0, -+ ADSL_TEST_REVERB, -+ ADSL_TEST_MEDLEY, -+ ADSL_TEST_SELECT_TONES, -+ ADSL_TEST_NO_AUTO_RETRAIN, -+ ADSL_TEST_MARGIN_TWEAK, -+ ADSL_TEST_ESTIMATE_PLL_PHASE, -+ ADSL_TEST_REPORT_PLL_PHASE_STATUS, -+ ADSL_TEST_AFELOOPBACK, -+ ADSL_TEST_L3, -+ ADSL_TEST_DIAGMODE, -+ ADSL_TEST_L0 -+} ADSL_TEST_MODE; -+ -+// ADSL_CHANNEL_ADDR Contains ADSL Utopia PHY addresses -+typedef struct AdslChannelAddr -+{ -+ UINT16 usFastChannelAddr; -+ UINT16 usInterleavedChannelAddr; -+} ADSL_CHANNEL_ADDR, *PADSL_CHANNEL_ADDR; -+ -+// ADSL_CONNECTION_INFO Contains ADSL Connection Info -+typedef struct AdslConnectionInfo -+{ -+ ADSL_LINK_STATE LinkState; -+ UINT32 ulFastUpStreamRate; -+ UINT32 ulFastDnStreamRate; -+ UINT32 ulInterleavedUpStreamRate; -+ UINT32 ulInterleavedDnStreamRate; -+} ADSL_CONNECTION_INFO, *PADSL_CONNECTION_INFO; -+ -+/* OEM parameter definition */ -+#define ADSL_OEM_G994_VENDOR_ID 1 /* Vendor ID used during G.994 handshake */ -+#define ADSL_OEM_G994_XMT_NS_INFO 2 /* G.994 non-standard info field to send */ -+#define ADSL_OEM_G994_RCV_NS_INFO 3 /* G.994 received non-standard */ -+#define ADSL_OEM_EOC_VENDOR_ID 4 /* EOC reg. 0 */ -+#define ADSL_OEM_EOC_VERSION 5 /* EOC reg. 1 */ -+#define ADSL_OEM_EOC_SERIAL_NUMBER 6 /* EOC reg. 2 */ -+#define ADSL_OEM_T1413_VENDOR_ID 7 /* Vendor ID used during T1.413 handshake */ -+#define ADSL_OEM_T1413_EOC_VENDOR_ID 8 /* EOC reg. 0 (vendor ID) in T1.413 mode */ -+ -+/* XMT gain definitions */ -+#define ADSL_XMT_GAIN_AUTO 0x80000000 -+ -+typedef struct -+{ -+ int diagCmd; -+ int diagMap; -+ int logTime; -+ int srvIpAddr; -+ int gwIpAddr; -+} ADSL_DIAG, *PADSL_DIAG; -+ -+typedef struct -+{ -+ short x; -+ short y; -+} ADSL_CONSTELLATION_POINT, *PADSL_CONSTELLATION_POINT; -+ -+#define ADSL_CONSTEL_DATA_ID 0 -+#define ADSL_CONSTEL_PILOT_ID 1 -+ -+#define ADSL_MIB_INFO adslMibInfo -+typedef ADSL_MIB_INFO *PADSL_MIB_INFO; -+ -+typedef void (*ADSL_FN_NOTIFY_CB) (ADSL_LINK_STATE AdslLinkState, UINT32 ulParm); -+ -+//************************************************************************** -+// Function Prototypes -+//************************************************************************** -+ -+BCMADSL_STATUS BcmAdsl_Check(void); -+BCMADSL_STATUS BcmAdsl_Initialize(ADSL_FN_NOTIFY_CB pFnNotifyCb, UINT32 ulParm, adslCfgProfile *pAdslCfg); -+#ifdef LINUX -+BCMADSL_STATUS BcmAdsl_MapAtmPortIDs(UINT16 usAtmFastPortId, UINT16 usAtmInterleavedPortId); -+#endif -+BCMADSL_STATUS BcmAdsl_Uninitialize(void); -+BCMADSL_STATUS BcmAdsl_ConnectionStart(void); -+BCMADSL_STATUS BcmAdsl_ConnectionStop(void); -+BCMADSL_STATUS BcmAdsl_GetPhyAddresses(PADSL_CHANNEL_ADDR pChannelAddr); -+BCMADSL_STATUS BcmAdsl_SetPhyAddresses(PADSL_CHANNEL_ADDR pChannelAddr); -+BCMADSL_STATUS BcmAdsl_GetConnectionInfo(PADSL_CONNECTION_INFO pConnectionInfo); -+BCMADSL_STATUS BcmAdsl_DiagCommand(PADSL_DIAG pAdslDiag); -+int BcmAdsl_GetObjectValue(char *objId, int objIdLen, char *dataBuf, long *dataBufLen); -+BCMADSL_STATUS BcmAdsl_StartBERT(unsigned long totalBits); -+BCMADSL_STATUS BcmAdsl_StopBERT(void); -+BCMADSL_STATUS BcmAdsl_BertStartEx(unsigned long bertSec); -+BCMADSL_STATUS BcmAdsl_BertStopEx(void); -+BCMADSL_STATUS BcmAdsl_CheckPowerLoss(void); -+BCMADSL_STATUS BcmAdsl_SendDyingGasp(int powerCtl); -+BCMADSL_STATUS BcmAdsl_Configure(adslCfgProfile *pAdslCfg); -+BCMADSL_STATUS BcmAdsl_GetVersion(adslVersionInfo *pAdslVer); -+BCMADSL_STATUS BcmAdsl_SetSDRAMBaseAddr(void *pAddr); -+BCMADSL_STATUS BcmAdsl_SetVcEntry (int gfc, int port, int vpi, int vci); -+BCMADSL_STATUS BcmAdsl_SetVcEntryEx (int gfc, int port, int vpi, int vci, int pti_clp); -+ -+BCMADSL_STATUS BcmAdsl_ResetStatCounters(void); -+BCMADSL_STATUS BcmAdsl_SetAtmLoopbackMode(void); -+BCMADSL_STATUS BcmAdsl_SetTestMode(ADSL_TEST_MODE testMode); -+BCMADSL_STATUS BcmAdsl_SelectTones( -+ int xmtStartTone, -+ int xmtNumTones, -+ int rcvStartTone, -+ int rcvNumTones, -+ char *xmtToneMap, -+ char *rcvToneMap -+ ); -+BCMADSL_STATUS BcmAdsl_SetDiagMode(int diagMode); -+ -+int BcmAdsl_GetConstellationPoints (int toneId, ADSL_CONSTELLATION_POINT *pointBuf, int numPoints); -+ -+int BcmAdsl_GetOemParameter (int paramId, void *buf, int len); -+int BcmAdsl_SetOemParameter (int paramId, void *buf, int len); -+int BcmAdsl_SetXmtGain(int gain); -+ -+UINT32 BcmAdsl_GetSelfTestMode(void); -+void BcmAdsl_SetSelfTestMode(UINT32 stMode); -+UINT32 BcmAdsl_GetSelfTestResults(void); -+ -+BCMADSL_STATUS BcmAdsl_G997SendData(void *buf, int len); -+void *BcmAdsl_G997FrameGet(int *pLen); -+void *BcmAdsl_G997FrameGetNext(int *pLen); -+void BcmAdsl_G997FrameFinished(void); -+void BcmAdsl_DyingGaspHandler(void *context); -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif // _BCMADSL_H_ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmatmapi.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmatmapi.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmatmapi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmatmapi.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,699 @@ -+/* -+<:copyright-broadcom -+ -+ Copyright (c) 2002 Broadcom Corporation -+ All Rights Reserved -+ No portions of this material may be reproduced in any form without the -+ written permission of: -+ Broadcom Corporation -+ 16215 Alton Parkway -+ Irvine, California 92619 -+ All information contained in this document is Broadcom Corporation -+ company private, proprietary, and trade secret. -+ -+:> -+*/ -+//************************************************************************** -+// File Name : BcmAtmApi.h -+// -+// Description: This file contains the definitions, structures and function -+// prototypes for the Broadcom Asynchronous Transfer Mode (ATM) -+// Application Program Interface (API). -+// -+// Updates : 09/15/2000 lat. Created. -+//************************************************************************** -+ -+#if !defined(_BCMATMAPI_H_) -+#define _BCMATMAPI_H_ -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+//************************************************************************** -+// Constant Definitions -+//************************************************************************** -+ -+// ATM physical port constants. -+#define PHY_NUM_PORTS 4 -+#define PHY_0 0 -+#define PHY_1 1 -+#define PHY_2 2 // [BCM635x Only] -+#define PHY_3 3 // [BCM635x Only] -+ -+// Used for backwards compatibility. -+#define PHY_UTOPIA0 0 -+#define PHY_UTOPIA1 1 -+#define PHY_UTOPIA2 2 -+#define PHY_UTOPIA3_TC_LOOPBACK 3 -+ -+// Values for ATM_PORT_CFG ucPortType. -+#define PT_DISABLED 0 -+#define PT_UTOPIA 1 -+#define PT_LOOPBACK 2 -+#define PT_TC 3 // [BCM635x Only] -+#define PT_ADSL_INTERLEAVED 4 // [BCM6345 Only] -+#define PT_ADSL_FAST 5 // [BCM6345 Only] -+ -+// Wildcard definitions. -+#define ALL_INTERFACES 0xffffffff -+#define ANY_PRIORITY 0xff -+ -+// Values for ATM_TRAFFIC_DESCR_PARM_ENTRY ulTrafficDescrType. -+#define TDT_ATM_NO_TRAFFIC_DESCRIPTOR 1 -+#define TDT_ATM_NO_CLP_NO_SCR 2 -+#define TDT_ATM_CLP_NO_TAGGING_NO_SCR 3 -+#define TDT_ATM_CLP_TAGGING_NO_SCR 4 -+#define TDT_ATM_NO_CLP_SCR 5 -+#define TDT_ATM_CLP_NO_TAGGING_SCR 6 // [BCM635x Only] -+#define TDT_ATM_CLP_TAGGING_SCR 7 // [BCM635x Only] -+#define TDT_ATM_CLP_NO_TAGGING_MCR 8 // [BCM6348 Only] -+#define TDT_ATM_CLP_TRANSPARENT_NO_SCR 9 -+#define TDT_ATM_CLP_TRANSPARENT_SCR 10 -+#define TDT_ATM_NO_CLP_TAGGING_NO_SCR 11 -+#define TDT_ATM_NO_CLP_NO_SCR_CDVT 12 -+#define TDT_ATM_NO_CLP_SCR_CDVT 13 -+#define TDT_ATM_CLP_NO_TAGGING_SCR_CDVT 14 // [BCM635x Only] -+#define TDT_ATM_CLP_TAGGING_SCR_CDVT 15 // [BCM635x Only] -+ -+// Values for ATM_TRAFFIC_DESCR_PARM_ENTRY ulTrafficDescrRowStatus. -+#define TDRS_ACTIVE 1 -+#define TDRS_NOT_IN_SERVICE 2 -+ -+// Values for ATM_TRAFFIC_DESCR_PARM_ENTRY ulServiceCategory. -+#define SC_OTHER 1 -+#define SC_CBR 2 -+#define SC_RT_VBR 3 -+#define SC_NRT_VBR 4 -+#define SC_UBR 6 -+ -+// Values for ATM_INTERFACE_CFG ulIfAdminStatus and ATM_VCC_CFG -+// ulAtmVclAdminStatus. -+#define ADMSTS_UP 1 -+#define ADMSTS_DOWN 2 -+#define ADMSTS_TESTING 3 -+ -+// Values for ATM_INTERFACE_CFG ulIfOperStatus and ATM_VCC_CFG -+// ulAtmVclOperStatus. -+#define OPRSTS_UP 1 -+#define OPRSTS_DOWN 2 -+#define OPRSTS_UNKNOWN 3 -+ -+// Values for ATM_INTERFACE_LINK_INFO ulLinkState. -+#define LINK_UP 1 -+#define LINK_DOWN 2 -+ -+// Values for ulAalType. -+#define AAL_2 0 // [BCM635x Only] -+#define AAL_TRANSPARENT 1 -+#define AAL_0_PACKET 2 -+#define AAL_0_CELL_CRC 3 -+#define AAL_5 7 -+ -+// Values for ATM_VCC_CFG ulAtmVccEncapsType. -+#define ET_VC_MULTIPLEX_ROUTED_PROTOCOL 1 -+#define ET_VC_MULTIPLEX_BRG_PROTOCOL_8023 2 -+#define ET_VC_MULTIPLEX_BRG_PROTOCOL_8025 3 -+#define ET_VC_MULTIPLEX_BRG_PROTOCOL_8026 4 -+#define ET_VC_MULTIPLEX_LAN_EMULATION_8023 5 -+#define ET_VC_MULTIPLEX_LAN_EMULATION_8025 6 -+#define ET_LLC_ENCAPSULATION 7 -+#define ET_MULTI_PROTOCOL_FRAME_RELAY_SSCS 8 -+#define ET_OTHER 9 -+#define ET_UNKNOWN 10 -+ -+// [BCM635x Only] Values for ATM_AAL2_VCC_CFG ucAal2CpsOptimisation. -+#define OPT_SNG_PKT_PER_PDU_NO_OVERLAP 1 -+#define OPT_MULT_PKTS_PER_PDU_OVERLAP 2 -+ -+// [BCM635x Only] Values for ATM_INTERFACE_STATS ulTcAlarmState. -+#define TCALM_NO_ALARM 1 -+#define TCALM_LCD_FAILURE 2 -+ -+// Values for ATM_NOTIFY_PARMS ulNotificationType. -+#define ATM_NOTIFY_INTERFACE_CHANGE 1 -+ -+// Values for AN_INTF_CHANGE_PARMS ulInterfaceState. -+#define ATM_INTERFACE_UP 1 -+#define ATM_INTERFACE_DOWN 2 -+ -+// Values for AN_VCC_CHANGE_PARMS ulInterfaceState. -+#define ATM_VCC_UP 1 -+#define ATM_VCC_DOWN 2 -+ -+// Values for ATM_VCC_ATTACH_PARMS ulFlags. -+#define AVAP_ALLOW_OAM_F5_SEGMENT_CELLS 0x0001 -+#define AVAP_ALLOW_OAM_F5_END_TO_END_CELLS 0x0002 -+#define AVAP_ALLOW_RM_CELLS 0x0004 -+#define AVAP_ALLOW_OAM_F4_SEGMENT_CELLS 0x0008 -+#define AVAP_ALLOW_OAM_F4_END_TO_END_CELLS 0x0010 -+#define AVAP_ALLOW_CELLS_WITH_ERRORS 0x0020 -+#define AVAP_ADD_AAL0_CRC10 0x0040 -+#define AVAP_DSP 0x8000 // [BCM635x Only] -+ -+// [BCM635x Only] Values for ATM_VCC_AAL2_CHANNEL_ID_PARMS ucVoiceRouting. -+#define VOICE_ROUTE_MIPS 0 -+#define VOICE_ROUTE_DSP 2 -+ -+// [BCM635x Only] Values for ATM_VCC_AAL2_CHANNEL_ID_PARMS ucFlags. -+#define CID_USE_FRAME_MODE 0x01 -+ -+// Values for ATM_VCC_DATA_PARMS ucCircuitType. -+#define CT_AAL0_PACKET 0x02 -+#define CT_AAL0_CELL_CRC 0x03 -+#define CT_OAM_F5_SEGMENT 0x04 -+#define CT_OAM_F5_END_TO_END 0x05 -+#define CT_RM 0x06 -+#define CT_AAL5 0x07 -+#define CT_HDLC_PACKET 0x08 // [BCM6348 Only] -+#define CT_ANY_AAL2_MASK 0x08 // [BCM635x Only] -+#define CT_AAL2_ALARM 0x08 // [BCM635x Only] -+#define CT_AAL2_TYPE_3 0x09 // [BCM635x Only] -+#define CT_AAL2_TYPE_1 0x0A // [BCM635x Only] -+#define CT_AAL2_FRAME 0x0B // [BCM635x Only] -+#define CT_TRANSPARENT 0x10 -+#define CT_OAM_F4_ANY 0x20 -+ -+// OAM F4 VCI values. -+#define VCI_OAM_F4_SEGMENT 3 -+#define VCI_OAM_F4_END_TO_END 4 -+#define VCI_RM 6 -+ -+// Values for ATM_VCC_DATA_PARMS ucFlags. -+#define ATMDATA_CI 0x04 -+#define ATMDATA_CLP 0x08 -+ -+// [BCM635x Only] DSP specific values. -+#define DSP_VCID 31 -+ -+// ATM cell layer interface name -+#define ATM_CELL_LAYER_IFNAME "atm0" -+ -+// AAL5 CPCS layer interface name -+#define AAL5_CPCS_LAYER_IFNAME "cpcs0" -+ -+//************************************************************************** -+// Type Definitions -+//************************************************************************** -+ -+// Return status values -+typedef enum BcmAtmStatus -+{ -+ STS_SUCCESS = 0, -+ STS_ERROR, -+ STS_STATE_ERROR, -+ STS_PARAMETER_ERROR, -+ STS_ALLOC_ERROR, -+ STS_RESOURCE_ERROR, -+ STS_IN_USE, -+ STS_VCC_DOWN, -+ STS_INTERFACE_DOWN, -+ STS_LINK_DOWN, -+ STS_NOT_FOUND, -+ STS_NOT_SUPPORTED, -+ STS_VCAM_MULT_MATCH_ERROR, -+ STS_CCAM_MULT_MATCH_ERROR, -+ STS_PKTERR_INVALID_VPI_VCI, -+ STS_PKTERR_PORT_NOT_ENABLED, -+ STS_PKTERR_HEC_ERROR, -+ STS_PKTERR_PTI_ERROR, -+ STS_PKTERR_RECEIVED_IDLE_CELL, -+ STS_PKTERR_CIRCUIT_TYPE_ERROR, -+ STS_PKTERR_OAM_RM_CRC_ERROR, -+ STS_PKTERR_GFC_ERROR, -+ STS_PKTERR_AAL5_AAL0_CRC_ERROR, -+ STS_PKTERR_AAL5_AAL0_SHORT_PKT_ERROR, -+ STS_PKTERR_AAL5_AAL0_LENGTH_ERROR, -+ STS_PKTERR_AAL5_AAL0_BIG_PKT_ERROR, -+ STS_PKTERR_AAL5_AAL0_SAR_TIMEOUT_ERROR, -+ STS_PKTERR_AAL2F_HEC_ERROR, -+ STS_PKTERR_AAL2F_SEQ_NUM_ERROR, -+ STS_PKTERR_AAL2F_PARITY_ERROR, -+ STS_PKTERR_AAL2F_CRC_ERROR, -+ STS_PKTERR_AAL2F_CAM_ERROR, -+ STS_PKTERR_AAL2F_BIG_PKT_ERROR, -+ STS_PKTERR_AAL2F_RAS_TIMEOUT_ERROR, -+ STS_PKTERR_AAL2F_SHORT_PKT_ERROR, -+ STS_PKTERR_AAL2F_LENGTH_MISMATCH_ERROR, -+ STS_PKTERR_AAL2V_HEC_ERROR, -+ STS_PKTERR_AAL2V_SEQ_NUM_ERROR, -+ STS_PKTERR_AAL2V_PARITY_ERROR, -+ STS_PKTERR_AAL2V_CRC_ERROR, -+ STS_PKTERR_AAL2V_CAM_ERROR, -+ STS_PKTERR_AAL2V_OSF_MISMATCH_ERROR, -+ STS_PKTERR_AAL2V_OSF_ERROR, -+ STS_PKTERR_AAL2V_HEC_OVERLAP_ERROR, -+ STS_PKTERR_AAL2V_BIG_PKT_ERROR, -+ STS_PKTERR_AAL2V_RAS_ERROR, -+ STS_PKTERR_AAL2V_UUI_ERROR -+} BCMATM_STATUS; -+ -+ -+// ATM_VCC_ADDR identifies a Virtual Channel Connection (VCC). -+typedef struct AtmVccAddr -+{ -+ UINT32 ulInterfaceId; -+ UINT16 usVpi; -+ UINT16 usVci; -+} ATM_VCC_ADDR, *PATM_VCC_ADDR; -+ -+ -+// ATM_PORT_CFG contains ATM physical port configuration parameters. -+typedef struct AtmPortCfg -+{ -+ UINT32 ulInterfaceId; -+ UINT8 ucPortType; -+ UINT8 ucPortAddr; -+ UINT8 ucReserved[2]; -+} ATM_PORT_CFG, *PATM_PORT_CFG; -+ -+ -+// ATM_INITIALIZATION_PARMS contains ATM API module initialization parameters. -+#define ID_ATM_INITIALIZATION_PARMS 2 -+typedef struct AtmInitialization -+{ -+ UINT32 ulStructureId; -+ UINT32 ulThreadPriority; -+ UINT16 usFreeCellQSize; -+ UINT16 usFreePktQSize; -+ UINT16 usFreePktQBufferSize; -+ UINT16 usFreePktQBufferOffset; // offset into buffer to start receiving data -+ UINT16 usReceiveCellQSize; -+ UINT16 usReceivePktQSize; -+ UINT8 ucTransmitFifoPriority; // [BCM635x Only] -+ UINT8 ucReserved; -+ UINT16 usAal5CpcsMaxSduLength; -+ UINT16 usAal2SscsMaxSsarSduLength; // [BCM635x Only] -+ ATM_PORT_CFG PortCfg[PHY_NUM_PORTS]; -+} ATM_INITIALIZATION_PARMS, *PATM_INITIALIZATION_PARMS; -+ -+ -+// ATM_TRAFFIC_DESCR_PARM_ENTRY contains the fields needed to create a Traffic -+// Descriptor Table parameter entry. -+#define ID_ATM_TRAFFIC_DESCR_PARM_ENTRY 1 -+typedef struct AtmTrafficDescrParmEntry -+{ -+ UINT32 ulStructureId; -+ UINT32 ulTrafficDescrIndex; -+ UINT32 ulTrafficDescrType; -+ UINT32 ulTrafficDescrParm1; -+ UINT32 ulTrafficDescrParm2; -+ UINT32 ulTrafficDescrParm3; -+ UINT32 ulTrafficDescrParm4; -+ UINT32 ulTrafficDescrParm5; -+ UINT32 ulTrafficDescrRowStatus; -+ UINT32 ulServiceCategory; -+ UINT32 ulTrafficFrameDiscard; -+} ATM_TRAFFIC_DESCR_PARM_ENTRY, *PATM_TRAFFIC_DESCR_PARM_ENTRY; -+ -+ -+// ATM_INTERFACE_CFG contains configuration fields for an ATM interface. -+#define ID_ATM_INTERFACE_CFG 3 -+typedef struct AtmInterfaceCfg -+{ -+ UINT32 ulStructureId; -+ UINT32 ulAtmInterfaceMaxVccs; -+ UINT32 ulAtmInterfaceConfVccs; -+ UINT32 ulAtmInterfaceMaxActiveVpiBits; -+ UINT32 ulAtmInterfaceMaxActiveVciBits; -+ UINT32 ulAtmInterfaceCurrentMaxVpiBits; -+ UINT32 ulAtmInterfaceCurrentMaxVciBits; -+ UINT32 ulIfAdminStatus; -+ UINT32 ulIfOperStatus; // read-only -+ UINT32 ulSendNullCells; -+ UINT32 ulTcScramble; -+ UINT32 ulPortType; // read-only -+ UINT32 ulIfLastChange; -+} ATM_INTERFACE_CFG, *PATM_INTERFACE_CFG; -+ -+ -+// ATM_VCC_TRANSMIT_QUEUE_PARMS contains fields for configuring an transmit -+// queue. -+#define ID_ATM_VCC_TRANSMIT_QUEUE_PARMS 1 -+typedef struct AtmVccTransmitQueueParms -+{ -+ UINT32 ulStructureId; -+ UINT32 ulSize; -+ UINT32 ulPriority; -+ UINT32 ulReserved; -+} ATM_VCC_TRANSMIT_QUEUE_PARMS, *PATM_VCC_TRANSMIT_QUEUE_PARMS; -+ -+ -+// ATM_AAL5_VCC_CFG contains configuration fields for an ATM AAL5 Virtual -+// Channel Connection (VCC). -+typedef struct AtmAal5VccCfg -+{ -+ UINT32 ulAtmVccEncapsType; -+ UINT32 ulAtmVccCpcsAcceptCorruptedPdus; -+} ATM_AAL5_VCC_CFG, *PATM_AAL5_VCC_CFG; -+ -+ -+// [BCM635x Only] ATM_AAL2_VCC_CFG contains configuration fields for an ATM -+// AAL2 Virtual Channel Connection (VCC). -+typedef struct AtmAal2VccCfg -+{ -+ UINT8 ucAal2CpsMaxMultiplexedChannels; -+ UINT8 ucAal2CpsMaxSduLength; -+ UINT8 ucAal2CpsCidLowerLimit; -+ UINT8 ucAal2CpsCidUpperLimit; -+ UINT8 ucAal2CpsOptimisation; -+ UINT8 ucReserved[3]; -+} ATM_AAL2_VCC_CFG, *PATM_AAL2_VCC_CFG; -+ -+ -+// ATM_AAL0_VCC_CFG contains configuration fields for an ATM AAL0 Virtual -+// Channel Connection (VCC). -+typedef struct AtmAal0VccCfg -+{ -+ UINT8 ucReserved; -+ // Reserved for future use. -+} ATM_AAL0_VCC_CFG, *PATM_AAL0_VCC_CFG; -+ -+ -+// ATM_VCC_CFG contains configuration fields for an ATM Virtual Channel -+// Connection (VCC). -+#define ID_ATM_VCC_CFG 2 -+#define TX_Q_PARM_SIZE 8 -+typedef struct AtmVccCfg -+{ -+ UINT32 ulStructureId; -+ UINT32 ulAalType; -+ UINT32 ulAtmVclAdminStatus; -+ UINT32 ulAtmVclOperStatus; -+ UINT32 ulAtmVclLastChange; -+ UINT32 ulAtmVclReceiveTrafficDescrIndex; -+ UINT32 ulAtmVclTransmitTrafficDescrIndex; -+ UINT32 ulTransmitQParmsSize; -+ ATM_VCC_TRANSMIT_QUEUE_PARMS TransmitQParms[TX_Q_PARM_SIZE]; -+ union -+ { -+ ATM_AAL5_VCC_CFG Aal5Cfg; -+ ATM_AAL2_VCC_CFG Aal2Cfg; // [BCM635x Only] -+ ATM_AAL0_VCC_CFG Aal0Cfg; -+ } u; -+} ATM_VCC_CFG, *PATM_VCC_CFG; -+ -+ -+// ATM_INTF_ATM_STATS contains statistics for the ATM layer of an interface. -+typedef struct AtmIntfAtmStats -+{ -+ UINT32 ulIfInOctets; -+ UINT32 ulIfOutOctets; -+ UINT32 ulIfInErrors; -+ UINT32 ulIfInUnknownProtos; -+ UINT32 ulIfOutErrors; -+ -+ // The following fields are added together to calculate ulIfInErrors. -+ UINT32 ulIfInHecErrors; -+ -+ // The following fields are added together to calculate ulIfInUnknownProtos. -+ UINT32 ulIfInInvalidVpiVciErrors; -+ UINT32 ulIfInPortNotEnabledErrors; -+ UINT32 ulIfInPtiErrors; -+ UINT32 ulIfInIdleCells; -+ UINT32 ulIfInCircuitTypeErrors; -+ UINT32 ulIfInOamRmCrcErrors; -+ UINT32 ulIfInGfcErrors; -+} ATM_INTF_ATM_STATS, *PATM_INTF_ATM_STATS; -+ -+ -+// [BCM635x Only] ATM_INTF_ATM_STATS contains statistics for the TC layer. -+typedef struct AtmIntfTcStats -+{ -+ UINT32 ulTcInDataCells; -+ UINT32 ulTcInTotalCells; -+ UINT32 ulTcInHecErrors; -+ UINT32 ulTcInOcdEvents; -+ UINT32 ulTcAlarmState; -+} ATM_INTF_TC_STATS, *PATM_INTF_TC_STATS; -+ -+ -+// ATM_INTF_AAL5_AAL0_STATS contains statistics for all AAL5/AAL0 VCCs on an -+// ATM interface. -+typedef struct AtmIntfAal5Aal0Stats -+{ -+ UINT32 ulIfInOctets; -+ UINT32 ulIfOutOctets; -+ UINT32 ulIfInUcastPkts; -+ UINT32 ulIfOutUcastPkts; -+ UINT32 ulIfInErrors; -+ UINT32 ulIfOutErrors; -+ UINT32 ulIfInDiscards; -+ UINT32 ulIfOutDiscards; -+} ATM_INTF_AAL5_AAL0_STATS, *PATM_INTF_AAL5_AAL0_STATS; -+ -+ -+// [BCM635x Only] ATM_INTF_AAL2_STATS contains statistics for all AAL2 VCCs -+// on an ATM interface. -+typedef struct AtmIntfAal2Stats -+{ -+ UINT32 ulIfInOctets; -+ UINT32 ulIfOutOctets; -+ UINT32 ulIfInUcastPkts; -+ UINT32 ulIfOutUcastPkts; -+ UINT32 ulIfInErrors; -+ UINT32 ulIfOutErrors; -+ UINT32 ulIfInDiscards; -+ UINT32 ulIfOutDiscards; -+} ATM_INTF_AAL2_STATS, *PATM_INTF_AAL2_STATS; -+ -+ -+// ATM_INTERFACE_STATS contains statistics for an ATM interface. -+#define ID_ATM_INTERFACE_STATS 1 -+typedef struct AtmInterfaceStats -+{ -+ UINT32 ulStructureId; -+ ATM_INTF_ATM_STATS AtmIntfStats; -+ ATM_INTF_TC_STATS TcIntfStats; // [BCM635x Only] -+ ATM_INTF_AAL5_AAL0_STATS Aal5IntfStats; -+ ATM_INTF_AAL2_STATS Aal2IntfStats; // [BCM635x Only] -+ ATM_INTF_AAL5_AAL0_STATS Aal0IntfStats; -+} ATM_INTERFACE_STATS, *PATM_INTERFACE_STATS; -+ -+ -+// ATM_VCC_AAL5_STATS contains statistics for an AAL5 VCC. -+typedef struct AtmVccAal5Stats -+{ -+ UINT32 ulAal5VccCrcErrors; -+ UINT32 ulAal5VccSarTimeOuts; -+ UINT32 ulAal5VccOverSizedSdus; -+ UINT32 ulAal5VccShortPacketErrors; -+ UINT32 ulAal5VccLengthErrors; -+} ATM_VCC_AAL5_STATS, *PATM_VCC_AAL5_STATS; -+ -+ -+// [BCM635x Only] ATM_VCC_AAL2_STATS contains statistics for an AAL2 VCC. -+typedef struct AtmVccAal2Stats -+{ -+ UINT32 ulAal2CpsInPkts; -+ UINT32 ulAal2CpsOutPkts; -+ UINT32 ulAal2CpsParityErrors; -+ UINT32 ulAal2CpsSeqNumErrors; -+ UINT32 ulAal2CpsOsfMismatchErrors; -+ UINT32 ulAal2CpsOsfErrors; -+ UINT32 ulAal2CpsHecOverlapErrors; -+ UINT32 ulAal2CpsHecErrors; -+ UINT32 ulAal2CpsOversizedSduErrors; -+ UINT32 ulAal2CpsReassemblyErrors; -+ UINT32 ulAal2CpsUuiErrors; -+ UINT32 ulAal2CpsCidErrors; -+ UINT32 ulAal2SscsOversizedSssarSduErrors; -+ UINT32 ulAal2SscsSssarRasTimerExipiryErrors; -+ UINT32 ulAal2SscsUndersizedSstedPduErrors; -+ UINT32 ulAal2SscsSstedPduLengthMismatchErrors; -+ UINT32 ulAal2SscsSstedCrcMismatchErrors; -+} ATM_VCC_AAL2_STATS, *PATM_VCC_AAL2_STATS; -+ -+ -+// ATM_VCC_AAL0PKT_STATS contains statistics for an AAL0 Packet VCC. -+typedef struct AtmVccAal0PktStats -+{ -+ UINT32 ulAal0VccSarTimeOuts; -+ UINT32 ulAal0VccOverSizedSdus; -+} ATM_VCC_AAL0PKT_STATS, *PATM_VCC_AAL0PKT_STATS; -+ -+ -+// ATM_VCC_AAL0CELL_STATS contains statistics for an AAL0 Cell with CRC VCC. -+typedef struct AtmVccAal0CellStats -+{ -+ UINT32 ulAal0VccCrcErrors; -+} ATM_VCC_AAL0CELL_STATS, *PATM_VCC_AAL0CELL_STATS; -+ -+ -+// ATM_VCC_STATS contains statistics for a VCC. -+#define ID_ATM_VCC_STATS 1 -+typedef struct AtmVccStatistics -+{ -+ UINT32 ulStructureId; -+ UINT32 ulAalType; -+ union -+ { -+ ATM_VCC_AAL5_STATS AtmVccAal5Stats; -+ ATM_VCC_AAL2_STATS AtmVccAal2Stats; // [BCM635x Only] -+ ATM_VCC_AAL0PKT_STATS AtmVccAal0PktStats; -+ ATM_VCC_AAL0CELL_STATS AtmVccAal0CellStats; -+ } u; -+} ATM_VCC_STATS, *PATM_VCC_STATS; -+ -+ -+// ATM_INTERFACE_LINK_INFO contains fields for the physical link that the -+// ATM interface is using. -+#define ID_ATM_INTERFACE_LINK_INFO 1 -+typedef struct AtmInterfaceLinkInfo -+{ -+ UINT32 ulStructureId; -+ UINT32 ulLinkState; -+ UINT32 ulLineRate; -+ UINT32 ulReserved[2]; -+} ATM_INTERFACE_LINK_INFO, *PATM_INTERFACE_LINK_INFO; -+ -+ -+// AN_INTF_CHANGE_PARMS contains notification fields that passed to an -+// application callback function when the ATM interface goes up or down. -+#define ID_AN_INTF_CHANGE_PARMS 1 -+typedef struct AnIntfChangeParms -+{ -+ UINT32 ulInterfaceId; -+ UINT32 ulInterfaceState; -+ UINT32 ulInterfaceLineRate; -+} AN_INTF_CHANGE_PARMS, *PAN_INTF_CHANGE_PARMS; -+ -+ -+// ATM_NOTIFY_PARMS contains notification fields that passed to an application -+// callback function when an ATM notification event occurs. -+typedef struct AtmNotifyParms -+{ -+ UINT32 ulNotifyType; -+ union -+ { -+ AN_INTF_CHANGE_PARMS IntfChangeParms; -+ -+ // Other fields and structures that are specific -+ // to the type of notification are declared here. -+ } u; -+} ATM_NOTIFY_PARMS, *PATM_NOTIFY_PARMS; -+ -+typedef void (*FN_NOTIFY_CB) (PATM_NOTIFY_PARMS pNotifyParms); -+ -+ -+// ATM_VCC_ATTACH_PARMS contains fields for attaching to a VCC. It is used -+// by all BcmAtm_Attach... functions. -+struct AtmVccDataParms; -+typedef void (*FN_RECEIVE_CB) (UINT32 ulHandle, PATM_VCC_ADDR pVccAddr, -+ struct AtmVccDataParms *pDataParms, UINT32 ulParmReceiveData); -+ -+#define ID_ATM_VCC_ATTACH_PARMS 1 -+typedef struct AtmAttachParms -+{ -+ UINT32 ulStructureId; -+ UINT32 ulFlags; -+ FN_RECEIVE_CB pFnReceiveDataCb; -+ UINT32 ulParmReceiveData; -+ ATM_VCC_TRANSMIT_QUEUE_PARMS *pTransmitQParms; -+ UINT32 ulTransmitQParmsSize; -+ UINT32 ulHandle; -+ UINT32 ulReserved; -+} ATM_VCC_ATTACH_PARMS, *PATM_VCC_ATTACH_PARMS; -+ -+ -+// [BCM635x Only] ATM_VCC_AAL2_CHANNEL_ID_PARMS contains fields for -+// configuring an transmit queue. -+#define ID_ATM_VCC_AAL2_CHANNEL_ID_PARMS 1 -+typedef struct AtmVccAal2ChannelIdParms -+{ -+ UINT32 ulStructureId; -+ UINT8 ucChannelId; -+ UINT8 ucVoiceRouting; -+ UINT8 ucFlags; -+ UINT8 ucReserved[5]; -+} ATM_VCC_AAL2_CHANNEL_ID_PARMS, *PATM_VCC_AAL2_CHANNEL_ID_PARMS; -+ -+ -+// ATM_BUFFER contains fields for passing data to, and receive data from, the -+// ATM API. -+typedef struct AtmBuffer -+{ -+ struct AtmBuffer *pNextAtmBuf; -+ UINT8 *pDataBuf; -+ UINT32 ulDataLen; -+ UINT16 usDataOffset; -+ UINT16 usReserved; -+ UINT32 ulReserved; -+} ATM_BUFFER, *PATM_BUFFER; -+ -+ -+// ATM_VCC_DATA_PARMS contains fields for sending or receiving data on a VCC. -+// It is used by all BcmAtm_Send... and receive functions. -+typedef void (*FN_FREE_DATA_PARMS) (struct AtmVccDataParms *pDataParms); -+ -+#define ID_ATM_VCC_DATA_PARMS 2 -+typedef struct AtmVccDataParms -+{ -+ UINT32 ulStructureId; -+ UINT8 ucCircuitType; -+ UINT8 ucAal2ChannelId; // [BCM635x Only] -+ UINT8 ucUuData8; -+ UINT8 ucUuData5; -+ UINT8 ucFlags; -+ UINT8 ucSendPriority; -+ UINT8 ucReserved[2]; -+ BCMATM_STATUS baReceiveStatus; -+ PATM_BUFFER pAtmBuffer; -+ FN_FREE_DATA_PARMS pFnFreeDataParms; -+ UINT32 ulParmFreeDataParms; -+ struct AtmVccDataParms *pApplicationLink; -+ UINT32 ulApplicationDefined[2]; -+} ATM_VCC_DATA_PARMS, *PATM_VCC_DATA_PARMS; -+ -+ -+//************************************************************************** -+// Function Prototypes -+//************************************************************************** -+ -+BCMATM_STATUS BcmAtm_Initialize( PATM_INITIALIZATION_PARMS pInitValues ); -+BCMATM_STATUS BcmAtm_Uninitialize( void ); -+BCMATM_STATUS BcmAtm_GetInterfaceId( UINT8 ucPhyPort, UINT32 *pulInterfaceId ); -+BCMATM_STATUS BcmAtm_GetTrafficDescrTableSize(UINT32 *pulTrafficDescrTableSize); -+BCMATM_STATUS BcmAtm_GetTrafficDescrTable( PATM_TRAFFIC_DESCR_PARM_ENTRY -+ pTrafficDescTable, UINT32 ulTrafficDescrTableSize ); -+BCMATM_STATUS BcmAtm_SetTrafficDescrTable( PATM_TRAFFIC_DESCR_PARM_ENTRY -+ pTrafficDescTable, UINT32 ulTrafficDescrTableSize ); -+BCMATM_STATUS BcmAtm_GetInterfaceCfg( UINT32 ulInterfaceId, PATM_INTERFACE_CFG -+ pInterfaceCfg ); -+BCMATM_STATUS BcmAtm_SetInterfaceCfg( UINT32 ulInterfaceId, PATM_INTERFACE_CFG -+ pInterfaceCfg ); -+BCMATM_STATUS BcmAtm_GetVccCfg( PATM_VCC_ADDR pVccAddr, PATM_VCC_CFG pVccCfg ); -+BCMATM_STATUS BcmAtm_SetVccCfg( PATM_VCC_ADDR pVccAddr, PATM_VCC_CFG pVccCfg ); -+BCMATM_STATUS BcmAtm_GetVccAddrs( UINT32 ulInterfaceId, PATM_VCC_ADDR pVccAddrs, -+ UINT32 ulNumVccs, UINT32 *pulNumReturned ); -+BCMATM_STATUS BcmAtm_GetInterfaceStatistics( UINT32 ulInterfaceId, -+ PATM_INTERFACE_STATS pStatistics, UINT32 ulReset ); -+BCMATM_STATUS BcmAtm_GetVccStatistics( PATM_VCC_ADDR pVccAddr, PATM_VCC_STATS -+ pVccStatistics, UINT32 ulReset ); -+BCMATM_STATUS BcmAtm_SetInterfaceLinkInfo( UINT32 ulInterfaceId, -+ PATM_INTERFACE_LINK_INFO pInterfaceCfg ); -+BCMATM_STATUS BcmAtm_SetNotifyCallback( FN_NOTIFY_CB pFnNotifyCb ); -+BCMATM_STATUS BcmAtm_ResetNotifyCallback( FN_NOTIFY_CB pFnNotifyCb ); -+BCMATM_STATUS BcmAtm_AttachVcc( PATM_VCC_ADDR pVccAddr, PATM_VCC_ATTACH_PARMS -+ pAttachParms ); -+BCMATM_STATUS BcmAtm_AttachMgmtCells( UINT32 ulInterfaceId, -+ PATM_VCC_ATTACH_PARMS pAttachParms ); -+BCMATM_STATUS BcmAtm_AttachTransparent( UINT32 ulInterfaceId, -+ PATM_VCC_ATTACH_PARMS pAttachParms ); -+BCMATM_STATUS BcmAtm_Detach( UINT32 ulHandle ); -+BCMATM_STATUS BcmAtm_SetAal2ChannelIds( UINT32 ulHandle, -+ PATM_VCC_AAL2_CHANNEL_ID_PARMS pChannelIdParms, UINT32 -+ ulNumChannelIdParms ); // [BCM635x Only] -+BCMATM_STATUS BcmAtm_SendVccData( UINT32 ulHandle, -+ PATM_VCC_DATA_PARMS pDataParms ); -+BCMATM_STATUS BcmAtm_SendMgmtData( UINT32 ulHandle, PATM_VCC_ADDR pVccAddr, -+ PATM_VCC_DATA_PARMS pDataParms ); -+BCMATM_STATUS BcmAtm_SendTransparentData( UINT32 ulHandle, UINT32 ulInterfaceId, -+ PATM_VCC_DATA_PARMS pDataParms ); -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif // _BCMATMAPI_H_ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmnet.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmnet.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmnet.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmnet.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,78 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: bcmnet.h */ -+/* DATE: 05/16/02 */ -+/* PURPOSE: network interface ioctl definition */ -+/* */ -+/***********************************************************************/ -+#ifndef _IF_NET_H_ -+#define _IF_NET_H_ -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#define LINKSTATE_DOWN 0 -+#define LINKSTATE_UP 1 -+ -+/*---------------------------------------------------------------------*/ -+/* Ethernet Switch Type */ -+/*---------------------------------------------------------------------*/ -+#define ESW_TYPE_UNDEFINED 0 -+#define ESW_TYPE_BCM5325M 1 -+#define ESW_TYPE_BCM5325E 2 -+#define ESW_TYPE_BCM5325F 3 -+ -+/* -+ * Ioctl definitions. -+ */ -+/* reserved SIOCDEVPRIVATE */ -+enum { -+ SIOCGLINKSTATE = SIOCDEVPRIVATE + 1, -+ SIOCSCLEARMIBCNTR, -+ SIOCGIFTRANSSTART, -+ SIOCMIBINFO, -+ SIOCSDUPLEX, /* 0: auto 1: full 2: half */ -+ SIOCSSPEED, /* 0: auto 1: 100mbps 2: 10mbps */ -+ SIOCCIFSTATS, -+ SIOCGENABLEVLAN, -+ SIOCGDISABLEVLAN, -+ SIOCGQUERYNUMVLANPORTS, -+ SIOCGSWITCHTYPE, -+ SIOCGQUERYNUMPORTS, -+ SIOCLAST -+}; -+ -+#define SPEED_10MBIT 10000000 -+#define SPEED_100MBIT 100000000 -+ -+typedef struct IoctlMibInfo -+{ -+ unsigned long ulIfLastChange; -+ unsigned long ulIfSpeed; -+} IOCTL_MIB_INFO, *PIOCTL_MIB_INFO; -+ -+ -+#if __cplusplus -+} -+#endif -+ -+#endif /* _IF_NET_H_ */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmos.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmos.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/bcmos.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/bcmos.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,98 @@ -+/*************************************************************************** -+* Copyright 2000 Broadcom Corporation -+* All Rights Reserved -+* No portions of this material may be reproduced in any form without the -+* written permission of: -+* Broadcom Corporation -+* 16251 Laguna Canyon Road -+* Irvine, California 92618 -+* All information contained in this document is Broadcom Corporation -+* company private, proprietary, and trade secret. -+* -+**************************************************************************** -+* -+* Filename: bcmos.h -+* Creation Date: 8 June 2000 (v0.00) -+* VSS Info: -+* $Revision: 16 $ -+* $Date: 5/03/01 5:03p $ -+* -+**************************************************************************** -+* Description: -+* -+* Broadcom Generic Operating System Functions. -+* -+****************************************************************************/ -+ -+#ifndef _BCMOS_H -+#define _BCMOS_H -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+#ifdef __KERNEL__ -+#include <cxcEnv.h> -+#include <bosSleep.h> -+#include <bosTask.h> -+ -+#include <linux/kernel.h> -+#include <linux/slab.h> -+#include <linux/interrupt.h> -+#include <bcmtypes.h> -+ -+#define malloc(arg) kmalloc(arg, GFP_KERNEL) -+#define free(arg) kfree(arg) -+ -+#define BCMOS_ASSERT(expr) \ -+if ((expr)? 0:1) \ -+{ \ -+ printk(" ASSERT !!! File %s, line %u \n", __FILE__, __LINE__); \ -+ bosSleep( 10 ); \ -+ cli(); /* Disable interrupts */ \ -+ while(1){ ; } \ -+} -+ -+#define CXC_ASSERT BCMOS_ASSERT // For compatibility with CX's endpoint -+ -+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ -+/* Special BOS definitions */ -+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ -+#define DSL_NO_RESETSUPPORT -+ -+ -+#define bosSocketHtoNL( num ) ((UINT32)( num )) -+#define bosSocketHtoNS( num ) ((UINT16)( num )) -+#define bosSocketNtoHL( num ) ((UINT32)( num )) -+#define bosSocketNtoHS( num ) ((UINT16)( num )) -+#define bosSocketNtoHS( num ) ((UINT16)( num )) -+#define bosSocketNtoHU16 bosSocketNtoHS -+ -+ -+#else /* LINUX */ -+ -+#include <cxcEnv.h> -+#include <assert.h> -+#include <string.h> -+#include <malloc.h> -+ -+#define BCMOS_TASKNAME( nameVar, nameStr ) char nameVar[] = nameStr -+ -+#define TEN_MSEC 10 -+#define TWENTY_MSEC 20 -+#define ONE_HUNDRED_MSEC 100 -+#define FIVE_HUNDRED_MSEC 500 -+#define ONE_SECOND 1000 -+#define TWO_SECONDS 2000 -+ -+#define BCMOS_ASSERT( expr) assert( expr ) -+ -+#endif -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+ -+#endif /* _BCMOS_H */ -+ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/cxcEnv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/cxcEnv.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/cxcEnv.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/cxcEnv.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,79 @@ -+/*************************************************************************** -+* Copyright 2000 Broadcom Corporation -+* All Rights Reserved -+* No portions of this material may be reproduced in any form without the -+* written permission of: -+* Broadcom Corporation -+* 16251 Laguna Canyon Road -+* Irvine, California 92618 -+* All information contained in this document is Broadcom Corporation -+* company private, proprietary, and trade secret. -+* -+**************************************************************************** -+* -+* Filename: cxcEnv.h -+* Creation Date: -+* VSS Info: -+* $Revision: 43 $ -+* $Date: 12/03/02 5:50p $ -+* -+**************************************************************************** -+* Description: -+* -+* This file is used in CableX to provide system-wide types and definitions. Howewever. -+* since iit tries to include various C run-time library dcefintions (eh stdio.h, it is not -+* appropriate for use "as is" in a Linux kernel environment. So the CableX endpoint source -+* does not need to change, we use this file to recursively include bcmtypes.h -+* -+* NOTE: This file is based upon LDX's hausenv.h, but has been renamed to -+* avoid project dependencies, and allow for CablexChange customizations. -+* -+****************************************************************************/ -+ -+#ifndef CXC_ENV_H -+#define CXC_ENV_H -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* -------------------------------------------------------------------------- -+** Just include definitions from bcmtypes.h -+*/ -+#include <bcmtypes.h> -+ -+#undef EPT_TEST -+ -+#if !defined( HAUS_SINT16_DEFINED ) -+#define HAUS_SINT16_DEFINED -+typedef signed short SINT16; /* SINT16 is platform independant */ -+#endif -+ -+ -+#if !defined( HAUS_SINT32_DEFINED ) -+#define HAUS_SINT32_DEFINED -+typedef signed long SINT32; -+#endif -+ -+#define SUCCESS 0 -+#define FAILURE 1 -+ -+ -+// GNU definition imported from cxc_compiler.h -+#define CXC_INLINE __inline__ -+ -+// Endian-ness imported from cxc_cpu.h -+#define CXC_CPU_BIG_ENDIAN 1 -+#define CXC_CPU_LITTLE_ENDIAN 0 -+ -+#if defined(__KERNEL__) -+#define CXC_OS_LINUX 1 -+#define PSOS 0 -+#define VXWORKS 0 -+#endif -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* CXC_ENV_H */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/cxcLog.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/cxcLog.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/cxcLog.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/cxcLog.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,34 @@ -+/*************************************************************************** -+* Copyright 2000 Broadcom Corporation -+* All Rights Reserved -+* No portions of this material may be reproduced in any form without the -+* written permission of: -+* Broadcom Corporation -+* 16251 Laguna Canyon Road -+* Irvine, California 92618 -+* All information contained in this document is Broadcom Corporation -+* company private, proprietary, and trade secret. -+* -+**************************************************************************** -+* -+* Filename: log.h -+* Creation Date: 17 September 2001 (v0.00) -+* VSS Info: -+* $Revision: 3 $ -+* $Date: 11/13/02 3:42p $ -+* -+**************************************************************************** -+* Description: -+* -+* This filename is preserved in order to minimize the changes -+* in the endpoint code, which is shared with the Cablex endpoint. -+* cxcLog.h simply includes log.h, which contains the log macros. -+* -+****************************************************************************/ -+ -+#ifndef CXC_LOG_H -+#define CXC_LOG_H -+ -+#include <log.h> -+ -+#endif /* CXC_LOG_H */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,243 @@ -+/*************************************************************************** -+ * Broadcom Corp. Confidential -+ * Copyright 2001 Broadcom Corp. All Rights Reserved. -+ * -+ * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED -+ * SOFTWARE LICENSE AGREEMENT BETWEEN THE USER AND BROADCOM. -+ * YOU HAVE NO RIGHT TO USE OR EXPLOIT THIS MATERIAL EXCEPT -+ * SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. -+ * -+ *************************************************************************** -+ * File Name : EndpointDrv.h -+ * -+ * Description: This file contains the definitions and structures for the -+ * Linux IOCTL interface that used between the user mode Endpoint -+ * API library and the kernel Endpoint API driver. -+ * -+ * Updates : 04/04/2002 YD. Created. -+ ***************************************************************************/ -+ -+#if !defined(_ENDPOINTDRV_H_) -+#define _ENDPOINTDRV_H_ -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+/* Includes. */ -+#include <bcmtypes.h> -+#include <vrgEndpt.h> -+#include <endptvoicestats.h> -+ -+/* Maximum size for the event data passed with the event callback */ -+#define MAX_EVENTDATA_SIZE 256 -+ -+typedef enum ENDPOINTIOCTL_INDEX -+{ -+ ENDPTIO_INIT_INDEX = 0, -+ ENDPTIO_DEINIT_INDEX, -+ ENDPTIO_CREATE_INDEX, -+ ENDPTIO_CAPABILITIES_INDEX, -+ ENDPTIO_SIGNAL_INDEX, -+ ENDPTIO_CREATE_CONNECTION_INDEX, -+ ENDPTIO_MODIFY_CONNECTION_INDEX, -+ ENDPTIO_DELETE_CONNECTION_INDEX, -+ ENDPTIO_PACKET_INDEX, -+ ENDPTIO_GET_PACKET_INDEX, -+ ENDPTIO_GET_EVENT_INDEX, -+ ENDPTIO_GET_CODECMAP_INDEX, -+ ENDPTIO_VOICESTAT_INDEX, -+ ENDPTIO_ISINITIALIZED_INDEX, -+ ENDPTIO_CONSOLE_CMD_INDEX, -+ ENDPTIO_TEST_INDEX, -+ ENDPTIO_ENDPOINTCOUNT_INDEX, -+ ENDPTIO_MAX_INDEX -+} ENDPOINTIOCTL_INDEX; -+ -+ -+/* Defines. */ -+#define ENDPOINTDRV_MAJOR 209 /* arbitrary unused value */ -+ -+#define ENDPOINTIOCTL_ENDPT_INIT \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_INIT_INDEX, ENDPOINTDRV_INIT_PARAM) -+ -+#define ENDPOINTIOCTL_ENDPT_DEINIT \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_DEINIT_INDEX, ENDPOINTDRV_INIT_PARAM) -+ -+#define ENDPOINTIOCTL_ENDPT_CREATE \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_CREATE_INDEX, ENDPOINTDRV_CREATE_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_CAPABILITIES \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_CAPABILITIES_INDEX, ENDPOINTDRV_CAP_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_SIGNAL \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_SIGNAL_INDEX, ENDPOINTDRV_SIGNAL_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_CREATE_CONNECTION \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_CREATE_CONNECTION_INDEX, ENDPOINTDRV_CONNECTION_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_MODIFY_CONNECTION \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_MODIFY_CONNECTION_INDEX, ENDPOINTDRV_CONNECTION_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_DELETE_CONNECTION \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_DELETE_CONNECTION_INDEX, ENDPOINTDRV_DELCONNECTION_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_PACKET \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_PACKET_INDEX, ENDPOINTDRV_PACKET_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_GET_PACKET \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_GET_PACKET_INDEX, ENDPOINTDRV_PACKET_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_GET_EVENT \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_GET_EVENT_INDEX, ENDPOINTDRV_EVENT_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_GET_CODECMAP \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_GET_CODECMAP_INDEX, ENDPOINTDRV_CODECMAP_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_VOICESTAT \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_VOICESTAT_INDEX, ENDPOINTDRV_VOICESTAT_PARM) -+ -+#define ENDPOINTIOCTL_ISINITIALIZED \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_ISINITIALIZED_INDEX, ENDPOINTDRV_ISINITIALIZED_PARM) -+ -+#define ENDPOINTIOCTL_ENDPT_CONSOLE_CMD \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_CONSOLE_CMD_INDEX, ENDPOINTDRV_CONSOLE_CMD_PARM) -+ -+#define ENDPOINTIOCTL_TEST \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_TEST_INDEX, ENDPOINTDRV_TESTPARM) -+ -+#define ENDPOINTIOCTL_ENDPOINTCOUNT \ -+ _IOWR(ENDPOINTDRV_MAJOR, ENDPTIO_ENDPOINTCOUNT_INDEX, ENDPOINTDRV_ENDPOINTCOUNT_PARM) -+ -+#define MAX_ENDPOINTDRV_IOCTL_COMMANDS ENDPTIO_MAX_INDEX -+ -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ VRG_COUNTRY country; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_INIT_PARAM, *PENDPOINTDRV_INIT_PARAM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ UINT32 physId; -+ UINT32 lineId; -+ VRG_ENDPT_STATE* endptState; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_CREATE_PARM, *PENDPOINTDRV_CREATE_PARM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ EPZCAP* capabilities; -+ ENDPT_STATE* state; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_CAP_PARM, *PENDPOINTDRV_CAP_PARM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ ENDPT_STATE* state; -+ UINT32 cnxId; -+ EPSIG signal; -+ UINT32 value; // Reserve an array, can be a pointer -+ EPSTATUS epStatus; -+ int duration; -+ int period; -+ int repetition; -+} ENDPOINTDRV_SIGNAL_PARM, *PENDPOINTDRV_SIGNAL_PARM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ ENDPT_STATE* state; -+ int cnxId; -+ EPZCNXPARAM* cnxParam; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_CONNECTION_PARM, *PENDPOINTDRV_CONNECTION_PARM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ ENDPT_STATE* state; -+ int cnxId; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_DELCONNECTION_PARM, *PENDPOINTDRV_DELCONNECTION_PARM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ ENDPT_STATE* state; -+ int cnxId; -+ EPPACKET* epPacket; -+ int length; -+ UINT32 bufDesc; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_PACKET_PARM, *PENDPOINTDRV_PACKET_PARM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ int lineId; -+ int cnxId; -+ int length; -+ EPEVT event; -+ UINT8 eventData[MAX_EVENTDATA_SIZE]; -+} ENDPOINTDRV_EVENT_PARM, *PENDPOINTDRV_EVENT_PARM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ int isInitialized; -+} ENDPOINTDRV_ISINITIALIZED_PARM, *PENDPOINTDRV_ISINITIALIZED_PARM; -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ UINT32 testParm1; -+ UINT32 testParm2; -+ EPZCNXPARAM* testParm3; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_TESTPARM, *PENDPOINTDRV_TESTPARM; -+ -+typedef struct ENDPOINTDRV_PACKET -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ int cnxId; -+ int length; -+ EPMEDIATYPE mediaType; -+ UINT8 data[1024]; -+} ENDPOINTDRV_PACKET; -+ -+typedef struct ENDPOINTDRV_VOICESTAT_PARM -+{ -+ int lineId; -+ ENDPT_VOICE_STATS* stats; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_VOICESTAT_PARM, *PENDPOINTDRV_VOICESTAT_PARM; -+ -+typedef struct ENDPOINTDRV_CONSOLE_CMD_PARM -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ int lineId; -+ int cnxId; -+ int cmd; -+ ENDPT_STATE* state; -+ EPSTATUS epStatus; -+} ENDPOINTDRV_CONSOLE_CMD_PARM, *PENDPOINTDRV_CONSOLE_CMD_PARM; -+ -+ -+typedef struct -+{ -+ UINT32 size; /* Size of the structure (including the size field) */ -+ int endpointNum; -+} ENDPOINTDRV_ENDPOINTCOUNT_PARM, *PENDPOINTDRV_ENDPOINTCOUNT_PARM; -+ -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif // _ENDPOINTDRV_H_ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,106 @@ -+/*************************************************************************** -+ * Broadcom Corp. Confidential -+ * Copyright 2001 Broadcom Corp. All Rights Reserved. -+ * -+ * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED -+ * SOFTWARE LICENSE AGREEMENT BETWEEN THE USER AND BROADCOM. -+ * YOU HAVE NO RIGHT TO USE OR EXPLOIT THIS MATERIAL EXCEPT -+ * SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. -+ * -+ *************************************************************************** -+ * File Name : endptvoicestats.h -+ * -+ * Description: This file contains the definitions of the voice statistics -+ * structures. This file should be used in user space when -+ * working with the voice statistics structure. -+ * -+ * The files hpnet.h and hppve.h -+ * should not be included in user space because of a conflict -+ * in the definitions supplied by hausenv.h (in the endpoint/vocm/ -+ * ldxIntf/dspinc directory) and the definitions supplied by bcmtypes.h -+ * (in the /sgibcm_2_4_17/linux/include/asm-mips/bcm96345 directory). -+ * -+ * Updates : -+ ***************************************************************************/ -+ -+#if !defined(ENDPTSTATS_H) -+#define ENDPTSTATS_H -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+typedef struct -+{ -+#ifdef ENDPT_6345 -+ UINT16 peakHoldingTime; /* Peak Holding Time since last statistic */ -+ -+ /* Total number of superpackets arriving on the egress path */ -+ UINT16 packetCount; /* # of packets received */ -+ -+ /* addTail and reorder are successful additions to the JB */ -+ /* addTail is typically 1..N times the packetCount if superpackets are enabled */ -+ UINT16 addTailCount; /* # of frames added to tail of JB - normal case */ -+ UINT16 reorderCount; /* # of frames reordered */ -+ -+ /* overrun, duplicate, outOfRange, tooLate, jitterMax excess are packets that have been discarded */ -+ UINT16 overrunCount; /* Decoder overrun count */ -+ UINT16 duplicateCount; /* # of duplicate frames deleted */ -+ UINT16 outOfRangeCount; /* # of frames with timestamps too far from current TS to be handled */ -+ UINT16 tooLateCount; /* Packet arrived too late (it's redundant mate already played) */ -+ -+ /* cantDecode are packets that can't be played out due to algorithm not available */ -+ UINT16 cantDecodeCount; /* Can't decode packet - decoder not in load or pkt hdr bad */ -+ -+ /* The following are internal to the AJC module - they do not represent physical packets */ -+ UINT16 ajcUnderrunCount; /* Adaptive Jitter Control: jitter buffer underruns */ -+ UINT16 ajcDeleteCount; /* Adaptive Jitter Control: # of packet deletes done to reduce holding time */ -+ UINT16 ajcRepeatCount; /* Adaptive Jitter Control: # of packet repeats done to either increase holding time -+ or due to late frame or lost frames. */ -+ UINT16 ajcResyncCount; /* Number of times ajb resynced (went through buildout state) */ -+ UINT16 ajcPhaseJitterCount; /* Number of times ajb inserted a phase discontinuity -+ (possibly in silence or during CNG or due to a repeat/delete). */ -+ /* 14 entries. Make sure this is even (!) */ -+#else -+ UINT16 peakHoldingTime; /* Peak Holding Time since last statistic */ -+ UINT16 minimumHoldingTime; /* Long-term tracker of min. Hold Time */ -+ UINT16 targetHoldingTime; /* Target holding Time */ -+ UINT16 inactiveFrameCount; /* Inactive Frame Count */ -+ UINT16 activeFrameCount; /* Active Frame Count */ -+ UINT16 hsxDecoderOverrunCount; /* Decoder overrun count */ -+ UINT16 hsxDecoderUnderrunCount; /* Decoder underrun count */ -+ UINT16 lostFrameCount; /* Lost frames resulting in frame repeat */ -+#endif -+} ENDPT_VOICE_DECODERSTATS; -+ -+/* Encoder Statistics */ -+typedef struct -+{ -+#ifdef ENDPT_6345 -+ UINT16 inactiveFrameCount; /* Inactive Frame Count of Suppressed Frames*/ -+ UINT16 activeFrameCount; /* Active Frame Count - actually sent ingress */ -+ UINT16 sidFrameCount; /* SID Frame Count */ -+ UINT16 toneRelayCount; /* # of tone packets from PTE relayed ingress */ -+#else -+ UINT16 hsxEncoderOverrunCount; /* Encoder overrun count */ -+#endif -+} ENDPT_VOICE_ENCODERSTATS; -+ -+ -+typedef struct -+{ -+ ENDPT_VOICE_DECODERSTATS decoder; -+ ENDPT_VOICE_ENCODERSTATS encoder; -+} ENDPT_VOICE_PVE_STATS; -+ -+typedef struct -+{ -+ ENDPT_VOICE_PVE_STATS hsxPVEstats; /* statistics for PVE encoder and decoder */ -+ -+} ENDPT_VOICE_STATS; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif /* ENDPTSTATS_H */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/log.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/log.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/log.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/log.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,104 @@ -+/*************************************************************************** -+* Copyright 2000 Broadcom Corporation -+* All Rights Reserved -+* No portions of this material may be reproduced in any form without the -+* written permission of: -+* Broadcom Corporation -+* 16251 Laguna Canyon Road -+* Irvine, California 92618 -+* All information contained in this document is Broadcom Corporation -+* company private, proprietary, and trade secret. -+* -+**************************************************************************** -+* -+* Filename: log.h -+* Creation Date: 4 July 2000 (v0.00) -+* VSS Info: -+* $Revision: 23 $ -+* $Date: 9/14/01 4:54p $ -+* -+**************************************************************************** -+* Description: -+* -+* This header file contains the needed macros and function prototypes -+* for logging on the terminal. -+* -+****************************************************************************/ -+ -+#ifndef LOG_H -+#define LOG_H -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+#define LOG_DBG -+ -+#if (! (defined(__KERNEL__) || defined (LINUX)) ) -+ -+extern void Log( char const *format,...); -+extern void LogMsg( char *string ); -+extern void LogDirectSerial( char const *format,...); -+ -+#define PANIC(m) Log(m) -+#define LOG(fmt) Log fmt -+#define LOGERROR(fmt) Log fmt -+#define LOG1(fmt) Log fmt /* Level 1 logging */ -+#define LOG2(fmt) /* Level 2 logging */ -+#define LOGMSG(buf) LogMsg buf -+ -+/*********************************** -+** Error logging * -+***********************************/ -+#elif defined(__KERNEL__) -+ -+#define LOG(fmt) printk fmt ; printk("\n"); -+#define LOG_RAW(fmt) printk fmt ; printk("\n"); -+#define PANIC(fmt) printk("!!! PANIC !!! \n"); printk fmt ; printk("\n"); -+#define LOGERROR(fmt) printk("!!! ERROR !!! \n"); printk fmt ; printk("\n"); -+ -+#elif defined(LINUX) -+ -+#include <stdio.h> -+ -+#ifdef LOG_DBG -+ -+#include <time.h> -+ -+#define LOG(fmt) \ -+{ \ -+ struct tm *tm_ptr; \ -+ time_t curtime; \ -+ time( &curtime ); \ -+ tm_ptr = gmtime( &curtime ); \ -+ printf("%02d:%02d:%02d ", \ -+ tm_ptr->tm_hour, \ -+ tm_ptr->tm_min, \ -+ tm_ptr->tm_sec); \ -+ printf fmt; \ -+ printf("\n"); \ -+} -+#else -+#define LOG(fmt) printf fmt ; printf("\n"); -+#endif /* LOG_DBG */ -+ -+#define PANIC(fmt) printk("!!! PANIC !!! \n"); printk fmt ; printk("\n"); -+#define LOGERROR(fmt) \ -+{ \ -+ printf("ERROR !!! File %s (line %u): ", __FILE__, __LINE__);\ -+ printf fmt; \ -+ printf("\n"); \ -+} -+ -+#else -+#error Unknown OS -+#endif -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#endif /* LOG_H */ -+ -+ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/mtacfg.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/mtacfg.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/mtacfg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/mtacfg.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,72 @@ -+/*************************************************************************** -+* Copyright 2000 Broadcom Corporation -+* All Rights Reserved -+* No portions of this material may be reproduced in any form without the -+* written permission of: -+* Broadcom Corporation -+* 16251 Laguna Canyon Road -+* Irvine, California 92618 -+* All information contained in this document is Broadcom Corporation -+* company private, proprietary, and trade secret. -+* -+**************************************************************************** -+* -+* Filename: mtacfg.h -+* Creation Date: 4 July 2000 (v0.00) -+* VSS Info: -+* $Revision: 23 $ -+* $Date: 9/14/01 4:54p $ -+* -+**************************************************************************** -+* Description: -+* -+* This header file contains all the different build options that -+* are required by CablexChange components. -+* -+****************************************************************************/ -+ -+#ifndef _MTACFG_H -+#define _MTACFG_H -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+#include <cfg/endptCfg.h> -+#include <cfg/vocmCfg.h> -+#include <cfg/casCfg.h> -+ -+#define MTA_VERSION_INFO "1.0" -+ -+#if ( defined(IP_MGCP) || defined(IP_H323) || defined(IP_SIP) || defined(IP_MEGACO) ) -+#define VOIP -+#endif -+ -+#ifndef VOIP -+#define ENDPOINT_NULL_SHIM -+#endif -+ -+ -+/*************************************************************** -+** Task Priority options -+****************************************************************/ -+ -+#define RTP_TASK_PRIORITY BCMOS_TASK_PRTY_8 /* task priority for rtp */ -+#define HGCP_TASK_PRIORITY BCMOS_TASK_PRTY_8 /* task priority for HGCP */ -+#define RTCP_TASK_PRIORITY BCMOS_TASK_PRTY_13 /* task priority for rtcp */ -+ -+ -+/* Additional DSL specific definitions not provided by Cable Cfg files */ -+ -+/* For backward compatibility with older code */ -+#define MAX_ENDPT VOCM_CFG_MAX_ENDPT -+#define MAX_CNX VOCM_CFG_MAX_CNX -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#endif /* MTACFG_H */ -+ -+ -+ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/profdrv.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/profdrv.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/profdrv.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/profdrv.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,151 @@ -+/*************************************************************************** -+* Copyright 2004 Broadcom Corporation -+* All Rights Reserved -+* No portions of this material may be reproduced in any form without the -+* written permission of: -+* Broadcom Corporation -+* 16215 Alton Parkway -+* P.O. Box 57013 -+* Irvine, California 92619-7013 -+* All information contained in this document is Broadcom Corporation -+* company private, proprietary, and trade secret. -+* -+**************************************************************************** -+* -+* Filename: profdrv.h -+* -+**************************************************************************** -+* Description: -+* -+* This file contains the profiler device driver -+* -+****************************************************************************/ -+#ifndef PROFDRV_DEVICE_DRIVER__H__INCLUDED -+#define PROFDRV_DEVICE_DRIVER__H__INCLUDED -+ -+#include <linux/ioctl.h> -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+#define PROFILER_NAME_MAX_LENGTH 32 -+#define PROFILER_MAX_RECSEQ 2048 -+ -+#define PROFILER_CPU_UTIL_VALID_START 0x01 -+#define PROFILER_CPU_UTIL_VALID_STOP 0x02 -+ -+#define PROFILER_SOURCE_USER 0x00 -+#define PROFILER_SOURCE_KERNEL 0x01 -+ -+#ifndef __STR -+#define __STR(x) #x -+#endif -+#ifndef STR -+#define STR(x) __STR(x) -+#endif -+ -+#define profdrv_read_32bit_cp0_register(source) \ -+({ int __res; \ -+ __asm__ __volatile__( \ -+ ".set\tpush\n\t" \ -+ ".set\treorder\n\t" \ -+ "mfc0\t%0,"STR(source)"\n\t" \ -+ ".set\tpop" \ -+ : "=r" (__res)); \ -+ __res;}) -+ -+/* -+ Structure used to pass profiling information data at the user/kernel interface. -+*/ -+typedef struct -+{ -+ char name[PROFILER_NAME_MAX_LENGTH]; -+ -+} PROFILER_IOCTL_DATA; -+ -+/* -+ This structure is used to keep track of the CPU utilization during the profiling period. -+*/ -+typedef struct -+{ -+ unsigned tick_uptime_start; -+ unsigned tick_idle_start; -+ unsigned tick_user_start; -+ unsigned tick_kernel_start; -+ unsigned tick_uptime_stop; -+ unsigned tick_idle_stop; -+ unsigned tick_user_stop; -+ unsigned tick_kernel_stop; -+ unsigned char valid_data; -+ -+} PROFILER_CPU_UTILIZATION; -+ -+/* -+ A generic structure to pass information about the profiler status. -+*/ -+typedef struct -+{ -+ unsigned status; -+ unsigned cpu_jiffies_start; -+ unsigned cpu_jiffies_stop; -+ unsigned cpu_jiffies_factor; -+ unsigned cpu_clock; -+ -+} PROFILER_STATUS; -+ -+/* -+ The ioctl action index. -+*/ -+typedef enum -+{ -+ PROFILER_IOCTL_GET_DATA_DUMP_INDEX, -+ PROFILER_IOCTL_GET_RECSEQ_DATA_DUMP_INDEX, -+ PROFILER_IOCTL_SET_DATA_CLEAN_INDEX, -+ PROFILER_IOCTL_SET_PROF_OPS_INDEX, -+ PROFILER_IOCTL_REGISTER_CALL_INDEX, -+ PROFILER_IOCTL_DEREGISTER_CALL_INDEX, -+ PROFILER_IOCTL_START_CALL_INDEX, -+ PROFILER_IOCTL_STOP_CALL_INDEX, -+ PROFILER_IOCTL_PROFILER_STATUS_INDEX, -+ PROFILER_IOCTL_SET_CPU_UTIL_INDEX, -+ PROFILER_IOCTL_GET_CPU_UTIL_INDEX, -+ PROFILER_IOCTL_GET_RECSEQ_DI_INDEX -+ -+} PROFILER_IOCTL_INDEX; -+ -+/* -+ Assigning a device driver major number for the sake of making this application work -+*/ -+#define PROFDRV_DEVICE_DRIVER_MAJOR 224 -+ -+#define PROFILER_IOCTL_GET_DATA_DUMP \ -+ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_GET_DATA_DUMP_INDEX, unsigned ) -+#define PROFILER_IOCTL_GET_RECSEQ_DATA_DUMP \ -+ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_GET_RECSEQ_DATA_DUMP_INDEX, unsigned ) -+#define PROFILER_IOCTL_SET_DATA_CLEAN \ -+ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_SET_DATA_CLEAN_INDEX, unsigned ) -+#define PROFILER_IOCTL_SET_PROF_OPS \ -+ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_SET_PROF_OPS_INDEX, unsigned ) -+#define PROFILER_IOCTL_REGISTER_CALL \ -+ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_REGISTER_CALL_INDEX, PROFILER_IOCTL_DATA ) -+#define PROFILER_IOCTL_DEREGISTER_CALL \ -+ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_DEREGISTER_CALL_INDEX, PROFILER_IOCTL_DATA ) -+#define PROFILER_IOCTL_START_CALL \ -+ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_START_CALL_INDEX, PROFILER_IOCTL_DATA ) -+#define PROFILER_IOCTL_STOP_CALL \ -+ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_STOP_CALL_INDEX, PROFILER_IOCTL_DATA ) -+#define PROFILER_IOCTL_PROFILER_STATUS_DATA \ -+ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_PROFILER_STATUS_INDEX, PROFILER_STATUS ) -+#define PROFILER_IOCTL_SET_CPU_UTIL \ -+ _IOW( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_SET_CPU_UTIL_INDEX, PROFILER_CPU_UTILIZATION ) -+#define PROFILER_IOCTL_GET_CPU_UTIL \ -+ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_GET_CPU_UTIL_INDEX, PROFILER_CPU_UTILIZATION ) -+#define PROFILER_IOCTL_GET_RECSEQ_DATA_INDEX \ -+ _IOR( PROFDRV_DEVICE_DRIVER_MAJOR, PROFILER_IOCTL_GET_RECSEQ_DI_INDEX, unsigned ) -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* PROFDRV_DEVICE_DRIVER__H__INCLUDED */ -diff -urN linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/profiler.h linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/profiler.h ---- linux-2.6.8.1/bcmdrivers/broadcom/include/bcm963xx/profiler.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/broadcom/include/bcm963xx/profiler.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,114 @@ -+/*************************************************************************** -+* Copyright 2004 Broadcom Corporation -+* All Rights Reserved -+* No portions of this material may be reproduced in any form without the -+* written permission of: -+* Broadcom Corporation -+* 16215 Alton Parkway -+* P.O. Box 57013 -+* Irvine, California 92619-7013 -+* All information contained in this document is Broadcom Corporation -+* company private, proprietary, and trade secret. -+* -+**************************************************************************** -+* -+* Filename: profiler.h -+* -+**************************************************************************** -+* Description: -+* -+* This file contains the API definition for usage of the profiler tool -+* -+****************************************************************************/ -+#ifndef PROFILER__H__INCLUDED -+#define PROFILER__H__INCLUDED -+ -+#include "profdrv.h" -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+#define PROFILER_MAX_MONITORED_PROFILE 32 -+#define PROFILER_CPU_UTILIZATION_MIN 0.000001 -+#define PROFILER_MISC_STRING_LENGTH 256 -+#define PROFILER_CPU_TICK_FACTOR 2.0 -+#define PROFILER_S2MS_FACTOR 1000.0 -+ -+#define PROFILER_FLAG_RESOURCE_FREE 0x00 -+#define PROFILER_FLAG_RESOURCE_ALLOCATED 0x01 -+#define PROFILER_FLAG_RESOURCE_ERROR 0x02 -+#define PROFILER_FLAG_RESOURCE_COLLECT_PENDING 0x04 -+ -+/* -+ This structure defines the data collected by the profiler. -+*/ -+typedef struct -+{ -+ unsigned char source; /* User or Kernel */ -+ unsigned char flag; /* Generic flag */ -+ char name[PROFILER_NAME_MAX_LENGTH]; /* Name of the function monitored */ -+ unsigned int now_cycle; /* The current cycle count saved */ -+ unsigned int min_cycle; /* The minimum number of cycles calculated for this function */ -+ unsigned int max_cycle; /* The maximum number of cycles calculated for this function */ -+ unsigned int avg_cycle; /* The average numnber of cycles calculated for this function */ -+ unsigned int count; /* The number of time this function has been profiled */ -+ -+} PROFILER_COLLECTED_DATA; -+ -+ -+/* -+ This structure defines the recorded sequence data collected by the profiler. -+*/ -+typedef struct PROFILER_RECSEQ_DATA -+{ -+ unsigned int id; -+ unsigned long startTime; -+ unsigned long endTime; -+} PROFILER_RECSEQ_DATA; -+ -+ -+void kernel_profiler_register( char *pName, unsigned char src ); -+void kernel_profiler_deregister( char *pName, unsigned char src ); -+void kernel_profiler_start( char *pName, unsigned char src ); -+void kernel_profiler_stop( char *pName, unsigned char src ); -+void kernel_profiler_recseq_start( unsigned int id ); -+void kernel_profiler_recseq_stop( unsigned int id ); -+ -+void kernel_profiler_reinit_collected( void ); -+void kernel_profiler_dump( void ); -+void kernel_profiler_recseq_dump( void ); -+void kernel_profiler_start_collect( void ); -+void kernel_profiler_stop_collect( void ); -+ -+ -+void profiler_init( void ); -+void profiler_get_status( PROFILER_STATUS *pStatus ); -+PROFILER_COLLECTED_DATA *profiler_get_data_dump( void ); -+PROFILER_RECSEQ_DATA* profiler_get_recseq_data_dump( void ); -+void profiler_get_cpu_util( PROFILER_CPU_UTILIZATION *pData ); -+void profiler_set_cpu_util( PROFILER_CPU_UTILIZATION *pData ); -+unsigned int profiler_get_recseq_data_index( void ); -+ -+/* -+ This is the generic API that should be used by clients to access the profiler -+*/ -+#define PROFILER_REGISTER( name ) ( kernel_profiler_register( (name), PROFILER_SOURCE_KERNEL ) ) -+#define PROFILER_DEREGISTER( name ) ( kernel_profiler_deregister( (name), PROFILER_SOURCE_KERNEL ) ) -+#define PROFILER_START( name ) ( kernel_profiler_start( (name), PROFILER_SOURCE_KERNEL ) ) -+#define PROFILER_STOP( name ) ( kernel_profiler_stop( (name), PROFILER_SOURCE_KERNEL ) ) -+#define PROFILER_RECSEQ_START( source ) ( kernel_profiler_recseq_start( (source) ) ) -+#define PROFILER_RECSEQ_STOP( source ) ( kernel_profiler_recseq_stop( (source)) ) -+ -+#define PROFILER_REINIT_COLLECTED() ( kernel_profiler_reinit_collected() ) -+#define PROFILER_DUMP() ( kernel_profiler_dump() ) -+#define PROFILER_RECSEQ_DUMP() ( kernel_profiler_recseq_dump() ) -+#define PROFILER_START_COLLECT() ( kernel_profiler_start_collect() ) -+#define PROFILER_STOP_COLLECT() ( kernel_profiler_stop_collect() ) -+ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* PROFILER__H__INCLUDED */ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/Makefile ---- linux-2.6.8.1/bcmdrivers/opensource/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/Makefile 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,26 @@ -+# File: modules/drivers/Makefile -+# -+# Makefile for the GPLed Linux kernel modules. -+# -+BRCM_BOARD:=bcm963xx -+BRCM_CHIP:=6348 -+LN_NAME=bcm9$(BRCM_CHIP) -+LN_DRIVER_DIRS = -+ -+-include $(KERNEL_DIR)/.config -+ -+ifneq ($(CONFIG_BCM_BOARD),) -+ LN_DRIVER_DIRS +=ln -sn impl$(CONFIG_BCM_BOARD_IMPL) char/board/$(BRCM_BOARD)/$(LN_NAME); -+endif -+ -+ifneq ($(CONFIG_BCM_SERIAL),) -+ LN_DRIVER_DIRS +=ln -sn impl$(CONFIG_BCM_SERIAL_IMPL) char/serial/$(LN_NAME); -+endif -+ -+obj-$(CONFIG_BCM_BOARD) += char/board/$(BRCM_BOARD)/$(LN_NAME)/ -+obj-$(CONFIG_BCM_SERIAL) += char/serial/$(LN_NAME)/ -+ -+ -+symlinks: -+ find . -lname "*" -name "$(LN_NAME)" -print -exec rm -f "{}" ";" -+ $(CONFIG_SHELL) -c "$(LN_DRIVER_DIRS)" -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/Makefile ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/Makefile 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,17 @@ -+# Makefile for the bcm963xx board drivers -+# -+ -+ -+obj-y := board.o cfiflash.o bcm63xx_flash.o bcm63xx_led.o -+ -+EXTRA_CFLAGS += -I. -I$(INC_BRCMBOARDPARMS_PATH)/$(BRCM_BOARD) -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+ -+ifeq ($(strip $(WIRELESS)),1) -+ EXTRA_CFLAGS += -DWIRELESS -+endif -+ -+-include $(TOPDIR)/Rules.make -+ -+clean: -+ rm -f core *.o *.a *.s -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_flash.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_flash.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_flash.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,775 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ *************************************************************************** -+ * File Name : bcm63xx_flash.c -+ * -+ * Description: This file contains the flash device driver APIs for bcm63xx board. -+ * -+ * Created on : 8/10/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) -+ * -+ ***************************************************************************/ -+ -+ -+/* Includes. */ -+#include <linux/fs.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <asm/uaccess.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#define BCMTAG_EXE_USE -+#include <bcmTag.h> -+#include "cfiflash.h" -+#include "boardparms.h" -+ -+//#define DEBUG_FLASH -+ -+static FLASH_ADDR_INFO fInfo; -+static int flashInitialized = 0; -+ -+void *retriedKmalloc(size_t size) -+{ -+ void *pBuf; -+ int tryCount = 0; -+ -+ // try 1000 times before quit -+ while (((pBuf = kmalloc(size, GFP_KERNEL)) == NULL) && (tryCount++ < 1000)) -+ { -+ current->state = TASK_INTERRUPTIBLE; -+ schedule_timeout(HZ/10); -+ } -+ if (tryCount >= 1000) -+ pBuf = NULL; -+ else -+ memset(pBuf, 0, size); -+ -+ return pBuf; -+} -+ -+void retriedKfree(void *pBuf) -+{ -+ kfree(pBuf); -+} -+ -+/*************************************************************************** -+// Function Name: getCrc32 -+// Description : caculate the CRC 32 of the given data. -+// Parameters : pdata - array of data. -+// size - number of input data bytes. -+// crc - either CRC32_INIT_VALUE or previous return value. -+// Returns : crc. -+****************************************************************************/ -+UINT32 getCrc32(byte *pdata, UINT32 size, UINT32 crc) -+{ -+ while (size-- > 0) -+ crc = (crc >> 8) ^ Crc32_table[(crc ^ *pdata++) & 0xff]; -+ -+ return crc; -+} -+ -+// get the nvram start addr -+// -+unsigned long get_nvram_start_addr(void) -+{ -+ return ((unsigned long) -+ (flash_get_memptr(fInfo.flash_nvram_start_blk) + fInfo.flash_nvram_blk_offset)); -+} -+ -+// get the scratch_pad start addr -+// -+unsigned long get_scratch_pad_start_addr(void) -+{ -+ return ((unsigned long) -+ (flash_get_memptr(fInfo.flash_scratch_pad_start_blk) + fInfo.flash_scratch_pad_blk_offset)); -+} -+ -+ -+ -+/* ********************************************************************* -+ * kerSysImageTagGet() -+ * Get the image tag -+ * Input parameters: -+ * none -+ * Return value: -+ * point to tag -- Found -+ * NULL -- failed -+ ********************************************************************* */ -+PFILE_TAG kerSysImageTagGet(void) -+{ -+ int i; -+ int totalBlks = flash_get_numsectors(); -+ UINT32 crc; -+ unsigned char *sectAddr; -+ PFILE_TAG pTag; -+ -+#if defined(DEBUG_FLASH) -+ printk("totalblks in tagGet=%d\n", totalBlks); -+#endif -+ -+ // start from 2nd blk, assume 1st one is always CFE -+ for (i = 1; i < totalBlks; i++) -+ { -+ sectAddr = flash_get_memptr((byte) i); -+ crc = CRC32_INIT_VALUE; -+ crc = getCrc32(sectAddr, (UINT32)TAG_LEN-TOKEN_LEN, crc); -+ pTag = (PFILE_TAG) sectAddr; -+ -+#if defined(DEBUG_FLASH) -+ printk("Check Tag crc on blk [%d]\n", i); -+#endif -+ -+ if (crc == (UINT32)(*(UINT32*)(pTag->tagValidationToken))) -+ return pTag; -+ } -+ -+ return (PFILE_TAG) NULL; -+} -+ -+// Initialize the flash and fill out the fInfo structure -+void kerSysFlashInit( void ) -+{ -+ int i = 0; -+ int totalBlks = 0; -+ int totalSize = 0; -+ int startAddr = 0; -+ int usedBlkSize = 0; -+ NVRAM_DATA nvramData; -+ UINT32 crc = CRC32_INIT_VALUE, savedCrc; -+ PFILE_TAG pTag = NULL; -+ unsigned long kernelEndAddr = 0; -+ unsigned long spAddr = 0; -+ -+ if (flashInitialized) -+ return; -+ -+ flashInitialized = 1; -+ flash_init(); -+ -+ totalBlks = flash_get_numsectors(); -+ totalSize = flash_get_total_size(); -+ -+ printk("Total Flash size: %dK with %d sectors\n", totalSize/1024, totalBlks); -+ -+ /* nvram is always at the end of flash */ -+ fInfo.flash_nvram_length = FLASH45_LENGTH_NVRAM; -+ fInfo.flash_nvram_start_blk = 0; /* always the first block */ -+ fInfo.flash_nvram_number_blk = 1; /*always fits in the first block */ -+ fInfo.flash_nvram_blk_offset = NVRAM_DATA_OFFSET; -+ -+ // check nvram CRC -+ memcpy((char *)&nvramData, (char *)get_nvram_start_addr(), sizeof(NVRAM_DATA)); -+ savedCrc = nvramData.ulCheckSum; -+ nvramData.ulCheckSum = 0; -+ crc = getCrc32((char *)&nvramData, (UINT32) sizeof(NVRAM_DATA), crc); -+ -+ BpSetBoardId( nvramData.szBoardId ); -+ -+ fInfo.flash_persistent_length = NVRAM_PSI_DEFAULT; -+ if (savedCrc != crc) -+ { -+ printk("***Board is not initialized****: Using the default PSI size: %d\n", -+ fInfo.flash_persistent_length); -+ } -+ else -+ { -+ unsigned long ulPsiSize; -+ if( BpGetPsiSize( &ulPsiSize ) == BP_SUCCESS ) -+ fInfo.flash_persistent_length = ulPsiSize; -+ else -+ { -+ printk("***Board id is not set****: Using the default PSI size: %d\n", -+ fInfo.flash_persistent_length); -+ } -+ } -+ -+ fInfo.flash_persistent_length *= ONEK; -+ startAddr = totalSize - fInfo.flash_persistent_length; -+ fInfo.flash_persistent_start_blk = flash_get_blk(startAddr+FLASH_BASE_ADDR_REG); -+ fInfo.flash_persistent_number_blk = totalBlks - fInfo.flash_persistent_start_blk; -+ // save abs SP address (Scratch Pad). it is before PSI -+ spAddr = startAddr - SP_MAX_LEN ; -+ // find out the offset in the start_blk -+ usedBlkSize = 0; -+ for (i = fInfo.flash_persistent_start_blk; -+ i < (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk); i++) -+ { -+ usedBlkSize += flash_get_sector_size((byte) i); -+ } -+ fInfo.flash_persistent_blk_offset = usedBlkSize - fInfo.flash_persistent_length; -+ -+ // get the info for sp -+ if (!(pTag = kerSysImageTagGet())) -+ { -+ printk("Failed to read image tag from flash\n"); -+ return; -+ } -+ kernelEndAddr = (unsigned long) simple_strtoul(pTag->kernelAddress, NULL, 10) + \ -+ (unsigned long) simple_strtoul(pTag->kernelLen, NULL, 10); -+ -+ // make suer sp does not share kernel block -+ fInfo.flash_scratch_pad_start_blk = flash_get_blk(spAddr+FLASH_BASE_ADDR_REG); -+ if (fInfo.flash_scratch_pad_start_blk != flash_get_blk(kernelEndAddr)) -+ { -+ fInfo.flash_scratch_pad_length = SP_MAX_LEN; -+ if (fInfo.flash_persistent_start_blk == fInfo.flash_scratch_pad_start_blk) // share blk -+ { -+#if 1 /* do not used scratch pad unless it's in its own sector */ -+ printk("Scratch pad is not used for this flash part.\n"); -+ fInfo.flash_scratch_pad_length = 0; // no sp -+#else /* allow scratch pad to share a sector with another section such as PSI */ -+ fInfo.flash_scratch_pad_number_blk = 1; -+ fInfo.flash_scratch_pad_blk_offset = fInfo.flash_persistent_blk_offset - fInfo.flash_scratch_pad_length; -+#endif -+ } -+ else // on different blk -+ { -+ fInfo.flash_scratch_pad_number_blk = fInfo.flash_persistent_start_blk\ -+ - fInfo.flash_scratch_pad_start_blk; -+ // find out the offset in the start_blk -+ usedBlkSize = 0; -+ for (i = fInfo.flash_scratch_pad_start_blk; -+ i < (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk); i++) -+ usedBlkSize += flash_get_sector_size((byte) i); -+ fInfo.flash_scratch_pad_blk_offset = usedBlkSize - fInfo.flash_scratch_pad_length; -+ } -+ } -+ else -+ { -+ printk("No flash for scratch pad!\n"); -+ fInfo.flash_scratch_pad_length = 0; // no sp -+ } -+ -+#if defined(DEBUG_FLASH) -+ printk("fInfo.flash_scratch_pad_start_blk = %d\n", fInfo.flash_scratch_pad_start_blk); -+ printk("fInfo.flash_scratch_pad_number_blk = %d\n", fInfo.flash_scratch_pad_number_blk); -+ printk("fInfo.flash_scratch_pad_length = 0x%x\n", fInfo.flash_scratch_pad_length); -+ printk("fInfo.flash_scratch_pad_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_scratch_pad_blk_offset); -+ -+ printk("fInfo.flash_nvram_start_blk = %d\n", fInfo.flash_nvram_start_blk); -+ printk("fInfo.flash_nvram_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_nvram_blk_offset); -+ printk("fInfo.flash_nvram_number_blk = %d\n", fInfo.flash_nvram_number_blk); -+ -+ printk("psi startAddr = %x\n", startAddr+FLASH_BASE_ADDR_REG); -+ printk("fInfo.flash_persistent_start_blk = %d\n", fInfo.flash_persistent_start_blk); -+ printk("fInfo.flash_persistent_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_persistent_blk_offset); -+ printk("fInfo.flash_persistent_number_blk = %d\n", fInfo.flash_persistent_number_blk); -+#endif -+ -+} -+ -+ -+ -+/*********************************************************************** -+ * Function Name: kerSysFlashAddrInfoGet -+ * Description : Fills in a structure with information about the NVRAM -+ * and persistent storage sections of flash memory. -+ * Fro physmap.c to mount the fs vol. -+ * Returns : None. -+ ***********************************************************************/ -+void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info) -+{ -+ pflash_addr_info->flash_nvram_blk_offset = fInfo.flash_nvram_blk_offset; -+ pflash_addr_info->flash_nvram_length = fInfo.flash_nvram_length; -+ pflash_addr_info->flash_nvram_number_blk = fInfo.flash_nvram_number_blk; -+ pflash_addr_info->flash_nvram_start_blk = fInfo.flash_nvram_start_blk; -+ pflash_addr_info->flash_persistent_blk_offset = fInfo.flash_persistent_blk_offset; -+ pflash_addr_info->flash_persistent_length = fInfo.flash_persistent_length; -+ pflash_addr_info->flash_persistent_number_blk = fInfo.flash_persistent_number_blk; -+ pflash_addr_info->flash_persistent_start_blk = fInfo.flash_persistent_start_blk; -+} -+ -+ -+// get shared blks into *** pTempBuf *** which has to be released bye the caller! -+// return: if pTempBuf != NULL, poits to the data with the dataSize of the buffer -+// !NULL -- ok -+// NULL -- fail -+static char *getSharedBlks(int start_blk, int end_blk) -+{ -+ int i = 0; -+ int usedBlkSize = 0; -+ int sect_size = 0; -+ char *pTempBuf = NULL; -+ char *pBuf = NULL; -+ -+ for (i = start_blk; i < end_blk; i++) -+ usedBlkSize += flash_get_sector_size((byte) i); -+ -+#if defined(DEBUG_FLASH) -+ printk("usedBlkSize = %d\n", usedBlkSize); -+#endif -+ -+ if ((pTempBuf = (char *) retriedKmalloc(usedBlkSize)) == NULL) -+ { -+ printk("failed to allocate memory with size: %d\n", usedBlkSize); -+ return pTempBuf; -+ } -+ -+ pBuf = pTempBuf; -+ for (i = start_blk; i < end_blk; i++) -+ { -+ sect_size = flash_get_sector_size((byte) i); -+ -+#if defined(DEBUG_FLASH) -+ printk("i = %d, sect_size = %d, end_blk = %d\n", i, sect_size, end_blk); -+#endif -+ flash_read_buf((byte)i, 0, pBuf, sect_size); -+ pBuf += sect_size; -+ } -+ -+ return pTempBuf; -+} -+ -+ -+ -+// Set the pTempBuf to flash from start_blk to end_blk -+// return: -+// 0 -- ok -+// -1 -- fail -+static int setSharedBlks(int start_blk, int end_blk, char *pTempBuf) -+{ -+ int i = 0; -+ int sect_size = 0; -+ int sts = 0; -+ char *pBuf = pTempBuf; -+ -+ for (i = start_blk; i < end_blk; i++) -+ { -+ sect_size = flash_get_sector_size((byte) i); -+ flash_sector_erase_int(i); -+ if (flash_write_buf(i, 0, pBuf, sect_size) != sect_size) -+ { -+ printk("Error writing flash sector %d.", i); -+ sts = -1; -+ break; -+ } -+ pBuf += sect_size; -+ } -+ -+ return sts; -+} -+ -+ -+ -+/******************************************************************************* -+ * NVRAM functions -+ *******************************************************************************/ -+ -+// get nvram data -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysNvRamGet(char *string, int strLen, int offset) -+{ -+ char *pBuf = NULL; -+ -+ if (!flashInitialized) -+ kerSysFlashInit(); -+ -+ if (strLen > FLASH45_LENGTH_NVRAM) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) -+ return -1; -+ -+ // get string off the memory buffer -+ memcpy(string, (pBuf + fInfo.flash_nvram_blk_offset + offset), strLen); -+ -+ retriedKfree(pBuf); -+ -+ return 0; -+} -+ -+ -+// set nvram -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysNvRamSet(char *string, int strLen, int offset) -+{ -+ int sts = 0; -+ char *pBuf = NULL; -+ -+ if (strLen > FLASH45_LENGTH_NVRAM) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) -+ return -1; -+ -+ // set string to the memory buffer -+ memcpy((pBuf + fInfo.flash_nvram_blk_offset + offset), string, strLen); -+ -+ if (setSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_number_blk + fInfo.flash_nvram_start_blk), pBuf) != 0) -+ sts = -1; -+ -+ retriedKfree(pBuf); -+ -+ return sts; -+} -+ -+ -+/*********************************************************************** -+ * Function Name: kerSysEraseNvRam -+ * Description : Erase the NVRAM storage section of flash memory. -+ * Returns : 1 -- ok, 0 -- fail -+ ***********************************************************************/ -+int kerSysEraseNvRam(void) -+{ -+ int sts = 1; -+ char *tempStorage = retriedKmalloc(FLASH45_LENGTH_NVRAM); -+ -+ // just write the whole buf with '0xff' to the flash -+ if (!tempStorage) -+ sts = 0; -+ else -+ { -+ memset(tempStorage, 0xff, FLASH45_LENGTH_NVRAM); -+ if (kerSysNvRamSet(tempStorage, FLASH45_LENGTH_NVRAM, 0) != 0) -+ sts = 0; -+ retriedKfree(tempStorage); -+ } -+ -+ return sts; -+} -+ -+ -+/******************************************************************************* -+ * PSI functions -+ *******************************************************************************/ -+// get psi data -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysPersistentGet(char *string, int strLen, int offset) -+{ -+ char *pBuf = NULL; -+ -+ if (strLen > fInfo.flash_persistent_length) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) -+ return -1; -+ -+ // get string off the memory buffer -+ memcpy(string, (pBuf + fInfo.flash_persistent_blk_offset + offset), strLen); -+ -+ retriedKfree(pBuf); -+ -+ return 0; -+} -+ -+ -+// set psi -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysPersistentSet(char *string, int strLen, int offset) -+{ -+ int sts = 0; -+ char *pBuf = NULL; -+ -+ if (strLen > fInfo.flash_persistent_length) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) -+ return -1; -+ -+ // set string to the memory buffer -+ memcpy((pBuf + fInfo.flash_persistent_blk_offset + offset), string, strLen); -+ -+ if (setSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_number_blk + fInfo.flash_persistent_start_blk), pBuf) != 0) -+ sts = -1; -+ -+ retriedKfree(pBuf); -+ -+ return sts; -+} -+ -+ -+// flash bcm image -+// return: -+// 0 - ok -+// !0 - the sector number fail to be flashed (should not be 0) -+int kerSysBcmImageSet( int flash_start_addr, char *string, int size) -+{ -+ int sts; -+ int sect_size; -+ int blk_start; -+ int i; -+ char *pTempBuf = NULL; -+ int whole_image = 0; -+ -+ blk_start = flash_get_blk(flash_start_addr); -+ if( blk_start < 0 ) -+ return( -1 ); -+ -+ if (flash_start_addr == FLASH_BASE && size > FLASH45_LENGTH_BOOT_ROM) -+ whole_image = 1; -+ -+ /* write image to flash memory */ -+ do -+ { -+ sect_size = flash_get_sector_size(blk_start); -+// NOTE: for memory problem in multiple PVC configuration, temporary get rid of kmalloc this 64K for now. -+// if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) -+// { -+// printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); -+// kerSysMipsSoftReset(); // reset the board right away. -+// } -+ // for whole image, no check on psi -+ if (!whole_image && blk_start == fInfo.flash_persistent_start_blk) // share the blk with psi -+ { -+ if (size > (sect_size - fInfo.flash_persistent_length)) -+ { -+ printk("Image is too big\n"); -+ break; // image is too big. Can not overwrite to nvram -+ } -+ if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) -+ { -+ printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); -+ kerSysMipsSoftReset(); // reset the board right away. -+ } -+ flash_read_buf((byte)blk_start, 0, pTempBuf, sect_size); -+ if (copy_from_user((void *)pTempBuf,(void *)string, size) != 0) -+ break; // failed ? -+ flash_sector_erase_int(blk_start); // erase blk before flash -+ if (flash_write_buf(blk_start, 0, pTempBuf, sect_size) == sect_size) -+ size = 0; // break out and say all is ok -+ retriedKfree(pTempBuf); -+ break; -+ } -+ -+ flash_sector_erase_int(blk_start); // erase blk before flash -+ -+ if (sect_size > size) -+ { -+ if (size & 1) -+ size++; -+ sect_size = size; -+ } -+ -+ if ((i = flash_write_buf(blk_start, 0, string, sect_size)) != sect_size) { -+ break; -+ } -+ blk_start++; -+ string += sect_size; -+ size -= sect_size; -+ } while (size > 0); -+ -+ if (whole_image) -+ { -+ // If flashing a whole image, erase to end of flash. -+ int total_blks = flash_get_numsectors(); -+ while( blk_start < total_blks ) -+ { -+ flash_sector_erase_int(blk_start); -+ blk_start++; -+ } -+ } -+ if (pTempBuf) -+ retriedKfree(pTempBuf); -+ -+ if( size == 0 ) -+ sts = 0; // ok -+ else -+ sts = blk_start; // failed to flash this sector -+ -+ return sts; -+} -+ -+/******************************************************************************* -+ * SP functions -+ *******************************************************************************/ -+// get sp data. NOTE: memcpy work here -- not using copy_from/to_user -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysScratchPadGet(char *tokenId, char *tokBuf, int bufLen) -+{ -+ PSP_HEADER pHead = NULL; -+ PSP_TOKEN pToken = NULL; -+ char *pBuf = NULL; -+ char *pShareBuf = NULL; -+ char *startPtr = NULL; -+ char *endPtr = NULL; -+ char *spEndPtr = NULL; -+ int sts = -1; -+ -+ if (fInfo.flash_scratch_pad_length == 0) -+ return sts; -+ -+ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) -+ { -+ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ -+ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); -+ return sts; -+ } -+ -+ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) -+ return sts; -+ -+ // pBuf points to SP buf -+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; -+ -+ pHead = (PSP_HEADER) pBuf; -+ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) -+ { -+ printk("Scrap pad is not initialized.\n"); -+ return sts; -+ } -+ -+ // search up to SPUsedLen for the token -+ startPtr = pBuf + sizeof(SP_HEADER); -+ endPtr = pBuf + pHead->SPUsedLen; -+ spEndPtr = pBuf + SP_MAX_LEN; -+ while (startPtr < endPtr && startPtr < spEndPtr) -+ { -+ pToken = (PSP_TOKEN) startPtr; -+ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) -+ { -+ memcpy(tokBuf, startPtr + sizeof(SP_TOKEN), bufLen); -+ sts = 0; -+ break; -+ } -+ // get next token -+ startPtr += sizeof(SP_TOKEN) + pToken->tokenLen; -+ } -+ -+ retriedKfree(pShareBuf); -+ -+ return sts; -+} -+ -+ -+// set sp. NOTE: memcpy work here -- not using copy_from/to_user -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysScratchPadSet(char *tokenId, char *tokBuf, int bufLen) -+{ -+ PSP_TOKEN pToken = NULL; -+ PSP_HEADER pHead = NULL; -+ char *pShareBuf = NULL; -+ char *pBuf = NULL; -+ SP_HEADER SPHead; -+ SP_TOKEN SPToken; -+ char *curPtr; -+ int sts = -1; -+ -+ if (fInfo.flash_scratch_pad_length == 0) -+ return sts; -+ -+ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) -+ { -+ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ -+ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); -+ return sts; -+ } -+ -+ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) -+ return sts; -+ -+ // pBuf points to SP buf -+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; -+ pHead = (PSP_HEADER) pBuf; -+ -+ // form header info. SPUsedLen later on... -+ memset((char *)&SPHead, 0, sizeof(SP_HEADER)); -+ memcpy(SPHead.SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN); -+ SPHead.SPVersion = SP_VERSION; -+ -+ // form token info. -+ memset((char*)&SPToken, 0, sizeof(SP_TOKEN)); -+ strncpy(SPToken.tokenName, tokenId, TOKEN_NAME_LEN - 1); -+ SPToken.tokenLen = bufLen; -+ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) -+ { -+ // new sp, so just flash the token -+ printk("No Scrap pad found. Initialize scratch pad...\n"); -+ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; -+ memcpy(pBuf, (char *)&SPHead, sizeof(SP_HEADER)); -+ curPtr = pBuf + sizeof(SP_HEADER); -+ memcpy(curPtr, (char *)&SPToken, sizeof(SP_TOKEN)); -+ curPtr += sizeof(SP_TOKEN); -+ memcpy(curPtr, tokBuf, bufLen); -+ } -+ else -+ { -+ // need search for the token, if exist with same size overwrite it. if sizes differ, -+ // move over the later token data over and put the new one at the end -+ char *endPtr = pBuf + pHead->SPUsedLen; -+ char *spEndPtr = pBuf + SP_MAX_LEN; -+ curPtr = pBuf + sizeof(SP_HEADER); -+ while (curPtr < endPtr && curPtr < spEndPtr) -+ { -+ pToken = (PSP_TOKEN) curPtr; -+ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) -+ { -+ if (pToken->tokenLen == bufLen) // overwirte it -+ { -+ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); -+ break; -+ } -+ else // move later data over and put the new token at the end -+ { -+ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); // ~~~ -+ break; -+ } -+ } -+ else // not same token ~~~ -+ { -+ } -+ // get next token -+ curPtr += sizeof(SP_TOKEN) + pToken->tokenLen; -+ } // end while -+ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; // ~~~ -+ if (SPHead.SPUsedLen > SP_MAX_LEN) -+ { -+ printk("No more Scratch pad space left! Over limit by %d bytes\n", SPHead.SPUsedLen - SP_MAX_LEN); -+ return sts; -+ } -+ -+ } // else if not new sp -+ -+ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf); -+ -+ retriedKfree(pShareBuf); -+ -+ return sts; -+ -+ -+} -+ -+int kerSysFlashSizeGet(void) -+{ -+ return flash_get_total_size(); -+} -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_led.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_led.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/bcm63xx_led.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,582 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/*************************************************************************** -+ * File Name : bcm63xx_led.c -+ * -+ * Description: -+ * -+ * This file contains bcm963xx board led control API functions. -+ * -+ * To use it, do the following -+ * -+ * 1). define in the board.c the following led mappping (this is for 6345GW board): -+ * const LED_MAP_PAIR cLedMapping45GW[] = -+ * { // led name Initial state physical pin (ledMask) -+ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, -+ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, -+ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 -+ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, -+ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, -+ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. -+ * -+ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping -+ * pointer from the above struct -+ * -+ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); -+ * -+ * 3). Sample call for kernel mode: -+ * -+ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h -+ * -+ * 4). Sample call for user mode -+ * -+ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h -+ * -+ * -+ * Created on : 10/28/2002 seanl -+ * -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include <linux/init.h> -+#include <linux/fs.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <linux/netdevice.h> -+#include <asm/uaccess.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+ -+#define k100ms (HZ / 10) // ~100 ms -+#define kFastBlinkCount 0 // ~100ms -+#define kSlowBlinkCount 5 // ~600ms -+ -+#define MAX_VIRT_LEDS 12 -+ -+// uncomment // for debug led -+//#define DEBUG_LED -+ -+// global variables: -+struct timer_list gLedTimer; -+int gTimerOn = FALSE; -+int gLedCount = 0; -+ -+typedef struct ledinfo -+{ -+ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 -+ unsigned short ledActiveLow; // GPIO bit reset to turn on LED -+ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 -+ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED -+ BOARD_LED_STATE ledState; // current led state -+ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState -+ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. -+} LED_INFO, *PLED_INFO; -+ -+static PLED_INFO gLed = NULL; -+static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; -+static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; -+static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; -+ -+#if 0 /* BROKEN */ -+#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+static int gLedOffInBridgeMode = 1; -+#elif defined(CONFIG_BCM96345) -+static int gLedOffInBridgeMode = 0; -+#endif -+#endif -+ -+void ledTimerExpire(void); -+int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); -+ -+//************************************************************************************** -+// LED operations -+//************************************************************************************** -+ -+// turn led on and set the ledState -+void ledOn(PLED_INFO pLed) -+{ -+ if( pLed->ledMask ) -+ { -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLow ) -+ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led -+ else -+ GPIO->GPIOio |= pLed->ledMask; // turn on the led -+ pLed->ledState = pLed->savedLedState = kLedStateOn; -+ } -+} -+ -+ -+// turn led off and set the ledState -+void ledOff(PLED_INFO pLed) -+{ -+ if( pLed->ledMask ) -+ { -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLow ) -+ GPIO->GPIOio |= pLed->ledMask; // turn off the led -+ else -+ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led -+ pLed->ledState = pLed->savedLedState = kLedStateOff; -+ } -+} -+ -+// turn led on and set the ledState -+void ledOnFail(PLED_INFO pLed) -+{ -+ if( pLed->ledMaskFail ) -+ { -+ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLowFail ) -+ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led -+ else -+ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led -+ pLed->ledState = pLed->savedLedState = kLedStateFail; -+ } -+} -+ -+ -+// turn led off and set the ledState -+void ledOffFail(PLED_INFO pLed) -+{ -+ if( pLed->ledMaskFail ) -+ { -+ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLowFail ) -+ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led -+ else -+ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led -+ pLed->ledState = pLed->savedLedState = kLedStateOff; -+ } -+} -+ -+ -+// toggle the led and return the current ledState -+BOARD_LED_STATE ledToggle(PLED_INFO pLed) -+{ -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if (GPIO->GPIOio & pLed->ledMask) -+ { -+ GPIO->GPIOio &= ~(pLed->ledMask); -+ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); -+ } -+ else -+ { -+ GPIO->GPIOio |= pLed->ledMask; -+ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); -+ } -+} -+ -+ -+// led timer. Will return if timer is already on -+void ledTimerStart(void) -+{ -+ if (gTimerOn) -+ return; -+ -+#if defined(DEBUG_LED) -+ printk("led: add_timer\n"); -+#endif -+ -+ init_timer(&gLedTimer); -+ gLedTimer.function = (void*)ledTimerExpire; -+ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms -+ add_timer (&gLedTimer); -+ gTimerOn = TRUE; -+} -+ -+ -+// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and -+// restart the timer according to ledState -+void ledTimerExpire(void) -+{ -+ int i; -+ PLED_INFO pCurLed; -+ -+ gTimerOn = FALSE; -+ -+ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) -+ { -+#if defined(DEBUG_LED) -+ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); -+#endif -+ switch (pCurLed->ledState) -+ { -+ case kLedStateOn: -+ case kLedStateOff: -+ case kLedStateFail: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ break; -+ -+ case kLedStateBlinkOnce: -+ ledToggle(pCurLed); -+ pCurLed->blinkCountDown = 0; // reset to 0 -+ pCurLed->ledState = pCurLed->savedLedState; -+ if (pCurLed->ledState == kLedStateSlowBlinkContinues || -+ pCurLed->ledState == kLedStateFastBlinkContinues) -+ ledTimerStart(); // start timer if in blinkContinues stats -+ break; -+ -+ case kLedStateSlowBlinkContinues: -+ if (pCurLed->blinkCountDown-- == 0) -+ { -+ pCurLed->blinkCountDown = kSlowBlinkCount; -+ ledToggle(pCurLed); -+ } -+ ledTimerStart(); -+ break; -+ -+ case kLedStateFastBlinkContinues: -+ if (pCurLed->blinkCountDown-- == 0) -+ { -+ pCurLed->blinkCountDown = kFastBlinkCount; -+ ledToggle(pCurLed); -+ } -+ ledTimerStart(); -+ break; -+ -+ default: -+ printk("Invalid state = %d\n", pCurLed->ledState); -+ } -+ } -+} -+ -+// initialize the gLedCount and allocate and fill gLed struct -+void __init boardLedInit(PLED_MAP_PAIR cLedMapping) -+{ -+ PLED_MAP_PAIR p1, p2; -+ PLED_INFO pCurLed; -+ int needTimer = FALSE; -+ int alreadyUsed = 0; -+ -+#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ -+ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; -+ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; -+#endif -+ -+ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); -+ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); -+ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); -+ -+ gLedCount = 0; -+ -+ // Check for multiple LED names and multiple LED GPIO pins that share the -+ // same physical board LED. -+ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) -+ { -+ alreadyUsed = 0; -+ for( p2 = cLedMapping; p2 != p1; p2++ ) -+ { -+ if( (p1->ledMask && p1->ledMask == p2->ledMask) || -+ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) -+ { -+ alreadyUsed = 1; -+ break; -+ } -+ } -+ -+ if( alreadyUsed == 0 ) -+ gLedCount++; -+ } -+ -+ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); -+ if( gLed == NULL ) -+ { -+ printk( "LED memory allocation error.\n" ); -+ return; -+ } -+ -+ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); -+ -+ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led -+ // (ledMask) the first defined led's ledInitState will be used. -+ pCurLed = gLed; -+ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) -+ { -+ if( (int) p1->ledName > MAX_VIRT_LEDS ) -+ continue; -+ -+ alreadyUsed = 0; -+ for( p2 = cLedMapping; p2 != p1; p2++ ) -+ { -+ if( (p1->ledMask && p1->ledMask == p2->ledMask) || -+ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) -+ { -+ alreadyUsed = 1; -+ break; -+ } -+ } -+ -+ if( alreadyUsed == 0 ) -+ { -+ // Initialize the board LED for the first time. -+ needTimer = initLedInfo( p1, pCurLed ); -+ gpVirtLeds[(int) p1->ledName] = pCurLed; -+ pCurLed++; -+ } -+ else -+ { -+ PLED_INFO pLed; -+ for( pLed = gLed; pLed != pCurLed; pLed++ ) -+ { -+ // Find the LED_INFO structure that has already been initialized. -+ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || -+ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) -+ { -+ // The board LED has already been initialized but possibly -+ // not completely initialized. -+ if( p1->ledMask ) -+ { -+ pLed->ledMask = p1->ledMask; -+ pLed->ledActiveLow = p1->ledActiveLow; -+ } -+ if( p1->ledMaskFail ) -+ { -+ pLed->ledMaskFail = p1->ledMaskFail; -+ pLed->ledActiveLowFail = p1->ledActiveLowFail; -+ } -+ gpVirtLeds[(int) p1->ledName] = pLed; -+ break; -+ } -+ } -+ } -+ } -+ -+ if (needTimer) -+ ledTimerStart(); -+ -+#if defined(DEBUG_LED) -+ int i; -+ for (i=0; i < gLedCount; i++) -+ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); -+#endif -+ -+} -+ -+// Initialize a structure that contains information about a physical board LED -+// control. The board LED may contain more than one GPIO pin to control a -+// normal condition (green) or a failure condition (red). -+int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) -+{ -+ int needTimer = FALSE; -+ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; -+ pCurLed->ledMask = pCurMap->ledMask; -+ pCurLed->ledActiveLow = pCurMap->ledActiveLow; -+ pCurLed->ledMaskFail = pCurMap->ledMaskFail; -+ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; -+ -+ switch (pCurLed->ledState) -+ { -+ case kLedStateOn: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOn(pCurLed); -+ break; -+ case kLedStateOff: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOff(pCurLed); -+ break; -+ case kLedStateFail: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOnFail(pCurLed); -+ break; -+ case kLedStateBlinkOnce: -+ pCurLed->blinkCountDown = 1; -+ needTimer = TRUE; -+ break; -+ case kLedStateSlowBlinkContinues: -+ pCurLed->blinkCountDown = kSlowBlinkCount; -+ needTimer = TRUE; -+ break; -+ case kLedStateFastBlinkContinues: -+ pCurLed->blinkCountDown = kFastBlinkCount; -+ needTimer = TRUE; -+ break; -+ default: -+ printk("Invalid state = %d\n", pCurLed->ledState); -+ } -+ -+ return( needTimer ); -+} -+ -+#if 0 /* BROKEN */ -+// Determines if there is at least one interface in bridge mode. Bridge mode -+// is determined by the cfm convention of naming bridge interfaces nas17 -+// through nas24. -+static int isBridgedProtocol(void) -+{ -+ extern int dev_get(const char *name); -+ const int firstBridgeId = 17; -+ const int lastBridgeId = 24; -+ int i; -+ int ret = FALSE; -+ char name[16]; -+ -+ for( i = firstBridgeId; i <= lastBridgeId; i++ ) -+ { -+ sprintf( name, "nas%d", i ); -+ -+ if( dev_get(name) ) -+ { -+ ret = TRUE; -+ break; -+ } -+ } -+ -+ return(ret); -+} -+#endif -+ -+// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation -+void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) -+{ -+ PLED_INFO ledInfoPtr; -+ -+ // do the mapping from virtual to physical led -+ if( (int) ledName < MAX_VIRT_LEDS ) -+ ledInfoPtr = gpVirtLeds[(int) ledName]; -+ else -+ ledInfoPtr = NULL; -+ -+ if (ledInfoPtr == NULL) -+ return; -+ -+ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) -+ { -+ (*gLedHwFunc[(int) ledName]) (ledName, ledState); -+ ledOffFail(ledInfoPtr); -+ return; -+ } -+ else -+ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) -+ { -+ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); -+ ledOff(ledInfoPtr); -+ return; -+ } -+ -+#if 0 /* BROKEN */ -+ // Do not blink the WAN Data LED if at least one interface is in bridge mode. -+ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) -+ { -+ static int BridgedProtocol = -1; -+ -+ if( BridgedProtocol == -1 ) -+ BridgedProtocol = isBridgedProtocol(); -+ -+ if( BridgedProtocol == TRUE ) -+ return; -+ } -+#endif -+ -+ // If the state is kLedStateFail and there is not a failure LED defined -+ // in the board parameters, change the state to kLedStateFastBlinkContinues. -+ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) -+ ledState = kLedStateFastBlinkContinues; -+ -+ switch (ledState) -+ { -+ case kLedStateOn: -+ // First, turn off the complimentary (failure) LED GPIO. -+ if( ledInfoPtr->ledMaskFail ) -+ ledOffFail(ledInfoPtr); -+ else -+ if( gLedHwFailFunc[(int) ledName] ) -+ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn on the specified LED GPIO. -+ ledOn(ledInfoPtr); -+ break; -+ -+ case kLedStateOff: -+ // First, turn off the complimentary (failure) LED GPIO. -+ if( ledInfoPtr->ledMaskFail ) -+ ledOffFail(ledInfoPtr); -+ else -+ if( gLedHwFailFunc[(int) ledName] ) -+ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn off the specified LED GPIO. -+ ledOff(ledInfoPtr); -+ break; -+ -+ case kLedStateFail: -+ // First, turn off the complimentary (normal) LED GPIO. -+ if( ledInfoPtr->ledMask ) -+ ledOff(ledInfoPtr); -+ else -+ if( gLedHwFunc[(int) ledName] ) -+ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn on (red) the specified LED GPIO. -+ ledOnFail(ledInfoPtr); -+ break; -+ -+ case kLedStateBlinkOnce: -+ // skip blinkOnce if it is already in Slow/Fast blink continues state -+ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || -+ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) -+ ; -+ else -+ { -+ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 -+ { -+ ledToggle(ledInfoPtr); -+ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires -+ ledInfoPtr->ledState = kLedStateBlinkOnce; -+ ledTimerStart(); -+ } -+ } -+ break; -+ -+ case kLedStateSlowBlinkContinues: -+ ledInfoPtr->blinkCountDown = kSlowBlinkCount; -+ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; -+ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; -+ ledTimerStart(); -+ break; -+ -+ case kLedStateFastBlinkContinues: -+ ledInfoPtr->blinkCountDown = kFastBlinkCount; -+ ledInfoPtr->ledState = kLedStateFastBlinkContinues; -+ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; -+ ledTimerStart(); -+ break; -+ -+ default: -+ printk("Invalid led state\n"); -+ } -+} -+ -+// This function is called for an LED that is controlled by hardware. -+void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, -+ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) -+{ -+ if( (int) ledName < MAX_VIRT_LEDS ) -+ { -+ if( ledFailType == 1 ) -+ gLedHwFailFunc[(int) ledName] = ledHwFunc; -+ else -+ gLedHwFunc[(int) ledName] = ledHwFunc; -+ } -+} -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/board.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/board.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/board.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/board.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,1570 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/*************************************************************************** -+ * File Name : board.c -+ * -+ * Description: This file contains Linux character device driver entry -+ * for the board related ioctl calls: flash, get free kernel -+ * page and dump kernel memory, etc. -+ * -+ * Created on : 2/20/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) -+ * -+ ***************************************************************************/ -+ -+ -+/* Includes. */ -+#include <linux/version.h> -+#include <linux/init.h> -+#include <linux/fs.h> -+#include <linux/interrupt.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <linux/pagemap.h> -+#include <asm/uaccess.h> -+#include <linux/wait.h> -+#include <linux/poll.h> -+#include <linux/sched.h> -+#include <linux/list.h> -+#include <linux/if.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#include <bcmTag.h> -+#include "boardparms.h" -+#include "cfiflash.h" -+#include "bcm_intr.h" -+#include "board.h" -+#include "bcm_map_part.h" -+ -+/* Typedefs. */ -+#if defined (NON_CONSECUTIVE_MAC) -+// used to be the last octet. Now changed to the first 5 bits of the the forth octet -+// to reduced the duplicated MAC addresses. -+#define CHANGED_OCTET 3 -+#define SHIFT_BITS 3 -+#else -+#define CHANGED_OCTET 1 -+#define SHIFT_BITS 0 -+#endif -+ -+#if defined (WIRELESS) -+#define SES_BTN_PRESSED 0x00000001 -+#define SES_EVENTS SES_BTN_PRESSED /*OR all values if any*/ -+#define SES_LED_OFF 0 -+#define SES_LED_ON 1 -+#define SES_LED_BLINK 2 -+#endif -+ -+typedef struct -+{ -+ unsigned long ulId; -+ char chInUse; -+ char chReserved[3]; -+} MAC_ADDR_INFO, *PMAC_ADDR_INFO; -+ -+typedef struct -+{ -+ unsigned long ulSdramSize; -+ unsigned long ulPsiSize; -+ unsigned long ulNumMacAddrs; -+ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ MAC_ADDR_INFO MacAddrs[1]; -+} NVRAM_INFO, *PNVRAM_INFO; -+ -+typedef struct -+{ -+ unsigned long eventmask; -+} BOARD_IOC, *PBOARD_IOC; -+ -+ -+/*Dyinggasp callback*/ -+typedef void (*cb_dgasp_t)(void *arg); -+typedef struct _CB_DGASP__LIST -+{ -+ struct list_head list; -+ char name[IFNAMSIZ]; -+ cb_dgasp_t cb_dgasp_fn; -+ void *context; -+}CB_DGASP_LIST , *PCB_DGASP_LIST; -+ -+ -+static LED_MAP_PAIR LedMapping[] = -+{ // led name Initial state physical pin (ledMask) -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. -+}; -+ -+/* Externs. */ -+extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); -+extern unsigned int nr_free_pages (void); -+extern const char *get_system_type(void); -+extern void kerSysFlashInit(void); -+extern unsigned long get_nvram_start_addr(void); -+extern unsigned long get_scratch_pad_start_addr(void); -+extern unsigned long getMemorySize(void); -+extern void __init boardLedInit(PLED_MAP_PAIR); -+extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); -+extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, -+ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); -+ -+/* Prototypes. */ -+void __init InitNvramInfo( void ); -+static int board_open( struct inode *inode, struct file *filp ); -+static int board_ioctl( struct inode *inode, struct file *flip, unsigned int command, unsigned long arg ); -+static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos); -+static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait); -+static int board_release(struct inode *inode, struct file *filp); -+ -+static BOARD_IOC* borad_ioc_alloc(void); -+static void borad_ioc_free(BOARD_IOC* board_ioc); -+ -+/* DyingGasp function prototype */ -+static void __init kerSysDyingGaspMapIntr(void); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); -+#else -+static unsigned int kerSysDyingGaspIsr(void); -+#endif -+static void __init kerSysInitDyingGaspHandler( void ); -+static void __exit kerSysDeinitDyingGaspHandler( void ); -+/* -DyingGasp function prototype - */ -+ -+ -+#if defined (WIRELESS) -+static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs); -+static void __init sesBtn_mapGpio(void); -+static void __init sesBtn_mapIntr(int context); -+static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait); -+static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos); -+static void __init sesLed_mapGpio(void); -+static void sesLed_ctrl(int action); -+static void __init ses_board_init(void); -+static void __exit ses_board_deinit(void); -+#endif -+ -+static PNVRAM_INFO g_pNvramInfo = NULL; -+static int g_ledInitialized = 0; -+static wait_queue_head_t g_board_wait_queue; -+static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; -+ -+static int g_wakeup_monitor = 0; -+static struct file *g_monitor_file = NULL; -+static struct task_struct *g_monitor_task = NULL; -+static unsigned int (*g_orig_fop_poll) -+ (struct file *, struct poll_table_struct *) = NULL; -+ -+static struct file_operations board_fops = -+{ -+ open: board_open, -+ ioctl: board_ioctl, -+ poll: board_poll, -+ read: board_read, -+ release: board_release, -+}; -+ -+uint32 board_major = 0; -+ -+#if defined (WIRELESS) -+static unsigned short sesBtn_irq = BP_NOT_DEFINED; -+static unsigned short sesBtn_gpio = BP_NOT_DEFINED; -+static unsigned short sesLed_gpio = BP_NOT_DEFINED; -+#endif -+ -+#if defined(MODULE) -+int init_module(void) -+{ -+ return( brcm_board_init() ); -+} -+ -+void cleanup_module(void) -+{ -+ if (MOD_IN_USE) -+ printk("brcm flash: cleanup_module failed because module is in use\n"); -+ else -+ brcm_board_cleanup(); -+} -+#endif //MODULE -+ -+ -+ -+static int __init brcm_board_init( void ) -+{ -+ typedef int (*BP_LED_FUNC) (unsigned short *); -+ static struct BpLedInformation -+ { -+ BOARD_LED_NAME ledName; -+ BP_LED_FUNC bpFunc; -+ BP_LED_FUNC bpFuncFail; -+ } bpLedInfo[] = -+ {{kLedAdsl, BpGetAdslLedGpio, BpGetAdslFailLedGpio}, -+ {kLedWireless, BpGetWirelessLedGpio, NULL}, -+ {kLedUsb, BpGetUsbLedGpio, NULL}, -+ {kLedHpna, BpGetHpnaLedGpio, NULL}, -+ {kLedWanData, BpGetWanDataLedGpio, NULL}, -+ {kLedPPP, BpGetPppLedGpio, BpGetPppFailLedGpio}, -+ {kLedVoip, BpGetVoipLedGpio, NULL}, -+ {kLedSes, BpGetWirelessSesLedGpio, NULL}, -+ {kLedEnd, NULL, NULL} -+ }; -+ -+ int ret; -+ -+ ret = register_chrdev(BOARD_DRV_MAJOR, "bcrmboard", &board_fops ); -+ if (ret < 0) -+ printk( "brcm_board_init(major %d): fail to register device.\n",BOARD_DRV_MAJOR); -+ else -+ { -+ PLED_MAP_PAIR pLedMap = LedMapping; -+ unsigned short gpio; -+ struct BpLedInformation *pInfo; -+ -+ printk("brcmboard: brcm_board_init entry\n"); -+ board_major = BOARD_DRV_MAJOR; -+ InitNvramInfo(); -+ -+ for( pInfo = bpLedInfo; pInfo->ledName != kLedEnd; pInfo++ ) -+ { -+ if( pInfo->bpFunc && (*pInfo->bpFunc) (&gpio) == BP_SUCCESS ) -+ { -+ pLedMap->ledName = pInfo->ledName; -+ pLedMap->ledMask = GPIO_NUM_TO_MASK(gpio); -+ pLedMap->ledActiveLow = (gpio & BP_ACTIVE_LOW) ? 1 : 0; -+ } -+ if( pInfo->bpFuncFail && (*pInfo->bpFuncFail) (&gpio) == BP_SUCCESS ) -+ { -+ pLedMap->ledName = pInfo->ledName; -+ pLedMap->ledMaskFail = GPIO_NUM_TO_MASK(gpio); -+ pLedMap->ledActiveLowFail = (gpio & BP_ACTIVE_LOW) ? 1 : 0; -+ } -+ if( pLedMap->ledName != kLedEnd ) -+ pLedMap++; -+ } -+ -+ init_waitqueue_head(&g_board_wait_queue); -+#if defined (WIRELESS) -+ ses_board_init(); -+#endif -+ kerSysInitDyingGaspHandler(); -+ kerSysDyingGaspMapIntr(); -+ -+ boardLedInit(LedMapping); -+ g_ledInitialized = 1; -+ } -+ -+ return ret; -+} -+ -+void __init InitNvramInfo( void ) -+{ -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ unsigned long ulNumMacAddrs = pNvramData->ulNumMacAddrs; -+ -+ if( ulNumMacAddrs > 0 && ulNumMacAddrs <= NVRAM_MAC_COUNT_MAX ) -+ { -+ unsigned long ulNvramInfoSize = -+ sizeof(NVRAM_INFO) + ((sizeof(MAC_ADDR_INFO) - 1) * ulNumMacAddrs); -+ -+ g_pNvramInfo = (PNVRAM_INFO) kmalloc( ulNvramInfoSize, GFP_KERNEL ); -+ -+ if( g_pNvramInfo ) -+ { -+ unsigned long ulPsiSize; -+ if( BpGetPsiSize( &ulPsiSize ) != BP_SUCCESS ) -+ ulPsiSize = NVRAM_PSI_DEFAULT; -+ memset( g_pNvramInfo, 0x00, ulNvramInfoSize ); -+ g_pNvramInfo->ulPsiSize = ulPsiSize * 1024; -+ g_pNvramInfo->ulNumMacAddrs = pNvramData->ulNumMacAddrs; -+ memcpy( g_pNvramInfo->ucaBaseMacAddr, pNvramData->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ g_pNvramInfo->ulSdramSize = getMemorySize(); -+ } -+ else -+ printk("ERROR - Could not allocate memory for NVRAM data\n"); -+ } -+ else -+ printk("ERROR - Invalid number of MAC addresses (%ld) is configured.\n", -+ ulNumMacAddrs); -+} -+ -+void __exit brcm_board_cleanup( void ) -+{ -+ printk("brcm_board_cleanup()\n"); -+ -+ if (board_major != -1) -+ { -+#if defined (WIRELESS) -+ ses_board_deinit(); -+#endif -+ kerSysDeinitDyingGaspHandler(); -+ unregister_chrdev(board_major, "board_ioctl"); -+ } -+} -+ -+static BOARD_IOC* borad_ioc_alloc(void) -+{ -+ BOARD_IOC *board_ioc =NULL; -+ board_ioc = (BOARD_IOC*) kmalloc( sizeof(BOARD_IOC) , GFP_KERNEL ); -+ if(board_ioc) -+ { -+ memset(board_ioc, 0, sizeof(BOARD_IOC)); -+ } -+ return board_ioc; -+} -+ -+static void borad_ioc_free(BOARD_IOC* board_ioc) -+{ -+ if(board_ioc) -+ { -+ kfree(board_ioc); -+ } -+} -+ -+ -+static int board_open( struct inode *inode, struct file *filp ) -+{ -+ filp->private_data = borad_ioc_alloc(); -+ -+ if (filp->private_data == NULL) -+ return -ENOMEM; -+ -+ return( 0 ); -+} -+ -+static int board_release(struct inode *inode, struct file *filp) -+{ -+ BOARD_IOC *board_ioc = filp->private_data; -+ -+ wait_event_interruptible(g_board_wait_queue, 1); -+ borad_ioc_free(board_ioc); -+ -+ return( 0 ); -+} -+ -+ -+static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait) -+{ -+ unsigned int mask = 0; -+#if defined (WIRELESS) -+ BOARD_IOC *board_ioc = filp->private_data; -+#endif -+ -+ poll_wait(filp, &g_board_wait_queue, wait); -+#if defined (WIRELESS) -+ if(board_ioc->eventmask & SES_EVENTS){ -+ mask |= sesBtn_poll(filp, wait); -+ } -+#endif -+ -+ return mask; -+} -+ -+ -+static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) -+{ -+#if defined (WIRELESS) -+ BOARD_IOC *board_ioc = filp->private_data; -+ if(board_ioc->eventmask & SES_EVENTS){ -+ return sesBtn_read(filp, buffer, count, ppos); -+ } -+#endif -+ return 0; -+} -+ -+//************************************************************************************** -+// Utitlities for dump memory, free kernel pages, mips soft reset, etc. -+//************************************************************************************** -+ -+/*********************************************************************** -+ * Function Name: dumpaddr -+ * Description : Display a hex dump of the specified address. -+ ***********************************************************************/ -+void dumpaddr( unsigned char *pAddr, int nLen ) -+{ -+ static char szHexChars[] = "0123456789abcdef"; -+ char szLine[80]; -+ char *p = szLine; -+ unsigned char ch, *q; -+ int i, j; -+ unsigned long ul; -+ -+ while( nLen > 0 ) -+ { -+ sprintf( szLine, "%8.8lx: ", (unsigned long) pAddr ); -+ p = szLine + strlen(szLine); -+ -+ for(i = 0; i < 16 && nLen > 0; i += sizeof(long), nLen -= sizeof(long)) -+ { -+ ul = *(unsigned long *) &pAddr[i]; -+ q = (unsigned char *) &ul; -+ for( j = 0; j < sizeof(long); j++ ) -+ { -+ *p++ = szHexChars[q[j] >> 4]; -+ *p++ = szHexChars[q[j] & 0x0f]; -+ *p++ = ' '; -+ } -+ } -+ -+ for( j = 0; j < 16 - i; j++ ) -+ *p++ = ' ', *p++ = ' ', *p++ = ' '; -+ -+ *p++ = ' ', *p++ = ' ', *p++ = ' '; -+ -+ for( j = 0; j < i; j++ ) -+ { -+ ch = pAddr[j]; -+ *p++ = (ch > ' ' && ch < '~') ? ch : '.'; -+ } -+ -+ *p++ = '\0'; -+ printk( "%s\r\n", szLine ); -+ -+ pAddr += i; -+ } -+ printk( "\r\n" ); -+} /* dumpaddr */ -+ -+ -+void kerSysMipsSoftReset(void) -+{ -+#if defined(CONFIG_BCM96348) -+ if (PERF->RevID == 0x634800A1) { -+ typedef void (*FNPTR) (void); -+ FNPTR bootaddr = (FNPTR) FLASH_BASE; -+ int i; -+ -+ /* Disable interrupts. */ -+ cli(); -+ -+ /* Reset all blocks. */ -+ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; -+ for( i = 0; i < 1000000; i++ ) -+ ; -+ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; -+ /* Jump to the power on address. */ -+ (*bootaddr) (); -+ } -+ else -+ PERF->pll_control |= SOFT_RESET; // soft reset mips -+#else -+ PERF->pll_control |= SOFT_RESET; // soft reset mips -+#endif -+} -+ -+ -+int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) -+{ -+ int nRet = 0; -+ PMAC_ADDR_INFO pMai = NULL; -+ PMAC_ADDR_INFO pMaiFreeNoId = NULL; -+ PMAC_ADDR_INFO pMaiFreeId = NULL; -+ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; -+ -+ for( i = 0, pMai = g_pNvramInfo->MacAddrs; i < g_pNvramInfo->ulNumMacAddrs; -+ i++, pMai++ ) -+ { -+ if( ulId == pMai->ulId || ulId == MAC_ADDRESS_ANY ) -+ { -+ /* This MAC address has been used by the caller in the past. */ -+ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ shiftedIdx = i; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMai->chInUse = 1; -+ pMaiFreeNoId = pMaiFreeId = NULL; -+ break; -+ } -+ else -+ if( pMai->chInUse == 0 ) -+ { -+ if( pMai->ulId == 0 && pMaiFreeNoId == NULL ) -+ { -+ /* This is an available MAC address that has never been -+ * used. -+ */ -+ pMaiFreeNoId = pMai; -+ ulIdxNoId = i; -+ } -+ else -+ if( pMai->ulId != 0 && pMaiFreeId == NULL ) -+ { -+ /* This is an available MAC address that has been used -+ * before. Use addresses that have never been used -+ * first, before using this one. -+ */ -+ pMaiFreeId = pMai; -+ ulIdxId = i; -+ } -+ } -+ } -+ -+ if( pMaiFreeNoId || pMaiFreeId ) -+ { -+ /* An available MAC address was found. */ -+ memcpy(pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr,NVRAM_MAC_ADDRESS_LEN); -+ if( pMaiFreeNoId ) -+ { -+ shiftedIdx = ulIdxNoId; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMaiFreeNoId->ulId = ulId; -+ pMaiFreeNoId->chInUse = 1; -+ } -+ else -+ { -+ shiftedIdx = ulIdxId; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMaiFreeId->ulId = ulId; -+ pMaiFreeId->chInUse = 1; -+ } -+ } -+ else -+ if( i == g_pNvramInfo->ulNumMacAddrs ) -+ nRet = -EADDRNOTAVAIL; -+ -+ return( nRet ); -+} /* kerSysGetMacAddr */ -+ -+int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) -+{ -+ int nRet = -EINVAL; -+ unsigned long ulIdx = 0; -+ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - -+ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); -+ -+ // if overflow 255 (negitive), add 256 to have the correct index -+ if (idx < 0) -+ idx += 256; -+ ulIdx = (unsigned long) (idx >> SHIFT_BITS); -+ -+ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) -+ { -+ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; -+ if( pMai->chInUse == 1 ) -+ { -+ pMai->chInUse = 0; -+ nRet = 0; -+ } -+ } -+ -+ return( nRet ); -+} /* kerSysReleaseMacAddr */ -+ -+int kerSysGetSdramSize( void ) -+{ -+ return( (int) g_pNvramInfo->ulSdramSize ); -+} /* kerSysGetSdramSize */ -+ -+ -+void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) -+{ -+ if (g_ledInitialized) -+ boardLedCtrl(ledName, ledState); -+} -+ -+unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) -+{ -+ int mask = (*g_orig_fop_poll) (f, t); -+ -+ if( g_wakeup_monitor == 1 && g_monitor_file == f ) -+ { -+ /* If g_wakeup_monitor is non-0, the user mode application needs to -+ * return from a blocking select function. Return POLLPRI which will -+ * cause the select to return with the exception descriptor set. -+ */ -+ mask |= POLLPRI; -+ g_wakeup_monitor = 0; -+ } -+ -+ return( mask ); -+} -+ -+/* Put the user mode application that monitors link state on a run queue. */ -+void kerSysWakeupMonitorTask( void ) -+{ -+ g_wakeup_monitor = 1; -+ if( g_monitor_task ) -+ wake_up_process( g_monitor_task ); -+} -+ -+//******************************************************************************************** -+// misc. ioctl calls come to here. (flash, led, reset, kernel memory access, etc.) -+//******************************************************************************************** -+static int board_ioctl( struct inode *inode, struct file *flip, -+ unsigned int command, unsigned long arg ) -+{ -+ int ret = 0; -+ BOARD_IOCTL_PARMS ctrlParms; -+ unsigned char ucaMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ int allowedSize; -+ -+ switch (command) -+ { -+ case BOARD_IOCTL_FLASH_INIT: -+ // not used for now. kerSysBcmImageInit(); -+ break; -+ -+ -+ case BOARD_IOCTL_FLASH_WRITE: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ NVRAM_DATA SaveNvramData; -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ -+ switch (ctrlParms.action) -+ { -+ case SCRATCH_PAD: -+ ret = kerSysScratchPadSet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); -+ break; -+ -+ case PERSISTENT: -+ ret = kerSysPersistentSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case NVRAM: -+ ret = kerSysNvRamSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case BCM_IMAGE_CFE: -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > FLASH45_LENGTH_BOOT_ROM ) -+ { -+ printk("Illegal CFE size [%d]. Size allowed: [%d]\n", -+ ctrlParms.strLen, FLASH45_LENGTH_BOOT_ROM); -+ ret = -1; -+ break; -+ } -+ -+ // save NVRAM data into a local structure -+ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); -+ -+ // set memory type field -+ BpGetSdramSize( (unsigned long *) &ctrlParms.string[SDRAM_TYPE_ADDRESS_OFFSET] ); -+ -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ -+ // if nvram is not valid, restore the current nvram settings -+ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && -+ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) -+ { -+ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); -+ } -+ break; -+ -+ case BCM_IMAGE_FS: -+ allowedSize = (int) flash_get_total_size() - \ -+ FLASH_RESERVED_AT_END - TAG_LEN - FLASH45_LENGTH_BOOT_ROM; -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize) -+ { -+ printk("Illegal root file system size [%d]. Size allowed: [%d]\n", -+ ctrlParms.strLen, allowedSize); -+ ret = -1; -+ break; -+ } -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ kerSysMipsSoftReset(); -+ break; -+ -+ case BCM_IMAGE_KERNEL: // not used for now. -+ break; -+ case BCM_IMAGE_WHOLE: -+ if(ctrlParms.strLen <= 0) -+ { -+ printk("Illegal flash image size [%d].\n", ctrlParms.strLen); -+ ret = -1; -+ break; -+ } -+ -+ // save NVRAM data into a local structure -+ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); -+ -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ -+ // if nvram is not valid, restore the current nvram settings -+ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && -+ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) -+ { -+ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); -+ } -+ -+ kerSysMipsSoftReset(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ printk("flash_ioctl_command: invalid command %d\n", ctrlParms.action); -+ break; -+ } -+ ctrlParms.result = ret; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_FLASH_READ: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ switch (ctrlParms.action) -+ { -+ case SCRATCH_PAD: -+ ret = kerSysScratchPadGet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); -+ break; -+ -+ case PERSISTENT: -+ ret = kerSysPersistentGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case NVRAM: -+ ret = kerSysNvRamGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case FLASH_SIZE: -+ ret = kerSysFlashSizeGet(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ printk("Not supported. invalid command %d\n", ctrlParms.action); -+ break; -+ } -+ ctrlParms.result = ret; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_NR_PAGES: -+ ctrlParms.result = nr_free_pages() + get_page_cache_size(); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_DUMP_ADDR: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ dumpaddr( (unsigned char *) ctrlParms.string, ctrlParms.strLen ); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_SET_MEMORY: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ unsigned long *pul = (unsigned long *) ctrlParms.string; -+ unsigned short *pus = (unsigned short *) ctrlParms.string; -+ unsigned char *puc = (unsigned char *) ctrlParms.string; -+ switch( ctrlParms.strLen ) -+ { -+ case 4: -+ *pul = (unsigned long) ctrlParms.offset; -+ break; -+ case 2: -+ *pus = (unsigned short) ctrlParms.offset; -+ break; -+ case 1: -+ *puc = (unsigned char) ctrlParms.offset; -+ break; -+ } -+ dumpaddr( (unsigned char *) ctrlParms.string, sizeof(long) ); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_MIPS_SOFT_RESET: -+ kerSysMipsSoftReset(); -+ break; -+ -+ case BOARD_IOCTL_LED_CTRL: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ kerSysLedCtrl((BOARD_LED_NAME)ctrlParms.strLen, (BOARD_LED_STATE)ctrlParms.offset); -+ ret = 0; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_ID: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, -+ sizeof(ctrlParms)) == 0) -+ { -+ if( ctrlParms.string ) -+ { -+ char *p = (char *) get_system_type(); -+ if( strlen(p) + 1 < ctrlParms.strLen ) -+ ctrlParms.strLen = strlen(p) + 1; -+ __copy_to_user(ctrlParms.string, p, ctrlParms.strLen); -+ } -+ -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ ctrlParms.result = kerSysGetMacAddress( ucaMacAddr, -+ ctrlParms.offset ); -+ -+ if( ctrlParms.result == 0 ) -+ { -+ __copy_to_user(ctrlParms.string, ucaMacAddr, -+ sizeof(ucaMacAddr)); -+ } -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_RELEASE_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ if (copy_from_user((void*)ucaMacAddr, (void*)ctrlParms.string, \ -+ NVRAM_MAC_ADDRESS_LEN) == 0) -+ { -+ ctrlParms.result = kerSysReleaseMacAddress( ucaMacAddr ); -+ } -+ else -+ { -+ ctrlParms.result = -EACCES; -+ } -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_PSI_SIZE: -+ ctrlParms.result = (int) g_pNvramInfo->ulPsiSize; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_SDRAM_SIZE: -+ ctrlParms.result = (int) g_pNvramInfo->ulSdramSize; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_BASE_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ __copy_to_user(ctrlParms.string, g_pNvramInfo->ucaBaseMacAddr, NVRAM_MAC_ADDRESS_LEN); -+ ctrlParms.result = 0; -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_CHIP_ID: -+ ctrlParms.result = (int) (PERF->RevID & 0xFFFF0000) >> 16; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_NUM_ENET: { -+ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; -+ int i, numeth = 0; -+ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { -+ for( i = 0; i < BP_MAX_ENET_MACS; i++) { -+ if (EnetInfos[i].ucPhyType != BP_ENET_NO_PHY) { -+ numeth++; -+ } -+ } -+ ctrlParms.result = numeth; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ -+ case BOARD_IOCTL_GET_CFE_VER: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ char *vertag = (char *)(FLASH_BASE + CFE_VERSION_OFFSET); -+ if (ctrlParms.strLen < CFE_VERSION_SIZE) { -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = -EFAULT; -+ } -+ else if (strncmp(vertag, "cfe-v", 5)) { // no tag info in flash -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ ctrlParms.result = 1; -+ __copy_to_user(ctrlParms.string, vertag+CFE_VERSION_MARK_SIZE, CFE_VERSION_SIZE); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_ENET_CFG: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; -+ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { -+ if (ctrlParms.strLen == sizeof(EnetInfos)) { -+ __copy_to_user(ctrlParms.string, EnetInfos, sizeof(EnetInfos)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+#if defined (WIRELESS) -+ case BOARD_IOCTL_GET_WLAN_ANT_INUSE: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ unsigned short antInUse = 0; -+ if (BpGetWirelessAntInUse(&antInUse) == BP_SUCCESS) { -+ if (ctrlParms.strLen == sizeof(antInUse)) { -+ __copy_to_user(ctrlParms.string, &antInUse, sizeof(antInUse)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#endif -+ case BOARD_IOCTL_SET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ ctrlParms.result = -EFAULT; -+ ret = -EFAULT; -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ board_ioc->eventmask |= *((int*)ctrlParms.string); -+#if defined (WIRELESS) -+ if((board_ioc->eventmask & SES_EVENTS)) { -+ if(sesBtn_irq != BP_NOT_DEFINED) { -+ BcmHalInterruptEnable(sesBtn_irq); -+ ctrlParms.result = 0; -+ ret = 0; -+ } -+ } -+#endif -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ __copy_to_user(ctrlParms.string, &board_ioc->eventmask, sizeof(unsigned long)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_UNSET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ board_ioc->eventmask &= (~(*((int*)ctrlParms.string))); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#if defined (WIRELESS) -+ case BOARD_IOCTL_SET_SES_LED: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ if (ctrlParms.strLen == sizeof(int)) { -+ sesLed_ctrl(*(int*)ctrlParms.string); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#endif -+ -+ case BOARD_IOCTL_SET_MONITOR_FD: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ int fput_needed = 0; -+ -+ g_monitor_file = fget_light( ctrlParms.offset, &fput_needed ); -+ if( g_monitor_file ) { -+ /* Hook this file descriptor's poll function in order to set -+ * the exception descriptor when there is a change in link -+ * state. -+ */ -+ g_monitor_task = current; -+ g_orig_fop_poll = g_monitor_file->f_op->poll; -+ g_monitor_file->f_op->poll = kerSysMonitorPollHook; -+ } -+ } -+ break; -+ -+ case BOARD_IOCTL_WAKEUP_MONITOR_TASK: -+ kerSysWakeupMonitorTask(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ ctrlParms.result = 0; -+ printk("board_ioctl: invalid command %x, cmd %d .\n",command,_IOC_NR(command)); -+ break; -+ -+ } /* switch */ -+ -+ return (ret); -+ -+} /* board_ioctl */ -+ -+/*************************************************************************** -+ * SES Button ISR/GPIO/LED functions. -+ ***************************************************************************/ -+#if defined (WIRELESS) -+static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs) -+{ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if (!(*gpio_reg & gpio_mask)){ -+ wake_up_interruptible(&g_board_wait_queue); -+ return IRQ_RETVAL(1); -+ } else { -+ return IRQ_RETVAL(0); -+ } -+} -+ -+static void __init sesBtn_mapGpio() -+{ -+ if( BpGetWirelessSesBtnGpio(&sesBtn_gpio) == BP_SUCCESS ) -+ { -+ printk("SES: Button GPIO 0x%x is enabled\n", sesBtn_gpio); -+ } -+} -+ -+static void __init sesBtn_mapIntr(int context) -+{ -+ if( BpGetWirelessSesExtIntr(&sesBtn_irq) == BP_SUCCESS ) -+ { -+ printk("SES: Button Interrupt 0x%x is enabled\n", sesBtn_irq); -+ } -+ else -+ return; -+ -+ sesBtn_irq += INTERRUPT_ID_EXTERNAL_0; -+ -+ if (BcmHalMapInterrupt((FN_HANDLER)sesBtn_isr, context, sesBtn_irq)) { -+ printk("SES: Interrupt mapping failed\n"); -+ } -+ BcmHalInterruptEnable(sesBtn_irq); -+} -+ -+ -+static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait) -+{ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if (!(*gpio_reg & gpio_mask)){ -+ return POLLIN; -+ } -+ return 0; -+} -+ -+static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) -+{ -+ volatile unsigned int event=0; -+ ssize_t ret=0; -+ -+#if defined(_BCM96338_) || defined (CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined (CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if(*gpio_reg & gpio_mask){ -+ BcmHalInterruptEnable(sesBtn_irq); -+ return ret; -+ } -+ event = SES_EVENTS; -+ __copy_to_user((char*)buffer, (char*)&event, sizeof(event)); -+ BcmHalInterruptEnable(sesBtn_irq); -+ count -= sizeof(event); -+ buffer += sizeof(event); -+ ret += sizeof(event); -+ return ret; -+} -+ -+static void __init sesLed_mapGpio() -+{ -+ if( BpGetWirelessSesBtnGpio(&sesLed_gpio) == BP_SUCCESS ) -+ { -+ printk("SES: LED GPIO 0x%x is enabled\n", sesBtn_gpio); -+ } -+} -+ -+static void sesLed_ctrl(int action) -+{ -+ -+ //char status = ((action >> 8) & 0xff); /* extract status */ -+ //char event = ((action >> 16) & 0xff); /* extract event */ -+ //char blinktype = ((action >> 24) & 0xff); /* extract blink type for SES_LED_BLINK */ -+ -+ BOARD_LED_STATE led; -+ -+ if(sesLed_gpio == BP_NOT_DEFINED) -+ return; -+ -+ action &= 0xff; /* extract led */ -+ -+ //printk("blinktype=%d, event=%d, status=%d\n",(int)blinktype, (int)event, (int)status); -+ -+ switch (action) -+ { -+ case SES_LED_ON: -+ //printk("SES: led on\n"); -+ led = kLedStateOn; -+ break; -+ case SES_LED_BLINK: -+ //printk("SES: led blink\n"); -+ led = kLedStateSlowBlinkContinues; -+ break; -+ case SES_LED_OFF: -+ default: -+ //printk("SES: led off\n"); -+ led = kLedStateOff; -+ } -+ -+ kerSysLedCtrl(kLedSes, led); -+} -+ -+static void __init ses_board_init() -+{ -+ sesBtn_mapGpio(); -+ sesBtn_mapIntr(0); -+ sesLed_mapGpio(); -+} -+static void __exit ses_board_deinit() -+{ -+ if(sesBtn_irq) -+ BcmHalInterruptDisable(sesBtn_irq); -+} -+#endif -+ -+/*************************************************************************** -+ * Dying gasp ISR and functions. -+ ***************************************************************************/ -+#define KERSYS_DBG printk -+ -+#if defined(CONFIG_BCM96345) -+#define CYCLE_PER_US 70 -+#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+/* The BCM6348 cycles per microsecond is really variable since the BCM6348 -+ * MIPS speed can vary depending on the PLL settings. However, an appoximate -+ * value of 120 will still work OK for the test being done. -+ */ -+#define CYCLE_PER_US 120 -+#endif -+#define DG_GLITCH_TO (100*CYCLE_PER_US) -+ -+static void __init kerSysDyingGaspMapIntr() -+{ -+ unsigned long ulIntr; -+ -+#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) -+ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { -+ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); -+ BcmHalInterruptEnable( INTERRUPT_ID_DG ); -+ } -+#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) -+ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { -+ ulIntr += INTERRUPT_ID_EXTERNAL_0; -+ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); -+ BcmHalInterruptEnable( ulIntr ); -+ } -+#endif -+ -+} -+ -+void kerSysSetWdTimer(ulong timeUs) -+{ -+ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); -+ TIMER->WatchDogCtl = 0xFF00; -+ TIMER->WatchDogCtl = 0x00FF; -+} -+ -+ulong kerSysGetCycleCount(void) -+{ -+ ulong cnt; -+#ifdef _WIN32_WCE -+ cnt = 0; -+#else -+ __asm volatile("mfc0 %0, $9":"=d"(cnt)); -+#endif -+ return(cnt); -+} -+ -+static Bool kerSysDyingGaspCheckPowerLoss(void) -+{ -+ ulong clk0; -+ ulong ulIntr; -+ -+ ulIntr = 0; -+ clk0 = kerSysGetCycleCount(); -+ -+ UART->Data = 'D'; -+ UART->Data = '%'; -+ UART->Data = 'G'; -+ -+#if defined(CONFIG_BCM96345) -+ BpGetAdslDyingGaspExtIntr( &ulIntr ); -+ -+ do { -+ ulong clk1; -+ -+ clk1 = kerSysGetCycleCount(); /* time cleared */ -+ /* wait a little to get new reading */ -+ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) -+ ; -+ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); -+ -+ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ -+ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); -+ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); -+ return 0; -+ } -+#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) -+ do { -+ ulong clk1; -+ -+ clk1 = kerSysGetCycleCount(); /* time cleared */ -+ /* wait a little to get new reading */ -+ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) -+ ; -+ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); -+ -+ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { -+ BcmHalInterruptEnable( INTERRUPT_ID_DG ); -+ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); -+ return 0; -+ } -+#endif -+ return 1; -+} -+ -+static void kerSysDyingGaspShutdown( void ) -+{ -+ kerSysSetWdTimer(1000000); -+#if defined(CONFIG_BCM96345) -+ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); -+#elif defined(CONFIG_BCM96348) -+ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); -+#endif -+} -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) -+#else -+static unsigned int kerSysDyingGaspIsr(void) -+#endif -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp, *dsl = NULL; -+ -+ if (kerSysDyingGaspCheckPowerLoss()) { -+ -+ /* first to turn off everything other than dsl */ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ if(strncmp(tmp->name, "dsl", 3)) { -+ (tmp->cb_dgasp_fn)(tmp->context); -+ }else { -+ dsl = tmp; -+ } -+ } -+ -+ /* now send dgasp */ -+ if(dsl) -+ (dsl->cb_dgasp_fn)(dsl->context); -+ -+ /* reset and shutdown system */ -+ kerSysDyingGaspShutdown(); -+ } -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+return( IRQ_HANDLED ); -+#else -+ return( 1 ); -+#endif -+} -+ -+static void __init kerSysInitDyingGaspHandler( void ) -+{ -+ CB_DGASP_LIST *new_node; -+ -+ if( g_cb_dgasp_list_head != NULL) { -+ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); -+ return; -+ } -+ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); -+ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); -+ INIT_LIST_HEAD(&new_node->list); -+ g_cb_dgasp_list_head = new_node; -+ -+} /* kerSysInitDyingGaspHandler */ -+ -+static void __exit kerSysDeinitDyingGaspHandler( void ) -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp; -+ -+ if(g_cb_dgasp_list_head == NULL) -+ return; -+ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ list_del(pos); -+ kfree(tmp); -+ } -+ -+ kfree(g_cb_dgasp_list_head); -+ g_cb_dgasp_list_head = NULL; -+ -+} /* kerSysDeinitDyingGaspHandler */ -+ -+void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) -+{ -+ CB_DGASP_LIST *new_node; -+ -+ if( g_cb_dgasp_list_head == NULL) { -+ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); -+ return; -+ } -+ -+ if( devname == NULL || cbfn == NULL ) { -+ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); -+ return; -+ } -+ -+ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); -+ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); -+ INIT_LIST_HEAD(&new_node->list); -+ strncpy(new_node->name, devname, IFNAMSIZ); -+ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; -+ new_node->context = context; -+ list_add(&new_node->list, &g_cb_dgasp_list_head->list); -+ -+ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); -+ -+} /* kerSysRegisterDyingGaspHandler */ -+ -+void kerSysDeregisterDyingGaspHandler(char *devname) -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp; -+ -+ if(g_cb_dgasp_list_head == NULL) { -+ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); -+ return; -+ } -+ -+ if(devname == NULL) { -+ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); -+ return; -+ } -+ -+ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); -+ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ if(!strcmp(tmp->name, devname)) { -+ list_del(pos); -+ kfree(tmp); -+ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); -+ return; -+ } -+ } -+ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); -+ -+} /* kerSysDeregisterDyingGaspHandler */ -+ -+/*************************************************************************** -+ * MACRO to call driver initialization and cleanup functions. -+ ***************************************************************************/ -+module_init( brcm_board_init ); -+module_exit( brcm_board_cleanup ); -+ -+EXPORT_SYMBOL(kerSysNvRamGet); -+EXPORT_SYMBOL(dumpaddr); -+EXPORT_SYMBOL(kerSysGetMacAddress); -+EXPORT_SYMBOL(kerSysReleaseMacAddress); -+EXPORT_SYMBOL(kerSysGetSdramSize); -+EXPORT_SYMBOL(kerSysLedCtrl); -+EXPORT_SYMBOL(kerSysLedRegisterHwHandler); -+EXPORT_SYMBOL(BpGetBoardIds); -+EXPORT_SYMBOL(BpGetSdramSize); -+EXPORT_SYMBOL(BpGetPsiSize); -+EXPORT_SYMBOL(BpGetEthernetMacInfo); -+EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); -+EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); -+EXPORT_SYMBOL(BpGetVoipResetGpio); -+EXPORT_SYMBOL(BpGetVoipIntrGpio); -+EXPORT_SYMBOL(BpGetPcmciaResetGpio); -+EXPORT_SYMBOL(BpGetRtsCtsUartGpios); -+EXPORT_SYMBOL(BpGetAdslLedGpio); -+EXPORT_SYMBOL(BpGetAdslFailLedGpio); -+EXPORT_SYMBOL(BpGetWirelessLedGpio); -+EXPORT_SYMBOL(BpGetUsbLedGpio); -+EXPORT_SYMBOL(BpGetHpnaLedGpio); -+EXPORT_SYMBOL(BpGetWanDataLedGpio); -+EXPORT_SYMBOL(BpGetPppLedGpio); -+EXPORT_SYMBOL(BpGetPppFailLedGpio); -+EXPORT_SYMBOL(BpGetVoipLedGpio); -+EXPORT_SYMBOL(BpGetWirelessExtIntr); -+EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); -+EXPORT_SYMBOL(BpGetVoipExtIntr); -+EXPORT_SYMBOL(BpGetHpnaExtIntr); -+EXPORT_SYMBOL(BpGetHpnaChipSelect); -+EXPORT_SYMBOL(BpGetVoipChipSelect); -+EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); -+EXPORT_SYMBOL(BpGetWirelessSesExtIntr); -+EXPORT_SYMBOL(BpGetWirelessSesLedGpio); -+EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); -+EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); -+EXPORT_SYMBOL(kerSysGetCycleCount); -+EXPORT_SYMBOL(kerSysSetWdTimer); -+EXPORT_SYMBOL(kerSysWakeupMonitorTask); -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,692 @@ -+/************************************************************************/ -+/* */ -+/* AMD CFI Enabled Flash Memory Drivers */ -+/* File name: CFIFLASH.C */ -+/* Revision: 1.0 5/07/98 */ -+/* */ -+/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ -+/* This software is unpublished and contains the trade secrets and */ -+/* confidential proprietary information of AMD. Unless otherwise */ -+/* provided in the Software Agreement associated herewith, it is */ -+/* licensed in confidence "AS IS" and is not to be reproduced in whole */ -+/* or part by any means except for backup. Use, duplication, or */ -+/* disclosure by the Government is subject to the restrictions in */ -+/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ -+/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ -+/* Software owned by */ -+/* Advanced Micro Devices, Inc., */ -+/* One AMD Place, */ -+/* P.O. Box 3453 */ -+/* Sunnyvale, CA 94088-3453. */ -+/************************************************************************/ -+/* This software constitutes a basic shell of source code for */ -+/* programming all AMD Flash components. AMD */ -+/* will not be responsible for misuse or illegal use of this */ -+/* software for devices not supported herein. AMD is providing */ -+/* this source code "AS IS" and will not be responsible for */ -+/* issues arising from incorrect user implementation of the */ -+/* source code herein. It is the user's responsibility to */ -+/* properly design-in this source code. */ -+/* */ -+/************************************************************************/ -+#ifdef _CFE_ -+#include "lib_types.h" -+#include "lib_printf.h" -+#include "lib_string.h" -+#include "cfe_timer.h" -+#define printk printf -+#else // linux -+#include <linux/param.h> -+#include <linux/sched.h> -+#include <linux/timer.h> -+#endif -+ -+#include "cfiflash.h" -+ -+static int flash_wait(WORD sector, int offset, UINT16 data); -+static UINT16 flash_get_device_id(void); -+static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily); -+static int flash_write(WORD sector, int offset, byte *buf, int nbytes); -+static void flash_command(int command, WORD sector, int offset, UINT16 data); -+ -+/*********************************************************************/ -+/* 'meminfo' should be a pointer, but most C compilers will not */ -+/* allocate static storage for a pointer without calling */ -+/* non-portable functions such as 'new'. We also want to avoid */ -+/* the overhead of passing this pointer for every driver call. */ -+/* Systems with limited heap space will need to do this. */ -+/*********************************************************************/ -+struct flashinfo meminfo; /* Flash information structure */ -+static int flashFamily = FLASH_UNDEFINED; -+static int totalSize = 0; -+static struct cfi_query query; -+ -+static UINT16 cfi_data_struct_29W160[] = { -+ 0x0020, 0x0049, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0051, 0x0052, 0x0059, 0x0002, 0x0000, 0x0040, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0027, 0x0036, 0x0000, 0x0000, 0x0004, -+ 0x0000, 0x000a, 0x0000, 0x0004, 0x0000, 0x0003, 0x0000, 0x0015, -+ 0x0002, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0040, -+ 0x0000, 0x0001, 0x0000, 0x0020, 0x0000, 0x0000, 0x0000, 0x0080, -+ 0x0000, 0x001e, 0x0000, 0x0000, 0x0001, 0xffff, 0xffff, 0xffff, -+ 0x0050, 0x0052, 0x0049, 0x0031, 0x0030, 0x0000, 0x0002, 0x0001, -+ 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0002, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0x0888, 0x252b, 0x8c84, 0x7dbc, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff -+}; -+ -+ -+/*********************************************************************/ -+/* Init_flash is used to build a sector table from the information */ -+/* provided through the CFI query. This information is translated */ -+/* from erase_block information to base:offset information for each */ -+/* individual sector. This information is then stored in the meminfo */ -+/* structure, and used throughout the driver to access sector */ -+/* information. */ -+/* */ -+/* This is more efficient than deriving the sector base:offset */ -+/* information every time the memory map switches (since on the */ -+/* development platform can only map 64k at a time). If the entire */ -+/* flash memory array can be mapped in, then the addition static */ -+/* allocation for the meminfo structure can be eliminated, but the */ -+/* drivers will have to be re-written. */ -+/* */ -+/* The meminfo struct occupies 653 bytes of heap space, depending */ -+/* on the value of the define MAXSECTORS. Adjust to suit */ -+/* application */ -+/*********************************************************************/ -+byte flash_init(void) -+{ -+ int i=0, j=0, count=0; -+ int basecount=0L; -+ UINT16 device_id; -+ int flipCFIGeometry = FALSE; -+ -+ /* First, assume -+ * a single 8k sector for sector 0. This is to allow -+ * the system to perform memory mapping to the device, -+ * even though the actual physical layout is unknown. -+ * Once mapped in, the CFI query will produce all -+ * relevant information. -+ */ -+ meminfo.addr = 0L; -+ meminfo.areg = 0; -+ meminfo.nsect = 1; -+ meminfo.bank1start = 0; -+ meminfo.bank2start = 0; -+ -+ meminfo.sec[0].size = 8192; -+ meminfo.sec[0].base = 0x00000; -+ meminfo.sec[0].bank = 1; -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ -+ device_id = flash_get_device_id(); -+ -+ switch (device_id) { -+ case ID_I28F160C3B: -+ case ID_I28F320C3B: -+ case ID_I28F160C3T: -+ case ID_I28F320C3T: -+ flashFamily = FLASH_INTEL; -+ break; -+ case ID_AM29DL800B: -+ case ID_AM29LV800B: -+ case ID_AM29LV400B: -+ case ID_AM29LV160B: -+ case ID_AM29LV320B: -+ case ID_MX29LV320AB: -+ case ID_AM29LV320MB: -+ case ID_AM29DL800T: -+ case ID_AM29LV800T: -+ case ID_AM29LV160T: -+ case ID_AM29LV320T: -+ case ID_MX29LV320AT: -+ case ID_AM29LV320MT: -+ flashFamily = FLASH_AMD; -+ break; -+ case ID_SST39VF1601: -+ case ID_SST39VF3201: -+ flashFamily = FLASH_SST; -+ break; -+ default: -+ printk("Flash memory not supported! Device id = %x\n", device_id); -+ return -1; -+ } -+ -+ if (flash_get_cfi(&query, 0, flashFamily) == -1) { -+ switch(device_id) { -+ case ID_AM29LV160T: -+ case ID_AM29LV160B: -+ flash_get_cfi(&query, cfi_data_struct_29W160, flashFamily); -+ break; -+ default: -+ printk("CFI data structure not found. Device id = %x\n", device_id); -+ return -1; -+ } -+ } -+ -+ // need to determine if it top or bottom boot here -+ switch (device_id) -+ { -+ case ID_AM29DL800B: -+ case ID_AM29LV800B: -+ case ID_AM29LV400B: -+ case ID_AM29LV160B: -+ case ID_AM29LV320B: -+ case ID_MX29LV320AB: -+ case ID_AM29LV320MB: -+ case ID_I28F160C3B: -+ case ID_I28F320C3B: -+ case ID_I28F160C3T: -+ case ID_I28F320C3T: -+ case ID_SST39VF1601: -+ case ID_SST39VF3201: -+ flipCFIGeometry = FALSE; -+ break; -+ case ID_AM29DL800T: -+ case ID_AM29LV800T: -+ case ID_AM29LV160T: -+ case ID_AM29LV320T: -+ case ID_MX29LV320AT: -+ case ID_AM29LV320MT: -+ flipCFIGeometry = TRUE; -+ break; -+ default: -+ printk("Flash memory not supported! Device id = %x\n", device_id); -+ return -1; -+ } -+ -+ count=0;basecount=0L; -+ -+ if (!flipCFIGeometry) -+ { -+ for (i=0; i<query.num_erase_blocks; i++) { -+ for(j=0; j<query.erase_block[i].num_sectors; j++) { -+ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; -+ meminfo.sec[count].base = (int) basecount; -+ basecount += (int) query.erase_block[i].sector_size; -+ count++; -+ } -+ } -+ } -+ else -+ { -+ for (i = (query.num_erase_blocks - 1); i >= 0; i--) { -+ for(j=0; j<query.erase_block[i].num_sectors; j++) { -+ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; -+ meminfo.sec[count].base = (int) basecount; -+ basecount += (int) query.erase_block[i].sector_size; -+ count++; -+ } -+ } -+ } -+ -+ meminfo.nsect = count; -+ totalSize = meminfo.sec[count-1].base + meminfo.sec[count-1].size; -+ return (0); -+} -+ -+/*********************************************************************/ -+/* Flash_sector_erase_int() is identical to flash_sector_erase(), */ -+/* except it will wait until the erase is completed before returning */ -+/* control to the calling function. This can be used in cases which */ -+/* require the program to hold until a sector is erased, without */ -+/* adding the wait check external to this function. */ -+/*********************************************************************/ -+byte flash_sector_erase_int(WORD sector) -+{ -+ int i; -+ -+ for( i = 0; i < 3; i++ ) { -+ flash_command(FLASH_SERASE, sector, 0, 0); -+ if (flash_wait(sector, 0, 0xffff) == STATUS_READY) -+ break; -+ } -+ -+ return(1); -+} -+ -+/*********************************************************************/ -+/* flash_read_buf() reads buffer of data from the specified */ -+/* offset from the sector parameter. */ -+/*********************************************************************/ -+int flash_read_buf(WORD sector, int offset, -+ byte *buffer, int numbytes) -+{ -+ byte *fwp; -+ -+ fwp = (byte *)flash_get_memptr(sector); -+ -+ while (numbytes) { -+ *buffer++ = *(fwp + offset); -+ numbytes--; -+ fwp++; -+ } -+ -+ return (1); -+} -+ -+/*********************************************************************/ -+/* flash_write_buf() utilizes */ -+/* the unlock bypass mode of the flash device. This can remove */ -+/* significant overhead from the bulk programming operation, and */ -+/* when programming bulk data a sizeable performance increase can be */ -+/* observed. */ -+/*********************************************************************/ -+int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes) -+{ -+ int ret = -1; -+ int i; -+ unsigned char *p = flash_get_memptr(sector) + offset; -+ -+ /* After writing the flash block, compare the contents to the source -+ * buffer. Try to write the sector successfully up to three times. -+ */ -+ for( i = 0; i < 3; i++ ) { -+ ret = flash_write(sector, offset, buffer, numbytes); -+ if( !memcmp( p, buffer, numbytes ) ) -+ break; -+ /* Erase and try again */ -+ flash_sector_erase_int(sector); -+ ret = -1; -+ } -+ -+ if( ret == -1 ) -+ printk( "Flash write error. Verify failed\n" ); -+ -+ return( ret ); -+} -+ -+/*********************************************************************/ -+/* Usefull funtion to return the number of sectors in the device. */ -+/* Can be used for functions which need to loop among all the */ -+/* sectors, or wish to know the number of the last sector. */ -+/*********************************************************************/ -+int flash_get_numsectors(void) -+{ -+ return meminfo.nsect; -+} -+ -+/*********************************************************************/ -+/* flash_get_sector_size() is provided for cases in which the size */ -+/* of a sector is required by a host application. The sector size */ -+/* (in bytes) is returned in the data location pointed to by the */ -+/* 'size' parameter. */ -+/*********************************************************************/ -+int flash_get_sector_size(WORD sector) -+{ -+ return meminfo.sec[sector].size; -+} -+ -+/*********************************************************************/ -+/* The purpose of flash_get_memptr() is to return a memory pointer */ -+/* which points to the beginning of memory space allocated for the */ -+/* flash. All function pointers are then referenced from this */ -+/* pointer. */ -+/* */ -+/* Different systems will implement this in different ways: */ -+/* possibilities include: */ -+/* - A direct memory pointer */ -+/* - A pointer to a memory map */ -+/* - A pointer to a hardware port from which the linear */ -+/* address is translated */ -+/* - Output of an MMU function / service */ -+/* */ -+/* Also note that this function expects the pointer to a specific */ -+/* sector of the device. This can be provided by dereferencing */ -+/* the pointer from a translated offset of the sector from a */ -+/* global base pointer (e.g. flashptr = base_pointer + sector_offset)*/ -+/* */ -+/* Important: Many AMD flash devices need both bank and or sector */ -+/* address bits to be correctly set (bank address bits are A18-A16, */ -+/* and sector address bits are A18-A12, or A12-A15). Flash parts */ -+/* which do not need these bits will ignore them, so it is safe to */ -+/* assume that every part will require these bits to be set. */ -+/*********************************************************************/ -+unsigned char *flash_get_memptr(WORD sector) -+{ -+ unsigned char *memptr = (unsigned char*)(FLASH_BASE_ADDR_REG + meminfo.sec[sector].base); -+ -+ return (memptr); -+} -+ -+/*********************************************************************/ -+/* The purpose of flash_get_blk() is to return a the block number */ -+/* for a given memory address. */ -+/*********************************************************************/ -+int flash_get_blk(int addr) -+{ -+ int blk_start, i; -+ int last_blk = flash_get_numsectors(); -+ int relative_addr = addr - (int) FLASH_BASE_ADDR_REG; -+ -+ for(blk_start=0, i=0; i < relative_addr && blk_start < last_blk; blk_start++) -+ i += flash_get_sector_size(blk_start); -+ -+ if( i > relative_addr ) -+ { -+ blk_start--; // last blk, dec by 1 -+ } -+ else -+ if( blk_start == last_blk ) -+ { -+ printk("Address is too big.\n"); -+ blk_start = -1; -+ } -+ -+ return( blk_start ); -+} -+ -+/************************************************************************/ -+/* The purpose of flash_get_total_size() is to return the total size of */ -+/* the flash */ -+/************************************************************************/ -+int flash_get_total_size() -+{ -+ return totalSize; -+} -+ -+/*********************************************************************/ -+/* Flash_command() is the main driver function. It performs */ -+/* every possible command available to AMD B revision */ -+/* flash parts. Note that this command is not used directly, but */ -+/* rather called through the API wrapper functions provided below. */ -+/*********************************************************************/ -+static void flash_command(int command, WORD sector, int offset, UINT16 data) -+{ -+ volatile UINT16 *flashptr; -+ volatile UINT16 *flashbase; -+ -+ flashptr = (UINT16 *) flash_get_memptr(sector); -+ flashbase = (UINT16 *) flash_get_memptr(0); -+ -+ switch (flashFamily) { -+ case FLASH_UNDEFINED: -+ /* These commands should work for AMD, Intel and SST flashes */ -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xF0; -+ flashptr[0] = 0xFF; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0x5555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AAA] = 0x55; /* unlock 2 */ -+ flashptr[0x5555] = 0x90; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_AMD: -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xF0; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashptr[0x55] = 0x98; -+ break; -+ case FLASH_UB: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x20; -+ break; -+ case FLASH_PROG: -+ flashptr[0] = 0xA0; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_UBRESET: -+ flashptr[0] = 0x90; -+ flashptr[0] = 0x00; -+ break; -+ case FLASH_SERASE: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x80; -+ flashptr[0x555] = 0xAA; -+ flashptr[0x2AA] = 0x55; -+ flashptr[0] = 0x30; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_INTEL: -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xFF; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashptr[0] = 0x98; -+ break; -+ case FLASH_PROG: -+ flashptr[0] = 0x40; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_SERASE: -+ flashptr[0] = 0x60; -+ flashptr[0] = 0xD0; -+ flashptr[0] = 0x20; -+ flashptr[0] = 0xD0; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_SST: -+ switch (command) { -+ case FLASH_RESET: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0xf0; -+ break; -+ case FLASH_READ_ID: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x98; -+ break; -+ case FLASH_UB: -+ break; -+ case FLASH_PROG: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0xa0; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_UBRESET: -+ break; -+ case FLASH_SERASE: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x80; -+ flashbase[0x5555] = 0xAA; -+ flashbase[0x2AAA] = 0x55; -+ flashptr[0] = 0x30; -+ break; -+ default: -+ break; -+ } -+ break; -+ default: -+ break; -+ } -+} -+ -+/*********************************************************************/ -+/* flash_write extends the functionality of flash_program() by */ -+/* providing an faster way to program multiple data words, without */ -+/* needing the function overhead of looping algorithms which */ -+/* program word by word. This function utilizes fast pointers */ -+/* to quickly loop through bulk data. */ -+/*********************************************************************/ -+static int flash_write(WORD sector, int offset, byte *buf, int nbytes) -+{ -+ UINT16 *src; -+ src = (UINT16 *)buf; -+ -+ if ((nbytes | offset) & 1) { -+ return -1; -+ } -+ -+ flash_command(FLASH_UB, 0, 0, 0); -+ while (nbytes > 0) { -+ flash_command(FLASH_PROG, sector, offset, *src); -+ if (flash_wait(sector, offset, *src) != STATUS_READY) -+ break; -+ offset +=2; -+ nbytes -=2; -+ src++; -+ } -+ flash_command(FLASH_UBRESET, 0, 0, 0); -+ -+ return (byte*)src - buf; -+} -+ -+/*********************************************************************/ -+/* flash_wait utilizes the DQ6, DQ5, and DQ2 polling algorithms */ -+/* described in the flash data book. It can quickly ascertain the */ -+/* operational status of the flash device, and return an */ -+/* appropriate status code (defined in flash.h) */ -+/*********************************************************************/ -+static int flash_wait(WORD sector, int offset, UINT16 data) -+{ -+ volatile UINT16 *flashptr; /* flash window */ -+ UINT16 d1; -+ -+ flashptr = (UINT16 *) flash_get_memptr(sector); -+ -+ if (flashFamily == FLASH_AMD || flashFamily == FLASH_SST) { -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ do { -+ d1 = flashptr[offset/2]; -+ if (d1 == data) -+ return STATUS_READY; -+ } while (!(d1 & 0x20)); -+ -+ d1 = flashptr[offset/2]; -+ -+ if (d1 != data) { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+#else -+ do { -+ d1 = *flashptr; /* read data */ -+ d1 ^= *flashptr; /* read it again and see what toggled */ -+ if (d1 == 0) /* no toggles, nothing's happening */ -+ return STATUS_READY; -+ } while (!(d1 & 0x20)); -+ -+ d1 = *flashptr; /* read data */ -+ d1 ^= *flashptr; /* read it again and see what toggled */ -+ -+ if (d1 != 0) { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+#endif -+ } else if (flashFamily == FLASH_INTEL) { -+ flashptr[0] = 0x70; -+ /* Wait for completion */ -+ while(!(*flashptr & 0x80)); -+ if (*flashptr & 0x30) { -+ flashptr[0] = 0x50; -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+ flashptr[0] = 0x50; -+ flash_command(FLASH_RESET, 0, 0, 0); -+ } -+ -+ return STATUS_READY; -+} -+ -+/*********************************************************************/ -+/* flash_get_device_id() will perform an autoselect sequence on the */ -+/* flash device, and return the device id of the component. */ -+/* This function automatically resets to read mode. */ -+/*********************************************************************/ -+static UINT16 flash_get_device_id() -+{ -+ volatile UINT16 *fwp; /* flash window */ -+ UINT16 answer; -+ -+ fwp = (UINT16 *)flash_get_memptr(0); -+ -+ flash_command(FLASH_READ_ID, 0, 0, 0); -+ answer = *(fwp + 1); -+ if (answer == ID_AM29LV320M) { -+ answer = *(fwp + 0xe); -+ answer = *(fwp + 0xf); -+ } -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return( (UINT16) answer ); -+} -+ -+/*********************************************************************/ -+/* flash_get_cfi() is the main CFI workhorse function. Due to it's */ -+/* complexity and size it need only be called once upon */ -+/* initializing the flash system. Once it is called, all operations */ -+/* are performed by looking at the meminfo structure. */ -+/* All possible care was made to make this algorithm as efficient as */ -+/* possible. 90% of all operations are memory reads, and all */ -+/* calculations are done using bit-shifts when possible */ -+/*********************************************************************/ -+static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily) -+{ -+ volatile UINT16 *fwp; /* flash window */ -+ int i=0; -+ -+ flash_command(FLASH_CFIQUERY, 0, 0, 0); -+ -+ if (cfi_struct == 0) -+ fwp = (UINT16 *)flash_get_memptr(0); -+ else -+ fwp = cfi_struct; -+ -+ /* Initial house-cleaning */ -+ for(i=0; i < 8; i++) { -+ query->erase_block[i].sector_size = 0; -+ query->erase_block[i].num_sectors = 0; -+ } -+ -+ /* If not 'QRY', then we dont have a CFI enabled device in the socket */ -+ if( fwp[0x10] != 'Q' && -+ fwp[0x11] != 'R' && -+ fwp[0x12] != 'Y') { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return(-1); -+ } -+ -+ query->num_erase_blocks = fwp[0x2C]; -+ if(flashFamily == FLASH_SST) -+ query->num_erase_blocks = 1; -+ -+ for(i=0; i < query->num_erase_blocks; i++) { -+ query->erase_block[i].num_sectors = fwp[(0x2D+(4*i))] + (fwp[0x2E + (4*i)] << 8); -+ query->erase_block[i].num_sectors++; -+ query->erase_block[i].sector_size = 256 * (256 * fwp[(0x30+(4*i))] + fwp[(0x2F+(4*i))]); -+ } -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return(1); -+} -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.h ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/bcm96348/cfiflash.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,150 @@ -+/************************************************************************/ -+/* */ -+/* AMD CFI Enabled Flash Memory Drivers */ -+/* File name: CFIFLASH.H */ -+/* Revision: 1.0 5/07/98 */ -+/* */ -+/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ -+/* This software is unpublished and contains the trade secrets and */ -+/* confidential proprietary information of AMD. Unless otherwise */ -+/* provided in the Software Agreement associated herewith, it is */ -+/* licensed in confidence "AS IS" and is not to be reproduced in whole */ -+/* or part by any means except for backup. Use, duplication, or */ -+/* disclosure by the Government is subject to the restrictions in */ -+/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ -+/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ -+/* Software owned by */ -+/* Advanced Micro Devices, Inc., */ -+/* One AMD Place, */ -+/* P.O. Box 3453 */ -+/* Sunnyvale, CA 94088-3453. */ -+/************************************************************************/ -+/* This software constitutes a basic shell of source code for */ -+/* programming all AMD Flash components. AMD */ -+/* will not be responsible for misuse or illegal use of this */ -+/* software for devices not supported herein. AMD is providing */ -+/* this source code "AS IS" and will not be responsible for */ -+/* issues arising from incorrect user implementation of the */ -+/* source code herein. It is the user's responsibility to */ -+/* properly design-in this source code. */ -+/* */ -+/************************************************************************/ -+#ifndef _CFIFLASH_H -+#define _CFIFLASH_H -+ -+#if defined __cplusplus -+extern "C" { -+#endif -+ -+/* include board/CPU specific definitions */ -+#include "bcmtypes.h" -+#include "board.h" -+ -+#define FLASH_BASE_ADDR_REG FLASH_BASE -+ -+#ifndef NULL -+#define NULL 0 -+#endif -+ -+#define MAXSECTORS 1024 /* maximum number of sectors supported */ -+ -+/* A structure for identifying a flash part. There is one for each -+ * of the flash part definitions. We need to keep track of the -+ * sector organization, the address register used, and the size -+ * of the sectors. -+ */ -+struct flashinfo { -+ char *name; /* "Am29DL800T", etc. */ -+ unsigned long addr; /* physical address, once translated */ -+ int areg; /* Can be set to zero for all parts */ -+ int nsect; /* # of sectors -- 19 in LV, 22 in DL */ -+ int bank1start; /* first sector # in bank 1 */ -+ int bank2start; /* first sector # in bank 2, if DL part */ -+ struct { -+ long size; /* # of bytes in this sector */ -+ long base; /* offset from beginning of device */ -+ int bank; /* 1 or 2 for DL; 1 for LV */ -+ } sec[MAXSECTORS]; /* per-sector info */ -+}; -+ -+/* -+ * This structure holds all CFI query information as defined -+ * in the JEDEC standard. All information up to -+ * primary_extended_query is standard among all manufactures -+ * with CFI enabled devices. -+ */ -+ -+struct cfi_query { -+ int num_erase_blocks; /* Number of sector defs. */ -+ struct { -+ unsigned long sector_size; /* byte size of sector */ -+ int num_sectors; /* Num sectors of this size */ -+ } erase_block[8]; /* Max of 256, but 8 is good */ -+}; -+ -+/* Standard Boolean declarations */ -+#define TRUE 1 -+#define FALSE 0 -+ -+/* Define different type of flash */ -+#define FLASH_UNDEFINED 0 -+#define FLASH_AMD 1 -+#define FLASH_INTEL 2 -+#define FLASH_SST 3 -+ -+/* Command codes for the flash_command routine */ -+#define FLASH_RESET 0 /* reset to read mode */ -+#define FLASH_READ_ID 1 /* read device ID */ -+#define FLASH_CFIQUERY 2 /* CFI query */ -+#define FLASH_UB 3 /* go into unlock bypass mode */ -+#define FLASH_PROG 4 /* program a word */ -+#define FLASH_UBRESET 5 /* reset to read mode from unlock bypass mode */ -+#define FLASH_SERASE 6 /* sector erase */ -+ -+/* Return codes from flash_status */ -+#define STATUS_READY 0 /* ready for action */ -+#define STATUS_TIMEOUT 1 /* operation timed out */ -+ -+/* A list of AMD compatible device ID's - add others as needed */ -+#define ID_AM29DL800T 0x224A -+#define ID_AM29DL800B 0x22CB -+#define ID_AM29LV800T 0x22DA -+#define ID_AM29LV800B 0x225B -+#define ID_AM29LV400B 0x22BA -+ -+#define ID_AM29LV160B 0x2249 -+#define ID_AM29LV160T 0x22C4 -+ -+#define ID_AM29LV320T 0x22F6 -+#define ID_MX29LV320AT 0x22A7 -+#define ID_AM29LV320B 0x22F9 -+#define ID_MX29LV320AB 0x22A8 -+ -+#define ID_AM29LV320M 0x227E -+#define ID_AM29LV320MB 0x2200 -+#define ID_AM29LV320MT 0x2201 -+ -+#define ID_SST39VF1601 0x234B -+#define ID_SST39VF3201 0x235B -+ -+/* A list of Intel compatible device ID's - add others as needed */ -+#define ID_I28F160C3T 0x88C2 -+#define ID_I28F160C3B 0x88C3 -+#define ID_I28F320C3T 0x88C4 -+#define ID_I28F320C3B 0x88C5 -+ -+extern byte flash_init(void); -+extern int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes); -+extern int flash_read_buf(WORD sector, int offset, byte *buffer, int numbytes); -+extern byte flash_sector_erase_int(WORD sector); -+extern int flash_get_numsectors(void); -+extern int flash_get_sector_size(WORD sector); -+extern int flash_get_total_size(void); -+extern unsigned char *flash_get_memptr(WORD sector); -+extern int flash_get_blk(int addr); -+ -+#if defined __cplusplus -+} -+#endif -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/Makefile ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/Makefile 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,17 @@ -+# Makefile for the bcm963xx board drivers -+# -+ -+ -+obj-y := board.o cfiflash.o bcm63xx_flash.o bcm63xx_led.o -+ -+EXTRA_CFLAGS += -I. -I$(INC_BRCMBOARDPARMS_PATH)/$(BRCM_BOARD) -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+ -+ifeq ($(strip $(WIRELESS)),1) -+ EXTRA_CFLAGS += -DWIRELESS -+endif -+ -+-include $(TOPDIR)/Rules.make -+ -+clean: -+ rm -f core *.o *.a *.s -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_flash.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_flash.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_flash.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,775 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ *************************************************************************** -+ * File Name : bcm63xx_flash.c -+ * -+ * Description: This file contains the flash device driver APIs for bcm63xx board. -+ * -+ * Created on : 8/10/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) -+ * -+ ***************************************************************************/ -+ -+ -+/* Includes. */ -+#include <linux/fs.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <asm/uaccess.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#define BCMTAG_EXE_USE -+#include <bcmTag.h> -+#include "cfiflash.h" -+#include "boardparms.h" -+ -+//#define DEBUG_FLASH -+ -+static FLASH_ADDR_INFO fInfo; -+static int flashInitialized = 0; -+ -+void *retriedKmalloc(size_t size) -+{ -+ void *pBuf; -+ int tryCount = 0; -+ -+ // try 1000 times before quit -+ while (((pBuf = kmalloc(size, GFP_KERNEL)) == NULL) && (tryCount++ < 1000)) -+ { -+ current->state = TASK_INTERRUPTIBLE; -+ schedule_timeout(HZ/10); -+ } -+ if (tryCount >= 1000) -+ pBuf = NULL; -+ else -+ memset(pBuf, 0, size); -+ -+ return pBuf; -+} -+ -+void retriedKfree(void *pBuf) -+{ -+ kfree(pBuf); -+} -+ -+/*************************************************************************** -+// Function Name: getCrc32 -+// Description : caculate the CRC 32 of the given data. -+// Parameters : pdata - array of data. -+// size - number of input data bytes. -+// crc - either CRC32_INIT_VALUE or previous return value. -+// Returns : crc. -+****************************************************************************/ -+UINT32 getCrc32(byte *pdata, UINT32 size, UINT32 crc) -+{ -+ while (size-- > 0) -+ crc = (crc >> 8) ^ Crc32_table[(crc ^ *pdata++) & 0xff]; -+ -+ return crc; -+} -+ -+// get the nvram start addr -+// -+unsigned long get_nvram_start_addr(void) -+{ -+ return ((unsigned long) -+ (flash_get_memptr(fInfo.flash_nvram_start_blk) + fInfo.flash_nvram_blk_offset)); -+} -+ -+// get the scratch_pad start addr -+// -+unsigned long get_scratch_pad_start_addr(void) -+{ -+ return ((unsigned long) -+ (flash_get_memptr(fInfo.flash_scratch_pad_start_blk) + fInfo.flash_scratch_pad_blk_offset)); -+} -+ -+ -+ -+/* ********************************************************************* -+ * kerSysImageTagGet() -+ * Get the image tag -+ * Input parameters: -+ * none -+ * Return value: -+ * point to tag -- Found -+ * NULL -- failed -+ ********************************************************************* */ -+PFILE_TAG kerSysImageTagGet(void) -+{ -+ int i; -+ int totalBlks = flash_get_numsectors(); -+ UINT32 crc; -+ unsigned char *sectAddr; -+ PFILE_TAG pTag; -+ -+#if defined(DEBUG_FLASH) -+ printk("totalblks in tagGet=%d\n", totalBlks); -+#endif -+ -+ // start from 2nd blk, assume 1st one is always CFE -+ for (i = 1; i < totalBlks; i++) -+ { -+ sectAddr = flash_get_memptr((byte) i); -+ crc = CRC32_INIT_VALUE; -+ crc = getCrc32(sectAddr, (UINT32)TAG_LEN-TOKEN_LEN, crc); -+ pTag = (PFILE_TAG) sectAddr; -+ -+#if defined(DEBUG_FLASH) -+ printk("Check Tag crc on blk [%d]\n", i); -+#endif -+ -+ if (crc == (UINT32)(*(UINT32*)(pTag->tagValidationToken))) -+ return pTag; -+ } -+ -+ return (PFILE_TAG) NULL; -+} -+ -+// Initialize the flash and fill out the fInfo structure -+void kerSysFlashInit( void ) -+{ -+ int i = 0; -+ int totalBlks = 0; -+ int totalSize = 0; -+ int startAddr = 0; -+ int usedBlkSize = 0; -+ NVRAM_DATA nvramData; -+ UINT32 crc = CRC32_INIT_VALUE, savedCrc; -+ PFILE_TAG pTag = NULL; -+ unsigned long kernelEndAddr = 0; -+ unsigned long spAddr = 0; -+ -+ if (flashInitialized) -+ return; -+ -+ flashInitialized = 1; -+ flash_init(); -+ -+ totalBlks = flash_get_numsectors(); -+ totalSize = flash_get_total_size(); -+ -+ printk("Total Flash size: %dK with %d sectors\n", totalSize/1024, totalBlks); -+ -+ /* nvram is always at the end of flash */ -+ fInfo.flash_nvram_length = FLASH45_LENGTH_NVRAM; -+ fInfo.flash_nvram_start_blk = 0; /* always the first block */ -+ fInfo.flash_nvram_number_blk = 1; /*always fits in the first block */ -+ fInfo.flash_nvram_blk_offset = NVRAM_DATA_OFFSET; -+ -+ // check nvram CRC -+ memcpy((char *)&nvramData, (char *)get_nvram_start_addr(), sizeof(NVRAM_DATA)); -+ savedCrc = nvramData.ulCheckSum; -+ nvramData.ulCheckSum = 0; -+ crc = getCrc32((char *)&nvramData, (UINT32) sizeof(NVRAM_DATA), crc); -+ -+ BpSetBoardId( nvramData.szBoardId ); -+ -+ fInfo.flash_persistent_length = NVRAM_PSI_DEFAULT; -+ if (savedCrc != crc) -+ { -+ printk("***Board is not initialized****: Using the default PSI size: %d\n", -+ fInfo.flash_persistent_length); -+ } -+ else -+ { -+ unsigned long ulPsiSize; -+ if( BpGetPsiSize( &ulPsiSize ) == BP_SUCCESS ) -+ fInfo.flash_persistent_length = ulPsiSize; -+ else -+ { -+ printk("***Board id is not set****: Using the default PSI size: %d\n", -+ fInfo.flash_persistent_length); -+ } -+ } -+ -+ fInfo.flash_persistent_length *= ONEK; -+ startAddr = totalSize - fInfo.flash_persistent_length; -+ fInfo.flash_persistent_start_blk = flash_get_blk(startAddr+FLASH_BASE_ADDR_REG); -+ fInfo.flash_persistent_number_blk = totalBlks - fInfo.flash_persistent_start_blk; -+ // save abs SP address (Scratch Pad). it is before PSI -+ spAddr = startAddr - SP_MAX_LEN ; -+ // find out the offset in the start_blk -+ usedBlkSize = 0; -+ for (i = fInfo.flash_persistent_start_blk; -+ i < (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk); i++) -+ { -+ usedBlkSize += flash_get_sector_size((byte) i); -+ } -+ fInfo.flash_persistent_blk_offset = usedBlkSize - fInfo.flash_persistent_length; -+ -+ // get the info for sp -+ if (!(pTag = kerSysImageTagGet())) -+ { -+ printk("Failed to read image tag from flash\n"); -+ return; -+ } -+ kernelEndAddr = (unsigned long) simple_strtoul(pTag->kernelAddress, NULL, 10) + \ -+ (unsigned long) simple_strtoul(pTag->kernelLen, NULL, 10); -+ -+ // make suer sp does not share kernel block -+ fInfo.flash_scratch_pad_start_blk = flash_get_blk(spAddr+FLASH_BASE_ADDR_REG); -+ if (fInfo.flash_scratch_pad_start_blk != flash_get_blk(kernelEndAddr)) -+ { -+ fInfo.flash_scratch_pad_length = SP_MAX_LEN; -+ if (fInfo.flash_persistent_start_blk == fInfo.flash_scratch_pad_start_blk) // share blk -+ { -+#if 1 /* do not used scratch pad unless it's in its own sector */ -+ printk("Scratch pad is not used for this flash part.\n"); -+ fInfo.flash_scratch_pad_length = 0; // no sp -+#else /* allow scratch pad to share a sector with another section such as PSI */ -+ fInfo.flash_scratch_pad_number_blk = 1; -+ fInfo.flash_scratch_pad_blk_offset = fInfo.flash_persistent_blk_offset - fInfo.flash_scratch_pad_length; -+#endif -+ } -+ else // on different blk -+ { -+ fInfo.flash_scratch_pad_number_blk = fInfo.flash_persistent_start_blk\ -+ - fInfo.flash_scratch_pad_start_blk; -+ // find out the offset in the start_blk -+ usedBlkSize = 0; -+ for (i = fInfo.flash_scratch_pad_start_blk; -+ i < (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk); i++) -+ usedBlkSize += flash_get_sector_size((byte) i); -+ fInfo.flash_scratch_pad_blk_offset = usedBlkSize - fInfo.flash_scratch_pad_length; -+ } -+ } -+ else -+ { -+ printk("No flash for scratch pad!\n"); -+ fInfo.flash_scratch_pad_length = 0; // no sp -+ } -+ -+#if defined(DEBUG_FLASH) -+ printk("fInfo.flash_scratch_pad_start_blk = %d\n", fInfo.flash_scratch_pad_start_blk); -+ printk("fInfo.flash_scratch_pad_number_blk = %d\n", fInfo.flash_scratch_pad_number_blk); -+ printk("fInfo.flash_scratch_pad_length = 0x%x\n", fInfo.flash_scratch_pad_length); -+ printk("fInfo.flash_scratch_pad_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_scratch_pad_blk_offset); -+ -+ printk("fInfo.flash_nvram_start_blk = %d\n", fInfo.flash_nvram_start_blk); -+ printk("fInfo.flash_nvram_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_nvram_blk_offset); -+ printk("fInfo.flash_nvram_number_blk = %d\n", fInfo.flash_nvram_number_blk); -+ -+ printk("psi startAddr = %x\n", startAddr+FLASH_BASE_ADDR_REG); -+ printk("fInfo.flash_persistent_start_blk = %d\n", fInfo.flash_persistent_start_blk); -+ printk("fInfo.flash_persistent_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_persistent_blk_offset); -+ printk("fInfo.flash_persistent_number_blk = %d\n", fInfo.flash_persistent_number_blk); -+#endif -+ -+} -+ -+ -+ -+/*********************************************************************** -+ * Function Name: kerSysFlashAddrInfoGet -+ * Description : Fills in a structure with information about the NVRAM -+ * and persistent storage sections of flash memory. -+ * Fro physmap.c to mount the fs vol. -+ * Returns : None. -+ ***********************************************************************/ -+void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info) -+{ -+ pflash_addr_info->flash_nvram_blk_offset = fInfo.flash_nvram_blk_offset; -+ pflash_addr_info->flash_nvram_length = fInfo.flash_nvram_length; -+ pflash_addr_info->flash_nvram_number_blk = fInfo.flash_nvram_number_blk; -+ pflash_addr_info->flash_nvram_start_blk = fInfo.flash_nvram_start_blk; -+ pflash_addr_info->flash_persistent_blk_offset = fInfo.flash_persistent_blk_offset; -+ pflash_addr_info->flash_persistent_length = fInfo.flash_persistent_length; -+ pflash_addr_info->flash_persistent_number_blk = fInfo.flash_persistent_number_blk; -+ pflash_addr_info->flash_persistent_start_blk = fInfo.flash_persistent_start_blk; -+} -+ -+ -+// get shared blks into *** pTempBuf *** which has to be released bye the caller! -+// return: if pTempBuf != NULL, poits to the data with the dataSize of the buffer -+// !NULL -- ok -+// NULL -- fail -+static char *getSharedBlks(int start_blk, int end_blk) -+{ -+ int i = 0; -+ int usedBlkSize = 0; -+ int sect_size = 0; -+ char *pTempBuf = NULL; -+ char *pBuf = NULL; -+ -+ for (i = start_blk; i < end_blk; i++) -+ usedBlkSize += flash_get_sector_size((byte) i); -+ -+#if defined(DEBUG_FLASH) -+ printk("usedBlkSize = %d\n", usedBlkSize); -+#endif -+ -+ if ((pTempBuf = (char *) retriedKmalloc(usedBlkSize)) == NULL) -+ { -+ printk("failed to allocate memory with size: %d\n", usedBlkSize); -+ return pTempBuf; -+ } -+ -+ pBuf = pTempBuf; -+ for (i = start_blk; i < end_blk; i++) -+ { -+ sect_size = flash_get_sector_size((byte) i); -+ -+#if defined(DEBUG_FLASH) -+ printk("i = %d, sect_size = %d, end_blk = %d\n", i, sect_size, end_blk); -+#endif -+ flash_read_buf((byte)i, 0, pBuf, sect_size); -+ pBuf += sect_size; -+ } -+ -+ return pTempBuf; -+} -+ -+ -+ -+// Set the pTempBuf to flash from start_blk to end_blk -+// return: -+// 0 -- ok -+// -1 -- fail -+static int setSharedBlks(int start_blk, int end_blk, char *pTempBuf) -+{ -+ int i = 0; -+ int sect_size = 0; -+ int sts = 0; -+ char *pBuf = pTempBuf; -+ -+ for (i = start_blk; i < end_blk; i++) -+ { -+ sect_size = flash_get_sector_size((byte) i); -+ flash_sector_erase_int(i); -+ if (flash_write_buf(i, 0, pBuf, sect_size) != sect_size) -+ { -+ printk("Error writing flash sector %d.", i); -+ sts = -1; -+ break; -+ } -+ pBuf += sect_size; -+ } -+ -+ return sts; -+} -+ -+ -+ -+/******************************************************************************* -+ * NVRAM functions -+ *******************************************************************************/ -+ -+// get nvram data -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysNvRamGet(char *string, int strLen, int offset) -+{ -+ char *pBuf = NULL; -+ -+ if (!flashInitialized) -+ kerSysFlashInit(); -+ -+ if (strLen > FLASH45_LENGTH_NVRAM) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) -+ return -1; -+ -+ // get string off the memory buffer -+ memcpy(string, (pBuf + fInfo.flash_nvram_blk_offset + offset), strLen); -+ -+ retriedKfree(pBuf); -+ -+ return 0; -+} -+ -+ -+// set nvram -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysNvRamSet(char *string, int strLen, int offset) -+{ -+ int sts = 0; -+ char *pBuf = NULL; -+ -+ if (strLen > FLASH45_LENGTH_NVRAM) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) -+ return -1; -+ -+ // set string to the memory buffer -+ memcpy((pBuf + fInfo.flash_nvram_blk_offset + offset), string, strLen); -+ -+ if (setSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_number_blk + fInfo.flash_nvram_start_blk), pBuf) != 0) -+ sts = -1; -+ -+ retriedKfree(pBuf); -+ -+ return sts; -+} -+ -+ -+/*********************************************************************** -+ * Function Name: kerSysEraseNvRam -+ * Description : Erase the NVRAM storage section of flash memory. -+ * Returns : 1 -- ok, 0 -- fail -+ ***********************************************************************/ -+int kerSysEraseNvRam(void) -+{ -+ int sts = 1; -+ char *tempStorage = retriedKmalloc(FLASH45_LENGTH_NVRAM); -+ -+ // just write the whole buf with '0xff' to the flash -+ if (!tempStorage) -+ sts = 0; -+ else -+ { -+ memset(tempStorage, 0xff, FLASH45_LENGTH_NVRAM); -+ if (kerSysNvRamSet(tempStorage, FLASH45_LENGTH_NVRAM, 0) != 0) -+ sts = 0; -+ retriedKfree(tempStorage); -+ } -+ -+ return sts; -+} -+ -+ -+/******************************************************************************* -+ * PSI functions -+ *******************************************************************************/ -+// get psi data -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysPersistentGet(char *string, int strLen, int offset) -+{ -+ char *pBuf = NULL; -+ -+ if (strLen > fInfo.flash_persistent_length) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) -+ return -1; -+ -+ // get string off the memory buffer -+ memcpy(string, (pBuf + fInfo.flash_persistent_blk_offset + offset), strLen); -+ -+ retriedKfree(pBuf); -+ -+ return 0; -+} -+ -+ -+// set psi -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysPersistentSet(char *string, int strLen, int offset) -+{ -+ int sts = 0; -+ char *pBuf = NULL; -+ -+ if (strLen > fInfo.flash_persistent_length) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) -+ return -1; -+ -+ // set string to the memory buffer -+ memcpy((pBuf + fInfo.flash_persistent_blk_offset + offset), string, strLen); -+ -+ if (setSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_number_blk + fInfo.flash_persistent_start_blk), pBuf) != 0) -+ sts = -1; -+ -+ retriedKfree(pBuf); -+ -+ return sts; -+} -+ -+ -+// flash bcm image -+// return: -+// 0 - ok -+// !0 - the sector number fail to be flashed (should not be 0) -+int kerSysBcmImageSet( int flash_start_addr, char *string, int size) -+{ -+ int sts; -+ int sect_size; -+ int blk_start; -+ int i; -+ char *pTempBuf = NULL; -+ int whole_image = 0; -+ -+ blk_start = flash_get_blk(flash_start_addr); -+ if( blk_start < 0 ) -+ return( -1 ); -+ -+ if (flash_start_addr == FLASH_BASE && size > FLASH45_LENGTH_BOOT_ROM) -+ whole_image = 1; -+ -+ /* write image to flash memory */ -+ do -+ { -+ sect_size = flash_get_sector_size(blk_start); -+// NOTE: for memory problem in multiple PVC configuration, temporary get rid of kmalloc this 64K for now. -+// if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) -+// { -+// printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); -+// kerSysMipsSoftReset(); // reset the board right away. -+// } -+ // for whole image, no check on psi -+ if (!whole_image && blk_start == fInfo.flash_persistent_start_blk) // share the blk with psi -+ { -+ if (size > (sect_size - fInfo.flash_persistent_length)) -+ { -+ printk("Image is too big\n"); -+ break; // image is too big. Can not overwrite to nvram -+ } -+ if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) -+ { -+ printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); -+ kerSysMipsSoftReset(); // reset the board right away. -+ } -+ flash_read_buf((byte)blk_start, 0, pTempBuf, sect_size); -+ if (copy_from_user((void *)pTempBuf,(void *)string, size) != 0) -+ break; // failed ? -+ flash_sector_erase_int(blk_start); // erase blk before flash -+ if (flash_write_buf(blk_start, 0, pTempBuf, sect_size) == sect_size) -+ size = 0; // break out and say all is ok -+ retriedKfree(pTempBuf); -+ break; -+ } -+ -+ flash_sector_erase_int(blk_start); // erase blk before flash -+ -+ if (sect_size > size) -+ { -+ if (size & 1) -+ size++; -+ sect_size = size; -+ } -+ -+ if ((i = flash_write_buf(blk_start, 0, string, sect_size)) != sect_size) { -+ break; -+ } -+ blk_start++; -+ string += sect_size; -+ size -= sect_size; -+ } while (size > 0); -+ -+ if (whole_image) -+ { -+ // If flashing a whole image, erase to end of flash. -+ int total_blks = flash_get_numsectors(); -+ while( blk_start < total_blks ) -+ { -+ flash_sector_erase_int(blk_start); -+ blk_start++; -+ } -+ } -+ if (pTempBuf) -+ retriedKfree(pTempBuf); -+ -+ if( size == 0 ) -+ sts = 0; // ok -+ else -+ sts = blk_start; // failed to flash this sector -+ -+ return sts; -+} -+ -+/******************************************************************************* -+ * SP functions -+ *******************************************************************************/ -+// get sp data. NOTE: memcpy work here -- not using copy_from/to_user -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysScratchPadGet(char *tokenId, char *tokBuf, int bufLen) -+{ -+ PSP_HEADER pHead = NULL; -+ PSP_TOKEN pToken = NULL; -+ char *pBuf = NULL; -+ char *pShareBuf = NULL; -+ char *startPtr = NULL; -+ char *endPtr = NULL; -+ char *spEndPtr = NULL; -+ int sts = -1; -+ -+ if (fInfo.flash_scratch_pad_length == 0) -+ return sts; -+ -+ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) -+ { -+ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ -+ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); -+ return sts; -+ } -+ -+ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) -+ return sts; -+ -+ // pBuf points to SP buf -+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; -+ -+ pHead = (PSP_HEADER) pBuf; -+ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) -+ { -+ printk("Scrap pad is not initialized.\n"); -+ return sts; -+ } -+ -+ // search up to SPUsedLen for the token -+ startPtr = pBuf + sizeof(SP_HEADER); -+ endPtr = pBuf + pHead->SPUsedLen; -+ spEndPtr = pBuf + SP_MAX_LEN; -+ while (startPtr < endPtr && startPtr < spEndPtr) -+ { -+ pToken = (PSP_TOKEN) startPtr; -+ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) -+ { -+ memcpy(tokBuf, startPtr + sizeof(SP_TOKEN), bufLen); -+ sts = 0; -+ break; -+ } -+ // get next token -+ startPtr += sizeof(SP_TOKEN) + pToken->tokenLen; -+ } -+ -+ retriedKfree(pShareBuf); -+ -+ return sts; -+} -+ -+ -+// set sp. NOTE: memcpy work here -- not using copy_from/to_user -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysScratchPadSet(char *tokenId, char *tokBuf, int bufLen) -+{ -+ PSP_TOKEN pToken = NULL; -+ PSP_HEADER pHead = NULL; -+ char *pShareBuf = NULL; -+ char *pBuf = NULL; -+ SP_HEADER SPHead; -+ SP_TOKEN SPToken; -+ char *curPtr; -+ int sts = -1; -+ -+ if (fInfo.flash_scratch_pad_length == 0) -+ return sts; -+ -+ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) -+ { -+ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ -+ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); -+ return sts; -+ } -+ -+ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) -+ return sts; -+ -+ // pBuf points to SP buf -+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; -+ pHead = (PSP_HEADER) pBuf; -+ -+ // form header info. SPUsedLen later on... -+ memset((char *)&SPHead, 0, sizeof(SP_HEADER)); -+ memcpy(SPHead.SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN); -+ SPHead.SPVersion = SP_VERSION; -+ -+ // form token info. -+ memset((char*)&SPToken, 0, sizeof(SP_TOKEN)); -+ strncpy(SPToken.tokenName, tokenId, TOKEN_NAME_LEN - 1); -+ SPToken.tokenLen = bufLen; -+ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) -+ { -+ // new sp, so just flash the token -+ printk("No Scrap pad found. Initialize scratch pad...\n"); -+ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; -+ memcpy(pBuf, (char *)&SPHead, sizeof(SP_HEADER)); -+ curPtr = pBuf + sizeof(SP_HEADER); -+ memcpy(curPtr, (char *)&SPToken, sizeof(SP_TOKEN)); -+ curPtr += sizeof(SP_TOKEN); -+ memcpy(curPtr, tokBuf, bufLen); -+ } -+ else -+ { -+ // need search for the token, if exist with same size overwrite it. if sizes differ, -+ // move over the later token data over and put the new one at the end -+ char *endPtr = pBuf + pHead->SPUsedLen; -+ char *spEndPtr = pBuf + SP_MAX_LEN; -+ curPtr = pBuf + sizeof(SP_HEADER); -+ while (curPtr < endPtr && curPtr < spEndPtr) -+ { -+ pToken = (PSP_TOKEN) curPtr; -+ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) -+ { -+ if (pToken->tokenLen == bufLen) // overwirte it -+ { -+ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); -+ break; -+ } -+ else // move later data over and put the new token at the end -+ { -+ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); // ~~~ -+ break; -+ } -+ } -+ else // not same token ~~~ -+ { -+ } -+ // get next token -+ curPtr += sizeof(SP_TOKEN) + pToken->tokenLen; -+ } // end while -+ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; // ~~~ -+ if (SPHead.SPUsedLen > SP_MAX_LEN) -+ { -+ printk("No more Scratch pad space left! Over limit by %d bytes\n", SPHead.SPUsedLen - SP_MAX_LEN); -+ return sts; -+ } -+ -+ } // else if not new sp -+ -+ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf); -+ -+ retriedKfree(pShareBuf); -+ -+ return sts; -+ -+ -+} -+ -+int kerSysFlashSizeGet(void) -+{ -+ return flash_get_total_size(); -+} -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_led.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_led.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/bcm63xx_led.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,582 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/*************************************************************************** -+ * File Name : bcm63xx_led.c -+ * -+ * Description: -+ * -+ * This file contains bcm963xx board led control API functions. -+ * -+ * To use it, do the following -+ * -+ * 1). define in the board.c the following led mappping (this is for 6345GW board): -+ * const LED_MAP_PAIR cLedMapping45GW[] = -+ * { // led name Initial state physical pin (ledMask) -+ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, -+ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, -+ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 -+ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, -+ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, -+ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. -+ * -+ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping -+ * pointer from the above struct -+ * -+ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); -+ * -+ * 3). Sample call for kernel mode: -+ * -+ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h -+ * -+ * 4). Sample call for user mode -+ * -+ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h -+ * -+ * -+ * Created on : 10/28/2002 seanl -+ * -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include <linux/init.h> -+#include <linux/fs.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <linux/netdevice.h> -+#include <asm/uaccess.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+ -+#define k100ms (HZ / 10) // ~100 ms -+#define kFastBlinkCount 0 // ~100ms -+#define kSlowBlinkCount 5 // ~600ms -+ -+#define MAX_VIRT_LEDS 12 -+ -+// uncomment // for debug led -+//#define DEBUG_LED -+ -+// global variables: -+struct timer_list gLedTimer; -+int gTimerOn = FALSE; -+int gLedCount = 0; -+ -+typedef struct ledinfo -+{ -+ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 -+ unsigned short ledActiveLow; // GPIO bit reset to turn on LED -+ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 -+ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED -+ BOARD_LED_STATE ledState; // current led state -+ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState -+ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. -+} LED_INFO, *PLED_INFO; -+ -+static PLED_INFO gLed = NULL; -+static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; -+static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; -+static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; -+ -+#if 0 /* BROKEN */ -+#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+static int gLedOffInBridgeMode = 1; -+#elif defined(CONFIG_BCM96345) -+static int gLedOffInBridgeMode = 0; -+#endif -+#endif -+ -+void ledTimerExpire(void); -+int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); -+ -+//************************************************************************************** -+// LED operations -+//************************************************************************************** -+ -+// turn led on and set the ledState -+void ledOn(PLED_INFO pLed) -+{ -+ if( pLed->ledMask ) -+ { -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLow ) -+ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led -+ else -+ GPIO->GPIOio |= pLed->ledMask; // turn on the led -+ pLed->ledState = pLed->savedLedState = kLedStateOn; -+ } -+} -+ -+ -+// turn led off and set the ledState -+void ledOff(PLED_INFO pLed) -+{ -+ if( pLed->ledMask ) -+ { -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLow ) -+ GPIO->GPIOio |= pLed->ledMask; // turn off the led -+ else -+ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led -+ pLed->ledState = pLed->savedLedState = kLedStateOff; -+ } -+} -+ -+// turn led on and set the ledState -+void ledOnFail(PLED_INFO pLed) -+{ -+ if( pLed->ledMaskFail ) -+ { -+ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLowFail ) -+ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led -+ else -+ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led -+ pLed->ledState = pLed->savedLedState = kLedStateFail; -+ } -+} -+ -+ -+// turn led off and set the ledState -+void ledOffFail(PLED_INFO pLed) -+{ -+ if( pLed->ledMaskFail ) -+ { -+ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLowFail ) -+ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led -+ else -+ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led -+ pLed->ledState = pLed->savedLedState = kLedStateOff; -+ } -+} -+ -+ -+// toggle the led and return the current ledState -+BOARD_LED_STATE ledToggle(PLED_INFO pLed) -+{ -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if (GPIO->GPIOio & pLed->ledMask) -+ { -+ GPIO->GPIOio &= ~(pLed->ledMask); -+ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); -+ } -+ else -+ { -+ GPIO->GPIOio |= pLed->ledMask; -+ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); -+ } -+} -+ -+ -+// led timer. Will return if timer is already on -+void ledTimerStart(void) -+{ -+ if (gTimerOn) -+ return; -+ -+#if defined(DEBUG_LED) -+ printk("led: add_timer\n"); -+#endif -+ -+ init_timer(&gLedTimer); -+ gLedTimer.function = (void*)ledTimerExpire; -+ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms -+ add_timer (&gLedTimer); -+ gTimerOn = TRUE; -+} -+ -+ -+// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and -+// restart the timer according to ledState -+void ledTimerExpire(void) -+{ -+ int i; -+ PLED_INFO pCurLed; -+ -+ gTimerOn = FALSE; -+ -+ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) -+ { -+#if defined(DEBUG_LED) -+ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); -+#endif -+ switch (pCurLed->ledState) -+ { -+ case kLedStateOn: -+ case kLedStateOff: -+ case kLedStateFail: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ break; -+ -+ case kLedStateBlinkOnce: -+ ledToggle(pCurLed); -+ pCurLed->blinkCountDown = 0; // reset to 0 -+ pCurLed->ledState = pCurLed->savedLedState; -+ if (pCurLed->ledState == kLedStateSlowBlinkContinues || -+ pCurLed->ledState == kLedStateFastBlinkContinues) -+ ledTimerStart(); // start timer if in blinkContinues stats -+ break; -+ -+ case kLedStateSlowBlinkContinues: -+ if (pCurLed->blinkCountDown-- == 0) -+ { -+ pCurLed->blinkCountDown = kSlowBlinkCount; -+ ledToggle(pCurLed); -+ } -+ ledTimerStart(); -+ break; -+ -+ case kLedStateFastBlinkContinues: -+ if (pCurLed->blinkCountDown-- == 0) -+ { -+ pCurLed->blinkCountDown = kFastBlinkCount; -+ ledToggle(pCurLed); -+ } -+ ledTimerStart(); -+ break; -+ -+ default: -+ printk("Invalid state = %d\n", pCurLed->ledState); -+ } -+ } -+} -+ -+// initialize the gLedCount and allocate and fill gLed struct -+void __init boardLedInit(PLED_MAP_PAIR cLedMapping) -+{ -+ PLED_MAP_PAIR p1, p2; -+ PLED_INFO pCurLed; -+ int needTimer = FALSE; -+ int alreadyUsed = 0; -+ -+#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ -+ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; -+ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; -+#endif -+ -+ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); -+ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); -+ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); -+ -+ gLedCount = 0; -+ -+ // Check for multiple LED names and multiple LED GPIO pins that share the -+ // same physical board LED. -+ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) -+ { -+ alreadyUsed = 0; -+ for( p2 = cLedMapping; p2 != p1; p2++ ) -+ { -+ if( (p1->ledMask && p1->ledMask == p2->ledMask) || -+ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) -+ { -+ alreadyUsed = 1; -+ break; -+ } -+ } -+ -+ if( alreadyUsed == 0 ) -+ gLedCount++; -+ } -+ -+ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); -+ if( gLed == NULL ) -+ { -+ printk( "LED memory allocation error.\n" ); -+ return; -+ } -+ -+ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); -+ -+ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led -+ // (ledMask) the first defined led's ledInitState will be used. -+ pCurLed = gLed; -+ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) -+ { -+ if( (int) p1->ledName > MAX_VIRT_LEDS ) -+ continue; -+ -+ alreadyUsed = 0; -+ for( p2 = cLedMapping; p2 != p1; p2++ ) -+ { -+ if( (p1->ledMask && p1->ledMask == p2->ledMask) || -+ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) -+ { -+ alreadyUsed = 1; -+ break; -+ } -+ } -+ -+ if( alreadyUsed == 0 ) -+ { -+ // Initialize the board LED for the first time. -+ needTimer = initLedInfo( p1, pCurLed ); -+ gpVirtLeds[(int) p1->ledName] = pCurLed; -+ pCurLed++; -+ } -+ else -+ { -+ PLED_INFO pLed; -+ for( pLed = gLed; pLed != pCurLed; pLed++ ) -+ { -+ // Find the LED_INFO structure that has already been initialized. -+ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || -+ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) -+ { -+ // The board LED has already been initialized but possibly -+ // not completely initialized. -+ if( p1->ledMask ) -+ { -+ pLed->ledMask = p1->ledMask; -+ pLed->ledActiveLow = p1->ledActiveLow; -+ } -+ if( p1->ledMaskFail ) -+ { -+ pLed->ledMaskFail = p1->ledMaskFail; -+ pLed->ledActiveLowFail = p1->ledActiveLowFail; -+ } -+ gpVirtLeds[(int) p1->ledName] = pLed; -+ break; -+ } -+ } -+ } -+ } -+ -+ if (needTimer) -+ ledTimerStart(); -+ -+#if defined(DEBUG_LED) -+ int i; -+ for (i=0; i < gLedCount; i++) -+ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); -+#endif -+ -+} -+ -+// Initialize a structure that contains information about a physical board LED -+// control. The board LED may contain more than one GPIO pin to control a -+// normal condition (green) or a failure condition (red). -+int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) -+{ -+ int needTimer = FALSE; -+ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; -+ pCurLed->ledMask = pCurMap->ledMask; -+ pCurLed->ledActiveLow = pCurMap->ledActiveLow; -+ pCurLed->ledMaskFail = pCurMap->ledMaskFail; -+ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; -+ -+ switch (pCurLed->ledState) -+ { -+ case kLedStateOn: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOn(pCurLed); -+ break; -+ case kLedStateOff: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOff(pCurLed); -+ break; -+ case kLedStateFail: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOnFail(pCurLed); -+ break; -+ case kLedStateBlinkOnce: -+ pCurLed->blinkCountDown = 1; -+ needTimer = TRUE; -+ break; -+ case kLedStateSlowBlinkContinues: -+ pCurLed->blinkCountDown = kSlowBlinkCount; -+ needTimer = TRUE; -+ break; -+ case kLedStateFastBlinkContinues: -+ pCurLed->blinkCountDown = kFastBlinkCount; -+ needTimer = TRUE; -+ break; -+ default: -+ printk("Invalid state = %d\n", pCurLed->ledState); -+ } -+ -+ return( needTimer ); -+} -+ -+#if 0 /* BROKEN */ -+// Determines if there is at least one interface in bridge mode. Bridge mode -+// is determined by the cfm convention of naming bridge interfaces nas17 -+// through nas24. -+static int isBridgedProtocol(void) -+{ -+ extern int dev_get(const char *name); -+ const int firstBridgeId = 17; -+ const int lastBridgeId = 24; -+ int i; -+ int ret = FALSE; -+ char name[16]; -+ -+ for( i = firstBridgeId; i <= lastBridgeId; i++ ) -+ { -+ sprintf( name, "nas%d", i ); -+ -+ if( dev_get(name) ) -+ { -+ ret = TRUE; -+ break; -+ } -+ } -+ -+ return(ret); -+} -+#endif -+ -+// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation -+void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) -+{ -+ PLED_INFO ledInfoPtr; -+ -+ // do the mapping from virtual to physical led -+ if( (int) ledName < MAX_VIRT_LEDS ) -+ ledInfoPtr = gpVirtLeds[(int) ledName]; -+ else -+ ledInfoPtr = NULL; -+ -+ if (ledInfoPtr == NULL) -+ return; -+ -+ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) -+ { -+ (*gLedHwFunc[(int) ledName]) (ledName, ledState); -+ ledOffFail(ledInfoPtr); -+ return; -+ } -+ else -+ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) -+ { -+ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); -+ ledOff(ledInfoPtr); -+ return; -+ } -+ -+#if 0 /* BROKEN */ -+ // Do not blink the WAN Data LED if at least one interface is in bridge mode. -+ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) -+ { -+ static int BridgedProtocol = -1; -+ -+ if( BridgedProtocol == -1 ) -+ BridgedProtocol = isBridgedProtocol(); -+ -+ if( BridgedProtocol == TRUE ) -+ return; -+ } -+#endif -+ -+ // If the state is kLedStateFail and there is not a failure LED defined -+ // in the board parameters, change the state to kLedStateFastBlinkContinues. -+ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) -+ ledState = kLedStateFastBlinkContinues; -+ -+ switch (ledState) -+ { -+ case kLedStateOn: -+ // First, turn off the complimentary (failure) LED GPIO. -+ if( ledInfoPtr->ledMaskFail ) -+ ledOffFail(ledInfoPtr); -+ else -+ if( gLedHwFailFunc[(int) ledName] ) -+ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn on the specified LED GPIO. -+ ledOn(ledInfoPtr); -+ break; -+ -+ case kLedStateOff: -+ // First, turn off the complimentary (failure) LED GPIO. -+ if( ledInfoPtr->ledMaskFail ) -+ ledOffFail(ledInfoPtr); -+ else -+ if( gLedHwFailFunc[(int) ledName] ) -+ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn off the specified LED GPIO. -+ ledOff(ledInfoPtr); -+ break; -+ -+ case kLedStateFail: -+ // First, turn off the complimentary (normal) LED GPIO. -+ if( ledInfoPtr->ledMask ) -+ ledOff(ledInfoPtr); -+ else -+ if( gLedHwFunc[(int) ledName] ) -+ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn on (red) the specified LED GPIO. -+ ledOnFail(ledInfoPtr); -+ break; -+ -+ case kLedStateBlinkOnce: -+ // skip blinkOnce if it is already in Slow/Fast blink continues state -+ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || -+ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) -+ ; -+ else -+ { -+ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 -+ { -+ ledToggle(ledInfoPtr); -+ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires -+ ledInfoPtr->ledState = kLedStateBlinkOnce; -+ ledTimerStart(); -+ } -+ } -+ break; -+ -+ case kLedStateSlowBlinkContinues: -+ ledInfoPtr->blinkCountDown = kSlowBlinkCount; -+ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; -+ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; -+ ledTimerStart(); -+ break; -+ -+ case kLedStateFastBlinkContinues: -+ ledInfoPtr->blinkCountDown = kFastBlinkCount; -+ ledInfoPtr->ledState = kLedStateFastBlinkContinues; -+ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; -+ ledTimerStart(); -+ break; -+ -+ default: -+ printk("Invalid led state\n"); -+ } -+} -+ -+// This function is called for an LED that is controlled by hardware. -+void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, -+ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) -+{ -+ if( (int) ledName < MAX_VIRT_LEDS ) -+ { -+ if( ledFailType == 1 ) -+ gLedHwFailFunc[(int) ledName] = ledHwFunc; -+ else -+ gLedHwFunc[(int) ledName] = ledHwFunc; -+ } -+} -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/board.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/board.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/board.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/board.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,1570 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/*************************************************************************** -+ * File Name : board.c -+ * -+ * Description: This file contains Linux character device driver entry -+ * for the board related ioctl calls: flash, get free kernel -+ * page and dump kernel memory, etc. -+ * -+ * Created on : 2/20/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) -+ * -+ ***************************************************************************/ -+ -+ -+/* Includes. */ -+#include <linux/version.h> -+#include <linux/init.h> -+#include <linux/fs.h> -+#include <linux/interrupt.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <linux/pagemap.h> -+#include <asm/uaccess.h> -+#include <linux/wait.h> -+#include <linux/poll.h> -+#include <linux/sched.h> -+#include <linux/list.h> -+#include <linux/if.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#include <bcmTag.h> -+#include "boardparms.h" -+#include "cfiflash.h" -+#include "bcm_intr.h" -+#include "board.h" -+#include "bcm_map_part.h" -+ -+/* Typedefs. */ -+#if defined (NON_CONSECUTIVE_MAC) -+// used to be the last octet. Now changed to the first 5 bits of the the forth octet -+// to reduced the duplicated MAC addresses. -+#define CHANGED_OCTET 3 -+#define SHIFT_BITS 3 -+#else -+#define CHANGED_OCTET 1 -+#define SHIFT_BITS 0 -+#endif -+ -+#if defined (WIRELESS) -+#define SES_BTN_PRESSED 0x00000001 -+#define SES_EVENTS SES_BTN_PRESSED /*OR all values if any*/ -+#define SES_LED_OFF 0 -+#define SES_LED_ON 1 -+#define SES_LED_BLINK 2 -+#endif -+ -+typedef struct -+{ -+ unsigned long ulId; -+ char chInUse; -+ char chReserved[3]; -+} MAC_ADDR_INFO, *PMAC_ADDR_INFO; -+ -+typedef struct -+{ -+ unsigned long ulSdramSize; -+ unsigned long ulPsiSize; -+ unsigned long ulNumMacAddrs; -+ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ MAC_ADDR_INFO MacAddrs[1]; -+} NVRAM_INFO, *PNVRAM_INFO; -+ -+typedef struct -+{ -+ unsigned long eventmask; -+} BOARD_IOC, *PBOARD_IOC; -+ -+ -+/*Dyinggasp callback*/ -+typedef void (*cb_dgasp_t)(void *arg); -+typedef struct _CB_DGASP__LIST -+{ -+ struct list_head list; -+ char name[IFNAMSIZ]; -+ cb_dgasp_t cb_dgasp_fn; -+ void *context; -+}CB_DGASP_LIST , *PCB_DGASP_LIST; -+ -+ -+static LED_MAP_PAIR LedMapping[] = -+{ // led name Initial state physical pin (ledMask) -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. -+}; -+ -+/* Externs. */ -+extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); -+extern unsigned int nr_free_pages (void); -+extern const char *get_system_type(void); -+extern void kerSysFlashInit(void); -+extern unsigned long get_nvram_start_addr(void); -+extern unsigned long get_scratch_pad_start_addr(void); -+extern unsigned long getMemorySize(void); -+extern void __init boardLedInit(PLED_MAP_PAIR); -+extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); -+extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, -+ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); -+ -+/* Prototypes. */ -+void __init InitNvramInfo( void ); -+static int board_open( struct inode *inode, struct file *filp ); -+static int board_ioctl( struct inode *inode, struct file *flip, unsigned int command, unsigned long arg ); -+static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos); -+static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait); -+static int board_release(struct inode *inode, struct file *filp); -+ -+static BOARD_IOC* borad_ioc_alloc(void); -+static void borad_ioc_free(BOARD_IOC* board_ioc); -+ -+/* DyingGasp function prototype */ -+static void __init kerSysDyingGaspMapIntr(void); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); -+#else -+static unsigned int kerSysDyingGaspIsr(void); -+#endif -+static void __init kerSysInitDyingGaspHandler( void ); -+static void __exit kerSysDeinitDyingGaspHandler( void ); -+/* -DyingGasp function prototype - */ -+ -+ -+#if defined (WIRELESS) -+static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs); -+static void __init sesBtn_mapGpio(void); -+static void __init sesBtn_mapIntr(int context); -+static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait); -+static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos); -+static void __init sesLed_mapGpio(void); -+static void sesLed_ctrl(int action); -+static void __init ses_board_init(void); -+static void __exit ses_board_deinit(void); -+#endif -+ -+static PNVRAM_INFO g_pNvramInfo = NULL; -+static int g_ledInitialized = 0; -+static wait_queue_head_t g_board_wait_queue; -+static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; -+ -+static int g_wakeup_monitor = 0; -+static struct file *g_monitor_file = NULL; -+static struct task_struct *g_monitor_task = NULL; -+static unsigned int (*g_orig_fop_poll) -+ (struct file *, struct poll_table_struct *) = NULL; -+ -+static struct file_operations board_fops = -+{ -+ open: board_open, -+ ioctl: board_ioctl, -+ poll: board_poll, -+ read: board_read, -+ release: board_release, -+}; -+ -+uint32 board_major = 0; -+ -+#if defined (WIRELESS) -+static unsigned short sesBtn_irq = BP_NOT_DEFINED; -+static unsigned short sesBtn_gpio = BP_NOT_DEFINED; -+static unsigned short sesLed_gpio = BP_NOT_DEFINED; -+#endif -+ -+#if defined(MODULE) -+int init_module(void) -+{ -+ return( brcm_board_init() ); -+} -+ -+void cleanup_module(void) -+{ -+ if (MOD_IN_USE) -+ printk("brcm flash: cleanup_module failed because module is in use\n"); -+ else -+ brcm_board_cleanup(); -+} -+#endif //MODULE -+ -+ -+ -+static int __init brcm_board_init( void ) -+{ -+ typedef int (*BP_LED_FUNC) (unsigned short *); -+ static struct BpLedInformation -+ { -+ BOARD_LED_NAME ledName; -+ BP_LED_FUNC bpFunc; -+ BP_LED_FUNC bpFuncFail; -+ } bpLedInfo[] = -+ {{kLedAdsl, BpGetAdslLedGpio, BpGetAdslFailLedGpio}, -+ {kLedWireless, BpGetWirelessLedGpio, NULL}, -+ {kLedUsb, BpGetUsbLedGpio, NULL}, -+ {kLedHpna, BpGetHpnaLedGpio, NULL}, -+ {kLedWanData, BpGetWanDataLedGpio, NULL}, -+ {kLedPPP, BpGetPppLedGpio, BpGetPppFailLedGpio}, -+ {kLedVoip, BpGetVoipLedGpio, NULL}, -+ {kLedSes, BpGetWirelessSesLedGpio, NULL}, -+ {kLedEnd, NULL, NULL} -+ }; -+ -+ int ret; -+ -+ ret = register_chrdev(BOARD_DRV_MAJOR, "bcrmboard", &board_fops ); -+ if (ret < 0) -+ printk( "brcm_board_init(major %d): fail to register device.\n",BOARD_DRV_MAJOR); -+ else -+ { -+ PLED_MAP_PAIR pLedMap = LedMapping; -+ unsigned short gpio; -+ struct BpLedInformation *pInfo; -+ -+ printk("brcmboard: brcm_board_init entry\n"); -+ board_major = BOARD_DRV_MAJOR; -+ InitNvramInfo(); -+ -+ for( pInfo = bpLedInfo; pInfo->ledName != kLedEnd; pInfo++ ) -+ { -+ if( pInfo->bpFunc && (*pInfo->bpFunc) (&gpio) == BP_SUCCESS ) -+ { -+ pLedMap->ledName = pInfo->ledName; -+ pLedMap->ledMask = GPIO_NUM_TO_MASK(gpio); -+ pLedMap->ledActiveLow = (gpio & BP_ACTIVE_LOW) ? 1 : 0; -+ } -+ if( pInfo->bpFuncFail && (*pInfo->bpFuncFail) (&gpio) == BP_SUCCESS ) -+ { -+ pLedMap->ledName = pInfo->ledName; -+ pLedMap->ledMaskFail = GPIO_NUM_TO_MASK(gpio); -+ pLedMap->ledActiveLowFail = (gpio & BP_ACTIVE_LOW) ? 1 : 0; -+ } -+ if( pLedMap->ledName != kLedEnd ) -+ pLedMap++; -+ } -+ -+ init_waitqueue_head(&g_board_wait_queue); -+#if defined (WIRELESS) -+ ses_board_init(); -+#endif -+ kerSysInitDyingGaspHandler(); -+ kerSysDyingGaspMapIntr(); -+ -+ boardLedInit(LedMapping); -+ g_ledInitialized = 1; -+ } -+ -+ return ret; -+} -+ -+void __init InitNvramInfo( void ) -+{ -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ unsigned long ulNumMacAddrs = pNvramData->ulNumMacAddrs; -+ -+ if( ulNumMacAddrs > 0 && ulNumMacAddrs <= NVRAM_MAC_COUNT_MAX ) -+ { -+ unsigned long ulNvramInfoSize = -+ sizeof(NVRAM_INFO) + ((sizeof(MAC_ADDR_INFO) - 1) * ulNumMacAddrs); -+ -+ g_pNvramInfo = (PNVRAM_INFO) kmalloc( ulNvramInfoSize, GFP_KERNEL ); -+ -+ if( g_pNvramInfo ) -+ { -+ unsigned long ulPsiSize; -+ if( BpGetPsiSize( &ulPsiSize ) != BP_SUCCESS ) -+ ulPsiSize = NVRAM_PSI_DEFAULT; -+ memset( g_pNvramInfo, 0x00, ulNvramInfoSize ); -+ g_pNvramInfo->ulPsiSize = ulPsiSize * 1024; -+ g_pNvramInfo->ulNumMacAddrs = pNvramData->ulNumMacAddrs; -+ memcpy( g_pNvramInfo->ucaBaseMacAddr, pNvramData->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ g_pNvramInfo->ulSdramSize = getMemorySize(); -+ } -+ else -+ printk("ERROR - Could not allocate memory for NVRAM data\n"); -+ } -+ else -+ printk("ERROR - Invalid number of MAC addresses (%ld) is configured.\n", -+ ulNumMacAddrs); -+} -+ -+void __exit brcm_board_cleanup( void ) -+{ -+ printk("brcm_board_cleanup()\n"); -+ -+ if (board_major != -1) -+ { -+#if defined (WIRELESS) -+ ses_board_deinit(); -+#endif -+ kerSysDeinitDyingGaspHandler(); -+ unregister_chrdev(board_major, "board_ioctl"); -+ } -+} -+ -+static BOARD_IOC* borad_ioc_alloc(void) -+{ -+ BOARD_IOC *board_ioc =NULL; -+ board_ioc = (BOARD_IOC*) kmalloc( sizeof(BOARD_IOC) , GFP_KERNEL ); -+ if(board_ioc) -+ { -+ memset(board_ioc, 0, sizeof(BOARD_IOC)); -+ } -+ return board_ioc; -+} -+ -+static void borad_ioc_free(BOARD_IOC* board_ioc) -+{ -+ if(board_ioc) -+ { -+ kfree(board_ioc); -+ } -+} -+ -+ -+static int board_open( struct inode *inode, struct file *filp ) -+{ -+ filp->private_data = borad_ioc_alloc(); -+ -+ if (filp->private_data == NULL) -+ return -ENOMEM; -+ -+ return( 0 ); -+} -+ -+static int board_release(struct inode *inode, struct file *filp) -+{ -+ BOARD_IOC *board_ioc = filp->private_data; -+ -+ wait_event_interruptible(g_board_wait_queue, 1); -+ borad_ioc_free(board_ioc); -+ -+ return( 0 ); -+} -+ -+ -+static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait) -+{ -+ unsigned int mask = 0; -+#if defined (WIRELESS) -+ BOARD_IOC *board_ioc = filp->private_data; -+#endif -+ -+ poll_wait(filp, &g_board_wait_queue, wait); -+#if defined (WIRELESS) -+ if(board_ioc->eventmask & SES_EVENTS){ -+ mask |= sesBtn_poll(filp, wait); -+ } -+#endif -+ -+ return mask; -+} -+ -+ -+static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) -+{ -+#if defined (WIRELESS) -+ BOARD_IOC *board_ioc = filp->private_data; -+ if(board_ioc->eventmask & SES_EVENTS){ -+ return sesBtn_read(filp, buffer, count, ppos); -+ } -+#endif -+ return 0; -+} -+ -+//************************************************************************************** -+// Utitlities for dump memory, free kernel pages, mips soft reset, etc. -+//************************************************************************************** -+ -+/*********************************************************************** -+ * Function Name: dumpaddr -+ * Description : Display a hex dump of the specified address. -+ ***********************************************************************/ -+void dumpaddr( unsigned char *pAddr, int nLen ) -+{ -+ static char szHexChars[] = "0123456789abcdef"; -+ char szLine[80]; -+ char *p = szLine; -+ unsigned char ch, *q; -+ int i, j; -+ unsigned long ul; -+ -+ while( nLen > 0 ) -+ { -+ sprintf( szLine, "%8.8lx: ", (unsigned long) pAddr ); -+ p = szLine + strlen(szLine); -+ -+ for(i = 0; i < 16 && nLen > 0; i += sizeof(long), nLen -= sizeof(long)) -+ { -+ ul = *(unsigned long *) &pAddr[i]; -+ q = (unsigned char *) &ul; -+ for( j = 0; j < sizeof(long); j++ ) -+ { -+ *p++ = szHexChars[q[j] >> 4]; -+ *p++ = szHexChars[q[j] & 0x0f]; -+ *p++ = ' '; -+ } -+ } -+ -+ for( j = 0; j < 16 - i; j++ ) -+ *p++ = ' ', *p++ = ' ', *p++ = ' '; -+ -+ *p++ = ' ', *p++ = ' ', *p++ = ' '; -+ -+ for( j = 0; j < i; j++ ) -+ { -+ ch = pAddr[j]; -+ *p++ = (ch > ' ' && ch < '~') ? ch : '.'; -+ } -+ -+ *p++ = '\0'; -+ printk( "%s\r\n", szLine ); -+ -+ pAddr += i; -+ } -+ printk( "\r\n" ); -+} /* dumpaddr */ -+ -+ -+void kerSysMipsSoftReset(void) -+{ -+#if defined(CONFIG_BCM96348) -+ if (PERF->RevID == 0x634800A1) { -+ typedef void (*FNPTR) (void); -+ FNPTR bootaddr = (FNPTR) FLASH_BASE; -+ int i; -+ -+ /* Disable interrupts. */ -+ cli(); -+ -+ /* Reset all blocks. */ -+ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; -+ for( i = 0; i < 1000000; i++ ) -+ ; -+ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; -+ /* Jump to the power on address. */ -+ (*bootaddr) (); -+ } -+ else -+ PERF->pll_control |= SOFT_RESET; // soft reset mips -+#else -+ PERF->pll_control |= SOFT_RESET; // soft reset mips -+#endif -+} -+ -+ -+int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) -+{ -+ int nRet = 0; -+ PMAC_ADDR_INFO pMai = NULL; -+ PMAC_ADDR_INFO pMaiFreeNoId = NULL; -+ PMAC_ADDR_INFO pMaiFreeId = NULL; -+ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; -+ -+ for( i = 0, pMai = g_pNvramInfo->MacAddrs; i < g_pNvramInfo->ulNumMacAddrs; -+ i++, pMai++ ) -+ { -+ if( ulId == pMai->ulId || ulId == MAC_ADDRESS_ANY ) -+ { -+ /* This MAC address has been used by the caller in the past. */ -+ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ shiftedIdx = i; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMai->chInUse = 1; -+ pMaiFreeNoId = pMaiFreeId = NULL; -+ break; -+ } -+ else -+ if( pMai->chInUse == 0 ) -+ { -+ if( pMai->ulId == 0 && pMaiFreeNoId == NULL ) -+ { -+ /* This is an available MAC address that has never been -+ * used. -+ */ -+ pMaiFreeNoId = pMai; -+ ulIdxNoId = i; -+ } -+ else -+ if( pMai->ulId != 0 && pMaiFreeId == NULL ) -+ { -+ /* This is an available MAC address that has been used -+ * before. Use addresses that have never been used -+ * first, before using this one. -+ */ -+ pMaiFreeId = pMai; -+ ulIdxId = i; -+ } -+ } -+ } -+ -+ if( pMaiFreeNoId || pMaiFreeId ) -+ { -+ /* An available MAC address was found. */ -+ memcpy(pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr,NVRAM_MAC_ADDRESS_LEN); -+ if( pMaiFreeNoId ) -+ { -+ shiftedIdx = ulIdxNoId; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMaiFreeNoId->ulId = ulId; -+ pMaiFreeNoId->chInUse = 1; -+ } -+ else -+ { -+ shiftedIdx = ulIdxId; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMaiFreeId->ulId = ulId; -+ pMaiFreeId->chInUse = 1; -+ } -+ } -+ else -+ if( i == g_pNvramInfo->ulNumMacAddrs ) -+ nRet = -EADDRNOTAVAIL; -+ -+ return( nRet ); -+} /* kerSysGetMacAddr */ -+ -+int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) -+{ -+ int nRet = -EINVAL; -+ unsigned long ulIdx = 0; -+ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - -+ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); -+ -+ // if overflow 255 (negitive), add 256 to have the correct index -+ if (idx < 0) -+ idx += 256; -+ ulIdx = (unsigned long) (idx >> SHIFT_BITS); -+ -+ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) -+ { -+ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; -+ if( pMai->chInUse == 1 ) -+ { -+ pMai->chInUse = 0; -+ nRet = 0; -+ } -+ } -+ -+ return( nRet ); -+} /* kerSysReleaseMacAddr */ -+ -+int kerSysGetSdramSize( void ) -+{ -+ return( (int) g_pNvramInfo->ulSdramSize ); -+} /* kerSysGetSdramSize */ -+ -+ -+void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) -+{ -+ if (g_ledInitialized) -+ boardLedCtrl(ledName, ledState); -+} -+ -+unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) -+{ -+ int mask = (*g_orig_fop_poll) (f, t); -+ -+ if( g_wakeup_monitor == 1 && g_monitor_file == f ) -+ { -+ /* If g_wakeup_monitor is non-0, the user mode application needs to -+ * return from a blocking select function. Return POLLPRI which will -+ * cause the select to return with the exception descriptor set. -+ */ -+ mask |= POLLPRI; -+ g_wakeup_monitor = 0; -+ } -+ -+ return( mask ); -+} -+ -+/* Put the user mode application that monitors link state on a run queue. */ -+void kerSysWakeupMonitorTask( void ) -+{ -+ g_wakeup_monitor = 1; -+ if( g_monitor_task ) -+ wake_up_process( g_monitor_task ); -+} -+ -+//******************************************************************************************** -+// misc. ioctl calls come to here. (flash, led, reset, kernel memory access, etc.) -+//******************************************************************************************** -+static int board_ioctl( struct inode *inode, struct file *flip, -+ unsigned int command, unsigned long arg ) -+{ -+ int ret = 0; -+ BOARD_IOCTL_PARMS ctrlParms; -+ unsigned char ucaMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ int allowedSize; -+ -+ switch (command) -+ { -+ case BOARD_IOCTL_FLASH_INIT: -+ // not used for now. kerSysBcmImageInit(); -+ break; -+ -+ -+ case BOARD_IOCTL_FLASH_WRITE: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ NVRAM_DATA SaveNvramData; -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ -+ switch (ctrlParms.action) -+ { -+ case SCRATCH_PAD: -+ ret = kerSysScratchPadSet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); -+ break; -+ -+ case PERSISTENT: -+ ret = kerSysPersistentSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case NVRAM: -+ ret = kerSysNvRamSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case BCM_IMAGE_CFE: -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > FLASH45_LENGTH_BOOT_ROM ) -+ { -+ printk("Illegal CFE size [%d]. Size allowed: [%d]\n", -+ ctrlParms.strLen, FLASH45_LENGTH_BOOT_ROM); -+ ret = -1; -+ break; -+ } -+ -+ // save NVRAM data into a local structure -+ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); -+ -+ // set memory type field -+ BpGetSdramSize( (unsigned long *) &ctrlParms.string[SDRAM_TYPE_ADDRESS_OFFSET] ); -+ -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ -+ // if nvram is not valid, restore the current nvram settings -+ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && -+ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) -+ { -+ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); -+ } -+ break; -+ -+ case BCM_IMAGE_FS: -+ allowedSize = (int) flash_get_total_size() - \ -+ FLASH_RESERVED_AT_END - TAG_LEN - FLASH45_LENGTH_BOOT_ROM; -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize) -+ { -+ printk("Illegal root file system size [%d]. Size allowed: [%d]\n", -+ ctrlParms.strLen, allowedSize); -+ ret = -1; -+ break; -+ } -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ kerSysMipsSoftReset(); -+ break; -+ -+ case BCM_IMAGE_KERNEL: // not used for now. -+ break; -+ case BCM_IMAGE_WHOLE: -+ if(ctrlParms.strLen <= 0) -+ { -+ printk("Illegal flash image size [%d].\n", ctrlParms.strLen); -+ ret = -1; -+ break; -+ } -+ -+ // save NVRAM data into a local structure -+ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); -+ -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ -+ // if nvram is not valid, restore the current nvram settings -+ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && -+ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) -+ { -+ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); -+ } -+ -+ kerSysMipsSoftReset(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ printk("flash_ioctl_command: invalid command %d\n", ctrlParms.action); -+ break; -+ } -+ ctrlParms.result = ret; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_FLASH_READ: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ switch (ctrlParms.action) -+ { -+ case SCRATCH_PAD: -+ ret = kerSysScratchPadGet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); -+ break; -+ -+ case PERSISTENT: -+ ret = kerSysPersistentGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case NVRAM: -+ ret = kerSysNvRamGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case FLASH_SIZE: -+ ret = kerSysFlashSizeGet(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ printk("Not supported. invalid command %d\n", ctrlParms.action); -+ break; -+ } -+ ctrlParms.result = ret; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_NR_PAGES: -+ ctrlParms.result = nr_free_pages() + get_page_cache_size(); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_DUMP_ADDR: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ dumpaddr( (unsigned char *) ctrlParms.string, ctrlParms.strLen ); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_SET_MEMORY: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ unsigned long *pul = (unsigned long *) ctrlParms.string; -+ unsigned short *pus = (unsigned short *) ctrlParms.string; -+ unsigned char *puc = (unsigned char *) ctrlParms.string; -+ switch( ctrlParms.strLen ) -+ { -+ case 4: -+ *pul = (unsigned long) ctrlParms.offset; -+ break; -+ case 2: -+ *pus = (unsigned short) ctrlParms.offset; -+ break; -+ case 1: -+ *puc = (unsigned char) ctrlParms.offset; -+ break; -+ } -+ dumpaddr( (unsigned char *) ctrlParms.string, sizeof(long) ); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_MIPS_SOFT_RESET: -+ kerSysMipsSoftReset(); -+ break; -+ -+ case BOARD_IOCTL_LED_CTRL: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ kerSysLedCtrl((BOARD_LED_NAME)ctrlParms.strLen, (BOARD_LED_STATE)ctrlParms.offset); -+ ret = 0; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_ID: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, -+ sizeof(ctrlParms)) == 0) -+ { -+ if( ctrlParms.string ) -+ { -+ char *p = (char *) get_system_type(); -+ if( strlen(p) + 1 < ctrlParms.strLen ) -+ ctrlParms.strLen = strlen(p) + 1; -+ __copy_to_user(ctrlParms.string, p, ctrlParms.strLen); -+ } -+ -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ ctrlParms.result = kerSysGetMacAddress( ucaMacAddr, -+ ctrlParms.offset ); -+ -+ if( ctrlParms.result == 0 ) -+ { -+ __copy_to_user(ctrlParms.string, ucaMacAddr, -+ sizeof(ucaMacAddr)); -+ } -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_RELEASE_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ if (copy_from_user((void*)ucaMacAddr, (void*)ctrlParms.string, \ -+ NVRAM_MAC_ADDRESS_LEN) == 0) -+ { -+ ctrlParms.result = kerSysReleaseMacAddress( ucaMacAddr ); -+ } -+ else -+ { -+ ctrlParms.result = -EACCES; -+ } -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_PSI_SIZE: -+ ctrlParms.result = (int) g_pNvramInfo->ulPsiSize; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_SDRAM_SIZE: -+ ctrlParms.result = (int) g_pNvramInfo->ulSdramSize; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_BASE_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ __copy_to_user(ctrlParms.string, g_pNvramInfo->ucaBaseMacAddr, NVRAM_MAC_ADDRESS_LEN); -+ ctrlParms.result = 0; -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_CHIP_ID: -+ ctrlParms.result = (int) (PERF->RevID & 0xFFFF0000) >> 16; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_NUM_ENET: { -+ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; -+ int i, numeth = 0; -+ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { -+ for( i = 0; i < BP_MAX_ENET_MACS; i++) { -+ if (EnetInfos[i].ucPhyType != BP_ENET_NO_PHY) { -+ numeth++; -+ } -+ } -+ ctrlParms.result = numeth; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ -+ case BOARD_IOCTL_GET_CFE_VER: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ char *vertag = (char *)(FLASH_BASE + CFE_VERSION_OFFSET); -+ if (ctrlParms.strLen < CFE_VERSION_SIZE) { -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = -EFAULT; -+ } -+ else if (strncmp(vertag, "cfe-v", 5)) { // no tag info in flash -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ ctrlParms.result = 1; -+ __copy_to_user(ctrlParms.string, vertag+CFE_VERSION_MARK_SIZE, CFE_VERSION_SIZE); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_ENET_CFG: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; -+ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { -+ if (ctrlParms.strLen == sizeof(EnetInfos)) { -+ __copy_to_user(ctrlParms.string, EnetInfos, sizeof(EnetInfos)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+#if defined (WIRELESS) -+ case BOARD_IOCTL_GET_WLAN_ANT_INUSE: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ unsigned short antInUse = 0; -+ if (BpGetWirelessAntInUse(&antInUse) == BP_SUCCESS) { -+ if (ctrlParms.strLen == sizeof(antInUse)) { -+ __copy_to_user(ctrlParms.string, &antInUse, sizeof(antInUse)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#endif -+ case BOARD_IOCTL_SET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ ctrlParms.result = -EFAULT; -+ ret = -EFAULT; -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ board_ioc->eventmask |= *((int*)ctrlParms.string); -+#if defined (WIRELESS) -+ if((board_ioc->eventmask & SES_EVENTS)) { -+ if(sesBtn_irq != BP_NOT_DEFINED) { -+ BcmHalInterruptEnable(sesBtn_irq); -+ ctrlParms.result = 0; -+ ret = 0; -+ } -+ } -+#endif -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ __copy_to_user(ctrlParms.string, &board_ioc->eventmask, sizeof(unsigned long)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_UNSET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ board_ioc->eventmask &= (~(*((int*)ctrlParms.string))); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#if defined (WIRELESS) -+ case BOARD_IOCTL_SET_SES_LED: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ if (ctrlParms.strLen == sizeof(int)) { -+ sesLed_ctrl(*(int*)ctrlParms.string); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#endif -+ -+ case BOARD_IOCTL_SET_MONITOR_FD: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ int fput_needed = 0; -+ -+ g_monitor_file = fget_light( ctrlParms.offset, &fput_needed ); -+ if( g_monitor_file ) { -+ /* Hook this file descriptor's poll function in order to set -+ * the exception descriptor when there is a change in link -+ * state. -+ */ -+ g_monitor_task = current; -+ g_orig_fop_poll = g_monitor_file->f_op->poll; -+ g_monitor_file->f_op->poll = kerSysMonitorPollHook; -+ } -+ } -+ break; -+ -+ case BOARD_IOCTL_WAKEUP_MONITOR_TASK: -+ kerSysWakeupMonitorTask(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ ctrlParms.result = 0; -+ printk("board_ioctl: invalid command %x, cmd %d .\n",command,_IOC_NR(command)); -+ break; -+ -+ } /* switch */ -+ -+ return (ret); -+ -+} /* board_ioctl */ -+ -+/*************************************************************************** -+ * SES Button ISR/GPIO/LED functions. -+ ***************************************************************************/ -+#if defined (WIRELESS) -+static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs) -+{ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if (!(*gpio_reg & gpio_mask)){ -+ wake_up_interruptible(&g_board_wait_queue); -+ return IRQ_RETVAL(1); -+ } else { -+ return IRQ_RETVAL(0); -+ } -+} -+ -+static void __init sesBtn_mapGpio() -+{ -+ if( BpGetWirelessSesBtnGpio(&sesBtn_gpio) == BP_SUCCESS ) -+ { -+ printk("SES: Button GPIO 0x%x is enabled\n", sesBtn_gpio); -+ } -+} -+ -+static void __init sesBtn_mapIntr(int context) -+{ -+ if( BpGetWirelessSesExtIntr(&sesBtn_irq) == BP_SUCCESS ) -+ { -+ printk("SES: Button Interrupt 0x%x is enabled\n", sesBtn_irq); -+ } -+ else -+ return; -+ -+ sesBtn_irq += INTERRUPT_ID_EXTERNAL_0; -+ -+ if (BcmHalMapInterrupt((FN_HANDLER)sesBtn_isr, context, sesBtn_irq)) { -+ printk("SES: Interrupt mapping failed\n"); -+ } -+ BcmHalInterruptEnable(sesBtn_irq); -+} -+ -+ -+static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait) -+{ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if (!(*gpio_reg & gpio_mask)){ -+ return POLLIN; -+ } -+ return 0; -+} -+ -+static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) -+{ -+ volatile unsigned int event=0; -+ ssize_t ret=0; -+ -+#if defined(_BCM96338_) || defined (CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined (CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if(*gpio_reg & gpio_mask){ -+ BcmHalInterruptEnable(sesBtn_irq); -+ return ret; -+ } -+ event = SES_EVENTS; -+ __copy_to_user((char*)buffer, (char*)&event, sizeof(event)); -+ BcmHalInterruptEnable(sesBtn_irq); -+ count -= sizeof(event); -+ buffer += sizeof(event); -+ ret += sizeof(event); -+ return ret; -+} -+ -+static void __init sesLed_mapGpio() -+{ -+ if( BpGetWirelessSesBtnGpio(&sesLed_gpio) == BP_SUCCESS ) -+ { -+ printk("SES: LED GPIO 0x%x is enabled\n", sesBtn_gpio); -+ } -+} -+ -+static void sesLed_ctrl(int action) -+{ -+ -+ //char status = ((action >> 8) & 0xff); /* extract status */ -+ //char event = ((action >> 16) & 0xff); /* extract event */ -+ //char blinktype = ((action >> 24) & 0xff); /* extract blink type for SES_LED_BLINK */ -+ -+ BOARD_LED_STATE led; -+ -+ if(sesLed_gpio == BP_NOT_DEFINED) -+ return; -+ -+ action &= 0xff; /* extract led */ -+ -+ //printk("blinktype=%d, event=%d, status=%d\n",(int)blinktype, (int)event, (int)status); -+ -+ switch (action) -+ { -+ case SES_LED_ON: -+ //printk("SES: led on\n"); -+ led = kLedStateOn; -+ break; -+ case SES_LED_BLINK: -+ //printk("SES: led blink\n"); -+ led = kLedStateSlowBlinkContinues; -+ break; -+ case SES_LED_OFF: -+ default: -+ //printk("SES: led off\n"); -+ led = kLedStateOff; -+ } -+ -+ kerSysLedCtrl(kLedSes, led); -+} -+ -+static void __init ses_board_init() -+{ -+ sesBtn_mapGpio(); -+ sesBtn_mapIntr(0); -+ sesLed_mapGpio(); -+} -+static void __exit ses_board_deinit() -+{ -+ if(sesBtn_irq) -+ BcmHalInterruptDisable(sesBtn_irq); -+} -+#endif -+ -+/*************************************************************************** -+ * Dying gasp ISR and functions. -+ ***************************************************************************/ -+#define KERSYS_DBG printk -+ -+#if defined(CONFIG_BCM96345) -+#define CYCLE_PER_US 70 -+#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+/* The BCM6348 cycles per microsecond is really variable since the BCM6348 -+ * MIPS speed can vary depending on the PLL settings. However, an appoximate -+ * value of 120 will still work OK for the test being done. -+ */ -+#define CYCLE_PER_US 120 -+#endif -+#define DG_GLITCH_TO (100*CYCLE_PER_US) -+ -+static void __init kerSysDyingGaspMapIntr() -+{ -+ unsigned long ulIntr; -+ -+#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) -+ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { -+ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); -+ BcmHalInterruptEnable( INTERRUPT_ID_DG ); -+ } -+#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) -+ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { -+ ulIntr += INTERRUPT_ID_EXTERNAL_0; -+ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); -+ BcmHalInterruptEnable( ulIntr ); -+ } -+#endif -+ -+} -+ -+void kerSysSetWdTimer(ulong timeUs) -+{ -+ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); -+ TIMER->WatchDogCtl = 0xFF00; -+ TIMER->WatchDogCtl = 0x00FF; -+} -+ -+ulong kerSysGetCycleCount(void) -+{ -+ ulong cnt; -+#ifdef _WIN32_WCE -+ cnt = 0; -+#else -+ __asm volatile("mfc0 %0, $9":"=d"(cnt)); -+#endif -+ return(cnt); -+} -+ -+static Bool kerSysDyingGaspCheckPowerLoss(void) -+{ -+ ulong clk0; -+ ulong ulIntr; -+ -+ ulIntr = 0; -+ clk0 = kerSysGetCycleCount(); -+ -+ UART->Data = 'D'; -+ UART->Data = '%'; -+ UART->Data = 'G'; -+ -+#if defined(CONFIG_BCM96345) -+ BpGetAdslDyingGaspExtIntr( &ulIntr ); -+ -+ do { -+ ulong clk1; -+ -+ clk1 = kerSysGetCycleCount(); /* time cleared */ -+ /* wait a little to get new reading */ -+ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) -+ ; -+ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); -+ -+ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ -+ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); -+ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); -+ return 0; -+ } -+#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) -+ do { -+ ulong clk1; -+ -+ clk1 = kerSysGetCycleCount(); /* time cleared */ -+ /* wait a little to get new reading */ -+ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) -+ ; -+ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); -+ -+ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { -+ BcmHalInterruptEnable( INTERRUPT_ID_DG ); -+ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); -+ return 0; -+ } -+#endif -+ return 1; -+} -+ -+static void kerSysDyingGaspShutdown( void ) -+{ -+ kerSysSetWdTimer(1000000); -+#if defined(CONFIG_BCM96345) -+ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); -+#elif defined(CONFIG_BCM96348) -+ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); -+#endif -+} -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) -+#else -+static unsigned int kerSysDyingGaspIsr(void) -+#endif -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp, *dsl = NULL; -+ -+ if (kerSysDyingGaspCheckPowerLoss()) { -+ -+ /* first to turn off everything other than dsl */ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ if(strncmp(tmp->name, "dsl", 3)) { -+ (tmp->cb_dgasp_fn)(tmp->context); -+ }else { -+ dsl = tmp; -+ } -+ } -+ -+ /* now send dgasp */ -+ if(dsl) -+ (dsl->cb_dgasp_fn)(dsl->context); -+ -+ /* reset and shutdown system */ -+ kerSysDyingGaspShutdown(); -+ } -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+return( IRQ_HANDLED ); -+#else -+ return( 1 ); -+#endif -+} -+ -+static void __init kerSysInitDyingGaspHandler( void ) -+{ -+ CB_DGASP_LIST *new_node; -+ -+ if( g_cb_dgasp_list_head != NULL) { -+ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); -+ return; -+ } -+ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); -+ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); -+ INIT_LIST_HEAD(&new_node->list); -+ g_cb_dgasp_list_head = new_node; -+ -+} /* kerSysInitDyingGaspHandler */ -+ -+static void __exit kerSysDeinitDyingGaspHandler( void ) -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp; -+ -+ if(g_cb_dgasp_list_head == NULL) -+ return; -+ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ list_del(pos); -+ kfree(tmp); -+ } -+ -+ kfree(g_cb_dgasp_list_head); -+ g_cb_dgasp_list_head = NULL; -+ -+} /* kerSysDeinitDyingGaspHandler */ -+ -+void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) -+{ -+ CB_DGASP_LIST *new_node; -+ -+ if( g_cb_dgasp_list_head == NULL) { -+ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); -+ return; -+ } -+ -+ if( devname == NULL || cbfn == NULL ) { -+ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); -+ return; -+ } -+ -+ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); -+ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); -+ INIT_LIST_HEAD(&new_node->list); -+ strncpy(new_node->name, devname, IFNAMSIZ); -+ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; -+ new_node->context = context; -+ list_add(&new_node->list, &g_cb_dgasp_list_head->list); -+ -+ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); -+ -+} /* kerSysRegisterDyingGaspHandler */ -+ -+void kerSysDeregisterDyingGaspHandler(char *devname) -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp; -+ -+ if(g_cb_dgasp_list_head == NULL) { -+ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); -+ return; -+ } -+ -+ if(devname == NULL) { -+ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); -+ return; -+ } -+ -+ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); -+ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ if(!strcmp(tmp->name, devname)) { -+ list_del(pos); -+ kfree(tmp); -+ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); -+ return; -+ } -+ } -+ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); -+ -+} /* kerSysDeregisterDyingGaspHandler */ -+ -+/*************************************************************************** -+ * MACRO to call driver initialization and cleanup functions. -+ ***************************************************************************/ -+module_init( brcm_board_init ); -+module_exit( brcm_board_cleanup ); -+ -+EXPORT_SYMBOL(kerSysNvRamGet); -+EXPORT_SYMBOL(dumpaddr); -+EXPORT_SYMBOL(kerSysGetMacAddress); -+EXPORT_SYMBOL(kerSysReleaseMacAddress); -+EXPORT_SYMBOL(kerSysGetSdramSize); -+EXPORT_SYMBOL(kerSysLedCtrl); -+EXPORT_SYMBOL(kerSysLedRegisterHwHandler); -+EXPORT_SYMBOL(BpGetBoardIds); -+EXPORT_SYMBOL(BpGetSdramSize); -+EXPORT_SYMBOL(BpGetPsiSize); -+EXPORT_SYMBOL(BpGetEthernetMacInfo); -+EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); -+EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); -+EXPORT_SYMBOL(BpGetVoipResetGpio); -+EXPORT_SYMBOL(BpGetVoipIntrGpio); -+EXPORT_SYMBOL(BpGetPcmciaResetGpio); -+EXPORT_SYMBOL(BpGetRtsCtsUartGpios); -+EXPORT_SYMBOL(BpGetAdslLedGpio); -+EXPORT_SYMBOL(BpGetAdslFailLedGpio); -+EXPORT_SYMBOL(BpGetWirelessLedGpio); -+EXPORT_SYMBOL(BpGetUsbLedGpio); -+EXPORT_SYMBOL(BpGetHpnaLedGpio); -+EXPORT_SYMBOL(BpGetWanDataLedGpio); -+EXPORT_SYMBOL(BpGetPppLedGpio); -+EXPORT_SYMBOL(BpGetPppFailLedGpio); -+EXPORT_SYMBOL(BpGetVoipLedGpio); -+EXPORT_SYMBOL(BpGetWirelessExtIntr); -+EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); -+EXPORT_SYMBOL(BpGetVoipExtIntr); -+EXPORT_SYMBOL(BpGetHpnaExtIntr); -+EXPORT_SYMBOL(BpGetHpnaChipSelect); -+EXPORT_SYMBOL(BpGetVoipChipSelect); -+EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); -+EXPORT_SYMBOL(BpGetWirelessSesExtIntr); -+EXPORT_SYMBOL(BpGetWirelessSesLedGpio); -+EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); -+EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); -+EXPORT_SYMBOL(kerSysGetCycleCount); -+EXPORT_SYMBOL(kerSysSetWdTimer); -+EXPORT_SYMBOL(kerSysWakeupMonitorTask); -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,692 @@ -+/************************************************************************/ -+/* */ -+/* AMD CFI Enabled Flash Memory Drivers */ -+/* File name: CFIFLASH.C */ -+/* Revision: 1.0 5/07/98 */ -+/* */ -+/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ -+/* This software is unpublished and contains the trade secrets and */ -+/* confidential proprietary information of AMD. Unless otherwise */ -+/* provided in the Software Agreement associated herewith, it is */ -+/* licensed in confidence "AS IS" and is not to be reproduced in whole */ -+/* or part by any means except for backup. Use, duplication, or */ -+/* disclosure by the Government is subject to the restrictions in */ -+/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ -+/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ -+/* Software owned by */ -+/* Advanced Micro Devices, Inc., */ -+/* One AMD Place, */ -+/* P.O. Box 3453 */ -+/* Sunnyvale, CA 94088-3453. */ -+/************************************************************************/ -+/* This software constitutes a basic shell of source code for */ -+/* programming all AMD Flash components. AMD */ -+/* will not be responsible for misuse or illegal use of this */ -+/* software for devices not supported herein. AMD is providing */ -+/* this source code "AS IS" and will not be responsible for */ -+/* issues arising from incorrect user implementation of the */ -+/* source code herein. It is the user's responsibility to */ -+/* properly design-in this source code. */ -+/* */ -+/************************************************************************/ -+#ifdef _CFE_ -+#include "lib_types.h" -+#include "lib_printf.h" -+#include "lib_string.h" -+#include "cfe_timer.h" -+#define printk printf -+#else // linux -+#include <linux/param.h> -+#include <linux/sched.h> -+#include <linux/timer.h> -+#endif -+ -+#include "cfiflash.h" -+ -+static int flash_wait(WORD sector, int offset, UINT16 data); -+static UINT16 flash_get_device_id(void); -+static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily); -+static int flash_write(WORD sector, int offset, byte *buf, int nbytes); -+static void flash_command(int command, WORD sector, int offset, UINT16 data); -+ -+/*********************************************************************/ -+/* 'meminfo' should be a pointer, but most C compilers will not */ -+/* allocate static storage for a pointer without calling */ -+/* non-portable functions such as 'new'. We also want to avoid */ -+/* the overhead of passing this pointer for every driver call. */ -+/* Systems with limited heap space will need to do this. */ -+/*********************************************************************/ -+struct flashinfo meminfo; /* Flash information structure */ -+static int flashFamily = FLASH_UNDEFINED; -+static int totalSize = 0; -+static struct cfi_query query; -+ -+static UINT16 cfi_data_struct_29W160[] = { -+ 0x0020, 0x0049, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0051, 0x0052, 0x0059, 0x0002, 0x0000, 0x0040, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0027, 0x0036, 0x0000, 0x0000, 0x0004, -+ 0x0000, 0x000a, 0x0000, 0x0004, 0x0000, 0x0003, 0x0000, 0x0015, -+ 0x0002, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0040, -+ 0x0000, 0x0001, 0x0000, 0x0020, 0x0000, 0x0000, 0x0000, 0x0080, -+ 0x0000, 0x001e, 0x0000, 0x0000, 0x0001, 0xffff, 0xffff, 0xffff, -+ 0x0050, 0x0052, 0x0049, 0x0031, 0x0030, 0x0000, 0x0002, 0x0001, -+ 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0002, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0x0888, 0x252b, 0x8c84, 0x7dbc, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff -+}; -+ -+ -+/*********************************************************************/ -+/* Init_flash is used to build a sector table from the information */ -+/* provided through the CFI query. This information is translated */ -+/* from erase_block information to base:offset information for each */ -+/* individual sector. This information is then stored in the meminfo */ -+/* structure, and used throughout the driver to access sector */ -+/* information. */ -+/* */ -+/* This is more efficient than deriving the sector base:offset */ -+/* information every time the memory map switches (since on the */ -+/* development platform can only map 64k at a time). If the entire */ -+/* flash memory array can be mapped in, then the addition static */ -+/* allocation for the meminfo structure can be eliminated, but the */ -+/* drivers will have to be re-written. */ -+/* */ -+/* The meminfo struct occupies 653 bytes of heap space, depending */ -+/* on the value of the define MAXSECTORS. Adjust to suit */ -+/* application */ -+/*********************************************************************/ -+byte flash_init(void) -+{ -+ int i=0, j=0, count=0; -+ int basecount=0L; -+ UINT16 device_id; -+ int flipCFIGeometry = FALSE; -+ -+ /* First, assume -+ * a single 8k sector for sector 0. This is to allow -+ * the system to perform memory mapping to the device, -+ * even though the actual physical layout is unknown. -+ * Once mapped in, the CFI query will produce all -+ * relevant information. -+ */ -+ meminfo.addr = 0L; -+ meminfo.areg = 0; -+ meminfo.nsect = 1; -+ meminfo.bank1start = 0; -+ meminfo.bank2start = 0; -+ -+ meminfo.sec[0].size = 8192; -+ meminfo.sec[0].base = 0x00000; -+ meminfo.sec[0].bank = 1; -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ -+ device_id = flash_get_device_id(); -+ -+ switch (device_id) { -+ case ID_I28F160C3B: -+ case ID_I28F320C3B: -+ case ID_I28F160C3T: -+ case ID_I28F320C3T: -+ flashFamily = FLASH_INTEL; -+ break; -+ case ID_AM29DL800B: -+ case ID_AM29LV800B: -+ case ID_AM29LV400B: -+ case ID_AM29LV160B: -+ case ID_AM29LV320B: -+ case ID_MX29LV320AB: -+ case ID_AM29LV320MB: -+ case ID_AM29DL800T: -+ case ID_AM29LV800T: -+ case ID_AM29LV160T: -+ case ID_AM29LV320T: -+ case ID_MX29LV320AT: -+ case ID_AM29LV320MT: -+ flashFamily = FLASH_AMD; -+ break; -+ case ID_SST39VF1601: -+ case ID_SST39VF3201: -+ flashFamily = FLASH_SST; -+ break; -+ default: -+ printk("Flash memory not supported! Device id = %x\n", device_id); -+ return -1; -+ } -+ -+ if (flash_get_cfi(&query, 0, flashFamily) == -1) { -+ switch(device_id) { -+ case ID_AM29LV160T: -+ case ID_AM29LV160B: -+ flash_get_cfi(&query, cfi_data_struct_29W160, flashFamily); -+ break; -+ default: -+ printk("CFI data structure not found. Device id = %x\n", device_id); -+ return -1; -+ } -+ } -+ -+ // need to determine if it top or bottom boot here -+ switch (device_id) -+ { -+ case ID_AM29DL800B: -+ case ID_AM29LV800B: -+ case ID_AM29LV400B: -+ case ID_AM29LV160B: -+ case ID_AM29LV320B: -+ case ID_MX29LV320AB: -+ case ID_AM29LV320MB: -+ case ID_I28F160C3B: -+ case ID_I28F320C3B: -+ case ID_I28F160C3T: -+ case ID_I28F320C3T: -+ case ID_SST39VF1601: -+ case ID_SST39VF3201: -+ flipCFIGeometry = FALSE; -+ break; -+ case ID_AM29DL800T: -+ case ID_AM29LV800T: -+ case ID_AM29LV160T: -+ case ID_AM29LV320T: -+ case ID_MX29LV320AT: -+ case ID_AM29LV320MT: -+ flipCFIGeometry = TRUE; -+ break; -+ default: -+ printk("Flash memory not supported! Device id = %x\n", device_id); -+ return -1; -+ } -+ -+ count=0;basecount=0L; -+ -+ if (!flipCFIGeometry) -+ { -+ for (i=0; i<query.num_erase_blocks; i++) { -+ for(j=0; j<query.erase_block[i].num_sectors; j++) { -+ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; -+ meminfo.sec[count].base = (int) basecount; -+ basecount += (int) query.erase_block[i].sector_size; -+ count++; -+ } -+ } -+ } -+ else -+ { -+ for (i = (query.num_erase_blocks - 1); i >= 0; i--) { -+ for(j=0; j<query.erase_block[i].num_sectors; j++) { -+ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; -+ meminfo.sec[count].base = (int) basecount; -+ basecount += (int) query.erase_block[i].sector_size; -+ count++; -+ } -+ } -+ } -+ -+ meminfo.nsect = count; -+ totalSize = meminfo.sec[count-1].base + meminfo.sec[count-1].size; -+ return (0); -+} -+ -+/*********************************************************************/ -+/* Flash_sector_erase_int() is identical to flash_sector_erase(), */ -+/* except it will wait until the erase is completed before returning */ -+/* control to the calling function. This can be used in cases which */ -+/* require the program to hold until a sector is erased, without */ -+/* adding the wait check external to this function. */ -+/*********************************************************************/ -+byte flash_sector_erase_int(WORD sector) -+{ -+ int i; -+ -+ for( i = 0; i < 3; i++ ) { -+ flash_command(FLASH_SERASE, sector, 0, 0); -+ if (flash_wait(sector, 0, 0xffff) == STATUS_READY) -+ break; -+ } -+ -+ return(1); -+} -+ -+/*********************************************************************/ -+/* flash_read_buf() reads buffer of data from the specified */ -+/* offset from the sector parameter. */ -+/*********************************************************************/ -+int flash_read_buf(WORD sector, int offset, -+ byte *buffer, int numbytes) -+{ -+ byte *fwp; -+ -+ fwp = (byte *)flash_get_memptr(sector); -+ -+ while (numbytes) { -+ *buffer++ = *(fwp + offset); -+ numbytes--; -+ fwp++; -+ } -+ -+ return (1); -+} -+ -+/*********************************************************************/ -+/* flash_write_buf() utilizes */ -+/* the unlock bypass mode of the flash device. This can remove */ -+/* significant overhead from the bulk programming operation, and */ -+/* when programming bulk data a sizeable performance increase can be */ -+/* observed. */ -+/*********************************************************************/ -+int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes) -+{ -+ int ret = -1; -+ int i; -+ unsigned char *p = flash_get_memptr(sector) + offset; -+ -+ /* After writing the flash block, compare the contents to the source -+ * buffer. Try to write the sector successfully up to three times. -+ */ -+ for( i = 0; i < 3; i++ ) { -+ ret = flash_write(sector, offset, buffer, numbytes); -+ if( !memcmp( p, buffer, numbytes ) ) -+ break; -+ /* Erase and try again */ -+ flash_sector_erase_int(sector); -+ ret = -1; -+ } -+ -+ if( ret == -1 ) -+ printk( "Flash write error. Verify failed\n" ); -+ -+ return( ret ); -+} -+ -+/*********************************************************************/ -+/* Usefull funtion to return the number of sectors in the device. */ -+/* Can be used for functions which need to loop among all the */ -+/* sectors, or wish to know the number of the last sector. */ -+/*********************************************************************/ -+int flash_get_numsectors(void) -+{ -+ return meminfo.nsect; -+} -+ -+/*********************************************************************/ -+/* flash_get_sector_size() is provided for cases in which the size */ -+/* of a sector is required by a host application. The sector size */ -+/* (in bytes) is returned in the data location pointed to by the */ -+/* 'size' parameter. */ -+/*********************************************************************/ -+int flash_get_sector_size(WORD sector) -+{ -+ return meminfo.sec[sector].size; -+} -+ -+/*********************************************************************/ -+/* The purpose of flash_get_memptr() is to return a memory pointer */ -+/* which points to the beginning of memory space allocated for the */ -+/* flash. All function pointers are then referenced from this */ -+/* pointer. */ -+/* */ -+/* Different systems will implement this in different ways: */ -+/* possibilities include: */ -+/* - A direct memory pointer */ -+/* - A pointer to a memory map */ -+/* - A pointer to a hardware port from which the linear */ -+/* address is translated */ -+/* - Output of an MMU function / service */ -+/* */ -+/* Also note that this function expects the pointer to a specific */ -+/* sector of the device. This can be provided by dereferencing */ -+/* the pointer from a translated offset of the sector from a */ -+/* global base pointer (e.g. flashptr = base_pointer + sector_offset)*/ -+/* */ -+/* Important: Many AMD flash devices need both bank and or sector */ -+/* address bits to be correctly set (bank address bits are A18-A16, */ -+/* and sector address bits are A18-A12, or A12-A15). Flash parts */ -+/* which do not need these bits will ignore them, so it is safe to */ -+/* assume that every part will require these bits to be set. */ -+/*********************************************************************/ -+unsigned char *flash_get_memptr(WORD sector) -+{ -+ unsigned char *memptr = (unsigned char*)(FLASH_BASE_ADDR_REG + meminfo.sec[sector].base); -+ -+ return (memptr); -+} -+ -+/*********************************************************************/ -+/* The purpose of flash_get_blk() is to return a the block number */ -+/* for a given memory address. */ -+/*********************************************************************/ -+int flash_get_blk(int addr) -+{ -+ int blk_start, i; -+ int last_blk = flash_get_numsectors(); -+ int relative_addr = addr - (int) FLASH_BASE_ADDR_REG; -+ -+ for(blk_start=0, i=0; i < relative_addr && blk_start < last_blk; blk_start++) -+ i += flash_get_sector_size(blk_start); -+ -+ if( i > relative_addr ) -+ { -+ blk_start--; // last blk, dec by 1 -+ } -+ else -+ if( blk_start == last_blk ) -+ { -+ printk("Address is too big.\n"); -+ blk_start = -1; -+ } -+ -+ return( blk_start ); -+} -+ -+/************************************************************************/ -+/* The purpose of flash_get_total_size() is to return the total size of */ -+/* the flash */ -+/************************************************************************/ -+int flash_get_total_size() -+{ -+ return totalSize; -+} -+ -+/*********************************************************************/ -+/* Flash_command() is the main driver function. It performs */ -+/* every possible command available to AMD B revision */ -+/* flash parts. Note that this command is not used directly, but */ -+/* rather called through the API wrapper functions provided below. */ -+/*********************************************************************/ -+static void flash_command(int command, WORD sector, int offset, UINT16 data) -+{ -+ volatile UINT16 *flashptr; -+ volatile UINT16 *flashbase; -+ -+ flashptr = (UINT16 *) flash_get_memptr(sector); -+ flashbase = (UINT16 *) flash_get_memptr(0); -+ -+ switch (flashFamily) { -+ case FLASH_UNDEFINED: -+ /* These commands should work for AMD, Intel and SST flashes */ -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xF0; -+ flashptr[0] = 0xFF; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0x5555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AAA] = 0x55; /* unlock 2 */ -+ flashptr[0x5555] = 0x90; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_AMD: -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xF0; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashptr[0x55] = 0x98; -+ break; -+ case FLASH_UB: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x20; -+ break; -+ case FLASH_PROG: -+ flashptr[0] = 0xA0; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_UBRESET: -+ flashptr[0] = 0x90; -+ flashptr[0] = 0x00; -+ break; -+ case FLASH_SERASE: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x80; -+ flashptr[0x555] = 0xAA; -+ flashptr[0x2AA] = 0x55; -+ flashptr[0] = 0x30; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_INTEL: -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xFF; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashptr[0] = 0x98; -+ break; -+ case FLASH_PROG: -+ flashptr[0] = 0x40; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_SERASE: -+ flashptr[0] = 0x60; -+ flashptr[0] = 0xD0; -+ flashptr[0] = 0x20; -+ flashptr[0] = 0xD0; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_SST: -+ switch (command) { -+ case FLASH_RESET: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0xf0; -+ break; -+ case FLASH_READ_ID: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x98; -+ break; -+ case FLASH_UB: -+ break; -+ case FLASH_PROG: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0xa0; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_UBRESET: -+ break; -+ case FLASH_SERASE: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x80; -+ flashbase[0x5555] = 0xAA; -+ flashbase[0x2AAA] = 0x55; -+ flashptr[0] = 0x30; -+ break; -+ default: -+ break; -+ } -+ break; -+ default: -+ break; -+ } -+} -+ -+/*********************************************************************/ -+/* flash_write extends the functionality of flash_program() by */ -+/* providing an faster way to program multiple data words, without */ -+/* needing the function overhead of looping algorithms which */ -+/* program word by word. This function utilizes fast pointers */ -+/* to quickly loop through bulk data. */ -+/*********************************************************************/ -+static int flash_write(WORD sector, int offset, byte *buf, int nbytes) -+{ -+ UINT16 *src; -+ src = (UINT16 *)buf; -+ -+ if ((nbytes | offset) & 1) { -+ return -1; -+ } -+ -+ flash_command(FLASH_UB, 0, 0, 0); -+ while (nbytes > 0) { -+ flash_command(FLASH_PROG, sector, offset, *src); -+ if (flash_wait(sector, offset, *src) != STATUS_READY) -+ break; -+ offset +=2; -+ nbytes -=2; -+ src++; -+ } -+ flash_command(FLASH_UBRESET, 0, 0, 0); -+ -+ return (byte*)src - buf; -+} -+ -+/*********************************************************************/ -+/* flash_wait utilizes the DQ6, DQ5, and DQ2 polling algorithms */ -+/* described in the flash data book. It can quickly ascertain the */ -+/* operational status of the flash device, and return an */ -+/* appropriate status code (defined in flash.h) */ -+/*********************************************************************/ -+static int flash_wait(WORD sector, int offset, UINT16 data) -+{ -+ volatile UINT16 *flashptr; /* flash window */ -+ UINT16 d1; -+ -+ flashptr = (UINT16 *) flash_get_memptr(sector); -+ -+ if (flashFamily == FLASH_AMD || flashFamily == FLASH_SST) { -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ do { -+ d1 = flashptr[offset/2]; -+ if (d1 == data) -+ return STATUS_READY; -+ } while (!(d1 & 0x20)); -+ -+ d1 = flashptr[offset/2]; -+ -+ if (d1 != data) { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+#else -+ do { -+ d1 = *flashptr; /* read data */ -+ d1 ^= *flashptr; /* read it again and see what toggled */ -+ if (d1 == 0) /* no toggles, nothing's happening */ -+ return STATUS_READY; -+ } while (!(d1 & 0x20)); -+ -+ d1 = *flashptr; /* read data */ -+ d1 ^= *flashptr; /* read it again and see what toggled */ -+ -+ if (d1 != 0) { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+#endif -+ } else if (flashFamily == FLASH_INTEL) { -+ flashptr[0] = 0x70; -+ /* Wait for completion */ -+ while(!(*flashptr & 0x80)); -+ if (*flashptr & 0x30) { -+ flashptr[0] = 0x50; -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+ flashptr[0] = 0x50; -+ flash_command(FLASH_RESET, 0, 0, 0); -+ } -+ -+ return STATUS_READY; -+} -+ -+/*********************************************************************/ -+/* flash_get_device_id() will perform an autoselect sequence on the */ -+/* flash device, and return the device id of the component. */ -+/* This function automatically resets to read mode. */ -+/*********************************************************************/ -+static UINT16 flash_get_device_id() -+{ -+ volatile UINT16 *fwp; /* flash window */ -+ UINT16 answer; -+ -+ fwp = (UINT16 *)flash_get_memptr(0); -+ -+ flash_command(FLASH_READ_ID, 0, 0, 0); -+ answer = *(fwp + 1); -+ if (answer == ID_AM29LV320M) { -+ answer = *(fwp + 0xe); -+ answer = *(fwp + 0xf); -+ } -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return( (UINT16) answer ); -+} -+ -+/*********************************************************************/ -+/* flash_get_cfi() is the main CFI workhorse function. Due to it's */ -+/* complexity and size it need only be called once upon */ -+/* initializing the flash system. Once it is called, all operations */ -+/* are performed by looking at the meminfo structure. */ -+/* All possible care was made to make this algorithm as efficient as */ -+/* possible. 90% of all operations are memory reads, and all */ -+/* calculations are done using bit-shifts when possible */ -+/*********************************************************************/ -+static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily) -+{ -+ volatile UINT16 *fwp; /* flash window */ -+ int i=0; -+ -+ flash_command(FLASH_CFIQUERY, 0, 0, 0); -+ -+ if (cfi_struct == 0) -+ fwp = (UINT16 *)flash_get_memptr(0); -+ else -+ fwp = cfi_struct; -+ -+ /* Initial house-cleaning */ -+ for(i=0; i < 8; i++) { -+ query->erase_block[i].sector_size = 0; -+ query->erase_block[i].num_sectors = 0; -+ } -+ -+ /* If not 'QRY', then we dont have a CFI enabled device in the socket */ -+ if( fwp[0x10] != 'Q' && -+ fwp[0x11] != 'R' && -+ fwp[0x12] != 'Y') { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return(-1); -+ } -+ -+ query->num_erase_blocks = fwp[0x2C]; -+ if(flashFamily == FLASH_SST) -+ query->num_erase_blocks = 1; -+ -+ for(i=0; i < query->num_erase_blocks; i++) { -+ query->erase_block[i].num_sectors = fwp[(0x2D+(4*i))] + (fwp[0x2E + (4*i)] << 8); -+ query->erase_block[i].num_sectors++; -+ query->erase_block[i].sector_size = 256 * (256 * fwp[(0x30+(4*i))] + fwp[(0x2F+(4*i))]); -+ } -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return(1); -+} -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.h ---- linux-2.6.8.1/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/board/bcm963xx/impl1/cfiflash.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,150 @@ -+/************************************************************************/ -+/* */ -+/* AMD CFI Enabled Flash Memory Drivers */ -+/* File name: CFIFLASH.H */ -+/* Revision: 1.0 5/07/98 */ -+/* */ -+/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ -+/* This software is unpublished and contains the trade secrets and */ -+/* confidential proprietary information of AMD. Unless otherwise */ -+/* provided in the Software Agreement associated herewith, it is */ -+/* licensed in confidence "AS IS" and is not to be reproduced in whole */ -+/* or part by any means except for backup. Use, duplication, or */ -+/* disclosure by the Government is subject to the restrictions in */ -+/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ -+/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ -+/* Software owned by */ -+/* Advanced Micro Devices, Inc., */ -+/* One AMD Place, */ -+/* P.O. Box 3453 */ -+/* Sunnyvale, CA 94088-3453. */ -+/************************************************************************/ -+/* This software constitutes a basic shell of source code for */ -+/* programming all AMD Flash components. AMD */ -+/* will not be responsible for misuse or illegal use of this */ -+/* software for devices not supported herein. AMD is providing */ -+/* this source code "AS IS" and will not be responsible for */ -+/* issues arising from incorrect user implementation of the */ -+/* source code herein. It is the user's responsibility to */ -+/* properly design-in this source code. */ -+/* */ -+/************************************************************************/ -+#ifndef _CFIFLASH_H -+#define _CFIFLASH_H -+ -+#if defined __cplusplus -+extern "C" { -+#endif -+ -+/* include board/CPU specific definitions */ -+#include "bcmtypes.h" -+#include "board.h" -+ -+#define FLASH_BASE_ADDR_REG FLASH_BASE -+ -+#ifndef NULL -+#define NULL 0 -+#endif -+ -+#define MAXSECTORS 1024 /* maximum number of sectors supported */ -+ -+/* A structure for identifying a flash part. There is one for each -+ * of the flash part definitions. We need to keep track of the -+ * sector organization, the address register used, and the size -+ * of the sectors. -+ */ -+struct flashinfo { -+ char *name; /* "Am29DL800T", etc. */ -+ unsigned long addr; /* physical address, once translated */ -+ int areg; /* Can be set to zero for all parts */ -+ int nsect; /* # of sectors -- 19 in LV, 22 in DL */ -+ int bank1start; /* first sector # in bank 1 */ -+ int bank2start; /* first sector # in bank 2, if DL part */ -+ struct { -+ long size; /* # of bytes in this sector */ -+ long base; /* offset from beginning of device */ -+ int bank; /* 1 or 2 for DL; 1 for LV */ -+ } sec[MAXSECTORS]; /* per-sector info */ -+}; -+ -+/* -+ * This structure holds all CFI query information as defined -+ * in the JEDEC standard. All information up to -+ * primary_extended_query is standard among all manufactures -+ * with CFI enabled devices. -+ */ -+ -+struct cfi_query { -+ int num_erase_blocks; /* Number of sector defs. */ -+ struct { -+ unsigned long sector_size; /* byte size of sector */ -+ int num_sectors; /* Num sectors of this size */ -+ } erase_block[8]; /* Max of 256, but 8 is good */ -+}; -+ -+/* Standard Boolean declarations */ -+#define TRUE 1 -+#define FALSE 0 -+ -+/* Define different type of flash */ -+#define FLASH_UNDEFINED 0 -+#define FLASH_AMD 1 -+#define FLASH_INTEL 2 -+#define FLASH_SST 3 -+ -+/* Command codes for the flash_command routine */ -+#define FLASH_RESET 0 /* reset to read mode */ -+#define FLASH_READ_ID 1 /* read device ID */ -+#define FLASH_CFIQUERY 2 /* CFI query */ -+#define FLASH_UB 3 /* go into unlock bypass mode */ -+#define FLASH_PROG 4 /* program a word */ -+#define FLASH_UBRESET 5 /* reset to read mode from unlock bypass mode */ -+#define FLASH_SERASE 6 /* sector erase */ -+ -+/* Return codes from flash_status */ -+#define STATUS_READY 0 /* ready for action */ -+#define STATUS_TIMEOUT 1 /* operation timed out */ -+ -+/* A list of AMD compatible device ID's - add others as needed */ -+#define ID_AM29DL800T 0x224A -+#define ID_AM29DL800B 0x22CB -+#define ID_AM29LV800T 0x22DA -+#define ID_AM29LV800B 0x225B -+#define ID_AM29LV400B 0x22BA -+ -+#define ID_AM29LV160B 0x2249 -+#define ID_AM29LV160T 0x22C4 -+ -+#define ID_AM29LV320T 0x22F6 -+#define ID_MX29LV320AT 0x22A7 -+#define ID_AM29LV320B 0x22F9 -+#define ID_MX29LV320AB 0x22A8 -+ -+#define ID_AM29LV320M 0x227E -+#define ID_AM29LV320MB 0x2200 -+#define ID_AM29LV320MT 0x2201 -+ -+#define ID_SST39VF1601 0x234B -+#define ID_SST39VF3201 0x235B -+ -+/* A list of Intel compatible device ID's - add others as needed */ -+#define ID_I28F160C3T 0x88C2 -+#define ID_I28F160C3B 0x88C3 -+#define ID_I28F320C3T 0x88C4 -+#define ID_I28F320C3B 0x88C5 -+ -+extern byte flash_init(void); -+extern int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes); -+extern int flash_read_buf(WORD sector, int offset, byte *buffer, int numbytes); -+extern byte flash_sector_erase_int(WORD sector); -+extern int flash_get_numsectors(void); -+extern int flash_get_sector_size(WORD sector); -+extern int flash_get_total_size(void); -+extern unsigned char *flash_get_memptr(WORD sector); -+extern int flash_get_blk(int addr); -+ -+#if defined __cplusplus -+} -+#endif -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/serial/bcm96348/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/bcm96348/Makefile ---- linux-2.6.8.1/bcmdrivers/opensource/char/serial/bcm96348/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/bcm96348/Makefile 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,13 @@ -+# File: bcmdrivers/opensource/char/serial -+# -+# Makefile for the BCM63xx serial/console driver -+ -+obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o -+ -+EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+ -+-include $(TOPDIR)/Rules.make -+ -+clean: -+ rm -f core *.o *.a *.s -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/serial/bcm96348/bcm63xx_cons.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/bcm96348/bcm63xx_cons.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/serial/bcm96348/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/bcm96348/bcm63xx_cons.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,1035 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+/* Description: Serial port driver for the BCM963XX. */ -+ -+#define CARDNAME "bcm963xx_serial driver" -+#define VERSION "2.0" -+#define VER_STR CARDNAME " v" VERSION "\n" -+ -+ -+#include <linux/kernel.h> -+#include <linux/module.h> -+#include <linux/version.h> -+#include <linux/init.h> -+#include <linux/slab.h> -+#include <linux/interrupt.h> -+ -+/* for definition of struct console */ -+#include <linux/console.h> -+#include <linux/tty.h> -+#include <linux/tty_flip.h> -+#include <linux/serial.h> -+#include <asm/uaccess.h> -+ -+#include <bcmtypes.h> -+#include <board.h> -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+extern void _putc(char); -+extern void _puts(const char *); -+ -+typedef struct bcm_serial { -+ volatile Uart * port; -+ int type; -+ int flags; -+ int irq; -+ int baud_base; -+ int blocked_open; -+ unsigned short close_delay; -+ unsigned short closing_wait; -+ unsigned short line; /* port/line number */ -+ unsigned short cflags; /* line configuration flag */ -+ unsigned short x_char; /* xon/xoff character */ -+ unsigned short read_status_mask; /* mask for read condition */ -+ unsigned short ignore_status_mask; /* mask for ignore condition */ -+ unsigned long event; /* mask used in BH */ -+ int xmit_head; /* Position of the head */ -+ int xmit_tail; /* Position of the tail */ -+ int xmit_cnt; /* Count of the chars in the buffer */ -+ int count; /* indicates how many times it has been opened */ -+ int magic; -+ -+ struct async_icount icount; /* keep track of things ... */ -+ struct tty_struct *tty; /* tty associated */ -+ struct termios normal_termios; -+ -+ wait_queue_head_t open_wait; -+ wait_queue_head_t close_wait; -+ -+ long session; /* Session of opening process */ -+ long pgrp; /* pgrp of opening process */ -+ -+ unsigned char is_initialized; -+} Context; -+ -+ -+/*---------------------------------------------------------------------*/ -+/* Define bits in the Interrupt Enable register */ -+/*---------------------------------------------------------------------*/ -+/* Enable receive interrupt */ -+#define RXINT (RXFIFONE|RXOVFERR) -+ -+/* Enable transmit interrupt */ -+#define TXINT (TXFIFOEMT|TXUNDERR|TXOVFERR) -+ -+/* Enable receiver line status interrupt */ -+#define LSINT (RXBRK|RXPARERR|RXFRAMERR) -+ -+#define BCM_NUM_UARTS 1 -+ -+#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) -+ -+ -+static struct bcm_serial multi[BCM_NUM_UARTS]; -+static struct bcm_serial *lines[BCM_NUM_UARTS]; -+static struct tty_driver serial_driver; -+static struct tty_struct *serial_table[BCM_NUM_UARTS]; -+static struct termios *serial_termios[BCM_NUM_UARTS]; -+static struct termios *serial_termios_locked[BCM_NUM_UARTS]; -+static int serial_refcount; -+ -+ -+static void bcm_stop (struct tty_struct *tty); -+static void bcm_start (struct tty_struct *tty); -+static inline void receive_chars (struct bcm_serial * info); -+static int startup (struct bcm_serial *info); -+static void shutdown (struct bcm_serial * info); -+static void change_speed( volatile Uart *pUart, tcflag_t cFlag ); -+static void bcm63xx_cons_flush_chars (struct tty_struct *tty); -+static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, -+ const unsigned char *buf, int count); -+static int bcm63xx_cons_write_room (struct tty_struct *tty); -+static int bcm_chars_in_buffer (struct tty_struct *tty); -+static void bcm_flush_buffer (struct tty_struct *tty); -+static void bcm_throttle (struct tty_struct *tty); -+static void bcm_unthrottle (struct tty_struct *tty); -+static void bcm_send_xchar (struct tty_struct *tty, char ch); -+static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo); -+static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info); -+static int get_lsr_info (struct bcm_serial *info, unsigned int *value); -+static void send_break (struct bcm_serial *info, int duration); -+static int bcm_ioctl (struct tty_struct * tty, struct file * file, -+ unsigned int cmd, unsigned long arg); -+static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios); -+static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp); -+static void bcm_hangup (struct tty_struct *tty); -+static int block_til_ready (struct tty_struct *tty, struct file *filp, struct bcm_serial *info); -+static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp); -+static int __init bcm63xx_serialinit(void); -+ -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_stop () and rs_start () -+ * -+ * These routines are called before setting or resetting -+ * tty->stopped. They enable or disable transmitter interrupts, -+ * as necessary. -+ * ------------------------------------------------------------ -+ */ -+static void bcm_stop (struct tty_struct *tty) -+{ -+} -+ -+static void bcm_start (struct tty_struct *tty) -+{ -+ _puts(CARDNAME " Start\n"); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * receive_char () -+ * -+ * This routine deals with inputs from any lines. -+ * ------------------------------------------------------------ -+ */ -+static inline void receive_chars (struct bcm_serial * info) -+{ -+ struct tty_struct *tty = 0; -+ struct async_icount * icount; -+ int ignore = 0; -+ unsigned short status, tmp; -+ UCHAR ch = 0; -+ while ((status = info->port->intStatus) & RXINT) -+ { -+ if (status & RXFIFONE) -+ ch = info->port->Data; // Read the character -+ tty = info->tty; /* now tty points to the proper dev */ -+ icount = &info->icount; -+ if (! tty) -+ break; -+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) -+ break; -+ *tty->flip.char_buf_ptr = ch; -+ *tty->flip.flag_buf_ptr = 0; -+ icount->rx++; -+ if (status & RXBRK) -+ { -+ *tty->flip.flag_buf_ptr = TTY_BREAK; -+ icount->brk++; -+ } -+ // keep track of the statistics -+ if (status & (RXFRAMERR | RXPARERR | RXOVFERR)) -+ { -+ if (status & RXPARERR) /* parity error */ -+ icount->parity++; -+ else -+ if (status & RXFRAMERR) /* frame error */ -+ icount->frame++; -+ if (status & RXOVFERR) -+ { -+ // Overflow. Reset the RX FIFO -+ info->port->fifoctl |= RSTRXFIFOS; -+ icount->overrun++; -+ } -+ // check to see if we should ignore the character -+ // and mask off conditions that should be ignored -+ if (status & info->ignore_status_mask) -+ { -+ if (++ignore > 100 ) -+ break; -+ goto ignore_char; -+ } -+ // Mask off the error conditions we want to ignore -+ tmp = status & info->read_status_mask; -+ if (tmp & RXPARERR) -+ { -+ *tty->flip.flag_buf_ptr = TTY_PARITY; -+ } -+ else -+ if (tmp & RXFRAMERR) -+ { -+ *tty->flip.flag_buf_ptr = TTY_FRAME; -+ } -+ if (tmp & RXOVFERR) -+ { -+ if (tty->flip.count < TTY_FLIPBUF_SIZE) -+ { -+ tty->flip.count++; -+ tty->flip.flag_buf_ptr++; -+ tty->flip.char_buf_ptr++; -+ *tty->flip.flag_buf_ptr = TTY_OVERRUN; -+ } -+ } -+ } -+ tty->flip.flag_buf_ptr++; -+ tty->flip.char_buf_ptr++; -+ tty->flip.count++; -+ } -+ignore_char: -+ if (tty) -+ tty_flip_buffer_push(tty); -+} -+ -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm_interrupt () -+ * -+ * this is the main interrupt routine for the chip. -+ * It deals with the multiple ports. -+ * ------------------------------------------------------------ -+ */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+static irqreturn_t bcm_interrupt (int irq, void * dev, struct pt_regs * regs) -+#else -+static void bcm_interrupt (int irq, void * dev, struct pt_regs * regs) -+#endif -+{ -+ struct bcm_serial * info = lines[0]; -+ UINT16 intStat; -+ -+ /* get pending interrupt flags from UART */ -+ -+ /* Mask with only the serial interrupts that are enabled */ -+ intStat = info->port->intStatus & info->port->intMask; -+ while (intStat) -+ { -+ if (intStat & RXINT) -+ receive_chars (info); -+ else -+ if (intStat & TXINT) -+ info->port->intStatus = TXINT; -+ else /* don't know what it was, so let's mask it */ -+ info->port->intMask &= ~intStat; -+ -+ intStat = info->port->intStatus & info->port->intMask; -+ } -+ -+ // Clear the interrupt -+ BcmHalInterruptEnable (INTERRUPT_ID_UART); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ return IRQ_HANDLED; -+#endif -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * startup () -+ * -+ * various initialization tasks -+ * ------------------------------------------------------------------- -+ */ -+static int startup (struct bcm_serial *info) -+{ -+ // Port is already started... -+ return 0; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * shutdown () -+ * -+ * This routine will shutdown a serial port; interrupts are disabled, and -+ * DTR is dropped if the hangup on close termio flag is on. -+ * ------------------------------------------------------------------- -+ */ -+static void shutdown (struct bcm_serial * info) -+{ -+ unsigned long flags; -+ if (!info->is_initialized) -+ return; -+ -+ save_flags (flags); -+ cli (); -+ -+ info->port->control &= ~(BRGEN|TXEN|RXEN); -+ if (info->tty) -+ set_bit (TTY_IO_ERROR, &info->tty->flags); -+ info->is_initialized = 0; -+ -+ restore_flags (flags); -+} -+/* -+ * ------------------------------------------------------------------- -+ * change_speed () -+ * -+ * Set the baud rate, character size, parity and stop bits. -+ * ------------------------------------------------------------------- -+ */ -+static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) -+{ -+ unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; -+ save_flags(ulFlags); -+ cli(); -+ switch( cFlag & (CBAUD | CBAUDEX) ) -+ { -+ case B115200: -+ ulBaud = 115200; -+ break; -+ case B57600: -+ ulBaud = 57600; -+ break; -+ case B38400: -+ ulBaud = 38400; -+ break; -+ case B19200: -+ ulBaud = 19200; -+ break; -+ case B9600: -+ ulBaud = 9600; -+ break; -+ case B4800: -+ ulBaud = 4800; -+ break; -+ case B2400: -+ ulBaud = 2400; -+ break; -+ case B1800: -+ ulBaud = 1800; -+ break; -+ case B1200: -+ ulBaud = 1200; -+ break; -+ case B600: -+ ulBaud = 600; -+ break; -+ case B300: -+ ulBaud = 300; -+ break; -+ case B200: -+ ulBaud = 200; -+ break; -+ case B150: -+ ulBaud = 150; -+ break; -+ case B134: -+ ulBaud = 134; -+ break; -+ case B110: -+ ulBaud = 110; -+ break; -+ case B75: -+ ulBaud = 75; -+ break; -+ case B50: -+ ulBaud = 50; -+ break; -+ default: -+ ulBaud = 115200; -+ break; -+ } -+ -+ /* Calculate buad rate. */ -+ ulClockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; -+ ulTmp = (ulClockFreqHz / ulBaud) / 16; -+ if( ulTmp & 0x01 ) -+ ulTmp /= 2; /* Rounding up, so sub is already accounted for */ -+ else -+ ulTmp = (ulTmp / 2) - 1; /* Rounding down so we must sub 1 */ -+ pUart->baudword = ulTmp; -+ -+ /* Set character size, stop bits and parity. */ -+ switch( cFlag & CSIZE ) -+ { -+ case CS5: -+ ulTmp = BITS5SYM; /* select transmit 5 bit data size */ -+ break; -+ case CS6: -+ ulTmp = BITS6SYM; /* select transmit 6 bit data size */ -+ break; -+ case CS7: -+ ulTmp = BITS7SYM; /* select transmit 7 bit data size */ -+ break; -+ /*case CS8:*/ -+ default: -+ ulTmp = BITS8SYM; /* select transmit 8 bit data size */ -+ break; -+ } -+ if( cFlag & CSTOPB ) -+ ulTmp |= TWOSTOP; /* select 2 stop bits */ -+ else -+ ulTmp |= ONESTOP; /* select one stop bit */ -+ -+ /* Write these values into the config reg. */ -+ pUart->config = ulTmp; -+ pUart->control &= ~(RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN); -+ switch( cFlag & (PARENB | PARODD) ) -+ { -+ case PARENB|PARODD: -+ pUart->control |= RXPARITYEN | TXPARITYEN; -+ break; -+ case PARENB: -+ pUart->control |= RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN; -+ break; -+ default: -+ pUart->control |= 0; -+ break; -+ } -+ -+ /* Reset and flush uart */ -+ pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; -+ restore_flags( ulFlags ); -+} -+ -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_flush_char () -+ * -+ * Nothing to flush. Polled I/O is used. -+ * ------------------------------------------------------------------- -+ */ -+static void bcm63xx_cons_flush_chars (struct tty_struct *tty) -+{ -+} -+ -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm63xx_cons_write () -+ * -+ * Main output routine using polled I/O. -+ * ------------------------------------------------------------------- -+ */ -+static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, -+ const unsigned char *buf, int count) -+{ -+ int c; -+ -+ for (c = 0; c < count; c++) -+ _putc(buf[c]); -+ return count; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm63xx_cons_write_room () -+ * -+ * Compute the amount of space available for writing. -+ * ------------------------------------------------------------------- -+ */ -+static int bcm63xx_cons_write_room (struct tty_struct *tty) -+{ -+ /* Pick a number. Any number. Polled I/O is used. */ -+ return 1024; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_chars_in_buffer () -+ * -+ * compute the amount of char left to be transmitted -+ * ------------------------------------------------------------------- -+ */ -+static int bcm_chars_in_buffer (struct tty_struct *tty) -+{ -+ return 0; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_flush_buffer () -+ * -+ * Empty the output buffer -+ * ------------------------------------------------------------------- -+ */ -+static void bcm_flush_buffer (struct tty_struct *tty) -+{ -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm_throttle () and bcm_unthrottle () -+ * -+ * This routine is called by the upper-layer tty layer to signal that -+ * incoming characters should be throttled (or not). -+ * ------------------------------------------------------------ -+ */ -+static void bcm_throttle (struct tty_struct *tty) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ if (I_IXOFF(tty)) -+ info->x_char = STOP_CHAR(tty); -+} -+ -+static void bcm_unthrottle (struct tty_struct *tty) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ if (I_IXOFF(tty)) -+ { -+ if (info->x_char) -+ info->x_char = 0; -+ else -+ info->x_char = START_CHAR(tty); -+ } -+} -+ -+static void bcm_send_xchar (struct tty_struct *tty, char ch) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ info->x_char = ch; -+ if (ch) -+ bcm_start (info->tty); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_ioctl () and friends -+ * ------------------------------------------------------------ -+ */ -+static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo) -+{ -+ struct serial_struct tmp; -+ -+ if (!retinfo) -+ return -EFAULT; -+ -+ memset (&tmp, 0, sizeof(tmp)); -+ tmp.type = info->type; -+ tmp.line = info->line; -+ tmp.port = (int) info->port; -+ tmp.irq = info->irq; -+ tmp.flags = 0; -+ tmp.baud_base = info->baud_base; -+ tmp.close_delay = info->close_delay; -+ tmp.closing_wait = info->closing_wait; -+ -+ return copy_to_user (retinfo, &tmp, sizeof(*retinfo)); -+} -+ -+static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info) -+{ -+ struct serial_struct new_serial; -+ struct bcm_serial old_info; -+ int retval = 0; -+ -+ if (!new_info) -+ return -EFAULT; -+ -+ copy_from_user (&new_serial, new_info, sizeof(new_serial)); -+ old_info = *info; -+ -+ if (!capable(CAP_SYS_ADMIN)) -+ return -EPERM; -+ -+ -+ if (info->count > 1) -+ return -EBUSY; -+ -+ /* OK, past this point, all the error checking has been done. -+ * At this point, we start making changes..... -+ */ -+ info->baud_base = new_serial.baud_base; -+ info->type = new_serial.type; -+ info->close_delay = new_serial.close_delay; -+ info->closing_wait = new_serial.closing_wait; -+ retval = startup (info); -+ return retval; -+} -+ -+/* -+ * get_lsr_info - get line status register info -+ * -+ * Purpose: Let user call ioctl() to get info when the UART physically -+ * is emptied. On bus types like RS485, the transmitter must -+ * release the bus after transmitting. This must be done when -+ * the transmit shift register is empty, not be done when the -+ * transmit holding register is empty. This functionality -+ * allows an RS485 driver to be written in user space. -+ */ -+static int get_lsr_info (struct bcm_serial *info, unsigned int *value) -+{ -+ return( 0 ); -+} -+ -+/* -+ * This routine sends a break character out the serial port. -+ */ -+static void send_break (struct bcm_serial *info, int duration) -+{ -+ unsigned long flags; -+ -+ if (!info->port) -+ return; -+ -+ current->state = TASK_INTERRUPTIBLE; -+ -+ save_flags (flags); -+ cli(); -+ -+ info->port->control |= XMITBREAK; -+ schedule_timeout(duration); -+ info->port->control &= ~XMITBREAK; -+ -+ restore_flags (flags); -+} -+ -+static int bcm_ioctl (struct tty_struct * tty, struct file * file, -+ unsigned int cmd, unsigned long arg) -+{ -+ int error; -+ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; -+ int retval; -+ -+ if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && -+ (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) && -+ (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) -+ { -+ if (tty->flags & (1 << TTY_IO_ERROR)) -+ return -EIO; -+ } -+ switch (cmd) -+ { -+ -+ case TCSBRK: /* SVID version: non-zero arg --> no break */ -+ retval = tty_check_change (tty); -+ if (retval) -+ return retval; -+ tty_wait_until_sent (tty, 0); -+ if (!arg) -+ send_break (info, HZ/4); /* 1/4 second */ -+ return 0; -+ -+ case TCSBRKP: /* support for POSIX tcsendbreak() */ -+ retval = tty_check_change (tty); -+ if (retval) -+ return retval; -+ tty_wait_until_sent (tty, 0); -+ send_break (info, arg ? arg*(HZ/10) : HZ/4); -+ return 0; -+ -+ case TIOCGSOFTCAR: -+ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(long)); -+ if (error) -+ return error; -+ put_user (C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg); -+ return 0; -+ -+ case TIOCSSOFTCAR: -+ error = get_user (arg, (unsigned long *)arg); -+ if (error) -+ return error; -+ tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); -+ return 0; -+ -+ case TIOCGSERIAL: -+ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct serial_struct)); -+ if (error) -+ return error; -+ return get_serial_info (info, (struct serial_struct *)arg); -+ -+ case TIOCSSERIAL: -+ return set_serial_info (info, (struct serial_struct *) arg); -+ -+ case TIOCSERGETLSR: /* Get line status register */ -+ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(unsigned int)); -+ if (error) -+ return error; -+ else -+ return get_lsr_info (info, (unsigned int *)arg); -+ -+ case TIOCSERGSTRUCT: -+ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct bcm_serial)); -+ if (error) -+ return error; -+ copy_to_user((struct bcm_serial *)arg, info, sizeof(struct bcm_serial)); -+ return 0; -+ -+ default: -+ return -ENOIOCTLCMD; -+ } -+ return 0; -+} -+ -+static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ -+ if( tty->termios->c_cflag != old_termios->c_cflag ) -+ change_speed (info->port, tty->termios->c_cflag); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm63xx_cons_close() -+ * -+ * This routine is called when the serial port gets closed. First, we -+ * wait for the last remaining data to be sent. Then, we turn off -+ * the transmit enable and receive enable flags. -+ * ------------------------------------------------------------ -+ */ -+static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp) -+{ -+ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; -+ unsigned long flags; -+ -+ if (!info) -+ return; -+ -+ save_flags (flags); -+ cli(); -+ -+ if (tty_hung_up_p (filp)) -+ { -+ restore_flags (flags); -+ return; -+ } -+ -+ if ((tty->count == 1) && (info->count != 1)) -+ { -+ -+ /* Uh, oh. tty->count is 1, which means that the tty -+ * structure will be freed. Info->count should always -+ * be one in these conditions. If it's greater than -+ * one, we've got real problems, since it means the -+ * serial port won't be shutdown. -+ */ -+ printk("bcm63xx_cons_close: bad serial port count; tty->count is 1, " -+ "info->count is %d\n", info->count); -+ info->count = 1; -+ } -+ -+ if (--info->count < 0) -+ { -+ printk("ds_close: bad serial port count for ttys%d: %d\n", -+ info->line, info->count); -+ info->count = 0; -+ } -+ -+ if (info->count) -+ { -+ restore_flags (flags); -+ return; -+ } -+ -+ /* Now we wait for the transmit buffer to clear; and we notify -+ * the line discipline to only process XON/XOFF characters. -+ */ -+ tty->closing = 1; -+ -+ /* At this point we stop accepting input. To do this, we -+ * disable the receive line status interrupts. -+ */ -+ shutdown (info); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ if (tty->driver->flush_buffer) -+ tty->driver->flush_buffer (tty); -+#else -+ if (tty->driver.flush_buffer) -+ tty->driver.flush_buffer (tty); -+#endif -+ if (tty->ldisc.flush_buffer) -+ tty->ldisc.flush_buffer (tty); -+ -+ tty->closing = 0; -+ info->event = 0; -+ info->tty = 0; -+ if (tty->ldisc.num != ldiscs[N_TTY].num) -+ { -+ if (tty->ldisc.close) -+ (tty->ldisc.close)(tty); -+ tty->ldisc = ldiscs[N_TTY]; -+ tty->termios->c_line = N_TTY; -+ if (tty->ldisc.open) -+ (tty->ldisc.open)(tty); -+ } -+ if (info->blocked_open) -+ { -+ if (info->close_delay) -+ { -+ current->state = TASK_INTERRUPTIBLE; -+ schedule_timeout(info->close_delay); -+ } -+ wake_up_interruptible (&info->open_wait); -+ } -+ wake_up_interruptible (&info->close_wait); -+ -+ restore_flags (flags); -+} -+ -+/* -+ * bcm_hangup () --- called by tty_hangup() when a hangup is signaled. -+ */ -+static void bcm_hangup (struct tty_struct *tty) -+{ -+ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ -+ shutdown (info); -+ info->event = 0; -+ info->count = 0; -+ info->tty = 0; -+ wake_up_interruptible (&info->open_wait); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_open() and friends -+ * ------------------------------------------------------------ -+ */ -+static int block_til_ready (struct tty_struct *tty, struct file *filp, -+ struct bcm_serial *info) -+{ -+ return 0; -+} -+ -+/* -+ * This routine is called whenever a serial port is opened. It -+ * enables interrupts for a serial port. It also performs the -+ * serial-specific initialization for the tty structure. -+ */ -+static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp) -+{ -+ struct bcm_serial *info; -+ int retval, line; -+ -+ // Make sure we're only opening on of the ports we support -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ line = MINOR(tty->driver->cdev.dev) - tty->driver->minor_start; -+#else -+ line = MINOR(tty->device) - tty->driver.minor_start; -+#endif -+ -+ if ((line < 0) || (line >= BCM_NUM_UARTS)) -+ return -ENODEV; -+ -+ info = lines[line]; -+ -+ info->port->intMask = 0; /* Clear any pending interrupts */ -+ info->port->intMask = RXINT; /* Enable RX */ -+ -+ info->count++; -+ tty->driver_data = info; -+ info->tty = tty; -+ BcmHalInterruptEnable (INTERRUPT_ID_UART); -+ -+ // Start up serial port -+ retval = startup (info); -+ if (retval) -+ return retval; -+ -+ retval = block_til_ready (tty, filp, info); -+ if (retval) -+ return retval; -+ -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ info->pgrp = process_group(current); -+ info->session = current->signal->session; -+#else -+ info->session = current->session; -+ info->pgrp = current->pgrp; -+#endif -+ -+ return 0; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: bcm63xx_serialinit -+ Purpose: Initialize our BCM63xx serial driver -+-------------------------------------------------------------------------- */ -+static int __init bcm63xx_serialinit(void) -+{ -+ int i, flags; -+ struct bcm_serial * info; -+ -+ // Print the driver version information -+ printk(VER_STR); -+ -+ memset(&serial_driver, 0, sizeof(struct tty_driver)); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ serial_driver.owner = THIS_MODULE; -+ serial_driver.devfs_name = "tts/"; -+#endif -+ serial_driver.magic = TTY_DRIVER_MAGIC; -+ serial_driver.name = "ttyS"; -+ serial_driver.major = TTY_MAJOR; -+ serial_driver.minor_start = 64; -+ serial_driver.num = BCM_NUM_UARTS; -+ serial_driver.type = TTY_DRIVER_TYPE_SERIAL; -+ serial_driver.subtype = SERIAL_TYPE_NORMAL; -+ serial_driver.init_termios = tty_std_termios; -+ serial_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | CLOCAL; -+ serial_driver.flags = TTY_DRIVER_REAL_RAW; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ serial_driver.refcount = serial_refcount; -+ serial_driver.ttys = serial_table; -+#else -+ serial_driver.refcount = &serial_refcount; -+ serial_driver.table = serial_table; -+#endif -+ -+ serial_driver.termios = serial_termios; -+ serial_driver.termios_locked = serial_termios_locked; -+ serial_driver.open = bcm63xx_cons_open; -+ serial_driver.close = bcm63xx_cons_close; -+ serial_driver.write = bcm63xx_cons_write; -+ serial_driver.flush_chars = bcm63xx_cons_flush_chars; -+ serial_driver.write_room = bcm63xx_cons_write_room; -+ serial_driver.chars_in_buffer = bcm_chars_in_buffer; -+ serial_driver.flush_buffer = bcm_flush_buffer; -+ serial_driver.ioctl = bcm_ioctl; -+ serial_driver.throttle = bcm_throttle; -+ serial_driver.unthrottle = bcm_unthrottle; -+ serial_driver.send_xchar = bcm_send_xchar; -+ serial_driver.set_termios = bcm_set_termios; -+ serial_driver.stop = bcm_stop; -+ serial_driver.start = bcm_start; -+ serial_driver.hangup = bcm_hangup; -+ -+ if (tty_register_driver (&serial_driver)) -+ panic("Couldn't register serial driver\n"); -+ -+ save_flags(flags); cli(); -+ for (i = 0; i < BCM_NUM_UARTS; i++) -+ { -+ info = &multi[i]; -+ lines[i] = info; -+ info->port = (Uart *) ((char *)UART_BASE + (i * 0x20)); -+ info->irq = (2 - i) + 8; -+ info->line = i; -+ info->tty = 0; -+ info->close_delay = 50; -+ info->closing_wait = 3000; -+ info->x_char = 0; -+ info->event = 0; -+ info->count = 0; -+ info->blocked_open = 0; -+ info->normal_termios = serial_driver.init_termios; -+ init_waitqueue_head(&info->open_wait); -+ init_waitqueue_head(&info->close_wait); -+ -+ /* If we are pointing to address zero then punt - not correctly -+ * set up in setup.c to handle this. -+ */ -+ if (! info->port) -+ return 0; -+ BcmHalMapInterrupt(bcm_interrupt, 0, INTERRUPT_ID_UART); -+ } -+ -+ /* order matters here... the trick is that flags -+ * is updated... in request_irq - to immediatedly obliterate -+ * it is unwise. -+ */ -+ restore_flags(flags); -+ return 0; -+} -+ -+module_init(bcm63xx_serialinit); -+ -+/* -------------------------------------------------------------------------- -+ Name: bcm_console_print -+ Purpose: bcm_console_print is registered for printk. -+ The console_lock must be held when we get here. -+-------------------------------------------------------------------------- */ -+static void bcm_console_print (struct console * cons, const char * str, -+ unsigned int count) -+{ -+ unsigned int i; -+ //_puts(str); -+ for(i=0; i<count; i++, str++) -+ { -+ _putc(*str); -+ if (*str == 10) -+ { -+ _putc(13); -+ } -+ } -+} -+ -+static struct tty_driver * bcm_console_device(struct console * c, int *index) -+{ -+ *index = c->index; -+ return &serial_driver; -+} -+ -+static int __init bcm_console_setup(struct console * co, char * options) -+{ -+ return 0; -+} -+ -+static struct console bcm_sercons = { -+ .name = "ttyS", -+ .write = bcm_console_print, -+ .device = bcm_console_device, -+ .setup = bcm_console_setup, -+ .flags = CON_PRINTBUFFER, // CON_CONSDEV, CONSOLE_LINE, -+ .index = -1, -+}; -+ -+static int __init bcm63xx_console_init(void) -+{ -+ register_console(&bcm_sercons); -+ return 0; -+} -+ -+console_initcall(bcm63xx_console_init); -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/serial/impl1/Makefile linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile ---- linux-2.6.8.1/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,13 @@ -+# File: bcmdrivers/opensource/char/serial -+# -+# Makefile for the BCM63xx serial/console driver -+ -+obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o -+ -+EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+ -+-include $(TOPDIR)/Rules.make -+ -+clean: -+ rm -f core *.o *.a *.s -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c ---- linux-2.6.8.1/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,1035 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+/* Description: Serial port driver for the BCM963XX. */ -+ -+#define CARDNAME "bcm963xx_serial driver" -+#define VERSION "2.0" -+#define VER_STR CARDNAME " v" VERSION "\n" -+ -+ -+#include <linux/kernel.h> -+#include <linux/module.h> -+#include <linux/version.h> -+#include <linux/init.h> -+#include <linux/slab.h> -+#include <linux/interrupt.h> -+ -+/* for definition of struct console */ -+#include <linux/console.h> -+#include <linux/tty.h> -+#include <linux/tty_flip.h> -+#include <linux/serial.h> -+#include <asm/uaccess.h> -+ -+#include <bcmtypes.h> -+#include <board.h> -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+extern void _putc(char); -+extern void _puts(const char *); -+ -+typedef struct bcm_serial { -+ volatile Uart * port; -+ int type; -+ int flags; -+ int irq; -+ int baud_base; -+ int blocked_open; -+ unsigned short close_delay; -+ unsigned short closing_wait; -+ unsigned short line; /* port/line number */ -+ unsigned short cflags; /* line configuration flag */ -+ unsigned short x_char; /* xon/xoff character */ -+ unsigned short read_status_mask; /* mask for read condition */ -+ unsigned short ignore_status_mask; /* mask for ignore condition */ -+ unsigned long event; /* mask used in BH */ -+ int xmit_head; /* Position of the head */ -+ int xmit_tail; /* Position of the tail */ -+ int xmit_cnt; /* Count of the chars in the buffer */ -+ int count; /* indicates how many times it has been opened */ -+ int magic; -+ -+ struct async_icount icount; /* keep track of things ... */ -+ struct tty_struct *tty; /* tty associated */ -+ struct termios normal_termios; -+ -+ wait_queue_head_t open_wait; -+ wait_queue_head_t close_wait; -+ -+ long session; /* Session of opening process */ -+ long pgrp; /* pgrp of opening process */ -+ -+ unsigned char is_initialized; -+} Context; -+ -+ -+/*---------------------------------------------------------------------*/ -+/* Define bits in the Interrupt Enable register */ -+/*---------------------------------------------------------------------*/ -+/* Enable receive interrupt */ -+#define RXINT (RXFIFONE|RXOVFERR) -+ -+/* Enable transmit interrupt */ -+#define TXINT (TXFIFOEMT|TXUNDERR|TXOVFERR) -+ -+/* Enable receiver line status interrupt */ -+#define LSINT (RXBRK|RXPARERR|RXFRAMERR) -+ -+#define BCM_NUM_UARTS 1 -+ -+#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) -+ -+ -+static struct bcm_serial multi[BCM_NUM_UARTS]; -+static struct bcm_serial *lines[BCM_NUM_UARTS]; -+static struct tty_driver serial_driver; -+static struct tty_struct *serial_table[BCM_NUM_UARTS]; -+static struct termios *serial_termios[BCM_NUM_UARTS]; -+static struct termios *serial_termios_locked[BCM_NUM_UARTS]; -+static int serial_refcount; -+ -+ -+static void bcm_stop (struct tty_struct *tty); -+static void bcm_start (struct tty_struct *tty); -+static inline void receive_chars (struct bcm_serial * info); -+static int startup (struct bcm_serial *info); -+static void shutdown (struct bcm_serial * info); -+static void change_speed( volatile Uart *pUart, tcflag_t cFlag ); -+static void bcm63xx_cons_flush_chars (struct tty_struct *tty); -+static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, -+ const unsigned char *buf, int count); -+static int bcm63xx_cons_write_room (struct tty_struct *tty); -+static int bcm_chars_in_buffer (struct tty_struct *tty); -+static void bcm_flush_buffer (struct tty_struct *tty); -+static void bcm_throttle (struct tty_struct *tty); -+static void bcm_unthrottle (struct tty_struct *tty); -+static void bcm_send_xchar (struct tty_struct *tty, char ch); -+static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo); -+static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info); -+static int get_lsr_info (struct bcm_serial *info, unsigned int *value); -+static void send_break (struct bcm_serial *info, int duration); -+static int bcm_ioctl (struct tty_struct * tty, struct file * file, -+ unsigned int cmd, unsigned long arg); -+static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios); -+static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp); -+static void bcm_hangup (struct tty_struct *tty); -+static int block_til_ready (struct tty_struct *tty, struct file *filp, struct bcm_serial *info); -+static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp); -+static int __init bcm63xx_serialinit(void); -+ -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_stop () and rs_start () -+ * -+ * These routines are called before setting or resetting -+ * tty->stopped. They enable or disable transmitter interrupts, -+ * as necessary. -+ * ------------------------------------------------------------ -+ */ -+static void bcm_stop (struct tty_struct *tty) -+{ -+} -+ -+static void bcm_start (struct tty_struct *tty) -+{ -+ _puts(CARDNAME " Start\n"); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * receive_char () -+ * -+ * This routine deals with inputs from any lines. -+ * ------------------------------------------------------------ -+ */ -+static inline void receive_chars (struct bcm_serial * info) -+{ -+ struct tty_struct *tty = 0; -+ struct async_icount * icount; -+ int ignore = 0; -+ unsigned short status, tmp; -+ UCHAR ch = 0; -+ while ((status = info->port->intStatus) & RXINT) -+ { -+ if (status & RXFIFONE) -+ ch = info->port->Data; // Read the character -+ tty = info->tty; /* now tty points to the proper dev */ -+ icount = &info->icount; -+ if (! tty) -+ break; -+ if (tty->flip.count >= TTY_FLIPBUF_SIZE) -+ break; -+ *tty->flip.char_buf_ptr = ch; -+ *tty->flip.flag_buf_ptr = 0; -+ icount->rx++; -+ if (status & RXBRK) -+ { -+ *tty->flip.flag_buf_ptr = TTY_BREAK; -+ icount->brk++; -+ } -+ // keep track of the statistics -+ if (status & (RXFRAMERR | RXPARERR | RXOVFERR)) -+ { -+ if (status & RXPARERR) /* parity error */ -+ icount->parity++; -+ else -+ if (status & RXFRAMERR) /* frame error */ -+ icount->frame++; -+ if (status & RXOVFERR) -+ { -+ // Overflow. Reset the RX FIFO -+ info->port->fifoctl |= RSTRXFIFOS; -+ icount->overrun++; -+ } -+ // check to see if we should ignore the character -+ // and mask off conditions that should be ignored -+ if (status & info->ignore_status_mask) -+ { -+ if (++ignore > 100 ) -+ break; -+ goto ignore_char; -+ } -+ // Mask off the error conditions we want to ignore -+ tmp = status & info->read_status_mask; -+ if (tmp & RXPARERR) -+ { -+ *tty->flip.flag_buf_ptr = TTY_PARITY; -+ } -+ else -+ if (tmp & RXFRAMERR) -+ { -+ *tty->flip.flag_buf_ptr = TTY_FRAME; -+ } -+ if (tmp & RXOVFERR) -+ { -+ if (tty->flip.count < TTY_FLIPBUF_SIZE) -+ { -+ tty->flip.count++; -+ tty->flip.flag_buf_ptr++; -+ tty->flip.char_buf_ptr++; -+ *tty->flip.flag_buf_ptr = TTY_OVERRUN; -+ } -+ } -+ } -+ tty->flip.flag_buf_ptr++; -+ tty->flip.char_buf_ptr++; -+ tty->flip.count++; -+ } -+ignore_char: -+ if (tty) -+ tty_flip_buffer_push(tty); -+} -+ -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm_interrupt () -+ * -+ * this is the main interrupt routine for the chip. -+ * It deals with the multiple ports. -+ * ------------------------------------------------------------ -+ */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+static irqreturn_t bcm_interrupt (int irq, void * dev, struct pt_regs * regs) -+#else -+static void bcm_interrupt (int irq, void * dev, struct pt_regs * regs) -+#endif -+{ -+ struct bcm_serial * info = lines[0]; -+ UINT16 intStat; -+ -+ /* get pending interrupt flags from UART */ -+ -+ /* Mask with only the serial interrupts that are enabled */ -+ intStat = info->port->intStatus & info->port->intMask; -+ while (intStat) -+ { -+ if (intStat & RXINT) -+ receive_chars (info); -+ else -+ if (intStat & TXINT) -+ info->port->intStatus = TXINT; -+ else /* don't know what it was, so let's mask it */ -+ info->port->intMask &= ~intStat; -+ -+ intStat = info->port->intStatus & info->port->intMask; -+ } -+ -+ // Clear the interrupt -+ BcmHalInterruptEnable (INTERRUPT_ID_UART); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ return IRQ_HANDLED; -+#endif -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * startup () -+ * -+ * various initialization tasks -+ * ------------------------------------------------------------------- -+ */ -+static int startup (struct bcm_serial *info) -+{ -+ // Port is already started... -+ return 0; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * shutdown () -+ * -+ * This routine will shutdown a serial port; interrupts are disabled, and -+ * DTR is dropped if the hangup on close termio flag is on. -+ * ------------------------------------------------------------------- -+ */ -+static void shutdown (struct bcm_serial * info) -+{ -+ unsigned long flags; -+ if (!info->is_initialized) -+ return; -+ -+ save_flags (flags); -+ cli (); -+ -+ info->port->control &= ~(BRGEN|TXEN|RXEN); -+ if (info->tty) -+ set_bit (TTY_IO_ERROR, &info->tty->flags); -+ info->is_initialized = 0; -+ -+ restore_flags (flags); -+} -+/* -+ * ------------------------------------------------------------------- -+ * change_speed () -+ * -+ * Set the baud rate, character size, parity and stop bits. -+ * ------------------------------------------------------------------- -+ */ -+static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) -+{ -+ unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; -+ save_flags(ulFlags); -+ cli(); -+ switch( cFlag & (CBAUD | CBAUDEX) ) -+ { -+ case B115200: -+ ulBaud = 115200; -+ break; -+ case B57600: -+ ulBaud = 57600; -+ break; -+ case B38400: -+ ulBaud = 38400; -+ break; -+ case B19200: -+ ulBaud = 19200; -+ break; -+ case B9600: -+ ulBaud = 9600; -+ break; -+ case B4800: -+ ulBaud = 4800; -+ break; -+ case B2400: -+ ulBaud = 2400; -+ break; -+ case B1800: -+ ulBaud = 1800; -+ break; -+ case B1200: -+ ulBaud = 1200; -+ break; -+ case B600: -+ ulBaud = 600; -+ break; -+ case B300: -+ ulBaud = 300; -+ break; -+ case B200: -+ ulBaud = 200; -+ break; -+ case B150: -+ ulBaud = 150; -+ break; -+ case B134: -+ ulBaud = 134; -+ break; -+ case B110: -+ ulBaud = 110; -+ break; -+ case B75: -+ ulBaud = 75; -+ break; -+ case B50: -+ ulBaud = 50; -+ break; -+ default: -+ ulBaud = 115200; -+ break; -+ } -+ -+ /* Calculate buad rate. */ -+ ulClockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; -+ ulTmp = (ulClockFreqHz / ulBaud) / 16; -+ if( ulTmp & 0x01 ) -+ ulTmp /= 2; /* Rounding up, so sub is already accounted for */ -+ else -+ ulTmp = (ulTmp / 2) - 1; /* Rounding down so we must sub 1 */ -+ pUart->baudword = ulTmp; -+ -+ /* Set character size, stop bits and parity. */ -+ switch( cFlag & CSIZE ) -+ { -+ case CS5: -+ ulTmp = BITS5SYM; /* select transmit 5 bit data size */ -+ break; -+ case CS6: -+ ulTmp = BITS6SYM; /* select transmit 6 bit data size */ -+ break; -+ case CS7: -+ ulTmp = BITS7SYM; /* select transmit 7 bit data size */ -+ break; -+ /*case CS8:*/ -+ default: -+ ulTmp = BITS8SYM; /* select transmit 8 bit data size */ -+ break; -+ } -+ if( cFlag & CSTOPB ) -+ ulTmp |= TWOSTOP; /* select 2 stop bits */ -+ else -+ ulTmp |= ONESTOP; /* select one stop bit */ -+ -+ /* Write these values into the config reg. */ -+ pUart->config = ulTmp; -+ pUart->control &= ~(RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN); -+ switch( cFlag & (PARENB | PARODD) ) -+ { -+ case PARENB|PARODD: -+ pUart->control |= RXPARITYEN | TXPARITYEN; -+ break; -+ case PARENB: -+ pUart->control |= RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN; -+ break; -+ default: -+ pUart->control |= 0; -+ break; -+ } -+ -+ /* Reset and flush uart */ -+ pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; -+ restore_flags( ulFlags ); -+} -+ -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_flush_char () -+ * -+ * Nothing to flush. Polled I/O is used. -+ * ------------------------------------------------------------------- -+ */ -+static void bcm63xx_cons_flush_chars (struct tty_struct *tty) -+{ -+} -+ -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm63xx_cons_write () -+ * -+ * Main output routine using polled I/O. -+ * ------------------------------------------------------------------- -+ */ -+static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, -+ const unsigned char *buf, int count) -+{ -+ int c; -+ -+ for (c = 0; c < count; c++) -+ _putc(buf[c]); -+ return count; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm63xx_cons_write_room () -+ * -+ * Compute the amount of space available for writing. -+ * ------------------------------------------------------------------- -+ */ -+static int bcm63xx_cons_write_room (struct tty_struct *tty) -+{ -+ /* Pick a number. Any number. Polled I/O is used. */ -+ return 1024; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_chars_in_buffer () -+ * -+ * compute the amount of char left to be transmitted -+ * ------------------------------------------------------------------- -+ */ -+static int bcm_chars_in_buffer (struct tty_struct *tty) -+{ -+ return 0; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_flush_buffer () -+ * -+ * Empty the output buffer -+ * ------------------------------------------------------------------- -+ */ -+static void bcm_flush_buffer (struct tty_struct *tty) -+{ -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm_throttle () and bcm_unthrottle () -+ * -+ * This routine is called by the upper-layer tty layer to signal that -+ * incoming characters should be throttled (or not). -+ * ------------------------------------------------------------ -+ */ -+static void bcm_throttle (struct tty_struct *tty) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ if (I_IXOFF(tty)) -+ info->x_char = STOP_CHAR(tty); -+} -+ -+static void bcm_unthrottle (struct tty_struct *tty) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ if (I_IXOFF(tty)) -+ { -+ if (info->x_char) -+ info->x_char = 0; -+ else -+ info->x_char = START_CHAR(tty); -+ } -+} -+ -+static void bcm_send_xchar (struct tty_struct *tty, char ch) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ info->x_char = ch; -+ if (ch) -+ bcm_start (info->tty); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_ioctl () and friends -+ * ------------------------------------------------------------ -+ */ -+static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo) -+{ -+ struct serial_struct tmp; -+ -+ if (!retinfo) -+ return -EFAULT; -+ -+ memset (&tmp, 0, sizeof(tmp)); -+ tmp.type = info->type; -+ tmp.line = info->line; -+ tmp.port = (int) info->port; -+ tmp.irq = info->irq; -+ tmp.flags = 0; -+ tmp.baud_base = info->baud_base; -+ tmp.close_delay = info->close_delay; -+ tmp.closing_wait = info->closing_wait; -+ -+ return copy_to_user (retinfo, &tmp, sizeof(*retinfo)); -+} -+ -+static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info) -+{ -+ struct serial_struct new_serial; -+ struct bcm_serial old_info; -+ int retval = 0; -+ -+ if (!new_info) -+ return -EFAULT; -+ -+ copy_from_user (&new_serial, new_info, sizeof(new_serial)); -+ old_info = *info; -+ -+ if (!capable(CAP_SYS_ADMIN)) -+ return -EPERM; -+ -+ -+ if (info->count > 1) -+ return -EBUSY; -+ -+ /* OK, past this point, all the error checking has been done. -+ * At this point, we start making changes..... -+ */ -+ info->baud_base = new_serial.baud_base; -+ info->type = new_serial.type; -+ info->close_delay = new_serial.close_delay; -+ info->closing_wait = new_serial.closing_wait; -+ retval = startup (info); -+ return retval; -+} -+ -+/* -+ * get_lsr_info - get line status register info -+ * -+ * Purpose: Let user call ioctl() to get info when the UART physically -+ * is emptied. On bus types like RS485, the transmitter must -+ * release the bus after transmitting. This must be done when -+ * the transmit shift register is empty, not be done when the -+ * transmit holding register is empty. This functionality -+ * allows an RS485 driver to be written in user space. -+ */ -+static int get_lsr_info (struct bcm_serial *info, unsigned int *value) -+{ -+ return( 0 ); -+} -+ -+/* -+ * This routine sends a break character out the serial port. -+ */ -+static void send_break (struct bcm_serial *info, int duration) -+{ -+ unsigned long flags; -+ -+ if (!info->port) -+ return; -+ -+ current->state = TASK_INTERRUPTIBLE; -+ -+ save_flags (flags); -+ cli(); -+ -+ info->port->control |= XMITBREAK; -+ schedule_timeout(duration); -+ info->port->control &= ~XMITBREAK; -+ -+ restore_flags (flags); -+} -+ -+static int bcm_ioctl (struct tty_struct * tty, struct file * file, -+ unsigned int cmd, unsigned long arg) -+{ -+ int error; -+ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; -+ int retval; -+ -+ if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && -+ (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) && -+ (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) -+ { -+ if (tty->flags & (1 << TTY_IO_ERROR)) -+ return -EIO; -+ } -+ switch (cmd) -+ { -+ -+ case TCSBRK: /* SVID version: non-zero arg --> no break */ -+ retval = tty_check_change (tty); -+ if (retval) -+ return retval; -+ tty_wait_until_sent (tty, 0); -+ if (!arg) -+ send_break (info, HZ/4); /* 1/4 second */ -+ return 0; -+ -+ case TCSBRKP: /* support for POSIX tcsendbreak() */ -+ retval = tty_check_change (tty); -+ if (retval) -+ return retval; -+ tty_wait_until_sent (tty, 0); -+ send_break (info, arg ? arg*(HZ/10) : HZ/4); -+ return 0; -+ -+ case TIOCGSOFTCAR: -+ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(long)); -+ if (error) -+ return error; -+ put_user (C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg); -+ return 0; -+ -+ case TIOCSSOFTCAR: -+ error = get_user (arg, (unsigned long *)arg); -+ if (error) -+ return error; -+ tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); -+ return 0; -+ -+ case TIOCGSERIAL: -+ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct serial_struct)); -+ if (error) -+ return error; -+ return get_serial_info (info, (struct serial_struct *)arg); -+ -+ case TIOCSSERIAL: -+ return set_serial_info (info, (struct serial_struct *) arg); -+ -+ case TIOCSERGETLSR: /* Get line status register */ -+ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(unsigned int)); -+ if (error) -+ return error; -+ else -+ return get_lsr_info (info, (unsigned int *)arg); -+ -+ case TIOCSERGSTRUCT: -+ error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(struct bcm_serial)); -+ if (error) -+ return error; -+ copy_to_user((struct bcm_serial *)arg, info, sizeof(struct bcm_serial)); -+ return 0; -+ -+ default: -+ return -ENOIOCTLCMD; -+ } -+ return 0; -+} -+ -+static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ -+ if( tty->termios->c_cflag != old_termios->c_cflag ) -+ change_speed (info->port, tty->termios->c_cflag); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm63xx_cons_close() -+ * -+ * This routine is called when the serial port gets closed. First, we -+ * wait for the last remaining data to be sent. Then, we turn off -+ * the transmit enable and receive enable flags. -+ * ------------------------------------------------------------ -+ */ -+static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp) -+{ -+ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; -+ unsigned long flags; -+ -+ if (!info) -+ return; -+ -+ save_flags (flags); -+ cli(); -+ -+ if (tty_hung_up_p (filp)) -+ { -+ restore_flags (flags); -+ return; -+ } -+ -+ if ((tty->count == 1) && (info->count != 1)) -+ { -+ -+ /* Uh, oh. tty->count is 1, which means that the tty -+ * structure will be freed. Info->count should always -+ * be one in these conditions. If it's greater than -+ * one, we've got real problems, since it means the -+ * serial port won't be shutdown. -+ */ -+ printk("bcm63xx_cons_close: bad serial port count; tty->count is 1, " -+ "info->count is %d\n", info->count); -+ info->count = 1; -+ } -+ -+ if (--info->count < 0) -+ { -+ printk("ds_close: bad serial port count for ttys%d: %d\n", -+ info->line, info->count); -+ info->count = 0; -+ } -+ -+ if (info->count) -+ { -+ restore_flags (flags); -+ return; -+ } -+ -+ /* Now we wait for the transmit buffer to clear; and we notify -+ * the line discipline to only process XON/XOFF characters. -+ */ -+ tty->closing = 1; -+ -+ /* At this point we stop accepting input. To do this, we -+ * disable the receive line status interrupts. -+ */ -+ shutdown (info); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ if (tty->driver->flush_buffer) -+ tty->driver->flush_buffer (tty); -+#else -+ if (tty->driver.flush_buffer) -+ tty->driver.flush_buffer (tty); -+#endif -+ if (tty->ldisc.flush_buffer) -+ tty->ldisc.flush_buffer (tty); -+ -+ tty->closing = 0; -+ info->event = 0; -+ info->tty = 0; -+ if (tty->ldisc.num != ldiscs[N_TTY].num) -+ { -+ if (tty->ldisc.close) -+ (tty->ldisc.close)(tty); -+ tty->ldisc = ldiscs[N_TTY]; -+ tty->termios->c_line = N_TTY; -+ if (tty->ldisc.open) -+ (tty->ldisc.open)(tty); -+ } -+ if (info->blocked_open) -+ { -+ if (info->close_delay) -+ { -+ current->state = TASK_INTERRUPTIBLE; -+ schedule_timeout(info->close_delay); -+ } -+ wake_up_interruptible (&info->open_wait); -+ } -+ wake_up_interruptible (&info->close_wait); -+ -+ restore_flags (flags); -+} -+ -+/* -+ * bcm_hangup () --- called by tty_hangup() when a hangup is signaled. -+ */ -+static void bcm_hangup (struct tty_struct *tty) -+{ -+ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ -+ shutdown (info); -+ info->event = 0; -+ info->count = 0; -+ info->tty = 0; -+ wake_up_interruptible (&info->open_wait); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_open() and friends -+ * ------------------------------------------------------------ -+ */ -+static int block_til_ready (struct tty_struct *tty, struct file *filp, -+ struct bcm_serial *info) -+{ -+ return 0; -+} -+ -+/* -+ * This routine is called whenever a serial port is opened. It -+ * enables interrupts for a serial port. It also performs the -+ * serial-specific initialization for the tty structure. -+ */ -+static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp) -+{ -+ struct bcm_serial *info; -+ int retval, line; -+ -+ // Make sure we're only opening on of the ports we support -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ line = MINOR(tty->driver->cdev.dev) - tty->driver->minor_start; -+#else -+ line = MINOR(tty->device) - tty->driver.minor_start; -+#endif -+ -+ if ((line < 0) || (line >= BCM_NUM_UARTS)) -+ return -ENODEV; -+ -+ info = lines[line]; -+ -+ info->port->intMask = 0; /* Clear any pending interrupts */ -+ info->port->intMask = RXINT; /* Enable RX */ -+ -+ info->count++; -+ tty->driver_data = info; -+ info->tty = tty; -+ BcmHalInterruptEnable (INTERRUPT_ID_UART); -+ -+ // Start up serial port -+ retval = startup (info); -+ if (retval) -+ return retval; -+ -+ retval = block_til_ready (tty, filp, info); -+ if (retval) -+ return retval; -+ -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ info->pgrp = process_group(current); -+ info->session = current->signal->session; -+#else -+ info->session = current->session; -+ info->pgrp = current->pgrp; -+#endif -+ -+ return 0; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: bcm63xx_serialinit -+ Purpose: Initialize our BCM63xx serial driver -+-------------------------------------------------------------------------- */ -+static int __init bcm63xx_serialinit(void) -+{ -+ int i, flags; -+ struct bcm_serial * info; -+ -+ // Print the driver version information -+ printk(VER_STR); -+ -+ memset(&serial_driver, 0, sizeof(struct tty_driver)); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ serial_driver.owner = THIS_MODULE; -+ serial_driver.devfs_name = "tts/"; -+#endif -+ serial_driver.magic = TTY_DRIVER_MAGIC; -+ serial_driver.name = "ttyS"; -+ serial_driver.major = TTY_MAJOR; -+ serial_driver.minor_start = 64; -+ serial_driver.num = BCM_NUM_UARTS; -+ serial_driver.type = TTY_DRIVER_TYPE_SERIAL; -+ serial_driver.subtype = SERIAL_TYPE_NORMAL; -+ serial_driver.init_termios = tty_std_termios; -+ serial_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | CLOCAL; -+ serial_driver.flags = TTY_DRIVER_REAL_RAW; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ serial_driver.refcount = serial_refcount; -+ serial_driver.ttys = serial_table; -+#else -+ serial_driver.refcount = &serial_refcount; -+ serial_driver.table = serial_table; -+#endif -+ -+ serial_driver.termios = serial_termios; -+ serial_driver.termios_locked = serial_termios_locked; -+ serial_driver.open = bcm63xx_cons_open; -+ serial_driver.close = bcm63xx_cons_close; -+ serial_driver.write = bcm63xx_cons_write; -+ serial_driver.flush_chars = bcm63xx_cons_flush_chars; -+ serial_driver.write_room = bcm63xx_cons_write_room; -+ serial_driver.chars_in_buffer = bcm_chars_in_buffer; -+ serial_driver.flush_buffer = bcm_flush_buffer; -+ serial_driver.ioctl = bcm_ioctl; -+ serial_driver.throttle = bcm_throttle; -+ serial_driver.unthrottle = bcm_unthrottle; -+ serial_driver.send_xchar = bcm_send_xchar; -+ serial_driver.set_termios = bcm_set_termios; -+ serial_driver.stop = bcm_stop; -+ serial_driver.start = bcm_start; -+ serial_driver.hangup = bcm_hangup; -+ -+ if (tty_register_driver (&serial_driver)) -+ panic("Couldn't register serial driver\n"); -+ -+ save_flags(flags); cli(); -+ for (i = 0; i < BCM_NUM_UARTS; i++) -+ { -+ info = &multi[i]; -+ lines[i] = info; -+ info->port = (Uart *) ((char *)UART_BASE + (i * 0x20)); -+ info->irq = (2 - i) + 8; -+ info->line = i; -+ info->tty = 0; -+ info->close_delay = 50; -+ info->closing_wait = 3000; -+ info->x_char = 0; -+ info->event = 0; -+ info->count = 0; -+ info->blocked_open = 0; -+ info->normal_termios = serial_driver.init_termios; -+ init_waitqueue_head(&info->open_wait); -+ init_waitqueue_head(&info->close_wait); -+ -+ /* If we are pointing to address zero then punt - not correctly -+ * set up in setup.c to handle this. -+ */ -+ if (! info->port) -+ return 0; -+ BcmHalMapInterrupt(bcm_interrupt, 0, INTERRUPT_ID_UART); -+ } -+ -+ /* order matters here... the trick is that flags -+ * is updated... in request_irq - to immediatedly obliterate -+ * it is unwise. -+ */ -+ restore_flags(flags); -+ return 0; -+} -+ -+module_init(bcm63xx_serialinit); -+ -+/* -------------------------------------------------------------------------- -+ Name: bcm_console_print -+ Purpose: bcm_console_print is registered for printk. -+ The console_lock must be held when we get here. -+-------------------------------------------------------------------------- */ -+static void bcm_console_print (struct console * cons, const char * str, -+ unsigned int count) -+{ -+ unsigned int i; -+ //_puts(str); -+ for(i=0; i<count; i++, str++) -+ { -+ _putc(*str); -+ if (*str == 10) -+ { -+ _putc(13); -+ } -+ } -+} -+ -+static struct tty_driver * bcm_console_device(struct console * c, int *index) -+{ -+ *index = c->index; -+ return &serial_driver; -+} -+ -+static int __init bcm_console_setup(struct console * co, char * options) -+{ -+ return 0; -+} -+ -+static struct console bcm_sercons = { -+ .name = "ttyS", -+ .write = bcm_console_print, -+ .device = bcm_console_device, -+ .setup = bcm_console_setup, -+ .flags = CON_PRINTBUFFER, // CON_CONSDEV, CONSOLE_LINE, -+ .index = -1, -+}; -+ -+static int __init bcm63xx_console_init(void) -+{ -+ register_console(&bcm_sercons); -+ return 0; -+} -+ -+console_initcall(bcm63xx_console_init); -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6338_intr.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,72 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __6338_INTR_H -+#define __6338_INTR_H -+ -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ -+/*=====================================================================*/ -+/* BCM6338 External Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define INTERRUPT_ID_EXTERNAL_0 3 -+#define INTERRUPT_ID_EXTERNAL_1 4 -+#define INTERRUPT_ID_EXTERNAL_2 5 -+#define INTERRUPT_ID_EXTERNAL_3 6 -+ -+/*=====================================================================*/ -+/* BCM6338 Timer Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define MIPS_TIMER_INT 7 -+ -+/*=====================================================================*/ -+/* Peripheral ISR Table Offset */ -+/*=====================================================================*/ -+#define INTERNAL_ISR_TABLE_OFFSET 8 -+ -+/*=====================================================================*/ -+/* Logical Peripheral Interrupt IDs */ -+/*=====================================================================*/ -+ -+#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) -+#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) -+#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) -+#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 4) -+#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 5) -+#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 6) -+#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 7) -+#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) -+#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) -+#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 10) -+#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 11) -+#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 12) -+#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 13) -+#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) -+#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) -+#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) -+#define INTERRUPT_ID_SDIO (INTERNAL_ISR_TABLE_OFFSET + 17) -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#endif /* __BCM6338_H */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,341 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM6338_MAP_H -+#define __BCM6338_MAP_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#include "bcmtypes.h" -+ -+#define PERF_BASE 0xfffe0000 -+#define TIMR_BASE 0xfffe0200 -+#define UART_BASE 0xfffe0300 -+#define GPIO_BASE 0xfffe0400 -+#define SPI_BASE 0xfffe0c00 -+ -+typedef struct PerfControl { -+ uint32 RevID; -+ uint16 testControl; -+ uint16 blkEnables; -+#define EMAC_CLK_EN 0x0010 -+#define USBS_CLK_EN 0x0010 -+#define SAR_CLK_EN 0x0020 -+ -+#define SPI_CLK_EN 0x0200 -+ -+ uint32 pll_control; -+#define SOFT_RESET 0x00000001 -+ -+ uint32 IrqMask; -+ uint32 IrqStatus; -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 5 -+#define EI_CLEAR_SHFT 10 -+#define EI_MASK_SHFT 15 -+#define EI_INSENS_SHFT 20 -+#define EI_LEVEL_SHFT 25 -+ -+ uint32 unused[4]; /* (18) */ -+ uint32 BlockSoftReset; /* (28) */ -+#define BSR_SPI 0x00000001 -+#define BSR_EMAC 0x00000004 -+#define BSR_USBH 0x00000008 -+#define BSR_USBS 0x00000010 -+#define BSR_ADSL 0x00000020 -+#define BSR_DMAMEM 0x00000040 -+#define BSR_SAR 0x00000080 -+#define BSR_ACLC 0x00000100 -+#define BSR_ADSL_MIPS_PLL 0x00000400 -+#define BSR_ALL_BLOCKS \ -+ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ -+ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) -+} PerfControl; -+ -+#define PERF ((volatile PerfControl * const) PERF_BASE) -+ -+ -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+ byte config; -+#define XMITBREAK 0x40 -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ /* 4-LSBS represent STOP bits/char -+ * in 1/8 bit-time intervals. Zero -+ * represents 1/8 stop bit interval. -+ * Fifteen represents 2 stop bits. -+ */ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ /* 5-bit TimeoutCnt is in low bits of this register. -+ * This count represents the number of characters -+ * idle times before setting receive Irq when below threshold -+ */ -+ uint32 baudword; -+ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate -+ */ -+ -+ byte txf_levl; /* Read-only fifo depth */ -+ byte rxf_levl; /* Read-only fifo depth */ -+ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are -+ * RxThreshold. Irq can be asserted -+ * when rx fifo> thresh, txfifo<thresh -+ */ -+ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) -+ * if these bits are also enabled to GPIO_o -+ */ -+#define DTREN 0x01 -+#define RTSEN 0x02 -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to -+ * detect irq on rising AND falling -+ * edges for corresponding GPIO_i -+ * if enabled (edge insensitive) -+ */ -+ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense -+ * 0 for negedge sense if -+ * not configured for edge -+ * insensitive (see above) -+ * Lower 4 bits: Mask to enable change -+ * detection IRQ for corresponding -+ * GPIO_i -+ */ -+ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits -+ * have changed (may set IRQ). -+ * read automatically clears bit -+ * Lower 4 bits are actual status -+ */ -+ -+ uint16 intMask; /* Same Bit defs for Mask and status */ -+ uint16 intStatus; -+#define DELTAIP 0x0001 -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; /* Write to TX, Read from RX */ -+ /* bits 11:8 are BRK,PAR,FRM errors */ -+ -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART ((volatile Uart * const) UART_BASE) -+ -+typedef struct GpioControl { -+ uint32 unused0; -+ uint32 GPIODir; /* bits 7:0 */ -+ uint32 unused1; -+ uint32 GPIOio; /* bits 7:0 */ -+ uint32 LEDCtrl; -+#define LED3_STROBE 0x08000000 -+#define LED2_STROBE 0x04000000 -+#define LED1_STROBE 0x02000000 -+#define LED0_STROBE 0x01000000 -+#define LED_TEST 0x00010000 -+#define LED3_DISABLE_LINK_ACT 0x00008000 -+#define LED2_DISABLE_LINK_ACT 0x00004000 -+#define LED1_DISABLE_LINK_ACT 0x00002000 -+#define LED0_DISABLE_LINK_ACT 0x00001000 -+#define LED_INTERVAL_SET_MASK 0x00000f00 -+#define LED_INTERVAL_SET_320MS 0x00000500 -+#define LED_INTERVAL_SET_160MS 0x00000400 -+#define LED_INTERVAL_SET_80MS 0x00000300 -+#define LED_INTERVAL_SET_40MS 0x00000200 -+#define LED_INTERVAL_SET_20MS 0x00000100 -+#define LED3_ON 0x00000080 -+#define LED2_ON 0x00000040 -+#define LED1_ON 0x00000020 -+#define LED0_ON 0x00000010 -+#define LED3_ENABLE 0x00000008 -+#define LED2_ENABLE 0x00000004 -+#define LED1_ENABLE 0x00000002 -+#define LED0_ENABLE 0x00000001 -+ uint32 SpiSlaveCfg; -+#define SPI_SLAVE_RESET 0x00010000 -+#define SPI_RESTRICT 0x00000400 -+#define SPI_DELAY_DISABLE 0x00000200 -+#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 -+#define SPI_SER_ADDR_CFG_MASK 0x0000000c -+#define SPI_MODE 0x00000001 -+ uint32 vRegConfig; -+} GpioControl; -+ -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+/* Number to mask conversion macro used for GPIODir and GPIOio */ -+#define GPIO_NUM_MAX_BITS_MASK 0x0f -+#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) -+ -+/* -+** Spi Controller -+*/ -+ -+typedef struct SpiControl { -+ uint16 spiCmd; /* (0x0): SPI command */ -+#define SPI_CMD_START_IMMEDIATE 3 -+ -+#define SPI_CMD_COMMAND_SHIFT 0 -+#define SPI_CMD_DEVICE_ID_SHIFT 4 -+#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 -+ -+ byte spiIntStatus; /* (0x2): SPI interrupt status */ -+ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ -+ -+ byte spiIntMask; /* (0x4): SPI interrupt mask */ -+#define SPI_INTR_CMD_DONE 0x01 -+#define SPI_INTR_CLEAR_ALL 0x1f -+ -+ byte spiStatus; /* (0x5): SPI status */ -+ -+ byte spiClkCfg; /* (0x6): SPI clock configuration */ -+ -+ byte spiFillByte; /* (0x7): SPI fill byte */ -+ -+ byte unused0; -+ byte spiMsgTail; /* (0x9): msgtail */ -+ byte unused1; -+ byte spiRxTail; /* (0xB): rxtail */ -+ -+ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ -+ -+ byte spiMsgCtl; /* (0x40) control byte */ -+#define HALF_DUPLEX_W 1 -+#define HALF_DUPLEX_R 2 -+#define SPI_MSG_TYPE_SHIFT 6 -+#define SPI_BYTE_CNT_SHIFT 0 -+ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ -+ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ -+ byte unused3[64]; /* (0xc0 - 0xff) reserved */ -+} SpiControl; -+ -+#define SPI ((volatile SpiControl * const) SPI_BASE) -+ -+/* -+** External Bus Interface -+*/ -+typedef struct EbiChipSelect { -+ uint32 base; /* base address in upper 24 bits */ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ uint32 config; -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_WREN 0x00000020 /* enable posted writes */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert something, -+ ** don't know what yet */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. use fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+} EbiChipSelect; -+ -+typedef struct MpiRegisters { -+ EbiChipSelect cs[1]; /* size chip select configuration */ -+} MpiRegisters; -+ -+#define MPI ((volatile MpiRegisters * const) MPI_BASE) -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6345_intr.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,78 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __6345_INTR_H -+#define __6345_INTR_H -+ -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ -+/*=====================================================================*/ -+/* BCM6345 External Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define INTERRUPT_ID_EXTERNAL_0 3 -+#define INTERRUPT_ID_EXTERNAL_1 4 -+#define INTERRUPT_ID_EXTERNAL_2 5 -+#define INTERRUPT_ID_EXTERNAL_3 6 -+ -+/*=====================================================================*/ -+/* BCM6345 Timer Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define MIPS_TIMER_INT 7 -+ -+/*=====================================================================*/ -+/* Peripheral ISR Table Offset */ -+/*=====================================================================*/ -+#define INTERNAL_ISR_TABLE_OFFSET 8 -+#define DMA_ISR_TABLE_OFFSET (INTERNAL_ISR_TABLE_OFFSET + 13) -+ -+/*=====================================================================*/ -+/* Logical Peripheral Interrupt IDs */ -+/*=====================================================================*/ -+ -+/* Internal peripheral interrupt IDs */ -+#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) -+#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) -+#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 3) -+#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 4) -+#define INTERRUPT_ID_USB (INTERNAL_ISR_TABLE_OFFSET + 5) -+#define INTERRUPT_ID_EMAC (INTERNAL_ISR_TABLE_OFFSET + 8) -+#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 12) -+ -+/* DMA channel interrupt IDs */ -+#define INTERRUPT_ID_EMAC_RX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_RX_CHAN) -+#define INTERRUPT_ID_EMAC_TX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_TX_CHAN) -+#define INTERRUPT_ID_EBI_RX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_RX_CHAN) -+#define INTERRUPT_ID_EBI_TX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_TX_CHAN) -+#define INTERRUPT_ID_RESERVED_RX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_RX_CHAN) -+#define INTERRUPT_ID_RESERVED_TX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_TX_CHAN) -+#define INTERRUPT_ID_USB_BULK_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_RX_CHAN) -+#define INTERRUPT_ID_USB_BULK_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_TX_CHAN) -+#define INTERRUPT_ID_USB_CNTL_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_RX_CHAN) -+#define INTERRUPT_ID_USB_CNTL_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_TX_CHAN) -+#define INTERRUPT_ID_USB_ISO_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_RX_CHAN) -+#define INTERRUPT_ID_USB_ISO_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_TX_CHAN) -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#endif /* __BCM6345_H */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,169 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM6345_MAP_H -+#define __BCM6345_MAP_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#include "bcmtypes.h" -+#include "6345_intr.h" -+ -+typedef struct IntControl { -+ uint32 RevID; -+ uint16 testControl; -+ uint16 blkEnables; -+#define USB_CLK_EN 0x0100 -+#define EMAC_CLK_EN 0x0080 -+#define UART_CLK_EN 0x0008 -+#define CPU_CLK_EN 0x0001 -+ -+ uint32 pll_control; -+#define SOFT_RESET 0x00000001 -+ -+ uint32 IrqMask; -+ uint32 IrqStatus; -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 4 -+#define EI_CLEAR_SHFT 8 -+#define EI_MASK_SHFT 12 -+#define EI_INSENS_SHFT 16 -+#define EI_LEVEL_SHFT 20 -+} IntControl; -+ -+#define INTC_BASE 0xfffe0000 -+#define PERF ((volatile IntControl * const) INTC_BASE) -+ -+#define TIMR_BASE 0xfffe0200 -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+ -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ byte config; -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define XMITBREAK 0x40 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ uint32 baudword; -+ -+ byte txf_levl; -+ byte rxf_levl; -+ byte fifocfg; -+ byte prog_out; -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; -+ byte DeltaIPConfig_Mask; -+ byte DeltaIP_SyncIP; -+ uint16 intMask; -+ uint16 intStatus; -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOEMT 0x0020 -+#define RXOVFERR 0x0080 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART_BASE 0xfffe0300 -+#define UART ((volatile Uart * const) UART_BASE) -+ -+typedef struct GpioControl { -+ uint16 unused0; -+ byte unused1; -+ byte TBusSel; -+ -+ uint16 unused2; -+ uint16 GPIODir; -+ byte unused3; -+ byte Leds; -+ uint16 GPIOio; -+ -+ uint32 UartCtl; -+} GpioControl; -+ -+#define GPIO_BASE 0xfffe0400 -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+#define GPIO_NUM_MAX_BITS_MASK 0x0f -+#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6348_intr.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,80 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __6348_INTR_H -+#define __6348_INTR_H -+ -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ -+/*=====================================================================*/ -+/* BCM6348 External Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define INTERRUPT_ID_EXTERNAL_0 3 -+#define INTERRUPT_ID_EXTERNAL_1 4 -+#define INTERRUPT_ID_EXTERNAL_2 5 -+#define INTERRUPT_ID_EXTERNAL_3 6 -+ -+/*=====================================================================*/ -+/* BCM6348 Timer Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define MIPS_TIMER_INT 7 -+ -+/*=====================================================================*/ -+/* Peripheral ISR Table Offset */ -+/*=====================================================================*/ -+#define INTERNAL_ISR_TABLE_OFFSET 8 -+ -+/*=====================================================================*/ -+/* Logical Peripheral Interrupt IDs */ -+/*=====================================================================*/ -+ -+#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) -+#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) -+#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) -+#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 4) -+#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 5) -+#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 6) -+#define INTERRUPT_ID_EMAC2 (INTERNAL_ISR_TABLE_OFFSET + 7) -+#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) -+#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) -+#define INTERRUPT_ID_M2M (INTERNAL_ISR_TABLE_OFFSET + 10) -+#define INTERRUPT_ID_ACLC (INTERNAL_ISR_TABLE_OFFSET + 11) -+#define INTERRUPT_ID_USBH (INTERNAL_ISR_TABLE_OFFSET + 12) -+#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 13) -+#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) -+#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) -+#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) -+#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 17) -+#define INTERRUPT_ID_USB_ISO_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 18) -+#define INTERRUPT_ID_USB_ISO_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 19) -+#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 20) -+#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 21) -+#define INTERRUPT_ID_EMAC2_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 22) -+#define INTERRUPT_ID_EMAC2_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 23) -+#define INTERRUPT_ID_MPI (INTERNAL_ISR_TABLE_OFFSET + 24) -+#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 25) -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#endif /* __BCM6348_H */ -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,508 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM6348_MAP_H -+#define __BCM6348_MAP_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+#include "bcmtypes.h" -+ -+#define PERF_BASE 0xfffe0000 -+#define TIMR_BASE 0xfffe0200 -+#define UART_BASE 0xfffe0300 -+#define GPIO_BASE 0xfffe0400 -+#define MPI_BASE 0xfffe2000 /* MPI control registers */ -+#define USB_HOST_BASE 0xfffe1b00 /* USB host registers */ -+#define USB_HOST_NON_OHCI 0xfffe1c00 /* USB host non-OHCI registers */ -+ -+typedef struct PerfControl { -+ uint32 RevID; -+ uint16 testControl; -+ uint16 blkEnables; -+#define EMAC_CLK_EN 0x0010 -+#define SAR_CLK_EN 0x0020 -+#define USBS_CLK_EN 0x0040 -+#define USBH_CLK_EN 0x0100 -+ -+ uint32 pll_control; -+#define SOFT_RESET 0x00000001 -+ -+ uint32 IrqMask; -+ uint32 IrqStatus; -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 5 -+#define EI_CLEAR_SHFT 10 -+#define EI_MASK_SHFT 15 -+#define EI_INSENS_SHFT 20 -+#define EI_LEVEL_SHFT 25 -+ -+ uint32 unused[4]; /* (18) */ -+ uint32 BlockSoftReset; /* (28) */ -+#define BSR_SPI 0x00000001 -+#define BSR_EMAC 0x00000004 -+#define BSR_USBH 0x00000008 -+#define BSR_USBS 0x00000010 -+#define BSR_ADSL 0x00000020 -+#define BSR_DMAMEM 0x00000040 -+#define BSR_SAR 0x00000080 -+#define BSR_ACLC 0x00000100 -+#define BSR_ADSL_MIPS_PLL 0x00000400 -+#define BSR_ALL_BLOCKS \ -+ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ -+ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) -+ uint32 unused2[2]; /* (2c) */ -+ uint32 PllStrap; /* (34) */ -+#define PLL_N1_SHFT 20 -+#define PLL_N1_MASK (7<<PLL_N1_SHFT) -+#define PLL_N2_SHFT 15 -+#define PLL_N2_MASK (0x1f<<PLL_N2_SHFT) -+#define PLL_M1_REF_SHFT 12 -+#define PLL_M1_REF_MASK (7<<PLL_M1_REF_SHFT) -+#define PLL_M2_REF_SHFT 9 -+#define PLL_M2_REF_MASK (7<<PLL_M2_REF_SHFT) -+#define PLL_M1_CPU_SHFT 6 -+#define PLL_M1_CPU_MASK (7<<PLL_M1_CPU_SHFT) -+#define PLL_M1_BUS_SHFT 3 -+#define PLL_M1_BUS_MASK (7<<PLL_M1_BUS_SHFT) -+#define PLL_M2_BUS_SHFT 0 -+#define PLL_M2_BUS_MASK (7<<PLL_M2_BUS_SHFT) -+} PerfControl; -+ -+#define PERF ((volatile PerfControl * const) PERF_BASE) -+ -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+ -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+ byte config; -+#define XMITBREAK 0x40 -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ /* 4-LSBS represent STOP bits/char -+ * in 1/8 bit-time intervals. Zero -+ * represents 1/8 stop bit interval. -+ * Fifteen represents 2 stop bits. -+ */ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ /* 5-bit TimeoutCnt is in low bits of this register. -+ * This count represents the number of characters -+ * idle times before setting receive Irq when below threshold -+ */ -+ uint32 baudword; -+ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate -+ */ -+ -+ byte txf_levl; /* Read-only fifo depth */ -+ byte rxf_levl; /* Read-only fifo depth */ -+ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are -+ * RxThreshold. Irq can be asserted -+ * when rx fifo> thresh, txfifo<thresh -+ */ -+ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) -+ * if these bits are also enabled to GPIO_o -+ */ -+#define DTREN 0x01 -+#define RTSEN 0x02 -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to -+ * detect irq on rising AND falling -+ * edges for corresponding GPIO_i -+ * if enabled (edge insensitive) -+ */ -+ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense -+ * 0 for negedge sense if -+ * not configured for edge -+ * insensitive (see above) -+ * Lower 4 bits: Mask to enable change -+ * detection IRQ for corresponding -+ * GPIO_i -+ */ -+ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits -+ * have changed (may set IRQ). -+ * read automatically clears bit -+ * Lower 4 bits are actual status -+ */ -+ -+ uint16 intMask; /* Same Bit defs for Mask and status */ -+ uint16 intStatus; -+#define DELTAIP 0x0001 -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; /* Write to TX, Read from RX */ -+ /* bits 11:8 are BRK,PAR,FRM errors */ -+ -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART ((volatile Uart * const) UART_BASE) -+ -+typedef struct GpioControl { -+ uint32 GPIODir_high; /* bits 36:32 */ -+ uint32 GPIODir; /* bits 31:00 */ -+ uint32 GPIOio_high; /* bits 36:32 */ -+ uint32 GPIOio; /* bits 31:00 */ -+ uint32 LEDCtrl; -+#define LED3_STROBE 0x08000000 -+#define LED2_STROBE 0x04000000 -+#define LED1_STROBE 0x02000000 -+#define LED0_STROBE 0x01000000 -+#define LED_TEST 0x00010000 -+#define LED3_DISABLE_LINK_ACT 0x00008000 -+#define LED2_DISABLE_LINK_ACT 0x00004000 -+#define LED1_DISABLE_LINK_ACT 0x00002000 -+#define LED0_DISABLE_LINK_ACT 0x00001000 -+#define LED_INTERVAL_SET_MASK 0x00000f00 -+#define LED_INTERVAL_SET_320MS 0x00000500 -+#define LED_INTERVAL_SET_160MS 0x00000400 -+#define LED_INTERVAL_SET_80MS 0x00000300 -+#define LED_INTERVAL_SET_40MS 0x00000200 -+#define LED_INTERVAL_SET_20MS 0x00000100 -+#define LED3_ON 0x00000080 -+#define LED2_ON 0x00000040 -+#define LED1_ON 0x00000020 -+#define LED0_ON 0x00000010 -+#define LED3_ENABLE 0x00000008 -+#define LED2_ENABLE 0x00000004 -+#define LED1_ENABLE 0x00000002 -+#define LED0_ENABLE 0x00000001 -+ uint32 SpiSlaveCfg; -+#define SPI_SLAVE_RESET 0x00010000 -+#define SPI_RESTRICT 0x00000400 -+#define SPI_DELAY_DISABLE 0x00000200 -+#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 -+#define SPI_SER_ADDR_CFG_MASK 0x0000000c -+#define SPI_MODE 0x00000001 -+ uint32 GPIOMode; -+#define GROUP4_DIAG 0x00090000 -+#define GROUP4_UTOPIA 0x00080000 -+#define GROUP4_LEGACY_LED 0x00030000 -+#define GROUP4_MII_SNOOP 0x00020000 -+#define GROUP4_EXT_EPHY 0x00010000 -+#define GROUP3_DIAG 0x00009000 -+#define GROUP3_UTOPIA 0x00008000 -+#define GROUP3_EXT_MII 0x00007000 -+#define GROUP2_DIAG 0x00000900 -+#define GROUP2_PCI 0x00000500 -+#define GROUP1_DIAG 0x00000090 -+#define GROUP1_UTOPIA 0x00000080 -+#define GROUP1_SPI_UART 0x00000060 -+#define GROUP1_SPI_MASTER 0x00000060 -+#define GROUP1_MII_PCCARD 0x00000040 -+#define GROUP1_MII_SNOOP 0x00000020 -+#define GROUP1_EXT_EPHY 0x00000010 -+#define GROUP0_DIAG 0x00000009 -+#define GROUP0_EXT_MII 0x00000007 -+ -+} GpioControl; -+ -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+/* Number to mask conversion macro used for GPIODir and GPIOio */ -+#define GPIO_NUM_TOTAL_BITS_MASK 0x3f -+#define GPIO_NUM_MAX_BITS_MASK 0x1f -+#define GPIO_NUM_TO_MASK(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) < 32) ? (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) : (0) ) -+ -+/* Number to mask conversion macro used for GPIODir_high and GPIOio_high */ -+#define GPIO_NUM_MAX_BITS_MASK_HIGH 0x07 -+#define GPIO_NUM_TO_MASK_HIGH(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) >= 32) ? (1 << ((X-32) & GPIO_NUM_MAX_BITS_MASK_HIGH)) : (0) ) -+ -+ -+/* -+** External Bus Interface -+*/ -+typedef struct EbiChipSelect { -+ uint32 base; /* base address in upper 24 bits */ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ uint32 config; -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_WREN 0x00000020 /* enable posted writes */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert something, -+ ** don't know what yet */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. use fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+} EbiChipSelect; -+ -+typedef struct MpiRegisters { -+ EbiChipSelect cs[7]; /* size chip select configuration */ -+#define EBI_CS0_BASE 0 -+#define EBI_CS1_BASE 1 -+#define EBI_CS2_BASE 2 -+#define EBI_CS3_BASE 3 -+#define PCMCIA_COMMON_BASE 4 -+#define PCMCIA_ATTRIBUTE_BASE 5 -+#define PCMCIA_IO_BASE 6 -+ uint32 unused0[2]; /* reserved */ -+ uint32 ebi_control; /* ebi control */ -+ uint32 unused1[4]; /* reserved */ -+#define EBI_ACCESS_TIMEOUT 0x000007FF -+ uint32 pcmcia_cntl1; /* pcmcia control 1 */ -+#define PCCARD_CARD_RESET 0x00040000 -+#define CARDBUS_ENABLE 0x00008000 -+#define PCMCIA_ENABLE 0x00004000 -+#define PCMCIA_GPIO_ENABLE 0x00002000 -+#define CARDBUS_IDSEL 0x00001F00 -+#define VS2_OEN 0x00000080 -+#define VS1_OEN 0x00000040 -+#define VS2_OUT 0x00000020 -+#define VS1_OUT 0x00000010 -+#define VS2_IN 0x00000008 -+#define VS1_IN 0x00000004 -+#define CD2_IN 0x00000002 -+#define CD1_IN 0x00000001 -+#define VS_MASK 0x0000000C -+#define CD_MASK 0x00000003 -+ uint32 unused2; /* reserved */ -+ uint32 pcmcia_cntl2; /* pcmcia control 2 */ -+#define PCMCIA_BYTESWAP_DIS 0x00000002 -+#define PCMCIA_HALFWORD_EN 0x00000001 -+#define RW_ACTIVE_CNT_BIT 2 -+#define INACTIVE_CNT_BIT 8 -+#define CE_SETUP_CNT_BIT 16 -+#define CE_HOLD_CNT_BIT 24 -+ uint32 unused3[40]; /* reserved */ -+ -+ uint32 sp0range; /* PCI to internal system bus address space */ -+ uint32 sp0remap; -+ uint32 sp0cfg; -+ uint32 sp1range; -+ uint32 sp1remap; -+ uint32 sp1cfg; -+ -+ uint32 EndianCfg; -+ -+ uint32 l2pcfgctl; /* internal system bus to PCI IO/Cfg control */ -+#define DIR_CFG_SEL 0x80000000 /* change from PCI I/O access to PCI config access */ -+#define DIR_CFG_USEREG 0x40000000 /* use this register info for PCI configuration access */ -+#define DEVICE_NUMBER 0x00007C00 /* device number for the PCI configuration access */ -+#define FUNC_NUMBER 0x00000300 /* function number for the PCI configuration access */ -+#define REG_NUMBER 0x000000FC /* register number for the PCI configuration access */ -+#define CONFIG_TYPE 0x00000003 /* configuration type for the PCI configuration access */ -+ -+ uint32 l2pmrange1; /* internal system bus to PCI memory space */ -+#define PCI_SIZE_64K 0xFFFF0000 -+#define PCI_SIZE_128K 0xFFFE0000 -+#define PCI_SIZE_256K 0xFFFC0000 -+#define PCI_SIZE_512K 0xFFF80000 -+#define PCI_SIZE_1M 0xFFF00000 -+#define PCI_SIZE_2M 0xFFE00000 -+#define PCI_SIZE_4M 0xFFC00000 -+#define PCI_SIZE_8M 0xFF800000 -+#define PCI_SIZE_16M 0xFF000000 -+#define PCI_SIZE_32M 0xFE000000 -+ uint32 l2pmbase1; /* kseg0 or kseg1 address & 0x1FFFFFFF */ -+ uint32 l2pmremap1; -+#define CARDBUS_MEM 0x00000004 -+#define MEM_WINDOW_EN 0x00000001 -+ uint32 l2pmrange2; -+ uint32 l2pmbase2; -+ uint32 l2pmremap2; -+ uint32 l2piorange; /* internal system bus to PCI I/O space */ -+ uint32 l2piobase; -+ uint32 l2pioremap; -+ -+ uint32 pcimodesel; -+#define PCI2_INT_BUS_RD_PREFECH 0x000000F0 -+#define PCI_BAR2_NOSWAP 0x00000002 /* BAR at offset 0x20 */ -+#define PCI_BAR1_NOSWAP 0x00000001 /* BAR at affset 0x1c */ -+ -+ uint32 pciintstat; /* PCI interrupt mask/status */ -+#define MAILBOX1_SENT 0x08 -+#define MAILBOX0_SENT 0x04 -+#define MAILBOX1_MSG_RCV 0x02 -+#define MAILBOX0_MSG_RCV 0x01 -+ uint32 locbuscntrl; /* internal system bus control */ -+#define DIR_U2P_NOSWAP 0x00000002 -+#define EN_PCI_GPIO 0x00000001 -+ uint32 locintstat; /* internal system bus interrupt mask/status */ -+#define CSERR 0x0200 -+#define SERR 0x0100 -+#define EXT_PCI_INT 0x0080 -+#define DIR_FAILED 0x0040 -+#define DIR_COMPLETE 0x0020 -+#define PCI_CFG 0x0010 -+ uint32 unused5[7]; -+ -+ uint32 mailbox0; -+ uint32 mailbox1; -+ -+ uint32 pcicfgcntrl; /* internal system bus PCI configuration control */ -+#define PCI_CFG_REG_WRITE_EN 0x00000080 -+#define PCI_CFG_ADDR 0x0000003C -+ uint32 pcicfgdata; /* internal system bus PCI configuration data */ -+ -+ uint32 locch2ctl; /* PCI to interrnal system bus DMA (downstream) local control */ -+#define MPI_DMA_HALT 0x00000008 /* idle after finish current memory burst */ -+#define MPI_DMA_PKT_HALT 0x00000004 /* idle after an EOP flag is detected */ -+#define MPI_DMA_STALL 0x00000002 /* idle after an EOP flag is detected */ -+#define MPI_DMA_ENABLE 0x00000001 /* set to enable channel */ -+ uint32 locch2intStat; -+#define MPI_DMA_NO_DESC 0x00000004 /* no valid descriptors */ -+#define MPI_DMA_DONE 0x00000002 /* packet xfer complete */ -+#define MPI_DMA_BUFF_DONE 0x00000001 /* buffer done */ -+ uint32 locch2intMask; -+ uint32 unused6; -+ uint32 locch2descaddr; -+ uint32 locch2status1; -+#define LOCAL_DESC_STATE 0xE0000000 -+#define PCI_DESC_STATE 0x1C000000 -+#define BYTE_DONE 0x03FFC000 -+#define RING_ADDR 0x00003FFF -+ uint32 locch2status2; -+#define BUFPTR_OFFSET 0x1FFF0000 -+#define PCI_MASTER_STATE 0x000000C0 -+#define LOC_MASTER_STATE 0x00000038 -+#define CONTROL_STATE 0x00000007 -+ uint32 unused7; -+ -+ uint32 locch1Ctl; /*internal system bus to PCI DMA (upstream) local control */ -+#define DMA_U2P_LE 0x00000200 /* local bus is little endian */ -+#define DMA_U2P_NOSWAP 0x00000100 /* lccal bus is little endian but no data swapped */ -+ uint32 locch1intstat; -+ uint32 locch1intmask; -+ uint32 unused8; -+ uint32 locch1descaddr; -+ uint32 locch1status1; -+ uint32 locch1status2; -+ uint32 unused9; -+ -+ uint32 pcich1ctl; /* internal system bus to PCI DMA PCI control */ -+ uint32 pcich1intstat; -+ uint32 pcich1intmask; -+ uint32 pcich1descaddr; -+ uint32 pcich1status1; -+ uint32 pcich1status2; -+ -+ uint32 pcich2Ctl; /* PCI to internal system bus DMA PCI control */ -+ uint32 pcich2intstat; -+ uint32 pcich2intmask; -+ uint32 pcich2descaddr; -+ uint32 pcich2status1; -+ uint32 pcich2status2; -+ -+ uint32 perm_id; /* permanent device and vendor id */ -+ uint32 perm_rev; /* permanent revision id */ -+} MpiRegisters; -+ -+#define MPI ((volatile MpiRegisters * const) MPI_BASE) -+ -+/* PCI configuration address space start offset 0x40 */ -+#define BRCM_PCI_CONFIG_TIMER 0x40 -+#define BRCM_PCI_CONFIG_TIMER_RETRY_MASK 0x0000FF00 -+#define BRCM_PCI_CONFIG_TIMER_TRDY_MASK 0x000000FF -+ -+/* USB host non-Open HCI register, USB_HOST_NON_OHCI, bit definitions. */ -+#define NON_OHCI_ENABLE_PORT1 0x00000001 /* Use USB port 1 for host, not dev */ -+#define NON_OHCI_BYTE_SWAP 0x00000008 /* Swap USB host registers */ -+ -+#define USBH_NON_OHCI ((volatile unsigned long * const) USB_HOST_NON_OHCI) -+ -+#if __cplusplus -+} -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmTag.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,153 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+//************************************************************************************** -+// File Name : bcmTag.h -+// -+// Description: add tag with validation system to the firmware image file to be uploaded -+// via http -+// -+// Created : 02/28/2002 seanl -+//************************************************************************************** -+ -+#ifndef _BCMTAG_H_ -+#define _BCMTAG_H_ -+ -+ -+#define BCM_SIG_1 "Broadcom Corporation" -+#define BCM_SIG_2 "ver. 2.0" // was "firmware version 2.0" now it is split 6 char out for chip id. -+ -+#define BCM_TAG_VER "6" -+#define BCM_TAG_VER_LAST "26" -+ -+// file tag (head) structure all is in clear text except validationTokens (crc, md5, sha1, etc). Total: 128 unsigned chars -+#define TAG_LEN 256 -+#define TAG_VER_LEN 4 -+#define SIG_LEN 20 -+#define SIG_LEN_2 14 // Original second SIG = 20 is now devided into 14 for SIG_LEN_2 and 6 for CHIP_ID -+#define CHIP_ID_LEN 6 -+#define IMAGE_LEN 10 -+#define ADDRESS_LEN 12 -+#define FLAG_LEN 2 -+#define TOKEN_LEN 20 -+#define BOARD_ID_LEN 16 -+#define RESERVED_LEN (TAG_LEN - TAG_VER_LEN - SIG_LEN - SIG_LEN_2 - CHIP_ID_LEN - BOARD_ID_LEN - \ -+ (4*IMAGE_LEN) - (3*ADDRESS_LEN) - (3*FLAG_LEN) - (2*TOKEN_LEN)) -+ -+ -+// TAG for downloadable image (kernel plus file system) -+typedef struct _FILE_TAG -+{ -+ unsigned char tagVersion[TAG_VER_LEN]; // tag version. Will be 2 here. -+ unsigned char signiture_1[SIG_LEN]; // text line for company info -+ unsigned char signiture_2[SIG_LEN_2]; // additional info (can be version number) -+ unsigned char chipId[CHIP_ID_LEN]; // chip id -+ unsigned char boardId[BOARD_ID_LEN]; // board id -+ unsigned char bigEndian[FLAG_LEN]; // if = 1 - big, = 0 - little endia of the host -+ unsigned char totalImageLen[IMAGE_LEN]; // the sum of all the following length -+ unsigned char cfeAddress[ADDRESS_LEN]; // if non zero, cfe starting address -+ unsigned char cfeLen[IMAGE_LEN]; // if non zero, cfe size in clear ASCII text. -+ unsigned char rootfsAddress[ADDRESS_LEN]; // if non zero, filesystem starting address -+ unsigned char rootfsLen[IMAGE_LEN]; // if non zero, filesystem size in clear ASCII text. -+ unsigned char kernelAddress[ADDRESS_LEN]; // if non zero, kernel starting address -+ unsigned char kernelLen[IMAGE_LEN]; // if non zero, kernel size in clear ASCII text. -+ unsigned char dualImage[FLAG_LEN]; // if 1, dual image -+ unsigned char inactiveLen[FLAG_LEN]; // if 1, the image is INACTIVE; if 0, active -+ unsigned char reserved[RESERVED_LEN]; // reserved for later use -+ unsigned char imageValidationToken[TOKEN_LEN];// image validation token - can be crc, md5, sha; for -+ // now will be 4 unsigned char crc -+ unsigned char tagValidationToken[TOKEN_LEN]; // validation token for tag(from signiture_1 to end of // mageValidationToken) -+} FILE_TAG, *PFILE_TAG; -+ -+#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ -+#define CRC_LEN 4 -+ -+// only included if for bcmTag.exe program -+#ifdef BCMTAG_EXE_USE -+ -+static unsigned long Crc32_table[256] = { -+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, -+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, -+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, -+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, -+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, -+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, -+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, -+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, -+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, -+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, -+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, -+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, -+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, -+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, -+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, -+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, -+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, -+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, -+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, -+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, -+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, -+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, -+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, -+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, -+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, -+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, -+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, -+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, -+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, -+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, -+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, -+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, -+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, -+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, -+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, -+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, -+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, -+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, -+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, -+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, -+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, -+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, -+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, -+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, -+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, -+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, -+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, -+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, -+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, -+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, -+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, -+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, -+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, -+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, -+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, -+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, -+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, -+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, -+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, -+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, -+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, -+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, -+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, -+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D -+}; -+#endif // BCMTAG_USE -+ -+ -+#endif // _BCMTAG_H_ -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,59 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM_INTR_H -+#define __BCM_INTR_H -+ -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ -+#if defined(CONFIG_BCM96338) -+#include <6338_intr.h> -+#endif -+#if defined(CONFIG_BCM96345) -+#include <6345_intr.h> -+#endif -+#if defined(CONFIG_BCM96348) -+#include <6348_intr.h> -+#endif -+ -+/* defines */ -+struct pt_regs; -+typedef int (*FN_HANDLER) (int, void *, struct pt_regs *); -+ -+/* prototypes */ -+extern void enable_brcm_irq(unsigned int irq); -+extern void disable_brcm_irq(unsigned int irq); -+extern int request_external_irq(unsigned int irq, -+ FN_HANDLER handler, unsigned long irqflags, -+ const char * devname, void *dev_id); -+extern unsigned int BcmHalMapInterrupt(FN_HANDLER isr, unsigned int param, -+ unsigned int interruptId); -+extern void dump_intr_regs(void); -+ -+/* compatibility definitions */ -+#define BcmHalInterruptEnable(irq) enable_brcm_irq( irq ) -+#define BcmHalInterruptDisable(irq) disable_brcm_irq( irq ) -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,34 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM_MAP_PART_H -+#define __BCM_MAP_PART_H -+ -+#if defined(CONFIG_BCM96338) -+#include <6338_map_part.h> -+#endif -+#if defined(CONFIG_BCM96345) -+#include <6345_map_part.h> -+#endif -+#if defined(CONFIG_BCM96348) -+#include <6348_map_part.h> -+#endif -+ -+#endif -+ -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmpci.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,87 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+// -+// bcmpci.h - bcm96348 PCI, Cardbus, and PCMCIA definition -+// -+#ifndef BCMPCI_H -+#define BCMPCI_H -+ -+/* Memory window in internal system bus address space */ -+#define BCM_PCI_MEM_BASE 0x08000000 -+/* IO window in internal system bus address space */ -+#define BCM_PCI_IO_BASE 0x0C000000 -+ -+#define BCM_PCI_ADDR_MASK 0x1fffffff -+ -+/* Memory window size (range) */ -+#define BCM_PCI_MEM_SIZE_16MB 0x01000000 -+/* IO window size (range) */ -+#define BCM_PCI_IO_SIZE_64KB 0x00010000 -+ -+/* PCI Configuration and I/O space acesss */ -+#define BCM_PCI_CFG(d, f, o) ( (d << 11) | (f << 8) | (o/4 << 2) ) -+ -+/* fake USB PCI slot */ -+#define USB_HOST_SLOT 9 -+#define USB_BAR0_MEM_SIZE 0x0800 -+ -+#define BCM_HOST_MEM_SPACE1 0x10000000 -+#define BCM_HOST_MEM_SPACE2 0x00000000 -+ -+/* -+ * EBI bus clock is 33MHz and share with PCI bus -+ * each clock cycle is 30ns. -+ */ -+/* attribute memory access wait cnt for 4306 */ -+#define PCMCIA_ATTR_CE_HOLD 3 // data hold time 70ns -+#define PCMCIA_ATTR_CE_SETUP 3 // data setup time 50ns -+#define PCMCIA_ATTR_INACTIVE 6 // time between read/write cycles 180ns. For the total cycle time 600ns (cnt1+cnt2+cnt3+cnt4) -+#define PCMCIA_ATTR_ACTIVE 10 // OE/WE pulse width 300ns -+ -+/* common memory access wait cnt for 4306 */ -+#define PCMCIA_MEM_CE_HOLD 1 // data hold time 30ns -+#define PCMCIA_MEM_CE_SETUP 1 // data setup time 30ns -+#define PCMCIA_MEM_INACTIVE 2 // time between read/write cycles 40ns. For the total cycle time 250ns (cnt1+cnt2+cnt3+cnt4) -+#define PCMCIA_MEM_ACTIVE 5 // OE/WE pulse width 150ns -+ -+#define PCCARD_VCC_MASK 0x00070000 // Mask Reset also -+#define PCCARD_VCC_33V 0x00010000 -+#define PCCARD_VCC_50V 0x00020000 -+ -+typedef enum { -+ MPI_CARDTYPE_NONE, // No Card in slot -+ MPI_CARDTYPE_PCMCIA, // 16-bit PCMCIA card in slot -+ MPI_CARDTYPE_CARDBUS, // 32-bit CardBus card in slot -+} CardType; -+ -+#define CARDBUS_SLOT 0 // Slot 0 is default for CardBus -+ -+#define pcmciaAttrOffset 0x00200000 -+#define pcmciaMemOffset 0x00000000 -+// Needs to be right above PCI I/O space. Give 0x8000 (32K) to PCMCIA. -+#define pcmciaIoOffset (BCM_PCI_IO_BASE + 0x80000) -+// Base Address is that mapped into the MPI ChipSelect registers. -+// UBUS bridge MemoryWindow 0 outputs a 0x00 for the base. -+#define pcmciaBase 0xbf000000 -+#define pcmciaAttr (pcmciaAttrOffset | pcmciaBase) -+#define pcmciaMem (pcmciaMemOffset | pcmciaBase) -+#define pcmciaIo (pcmciaIoOffset | pcmciaBase) -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,163 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+// -+// bcmtypes.h - misc useful typedefs -+// -+#ifndef BCMTYPES_H -+#define BCMTYPES_H -+ -+// These are also defined in typedefs.h in the application area, so I need to -+// protect against re-definition. -+ -+#ifndef _TYPEDEFS_H_ -+typedef unsigned char uint8; -+typedef unsigned short uint16; -+typedef unsigned long uint32; -+typedef signed char int8; -+typedef signed short int16; -+typedef signed long int32; -+#if !defined(__cplusplus) -+typedef int bool; -+#endif -+#endif -+ -+typedef unsigned char byte; -+// typedef unsigned long sem_t; -+ -+typedef unsigned long HANDLE,*PULONG,DWORD,*PDWORD; -+typedef signed long LONG,*PLONG; -+ -+typedef unsigned int *PUINT; -+typedef signed int INT; -+ -+typedef unsigned short *PUSHORT; -+typedef signed short SHORT,*PSHORT; -+typedef unsigned short WORD,*PWORD; -+ -+typedef unsigned char *PUCHAR; -+typedef signed char *PCHAR; -+ -+typedef void *PVOID; -+ -+typedef unsigned char BOOLEAN, *PBOOL, *PBOOLEAN; -+ -+typedef unsigned char BYTE,*PBYTE; -+ -+//#ifndef __GNUC__ -+//The following has been defined in Vxworks internally: vxTypesOld.h -+//redefine under vxworks will cause error -+typedef signed int *PINT; -+ -+typedef signed char INT8; -+typedef signed short INT16; -+typedef signed long INT32; -+ -+typedef unsigned char UINT8; -+typedef unsigned short UINT16; -+typedef unsigned long UINT32; -+ -+typedef unsigned char UCHAR; -+typedef unsigned short USHORT; -+typedef unsigned int UINT; -+typedef unsigned long ULONG; -+ -+typedef void VOID; -+typedef unsigned char BOOL; -+ -+//#endif /* __GNUC__ */ -+ -+ -+// These are also defined in typedefs.h in the application area, so I need to -+// protect against re-definition. -+#ifndef TYPEDEFS_H -+ -+// Maximum and minimum values for a signed 16 bit integer. -+#define MAX_INT16 32767 -+#define MIN_INT16 -32768 -+ -+// Useful for true/false return values. This uses the -+// Taligent notation (k for constant). -+typedef enum -+{ -+ kFalse = 0, -+ kTrue = 1 -+} Bool; -+ -+#endif -+ -+/* macros to protect against unaligned accesses */ -+ -+#if 0 -+/* first arg is an address, second is a value */ -+#define PUT16( a, d ) { \ -+ *((byte *)a) = (byte)((d)>>8); \ -+ *(((byte *)a)+1) = (byte)(d); \ -+} -+ -+#define PUT32( a, d ) { \ -+ *((byte *)a) = (byte)((d)>>24); \ -+ *(((byte *)a)+1) = (byte)((d)>>16); \ -+ *(((byte *)a)+2) = (byte)((d)>>8); \ -+ *(((byte *)a)+3) = (byte)(d); \ -+} -+ -+/* first arg is an address, returns a value */ -+#define GET16( a ) ( \ -+ (*((byte *)a) << 8) | \ -+ (*(((byte *)a)+1)) \ -+) -+ -+#define GET32( a ) ( \ -+ (*((byte *)a) << 24) | \ -+ (*(((byte *)a)+1) << 16) | \ -+ (*(((byte *)a)+2) << 8) | \ -+ (*(((byte *)a)+3)) \ -+) -+#endif -+ -+#ifndef YES -+#define YES 1 -+#endif -+ -+#ifndef NO -+#define NO 0 -+#endif -+ -+#ifndef IN -+#define IN -+#endif -+ -+#ifndef OUT -+#define OUT -+#endif -+ -+#ifndef TRUE -+#define TRUE 1 -+#endif -+ -+#ifndef FALSE -+#define FALSE 0 -+#endif -+ -+#define READ32(addr) (*(volatile UINT32 *)((ULONG)&addr)) -+#define READ16(addr) (*(volatile UINT16 *)((ULONG)&addr)) -+#define READ8(addr) (*(volatile UINT8 *)((ULONG)&addr)) -+ -+#endif -diff -urN linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h ---- linux-2.6.8.1/bcmdrivers/opensource/include/bcm963xx/board.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,368 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: board.h */ -+/* DATE: 97/02/18 */ -+/* PURPOSE: Board specific information. This module should include */ -+/* all base device addresses and board specific macros. */ -+/* */ -+/***********************************************************************/ -+#ifndef _BOARD_H -+#define _BOARD_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+/*****************************************************************************/ -+/* Misc board definitions */ -+/*****************************************************************************/ -+ -+#define DYING_GASP_API -+ -+/*****************************************************************************/ -+/* Physical Memory Map */ -+/*****************************************************************************/ -+ -+#define PHYS_DRAM_BASE 0x00000000 /* Dynamic RAM Base */ -+#define PHYS_FLASH_BASE 0x1FC00000 /* Flash Memory */ -+ -+/*****************************************************************************/ -+/* Note that the addresses above are physical addresses and that programs */ -+/* have to use converted addresses defined below: */ -+/*****************************************************************************/ -+#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ -+#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ -+#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ -+ -+/*****************************************************************************/ -+/* Select the PLL value to get the desired CPU clock frequency. */ -+/* */ -+/* */ -+/*****************************************************************************/ -+#define FPERIPH 50000000 -+ -+#define ONEK 1024 -+#define BLK64K (64*ONEK) -+#define FLASH45_BLKS_BOOT_ROM 1 -+#define FLASH45_LENGTH_BOOT_ROM (FLASH45_BLKS_BOOT_ROM * BLK64K) -+#define FLASH_RESERVED_AT_END (64*ONEK) /*reserved for PSI, scratch pad*/ -+ -+/*****************************************************************************/ -+/* Note that the addresses above are physical addresses and that programs */ -+/* have to use converted addresses defined below: */ -+/*****************************************************************************/ -+#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ -+#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ -+#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ -+ -+/*****************************************************************************/ -+/* Select the PLL value to get the desired CPU clock frequency. */ -+/* */ -+/* */ -+/*****************************************************************************/ -+#define FPERIPH 50000000 -+ -+#define SDRAM_TYPE_ADDRESS_OFFSET 16 -+#define NVRAM_DATA_OFFSET 0x0580 -+#define NVRAM_DATA_ID 0x0f1e2d3c -+#define BOARD_SDRAM_TYPE *(unsigned long *) \ -+ (FLASH_BASE + SDRAM_TYPE_ADDRESS_OFFSET) -+ -+#define ONEK 1024 -+#define BLK64K (64*ONEK) -+ -+// nvram and psi flash definitions for 45 -+#define FLASH45_LENGTH_NVRAM ONEK // 1k nvram -+#define NVRAM_PSI_DEFAULT 24 // default psi in K byes -+ -+/*****************************************************************************/ -+/* NVRAM Offset and definition */ -+/*****************************************************************************/ -+ -+#define NVRAM_VERSION_NUMBER 2 -+#define NVRAM_VERSION_NUMBER_ADDRESS 0 -+ -+#define NVRAM_BOOTLINE_LEN 256 -+#define NVRAM_BOARD_ID_STRING_LEN 16 -+#define NVRAM_MAC_ADDRESS_LEN 6 -+#define NVRAM_MAC_COUNT_MAX 32 -+ -+/*****************************************************************************/ -+/* Misc Offsets */ -+/*****************************************************************************/ -+ -+#define CFE_VERSION_OFFSET 0x0570 -+#define CFE_VERSION_MARK_SIZE 5 -+#define CFE_VERSION_SIZE 5 -+ -+typedef struct -+{ -+ unsigned long ulVersion; -+ char szBootline[NVRAM_BOOTLINE_LEN]; -+ char szBoardId[NVRAM_BOARD_ID_STRING_LEN]; -+ unsigned long ulReserved1[2]; -+ unsigned long ulNumMacAddrs; -+ unsigned char ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ char chReserved[2]; -+ unsigned long ulCheckSum; -+} NVRAM_DATA, *PNVRAM_DATA; -+ -+ -+/*****************************************************************************/ -+/* board ioctl calls for flash, led and some other utilities */ -+/*****************************************************************************/ -+ -+ -+/* Defines. for board driver */ -+#define BOARD_IOCTL_MAGIC 'B' -+#define BOARD_DRV_MAJOR 206 -+ -+#define MAC_ADDRESS_ANY (unsigned long) -1 -+ -+#define BOARD_IOCTL_FLASH_INIT \ -+ _IOWR(BOARD_IOCTL_MAGIC, 0, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_FLASH_WRITE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 1, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_FLASH_READ \ -+ _IOWR(BOARD_IOCTL_MAGIC, 2, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_NR_PAGES \ -+ _IOWR(BOARD_IOCTL_MAGIC, 3, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_DUMP_ADDR \ -+ _IOWR(BOARD_IOCTL_MAGIC, 4, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_MEMORY \ -+ _IOWR(BOARD_IOCTL_MAGIC, 5, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_MIPS_SOFT_RESET \ -+ _IOWR(BOARD_IOCTL_MAGIC, 6, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_LED_CTRL \ -+ _IOWR(BOARD_IOCTL_MAGIC, 7, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_ID \ -+ _IOWR(BOARD_IOCTL_MAGIC, 8, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_MAC_ADDRESS \ -+ _IOWR(BOARD_IOCTL_MAGIC, 9, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_RELEASE_MAC_ADDRESS \ -+ _IOWR(BOARD_IOCTL_MAGIC, 10, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_PSI_SIZE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 11, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_SDRAM_SIZE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 12, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_MONITOR_FD \ -+ _IOWR(BOARD_IOCTL_MAGIC, 13, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_WAKEUP_MONITOR_TASK \ -+ _IOWR(BOARD_IOCTL_MAGIC, 14, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_BOOTLINE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 15, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_BOOTLINE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 16, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_BASE_MAC_ADDRESS \ -+ _IOWR(BOARD_IOCTL_MAGIC, 17, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_CHIP_ID \ -+ _IOWR(BOARD_IOCTL_MAGIC, 18, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_NUM_ENET \ -+ _IOWR(BOARD_IOCTL_MAGIC, 19, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_CFE_VER \ -+ _IOWR(BOARD_IOCTL_MAGIC, 20, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_ENET_CFG \ -+ _IOWR(BOARD_IOCTL_MAGIC, 21, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_WLAN_ANT_INUSE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 22, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_TRIGGER_EVENT \ -+ _IOWR(BOARD_IOCTL_MAGIC, 23, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_TRIGGER_EVENT \ -+ _IOWR(BOARD_IOCTL_MAGIC, 24, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_UNSET_TRIGGER_EVENT \ -+ _IOWR(BOARD_IOCTL_MAGIC, 25, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_SES_LED \ -+ _IOWR(BOARD_IOCTL_MAGIC, 26, BOARD_IOCTL_PARMS) -+ -+ -+// for the action in BOARD_IOCTL_PARMS for flash operation -+typedef enum -+{ -+ PERSISTENT, -+ NVRAM, -+ BCM_IMAGE_CFE, -+ BCM_IMAGE_FS, -+ BCM_IMAGE_KERNEL, -+ BCM_IMAGE_WHOLE, -+ SCRATCH_PAD, -+ FLASH_SIZE, -+} BOARD_IOCTL_ACTION; -+ -+ -+typedef struct boardIoctParms -+{ -+ char *string; -+ char *buf; -+ int strLen; -+ int offset; -+ BOARD_IOCTL_ACTION action; /* flash read/write: nvram, persistent, bcm image */ -+ int result; -+} BOARD_IOCTL_PARMS; -+ -+ -+// LED defines -+typedef enum -+{ -+ kLedAdsl, -+ kLedWireless, -+ kLedUsb, -+ kLedHpna, -+ kLedWanData, -+ kLedPPP, -+ kLedVoip, -+ kLedSes, -+ kLedEnd, // NOTE: Insert the new led name before this one. Alway stay at the end. -+} BOARD_LED_NAME; -+ -+typedef enum -+{ -+ kLedStateOff, /* turn led off */ -+ kLedStateOn, /* turn led on */ -+ kLedStateFail, /* turn led on red */ -+ kLedStateBlinkOnce, /* blink once, ~100ms and ignore the same call during the 100ms period */ -+ kLedStateSlowBlinkContinues, /* slow blink continues at ~600ms interval */ -+ kLedStateFastBlinkContinues, /* fast blink continues at ~200ms interval */ -+} BOARD_LED_STATE; -+ -+ -+// virtual and physical map pair defined in board.c -+typedef struct ledmappair -+{ -+ BOARD_LED_NAME ledName; // virtual led name -+ BOARD_LED_STATE ledInitState; // initial led state when the board boots. -+ unsigned short ledMask; // physical GPIO pin mask -+ unsigned short ledActiveLow; // reset bit to turn on LED -+ unsigned short ledMaskFail; // physical GPIO pin mask for state failure -+ unsigned short ledActiveLowFail;// reset bit to turn on LED -+} LED_MAP_PAIR, *PLED_MAP_PAIR; -+ -+typedef void (*HANDLE_LED_FUNC)(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState); -+ -+/* Flash storage address information that is determined by the flash driver. */ -+typedef struct flashaddrinfo -+{ -+ int flash_persistent_start_blk; -+ int flash_persistent_number_blk; -+ int flash_persistent_length; -+ unsigned long flash_persistent_blk_offset; -+ int flash_scratch_pad_start_blk; // start before psi (SP_BUF_LEN) -+ int flash_scratch_pad_number_blk; -+ int flash_scratch_pad_length; -+ unsigned long flash_scratch_pad_blk_offset; -+ int flash_nvram_start_blk; -+ int flash_nvram_number_blk; -+ int flash_nvram_length; -+ unsigned long flash_nvram_blk_offset; -+} FLASH_ADDR_INFO, *PFLASH_ADDR_INFO; -+ -+// scratch pad defines -+/* SP - Persisten Scratch Pad format: -+ sp header : 32 bytes -+ tokenId-1 : 8 bytes -+ tokenId-1 len : 4 bytes -+ tokenId-1 data -+ .... -+ tokenId-n : 8 bytes -+ tokenId-n len : 4 bytes -+ tokenId-n data -+*/ -+ -+#define MAGIC_NUM_LEN 8 -+#define MAGIC_NUMBER "gOGoBrCm" -+#define TOKEN_NAME_LEN 16 -+#define SP_VERSION 1 -+#define SP_MAX_LEN 8 * 1024 // 8k buf before psi -+#define SP_RESERVERD 16 -+ -+typedef struct _SP_HEADER -+{ -+ char SPMagicNum[MAGIC_NUM_LEN]; // 8 bytes of magic number -+ int SPVersion; // version number -+ int SPUsedLen; // used sp len -+ char SPReserved[SP_RESERVERD]; // reservied, total 32 bytes -+} SP_HEADER, *PSP_HEADER; -+ -+typedef struct _TOKEN_DEF -+{ -+ char tokenName[TOKEN_NAME_LEN]; -+ int tokenLen; -+} SP_TOKEN, *PSP_TOKEN; -+ -+ -+/*****************************************************************************/ -+/* Function Prototypes */ -+/*****************************************************************************/ -+#if !defined(__ASM_ASM_H) -+void dumpaddr( unsigned char *pAddr, int nLen ); -+ -+void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info); -+int kerSysNvRamGet(char *string, int strLen, int offset); -+int kerSysNvRamSet(char *string, int strLen, int offset); -+int kerSysPersistentGet(char *string, int strLen, int offset); -+int kerSysPersistentSet(char *string, int strLen, int offset); -+int kerSysScratchPadGet(char *tokName, char *tokBuf, int tokLen); -+int kerSysScratchPadSet(char *tokName, char *tokBuf, int tokLen); -+int kerSysBcmImageSet( int flash_start_addr, char *string, int size); -+int kerSysGetMacAddress( unsigned char *pucaAddr, unsigned long ulId ); -+int kerSysReleaseMacAddress( unsigned char *pucaAddr ); -+int kerSysGetSdramSize( void ); -+void kerSysGetBootline(char *string, int strLen); -+void kerSysSetBootline(char *string, int strLen); -+void kerSysMipsSoftReset(void); -+void kerSysLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); -+void kerSysLedRegisterHwHandler( BOARD_LED_NAME, HANDLE_LED_FUNC, int ); -+int kerSysFlashSizeGet(void); -+void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context); -+void kerSysDeregisterDyingGaspHandler(char *devname); -+void kerSysWakeupMonitorTask( void ); -+#endif -+ -+#if __cplusplus -+} -+#endif -+ -+#endif /* _BOARD_H */ -+ -diff -urN linux-2.6.8.1/boardparams/bcm963xx/Makefile linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/Makefile ---- linux-2.6.8.1/boardparams/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/Makefile 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,16 @@ -+ -+ifeq ($(CONFIG_MIPS_BRCM),y) -+ -+# Linux -+obj-y += boardparms.o -+EXTRA_CFLAGS += -DCONFIG_BCM9$(BRCM_CHIP) -+-include $(TOPDIR)/Rules.make -+ -+else -+ -+# CFE -+BSPOBJS += boardparms.o -+ -+endif -+ -+ -diff -urN linux-2.6.8.1/boardparams/bcm963xx/boardparms.c linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/boardparms.c ---- linux-2.6.8.1/boardparams/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/boardparms.c 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,2382 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.c -+ * -+ * Description: This file contains the implementation for the BCM63xx board -+ * parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include "boardparms.h" -+ -+/* Defines. */ -+ -+/* Default psi size in K bytes */ -+#define BP_PSI_DEFAULT_SIZE 24 -+ -+/* Typedefs */ -+typedef struct boardparameters -+{ -+ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ -+ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; -+ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; -+ unsigned short usSdramSize; /* SDRAM size and type */ -+ unsigned short usPsiSize; /* persistent storage in K bytes */ -+ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ -+ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ -+ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ -+ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ -+ unsigned short usGpioUartRts; /* GPIO pin or not defined */ -+ unsigned short usGpioUartCts; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ -+ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ -+ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ -+ unsigned short usExtIntrWireless; /* ext intr or not defined */ -+ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ -+ unsigned short usExtIntrHpna; /* ext intr or not defined */ -+ unsigned short usCsHpna; /* chip select not defined */ -+ unsigned short usAntInUseWireless; /* antenna in use or not defined */ -+ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ -+ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ -+ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ -+} BOARD_PARAMETERS, *PBOARD_PARAMETERS; -+ -+/* Variables */ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+static BOARD_PARAMETERS g_bcm96338sv = -+{ -+ "96338SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static BOARD_PARAMETERS g_bcm96338l2m8m = -+{ -+ "96338L-2M-8M", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; -+#endif -+ -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+static BOARD_PARAMETERS g_bcm96345r = -+{ -+ "96345R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw2 = -+{ -+ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold -+ * Reset or RTS. -+ */ -+ "96345GW2", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_GPIO_0_AH, /* usGpioPhySpiSck */ -+ BP_GPIO_4_AH, /* usGpioPhySpiSs */ -+ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ -+ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_GPIO, /* usConfigType */ -+ BP_ENET_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_GPIO_13_AH, /* usGpioUartRts */ -+ BP_GPIO_9_AH, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw = -+{ -+ "96345GW", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_GPIO_10_AH, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_EXT_INTR_3, /* usExtIntrHpna */ -+ BP_CS_1, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96335r = -+{ -+ "96335R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_9_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_8_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_9_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345r0 = -+{ -+ "96345R0", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345rs = -+{ -+ "96345RS", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, -+ &g_bcm96345rs, 0}; -+#endif -+ -+#if defined(_BCM96348_) || defined(CONFIG_BCM96348) -+ -+static BOARD_PARAMETERS g_bcm96348r = -+{ -+ "96348R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348lv = -+{ -+ "96348LV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x02, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_GPIO_5_AL, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw = -+{ -+ "96348GW", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_10 = -+{ -+ "96348GW-10", /* szBoardId */ -+ {{BP_ENET_NO_PHY}, /* ucPhyType */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw_11 = -+{ -+ "96348GW-11", /* szBoardId */ -+ {{BP_ENET_NO_PHY}, /* ucPhyType */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348sv = -+{ -+ "96348SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x1f, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_dualDsp = -+{ -+ "96348GW-DualDSP", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_UNEQUIPPED, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_DSP, /* ucDspType */ -+ 0x01, /* ucDspAddress */ -+ BP_EXT_INTR_3, /* usExtIntrVoip */ -+ BP_UNEQUIPPED , /* usGpioVoipReset */ -+ BP_GPIO_35_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_3}}, /* usCsVoip */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcmCustom_01 = -+{ -+ "BCMCUST_01", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_36_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AL, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, -+ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, -+ &g_bcmCustom_01, 0}; -+#endif -+ -+static PBOARD_PARAMETERS g_pCurrentBp = 0; -+ -+/************************************************************************** -+ * Name : bpstrcmp -+ * -+ * Description: String compare for this file so it does not depend on an OS. -+ * (Linux kernel and CFE share this source file.) -+ * -+ * Parameters : [IN] dest - destination string -+ * [IN] src - source string -+ * -+ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src -+ ***************************************************************************/ -+static int bpstrcmp(const char *dest,const char *src); -+static int bpstrcmp(const char *dest,const char *src) -+{ -+ while (*src && *dest) -+ { -+ if (*dest < *src) return -1; -+ if (*dest > *src) return 1; -+ dest++; -+ src++; -+ } -+ -+ if (*dest && !*src) return 1; -+ if (!*dest && *src) return -1; -+ return 0; -+} /* bpstrcmp */ -+ -+/************************************************************************** -+ * Name : BpGetVoipDspConfig -+ * -+ * Description: Gets the DSP configuration from the board parameter -+ * structure for a given DSP index. -+ * -+ * Parameters : [IN] dspNum - DSP index (number) -+ * -+ * Returns : Pointer to DSP configuration block if found/valid, NULL -+ * otherwise. -+ ***************************************************************************/ -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) -+{ -+ VOIP_DSP_INFO *pDspConfig = 0; -+ int i; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) -+ { -+ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && -+ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) -+ { -+ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; -+ break; -+ } -+ } -+ } -+ -+ return pDspConfig; -+} -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ) -+{ -+ int nRet = BP_BOARD_ID_NOT_FOUND; -+ PBOARD_PARAMETERS *ppBp; -+ -+ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) -+ { -+ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) -+ { -+ g_pCurrentBp = *ppBp; -+ nRet = BP_SUCCESS; -+ break; -+ } -+ } -+ -+ return( nRet ); -+} /* BpSetBoardId */ -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) -+{ -+ PBOARD_PARAMETERS *ppBp; -+ int i; -+ char *src; -+ char *dest; -+ -+ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; -+ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) -+ { -+ dest = pszBoardIds; -+ src = (*ppBp)->szBoardId; -+ while( *src ) -+ *dest++ = *src++; -+ *dest = '\0'; -+ } -+ -+ return( i ); -+} /* BpGetBoardIds */ -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) -+{ -+ int i, nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ { -+ if( i < BP_MAX_ENET_MACS ) -+ { -+ unsigned char *src = (unsigned char *) -+ &g_pCurrentBp->EnetMacInfos[i]; -+ unsigned char *dest = (unsigned char *) pEnetInfos; -+ int len = sizeof(ETHERNET_MAC_INFO); -+ while( len-- ) -+ *dest++ = *src++; -+ } -+ else -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ } -+ -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetEthernetMacInfo */ -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulSdramSize = g_pCurrentBp->usSdramSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulSdramSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetSdramSize */ -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulPsiSize = g_pCurrentBp->usPsiSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulPsiSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPsiSize */ -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; -+ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; -+ -+ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusInner = *pusOuter = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetRj11InnerOuterPairGpios */ -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; -+ -+ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPressAndHoldResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipReset; -+ -+ if( *pusValue != BP_NOT_DEFINED || -+ *pusValue == BP_UNEQUIPPED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipIntr; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipIntrGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPcmciaReset; -+ -+ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPcmciaResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, board id input string does not -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusRts = g_pCurrentBp->usGpioUartRts; -+ *pusCts = g_pCurrentBp->usGpioUartCts; -+ -+ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusRts = *pusCts = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUartRtsCtsGpios */ -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdsl; -+ -+ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdslFail; -+ -+ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWireless; -+ -+ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usAntInUseWireless; -+ -+ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessAntInUse */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; -+ -+ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessSesBtnGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; -+ -+ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedSesWireless; -+ -+ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedUsb; -+ -+ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUsbLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedHpna; -+ -+ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWanData; -+ -+ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWanDataLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPpp; -+ -+ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPppFail; -+ -+ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; -+ -+ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderPowerOn */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; -+ -+ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderAlarmLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; -+ -+ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderResetCfgLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlStop; -+ -+ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderStopLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ * -+ * Note : The VoIP structure would allow for having one LED per DSP -+ * however, the board initialization function assumes only one -+ * LED per functionality (ie one LED for VoIP). Therefore in -+ * order to keep this tidy and simple we do not make usage of the -+ * one-LED-per-DSP function. Instead, we assume that the LED for -+ * VoIP is unique and associated with DSP 0 (always present on -+ * any VoIP platform). If changing this to a LED-per-DSP function -+ * then one need to update the board initialization driver in -+ * bcmdrivers\opensource\char\board\bcm963xx\impl1 -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioLedVoip; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrWireless; -+ -+ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; -+ -+ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslDyingGaspExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usExtIntrVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrHpna; -+ -+ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usCsHpna; -+ -+ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaChipSelect */ -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usCsVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipChipSelect */ -+ -diff -urN linux-2.6.8.1/boardparams/bcm963xx/boardparms.h linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/boardparms.h ---- linux-2.6.8.1/boardparams/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.8.1-brcm63xx/boardparms/bcm963xx/boardparms.h 2006-06-26 09:07:10.000000000 +0200 -@@ -0,0 +1,766 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.h -+ * -+ * Description: This file contains definitions and function prototypes for -+ * the BCM63xx board parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+#if !defined(_BOARDPARMS_H) -+#define _BOARDPARMS_H -+#define CONFIG_BCM96348 -+#if __cplusplus -+extern "C" { -+#endif -+ -+/* Return codes. */ -+#define BP_SUCCESS 0 -+#define BP_BOARD_ID_NOT_FOUND 1 -+#define BP_VALUE_NOT_DEFINED 2 -+#define BP_BOARD_ID_NOT_SET 3 -+ -+/* Values for BpGetSdramSize. */ -+#define BP_MEMORY_8MB_1_CHIP 0 -+#define BP_MEMORY_16MB_1_CHIP 1 -+#define BP_MEMORY_32MB_1_CHIP 2 -+#define BP_MEMORY_64MB_2_CHIP 3 -+#define BP_MEMORY_32MB_2_CHIP 4 -+#define BP_MEMORY_16MB_2_CHIP 5 -+ -+/* Values for EthernetMacInfo PhyType. */ -+#define BP_ENET_NO_PHY 0 -+#define BP_ENET_INTERNAL_PHY 1 -+#define BP_ENET_EXTERNAL_PHY 2 -+#define BP_ENET_EXTERNAL_SWITCH 3 -+ -+/* Values for EthernetMacInfo Configuration type. */ -+#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ -+#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ -+#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ -+ -+/* Values for EthernetMacInfo Reverse MII. */ -+#define BP_ENET_NO_REVERSE_MII 0 -+#define BP_ENET_REVERSE_MII 1 -+ -+/* Values for VoIPDSPInfo DSPType. */ -+#define BP_VOIP_NO_DSP 0 -+#define BP_VOIP_DSP 1 -+ -+ -+/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ -+#define BP_ACTIVE_MASK 0x8000 -+#define BP_ACTIVE_HIGH 0x0000 -+#define BP_ACTIVE_LOW 0x8000 -+#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) -+#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) -+#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) -+#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) -+#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) -+#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) -+#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) -+#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) -+#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) -+#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) -+#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) -+#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) -+#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) -+#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) -+#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) -+#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) -+#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) -+#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) -+#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) -+#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) -+#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) -+#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) -+#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) -+#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) -+#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) -+#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) -+#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) -+#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) -+#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) -+#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) -+#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) -+#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) -+#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) -+#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) -+#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) -+#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) -+#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) -+#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) -+#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) -+#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) -+#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) -+#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) -+#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) -+#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) -+#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) -+#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) -+#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) -+#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) -+#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) -+#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) -+#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) -+#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) -+#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) -+#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) -+#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) -+#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) -+#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) -+#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) -+#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) -+#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) -+#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) -+#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) -+#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) -+#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) -+#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) -+#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) -+#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) -+#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) -+#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) -+#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) -+#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) -+#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) -+#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) -+#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) -+ -+/* Values for external interrupt assignments. */ -+#define BP_EXT_INTR_0 0 -+#define BP_EXT_INTR_1 1 -+#define BP_EXT_INTR_2 2 -+#define BP_EXT_INTR_3 3 -+ -+/* Values for chip select assignments. */ -+#define BP_CS_0 0 -+#define BP_CS_1 1 -+#define BP_CS_2 2 -+#define BP_CS_3 3 -+ -+/* Value for GPIO and external interrupt fields that are not used. */ -+#define BP_NOT_DEFINED 0xffff -+#define BP_HW_DEFINED 0xfff0 -+#define BP_UNEQUIPPED 0xfff1 -+ -+/* Maximum size of the board id string. */ -+#define BP_BOARD_ID_LEN 16 -+ -+/* Maximum number of Ethernet MACs. */ -+#define BP_MAX_ENET_MACS 2 -+ -+/* Maximum number of VoIP DSPs. */ -+#define BP_MAX_VOIP_DSP 2 -+ -+/* Wireless Antenna Settings. */ -+#define BP_WLAN_ANT_MAIN 0 -+#define BP_WLAN_ANT_AUX 1 -+#define BP_WLAN_ANT_BOTH 3 -+ -+#if !defined(__ASSEMBLER__) -+ -+/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, -+ * then the other fields are not valid. -+ */ -+typedef struct EthernetMacInfo -+{ -+ unsigned char ucPhyType; /* BP_ENET_xxx */ -+ unsigned char ucPhyAddress; /* 0 to 31 */ -+ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ -+ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ -+ unsigned short numSwitchPorts; /* Number of PHY ports */ -+ unsigned short usConfigType; /* Configuration type */ -+ unsigned short usReverseMii; /* Reverse MII */ -+} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; -+ -+ -+/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, -+ * then the other fields are not valid. -+ */ -+typedef struct VoIPDspInfo -+{ -+ unsigned char ucDspType; -+ unsigned char ucDspAddress; -+ unsigned short usExtIntrVoip; -+ unsigned short usGpioVoipReset; -+ unsigned short usGpioVoipIntr; -+ unsigned short usGpioLedVoip; -+ unsigned short usCsVoip; -+ -+} VOIP_DSP_INFO; -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ); -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ); -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ); -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ); -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); -+ -+#endif /* __ASSEMBLER__ */ -+ -+#if __cplusplus -+} -+#endif -+ -+#endif /* _BOARDPARMS_H */ -+ ---- linux-2.6.8.1/scripts/kconfig/mconf.c 2004-08-14 12:54:51.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/scripts/kconfig/mconf.c 2006-06-26 10:07:52.000000000 +0200 -@@ -88,7 +88,7 @@ - static int indent; - static struct termios ios_org; - static int rows = 0, cols = 0; --static struct menu *current_menu; -+struct menu *current_menu; /* Fails while cross-compiling if keeping static */ - static int child_count; - static int do_resize; - static int single_menu_mode; ---- linux-2.6.8.1/Makefile 2004-08-14 12:55:35.000000000 +0200 -+++ linux-2.6.8.1-brcm63xx/Makefile 2006-06-26 10:43:09.000000000 +0200 -@@ -149,9 +149,7 @@ - # then ARCH is assigned, getting whatever value it gets normally, and - # SUBARCH is subsequently ignored. - --SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -- -e s/arm.*/arm/ -e s/sa110/arm/ \ -- -e s/s390x/s390/ -e s/parisc64/parisc/ ) -+SUBARCH := mips - - # Cross compiling and selecting different set of gcc/bin-utils - # --------------------------------------------------------------------------- -@@ -294,7 +292,7 @@ - - NOSTDINC_FLAGS = -nostdinc -iwithprefix include - --CPPFLAGS := -D__KERNEL__ -Iinclude \ -+CPPFLAGS := -D__KERNEL__ -Iinclude -Ibcmdrivers/opensource/include/bcm963xx/ -Iboardparms/bcm963xx/ -Ibcmdrivers/broadcom/include/bcm963xx/ -Ibcmdrivers/broadcom/char/adsl/bcm96348\ - $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) - - CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ -@@ -405,6 +403,13 @@ - core-y := usr/ - endif # KBUILD_EXTMOD - -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+BRCMDRIVERS_DIR := $(TOPDIR)/bcmdrivers -+export HPATH := $(TOPDIR)/include -+brcmdrivers-y := $(TOPDIR)/boardparms/bcm963xx/ $(BRCMDRIVERS_DIR)/ -+BRCMDRIVERS := $(brcmdrivers-y) -+# CONFIG_MIPS_BRCM End Broadcom changed code. -+ - ifeq ($(dot-config),1) - # In this section, we need .config - -@@ -473,6 +478,10 @@ - # makefile but the arguement can be passed to make if needed. - # - -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+INSTALL_MOD_PATH := $(PROFILE_DIR)/modules -+# CONFIG_MIPS_BRCM End Broadcom changed code. -+ - MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) - export MODLIB - -@@ -480,18 +489,25 @@ - ifeq ($(KBUILD_EXTMOD),) - core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ - -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. - vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ - $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ -+ $(brcmdrivers-y) $(brcmdrivers-m) \ - $(net-y) $(net-m) $(libs-y) $(libs-m))) - - vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ - $(init-n) $(init-) \ - $(core-n) $(core-) $(drivers-n) $(drivers-) \ -+ $(brcmdrivers-n) $(brcmdrivers-) \ - $(net-n) $(net-) $(libs-n) $(libs-)))) -+# CONFIG_MIPS_BRCM End Broadcom changed code. - - init-y := $(patsubst %/, %/built-in.o, $(init-y)) - core-y := $(patsubst %/, %/built-in.o, $(core-y)) - drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+brcmdrivers-y := $(patsubst %/, %/built-in.o, $(brcmdrivers-y)) -+# CONFIG_MIPS_BRCM End Broadcom changed code. - net-y := $(patsubst %/, %/built-in.o, $(net-y)) - libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) - libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) -@@ -507,7 +523,8 @@ - # we cannot yet know if we will need to relink vmlinux. - # So we descend into init/ inside the rule for vmlinux again. - head-y += $(HEAD) --vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y) -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(brcmdrivers-y) $(net-y) - - quiet_cmd_vmlinux__ = LD $@ - define cmd_vmlinux__ -@@ -516,11 +533,13 @@ - $(core-y) \ - $(libs-y) \ - $(drivers-y) \ -+ $(brcmdrivers-y) \ - $(net-y) \ - --end-group \ - $(filter .tmp_kallsyms%,$^) \ - -o $@ - endef -+# CONFIG_MIPS_BRCM End Broadcom changed code. - - # set -e makes the rule exit immediately on error - -@@ -603,9 +622,12 @@ - $(rule_verify_kallsyms) - endef - --vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+vmlinux: preparebrcmdriver $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE - $(call if_changed_rule,vmlinux) - -+# CONFIG_MIPS_BRCM End Broadcom changed code. -+ - # The actual objects are generated when descending, - # make sure no implicit rule kicks in - -@@ -626,7 +648,13 @@ - # A multi level approach is used. prepare1 is updated first, then prepare0. - # prepare-all is the collection point for the prepare targets. - --.PHONY: prepare-all prepare prepare0 prepare1 prepare2 -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+.PHONY: prepare-all prepare prepare0 prepare1 prepare2 preparebrcmdriver -+ -+preparebrcmdriver: -+# $(Q)$(MAKE) -C $(BRCMDRIVERS_DIR)/opensource symlinks -+ $(Q)$(MAKE) -C $(BRCMDRIVERS_DIR)/broadcom symlinks -+# CONFIG_MIPS_BRCM End Broadcom changed code. - - # prepare 2 generate Makefile to be placed in output directory, if - # using a seperate output directory. This allows convinient use -@@ -743,7 +771,10 @@ - # Build modules - - .PHONY: modules --modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+modules: preparebrcmdriver $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) -+#modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) -+# CONFIG_MIPS_BRCM End Broadcom changed code. - @echo ' Building modules, stage 2.'; - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost - -@@ -754,23 +785,31 @@ - - # Target to install modules - .PHONY: modules_install --modules_install: _modinst_ _modinst_post -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+#modules_install: _modinst_ _modinst_post -+#We have no need for it "_modinst_post" -+modules_install: _modinst_ -+# CONFIG_MIPS_BRCM End Broadcom changed code. - - .PHONY: _modinst_ - _modinst_: -- @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \ -- echo "Warning: you may need to install module-init-tools"; \ -- echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ -- sleep 1; \ -- fi -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. -+# @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \ -+# echo "Warning: you may need to install module-init-tools"; \ -+# echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ -+# sleep 1; \ -+# fi -+# CONFIG_MIPS_BRCM End Broadcom changed code. - @rm -rf $(MODLIB)/kernel - @rm -f $(MODLIB)/source - @mkdir -p $(MODLIB)/kernel -- @ln -s $(srctree) $(MODLIB)/source -- @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ -- rm -f $(MODLIB)/build ; \ -- ln -s $(objtree) $(MODLIB)/build ; \ -- fi -+# CONFIG_MIPS_BRCM Begin Broadcom changed code -+# @ln -s $(srctree) $(MODLIB)/source -+# @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ -+# rm -f $(MODLIB)/build ; \ -+# ln -s $(objtree) $(MODLIB)/build ; \ -+# fi -+# CONFIG_MIPS_BRCM End Broadcom changed code. - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst - - # If System.map exists, run depmod. This deliberately does not have a -@@ -853,10 +892,12 @@ - clean: archclean $(clean-dirs) - $(call cmd,rmdirs) - $(call cmd,rmfiles) -+# CONFIG_MIPS_BRCM Begin Broadcom changed code. - @find . $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ - -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ - -type f -print | xargs rm -f -+# CONFIG_MIPS_BRCM End Broadcom changed code. - - # mrproper - Delete all generated files, including .config - # -@@ -883,7 +924,7 @@ - -o -name '.*.rej' -o -size 0 \ - -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ - -type f -print | xargs rm -f -- -+ rm vmlinux.bin vmlinux.lz - - # Packaging of the kernel to various formats - # --------------------------------------------------------------------------- diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch new file mode 100644 index 00000000000..b91cb25d668 --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch @@ -0,0 +1,9059 @@ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 2006-07-07 22:16:32.000000000 +0200 +@@ -0,0 +1,775 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ *************************************************************************** ++ * File Name : bcm63xx_flash.c ++ * ++ * Description: This file contains the flash device driver APIs for bcm63xx board. ++ * ++ * Created on : 8/10/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) ++ * ++ ***************************************************************************/ ++ ++ ++/* Includes. */ ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#define BCMTAG_EXE_USE ++#include <bcmTag.h> ++#include "cfiflash.h" ++#include "boardparms.h" ++ ++//#define DEBUG_FLASH ++ ++static FLASH_ADDR_INFO fInfo; ++static int flashInitialized = 0; ++ ++void *retriedKmalloc(size_t size) ++{ ++ void *pBuf; ++ int tryCount = 0; ++ ++ // try 1000 times before quit ++ while (((pBuf = kmalloc(size, GFP_KERNEL)) == NULL) && (tryCount++ < 1000)) ++ { ++ current->state = TASK_INTERRUPTIBLE; ++ schedule_timeout(HZ/10); ++ } ++ if (tryCount >= 1000) ++ pBuf = NULL; ++ else ++ memset(pBuf, 0, size); ++ ++ return pBuf; ++} ++ ++void retriedKfree(void *pBuf) ++{ ++ kfree(pBuf); ++} ++ ++/*************************************************************************** ++// Function Name: getCrc32 ++// Description : caculate the CRC 32 of the given data. ++// Parameters : pdata - array of data. ++// size - number of input data bytes. ++// crc - either CRC32_INIT_VALUE or previous return value. ++// Returns : crc. ++****************************************************************************/ ++UINT32 getCrc32(byte *pdata, UINT32 size, UINT32 crc) ++{ ++ while (size-- > 0) ++ crc = (crc >> 8) ^ Crc32_table[(crc ^ *pdata++) & 0xff]; ++ ++ return crc; ++} ++ ++// get the nvram start addr ++// ++unsigned long get_nvram_start_addr(void) ++{ ++ return ((unsigned long) ++ (flash_get_memptr(fInfo.flash_nvram_start_blk) + fInfo.flash_nvram_blk_offset)); ++} ++ ++// get the scratch_pad start addr ++// ++unsigned long get_scratch_pad_start_addr(void) ++{ ++ return ((unsigned long) ++ (flash_get_memptr(fInfo.flash_scratch_pad_start_blk) + fInfo.flash_scratch_pad_blk_offset)); ++} ++ ++ ++ ++/* ********************************************************************* ++ * kerSysImageTagGet() ++ * Get the image tag ++ * Input parameters: ++ * none ++ * Return value: ++ * point to tag -- Found ++ * NULL -- failed ++ ********************************************************************* */ ++PFILE_TAG kerSysImageTagGet(void) ++{ ++ int i; ++ int totalBlks = flash_get_numsectors(); ++ UINT32 crc; ++ unsigned char *sectAddr; ++ PFILE_TAG pTag; ++ ++#if defined(DEBUG_FLASH) ++ printk("totalblks in tagGet=%d\n", totalBlks); ++#endif ++ ++ // start from 2nd blk, assume 1st one is always CFE ++ for (i = 1; i < totalBlks; i++) ++ { ++ sectAddr = flash_get_memptr((byte) i); ++ crc = CRC32_INIT_VALUE; ++ crc = getCrc32(sectAddr, (UINT32)TAG_LEN-TOKEN_LEN, crc); ++ pTag = (PFILE_TAG) sectAddr; ++ ++#if defined(DEBUG_FLASH) ++ printk("Check Tag crc on blk [%d]\n", i); ++#endif ++ ++ if (crc == (UINT32)(*(UINT32*)(pTag->tagValidationToken))) ++ return pTag; ++ } ++ ++ return (PFILE_TAG) NULL; ++} ++ ++// Initialize the flash and fill out the fInfo structure ++void kerSysFlashInit( void ) ++{ ++ int i = 0; ++ int totalBlks = 0; ++ int totalSize = 0; ++ int startAddr = 0; ++ int usedBlkSize = 0; ++ NVRAM_DATA nvramData; ++ UINT32 crc = CRC32_INIT_VALUE, savedCrc; ++ PFILE_TAG pTag = NULL; ++ unsigned long kernelEndAddr = 0; ++ unsigned long spAddr = 0; ++ ++ if (flashInitialized) ++ return; ++ ++ flashInitialized = 1; ++ flash_init(); ++ ++ totalBlks = flash_get_numsectors(); ++ totalSize = flash_get_total_size(); ++ ++ printk("Total Flash size: %dK with %d sectors\n", totalSize/1024, totalBlks); ++ ++ /* nvram is always at the end of flash */ ++ fInfo.flash_nvram_length = FLASH45_LENGTH_NVRAM; ++ fInfo.flash_nvram_start_blk = 0; /* always the first block */ ++ fInfo.flash_nvram_number_blk = 1; /*always fits in the first block */ ++ fInfo.flash_nvram_blk_offset = NVRAM_DATA_OFFSET; ++ ++ // check nvram CRC ++ memcpy((char *)&nvramData, (char *)get_nvram_start_addr(), sizeof(NVRAM_DATA)); ++ savedCrc = nvramData.ulCheckSum; ++ nvramData.ulCheckSum = 0; ++ crc = getCrc32((char *)&nvramData, (UINT32) sizeof(NVRAM_DATA), crc); ++ ++ BpSetBoardId( nvramData.szBoardId ); ++ ++ fInfo.flash_persistent_length = NVRAM_PSI_DEFAULT; ++ if (savedCrc != crc) ++ { ++ printk("***Board is not initialized****: Using the default PSI size: %d\n", ++ fInfo.flash_persistent_length); ++ } ++ else ++ { ++ unsigned long ulPsiSize; ++ if( BpGetPsiSize( &ulPsiSize ) == BP_SUCCESS ) ++ fInfo.flash_persistent_length = ulPsiSize; ++ else ++ { ++ printk("***Board id is not set****: Using the default PSI size: %d\n", ++ fInfo.flash_persistent_length); ++ } ++ } ++ ++ fInfo.flash_persistent_length *= ONEK; ++ startAddr = totalSize - fInfo.flash_persistent_length; ++ fInfo.flash_persistent_start_blk = flash_get_blk(startAddr+FLASH_BASE_ADDR_REG); ++ fInfo.flash_persistent_number_blk = totalBlks - fInfo.flash_persistent_start_blk; ++ // save abs SP address (Scratch Pad). it is before PSI ++ spAddr = startAddr - SP_MAX_LEN ; ++ // find out the offset in the start_blk ++ usedBlkSize = 0; ++ for (i = fInfo.flash_persistent_start_blk; ++ i < (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk); i++) ++ { ++ usedBlkSize += flash_get_sector_size((byte) i); ++ } ++ fInfo.flash_persistent_blk_offset = usedBlkSize - fInfo.flash_persistent_length; ++ ++ // get the info for sp ++ if (!(pTag = kerSysImageTagGet())) ++ { ++ printk("Failed to read image tag from flash\n"); ++ return; ++ } ++ kernelEndAddr = (unsigned long) simple_strtoul(pTag->kernelAddress, NULL, 10) + \ ++ (unsigned long) simple_strtoul(pTag->kernelLen, NULL, 10); ++ ++ // make suer sp does not share kernel block ++ fInfo.flash_scratch_pad_start_blk = flash_get_blk(spAddr+FLASH_BASE_ADDR_REG); ++ if (fInfo.flash_scratch_pad_start_blk != flash_get_blk(kernelEndAddr)) ++ { ++ fInfo.flash_scratch_pad_length = SP_MAX_LEN; ++ if (fInfo.flash_persistent_start_blk == fInfo.flash_scratch_pad_start_blk) // share blk ++ { ++#if 1 /* do not used scratch pad unless it's in its own sector */ ++ printk("Scratch pad is not used for this flash part.\n"); ++ fInfo.flash_scratch_pad_length = 0; // no sp ++#else /* allow scratch pad to share a sector with another section such as PSI */ ++ fInfo.flash_scratch_pad_number_blk = 1; ++ fInfo.flash_scratch_pad_blk_offset = fInfo.flash_persistent_blk_offset - fInfo.flash_scratch_pad_length; ++#endif ++ } ++ else // on different blk ++ { ++ fInfo.flash_scratch_pad_number_blk = fInfo.flash_persistent_start_blk\ ++ - fInfo.flash_scratch_pad_start_blk; ++ // find out the offset in the start_blk ++ usedBlkSize = 0; ++ for (i = fInfo.flash_scratch_pad_start_blk; ++ i < (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk); i++) ++ usedBlkSize += flash_get_sector_size((byte) i); ++ fInfo.flash_scratch_pad_blk_offset = usedBlkSize - fInfo.flash_scratch_pad_length; ++ } ++ } ++ else ++ { ++ printk("No flash for scratch pad!\n"); ++ fInfo.flash_scratch_pad_length = 0; // no sp ++ } ++ ++#if defined(DEBUG_FLASH) ++ printk("fInfo.flash_scratch_pad_start_blk = %d\n", fInfo.flash_scratch_pad_start_blk); ++ printk("fInfo.flash_scratch_pad_number_blk = %d\n", fInfo.flash_scratch_pad_number_blk); ++ printk("fInfo.flash_scratch_pad_length = 0x%x\n", fInfo.flash_scratch_pad_length); ++ printk("fInfo.flash_scratch_pad_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_scratch_pad_blk_offset); ++ ++ printk("fInfo.flash_nvram_start_blk = %d\n", fInfo.flash_nvram_start_blk); ++ printk("fInfo.flash_nvram_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_nvram_blk_offset); ++ printk("fInfo.flash_nvram_number_blk = %d\n", fInfo.flash_nvram_number_blk); ++ ++ printk("psi startAddr = %x\n", startAddr+FLASH_BASE_ADDR_REG); ++ printk("fInfo.flash_persistent_start_blk = %d\n", fInfo.flash_persistent_start_blk); ++ printk("fInfo.flash_persistent_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_persistent_blk_offset); ++ printk("fInfo.flash_persistent_number_blk = %d\n", fInfo.flash_persistent_number_blk); ++#endif ++ ++} ++ ++ ++ ++/*********************************************************************** ++ * Function Name: kerSysFlashAddrInfoGet ++ * Description : Fills in a structure with information about the NVRAM ++ * and persistent storage sections of flash memory. ++ * Fro physmap.c to mount the fs vol. ++ * Returns : None. ++ ***********************************************************************/ ++void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info) ++{ ++ pflash_addr_info->flash_nvram_blk_offset = fInfo.flash_nvram_blk_offset; ++ pflash_addr_info->flash_nvram_length = fInfo.flash_nvram_length; ++ pflash_addr_info->flash_nvram_number_blk = fInfo.flash_nvram_number_blk; ++ pflash_addr_info->flash_nvram_start_blk = fInfo.flash_nvram_start_blk; ++ pflash_addr_info->flash_persistent_blk_offset = fInfo.flash_persistent_blk_offset; ++ pflash_addr_info->flash_persistent_length = fInfo.flash_persistent_length; ++ pflash_addr_info->flash_persistent_number_blk = fInfo.flash_persistent_number_blk; ++ pflash_addr_info->flash_persistent_start_blk = fInfo.flash_persistent_start_blk; ++} ++ ++ ++// get shared blks into *** pTempBuf *** which has to be released bye the caller! ++// return: if pTempBuf != NULL, poits to the data with the dataSize of the buffer ++// !NULL -- ok ++// NULL -- fail ++static char *getSharedBlks(int start_blk, int end_blk) ++{ ++ int i = 0; ++ int usedBlkSize = 0; ++ int sect_size = 0; ++ char *pTempBuf = NULL; ++ char *pBuf = NULL; ++ ++ for (i = start_blk; i < end_blk; i++) ++ usedBlkSize += flash_get_sector_size((byte) i); ++ ++#if defined(DEBUG_FLASH) ++ printk("usedBlkSize = %d\n", usedBlkSize); ++#endif ++ ++ if ((pTempBuf = (char *) retriedKmalloc(usedBlkSize)) == NULL) ++ { ++ printk("failed to allocate memory with size: %d\n", usedBlkSize); ++ return pTempBuf; ++ } ++ ++ pBuf = pTempBuf; ++ for (i = start_blk; i < end_blk; i++) ++ { ++ sect_size = flash_get_sector_size((byte) i); ++ ++#if defined(DEBUG_FLASH) ++ printk("i = %d, sect_size = %d, end_blk = %d\n", i, sect_size, end_blk); ++#endif ++ flash_read_buf((byte)i, 0, pBuf, sect_size); ++ pBuf += sect_size; ++ } ++ ++ return pTempBuf; ++} ++ ++ ++ ++// Set the pTempBuf to flash from start_blk to end_blk ++// return: ++// 0 -- ok ++// -1 -- fail ++static int setSharedBlks(int start_blk, int end_blk, char *pTempBuf) ++{ ++ int i = 0; ++ int sect_size = 0; ++ int sts = 0; ++ char *pBuf = pTempBuf; ++ ++ for (i = start_blk; i < end_blk; i++) ++ { ++ sect_size = flash_get_sector_size((byte) i); ++ flash_sector_erase_int(i); ++ if (flash_write_buf(i, 0, pBuf, sect_size) != sect_size) ++ { ++ printk("Error writing flash sector %d.", i); ++ sts = -1; ++ break; ++ } ++ pBuf += sect_size; ++ } ++ ++ return sts; ++} ++ ++ ++ ++/******************************************************************************* ++ * NVRAM functions ++ *******************************************************************************/ ++ ++// get nvram data ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysNvRamGet(char *string, int strLen, int offset) ++{ ++ char *pBuf = NULL; ++ ++ if (!flashInitialized) ++ kerSysFlashInit(); ++ ++ if (strLen > FLASH45_LENGTH_NVRAM) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) ++ return -1; ++ ++ // get string off the memory buffer ++ memcpy(string, (pBuf + fInfo.flash_nvram_blk_offset + offset), strLen); ++ ++ retriedKfree(pBuf); ++ ++ return 0; ++} ++ ++ ++// set nvram ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysNvRamSet(char *string, int strLen, int offset) ++{ ++ int sts = 0; ++ char *pBuf = NULL; ++ ++ if (strLen > FLASH45_LENGTH_NVRAM) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) ++ return -1; ++ ++ // set string to the memory buffer ++ memcpy((pBuf + fInfo.flash_nvram_blk_offset + offset), string, strLen); ++ ++ if (setSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_number_blk + fInfo.flash_nvram_start_blk), pBuf) != 0) ++ sts = -1; ++ ++ retriedKfree(pBuf); ++ ++ return sts; ++} ++ ++ ++/*********************************************************************** ++ * Function Name: kerSysEraseNvRam ++ * Description : Erase the NVRAM storage section of flash memory. ++ * Returns : 1 -- ok, 0 -- fail ++ ***********************************************************************/ ++int kerSysEraseNvRam(void) ++{ ++ int sts = 1; ++ char *tempStorage = retriedKmalloc(FLASH45_LENGTH_NVRAM); ++ ++ // just write the whole buf with '0xff' to the flash ++ if (!tempStorage) ++ sts = 0; ++ else ++ { ++ memset(tempStorage, 0xff, FLASH45_LENGTH_NVRAM); ++ if (kerSysNvRamSet(tempStorage, FLASH45_LENGTH_NVRAM, 0) != 0) ++ sts = 0; ++ retriedKfree(tempStorage); ++ } ++ ++ return sts; ++} ++ ++ ++/******************************************************************************* ++ * PSI functions ++ *******************************************************************************/ ++// get psi data ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysPersistentGet(char *string, int strLen, int offset) ++{ ++ char *pBuf = NULL; ++ ++ if (strLen > fInfo.flash_persistent_length) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) ++ return -1; ++ ++ // get string off the memory buffer ++ memcpy(string, (pBuf + fInfo.flash_persistent_blk_offset + offset), strLen); ++ ++ retriedKfree(pBuf); ++ ++ return 0; ++} ++ ++ ++// set psi ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysPersistentSet(char *string, int strLen, int offset) ++{ ++ int sts = 0; ++ char *pBuf = NULL; ++ ++ if (strLen > fInfo.flash_persistent_length) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) ++ return -1; ++ ++ // set string to the memory buffer ++ memcpy((pBuf + fInfo.flash_persistent_blk_offset + offset), string, strLen); ++ ++ if (setSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_number_blk + fInfo.flash_persistent_start_blk), pBuf) != 0) ++ sts = -1; ++ ++ retriedKfree(pBuf); ++ ++ return sts; ++} ++ ++ ++// flash bcm image ++// return: ++// 0 - ok ++// !0 - the sector number fail to be flashed (should not be 0) ++int kerSysBcmImageSet( int flash_start_addr, char *string, int size) ++{ ++ int sts; ++ int sect_size; ++ int blk_start; ++ int i; ++ char *pTempBuf = NULL; ++ int whole_image = 0; ++ ++ blk_start = flash_get_blk(flash_start_addr); ++ if( blk_start < 0 ) ++ return( -1 ); ++ ++ if (flash_start_addr == FLASH_BASE && size > FLASH45_LENGTH_BOOT_ROM) ++ whole_image = 1; ++ ++ /* write image to flash memory */ ++ do ++ { ++ sect_size = flash_get_sector_size(blk_start); ++// NOTE: for memory problem in multiple PVC configuration, temporary get rid of kmalloc this 64K for now. ++// if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) ++// { ++// printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); ++// kerSysMipsSoftReset(); // reset the board right away. ++// } ++ // for whole image, no check on psi ++ if (!whole_image && blk_start == fInfo.flash_persistent_start_blk) // share the blk with psi ++ { ++ if (size > (sect_size - fInfo.flash_persistent_length)) ++ { ++ printk("Image is too big\n"); ++ break; // image is too big. Can not overwrite to nvram ++ } ++ if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) ++ { ++ printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); ++ kerSysMipsSoftReset(); // reset the board right away. ++ } ++ flash_read_buf((byte)blk_start, 0, pTempBuf, sect_size); ++ if (copy_from_user((void *)pTempBuf,(void *)string, size) != 0) ++ break; // failed ? ++ flash_sector_erase_int(blk_start); // erase blk before flash ++ if (flash_write_buf(blk_start, 0, pTempBuf, sect_size) == sect_size) ++ size = 0; // break out and say all is ok ++ retriedKfree(pTempBuf); ++ break; ++ } ++ ++ flash_sector_erase_int(blk_start); // erase blk before flash ++ ++ if (sect_size > size) ++ { ++ if (size & 1) ++ size++; ++ sect_size = size; ++ } ++ ++ if ((i = flash_write_buf(blk_start, 0, string, sect_size)) != sect_size) { ++ break; ++ } ++ blk_start++; ++ string += sect_size; ++ size -= sect_size; ++ } while (size > 0); ++ ++ if (whole_image) ++ { ++ // If flashing a whole image, erase to end of flash. ++ int total_blks = flash_get_numsectors(); ++ while( blk_start < total_blks ) ++ { ++ flash_sector_erase_int(blk_start); ++ blk_start++; ++ } ++ } ++ if (pTempBuf) ++ retriedKfree(pTempBuf); ++ ++ if( size == 0 ) ++ sts = 0; // ok ++ else ++ sts = blk_start; // failed to flash this sector ++ ++ return sts; ++} ++ ++/******************************************************************************* ++ * SP functions ++ *******************************************************************************/ ++// get sp data. NOTE: memcpy work here -- not using copy_from/to_user ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysScratchPadGet(char *tokenId, char *tokBuf, int bufLen) ++{ ++ PSP_HEADER pHead = NULL; ++ PSP_TOKEN pToken = NULL; ++ char *pBuf = NULL; ++ char *pShareBuf = NULL; ++ char *startPtr = NULL; ++ char *endPtr = NULL; ++ char *spEndPtr = NULL; ++ int sts = -1; ++ ++ if (fInfo.flash_scratch_pad_length == 0) ++ return sts; ++ ++ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) ++ { ++ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ ++ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); ++ return sts; ++ } ++ ++ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) ++ return sts; ++ ++ // pBuf points to SP buf ++ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; ++ ++ pHead = (PSP_HEADER) pBuf; ++ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) ++ { ++ printk("Scrap pad is not initialized.\n"); ++ return sts; ++ } ++ ++ // search up to SPUsedLen for the token ++ startPtr = pBuf + sizeof(SP_HEADER); ++ endPtr = pBuf + pHead->SPUsedLen; ++ spEndPtr = pBuf + SP_MAX_LEN; ++ while (startPtr < endPtr && startPtr < spEndPtr) ++ { ++ pToken = (PSP_TOKEN) startPtr; ++ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) ++ { ++ memcpy(tokBuf, startPtr + sizeof(SP_TOKEN), bufLen); ++ sts = 0; ++ break; ++ } ++ // get next token ++ startPtr += sizeof(SP_TOKEN) + pToken->tokenLen; ++ } ++ ++ retriedKfree(pShareBuf); ++ ++ return sts; ++} ++ ++ ++// set sp. NOTE: memcpy work here -- not using copy_from/to_user ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysScratchPadSet(char *tokenId, char *tokBuf, int bufLen) ++{ ++ PSP_TOKEN pToken = NULL; ++ PSP_HEADER pHead = NULL; ++ char *pShareBuf = NULL; ++ char *pBuf = NULL; ++ SP_HEADER SPHead; ++ SP_TOKEN SPToken; ++ char *curPtr; ++ int sts = -1; ++ ++ if (fInfo.flash_scratch_pad_length == 0) ++ return sts; ++ ++ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) ++ { ++ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ ++ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); ++ return sts; ++ } ++ ++ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) ++ return sts; ++ ++ // pBuf points to SP buf ++ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; ++ pHead = (PSP_HEADER) pBuf; ++ ++ // form header info. SPUsedLen later on... ++ memset((char *)&SPHead, 0, sizeof(SP_HEADER)); ++ memcpy(SPHead.SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN); ++ SPHead.SPVersion = SP_VERSION; ++ ++ // form token info. ++ memset((char*)&SPToken, 0, sizeof(SP_TOKEN)); ++ strncpy(SPToken.tokenName, tokenId, TOKEN_NAME_LEN - 1); ++ SPToken.tokenLen = bufLen; ++ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) ++ { ++ // new sp, so just flash the token ++ printk("No Scrap pad found. Initialize scratch pad...\n"); ++ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; ++ memcpy(pBuf, (char *)&SPHead, sizeof(SP_HEADER)); ++ curPtr = pBuf + sizeof(SP_HEADER); ++ memcpy(curPtr, (char *)&SPToken, sizeof(SP_TOKEN)); ++ curPtr += sizeof(SP_TOKEN); ++ memcpy(curPtr, tokBuf, bufLen); ++ } ++ else ++ { ++ // need search for the token, if exist with same size overwrite it. if sizes differ, ++ // move over the later token data over and put the new one at the end ++ char *endPtr = pBuf + pHead->SPUsedLen; ++ char *spEndPtr = pBuf + SP_MAX_LEN; ++ curPtr = pBuf + sizeof(SP_HEADER); ++ while (curPtr < endPtr && curPtr < spEndPtr) ++ { ++ pToken = (PSP_TOKEN) curPtr; ++ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) ++ { ++ if (pToken->tokenLen == bufLen) // overwirte it ++ { ++ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); ++ break; ++ } ++ else // move later data over and put the new token at the end ++ { ++ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); // ~~~ ++ break; ++ } ++ } ++ else // not same token ~~~ ++ { ++ } ++ // get next token ++ curPtr += sizeof(SP_TOKEN) + pToken->tokenLen; ++ } // end while ++ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; // ~~~ ++ if (SPHead.SPUsedLen > SP_MAX_LEN) ++ { ++ printk("No more Scratch pad space left! Over limit by %d bytes\n", SPHead.SPUsedLen - SP_MAX_LEN); ++ return sts; ++ } ++ ++ } // else if not new sp ++ ++ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf); ++ ++ retriedKfree(pShareBuf); ++ ++ return sts; ++ ++ ++} ++ ++int kerSysFlashSizeGet(void) ++{ ++ return flash_get_total_size(); ++} ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 2006-07-07 22:16:32.000000000 +0200 +@@ -0,0 +1,582 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : bcm63xx_led.c ++ * ++ * Description: ++ * ++ * This file contains bcm963xx board led control API functions. ++ * ++ * To use it, do the following ++ * ++ * 1). define in the board.c the following led mappping (this is for 6345GW board): ++ * const LED_MAP_PAIR cLedMapping45GW[] = ++ * { // led name Initial state physical pin (ledMask) ++ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, ++ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, ++ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 ++ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, ++ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, ++ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. ++ * ++ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping ++ * pointer from the above struct ++ * ++ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); ++ * ++ * 3). Sample call for kernel mode: ++ * ++ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h ++ * ++ * 4). Sample call for user mode ++ * ++ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h ++ * ++ * ++ * Created on : 10/28/2002 seanl ++ * ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/netdevice.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define k100ms (HZ / 10) // ~100 ms ++#define kFastBlinkCount 0 // ~100ms ++#define kSlowBlinkCount 5 // ~600ms ++ ++#define MAX_VIRT_LEDS 12 ++ ++// uncomment // for debug led ++//#define DEBUG_LED ++ ++// global variables: ++struct timer_list gLedTimer; ++int gTimerOn = FALSE; ++int gLedCount = 0; ++ ++typedef struct ledinfo ++{ ++ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLow; // GPIO bit reset to turn on LED ++ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED ++ BOARD_LED_STATE ledState; // current led state ++ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState ++ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. ++} LED_INFO, *PLED_INFO; ++ ++static PLED_INFO gLed = NULL; ++static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; ++ ++#if 0 /* BROKEN */ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++static int gLedOffInBridgeMode = 1; ++#elif defined(CONFIG_BCM96345) ++static int gLedOffInBridgeMode = 0; ++#endif ++#endif ++ ++void ledTimerExpire(void); ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); ++ ++//************************************************************************************** ++// LED operations ++//************************************************************************************** ++ ++// turn led on and set the ledState ++void ledOn(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMask; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateOn; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOff(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio |= pLed->ledMask; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++// turn led on and set the ledState ++void ledOnFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateFail; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOffFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++ ++// toggle the led and return the current ledState ++BOARD_LED_STATE ledToggle(PLED_INFO pLed) ++{ ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if (GPIO->GPIOio & pLed->ledMask) ++ { ++ GPIO->GPIOio &= ~(pLed->ledMask); ++ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); ++ } ++ else ++ { ++ GPIO->GPIOio |= pLed->ledMask; ++ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); ++ } ++} ++ ++ ++// led timer. Will return if timer is already on ++void ledTimerStart(void) ++{ ++ if (gTimerOn) ++ return; ++ ++#if defined(DEBUG_LED) ++ printk("led: add_timer\n"); ++#endif ++ ++ init_timer(&gLedTimer); ++ gLedTimer.function = (void*)ledTimerExpire; ++ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms ++ add_timer (&gLedTimer); ++ gTimerOn = TRUE; ++} ++ ++ ++// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and ++// restart the timer according to ledState ++void ledTimerExpire(void) ++{ ++ int i; ++ PLED_INFO pCurLed; ++ ++ gTimerOn = FALSE; ++ ++ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) ++ { ++#if defined(DEBUG_LED) ++ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); ++#endif ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ case kLedStateOff: ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ break; ++ ++ case kLedStateBlinkOnce: ++ ledToggle(pCurLed); ++ pCurLed->blinkCountDown = 0; // reset to 0 ++ pCurLed->ledState = pCurLed->savedLedState; ++ if (pCurLed->ledState == kLedStateSlowBlinkContinues || ++ pCurLed->ledState == kLedStateFastBlinkContinues) ++ ledTimerStart(); // start timer if in blinkContinues stats ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ } ++} ++ ++// initialize the gLedCount and allocate and fill gLed struct ++void __init boardLedInit(PLED_MAP_PAIR cLedMapping) ++{ ++ PLED_MAP_PAIR p1, p2; ++ PLED_INFO pCurLed; ++ int needTimer = FALSE; ++ int alreadyUsed = 0; ++ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ ++ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; ++ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; ++#endif ++ ++ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); ++ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); ++ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); ++ ++ gLedCount = 0; ++ ++ // Check for multiple LED names and multiple LED GPIO pins that share the ++ // same physical board LED. ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ gLedCount++; ++ } ++ ++ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); ++ if( gLed == NULL ) ++ { ++ printk( "LED memory allocation error.\n" ); ++ return; ++ } ++ ++ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); ++ ++ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led ++ // (ledMask) the first defined led's ledInitState will be used. ++ pCurLed = gLed; ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ if( (int) p1->ledName > MAX_VIRT_LEDS ) ++ continue; ++ ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ { ++ // Initialize the board LED for the first time. ++ needTimer = initLedInfo( p1, pCurLed ); ++ gpVirtLeds[(int) p1->ledName] = pCurLed; ++ pCurLed++; ++ } ++ else ++ { ++ PLED_INFO pLed; ++ for( pLed = gLed; pLed != pCurLed; pLed++ ) ++ { ++ // Find the LED_INFO structure that has already been initialized. ++ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || ++ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) ++ { ++ // The board LED has already been initialized but possibly ++ // not completely initialized. ++ if( p1->ledMask ) ++ { ++ pLed->ledMask = p1->ledMask; ++ pLed->ledActiveLow = p1->ledActiveLow; ++ } ++ if( p1->ledMaskFail ) ++ { ++ pLed->ledMaskFail = p1->ledMaskFail; ++ pLed->ledActiveLowFail = p1->ledActiveLowFail; ++ } ++ gpVirtLeds[(int) p1->ledName] = pLed; ++ break; ++ } ++ } ++ } ++ } ++ ++ if (needTimer) ++ ledTimerStart(); ++ ++#if defined(DEBUG_LED) ++ int i; ++ for (i=0; i < gLedCount; i++) ++ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); ++#endif ++ ++} ++ ++// Initialize a structure that contains information about a physical board LED ++// control. The board LED may contain more than one GPIO pin to control a ++// normal condition (green) or a failure condition (red). ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) ++{ ++ int needTimer = FALSE; ++ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; ++ pCurLed->ledMask = pCurMap->ledMask; ++ pCurLed->ledActiveLow = pCurMap->ledActiveLow; ++ pCurLed->ledMaskFail = pCurMap->ledMaskFail; ++ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; ++ ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOn(pCurLed); ++ break; ++ case kLedStateOff: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOff(pCurLed); ++ break; ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOnFail(pCurLed); ++ break; ++ case kLedStateBlinkOnce: ++ pCurLed->blinkCountDown = 1; ++ needTimer = TRUE; ++ break; ++ case kLedStateSlowBlinkContinues: ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ needTimer = TRUE; ++ break; ++ case kLedStateFastBlinkContinues: ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ needTimer = TRUE; ++ break; ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ ++ return( needTimer ); ++} ++ ++#if 0 /* BROKEN */ ++// Determines if there is at least one interface in bridge mode. Bridge mode ++// is determined by the cfm convention of naming bridge interfaces nas17 ++// through nas24. ++static int isBridgedProtocol(void) ++{ ++ extern int dev_get(const char *name); ++ const int firstBridgeId = 17; ++ const int lastBridgeId = 24; ++ int i; ++ int ret = FALSE; ++ char name[16]; ++ ++ for( i = firstBridgeId; i <= lastBridgeId; i++ ) ++ { ++ sprintf( name, "nas%d", i ); ++ ++ if( dev_get(name) ) ++ { ++ ret = TRUE; ++ break; ++ } ++ } ++ ++ return(ret); ++} ++#endif ++ ++// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation ++void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ PLED_INFO ledInfoPtr; ++ ++ // do the mapping from virtual to physical led ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ ledInfoPtr = gpVirtLeds[(int) ledName]; ++ else ++ ledInfoPtr = NULL; ++ ++ if (ledInfoPtr == NULL) ++ return; ++ ++ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) ++ { ++ (*gLedHwFunc[(int) ledName]) (ledName, ledState); ++ ledOffFail(ledInfoPtr); ++ return; ++ } ++ else ++ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) ++ { ++ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); ++ ledOff(ledInfoPtr); ++ return; ++ } ++ ++#if 0 /* BROKEN */ ++ // Do not blink the WAN Data LED if at least one interface is in bridge mode. ++ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) ++ { ++ static int BridgedProtocol = -1; ++ ++ if( BridgedProtocol == -1 ) ++ BridgedProtocol = isBridgedProtocol(); ++ ++ if( BridgedProtocol == TRUE ) ++ return; ++ } ++#endif ++ ++ // If the state is kLedStateFail and there is not a failure LED defined ++ // in the board parameters, change the state to kLedStateFastBlinkContinues. ++ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) ++ ledState = kLedStateFastBlinkContinues; ++ ++ switch (ledState) ++ { ++ case kLedStateOn: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on the specified LED GPIO. ++ ledOn(ledInfoPtr); ++ break; ++ ++ case kLedStateOff: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn off the specified LED GPIO. ++ ledOff(ledInfoPtr); ++ break; ++ ++ case kLedStateFail: ++ // First, turn off the complimentary (normal) LED GPIO. ++ if( ledInfoPtr->ledMask ) ++ ledOff(ledInfoPtr); ++ else ++ if( gLedHwFunc[(int) ledName] ) ++ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on (red) the specified LED GPIO. ++ ledOnFail(ledInfoPtr); ++ break; ++ ++ case kLedStateBlinkOnce: ++ // skip blinkOnce if it is already in Slow/Fast blink continues state ++ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || ++ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) ++ ; ++ else ++ { ++ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 ++ { ++ ledToggle(ledInfoPtr); ++ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires ++ ledInfoPtr->ledState = kLedStateBlinkOnce; ++ ledTimerStart(); ++ } ++ } ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ ledInfoPtr->blinkCountDown = kSlowBlinkCount; ++ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ ledInfoPtr->blinkCountDown = kFastBlinkCount; ++ ledInfoPtr->ledState = kLedStateFastBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid led state\n"); ++ } ++} ++ ++// This function is called for an LED that is controlled by hardware. ++void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) ++{ ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ { ++ if( ledFailType == 1 ) ++ gLedHwFailFunc[(int) ledName] = ledHwFunc; ++ else ++ gLedHwFunc[(int) ledName] = ledHwFunc; ++ } ++} ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c 2006-07-07 22:16:43.000000000 +0200 +@@ -0,0 +1,1614 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : board.c ++ * ++ * Description: This file contains Linux character device driver entry ++ * for the board related ioctl calls: flash, get free kernel ++ * page and dump kernel memory, etc. ++ * ++ * Created on : 2/20/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) ++ * ++ ***************************************************************************/ ++ ++ ++/* Includes. */ ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/interrupt.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/pagemap.h> ++#include <asm/uaccess.h> ++#include <linux/wait.h> ++#include <linux/poll.h> ++#include <linux/sched.h> ++#include <linux/list.h> ++#include <linux/if.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include <bcmTag.h> ++#include "boardparms.h" ++#include "cfiflash.h" ++#include "bcm_intr.h" ++#include "board.h" ++#include "bcm_map_part.h" ++ ++/* Typedefs. */ ++#if defined (NON_CONSECUTIVE_MAC) ++// used to be the last octet. Now changed to the first 5 bits of the the forth octet ++// to reduced the duplicated MAC addresses. ++#define CHANGED_OCTET 3 ++#define SHIFT_BITS 3 ++#else ++#define CHANGED_OCTET 1 ++#define SHIFT_BITS 0 ++#endif ++ ++#if defined (WIRELESS) ++#define SES_BTN_PRESSED 0x00000001 ++#define SES_EVENTS SES_BTN_PRESSED /*OR all values if any*/ ++#define SES_LED_OFF 0 ++#define SES_LED_ON 1 ++#define SES_LED_BLINK 2 ++#endif ++ ++typedef struct ++{ ++ unsigned long ulId; ++ char chInUse; ++ char chReserved[3]; ++} MAC_ADDR_INFO, *PMAC_ADDR_INFO; ++ ++typedef struct ++{ ++ unsigned long ulSdramSize; ++ unsigned long ulPsiSize; ++ unsigned long ulNumMacAddrs; ++ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ MAC_ADDR_INFO MacAddrs[1]; ++} NVRAM_INFO, *PNVRAM_INFO; ++ ++typedef struct ++{ ++ unsigned long eventmask; ++} BOARD_IOC, *PBOARD_IOC; ++ ++ ++/*Dyinggasp callback*/ ++typedef void (*cb_dgasp_t)(void *arg); ++typedef struct _CB_DGASP__LIST ++{ ++ struct list_head list; ++ char name[IFNAMSIZ]; ++ cb_dgasp_t cb_dgasp_fn; ++ void *context; ++}CB_DGASP_LIST , *PCB_DGASP_LIST; ++ ++ ++static LED_MAP_PAIR LedMapping[] = ++{ // led name Initial state physical pin (ledMask) ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. ++}; ++ ++/* Externs. */ ++extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); ++extern unsigned int nr_free_pages (void); ++extern const char *get_system_type(void); ++extern void kerSysFlashInit(void); ++extern unsigned long get_nvram_start_addr(void); ++extern unsigned long get_scratch_pad_start_addr(void); ++extern unsigned long getMemorySize(void); ++extern void __init boardLedInit(PLED_MAP_PAIR); ++extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); ++extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); ++ ++/* Prototypes. */ ++void __init InitNvramInfo( void ); ++static int board_open( struct inode *inode, struct file *filp ); ++static int board_ioctl( struct inode *inode, struct file *flip, unsigned int command, unsigned long arg ); ++static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos); ++static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait); ++static int board_release(struct inode *inode, struct file *filp); ++ ++static BOARD_IOC* borad_ioc_alloc(void); ++static void borad_ioc_free(BOARD_IOC* board_ioc); ++ ++/* DyingGasp function prototype */ ++static void __init kerSysDyingGaspMapIntr(void); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); ++#else ++static unsigned int kerSysDyingGaspIsr(void); ++#endif ++static void __init kerSysInitDyingGaspHandler( void ); ++static void __exit kerSysDeinitDyingGaspHandler( void ); ++/* -DyingGasp function prototype - */ ++ ++ ++#if defined (WIRELESS) ++static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs); ++static void __init sesBtn_mapGpio(void); ++static void __init sesBtn_mapIntr(int context); ++static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait); ++static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos); ++static void __init sesLed_mapGpio(void); ++static void sesLed_ctrl(int action); ++static void __init ses_board_init(void); ++static void __exit ses_board_deinit(void); ++#endif ++ ++static PNVRAM_INFO g_pNvramInfo = NULL; ++static int g_ledInitialized = 0; ++static wait_queue_head_t g_board_wait_queue; ++static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; ++ ++static int g_wakeup_monitor = 0; ++static struct file *g_monitor_file = NULL; ++static struct task_struct *g_monitor_task = NULL; ++static unsigned int (*g_orig_fop_poll) ++ (struct file *, struct poll_table_struct *) = NULL; ++ ++static struct file_operations board_fops = ++{ ++ open: board_open, ++ ioctl: board_ioctl, ++ poll: board_poll, ++ read: board_read, ++ release: board_release, ++}; ++ ++uint32 board_major = 0; ++ ++#if defined (WIRELESS) ++static unsigned short sesBtn_irq = BP_NOT_DEFINED; ++static unsigned short sesBtn_gpio = BP_NOT_DEFINED; ++static unsigned short sesLed_gpio = BP_NOT_DEFINED; ++#endif ++ ++#if defined(MODULE) ++int init_module(void) ++{ ++ return( brcm_board_init() ); ++} ++ ++void cleanup_module(void) ++{ ++ if (MOD_IN_USE) ++ printk("brcm flash: cleanup_module failed because module is in use\n"); ++ else ++ brcm_board_cleanup(); ++} ++#endif //MODULE ++ ++ ++ ++static int __init brcm_board_init( void ) ++{ ++ typedef int (*BP_LED_FUNC) (unsigned short *); ++ static struct BpLedInformation ++ { ++ BOARD_LED_NAME ledName; ++ BP_LED_FUNC bpFunc; ++ BP_LED_FUNC bpFuncFail; ++ } bpLedInfo[] = ++ {{kLedAdsl, BpGetAdslLedGpio, BpGetAdslFailLedGpio}, ++ {kLedWireless, BpGetWirelessLedGpio, NULL}, ++ {kLedUsb, BpGetUsbLedGpio, NULL}, ++ {kLedHpna, BpGetHpnaLedGpio, NULL}, ++ {kLedWanData, BpGetWanDataLedGpio, NULL}, ++ {kLedPPP, BpGetPppLedGpio, BpGetPppFailLedGpio}, ++ {kLedVoip, BpGetVoipLedGpio, NULL}, ++ {kLedSes, BpGetWirelessSesLedGpio, NULL}, ++ {kLedEnd, NULL, NULL} ++ }; ++ ++ int ret; ++ ++ ret = register_chrdev(BOARD_DRV_MAJOR, "bcrmboard", &board_fops ); ++ if (ret < 0) ++ printk( "brcm_board_init(major %d): fail to register device.\n",BOARD_DRV_MAJOR); ++ else ++ { ++ PLED_MAP_PAIR pLedMap = LedMapping; ++ unsigned short gpio; ++ struct BpLedInformation *pInfo; ++ ++ printk("brcmboard: brcm_board_init entry\n"); ++ board_major = BOARD_DRV_MAJOR; ++ InitNvramInfo(); ++ ++ for( pInfo = bpLedInfo; pInfo->ledName != kLedEnd; pInfo++ ) ++ { ++ if( pInfo->bpFunc && (*pInfo->bpFunc) (&gpio) == BP_SUCCESS ) ++ { ++ pLedMap->ledName = pInfo->ledName; ++ pLedMap->ledMask = GPIO_NUM_TO_MASK(gpio); ++ pLedMap->ledActiveLow = (gpio & BP_ACTIVE_LOW) ? 1 : 0; ++ } ++ if( pInfo->bpFuncFail && (*pInfo->bpFuncFail) (&gpio) == BP_SUCCESS ) ++ { ++ pLedMap->ledName = pInfo->ledName; ++ pLedMap->ledMaskFail = GPIO_NUM_TO_MASK(gpio); ++ pLedMap->ledActiveLowFail = (gpio & BP_ACTIVE_LOW) ? 1 : 0; ++ } ++ if( pLedMap->ledName != kLedEnd ) ++ pLedMap++; ++ } ++ ++ init_waitqueue_head(&g_board_wait_queue); ++#if defined (WIRELESS) ++ ses_board_init(); ++#endif ++ kerSysInitDyingGaspHandler(); ++ kerSysDyingGaspMapIntr(); ++ ++ boardLedInit(LedMapping); ++ g_ledInitialized = 1; ++ } ++ ++ return ret; ++} ++ ++void __init InitNvramInfo( void ) ++{ ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ unsigned long ulNumMacAddrs = pNvramData->ulNumMacAddrs; ++ ++ if( ulNumMacAddrs > 0 && ulNumMacAddrs <= NVRAM_MAC_COUNT_MAX ) ++ { ++ unsigned long ulNvramInfoSize = ++ sizeof(NVRAM_INFO) + ((sizeof(MAC_ADDR_INFO) - 1) * ulNumMacAddrs); ++ ++ g_pNvramInfo = (PNVRAM_INFO) kmalloc( ulNvramInfoSize, GFP_KERNEL ); ++ ++ if( g_pNvramInfo ) ++ { ++ unsigned long ulPsiSize; ++ if( BpGetPsiSize( &ulPsiSize ) != BP_SUCCESS ) ++ ulPsiSize = NVRAM_PSI_DEFAULT; ++ memset( g_pNvramInfo, 0x00, ulNvramInfoSize ); ++ g_pNvramInfo->ulPsiSize = ulPsiSize * 1024; ++ g_pNvramInfo->ulNumMacAddrs = pNvramData->ulNumMacAddrs; ++ memcpy( g_pNvramInfo->ucaBaseMacAddr, pNvramData->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ g_pNvramInfo->ulSdramSize = getMemorySize(); ++ } ++ else ++ printk("ERROR - Could not allocate memory for NVRAM data\n"); ++ } ++ else ++ printk("ERROR - Invalid number of MAC addresses (%ld) is configured.\n", ++ ulNumMacAddrs); ++} ++ ++void __exit brcm_board_cleanup( void ) ++{ ++ printk("brcm_board_cleanup()\n"); ++ ++ if (board_major != -1) ++ { ++#if defined (WIRELESS) ++ ses_board_deinit(); ++#endif ++ kerSysDeinitDyingGaspHandler(); ++ unregister_chrdev(board_major, "board_ioctl"); ++ } ++} ++ ++static BOARD_IOC* borad_ioc_alloc(void) ++{ ++ BOARD_IOC *board_ioc =NULL; ++ board_ioc = (BOARD_IOC*) kmalloc( sizeof(BOARD_IOC) , GFP_KERNEL ); ++ if(board_ioc) ++ { ++ memset(board_ioc, 0, sizeof(BOARD_IOC)); ++ } ++ return board_ioc; ++} ++ ++static void borad_ioc_free(BOARD_IOC* board_ioc) ++{ ++ if(board_ioc) ++ { ++ kfree(board_ioc); ++ } ++} ++ ++ ++static int board_open( struct inode *inode, struct file *filp ) ++{ ++ filp->private_data = borad_ioc_alloc(); ++ ++ if (filp->private_data == NULL) ++ return -ENOMEM; ++ ++ return( 0 ); ++} ++ ++static int board_release(struct inode *inode, struct file *filp) ++{ ++ BOARD_IOC *board_ioc = filp->private_data; ++ ++ wait_event_interruptible(g_board_wait_queue, 1); ++ borad_ioc_free(board_ioc); ++ ++ return( 0 ); ++} ++ ++ ++static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait) ++{ ++ unsigned int mask = 0; ++#if defined (WIRELESS) ++ BOARD_IOC *board_ioc = filp->private_data; ++#endif ++ ++ poll_wait(filp, &g_board_wait_queue, wait); ++#if defined (WIRELESS) ++ if(board_ioc->eventmask & SES_EVENTS){ ++ mask |= sesBtn_poll(filp, wait); ++ } ++#endif ++ ++ return mask; ++} ++ ++ ++static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) ++{ ++#if defined (WIRELESS) ++ BOARD_IOC *board_ioc = filp->private_data; ++ if(board_ioc->eventmask & SES_EVENTS){ ++ return sesBtn_read(filp, buffer, count, ppos); ++ } ++#endif ++ return 0; ++} ++ ++//************************************************************************************** ++// Utitlities for dump memory, free kernel pages, mips soft reset, etc. ++//************************************************************************************** ++ ++/*********************************************************************** ++ * Function Name: dumpaddr ++ * Description : Display a hex dump of the specified address. ++ ***********************************************************************/ ++void dumpaddr( unsigned char *pAddr, int nLen ) ++{ ++ static char szHexChars[] = "0123456789abcdef"; ++ char szLine[80]; ++ char *p = szLine; ++ unsigned char ch, *q; ++ int i, j; ++ unsigned long ul; ++ ++ while( nLen > 0 ) ++ { ++ sprintf( szLine, "%8.8lx: ", (unsigned long) pAddr ); ++ p = szLine + strlen(szLine); ++ ++ for(i = 0; i < 16 && nLen > 0; i += sizeof(long), nLen -= sizeof(long)) ++ { ++ ul = *(unsigned long *) &pAddr[i]; ++ q = (unsigned char *) &ul; ++ for( j = 0; j < sizeof(long); j++ ) ++ { ++ *p++ = szHexChars[q[j] >> 4]; ++ *p++ = szHexChars[q[j] & 0x0f]; ++ *p++ = ' '; ++ } ++ } ++ ++ for( j = 0; j < 16 - i; j++ ) ++ *p++ = ' ', *p++ = ' ', *p++ = ' '; ++ ++ *p++ = ' ', *p++ = ' ', *p++ = ' '; ++ ++ for( j = 0; j < i; j++ ) ++ { ++ ch = pAddr[j]; ++ *p++ = (ch > ' ' && ch < '~') ? ch : '.'; ++ } ++ ++ *p++ = '\0'; ++ printk( "%s\r\n", szLine ); ++ ++ pAddr += i; ++ } ++ printk( "\r\n" ); ++} /* dumpaddr */ ++ ++ ++void kerSysMipsSoftReset(void) ++{ ++#if defined(CONFIG_BCM96348) ++ if (PERF->RevID == 0x634800A1) { ++ typedef void (*FNPTR) (void); ++ FNPTR bootaddr = (FNPTR) FLASH_BASE; ++ int i; ++ ++ /* Disable interrupts. */ ++ cli(); ++ ++ /* Reset all blocks. */ ++ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; ++ for( i = 0; i < 1000000; i++ ) ++ ; ++ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; ++ /* Jump to the power on address. */ ++ (*bootaddr) (); ++ } ++ else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++#else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++#endif ++} ++ ++ ++int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) ++{ ++ int nRet = 0; ++ PMAC_ADDR_INFO pMai = NULL; ++ PMAC_ADDR_INFO pMaiFreeNoId = NULL; ++ PMAC_ADDR_INFO pMaiFreeId = NULL; ++ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; ++ ++ for( i = 0, pMai = g_pNvramInfo->MacAddrs; i < g_pNvramInfo->ulNumMacAddrs; ++ i++, pMai++ ) ++ { ++ if( ulId == pMai->ulId || ulId == MAC_ADDRESS_ANY ) ++ { ++ /* This MAC address has been used by the caller in the past. */ ++ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ shiftedIdx = i; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMai->chInUse = 1; ++ pMaiFreeNoId = pMaiFreeId = NULL; ++ break; ++ } ++ else ++ if( pMai->chInUse == 0 ) ++ { ++ if( pMai->ulId == 0 && pMaiFreeNoId == NULL ) ++ { ++ /* This is an available MAC address that has never been ++ * used. ++ */ ++ pMaiFreeNoId = pMai; ++ ulIdxNoId = i; ++ } ++ else ++ if( pMai->ulId != 0 && pMaiFreeId == NULL ) ++ { ++ /* This is an available MAC address that has been used ++ * before. Use addresses that have never been used ++ * first, before using this one. ++ */ ++ pMaiFreeId = pMai; ++ ulIdxId = i; ++ } ++ } ++ } ++ ++ if( pMaiFreeNoId || pMaiFreeId ) ++ { ++ /* An available MAC address was found. */ ++ memcpy(pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr,NVRAM_MAC_ADDRESS_LEN); ++ if( pMaiFreeNoId ) ++ { ++ shiftedIdx = ulIdxNoId; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMaiFreeNoId->ulId = ulId; ++ pMaiFreeNoId->chInUse = 1; ++ } ++ else ++ { ++ shiftedIdx = ulIdxId; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMaiFreeId->ulId = ulId; ++ pMaiFreeId->chInUse = 1; ++ } ++ } ++ else ++ if( i == g_pNvramInfo->ulNumMacAddrs ) ++ nRet = -EADDRNOTAVAIL; ++ ++ return( nRet ); ++} /* kerSysGetMacAddr */ ++ ++int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) ++{ ++ int nRet = -EINVAL; ++ unsigned long ulIdx = 0; ++ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - ++ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); ++ ++ // if overflow 255 (negitive), add 256 to have the correct index ++ if (idx < 0) ++ idx += 256; ++ ulIdx = (unsigned long) (idx >> SHIFT_BITS); ++ ++ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) ++ { ++ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; ++ if( pMai->chInUse == 1 ) ++ { ++ pMai->chInUse = 0; ++ nRet = 0; ++ } ++ } ++ ++ return( nRet ); ++} /* kerSysReleaseMacAddr */ ++ ++int kerSysGetSdramSize( void ) ++{ ++ return( (int) g_pNvramInfo->ulSdramSize ); ++} /* kerSysGetSdramSize */ ++ ++ ++void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ if (g_ledInitialized) ++ boardLedCtrl(ledName, ledState); ++} ++ ++unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) ++{ ++ int mask = (*g_orig_fop_poll) (f, t); ++ ++ if( g_wakeup_monitor == 1 && g_monitor_file == f ) ++ { ++ /* If g_wakeup_monitor is non-0, the user mode application needs to ++ * return from a blocking select function. Return POLLPRI which will ++ * cause the select to return with the exception descriptor set. ++ */ ++ mask |= POLLPRI; ++ g_wakeup_monitor = 0; ++ } ++ ++ return( mask ); ++} ++ ++/* Put the user mode application that monitors link state on a run queue. */ ++void kerSysWakeupMonitorTask( void ) ++{ ++ g_wakeup_monitor = 1; ++ if( g_monitor_task ) ++ wake_up_process( g_monitor_task ); ++} ++ ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++int kerSysGetResetHold(void) ++{ ++ unsigned short gpio; ++ ++ if( BpGetPressAndHoldResetGpio( &gpio ) == BP_SUCCESS ) ++ { ++#if defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ //printk("gpio=%04x,gpio_mask=%04x,gpio_reg=%04x\n",gpio,gpio_mask,*gpio_reg); ++ if(*gpio_reg & gpio_mask) //press down ++ return RESET_BUTTON_UP; ++ } ++ return RESET_BUTTON_PRESSDOWN; ++} ++//<<JUNHON, 2004/09/15 ++ ++//******************************************************************************************** ++// misc. ioctl calls come to here. (flash, led, reset, kernel memory access, etc.) ++//******************************************************************************************** ++static int board_ioctl( struct inode *inode, struct file *flip, ++ unsigned int command, unsigned long arg ) ++{ ++ int ret = 0; ++ BOARD_IOCTL_PARMS ctrlParms; ++ unsigned char ucaMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ int allowedSize; ++ ++ switch (command) ++ { ++ case BOARD_IOCTL_FLASH_INIT: ++ // not used for now. kerSysBcmImageInit(); ++ break; ++ ++ ++ case BOARD_IOCTL_FLASH_WRITE: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ NVRAM_DATA SaveNvramData; ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ ++ switch (ctrlParms.action) ++ { ++ case SCRATCH_PAD: ++ ret = kerSysScratchPadSet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); ++ break; ++ ++ case PERSISTENT: ++ ret = kerSysPersistentSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case NVRAM: ++ ret = kerSysNvRamSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case BCM_IMAGE_CFE: ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > FLASH45_LENGTH_BOOT_ROM ) ++ { ++ printk("Illegal CFE size [%d]. Size allowed: [%d]\n", ++ ctrlParms.strLen, FLASH45_LENGTH_BOOT_ROM); ++ ret = -1; ++ break; ++ } ++ ++ // save NVRAM data into a local structure ++ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); ++ ++ // set memory type field ++ BpGetSdramSize( (unsigned long *) &ctrlParms.string[SDRAM_TYPE_ADDRESS_OFFSET] ); ++ ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ ++ // if nvram is not valid, restore the current nvram settings ++ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && ++ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) ++ { ++ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); ++ } ++ break; ++ ++ case BCM_IMAGE_FS: ++ allowedSize = (int) flash_get_total_size() - \ ++ FLASH_RESERVED_AT_END - TAG_LEN - FLASH45_LENGTH_BOOT_ROM; ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize) ++ { ++ printk("Illegal root file system size [%d]. Size allowed: [%d]\n", ++ ctrlParms.strLen, allowedSize); ++ ret = -1; ++ break; ++ } ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ kerSysMipsSoftReset(); ++ break; ++ ++ case BCM_IMAGE_KERNEL: // not used for now. ++ break; ++ case BCM_IMAGE_WHOLE: ++ if(ctrlParms.strLen <= 0) ++ { ++ printk("Illegal flash image size [%d].\n", ctrlParms.strLen); ++ ret = -1; ++ break; ++ } ++ ++ // save NVRAM data into a local structure ++ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); ++ ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ ++ // if nvram is not valid, restore the current nvram settings ++ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && ++ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) ++ { ++ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); ++ } ++ ++ kerSysMipsSoftReset(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ printk("flash_ioctl_command: invalid command %d\n", ctrlParms.action); ++ break; ++ } ++ ctrlParms.result = ret; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_FLASH_READ: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ switch (ctrlParms.action) ++ { ++ case SCRATCH_PAD: ++ ret = kerSysScratchPadGet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); ++ break; ++ ++ case PERSISTENT: ++ ret = kerSysPersistentGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case NVRAM: ++ ret = kerSysNvRamGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ break; ++ ++ case FLASH_SIZE: ++ ret = kerSysFlashSizeGet(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ printk("Not supported. invalid command %d\n", ctrlParms.action); ++ break; ++ } ++ ctrlParms.result = ret; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_NR_PAGES: ++ ctrlParms.result = nr_free_pages() + get_page_cache_size(); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_DUMP_ADDR: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ dumpaddr( (unsigned char *) ctrlParms.string, ctrlParms.strLen ); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_SET_MEMORY: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ unsigned long *pul = (unsigned long *) ctrlParms.string; ++ unsigned short *pus = (unsigned short *) ctrlParms.string; ++ unsigned char *puc = (unsigned char *) ctrlParms.string; ++ switch( ctrlParms.strLen ) ++ { ++ case 4: ++ *pul = (unsigned long) ctrlParms.offset; ++ break; ++ case 2: ++ *pus = (unsigned short) ctrlParms.offset; ++ break; ++ case 1: ++ *puc = (unsigned char) ctrlParms.offset; ++ break; ++ } ++ dumpaddr( (unsigned char *) ctrlParms.string, sizeof(long) ); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_MIPS_SOFT_RESET: ++ kerSysMipsSoftReset(); ++ break; ++ ++ case BOARD_IOCTL_LED_CTRL: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ kerSysLedCtrl((BOARD_LED_NAME)ctrlParms.strLen, (BOARD_LED_STATE)ctrlParms.offset); ++ ret = 0; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_ID: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, ++ sizeof(ctrlParms)) == 0) ++ { ++ if( ctrlParms.string ) ++ { ++ char *p = (char *) get_system_type(); ++ if( strlen(p) + 1 < ctrlParms.strLen ) ++ ctrlParms.strLen = strlen(p) + 1; ++ __copy_to_user(ctrlParms.string, p, ctrlParms.strLen); ++ } ++ ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ ctrlParms.result = kerSysGetMacAddress( ucaMacAddr, ++ ctrlParms.offset ); ++ ++ if( ctrlParms.result == 0 ) ++ { ++ __copy_to_user(ctrlParms.string, ucaMacAddr, ++ sizeof(ucaMacAddr)); ++ } ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_RELEASE_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ if (copy_from_user((void*)ucaMacAddr, (void*)ctrlParms.string, \ ++ NVRAM_MAC_ADDRESS_LEN) == 0) ++ { ++ ctrlParms.result = kerSysReleaseMacAddress( ucaMacAddr ); ++ } ++ else ++ { ++ ctrlParms.result = -EACCES; ++ } ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_PSI_SIZE: ++ ctrlParms.result = (int) g_pNvramInfo->ulPsiSize; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_SDRAM_SIZE: ++ ctrlParms.result = (int) g_pNvramInfo->ulSdramSize; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_BASE_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ __copy_to_user(ctrlParms.string, g_pNvramInfo->ucaBaseMacAddr, NVRAM_MAC_ADDRESS_LEN); ++ ctrlParms.result = 0; ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_CHIP_ID: ++ ctrlParms.result = (int) (PERF->RevID & 0xFFFF0000) >> 16; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_NUM_ENET: { ++ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; ++ int i, numeth = 0; ++ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { ++ for( i = 0; i < BP_MAX_ENET_MACS; i++) { ++ if (EnetInfos[i].ucPhyType != BP_ENET_NO_PHY) { ++ numeth++; ++ } ++ } ++ ctrlParms.result = numeth; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ ++ case BOARD_IOCTL_GET_CFE_VER: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ char *vertag = (char *)(FLASH_BASE + CFE_VERSION_OFFSET); ++ if (ctrlParms.strLen < CFE_VERSION_SIZE) { ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = -EFAULT; ++ } ++ else if (strncmp(vertag, "cfe-v", 5)) { // no tag info in flash ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ ctrlParms.result = 1; ++ __copy_to_user(ctrlParms.string, vertag+CFE_VERSION_MARK_SIZE, CFE_VERSION_SIZE); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_ENET_CFG: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; ++ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { ++ if (ctrlParms.strLen == sizeof(EnetInfos)) { ++ __copy_to_user(ctrlParms.string, EnetInfos, sizeof(EnetInfos)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++ case BOARD_IOCTL_GET_RESETHOLD: ++ ctrlParms.result = kerSysGetResetHold(); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++//>>JUNHON, 2004/09/15 ++ ++ ++#if defined (WIRELESS) ++ case BOARD_IOCTL_GET_WLAN_ANT_INUSE: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ unsigned short antInUse = 0; ++ if (BpGetWirelessAntInUse(&antInUse) == BP_SUCCESS) { ++ if (ctrlParms.strLen == sizeof(antInUse)) { ++ __copy_to_user(ctrlParms.string, &antInUse, sizeof(antInUse)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#endif ++ case BOARD_IOCTL_SET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ ctrlParms.result = -EFAULT; ++ ret = -EFAULT; ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ board_ioc->eventmask |= *((int*)ctrlParms.string); ++#if defined (WIRELESS) ++ if((board_ioc->eventmask & SES_EVENTS)) { ++ if(sesBtn_irq != BP_NOT_DEFINED) { ++ BcmHalInterruptEnable(sesBtn_irq); ++ ctrlParms.result = 0; ++ ret = 0; ++ } ++ } ++#endif ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ __copy_to_user(ctrlParms.string, &board_ioc->eventmask, sizeof(unsigned long)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_UNSET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ board_ioc->eventmask &= (~(*((int*)ctrlParms.string))); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#if defined (WIRELESS) ++ case BOARD_IOCTL_SET_SES_LED: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ if (ctrlParms.strLen == sizeof(int)) { ++ sesLed_ctrl(*(int*)ctrlParms.string); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#endif ++ ++ case BOARD_IOCTL_SET_MONITOR_FD: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ int fput_needed = 0; ++ ++ g_monitor_file = fget_light( ctrlParms.offset, &fput_needed ); ++ if( g_monitor_file ) { ++ /* Hook this file descriptor's poll function in order to set ++ * the exception descriptor when there is a change in link ++ * state. ++ */ ++ g_monitor_task = current; ++ g_orig_fop_poll = g_monitor_file->f_op->poll; ++ g_monitor_file->f_op->poll = kerSysMonitorPollHook; ++ } ++ } ++ break; ++ ++ case BOARD_IOCTL_WAKEUP_MONITOR_TASK: ++ kerSysWakeupMonitorTask(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ ctrlParms.result = 0; ++ printk("board_ioctl: invalid command %x, cmd %d .\n",command,_IOC_NR(command)); ++ break; ++ ++ } /* switch */ ++ ++ return (ret); ++ ++} /* board_ioctl */ ++ ++/*************************************************************************** ++ * SES Button ISR/GPIO/LED functions. ++ ***************************************************************************/ ++#if defined (WIRELESS) ++static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs) ++{ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if (!(*gpio_reg & gpio_mask)){ ++ wake_up_interruptible(&g_board_wait_queue); ++ return IRQ_RETVAL(1); ++ } else { ++ return IRQ_RETVAL(0); ++ } ++} ++ ++static void __init sesBtn_mapGpio() ++{ ++ if( BpGetWirelessSesBtnGpio(&sesBtn_gpio) == BP_SUCCESS ) ++ { ++ printk("SES: Button GPIO 0x%x is enabled\n", sesBtn_gpio); ++ } ++} ++ ++static void __init sesBtn_mapIntr(int context) ++{ ++ if( BpGetWirelessSesExtIntr(&sesBtn_irq) == BP_SUCCESS ) ++ { ++ printk("SES: Button Interrupt 0x%x is enabled\n", sesBtn_irq); ++ } ++ else ++ return; ++ ++ sesBtn_irq += INTERRUPT_ID_EXTERNAL_0; ++ ++ if (BcmHalMapInterrupt((FN_HANDLER)sesBtn_isr, context, sesBtn_irq)) { ++ printk("SES: Interrupt mapping failed\n"); ++ } ++ BcmHalInterruptEnable(sesBtn_irq); ++} ++ ++ ++static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait) ++{ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if (!(*gpio_reg & gpio_mask)){ ++ return POLLIN; ++ } ++ return 0; ++} ++ ++static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) ++{ ++ volatile unsigned int event=0; ++ ssize_t ret=0; ++ ++#if defined(_BCM96338_) || defined (CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined (CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if(*gpio_reg & gpio_mask){ ++ BcmHalInterruptEnable(sesBtn_irq); ++ return ret; ++ } ++ event = SES_EVENTS; ++ __copy_to_user((char*)buffer, (char*)&event, sizeof(event)); ++ BcmHalInterruptEnable(sesBtn_irq); ++ count -= sizeof(event); ++ buffer += sizeof(event); ++ ret += sizeof(event); ++ return ret; ++} ++ ++static void __init sesLed_mapGpio() ++{ ++ if( BpGetWirelessSesBtnGpio(&sesLed_gpio) == BP_SUCCESS ) ++ { ++ printk("SES: LED GPIO 0x%x is enabled\n", sesBtn_gpio); ++ } ++} ++ ++static void sesLed_ctrl(int action) ++{ ++ ++ //char status = ((action >> 8) & 0xff); /* extract status */ ++ //char event = ((action >> 16) & 0xff); /* extract event */ ++ //char blinktype = ((action >> 24) & 0xff); /* extract blink type for SES_LED_BLINK */ ++ ++ BOARD_LED_STATE led; ++ ++ if(sesLed_gpio == BP_NOT_DEFINED) ++ return; ++ ++ action &= 0xff; /* extract led */ ++ ++ //printk("blinktype=%d, event=%d, status=%d\n",(int)blinktype, (int)event, (int)status); ++ ++ switch (action) ++ { ++ case SES_LED_ON: ++ //printk("SES: led on\n"); ++ led = kLedStateOn; ++ break; ++ case SES_LED_BLINK: ++ //printk("SES: led blink\n"); ++ led = kLedStateSlowBlinkContinues; ++ break; ++ case SES_LED_OFF: ++ default: ++ //printk("SES: led off\n"); ++ led = kLedStateOff; ++ } ++ ++ kerSysLedCtrl(kLedSes, led); ++} ++ ++static void __init ses_board_init() ++{ ++ sesBtn_mapGpio(); ++ sesBtn_mapIntr(0); ++ sesLed_mapGpio(); ++} ++static void __exit ses_board_deinit() ++{ ++ if(sesBtn_irq) ++ BcmHalInterruptDisable(sesBtn_irq); ++} ++#endif ++ ++/*************************************************************************** ++ * Dying gasp ISR and functions. ++ ***************************************************************************/ ++#define KERSYS_DBG printk ++ ++#if defined(CONFIG_BCM96345) ++#define CYCLE_PER_US 70 ++#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++/* The BCM6348 cycles per microsecond is really variable since the BCM6348 ++ * MIPS speed can vary depending on the PLL settings. However, an appoximate ++ * value of 120 will still work OK for the test being done. ++ */ ++#define CYCLE_PER_US 120 ++#endif ++#define DG_GLITCH_TO (100*CYCLE_PER_US) ++ ++static void __init kerSysDyingGaspMapIntr() ++{ ++ unsigned long ulIntr; ++ ++#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ } ++#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ ulIntr += INTERRUPT_ID_EXTERNAL_0; ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); ++ BcmHalInterruptEnable( ulIntr ); ++ } ++#endif ++ ++} ++ ++void kerSysSetWdTimer(ulong timeUs) ++{ ++ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); ++ TIMER->WatchDogCtl = 0xFF00; ++ TIMER->WatchDogCtl = 0x00FF; ++} ++ ++ulong kerSysGetCycleCount(void) ++{ ++ ulong cnt; ++#ifdef _WIN32_WCE ++ cnt = 0; ++#else ++ __asm volatile("mfc0 %0, $9":"=d"(cnt)); ++#endif ++ return(cnt); ++} ++ ++static Bool kerSysDyingGaspCheckPowerLoss(void) ++{ ++ ulong clk0; ++ ulong ulIntr; ++ ++ ulIntr = 0; ++ clk0 = kerSysGetCycleCount(); ++ ++ UART->Data = 'D'; ++ UART->Data = '%'; ++ UART->Data = 'G'; ++ ++#if defined(CONFIG_BCM96345) ++ BpGetAdslDyingGaspExtIntr( &ulIntr ); ++ ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ ++ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#endif ++ return 1; ++} ++ ++static void kerSysDyingGaspShutdown( void ) ++{ ++ kerSysSetWdTimer(1000000); ++#if defined(CONFIG_BCM96345) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); ++#elif defined(CONFIG_BCM96348) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); ++#endif ++} ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) ++#else ++static unsigned int kerSysDyingGaspIsr(void) ++#endif ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp, *dsl = NULL; ++ ++ if (kerSysDyingGaspCheckPowerLoss()) { ++ ++ /* first to turn off everything other than dsl */ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(strncmp(tmp->name, "dsl", 3)) { ++ (tmp->cb_dgasp_fn)(tmp->context); ++ }else { ++ dsl = tmp; ++ } ++ } ++ ++ /* now send dgasp */ ++ if(dsl) ++ (dsl->cb_dgasp_fn)(dsl->context); ++ ++ /* reset and shutdown system */ ++ kerSysDyingGaspShutdown(); ++ } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++return( IRQ_HANDLED ); ++#else ++ return( 1 ); ++#endif ++} ++ ++static void __init kerSysInitDyingGaspHandler( void ) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head != NULL) { ++ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); ++ return; ++ } ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ g_cb_dgasp_list_head = new_node; ++ ++} /* kerSysInitDyingGaspHandler */ ++ ++static void __exit kerSysDeinitDyingGaspHandler( void ) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) ++ return; ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ list_del(pos); ++ kfree(tmp); ++ } ++ ++ kfree(g_cb_dgasp_list_head); ++ g_cb_dgasp_list_head = NULL; ++ ++} /* kerSysDeinitDyingGaspHandler */ ++ ++void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if( devname == NULL || cbfn == NULL ) { ++ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); ++ return; ++ } ++ ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ strncpy(new_node->name, devname, IFNAMSIZ); ++ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; ++ new_node->context = context; ++ list_add(&new_node->list, &g_cb_dgasp_list_head->list); ++ ++ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); ++ ++} /* kerSysRegisterDyingGaspHandler */ ++ ++void kerSysDeregisterDyingGaspHandler(char *devname) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if(devname == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); ++ return; ++ } ++ ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(!strcmp(tmp->name, devname)) { ++ list_del(pos); ++ kfree(tmp); ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); ++ return; ++ } ++ } ++ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); ++ ++} /* kerSysDeregisterDyingGaspHandler */ ++ ++/*************************************************************************** ++ * MACRO to call driver initialization and cleanup functions. ++ ***************************************************************************/ ++module_init( brcm_board_init ); ++module_exit( brcm_board_cleanup ); ++ ++EXPORT_SYMBOL(kerSysNvRamGet); ++EXPORT_SYMBOL(dumpaddr); ++EXPORT_SYMBOL(kerSysGetMacAddress); ++EXPORT_SYMBOL(kerSysReleaseMacAddress); ++EXPORT_SYMBOL(kerSysGetSdramSize); ++EXPORT_SYMBOL(kerSysLedCtrl); ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++EXPORT_SYMBOL(kerSysGetResetHold); ++//>>JUNHON, 2004/09/15 ++EXPORT_SYMBOL(kerSysLedRegisterHwHandler); ++EXPORT_SYMBOL(BpGetBoardIds); ++EXPORT_SYMBOL(BpGetSdramSize); ++EXPORT_SYMBOL(BpGetPsiSize); ++EXPORT_SYMBOL(BpGetEthernetMacInfo); ++EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); ++EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); ++EXPORT_SYMBOL(BpGetVoipResetGpio); ++EXPORT_SYMBOL(BpGetVoipIntrGpio); ++EXPORT_SYMBOL(BpGetPcmciaResetGpio); ++EXPORT_SYMBOL(BpGetRtsCtsUartGpios); ++EXPORT_SYMBOL(BpGetAdslLedGpio); ++EXPORT_SYMBOL(BpGetAdslFailLedGpio); ++EXPORT_SYMBOL(BpGetWirelessLedGpio); ++EXPORT_SYMBOL(BpGetUsbLedGpio); ++EXPORT_SYMBOL(BpGetHpnaLedGpio); ++EXPORT_SYMBOL(BpGetWanDataLedGpio); ++EXPORT_SYMBOL(BpGetPppLedGpio); ++EXPORT_SYMBOL(BpGetPppFailLedGpio); ++EXPORT_SYMBOL(BpGetVoipLedGpio); ++EXPORT_SYMBOL(BpGetWirelessExtIntr); ++EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); ++EXPORT_SYMBOL(BpGetVoipExtIntr); ++EXPORT_SYMBOL(BpGetHpnaExtIntr); ++EXPORT_SYMBOL(BpGetHpnaChipSelect); ++EXPORT_SYMBOL(BpGetVoipChipSelect); ++EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); ++EXPORT_SYMBOL(BpGetWirelessSesExtIntr); ++EXPORT_SYMBOL(BpGetWirelessSesLedGpio); ++EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysGetCycleCount); ++EXPORT_SYMBOL(kerSysSetWdTimer); ++EXPORT_SYMBOL(kerSysWakeupMonitorTask); ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c 2006-07-07 22:16:11.000000000 +0200 +@@ -0,0 +1,2391 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.c ++ * ++ * Description: This file contains the implementation for the BCM63xx board ++ * parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include "boardparms.h" ++ ++/* Defines. */ ++ ++/* Default psi size in K bytes */ ++#define BP_PSI_DEFAULT_SIZE 24 ++ ++/* Typedefs */ ++typedef struct boardparameters ++{ ++ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ ++ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; ++ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; ++ unsigned short usSdramSize; /* SDRAM size and type */ ++ unsigned short usPsiSize; /* persistent storage in K bytes */ ++ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ ++ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ ++ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ ++ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ ++ unsigned short usGpioUartRts; /* GPIO pin or not defined */ ++ unsigned short usGpioUartCts; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ ++ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ ++ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ ++ unsigned short usExtIntrWireless; /* ext intr or not defined */ ++ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ ++ unsigned short usExtIntrHpna; /* ext intr or not defined */ ++ unsigned short usCsHpna; /* chip select not defined */ ++ unsigned short usAntInUseWireless; /* antenna in use or not defined */ ++ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ ++ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ ++ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ ++} BOARD_PARAMETERS, *PBOARD_PARAMETERS; ++ ++/* Variables */ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++static BOARD_PARAMETERS g_bcm96338sv = ++{ ++ "96338SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static BOARD_PARAMETERS g_bcm96338l2m8m = ++{ ++ "96338L-2M-8M", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; ++#endif ++ ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++static BOARD_PARAMETERS g_bcm96345r = ++{ ++ "96345R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw2 = ++{ ++ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold ++ * Reset or RTS. ++ */ ++ "96345GW2", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_GPIO_0_AH, /* usGpioPhySpiSck */ ++ BP_GPIO_4_AH, /* usGpioPhySpiSs */ ++ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ ++ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_GPIO, /* usConfigType */ ++ BP_ENET_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_GPIO_13_AH, /* usGpioUartRts */ ++ BP_GPIO_9_AH, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw = ++{ ++ "96345GW", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_GPIO_10_AH, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_EXT_INTR_3, /* usExtIntrHpna */ ++ BP_CS_1, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96335r = ++{ ++ "96335R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_9_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_8_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_9_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345r0 = ++{ ++ "96345R0", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345rs = ++{ ++ "96345RS", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, ++ &g_bcm96345rs, 0}; ++#endif ++ ++#if defined(_BCM96348_) || defined(CONFIG_BCM96348) ++ ++static BOARD_PARAMETERS g_bcm96348r = ++{ ++ "96348R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348lv = ++{ ++ "96348LV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x02, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_GPIO_5_AL, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw = ++{ ++ "96348GW", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_10 = ++{ ++ "96348GW-10", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw_11 = ++{ ++ "96348GW-11", /* szBoardId */ ++ {{BP_ENET_NO_PHY}, /* ucPhyType */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348sv = ++{ ++ "96348SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x1f, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_dualDsp = ++{ ++ "96348GW-DualDSP", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_UNEQUIPPED, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_DSP, /* ucDspType */ ++ 0x01, /* ucDspAddress */ ++ BP_EXT_INTR_3, /* usExtIntrVoip */ ++ BP_UNEQUIPPED , /* usGpioVoipReset */ ++ BP_GPIO_35_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_3}}, /* usCsVoip */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcmCustom_01 = ++{ ++ "BCMCUST_01", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_36_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AL, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, ++ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, ++ &g_bcmCustom_01, 0}; ++#endif ++ ++static PBOARD_PARAMETERS g_pCurrentBp = 0; ++ ++/************************************************************************** ++ * Name : bpstrcmp ++ * ++ * Description: String compare for this file so it does not depend on an OS. ++ * (Linux kernel and CFE share this source file.) ++ * ++ * Parameters : [IN] dest - destination string ++ * [IN] src - source string ++ * ++ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src ++ ***************************************************************************/ ++static int bpstrcmp(const char *dest,const char *src); ++static int bpstrcmp(const char *dest,const char *src) ++{ ++ while (*src && *dest) ++ { ++ if (*dest < *src) return -1; ++ if (*dest > *src) return 1; ++ dest++; ++ src++; ++ } ++ ++ if (*dest && !*src) return 1; ++ if (!*dest && *src) return -1; ++ return 0; ++} /* bpstrcmp */ ++ ++/************************************************************************** ++ * Name : BpGetVoipDspConfig ++ * ++ * Description: Gets the DSP configuration from the board parameter ++ * structure for a given DSP index. ++ * ++ * Parameters : [IN] dspNum - DSP index (number) ++ * ++ * Returns : Pointer to DSP configuration block if found/valid, NULL ++ * otherwise. ++ ***************************************************************************/ ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) ++{ ++ VOIP_DSP_INFO *pDspConfig = 0; ++ int i; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) ++ { ++ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && ++ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) ++ { ++ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; ++ break; ++ } ++ } ++ } ++ ++ return pDspConfig; ++} ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ) ++{ ++ int nRet = BP_BOARD_ID_NOT_FOUND; ++ PBOARD_PARAMETERS *ppBp; ++ ++ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) ++ { ++ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) ++ { ++ g_pCurrentBp = *ppBp; ++ nRet = BP_SUCCESS; ++ break; ++ } ++ } ++ ++ return( nRet ); ++} /* BpSetBoardId */ ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) ++{ ++ PBOARD_PARAMETERS *ppBp; ++ int i; ++ char *src; ++ char *dest; ++ ++ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; ++ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) ++ { ++ dest = pszBoardIds; ++ src = (*ppBp)->szBoardId; ++ while( *src ) ++ *dest++ = *src++; ++ *dest = '\0'; ++ } ++ ++ return( i ); ++} /* BpGetBoardIds */ ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) ++{ ++ int i, nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ { ++ if( i < BP_MAX_ENET_MACS ) ++ { ++ unsigned char *src = (unsigned char *) ++ &g_pCurrentBp->EnetMacInfos[i]; ++ unsigned char *dest = (unsigned char *) pEnetInfos; ++ int len = sizeof(ETHERNET_MAC_INFO); ++ while( len-- ) ++ *dest++ = *src++; ++ } ++ else ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ } ++ ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetEthernetMacInfo */ ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulSdramSize = g_pCurrentBp->usSdramSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulSdramSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetSdramSize */ ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulPsiSize = g_pCurrentBp->usPsiSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulPsiSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPsiSize */ ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; ++ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; ++ ++ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusInner = *pusOuter = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetRj11InnerOuterPairGpios */ ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; ++ ++ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPressAndHoldResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipReset; ++ ++ if( *pusValue != BP_NOT_DEFINED || ++ *pusValue == BP_UNEQUIPPED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipIntr; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipIntrGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPcmciaReset; ++ ++ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPcmciaResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, board id input string does not ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusRts = g_pCurrentBp->usGpioUartRts; ++ *pusCts = g_pCurrentBp->usGpioUartCts; ++ ++ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusRts = *pusCts = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUartRtsCtsGpios */ ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdsl; ++ ++ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdslFail; ++ ++ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWireless; ++ ++ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usAntInUseWireless; ++ ++ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessAntInUse */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; ++ ++ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessSesBtnGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; ++ ++ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedSesWireless; ++ ++ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedUsb; ++ ++ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUsbLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedHpna; ++ ++ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWanData; ++ ++ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWanDataLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPpp; ++ ++ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPppFail; ++ ++ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; ++ ++ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderPowerOn */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; ++ ++ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderAlarmLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; ++ ++ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderResetCfgLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlStop; ++ ++ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderStopLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ * ++ * Note : The VoIP structure would allow for having one LED per DSP ++ * however, the board initialization function assumes only one ++ * LED per functionality (ie one LED for VoIP). Therefore in ++ * order to keep this tidy and simple we do not make usage of the ++ * one-LED-per-DSP function. Instead, we assume that the LED for ++ * VoIP is unique and associated with DSP 0 (always present on ++ * any VoIP platform). If changing this to a LED-per-DSP function ++ * then one need to update the board initialization driver in ++ * bcmdrivers\opensource\char\board\bcm963xx\impl1 ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioLedVoip; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrWireless; ++ ++ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; ++ ++ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslDyingGaspExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usExtIntrVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrHpna; ++ ++ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usCsHpna; ++ ++ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaChipSelect */ ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usCsVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipChipSelect */ ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h 2006-07-07 22:16:11.000000000 +0200 +@@ -0,0 +1,766 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.h ++ * ++ * Description: This file contains definitions and function prototypes for ++ * the BCM63xx board parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++#if !defined(_BOARDPARMS_H) ++#define _BOARDPARMS_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++/* Return codes. */ ++#define BP_SUCCESS 0 ++#define BP_BOARD_ID_NOT_FOUND 1 ++#define BP_VALUE_NOT_DEFINED 2 ++#define BP_BOARD_ID_NOT_SET 3 ++ ++/* Values for BpGetSdramSize. */ ++#define BP_MEMORY_8MB_1_CHIP 0 ++#define BP_MEMORY_16MB_1_CHIP 1 ++#define BP_MEMORY_32MB_1_CHIP 2 ++#define BP_MEMORY_64MB_2_CHIP 3 ++#define BP_MEMORY_32MB_2_CHIP 4 ++#define BP_MEMORY_16MB_2_CHIP 5 ++ ++/* Values for EthernetMacInfo PhyType. */ ++#define BP_ENET_NO_PHY 0 ++#define BP_ENET_INTERNAL_PHY 1 ++#define BP_ENET_EXTERNAL_PHY 2 ++#define BP_ENET_EXTERNAL_SWITCH 3 ++ ++/* Values for EthernetMacInfo Configuration type. */ ++#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ ++#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ ++#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ ++ ++/* Values for EthernetMacInfo Reverse MII. */ ++#define BP_ENET_NO_REVERSE_MII 0 ++#define BP_ENET_REVERSE_MII 1 ++ ++/* Values for VoIPDSPInfo DSPType. */ ++#define BP_VOIP_NO_DSP 0 ++#define BP_VOIP_DSP 1 ++ ++ ++/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ ++#define BP_ACTIVE_MASK 0x8000 ++#define BP_ACTIVE_HIGH 0x0000 ++#define BP_ACTIVE_LOW 0x8000 ++#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) ++#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) ++#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) ++#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) ++#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) ++#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) ++#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) ++#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) ++#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) ++#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) ++#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) ++#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) ++#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) ++#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) ++#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) ++#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) ++#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) ++#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) ++#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) ++#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) ++#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) ++#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) ++#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) ++#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) ++#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) ++#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) ++#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) ++#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) ++#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) ++#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) ++#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) ++#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) ++#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) ++#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) ++#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) ++#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) ++#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) ++#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) ++#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) ++#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) ++#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) ++#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) ++#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) ++#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) ++#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) ++#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) ++#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) ++#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) ++#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) ++#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) ++#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) ++#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) ++#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) ++#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) ++#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) ++#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) ++#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) ++#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) ++#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) ++#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) ++#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) ++#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) ++#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) ++#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) ++#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) ++#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) ++#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) ++#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) ++#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) ++#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) ++#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) ++#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) ++#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) ++#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) ++ ++/* Values for external interrupt assignments. */ ++#define BP_EXT_INTR_0 0 ++#define BP_EXT_INTR_1 1 ++#define BP_EXT_INTR_2 2 ++#define BP_EXT_INTR_3 3 ++ ++/* Values for chip select assignments. */ ++#define BP_CS_0 0 ++#define BP_CS_1 1 ++#define BP_CS_2 2 ++#define BP_CS_3 3 ++ ++/* Value for GPIO and external interrupt fields that are not used. */ ++#define BP_NOT_DEFINED 0xffff ++#define BP_HW_DEFINED 0xfff0 ++#define BP_UNEQUIPPED 0xfff1 ++ ++/* Maximum size of the board id string. */ ++#define BP_BOARD_ID_LEN 16 ++ ++/* Maximum number of Ethernet MACs. */ ++#define BP_MAX_ENET_MACS 2 ++ ++/* Maximum number of VoIP DSPs. */ ++#define BP_MAX_VOIP_DSP 2 ++ ++/* Wireless Antenna Settings. */ ++#define BP_WLAN_ANT_MAIN 0 ++#define BP_WLAN_ANT_AUX 1 ++#define BP_WLAN_ANT_BOTH 3 ++ ++#if !defined(__ASSEMBLER__) ++ ++/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, ++ * then the other fields are not valid. ++ */ ++typedef struct EthernetMacInfo ++{ ++ unsigned char ucPhyType; /* BP_ENET_xxx */ ++ unsigned char ucPhyAddress; /* 0 to 31 */ ++ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ ++ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ ++ unsigned short numSwitchPorts; /* Number of PHY ports */ ++ unsigned short usConfigType; /* Configuration type */ ++ unsigned short usReverseMii; /* Reverse MII */ ++} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; ++ ++ ++/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, ++ * then the other fields are not valid. ++ */ ++typedef struct VoIPDspInfo ++{ ++ unsigned char ucDspType; ++ unsigned char ucDspAddress; ++ unsigned short usExtIntrVoip; ++ unsigned short usGpioVoipReset; ++ unsigned short usGpioVoipIntr; ++ unsigned short usGpioLedVoip; ++ unsigned short usCsVoip; ++ ++} VOIP_DSP_INFO; ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ); ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ); ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ); ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ); ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); ++ ++#endif /* __ASSEMBLER__ */ ++ ++#if __cplusplus ++} ++#endif ++ ++#endif /* _BOARDPARMS_H */ ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c 2006-07-07 22:17:24.000000000 +0200 +@@ -0,0 +1,692 @@ ++/************************************************************************/ ++/* */ ++/* AMD CFI Enabled Flash Memory Drivers */ ++/* File name: CFIFLASH.C */ ++/* Revision: 1.0 5/07/98 */ ++/* */ ++/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ ++/* This software is unpublished and contains the trade secrets and */ ++/* confidential proprietary information of AMD. Unless otherwise */ ++/* provided in the Software Agreement associated herewith, it is */ ++/* licensed in confidence "AS IS" and is not to be reproduced in whole */ ++/* or part by any means except for backup. Use, duplication, or */ ++/* disclosure by the Government is subject to the restrictions in */ ++/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ ++/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ ++/* Software owned by */ ++/* Advanced Micro Devices, Inc., */ ++/* One AMD Place, */ ++/* P.O. Box 3453 */ ++/* Sunnyvale, CA 94088-3453. */ ++/************************************************************************/ ++/* This software constitutes a basic shell of source code for */ ++/* programming all AMD Flash components. AMD */ ++/* will not be responsible for misuse or illegal use of this */ ++/* software for devices not supported herein. AMD is providing */ ++/* this source code "AS IS" and will not be responsible for */ ++/* issues arising from incorrect user implementation of the */ ++/* source code herein. It is the user's responsibility to */ ++/* properly design-in this source code. */ ++/* */ ++/************************************************************************/ ++#ifdef _CFE_ ++#include "lib_types.h" ++#include "lib_printf.h" ++#include "lib_string.h" ++#include "cfe_timer.h" ++#define printk printf ++#else // linux ++#include <linux/param.h> ++#include <linux/sched.h> ++#include <linux/timer.h> ++#endif ++ ++#include "cfiflash.h" ++ ++static int flash_wait(WORD sector, int offset, UINT16 data); ++static UINT16 flash_get_device_id(void); ++static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily); ++static int flash_write(WORD sector, int offset, byte *buf, int nbytes); ++static void flash_command(int command, WORD sector, int offset, UINT16 data); ++ ++/*********************************************************************/ ++/* 'meminfo' should be a pointer, but most C compilers will not */ ++/* allocate static storage for a pointer without calling */ ++/* non-portable functions such as 'new'. We also want to avoid */ ++/* the overhead of passing this pointer for every driver call. */ ++/* Systems with limited heap space will need to do this. */ ++/*********************************************************************/ ++struct flashinfo meminfo; /* Flash information structure */ ++static int flashFamily = FLASH_UNDEFINED; ++static int totalSize = 0; ++static struct cfi_query query; ++ ++static UINT16 cfi_data_struct_29W160[] = { ++ 0x0020, 0x0049, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0x0051, 0x0052, 0x0059, 0x0002, 0x0000, 0x0040, 0x0000, 0x0000, ++ 0x0000, 0x0000, 0x0000, 0x0027, 0x0036, 0x0000, 0x0000, 0x0004, ++ 0x0000, 0x000a, 0x0000, 0x0004, 0x0000, 0x0003, 0x0000, 0x0015, ++ 0x0002, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0040, ++ 0x0000, 0x0001, 0x0000, 0x0020, 0x0000, 0x0000, 0x0000, 0x0080, ++ 0x0000, 0x001e, 0x0000, 0x0000, 0x0001, 0xffff, 0xffff, 0xffff, ++ 0x0050, 0x0052, 0x0049, 0x0031, 0x0030, 0x0000, 0x0002, 0x0001, ++ 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0002, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0x0888, 0x252b, 0x8c84, 0x7dbc, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff ++}; ++ ++ ++/*********************************************************************/ ++/* Init_flash is used to build a sector table from the information */ ++/* provided through the CFI query. This information is translated */ ++/* from erase_block information to base:offset information for each */ ++/* individual sector. This information is then stored in the meminfo */ ++/* structure, and used throughout the driver to access sector */ ++/* information. */ ++/* */ ++/* This is more efficient than deriving the sector base:offset */ ++/* information every time the memory map switches (since on the */ ++/* development platform can only map 64k at a time). If the entire */ ++/* flash memory array can be mapped in, then the addition static */ ++/* allocation for the meminfo structure can be eliminated, but the */ ++/* drivers will have to be re-written. */ ++/* */ ++/* The meminfo struct occupies 653 bytes of heap space, depending */ ++/* on the value of the define MAXSECTORS. Adjust to suit */ ++/* application */ ++/*********************************************************************/ ++byte flash_init(void) ++{ ++ int i=0, j=0, count=0; ++ int basecount=0L; ++ UINT16 device_id; ++ int flipCFIGeometry = FALSE; ++ ++ /* First, assume ++ * a single 8k sector for sector 0. This is to allow ++ * the system to perform memory mapping to the device, ++ * even though the actual physical layout is unknown. ++ * Once mapped in, the CFI query will produce all ++ * relevant information. ++ */ ++ meminfo.addr = 0L; ++ meminfo.areg = 0; ++ meminfo.nsect = 1; ++ meminfo.bank1start = 0; ++ meminfo.bank2start = 0; ++ ++ meminfo.sec[0].size = 8192; ++ meminfo.sec[0].base = 0x00000; ++ meminfo.sec[0].bank = 1; ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ ++ device_id = flash_get_device_id(); ++ ++ switch (device_id) { ++ case ID_I28F160C3B: ++ case ID_I28F320C3B: ++ case ID_I28F160C3T: ++ case ID_I28F320C3T: ++ flashFamily = FLASH_INTEL; ++ break; ++ case ID_AM29DL800B: ++ case ID_AM29LV800B: ++ case ID_AM29LV400B: ++ case ID_AM29LV160B: ++ case ID_AM29LV320B: ++ case ID_MX29LV320AB: ++ case ID_AM29LV320MB: ++ case ID_AM29DL800T: ++ case ID_AM29LV800T: ++ case ID_AM29LV160T: ++ case ID_AM29LV320T: ++ case ID_MX29LV320AT: ++ case ID_AM29LV320MT: ++ flashFamily = FLASH_AMD; ++ break; ++ case ID_SST39VF1601: ++ case ID_SST39VF3201: ++ flashFamily = FLASH_SST; ++ break; ++ default: ++ printk("Flash memory not supported! Device id = %x\n", device_id); ++ return -1; ++ } ++ ++ if (flash_get_cfi(&query, 0, flashFamily) == -1) { ++ switch(device_id) { ++ case ID_AM29LV160T: ++ case ID_AM29LV160B: ++ flash_get_cfi(&query, cfi_data_struct_29W160, flashFamily); ++ break; ++ default: ++ printk("CFI data structure not found. Device id = %x\n", device_id); ++ return -1; ++ } ++ } ++ ++ // need to determine if it top or bottom boot here ++ switch (device_id) ++ { ++ case ID_AM29DL800B: ++ case ID_AM29LV800B: ++ case ID_AM29LV400B: ++ case ID_AM29LV160B: ++ case ID_AM29LV320B: ++ case ID_MX29LV320AB: ++ case ID_AM29LV320MB: ++ case ID_I28F160C3B: ++ case ID_I28F320C3B: ++ case ID_I28F160C3T: ++ case ID_I28F320C3T: ++ case ID_SST39VF1601: ++ case ID_SST39VF3201: ++ flipCFIGeometry = FALSE; ++ break; ++ case ID_AM29DL800T: ++ case ID_AM29LV800T: ++ case ID_AM29LV160T: ++ case ID_AM29LV320T: ++ case ID_MX29LV320AT: ++ case ID_AM29LV320MT: ++ flipCFIGeometry = TRUE; ++ break; ++ default: ++ printk("Flash memory not supported! Device id = %x\n", device_id); ++ return -1; ++ } ++ ++ count=0;basecount=0L; ++ ++ if (!flipCFIGeometry) ++ { ++ for (i=0; i<query.num_erase_blocks; i++) { ++ for(j=0; j<query.erase_block[i].num_sectors; j++) { ++ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; ++ meminfo.sec[count].base = (int) basecount; ++ basecount += (int) query.erase_block[i].sector_size; ++ count++; ++ } ++ } ++ } ++ else ++ { ++ for (i = (query.num_erase_blocks - 1); i >= 0; i--) { ++ for(j=0; j<query.erase_block[i].num_sectors; j++) { ++ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; ++ meminfo.sec[count].base = (int) basecount; ++ basecount += (int) query.erase_block[i].sector_size; ++ count++; ++ } ++ } ++ } ++ ++ meminfo.nsect = count; ++ totalSize = meminfo.sec[count-1].base + meminfo.sec[count-1].size; ++ return (0); ++} ++ ++/*********************************************************************/ ++/* Flash_sector_erase_int() is identical to flash_sector_erase(), */ ++/* except it will wait until the erase is completed before returning */ ++/* control to the calling function. This can be used in cases which */ ++/* require the program to hold until a sector is erased, without */ ++/* adding the wait check external to this function. */ ++/*********************************************************************/ ++byte flash_sector_erase_int(WORD sector) ++{ ++ int i; ++ ++ for( i = 0; i < 3; i++ ) { ++ flash_command(FLASH_SERASE, sector, 0, 0); ++ if (flash_wait(sector, 0, 0xffff) == STATUS_READY) ++ break; ++ } ++ ++ return(1); ++} ++ ++/*********************************************************************/ ++/* flash_read_buf() reads buffer of data from the specified */ ++/* offset from the sector parameter. */ ++/*********************************************************************/ ++int flash_read_buf(WORD sector, int offset, ++ byte *buffer, int numbytes) ++{ ++ byte *fwp; ++ ++ fwp = (byte *)flash_get_memptr(sector); ++ ++ while (numbytes) { ++ *buffer++ = *(fwp + offset); ++ numbytes--; ++ fwp++; ++ } ++ ++ return (1); ++} ++ ++/*********************************************************************/ ++/* flash_write_buf() utilizes */ ++/* the unlock bypass mode of the flash device. This can remove */ ++/* significant overhead from the bulk programming operation, and */ ++/* when programming bulk data a sizeable performance increase can be */ ++/* observed. */ ++/*********************************************************************/ ++int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes) ++{ ++ int ret = -1; ++ int i; ++ unsigned char *p = flash_get_memptr(sector) + offset; ++ ++ /* After writing the flash block, compare the contents to the source ++ * buffer. Try to write the sector successfully up to three times. ++ */ ++ for( i = 0; i < 3; i++ ) { ++ ret = flash_write(sector, offset, buffer, numbytes); ++ if( !memcmp( p, buffer, numbytes ) ) ++ break; ++ /* Erase and try again */ ++ flash_sector_erase_int(sector); ++ ret = -1; ++ } ++ ++ if( ret == -1 ) ++ printk( "Flash write error. Verify failed\n" ); ++ ++ return( ret ); ++} ++ ++/*********************************************************************/ ++/* Usefull funtion to return the number of sectors in the device. */ ++/* Can be used for functions which need to loop among all the */ ++/* sectors, or wish to know the number of the last sector. */ ++/*********************************************************************/ ++int flash_get_numsectors(void) ++{ ++ return meminfo.nsect; ++} ++ ++/*********************************************************************/ ++/* flash_get_sector_size() is provided for cases in which the size */ ++/* of a sector is required by a host application. The sector size */ ++/* (in bytes) is returned in the data location pointed to by the */ ++/* 'size' parameter. */ ++/*********************************************************************/ ++int flash_get_sector_size(WORD sector) ++{ ++ return meminfo.sec[sector].size; ++} ++ ++/*********************************************************************/ ++/* The purpose of flash_get_memptr() is to return a memory pointer */ ++/* which points to the beginning of memory space allocated for the */ ++/* flash. All function pointers are then referenced from this */ ++/* pointer. */ ++/* */ ++/* Different systems will implement this in different ways: */ ++/* possibilities include: */ ++/* - A direct memory pointer */ ++/* - A pointer to a memory map */ ++/* - A pointer to a hardware port from which the linear */ ++/* address is translated */ ++/* - Output of an MMU function / service */ ++/* */ ++/* Also note that this function expects the pointer to a specific */ ++/* sector of the device. This can be provided by dereferencing */ ++/* the pointer from a translated offset of the sector from a */ ++/* global base pointer (e.g. flashptr = base_pointer + sector_offset)*/ ++/* */ ++/* Important: Many AMD flash devices need both bank and or sector */ ++/* address bits to be correctly set (bank address bits are A18-A16, */ ++/* and sector address bits are A18-A12, or A12-A15). Flash parts */ ++/* which do not need these bits will ignore them, so it is safe to */ ++/* assume that every part will require these bits to be set. */ ++/*********************************************************************/ ++unsigned char *flash_get_memptr(WORD sector) ++{ ++ unsigned char *memptr = (unsigned char*)(FLASH_BASE_ADDR_REG + meminfo.sec[sector].base); ++ ++ return (memptr); ++} ++ ++/*********************************************************************/ ++/* The purpose of flash_get_blk() is to return a the block number */ ++/* for a given memory address. */ ++/*********************************************************************/ ++int flash_get_blk(int addr) ++{ ++ int blk_start, i; ++ int last_blk = flash_get_numsectors(); ++ int relative_addr = addr - (int) FLASH_BASE_ADDR_REG; ++ ++ for(blk_start=0, i=0; i < relative_addr && blk_start < last_blk; blk_start++) ++ i += flash_get_sector_size(blk_start); ++ ++ if( i > relative_addr ) ++ { ++ blk_start--; // last blk, dec by 1 ++ } ++ else ++ if( blk_start == last_blk ) ++ { ++ printk("Address is too big.\n"); ++ blk_start = -1; ++ } ++ ++ return( blk_start ); ++} ++ ++/************************************************************************/ ++/* The purpose of flash_get_total_size() is to return the total size of */ ++/* the flash */ ++/************************************************************************/ ++int flash_get_total_size() ++{ ++ return totalSize; ++} ++ ++/*********************************************************************/ ++/* Flash_command() is the main driver function. It performs */ ++/* every possible command available to AMD B revision */ ++/* flash parts. Note that this command is not used directly, but */ ++/* rather called through the API wrapper functions provided below. */ ++/*********************************************************************/ ++static void flash_command(int command, WORD sector, int offset, UINT16 data) ++{ ++ volatile UINT16 *flashptr; ++ volatile UINT16 *flashbase; ++ ++ flashptr = (UINT16 *) flash_get_memptr(sector); ++ flashbase = (UINT16 *) flash_get_memptr(0); ++ ++ switch (flashFamily) { ++ case FLASH_UNDEFINED: ++ /* These commands should work for AMD, Intel and SST flashes */ ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xF0; ++ flashptr[0] = 0xFF; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0x5555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AAA] = 0x55; /* unlock 2 */ ++ flashptr[0x5555] = 0x90; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_AMD: ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xF0; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashptr[0x55] = 0x98; ++ break; ++ case FLASH_UB: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x20; ++ break; ++ case FLASH_PROG: ++ flashptr[0] = 0xA0; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_UBRESET: ++ flashptr[0] = 0x90; ++ flashptr[0] = 0x00; ++ break; ++ case FLASH_SERASE: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x80; ++ flashptr[0x555] = 0xAA; ++ flashptr[0x2AA] = 0x55; ++ flashptr[0] = 0x30; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_INTEL: ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xFF; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashptr[0] = 0x98; ++ break; ++ case FLASH_PROG: ++ flashptr[0] = 0x40; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_SERASE: ++ flashptr[0] = 0x60; ++ flashptr[0] = 0xD0; ++ flashptr[0] = 0x20; ++ flashptr[0] = 0xD0; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_SST: ++ switch (command) { ++ case FLASH_RESET: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0xf0; ++ break; ++ case FLASH_READ_ID: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x98; ++ break; ++ case FLASH_UB: ++ break; ++ case FLASH_PROG: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0xa0; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_UBRESET: ++ break; ++ case FLASH_SERASE: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x80; ++ flashbase[0x5555] = 0xAA; ++ flashbase[0x2AAA] = 0x55; ++ flashptr[0] = 0x30; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++} ++ ++/*********************************************************************/ ++/* flash_write extends the functionality of flash_program() by */ ++/* providing an faster way to program multiple data words, without */ ++/* needing the function overhead of looping algorithms which */ ++/* program word by word. This function utilizes fast pointers */ ++/* to quickly loop through bulk data. */ ++/*********************************************************************/ ++static int flash_write(WORD sector, int offset, byte *buf, int nbytes) ++{ ++ UINT16 *src; ++ src = (UINT16 *)buf; ++ ++ if ((nbytes | offset) & 1) { ++ return -1; ++ } ++ ++ flash_command(FLASH_UB, 0, 0, 0); ++ while (nbytes > 0) { ++ flash_command(FLASH_PROG, sector, offset, *src); ++ if (flash_wait(sector, offset, *src) != STATUS_READY) ++ break; ++ offset +=2; ++ nbytes -=2; ++ src++; ++ } ++ flash_command(FLASH_UBRESET, 0, 0, 0); ++ ++ return (byte*)src - buf; ++} ++ ++/*********************************************************************/ ++/* flash_wait utilizes the DQ6, DQ5, and DQ2 polling algorithms */ ++/* described in the flash data book. It can quickly ascertain the */ ++/* operational status of the flash device, and return an */ ++/* appropriate status code (defined in flash.h) */ ++/*********************************************************************/ ++static int flash_wait(WORD sector, int offset, UINT16 data) ++{ ++ volatile UINT16 *flashptr; /* flash window */ ++ UINT16 d1; ++ ++ flashptr = (UINT16 *) flash_get_memptr(sector); ++ ++ if (flashFamily == FLASH_AMD || flashFamily == FLASH_SST) { ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ do { ++ d1 = flashptr[offset/2]; ++ if (d1 == data) ++ return STATUS_READY; ++ } while (!(d1 & 0x20)); ++ ++ d1 = flashptr[offset/2]; ++ ++ if (d1 != data) { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++#else ++ do { ++ d1 = *flashptr; /* read data */ ++ d1 ^= *flashptr; /* read it again and see what toggled */ ++ if (d1 == 0) /* no toggles, nothing's happening */ ++ return STATUS_READY; ++ } while (!(d1 & 0x20)); ++ ++ d1 = *flashptr; /* read data */ ++ d1 ^= *flashptr; /* read it again and see what toggled */ ++ ++ if (d1 != 0) { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++#endif ++ } else if (flashFamily == FLASH_INTEL) { ++ flashptr[0] = 0x70; ++ /* Wait for completion */ ++ while(!(*flashptr & 0x80)); ++ if (*flashptr & 0x30) { ++ flashptr[0] = 0x50; ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++ flashptr[0] = 0x50; ++ flash_command(FLASH_RESET, 0, 0, 0); ++ } ++ ++ return STATUS_READY; ++} ++ ++/*********************************************************************/ ++/* flash_get_device_id() will perform an autoselect sequence on the */ ++/* flash device, and return the device id of the component. */ ++/* This function automatically resets to read mode. */ ++/*********************************************************************/ ++static UINT16 flash_get_device_id() ++{ ++ volatile UINT16 *fwp; /* flash window */ ++ UINT16 answer; ++ ++ fwp = (UINT16 *)flash_get_memptr(0); ++ ++ flash_command(FLASH_READ_ID, 0, 0, 0); ++ answer = *(fwp + 1); ++ if (answer == ID_AM29LV320M) { ++ answer = *(fwp + 0xe); ++ answer = *(fwp + 0xf); ++ } ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return( (UINT16) answer ); ++} ++ ++/*********************************************************************/ ++/* flash_get_cfi() is the main CFI workhorse function. Due to it's */ ++/* complexity and size it need only be called once upon */ ++/* initializing the flash system. Once it is called, all operations */ ++/* are performed by looking at the meminfo structure. */ ++/* All possible care was made to make this algorithm as efficient as */ ++/* possible. 90% of all operations are memory reads, and all */ ++/* calculations are done using bit-shifts when possible */ ++/*********************************************************************/ ++static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily) ++{ ++ volatile UINT16 *fwp; /* flash window */ ++ int i=0; ++ ++ flash_command(FLASH_CFIQUERY, 0, 0, 0); ++ ++ if (cfi_struct == 0) ++ fwp = (UINT16 *)flash_get_memptr(0); ++ else ++ fwp = cfi_struct; ++ ++ /* Initial house-cleaning */ ++ for(i=0; i < 8; i++) { ++ query->erase_block[i].sector_size = 0; ++ query->erase_block[i].num_sectors = 0; ++ } ++ ++ /* If not 'QRY', then we dont have a CFI enabled device in the socket */ ++ if( fwp[0x10] != 'Q' && ++ fwp[0x11] != 'R' && ++ fwp[0x12] != 'Y') { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return(-1); ++ } ++ ++ query->num_erase_blocks = fwp[0x2C]; ++ if(flashFamily == FLASH_SST) ++ query->num_erase_blocks = 1; ++ ++ for(i=0; i < query->num_erase_blocks; i++) { ++ query->erase_block[i].num_sectors = fwp[(0x2D+(4*i))] + (fwp[0x2E + (4*i)] << 8); ++ query->erase_block[i].num_sectors++; ++ query->erase_block[i].sector_size = 256 * (256 * fwp[(0x30+(4*i))] + fwp[(0x2F+(4*i))]); ++ } ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return(1); ++} +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h 2006-07-07 22:17:24.000000000 +0200 +@@ -0,0 +1,150 @@ ++/************************************************************************/ ++/* */ ++/* AMD CFI Enabled Flash Memory Drivers */ ++/* File name: CFIFLASH.H */ ++/* Revision: 1.0 5/07/98 */ ++/* */ ++/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ ++/* This software is unpublished and contains the trade secrets and */ ++/* confidential proprietary information of AMD. Unless otherwise */ ++/* provided in the Software Agreement associated herewith, it is */ ++/* licensed in confidence "AS IS" and is not to be reproduced in whole */ ++/* or part by any means except for backup. Use, duplication, or */ ++/* disclosure by the Government is subject to the restrictions in */ ++/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ ++/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ ++/* Software owned by */ ++/* Advanced Micro Devices, Inc., */ ++/* One AMD Place, */ ++/* P.O. Box 3453 */ ++/* Sunnyvale, CA 94088-3453. */ ++/************************************************************************/ ++/* This software constitutes a basic shell of source code for */ ++/* programming all AMD Flash components. AMD */ ++/* will not be responsible for misuse or illegal use of this */ ++/* software for devices not supported herein. AMD is providing */ ++/* this source code "AS IS" and will not be responsible for */ ++/* issues arising from incorrect user implementation of the */ ++/* source code herein. It is the user's responsibility to */ ++/* properly design-in this source code. */ ++/* */ ++/************************************************************************/ ++#ifndef _CFIFLASH_H ++#define _CFIFLASH_H ++ ++#if defined __cplusplus ++extern "C" { ++#endif ++ ++/* include board/CPU specific definitions */ ++#include "bcmtypes.h" ++#include "board.h" ++ ++#define FLASH_BASE_ADDR_REG FLASH_BASE ++ ++#ifndef NULL ++#define NULL 0 ++#endif ++ ++#define MAXSECTORS 1024 /* maximum number of sectors supported */ ++ ++/* A structure for identifying a flash part. There is one for each ++ * of the flash part definitions. We need to keep track of the ++ * sector organization, the address register used, and the size ++ * of the sectors. ++ */ ++struct flashinfo { ++ char *name; /* "Am29DL800T", etc. */ ++ unsigned long addr; /* physical address, once translated */ ++ int areg; /* Can be set to zero for all parts */ ++ int nsect; /* # of sectors -- 19 in LV, 22 in DL */ ++ int bank1start; /* first sector # in bank 1 */ ++ int bank2start; /* first sector # in bank 2, if DL part */ ++ struct { ++ long size; /* # of bytes in this sector */ ++ long base; /* offset from beginning of device */ ++ int bank; /* 1 or 2 for DL; 1 for LV */ ++ } sec[MAXSECTORS]; /* per-sector info */ ++}; ++ ++/* ++ * This structure holds all CFI query information as defined ++ * in the JEDEC standard. All information up to ++ * primary_extended_query is standard among all manufactures ++ * with CFI enabled devices. ++ */ ++ ++struct cfi_query { ++ int num_erase_blocks; /* Number of sector defs. */ ++ struct { ++ unsigned long sector_size; /* byte size of sector */ ++ int num_sectors; /* Num sectors of this size */ ++ } erase_block[8]; /* Max of 256, but 8 is good */ ++}; ++ ++/* Standard Boolean declarations */ ++#define TRUE 1 ++#define FALSE 0 ++ ++/* Define different type of flash */ ++#define FLASH_UNDEFINED 0 ++#define FLASH_AMD 1 ++#define FLASH_INTEL 2 ++#define FLASH_SST 3 ++ ++/* Command codes for the flash_command routine */ ++#define FLASH_RESET 0 /* reset to read mode */ ++#define FLASH_READ_ID 1 /* read device ID */ ++#define FLASH_CFIQUERY 2 /* CFI query */ ++#define FLASH_UB 3 /* go into unlock bypass mode */ ++#define FLASH_PROG 4 /* program a word */ ++#define FLASH_UBRESET 5 /* reset to read mode from unlock bypass mode */ ++#define FLASH_SERASE 6 /* sector erase */ ++ ++/* Return codes from flash_status */ ++#define STATUS_READY 0 /* ready for action */ ++#define STATUS_TIMEOUT 1 /* operation timed out */ ++ ++/* A list of AMD compatible device ID's - add others as needed */ ++#define ID_AM29DL800T 0x224A ++#define ID_AM29DL800B 0x22CB ++#define ID_AM29LV800T 0x22DA ++#define ID_AM29LV800B 0x225B ++#define ID_AM29LV400B 0x22BA ++ ++#define ID_AM29LV160B 0x2249 ++#define ID_AM29LV160T 0x22C4 ++ ++#define ID_AM29LV320T 0x22F6 ++#define ID_MX29LV320AT 0x22A7 ++#define ID_AM29LV320B 0x22F9 ++#define ID_MX29LV320AB 0x22A8 ++ ++#define ID_AM29LV320M 0x227E ++#define ID_AM29LV320MB 0x2200 ++#define ID_AM29LV320MT 0x2201 ++ ++#define ID_SST39VF1601 0x234B ++#define ID_SST39VF3201 0x235B ++ ++/* A list of Intel compatible device ID's - add others as needed */ ++#define ID_I28F160C3T 0x88C2 ++#define ID_I28F160C3B 0x88C3 ++#define ID_I28F320C3T 0x88C4 ++#define ID_I28F320C3B 0x88C5 ++ ++extern byte flash_init(void); ++extern int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes); ++extern int flash_read_buf(WORD sector, int offset, byte *buffer, int numbytes); ++extern byte flash_sector_erase_int(WORD sector); ++extern int flash_get_numsectors(void); ++extern int flash_get_sector_size(WORD sector); ++extern int flash_get_total_size(void); ++extern unsigned char *flash_get_memptr(WORD sector); ++extern int flash_get_blk(int addr); ++ ++#if defined __cplusplus ++} ++#endif ++ ++#endif +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,274 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Interrupt control functions for Broadcom 963xx MIPS boards ++ */ ++ ++#include <asm/atomic.h> ++ ++#include <linux/delay.h> ++#include <linux/init.h> ++#include <linux/ioport.h> ++#include <linux/irq.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/slab.h> ++#include <linux/module.h> ++ ++#include <asm/irq.h> ++#include <asm/mipsregs.h> ++#include <asm/addrspace.h> ++#include <asm/signal.h> ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++static void irq_dispatch_int(struct pt_regs *regs) ++{ ++ unsigned int pendingIrqs; ++ static unsigned int irqBit; ++ static unsigned int isrNumber = 31; ++ ++ pendingIrqs = PERF->IrqStatus & PERF->IrqMask; ++ if (!pendingIrqs) { ++ return; ++ } ++ ++ while (1) { ++ irqBit <<= 1; ++ isrNumber++; ++ if (isrNumber == 32) { ++ isrNumber = 0; ++ irqBit = 0x1; ++ } ++ if (pendingIrqs & irqBit) { ++ PERF->IrqMask &= ~irqBit; // mask ++ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET, regs); ++ break; ++ } ++ } ++} ++ ++static void irq_dispatch_ext(uint32 irq, struct pt_regs *regs) ++{ ++ if (!(PERF->ExtIrqCfg & (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)))) { ++ printk("**** Ext IRQ mask. Should not dispatch ****\n"); ++ } ++ /* disable and clear interrupt in the controller */ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ do_IRQ(irq, regs); ++} ++ ++void brcm_irq_dispatch(struct pt_regs *regs) ++{ ++ u32 cause; ++ while((cause = (read_c0_cause()& CAUSEF_IP))) { ++ if (cause & CAUSEF_IP7) ++ do_IRQ(MIPS_TIMER_INT, regs); ++ else if (cause & CAUSEF_IP2) ++ irq_dispatch_int(regs); ++ else if (cause & CAUSEF_IP3) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); ++ else if (cause & CAUSEF_IP4) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); ++ else if (cause & CAUSEF_IP5) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); ++ else if (cause & CAUSEF_IP6) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); ++ cli(); ++ } ++} ++ ++ ++void enable_brcm_irq(unsigned int irq) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { ++ PERF->IrqMask |= (1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); ++ } ++ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { ++ /* enable and clear interrupt in the controller */ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ } ++ local_irq_restore(flags); ++} ++ ++void disable_brcm_irq(unsigned int irq) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { ++ PERF->IrqMask &= ~(1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); ++ } ++ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { ++ /* disable interrupt in the controller */ ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ } ++ local_irq_restore(flags); ++} ++ ++void ack_brcm_irq(unsigned int irq) ++{ ++ /* Already done in brcm_irq_dispatch */ ++} ++ ++unsigned int startup_brcm_irq(unsigned int irq) ++{ ++ enable_brcm_irq(irq); ++ ++ return 0; /* never anything pending */ ++} ++ ++unsigned int startup_brcm_none(unsigned int irq) ++{ ++ return 0; ++} ++ ++void end_brcm_irq(unsigned int irq) ++{ ++ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) ++ enable_brcm_irq(irq); ++} ++ ++void end_brcm_none(unsigned int irq) ++{ ++} ++ ++#define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) ++ ++static void __init brcm_irq_setup(void) ++{ ++ extern asmlinkage void brcmIRQ(void); ++ ++ clear_c0_status(ST0_BEV); ++ set_except_vector(0, brcmIRQ); ++ change_c0_status(ST0_IM, ALLINTS_NOTIMER); ++ ++#ifdef CONFIG_REMOTE_DEBUG ++ rs_kgdb_hook(0); ++#endif ++} ++ ++static struct hw_interrupt_type brcm_irq_type = { ++ .typename = "MIPS", ++ .startup = startup_brcm_irq, ++ .shutdown = disable_brcm_irq, ++ .enable = enable_brcm_irq, ++ .disable = disable_brcm_irq, ++ .ack = ack_brcm_irq, ++ .end = end_brcm_irq, ++ .set_affinity = NULL ++}; ++ ++static struct hw_interrupt_type brcm_irq_no_end_type = { ++ .typename = "MIPS", ++ .startup = startup_brcm_none, ++ .shutdown = disable_brcm_irq, ++ .enable = enable_brcm_irq, ++ .disable = disable_brcm_irq, ++ .ack = ack_brcm_irq, ++ .end = end_brcm_none, ++ .set_affinity = NULL ++}; ++ ++void __init arch_init_irq(void) ++{ ++ int i; ++ ++ for (i = 0; i < NR_IRQS; i++) { ++ irq_desc[i].status = IRQ_DISABLED; ++ irq_desc[i].action = 0; ++ irq_desc[i].depth = 1; ++ irq_desc[i].handler = &brcm_irq_type; ++ } ++ ++ brcm_irq_setup(); ++} ++ ++int request_external_irq(unsigned int irq, ++ FN_HANDLER handler, ++ unsigned long irqflags, ++ const char * devname, ++ void *dev_id) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); // Clear ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); // Mask ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_INSENS_SHFT)); // Edge insesnsitive ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_LEVEL_SHFT)); // Level triggered ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_SENSE_SHFT)); // Low level ++ ++ local_irq_restore(flags); ++ ++ return( request_irq(irq, handler, irqflags, devname, dev_id) ); ++} ++ ++/* VxWorks compatibility function(s). */ ++ ++unsigned int BcmHalMapInterrupt(FN_HANDLER pfunc, unsigned int param, ++ unsigned int interruptId) ++{ ++ int nRet = -1; ++ char *devname; ++ ++ devname = kmalloc(16, GFP_KERNEL); ++ if (devname) ++ sprintf( devname, "brcm_%d", interruptId ); ++ ++ /* Set the IRQ description to not automatically enable the interrupt at ++ * the end of an ISR. The driver that handles the interrupt must ++ * explicitly call BcmHalInterruptEnable or enable_brcm_irq. This behavior ++ * is consistent with interrupt handling on VxWorks. ++ */ ++ irq_desc[interruptId].handler = &brcm_irq_no_end_type; ++ ++ if( interruptId >= INTERNAL_ISR_TABLE_OFFSET ) ++ { ++ nRet = request_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, ++ devname, (void *) param ); ++ } ++ else if (interruptId >= INTERRUPT_ID_EXTERNAL_0 && interruptId <= INTERRUPT_ID_EXTERNAL_3) ++ { ++ nRet = request_external_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, ++ devname, (void *) param ); ++ } ++ ++ return( nRet ); ++} ++ ++ ++/* Debug function. */ ++ ++void dump_intr_regs(void) ++{ ++ printk("PERF->ExtIrqCfg [%08x]\n", *(&(PERF->ExtIrqCfg))); ++} ++ ++EXPORT_SYMBOL(enable_brcm_irq); ++EXPORT_SYMBOL(disable_brcm_irq); ++EXPORT_SYMBOL(request_external_irq); ++EXPORT_SYMBOL(BcmHalMapInterrupt); ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,172 @@ ++# Kernel and Driver configuration for Broadcom Commengine ADSL board ++choice ++ prompt "Broadcom Commengine ADSL board" ++ depends on MIPS_BRCM ++ default BCM96345 ++ help ++ Select different Broadcom ADSL board ++ ++config BCM96338 ++ bool "96338 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++config BCM96345 ++ bool "96345 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++config BCM96348 ++ bool "96348 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++endchoice ++ ++config BCM_BOARD ++ bool "Support for Broadcom Board" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SERIAL ++ bool "Support for Serial Port" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENET ++ tristate "Support for Ethernet" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_USB ++ tristate "Support for USB" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_WLAN ++ tristate "Support for Wireless" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PCI ++ bool "Support for PCI" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ select PCI ++ ++config BCM_ATMAPI ++ tristate "Support for ATM" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMTEST ++ tristate "Support for ATM Diagnostic" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ADSL ++ tristate "Support for ADSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENDPOINT ++ tristate "Support for VOICE" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PROCFS ++ tristate "Support for PROCFS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_VDSL ++ tristate "Support for VDSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SECURITY ++ tristate "Support for SECURITY" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_HPNA ++ tristate "Support for HPNA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_BOARD_IMPL ++ int "Implementation index for ADSL Board" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SERIAL_IMPL ++ int "Implementation index for Serial" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENET_IMPL ++ int "Implementation index for Ethernet" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_USB_IMPL ++ int "Implementation index for USB" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_WLAN_IMPL ++ int "Implementation index for WIRELESS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMAPI_IMPL ++ int "Implementation index for ATM" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMTEST_IMPL ++ int "Implementation index for ATM Diagnostic" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_BLAA_IMPL ++ int "Implementation index for BLAA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ADSL_IMPL ++ int "Implementation index for ADSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENDPOINT_IMPL ++ int "Implementation index for VOICE" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PROCFS_IMPL ++ int "Implementation index for PROCFS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_VDSL_IMPL ++ int "Implementation index for VDSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SECURITY_IMPL ++ int "Implementation index for SECURITY" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_HPNA_IMPL ++ int "Implementation index for HPNA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++choice ++ prompt "Root File System" ++ depends on MIPS_BRCM ++ default ROOTFS_SQUASHFS ++ help ++ Select root file system on the board flash. ++ ++config ROOTFS_SQUASHFS ++ bool "SQUASHFS" ++config ROOTFS_CRAMFS ++ bool "CRAMFS" ++config ROOTFS_JFFS2 ++ bool "JFFS2" ++config ROOTFS_NFS ++ bool "NFS" ++ ++endchoice ++ ++config ROOT_FLASHFS ++ string "flash partition" ++ depends on ROOTFS_SQUASHFS || ROOTFS_CRAMFS || ROOTFS_JFFS2 ++ default "root=31:0 ro noinitrd" if ROOTFS_SQUASHFS = y || ROOTFS_CRAMFS = y ++ default "root=31:2 ro noinitrd" if ROOTFS_JFFS2 = y ++ help ++ This is the root file system partition on flash memory ++ ++config ROOT_NFS_DIR ++ string "NFS server path" ++ depends on ROOTFS_NFS ++ default "/opt/bcm96338/targets/96338R/fs" if BCM96338 = y ++ default "/opt/bcm96345/targets/96345R/fs" if BCM96345 = y ++ default "/opt/bcm96348/targets/96348R/fs" if BCM96348 = y ++ help ++ This is the path of NFS server (host system) +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile 2006-07-07 22:18:20.000000000 +0200 +@@ -0,0 +1,23 @@ ++# ++# Makefile for generic Broadcom MIPS boards ++# ++# Copyright (C) 2004 Broadcom Corporation ++# ++obj-y := irq.o prom.o setup.o time.o ser_init.o bcm63xx_flash.o bcm63xx_led.o board.o boardparms.o cfiflash.o ++ ++SRCBASE := $(TOPDIR) ++EXTRA_CFLAGS += -I$(SRCBASE)/include ++#EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -DDBG ++EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) ++ ++ ++ifeq "$(ADSL)" "ANNEX_B" ++EXTRA_CFLAGS += -DADSL_ANNEXB ++endif ++ifeq "$(ADSL)" "SADSL" ++EXTRA_CFLAGS += -DADSL_SADSL ++endif ++ifeq "$(ADSL)" "ANNEX_C" ++EXTRA_CFLAGS += -DADSL_ANNEXC ++endif ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,236 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * prom.c: PROM library initialization code. ++ * ++ */ ++#include <linux/init.h> ++#include <linux/mm.h> ++#include <linux/sched.h> ++#include <linux/bootmem.h> ++#include <linux/blkdev.h> ++#include <asm/addrspace.h> ++#include <asm/bootinfo.h> ++#include <asm/cpu.h> ++#include <asm/time.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include "boardparms.h" ++#include "softdsl/AdslCoreDefs.h" ++ ++ ++extern int do_syslog(int, char *, int); ++extern void serial_init(void); ++extern void __init InitNvramInfo( void ); ++/*extern void kerSysFlashInit( void );*/ ++/*extern unsigned long get_nvram_start_addr(void);*/ ++void __init create_root_nfs_cmdline( char *cmdline ); ++ ++#if defined(CONFIG_BCM96338) ++#define CPU_CLOCK 240000000 ++#define MACH_BCM MACH_BCM96338 ++#endif ++#if defined(CONFIG_BCM96345) ++#define CPU_CLOCK 140000000 ++#define MACH_BCM MACH_BCM96345 ++#endif ++#if defined(CONFIG_BCM96348) ++void __init calculateCpuSpeed(void); ++static unsigned long cpu_speed; ++#define CPU_CLOCK cpu_speed ++#define MACH_BCM MACH_BCM96348 ++#endif ++ ++const char *get_system_type(void) ++{/* ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ ++ return( pNvramData->szBoardId );*/ ++ return "brcm63xx"; ++} ++ ++unsigned long getMemorySize(void) ++{ ++ unsigned long ulSdramType = BOARD_SDRAM_TYPE; ++ ++ unsigned long ulSdramSize; ++ ++ switch( ulSdramType ) ++ { ++ case BP_MEMORY_16MB_1_CHIP: ++ case BP_MEMORY_16MB_2_CHIP: ++ ulSdramSize = 16 * 1024 * 1024; ++ break; ++ case BP_MEMORY_32MB_1_CHIP: ++ case BP_MEMORY_32MB_2_CHIP: ++ ulSdramSize = 32 * 1024 * 1024; ++ break; ++ case BP_MEMORY_64MB_2_CHIP: ++ ulSdramSize = 64 * 1024 * 1024; ++ break; ++ default: ++ ulSdramSize = 8 * 1024 * 1024; ++ break; ++ } ++ ++ return ulSdramSize; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: prom_init ++ -------------------------------------------------------------------------- */ ++void __init prom_init(void) ++{ ++ extern ulong r4k_interval; ++ ++ serial_init(); ++ ++ /*kerSysFlashInit();*/ ++ ++ do_syslog(8, NULL, 8); ++ ++ printk( "%s prom init\n", get_system_type() ); ++ ++ PERF->IrqMask = 0; ++ ++ arcs_cmdline[0] = '\0'; ++#if 0 ++#if defined(CONFIG_ROOT_NFS) ++ create_root_nfs_cmdline( arcs_cmdline ); ++#endif ++#elif defined(CONFIG_ROOT_FLASHFS) ++ strcpy(arcs_cmdline, CONFIG_ROOT_FLASHFS); ++#endif ++ ++ add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); ++ ++#if defined(CONFIG_BCM96348) ++ calculateCpuSpeed(); ++#endif ++ /* Count register increments every other clock */ ++ r4k_interval = CPU_CLOCK / HZ / 2; ++ mips_hpt_frequency = CPU_CLOCK / 2; ++ ++ mips_machgroup = MACH_GROUP_BRCM; ++ mips_machtype = MACH_BCM; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: prom_free_prom_memory ++Abstract: ++ -------------------------------------------------------------------------- */ ++void __init prom_free_prom_memory(void) ++{ ++ ++} ++ ++#if 0 ++#if defined(CONFIG_ROOT_NFS) ++/* This function reads in a line that looks something like this: ++ * ++ * ++ * CFE bootline=bcmEnet(0,0)host:vmlinux e=192.169.0.100:ffffff00 h=192.169.0.1 ++ * ++ * ++ * and retuns in the cmdline parameter some that looks like this: ++ * ++ * CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/opt/targets/96345R/fs ++ * ip=192.168.0.100:192.168.0.1::255.255.255.0::eth0:off rw" ++ */ ++#define BOOT_LINE_ADDR 0x0 ++#define HEXDIGIT(d) ((d >= '0' && d <= '9') ? (d - '0') : ((d | 0x20) - 'W')) ++#define HEXBYTE(b) (HEXDIGIT((b)[0]) << 4) + HEXDIGIT((b)[1]) ++extern unsigned long get_nvram_start_addr(void); ++ ++void __init create_root_nfs_cmdline( char *cmdline ) ++{ ++ char root_nfs_cl[] = "root=/dev/nfs nfsroot=%s:" CONFIG_ROOT_NFS_DIR ++ " ip=%s:%s::%s::eth0:off rw"; ++ ++ char *localip = NULL; ++ char *hostip = NULL; ++ char mask[16] = ""; ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ char bootline[128] = ""; ++ char *p = bootline; ++ ++ memcpy(bootline, pNvramData->szBootline, sizeof(bootline)); ++ while( *p ) ++ { ++ if( p[0] == 'e' && p[1] == '=' ) ++ { ++ /* Found local ip address */ ++ p += 2; ++ localip = p; ++ while( *p && *p != ' ' && *p != ':' ) ++ p++; ++ if( *p == ':' ) ++ { ++ /* Found network mask (eg FFFFFF00 */ ++ *p++ = '\0'; ++ sprintf( mask, "%u.%u.%u.%u", HEXBYTE(p), HEXBYTE(p + 2), ++ HEXBYTE(p + 4), HEXBYTE(p + 6) ); ++ p += 4; ++ } ++ else if( *p == ' ' ) ++ *p++ = '\0'; ++ } ++ else if( p[0] == 'h' && p[1] == '=' ) ++ { ++ /* Found host ip address */ ++ p += 2; ++ hostip = p; ++ while( *p && *p != ' ' ) ++ p++; ++ if( *p == ' ' ) ++ *p++ = '\0'; ++ } ++ else ++ p++; ++ } ++ ++ if( localip && hostip ) ++ sprintf( cmdline, root_nfs_cl, hostip, localip, hostip, mask ); ++} ++#endif ++#endif ++ ++#if defined(CONFIG_BCM96348) ++/* ********************************************************************* ++ * calculateCpuSpeed() ++ * Calculate the BCM6348 CPU speed by reading the PLL strap register ++ * and applying the following formula: ++ * cpu_clk = (.25 * 64MHz freq) * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) ++ * Input parameters: ++ * none ++ * Return value: ++ * none ++ ********************************************************************* */ ++void __init calculateCpuSpeed(void) ++{ ++ UINT32 pllStrap = PERF->PllStrap; ++ int n1 = (pllStrap & PLL_N1_MASK) >> PLL_N1_SHFT; ++ int n2 = (pllStrap & PLL_N2_MASK) >> PLL_N2_SHFT; ++ int m1cpu = (pllStrap & PLL_M1_CPU_MASK) >> PLL_M1_CPU_SHFT; ++ ++ cpu_speed = (16 * (n1 + 1) * (n2 + 2) / (m1cpu + 1)) * 1000000; ++} ++#endif ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,180 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Broadcom bcm63xx serial port initialization, also prepare for printk ++ * by registering with console_init ++ * ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/console.h> ++#include <linux/sched.h> ++ ++#include <asm/addrspace.h> ++#include <asm/irq.h> ++#include <asm/reboot.h> ++#include <asm/gdb-stub.h> ++#include <asm/mc146818rtc.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define SER63XX_DEFAULT_BAUD 115200 ++#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) ++#define stUart ((volatile Uart * const) UART_BASE) ++ ++// Transmit interrupts ++#define TXINT (TXFIFOEMT | TXUNDERR | TXOVFERR) ++// Receive interrupts ++#define RXINT (RXFIFONE | RXOVFERR) ++ ++/* -------------------------------------------------------------------------- ++ Name: serial_init ++ Purpose: Initalize the UART ++-------------------------------------------------------------------------- */ ++void __init serial_init(void) ++{ ++ UINT32 tmpVal = SER63XX_DEFAULT_BAUD; ++ ULONG clockFreqHz; ++ ++#if defined(CONFIG_BCM96345) ++ // Make sure clock is ticking ++ PERF->blkEnables |= UART_CLK_EN; ++#endif ++ ++ /* Dissable channel's receiver and transmitter. */ ++ stUart->control &= ~(BRGEN|TXEN|RXEN); ++ ++ /*--------------------------------------------------------------------*/ ++ /* Write the table value to the clock select register. */ ++ /* DPullen - this is the equation to use: */ ++ /* value = clockFreqHz / baud / 32-1; */ ++ /* (snmod) Actually you should also take into account any necessary */ ++ /* rounding. Divide by 16, look at lsb, if 0, divide by 2 */ ++ /* and subtract 1. If 1, just divide by 2 */ ++ /*--------------------------------------------------------------------*/ ++ clockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; ++ tmpVal = (clockFreqHz / tmpVal) / 16; ++ if( tmpVal & 0x01 ) ++ tmpVal /= 2; //Rounding up, so sub is already accounted for ++ else ++ tmpVal = (tmpVal / 2) - 1; // Rounding down so we must sub 1 ++ stUart->baudword = tmpVal; ++ ++ /* Finally, re-enable the transmitter and receiver. */ ++ stUart->control |= (BRGEN|TXEN|RXEN); ++ ++ stUart->config = (BITS8SYM | ONESTOP); ++ // Set the FIFO interrupt depth ... stUart->fifocfg = 0xAA; ++ stUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; ++ stUart->intMask = 0; ++ stUart->intMask = RXINT | TXINT; ++} ++ ++ ++/* prom_putc() ++ * Output a character to the UART ++ */ ++void prom_putc(char c) ++{ ++ /* Wait for Tx uffer to empty */ ++ while (! (READ16(stUart->intStatus) & TXFIFOEMT)); ++ /* Send character */ ++ stUart->Data = c; ++} ++ ++/* prom_puts() ++ * Write a string to the UART ++ */ ++void prom_puts(const char *s) ++{ ++ while (*s) { ++ if (*s == '\n') { ++ prom_putc('\r'); ++ } ++ prom_putc(*s++); ++ } ++} ++ ++ ++/* prom_getc_nowait() ++ * Returns a character from the UART ++ * Returns -1 if no characters available or corrupted ++ */ ++int prom_getc_nowait(void) ++{ ++ uint16 uStatus; ++ int cData = -1; ++ ++ uStatus = READ16(stUart->intStatus); ++ ++ if (uStatus & RXFIFONE) { /* Do we have a character? */ ++ cData = READ16(stUart->Data) & 0xff; /* Read character */ ++ if (uStatus & (RXFRAMERR | RXPARERR)) { /* If we got an error, throw it away */ ++ cData = -1; ++ } ++ } ++ ++ return cData; ++} ++ ++/* prom_getc() ++ * Returns a charcter from the serial port ++ * Will block until it receives a valid character ++*/ ++char prom_getc(void) ++{ ++ int cData = -1; ++ ++ /* Loop until we get a valid character */ ++ while(cData == -1) { ++ cData = prom_getc_nowait(); ++ } ++ return (char) cData; ++} ++ ++/* prom_testc() ++ * Returns 0 if no characters available ++ */ ++int prom_testc(void) ++{ ++ uint16 uStatus; ++ ++ uStatus = READ16(stUart->intStatus); ++ ++ return (uStatus & RXFIFONE); ++} ++ ++#if CONFIG_REMOTE_DEBUG ++/* Prevent other code from writing to the serial port */ ++void _putc(char c) { } ++void _puts(const char *ptr) { } ++#else ++/* Low level outputs call prom routines */ ++void _putc(char c) { ++ prom_putc(c); ++} ++void _puts(const char *ptr) { ++ prom_puts(ptr); ++} ++#endif +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,523 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Generic setup routines for Broadcom 963xx MIPS boards ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/kdev_t.h> ++#include <linux/types.h> ++#include <linux/console.h> ++#include <linux/sched.h> ++#include <linux/mm.h> ++#include <linux/slab.h> ++#include <linux/module.h> ++#include <linux/pm.h> ++ ++#include <asm/addrspace.h> ++#include <asm/bcache.h> ++#include <asm/irq.h> ++#include <asm/time.h> ++#include <asm/reboot.h> ++#include <asm/gdb-stub.h> ++ ++extern void brcm_timer_setup(struct irqaction *irq); ++extern unsigned long getMemorySize(void); ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++#include <linux/pci.h> ++#include <linux/delay.h> ++#include <bcm_map_part.h> ++#include <bcmpci.h> ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++#endif ++ ++/* This function should be in a board specific directory. For now, ++ * assume that all boards that include this file use a Broadcom chip ++ * with a soft reset bit in the PLL control register. ++ */ ++static void brcm_machine_restart(char *command) ++{ ++ const unsigned long ulSoftReset = 0x00000001; ++ unsigned long *pulPllCtrl = (unsigned long *) 0xfffe0008; ++ *pulPllCtrl |= ulSoftReset; ++} ++ ++static void brcm_machine_halt(void) ++{ ++ printk("System halted\n"); ++ while (1); ++} ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++ ++static void mpi_SetLocalPciConfigReg(uint32 reg, uint32 value) ++{ ++ /* write index then value */ ++ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; ++ mpi->pcicfgdata = value; ++} ++ ++static uint32 mpi_GetLocalPciConfigReg(uint32 reg) ++{ ++ /* write index then get value */ ++ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; ++ return mpi->pcicfgdata; ++} ++ ++/* ++ * mpi_ResetPcCard: Set/Reset the PcCard ++ */ ++static void mpi_ResetPcCard(int cardtype, BOOL bReset) ++{ ++ if (cardtype == MPI_CARDTYPE_NONE) { ++ return; ++ } ++ ++ if (cardtype == MPI_CARDTYPE_CARDBUS) { ++ bReset = ! bReset; ++ } ++ ++ if (bReset) { ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); ++ } else { ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 | PCCARD_CARD_RESET); ++ } ++} ++ ++/* ++ * mpi_ConfigCs: Configure an MPI/EBI chip select ++ */ ++static void mpi_ConfigCs(uint32 cs, uint32 base, uint32 size, uint32 flags) ++{ ++ mpi->cs[cs].base = ((base & 0x1FFFFFFF) | size); ++ mpi->cs[cs].config = flags; ++} ++ ++/* ++ * mpi_InitPcmciaSpace ++ */ ++static void mpi_InitPcmciaSpace(void) ++{ ++ // ChipSelect 4 controls PCMCIA Memory accesses ++ mpi_ConfigCs(PCMCIA_COMMON_BASE, pcmciaMem, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); ++ // ChipSelect 5 controls PCMCIA Attribute accesses ++ mpi_ConfigCs(PCMCIA_ATTRIBUTE_BASE, pcmciaAttr, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); ++ // ChipSelect 6 controls PCMCIA I/O accesses ++ mpi_ConfigCs(PCMCIA_IO_BASE, pcmciaIo, EBI_SIZE_64K, (EBI_WORD_WIDE|EBI_ENABLE)); ++ ++ mpi->pcmcia_cntl2 = ((PCMCIA_ATTR_ACTIVE << RW_ACTIVE_CNT_BIT) | ++ (PCMCIA_ATTR_INACTIVE << INACTIVE_CNT_BIT) | ++ (PCMCIA_ATTR_CE_SETUP << CE_SETUP_CNT_BIT) | ++ (PCMCIA_ATTR_CE_HOLD << CE_HOLD_CNT_BIT)); ++ ++ mpi->pcmcia_cntl2 |= (PCMCIA_HALFWORD_EN | PCMCIA_BYTESWAP_DIS); ++} ++ ++/* ++ * cardtype_vcc_detect: PC Card's card detect and voltage sense connection ++ * ++ * CD1#/ CD2#/ VS1#/ VS2#/ Card Initial Vcc ++ * CCD1# CCD2# CVS1 CVS2 Type ++ * ++ * GND GND open open 16-bit 5 vdc ++ * ++ * GND GND GND open 16-bit 3.3 vdc ++ * ++ * GND GND open GND 16-bit x.x vdc ++ * ++ * GND GND GND GND 16-bit 3.3 & x.x vdc ++ * ++ *==================================================================== ++ * ++ * CVS1 GND CCD1# open CardBus 3.3 vdc ++ * ++ * GND CVS2 open CCD2# CardBus x.x vdc ++ * ++ * GND CVS1 CCD2# open CardBus y.y vdc ++ * ++ * GND CVS2 GND CCD2# CardBus 3.3 & x.x vdc ++ * ++ * CVS2 GND open CCD1# CardBus x.x & y.y vdc ++ * ++ * GND CVS1 CCD2# open CardBus 3.3, x.x & y.y vdc ++ * ++ */ ++static int cardtype_vcc_detect(void) ++{ ++ uint32 data32; ++ int cardtype; ++ ++ cardtype = MPI_CARDTYPE_NONE; ++ mpi->pcmcia_cntl1 = 0x0000A000; // Turn on the output enables and drive ++ // the CVS pins to 0. ++ data32 = mpi->pcmcia_cntl1; ++ switch (data32 & 0x00000003) // Test CD1# and CD2#, see if card is plugged in. ++ { ++ case 0x00000003: // No Card is in the slot. ++ printk("mpi: No Card is in the PCMCIA slot\n"); ++ break; ++ ++ case 0x00000002: // Partial insertion, No CD2#. ++ printk("mpi: Card in the PCMCIA slot partial insertion, no CD2 signal\n"); ++ break; ++ ++ case 0x00000001: // Partial insertion, No CD1#. ++ printk("mpi: Card in the PCMCIA slot partial insertion, no CD1 signal\n"); ++ break; ++ ++ case 0x00000000: ++ mpi->pcmcia_cntl1 = 0x0000A0C0; // Turn off the CVS output enables and ++ // float the CVS pins. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ // Read the Register. ++ switch (data32 & 0x0000000C) // See what is on the CVS pins. ++ { ++ case 0x00000000: // CVS1 and CVS2 are tied to ground, only 1 option. ++ printk("mpi: Detected 3.3 & x.x 16-bit PCMCIA card\n"); ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ break; ++ ++ case 0x00000004: // CVS1 is open or tied to CCD1/CCD2 and CVS2 is tied to ground. ++ // 2 valid voltage options. ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ mpi->pcmcia_cntl1 = 0x0000A080; // Drive CVS1 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS2, not valid. ++ printk("mpi: Unknown card plugged into slot\n"); ++ } else { // CCD2 is tied to CVS1. ++ printk("mpi: Detected 3.3, x.x and y.y Cardbus card\n"); ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ } ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ printk("mpi: Detected x.x vdc 16-bit PCMCIA card\n"); ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ break; ++ } ++ break; ++ ++ case 0x00000008: // CVS2 is open or tied to CCD1/CCD2 and CVS1 is tied to ground. ++ // 2 valid voltage options. ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS1, not valid. ++ printk("mpi: Unknown card plugged into slot\n"); ++ } else {// CCD2 is tied to CVS2. ++ printk("mpi: Detected 3.3 and x.x Cardbus card\n"); ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ } ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ printk("mpi: Detected 3.3 vdc 16-bit PCMCIA card\n"); ++ break; ++ } ++ break; ++ ++ case 0x0000000C: // CVS1 and CVS2 are open or tied to CCD1/CCD2. ++ // 5 valid voltage options. ++ ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ // CCD1 is tied to ground. ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS1. ++ printk("mpi: Detected y.y vdc Cardbus card\n"); ++ } else { // CCD2 is tied to CVS2. ++ printk("mpi: Detected x.x vdc Cardbus card\n"); ++ } ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // CCD2 is tied to ground. ++ ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000001) {// CCD1 is tied to CVS1. ++ printk("mpi: Detected 3.3 vdc Cardbus card\n"); ++ } else { // CCD1 is tied to CVS2. ++ printk("mpi: Detected x.x and y.y Cardbus card\n"); ++ } ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ printk("mpi: Detected 5 vdc 16-bit PCMCIA card\n"); ++ break; ++ } ++ break; ++ ++ default: ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ } ++ } ++ return cardtype; ++} ++ ++/* ++ * mpi_DetectPcCard: Detect the plugged in PC-Card ++ * Return: < 0 => Unknown card detected ++ * 0 => No card detected ++ * 1 => 16-bit card detected ++ * 2 => 32-bit CardBus card detected ++ */ ++static int mpi_DetectPcCard(void) ++{ ++ int cardtype; ++ ++ cardtype = cardtype_vcc_detect(); ++ switch(cardtype) { ++ case MPI_CARDTYPE_PCMCIA: ++ mpi->pcmcia_cntl1 &= ~0x0000e000; // disable enable bits ++ //mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); ++ mpi->pcmcia_cntl1 |= (PCMCIA_ENABLE | PCMCIA_GPIO_ENABLE); ++ mpi_InitPcmciaSpace(); ++ mpi_ResetPcCard(cardtype, FALSE); ++ // Hold card in reset for 10ms ++ mdelay(10); ++ mpi_ResetPcCard(cardtype, TRUE); ++ // Let card come out of reset ++ mdelay(100); ++ break; ++ case MPI_CARDTYPE_CARDBUS: ++ // 8 => CardBus Enable ++ // 1 => PCI Slot Number ++ // C => Float VS1 & VS2 ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & 0xFFFF0000) | ++ CARDBUS_ENABLE | ++ (CARDBUS_SLOT << 8)| ++ VS2_OEN | ++ VS1_OEN; ++ /* access to this memory window will be to/from CardBus */ ++ mpi->l2pmremap1 |= CARDBUS_MEM; ++ ++ // Need to reset the Cardbus Card. There's no CardManager to do this, ++ // and we need to be ready for PCI configuration. ++ mpi_ResetPcCard(cardtype, FALSE); ++ // Hold card in reset for 10ms ++ mdelay(10); ++ mpi_ResetPcCard(cardtype, TRUE); ++ // Let card come out of reset ++ mdelay(100); ++ break; ++ default: ++ break; ++ } ++ return cardtype; ++} ++ ++static int mpi_init(void) ++{ ++ unsigned long data; ++ unsigned int chipid; ++ unsigned int chiprev; ++ unsigned int sdramsize; ++ ++ chipid = (PERF->RevID & 0xFFFF0000) >> 16; ++ chiprev = (PERF->RevID & 0xFF); ++ sdramsize = getMemorySize(); ++ /* ++ * Init the pci interface ++ */ ++ data = GPIO->GPIOMode; // GPIO mode register ++ data |= GROUP2_PCI | GROUP1_MII_PCCARD; // PCI internal arbiter + Cardbus ++ GPIO->GPIOMode = data; // PCI internal arbiter ++ ++ /* ++ * In the BCM6348 CardBus support is defaulted to Slot 0 ++ * because there is no external IDSEL for CardBus. To disable ++ * the CardBus and allow a standard PCI card in Slot 0 ++ * set the cbus_idsel field to 0x1f. ++ */ ++ /* ++ uData = mpi->pcmcia_cntl1; ++ uData |= CARDBUS_IDSEL; ++ mpi->pcmcia_cntl1 = uData; ++ */ ++ // Setup PCI I/O Window range. Give 64K to PCI I/O ++ mpi->l2piorange = ~(BCM_PCI_IO_SIZE_64KB-1); ++ // UBUS to PCI I/O base address ++ mpi->l2piobase = BCM_PCI_IO_BASE & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI I/O Window remap ++ mpi->l2pioremap = (BCM_PCI_IO_BASE | MEM_WINDOW_EN); ++ ++ // enable PCI related GPIO pins and data swap between system and PCI bus ++ mpi->locbuscntrl = (EN_PCI_GPIO | DIR_U2P_NOSWAP); ++ ++ /* Enable 6348 BusMaster and Memory access mode */ ++ data = mpi_GetLocalPciConfigReg(PCI_COMMAND); ++ data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); ++ mpi_SetLocalPciConfigReg(PCI_COMMAND, data); ++ ++ /* Configure two 16 MByte PCI to System memory regions. */ ++ /* These memory regions are used when PCI device is a bus master */ ++ /* Accesses to the SDRAM from PCI bus will be "byte swapped" for this region */ ++ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_3, BCM_HOST_MEM_SPACE1); ++ mpi->sp0remap = 0x0; ++ ++ /* Accesses to the SDRAM from PCI bus will not be "byte swapped" for this region */ ++ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_4, BCM_HOST_MEM_SPACE2); ++ mpi->sp1remap = 0x0; ++ mpi->pcimodesel |= (PCI_BAR2_NOSWAP | 0x40); ++ ++ if ((chipid == 0x6348) && (chiprev == 0xb0)) { ++ mpi->sp0range = ~(sdramsize-1); ++ mpi->sp1range = ~(sdramsize-1); ++ } ++ /* ++ * Change 6348 PCI Cfg Reg. offset 0x40 to PCI memory read retry count infinity ++ * by set 0 in bit 8~15. This resolve read Bcm4306 srom return 0xffff in ++ * first read. ++ */ ++ data = mpi_GetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER); ++ data &= ~BRCM_PCI_CONFIG_TIMER_RETRY_MASK; ++ data |= 0x00000080; ++ mpi_SetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER, data); ++ ++ /* enable pci interrupt */ ++ mpi->locintstat |= (EXT_PCI_INT << 16); ++ ++ mpi_DetectPcCard(); ++ ++ ioport_resource.start = BCM_PCI_IO_BASE; ++ ioport_resource.end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB; ++ ++#if defined(CONFIG_USB) ++ PERF->blkEnables |= USBH_CLK_EN; ++ mdelay(100); ++ *USBH_NON_OHCI = NON_OHCI_BYTE_SWAP; ++#endif ++ ++ return 0; ++} ++#endif ++ ++static int __init brcm63xx_setup(void) ++{ ++ extern int panic_timeout; ++ ++ _machine_restart = brcm_machine_restart; ++ _machine_halt = brcm_machine_halt; ++ pm_power_off = brcm_machine_halt; ++ ++ board_timer_setup = brcm_timer_setup; ++ ++ panic_timeout = 5; ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++ /* mpi initialization */ ++ mpi_init(); ++#endif ++ return 0; ++} ++ ++void plat_setup(void) ++{ ++ brcm63xx_setup(); ++} ++ ++/*************************************************************************** ++ * C++ New and delete operator functions ++ ***************************************************************************/ ++ ++/* void *operator new(unsigned int sz) */ ++void *_Znwj(unsigned int sz) ++{ ++ return( kmalloc(sz, GFP_KERNEL) ); ++} ++ ++/* void *operator new[](unsigned int sz)*/ ++void *_Znaj(unsigned int sz) ++{ ++ return( kmalloc(sz, GFP_KERNEL) ); ++} ++ ++/* placement new operator */ ++/* void *operator new (unsigned int size, void *ptr) */ ++void *ZnwjPv(unsigned int size, void *ptr) ++{ ++ return ptr; ++} ++ ++/* void operator delete(void *m) */ ++void _ZdlPv(void *m) ++{ ++ kfree(m); ++} ++ ++/* void operator delete[](void *m) */ ++void _ZdaPv(void *m) ++{ ++ kfree(m); ++} ++ ++EXPORT_SYMBOL(_Znwj); ++EXPORT_SYMBOL(_Znaj); ++EXPORT_SYMBOL(ZnwjPv); ++EXPORT_SYMBOL(_ZdlPv); ++EXPORT_SYMBOL(_ZdaPv); ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,2 @@ ++#define ADSL_SDRAM_IMAGE_SIZE (384*1024) ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c +--- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,277 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Setup time for Broadcom 963xx MIPS boards ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/kernel_stat.h> ++#include <linux/sched.h> ++#include <linux/spinlock.h> ++#include <linux/interrupt.h> ++#include <linux/module.h> ++#include <linux/time.h> ++#include <linux/timex.h> ++ ++#include <asm/mipsregs.h> ++#include <asm/ptrace.h> ++#include <asm/div64.h> ++#include <asm/time.h> ++ ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++unsigned long r4k_interval; /* Amount to increment compare reg each time */ ++static unsigned long r4k_cur; /* What counter should be at next timer irq */ ++ ++/* Cycle counter value at the previous timer interrupt.. */ ++static unsigned int timerhi = 0, timerlo = 0; ++ ++extern volatile unsigned long wall_jiffies; ++ ++/* Optional board-specific timer routine */ ++void (*board_timer_interrupt)(int irq, void *dev_id, struct pt_regs * regs); ++ ++static inline void ack_r4ktimer(unsigned long newval) ++{ ++ write_c0_compare(newval); ++} ++ ++/* ++ * There are a lot of conceptually broken versions of the MIPS timer interrupt ++ * handler floating around. This one is rather different, but the algorithm ++ * is provably more robust. ++ */ ++static irqreturn_t brcm_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) ++{ ++ unsigned int count; ++ ++ if (r4k_interval == 0) ++ goto null; ++ ++ do { ++ do_timer(regs); ++ ++ if (board_timer_interrupt) ++ board_timer_interrupt(irq, dev_id, regs); ++ ++ r4k_cur += r4k_interval; ++ ack_r4ktimer(r4k_cur); ++ ++ } while (((count = (unsigned long)read_c0_count()) ++ - r4k_cur) < 0x7fffffff); ++ ++ if (!jiffies) { ++ /* ++ * If jiffies has overflowed in this timer_interrupt we must ++ * update the timer[hi]/[lo] to make do_fast_gettimeoffset() ++ * quotient calc still valid. -arca ++ */ ++ timerhi = timerlo = 0; ++ } else { ++ /* ++ * The cycle counter is only 32 bit which is good for about ++ * a minute at current count rates of upto 150MHz or so. ++ */ ++ timerhi += (count < timerlo); /* Wrap around */ ++ timerlo = count; ++ } ++ ++ return IRQ_HANDLED; ++ ++null: ++ ack_r4ktimer(0); ++ return IRQ_NONE; ++} ++ ++static struct irqaction brcm_timer_action = { ++ .handler = brcm_timer_interrupt, ++ .flags = SA_INTERRUPT, ++ .mask = CPU_MASK_NONE, ++ .name = "timer", ++ .next = NULL, ++ .dev_id = brcm_timer_interrupt, ++}; ++ ++ ++void __init brcm_timer_setup(struct irqaction *irq) ++{ ++ r4k_cur = (read_c0_count() + r4k_interval); ++ write_c0_compare(r4k_cur); ++ ++ /* we are using the cpu counter for timer interrupts */ ++ irq->handler = no_action; /* we use our own handler */ ++ setup_irq(MIPS_TIMER_INT, &brcm_timer_action); ++ set_c0_status(IE_IRQ5); ++} ++ ++#if 0 ++/* This is for machines which generate the exact clock. */ ++#define USECS_PER_JIFFY (1000000/HZ) ++#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff) ++ ++static void call_do_div64_32( unsigned long *res, unsigned int high, ++ unsigned int low, unsigned long base ) ++{ ++ do_div64_32(*res, high, low, base); ++} ++ ++/* ++ * FIXME: Does playing with the RP bit in c0_status interfere with this code? ++ */ ++static unsigned long do_fast_gettimeoffset(void) ++{ ++ u32 count; ++ unsigned long res, tmp; ++ ++ /* Last jiffy when do_fast_gettimeoffset() was called. */ ++ static unsigned long last_jiffies=0; ++ unsigned long quotient; ++ ++ /* ++ * Cached "1/(clocks per usec)*2^32" value. ++ * It has to be recalculated once each jiffy. ++ */ ++ static unsigned long cached_quotient=0; ++ ++ tmp = jiffies; ++ ++ quotient = cached_quotient; ++ ++ if (tmp && last_jiffies != tmp) { ++ last_jiffies = tmp; ++#ifdef CONFIG_CPU_MIPS32 ++ if (last_jiffies != 0) { ++ ++ unsigned long r0; ++ /* gcc 3.0.1 gets an internal compiler error if there are two ++ * do_div64_32 inline macros. To work around this problem, ++ * do_div64_32 is called as a function. ++ */ ++ call_do_div64_32(&r0, timerhi, timerlo, tmp); ++ call_do_div64_32("ient, USECS_PER_JIFFY, ++ USECS_PER_JIFFY_FRAC, r0); ++ ++ cached_quotient = quotient; ++ ++ } ++#else ++ __asm__(".set\tnoreorder\n\t" ++ ".set\tnoat\n\t" ++ ".set\tmips3\n\t" ++ "lwu\t%0,%2\n\t" ++ "dsll32\t$1,%1,0\n\t" ++ "or\t$1,$1,%0\n\t" ++ "ddivu\t$0,$1,%3\n\t" ++ "mflo\t$1\n\t" ++ "dsll32\t%0,%4,0\n\t" ++ "nop\n\t" ++ "ddivu\t$0,%0,$1\n\t" ++ "mflo\t%0\n\t" ++ ".set\tmips0\n\t" ++ ".set\tat\n\t" ++ ".set\treorder" ++ :"=&r" (quotient) ++ :"r" (timerhi), ++ "m" (timerlo), ++ "r" (tmp), ++ "r" (USECS_PER_JIFFY) ++ :"$1"); ++ cached_quotient = quotient; ++#endif ++ } ++ ++ /* Get last timer tick in absolute kernel time */ ++ count = read_c0_count(); ++ ++ /* .. relative to previous jiffy (32 bits is enough) */ ++ count -= timerlo; ++ ++ __asm__("multu\t%1,%2\n\t" ++ "mfhi\t%0" ++ :"=r" (res) ++ :"r" (count), ++ "r" (quotient)); ++ ++ /* ++ * Due to possible jiffies inconsistencies, we need to check ++ * the result so that we'll get a timer that is monotonic. ++ */ ++ if (res >= USECS_PER_JIFFY) ++ res = USECS_PER_JIFFY-1; ++ ++ return res; ++} ++ ++void do_gettimeofday(struct timeval *tv) ++{ ++ unsigned int flags; ++ ++ read_lock_irqsave (&xtime_lock, flags); ++ tv->tv_sec = xtime.tv_sec; ++ tv->tv_usec = xtime.tv_nsec/1000; ++ tv->tv_usec += do_fast_gettimeoffset(); ++ ++ /* ++ * xtime is atomically updated in timer_bh. jiffies - wall_jiffies ++ * is nonzero if the timer bottom half hasnt executed yet. ++ */ ++ if (jiffies - wall_jiffies) ++ tv->tv_usec += USECS_PER_JIFFY; ++ ++ read_unlock_irqrestore (&xtime_lock, flags); ++ ++ if (tv->tv_usec >= 1000000) { ++ tv->tv_usec -= 1000000; ++ tv->tv_sec++; ++ } ++} ++ ++EXPORT_SYMBOL(do_gettimeofday); ++ ++int do_settimeofday(struct timespec *tv) ++{ ++ write_lock_irq (&xtime_lock); ++ ++ /* This is revolting. We need to set the xtime.tv_usec correctly. ++ * However, the value in this location is is value at the last tick. ++ * Discover what correction gettimeofday would have done, and then ++ * undo it! ++ */ ++ tv->tv_nsec -= do_fast_gettimeoffset()*NSEC_PER_USEC; ++ ++ if (tv->tv_nsec < 0) { ++ tv->tv_nsec += 1000000*NSEC_PER_USEC; ++ tv->tv_sec--; ++ } ++ ++ xtime.tv_sec = tv->tv_sec; ++ xtime.tv_nsec = tv->tv_nsec; ++ time_adjust = 0; /* stop active adjtime() */ ++ time_status |= STA_UNSYNC; ++ time_maxerror = NTP_PHASE_LIMIT; ++ time_esterror = NTP_PHASE_LIMIT; ++ ++ write_unlock_irq (&xtime_lock); ++} ++ ++EXPORT_SYMBOL(do_settimeofday); ++ ++#endif +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c +--- linux-2.6.16.7/arch/mips/brcm-boards/generic/dbg_io.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,260 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/config.h> ++#include <linux/tty.h> ++#include <linux/major.h> ++#include <linux/init.h> ++#include <linux/console.h> ++#include <linux/fs.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/sched.h> ++ ++#include <bcm_map_part.h> ++ ++#undef PRNT /* define for debug printing */ ++ ++#define UART16550_BAUD_2400 2400 ++#define UART16550_BAUD_4800 4800 ++#define UART16550_BAUD_9600 9600 ++#define UART16550_BAUD_19200 19200 ++#define UART16550_BAUD_38400 38400 ++#define UART16550_BAUD_57600 57600 ++#define UART16550_BAUD_115200 115200 ++ ++#define UART16550_PARITY_NONE 0 ++#define UART16550_PARITY_ODD 0x08 ++#define UART16550_PARITY_EVEN 0x18 ++#define UART16550_PARITY_MARK 0x28 ++#define UART16550_PARITY_SPACE 0x38 ++ ++#define UART16550_DATA_5BIT 0x0 ++#define UART16550_DATA_6BIT 0x1 ++#define UART16550_DATA_7BIT 0x2 ++#define UART16550_DATA_8BIT 0x3 ++ ++#define UART16550_STOP_1BIT 0x0 ++#define UART16550_STOP_2BIT 0x4 ++ ++volatile Uart * stUart = UART_BASE; ++ ++#define WRITE16(addr, value) ((*(volatile UINT16 *)((ULONG)&addr)) = value) ++ ++/* Low level UART routines from promcon.c */ ++extern void prom_putc(char c); ++extern char prom_getc(void); ++extern int prom_getc_nowait(void); ++extern int prom_testc(void); ++ ++extern void set_debug_traps(void); ++extern void breakpoint(void); ++extern void enable_brcm_irq(unsigned int); ++extern void set_async_breakpoint(unsigned int epc); ++ ++#ifdef CONFIG_GDB_CONSOLE ++extern void register_gdb_console(void); ++#endif ++ ++int gdb_initialized = 0; ++ ++#define GDB_BUF_SIZE 512 /* power of 2, please */ ++ ++static char gdb_buf[GDB_BUF_SIZE] ; ++static int gdb_buf_in_inx ; ++static atomic_t gdb_buf_in_cnt ; ++static int gdb_buf_out_inx ; ++ ++void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) ++{ ++ /* Do nothing, assume boot loader has already set up serial port */ ++ printk("debugInit called\n"); ++} ++ ++/* ++ * Get a char if available, return -1 if nothing available. ++ * Empty the receive buffer first, then look at the interface hardware. ++ */ ++static int read_char(void) ++{ ++ if (atomic_read(&gdb_buf_in_cnt) != 0) /* intr routine has q'd chars */ ++ { ++ int chr ; ++ ++ chr = gdb_buf[gdb_buf_out_inx++] ; ++ gdb_buf_out_inx &= (GDB_BUF_SIZE - 1) ; ++ atomic_dec(&gdb_buf_in_cnt) ; ++ return(chr) ; ++ } ++ return(prom_getc_nowait()) ; /* read from hardware */ ++} /* read_char */ ++ ++/* ++ * This is the receiver interrupt routine for the GDB stub. ++ * It will receive a limited number of characters of input ++ * from the gdb host machine and save them up in a buffer. ++ * ++ * When the gdb stub routine getDebugChar() is called it ++ * draws characters out of the buffer until it is empty and ++ * then reads directly from the serial port. ++ * ++ * We do not attempt to write chars from the interrupt routine ++ * since the stubs do all of that via putDebugChar() which ++ * writes one byte after waiting for the interface to become ++ * ready. ++ * ++ * The debug stubs like to run with interrupts disabled since, ++ * after all, they run as a consequence of a breakpoint in ++ * the kernel. ++ * ++ * Perhaps someone who knows more about the tty driver than I ++ * care to learn can make this work for any low level serial ++ * driver. ++ */ ++static void gdb_interrupt(int irq, void *dev_id, struct pt_regs * regs) ++{ ++ int chr ; ++ int more; ++ do ++ { ++ chr = prom_getc_nowait() ; ++ more = prom_testc(); ++ if (chr < 0) continue ; ++ ++ /* If we receive a Ctrl-C then this is GDB trying to break in */ ++ if (chr == 3) ++ { ++ /* Replace current instruction with breakpoint */ ++ set_async_breakpoint(regs->cp0_epc); ++ //breakpoint(); ++ } ++ ++#ifdef PRNT ++ printk("gdb_interrupt: chr=%02x '%c', more = %x\n", ++ chr, chr > ' ' && chr < 0x7F ? chr : ' ', more) ; ++#endif ++ ++ if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) ++ { /* buffer overflow, clear it */ ++ gdb_buf_in_inx = 0 ; ++ atomic_set(&gdb_buf_in_cnt, 0) ; ++ gdb_buf_out_inx = 0 ; ++ break ; ++ } ++ ++ gdb_buf[gdb_buf_in_inx++] = chr ; ++ gdb_buf_in_inx &= (GDB_BUF_SIZE - 1) ; ++ atomic_inc(&gdb_buf_in_cnt) ; ++ } ++ while (more !=0); ++ ++} /* gdb_interrupt */ ++ ++/* ++ * getDebugChar ++ * ++ * This is a GDB stub routine. It waits for a character from the ++ * serial interface and then returns it. If there is no serial ++ * interface connection then it returns a bogus value which will ++ * almost certainly cause the system to hang. ++ */ ++int getDebugChar(void) ++{ ++ volatile int chr ; ++ ++#ifdef PRNT ++ printk("getDebugChar: ") ; ++#endif ++ ++ while ( (chr = read_char()) < 0 ) ; ++ ++#ifdef PRNT ++ printk("%c\n", chr > ' ' && chr < 0x7F ? chr : ' ') ; ++#endif ++ return(chr) ; ++ ++} /* getDebugChar */ ++ ++/* ++ * putDebugChar ++ * ++ * This is a GDB stub routine. It waits until the interface is ready ++ * to transmit a char and then sends it. If there is no serial ++ * interface connection then it simply returns to its caller, having ++ * pretended to send the char. ++ */ ++int putDebugChar(unsigned char chr) ++{ ++#ifdef PRNT ++ printk("putDebugChar: chr=%02x '%c'\n", chr, ++ chr > ' ' && chr < 0x7F ? chr : ' ') ; ++#endif ++ ++ prom_putc(chr) ; /* this routine will wait */ ++ return 1; ++ ++} /* putDebugChar */ ++ ++/* Just a NULL routine for testing. */ ++void gdb_null(void) ++{ ++} ++ ++void rs_kgdb_hook(int tty_no) ++{ ++ printk("rs_kgdb_hook: tty %d\n", tty_no); ++ ++ /* Call GDB routine to setup the exception vectors for the debugger */ ++ set_debug_traps(); ++ ++ printk("Breaking into debugger...\n"); ++ breakpoint(); ++ gdb_null() ; ++ printk("Connected.\n"); ++ ++ gdb_initialized = 1; ++ ++#ifdef CONFIG_GDB_CONSOLE ++ register_gdb_console(); ++#endif ++} ++ ++void kgdb_hook_irq() ++{ ++ int retval ; ++ uint16 uMask; ++ ++ printk("GDB: Hooking UART interrupt\n"); ++ ++ retval = request_irq(INTERRUPT_ID_UART, ++ gdb_interrupt, ++ SA_INTERRUPT, ++ "GDB-stub", NULL); ++ ++ if (retval != 0) ++ printk("gdb_hook: request_irq(irq=%d) failed: %d\n", INTERRUPT_ID_UART, retval); ++ ++ // Enable UART config Rx not empty IRQ ++ uMask = READ16(stUart->intMask) ; ++ // printk("intMask: 0x%x\n", uMask); ++ WRITE16(stUart->intMask, uMask | RXFIFONE); ++} ++ ++ +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S +--- linux-2.6.16.7/arch/mips/brcm-boards/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Generic interrupt handler for Broadcom MIPS boards ++ */ ++ ++#include <linux/config.h> ++ ++#include <asm/asm.h> ++#include <asm/mipsregs.h> ++#include <asm/regdef.h> ++#include <asm/stackframe.h> ++ ++/* ++ * MIPS IRQ Source ++ * -------- ------ ++ * 0 Software (ignored) ++ * 1 Software (ignored) ++ * 2 Combined hardware interrupt (hw0) ++ * 3 Hardware ++ * 4 Hardware ++ * 5 Hardware ++ * 6 Hardware ++ * 7 R4k timer ++ */ ++ ++ .text ++ .set noreorder ++ .set noat ++ .align 5 ++ NESTED(brcmIRQ, PT_SIZE, sp) ++ SAVE_ALL ++ CLI ++ .set noreorder ++ .set at ++ ++ jal brcm_irq_dispatch ++ move a0, sp ++ ++ j ret_from_irq ++ nop ++ ++ END(brcmIRQ) +diff -urN linux-2.6.16.7/arch/mips/brcm-boards/generic/Makefile linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/Makefile +--- linux-2.6.16.7/arch/mips/brcm-boards/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/Makefile 2006-07-07 22:15:18.000000000 +0200 +@@ -0,0 +1,11 @@ ++# ++# Makefile for generic Broadcom MIPS boards ++# ++# Copyright (C) 2001 Broadcom Corporation ++# ++obj-y := int-handler.o ++ ++ifdef CONFIG_REMOTE_DEBUG ++obj-y += dbg_io.o ++endif ++ diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/002-pci_bcm96348.patch b/openwrt/target/linux/brcm63xx-2.6/patches/002-pci_bcm96348.patch new file mode 100644 index 00000000000..7d0936cb837 --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/002-pci_bcm96348.patch @@ -0,0 +1,438 @@ +diff -Naurp linux-2.6.16.7-generic-patched/arch/mips/pci/Makefile linux-2.6.16.7-patched/arch/mips/pci/Makefile +--- linux-2.6.16.7-generic-patched/arch/mips/pci/Makefile 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/arch/mips/pci/Makefile 2006-07-05 15:21:58.000000000 +0200 +@@ -18,6 +18,7 @@ obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o + obj-$(CONFIG_MIPS_TX3927) += ops-tx3927.o + obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o + obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o ++obj-$(CONFIG_BCM_PCI) += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o + + # + # These are still pretty much in the old state, watch, go blind. +diff -Naurp linux-2.6.16.7-generic-patched/arch/mips/pci/fixup-bcm96348.c linux-2.6.16.7-patched/arch/mips/pci/fixup-bcm96348.c +--- linux-2.6.16.7-generic-patched/arch/mips/pci/fixup-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/arch/mips/pci/fixup-bcm96348.c 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,85 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/init.h> ++#include <linux/types.h> ++#include <linux/pci.h> ++ ++#include <bcmpci.h> ++#include <bcm_intr.h> ++#include <bcm_map_part.h> ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++ ++static char irq_tab_bcm96348[] __initdata = { ++ [0] = INTERRUPT_ID_MPI, ++ [1] = INTERRUPT_ID_MPI, ++#if defined(CONFIG_USB) ++ [USB_HOST_SLOT] = INTERRUPT_ID_USBH ++#endif ++}; ++ ++int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ++{ ++ return irq_tab_bcm96348[slot]; ++} ++ ++static void bcm96348_fixup(struct pci_dev *dev) ++{ ++ uint32 memaddr; ++ uint32 size; ++ ++ memaddr = pci_resource_start(dev, 0); ++ size = pci_resource_len(dev, 0); ++ ++ switch (PCI_SLOT(dev->devfn)) { ++ case 0: ++ // UBUS to PCI address range ++ // Memory Window 1. Mask determines which bits are decoded. ++ mpi->l2pmrange1 = ~(size-1); ++ // UBUS to PCI Memory base address. This is akin to the ChipSelect base ++ // register. ++ mpi->l2pmbase1 = memaddr & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI Remap Address. Replaces the masked address bits in the ++ // range register with this setting. ++ // Also, enable direct I/O and direct Memory accesses ++ mpi->l2pmremap1 = (memaddr | MEM_WINDOW_EN); ++ break; ++ ++ case 1: ++ // Memory Window 2 ++ mpi->l2pmrange2 = ~(size-1); ++ // UBUS to PCI Memory base address. ++ mpi->l2pmbase2 = memaddr & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI Remap Address ++ mpi->l2pmremap2 = (memaddr | MEM_WINDOW_EN); ++ break; ++ ++#if defined(CONFIG_USB) ++ case USB_HOST_SLOT: ++ dev->resource[0].start = USB_HOST_BASE; ++ dev->resource[0].end = USB_HOST_BASE+USB_BAR0_MEM_SIZE-1; ++ break; ++#endif ++ } ++} ++ ++struct pci_fixup pcibios_fixups[] = { ++ { PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, bcm96348_fixup }, ++ {0} ++}; +diff -Naurp linux-2.6.16.7-generic-patched/arch/mips/pci/ops-bcm96348.c linux-2.6.16.7-patched/arch/mips/pci/ops-bcm96348.c +--- linux-2.6.16.7-generic-patched/arch/mips/pci/ops-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/arch/mips/pci/ops-bcm96348.c 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,276 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <asm/addrspace.h> ++ ++#include <bcm_intr.h> ++#include <bcm_map_part.h> ++#include <bcmpci.h> ++ ++#include <linux/delay.h> ++ ++#if defined(CONFIG_USB) ++#if 0 ++#define DPRINT(x...) printk(x) ++#else ++#define DPRINT(x...) ++#endif ++ ++static int ++pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size); ++static int ++pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size); ++ ++static bool usb_mem_size_rd = FALSE; ++static uint32 usb_mem_base = 0; ++static uint32 usb_cfg_space_cmd_reg = 0; ++#endif ++static bool pci_mem_size_rd = FALSE; ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++ ++static void mpi_SetupPciConfigAccess(uint32 addr) ++{ ++ mpi->l2pcfgctl = (DIR_CFG_SEL | DIR_CFG_USEREG | addr) & ~CONFIG_TYPE; ++} ++ ++static void mpi_ClearPciConfigAccess(void) ++{ ++ mpi->l2pcfgctl = 0x00000000; ++} ++ ++#if defined(CONFIG_USB) ++/* -------------------------------------------------------------------------- ++ Name: pci63xx_int_write ++Abstract: PCI Config write on internal device(s) ++ -------------------------------------------------------------------------- */ ++static int ++pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size) ++{ ++ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { ++ return PCIBIOS_SUCCESSFUL; ++ } ++ ++ switch (size) { ++ case 1: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %02X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 2: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %04X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ switch (where) { ++ case PCI_COMMAND: ++ usb_cfg_space_cmd_reg = *value; ++ break; ++ default: ++ break; ++ } ++ break; ++ case 4: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %08lX\n", ++ PCI_SLOT(devfn), where, size, *value); ++ switch (where) { ++ case PCI_BASE_ADDRESS_0: ++ if (*value == 0xffffffff) { ++ usb_mem_size_rd = TRUE; ++ } else { ++ usb_mem_base = *value; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: pci63xx_int_read ++Abstract: PCI Config read on internal device(s) ++ -------------------------------------------------------------------------- */ ++static int ++pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size) ++{ ++ uint32 retValue = 0xFFFFFFFF; ++ ++ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { ++ return PCIBIOS_SUCCESSFUL; ++ } ++ ++ // For now, this is specific to the USB Host controller. We can ++ // make it more general if we have to... ++ // Emulate PCI Config accesses ++ switch (where) { ++ case PCI_VENDOR_ID: ++ case PCI_DEVICE_ID: ++ retValue = PCI_VENDOR_ID_BROADCOM | 0x63000000; ++ break; ++ case PCI_COMMAND: ++ case PCI_STATUS: ++ retValue = (0x0006 << 16) | usb_cfg_space_cmd_reg; ++ break; ++ case PCI_CLASS_REVISION: ++ case PCI_CLASS_DEVICE: ++ retValue = (PCI_CLASS_SERIAL_USB << 16) | (0x10 << 8) | 0x01; ++ break; ++ case PCI_BASE_ADDRESS_0: ++ if (usb_mem_size_rd) { ++ retValue = USB_BAR0_MEM_SIZE; ++ } else { ++ if (usb_mem_base != 0) ++ retValue = usb_mem_base; ++ else ++ retValue = USB_HOST_BASE; ++ } ++ usb_mem_size_rd = FALSE; ++ break; ++ case PCI_CACHE_LINE_SIZE: ++ case PCI_LATENCY_TIMER: ++ retValue = 0; ++ break; ++ case PCI_HEADER_TYPE: ++ retValue = PCI_HEADER_TYPE_NORMAL; ++ break; ++ case PCI_SUBSYSTEM_VENDOR_ID: ++ retValue = PCI_VENDOR_ID_BROADCOM; ++ break; ++ case PCI_SUBSYSTEM_ID: ++ retValue = 0x6300; ++ break; ++ case PCI_INTERRUPT_LINE: ++ retValue = INTERRUPT_ID_USBH; ++ break; ++ default: ++ break; ++ } ++ ++ switch (size) { ++ case 1: ++ *value = (retValue >> ((where & 3) << 3)) & 0xff; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %02X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 2: ++ *value = (retValue >> ((where & 3) << 3)) & 0xffff; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %04X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 4: ++ *value = retValue; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %08lX\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ default: ++ break; ++ } ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++#endif ++ ++static int bcm96348_pcibios_read(struct pci_bus *bus, unsigned int devfn, ++ int where, int size, u32 * val) ++{ ++ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); ++ uint32 data; ++ ++#if defined(CONFIG_USB) ++ if (PCI_SLOT(devfn) == USB_HOST_SLOT) ++ return pci63xx_int_read(devfn, where, val, size); ++#endif ++ ++ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); ++ data = *(uint32 *)ioBase; ++ switch(size) { ++ case 1: ++ *val = (data >> ((where & 3) << 3)) & 0xff; ++ break; ++ case 2: ++ *val = (data >> ((where & 3) << 3)) & 0xffff; ++ break; ++ case 4: ++ *val = data; ++ /* Special case for reading PCI device range */ ++ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { ++ if (pci_mem_size_rd) { ++ /* bcm6348 PCI memory window minimum size is 64K */ ++ *val &= PCI_SIZE_64K; ++ } ++ } ++ break; ++ default: ++ break; ++ } ++ pci_mem_size_rd = FALSE; ++ mpi_ClearPciConfigAccess(); ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++static int bcm96348_pcibios_write(struct pci_bus *bus, unsigned int devfn, ++ int where, int size, u32 val) ++{ ++ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); ++ uint32 data; ++ ++#if defined(CONFIG_USB) ++ if (PCI_SLOT(devfn) == USB_HOST_SLOT) ++ return pci63xx_int_write(devfn, where, &val, size); ++#endif ++ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); ++ data = *(uint32 *)ioBase; ++ switch(size) { ++ case 1: ++ data = (data & ~(0xff << ((where & 3) << 3))) | ++ (val << ((where & 3) << 3)); ++ break; ++ case 2: ++ data = (data & ~(0xffff << ((where & 3) << 3))) | ++ (val << ((where & 3) << 3)); ++ break; ++ case 4: ++ data = val; ++ /* Special case for reading PCI device range */ ++ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { ++ if (val == 0xffffffff) ++ pci_mem_size_rd = TRUE; ++ } ++ break; ++ default: ++ break; ++ } ++ *(uint32 *)ioBase = data; ++ udelay(500); ++ mpi_ClearPciConfigAccess(); ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++struct pci_ops bcm96348_pci_ops = { ++ .read = bcm96348_pcibios_read, ++ .write = bcm96348_pcibios_write ++}; +diff -Naurp linux-2.6.16.7-generic-patched/arch/mips/pci/pci-bcm96348.c linux-2.6.16.7-patched/arch/mips/pci/pci-bcm96348.c +--- linux-2.6.16.7-generic-patched/arch/mips/pci/pci-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/arch/mips/pci/pci-bcm96348.c 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,54 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++ ++#include <asm/pci_channel.h> ++#include <bcmpci.h> ++ ++static struct resource bcm_pci_io_resource = { ++ .name = "bcm96348 pci IO space", ++ .start = BCM_PCI_IO_BASE, ++ .end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB - 1, ++ .flags = IORESOURCE_IO ++}; ++ ++static struct resource bcm_pci_mem_resource = { ++ .name = "bcm96348 pci memory space", ++ .start = BCM_PCI_MEM_BASE, ++ .end = BCM_PCI_MEM_BASE + BCM_PCI_MEM_SIZE_16MB - 1, ++ .flags = IORESOURCE_MEM ++}; ++ ++extern struct pci_ops bcm96348_pci_ops; ++ ++struct pci_controller bcm96348_controller = { ++ .pci_ops = &bcm96348_pci_ops, ++ .io_resource = &bcm_pci_io_resource, ++ .mem_resource = &bcm_pci_mem_resource, ++}; ++ ++static void bcm96348_pci_init(void) ++{ ++ register_pci_controller(&bcm96348_controller); ++} ++ ++arch_initcall(bcm96348_pci_init); diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch b/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch new file mode 100644 index 00000000000..e413acff8a4 --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch @@ -0,0 +1,77 @@ +diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/bootinfo.h linux-2.6.16.7-patched/include/asm-mips/bootinfo.h +--- linux-2.6.16.7-generic-patched/include/asm-mips/bootinfo.h 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/include/asm-mips/bootinfo.h 2006-07-05 15:21:58.000000000 +0200 +@@ -218,6 +218,15 @@ + #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ + #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ + ++/* ++ * Valid machtype for group BRCM ++ */ ++#define MACH_GROUP_BRCM 23 /* Broadcom boards */ ++#define MACH_BCM96338 0 ++#define MACH_BCM96345 1 ++#define MACH_BCM96348 2 ++ ++ + #define CL_SIZE COMMAND_LINE_SIZE + + const char *get_system_type(void); +diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/cpu.h linux-2.6.16.7-patched/include/asm-mips/cpu.h +--- linux-2.6.16.7-generic-patched/include/asm-mips/cpu.h 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/include/asm-mips/cpu.h 2006-07-05 15:21:58.000000000 +0200 +@@ -102,6 +102,15 @@ + #define PRID_IMP_SR71000 0x0400 + + /* ++ * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM ++ */ ++ ++#define PRID_IMP_BCM6338 0x9000 ++#define PRID_IMP_BCM6345 0x8000 ++#define PRID_IMP_BCM6348 0x9100 ++ ++ ++/* + * Definitions for 7:0 on legacy processors + */ + +@@ -196,7 +205,10 @@ + #define CPU_34K 60 + #define CPU_PR4450 61 + #define CPU_SB1A 62 +-#define CPU_LAST 62 ++#define CPU_BCM6338 63 ++#define CPU_BCM6345 64 ++#define CPU_BCM6348 65 ++#define CPU_LAST 65 + + /* + * ISA Level encodings +diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/mach-generic/param.h linux-2.6.16.7-patched/include/asm-mips/mach-generic/param.h +--- linux-2.6.16.7-generic-patched/include/asm-mips/mach-generic/param.h 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/include/asm-mips/mach-generic/param.h 2006-07-05 15:21:58.000000000 +0200 +@@ -8,6 +8,6 @@ + #ifndef __ASM_MACH_GENERIC_PARAM_H + #define __ASM_MACH_GENERIC_PARAM_H + +-#define HZ 1000 /* Internal kernel timer frequency */ ++#define HZ 200 /* Internal kernel timer frequency */ + + #endif /* __ASM_MACH_GENERIC_PARAM_H */ +diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/module.h linux-2.6.16.7-patched/include/asm-mips/module.h +--- linux-2.6.16.7-generic-patched/include/asm-mips/module.h 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/include/asm-mips/module.h 2006-07-05 15:21:58.000000000 +0200 +@@ -113,6 +113,12 @@ search_module_dbetables(unsigned long ad + #define MODULE_PROC_FAMILY "RM9000 " + #elif defined CONFIG_CPU_SB1 + #define MODULE_PROC_FAMILY "SB1 " ++#elif defined CONFIG_CPU_BCM6338 ++#define MODULE_PROC_FAMILY "BCM6338 " ++#elif defined CONFIG_CPU_BCM6345 ++#define MODULE_PROC_FAMILY "BCM6345 " ++#elif defined CONFIG_CPU_BCM6348 ++#define MODULE_PROC_FAMILY "BCM6348 " + #else + #error MODULE_PROC_FAMILY undefined for your processor configuration + #endif diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/011-include_mach_bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/011-include_mach_bcm963xx.patch new file mode 100644 index 00000000000..ad0cbbba56a --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/011-include_mach_bcm963xx.patch @@ -0,0 +1,40 @@ +diff -Naurp linux-2.6.16.7-generic-patched/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h linux-2.6.16.7-patched/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h +--- linux-2.6.16.7-generic-patched/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,36 @@ ++#ifndef __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H ++#define __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H ++ ++#define cpu_has_tlb 1 ++#define cpu_has_4kex 4 ++#define cpu_has_4ktlb 8 ++#define cpu_has_fpu 0 ++#define cpu_has_32fpr 0 ++#define cpu_has_counter 0x40 ++#define cpu_has_watch 0 ++#define cpu_has_mips16 0 ++#define cpu_has_divec 0x200 ++#define cpu_has_vce 0 ++#define cpu_has_cache_cdex_p 0 ++#define cpu_has_cache_cdex_s 0 ++#define cpu_has_prefetch 0x40000 ++#define cpu_has_mcheck 0x2000 ++#define cpu_has_ejtag 0x4000 ++#define cpu_has_llsc 0x10000 ++#define cpu_has_vtag_icache 0 ++#define cpu_has_dc_aliases 0 ++#define cpu_has_ic_fills_f_dc 0 ++ ++#define cpu_has_nofpuex 0 ++#define cpu_has_64bits 0 ++#define cpu_has_64bit_zero_reg 0 ++#define cpu_has_64bit_gp_regs 0 ++#define cpu_has_64bit_addresses 0 ++ ++#define cpu_has_subset_pcaches 0 ++ ++#define cpu_dcache_line_size() 16 ++#define cpu_icache_line_size() 16 ++#define cpu_scache_line_size() 0 ++ ++#endif /* __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H */ diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch b/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch new file mode 100644 index 00000000000..a3882ff131b --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch @@ -0,0 +1,3249 @@ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/Makefile linux-2.6.16.7-patched/bcmdrivers/opensource/Makefile +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/Makefile 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,20 @@ ++# File: modules/drivers/Makefile ++# ++# Makefile for the GPLed Linux kernel modules. ++# ++ ++LN_NAME=bcm9$(BRCM_CHIP) ++LN_DRIVER_DIRS = ++ ++-include $(KERNEL_DIR)/.config ++ ++ifneq ($(CONFIG_BCM_SERIAL),) ++ LN_DRIVER_DIRS +=ln -sn impl$(CONFIG_BCM_SERIAL_IMPL) char/serial/$(LN_NAME); ++endif ++ ++obj-$(CONFIG_BCM_SERIAL) += char/serial/impl$(CONFIG_BCM_SERIAL_IMPL)/ ++ ++ ++symlinks: ++ find . -lname "*" -name "$(LN_NAME)" -print -exec rm -f "{}" ";" ++ $(CONFIG_SHELL) -c "$(LN_DRIVER_DIRS)" +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/impl1/Makefile linux-2.6.16.7-patched/bcmdrivers/opensource/char/serial/impl1/Makefile +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,13 @@ ++# File: bcmdrivers/opensource/char/serial ++# ++# Makefile for the BCM63xx serial/console driver ++ ++obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o ++ ++EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++ ++-include $(TOPDIR)/Rules.make ++ ++clean: ++ rm -f core *.o *.a *.s ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux-2.6.16.7-patched/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,1038 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++/* Description: Serial port driver for the BCM963XX. */ ++ ++#define CARDNAME "bcm963xx_serial driver" ++#define VERSION "2.0" ++#define VER_STR CARDNAME " v" VERSION "\n" ++ ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/slab.h> ++#include <linux/interrupt.h> ++ ++/* for definition of struct console */ ++#include <linux/console.h> ++#include <linux/tty.h> ++#include <linux/tty_flip.h> ++#include <linux/serial.h> ++#include <asm/uaccess.h> ++ ++#include <bcmtypes.h> ++#include <board.h> ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++extern void _putc(char); ++extern void _puts(const char *); ++ ++typedef struct bcm_serial { ++ volatile Uart * port; ++ int type; ++ int flags; ++ int irq; ++ int baud_base; ++ int blocked_open; ++ unsigned short close_delay; ++ unsigned short closing_wait; ++ unsigned short line; /* port/line number */ ++ unsigned short cflags; /* line configuration flag */ ++ unsigned short x_char; /* xon/xoff character */ ++ unsigned short read_status_mask; /* mask for read condition */ ++ unsigned short ignore_status_mask; /* mask for ignore condition */ ++ unsigned long event; /* mask used in BH */ ++ int xmit_head; /* Position of the head */ ++ int xmit_tail; /* Position of the tail */ ++ int xmit_cnt; /* Count of the chars in the buffer */ ++ int count; /* indicates how many times it has been opened */ ++ int magic; ++ ++ struct async_icount icount; /* keep track of things ... */ ++ struct tty_struct *tty; /* tty associated */ ++ struct termios normal_termios; ++ ++ wait_queue_head_t open_wait; ++ wait_queue_head_t close_wait; ++ ++ long session; /* Session of opening process */ ++ long pgrp; /* pgrp of opening process */ ++ ++ unsigned char is_initialized; ++} Context; ++ ++ ++/*---------------------------------------------------------------------*/ ++/* Define bits in the Interrupt Enable register */ ++/*---------------------------------------------------------------------*/ ++/* Enable receive interrupt */ ++#define RXINT (RXFIFONE|RXOVFERR) ++ ++/* Enable transmit interrupt */ ++#define TXINT (TXFIFOEMT|TXUNDERR|TXOVFERR) ++ ++/* Enable receiver line status interrupt */ ++#define LSINT (RXBRK|RXPARERR|RXFRAMERR) ++ ++#define BCM_NUM_UARTS 1 ++ ++#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) ++ ++ ++static struct bcm_serial multi[BCM_NUM_UARTS]; ++static struct bcm_serial *lines[BCM_NUM_UARTS]; ++static struct tty_driver serial_driver; ++static struct tty_struct *serial_table[BCM_NUM_UARTS]; ++static struct termios *serial_termios[BCM_NUM_UARTS]; ++static struct termios *serial_termios_locked[BCM_NUM_UARTS]; ++static int serial_refcount; ++ ++ ++static void bcm_stop (struct tty_struct *tty); ++static void bcm_start (struct tty_struct *tty); ++static inline void receive_chars (struct bcm_serial * info); ++static int startup (struct bcm_serial *info); ++static void shutdown (struct bcm_serial * info); ++static void change_speed( volatile Uart *pUart, tcflag_t cFlag ); ++static void bcm63xx_cons_flush_chars (struct tty_struct *tty); ++static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++ const unsigned char *buf, int count); ++static int bcm63xx_cons_write_room (struct tty_struct *tty); ++static int bcm_chars_in_buffer (struct tty_struct *tty); ++static void bcm_flush_buffer (struct tty_struct *tty); ++static void bcm_throttle (struct tty_struct *tty); ++static void bcm_unthrottle (struct tty_struct *tty); ++static void bcm_send_xchar (struct tty_struct *tty, char ch); ++static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo); ++static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info); ++static int get_lsr_info (struct bcm_serial *info, unsigned int *value); ++static void send_break (struct bcm_serial *info, int duration); ++static int bcm_ioctl (struct tty_struct * tty, struct file * file, ++ unsigned int cmd, unsigned long arg); ++static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios); ++static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp); ++static void bcm_hangup (struct tty_struct *tty); ++static int block_til_ready (struct tty_struct *tty, struct file *filp, struct bcm_serial *info); ++static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp); ++static int __init bcm63xx_serialinit(void); ++ ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_stop () and rs_start () ++ * ++ * These routines are called before setting or resetting ++ * tty->stopped. They enable or disable transmitter interrupts, ++ * as necessary. ++ * ------------------------------------------------------------ ++ */ ++static void bcm_stop (struct tty_struct *tty) ++{ ++} ++ ++static void bcm_start (struct tty_struct *tty) ++{ ++ _puts(CARDNAME " Start\n"); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * receive_char () ++ * ++ * This routine deals with inputs from any lines. ++ * ------------------------------------------------------------ ++ */ ++static inline void receive_chars (struct bcm_serial * info) ++{ ++ struct tty_struct *tty = 0; ++ struct async_icount * icount; ++ int ignore = 0; ++ unsigned short status, tmp; ++ UCHAR ch = 0; ++ while ((status = info->port->intStatus) & RXINT) ++ { ++ char flag_char = 0; ++ ++ if (status & RXFIFONE) ++ ch = info->port->Data; // Read the character ++ tty = info->tty; /* now tty points to the proper dev */ ++ icount = &info->icount; ++ if (! tty) ++ break; ++ if (!tty_buffer_request_room(tty, 1)) ++ break; ++ icount->rx++; ++ if (status & RXBRK) ++ { ++ flag_char = TTY_BREAK; ++ icount->brk++; ++ } ++ // keep track of the statistics ++ if (status & (RXFRAMERR | RXPARERR | RXOVFERR)) ++ { ++ if (status & RXPARERR) /* parity error */ ++ icount->parity++; ++ else ++ if (status & RXFRAMERR) /* frame error */ ++ icount->frame++; ++ if (status & RXOVFERR) ++ { ++ // Overflow. Reset the RX FIFO ++ info->port->fifoctl |= RSTRXFIFOS; ++ icount->overrun++; ++ } ++ // check to see if we should ignore the character ++ // and mask off conditions that should be ignored ++ if (status & info->ignore_status_mask) ++ { ++ if (++ignore > 100 ) ++ break; ++ goto ignore_char; ++ } ++ // Mask off the error conditions we want to ignore ++ tmp = status & info->read_status_mask; ++ if (tmp & RXPARERR) ++ { ++ flag_char = TTY_PARITY; ++ } ++ else ++ if (tmp & RXFRAMERR) ++ { ++ flag_char = TTY_FRAME; ++ } ++ if (tmp & RXOVFERR) ++ { ++ tty_insert_flip_char(tty, ch, flag_char); ++ ch = 0; ++ flag_char = TTY_OVERRUN; ++ if (!tty_buffer_request_room(tty, 1)) ++ break; ++ } ++ } ++ tty_insert_flip_char(tty, ch, flag_char); ++ } ++ignore_char: ++ if (tty) ++ tty_flip_buffer_push(tty); ++} ++ ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm_interrupt () ++ * ++ * this is the main interrupt routine for the chip. ++ * It deals with the multiple ports. ++ * ------------------------------------------------------------ ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++static irqreturn_t bcm_interrupt (int irq, void * dev, struct pt_regs * regs) ++#else ++static void bcm_interrupt (int irq, void * dev, struct pt_regs * regs) ++#endif ++{ ++ struct bcm_serial * info = lines[0]; ++ UINT16 intStat; ++ ++ /* get pending interrupt flags from UART */ ++ ++ /* Mask with only the serial interrupts that are enabled */ ++ intStat = info->port->intStatus & info->port->intMask; ++ while (intStat) ++ { ++ if (intStat & RXINT) ++ receive_chars (info); ++ else ++ if (intStat & TXINT) ++ info->port->intStatus = TXINT; ++ else /* don't know what it was, so let's mask it */ ++ info->port->intMask &= ~intStat; ++ ++ intStat = info->port->intStatus & info->port->intMask; ++ } ++ ++ // Clear the interrupt ++ BcmHalInterruptEnable (INTERRUPT_ID_UART); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ return IRQ_HANDLED; ++#endif ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * startup () ++ * ++ * various initialization tasks ++ * ------------------------------------------------------------------- ++ */ ++static int startup (struct bcm_serial *info) ++{ ++ // Port is already started... ++ return 0; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * shutdown () ++ * ++ * This routine will shutdown a serial port; interrupts are disabled, and ++ * DTR is dropped if the hangup on close termio flag is on. ++ * ------------------------------------------------------------------- ++ */ ++static void shutdown (struct bcm_serial * info) ++{ ++ unsigned long flags; ++ if (!info->is_initialized) ++ return; ++ ++ save_flags (flags); ++ cli (); ++ ++ info->port->control &= ~(BRGEN|TXEN|RXEN); ++ if (info->tty) ++ set_bit (TTY_IO_ERROR, &info->tty->flags); ++ info->is_initialized = 0; ++ ++ restore_flags (flags); ++} ++/* ++ * ------------------------------------------------------------------- ++ * change_speed () ++ * ++ * Set the baud rate, character size, parity and stop bits. ++ * ------------------------------------------------------------------- ++ */ ++static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) ++{ ++ unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; ++ save_flags(ulFlags); ++ cli(); ++ switch( cFlag & (CBAUD | CBAUDEX) ) ++ { ++ case B115200: ++ ulBaud = 115200; ++ break; ++ case B57600: ++ ulBaud = 57600; ++ break; ++ case B38400: ++ ulBaud = 38400; ++ break; ++ case B19200: ++ ulBaud = 19200; ++ break; ++ case B9600: ++ ulBaud = 9600; ++ break; ++ case B4800: ++ ulBaud = 4800; ++ break; ++ case B2400: ++ ulBaud = 2400; ++ break; ++ case B1800: ++ ulBaud = 1800; ++ break; ++ case B1200: ++ ulBaud = 1200; ++ break; ++ case B600: ++ ulBaud = 600; ++ break; ++ case B300: ++ ulBaud = 300; ++ break; ++ case B200: ++ ulBaud = 200; ++ break; ++ case B150: ++ ulBaud = 150; ++ break; ++ case B134: ++ ulBaud = 134; ++ break; ++ case B110: ++ ulBaud = 110; ++ break; ++ case B75: ++ ulBaud = 75; ++ break; ++ case B50: ++ ulBaud = 50; ++ break; ++ default: ++ ulBaud = 115200; ++ break; ++ } ++ ++ /* Calculate buad rate. */ ++ ulClockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; ++ ulTmp = (ulClockFreqHz / ulBaud) / 16; ++ if( ulTmp & 0x01 ) ++ ulTmp /= 2; /* Rounding up, so sub is already accounted for */ ++ else ++ ulTmp = (ulTmp / 2) - 1; /* Rounding down so we must sub 1 */ ++ pUart->baudword = ulTmp; ++ ++ /* Set character size, stop bits and parity. */ ++ switch( cFlag & CSIZE ) ++ { ++ case CS5: ++ ulTmp = BITS5SYM; /* select transmit 5 bit data size */ ++ break; ++ case CS6: ++ ulTmp = BITS6SYM; /* select transmit 6 bit data size */ ++ break; ++ case CS7: ++ ulTmp = BITS7SYM; /* select transmit 7 bit data size */ ++ break; ++ /*case CS8:*/ ++ default: ++ ulTmp = BITS8SYM; /* select transmit 8 bit data size */ ++ break; ++ } ++ if( cFlag & CSTOPB ) ++ ulTmp |= TWOSTOP; /* select 2 stop bits */ ++ else ++ ulTmp |= ONESTOP; /* select one stop bit */ ++ ++ /* Write these values into the config reg. */ ++ pUart->config = ulTmp; ++ pUart->control &= ~(RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN); ++ switch( cFlag & (PARENB | PARODD) ) ++ { ++ case PARENB|PARODD: ++ pUart->control |= RXPARITYEN | TXPARITYEN; ++ break; ++ case PARENB: ++ pUart->control |= RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN; ++ break; ++ default: ++ pUart->control |= 0; ++ break; ++ } ++ ++ /* Reset and flush uart */ ++ pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; ++ restore_flags( ulFlags ); ++} ++ ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_flush_char () ++ * ++ * Nothing to flush. Polled I/O is used. ++ * ------------------------------------------------------------------- ++ */ ++static void bcm63xx_cons_flush_chars (struct tty_struct *tty) ++{ ++} ++ ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm63xx_cons_write () ++ * ++ * Main output routine using polled I/O. ++ * ------------------------------------------------------------------- ++ */ ++static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++ const unsigned char *buf, int count) ++{ ++ int c; ++ ++ for (c = 0; c < count; c++) ++ _putc(buf[c]); ++ return count; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm63xx_cons_write_room () ++ * ++ * Compute the amount of space available for writing. ++ * ------------------------------------------------------------------- ++ */ ++static int bcm63xx_cons_write_room (struct tty_struct *tty) ++{ ++ /* Pick a number. Any number. Polled I/O is used. */ ++ return 1024; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_chars_in_buffer () ++ * ++ * compute the amount of char left to be transmitted ++ * ------------------------------------------------------------------- ++ */ ++static int bcm_chars_in_buffer (struct tty_struct *tty) ++{ ++ return 0; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_flush_buffer () ++ * ++ * Empty the output buffer ++ * ------------------------------------------------------------------- ++ */ ++static void bcm_flush_buffer (struct tty_struct *tty) ++{ ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm_throttle () and bcm_unthrottle () ++ * ++ * This routine is called by the upper-layer tty layer to signal that ++ * incoming characters should be throttled (or not). ++ * ------------------------------------------------------------ ++ */ ++static void bcm_throttle (struct tty_struct *tty) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ if (I_IXOFF(tty)) ++ info->x_char = STOP_CHAR(tty); ++} ++ ++static void bcm_unthrottle (struct tty_struct *tty) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ if (I_IXOFF(tty)) ++ { ++ if (info->x_char) ++ info->x_char = 0; ++ else ++ info->x_char = START_CHAR(tty); ++ } ++} ++ ++static void bcm_send_xchar (struct tty_struct *tty, char ch) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ info->x_char = ch; ++ if (ch) ++ bcm_start (info->tty); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_ioctl () and friends ++ * ------------------------------------------------------------ ++ */ ++static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo) ++{ ++ struct serial_struct tmp; ++ ++ if (!retinfo) ++ return -EFAULT; ++ ++ memset (&tmp, 0, sizeof(tmp)); ++ tmp.type = info->type; ++ tmp.line = info->line; ++ tmp.port = (int) info->port; ++ tmp.irq = info->irq; ++ tmp.flags = 0; ++ tmp.baud_base = info->baud_base; ++ tmp.close_delay = info->close_delay; ++ tmp.closing_wait = info->closing_wait; ++ ++ return copy_to_user (retinfo, &tmp, sizeof(*retinfo)); ++} ++ ++static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info) ++{ ++ struct serial_struct new_serial; ++ struct bcm_serial old_info; ++ int retval = 0; ++ ++ if (!new_info) ++ return -EFAULT; ++ ++ copy_from_user (&new_serial, new_info, sizeof(new_serial)); ++ old_info = *info; ++ ++ if (!capable(CAP_SYS_ADMIN)) ++ return -EPERM; ++ ++ ++ if (info->count > 1) ++ return -EBUSY; ++ ++ /* OK, past this point, all the error checking has been done. ++ * At this point, we start making changes..... ++ */ ++ info->baud_base = new_serial.baud_base; ++ info->type = new_serial.type; ++ info->close_delay = new_serial.close_delay; ++ info->closing_wait = new_serial.closing_wait; ++ retval = startup (info); ++ return retval; ++} ++ ++/* ++ * get_lsr_info - get line status register info ++ * ++ * Purpose: Let user call ioctl() to get info when the UART physically ++ * is emptied. On bus types like RS485, the transmitter must ++ * release the bus after transmitting. This must be done when ++ * the transmit shift register is empty, not be done when the ++ * transmit holding register is empty. This functionality ++ * allows an RS485 driver to be written in user space. ++ */ ++static int get_lsr_info (struct bcm_serial *info, unsigned int *value) ++{ ++ return( 0 ); ++} ++ ++/* ++ * This routine sends a break character out the serial port. ++ */ ++static void send_break (struct bcm_serial *info, int duration) ++{ ++ unsigned long flags; ++ ++ if (!info->port) ++ return; ++ ++ current->state = TASK_INTERRUPTIBLE; ++ ++ save_flags (flags); ++ cli(); ++ ++ info->port->control |= XMITBREAK; ++ schedule_timeout(duration); ++ info->port->control &= ~XMITBREAK; ++ ++ restore_flags (flags); ++} ++ ++static int bcm_ioctl (struct tty_struct * tty, struct file * file, ++ unsigned int cmd, unsigned long arg) ++{ ++ int error; ++ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; ++ int retval; ++ ++ if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && ++ (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) && ++ (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) ++ { ++ if (tty->flags & (1 << TTY_IO_ERROR)) ++ return -EIO; ++ } ++ switch (cmd) ++ { ++ ++ case TCSBRK: /* SVID version: non-zero arg --> no break */ ++ retval = tty_check_change (tty); ++ if (retval) ++ return retval; ++ tty_wait_until_sent (tty, 0); ++ if (!arg) ++ send_break (info, HZ/4); /* 1/4 second */ ++ return 0; ++ ++ case TCSBRKP: /* support for POSIX tcsendbreak() */ ++ retval = tty_check_change (tty); ++ if (retval) ++ return retval; ++ tty_wait_until_sent (tty, 0); ++ send_break (info, arg ? arg*(HZ/10) : HZ/4); ++ return 0; ++ ++ case TIOCGSOFTCAR: ++ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(long)); ++ if (!error) ++ return -EFAULT; ++ else ++ { ++ put_user (C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg); ++ return 0; ++ } ++ ++ case TIOCSSOFTCAR: ++ error = get_user (arg, (unsigned long *)arg); ++ if (error) ++ return error; ++ tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); ++ return 0; ++ ++ case TIOCGSERIAL: ++ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(struct serial_struct)); ++ if (!error) ++ return -EFAULT; ++ else ++ return get_serial_info (info, (struct serial_struct *)arg); ++ ++ case TIOCSSERIAL: ++ return set_serial_info (info, (struct serial_struct *) arg); ++ ++ case TIOCSERGETLSR: /* Get line status register */ ++ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(unsigned int)); ++ if (!error) ++ return -EFAULT; ++ else ++ return get_lsr_info (info, (unsigned int *)arg); ++ ++ case TIOCSERGSTRUCT: ++ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(struct bcm_serial)); ++ if (!error) ++ return -EFAULT; ++ else ++ { ++ copy_to_user((struct bcm_serial *)arg, info, sizeof(struct bcm_serial)); ++ return 0; ++ } ++ ++ default: ++ return -ENOIOCTLCMD; ++ } ++ return 0; ++} ++ ++static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ ++ if( tty->termios->c_cflag != old_termios->c_cflag ) ++ change_speed (info->port, tty->termios->c_cflag); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm63xx_cons_close() ++ * ++ * This routine is called when the serial port gets closed. First, we ++ * wait for the last remaining data to be sent. Then, we turn off ++ * the transmit enable and receive enable flags. ++ * ------------------------------------------------------------ ++ */ ++static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp) ++{ ++ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; ++ unsigned long flags; ++ ++ if (!info) ++ return; ++ ++ save_flags (flags); ++ cli(); ++ ++ if (tty_hung_up_p (filp)) ++ { ++ restore_flags (flags); ++ return; ++ } ++ ++ if ((tty->count == 1) && (info->count != 1)) ++ { ++ ++ /* Uh, oh. tty->count is 1, which means that the tty ++ * structure will be freed. Info->count should always ++ * be one in these conditions. If it's greater than ++ * one, we've got real problems, since it means the ++ * serial port won't be shutdown. ++ */ ++ printk("bcm63xx_cons_close: bad serial port count; tty->count is 1, " ++ "info->count is %d\n", info->count); ++ info->count = 1; ++ } ++ ++ if (--info->count < 0) ++ { ++ printk("ds_close: bad serial port count for ttys%d: %d\n", ++ info->line, info->count); ++ info->count = 0; ++ } ++ ++ if (info->count) ++ { ++ restore_flags (flags); ++ return; ++ } ++ ++ /* Now we wait for the transmit buffer to clear; and we notify ++ * the line discipline to only process XON/XOFF characters. ++ */ ++ tty->closing = 1; ++ ++ /* At this point we stop accepting input. To do this, we ++ * disable the receive line status interrupts. ++ */ ++ shutdown (info); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ if (tty->driver->flush_buffer) ++ tty->driver->flush_buffer (tty); ++#else ++ if (tty->driver.flush_buffer) ++ tty->driver.flush_buffer (tty); ++#endif ++ if (tty->ldisc.flush_buffer) ++ tty->ldisc.flush_buffer (tty); ++ ++ tty->closing = 0; ++ info->event = 0; ++ info->tty = 0; ++ if (tty->ldisc.num != tty_ldisc_get(N_TTY)->num) ++ { ++ if (tty->ldisc.close) ++ (tty->ldisc.close)(tty); ++ tty->ldisc = *tty_ldisc_get(N_TTY); ++ tty->termios->c_line = N_TTY; ++ if (tty->ldisc.open) ++ (tty->ldisc.open)(tty); ++ } ++ if (info->blocked_open) ++ { ++ if (info->close_delay) ++ { ++ current->state = TASK_INTERRUPTIBLE; ++ schedule_timeout(info->close_delay); ++ } ++ wake_up_interruptible (&info->open_wait); ++ } ++ wake_up_interruptible (&info->close_wait); ++ ++ restore_flags (flags); ++} ++ ++/* ++ * bcm_hangup () --- called by tty_hangup() when a hangup is signaled. ++ */ ++static void bcm_hangup (struct tty_struct *tty) ++{ ++ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ ++ shutdown (info); ++ info->event = 0; ++ info->count = 0; ++ info->tty = 0; ++ wake_up_interruptible (&info->open_wait); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_open() and friends ++ * ------------------------------------------------------------ ++ */ ++static int block_til_ready (struct tty_struct *tty, struct file *filp, ++ struct bcm_serial *info) ++{ ++ return 0; ++} ++ ++/* ++ * This routine is called whenever a serial port is opened. It ++ * enables interrupts for a serial port. It also performs the ++ * serial-specific initialization for the tty structure. ++ */ ++static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp) ++{ ++ struct bcm_serial *info; ++ int retval, line; ++ ++ // Make sure we're only opening on of the ports we support ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ line = MINOR(tty->driver->cdev.dev) - tty->driver->minor_start; ++#else ++ line = MINOR(tty->device) - tty->driver.minor_start; ++#endif ++ ++ if ((line < 0) || (line >= BCM_NUM_UARTS)) ++ return -ENODEV; ++ ++ info = lines[line]; ++ ++ info->port->intMask = 0; /* Clear any pending interrupts */ ++ info->port->intMask = RXINT; /* Enable RX */ ++ ++ info->count++; ++ tty->driver_data = info; ++ info->tty = tty; ++ BcmHalInterruptEnable (INTERRUPT_ID_UART); ++ ++ // Start up serial port ++ retval = startup (info); ++ if (retval) ++ return retval; ++ ++ retval = block_til_ready (tty, filp, info); ++ if (retval) ++ return retval; ++ ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ info->pgrp = process_group(current); ++ info->session = current->signal->session; ++#else ++ info->session = current->session; ++ info->pgrp = current->pgrp; ++#endif ++ ++ return 0; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: bcm63xx_serialinit ++ Purpose: Initialize our BCM63xx serial driver ++-------------------------------------------------------------------------- */ ++static int __init bcm63xx_serialinit(void) ++{ ++ int i, flags; ++ struct bcm_serial * info; ++ ++ // Print the driver version information ++ printk(VER_STR); ++ ++ memset(&serial_driver, 0, sizeof(struct tty_driver)); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ serial_driver.owner = THIS_MODULE; ++ serial_driver.devfs_name = "tts/"; ++#endif ++ serial_driver.magic = TTY_DRIVER_MAGIC; ++ serial_driver.name = "ttyS"; ++ serial_driver.major = TTY_MAJOR; ++ serial_driver.minor_start = 64; ++ serial_driver.num = BCM_NUM_UARTS; ++ serial_driver.type = TTY_DRIVER_TYPE_SERIAL; ++ serial_driver.subtype = SERIAL_TYPE_NORMAL; ++ serial_driver.init_termios = tty_std_termios; ++ serial_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | CLOCAL; ++ serial_driver.flags = TTY_DRIVER_REAL_RAW; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ serial_driver.refcount = serial_refcount; ++ serial_driver.ttys = serial_table; ++#else ++ serial_driver.refcount = &serial_refcount; ++ serial_driver.table = serial_table; ++#endif ++ ++ serial_driver.termios = serial_termios; ++ serial_driver.termios_locked = serial_termios_locked; ++ serial_driver.open = bcm63xx_cons_open; ++ serial_driver.close = bcm63xx_cons_close; ++ serial_driver.write = bcm63xx_cons_write; ++ serial_driver.flush_chars = bcm63xx_cons_flush_chars; ++ serial_driver.write_room = bcm63xx_cons_write_room; ++ serial_driver.chars_in_buffer = bcm_chars_in_buffer; ++ serial_driver.flush_buffer = bcm_flush_buffer; ++ serial_driver.ioctl = bcm_ioctl; ++ serial_driver.throttle = bcm_throttle; ++ serial_driver.unthrottle = bcm_unthrottle; ++ serial_driver.send_xchar = bcm_send_xchar; ++ serial_driver.set_termios = bcm_set_termios; ++ serial_driver.stop = bcm_stop; ++ serial_driver.start = bcm_start; ++ serial_driver.hangup = bcm_hangup; ++ ++ if (tty_register_driver (&serial_driver)) ++ panic("Couldn't register serial driver\n"); ++ ++ save_flags(flags); cli(); ++ for (i = 0; i < BCM_NUM_UARTS; i++) ++ { ++ info = &multi[i]; ++ lines[i] = info; ++ info->port = (Uart *) ((char *)UART_BASE + (i * 0x20)); ++ info->irq = (2 - i) + 8; ++ info->line = i; ++ info->tty = 0; ++ info->close_delay = 50; ++ info->closing_wait = 3000; ++ info->x_char = 0; ++ info->event = 0; ++ info->count = 0; ++ info->blocked_open = 0; ++ info->normal_termios = serial_driver.init_termios; ++ init_waitqueue_head(&info->open_wait); ++ init_waitqueue_head(&info->close_wait); ++ ++ /* If we are pointing to address zero then punt - not correctly ++ * set up in setup.c to handle this. ++ */ ++ if (! info->port) ++ return 0; ++ BcmHalMapInterrupt(bcm_interrupt, 0, INTERRUPT_ID_UART); ++ } ++ ++ /* order matters here... the trick is that flags ++ * is updated... in request_irq - to immediatedly obliterate ++ * it is unwise. ++ */ ++ restore_flags(flags); ++ return 0; ++} ++ ++module_init(bcm63xx_serialinit); ++ ++/* -------------------------------------------------------------------------- ++ Name: bcm_console_print ++ Purpose: bcm_console_print is registered for printk. ++ The console_lock must be held when we get here. ++-------------------------------------------------------------------------- */ ++static void bcm_console_print (struct console * cons, const char * str, ++ unsigned int count) ++{ ++ unsigned int i; ++ //_puts(str); ++ for(i=0; i<count; i++, str++) ++ { ++ _putc(*str); ++ if (*str == 10) ++ { ++ _putc(13); ++ } ++ } ++} ++ ++static struct tty_driver * bcm_console_device(struct console * c, int *index) ++{ ++ *index = c->index; ++ return &serial_driver; ++} ++ ++static int __init bcm_console_setup(struct console * co, char * options) ++{ ++ return 0; ++} ++ ++static struct console bcm_sercons = { ++ .name = "ttyS", ++ .write = bcm_console_print, ++ .device = bcm_console_device, ++ .setup = bcm_console_setup, ++ .flags = CON_PRINTBUFFER, // CON_CONSDEV, CONSOLE_LINE, ++ .index = -1, ++}; ++ ++static int __init bcm63xx_console_init(void) ++{ ++ register_console(&bcm_sercons); ++ return 0; ++} ++ ++console_initcall(bcm63xx_console_init); +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6338_intr.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6338_intr.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,72 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6338_INTR_H ++#define __6338_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++/*=====================================================================*/ ++/* BCM6338 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6338 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 6) ++#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 7) ++#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) ++#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 10) ++#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 11) ++#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 12) ++#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 13) ++#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) ++#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) ++#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) ++#define INTERRUPT_ID_SDIO (INTERNAL_ISR_TABLE_OFFSET + 17) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif /* __BCM6338_H */ ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,341 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6338_MAP_H ++#define __BCM6338_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++ ++#define PERF_BASE 0xfffe0000 ++#define TIMR_BASE 0xfffe0200 ++#define UART_BASE 0xfffe0300 ++#define GPIO_BASE 0xfffe0400 ++#define SPI_BASE 0xfffe0c00 ++ ++typedef struct PerfControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define EMAC_CLK_EN 0x0010 ++#define USBS_CLK_EN 0x0010 ++#define SAR_CLK_EN 0x0020 ++ ++#define SPI_CLK_EN 0x0200 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 5 ++#define EI_CLEAR_SHFT 10 ++#define EI_MASK_SHFT 15 ++#define EI_INSENS_SHFT 20 ++#define EI_LEVEL_SHFT 25 ++ ++ uint32 unused[4]; /* (18) */ ++ uint32 BlockSoftReset; /* (28) */ ++#define BSR_SPI 0x00000001 ++#define BSR_EMAC 0x00000004 ++#define BSR_USBH 0x00000008 ++#define BSR_USBS 0x00000010 ++#define BSR_ADSL 0x00000020 ++#define BSR_DMAMEM 0x00000040 ++#define BSR_SAR 0x00000080 ++#define BSR_ACLC 0x00000100 ++#define BSR_ADSL_MIPS_PLL 0x00000400 ++#define BSR_ALL_BLOCKS \ ++ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ ++ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) ++} PerfControl; ++ ++#define PERF ((volatile PerfControl * const) PERF_BASE) ++ ++ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint32 unused0; ++ uint32 GPIODir; /* bits 7:0 */ ++ uint32 unused1; ++ uint32 GPIOio; /* bits 7:0 */ ++ uint32 LEDCtrl; ++#define LED3_STROBE 0x08000000 ++#define LED2_STROBE 0x04000000 ++#define LED1_STROBE 0x02000000 ++#define LED0_STROBE 0x01000000 ++#define LED_TEST 0x00010000 ++#define LED3_DISABLE_LINK_ACT 0x00008000 ++#define LED2_DISABLE_LINK_ACT 0x00004000 ++#define LED1_DISABLE_LINK_ACT 0x00002000 ++#define LED0_DISABLE_LINK_ACT 0x00001000 ++#define LED_INTERVAL_SET_MASK 0x00000f00 ++#define LED_INTERVAL_SET_320MS 0x00000500 ++#define LED_INTERVAL_SET_160MS 0x00000400 ++#define LED_INTERVAL_SET_80MS 0x00000300 ++#define LED_INTERVAL_SET_40MS 0x00000200 ++#define LED_INTERVAL_SET_20MS 0x00000100 ++#define LED3_ON 0x00000080 ++#define LED2_ON 0x00000040 ++#define LED1_ON 0x00000020 ++#define LED0_ON 0x00000010 ++#define LED3_ENABLE 0x00000008 ++#define LED2_ENABLE 0x00000004 ++#define LED1_ENABLE 0x00000002 ++#define LED0_ENABLE 0x00000001 ++ uint32 SpiSlaveCfg; ++#define SPI_SLAVE_RESET 0x00010000 ++#define SPI_RESTRICT 0x00000400 ++#define SPI_DELAY_DISABLE 0x00000200 ++#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 ++#define SPI_SER_ADDR_CFG_MASK 0x0000000c ++#define SPI_MODE 0x00000001 ++ uint32 vRegConfig; ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++/* Number to mask conversion macro used for GPIODir and GPIOio */ ++#define GPIO_NUM_MAX_BITS_MASK 0x0f ++#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) ++ ++/* ++** Spi Controller ++*/ ++ ++typedef struct SpiControl { ++ uint16 spiCmd; /* (0x0): SPI command */ ++#define SPI_CMD_START_IMMEDIATE 3 ++ ++#define SPI_CMD_COMMAND_SHIFT 0 ++#define SPI_CMD_DEVICE_ID_SHIFT 4 ++#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 ++ ++ byte spiIntStatus; /* (0x2): SPI interrupt status */ ++ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ ++ ++ byte spiIntMask; /* (0x4): SPI interrupt mask */ ++#define SPI_INTR_CMD_DONE 0x01 ++#define SPI_INTR_CLEAR_ALL 0x1f ++ ++ byte spiStatus; /* (0x5): SPI status */ ++ ++ byte spiClkCfg; /* (0x6): SPI clock configuration */ ++ ++ byte spiFillByte; /* (0x7): SPI fill byte */ ++ ++ byte unused0; ++ byte spiMsgTail; /* (0x9): msgtail */ ++ byte unused1; ++ byte spiRxTail; /* (0xB): rxtail */ ++ ++ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ ++ ++ byte spiMsgCtl; /* (0x40) control byte */ ++#define HALF_DUPLEX_W 1 ++#define HALF_DUPLEX_R 2 ++#define SPI_MSG_TYPE_SHIFT 6 ++#define SPI_BYTE_CNT_SHIFT 0 ++ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ ++ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ ++ byte unused3[64]; /* (0xc0 - 0xff) reserved */ ++} SpiControl; ++ ++#define SPI ((volatile SpiControl * const) SPI_BASE) ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct MpiRegisters { ++ EbiChipSelect cs[1]; /* size chip select configuration */ ++} MpiRegisters; ++ ++#define MPI ((volatile MpiRegisters * const) MPI_BASE) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6345_intr.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6345_intr.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,78 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6345_INTR_H ++#define __6345_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++/*=====================================================================*/ ++/* BCM6345 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6345 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++#define DMA_ISR_TABLE_OFFSET (INTERNAL_ISR_TABLE_OFFSET + 13) ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++/* Internal peripheral interrupt IDs */ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 3) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_USB (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_EMAC (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 12) ++ ++/* DMA channel interrupt IDs */ ++#define INTERRUPT_ID_EMAC_RX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_RX_CHAN) ++#define INTERRUPT_ID_EMAC_TX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_TX_CHAN) ++#define INTERRUPT_ID_EBI_RX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_RX_CHAN) ++#define INTERRUPT_ID_EBI_TX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_TX_CHAN) ++#define INTERRUPT_ID_RESERVED_RX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_RX_CHAN) ++#define INTERRUPT_ID_RESERVED_TX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_TX_CHAN) ++#define INTERRUPT_ID_USB_BULK_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_RX_CHAN) ++#define INTERRUPT_ID_USB_BULK_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_TX_CHAN) ++#define INTERRUPT_ID_USB_CNTL_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_RX_CHAN) ++#define INTERRUPT_ID_USB_CNTL_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_TX_CHAN) ++#define INTERRUPT_ID_USB_ISO_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_RX_CHAN) ++#define INTERRUPT_ID_USB_ISO_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_TX_CHAN) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif /* __BCM6345_H */ ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,169 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6345_MAP_H ++#define __BCM6345_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++#include "6345_intr.h" ++ ++typedef struct IntControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define USB_CLK_EN 0x0100 ++#define EMAC_CLK_EN 0x0080 ++#define UART_CLK_EN 0x0008 ++#define CPU_CLK_EN 0x0001 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 4 ++#define EI_CLEAR_SHFT 8 ++#define EI_MASK_SHFT 12 ++#define EI_INSENS_SHFT 16 ++#define EI_LEVEL_SHFT 20 ++} IntControl; ++ ++#define INTC_BASE 0xfffe0000 ++#define PERF ((volatile IntControl * const) INTC_BASE) ++ ++#define TIMR_BASE 0xfffe0200 ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ byte config; ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define XMITBREAK 0x40 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ uint32 baudword; ++ ++ byte txf_levl; ++ byte rxf_levl; ++ byte fifocfg; ++ byte prog_out; ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; ++ byte DeltaIPConfig_Mask; ++ byte DeltaIP_SyncIP; ++ uint16 intMask; ++ uint16 intStatus; ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOEMT 0x0020 ++#define RXOVFERR 0x0080 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART_BASE 0xfffe0300 ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint16 unused0; ++ byte unused1; ++ byte TBusSel; ++ ++ uint16 unused2; ++ uint16 GPIODir; ++ byte unused3; ++ byte Leds; ++ uint16 GPIOio; ++ ++ uint32 UartCtl; ++} GpioControl; ++ ++#define GPIO_BASE 0xfffe0400 ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++#define GPIO_NUM_MAX_BITS_MASK 0x0f ++#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6348_intr.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6348_intr.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,80 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6348_INTR_H ++#define __6348_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++/*=====================================================================*/ ++/* BCM6348 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6348 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 6) ++#define INTERRUPT_ID_EMAC2 (INTERNAL_ISR_TABLE_OFFSET + 7) ++#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) ++#define INTERRUPT_ID_M2M (INTERNAL_ISR_TABLE_OFFSET + 10) ++#define INTERRUPT_ID_ACLC (INTERNAL_ISR_TABLE_OFFSET + 11) ++#define INTERRUPT_ID_USBH (INTERNAL_ISR_TABLE_OFFSET + 12) ++#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 13) ++#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) ++#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) ++#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) ++#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 17) ++#define INTERRUPT_ID_USB_ISO_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 18) ++#define INTERRUPT_ID_USB_ISO_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 19) ++#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 20) ++#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 21) ++#define INTERRUPT_ID_EMAC2_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 22) ++#define INTERRUPT_ID_EMAC2_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 23) ++#define INTERRUPT_ID_MPI (INTERNAL_ISR_TABLE_OFFSET + 24) ++#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 25) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif /* __BCM6348_H */ ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,508 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6348_MAP_H ++#define __BCM6348_MAP_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++#include "bcmtypes.h" ++ ++#define PERF_BASE 0xfffe0000 ++#define TIMR_BASE 0xfffe0200 ++#define UART_BASE 0xfffe0300 ++#define GPIO_BASE 0xfffe0400 ++#define MPI_BASE 0xfffe2000 /* MPI control registers */ ++#define USB_HOST_BASE 0xfffe1b00 /* USB host registers */ ++#define USB_HOST_NON_OHCI 0xfffe1c00 /* USB host non-OHCI registers */ ++ ++typedef struct PerfControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define EMAC_CLK_EN 0x0010 ++#define SAR_CLK_EN 0x0020 ++#define USBS_CLK_EN 0x0040 ++#define USBH_CLK_EN 0x0100 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 5 ++#define EI_CLEAR_SHFT 10 ++#define EI_MASK_SHFT 15 ++#define EI_INSENS_SHFT 20 ++#define EI_LEVEL_SHFT 25 ++ ++ uint32 unused[4]; /* (18) */ ++ uint32 BlockSoftReset; /* (28) */ ++#define BSR_SPI 0x00000001 ++#define BSR_EMAC 0x00000004 ++#define BSR_USBH 0x00000008 ++#define BSR_USBS 0x00000010 ++#define BSR_ADSL 0x00000020 ++#define BSR_DMAMEM 0x00000040 ++#define BSR_SAR 0x00000080 ++#define BSR_ACLC 0x00000100 ++#define BSR_ADSL_MIPS_PLL 0x00000400 ++#define BSR_ALL_BLOCKS \ ++ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ ++ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) ++ uint32 unused2[2]; /* (2c) */ ++ uint32 PllStrap; /* (34) */ ++#define PLL_N1_SHFT 20 ++#define PLL_N1_MASK (7<<PLL_N1_SHFT) ++#define PLL_N2_SHFT 15 ++#define PLL_N2_MASK (0x1f<<PLL_N2_SHFT) ++#define PLL_M1_REF_SHFT 12 ++#define PLL_M1_REF_MASK (7<<PLL_M1_REF_SHFT) ++#define PLL_M2_REF_SHFT 9 ++#define PLL_M2_REF_MASK (7<<PLL_M2_REF_SHFT) ++#define PLL_M1_CPU_SHFT 6 ++#define PLL_M1_CPU_MASK (7<<PLL_M1_CPU_SHFT) ++#define PLL_M1_BUS_SHFT 3 ++#define PLL_M1_BUS_MASK (7<<PLL_M1_BUS_SHFT) ++#define PLL_M2_BUS_SHFT 0 ++#define PLL_M2_BUS_MASK (7<<PLL_M2_BUS_SHFT) ++} PerfControl; ++ ++#define PERF ((volatile PerfControl * const) PERF_BASE) ++ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint32 GPIODir_high; /* bits 36:32 */ ++ uint32 GPIODir; /* bits 31:00 */ ++ uint32 GPIOio_high; /* bits 36:32 */ ++ uint32 GPIOio; /* bits 31:00 */ ++ uint32 LEDCtrl; ++#define LED3_STROBE 0x08000000 ++#define LED2_STROBE 0x04000000 ++#define LED1_STROBE 0x02000000 ++#define LED0_STROBE 0x01000000 ++#define LED_TEST 0x00010000 ++#define LED3_DISABLE_LINK_ACT 0x00008000 ++#define LED2_DISABLE_LINK_ACT 0x00004000 ++#define LED1_DISABLE_LINK_ACT 0x00002000 ++#define LED0_DISABLE_LINK_ACT 0x00001000 ++#define LED_INTERVAL_SET_MASK 0x00000f00 ++#define LED_INTERVAL_SET_320MS 0x00000500 ++#define LED_INTERVAL_SET_160MS 0x00000400 ++#define LED_INTERVAL_SET_80MS 0x00000300 ++#define LED_INTERVAL_SET_40MS 0x00000200 ++#define LED_INTERVAL_SET_20MS 0x00000100 ++#define LED3_ON 0x00000080 ++#define LED2_ON 0x00000040 ++#define LED1_ON 0x00000020 ++#define LED0_ON 0x00000010 ++#define LED3_ENABLE 0x00000008 ++#define LED2_ENABLE 0x00000004 ++#define LED1_ENABLE 0x00000002 ++#define LED0_ENABLE 0x00000001 ++ uint32 SpiSlaveCfg; ++#define SPI_SLAVE_RESET 0x00010000 ++#define SPI_RESTRICT 0x00000400 ++#define SPI_DELAY_DISABLE 0x00000200 ++#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 ++#define SPI_SER_ADDR_CFG_MASK 0x0000000c ++#define SPI_MODE 0x00000001 ++ uint32 GPIOMode; ++#define GROUP4_DIAG 0x00090000 ++#define GROUP4_UTOPIA 0x00080000 ++#define GROUP4_LEGACY_LED 0x00030000 ++#define GROUP4_MII_SNOOP 0x00020000 ++#define GROUP4_EXT_EPHY 0x00010000 ++#define GROUP3_DIAG 0x00009000 ++#define GROUP3_UTOPIA 0x00008000 ++#define GROUP3_EXT_MII 0x00007000 ++#define GROUP2_DIAG 0x00000900 ++#define GROUP2_PCI 0x00000500 ++#define GROUP1_DIAG 0x00000090 ++#define GROUP1_UTOPIA 0x00000080 ++#define GROUP1_SPI_UART 0x00000060 ++#define GROUP1_SPI_MASTER 0x00000060 ++#define GROUP1_MII_PCCARD 0x00000040 ++#define GROUP1_MII_SNOOP 0x00000020 ++#define GROUP1_EXT_EPHY 0x00000010 ++#define GROUP0_DIAG 0x00000009 ++#define GROUP0_EXT_MII 0x00000007 ++ ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++/* Number to mask conversion macro used for GPIODir and GPIOio */ ++#define GPIO_NUM_TOTAL_BITS_MASK 0x3f ++#define GPIO_NUM_MAX_BITS_MASK 0x1f ++#define GPIO_NUM_TO_MASK(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) < 32) ? (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) : (0) ) ++ ++/* Number to mask conversion macro used for GPIODir_high and GPIOio_high */ ++#define GPIO_NUM_MAX_BITS_MASK_HIGH 0x07 ++#define GPIO_NUM_TO_MASK_HIGH(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) >= 32) ? (1 << ((X-32) & GPIO_NUM_MAX_BITS_MASK_HIGH)) : (0) ) ++ ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct MpiRegisters { ++ EbiChipSelect cs[7]; /* size chip select configuration */ ++#define EBI_CS0_BASE 0 ++#define EBI_CS1_BASE 1 ++#define EBI_CS2_BASE 2 ++#define EBI_CS3_BASE 3 ++#define PCMCIA_COMMON_BASE 4 ++#define PCMCIA_ATTRIBUTE_BASE 5 ++#define PCMCIA_IO_BASE 6 ++ uint32 unused0[2]; /* reserved */ ++ uint32 ebi_control; /* ebi control */ ++ uint32 unused1[4]; /* reserved */ ++#define EBI_ACCESS_TIMEOUT 0x000007FF ++ uint32 pcmcia_cntl1; /* pcmcia control 1 */ ++#define PCCARD_CARD_RESET 0x00040000 ++#define CARDBUS_ENABLE 0x00008000 ++#define PCMCIA_ENABLE 0x00004000 ++#define PCMCIA_GPIO_ENABLE 0x00002000 ++#define CARDBUS_IDSEL 0x00001F00 ++#define VS2_OEN 0x00000080 ++#define VS1_OEN 0x00000040 ++#define VS2_OUT 0x00000020 ++#define VS1_OUT 0x00000010 ++#define VS2_IN 0x00000008 ++#define VS1_IN 0x00000004 ++#define CD2_IN 0x00000002 ++#define CD1_IN 0x00000001 ++#define VS_MASK 0x0000000C ++#define CD_MASK 0x00000003 ++ uint32 unused2; /* reserved */ ++ uint32 pcmcia_cntl2; /* pcmcia control 2 */ ++#define PCMCIA_BYTESWAP_DIS 0x00000002 ++#define PCMCIA_HALFWORD_EN 0x00000001 ++#define RW_ACTIVE_CNT_BIT 2 ++#define INACTIVE_CNT_BIT 8 ++#define CE_SETUP_CNT_BIT 16 ++#define CE_HOLD_CNT_BIT 24 ++ uint32 unused3[40]; /* reserved */ ++ ++ uint32 sp0range; /* PCI to internal system bus address space */ ++ uint32 sp0remap; ++ uint32 sp0cfg; ++ uint32 sp1range; ++ uint32 sp1remap; ++ uint32 sp1cfg; ++ ++ uint32 EndianCfg; ++ ++ uint32 l2pcfgctl; /* internal system bus to PCI IO/Cfg control */ ++#define DIR_CFG_SEL 0x80000000 /* change from PCI I/O access to PCI config access */ ++#define DIR_CFG_USEREG 0x40000000 /* use this register info for PCI configuration access */ ++#define DEVICE_NUMBER 0x00007C00 /* device number for the PCI configuration access */ ++#define FUNC_NUMBER 0x00000300 /* function number for the PCI configuration access */ ++#define REG_NUMBER 0x000000FC /* register number for the PCI configuration access */ ++#define CONFIG_TYPE 0x00000003 /* configuration type for the PCI configuration access */ ++ ++ uint32 l2pmrange1; /* internal system bus to PCI memory space */ ++#define PCI_SIZE_64K 0xFFFF0000 ++#define PCI_SIZE_128K 0xFFFE0000 ++#define PCI_SIZE_256K 0xFFFC0000 ++#define PCI_SIZE_512K 0xFFF80000 ++#define PCI_SIZE_1M 0xFFF00000 ++#define PCI_SIZE_2M 0xFFE00000 ++#define PCI_SIZE_4M 0xFFC00000 ++#define PCI_SIZE_8M 0xFF800000 ++#define PCI_SIZE_16M 0xFF000000 ++#define PCI_SIZE_32M 0xFE000000 ++ uint32 l2pmbase1; /* kseg0 or kseg1 address & 0x1FFFFFFF */ ++ uint32 l2pmremap1; ++#define CARDBUS_MEM 0x00000004 ++#define MEM_WINDOW_EN 0x00000001 ++ uint32 l2pmrange2; ++ uint32 l2pmbase2; ++ uint32 l2pmremap2; ++ uint32 l2piorange; /* internal system bus to PCI I/O space */ ++ uint32 l2piobase; ++ uint32 l2pioremap; ++ ++ uint32 pcimodesel; ++#define PCI2_INT_BUS_RD_PREFECH 0x000000F0 ++#define PCI_BAR2_NOSWAP 0x00000002 /* BAR at offset 0x20 */ ++#define PCI_BAR1_NOSWAP 0x00000001 /* BAR at affset 0x1c */ ++ ++ uint32 pciintstat; /* PCI interrupt mask/status */ ++#define MAILBOX1_SENT 0x08 ++#define MAILBOX0_SENT 0x04 ++#define MAILBOX1_MSG_RCV 0x02 ++#define MAILBOX0_MSG_RCV 0x01 ++ uint32 locbuscntrl; /* internal system bus control */ ++#define DIR_U2P_NOSWAP 0x00000002 ++#define EN_PCI_GPIO 0x00000001 ++ uint32 locintstat; /* internal system bus interrupt mask/status */ ++#define CSERR 0x0200 ++#define SERR 0x0100 ++#define EXT_PCI_INT 0x0080 ++#define DIR_FAILED 0x0040 ++#define DIR_COMPLETE 0x0020 ++#define PCI_CFG 0x0010 ++ uint32 unused5[7]; ++ ++ uint32 mailbox0; ++ uint32 mailbox1; ++ ++ uint32 pcicfgcntrl; /* internal system bus PCI configuration control */ ++#define PCI_CFG_REG_WRITE_EN 0x00000080 ++#define PCI_CFG_ADDR 0x0000003C ++ uint32 pcicfgdata; /* internal system bus PCI configuration data */ ++ ++ uint32 locch2ctl; /* PCI to interrnal system bus DMA (downstream) local control */ ++#define MPI_DMA_HALT 0x00000008 /* idle after finish current memory burst */ ++#define MPI_DMA_PKT_HALT 0x00000004 /* idle after an EOP flag is detected */ ++#define MPI_DMA_STALL 0x00000002 /* idle after an EOP flag is detected */ ++#define MPI_DMA_ENABLE 0x00000001 /* set to enable channel */ ++ uint32 locch2intStat; ++#define MPI_DMA_NO_DESC 0x00000004 /* no valid descriptors */ ++#define MPI_DMA_DONE 0x00000002 /* packet xfer complete */ ++#define MPI_DMA_BUFF_DONE 0x00000001 /* buffer done */ ++ uint32 locch2intMask; ++ uint32 unused6; ++ uint32 locch2descaddr; ++ uint32 locch2status1; ++#define LOCAL_DESC_STATE 0xE0000000 ++#define PCI_DESC_STATE 0x1C000000 ++#define BYTE_DONE 0x03FFC000 ++#define RING_ADDR 0x00003FFF ++ uint32 locch2status2; ++#define BUFPTR_OFFSET 0x1FFF0000 ++#define PCI_MASTER_STATE 0x000000C0 ++#define LOC_MASTER_STATE 0x00000038 ++#define CONTROL_STATE 0x00000007 ++ uint32 unused7; ++ ++ uint32 locch1Ctl; /*internal system bus to PCI DMA (upstream) local control */ ++#define DMA_U2P_LE 0x00000200 /* local bus is little endian */ ++#define DMA_U2P_NOSWAP 0x00000100 /* lccal bus is little endian but no data swapped */ ++ uint32 locch1intstat; ++ uint32 locch1intmask; ++ uint32 unused8; ++ uint32 locch1descaddr; ++ uint32 locch1status1; ++ uint32 locch1status2; ++ uint32 unused9; ++ ++ uint32 pcich1ctl; /* internal system bus to PCI DMA PCI control */ ++ uint32 pcich1intstat; ++ uint32 pcich1intmask; ++ uint32 pcich1descaddr; ++ uint32 pcich1status1; ++ uint32 pcich1status2; ++ ++ uint32 pcich2Ctl; /* PCI to internal system bus DMA PCI control */ ++ uint32 pcich2intstat; ++ uint32 pcich2intmask; ++ uint32 pcich2descaddr; ++ uint32 pcich2status1; ++ uint32 pcich2status2; ++ ++ uint32 perm_id; /* permanent device and vendor id */ ++ uint32 perm_rev; /* permanent revision id */ ++} MpiRegisters; ++ ++#define MPI ((volatile MpiRegisters * const) MPI_BASE) ++ ++/* PCI configuration address space start offset 0x40 */ ++#define BRCM_PCI_CONFIG_TIMER 0x40 ++#define BRCM_PCI_CONFIG_TIMER_RETRY_MASK 0x0000FF00 ++#define BRCM_PCI_CONFIG_TIMER_TRDY_MASK 0x000000FF ++ ++/* USB host non-Open HCI register, USB_HOST_NON_OHCI, bit definitions. */ ++#define NON_OHCI_ENABLE_PORT1 0x00000001 /* Use USB port 1 for host, not dev */ ++#define NON_OHCI_BYTE_SWAP 0x00000008 /* Swap USB host registers */ ++ ++#define USBH_NON_OHCI ((volatile unsigned long * const) USB_HOST_NON_OHCI) ++ ++#if __cplusplus ++} ++#endif ++ ++#endif ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmTag.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmTag.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,153 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++//************************************************************************************** ++// File Name : bcmTag.h ++// ++// Description: add tag with validation system to the firmware image file to be uploaded ++// via http ++// ++// Created : 02/28/2002 seanl ++//************************************************************************************** ++ ++#ifndef _BCMTAG_H_ ++#define _BCMTAG_H_ ++ ++ ++#define BCM_SIG_1 "Broadcom Corporation" ++#define BCM_SIG_2 "ver. 2.0" // was "firmware version 2.0" now it is split 6 char out for chip id. ++ ++#define BCM_TAG_VER "6" ++#define BCM_TAG_VER_LAST "26" ++ ++// file tag (head) structure all is in clear text except validationTokens (crc, md5, sha1, etc). Total: 128 unsigned chars ++#define TAG_LEN 256 ++#define TAG_VER_LEN 4 ++#define SIG_LEN 20 ++#define SIG_LEN_2 14 // Original second SIG = 20 is now devided into 14 for SIG_LEN_2 and 6 for CHIP_ID ++#define CHIP_ID_LEN 6 ++#define IMAGE_LEN 10 ++#define ADDRESS_LEN 12 ++#define FLAG_LEN 2 ++#define TOKEN_LEN 20 ++#define BOARD_ID_LEN 16 ++#define RESERVED_LEN (TAG_LEN - TAG_VER_LEN - SIG_LEN - SIG_LEN_2 - CHIP_ID_LEN - BOARD_ID_LEN - \ ++ (4*IMAGE_LEN) - (3*ADDRESS_LEN) - (3*FLAG_LEN) - (2*TOKEN_LEN)) ++ ++ ++// TAG for downloadable image (kernel plus file system) ++typedef struct _FILE_TAG ++{ ++ unsigned char tagVersion[TAG_VER_LEN]; // tag version. Will be 2 here. ++ unsigned char signiture_1[SIG_LEN]; // text line for company info ++ unsigned char signiture_2[SIG_LEN_2]; // additional info (can be version number) ++ unsigned char chipId[CHIP_ID_LEN]; // chip id ++ unsigned char boardId[BOARD_ID_LEN]; // board id ++ unsigned char bigEndian[FLAG_LEN]; // if = 1 - big, = 0 - little endia of the host ++ unsigned char totalImageLen[IMAGE_LEN]; // the sum of all the following length ++ unsigned char cfeAddress[ADDRESS_LEN]; // if non zero, cfe starting address ++ unsigned char cfeLen[IMAGE_LEN]; // if non zero, cfe size in clear ASCII text. ++ unsigned char rootfsAddress[ADDRESS_LEN]; // if non zero, filesystem starting address ++ unsigned char rootfsLen[IMAGE_LEN]; // if non zero, filesystem size in clear ASCII text. ++ unsigned char kernelAddress[ADDRESS_LEN]; // if non zero, kernel starting address ++ unsigned char kernelLen[IMAGE_LEN]; // if non zero, kernel size in clear ASCII text. ++ unsigned char dualImage[FLAG_LEN]; // if 1, dual image ++ unsigned char inactiveLen[FLAG_LEN]; // if 1, the image is INACTIVE; if 0, active ++ unsigned char reserved[RESERVED_LEN]; // reserved for later use ++ unsigned char imageValidationToken[TOKEN_LEN];// image validation token - can be crc, md5, sha; for ++ // now will be 4 unsigned char crc ++ unsigned char tagValidationToken[TOKEN_LEN]; // validation token for tag(from signiture_1 to end of // mageValidationToken) ++} FILE_TAG, *PFILE_TAG; ++ ++#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ ++#define CRC_LEN 4 ++ ++// only included if for bcmTag.exe program ++#ifdef BCMTAG_EXE_USE ++ ++static unsigned long Crc32_table[256] = { ++ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, ++ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, ++ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, ++ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, ++ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, ++ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, ++ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, ++ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, ++ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, ++ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, ++ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, ++ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, ++ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, ++ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, ++ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, ++ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, ++ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, ++ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, ++ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, ++ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, ++ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, ++ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, ++ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, ++ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, ++ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, ++ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, ++ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, ++ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, ++ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, ++ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, ++ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, ++ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, ++ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, ++ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, ++ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, ++ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, ++ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, ++ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, ++ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, ++ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, ++ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, ++ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, ++ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, ++ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, ++ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, ++ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, ++ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, ++ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, ++ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, ++ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, ++ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, ++ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, ++ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, ++ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, ++ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, ++ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, ++ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, ++ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, ++ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, ++ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, ++ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, ++ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, ++ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, ++ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D ++}; ++#endif // BCMTAG_USE ++ ++ ++#endif // _BCMTAG_H_ ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM_INTR_H ++#define __BCM_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_intr.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_intr.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_intr.h> ++#endif ++ ++/* defines */ ++struct pt_regs; ++typedef int (*FN_HANDLER) (int, void *, struct pt_regs *); ++ ++/* prototypes */ ++extern void enable_brcm_irq(unsigned int irq); ++extern void disable_brcm_irq(unsigned int irq); ++extern int request_external_irq(unsigned int irq, ++ FN_HANDLER handler, unsigned long irqflags, ++ const char * devname, void *dev_id); ++extern unsigned int BcmHalMapInterrupt(FN_HANDLER isr, unsigned int param, ++ unsigned int interruptId); ++extern void dump_intr_regs(void); ++ ++/* compatibility definitions */ ++#define BcmHalInterruptEnable(irq) enable_brcm_irq( irq ) ++#define BcmHalInterruptDisable(irq) disable_brcm_irq( irq ) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,34 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM_MAP_PART_H ++#define __BCM_MAP_PART_H ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_map_part.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_map_part.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_map_part.h> ++#endif ++ ++#endif ++ +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmpci.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmpci.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,87 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++// ++// bcmpci.h - bcm96348 PCI, Cardbus, and PCMCIA definition ++// ++#ifndef BCMPCI_H ++#define BCMPCI_H ++ ++/* Memory window in internal system bus address space */ ++#define BCM_PCI_MEM_BASE 0x08000000 ++/* IO window in internal system bus address space */ ++#define BCM_PCI_IO_BASE 0x0C000000 ++ ++#define BCM_PCI_ADDR_MASK 0x1fffffff ++ ++/* Memory window size (range) */ ++#define BCM_PCI_MEM_SIZE_16MB 0x01000000 ++/* IO window size (range) */ ++#define BCM_PCI_IO_SIZE_64KB 0x00010000 ++ ++/* PCI Configuration and I/O space acesss */ ++#define BCM_PCI_CFG(d, f, o) ( (d << 11) | (f << 8) | (o/4 << 2) ) ++ ++/* fake USB PCI slot */ ++#define USB_HOST_SLOT 9 ++#define USB_BAR0_MEM_SIZE 0x0800 ++ ++#define BCM_HOST_MEM_SPACE1 0x10000000 ++#define BCM_HOST_MEM_SPACE2 0x00000000 ++ ++/* ++ * EBI bus clock is 33MHz and share with PCI bus ++ * each clock cycle is 30ns. ++ */ ++/* attribute memory access wait cnt for 4306 */ ++#define PCMCIA_ATTR_CE_HOLD 3 // data hold time 70ns ++#define PCMCIA_ATTR_CE_SETUP 3 // data setup time 50ns ++#define PCMCIA_ATTR_INACTIVE 6 // time between read/write cycles 180ns. For the total cycle time 600ns (cnt1+cnt2+cnt3+cnt4) ++#define PCMCIA_ATTR_ACTIVE 10 // OE/WE pulse width 300ns ++ ++/* common memory access wait cnt for 4306 */ ++#define PCMCIA_MEM_CE_HOLD 1 // data hold time 30ns ++#define PCMCIA_MEM_CE_SETUP 1 // data setup time 30ns ++#define PCMCIA_MEM_INACTIVE 2 // time between read/write cycles 40ns. For the total cycle time 250ns (cnt1+cnt2+cnt3+cnt4) ++#define PCMCIA_MEM_ACTIVE 5 // OE/WE pulse width 150ns ++ ++#define PCCARD_VCC_MASK 0x00070000 // Mask Reset also ++#define PCCARD_VCC_33V 0x00010000 ++#define PCCARD_VCC_50V 0x00020000 ++ ++typedef enum { ++ MPI_CARDTYPE_NONE, // No Card in slot ++ MPI_CARDTYPE_PCMCIA, // 16-bit PCMCIA card in slot ++ MPI_CARDTYPE_CARDBUS, // 32-bit CardBus card in slot ++} CardType; ++ ++#define CARDBUS_SLOT 0 // Slot 0 is default for CardBus ++ ++#define pcmciaAttrOffset 0x00200000 ++#define pcmciaMemOffset 0x00000000 ++// Needs to be right above PCI I/O space. Give 0x8000 (32K) to PCMCIA. ++#define pcmciaIoOffset (BCM_PCI_IO_BASE + 0x80000) ++// Base Address is that mapped into the MPI ChipSelect registers. ++// UBUS bridge MemoryWindow 0 outputs a 0x00 for the base. ++#define pcmciaBase 0xbf000000 ++#define pcmciaAttr (pcmciaAttrOffset | pcmciaBase) ++#define pcmciaMem (pcmciaMemOffset | pcmciaBase) ++#define pcmciaIo (pcmciaIoOffset | pcmciaBase) ++ ++#endif +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,163 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++// ++// bcmtypes.h - misc useful typedefs ++// ++#ifndef BCMTYPES_H ++#define BCMTYPES_H ++ ++// These are also defined in typedefs.h in the application area, so I need to ++// protect against re-definition. ++ ++#ifndef _TYPEDEFS_H_ ++typedef unsigned char uint8; ++typedef unsigned short uint16; ++typedef unsigned long uint32; ++typedef signed char int8; ++typedef signed short int16; ++typedef signed long int32; ++#if !defined(__cplusplus) ++typedef int bool; ++#endif ++#endif ++ ++typedef unsigned char byte; ++// typedef unsigned long sem_t; ++ ++typedef unsigned long HANDLE,*PULONG,DWORD,*PDWORD; ++typedef signed long LONG,*PLONG; ++ ++typedef unsigned int *PUINT; ++typedef signed int INT; ++ ++typedef unsigned short *PUSHORT; ++typedef signed short SHORT,*PSHORT; ++typedef unsigned short WORD,*PWORD; ++ ++typedef unsigned char *PUCHAR; ++typedef signed char *PCHAR; ++ ++typedef void *PVOID; ++ ++typedef unsigned char BOOLEAN, *PBOOL, *PBOOLEAN; ++ ++typedef unsigned char BYTE,*PBYTE; ++ ++//#ifndef __GNUC__ ++//The following has been defined in Vxworks internally: vxTypesOld.h ++//redefine under vxworks will cause error ++typedef signed int *PINT; ++ ++typedef signed char INT8; ++typedef signed short INT16; ++typedef signed long INT32; ++ ++typedef unsigned char UINT8; ++typedef unsigned short UINT16; ++typedef unsigned long UINT32; ++ ++typedef unsigned char UCHAR; ++typedef unsigned short USHORT; ++typedef unsigned int UINT; ++typedef unsigned long ULONG; ++ ++typedef void VOID; ++typedef unsigned char BOOL; ++ ++//#endif /* __GNUC__ */ ++ ++ ++// These are also defined in typedefs.h in the application area, so I need to ++// protect against re-definition. ++#ifndef TYPEDEFS_H ++ ++// Maximum and minimum values for a signed 16 bit integer. ++#define MAX_INT16 32767 ++#define MIN_INT16 -32768 ++ ++// Useful for true/false return values. This uses the ++// Taligent notation (k for constant). ++typedef enum ++{ ++ kFalse = 0, ++ kTrue = 1 ++} Bool; ++ ++#endif ++ ++/* macros to protect against unaligned accesses */ ++ ++#if 0 ++/* first arg is an address, second is a value */ ++#define PUT16( a, d ) { \ ++ *((byte *)a) = (byte)((d)>>8); \ ++ *(((byte *)a)+1) = (byte)(d); \ ++} ++ ++#define PUT32( a, d ) { \ ++ *((byte *)a) = (byte)((d)>>24); \ ++ *(((byte *)a)+1) = (byte)((d)>>16); \ ++ *(((byte *)a)+2) = (byte)((d)>>8); \ ++ *(((byte *)a)+3) = (byte)(d); \ ++} ++ ++/* first arg is an address, returns a value */ ++#define GET16( a ) ( \ ++ (*((byte *)a) << 8) | \ ++ (*(((byte *)a)+1)) \ ++) ++ ++#define GET32( a ) ( \ ++ (*((byte *)a) << 24) | \ ++ (*(((byte *)a)+1) << 16) | \ ++ (*(((byte *)a)+2) << 8) | \ ++ (*(((byte *)a)+3)) \ ++) ++#endif ++ ++#ifndef YES ++#define YES 1 ++#endif ++ ++#ifndef NO ++#define NO 0 ++#endif ++ ++#ifndef IN ++#define IN ++#endif ++ ++#ifndef OUT ++#define OUT ++#endif ++ ++#ifndef TRUE ++#define TRUE 1 ++#endif ++ ++#ifndef FALSE ++#define FALSE 0 ++#endif ++ ++#define READ32(addr) (*(volatile UINT32 *)((ULONG)&addr)) ++#define READ16(addr) (*(volatile UINT16 *)((ULONG)&addr)) ++#define READ8(addr) (*(volatile UINT8 *)((ULONG)&addr)) ++ ++#endif +diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/board.h +--- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/board.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/board.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,374 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: board.h */ ++/* DATE: 97/02/18 */ ++/* PURPOSE: Board specific information. This module should include */ ++/* all base device addresses and board specific macros. */ ++/* */ ++/***********************************************************************/ ++#ifndef _BOARD_H ++#define _BOARD_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++/*****************************************************************************/ ++/* Misc board definitions */ ++/*****************************************************************************/ ++ ++#define DYING_GASP_API ++ ++/*****************************************************************************/ ++/* Physical Memory Map */ ++/*****************************************************************************/ ++ ++#define PHYS_DRAM_BASE 0x00000000 /* Dynamic RAM Base */ ++#define PHYS_FLASH_BASE 0x1FC00000 /* Flash Memory */ ++ ++/*****************************************************************************/ ++/* Note that the addresses above are physical addresses and that programs */ ++/* have to use converted addresses defined below: */ ++/*****************************************************************************/ ++#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ ++#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ ++#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ ++ ++/*****************************************************************************/ ++/* Select the PLL value to get the desired CPU clock frequency. */ ++/* */ ++/* */ ++/*****************************************************************************/ ++#define FPERIPH 50000000 ++ ++#define ONEK 1024 ++#define BLK64K (64*ONEK) ++#define FLASH45_BLKS_BOOT_ROM 1 ++#define FLASH45_LENGTH_BOOT_ROM (FLASH45_BLKS_BOOT_ROM * BLK64K) ++#define FLASH_RESERVED_AT_END (64*ONEK) /*reserved for PSI, scratch pad*/ ++ ++/*****************************************************************************/ ++/* Note that the addresses above are physical addresses and that programs */ ++/* have to use converted addresses defined below: */ ++/*****************************************************************************/ ++#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ ++#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ ++#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ ++ ++/*****************************************************************************/ ++/* Select the PLL value to get the desired CPU clock frequency. */ ++/* */ ++/* */ ++/*****************************************************************************/ ++#define FPERIPH 50000000 ++ ++#define SDRAM_TYPE_ADDRESS_OFFSET 16 ++#define NVRAM_DATA_OFFSET 0x0580 ++#define NVRAM_DATA_ID 0x0f1e2d3c ++#define BOARD_SDRAM_TYPE *(unsigned long *) \ ++ (FLASH_BASE + SDRAM_TYPE_ADDRESS_OFFSET) ++ ++#define ONEK 1024 ++#define BLK64K (64*ONEK) ++ ++// nvram and psi flash definitions for 45 ++#define FLASH45_LENGTH_NVRAM ONEK // 1k nvram ++#define NVRAM_PSI_DEFAULT 24 // default psi in K byes ++ ++/*****************************************************************************/ ++/* NVRAM Offset and definition */ ++/*****************************************************************************/ ++ ++#define NVRAM_VERSION_NUMBER 2 ++#define NVRAM_VERSION_NUMBER_ADDRESS 0 ++ ++#define NVRAM_BOOTLINE_LEN 256 ++#define NVRAM_BOARD_ID_STRING_LEN 16 ++#define NVRAM_MAC_ADDRESS_LEN 6 ++#define NVRAM_MAC_COUNT_MAX 32 ++ ++/*****************************************************************************/ ++/* Misc Offsets */ ++/*****************************************************************************/ ++ ++#define CFE_VERSION_OFFSET 0x0570 ++#define CFE_VERSION_MARK_SIZE 5 ++#define CFE_VERSION_SIZE 5 ++ ++typedef struct ++{ ++ unsigned long ulVersion; ++ char szBootline[NVRAM_BOOTLINE_LEN]; ++ char szBoardId[NVRAM_BOARD_ID_STRING_LEN]; ++ unsigned long ulReserved1[2]; ++ unsigned long ulNumMacAddrs; ++ unsigned char ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ char chReserved[2]; ++ unsigned long ulCheckSum; ++} NVRAM_DATA, *PNVRAM_DATA; ++ ++ ++/*****************************************************************************/ ++/* board ioctl calls for flash, led and some other utilities */ ++/*****************************************************************************/ ++ ++ ++/* Defines. for board driver */ ++#define BOARD_IOCTL_MAGIC 'B' ++#define BOARD_DRV_MAJOR 206 ++ ++#define MAC_ADDRESS_ANY (unsigned long) -1 ++ ++#define BOARD_IOCTL_FLASH_INIT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 0, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_FLASH_WRITE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 1, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_FLASH_READ \ ++ _IOWR(BOARD_IOCTL_MAGIC, 2, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_NR_PAGES \ ++ _IOWR(BOARD_IOCTL_MAGIC, 3, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_DUMP_ADDR \ ++ _IOWR(BOARD_IOCTL_MAGIC, 4, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_MEMORY \ ++ _IOWR(BOARD_IOCTL_MAGIC, 5, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_MIPS_SOFT_RESET \ ++ _IOWR(BOARD_IOCTL_MAGIC, 6, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_LED_CTRL \ ++ _IOWR(BOARD_IOCTL_MAGIC, 7, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_ID \ ++ _IOWR(BOARD_IOCTL_MAGIC, 8, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 9, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_RELEASE_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 10, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_PSI_SIZE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 11, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_SDRAM_SIZE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 12, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_MONITOR_FD \ ++ _IOWR(BOARD_IOCTL_MAGIC, 13, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_WAKEUP_MONITOR_TASK \ ++ _IOWR(BOARD_IOCTL_MAGIC, 14, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_BOOTLINE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 15, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_BOOTLINE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 16, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_BASE_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 17, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_CHIP_ID \ ++ _IOWR(BOARD_IOCTL_MAGIC, 18, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_NUM_ENET \ ++ _IOWR(BOARD_IOCTL_MAGIC, 19, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_CFE_VER \ ++ _IOWR(BOARD_IOCTL_MAGIC, 20, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_ENET_CFG \ ++ _IOWR(BOARD_IOCTL_MAGIC, 21, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_WLAN_ANT_INUSE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 22, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 23, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 24, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_UNSET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 25, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_SES_LED \ ++ _IOWR(BOARD_IOCTL_MAGIC, 26, BOARD_IOCTL_PARMS) ++ ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++#define RESET_BUTTON_UP 1 ++#define RESET_BUTTON_PRESSDOWN 0 ++#define BOARD_IOCTL_GET_RESETHOLD \ ++ _IOWR(BOARD_IOCTL_MAGIC, 27, BOARD_IOCTL_PARMS) ++//>>JUNHON, 2004/09/15 ++ ++// for the action in BOARD_IOCTL_PARMS for flash operation ++typedef enum ++{ ++ PERSISTENT, ++ NVRAM, ++ BCM_IMAGE_CFE, ++ BCM_IMAGE_FS, ++ BCM_IMAGE_KERNEL, ++ BCM_IMAGE_WHOLE, ++ SCRATCH_PAD, ++ FLASH_SIZE, ++} BOARD_IOCTL_ACTION; ++ ++ ++typedef struct boardIoctParms ++{ ++ char *string; ++ char *buf; ++ int strLen; ++ int offset; ++ BOARD_IOCTL_ACTION action; /* flash read/write: nvram, persistent, bcm image */ ++ int result; ++} BOARD_IOCTL_PARMS; ++ ++ ++// LED defines ++typedef enum ++{ ++ kLedAdsl, ++ kLedWireless, ++ kLedUsb, ++ kLedHpna, ++ kLedWanData, ++ kLedPPP, ++ kLedVoip, ++ kLedSes, ++ kLedEnd, // NOTE: Insert the new led name before this one. Alway stay at the end. ++} BOARD_LED_NAME; ++ ++typedef enum ++{ ++ kLedStateOff, /* turn led off */ ++ kLedStateOn, /* turn led on */ ++ kLedStateFail, /* turn led on red */ ++ kLedStateBlinkOnce, /* blink once, ~100ms and ignore the same call during the 100ms period */ ++ kLedStateSlowBlinkContinues, /* slow blink continues at ~600ms interval */ ++ kLedStateFastBlinkContinues, /* fast blink continues at ~200ms interval */ ++} BOARD_LED_STATE; ++ ++ ++// virtual and physical map pair defined in board.c ++typedef struct ledmappair ++{ ++ BOARD_LED_NAME ledName; // virtual led name ++ BOARD_LED_STATE ledInitState; // initial led state when the board boots. ++ unsigned short ledMask; // physical GPIO pin mask ++ unsigned short ledActiveLow; // reset bit to turn on LED ++ unsigned short ledMaskFail; // physical GPIO pin mask for state failure ++ unsigned short ledActiveLowFail;// reset bit to turn on LED ++} LED_MAP_PAIR, *PLED_MAP_PAIR; ++ ++typedef void (*HANDLE_LED_FUNC)(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState); ++ ++/* Flash storage address information that is determined by the flash driver. */ ++typedef struct flashaddrinfo ++{ ++ int flash_persistent_start_blk; ++ int flash_persistent_number_blk; ++ int flash_persistent_length; ++ unsigned long flash_persistent_blk_offset; ++ int flash_scratch_pad_start_blk; // start before psi (SP_BUF_LEN) ++ int flash_scratch_pad_number_blk; ++ int flash_scratch_pad_length; ++ unsigned long flash_scratch_pad_blk_offset; ++ int flash_nvram_start_blk; ++ int flash_nvram_number_blk; ++ int flash_nvram_length; ++ unsigned long flash_nvram_blk_offset; ++} FLASH_ADDR_INFO, *PFLASH_ADDR_INFO; ++ ++// scratch pad defines ++/* SP - Persisten Scratch Pad format: ++ sp header : 32 bytes ++ tokenId-1 : 8 bytes ++ tokenId-1 len : 4 bytes ++ tokenId-1 data ++ .... ++ tokenId-n : 8 bytes ++ tokenId-n len : 4 bytes ++ tokenId-n data ++*/ ++ ++#define MAGIC_NUM_LEN 8 ++#define MAGIC_NUMBER "gOGoBrCm" ++#define TOKEN_NAME_LEN 16 ++#define SP_VERSION 1 ++#define SP_MAX_LEN 8 * 1024 // 8k buf before psi ++#define SP_RESERVERD 16 ++ ++typedef struct _SP_HEADER ++{ ++ char SPMagicNum[MAGIC_NUM_LEN]; // 8 bytes of magic number ++ int SPVersion; // version number ++ int SPUsedLen; // used sp len ++ char SPReserved[SP_RESERVERD]; // reservied, total 32 bytes ++} SP_HEADER, *PSP_HEADER; ++ ++typedef struct _TOKEN_DEF ++{ ++ char tokenName[TOKEN_NAME_LEN]; ++ int tokenLen; ++} SP_TOKEN, *PSP_TOKEN; ++ ++ ++/*****************************************************************************/ ++/* Function Prototypes */ ++/*****************************************************************************/ ++#if !defined(__ASM_ASM_H) ++void dumpaddr( unsigned char *pAddr, int nLen ); ++ ++void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info); ++int kerSysNvRamGet(char *string, int strLen, int offset); ++int kerSysNvRamSet(char *string, int strLen, int offset); ++int kerSysPersistentGet(char *string, int strLen, int offset); ++int kerSysPersistentSet(char *string, int strLen, int offset); ++int kerSysScratchPadGet(char *tokName, char *tokBuf, int tokLen); ++int kerSysScratchPadSet(char *tokName, char *tokBuf, int tokLen); ++int kerSysBcmImageSet( int flash_start_addr, char *string, int size); ++int kerSysGetMacAddress( unsigned char *pucaAddr, unsigned long ulId ); ++int kerSysReleaseMacAddress( unsigned char *pucaAddr ); ++int kerSysGetSdramSize( void ); ++void kerSysGetBootline(char *string, int strLen); ++void kerSysSetBootline(char *string, int strLen); ++void kerSysMipsSoftReset(void); ++void kerSysLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); ++void kerSysLedRegisterHwHandler( BOARD_LED_NAME, HANDLE_LED_FUNC, int ); ++int kerSysFlashSizeGet(void); ++void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context); ++void kerSysDeregisterDyingGaspHandler(char *devname); ++void kerSysWakeupMonitorTask( void ); ++#endif ++ ++#if __cplusplus ++} ++#endif ++ ++#endif /* _BOARD_H */ ++ diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/030-boardparms.patch b/openwrt/target/linux/brcm63xx-2.6/patches/030-boardparms.patch new file mode 100644 index 00000000000..f6ce12ce345 --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/030-boardparms.patch @@ -0,0 +1,3186 @@ +diff -Naurp linux-2.6.16.7-generic-patched/boardparms/bcm963xx/Makefile linux-2.6.16.7-patched/boardparms/bcm963xx/Makefile +--- linux-2.6.16.7-generic-patched/boardparms/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/boardparms/bcm963xx/Makefile 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,16 @@ ++ ++ifeq ($(CONFIG_MIPS_BRCM),y) ++ ++# Linux ++obj-y += boardparms.o ++EXTRA_CFLAGS += -DCONFIG_BCM9$(BRCM_CHIP) ++-include $(TOPDIR)/Rules.make ++ ++else ++ ++# CFE ++BSPOBJS += boardparms.o ++ ++endif ++ ++ +diff -Naurp linux-2.6.16.7-generic-patched/boardparms/bcm963xx/boardparms.c linux-2.6.16.7-patched/boardparms/bcm963xx/boardparms.c +--- linux-2.6.16.7-generic-patched/boardparms/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/boardparms/bcm963xx/boardparms.c 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,2392 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.c ++ * ++ * Description: This file contains the implementation for the BCM63xx board ++ * parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include <linux/config.h> ++#include "boardparms.h" ++ ++/* Defines. */ ++ ++/* Default psi size in K bytes */ ++#define BP_PSI_DEFAULT_SIZE 24 ++ ++/* Typedefs */ ++typedef struct boardparameters ++{ ++ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ ++ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; ++ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; ++ unsigned short usSdramSize; /* SDRAM size and type */ ++ unsigned short usPsiSize; /* persistent storage in K bytes */ ++ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ ++ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ ++ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ ++ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ ++ unsigned short usGpioUartRts; /* GPIO pin or not defined */ ++ unsigned short usGpioUartCts; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ ++ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ ++ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ ++ unsigned short usExtIntrWireless; /* ext intr or not defined */ ++ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ ++ unsigned short usExtIntrHpna; /* ext intr or not defined */ ++ unsigned short usCsHpna; /* chip select not defined */ ++ unsigned short usAntInUseWireless; /* antenna in use or not defined */ ++ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ ++ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ ++ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ ++} BOARD_PARAMETERS, *PBOARD_PARAMETERS; ++ ++/* Variables */ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++static BOARD_PARAMETERS g_bcm96338sv = ++{ ++ "96338SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static BOARD_PARAMETERS g_bcm96338l2m8m = ++{ ++ "96338L-2M-8M", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; ++#endif ++ ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++static BOARD_PARAMETERS g_bcm96345r = ++{ ++ "96345R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw2 = ++{ ++ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold ++ * Reset or RTS. ++ */ ++ "96345GW2", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_GPIO_0_AH, /* usGpioPhySpiSck */ ++ BP_GPIO_4_AH, /* usGpioPhySpiSs */ ++ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ ++ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_GPIO, /* usConfigType */ ++ BP_ENET_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_GPIO_13_AH, /* usGpioUartRts */ ++ BP_GPIO_9_AH, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw = ++{ ++ "96345GW", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_GPIO_10_AH, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_EXT_INTR_3, /* usExtIntrHpna */ ++ BP_CS_1, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96335r = ++{ ++ "96335R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_9_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_8_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_9_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345r0 = ++{ ++ "96345R0", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345rs = ++{ ++ "96345RS", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, ++ &g_bcm96345rs, 0}; ++#endif ++ ++#if defined(_BCM96348_) || defined(CONFIG_BCM96348) ++ ++static BOARD_PARAMETERS g_bcm96348r = ++{ ++ "96348R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348lv = ++{ ++ "96348LV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x02, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_GPIO_5_AL, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw = ++{ ++ "96348GW", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_10 = ++{ ++ "96348GW-10", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw_11 = ++{ ++ "96348GW-11", /* szBoardId */ ++ {{BP_ENET_NO_PHY}, /* ucPhyType */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348sv = ++{ ++ "96348SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x1f, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_dualDsp = ++{ ++ "96348GW-DualDSP", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_UNEQUIPPED, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_DSP, /* ucDspType */ ++ 0x01, /* ucDspAddress */ ++ BP_EXT_INTR_3, /* usExtIntrVoip */ ++ BP_UNEQUIPPED , /* usGpioVoipReset */ ++ BP_GPIO_35_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_3}}, /* usCsVoip */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcmCustom_01 = ++{ ++ "BCMCUST_01", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_36_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AL, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, ++ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, ++ &g_bcmCustom_01, 0}; ++#endif ++ ++static PBOARD_PARAMETERS g_pCurrentBp = 0; ++ ++/************************************************************************** ++ * Name : bpstrcmp ++ * ++ * Description: String compare for this file so it does not depend on an OS. ++ * (Linux kernel and CFE share this source file.) ++ * ++ * Parameters : [IN] dest - destination string ++ * [IN] src - source string ++ * ++ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src ++ ***************************************************************************/ ++static int bpstrcmp(const char *dest,const char *src); ++static int bpstrcmp(const char *dest,const char *src) ++{ ++ while (*src && *dest) ++ { ++ if (*dest < *src) return -1; ++ if (*dest > *src) return 1; ++ dest++; ++ src++; ++ } ++ ++ if (*dest && !*src) return 1; ++ if (!*dest && *src) return -1; ++ return 0; ++} /* bpstrcmp */ ++ ++/************************************************************************** ++ * Name : BpGetVoipDspConfig ++ * ++ * Description: Gets the DSP configuration from the board parameter ++ * structure for a given DSP index. ++ * ++ * Parameters : [IN] dspNum - DSP index (number) ++ * ++ * Returns : Pointer to DSP configuration block if found/valid, NULL ++ * otherwise. ++ ***************************************************************************/ ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) ++{ ++ VOIP_DSP_INFO *pDspConfig = 0; ++ int i; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) ++ { ++ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && ++ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) ++ { ++ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; ++ break; ++ } ++ } ++ } ++ ++ return pDspConfig; ++} ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ) ++{ ++ int nRet = BP_BOARD_ID_NOT_FOUND; ++ PBOARD_PARAMETERS *ppBp; ++ ++ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) ++ { ++ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) ++ { ++ g_pCurrentBp = *ppBp; ++ nRet = BP_SUCCESS; ++ break; ++ } ++ } ++ ++ return( nRet ); ++} /* BpSetBoardId */ ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) ++{ ++ PBOARD_PARAMETERS *ppBp; ++ int i; ++ char *src; ++ char *dest; ++ ++ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; ++ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) ++ { ++ dest = pszBoardIds; ++ src = (*ppBp)->szBoardId; ++ while( *src ) ++ *dest++ = *src++; ++ *dest = '\0'; ++ } ++ ++ return( i ); ++} /* BpGetBoardIds */ ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) ++{ ++ int i, nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ { ++ if( i < BP_MAX_ENET_MACS ) ++ { ++ unsigned char *src = (unsigned char *) ++ &g_pCurrentBp->EnetMacInfos[i]; ++ unsigned char *dest = (unsigned char *) pEnetInfos; ++ int len = sizeof(ETHERNET_MAC_INFO); ++ while( len-- ) ++ *dest++ = *src++; ++ } ++ else ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ } ++ ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetEthernetMacInfo */ ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulSdramSize = g_pCurrentBp->usSdramSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulSdramSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetSdramSize */ ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulPsiSize = g_pCurrentBp->usPsiSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulPsiSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPsiSize */ ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; ++ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; ++ ++ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusInner = *pusOuter = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetRj11InnerOuterPairGpios */ ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; ++ ++ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPressAndHoldResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipReset; ++ ++ if( *pusValue != BP_NOT_DEFINED || ++ *pusValue == BP_UNEQUIPPED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipIntr; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipIntrGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPcmciaReset; ++ ++ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPcmciaResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, board id input string does not ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusRts = g_pCurrentBp->usGpioUartRts; ++ *pusCts = g_pCurrentBp->usGpioUartCts; ++ ++ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusRts = *pusCts = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUartRtsCtsGpios */ ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdsl; ++ ++ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdslFail; ++ ++ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWireless; ++ ++ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usAntInUseWireless; ++ ++ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessAntInUse */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; ++ ++ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessSesBtnGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; ++ ++ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedSesWireless; ++ ++ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedUsb; ++ ++ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUsbLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedHpna; ++ ++ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWanData; ++ ++ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWanDataLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPpp; ++ ++ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPppFail; ++ ++ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; ++ ++ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderPowerOn */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; ++ ++ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderAlarmLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; ++ ++ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderResetCfgLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlStop; ++ ++ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderStopLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ * ++ * Note : The VoIP structure would allow for having one LED per DSP ++ * however, the board initialization function assumes only one ++ * LED per functionality (ie one LED for VoIP). Therefore in ++ * order to keep this tidy and simple we do not make usage of the ++ * one-LED-per-DSP function. Instead, we assume that the LED for ++ * VoIP is unique and associated with DSP 0 (always present on ++ * any VoIP platform). If changing this to a LED-per-DSP function ++ * then one need to update the board initialization driver in ++ * bcmdrivers\opensource\char\board\bcm963xx\impl1 ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioLedVoip; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrWireless; ++ ++ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; ++ ++ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslDyingGaspExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usExtIntrVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrHpna; ++ ++ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usCsHpna; ++ ++ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaChipSelect */ ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usCsVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipChipSelect */ ++ +diff -Naurp linux-2.6.16.7-generic-patched/boardparms/bcm963xx/boardparms.h linux-2.6.16.7-patched/boardparms/bcm963xx/boardparms.h +--- linux-2.6.16.7-generic-patched/boardparms/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-patched/boardparms/bcm963xx/boardparms.h 2006-07-05 15:21:58.000000000 +0200 +@@ -0,0 +1,766 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.h ++ * ++ * Description: This file contains definitions and function prototypes for ++ * the BCM63xx board parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++#if !defined(_BOARDPARMS_H) ++#define _BOARDPARMS_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++/* Return codes. */ ++#define BP_SUCCESS 0 ++#define BP_BOARD_ID_NOT_FOUND 1 ++#define BP_VALUE_NOT_DEFINED 2 ++#define BP_BOARD_ID_NOT_SET 3 ++ ++/* Values for BpGetSdramSize. */ ++#define BP_MEMORY_8MB_1_CHIP 0 ++#define BP_MEMORY_16MB_1_CHIP 1 ++#define BP_MEMORY_32MB_1_CHIP 2 ++#define BP_MEMORY_64MB_2_CHIP 3 ++#define BP_MEMORY_32MB_2_CHIP 4 ++#define BP_MEMORY_16MB_2_CHIP 5 ++ ++/* Values for EthernetMacInfo PhyType. */ ++#define BP_ENET_NO_PHY 0 ++#define BP_ENET_INTERNAL_PHY 1 ++#define BP_ENET_EXTERNAL_PHY 2 ++#define BP_ENET_EXTERNAL_SWITCH 3 ++ ++/* Values for EthernetMacInfo Configuration type. */ ++#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ ++#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ ++#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ ++ ++/* Values for EthernetMacInfo Reverse MII. */ ++#define BP_ENET_NO_REVERSE_MII 0 ++#define BP_ENET_REVERSE_MII 1 ++ ++/* Values for VoIPDSPInfo DSPType. */ ++#define BP_VOIP_NO_DSP 0 ++#define BP_VOIP_DSP 1 ++ ++ ++/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ ++#define BP_ACTIVE_MASK 0x8000 ++#define BP_ACTIVE_HIGH 0x0000 ++#define BP_ACTIVE_LOW 0x8000 ++#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) ++#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) ++#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) ++#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) ++#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) ++#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) ++#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) ++#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) ++#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) ++#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) ++#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) ++#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) ++#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) ++#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) ++#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) ++#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) ++#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) ++#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) ++#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) ++#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) ++#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) ++#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) ++#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) ++#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) ++#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) ++#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) ++#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) ++#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) ++#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) ++#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) ++#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) ++#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) ++#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) ++#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) ++#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) ++#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) ++#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) ++#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) ++#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) ++#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) ++#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) ++#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) ++#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) ++#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) ++#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) ++#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) ++#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) ++#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) ++#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) ++#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) ++#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) ++#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) ++#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) ++#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) ++#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) ++#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) ++#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) ++#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) ++#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) ++#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) ++#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) ++#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) ++#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) ++#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) ++#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) ++#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) ++#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) ++#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) ++#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) ++#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) ++#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) ++#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) ++#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) ++#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) ++ ++/* Values for external interrupt assignments. */ ++#define BP_EXT_INTR_0 0 ++#define BP_EXT_INTR_1 1 ++#define BP_EXT_INTR_2 2 ++#define BP_EXT_INTR_3 3 ++ ++/* Values for chip select assignments. */ ++#define BP_CS_0 0 ++#define BP_CS_1 1 ++#define BP_CS_2 2 ++#define BP_CS_3 3 ++ ++/* Value for GPIO and external interrupt fields that are not used. */ ++#define BP_NOT_DEFINED 0xffff ++#define BP_HW_DEFINED 0xfff0 ++#define BP_UNEQUIPPED 0xfff1 ++ ++/* Maximum size of the board id string. */ ++#define BP_BOARD_ID_LEN 16 ++ ++/* Maximum number of Ethernet MACs. */ ++#define BP_MAX_ENET_MACS 2 ++ ++/* Maximum number of VoIP DSPs. */ ++#define BP_MAX_VOIP_DSP 2 ++ ++/* Wireless Antenna Settings. */ ++#define BP_WLAN_ANT_MAIN 0 ++#define BP_WLAN_ANT_AUX 1 ++#define BP_WLAN_ANT_BOTH 3 ++ ++#if !defined(__ASSEMBLER__) ++ ++/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, ++ * then the other fields are not valid. ++ */ ++typedef struct EthernetMacInfo ++{ ++ unsigned char ucPhyType; /* BP_ENET_xxx */ ++ unsigned char ucPhyAddress; /* 0 to 31 */ ++ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ ++ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ ++ unsigned short numSwitchPorts; /* Number of PHY ports */ ++ unsigned short usConfigType; /* Configuration type */ ++ unsigned short usReverseMii; /* Reverse MII */ ++} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; ++ ++ ++/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, ++ * then the other fields are not valid. ++ */ ++typedef struct VoIPDspInfo ++{ ++ unsigned char ucDspType; ++ unsigned char ucDspAddress; ++ unsigned short usExtIntrVoip; ++ unsigned short usGpioVoipReset; ++ unsigned short usGpioVoipIntr; ++ unsigned short usGpioLedVoip; ++ unsigned short usCsVoip; ++ ++} VOIP_DSP_INFO; ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ); ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ); ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ); ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ); ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); ++ ++#endif /* __ASSEMBLER__ */ ++ ++#if __cplusplus ++} ++#endif ++ ++#endif /* _BOARDPARMS_H */ ++ diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch b/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch new file mode 100644 index 00000000000..d8acdfa9a0b --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch @@ -0,0 +1,135 @@ +diff -urN linux-2.6.16.7/drivers/mtd/maps/bcm963xx.c linux-2.6.16.7-brcm63xx/drivers/mtd/maps/bcm963xx.c +--- linux-2.6.16.7/drivers/mtd/maps/bcm963xx.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-brcm63xx/drivers/mtd/maps/bcm963xx.c 2006-07-07 22:00:36.000000000 +0200 +@@ -0,0 +1,106 @@ ++/* ++ * A simple flash mapping code for BCM963xx board flash memory ++ * It is simple because it only treats all the flash memory as ROM ++ * It is used with chips/map_rom.c ++ * ++ * Song Wang (songw@broadcom.com) ++ */ ++ ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <asm/io.h> ++#include <linux/mtd/mtd.h> ++#include <linux/mtd/map.h> ++#include <linux/config.h> ++ ++#include <board.h> ++#include <bcmTag.h> ++#define VERSION "1.0" ++ ++extern PFILE_TAG kerSysImageTagGet(void); ++ ++static struct mtd_info *mymtd; ++ ++static map_word brcm_physmap_read16(struct map_info *map, unsigned long ofs) ++{ ++ map_word val; ++ ++ val.x[0] = __raw_readw(map->map_priv_1 + ofs); ++ ++ return val; ++} ++ ++static void brcm_physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) ++{ ++ memcpy_fromio(to, map->map_priv_1 + from, len); ++} ++ ++static struct map_info brcm_physmap_map = { ++ .name = "Physically mapped flash", ++ .bankwidth = 2, ++ .read = brcm_physmap_read16, ++ .copy_from = brcm_physmap_copy_from ++}; ++ ++static int __init init_brcm_physmap(void) ++{ ++ PFILE_TAG pTag = NULL; ++ u_int32_t rootfs_addr, kernel_addr; ++ FLASH_ADDR_INFO info; ++ ++ printk("bcm963xx_mtd driver v%s\n", VERSION); ++ kerSysFlashAddrInfoGet( &info ); ++ ++ /* Read the flash memory map from flash memory. */ ++ if (!(pTag = kerSysImageTagGet())) { ++ printk("Failed to read image tag from flash\n"); ++ return -EIO; ++ } ++ ++ rootfs_addr = (u_int32_t) simple_strtoul(pTag->rootfsAddress, NULL, 10); ++ kernel_addr = (u_int32_t) simple_strtoul(pTag->kernelAddress, NULL, 10); ++ ++ brcm_physmap_map.size = kernel_addr - rootfs_addr; ++ brcm_physmap_map.map_priv_1 = (unsigned long)rootfs_addr; ++ ++ if (!brcm_physmap_map.map_priv_1) { ++ printk("Wrong rootfs starting address\n"); ++ return -EIO; ++ } ++ ++ if (brcm_physmap_map.size <= 0) { ++ printk("Wrong rootfs size\n"); ++ return -EIO; ++ } ++ ++ mymtd = do_map_probe("map_rom", &brcm_physmap_map); ++ if (mymtd) { ++ mymtd->owner = THIS_MODULE; ++ add_mtd_device(mymtd); ++ ++ return 0; ++ } ++ ++ return -ENXIO; ++} ++ ++static void __exit cleanup_brcm_physmap(void) ++{ ++ if (mymtd) { ++ del_mtd_device(mymtd); ++ map_destroy(mymtd); ++ } ++ if (brcm_physmap_map.map_priv_1) { ++ brcm_physmap_map.map_priv_1 = 0; ++ } ++} ++ ++module_init(init_brcm_physmap); ++module_exit(cleanup_brcm_physmap); ++ ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Song Wang songw@broadcom.com"); ++MODULE_DESCRIPTION("Configurable MTD map driver for read-only root file system"); +diff -urN linux-2.6.16.7/drivers/mtd/maps/Kconfig linux-2.6.16.7-brcm63xx/drivers/mtd/maps/Kconfig +--- linux-2.6.16.7/drivers/mtd/maps/Kconfig 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-brcm63xx/drivers/mtd/maps/Kconfig 2006-07-07 22:02:13.000000000 +0200 +@@ -224,6 +224,13 @@ + Flash memory access on 4G Systems MTX-1 Board. If you have one of + these boards and would like to use the flash chips on it, say 'Y'. + ++config MTD_BCM963XX ++ tristate "BCM963xx Flash device" ++ depends on MIPS && MIPS_BRCM ++ help ++ This driver seems to detect and provide a valid flash map to the system ++ of course, it needs checking and testing. ++ + config MTD_DILNETPC + tristate "CFI Flash device mapped on DIL/Net PC" + depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT +diff -urN linux-2.6.16.7/drivers/mtd/maps/Makefile linux-2.6.16.7-brcm63xx/drivers/mtd/maps/Makefile +--- linux-2.6.16.7/drivers/mtd/maps/Makefile 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-brcm63xx/drivers/mtd/maps/Makefile 2006-07-07 22:01:29.000000000 +0200 +@@ -71,3 +71,4 @@ + obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o + obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o + obj-$(CONFIG_MTD_TQM834x) += tqm834x.o ++obj-$(CONFIG_MTD_BCM963XX) += bcm963xx.o diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/050-disable-synchronize_net.patch b/openwrt/target/linux/brcm63xx-2.6/patches/050-disable-synchronize_net.patch new file mode 100644 index 00000000000..737a70a48dc --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/050-disable-synchronize_net.patch @@ -0,0 +1,13 @@ +diff -Naurp linux-2.6.16.7-generic-patched/net/ipv4/af_inet.c linux-2.6.16.7-patched/net/ipv4/af_inet.c +--- linux-2.6.16.7-generic-patched/net/ipv4/af_inet.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-patched/net/ipv4/af_inet.c 2006-07-05 15:33:47.000000000 +0200 +@@ -940,7 +940,9 @@ void inet_register_protosw(struct inet_p + out: + spin_unlock_bh(&inetsw_lock); + ++#ifndef CONFIG_MIPS_BRCM + synchronize_net(); ++#endif + + return; + From a7a1a25f7868ad23656781263c049c2b38051b59 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sun, 9 Jul 2006 10:08:28 +0000 Subject: [PATCH 329/757] Add missing brcm63xx-2.6 target to the target list SVN-Revision: 4120 --- openwrt/include/target.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/include/target.mk b/openwrt/include/target.mk index 5a87ab84d79..44ff11128a0 100644 --- a/openwrt/include/target.mk +++ b/openwrt/include/target.mk @@ -15,6 +15,7 @@ $(eval $(call kernel_template,2.4,brcm,2_4_BRCM)) $(eval $(call kernel_template,2.4,ar7,2_4_AR7)) $(eval $(call kernel_template,2.4,x86,2_4_X86)) $(eval $(call kernel_template,2.6,brcm,2_6_BRCM)) +$(eval $(call kernel_template,2.6,brcm63xx,2_6_BRCM63XX)) $(eval $(call kernel_template,2.6,rb532,2_6_RB532)) $(eval $(call kernel_template,2.6,x86,2_6_X86)) $(eval $(call kernel_template,2.4,ar531x,2_4_AR531X)) From 1e53a6bb694b569d104044cf6a54d94005d335ae Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 10 Jul 2006 16:51:59 +0000 Subject: [PATCH 330/757] fix broken .pkginfo under certain situations SVN-Revision: 4122 --- openwrt/include/verbose.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index be7d5f76bdd..da2a21974ad 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -32,4 +32,6 @@ ifneq ($(KBUILD_VERBOSE),99) endif .SILENT: $(MAKECMDGOALS) +else + NO_TRACE_MAKE:=$(MAKE) endif From e81ba9aa44cd444fbbecb37ac38b01da6298fa98 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 10 Jul 2006 21:17:45 +0000 Subject: [PATCH 331/757] add a new FORCEREBUILD option to Package/<name> to force a package to be rebuilt each time make is run SVN-Revision: 4123 --- openwrt/include/package.mk | 4 ++++ openwrt/package/base-files/Makefile | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index bf2376dcd02..618c3c5553b 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -121,6 +121,10 @@ define BuildPackage compile-targets: $$(IPKG_$(1)) endif + ifeq ($(FORCEREBUILD),y) + $$(IPKG_$(1)): FORCE + endif + IDEPEND_$(1):=$$(strip $$(DEPENDS)) DUMPINFO += \ diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 376bd533481..daa15d0a7dd 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -38,6 +38,7 @@ define Package/base-files$(TARGET) TITLE:=OpenWrt system scripts DESCRIPTION:=Base filesystem for OpenWrt VERSION:=$(PKG_RELEASE) + FORCEREBUILD:=y endef define -ar7-2.4/conffiles @@ -89,6 +90,7 @@ define Package/libgcc TITLE:=GCC support library VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) DESCRIPTION:=$(TITLE) + FORCEREBUILD:=n endef define Package/libpthread @@ -97,6 +99,7 @@ define Package/libpthread VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=POSIX thread library DESCRIPTION:=POSIX thread library + FORCEREBUILD:=n endef @@ -105,6 +108,7 @@ define Package/uclibc VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=C library DESCRIPTION:=C library for embedded systems + FORCEREBUILD:=n endef define Build/Prepare From ddf3a0c11135924be3ffd3d40cb6484c5ca1651a Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 10 Jul 2006 23:21:08 +0000 Subject: [PATCH 332/757] rebuild ipkg control files if Makefile changes SVN-Revision: 4124 --- openwrt/include/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 618c3c5553b..7aea314abc1 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -173,7 +173,7 @@ define BuildPackage $(eval $(call BuildIPKGVariable,$(1),postinst)) $(eval $(call BuildIPKGVariable,$(1),prerm)) $(eval $(call BuildIPKGVariable,$(1),postrm)) - $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared + $$(IDIR_$(1))/CONTROL/control: Makefile $(PKG_BUILD_DIR)/.prepared mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control From 3a39b5c94d37d2219f9624499941b28809e9ca5f Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 10 Jul 2006 23:21:56 +0000 Subject: [PATCH 333/757] cleanup of [4123] SVN-Revision: 4125 --- openwrt/package/base-files/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index daa15d0a7dd..8fccf79ea8a 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -37,8 +37,7 @@ define Package/base-files$(TARGET) DEFAULT:=y TITLE:=OpenWrt system scripts DESCRIPTION:=Base filesystem for OpenWrt - VERSION:=$(PKG_RELEASE) - FORCEREBUILD:=y + VERSION:=$(PKG_RELEASE)-$(REV) endef define -ar7-2.4/conffiles @@ -90,7 +89,6 @@ define Package/libgcc TITLE:=GCC support library VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) DESCRIPTION:=$(TITLE) - FORCEREBUILD:=n endef define Package/libpthread @@ -99,7 +97,6 @@ define Package/libpthread VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=POSIX thread library DESCRIPTION:=POSIX thread library - FORCEREBUILD:=n endef @@ -108,7 +105,6 @@ define Package/uclibc VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=C library DESCRIPTION:=C library for embedded systems - FORCEREBUILD:=n endef define Build/Prepare From 8567bc01e4792254b1c0a2b24bb8952a1948af78 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 12 Jul 2006 22:40:14 +0000 Subject: [PATCH 334/757] clean up console output SVN-Revision: 4130 --- openwrt/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 5c218f155f7..5b966b752c9 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -41,16 +41,16 @@ ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) endif .config.in: .pkginfo - ./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ + @./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ pkginfo-clean: FORCE -rm -f .pkginfo .config.in ./scripts/config/mconf: .config.in - $(MAKE) -C scripts/config all + @$(MAKE) -C scripts/config all ./scripts/config/conf: .config.in - $(MAKE) -C scripts/config conf + @$(MAKE) -C scripts/config conf config: ./scripts/config/conf FORCE $< Config.in @@ -79,7 +79,7 @@ toolchain/%: FORCE .config: ./scripts/config/conf FORCE @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig - $< -D .config Config.in >/dev/null 2>/dev/null + @$< -D .config Config.in &> /dev/null download: .config FORCE $(MAKE) toolchain/download From 8660a05af1df6276483b5e9100d72d6e19cd20fd Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Mon, 17 Jul 2006 09:29:25 +0000 Subject: [PATCH 335/757] sync the sysctls with whiterussian, and tune the conntrack timeouts SVN-Revision: 4133 --- openwrt/package/base-files/default/etc/sysctl.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openwrt/package/base-files/default/etc/sysctl.conf b/openwrt/package/base-files/default/etc/sysctl.conf index b09b8cfd9e6..e60038cf35c 100644 --- a/openwrt/package/base-files/default/etc/sysctl.conf +++ b/openwrt/package/base-files/default/etc/sysctl.conf @@ -1,8 +1,12 @@ kernel.panic=3 +net.ipv4.conf.default.arp_ignore=1 +net.ipv4.conf.all.arp_ignore=1 net.ipv4.ip_forward=1 net.ipv4.icmp_echo_ignore_broadcasts=1 net.ipv4.icmp_ignore_bogus_error_responses=1 net.ipv4.tcp_fin_timeout=30 net.ipv4.tcp_keepalive_time=120 +net.ipv4.tcp_syncookies=1 net.ipv4.tcp_timestamps=0 -net.ipv4.tcp_vegas_cong_avoid=1 +net.ipv4.ip_conntrack_tcp_timeouts="300 43200 120 60 120 120 10 60 30 120" +net.ipv4.ip_conntrack_udp_timeouts="60 180" From aa29fdce3d35a326245ec435e8b84314461ab71e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 15:31:01 +0000 Subject: [PATCH 336/757] check if the Package/$(NAME) template is defined before packaging or installing ipkg packages SVN-Revision: 4144 --- openwrt/include/package.mk | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 7aea314abc1..2784cc88817 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -65,6 +65,7 @@ define Package/Default SECTION:=opt CATEGORY:=Extra packages DEPENDS:= + EXTRA_DEPENDS:= MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org> SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) ifneq ($(PKG_VERSION),) @@ -113,12 +114,14 @@ define BuildPackage IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list - ifeq ($(CONFIG_PACKAGE_$(1)),y) - install-targets: $$(INFO_$(1)) - endif + ifdef Package/$(1)/install + ifeq ($(CONFIG_PACKAGE_$(1)),y) + install-targets: $$(INFO_$(1)) + endif - ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) - compile-targets: $$(IPKG_$(1)) + ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) + compile-targets: $$(IPKG_$(1)) + endif endif ifeq ($(FORCEREBUILD),y) @@ -182,7 +185,7 @@ define BuildPackage for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \ DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \ done; \ - echo "Depends: $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \ + echo "Depends: $(EXTRA_DEPENDS) $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \ ) echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control From 19ddbe866235ff89ad9c65ed44e125c4fa6fa6d5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 16:17:19 +0000 Subject: [PATCH 337/757] move some of the kernel module packaging to package/kernel/ SVN-Revision: 4146 --- openwrt/include/kernel-build.mk | 89 ------------------- openwrt/package/kernel/Makefile | 87 ++++++++++++++++++ .../{include => package/kernel}/modules.mk | 10 +-- 3 files changed, 92 insertions(+), 94 deletions(-) create mode 100644 openwrt/package/kernel/Makefile rename openwrt/{include => package/kernel}/modules.mk (77%) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 55a74701c7b..942a91516bd 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -136,92 +136,3 @@ clean: FORCE rm -rf $(KERNEL_BUILD_DIR) rm -f $(TARGETS) - -define AutoLoad -add_module $(1) "$(2)"; -endef - -define KernelPackage/Defaults - VERSION:=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) - DEPENDS:= - MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org> - SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) - PKGARCH:=$(ARCH) - PRIORITY:=optional - KCONFIG:= - FILES:= - BUILD:= - MODULES:= - TITLE:= - DESCRIPTION:= -endef - -define KernelPackage - NAME:=$(1) - $(eval $(call KernelPackage/Defaults)) - $(eval $(call KernelPackage/$(1))) - $(eval $(call KernelPackage/$(1)/$(KERNEL))) - - PKG_$(1) := $(PACKAGE_DIR)/kmod-$(1)_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk - I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(1) - - IDEPEND_$(1):='kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))' $(DEPENDS) - - ifeq ($$(strip $(KCONFIG)),) - KDEPEND_$(1):=m - else - KDEPEND_$(1):=$($(KCONFIG)) - endif - ifeq ($$(KDEPEND_$(1)),m) - ifneq ($(CONFIG_PACKAGE_kmod-$(1)),) - packages: $$(PKG_$(1)) - endif - ifeq ($(CONFIG_PACKAGE_kmod-$(1)),y) - install-kmod-$(1): FORCE - $(IPKG) install $$(PKG_$(1)) - pkg-install: install-kmod-$(1) - endif - endif - - $$(PKG_$(1)): $(LINUX_DIR)/.modules_done - rm -rf $$(I_$(1)) - install -d -m0755 $$(I_$(1))/CONTROL - echo "Package: kmod-$(1)" > $$(I_$(1))/CONTROL/control - echo "Version: $(VERSION)" >> $$(I_$(1))/CONTROL/control - ( \ - DEPENDS=; \ - for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \ - DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \ - done; \ - echo "Depends: $$$$DEPENDS" >> $$(I_$(1))/CONTROL/control; \ - ) - echo "Source: $(SOURCE)" >> $$(I_$(1))/CONTROL/control - echo "Section: kernel" >> $$(I_$(1))/CONTROL/control - echo "Priority: $(PRIORITY)" >> $$(I_$(1))/CONTROL/control - echo "Maintainer: $(MAINTAINER)" >> $$(I_$(1))/CONTROL/control - echo "Architecture: $(PKGARCH)" >> $$(I_$(1))/CONTROL/control - echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(I_$(1))/CONTROL/control - ifneq ($(strip $(FILES)),) - mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION) - $(CP) $(FILES) $$(I_$(1))/lib/modules/$(LINUX_VERSION)/ - endif - ifneq ($(MODULES),) - export modules=; \ - add_module() { \ - mkdir -p $$(I_$(1))/etc/modules.d; \ - echo "$$$$2" > $$(I_$(1))/etc/modules.d/$$$$1-$(1); \ - modules="$$$${modules:+$$$$modules }$$$$1-$(1)"; \ - }; \ - $(MODULES) \ - mkdir -p $$(I_$(1))/etc/modules.d; \ - echo "#!/bin/sh" >> $$(I_$(1))/CONTROL/postinst; \ - echo "[ -z \"\$$$$IPKG_INSTROOT\" ] || exit" >> $$(I_$(1))/CONTROL/postinst; \ - echo ". /etc/functions.sh" >> $$(I_$(1))/CONTROL/postinst; \ - echo "load_modules $$$$modules" >> $$(I_$(1))/CONTROL/postinst; \ - chmod 0755 $$(I_$(1))/CONTROL/postinst; - endif - $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) -endef - --include $(INCLUDE_DIR)/modules.mk - diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile new file mode 100644 index 00000000000..580bf19371b --- /dev/null +++ b/openwrt/package/kernel/Makefile @@ -0,0 +1,87 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=kernel +PKG_VERSION:=$(LINUX_VERSION)-$(BOARD) +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages + +include $(INCLUDE_DIR)/package.mk +ifeq ($(DUMP),) +-include $(LINUX_DIR)/.config +include $(INCLUDE_DIR)/netfilter.mk +endif + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Compile +endef + +define KernelPackage/Defaults +FILES:= +KCONFIG:= +AUTOLOAD:= +endef + +define ModuleAutoLoad + export modules=; \ + add_module() { \ + mkdir -p $(2)/etc/modules.d; \ + echo "$$$$$$$$2" > $(2)/etc/modules.d/$$$$$$$$1-$(1); \ + modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$1-$(1)"; \ + }; \ + $(3) \ + [ -n "$$$$$$$$modules" ] && { \ + mkdir -p $(2)/etc/modules.d; \ + echo "#!/bin/sh" >> $(2)/CONTROL/postinst; \ + echo "[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit" >> $(2)/CONTROL/postinst; \ + echo ". /etc/functions.sh" >> $(2)/CONTROL/postinst; \ + echo "load_modules $$$$$$$$modules" >> $(2)/CONTROL/postinst; \ + chmod 0755 $(2)/CONTROL/postinst; \ + } +endef + + +define KernelPackage + NAME:=$(1) + $(eval $(call KernelPackage/Defaults)) + $(eval $(call KernelPackage/$(1))) + $(eval $(call KernelPackage/$(1)/$(KERNEL))) + + ifneq ($(KCONFIG),m) + CONFIG_PACKAGE_kmod-$(1):= + endif + + define Package/kmod-$(1) + TITLE:=$(TITLE) + SECTION:=kernel + CATEGORY:=Kernel modules + DESCRIPTION:=$(DESCRIPTION) + EXTRA_DEPENDS:='kernel (=$(PKG_VERSION))' + endef + + define Package/kmod-$(1)/install + mkdir -p $$(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(FILES) $$(1)/lib/modules/$(LINUX_VERSION)/ + $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD)) + endef + $$(eval $$(call BuildPackage,kmod-$(1))) +endef + +define AutoLoad +add_module $(1) "$(2)"; +endef + +include ./modules.mk + diff --git a/openwrt/include/modules.mk b/openwrt/package/kernel/modules.mk similarity index 77% rename from openwrt/include/modules.mk rename to openwrt/package/kernel/modules.mk index d20fd41bb08..b777c1177ea 100644 --- a/openwrt/include/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -4,7 +4,7 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -include $(TOPDIR)/include/kernel.mk +# $Id$ define KernelPackage/ide-core TITLE:=Kernel support for IDE @@ -16,18 +16,18 @@ DESCRIPTION:=Kernel modules for IDE support\\\ - ide-detect \\\ - ide-disk \\\ - pdc202xx_old -KCONFIG:=CONFIG_IDE +KCONFIG:=$(CONFIG_IDE) FILES:=$(MODULES_DIR)/kernel/drivers/ide/*.$(LINUX_KMOD_SUFFIX) -MODULES:=$(call AutoLoad,20,ide-core) $(call AutoLoad,90,ide-detect ide-disk) +AUTOLOAD:=$(call AutoLoad,20,ide-core) $(call AutoLoad,90,ide-detect ide-disk) endef $(eval $(call KernelPackage,ide-core)) define KernelPackage/ide-pdc202xx TITLE:=PDC202xx IDE driver DESCRIPTION:=PDC202xx IDE driver -KCONFIG:=CONFIG_BLK_DEV_PDC202XX_OLD +KCONFIG:=$(CONFIG_BLK_DEV_PDC202XX_OLD) FILES:=$(MODULES_DIR)/kernel/drivers/ide/pci/pdc202xx_old.$(LINUX_KMOD_SUFFIX) -MODULES:=$(call AutoLoad,30,pdc202xx_old) +AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old) endef $(eval $(call KernelPackage,ide-pdc202xx)) From 2721d25c5baebb172de9f0b94631dddb24f6f426 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 16:22:01 +0000 Subject: [PATCH 338/757] allow multiple kernel config dependencies SVN-Revision: 4148 --- openwrt/package/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index 580bf19371b..f3a9a287eda 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -59,7 +59,7 @@ define KernelPackage $(eval $(call KernelPackage/$(1))) $(eval $(call KernelPackage/$(1)/$(KERNEL))) - ifneq ($(KCONFIG),m) + ifneq ($(findstring m,$(KCONFIG)),m) CONFIG_PACKAGE_kmod-$(1):= endif From df56b7997890662b9d5c8d913f039972f501c9ff Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 16:35:03 +0000 Subject: [PATCH 339/757] move the cryptoapi kmod to package/kernel SVN-Revision: 4149 --- openwrt/include/modules-2.4.mk | 10 ---------- openwrt/include/modules-2.6.mk | 8 -------- openwrt/package/kernel/Makefile | 4 ++-- openwrt/package/kernel/modules.mk | 33 +++++++++++++++++++++++++++++++ openwrt/target/linux/Config.in | 10 +--------- 5 files changed, 36 insertions(+), 29 deletions(-) diff --git a/openwrt/include/modules-2.4.mk b/openwrt/include/modules-2.4.mk index f8d966f4013..93a89737344 100644 --- a/openwrt/include/modules-2.4.mk +++ b/openwrt/include/modules-2.4.mk @@ -122,16 +122,6 @@ $(eval $(call KMOD_template,NBD,nbd,\ ,CONFIG_BLK_DEV_NBD,,20,nbd)) -# Crypto - -ifneq ($(wildcard $(MODULES_DIR)/kernel/crypto/*.o),) -CONFIG_CRYPTO:=m -endif -$(eval $(call KMOD_template,CRYPTO,crypto,\ - $(MODULES_DIR)/kernel/crypto/*.o \ -,CONFIG_CRYPTO)) - - # Filesystems $(eval $(call KMOD_template,FS_CIFS,fs-cifs,\ diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index c98e4ea8a49..6767586437f 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -126,14 +126,6 @@ $(eval $(call KMOD_template,NBD,nbd,\ $(MODULES_DIR)/kernel/drivers/block/nbd.ko \ ,CONFIG_BLK_DEV_NBD,,20,nbd)) - -# Crypto - -$(eval $(call KMOD_template,CRYPTO,crypto,\ - $(MODULES_DIR)/kernel/crypto/*.ko \ -)) - - # Filesystems $(eval $(call KMOD_template,FS_CIFS,fs-cifs,\ diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index f3a9a287eda..0a26cd6cf19 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -42,14 +42,14 @@ define ModuleAutoLoad modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$1-$(1)"; \ }; \ $(3) \ - [ -n "$$$$$$$$modules" ] && { \ + if [ -n "$$$$$$$$modules" ]; then \ mkdir -p $(2)/etc/modules.d; \ echo "#!/bin/sh" >> $(2)/CONTROL/postinst; \ echo "[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit" >> $(2)/CONTROL/postinst; \ echo ". /etc/functions.sh" >> $(2)/CONTROL/postinst; \ echo "load_modules $$$$$$$$modules" >> $(2)/CONTROL/postinst; \ chmod 0755 $(2)/CONTROL/postinst; \ - } + fi endef diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index b777c1177ea..ff979cf8686 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -6,6 +6,38 @@ # # $Id$ + +define KernelPackage/crypto +TITLE:=CryptoAPI modules +DESCRIPTION:=CryptoAPI modules +KCONFIG:= \ + $(CONFIG_CRYPTO_HMAC) \ + $(CONFIG_CRYPTO_NULL) \ + $(CONFIG_CRYPTO_MD4) \ + $(CONFIG_CRYPTO_MD5) \ + $(CONFIG_CRYPTO_SHA1) \ + $(CONFIG_CRYPTO_SHA256) \ + $(CONFIG_CRYPTO_SHA512) \ + $(CONFIG_CRYPTO_WP512) \ + $(CONFIG_CRYPTO_TGR192) \ + $(CONFIG_CRYPTO_DES) \ + $(CONFIG_CRYPTO_BLOWFISH) \ + $(CONFIG_CRYPTO_TWOFISH) \ + $(CONFIG_CRYPTO_SERPENT) \ + $(CONFIG_CRYPTO_AES) \ + $(CONFIG_CRYPTO_CAST5) \ + $(CONFIG_CRYPTO_CAST6) \ + $(CONFIG_CRYPTO_TEA) \ + $(CONFIG_CRYPTO_ARC4) \ + $(CONFIG_CRYPTO_KHAZAD) \ + $(CONFIG_CRYPTO_ANUBIS) \ + $(CONFIG_CRYPTO_DEFLATE) \ + $(CONFIG_CRYPTO_MICHAEL_MIC) \ + $(CONFIG_CRYPTO_CRC32C) +FILES:=$(MODULES_DIR)/kernel/crypto/*.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,crypto)) + define KernelPackage/ide-core TITLE:=Kernel support for IDE DESCRIPTION:=Kernel modules for IDE support\\\ @@ -31,3 +63,4 @@ AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old) endef $(eval $(call KernelPackage,ide-pdc202xx)) + diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 65b8592abdc..47d87775de5 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -56,7 +56,7 @@ config PACKAGE_KMOD_MPPE tristate default m depends PACKAGE_KMOD_PPP - select PACKAGE_KMOD_CRYPTO + select PACKAGE_kmod-crypto help Support for Microsoft PPP Encryption/Compression @@ -310,14 +310,6 @@ config PACKAGE_KMOD_NBD endmenu -config PACKAGE_KMOD_CRYPTO - prompt "CryptoAPI modules" - tristate - default m - select BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE - help - Kernel modules for cryptographic algorithms - menu "Filesystems support" config PACKAGE_KMOD_FS_CIFS From 0ae23f81bfa066b64c272669165d838a7f9f4dee Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 16:54:12 +0000 Subject: [PATCH 340/757] disable wgt634u images for linux 2.4 (only works with 2.6) SVN-Revision: 4151 --- openwrt/target/image/brcm/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/target/image/brcm/Makefile b/openwrt/target/image/brcm/Makefile index 853902627c4..a4d505865fc 100644 --- a/openwrt/target/image/brcm/Makefile +++ b/openwrt/target/image/brcm/Makefile @@ -59,7 +59,9 @@ endif ifneq ($(1),jffs2-64k) $(call Image/Build/CyberTAN,$(1),wrt54gs,W54S,4.80.1,$(patsubst jffs2-%,jffs2,$(1))) $(call Image/Build/CyberTAN,$(1),wrtsl54gs,W54U,2.00.5,$(patsubst jffs2-%,jffs2,$(1))) +ifeq ($(KERNEL),2.6) $(call Image/Build/wgt634u,$(1),$(patsubst jffs2-%,jffs2,$(1))) +endif endif $(call Image/Build/Motorola,$(1),wr850g,1,$(1)) endef From 9c5e30b638eb9cb99aad604badfae547fdd69641 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 16:58:13 +0000 Subject: [PATCH 341/757] change depends/default for nas SVN-Revision: 4152 --- openwrt/package/broadcom-wl/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index fc3f035b6ed..06f1891328e 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -58,7 +58,8 @@ endef define Package/nas $(call Package/wl) - DEPENDS:=nvram + DEPENDS:=+nvram + DEFAULT:=m TITLE:=Proprietary WPA/WPA2 authenticator DESCRIPTION:=Proprietary WPA/WPA2 authenticator for the Broadcom wl driver endef From 739e54db938177d4793bfee8c644ea28ba406a59 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 20:17:05 +0000 Subject: [PATCH 342/757] make the buildroot-ng sdk compatible with the old packages SVN-Revision: 4158 --- openwrt/include/package.mk | 1 + openwrt/target/sdk/Makefile | 3 +- .../sdk/files/{Makefile.sdk => Makefile} | 9 +- openwrt/target/sdk/files/package/depend.mk | 6 ++ openwrt/target/sdk/files/package/rules.mk | 89 +++++++++++++++++++ 5 files changed, 104 insertions(+), 4 deletions(-) rename openwrt/target/sdk/files/{Makefile.sdk => Makefile} (92%) create mode 100644 openwrt/target/sdk/files/package/depend.mk create mode 100644 openwrt/target/sdk/files/package/rules.mk diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 2784cc88817..ce07640eeda 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -41,6 +41,7 @@ define Build/DefaultTargets touch $$@ $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built + mkdir -p $(STAGING_DIR)/stampfiles $(call Build/InstallDev) touch $$@ diff --git a/openwrt/target/sdk/Makefile b/openwrt/target/sdk/Makefile index 25d2acc57cf..0552b0aaa81 100644 --- a/openwrt/target/sdk/Makefile +++ b/openwrt/target/sdk/Makefile @@ -28,8 +28,9 @@ $(BIN_DIR)/$(SDK_NAME).tar.bz2: $(CP) $(STAGING_DIR) $(INCLUDE_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/ $(CP) $(TOPDIR)/rules.mk $(TOPDIR)/.config $(SDK_BUILD_DIR)/ $(CP) $(TOPDIR)/package/Makefile $(SDK_BUILD_DIR)/package/ - $(CP) ./files/Makefile.sdk $(SDK_BUILD_DIR)/Makefile + $(CP) ./files/Makefile $(SDK_BUILD_DIR)/ $(CP) ./files/README.SDK $(SDK_BUILD_DIR)/ + $(CP) ./files/package/rules.mk $(SDK_BUILD_DIR)/package/ echo OPENWRTVERSION:=$(OPENWRTVERSION) > $(SDK_BUILD_DIR)/.version.mk find $(SDK_BUILD_DIR) -name .svn | xargs rm -rf find $(SDK_BUILD_DIR) -name CVS | xargs rm -rf diff --git a/openwrt/target/sdk/files/Makefile.sdk b/openwrt/target/sdk/files/Makefile similarity index 92% rename from openwrt/target/sdk/files/Makefile.sdk rename to openwrt/target/sdk/files/Makefile index 50723232bc1..ba488e380c9 100644 --- a/openwrt/target/sdk/files/Makefile.sdk +++ b/openwrt/target/sdk/files/Makefile @@ -27,9 +27,6 @@ RELEASE:=Kamikaze TOPDIR=${shell pwd} export TOPDIR -include $(TOPDIR)/.version.mk -export OPENWRTVERSION - DEVELOPER=1 export DEVELOPER @@ -55,6 +52,12 @@ download: FORCE world: FORCE $(MAKE) package/compile + -( \ + cd package; \ + find . -maxdepth 2 -name Config.in | \ + sed -e 's,/Config.in,,g' | \ + xargs -r -n1 make compile -C; \ + ) clean: FORCE rm -rf build_* bin diff --git a/openwrt/target/sdk/files/package/depend.mk b/openwrt/target/sdk/files/package/depend.mk new file mode 100644 index 00000000000..d7b844db558 --- /dev/null +++ b/openwrt/target/sdk/files/package/depend.mk @@ -0,0 +1,6 @@ +# You can put your package dependencies in here +# Example (make openvpn depend on openssl): +# openvpn-compile: openssl-compile +# +# Note: This file is not present in the full buildroot. There you +# have to put your package dependencies in buildroot/package/Makefile diff --git a/openwrt/target/sdk/files/package/rules.mk b/openwrt/target/sdk/files/package/rules.mk new file mode 100644 index 00000000000..b3f4cdbea9b --- /dev/null +++ b/openwrt/target/sdk/files/package/rules.mk @@ -0,0 +1,89 @@ +# invoke ipkg with configuration in $(STAGING_DIR)/etc/ipkg.conf +IPKG := IPKG_INSTROOT=$(TARGET_DIR) IPKG_CONF_DIR=$(IPKG_CONF) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends +IPKG_STATE_DIR := $(TARGET_DIR)/usr/lib/ipkg + +ifneq ($(DUMP),) +dump: +.PHONY: dump +endif + +define PKG_template +IPKG_$(1):=$(PACKAGE_DIR)/$(2)_$(3)_$(4).ipk +IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(2) +INFO_$(1):=$(IPKG_STATE_DIR)/info/$(2).list + +ifneq ($(BR2_PACKAGE_$(1)),) +compile-targets: $$(IPKG_$(1)) +endif +ifneq ($(DEVELOPER),) +compile-targets: $$(IPKG_$(1)) +endif +ifeq ($(BR2_PACKAGE_$(1)),y) +install-targets: $$(INFO_$(1)) +endif + +IDEPEND_$(1):=$$(strip $(5)) + +$$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared + $(SCRIPT_DIR)/make-ipkg-dir.sh $$(IDIR_$(1)) ./ipkg/$(2).control $(3) $(4) + if [ "$$(IDEPEND_$(1))" != "" ]; then echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control; fi + for file in conffiles preinst postinst prerm postrm; do \ + [ -f ./ipkg/$(2).$$$$file ] && cp ./ipkg/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \ + done + +$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(PACKAGE_DIR) + +$$(INFO_$(1)): $$(IPKG_$(1)) + $(IPKG) install $$(IPKG_$(1)) + +$(2)-clean: + rm -f $$(IPKG_$(1)) +clean-targets: $(2)-clean +endef + +ifeq ($(DUMP),) +ifneq ($(strip $(PKG_SOURCE)),) +$(DL_DIR)/$(PKG_SOURCE): + $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) +endif + +ifneq ($(strip $(PKG_CAT)),) +$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) + rm -rf $(PKG_BUILD_DIR) + mkdir -p $(PKG_BUILD_DIR) + $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - + if [ -d ./patches ]; then \ + $(PATCH) $(PKG_BUILD_DIR) ./patches ; \ + fi + touch $(PKG_BUILD_DIR)/.prepared +endif + +all: compile + +compile-targets: +install-targets: +clean-targets: + +source: $(DL_DIR)/$(PKG_SOURCE) +prepare: $(PKG_BUILD_DIR)/.prepared +compile: compile-targets +install: install-targets +mostlyclean: +rebuild: + -$(MAKE) mostlyclean + if [ -f $(PKG_BUILD_DIR)/.built ]; then \ + $(MAKE) clean; \ + fi + $(MAKE) compile + +$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured + +$(PACKAGE_DIR): + mkdir -p $@ + +clean: clean-targets + rm -rf $(PKG_BUILD_DIR) + +.PHONY: all source prepare compile install clean +endif From 82271894efbb7f52b2615dbbb36608f8e8f7e1ba Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 21:26:56 +0000 Subject: [PATCH 343/757] accept V= from the environment as well SVN-Revision: 4159 --- openwrt/include/verbose.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index da2a21974ad..58a20a21784 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -9,10 +9,7 @@ NO_TRACE_MAKE:=$(MAKE) V=99 ifndef KBUILD_VERBOSE - KBUILD_VERBOSE=0 - ifeq ("$(origin V)", "command line") - KBUILD_VERBOSE=$(V) - endif + KBUILD_VERBOSE=$(V) endif ifneq ($(KBUILD_VERBOSE),99) From e08c8179f6058a9e0b63fd0e5428720fe0093a6f Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 18 Jul 2006 21:28:59 +0000 Subject: [PATCH 344/757] fix KBUILD_VERBOSE if V is unset SVN-Revision: 4160 --- openwrt/include/verbose.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 58a20a21784..16a75c08c97 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -9,7 +9,10 @@ NO_TRACE_MAKE:=$(MAKE) V=99 ifndef KBUILD_VERBOSE - KBUILD_VERBOSE=$(V) + KBUILD_VERBOSE=0 + ifdef V + KBUILD_VERBOSE=$(V) + endif endif ifneq ($(KBUILD_VERBOSE),99) From c4cd40bfad43bcf046b3f353d5dfee6d39b4e884 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 19 Jul 2006 13:16:20 +0000 Subject: [PATCH 345/757] add workaround for a broken flex version on some systems (e.g. fc4) SVN-Revision: 4167 --- .../libpcap/patches/103-flex_workaround.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 openwrt/package/libpcap/patches/103-flex_workaround.patch diff --git a/openwrt/package/libpcap/patches/103-flex_workaround.patch b/openwrt/package/libpcap/patches/103-flex_workaround.patch new file mode 100644 index 00000000000..5b6d0db0cbf --- /dev/null +++ b/openwrt/package/libpcap/patches/103-flex_workaround.patch @@ -0,0 +1,14 @@ + + Copyright (C) 2006 Markus Wigge + +diff -urN libpcap-0.9.4.orig/Makefile.in libpcap-0.9.4/Makefile.in +--- libpcap-0.9.4.orig/Makefile.in 2006-07-19 09:27:47.000000000 +0200 ++++ libpcap-0.9.4/Makefile.in 2006-07-19 09:34:48.000000000 +0200 +@@ -53,7 +53,7 @@ + CC = @CC@ + CCOPT = @V_CCOPT@ + INCLS = -I. @V_INCLS@ +-DEFS = @DEFS@ @V_DEFS@ ++DEFS = -D_BSD_SOURCE @DEFS@ @V_DEFS@ + LIBS = @V_LIBS@ + DYEXT = @DYEXT@ From 8a0ec5f14f9151e2d4ce4edebe216170178a51c7 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 19 Jul 2006 13:25:09 +0000 Subject: [PATCH 346/757] add a simple prerequisite check SVN-Revision: 4168 --- openwrt/Makefile | 13 +++++ openwrt/include/prereq.mk | 118 ++++++++++++++++++++++++++++++++++++++ openwrt/rules.mk | 1 + 3 files changed, 132 insertions(+) create mode 100644 openwrt/include/prereq.mk diff --git a/openwrt/Makefile b/openwrt/Makefile index 5b966b752c9..25f60e1e545 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -81,11 +81,24 @@ toolchain/%: FORCE @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig @$< -D .config Config.in &> /dev/null +.prereq: $(TOPDIR)/include/prereq.mk .pkginfo + @$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq.mk prereq 2>/dev/null || { \ + echo "Prerequisite check failed. Use FORCE=1 to override."; \ + false; \ + } + @touch $@ + +prereq: .prereq FORCE + download: .config FORCE $(MAKE) toolchain/download $(MAKE) package/download $(MAKE) target/download +ifeq ($(FORCE),) +world: .prereq +endif + world: .config FORCE $(MAKE) toolchain/install $(MAKE) target/compile diff --git a/openwrt/include/prereq.mk b/openwrt/include/prereq.mk new file mode 100644 index 00000000000..c51953b619e --- /dev/null +++ b/openwrt/include/prereq.mk @@ -0,0 +1,118 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/verbose.mk + +$(TMP_DIR): + mkdir -p $@ + +prereq: + @echo + @if [ -f $(TMP_DIR)/.prereq-error ]; then \ + cat $(TMP_DIR)/.prereq-error; \ + echo; \ + rm -rf $(TMP_DIR); \ + false; \ + fi + @rm -rf $(TMP_DIR) + @mkdir -p $(TMP_DIR) + +define Require + ifeq ($$(CHECK_$(1)),) + prereq: prereq-$(1) + + prereq-$(1): $(TMP_DIR) FORCE + @echo -n "Checking '$(1)'... " + @if $(NO_TRACE_MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ + echo 'ok.'; \ + else \ + echo 'failed.'; \ + echo -e "$(strip $(2))" >> $(TMP_DIR)/.prereq-error; \ + fi + + check-$(1): FORCE + $(call Require/$(1)) + CHECK_$(1):=1 + endif +endef + + +define RequireCommand + define Require/$(1) + which $(1) + endef + + $$(eval $$(call Require,$(1),$(2))) +endef + +# Required for the toolchain +define Require/working-make + echo 'all: test' > $(TMP_DIR)/check.mk + echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk + echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk + echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk + $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk +endef + +$(eval $(call Require,working-make, \ + Your make version is buggy. Please install GNU make v3.81 or later. \ +)) + +define Require/working-gcc + echo 'int main(int argc, char **argv) { return 0; }' | \ + gcc -x c -o $(TMP_DIR)/a.out - +endef + +$(eval $(call Require,working-gcc, \ + No working GNU C Compiler was found on your system. \ +)) + +define Require/working-g++ + echo 'int main(int argc, char **argv) { return 0; }' | \ + g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ - +endef + +$(eval $(call Require,working-g++, \ + No working GNU C++ Compiler was found on your system. \ +)) + +define Require/zlib + echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ + gcc -x c -o $(TMP_DIR)/a.out -lz - +endef + +$(eval $(call Require,zlib, \ + The development version of zlib was not found on your system. \ +)) + + +$(eval $(call RequireCommand,bison, \ + Please install GNU bison. \ +)) + +$(eval $(call RequireCommand,flex, \ + Please install flex. \ +)) + +$(eval $(call RequireCommand,python, \ + Please install python. \ +)) + +$(eval $(call RequireCommand,unzip, \ + Please install unzip. \ +)) + +$(eval $(call RequireCommand,bzip2, \ + Please install bzip2. \ +)) + +$(eval $(call RequireCommand,patch, \ + Please install patch. \ +)) + + diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 533bdc35c32..33e8354b8c8 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -28,6 +28,7 @@ BIN_DIR:=$(TOPDIR)/bin PACKAGE_DIR:=$(BIN_DIR)/packages IPKG_TARGET_DIR:=$(PACKAGE_DIR) BUILD_DIR:=$(TOPDIR)/build_$(ARCH) +TMP_DIR:=$(BUILD_DIR)/tmp STAMP_DIR:=$(BUILD_DIR)/stamp TARGET_DIR:=$(BUILD_DIR)/root IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg From 34f00bf6ef2a2d86b7ae9fa5d6d0402305ea9467 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 19 Jul 2006 13:36:04 +0000 Subject: [PATCH 347/757] add .prereq to distclean SVN-Revision: 4169 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 25f60e1e545..41cda0b8660 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -113,7 +113,7 @@ dirclean: clean rm -rf staging_dir_* toolchain_build_* distclean: dirclean config-clean - rm -rf dl .*config* .pkg* + rm -rf dl .*config* .pkg* .prereq .PHONY: FORCE FORCE: From 243361efaa79daa104b658c0ee1152b1aa05dfb6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 19 Jul 2006 16:51:37 +0000 Subject: [PATCH 348/757] check for zlib.h as well SVN-Revision: 4170 --- openwrt/include/prereq.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/prereq.mk b/openwrt/include/prereq.mk index c51953b619e..6b3621dbaca 100644 --- a/openwrt/include/prereq.mk +++ b/openwrt/include/prereq.mk @@ -83,7 +83,7 @@ $(eval $(call Require,working-g++, \ define Require/zlib echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ - gcc -x c -o $(TMP_DIR)/a.out -lz - + gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz - endef $(eval $(call Require,zlib, \ From b035d2201f8bb95002d0f47711df8165b82c7aba Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 19 Jul 2006 23:23:20 +0000 Subject: [PATCH 349/757] fix broadcom-wl dependancies SVN-Revision: 4171 --- openwrt/package/broadcom-wl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 06f1891328e..82f5dbd013d 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -58,7 +58,7 @@ endef define Package/nas $(call Package/wl) - DEPENDS:=+nvram + DEPENDS:=kmod-brcm-wl nvram DEFAULT:=m TITLE:=Proprietary WPA/WPA2 authenticator DESCRIPTION:=Proprietary WPA/WPA2 authenticator for the Broadcom wl driver From 4c012945b62c33244bb4937f4a2c86dcf228ccdf Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 20 Jul 2006 10:41:44 +0000 Subject: [PATCH 350/757] fix nas depends SVN-Revision: 4172 --- openwrt/package/broadcom-wl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 82f5dbd013d..961baac55a5 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -58,7 +58,7 @@ endef define Package/nas $(call Package/wl) - DEPENDS:=kmod-brcm-wl nvram + DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo +nvram DEFAULT:=m TITLE:=Proprietary WPA/WPA2 authenticator DESCRIPTION:=Proprietary WPA/WPA2 authenticator for the Broadcom wl driver From 42933dcf13bd8ff09ea4b2925ae05d3edcd5f671 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 20 Jul 2006 17:15:12 +0000 Subject: [PATCH 351/757] cleanup & revert [4159] SVN-Revision: 4173 --- openwrt/include/verbose.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 16a75c08c97..7d9b3979bff 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -6,11 +6,11 @@ # # $Id:$ -NO_TRACE_MAKE:=$(MAKE) V=99 +export NO_TRACE_MAKE:=$(MAKE) V=99 ifndef KBUILD_VERBOSE KBUILD_VERBOSE=0 - ifdef V + ifeq ("$(origin V)", "command line") KBUILD_VERBOSE=$(V) endif endif @@ -32,6 +32,4 @@ ifneq ($(KBUILD_VERBOSE),99) endif .SILENT: $(MAKECMDGOALS) -else - NO_TRACE_MAKE:=$(MAKE) endif From df014ed12d26ef76c5f241fbc2743a1715eb1b39 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 20 Jul 2006 17:20:17 +0000 Subject: [PATCH 352/757] clean up console output SVN-Revision: 4174 --- openwrt/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/Makefile b/openwrt/Makefile index 41cda0b8660..37039e6ff9c 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -115,5 +115,7 @@ dirclean: clean distclean: dirclean config-clean rm -rf dl .*config* .pkg* .prereq + +.SILENT: clean dirclean distclean config-clean .PHONY: FORCE FORCE: From 9fa56236f674d3d9b07ffc05edc3464cd179a9ae Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 20 Jul 2006 17:24:20 +0000 Subject: [PATCH 353/757] clean up console output even more SVN-Revision: 4175 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 37039e6ff9c..27526d09a85 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -116,6 +116,6 @@ distclean: dirclean config-clean rm -rf dl .*config* .pkg* .prereq -.SILENT: clean dirclean distclean config-clean +.SILENT: clean dirclean distclean config-clean download world .PHONY: FORCE FORCE: From 8a2dfc8555e9c365320f2935fd0ec6387267814e Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 20 Jul 2006 17:28:05 +0000 Subject: [PATCH 354/757] change 'source' to 'download' SVN-Revision: 4176 --- openwrt/include/package.mk | 4 ++-- openwrt/package/Makefile | 6 +++--- openwrt/target/Makefile | 6 +++--- openwrt/toolchain/Makefile | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index ce07640eeda..38fd93df733 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -294,7 +294,7 @@ else mkdir -p $@ ifneq ($(strip $(PKG_SOURCE)),) - source: $(DL_DIR)/$(PKG_SOURCE) + download: $(DL_DIR)/$(PKG_SOURCE) $(DL_DIR)/$(PKG_SOURCE): mkdir -p $(DL_DIR) @@ -303,7 +303,7 @@ else $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) endif - source: + download: prepare: $(PKG_BUILD_DIR)/.prepared configure: $(PKG_BUILD_DIR)/.configured diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 4b924a390c0..bcfb1699b53 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -3,15 +3,15 @@ include $(TOPDIR)/rules.mk include $(TOPDIR)/.config include $(TOPDIR)/.pkgdeps -SOURCE_PACKAGES:=$(patsubst %,%-source,$(package-y) $(package-m)) +SOURCE_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m)) COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) $(STAMP_DIR) $(TARGET_DIR): mkdir -p $@ -%-source: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-source,%,$@) source MAKEFLAGS="$(BUILD_MAKEFLAGS)" +%-download: $(STAMP_DIR) $(TARGET_DIR) + $(MAKE) -C $(patsubst %-download,%,$@) download MAKEFLAGS="$(BUILD_MAKEFLAGS)" %-prepare: $(STAMP_DIR) $(TARGET_DIR) $(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)" diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 2c186119312..195878e6654 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -20,7 +20,7 @@ linux-install: $(BIN_DIR) sdk-compile: linux-install image_install: linux-install -download: $(patsubst %,%-source,$(TARGETS-y)) +download: $(patsubst %,%-download,$(TARGETS-y)) prepare: linux-prepare compile: linux-compile image_compile install: image_clean $(patsubst %,%-install,$(TARGETS-y)) image_install @@ -38,8 +38,8 @@ image_install: image_compile %-clean: FORCE $(MAKE) -C $(patsubst %-clean,%,$@) clean -%-source: FORCE - $(MAKE) -C $(patsubst %-source,%,$@) source +%-download: FORCE + $(MAKE) -C $(patsubst %-download,%,$@) download %-prepare: FORCE $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: %-prepare diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index 043a119b151..4ffc46fb346 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma TARGETS-$(CONFIG_GDB) += gdb -TARGETS_DOWNLOAD:=$(patsubst %,%-source,$(TARGETS-y)) +TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y)) TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y)) TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y)) @@ -41,8 +41,8 @@ $(STAGING_DIR): $(TOOL_BUILD_DIR): @mkdir -p $@ -%-source: FORCE - $(MAKE) -C $(patsubst %-source,%,$@) source +%-download: FORCE + $(MAKE) -C $(patsubst %-download,%,$@) download %-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \ From 475b3559a2eef1b824f82258b2d679f5e87d1a64 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Thu, 20 Jul 2006 18:42:12 +0000 Subject: [PATCH 355/757] Start adding uml target SVN-Revision: 4177 --- .../generic-2.6/patches/005-gcc4_fix.patch | 12 + openwrt/target/linux/uml-2.6/Makefile | 21 + openwrt/target/linux/uml-2.6/config | 834 ++++++++++++++++++ 3 files changed, 867 insertions(+) create mode 100755 openwrt/target/linux/uml-2.6/Makefile create mode 100644 openwrt/target/linux/uml-2.6/config diff --git a/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch b/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch index 72df58184d5..0d480522861 100644 --- a/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch +++ b/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch @@ -10,6 +10,18 @@ diff -ruN linux-2.6.15.1/include/asm-i386/libgcc.h linux-2.6.15.1-openwrt/includ +#undef ARCH_NEEDS_lshrdi3 + +#endif /* __ASM_LIBGCC_H */ +diff -ruN linux-2.6.15.1/include/asm-um/libgcc.h linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h +--- linux-2.6.15.1/include/asm-um/libgcc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.15.1-openwrt/include/asm-um/libgcc.h 2006-02-01 15:47:53.000000000 +0100 +@@ -0,0 +1,8 @@ ++#ifndef __ASM_LIBGCC_H ++#define __ASM_LIBGCC_H ++ ++#undef ARCH_NEEDS_ashldi3 ++#undef ARCH_NEEDS_ashrdi3 ++#undef ARCH_NEEDS_lshrdi3 ++ ++#endif /* __ASM_LIBGCC_H */ diff -Nur linux-2.6.15.1/include/asm-mips/libgcc.h linux-2.6.15.1-openwrt/include/asm-mips/libgcc.h --- linux-2.6.15.1/include/asm-mips/libgcc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.15.1-openwrt/include/asm-mips/libgcc.h 2006-01-20 10:32:28.000000000 +0100 diff --git a/openwrt/target/linux/uml-2.6/Makefile b/openwrt/target/linux/uml-2.6/Makefile new file mode 100755 index 00000000000..59f02b33404 --- /dev/null +++ b/openwrt/target/linux/uml-2.6/Makefile @@ -0,0 +1,21 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +LINUX_VERSION:=2.6.17 +LINUX_RELEASE:=1 +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e + +include ./config +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk + +$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches + @$(CP) config $(LINUX_DIR)/.config + touch $@ diff --git a/openwrt/target/linux/uml-2.6/config b/openwrt/target/linux/uml-2.6/config new file mode 100644 index 00000000000..82433d9b18d --- /dev/null +++ b/openwrt/target/linux/uml-2.6/config @@ -0,0 +1,834 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.17 +# Tue Jul 18 01:55:58 2006 +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_UML=y +CONFIG_MMU=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQ_RELEASE_METHOD=y + +# +# UML-specific options +# +# CONFIG_MODE_TT is not set +# CONFIG_STATIC_LINK is not set +CONFIG_MODE_SKAS=y + +# +# Host processor type and features +# +# CONFIG_M386 is not set +CONFIG_M486=y +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +# CONFIG_M686 is not set +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP2 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +# CONFIG_X86_GENERIC is not set +CONFIG_X86_CMPXCHG=y +CONFIG_X86_XADD=y +CONFIG_X86_L1_CACHE_SHIFT=4 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_X86_PPRO_FENCE=y +CONFIG_X86_F00F_BUG=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_ALIGNMENT_16=y +CONFIG_UML_X86=y +# CONFIG_64BIT is not set +CONFIG_SEMAPHORE_SLEEPERS=y +# CONFIG_HOST_2G_2G is not set +CONFIG_TOP_ADDR=0xc0000000 +# CONFIG_3_LEVEL_PGTABLES is not set +CONFIG_STUB_CODE=0xbfffe000 +CONFIG_STUB_DATA=0xbffff000 +CONFIG_STUB_START=0xbfffe000 +CONFIG_ARCH_HAS_SC_SIGNALS=y +CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_LD_SCRIPT_DYN=y +CONFIG_NET=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_HOSTFS=y +CONFIG_HPPFS=y +CONFIG_MCONSOLE=y +# CONFIG_MAGIC_SYSRQ is not set +CONFIG_NEST_LEVEL=0 +# CONFIG_HIGHMEM is not set +CONFIG_KERNEL_STACK_ORDER=2 +CONFIG_UML_REAL_TIME_CLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="../../root" +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 +CONFIG_UID16=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set + +# +# Block layer +# +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# Block devices +# +CONFIG_BLK_DEV_UBD=y +CONFIG_BLK_DEV_UBD_SYNC=y +CONFIG_BLK_DEV_COW_COMMON=y +# CONFIG_MMAPPER is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_INITRD=y +# CONFIG_ATA_OVER_ETH is not set + +# +# Character Devices +# +CONFIG_STDERR_CONSOLE=y +CONFIG_STDIO_CONSOLE=y +CONFIG_SSL=y +CONFIG_NULL_CHAN=y +CONFIG_PORT_CHAN=y +CONFIG_PTY_CHAN=y +CONFIG_TTY_CHAN=y +CONFIG_XTERM_CHAN=y +# CONFIG_NOCONFIG_CHAN is not set +CONFIG_CON_ZERO_CHAN="fd:0,fd:1" +CONFIG_CON_CHAN="xterm" +CONFIG_SSL_CHAN="pty" +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_SOFT_WATCHDOG=m +CONFIG_UML_WATCHDOG=m +# CONFIG_UML_SOUND is not set +# CONFIG_SOUND is not set +# CONFIG_HOSTAUDIO is not set +# CONFIG_UML_RANDOM is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set + +# +# Networking +# + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set +# CONFIG_IP_ROUTE_VERBOSE is not set +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y + +# +# TCP congestion control +# +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_SCALABLE=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +CONFIG_IPV6_ROUTER_PREF=y +# CONFIG_IPV6_ROUTE_INFO is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_IPV6_TUNNEL is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_BRIDGE_NETFILTER is not set + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=y + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_IRC=y +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m +CONFIG_IP_NF_SIP=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_IMQ=m +# CONFIG_IP_NF_TARGET_LOG is not set +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_REDIRECT=y +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_IRC=y +CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +CONFIG_IP_NF_RAW=m +# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_TARGET_SET=m + +# +# IPv6: Netfilter Configuration (EXPERIMENTAL) +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_HL is not set +CONFIG_IP6_NF_MATCH_OWNER=m +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_IMQ=m +# CONFIG_IP6_NF_TARGET_LOG is not set +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +# CONFIG_IP6_NF_TARGET_HL is not set +# CONFIG_IP6_NF_RAW is not set + +# +# Bridge: Netfilter Configuration +# +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=y +# CONFIG_DECNET is not set +CONFIG_LLC=y +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +# CONFIG_NET_SCH_NETEM is not set +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_CLS_U32_MARK is not set +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_ESTIMATOR=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_HAMRADIO=y + +# +# Packet Radio protocols +# +# CONFIG_AX25 is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_WIRELESS_EXT=y + +# +# UML Network Devices +# +CONFIG_UML_NET=y +CONFIG_UML_NET_ETHERTAP=y +CONFIG_UML_NET_TUNTAP=y +CONFIG_UML_NET_SLIP=y +CONFIG_UML_NET_DAEMON=y +CONFIG_UML_NET_MCAST=y +# CONFIG_UML_NET_PCAP is not set +CONFIG_UML_NET_SLIRP=y + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 +CONFIG_TUN=m + +# +# PHY device support +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# ATM drivers +# +CONFIG_ATM_DUMMY=m +CONFIG_ATM_TCP=m +CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=y +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_PPPOATM=m +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# File systems +# +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=m +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_XFS_FS=m +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_RT is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=m +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +# CONFIG_QUOTA is not set +# CONFIG_DNOTIFY is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_PROC_KCORE is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=m +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_AES_586=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_INPUT is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_FS is not set +# CONFIG_UNWIND_INFO is not set From 186787ea88ef042b344e1a451531fa32258c5025 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Thu, 20 Jul 2006 21:06:47 +0000 Subject: [PATCH 356/757] UML target completed. Added ext2 target fs for use with uml images SVN-Revision: 4178 --- openwrt/Config.in | 8 ++++++++ openwrt/include/image.mk | 9 +++++++++ openwrt/include/kernel-build.mk | 4 ++-- openwrt/include/kernel.mk | 5 +++++ openwrt/include/target.mk | 1 + openwrt/target/Config.in | 8 ++++++++ openwrt/target/image/uml/Makefile | 15 +++++++++++++++ openwrt/target/linux/uml-2.6/config | 26 +++++++++++++------------- 8 files changed, 61 insertions(+), 15 deletions(-) create mode 100755 openwrt/target/image/uml/Makefile diff --git a/openwrt/Config.in b/openwrt/Config.in index a2e6bddd269..e059f06ab57 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -74,6 +74,14 @@ menu "Target Images" depends !TARGET_ROOTFS_INITRAMFS help Build a compressed tar archive of the the root filesystem + + config TARGET_ROOTFS_EXT2FS + bool "ext2" + default n + depends !TARGET_ROOTFS_INITRAMFS + help + Ext2 file system with some free space for uml images + endmenu diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk index 95accd6e1d1..54f0e8b6bc9 100644 --- a/openwrt/include/image.mk +++ b/openwrt/include/image.mk @@ -44,6 +44,14 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ . endef endif + + ifeq ($(CONFIG_TARGET_ROOTFS_EXT2FS),y) + define Image/mkfs/ext2 + genext2fs -q -b 4096 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2 + $(call Image/Build,ext2) + endef + endif + endif define Image/mkfs/prepare/default @@ -69,6 +77,7 @@ install: $(call Image/mkfs/jffs2) $(call Image/mkfs/squashfs) $(call Image/mkfs/tgz) + $(call Image/mkfs/ext2) clean: $(call Build/Clean) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 942a91516bd..f46e7f0ff38 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -72,13 +72,13 @@ $(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install ramdisk-config $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux - $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ + $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ touch -c $(LINUX_KERNEL) $(LINUX_DIR)/.modules_done: rm -rf $(KERNEL_BUILD_DIR)/modules $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done modules: $(LINUX_DIR)/.modules_done diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index 2c5d0937789..318ca6869dc 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -28,6 +28,11 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/armeb/arm/' \ ) +ifneq (,$(findstring uml,$(BOARD))) +LINUX_KARCH="um" +KERNEL_CROSS= +endif + KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) diff --git a/openwrt/include/target.mk b/openwrt/include/target.mk index 44ff11128a0..95bd1dbfb36 100644 --- a/openwrt/include/target.mk +++ b/openwrt/include/target.mk @@ -18,6 +18,7 @@ $(eval $(call kernel_template,2.6,brcm,2_6_BRCM)) $(eval $(call kernel_template,2.6,brcm63xx,2_6_BRCM63XX)) $(eval $(call kernel_template,2.6,rb532,2_6_RB532)) $(eval $(call kernel_template,2.6,x86,2_6_X86)) +$(eval $(call kernel_template,2.6,uml,2_6_UML)) $(eval $(call kernel_template,2.4,ar531x,2_4_AR531X)) $(eval $(call kernel_template,2.6,aruba,2_6_ARUBA)) $(eval $(call kernel_template,2.6,au1000,2_6_AU1000)) diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 5dd905c75c0..5b85eadb3fe 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -83,6 +83,14 @@ config LINUX_2_6_X86 Build firmware images for x86 based boards (e.g. Soekris net4521 and net4801, PC Engines WRAP...) +config LINUX_2_6_UML + bool "x86 [uml]" + select i386 + select LINUX_2_6 + help + Build uml targetted images + + config LINUX_2_6_AU1000 bool "AMD Alchemy AUxx [2.6]" select mipsel diff --git a/openwrt/target/image/uml/Makefile b/openwrt/target/image/uml/Makefile new file mode 100755 index 00000000000..6af4b8b8165 --- /dev/null +++ b/openwrt/target/image/uml/Makefile @@ -0,0 +1,15 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +define Image/Build + cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img + cp $(LINUX_DIR)/linux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux +endef + +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/uml-2.6/config b/openwrt/target/linux/uml-2.6/config index 82433d9b18d..b44ca40dc08 100644 --- a/openwrt/target/linux/uml-2.6/config +++ b/openwrt/target/linux/uml-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Tue Jul 18 01:55:58 2006 +# Thu Jul 20 13:48:28 2006 # CONFIG_GENERIC_HARDIRQS=y CONFIG_UML=y @@ -77,8 +77,8 @@ CONFIG_LD_SCRIPT_DYN=y CONFIG_NET=y CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set -CONFIG_HOSTFS=y -CONFIG_HPPFS=y +# CONFIG_HOSTFS is not set +# CONFIG_HPPFS is not set CONFIG_MCONSOLE=y # CONFIG_MAGIC_SYSRQ is not set CONFIG_NEST_LEVEL=0 @@ -106,9 +106,7 @@ CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set # CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="../../root" -CONFIG_INITRAMFS_ROOT_UID=0 -CONFIG_INITRAMFS_ROOT_GID=0 +CONFIG_INITRAMFS_SOURCE="" CONFIG_UID16=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_EMBEDDED=y @@ -166,7 +164,9 @@ CONFIG_BLK_DEV_COW_COMMON=y CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y # CONFIG_ATA_OVER_ETH is not set @@ -184,13 +184,13 @@ CONFIG_XTERM_CHAN=y # CONFIG_NOCONFIG_CHAN is not set CONFIG_CON_ZERO_CHAN="fd:0,fd:1" CONFIG_CON_CHAN="xterm" -CONFIG_SSL_CHAN="pty" +CONFIG_SSL_CHAN="xterm" CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_WATCHDOG=y CONFIG_WATCHDOG_NOWAYOUT=y CONFIG_SOFT_WATCHDOG=m -CONFIG_UML_WATCHDOG=m +# CONFIG_UML_WATCHDOG is not set # CONFIG_UML_SOUND is not set # CONFIG_SOUND is not set # CONFIG_HOSTAUDIO is not set @@ -529,7 +529,7 @@ CONFIG_UML_NET_SLIP=y CONFIG_UML_NET_DAEMON=y CONFIG_UML_NET_MCAST=y # CONFIG_UML_NET_PCAP is not set -CONFIG_UML_NET_SLIRP=y +# CONFIG_UML_NET_SLIRP is not set # # Network device support @@ -589,12 +589,12 @@ CONFIG_CONNECTOR=m # # File systems # -CONFIG_EXT2_FS=m +CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m +CONFIG_EXT3_FS=y # CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=m +CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_REISERFS_FS=m # CONFIG_REISERFS_CHECK is not set From 59c5ffd62a8493fc030bfae4057412cf729b2a0e Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 20 Jul 2006 23:51:25 +0000 Subject: [PATCH 357/757] update prereqs SVN-Revision: 4179 --- openwrt/include/prereq.mk | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/openwrt/include/prereq.mk b/openwrt/include/prereq.mk index 6b3621dbaca..6642ce40e38 100644 --- a/openwrt/include/prereq.mk +++ b/openwrt/include/prereq.mk @@ -6,29 +6,30 @@ # include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/verbose.mk $(TMP_DIR): mkdir -p $@ prereq: - @echo - @if [ -f $(TMP_DIR)/.prereq-error ]; then \ + echo + if [ -f $(TMP_DIR)/.prereq-error ]; then \ cat $(TMP_DIR)/.prereq-error; \ echo; \ rm -rf $(TMP_DIR); \ false; \ fi - @rm -rf $(TMP_DIR) - @mkdir -p $(TMP_DIR) + rm -rf $(TMP_DIR) + mkdir -p $(TMP_DIR) + +.SILENT: $(TMP_DIR) prereq define Require ifeq ($$(CHECK_$(1)),) prereq: prereq-$(1) prereq-$(1): $(TMP_DIR) FORCE - @echo -n "Checking '$(1)'... " - @if $(NO_TRACE_MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ + echo -n "Checking '$(1)'... " + if $(NO_TRACE_MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ echo 'ok.'; \ else \ echo 'failed.'; \ @@ -38,6 +39,8 @@ define Require check-$(1): FORCE $(call Require/$(1)) CHECK_$(1):=1 + + .SILENT: prereq-$(1) check-$(1) endif endef @@ -69,7 +72,7 @@ define Require/working-gcc endef $(eval $(call Require,working-gcc, \ - No working GNU C Compiler was found on your system. \ + No working GNU C Compiler (gcc) was found on your system. \ )) define Require/working-g++ @@ -78,7 +81,7 @@ define Require/working-g++ endef $(eval $(call Require,working-g++, \ - No working GNU C++ Compiler was found on your system. \ + No working GNU C++ Compiler (g++) was found on your system. \ )) define Require/zlib @@ -87,7 +90,7 @@ define Require/zlib endef $(eval $(call Require,zlib, \ - The development version of zlib was not found on your system. \ + No zlib development files were not found on your system. \ )) @@ -115,4 +118,6 @@ $(eval $(call RequireCommand,patch, \ Please install patch. \ )) - +$(eval $(call RequireCommand,perl, \ + Please install perl. \ +)) From 3c050e543ff5fd9659fdf455110e99b5a937a69c Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 20 Jul 2006 23:52:27 +0000 Subject: [PATCH 358/757] change $(STAMP_DIR) to $(LINUX_DIR) to avoid issues compiling multiple kernels SVN-Revision: 4180 --- openwrt/include/kernel-build.mk | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index f46e7f0ff38..3fb96e1007a 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -19,9 +19,6 @@ INSTALL_TARGETS += $(KERNEL_IPKG) $(TARGETS): $(PACKAGE_DIR) -$(LINUX_DIR): - mkdir -p $@ - $(PACKAGE_DIR): mkdir -p $@ @@ -68,7 +65,7 @@ else echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config endif -$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install ramdisk-config +$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux @@ -84,10 +81,10 @@ $(LINUX_DIR)/.modules_done: modules: $(LINUX_DIR)/.modules_done packages: $(TARGETS) -$(STAMP_DIR)/.linux-compile: +$(LINUX_DIR)/.linux-compile: + ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux @$(MAKE) modules @$(MAKE) packages - ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux touch $@ $(KERNEL_IPKG): @@ -111,14 +108,14 @@ pkg-install: FORCE source: $(DL_DIR)/$(LINUX_SOURCE) prepare: $(LINUX_DIR)/.configured - @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) + @mkdir -p $(LINUX_DIR) $(PACKAGE_DIR) -compile: prepare $(STAMP_DIR)/.linux-compile +compile: prepare $(LINUX_DIR)/.linux-compile install: compile $(LINUX_KERNEL) mostlyclean: FORCE - rm -f $(STAMP_DIR)/.linux-compile + rm -f $(LINUX_DIR)/.linux-compile rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked $(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean From 595b07691290665145c05cad1da828f25a78a012 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 21 Jul 2006 00:08:50 +0000 Subject: [PATCH 359/757] fix a few broken depenancies SVN-Revision: 4181 --- openwrt/include/modules-2.6.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index 6767586437f..56129343f35 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -22,7 +22,7 @@ $(eval $(call KMOD_template,GRE,gre,\ $(eval $(call KMOD_template,IMQ,imq,\ $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.ko \ $(MODULES_DIR)/kernel/drivers/net/imq.ko \ -)) +,CONFIG_IMQ)) $(eval $(call KMOD_template,IPIP,ipip,\ $(MODULES_DIR)/kernel/net/ipv4/ipip.ko \ @@ -54,7 +54,7 @@ $(eval $(call KMOD_template,PPPOE,pppoe,\ $(eval $(call KMOD_template,SCHED,sched,\ $(MODULES_DIR)/kernel/net/sched/*.ko \ -)) +,CONFIG_NET_SCHED)) $(eval $(call KMOD_template,TUN,tun,\ $(MODULES_DIR)/kernel/drivers/net/tun.ko \ From 9b44939f4e586ce8a7efd42798ddd1b4c4d5f43c Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Fri, 21 Jul 2006 07:27:39 +0000 Subject: [PATCH 360/757] Update brcm63xx to 2.6.17, restore the use of "generic patches" since there is no linux version mismatch SVN-Revision: 4182 --- openwrt/target/linux/brcm63xx-2.6/Makefile | 6 +- openwrt/target/linux/brcm63xx-2.6/config | 540 +++++++++++++++--- .../brcm63xx-2.6/patches/000-arch_mips.patch | 124 ++-- .../patches/001-brcm_boards.patch | 137 +++-- .../patches/010-include_asm_mips.patch | 65 +-- 5 files changed, 629 insertions(+), 243 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/Makefile b/openwrt/target/linux/brcm63xx-2.6/Makefile index a27147491a5..0437338e8e2 100644 --- a/openwrt/target/linux/brcm63xx-2.6/Makefile +++ b/openwrt/target/linux/brcm63xx-2.6/Makefile @@ -6,9 +6,9 @@ # include $(TOPDIR)/rules.mk -LINUX_VERSION:=2.6.16.7 +LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 -LINUX_KERNEL_MD5SUM:=9682b2bd6e02f3087982d7c3f5ba824e +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config include $(INCLUDE_DIR)/kernel.mk @@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - #[ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) @$(CP) config $(LINUX_DIR)/.config touch $@ diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index 335bd645f92..246941d87fb 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.7 -# Fri Jul 7 21:47:39 2006 +# Linux kernel version: 2.6.17 +# Fri Jul 14 18:43:28 2006 # CONFIG_MIPS=y @@ -101,7 +101,10 @@ CONFIG_ROOTFS_SQUASHFS=y # CONFIG_ROOTFS_NFS is not set CONFIG_ROOT_FLASHFS="root=/dev/mtdblock2 rootfstype=cramfs,squashfs,jffs2 noinitrd console=ttyS0,115200" CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -150,7 +153,6 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_CPU_HAS_PREFETCH=y # CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set -# CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -190,11 +192,11 @@ CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y +CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_HOTPLUG=y CONFIG_PRINTK=y @@ -204,10 +206,6 @@ CONFIG_BASE_FULL=y # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 @@ -220,7 +218,6 @@ CONFIG_OBSOLETE_INTERMODULE=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y @@ -229,6 +226,8 @@ CONFIG_KMOD=y # Block layer # CONFIG_LBD=y +CONFIG_BLK_DEV_IO_TRACE=y +# CONFIG_LSF is not set # # IO Schedulers @@ -276,46 +275,267 @@ CONFIG_NET=y # # CONFIG_NETDEBUG is not set CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set +CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -# CONFIG_NET_KEY is not set +CONFIG_XFRM=y +CONFIG_XFRM_USER=m +CONFIG_NET_KEY=y CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +# CONFIG_IP_ROUTE_FWMARK is not set +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_DRR=m +CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y +# CONFIG_IP_MROUTE is not set +CONFIG_ARPD=y +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y + +# +# TCP congestion control +# CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +# CONFIG_TCP_CONG_HSTCP is not set +# CONFIG_TCP_CONG_HYBLA is not set +# CONFIG_TCP_CONG_VEGAS is not set +# CONFIG_TCP_CONG_SCALABLE is not set + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CONNTRACK_EVENTS=y +CONFIG_IP_NF_CONNTRACK_NETLINK=m +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_NETBIOS_NS=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m +CONFIG_IP_NF_SIP=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_MATCH_LAYER7=m +CONFIG_IP_NF_MATCH_LAYER7_DEBUG=y +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +# CONFIG_IP_NF_TARGET_IMQ is not set +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_HASHSIZE=1024 +# CONFIG_IP_NF_SET_IPMAP is not set +# CONFIG_IP_NF_SET_MACIPMAP is not set +# CONFIG_IP_NF_SET_PORTMAP is not set +# CONFIG_IP_NF_SET_IPHASH is not set +# CONFIG_IP_NF_SET_NETHASH is not set +# CONFIG_IP_NF_SET_IPTREE is not set +# CONFIG_IP_NF_MATCH_SET is not set +# CONFIG_IP_NF_TARGET_SET is not set + +# +# IPv6: Netfilter Configuration (EXPERIMENTAL) +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +# CONFIG_IP6_NF_TARGET_IMQ is not set +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_RAW=m + +# +# Bridge: Netfilter Configuration +# +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m # # DCCP Configuration (EXPERIMENTAL) # -# CONFIG_IP_DCCP is not set +CONFIG_IP_DCCP=m +CONFIG_INET_DCCP_DIAG=m +CONFIG_IP_DCCP_ACKVEC=y + +# +# DCCP CCIDs Configuration (EXPERIMENTAL) +# +CONFIG_IP_DCCP_CCID2=m +CONFIG_IP_DCCP_CCID3=m +CONFIG_IP_DCCP_TFRC_LIB=m # # SCTP Configuration (EXPERIMENTAL) # -# CONFIG_IP_SCTP is not set +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y # # TIPC Configuration (EXPERIMENTAL) # -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set +CONFIG_TIPC=m +# CONFIG_TIPC_ADVANCED is not set +# CONFIG_TIPC_DEBUG is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=m # CONFIG_DECNET is not set +CONFIG_LLC=y # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -323,21 +543,97 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set +CONFIG_WAN_ROUTER=m # # QoS and/or fair queueing # -# CONFIG_NET_SCHED is not set +CONFIG_NET_SCHED=y +# CONFIG_NET_SCH_CLK_JIFFIES is not set +CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +# CONFIG_CLS_U32_MARK is not set +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +# CONFIG_NET_ACT_IPT is not set +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_ESTIMATOR=y # # Network testing # -# CONFIG_NET_PKTGEN is not set +CONFIG_NET_PKTGEN=m # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIVHCI=m +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +# CONFIG_IEEE80211_CRYPT_TKIP is not set +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -349,7 +645,6 @@ CONFIG_TCP_CONG_BIC=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set # # Connector - unified userspace <-> kernelspace linker @@ -384,9 +679,12 @@ CONFIG_MTD_BLOCK=y # RAM/ROM/Flash chip drivers # CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +# CONFIG_MTD_CFI_NOSWAP is not set +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y @@ -397,14 +695,13 @@ CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set # CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_CFI_INTELEXT is not set +CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_AMDSTD_RETRY=0 -# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_STAA=y CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set +CONFIG_MTD_RAM=y +CONFIG_MTD_ROM=y +CONFIG_MTD_ABSENT=y # CONFIG_MTD_OBSOLETE_CHIPS is not set # @@ -413,6 +710,7 @@ CONFIG_MTD_CFI_UTIL=y CONFIG_MTD_COMPLEX_MAPPINGS=y # CONFIG_MTD_PHYSMAP is not set CONFIG_MTD_BCM963XX=y +# CONFIG_MTD_CSTM_MIPS_IXX is not set # CONFIG_MTD_PLATRAM is not set # @@ -421,7 +719,6 @@ CONFIG_MTD_BCM963XX=y # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set # CONFIG_MTD_BLOCK2MTD is not set # @@ -457,7 +754,7 @@ CONFIG_MTD_BCM963XX=y # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 +# CONFIG_BLK_DEV_INITRD is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -494,19 +791,38 @@ CONFIG_BLK_DEV_RAM_COUNT=16 # Network device support # CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set +CONFIG_IFB=m +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_EQUALIZER=m +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 +CONFIG_TUN=m # # PHY device support # +CONFIG_PHYLIB=m + +# +# MII PHY device drivers +# +CONFIG_MARVELL_PHY=m +CONFIG_DAVICOM_PHY=m +CONFIG_QSEMI_PHY=m +CONFIG_LXT_PHY=m +CONFIG_CICADA_PHY=m # # Ethernet (10 or 100Mbit) # -# CONFIG_NET_ETHERNET is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +# CONFIG_DM9000 is not set # # Ethernet (1000 Mbit) @@ -523,15 +839,39 @@ CONFIG_NETDEVICES=y # # Wireless LAN (non-hamradio) # -# CONFIG_NET_RADIO is not set +CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y # # Wan interfaces # # CONFIG_WAN is not set -# CONFIG_PPP is not set + +# +# ATM drivers +# +CONFIG_ATM_DUMMY=m +CONFIG_ATM_TCP=m +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_PPPOATM=m # CONFIG_SLIP is not set -# CONFIG_SHAPER is not set +CONFIG_SHAPER=m # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set @@ -549,12 +889,45 @@ CONFIG_NETDEVICES=y # # Input device support # -# CONFIG_INPUT is not set +CONFIG_INPUT=m + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=m +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=m +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set # # Hardware I/O ports # -# CONFIG_SERIO is not set +CONFIG_SERIO=m +CONFIG_SERIO_I8042=m +CONFIG_SERIO_SERPORT=m +CONFIG_SERIO_LIBPS2=m +# CONFIG_SERIO_RAW is not set # CONFIG_GAMEPORT is not set # @@ -627,14 +1000,11 @@ CONFIG_HWMON=y # Misc devices # -# -# Multimedia Capabilities Port drivers -# - # # Multimedia devices # # CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -656,6 +1026,7 @@ CONFIG_HWMON=y # # CONFIG_USB_ARCH_HAS_HCD is not set # CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' @@ -671,6 +1042,19 @@ CONFIG_HWMON=y # # CONFIG_MMC is not set +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + # # InfiniBand support # @@ -679,6 +1063,11 @@ CONFIG_HWMON=y # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + # # File systems # @@ -716,11 +1105,13 @@ CONFIG_DNOTIFY=y # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +CONFIG_DEVFS_DEBUG=y CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -743,6 +1134,10 @@ CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=y +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_EMBEDDED=y +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +CONFIG_SQUASHFS_VMALLOC=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set @@ -836,26 +1231,11 @@ CONFIG_NLS_UTF8=m # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -CONFIG_DEBUG_VM=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_KGDB is not set -CONFIG_RUNTIME_DEBUG=y -CONFIG_MIPS_UNCACHED=y # # Security options @@ -884,7 +1264,7 @@ CONFIG_CRYPTO_AES=y # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_ARC4 is not set +CONFIG_CRYPTO_ARC4=m # CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_ANUBIS is not set CONFIG_CRYPTO_DEFLATE=y @@ -905,3 +1285,7 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch b/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch index bcb3469769f..0659326fa30 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch @@ -1,13 +1,9 @@ -diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/Kconfig linux-2.6.16.7-patched/arch/mips/Kconfig ---- linux-2.6.16.7-generic-patched/arch/mips/Kconfig 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/arch/mips/Kconfig 2006-07-05 15:21:58.000000000 +0200 -@@ -10,7 +10,16 @@ menu "Machine selection" - - choice +--- linux-2.6.17/arch/mips/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/arch/mips/Kconfig 2006-07-13 19:08:11.000000000 +0200 +@@ -12,6 +12,15 @@ prompt "System type" -- default SGI_IP22 -+ default MIPS_BRCM -+ + default SGI_IP22 + +config MIPS_BRCM + bool "Support for the Broadcom boards" + select SYS_SUPPORTS_32BIT_KERNEL @@ -16,10 +12,11 @@ diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/Kconf + select IRQ_CPU + help + This is a fmaily of boards based on the Broadcom MIPS32 - ++ config MIPS_MTX1 - bool "Support for 4G Systems MTX-1 board" -@@ -777,6 +786,7 @@ config TOSHIBA_RBTX4938 + bool "4G Systems MTX-1 board" + select DMA_NONCOHERENT +@@ -780,6 +789,7 @@ endchoice @@ -27,19 +24,9 @@ diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/Kconf source "arch/mips/ddb5xxx/Kconfig" source "arch/mips/gt64120/ev64120/Kconfig" source "arch/mips/jazz/Kconfig" -@@ -1046,7 +1056,7 @@ menu "CPU selection" - - choice - prompt "CPU type" -- default CPU_R4X00 -+ default CPU_MIPS32_R1 - - config CPU_MIPS32_R1 - bool "MIPS32 Release 1" -diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/Makefile linux-2.6.16.7-patched/arch/mips/Makefile ---- linux-2.6.16.7-generic-patched/arch/mips/Makefile 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/arch/mips/Makefile 2006-07-05 15:21:58.000000000 +0200 -@@ -279,6 +279,20 @@ libs-$(CONFIG_SIBYTE_CFE) += arch/mips/s +--- linux-2.6.17/arch/mips/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/arch/mips/Makefile 2006-07-13 18:55:59.000000000 +0200 +@@ -145,6 +145,20 @@ # # @@ -60,78 +47,79 @@ diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/Makef # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. # core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/ -diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/kernel/cpu-probe.c linux-2.6.16.7-patched/arch/mips/kernel/cpu-probe.c ---- linux-2.6.16.7-generic-patched/arch/mips/kernel/cpu-probe.c 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/arch/mips/kernel/cpu-probe.c 2006-07-05 15:21:58.000000000 +0200 -@@ -558,6 +558,25 @@ static inline void decode_configs(struct +diff -urN linux-2.6.17/arch/mips/kernel/cpu-probe.c linux-2.6.17-brcm63xx/arch/mips/kernel/cpu-probe.c +--- linux-2.6.17/arch/mips/kernel/cpu-probe.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/arch/mips/kernel/cpu-probe.c 2006-07-13 18:59:04.000000000 +0200 +@@ -568,6 +568,25 @@ return; } +static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) +{ -+ decode_configs(c); -+ switch (c->processor_id & 0xff00) { -+ case PRID_IMP_BCM6338: -+ c->cputype = CPU_BCM6338; -+ break; -+ case PRID_IMP_BCM6345: -+ c->cputype = CPU_BCM6345; -+ break; -+ case PRID_IMP_BCM6348: -+ c->cputype = CPU_BCM6348; -+ break; -+ default: -+ c->cputype = CPU_UNKNOWN; -+ break; -+ } ++ decode_configs(c); ++ switch (c->processor_id & 0xff00) { ++ case PRID_IMP_BCM6338: ++ c->cputype = CPU_BCM6338; ++ break; ++ case PRID_IMP_BCM6345: ++ c->cputype = CPU_BCM6345; ++ break; ++ case PRID_IMP_BCM6348: ++ c->cputype = CPU_BCM6348; ++ break; ++ default: ++ c->cputype = CPU_UNKNOWN; ++ break; ++ } +} + static inline void cpu_probe_mips(struct cpuinfo_mips *c) { decode_configs(c); -@@ -691,6 +710,9 @@ __init void cpu_probe(void) +@@ -704,6 +723,9 @@ case PRID_COMP_LEGACY: cpu_probe_legacy(c); break; -+ case PRID_COMP_BROADCOM: -+ cpu_probe_broadcom(c); -+ break; ++ case PRID_COMP_BROADCOM: ++ cpu_probe_broadcom(c); ++ break; case PRID_COMP_MIPS: cpu_probe_mips(c); break; -diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/kernel/proc.c linux-2.6.16.7-patched/arch/mips/kernel/proc.c ---- linux-2.6.16.7-generic-patched/arch/mips/kernel/proc.c 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/arch/mips/kernel/proc.c 2006-07-05 15:21:58.000000000 +0200 -@@ -81,6 +81,9 @@ static const char *cpu_name[] = { - [CPU_VR4133] = "NEC VR4133", - [CPU_VR4181] = "NEC VR4181", +diff -urN linux-2.6.17/arch/mips/kernel/proc.c linux-2.6.17-brcm63xx/arch/mips/kernel/proc.c +--- linux-2.6.17/arch/mips/kernel/proc.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/arch/mips/kernel/proc.c 2006-07-13 19:00:53.000000000 +0200 +@@ -85,6 +85,9 @@ [CPU_VR4181A] = "NEC VR4181A", + [CPU_SR71000] = "Sandcraft SR71000", + [CPU_PR4450] = "Philips PR4450", + [CPU_BCM6338] = "BCM6338", + [CPU_BCM6345] = "BCM6345", + [CPU_BCM6348] = "BCM6348", - [CPU_SR71000] = "Sandcraft SR71000", - [CPU_PR4450] = "Philips PR4450", }; -diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/mm/c-r4k.c linux-2.6.16.7-patched/arch/mips/mm/c-r4k.c ---- linux-2.6.16.7-generic-patched/arch/mips/mm/c-r4k.c 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/arch/mips/mm/c-r4k.c 2006-07-05 15:21:58.000000000 +0200 -@@ -889,6 +889,12 @@ static void __init probe_pcache(void) + + +diff -urN linux-2.6.17/arch/mips/mm/c-r4k.c linux-2.6.17-brcm63xx/arch/mips/mm/c-r4k.c +--- linux-2.6.17/arch/mips/mm/c-r4k.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/arch/mips/mm/c-r4k.c 2006-07-13 19:03:23.000000000 +0200 +@@ -914,6 +914,13 @@ if (!(config & MIPS_CONF_M)) panic("Don't know how to probe P-caches on this cpu."); -+ if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348){ ++ if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348) ++ { + printk("brcm mips: enabling icache and dcache...\n"); -+ /* Enable caches */ -+ write_c0_diag(read_c0_diag() | 0xC0000000); -+ } ++ /* Enable caches */ ++ write_c0_diag(read_c0_diag() | 0xC0000000); ++ } + /* * So we seem to be a MIPS32 or MIPS64 CPU * So let's probe the I-cache ... -diff -Naurp -x brcm-boards -x pci linux-2.6.16.7-generic-patched/arch/mips/mm/tlbex.c linux-2.6.16.7-patched/arch/mips/mm/tlbex.c ---- linux-2.6.16.7-generic-patched/arch/mips/mm/tlbex.c 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/arch/mips/mm/tlbex.c 2006-07-05 15:21:58.000000000 +0200 -@@ -858,6 +858,9 @@ static __init void build_tlb_write_entry +diff -urN linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-brcm63xx/arch/mips/mm/tlbex.c +--- linux-2.6.17/arch/mips/mm/tlbex.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/arch/mips/mm/tlbex.c 2006-07-13 19:03:57.000000000 +0200 +@@ -882,6 +882,9 @@ case CPU_4KSC: case CPU_20KC: case CPU_25KF: diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch index b91cb25d668..38ce5e1ee44 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch @@ -1,6 +1,6 @@ -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 2006-07-07 22:16:32.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,775 @@ +/* +<:copyright-gpl @@ -777,9 +777,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c linux-2. + return flash_get_total_size(); +} + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 2006-07-07 22:16:32.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,582 @@ +/* +<:copyright-gpl @@ -1363,10 +1363,10 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c linux-2.6. + } +} + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c 2006-07-07 22:16:43.000000000 +0200 -@@ -0,0 +1,1614 @@ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c 2006-07-14 15:39:56.000000000 +0200 +@@ -0,0 +1,1615 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -2494,8 +2494,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.16.7-b + * state. + */ + g_monitor_task = current; -+ g_orig_fop_poll = g_monitor_file->f_op->poll; -+ g_monitor_file->f_op->poll = kerSysMonitorPollHook; ++ g_orig_fop_poll = kerSysMonitorPollHook; ++ /*g_orig_fop_poll = g_monitor_file->f_op->poll; ++ g_monitor_file->f_op->poll = kerSysMonitorPollHook;*/ + } + } + break; @@ -2981,9 +2982,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.16.7-b +EXPORT_SYMBOL(kerSysSetWdTimer); +EXPORT_SYMBOL(kerSysWakeupMonitorTask); + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c 2006-07-07 22:16:11.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,2391 @@ +/* +<:copyright-gpl @@ -5376,9 +5377,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.c linux-2.6.1 + return( nRet ); +} /* BpGetVoipChipSelect */ + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h 2006-07-07 22:16:11.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,766 @@ +/* +<:copyright-gpl @@ -6146,9 +6147,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.1 + +#endif /* _BOARDPARMS_H */ + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c 2006-07-07 22:17:24.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,692 @@ +/************************************************************************/ +/* */ @@ -6842,9 +6843,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.16. + flash_command(FLASH_RESET, 0, 0, 0); + return(1); +} -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h 2006-07-07 22:17:24.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,150 @@ +/************************************************************************/ +/* */ @@ -6996,10 +6997,10 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.16. +#endif + +#endif -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-07-07 22:15:18.000000000 +0200 -@@ -0,0 +1,274 @@ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-07-14 15:31:35.000000000 +0200 +@@ -0,0 +1,294 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -7097,6 +7098,26 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.16.7-brc + } +} + ++void plat_irq_dispatch(struct pt_regs *regs) ++{ ++ u32 cause; ++ while((cause = (read_c0_cause()& CAUSEF_IP))) { ++ if (cause & CAUSEF_IP7) ++ do_IRQ(MIPS_TIMER_INT, regs); ++ else if (cause & CAUSEF_IP2) ++ irq_dispatch_int(regs); ++ else if (cause & CAUSEF_IP3) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); ++ else if (cause & CAUSEF_IP4) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); ++ else if (cause & CAUSEF_IP5) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); ++ else if (cause & CAUSEF_IP6) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); ++ cli(); ++ } ++} ++ + +void enable_brcm_irq(unsigned int irq) +{ @@ -7274,9 +7295,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.16.7-brc +EXPORT_SYMBOL(request_external_irq); +EXPORT_SYMBOL(BcmHalMapInterrupt); + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,172 @@ +# Kernel and Driver configuration for Broadcom Commengine ADSL board +choice @@ -7450,9 +7471,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.16.7-b + default "/opt/bcm96348/targets/96348R/fs" if BCM96348 = y + help + This is the path of NFS server (host system) -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile 2006-07-07 22:18:20.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,23 @@ +# +# Makefile for generic Broadcom MIPS boards @@ -7477,9 +7498,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.16.7- +EXTRA_CFLAGS += -DADSL_ANNEXC +endif + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,236 @@ +/* +<:copyright-gpl @@ -7717,9 +7738,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.16.7-br +} +#endif + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,180 @@ +/* +<:copyright-gpl @@ -7901,9 +7922,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.16. + prom_puts(ptr); +} +#endif -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,523 @@ +/* +<:copyright-gpl @@ -8428,15 +8449,15 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.16.7-b +EXPORT_SYMBOL(_ZdlPv); +EXPORT_SYMBOL(_ZdaPv); + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,2 @@ +#define ADSL_SDRAM_IMAGE_SIZE (384*1024) + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c ---- linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,277 @@ +/* +<:copyright-gpl @@ -8715,9 +8736,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.16.7-br +EXPORT_SYMBOL(do_settimeofday); + +#endif -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c ---- linux-2.6.16.7/arch/mips/brcm-boards/generic/dbg_io.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c +--- linux-2.6.17/arch/mips/brcm-boards/generic/dbg_io.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,260 @@ +/* +<:copyright-gpl @@ -8979,9 +9000,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.16.7-b +} + + -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S ---- linux-2.6.16.7/arch/mips/brcm-boards/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S +--- linux-2.6.17/arch/mips/brcm-boards/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,59 @@ +/* +<:copyright-gpl @@ -9042,9 +9063,9 @@ diff -urN linux-2.6.16.7/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.1 + nop + + END(brcmIRQ) -diff -urN linux-2.6.16.7/arch/mips/brcm-boards/generic/Makefile linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/Makefile ---- linux-2.6.16.7/arch/mips/brcm-boards/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/arch/mips/brcm-boards/generic/Makefile 2006-07-07 22:15:18.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/Makefile linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/Makefile +--- linux-2.6.17/arch/mips/brcm-boards/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/Makefile 2006-07-13 19:11:33.000000000 +0200 @@ -0,0 +1,11 @@ +# +# Makefile for generic Broadcom MIPS boards diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch b/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch index e413acff8a4..8efe11fcd63 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch @@ -1,56 +1,50 @@ -diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/bootinfo.h linux-2.6.16.7-patched/include/asm-mips/bootinfo.h ---- linux-2.6.16.7-generic-patched/include/asm-mips/bootinfo.h 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/include/asm-mips/bootinfo.h 2006-07-05 15:21:58.000000000 +0200 -@@ -218,6 +218,15 @@ +--- linux-2.6.17/include/asm-mips/bootinfo.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/include/asm-mips/bootinfo.h 2006-07-13 19:14:01.000000000 +0200 +@@ -218,6 +218,14 @@ #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ +/* + * Valid machtype for group BRCM + */ -+#define MACH_GROUP_BRCM 23 /* Broadcom boards */ -+#define MACH_BCM96338 0 -+#define MACH_BCM96345 1 -+#define MACH_BCM96348 2 -+ ++#define MACH_GROUP_BRCM 23 /* Broadcom boards */ ++#define MACH_BCM96338 0 ++#define MACH_BCM96345 1 ++#define MACH_BCM96348 2 + #define CL_SIZE COMMAND_LINE_SIZE const char *get_system_type(void); -diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/cpu.h linux-2.6.16.7-patched/include/asm-mips/cpu.h ---- linux-2.6.16.7-generic-patched/include/asm-mips/cpu.h 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/include/asm-mips/cpu.h 2006-07-05 15:21:58.000000000 +0200 -@@ -102,6 +102,15 @@ +--- linux-2.6.17/include/asm-mips/cpu.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/include/asm-mips/cpu.h 2006-07-13 19:15:17.000000000 +0200 +@@ -103,6 +103,13 @@ + #define PRID_IMP_SR71000 0x0400 - /* -+ * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM ++/* These are the PRID's for when 23:16 == PRID_COMP_BROADCOM + */ + -+#define PRID_IMP_BCM6338 0x9000 -+#define PRID_IMP_BCM6345 0x8000 -+#define PRID_IMP_BCM6348 0x9100 ++#define PRID_IMP_BCM6338 0x9000 ++#define PRID_IMP_BCM6345 0x8000 ++#define PRID_IMP_BCM6348 0x9100 + -+ -+/* + /* * Definitions for 7:0 on legacy processors */ - -@@ -196,7 +205,10 @@ - #define CPU_34K 60 - #define CPU_PR4450 61 +@@ -200,7 +207,10 @@ #define CPU_SB1A 62 --#define CPU_LAST 62 -+#define CPU_BCM6338 63 -+#define CPU_BCM6345 64 -+#define CPU_BCM6348 65 -+#define CPU_LAST 65 + #define CPU_74K 63 + #define CPU_R14000 64 +-#define CPU_LAST 64 ++#define CPU_BCM6338 65 ++#define CPU_BCM6345 66 ++#define CPU_BCM6348 67 ++#define CPU_LAST 67 /* * ISA Level encodings -diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/mach-generic/param.h linux-2.6.16.7-patched/include/asm-mips/mach-generic/param.h ---- linux-2.6.16.7-generic-patched/include/asm-mips/mach-generic/param.h 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/include/asm-mips/mach-generic/param.h 2006-07-05 15:21:58.000000000 +0200 +--- linux-2.6.17/include/asm-mips/mach-generic/param.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/include/asm-mips/mach-generic/param.h 2006-07-13 19:17:26.000000000 +0200 @@ -8,6 +8,6 @@ #ifndef __ASM_MACH_GENERIC_PARAM_H #define __ASM_MACH_GENERIC_PARAM_H @@ -59,10 +53,9 @@ diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/mac +#define HZ 200 /* Internal kernel timer frequency */ #endif /* __ASM_MACH_GENERIC_PARAM_H */ -diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/module.h linux-2.6.16.7-patched/include/asm-mips/module.h ---- linux-2.6.16.7-generic-patched/include/asm-mips/module.h 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/include/asm-mips/module.h 2006-07-05 15:21:58.000000000 +0200 -@@ -113,6 +113,12 @@ search_module_dbetables(unsigned long ad +--- linux-2.6.17/include/asm-mips/module.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/include/asm-mips/module.h 2006-07-13 19:18:34.000000000 +0200 +@@ -113,6 +113,12 @@ #define MODULE_PROC_FAMILY "RM9000 " #elif defined CONFIG_CPU_SB1 #define MODULE_PROC_FAMILY "SB1 " From ce5b97a12852e6a4a6546f697f5a604be074eb8b Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Fri, 21 Jul 2006 09:15:06 +0000 Subject: [PATCH 361/757] add copyright statement SVN-Revision: 4184 --- openwrt/package/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index bcfb1699b53..7a3af2e6f78 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -1,4 +1,11 @@ -# Main makefile for the packages +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + include $(TOPDIR)/rules.mk include $(TOPDIR)/.config include $(TOPDIR)/.pkgdeps From cd9991c2b2abad85cad5ddf78f7966668c73ce29 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Fri, 21 Jul 2006 10:50:12 +0000 Subject: [PATCH 362/757] fix problems with new tar versions, closes #628 and #646 SVN-Revision: 4185 --- .../patches/130-tar_wildcards.patch | 23 +++++++++++++++++++ openwrt/toolchain/kernel-headers/Makefile | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 openwrt/toolchain/ipkg-utils/patches/130-tar_wildcards.patch diff --git a/openwrt/toolchain/ipkg-utils/patches/130-tar_wildcards.patch b/openwrt/toolchain/ipkg-utils/patches/130-tar_wildcards.patch new file mode 100644 index 00000000000..80a7d1db618 --- /dev/null +++ b/openwrt/toolchain/ipkg-utils/patches/130-tar_wildcards.patch @@ -0,0 +1,23 @@ +--- ipkg-utils-1.7/ipkg.py.orig 2006-06-29 14:16:00.000000000 +0200 ++++ ipkg-utils-1.7/ipkg.py 2006-06-29 14:36:01.000000000 +0200 +@@ -93,9 +93,9 @@ + self.filename = os.path.basename(fn) + ## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,)) + if self.isdeb: +- control = os.popen("ar p "+fn+" control.tar.gz | tar xfzO - '*control'","r") ++ control = os.popen("ar p "+fn+" control.tar.gz | tar xzO --wildcards -f - '*control'","r") + else: +- control = os.popen("tar xfzO "+fn+" '*control.tar.gz' | tar xfzO - '*control'","r") ++ control = os.popen("tar xzO --wildcards -f "+fn+" '*control.tar.gz' | tar xzO --wildcards -f - '*control'","r") + line = control.readline() + while 1: + if not line: break +@@ -122,7 +122,7 @@ + if self.isdeb: + data = os.popen("ar p "+fn+" data.tar.gz | tar tfz -","r") + else: +- data = os.popen("tar xfzO "+fn+" '*data.tar.gz' | tar tfz -","r") ++ data = os.popen("tar xzO --wildcards -f "+fn+" '*data.tar.gz' | tar tfz -","r") + while 1: + line = data.readline() + if not line: break diff --git a/openwrt/toolchain/kernel-headers/Makefile b/openwrt/toolchain/kernel-headers/Makefile index 7e08508b636..da525d5f376 100644 --- a/openwrt/toolchain/kernel-headers/Makefile +++ b/openwrt/toolchain/kernel-headers/Makefile @@ -31,7 +31,7 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ define Build/Prepare mkdir -p $(TOOL_BUILD_DIR) - bzcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - \ + bzcat $(DL_DIR)/$(PKG_SOURCE) | tar --wildcards -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - \ linux-$(PKG_VERSION)/include \ linux-$(PKG_VERSION)/Makefile \ linux-$(PKG_VERSION)/Rules.make \ From 4406e8dcc37910bee8856950fd0f188d067f255a Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Fri, 21 Jul 2006 11:01:36 +0000 Subject: [PATCH 363/757] revert [4106] as it breaks toolchain selection SVN-Revision: 4188 --- openwrt/toolchain/gcc/Config.version | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openwrt/toolchain/gcc/Config.version b/openwrt/toolchain/gcc/Config.version index a7bc9f5d6fe..5574acc478b 100644 --- a/openwrt/toolchain/gcc/Config.version +++ b/openwrt/toolchain/gcc/Config.version @@ -1,19 +1,19 @@ config GCC_VERSION string - default "3.4.4" if GCC_VERSION_3_4_4 || LINUX_2_4_BRCM + default "3.4.4" if GCC_VERSION_3_4_4 default "3.4.5" if GCC_VERSION_3_4_5 default "3.4.6" if GCC_VERSION_3_4_6 default "4.0.2" if GCC_VERSION_4_0_2 - default "4.0.3" if GCC_VERSION_4_0_3 || LINUX_2_6_ARUBA + default "4.0.3" if GCC_VERSION_4_0_3 default "4.1.0" if GCC_VERSION_4_1_0 default "4.1.1" if GCC_VERSION_4_1_1 default "3.4.6" if !TOOLCHAINOPTS config GCC_VERSION_3_4_4 - + default y if LINUX_2_4_BRCM config GCC_VERSION_4_0_3 - + default y if LINUX_2_6_ARUBA endif From 513d7ee67bbd2d334294eeb11a2f3a35402f512f Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Fri, 21 Jul 2006 11:04:33 +0000 Subject: [PATCH 364/757] make gcc 4.1.1 the default for Aruba SVN-Revision: 4189 --- openwrt/toolchain/gcc/Config.in | 2 +- openwrt/toolchain/gcc/Config.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/toolchain/gcc/Config.in b/openwrt/toolchain/gcc/Config.in index 6c584db4052..cee344a2628 100644 --- a/openwrt/toolchain/gcc/Config.in +++ b/openwrt/toolchain/gcc/Config.in @@ -2,7 +2,7 @@ choice prompt "GCC compiler Version" if TOOLCHAINOPTS - default GCC_VERSION_4_0_3 if LINUX_2_6_ARUBA + default GCC_VERSION_4_1_1 if LINUX_2_6_ARUBA default GCC_VERSION_3_4_4 if LINUX_2_4_BRCM default GCC_VERSION_3_4_6 help diff --git a/openwrt/toolchain/gcc/Config.version b/openwrt/toolchain/gcc/Config.version index 5574acc478b..286c4f578aa 100644 --- a/openwrt/toolchain/gcc/Config.version +++ b/openwrt/toolchain/gcc/Config.version @@ -12,7 +12,7 @@ config GCC_VERSION if !TOOLCHAINOPTS config GCC_VERSION_3_4_4 default y if LINUX_2_4_BRCM - config GCC_VERSION_4_0_3 + config GCC_VERSION_4_1_1 default y if LINUX_2_6_ARUBA endif From 3d2752f8b95e275ebfb28c905bb24175d24f4729 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Fri, 21 Jul 2006 11:10:32 +0000 Subject: [PATCH 365/757] upgrade dnsmasq to v2.32 SVN-Revision: 4190 --- openwrt/package/dnsmasq/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index 8d76f378e79..0efb349bc8c 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_VERSION:=2.27 +PKG_VERSION:=2.32 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_MD5SUM:=489198ec87101087043adc98bbe062dc +PKG_MD5SUM:=d1f593a8352db1d6ad3dccc9b775295d PKG_CAT:=zcat include $(INCLUDE_DIR)/package.mk From 4d2f748fd2870eff5b76dcc4b5204e41e448d290 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Jul 2006 14:27:45 +0000 Subject: [PATCH 366/757] add submenu dependencies (used to hide the proprietary broadcom driver on anything except for brcm-2.4) SVN-Revision: 4197 --- openwrt/include/package.mk | 5 +++++ openwrt/package/broadcom-wl/Makefile | 1 + openwrt/scripts/gen_menuconfig.pl | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 38fd93df733..757c8396aeb 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -83,6 +83,7 @@ define Package/Default DEFAULT:= MENU:= SUBMENU:= + SUBMENUDEP:= TITLE:= DESCRIPTION:= endef @@ -142,6 +143,10 @@ define BuildPackage ifneq ($(SUBMENU),) DUMPINFO += \ echo "Submenu: $(SUBMENU)"; + ifneq ($(SUBMENUDEP),) + DUMPINFO += \ + echo "Submenu-Depends: $(SUBMENUDEP)"; + endif endif ifneq ($(DEFAULT),) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 961baac55a5..e6f322f4c64 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -28,6 +28,7 @@ define Package/kmod-brcm-wl DEPENDS:=@LINUX_2_4_BRCM DEFAULT:=y SUBMENU:=Proprietary BCM43xx WiFi driver + SUBMENUDEP:=@LINUX_2_4_BRCM TITLE:=Kernel driver (normal version) DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE) diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index e62363e6303..ddce86bfa1c 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -13,6 +13,7 @@ my $makefile; my $pkg; my %category; my $cur_menu; +my $cur_menu_dep; sub print_category($) { my $cat = shift; @@ -26,10 +27,15 @@ sub print_category($) { if ($cur_menu ne $pkg->{submenu}) { if ($cur_menu) { print "endmenu\n"; + $cur_menu_dep and do { + print "endif\n"; + $cur_menu_dep = undef; + }; undef $cur_menu; } if ($pkg->{submenu}) { $cur_menu = $pkg->{submenu}; + $cur_menu_dep = $pkg->{submenudep} and print "if $cur_menu_dep\n"; print "menu \"$cur_menu\"\n"; } } @@ -84,6 +90,7 @@ while ($line = <>) { $line =~ /^Title: \s*(.+)\s*$/ and $pkg->{title} = $1; $line =~ /^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1; $line =~ /^Submenu: \s*(.+)\s*$/ and $pkg->{submenu} = $1; + $line =~ /^Submenu-Depends: \s*(.+)\s*$/ and $pkg->{submenudep} = $1; $line =~ /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1; $line =~ /^Depends: \s*(.+)\s*$/ and do { my @dep = split /\s+/, $1; From cd42bf72d9fc911e9c47f9d7b6c83bd7547415c2 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 21 Jul 2006 17:00:14 +0000 Subject: [PATCH 367/757] fix a few directories missed in [4176]'s source -> download SVN-Revision: 4198 --- openwrt/Makefile | 2 +- openwrt/include/host-build.mk | 4 ++-- openwrt/include/image.mk | 2 +- openwrt/include/kernel-build.mk | 2 +- openwrt/target/image/brcm/lzma-loader/Makefile | 2 +- openwrt/target/image/generic/lzma-loader/Makefile | 2 +- openwrt/target/linux/Makefile | 4 ++-- openwrt/target/linux/ar7-2.4/Makefile | 4 ++-- openwrt/target/sdk/Makefile | 2 +- openwrt/target/utils/Makefile | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 27526d09a85..e2e467cd8c2 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -66,7 +66,7 @@ menuconfig: ./scripts/config/mconf FORCE $< Config.in config-clean: FORCE - $(MAKE) -C scripts/config clean + $(NO_TRACE_MAKE) -C scripts/config clean package/%: .pkginfo FORCE $(MAKE) -C package $(patsubst package/%,%,$@) diff --git a/openwrt/include/host-build.mk b/openwrt/include/host-build.mk index 43c83142dfe..9a5a41317ef 100644 --- a/openwrt/include/host-build.mk +++ b/openwrt/include/host-build.mk @@ -64,7 +64,7 @@ endef ifneq ($(strip $(PKG_SOURCE)),) - source: $(DL_DIR)/$(PKG_SOURCE) + download: $(DL_DIR)/$(PKG_SOURCE) $(DL_DIR)/$(PKG_SOURCE): mkdir -p $(DL_DIR) @@ -101,7 +101,7 @@ define HostBuild $(call Build/Uninstall) rm -f $(STAGING_DIR)/stampfiles/.host_$(PKG_NAME)-installed - source: + download: prepare: $(PKG_BUILD_DIR)/.prepared configure: $(PKG_BUILD_DIR)/.configured diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk index 54f0e8b6bc9..87d6815ee83 100644 --- a/openwrt/include/image.mk +++ b/openwrt/include/image.mk @@ -87,7 +87,7 @@ compile-targets: install-targets: clean-targets: -source: +download: prepare: compile: compile-targets install: compile install-targets diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 3fb96e1007a..38ea9a18eb9 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -106,7 +106,7 @@ pkg-install: FORCE $(IPKG) install $$pkg || echo; \ done -source: $(DL_DIR)/$(LINUX_SOURCE) +download: $(DL_DIR)/$(LINUX_SOURCE) prepare: $(LINUX_DIR)/.configured @mkdir -p $(LINUX_DIR) $(PACKAGE_DIR) diff --git a/openwrt/target/image/brcm/lzma-loader/Makefile b/openwrt/target/image/brcm/lzma-loader/Makefile index 2f9117bcac5..a31ddf1b7f2 100644 --- a/openwrt/target/image/brcm/lzma-loader/Makefile +++ b/openwrt/target/image/brcm/lzma-loader/Makefile @@ -20,7 +20,7 @@ $(PKG_BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/.prepared $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC) \ LD=$(TARGET_CROSS)ld CROSS_COMPILE=$(TARGET_CROSS) -source: +download: prepare: $(PKG_BUILD_DIR)/.prepared compile: $(PKG_BUILD_DIR)/loader.gz install: diff --git a/openwrt/target/image/generic/lzma-loader/Makefile b/openwrt/target/image/generic/lzma-loader/Makefile index 29f9f3b0589..6cbbd942ccb 100644 --- a/openwrt/target/image/generic/lzma-loader/Makefile +++ b/openwrt/target/image/generic/lzma-loader/Makefile @@ -33,7 +33,7 @@ $(PKG_BUILD_DIR)/vmlinux.lzma: $(KDIR)/vmlinux.lzma $(KDIR)/loader.elf: $(PKG_BUILD_DIR)/lzma.elf $(CP) $< $@ -source: +download: prepare: $(PKG_BUILD_DIR)/.prepared compile: $(KDIR)/loader.elf install: diff --git a/openwrt/target/linux/Makefile b/openwrt/target/linux/Makefile index 9afda46c860..8682fc2b9b0 100644 --- a/openwrt/target/linux/Makefile +++ b/openwrt/target/linux/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk -source: - $(MAKE) -C $(BOARD)-$(KERNEL) source +download: + $(MAKE) -C $(BOARD)-$(KERNEL) download prepare: rm -f $(TOPDIR)/.kernel.mk diff --git a/openwrt/target/linux/ar7-2.4/Makefile b/openwrt/target/linux/ar7-2.4/Makefile index a766b50457b..d385722e030 100644 --- a/openwrt/target/linux/ar7-2.4/Makefile +++ b/openwrt/target/linux/ar7-2.4/Makefile @@ -46,7 +46,7 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked # ATM firmware for the DSL modem ############################################### -DOWNLOAD_SITE=http://openwrt.org/downloads/sources +DOWNLOAD_SITE=http://openwrt.org/downloads/downloads # extracted from netgear DG834B V1.0.5 GPL release ATM_FIRMWARE_FILE=$(ATM_FIRMWARE_DIR).tar.gz ATM_FIRMWARE_MD5SUM=8bfcb31109796502d66b11baaeb2fba6 @@ -54,7 +54,7 @@ ATM_FIRMWARE_MD5SUM=8bfcb31109796502d66b11baaeb2fba6 $(DL_DIR)/$(ATM_FIRMWARE_FILE): $(SCRIPT_DIR)/download.pl $(DL_DIR) $(ATM_FIRMWARE_FILE) $(ATM_FIRMWARE_MD5SUM) $(DOWNLOAD_SITE) -source: $(DL_DIR)/$(ATM_FIRMWARE_FILE) +download: $(DL_DIR)/$(ATM_FIRMWARE_FILE) $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(ATM_FIRMWARE_FILE) $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.drivers-unpacked $(LINUX_DIR)/.modules_done: $(LINUX_DIR)/.drivers-unpacked diff --git a/openwrt/target/sdk/Makefile b/openwrt/target/sdk/Makefile index 0552b0aaa81..a8413562b2c 100644 --- a/openwrt/target/sdk/Makefile +++ b/openwrt/target/sdk/Makefile @@ -38,7 +38,7 @@ $(BIN_DIR)/$(SDK_NAME).tar.bz2: tar cfj $@ $(SDK_NAME); \ ) -source: +download: prepare: compile: $(BIN_DIR)/$(SDK_NAME).tar.bz2 install: diff --git a/openwrt/target/utils/Makefile b/openwrt/target/utils/Makefile index 855f55267ac..c7b9a049804 100644 --- a/openwrt/target/utils/Makefile +++ b/openwrt/target/utils/Makefile @@ -10,7 +10,7 @@ TARGETS := addpattern trx motorola-bin dgfirmware UTILS_BUILD_DIR:=$(BUILD_DIR)/target-utils -source: +download: prepare: $(UTILS_BUILD_DIR) compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) FORCE mkdir -p $(STAGING_DIR)/bin From d8521a8efc7c49bdae73388b05d1f829a0c327a9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Jul 2006 22:48:58 +0000 Subject: [PATCH 368/757] fix menu/submenu nesting SVN-Revision: 4200 --- openwrt/scripts/gen_menuconfig.pl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl index ddce86bfa1c..fe013109288 100755 --- a/openwrt/scripts/gen_menuconfig.pl +++ b/openwrt/scripts/gen_menuconfig.pl @@ -15,6 +15,17 @@ my %category; my $cur_menu; my $cur_menu_dep; +sub close_submenu { + if ($cur_menu) { + print "endmenu\n"; + $cur_menu_dep and do { + print "endif\n"; + $cur_menu_dep = undef; + }; + undef $cur_menu; + } +} + sub print_category($) { my $cat = shift; @@ -25,14 +36,7 @@ sub print_category($) { foreach my $spkg (sort {uc($a) cmp uc($b)} keys %spkg) { foreach my $pkg (@{$spkg{$spkg}}) { if ($cur_menu ne $pkg->{submenu}) { - if ($cur_menu) { - print "endmenu\n"; - $cur_menu_dep and do { - print "endif\n"; - $cur_menu_dep = undef; - }; - undef $cur_menu; - } + close_submenu(); if ($pkg->{submenu}) { $cur_menu = $pkg->{submenu}; $cur_menu_dep = $pkg->{submenudep} and print "if $cur_menu_dep\n"; @@ -66,6 +70,7 @@ sub print_category($) { $pkg->{config} and print $pkg->{config}."\n"; } } + close_submenu(); print "endmenu\n\n"; undef $category{$cat}; From 1223ad9ec939d036c200d8308bc77d87003c64a6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 21 Jul 2006 22:51:02 +0000 Subject: [PATCH 369/757] fix kernel module defaults SVN-Revision: 4201 --- openwrt/package/kernel/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index 0a26cd6cf19..14fcda288df 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -30,7 +30,7 @@ endef define KernelPackage/Defaults FILES:= -KCONFIG:= +KCONFIG:=m AUTOLOAD:= endef @@ -67,8 +67,11 @@ define KernelPackage TITLE:=$(TITLE) SECTION:=kernel CATEGORY:=Kernel modules + DEFAULT:=m DESCRIPTION:=$(DESCRIPTION) EXTRA_DEPENDS:='kernel (=$(PKG_VERSION))' + $(call KernelPackage/$(1)) + $(call KernelPackage/$(1)/$(KERNEL)) endef define Package/kmod-$(1)/install From 8eb536488a4f99383704123414dd23666c946284 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Sat, 22 Jul 2006 01:48:29 +0000 Subject: [PATCH 370/757] Added a readme to the uml target for a quick start SVN-Revision: 4202 --- openwrt/target/linux/uml-2.6/README | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 openwrt/target/linux/uml-2.6/README diff --git a/openwrt/target/linux/uml-2.6/README b/openwrt/target/linux/uml-2.6/README new file mode 100644 index 00000000000..b0148309213 --- /dev/null +++ b/openwrt/target/linux/uml-2.6/README @@ -0,0 +1,30 @@ +Openwrt inside a user mode linux. Why would we even want this many ask? + +There are potentially a lot of reasons, one obvious one to me, it allows +folks to 'kick the tires' without actually flashing up any hardware. It's +also a great environment for porting over packages, you can get a package +fully functional in the uclibc root environment inside a uml without actually +disturbing your 'real router', and then rebuild for a specific target once +it's fully tested. + +This is a first stab at a build that 'just works' and there will be more +cleanup to come. The simple directions are:- + +Configure for uml target +Configure with an ext2 root file system +build it all + +In your bin directory you will find a kernel and an ext2 root file system +when it's finished. Just run it like this:- + +bin/openwrt-uml-2.6-vmlinux ubd0=bin/openwrt-uml-2.6-ext2.img + +The uml will start, and bring up an xterm with the serial console in it. No +networking is configured, but, it's a starting point. The resulting file system +has just enough free space to start kicking the tires and playing in the world of +'embedded routers' along with all the resource restrictions that come with that +world. + +To configure networking and more, refer to the user mode linux documentation online + +http://user-mode-linux.sourceforge.net/ From 3b7bea181ab9730f543361dc9735f8a035ac4ffe Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 22 Jul 2006 11:43:48 +0000 Subject: [PATCH 371/757] fix prereqs SVN-Revision: 4203 --- openwrt/include/prereq.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/prereq.mk b/openwrt/include/prereq.mk index 6642ce40e38..cbd26be1248 100644 --- a/openwrt/include/prereq.mk +++ b/openwrt/include/prereq.mk @@ -29,7 +29,7 @@ define Require prereq-$(1): $(TMP_DIR) FORCE echo -n "Checking '$(1)'... " - if $(NO_TRACE_MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ + if $(MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ echo 'ok.'; \ else \ echo 'failed.'; \ @@ -59,7 +59,7 @@ define Require/working-make echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk - $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk + $(MAKE) -f $(TMP_DIR)/check.mk endef $(eval $(call Require,working-make, \ From 79e9e338c958aedde5a0552c71199d3f7e16c74e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 22 Jul 2006 12:04:08 +0000 Subject: [PATCH 372/757] revert last prereq.mk - seems to be a different issue SVN-Revision: 4204 --- openwrt/include/prereq.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/prereq.mk b/openwrt/include/prereq.mk index cbd26be1248..6642ce40e38 100644 --- a/openwrt/include/prereq.mk +++ b/openwrt/include/prereq.mk @@ -29,7 +29,7 @@ define Require prereq-$(1): $(TMP_DIR) FORCE echo -n "Checking '$(1)'... " - if $(MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ + if $(NO_TRACE_MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ echo 'ok.'; \ else \ echo 'failed.'; \ @@ -59,7 +59,7 @@ define Require/working-make echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk - $(MAKE) -f $(TMP_DIR)/check.mk + $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk endef $(eval $(call Require,working-make, \ From 2a08d05aa305c9e57bfe563fa4399303475a9684 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 22 Jul 2006 12:16:26 +0000 Subject: [PATCH 373/757] fix NO_TRACE_MAKE SVN-Revision: 4205 --- openwrt/include/verbose.mk | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 7d9b3979bff..525fbf1c157 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -6,13 +6,16 @@ # # $Id:$ -export NO_TRACE_MAKE:=$(MAKE) V=99 +ifeq ($(NO_TRACE_MAKE),) +NO_TRACE_MAKE := $(MAKE) V=99 +export NO_TRACE_MAKE +endif ifndef KBUILD_VERBOSE - KBUILD_VERBOSE=0 - ifeq ("$(origin V)", "command line") - KBUILD_VERBOSE=$(V) - endif + KBUILD_VERBOSE:=0 +endif +ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE:=$(V) endif ifneq ($(KBUILD_VERBOSE),99) From daa509ea7fa0b2c79b84cb476aee5dcecae54684 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 22 Jul 2006 12:33:28 +0000 Subject: [PATCH 374/757] port over the netfilter module packaging to the new system and fix iptables dependencies SVN-Revision: 4206 --- openwrt/include/modules-2.4.mk | 59 ----------- openwrt/include/modules-2.6.mk | 61 ----------- openwrt/include/netfilter.mk | 6 +- openwrt/package/iptables/Makefile | 16 +-- openwrt/package/kernel/Makefile | 1 + openwrt/package/kernel/modules.mk | 160 ++++++++++++++++++++++++++++ openwrt/target/linux/Config.in | 169 ------------------------------ 7 files changed, 171 insertions(+), 301 deletions(-) diff --git a/openwrt/include/modules-2.4.mk b/openwrt/include/modules-2.4.mk index 93a89737344..4f2d0b5dd0b 100644 --- a/openwrt/include/modules-2.4.mk +++ b/openwrt/include/modules-2.4.mk @@ -17,10 +17,6 @@ $(eval $(call KMOD_template,GRE,gre,\ $(MODULES_DIR)/kernel/net/ipv4/ip_gre.o \ ,CONFIG_NET_IPGRE)) -$(eval $(call KMOD_template,IMQ,imq,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.o \ - $(MODULES_DIR)/kernel/drivers/net/imq.o \ -)) $(eval $(call KMOD_template,IPIP,ipip,\ $(MODULES_DIR)/kernel/net/ipv4/ipip.o \ ,CONFIG_NET_IPIP,,60,ipip)) @@ -56,61 +52,6 @@ $(eval $(call KMOD_template,TUN,tun,\ $(MODULES_DIR)/kernel/drivers/net/tun.o \ ,CONFIG_TUN,,20,tun)) -# Filtering / Firewalling - -$(eval $(call KMOD_template,ARPTABLES,arptables,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.o \ -,CONFIG_IP_NF_ARPTABLES)) - -$(eval $(call KMOD_template,EBTABLES,ebtables,\ - $(MODULES_DIR)/kernel/net/bridge/netfilter/*.o \ -,CONFIG_BRIDGE_NF_EBTABLES)) - -# metapackage for compatibility ... -$(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\ -,,kmod-ipt-conntrack kmod-ipt-extra kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-queue kmod-ipt-ulogd)) - -$(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\ - $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\ - $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\ - $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\ - $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\ - $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_NAT,ipt-nat,\ - $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\ - $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -,,,40,$(IPT_NAT_EXTRA-m))) - -$(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\ - $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\ - $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IP6TABLES,ip6tables,\ - $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.o \ -,CONFIG_IP6_NF_IPTABLES,kmod-ipv6)) - - # Block devices $(eval $(call KMOD_template,LOOP,loop,\ diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index 56129343f35..dab735576a8 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -19,11 +19,6 @@ $(eval $(call KMOD_template,GRE,gre,\ $(MODULES_DIR)/kernel/net/ipv4/ip_gre.ko \ ,CONFIG_NET_IPGRE)) -$(eval $(call KMOD_template,IMQ,imq,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.ko \ - $(MODULES_DIR)/kernel/drivers/net/imq.ko \ -,CONFIG_IMQ)) - $(eval $(call KMOD_template,IPIP,ipip,\ $(MODULES_DIR)/kernel/net/ipv4/ipip.ko \ ,CONFIG_NET_IPIP,,60,ipip)) @@ -60,62 +55,6 @@ $(eval $(call KMOD_template,TUN,tun,\ $(MODULES_DIR)/kernel/drivers/net/tun.ko \ ,CONFIG_TUN,,20,tun)) - -# Filtering / Firewalling - -$(eval $(call KMOD_template,ARPTABLES,arptables,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.ko \ -,CONFIG_IP_NF_ARPTABLES)) - -$(eval $(call KMOD_template,EBTABLES,ebtables,\ - $(MODULES_DIR)/kernel/net/bridge/netfilter/*.ko \ -,CONFIG_BRIDGE_NF_EBTABLES)) - -# metapackage for compatibility ... -$(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\ -,,kmod-ipt-conntrack kmod-ipt-extra kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-queue kmod-ipt-ulogd)) - -$(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\ - $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\ - $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\ - $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\ - $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\ - $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_NAT,ipt-nat,\ - $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\ - $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -,,,40,$(IPT_NAT_EXTRA-m))) - -$(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\ - $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\ - $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IP6TABLES,ip6tables,\ - $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.ko \ -,CONFIG_IP6_NF_IPTABLES,kmod-ipv6)) - - # Block devices $(eval $(call KMOD_template,LOOP,loop,\ diff --git a/openwrt/include/netfilter.mk b/openwrt/include/netfilter.mk index 236d4b2429f..d4ec0f3915d 100644 --- a/openwrt/include/netfilter.mk +++ b/openwrt/include/netfilter.mk @@ -6,12 +6,9 @@ # # $Id: netfilter.mk 2411 2005-11-11 03:41:43Z nico $ -ifeq ($(NF_2_6),1) +ifeq ($(NF_KMOD),1) P_V4:=ipv4/netfilter/ P_XT:=netfilter/ -else -P_V4:= -P_XT:= endif IPT_CONNTRACK-m := @@ -84,6 +81,7 @@ IPT_NAT-$(CONFIG_IP_NF_NAT) += $(P_V4)ipt_SNAT $(P_V4)ipt_DNAT IPT_NAT-$(CONFIG_IP_NF_TARGET_MASQUERADE) += $(P_V4)ipt_MASQUERADE IPT_NAT-$(CONFIG_IP_NF_TARGET_MIRROR) += $(P_V4)ipt_MIRROR IPT_NAT-$(CONFIG_IP_NF_TARGET_REDIRECT) += $(P_V4)ipt_REDIRECT +IPT_NAT-$(CONFIG_IP_NF_TARGET_NETMAP) += $(P_V4)ipt_NETMAP IPT_NAT_EXTRA-m := IPT_NAT_EXTRA-$(CONFIG_IP_NF_AMANDA) += $(P_V4)ip_conntrack_amanda diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 54a94f2c97d..99ef3347c0c 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -49,7 +49,7 @@ endef define Package/iptables-mod-conntrack SECTION:=net CATEGORY:=Base system -DEPENDS:=iptables +DEPENDS:=iptables +kmod-ipt-conntrack TITLE:=connection tracking modules DESCRIPTION:=iptables extensions for connection tracking \\\ Includes: \\\ @@ -61,7 +61,7 @@ endef define Package/iptables-mod-filter SECTION:=net CATEGORY:=Base system -DEPENDS:=iptables +DEPENDS:=iptables +kmod-ipt-filter TITLE:=filter modules DESCRIPTION:=iptables extensions for packet content inspection\\\ Includes: \\\ @@ -73,7 +73,7 @@ define Package/iptables-mod-imq SECTION:=net CATEGORY:=Base system DEPENDS:=iptables -TITLE:=IMQ support +TITLE:=IMQ support +kmod-imq DESCRIPTION:=iptables extension for IMQ support\\\ Includes: \\\ * libipt_IMQ @@ -82,7 +82,7 @@ endef define Package/iptables-mod-ipopt SECTION:=net CATEGORY:=Base system -DEPENDS:=iptables +DEPENDS:=iptables +kmod-ipt-ipopt TITLE:=IP/Packet option modules DESCRIPTION:=iptables extensions for matching/changing IP packet options\\\ Includes: \\\ @@ -99,7 +99,7 @@ endef define Package/iptables-mod-ipsec SECTION:=net CATEGORY:=Base system -DEPENDS:=iptables +DEPENDS:=iptables +kmod-ipt-ipsec TITLE:=IPSec extensions DESCRIPTION:=iptables extensions for matching ipsec traffic\\\ Includes: \\\ @@ -110,7 +110,7 @@ endef define Package/iptables-mod-nat SECTION:=net CATEGORY:=Base system -DEPENDS:=iptables +DEPENDS:=iptables +kmod-ipt-nat TITLE:=extra NAT targets DESCRIPTION:=iptables extensions for different NAT targets\\\ Includes: \\\ @@ -120,7 +120,7 @@ endef define Package/iptables-mod-ulog SECTION:=net CATEGORY:=Base system -DEPENDS:=iptables +DEPENDS:=iptables +kmod-ipt-ulog TITLE:=user-space packet logging DESCRIPTION:=iptables extensions for user-space packet logging\\\ Includes: \\\ @@ -130,7 +130,7 @@ endef define Package/iptables-mod-extra SECTION:=net CATEGORY:=Base system -DEPENDS:=iptables +DEPENDS:=iptables +kmod-ipt-extra TITLE:=other extra iptables extensions DESCRIPTION:=other extra iptables extensions\\\ Includes: \\\ diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index 14fcda288df..39978ab9f1b 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -18,6 +18,7 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) -include $(LINUX_DIR)/.config +NF_KMOD:=1 include $(INCLUDE_DIR)/netfilter.mk endif diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index ff979cf8686..f1e1009d107 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -63,4 +63,164 @@ AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old) endef $(eval $(call KernelPackage,ide-pdc202xx)) +NFMENU:=Netfilter Extensions + +define KernelPackage/ipt-conntrack +TITLE:=Modules for connection tracking +DESCRIPTION:=Netfilter (IPv4) kernel modules for connection tracking\\\ +Includes: \\\ + * ipt_conntrack \\\ + * ipt_helper \\\ + * ipt_connmark/CONNMARK +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-conntrack)) + + +define KernelPackage/ipt-filter +TITLE:=Modules for packet content inspection +DESCRIPTION:=Netfilter (IPv4) kernel modules for packet content inspection \\\ +Includes: \\\ + * ipt_ipp2p \\\ + * ipt_layer7 +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-filter)) + + +define KernelPackage/ipt-ipopt +TITLE:=Modules for matching/changing IP packet options +DESCRIPTION:=Netfilter (IPv4) modules for matching/changing IP packet options \\\ +Includes: \\\ + * ipt_dscp/DSCP \\\ + * ipt_ecn/ECN \\\ + * ipt_length \\\ + * ipt_mac \\\ + * ipt_tos/TOS \\\ + * ipt_tcpmms \\\ + * ipt_ttl/TTL \\\ + * ipt_unclean +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-ipopt)) + + +define KernelPackage/ipt-ipsec +TITLE:=Modules for matching IPSec packets +DESCRIPTION:=Netfilter (IPv4) modules for matching IPSec packets \\\ +Includes: \\\ + * ipt_ah \\\ + * ipt_esp +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-ipsec)) + + +define KernelPackage/ipt-nat +TITLE:=Modules for extra NAT targets +DESCRIPTION:=Netfilter (IPv4) modules for extra NAT targets \\\ +Includes: \\\ + * ipt_REDIRECT \\\ + * ipt_NETMAP +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-nat)) + +define KernelPackage/ipt-nathelper +TITLE:=Extra Conntrack and NAT helpers +DESCRIPTION:=Extra Conntrack and NAT helpers (IPv4) \\\ +Includes: \\\ + * ip_conntrack_amanda \\\ + * ip_conntrack_proto_gre \\\ + * ip_nat_proto_gre \\\ + * ip_conntrack_pptp \\\ + * ip_nat_pptp \\\ + * ip_conntrack_sip \\\ + * ip_nat_sip \\\ + * ip_nat_snmp_basic \\\ + * ip_conntrack_tftp +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-nathelper)) + +define KernelPackage/ipt-imq +TITLE:=Intermediate Queueing support +DESCRIPTION:=Kernel support for Intermediate Queueing devices +KCONFIG:=$(CONFIG_IMQ) +SUBMENU:=$(NFMENU) +FILES:= \ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.$(LINUX_KMOD_SUFFIX) \ + $(MODULES_DIR)/kernel/drivers/net/imq.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,imq)) + + +define KernelPackage/ipt-queue +TITLE:=Module for user-space packet queueing +DESCRIPTION:=Netfilter (IPv4) module for user-space packet queueing \\\ +Includes: \\\ + * ipt_QUEUE +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-queue)) + +define KernelPackage/ipt-ulog +TITLE:=Module for user-space packet logging +DESCRIPTION:=Netfilter (IPv4) module for user-space packet logging \\\ +Includes: \\\ + * ipt_ULOG +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-ulog)) + +define KernelPackage/ipt-extra +TITLE:=Extra modules +DESCRIPTION:=Other Netfilter (IPv4) kernel modules\\\ +Includes: \\\ + * ipt_limit \\\ + * ipt_owner \\\ + * ipt_physdev \\\ + * ipt_pkttype \\\ + * ipt_recent +SUBMENU:=$(NFMENU) +FILES:=$(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) +endef +$(eval $(call KernelPackage,ipt-extra)) + +define KernelPackage/ip6tables +TITLE:=IPv6 modules +DESCRIPTION:=Netfilter IPv6 firewalling support +SUBMENU:=$(NFMENU) +FILES:=$(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,ip6tables)) + + +define KernelPackage/arptables +TITLE:=ARP firewalling modules +DESCRIPTION:=Kernel modules for ARP firewalling +SUBMENU:=$(NFMENU) +FILES:=$(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX) +KCONFIG:=$(CONFIG_IP_NF_ARPTABLES) +endef +$(eval $(call KernelPackage,arptables)) + + +define KernelPackage/ebtables +TITLE:=Bridge firewalling modules +DESCRIPTION:=Kernel modules for Ethernet Bridge firewalling +SUBMENU:=$(NFMENU) +FILES:=$(MODULES_DIR)/kernel/net/bridge/netfilter/*.$(LINUX_KMOD_SUFFIX) +KCONFIG:=$(CONFIG_BRIDGE_NF_EBTABLES) +endef +$(eval $(call KernelPackage,ebtables)) + diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 47d87775de5..2fcb95f295a 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -23,13 +23,6 @@ config PACKAGE_KMOD_GRE help Kernel support for GRE tunnels -config PACKAGE_KMOD_IMQ - prompt "kmod-imq.......................... Intermediate Queueing device" - tristate - default m - help - Kernel support for the Intermediate Queueing device - config PACKAGE_KMOD_IPIP prompt "kmod-ipip......................... IP in IP encapsulation support" tristate @@ -101,168 +94,6 @@ config PACKAGE_KMOD_TUN endmenu -menu "Filtering/Firewalling" - -config PACKAGE_KMOD_ARPTABLES - prompt "kmod-arptables.................... ARP firewalling support" - tristate - default m - help - Kernel modules for ARP firewalling - -config PACKAGE_KMOD_EBTABLES - prompt "kmod-ebtables..................... Ethernet Bridge firewalling support" - tristate - default m - help - Kernel modules for bridge firewalling - -config PACKAGE_KMOD_IPTABLES - prompt "kmod-iptables..................... Core Netfilter modules for IPv4 firewalling" - tristate - default y - help - Kernel modules for IPv4 firewalling - -config PACKAGE_KMOD_IPTABLES_EXTRA - prompt "kmod-iptables-extra............... Extra Netfilter modules for IPv4 firewalling (meta-package)" - tristate - default m - select PACKAGE_KMOD_IPT_CONNTRACK - select PACKAGE_KMOD_IPT_FILTER - select PACKAGE_KMOD_IPT_IPOPT - select PACKAGE_KMOD_IPT_IPSEC - select PACKAGE_KMOD_IPT_NAT - select PACKAGE_KMOD_IPT_NAT_EXTRA - select PACKAGE_KMOD_IPT_QUEUE - select PACKAGE_KMOD_IPT_ULOG - select PACKAGE_KMOD_IPT_EXTRA - help - Extra Netfilter kernel modules for IPv4 firewalling (meta-package) - -config PACKAGE_KMOD_IPT_CONNTRACK - prompt "kmod-ipt-conntrack................ Netfilter modules for connection tracking" - tristate - default m - help - Netfilter (IPv4) kernel modules for connection tracking - - Includes: - * ipt_conntrack - * ipt_helper - * ipt_connmark/CONNMARK - -config PACKAGE_KMOD_IPT_FILTER - prompt "kmod-ipt-filter................... Netfilter modules for packet content inspection" - tristate - default m - help - Netfilter (IPv4) kernel modules for packet content inspection - - Includes: - * ipt_ipp2p - * ipt_layer7 - -config PACKAGE_KMOD_IPT_IPOPT - prompt "kmod-ipt-ipopt.................... Netfilter modules for matching/changing IP packet options" - tristate - default m - help - Netfilter (IPv4) kernel modules for matching/changing IP packet options - - Includes: - * ipt_dscp/DSCP - * ipt_ecn/ECN - * ipt_length - * ipt_mac - * ipt_tos/TOS - * ipt_tcpmms - * ipt_ttl/TTL - * ipt_unclean - -config PACKAGE_KMOD_IPT_IPSEC - prompt "kmod-ipt-ipsec.................... Netfilter modules for matching IPsec packets" - tristate - default m - help - Netfilter (IPv4) kernel modules for matching IPsec packets - - Includes: - * ipt_ah - * ipt_esp - -config PACKAGE_KMOD_IPT_NAT - prompt "kmod-ipt-nat...................... Netfilter modules for different NAT targets" - tristate - default m - help - Netfilter (IPv4) kernel modules for different NAT targets - - Includes: - * ipt_REDIRECT - -config PACKAGE_KMOD_IPT_NAT_EXTRA - prompt "kmod-ipt-nat-extra................ Extra Netfilter NAT modules for special protocols" - tristate - default m - help - Extra Netfilter (IPv4) NAT kernel modules for special protocols - - Includes: - * ip_conntrack_amanda - * ip_conntrack_proto_gre - * ip_nat_proto_gre - * ip_conntrack_pptp - * ip_nat_pptp - * ip_conntrack_sip - * ip_nat_sip - * ip_nat_snmp_basic - * ip_conntrack_tftp - -config PACKAGE_KMOD_IPT_QUEUE - prompt "kmod-ipt-queue.................... Netfilter module for user-space packet queueing" - tristate - default m - help - Netfilter (IPv4) module for user-space packet queueing - - Includes: - * ipt_QUEUE - -config PACKAGE_KMOD_IPT_ULOG - prompt "kmod-ipt-ulog..................... Netfilter module for user-space packet logging" - tristate - default m - help - Netfilter (IPv4) module for user-space packet logging - - Includes: - * ipt_ULOG - -config PACKAGE_KMOD_IPT_EXTRA - prompt "kmod-ipt-extra.................... Other extra Netfilter modules" - tristate - default m - help - Other extra Netfilter (IPv4) kernel modules - - Includes: - * ipt_limit - * ipt_owner - * ipt_physdev - * ipt_pkttype - * ipt_recent - -config PACKAGE_KMOD_IP6TABLES - prompt "kmod-ip6tables.................... Kernel modules for ip6tables" - tristate - default m - depends PACKAGE_KMOD_IPV6 - help - IPv6 firewalling support - -endmenu - menu "Block devices support" config PACKAGE_kmod-ide-core From df5a64a875511fd080072e26800af6676412348c Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sat, 22 Jul 2006 16:33:33 +0000 Subject: [PATCH 375/757] add genext2fs to build ext2 filesystem images SVN-Revision: 4213 --- openwrt/include/image.mk | 2 +- openwrt/toolchain/Makefile | 2 +- openwrt/toolchain/ext2fs/Makefile | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 openwrt/toolchain/ext2fs/Makefile diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk index 87d6815ee83..ba3cfb8afa9 100644 --- a/openwrt/include/image.mk +++ b/openwrt/include/image.mk @@ -47,7 +47,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) ifeq ($(CONFIG_TARGET_ROOTFS_EXT2FS),y) define Image/mkfs/ext2 - genext2fs -q -b 4096 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2 + $(STAGING_DIR)/bin/genext2fs -q -b 4096 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2 $(call Image/Build,ext2) endef endif diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index 4ffc46fb346..92069acb985 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -7,7 +7,7 @@ # Main makefile for the toolchain # include $(TOPDIR)/rules.mk -TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma +TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma TARGETS-$(CONFIG_GDB) += gdb TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y)) diff --git a/openwrt/toolchain/ext2fs/Makefile b/openwrt/toolchain/ext2fs/Makefile new file mode 100644 index 00000000000..0bd24f8fa91 --- /dev/null +++ b/openwrt/toolchain/ext2fs/Makefile @@ -0,0 +1,30 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=genext2fs +PKG_VERSION:=1.4rc1 + +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=664431bf6737df1c265500e1f0b5d40c +PKG_CAT:=zcat + +include $(INCLUDE_DIR)/host-build.mk + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) all +endef + +define Build/Install + install -m0755 $(PKG_BUILD_DIR)/genext2fs $(STAGING_DIR)/bin/ +endef + +$(eval $(call HostBuild)) From b99cbf52672a7a00833a58af5cfd3ff768e362db Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 23 Jul 2006 14:21:26 +0000 Subject: [PATCH 376/757] bugfixes for the kernel module packaging SVN-Revision: 4236 --- openwrt/package/kernel/Makefile | 16 +++++++--------- openwrt/package/kernel/modules.mk | 8 +++----- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index 39978ab9f1b..c977501e089 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -60,10 +60,6 @@ define KernelPackage $(eval $(call KernelPackage/$(1))) $(eval $(call KernelPackage/$(1)/$(KERNEL))) - ifneq ($(findstring m,$(KCONFIG)),m) - CONFIG_PACKAGE_kmod-$(1):= - endif - define Package/kmod-$(1) TITLE:=$(TITLE) SECTION:=kernel @@ -75,11 +71,13 @@ define KernelPackage $(call KernelPackage/$(1)/$(KERNEL)) endef - define Package/kmod-$(1)/install - mkdir -p $$(1)/lib/modules/$(LINUX_VERSION) - $(CP) $(FILES) $$(1)/lib/modules/$(LINUX_VERSION)/ - $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD)) - endef + ifeq ($(findstring m,$(KCONFIG)),m) + define Package/kmod-$(1)/install + mkdir -p $$(1)/lib/modules/$(LINUX_VERSION) + $(CP) $$(FILES) $$(1)/lib/modules/$(LINUX_VERSION)/ + $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD)) + endef + endif $$(eval $$(call BuildPackage,kmod-$(1))) endef diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index f1e1009d107..2f5a50ff7a8 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -152,13 +152,11 @@ $(eval $(call KernelPackage,ipt-nathelper)) define KernelPackage/ipt-imq TITLE:=Intermediate Queueing support DESCRIPTION:=Kernel support for Intermediate Queueing devices -KCONFIG:=$(CONFIG_IMQ) +KCONFIG:=$(CONFIG_IP_NF_TARGET_IMQ) SUBMENU:=$(NFMENU) -FILES:= \ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.$(LINUX_KMOD_SUFFIX) \ - $(MODULES_DIR)/kernel/drivers/net/imq.$(LINUX_KMOD_SUFFIX) +FILES:=$(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/drivers/net/imq.$(LINUX_KMOD_SUFFIX) endef -$(eval $(call KernelPackage,imq)) +$(eval $(call KernelPackage,ipt-imq)) define KernelPackage/ipt-queue From 07eaf1e1b1c03d2c9308bdba4ec0fa32bbb96a48 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 23 Jul 2006 23:02:37 +0000 Subject: [PATCH 377/757] add ncurses to prereq checks SVN-Revision: 4244 --- openwrt/include/prereq.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openwrt/include/prereq.mk b/openwrt/include/prereq.mk index 6642ce40e38..e514855a67f 100644 --- a/openwrt/include/prereq.mk +++ b/openwrt/include/prereq.mk @@ -84,6 +84,16 @@ $(eval $(call Require,working-g++, \ No working GNU C++ Compiler (g++) was found on your system. \ )) +define Require/ncurses + echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ + gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses - +endef + +$(eval $(call Require,ncurses, \ + No ncurses development files were not found on your system. \ +)) + + define Require/zlib echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz - From c6a54e2f10877799e3614f918a17f87a05fab5ea Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 24 Jul 2006 07:10:13 +0000 Subject: [PATCH 378/757] fix broadcom-wl patchtable SVN-Revision: 4247 --- openwrt/package/broadcom-wl/Makefile | 2 +- openwrt/package/broadcom-wl/src/kmod/Makefile | 9 ++++----- openwrt/package/broadcom-wl/src/wlc/wlc.c | 9 ++------- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index e6f322f4c64..068979a2ee4 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -96,7 +96,7 @@ define wl_template install -d -m0755 $(1)/etc/modules.d echo "wl$(2)" > $(1)/etc/modules.d/20-wl$(2) install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) - install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(1)/lib/modules/$(LINUX_VERSION)/ + install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(PKG_BUILD_DIR)/kmod/wl$(2).o.patch $(1)/lib/modules/$(LINUX_VERSION)/ endef define Package/kmod-brcm-wl/install diff --git a/openwrt/package/broadcom-wl/src/kmod/Makefile b/openwrt/package/broadcom-wl/src/kmod/Makefile index 9a7cb898183..ec33d8b6733 100644 --- a/openwrt/package/broadcom-wl/src/kmod/Makefile +++ b/openwrt/package/broadcom-wl/src/kmod/Makefile @@ -13,7 +13,7 @@ EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER -O_TARGET := wl_link$(MOD_NAME).o +O_TARGET := wl$(MOD_NAME).o obj-y := wl_mod$(MOD_NAME).o obj-y += bcmutils.o hnddma.o linux_osl.o @@ -23,10 +23,9 @@ obj-m := $(O_TARGET) wl_mod$(MOD_NAME).o: wl_apsta$(MOD_NAME).o sed -e 's,eth%d,wl%d\x00,g' < $< > $@ -wl$(MOD_NAME).o: wl_link$(MOD_NAME).o - $(OBJDUMP) -d $< | perl patchtable.pl > patchtable.bin - cat wl_link$(MOD_NAME).o patchtable.bin > $@ +wl$(MOD_NAME).o.patch: wl$(MOD_NAME).o + $(OBJDUMP) -d $< | perl patchtable.pl > $@ -modules: wl$(MOD_NAME).o +modules: wl$(MOD_NAME).o.patch include $(TOPDIR)/Rules.make diff --git a/openwrt/package/broadcom-wl/src/wlc/wlc.c b/openwrt/package/broadcom-wl/src/wlc/wlc.c index 99237c095a3..76096df5ce9 100644 --- a/openwrt/package/broadcom-wl/src/wlc/wlc.c +++ b/openwrt/package/broadcom-wl/src/wlc/wlc.c @@ -128,7 +128,7 @@ static int ptable_init(void) if (ptable[0] == PTABLE_MAGIC) return 0; - glob("/lib/modules/2.4.*/wl.o", 0, NULL, &globbuf); + glob("/lib/modules/2.4.*/wl.o.patch", 0, NULL, &globbuf); if (globbuf.gl_pathv[0] == NULL) return -1; @@ -139,13 +139,8 @@ static int ptable_init(void) if (fstat(fd, &statbuf) < 0) goto failed; - if (statbuf.st_size <= 512) + if (statbuf.st_size < 512) goto failed; - - if (lseek(fd, statbuf.st_size - 512, SEEK_SET) < 0) { - perror("lseek"); - goto failed; - } if (read(fd, ptable, 512) < 512) goto failed; From eb84ee23ecc39b4a2833fdef14ce00bd2c804cde Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 24 Jul 2006 08:14:08 +0000 Subject: [PATCH 379/757] upgrade to new wl driver - supposedly fixes the weird google issue SVN-Revision: 4254 --- openwrt/package/broadcom-wl/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index 068979a2ee4..f7428188d37 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -10,14 +10,14 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=broadcom-wl -PKG_VERSION:=4.80.9.2 +PKG_VERSION:=4.80.17.0 PKG_RELEASE:=1 WLC_VERSION:=0.1 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources -PKG_MD5SUM:=7d9fab2c611369bbe075c3924ea77450 +PKG_MD5SUM:=3183ddb60e3e882b41df1776c89b614c PKG_CAT:=bzcat include $(INCLUDE_DIR)/package.mk From 994db96a48a363cea6e82294863cc391163da553 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 25 Jul 2006 11:29:00 +0000 Subject: [PATCH 380/757] Clean up patches : remove warnings, move cli() and save_flags to spinlock mechanisms SVN-Revision: 4275 --- .../patches/001-brcm_boards.patch | 53 +- .../brcm63xx-2.6/patches/020-bcmdrivers.patch | 635 +++++++++--------- 2 files changed, 326 insertions(+), 362 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch index 38ce5e1ee44..6fc7f7697bb 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch @@ -1365,8 +1365,8 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c linux-2.6.17 + diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c --- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c 2006-07-14 15:39:56.000000000 +0200 -@@ -0,0 +1,1615 @@ ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c 2006-07-25 10:59:34.000000000 +0200 +@@ -0,0 +1,1619 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -1413,6 +1413,7 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.17-brcm6 +#include <linux/sched.h> +#include <linux/list.h> +#include <linux/if.h> ++#include <linux/spinlock.h> + +#include <bcm_map_part.h> +#include <board.h> @@ -1423,6 +1424,8 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.17-brcm6 +#include "board.h" +#include "bcm_map_part.h" + ++static DEFINE_SPINLOCK(board_lock); ++ +/* Typedefs. */ +#if defined (NON_CONSECUTIVE_MAC) +// used to be the last octet. Now changed to the first 5 bits of the the forth octet @@ -1827,8 +1830,9 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.17-brcm6 + int i; + + /* Disable interrupts. */ -+ cli(); -+ ++ //cli(); ++ spin_lock_irq(&board_lock); ++ + /* Reset all blocks. */ + PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; + for( i = 0; i < 1000000; i++ ) @@ -5379,8 +5383,8 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c linux-2.6.17- + diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h --- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,766 @@ ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h 2006-07-25 10:18:49.000000000 +0200 +@@ -0,0 +1,758 @@ +/* +<:copyright-gpl + @@ -5413,10 +5417,6 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.17- +#if !defined(_BOARDPARMS_H) +#define _BOARDPARMS_H + -+#if __cplusplus -+extern "C" { -+#endif -+ +/* Return codes. */ +#define BP_SUCCESS 0 +#define BP_BOARD_ID_NOT_FOUND 1 @@ -6141,10 +6141,6 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.17- + +#endif /* __ASSEMBLER__ */ + -+#if __cplusplus -+} -+#endif -+ +#endif /* _BOARDPARMS_H */ + diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c @@ -6845,8 +6841,8 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.17-br +} diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h --- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,150 @@ ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h 2006-07-25 10:19:20.000000000 +0200 +@@ -0,0 +1,142 @@ +/************************************************************************/ +/* */ +/* AMD CFI Enabled Flash Memory Drivers */ @@ -6881,10 +6877,6 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.17-br +#ifndef _CFIFLASH_H +#define _CFIFLASH_H + -+#if defined __cplusplus -+extern "C" { -+#endif -+ +/* include board/CPU specific definitions */ +#include "bcmtypes.h" +#include "board.h" @@ -6992,15 +6984,11 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.17-br +extern unsigned char *flash_get_memptr(WORD sector); +extern int flash_get_blk(int addr); + -+#if defined __cplusplus -+} -+#endif -+ +#endif diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c --- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-07-14 15:31:35.000000000 +0200 -@@ -0,0 +1,294 @@ ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-07-25 10:58:52.000000000 +0200 +@@ -0,0 +1,299 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -7033,6 +7021,7 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63x +#include <linux/kernel.h> +#include <linux/slab.h> +#include <linux/module.h> ++#include <linux/spinlock.h> + +#include <asm/irq.h> +#include <asm/mipsregs.h> @@ -7041,6 +7030,8 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63x +#include <bcm_map_part.h> +#include <bcm_intr.h> + ++static DEFINE_SPINLOCK(irq_lock); ++ +static void irq_dispatch_int(struct pt_regs *regs) +{ + unsigned int pendingIrqs; @@ -7094,7 +7085,8 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63x + irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); + else if (cause & CAUSEF_IP6) + irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); -+ cli(); ++ //cli(); ++ spin_lock_irq(&irq_lock); + } +} + @@ -7114,7 +7106,8 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63x + irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); + else if (cause & CAUSEF_IP6) + irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); -+ cli(); ++ //cli(); ++ spin_lock_irq(&irq_lock); + } +} + @@ -7740,7 +7733,7 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.17-brcm63 + diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c --- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-07-13 19:11:33.000000000 +0200 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-07-25 10:51:12.000000000 +0200 @@ -0,0 +1,180 @@ +/* +<:copyright-gpl @@ -7909,7 +7902,7 @@ diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.17-br + return (uStatus & RXFIFONE); +} + -+#if CONFIG_REMOTE_DEBUG ++#if defined (CONFIG_REMOTE_DEBUG) +/* Prevent other code from writing to the serial port */ +void _putc(char c) { } +void _puts(const char *ptr) { } diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch b/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch index a3882ff131b..7efed280217 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch @@ -1,48 +1,7 @@ -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/Makefile linux-2.6.16.7-patched/bcmdrivers/opensource/Makefile ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/Makefile 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,20 @@ -+# File: modules/drivers/Makefile -+# -+# Makefile for the GPLed Linux kernel modules. -+# -+ -+LN_NAME=bcm9$(BRCM_CHIP) -+LN_DRIVER_DIRS = -+ -+-include $(KERNEL_DIR)/.config -+ -+ifneq ($(CONFIG_BCM_SERIAL),) -+ LN_DRIVER_DIRS +=ln -sn impl$(CONFIG_BCM_SERIAL_IMPL) char/serial/$(LN_NAME); -+endif -+ -+obj-$(CONFIG_BCM_SERIAL) += char/serial/impl$(CONFIG_BCM_SERIAL_IMPL)/ -+ -+ -+symlinks: -+ find . -lname "*" -name "$(LN_NAME)" -print -exec rm -f "{}" ";" -+ $(CONFIG_SHELL) -c "$(LN_DRIVER_DIRS)" -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/impl1/Makefile linux-2.6.16.7-patched/bcmdrivers/opensource/char/serial/impl1/Makefile ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,13 @@ -+# File: bcmdrivers/opensource/char/serial -+# -+# Makefile for the BCM63xx serial/console driver -+ -+obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o -+ -+EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+ -+-include $(TOPDIR)/Rules.make -+ -+clean: -+ rm -f core *.o *.a *.s -+ -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux-2.6.16.7-patched/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,1038 @@ +diff -urN linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c +--- linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-07-25 12:57:09.000000000 +0200 +@@ -0,0 +1,1056 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -75,6 +34,7 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp +#include <linux/init.h> +#include <linux/slab.h> +#include <linux/interrupt.h> ++#include <linux/spinlock.h> + +/* for definition of struct console */ +#include <linux/console.h> @@ -88,6 +48,8 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp +#include <bcm_map_part.h> +#include <bcm_intr.h> + ++static DEFINE_SPINLOCK(bcm963xx_serial_lock); ++ +extern void _putc(char); +extern void _puts(const char *); + @@ -349,15 +311,18 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp + if (!info->is_initialized) + return; + -+ save_flags (flags); -+ cli (); ++ ++ /*save_flags (flags); ++ cli ();*/ ++ spin_lock_irqsave(&bcm963xx_serial_lock, flags); + + info->port->control &= ~(BRGEN|TXEN|RXEN); + if (info->tty) + set_bit (TTY_IO_ERROR, &info->tty->flags); + info->is_initialized = 0; + -+ restore_flags (flags); ++ //restore_flags (flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); +} +/* + * ------------------------------------------------------------------- @@ -369,8 +334,10 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp +static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) +{ + unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; -+ save_flags(ulFlags); -+ cli(); ++ /*save_flags(ulFlags); ++ cli();*/ ++ spin_lock_irqsave(&bcm963xx_serial_lock, ulFlags); ++ + switch( cFlag & (CBAUD | CBAUDEX) ) + { + case B115200: @@ -478,7 +445,8 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp + + /* Reset and flush uart */ + pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; -+ restore_flags( ulFlags ); ++ //restore_flags( ulFlags ); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, ulFlags); +} + + @@ -664,14 +632,16 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp + + current->state = TASK_INTERRUPTIBLE; + -+ save_flags (flags); -+ cli(); ++ /*save_flags (flags); ++ cli();*/ ++ spin_lock_irqsave(&bcm963xx_serial_lock, flags); + + info->port->control |= XMITBREAK; + schedule_timeout(duration); + info->port->control &= ~XMITBREAK; + -+ restore_flags (flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); ++ //restore_flags (flags); +} + +static int bcm_ioctl (struct tty_struct * tty, struct file * file, @@ -783,12 +753,14 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp + if (!info) + return; + -+ save_flags (flags); -+ cli(); ++ /*save_flags (flags); ++ cli();*/ ++ spin_lock_irqsave(&bcm963xx_serial_lock, flags); + + if (tty_hung_up_p (filp)) + { -+ restore_flags (flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); ++ //restore_flags (flags); + return; + } + @@ -815,7 +787,8 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp + + if (info->count) + { -+ restore_flags (flags); ++ //restore_flags (flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); + return; + } + @@ -861,7 +834,8 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp + } + wake_up_interruptible (&info->close_wait); + -+ restore_flags (flags); ++ //restore_flags (flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); +} + +/* @@ -997,7 +971,9 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp + if (tty_register_driver (&serial_driver)) + panic("Couldn't register serial driver\n"); + -+ save_flags(flags); cli(); ++ //save_flags(flags); cli(); ++ spin_lock_irqsave(&bcm963xx_serial_lock, flags); ++ + for (i = 0; i < BCM_NUM_UARTS; i++) + { + info = &multi[i]; @@ -1028,7 +1004,8 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp + * is updated... in request_irq - to immediatedly obliterate + * it is unwise. + */ -+ restore_flags(flags); ++ //restore_flags(flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); + return 0; +} + @@ -1081,10 +1058,27 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/char/serial/imp +} + +console_initcall(bcm63xx_console_init); -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6338_intr.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6338_intr.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,72 @@ +diff -urN linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/Makefile linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile +--- linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-07-25 10:43:50.000000000 +0200 +@@ -0,0 +1,13 @@ ++# File: bcmdrivers/opensource/char/serial ++# ++# Makefile for the BCM63xx serial/console driver ++ ++obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o ++ ++EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++ ++-include $(TOPDIR)/Rules.make ++ ++clean: ++ rm -f core *.o *.a *.s ++ +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 2006-07-25 10:44:46.000000000 +0200 +@@ -0,0 +1,64 @@ +/* +<:copyright-gpl + Copyright 2003 Broadcom Corp. All Rights Reserved. @@ -1107,10 +1101,6 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#ifndef __6338_INTR_H +#define __6338_INTR_H + -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ +/*=====================================================================*/ +/* BCM6338 External Interrupt Level Assignments */ +/*=====================================================================*/ @@ -1151,16 +1141,12 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) +#define INTERRUPT_ID_SDIO (INTERNAL_ISR_TABLE_OFFSET + 17) + -+#ifdef __cplusplus -+ } -+#endif -+ +#endif /* __BCM6338_H */ + -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,341 @@ +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 2006-07-25 10:44:59.000000000 +0200 +@@ -0,0 +1,334 @@ +/* +<:copyright-gpl + Copyright 2004 Broadcom Corp. All Rights Reserved. @@ -1183,10 +1169,6 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#ifndef __BCM6338_MAP_H +#define __BCM6338_MAP_H + -+#if __cplusplus -+extern "C" { -+#endif -+ +#include "bcmtypes.h" + +#define PERF_BASE 0xfffe0000 @@ -1496,16 +1478,13 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x + +#define MPI ((volatile MpiRegisters * const) MPI_BASE) + -+#if __cplusplus -+} -+#endif + +#endif + -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6345_intr.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6345_intr.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,78 @@ +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 2006-07-25 10:45:09.000000000 +0200 +@@ -0,0 +1,72 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -1528,9 +1507,6 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#ifndef __6345_INTR_H +#define __6345_INTR_H + -+#ifdef __cplusplus -+ extern "C" { -+#endif + +/*=====================================================================*/ +/* BCM6345 External Interrupt Level Assignments */ @@ -1578,16 +1554,13 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#define INTERRUPT_ID_USB_ISO_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_RX_CHAN) +#define INTERRUPT_ID_USB_ISO_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_TX_CHAN) + -+#ifdef __cplusplus -+ } -+#endif + +#endif /* __BCM6345_H */ + -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,169 @@ +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 2006-07-25 10:45:19.000000000 +0200 +@@ -0,0 +1,163 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -1610,9 +1583,6 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#ifndef __BCM6345_MAP_H +#define __BCM6345_MAP_H + -+#if __cplusplus -+extern "C" { -+#endif + +#include "bcmtypes.h" +#include "6345_intr.h" @@ -1751,16 +1721,13 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#define GPIO_NUM_MAX_BITS_MASK 0x0f +#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) + -+#if __cplusplus -+} -+#endif + +#endif + -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6348_intr.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6348_intr.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,80 @@ +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 2006-07-25 10:45:33.000000000 +0200 +@@ -0,0 +1,74 @@ +/* +<:copyright-gpl + Copyright 2003 Broadcom Corp. All Rights Reserved. @@ -1783,9 +1750,6 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#ifndef __6348_INTR_H +#define __6348_INTR_H + -+#ifdef __cplusplus -+ extern "C" { -+#endif + +/*=====================================================================*/ +/* BCM6348 External Interrupt Level Assignments */ @@ -1835,16 +1799,13 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#define INTERRUPT_ID_MPI (INTERNAL_ISR_TABLE_OFFSET + 24) +#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 25) + -+#ifdef __cplusplus -+ } -+#endif + +#endif /* __BCM6348_H */ + -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,508 @@ +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 2006-07-25 10:44:21.000000000 +0200 +@@ -0,0 +1,500 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -1867,10 +1828,6 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#ifndef __BCM6348_MAP_H +#define __BCM6348_MAP_H + -+#if __cplusplus -+extern "C" { -+#endif -+ +#include "bcmtypes.h" + +#define PERF_BASE 0xfffe0000 @@ -2347,15 +2304,203 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x + +#define USBH_NON_OHCI ((volatile unsigned long * const) USB_HOST_NON_OHCI) + -+#if __cplusplus -+} ++#endif ++ +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 2006-07-25 10:43:50.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM_INTR_H ++#define __BCM_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_intr.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_intr.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_intr.h> ++#endif ++ ++/* defines */ ++struct pt_regs; ++typedef int (*FN_HANDLER) (int, void *, struct pt_regs *); ++ ++/* prototypes */ ++extern void enable_brcm_irq(unsigned int irq); ++extern void disable_brcm_irq(unsigned int irq); ++extern int request_external_irq(unsigned int irq, ++ FN_HANDLER handler, unsigned long irqflags, ++ const char * devname, void *dev_id); ++extern unsigned int BcmHalMapInterrupt(FN_HANDLER isr, unsigned int param, ++ unsigned int interruptId); ++extern void dump_intr_regs(void); ++ ++/* compatibility definitions */ ++#define BcmHalInterruptEnable(irq) enable_brcm_irq( irq ) ++#define BcmHalInterruptDisable(irq) disable_brcm_irq( irq ) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 2006-07-25 10:43:50.000000000 +0200 +@@ -0,0 +1,34 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM_MAP_PART_H ++#define __BCM_MAP_PART_H ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_map_part.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_map_part.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_map_part.h> +#endif + +#endif + -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmTag.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmTag.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 2006-07-05 15:21:58.000000000 +0200 +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmpci.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 2006-07-25 10:43:50.000000000 +0200 +@@ -0,0 +1,87 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++// ++// bcmpci.h - bcm96348 PCI, Cardbus, and PCMCIA definition ++// ++#ifndef BCMPCI_H ++#define BCMPCI_H ++ ++/* Memory window in internal system bus address space */ ++#define BCM_PCI_MEM_BASE 0x08000000 ++/* IO window in internal system bus address space */ ++#define BCM_PCI_IO_BASE 0x0C000000 ++ ++#define BCM_PCI_ADDR_MASK 0x1fffffff ++ ++/* Memory window size (range) */ ++#define BCM_PCI_MEM_SIZE_16MB 0x01000000 ++/* IO window size (range) */ ++#define BCM_PCI_IO_SIZE_64KB 0x00010000 ++ ++/* PCI Configuration and I/O space acesss */ ++#define BCM_PCI_CFG(d, f, o) ( (d << 11) | (f << 8) | (o/4 << 2) ) ++ ++/* fake USB PCI slot */ ++#define USB_HOST_SLOT 9 ++#define USB_BAR0_MEM_SIZE 0x0800 ++ ++#define BCM_HOST_MEM_SPACE1 0x10000000 ++#define BCM_HOST_MEM_SPACE2 0x00000000 ++ ++/* ++ * EBI bus clock is 33MHz and share with PCI bus ++ * each clock cycle is 30ns. ++ */ ++/* attribute memory access wait cnt for 4306 */ ++#define PCMCIA_ATTR_CE_HOLD 3 // data hold time 70ns ++#define PCMCIA_ATTR_CE_SETUP 3 // data setup time 50ns ++#define PCMCIA_ATTR_INACTIVE 6 // time between read/write cycles 180ns. For the total cycle time 600ns (cnt1+cnt2+cnt3+cnt4) ++#define PCMCIA_ATTR_ACTIVE 10 // OE/WE pulse width 300ns ++ ++/* common memory access wait cnt for 4306 */ ++#define PCMCIA_MEM_CE_HOLD 1 // data hold time 30ns ++#define PCMCIA_MEM_CE_SETUP 1 // data setup time 30ns ++#define PCMCIA_MEM_INACTIVE 2 // time between read/write cycles 40ns. For the total cycle time 250ns (cnt1+cnt2+cnt3+cnt4) ++#define PCMCIA_MEM_ACTIVE 5 // OE/WE pulse width 150ns ++ ++#define PCCARD_VCC_MASK 0x00070000 // Mask Reset also ++#define PCCARD_VCC_33V 0x00010000 ++#define PCCARD_VCC_50V 0x00020000 ++ ++typedef enum { ++ MPI_CARDTYPE_NONE, // No Card in slot ++ MPI_CARDTYPE_PCMCIA, // 16-bit PCMCIA card in slot ++ MPI_CARDTYPE_CARDBUS, // 32-bit CardBus card in slot ++} CardType; ++ ++#define CARDBUS_SLOT 0 // Slot 0 is default for CardBus ++ ++#define pcmciaAttrOffset 0x00200000 ++#define pcmciaMemOffset 0x00000000 ++// Needs to be right above PCI I/O space. Give 0x8000 (32K) to PCMCIA. ++#define pcmciaIoOffset (BCM_PCI_IO_BASE + 0x80000) ++// Base Address is that mapped into the MPI ChipSelect registers. ++// UBUS bridge MemoryWindow 0 outputs a 0x00 for the base. ++#define pcmciaBase 0xbf000000 ++#define pcmciaAttr (pcmciaAttrOffset | pcmciaBase) ++#define pcmciaMem (pcmciaMemOffset | pcmciaBase) ++#define pcmciaIo (pcmciaIoOffset | pcmciaBase) ++ ++#endif +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmTag.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 2006-07-25 10:43:50.000000000 +0200 @@ -0,0 +1,153 @@ +/* +<:copyright-gpl @@ -2510,201 +2655,9 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x + +#endif // _BCMTAG_H_ + -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,59 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM_INTR_H -+#define __BCM_INTR_H -+ -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ -+#if defined(CONFIG_BCM96338) -+#include <6338_intr.h> -+#endif -+#if defined(CONFIG_BCM96345) -+#include <6345_intr.h> -+#endif -+#if defined(CONFIG_BCM96348) -+#include <6348_intr.h> -+#endif -+ -+/* defines */ -+struct pt_regs; -+typedef int (*FN_HANDLER) (int, void *, struct pt_regs *); -+ -+/* prototypes */ -+extern void enable_brcm_irq(unsigned int irq); -+extern void disable_brcm_irq(unsigned int irq); -+extern int request_external_irq(unsigned int irq, -+ FN_HANDLER handler, unsigned long irqflags, -+ const char * devname, void *dev_id); -+extern unsigned int BcmHalMapInterrupt(FN_HANDLER isr, unsigned int param, -+ unsigned int interruptId); -+extern void dump_intr_regs(void); -+ -+/* compatibility definitions */ -+#define BcmHalInterruptEnable(irq) enable_brcm_irq( irq ) -+#define BcmHalInterruptDisable(irq) disable_brcm_irq( irq ) -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#endif -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,34 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM_MAP_PART_H -+#define __BCM_MAP_PART_H -+ -+#if defined(CONFIG_BCM96338) -+#include <6338_map_part.h> -+#endif -+#if defined(CONFIG_BCM96345) -+#include <6345_map_part.h> -+#endif -+#if defined(CONFIG_BCM96348) -+#include <6348_map_part.h> -+#endif -+ -+#endif -+ -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmpci.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmpci.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,87 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+// -+// bcmpci.h - bcm96348 PCI, Cardbus, and PCMCIA definition -+// -+#ifndef BCMPCI_H -+#define BCMPCI_H -+ -+/* Memory window in internal system bus address space */ -+#define BCM_PCI_MEM_BASE 0x08000000 -+/* IO window in internal system bus address space */ -+#define BCM_PCI_IO_BASE 0x0C000000 -+ -+#define BCM_PCI_ADDR_MASK 0x1fffffff -+ -+/* Memory window size (range) */ -+#define BCM_PCI_MEM_SIZE_16MB 0x01000000 -+/* IO window size (range) */ -+#define BCM_PCI_IO_SIZE_64KB 0x00010000 -+ -+/* PCI Configuration and I/O space acesss */ -+#define BCM_PCI_CFG(d, f, o) ( (d << 11) | (f << 8) | (o/4 << 2) ) -+ -+/* fake USB PCI slot */ -+#define USB_HOST_SLOT 9 -+#define USB_BAR0_MEM_SIZE 0x0800 -+ -+#define BCM_HOST_MEM_SPACE1 0x10000000 -+#define BCM_HOST_MEM_SPACE2 0x00000000 -+ -+/* -+ * EBI bus clock is 33MHz and share with PCI bus -+ * each clock cycle is 30ns. -+ */ -+/* attribute memory access wait cnt for 4306 */ -+#define PCMCIA_ATTR_CE_HOLD 3 // data hold time 70ns -+#define PCMCIA_ATTR_CE_SETUP 3 // data setup time 50ns -+#define PCMCIA_ATTR_INACTIVE 6 // time between read/write cycles 180ns. For the total cycle time 600ns (cnt1+cnt2+cnt3+cnt4) -+#define PCMCIA_ATTR_ACTIVE 10 // OE/WE pulse width 300ns -+ -+/* common memory access wait cnt for 4306 */ -+#define PCMCIA_MEM_CE_HOLD 1 // data hold time 30ns -+#define PCMCIA_MEM_CE_SETUP 1 // data setup time 30ns -+#define PCMCIA_MEM_INACTIVE 2 // time between read/write cycles 40ns. For the total cycle time 250ns (cnt1+cnt2+cnt3+cnt4) -+#define PCMCIA_MEM_ACTIVE 5 // OE/WE pulse width 150ns -+ -+#define PCCARD_VCC_MASK 0x00070000 // Mask Reset also -+#define PCCARD_VCC_33V 0x00010000 -+#define PCCARD_VCC_50V 0x00020000 -+ -+typedef enum { -+ MPI_CARDTYPE_NONE, // No Card in slot -+ MPI_CARDTYPE_PCMCIA, // 16-bit PCMCIA card in slot -+ MPI_CARDTYPE_CARDBUS, // 32-bit CardBus card in slot -+} CardType; -+ -+#define CARDBUS_SLOT 0 // Slot 0 is default for CardBus -+ -+#define pcmciaAttrOffset 0x00200000 -+#define pcmciaMemOffset 0x00000000 -+// Needs to be right above PCI I/O space. Give 0x8000 (32K) to PCMCIA. -+#define pcmciaIoOffset (BCM_PCI_IO_BASE + 0x80000) -+// Base Address is that mapped into the MPI ChipSelect registers. -+// UBUS bridge MemoryWindow 0 outputs a 0x00 for the base. -+#define pcmciaBase 0xbf000000 -+#define pcmciaAttr (pcmciaAttrOffset | pcmciaBase) -+#define pcmciaMem (pcmciaMemOffset | pcmciaBase) -+#define pcmciaIo (pcmciaIoOffset | pcmciaBase) -+ -+#endif -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 2006-07-05 15:21:58.000000000 +0200 +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 2006-07-25 10:43:50.000000000 +0200 @@ -0,0 +1,163 @@ +/* +<:copyright-gpl @@ -2869,10 +2822,10 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#define READ8(addr) (*(volatile UINT8 *)((ULONG)&addr)) + +#endif -diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/board.h ---- linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963xx/board.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/bcmdrivers/opensource/include/bcm963xx/board.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,374 @@ +diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h +--- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/board.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h 2006-07-25 11:00:10.000000000 +0200 +@@ -0,0 +1,368 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -2902,9 +2855,6 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +#ifndef _BOARD_H +#define _BOARD_H + -+#if __cplusplus -+extern "C" { -+#endif +/*****************************************************************************/ +/* Misc board definitions */ +/*****************************************************************************/ @@ -3241,9 +3191,30 @@ diff -Naurp linux-2.6.16.7-generic-patched/bcmdrivers/opensource/include/bcm963x +void kerSysWakeupMonitorTask( void ); +#endif + -+#if __cplusplus -+} -+#endif + +#endif /* _BOARD_H */ + +diff -urN linux-2.6.17/bcmdrivers/opensource/Makefile linux-2.6.17-brcm63xx/bcmdrivers/opensource/Makefile +--- linux-2.6.17/bcmdrivers/opensource/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/Makefile 2006-07-25 10:43:50.000000000 +0200 +@@ -0,0 +1,20 @@ ++# File: modules/drivers/Makefile ++# ++# Makefile for the GPLed Linux kernel modules. ++# ++ ++LN_NAME=bcm9$(BRCM_CHIP) ++LN_DRIVER_DIRS = ++ ++-include $(KERNEL_DIR)/.config ++ ++ifneq ($(CONFIG_BCM_SERIAL),) ++ LN_DRIVER_DIRS +=ln -sn impl$(CONFIG_BCM_SERIAL_IMPL) char/serial/$(LN_NAME); ++endif ++ ++obj-$(CONFIG_BCM_SERIAL) += char/serial/impl$(CONFIG_BCM_SERIAL_IMPL)/ ++ ++ ++symlinks: ++ find . -lname "*" -name "$(LN_NAME)" -print -exec rm -f "{}" ";" ++ $(CONFIG_SHELL) -c "$(LN_DRIVER_DIRS)" From 84472dd56902e282ec2fa4d390fed4e4446cedf0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 25 Jul 2006 14:44:54 +0000 Subject: [PATCH 381/757] don't try to create kmod packages that contain no files SVN-Revision: 4278 --- openwrt/package/kernel/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index c977501e089..b1155f42866 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -72,12 +72,14 @@ define KernelPackage endef ifeq ($(findstring m,$(KCONFIG)),m) + ifneq ($(strip $(FILES)),) define Package/kmod-$(1)/install mkdir -p $$(1)/lib/modules/$(LINUX_VERSION) $(CP) $$(FILES) $$(1)/lib/modules/$(LINUX_VERSION)/ $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD)) endef endif + endif $$(eval $$(call BuildPackage,kmod-$(1))) endef From 3df71b4f5e12934d9d231a600f43bc9c5ad2b321 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 25 Jul 2006 15:57:30 +0000 Subject: [PATCH 382/757] change cpmac to use the internal phy by default (#596) SVN-Revision: 4279 --- .../target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch b/openwrt/target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch index 42b64584dac..06df07d29fc 100644 --- a/openwrt/target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch +++ b/openwrt/target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch @@ -3187,7 +3187,7 @@ diff -urN linux.old/drivers/net/avalanche_cpmac/cpmac.c linux.dev/drivers/net/av + * replace the default MACRO. */ + { + char *mac_port = prom_getenv("MAC_PORT"); /* Internal: 0, External: 1 */ -+ if(!mac_port || (0 != strcmp(mac_port, "0"))) { ++ if(0 == strcmp(mac_port, "1")) { + printk("Using the MAC with external PHY\n"); + cfg_start_link_speed = _CPMDIO_NOPHY; + cpmac_max_frame_size = CPMAC_MAX_FRAME_SIZE + 4; @@ -11249,7 +11249,7 @@ diff -urN linux.old/drivers/net/avalanche_cpmac/psp_config_build.c linux.dev/dri + } + + //if(phy_sel == auto_detect_cpmac_phy()) -+ if(!mac_port || (0 != strcmp(mac_port, "0"))) ++ if(0 == strcmp(mac_port, "1")) + { + printk("Using the MAC with external PHY\n"); + psp_config_add("cpmdio", s3, psp_config_strlen(s3), en_compile); From 44be142cb2327bedaa6c95c8c8faa8b23d56a8da Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 25 Jul 2006 18:12:30 +0000 Subject: [PATCH 383/757] use 127.0.0.1 as dns server and point dnsmasq to /tmp/resolv.conf SVN-Revision: 4282 --- openwrt/package/base-files/Makefile | 1 - openwrt/package/base-files/default/etc/resolv.conf | 2 ++ openwrt/package/dnsmasq/files/dnsmasq.conf | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 openwrt/package/base-files/default/etc/resolv.conf diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 8fccf79ea8a..01ea9674c52 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -153,7 +153,6 @@ define Package/base-files$(TARGET)/install mkdir -p $(1)/usr/bin mkdir -p $(1)/sys mkdir -p $(1)/www - ln -sf /tmp/resolv.conf $(1)/etc/resolv.conf ln -sf /proc/mounts $(1)/etc/mtab rm -f $(1)/var ln -sf /tmp $(1)/var diff --git a/openwrt/package/base-files/default/etc/resolv.conf b/openwrt/package/base-files/default/etc/resolv.conf new file mode 100644 index 00000000000..9617eacda79 --- /dev/null +++ b/openwrt/package/base-files/default/etc/resolv.conf @@ -0,0 +1,2 @@ +nameserver 127.0.0.1 +search lan diff --git a/openwrt/package/dnsmasq/files/dnsmasq.conf b/openwrt/package/dnsmasq/files/dnsmasq.conf index 7aed3a3da4b..43acd85b154 100644 --- a/openwrt/package/dnsmasq/files/dnsmasq.conf +++ b/openwrt/package/dnsmasq/files/dnsmasq.conf @@ -8,6 +8,7 @@ localise-queries local=/lan/ domain=lan expand-hosts +resolv-file=/tmp/resolv.conf @ifdef dhcp_enable dhcp-range=@@start@@,@@end@@,@@netmask@@,@@lease@@ From 1c9953432505f9783153e666052be4665b9cf162 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 25 Jul 2006 18:49:43 +0000 Subject: [PATCH 384/757] introduce new BROKEN menuconfig option for hiding known broken settings SVN-Revision: 4283 --- openwrt/Config.in | 4 ++++ openwrt/target/Config.in | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/openwrt/Config.in b/openwrt/Config.in index e059f06ab57..752e1d93e70 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -18,6 +18,10 @@ menuconfig DEVEL select BUILDOPTS select TOOLCHAINOPTS +config BROKEN + bool "Show broken platforms / packages" if DEVEL + default n + menuconfig BUILDOPTS bool "Build Options" if DEVEL diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 5b85eadb3fe..ddca93ea3bc 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -13,6 +13,7 @@ config LINUX_2_6_ARUBA config LINUX_2_4_AR531X bool "Atheros AR531x [2.4]" + depends BROKEN select mips select LINUX_2_4 select BIG_ENDIAN @@ -104,55 +105,65 @@ if DEVEL config LINUX_2_6_ARM bool "UNSUPPORTED little-endian arm platform" + depends BROKEN select LINUX_2_6 select arm config LINUX_2_6_ARMEB bool "UNSUPPORTED big-endian arm platform" + depends BROKEN select LINUX_2_6 select BIG_ENDIAN select armeb config LINUX_2_6_CRIS bool "UNSUPPORTED cris platform" + depends BROKEN select LINUX_2_6 select cris config LINUX_2_6_M68K bool "UNSUPPORTED m68k platform" + depends BROKEN select LINUX_2_6 select m68k config LINUX_2_6_PPC bool "UNSUPPORTED powerpc platform" + depends BROKEN select LINUX_2_6 select BIG_ENDIAN select powerpc config LINUX_2_6_SH3 bool "UNSUPPORTED little-endian sh3 platform" + depends BROKEN select LINUX_2_6 select sh3 config LINUX_2_6_SH3EB bool "UNSUPPORTED big-endian sh3 platform" + depends BROKEN select LINUX_2_6 select BIG_ENDIAN select sh3eb config LINUX_2_6_SH4 bool "UNSUPPORTED little-endian sh4 platform" + depends BROKEN select LINUX_2_6 select sh4 config LINUX_2_6_SH4EB bool "UNSUPPORTED big-endian sh4 platform" + depends BROKEN select LINUX_2_6 select BIG_ENDIAN select sh4eb config LINUX_2_6_SPARC bool "UNSUPPORTED sparc platform" + depends BROKEN select LINUX_2_6 select BIG_ENDIAN select sparc From 901f972ff64b3b681939cdb4cedea7e7f9d24b53 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 25 Jul 2006 22:48:56 +0000 Subject: [PATCH 385/757] disable kmod-ip6tables if netfilter ipv6 support is disabled SVN-Revision: 4286 --- openwrt/package/kernel/modules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index 2f5a50ff7a8..48741eeb367 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -197,6 +197,7 @@ define KernelPackage/ip6tables TITLE:=IPv6 modules DESCRIPTION:=Netfilter IPv6 firewalling support SUBMENU:=$(NFMENU) +KCONFIG:=$(CONFIG_IP6_NF_IPTABLES) FILES:=$(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,ip6tables)) From 41779d0cbe8c0d60a383d64b09aee1effe020884 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Wed, 26 Jul 2006 00:03:05 +0000 Subject: [PATCH 386/757] let ipkg fail when a package file to be installed is not found SVN-Revision: 4287 --- openwrt/scripts/ipkg | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openwrt/scripts/ipkg b/openwrt/scripts/ipkg index 4d3ad850651..57e4457cc5a 100755 --- a/openwrt/scripts/ipkg +++ b/openwrt/scripts/ipkg @@ -923,11 +923,7 @@ ipkg_install() { ipkg_install_file $ipkg_filename ;; *.ipk | *.deb) - if [ -f "$pkg" ]; then ipkg_install_file $pkg - else - echo "File not found $pkg" >&2 - fi ;; *) ipkg_get_install $pkg || true From 43ea2723a89e8cb642e95420243679b63419c54a Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 26 Jul 2006 01:01:09 +0000 Subject: [PATCH 387/757] add more ipkg validation checks SVN-Revision: 4292 --- openwrt/include/package.mk | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 757c8396aeb..7af7420395a 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -12,14 +12,12 @@ endif define Build/DefaultTargets ifeq ($(DUMP),) - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR)) - ifeq ($(CONFIG_AUTOREBUILD),y) + ifeq ($(CONFIG_AUTOREBUILD),y) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/.prepared: package-clean endif - endif - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - ifeq ($(CONFIG_AUTOREBUILD),y) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) $(PKG_BUILD_DIR)/.built: package-rebuild endif endif @@ -182,7 +180,7 @@ define BuildPackage $(eval $(call BuildIPKGVariable,$(1),postinst)) $(eval $(call BuildIPKGVariable,$(1),prerm)) $(eval $(call BuildIPKGVariable,$(1),postrm)) - $$(IDIR_$(1))/CONTROL/control: Makefile $(PKG_BUILD_DIR)/.prepared + $$(IDIR_$(1))/CONTROL/control: Makefile $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH) mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control @@ -212,6 +210,7 @@ define BuildPackage -find $$(IDIR_$(1)) -name '.#*' | xargs rm -f $(RSTRIP) $$(IDIR_$(1)) $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) + @[ -f $$(IPKG_$(1)) ] || false $$(INFO_$(1)): $$(IPKG_$(1)) $(IPKG) install $$(IPKG_$(1)) @@ -221,6 +220,10 @@ define BuildPackage clean: $(1)-clean + $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): + -rm $(PKG_BUILD_DIR)/.version-$(1)_* + @touch $$@ + $$(eval $$(call Build/DefaultTargets,$(1))) endef From 882d9e807c40e7815be40b419f1862f6bc480f07 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Thu, 27 Jul 2006 12:45:13 +0000 Subject: [PATCH 388/757] fix CATEGORY SVN-Revision: 4304 --- openwrt/package/mtd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index 50a75a555f0..b3bf6023afa 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/package.mk define Package/mtd SECTION:=base -CATEGORY:=Util +CATEGORY:=Utilities DEFAULT:=y TITLE:=Update utility for trx firmware images DESCRIPTION:=Update utility for trx firmware images. To update \\\ From 8d0fbf6d726f2206a5bfa2fd000d79e70422b6b6 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Thu, 27 Jul 2006 18:23:19 +0000 Subject: [PATCH 389/757] Add bridge preferred mac patch SVN-Revision: 4305 --- .../patches/228-bridge-preferred.patch | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 openwrt/target/linux/generic-2.4/patches/228-bridge-preferred.patch diff --git a/openwrt/target/linux/generic-2.4/patches/228-bridge-preferred.patch b/openwrt/target/linux/generic-2.4/patches/228-bridge-preferred.patch new file mode 100644 index 00000000000..c7a479836b8 --- /dev/null +++ b/openwrt/target/linux/generic-2.4/patches/228-bridge-preferred.patch @@ -0,0 +1,61 @@ +diff -rup linux-rb24/net/bridge/br_device.c linux-rb24bpatch/net/bridge/br_device.c +--- linux-rb24/net/bridge/br_device.c 2002-02-25 11:38:14.000000000 -0800 ++++ linux-rb24bpatch/net/bridge/br_device.c 2005-07-05 02:09:17.000000000 -0700 +@@ -121,6 +121,23 @@ static int br_dev_accept_fastpath(struct + return -1; + } + ++static int ++br_set_mac_address(struct net_device *dev, void *addr) ++{ ++ struct net_bridge *br = dev->priv; ++ struct sockaddr *sa = (struct sockaddr *) addr; ++ ++ write_lock_bh(&br->lock); ++ ++ memcpy(br->preferred_id.addr, sa->sa_data, ETH_ALEN); ++ ++ br_stp_recalculate_bridge_id(br); ++ ++ write_unlock_bh(&br->lock); ++ ++ return 0; ++} ++ + void br_dev_setup(struct net_device *dev) + { + memset(dev->dev_addr, 0, ETH_ALEN); +@@ -133,5 +150,5 @@ void br_dev_setup(struct net_device *dev + dev->stop = br_dev_stop; + dev->accept_fastpath = br_dev_accept_fastpath; + dev->tx_queue_len = 0; +- dev->set_mac_address = NULL; ++ dev->set_mac_address = br_set_mac_address; + } +diff -rup linux-rb24/net/bridge/br_private.h linux-rb24bpatch/net/bridge/br_private.h +--- linux-rb24/net/bridge/br_private.h 2004-08-07 16:26:06.000000000 -0700 ++++ linux-rb24bpatch/net/bridge/br_private.h 2005-07-05 02:12:56.000000000 -0700 +@@ -95,6 +95,7 @@ struct net_bridge + int hello_time; + int forward_delay; + bridge_id bridge_id; ++ bridge_id preferred_id; + int bridge_max_age; + int bridge_hello_time; + int bridge_forward_delay; +diff -rup linux-rb24/net/bridge/br_stp_if.c linux-rb24bpatch/net/bridge/br_stp_if.c +--- linux-rb24/net/bridge/br_stp_if.c 2001-04-19 08:38:50.000000000 -0700 ++++ linux-rb24bpatch/net/bridge/br_stp_if.c 2005-07-05 02:22:11.000000000 -0700 +@@ -162,6 +162,12 @@ void br_stp_recalculate_bridge_id(struct + + p = br->port_list; + while (p != NULL) { ++ /* match against preferred address first */ ++ if (memcmp(p->dev->dev_addr,br->preferred_id.addr,ETH_ALEN) == 0) { ++ addr = p->dev->dev_addr; ++ break; ++ } ++ + if (addr == br_mac_zero || + memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0) + addr = p->dev->dev_addr; From 215fee8e32d7d85556973c38e82b757f1b9daf28 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Thu, 27 Jul 2006 18:35:48 +0000 Subject: [PATCH 390/757] oooops, bridge patch was broken SVN-Revision: 4306 --- .../patches/228-bridge-preferred.patch | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 openwrt/target/linux/generic-2.4/patches/228-bridge-preferred.patch diff --git a/openwrt/target/linux/generic-2.4/patches/228-bridge-preferred.patch b/openwrt/target/linux/generic-2.4/patches/228-bridge-preferred.patch deleted file mode 100644 index c7a479836b8..00000000000 --- a/openwrt/target/linux/generic-2.4/patches/228-bridge-preferred.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -rup linux-rb24/net/bridge/br_device.c linux-rb24bpatch/net/bridge/br_device.c ---- linux-rb24/net/bridge/br_device.c 2002-02-25 11:38:14.000000000 -0800 -+++ linux-rb24bpatch/net/bridge/br_device.c 2005-07-05 02:09:17.000000000 -0700 -@@ -121,6 +121,23 @@ static int br_dev_accept_fastpath(struct - return -1; - } - -+static int -+br_set_mac_address(struct net_device *dev, void *addr) -+{ -+ struct net_bridge *br = dev->priv; -+ struct sockaddr *sa = (struct sockaddr *) addr; -+ -+ write_lock_bh(&br->lock); -+ -+ memcpy(br->preferred_id.addr, sa->sa_data, ETH_ALEN); -+ -+ br_stp_recalculate_bridge_id(br); -+ -+ write_unlock_bh(&br->lock); -+ -+ return 0; -+} -+ - void br_dev_setup(struct net_device *dev) - { - memset(dev->dev_addr, 0, ETH_ALEN); -@@ -133,5 +150,5 @@ void br_dev_setup(struct net_device *dev - dev->stop = br_dev_stop; - dev->accept_fastpath = br_dev_accept_fastpath; - dev->tx_queue_len = 0; -- dev->set_mac_address = NULL; -+ dev->set_mac_address = br_set_mac_address; - } -diff -rup linux-rb24/net/bridge/br_private.h linux-rb24bpatch/net/bridge/br_private.h ---- linux-rb24/net/bridge/br_private.h 2004-08-07 16:26:06.000000000 -0700 -+++ linux-rb24bpatch/net/bridge/br_private.h 2005-07-05 02:12:56.000000000 -0700 -@@ -95,6 +95,7 @@ struct net_bridge - int hello_time; - int forward_delay; - bridge_id bridge_id; -+ bridge_id preferred_id; - int bridge_max_age; - int bridge_hello_time; - int bridge_forward_delay; -diff -rup linux-rb24/net/bridge/br_stp_if.c linux-rb24bpatch/net/bridge/br_stp_if.c ---- linux-rb24/net/bridge/br_stp_if.c 2001-04-19 08:38:50.000000000 -0700 -+++ linux-rb24bpatch/net/bridge/br_stp_if.c 2005-07-05 02:22:11.000000000 -0700 -@@ -162,6 +162,12 @@ void br_stp_recalculate_bridge_id(struct - - p = br->port_list; - while (p != NULL) { -+ /* match against preferred address first */ -+ if (memcmp(p->dev->dev_addr,br->preferred_id.addr,ETH_ALEN) == 0) { -+ addr = p->dev->dev_addr; -+ break; -+ } -+ - if (addr == br_mac_zero || - memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0) - addr = p->dev->dev_addr; From 6f0b787692a28db7a96ebfed6b079e36271d3183 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Thu, 27 Jul 2006 19:22:40 +0000 Subject: [PATCH 391/757] Minor change to firstboot, closes #591 SVN-Revision: 4307 --- openwrt/package/base-files/brcm-2.4/bin/firstboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/base-files/brcm-2.4/bin/firstboot b/openwrt/package/base-files/brcm-2.4/bin/firstboot index d37ce4f90ba..b65d3ee98b4 100755 --- a/openwrt/package/base-files/brcm-2.4/bin/firstboot +++ b/openwrt/package/base-files/brcm-2.4/bin/firstboot @@ -22,7 +22,7 @@ dupe() { # <new_root> <old_root> ./rom/note) ;; #nothing ./etc/config*|\ ./etc/resolv.conf|\ - ./usr/lib/ipkg/info) cp -af $2/$file $file;; + ./usr/lib/ipkg/info/*) cp -af $2/$file $file;; *) ln -sf /rom/${file#./*} $file;; esac done From 55fd1cd74eca0b641fa93f965ef6c72057b7fb8f Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 28 Jul 2006 17:53:19 +0000 Subject: [PATCH 392/757] fix build issues with SMP compiles SVN-Revision: 4317 --- openwrt/include/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 7af7420395a..e0765f7baba 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -220,7 +220,7 @@ define BuildPackage clean: $(1)-clean - $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): + $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): $(PKG_BUILD_DIR)/.prepared -rm $(PKG_BUILD_DIR)/.version-$(1)_* @touch $$@ From 45e7d063935cba4eb4567b9aa95279e72d35d2a2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 29 Jul 2006 11:30:06 +0000 Subject: [PATCH 393/757] add support for per-package prereq checks, run global prereq checks before (menu-)config SVN-Revision: 4318 --- openwrt/Makefile | 25 +++++--- openwrt/include/package.mk | 2 + openwrt/include/prereq-build.mk | 88 +++++++++++++++++++++++++++++ openwrt/include/prereq.mk | 84 +-------------------------- openwrt/package/Makefile | 9 ++- openwrt/package/base-files/Makefile | 4 +- 6 files changed, 119 insertions(+), 93 deletions(-) create mode 100644 openwrt/include/prereq-build.mk diff --git a/openwrt/Makefile b/openwrt/Makefile index e2e467cd8c2..a23f478d7ce 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -31,14 +31,17 @@ export OPENWRTVERSION all: world -.pkginfo: FORCE ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) +.pkginfo: FORCE +.config: FORCE +endif + +.pkginfo: @echo Collecting package info... @-for dir in package/*/; do \ echo Source-Makefile: $${dir}Makefile; \ $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \ done > $@ -endif .config.in: .pkginfo @./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ @@ -77,18 +80,25 @@ target/%: .pkginfo FORCE toolchain/%: FORCE $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) -.config: ./scripts/config/conf FORCE +.config: ./scripts/config/conf @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig @$< -D .config Config.in &> /dev/null -.prereq: $(TOPDIR)/include/prereq.mk .pkginfo - @$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq.mk prereq 2>/dev/null || { \ +.prereq-build: $(TOPDIR)/include/prereq-build.mk + @$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \ echo "Prerequisite check failed. Use FORCE=1 to override."; \ false; \ } @touch $@ -prereq: .prereq FORCE +.prereq-packages: $(TOPDIR)/include/prereq.mk .pkginfo .config + @$(NO_TRACE_MAKE) -s -C package prereq 2>/dev/null || { \ + echo "Prerequisite check failed. Use FORCE=1 to override."; \ + false; \ + } + @touch $@ + +prereq: .prereq-build .prereq-packages FORCE download: .config FORCE $(MAKE) toolchain/download @@ -96,7 +106,8 @@ download: .config FORCE $(MAKE) target/download ifeq ($(FORCE),) -world: .prereq +.config ./scripts/config/conf ./scripts/config/mconf: .prereq-build +world: .prereq-packages endif world: .config FORCE diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index e0765f7baba..cd1a33c4848 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -10,6 +10,8 @@ else all: compile endif +include $(INCLUDE_DIR)/prereq.mk + define Build/DefaultTargets ifeq ($(DUMP),) ifeq ($(CONFIG_AUTOREBUILD),y) diff --git a/openwrt/include/prereq-build.mk b/openwrt/include/prereq-build.mk new file mode 100644 index 00000000000..a6de9b270aa --- /dev/null +++ b/openwrt/include/prereq-build.mk @@ -0,0 +1,88 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/prereq.mk + +# Required for the toolchain +define Require/working-make + echo 'all: test' > $(TMP_DIR)/check.mk + echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk + echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk + echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk + $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk +endef + +$(eval $(call Require,working-make, \ + Your make version is buggy. Please install GNU make v3.81 or later. \ +)) + +define Require/working-gcc + echo 'int main(int argc, char **argv) { return 0; }' | \ + gcc -x c -o $(TMP_DIR)/a.out - +endef + +$(eval $(call Require,working-gcc, \ + No working GNU C Compiler (gcc) was found on your system. \ +)) + +define Require/working-g++ + echo 'int main(int argc, char **argv) { return 0; }' | \ + g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ - +endef + +$(eval $(call Require,working-g++, \ + No working GNU C++ Compiler (g++) was found on your system. \ +)) + +define Require/ncurses + echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ + gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses - +endef + +$(eval $(call Require,ncurses, \ + No ncurses development files were not found on your system. \ +)) + + +define Require/zlib + echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ + gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz - +endef + +$(eval $(call Require,zlib, \ + No zlib development files were not found on your system. \ +)) + + +$(eval $(call RequireCommand,bison, \ + Please install GNU bison. \ +)) + +$(eval $(call RequireCommand,flex, \ + Please install flex. \ +)) + +$(eval $(call RequireCommand,python, \ + Please install python. \ +)) + +$(eval $(call RequireCommand,unzip, \ + Please install unzip. \ +)) + +$(eval $(call RequireCommand,bzip2, \ + Please install bzip2. \ +)) + +$(eval $(call RequireCommand,patch, \ + Please install patch. \ +)) + +$(eval $(call RequireCommand,perl, \ + Please install perl. \ +)) diff --git a/openwrt/include/prereq.mk b/openwrt/include/prereq.mk index e514855a67f..c9b82d29477 100644 --- a/openwrt/include/prereq.mk +++ b/openwrt/include/prereq.mk @@ -5,14 +5,12 @@ # See /LICENSE for more information. # -include $(TOPDIR)/rules.mk - $(TMP_DIR): mkdir -p $@ prereq: - echo if [ -f $(TMP_DIR)/.prereq-error ]; then \ + echo; \ cat $(TMP_DIR)/.prereq-error; \ echo; \ rm -rf $(TMP_DIR); \ @@ -29,7 +27,7 @@ define Require prereq-$(1): $(TMP_DIR) FORCE echo -n "Checking '$(1)'... " - if $(NO_TRACE_MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ + if $(NO_TRACE_MAKE) -f $(firstword $(MAKEFILE_LIST)) check-$(1) >/dev/null 2>/dev/null; then \ echo 'ok.'; \ else \ echo 'failed.'; \ @@ -53,81 +51,3 @@ define RequireCommand $$(eval $$(call Require,$(1),$(2))) endef -# Required for the toolchain -define Require/working-make - echo 'all: test' > $(TMP_DIR)/check.mk - echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk - echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk - echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk - $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk -endef - -$(eval $(call Require,working-make, \ - Your make version is buggy. Please install GNU make v3.81 or later. \ -)) - -define Require/working-gcc - echo 'int main(int argc, char **argv) { return 0; }' | \ - gcc -x c -o $(TMP_DIR)/a.out - -endef - -$(eval $(call Require,working-gcc, \ - No working GNU C Compiler (gcc) was found on your system. \ -)) - -define Require/working-g++ - echo 'int main(int argc, char **argv) { return 0; }' | \ - g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ - -endef - -$(eval $(call Require,working-g++, \ - No working GNU C++ Compiler (g++) was found on your system. \ -)) - -define Require/ncurses - echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ - gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses - -endef - -$(eval $(call Require,ncurses, \ - No ncurses development files were not found on your system. \ -)) - - -define Require/zlib - echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ - gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz - -endef - -$(eval $(call Require,zlib, \ - No zlib development files were not found on your system. \ -)) - - -$(eval $(call RequireCommand,bison, \ - Please install GNU bison. \ -)) - -$(eval $(call RequireCommand,flex, \ - Please install flex. \ -)) - -$(eval $(call RequireCommand,python, \ - Please install python. \ -)) - -$(eval $(call RequireCommand,unzip, \ - Please install unzip. \ -)) - -$(eval $(call RequireCommand,bzip2, \ - Please install bzip2. \ -)) - -$(eval $(call RequireCommand,patch, \ - Please install patch. \ -)) - -$(eval $(call RequireCommand,perl, \ - Please install perl. \ -)) diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 7a3af2e6f78..629ce881099 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -10,13 +10,17 @@ include $(TOPDIR)/rules.mk include $(TOPDIR)/.config include $(TOPDIR)/.pkgdeps -SOURCE_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m)) +PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(package-y) $(package-m)) +DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m)) COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) $(STAMP_DIR) $(TARGET_DIR): mkdir -p $@ +%-prereq: $(STAMP_DIR) $(TARGET_DIR) + $(MAKE) -C $(patsubst %-prereq,%,$@) prereq MAKEFLAGS="$(BUILD_MAKEFLAGS)" + %-download: $(STAMP_DIR) $(TARGET_DIR) $(MAKE) -C $(patsubst %-download,%,$@) download MAKEFLAGS="$(BUILD_MAKEFLAGS)" @@ -41,7 +45,8 @@ $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo all: compile clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) -download: $(SOURCE_PACKAGES) +prereq: $(PREREQ_PACKAGES) +download: $(DOWNLOAD_PACKAGES) compile-targets: $(COMPILE_PACKAGES) compile: $(MAKE) -j$(CONFIG_JLEVEL) compile-targets diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 01ea9674c52..e41e1fd7987 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -22,8 +22,8 @@ include $(INCLUDE_DIR)/package.mk ifneq ($(DUMP),1) TARGET:=-$(BOARD)-$(KERNEL) -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version 2>/dev/null} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version 2>/dev/null} else UCLIBC_VERSION:=<UCLIBC_VERSION> LIBGCC_VERSION:=<LIBGCC_VERSION> From a12f821123609fbd0c6e207158dd794c485e6455 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 29 Jul 2006 17:57:02 +0000 Subject: [PATCH 394/757] bugfix for the rb532 block2mtd code SVN-Revision: 4320 --- .../rb532-2.6/patches/100-rb5xx_support.patch | 116 +++++++++--------- 1 file changed, 60 insertions(+), 56 deletions(-) diff --git a/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch b/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch index ae78d452ba8..f3d114ef85c 100644 --- a/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch +++ b/openwrt/target/linux/rb532-2.6/patches/100-rb5xx_support.patch @@ -1,6 +1,6 @@ diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig ---- linux.old/arch/mips/Kconfig 2006-06-18 17:31:54.000000000 +0200 -+++ linux.dev/arch/mips/Kconfig 2006-06-18 17:18:16.000000000 +0200 +--- linux.old/arch/mips/Kconfig 2006-07-29 19:53:20.000000000 +0200 ++++ linux.dev/arch/mips/Kconfig 2006-07-29 19:31:51.000000000 +0200 @@ -742,6 +742,19 @@ select SYS_SUPPORTS_BIG_ENDIAN select TOSHIBA_BOARDS @@ -31,8 +31,8 @@ diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig default "5" diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile ---- linux.old/arch/mips/Makefile 2006-06-18 17:31:54.000000000 +0200 -+++ linux.dev/arch/mips/Makefile 2006-06-18 17:18:16.000000000 +0200 +--- linux.old/arch/mips/Makefile 2006-07-29 19:53:20.000000000 +0200 ++++ linux.dev/arch/mips/Makefile 2006-07-29 19:31:51.000000000 +0200 @@ -580,6 +580,13 @@ load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000 @@ -48,8 +48,8 @@ diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile # Toshiba RBTX4937 board # diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c ---- linux.old/arch/mips/mm/tlbex.c 2006-06-18 17:31:54.000000000 +0200 -+++ linux.dev/arch/mips/mm/tlbex.c 2006-06-18 17:18:16.000000000 +0200 +--- linux.old/arch/mips/mm/tlbex.c 2006-07-29 19:53:20.000000000 +0200 ++++ linux.dev/arch/mips/mm/tlbex.c 2006-07-29 19:31:51.000000000 +0200 @@ -876,7 +876,6 @@ case CPU_R10000: case CPU_R12000: @@ -68,7 +68,7 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c case CPU_34K: diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb500.c --- linux.old/arch/mips/pci/fixup-rb500.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/pci/fixup-rb500.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/pci/fixup-rb500.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,49 @@ +/* + * Copyright 2001 MontaVista Software Inc. @@ -120,8 +120,8 @@ diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb +} + diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile ---- linux.old/arch/mips/pci/Makefile 2006-06-18 17:31:54.000000000 +0200 -+++ linux.dev/arch/mips/pci/Makefile 2006-06-18 17:18:16.000000000 +0200 +--- linux.old/arch/mips/pci/Makefile 2006-07-29 19:53:20.000000000 +0200 ++++ linux.dev/arch/mips/pci/Makefile 2006-07-29 19:31:51.000000000 +0200 @@ -57,3 +57,4 @@ obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup-tx4938.o ops-tx4938.o obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o @@ -129,7 +129,7 @@ diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile +obj-$(CONFIG_MIKROTIK_RB500) += pci-rc32434.o ops-rc32434.o fixup-rb500.o diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32434.c --- linux.old/arch/mips/pci/ops-rc32434.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/pci/ops-rc32434.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/pci/ops-rc32434.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,195 @@ +/************************************************************************** + * @@ -328,7 +328,7 @@ diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32 +}; diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32434.c --- linux.old/arch/mips/pci/pci-rc32434.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/pci/pci-rc32434.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/pci/pci-rc32434.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,234 @@ +/************************************************************************** + * @@ -566,7 +566,7 @@ diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32 + diff -urN linux.old/arch/mips/rb500/devices.c linux.dev/arch/mips/rb500/devices.c --- linux.old/arch/mips/rb500/devices.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/devices.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/rb500/devices.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,211 @@ +#include <linux/kernel.h> +#include <linux/init.h> @@ -781,7 +781,7 @@ diff -urN linux.old/arch/mips/rb500/devices.c linux.dev/arch/mips/rb500/devices. +#endif diff -urN linux.old/arch/mips/rb500/early_serial.c linux.dev/arch/mips/rb500/early_serial.c --- linux.old/arch/mips/rb500/early_serial.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/early_serial.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/rb500/early_serial.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,199 @@ +/************************************************************************** + * @@ -984,7 +984,7 @@ diff -urN linux.old/arch/mips/rb500/early_serial.c linux.dev/arch/mips/rb500/ear +} diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c --- linux.old/arch/mips/rb500/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/irq.c 2006-06-18 17:31:37.000000000 +0200 ++++ linux.dev/arch/mips/rb500/irq.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,264 @@ +/* + * BRIEF MODULE DESCRIPTION @@ -1252,7 +1252,7 @@ diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c +} diff -urN linux.old/arch/mips/rb500/Makefile linux.dev/arch/mips/rb500/Makefile --- linux.old/arch/mips/rb500/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/Makefile 2006-06-18 17:36:48.000000000 +0200 ++++ linux.dev/arch/mips/rb500/Makefile 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,5 @@ +# +# Makefile for the RB500 board specific parts of the kernel @@ -1261,7 +1261,7 @@ diff -urN linux.old/arch/mips/rb500/Makefile linux.dev/arch/mips/rb500/Makefile +obj-y += irq.o time.o setup.o serial.o early_serial.o prom.o misc.o devices.o diff -urN linux.old/arch/mips/rb500/misc.c linux.dev/arch/mips/rb500/misc.c --- linux.old/arch/mips/rb500/misc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/misc.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/rb500/misc.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,54 @@ +#include <linux/module.h> +#include <linux/kernel.h> /* printk() */ @@ -1319,7 +1319,7 @@ diff -urN linux.old/arch/mips/rb500/misc.c linux.dev/arch/mips/rb500/misc.c +EXPORT_SYMBOL(changeLatchU5); diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c --- linux.old/arch/mips/rb500/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/prom.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/rb500/prom.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,181 @@ +/* +* prom.c @@ -1504,7 +1504,7 @@ diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c + diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c --- linux.old/arch/mips/rb500/serial.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/serial.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/rb500/serial.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,79 @@ +/************************************************************************** + * @@ -1587,7 +1587,7 @@ diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c +} diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c --- linux.old/arch/mips/rb500/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/setup.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/rb500/setup.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,84 @@ +/* + * setup.c - boot time setup code @@ -1675,7 +1675,7 @@ diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c +} diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c --- linux.old/arch/mips/rb500/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/rb500/time.c 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/arch/mips/rb500/time.c 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,94 @@ +/* +**************************************************************************** @@ -1772,8 +1772,8 @@ diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c +} + diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/devices/block2mtd.c ---- linux.old/drivers/mtd/devices/block2mtd.c 2006-06-18 17:31:54.000000000 +0200 -+++ linux.dev/drivers/mtd/devices/block2mtd.c 2006-06-18 17:18:16.000000000 +0200 +--- linux.old/drivers/mtd/devices/block2mtd.c 2006-07-29 19:53:54.000000000 +0200 ++++ linux.dev/drivers/mtd/devices/block2mtd.c 2006-07-29 19:47:03.000000000 +0200 @@ -26,7 +26,6 @@ #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) #define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) @@ -1839,7 +1839,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device dev->mtd.erasesize >> 10, dev->mtd.erasesize); return dev; -@@ -416,7 +414,7 @@ +@@ -416,10 +414,10 @@ return 0; \ } while (0) @@ -1847,7 +1847,11 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device +int block2mtd_setup(const char *val, struct kernel_param *kp) { char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */ - char *token[2]; +- char *token[2]; ++ char *token[3]; + char *name; + size_t erase_size = PAGE_SIZE; + int i, ret; @@ -430,7 +428,7 @@ strcpy(str, val); kill_final_newline(str); @@ -1875,8 +1879,8 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device static int __init block2mtd_init(void) { diff -urN linux.old/drivers/pci/Makefile linux.dev/drivers/pci/Makefile ---- linux.old/drivers/pci/Makefile 2006-06-18 17:31:54.000000000 +0200 -+++ linux.dev/drivers/pci/Makefile 2006-06-18 17:18:16.000000000 +0200 +--- linux.old/drivers/pci/Makefile 2006-07-29 19:53:20.000000000 +0200 ++++ linux.dev/drivers/pci/Makefile 2006-07-29 19:31:51.000000000 +0200 @@ -27,6 +27,7 @@ obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o obj-$(CONFIG_X86_VISWS) += setup-irq.o @@ -1886,8 +1890,8 @@ diff -urN linux.old/drivers/pci/Makefile linux.dev/drivers/pci/Makefile # # ACPI Related PCI FW Functions diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h ---- linux.old/include/asm-mips/bootinfo.h 2006-06-18 17:31:54.000000000 +0200 -+++ linux.dev/include/asm-mips/bootinfo.h 2006-06-18 17:18:16.000000000 +0200 +--- linux.old/include/asm-mips/bootinfo.h 2006-07-29 19:53:20.000000000 +0200 ++++ linux.dev/include/asm-mips/bootinfo.h 2006-07-29 19:31:51.000000000 +0200 @@ -218,6 +218,8 @@ #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ @@ -1898,8 +1902,8 @@ diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/booti const char *get_system_type(void); diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h ---- linux.old/include/asm-mips/cpu.h 2006-06-18 17:31:54.000000000 +0200 -+++ linux.dev/include/asm-mips/cpu.h 2006-06-18 17:18:16.000000000 +0200 +--- linux.old/include/asm-mips/cpu.h 2006-07-29 19:53:20.000000000 +0200 ++++ linux.dev/include/asm-mips/cpu.h 2006-07-29 19:31:51.000000000 +0200 @@ -200,7 +200,8 @@ #define CPU_SB1A 62 #define CPU_74K 63 @@ -1912,7 +1916,7 @@ diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h * ISA Level encodings diff -urN linux.old/include/asm-mips/rc32434/crom.h linux.dev/include/asm-mips/rc32434/crom.h --- linux.old/include/asm-mips/rc32434/crom.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/crom.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/crom.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,98 @@ +#ifndef __IDT_CROM_H__ +#define __IDT_CROM_H__ @@ -2014,7 +2018,7 @@ diff -urN linux.old/include/asm-mips/rc32434/crom.h linux.dev/include/asm-mips/r +#endif // __IDT_CROM_H__ diff -urN linux.old/include/asm-mips/rc32434/ddr.h linux.dev/include/asm-mips/rc32434/ddr.h --- linux.old/include/asm-mips/rc32434/ddr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/ddr.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/ddr.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,175 @@ +#ifndef __IDT_DDR_H__ +#define __IDT_DDR_H__ @@ -2193,7 +2197,7 @@ diff -urN linux.old/include/asm-mips/rc32434/ddr.h linux.dev/include/asm-mips/rc +#endif // __IDT_DDR_H__ diff -urN linux.old/include/asm-mips/rc32434/dev.h linux.dev/include/asm-mips/rc32434/dev.h --- linux.old/include/asm-mips/rc32434/dev.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/dev.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/dev.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,134 @@ +#ifndef __IDT_DEV_H__ +#define __IDT_DEV_H__ @@ -2331,7 +2335,7 @@ diff -urN linux.old/include/asm-mips/rc32434/dev.h linux.dev/include/asm-mips/rc + diff -urN linux.old/include/asm-mips/rc32434/dma.h linux.dev/include/asm-mips/rc32434/dma.h --- linux.old/include/asm-mips/rc32434/dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/dma.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/dma.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,202 @@ +#ifndef __IDT_DMA_H__ +#define __IDT_DMA_H__ @@ -2537,7 +2541,7 @@ diff -urN linux.old/include/asm-mips/rc32434/dma.h linux.dev/include/asm-mips/rc + diff -urN linux.old/include/asm-mips/rc32434/dma_v.h linux.dev/include/asm-mips/rc32434/dma_v.h --- linux.old/include/asm-mips/rc32434/dma_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/dma_v.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/dma_v.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,73 @@ +#ifndef __IDT_DMA_V_H__ +#define __IDT_DMA_V_H__ @@ -2614,7 +2618,7 @@ diff -urN linux.old/include/asm-mips/rc32434/dma_v.h linux.dev/include/asm-mips/ + diff -urN linux.old/include/asm-mips/rc32434/eth.h linux.dev/include/asm-mips/rc32434/eth.h --- linux.old/include/asm-mips/rc32434/eth.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/eth.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/eth.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,322 @@ +#ifndef __IDT_ETH_H__ +#define __IDT_ETH_H__ @@ -2940,7 +2944,7 @@ diff -urN linux.old/include/asm-mips/rc32434/eth.h linux.dev/include/asm-mips/rc + diff -urN linux.old/include/asm-mips/rc32434/eth_v.h linux.dev/include/asm-mips/rc32434/eth_v.h --- linux.old/include/asm-mips/rc32434/eth_v.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/eth_v.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/eth_v.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,64 @@ +#ifndef __IDT_ETH_V_H__ +#define __IDT_ETH_V_H__ @@ -3008,7 +3012,7 @@ diff -urN linux.old/include/asm-mips/rc32434/eth_v.h linux.dev/include/asm-mips/ + diff -urN linux.old/include/asm-mips/rc32434/gpio.h linux.dev/include/asm-mips/rc32434/gpio.h --- linux.old/include/asm-mips/rc32434/gpio.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/gpio.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/gpio.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,182 @@ +#ifndef __IDT_GPIO_H__ +#define __IDT_GPIO_H__ @@ -3194,7 +3198,7 @@ diff -urN linux.old/include/asm-mips/rc32434/gpio.h linux.dev/include/asm-mips/r + diff -urN linux.old/include/asm-mips/rc32434/i2c.h linux.dev/include/asm-mips/rc32434/i2c.h --- linux.old/include/asm-mips/rc32434/i2c.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/i2c.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/i2c.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,147 @@ +#ifndef __IDT_I2C_H__ +#define __IDT_I2C_H__ @@ -3345,7 +3349,7 @@ diff -urN linux.old/include/asm-mips/rc32434/i2c.h linux.dev/include/asm-mips/rc +#endif // __IDT_I2C_H__ diff -urN linux.old/include/asm-mips/rc32434/integ.h linux.dev/include/asm-mips/rc32434/integ.h --- linux.old/include/asm-mips/rc32434/integ.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/integ.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/integ.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,78 @@ +#ifndef __IDT_INTEG_H__ +#define __IDT_INTEG_H__ @@ -3427,7 +3431,7 @@ diff -urN linux.old/include/asm-mips/rc32434/integ.h linux.dev/include/asm-mips/ +#endif // __IDT_INTEG_H__ diff -urN linux.old/include/asm-mips/rc32434/int.h linux.dev/include/asm-mips/rc32434/int.h --- linux.old/include/asm-mips/rc32434/int.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/int.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/int.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,167 @@ +#ifndef __IDT_INT_H__ +#define __IDT_INT_H__ @@ -3598,7 +3602,7 @@ diff -urN linux.old/include/asm-mips/rc32434/int.h linux.dev/include/asm-mips/rc + diff -urN linux.old/include/asm-mips/rc32434/iparb.h linux.dev/include/asm-mips/rc32434/iparb.h --- linux.old/include/asm-mips/rc32434/iparb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/iparb.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/iparb.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,95 @@ +#ifndef __IDT_IPARB_H__ +#define __IDT_IPARB_H__ @@ -3697,7 +3701,7 @@ diff -urN linux.old/include/asm-mips/rc32434/iparb.h linux.dev/include/asm-mips/ +#endif // __IDT_IPARB_H__ diff -urN linux.old/include/asm-mips/rc32434/irm.h linux.dev/include/asm-mips/rc32434/irm.h --- linux.old/include/asm-mips/rc32434/irm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/irm.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/irm.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,55 @@ +#ifndef __IDT_IRM_H__ +#define __IDT_IRM_H__ @@ -3756,7 +3760,7 @@ diff -urN linux.old/include/asm-mips/rc32434/irm.h linux.dev/include/asm-mips/rc +#endif // __IDT_IRM_H__ diff -urN linux.old/include/asm-mips/rc32434/irq.h linux.dev/include/asm-mips/rc32434/irq.h --- linux.old/include/asm-mips/rc32434/irq.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/irq.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/irq.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,8 @@ +#ifndef __ASM_MACH_MIPS_IRQ_H +#define __ASM_MACH_MIPS_IRQ_H @@ -3768,7 +3772,7 @@ diff -urN linux.old/include/asm-mips/rc32434/irq.h linux.dev/include/asm-mips/rc +#endif /* __ASM_MACH_MIPS_IRQ_H */ diff -urN linux.old/include/asm-mips/rc32434/nvram.h linux.dev/include/asm-mips/rc32434/nvram.h --- linux.old/include/asm-mips/rc32434/nvram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/nvram.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/nvram.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,97 @@ +#ifndef __IDT_NVRAM_H +#define __IDT_NVRAM_H @@ -3869,7 +3873,7 @@ diff -urN linux.old/include/asm-mips/rc32434/nvram.h linux.dev/include/asm-mips/ + diff -urN linux.old/include/asm-mips/rc32434/pci.h linux.dev/include/asm-mips/rc32434/pci.h --- linux.old/include/asm-mips/rc32434/pci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/pci.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/pci.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,695 @@ +/************************************************************************** + * @@ -4568,7 +4572,7 @@ diff -urN linux.old/include/asm-mips/rc32434/pci.h linux.dev/include/asm-mips/rc + diff -urN linux.old/include/asm-mips/rc32434/pcikorina.h linux.dev/include/asm-mips/rc32434/pcikorina.h --- linux.old/include/asm-mips/rc32434/pcikorina.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/pcikorina.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/pcikorina.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,209 @@ +/* $Id: pciacacia.h,v 1.5 2001/05/01 10:09:17 carstenl Exp $ + * @@ -4781,7 +4785,7 @@ diff -urN linux.old/include/asm-mips/rc32434/pcikorina.h linux.dev/include/asm-m + diff -urN linux.old/include/asm-mips/rc32434/pci_regs.h linux.dev/include/asm-mips/rc32434/pci_regs.h --- linux.old/include/asm-mips/rc32434/pci_regs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/pci_regs.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/pci_regs.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,8 @@ +/* Override the default address space for this arch +*/ @@ -4793,7 +4797,7 @@ diff -urN linux.old/include/asm-mips/rc32434/pci_regs.h linux.dev/include/asm-mi + diff -urN linux.old/include/asm-mips/rc32434/rb.h linux.dev/include/asm-mips/rc32434/rb.h --- linux.old/include/asm-mips/rc32434/rb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/rb.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/rb.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,69 @@ +#ifndef __MIPS_RB_H__ +#define __MIPS_RB_H__ @@ -4866,7 +4870,7 @@ diff -urN linux.old/include/asm-mips/rc32434/rb.h linux.dev/include/asm-mips/rc3 +#endif diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mips/rc32434/rc32434.h --- linux.old/include/asm-mips/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/rc32434.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/rc32434.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,126 @@ +/* + *************************************************************************** @@ -4996,7 +5000,7 @@ diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mip +#endif /* _RC32434_H_ */ diff -urN linux.old/include/asm-mips/rc32434/rst.h linux.dev/include/asm-mips/rc32434/rst.h --- linux.old/include/asm-mips/rc32434/rst.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/rst.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/rst.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,105 @@ +#ifndef __IDT_RST_H__ +#define __IDT_RST_H__ @@ -5105,7 +5109,7 @@ diff -urN linux.old/include/asm-mips/rc32434/rst.h linux.dev/include/asm-mips/rc +#endif // __IDT_RST_H__ diff -urN linux.old/include/asm-mips/rc32434/spi.h linux.dev/include/asm-mips/rc32434/spi.h --- linux.old/include/asm-mips/rc32434/spi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/spi.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/spi.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,100 @@ +#ifndef __IDT_SPI_H__ +#define __IDT_SPI_H__ @@ -5209,7 +5213,7 @@ diff -urN linux.old/include/asm-mips/rc32434/spi.h linux.dev/include/asm-mips/rc +#endif // __IDT_SPI_H__ diff -urN linux.old/include/asm-mips/rc32434/timer.h linux.dev/include/asm-mips/rc32434/timer.h --- linux.old/include/asm-mips/rc32434/timer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/timer.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/timer.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,91 @@ +/************************************************************************** + * @@ -5304,7 +5308,7 @@ diff -urN linux.old/include/asm-mips/rc32434/timer.h linux.dev/include/asm-mips/ + diff -urN linux.old/include/asm-mips/rc32434/tim.h linux.dev/include/asm-mips/rc32434/tim.h --- linux.old/include/asm-mips/rc32434/tim.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/tim.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/tim.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,78 @@ +#ifndef __IDT_TIM_H__ +#define __IDT_TIM_H__ @@ -5386,7 +5390,7 @@ diff -urN linux.old/include/asm-mips/rc32434/tim.h linux.dev/include/asm-mips/rc + diff -urN linux.old/include/asm-mips/rc32434/types.h linux.dev/include/asm-mips/rc32434/types.h --- linux.old/include/asm-mips/rc32434/types.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/types.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/types.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,39 @@ +#ifndef __IDT_TYPES_H__ +#define __IDT_TYPES_H__ @@ -5429,7 +5433,7 @@ diff -urN linux.old/include/asm-mips/rc32434/types.h linux.dev/include/asm-mips/ +#endif // __IDT_TYPES_H__ diff -urN linux.old/include/asm-mips/rc32434/uart.h linux.dev/include/asm-mips/rc32434/uart.h --- linux.old/include/asm-mips/rc32434/uart.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/include/asm-mips/rc32434/uart.h 2006-06-18 17:18:16.000000000 +0200 ++++ linux.dev/include/asm-mips/rc32434/uart.h 2006-07-29 19:31:51.000000000 +0200 @@ -0,0 +1,178 @@ +#ifndef __IDT_UART_H__ +#define __IDT_UART_H__ From 39a8c5b8ff7e264715841d83f62b5b3401752de4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 29 Jul 2006 19:59:45 +0000 Subject: [PATCH 395/757] fix unnamed config sections SVN-Revision: 4321 --- .../base-files/default/etc/functions.sh | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index a7f7c42e22c..03fd23807a5 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -1,5 +1,6 @@ #!/bin/sh # Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel@fokus.fraunhofer.de> alias debug=${DEBUG:-:} @@ -38,15 +39,17 @@ reset_cb() { reset_cb config () { - _C=$(($_C + 1)) - name="${name:-cfg${_C}}" - config_cb "$1" "$2" - export CONFIG_SECTION="$2" - export CONFIG_${CONFIG_SECTION}_TYPE="$1" + local type="$1" + local name="$2" + _C=$(($_C + 1)) + name="${name:-cfg${_C}}" + config_cb "$type" "$name" + export CONFIG_SECTION="$name" + export CONFIG_${CONFIG_SECTION}_TYPE="$type" } option () { - local varname="$1" ; shift + local varname="$1"; shift export CONFIG_${CONFIG_SECTION}_${varname}="$*" option_cb "$varname" "$*" } @@ -88,3 +91,9 @@ config_set() { load_modules() { sed 's/^[^#]/insmod &/' $* | ash 2>&- || : } + +include() { + for file in $(ls /lib/$1/*.sh 2>/dev/null); do + . $file + done +} From 9fb76c1dc29fa25f69228341a06697d40c058adc Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 29 Jul 2006 20:25:55 +0000 Subject: [PATCH 396/757] avoid using a reserved word as a variable name SVN-Revision: 4322 --- openwrt/package/base-files/default/etc/functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 03fd23807a5..27b0a6d5fc9 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -39,13 +39,13 @@ reset_cb() { reset_cb config () { - local type="$1" + local cfgtype="$1" local name="$2" _C=$(($_C + 1)) name="${name:-cfg${_C}}" - config_cb "$type" "$name" + config_cb "$cfgtype" "$name" export CONFIG_SECTION="$name" - export CONFIG_${CONFIG_SECTION}_TYPE="$type" + export CONFIG_${CONFIG_SECTION}_TYPE="$cfgtype" } option () { From 31e0ccf22f86a4aa11c032b66bfa0dd4f4b4baaa Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 03:09:09 +0000 Subject: [PATCH 397/757] rewrite of the network scripts and configuration SVN-Revision: 4323 --- .../base-files/ar7-2.4/etc/config/network | 29 +-- .../base-files/aruba-2.6/etc/config/network | 8 +- .../base-files/au1000-2.6/etc/config/network | 17 +- .../brcm-2.4/etc/hotplug.d/net/09-net | 45 ---- .../brcm-2.4/etc/init.d/S05netconfig | 70 ++---- .../brcm-2.6/etc/hotplug.d/net/09-net | 35 --- .../brcm-2.6/etc/init.d/S05netconfig | 70 ++---- .../default/etc/hotplug.d/net/10-net | 203 ++---------------- .../base-files/default/etc/init.d/S10boot | 3 +- .../base-files/default/etc/init.d/S40network | 9 + .../package/base-files/default/etc/init.d/rcS | 11 +- .../base-files/default/lib/network/config.sh | 147 +++++++++++++ .../package/base-files/default/sbin/hotplug | 1 - .../package/base-files/default/sbin/ifdown | 32 ++- openwrt/package/base-files/default/sbin/ifup | 42 +--- openwrt/package/base-files/default/sbin/wifi | 7 +- .../default/usr/share/udhcpc/default.script | 14 +- .../base-files/rb532-2.6/etc/config/network | 8 +- .../base-files/sibyte-2.6/etc/config/network | 17 +- .../base-files/x86-2.4/etc/config/network | 20 +- .../base-files/x86-2.6/etc/config/network | 20 +- .../base-files/xscale-2.6/etc/config/network | 7 +- .../broadcom-wl/files/lib/wifi/broadcom.sh | 14 +- openwrt/package/dnsmasq/files/dnsmasq.init | 12 +- openwrt/package/iptables/files/firewall.awk | 5 +- openwrt/package/iptables/files/firewall.init | 11 +- openwrt/package/iptables/files/firewall.user | 5 - openwrt/package/ppp/Makefile | 10 +- openwrt/package/ppp/files/ifup.pppoa | 38 ---- openwrt/package/ppp/files/ifup.pppoe | 43 ---- openwrt/package/ppp/files/ppp.sh | 27 +++ openwrt/package/ppp/files/pppoa.sh | 20 ++ openwrt/package/ppp/files/pppoe.sh | 21 ++ openwrt/package/ppp/files/pptp.sh | 3 + openwrt/package/pptp/Makefile | 4 +- openwrt/package/pptp/files/ifup.pptp | 45 ---- openwrt/package/pptp/files/pptp.sh | 22 ++ openwrt/package/switch/Makefile | 4 + openwrt/package/switch/files/switch.sh | 33 +++ 39 files changed, 482 insertions(+), 650 deletions(-) delete mode 100644 openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net delete mode 100644 openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net create mode 100755 openwrt/package/base-files/default/etc/init.d/S40network create mode 100755 openwrt/package/base-files/default/lib/network/config.sh mode change 100755 => 100644 openwrt/package/iptables/files/firewall.user delete mode 100644 openwrt/package/ppp/files/ifup.pppoa delete mode 100644 openwrt/package/ppp/files/ifup.pppoe create mode 100644 openwrt/package/ppp/files/ppp.sh create mode 100644 openwrt/package/ppp/files/pppoa.sh create mode 100644 openwrt/package/ppp/files/pppoe.sh create mode 100644 openwrt/package/ppp/files/pptp.sh delete mode 100644 openwrt/package/pptp/files/ifup.pptp create mode 100644 openwrt/package/pptp/files/pptp.sh create mode 100644 openwrt/package/switch/files/switch.sh diff --git a/openwrt/package/base-files/ar7-2.4/etc/config/network b/openwrt/package/base-files/ar7-2.4/etc/config/network index 353538bf496..19a858e163b 100644 --- a/openwrt/package/base-files/ar7-2.4/etc/config/network +++ b/openwrt/package/base-files/ar7-2.4/etc/config/network @@ -1,27 +1,8 @@ # Network configuration file -# Uncomment the following statements to change the network configuration -## LAN configuration -lan_ifname="eth0" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" -# lan_gateway="" -# lan_dns="" - -## WAN configuration -# wan_proto=pppoe -wan_ifname=ppp0 -wan_device=nas0 -atm_vpi=8 -atm_vci=35 -# ppp_username=my_username -# ppp_passwd=my_passwd - -## WAN configuration (pppoe) -pppoe_atm=1 -ppp_mtu=1492 - -## WAN configuration (pppoa) -# ppp_mtu=1500 +config interface lan + option ifname eth0 + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 diff --git a/openwrt/package/base-files/aruba-2.6/etc/config/network b/openwrt/package/base-files/aruba-2.6/etc/config/network index 65797797eee..aadd4aa8ed0 100644 --- a/openwrt/package/base-files/aruba-2.6/etc/config/network +++ b/openwrt/package/base-files/aruba-2.6/etc/config/network @@ -1,7 +1,5 @@ # Network configuration file -# Copyright (C) 2006 OpenWrt.org - -## LAN configuration -lan_ifname="eth0" -lan_proto="dhcp" +config interface lan + option ifname eth0 + option proto dhcp diff --git a/openwrt/package/base-files/au1000-2.6/etc/config/network b/openwrt/package/base-files/au1000-2.6/etc/config/network index 576677bf7c4..95d7575c92f 100644 --- a/openwrt/package/base-files/au1000-2.6/etc/config/network +++ b/openwrt/package/base-files/au1000-2.6/etc/config/network @@ -1,13 +1,8 @@ -# Network configuration file # Copyright (C) 2006 OpenWrt.org -## LAN configuration -lan_ifname="br0" -lan_ifnames="eth0 ath0" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" - -## WAN configuration -wan_ifname="" -wan_proto="none" +config interface lan + option type bridge + option ifnames "eth0 ath0" + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 diff --git a/openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net b/openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net deleted file mode 100644 index 48abdf4062f..00000000000 --- a/openwrt/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006 OpenWrt.org - -setup_wl() -{ - [ -f /proc/net/wl0 ] && { - lsmod | grep wlcompat >&- || insmod wlcompat - } - iwconfig "$INTERFACE" 2>&- | grep -v 'no wireless' >&- && { - /sbin/wifi - } -} -setup_eth() -{ - [ -d /proc/switch ] || { - insmod switch-core - insmod switch-robo || insmod switch-adm - } - if="$(echo "$INTERFACE" | sed s,eth,et,)" - ifconfig "$INTERFACE" up 2>&- >&- - [ -d "/proc/switch/$INTERFACE" ] || return 0 - echo "1" > "/proc/switch/$INTERFACE/reset" - echo "1" > "/proc/switch/$INTERFACE/enable_vlan" - for vlan in $(seq 0 15); do - eval "hwname=\"\${vlan${vlan}hwname}\"" - [ "$hwname" = "$if" ] && { - eval "vports=\"\${vlan${vlan}ports}\"" - [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" - $DEBUG vconfig add "$INTERFACE" "$vlan" - } - done -} - -do_register() -{ - case "${INTERFACE%%[0-9]*}" in - eth) setup_eth;; - wl) setup_wl;; - esac -} - - -case "$ACTION" in - add|register) do_register;; -esac diff --git a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig index 0f53c0c9c97..82e4ab9986c 100755 --- a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig @@ -13,16 +13,16 @@ mkdir -p /etc/config strings /dev/mtdblock/3 fi ) | awk ' -function p(name) { - if (c[name] != "") print name "=\"" c[name] "\"" +function p(cfgname, name) { + if (c[name] != "") print " option " cfgname " \"" c[name] "\"" } BEGIN { FS="=" c["lan_ifname"]="br0" - c["lan_ifnames"]="vlan0 eth1" + c["lan_ifnames"]="eth0.0 wl0" c["wan_proto"]="none" - c["wan_ifname"]="vlan1" + c["wan_ifname"]="eth0.1" c["vlan0ports"]="1 2 3 4 5*" c["vlan1ports"]="0 5" } @@ -34,23 +34,16 @@ BEGIN { END { # v1 hardware if (nvram["boardtype"] == "bcm94710dev") { - # Linksys WRT54G v1.x - if (nvram["boardnum"] == "42") { - c["vlan0ports"]="" - c["vlan1ports"]="" - c["lan_ifnames"]="vlan2 eth2" - } - # Asus WL-500g if (nvram["boardnum"] == "asusX") { - c["lan_ifnames"]="eth0 eth1 eth2" # FIXME - # wan_ifname=eth1 + c["lan_ifnames"]="eth0 eth1 wl0" # FIXME + c["wan_ifname"]="" } } if (nvram["boardtype"] == "wgt634u") { c["vlan0ports"] = "0 1 2 3 5*" c["vlan1ports"] = "4 5" - c["lan_ifnames"] = "vlan0 ath0" + c["lan_ifnames"] = "eth0.0 ath0" } if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { c["vlan0ports"] = "0 1 2 3 5*" @@ -60,51 +53,28 @@ END { # WAP54G if ((nvram["boardnum"] == "2") || \ (nvram["boardnum"] == "1024")) { - c["lan_ifnames"]="eth0 eth1" + c["lan_ifnames"]="eth0 wl0" c["wan_ifname"]="" } print "#### VLAN configuration " - print "vlan0hwname=et0" - print "vlan1hwname=et0" - p("vlan0ports") - p("vlan1ports") + print "config switch eth0" + p("vlan0", "vlan0ports") + p("vlan1", "vlan1ports") print "" print "" - print "#### LAN configuration" - print "lan_proto=\"static\"" - p("lan_ifname") - p("lan_ifnames") - print "lan_ipaddr=\"192.168.1.1\"" - print "lan_netmask=\"255.255.255.0\"" - print "# lan_dns=\"192.168.1.1\"" - print "# lan_gateway=\"192.168.1.1\"" - + print "config interface lan" + print " option type bridge" + p("ifnames", "lan_ifnames") + print " option proto static" + print " option ipaddr 192.168.1.1" + print " option netmask 255.255.255.0" print "" print "" - print "#### WAN configuration" - print "# wan_proto: WAN protocol, available protocols:" - print "# none: disable" - print "# dhcp: DHCP" - print "# static: Static IP" - print "# pppoe: PPP over Ethernet" - print "# pptp: Point-to-Point tunneling Protocol" - print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\"" - print "" - print "wan_proto=dhcp" - p("wan_ifname") - print "wan_device=\"" c["wan_ifname"] "\"" - print "# wan_ipaddr=\"192.168.0.2\"" - print "# wan_netmask=\"255.255.255.0\"" - print "# wan_gateway=\"192.168.0.1\"" - print "# wan_dns=\"192.168.0.1\"" - print "" - print "## PPP over Ethernet and PPTP" - print "# wan_ifname=\"ppp0\"" - print "# ppp_username=\"my_username\"" - print "# ppp_passwd=\"my_password\"" - print "# pptp_server_ip=\"192.168.0.1\"" + print "config interface wan" + p("ifname", "wan_ifname") + print " option proto dhcp" } ' > /etc/config/network diff --git a/openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net b/openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net deleted file mode 100644 index 90a92bd2b0c..00000000000 --- a/openwrt/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006 OpenWrt.org - -setup_eth() -{ - [ -d /proc/switch ] || { - insmod switch-core - insmod switch-robo || insmod switch-adm - } - if="$(echo "$INTERFACE" | sed s,eth,et,)" - ifconfig "$INTERFACE" up 2>&- >&- - [ -d "/proc/switch/$INTERFACE" ] || return 0 - echo "1" > "/proc/switch/$INTERFACE/reset" - echo "1" > "/proc/switch/$INTERFACE/enable_vlan" - for vlan in $(seq 0 15); do - eval "hwname=\"\${vlan${vlan}hwname}\"" - [ "$hwname" = "$if" ] && { - eval "vports=\"\${vlan${vlan}ports}\"" - [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" - $DEBUG vconfig add "$INTERFACE" "$vlan" - } - done -} - -do_register() -{ - case "${INTERFACE%%[0-9]*}" in - eth) setup_eth;; - esac -} - - -case "$ACTION" in - add|register) do_register;; -esac diff --git a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig index 0f53c0c9c97..82e4ab9986c 100755 --- a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig @@ -13,16 +13,16 @@ mkdir -p /etc/config strings /dev/mtdblock/3 fi ) | awk ' -function p(name) { - if (c[name] != "") print name "=\"" c[name] "\"" +function p(cfgname, name) { + if (c[name] != "") print " option " cfgname " \"" c[name] "\"" } BEGIN { FS="=" c["lan_ifname"]="br0" - c["lan_ifnames"]="vlan0 eth1" + c["lan_ifnames"]="eth0.0 wl0" c["wan_proto"]="none" - c["wan_ifname"]="vlan1" + c["wan_ifname"]="eth0.1" c["vlan0ports"]="1 2 3 4 5*" c["vlan1ports"]="0 5" } @@ -34,23 +34,16 @@ BEGIN { END { # v1 hardware if (nvram["boardtype"] == "bcm94710dev") { - # Linksys WRT54G v1.x - if (nvram["boardnum"] == "42") { - c["vlan0ports"]="" - c["vlan1ports"]="" - c["lan_ifnames"]="vlan2 eth2" - } - # Asus WL-500g if (nvram["boardnum"] == "asusX") { - c["lan_ifnames"]="eth0 eth1 eth2" # FIXME - # wan_ifname=eth1 + c["lan_ifnames"]="eth0 eth1 wl0" # FIXME + c["wan_ifname"]="" } } if (nvram["boardtype"] == "wgt634u") { c["vlan0ports"] = "0 1 2 3 5*" c["vlan1ports"] = "4 5" - c["lan_ifnames"] = "vlan0 ath0" + c["lan_ifnames"] = "eth0.0 ath0" } if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { c["vlan0ports"] = "0 1 2 3 5*" @@ -60,51 +53,28 @@ END { # WAP54G if ((nvram["boardnum"] == "2") || \ (nvram["boardnum"] == "1024")) { - c["lan_ifnames"]="eth0 eth1" + c["lan_ifnames"]="eth0 wl0" c["wan_ifname"]="" } print "#### VLAN configuration " - print "vlan0hwname=et0" - print "vlan1hwname=et0" - p("vlan0ports") - p("vlan1ports") + print "config switch eth0" + p("vlan0", "vlan0ports") + p("vlan1", "vlan1ports") print "" print "" - print "#### LAN configuration" - print "lan_proto=\"static\"" - p("lan_ifname") - p("lan_ifnames") - print "lan_ipaddr=\"192.168.1.1\"" - print "lan_netmask=\"255.255.255.0\"" - print "# lan_dns=\"192.168.1.1\"" - print "# lan_gateway=\"192.168.1.1\"" - + print "config interface lan" + print " option type bridge" + p("ifnames", "lan_ifnames") + print " option proto static" + print " option ipaddr 192.168.1.1" + print " option netmask 255.255.255.0" print "" print "" - print "#### WAN configuration" - print "# wan_proto: WAN protocol, available protocols:" - print "# none: disable" - print "# dhcp: DHCP" - print "# static: Static IP" - print "# pppoe: PPP over Ethernet" - print "# pptp: Point-to-Point tunneling Protocol" - print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\"" - print "" - print "wan_proto=dhcp" - p("wan_ifname") - print "wan_device=\"" c["wan_ifname"] "\"" - print "# wan_ipaddr=\"192.168.0.2\"" - print "# wan_netmask=\"255.255.255.0\"" - print "# wan_gateway=\"192.168.0.1\"" - print "# wan_dns=\"192.168.0.1\"" - print "" - print "## PPP over Ethernet and PPTP" - print "# wan_ifname=\"ppp0\"" - print "# ppp_username=\"my_username\"" - print "# ppp_passwd=\"my_password\"" - print "# pptp_server_ip=\"192.168.0.1\"" + print "config interface wan" + p("ifname", "wan_ifname") + print " option proto dhcp" } ' > /etc/config/network diff --git a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net index f306ae342d7..d5b7f6b0fad 100644 --- a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net +++ b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net @@ -1,191 +1,28 @@ -#!/bin/sh # Copyright (C) 2006 OpenWrt.org -find_name() -{ - for ifname in lan wan wifi ${ifnames}; do - IFTYPE="${ifname}" - eval "IFPROTO=\"\${${IFTYPE}_proto}\"" - eval "IFACE=\"\${${IFTYPE}_ifname}\"" - case "$IFPROTO" in - ""|none);; - static|dhcp) - [ "${IFACE}" = "$INTERFACE" ] && return 0 - [ "${IFACE%%[0-9]*}" = "br" ] && { - eval "ifs=\"\${${IFTYPE}_ifnames}\"" - for part in $ifs; do - [ "$part" = "$INTERFACE" ] && return 0 - done - } - ;; - pppoa) - [ "$INTERFACE" = "atm0" \ - -a -x /sbin/ifup.${IFPROTO} ] && return 0 - ;; - *) - eval "device=\"\${${IFTYPE}_device}\"" - [ "$device" = "$INTERFACE" \ - -a -x /sbin/ifup.${IFPROTO} ] && return 0 - ;; +include network + +addif() { + scan_interfaces + setup_interface "$INTERFACE" + + # find all vlan configurations for this interface and set them up as well + for ifc in $interfaces; do + config_get type "$ifc" type + case "$type" in + bridge) config_get ifs "$ifc" ifnames;; + *) config_get ifs "$ifc" ifname;; esac + for dev in $ifs; do + [ "${dev%%\.*}" = "$INTERFACE" -a "$dev" != "$INTERFACE" ] && { + add_vlan "$dev" + } + done done - IFACE="" - IFTYPE="" - IFPROTO="" - return 255 -} - -do_ifup() { - if="$3" - eval "if_proto=\"\${${2}_proto}\"" - - pidfile=/var/run/${if}.pid - [ -f $pidfile ] && $DEBUG kill $(cat $pidfile) - - case "$1" in - static) - eval "ip=\"\${${2}_ipaddr}\"" - eval "ip6=\"\${${2}_ip6addr}\"" - eval "netmask=\"\${${2}_netmask}\"" - eval "gateway=\"\${${2}_gateway}\"" - eval "dns=\"\${${2}_dns}\"" - eval "static_route=\"\${${2}_static_route}\"" - - $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up - [ -n "$ip6" ] && $DEBUG ifconfig $if add $ip6 - - [ -n "$static_route" ] && { - for route in $static_route; do - if [ "$(echo $route | cut -d \/ -f2)" != "32" ]; - then - route add -net $(echo $route | cut -d \/ -f1) netmask $(echo $route | cut -d \/ -f1) dev $if - else - route add -host $(echo $route | cut -d \/ -f1) dev $if - fi - done - } - - ${gateway:+$DEBUG route add default gw $gateway} - - [ -f /tmp/resolv.conf ] || { - debug "# --- creating /tmp/resolv.conf ---" - for ns in $dns; do - echo "nameserver $ns" >> /tmp/resolv.conf - done - } - - env -i ACTION="ifup" INTERFACE="${2}" PROTO=static /sbin/hotplug "iface" & - ;; - dhcp) - eval "ip=\"\${${2}_ipaddr}\"" - eval "netmask=\"\${${2}_netmask}\"" - eval "hostname=\"\${${2}_hostname}\"" - - $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up - - args="-i $if ${ip:+-r $ip} -b -p $pidfile" - hostname="${hostname%%.*}" - args="$args${hostname:+ -H $hostname}" - [ "$if_proto" = "pptp" ] && args="$args -n -q" || args="$args -R &" - ${DEBUG:-eval} "udhcpc $args" - # hotplug events are handled by /usr/share/udhcpc/default.script - ;; - *) - if [ -x "/sbin/ifup.$1" ]; then - ( $DEBUG . /sbin/ifup.$1 ${2} $3 ) - fi - ;; - esac -} - -do_register() -{ - [ -z "$IFTYPE" -o -z "$IFPROTO" ] && { - find_name || { - case "${INTERFACE%%[0-9]*}" in - wds) - for ifname in lan wifi; do - eval "if=\"\${${ifname}_ifname}\"" - [ -z "$IFPROTO" ] && [ "$if" = "br0" ] && { - eval "IFPROTO=\"\${${2}_proto}\"" - IFTYPE="${tmp}" - } - done - [ -z "$IFPROTO" ] && return 0 - ;; - atm) - for tmp in lan wan wifi ${ifnames}; do - eval "if_proto=\"\${${2}_proto}\"" - [ "$if_proto" = "pppoa" ] && { - do_ifup "pppoa" "$tmp" "$INTERFACE" - return 0 - } - done - ;; - *) - return 0 - ;; - esac - } - } - - case "${INTERFACE%%[0-9]*}" in - ppp|atm);; - *) - eval "mac=\"\${${IFTYPE}_hwaddr}\"" - ${mac:+$DEBUG ifconfig $INTERFACE down hw ether $mac} - ;; - esac - - eval "if=\"\${${IFTYPE}_ifname}\"" - if [ "${if%%[0-9]}" = "br" ]; then - if_valid "$INTERFACE" && { - ifconfig "$if" 2>&- >&- || { - eval "stp=\"\${${IFTYPE}_stp}\"" - $DEBUG brctl addbr "$if" - $DEBUG brctl setfd "$if" 0 - $DEBUG brctl stp "$if" "${stp:-0}" - } - - if [ "$INTERFACE" != "$if" ]; then - $DEBUG ifconfig "$INTERFACE" 0.0.0.0 up - $DEBUG brctl addif "$if" "$INTERFACE" - $DEBUG ifconfig "$INTERFACE" allmulti - else - do_ifup "$IFPROTO" "$IFTYPE" "$if" - fi - } - else - [ "${INTERFACE%%[0-9]*}" = "ppp" ] || do_ifup "$IFPROTO" "$IFTYPE" "$if" - fi -} - -do_unregister() { - [ -z "$IFTYPE" -o -z "$IFPROTO" ] && { - find_name || return 0 - } - - [ "${IFACE%%[0-9]*}" = "br" ] && { - if [ "$INTERFACE" != "$IFACE" ]; then - brctl delif "$IFACE" "$INTERFACE" 2>&- >&- - else - brctl delbr "$IFACE" 2>&- >&- - fi - } - - case "$IFPROTO" in - pppoe|pppoa|pptp) - killall pppd 2>&- >&- - ;; - dhcp) - [ -f /var/run/${INTERFACE}.pid ] && kill "$(cat /var/run/${INTERFACE}.pid)" 2>&- >&- - ;; - esac - - [ "${INTERFACE%%[0-9]*}" = "atm" ] || ifconfig "$INTERFACE" 0.0.0.0 down 2>&- } case "$ACTION" in - add|register) do_register;; - remove|unregister) do_unregister;; + add|register) + addif + ;; esac diff --git a/openwrt/package/base-files/default/etc/init.d/S10boot b/openwrt/package/base-files/default/etc/init.d/S10boot index cb5c6ac4a77..19420eda530 100755 --- a/openwrt/package/base-files/default/etc/init.d/S10boot +++ b/openwrt/package/base-files/default/etc/init.d/S10boot @@ -5,13 +5,14 @@ [ -f /proc/mounts ] || /sbin/mount_root [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc -vconfig set_name_type VLAN_PLUS_VID_NO_PAD +vconfig set_name_type DEV_PLUS_VID_NO_PAD HOSTNAME=${wan_hostname%%.*} echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname mkdir -p /var/run mkdir -p /var/log +mkdir -p /var/lock touch /var/log/wtmp touch /var/log/lastlog [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe diff --git a/openwrt/package/base-files/default/etc/init.d/S40network b/openwrt/package/base-files/default/etc/init.d/S40network new file mode 100755 index 00000000000..20a11845b68 --- /dev/null +++ b/openwrt/package/base-files/default/etc/init.d/S40network @@ -0,0 +1,9 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.orga + +setup_switch() { return 0; } + +. /etc/functions.sh +include network +setup_switch +/sbin/wifi diff --git a/openwrt/package/base-files/default/etc/init.d/rcS b/openwrt/package/base-files/default/etc/init.d/rcS index dad989fe09e..2aa70910c39 100755 --- a/openwrt/package/base-files/default/etc/init.d/rcS +++ b/openwrt/package/base-files/default/etc/init.d/rcS @@ -3,12 +3,13 @@ ${FAILSAFE:+exit} -[ -f /etc/config/network ] && . /etc/config/network -eval $(ipcalc "$log_ipaddr") -[ "$log_ipaddr" = "$IP" ] || log_ipaddr="" -syslogd -C 16 ${log_ipaddr:+-L -R $log_ipaddr} +# FIXME: add logging configuration +#[ -f /etc/config/network ] && . /etc/config/network +#eval $(ipcalc "$log_ipaddr") +#[ "$log_ipaddr" = "$IP" ] || log_ipaddr="" +syslogd -C 16 #${log_ipaddr:+-L -R $log_ipaddr} klogd -#${FAILSAFE:+telnetd -l /bin/login; ifup lan; exit} + for i in /etc/init.d/S*; do $i start 2>&1 done | logger -s -p 6 -t '' & diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh new file mode 100755 index 00000000000..59ec84aba82 --- /dev/null +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -0,0 +1,147 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +# DEBUG="echo" + +find_config() { + local type iface ifn + for ifn in $interfaces; do + config_get type "$ifn" type + config_get iface "$ifn" ifname + case "$type" in + bridge) + config_get iface "$ifn" ifnames + ;; + esac + for ifc in $iface; do + [ "$ifc" = "$1" ] && { + echo "$ifn" + return 0 + } + done + done + + return 1; +} + +scan_interfaces() { + local mode type iface + interfaces= + config_cb() { + config_get type "$CONFIG_SECTION" TYPE + case "$type" in + interface) + config_get type "$CONFIG_SECTION" type + config_get mode "$CONFIG_SECTION" proto + case "$type" in + bridge) + config_get iface "$CONFIG_SECTION" ifname + iface="${iface:-br-$CONFIG_SECTION}" + config_set "$CONFIG_SECTION" ifname "$iface" + ;; + esac + append interfaces "$CONFIG_SECTION" + ( type "scan_$mode" ) >/dev/null 2>/dev/null && eval "scan_$mode '$CONFIG_SECTION'" + ;; + esac + } + config_load network +} + +add_vlan() { + local vif="${1%\.*}" + + [ "$1" = "$vif" ] || ifconfig "$1" >/dev/null 2>/dev/null || { + ifconfig "$vif" up 2>/dev/null >/dev/null || add_vlan "$vif" + $DEBUG vconfig add "$vif" "${1##*\.}" + } +} + +setup_interface() { + local iface="$1" + local config="$2" + local proto="$3" + + [ -n "$config" ] || { + config=$(find_config "$iface") + [ "$?" = 0 ] || return 1 + } + + [ -n "$proto" ] || { + config_get proto "$config" proto + } + + config_get iftype "$config" type + + # Setup VLAN interfaces + add_vlan "$iface" + + # Setup bridging + case "$iftype" in + bridge) + config_get bridge_ifname "$config" ifname + ifconfig "$iface" up 2>/dev/null >/dev/null + ifconfig "$bridge_ifname" 2>/dev/null >/dev/null && { + $DEBUG brctl addif "$bridge_ifname" "$iface" + return 0 + } || { + $DEBUG brctl addbr "$bridge_ifname" + $DEBUG brctl setfd "$bridge_ifname" 0 + $DEBUG brctl addif "$bridge_ifname" "$iface" + iface="$bridge_ifname" + } + ;; + esac + + # Interface settings + config_get mtu "$config" mtu + $DEBUG ifconfig "$iface" ${mtu:+mtu $mtu} up + + pidfile="/var/run/$iface.pid" + case "$proto" in + static) + config_get ipaddr "$config" ipaddr + config_get netmask "$config" netmask + [ -z "$ipaddr" -o -z "$netmask" ] && return 1 + + config_get ip6addr "$config" ip6addr + config_get gateway "$config" gateway + config_get dns "$config" dns + + $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" + [ -z "$gateway" ] || route add default gw "$gateway" + [ -z "$dns" -o -f /tmp/resolv.conf ] || { + for ns in $dns; do + echo "nameserver $ns" >> /tmp/resolv.conf + done + } + + env -i ACTION="ifup" INTERFACE="config" DEVICE="$iface" PROTO=static /sbin/hotplug "iface" & + ;; + dhcp) + pid="$(cat "$pidfile" 2>/dev/null)" + [ -n "$pid" -a -d "/proc/$pid" ] && kill -9 "$pid" + + config_get ipaddr "$config" ipaddr + config_get netmask "$config" netmask + config_get hostname "$config" hostname + config_get proto1 "$config" proto + + [ -z "$ipaddr" ] || \ + $DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"} + + # don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp) + [ "$proto1" != "$proto" ] && dhcpopts="-n -q" + $DEBUG udhcpc -i "$iface" ${ipaddr:+-r $ipaddr} ${hostname:+-H $hostname} -b -p "$pidfile" ${dhcpopts:- -R &} + ;; + *) + if ( eval "type setup_interface_$proto" ) >/dev/null 2>/dev/null; then + eval "setup_interface_$proto '$iface' '$config' '$proto'" + else + echo "Interface type $proto not supported." + return 1 + fi + ;; + esac +} + diff --git a/openwrt/package/base-files/default/sbin/hotplug b/openwrt/package/base-files/default/sbin/hotplug index afe52a446f9..b1b6f97b234 100755 --- a/openwrt/package/base-files/default/sbin/hotplug +++ b/openwrt/package/base-files/default/sbin/hotplug @@ -13,7 +13,6 @@ } . /etc/functions.sh -. /etc/config/network PATH=/bin:/sbin:/usr/bin:/usr/sbin LOGNAME=root diff --git a/openwrt/package/base-files/default/sbin/ifdown b/openwrt/package/base-files/default/sbin/ifdown index 50ffee53040..7debb9559fd 100755 --- a/openwrt/package/base-files/default/sbin/ifdown +++ b/openwrt/package/base-files/default/sbin/ifdown @@ -3,18 +3,32 @@ [ $# = 0 ] && { echo " $0 <group>"; exit; } . /etc/functions.sh -. /etc/config/network +include network +scan_interfaces debug "### ifdown $type ###" type=$1 -eval "if_proto=\"\${${type}_proto}\"" -eval "if=\"\${${type}_ifname}\"" -[ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\"" +config_get proto "$type" proto +[ -z "$proto" ] && { echo "interface not found."; exit; } -case "$if_proto" in - pppoa) hotplug_dev unregister atm0; exit 0 ;; - ""|none) exit 0;; -esac +# kill active ppp daemon +pid="$(cat /var/run/ppp-${type}.pid 2>/dev/null)" +[ -n "$pid" -a -d "/proc/$pid" ] && { + kill $pid + sleep 1 + [ -d "/proc/$pid" ] && kill -9 $pid +} -hotplug_dev unregister "$if" +# kill any other process associated with the interface +config_get ifname "$type" ifname +pid="$(cat /var/run/${ifname}.pid 2>/dev/null)" +[ -n "$pid" -a -d "/proc/$pid" ] && kill -9 $pid + +config_get ifname "$type" ifname +ifconfig "$ifname" >/dev/null 2>/dev/null && { + ifconfig "$ifname" 0.0.0.0 down + + config_get iftype "$type" type + [ "$iftype" = "bridge" ] && brctl delbr "$ifname" +} diff --git a/openwrt/package/base-files/default/sbin/ifup b/openwrt/package/base-files/default/sbin/ifup index 390f9603950..c40de38ad8f 100755 --- a/openwrt/package/base-files/default/sbin/ifup +++ b/openwrt/package/base-files/default/sbin/ifup @@ -1,38 +1,18 @@ #!/bin/sh # Copyright (C) 2006 OpenWrt.org -[ $# = 0 ] && { echo " $0 <group>"; exit; } -. /etc/functions.sh -. /etc/config/network +. /sbin/ifdown "$@" -ifdown $1 - -debug "### ifup $type ###" -type=$1 - -eval "if_proto=\"\${${type}_proto}\"" -eval "if=\"\${${type}_ifname}\"" -[ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\"" - -case "$if_proto" in - pppoa) hotplug_dev register atm0; exit 0 ;; - pppoe) - # PPPoE over ATM - [ "$if" = "nas0" ] && { - ifconfig nas0 2>&- >&- || { - hotplug_dev register atm0 - exit 0 - } - } +config_get iftype "$1" type +case "$iftype" in + bridge) + config_get ifname "$1" ifnames + ;; + *) + config_get ifname "$1" ifname ;; - none|"") exit 0;; esac -if [ "${if%%[0-9]}" = "br" ]; then - eval "ifnames=\"\${${type}_ifnames}\"" - for sif in $ifnames; do - hotplug_dev register "$sif" - done -else - hotplug_dev register "$if" -fi +for dev in $ifname; do + setup_interface "$dev" "$1" +done diff --git a/openwrt/package/base-files/default/sbin/wifi b/openwrt/package/base-files/default/sbin/wifi index 63b2f121bda..f1ac94fa3a0 100755 --- a/openwrt/package/base-files/default/sbin/wifi +++ b/openwrt/package/base-files/default/sbin/wifi @@ -30,12 +30,7 @@ config_cb() { } config_load wireless - -[ -d /lib/wifi -a -n "$(ls /lib/wifi/*.sh 2>&-)" ] && { - for script in /lib/wifi/*.sh; do - . $script - done -} +include wifi for device in $DEVICES; do ( config_get type "$device" type diff --git a/openwrt/package/base-files/default/usr/share/udhcpc/default.script b/openwrt/package/base-files/default/usr/share/udhcpc/default.script index 4604648e6b0..a244e05a157 100755 --- a/openwrt/package/base-files/default/usr/share/udhcpc/default.script +++ b/openwrt/package/base-files/default/usr/share/udhcpc/default.script @@ -1,15 +1,19 @@ #!/bin/sh [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1 -. /etc/config/network +. /etc/functions.sh +include network RESOLV_CONF="/tmp/resolv.conf" hotplug_event() { - for ifname in lan wan wifi ${ifnames}; do - eval "proto=\"\${${ifname}_proto}\"" - eval "if=\"\${${ifname}_ifname}\"" + scan_interfaces + for ifc in $interfaces; do + config_get ifname $ifc ifname + [ "$ifname" = "$interface" ] || continue + + config_get proto $ifc proto [ "$proto" = "dhcp" ] || continue - [ "$if" = "$interface" ] || continue + env -i ACTION="$1" INTERFACE="$ifname" PROTO=dhcp /sbin/hotplug iface done } diff --git a/openwrt/package/base-files/rb532-2.6/etc/config/network b/openwrt/package/base-files/rb532-2.6/etc/config/network index 2bb48b88639..6f089fe9926 100644 --- a/openwrt/package/base-files/rb532-2.6/etc/config/network +++ b/openwrt/package/base-files/rb532-2.6/etc/config/network @@ -1,6 +1,6 @@ -# Network configuration file # Copyright (C) 2006 OpenWrt.org -## LAN configuration -lan_ifname="eth0" -lan_proto="dhcp" +config interface lan + option ifname eth0 + option proto dhcp + diff --git a/openwrt/package/base-files/sibyte-2.6/etc/config/network b/openwrt/package/base-files/sibyte-2.6/etc/config/network index 576677bf7c4..95d7575c92f 100644 --- a/openwrt/package/base-files/sibyte-2.6/etc/config/network +++ b/openwrt/package/base-files/sibyte-2.6/etc/config/network @@ -1,13 +1,8 @@ -# Network configuration file # Copyright (C) 2006 OpenWrt.org -## LAN configuration -lan_ifname="br0" -lan_ifnames="eth0 ath0" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" - -## WAN configuration -wan_ifname="" -wan_proto="none" +config interface lan + option type bridge + option ifnames "eth0 ath0" + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 diff --git a/openwrt/package/base-files/x86-2.4/etc/config/network b/openwrt/package/base-files/x86-2.4/etc/config/network index 7bcfd0870a0..9f521c05bf4 100644 --- a/openwrt/package/base-files/x86-2.4/etc/config/network +++ b/openwrt/package/base-files/x86-2.4/etc/config/network @@ -1,13 +1,13 @@ -# Network configuration file # Copyright (C) 2006 OpenWrt.org -## LAN configuration -lan_ifname="br0" -lan_ifnames="eth1 eth2" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" +config interface lan + option type bridge + option ifnames "eth1 eth2" + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + +config interface wan + option ifname eth0 + option proto dhcp -## WAN configuration -wan_ifname="eth0" -wan_proto="dhcp" diff --git a/openwrt/package/base-files/x86-2.6/etc/config/network b/openwrt/package/base-files/x86-2.6/etc/config/network index 7bcfd0870a0..9f521c05bf4 100644 --- a/openwrt/package/base-files/x86-2.6/etc/config/network +++ b/openwrt/package/base-files/x86-2.6/etc/config/network @@ -1,13 +1,13 @@ -# Network configuration file # Copyright (C) 2006 OpenWrt.org -## LAN configuration -lan_ifname="br0" -lan_ifnames="eth1 eth2" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" +config interface lan + option type bridge + option ifnames "eth1 eth2" + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + +config interface wan + option ifname eth0 + option proto dhcp -## WAN configuration -wan_ifname="eth0" -wan_proto="dhcp" diff --git a/openwrt/package/base-files/xscale-2.6/etc/config/network b/openwrt/package/base-files/xscale-2.6/etc/config/network index 2bb48b88639..aadd4aa8ed0 100644 --- a/openwrt/package/base-files/xscale-2.6/etc/config/network +++ b/openwrt/package/base-files/xscale-2.6/etc/config/network @@ -1,6 +1,5 @@ # Network configuration file -# Copyright (C) 2006 OpenWrt.org -## LAN configuration -lan_ifname="eth0" -lan_proto="dhcp" +config interface lan + option ifname eth0 + option proto dhcp diff --git a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh index 6cac60c0b76..53d1cf79253 100644 --- a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -1,3 +1,15 @@ +bridge_interface() { + ( + . /etc/functions.sh + include network + scan_interfaces + cfg="$(find_config "$1")" + [ -z "$cfg" ] && return 0 + config_get type "$cfg" type + [ "$type" = bridge ] && config_get "$type" bridge + ) +} + scan_broadcom() { local device="$1" @@ -127,7 +139,7 @@ setup_broadcom() { config_get ifname "$vif" ifname append if_up "ifconfig $ifname up" ";$N" [ -z "$nasopts" ] || { - config_get bridge "$vif" bridge # XXX: integrate with /etc/config/network later + bridge="$(bridge_interface "$ifname")" eval "${vif}_ssid=\"\$ssid\"" mode="-A" [ "$vif" = "$sta_if" ] && mode="-S" diff --git a/openwrt/package/dnsmasq/files/dnsmasq.init b/openwrt/package/dnsmasq/files/dnsmasq.init index 17ef43c3d5f..140f727f468 100644 --- a/openwrt/package/dnsmasq/files/dnsmasq.init +++ b/openwrt/package/dnsmasq/files/dnsmasq.init @@ -1,5 +1,7 @@ #!/bin/sh -. /etc/config/network +. /etc/functions.sh +include network +scan_interfaces # The following is to automatically configure the DHCP settings # based on config settings. Feel free to replace all this crap @@ -10,7 +12,7 @@ args="" iface=lan -eval "ifname=\${${iface}_ifname}" +config_get ifname "$iface" ifname dhcp_enable="${dhcp_enable:-1}" dhcp_start="${dhcp_start:-100}" @@ -26,8 +28,8 @@ dhcp_lease="${dhcp_lease:-12h}" # no existing DHCP server? # calculate settings - eval "ipaddr=\${${iface}_ipaddr}" - eval "netmask=\${${iface}_netmask}" + config_get ipaddr "$iface" ipaddr + config_get netmask "$iface" netmask eval $(ipcalc $ipaddr $netmask ${dhcp_start:-100} ${dhcp_num:-150}) # and pass the args via config parser defines @@ -39,6 +41,8 @@ dhcp_lease="${dhcp_lease:-12h}" } # ignore requests from wan interface + config_get wan_proto wan proto + config_get wan_ifname wan ifname [ -z "$wan_proto" -o "$wan_proto" = "none" ] || echo "@define wan_ifname $wan_ifname" cat /etc/dnsmasq.conf diff --git a/openwrt/package/iptables/files/firewall.awk b/openwrt/package/iptables/files/firewall.awk index 53783300453..902c7b18884 100644 --- a/openwrt/package/iptables/files/firewall.awk +++ b/openwrt/package/iptables/files/firewall.awk @@ -1,10 +1,7 @@ # Copyright (C) 2006 OpenWrt.org BEGIN { - print ". /etc/config/network" - print "proto=\"$wan_proto\"" - print "[ -z \"$proto\" -o \"$proto\" = \"none\" ] && exit" - print "ifname=\"$wan_ifname\"" + print "ifname=\"$WAN\"" print "[ -z \"$ifname\" ] && exit" print "" print "iptables -X input_$ifname 2>&- >&-" diff --git a/openwrt/package/iptables/files/firewall.init b/openwrt/package/iptables/files/firewall.init index e174d84bb23..a0bd99ef9a9 100755 --- a/openwrt/package/iptables/files/firewall.init +++ b/openwrt/package/iptables/files/firewall.init @@ -3,9 +3,12 @@ ## Please make changes in /etc/firewall.user -. /etc/config/network -WAN="$wan_ifname" -LAN="$lan_ifname" +. /etc/functions.sh +include network + +scan_interfaces +config_get WAN wan ifname +config_get LAN lan ifname ## CLEAR TABLES for T in filter nat; do @@ -35,7 +38,7 @@ iptables -t nat -N postrouting_rule iptables -A INPUT -j input_rule # allow - [ -z "$WAN" ] || iptables -A INPUT -i \! $WAN -j ACCEPT # allow from lan/wifi interfaces + iptables -A INPUT ${WAN:+-i \! $WAN} -j ACCEPT # allow from lan/wifi interfaces iptables -A INPUT -p icmp -j ACCEPT # allow ICMP iptables -A INPUT -p gre -j ACCEPT # allow GRE diff --git a/openwrt/package/iptables/files/firewall.user b/openwrt/package/iptables/files/firewall.user old mode 100755 new mode 100644 index 1fb862e9b00..5f295babf21 --- a/openwrt/package/iptables/files/firewall.user +++ b/openwrt/package/iptables/files/firewall.user @@ -1,11 +1,6 @@ #!/bin/sh # Copyright (C) 2006 OpenWrt.org -. /etc/config/network - -WAN="$wan_ifname" -LAN="$lan_ifname" - iptables -F input_rule iptables -F output_rule iptables -F forwarding_rule diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 85d52d05424..e49b610c36b 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -95,6 +95,8 @@ define Build/Compile endef define Package/ppp/install + install -d -m0755 $(1)/lib/network + install -m0755 ./files/ppp.sh $(1)/lib/network/ install -d -m0755 $(1)/etc/ppp install -m0600 ./files/etc/ppp/chap-secrets $(1)/etc/ppp/ install -m0644 ./files/etc/ppp/filter $(1)/etc/ppp/ @@ -110,19 +112,19 @@ define Package/ppp/install endef define Package/ppp-mod-pppoa/install + install -d -m0755 $(1)/lib/network + install -m0755 ./files/pppoa.sh $(1)/lib/network/ install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \ $(1)/usr/lib/pppd/$(PKG_VERSION)/ - install -d -m0755 $(1)/sbin - install -m0755 ./files/ifup.pppoa $(1)/sbin/ endef define Package/ppp-mod-pppoe/install + install -d -m0755 $(1)/lib/network + install -m0755 ./files/pppoe.sh $(1)/lib/network/ install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \ $(1)/usr/lib/pppd/$(PKG_VERSION)/ - install -d -m0755 $(1)/sbin - install -m0755 ./files/ifup.pppoe $(1)/sbin/ endef define Package/ppp-mod-radius/install diff --git a/openwrt/package/ppp/files/ifup.pppoa b/openwrt/package/ppp/files/ifup.pppoa deleted file mode 100644 index f78a162ce51..00000000000 --- a/openwrt/package/ppp/files/ifup.pppoa +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -[ $# = 0 ] && { echo " $0 <group>"; exit; } -. /etc/config/network -type=$1 - -eval "proto=\"\${${type}_proto}\"" -[ "$proto" = "pppoa" ] || { - echo "$0: ${type}_proto isn't pppoa" - exit -} - -mkdir -p /var/lock - -for module in slhc ppp_generic pppoatm; do - /sbin/insmod $module 2>&- >&- -done - -KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} -case "$ppp_demand" in - on|1|enabled) - DEMAND=${ppp_idletime:+demand idle $ppp_idletime} - [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} - ;; - *) DEMAND="persist";; -esac -MTU=${ppp_mtu:-1500} - -/usr/sbin/pppd \ - plugin pppoatm.so ${atm_vpi:-8}.${atm_vci:-35} \ - usepeerdns \ - defaultroute \ - linkname $type \ - ipparam $type \ - user "$ppp_username" \ - password "$ppp_passwd" \ - mtu $MTU mru $MTU \ - $DEMAND \ - $KEEPALIVE diff --git a/openwrt/package/ppp/files/ifup.pppoe b/openwrt/package/ppp/files/ifup.pppoe deleted file mode 100644 index c7019fc3981..00000000000 --- a/openwrt/package/ppp/files/ifup.pppoe +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -[ $# = 0 ] && { echo " $0 <group>"; exit; } -. /etc/config/network -type=$1 - -eval "proto=\"\${${type}_proto}\"" -[ "$proto" = "pppoe" ] || { - echo "$0: ${type}_proto isn't pppoe" - exit -} - -mkdir -p /var/lock - -for module in slhc ppp_generic pppox pppoe; do - /sbin/insmod $module 2>&- >&- -done - -eval "IFNAME=\"\${${type}_device}\"" -KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} -case "$ppp_demand" in - on|1|enabled) - DEMAND=${ppp_idletime:+demand idle $ppp_idletime} - [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} - ;; - *) DEMAND="persist";; -esac -MTU=${ppp_mtu:-1492} - -ifconfig $IFNAME up -/usr/sbin/pppd \ - plugin rp-pppoe.so \ - connect /bin/true \ - usepeerdns \ - defaultroute \ - linkname $type \ - ipparam $type \ - user "$ppp_username" \ - password "$ppp_passwd" \ - mtu $MTU mru $MTU \ - $DEMAND \ - $KEEPALIVE \ - nic-$IFNAME - diff --git a/openwrt/package/ppp/files/ppp.sh b/openwrt/package/ppp/files/ppp.sh new file mode 100644 index 00000000000..0bb77b8284c --- /dev/null +++ b/openwrt/package/ppp/files/ppp.sh @@ -0,0 +1,27 @@ +scan_ppp() { + config_get ifname "$1" ifname + pppdev="${pppdev:-0}" + config_set "$1" device "$ifname" + config_set "$1" ifname "ppp$pppdev" + config_set "$1" unit "$pppdev" +} + +start_pppd() { + local cfg="$1"; shift + config_get device "$cfg" device + config_get unit "$cfg" unit + config_get username "$cfg" username + config_get password "$cfg" password + config_get keepalive "$cfg" keepalive + config_get demand "$cfg" demand + [ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf + /usr/sbin/pppd "$@" \ + ${keepalive:+lcp-echo-interval 5 lcp-echo-failure $keepalive} \ + ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \ + usepeerdns \ + defaultroute \ + replacedefaultroute \ + ${username:+username "$username" password "$password"} \ + linkname "$cfg" \ + ipparam "$cfg" +} diff --git a/openwrt/package/ppp/files/pppoa.sh b/openwrt/package/ppp/files/pppoa.sh new file mode 100644 index 00000000000..e6530b073ef --- /dev/null +++ b/openwrt/package/ppp/files/pppoa.sh @@ -0,0 +1,20 @@ +scan_pppoa() { + scan_ppp "$@" +} + +setup_interface_pppoa() { + local iface="$1" + local config="$2" + + config_get device "$config" device + + for module in slhc ppp_generic pppoatm; do + /sbin/insmod $module 2>&- >&- + done + + config_get mtu "$cfg" mtu + mtu=${mtu:-1492} + start_pppd "$config" \ + plugin pppoatm.so ${atm_vpi:-8}.${atm_vci:-35} \ + mtu $mtu mru $mtu +} diff --git a/openwrt/package/ppp/files/pppoe.sh b/openwrt/package/ppp/files/pppoe.sh new file mode 100644 index 00000000000..f263caaeefa --- /dev/null +++ b/openwrt/package/ppp/files/pppoe.sh @@ -0,0 +1,21 @@ +scan_pppoe() { + scan_ppp "$@" +} + +setup_interface_pppoe() { + local iface="$1" + local config="$2" + + config_get device "$config" device + + for module in slhc ppp_generic pppox pppoe; do + /sbin/insmod $module 2>&- >&- + done + + config_get mtu "$cfg" mtu + mtu=${mtu:-1480} + start_pppd "$config" \ + plugin rp-pppoe.so \ + mtu $mtu mru $mtu \ + "nic-$device" +} diff --git a/openwrt/package/ppp/files/pptp.sh b/openwrt/package/ppp/files/pptp.sh new file mode 100644 index 00000000000..7b33ac1ff70 --- /dev/null +++ b/openwrt/package/ppp/files/pptp.sh @@ -0,0 +1,3 @@ +scan_pptp() { + scan_ppp "$@" +} diff --git a/openwrt/package/pptp/Makefile b/openwrt/package/pptp/Makefile index 061e55395eb..b060c12a793 100644 --- a/openwrt/package/pptp/Makefile +++ b/openwrt/package/pptp/Makefile @@ -31,8 +31,8 @@ endef define Package/pptp/install install -d -m0755 $(1)/etc/ppp install -m0644 ./files/options.pptp $(1)/etc/ppp/ - install -d -m0755 $(1)/sbin - install -m0755 ./files/ifup.pptp $(1)/sbin/ + install -d -m0755 $(1)/lib/network + install -m0755 ./files/pptp.sh $(1)/lib/network/ install -d -m0755 $(1)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/pptp $(1)/usr/sbin/ endef diff --git a/openwrt/package/pptp/files/ifup.pptp b/openwrt/package/pptp/files/ifup.pptp deleted file mode 100644 index f401a36b2fa..00000000000 --- a/openwrt/package/pptp/files/ifup.pptp +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -[ $# = 0 ] && { echo " $0 <group>"; exit; } -. /etc/config/network -type=$1 - -eval "proto=\"\${${type}_proto}\"" -[ "$proto" = "pptp" ] || { - echo "$0: ${type}_proto isn't pptp" - exit -} - -mkdir -p /var/lock - -for module in slhc ppp_generic ppp_async ip_gre; do - /sbin/insmod $module 2>&- >&- -done - -KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} -case "$ppp_demand" in - on|1|enabled) - DEMAND=${ppp_idletime:+demand idle $ppp_idletime} - [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} - ;; - *) DEMAND="persist";; -esac -MTU=${ppp_mtu:-1452} - -[ "$pptp_proto" = "static" ] || pptp_proto="dhcp" -do_ifup $pptp_proto $type - -/usr/sbin/pppd \ - pty "/usr/sbin/pptp $pptp_server_ip --loglevel 0 --nolaunchpppd" \ - file /etc/ppp/options.pptp \ - connect /bin/true \ - usepeerdns \ - defaultroute \ - replacedefaultroute \ - linkname "$type" \ - ipparam "$type" \ - user "$ppp_username" \ - password "$ppp_passwd" \ - mtu $MTU mru $MTU \ - $DEMAND \ - $KEEPALIVE - diff --git a/openwrt/package/pptp/files/pptp.sh b/openwrt/package/pptp/files/pptp.sh new file mode 100644 index 00000000000..7847802041b --- /dev/null +++ b/openwrt/package/pptp/files/pptp.sh @@ -0,0 +1,22 @@ +scan_pppoe() { + scan_ppp "$@" +} + +setup_interface_pppoe() { + local iface="$1" + local config="$2" + + config_get device "$config" device + + for module in slhc ppp_generic ppp_async ip_gre; do + /sbin/insmod $module 2>&- >&- + done + setup_interface "$iface" "$config" "dhcp" + + config_get mtu "$cfg" mtu + mtu=${mtu:-1452} + start_pppd "$config" \ + plugin rp-pppoe.so \ + mtu $mtu mru $mtu \ + "nic-$device" +} diff --git a/openwrt/package/switch/Makefile b/openwrt/package/switch/Makefile index 5513394fd6a..860e530c4c9 100644 --- a/openwrt/package/switch/Makefile +++ b/openwrt/package/switch/Makefile @@ -42,6 +42,10 @@ define Build/Compile endef define Package/kmod-switch/install + install -m0755 -d $(1)/lib/network/ + install -m0755 ./files/switch.sh $(1)/lib/network/ + install -m0755 -d $(1)/etc/modules.d/ + printf 'switch-core\nswitch-robo\nswitch-adm\n' > $(1)/etc/modules.d/20-switch install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION) diff --git a/openwrt/package/switch/files/switch.sh b/openwrt/package/switch/files/switch.sh new file mode 100644 index 00000000000..a787a8cf389 --- /dev/null +++ b/openwrt/package/switch/files/switch.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +setup_switch_vlan() { + DIR="/proc/switch/$CONFIG_SECTION/vlan/$1" + [ -d "$DIR" ] || return 0 + + config_get ports "$CONFIG_SECTION" "vlan$1" + echo "$ports" > "$DIR/ports" +} + +setup_switch() { + config_cb() { + case "$1" in + switch) + [ -n "$2" -a -d "/proc/switch/$2" ] && { + echo 1 > "/proc/switch/$2/reset" + echo 1 > "/proc/switch/$2/enable" + echo 1 > "/proc/switch/$2/enable_vlan" + option_cb() { + case "$1" in + vlan*) setup_switch_vlan "${1##vlan}";; + esac + } + } + ;; + *) + option_cb() { return 0; } + ;; + esac + } + config_load network +} From f646e7cbe1ac8ab055a0e91e91a9f5fb12a6005a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 03:18:50 +0000 Subject: [PATCH 398/757] only set dhcp_enable if lan proto is set to static SVN-Revision: 4324 --- openwrt/package/dnsmasq/files/dnsmasq.init | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openwrt/package/dnsmasq/files/dnsmasq.init b/openwrt/package/dnsmasq/files/dnsmasq.init index 140f727f468..14fc698cff7 100644 --- a/openwrt/package/dnsmasq/files/dnsmasq.init +++ b/openwrt/package/dnsmasq/files/dnsmasq.init @@ -13,8 +13,9 @@ scan_interfaces args="" iface=lan config_get ifname "$iface" ifname +config_get proto "$iface" proto -dhcp_enable="${dhcp_enable:-1}" +[ "$proto" = static ] && dhcp_enable="${dhcp_enable:-1}" dhcp_start="${dhcp_start:-100}" dhcp_num="${dhcp_num:-50}" dhcp_lease="${dhcp_lease:-12h}" @@ -33,7 +34,7 @@ dhcp_lease="${dhcp_lease:-12h}" eval $(ipcalc $ipaddr $netmask ${dhcp_start:-100} ${dhcp_num:-150}) # and pass the args via config parser defines - echo "@define dhcp_enable 1" + echo "${dhcp_enable:+@define dhcp_enable 1}" echo "@define netmask $NETMASK" echo "@define start $START" echo "@define end $END" From 3145156ebe4928a162d1cecdd8d9f01e59bf13b0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 12:47:09 +0000 Subject: [PATCH 399/757] usb fixes and performance enhancements SVN-Revision: 4325 --- .../patches/228-more_usb_fixes.patch | 861 ++++++++++++++++++ 1 file changed, 861 insertions(+) create mode 100644 openwrt/target/linux/generic-2.4/patches/228-more_usb_fixes.patch diff --git a/openwrt/target/linux/generic-2.4/patches/228-more_usb_fixes.patch b/openwrt/target/linux/generic-2.4/patches/228-more_usb_fixes.patch new file mode 100644 index 00000000000..40b24cac0f2 --- /dev/null +++ b/openwrt/target/linux/generic-2.4/patches/228-more_usb_fixes.patch @@ -0,0 +1,861 @@ +diff -ur linux.old/drivers/scsi/hosts.c linux.dev/drivers/scsi/hosts.c +--- linux.old/drivers/scsi/hosts.c 2003-06-13 16:51:36.000000000 +0200 ++++ linux.dev/drivers/scsi/hosts.c 2006-07-30 12:34:30.000000000 +0200 +@@ -107,8 +107,21 @@ + if (shn) shn->host_registered = 0; + /* else {} : This should not happen, we should panic here... */ + ++ /* If we are removing the last host registered, it is safe to reuse ++ * its host number (this avoids "holes" at boot time) (DB) ++ * It is also safe to reuse those of numbers directly below which have ++ * been released earlier (to avoid some holes in numbering). ++ */ ++ if(sh->host_no == max_scsi_hosts - 1) { ++ while(--max_scsi_hosts >= next_scsi_host) { ++ shpnt = scsi_hostlist; ++ while(shpnt && shpnt->host_no != max_scsi_hosts - 1) ++ shpnt = shpnt->next; ++ if(shpnt) ++ break; ++ } ++ } + next_scsi_host--; +- + kfree((char *) sh); + } + +diff -ur linux.old/drivers/usb/hcd.c linux.dev/drivers/usb/hcd.c +--- linux.old/drivers/usb/hcd.c 2004-04-14 15:05:32.000000000 +0200 ++++ linux.dev/drivers/usb/hcd.c 2006-07-30 11:49:06.000000000 +0200 +@@ -1105,7 +1105,8 @@ + break; + case PIPE_BULK: + allowed |= USB_DISABLE_SPD | USB_QUEUE_BULK +- | USB_ZERO_PACKET | URB_NO_INTERRUPT; ++ | USB_ZERO_PACKET | URB_NO_INTERRUPT ++ | URB_NO_TRANSFER_DMA_MAP; + break; + case PIPE_INTERRUPT: + allowed |= USB_DISABLE_SPD; +@@ -1212,7 +1213,8 @@ + urb->setup_packet, + sizeof (struct usb_ctrlrequest), + PCI_DMA_TODEVICE); +- if (urb->transfer_buffer_length != 0) ++ if (urb->transfer_buffer_length != 0 ++ && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) + urb->transfer_dma = pci_map_single ( + hcd->pdev, + urb->transfer_buffer, +diff -ur linux.old/drivers/usb/host/ehci-hcd.c linux.dev/drivers/usb/host/ehci-hcd.c +--- linux.old/drivers/usb/host/ehci-hcd.c 2006-07-30 11:31:57.000000000 +0200 ++++ linux.dev/drivers/usb/host/ehci-hcd.c 2006-07-30 11:48:14.000000000 +0200 +@@ -399,6 +399,27 @@ + ehci_mem_cleanup (ehci); + return retval; + } ++ ++{ ++ int misc_reg; ++ u32 vendor_id; ++ ++ pci_read_config_dword (ehci->hcd.pdev, PCI_VENDOR_ID, &vendor_id); ++ if (vendor_id == 0x31041106) { ++ /* VIA 6212 */ ++ printk(KERN_INFO "EHCI: Enabling VIA 6212 workarounds\n", misc_reg); ++ pci_read_config_byte(ehci->hcd.pdev, 0x49, &misc_reg); ++ misc_reg &= ~0x20; ++ pci_write_config_byte(ehci->hcd.pdev, 0x49, misc_reg); ++ pci_read_config_byte(ehci->hcd.pdev, 0x49, &misc_reg); ++ ++ pci_read_config_byte(ehci->hcd.pdev, 0x4b, &misc_reg); ++ misc_reg |= 0x20; ++ pci_write_config_byte(ehci->hcd.pdev, 0x4b, misc_reg); ++ pci_read_config_byte(ehci->hcd.pdev, 0x4b, &misc_reg); ++ } ++} ++ + writel (INTR_MASK, &ehci->regs->intr_enable); + writel (ehci->periodic_dma, &ehci->regs->frame_list); + +diff -ur linux.old/drivers/usb/host/ehci-q.c linux.dev/drivers/usb/host/ehci-q.c +--- linux.old/drivers/usb/host/ehci-q.c 2006-07-30 11:31:57.000000000 +0200 ++++ linux.dev/drivers/usb/host/ehci-q.c 2006-07-30 12:10:15.000000000 +0200 +@@ -791,6 +791,8 @@ + writel (cmd, &ehci->regs->command); + ehci->hcd.state = USB_STATE_RUNNING; + /* posted write need not be known to HC yet ... */ ++ ++ timer_action (ehci, TIMER_IO_WATCHDOG); + } + } + +diff -ur linux.old/drivers/usb/host/usb-uhci.c linux.dev/drivers/usb/host/usb-uhci.c +--- linux.old/drivers/usb/host/usb-uhci.c 2004-11-17 12:54:21.000000000 +0100 ++++ linux.dev/drivers/usb/host/usb-uhci.c 2006-07-30 12:10:16.000000000 +0200 +@@ -2491,7 +2491,7 @@ + ((urb_priv_t*)urb->hcpriv)->flags=0; + } + +- if ((urb->status != -ECONNABORTED) && (urb->status != ECONNRESET) && ++ if ((urb->status != -ECONNABORTED) && (urb->status != -ECONNRESET) && + (urb->status != -ENOENT)) { + + urb->status = -EINPROGRESS; +@@ -3034,6 +3034,21 @@ + + pci_set_master(dev); + ++ { ++ u8 misc_reg; ++ u32 vendor_id; ++ ++ pci_read_config_dword (dev, PCI_VENDOR_ID, &vendor_id); ++ if (vendor_id == 0x30381106) { ++ /* VIA 6212 */ ++ printk(KERN_INFO "UHCI: Enabling VIA 6212 workarounds\n"); ++ pci_read_config_byte(dev, 0x41, &misc_reg); ++ misc_reg &= ~0x10; ++ pci_write_config_byte(dev, 0x41, misc_reg); ++ pci_read_config_byte(dev, 0x41, &misc_reg); ++ } ++ } ++ + /* Search for the IO base address.. */ + for (i = 0; i < 6; i++) { + +diff -ur linux.old/drivers/usb/storage/transport.c linux.dev/drivers/usb/storage/transport.c +--- linux.old/drivers/usb/storage/transport.c 2005-04-04 03:42:19.000000000 +0200 ++++ linux.dev/drivers/usb/storage/transport.c 2006-07-30 12:22:56.000000000 +0200 +@@ -54,6 +54,22 @@ + #include <linux/sched.h> + #include <linux/errno.h> + #include <linux/slab.h> ++#include <linux/pci.h> ++#include "../hcd.h" ++ ++/* These definitions mirror those in pci.h, so they can be used ++ * interchangeably with their PCI_ counterparts */ ++enum dma_data_direction { ++ DMA_BIDIRECTIONAL = 0, ++ DMA_TO_DEVICE = 1, ++ DMA_FROM_DEVICE = 2, ++ DMA_NONE = 3, ++}; ++ ++#define dma_map_sg(d,s,n,dir) pci_map_sg(d,s,n,dir) ++#define dma_unmap_sg(d,s,n,dir) pci_unmap_sg(d,s,n,dir) ++ ++ + + /*********************************************************************** + * Helper routines +@@ -554,6 +570,543 @@ + return US_BULK_TRANSFER_SHORT; + } + ++/*-------------------------------------------------------------------*/ ++/** ++ * usb_buffer_unmap_sg - free DMA mapping(s) for a scatterlist ++ * @dev: device to which the scatterlist will be mapped ++ * @pipe: endpoint defining the mapping direction ++ * @sg: the scatterlist to unmap ++ * @n_hw_ents: the positive return value from usb_buffer_map_sg ++ * ++ * Reverses the effect of usb_buffer_map_sg(). ++ */ ++static void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, ++ struct scatterlist *sg, int n_hw_ents) ++{ ++ struct usb_bus *bus; ++ struct usb_hcd *hcd; ++ struct pci_dev *pdev; ++ ++ if (!dev ++ || !(bus = dev->bus) ++ || !(hcd = bus->hcpriv) ++ || !(pdev = hcd->pdev) ++ || !pdev->dma_mask) ++ return; ++ ++ dma_unmap_sg (pdev, sg, n_hw_ents, ++ usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); ++} ++ ++/** ++ * usb_buffer_map_sg - create scatterlist DMA mapping(s) for an endpoint ++ * @dev: device to which the scatterlist will be mapped ++ * @pipe: endpoint defining the mapping direction ++ * @sg: the scatterlist to map ++ * @nents: the number of entries in the scatterlist ++ * ++ * Return value is either < 0 (indicating no buffers could be mapped), or ++ * the number of DMA mapping array entries in the scatterlist. ++ * ++ * The caller is responsible for placing the resulting DMA addresses from ++ * the scatterlist into URB transfer buffer pointers, and for setting the ++ * URB_NO_TRANSFER_DMA_MAP transfer flag in each of those URBs. ++ * ++ * Top I/O rates come from queuing URBs, instead of waiting for each one ++ * to complete before starting the next I/O. This is particularly easy ++ * to do with scatterlists. Just allocate and submit one URB for each DMA ++ * mapping entry returned, stopping on the first error or when all succeed. ++ * Better yet, use the usb_sg_*() calls, which do that (and more) for you. ++ * ++ * This call would normally be used when translating scatterlist requests, ++ * rather than usb_buffer_map(), since on some hardware (with IOMMUs) it ++ * may be able to coalesce mappings for improved I/O efficiency. ++ * ++ * Reverse the effect of this call with usb_buffer_unmap_sg(). ++ */ ++static int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe, ++ struct scatterlist *sg, int nents) ++{ ++ struct usb_bus *bus; ++ struct usb_hcd *hcd; ++ struct pci_dev *pdev; ++ ++ if (!dev ++ || usb_pipecontrol (pipe) ++ || !(bus = dev->bus) ++ || !(hcd = bus->hcpriv) ++ || !(pdev = hcd->pdev) ++ || !pdev->dma_mask) ++ return -1; ++ ++ // FIXME generic api broken like pci, can't report errors ++ return dma_map_sg (pdev, sg, nents, ++ usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); ++} ++ ++static void sg_clean (struct usb_sg_request *io) ++{ ++ struct usb_hcd *hcd = io->dev->bus->hcpriv; ++ struct pci_dev *pdev = hcd->pdev; ++ ++ if (io->urbs) { ++ while (io->entries--) ++ usb_free_urb (io->urbs [io->entries]); ++ kfree (io->urbs); ++ io->urbs = 0; ++ } ++ if (pdev->dma_mask != 0) ++ usb_buffer_unmap_sg (io->dev, io->pipe, io->sg, io->nents); ++ io->dev = 0; ++} ++ ++static void sg_complete (struct urb *urb) ++{ ++ struct usb_sg_request *io = (struct usb_sg_request *) urb->context; ++ ++ spin_lock (&io->lock); ++ ++ /* In 2.5 we require hcds' endpoint queues not to progress after fault ++ * reports, until the completion callback (this!) returns. That lets ++ * device driver code (like this routine) unlink queued urbs first, ++ * if it needs to, since the HC won't work on them at all. So it's ++ * not possible for page N+1 to overwrite page N, and so on. ++ * ++ * That's only for "hard" faults; "soft" faults (unlinks) sometimes ++ * complete before the HCD can get requests away from hardware, ++ * though never during cleanup after a hard fault. ++ */ ++ if (io->status ++ && (io->status != -ECONNRESET ++ || urb->status != -ECONNRESET) ++ && urb->actual_length) { ++ US_DEBUGP("Error: %s ep%d%s scatterlist error %d/%d\n", ++ io->dev->devpath, ++ usb_pipeendpoint (urb->pipe), ++ usb_pipein (urb->pipe) ? "in" : "out", ++ urb->status, io->status); ++ // BUG (); ++ } ++ ++ if (urb->status && urb->status != -ECONNRESET) { ++ int i, found, status; ++ ++ io->status = urb->status; ++ ++ /* the previous urbs, and this one, completed already. ++ * unlink pending urbs so they won't rx/tx bad data. ++ */ ++ for (i = 0, found = 0; i < io->entries; i++) { ++ if (!io->urbs [i]) ++ continue; ++ if (found) { ++ status = usb_unlink_urb (io->urbs [i]); ++ if (status != -EINPROGRESS && status != -EBUSY) ++ US_DEBUGP("Error: %s, unlink --> %d\n", __FUNCTION__, status); ++ } else if (urb == io->urbs [i]) ++ found = 1; ++ } ++ } ++ urb->dev = 0; ++ ++ /* on the last completion, signal usb_sg_wait() */ ++ io->bytes += urb->actual_length; ++ io->count--; ++ if (!io->count) ++ complete (&io->complete); ++ ++ spin_unlock (&io->lock); ++} ++ ++/** ++ * usb_sg_init - initializes scatterlist-based bulk/interrupt I/O request ++ * @io: request block being initialized. until usb_sg_wait() returns, ++ * treat this as a pointer to an opaque block of memory, ++ * @dev: the usb device that will send or receive the data ++ * @pipe: endpoint "pipe" used to transfer the data ++ * @period: polling rate for interrupt endpoints, in frames or ++ * (for high speed endpoints) microframes; ignored for bulk ++ * @sg: scatterlist entries ++ * @nents: how many entries in the scatterlist ++ * @length: how many bytes to send from the scatterlist, or zero to ++ * send every byte identified in the list. ++ * @mem_flags: SLAB_* flags affecting memory allocations in this call ++ * ++ * Returns zero for success, else a negative errno value. This initializes a ++ * scatter/gather request, allocating resources such as I/O mappings and urb ++ * memory (except maybe memory used by USB controller drivers). ++ * ++ * The request must be issued using usb_sg_wait(), which waits for the I/O to ++ * complete (or to be canceled) and then cleans up all resources allocated by ++ * usb_sg_init(). ++ * ++ * The request may be canceled with usb_sg_cancel(), either before or after ++ * usb_sg_wait() is called. ++ */ ++int usb_sg_init ( ++ struct usb_sg_request *io, ++ struct usb_device *dev, ++ unsigned pipe, ++ unsigned period, ++ struct scatterlist *sg, ++ int nents, ++ size_t length, ++ int mem_flags ++) ++{ ++ int i; ++ int urb_flags; ++ int dma; ++ struct usb_hcd *hcd; ++ ++ hcd = dev->bus->hcpriv; ++ ++ if (!io || !dev || !sg ++ || usb_pipecontrol (pipe) ++ || usb_pipeisoc (pipe) ++ || nents <= 0) ++ return -EINVAL; ++ ++ spin_lock_init (&io->lock); ++ io->dev = dev; ++ io->pipe = pipe; ++ io->sg = sg; ++ io->nents = nents; ++ ++ /* not all host controllers use DMA (like the mainstream pci ones); ++ * they can use PIO (sl811) or be software over another transport. ++ */ ++ dma = (hcd->pdev->dma_mask != 0); ++ if (dma) ++ io->entries = usb_buffer_map_sg (dev, pipe, sg, nents); ++ else ++ io->entries = nents; ++ ++ /* initialize all the urbs we'll use */ ++ if (io->entries <= 0) ++ return io->entries; ++ ++ io->count = 0; ++ io->urbs = kmalloc (io->entries * sizeof *io->urbs, mem_flags); ++ if (!io->urbs) ++ goto nomem; ++ ++ urb_flags = USB_ASYNC_UNLINK | URB_NO_INTERRUPT | URB_NO_TRANSFER_DMA_MAP; ++ if (usb_pipein (pipe)) ++ urb_flags |= URB_SHORT_NOT_OK; ++ ++ for (i = 0; i < io->entries; i++, io->count = i) { ++ unsigned len; ++ ++ io->urbs [i] = usb_alloc_urb (0); ++ if (!io->urbs [i]) { ++ io->entries = i; ++ goto nomem; ++ } ++ ++ io->urbs [i]->dev = 0; ++ io->urbs [i]->pipe = pipe; ++ io->urbs [i]->interval = period; ++ io->urbs [i]->transfer_flags = urb_flags; ++ ++ io->urbs [i]->complete = sg_complete; ++ io->urbs [i]->context = io; ++ io->urbs [i]->status = -EINPROGRESS; ++ io->urbs [i]->actual_length = 0; ++ ++ if (dma) { ++ /* hc may use _only_ transfer_dma */ ++ io->urbs [i]->transfer_dma = sg_dma_address (sg + i); ++ len = sg_dma_len (sg + i); ++ } else { ++ /* hc may use _only_ transfer_buffer */ ++ io->urbs [i]->transfer_buffer = ++ page_address (sg [i].page) + sg [i].offset; ++ len = sg [i].length; ++ } ++ ++ if (length) { ++ len = min_t (unsigned, len, length); ++ length -= len; ++ if (length == 0) ++ io->entries = i + 1; ++ } ++ io->urbs [i]->transfer_buffer_length = len; ++ } ++ io->urbs [--i]->transfer_flags &= ~URB_NO_INTERRUPT; ++ ++ /* transaction state */ ++ io->status = 0; ++ io->bytes = 0; ++ init_completion (&io->complete); ++ return 0; ++ ++nomem: ++ sg_clean (io); ++ return -ENOMEM; ++} ++ ++/** ++ * usb_sg_cancel - stop scatter/gather i/o issued by usb_sg_wait() ++ * @io: request block, initialized with usb_sg_init() ++ * ++ * This stops a request after it has been started by usb_sg_wait(). ++ * It can also prevents one initialized by usb_sg_init() from starting, ++ * so that call just frees resources allocated to the request. ++ */ ++void usb_sg_cancel (struct usb_sg_request *io) ++{ ++ unsigned long flags; ++ ++ spin_lock_irqsave (&io->lock, flags); ++ ++ /* shut everything down, if it didn't already */ ++ if (!io->status) { ++ int i; ++ ++ io->status = -ECONNRESET; ++ for (i = 0; i < io->entries; i++) { ++ int retval; ++ ++ if (!io->urbs [i]->dev) ++ continue; ++ retval = usb_unlink_urb (io->urbs [i]); ++ if (retval != -EINPROGRESS && retval != -EBUSY) ++ US_DEBUGP("WARNING: %s, unlink --> %d\n", __FUNCTION__, retval); ++ } ++ } ++ spin_unlock_irqrestore (&io->lock, flags); ++} ++ ++/** ++ * usb_sg_wait - synchronously execute scatter/gather request ++ * @io: request block handle, as initialized with usb_sg_init(). ++ * some fields become accessible when this call returns. ++ * Context: !in_interrupt () ++ * ++ * This function blocks until the specified I/O operation completes. It ++ * leverages the grouping of the related I/O requests to get good transfer ++ * rates, by queueing the requests. At higher speeds, such queuing can ++ * significantly improve USB throughput. ++ * ++ * There are three kinds of completion for this function. ++ * (1) success, where io->status is zero. The number of io->bytes ++ * transferred is as requested. ++ * (2) error, where io->status is a negative errno value. The number ++ * of io->bytes transferred before the error is usually less ++ * than requested, and can be nonzero. ++ * (3) cancelation, a type of error with status -ECONNRESET that ++ * is initiated by usb_sg_cancel(). ++ * ++ * When this function returns, all memory allocated through usb_sg_init() or ++ * this call will have been freed. The request block parameter may still be ++ * passed to usb_sg_cancel(), or it may be freed. It could also be ++ * reinitialized and then reused. ++ * ++ * Data Transfer Rates: ++ * ++ * Bulk transfers are valid for full or high speed endpoints. ++ * The best full speed data rate is 19 packets of 64 bytes each ++ * per frame, or 1216 bytes per millisecond. ++ * The best high speed data rate is 13 packets of 512 bytes each ++ * per microframe, or 52 KBytes per millisecond. ++ * ++ * The reason to use interrupt transfers through this API would most likely ++ * be to reserve high speed bandwidth, where up to 24 KBytes per millisecond ++ * could be transferred. That capability is less useful for low or full ++ * speed interrupt endpoints, which allow at most one packet per millisecond, ++ * of at most 8 or 64 bytes (respectively). ++ */ ++void usb_sg_wait (struct usb_sg_request *io) ++{ ++ int i, entries = io->entries; ++ ++ /* queue the urbs. */ ++ spin_lock_irq (&io->lock); ++ for (i = 0; i < entries && !io->status; i++) { ++ int retval; ++ ++ io->urbs [i]->dev = io->dev; ++ retval = usb_submit_urb (io->urbs [i]); ++ ++ /* after we submit, let completions or cancelations fire; ++ * we handshake using io->status. ++ */ ++ spin_unlock_irq (&io->lock); ++ switch (retval) { ++ /* maybe we retrying will recover */ ++ case -ENXIO: // hc didn't queue this one ++ case -EAGAIN: ++ case -ENOMEM: ++ io->urbs [i]->dev = 0; ++ retval = 0; ++ i--; ++ yield (); ++ break; ++ ++ /* no error? continue immediately. ++ * ++ * NOTE: to work better with UHCI (4K I/O buffer may ++ * need 3K of TDs) it may be good to limit how many ++ * URBs are queued at once; N milliseconds? ++ */ ++ case 0: ++ cpu_relax (); ++ break; ++ ++ /* fail any uncompleted urbs */ ++ default: ++ spin_lock_irq (&io->lock); ++ io->count -= entries - i; ++ if (io->status == -EINPROGRESS) ++ io->status = retval; ++ if (io->count == 0) ++ complete (&io->complete); ++ spin_unlock_irq (&io->lock); ++ ++ io->urbs [i]->dev = 0; ++ io->urbs [i]->status = retval; ++ ++ US_DEBUGP("%s, submit --> %d\n", __FUNCTION__, retval); ++ usb_sg_cancel (io); ++ } ++ spin_lock_irq (&io->lock); ++ if (retval && io->status == -ECONNRESET) ++ io->status = retval; ++ } ++ spin_unlock_irq (&io->lock); ++ ++ /* OK, yes, this could be packaged as non-blocking. ++ * So could the submit loop above ... but it's easier to ++ * solve neither problem than to solve both! ++ */ ++ wait_for_completion (&io->complete); ++ ++ sg_clean (io); ++} ++ ++/* ++ * Interpret the results of a URB transfer ++ * ++ * This function prints appropriate debugging messages, clears halts on ++ * non-control endpoints, and translates the status to the corresponding ++ * USB_STOR_XFER_xxx return code. ++ */ ++static int interpret_urb_result(struct us_data *us, unsigned int pipe, ++ unsigned int length, int result, unsigned int partial) ++{ ++ US_DEBUGP("Status code %d; transferred %u/%u\n", ++ result, partial, length); ++ switch (result) { ++ ++ /* no error code; did we send all the data? */ ++ case 0: ++ if (partial != length) { ++ US_DEBUGP("-- short transfer\n"); ++ return USB_STOR_XFER_SHORT; ++ } ++ ++ US_DEBUGP("-- transfer complete\n"); ++ return USB_STOR_XFER_GOOD; ++ ++ /* stalled */ ++ case -EPIPE: ++ /* for control endpoints, (used by CB[I]) a stall indicates ++ * a failed command */ ++ if (usb_pipecontrol(pipe)) { ++ US_DEBUGP("-- stall on control pipe\n"); ++ return USB_STOR_XFER_STALLED; ++ } ++ ++ /* for other sorts of endpoint, clear the stall */ ++ US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe); ++ if (usb_stor_clear_halt(us, pipe) < 0) ++ return USB_STOR_XFER_ERROR; ++ return USB_STOR_XFER_STALLED; ++ ++ /* timeout or excessively long NAK */ ++ case -ETIMEDOUT: ++ US_DEBUGP("-- timeout or NAK\n"); ++ return USB_STOR_XFER_ERROR; ++ ++ /* babble - the device tried to send more than we wanted to read */ ++ case -EOVERFLOW: ++ US_DEBUGP("-- babble\n"); ++ return USB_STOR_XFER_LONG; ++ ++ /* the transfer was cancelled by abort, disconnect, or timeout */ ++ case -ECONNRESET: ++ US_DEBUGP("-- transfer cancelled\n"); ++ return USB_STOR_XFER_ERROR; ++ ++ /* short scatter-gather read transfer */ ++ case -EREMOTEIO: ++ US_DEBUGP("-- short read transfer\n"); ++ return USB_STOR_XFER_SHORT; ++ ++ /* abort or disconnect in progress */ ++ case -EIO: ++ US_DEBUGP("-- abort or disconnect in progress\n"); ++ return USB_STOR_XFER_ERROR; ++ ++ /* the catch-all error case */ ++ default: ++ US_DEBUGP("-- unknown error\n"); ++ return USB_STOR_XFER_ERROR; ++ } ++} ++ ++/* ++ * Transfer a scatter-gather list via bulk transfer ++ * ++ * This function does basically the same thing as usb_stor_bulk_msg() ++ * above, but it uses the usbcore scatter-gather library. ++ */ ++int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe, ++ struct scatterlist *sg, int num_sg, unsigned int length, ++ unsigned int *act_len) ++{ ++ int result; ++ ++ /* don't submit s-g requests during abort/disconnect processing */ ++ if (us->flags & ABORTING_OR_DISCONNECTING) ++ return USB_STOR_XFER_ERROR; ++ ++ /* initialize the scatter-gather request block */ ++ US_DEBUGP("%s: xfer %u bytes, %d entries\n", __FUNCTION__, ++ length, num_sg); ++ result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0, ++ sg, num_sg, length, SLAB_NOIO); ++ if (result) { ++ US_DEBUGP("usb_sg_init returned %d\n", result); ++ return USB_STOR_XFER_ERROR; ++ } ++ ++ /* since the block has been initialized successfully, it's now ++ * okay to cancel it */ ++ set_bit(US_FLIDX_SG_ACTIVE, &us->flags); ++ ++ /* did an abort/disconnect occur during the submission? */ ++ if (us->flags & ABORTING_OR_DISCONNECTING) { ++ ++ /* cancel the request, if it hasn't been cancelled already */ ++ if (test_and_clear_bit(US_FLIDX_SG_ACTIVE, &us->flags)) { ++ US_DEBUGP("-- cancelling sg request\n"); ++ usb_sg_cancel(&us->current_sg); ++ } ++ } ++ ++ /* wait for the completion of the transfer */ ++ usb_sg_wait(&us->current_sg); ++ clear_bit(US_FLIDX_SG_ACTIVE, &us->flags); ++ ++ result = us->current_sg.status; ++ if (act_len) ++ *act_len = us->current_sg.bytes; ++ return interpret_urb_result(us, pipe, length, result, ++ us->current_sg.bytes); ++} ++ + /* + * Transfer an entire SCSI command's worth of data payload over the bulk + * pipe. +@@ -569,6 +1122,8 @@ + struct scatterlist *sg; + unsigned int total_transferred = 0; + unsigned int transfer_amount; ++ unsigned int partial; ++ unsigned int pipe; + + /* calculate how much we want to transfer */ + transfer_amount = usb_stor_transfer_length(srb); +@@ -585,23 +1140,34 @@ + * make the appropriate requests for each, until done + */ + sg = (struct scatterlist *) srb->request_buffer; +- for (i = 0; i < srb->use_sg; i++) { +- +- /* transfer the lesser of the next buffer or the +- * remaining data */ +- if (transfer_amount - total_transferred >= +- sg[i].length) { +- result = usb_stor_transfer_partial(us, +- sg[i].address, sg[i].length); +- total_transferred += sg[i].length; +- } else +- result = usb_stor_transfer_partial(us, +- sg[i].address, +- transfer_amount - total_transferred); +- +- /* if we get an error, end the loop here */ +- if (result) +- break; ++ if (us->pusb_dev->speed == USB_SPEED_HIGH) { ++ /* calculate the appropriate pipe information */ ++ if (us->srb->sc_data_direction == SCSI_DATA_READ) ++ pipe = usb_rcvbulkpipe(us->pusb_dev, us->ep_in); ++ else ++ pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out); ++ /* use the usb core scatter-gather primitives */ ++ result = usb_stor_bulk_transfer_sglist(us, pipe, ++ sg, srb->use_sg, transfer_amount, &partial); ++ } else { ++ for (i = 0; i < srb->use_sg; i++) { ++ ++ /* transfer the lesser of the next buffer or the ++ * remaining data */ ++ if (transfer_amount - total_transferred >= ++ sg[i].length) { ++ result = usb_stor_transfer_partial(us, ++ sg[i].address, sg[i].length); ++ total_transferred += sg[i].length; ++ } else ++ result = usb_stor_transfer_partial(us, ++ sg[i].address, ++ transfer_amount - total_transferred); ++ ++ /* if we get an error, end the loop here */ ++ if (result) ++ break; ++ } + } + } + else +diff -ur linux.old/drivers/usb/storage/transport.h linux.dev/drivers/usb/storage/transport.h +--- linux.old/drivers/usb/storage/transport.h 2003-08-25 13:44:42.000000000 +0200 ++++ linux.dev/drivers/usb/storage/transport.h 2006-07-30 12:10:16.000000000 +0200 +@@ -127,6 +127,16 @@ + #define US_BULK_TRANSFER_ABORTED 3 /* transfer canceled */ + + /* ++ * usb_stor_bulk_transfer_xxx() return codes, in order of severity ++ */ ++ ++#define USB_STOR_XFER_GOOD 0 /* good transfer */ ++#define USB_STOR_XFER_SHORT 1 /* transferred less than expected */ ++#define USB_STOR_XFER_STALLED 2 /* endpoint stalled */ ++#define USB_STOR_XFER_LONG 3 /* device tried to send too much */ ++#define USB_STOR_XFER_ERROR 4 /* transfer died in the middle */ ++ ++/* + * Transport return codes + */ + +diff -ur linux.old/drivers/usb/storage/usb.h linux.dev/drivers/usb/storage/usb.h +--- linux.old/drivers/usb/storage/usb.h 2005-04-04 03:42:20.000000000 +0200 ++++ linux.dev/drivers/usb/storage/usb.h 2006-07-30 12:11:06.000000000 +0200 +@@ -111,6 +111,60 @@ + typedef void (*proto_cmnd)(Scsi_Cmnd*, struct us_data*); + typedef void (*extra_data_destructor)(void *); /* extra data destructor */ + ++/* Dynamic flag definitions: used in set_bit() etc. */ ++#define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */ ++#define US_FLIDX_SG_ACTIVE 19 /* 0x00080000 current_sg is in use */ ++#define US_FLIDX_ABORTING 20 /* 0x00100000 abort is in progress */ ++#define US_FLIDX_DISCONNECTING 21 /* 0x00200000 disconnect in progress */ ++#define ABORTING_OR_DISCONNECTING ((1UL << US_FLIDX_ABORTING) | \ ++ (1UL << US_FLIDX_DISCONNECTING)) ++#define US_FLIDX_RESETTING 22 /* 0x00400000 device reset in progress */ ++ ++/* processing state machine states */ ++#define US_STATE_IDLE 1 ++#define US_STATE_RUNNING 2 ++#define US_STATE_RESETTING 3 ++#define US_STATE_ABORTING 4 ++ ++/** ++ * struct usb_sg_request - support for scatter/gather I/O ++ * @status: zero indicates success, else negative errno ++ * @bytes: counts bytes transferred. ++ * ++ * These requests are initialized using usb_sg_init(), and then are used ++ * as request handles passed to usb_sg_wait() or usb_sg_cancel(). Most ++ * members of the request object aren't for driver access. ++ * ++ * The status and bytecount values are valid only after usb_sg_wait() ++ * returns. If the status is zero, then the bytecount matches the total ++ * from the request. ++ * ++ * After an error completion, drivers may need to clear a halt condition ++ * on the endpoint. ++ */ ++struct usb_sg_request { ++ int status; ++ size_t bytes; ++ ++ /* ++ * members below are private to usbcore, ++ * and are not provided for driver access! ++ */ ++ spinlock_t lock; ++ ++ struct usb_device *dev; ++ int pipe; ++ struct scatterlist *sg; ++ int nents; ++ ++ int entries; ++ struct urb **urbs; ++ ++ int count; ++ struct completion complete; ++}; ++ ++ + /* we allocate one of these for every device that we remember */ + struct us_data { + struct us_data *next; /* next device */ +@@ -171,6 +225,7 @@ + struct urb *current_urb; /* non-int USB requests */ + struct completion current_done; /* the done flag */ + unsigned int tag; /* tag for bulk CBW/CSW */ ++ struct usb_sg_request current_sg; /* scatter-gather req. */ + + /* the semaphore for sleeping the control thread */ + struct semaphore sema; /* to sleep thread on */ +diff -ur linux.old/include/linux/usb.h linux.dev/include/linux/usb.h +--- linux.old/include/linux/usb.h 2004-11-17 12:54:22.000000000 +0100 ++++ linux.dev/include/linux/usb.h 2006-07-30 12:19:19.000000000 +0200 +@@ -483,6 +483,8 @@ + #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt needed */ + /* ... less overhead for QUEUE_BULK */ + #define USB_TIMEOUT_KILLED 0x1000 // only set by HCD! ++#define URB_NO_TRANSFER_DMA_MAP 0x0400 /* urb->transfer_dma valid on submit */ ++#define URB_NO_SETUP_DMA_MAP 0x0800 /* urb->setup_dma valid on submit */ + + struct iso_packet_descriptor + { From 155c4da52bcae1b1a00bf3655da3b0aaf40ef941 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 13:21:18 +0000 Subject: [PATCH 400/757] fix more instances of '' abuse SVN-Revision: 4326 --- .../base-files/default/etc/hotplug.d/net/10-net | 4 ++-- .../base-files/default/lib/network/config.sh | 16 ++++++++-------- openwrt/package/base-files/default/sbin/ifdown | 14 +++++++------- openwrt/package/base-files/default/sbin/wifi | 12 ++++++------ .../broadcom-wl/files/lib/wifi/broadcom.sh | 4 ++-- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net index d5b7f6b0fad..72146a1d783 100644 --- a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net +++ b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net @@ -8,8 +8,8 @@ addif() { # find all vlan configurations for this interface and set them up as well for ifc in $interfaces; do - config_get type "$ifc" type - case "$type" in + config_get iftype "$ifc" type + case "$iftype" in bridge) config_get ifs "$ifc" ifnames;; *) config_get ifs "$ifc" ifname;; esac diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh index 59ec84aba82..76db09de15d 100755 --- a/openwrt/package/base-files/default/lib/network/config.sh +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -4,11 +4,11 @@ # DEBUG="echo" find_config() { - local type iface ifn + local iftype iface ifn for ifn in $interfaces; do - config_get type "$ifn" type + config_get iftype "$ifn" type config_get iface "$ifn" ifname - case "$type" in + case "$iftype" in bridge) config_get iface "$ifn" ifnames ;; @@ -25,15 +25,15 @@ find_config() { } scan_interfaces() { - local mode type iface + local mode iftype iface interfaces= config_cb() { - config_get type "$CONFIG_SECTION" TYPE - case "$type" in + config_get iftype "$CONFIG_SECTION" TYPE + case "$iftype" in interface) - config_get type "$CONFIG_SECTION" type + config_get iftype "$CONFIG_SECTION" type config_get mode "$CONFIG_SECTION" proto - case "$type" in + case "$iftype" in bridge) config_get iface "$CONFIG_SECTION" ifname iface="${iface:-br-$CONFIG_SECTION}" diff --git a/openwrt/package/base-files/default/sbin/ifdown b/openwrt/package/base-files/default/sbin/ifdown index 7debb9559fd..1334ee82183 100755 --- a/openwrt/package/base-files/default/sbin/ifdown +++ b/openwrt/package/base-files/default/sbin/ifdown @@ -6,14 +6,14 @@ include network scan_interfaces -debug "### ifdown $type ###" -type=$1 +cfg=$1 +debug "### ifdown $cfg ###" -config_get proto "$type" proto +config_get proto "$cfg" proto [ -z "$proto" ] && { echo "interface not found."; exit; } # kill active ppp daemon -pid="$(cat /var/run/ppp-${type}.pid 2>/dev/null)" +pid="$(cat /var/run/ppp-${cfg}.pid 2>/dev/null)" [ -n "$pid" -a -d "/proc/$pid" ] && { kill $pid sleep 1 @@ -21,14 +21,14 @@ pid="$(cat /var/run/ppp-${type}.pid 2>/dev/null)" } # kill any other process associated with the interface -config_get ifname "$type" ifname +config_get ifname "$cfg" ifname pid="$(cat /var/run/${ifname}.pid 2>/dev/null)" [ -n "$pid" -a -d "/proc/$pid" ] && kill -9 $pid -config_get ifname "$type" ifname +config_get ifname "$cfg" ifname ifconfig "$ifname" >/dev/null 2>/dev/null && { ifconfig "$ifname" 0.0.0.0 down - config_get iftype "$type" type + config_get iftype "$cfg" type [ "$iftype" = "bridge" ] && brctl delbr "$ifname" } diff --git a/openwrt/package/base-files/default/sbin/wifi b/openwrt/package/base-files/default/sbin/wifi index f1ac94fa3a0..b228eed8a05 100755 --- a/openwrt/package/base-files/default/sbin/wifi +++ b/openwrt/package/base-files/default/sbin/wifi @@ -33,12 +33,12 @@ config_load wireless include wifi for device in $DEVICES; do ( - config_get type "$device" type - eval "type setup_$type" 2>/dev/null >/dev/null && { - eval "scan_$type '$device'" - eval "setup_$type '$device'" && { + config_get iftype "$device" type + eval "type setup_$iftype" 2>/dev/null >/dev/null && { + eval "scan_$iftype '$device'" + eval "setup_$iftype '$device'" && { # TODO: set up network settings /bin/true - } || echo "$device($type): Setup failed" || true - } || echo "$device($type): Interface type not supported" + } || echo "$device($iftype): Setup failed" || true + } || echo "$device($iftype): Interface type not supported" ); done diff --git a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh index 53d1cf79253..7852ae96253 100644 --- a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -5,8 +5,8 @@ bridge_interface() { scan_interfaces cfg="$(find_config "$1")" [ -z "$cfg" ] && return 0 - config_get type "$cfg" type - [ "$type" = bridge ] && config_get "$type" bridge + config_get iftype "$cfg" type + [ "$iftype" = bridge ] && config_get "$iftype" bridge ) } From 9f07737cdd67f43f636d7d30db7e24b4bee7da37 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 14:42:05 +0000 Subject: [PATCH 401/757] fix ipsec-tools (missing include, missing dependencies) SVN-Revision: 4327 --- openwrt/package/ipsec-tools/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index 5d2b3914110..c1fe597a8cd 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -21,11 +21,12 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk define Package/ipsec-tools SECTION:=base CATEGORY:=Network -DEPENDS:=@LINUX_2_6 +DEPENDS:=@LINUX_2_6 +libopenssl TITLE:=IPsec management tools DESCRIPTION:=IPsec management tools URL:=http://ipsec-tools.sourceforge.net/ From d4af14883e549d316fd7b32aa70746e12463e445 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 14:51:23 +0000 Subject: [PATCH 402/757] fuse: put PKG_BUILD_DIR in KERNEL_BUILD_DIR SVN-Revision: 4328 --- openwrt/package/fuse/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile index c9eef883446..f690f56fa7a 100644 --- a/openwrt/package/fuse/Makefile +++ b/openwrt/package/fuse/Makefile @@ -14,7 +14,7 @@ PKG_VERSION:=2.5.3 PKG_RELEASE:=1 PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat From 526445bae27df2a51257769bbc0acddb235c120a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 15:27:51 +0000 Subject: [PATCH 403/757] port ppp modules to package/kernel and fix ppp package dependencies SVN-Revision: 4329 --- openwrt/include/modules-2.4.mk | 19 ------------- openwrt/include/modules-2.6.mk | 20 -------------- openwrt/package/kernel/modules.mk | 44 +++++++++++++++++++++++++++++++ openwrt/package/ppp/Makefile | 5 ++-- openwrt/target/linux/Config.in | 34 ------------------------ 5 files changed, 47 insertions(+), 75 deletions(-) diff --git a/openwrt/include/modules-2.4.mk b/openwrt/include/modules-2.4.mk index 4f2d0b5dd0b..8e7d2308ad6 100644 --- a/openwrt/include/modules-2.4.mk +++ b/openwrt/include/modules-2.4.mk @@ -25,25 +25,6 @@ $(eval $(call KMOD_template,IPV6,ipv6,\ $(MODULES_DIR)/kernel/net/ipv6/ipv6.o \ ,CONFIG_IPV6,,20,ipv6)) -$(eval $(call KMOD_template,PPP,ppp,\ - $(MODULES_DIR)/kernel/drivers/net/ppp_async.o \ - $(MODULES_DIR)/kernel/drivers/net/ppp_generic.o \ - $(MODULES_DIR)/kernel/drivers/net/slhc.o \ - $(MODULES_DIR)/kernel/drivers/net/pppox.o \ -,CONFIG_PPP)) - -$(eval $(call KMOD_template,MPPE,mppe,\ - $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.o \ -,CONFIG_PPP_MPPE_MPPC)) - -$(eval $(call KMOD_template,PPPOATM,pppoatm,\ - $(MODULES_DIR)/kernel/net/atm/pppoatm.o \ -,CONFIG_PPPOATM)) - -$(eval $(call KMOD_template,PPPOE,pppoe,\ - $(MODULES_DIR)/kernel/drivers/net/pppoe.o \ -,CONFIG_PPPOE)) - $(eval $(call KMOD_template,SCHED,sched,\ $(MODULES_DIR)/kernel/net/sched/*.o \ )) diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index dab735576a8..533a4c956be 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -27,26 +27,6 @@ $(eval $(call KMOD_template,IPV6,ipv6,\ $(MODULES_DIR)/kernel/net/ipv6/ipv6.ko \ ,CONFIG_IPV6,,20,ipv6)) -$(eval $(call KMOD_template,PPP,ppp,\ - $(MODULES_DIR)/kernel/drivers/net/ppp_async.ko \ - $(MODULES_DIR)/kernel/drivers/net/ppp_generic.ko \ - $(MODULES_DIR)/kernel/drivers/net/slhc.ko \ - $(MODULES_DIR)/kernel/lib/crc-ccitt.ko \ -,CONFIG_PPP)) - -#$(eval $(call KMOD_template,MPPE,mppe,\ -# $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.ko \ -#,CONFIG_PPP_MPPE_MPPC)) - -$(eval $(call KMOD_template,PPPOATM,pppoatm,\ - $(MODULES_DIR)/kernel/net/atm/pppoatm.ko \ -,CONFIG_PPPOATM)) - -$(eval $(call KMOD_template,PPPOE,pppoe,\ - $(MODULES_DIR)/kernel/drivers/net/pppoe.ko \ - $(MODULES_DIR)/kernel/drivers/net/pppox.ko \ -,CONFIG_PPPOE)) - $(eval $(call KMOD_template,SCHED,sched,\ $(MODULES_DIR)/kernel/net/sched/*.ko \ ,CONFIG_NET_SCHED)) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index 48741eeb367..51af5d8b614 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -223,3 +223,47 @@ endef $(eval $(call KernelPackage,ebtables)) +define KernelPackage/ppp +TITLE:=PPP modules +DESCRIPTION:=Kernel modules for PPP support +KCONFIG:=$(CONFIG_PPP) +endef + +define KernelPackage/ppp/2.6 +FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_async.ko $(MODULES_DIR)/kernel/drivers/net/ppp_generic.ko $(MODULES_DIR)/kernel/drivers/net/slhc.ko $(MODULES_DIR)/kernel/lib/crc-ccitt.ko +AUTOLOAD:=$(call AutoLoad,30,crc-ccitt) +endef + +define KernelPackage/ppp/2.4 +FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_async.o $(MODULES_DIR)/kernel/drivers/net/ppp_generic.o $(MODULES_DIR)/kernel/drivers/net/slhc.o +endef +$(eval $(call KernelPackage,ppp)) + +define KernelPackage/pppoe +TITLE:=PPPoE modules +DESCRIPTION:=Kernel modules for PPP over Ethernet support +DEPENDS:=kmod-ppp +KCONFIG:=$(CONFIG_PPPOE) +FILES:=$(MODULES_DIR)/kernel/drivers/net/pppoe.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/drivers/net/pppox.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,pppoe)) + +define KernelPackage/pppoa +TITLE:=PPPoA modules +DESCRIPTION:=Kernel modules for PPP over ATM support +DEPENDS:=kmod-ppp +KCONFIG:=$(CONFIG_PPPOATM) +FILES:=$(MODULES_DIR)/kernel/drivers/net/pppoatm.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,pppoa)) + +define KernelPackage/mppe +TITLE:=Microsoft PPP compression/encryption +DESCRIPTION:=Kernel modules for Microsoft PPP compression/encryption +DEPENDS:=@LINUX_2_4 kmod-ppp +KCONFIG:=$(CONFIG_PPPOE) +FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,mppe)) + + diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index e49b610c36b..6581ef7e2bd 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -28,6 +28,7 @@ SECTION:=net CATEGORY:=Network MENU:=1 DEFAULT:=y +DEPENDS:=+kmod-ppp TITLE:=PPP daemon DESCRIPTION:=PPP (Point-to-Point Protocol) daemon URL:=http://ppp.samba.org/ @@ -36,7 +37,7 @@ endef define Package/ppp-mod-pppoa SECTION:=net CATEGORY:=Network -DEPENDS:=ppp +linux-atm +DEPENDS:=ppp +linux-atm +kmod-pppoa TITLE:=PPPoA plugin DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp endef @@ -45,7 +46,7 @@ define Package/ppp-mod-pppoe SECTION:=net CATEGORY:=Network DEFAULT:=y -DEPENDS:=ppp +DEPENDS:=ppp +kmod-pppoe TITLE:=PPPoE plugin DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp endef diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 2fcb95f295a..9929b9e524b 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -37,40 +37,6 @@ config PACKAGE_KMOD_IPV6 help Kernel modules for IPv6 protocol support -config PACKAGE_KMOD_PPP - prompt "kmod-ppp.......................... PPP support" - tristate - default m - help - Kernel support for PPP - -config PACKAGE_KMOD_MPPE - prompt "kmod-mppe....................... PPP MPPE/MPPC module" - tristate - default m - depends PACKAGE_KMOD_PPP - select PACKAGE_kmod-crypto - help - Support for Microsoft PPP Encryption/Compression - -config PACKAGE_KMOD_PPPOATM - prompt "kmod-pppoatm.................... PPPoA (PPP over ATM) kernel support" - tristate - default y if LINUX_2_4_AR7 - default m - depends PACKAGE_KMOD_PPP - select PACKAGE_KMOD_ATM - help - Support for PPP over ATM - -config PACKAGE_KMOD_PPPOE - prompt "kmod-pppoe...................... PPPoE (PPP over Ethernet) kernel support" - tristate - default m - depends PACKAGE_KMOD_PPP - help - Support for PPP over Ethernet - config PACKAGE_KMOD_RING prompt "kmod-ring......................... PF Ring" tristate From 4560e33684add51e5a516c06e04997f558f38273 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 16:22:59 +0000 Subject: [PATCH 404/757] BUILD_DIR -> KERNEL_BUILD_DIR SVN-Revision: 4332 --- openwrt/package/diag/Makefile | 2 +- openwrt/package/shfs/Makefile | 2 +- openwrt/package/spca5xx/Makefile | 2 +- openwrt/package/zd1211/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openwrt/package/diag/Makefile b/openwrt/package/diag/Makefile index 8edc4093d47..024426f8b1e 100644 --- a/openwrt/package/diag/Makefile +++ b/openwrt/package/diag/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-diag PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk diff --git a/openwrt/package/shfs/Makefile b/openwrt/package/shfs/Makefile index 3f958ad7319..63a1108e6fa 100644 --- a/openwrt/package/shfs/Makefile +++ b/openwrt/package/shfs/Makefile @@ -14,7 +14,7 @@ PKG_VERSION:=0.35 PKG_RELEASE:=2 PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@SF/shfs PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat diff --git a/openwrt/package/spca5xx/Makefile b/openwrt/package/spca5xx/Makefile index b4025d7629f..22c45cec497 100644 --- a/openwrt/package/spca5xx/Makefile +++ b/openwrt/package/spca5xx/Makefile @@ -14,7 +14,7 @@ PKG_VERSION:=20060301 PKG_RELEASE:=1 PKG_MD5SUM:=4160e03c408ac254111febacf058b88a -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat diff --git a/openwrt/package/zd1211/Makefile b/openwrt/package/zd1211/Makefile index c25d8067f90..6c70924fffe 100644 --- a/openwrt/package/zd1211/Makefile +++ b/openwrt/package/zd1211/Makefile @@ -14,7 +14,7 @@ PKG_VERSION:=r69 PKG_RELEASE:=1 PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz PKG_CAT:=zcat From 040937c2ab7fc44a4801fe13729981132f639e7c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 16:55:15 +0000 Subject: [PATCH 405/757] fix typo SVN-Revision: 4334 --- openwrt/package/kernel/modules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index 51af5d8b614..581062e5fb6 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -253,7 +253,7 @@ TITLE:=PPPoA modules DESCRIPTION:=Kernel modules for PPP over ATM support DEPENDS:=kmod-ppp KCONFIG:=$(CONFIG_PPPOATM) -FILES:=$(MODULES_DIR)/kernel/drivers/net/pppoatm.$(LINUX_KMOD_SUFFIX) +FILES:=$(MODULES_DIR)/kernel/drivers/net/atm/pppoatm.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,pppoa)) From eb09c3827062e35c481401bceae3e21bd6f42ac2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 16:56:46 +0000 Subject: [PATCH 406/757] oops... another one SVN-Revision: 4335 --- openwrt/package/kernel/modules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index 581062e5fb6..a0a402e18bf 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -253,7 +253,7 @@ TITLE:=PPPoA modules DESCRIPTION:=Kernel modules for PPP over ATM support DEPENDS:=kmod-ppp KCONFIG:=$(CONFIG_PPPOATM) -FILES:=$(MODULES_DIR)/kernel/drivers/net/atm/pppoatm.$(LINUX_KMOD_SUFFIX) +FILES:=$(MODULES_DIR)/kernel/net/atm/pppoatm.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,pppoa)) From af8a98116ebd7b51e1b6c89f49475f555eaa66ef Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 17:06:02 +0000 Subject: [PATCH 407/757] fix kernel postinst scripts SVN-Revision: 4336 --- openwrt/package/kernel/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index b1155f42866..e5094ef0114 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -45,8 +45,8 @@ define ModuleAutoLoad $(3) \ if [ -n "$$$$$$$$modules" ]; then \ mkdir -p $(2)/etc/modules.d; \ - echo "#!/bin/sh" >> $(2)/CONTROL/postinst; \ - echo "[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit" >> $(2)/CONTROL/postinst; \ + echo "#!/bin/sh" > $(2)/CONTROL/postinst; \ + echo "[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit 0" >> $(2)/CONTROL/postinst; \ echo ". /etc/functions.sh" >> $(2)/CONTROL/postinst; \ echo "load_modules $$$$$$$$modules" >> $(2)/CONTROL/postinst; \ chmod 0755 $(2)/CONTROL/postinst; \ From b4e7510acf710c26775bd9b03880c9075ffe77a4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 30 Jul 2006 17:09:22 +0000 Subject: [PATCH 408/757] create a package index SVN-Revision: 4337 --- openwrt/Makefile | 1 + openwrt/package/Makefile | 3 +++ 2 files changed, 4 insertions(+) diff --git a/openwrt/Makefile b/openwrt/Makefile index a23f478d7ce..85091f618e8 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -116,6 +116,7 @@ world: .config FORCE $(MAKE) package/compile $(MAKE) package/install $(MAKE) target/install + $(MAKE) package/index clean: FORCE rm -rf build_* bin diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 629ce881099..85f852fd54d 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -55,3 +55,6 @@ install: rm -rf $(BUILD_DIR)/root $(MAKE) install-targets +index: FORCE + (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages) + From 241ab4e10cde1ae6b5b775186ee94fa19042159c Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sun, 30 Jul 2006 17:53:04 +0000 Subject: [PATCH 409/757] Port arptables to -ng SVN-Revision: 4340 --- openwrt/package/arptables/Config.in | 9 ++++ openwrt/package/arptables/Makefile | 46 +++++++++++++++++++ .../package/arptables/ipkg/arptables.control | 4 ++ 3 files changed, 59 insertions(+) create mode 100644 openwrt/package/arptables/Config.in create mode 100644 openwrt/package/arptables/Makefile create mode 100644 openwrt/package/arptables/ipkg/arptables.control diff --git a/openwrt/package/arptables/Config.in b/openwrt/package/arptables/Config.in new file mode 100644 index 00000000000..6583d32fa06 --- /dev/null +++ b/openwrt/package/arptables/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_ARPTABLES + prompt "arptables......................... ARP firewall administration utility" + tristate + default m if CONFIG_DEVEL + help + ARP Firewalling (arptables) + + http://ebtables.sourceforge.net/ + diff --git a/openwrt/package/arptables/Makefile b/openwrt/package/arptables/Makefile new file mode 100644 index 00000000000..b4bfe18a737 --- /dev/null +++ b/openwrt/package/arptables/Makefile @@ -0,0 +1,46 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=arptables +PKG_VERSION:=0.0.3 +PKG_RELEASE:=1 +PKG_MD5SUM:=1672244603c8979577aa4738be35a759 + +PKG_SOURCE_URL:=@SF/ebtables +PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/arptables + SECTION:=net + CATEGORY:=Network + TITLE:=ARP firewalling software + DESCRIPTION:=ARP firewalling software + URL:=http://ebtables.sourceforge.net +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ + COPT_FLAGS="$(TARGET_CFLAGS)" \ + KERNEL_DIR="./include/linux" +endef + +define Package/arptables/install + install -m0755 -d $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,arptables)) diff --git a/openwrt/package/arptables/ipkg/arptables.control b/openwrt/package/arptables/ipkg/arptables.control new file mode 100644 index 00000000000..3fec57baba1 --- /dev/null +++ b/openwrt/package/arptables/ipkg/arptables.control @@ -0,0 +1,4 @@ +Package: arptables +Priority: optional +Section: net +Description: ARP firewalling software From fcaf5b546901cf0c25ed6c359de546777fff3af4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 31 Jul 2006 16:39:58 +0000 Subject: [PATCH 410/757] don't try to package ipt_SNAT and ipt_DNAT when making kernel module packages SVN-Revision: 4354 --- openwrt/include/netfilter.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openwrt/include/netfilter.mk b/openwrt/include/netfilter.mk index d4ec0f3915d..ba1512e14ab 100644 --- a/openwrt/include/netfilter.mk +++ b/openwrt/include/netfilter.mk @@ -77,7 +77,9 @@ IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH) += $(P_V4)ipt_ah IPT_IPSEC-$(CONFIG_NETFILTER_XT_MATCH_ESP) += $(P_XT)xt_esp IPT_NAT-m := -IPT_NAT-$(CONFIG_IP_NF_NAT) += $(P_V4)ipt_SNAT $(P_V4)ipt_DNAT +ifneq ($(NF_KMOD),1) + IPT_NAT-$(CONFIG_IP_NF_NAT) += $(P_V4)ipt_SNAT $(P_V4)ipt_DNAT +endif IPT_NAT-$(CONFIG_IP_NF_TARGET_MASQUERADE) += $(P_V4)ipt_MASQUERADE IPT_NAT-$(CONFIG_IP_NF_TARGET_MIRROR) += $(P_V4)ipt_MIRROR IPT_NAT-$(CONFIG_IP_NF_TARGET_REDIRECT) += $(P_V4)ipt_REDIRECT From 0518116cb65a4e9f3ac966b0f1690bc5c9c9e434 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Mon, 31 Jul 2006 17:00:23 +0000 Subject: [PATCH 411/757] Update netfilter config to match other platforms SVN-Revision: 4355 --- openwrt/target/linux/brcm63xx-2.6/config | 168 +++++++++++++---------- 1 file changed, 96 insertions(+), 72 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index 246941d87fb..d38c03003fa 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Fri Jul 14 18:43:28 2006 +# Mon Jul 31 18:51:11 2006 # CONFIG_MIPS=y @@ -197,14 +197,15 @@ CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y -# CONFIG_ELF_CORE is not set +CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -# CONFIG_FUTEX is not set -# CONFIG_EPOLL is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set @@ -298,9 +299,11 @@ CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_PNP is not set CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_NET_IPGRE_BROADCAST=y CONFIG_IPSEC_NAT_TRAVERSAL=y -# CONFIG_IP_MROUTE is not set +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y CONFIG_ARPD=y CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m @@ -348,15 +351,13 @@ CONFIG_BRIDGE_NETFILTER=y CONFIG_NETFILTER_NETLINK=m CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XTABLES=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -366,34 +367,33 @@ CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATE=y CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=y # # IP: Netfilter Configuration # -CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CONNTRACK=y CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m +# CONFIG_IP_NF_CONNTRACK_MARK is not set +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_IRC=y +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_TFTP=y CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m @@ -404,72 +404,69 @@ CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set CONFIG_IP_NF_MATCH_LAYER7=m -CONFIG_IP_NF_MATCH_LAYER7_DEBUG=y -CONFIG_IP_NF_FILTER=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=m -# CONFIG_IP_NF_TARGET_IMQ is not set -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_IMQ=m +# CONFIG_IP_NF_TARGET_LOG is not set CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_REDIRECT=y +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_IRC=y +CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_TFTP=y CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m +# CONFIG_IP_NF_ARPTABLES is not set CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 -# CONFIG_IP_NF_SET_IPMAP is not set -# CONFIG_IP_NF_SET_MACIPMAP is not set -# CONFIG_IP_NF_SET_PORTMAP is not set -# CONFIG_IP_NF_SET_IPHASH is not set -# CONFIG_IP_NF_SET_NETHASH is not set -# CONFIG_IP_NF_SET_IPTREE is not set -# CONFIG_IP_NF_MATCH_SET is not set -# CONFIG_IP_NF_TARGET_SET is not set +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_TARGET_SET=m # # IPv6: Netfilter Configuration (EXPERIMENTAL) # CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_HL is not set CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m CONFIG_IP6_NF_FILTER=m -# CONFIG_IP6_NF_TARGET_IMQ is not set -CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_IMQ=m +# CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m +# CONFIG_IP6_NF_TARGET_HL is not set +# CONFIG_IP6_NF_RAW is not set # # Bridge: Netfilter Configuration @@ -509,6 +506,11 @@ CONFIG_IP_DCCP_CCID2=m CONFIG_IP_DCCP_CCID3=m CONFIG_IP_DCCP_TFRC_LIB=m +# +# DCCP Kernel Hacking +# +# CONFIG_IP_DCCP_DEBUG is not set + # # SCTP Configuration (EXPERIMENTAL) # @@ -645,6 +647,7 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m +# CONFIG_DEBUG_DRIVER is not set # # Connector - unified userspace <-> kernelspace linker @@ -681,10 +684,11 @@ CONFIG_MTD_BLOCK=y CONFIG_MTD_CFI=y CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -# CONFIG_MTD_CFI_NOSWAP is not set +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_GEOMETRY is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y @@ -695,21 +699,26 @@ CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set # CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_OTP is not set +# CONFIG_MTD_CFI_INTELEXT is not set CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y +# CONFIG_MTD_CFI_STAA is not set CONFIG_MTD_CFI_UTIL=y -CONFIG_MTD_RAM=y -CONFIG_MTD_ROM=y -CONFIG_MTD_ABSENT=y -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +CONFIG_MTD_OBSOLETE_CHIPS=y +# CONFIG_MTD_SHARP is not set # # Mapping drivers for chip access # CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_PHYSMAP is not set -CONFIG_MTD_BCM963XX=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0xBFC00000 +CONFIG_MTD_PHYSMAP_LEN=0x400000 +CONFIG_MTD_PHYSMAP_BANKWIDTH=2 +# CONFIG_MTD_BCM963XX is not set # CONFIG_MTD_CSTM_MIPS_IXX is not set # CONFIG_MTD_PLATRAM is not set @@ -1231,11 +1240,26 @@ CONFIG_NLS_UTF8=m # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_KERNEL is not set +CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y +# CONFIG_DEBUG_VM is not set +CONFIG_FORCED_INLINING=y +# CONFIG_RCU_TORTURE_TEST is not set CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_KGDB is not set +CONFIG_RUNTIME_DEBUG=y +CONFIG_MIPS_UNCACHED=y # # Security options From 61906df20af51dc13ce981ff9b5f7bb1513e05fb Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 31 Jul 2006 17:15:03 +0000 Subject: [PATCH 412/757] au1000 has pci support, but no pcmcia SVN-Revision: 4356 --- openwrt/target/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index ddca93ea3bc..1b3ae523d03 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -96,7 +96,7 @@ config LINUX_2_6_AU1000 bool "AMD Alchemy AUxx [2.6]" select mipsel select LINUX_2_6 - select PCMCIA_SUPPORT + select PCI_SUPPORT help Build firmware for AMD Alchemy 1500 boards (e.g. 4G-Systems Mesh/Access Cube ...) From aba84cd6a5da1af8139286dc0f974aecb754364c Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Mon, 31 Jul 2006 17:24:03 +0000 Subject: [PATCH 413/757] Update au1000 netfilter config to match other devices config SVN-Revision: 4357 --- openwrt/target/linux/au1000-2.6/config | 101 ++++++++++++------------- 1 file changed, 48 insertions(+), 53 deletions(-) diff --git a/openwrt/target/linux/au1000-2.6/config b/openwrt/target/linux/au1000-2.6/config index fbb0d7e96dc..b86c699a114 100644 --- a/openwrt/target/linux/au1000-2.6/config +++ b/openwrt/target/linux/au1000-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Mon Jun 26 09:27:40 2006 +# Mon Jul 31 19:15:16 2006 # CONFIG_MIPS=y @@ -345,20 +345,18 @@ CONFIG_BRIDGE_NETFILTER=y # # Core Netfilter Configuration # -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m @@ -366,34 +364,33 @@ CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_STATE=y CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=y # # IP: Netfilter Configuration # -CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CONNTRACK=y CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_IRC=y +# CONFIG_IP_NF_NETBIOS_NS is not set CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m @@ -404,40 +401,38 @@ CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set CONFIG_IP_NF_MATCH_LAYER7=m -CONFIG_IP_NF_MATCH_LAYER7_DEBUG=y -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_IMQ=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +# CONFIG_IP_NF_TARGET_IMQ is not set CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_REDIRECT=y +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_IRC=y +CONFIG_IP_NF_NAT_FTP=y CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m +# CONFIG_IP_NF_ARPTABLES is not set CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 @@ -455,21 +450,21 @@ CONFIG_IP_NF_TARGET_SET=m # CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_HL is not set CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m -CONFIG_IP6_NF_TARGET_LOG=m +# CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m +# CONFIG_IP6_NF_TARGET_HL is not set +# CONFIG_IP6_NF_RAW is not set # # Bridge: Netfilter Configuration From 7090634edcba3ff8b93098f72805e1f1c7467eff Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 1 Aug 2006 23:19:54 +0000 Subject: [PATCH 414/757] fix typo SVN-Revision: 4386 --- openwrt/package/base-files/default/etc/init.d/S40network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/base-files/default/etc/init.d/S40network b/openwrt/package/base-files/default/etc/init.d/S40network index 20a11845b68..ec290335db7 100755 --- a/openwrt/package/base-files/default/etc/init.d/S40network +++ b/openwrt/package/base-files/default/etc/init.d/S40network @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2006 OpenWrt.orga +# Copyright (C) 2006 OpenWrt.org setup_switch() { return 0; } From 1d7ff67831073bd2a874e2de5037af916016a0b0 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Wed, 2 Aug 2006 09:03:12 +0000 Subject: [PATCH 415/757] Port hostap-utils to -ng SVN-Revision: 4390 --- openwrt/package/hostap-utils/Makefile | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 openwrt/package/hostap-utils/Makefile diff --git a/openwrt/package/hostap-utils/Makefile b/openwrt/package/hostap-utils/Makefile new file mode 100644 index 00000000000..3987ac5ca00 --- /dev/null +++ b/openwrt/package/hostap-utils/Makefile @@ -0,0 +1,51 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hostap-utils +PKG_VERSION:=0.4.7 +PKG_RELEASE:=1 +PKG_MD5SUM:=afe041581b8f01666e353bec20917c85 + +PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/hostap-utils + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+hostap + TITLE:=Host AP driver utility programs + DESCRIPTION:=Host AP driver utility programs + URL:=http://hostap.epitest.fi/ +endef + + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -Wall" \ + all +endef + +define Package/hostap-utils/install + install -m0755 -d $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/hostap_crypt_conf $(1)/usr/sbin/ + install -m0755 $(PKG_BUILD_DIR)/hostap_diag $(1)/usr/sbin/ + install -m0755 $(PKG_BUILD_DIR)/hostap_io_debug $(1)/usr/sbin/ + install -m0755 $(PKG_BUILD_DIR)/hostap_rid $(1)/usr/sbin/ + install -m0755 $(PKG_BUILD_DIR)/prism2_srec $(1)/usr/sbin/ + install -m0755 $(PKG_BUILD_DIR)/split_combined_hex $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,hostap-utils)) From e8d1e4e748a83e09c67d546476ba41b070a9e6ca Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 2 Aug 2006 12:07:14 +0000 Subject: [PATCH 416/757] minor makefile tweaks SVN-Revision: 4393 --- openwrt/Makefile | 18 +++++------ openwrt/include/package.mk | 63 +++++++++++++++++++------------------- openwrt/rules.mk | 1 + 3 files changed, 42 insertions(+), 40 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 85091f618e8..a520ffde2d6 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -14,18 +14,17 @@ RELEASE:=Kamikaze # Just run 'make menuconfig', configure stuff, then run 'make'. # You shouldn't need to mess with anything beyond this point... #-------------------------------------------------------------- -TOPDIR=${shell pwd} -export TOPDIR +export TOPDIR=${shell pwd} include $(TOPDIR)/include/verbose.mk OPENWRTVERSION:=$(RELEASE) ifneq ($(VERSION),) -OPENWRTVERSION:=$(VERSION) ($(OPENWRTVERSION)) + OPENWRTVERSION:=$(VERSION) ($(OPENWRTVERSION)) else -REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) -ifneq ($(REV),) -OPENWRTVERSION:=$(OPENWRTVERSION)/r$(REV) -endif + REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) + ifneq ($(REV),) + OPENWRTVERSION:=$(OPENWRTVERSION)/r$(REV) + endif endif export OPENWRTVERSION @@ -40,7 +39,7 @@ endif @echo Collecting package info... @-for dir in package/*/; do \ echo Source-Makefile: $${dir}Makefile; \ - $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \ + $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || echo "ERROR: please fix package/$${dir}/Makefile" >&2; \ done > $@ .config.in: .pkginfo @@ -129,5 +128,6 @@ distclean: dirclean config-clean .SILENT: clean dirclean distclean config-clean download world +FORCE: ; .PHONY: FORCE -FORCE: +%: ; diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index cd1a33c4848..3dc944dbfa0 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -40,19 +40,19 @@ define Build/DefaultTargets $(call Build/Compile) touch $$@ - $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built + ifdef Build/InstallDev + $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/stampfiles $(call Build/InstallDev) touch $$@ - ifdef Build/InstallDev compile-targets: $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed endif package-clean: FORCE $(call Build/Clean) $(call Build/UninstallDev) - rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed + -rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed package-rebuild: FORCE @-rm -f $(PKG_BUILD_DIR)/.built @@ -89,9 +89,9 @@ define Package/Default endef define BuildIPKGVariable -pkg_$(subst .,_,$(subst -,_,$(1)))_$(2) = $$(Package/$(1)/$(2)) -export pkg_$(subst .,_,$(subst -,_,$(1))_$(2)) -$(1)_COMMANDS += if [ -n "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" ]; then echo "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" > $(2); fi; + pkg_$(subst .,_,$(subst -,_,$(1)))_$(2) = $$(Package/$(1)/$(2)) + export pkg_$(subst .,_,$(subst -,_,$(1))_$(2)) + $(1)_COMMANDS += if [ -n "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" ]; then echo "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" > $(2); fi; endef define BuildPackage @@ -132,29 +132,30 @@ define BuildPackage IDEPEND_$(1):=$$(strip $$(DEPENDS)) - DUMPINFO += \ + ifneq ($(DUMP),) + DUMPINFO += \ echo "Package: $(1)"; - ifneq ($(MENU),) - DUMPINFO += \ - echo "Menu: $(MENU)"; - endif - - ifneq ($(SUBMENU),) - DUMPINFO += \ - echo "Submenu: $(SUBMENU)"; - ifneq ($(SUBMENUDEP),) + ifneq ($(MENU),) DUMPINFO += \ - echo "Submenu-Depends: $(SUBMENUDEP)"; + echo "Menu: $(MENU)"; endif - endif - ifneq ($(DEFAULT),) - DUMPINFO += \ + ifneq ($(SUBMENU),) + DUMPINFO += \ + echo "Submenu: $(SUBMENU)"; + ifneq ($(SUBMENUDEP),) + DUMPINFO += \ + echo "Submenu-Depends: $(SUBMENUDEP)"; + endif + endif + + ifneq ($(DEFAULT),) + DUMPINFO += \ echo "Default: $(DEFAULT)"; - endif + endif - DUMPINFO += \ + DUMPINFO += \ echo "Version: $(VERSION)"; \ echo "Depends: $$(IDEPEND_$(1))"; \ echo "Build-Depends: $(PKG_BUILDDEP)"; \ @@ -162,19 +163,20 @@ define BuildPackage echo "Title: $(TITLE)"; \ echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; - ifneq ($(URL),) - DUMPINFO += \ + ifneq ($(URL),) + DUMPINFO += \ echo; \ echo "$(URL)"; - endif + endif - DUMPINFO += \ + DUMPINFO += \ echo "@@"; - ifneq ($(CONFIG),) - DUMPINFO += \ + ifneq ($(CONFIG),) + DUMPINFO += \ echo "Config: $(CONFIG)" | sed -e 's,\\,\n,g'; \ echo "@@"; + endif endif $(eval $(call BuildIPKGVariable,$(1),conffiles)) @@ -182,7 +184,7 @@ define BuildPackage $(eval $(call BuildIPKGVariable,$(1),postinst)) $(eval $(call BuildIPKGVariable,$(1),prerm)) $(eval $(call BuildIPKGVariable,$(1),postrm)) - $$(IDIR_$(1))/CONTROL/control: Makefile $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH) + $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH) mkdir -p $$(IDIR_$(1))/CONTROL echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control @@ -204,7 +206,7 @@ define BuildPackage $($(1)_COMMANDS) \ ) - $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built + $$(IPKG_$(1)): $(PKG_BUILD_DIR)/.built $$(IDIR_$(1))/CONTROL/control $(call Package/$(1)/install,$$(IDIR_$(1))) mkdir -p $(PACKAGE_DIR) -find $$(IDIR_$(1)) -name CVS | xargs rm -rf @@ -227,7 +229,6 @@ define BuildPackage @touch $$@ $$(eval $$(call Build/DefaultTargets,$(1))) - endef ifneq ($(strip $(PKG_CAT)),) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 33e8354b8c8..206e57dd03e 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -117,3 +117,4 @@ endif all: FORCE: ; .PHONY: FORCE +%: ; From b1c7dc4733ef3581c3f7d502b02bc1ba867bbb58 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 2 Aug 2006 12:46:17 +0000 Subject: [PATCH 417/757] more cleanup & fix an issue where scripts/config/conf is constantly rebuilt SVN-Revision: 4394 --- openwrt/Makefile | 65 ++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index a520ffde2d6..90bc5deb096 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -14,6 +14,9 @@ RELEASE:=Kamikaze # Just run 'make menuconfig', configure stuff, then run 'make'. # You shouldn't need to mess with anything beyond this point... #-------------------------------------------------------------- + +all: world + export TOPDIR=${shell pwd} include $(TOPDIR)/include/verbose.mk @@ -28,48 +31,54 @@ else endif export OPENWRTVERSION -all: world - ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) -.pkginfo: FORCE -.config: FORCE + .pkginfo .config: FORCE +endif + +ifeq ($(FORCE),) + .config scripts/config/conf scripts/config/mconf: .prereq-build + world: .prereq-packages endif .pkginfo: @echo Collecting package info... @-for dir in package/*/; do \ echo Source-Makefile: $${dir}Makefile; \ - $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || echo "ERROR: please fix package/$${dir}/Makefile" >&2; \ + $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || echo "ERROR: please fix package/$${dir}Makefile" >&2; \ done > $@ -.config.in: .pkginfo - @./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ - pkginfo-clean: FORCE -rm -f .pkginfo .config.in -./scripts/config/mconf: .config.in +.config.in: .pkginfo + @./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ + +.config: ./scripts/config/conf + @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig + @$< -D .config Config.in &> /dev/null + +scripts/config/mconf: @$(MAKE) -C scripts/config all -./scripts/config/conf: .config.in +scripts/config/conf: @$(MAKE) -C scripts/config conf -config: ./scripts/config/conf FORCE - $< Config.in - -defconfig: ./scripts/config/conf FORCE - touch .config - $< -D .config Config.in - -oldconfig: ./scripts/config/conf FORCE - $< -o Config.in - -menuconfig: ./scripts/config/mconf FORCE +config: scripts/config/conf .config.in FORCE $< Config.in config-clean: FORCE $(NO_TRACE_MAKE) -C scripts/config clean +defconfig: scripts/config/conf .config.in FORCE + touch .config + $< -D .config Config.in + +oldconfig: scripts/config/conf .config.in FORCE + $< -o Config.in + +menuconfig: scripts/config/mconf .config.in FORCE + $< Config.in + package/%: .pkginfo FORCE $(MAKE) -C package $(patsubst package/%,%,$@) @@ -79,18 +88,14 @@ target/%: .pkginfo FORCE toolchain/%: FORCE $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) -.config: ./scripts/config/conf - @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig - @$< -D .config Config.in &> /dev/null - -.prereq-build: $(TOPDIR)/include/prereq-build.mk +.prereq-build: include/prereq-build.mk @$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \ echo "Prerequisite check failed. Use FORCE=1 to override."; \ false; \ } @touch $@ -.prereq-packages: $(TOPDIR)/include/prereq.mk .pkginfo .config +.prereq-packages: include/prereq.mk .pkginfo .config @$(NO_TRACE_MAKE) -s -C package prereq 2>/dev/null || { \ echo "Prerequisite check failed. Use FORCE=1 to override."; \ false; \ @@ -104,11 +109,6 @@ download: .config FORCE $(MAKE) package/download $(MAKE) target/download -ifeq ($(FORCE),) -.config ./scripts/config/conf ./scripts/config/mconf: .prereq-build -world: .prereq-packages -endif - world: .config FORCE $(MAKE) toolchain/install $(MAKE) target/compile @@ -126,7 +126,6 @@ dirclean: clean distclean: dirclean config-clean rm -rf dl .*config* .pkg* .prereq - .SILENT: clean dirclean distclean config-clean download world FORCE: ; .PHONY: FORCE From 01ad421020f387b4090218e164ae4ae70b3f3399 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 2 Aug 2006 13:06:58 +0000 Subject: [PATCH 418/757] only rebuild the package index when the *.ipk files have changed SVN-Revision: 4395 --- openwrt/package/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 85f852fd54d..c2015b3a411 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -55,6 +55,8 @@ install: rm -rf $(BUILD_DIR)/root $(MAKE) install-targets -index: FORCE +index: $(PACKAGE_DIR)/Packages + +$(PACKAGE_DIR)/Packages: $(PACKAGE_DIR)/*.ipk (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages) From b6c286e0af3e7c31da47c295c7500d3f44d0a8ce Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Wed, 2 Aug 2006 13:36:20 +0000 Subject: [PATCH 419/757] FreeBSD fix to generate the menuconfig properly SVN-Revision: 4396 --- openwrt/scripts/config/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openwrt/scripts/config/Makefile b/openwrt/scripts/config/Makefile index a731a40e7cf..6cdab2e0e6d 100644 --- a/openwrt/scripts/config/Makefile +++ b/openwrt/scripts/config/Makefile @@ -9,6 +9,15 @@ # Utilizes the lxdialog package # object files used by all kconfig flavours + +# Platform specific fixes +# +# FreeBSD +ifeq ($(shell uname -s),FreeBSD) +export CFLAGS+=-I/usr/local/include +export LDFLAGS+=-L/usr/local/lib -lintl +endif + conf-objs := conf.o zconf.tab.o mconf-objs := mconf.o zconf.tab.o From 188f64115308d1d09914ee300c4ee47777550a23 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 2 Aug 2006 13:40:11 +0000 Subject: [PATCH 420/757] fix CONFIG_ALL SVN-Revision: 4397 --- openwrt/include/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 3dc944dbfa0..fbd4cf71495 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -19,7 +19,7 @@ define Build/DefaultTargets $(PKG_BUILD_DIR)/.prepared: package-clean endif - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(IPKG_$(1)) $(PKG_BUILD_DIR) | tee /tmp/check_$(1)),$(IPKG_$(1))) $(PKG_BUILD_DIR)/.built: package-rebuild endif endif @@ -121,7 +121,7 @@ define BuildPackage install-targets: $$(INFO_$(1)) endif - ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) + ifneq ($(CONFIG_PACKAGE_$(1))$(CONFIG_ALL),) compile-targets: $$(IPKG_$(1)) endif endif From f489431f0f75302561aa7f40b2daf7d0e994d006 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 2 Aug 2006 13:57:33 +0000 Subject: [PATCH 421/757] correct [4397] SVN-Revision: 4398 --- openwrt/include/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index fbd4cf71495..b4b6538b6b3 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -121,7 +121,7 @@ define BuildPackage install-targets: $$(INFO_$(1)) endif - ifneq ($(CONFIG_PACKAGE_$(1))$(CONFIG_ALL),) + ifneq ($(CONFIG_PACKAGE_$(1)),) compile-targets: $$(IPKG_$(1)) endif endif From 6c500b7a5a7d3288f77c176e8c3efeaa08be8bef Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 2 Aug 2006 14:14:40 +0000 Subject: [PATCH 422/757] fix dependency SVN-Revision: 4399 --- openwrt/package/hostap-utils/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/hostap-utils/Makefile b/openwrt/package/hostap-utils/Makefile index 3987ac5ca00..f2e70efa5f9 100644 --- a/openwrt/package/hostap-utils/Makefile +++ b/openwrt/package/hostap-utils/Makefile @@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk define Package/hostap-utils SECTION:=utils CATEGORY:=Utilities - DEPENDS:=+hostap + DEPENDS:=+kmod-hostap TITLE:=Host AP driver utility programs DESCRIPTION:=Host AP driver utility programs URL:=http://hostap.epitest.fi/ From ced7d6a91f1d1350c8d84199f325319239d9cd26 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 2 Aug 2006 14:34:35 +0000 Subject: [PATCH 423/757] remove debug line SVN-Revision: 4400 --- openwrt/include/package.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index b4b6538b6b3..c0953ae701a 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -19,13 +19,12 @@ define Build/DefaultTargets $(PKG_BUILD_DIR)/.prepared: package-clean endif - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(IPKG_$(1)) $(PKG_BUILD_DIR) | tee /tmp/check_$(1)),$(IPKG_$(1))) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) $(PKG_BUILD_DIR)/.built: package-rebuild endif endif endif - $(PKG_BUILD_DIR)/.prepared: @-rm -rf $(PKG_BUILD_DIR) @mkdir -p $(PKG_BUILD_DIR) From 453356e6757b74a718b89cbaef0efeb384cdaa8f Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Thu, 3 Aug 2006 14:43:03 +0000 Subject: [PATCH 424/757] Use the rewritten flash map driver, huge thanks nbd ! SVN-Revision: 4425 --- .../patches/040-bcm963xx_flashmap.patch | 245 +++++++++++------- 1 file changed, 152 insertions(+), 93 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch b/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch index d8acdfa9a0b..c160e23dce8 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch @@ -1,135 +1,194 @@ -diff -urN linux-2.6.16.7/drivers/mtd/maps/bcm963xx.c linux-2.6.16.7-brcm63xx/drivers/mtd/maps/bcm963xx.c ---- linux-2.6.16.7/drivers/mtd/maps/bcm963xx.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-brcm63xx/drivers/mtd/maps/bcm963xx.c 2006-07-07 22:00:36.000000000 +0200 -@@ -0,0 +1,106 @@ +diff -urN linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c linux-2.6.17-brcm63xx/drivers/mtd/maps/bcm963xx-flash.c +--- linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/drivers/mtd/maps/bcm963xx-flash.c 2006-08-03 16:29:52.000000000 +0200 +@@ -0,0 +1,116 @@ +/* -+ * A simple flash mapping code for BCM963xx board flash memory -+ * It is simple because it only treats all the flash memory as ROM -+ * It is used with chips/map_rom.c ++ * $Id$ ++ * Copyright (C) 2006 Florian Fainelli ++ * Copyright (C) $Date$ $Author$ ++ * ++ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++/* This is the BCM963xx flash map driver, in its actual state it only supports BCM96348 devices ++ * this driver is able to manage both bootloader we found on these boards : CFE and RedBoot ++ * ++ * RedBoot : ++ * - this bootloader allows us to parse partitions and therefore deduce the MTD partition table ++ * ++ * CFE : ++ * - we have to use a "physically mapped flash" defined bellow + * -+ * Song Wang (songw@broadcom.com) + */ + -+#include <linux/module.h> -+#include <linux/types.h> -+#include <linux/kernel.h> -+#include <linux/init.h> +#include <asm/io.h> -+#include <linux/mtd/mtd.h> ++#include <linux/init.h> +#include <linux/mtd/map.h> -+#include <linux/config.h> ++#include <linux/mtd/mtd.h> ++#include <linux/mtd/partitions.h> + -+#include <board.h> -+#include <bcmTag.h> -+#define VERSION "1.0" ++#define WINDOW_ADDR 0x1e400000 /* Real address of the flash */ ++#define WINDOW_SIZE 0x800000 /* Size of flash */ ++#define BUSWIDTH 2 /* Buswidth */ + -+extern PFILE_TAG kerSysImageTagGet(void); ++extern int boot_loader_type; /* For RedBoot / CFE detection */ ++extern int parse_redboot_partitions(struct mtd_info *master, struct mtd_partition **pparts, unsigned long fis_origin); ++static struct mtd_partition *parsed_parts; + -+static struct mtd_info *mymtd; ++static void __exit bcm963xx_mtd_cleanup(void); + -+static map_word brcm_physmap_read16(struct map_info *map, unsigned long ofs) -+{ -+ map_word val; -+ -+ val.x[0] = __raw_readw(map->map_priv_1 + ofs); -+ -+ return val; -+} ++static struct mtd_info *bcm963xx_mtd_info; + -+static void brcm_physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) -+{ -+ memcpy_fromio(to, map->map_priv_1 + from, len); -+} -+ -+static struct map_info brcm_physmap_map = { -+ .name = "Physically mapped flash", -+ .bankwidth = 2, -+ .read = brcm_physmap_read16, -+ .copy_from = brcm_physmap_copy_from ++static struct map_info bcm963xx_map = { ++ .name = "bcm963xx", ++ .size = WINDOW_SIZE, ++ .bankwidth = BUSWIDTH, ++ .phys = WINDOW_ADDR, +}; + -+static int __init init_brcm_physmap(void) ++static struct mtd_partition bcm963xx_parts[] = { ++ { name: "bootloader", size: 0, offset: 0, mask_flags: MTD_WRITEABLE }, ++ { name: "rootfs", size: 0, offset: 0}, ++ { name: "jffs2", size: 5 * 0x10000, offset: 57*0x10000} ++}; ++ ++static int __init bcm963xx_mtd_init(void) +{ -+ PFILE_TAG pTag = NULL; -+ u_int32_t rootfs_addr, kernel_addr; -+ FLASH_ADDR_INFO info; ++ printk("bcm963xx: 0x%08x at 0x%08x\n", WINDOW_SIZE, WINDOW_ADDR); ++ bcm963xx_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); + -+ printk("bcm963xx_mtd driver v%s\n", VERSION); -+ kerSysFlashAddrInfoGet( &info ); -+ -+ /* Read the flash memory map from flash memory. */ -+ if (!(pTag = kerSysImageTagGet())) { -+ printk("Failed to read image tag from flash\n"); -+ return -EIO; -+ } -+ -+ rootfs_addr = (u_int32_t) simple_strtoul(pTag->rootfsAddress, NULL, 10); -+ kernel_addr = (u_int32_t) simple_strtoul(pTag->kernelAddress, NULL, 10); -+ -+ brcm_physmap_map.size = kernel_addr - rootfs_addr; -+ brcm_physmap_map.map_priv_1 = (unsigned long)rootfs_addr; -+ -+ if (!brcm_physmap_map.map_priv_1) { -+ printk("Wrong rootfs starting address\n"); ++ if (!bcm963xx_map.virt) { ++ printk("bcm963xx: Failed to ioremap\n"); + return -EIO; + } -+ -+ if (brcm_physmap_map.size <= 0) { -+ printk("Wrong rootfs size\n"); -+ return -EIO; -+ } -+ -+ mymtd = do_map_probe("map_rom", &brcm_physmap_map); -+ if (mymtd) { -+ mymtd->owner = THIS_MODULE; -+ add_mtd_device(mymtd); ++ ++ simple_map_init(&bcm963xx_map); ++ ++ bcm963xx_mtd_info = do_map_probe("cfi_probe", &bcm963xx_map); ++ ++ if (bcm963xx_mtd_info) { ++ bcm963xx_mtd_info->owner = THIS_MODULE; ++ int parsed_nr_parts = 0; ++ char * part_type; ++ ++#ifdef CONFIG_MTD_REDBOOT_PARTS ++ if (parsed_nr_parts == 0) { ++ int ret = parse_redboot_partitions(bcm963xx_mtd_info, &parsed_parts, 0); ++ if (ret > 0) { ++ part_type = "RedBoot"; ++ parsed_nr_parts = ret; ++ } ++ } ++#endif ++ add_mtd_partitions(bcm963xx_mtd_info, parsed_parts, parsed_nr_parts); + + return 0; -+ } -+ ++ } ++ iounmap(bcm963xx_map.virt); + return -ENXIO; +} + -+static void __exit cleanup_brcm_physmap(void) ++static void __exit bcm963xx_mtd_cleanup(void) +{ -+ if (mymtd) { -+ del_mtd_device(mymtd); -+ map_destroy(mymtd); ++ if (bcm963xx_mtd_info) { ++ del_mtd_partitions(bcm963xx_mtd_info); ++ map_destroy(bcm963xx_mtd_info); + } -+ if (brcm_physmap_map.map_priv_1) { -+ brcm_physmap_map.map_priv_1 = 0; ++ ++ if (bcm963xx_map.virt) { ++ iounmap(bcm963xx_map.virt); ++ bcm963xx_map.virt = 0; + } +} + -+module_init(init_brcm_physmap); -+module_exit(cleanup_brcm_physmap); -+ ++module_init(bcm963xx_mtd_init); ++module_exit(bcm963xx_mtd_cleanup); + +MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Song Wang songw@broadcom.com"); -+MODULE_DESCRIPTION("Configurable MTD map driver for read-only root file system"); -diff -urN linux-2.6.16.7/drivers/mtd/maps/Kconfig linux-2.6.16.7-brcm63xx/drivers/mtd/maps/Kconfig ---- linux-2.6.16.7/drivers/mtd/maps/Kconfig 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-brcm63xx/drivers/mtd/maps/Kconfig 2006-07-07 22:02:13.000000000 +0200 ++MODULE_AUTHOR("Florian Fainelli"); +diff -urN linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-brcm63xx/drivers/mtd/maps/Kconfig +--- linux-2.6.17/drivers/mtd/maps/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/drivers/mtd/maps/Kconfig 2006-08-03 16:32:05.000000000 +0200 @@ -224,6 +224,13 @@ Flash memory access on 4G Systems MTX-1 Board. If you have one of these boards and would like to use the flash chips on it, say 'Y'. +config MTD_BCM963XX -+ tristate "BCM963xx Flash device" -+ depends on MIPS && MIPS_BRCM -+ help -+ This driver seems to detect and provide a valid flash map to the system -+ of course, it needs checking and testing. ++ tristate "BCM963xx Flash device" ++ depends on MIPS && MIPS_BRCM ++ help ++ Flash memory access on BCM963xx boards. Currently only works with ++ RedBoot, CFE support coming soon. + config MTD_DILNETPC tristate "CFI Flash device mapped on DIL/Net PC" depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT -diff -urN linux-2.6.16.7/drivers/mtd/maps/Makefile linux-2.6.16.7-brcm63xx/drivers/mtd/maps/Makefile ---- linux-2.6.16.7/drivers/mtd/maps/Makefile 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-brcm63xx/drivers/mtd/maps/Makefile 2006-07-07 22:01:29.000000000 +0200 +diff -urN linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-brcm63xx/drivers/mtd/maps/Makefile +--- linux-2.6.17/drivers/mtd/maps/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/drivers/mtd/maps/Makefile 2006-08-03 16:32:27.000000000 +0200 @@ -71,3 +71,4 @@ obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o obj-$(CONFIG_MTD_TQM834x) += tqm834x.o -+obj-$(CONFIG_MTD_BCM963XX) += bcm963xx.o ++obj-$(CONFIG_MTD_BCM963XX) += bcm963xx-flash.o +diff -urN linux-2.6.17/drivers/mtd/redboot.c linux-2.6.17-brcm63xx/drivers/mtd/redboot.c +--- linux-2.6.17/drivers/mtd/redboot.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-brcm63xx/drivers/mtd/redboot.c 2006-08-03 16:32:39.000000000 +0200 +@@ -39,7 +39,7 @@ + return 1; + } + +-static int parse_redboot_partitions(struct mtd_info *master, ++int parse_redboot_partitions(struct mtd_info *master, + struct mtd_partition **pparts, + unsigned long fis_origin) + { +@@ -120,11 +120,19 @@ + goto out; + } + ++ if (!fis_origin) { ++ for (i = 0; i < numslots; i++) { ++ if (!strncmp(buf[i].name, "RedBoot", 8)) { ++ fis_origin = (buf[i].flash_base & (master->size << 1) - 1); ++ } ++ } ++ } ++ + for (i = 0; i < numslots; i++) { + struct fis_list *new_fl, **prev; + + if (buf[i].name[0] == 0xff) +- continue; ++ break; + if (!redboot_checksum(&buf[i])) + break; + +@@ -135,11 +143,10 @@ + goto out; + } + new_fl->img = &buf[i]; +- if (fis_origin) { +- buf[i].flash_base -= fis_origin; +- } else { +- buf[i].flash_base &= master->size-1; +- } ++ if (fis_origin) { ++ buf[i].flash_base -= fis_origin; ++ } ++ buf[i].flash_base &= (master->size << 1) - 1; + + /* I'm sure the JFFS2 code has done me permanent damage. + * I now think the following is _normal_ From 80c9db0487da07b9fcb8dcb35e8b8cd5a0d33e8c Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Thu, 3 Aug 2006 14:53:18 +0000 Subject: [PATCH 425/757] Add bootloader specific code, need to fix bootloader detection code as well SVN-Revision: 4426 --- .../patches/001-brcm_boards.patch | 9086 +---------------- .../brcm63xx-2.6/patches/020-bcmdrivers.patch | 38 +- 2 files changed, 45 insertions(+), 9079 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch index 6fc7f7697bb..79913989f55 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch @@ -1,9073 +1,33 @@ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,775 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ *************************************************************************** -+ * File Name : bcm63xx_flash.c -+ * -+ * Description: This file contains the flash device driver APIs for bcm63xx board. -+ * -+ * Created on : 8/10/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) -+ * -+ ***************************************************************************/ -+ -+ -+/* Includes. */ -+#include <linux/fs.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <asm/uaccess.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#define BCMTAG_EXE_USE -+#include <bcmTag.h> -+#include "cfiflash.h" -+#include "boardparms.h" -+ -+//#define DEBUG_FLASH -+ -+static FLASH_ADDR_INFO fInfo; -+static int flashInitialized = 0; -+ -+void *retriedKmalloc(size_t size) -+{ -+ void *pBuf; -+ int tryCount = 0; -+ -+ // try 1000 times before quit -+ while (((pBuf = kmalloc(size, GFP_KERNEL)) == NULL) && (tryCount++ < 1000)) -+ { -+ current->state = TASK_INTERRUPTIBLE; -+ schedule_timeout(HZ/10); -+ } -+ if (tryCount >= 1000) -+ pBuf = NULL; -+ else -+ memset(pBuf, 0, size); -+ -+ return pBuf; -+} -+ -+void retriedKfree(void *pBuf) -+{ -+ kfree(pBuf); -+} -+ -+/*************************************************************************** -+// Function Name: getCrc32 -+// Description : caculate the CRC 32 of the given data. -+// Parameters : pdata - array of data. -+// size - number of input data bytes. -+// crc - either CRC32_INIT_VALUE or previous return value. -+// Returns : crc. -+****************************************************************************/ -+UINT32 getCrc32(byte *pdata, UINT32 size, UINT32 crc) -+{ -+ while (size-- > 0) -+ crc = (crc >> 8) ^ Crc32_table[(crc ^ *pdata++) & 0xff]; -+ -+ return crc; -+} -+ -+// get the nvram start addr -+// -+unsigned long get_nvram_start_addr(void) -+{ -+ return ((unsigned long) -+ (flash_get_memptr(fInfo.flash_nvram_start_blk) + fInfo.flash_nvram_blk_offset)); -+} -+ -+// get the scratch_pad start addr -+// -+unsigned long get_scratch_pad_start_addr(void) -+{ -+ return ((unsigned long) -+ (flash_get_memptr(fInfo.flash_scratch_pad_start_blk) + fInfo.flash_scratch_pad_blk_offset)); -+} -+ -+ -+ -+/* ********************************************************************* -+ * kerSysImageTagGet() -+ * Get the image tag -+ * Input parameters: -+ * none -+ * Return value: -+ * point to tag -- Found -+ * NULL -- failed -+ ********************************************************************* */ -+PFILE_TAG kerSysImageTagGet(void) -+{ -+ int i; -+ int totalBlks = flash_get_numsectors(); -+ UINT32 crc; -+ unsigned char *sectAddr; -+ PFILE_TAG pTag; -+ -+#if defined(DEBUG_FLASH) -+ printk("totalblks in tagGet=%d\n", totalBlks); -+#endif -+ + // start from 2nd blk, assume 1st one is always CFE -+ for (i = 1; i < totalBlks; i++) -+ { -+ sectAddr = flash_get_memptr((byte) i); -+ crc = CRC32_INIT_VALUE; -+ crc = getCrc32(sectAddr, (UINT32)TAG_LEN-TOKEN_LEN, crc); -+ pTag = (PFILE_TAG) sectAddr; -+ -+#if defined(DEBUG_FLASH) -+ printk("Check Tag crc on blk [%d]\n", i); -+#endif -+ -+ if (crc == (UINT32)(*(UINT32*)(pTag->tagValidationToken))) -+ return pTag; -+ } -+ -+ return (PFILE_TAG) NULL; -+} -+ -+// Initialize the flash and fill out the fInfo structure -+void kerSysFlashInit( void ) -+{ -+ int i = 0; -+ int totalBlks = 0; -+ int totalSize = 0; -+ int startAddr = 0; -+ int usedBlkSize = 0; -+ NVRAM_DATA nvramData; -+ UINT32 crc = CRC32_INIT_VALUE, savedCrc; -+ PFILE_TAG pTag = NULL; -+ unsigned long kernelEndAddr = 0; -+ unsigned long spAddr = 0; -+ -+ if (flashInitialized) -+ return; -+ -+ flashInitialized = 1; -+ flash_init(); -+ -+ totalBlks = flash_get_numsectors(); -+ totalSize = flash_get_total_size(); -+ -+ printk("Total Flash size: %dK with %d sectors\n", totalSize/1024, totalBlks); -+ -+ /* nvram is always at the end of flash */ -+ fInfo.flash_nvram_length = FLASH45_LENGTH_NVRAM; -+ fInfo.flash_nvram_start_blk = 0; /* always the first block */ -+ fInfo.flash_nvram_number_blk = 1; /*always fits in the first block */ -+ fInfo.flash_nvram_blk_offset = NVRAM_DATA_OFFSET; -+ -+ // check nvram CRC -+ memcpy((char *)&nvramData, (char *)get_nvram_start_addr(), sizeof(NVRAM_DATA)); -+ savedCrc = nvramData.ulCheckSum; -+ nvramData.ulCheckSum = 0; -+ crc = getCrc32((char *)&nvramData, (UINT32) sizeof(NVRAM_DATA), crc); -+ -+ BpSetBoardId( nvramData.szBoardId ); -+ -+ fInfo.flash_persistent_length = NVRAM_PSI_DEFAULT; -+ if (savedCrc != crc) -+ { -+ printk("***Board is not initialized****: Using the default PSI size: %d\n", -+ fInfo.flash_persistent_length); -+ } -+ else -+ { -+ unsigned long ulPsiSize; -+ if( BpGetPsiSize( &ulPsiSize ) == BP_SUCCESS ) -+ fInfo.flash_persistent_length = ulPsiSize; -+ else -+ { -+ printk("***Board id is not set****: Using the default PSI size: %d\n", -+ fInfo.flash_persistent_length); -+ } -+ } -+ -+ fInfo.flash_persistent_length *= ONEK; -+ startAddr = totalSize - fInfo.flash_persistent_length; -+ fInfo.flash_persistent_start_blk = flash_get_blk(startAddr+FLASH_BASE_ADDR_REG); -+ fInfo.flash_persistent_number_blk = totalBlks - fInfo.flash_persistent_start_blk; -+ // save abs SP address (Scratch Pad). it is before PSI -+ spAddr = startAddr - SP_MAX_LEN ; -+ // find out the offset in the start_blk -+ usedBlkSize = 0; -+ for (i = fInfo.flash_persistent_start_blk; -+ i < (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk); i++) -+ { -+ usedBlkSize += flash_get_sector_size((byte) i); -+ } -+ fInfo.flash_persistent_blk_offset = usedBlkSize - fInfo.flash_persistent_length; -+ -+ // get the info for sp -+ if (!(pTag = kerSysImageTagGet())) -+ { -+ printk("Failed to read image tag from flash\n"); -+ return; -+ } -+ kernelEndAddr = (unsigned long) simple_strtoul(pTag->kernelAddress, NULL, 10) + \ -+ (unsigned long) simple_strtoul(pTag->kernelLen, NULL, 10); -+ -+ // make suer sp does not share kernel block -+ fInfo.flash_scratch_pad_start_blk = flash_get_blk(spAddr+FLASH_BASE_ADDR_REG); -+ if (fInfo.flash_scratch_pad_start_blk != flash_get_blk(kernelEndAddr)) -+ { -+ fInfo.flash_scratch_pad_length = SP_MAX_LEN; -+ if (fInfo.flash_persistent_start_blk == fInfo.flash_scratch_pad_start_blk) // share blk -+ { -+#if 1 /* do not used scratch pad unless it's in its own sector */ -+ printk("Scratch pad is not used for this flash part.\n"); -+ fInfo.flash_scratch_pad_length = 0; // no sp -+#else /* allow scratch pad to share a sector with another section such as PSI */ -+ fInfo.flash_scratch_pad_number_blk = 1; -+ fInfo.flash_scratch_pad_blk_offset = fInfo.flash_persistent_blk_offset - fInfo.flash_scratch_pad_length; -+#endif -+ } -+ else // on different blk -+ { -+ fInfo.flash_scratch_pad_number_blk = fInfo.flash_persistent_start_blk\ -+ - fInfo.flash_scratch_pad_start_blk; -+ // find out the offset in the start_blk -+ usedBlkSize = 0; -+ for (i = fInfo.flash_scratch_pad_start_blk; -+ i < (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk); i++) -+ usedBlkSize += flash_get_sector_size((byte) i); -+ fInfo.flash_scratch_pad_blk_offset = usedBlkSize - fInfo.flash_scratch_pad_length; -+ } -+ } -+ else -+ { -+ printk("No flash for scratch pad!\n"); -+ fInfo.flash_scratch_pad_length = 0; // no sp -+ } -+ -+#if defined(DEBUG_FLASH) -+ printk("fInfo.flash_scratch_pad_start_blk = %d\n", fInfo.flash_scratch_pad_start_blk); -+ printk("fInfo.flash_scratch_pad_number_blk = %d\n", fInfo.flash_scratch_pad_number_blk); -+ printk("fInfo.flash_scratch_pad_length = 0x%x\n", fInfo.flash_scratch_pad_length); -+ printk("fInfo.flash_scratch_pad_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_scratch_pad_blk_offset); -+ -+ printk("fInfo.flash_nvram_start_blk = %d\n", fInfo.flash_nvram_start_blk); -+ printk("fInfo.flash_nvram_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_nvram_blk_offset); -+ printk("fInfo.flash_nvram_number_blk = %d\n", fInfo.flash_nvram_number_blk); -+ -+ printk("psi startAddr = %x\n", startAddr+FLASH_BASE_ADDR_REG); -+ printk("fInfo.flash_persistent_start_blk = %d\n", fInfo.flash_persistent_start_blk); -+ printk("fInfo.flash_persistent_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_persistent_blk_offset); -+ printk("fInfo.flash_persistent_number_blk = %d\n", fInfo.flash_persistent_number_blk); -+#endif -+ -+} -+ -+ -+ -+/*********************************************************************** -+ * Function Name: kerSysFlashAddrInfoGet -+ * Description : Fills in a structure with information about the NVRAM -+ * and persistent storage sections of flash memory. -+ * Fro physmap.c to mount the fs vol. -+ * Returns : None. -+ ***********************************************************************/ -+void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info) -+{ -+ pflash_addr_info->flash_nvram_blk_offset = fInfo.flash_nvram_blk_offset; -+ pflash_addr_info->flash_nvram_length = fInfo.flash_nvram_length; -+ pflash_addr_info->flash_nvram_number_blk = fInfo.flash_nvram_number_blk; -+ pflash_addr_info->flash_nvram_start_blk = fInfo.flash_nvram_start_blk; -+ pflash_addr_info->flash_persistent_blk_offset = fInfo.flash_persistent_blk_offset; -+ pflash_addr_info->flash_persistent_length = fInfo.flash_persistent_length; -+ pflash_addr_info->flash_persistent_number_blk = fInfo.flash_persistent_number_blk; -+ pflash_addr_info->flash_persistent_start_blk = fInfo.flash_persistent_start_blk; -+} -+ -+ -+// get shared blks into *** pTempBuf *** which has to be released bye the caller! -+// return: if pTempBuf != NULL, poits to the data with the dataSize of the buffer -+// !NULL -- ok -+// NULL -- fail -+static char *getSharedBlks(int start_blk, int end_blk) -+{ -+ int i = 0; -+ int usedBlkSize = 0; -+ int sect_size = 0; -+ char *pTempBuf = NULL; -+ char *pBuf = NULL; -+ -+ for (i = start_blk; i < end_blk; i++) -+ usedBlkSize += flash_get_sector_size((byte) i); -+ -+#if defined(DEBUG_FLASH) -+ printk("usedBlkSize = %d\n", usedBlkSize); -+#endif -+ -+ if ((pTempBuf = (char *) retriedKmalloc(usedBlkSize)) == NULL) -+ { -+ printk("failed to allocate memory with size: %d\n", usedBlkSize); -+ return pTempBuf; -+ } -+ -+ pBuf = pTempBuf; -+ for (i = start_blk; i < end_blk; i++) -+ { -+ sect_size = flash_get_sector_size((byte) i); -+ -+#if defined(DEBUG_FLASH) -+ printk("i = %d, sect_size = %d, end_blk = %d\n", i, sect_size, end_blk); -+#endif -+ flash_read_buf((byte)i, 0, pBuf, sect_size); -+ pBuf += sect_size; -+ } -+ -+ return pTempBuf; -+} -+ -+ -+ -+// Set the pTempBuf to flash from start_blk to end_blk -+// return: -+// 0 -- ok -+// -1 -- fail -+static int setSharedBlks(int start_blk, int end_blk, char *pTempBuf) -+{ -+ int i = 0; -+ int sect_size = 0; -+ int sts = 0; -+ char *pBuf = pTempBuf; -+ -+ for (i = start_blk; i < end_blk; i++) -+ { -+ sect_size = flash_get_sector_size((byte) i); -+ flash_sector_erase_int(i); -+ if (flash_write_buf(i, 0, pBuf, sect_size) != sect_size) -+ { -+ printk("Error writing flash sector %d.", i); -+ sts = -1; -+ break; -+ } -+ pBuf += sect_size; -+ } -+ -+ return sts; -+} -+ -+ -+ -+/******************************************************************************* -+ * NVRAM functions -+ *******************************************************************************/ -+ -+// get nvram data -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysNvRamGet(char *string, int strLen, int offset) -+{ -+ char *pBuf = NULL; -+ -+ if (!flashInitialized) -+ kerSysFlashInit(); -+ -+ if (strLen > FLASH45_LENGTH_NVRAM) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) -+ return -1; -+ -+ // get string off the memory buffer -+ memcpy(string, (pBuf + fInfo.flash_nvram_blk_offset + offset), strLen); -+ -+ retriedKfree(pBuf); -+ -+ return 0; -+} -+ -+ -+// set nvram -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysNvRamSet(char *string, int strLen, int offset) -+{ -+ int sts = 0; -+ char *pBuf = NULL; -+ -+ if (strLen > FLASH45_LENGTH_NVRAM) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) -+ return -1; -+ -+ // set string to the memory buffer -+ memcpy((pBuf + fInfo.flash_nvram_blk_offset + offset), string, strLen); -+ -+ if (setSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_number_blk + fInfo.flash_nvram_start_blk), pBuf) != 0) -+ sts = -1; -+ -+ retriedKfree(pBuf); -+ -+ return sts; -+} -+ -+ -+/*********************************************************************** -+ * Function Name: kerSysEraseNvRam -+ * Description : Erase the NVRAM storage section of flash memory. -+ * Returns : 1 -- ok, 0 -- fail -+ ***********************************************************************/ -+int kerSysEraseNvRam(void) -+{ -+ int sts = 1; -+ char *tempStorage = retriedKmalloc(FLASH45_LENGTH_NVRAM); -+ -+ // just write the whole buf with '0xff' to the flash -+ if (!tempStorage) -+ sts = 0; -+ else -+ { -+ memset(tempStorage, 0xff, FLASH45_LENGTH_NVRAM); -+ if (kerSysNvRamSet(tempStorage, FLASH45_LENGTH_NVRAM, 0) != 0) -+ sts = 0; -+ retriedKfree(tempStorage); -+ } -+ -+ return sts; -+} -+ -+ -+/******************************************************************************* -+ * PSI functions -+ *******************************************************************************/ -+// get psi data -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysPersistentGet(char *string, int strLen, int offset) -+{ -+ char *pBuf = NULL; -+ -+ if (strLen > fInfo.flash_persistent_length) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) -+ return -1; -+ -+ // get string off the memory buffer -+ memcpy(string, (pBuf + fInfo.flash_persistent_blk_offset + offset), strLen); -+ -+ retriedKfree(pBuf); -+ -+ return 0; -+} -+ -+ -+// set psi -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysPersistentSet(char *string, int strLen, int offset) -+{ -+ int sts = 0; -+ char *pBuf = NULL; -+ -+ if (strLen > fInfo.flash_persistent_length) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) -+ return -1; -+ -+ // set string to the memory buffer -+ memcpy((pBuf + fInfo.flash_persistent_blk_offset + offset), string, strLen); -+ -+ if (setSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_number_blk + fInfo.flash_persistent_start_blk), pBuf) != 0) -+ sts = -1; -+ -+ retriedKfree(pBuf); -+ -+ return sts; -+} -+ -+ -+// flash bcm image -+// return: -+// 0 - ok -+// !0 - the sector number fail to be flashed (should not be 0) -+int kerSysBcmImageSet( int flash_start_addr, char *string, int size) -+{ -+ int sts; -+ int sect_size; -+ int blk_start; -+ int i; -+ char *pTempBuf = NULL; -+ int whole_image = 0; -+ -+ blk_start = flash_get_blk(flash_start_addr); -+ if( blk_start < 0 ) -+ return( -1 ); -+ -+ if (flash_start_addr == FLASH_BASE && size > FLASH45_LENGTH_BOOT_ROM) -+ whole_image = 1; -+ -+ /* write image to flash memory */ -+ do -+ { -+ sect_size = flash_get_sector_size(blk_start); -+// NOTE: for memory problem in multiple PVC configuration, temporary get rid of kmalloc this 64K for now. -+// if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) -+// { -+// printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); -+// kerSysMipsSoftReset(); // reset the board right away. -+// } -+ // for whole image, no check on psi -+ if (!whole_image && blk_start == fInfo.flash_persistent_start_blk) // share the blk with psi -+ { -+ if (size > (sect_size - fInfo.flash_persistent_length)) -+ { -+ printk("Image is too big\n"); -+ break; // image is too big. Can not overwrite to nvram -+ } -+ if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) -+ { -+ printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); -+ kerSysMipsSoftReset(); // reset the board right away. -+ } -+ flash_read_buf((byte)blk_start, 0, pTempBuf, sect_size); -+ if (copy_from_user((void *)pTempBuf,(void *)string, size) != 0) -+ break; // failed ? -+ flash_sector_erase_int(blk_start); // erase blk before flash -+ if (flash_write_buf(blk_start, 0, pTempBuf, sect_size) == sect_size) -+ size = 0; // break out and say all is ok -+ retriedKfree(pTempBuf); -+ break; -+ } -+ -+ flash_sector_erase_int(blk_start); // erase blk before flash -+ -+ if (sect_size > size) -+ { -+ if (size & 1) -+ size++; -+ sect_size = size; -+ } -+ -+ if ((i = flash_write_buf(blk_start, 0, string, sect_size)) != sect_size) { -+ break; -+ } -+ blk_start++; -+ string += sect_size; -+ size -= sect_size; -+ } while (size > 0); -+ -+ if (whole_image) -+ { -+ // If flashing a whole image, erase to end of flash. -+ int total_blks = flash_get_numsectors(); -+ while( blk_start < total_blks ) -+ { -+ flash_sector_erase_int(blk_start); -+ blk_start++; -+ } -+ } -+ if (pTempBuf) -+ retriedKfree(pTempBuf); -+ -+ if( size == 0 ) -+ sts = 0; // ok -+ else -+ sts = blk_start; // failed to flash this sector -+ -+ return sts; -+} -+ -+/******************************************************************************* -+ * SP functions -+ *******************************************************************************/ -+// get sp data. NOTE: memcpy work here -- not using copy_from/to_user -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysScratchPadGet(char *tokenId, char *tokBuf, int bufLen) -+{ -+ PSP_HEADER pHead = NULL; -+ PSP_TOKEN pToken = NULL; -+ char *pBuf = NULL; -+ char *pShareBuf = NULL; -+ char *startPtr = NULL; -+ char *endPtr = NULL; -+ char *spEndPtr = NULL; -+ int sts = -1; -+ -+ if (fInfo.flash_scratch_pad_length == 0) -+ return sts; -+ -+ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) -+ { -+ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ -+ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); -+ return sts; -+ } -+ -+ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) -+ return sts; -+ -+ // pBuf points to SP buf -+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; -+ -+ pHead = (PSP_HEADER) pBuf; -+ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) -+ { -+ printk("Scrap pad is not initialized.\n"); -+ return sts; -+ } -+ -+ // search up to SPUsedLen for the token -+ startPtr = pBuf + sizeof(SP_HEADER); -+ endPtr = pBuf + pHead->SPUsedLen; -+ spEndPtr = pBuf + SP_MAX_LEN; -+ while (startPtr < endPtr && startPtr < spEndPtr) -+ { -+ pToken = (PSP_TOKEN) startPtr; -+ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) -+ { -+ memcpy(tokBuf, startPtr + sizeof(SP_TOKEN), bufLen); -+ sts = 0; -+ break; -+ } -+ // get next token -+ startPtr += sizeof(SP_TOKEN) + pToken->tokenLen; -+ } -+ -+ retriedKfree(pShareBuf); -+ -+ return sts; -+} -+ -+ -+// set sp. NOTE: memcpy work here -- not using copy_from/to_user -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysScratchPadSet(char *tokenId, char *tokBuf, int bufLen) -+{ -+ PSP_TOKEN pToken = NULL; -+ PSP_HEADER pHead = NULL; -+ char *pShareBuf = NULL; -+ char *pBuf = NULL; -+ SP_HEADER SPHead; -+ SP_TOKEN SPToken; -+ char *curPtr; -+ int sts = -1; -+ -+ if (fInfo.flash_scratch_pad_length == 0) -+ return sts; -+ -+ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) -+ { -+ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ -+ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); -+ return sts; -+ } -+ -+ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) -+ return sts; -+ -+ // pBuf points to SP buf -+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; -+ pHead = (PSP_HEADER) pBuf; -+ -+ // form header info. SPUsedLen later on... -+ memset((char *)&SPHead, 0, sizeof(SP_HEADER)); -+ memcpy(SPHead.SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN); -+ SPHead.SPVersion = SP_VERSION; -+ -+ // form token info. -+ memset((char*)&SPToken, 0, sizeof(SP_TOKEN)); -+ strncpy(SPToken.tokenName, tokenId, TOKEN_NAME_LEN - 1); -+ SPToken.tokenLen = bufLen; -+ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) -+ { -+ // new sp, so just flash the token -+ printk("No Scrap pad found. Initialize scratch pad...\n"); -+ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; -+ memcpy(pBuf, (char *)&SPHead, sizeof(SP_HEADER)); -+ curPtr = pBuf + sizeof(SP_HEADER); -+ memcpy(curPtr, (char *)&SPToken, sizeof(SP_TOKEN)); -+ curPtr += sizeof(SP_TOKEN); -+ memcpy(curPtr, tokBuf, bufLen); -+ } -+ else -+ { -+ // need search for the token, if exist with same size overwrite it. if sizes differ, -+ // move over the later token data over and put the new one at the end -+ char *endPtr = pBuf + pHead->SPUsedLen; -+ char *spEndPtr = pBuf + SP_MAX_LEN; -+ curPtr = pBuf + sizeof(SP_HEADER); -+ while (curPtr < endPtr && curPtr < spEndPtr) -+ { -+ pToken = (PSP_TOKEN) curPtr; -+ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) -+ { -+ if (pToken->tokenLen == bufLen) // overwirte it -+ { -+ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); -+ break; -+ } -+ else // move later data over and put the new token at the end -+ { -+ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); // ~~~ -+ break; -+ } -+ } -+ else // not same token ~~~ -+ { -+ } -+ // get next token -+ curPtr += sizeof(SP_TOKEN) + pToken->tokenLen; -+ } // end while -+ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; // ~~~ -+ if (SPHead.SPUsedLen > SP_MAX_LEN) -+ { -+ printk("No more Scratch pad space left! Over limit by %d bytes\n", SPHead.SPUsedLen - SP_MAX_LEN); -+ return sts; -+ } -+ -+ } // else if not new sp -+ -+ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf); -+ -+ retriedKfree(pShareBuf); -+ -+ return sts; -+ -+ -+} -+ -+int kerSysFlashSizeGet(void) -+{ -+ return flash_get_total_size(); -+} -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,582 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/*************************************************************************** -+ * File Name : bcm63xx_led.c -+ * -+ * Description: -+ * -+ * This file contains bcm963xx board led control API functions. -+ * -+ * To use it, do the following -+ * -+ * 1). define in the board.c the following led mappping (this is for 6345GW board): -+ * const LED_MAP_PAIR cLedMapping45GW[] = -+ * { // led name Initial state physical pin (ledMask) -+ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, -+ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, -+ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 -+ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, -+ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, -+ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. -+ * -+ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping -+ * pointer from the above struct -+ * -+ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); -+ * -+ * 3). Sample call for kernel mode: -+ * -+ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h -+ * -+ * 4). Sample call for user mode -+ * -+ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h -+ * -+ * -+ * Created on : 10/28/2002 seanl -+ * -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include <linux/init.h> -+#include <linux/fs.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <linux/netdevice.h> -+#include <asm/uaccess.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+ -+#define k100ms (HZ / 10) // ~100 ms -+#define kFastBlinkCount 0 // ~100ms -+#define kSlowBlinkCount 5 // ~600ms -+ -+#define MAX_VIRT_LEDS 12 -+ -+// uncomment // for debug led -+//#define DEBUG_LED -+ -+// global variables: -+struct timer_list gLedTimer; -+int gTimerOn = FALSE; -+int gLedCount = 0; -+ -+typedef struct ledinfo -+{ -+ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 -+ unsigned short ledActiveLow; // GPIO bit reset to turn on LED -+ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 -+ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED -+ BOARD_LED_STATE ledState; // current led state -+ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState -+ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. -+} LED_INFO, *PLED_INFO; -+ -+static PLED_INFO gLed = NULL; -+static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; -+static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; -+static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; -+ -+#if 0 /* BROKEN */ -+#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+static int gLedOffInBridgeMode = 1; -+#elif defined(CONFIG_BCM96345) -+static int gLedOffInBridgeMode = 0; -+#endif -+#endif -+ -+void ledTimerExpire(void); -+int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); -+ -+//************************************************************************************** -+// LED operations -+//************************************************************************************** -+ -+// turn led on and set the ledState -+void ledOn(PLED_INFO pLed) -+{ -+ if( pLed->ledMask ) -+ { -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLow ) -+ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led -+ else -+ GPIO->GPIOio |= pLed->ledMask; // turn on the led -+ pLed->ledState = pLed->savedLedState = kLedStateOn; -+ } -+} -+ -+ -+// turn led off and set the ledState -+void ledOff(PLED_INFO pLed) -+{ -+ if( pLed->ledMask ) -+ { -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLow ) -+ GPIO->GPIOio |= pLed->ledMask; // turn off the led -+ else -+ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led -+ pLed->ledState = pLed->savedLedState = kLedStateOff; -+ } -+} -+ -+// turn led on and set the ledState -+void ledOnFail(PLED_INFO pLed) -+{ -+ if( pLed->ledMaskFail ) -+ { -+ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLowFail ) -+ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led -+ else -+ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led -+ pLed->ledState = pLed->savedLedState = kLedStateFail; -+ } -+} -+ -+ -+// turn led off and set the ledState -+void ledOffFail(PLED_INFO pLed) -+{ -+ if( pLed->ledMaskFail ) -+ { -+ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLowFail ) -+ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led -+ else -+ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led -+ pLed->ledState = pLed->savedLedState = kLedStateOff; -+ } -+} -+ -+ -+// toggle the led and return the current ledState -+BOARD_LED_STATE ledToggle(PLED_INFO pLed) -+{ -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if (GPIO->GPIOio & pLed->ledMask) -+ { -+ GPIO->GPIOio &= ~(pLed->ledMask); -+ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); -+ } -+ else -+ { -+ GPIO->GPIOio |= pLed->ledMask; -+ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); -+ } -+} -+ -+ -+// led timer. Will return if timer is already on -+void ledTimerStart(void) -+{ -+ if (gTimerOn) -+ return; -+ -+#if defined(DEBUG_LED) -+ printk("led: add_timer\n"); -+#endif -+ -+ init_timer(&gLedTimer); -+ gLedTimer.function = (void*)ledTimerExpire; -+ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms -+ add_timer (&gLedTimer); -+ gTimerOn = TRUE; -+} -+ -+ -+// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and -+// restart the timer according to ledState -+void ledTimerExpire(void) -+{ -+ int i; -+ PLED_INFO pCurLed; -+ -+ gTimerOn = FALSE; -+ -+ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) -+ { -+#if defined(DEBUG_LED) -+ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); -+#endif -+ switch (pCurLed->ledState) -+ { -+ case kLedStateOn: -+ case kLedStateOff: -+ case kLedStateFail: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ break; -+ -+ case kLedStateBlinkOnce: -+ ledToggle(pCurLed); -+ pCurLed->blinkCountDown = 0; // reset to 0 -+ pCurLed->ledState = pCurLed->savedLedState; -+ if (pCurLed->ledState == kLedStateSlowBlinkContinues || -+ pCurLed->ledState == kLedStateFastBlinkContinues) -+ ledTimerStart(); // start timer if in blinkContinues stats -+ break; -+ -+ case kLedStateSlowBlinkContinues: -+ if (pCurLed->blinkCountDown-- == 0) -+ { -+ pCurLed->blinkCountDown = kSlowBlinkCount; -+ ledToggle(pCurLed); -+ } -+ ledTimerStart(); -+ break; -+ -+ case kLedStateFastBlinkContinues: -+ if (pCurLed->blinkCountDown-- == 0) -+ { -+ pCurLed->blinkCountDown = kFastBlinkCount; -+ ledToggle(pCurLed); -+ } -+ ledTimerStart(); -+ break; -+ -+ default: -+ printk("Invalid state = %d\n", pCurLed->ledState); -+ } -+ } -+} -+ -+// initialize the gLedCount and allocate and fill gLed struct -+void __init boardLedInit(PLED_MAP_PAIR cLedMapping) -+{ -+ PLED_MAP_PAIR p1, p2; -+ PLED_INFO pCurLed; -+ int needTimer = FALSE; -+ int alreadyUsed = 0; -+ -+#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ -+ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; -+ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; -+#endif -+ -+ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); -+ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); -+ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); -+ -+ gLedCount = 0; -+ -+ // Check for multiple LED names and multiple LED GPIO pins that share the -+ // same physical board LED. -+ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) -+ { -+ alreadyUsed = 0; -+ for( p2 = cLedMapping; p2 != p1; p2++ ) -+ { -+ if( (p1->ledMask && p1->ledMask == p2->ledMask) || -+ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) -+ { -+ alreadyUsed = 1; -+ break; -+ } -+ } -+ -+ if( alreadyUsed == 0 ) -+ gLedCount++; -+ } -+ -+ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); -+ if( gLed == NULL ) -+ { -+ printk( "LED memory allocation error.\n" ); -+ return; -+ } -+ -+ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); -+ -+ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led -+ // (ledMask) the first defined led's ledInitState will be used. -+ pCurLed = gLed; -+ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) -+ { -+ if( (int) p1->ledName > MAX_VIRT_LEDS ) -+ continue; -+ -+ alreadyUsed = 0; -+ for( p2 = cLedMapping; p2 != p1; p2++ ) -+ { -+ if( (p1->ledMask && p1->ledMask == p2->ledMask) || -+ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) -+ { -+ alreadyUsed = 1; -+ break; -+ } -+ } -+ -+ if( alreadyUsed == 0 ) -+ { -+ // Initialize the board LED for the first time. -+ needTimer = initLedInfo( p1, pCurLed ); -+ gpVirtLeds[(int) p1->ledName] = pCurLed; -+ pCurLed++; -+ } -+ else -+ { -+ PLED_INFO pLed; -+ for( pLed = gLed; pLed != pCurLed; pLed++ ) -+ { -+ // Find the LED_INFO structure that has already been initialized. -+ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || -+ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) -+ { -+ // The board LED has already been initialized but possibly -+ // not completely initialized. -+ if( p1->ledMask ) -+ { -+ pLed->ledMask = p1->ledMask; -+ pLed->ledActiveLow = p1->ledActiveLow; -+ } -+ if( p1->ledMaskFail ) -+ { -+ pLed->ledMaskFail = p1->ledMaskFail; -+ pLed->ledActiveLowFail = p1->ledActiveLowFail; -+ } -+ gpVirtLeds[(int) p1->ledName] = pLed; -+ break; -+ } -+ } -+ } -+ } -+ -+ if (needTimer) -+ ledTimerStart(); -+ -+#if defined(DEBUG_LED) -+ int i; -+ for (i=0; i < gLedCount; i++) -+ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); -+#endif -+ -+} -+ -+// Initialize a structure that contains information about a physical board LED -+// control. The board LED may contain more than one GPIO pin to control a -+// normal condition (green) or a failure condition (red). -+int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) -+{ -+ int needTimer = FALSE; -+ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; -+ pCurLed->ledMask = pCurMap->ledMask; -+ pCurLed->ledActiveLow = pCurMap->ledActiveLow; -+ pCurLed->ledMaskFail = pCurMap->ledMaskFail; -+ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; -+ -+ switch (pCurLed->ledState) -+ { -+ case kLedStateOn: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOn(pCurLed); -+ break; -+ case kLedStateOff: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOff(pCurLed); -+ break; -+ case kLedStateFail: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOnFail(pCurLed); -+ break; -+ case kLedStateBlinkOnce: -+ pCurLed->blinkCountDown = 1; -+ needTimer = TRUE; -+ break; -+ case kLedStateSlowBlinkContinues: -+ pCurLed->blinkCountDown = kSlowBlinkCount; -+ needTimer = TRUE; -+ break; -+ case kLedStateFastBlinkContinues: -+ pCurLed->blinkCountDown = kFastBlinkCount; -+ needTimer = TRUE; -+ break; -+ default: -+ printk("Invalid state = %d\n", pCurLed->ledState); -+ } -+ -+ return( needTimer ); -+} -+ -+#if 0 /* BROKEN */ -+// Determines if there is at least one interface in bridge mode. Bridge mode -+// is determined by the cfm convention of naming bridge interfaces nas17 -+// through nas24. -+static int isBridgedProtocol(void) -+{ -+ extern int dev_get(const char *name); -+ const int firstBridgeId = 17; -+ const int lastBridgeId = 24; -+ int i; -+ int ret = FALSE; -+ char name[16]; -+ -+ for( i = firstBridgeId; i <= lastBridgeId; i++ ) -+ { -+ sprintf( name, "nas%d", i ); -+ -+ if( dev_get(name) ) -+ { -+ ret = TRUE; -+ break; -+ } -+ } -+ -+ return(ret); -+} -+#endif -+ -+// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation -+void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) -+{ -+ PLED_INFO ledInfoPtr; -+ -+ // do the mapping from virtual to physical led -+ if( (int) ledName < MAX_VIRT_LEDS ) -+ ledInfoPtr = gpVirtLeds[(int) ledName]; -+ else -+ ledInfoPtr = NULL; -+ -+ if (ledInfoPtr == NULL) -+ return; -+ -+ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) -+ { -+ (*gLedHwFunc[(int) ledName]) (ledName, ledState); -+ ledOffFail(ledInfoPtr); -+ return; -+ } -+ else -+ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) -+ { -+ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); -+ ledOff(ledInfoPtr); -+ return; -+ } -+ -+#if 0 /* BROKEN */ -+ // Do not blink the WAN Data LED if at least one interface is in bridge mode. -+ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) -+ { -+ static int BridgedProtocol = -1; -+ -+ if( BridgedProtocol == -1 ) -+ BridgedProtocol = isBridgedProtocol(); -+ -+ if( BridgedProtocol == TRUE ) -+ return; -+ } -+#endif -+ -+ // If the state is kLedStateFail and there is not a failure LED defined -+ // in the board parameters, change the state to kLedStateFastBlinkContinues. -+ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) -+ ledState = kLedStateFastBlinkContinues; -+ -+ switch (ledState) -+ { -+ case kLedStateOn: -+ // First, turn off the complimentary (failure) LED GPIO. -+ if( ledInfoPtr->ledMaskFail ) -+ ledOffFail(ledInfoPtr); -+ else -+ if( gLedHwFailFunc[(int) ledName] ) -+ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn on the specified LED GPIO. -+ ledOn(ledInfoPtr); -+ break; -+ -+ case kLedStateOff: -+ // First, turn off the complimentary (failure) LED GPIO. -+ if( ledInfoPtr->ledMaskFail ) -+ ledOffFail(ledInfoPtr); -+ else -+ if( gLedHwFailFunc[(int) ledName] ) -+ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn off the specified LED GPIO. -+ ledOff(ledInfoPtr); -+ break; -+ -+ case kLedStateFail: -+ // First, turn off the complimentary (normal) LED GPIO. -+ if( ledInfoPtr->ledMask ) -+ ledOff(ledInfoPtr); -+ else -+ if( gLedHwFunc[(int) ledName] ) -+ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn on (red) the specified LED GPIO. -+ ledOnFail(ledInfoPtr); -+ break; -+ -+ case kLedStateBlinkOnce: -+ // skip blinkOnce if it is already in Slow/Fast blink continues state -+ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || -+ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) -+ ; -+ else -+ { -+ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 -+ { -+ ledToggle(ledInfoPtr); -+ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires -+ ledInfoPtr->ledState = kLedStateBlinkOnce; -+ ledTimerStart(); -+ } -+ } -+ break; -+ -+ case kLedStateSlowBlinkContinues: -+ ledInfoPtr->blinkCountDown = kSlowBlinkCount; -+ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; -+ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; -+ ledTimerStart(); -+ break; -+ -+ case kLedStateFastBlinkContinues: -+ ledInfoPtr->blinkCountDown = kFastBlinkCount; -+ ledInfoPtr->ledState = kLedStateFastBlinkContinues; -+ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; -+ ledTimerStart(); -+ break; -+ -+ default: -+ printk("Invalid led state\n"); -+ } -+} -+ -+// This function is called for an LED that is controlled by hardware. -+void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, -+ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) -+{ -+ if( (int) ledName < MAX_VIRT_LEDS ) -+ { -+ if( ledFailType == 1 ) -+ gLedHwFailFunc[(int) ledName] = ledHwFunc; -+ else -+ gLedHwFunc[(int) ledName] = ledHwFunc; -+ } -+} -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c 2006-07-25 10:59:34.000000000 +0200 -@@ -0,0 +1,1619 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/*************************************************************************** -+ * File Name : board.c -+ * -+ * Description: This file contains Linux character device driver entry -+ * for the board related ioctl calls: flash, get free kernel -+ * page and dump kernel memory, etc. -+ * -+ * Created on : 2/20/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) -+ * -+ ***************************************************************************/ -+ -+ -+/* Includes. */ -+#include <linux/version.h> -+#include <linux/init.h> -+#include <linux/fs.h> -+#include <linux/interrupt.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <linux/pagemap.h> -+#include <asm/uaccess.h> -+#include <linux/wait.h> -+#include <linux/poll.h> -+#include <linux/sched.h> -+#include <linux/list.h> -+#include <linux/if.h> -+#include <linux/spinlock.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#include <bcmTag.h> -+#include "boardparms.h" -+#include "cfiflash.h" -+#include "bcm_intr.h" -+#include "board.h" -+#include "bcm_map_part.h" -+ -+static DEFINE_SPINLOCK(board_lock); -+ -+/* Typedefs. */ -+#if defined (NON_CONSECUTIVE_MAC) -+// used to be the last octet. Now changed to the first 5 bits of the the forth octet -+// to reduced the duplicated MAC addresses. -+#define CHANGED_OCTET 3 -+#define SHIFT_BITS 3 -+#else -+#define CHANGED_OCTET 1 -+#define SHIFT_BITS 0 -+#endif -+ -+#if defined (WIRELESS) -+#define SES_BTN_PRESSED 0x00000001 -+#define SES_EVENTS SES_BTN_PRESSED /*OR all values if any*/ -+#define SES_LED_OFF 0 -+#define SES_LED_ON 1 -+#define SES_LED_BLINK 2 -+#endif -+ -+typedef struct -+{ -+ unsigned long ulId; -+ char chInUse; -+ char chReserved[3]; -+} MAC_ADDR_INFO, *PMAC_ADDR_INFO; -+ -+typedef struct -+{ -+ unsigned long ulSdramSize; -+ unsigned long ulPsiSize; -+ unsigned long ulNumMacAddrs; -+ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ MAC_ADDR_INFO MacAddrs[1]; -+} NVRAM_INFO, *PNVRAM_INFO; -+ -+typedef struct -+{ -+ unsigned long eventmask; -+} BOARD_IOC, *PBOARD_IOC; -+ -+ -+/*Dyinggasp callback*/ -+typedef void (*cb_dgasp_t)(void *arg); -+typedef struct _CB_DGASP__LIST -+{ -+ struct list_head list; -+ char name[IFNAMSIZ]; -+ cb_dgasp_t cb_dgasp_fn; -+ void *context; -+}CB_DGASP_LIST , *PCB_DGASP_LIST; -+ -+ -+static LED_MAP_PAIR LedMapping[] = -+{ // led name Initial state physical pin (ledMask) -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. -+}; -+ -+/* Externs. */ -+extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); -+extern unsigned int nr_free_pages (void); -+extern const char *get_system_type(void); -+extern void kerSysFlashInit(void); -+extern unsigned long get_nvram_start_addr(void); -+extern unsigned long get_scratch_pad_start_addr(void); -+extern unsigned long getMemorySize(void); -+extern void __init boardLedInit(PLED_MAP_PAIR); -+extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); -+extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, -+ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); -+ -+/* Prototypes. */ -+void __init InitNvramInfo( void ); -+static int board_open( struct inode *inode, struct file *filp ); -+static int board_ioctl( struct inode *inode, struct file *flip, unsigned int command, unsigned long arg ); -+static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos); -+static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait); -+static int board_release(struct inode *inode, struct file *filp); -+ -+static BOARD_IOC* borad_ioc_alloc(void); -+static void borad_ioc_free(BOARD_IOC* board_ioc); -+ -+/* DyingGasp function prototype */ -+static void __init kerSysDyingGaspMapIntr(void); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); -+#else -+static unsigned int kerSysDyingGaspIsr(void); -+#endif -+static void __init kerSysInitDyingGaspHandler( void ); -+static void __exit kerSysDeinitDyingGaspHandler( void ); -+/* -DyingGasp function prototype - */ -+ -+ -+#if defined (WIRELESS) -+static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs); -+static void __init sesBtn_mapGpio(void); -+static void __init sesBtn_mapIntr(int context); -+static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait); -+static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos); -+static void __init sesLed_mapGpio(void); -+static void sesLed_ctrl(int action); -+static void __init ses_board_init(void); -+static void __exit ses_board_deinit(void); -+#endif -+ -+static PNVRAM_INFO g_pNvramInfo = NULL; -+static int g_ledInitialized = 0; -+static wait_queue_head_t g_board_wait_queue; -+static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; -+ -+static int g_wakeup_monitor = 0; -+static struct file *g_monitor_file = NULL; -+static struct task_struct *g_monitor_task = NULL; -+static unsigned int (*g_orig_fop_poll) -+ (struct file *, struct poll_table_struct *) = NULL; -+ -+static struct file_operations board_fops = -+{ -+ open: board_open, -+ ioctl: board_ioctl, -+ poll: board_poll, -+ read: board_read, -+ release: board_release, -+}; -+ -+uint32 board_major = 0; -+ -+#if defined (WIRELESS) -+static unsigned short sesBtn_irq = BP_NOT_DEFINED; -+static unsigned short sesBtn_gpio = BP_NOT_DEFINED; -+static unsigned short sesLed_gpio = BP_NOT_DEFINED; -+#endif -+ -+#if defined(MODULE) -+int init_module(void) -+{ -+ return( brcm_board_init() ); -+} -+ -+void cleanup_module(void) -+{ -+ if (MOD_IN_USE) -+ printk("brcm flash: cleanup_module failed because module is in use\n"); -+ else -+ brcm_board_cleanup(); -+} -+#endif //MODULE -+ -+ -+ -+static int __init brcm_board_init( void ) -+{ -+ typedef int (*BP_LED_FUNC) (unsigned short *); -+ static struct BpLedInformation -+ { -+ BOARD_LED_NAME ledName; -+ BP_LED_FUNC bpFunc; -+ BP_LED_FUNC bpFuncFail; -+ } bpLedInfo[] = -+ {{kLedAdsl, BpGetAdslLedGpio, BpGetAdslFailLedGpio}, -+ {kLedWireless, BpGetWirelessLedGpio, NULL}, -+ {kLedUsb, BpGetUsbLedGpio, NULL}, -+ {kLedHpna, BpGetHpnaLedGpio, NULL}, -+ {kLedWanData, BpGetWanDataLedGpio, NULL}, -+ {kLedPPP, BpGetPppLedGpio, BpGetPppFailLedGpio}, -+ {kLedVoip, BpGetVoipLedGpio, NULL}, -+ {kLedSes, BpGetWirelessSesLedGpio, NULL}, -+ {kLedEnd, NULL, NULL} -+ }; -+ -+ int ret; -+ -+ ret = register_chrdev(BOARD_DRV_MAJOR, "bcrmboard", &board_fops ); -+ if (ret < 0) -+ printk( "brcm_board_init(major %d): fail to register device.\n",BOARD_DRV_MAJOR); -+ else -+ { -+ PLED_MAP_PAIR pLedMap = LedMapping; -+ unsigned short gpio; -+ struct BpLedInformation *pInfo; -+ -+ printk("brcmboard: brcm_board_init entry\n"); -+ board_major = BOARD_DRV_MAJOR; -+ InitNvramInfo(); -+ -+ for( pInfo = bpLedInfo; pInfo->ledName != kLedEnd; pInfo++ ) -+ { -+ if( pInfo->bpFunc && (*pInfo->bpFunc) (&gpio) == BP_SUCCESS ) -+ { -+ pLedMap->ledName = pInfo->ledName; -+ pLedMap->ledMask = GPIO_NUM_TO_MASK(gpio); -+ pLedMap->ledActiveLow = (gpio & BP_ACTIVE_LOW) ? 1 : 0; -+ } -+ if( pInfo->bpFuncFail && (*pInfo->bpFuncFail) (&gpio) == BP_SUCCESS ) -+ { -+ pLedMap->ledName = pInfo->ledName; -+ pLedMap->ledMaskFail = GPIO_NUM_TO_MASK(gpio); -+ pLedMap->ledActiveLowFail = (gpio & BP_ACTIVE_LOW) ? 1 : 0; -+ } -+ if( pLedMap->ledName != kLedEnd ) -+ pLedMap++; -+ } -+ -+ init_waitqueue_head(&g_board_wait_queue); -+#if defined (WIRELESS) -+ ses_board_init(); -+#endif -+ kerSysInitDyingGaspHandler(); -+ kerSysDyingGaspMapIntr(); -+ -+ boardLedInit(LedMapping); -+ g_ledInitialized = 1; -+ } -+ -+ return ret; -+} -+ -+void __init InitNvramInfo( void ) -+{ -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ unsigned long ulNumMacAddrs = pNvramData->ulNumMacAddrs; -+ -+ if( ulNumMacAddrs > 0 && ulNumMacAddrs <= NVRAM_MAC_COUNT_MAX ) -+ { -+ unsigned long ulNvramInfoSize = -+ sizeof(NVRAM_INFO) + ((sizeof(MAC_ADDR_INFO) - 1) * ulNumMacAddrs); -+ -+ g_pNvramInfo = (PNVRAM_INFO) kmalloc( ulNvramInfoSize, GFP_KERNEL ); -+ -+ if( g_pNvramInfo ) -+ { -+ unsigned long ulPsiSize; -+ if( BpGetPsiSize( &ulPsiSize ) != BP_SUCCESS ) -+ ulPsiSize = NVRAM_PSI_DEFAULT; -+ memset( g_pNvramInfo, 0x00, ulNvramInfoSize ); -+ g_pNvramInfo->ulPsiSize = ulPsiSize * 1024; -+ g_pNvramInfo->ulNumMacAddrs = pNvramData->ulNumMacAddrs; -+ memcpy( g_pNvramInfo->ucaBaseMacAddr, pNvramData->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ g_pNvramInfo->ulSdramSize = getMemorySize(); -+ } -+ else -+ printk("ERROR - Could not allocate memory for NVRAM data\n"); -+ } -+ else -+ printk("ERROR - Invalid number of MAC addresses (%ld) is configured.\n", -+ ulNumMacAddrs); -+} -+ -+void __exit brcm_board_cleanup( void ) -+{ -+ printk("brcm_board_cleanup()\n"); -+ -+ if (board_major != -1) -+ { -+#if defined (WIRELESS) -+ ses_board_deinit(); -+#endif -+ kerSysDeinitDyingGaspHandler(); -+ unregister_chrdev(board_major, "board_ioctl"); -+ } -+} -+ -+static BOARD_IOC* borad_ioc_alloc(void) -+{ -+ BOARD_IOC *board_ioc =NULL; -+ board_ioc = (BOARD_IOC*) kmalloc( sizeof(BOARD_IOC) , GFP_KERNEL ); -+ if(board_ioc) -+ { -+ memset(board_ioc, 0, sizeof(BOARD_IOC)); -+ } -+ return board_ioc; -+} -+ -+static void borad_ioc_free(BOARD_IOC* board_ioc) -+{ -+ if(board_ioc) -+ { -+ kfree(board_ioc); -+ } -+} -+ -+ -+static int board_open( struct inode *inode, struct file *filp ) -+{ -+ filp->private_data = borad_ioc_alloc(); -+ -+ if (filp->private_data == NULL) -+ return -ENOMEM; -+ -+ return( 0 ); -+} -+ -+static int board_release(struct inode *inode, struct file *filp) -+{ -+ BOARD_IOC *board_ioc = filp->private_data; -+ -+ wait_event_interruptible(g_board_wait_queue, 1); -+ borad_ioc_free(board_ioc); -+ -+ return( 0 ); -+} -+ -+ -+static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait) -+{ -+ unsigned int mask = 0; -+#if defined (WIRELESS) -+ BOARD_IOC *board_ioc = filp->private_data; -+#endif -+ -+ poll_wait(filp, &g_board_wait_queue, wait); -+#if defined (WIRELESS) -+ if(board_ioc->eventmask & SES_EVENTS){ -+ mask |= sesBtn_poll(filp, wait); -+ } -+#endif -+ -+ return mask; -+} -+ -+ -+static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) -+{ -+#if defined (WIRELESS) -+ BOARD_IOC *board_ioc = filp->private_data; -+ if(board_ioc->eventmask & SES_EVENTS){ -+ return sesBtn_read(filp, buffer, count, ppos); -+ } -+#endif -+ return 0; -+} -+ -+//************************************************************************************** -+// Utitlities for dump memory, free kernel pages, mips soft reset, etc. -+//************************************************************************************** -+ -+/*********************************************************************** -+ * Function Name: dumpaddr -+ * Description : Display a hex dump of the specified address. -+ ***********************************************************************/ -+void dumpaddr( unsigned char *pAddr, int nLen ) -+{ -+ static char szHexChars[] = "0123456789abcdef"; -+ char szLine[80]; -+ char *p = szLine; -+ unsigned char ch, *q; -+ int i, j; -+ unsigned long ul; -+ -+ while( nLen > 0 ) -+ { -+ sprintf( szLine, "%8.8lx: ", (unsigned long) pAddr ); -+ p = szLine + strlen(szLine); -+ -+ for(i = 0; i < 16 && nLen > 0; i += sizeof(long), nLen -= sizeof(long)) -+ { -+ ul = *(unsigned long *) &pAddr[i]; -+ q = (unsigned char *) &ul; -+ for( j = 0; j < sizeof(long); j++ ) -+ { -+ *p++ = szHexChars[q[j] >> 4]; -+ *p++ = szHexChars[q[j] & 0x0f]; -+ *p++ = ' '; -+ } -+ } -+ -+ for( j = 0; j < 16 - i; j++ ) -+ *p++ = ' ', *p++ = ' ', *p++ = ' '; -+ -+ *p++ = ' ', *p++ = ' ', *p++ = ' '; -+ -+ for( j = 0; j < i; j++ ) -+ { -+ ch = pAddr[j]; -+ *p++ = (ch > ' ' && ch < '~') ? ch : '.'; -+ } -+ -+ *p++ = '\0'; -+ printk( "%s\r\n", szLine ); -+ -+ pAddr += i; -+ } -+ printk( "\r\n" ); -+} /* dumpaddr */ -+ -+ -+void kerSysMipsSoftReset(void) -+{ -+#if defined(CONFIG_BCM96348) -+ if (PERF->RevID == 0x634800A1) { -+ typedef void (*FNPTR) (void); -+ FNPTR bootaddr = (FNPTR) FLASH_BASE; -+ int i; -+ -+ /* Disable interrupts. */ -+ //cli(); -+ spin_lock_irq(&board_lock); -+ -+ /* Reset all blocks. */ -+ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; -+ for( i = 0; i < 1000000; i++ ) -+ ; -+ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; -+ /* Jump to the power on address. */ -+ (*bootaddr) (); -+ } -+ else -+ PERF->pll_control |= SOFT_RESET; // soft reset mips -+#else -+ PERF->pll_control |= SOFT_RESET; // soft reset mips -+#endif -+} -+ -+ -+int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) -+{ -+ int nRet = 0; -+ PMAC_ADDR_INFO pMai = NULL; -+ PMAC_ADDR_INFO pMaiFreeNoId = NULL; -+ PMAC_ADDR_INFO pMaiFreeId = NULL; -+ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; -+ -+ for( i = 0, pMai = g_pNvramInfo->MacAddrs; i < g_pNvramInfo->ulNumMacAddrs; -+ i++, pMai++ ) -+ { -+ if( ulId == pMai->ulId || ulId == MAC_ADDRESS_ANY ) -+ { -+ /* This MAC address has been used by the caller in the past. */ -+ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ shiftedIdx = i; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMai->chInUse = 1; -+ pMaiFreeNoId = pMaiFreeId = NULL; -+ break; -+ } -+ else -+ if( pMai->chInUse == 0 ) -+ { -+ if( pMai->ulId == 0 && pMaiFreeNoId == NULL ) -+ { -+ /* This is an available MAC address that has never been -+ * used. -+ */ -+ pMaiFreeNoId = pMai; -+ ulIdxNoId = i; -+ } -+ else -+ if( pMai->ulId != 0 && pMaiFreeId == NULL ) -+ { -+ /* This is an available MAC address that has been used -+ * before. Use addresses that have never been used -+ * first, before using this one. -+ */ -+ pMaiFreeId = pMai; -+ ulIdxId = i; -+ } -+ } -+ } -+ -+ if( pMaiFreeNoId || pMaiFreeId ) -+ { -+ /* An available MAC address was found. */ -+ memcpy(pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr,NVRAM_MAC_ADDRESS_LEN); -+ if( pMaiFreeNoId ) -+ { -+ shiftedIdx = ulIdxNoId; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMaiFreeNoId->ulId = ulId; -+ pMaiFreeNoId->chInUse = 1; -+ } -+ else -+ { -+ shiftedIdx = ulIdxId; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMaiFreeId->ulId = ulId; -+ pMaiFreeId->chInUse = 1; -+ } -+ } -+ else -+ if( i == g_pNvramInfo->ulNumMacAddrs ) -+ nRet = -EADDRNOTAVAIL; -+ -+ return( nRet ); -+} /* kerSysGetMacAddr */ -+ -+int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) -+{ -+ int nRet = -EINVAL; -+ unsigned long ulIdx = 0; -+ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - -+ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); -+ -+ // if overflow 255 (negitive), add 256 to have the correct index -+ if (idx < 0) -+ idx += 256; -+ ulIdx = (unsigned long) (idx >> SHIFT_BITS); -+ -+ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) -+ { -+ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; -+ if( pMai->chInUse == 1 ) -+ { -+ pMai->chInUse = 0; -+ nRet = 0; -+ } -+ } -+ -+ return( nRet ); -+} /* kerSysReleaseMacAddr */ -+ -+int kerSysGetSdramSize( void ) -+{ -+ return( (int) g_pNvramInfo->ulSdramSize ); -+} /* kerSysGetSdramSize */ -+ -+ -+void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) -+{ -+ if (g_ledInitialized) -+ boardLedCtrl(ledName, ledState); -+} -+ -+unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) -+{ -+ int mask = (*g_orig_fop_poll) (f, t); -+ -+ if( g_wakeup_monitor == 1 && g_monitor_file == f ) -+ { -+ /* If g_wakeup_monitor is non-0, the user mode application needs to -+ * return from a blocking select function. Return POLLPRI which will -+ * cause the select to return with the exception descriptor set. -+ */ -+ mask |= POLLPRI; -+ g_wakeup_monitor = 0; -+ } -+ -+ return( mask ); -+} -+ -+/* Put the user mode application that monitors link state on a run queue. */ -+void kerSysWakeupMonitorTask( void ) -+{ -+ g_wakeup_monitor = 1; -+ if( g_monitor_task ) -+ wake_up_process( g_monitor_task ); -+} -+ -+//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 -+int kerSysGetResetHold(void) -+{ -+ unsigned short gpio; -+ -+ if( BpGetPressAndHoldResetGpio( &gpio ) == BP_SUCCESS ) -+ { -+#if defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ //printk("gpio=%04x,gpio_mask=%04x,gpio_reg=%04x\n",gpio,gpio_mask,*gpio_reg); -+ if(*gpio_reg & gpio_mask) //press down -+ return RESET_BUTTON_UP; -+ } -+ return RESET_BUTTON_PRESSDOWN; -+} -+//<<JUNHON, 2004/09/15 -+ -+//******************************************************************************************** -+// misc. ioctl calls come to here. (flash, led, reset, kernel memory access, etc.) -+//******************************************************************************************** -+static int board_ioctl( struct inode *inode, struct file *flip, -+ unsigned int command, unsigned long arg ) -+{ -+ int ret = 0; -+ BOARD_IOCTL_PARMS ctrlParms; -+ unsigned char ucaMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ int allowedSize; -+ -+ switch (command) -+ { -+ case BOARD_IOCTL_FLASH_INIT: -+ // not used for now. kerSysBcmImageInit(); -+ break; -+ -+ -+ case BOARD_IOCTL_FLASH_WRITE: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ NVRAM_DATA SaveNvramData; -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ -+ switch (ctrlParms.action) -+ { -+ case SCRATCH_PAD: -+ ret = kerSysScratchPadSet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); -+ break; -+ -+ case PERSISTENT: -+ ret = kerSysPersistentSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case NVRAM: -+ ret = kerSysNvRamSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ ++ if (boot_loader_type == BOOT_CFE) ++ if (boot_loader_type == BOOT_CFE) ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { + case BCM_IMAGE_CFE: -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > FLASH45_LENGTH_BOOT_ROM ) -+ { ++ if (boot_loader_type == BOOT_CFE) { + printk("Illegal CFE size [%d]. Size allowed: [%d]\n", -+ ctrlParms.strLen, FLASH45_LENGTH_BOOT_ROM); -+ ret = -1; -+ break; -+ } -+ -+ // save NVRAM data into a local structure -+ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); -+ -+ // set memory type field -+ BpGetSdramSize( (unsigned long *) &ctrlParms.string[SDRAM_TYPE_ADDRESS_OFFSET] ); -+ -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ -+ // if nvram is not valid, restore the current nvram settings -+ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && -+ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) -+ { -+ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); -+ } -+ break; -+ -+ case BCM_IMAGE_FS: -+ allowedSize = (int) flash_get_total_size() - \ -+ FLASH_RESERVED_AT_END - TAG_LEN - FLASH45_LENGTH_BOOT_ROM; -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize) -+ { -+ printk("Illegal root file system size [%d]. Size allowed: [%d]\n", -+ ctrlParms.strLen, allowedSize); -+ ret = -1; -+ break; -+ } -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ kerSysMipsSoftReset(); -+ break; -+ -+ case BCM_IMAGE_KERNEL: // not used for now. -+ break; -+ case BCM_IMAGE_WHOLE: -+ if(ctrlParms.strLen <= 0) -+ { -+ printk("Illegal flash image size [%d].\n", ctrlParms.strLen); -+ ret = -1; -+ break; -+ } -+ -+ // save NVRAM data into a local structure -+ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); -+ -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ -+ // if nvram is not valid, restore the current nvram settings -+ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && -+ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) -+ { -+ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); -+ } -+ -+ kerSysMipsSoftReset(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ printk("flash_ioctl_command: invalid command %d\n", ctrlParms.action); -+ break; -+ } -+ ctrlParms.result = ret; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_FLASH_READ: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ switch (ctrlParms.action) -+ { -+ case SCRATCH_PAD: -+ ret = kerSysScratchPadGet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); -+ break; -+ -+ case PERSISTENT: -+ ret = kerSysPersistentGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case NVRAM: -+ ret = kerSysNvRamGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ break; -+ -+ case FLASH_SIZE: -+ ret = kerSysFlashSizeGet(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ printk("Not supported. invalid command %d\n", ctrlParms.action); -+ break; -+ } -+ ctrlParms.result = ret; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_NR_PAGES: -+ ctrlParms.result = nr_free_pages() + get_page_cache_size(); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_DUMP_ADDR: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ dumpaddr( (unsigned char *) ctrlParms.string, ctrlParms.strLen ); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_SET_MEMORY: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ unsigned long *pul = (unsigned long *) ctrlParms.string; -+ unsigned short *pus = (unsigned short *) ctrlParms.string; -+ unsigned char *puc = (unsigned char *) ctrlParms.string; -+ switch( ctrlParms.strLen ) -+ { -+ case 4: -+ *pul = (unsigned long) ctrlParms.offset; -+ break; -+ case 2: -+ *pus = (unsigned short) ctrlParms.offset; -+ break; -+ case 1: -+ *puc = (unsigned char) ctrlParms.offset; -+ break; -+ } -+ dumpaddr( (unsigned char *) ctrlParms.string, sizeof(long) ); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_MIPS_SOFT_RESET: -+ kerSysMipsSoftReset(); -+ break; -+ -+ case BOARD_IOCTL_LED_CTRL: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ kerSysLedCtrl((BOARD_LED_NAME)ctrlParms.strLen, (BOARD_LED_STATE)ctrlParms.offset); -+ ret = 0; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_ID: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, -+ sizeof(ctrlParms)) == 0) -+ { -+ if( ctrlParms.string ) -+ { -+ char *p = (char *) get_system_type(); -+ if( strlen(p) + 1 < ctrlParms.strLen ) -+ ctrlParms.strLen = strlen(p) + 1; -+ __copy_to_user(ctrlParms.string, p, ctrlParms.strLen); -+ } -+ -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ ctrlParms.result = kerSysGetMacAddress( ucaMacAddr, -+ ctrlParms.offset ); -+ -+ if( ctrlParms.result == 0 ) -+ { -+ __copy_to_user(ctrlParms.string, ucaMacAddr, -+ sizeof(ucaMacAddr)); -+ } -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_RELEASE_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ if (copy_from_user((void*)ucaMacAddr, (void*)ctrlParms.string, \ -+ NVRAM_MAC_ADDRESS_LEN) == 0) -+ { -+ ctrlParms.result = kerSysReleaseMacAddress( ucaMacAddr ); -+ } -+ else -+ { -+ ctrlParms.result = -EACCES; -+ } -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_PSI_SIZE: -+ ctrlParms.result = (int) g_pNvramInfo->ulPsiSize; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_SDRAM_SIZE: -+ ctrlParms.result = (int) g_pNvramInfo->ulSdramSize; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_BASE_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ __copy_to_user(ctrlParms.string, g_pNvramInfo->ucaBaseMacAddr, NVRAM_MAC_ADDRESS_LEN); -+ ctrlParms.result = 0; -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_CHIP_ID: -+ ctrlParms.result = (int) (PERF->RevID & 0xFFFF0000) >> 16; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_NUM_ENET: { -+ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; -+ int i, numeth = 0; -+ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { -+ for( i = 0; i < BP_MAX_ENET_MACS; i++) { -+ if (EnetInfos[i].ucPhyType != BP_ENET_NO_PHY) { -+ numeth++; -+ } -+ } -+ ctrlParms.result = numeth; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { ++ if (boot_loader_type == BOOT_CFE) { + case BOARD_IOCTL_GET_CFE_VER: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { + char *vertag = (char *)(FLASH_BASE + CFE_VERSION_OFFSET); + if (ctrlParms.strLen < CFE_VERSION_SIZE) { -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = -EFAULT; -+ } -+ else if (strncmp(vertag, "cfe-v", 5)) { // no tag info in flash -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ ctrlParms.result = 1; + __copy_to_user(ctrlParms.string, vertag+CFE_VERSION_MARK_SIZE, CFE_VERSION_SIZE); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_ENET_CFG: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; -+ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { -+ if (ctrlParms.strLen == sizeof(EnetInfos)) { -+ __copy_to_user(ctrlParms.string, EnetInfos, sizeof(EnetInfos)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 -+ case BOARD_IOCTL_GET_RESETHOLD: -+ ctrlParms.result = kerSysGetResetHold(); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+//>>JUNHON, 2004/09/15 -+ -+ -+#if defined (WIRELESS) -+ case BOARD_IOCTL_GET_WLAN_ANT_INUSE: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ unsigned short antInUse = 0; -+ if (BpGetWirelessAntInUse(&antInUse) == BP_SUCCESS) { -+ if (ctrlParms.strLen == sizeof(antInUse)) { -+ __copy_to_user(ctrlParms.string, &antInUse, sizeof(antInUse)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#endif -+ case BOARD_IOCTL_SET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ ctrlParms.result = -EFAULT; -+ ret = -EFAULT; -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ board_ioc->eventmask |= *((int*)ctrlParms.string); -+#if defined (WIRELESS) -+ if((board_ioc->eventmask & SES_EVENTS)) { -+ if(sesBtn_irq != BP_NOT_DEFINED) { -+ BcmHalInterruptEnable(sesBtn_irq); -+ ctrlParms.result = 0; -+ ret = 0; -+ } -+ } -+#endif -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ __copy_to_user(ctrlParms.string, &board_ioc->eventmask, sizeof(unsigned long)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_UNSET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ board_ioc->eventmask &= (~(*((int*)ctrlParms.string))); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#if defined (WIRELESS) -+ case BOARD_IOCTL_SET_SES_LED: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ if (ctrlParms.strLen == sizeof(int)) { -+ sesLed_ctrl(*(int*)ctrlParms.string); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#endif -+ -+ case BOARD_IOCTL_SET_MONITOR_FD: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ int fput_needed = 0; -+ -+ g_monitor_file = fget_light( ctrlParms.offset, &fput_needed ); -+ if( g_monitor_file ) { -+ /* Hook this file descriptor's poll function in order to set -+ * the exception descriptor when there is a change in link -+ * state. -+ */ -+ g_monitor_task = current; -+ g_orig_fop_poll = kerSysMonitorPollHook; -+ /*g_orig_fop_poll = g_monitor_file->f_op->poll; -+ g_monitor_file->f_op->poll = kerSysMonitorPollHook;*/ -+ } -+ } -+ break; -+ -+ case BOARD_IOCTL_WAKEUP_MONITOR_TASK: -+ kerSysWakeupMonitorTask(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ ctrlParms.result = 0; -+ printk("board_ioctl: invalid command %x, cmd %d .\n",command,_IOC_NR(command)); -+ break; -+ -+ } /* switch */ -+ -+ return (ret); -+ -+} /* board_ioctl */ -+ -+/*************************************************************************** -+ * SES Button ISR/GPIO/LED functions. -+ ***************************************************************************/ -+#if defined (WIRELESS) -+static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs) -+{ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if (!(*gpio_reg & gpio_mask)){ -+ wake_up_interruptible(&g_board_wait_queue); -+ return IRQ_RETVAL(1); -+ } else { -+ return IRQ_RETVAL(0); -+ } -+} -+ -+static void __init sesBtn_mapGpio() -+{ -+ if( BpGetWirelessSesBtnGpio(&sesBtn_gpio) == BP_SUCCESS ) -+ { -+ printk("SES: Button GPIO 0x%x is enabled\n", sesBtn_gpio); -+ } -+} -+ -+static void __init sesBtn_mapIntr(int context) -+{ -+ if( BpGetWirelessSesExtIntr(&sesBtn_irq) == BP_SUCCESS ) -+ { -+ printk("SES: Button Interrupt 0x%x is enabled\n", sesBtn_irq); -+ } -+ else -+ return; -+ -+ sesBtn_irq += INTERRUPT_ID_EXTERNAL_0; -+ -+ if (BcmHalMapInterrupt((FN_HANDLER)sesBtn_isr, context, sesBtn_irq)) { -+ printk("SES: Interrupt mapping failed\n"); -+ } -+ BcmHalInterruptEnable(sesBtn_irq); -+} -+ -+ -+static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait) -+{ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if (!(*gpio_reg & gpio_mask)){ -+ return POLLIN; -+ } -+ return 0; -+} -+ -+static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) -+{ -+ volatile unsigned int event=0; -+ ssize_t ret=0; -+ -+#if defined(_BCM96338_) || defined (CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined (CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if(*gpio_reg & gpio_mask){ -+ BcmHalInterruptEnable(sesBtn_irq); -+ return ret; -+ } -+ event = SES_EVENTS; -+ __copy_to_user((char*)buffer, (char*)&event, sizeof(event)); -+ BcmHalInterruptEnable(sesBtn_irq); -+ count -= sizeof(event); -+ buffer += sizeof(event); -+ ret += sizeof(event); -+ return ret; -+} -+ -+static void __init sesLed_mapGpio() -+{ -+ if( BpGetWirelessSesBtnGpio(&sesLed_gpio) == BP_SUCCESS ) -+ { -+ printk("SES: LED GPIO 0x%x is enabled\n", sesBtn_gpio); -+ } -+} -+ -+static void sesLed_ctrl(int action) -+{ -+ -+ //char status = ((action >> 8) & 0xff); /* extract status */ -+ //char event = ((action >> 16) & 0xff); /* extract event */ -+ //char blinktype = ((action >> 24) & 0xff); /* extract blink type for SES_LED_BLINK */ -+ -+ BOARD_LED_STATE led; -+ -+ if(sesLed_gpio == BP_NOT_DEFINED) -+ return; -+ -+ action &= 0xff; /* extract led */ -+ -+ //printk("blinktype=%d, event=%d, status=%d\n",(int)blinktype, (int)event, (int)status); -+ -+ switch (action) -+ { -+ case SES_LED_ON: -+ //printk("SES: led on\n"); -+ led = kLedStateOn; -+ break; -+ case SES_LED_BLINK: -+ //printk("SES: led blink\n"); -+ led = kLedStateSlowBlinkContinues; -+ break; -+ case SES_LED_OFF: -+ default: -+ //printk("SES: led off\n"); -+ led = kLedStateOff; -+ } -+ -+ kerSysLedCtrl(kLedSes, led); -+} -+ -+static void __init ses_board_init() -+{ -+ sesBtn_mapGpio(); -+ sesBtn_mapIntr(0); -+ sesLed_mapGpio(); -+} -+static void __exit ses_board_deinit() -+{ -+ if(sesBtn_irq) -+ BcmHalInterruptDisable(sesBtn_irq); -+} -+#endif -+ -+/*************************************************************************** -+ * Dying gasp ISR and functions. -+ ***************************************************************************/ -+#define KERSYS_DBG printk -+ -+#if defined(CONFIG_BCM96345) -+#define CYCLE_PER_US 70 -+#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+/* The BCM6348 cycles per microsecond is really variable since the BCM6348 -+ * MIPS speed can vary depending on the PLL settings. However, an appoximate -+ * value of 120 will still work OK for the test being done. -+ */ -+#define CYCLE_PER_US 120 -+#endif -+#define DG_GLITCH_TO (100*CYCLE_PER_US) -+ -+static void __init kerSysDyingGaspMapIntr() -+{ -+ unsigned long ulIntr; -+ -+#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) -+ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { -+ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); -+ BcmHalInterruptEnable( INTERRUPT_ID_DG ); -+ } -+#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) -+ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { -+ ulIntr += INTERRUPT_ID_EXTERNAL_0; -+ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); -+ BcmHalInterruptEnable( ulIntr ); -+ } -+#endif -+ -+} -+ -+void kerSysSetWdTimer(ulong timeUs) -+{ -+ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); -+ TIMER->WatchDogCtl = 0xFF00; -+ TIMER->WatchDogCtl = 0x00FF; -+} -+ -+ulong kerSysGetCycleCount(void) -+{ -+ ulong cnt; -+#ifdef _WIN32_WCE -+ cnt = 0; -+#else -+ __asm volatile("mfc0 %0, $9":"=d"(cnt)); -+#endif -+ return(cnt); -+} -+ -+static Bool kerSysDyingGaspCheckPowerLoss(void) -+{ -+ ulong clk0; -+ ulong ulIntr; -+ -+ ulIntr = 0; -+ clk0 = kerSysGetCycleCount(); -+ -+ UART->Data = 'D'; -+ UART->Data = '%'; -+ UART->Data = 'G'; -+ -+#if defined(CONFIG_BCM96345) -+ BpGetAdslDyingGaspExtIntr( &ulIntr ); -+ -+ do { -+ ulong clk1; -+ -+ clk1 = kerSysGetCycleCount(); /* time cleared */ -+ /* wait a little to get new reading */ -+ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) -+ ; -+ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); -+ -+ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ -+ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); -+ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); -+ return 0; -+ } -+#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) -+ do { -+ ulong clk1; -+ -+ clk1 = kerSysGetCycleCount(); /* time cleared */ -+ /* wait a little to get new reading */ -+ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) -+ ; -+ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); -+ -+ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { -+ BcmHalInterruptEnable( INTERRUPT_ID_DG ); -+ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); -+ return 0; -+ } -+#endif -+ return 1; -+} -+ -+static void kerSysDyingGaspShutdown( void ) -+{ -+ kerSysSetWdTimer(1000000); -+#if defined(CONFIG_BCM96345) -+ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); -+#elif defined(CONFIG_BCM96348) -+ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); -+#endif -+} -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) -+#else -+static unsigned int kerSysDyingGaspIsr(void) -+#endif -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp, *dsl = NULL; -+ -+ if (kerSysDyingGaspCheckPowerLoss()) { -+ -+ /* first to turn off everything other than dsl */ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ if(strncmp(tmp->name, "dsl", 3)) { -+ (tmp->cb_dgasp_fn)(tmp->context); -+ }else { -+ dsl = tmp; -+ } -+ } -+ -+ /* now send dgasp */ -+ if(dsl) -+ (dsl->cb_dgasp_fn)(dsl->context); -+ -+ /* reset and shutdown system */ -+ kerSysDyingGaspShutdown(); -+ } -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+return( IRQ_HANDLED ); -+#else -+ return( 1 ); -+#endif -+} -+ -+static void __init kerSysInitDyingGaspHandler( void ) -+{ -+ CB_DGASP_LIST *new_node; -+ -+ if( g_cb_dgasp_list_head != NULL) { -+ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); -+ return; -+ } -+ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); -+ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); -+ INIT_LIST_HEAD(&new_node->list); -+ g_cb_dgasp_list_head = new_node; -+ -+} /* kerSysInitDyingGaspHandler */ -+ -+static void __exit kerSysDeinitDyingGaspHandler( void ) -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp; -+ -+ if(g_cb_dgasp_list_head == NULL) -+ return; -+ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ list_del(pos); -+ kfree(tmp); -+ } -+ -+ kfree(g_cb_dgasp_list_head); -+ g_cb_dgasp_list_head = NULL; -+ -+} /* kerSysDeinitDyingGaspHandler */ -+ -+void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) -+{ -+ CB_DGASP_LIST *new_node; -+ -+ if( g_cb_dgasp_list_head == NULL) { -+ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); -+ return; -+ } -+ -+ if( devname == NULL || cbfn == NULL ) { -+ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); -+ return; -+ } -+ -+ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); -+ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); -+ INIT_LIST_HEAD(&new_node->list); -+ strncpy(new_node->name, devname, IFNAMSIZ); -+ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; -+ new_node->context = context; -+ list_add(&new_node->list, &g_cb_dgasp_list_head->list); -+ -+ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); -+ -+} /* kerSysRegisterDyingGaspHandler */ -+ -+void kerSysDeregisterDyingGaspHandler(char *devname) -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp; -+ -+ if(g_cb_dgasp_list_head == NULL) { -+ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); -+ return; -+ } -+ -+ if(devname == NULL) { -+ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); -+ return; -+ } -+ -+ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); -+ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ if(!strcmp(tmp->name, devname)) { -+ list_del(pos); -+ kfree(tmp); -+ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); -+ return; -+ } -+ } -+ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); -+ -+} /* kerSysDeregisterDyingGaspHandler */ -+ -+/*************************************************************************** -+ * MACRO to call driver initialization and cleanup functions. -+ ***************************************************************************/ -+module_init( brcm_board_init ); -+module_exit( brcm_board_cleanup ); -+ -+EXPORT_SYMBOL(kerSysNvRamGet); -+EXPORT_SYMBOL(dumpaddr); -+EXPORT_SYMBOL(kerSysGetMacAddress); -+EXPORT_SYMBOL(kerSysReleaseMacAddress); -+EXPORT_SYMBOL(kerSysGetSdramSize); -+EXPORT_SYMBOL(kerSysLedCtrl); -+//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 -+EXPORT_SYMBOL(kerSysGetResetHold); -+//>>JUNHON, 2004/09/15 -+EXPORT_SYMBOL(kerSysLedRegisterHwHandler); -+EXPORT_SYMBOL(BpGetBoardIds); -+EXPORT_SYMBOL(BpGetSdramSize); -+EXPORT_SYMBOL(BpGetPsiSize); -+EXPORT_SYMBOL(BpGetEthernetMacInfo); -+EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); -+EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); -+EXPORT_SYMBOL(BpGetVoipResetGpio); -+EXPORT_SYMBOL(BpGetVoipIntrGpio); -+EXPORT_SYMBOL(BpGetPcmciaResetGpio); -+EXPORT_SYMBOL(BpGetRtsCtsUartGpios); -+EXPORT_SYMBOL(BpGetAdslLedGpio); -+EXPORT_SYMBOL(BpGetAdslFailLedGpio); -+EXPORT_SYMBOL(BpGetWirelessLedGpio); -+EXPORT_SYMBOL(BpGetUsbLedGpio); -+EXPORT_SYMBOL(BpGetHpnaLedGpio); -+EXPORT_SYMBOL(BpGetWanDataLedGpio); -+EXPORT_SYMBOL(BpGetPppLedGpio); -+EXPORT_SYMBOL(BpGetPppFailLedGpio); -+EXPORT_SYMBOL(BpGetVoipLedGpio); -+EXPORT_SYMBOL(BpGetWirelessExtIntr); -+EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); -+EXPORT_SYMBOL(BpGetVoipExtIntr); -+EXPORT_SYMBOL(BpGetHpnaExtIntr); -+EXPORT_SYMBOL(BpGetHpnaChipSelect); -+EXPORT_SYMBOL(BpGetVoipChipSelect); -+EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); -+EXPORT_SYMBOL(BpGetWirelessSesExtIntr); -+EXPORT_SYMBOL(BpGetWirelessSesLedGpio); -+EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); -+EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); -+EXPORT_SYMBOL(kerSysGetCycleCount); -+EXPORT_SYMBOL(kerSysSetWdTimer); -+EXPORT_SYMBOL(kerSysWakeupMonitorTask); -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,2391 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.c -+ * -+ * Description: This file contains the implementation for the BCM63xx board -+ * parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include "boardparms.h" -+ -+/* Defines. */ -+ -+/* Default psi size in K bytes */ -+#define BP_PSI_DEFAULT_SIZE 24 -+ -+/* Typedefs */ -+typedef struct boardparameters -+{ -+ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ -+ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; -+ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; -+ unsigned short usSdramSize; /* SDRAM size and type */ -+ unsigned short usPsiSize; /* persistent storage in K bytes */ -+ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ -+ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ -+ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ -+ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ -+ unsigned short usGpioUartRts; /* GPIO pin or not defined */ -+ unsigned short usGpioUartCts; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ -+ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ -+ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ -+ unsigned short usExtIntrWireless; /* ext intr or not defined */ -+ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ -+ unsigned short usExtIntrHpna; /* ext intr or not defined */ -+ unsigned short usCsHpna; /* chip select not defined */ -+ unsigned short usAntInUseWireless; /* antenna in use or not defined */ -+ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ -+ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ -+ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ -+} BOARD_PARAMETERS, *PBOARD_PARAMETERS; -+ -+/* Variables */ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+static BOARD_PARAMETERS g_bcm96338sv = -+{ -+ "96338SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static BOARD_PARAMETERS g_bcm96338l2m8m = -+{ -+ "96338L-2M-8M", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; -+#endif -+ -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+static BOARD_PARAMETERS g_bcm96345r = -+{ -+ "96345R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw2 = -+{ -+ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold -+ * Reset or RTS. -+ */ -+ "96345GW2", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_GPIO_0_AH, /* usGpioPhySpiSck */ -+ BP_GPIO_4_AH, /* usGpioPhySpiSs */ -+ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ -+ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_GPIO, /* usConfigType */ -+ BP_ENET_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_GPIO_13_AH, /* usGpioUartRts */ -+ BP_GPIO_9_AH, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw = -+{ -+ "96345GW", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_GPIO_10_AH, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_EXT_INTR_3, /* usExtIntrHpna */ -+ BP_CS_1, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96335r = -+{ -+ "96335R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_9_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_8_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_9_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345r0 = -+{ -+ "96345R0", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345rs = -+{ -+ "96345RS", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, -+ &g_bcm96345rs, 0}; -+#endif -+ -+#if defined(_BCM96348_) || defined(CONFIG_BCM96348) -+ -+static BOARD_PARAMETERS g_bcm96348r = -+{ -+ "96348R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348lv = -+{ -+ "96348LV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x02, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_GPIO_5_AL, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw = -+{ -+ "96348GW", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_10 = -+{ -+ "96348GW-10", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw_11 = -+{ -+ "96348GW-11", /* szBoardId */ -+ {{BP_ENET_NO_PHY}, /* ucPhyType */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348sv = -+{ -+ "96348SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x1f, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_dualDsp = -+{ -+ "96348GW-DualDSP", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_UNEQUIPPED, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_DSP, /* ucDspType */ -+ 0x01, /* ucDspAddress */ -+ BP_EXT_INTR_3, /* usExtIntrVoip */ -+ BP_UNEQUIPPED , /* usGpioVoipReset */ -+ BP_GPIO_35_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_3}}, /* usCsVoip */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcmCustom_01 = -+{ -+ "BCMCUST_01", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_36_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AL, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, -+ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, -+ &g_bcmCustom_01, 0}; -+#endif -+ -+static PBOARD_PARAMETERS g_pCurrentBp = 0; -+ -+/************************************************************************** -+ * Name : bpstrcmp -+ * -+ * Description: String compare for this file so it does not depend on an OS. + * (Linux kernel and CFE share this source file.) -+ * -+ * Parameters : [IN] dest - destination string -+ * [IN] src - source string -+ * -+ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src -+ ***************************************************************************/ -+static int bpstrcmp(const char *dest,const char *src); -+static int bpstrcmp(const char *dest,const char *src) -+{ -+ while (*src && *dest) -+ { -+ if (*dest < *src) return -1; -+ if (*dest > *src) return 1; -+ dest++; -+ src++; -+ } -+ -+ if (*dest && !*src) return 1; -+ if (!*dest && *src) return -1; -+ return 0; -+} /* bpstrcmp */ -+ -+/************************************************************************** -+ * Name : BpGetVoipDspConfig -+ * -+ * Description: Gets the DSP configuration from the board parameter -+ * structure for a given DSP index. -+ * -+ * Parameters : [IN] dspNum - DSP index (number) -+ * -+ * Returns : Pointer to DSP configuration block if found/valid, NULL -+ * otherwise. -+ ***************************************************************************/ -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) -+{ -+ VOIP_DSP_INFO *pDspConfig = 0; -+ int i; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) -+ { -+ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && -+ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) -+ { -+ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; -+ break; -+ } -+ } -+ } -+ -+ return pDspConfig; -+} -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ) -+{ -+ int nRet = BP_BOARD_ID_NOT_FOUND; -+ PBOARD_PARAMETERS *ppBp; -+ -+ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) -+ { -+ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) -+ { -+ g_pCurrentBp = *ppBp; -+ nRet = BP_SUCCESS; -+ break; -+ } -+ } -+ -+ return( nRet ); -+} /* BpSetBoardId */ -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) -+{ -+ PBOARD_PARAMETERS *ppBp; -+ int i; -+ char *src; -+ char *dest; -+ -+ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; -+ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) -+ { -+ dest = pszBoardIds; -+ src = (*ppBp)->szBoardId; -+ while( *src ) -+ *dest++ = *src++; -+ *dest = '\0'; -+ } -+ -+ return( i ); -+} /* BpGetBoardIds */ -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) -+{ -+ int i, nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ { -+ if( i < BP_MAX_ENET_MACS ) -+ { -+ unsigned char *src = (unsigned char *) -+ &g_pCurrentBp->EnetMacInfos[i]; -+ unsigned char *dest = (unsigned char *) pEnetInfos; -+ int len = sizeof(ETHERNET_MAC_INFO); -+ while( len-- ) -+ *dest++ = *src++; -+ } -+ else -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ } -+ -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetEthernetMacInfo */ -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulSdramSize = g_pCurrentBp->usSdramSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulSdramSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetSdramSize */ -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulPsiSize = g_pCurrentBp->usPsiSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulPsiSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPsiSize */ -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; -+ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; -+ -+ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusInner = *pusOuter = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetRj11InnerOuterPairGpios */ -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; -+ -+ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPressAndHoldResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipReset; -+ -+ if( *pusValue != BP_NOT_DEFINED || -+ *pusValue == BP_UNEQUIPPED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipIntr; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipIntrGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPcmciaReset; -+ -+ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPcmciaResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, board id input string does not -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusRts = g_pCurrentBp->usGpioUartRts; -+ *pusCts = g_pCurrentBp->usGpioUartCts; -+ -+ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusRts = *pusCts = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUartRtsCtsGpios */ -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdsl; -+ -+ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdslFail; -+ -+ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWireless; -+ -+ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usAntInUseWireless; -+ -+ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessAntInUse */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; -+ -+ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessSesBtnGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; -+ -+ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedSesWireless; -+ -+ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedUsb; -+ -+ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUsbLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedHpna; -+ -+ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWanData; -+ -+ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWanDataLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPpp; -+ -+ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPppFail; -+ -+ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; -+ -+ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderPowerOn */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; -+ -+ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderAlarmLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; -+ -+ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderResetCfgLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlStop; -+ -+ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderStopLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ * -+ * Note : The VoIP structure would allow for having one LED per DSP -+ * however, the board initialization function assumes only one -+ * LED per functionality (ie one LED for VoIP). Therefore in -+ * order to keep this tidy and simple we do not make usage of the -+ * one-LED-per-DSP function. Instead, we assume that the LED for -+ * VoIP is unique and associated with DSP 0 (always present on -+ * any VoIP platform). If changing this to a LED-per-DSP function -+ * then one need to update the board initialization driver in -+ * bcmdrivers\opensource\char\board\bcm963xx\impl1 -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioLedVoip; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrWireless; -+ -+ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; -+ -+ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslDyingGaspExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usExtIntrVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrHpna; -+ -+ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usCsHpna; -+ -+ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaChipSelect */ -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usCsVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipChipSelect */ -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h 2006-07-25 10:18:49.000000000 +0200 -@@ -0,0 +1,758 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.h -+ * -+ * Description: This file contains definitions and function prototypes for -+ * the BCM63xx board parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+#if !defined(_BOARDPARMS_H) -+#define _BOARDPARMS_H -+ -+/* Return codes. */ -+#define BP_SUCCESS 0 -+#define BP_BOARD_ID_NOT_FOUND 1 -+#define BP_VALUE_NOT_DEFINED 2 -+#define BP_BOARD_ID_NOT_SET 3 -+ -+/* Values for BpGetSdramSize. */ -+#define BP_MEMORY_8MB_1_CHIP 0 -+#define BP_MEMORY_16MB_1_CHIP 1 -+#define BP_MEMORY_32MB_1_CHIP 2 -+#define BP_MEMORY_64MB_2_CHIP 3 -+#define BP_MEMORY_32MB_2_CHIP 4 -+#define BP_MEMORY_16MB_2_CHIP 5 -+ -+/* Values for EthernetMacInfo PhyType. */ -+#define BP_ENET_NO_PHY 0 -+#define BP_ENET_INTERNAL_PHY 1 -+#define BP_ENET_EXTERNAL_PHY 2 -+#define BP_ENET_EXTERNAL_SWITCH 3 -+ -+/* Values for EthernetMacInfo Configuration type. */ -+#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ -+#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ -+#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ -+ -+/* Values for EthernetMacInfo Reverse MII. */ -+#define BP_ENET_NO_REVERSE_MII 0 -+#define BP_ENET_REVERSE_MII 1 -+ -+/* Values for VoIPDSPInfo DSPType. */ -+#define BP_VOIP_NO_DSP 0 -+#define BP_VOIP_DSP 1 -+ -+ -+/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ -+#define BP_ACTIVE_MASK 0x8000 -+#define BP_ACTIVE_HIGH 0x0000 -+#define BP_ACTIVE_LOW 0x8000 -+#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) -+#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) -+#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) -+#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) -+#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) -+#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) -+#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) -+#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) -+#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) -+#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) -+#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) -+#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) -+#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) -+#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) -+#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) -+#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) -+#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) -+#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) -+#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) -+#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) -+#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) -+#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) -+#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) -+#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) -+#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) -+#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) -+#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) -+#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) -+#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) -+#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) -+#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) -+#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) -+#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) -+#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) -+#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) -+#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) -+#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) -+#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) -+#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) -+#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) -+#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) -+#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) -+#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) -+#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) -+#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) -+#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) -+#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) -+#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) -+#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) -+#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) -+#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) -+#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) -+#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) -+#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) -+#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) -+#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) -+#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) -+#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) -+#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) -+#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) -+#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) -+#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) -+#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) -+#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) -+#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) -+#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) -+#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) -+#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) -+#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) -+#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) -+#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) -+#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) -+#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) -+#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) -+ -+/* Values for external interrupt assignments. */ -+#define BP_EXT_INTR_0 0 -+#define BP_EXT_INTR_1 1 -+#define BP_EXT_INTR_2 2 -+#define BP_EXT_INTR_3 3 -+ -+/* Values for chip select assignments. */ -+#define BP_CS_0 0 -+#define BP_CS_1 1 -+#define BP_CS_2 2 -+#define BP_CS_3 3 -+ -+/* Value for GPIO and external interrupt fields that are not used. */ -+#define BP_NOT_DEFINED 0xffff -+#define BP_HW_DEFINED 0xfff0 -+#define BP_UNEQUIPPED 0xfff1 -+ -+/* Maximum size of the board id string. */ -+#define BP_BOARD_ID_LEN 16 -+ -+/* Maximum number of Ethernet MACs. */ -+#define BP_MAX_ENET_MACS 2 -+ -+/* Maximum number of VoIP DSPs. */ -+#define BP_MAX_VOIP_DSP 2 -+ -+/* Wireless Antenna Settings. */ -+#define BP_WLAN_ANT_MAIN 0 -+#define BP_WLAN_ANT_AUX 1 -+#define BP_WLAN_ANT_BOTH 3 -+ -+#if !defined(__ASSEMBLER__) -+ -+/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, -+ * then the other fields are not valid. -+ */ -+typedef struct EthernetMacInfo -+{ -+ unsigned char ucPhyType; /* BP_ENET_xxx */ -+ unsigned char ucPhyAddress; /* 0 to 31 */ -+ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ -+ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ -+ unsigned short numSwitchPorts; /* Number of PHY ports */ -+ unsigned short usConfigType; /* Configuration type */ -+ unsigned short usReverseMii; /* Reverse MII */ -+} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; -+ -+ -+/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, -+ * then the other fields are not valid. -+ */ -+typedef struct VoIPDspInfo -+{ -+ unsigned char ucDspType; -+ unsigned char ucDspAddress; -+ unsigned short usExtIntrVoip; -+ unsigned short usGpioVoipReset; -+ unsigned short usGpioVoipIntr; -+ unsigned short usGpioLedVoip; -+ unsigned short usCsVoip; -+ -+} VOIP_DSP_INFO; -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ); -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ); -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ); -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ); -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); -+ -+#endif /* __ASSEMBLER__ */ -+ -+#endif /* _BOARDPARMS_H */ -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,692 @@ -+/************************************************************************/ -+/* */ -+/* AMD CFI Enabled Flash Memory Drivers */ -+/* File name: CFIFLASH.C */ -+/* Revision: 1.0 5/07/98 */ -+/* */ -+/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ -+/* This software is unpublished and contains the trade secrets and */ -+/* confidential proprietary information of AMD. Unless otherwise */ -+/* provided in the Software Agreement associated herewith, it is */ -+/* licensed in confidence "AS IS" and is not to be reproduced in whole */ -+/* or part by any means except for backup. Use, duplication, or */ -+/* disclosure by the Government is subject to the restrictions in */ -+/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ -+/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ -+/* Software owned by */ -+/* Advanced Micro Devices, Inc., */ -+/* One AMD Place, */ -+/* P.O. Box 3453 */ -+/* Sunnyvale, CA 94088-3453. */ -+/************************************************************************/ -+/* This software constitutes a basic shell of source code for */ -+/* programming all AMD Flash components. AMD */ -+/* will not be responsible for misuse or illegal use of this */ -+/* software for devices not supported herein. AMD is providing */ -+/* this source code "AS IS" and will not be responsible for */ -+/* issues arising from incorrect user implementation of the */ -+/* source code herein. It is the user's responsibility to */ -+/* properly design-in this source code. */ -+/* */ -+/************************************************************************/ +#ifdef _CFE_ -+#include "lib_types.h" -+#include "lib_printf.h" -+#include "lib_string.h" -+#include "cfe_timer.h" -+#define printk printf -+#else // linux -+#include <linux/param.h> -+#include <linux/sched.h> -+#include <linux/timer.h> -+#endif -+ -+#include "cfiflash.h" -+ -+static int flash_wait(WORD sector, int offset, UINT16 data); -+static UINT16 flash_get_device_id(void); -+static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily); -+static int flash_write(WORD sector, int offset, byte *buf, int nbytes); -+static void flash_command(int command, WORD sector, int offset, UINT16 data); -+ -+/*********************************************************************/ -+/* 'meminfo' should be a pointer, but most C compilers will not */ -+/* allocate static storage for a pointer without calling */ -+/* non-portable functions such as 'new'. We also want to avoid */ -+/* the overhead of passing this pointer for every driver call. */ -+/* Systems with limited heap space will need to do this. */ -+/*********************************************************************/ -+struct flashinfo meminfo; /* Flash information structure */ -+static int flashFamily = FLASH_UNDEFINED; -+static int totalSize = 0; -+static struct cfi_query query; -+ -+static UINT16 cfi_data_struct_29W160[] = { -+ 0x0020, 0x0049, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0051, 0x0052, 0x0059, 0x0002, 0x0000, 0x0040, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0027, 0x0036, 0x0000, 0x0000, 0x0004, -+ 0x0000, 0x000a, 0x0000, 0x0004, 0x0000, 0x0003, 0x0000, 0x0015, -+ 0x0002, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0040, -+ 0x0000, 0x0001, 0x0000, 0x0020, 0x0000, 0x0000, 0x0000, 0x0080, -+ 0x0000, 0x001e, 0x0000, 0x0000, 0x0001, 0xffff, 0xffff, 0xffff, -+ 0x0050, 0x0052, 0x0049, 0x0031, 0x0030, 0x0000, 0x0002, 0x0001, -+ 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0002, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0x0888, 0x252b, 0x8c84, 0x7dbc, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff -+}; -+ -+ -+/*********************************************************************/ -+/* Init_flash is used to build a sector table from the information */ -+/* provided through the CFI query. This information is translated */ -+/* from erase_block information to base:offset information for each */ -+/* individual sector. This information is then stored in the meminfo */ -+/* structure, and used throughout the driver to access sector */ -+/* information. */ -+/* */ -+/* This is more efficient than deriving the sector base:offset */ -+/* information every time the memory map switches (since on the */ -+/* development platform can only map 64k at a time). If the entire */ -+/* flash memory array can be mapped in, then the addition static */ -+/* allocation for the meminfo structure can be eliminated, but the */ -+/* drivers will have to be re-written. */ -+/* */ -+/* The meminfo struct occupies 653 bytes of heap space, depending */ -+/* on the value of the define MAXSECTORS. Adjust to suit */ -+/* application */ -+/*********************************************************************/ -+byte flash_init(void) -+{ -+ int i=0, j=0, count=0; -+ int basecount=0L; -+ UINT16 device_id; -+ int flipCFIGeometry = FALSE; -+ -+ /* First, assume -+ * a single 8k sector for sector 0. This is to allow -+ * the system to perform memory mapping to the device, -+ * even though the actual physical layout is unknown. -+ * Once mapped in, the CFI query will produce all -+ * relevant information. -+ */ -+ meminfo.addr = 0L; -+ meminfo.areg = 0; -+ meminfo.nsect = 1; -+ meminfo.bank1start = 0; -+ meminfo.bank2start = 0; -+ -+ meminfo.sec[0].size = 8192; -+ meminfo.sec[0].base = 0x00000; -+ meminfo.sec[0].bank = 1; -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ -+ device_id = flash_get_device_id(); -+ -+ switch (device_id) { -+ case ID_I28F160C3B: -+ case ID_I28F320C3B: -+ case ID_I28F160C3T: -+ case ID_I28F320C3T: -+ flashFamily = FLASH_INTEL; -+ break; -+ case ID_AM29DL800B: -+ case ID_AM29LV800B: -+ case ID_AM29LV400B: -+ case ID_AM29LV160B: -+ case ID_AM29LV320B: -+ case ID_MX29LV320AB: -+ case ID_AM29LV320MB: -+ case ID_AM29DL800T: -+ case ID_AM29LV800T: -+ case ID_AM29LV160T: -+ case ID_AM29LV320T: -+ case ID_MX29LV320AT: -+ case ID_AM29LV320MT: -+ flashFamily = FLASH_AMD; -+ break; -+ case ID_SST39VF1601: -+ case ID_SST39VF3201: -+ flashFamily = FLASH_SST; -+ break; -+ default: -+ printk("Flash memory not supported! Device id = %x\n", device_id); -+ return -1; -+ } -+ -+ if (flash_get_cfi(&query, 0, flashFamily) == -1) { -+ switch(device_id) { -+ case ID_AM29LV160T: -+ case ID_AM29LV160B: -+ flash_get_cfi(&query, cfi_data_struct_29W160, flashFamily); -+ break; -+ default: -+ printk("CFI data structure not found. Device id = %x\n", device_id); -+ return -1; -+ } -+ } -+ -+ // need to determine if it top or bottom boot here -+ switch (device_id) -+ { -+ case ID_AM29DL800B: -+ case ID_AM29LV800B: -+ case ID_AM29LV400B: -+ case ID_AM29LV160B: -+ case ID_AM29LV320B: -+ case ID_MX29LV320AB: -+ case ID_AM29LV320MB: -+ case ID_I28F160C3B: -+ case ID_I28F320C3B: -+ case ID_I28F160C3T: -+ case ID_I28F320C3T: -+ case ID_SST39VF1601: -+ case ID_SST39VF3201: -+ flipCFIGeometry = FALSE; -+ break; -+ case ID_AM29DL800T: -+ case ID_AM29LV800T: -+ case ID_AM29LV160T: -+ case ID_AM29LV320T: -+ case ID_MX29LV320AT: -+ case ID_AM29LV320MT: -+ flipCFIGeometry = TRUE; -+ break; -+ default: -+ printk("Flash memory not supported! Device id = %x\n", device_id); -+ return -1; -+ } -+ -+ count=0;basecount=0L; -+ -+ if (!flipCFIGeometry) -+ { -+ for (i=0; i<query.num_erase_blocks; i++) { -+ for(j=0; j<query.erase_block[i].num_sectors; j++) { -+ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; -+ meminfo.sec[count].base = (int) basecount; -+ basecount += (int) query.erase_block[i].sector_size; -+ count++; -+ } -+ } -+ } -+ else -+ { -+ for (i = (query.num_erase_blocks - 1); i >= 0; i--) { -+ for(j=0; j<query.erase_block[i].num_sectors; j++) { -+ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; -+ meminfo.sec[count].base = (int) basecount; -+ basecount += (int) query.erase_block[i].sector_size; -+ count++; -+ } -+ } -+ } -+ -+ meminfo.nsect = count; -+ totalSize = meminfo.sec[count-1].base + meminfo.sec[count-1].size; -+ return (0); -+} -+ -+/*********************************************************************/ -+/* Flash_sector_erase_int() is identical to flash_sector_erase(), */ -+/* except it will wait until the erase is completed before returning */ -+/* control to the calling function. This can be used in cases which */ -+/* require the program to hold until a sector is erased, without */ -+/* adding the wait check external to this function. */ -+/*********************************************************************/ -+byte flash_sector_erase_int(WORD sector) -+{ -+ int i; -+ -+ for( i = 0; i < 3; i++ ) { -+ flash_command(FLASH_SERASE, sector, 0, 0); -+ if (flash_wait(sector, 0, 0xffff) == STATUS_READY) -+ break; -+ } -+ -+ return(1); -+} -+ -+/*********************************************************************/ -+/* flash_read_buf() reads buffer of data from the specified */ -+/* offset from the sector parameter. */ -+/*********************************************************************/ -+int flash_read_buf(WORD sector, int offset, -+ byte *buffer, int numbytes) -+{ -+ byte *fwp; -+ -+ fwp = (byte *)flash_get_memptr(sector); -+ -+ while (numbytes) { -+ *buffer++ = *(fwp + offset); -+ numbytes--; -+ fwp++; -+ } -+ -+ return (1); -+} -+ -+/*********************************************************************/ -+/* flash_write_buf() utilizes */ -+/* the unlock bypass mode of the flash device. This can remove */ -+/* significant overhead from the bulk programming operation, and */ -+/* when programming bulk data a sizeable performance increase can be */ -+/* observed. */ -+/*********************************************************************/ -+int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes) -+{ -+ int ret = -1; -+ int i; -+ unsigned char *p = flash_get_memptr(sector) + offset; -+ -+ /* After writing the flash block, compare the contents to the source -+ * buffer. Try to write the sector successfully up to three times. -+ */ -+ for( i = 0; i < 3; i++ ) { -+ ret = flash_write(sector, offset, buffer, numbytes); -+ if( !memcmp( p, buffer, numbytes ) ) -+ break; -+ /* Erase and try again */ -+ flash_sector_erase_int(sector); -+ ret = -1; -+ } -+ -+ if( ret == -1 ) -+ printk( "Flash write error. Verify failed\n" ); -+ -+ return( ret ); -+} -+ -+/*********************************************************************/ -+/* Usefull funtion to return the number of sectors in the device. */ -+/* Can be used for functions which need to loop among all the */ -+/* sectors, or wish to know the number of the last sector. */ -+/*********************************************************************/ -+int flash_get_numsectors(void) -+{ -+ return meminfo.nsect; -+} -+ -+/*********************************************************************/ -+/* flash_get_sector_size() is provided for cases in which the size */ -+/* of a sector is required by a host application. The sector size */ -+/* (in bytes) is returned in the data location pointed to by the */ -+/* 'size' parameter. */ -+/*********************************************************************/ -+int flash_get_sector_size(WORD sector) -+{ -+ return meminfo.sec[sector].size; -+} -+ -+/*********************************************************************/ -+/* The purpose of flash_get_memptr() is to return a memory pointer */ -+/* which points to the beginning of memory space allocated for the */ -+/* flash. All function pointers are then referenced from this */ -+/* pointer. */ -+/* */ -+/* Different systems will implement this in different ways: */ -+/* possibilities include: */ -+/* - A direct memory pointer */ -+/* - A pointer to a memory map */ -+/* - A pointer to a hardware port from which the linear */ -+/* address is translated */ -+/* - Output of an MMU function / service */ -+/* */ -+/* Also note that this function expects the pointer to a specific */ -+/* sector of the device. This can be provided by dereferencing */ -+/* the pointer from a translated offset of the sector from a */ -+/* global base pointer (e.g. flashptr = base_pointer + sector_offset)*/ -+/* */ -+/* Important: Many AMD flash devices need both bank and or sector */ -+/* address bits to be correctly set (bank address bits are A18-A16, */ -+/* and sector address bits are A18-A12, or A12-A15). Flash parts */ -+/* which do not need these bits will ignore them, so it is safe to */ -+/* assume that every part will require these bits to be set. */ -+/*********************************************************************/ -+unsigned char *flash_get_memptr(WORD sector) -+{ -+ unsigned char *memptr = (unsigned char*)(FLASH_BASE_ADDR_REG + meminfo.sec[sector].base); -+ -+ return (memptr); -+} -+ -+/*********************************************************************/ -+/* The purpose of flash_get_blk() is to return a the block number */ -+/* for a given memory address. */ -+/*********************************************************************/ -+int flash_get_blk(int addr) -+{ -+ int blk_start, i; -+ int last_blk = flash_get_numsectors(); -+ int relative_addr = addr - (int) FLASH_BASE_ADDR_REG; -+ -+ for(blk_start=0, i=0; i < relative_addr && blk_start < last_blk; blk_start++) -+ i += flash_get_sector_size(blk_start); -+ -+ if( i > relative_addr ) -+ { -+ blk_start--; // last blk, dec by 1 -+ } -+ else -+ if( blk_start == last_blk ) -+ { -+ printk("Address is too big.\n"); -+ blk_start = -1; -+ } -+ -+ return( blk_start ); -+} -+ -+/************************************************************************/ -+/* The purpose of flash_get_total_size() is to return the total size of */ -+/* the flash */ -+/************************************************************************/ -+int flash_get_total_size() -+{ -+ return totalSize; -+} -+ -+/*********************************************************************/ -+/* Flash_command() is the main driver function. It performs */ -+/* every possible command available to AMD B revision */ -+/* flash parts. Note that this command is not used directly, but */ -+/* rather called through the API wrapper functions provided below. */ -+/*********************************************************************/ -+static void flash_command(int command, WORD sector, int offset, UINT16 data) -+{ -+ volatile UINT16 *flashptr; -+ volatile UINT16 *flashbase; -+ -+ flashptr = (UINT16 *) flash_get_memptr(sector); -+ flashbase = (UINT16 *) flash_get_memptr(0); -+ -+ switch (flashFamily) { -+ case FLASH_UNDEFINED: -+ /* These commands should work for AMD, Intel and SST flashes */ -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xF0; -+ flashptr[0] = 0xFF; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0x5555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AAA] = 0x55; /* unlock 2 */ -+ flashptr[0x5555] = 0x90; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_AMD: -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xF0; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashptr[0x55] = 0x98; -+ break; -+ case FLASH_UB: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x20; -+ break; -+ case FLASH_PROG: -+ flashptr[0] = 0xA0; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_UBRESET: -+ flashptr[0] = 0x90; -+ flashptr[0] = 0x00; -+ break; -+ case FLASH_SERASE: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x80; -+ flashptr[0x555] = 0xAA; -+ flashptr[0x2AA] = 0x55; -+ flashptr[0] = 0x30; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_INTEL: -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xFF; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashptr[0] = 0x98; -+ break; -+ case FLASH_PROG: -+ flashptr[0] = 0x40; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_SERASE: -+ flashptr[0] = 0x60; -+ flashptr[0] = 0xD0; -+ flashptr[0] = 0x20; -+ flashptr[0] = 0xD0; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_SST: -+ switch (command) { -+ case FLASH_RESET: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0xf0; -+ break; -+ case FLASH_READ_ID: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x98; -+ break; -+ case FLASH_UB: -+ break; -+ case FLASH_PROG: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0xa0; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_UBRESET: -+ break; -+ case FLASH_SERASE: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x80; -+ flashbase[0x5555] = 0xAA; -+ flashbase[0x2AAA] = 0x55; -+ flashptr[0] = 0x30; -+ break; -+ default: -+ break; -+ } -+ break; -+ default: -+ break; -+ } -+} -+ -+/*********************************************************************/ -+/* flash_write extends the functionality of flash_program() by */ -+/* providing an faster way to program multiple data words, without */ -+/* needing the function overhead of looping algorithms which */ -+/* program word by word. This function utilizes fast pointers */ -+/* to quickly loop through bulk data. */ -+/*********************************************************************/ -+static int flash_write(WORD sector, int offset, byte *buf, int nbytes) -+{ -+ UINT16 *src; -+ src = (UINT16 *)buf; -+ -+ if ((nbytes | offset) & 1) { -+ return -1; -+ } -+ -+ flash_command(FLASH_UB, 0, 0, 0); -+ while (nbytes > 0) { -+ flash_command(FLASH_PROG, sector, offset, *src); -+ if (flash_wait(sector, offset, *src) != STATUS_READY) -+ break; -+ offset +=2; -+ nbytes -=2; -+ src++; -+ } -+ flash_command(FLASH_UBRESET, 0, 0, 0); -+ -+ return (byte*)src - buf; -+} -+ -+/*********************************************************************/ -+/* flash_wait utilizes the DQ6, DQ5, and DQ2 polling algorithms */ -+/* described in the flash data book. It can quickly ascertain the */ -+/* operational status of the flash device, and return an */ -+/* appropriate status code (defined in flash.h) */ -+/*********************************************************************/ -+static int flash_wait(WORD sector, int offset, UINT16 data) -+{ -+ volatile UINT16 *flashptr; /* flash window */ -+ UINT16 d1; -+ -+ flashptr = (UINT16 *) flash_get_memptr(sector); -+ -+ if (flashFamily == FLASH_AMD || flashFamily == FLASH_SST) { -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ do { -+ d1 = flashptr[offset/2]; -+ if (d1 == data) -+ return STATUS_READY; -+ } while (!(d1 & 0x20)); -+ -+ d1 = flashptr[offset/2]; -+ -+ if (d1 != data) { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+#else -+ do { -+ d1 = *flashptr; /* read data */ -+ d1 ^= *flashptr; /* read it again and see what toggled */ -+ if (d1 == 0) /* no toggles, nothing's happening */ -+ return STATUS_READY; -+ } while (!(d1 & 0x20)); -+ -+ d1 = *flashptr; /* read data */ -+ d1 ^= *flashptr; /* read it again and see what toggled */ -+ -+ if (d1 != 0) { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+#endif -+ } else if (flashFamily == FLASH_INTEL) { -+ flashptr[0] = 0x70; -+ /* Wait for completion */ -+ while(!(*flashptr & 0x80)); -+ if (*flashptr & 0x30) { -+ flashptr[0] = 0x50; -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+ flashptr[0] = 0x50; -+ flash_command(FLASH_RESET, 0, 0, 0); -+ } -+ -+ return STATUS_READY; -+} -+ -+/*********************************************************************/ -+/* flash_get_device_id() will perform an autoselect sequence on the */ -+/* flash device, and return the device id of the component. */ -+/* This function automatically resets to read mode. */ -+/*********************************************************************/ -+static UINT16 flash_get_device_id() -+{ -+ volatile UINT16 *fwp; /* flash window */ -+ UINT16 answer; -+ -+ fwp = (UINT16 *)flash_get_memptr(0); -+ -+ flash_command(FLASH_READ_ID, 0, 0, 0); -+ answer = *(fwp + 1); -+ if (answer == ID_AM29LV320M) { -+ answer = *(fwp + 0xe); -+ answer = *(fwp + 0xf); -+ } -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return( (UINT16) answer ); -+} -+ -+/*********************************************************************/ -+/* flash_get_cfi() is the main CFI workhorse function. Due to it's */ -+/* complexity and size it need only be called once upon */ -+/* initializing the flash system. Once it is called, all operations */ -+/* are performed by looking at the meminfo structure. */ -+/* All possible care was made to make this algorithm as efficient as */ -+/* possible. 90% of all operations are memory reads, and all */ -+/* calculations are done using bit-shifts when possible */ -+/*********************************************************************/ -+static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily) -+{ -+ volatile UINT16 *fwp; /* flash window */ -+ int i=0; -+ -+ flash_command(FLASH_CFIQUERY, 0, 0, 0); -+ -+ if (cfi_struct == 0) -+ fwp = (UINT16 *)flash_get_memptr(0); -+ else -+ fwp = cfi_struct; -+ -+ /* Initial house-cleaning */ -+ for(i=0; i < 8; i++) { -+ query->erase_block[i].sector_size = 0; -+ query->erase_block[i].num_sectors = 0; -+ } -+ -+ /* If not 'QRY', then we dont have a CFI enabled device in the socket */ -+ if( fwp[0x10] != 'Q' && -+ fwp[0x11] != 'R' && -+ fwp[0x12] != 'Y') { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return(-1); -+ } -+ -+ query->num_erase_blocks = fwp[0x2C]; -+ if(flashFamily == FLASH_SST) -+ query->num_erase_blocks = 1; -+ -+ for(i=0; i < query->num_erase_blocks; i++) { -+ query->erase_block[i].num_sectors = fwp[(0x2D+(4*i))] + (fwp[0x2E + (4*i)] << 8); -+ query->erase_block[i].num_sectors++; -+ query->erase_block[i].sector_size = 256 * (256 * fwp[(0x30+(4*i))] + fwp[(0x2F+(4*i))]); -+ } -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return(1); -+} -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h 2006-07-25 10:19:20.000000000 +0200 -@@ -0,0 +1,142 @@ -+/************************************************************************/ -+/* */ -+/* AMD CFI Enabled Flash Memory Drivers */ -+/* File name: CFIFLASH.H */ -+/* Revision: 1.0 5/07/98 */ -+/* */ -+/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ -+/* This software is unpublished and contains the trade secrets and */ -+/* confidential proprietary information of AMD. Unless otherwise */ -+/* provided in the Software Agreement associated herewith, it is */ -+/* licensed in confidence "AS IS" and is not to be reproduced in whole */ -+/* or part by any means except for backup. Use, duplication, or */ -+/* disclosure by the Government is subject to the restrictions in */ -+/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ -+/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ -+/* Software owned by */ -+/* Advanced Micro Devices, Inc., */ -+/* One AMD Place, */ -+/* P.O. Box 3453 */ -+/* Sunnyvale, CA 94088-3453. */ -+/************************************************************************/ -+/* This software constitutes a basic shell of source code for */ -+/* programming all AMD Flash components. AMD */ -+/* will not be responsible for misuse or illegal use of this */ -+/* software for devices not supported herein. AMD is providing */ -+/* this source code "AS IS" and will not be responsible for */ -+/* issues arising from incorrect user implementation of the */ -+/* source code herein. It is the user's responsibility to */ -+/* properly design-in this source code. */ -+/* */ -+/************************************************************************/ -+#ifndef _CFIFLASH_H -+#define _CFIFLASH_H -+ -+/* include board/CPU specific definitions */ -+#include "bcmtypes.h" -+#include "board.h" -+ -+#define FLASH_BASE_ADDR_REG FLASH_BASE -+ -+#ifndef NULL -+#define NULL 0 -+#endif -+ -+#define MAXSECTORS 1024 /* maximum number of sectors supported */ -+ -+/* A structure for identifying a flash part. There is one for each -+ * of the flash part definitions. We need to keep track of the -+ * sector organization, the address register used, and the size -+ * of the sectors. -+ */ -+struct flashinfo { -+ char *name; /* "Am29DL800T", etc. */ -+ unsigned long addr; /* physical address, once translated */ -+ int areg; /* Can be set to zero for all parts */ -+ int nsect; /* # of sectors -- 19 in LV, 22 in DL */ -+ int bank1start; /* first sector # in bank 1 */ -+ int bank2start; /* first sector # in bank 2, if DL part */ -+ struct { -+ long size; /* # of bytes in this sector */ -+ long base; /* offset from beginning of device */ -+ int bank; /* 1 or 2 for DL; 1 for LV */ -+ } sec[MAXSECTORS]; /* per-sector info */ -+}; -+ -+/* -+ * This structure holds all CFI query information as defined -+ * in the JEDEC standard. All information up to -+ * primary_extended_query is standard among all manufactures -+ * with CFI enabled devices. -+ */ -+ -+struct cfi_query { -+ int num_erase_blocks; /* Number of sector defs. */ -+ struct { -+ unsigned long sector_size; /* byte size of sector */ -+ int num_sectors; /* Num sectors of this size */ -+ } erase_block[8]; /* Max of 256, but 8 is good */ -+}; -+ -+/* Standard Boolean declarations */ -+#define TRUE 1 -+#define FALSE 0 -+ -+/* Define different type of flash */ -+#define FLASH_UNDEFINED 0 -+#define FLASH_AMD 1 -+#define FLASH_INTEL 2 -+#define FLASH_SST 3 -+ -+/* Command codes for the flash_command routine */ -+#define FLASH_RESET 0 /* reset to read mode */ -+#define FLASH_READ_ID 1 /* read device ID */ -+#define FLASH_CFIQUERY 2 /* CFI query */ -+#define FLASH_UB 3 /* go into unlock bypass mode */ -+#define FLASH_PROG 4 /* program a word */ -+#define FLASH_UBRESET 5 /* reset to read mode from unlock bypass mode */ -+#define FLASH_SERASE 6 /* sector erase */ -+ -+/* Return codes from flash_status */ -+#define STATUS_READY 0 /* ready for action */ -+#define STATUS_TIMEOUT 1 /* operation timed out */ -+ -+/* A list of AMD compatible device ID's - add others as needed */ -+#define ID_AM29DL800T 0x224A -+#define ID_AM29DL800B 0x22CB -+#define ID_AM29LV800T 0x22DA -+#define ID_AM29LV800B 0x225B -+#define ID_AM29LV400B 0x22BA -+ -+#define ID_AM29LV160B 0x2249 -+#define ID_AM29LV160T 0x22C4 -+ -+#define ID_AM29LV320T 0x22F6 -+#define ID_MX29LV320AT 0x22A7 -+#define ID_AM29LV320B 0x22F9 -+#define ID_MX29LV320AB 0x22A8 -+ -+#define ID_AM29LV320M 0x227E -+#define ID_AM29LV320MB 0x2200 -+#define ID_AM29LV320MT 0x2201 -+ -+#define ID_SST39VF1601 0x234B -+#define ID_SST39VF3201 0x235B -+ -+/* A list of Intel compatible device ID's - add others as needed */ -+#define ID_I28F160C3T 0x88C2 -+#define ID_I28F160C3B 0x88C3 -+#define ID_I28F320C3T 0x88C4 -+#define ID_I28F320C3B 0x88C5 -+ -+extern byte flash_init(void); -+extern int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes); -+extern int flash_read_buf(WORD sector, int offset, byte *buffer, int numbytes); -+extern byte flash_sector_erase_int(WORD sector); -+extern int flash_get_numsectors(void); -+extern int flash_get_sector_size(WORD sector); -+extern int flash_get_total_size(void); -+extern unsigned char *flash_get_memptr(WORD sector); -+extern int flash_get_blk(int addr); -+ -+#endif -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-07-25 10:58:52.000000000 +0200 -@@ -0,0 +1,299 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Interrupt control functions for Broadcom 963xx MIPS boards -+ */ -+ -+#include <asm/atomic.h> -+ -+#include <linux/delay.h> -+#include <linux/init.h> -+#include <linux/ioport.h> -+#include <linux/irq.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/slab.h> -+#include <linux/module.h> -+#include <linux/spinlock.h> -+ -+#include <asm/irq.h> -+#include <asm/mipsregs.h> -+#include <asm/addrspace.h> -+#include <asm/signal.h> -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+static DEFINE_SPINLOCK(irq_lock); -+ -+static void irq_dispatch_int(struct pt_regs *regs) -+{ -+ unsigned int pendingIrqs; -+ static unsigned int irqBit; -+ static unsigned int isrNumber = 31; -+ -+ pendingIrqs = PERF->IrqStatus & PERF->IrqMask; -+ if (!pendingIrqs) { -+ return; -+ } -+ -+ while (1) { -+ irqBit <<= 1; -+ isrNumber++; -+ if (isrNumber == 32) { -+ isrNumber = 0; -+ irqBit = 0x1; -+ } -+ if (pendingIrqs & irqBit) { -+ PERF->IrqMask &= ~irqBit; // mask -+ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET, regs); -+ break; -+ } -+ } -+} -+ -+static void irq_dispatch_ext(uint32 irq, struct pt_regs *regs) -+{ -+ if (!(PERF->ExtIrqCfg & (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)))) { -+ printk("**** Ext IRQ mask. Should not dispatch ****\n"); -+ } -+ /* disable and clear interrupt in the controller */ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ do_IRQ(irq, regs); -+} -+ -+void brcm_irq_dispatch(struct pt_regs *regs) -+{ -+ u32 cause; -+ while((cause = (read_c0_cause()& CAUSEF_IP))) { -+ if (cause & CAUSEF_IP7) -+ do_IRQ(MIPS_TIMER_INT, regs); -+ else if (cause & CAUSEF_IP2) -+ irq_dispatch_int(regs); -+ else if (cause & CAUSEF_IP3) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); -+ else if (cause & CAUSEF_IP4) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); -+ else if (cause & CAUSEF_IP5) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); -+ else if (cause & CAUSEF_IP6) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); -+ //cli(); -+ spin_lock_irq(&irq_lock); -+ } -+} -+ -+void plat_irq_dispatch(struct pt_regs *regs) -+{ -+ u32 cause; -+ while((cause = (read_c0_cause()& CAUSEF_IP))) { -+ if (cause & CAUSEF_IP7) -+ do_IRQ(MIPS_TIMER_INT, regs); -+ else if (cause & CAUSEF_IP2) -+ irq_dispatch_int(regs); -+ else if (cause & CAUSEF_IP3) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); -+ else if (cause & CAUSEF_IP4) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); -+ else if (cause & CAUSEF_IP5) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); -+ else if (cause & CAUSEF_IP6) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); -+ //cli(); -+ spin_lock_irq(&irq_lock); -+ } -+} -+ -+ -+void enable_brcm_irq(unsigned int irq) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { -+ PERF->IrqMask |= (1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); -+ } -+ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { -+ /* enable and clear interrupt in the controller */ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ } -+ local_irq_restore(flags); -+} -+ -+void disable_brcm_irq(unsigned int irq) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { -+ PERF->IrqMask &= ~(1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); -+ } -+ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { -+ /* disable interrupt in the controller */ -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ } -+ local_irq_restore(flags); -+} -+ -+void ack_brcm_irq(unsigned int irq) -+{ -+ /* Already done in brcm_irq_dispatch */ -+} -+ -+unsigned int startup_brcm_irq(unsigned int irq) -+{ -+ enable_brcm_irq(irq); -+ -+ return 0; /* never anything pending */ -+} -+ -+unsigned int startup_brcm_none(unsigned int irq) -+{ -+ return 0; -+} -+ -+void end_brcm_irq(unsigned int irq) -+{ -+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) -+ enable_brcm_irq(irq); -+} -+ -+void end_brcm_none(unsigned int irq) -+{ -+} -+ -+#define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) -+ -+static void __init brcm_irq_setup(void) -+{ -+ extern asmlinkage void brcmIRQ(void); -+ -+ clear_c0_status(ST0_BEV); -+ set_except_vector(0, brcmIRQ); -+ change_c0_status(ST0_IM, ALLINTS_NOTIMER); -+ -+#ifdef CONFIG_REMOTE_DEBUG -+ rs_kgdb_hook(0); -+#endif -+} -+ -+static struct hw_interrupt_type brcm_irq_type = { -+ .typename = "MIPS", -+ .startup = startup_brcm_irq, -+ .shutdown = disable_brcm_irq, -+ .enable = enable_brcm_irq, -+ .disable = disable_brcm_irq, -+ .ack = ack_brcm_irq, -+ .end = end_brcm_irq, -+ .set_affinity = NULL -+}; -+ -+static struct hw_interrupt_type brcm_irq_no_end_type = { -+ .typename = "MIPS", -+ .startup = startup_brcm_none, -+ .shutdown = disable_brcm_irq, -+ .enable = enable_brcm_irq, -+ .disable = disable_brcm_irq, -+ .ack = ack_brcm_irq, -+ .end = end_brcm_none, -+ .set_affinity = NULL -+}; -+ -+void __init arch_init_irq(void) -+{ -+ int i; -+ -+ for (i = 0; i < NR_IRQS; i++) { -+ irq_desc[i].status = IRQ_DISABLED; -+ irq_desc[i].action = 0; -+ irq_desc[i].depth = 1; -+ irq_desc[i].handler = &brcm_irq_type; -+ } -+ -+ brcm_irq_setup(); -+} -+ -+int request_external_irq(unsigned int irq, -+ FN_HANDLER handler, -+ unsigned long irqflags, -+ const char * devname, -+ void *dev_id) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); // Clear -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); // Mask -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_INSENS_SHFT)); // Edge insesnsitive -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_LEVEL_SHFT)); // Level triggered -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_SENSE_SHFT)); // Low level -+ -+ local_irq_restore(flags); -+ -+ return( request_irq(irq, handler, irqflags, devname, dev_id) ); -+} -+ -+/* VxWorks compatibility function(s). */ -+ -+unsigned int BcmHalMapInterrupt(FN_HANDLER pfunc, unsigned int param, -+ unsigned int interruptId) -+{ -+ int nRet = -1; -+ char *devname; -+ -+ devname = kmalloc(16, GFP_KERNEL); -+ if (devname) -+ sprintf( devname, "brcm_%d", interruptId ); -+ -+ /* Set the IRQ description to not automatically enable the interrupt at -+ * the end of an ISR. The driver that handles the interrupt must -+ * explicitly call BcmHalInterruptEnable or enable_brcm_irq. This behavior -+ * is consistent with interrupt handling on VxWorks. -+ */ -+ irq_desc[interruptId].handler = &brcm_irq_no_end_type; -+ -+ if( interruptId >= INTERNAL_ISR_TABLE_OFFSET ) -+ { -+ nRet = request_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, -+ devname, (void *) param ); -+ } -+ else if (interruptId >= INTERRUPT_ID_EXTERNAL_0 && interruptId <= INTERRUPT_ID_EXTERNAL_3) -+ { -+ nRet = request_external_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, -+ devname, (void *) param ); -+ } -+ -+ return( nRet ); -+} -+ -+ -+/* Debug function. */ -+ -+void dump_intr_regs(void) -+{ -+ printk("PERF->ExtIrqCfg [%08x]\n", *(&(PERF->ExtIrqCfg))); -+} -+ -+EXPORT_SYMBOL(enable_brcm_irq); -+EXPORT_SYMBOL(disable_brcm_irq); -+EXPORT_SYMBOL(request_external_irq); -+EXPORT_SYMBOL(BcmHalMapInterrupt); -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,172 @@ -+# Kernel and Driver configuration for Broadcom Commengine ADSL board -+choice -+ prompt "Broadcom Commengine ADSL board" -+ depends on MIPS_BRCM -+ default BCM96345 -+ help -+ Select different Broadcom ADSL board -+ -+config BCM96338 -+ bool "96338 ADSL board" -+ select DMA_NONCOHERENT -+ select HW_HAS_PCI -+ -+config BCM96345 -+ bool "96345 ADSL board" -+ select DMA_NONCOHERENT -+ select HW_HAS_PCI -+ -+config BCM96348 -+ bool "96348 ADSL board" -+ select DMA_NONCOHERENT -+ select HW_HAS_PCI -+ -+endchoice -+ -+config BCM_BOARD -+ bool "Support for Broadcom Board" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SERIAL -+ bool "Support for Serial Port" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENET -+ tristate "Support for Ethernet" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_USB -+ tristate "Support for USB" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_WLAN -+ tristate "Support for Wireless" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PCI -+ bool "Support for PCI" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ select PCI -+ -+config BCM_ATMAPI -+ tristate "Support for ATM" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMTEST -+ tristate "Support for ATM Diagnostic" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ADSL -+ tristate "Support for ADSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENDPOINT -+ tristate "Support for VOICE" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PROCFS -+ tristate "Support for PROCFS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_VDSL -+ tristate "Support for VDSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SECURITY -+ tristate "Support for SECURITY" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_HPNA -+ tristate "Support for HPNA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_BOARD_IMPL -+ int "Implementation index for ADSL Board" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SERIAL_IMPL -+ int "Implementation index for Serial" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENET_IMPL -+ int "Implementation index for Ethernet" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_USB_IMPL -+ int "Implementation index for USB" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_WLAN_IMPL -+ int "Implementation index for WIRELESS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMAPI_IMPL -+ int "Implementation index for ATM" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMTEST_IMPL -+ int "Implementation index for ATM Diagnostic" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_BLAA_IMPL -+ int "Implementation index for BLAA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ADSL_IMPL -+ int "Implementation index for ADSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENDPOINT_IMPL -+ int "Implementation index for VOICE" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PROCFS_IMPL -+ int "Implementation index for PROCFS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_VDSL_IMPL -+ int "Implementation index for VDSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SECURITY_IMPL -+ int "Implementation index for SECURITY" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_HPNA_IMPL -+ int "Implementation index for HPNA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+choice -+ prompt "Root File System" -+ depends on MIPS_BRCM -+ default ROOTFS_SQUASHFS -+ help -+ Select root file system on the board flash. -+ -+config ROOTFS_SQUASHFS -+ bool "SQUASHFS" -+config ROOTFS_CRAMFS -+ bool "CRAMFS" -+config ROOTFS_JFFS2 -+ bool "JFFS2" -+config ROOTFS_NFS -+ bool "NFS" -+ -+endchoice -+ -+config ROOT_FLASHFS -+ string "flash partition" -+ depends on ROOTFS_SQUASHFS || ROOTFS_CRAMFS || ROOTFS_JFFS2 -+ default "root=31:0 ro noinitrd" if ROOTFS_SQUASHFS = y || ROOTFS_CRAMFS = y -+ default "root=31:2 ro noinitrd" if ROOTFS_JFFS2 = y -+ help -+ This is the root file system partition on flash memory -+ -+config ROOT_NFS_DIR -+ string "NFS server path" -+ depends on ROOTFS_NFS -+ default "/opt/bcm96338/targets/96338R/fs" if BCM96338 = y -+ default "/opt/bcm96345/targets/96345R/fs" if BCM96345 = y -+ default "/opt/bcm96348/targets/96348R/fs" if BCM96348 = y -+ help -+ This is the path of NFS server (host system) -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,23 @@ -+# -+# Makefile for generic Broadcom MIPS boards -+# -+# Copyright (C) 2004 Broadcom Corporation -+# -+obj-y := irq.o prom.o setup.o time.o ser_init.o bcm63xx_flash.o bcm63xx_led.o board.o boardparms.o cfiflash.o -+ -+SRCBASE := $(TOPDIR) -+EXTRA_CFLAGS += -I$(SRCBASE)/include -+#EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -DDBG -+EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -+ -+ -+ifeq "$(ADSL)" "ANNEX_B" -+EXTRA_CFLAGS += -DADSL_ANNEXB -+endif -+ifeq "$(ADSL)" "SADSL" -+EXTRA_CFLAGS += -DADSL_SADSL -+endif -+ifeq "$(ADSL)" "ANNEX_C" -+EXTRA_CFLAGS += -DADSL_ANNEXC -+endif -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,236 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * prom.c: PROM library initialization code. -+ * -+ */ -+#include <linux/init.h> -+#include <linux/mm.h> -+#include <linux/sched.h> -+#include <linux/bootmem.h> -+#include <linux/blkdev.h> -+#include <asm/addrspace.h> -+#include <asm/bootinfo.h> -+#include <asm/cpu.h> -+#include <asm/time.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#include "boardparms.h" -+#include "softdsl/AdslCoreDefs.h" -+ -+ -+extern int do_syslog(int, char *, int); -+extern void serial_init(void); -+extern void __init InitNvramInfo( void ); -+/*extern void kerSysFlashInit( void );*/ -+/*extern unsigned long get_nvram_start_addr(void);*/ -+void __init create_root_nfs_cmdline( char *cmdline ); -+ -+#if defined(CONFIG_BCM96338) -+#define CPU_CLOCK 240000000 -+#define MACH_BCM MACH_BCM96338 -+#endif -+#if defined(CONFIG_BCM96345) -+#define CPU_CLOCK 140000000 -+#define MACH_BCM MACH_BCM96345 -+#endif -+#if defined(CONFIG_BCM96348) -+void __init calculateCpuSpeed(void); -+static unsigned long cpu_speed; -+#define CPU_CLOCK cpu_speed -+#define MACH_BCM MACH_BCM96348 -+#endif -+ -+const char *get_system_type(void) -+{/* -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ -+ return( pNvramData->szBoardId );*/ -+ return "brcm63xx"; -+} -+ -+unsigned long getMemorySize(void) -+{ -+ unsigned long ulSdramType = BOARD_SDRAM_TYPE; -+ -+ unsigned long ulSdramSize; -+ -+ switch( ulSdramType ) -+ { -+ case BP_MEMORY_16MB_1_CHIP: -+ case BP_MEMORY_16MB_2_CHIP: -+ ulSdramSize = 16 * 1024 * 1024; -+ break; -+ case BP_MEMORY_32MB_1_CHIP: -+ case BP_MEMORY_32MB_2_CHIP: -+ ulSdramSize = 32 * 1024 * 1024; -+ break; -+ case BP_MEMORY_64MB_2_CHIP: -+ ulSdramSize = 64 * 1024 * 1024; -+ break; -+ default: -+ ulSdramSize = 8 * 1024 * 1024; -+ break; -+ } -+ -+ return ulSdramSize; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: prom_init -+ -------------------------------------------------------------------------- */ -+void __init prom_init(void) -+{ -+ extern ulong r4k_interval; -+ -+ serial_init(); -+ -+ /*kerSysFlashInit();*/ -+ -+ do_syslog(8, NULL, 8); -+ -+ printk( "%s prom init\n", get_system_type() ); -+ -+ PERF->IrqMask = 0; -+ -+ arcs_cmdline[0] = '\0'; -+#if 0 -+#if defined(CONFIG_ROOT_NFS) -+ create_root_nfs_cmdline( arcs_cmdline ); -+#endif -+#elif defined(CONFIG_ROOT_FLASHFS) -+ strcpy(arcs_cmdline, CONFIG_ROOT_FLASHFS); -+#endif -+ -+ add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); -+ -+#if defined(CONFIG_BCM96348) -+ calculateCpuSpeed(); -+#endif -+ /* Count register increments every other clock */ -+ r4k_interval = CPU_CLOCK / HZ / 2; -+ mips_hpt_frequency = CPU_CLOCK / 2; -+ -+ mips_machgroup = MACH_GROUP_BRCM; -+ mips_machtype = MACH_BCM; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: prom_free_prom_memory -+Abstract: -+ -------------------------------------------------------------------------- */ -+void __init prom_free_prom_memory(void) -+{ -+ -+} -+ -+#if 0 -+#if defined(CONFIG_ROOT_NFS) -+/* This function reads in a line that looks something like this: -+ * -+ * ++ if (boot_loader_type == BOOT_CFE) ++ if (boot_loader_type == BOOT_CFE) ++ if (boot_loader_type == BOOT_CFE) + * CFE bootline=bcmEnet(0,0)host:vmlinux e=192.169.0.100:ffffff00 h=192.169.0.1 -+ * -+ * -+ * and retuns in the cmdline parameter some that looks like this: -+ * -+ * CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/opt/targets/96345R/fs -+ * ip=192.168.0.100:192.168.0.1::255.255.255.0::eth0:off rw" -+ */ -+#define BOOT_LINE_ADDR 0x0 -+#define HEXDIGIT(d) ((d >= '0' && d <= '9') ? (d - '0') : ((d | 0x20) - 'W')) -+#define HEXBYTE(b) (HEXDIGIT((b)[0]) << 4) + HEXDIGIT((b)[1]) -+extern unsigned long get_nvram_start_addr(void); -+ -+void __init create_root_nfs_cmdline( char *cmdline ) -+{ -+ char root_nfs_cl[] = "root=/dev/nfs nfsroot=%s:" CONFIG_ROOT_NFS_DIR -+ " ip=%s:%s::%s::eth0:off rw"; -+ -+ char *localip = NULL; -+ char *hostip = NULL; -+ char mask[16] = ""; -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ char bootline[128] = ""; -+ char *p = bootline; -+ -+ memcpy(bootline, pNvramData->szBootline, sizeof(bootline)); -+ while( *p ) -+ { -+ if( p[0] == 'e' && p[1] == '=' ) -+ { -+ /* Found local ip address */ -+ p += 2; -+ localip = p; -+ while( *p && *p != ' ' && *p != ':' ) -+ p++; -+ if( *p == ':' ) -+ { -+ /* Found network mask (eg FFFFFF00 */ -+ *p++ = '\0'; -+ sprintf( mask, "%u.%u.%u.%u", HEXBYTE(p), HEXBYTE(p + 2), -+ HEXBYTE(p + 4), HEXBYTE(p + 6) ); -+ p += 4; -+ } -+ else if( *p == ' ' ) -+ *p++ = '\0'; -+ } -+ else if( p[0] == 'h' && p[1] == '=' ) -+ { -+ /* Found host ip address */ -+ p += 2; -+ hostip = p; -+ while( *p && *p != ' ' ) -+ p++; -+ if( *p == ' ' ) -+ *p++ = '\0'; -+ } -+ else -+ p++; -+ } -+ -+ if( localip && hostip ) -+ sprintf( cmdline, root_nfs_cl, hostip, localip, hostip, mask ); -+} -+#endif -+#endif -+ -+#if defined(CONFIG_BCM96348) -+/* ********************************************************************* -+ * calculateCpuSpeed() -+ * Calculate the BCM6348 CPU speed by reading the PLL strap register -+ * and applying the following formula: -+ * cpu_clk = (.25 * 64MHz freq) * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) -+ * Input parameters: -+ * none -+ * Return value: -+ * none -+ ********************************************************************* */ -+void __init calculateCpuSpeed(void) -+{ -+ UINT32 pllStrap = PERF->PllStrap; -+ int n1 = (pllStrap & PLL_N1_MASK) >> PLL_N1_SHFT; -+ int n2 = (pllStrap & PLL_N2_MASK) >> PLL_N2_SHFT; -+ int m1cpu = (pllStrap & PLL_M1_CPU_MASK) >> PLL_M1_CPU_SHFT; -+ -+ cpu_speed = (16 * (n1 + 1) * (n2 + 2) / (m1cpu + 1)) * 1000000; -+} -+#endif -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-07-25 10:51:12.000000000 +0200 -@@ -0,0 +1,180 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Broadcom bcm63xx serial port initialization, also prepare for printk -+ * by registering with console_init -+ * -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/types.h> -+#include <linux/console.h> -+#include <linux/sched.h> -+ -+#include <asm/addrspace.h> -+#include <asm/irq.h> -+#include <asm/reboot.h> -+#include <asm/gdb-stub.h> -+#include <asm/mc146818rtc.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+ -+#define SER63XX_DEFAULT_BAUD 115200 -+#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) -+#define stUart ((volatile Uart * const) UART_BASE) -+ -+// Transmit interrupts -+#define TXINT (TXFIFOEMT | TXUNDERR | TXOVFERR) -+// Receive interrupts -+#define RXINT (RXFIFONE | RXOVFERR) -+ -+/* -------------------------------------------------------------------------- -+ Name: serial_init -+ Purpose: Initalize the UART -+-------------------------------------------------------------------------- */ -+void __init serial_init(void) -+{ -+ UINT32 tmpVal = SER63XX_DEFAULT_BAUD; -+ ULONG clockFreqHz; -+ -+#if defined(CONFIG_BCM96345) -+ // Make sure clock is ticking -+ PERF->blkEnables |= UART_CLK_EN; -+#endif -+ -+ /* Dissable channel's receiver and transmitter. */ -+ stUart->control &= ~(BRGEN|TXEN|RXEN); -+ -+ /*--------------------------------------------------------------------*/ -+ /* Write the table value to the clock select register. */ -+ /* DPullen - this is the equation to use: */ -+ /* value = clockFreqHz / baud / 32-1; */ -+ /* (snmod) Actually you should also take into account any necessary */ -+ /* rounding. Divide by 16, look at lsb, if 0, divide by 2 */ -+ /* and subtract 1. If 1, just divide by 2 */ -+ /*--------------------------------------------------------------------*/ -+ clockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; -+ tmpVal = (clockFreqHz / tmpVal) / 16; -+ if( tmpVal & 0x01 ) -+ tmpVal /= 2; //Rounding up, so sub is already accounted for -+ else -+ tmpVal = (tmpVal / 2) - 1; // Rounding down so we must sub 1 -+ stUart->baudword = tmpVal; -+ -+ /* Finally, re-enable the transmitter and receiver. */ -+ stUart->control |= (BRGEN|TXEN|RXEN); -+ -+ stUart->config = (BITS8SYM | ONESTOP); -+ // Set the FIFO interrupt depth ... stUart->fifocfg = 0xAA; -+ stUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; -+ stUart->intMask = 0; -+ stUart->intMask = RXINT | TXINT; -+} -+ -+ -+/* prom_putc() -+ * Output a character to the UART -+ */ -+void prom_putc(char c) -+{ -+ /* Wait for Tx uffer to empty */ -+ while (! (READ16(stUart->intStatus) & TXFIFOEMT)); -+ /* Send character */ -+ stUart->Data = c; -+} -+ -+/* prom_puts() -+ * Write a string to the UART -+ */ -+void prom_puts(const char *s) -+{ -+ while (*s) { -+ if (*s == '\n') { -+ prom_putc('\r'); -+ } -+ prom_putc(*s++); -+ } -+} -+ -+ -+/* prom_getc_nowait() -+ * Returns a character from the UART -+ * Returns -1 if no characters available or corrupted -+ */ -+int prom_getc_nowait(void) -+{ -+ uint16 uStatus; -+ int cData = -1; -+ -+ uStatus = READ16(stUart->intStatus); -+ -+ if (uStatus & RXFIFONE) { /* Do we have a character? */ -+ cData = READ16(stUart->Data) & 0xff; /* Read character */ -+ if (uStatus & (RXFRAMERR | RXPARERR)) { /* If we got an error, throw it away */ -+ cData = -1; -+ } -+ } -+ -+ return cData; -+} -+ -+/* prom_getc() -+ * Returns a charcter from the serial port -+ * Will block until it receives a valid character -+*/ -+char prom_getc(void) -+{ -+ int cData = -1; -+ -+ /* Loop until we get a valid character */ -+ while(cData == -1) { -+ cData = prom_getc_nowait(); -+ } -+ return (char) cData; -+} -+ -+/* prom_testc() -+ * Returns 0 if no characters available -+ */ -+int prom_testc(void) -+{ -+ uint16 uStatus; -+ -+ uStatus = READ16(stUart->intStatus); -+ -+ return (uStatus & RXFIFONE); -+} -+ -+#if defined (CONFIG_REMOTE_DEBUG) -+/* Prevent other code from writing to the serial port */ -+void _putc(char c) { } -+void _puts(const char *ptr) { } -+#else -+/* Low level outputs call prom routines */ -+void _putc(char c) { -+ prom_putc(c); -+} -+void _puts(const char *ptr) { -+ prom_puts(ptr); -+} -+#endif -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,523 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Generic setup routines for Broadcom 963xx MIPS boards -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/kdev_t.h> -+#include <linux/types.h> -+#include <linux/console.h> -+#include <linux/sched.h> -+#include <linux/mm.h> -+#include <linux/slab.h> -+#include <linux/module.h> -+#include <linux/pm.h> -+ -+#include <asm/addrspace.h> -+#include <asm/bcache.h> -+#include <asm/irq.h> -+#include <asm/time.h> -+#include <asm/reboot.h> -+#include <asm/gdb-stub.h> -+ -+extern void brcm_timer_setup(struct irqaction *irq); -+extern unsigned long getMemorySize(void); -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+#include <linux/pci.h> -+#include <linux/delay.h> -+#include <bcm_map_part.h> -+#include <bcmpci.h> -+ -+static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); -+#endif -+ -+/* This function should be in a board specific directory. For now, -+ * assume that all boards that include this file use a Broadcom chip -+ * with a soft reset bit in the PLL control register. -+ */ -+static void brcm_machine_restart(char *command) -+{ -+ const unsigned long ulSoftReset = 0x00000001; -+ unsigned long *pulPllCtrl = (unsigned long *) 0xfffe0008; -+ *pulPllCtrl |= ulSoftReset; -+} -+ -+static void brcm_machine_halt(void) -+{ -+ printk("System halted\n"); -+ while (1); -+} -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+ -+static void mpi_SetLocalPciConfigReg(uint32 reg, uint32 value) -+{ -+ /* write index then value */ -+ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; -+ mpi->pcicfgdata = value; -+} -+ -+static uint32 mpi_GetLocalPciConfigReg(uint32 reg) -+{ -+ /* write index then get value */ -+ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; -+ return mpi->pcicfgdata; -+} -+ -+/* -+ * mpi_ResetPcCard: Set/Reset the PcCard -+ */ -+static void mpi_ResetPcCard(int cardtype, BOOL bReset) -+{ -+ if (cardtype == MPI_CARDTYPE_NONE) { -+ return; -+ } -+ -+ if (cardtype == MPI_CARDTYPE_CARDBUS) { -+ bReset = ! bReset; -+ } -+ -+ if (bReset) { -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); -+ } else { -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 | PCCARD_CARD_RESET); -+ } -+} -+ -+/* -+ * mpi_ConfigCs: Configure an MPI/EBI chip select -+ */ -+static void mpi_ConfigCs(uint32 cs, uint32 base, uint32 size, uint32 flags) -+{ -+ mpi->cs[cs].base = ((base & 0x1FFFFFFF) | size); -+ mpi->cs[cs].config = flags; -+} -+ -+/* -+ * mpi_InitPcmciaSpace -+ */ -+static void mpi_InitPcmciaSpace(void) -+{ -+ // ChipSelect 4 controls PCMCIA Memory accesses -+ mpi_ConfigCs(PCMCIA_COMMON_BASE, pcmciaMem, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); -+ // ChipSelect 5 controls PCMCIA Attribute accesses -+ mpi_ConfigCs(PCMCIA_ATTRIBUTE_BASE, pcmciaAttr, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); -+ // ChipSelect 6 controls PCMCIA I/O accesses -+ mpi_ConfigCs(PCMCIA_IO_BASE, pcmciaIo, EBI_SIZE_64K, (EBI_WORD_WIDE|EBI_ENABLE)); -+ -+ mpi->pcmcia_cntl2 = ((PCMCIA_ATTR_ACTIVE << RW_ACTIVE_CNT_BIT) | -+ (PCMCIA_ATTR_INACTIVE << INACTIVE_CNT_BIT) | -+ (PCMCIA_ATTR_CE_SETUP << CE_SETUP_CNT_BIT) | -+ (PCMCIA_ATTR_CE_HOLD << CE_HOLD_CNT_BIT)); -+ -+ mpi->pcmcia_cntl2 |= (PCMCIA_HALFWORD_EN | PCMCIA_BYTESWAP_DIS); -+} -+ -+/* -+ * cardtype_vcc_detect: PC Card's card detect and voltage sense connection -+ * -+ * CD1#/ CD2#/ VS1#/ VS2#/ Card Initial Vcc -+ * CCD1# CCD2# CVS1 CVS2 Type -+ * -+ * GND GND open open 16-bit 5 vdc -+ * -+ * GND GND GND open 16-bit 3.3 vdc -+ * -+ * GND GND open GND 16-bit x.x vdc -+ * -+ * GND GND GND GND 16-bit 3.3 & x.x vdc -+ * -+ *==================================================================== -+ * -+ * CVS1 GND CCD1# open CardBus 3.3 vdc -+ * -+ * GND CVS2 open CCD2# CardBus x.x vdc -+ * -+ * GND CVS1 CCD2# open CardBus y.y vdc -+ * -+ * GND CVS2 GND CCD2# CardBus 3.3 & x.x vdc -+ * -+ * CVS2 GND open CCD1# CardBus x.x & y.y vdc -+ * -+ * GND CVS1 CCD2# open CardBus 3.3, x.x & y.y vdc -+ * -+ */ -+static int cardtype_vcc_detect(void) -+{ -+ uint32 data32; -+ int cardtype; -+ -+ cardtype = MPI_CARDTYPE_NONE; -+ mpi->pcmcia_cntl1 = 0x0000A000; // Turn on the output enables and drive -+ // the CVS pins to 0. -+ data32 = mpi->pcmcia_cntl1; -+ switch (data32 & 0x00000003) // Test CD1# and CD2#, see if card is plugged in. -+ { -+ case 0x00000003: // No Card is in the slot. -+ printk("mpi: No Card is in the PCMCIA slot\n"); -+ break; -+ -+ case 0x00000002: // Partial insertion, No CD2#. -+ printk("mpi: Card in the PCMCIA slot partial insertion, no CD2 signal\n"); -+ break; -+ -+ case 0x00000001: // Partial insertion, No CD1#. -+ printk("mpi: Card in the PCMCIA slot partial insertion, no CD1 signal\n"); -+ break; -+ -+ case 0x00000000: -+ mpi->pcmcia_cntl1 = 0x0000A0C0; // Turn off the CVS output enables and -+ // float the CVS pins. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ // Read the Register. -+ switch (data32 & 0x0000000C) // See what is on the CVS pins. -+ { -+ case 0x00000000: // CVS1 and CVS2 are tied to ground, only 1 option. -+ printk("mpi: Detected 3.3 & x.x 16-bit PCMCIA card\n"); -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ break; -+ -+ case 0x00000004: // CVS1 is open or tied to CCD1/CCD2 and CVS2 is tied to ground. -+ // 2 valid voltage options. -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ mpi->pcmcia_cntl1 = 0x0000A080; // Drive CVS1 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS2, not valid. -+ printk("mpi: Unknown card plugged into slot\n"); -+ } else { // CCD2 is tied to CVS1. -+ printk("mpi: Detected 3.3, x.x and y.y Cardbus card\n"); -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ } -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ printk("mpi: Detected x.x vdc 16-bit PCMCIA card\n"); -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ break; -+ } -+ break; -+ -+ case 0x00000008: // CVS2 is open or tied to CCD1/CCD2 and CVS1 is tied to ground. -+ // 2 valid voltage options. -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS1, not valid. -+ printk("mpi: Unknown card plugged into slot\n"); -+ } else {// CCD2 is tied to CVS2. -+ printk("mpi: Detected 3.3 and x.x Cardbus card\n"); -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ } -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ printk("mpi: Detected 3.3 vdc 16-bit PCMCIA card\n"); -+ break; -+ } -+ break; -+ -+ case 0x0000000C: // CVS1 and CVS2 are open or tied to CCD1/CCD2. -+ // 5 valid voltage options. -+ -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ // CCD1 is tied to ground. -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS1. -+ printk("mpi: Detected y.y vdc Cardbus card\n"); -+ } else { // CCD2 is tied to CVS2. -+ printk("mpi: Detected x.x vdc Cardbus card\n"); -+ } -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // CCD2 is tied to ground. -+ -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000001) {// CCD1 is tied to CVS1. -+ printk("mpi: Detected 3.3 vdc Cardbus card\n"); -+ } else { // CCD1 is tied to CVS2. -+ printk("mpi: Detected x.x and y.y Cardbus card\n"); -+ } -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ printk("mpi: Detected 5 vdc 16-bit PCMCIA card\n"); -+ break; -+ } -+ break; -+ -+ default: -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ } -+ } -+ return cardtype; -+} -+ -+/* -+ * mpi_DetectPcCard: Detect the plugged in PC-Card -+ * Return: < 0 => Unknown card detected -+ * 0 => No card detected -+ * 1 => 16-bit card detected -+ * 2 => 32-bit CardBus card detected -+ */ -+static int mpi_DetectPcCard(void) -+{ -+ int cardtype; -+ -+ cardtype = cardtype_vcc_detect(); -+ switch(cardtype) { -+ case MPI_CARDTYPE_PCMCIA: -+ mpi->pcmcia_cntl1 &= ~0x0000e000; // disable enable bits -+ //mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); -+ mpi->pcmcia_cntl1 |= (PCMCIA_ENABLE | PCMCIA_GPIO_ENABLE); -+ mpi_InitPcmciaSpace(); -+ mpi_ResetPcCard(cardtype, FALSE); -+ // Hold card in reset for 10ms -+ mdelay(10); -+ mpi_ResetPcCard(cardtype, TRUE); -+ // Let card come out of reset -+ mdelay(100); -+ break; -+ case MPI_CARDTYPE_CARDBUS: -+ // 8 => CardBus Enable -+ // 1 => PCI Slot Number -+ // C => Float VS1 & VS2 -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & 0xFFFF0000) | -+ CARDBUS_ENABLE | -+ (CARDBUS_SLOT << 8)| -+ VS2_OEN | -+ VS1_OEN; -+ /* access to this memory window will be to/from CardBus */ -+ mpi->l2pmremap1 |= CARDBUS_MEM; -+ -+ // Need to reset the Cardbus Card. There's no CardManager to do this, -+ // and we need to be ready for PCI configuration. -+ mpi_ResetPcCard(cardtype, FALSE); -+ // Hold card in reset for 10ms -+ mdelay(10); -+ mpi_ResetPcCard(cardtype, TRUE); -+ // Let card come out of reset -+ mdelay(100); -+ break; -+ default: -+ break; -+ } -+ return cardtype; -+} -+ -+static int mpi_init(void) -+{ -+ unsigned long data; -+ unsigned int chipid; -+ unsigned int chiprev; -+ unsigned int sdramsize; -+ -+ chipid = (PERF->RevID & 0xFFFF0000) >> 16; -+ chiprev = (PERF->RevID & 0xFF); -+ sdramsize = getMemorySize(); -+ /* -+ * Init the pci interface -+ */ -+ data = GPIO->GPIOMode; // GPIO mode register -+ data |= GROUP2_PCI | GROUP1_MII_PCCARD; // PCI internal arbiter + Cardbus -+ GPIO->GPIOMode = data; // PCI internal arbiter -+ -+ /* -+ * In the BCM6348 CardBus support is defaulted to Slot 0 -+ * because there is no external IDSEL for CardBus. To disable -+ * the CardBus and allow a standard PCI card in Slot 0 -+ * set the cbus_idsel field to 0x1f. -+ */ -+ /* -+ uData = mpi->pcmcia_cntl1; -+ uData |= CARDBUS_IDSEL; -+ mpi->pcmcia_cntl1 = uData; -+ */ -+ // Setup PCI I/O Window range. Give 64K to PCI I/O -+ mpi->l2piorange = ~(BCM_PCI_IO_SIZE_64KB-1); -+ // UBUS to PCI I/O base address -+ mpi->l2piobase = BCM_PCI_IO_BASE & BCM_PCI_ADDR_MASK; -+ // UBUS to PCI I/O Window remap -+ mpi->l2pioremap = (BCM_PCI_IO_BASE | MEM_WINDOW_EN); -+ -+ // enable PCI related GPIO pins and data swap between system and PCI bus -+ mpi->locbuscntrl = (EN_PCI_GPIO | DIR_U2P_NOSWAP); -+ -+ /* Enable 6348 BusMaster and Memory access mode */ -+ data = mpi_GetLocalPciConfigReg(PCI_COMMAND); -+ data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); -+ mpi_SetLocalPciConfigReg(PCI_COMMAND, data); -+ -+ /* Configure two 16 MByte PCI to System memory regions. */ -+ /* These memory regions are used when PCI device is a bus master */ -+ /* Accesses to the SDRAM from PCI bus will be "byte swapped" for this region */ -+ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_3, BCM_HOST_MEM_SPACE1); -+ mpi->sp0remap = 0x0; -+ -+ /* Accesses to the SDRAM from PCI bus will not be "byte swapped" for this region */ -+ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_4, BCM_HOST_MEM_SPACE2); -+ mpi->sp1remap = 0x0; -+ mpi->pcimodesel |= (PCI_BAR2_NOSWAP | 0x40); -+ -+ if ((chipid == 0x6348) && (chiprev == 0xb0)) { -+ mpi->sp0range = ~(sdramsize-1); -+ mpi->sp1range = ~(sdramsize-1); -+ } -+ /* -+ * Change 6348 PCI Cfg Reg. offset 0x40 to PCI memory read retry count infinity -+ * by set 0 in bit 8~15. This resolve read Bcm4306 srom return 0xffff in -+ * first read. -+ */ -+ data = mpi_GetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER); -+ data &= ~BRCM_PCI_CONFIG_TIMER_RETRY_MASK; -+ data |= 0x00000080; -+ mpi_SetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER, data); -+ -+ /* enable pci interrupt */ -+ mpi->locintstat |= (EXT_PCI_INT << 16); -+ -+ mpi_DetectPcCard(); -+ -+ ioport_resource.start = BCM_PCI_IO_BASE; -+ ioport_resource.end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB; -+ -+#if defined(CONFIG_USB) -+ PERF->blkEnables |= USBH_CLK_EN; -+ mdelay(100); -+ *USBH_NON_OHCI = NON_OHCI_BYTE_SWAP; -+#endif -+ -+ return 0; -+} -+#endif -+ -+static int __init brcm63xx_setup(void) -+{ -+ extern int panic_timeout; -+ -+ _machine_restart = brcm_machine_restart; -+ _machine_halt = brcm_machine_halt; -+ pm_power_off = brcm_machine_halt; -+ -+ board_timer_setup = brcm_timer_setup; -+ -+ panic_timeout = 5; -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+ /* mpi initialization */ -+ mpi_init(); -+#endif -+ return 0; -+} -+ -+void plat_setup(void) -+{ -+ brcm63xx_setup(); -+} -+ -+/*************************************************************************** -+ * C++ New and delete operator functions -+ ***************************************************************************/ -+ -+/* void *operator new(unsigned int sz) */ -+void *_Znwj(unsigned int sz) -+{ -+ return( kmalloc(sz, GFP_KERNEL) ); -+} -+ -+/* void *operator new[](unsigned int sz)*/ -+void *_Znaj(unsigned int sz) -+{ -+ return( kmalloc(sz, GFP_KERNEL) ); -+} -+ -+/* placement new operator */ -+/* void *operator new (unsigned int size, void *ptr) */ -+void *ZnwjPv(unsigned int size, void *ptr) -+{ -+ return ptr; -+} -+ -+/* void operator delete(void *m) */ -+void _ZdlPv(void *m) -+{ -+ kfree(m); -+} -+ -+/* void operator delete[](void *m) */ -+void _ZdaPv(void *m) -+{ -+ kfree(m); -+} -+ -+EXPORT_SYMBOL(_Znwj); -+EXPORT_SYMBOL(_Znaj); -+EXPORT_SYMBOL(ZnwjPv); -+EXPORT_SYMBOL(_ZdlPv); -+EXPORT_SYMBOL(_ZdaPv); -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,2 @@ -+#define ADSL_SDRAM_IMAGE_SIZE (384*1024) -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,277 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Setup time for Broadcom 963xx MIPS boards -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/kernel_stat.h> -+#include <linux/sched.h> -+#include <linux/spinlock.h> -+#include <linux/interrupt.h> -+#include <linux/module.h> -+#include <linux/time.h> -+#include <linux/timex.h> -+ -+#include <asm/mipsregs.h> -+#include <asm/ptrace.h> -+#include <asm/div64.h> -+#include <asm/time.h> -+ -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+unsigned long r4k_interval; /* Amount to increment compare reg each time */ -+static unsigned long r4k_cur; /* What counter should be at next timer irq */ -+ -+/* Cycle counter value at the previous timer interrupt.. */ -+static unsigned int timerhi = 0, timerlo = 0; -+ -+extern volatile unsigned long wall_jiffies; -+ -+/* Optional board-specific timer routine */ -+void (*board_timer_interrupt)(int irq, void *dev_id, struct pt_regs * regs); -+ -+static inline void ack_r4ktimer(unsigned long newval) -+{ -+ write_c0_compare(newval); -+} -+ -+/* -+ * There are a lot of conceptually broken versions of the MIPS timer interrupt -+ * handler floating around. This one is rather different, but the algorithm -+ * is provably more robust. -+ */ -+static irqreturn_t brcm_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -+{ -+ unsigned int count; -+ -+ if (r4k_interval == 0) -+ goto null; -+ -+ do { -+ do_timer(regs); -+ -+ if (board_timer_interrupt) -+ board_timer_interrupt(irq, dev_id, regs); -+ -+ r4k_cur += r4k_interval; -+ ack_r4ktimer(r4k_cur); -+ -+ } while (((count = (unsigned long)read_c0_count()) -+ - r4k_cur) < 0x7fffffff); -+ -+ if (!jiffies) { -+ /* -+ * If jiffies has overflowed in this timer_interrupt we must -+ * update the timer[hi]/[lo] to make do_fast_gettimeoffset() -+ * quotient calc still valid. -arca -+ */ -+ timerhi = timerlo = 0; -+ } else { -+ /* -+ * The cycle counter is only 32 bit which is good for about -+ * a minute at current count rates of upto 150MHz or so. -+ */ -+ timerhi += (count < timerlo); /* Wrap around */ -+ timerlo = count; -+ } -+ -+ return IRQ_HANDLED; -+ -+null: -+ ack_r4ktimer(0); -+ return IRQ_NONE; -+} -+ -+static struct irqaction brcm_timer_action = { -+ .handler = brcm_timer_interrupt, -+ .flags = SA_INTERRUPT, -+ .mask = CPU_MASK_NONE, -+ .name = "timer", -+ .next = NULL, -+ .dev_id = brcm_timer_interrupt, -+}; -+ -+ -+void __init brcm_timer_setup(struct irqaction *irq) -+{ -+ r4k_cur = (read_c0_count() + r4k_interval); -+ write_c0_compare(r4k_cur); -+ -+ /* we are using the cpu counter for timer interrupts */ -+ irq->handler = no_action; /* we use our own handler */ -+ setup_irq(MIPS_TIMER_INT, &brcm_timer_action); -+ set_c0_status(IE_IRQ5); -+} -+ -+#if 0 -+/* This is for machines which generate the exact clock. */ -+#define USECS_PER_JIFFY (1000000/HZ) -+#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff) -+ -+static void call_do_div64_32( unsigned long *res, unsigned int high, -+ unsigned int low, unsigned long base ) -+{ -+ do_div64_32(*res, high, low, base); -+} -+ -+/* -+ * FIXME: Does playing with the RP bit in c0_status interfere with this code? -+ */ -+static unsigned long do_fast_gettimeoffset(void) -+{ -+ u32 count; -+ unsigned long res, tmp; -+ -+ /* Last jiffy when do_fast_gettimeoffset() was called. */ -+ static unsigned long last_jiffies=0; -+ unsigned long quotient; -+ -+ /* -+ * Cached "1/(clocks per usec)*2^32" value. -+ * It has to be recalculated once each jiffy. -+ */ -+ static unsigned long cached_quotient=0; -+ -+ tmp = jiffies; -+ -+ quotient = cached_quotient; -+ -+ if (tmp && last_jiffies != tmp) { -+ last_jiffies = tmp; -+#ifdef CONFIG_CPU_MIPS32 -+ if (last_jiffies != 0) { -+ -+ unsigned long r0; -+ /* gcc 3.0.1 gets an internal compiler error if there are two -+ * do_div64_32 inline macros. To work around this problem, -+ * do_div64_32 is called as a function. -+ */ -+ call_do_div64_32(&r0, timerhi, timerlo, tmp); -+ call_do_div64_32("ient, USECS_PER_JIFFY, -+ USECS_PER_JIFFY_FRAC, r0); -+ -+ cached_quotient = quotient; -+ -+ } -+#else -+ __asm__(".set\tnoreorder\n\t" -+ ".set\tnoat\n\t" -+ ".set\tmips3\n\t" -+ "lwu\t%0,%2\n\t" -+ "dsll32\t$1,%1,0\n\t" -+ "or\t$1,$1,%0\n\t" -+ "ddivu\t$0,$1,%3\n\t" -+ "mflo\t$1\n\t" -+ "dsll32\t%0,%4,0\n\t" -+ "nop\n\t" -+ "ddivu\t$0,%0,$1\n\t" -+ "mflo\t%0\n\t" -+ ".set\tmips0\n\t" -+ ".set\tat\n\t" -+ ".set\treorder" -+ :"=&r" (quotient) -+ :"r" (timerhi), -+ "m" (timerlo), -+ "r" (tmp), -+ "r" (USECS_PER_JIFFY) -+ :"$1"); -+ cached_quotient = quotient; -+#endif -+ } -+ -+ /* Get last timer tick in absolute kernel time */ -+ count = read_c0_count(); -+ -+ /* .. relative to previous jiffy (32 bits is enough) */ -+ count -= timerlo; -+ -+ __asm__("multu\t%1,%2\n\t" -+ "mfhi\t%0" -+ :"=r" (res) -+ :"r" (count), -+ "r" (quotient)); -+ -+ /* -+ * Due to possible jiffies inconsistencies, we need to check -+ * the result so that we'll get a timer that is monotonic. -+ */ -+ if (res >= USECS_PER_JIFFY) -+ res = USECS_PER_JIFFY-1; -+ -+ return res; -+} -+ -+void do_gettimeofday(struct timeval *tv) -+{ -+ unsigned int flags; -+ -+ read_lock_irqsave (&xtime_lock, flags); -+ tv->tv_sec = xtime.tv_sec; -+ tv->tv_usec = xtime.tv_nsec/1000; -+ tv->tv_usec += do_fast_gettimeoffset(); -+ -+ /* -+ * xtime is atomically updated in timer_bh. jiffies - wall_jiffies -+ * is nonzero if the timer bottom half hasnt executed yet. -+ */ -+ if (jiffies - wall_jiffies) -+ tv->tv_usec += USECS_PER_JIFFY; -+ -+ read_unlock_irqrestore (&xtime_lock, flags); -+ -+ if (tv->tv_usec >= 1000000) { -+ tv->tv_usec -= 1000000; -+ tv->tv_sec++; -+ } -+} -+ -+EXPORT_SYMBOL(do_gettimeofday); -+ -+int do_settimeofday(struct timespec *tv) -+{ -+ write_lock_irq (&xtime_lock); -+ -+ /* This is revolting. We need to set the xtime.tv_usec correctly. -+ * However, the value in this location is is value at the last tick. -+ * Discover what correction gettimeofday would have done, and then -+ * undo it! -+ */ -+ tv->tv_nsec -= do_fast_gettimeoffset()*NSEC_PER_USEC; -+ -+ if (tv->tv_nsec < 0) { -+ tv->tv_nsec += 1000000*NSEC_PER_USEC; -+ tv->tv_sec--; -+ } -+ -+ xtime.tv_sec = tv->tv_sec; -+ xtime.tv_nsec = tv->tv_nsec; -+ time_adjust = 0; /* stop active adjtime() */ -+ time_status |= STA_UNSYNC; -+ time_maxerror = NTP_PHASE_LIMIT; -+ time_esterror = NTP_PHASE_LIMIT; -+ -+ write_unlock_irq (&xtime_lock); -+} -+ -+EXPORT_SYMBOL(do_settimeofday); -+ -+#endif -diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c ---- linux-2.6.17/arch/mips/brcm-boards/generic/dbg_io.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,260 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/config.h> -+#include <linux/tty.h> -+#include <linux/major.h> -+#include <linux/init.h> -+#include <linux/console.h> -+#include <linux/fs.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/types.h> -+#include <linux/sched.h> -+ -+#include <bcm_map_part.h> -+ -+#undef PRNT /* define for debug printing */ -+ -+#define UART16550_BAUD_2400 2400 -+#define UART16550_BAUD_4800 4800 -+#define UART16550_BAUD_9600 9600 -+#define UART16550_BAUD_19200 19200 -+#define UART16550_BAUD_38400 38400 -+#define UART16550_BAUD_57600 57600 -+#define UART16550_BAUD_115200 115200 -+ -+#define UART16550_PARITY_NONE 0 -+#define UART16550_PARITY_ODD 0x08 -+#define UART16550_PARITY_EVEN 0x18 -+#define UART16550_PARITY_MARK 0x28 -+#define UART16550_PARITY_SPACE 0x38 -+ -+#define UART16550_DATA_5BIT 0x0 -+#define UART16550_DATA_6BIT 0x1 -+#define UART16550_DATA_7BIT 0x2 -+#define UART16550_DATA_8BIT 0x3 -+ -+#define UART16550_STOP_1BIT 0x0 -+#define UART16550_STOP_2BIT 0x4 -+ -+volatile Uart * stUart = UART_BASE; -+ -+#define WRITE16(addr, value) ((*(volatile UINT16 *)((ULONG)&addr)) = value) -+ -+/* Low level UART routines from promcon.c */ -+extern void prom_putc(char c); -+extern char prom_getc(void); -+extern int prom_getc_nowait(void); -+extern int prom_testc(void); -+ -+extern void set_debug_traps(void); -+extern void breakpoint(void); -+extern void enable_brcm_irq(unsigned int); -+extern void set_async_breakpoint(unsigned int epc); -+ -+#ifdef CONFIG_GDB_CONSOLE -+extern void register_gdb_console(void); -+#endif -+ -+int gdb_initialized = 0; -+ -+#define GDB_BUF_SIZE 512 /* power of 2, please */ -+ -+static char gdb_buf[GDB_BUF_SIZE] ; -+static int gdb_buf_in_inx ; -+static atomic_t gdb_buf_in_cnt ; -+static int gdb_buf_out_inx ; -+ -+void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) -+{ -+ /* Do nothing, assume boot loader has already set up serial port */ -+ printk("debugInit called\n"); -+} -+ -+/* -+ * Get a char if available, return -1 if nothing available. -+ * Empty the receive buffer first, then look at the interface hardware. -+ */ -+static int read_char(void) -+{ -+ if (atomic_read(&gdb_buf_in_cnt) != 0) /* intr routine has q'd chars */ -+ { -+ int chr ; -+ -+ chr = gdb_buf[gdb_buf_out_inx++] ; -+ gdb_buf_out_inx &= (GDB_BUF_SIZE - 1) ; -+ atomic_dec(&gdb_buf_in_cnt) ; -+ return(chr) ; -+ } -+ return(prom_getc_nowait()) ; /* read from hardware */ -+} /* read_char */ -+ -+/* -+ * This is the receiver interrupt routine for the GDB stub. -+ * It will receive a limited number of characters of input -+ * from the gdb host machine and save them up in a buffer. -+ * -+ * When the gdb stub routine getDebugChar() is called it -+ * draws characters out of the buffer until it is empty and -+ * then reads directly from the serial port. -+ * -+ * We do not attempt to write chars from the interrupt routine -+ * since the stubs do all of that via putDebugChar() which -+ * writes one byte after waiting for the interface to become -+ * ready. -+ * -+ * The debug stubs like to run with interrupts disabled since, -+ * after all, they run as a consequence of a breakpoint in -+ * the kernel. -+ * -+ * Perhaps someone who knows more about the tty driver than I -+ * care to learn can make this work for any low level serial -+ * driver. -+ */ -+static void gdb_interrupt(int irq, void *dev_id, struct pt_regs * regs) -+{ -+ int chr ; -+ int more; -+ do -+ { -+ chr = prom_getc_nowait() ; -+ more = prom_testc(); -+ if (chr < 0) continue ; -+ -+ /* If we receive a Ctrl-C then this is GDB trying to break in */ -+ if (chr == 3) -+ { -+ /* Replace current instruction with breakpoint */ -+ set_async_breakpoint(regs->cp0_epc); -+ //breakpoint(); -+ } -+ -+#ifdef PRNT -+ printk("gdb_interrupt: chr=%02x '%c', more = %x\n", -+ chr, chr > ' ' && chr < 0x7F ? chr : ' ', more) ; -+#endif -+ -+ if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) -+ { /* buffer overflow, clear it */ -+ gdb_buf_in_inx = 0 ; -+ atomic_set(&gdb_buf_in_cnt, 0) ; -+ gdb_buf_out_inx = 0 ; -+ break ; -+ } -+ -+ gdb_buf[gdb_buf_in_inx++] = chr ; -+ gdb_buf_in_inx &= (GDB_BUF_SIZE - 1) ; -+ atomic_inc(&gdb_buf_in_cnt) ; -+ } -+ while (more !=0); -+ -+} /* gdb_interrupt */ -+ -+/* -+ * getDebugChar -+ * -+ * This is a GDB stub routine. It waits for a character from the -+ * serial interface and then returns it. If there is no serial -+ * interface connection then it returns a bogus value which will -+ * almost certainly cause the system to hang. -+ */ -+int getDebugChar(void) -+{ -+ volatile int chr ; -+ -+#ifdef PRNT -+ printk("getDebugChar: ") ; -+#endif -+ -+ while ( (chr = read_char()) < 0 ) ; -+ -+#ifdef PRNT -+ printk("%c\n", chr > ' ' && chr < 0x7F ? chr : ' ') ; -+#endif -+ return(chr) ; -+ -+} /* getDebugChar */ -+ -+/* -+ * putDebugChar -+ * -+ * This is a GDB stub routine. It waits until the interface is ready -+ * to transmit a char and then sends it. If there is no serial -+ * interface connection then it simply returns to its caller, having -+ * pretended to send the char. -+ */ -+int putDebugChar(unsigned char chr) -+{ -+#ifdef PRNT -+ printk("putDebugChar: chr=%02x '%c'\n", chr, -+ chr > ' ' && chr < 0x7F ? chr : ' ') ; -+#endif -+ -+ prom_putc(chr) ; /* this routine will wait */ -+ return 1; -+ -+} /* putDebugChar */ -+ -+/* Just a NULL routine for testing. */ -+void gdb_null(void) -+{ -+} -+ -+void rs_kgdb_hook(int tty_no) -+{ -+ printk("rs_kgdb_hook: tty %d\n", tty_no); -+ -+ /* Call GDB routine to setup the exception vectors for the debugger */ -+ set_debug_traps(); -+ -+ printk("Breaking into debugger...\n"); -+ breakpoint(); -+ gdb_null() ; -+ printk("Connected.\n"); -+ -+ gdb_initialized = 1; -+ -+#ifdef CONFIG_GDB_CONSOLE -+ register_gdb_console(); -+#endif -+} -+ -+void kgdb_hook_irq() -+{ -+ int retval ; -+ uint16 uMask; -+ -+ printk("GDB: Hooking UART interrupt\n"); -+ -+ retval = request_irq(INTERRUPT_ID_UART, -+ gdb_interrupt, -+ SA_INTERRUPT, -+ "GDB-stub", NULL); -+ -+ if (retval != 0) -+ printk("gdb_hook: request_irq(irq=%d) failed: %d\n", INTERRUPT_ID_UART, retval); -+ -+ // Enable UART config Rx not empty IRQ -+ uMask = READ16(stUart->intMask) ; -+ // printk("intMask: 0x%x\n", uMask); -+ WRITE16(stUart->intMask, uMask | RXFIFONE); -+} -+ -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S ---- linux-2.6.17/arch/mips/brcm-boards/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,59 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Generic interrupt handler for Broadcom MIPS boards -+ */ -+ -+#include <linux/config.h> -+ -+#include <asm/asm.h> -+#include <asm/mipsregs.h> -+#include <asm/regdef.h> -+#include <asm/stackframe.h> -+ -+/* -+ * MIPS IRQ Source -+ * -------- ------ -+ * 0 Software (ignored) -+ * 1 Software (ignored) -+ * 2 Combined hardware interrupt (hw0) -+ * 3 Hardware -+ * 4 Hardware -+ * 5 Hardware -+ * 6 Hardware -+ * 7 R4k timer -+ */ -+ -+ .text -+ .set noreorder -+ .set noat -+ .align 5 -+ NESTED(brcmIRQ, PT_SIZE, sp) -+ SAVE_ALL -+ CLI -+ .set noreorder -+ .set at -+ -+ jal brcm_irq_dispatch -+ move a0, sp -+ -+ j ret_from_irq -+ nop -+ -+ END(brcmIRQ) -diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/Makefile linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/Makefile ---- linux-2.6.17/arch/mips/brcm-boards/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/Makefile 2006-07-13 19:11:33.000000000 +0200 -@@ -0,0 +1,11 @@ -+# -+# Makefile for generic Broadcom MIPS boards -+# -+# Copyright (C) 2001 Broadcom Corporation -+# -+obj-y := int-handler.o -+ -+ifdef CONFIG_REMOTE_DEBUG -+obj-y += dbg_io.o -+endif -+ diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch b/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch index 7efed280217..5d6d6c9205a 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch @@ -1,6 +1,6 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c --- linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-07-25 12:57:09.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,1056 @@ +/* +<:copyright-gpl @@ -1060,7 +1060,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c li +console_initcall(bcm63xx_console_init); diff -urN linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/Makefile linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile --- linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-07-25 10:43:50.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,13 @@ +# File: bcmdrivers/opensource/char/serial +# @@ -1077,7 +1077,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/Makefile linux-2. + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 2006-07-25 10:44:46.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,64 @@ +/* +<:copyright-gpl @@ -1145,7 +1145,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_intr.h linux- + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 2006-07-25 10:44:59.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,334 @@ +/* +<:copyright-gpl @@ -1483,7 +1483,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h li + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 2006-07-25 10:45:09.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,72 @@ +/* +<:copyright-gpl @@ -1559,7 +1559,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_intr.h linux- + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 2006-07-25 10:45:19.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,163 @@ +/* +<:copyright-gpl @@ -1726,7 +1726,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h li + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 2006-07-25 10:45:33.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,74 @@ +/* +<:copyright-gpl @@ -1804,7 +1804,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_intr.h linux- + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 2006-07-25 10:44:21.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,500 @@ +/* +<:copyright-gpl @@ -2308,7 +2308,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h li + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 2006-07-25 10:43:50.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,59 @@ +/* +<:copyright-gpl @@ -2371,7 +2371,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h linux-2 +#endif diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 2006-07-25 10:43:50.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,34 @@ +/* +<:copyright-gpl @@ -2409,7 +2409,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h lin + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmpci.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 2006-07-25 10:43:50.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,87 @@ +/* +<:copyright-gpl @@ -2500,7 +2500,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmpci.h linux-2.6 +#endif diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmTag.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 2006-07-25 10:43:50.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,153 @@ +/* +<:copyright-gpl @@ -2657,7 +2657,7 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmTag.h linux-2.6 + diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 2006-07-25 10:43:50.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,163 @@ +/* +<:copyright-gpl @@ -2824,8 +2824,8 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h linux-2 +#endif diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h --- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/board.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h 2006-07-25 11:00:10.000000000 +0200 -@@ -0,0 +1,368 @@ ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h 2006-08-03 16:42:46.000000000 +0200 +@@ -0,0 +1,374 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -3085,6 +3085,8 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6. + kLedPPP, + kLedVoip, + kLedSes, ++ kLedLan, ++ kLedSelfTest, + kLedEnd, // NOTE: Insert the new led name before this one. Alway stay at the end. +} BOARD_LED_NAME; + @@ -3191,12 +3193,16 @@ diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6. +void kerSysWakeupMonitorTask( void ); +#endif + ++#define BOOT_CFE 0 ++#define BOOT_REDBOOT 1 ++ ++extern int boot_loader_type; + +#endif /* _BOARD_H */ + diff -urN linux-2.6.17/bcmdrivers/opensource/Makefile linux-2.6.17-brcm63xx/bcmdrivers/opensource/Makefile --- linux-2.6.17/bcmdrivers/opensource/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/Makefile 2006-07-25 10:43:50.000000000 +0200 ++++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/Makefile 2006-08-03 16:42:38.000000000 +0200 @@ -0,0 +1,20 @@ +# File: modules/drivers/Makefile +# From 8d3609858c0e8c7394f41c51b5773049f04d86d6 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Thu, 3 Aug 2006 17:01:30 +0000 Subject: [PATCH 426/757] Fix brcm63xx patch (humm diff laught at me) SVN-Revision: 4427 --- .../patches/001-brcm_boards.patch | 9216 +++++++++++++++++ 1 file changed, 9216 insertions(+) diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch index 79913989f55..9e667989857 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch @@ -1,33 +1,9249 @@ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,775 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ *************************************************************************** ++ * File Name : bcm63xx_flash.c ++ * ++ * Description: This file contains the flash device driver APIs for bcm63xx board. ++ * ++ * Created on : 8/10/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) ++ * ++ ***************************************************************************/ ++ ++ ++/* Includes. */ ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#define BCMTAG_EXE_USE ++#include <bcmTag.h> ++#include "cfiflash.h" ++#include "boardparms.h" ++ ++//#define DEBUG_FLASH ++ ++static FLASH_ADDR_INFO fInfo; ++static int flashInitialized = 0; ++ ++void *retriedKmalloc(size_t size) ++{ ++ void *pBuf; ++ int tryCount = 0; ++ ++ // try 1000 times before quit ++ while (((pBuf = kmalloc(size, GFP_KERNEL)) == NULL) && (tryCount++ < 1000)) ++ { ++ current->state = TASK_INTERRUPTIBLE; ++ schedule_timeout(HZ/10); ++ } ++ if (tryCount >= 1000) ++ pBuf = NULL; ++ else ++ memset(pBuf, 0, size); ++ ++ return pBuf; ++} ++ ++void retriedKfree(void *pBuf) ++{ ++ kfree(pBuf); ++} ++ ++/*************************************************************************** ++// Function Name: getCrc32 ++// Description : caculate the CRC 32 of the given data. ++// Parameters : pdata - array of data. ++// size - number of input data bytes. ++// crc - either CRC32_INIT_VALUE or previous return value. ++// Returns : crc. ++****************************************************************************/ ++UINT32 getCrc32(byte *pdata, UINT32 size, UINT32 crc) ++{ ++ while (size-- > 0) ++ crc = (crc >> 8) ^ Crc32_table[(crc ^ *pdata++) & 0xff]; ++ ++ return crc; ++} ++ ++// get the nvram start addr ++// ++unsigned long get_nvram_start_addr(void) ++{ ++ return ((unsigned long) ++ (flash_get_memptr(fInfo.flash_nvram_start_blk) + fInfo.flash_nvram_blk_offset)); ++} ++ ++// get the scratch_pad start addr ++// ++unsigned long get_scratch_pad_start_addr(void) ++{ ++ return ((unsigned long) ++ (flash_get_memptr(fInfo.flash_scratch_pad_start_blk) + fInfo.flash_scratch_pad_blk_offset)); ++} ++ ++ ++ ++/* ********************************************************************* ++ * kerSysImageTagGet() ++ * Get the image tag ++ * Input parameters: ++ * none ++ * Return value: ++ * point to tag -- Found ++ * NULL -- failed ++ ********************************************************************* */ ++PFILE_TAG kerSysImageTagGet(void) ++{ ++ int i; ++ int totalBlks = flash_get_numsectors(); ++ UINT32 crc; ++ unsigned char *sectAddr; ++ PFILE_TAG pTag; ++ ++#if defined(DEBUG_FLASH) ++ printk("totalblks in tagGet=%d\n", totalBlks); ++#endif ++ + // start from 2nd blk, assume 1st one is always CFE ++ for (i = 1; i < totalBlks; i++) ++ { ++ sectAddr = flash_get_memptr((byte) i); ++ crc = CRC32_INIT_VALUE; ++ crc = getCrc32(sectAddr, (UINT32)TAG_LEN-TOKEN_LEN, crc); ++ pTag = (PFILE_TAG) sectAddr; ++ ++#if defined(DEBUG_FLASH) ++ printk("Check Tag crc on blk [%d]\n", i); ++#endif ++ ++ if (crc == (UINT32)(*(UINT32*)(pTag->tagValidationToken))) ++ return pTag; ++ } ++ ++ return (PFILE_TAG) NULL; ++} ++ ++// Initialize the flash and fill out the fInfo structure ++void kerSysFlashInit( void ) ++{ ++ int i = 0; ++ int totalBlks = 0; ++ int totalSize = 0; ++ int startAddr = 0; ++ int usedBlkSize = 0; ++ NVRAM_DATA nvramData; ++ UINT32 crc = CRC32_INIT_VALUE, savedCrc; ++ PFILE_TAG pTag = NULL; ++ unsigned long kernelEndAddr = 0; ++ unsigned long spAddr = 0; ++ ++ if (flashInitialized) ++ return; ++ ++ flashInitialized = 1; ++ flash_init(); ++ ++ totalBlks = flash_get_numsectors(); ++ totalSize = flash_get_total_size(); ++ ++ printk("Total Flash size: %dK with %d sectors\n", totalSize/1024, totalBlks); ++ ++ /* nvram is always at the end of flash */ ++ fInfo.flash_nvram_length = FLASH45_LENGTH_NVRAM; ++ fInfo.flash_nvram_start_blk = 0; /* always the first block */ ++ fInfo.flash_nvram_number_blk = 1; /*always fits in the first block */ ++ fInfo.flash_nvram_blk_offset = NVRAM_DATA_OFFSET; ++ ++ // check nvram CRC ++ memcpy((char *)&nvramData, (char *)get_nvram_start_addr(), sizeof(NVRAM_DATA)); ++ savedCrc = nvramData.ulCheckSum; ++ nvramData.ulCheckSum = 0; ++ crc = getCrc32((char *)&nvramData, (UINT32) sizeof(NVRAM_DATA), crc); ++ ++ BpSetBoardId( nvramData.szBoardId ); ++ ++ fInfo.flash_persistent_length = NVRAM_PSI_DEFAULT; ++ if (savedCrc != crc) ++ { ++ printk("***Board is not initialized****: Using the default PSI size: %d\n", ++ fInfo.flash_persistent_length); ++ } ++ else ++ { ++ unsigned long ulPsiSize; ++ if( BpGetPsiSize( &ulPsiSize ) == BP_SUCCESS ) ++ fInfo.flash_persistent_length = ulPsiSize; ++ else ++ { ++ printk("***Board id is not set****: Using the default PSI size: %d\n", ++ fInfo.flash_persistent_length); ++ } ++ } ++ ++ fInfo.flash_persistent_length *= ONEK; ++ startAddr = totalSize - fInfo.flash_persistent_length; ++ fInfo.flash_persistent_start_blk = flash_get_blk(startAddr+FLASH_BASE_ADDR_REG); ++ fInfo.flash_persistent_number_blk = totalBlks - fInfo.flash_persistent_start_blk; ++ // save abs SP address (Scratch Pad). it is before PSI ++ spAddr = startAddr - SP_MAX_LEN ; ++ // find out the offset in the start_blk ++ usedBlkSize = 0; ++ for (i = fInfo.flash_persistent_start_blk; ++ i < (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk); i++) ++ { ++ usedBlkSize += flash_get_sector_size((byte) i); ++ } ++ fInfo.flash_persistent_blk_offset = usedBlkSize - fInfo.flash_persistent_length; ++ ++ // get the info for sp ++ if (!(pTag = kerSysImageTagGet())) ++ { ++ printk("Failed to read image tag from flash\n"); ++ return; ++ } ++ kernelEndAddr = (unsigned long) simple_strtoul(pTag->kernelAddress, NULL, 10) + \ ++ (unsigned long) simple_strtoul(pTag->kernelLen, NULL, 10); ++ ++ // make suer sp does not share kernel block ++ fInfo.flash_scratch_pad_start_blk = flash_get_blk(spAddr+FLASH_BASE_ADDR_REG); ++ if (fInfo.flash_scratch_pad_start_blk != flash_get_blk(kernelEndAddr)) ++ { ++ fInfo.flash_scratch_pad_length = SP_MAX_LEN; ++ if (fInfo.flash_persistent_start_blk == fInfo.flash_scratch_pad_start_blk) // share blk ++ { ++#if 1 /* do not used scratch pad unless it's in its own sector */ ++ printk("Scratch pad is not used for this flash part.\n"); ++ fInfo.flash_scratch_pad_length = 0; // no sp ++#else /* allow scratch pad to share a sector with another section such as PSI */ ++ fInfo.flash_scratch_pad_number_blk = 1; ++ fInfo.flash_scratch_pad_blk_offset = fInfo.flash_persistent_blk_offset - fInfo.flash_scratch_pad_length; ++#endif ++ } ++ else // on different blk ++ { ++ fInfo.flash_scratch_pad_number_blk = fInfo.flash_persistent_start_blk\ ++ - fInfo.flash_scratch_pad_start_blk; ++ // find out the offset in the start_blk ++ usedBlkSize = 0; ++ for (i = fInfo.flash_scratch_pad_start_blk; ++ i < (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk); i++) ++ usedBlkSize += flash_get_sector_size((byte) i); ++ fInfo.flash_scratch_pad_blk_offset = usedBlkSize - fInfo.flash_scratch_pad_length; ++ } ++ } ++ else ++ { ++ printk("No flash for scratch pad!\n"); ++ fInfo.flash_scratch_pad_length = 0; // no sp ++ } ++ ++#if defined(DEBUG_FLASH) ++ printk("fInfo.flash_scratch_pad_start_blk = %d\n", fInfo.flash_scratch_pad_start_blk); ++ printk("fInfo.flash_scratch_pad_number_blk = %d\n", fInfo.flash_scratch_pad_number_blk); ++ printk("fInfo.flash_scratch_pad_length = 0x%x\n", fInfo.flash_scratch_pad_length); ++ printk("fInfo.flash_scratch_pad_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_scratch_pad_blk_offset); ++ ++ printk("fInfo.flash_nvram_start_blk = %d\n", fInfo.flash_nvram_start_blk); ++ printk("fInfo.flash_nvram_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_nvram_blk_offset); ++ printk("fInfo.flash_nvram_number_blk = %d\n", fInfo.flash_nvram_number_blk); ++ ++ printk("psi startAddr = %x\n", startAddr+FLASH_BASE_ADDR_REG); ++ printk("fInfo.flash_persistent_start_blk = %d\n", fInfo.flash_persistent_start_blk); ++ printk("fInfo.flash_persistent_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_persistent_blk_offset); ++ printk("fInfo.flash_persistent_number_blk = %d\n", fInfo.flash_persistent_number_blk); ++#endif ++ ++} ++ ++ ++ ++/*********************************************************************** ++ * Function Name: kerSysFlashAddrInfoGet ++ * Description : Fills in a structure with information about the NVRAM ++ * and persistent storage sections of flash memory. ++ * Fro physmap.c to mount the fs vol. ++ * Returns : None. ++ ***********************************************************************/ ++void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info) ++{ ++ pflash_addr_info->flash_nvram_blk_offset = fInfo.flash_nvram_blk_offset; ++ pflash_addr_info->flash_nvram_length = fInfo.flash_nvram_length; ++ pflash_addr_info->flash_nvram_number_blk = fInfo.flash_nvram_number_blk; ++ pflash_addr_info->flash_nvram_start_blk = fInfo.flash_nvram_start_blk; ++ pflash_addr_info->flash_persistent_blk_offset = fInfo.flash_persistent_blk_offset; ++ pflash_addr_info->flash_persistent_length = fInfo.flash_persistent_length; ++ pflash_addr_info->flash_persistent_number_blk = fInfo.flash_persistent_number_blk; ++ pflash_addr_info->flash_persistent_start_blk = fInfo.flash_persistent_start_blk; ++} ++ ++ ++// get shared blks into *** pTempBuf *** which has to be released bye the caller! ++// return: if pTempBuf != NULL, poits to the data with the dataSize of the buffer ++// !NULL -- ok ++// NULL -- fail ++static char *getSharedBlks(int start_blk, int end_blk) ++{ ++ int i = 0; ++ int usedBlkSize = 0; ++ int sect_size = 0; ++ char *pTempBuf = NULL; ++ char *pBuf = NULL; ++ ++ for (i = start_blk; i < end_blk; i++) ++ usedBlkSize += flash_get_sector_size((byte) i); ++ ++#if defined(DEBUG_FLASH) ++ printk("usedBlkSize = %d\n", usedBlkSize); ++#endif ++ ++ if ((pTempBuf = (char *) retriedKmalloc(usedBlkSize)) == NULL) ++ { ++ printk("failed to allocate memory with size: %d\n", usedBlkSize); ++ return pTempBuf; ++ } ++ ++ pBuf = pTempBuf; ++ for (i = start_blk; i < end_blk; i++) ++ { ++ sect_size = flash_get_sector_size((byte) i); ++ ++#if defined(DEBUG_FLASH) ++ printk("i = %d, sect_size = %d, end_blk = %d\n", i, sect_size, end_blk); ++#endif ++ flash_read_buf((byte)i, 0, pBuf, sect_size); ++ pBuf += sect_size; ++ } ++ ++ return pTempBuf; ++} ++ ++ ++ ++// Set the pTempBuf to flash from start_blk to end_blk ++// return: ++// 0 -- ok ++// -1 -- fail ++static int setSharedBlks(int start_blk, int end_blk, char *pTempBuf) ++{ ++ int i = 0; ++ int sect_size = 0; ++ int sts = 0; ++ char *pBuf = pTempBuf; ++ ++ for (i = start_blk; i < end_blk; i++) ++ { ++ sect_size = flash_get_sector_size((byte) i); ++ flash_sector_erase_int(i); ++ if (flash_write_buf(i, 0, pBuf, sect_size) != sect_size) ++ { ++ printk("Error writing flash sector %d.", i); ++ sts = -1; ++ break; ++ } ++ pBuf += sect_size; ++ } ++ ++ return sts; ++} ++ ++ ++ ++/******************************************************************************* ++ * NVRAM functions ++ *******************************************************************************/ ++ ++// get nvram data ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysNvRamGet(char *string, int strLen, int offset) ++{ ++ char *pBuf = NULL; ++ ++ if (!flashInitialized) ++ kerSysFlashInit(); ++ ++ if (strLen > FLASH45_LENGTH_NVRAM) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) ++ return -1; ++ ++ // get string off the memory buffer ++ memcpy(string, (pBuf + fInfo.flash_nvram_blk_offset + offset), strLen); ++ ++ retriedKfree(pBuf); ++ ++ return 0; ++} ++ ++ ++// set nvram ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysNvRamSet(char *string, int strLen, int offset) ++{ ++ int sts = 0; ++ char *pBuf = NULL; ++ ++ if (strLen > FLASH45_LENGTH_NVRAM) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) ++ return -1; ++ ++ // set string to the memory buffer ++ memcpy((pBuf + fInfo.flash_nvram_blk_offset + offset), string, strLen); ++ ++ if (setSharedBlks(fInfo.flash_nvram_start_blk, ++ (fInfo.flash_nvram_number_blk + fInfo.flash_nvram_start_blk), pBuf) != 0) ++ sts = -1; ++ ++ retriedKfree(pBuf); ++ ++ return sts; ++} ++ ++ ++/*********************************************************************** ++ * Function Name: kerSysEraseNvRam ++ * Description : Erase the NVRAM storage section of flash memory. ++ * Returns : 1 -- ok, 0 -- fail ++ ***********************************************************************/ ++int kerSysEraseNvRam(void) ++{ ++ int sts = 1; ++ char *tempStorage = retriedKmalloc(FLASH45_LENGTH_NVRAM); ++ ++ // just write the whole buf with '0xff' to the flash ++ if (!tempStorage) ++ sts = 0; ++ else ++ { ++ memset(tempStorage, 0xff, FLASH45_LENGTH_NVRAM); ++ if (kerSysNvRamSet(tempStorage, FLASH45_LENGTH_NVRAM, 0) != 0) ++ sts = 0; ++ retriedKfree(tempStorage); ++ } ++ ++ return sts; ++} ++ ++ ++/******************************************************************************* ++ * PSI functions ++ *******************************************************************************/ ++// get psi data ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysPersistentGet(char *string, int strLen, int offset) ++{ ++ char *pBuf = NULL; ++ ++ if (strLen > fInfo.flash_persistent_length) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) ++ return -1; ++ ++ // get string off the memory buffer ++ memcpy(string, (pBuf + fInfo.flash_persistent_blk_offset + offset), strLen); ++ ++ retriedKfree(pBuf); ++ ++ return 0; ++} ++ ++ ++// set psi ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysPersistentSet(char *string, int strLen, int offset) ++{ ++ int sts = 0; ++ char *pBuf = NULL; ++ ++ if (strLen > fInfo.flash_persistent_length) ++ return -1; ++ ++ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) ++ return -1; ++ ++ // set string to the memory buffer ++ memcpy((pBuf + fInfo.flash_persistent_blk_offset + offset), string, strLen); ++ ++ if (setSharedBlks(fInfo.flash_persistent_start_blk, ++ (fInfo.flash_persistent_number_blk + fInfo.flash_persistent_start_blk), pBuf) != 0) ++ sts = -1; ++ ++ retriedKfree(pBuf); ++ ++ return sts; ++} ++ ++ ++// flash bcm image ++// return: ++// 0 - ok ++// !0 - the sector number fail to be flashed (should not be 0) ++int kerSysBcmImageSet( int flash_start_addr, char *string, int size) ++{ ++ int sts; ++ int sect_size; ++ int blk_start; ++ int i; ++ char *pTempBuf = NULL; ++ int whole_image = 0; ++ ++ blk_start = flash_get_blk(flash_start_addr); ++ if( blk_start < 0 ) ++ return( -1 ); ++ ++ if (flash_start_addr == FLASH_BASE && size > FLASH45_LENGTH_BOOT_ROM) ++ whole_image = 1; ++ ++ /* write image to flash memory */ ++ do ++ { ++ sect_size = flash_get_sector_size(blk_start); ++// NOTE: for memory problem in multiple PVC configuration, temporary get rid of kmalloc this 64K for now. ++// if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) ++// { ++// printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); ++// kerSysMipsSoftReset(); // reset the board right away. ++// } ++ // for whole image, no check on psi ++ if (!whole_image && blk_start == fInfo.flash_persistent_start_blk) // share the blk with psi ++ { ++ if (size > (sect_size - fInfo.flash_persistent_length)) ++ { ++ printk("Image is too big\n"); ++ break; // image is too big. Can not overwrite to nvram ++ } ++ if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) ++ { ++ printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); ++ kerSysMipsSoftReset(); // reset the board right away. ++ } ++ flash_read_buf((byte)blk_start, 0, pTempBuf, sect_size); ++ if (copy_from_user((void *)pTempBuf,(void *)string, size) != 0) ++ break; // failed ? ++ flash_sector_erase_int(blk_start); // erase blk before flash ++ if (flash_write_buf(blk_start, 0, pTempBuf, sect_size) == sect_size) ++ size = 0; // break out and say all is ok ++ retriedKfree(pTempBuf); ++ break; ++ } ++ ++ flash_sector_erase_int(blk_start); // erase blk before flash ++ ++ if (sect_size > size) ++ { ++ if (size & 1) ++ size++; ++ sect_size = size; ++ } ++ ++ if ((i = flash_write_buf(blk_start, 0, string, sect_size)) != sect_size) { ++ break; ++ } ++ blk_start++; ++ string += sect_size; ++ size -= sect_size; ++ } while (size > 0); ++ ++ if (whole_image) ++ { ++ // If flashing a whole image, erase to end of flash. ++ int total_blks = flash_get_numsectors(); ++ while( blk_start < total_blks ) ++ { ++ flash_sector_erase_int(blk_start); ++ blk_start++; ++ } ++ } ++ if (pTempBuf) ++ retriedKfree(pTempBuf); ++ ++ if( size == 0 ) ++ sts = 0; // ok ++ else ++ sts = blk_start; // failed to flash this sector ++ ++ return sts; ++} ++ ++/******************************************************************************* ++ * SP functions ++ *******************************************************************************/ ++// get sp data. NOTE: memcpy work here -- not using copy_from/to_user ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysScratchPadGet(char *tokenId, char *tokBuf, int bufLen) ++{ ++ PSP_HEADER pHead = NULL; ++ PSP_TOKEN pToken = NULL; ++ char *pBuf = NULL; ++ char *pShareBuf = NULL; ++ char *startPtr = NULL; ++ char *endPtr = NULL; ++ char *spEndPtr = NULL; ++ int sts = -1; ++ ++ if (fInfo.flash_scratch_pad_length == 0) ++ return sts; ++ ++ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) ++ { ++ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ ++ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); ++ return sts; ++ } ++ ++ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) ++ return sts; ++ ++ // pBuf points to SP buf ++ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; ++ ++ pHead = (PSP_HEADER) pBuf; ++ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) ++ { ++ printk("Scrap pad is not initialized.\n"); ++ return sts; ++ } ++ ++ // search up to SPUsedLen for the token ++ startPtr = pBuf + sizeof(SP_HEADER); ++ endPtr = pBuf + pHead->SPUsedLen; ++ spEndPtr = pBuf + SP_MAX_LEN; ++ while (startPtr < endPtr && startPtr < spEndPtr) ++ { ++ pToken = (PSP_TOKEN) startPtr; ++ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) ++ { ++ memcpy(tokBuf, startPtr + sizeof(SP_TOKEN), bufLen); ++ sts = 0; ++ break; ++ } ++ // get next token ++ startPtr += sizeof(SP_TOKEN) + pToken->tokenLen; ++ } ++ ++ retriedKfree(pShareBuf); ++ ++ return sts; ++} ++ ++ ++// set sp. NOTE: memcpy work here -- not using copy_from/to_user ++// return: ++// 0 - ok ++// -1 - fail ++int kerSysScratchPadSet(char *tokenId, char *tokBuf, int bufLen) ++{ ++ PSP_TOKEN pToken = NULL; ++ PSP_HEADER pHead = NULL; ++ char *pShareBuf = NULL; ++ char *pBuf = NULL; ++ SP_HEADER SPHead; ++ SP_TOKEN SPToken; ++ char *curPtr; ++ int sts = -1; ++ ++ if (fInfo.flash_scratch_pad_length == 0) ++ return sts; ++ ++ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) ++ { ++ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ ++ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); ++ return sts; ++ } ++ ++ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) ++ return sts; ++ ++ // pBuf points to SP buf ++ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; ++ pHead = (PSP_HEADER) pBuf; ++ ++ // form header info. SPUsedLen later on... ++ memset((char *)&SPHead, 0, sizeof(SP_HEADER)); ++ memcpy(SPHead.SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN); ++ SPHead.SPVersion = SP_VERSION; ++ ++ // form token info. ++ memset((char*)&SPToken, 0, sizeof(SP_TOKEN)); ++ strncpy(SPToken.tokenName, tokenId, TOKEN_NAME_LEN - 1); ++ SPToken.tokenLen = bufLen; ++ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) ++ { ++ // new sp, so just flash the token ++ printk("No Scrap pad found. Initialize scratch pad...\n"); ++ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; ++ memcpy(pBuf, (char *)&SPHead, sizeof(SP_HEADER)); ++ curPtr = pBuf + sizeof(SP_HEADER); ++ memcpy(curPtr, (char *)&SPToken, sizeof(SP_TOKEN)); ++ curPtr += sizeof(SP_TOKEN); ++ memcpy(curPtr, tokBuf, bufLen); ++ } ++ else ++ { ++ // need search for the token, if exist with same size overwrite it. if sizes differ, ++ // move over the later token data over and put the new one at the end ++ char *endPtr = pBuf + pHead->SPUsedLen; ++ char *spEndPtr = pBuf + SP_MAX_LEN; ++ curPtr = pBuf + sizeof(SP_HEADER); ++ while (curPtr < endPtr && curPtr < spEndPtr) ++ { ++ pToken = (PSP_TOKEN) curPtr; ++ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) ++ { ++ if (pToken->tokenLen == bufLen) // overwirte it ++ { ++ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); ++ break; ++ } ++ else // move later data over and put the new token at the end ++ { ++ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); // ~~~ ++ break; ++ } ++ } ++ else // not same token ~~~ ++ { ++ } ++ // get next token ++ curPtr += sizeof(SP_TOKEN) + pToken->tokenLen; ++ } // end while ++ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; // ~~~ ++ if (SPHead.SPUsedLen > SP_MAX_LEN) ++ { ++ printk("No more Scratch pad space left! Over limit by %d bytes\n", SPHead.SPUsedLen - SP_MAX_LEN); ++ return sts; ++ } ++ ++ } // else if not new sp ++ ++ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk, ++ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf); ++ ++ retriedKfree(pShareBuf); ++ ++ return sts; ++ ++ ++} ++ ++int kerSysFlashSizeGet(void) ++{ ++ return flash_get_total_size(); ++} ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,582 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : bcm63xx_led.c ++ * ++ * Description: ++ * ++ * This file contains bcm963xx board led control API functions. ++ * ++ * To use it, do the following ++ * ++ * 1). define in the board.c the following led mappping (this is for 6345GW board): ++ * const LED_MAP_PAIR cLedMapping45GW[] = ++ * { // led name Initial state physical pin (ledMask) ++ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, ++ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, ++ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 ++ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, ++ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, ++ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. ++ * ++ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping ++ * pointer from the above struct ++ * ++ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); ++ * ++ * 3). Sample call for kernel mode: ++ * ++ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h ++ * ++ * 4). Sample call for user mode ++ * ++ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h ++ * ++ * ++ * Created on : 10/28/2002 seanl ++ * ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/netdevice.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define k100ms (HZ / 10) // ~100 ms ++#define kFastBlinkCount 0 // ~100ms ++#define kSlowBlinkCount 5 // ~600ms ++ ++#define MAX_VIRT_LEDS 12 ++ ++// uncomment // for debug led ++//#define DEBUG_LED ++ ++// global variables: ++struct timer_list gLedTimer; ++int gTimerOn = FALSE; ++int gLedCount = 0; ++ ++typedef struct ledinfo ++{ ++ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLow; // GPIO bit reset to turn on LED ++ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED ++ BOARD_LED_STATE ledState; // current led state ++ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState ++ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. ++} LED_INFO, *PLED_INFO; ++ ++static PLED_INFO gLed = NULL; ++static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; ++ ++#if 0 /* BROKEN */ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++static int gLedOffInBridgeMode = 1; ++#elif defined(CONFIG_BCM96345) ++static int gLedOffInBridgeMode = 0; ++#endif ++#endif ++ ++void ledTimerExpire(void); ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); ++ ++//************************************************************************************** ++// LED operations ++//************************************************************************************** ++ ++// turn led on and set the ledState ++void ledOn(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMask; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateOn; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOff(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio |= pLed->ledMask; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++// turn led on and set the ledState ++void ledOnFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateFail; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOffFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++ ++// toggle the led and return the current ledState ++BOARD_LED_STATE ledToggle(PLED_INFO pLed) ++{ ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if (GPIO->GPIOio & pLed->ledMask) ++ { ++ GPIO->GPIOio &= ~(pLed->ledMask); ++ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); ++ } ++ else ++ { ++ GPIO->GPIOio |= pLed->ledMask; ++ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); ++ } ++} ++ ++ ++// led timer. Will return if timer is already on ++void ledTimerStart(void) ++{ ++ if (gTimerOn) ++ return; ++ ++#if defined(DEBUG_LED) ++ printk("led: add_timer\n"); ++#endif ++ ++ init_timer(&gLedTimer); ++ gLedTimer.function = (void*)ledTimerExpire; ++ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms ++ add_timer (&gLedTimer); ++ gTimerOn = TRUE; ++} ++ ++ ++// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and ++// restart the timer according to ledState ++void ledTimerExpire(void) ++{ ++ int i; ++ PLED_INFO pCurLed; ++ ++ gTimerOn = FALSE; ++ ++ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) ++ { ++#if defined(DEBUG_LED) ++ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); ++#endif ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ case kLedStateOff: ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ break; ++ ++ case kLedStateBlinkOnce: ++ ledToggle(pCurLed); ++ pCurLed->blinkCountDown = 0; // reset to 0 ++ pCurLed->ledState = pCurLed->savedLedState; ++ if (pCurLed->ledState == kLedStateSlowBlinkContinues || ++ pCurLed->ledState == kLedStateFastBlinkContinues) ++ ledTimerStart(); // start timer if in blinkContinues stats ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ } ++} ++ ++// initialize the gLedCount and allocate and fill gLed struct ++void __init boardLedInit(PLED_MAP_PAIR cLedMapping) ++{ ++ PLED_MAP_PAIR p1, p2; ++ PLED_INFO pCurLed; ++ int needTimer = FALSE; ++ int alreadyUsed = 0; ++ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ ++ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; ++ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; ++#endif ++ ++ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); ++ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); ++ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); ++ ++ gLedCount = 0; ++ ++ // Check for multiple LED names and multiple LED GPIO pins that share the ++ // same physical board LED. ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ gLedCount++; ++ } ++ ++ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); ++ if( gLed == NULL ) ++ { ++ printk( "LED memory allocation error.\n" ); ++ return; ++ } ++ ++ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); ++ ++ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led ++ // (ledMask) the first defined led's ledInitState will be used. ++ pCurLed = gLed; ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ if( (int) p1->ledName > MAX_VIRT_LEDS ) ++ continue; ++ ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ { ++ // Initialize the board LED for the first time. ++ needTimer = initLedInfo( p1, pCurLed ); ++ gpVirtLeds[(int) p1->ledName] = pCurLed; ++ pCurLed++; ++ } ++ else ++ { ++ PLED_INFO pLed; ++ for( pLed = gLed; pLed != pCurLed; pLed++ ) ++ { ++ // Find the LED_INFO structure that has already been initialized. ++ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || ++ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) ++ { ++ // The board LED has already been initialized but possibly ++ // not completely initialized. ++ if( p1->ledMask ) ++ { ++ pLed->ledMask = p1->ledMask; ++ pLed->ledActiveLow = p1->ledActiveLow; ++ } ++ if( p1->ledMaskFail ) ++ { ++ pLed->ledMaskFail = p1->ledMaskFail; ++ pLed->ledActiveLowFail = p1->ledActiveLowFail; ++ } ++ gpVirtLeds[(int) p1->ledName] = pLed; ++ break; ++ } ++ } ++ } ++ } ++ ++ if (needTimer) ++ ledTimerStart(); ++ ++#if defined(DEBUG_LED) ++ int i; ++ for (i=0; i < gLedCount; i++) ++ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); ++#endif ++ ++} ++ ++// Initialize a structure that contains information about a physical board LED ++// control. The board LED may contain more than one GPIO pin to control a ++// normal condition (green) or a failure condition (red). ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) ++{ ++ int needTimer = FALSE; ++ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; ++ pCurLed->ledMask = pCurMap->ledMask; ++ pCurLed->ledActiveLow = pCurMap->ledActiveLow; ++ pCurLed->ledMaskFail = pCurMap->ledMaskFail; ++ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; ++ ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOn(pCurLed); ++ break; ++ case kLedStateOff: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOff(pCurLed); ++ break; ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOnFail(pCurLed); ++ break; ++ case kLedStateBlinkOnce: ++ pCurLed->blinkCountDown = 1; ++ needTimer = TRUE; ++ break; ++ case kLedStateSlowBlinkContinues: ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ needTimer = TRUE; ++ break; ++ case kLedStateFastBlinkContinues: ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ needTimer = TRUE; ++ break; ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ ++ return( needTimer ); ++} ++ ++#if 0 /* BROKEN */ ++// Determines if there is at least one interface in bridge mode. Bridge mode ++// is determined by the cfm convention of naming bridge interfaces nas17 ++// through nas24. ++static int isBridgedProtocol(void) ++{ ++ extern int dev_get(const char *name); ++ const int firstBridgeId = 17; ++ const int lastBridgeId = 24; ++ int i; ++ int ret = FALSE; ++ char name[16]; ++ ++ for( i = firstBridgeId; i <= lastBridgeId; i++ ) ++ { ++ sprintf( name, "nas%d", i ); ++ ++ if( dev_get(name) ) ++ { ++ ret = TRUE; ++ break; ++ } ++ } ++ ++ return(ret); ++} ++#endif ++ ++// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation ++void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ PLED_INFO ledInfoPtr; ++ ++ // do the mapping from virtual to physical led ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ ledInfoPtr = gpVirtLeds[(int) ledName]; ++ else ++ ledInfoPtr = NULL; ++ ++ if (ledInfoPtr == NULL) ++ return; ++ ++ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) ++ { ++ (*gLedHwFunc[(int) ledName]) (ledName, ledState); ++ ledOffFail(ledInfoPtr); ++ return; ++ } ++ else ++ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) ++ { ++ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); ++ ledOff(ledInfoPtr); ++ return; ++ } ++ ++#if 0 /* BROKEN */ ++ // Do not blink the WAN Data LED if at least one interface is in bridge mode. ++ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) ++ { ++ static int BridgedProtocol = -1; ++ ++ if( BridgedProtocol == -1 ) ++ BridgedProtocol = isBridgedProtocol(); ++ ++ if( BridgedProtocol == TRUE ) ++ return; ++ } ++#endif ++ ++ // If the state is kLedStateFail and there is not a failure LED defined ++ // in the board parameters, change the state to kLedStateFastBlinkContinues. ++ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) ++ ledState = kLedStateFastBlinkContinues; ++ ++ switch (ledState) ++ { ++ case kLedStateOn: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on the specified LED GPIO. ++ ledOn(ledInfoPtr); ++ break; ++ ++ case kLedStateOff: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn off the specified LED GPIO. ++ ledOff(ledInfoPtr); ++ break; ++ ++ case kLedStateFail: ++ // First, turn off the complimentary (normal) LED GPIO. ++ if( ledInfoPtr->ledMask ) ++ ledOff(ledInfoPtr); ++ else ++ if( gLedHwFunc[(int) ledName] ) ++ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on (red) the specified LED GPIO. ++ ledOnFail(ledInfoPtr); ++ break; ++ ++ case kLedStateBlinkOnce: ++ // skip blinkOnce if it is already in Slow/Fast blink continues state ++ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || ++ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) ++ ; ++ else ++ { ++ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 ++ { ++ ledToggle(ledInfoPtr); ++ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires ++ ledInfoPtr->ledState = kLedStateBlinkOnce; ++ ledTimerStart(); ++ } ++ } ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ ledInfoPtr->blinkCountDown = kSlowBlinkCount; ++ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ ledInfoPtr->blinkCountDown = kFastBlinkCount; ++ ledInfoPtr->ledState = kLedStateFastBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid led state\n"); ++ } ++} ++ ++// This function is called for an LED that is controlled by hardware. ++void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) ++{ ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ { ++ if( ledFailType == 1 ) ++ gLedHwFailFunc[(int) ledName] = ledHwFunc; ++ else ++ gLedHwFunc[(int) ledName] = ledHwFunc; ++ } ++} ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c 2006-08-03 16:37:21.000000000 +0200 +@@ -0,0 +1,1781 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : board.c ++ * ++ * Description: This file contains Linux character device driver entry ++ * for the board related ioctl calls: flash, get free kernel ++ * page and dump kernel memory, etc. ++ * ++ * Created on : 2/20/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) ++ * ++ ***************************************************************************/ ++ ++ ++/* Includes. */ ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/interrupt.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/pagemap.h> ++#include <asm/uaccess.h> ++#include <linux/wait.h> ++#include <linux/poll.h> ++#include <linux/sched.h> ++#include <linux/list.h> ++#include <linux/if.h> ++#include <linux/spinlock.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include <bcmTag.h> ++#include "boardparms.h" ++#include "cfiflash.h" ++#include "bcm_intr.h" ++#include "board.h" ++#include "bcm_map_part.h" ++ ++static DEFINE_SPINLOCK(board_lock); ++ ++/* Typedefs. */ ++#if defined (NON_CONSECUTIVE_MAC) ++// used to be the last octet. Now changed to the first 5 bits of the the forth octet ++// to reduced the duplicated MAC addresses. ++#define CHANGED_OCTET 3 ++#define SHIFT_BITS 3 ++#else ++#define CHANGED_OCTET 1 ++#define SHIFT_BITS 0 ++#endif ++ ++#if defined (WIRELESS) ++#define SES_BTN_PRESSED 0x00000001 ++#define SES_EVENTS SES_BTN_PRESSED /*OR all values if any*/ ++#define SES_LED_OFF 0 ++#define SES_LED_ON 1 ++#define SES_LED_BLINK 2 ++#endif ++ ++typedef struct ++{ ++ unsigned long ulId; ++ char chInUse; ++ char chReserved[3]; ++} MAC_ADDR_INFO, *PMAC_ADDR_INFO; ++ ++typedef struct ++{ ++ unsigned long ulSdramSize; ++ unsigned long ulPsiSize; ++ unsigned long ulNumMacAddrs; ++ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ MAC_ADDR_INFO MacAddrs[1]; ++} NVRAM_INFO, *PNVRAM_INFO; ++ ++typedef struct ++{ ++ unsigned long eventmask; ++} BOARD_IOC, *PBOARD_IOC; ++ ++ ++/*Dyinggasp callback*/ ++typedef void (*cb_dgasp_t)(void *arg); ++typedef struct _CB_DGASP__LIST ++{ ++ struct list_head list; ++ char name[IFNAMSIZ]; ++ cb_dgasp_t cb_dgasp_fn; ++ void *context; ++}CB_DGASP_LIST , *PCB_DGASP_LIST; ++ ++ ++static LED_MAP_PAIR LedMapping[] = ++{ // led name Initial state physical pin (ledMask) ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. ++}; ++ ++/* Externs. */ ++extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); ++extern unsigned int nr_free_pages (void); ++extern const char *get_system_type(void); ++extern void kerSysFlashInit(void); ++extern unsigned long get_nvram_start_addr(void); ++extern unsigned long get_scratch_pad_start_addr(void); ++extern unsigned long getMemorySize(void); ++extern void __init boardLedInit(PLED_MAP_PAIR); ++extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); ++extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); ++ ++/* Prototypes. */ ++void __init InitNvramInfo( void ); ++static int board_open( struct inode *inode, struct file *filp ); ++static int board_ioctl( struct inode *inode, struct file *flip, unsigned int command, unsigned long arg ); ++static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos); ++static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait); ++static int board_release(struct inode *inode, struct file *filp); ++ ++static BOARD_IOC* borad_ioc_alloc(void); ++static void borad_ioc_free(BOARD_IOC* board_ioc); ++ ++/* DyingGasp function prototype */ ++static void __init kerSysDyingGaspMapIntr(void); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); ++#else ++static unsigned int kerSysDyingGaspIsr(void); ++#endif ++static void __init kerSysInitDyingGaspHandler( void ); ++static void __exit kerSysDeinitDyingGaspHandler( void ); ++/* -DyingGasp function prototype - */ ++ ++ ++#if defined (WIRELESS) ++static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs); ++static void __init sesBtn_mapGpio(void); ++static void __init sesBtn_mapIntr(int context); ++static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait); ++static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos); ++static void __init sesLed_mapGpio(void); ++static void sesLed_ctrl(int action); ++static void __init ses_board_init(void); ++static void __exit ses_board_deinit(void); ++#endif ++ ++static PNVRAM_INFO g_pNvramInfo = NULL; ++static int g_ledInitialized = 0; ++static wait_queue_head_t g_board_wait_queue; ++static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; ++ ++static int g_wakeup_monitor = 0; ++static struct file *g_monitor_file = NULL; ++static struct task_struct *g_monitor_task = NULL; ++static unsigned int (*g_orig_fop_poll) ++ (struct file *, struct poll_table_struct *) = NULL; ++ ++static struct file_operations board_fops = ++{ ++ open: board_open, ++ ioctl: board_ioctl, ++ poll: board_poll, ++ read: board_read, ++ release: board_release, ++}; ++ ++uint32 board_major = 0; ++ ++#if defined (WIRELESS) ++static unsigned short sesBtn_irq = BP_NOT_DEFINED; ++static unsigned short sesBtn_gpio = BP_NOT_DEFINED; ++static unsigned short sesLed_gpio = BP_NOT_DEFINED; ++#endif ++ ++#if defined(MODULE) ++int init_module(void) ++{ ++ return( brcm_board_init() ); ++} ++ ++void cleanup_module(void) ++{ ++ if (MOD_IN_USE) ++ printk("brcm flash: cleanup_module failed because module is in use\n"); ++ else ++ brcm_board_cleanup(); ++} ++#endif //MODULE ++ ++ ++ ++static int __init brcm_board_init( void ) ++{ ++ typedef int (*BP_LED_FUNC) (unsigned short *); ++ static struct BpLedInformation ++ { ++ BOARD_LED_NAME ledName; ++ BP_LED_FUNC bpFunc; ++ BP_LED_FUNC bpFuncFail; ++ } bpLedInfo[] = ++ {{kLedAdsl, BpGetAdslLedGpio, BpGetAdslFailLedGpio}, ++ {kLedWireless, BpGetWirelessLedGpio, NULL}, ++ {kLedUsb, BpGetUsbLedGpio, NULL}, ++ {kLedHpna, BpGetHpnaLedGpio, NULL}, ++ {kLedWanData, BpGetWanDataLedGpio, NULL}, ++ {kLedPPP, BpGetPppLedGpio, BpGetPppFailLedGpio}, ++ {kLedVoip, BpGetVoipLedGpio, NULL}, ++ {kLedSes, BpGetWirelessSesLedGpio, NULL}, ++ {kLedEnd, NULL, NULL} ++ }; ++ ++ int ret; ++ ++ ret = register_chrdev(BOARD_DRV_MAJOR, "bcrmboard", &board_fops ); ++ if (ret < 0) ++ printk( "brcm_board_init(major %d): fail to register device.\n",BOARD_DRV_MAJOR); ++ else ++ { ++ PLED_MAP_PAIR pLedMap = LedMapping; ++ unsigned short gpio; ++ struct BpLedInformation *pInfo; ++ ++ printk("brcmboard: brcm_board_init entry\n"); ++ board_major = BOARD_DRV_MAJOR; + if (boot_loader_type == BOOT_CFE) ++ InitNvramInfo(); ++ ++#if !defined(CONFIG_BCM96338) ++ GPIO->GPIOMode &= ~(0x000F0000); ++#endif ++ ++ pLedMap[0].ledName = kLedSelfTest ; ++ pLedMap[0].ledMask = GPIO_NUM_TO_MASK(0); ++ pLedMap[0].ledActiveLow = 0; ++ ++ pLedMap[1].ledName = kLedAdsl; ++ pLedMap[1].ledMask = GPIO_NUM_TO_MASK(1); ++ pLedMap[1].ledActiveLow = 0; ++ ++ pLedMap[2].ledName = kLedLan ; ++ pLedMap[2].ledMask = GPIO_NUM_TO_MASK(2); ++ pLedMap[2].ledActiveLow = 0; ++ ++ pLedMap[3].ledName = kLedVoip ; ++ pLedMap[3].ledMask = GPIO_NUM_TO_MASK(3); ++ pLedMap[3].ledActiveLow = 0; ++ ++ pLedMap[4].ledName = kLedWireless ; ++ pLedMap[4].ledMask = GPIO_NUM_TO_MASK(4); ++ pLedMap[4].ledActiveLow = 0; ++ ++ pLedMap[5].ledName = kLedEnd; ++ ++#if 0 ++ for( pInfo = bpLedInfo; pInfo->ledName != kLedEnd; pInfo++ ) ++ { ++ if( pInfo->bpFunc && (*pInfo->bpFunc) (&gpio) == BP_SUCCESS ) ++ { ++ pLedMap->ledName = pInfo->ledName; ++ pLedMap->ledMask = GPIO_NUM_TO_MASK(gpio); ++ pLedMap->ledActiveLow = (gpio & BP_ACTIVE_LOW) ? 1 : 0; ++ } ++ if( pInfo->bpFuncFail && (*pInfo->bpFuncFail) (&gpio) == BP_SUCCESS ) ++ { ++ pLedMap->ledName = pInfo->ledName; ++ pLedMap->ledMaskFail = GPIO_NUM_TO_MASK(gpio); ++ pLedMap->ledActiveLowFail = (gpio & BP_ACTIVE_LOW) ? 1 : 0; ++ } ++ if( pLedMap->ledName != kLedEnd ) ++ pLedMap++; ++ } ++#endif ++ init_waitqueue_head(&g_board_wait_queue); ++#if defined (WIRELESS) ++ ses_board_init(); ++#endif ++ kerSysInitDyingGaspHandler(); ++ kerSysDyingGaspMapIntr(); ++ ++ boardLedInit(LedMapping); ++ g_ledInitialized = 1; ++ } ++ ++ return ret; ++} ++ ++void __init InitNvramInfo( void ) ++{ ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ unsigned long ulNumMacAddrs = pNvramData->ulNumMacAddrs; ++ ++ if( ulNumMacAddrs > 0 && ulNumMacAddrs <= NVRAM_MAC_COUNT_MAX ) ++ { ++ unsigned long ulNvramInfoSize = ++ sizeof(NVRAM_INFO) + ((sizeof(MAC_ADDR_INFO) - 1) * ulNumMacAddrs); ++ ++ g_pNvramInfo = (PNVRAM_INFO) kmalloc( ulNvramInfoSize, GFP_KERNEL ); ++ ++ if( g_pNvramInfo ) ++ { ++ unsigned long ulPsiSize; ++ if( BpGetPsiSize( &ulPsiSize ) != BP_SUCCESS ) ++ ulPsiSize = NVRAM_PSI_DEFAULT; ++ memset( g_pNvramInfo, 0x00, ulNvramInfoSize ); ++ g_pNvramInfo->ulPsiSize = ulPsiSize * 1024; ++ g_pNvramInfo->ulNumMacAddrs = pNvramData->ulNumMacAddrs; ++ memcpy( g_pNvramInfo->ucaBaseMacAddr, pNvramData->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ g_pNvramInfo->ulSdramSize = getMemorySize(); ++ } ++ else ++ printk("ERROR - Could not allocate memory for NVRAM data\n"); ++ } ++ else ++ printk("ERROR - Invalid number of MAC addresses (%ld) is configured.\n", ++ ulNumMacAddrs); ++} ++ ++void __exit brcm_board_cleanup( void ) ++{ ++ printk("brcm_board_cleanup()\n"); ++ ++ if (board_major != -1) ++ { ++#if defined (WIRELESS) ++ ses_board_deinit(); ++#endif ++ kerSysDeinitDyingGaspHandler(); ++ unregister_chrdev(board_major, "board_ioctl"); ++ } ++} ++ ++static BOARD_IOC* borad_ioc_alloc(void) ++{ ++ BOARD_IOC *board_ioc =NULL; ++ board_ioc = (BOARD_IOC*) kmalloc( sizeof(BOARD_IOC) , GFP_KERNEL ); ++ if(board_ioc) ++ { ++ memset(board_ioc, 0, sizeof(BOARD_IOC)); ++ } ++ return board_ioc; ++} ++ ++static void borad_ioc_free(BOARD_IOC* board_ioc) ++{ ++ if(board_ioc) ++ { ++ kfree(board_ioc); ++ } ++} ++ ++ ++static int board_open( struct inode *inode, struct file *filp ) ++{ ++ filp->private_data = borad_ioc_alloc(); ++ ++ if (filp->private_data == NULL) ++ return -ENOMEM; ++ ++ return( 0 ); ++} ++ ++static int board_release(struct inode *inode, struct file *filp) ++{ ++ BOARD_IOC *board_ioc = filp->private_data; ++ ++ wait_event_interruptible(g_board_wait_queue, 1); ++ borad_ioc_free(board_ioc); ++ ++ return( 0 ); ++} ++ ++ ++static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait) ++{ ++ unsigned int mask = 0; ++#if defined (WIRELESS) ++ BOARD_IOC *board_ioc = filp->private_data; ++#endif ++ ++ poll_wait(filp, &g_board_wait_queue, wait); ++#if defined (WIRELESS) ++ if(board_ioc->eventmask & SES_EVENTS){ ++ mask |= sesBtn_poll(filp, wait); ++ } ++#endif ++ ++ return mask; ++} ++ ++ ++static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) ++{ ++#if defined (WIRELESS) ++ BOARD_IOC *board_ioc = filp->private_data; ++ if(board_ioc->eventmask & SES_EVENTS){ ++ return sesBtn_read(filp, buffer, count, ppos); ++ } ++#endif ++ return 0; ++} ++ ++//************************************************************************************** ++// Utitlities for dump memory, free kernel pages, mips soft reset, etc. ++//************************************************************************************** ++ ++/*********************************************************************** ++ * Function Name: dumpaddr ++ * Description : Display a hex dump of the specified address. ++ ***********************************************************************/ ++void dumpaddr( unsigned char *pAddr, int nLen ) ++{ ++ static char szHexChars[] = "0123456789abcdef"; ++ char szLine[80]; ++ char *p = szLine; ++ unsigned char ch, *q; ++ int i, j; ++ unsigned long ul; ++ ++ while( nLen > 0 ) ++ { ++ sprintf( szLine, "%8.8lx: ", (unsigned long) pAddr ); ++ p = szLine + strlen(szLine); ++ ++ for(i = 0; i < 16 && nLen > 0; i += sizeof(long), nLen -= sizeof(long)) ++ { ++ ul = *(unsigned long *) &pAddr[i]; ++ q = (unsigned char *) &ul; ++ for( j = 0; j < sizeof(long); j++ ) ++ { ++ *p++ = szHexChars[q[j] >> 4]; ++ *p++ = szHexChars[q[j] & 0x0f]; ++ *p++ = ' '; ++ } ++ } ++ ++ for( j = 0; j < 16 - i; j++ ) ++ *p++ = ' ', *p++ = ' ', *p++ = ' '; ++ ++ *p++ = ' ', *p++ = ' ', *p++ = ' '; ++ ++ for( j = 0; j < i; j++ ) ++ { ++ ch = pAddr[j]; ++ *p++ = (ch > ' ' && ch < '~') ? ch : '.'; ++ } ++ ++ *p++ = '\0'; ++ printk( "%s\r\n", szLine ); ++ ++ pAddr += i; ++ } ++ printk( "\r\n" ); ++} /* dumpaddr */ ++ ++ ++void kerSysMipsSoftReset(void) ++{ ++#if defined(CONFIG_BCM96348) ++ if (PERF->RevID == 0x634800A1) { ++ typedef void (*FNPTR) (void); ++ FNPTR bootaddr = (FNPTR) FLASH_BASE; ++ int i; ++ ++ /* Disable interrupts. */ ++ //cli(); ++ spin_lock_irq(&board_lock); ++ ++ /* Reset all blocks. */ ++ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; ++ for( i = 0; i < 1000000; i++ ) ++ ; ++ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; ++ /* Jump to the power on address. */ ++ (*bootaddr) (); ++ } ++ else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++#else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++#endif ++} ++ ++ ++int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) ++{ ++ int nRet = 0; ++ PMAC_ADDR_INFO pMai = NULL; ++ PMAC_ADDR_INFO pMaiFreeNoId = NULL; ++ PMAC_ADDR_INFO pMaiFreeId = NULL; ++ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; ++ ++ /* CMO -- Fix le problème avec les adresses mac que l'on n'arrive pas ++ * * à relire plusieurs fois */ ++ /* inv_xde */ + if (boot_loader_type == BOOT_CFE) ++ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ else { ++ pucaMacAddr[0] = 0x00; ++ pucaMacAddr[1] = 0x07; ++ pucaMacAddr[2] = 0x3A; ++ pucaMacAddr[3] = 0xFF; ++ pucaMacAddr[4] = 0xFF; ++ pucaMacAddr[5] = 0xFF; ++ } ++ ++ return nRet; ++#if 0 ++ for( i = 0, pMai = g_pNvramInfo->MacAddrs; i < g_pNvramInfo->ulNumMacAddrs; ++ i++, pMai++ ) ++ { ++ if( ulId == pMai->ulId || ulId == MAC_ADDRESS_ANY ) ++ { ++ /* This MAC address has been used by the caller in the past. */ ++ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ shiftedIdx = i; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMai->chInUse = 1; ++ pMaiFreeNoId = pMaiFreeId = NULL; ++ break; ++ } ++ else ++ if( pMai->chInUse == 0 ) ++ { ++ if( pMai->ulId == 0 && pMaiFreeNoId == NULL ) ++ { ++ /* This is an available MAC address that has never been ++ * used. ++ */ ++ pMaiFreeNoId = pMai; ++ ulIdxNoId = i; ++ } ++ else ++ if( pMai->ulId != 0 && pMaiFreeId == NULL ) ++ { ++ /* This is an available MAC address that has been used ++ * before. Use addresses that have never been used ++ * first, before using this one. ++ */ ++ pMaiFreeId = pMai; ++ ulIdxId = i; ++ } ++ } ++ } ++ ++ if( pMaiFreeNoId || pMaiFreeId ) ++ { ++ /* An available MAC address was found. */ ++ memcpy(pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr,NVRAM_MAC_ADDRESS_LEN); ++ if( pMaiFreeNoId ) ++ { ++ shiftedIdx = ulIdxNoId; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMaiFreeNoId->ulId = ulId; ++ pMaiFreeNoId->chInUse = 1; ++ } ++ else ++ { ++ shiftedIdx = ulIdxId; ++ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); ++ pMaiFreeId->ulId = ulId; ++ pMaiFreeId->chInUse = 1; ++ } ++ } ++ else ++ if( i == g_pNvramInfo->ulNumMacAddrs ) ++ nRet = -EADDRNOTAVAIL; ++ ++ return( nRet ); ++#endif ++} /* kerSysGetMacAddr */ ++ ++int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) ++{ ++ int nRet = -EINVAL; ++ unsigned long ulIdx = 0; ++ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - ++ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); ++ ++ // if overflow 255 (negitive), add 256 to have the correct index ++ if (idx < 0) ++ idx += 256; ++ ulIdx = (unsigned long) (idx >> SHIFT_BITS); ++ ++ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) ++ { ++ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; ++ if( pMai->chInUse == 1 ) ++ { ++ pMai->chInUse = 0; ++ nRet = 0; ++ } ++ } ++ ++ return( nRet ); ++} /* kerSysReleaseMacAddr */ ++ ++int kerSysGetSdramSize( void ) ++{ + if (boot_loader_type == BOOT_CFE) { ++ return( (int) g_pNvramInfo->ulSdramSize ); ++ } ++ else { ++ printk("kerSysGetSdramSize : 0x%08X\n", (int)getMemorySize() + 0x00040000); ++ return((int)getMemorySize() + 0x00040000); ++ } ++} /* kerSysGetSdramSize */ ++ ++ ++void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ if (g_ledInitialized) ++ boardLedCtrl(ledName, ledState); ++} ++ ++unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) ++{ ++ int mask = (*g_orig_fop_poll) (f, t); ++ ++ if( g_wakeup_monitor == 1 && g_monitor_file == f ) ++ { ++ /* If g_wakeup_monitor is non-0, the user mode application needs to ++ * return from a blocking select function. Return POLLPRI which will ++ * cause the select to return with the exception descriptor set. ++ */ ++ mask |= POLLPRI; ++ g_wakeup_monitor = 0; ++ } ++ ++ return( mask ); ++} ++ ++/* Put the user mode application that monitors link state on a run queue. */ ++void kerSysWakeupMonitorTask( void ) ++{ ++ g_wakeup_monitor = 1; ++ if( g_monitor_task ) ++ wake_up_process( g_monitor_task ); ++} ++ ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++int kerSysGetResetHold(void) ++{ ++ unsigned short gpio; ++ ++ if( BpGetPressAndHoldResetGpio( &gpio ) == BP_SUCCESS ) ++ { ++#if defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ //printk("gpio=%04x,gpio_mask=%04x,gpio_reg=%04x\n",gpio,gpio_mask,*gpio_reg); ++ if(*gpio_reg & gpio_mask) //press down ++ return RESET_BUTTON_UP; ++ } ++ return RESET_BUTTON_PRESSDOWN; ++} ++//<<JUNHON, 2004/09/15 ++ ++//******************************************************************************************** ++// misc. ioctl calls come to here. (flash, led, reset, kernel memory access, etc.) ++//******************************************************************************************** ++static int board_ioctl( struct inode *inode, struct file *flip, ++ unsigned int command, unsigned long arg ) ++{ ++ int ret = 0; ++ BOARD_IOCTL_PARMS ctrlParms; ++ unsigned char ucaMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ int allowedSize; ++ ++ switch (command) ++ { ++ case BOARD_IOCTL_FLASH_INIT: ++ // not used for now. kerSysBcmImageInit(); ++ break; ++ ++ ++ case BOARD_IOCTL_FLASH_WRITE: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ NVRAM_DATA SaveNvramData; ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ ++ switch (ctrlParms.action) ++ { ++ case SCRATCH_PAD: + if (boot_loader_type == BOOT_CFE) { ++ ret = kerSysScratchPadSet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case PERSISTENT: + if (boot_loader_type == BOOT_CFE) { ++ ret = kerSysPersistentSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case NVRAM: + if (boot_loader_type == BOOT_CFE) { ++ ret = kerSysNvRamSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ + case BCM_IMAGE_CFE: + if (boot_loader_type == BOOT_CFE) { ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > FLASH45_LENGTH_BOOT_ROM ) ++ { + printk("Illegal CFE size [%d]. Size allowed: [%d]\n", ++ ctrlParms.strLen, FLASH45_LENGTH_BOOT_ROM); ++ ret = -1; ++ break; ++ } ++ ++ // save NVRAM data into a local structure ++ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); ++ ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ ++ // if nvram is not valid, restore the current nvram settings ++ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && ++ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) ++ { ++ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); ++ } ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ case BCM_IMAGE_FS: + if (boot_loader_type == BOOT_CFE) { ++ allowedSize = (int) flash_get_total_size() - FLASH_RESERVED_AT_END - TAG_LEN - FLASH45_LENGTH_BOOT_ROM; ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize) ++ { ++ printk("Illegal root file system size [%d]. Size allowed: [%d]\n", ++ ctrlParms.strLen, ctrlParms.offset - allowedSize); ++ ret = -1; ++ break; ++ } ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ kerSysMipsSoftReset(); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case BCM_IMAGE_KERNEL: // not used for now. + if (boot_loader_type == BOOT_CFE) { ++ allowedSize = (int) flash_get_total_size() - FLASH_RESERVED_AT_END - TAG_LEN - ctrlParms.offset; ++ ++ printk("kernel size = [%d]. Allowed size = [%d]\n", ctrlParms.strLen, allowedSize); ++ ++ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize ) ++ { ++ printk("Kernel size is over the limit by [%d] bytes\n", ++ ctrlParms.strLen - allowedSize); ++ ret = -1; ++ break; ++ } ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ case BCM_IMAGE_WHOLE: + if (boot_loader_type == BOOT_CFE) { ++ if(ctrlParms.strLen <= 0) ++ { ++ printk("Illegal flash image size [%d].\n", ctrlParms.strLen); ++ ret = -1; ++ break; ++ } ++ ++ // save NVRAM data into a local structure ++ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); ++ ++ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); ++ ++ // if nvram is not valid, restore the current nvram settings ++ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && ++ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) ++ { ++ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); ++ } ++ ++ kerSysMipsSoftReset(); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ default: ++ ret = -EINVAL; ++ printk("flash_ioctl_command: invalid command %d\n", ctrlParms.action); ++ break; ++ } ++ ctrlParms.result = ret; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_FLASH_READ: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ switch (ctrlParms.action) ++ { ++ case SCRATCH_PAD: + if (boot_loader_type == BOOT_CFE) { ++ ret = kerSysScratchPadGet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case PERSISTENT: + if (boot_loader_type == BOOT_CFE) { ++ ret = kerSysPersistentGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case NVRAM: + if (boot_loader_type == BOOT_CFE) { ++ ret = kerSysNvRamGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case FLASH_SIZE: + if (boot_loader_type == BOOT_CFE) { ++ ret = kerSysFlashSizeGet(); ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ default: ++ ret = -EINVAL; ++ printk("Not supported. invalid command %d\n", ctrlParms.action); ++ break; ++ } ++ ctrlParms.result = ret; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_NR_PAGES: ++ ctrlParms.result = nr_free_pages() + get_page_cache_size(); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_DUMP_ADDR: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ dumpaddr( (unsigned char *) ctrlParms.string, ctrlParms.strLen ); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_SET_MEMORY: + if (boot_loader_type == BOOT_CFE) { ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ unsigned long *pul = (unsigned long *) ctrlParms.string; ++ unsigned short *pus = (unsigned short *) ctrlParms.string; ++ unsigned char *puc = (unsigned char *) ctrlParms.string; ++ switch( ctrlParms.strLen ) ++ { ++ case 4: ++ *pul = (unsigned long) ctrlParms.offset; ++ break; ++ case 2: ++ *pus = (unsigned short) ctrlParms.offset; ++ break; ++ case 1: ++ *puc = (unsigned char) ctrlParms.offset; ++ break; ++ } ++ dumpaddr( (unsigned char *) ctrlParms.string, sizeof(long) ); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ ++ } ++ break; ++ ++ case BOARD_IOCTL_MIPS_SOFT_RESET: ++ kerSysMipsSoftReset(); ++ break; ++ ++ case BOARD_IOCTL_LED_CTRL: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ kerSysLedCtrl((BOARD_LED_NAME)ctrlParms.strLen, (BOARD_LED_STATE)ctrlParms.offset); ++ ret = 0; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_ID: + if (boot_loader_type == BOOT_CFE) { ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, ++ sizeof(ctrlParms)) == 0) ++ { ++ if( ctrlParms.string ) ++ { ++ char *p = (char *) get_system_type(); ++ if( strlen(p) + 1 < ctrlParms.strLen ) ++ ctrlParms.strLen = strlen(p) + 1; ++ __copy_to_user(ctrlParms.string, p, ctrlParms.strLen); ++ } ++ ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ } ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_MAC_ADDRESS: + if (boot_loader_type == BOOT_CFE) { ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ ctrlParms.result = kerSysGetMacAddress( ucaMacAddr, ++ ctrlParms.offset ); ++ ++ if( ctrlParms.result == 0 ) ++ { ++ __copy_to_user(ctrlParms.string, ucaMacAddr, ++ sizeof(ucaMacAddr)); ++ } ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case BOARD_IOCTL_RELEASE_MAC_ADDRESS: + if (boot_loader_type == BOOT_CFE) { ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ if (copy_from_user((void*)ucaMacAddr, (void*)ctrlParms.string, \ ++ NVRAM_MAC_ADDRESS_LEN) == 0) ++ { ++ ctrlParms.result = kerSysReleaseMacAddress( ucaMacAddr ); ++ } ++ else ++ { ++ ctrlParms.result = -EACCES; ++ } ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_PSI_SIZE: + if (boot_loader_type == BOOT_CFE) { ++ ctrlParms.result = (int) g_pNvramInfo->ulPsiSize; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_SDRAM_SIZE: + if (boot_loader_type == BOOT_CFE) { ++ ctrlParms.result = (int) g_pNvramInfo->ulSdramSize; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ printk("RedBoot : not supported\n"); ++ return(-EINVAL); ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_BASE_MAC_ADDRESS: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) ++ { ++ __copy_to_user(ctrlParms.string, g_pNvramInfo->ucaBaseMacAddr, NVRAM_MAC_ADDRESS_LEN); ++ ctrlParms.result = 0; ++ ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, ++ sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else ++ ret = -EFAULT; ++ break; ++ ++ case BOARD_IOCTL_GET_CHIP_ID: ++ ctrlParms.result = (int) (PERF->RevID & 0xFFFF0000) >> 16; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++ ++ case BOARD_IOCTL_GET_NUM_ENET: { ++ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; ++ int i, numeth = 0; ++ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { ++ for( i = 0; i < BP_MAX_ENET_MACS; i++) { ++ if (EnetInfos[i].ucPhyType != BP_ENET_NO_PHY) { ++ numeth++; ++ } ++ } ++ ctrlParms.result = numeth; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ + case BOARD_IOCTL_GET_CFE_VER: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { + char *vertag = (char *)(FLASH_BASE + CFE_VERSION_OFFSET); + if (ctrlParms.strLen < CFE_VERSION_SIZE) { ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = -EFAULT; ++ } ++ else if (strncmp(vertag, "cfe-v", 5)) { // no tag info in flash ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ else { ++ ctrlParms.result = 1; + __copy_to_user(ctrlParms.string, vertag+CFE_VERSION_MARK_SIZE, CFE_VERSION_SIZE); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_ENET_CFG: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; ++ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { ++ if (ctrlParms.strLen == sizeof(EnetInfos)) { ++ __copy_to_user(ctrlParms.string, EnetInfos, sizeof(EnetInfos)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++ case BOARD_IOCTL_GET_RESETHOLD: ++ ctrlParms.result = kerSysGetResetHold(); ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ break; ++//>>JUNHON, 2004/09/15 ++ ++ ++#if defined (WIRELESS) ++ case BOARD_IOCTL_GET_WLAN_ANT_INUSE: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ unsigned short antInUse = 0; ++ if (BpGetWirelessAntInUse(&antInUse) == BP_SUCCESS) { ++ if (ctrlParms.strLen == sizeof(antInUse)) { ++ __copy_to_user(ctrlParms.string, &antInUse, sizeof(antInUse)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#endif ++ case BOARD_IOCTL_SET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ ctrlParms.result = -EFAULT; ++ ret = -EFAULT; ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ board_ioc->eventmask |= *((int*)ctrlParms.string); ++#if defined (WIRELESS) ++ if((board_ioc->eventmask & SES_EVENTS)) { ++ if(sesBtn_irq != BP_NOT_DEFINED) { ++ BcmHalInterruptEnable(sesBtn_irq); ++ ctrlParms.result = 0; ++ ret = 0; ++ } ++ } ++#endif ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ } ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_GET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ __copy_to_user(ctrlParms.string, &board_ioc->eventmask, sizeof(unsigned long)); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++ ++ case BOARD_IOCTL_UNSET_TRIGGER_EVENT: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ if (ctrlParms.strLen == sizeof(unsigned long)) { ++ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; ++ board_ioc->eventmask &= (~(*((int*)ctrlParms.string))); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#if defined (WIRELESS) ++ case BOARD_IOCTL_SET_SES_LED: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ if (ctrlParms.strLen == sizeof(int)) { ++ sesLed_ctrl(*(int*)ctrlParms.string); ++ ctrlParms.result = 0; ++ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); ++ ret = 0; ++ } else ++ ret = -EFAULT; ++ ++ break; ++ } ++ else { ++ ret = -EFAULT; ++ } ++ break; ++#endif ++ ++ case BOARD_IOCTL_SET_MONITOR_FD: ++ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { ++ int fput_needed = 0; ++ ++ g_monitor_file = fget_light( ctrlParms.offset, &fput_needed ); ++ if( g_monitor_file ) { ++ /* Hook this file descriptor's poll function in order to set ++ * the exception descriptor when there is a change in link ++ * state. ++ */ ++ g_monitor_task = current; ++ g_orig_fop_poll = kerSysMonitorPollHook; ++ /*g_orig_fop_poll = g_monitor_file->f_op->poll; ++ g_monitor_file->f_op->poll = kerSysMonitorPollHook;*/ ++ } ++ } ++ break; ++ ++ case BOARD_IOCTL_WAKEUP_MONITOR_TASK: ++ kerSysWakeupMonitorTask(); ++ break; ++ ++ default: ++ ret = -EINVAL; ++ ctrlParms.result = 0; ++ printk("board_ioctl: invalid command %x, cmd %d .\n",command,_IOC_NR(command)); ++ break; ++ ++ } /* switch */ ++ ++ return (ret); ++ ++} /* board_ioctl */ ++ ++/*************************************************************************** ++ * SES Button ISR/GPIO/LED functions. ++ ***************************************************************************/ ++#if defined (WIRELESS) ++static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs) ++{ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if (!(*gpio_reg & gpio_mask)){ ++ wake_up_interruptible(&g_board_wait_queue); ++ return IRQ_RETVAL(1); ++ } else { ++ return IRQ_RETVAL(0); ++ } ++} ++ ++static void __init sesBtn_mapGpio() ++{ ++ if( BpGetWirelessSesBtnGpio(&sesBtn_gpio) == BP_SUCCESS ) ++ { ++ printk("SES: Button GPIO 0x%x is enabled\n", sesBtn_gpio); ++ } ++} ++ ++static void __init sesBtn_mapIntr(int context) ++{ ++ if( BpGetWirelessSesExtIntr(&sesBtn_irq) == BP_SUCCESS ) ++ { ++ printk("SES: Button Interrupt 0x%x is enabled\n", sesBtn_irq); ++ } ++ else ++ return; ++ ++ sesBtn_irq += INTERRUPT_ID_EXTERNAL_0; ++ ++ if (BcmHalMapInterrupt((FN_HANDLER)sesBtn_isr, context, sesBtn_irq)) { ++ printk("SES: Interrupt mapping failed\n"); ++ } ++ BcmHalInterruptEnable(sesBtn_irq); ++} ++ ++ ++static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait) ++{ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if (!(*gpio_reg & gpio_mask)){ ++ return POLLIN; ++ } ++ return 0; ++} ++ ++static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) ++{ ++ volatile unsigned int event=0; ++ ssize_t ret=0; ++ ++#if defined(_BCM96338_) || defined (CONFIG_BCM96338) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96345_) || defined (CONFIG_BCM96345) ++ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned short *gpio_reg = &GPIO->GPIOio; ++#endif ++#if defined(_BCM96348_) || defined (CONFIG_BCM96348) ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++#endif ++ ++ if(*gpio_reg & gpio_mask){ ++ BcmHalInterruptEnable(sesBtn_irq); ++ return ret; ++ } ++ event = SES_EVENTS; ++ __copy_to_user((char*)buffer, (char*)&event, sizeof(event)); ++ BcmHalInterruptEnable(sesBtn_irq); ++ count -= sizeof(event); ++ buffer += sizeof(event); ++ ret += sizeof(event); ++ return ret; ++} ++ ++static void __init sesLed_mapGpio() ++{ ++ if( BpGetWirelessSesBtnGpio(&sesLed_gpio) == BP_SUCCESS ) ++ { ++ printk("SES: LED GPIO 0x%x is enabled\n", sesBtn_gpio); ++ } ++} ++ ++static void sesLed_ctrl(int action) ++{ ++ ++ //char status = ((action >> 8) & 0xff); /* extract status */ ++ //char event = ((action >> 16) & 0xff); /* extract event */ ++ //char blinktype = ((action >> 24) & 0xff); /* extract blink type for SES_LED_BLINK */ ++ ++ BOARD_LED_STATE led; ++ ++ if(sesLed_gpio == BP_NOT_DEFINED) ++ return; ++ ++ action &= 0xff; /* extract led */ ++ ++ //printk("blinktype=%d, event=%d, status=%d\n",(int)blinktype, (int)event, (int)status); ++ ++ switch (action) ++ { ++ case SES_LED_ON: ++ //printk("SES: led on\n"); ++ led = kLedStateOn; ++ break; ++ case SES_LED_BLINK: ++ //printk("SES: led blink\n"); ++ led = kLedStateSlowBlinkContinues; ++ break; ++ case SES_LED_OFF: ++ default: ++ //printk("SES: led off\n"); ++ led = kLedStateOff; ++ } ++ ++ kerSysLedCtrl(kLedSes, led); ++} ++ ++static void __init ses_board_init() ++{ ++ sesBtn_mapGpio(); ++ sesBtn_mapIntr(0); ++ sesLed_mapGpio(); ++} ++static void __exit ses_board_deinit() ++{ ++ if(sesBtn_irq) ++ BcmHalInterruptDisable(sesBtn_irq); ++} ++#endif ++ ++/*************************************************************************** ++ * Dying gasp ISR and functions. ++ ***************************************************************************/ ++#define KERSYS_DBG printk ++ ++#if defined(CONFIG_BCM96345) ++#define CYCLE_PER_US 70 ++#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++/* The BCM6348 cycles per microsecond is really variable since the BCM6348 ++ * MIPS speed can vary depending on the PLL settings. However, an appoximate ++ * value of 120 will still work OK for the test being done. ++ */ ++#define CYCLE_PER_US 120 ++#endif ++#define DG_GLITCH_TO (100*CYCLE_PER_US) ++ ++static void __init kerSysDyingGaspMapIntr() ++{ ++ unsigned long ulIntr; ++ ++#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ } ++#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ ulIntr += INTERRUPT_ID_EXTERNAL_0; ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); ++ BcmHalInterruptEnable( ulIntr ); ++ } ++#endif ++ ++} ++ ++void kerSysSetWdTimer(ulong timeUs) ++{ ++ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); ++ TIMER->WatchDogCtl = 0xFF00; ++ TIMER->WatchDogCtl = 0x00FF; ++} ++ ++ulong kerSysGetCycleCount(void) ++{ ++ ulong cnt; ++#ifdef _WIN32_WCE ++ cnt = 0; ++#else ++ __asm volatile("mfc0 %0, $9":"=d"(cnt)); ++#endif ++ return(cnt); ++} ++ ++static Bool kerSysDyingGaspCheckPowerLoss(void) ++{ ++ ulong clk0; ++ ulong ulIntr; ++ ++ ulIntr = 0; ++ clk0 = kerSysGetCycleCount(); ++ ++ UART->Data = 'D'; ++ UART->Data = '%'; ++ UART->Data = 'G'; ++ ++#if defined(CONFIG_BCM96345) ++ BpGetAdslDyingGaspExtIntr( &ulIntr ); ++ ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ ++ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#endif ++ return 1; ++} ++ ++static void kerSysDyingGaspShutdown( void ) ++{ ++ kerSysSetWdTimer(1000000); ++#if defined(CONFIG_BCM96345) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); ++#elif defined(CONFIG_BCM96348) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); ++#endif ++} ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) ++#else ++static unsigned int kerSysDyingGaspIsr(void) ++#endif ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp, *dsl = NULL; ++ ++ if (kerSysDyingGaspCheckPowerLoss()) { ++ ++ /* first to turn off everything other than dsl */ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(strncmp(tmp->name, "dsl", 3)) { ++ (tmp->cb_dgasp_fn)(tmp->context); ++ }else { ++ dsl = tmp; ++ } ++ } ++ ++ /* now send dgasp */ ++ if(dsl) ++ (dsl->cb_dgasp_fn)(dsl->context); ++ ++ /* reset and shutdown system */ ++ kerSysDyingGaspShutdown(); ++ } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++return( IRQ_HANDLED ); ++#else ++ return( 1 ); ++#endif ++} ++ ++static void __init kerSysInitDyingGaspHandler( void ) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head != NULL) { ++ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); ++ return; ++ } ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ g_cb_dgasp_list_head = new_node; ++ ++} /* kerSysInitDyingGaspHandler */ ++ ++static void __exit kerSysDeinitDyingGaspHandler( void ) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) ++ return; ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ list_del(pos); ++ kfree(tmp); ++ } ++ ++ kfree(g_cb_dgasp_list_head); ++ g_cb_dgasp_list_head = NULL; ++ ++} /* kerSysDeinitDyingGaspHandler */ ++ ++void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if( devname == NULL || cbfn == NULL ) { ++ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); ++ return; ++ } ++ ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ strncpy(new_node->name, devname, IFNAMSIZ); ++ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; ++ new_node->context = context; ++ list_add(&new_node->list, &g_cb_dgasp_list_head->list); ++ ++ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); ++ ++} /* kerSysRegisterDyingGaspHandler */ ++ ++void kerSysDeregisterDyingGaspHandler(char *devname) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if(devname == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); ++ return; ++ } ++ ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(!strcmp(tmp->name, devname)) { ++ list_del(pos); ++ kfree(tmp); ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); ++ return; ++ } ++ } ++ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); ++ ++} /* kerSysDeregisterDyingGaspHandler */ ++ ++/*************************************************************************** ++ * MACRO to call driver initialization and cleanup functions. ++ ***************************************************************************/ ++module_init( brcm_board_init ); ++module_exit( brcm_board_cleanup ); ++ ++EXPORT_SYMBOL(kerSysNvRamGet); ++EXPORT_SYMBOL(dumpaddr); ++EXPORT_SYMBOL(kerSysGetMacAddress); ++EXPORT_SYMBOL(kerSysReleaseMacAddress); ++EXPORT_SYMBOL(kerSysGetSdramSize); ++EXPORT_SYMBOL(kerSysLedCtrl); ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++EXPORT_SYMBOL(kerSysGetResetHold); ++//>>JUNHON, 2004/09/15 ++EXPORT_SYMBOL(kerSysLedRegisterHwHandler); ++EXPORT_SYMBOL(BpGetBoardIds); ++EXPORT_SYMBOL(BpGetSdramSize); ++EXPORT_SYMBOL(BpGetPsiSize); ++EXPORT_SYMBOL(BpGetEthernetMacInfo); ++EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); ++EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); ++EXPORT_SYMBOL(BpGetVoipResetGpio); ++EXPORT_SYMBOL(BpGetVoipIntrGpio); ++EXPORT_SYMBOL(BpGetPcmciaResetGpio); ++EXPORT_SYMBOL(BpGetRtsCtsUartGpios); ++EXPORT_SYMBOL(BpGetAdslLedGpio); ++EXPORT_SYMBOL(BpGetAdslFailLedGpio); ++EXPORT_SYMBOL(BpGetWirelessLedGpio); ++EXPORT_SYMBOL(BpGetUsbLedGpio); ++EXPORT_SYMBOL(BpGetHpnaLedGpio); ++EXPORT_SYMBOL(BpGetWanDataLedGpio); ++EXPORT_SYMBOL(BpGetPppLedGpio); ++EXPORT_SYMBOL(BpGetPppFailLedGpio); ++EXPORT_SYMBOL(BpGetVoipLedGpio); ++EXPORT_SYMBOL(BpGetWirelessExtIntr); ++EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); ++EXPORT_SYMBOL(BpGetVoipExtIntr); ++EXPORT_SYMBOL(BpGetHpnaExtIntr); ++EXPORT_SYMBOL(BpGetHpnaChipSelect); ++EXPORT_SYMBOL(BpGetVoipChipSelect); ++EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); ++EXPORT_SYMBOL(BpGetWirelessSesExtIntr); ++EXPORT_SYMBOL(BpGetWirelessSesLedGpio); ++EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysGetCycleCount); ++EXPORT_SYMBOL(kerSysSetWdTimer); ++EXPORT_SYMBOL(kerSysWakeupMonitorTask); ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,2391 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.c ++ * ++ * Description: This file contains the implementation for the BCM63xx board ++ * parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include "boardparms.h" ++ ++/* Defines. */ ++ ++/* Default psi size in K bytes */ ++#define BP_PSI_DEFAULT_SIZE 24 ++ ++/* Typedefs */ ++typedef struct boardparameters ++{ ++ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ ++ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; ++ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; ++ unsigned short usSdramSize; /* SDRAM size and type */ ++ unsigned short usPsiSize; /* persistent storage in K bytes */ ++ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ ++ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ ++ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ ++ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ ++ unsigned short usGpioUartRts; /* GPIO pin or not defined */ ++ unsigned short usGpioUartCts; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ ++ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ ++ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ ++ unsigned short usExtIntrWireless; /* ext intr or not defined */ ++ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ ++ unsigned short usExtIntrHpna; /* ext intr or not defined */ ++ unsigned short usCsHpna; /* chip select not defined */ ++ unsigned short usAntInUseWireless; /* antenna in use or not defined */ ++ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ ++ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ ++ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ ++} BOARD_PARAMETERS, *PBOARD_PARAMETERS; ++ ++/* Variables */ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++static BOARD_PARAMETERS g_bcm96338sv = ++{ ++ "96338SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static BOARD_PARAMETERS g_bcm96338l2m8m = ++{ ++ "96338L-2M-8M", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; ++#endif ++ ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++static BOARD_PARAMETERS g_bcm96345r = ++{ ++ "96345R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw2 = ++{ ++ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold ++ * Reset or RTS. ++ */ ++ "96345GW2", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_GPIO_0_AH, /* usGpioPhySpiSck */ ++ BP_GPIO_4_AH, /* usGpioPhySpiSs */ ++ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ ++ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_GPIO, /* usConfigType */ ++ BP_ENET_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_GPIO_13_AH, /* usGpioUartRts */ ++ BP_GPIO_9_AH, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw = ++{ ++ "96345GW", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_GPIO_10_AH, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_EXT_INTR_3, /* usExtIntrHpna */ ++ BP_CS_1, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96335r = ++{ ++ "96335R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_9_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_8_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_9_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345r0 = ++{ ++ "96345R0", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345rs = ++{ ++ "96345RS", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, ++ &g_bcm96345rs, 0}; ++#endif ++ ++#if defined(_BCM96348_) || defined(CONFIG_BCM96348) ++ ++static BOARD_PARAMETERS g_bcm96348r = ++{ ++ "96348R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348lv = ++{ ++ "96348LV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x02, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_GPIO_5_AL, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw = ++{ ++ "96348GW", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_10 = ++{ ++ "96348GW-10", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw_11 = ++{ ++ "96348GW-11", /* szBoardId */ ++ {{BP_ENET_NO_PHY}, /* ucPhyType */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348sv = ++{ ++ "96348SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x1f, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_dualDsp = ++{ ++ "96348GW-DualDSP", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_UNEQUIPPED, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_DSP, /* ucDspType */ ++ 0x01, /* ucDspAddress */ ++ BP_EXT_INTR_3, /* usExtIntrVoip */ ++ BP_UNEQUIPPED , /* usGpioVoipReset */ ++ BP_GPIO_35_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_3}}, /* usCsVoip */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcmCustom_01 = ++{ ++ "BCMCUST_01", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_36_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AL, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, ++ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, ++ &g_bcmCustom_01, 0}; ++#endif ++ ++static PBOARD_PARAMETERS g_pCurrentBp = 0; ++ ++/************************************************************************** ++ * Name : bpstrcmp ++ * ++ * Description: String compare for this file so it does not depend on an OS. + * (Linux kernel and CFE share this source file.) ++ * ++ * Parameters : [IN] dest - destination string ++ * [IN] src - source string ++ * ++ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src ++ ***************************************************************************/ ++static int bpstrcmp(const char *dest,const char *src); ++static int bpstrcmp(const char *dest,const char *src) ++{ ++ while (*src && *dest) ++ { ++ if (*dest < *src) return -1; ++ if (*dest > *src) return 1; ++ dest++; ++ src++; ++ } ++ ++ if (*dest && !*src) return 1; ++ if (!*dest && *src) return -1; ++ return 0; ++} /* bpstrcmp */ ++ ++/************************************************************************** ++ * Name : BpGetVoipDspConfig ++ * ++ * Description: Gets the DSP configuration from the board parameter ++ * structure for a given DSP index. ++ * ++ * Parameters : [IN] dspNum - DSP index (number) ++ * ++ * Returns : Pointer to DSP configuration block if found/valid, NULL ++ * otherwise. ++ ***************************************************************************/ ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) ++{ ++ VOIP_DSP_INFO *pDspConfig = 0; ++ int i; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) ++ { ++ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && ++ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) ++ { ++ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; ++ break; ++ } ++ } ++ } ++ ++ return pDspConfig; ++} ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ) ++{ ++ int nRet = BP_BOARD_ID_NOT_FOUND; ++ PBOARD_PARAMETERS *ppBp; ++ ++ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) ++ { ++ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) ++ { ++ g_pCurrentBp = *ppBp; ++ nRet = BP_SUCCESS; ++ break; ++ } ++ } ++ ++ return( nRet ); ++} /* BpSetBoardId */ ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) ++{ ++ PBOARD_PARAMETERS *ppBp; ++ int i; ++ char *src; ++ char *dest; ++ ++ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; ++ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) ++ { ++ dest = pszBoardIds; ++ src = (*ppBp)->szBoardId; ++ while( *src ) ++ *dest++ = *src++; ++ *dest = '\0'; ++ } ++ ++ return( i ); ++} /* BpGetBoardIds */ ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) ++{ ++ int i, nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ { ++ if( i < BP_MAX_ENET_MACS ) ++ { ++ unsigned char *src = (unsigned char *) ++ &g_pCurrentBp->EnetMacInfos[i]; ++ unsigned char *dest = (unsigned char *) pEnetInfos; ++ int len = sizeof(ETHERNET_MAC_INFO); ++ while( len-- ) ++ *dest++ = *src++; ++ } ++ else ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ } ++ ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetEthernetMacInfo */ ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulSdramSize = g_pCurrentBp->usSdramSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulSdramSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetSdramSize */ ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulPsiSize = g_pCurrentBp->usPsiSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulPsiSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPsiSize */ ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; ++ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; ++ ++ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusInner = *pusOuter = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetRj11InnerOuterPairGpios */ ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; ++ ++ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPressAndHoldResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipReset; ++ ++ if( *pusValue != BP_NOT_DEFINED || ++ *pusValue == BP_UNEQUIPPED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipIntr; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipIntrGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPcmciaReset; ++ ++ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPcmciaResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, board id input string does not ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusRts = g_pCurrentBp->usGpioUartRts; ++ *pusCts = g_pCurrentBp->usGpioUartCts; ++ ++ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusRts = *pusCts = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUartRtsCtsGpios */ ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdsl; ++ ++ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdslFail; ++ ++ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWireless; ++ ++ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usAntInUseWireless; ++ ++ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessAntInUse */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; ++ ++ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessSesBtnGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; ++ ++ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedSesWireless; ++ ++ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedUsb; ++ ++ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUsbLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedHpna; ++ ++ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWanData; ++ ++ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWanDataLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPpp; ++ ++ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPppFail; ++ ++ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; ++ ++ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderPowerOn */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; ++ ++ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderAlarmLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; ++ ++ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderResetCfgLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlStop; ++ ++ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderStopLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ * ++ * Note : The VoIP structure would allow for having one LED per DSP ++ * however, the board initialization function assumes only one ++ * LED per functionality (ie one LED for VoIP). Therefore in ++ * order to keep this tidy and simple we do not make usage of the ++ * one-LED-per-DSP function. Instead, we assume that the LED for ++ * VoIP is unique and associated with DSP 0 (always present on ++ * any VoIP platform). If changing this to a LED-per-DSP function ++ * then one need to update the board initialization driver in ++ * bcmdrivers\opensource\char\board\bcm963xx\impl1 ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioLedVoip; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrWireless; ++ ++ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; ++ ++ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslDyingGaspExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usExtIntrVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrHpna; ++ ++ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usCsHpna; ++ ++ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaChipSelect */ ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usCsVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipChipSelect */ ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,758 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.h ++ * ++ * Description: This file contains definitions and function prototypes for ++ * the BCM63xx board parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++#if !defined(_BOARDPARMS_H) ++#define _BOARDPARMS_H ++ ++/* Return codes. */ ++#define BP_SUCCESS 0 ++#define BP_BOARD_ID_NOT_FOUND 1 ++#define BP_VALUE_NOT_DEFINED 2 ++#define BP_BOARD_ID_NOT_SET 3 ++ ++/* Values for BpGetSdramSize. */ ++#define BP_MEMORY_8MB_1_CHIP 0 ++#define BP_MEMORY_16MB_1_CHIP 1 ++#define BP_MEMORY_32MB_1_CHIP 2 ++#define BP_MEMORY_64MB_2_CHIP 3 ++#define BP_MEMORY_32MB_2_CHIP 4 ++#define BP_MEMORY_16MB_2_CHIP 5 ++ ++/* Values for EthernetMacInfo PhyType. */ ++#define BP_ENET_NO_PHY 0 ++#define BP_ENET_INTERNAL_PHY 1 ++#define BP_ENET_EXTERNAL_PHY 2 ++#define BP_ENET_EXTERNAL_SWITCH 3 ++ ++/* Values for EthernetMacInfo Configuration type. */ ++#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ ++#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ ++#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ ++ ++/* Values for EthernetMacInfo Reverse MII. */ ++#define BP_ENET_NO_REVERSE_MII 0 ++#define BP_ENET_REVERSE_MII 1 ++ ++/* Values for VoIPDSPInfo DSPType. */ ++#define BP_VOIP_NO_DSP 0 ++#define BP_VOIP_DSP 1 ++ ++ ++/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ ++#define BP_ACTIVE_MASK 0x8000 ++#define BP_ACTIVE_HIGH 0x0000 ++#define BP_ACTIVE_LOW 0x8000 ++#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) ++#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) ++#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) ++#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) ++#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) ++#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) ++#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) ++#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) ++#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) ++#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) ++#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) ++#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) ++#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) ++#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) ++#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) ++#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) ++#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) ++#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) ++#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) ++#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) ++#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) ++#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) ++#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) ++#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) ++#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) ++#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) ++#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) ++#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) ++#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) ++#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) ++#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) ++#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) ++#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) ++#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) ++#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) ++#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) ++#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) ++#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) ++#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) ++#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) ++#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) ++#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) ++#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) ++#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) ++#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) ++#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) ++#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) ++#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) ++#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) ++#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) ++#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) ++#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) ++#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) ++#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) ++#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) ++#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) ++#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) ++#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) ++#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) ++#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) ++#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) ++#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) ++#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) ++#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) ++#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) ++#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) ++#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) ++#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) ++#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) ++#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) ++#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) ++#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) ++#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) ++#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) ++ ++/* Values for external interrupt assignments. */ ++#define BP_EXT_INTR_0 0 ++#define BP_EXT_INTR_1 1 ++#define BP_EXT_INTR_2 2 ++#define BP_EXT_INTR_3 3 ++ ++/* Values for chip select assignments. */ ++#define BP_CS_0 0 ++#define BP_CS_1 1 ++#define BP_CS_2 2 ++#define BP_CS_3 3 ++ ++/* Value for GPIO and external interrupt fields that are not used. */ ++#define BP_NOT_DEFINED 0xffff ++#define BP_HW_DEFINED 0xfff0 ++#define BP_UNEQUIPPED 0xfff1 ++ ++/* Maximum size of the board id string. */ ++#define BP_BOARD_ID_LEN 16 ++ ++/* Maximum number of Ethernet MACs. */ ++#define BP_MAX_ENET_MACS 2 ++ ++/* Maximum number of VoIP DSPs. */ ++#define BP_MAX_VOIP_DSP 2 ++ ++/* Wireless Antenna Settings. */ ++#define BP_WLAN_ANT_MAIN 0 ++#define BP_WLAN_ANT_AUX 1 ++#define BP_WLAN_ANT_BOTH 3 ++ ++#if !defined(__ASSEMBLER__) ++ ++/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, ++ * then the other fields are not valid. ++ */ ++typedef struct EthernetMacInfo ++{ ++ unsigned char ucPhyType; /* BP_ENET_xxx */ ++ unsigned char ucPhyAddress; /* 0 to 31 */ ++ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ ++ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ ++ unsigned short numSwitchPorts; /* Number of PHY ports */ ++ unsigned short usConfigType; /* Configuration type */ ++ unsigned short usReverseMii; /* Reverse MII */ ++} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; ++ ++ ++/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, ++ * then the other fields are not valid. ++ */ ++typedef struct VoIPDspInfo ++{ ++ unsigned char ucDspType; ++ unsigned char ucDspAddress; ++ unsigned short usExtIntrVoip; ++ unsigned short usGpioVoipReset; ++ unsigned short usGpioVoipIntr; ++ unsigned short usGpioLedVoip; ++ unsigned short usCsVoip; ++ ++} VOIP_DSP_INFO; ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ); ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ); ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ); ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ); ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); ++ ++#endif /* __ASSEMBLER__ */ ++ ++#endif /* _BOARDPARMS_H */ ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,692 @@ ++/************************************************************************/ ++/* */ ++/* AMD CFI Enabled Flash Memory Drivers */ ++/* File name: CFIFLASH.C */ ++/* Revision: 1.0 5/07/98 */ ++/* */ ++/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ ++/* This software is unpublished and contains the trade secrets and */ ++/* confidential proprietary information of AMD. Unless otherwise */ ++/* provided in the Software Agreement associated herewith, it is */ ++/* licensed in confidence "AS IS" and is not to be reproduced in whole */ ++/* or part by any means except for backup. Use, duplication, or */ ++/* disclosure by the Government is subject to the restrictions in */ ++/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ ++/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ ++/* Software owned by */ ++/* Advanced Micro Devices, Inc., */ ++/* One AMD Place, */ ++/* P.O. Box 3453 */ ++/* Sunnyvale, CA 94088-3453. */ ++/************************************************************************/ ++/* This software constitutes a basic shell of source code for */ ++/* programming all AMD Flash components. AMD */ ++/* will not be responsible for misuse or illegal use of this */ ++/* software for devices not supported herein. AMD is providing */ ++/* this source code "AS IS" and will not be responsible for */ ++/* issues arising from incorrect user implementation of the */ ++/* source code herein. It is the user's responsibility to */ ++/* properly design-in this source code. */ ++/* */ ++/************************************************************************/ +#ifdef _CFE_ ++#include "lib_types.h" ++#include "lib_printf.h" ++#include "lib_string.h" ++#include "cfe_timer.h" ++#define printk printf ++#else // linux ++#include <linux/param.h> ++#include <linux/sched.h> ++#include <linux/timer.h> ++#endif ++ ++#include "cfiflash.h" ++ ++static int flash_wait(WORD sector, int offset, UINT16 data); ++static UINT16 flash_get_device_id(void); ++static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily); ++static int flash_write(WORD sector, int offset, byte *buf, int nbytes); ++static void flash_command(int command, WORD sector, int offset, UINT16 data); ++ ++/*********************************************************************/ ++/* 'meminfo' should be a pointer, but most C compilers will not */ ++/* allocate static storage for a pointer without calling */ ++/* non-portable functions such as 'new'. We also want to avoid */ ++/* the overhead of passing this pointer for every driver call. */ ++/* Systems with limited heap space will need to do this. */ ++/*********************************************************************/ ++struct flashinfo meminfo; /* Flash information structure */ ++static int flashFamily = FLASH_UNDEFINED; ++static int totalSize = 0; ++static struct cfi_query query; ++ ++static UINT16 cfi_data_struct_29W160[] = { ++ 0x0020, 0x0049, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0x0051, 0x0052, 0x0059, 0x0002, 0x0000, 0x0040, 0x0000, 0x0000, ++ 0x0000, 0x0000, 0x0000, 0x0027, 0x0036, 0x0000, 0x0000, 0x0004, ++ 0x0000, 0x000a, 0x0000, 0x0004, 0x0000, 0x0003, 0x0000, 0x0015, ++ 0x0002, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0040, ++ 0x0000, 0x0001, 0x0000, 0x0020, 0x0000, 0x0000, 0x0000, 0x0080, ++ 0x0000, 0x001e, 0x0000, 0x0000, 0x0001, 0xffff, 0xffff, 0xffff, ++ 0x0050, 0x0052, 0x0049, 0x0031, 0x0030, 0x0000, 0x0002, 0x0001, ++ 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0002, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0x0888, 0x252b, 0x8c84, 0x7dbc, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff ++}; ++ ++ ++/*********************************************************************/ ++/* Init_flash is used to build a sector table from the information */ ++/* provided through the CFI query. This information is translated */ ++/* from erase_block information to base:offset information for each */ ++/* individual sector. This information is then stored in the meminfo */ ++/* structure, and used throughout the driver to access sector */ ++/* information. */ ++/* */ ++/* This is more efficient than deriving the sector base:offset */ ++/* information every time the memory map switches (since on the */ ++/* development platform can only map 64k at a time). If the entire */ ++/* flash memory array can be mapped in, then the addition static */ ++/* allocation for the meminfo structure can be eliminated, but the */ ++/* drivers will have to be re-written. */ ++/* */ ++/* The meminfo struct occupies 653 bytes of heap space, depending */ ++/* on the value of the define MAXSECTORS. Adjust to suit */ ++/* application */ ++/*********************************************************************/ ++byte flash_init(void) ++{ ++ int i=0, j=0, count=0; ++ int basecount=0L; ++ UINT16 device_id; ++ int flipCFIGeometry = FALSE; ++ ++ /* First, assume ++ * a single 8k sector for sector 0. This is to allow ++ * the system to perform memory mapping to the device, ++ * even though the actual physical layout is unknown. ++ * Once mapped in, the CFI query will produce all ++ * relevant information. ++ */ ++ meminfo.addr = 0L; ++ meminfo.areg = 0; ++ meminfo.nsect = 1; ++ meminfo.bank1start = 0; ++ meminfo.bank2start = 0; ++ ++ meminfo.sec[0].size = 8192; ++ meminfo.sec[0].base = 0x00000; ++ meminfo.sec[0].bank = 1; ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ ++ device_id = flash_get_device_id(); ++ ++ switch (device_id) { ++ case ID_I28F160C3B: ++ case ID_I28F320C3B: ++ case ID_I28F160C3T: ++ case ID_I28F320C3T: ++ flashFamily = FLASH_INTEL; ++ break; ++ case ID_AM29DL800B: ++ case ID_AM29LV800B: ++ case ID_AM29LV400B: ++ case ID_AM29LV160B: ++ case ID_AM29LV320B: ++ case ID_MX29LV320AB: ++ case ID_AM29LV320MB: ++ case ID_AM29DL800T: ++ case ID_AM29LV800T: ++ case ID_AM29LV160T: ++ case ID_AM29LV320T: ++ case ID_MX29LV320AT: ++ case ID_AM29LV320MT: ++ flashFamily = FLASH_AMD; ++ break; ++ case ID_SST39VF1601: ++ case ID_SST39VF3201: ++ flashFamily = FLASH_SST; ++ break; ++ default: ++ printk("Flash memory not supported! Device id = %x\n", device_id); ++ return -1; ++ } ++ ++ if (flash_get_cfi(&query, 0, flashFamily) == -1) { ++ switch(device_id) { ++ case ID_AM29LV160T: ++ case ID_AM29LV160B: ++ flash_get_cfi(&query, cfi_data_struct_29W160, flashFamily); ++ break; ++ default: ++ printk("CFI data structure not found. Device id = %x\n", device_id); ++ return -1; ++ } ++ } ++ ++ // need to determine if it top or bottom boot here ++ switch (device_id) ++ { ++ case ID_AM29DL800B: ++ case ID_AM29LV800B: ++ case ID_AM29LV400B: ++ case ID_AM29LV160B: ++ case ID_AM29LV320B: ++ case ID_MX29LV320AB: ++ case ID_AM29LV320MB: ++ case ID_I28F160C3B: ++ case ID_I28F320C3B: ++ case ID_I28F160C3T: ++ case ID_I28F320C3T: ++ case ID_SST39VF1601: ++ case ID_SST39VF3201: ++ flipCFIGeometry = FALSE; ++ break; ++ case ID_AM29DL800T: ++ case ID_AM29LV800T: ++ case ID_AM29LV160T: ++ case ID_AM29LV320T: ++ case ID_MX29LV320AT: ++ case ID_AM29LV320MT: ++ flipCFIGeometry = TRUE; ++ break; ++ default: ++ printk("Flash memory not supported! Device id = %x\n", device_id); ++ return -1; ++ } ++ ++ count=0;basecount=0L; ++ ++ if (!flipCFIGeometry) ++ { ++ for (i=0; i<query.num_erase_blocks; i++) { ++ for(j=0; j<query.erase_block[i].num_sectors; j++) { ++ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; ++ meminfo.sec[count].base = (int) basecount; ++ basecount += (int) query.erase_block[i].sector_size; ++ count++; ++ } ++ } ++ } ++ else ++ { ++ for (i = (query.num_erase_blocks - 1); i >= 0; i--) { ++ for(j=0; j<query.erase_block[i].num_sectors; j++) { ++ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; ++ meminfo.sec[count].base = (int) basecount; ++ basecount += (int) query.erase_block[i].sector_size; ++ count++; ++ } ++ } ++ } ++ ++ meminfo.nsect = count; ++ totalSize = meminfo.sec[count-1].base + meminfo.sec[count-1].size; ++ return (0); ++} ++ ++/*********************************************************************/ ++/* Flash_sector_erase_int() is identical to flash_sector_erase(), */ ++/* except it will wait until the erase is completed before returning */ ++/* control to the calling function. This can be used in cases which */ ++/* require the program to hold until a sector is erased, without */ ++/* adding the wait check external to this function. */ ++/*********************************************************************/ ++byte flash_sector_erase_int(WORD sector) ++{ ++ int i; ++ ++ for( i = 0; i < 3; i++ ) { ++ flash_command(FLASH_SERASE, sector, 0, 0); ++ if (flash_wait(sector, 0, 0xffff) == STATUS_READY) ++ break; ++ } ++ ++ return(1); ++} ++ ++/*********************************************************************/ ++/* flash_read_buf() reads buffer of data from the specified */ ++/* offset from the sector parameter. */ ++/*********************************************************************/ ++int flash_read_buf(WORD sector, int offset, ++ byte *buffer, int numbytes) ++{ ++ byte *fwp; ++ ++ fwp = (byte *)flash_get_memptr(sector); ++ ++ while (numbytes) { ++ *buffer++ = *(fwp + offset); ++ numbytes--; ++ fwp++; ++ } ++ ++ return (1); ++} ++ ++/*********************************************************************/ ++/* flash_write_buf() utilizes */ ++/* the unlock bypass mode of the flash device. This can remove */ ++/* significant overhead from the bulk programming operation, and */ ++/* when programming bulk data a sizeable performance increase can be */ ++/* observed. */ ++/*********************************************************************/ ++int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes) ++{ ++ int ret = -1; ++ int i; ++ unsigned char *p = flash_get_memptr(sector) + offset; ++ ++ /* After writing the flash block, compare the contents to the source ++ * buffer. Try to write the sector successfully up to three times. ++ */ ++ for( i = 0; i < 3; i++ ) { ++ ret = flash_write(sector, offset, buffer, numbytes); ++ if( !memcmp( p, buffer, numbytes ) ) ++ break; ++ /* Erase and try again */ ++ flash_sector_erase_int(sector); ++ ret = -1; ++ } ++ ++ if( ret == -1 ) ++ printk( "Flash write error. Verify failed\n" ); ++ ++ return( ret ); ++} ++ ++/*********************************************************************/ ++/* Usefull funtion to return the number of sectors in the device. */ ++/* Can be used for functions which need to loop among all the */ ++/* sectors, or wish to know the number of the last sector. */ ++/*********************************************************************/ ++int flash_get_numsectors(void) ++{ ++ return meminfo.nsect; ++} ++ ++/*********************************************************************/ ++/* flash_get_sector_size() is provided for cases in which the size */ ++/* of a sector is required by a host application. The sector size */ ++/* (in bytes) is returned in the data location pointed to by the */ ++/* 'size' parameter. */ ++/*********************************************************************/ ++int flash_get_sector_size(WORD sector) ++{ ++ return meminfo.sec[sector].size; ++} ++ ++/*********************************************************************/ ++/* The purpose of flash_get_memptr() is to return a memory pointer */ ++/* which points to the beginning of memory space allocated for the */ ++/* flash. All function pointers are then referenced from this */ ++/* pointer. */ ++/* */ ++/* Different systems will implement this in different ways: */ ++/* possibilities include: */ ++/* - A direct memory pointer */ ++/* - A pointer to a memory map */ ++/* - A pointer to a hardware port from which the linear */ ++/* address is translated */ ++/* - Output of an MMU function / service */ ++/* */ ++/* Also note that this function expects the pointer to a specific */ ++/* sector of the device. This can be provided by dereferencing */ ++/* the pointer from a translated offset of the sector from a */ ++/* global base pointer (e.g. flashptr = base_pointer + sector_offset)*/ ++/* */ ++/* Important: Many AMD flash devices need both bank and or sector */ ++/* address bits to be correctly set (bank address bits are A18-A16, */ ++/* and sector address bits are A18-A12, or A12-A15). Flash parts */ ++/* which do not need these bits will ignore them, so it is safe to */ ++/* assume that every part will require these bits to be set. */ ++/*********************************************************************/ ++unsigned char *flash_get_memptr(WORD sector) ++{ ++ unsigned char *memptr = (unsigned char*)(FLASH_BASE_ADDR_REG + meminfo.sec[sector].base); ++ ++ return (memptr); ++} ++ ++/*********************************************************************/ ++/* The purpose of flash_get_blk() is to return a the block number */ ++/* for a given memory address. */ ++/*********************************************************************/ ++int flash_get_blk(int addr) ++{ ++ int blk_start, i; ++ int last_blk = flash_get_numsectors(); ++ int relative_addr = addr - (int) FLASH_BASE_ADDR_REG; ++ ++ for(blk_start=0, i=0; i < relative_addr && blk_start < last_blk; blk_start++) ++ i += flash_get_sector_size(blk_start); ++ ++ if( i > relative_addr ) ++ { ++ blk_start--; // last blk, dec by 1 ++ } ++ else ++ if( blk_start == last_blk ) ++ { ++ printk("Address is too big.\n"); ++ blk_start = -1; ++ } ++ ++ return( blk_start ); ++} ++ ++/************************************************************************/ ++/* The purpose of flash_get_total_size() is to return the total size of */ ++/* the flash */ ++/************************************************************************/ ++int flash_get_total_size() ++{ ++ return totalSize; ++} ++ ++/*********************************************************************/ ++/* Flash_command() is the main driver function. It performs */ ++/* every possible command available to AMD B revision */ ++/* flash parts. Note that this command is not used directly, but */ ++/* rather called through the API wrapper functions provided below. */ ++/*********************************************************************/ ++static void flash_command(int command, WORD sector, int offset, UINT16 data) ++{ ++ volatile UINT16 *flashptr; ++ volatile UINT16 *flashbase; ++ ++ flashptr = (UINT16 *) flash_get_memptr(sector); ++ flashbase = (UINT16 *) flash_get_memptr(0); ++ ++ switch (flashFamily) { ++ case FLASH_UNDEFINED: ++ /* These commands should work for AMD, Intel and SST flashes */ ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xF0; ++ flashptr[0] = 0xFF; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0x5555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AAA] = 0x55; /* unlock 2 */ ++ flashptr[0x5555] = 0x90; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_AMD: ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xF0; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashptr[0x55] = 0x98; ++ break; ++ case FLASH_UB: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x20; ++ break; ++ case FLASH_PROG: ++ flashptr[0] = 0xA0; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_UBRESET: ++ flashptr[0] = 0x90; ++ flashptr[0] = 0x00; ++ break; ++ case FLASH_SERASE: ++ flashptr[0x555] = 0xAA; /* unlock 1 */ ++ flashptr[0x2AA] = 0x55; /* unlock 2 */ ++ flashptr[0x555] = 0x80; ++ flashptr[0x555] = 0xAA; ++ flashptr[0x2AA] = 0x55; ++ flashptr[0] = 0x30; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_INTEL: ++ switch (command) { ++ case FLASH_RESET: ++ flashptr[0] = 0xFF; ++ break; ++ case FLASH_READ_ID: ++ flashptr[0] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashptr[0] = 0x98; ++ break; ++ case FLASH_PROG: ++ flashptr[0] = 0x40; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_SERASE: ++ flashptr[0] = 0x60; ++ flashptr[0] = 0xD0; ++ flashptr[0] = 0x20; ++ flashptr[0] = 0xD0; ++ break; ++ default: ++ break; ++ } ++ break; ++ case FLASH_SST: ++ switch (command) { ++ case FLASH_RESET: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0xf0; ++ break; ++ case FLASH_READ_ID: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x90; ++ break; ++ case FLASH_CFIQUERY: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x98; ++ break; ++ case FLASH_UB: ++ break; ++ case FLASH_PROG: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0xa0; ++ flashptr[offset/2] = data; ++ break; ++ case FLASH_UBRESET: ++ break; ++ case FLASH_SERASE: ++ flashbase[0x5555] = 0xAA; /* unlock 1 */ ++ flashbase[0x2AAA] = 0x55; /* unlock 2 */ ++ flashbase[0x5555] = 0x80; ++ flashbase[0x5555] = 0xAA; ++ flashbase[0x2AAA] = 0x55; ++ flashptr[0] = 0x30; ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++} ++ ++/*********************************************************************/ ++/* flash_write extends the functionality of flash_program() by */ ++/* providing an faster way to program multiple data words, without */ ++/* needing the function overhead of looping algorithms which */ ++/* program word by word. This function utilizes fast pointers */ ++/* to quickly loop through bulk data. */ ++/*********************************************************************/ ++static int flash_write(WORD sector, int offset, byte *buf, int nbytes) ++{ ++ UINT16 *src; ++ src = (UINT16 *)buf; ++ ++ if ((nbytes | offset) & 1) { ++ return -1; ++ } ++ ++ flash_command(FLASH_UB, 0, 0, 0); ++ while (nbytes > 0) { ++ flash_command(FLASH_PROG, sector, offset, *src); ++ if (flash_wait(sector, offset, *src) != STATUS_READY) ++ break; ++ offset +=2; ++ nbytes -=2; ++ src++; ++ } ++ flash_command(FLASH_UBRESET, 0, 0, 0); ++ ++ return (byte*)src - buf; ++} ++ ++/*********************************************************************/ ++/* flash_wait utilizes the DQ6, DQ5, and DQ2 polling algorithms */ ++/* described in the flash data book. It can quickly ascertain the */ ++/* operational status of the flash device, and return an */ ++/* appropriate status code (defined in flash.h) */ ++/*********************************************************************/ ++static int flash_wait(WORD sector, int offset, UINT16 data) ++{ ++ volatile UINT16 *flashptr; /* flash window */ ++ UINT16 d1; ++ ++ flashptr = (UINT16 *) flash_get_memptr(sector); ++ ++ if (flashFamily == FLASH_AMD || flashFamily == FLASH_SST) { ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++ do { ++ d1 = flashptr[offset/2]; ++ if (d1 == data) ++ return STATUS_READY; ++ } while (!(d1 & 0x20)); ++ ++ d1 = flashptr[offset/2]; ++ ++ if (d1 != data) { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++#else ++ do { ++ d1 = *flashptr; /* read data */ ++ d1 ^= *flashptr; /* read it again and see what toggled */ ++ if (d1 == 0) /* no toggles, nothing's happening */ ++ return STATUS_READY; ++ } while (!(d1 & 0x20)); ++ ++ d1 = *flashptr; /* read data */ ++ d1 ^= *flashptr; /* read it again and see what toggled */ ++ ++ if (d1 != 0) { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++#endif ++ } else if (flashFamily == FLASH_INTEL) { ++ flashptr[0] = 0x70; ++ /* Wait for completion */ ++ while(!(*flashptr & 0x80)); ++ if (*flashptr & 0x30) { ++ flashptr[0] = 0x50; ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return STATUS_TIMEOUT; ++ } ++ flashptr[0] = 0x50; ++ flash_command(FLASH_RESET, 0, 0, 0); ++ } ++ ++ return STATUS_READY; ++} ++ ++/*********************************************************************/ ++/* flash_get_device_id() will perform an autoselect sequence on the */ ++/* flash device, and return the device id of the component. */ ++/* This function automatically resets to read mode. */ ++/*********************************************************************/ ++static UINT16 flash_get_device_id() ++{ ++ volatile UINT16 *fwp; /* flash window */ ++ UINT16 answer; ++ ++ fwp = (UINT16 *)flash_get_memptr(0); ++ ++ flash_command(FLASH_READ_ID, 0, 0, 0); ++ answer = *(fwp + 1); ++ if (answer == ID_AM29LV320M) { ++ answer = *(fwp + 0xe); ++ answer = *(fwp + 0xf); ++ } ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return( (UINT16) answer ); ++} ++ ++/*********************************************************************/ ++/* flash_get_cfi() is the main CFI workhorse function. Due to it's */ ++/* complexity and size it need only be called once upon */ ++/* initializing the flash system. Once it is called, all operations */ ++/* are performed by looking at the meminfo structure. */ ++/* All possible care was made to make this algorithm as efficient as */ ++/* possible. 90% of all operations are memory reads, and all */ ++/* calculations are done using bit-shifts when possible */ ++/*********************************************************************/ ++static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily) ++{ ++ volatile UINT16 *fwp; /* flash window */ ++ int i=0; ++ ++ flash_command(FLASH_CFIQUERY, 0, 0, 0); ++ ++ if (cfi_struct == 0) ++ fwp = (UINT16 *)flash_get_memptr(0); ++ else ++ fwp = cfi_struct; ++ ++ /* Initial house-cleaning */ ++ for(i=0; i < 8; i++) { ++ query->erase_block[i].sector_size = 0; ++ query->erase_block[i].num_sectors = 0; ++ } ++ ++ /* If not 'QRY', then we dont have a CFI enabled device in the socket */ ++ if( fwp[0x10] != 'Q' && ++ fwp[0x11] != 'R' && ++ fwp[0x12] != 'Y') { ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return(-1); ++ } ++ ++ query->num_erase_blocks = fwp[0x2C]; ++ if(flashFamily == FLASH_SST) ++ query->num_erase_blocks = 1; ++ ++ for(i=0; i < query->num_erase_blocks; i++) { ++ query->erase_block[i].num_sectors = fwp[(0x2D+(4*i))] + (fwp[0x2E + (4*i)] << 8); ++ query->erase_block[i].num_sectors++; ++ query->erase_block[i].sector_size = 256 * (256 * fwp[(0x30+(4*i))] + fwp[(0x2F+(4*i))]); ++ } ++ ++ flash_command(FLASH_RESET, 0, 0, 0); ++ return(1); ++} +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,142 @@ ++/************************************************************************/ ++/* */ ++/* AMD CFI Enabled Flash Memory Drivers */ ++/* File name: CFIFLASH.H */ ++/* Revision: 1.0 5/07/98 */ ++/* */ ++/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ ++/* This software is unpublished and contains the trade secrets and */ ++/* confidential proprietary information of AMD. Unless otherwise */ ++/* provided in the Software Agreement associated herewith, it is */ ++/* licensed in confidence "AS IS" and is not to be reproduced in whole */ ++/* or part by any means except for backup. Use, duplication, or */ ++/* disclosure by the Government is subject to the restrictions in */ ++/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ ++/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ ++/* Software owned by */ ++/* Advanced Micro Devices, Inc., */ ++/* One AMD Place, */ ++/* P.O. Box 3453 */ ++/* Sunnyvale, CA 94088-3453. */ ++/************************************************************************/ ++/* This software constitutes a basic shell of source code for */ ++/* programming all AMD Flash components. AMD */ ++/* will not be responsible for misuse or illegal use of this */ ++/* software for devices not supported herein. AMD is providing */ ++/* this source code "AS IS" and will not be responsible for */ ++/* issues arising from incorrect user implementation of the */ ++/* source code herein. It is the user's responsibility to */ ++/* properly design-in this source code. */ ++/* */ ++/************************************************************************/ ++#ifndef _CFIFLASH_H ++#define _CFIFLASH_H ++ ++/* include board/CPU specific definitions */ ++#include "bcmtypes.h" ++#include "board.h" ++ ++#define FLASH_BASE_ADDR_REG FLASH_BASE ++ ++#ifndef NULL ++#define NULL 0 ++#endif ++ ++#define MAXSECTORS 1024 /* maximum number of sectors supported */ ++ ++/* A structure for identifying a flash part. There is one for each ++ * of the flash part definitions. We need to keep track of the ++ * sector organization, the address register used, and the size ++ * of the sectors. ++ */ ++struct flashinfo { ++ char *name; /* "Am29DL800T", etc. */ ++ unsigned long addr; /* physical address, once translated */ ++ int areg; /* Can be set to zero for all parts */ ++ int nsect; /* # of sectors -- 19 in LV, 22 in DL */ ++ int bank1start; /* first sector # in bank 1 */ ++ int bank2start; /* first sector # in bank 2, if DL part */ ++ struct { ++ long size; /* # of bytes in this sector */ ++ long base; /* offset from beginning of device */ ++ int bank; /* 1 or 2 for DL; 1 for LV */ ++ } sec[MAXSECTORS]; /* per-sector info */ ++}; ++ ++/* ++ * This structure holds all CFI query information as defined ++ * in the JEDEC standard. All information up to ++ * primary_extended_query is standard among all manufactures ++ * with CFI enabled devices. ++ */ ++ ++struct cfi_query { ++ int num_erase_blocks; /* Number of sector defs. */ ++ struct { ++ unsigned long sector_size; /* byte size of sector */ ++ int num_sectors; /* Num sectors of this size */ ++ } erase_block[8]; /* Max of 256, but 8 is good */ ++}; ++ ++/* Standard Boolean declarations */ ++#define TRUE 1 ++#define FALSE 0 ++ ++/* Define different type of flash */ ++#define FLASH_UNDEFINED 0 ++#define FLASH_AMD 1 ++#define FLASH_INTEL 2 ++#define FLASH_SST 3 ++ ++/* Command codes for the flash_command routine */ ++#define FLASH_RESET 0 /* reset to read mode */ ++#define FLASH_READ_ID 1 /* read device ID */ ++#define FLASH_CFIQUERY 2 /* CFI query */ ++#define FLASH_UB 3 /* go into unlock bypass mode */ ++#define FLASH_PROG 4 /* program a word */ ++#define FLASH_UBRESET 5 /* reset to read mode from unlock bypass mode */ ++#define FLASH_SERASE 6 /* sector erase */ ++ ++/* Return codes from flash_status */ ++#define STATUS_READY 0 /* ready for action */ ++#define STATUS_TIMEOUT 1 /* operation timed out */ ++ ++/* A list of AMD compatible device ID's - add others as needed */ ++#define ID_AM29DL800T 0x224A ++#define ID_AM29DL800B 0x22CB ++#define ID_AM29LV800T 0x22DA ++#define ID_AM29LV800B 0x225B ++#define ID_AM29LV400B 0x22BA ++ ++#define ID_AM29LV160B 0x2249 ++#define ID_AM29LV160T 0x22C4 ++ ++#define ID_AM29LV320T 0x22F6 ++#define ID_MX29LV320AT 0x22A7 ++#define ID_AM29LV320B 0x22F9 ++#define ID_MX29LV320AB 0x22A8 ++ ++#define ID_AM29LV320M 0x227E ++#define ID_AM29LV320MB 0x2200 ++#define ID_AM29LV320MT 0x2201 ++ ++#define ID_SST39VF1601 0x234B ++#define ID_SST39VF3201 0x235B ++ ++/* A list of Intel compatible device ID's - add others as needed */ ++#define ID_I28F160C3T 0x88C2 ++#define ID_I28F160C3B 0x88C3 ++#define ID_I28F320C3T 0x88C4 ++#define ID_I28F320C3B 0x88C5 ++ ++extern byte flash_init(void); ++extern int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes); ++extern int flash_read_buf(WORD sector, int offset, byte *buffer, int numbytes); ++extern byte flash_sector_erase_int(WORD sector); ++extern int flash_get_numsectors(void); ++extern int flash_get_sector_size(WORD sector); ++extern int flash_get_total_size(void); ++extern unsigned char *flash_get_memptr(WORD sector); ++extern int flash_get_blk(int addr); ++ ++#endif +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,299 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Interrupt control functions for Broadcom 963xx MIPS boards ++ */ ++ ++#include <asm/atomic.h> ++ ++#include <linux/delay.h> ++#include <linux/init.h> ++#include <linux/ioport.h> ++#include <linux/irq.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/slab.h> ++#include <linux/module.h> ++#include <linux/spinlock.h> ++ ++#include <asm/irq.h> ++#include <asm/mipsregs.h> ++#include <asm/addrspace.h> ++#include <asm/signal.h> ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++static DEFINE_SPINLOCK(irq_lock); ++ ++static void irq_dispatch_int(struct pt_regs *regs) ++{ ++ unsigned int pendingIrqs; ++ static unsigned int irqBit; ++ static unsigned int isrNumber = 31; ++ ++ pendingIrqs = PERF->IrqStatus & PERF->IrqMask; ++ if (!pendingIrqs) { ++ return; ++ } ++ ++ while (1) { ++ irqBit <<= 1; ++ isrNumber++; ++ if (isrNumber == 32) { ++ isrNumber = 0; ++ irqBit = 0x1; ++ } ++ if (pendingIrqs & irqBit) { ++ PERF->IrqMask &= ~irqBit; // mask ++ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET, regs); ++ break; ++ } ++ } ++} ++ ++static void irq_dispatch_ext(uint32 irq, struct pt_regs *regs) ++{ ++ if (!(PERF->ExtIrqCfg & (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)))) { ++ printk("**** Ext IRQ mask. Should not dispatch ****\n"); ++ } ++ /* disable and clear interrupt in the controller */ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ do_IRQ(irq, regs); ++} ++ ++void brcm_irq_dispatch(struct pt_regs *regs) ++{ ++ u32 cause; ++ while((cause = (read_c0_cause()& CAUSEF_IP))) { ++ if (cause & CAUSEF_IP7) ++ do_IRQ(MIPS_TIMER_INT, regs); ++ else if (cause & CAUSEF_IP2) ++ irq_dispatch_int(regs); ++ else if (cause & CAUSEF_IP3) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); ++ else if (cause & CAUSEF_IP4) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); ++ else if (cause & CAUSEF_IP5) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); ++ else if (cause & CAUSEF_IP6) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); ++ //cli(); ++ spin_lock_irq(&irq_lock); ++ } ++} ++ ++void plat_irq_dispatch(struct pt_regs *regs) ++{ ++ u32 cause; ++ while((cause = (read_c0_cause()& CAUSEF_IP))) { ++ if (cause & CAUSEF_IP7) ++ do_IRQ(MIPS_TIMER_INT, regs); ++ else if (cause & CAUSEF_IP2) ++ irq_dispatch_int(regs); ++ else if (cause & CAUSEF_IP3) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); ++ else if (cause & CAUSEF_IP4) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); ++ else if (cause & CAUSEF_IP5) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); ++ else if (cause & CAUSEF_IP6) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); ++ //cli(); ++ spin_lock_irq(&irq_lock); ++ } ++} ++ ++ ++void enable_brcm_irq(unsigned int irq) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { ++ PERF->IrqMask |= (1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); ++ } ++ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { ++ /* enable and clear interrupt in the controller */ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ } ++ local_irq_restore(flags); ++} ++ ++void disable_brcm_irq(unsigned int irq) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { ++ PERF->IrqMask &= ~(1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); ++ } ++ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { ++ /* disable interrupt in the controller */ ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ } ++ local_irq_restore(flags); ++} ++ ++void ack_brcm_irq(unsigned int irq) ++{ ++ /* Already done in brcm_irq_dispatch */ ++} ++ ++unsigned int startup_brcm_irq(unsigned int irq) ++{ ++ enable_brcm_irq(irq); ++ ++ return 0; /* never anything pending */ ++} ++ ++unsigned int startup_brcm_none(unsigned int irq) ++{ ++ return 0; ++} ++ ++void end_brcm_irq(unsigned int irq) ++{ ++ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) ++ enable_brcm_irq(irq); ++} ++ ++void end_brcm_none(unsigned int irq) ++{ ++} ++ ++#define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) ++ ++static void __init brcm_irq_setup(void) ++{ ++ extern asmlinkage void brcmIRQ(void); ++ ++ clear_c0_status(ST0_BEV); ++ set_except_vector(0, brcmIRQ); ++ change_c0_status(ST0_IM, ALLINTS_NOTIMER); ++ ++#ifdef CONFIG_REMOTE_DEBUG ++ rs_kgdb_hook(0); ++#endif ++} ++ ++static struct hw_interrupt_type brcm_irq_type = { ++ .typename = "MIPS", ++ .startup = startup_brcm_irq, ++ .shutdown = disable_brcm_irq, ++ .enable = enable_brcm_irq, ++ .disable = disable_brcm_irq, ++ .ack = ack_brcm_irq, ++ .end = end_brcm_irq, ++ .set_affinity = NULL ++}; ++ ++static struct hw_interrupt_type brcm_irq_no_end_type = { ++ .typename = "MIPS", ++ .startup = startup_brcm_none, ++ .shutdown = disable_brcm_irq, ++ .enable = enable_brcm_irq, ++ .disable = disable_brcm_irq, ++ .ack = ack_brcm_irq, ++ .end = end_brcm_none, ++ .set_affinity = NULL ++}; ++ ++void __init arch_init_irq(void) ++{ ++ int i; ++ ++ for (i = 0; i < NR_IRQS; i++) { ++ irq_desc[i].status = IRQ_DISABLED; ++ irq_desc[i].action = 0; ++ irq_desc[i].depth = 1; ++ irq_desc[i].handler = &brcm_irq_type; ++ } ++ ++ brcm_irq_setup(); ++} ++ ++int request_external_irq(unsigned int irq, ++ FN_HANDLER handler, ++ unsigned long irqflags, ++ const char * devname, ++ void *dev_id) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); // Clear ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); // Mask ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_INSENS_SHFT)); // Edge insesnsitive ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_LEVEL_SHFT)); // Level triggered ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_SENSE_SHFT)); // Low level ++ ++ local_irq_restore(flags); ++ ++ return( request_irq(irq, handler, irqflags, devname, dev_id) ); ++} ++ ++/* VxWorks compatibility function(s). */ ++ ++unsigned int BcmHalMapInterrupt(FN_HANDLER pfunc, unsigned int param, ++ unsigned int interruptId) ++{ ++ int nRet = -1; ++ char *devname; ++ ++ devname = kmalloc(16, GFP_KERNEL); ++ if (devname) ++ sprintf( devname, "brcm_%d", interruptId ); ++ ++ /* Set the IRQ description to not automatically enable the interrupt at ++ * the end of an ISR. The driver that handles the interrupt must ++ * explicitly call BcmHalInterruptEnable or enable_brcm_irq. This behavior ++ * is consistent with interrupt handling on VxWorks. ++ */ ++ irq_desc[interruptId].handler = &brcm_irq_no_end_type; ++ ++ if( interruptId >= INTERNAL_ISR_TABLE_OFFSET ) ++ { ++ nRet = request_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, ++ devname, (void *) param ); ++ } ++ else if (interruptId >= INTERRUPT_ID_EXTERNAL_0 && interruptId <= INTERRUPT_ID_EXTERNAL_3) ++ { ++ nRet = request_external_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, ++ devname, (void *) param ); ++ } ++ ++ return( nRet ); ++} ++ ++ ++/* Debug function. */ ++ ++void dump_intr_regs(void) ++{ ++ printk("PERF->ExtIrqCfg [%08x]\n", *(&(PERF->ExtIrqCfg))); ++} ++ ++EXPORT_SYMBOL(enable_brcm_irq); ++EXPORT_SYMBOL(disable_brcm_irq); ++EXPORT_SYMBOL(request_external_irq); ++EXPORT_SYMBOL(BcmHalMapInterrupt); ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,172 @@ ++# Kernel and Driver configuration for Broadcom Commengine ADSL board ++choice ++ prompt "Broadcom Commengine ADSL board" ++ depends on MIPS_BRCM ++ default BCM96345 ++ help ++ Select different Broadcom ADSL board ++ ++config BCM96338 ++ bool "96338 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++config BCM96345 ++ bool "96345 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++config BCM96348 ++ bool "96348 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++endchoice ++ ++config BCM_BOARD ++ bool "Support for Broadcom Board" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SERIAL ++ bool "Support for Serial Port" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENET ++ tristate "Support for Ethernet" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_USB ++ tristate "Support for USB" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_WLAN ++ tristate "Support for Wireless" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PCI ++ bool "Support for PCI" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ select PCI ++ ++config BCM_ATMAPI ++ tristate "Support for ATM" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMTEST ++ tristate "Support for ATM Diagnostic" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ADSL ++ tristate "Support for ADSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENDPOINT ++ tristate "Support for VOICE" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PROCFS ++ tristate "Support for PROCFS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_VDSL ++ tristate "Support for VDSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SECURITY ++ tristate "Support for SECURITY" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_HPNA ++ tristate "Support for HPNA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_BOARD_IMPL ++ int "Implementation index for ADSL Board" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SERIAL_IMPL ++ int "Implementation index for Serial" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENET_IMPL ++ int "Implementation index for Ethernet" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_USB_IMPL ++ int "Implementation index for USB" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_WLAN_IMPL ++ int "Implementation index for WIRELESS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMAPI_IMPL ++ int "Implementation index for ATM" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMTEST_IMPL ++ int "Implementation index for ATM Diagnostic" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_BLAA_IMPL ++ int "Implementation index for BLAA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ADSL_IMPL ++ int "Implementation index for ADSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENDPOINT_IMPL ++ int "Implementation index for VOICE" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PROCFS_IMPL ++ int "Implementation index for PROCFS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_VDSL_IMPL ++ int "Implementation index for VDSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SECURITY_IMPL ++ int "Implementation index for SECURITY" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_HPNA_IMPL ++ int "Implementation index for HPNA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++choice ++ prompt "Root File System" ++ depends on MIPS_BRCM ++ default ROOTFS_SQUASHFS ++ help ++ Select root file system on the board flash. ++ ++config ROOTFS_SQUASHFS ++ bool "SQUASHFS" ++config ROOTFS_CRAMFS ++ bool "CRAMFS" ++config ROOTFS_JFFS2 ++ bool "JFFS2" ++config ROOTFS_NFS ++ bool "NFS" ++ ++endchoice ++ ++config ROOT_FLASHFS ++ string "flash partition" ++ depends on ROOTFS_SQUASHFS || ROOTFS_CRAMFS || ROOTFS_JFFS2 ++ default "root=31:0 ro noinitrd" if ROOTFS_SQUASHFS = y || ROOTFS_CRAMFS = y ++ default "root=31:2 ro noinitrd" if ROOTFS_JFFS2 = y ++ help ++ This is the root file system partition on flash memory ++ ++config ROOT_NFS_DIR ++ string "NFS server path" ++ depends on ROOTFS_NFS ++ default "/opt/bcm96338/targets/96338R/fs" if BCM96338 = y ++ default "/opt/bcm96345/targets/96345R/fs" if BCM96345 = y ++ default "/opt/bcm96348/targets/96348R/fs" if BCM96348 = y ++ help ++ This is the path of NFS server (host system) +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,23 @@ ++# ++# Makefile for generic Broadcom MIPS boards ++# ++# Copyright (C) 2004 Broadcom Corporation ++# ++obj-y := irq.o prom.o setup.o time.o ser_init.o bcm63xx_flash.o bcm63xx_led.o board.o boardparms.o cfiflash.o ++ ++SRCBASE := $(TOPDIR) ++EXTRA_CFLAGS += -I$(SRCBASE)/include ++#EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -DDBG ++EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) ++ ++ ++ifeq "$(ADSL)" "ANNEX_B" ++EXTRA_CFLAGS += -DADSL_ANNEXB ++endif ++ifeq "$(ADSL)" "SADSL" ++EXTRA_CFLAGS += -DADSL_SADSL ++endif ++ifeq "$(ADSL)" "ANNEX_C" ++EXTRA_CFLAGS += -DADSL_ANNEXC ++endif ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c 2006-08-03 16:40:27.000000000 +0200 +@@ -0,0 +1,250 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * prom.c: PROM library initialization code. ++ * ++ */ ++#include <linux/init.h> ++#include <linux/mm.h> ++#include <linux/sched.h> ++#include <linux/bootmem.h> ++#include <linux/blkdev.h> ++#include <asm/addrspace.h> ++#include <asm/bootinfo.h> ++#include <asm/cpu.h> ++#include <asm/time.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include "boardparms.h" ++#include "softdsl/AdslCoreDefs.h" ++ ++ ++//char arcs_cmdline[CL_SIZE] __initdata = {0}; ++/* inv_xde */ ++int boot_loader_type; ++ ++extern int do_syslog(int, char *, int); ++extern void serial_init(void); ++extern void __init InitNvramInfo( void ); ++extern void kerSysFlashInit( void ); ++extern unsigned long get_nvram_start_addr(void); ++void __init create_root_nfs_cmdline( char *cmdline ); ++ ++#if defined(CONFIG_BCM96338) ++#define CPU_CLOCK 240000000 ++#define MACH_BCM MACH_BCM96338 ++#endif ++#if defined(CONFIG_BCM96345) ++#define CPU_CLOCK 140000000 ++#define MACH_BCM MACH_BCM96345 ++#endif ++#if defined(CONFIG_BCM96348) ++void __init calculateCpuSpeed(void); ++static unsigned long cpu_speed; ++#define CPU_CLOCK cpu_speed ++#define MACH_BCM MACH_BCM96348 ++#endif ++ ++const char *get_system_type(void) ++{ ++ /*PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ ++ return( pNvramData->szBoardId );*/ ++ return "brcm63xx"; ++} ++ ++unsigned long getMemorySize(void) ++{ ++ unsigned long ulSdramType = BOARD_SDRAM_TYPE; ++ ++ unsigned long ulSdramSize; ++ ++ switch( ulSdramType ) ++ { ++ case BP_MEMORY_16MB_1_CHIP: ++ case BP_MEMORY_16MB_2_CHIP: ++ ulSdramSize = 16 * 1024 * 1024; ++ break; ++ case BP_MEMORY_32MB_1_CHIP: ++ case BP_MEMORY_32MB_2_CHIP: ++ ulSdramSize = 32 * 1024 * 1024; ++ break; ++ case BP_MEMORY_64MB_2_CHIP: ++ ulSdramSize = 64 * 1024 * 1024; ++ break; ++ default: ++ ulSdramSize = 8 * 1024 * 1024; ++ break; ++ } + if (boot_loader_type == BOOT_CFE) ++ return ulSdramSize; ++ else ++ // assume that there is one contiguous memory map ++ return boot_mem_map.map[0].size; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: prom_init ++ -------------------------------------------------------------------------- */ ++void __init prom_init(void) ++{ ++ extern ulong r4k_interval; ++ ++ serial_init(); ++ ++ /* Need to fixup boot loader detection code ++ * whithout changing prom_init prototype ++ */ ++ + if (boot_loader_type == BOOT_CFE) ++ kerSysFlashInit(); ++ ++ do_syslog(8, NULL, 8); ++ ++ printk( "%s prom init\n", get_system_type() ); ++ ++ PERF->IrqMask = 0; ++ ++ arcs_cmdline[0] = '\0'; ++#if defined(CONFIG_ROOT_NFS) ++ create_root_nfs_cmdline( arcs_cmdline ); ++#elif defined(CONFIG_ROOT_FLASHFS) ++ strcpy(arcs_cmdline, CONFIG_ROOT_FLASHFS); ++#endif ++//#define ADSL_SDRAM_IMAGE_SIZE 0x40000 ++ /* inv_xde */ ++ //add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); + if (boot_loader_type == BOOT_CFE) ++ add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); ++ else ++ add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); ++#if defined(CONFIG_BCM96348) ++ calculateCpuSpeed(); ++#endif ++ /* Count register increments every other clock */ ++ r4k_interval = CPU_CLOCK / HZ / 2; ++ mips_hpt_frequency = CPU_CLOCK / 2; ++ ++ mips_machgroup = MACH_GROUP_BRCM; ++ mips_machtype = MACH_BCM; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: prom_free_prom_memory ++Abstract: ++ -------------------------------------------------------------------------- */ ++void __init prom_free_prom_memory(void) ++{ ++ ++} ++ ++#if 0 ++#if defined(CONFIG_ROOT_NFS) ++/* This function reads in a line that looks something like this: ++ * ++ * + * CFE bootline=bcmEnet(0,0)host:vmlinux e=192.169.0.100:ffffff00 h=192.169.0.1 ++ * ++ * ++ * and retuns in the cmdline parameter some that looks like this: ++ * ++ * CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/opt/targets/96345R/fs ++ * ip=192.168.0.100:192.168.0.1::255.255.255.0::eth0:off rw" ++ */ ++#define BOOT_LINE_ADDR 0x0 ++#define HEXDIGIT(d) ((d >= '0' && d <= '9') ? (d - '0') : ((d | 0x20) - 'W')) ++#define HEXBYTE(b) (HEXDIGIT((b)[0]) << 4) + HEXDIGIT((b)[1]) ++extern unsigned long get_nvram_start_addr(void); ++ ++void __init create_root_nfs_cmdline( char *cmdline ) ++{ ++ char root_nfs_cl[] = "root=/dev/nfs nfsroot=%s:" CONFIG_ROOT_NFS_DIR ++ " ip=%s:%s::%s::eth0:off rw"; ++ ++ char *localip = NULL; ++ char *hostip = NULL; ++ char mask[16] = ""; ++ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ char bootline[128] = ""; ++ char *p = bootline; ++ ++ memcpy(bootline, pNvramData->szBootline, sizeof(bootline)); ++ while( *p ) ++ { ++ if( p[0] == 'e' && p[1] == '=' ) ++ { ++ /* Found local ip address */ ++ p += 2; ++ localip = p; ++ while( *p && *p != ' ' && *p != ':' ) ++ p++; ++ if( *p == ':' ) ++ { ++ /* Found network mask (eg FFFFFF00 */ ++ *p++ = '\0'; ++ sprintf( mask, "%u.%u.%u.%u", HEXBYTE(p), HEXBYTE(p + 2), ++ HEXBYTE(p + 4), HEXBYTE(p + 6) ); ++ p += 4; ++ } ++ else if( *p == ' ' ) ++ *p++ = '\0'; ++ } ++ else if( p[0] == 'h' && p[1] == '=' ) ++ { ++ /* Found host ip address */ ++ p += 2; ++ hostip = p; ++ while( *p && *p != ' ' ) ++ p++; ++ if( *p == ' ' ) ++ *p++ = '\0'; ++ } ++ else ++ p++; ++ } ++ ++ if( localip && hostip ) ++ sprintf( cmdline, root_nfs_cl, hostip, localip, hostip, mask ); ++} ++#endif ++#endif ++ ++#if defined(CONFIG_BCM96348) ++/* ********************************************************************* ++ * calculateCpuSpeed() ++ * Calculate the BCM6348 CPU speed by reading the PLL strap register ++ * and applying the following formula: ++ * cpu_clk = (.25 * 64MHz freq) * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) ++ * Input parameters: ++ * none ++ * Return value: ++ * none ++ ********************************************************************* */ ++void __init calculateCpuSpeed(void) ++{ ++ UINT32 pllStrap = PERF->PllStrap; ++ int n1 = (pllStrap & PLL_N1_MASK) >> PLL_N1_SHFT; ++ int n2 = (pllStrap & PLL_N2_MASK) >> PLL_N2_SHFT; ++ int m1cpu = (pllStrap & PLL_M1_CPU_MASK) >> PLL_M1_CPU_SHFT; ++ ++ cpu_speed = (16 * (n1 + 1) * (n2 + 2) / (m1cpu + 1)) * 1000000; ++} ++#endif ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,180 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Broadcom bcm63xx serial port initialization, also prepare for printk ++ * by registering with console_init ++ * ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/console.h> ++#include <linux/sched.h> ++ ++#include <asm/addrspace.h> ++#include <asm/irq.h> ++#include <asm/reboot.h> ++#include <asm/gdb-stub.h> ++#include <asm/mc146818rtc.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define SER63XX_DEFAULT_BAUD 115200 ++#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) ++#define stUart ((volatile Uart * const) UART_BASE) ++ ++// Transmit interrupts ++#define TXINT (TXFIFOEMT | TXUNDERR | TXOVFERR) ++// Receive interrupts ++#define RXINT (RXFIFONE | RXOVFERR) ++ ++/* -------------------------------------------------------------------------- ++ Name: serial_init ++ Purpose: Initalize the UART ++-------------------------------------------------------------------------- */ ++void __init serial_init(void) ++{ ++ UINT32 tmpVal = SER63XX_DEFAULT_BAUD; ++ ULONG clockFreqHz; ++ ++#if defined(CONFIG_BCM96345) ++ // Make sure clock is ticking ++ PERF->blkEnables |= UART_CLK_EN; ++#endif ++ ++ /* Dissable channel's receiver and transmitter. */ ++ stUart->control &= ~(BRGEN|TXEN|RXEN); ++ ++ /*--------------------------------------------------------------------*/ ++ /* Write the table value to the clock select register. */ ++ /* DPullen - this is the equation to use: */ ++ /* value = clockFreqHz / baud / 32-1; */ ++ /* (snmod) Actually you should also take into account any necessary */ ++ /* rounding. Divide by 16, look at lsb, if 0, divide by 2 */ ++ /* and subtract 1. If 1, just divide by 2 */ ++ /*--------------------------------------------------------------------*/ ++ clockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; ++ tmpVal = (clockFreqHz / tmpVal) / 16; ++ if( tmpVal & 0x01 ) ++ tmpVal /= 2; //Rounding up, so sub is already accounted for ++ else ++ tmpVal = (tmpVal / 2) - 1; // Rounding down so we must sub 1 ++ stUart->baudword = tmpVal; ++ ++ /* Finally, re-enable the transmitter and receiver. */ ++ stUart->control |= (BRGEN|TXEN|RXEN); ++ ++ stUart->config = (BITS8SYM | ONESTOP); ++ // Set the FIFO interrupt depth ... stUart->fifocfg = 0xAA; ++ stUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; ++ stUart->intMask = 0; ++ stUart->intMask = RXINT | TXINT; ++} ++ ++ ++/* prom_putc() ++ * Output a character to the UART ++ */ ++void prom_putc(char c) ++{ ++ /* Wait for Tx uffer to empty */ ++ while (! (READ16(stUart->intStatus) & TXFIFOEMT)); ++ /* Send character */ ++ stUart->Data = c; ++} ++ ++/* prom_puts() ++ * Write a string to the UART ++ */ ++void prom_puts(const char *s) ++{ ++ while (*s) { ++ if (*s == '\n') { ++ prom_putc('\r'); ++ } ++ prom_putc(*s++); ++ } ++} ++ ++ ++/* prom_getc_nowait() ++ * Returns a character from the UART ++ * Returns -1 if no characters available or corrupted ++ */ ++int prom_getc_nowait(void) ++{ ++ uint16 uStatus; ++ int cData = -1; ++ ++ uStatus = READ16(stUart->intStatus); ++ ++ if (uStatus & RXFIFONE) { /* Do we have a character? */ ++ cData = READ16(stUart->Data) & 0xff; /* Read character */ ++ if (uStatus & (RXFRAMERR | RXPARERR)) { /* If we got an error, throw it away */ ++ cData = -1; ++ } ++ } ++ ++ return cData; ++} ++ ++/* prom_getc() ++ * Returns a charcter from the serial port ++ * Will block until it receives a valid character ++*/ ++char prom_getc(void) ++{ ++ int cData = -1; ++ ++ /* Loop until we get a valid character */ ++ while(cData == -1) { ++ cData = prom_getc_nowait(); ++ } ++ return (char) cData; ++} ++ ++/* prom_testc() ++ * Returns 0 if no characters available ++ */ ++int prom_testc(void) ++{ ++ uint16 uStatus; ++ ++ uStatus = READ16(stUart->intStatus); ++ ++ return (uStatus & RXFIFONE); ++} ++ ++#if defined (CONFIG_REMOTE_DEBUG) ++/* Prevent other code from writing to the serial port */ ++void _putc(char c) { } ++void _puts(const char *ptr) { } ++#else ++/* Low level outputs call prom routines */ ++void _putc(char c) { ++ prom_putc(c); ++} ++void _puts(const char *ptr) { ++ prom_puts(ptr); ++} ++#endif +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,523 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Generic setup routines for Broadcom 963xx MIPS boards ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/kdev_t.h> ++#include <linux/types.h> ++#include <linux/console.h> ++#include <linux/sched.h> ++#include <linux/mm.h> ++#include <linux/slab.h> ++#include <linux/module.h> ++#include <linux/pm.h> ++ ++#include <asm/addrspace.h> ++#include <asm/bcache.h> ++#include <asm/irq.h> ++#include <asm/time.h> ++#include <asm/reboot.h> ++#include <asm/gdb-stub.h> ++ ++extern void brcm_timer_setup(struct irqaction *irq); ++extern unsigned long getMemorySize(void); ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++#include <linux/pci.h> ++#include <linux/delay.h> ++#include <bcm_map_part.h> ++#include <bcmpci.h> ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++#endif ++ ++/* This function should be in a board specific directory. For now, ++ * assume that all boards that include this file use a Broadcom chip ++ * with a soft reset bit in the PLL control register. ++ */ ++static void brcm_machine_restart(char *command) ++{ ++ const unsigned long ulSoftReset = 0x00000001; ++ unsigned long *pulPllCtrl = (unsigned long *) 0xfffe0008; ++ *pulPllCtrl |= ulSoftReset; ++} ++ ++static void brcm_machine_halt(void) ++{ ++ printk("System halted\n"); ++ while (1); ++} ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++ ++static void mpi_SetLocalPciConfigReg(uint32 reg, uint32 value) ++{ ++ /* write index then value */ ++ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; ++ mpi->pcicfgdata = value; ++} ++ ++static uint32 mpi_GetLocalPciConfigReg(uint32 reg) ++{ ++ /* write index then get value */ ++ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; ++ return mpi->pcicfgdata; ++} ++ ++/* ++ * mpi_ResetPcCard: Set/Reset the PcCard ++ */ ++static void mpi_ResetPcCard(int cardtype, BOOL bReset) ++{ ++ if (cardtype == MPI_CARDTYPE_NONE) { ++ return; ++ } ++ ++ if (cardtype == MPI_CARDTYPE_CARDBUS) { ++ bReset = ! bReset; ++ } ++ ++ if (bReset) { ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); ++ } else { ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 | PCCARD_CARD_RESET); ++ } ++} ++ ++/* ++ * mpi_ConfigCs: Configure an MPI/EBI chip select ++ */ ++static void mpi_ConfigCs(uint32 cs, uint32 base, uint32 size, uint32 flags) ++{ ++ mpi->cs[cs].base = ((base & 0x1FFFFFFF) | size); ++ mpi->cs[cs].config = flags; ++} ++ ++/* ++ * mpi_InitPcmciaSpace ++ */ ++static void mpi_InitPcmciaSpace(void) ++{ ++ // ChipSelect 4 controls PCMCIA Memory accesses ++ mpi_ConfigCs(PCMCIA_COMMON_BASE, pcmciaMem, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); ++ // ChipSelect 5 controls PCMCIA Attribute accesses ++ mpi_ConfigCs(PCMCIA_ATTRIBUTE_BASE, pcmciaAttr, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); ++ // ChipSelect 6 controls PCMCIA I/O accesses ++ mpi_ConfigCs(PCMCIA_IO_BASE, pcmciaIo, EBI_SIZE_64K, (EBI_WORD_WIDE|EBI_ENABLE)); ++ ++ mpi->pcmcia_cntl2 = ((PCMCIA_ATTR_ACTIVE << RW_ACTIVE_CNT_BIT) | ++ (PCMCIA_ATTR_INACTIVE << INACTIVE_CNT_BIT) | ++ (PCMCIA_ATTR_CE_SETUP << CE_SETUP_CNT_BIT) | ++ (PCMCIA_ATTR_CE_HOLD << CE_HOLD_CNT_BIT)); ++ ++ mpi->pcmcia_cntl2 |= (PCMCIA_HALFWORD_EN | PCMCIA_BYTESWAP_DIS); ++} ++ ++/* ++ * cardtype_vcc_detect: PC Card's card detect and voltage sense connection ++ * ++ * CD1#/ CD2#/ VS1#/ VS2#/ Card Initial Vcc ++ * CCD1# CCD2# CVS1 CVS2 Type ++ * ++ * GND GND open open 16-bit 5 vdc ++ * ++ * GND GND GND open 16-bit 3.3 vdc ++ * ++ * GND GND open GND 16-bit x.x vdc ++ * ++ * GND GND GND GND 16-bit 3.3 & x.x vdc ++ * ++ *==================================================================== ++ * ++ * CVS1 GND CCD1# open CardBus 3.3 vdc ++ * ++ * GND CVS2 open CCD2# CardBus x.x vdc ++ * ++ * GND CVS1 CCD2# open CardBus y.y vdc ++ * ++ * GND CVS2 GND CCD2# CardBus 3.3 & x.x vdc ++ * ++ * CVS2 GND open CCD1# CardBus x.x & y.y vdc ++ * ++ * GND CVS1 CCD2# open CardBus 3.3, x.x & y.y vdc ++ * ++ */ ++static int cardtype_vcc_detect(void) ++{ ++ uint32 data32; ++ int cardtype; ++ ++ cardtype = MPI_CARDTYPE_NONE; ++ mpi->pcmcia_cntl1 = 0x0000A000; // Turn on the output enables and drive ++ // the CVS pins to 0. ++ data32 = mpi->pcmcia_cntl1; ++ switch (data32 & 0x00000003) // Test CD1# and CD2#, see if card is plugged in. ++ { ++ case 0x00000003: // No Card is in the slot. ++ printk("mpi: No Card is in the PCMCIA slot\n"); ++ break; ++ ++ case 0x00000002: // Partial insertion, No CD2#. ++ printk("mpi: Card in the PCMCIA slot partial insertion, no CD2 signal\n"); ++ break; ++ ++ case 0x00000001: // Partial insertion, No CD1#. ++ printk("mpi: Card in the PCMCIA slot partial insertion, no CD1 signal\n"); ++ break; ++ ++ case 0x00000000: ++ mpi->pcmcia_cntl1 = 0x0000A0C0; // Turn off the CVS output enables and ++ // float the CVS pins. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ // Read the Register. ++ switch (data32 & 0x0000000C) // See what is on the CVS pins. ++ { ++ case 0x00000000: // CVS1 and CVS2 are tied to ground, only 1 option. ++ printk("mpi: Detected 3.3 & x.x 16-bit PCMCIA card\n"); ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ break; ++ ++ case 0x00000004: // CVS1 is open or tied to CCD1/CCD2 and CVS2 is tied to ground. ++ // 2 valid voltage options. ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ mpi->pcmcia_cntl1 = 0x0000A080; // Drive CVS1 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS2, not valid. ++ printk("mpi: Unknown card plugged into slot\n"); ++ } else { // CCD2 is tied to CVS1. ++ printk("mpi: Detected 3.3, x.x and y.y Cardbus card\n"); ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ } ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ printk("mpi: Detected x.x vdc 16-bit PCMCIA card\n"); ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ break; ++ } ++ break; ++ ++ case 0x00000008: // CVS2 is open or tied to CCD1/CCD2 and CVS1 is tied to ground. ++ // 2 valid voltage options. ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS1, not valid. ++ printk("mpi: Unknown card plugged into slot\n"); ++ } else {// CCD2 is tied to CVS2. ++ printk("mpi: Detected 3.3 and x.x Cardbus card\n"); ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ } ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ printk("mpi: Detected 3.3 vdc 16-bit PCMCIA card\n"); ++ break; ++ } ++ break; ++ ++ case 0x0000000C: // CVS1 and CVS2 are open or tied to CCD1/CCD2. ++ // 5 valid voltage options. ++ ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ // CCD1 is tied to ground. ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS1. ++ printk("mpi: Detected y.y vdc Cardbus card\n"); ++ } else { // CCD2 is tied to CVS2. ++ printk("mpi: Detected x.x vdc Cardbus card\n"); ++ } ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // CCD2 is tied to ground. ++ ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000001) {// CCD1 is tied to CVS1. ++ printk("mpi: Detected 3.3 vdc Cardbus card\n"); ++ } else { // CCD1 is tied to CVS2. ++ printk("mpi: Detected x.x and y.y Cardbus card\n"); ++ } ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ printk("mpi: Detected 5 vdc 16-bit PCMCIA card\n"); ++ break; ++ } ++ break; ++ ++ default: ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ } ++ } ++ return cardtype; ++} ++ ++/* ++ * mpi_DetectPcCard: Detect the plugged in PC-Card ++ * Return: < 0 => Unknown card detected ++ * 0 => No card detected ++ * 1 => 16-bit card detected ++ * 2 => 32-bit CardBus card detected ++ */ ++static int mpi_DetectPcCard(void) ++{ ++ int cardtype; ++ ++ cardtype = cardtype_vcc_detect(); ++ switch(cardtype) { ++ case MPI_CARDTYPE_PCMCIA: ++ mpi->pcmcia_cntl1 &= ~0x0000e000; // disable enable bits ++ //mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); ++ mpi->pcmcia_cntl1 |= (PCMCIA_ENABLE | PCMCIA_GPIO_ENABLE); ++ mpi_InitPcmciaSpace(); ++ mpi_ResetPcCard(cardtype, FALSE); ++ // Hold card in reset for 10ms ++ mdelay(10); ++ mpi_ResetPcCard(cardtype, TRUE); ++ // Let card come out of reset ++ mdelay(100); ++ break; ++ case MPI_CARDTYPE_CARDBUS: ++ // 8 => CardBus Enable ++ // 1 => PCI Slot Number ++ // C => Float VS1 & VS2 ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & 0xFFFF0000) | ++ CARDBUS_ENABLE | ++ (CARDBUS_SLOT << 8)| ++ VS2_OEN | ++ VS1_OEN; ++ /* access to this memory window will be to/from CardBus */ ++ mpi->l2pmremap1 |= CARDBUS_MEM; ++ ++ // Need to reset the Cardbus Card. There's no CardManager to do this, ++ // and we need to be ready for PCI configuration. ++ mpi_ResetPcCard(cardtype, FALSE); ++ // Hold card in reset for 10ms ++ mdelay(10); ++ mpi_ResetPcCard(cardtype, TRUE); ++ // Let card come out of reset ++ mdelay(100); ++ break; ++ default: ++ break; ++ } ++ return cardtype; ++} ++ ++static int mpi_init(void) ++{ ++ unsigned long data; ++ unsigned int chipid; ++ unsigned int chiprev; ++ unsigned int sdramsize; ++ ++ chipid = (PERF->RevID & 0xFFFF0000) >> 16; ++ chiprev = (PERF->RevID & 0xFF); ++ sdramsize = getMemorySize(); ++ /* ++ * Init the pci interface ++ */ ++ data = GPIO->GPIOMode; // GPIO mode register ++ data |= GROUP2_PCI | GROUP1_MII_PCCARD; // PCI internal arbiter + Cardbus ++ GPIO->GPIOMode = data; // PCI internal arbiter ++ ++ /* ++ * In the BCM6348 CardBus support is defaulted to Slot 0 ++ * because there is no external IDSEL for CardBus. To disable ++ * the CardBus and allow a standard PCI card in Slot 0 ++ * set the cbus_idsel field to 0x1f. ++ */ ++ /* ++ uData = mpi->pcmcia_cntl1; ++ uData |= CARDBUS_IDSEL; ++ mpi->pcmcia_cntl1 = uData; ++ */ ++ // Setup PCI I/O Window range. Give 64K to PCI I/O ++ mpi->l2piorange = ~(BCM_PCI_IO_SIZE_64KB-1); ++ // UBUS to PCI I/O base address ++ mpi->l2piobase = BCM_PCI_IO_BASE & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI I/O Window remap ++ mpi->l2pioremap = (BCM_PCI_IO_BASE | MEM_WINDOW_EN); ++ ++ // enable PCI related GPIO pins and data swap between system and PCI bus ++ mpi->locbuscntrl = (EN_PCI_GPIO | DIR_U2P_NOSWAP); ++ ++ /* Enable 6348 BusMaster and Memory access mode */ ++ data = mpi_GetLocalPciConfigReg(PCI_COMMAND); ++ data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); ++ mpi_SetLocalPciConfigReg(PCI_COMMAND, data); ++ ++ /* Configure two 16 MByte PCI to System memory regions. */ ++ /* These memory regions are used when PCI device is a bus master */ ++ /* Accesses to the SDRAM from PCI bus will be "byte swapped" for this region */ ++ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_3, BCM_HOST_MEM_SPACE1); ++ mpi->sp0remap = 0x0; ++ ++ /* Accesses to the SDRAM from PCI bus will not be "byte swapped" for this region */ ++ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_4, BCM_HOST_MEM_SPACE2); ++ mpi->sp1remap = 0x0; ++ mpi->pcimodesel |= (PCI_BAR2_NOSWAP | 0x40); ++ ++ if ((chipid == 0x6348) && (chiprev == 0xb0)) { ++ mpi->sp0range = ~(sdramsize-1); ++ mpi->sp1range = ~(sdramsize-1); ++ } ++ /* ++ * Change 6348 PCI Cfg Reg. offset 0x40 to PCI memory read retry count infinity ++ * by set 0 in bit 8~15. This resolve read Bcm4306 srom return 0xffff in ++ * first read. ++ */ ++ data = mpi_GetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER); ++ data &= ~BRCM_PCI_CONFIG_TIMER_RETRY_MASK; ++ data |= 0x00000080; ++ mpi_SetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER, data); ++ ++ /* enable pci interrupt */ ++ mpi->locintstat |= (EXT_PCI_INT << 16); ++ ++ mpi_DetectPcCard(); ++ ++ ioport_resource.start = BCM_PCI_IO_BASE; ++ ioport_resource.end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB; ++ ++#if defined(CONFIG_USB) ++ PERF->blkEnables |= USBH_CLK_EN; ++ mdelay(100); ++ *USBH_NON_OHCI = NON_OHCI_BYTE_SWAP; ++#endif ++ ++ return 0; ++} ++#endif ++ ++static int __init brcm63xx_setup(void) ++{ ++ extern int panic_timeout; ++ ++ _machine_restart = brcm_machine_restart; ++ _machine_halt = brcm_machine_halt; ++ pm_power_off = brcm_machine_halt; ++ ++ board_timer_setup = brcm_timer_setup; ++ ++ panic_timeout = 5; ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++ /* mpi initialization */ ++ mpi_init(); ++#endif ++ return 0; ++} ++ ++void plat_setup(void) ++{ ++ brcm63xx_setup(); ++} ++ ++/*************************************************************************** ++ * C++ New and delete operator functions ++ ***************************************************************************/ ++ ++/* void *operator new(unsigned int sz) */ ++void *_Znwj(unsigned int sz) ++{ ++ return( kmalloc(sz, GFP_KERNEL) ); ++} ++ ++/* void *operator new[](unsigned int sz)*/ ++void *_Znaj(unsigned int sz) ++{ ++ return( kmalloc(sz, GFP_KERNEL) ); ++} ++ ++/* placement new operator */ ++/* void *operator new (unsigned int size, void *ptr) */ ++void *ZnwjPv(unsigned int size, void *ptr) ++{ ++ return ptr; ++} ++ ++/* void operator delete(void *m) */ ++void _ZdlPv(void *m) ++{ ++ kfree(m); ++} ++ ++/* void operator delete[](void *m) */ ++void _ZdaPv(void *m) ++{ ++ kfree(m); ++} ++ ++EXPORT_SYMBOL(_Znwj); ++EXPORT_SYMBOL(_Znaj); ++EXPORT_SYMBOL(ZnwjPv); ++EXPORT_SYMBOL(_ZdlPv); ++EXPORT_SYMBOL(_ZdaPv); ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,2 @@ ++#define ADSL_SDRAM_IMAGE_SIZE (384*1024) ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c +--- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,277 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Setup time for Broadcom 963xx MIPS boards ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/kernel_stat.h> ++#include <linux/sched.h> ++#include <linux/spinlock.h> ++#include <linux/interrupt.h> ++#include <linux/module.h> ++#include <linux/time.h> ++#include <linux/timex.h> ++ ++#include <asm/mipsregs.h> ++#include <asm/ptrace.h> ++#include <asm/div64.h> ++#include <asm/time.h> ++ ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++unsigned long r4k_interval; /* Amount to increment compare reg each time */ ++static unsigned long r4k_cur; /* What counter should be at next timer irq */ ++ ++/* Cycle counter value at the previous timer interrupt.. */ ++static unsigned int timerhi = 0, timerlo = 0; ++ ++extern volatile unsigned long wall_jiffies; ++ ++/* Optional board-specific timer routine */ ++void (*board_timer_interrupt)(int irq, void *dev_id, struct pt_regs * regs); ++ ++static inline void ack_r4ktimer(unsigned long newval) ++{ ++ write_c0_compare(newval); ++} ++ ++/* ++ * There are a lot of conceptually broken versions of the MIPS timer interrupt ++ * handler floating around. This one is rather different, but the algorithm ++ * is provably more robust. ++ */ ++static irqreturn_t brcm_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) ++{ ++ unsigned int count; ++ ++ if (r4k_interval == 0) ++ goto null; ++ ++ do { ++ do_timer(regs); ++ ++ if (board_timer_interrupt) ++ board_timer_interrupt(irq, dev_id, regs); ++ ++ r4k_cur += r4k_interval; ++ ack_r4ktimer(r4k_cur); ++ ++ } while (((count = (unsigned long)read_c0_count()) ++ - r4k_cur) < 0x7fffffff); ++ ++ if (!jiffies) { ++ /* ++ * If jiffies has overflowed in this timer_interrupt we must ++ * update the timer[hi]/[lo] to make do_fast_gettimeoffset() ++ * quotient calc still valid. -arca ++ */ ++ timerhi = timerlo = 0; ++ } else { ++ /* ++ * The cycle counter is only 32 bit which is good for about ++ * a minute at current count rates of upto 150MHz or so. ++ */ ++ timerhi += (count < timerlo); /* Wrap around */ ++ timerlo = count; ++ } ++ ++ return IRQ_HANDLED; ++ ++null: ++ ack_r4ktimer(0); ++ return IRQ_NONE; ++} ++ ++static struct irqaction brcm_timer_action = { ++ .handler = brcm_timer_interrupt, ++ .flags = SA_INTERRUPT, ++ .mask = CPU_MASK_NONE, ++ .name = "timer", ++ .next = NULL, ++ .dev_id = brcm_timer_interrupt, ++}; ++ ++ ++void __init brcm_timer_setup(struct irqaction *irq) ++{ ++ r4k_cur = (read_c0_count() + r4k_interval); ++ write_c0_compare(r4k_cur); ++ ++ /* we are using the cpu counter for timer interrupts */ ++ irq->handler = no_action; /* we use our own handler */ ++ setup_irq(MIPS_TIMER_INT, &brcm_timer_action); ++ set_c0_status(IE_IRQ5); ++} ++ ++#if 0 ++/* This is for machines which generate the exact clock. */ ++#define USECS_PER_JIFFY (1000000/HZ) ++#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff) ++ ++static void call_do_div64_32( unsigned long *res, unsigned int high, ++ unsigned int low, unsigned long base ) ++{ ++ do_div64_32(*res, high, low, base); ++} ++ ++/* ++ * FIXME: Does playing with the RP bit in c0_status interfere with this code? ++ */ ++static unsigned long do_fast_gettimeoffset(void) ++{ ++ u32 count; ++ unsigned long res, tmp; ++ ++ /* Last jiffy when do_fast_gettimeoffset() was called. */ ++ static unsigned long last_jiffies=0; ++ unsigned long quotient; ++ ++ /* ++ * Cached "1/(clocks per usec)*2^32" value. ++ * It has to be recalculated once each jiffy. ++ */ ++ static unsigned long cached_quotient=0; ++ ++ tmp = jiffies; ++ ++ quotient = cached_quotient; ++ ++ if (tmp && last_jiffies != tmp) { ++ last_jiffies = tmp; ++#ifdef CONFIG_CPU_MIPS32 ++ if (last_jiffies != 0) { ++ ++ unsigned long r0; ++ /* gcc 3.0.1 gets an internal compiler error if there are two ++ * do_div64_32 inline macros. To work around this problem, ++ * do_div64_32 is called as a function. ++ */ ++ call_do_div64_32(&r0, timerhi, timerlo, tmp); ++ call_do_div64_32("ient, USECS_PER_JIFFY, ++ USECS_PER_JIFFY_FRAC, r0); ++ ++ cached_quotient = quotient; ++ ++ } ++#else ++ __asm__(".set\tnoreorder\n\t" ++ ".set\tnoat\n\t" ++ ".set\tmips3\n\t" ++ "lwu\t%0,%2\n\t" ++ "dsll32\t$1,%1,0\n\t" ++ "or\t$1,$1,%0\n\t" ++ "ddivu\t$0,$1,%3\n\t" ++ "mflo\t$1\n\t" ++ "dsll32\t%0,%4,0\n\t" ++ "nop\n\t" ++ "ddivu\t$0,%0,$1\n\t" ++ "mflo\t%0\n\t" ++ ".set\tmips0\n\t" ++ ".set\tat\n\t" ++ ".set\treorder" ++ :"=&r" (quotient) ++ :"r" (timerhi), ++ "m" (timerlo), ++ "r" (tmp), ++ "r" (USECS_PER_JIFFY) ++ :"$1"); ++ cached_quotient = quotient; ++#endif ++ } ++ ++ /* Get last timer tick in absolute kernel time */ ++ count = read_c0_count(); ++ ++ /* .. relative to previous jiffy (32 bits is enough) */ ++ count -= timerlo; ++ ++ __asm__("multu\t%1,%2\n\t" ++ "mfhi\t%0" ++ :"=r" (res) ++ :"r" (count), ++ "r" (quotient)); ++ ++ /* ++ * Due to possible jiffies inconsistencies, we need to check ++ * the result so that we'll get a timer that is monotonic. ++ */ ++ if (res >= USECS_PER_JIFFY) ++ res = USECS_PER_JIFFY-1; ++ ++ return res; ++} ++ ++void do_gettimeofday(struct timeval *tv) ++{ ++ unsigned int flags; ++ ++ read_lock_irqsave (&xtime_lock, flags); ++ tv->tv_sec = xtime.tv_sec; ++ tv->tv_usec = xtime.tv_nsec/1000; ++ tv->tv_usec += do_fast_gettimeoffset(); ++ ++ /* ++ * xtime is atomically updated in timer_bh. jiffies - wall_jiffies ++ * is nonzero if the timer bottom half hasnt executed yet. ++ */ ++ if (jiffies - wall_jiffies) ++ tv->tv_usec += USECS_PER_JIFFY; ++ ++ read_unlock_irqrestore (&xtime_lock, flags); ++ ++ if (tv->tv_usec >= 1000000) { ++ tv->tv_usec -= 1000000; ++ tv->tv_sec++; ++ } ++} ++ ++EXPORT_SYMBOL(do_gettimeofday); ++ ++int do_settimeofday(struct timespec *tv) ++{ ++ write_lock_irq (&xtime_lock); ++ ++ /* This is revolting. We need to set the xtime.tv_usec correctly. ++ * However, the value in this location is is value at the last tick. ++ * Discover what correction gettimeofday would have done, and then ++ * undo it! ++ */ ++ tv->tv_nsec -= do_fast_gettimeoffset()*NSEC_PER_USEC; ++ ++ if (tv->tv_nsec < 0) { ++ tv->tv_nsec += 1000000*NSEC_PER_USEC; ++ tv->tv_sec--; ++ } ++ ++ xtime.tv_sec = tv->tv_sec; ++ xtime.tv_nsec = tv->tv_nsec; ++ time_adjust = 0; /* stop active adjtime() */ ++ time_status |= STA_UNSYNC; ++ time_maxerror = NTP_PHASE_LIMIT; ++ time_esterror = NTP_PHASE_LIMIT; ++ ++ write_unlock_irq (&xtime_lock); ++} ++ ++EXPORT_SYMBOL(do_settimeofday); ++ ++#endif +diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c +--- linux-2.6.17/arch/mips/brcm-boards/generic/dbg_io.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,260 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/config.h> ++#include <linux/tty.h> ++#include <linux/major.h> ++#include <linux/init.h> ++#include <linux/console.h> ++#include <linux/fs.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/sched.h> ++ ++#include <bcm_map_part.h> ++ ++#undef PRNT /* define for debug printing */ ++ ++#define UART16550_BAUD_2400 2400 ++#define UART16550_BAUD_4800 4800 ++#define UART16550_BAUD_9600 9600 ++#define UART16550_BAUD_19200 19200 ++#define UART16550_BAUD_38400 38400 ++#define UART16550_BAUD_57600 57600 ++#define UART16550_BAUD_115200 115200 ++ ++#define UART16550_PARITY_NONE 0 ++#define UART16550_PARITY_ODD 0x08 ++#define UART16550_PARITY_EVEN 0x18 ++#define UART16550_PARITY_MARK 0x28 ++#define UART16550_PARITY_SPACE 0x38 ++ ++#define UART16550_DATA_5BIT 0x0 ++#define UART16550_DATA_6BIT 0x1 ++#define UART16550_DATA_7BIT 0x2 ++#define UART16550_DATA_8BIT 0x3 ++ ++#define UART16550_STOP_1BIT 0x0 ++#define UART16550_STOP_2BIT 0x4 ++ ++volatile Uart * stUart = UART_BASE; ++ ++#define WRITE16(addr, value) ((*(volatile UINT16 *)((ULONG)&addr)) = value) ++ ++/* Low level UART routines from promcon.c */ ++extern void prom_putc(char c); ++extern char prom_getc(void); ++extern int prom_getc_nowait(void); ++extern int prom_testc(void); ++ ++extern void set_debug_traps(void); ++extern void breakpoint(void); ++extern void enable_brcm_irq(unsigned int); ++extern void set_async_breakpoint(unsigned int epc); ++ ++#ifdef CONFIG_GDB_CONSOLE ++extern void register_gdb_console(void); ++#endif ++ ++int gdb_initialized = 0; ++ ++#define GDB_BUF_SIZE 512 /* power of 2, please */ ++ ++static char gdb_buf[GDB_BUF_SIZE] ; ++static int gdb_buf_in_inx ; ++static atomic_t gdb_buf_in_cnt ; ++static int gdb_buf_out_inx ; ++ ++void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) ++{ ++ /* Do nothing, assume boot loader has already set up serial port */ ++ printk("debugInit called\n"); ++} ++ ++/* ++ * Get a char if available, return -1 if nothing available. ++ * Empty the receive buffer first, then look at the interface hardware. ++ */ ++static int read_char(void) ++{ ++ if (atomic_read(&gdb_buf_in_cnt) != 0) /* intr routine has q'd chars */ ++ { ++ int chr ; ++ ++ chr = gdb_buf[gdb_buf_out_inx++] ; ++ gdb_buf_out_inx &= (GDB_BUF_SIZE - 1) ; ++ atomic_dec(&gdb_buf_in_cnt) ; ++ return(chr) ; ++ } ++ return(prom_getc_nowait()) ; /* read from hardware */ ++} /* read_char */ ++ ++/* ++ * This is the receiver interrupt routine for the GDB stub. ++ * It will receive a limited number of characters of input ++ * from the gdb host machine and save them up in a buffer. ++ * ++ * When the gdb stub routine getDebugChar() is called it ++ * draws characters out of the buffer until it is empty and ++ * then reads directly from the serial port. ++ * ++ * We do not attempt to write chars from the interrupt routine ++ * since the stubs do all of that via putDebugChar() which ++ * writes one byte after waiting for the interface to become ++ * ready. ++ * ++ * The debug stubs like to run with interrupts disabled since, ++ * after all, they run as a consequence of a breakpoint in ++ * the kernel. ++ * ++ * Perhaps someone who knows more about the tty driver than I ++ * care to learn can make this work for any low level serial ++ * driver. ++ */ ++static void gdb_interrupt(int irq, void *dev_id, struct pt_regs * regs) ++{ ++ int chr ; ++ int more; ++ do ++ { ++ chr = prom_getc_nowait() ; ++ more = prom_testc(); ++ if (chr < 0) continue ; ++ ++ /* If we receive a Ctrl-C then this is GDB trying to break in */ ++ if (chr == 3) ++ { ++ /* Replace current instruction with breakpoint */ ++ set_async_breakpoint(regs->cp0_epc); ++ //breakpoint(); ++ } ++ ++#ifdef PRNT ++ printk("gdb_interrupt: chr=%02x '%c', more = %x\n", ++ chr, chr > ' ' && chr < 0x7F ? chr : ' ', more) ; ++#endif ++ ++ if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) ++ { /* buffer overflow, clear it */ ++ gdb_buf_in_inx = 0 ; ++ atomic_set(&gdb_buf_in_cnt, 0) ; ++ gdb_buf_out_inx = 0 ; ++ break ; ++ } ++ ++ gdb_buf[gdb_buf_in_inx++] = chr ; ++ gdb_buf_in_inx &= (GDB_BUF_SIZE - 1) ; ++ atomic_inc(&gdb_buf_in_cnt) ; ++ } ++ while (more !=0); ++ ++} /* gdb_interrupt */ ++ ++/* ++ * getDebugChar ++ * ++ * This is a GDB stub routine. It waits for a character from the ++ * serial interface and then returns it. If there is no serial ++ * interface connection then it returns a bogus value which will ++ * almost certainly cause the system to hang. ++ */ ++int getDebugChar(void) ++{ ++ volatile int chr ; ++ ++#ifdef PRNT ++ printk("getDebugChar: ") ; ++#endif ++ ++ while ( (chr = read_char()) < 0 ) ; ++ ++#ifdef PRNT ++ printk("%c\n", chr > ' ' && chr < 0x7F ? chr : ' ') ; ++#endif ++ return(chr) ; ++ ++} /* getDebugChar */ ++ ++/* ++ * putDebugChar ++ * ++ * This is a GDB stub routine. It waits until the interface is ready ++ * to transmit a char and then sends it. If there is no serial ++ * interface connection then it simply returns to its caller, having ++ * pretended to send the char. ++ */ ++int putDebugChar(unsigned char chr) ++{ ++#ifdef PRNT ++ printk("putDebugChar: chr=%02x '%c'\n", chr, ++ chr > ' ' && chr < 0x7F ? chr : ' ') ; ++#endif ++ ++ prom_putc(chr) ; /* this routine will wait */ ++ return 1; ++ ++} /* putDebugChar */ ++ ++/* Just a NULL routine for testing. */ ++void gdb_null(void) ++{ ++} ++ ++void rs_kgdb_hook(int tty_no) ++{ ++ printk("rs_kgdb_hook: tty %d\n", tty_no); ++ ++ /* Call GDB routine to setup the exception vectors for the debugger */ ++ set_debug_traps(); ++ ++ printk("Breaking into debugger...\n"); ++ breakpoint(); ++ gdb_null() ; ++ printk("Connected.\n"); ++ ++ gdb_initialized = 1; ++ ++#ifdef CONFIG_GDB_CONSOLE ++ register_gdb_console(); ++#endif ++} ++ ++void kgdb_hook_irq() ++{ ++ int retval ; ++ uint16 uMask; ++ ++ printk("GDB: Hooking UART interrupt\n"); ++ ++ retval = request_irq(INTERRUPT_ID_UART, ++ gdb_interrupt, ++ SA_INTERRUPT, ++ "GDB-stub", NULL); ++ ++ if (retval != 0) ++ printk("gdb_hook: request_irq(irq=%d) failed: %d\n", INTERRUPT_ID_UART, retval); ++ ++ // Enable UART config Rx not empty IRQ ++ uMask = READ16(stUart->intMask) ; ++ // printk("intMask: 0x%x\n", uMask); ++ WRITE16(stUart->intMask, uMask | RXFIFONE); ++} ++ ++ +diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S +--- linux-2.6.17/arch/mips/brcm-boards/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Generic interrupt handler for Broadcom MIPS boards ++ */ ++ ++#include <linux/config.h> ++ ++#include <asm/asm.h> ++#include <asm/mipsregs.h> ++#include <asm/regdef.h> ++#include <asm/stackframe.h> ++ ++/* ++ * MIPS IRQ Source ++ * -------- ------ ++ * 0 Software (ignored) ++ * 1 Software (ignored) ++ * 2 Combined hardware interrupt (hw0) ++ * 3 Hardware ++ * 4 Hardware ++ * 5 Hardware ++ * 6 Hardware ++ * 7 R4k timer ++ */ ++ ++ .text ++ .set noreorder ++ .set noat ++ .align 5 ++ NESTED(brcmIRQ, PT_SIZE, sp) ++ SAVE_ALL ++ CLI ++ .set noreorder ++ .set at ++ ++ jal brcm_irq_dispatch ++ move a0, sp ++ ++ j ret_from_irq ++ nop ++ ++ END(brcmIRQ) +diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/Makefile linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/Makefile +--- linux-2.6.17/arch/mips/brcm-boards/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/Makefile 2006-08-03 16:36:58.000000000 +0200 +@@ -0,0 +1,11 @@ ++# ++# Makefile for generic Broadcom MIPS boards ++# ++# Copyright (C) 2001 Broadcom Corporation ++# ++obj-y := int-handler.o ++ ++ifdef CONFIG_REMOTE_DEBUG ++obj-y += dbg_io.o ++endif ++ From 05f548c0b20256d35d13549ac2277998878d4e02 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 3 Aug 2006 18:30:00 +0000 Subject: [PATCH 427/757] clean up smp compiles SVN-Revision: 4428 --- openwrt/package/Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index c2015b3a411..b9392c04903 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -19,22 +19,22 @@ $(STAMP_DIR) $(TARGET_DIR): mkdir -p $@ %-prereq: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-prereq,%,$@) prereq MAKEFLAGS="$(BUILD_MAKEFLAGS)" + $(MAKE) -C $(patsubst %-prereq,%,$@) prereq %-download: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-download,%,$@) download MAKEFLAGS="$(BUILD_MAKEFLAGS)" + $(MAKE) -C $(patsubst %-download,%,$@) download %-prepare: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)" + $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-compile,%,$@) compile MAKEFLAGS="$(BUILD_MAKEFLAGS)" + $(MAKE) -C $(patsubst %-compile,%,$@) compile %-install: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-install,%,$@) install MAKEFLAGS="$(BUILD_MAKEFLAGS)" + $(MAKE) -C $(patsubst %-install,%,$@) install %-clean: $(STAMP_DIR) $(TARGET_DIR) - $(MAKE) -C $(patsubst %-clean,%,$@) clean MAKEFLAGS="$(BUILD_MAKEFLAGS)" + $(MAKE) -C $(patsubst %-clean,%,$@) clean ifeq ($(SDK),1) GENDEP_OPTS := -s @@ -49,7 +49,7 @@ prereq: $(PREREQ_PACKAGES) download: $(DOWNLOAD_PACKAGES) compile-targets: $(COMPILE_PACKAGES) compile: - $(MAKE) -j$(CONFIG_JLEVEL) compile-targets + $(MAKE) compile-targets install-targets: base-files-install $(INSTALL_PACKAGES) install: rm -rf $(BUILD_DIR)/root @@ -60,3 +60,9 @@ index: $(PACKAGE_DIR)/Packages $(PACKAGE_DIR)/Packages: $(PACKAGE_DIR)/*.ipk (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages) + +ifeq ($(MAKECMDGOALS),compile-targets) +MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL) +else +.NOTPARALLEL: +endif From 429f4764ac6023dd1e0380ff4a476a3c09d99577 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 4 Aug 2006 03:26:32 +0000 Subject: [PATCH 428/757] add quotes to TARGET_CC and TARGET_CROSS to help with distcc and ccache SVN-Revision: 4429 --- openwrt/package/arptables/Makefile | 2 +- openwrt/package/busybox/Makefile | 4 ++-- openwrt/package/dropbear/Makefile | 4 ++-- openwrt/package/iproute2/Makefile | 2 +- openwrt/package/iptables/Makefile | 8 ++++---- openwrt/package/libpcap/Makefile | 2 +- openwrt/package/openssl/Makefile | 2 +- openwrt/package/ppp/Makefile | 2 +- openwrt/target/image/generic/lzma-loader/Makefile | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/openwrt/package/arptables/Makefile b/openwrt/package/arptables/Makefile index b4bfe18a737..855169b7f9d 100644 --- a/openwrt/package/arptables/Makefile +++ b/openwrt/package/arptables/Makefile @@ -33,7 +33,7 @@ define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ + CC="$(TARGET_CC)" LD="$(TARGET_CROSS)ld" \ COPT_FLAGS="$(TARGET_CFLAGS)" \ KERNEL_DIR="./include/linux" endef diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 31ec1035174..afe7c59e3f7 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -38,11 +38,11 @@ endef define Build/Configure $(SCRIPT_DIR)/gen_busybox_config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/.config - yes '' | $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" -C $(PKG_BUILD_DIR) oldconfig + yes '' | $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" -C $(PKG_BUILD_DIR) oldconfig endef define Package/busybox/install - $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(1)" \ + $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" PREFIX="$(1)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install -rm -rf $(1)/lib64 endef diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index f5e9b154d1f..48e69e466f7 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -81,11 +81,11 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - LD=$(TARGET_CC) \ + LD="$(TARGET_CC)" \ PROGRAMS="dropbear dbclient dropbearkey scp" \ MULTI=1 SCPPROGRESS=1 $(MAKE) -C $(PKG_BUILD_DIR) \ - LD=$(TARGET_CC) \ + LD="$(TARGET_CC)" \ PROGRAMS="dropbearconvert" endef diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index d21a92c66b6..e494177c90d 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -45,7 +45,7 @@ define Build/Configure endef define Build/Compile - $(MAKE) -j1 -C $(PKG_BUILD_DIR)/netem HOSTCC=$(HOSTCC) CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES" + $(MAKE) -j1 -C $(PKG_BUILD_DIR)/netem HOSTCC="$(HOSTCC)" CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES" $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip endef diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index 99ef3347c0c..a28b8fd8ed1 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -163,8 +163,8 @@ define Build/Compile mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \ - KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ + CC="$(TARGET_CC)" COPT_FLAGS="$(TARGET_CFLAGS)" \ + KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install install-devel endef @@ -173,8 +173,8 @@ endef define Build/InstallDev $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \ - KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ + CC="$(TARGET_CC)" COPT_FLAGS="$(TARGET_CFLAGS)" \ + KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \ DESTDIR="$(STAGING_DIR)" \ install install-devel endef diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile index 76c88af9c43..1d9d4371fb3 100644 --- a/openwrt/package/libpcap/Makefile +++ b/openwrt/package/libpcap/Makefile @@ -61,7 +61,7 @@ define Build/Configure --enable-static \ --disable-yydebug \ --enable-ipv6 \ - --with-build-cc=$(HOSTCC) \ + --with-build-cc="$(HOSTCC)" \ --with-pcap=linux \ ); endef diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile index 23207714beb..bbbd2073ed4 100644 --- a/openwrt/package/openssl/Makefile +++ b/openwrt/package/openssl/Makefile @@ -78,7 +78,7 @@ define Build/Compile # Work around openssl build bug to link libssl.so with libcrypto.so. -rm $(PKG_BUILD_DIR)/libssl.so.*.*.* $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ - CC=$(TARGET_CC) \ + CC="$(TARGET_CC)" \ CCOPTS="$(TARGET_CFLAGS) -fomit-frame-pointer" \ do_linux-shared $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 6581ef7e2bd..a42af41d31f 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -87,7 +87,7 @@ define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR)/usr $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ + CC="$(TARGET_CC)" \ COPTS="$(TARGET_CFLAGS)" \ PRECOMPILED_FILTER=1 \ STAGING_DIR="$(STAGING_DIR)" \ diff --git a/openwrt/target/image/generic/lzma-loader/Makefile b/openwrt/target/image/generic/lzma-loader/Makefile index 6cbbd942ccb..f9beef4b8e9 100644 --- a/openwrt/target/image/generic/lzma-loader/Makefile +++ b/openwrt/target/image/generic/lzma-loader/Makefile @@ -19,8 +19,8 @@ $(PKG_BUILD_DIR)/.prepared: touch $@ $(PKG_BUILD_DIR)/lzma.elf: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/vmlinux.lzma - $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC) \ - LD=$(TARGET_CROSS)ld CROSS_COMPILE=$(TARGET_CROSS) \ + $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" \ + LD="$(TARGET_CROSS)ld" CROSS_COMPILE="$(TARGET_CROSS)" \ RAMSIZE=$(RAMSIZE) \ LOADADDR=$(LOADADDR) \ KERNEL_ENTRY=$(KERNEL_ENTRY) \ From 6c81c75f030fc43a28977211533b2416ebfaecc6 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 4 Aug 2006 05:30:27 +0000 Subject: [PATCH 429/757] more cleanup (make sure to pass TARGET_PATH and not just TARGET_CC) SVN-Revision: 4432 --- openwrt/include/kernel-build.mk | 4 ++-- openwrt/include/package.mk | 1 - openwrt/package/dnsmasq/Makefile | 2 +- openwrt/package/dropbear/Makefile | 4 ++-- openwrt/package/libpcap/Makefile | 1 + openwrt/package/linux-atm/Makefile | 6 +----- openwrt/package/mtd/Makefile | 6 ------ openwrt/package/ppp/Makefile | 2 +- openwrt/package/wireless-tools/Makefile | 3 ++- 9 files changed, 10 insertions(+), 19 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 38ea9a18eb9..e3f2d5daedb 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -66,7 +66,7 @@ else endif $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ @@ -75,7 +75,7 @@ $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux $(LINUX_DIR)/.modules_done: rm -rf $(KERNEL_BUILD_DIR)/modules $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done modules: $(LINUX_DIR)/.modules_done diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index c0953ae701a..fee715043c8 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -285,7 +285,6 @@ endef define Build/Compile/Default $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CC=$(TARGET_CC) \ CROSS="$(TARGET_CROSS)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \ ARCH="$(ARCH)" \ diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index 0efb349bc8c..f6c2d36c52b 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -36,7 +36,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + $(TARGET_CONFIGURE_OPTS) \ BINDIR="/usr/sbin" MANDIR="/usr/man" \ all endef diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index 48e69e466f7..cfb2c4135e6 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -81,11 +81,11 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - LD="$(TARGET_CC)" \ + $(TARGET_CONFIGURE_OPTS) \ PROGRAMS="dropbear dbclient dropbearkey scp" \ MULTI=1 SCPPROGRESS=1 $(MAKE) -C $(PKG_BUILD_DIR) \ - LD="$(TARGET_CC)" \ + $(TARGET_CONFIGURE_OPTS) \ PROGRAMS="dropbearconvert" endef diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile index 1d9d4371fb3..155748a4728 100644 --- a/openwrt/package/libpcap/Makefile +++ b/openwrt/package/libpcap/Makefile @@ -71,6 +71,7 @@ define Build/Compile mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \ + PATH=$(TARGET_PATH) \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install endef diff --git a/openwrt/package/linux-atm/Makefile b/openwrt/package/linux-atm/Makefile index 0b8c59d4e15..56ca90a3837 100644 --- a/openwrt/package/linux-atm/Makefile +++ b/openwrt/package/linux-atm/Makefile @@ -44,11 +44,7 @@ define Build/Configure endef define Build/Compile - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install + $(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" all install) endef define Package/linux-atm/install diff --git a/openwrt/package/mtd/Makefile b/openwrt/package/mtd/Makefile index b3bf6023afa..01b9adf98f2 100644 --- a/openwrt/package/mtd/Makefile +++ b/openwrt/package/mtd/Makefile @@ -29,12 +29,6 @@ define Build/Prepare $(CP) ./src/* $(PKG_BUILD_DIR)/ endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ - all -endef - define Package/mtd/install install -d -m0755 $(1)/sbin install -m0755 $(PKG_BUILD_DIR)/mtd $(1)/sbin/ diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index a42af41d31f..64351a5ca1f 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -87,7 +87,7 @@ define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR)/usr $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ + $(TARGET_CONFIGURE_OPTS) \ COPTS="$(TARGET_CFLAGS)" \ PRECOMPILED_FILTER=1 \ STAGING_DIR="$(STAGING_DIR)" \ diff --git a/openwrt/package/wireless-tools/Makefile b/openwrt/package/wireless-tools/Makefile index 58844248763..32e7fc05a94 100644 --- a/openwrt/package/wireless-tools/Makefile +++ b/openwrt/package/wireless-tools/Makefile @@ -35,7 +35,8 @@ define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -I." \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -I." \ libiw.so.28 iwmulticall $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX="$(PKG_INSTALL_DIR)" \ From ad24256f8fd117695b1cb69f8afab9118157d5d0 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 4 Aug 2006 06:23:47 +0000 Subject: [PATCH 430/757] yet more cleanup (make sure to honor TARGET_CC and not just TARGET_CROSS) SVN-Revision: 4433 --- openwrt/include/kernel-build.mk | 15 ++++++--------- openwrt/package/madwifi/Makefile | 1 + openwrt/target/image/generic/lzma-loader/Makefile | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index e3f2d5daedb..0f29a306bf7 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -33,11 +33,8 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) ifeq ($(KERNEL),2.4) $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \ - $(LINUX_DIR)/Makefile \ - $(LINUX_DIR)/arch/*/Makefile $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h + PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h touch $@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured @@ -47,7 +44,7 @@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done else $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts + PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts touch $@ endif @@ -66,16 +63,16 @@ else endif $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" + PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux - $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ + PATH="$(TARGET_PATH)" $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ touch -c $(LINUX_KERNEL) $(LINUX_DIR)/.modules_done: rm -rf $(KERNEL_BUILD_DIR)/modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install + PATH="$(TARGET_PATH)" $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) modules + PATH="$(TARGET_PATH)" $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done modules: $(LINUX_DIR)/.modules_done diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index 07e2c453996..96ca1baf360 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -53,6 +53,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ PATH="$(TARGET_PATH)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" \ TARGET="$(HAL_TARGET)" \ TOOLPREFIX="$(KERNEL_CROSS)" \ TOOLPATH="$(KERNEL_CROSS)" \ diff --git a/openwrt/target/image/generic/lzma-loader/Makefile b/openwrt/target/image/generic/lzma-loader/Makefile index f9beef4b8e9..5bd01eefb66 100644 --- a/openwrt/target/image/generic/lzma-loader/Makefile +++ b/openwrt/target/image/generic/lzma-loader/Makefile @@ -19,8 +19,8 @@ $(PKG_BUILD_DIR)/.prepared: touch $@ $(PKG_BUILD_DIR)/lzma.elf: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/vmlinux.lzma - $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" \ - LD="$(TARGET_CROSS)ld" CROSS_COMPILE="$(TARGET_CROSS)" \ + PATH="$(TARGET_PATH)" $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" \ RAMSIZE=$(RAMSIZE) \ LOADADDR=$(LOADADDR) \ KERNEL_ENTRY=$(KERNEL_ENTRY) \ From c8b0cd5a5babeafddab9f6ffd52a5a14fbe649c8 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 4 Aug 2006 06:56:10 +0000 Subject: [PATCH 431/757] and now, finally, enable ccache support SVN-Revision: 4434 --- openwrt/Config.in | 7 +++++++ openwrt/rules.mk | 14 ++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/openwrt/Config.in b/openwrt/Config.in index 752e1d93e70..edcb19a4f5c 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -44,6 +44,13 @@ config JLEVEL help Number of jobs to run simultanesouly +config CCACHE + bool + prompt "Use ccache" if BUILDOPTS + default n + help + Compiler cache; see http://ccache.samba.org/ + source "toolchain/Config.in" source "target/sdk/Config.in" diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 206e57dd03e..89adb3efc26 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -35,8 +35,8 @@ IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux -KERNEL_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- -TARGET_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- +KERNEL_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- +TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin @@ -53,6 +53,11 @@ PATCH:=$(SCRIPT_DIR)/patch-kernel.sh SED:=$(STAGING_DIR)/bin/sed -i -e CP:=cp -fpR +ifneq ($(CONFIG_CCACHE),) + export CCACHE_DIR:=$(TOPDIR)/ccache_$(ARCH) + TARGET_CC:=ccache $(TARGET_CC) +endif + HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ -e 's/sparc.*/sparc/' \ -e 's/arm.*/arm/' \ @@ -74,8 +79,8 @@ TARGET_CONFIGURE_OPTS:= \ AS=$(TARGET_CROSS)as \ LD=$(TARGET_CROSS)ld \ NM=$(TARGET_CROSS)nm \ - CC=$(TARGET_CROSS)gcc \ - GCC=$(TARGET_CROSS)gcc \ + CC="$(TARGET_CC)" \ + GCC="$(TARGET_CC)" \ CXX=$(TARGET_CROSS)g++ \ RANLIB=$(TARGET_CROSS)ranlib \ STRIP=$(TARGET_CROSS)strip @@ -84,6 +89,7 @@ TARGET_CONFIGURE_OPTS:= \ RSTRIP:= \ STRIP="$(STRIP)" \ STRIP_KMOD="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" \ + PATH=$(TARGET_PATH) \ $(SCRIPT_DIR)/rstrip.sh # where to build (and put) .ipk packages From 1dee38a88eb0b1189c910a1a2d466834cc4a2f14 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 4 Aug 2006 08:43:04 +0000 Subject: [PATCH 432/757] fix typo SVN-Revision: 4435 --- openwrt/package/ppp/files/ppp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/ppp/files/ppp.sh b/openwrt/package/ppp/files/ppp.sh index 0bb77b8284c..a162b973021 100644 --- a/openwrt/package/ppp/files/ppp.sh +++ b/openwrt/package/ppp/files/ppp.sh @@ -21,7 +21,7 @@ start_pppd() { usepeerdns \ defaultroute \ replacedefaultroute \ - ${username:+username "$username" password "$password"} \ + ${username:+user "$username" password "$password"} \ linkname "$cfg" \ ipparam "$cfg" } From 20922bcde7a20037c761104f81a901f97dd82e18 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 4 Aug 2006 09:14:20 +0000 Subject: [PATCH 433/757] fix everything I broke with the previous patches SVN-Revision: 4436 --- openwrt/include/package.mk | 2 +- openwrt/package/busybox/Makefile | 7 ++++--- openwrt/package/dropbear/Makefile | 2 ++ openwrt/package/iptables/Makefile | 4 ++-- openwrt/rules.mk | 3 +-- openwrt/toolchain/libnotimpl/Makefile | 4 ++-- openwrt/toolchain/uClibc/Makefile | 4 ++-- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index fee715043c8..79c29bccf67 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -283,7 +283,7 @@ define Build/Configure endef define Build/Compile/Default - $(MAKE) -C $(PKG_BUILD_DIR) \ + PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ CROSS="$(TARGET_CROSS)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \ diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index afe7c59e3f7..67f7ce1816a 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -38,12 +38,13 @@ endef define Build/Configure $(SCRIPT_DIR)/gen_busybox_config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/.config - yes '' | $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" -C $(PKG_BUILD_DIR) oldconfig + yes '' | PATH="$(TARGET_PATH)" $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" \ + -C $(PKG_BUILD_DIR) oldconfig endef define Package/busybox/install - $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" PREFIX="$(1)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install + PATH="$(TARGET_PATH)" $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" \ + PREFIX="$(1)" EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install -rm -rf $(1)/lib64 endef diff --git a/openwrt/package/dropbear/Makefile b/openwrt/package/dropbear/Makefile index cfb2c4135e6..9ffc782d944 100644 --- a/openwrt/package/dropbear/Makefile +++ b/openwrt/package/dropbear/Makefile @@ -82,10 +82,12 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CC)" \ PROGRAMS="dropbear dbclient dropbearkey scp" \ MULTI=1 SCPPROGRESS=1 $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CC)" \ PROGRAMS="dropbearconvert" endef diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index a28b8fd8ed1..bf8124084c3 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -161,7 +161,7 @@ endef define Build/Compile chmod a+x $(PKG_BUILD_DIR)/extensions/.*-test* mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ + PATH="$(TARGET_PATH)" $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ CC="$(TARGET_CC)" COPT_FLAGS="$(TARGET_CFLAGS)" \ KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \ @@ -171,7 +171,7 @@ endef define Build/InstallDev - $(MAKE) -C $(PKG_BUILD_DIR) \ + PATH="$(TARGET_PATH)" $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ CC="$(TARGET_CC)" COPT_FLAGS="$(TARGET_CFLAGS)" \ KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \ diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 89adb3efc26..2cd8ea9b25a 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -54,8 +54,7 @@ SED:=$(STAGING_DIR)/bin/sed -i -e CP:=cp -fpR ifneq ($(CONFIG_CCACHE),) - export CCACHE_DIR:=$(TOPDIR)/ccache_$(ARCH) - TARGET_CC:=ccache $(TARGET_CC) + TARGET_CC:=CCACHE_DIR=$(TOPDIR)/ccache_$(ARCH) ccache $(TARGET_CC) endif HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ diff --git a/openwrt/toolchain/libnotimpl/Makefile b/openwrt/toolchain/libnotimpl/Makefile index bc515ca0800..214f51c5dc7 100644 --- a/openwrt/toolchain/libnotimpl/Makefile +++ b/openwrt/toolchain/libnotimpl/Makefile @@ -12,7 +12,7 @@ PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/libnotimpl include $(INCLUDE_DIR)/host-build.mk define cc - $(TARGET_CC) $(TARGET_CFLAGS) -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o + PATH="$(TARGET_PATH)" $(TARGET_CC) $(TARGET_CFLAGS) -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o endef define Build/Prepare @@ -22,7 +22,7 @@ endef define Build/Compile $(call cc,math) - $(TARGET_CROSS)ar rc $(PKG_BUILD_DIR)/libnotimpl.a $(PKG_BUILD_DIR)/*.o + PATH="$(TARGET_PATH)" $(TARGET_CROSS)ar rc $(PKG_BUILD_DIR)/libnotimpl.a $(PKG_BUILD_DIR)/*.o endef define Build/Install diff --git a/openwrt/toolchain/uClibc/Makefile b/openwrt/toolchain/uClibc/Makefile index bb52ee300f8..a99c734b92f 100644 --- a/openwrt/toolchain/uClibc/Makefile +++ b/openwrt/toolchain/uClibc/Makefile @@ -55,7 +55,7 @@ endif mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/lib - $(MAKE) -C $(PKG_BUILD_DIR) \ + PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \ DEVEL_PREFIX=/usr/ \ RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \ @@ -68,7 +68,7 @@ define Build/Configure endef define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ + PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX= \ DEVEL_PREFIX=/ \ RUNTIME_PREFIX=/ \ From 8cad57f8c24d4cc07f1e10ed957ffe4a2912af8a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 4 Aug 2006 09:50:11 +0000 Subject: [PATCH 434/757] fix ppp related bug in the network scripts SVN-Revision: 4437 --- openwrt/package/base-files/default/lib/network/config.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh index 76db09de15d..163e42e800f 100755 --- a/openwrt/package/base-files/default/lib/network/config.sh +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -13,7 +13,8 @@ find_config() { config_get iface "$ifn" ifnames ;; esac - for ifc in $iface; do + config_get device "$ifn" device + for ifc in ${device:-iface}; do [ "$ifc" = "$1" ] && { echo "$ifn" return 0 From 5d30e6cb47c4e4105e2b9c4c28de6d34a0385923 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 4 Aug 2006 11:59:52 +0000 Subject: [PATCH 435/757] set PATH in rules.mk SVN-Revision: 4438 --- openwrt/include/kernel-build.mk | 12 ++++++------ openwrt/include/package.mk | 4 ++-- openwrt/package/busybox/Makefile | 4 ++-- openwrt/package/diag/Makefile | 1 - openwrt/package/fuse/Makefile | 1 - openwrt/package/iptables/Makefile | 8 ++++---- openwrt/package/libpcap/Makefile | 1 - openwrt/package/madwifi/Makefile | 1 - openwrt/package/mini_fo/Makefile | 1 - openwrt/package/openssl/Makefile | 1 - openwrt/package/shfs/Makefile | 1 - openwrt/package/switch/Makefile | 1 - openwrt/package/wlcompat/Makefile | 2 -- openwrt/rules.mk | 14 ++++++++------ openwrt/toolchain/gcc/Makefile | 12 ++++++------ openwrt/toolchain/libnotimpl/Makefile | 4 ++-- 16 files changed, 30 insertions(+), 38 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 0f29a306bf7..9af1142d331 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -34,7 +34,7 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) ifeq ($(KERNEL),2.4) $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile - PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h touch $@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured @@ -44,7 +44,7 @@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done else $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts touch $@ endif @@ -63,16 +63,16 @@ else endif $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config - PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux - PATH="$(TARGET_PATH)" $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ + $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ touch -c $(LINUX_KERNEL) $(LINUX_DIR)/.modules_done: rm -rf $(KERNEL_BUILD_DIR)/modules - PATH="$(TARGET_PATH)" $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) modules - PATH="$(TARGET_PATH)" $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) modules + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done modules: $(LINUX_DIR)/.modules_done diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 79c29bccf67..385a8465374 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -251,11 +251,11 @@ endef define Build/Configure/Default @(cd $(PKG_BUILD_DIR)/$(3); \ [ -x configure ] && \ - $(2) \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + $(2) \ ./configure \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ @@ -283,7 +283,7 @@ define Build/Configure endef define Build/Compile/Default - PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ CROSS="$(TARGET_CROSS)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \ diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 67f7ce1816a..6a359688a56 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -38,12 +38,12 @@ endef define Build/Configure $(SCRIPT_DIR)/gen_busybox_config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/.config - yes '' | PATH="$(TARGET_PATH)" $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" \ + yes '' | $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" \ -C $(PKG_BUILD_DIR) oldconfig endef define Package/busybox/install - PATH="$(TARGET_PATH)" $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" \ + $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" \ PREFIX="$(1)" EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install -rm -rf $(1)/lib64 endef diff --git a/openwrt/package/diag/Makefile b/openwrt/package/diag/Makefile index 024426f8b1e..3ffd2f460ff 100644 --- a/openwrt/package/diag/Makefile +++ b/openwrt/package/diag/Makefile @@ -35,7 +35,6 @@ define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="-DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include" \ modules diff --git a/openwrt/package/fuse/Makefile b/openwrt/package/fuse/Makefile index f690f56fa7a..fd55c71dc70 100644 --- a/openwrt/package/fuse/Makefile +++ b/openwrt/package/fuse/Makefile @@ -82,7 +82,6 @@ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - PATH="$(TARGET_PATH)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install endef diff --git a/openwrt/package/iptables/Makefile b/openwrt/package/iptables/Makefile index bf8124084c3..8d77fb43f47 100644 --- a/openwrt/package/iptables/Makefile +++ b/openwrt/package/iptables/Makefile @@ -161,9 +161,9 @@ endef define Build/Compile chmod a+x $(PKG_BUILD_DIR)/extensions/.*-test* mkdir -p $(PKG_INSTALL_DIR) - PATH="$(TARGET_PATH)" $(MAKE) -C $(PKG_BUILD_DIR) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CC="$(TARGET_CC)" COPT_FLAGS="$(TARGET_CFLAGS)" \ + COPT_FLAGS="$(TARGET_CFLAGS)" \ KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install install-devel @@ -171,9 +171,9 @@ endef define Build/InstallDev - PATH="$(TARGET_PATH)" $(MAKE) -C $(PKG_BUILD_DIR) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CC="$(TARGET_CC)" COPT_FLAGS="$(TARGET_CFLAGS)" \ + COPT_FLAGS="$(TARGET_CFLAGS)" \ KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \ DESTDIR="$(STAGING_DIR)" \ install install-devel diff --git a/openwrt/package/libpcap/Makefile b/openwrt/package/libpcap/Makefile index 155748a4728..1d9d4371fb3 100644 --- a/openwrt/package/libpcap/Makefile +++ b/openwrt/package/libpcap/Makefile @@ -71,7 +71,6 @@ define Build/Compile mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \ - PATH=$(TARGET_PATH) \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install endef diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index 96ca1baf360..380ec4ad611 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -50,7 +50,6 @@ ifeq ($(findstring PCI,$(BUS)),PCI) endif MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ CC="$(TARGET_CC)" \ diff --git a/openwrt/package/mini_fo/Makefile b/openwrt/package/mini_fo/Makefile index 6cba9db170e..2e98efffda8 100644 --- a/openwrt/package/mini_fo/Makefile +++ b/openwrt/package/mini_fo/Makefile @@ -33,7 +33,6 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ KERNELVERSION="$(KERNEL)" \ diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile index bbbd2073ed4..be5b4a6d06b 100644 --- a/openwrt/package/openssl/Makefile +++ b/openwrt/package/openssl/Makefile @@ -52,7 +52,6 @@ define Build/Configure $(SED) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' $(PKG_BUILD_DIR)/Configure $(SED) s/OPENWRT_OPTIMIZATION_FLAGS/$(BR2_TARGET_OPTIMIZATION)/g $(PKG_BUILD_DIR)/Configure (cd $(PKG_BUILD_DIR); \ - PATH=$(TARGET_PATH) \ ./Configure linux-openwrt \ --prefix=/usr \ --openssldir=/etc/ssl \ diff --git a/openwrt/package/shfs/Makefile b/openwrt/package/shfs/Makefile index 63a1108e6fa..dbaca66913a 100644 --- a/openwrt/package/shfs/Makefile +++ b/openwrt/package/shfs/Makefile @@ -43,7 +43,6 @@ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - PATH="$(TARGET_PATH)" \ OFLAGS="$(TARGET_CFLAGS)" \ CC="$(TARGET_CC)" \ LINKER="$(TARGET_CC)" \ diff --git a/openwrt/package/switch/Makefile b/openwrt/package/switch/Makefile index 860e530c4c9..8b5e7b324cd 100644 --- a/openwrt/package/switch/Makefile +++ b/openwrt/package/switch/Makefile @@ -35,7 +35,6 @@ define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="-DBCMGPIO2" \ modules diff --git a/openwrt/package/wlcompat/Makefile b/openwrt/package/wlcompat/Makefile index a42cdd20503..d3ccf881018 100644 --- a/openwrt/package/wlcompat/Makefile +++ b/openwrt/package/wlcompat/Makefile @@ -46,7 +46,6 @@ define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="-DDEBUG -I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(PKG_BUILD_DIR)/include" \ modules @@ -54,7 +53,6 @@ define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="-I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(PKG_BUILD_DIR)/include" \ modules diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 2cd8ea9b25a..6c770c48a79 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -39,9 +39,11 @@ KERNEL_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) -TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin +TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(PATH) TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) +export PATH:=$(TARGET_PATH) + LINUX_DIR:=$(BUILD_DIR)/linux LINUX_HEADERS_DIR:=$(TOOL_BUILD_DIR)/linux @@ -54,7 +56,9 @@ SED:=$(STAGING_DIR)/bin/sed -i -e CP:=cp -fpR ifneq ($(CONFIG_CCACHE),) - TARGET_CC:=CCACHE_DIR=$(TOPDIR)/ccache_$(ARCH) ccache $(TARGET_CC) + # FIXME: move this variable to a better location + export CCACHE_DIR=$(TOPDIR)/ccache_$(ARCH) + TARGET_CC:= ccache $(TARGET_CC) endif HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ @@ -73,9 +77,8 @@ HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu TARGET_CONFIGURE_OPTS:= \ - PATH=$(TARGET_PATH) \ AR=$(TARGET_CROSS)ar \ - AS=$(TARGET_CROSS)as \ + AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \ LD=$(TARGET_CROSS)ld \ NM=$(TARGET_CROSS)nm \ CC="$(TARGET_CC)" \ @@ -88,7 +91,6 @@ TARGET_CONFIGURE_OPTS:= \ RSTRIP:= \ STRIP="$(STRIP)" \ STRIP_KMOD="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" \ - PATH=$(TARGET_PATH) \ $(SCRIPT_DIR)/rstrip.sh # where to build (and put) .ipk packages @@ -101,7 +103,7 @@ IPKG:= \ # invoke ipkg-build with some default options IPKG_BUILD:= \ - PATH="$(TARGET_PATH)" ipkg-build -c -o root -g root + ipkg-build -c -o root -g root ifeq ($(CONFIG_ENABLE_LOCALE),true) DISABLE_NLS:= diff --git a/openwrt/toolchain/gcc/Makefile b/openwrt/toolchain/gcc/Makefile index a13ab2ebf76..85691e6a8ef 100644 --- a/openwrt/toolchain/gcc/Makefile +++ b/openwrt/toolchain/gcc/Makefile @@ -48,7 +48,7 @@ BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-$(PKG_VERSION)-final define Stage1/Configure mkdir -p $(BUILD_DIR1) - (cd $(BUILD_DIR1); rm -f config.cache; PATH=$(TARGET_PATH) \ + (cd $(BUILD_DIR1); rm -f config.cache; \ $(PKG_BUILD_DIR)/configure \ --prefix=$(STAGING_DIR) \ --build=$(GNU_HOST_NAME) \ @@ -64,10 +64,10 @@ define Stage1/Configure ); endef define Stage1/Compile - PATH=$(TARGET_PATH) $(MAKE) -C $(BUILD_DIR1) all-gcc + $(MAKE) -C $(BUILD_DIR1) all-gcc endef define Stage1/Install - PATH=$(TARGET_PATH) $(MAKE) -C $(BUILD_DIR1) install-gcc + $(MAKE) -C $(BUILD_DIR1) install-gcc endef define Stage2/Configure @@ -77,7 +77,7 @@ define Stage2/Configure ln -sf ../include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include rm -rf $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib - (cd $(BUILD_DIR2); rm -f config.cache; PATH=$(TARGET_PATH) \ + (cd $(BUILD_DIR2); rm -f config.cache; \ $(PKG_BUILD_DIR)/configure \ --prefix=$(STAGING_DIR) \ --build=$(GNU_HOST_NAME) \ @@ -92,10 +92,10 @@ define Stage2/Configure ); endef define Stage2/Compile - PATH=$(TARGET_PATH) $(MAKE) -C $(BUILD_DIR2) all + $(MAKE) -C $(BUILD_DIR2) all endef define Stage2/Install - PATH=$(TARGET_PATH) $(MAKE) -C $(BUILD_DIR2) install + $(MAKE) -C $(BUILD_DIR2) install echo $(PKG_VERSION) > $(STAGING_DIR)/gcc_version # Set up the symlinks to enable lying about target name. set -e; \ diff --git a/openwrt/toolchain/libnotimpl/Makefile b/openwrt/toolchain/libnotimpl/Makefile index 214f51c5dc7..bc515ca0800 100644 --- a/openwrt/toolchain/libnotimpl/Makefile +++ b/openwrt/toolchain/libnotimpl/Makefile @@ -12,7 +12,7 @@ PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/libnotimpl include $(INCLUDE_DIR)/host-build.mk define cc - PATH="$(TARGET_PATH)" $(TARGET_CC) $(TARGET_CFLAGS) -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o + $(TARGET_CC) $(TARGET_CFLAGS) -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o endef define Build/Prepare @@ -22,7 +22,7 @@ endef define Build/Compile $(call cc,math) - PATH="$(TARGET_PATH)" $(TARGET_CROSS)ar rc $(PKG_BUILD_DIR)/libnotimpl.a $(PKG_BUILD_DIR)/*.o + $(TARGET_CROSS)ar rc $(PKG_BUILD_DIR)/libnotimpl.a $(PKG_BUILD_DIR)/*.o endef define Build/Install From 71ec9d8112306a4771e70762852b65ff8b6fe9c2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 4 Aug 2006 17:14:36 +0000 Subject: [PATCH 436/757] fix ccache related broadcom image compile error SVN-Revision: 4439 --- openwrt/target/image/brcm/lzma-loader/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/target/image/brcm/lzma-loader/Makefile b/openwrt/target/image/brcm/lzma-loader/Makefile index a31ddf1b7f2..b56cbaab0f8 100644 --- a/openwrt/target/image/brcm/lzma-loader/Makefile +++ b/openwrt/target/image/brcm/lzma-loader/Makefile @@ -17,8 +17,8 @@ $(PKG_BUILD_DIR)/.prepared: touch $@ $(PKG_BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/.prepared - $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC) \ - LD=$(TARGET_CROSS)ld CROSS_COMPILE=$(TARGET_CROSS) + $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" \ + LD="$(TARGET_CROSS)ld" CROSS_COMPILE="$(TARGET_CROSS)" download: prepare: $(PKG_BUILD_DIR)/.prepared From 93ae901ef885f7fae618152cb9c769e498815391 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Fri, 4 Aug 2006 18:52:03 +0000 Subject: [PATCH 437/757] Add nonmips patches SVN-Revision: 4440 --- openwrt/toolchain/gcc/Config.in | 3 + openwrt/toolchain/gcc/Config.version | 1 + .../patches/3.4.6-nonmips/001-non_mips.patch | 85 + .../3.4.6-nonmips/100-uclibc-conf.patch | 442 +++ .../3.4.6-nonmips/200-uclibc-locale.patch | 3246 +++++++++++++++++ .../3.4.6-nonmips/300-libstdc++-pic.patch | 47 + .../3.4.6-nonmips/601-gcc34-arm-ldm.patch | 119 + .../602-sdk-libstdc++-includes.patch | 22 + .../3.4.6-nonmips/700-pr15068-fix.patch | 44 + .../3.4.6-nonmips/800-arm-bigendian.patch | 70 + .../810-arm-bigendian-uclibc.patch | 27 + .../arm-softfloat.patch.conditional | 270 ++ 12 files changed, 4376 insertions(+) create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/001-non_mips.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/100-uclibc-conf.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/200-uclibc-locale.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/300-libstdc++-pic.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/601-gcc34-arm-ldm.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/602-sdk-libstdc++-includes.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/700-pr15068-fix.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/800-arm-bigendian.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/810-arm-bigendian-uclibc.patch create mode 100644 openwrt/toolchain/gcc/patches/3.4.6-nonmips/arm-softfloat.patch.conditional diff --git a/openwrt/toolchain/gcc/Config.in b/openwrt/toolchain/gcc/Config.in index cee344a2628..dd3184e86dc 100644 --- a/openwrt/toolchain/gcc/Config.in +++ b/openwrt/toolchain/gcc/Config.in @@ -18,6 +18,9 @@ choice config GCC_VERSION_3_4_6 bool "gcc 3.4.6" + config GCC_VERSION_3_4_6_nonmips + bool "gcc 3.4.6-nonmips" + config GCC_VERSION_4_0_2 bool "gcc 4.0.2" diff --git a/openwrt/toolchain/gcc/Config.version b/openwrt/toolchain/gcc/Config.version index 286c4f578aa..877e6388fd6 100644 --- a/openwrt/toolchain/gcc/Config.version +++ b/openwrt/toolchain/gcc/Config.version @@ -7,6 +7,7 @@ config GCC_VERSION default "4.0.3" if GCC_VERSION_4_0_3 default "4.1.0" if GCC_VERSION_4_1_0 default "4.1.1" if GCC_VERSION_4_1_1 + default "3.4.6-nonmips" if GCC_VERSION_3_4_6_nonmips default "3.4.6" if !TOOLCHAINOPTS diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/001-non_mips.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/001-non_mips.patch new file mode 100644 index 00000000000..5de77a44196 --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/001-non_mips.patch @@ -0,0 +1,85 @@ +diff -urN gcc-3.4.6/gcc/config/mips/mips.c gcc-3.4.6-nonmips/gcc/config/mips/mips.c +--- gcc-3.4.6/gcc/config/mips/mips.c 2005-07-31 10:35:15.000000000 +0200 ++++ gcc-3.4.6-nonmips/gcc/config/mips/mips.c 2006-07-19 20:25:03.000000000 +0200 +@@ -3466,26 +3466,26 @@ + for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++) + { + regs[i] = gen_reg_rtx (mode); +- if (MEM_ALIGN (src) >= bits) ++ //if (MEM_ALIGN (src) >= bits) + emit_move_insn (regs[i], adjust_address (src, mode, offset)); +- else +- { +- rtx part = adjust_address (src, BLKmode, offset); +- if (!mips_expand_unaligned_load (regs[i], part, bits, 0)) +- abort (); +- } ++ //else ++ //{ ++ //rtx part = adjust_address (src, BLKmode, offset); ++ //if (!mips_expand_unaligned_load (regs[i], part, bits, 0)) ++ //abort (); ++ //} + } + + /* Copy the chunks to the destination. */ + for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++) +- if (MEM_ALIGN (dest) >= bits) ++ //if (MEM_ALIGN (dest) >= bits) + emit_move_insn (adjust_address (dest, mode, offset), regs[i]); +- else +- { +- rtx part = adjust_address (dest, BLKmode, offset); +- if (!mips_expand_unaligned_store (part, regs[i], bits, 0)) +- abort (); +- } ++ //else ++ //{ ++ //rtx part = adjust_address (dest, BLKmode, offset); ++ //if (!mips_expand_unaligned_store (part, regs[i], bits, 0)) ++ //abort (); ++ //} + + /* Mop up any left-over bytes. */ + if (offset < length) +@@ -4488,6 +4488,7 @@ + mips_expand_unaligned_load (rtx dest, rtx src, unsigned int width, int bitpos) + { + rtx left, right, temp; ++ return false; + + /* If TARGET_64BIT, the destination of a 32-bit load will be a + paradoxical word_mode subreg. This is the only case in which +@@ -4514,8 +4515,9 @@ + } + else + { +- emit_insn (gen_mov_lwl (temp, src, left)); +- emit_insn (gen_mov_lwr (dest, copy_rtx (src), right, temp)); ++ return false; ++ //emit_insn (gen_mov_lwl (temp, src, left)); ++ //emit_insn (gen_mov_lwr (dest, copy_rtx (src), right, temp)); + } + return true; + } +@@ -4528,6 +4530,7 @@ + mips_expand_unaligned_store (rtx dest, rtx src, unsigned int width, int bitpos) + { + rtx left, right; ++ return false; + + if (!mips_get_unaligned_mem (&dest, width, bitpos, &left, &right)) + return false; +@@ -4541,8 +4544,10 @@ + } + else + { +- emit_insn (gen_mov_swl (dest, src, left)); +- emit_insn (gen_mov_swr (copy_rtx (dest), copy_rtx (src), right)); ++ /* Patented instructions */ ++ //emit_insn (gen_mov_swl (dest, src, left)); ++ //emit_insn (gen_mov_swr (copy_rtx (dest), copy_rtx (src), right)); ++ return false; + } + return true; + } diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/100-uclibc-conf.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/100-uclibc-conf.patch new file mode 100644 index 00000000000..29e4c802e2e --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/100-uclibc-conf.patch @@ -0,0 +1,442 @@ +diff -urN gcc-3.4.1-dist/boehm-gc/configure gcc-3.4.1/boehm-gc/configure +--- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500 ++++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500 +@@ -1947,6 +1947,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +diff -urN gcc-3.4.1-dist/boehm-gc/ltconfig gcc-3.4.1/boehm-gc/ltconfig +--- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600 ++++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500 +@@ -1981,6 +1981,23 @@ + fi + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ++ file_magic_cmd=/usr/bin/file ++ file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + version_type=sunos + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then +diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h +--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600 ++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500 +@@ -81,6 +81,18 @@ + "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" + + #undef LINK_SPEC ++#ifdef USE_UCLIBC ++#define LINK_SPEC "%{h*} %{version:-v} \ ++ %{b} %{Wl,*:%*} \ ++ %{static:-Bstatic} \ ++ %{shared:-shared} \ ++ %{symbolic:-Bsymbolic} \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \ ++ -X \ ++ %{mbig-endian:-EB}" \ ++ SUBTARGET_EXTRA_LINK_SPEC ++#else + #define LINK_SPEC "%{h*} %{version:-v} \ + %{b} %{Wl,*:%*} \ + %{static:-Bstatic} \ +@@ -91,6 +103,7 @@ + -X \ + %{mbig-endian:-EB}" \ + SUBTARGET_EXTRA_LINK_SPEC ++#endif + + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS() + +diff -urN gcc-3.4.1-dist/gcc/config/cris/linux.h gcc-3.4.1/gcc/config/cris/linux.h +--- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600 ++++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -79,6 +79,25 @@ + #undef CRIS_DEFAULT_CPU_VERSION + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG + ++#ifdef USE_UCLIBC ++ ++#undef CRIS_SUBTARGET_VERSION ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" ++ ++#undef CRIS_LINK_SUBTARGET_SPEC ++#define CRIS_LINK_SUBTARGET_SPEC \ ++ "-mcrislinux\ ++ -rpath-link include/asm/../..%s\ ++ %{shared} %{static}\ ++ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ ++ %{!shared: \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ ++ %{!r:%{O2|O3: --gc-sections}}" ++ ++#else /* USE_UCLIBC */ ++ + #undef CRIS_SUBTARGET_VERSION + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" + +@@ -93,6 +112,8 @@ + %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ + %{!r:%{O2|O3: --gc-sections}}" + ++#endif /* USE_UCLIBC */ ++ + + /* Node: Run-time Target */ + +diff -urN gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.1/gcc/config/cris/t-linux-uclibc +--- gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.1/gcc/config/cris/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500 +@@ -0,0 +1,3 @@ ++T_CFLAGS = -DUSE_UCLIBC ++TARGET_LIBGCC2_CFLAGS += -fPIC ++CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS) +diff -urN gcc-3.4.1-dist/gcc/config/i386/linux.h gcc-3.4.1/gcc/config/i386/linux.h +--- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600 ++++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -118,6 +118,15 @@ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \ + %{static:-static}}}" + #else ++#if defined USE_UCLIBC ++#define LINK_SPEC "-m elf_i386 %{shared:-shared} \ ++ %{!shared: \ ++ %{!ibcs: \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ ++ %{static:-static}}}" ++#else + #define LINK_SPEC "-m elf_i386 %{shared:-shared} \ + %{!shared: \ + %{!ibcs: \ +@@ -126,6 +135,7 @@ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{static:-static}}}" + #endif ++#endif + + /* A C statement (sans semicolon) to output to the stdio stream + FILE the assembler definition of uninitialized global DECL named +diff -urN gcc-3.4.1-dist/gcc/config/mips/linux.h gcc-3.4.1/gcc/config/mips/linux.h +--- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500 ++++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -109,6 +109,17 @@ + + /* Borrowed from sparc/linux.h */ + #undef LINK_SPEC ++#ifdef USE_UCLIBC ++#define LINK_SPEC \ ++ "%(endian_spec) \ ++ %{shared:-shared} \ ++ %{!shared: \ ++ %{!ibcs: \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ ++ %{static:-static}}}" ++#else + #define LINK_SPEC \ + "%(endian_spec) \ + %{shared:-shared} \ +@@ -118,6 +129,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ + %{static:-static}}}" ++#endif + + #undef SUBTARGET_ASM_SPEC + #define SUBTARGET_ASM_SPEC "\ +diff -urN gcc-3.4.1-dist/gcc/config/rs6000/linux.h gcc-3.4.1/gcc/config/rs6000/linux.h +--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600 ++++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -61,7 +61,11 @@ + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" + + #undef LINK_OS_DEFAULT_SPEC ++#ifdef USE_UCLIBC ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" ++#else + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" ++#endif + + #define LINK_GCC_C_SEQUENCE_SPEC \ + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" +diff -urN gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h gcc-3.4.1/gcc/config/rs6000/sysv4.h +--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500 ++++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500 +@@ -947,6 +947,7 @@ + mcall-linux : %(link_os_linux) ; \ + mcall-gnu : %(link_os_gnu) ; \ + mcall-netbsd : %(link_os_netbsd) ; \ ++ mcall-linux-uclibc : %(link_os_linux_uclibc); \ + mcall-openbsd: %(link_os_openbsd) ; \ + : %(link_os_default) }" + +@@ -1124,6 +1125,10 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" + ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" ++ + #if defined(HAVE_LD_EH_FRAME_HDR) + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " + #endif +@@ -1290,6 +1295,7 @@ + { "link_os_sim", LINK_OS_SIM_SPEC }, \ + { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \ + { "link_os_linux", LINK_OS_LINUX_SPEC }, \ ++ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ + { "link_os_gnu", LINK_OS_GNU_SPEC }, \ + { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ +diff -urN gcc-3.4.1-dist/gcc/config/sh/linux.h gcc-3.4.1/gcc/config/sh/linux.h +--- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600 ++++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -73,12 +73,21 @@ + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" + #undef SUBTARGET_LINK_SPEC ++#ifdef USE_UCLIBC ++#define SUBTARGET_LINK_SPEC \ ++ "%{shared:-shared} \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ ++ %{static:-static}" ++#else + #define SUBTARGET_LINK_SPEC \ + "%{shared:-shared} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{static:-static}" ++#endif + + #undef LIB_SPEC + #define LIB_SPEC \ +diff -urN gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.1/gcc/config/sh/t-linux-uclibc +--- gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.1/gcc/config/sh/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500 +@@ -0,0 +1,13 @@ ++T_CFLAGS = -DUSE_UCLIBC ++ ++TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES ++LIB1ASMFUNCS_CACHE = _ic_invalidate ++ ++LIB2FUNCS_EXTRA= ++ ++MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4 ++MULTILIB_DIRNAMES= ++MULTILIB_MATCHES = ++MULTILIB_EXCEPTIONS= ++ ++EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o +diff -urN gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.1/gcc/config/sh/t-sh64-uclibc +--- gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.1/gcc/config/sh/t-sh64-uclibc 2004-08-12 15:54:43.000000000 -0500 +@@ -0,0 +1,13 @@ ++EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o ++ ++LIB1ASMFUNCS = \ ++ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \ ++ _shcompact_call_trampoline _shcompact_return_trampoline \ ++ _shcompact_incoming_args _ic_invalidate _nested_trampoline \ ++ _push_pop_shmedia_regs \ ++ _udivdi3 _divdi3 _umoddi3 _moddi3 ++ ++MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu ++MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64 ++MULTILIB_MATCHES= ++MULTILIB_EXCEPTIONS= +diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc +--- gcc-3.4.1-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.1/gcc/config/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500 +@@ -0,0 +1,15 @@ ++T_CFLAGS = -DUSE_UCLIBC ++ ++# Compile crtbeginS.o and crtendS.o with pic. ++CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC ++# Compile libgcc2.a with pic. ++TARGET_LIBGCC2_CFLAGS = -fPIC ++ ++# Override t-slibgcc-elf-ver to export some libgcc symbols with ++# the symbol versions that glibc used. ++#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver ++ ++# Use unwind-dw2-fde ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h +diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc +--- gcc-3.4.1-dist/gcc/config.gcc 2004-04-21 10:12:35.000000000 -0500 ++++ gcc-3.4.1/gcc/config.gcc 2004-08-12 15:59:46.000000000 -0500 +@@ -664,6 +664,12 @@ + extra_parts="" + use_collect2=yes + ;; ++arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc ++ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" ++ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux" ++ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" ++ gnu_ld=yes ++ ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" + tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux" +@@ -725,6 +731,10 @@ + tmake_file="cris/t-cris cris/t-elfmulti" + gas=yes + ;; ++cris-*-linux-uclibc*) ++ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h" ++ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc" ++ ;; + cris-*-linux*) + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h" + tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux" +@@ -988,6 +998,11 @@ + thread_file='single' + fi + ;; ++i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux ++ # with ELF format using uClibc ++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h" ++ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff" ++ ;; + i[34567]86-*-linux*) # Intel 80386's running GNU/Linux + # with ELF format using glibc 2 + # aka GNU/Linux C library 6 +@@ -1547,6 +1562,16 @@ + gnu_ld=yes + gas=yes + ;; ++mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc ++ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" ++ case ${target} in ++ mipsisa32*-*) ++ target_cpu_default="MASK_SOFT_FLOAT" ++ tm_defines="MIPS_ISA_DEFAULT=32" ++ ;; ++ esac ++ tmake_file="t-slibgcc-elf-ver t-linux-uclibc" ++ ;; + mips*-*-linux*) # Linux MIPS, either endian. + tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" + case ${target} in +@@ -1764,6 +1789,10 @@ + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h" + tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm" + ;; ++powerpc-*-linux-uclibc*) ++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h" ++ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm" ++ ;; + powerpc-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h" + tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm" +@@ -1916,7 +1945,7 @@ + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h" + ;; + sh-*-linux* | sh[2346lbe]*-*-linux*) +- tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux" ++ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver" + case ${target} in + sh*be-*-* | sh*eb-*-*) ;; + *) +@@ -1924,9 +1953,17 @@ + tmake_file="${tmake_file} sh/t-le" + ;; + esac +- tmake_file="${tmake_file} sh/t-linux" ++ case ${target} in ++ *-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc" ;; ++ *) tmake_file="${tmake_file} t-linux sh/t-linux" ;; ++ esac + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h" + case ${target} in ++ sh64*-*-linux-uclibc*) ++ tmake_file="${tmake_file} sh/t-sh64-uclibc" ++ tm_file="${tm_file} sh/sh64.h" ++ extra_headers="shmedia.h ushmedia.h sshmedia.h" ++ ;; + sh64*) + tmake_file="${tmake_file} sh/t-sh64" + tm_file="${tm_file} sh/sh64.h" +diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4 +--- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500 ++++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500 +@@ -689,6 +689,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] +diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig +--- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600 ++++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500 +@@ -602,6 +602,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in ++linux-uclibc*) ;; + linux-gnu*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac +@@ -1262,6 +1263,24 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ # Note: copied from linux-gnu, and may not be appropriate. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + need_lib_prefix=no + need_version=no diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/200-uclibc-locale.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/200-uclibc-locale.patch new file mode 100644 index 00000000000..3fc4900b06a --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/200-uclibc-locale.patch @@ -0,0 +1,3246 @@ +diff -urN gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 gcc-3.4.2/libstdc++-v3/acinclude.m4 +--- gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 2004-07-15 12:42:45.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/acinclude.m4 2004-09-10 10:47:40.000000000 -0500 +@@ -996,7 +996,7 @@ + AC_MSG_CHECKING([for C locale to use]) + GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], + [use MODEL for target locale package], +- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) ++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) + + # If they didn't use this option switch, or if they specified --enable + # with no specific model, we'll have to look for one. If they +@@ -1012,6 +1012,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case x${target_os} in ++ x*-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu) + AC_EGREP_CPP([_GLIBCXX_ok], [ + #include <features.h> +@@ -1138,6 +1141,41 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ AC_MSG_RESULT(uclibc) ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ AC_SUBST(glibcxx_MOFILES) ++ AC_SUBST(glibcxx_POFILES) ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 gcc-3.4.2/libstdc++-v3/aclocal.m4 +--- gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 2004-08-13 15:44:03.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/aclocal.m4 2004-09-10 10:47:40.000000000 -0500 +@@ -1025,6 +1025,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case x${target_os} in ++ x*-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu) + AC_EGREP_CPP([_GLIBCXX_ok], [ + #include <features.h> +@@ -1151,6 +1154,41 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ AC_MSG_RESULT(uclibc) ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ AC_SUBST(glibcxx_MOFILES) ++ AC_SUBST(glibcxx_POFILES) ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,59 @@ ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- ++ ++// Copyright (C) 2002, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// Written by Jakub Jelinek <jakub@redhat.com> ++ ++#include <clocale> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning clean this up ++#endif ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ ++extern "C" __typeof(iswctype_l) __iswctype_l; ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; ++extern "C" __typeof(strcoll_l) __strcoll_l; ++extern "C" __typeof(strftime_l) __strftime_l; ++extern "C" __typeof(strtod_l) __strtod_l; ++extern "C" __typeof(strtof_l) __strtof_l; ++extern "C" __typeof(strtold_l) __strtold_l; ++extern "C" __typeof(strxfrm_l) __strxfrm_l; ++extern "C" __typeof(towlower_l) __towlower_l; ++extern "C" __typeof(towupper_l) __towupper_l; ++extern "C" __typeof(wcscoll_l) __wcscoll_l; ++extern "C" __typeof(wcsftime_l) __wcsftime_l; ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; ++extern "C" __typeof(wctype_l) __wctype_l; ++extern "C" __typeof(newlocale) __newlocale; ++extern "C" __typeof(freelocale) __freelocale; ++extern "C" __typeof(duplocale) __duplocale; ++extern "C" __typeof(uselocale) __uselocale; ++ ++#endif // GLIBC 2.3 and later +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,160 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <cerrno> // For errno ++#include <locale> ++#include <stdexcept> ++#include <langinfo.h> ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) ++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) ++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) ++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) ++#define __strtof_l(S, E, L) strtof((S), (E)) ++#define __strtod_l(S, E, L) strtod((S), (E)) ++#define __strtold_l(S, E, L) strtold((S), (E)) ++#warning should dummy __newlocale check for C|POSIX ? ++#define __newlocale(a, b, c) NULL ++#define __freelocale(a) ((void)0) ++#define __duplocale(a) __c_locale() ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ float __f = __strtof_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __f; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ double __d = __strtod_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __d; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ long double __ld = __strtold_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __ld; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ void ++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, ++ __c_locale __old) ++ { ++ __cloc = __newlocale(1 << LC_ALL, __s, __old); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ if (!__cloc) ++ { ++ // This named locale is not supported by the underlying OS. ++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " ++ "name not valid")); ++ } ++#endif ++ } ++ ++ void ++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) ++ { ++ if (_S_get_c_locale() != __cloc) ++ __freelocale(__cloc); ++ } ++ ++ __c_locale ++ locale::facet::_S_clone_c_locale(__c_locale& __cloc) ++ { return __duplocale(__cloc); } ++} // namespace std ++ ++namespace __gnu_cxx ++{ ++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = ++ { ++ "LC_CTYPE", ++ "LC_NUMERIC", ++ "LC_TIME", ++ "LC_COLLATE", ++ "LC_MONETARY", ++ "LC_MESSAGES", ++#if _GLIBCXX_NUM_CATEGORIES != 0 ++ "LC_PAPER", ++ "LC_NAME", ++ "LC_ADDRESS", ++ "LC_TELEPHONE", ++ "LC_MEASUREMENT", ++ "LC_IDENTIFICATION" ++#endif ++ }; ++} ++ ++namespace std ++{ ++ const char* const* const locale::_S_categories = __gnu_cxx::category_names; ++} // namespace std +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2004-09-10 10:48:08.000000000 -0500 +@@ -0,0 +1,115 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#ifndef _C_LOCALE_H ++#define _C_LOCALE_H 1 ++ ++#pragma GCC system_header ++ ++#include <cstring> // get std::strlen ++#include <cstdio> // get std::snprintf or std::sprintf ++#include <clocale> ++#include <langinfo.h> // For codecvt ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC_HAS_LOCALE__ ++#include <iconv.h> // For codecvt using iconv, iconv_t ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++#include <libintl.h> // For messages ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning what is _GLIBCXX_C_LOCALE_GNU for ++#endif ++#define _GLIBCXX_C_LOCALE_GNU 1 ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix categories ++#endif ++// #define _GLIBCXX_NUM_CATEGORIES 6 ++#define _GLIBCXX_NUM_CATEGORIES 0 ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++namespace __gnu_cxx ++{ ++ extern "C" __typeof(uselocale) __uselocale; ++} ++#endif ++ ++namespace std ++{ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ typedef __locale_t __c_locale; ++#else ++ typedef int* __c_locale; ++#endif ++ ++ // Convert numeric value of type _Tv to string and return length of ++ // string. If snprintf is available use it, otherwise fall back to ++ // the unsafe sprintf which, in general, can be dangerous and should ++ // be avoided. ++ template<typename _Tv> ++ int ++ __convert_from_v(char* __out, const int __size, const char* __fmt, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ _Tv __v, const __c_locale& __cloc, int __prec) ++ { ++ __c_locale __old = __gnu_cxx::__uselocale(__cloc); ++#else ++ _Tv __v, const __c_locale&, int __prec) ++ { ++# ifdef __UCLIBC_HAS_LOCALE__ ++ char* __old = std::setlocale(LC_ALL, NULL); ++ char* __sav = new char[std::strlen(__old) + 1]; ++ std::strcpy(__sav, __old); ++ std::setlocale(LC_ALL, "C"); ++# endif ++#endif ++ ++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __gnu_cxx::__uselocale(__old); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ std::setlocale(LC_ALL, __sav); ++ delete [] __sav; ++#endif ++ return __ret; ++ } ++} ++ ++#endif +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,306 @@ ++// std::codecvt implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++namespace std ++{ ++ // Specializations. ++#ifdef _GLIBCXX_USE_WCHAR_T ++ codecvt_base::result ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_out(state_type& __state, const intern_type* __from, ++ const intern_type* __from_end, const intern_type*& __from_next, ++ extern_type* __to, extern_type* __to_end, ++ extern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // wcsnrtombs is *very* fast but stops if encounters NUL characters: ++ // in case we fall back to wcrtomb and then continue, in a loop. ++ // NB: wcsnrtombs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', ++ __from_end - __from_next); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ const size_t __conv = wcsnrtombs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // wcrtomb. ++ for (; __from < __from_next; ++__from) ++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ extern_type __buf[MB_LEN_MAX]; ++ __tmp_state = __state; ++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); ++ if (__conv > static_cast<size_t>(__to_end - __to_next)) ++ __ret = partial; ++ else ++ { ++ memcpy(__to_next, __buf, __conv); ++ __state = __tmp_state; ++ __to_next += __conv; ++ ++__from_next; ++ } ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ codecvt_base::result ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_in(state_type& __state, const extern_type* __from, ++ const extern_type* __from_end, const extern_type*& __from_next, ++ intern_type* __to, intern_type* __to_end, ++ intern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we store a L'\0' and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0', ++ __from_end ++ - __from_next)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ size_t __conv = mbsnrtowcs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (;; ++__to_next, __from += __conv) ++ { ++ __conv = mbrtowc(__to_next, __from, __from_end - __from, ++ &__tmp_state); ++ if (__conv == static_cast<size_t>(-1) ++ || __conv == static_cast<size_t>(-2)) ++ break; ++ } ++ __from_next = __from; ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ // It is unclear what to return in this case (see DR 382). ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ if (__to_next < __to_end) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from_next; ++ *__to_next++ = L'\0'; ++ } ++ else ++ __ret = partial; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_encoding() const throw() ++ { ++ // XXX This implementation assumes that the encoding is ++ // stateless and is either single-byte or variable-width. ++ int __ret = 0; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ if (MB_CUR_MAX == 1) ++ __ret = 1; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_max_length() const throw() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ // XXX Probably wrong for stateful encodings. ++ int __ret = MB_CUR_MAX; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_length(state_type& __state, const extern_type* __from, ++ const extern_type* __end, size_t __max) const ++ { ++ int __ret = 0; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we advance past it and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ ++ // A dummy internal buffer is needed in order for mbsnrtocws to consider ++ // its fourth parameter (it wouldn't with NULL as first parameter). ++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) ++ * __max)); ++ while (__from < __end && __max) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0', ++ __end ++ - __from)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __end; ++ ++ const extern_type* __tmp_from = __from; ++ size_t __conv = mbsnrtowcs(__to, &__from, ++ __from_chunk_end - __from, ++ __max, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (__from = __tmp_from;; __from += __conv) ++ { ++ __conv = mbrtowc(NULL, __from, __end - __from, ++ &__tmp_state); ++ if (__conv == static_cast<size_t>(-1) ++ || __conv == static_cast<size_t>(-2)) ++ break; ++ } ++ __state = __tmp_state; ++ __ret += __from - __tmp_from; ++ break; ++ } ++ if (!__from) ++ __from = __from_chunk_end; ++ ++ __ret += __from - __tmp_from; ++ __max -= __conv; ++ ++ if (__from < __end && __max) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from; ++ ++__ret; ++ --__max; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,80 @@ ++// std::collate implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) ++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) ++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) ++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) ++#endif ++ ++namespace std ++{ ++ // These are basically extensions to char_traits, and perhaps should ++ // be put there instead of here. ++ template<> ++ int ++ collate<char>::_M_compare(const char* __one, const char* __two) const ++ { ++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate<char>::_M_transform(char* __to, const char* __from, ++ size_t __n) const ++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ int ++ collate<wchar_t>::_M_compare(const wchar_t* __one, ++ const wchar_t* __two) const ++ { ++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from, ++ size_t __n) const ++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,300 @@ ++// std::ctype implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __wctype_l(S, L) wctype((S)) ++#define __towupper_l(C, L) towupper((C)) ++#define __towlower_l(C, L) towlower((C)) ++#define __iswctype_l(C, M, L) iswctype((C), (M)) ++#endif ++ ++namespace std ++{ ++ // NB: The other ctype<char> specializations are in src/locale.cc and ++ // various /config/os/* files. ++ template<> ++ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) ++ : ctype<char>(0, false, __refs) ++ { ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_ctype); ++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; ++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; ++ this->_M_table = this->_M_c_locale_ctype->__ctype_b; ++#endif ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ ctype<wchar_t>::__wmask_type ++ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const ++ { ++ __wmask_type __ret; ++ switch (__m) ++ { ++ case space: ++ __ret = __wctype_l("space", _M_c_locale_ctype); ++ break; ++ case print: ++ __ret = __wctype_l("print", _M_c_locale_ctype); ++ break; ++ case cntrl: ++ __ret = __wctype_l("cntrl", _M_c_locale_ctype); ++ break; ++ case upper: ++ __ret = __wctype_l("upper", _M_c_locale_ctype); ++ break; ++ case lower: ++ __ret = __wctype_l("lower", _M_c_locale_ctype); ++ break; ++ case alpha: ++ __ret = __wctype_l("alpha", _M_c_locale_ctype); ++ break; ++ case digit: ++ __ret = __wctype_l("digit", _M_c_locale_ctype); ++ break; ++ case punct: ++ __ret = __wctype_l("punct", _M_c_locale_ctype); ++ break; ++ case xdigit: ++ __ret = __wctype_l("xdigit", _M_c_locale_ctype); ++ break; ++ case alnum: ++ __ret = __wctype_l("alnum", _M_c_locale_ctype); ++ break; ++ case graph: ++ __ret = __wctype_l("graph", _M_c_locale_ctype); ++ break; ++ default: ++ __ret = 0; ++ } ++ return __ret; ++ } ++ ++ wchar_t ++ ctype<wchar_t>::do_toupper(wchar_t __c) const ++ { return __towupper_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ wchar_t ++ ctype<wchar_t>::do_tolower(wchar_t __c) const ++ { return __towlower_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ bool ++ ctype<wchar_t>:: ++ do_is(mask __m, wchar_t __c) const ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ bool __ret = false; ++ const size_t __bitmasksize = 11; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__m & _M_bit[__bitcur] ++ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ { ++ __ret = true; ++ break; ++ } ++ return __ret; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const ++ { ++ for (; __lo < __hi; ++__vec, ++__lo) ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ const size_t __bitmasksize = 11; ++ mask __m = 0; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ __m |= _M_bit[__bitcur]; ++ *__vec = __m; ++ } ++ return __hi; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi && !this->do_is(__m, *__lo)) ++ ++__lo; ++ return __lo; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const ++ { ++ while (__lo < __hi && this->do_is(__m, *__lo) != 0) ++ ++__lo; ++ return __lo; ++ } ++ ++ wchar_t ++ ctype<wchar_t>:: ++ do_widen(char __c) const ++ { return _M_widen[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<wchar_t>:: ++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const ++ { ++ while (__lo < __hi) ++ { ++ *__dest = _M_widen[static_cast<unsigned char>(*__lo)]; ++ ++__lo; ++ ++__dest; ++ } ++ return __hi; ++ } ++ ++ char ++ ctype<wchar_t>:: ++ do_narrow(wchar_t __wc, char __dfault) const ++ { ++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) ++ return _M_narrow[__wc]; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ const int __c = wctob(__wc); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return (__c == EOF ? __dfault : static_cast<char>(__c)); ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, ++ char* __dest) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ if (_M_narrow_ok) ++ while (__lo < __hi) ++ { ++ if (*__lo >= 0 && *__lo < 128) ++ *__dest = _M_narrow[*__lo]; ++ else ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); ++ } ++ ++__lo; ++ ++__dest; ++ } ++ else ++ while (__lo < __hi) ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); ++ ++__lo; ++ ++__dest; ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __hi; ++ } ++ ++ void ++ ctype<wchar_t>::_M_initialize_ctype() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ wint_t __i; ++ for (__i = 0; __i < 128; ++__i) ++ { ++ const int __c = wctob(__i); ++ if (__c == EOF) ++ break; ++ else ++ _M_narrow[__i] = static_cast<char>(__c); ++ } ++ if (__i == 128) ++ _M_narrow_ok = true; ++ else ++ _M_narrow_ok = false; ++ for (size_t __j = 0; ++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) ++ _M_widen[__j] = btowc(__j); ++ ++ for (size_t __k = 0; __k <= 11; ++__k) ++ { ++ _M_bit[__k] = static_cast<mask>(_ISbit(__k)); ++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ } ++#endif // _GLIBCXX_USE_WCHAR_T ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,100 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix gettext stuff ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__dcgettext(const char *domainname, ++ const char *msgid, int category); ++#undef gettext ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) ++#else ++#undef gettext ++#define gettext(msgid) (msgid) ++#endif ++ ++namespace std ++{ ++ // Specializations. ++ template<> ++ string ++ messages<char>::do_get(catalog, int, int, const string& __dfault) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str())); ++ __uselocale(__old); ++ return string(__msg); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ const char* __msg = gettext(__dfault.c_str()); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return string(__msg); ++#else ++ const char* __msg = gettext(__dfault.c_str()); ++ return string(__msg); ++#endif ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ wstring ++ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const ++ { ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ __uselocale(__old); ++ return _M_convert_from_char(__msg); ++# elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return _M_convert_from_char(__msg); ++# else ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ return _M_convert_from_char(__msg); ++# endif ++ } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,118 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix prototypes for *textdomain funcs ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__textdomain(const char *domainname); ++extern "C" char *__bindtextdomain(const char *domainname, ++ const char *dirname); ++#else ++#undef __textdomain ++#undef __bindtextdomain ++#define __textdomain(D) ((void)0) ++#define __bindtextdomain(D,P) ((void)0) ++#endif ++ ++ // Non-virtual member functions. ++ template<typename _CharT> ++ messages<_CharT>::messages(size_t __refs) ++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), ++ _M_name_messages(_S_get_c_name()) ++ { } ++ ++ template<typename _CharT> ++ messages<_CharT>::messages(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), ++ _M_name_messages(__s) ++ { ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ _M_name_messages = __tmp; ++ } ++ ++ template<typename _CharT> ++ typename messages<_CharT>::catalog ++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, ++ const char* __dir) const ++ { ++ __bindtextdomain(__s.c_str(), __dir); ++ return this->do_open(__s, __loc); ++ } ++ ++ // Virtual member functions. ++ template<typename _CharT> ++ messages<_CharT>::~messages() ++ { ++ if (_M_name_messages != _S_get_c_name()) ++ delete [] _M_name_messages; ++ _S_destroy_c_locale(_M_c_locale_messages); ++ } ++ ++ template<typename _CharT> ++ typename messages<_CharT>::catalog ++ messages<_CharT>::do_open(const basic_string<char>& __s, ++ const locale&) const ++ { ++ // No error checking is done, assume the catalog exists and can ++ // be used. ++ __textdomain(__s.c_str()); ++ return 0; ++ } ++ ++ template<typename _CharT> ++ void ++ messages<_CharT>::do_close(catalog) const ++ { } ++ ++ // messages_byname ++ template<typename _CharT> ++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) ++ : messages<_CharT>(__refs) ++ { ++ if (this->_M_name_messages != locale::facet::_S_get_c_name()) ++ delete [] this->_M_name_messages; ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ this->_M_name_messages = __tmp; ++ ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_messages); ++ this->_S_create_c_locale(this->_M_c_locale_messages, __s); ++ } ++ } +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,698 @@ ++// std::moneypunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning optimize this for uclibc ++#warning tailor for stub locale support ++#endif ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ // Construct and return valid pattern consisting of some combination of: ++ // space none symbol sign value ++ money_base::pattern ++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) ++ { ++ pattern __ret; ++ ++ // This insanely complicated routine attempts to construct a valid ++ // pattern for use with monyepunct. A couple of invariants: ++ ++ // if (__precedes) symbol -> value ++ // else value -> symbol ++ ++ // if (__space) space ++ // else none ++ ++ // none == never first ++ // space never first or last ++ ++ // Any elegant implementations of this are welcome. ++ switch (__posn) ++ { ++ case 0: ++ case 1: ++ // 1 The sign precedes the value and symbol. ++ __ret.field[0] = sign; ++ if (__space) ++ { ++ // Pattern starts with sign. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[3] = symbol; ++ } ++ __ret.field[2] = space; ++ } ++ else ++ { ++ // Pattern starts with sign and ends with none. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[3] = none; ++ } ++ break; ++ case 2: ++ // 2 The sign follows the value and symbol. ++ if (__space) ++ { ++ // Pattern either ends with sign. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[1] = space; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ // Pattern ends with sign then none. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[1] = symbol; ++ } ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ break; ++ case 3: ++ // 3 The sign immediately precedes the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = sign; ++ __ret.field[1] = symbol; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = sign; ++ __ret.field[3] = symbol; ++ } ++ else ++ { ++ __ret.field[1] = sign; ++ __ret.field[2] = symbol; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ case 4: ++ // 4 The sign immediately follows the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = sign; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = symbol; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ default: ++ ; ++ } ++ return __ret; ++ } ++ ++ template<> ++ void ++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<char, true>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == true ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ void ++ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<char, false>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == false ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ moneypunct<char, true>::~moneypunct() ++ { delete _M_data; } ++ ++ template<> ++ moneypunct<char, false>::~moneypunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<wchar_t, true>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ unsigned char uc; ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ { ++ uc = static_cast<unsigned char>(money_base::_S_atoms[__i]); ++ _M_data->_M_atoms[__i] = btowc(uc); ++ } ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union __s_and_w { const char *__s; unsigned int __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w); ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w); ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ void ++ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<wchar_t, false>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ unsigned char uc; ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ { ++ uc = static_cast<unsigned char>(money_base::_S_atoms[__i]); ++ _M_data->_M_atoms[__i] = btowc(uc); ++ } ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union __s_and_w { const char *__s; unsigned int __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w); ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w); ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len; ++ __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ moneypunct<wchar_t, true>::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++ ++ template<> ++ moneypunct<wchar_t, false>::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,183 @@ ++// std::numpunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache<char>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, ++ __cloc)); ++ ++ // Check for NULL, which implies no grouping. ++ if (_M_data->_M_thousands_sep == '\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = "true"; ++ _M_data->_M_truename_size = strlen(_M_data->_M_truename); ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = "false"; ++ _M_data->_M_falsename_size = strlen(_M_data->_M_falsename); ++ } ++ ++ template<> ++ numpunct<char>::~numpunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache<wchar_t>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_S_get_c_locale()); ++#endif ++ // Use ctype::widen code without the facet... ++ unsigned char uc; ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ { ++ uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]); ++ _M_data->_M_atoms_out[__i] = btowc(uc); ++ } ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ { ++ uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__j]); ++ _M_data->_M_atoms_in[__j] = btowc(uc); ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union __s_and_w { const char *__s; unsigned int __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w); ++ ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w); ++#endif ++ ++ if (_M_data->_M_thousands_sep == L'\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = L"true"; ++ _M_data->_M_truename_size = wcslen(_M_data->_M_truename); ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = L"false"; ++ _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename); ++ } ++ ++ template<> ++ numpunct<wchar_t>::~numpunct() ++ { delete _M_data; } ++ #endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2004-09-10 10:48:00.000000000 -0500 +@@ -0,0 +1,356 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __timepunct<char>:: ++ _M_put(char* __s, size_t __maxlen, const char* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = strftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = '\0'; ++ } ++ ++ template<> ++ void ++ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache<char>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = "%m/%d/%y"; ++ _M_data->_M_date_era_format = "%m/%d/%y"; ++ _M_data->_M_time_format = "%H:%M:%S"; ++ _M_data->_M_time_era_format = "%H:%M:%S"; ++ _M_data->_M_date_time_format = ""; ++ _M_data->_M_date_time_era_format = ""; ++ _M_data->_M_am = "AM"; ++ _M_data->_M_pm = "PM"; ++ _M_data->_M_am_pm_format = ""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = "Sunday"; ++ _M_data->_M_day2 = "Monday"; ++ _M_data->_M_day3 = "Tuesday"; ++ _M_data->_M_day4 = "Wednesday"; ++ _M_data->_M_day5 = "Thursday"; ++ _M_data->_M_day6 = "Friday"; ++ _M_data->_M_day7 = "Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = "Sun"; ++ _M_data->_M_aday2 = "Mon"; ++ _M_data->_M_aday3 = "Tue"; ++ _M_data->_M_aday4 = "Wed"; ++ _M_data->_M_aday5 = "Thu"; ++ _M_data->_M_aday6 = "Fri"; ++ _M_data->_M_aday7 = "Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = "January"; ++ _M_data->_M_month02 = "February"; ++ _M_data->_M_month03 = "March"; ++ _M_data->_M_month04 = "April"; ++ _M_data->_M_month05 = "May"; ++ _M_data->_M_month06 = "June"; ++ _M_data->_M_month07 = "July"; ++ _M_data->_M_month08 = "August"; ++ _M_data->_M_month09 = "September"; ++ _M_data->_M_month10 = "October"; ++ _M_data->_M_month11 = "November"; ++ _M_data->_M_month12 = "December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = "Jan"; ++ _M_data->_M_amonth02 = "Feb"; ++ _M_data->_M_amonth03 = "Mar"; ++ _M_data->_M_amonth04 = "Apr"; ++ _M_data->_M_amonth05 = "May"; ++ _M_data->_M_amonth06 = "Jun"; ++ _M_data->_M_amonth07 = "Jul"; ++ _M_data->_M_amonth08 = "Aug"; ++ _M_data->_M_amonth09 = "Sep"; ++ _M_data->_M_amonth10 = "Oct"; ++ _M_data->_M_amonth11 = "Nov"; ++ _M_data->_M_amonth12 = "Dec"; ++ } ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); ++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); ++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); ++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); ++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); ++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc); ++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); ++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); ++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); ++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); ++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); ++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); ++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); ++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); ++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); ++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); ++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); ++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); ++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); ++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); ++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); ++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); ++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); ++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); ++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); ++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); ++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); ++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); ++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); ++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); ++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); ++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); ++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); ++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); ++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); ++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); ++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); ++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); ++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); ++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); ++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); ++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); ++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ __timepunct<wchar_t>:: ++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); ++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = L'\0'; ++ } ++ ++ template<> ++ void ++ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache<wchar_t>; ++ ++#warning wide time stuff ++// if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = L"%m/%d/%y"; ++ _M_data->_M_date_era_format = L"%m/%d/%y"; ++ _M_data->_M_time_format = L"%H:%M:%S"; ++ _M_data->_M_time_era_format = L"%H:%M:%S"; ++ _M_data->_M_date_time_format = L""; ++ _M_data->_M_date_time_era_format = L""; ++ _M_data->_M_am = L"AM"; ++ _M_data->_M_pm = L"PM"; ++ _M_data->_M_am_pm_format = L""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = L"Sunday"; ++ _M_data->_M_day2 = L"Monday"; ++ _M_data->_M_day3 = L"Tuesday"; ++ _M_data->_M_day4 = L"Wednesday"; ++ _M_data->_M_day5 = L"Thursday"; ++ _M_data->_M_day6 = L"Friday"; ++ _M_data->_M_day7 = L"Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = L"Sun"; ++ _M_data->_M_aday2 = L"Mon"; ++ _M_data->_M_aday3 = L"Tue"; ++ _M_data->_M_aday4 = L"Wed"; ++ _M_data->_M_aday5 = L"Thu"; ++ _M_data->_M_aday6 = L"Fri"; ++ _M_data->_M_aday7 = L"Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = L"January"; ++ _M_data->_M_month02 = L"February"; ++ _M_data->_M_month03 = L"March"; ++ _M_data->_M_month04 = L"April"; ++ _M_data->_M_month05 = L"May"; ++ _M_data->_M_month06 = L"June"; ++ _M_data->_M_month07 = L"July"; ++ _M_data->_M_month08 = L"August"; ++ _M_data->_M_month09 = L"September"; ++ _M_data->_M_month10 = L"October"; ++ _M_data->_M_month11 = L"November"; ++ _M_data->_M_month12 = L"December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = L"Jan"; ++ _M_data->_M_amonth02 = L"Feb"; ++ _M_data->_M_amonth03 = L"Mar"; ++ _M_data->_M_amonth04 = L"Apr"; ++ _M_data->_M_amonth05 = L"May"; ++ _M_data->_M_amonth06 = L"Jun"; ++ _M_data->_M_amonth07 = L"Jul"; ++ _M_data->_M_amonth08 = L"Aug"; ++ _M_data->_M_amonth09 = L"Sep"; ++ _M_data->_M_amonth10 = L"Oct"; ++ _M_data->_M_amonth11 = L"Nov"; ++ _M_data->_M_amonth12 = L"Dec"; ++ } ++#if 0 ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ _M_data->_M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc)); ++ _M_data->_M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc)); ++ _M_data->_M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc)); ++ _M_data->_M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc)); ++ _M_data->_M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc)); ++ _M_data->_M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc)); ++ _M_data->_M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc)); ++ _M_data->_M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc)); ++ _M_data->_M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc)); ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc)); ++ _M_data->_M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc)); ++ _M_data->_M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc)); ++ _M_data->_M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc)); ++ _M_data->_M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc)); ++ _M_data->_M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc)); ++ _M_data->_M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc)); ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc)); ++ _M_data->_M_aday2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc)); ++ _M_data->_M_aday3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc)); ++ _M_data->_M_aday4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc)); ++ _M_data->_M_aday5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc)); ++ _M_data->_M_aday6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc)); ++ _M_data->_M_aday7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc)); ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc)); ++ _M_data->_M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc)); ++ _M_data->_M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc)); ++ _M_data->_M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc)); ++ _M_data->_M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc)); ++ _M_data->_M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc)); ++ _M_data->_M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc)); ++ _M_data->_M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc)); ++ _M_data->_M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc)); ++ _M_data->_M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc)); ++ _M_data->_M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc)); ++ _M_data->_M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc)); ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc)); ++ _M_data->_M_amonth02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc)); ++ _M_data->_M_amonth03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc)); ++ _M_data->_M_amonth04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc)); ++ _M_data->_M_amonth05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc)); ++ _M_data->_M_amonth06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc)); ++ _M_data->_M_amonth07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc)); ++ _M_data->_M_amonth08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc)); ++ _M_data->_M_amonth09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc)); ++ _M_data->_M_amonth10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc)); ++ _M_data->_M_amonth11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc)); ++ _M_data->_M_amonth12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc)); ++ } ++#endif // 0 ++ } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,68 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) ++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(__s) ++ { ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ _M_name_timepunct = __tmp; ++ _M_initialize_timepunct(__cloc); ++ } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::~__timepunct() ++ { ++ if (_M_name_timepunct != _S_get_c_name()) ++ delete [] _M_name_timepunct; ++ delete _M_data; ++ _S_destroy_c_locale(_M_c_locale_timepunct); ++ } +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,58 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003 ++// Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ struct ctype_base ++ { ++ // Note: In uClibc, the following two types depend on configuration. ++ ++ // Non-standard typedefs. ++ typedef const __ctype_touplow_t* __to_type; ++ ++ // NB: Offsets into ctype<char>::_M_table force a particular size ++ // on the mask type. Because of this, we don't use an enum. ++ typedef __ctype_mask_t mask; ++ static const mask upper = _ISupper; ++ static const mask lower = _ISlower; ++ static const mask alpha = _ISalpha; ++ static const mask digit = _ISdigit; ++ static const mask xdigit = _ISxdigit; ++ static const mask space = _ISspace; ++ static const mask print = _ISprint; ++ static const mask graph = _ISalpha | _ISdigit | _ISpunct; ++ static const mask cntrl = _IScntrl; ++ static const mask punct = _ISpunct; ++ static const mask alnum = _ISalpha | _ISdigit; ++ }; +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,69 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 2000, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) ++// functions go in ctype.cc ++ ++ bool ++ ctype<char>:: ++ is(mask __m, char __c) const ++ { return _M_table[static_cast<unsigned char>(__c)] & __m; } ++ ++ const char* ++ ctype<char>:: ++ is(const char* __low, const char* __high, mask* __vec) const ++ { ++ while (__low < __high) ++ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; ++ return __high; ++ } ++ ++ const char* ++ ctype<char>:: ++ scan_is(mask __m, const char* __low, const char* __high) const ++ { ++ while (__low < __high ++ && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) ++ ++__low; ++ return __low; ++ } ++ ++ const char* ++ ctype<char>:: ++ scan_not(mask __m, const char* __low, const char* __high) const ++ { ++ while (__low < __high ++ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) ++ ++__low; ++ return __low; ++ } +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,92 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 ++// Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ const ctype_base::mask* ++ ctype<char>::classic_table() throw() ++ { return __C_ctype_b; } ++ ++ ctype<char>::ctype(__c_locale, const mask* __table, bool __del, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ++ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) ++ { ++ _M_toupper = __C_ctype_toupper; ++ _M_tolower = __C_ctype_tolower; ++ _M_table = __table ? __table : __C_ctype_b; ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ } ++ ++ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) ++ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ++ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) ++ { ++ _M_toupper = __C_ctype_toupper; ++ _M_tolower = __C_ctype_tolower; ++ _M_table = __table ? __table : __C_ctype_b; ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ } ++ ++ char ++ ctype<char>::do_toupper(char __c) const ++ { return _M_toupper[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<char>::do_toupper(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = _M_toupper[static_cast<unsigned char>(*__low)]; ++ ++__low; ++ } ++ return __high; ++ } ++ ++ char ++ ctype<char>::do_tolower(char __c) const ++ { return _M_tolower[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<char>::do_tolower(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = _M_tolower[static_cast<unsigned char>(*__low)]; ++ ++__low; ++ } ++ return __high; ++ } +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,44 @@ ++// Specific definitions for GNU/Linux -*- C++ -*- ++ ++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option) ++// any later version. ++ ++// This library 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 library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++#ifndef _GLIBCXX_OS_DEFINES ++#define _GLIBCXX_OS_DEFINES 1 ++ ++// System-specific #define, typedefs, corrections, etc, go here. This ++// file will come before all others. ++ ++// This keeps isanum, et al from being propagated as macros. ++#define __NO_CTYPE 1 ++ ++#include <features.h> ++ ++// We must not see the optimized string functions GNU libc defines. ++#define __NO_STRING_INLINES ++ ++#endif +diff -urN gcc-3.4.2-dist/libstdc++-v3/configure gcc-3.4.2/libstdc++-v3/configure +--- gcc-3.4.2-dist/libstdc++-v3/configure 2004-08-13 15:44:04.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/configure 2004-09-10 10:47:40.000000000 -0500 +@@ -3878,6 +3878,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +@@ -5545,6 +5550,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case x${target_os} in ++ xlinux-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu) + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" +@@ -5759,6 +5767,77 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ echo "$as_me:$LINENO: result: uclibc" >&5 ++echo "${ECHO_T}uclibc" >&6 ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ # Extract the first word of "msgfmt", so it can be a program name with args. ++set dummy msgfmt; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$check_msgfmt"; then ++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_check_msgfmt="yes" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" ++fi ++fi ++check_msgfmt=$ac_cv_prog_check_msgfmt ++if test -n "$check_msgfmt"; then ++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5 ++echo "${ECHO_T}$check_msgfmt" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ ++ ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-3.4.2-dist/libstdc++-v3/configure.host gcc-3.4.2/libstdc++-v3/configure.host +--- gcc-3.4.2-dist/libstdc++-v3/configure.host 2004-08-27 14:52:30.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/configure.host 2004-09-10 10:47:40.000000000 -0500 +@@ -217,6 +217,12 @@ + ;; + esac + ++# Override for uClibc since linux-uclibc gets mishandled above. ++case "${host_os}" in ++ *-uclibc*) ++ os_include_dir="os/uclibc" ++ ;; ++esac + + # Set any OS-dependent and CPU-dependent bits. + # THIS TABLE IS SORTED. KEEP IT THAT WAY. +diff -urN gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 gcc-3.4.2/libstdc++-v3/crossconfig.m4 +--- gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 2004-07-06 20:23:49.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/crossconfig.m4 2004-09-10 10:47:40.000000000 -0500 +@@ -138,6 +138,99 @@ + ;; + esac + ;; ++ *-uclibc*) ++# Temporary hack until we implement the float versions of the libm funcs ++ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ ++ machine/endian.h machine/param.h sys/machine.h sys/types.h \ ++ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) ++ SECTION_FLAGS='-ffunction-sections -fdata-sections' ++ AC_SUBST(SECTION_FLAGS) ++ GLIBCXX_CHECK_LINKER_FEATURES ++ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ++ GLIBCXX_CHECK_WCHAR_T_SUPPORT ++ ++ # For LFS. ++ AC_DEFINE(HAVE_INT64_T) ++ case "$target" in ++ *-uclinux*) ++ # Don't enable LFS with uClinux ++ ;; ++ *) ++ AC_DEFINE(_GLIBCXX_USE_LFS) ++ esac ++ ++ # For showmanyc_helper(). ++ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) ++ GLIBCXX_CHECK_POLL ++ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG ++ ++ # For xsputn_2(). ++ AC_CHECK_HEADERS(sys/uio.h) ++ GLIBCXX_CHECK_WRITEV ++ ++# AC_DEFINE(HAVE_ACOSF) ++# AC_DEFINE(HAVE_ASINF) ++# AC_DEFINE(HAVE_ATANF) ++# AC_DEFINE(HAVE_ATAN2F) ++ AC_DEFINE(HAVE_CEILF) ++ AC_DEFINE(HAVE_COPYSIGN) ++# AC_DEFINE(HAVE_COPYSIGNF) ++# AC_DEFINE(HAVE_COSF) ++# AC_DEFINE(HAVE_COSHF) ++# AC_DEFINE(HAVE_EXPF) ++# AC_DEFINE(HAVE_FABSF) ++ AC_DEFINE(HAVE_FINITE) ++ AC_DEFINE(HAVE_FINITEF) ++ AC_DEFINE(HAVE_FLOORF) ++# AC_DEFINE(HAVE_FMODF) ++# AC_DEFINE(HAVE_FREXPF) ++ AC_DEFINE(HAVE_HYPOT) ++# AC_DEFINE(HAVE_HYPOTF) ++ AC_DEFINE(HAVE_ISINF) ++ AC_DEFINE(HAVE_ISINFF) ++ AC_DEFINE(HAVE_ISNAN) ++ AC_DEFINE(HAVE_ISNANF) ++# AC_DEFINE(HAVE_LOGF) ++# AC_DEFINE(HAVE_LOG10F) ++# AC_DEFINE(HAVE_MODFF) ++# AC_DEFINE(HAVE_SINF) ++# AC_DEFINE(HAVE_SINHF) ++# AC_DEFINE(HAVE_SINCOS) ++# AC_DEFINE(HAVE_SINCOSF) ++ AC_DEFINE(HAVE_SQRTF) ++# AC_DEFINE(HAVE_TANF) ++# AC_DEFINE(HAVE_TANHF) ++ if test x"long_double_math_on_this_cpu" = x"yes"; then ++ AC_MSG_ERROR([long_double_math_on_this_cpu is yes!]) ++# AC_DEFINE(HAVE_ACOSL) ++# AC_DEFINE(HAVE_ASINL) ++# AC_DEFINE(HAVE_ATANL) ++# AC_DEFINE(HAVE_ATAN2L) ++# AC_DEFINE(HAVE_CEILL) ++# AC_DEFINE(HAVE_COPYSIGNL) ++# AC_DEFINE(HAVE_COSL) ++# AC_DEFINE(HAVE_COSHL) ++# AC_DEFINE(HAVE_EXPL) ++# AC_DEFINE(HAVE_FABSL) ++# AC_DEFINE(HAVE_FINITEL) ++# AC_DEFINE(HAVE_FLOORL) ++# AC_DEFINE(HAVE_FMODL) ++# AC_DEFINE(HAVE_FREXPL) ++# AC_DEFINE(HAVE_HYPOTL) ++# AC_DEFINE(HAVE_ISINFL) ++# AC_DEFINE(HAVE_ISNANL) ++# AC_DEFINE(HAVE_LOGL) ++# AC_DEFINE(HAVE_LOG10L) ++# AC_DEFINE(HAVE_MODFL) ++# AC_DEFINE(HAVE_POWL) ++# AC_DEFINE(HAVE_SINL) ++# AC_DEFINE(HAVE_SINHL) ++# AC_DEFINE(HAVE_SINCOSL) ++# AC_DEFINE(HAVE_SQRTL) ++# AC_DEFINE(HAVE_TANL) ++# AC_DEFINE(HAVE_TANHL) ++ fi ++ ;; + *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ + machine/endian.h machine/param.h sys/machine.h sys/types.h \ +@@ -152,7 +245,7 @@ + AC_DEFINE(HAVE_INT64_T) + case "$target" in + *-uclinux*) +- # Don't enable LFS with uClibc ++ # Don't enable LFS with uClinux + ;; + *) + AC_DEFINE(_GLIBCXX_USE_LFS) +diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h +--- gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h 2003-12-08 21:51:45.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h 2004-09-10 10:47:40.000000000 -0500 +@@ -101,7 +101,9 @@ + using std::wmemcpy; + using std::wmemmove; + using std::wmemset; ++#if _GLIBCXX_HAVE_WCSFTIME + using std::wcsftime; ++#endif + + #if _GLIBCXX_USE_C99 + using std::wcstold; +diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h +--- gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h 2004-07-20 03:52:12.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h 2004-09-10 10:47:40.000000000 -0500 +@@ -179,7 +179,9 @@ + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; ++#if _GLIBCXX_HAVE_WCSFTIME + using ::wcsftime; ++#endif + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/300-libstdc++-pic.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/300-libstdc++-pic.patch new file mode 100644 index 00000000000..c030ba62051 --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/300-libstdc++-pic.patch @@ -0,0 +1,47 @@ +# DP: Build and install libstdc++_pic.a library. + +--- gcc/libstdc++-v3/src/Makefile.am~ 2003-02-28 09:21:05.000000000 +0100 ++++ gcc/libstdc++-v3/src/Makefile.am 2003-02-28 09:28:50.000000000 +0100 +@@ -224,6 +224,10 @@ + @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@ + + ++install-exec-local: ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++ + # Added bits to build debug library. + if GLIBCPP_BUILD_DEBUG + all-local: build_debug + +--- gcc/libstdc++-v3/src/Makefile.in~ 2004-02-21 09:55:48.000000000 +0100 ++++ gcc/libstdc++-v3/src/Makefile.in 2004-02-21 09:59:34.000000000 +0100 +@@ -585,7 +585,7 @@ + + install-data-am: install-data-local + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local + + install-info: install-info-am + +@@ -618,6 +618,7 @@ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-data-local \ + install-exec install-exec-am install-info install-info-am \ ++ install-exec-local \ + install-man install-strip install-toolexeclibLTLIBRARIES \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ +@@ -707,6 +708,11 @@ + install_debug: + (cd ${debugdir} && $(MAKE) \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ++ ++install-exec-local: ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/601-gcc34-arm-ldm.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/601-gcc34-arm-ldm.patch new file mode 100644 index 00000000000..142052fdf07 --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/601-gcc34-arm-ldm.patch @@ -0,0 +1,119 @@ +--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500 ++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400 +@@ -8520,6 +8520,26 @@ + return_used_this_function = 0; + } + ++/* Return the number (counting from 0) of ++ the least significant set bit in MASK. */ ++ ++#ifdef __GNUC__ ++inline ++#endif ++static int ++number_of_first_bit_set (mask) ++ int mask; ++{ ++ int bit; ++ ++ for (bit = 0; ++ (mask & (1 << bit)) == 0; ++ ++bit) ++ continue; ++ ++ return bit; ++} ++ + const char * + arm_output_epilogue (rtx sibling) + { +@@ -8753,27 +8773,47 @@ + saved_regs_mask |= (1 << PC_REGNUM); + } + +- /* Load the registers off the stack. If we only have one register +- to load use the LDR instruction - it is faster. */ +- if (saved_regs_mask == (1 << LR_REGNUM)) +- { +- /* The exception handler ignores the LR, so we do +- not really need to load it off the stack. */ +- if (eh_ofs) +- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM); +- else +- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM); +- } +- else if (saved_regs_mask) ++ if (saved_regs_mask) + { +- if (saved_regs_mask & (1 << SP_REGNUM)) +- /* Note - write back to the stack register is not enabled +- (ie "ldmfd sp!..."). We know that the stack pointer is +- in the list of registers and if we add writeback the +- instruction becomes UNPREDICTABLE. */ +- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask); ++ /* Load the registers off the stack. If we only have one register ++ to load use the LDR instruction - it is faster. */ ++ if (bit_count (saved_regs_mask) == 1) ++ { ++ int reg = number_of_first_bit_set (saved_regs_mask); ++ ++ switch (reg) ++ { ++ case SP_REGNUM: ++ /* Mustn't use base writeback when loading SP. */ ++ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM); ++ break; ++ ++ case LR_REGNUM: ++ if (eh_ofs) ++ { ++ /* The exception handler ignores the LR, so we do ++ not really need to load it off the stack. */ ++ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM); ++ break; ++ } ++ /* else fall through */ ++ ++ default: ++ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM); ++ break; ++ } ++ } + else +- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask); ++ { ++ if (saved_regs_mask & (1 << SP_REGNUM)) ++ /* Note - write back to the stack register is not enabled ++ (ie "ldmfd sp!..."). We know that the stack pointer is ++ in the list of registers and if we add writeback the ++ instruction becomes UNPREDICTABLE. */ ++ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask); ++ else ++ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask); ++ } + } + + if (current_function_pretend_args_size) +@@ -11401,22 +11441,6 @@ + } + } + +-/* Return the number (counting from 0) of +- the least significant set bit in MASK. */ +- +-inline static int +-number_of_first_bit_set (int mask) +-{ +- int bit; +- +- for (bit = 0; +- (mask & (1 << bit)) == 0; +- ++bit) +- continue; +- +- return bit; +-} +- + /* Generate code to return from a thumb function. + If 'reg_containing_return_addr' is -1, then the return address is + actually on the stack, at the stack pointer. */ diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/602-sdk-libstdc++-includes.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/602-sdk-libstdc++-includes.patch new file mode 100644 index 00000000000..4377c2143b9 --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/602-sdk-libstdc++-includes.patch @@ -0,0 +1,22 @@ +--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100 ++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100 +@@ -32,7 +32,7 @@ + + libmath_la_SOURCES = stubs.c + +-AM_CPPFLAGS = $(CANADIAN_INCLUDES) ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include + + # Only compiling "C" sources in this directory. + LIBTOOL = @LIBTOOL@ --tag CC +--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100 ++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100 +@@ -18,7 +18,7 @@ + $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once + + # -I/-D flags to pass when compiling. +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES) ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include + + + diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/700-pr15068-fix.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/700-pr15068-fix.patch new file mode 100644 index 00000000000..2977765c5f1 --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/700-pr15068-fix.patch @@ -0,0 +1,44 @@ +See http://gcc.gnu.org/PR15068 + +Fixes error + +../sysdeps/generic/s_fmax.c: In function `__fmax': +../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257 +Please submit a full bug report, +with preprocessed source if appropriate. +See <URL:http://gcc.gnu.org/bugs.html> for instructions. +make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math' +make[1]: *** [math/others] Error 2 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822' +make: *** [all] Error 2 + +[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ] + +--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800 ++++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700 +@@ -1878,6 +1878,7 @@ + rtx set_src = SET_SRC (pc_set (BB_END (bb))); + rtx cond_true = XEXP (set_src, 0); + rtx reg = XEXP (cond_true, 0); ++ enum rtx_code inv_cond; + + if (GET_CODE (reg) == SUBREG) + reg = SUBREG_REG (reg); +@@ -1886,11 +1887,13 @@ + in the form of a comparison of a register against zero. + If the condition is more complex than that, then it is safe + not to record any information. */ +- if (GET_CODE (reg) == REG ++ inv_cond = reversed_comparison_code (cond_true, BB_END (bb)); ++ if (inv_cond != UNKNOWN ++ && GET_CODE (reg) == REG + && XEXP (cond_true, 1) == const0_rtx) + { + rtx cond_false +- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)), ++ = gen_rtx_fmt_ee (inv_cond, + GET_MODE (cond_true), XEXP (cond_true, 0), + XEXP (cond_true, 1)); + if (GET_CODE (XEXP (set_src, 1)) == PC) diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/800-arm-bigendian.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/800-arm-bigendian.patch new file mode 100644 index 00000000000..0bae8f474c2 --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/800-arm-bigendian.patch @@ -0,0 +1,70 @@ +By Lennert Buytenhek <buytenh@wantstofly.org> +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h +--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:01:50.000000000 -0500 ++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 15:43:40.000000000 -0500 +@@ -30,17 +30,34 @@ + /* Do not assume anything about header files. */ + #define NO_IMPLICIT_EXTERN_C + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + /* Default is to use APCS-32 mode. */ + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_APCS_32 | \ ++ ARM_FLAG_MMU_TRAPS | \ ++ TARGET_ENDIAN_DEFAULT ) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" } + + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" + +@@ -101,7 +118,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + #endif + +diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc +--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:01:50.000000000 -0500 ++++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:01:25.000000000 -0500 +@@ -672,6 +672,11 @@ + ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" ++ case $target in ++ arm*b-*) ++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines" ++ ;; ++ esac + tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + gnu_ld=yes diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/810-arm-bigendian-uclibc.patch b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/810-arm-bigendian-uclibc.patch new file mode 100644 index 00000000000..a4d87e23174 --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/810-arm-bigendian-uclibc.patch @@ -0,0 +1,27 @@ +diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h +--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:08:18.000000000 -0500 ++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 16:06:24.000000000 -0500 +@@ -107,7 +107,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + #else + #define LINK_SPEC "%{h*} %{version:-v} \ +diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc +--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:08:18.000000000 -0500 ++++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:03:25.000000000 -0500 +@@ -666,6 +666,11 @@ + ;; + arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" ++ case $target in ++ arm*b-*) ++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines" ++ ;; ++ esac + tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + gnu_ld=yes diff --git a/openwrt/toolchain/gcc/patches/3.4.6-nonmips/arm-softfloat.patch.conditional b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/arm-softfloat.patch.conditional new file mode 100644 index 00000000000..19d1b90dacd --- /dev/null +++ b/openwrt/toolchain/gcc/patches/3.4.6-nonmips/arm-softfloat.patch.conditional @@ -0,0 +1,270 @@ +Note... modified my mjn3 to not conflict with the big endian arm patch. +Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT. +Also changed + #define SUBTARGET_EXTRA_ASM_SPEC "\ + %{!mcpu=*:-mcpu=xscale} \ + %{mhard-float:-mfpu=fpa} \ + %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}" +to + #define SUBTARGET_EXTRA_ASM_SPEC "\ + %{mhard-float:-mfpu=fpa} \ + %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}" +in gcc/config/arm/linux-elf.h. +# +# Submitted: +# +# Dimitry Andric <dimitry@andric.com>, 2004-05-01 +# +# Description: +# +# Nicholas Pitre released this patch for gcc soft-float support here: +# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html +# +# This version has been adapted to work with gcc 3.4.0. +# +# The original patch doesn't distinguish between softfpa and softvfp modes +# in the way Nicholas Pitre probably meant. His description is: +# +# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for +# floats can be achieved with -mhard-float or with the configure +# --with-float=hard option. If -msoft-float or --with-float=soft is used then +# software float support will be used just like the default but with the legacy +# big endian word ordering for double float representation instead." +# +# Which means the following: +# +# * If you compile without -mhard-float or -msoft-float, you should get +# software floating point, using the VFP format. The produced object file +# should have these flags in its header: +# +# private flags = 600: [APCS-32] [VFP float format] [software FP] +# +# * If you compile with -mhard-float, you should get hardware floating point, +# which always uses the FPA format. Object file header flags should be: +# +# private flags = 0: [APCS-32] [FPA float format] +# +# * If you compile with -msoft-float, you should get software floating point, +# using the FPA format. This is done for compatibility reasons with many +# existing distributions. Object file header flags should be: +# +# private flags = 200: [APCS-32] [FPA float format] [software FP] +# +# The original patch from Nicholas Pitre contained the following constructs: +# +# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \ +# %{mhard-float:-mfpu=fpa} \ +# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}" +# +# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This +# is probably the reason Robert Schwebel modified it to: +# +# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \ +# %{mhard-float:-mfpu=fpa} \ +# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}" +# +# But this causes the following behaviour: +# +# * If you compile without -mhard-float or -msoft-float, the compiler generates +# software floating point instructions, but *nothing* is passed to the +# assembler, which results in an object file which has flags: +# +# private flags = 0: [APCS-32] [FPA float format] +# +# This is not correct! +# +# * If you compile with -mhard-float, the compiler generates hardware floating +# point instructions, and passes "-mfpu=fpa" to the assembler, which results +# in an object file which has the same flags as in the previous item, but now +# those *are* correct. +# +# * If you compile with -msoft-float, the compiler generates software floating +# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that +# order) to the assembler, which results in an object file with flags: +# +# private flags = 600: [APCS-32] [VFP float format] [software FP] +# +# This is not correct, because the last "-mfpu=" option on the assembler +# command line determines the actual FPU convention used (which should be FPA +# in this case). +# +# Therefore, I modified this patch to get the desired behaviour. Every +# instance of the notation: +# +# %{msoft-float:-mfpu=softfpa -mfpu=softvfp} +# +# was changed to: +# +# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp} +# +# I also did the following: +# +# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to +# be consistent with Nicholas' original patch. +# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS +# macros I could find. I think that if you compile without any options, you +# would like to get the defaults. :) +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed +# anymore. (The required functions are now in libgcc.) + +diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h +--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600 ++++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500 +@@ -31,11 +31,16 @@ + #define TARGET_VERSION fputs (" (ARM/coff)", stderr) + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" } + #endif + + /* This is COFF, but prefer stabs. */ +diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h +--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600 ++++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500 +@@ -46,7 +46,9 @@ + + #ifndef SUBTARGET_ASM_FLOAT_SPEC + #define SUBTARGET_ASM_FLOAT_SPEC "\ +-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}" ++%{mapcs-float:-mfloat} \ ++%{mhard-float:-mfpu=fpa} \ ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}" + #endif + + #ifndef ASM_SPEC +@@ -106,12 +108,17 @@ + #endif + + #ifndef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + #endif + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" } ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" } + #endif + + #define TARGET_ASM_FILE_START_APP_OFF true +diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h +--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500 ++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500 +@@ -44,12 +44,26 @@ + #define TARGET_LINKER_EMULATION "armelf_linux" + #endif + +-/* Default is to use APCS-32 mode. */ ++/* ++ * Default is to use APCS-32 mode with soft-vfp. ++ * The old Linux default for floats can be achieved with -mhard-float ++ * or with the configure --with-float=hard option. ++ * If -msoft-float or --with-float=soft is used then software float ++ * support will be used just like the default but with the legacy ++ * big endian word ordering for double float representation instead. ++ */ + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT \ +- ( ARM_FLAG_APCS_32 | \ +- ARM_FLAG_MMU_TRAPS | \ +- TARGET_ENDIAN_DEFAULT ) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_SOFT_FLOAT \ ++ | TARGET_ENDIAN_DEFAULT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_MMU_TRAPS ) ++ ++#undef SUBTARGET_EXTRA_ASM_SPEC ++#define SUBTARGET_EXTRA_ASM_SPEC "\ ++%{mhard-float:-mfpu=fpa} \ ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}" + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +@@ -57,7 +71,7 @@ + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" } + + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" + +@@ -72,7 +86,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add + the GNU/Linux magical crtbegin.o file (see crtstuff.c) which +diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux +--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500 ++++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500 +@@ -4,7 +4,10 @@ + LIBGCC2_DEBUG_CFLAGS = -g0 + + LIB1ASMSRC = arm/lib1funcs.asm +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _fixsfsi _fixunssfsi + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float +diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h +--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600 ++++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500 +@@ -30,7 +30,12 @@ + + /* Default to using APCS-32 and software floating point. */ + #ifndef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + #endif + + /* Now we define the strings used to build the spec file. */ +diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h +--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500 ++++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500 +@@ -49,11 +49,12 @@ + endian, regardless of the endian-ness of the memory + system. */ + +-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \ +- %{mhard-float:-mfpu=fpa} \ +- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}" ++#define SUBTARGET_EXTRA_ASM_SPEC "\ ++%{!mcpu=*:-mcpu=xscale} \ ++%{mhard-float:-mfpu=fpa} \ ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}" + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" } ++ { "mlittle-endian", "mno-thumb-interwork", "marm" } + #endif From 5df712b33fcf318a2279a094e6916a6a9958605e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 4 Aug 2006 19:13:09 +0000 Subject: [PATCH 438/757] update spca5xx, old version is no longer on the website SVN-Revision: 4443 --- openwrt/package/spca5xx/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/spca5xx/Makefile b/openwrt/package/spca5xx/Makefile index 22c45cec497..08f7ef3f154 100644 --- a/openwrt/package/spca5xx/Makefile +++ b/openwrt/package/spca5xx/Makefile @@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=spca5xx -PKG_VERSION:=20060301 +PKG_VERSION:=20060501 PKG_RELEASE:=1 -PKG_MD5SUM:=4160e03c408ac254111febacf058b88a +PKG_MD5SUM:=8fcec25715aea10f9ebec5728c37e752 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ From 1e5e0f9ecabbe38b0a63e807c1e515a1d66541da Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 4 Aug 2006 19:21:05 +0000 Subject: [PATCH 439/757] add mirror2 to download.pl SVN-Revision: 4445 --- openwrt/scripts/download.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/scripts/download.pl b/openwrt/scripts/download.pl index 40b8d212a5f..094ec04861a 100755 --- a/openwrt/scripts/download.pl +++ b/openwrt/scripts/download.pl @@ -92,6 +92,7 @@ foreach my $mirror (@ARGV) { } push @mirrors, 'http://mirror1.openwrt.org/'; +push @mirrors, 'http://mirror2.openwrt.org/'; push @mirrors, 'http://downloads.openwrt.org/sources/'; while (!$ok) { From ad39e10224afe508be6f194b7c3662c4199dd8a9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 4 Aug 2006 20:11:55 +0000 Subject: [PATCH 440/757] fix hostap menuconfig and build for linux 2.6 SVN-Revision: 4448 --- openwrt/package/hostap-utils/Makefile | 4 +- openwrt/package/hostap/Makefile | 77 +++++++++++++++++++-------- 2 files changed, 56 insertions(+), 25 deletions(-) diff --git a/openwrt/package/hostap-utils/Makefile b/openwrt/package/hostap-utils/Makefile index f2e70efa5f9..d1f79147685 100644 --- a/openwrt/package/hostap-utils/Makefile +++ b/openwrt/package/hostap-utils/Makefile @@ -23,8 +23,8 @@ include $(INCLUDE_DIR)/package.mk define Package/hostap-utils SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+kmod-hostap + CATEGORY:=Drivers + DEPENDS:=kmod-hostap TITLE:=Host AP driver utility programs DESCRIPTION:=Host AP driver utility programs URL:=http://hostap.epitest.fi/ diff --git a/openwrt/package/hostap/Makefile b/openwrt/package/hostap/Makefile index 64b3e40257c..b653b145502 100644 --- a/openwrt/package/hostap/Makefile +++ b/openwrt/package/hostap/Makefile @@ -24,20 +24,24 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk define Package/kmod-hostap -SECTION:=drivers -CATEGORY:=Drivers -DEPENDS:=@LINUX_2_4_BRCM||LINUX_2_4_X86 -TITLE:=Host AP support for Prism2/2.5/3 IEEE 802.11b -DESCRIPTION:=Host AP support for Prism2/2.5/3 IEEE 802.11b \\\ -A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3 \\\ -chipset. This driver supports so called Host AP mode that allows the card \\\ -to act as an IEEE 802.11 access point. \\\ -\\\ -This option includes the base Host AP driver code that is shared by \\\ -different hardware models. You will also need to enable support for \\\ -PLX/PCI/CS version of the driver to actually use the driver. \\\ -URL:=http://hostap.epitest.fi/ -VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT + TITLE:=Host AP support for Prism2/2.5/3 IEEE 802.11b + DESCRIPTION:=Host AP support for Prism2/2.5/3 IEEE 802.11b \\\ + A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3 \\\ + chipset. This driver supports so called Host AP mode that allows the card \\\ + to act as an IEEE 802.11 access point. \\\ + \\\ + This option includes the base Host AP driver code that is shared by \\\ + different hardware models. You will also need to enable support for \\\ + PLX/PCI/CS version of the driver to actually use the driver. \\\ + URL:=http://hostap.epitest.fi/ + ifeq ($(KERNEL),2.6) + VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) + else + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + endif endef define Package/kmod-hostap-pci @@ -54,16 +58,16 @@ TITLE:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors DESCRIPTION:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors endef - -define Build/Compile +ifeq ($(KERNEL),2.4) + define Build/Compile $(MAKE) -C $(LINUX_DIR)/ \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \ modules -endef + endef -define Package/kmod-hostap/install + define Package/kmod-hostap/install install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) \ $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \ @@ -71,21 +75,48 @@ define Package/kmod-hostap/install $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ -endef + endef -define Package/kmod-hostap-pci/install + define Package/kmod-hostap-pci/install install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) \ $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ -endef + endef -define Package/kmod-hostap-plx/install + define Package/kmod-hostap-plx/install install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) \ $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ -endef + endef +endif + +ifeq ($(KERNEL),2.6) + define Build/Compile + endef + + define Package/kmod-hostap/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) \ + $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + endef + + define Package/kmod-hostap-pci/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) \ + $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + endef + + define Package/kmod-hostap-plx/install + install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + $(CP) \ + $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + endef +endif $(eval $(call BuildPackage,kmod-hostap)) $(eval $(call BuildPackage,kmod-hostap-pci)) From c5a2959256a87d6912b3d027752e7e3c9042e709 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 4 Aug 2006 20:35:41 +0000 Subject: [PATCH 441/757] remove duplicate package/ prefix from package dump error message SVN-Revision: 4451 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 90bc5deb096..32cadb7f991 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -44,7 +44,7 @@ endif @echo Collecting package info... @-for dir in package/*/; do \ echo Source-Makefile: $${dir}Makefile; \ - $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || echo "ERROR: please fix package/$${dir}Makefile" >&2; \ + $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || echo "ERROR: please fix $${dir}Makefile" >&2; \ done > $@ pkginfo-clean: FORCE From a737dbbcb6f8f9b831f8695912f2add11402a919 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 4 Aug 2006 20:46:47 +0000 Subject: [PATCH 442/757] automatically turn off colors SVN-Revision: 4454 --- openwrt/include/verbose.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openwrt/include/verbose.mk b/openwrt/include/verbose.mk index 525fbf1c157..36002aee990 100644 --- a/openwrt/include/verbose.mk +++ b/openwrt/include/verbose.mk @@ -18,13 +18,18 @@ ifeq ("$(origin V)", "command line") KBUILD_VERBOSE:=$(V) endif +ifneq ($(shell tty -s <&3 || echo x),x) + _Y:="\\33[33m"# yellow + _N:="\\33[m"# normal +endif + ifneq ($(KBUILD_VERBOSE),99) ifeq ($(QUIET),1) $(MAKECMDGOALS): trace trace: FORCE @[ -f "$(MAKECMDGOALS)" ] || { \ [ -z "$${PWD##$$TOPDIR}" ] || DIR=" -C $${PWD##$$TOPDIR/}"; \ - echo -e "\33[33mmake[$$(($(MAKELEVEL)+1))]$$DIR $(MAKECMDGOALS)\33[m" >&3; \ + echo -e "$(_Y)make[$$(($(MAKELEVEL)+1))]$$DIR $(MAKECMDGOALS)$(_N)" >&3; \ } else export QUIET:=1 From 5a79463894378a3cdc7f41a9f4ce315a114d5661 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 4 Aug 2006 21:42:29 +0000 Subject: [PATCH 443/757] add -f option to timestamp.pl (follow symlinks) SVN-Revision: 4457 --- openwrt/scripts/timestamp.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openwrt/scripts/timestamp.pl b/openwrt/scripts/timestamp.pl index 093ced9935b..a3aa50cb0df 100755 --- a/openwrt/scripts/timestamp.pl +++ b/openwrt/scripts/timestamp.pl @@ -37,11 +37,13 @@ while (@ARGV > 0) { my $path = shift @ARGV; if ($path =~ /^-x/) { my $str = shift @ARGV; - $options{"-x"} .= " -and -not -path \\*".$str."\\*" + $options{"findopts"} .= " -and -not -path \\*".$str."\\*" + } elsif ($path =~ /^-f/) { + $options{"findopts"} .= " -follow"; } elsif ($path =~ /^-/) { $options{$path} = 1; } else { - my ($tmp, $fname) = get_ts($path, $options{"-x"}); + my ($tmp, $fname) = get_ts($path, $options{"findopts"}); if ($tmp > $ts) { if ($options{'-f'}) { $n = $fname; From bd7a40ba7d79cfb5c68c2aaf981a31202d4698bb Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sat, 5 Aug 2006 00:55:41 +0000 Subject: [PATCH 444/757] Force remove of the symbolic link build_arm/linux, especially when switching from targets using the same toolchain (ex : switching from brcm-2.4 to au1000-2.6) SVN-Revision: 4462 --- openwrt/include/kernel-build.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 9af1142d331..bf6f2c2ecac 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -79,6 +79,7 @@ modules: $(LINUX_DIR)/.modules_done packages: $(TARGETS) $(LINUX_DIR)/.linux-compile: + @rm -f $(BUILD_DIR)/linux ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux @$(MAKE) modules @$(MAKE) packages From 2c66496f62e3819bdbd02551709857150989e323 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sat, 5 Aug 2006 19:38:21 +0000 Subject: [PATCH 445/757] Move crc-ccitt from built-in to module SVN-Revision: 4472 --- openwrt/target/linux/brcm63xx-2.6/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index d38c03003fa..c5f8d58bf9d 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Mon Jul 31 18:51:11 2006 +# Sat Aug 5 21:00:37 2006 # CONFIG_MIPS=y @@ -1303,7 +1303,7 @@ CONFIG_CRYPTO_DEFLATE=y # # Library routines # -CONFIG_CRC_CCITT=y +CONFIG_CRC_CCITT=m # CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set From 0113b0a627e1c0ebf19b8601e9828bc4387ce1a3 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Sun, 6 Aug 2006 10:42:12 +0000 Subject: [PATCH 446/757] add XScale support to -ng SVN-Revision: 4475 --- openwrt/target/Config.in | 33 +- openwrt/target/image/xscale/Makefile | 23 +- openwrt/target/linux/xscale-2.6/config | 92 ++- .../xscale-2.6/patches/001-gateway_7001.patch | 114 +-- openwrt/toolchain/Config.in | 1 + openwrt/toolchain/gcc/Config.version | 2 + .../gcc/patches/4.0.3/800-arm-bigendian.patch | 67 ++ .../toolchain/kernel-headers/files/config.arm | 778 ++++++++++++++++++ openwrt/toolchain/uClibc/config/armeb | 168 ++++ 9 files changed, 1163 insertions(+), 115 deletions(-) create mode 100644 openwrt/toolchain/gcc/patches/4.0.3/800-arm-bigendian.patch create mode 100644 openwrt/toolchain/kernel-headers/files/config.arm create mode 100644 openwrt/toolchain/uClibc/config/armeb diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 1b3ae523d03..3f8993c2aac 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -2,6 +2,15 @@ choice prompt "Target System" default LINUX_2_4_BRCM +config LINUX_2_6_AU1000 + bool "AMD Alchemy AUxx [2.6]" + select mipsel + select LINUX_2_6 + select PCI_SUPPORT + help + Build firmware for AMD Alchemy 1500 boards + (e.g. 4G-Systems Mesh/Access Cube ...) + config LINUX_2_6_ARUBA bool "Aruba [2.6]" select mips @@ -54,6 +63,13 @@ config LINUX_2_6_BRCM63XX Build firmware images for Broadcom based xDSL/routers (e.g. Inventel Livebox, Siemens SE515) +config LINUX_2_6_XSCALE + bool "Intel XScale [2.6]" + select armeb + select LINUX_2_6 + select BIG_ENDIAN + select PCI_SUPPORT + config LINUX_2_6_RB532 bool "Mikrotik RB532 [2.6]" select mipsel @@ -91,16 +107,6 @@ config LINUX_2_6_UML help Build uml targetted images - -config LINUX_2_6_AU1000 - bool "AMD Alchemy AUxx [2.6]" - select mipsel - select LINUX_2_6 - select PCI_SUPPORT - help - Build firmware for AMD Alchemy 1500 boards - (e.g. 4G-Systems Mesh/Access Cube ...) - if DEVEL config LINUX_2_6_ARM @@ -109,13 +115,6 @@ config LINUX_2_6_ARM select LINUX_2_6 select arm -config LINUX_2_6_ARMEB - bool "UNSUPPORTED big-endian arm platform" - depends BROKEN - select LINUX_2_6 - select BIG_ENDIAN - select armeb - config LINUX_2_6_CRIS bool "UNSUPPORTED cris platform" depends BROKEN diff --git a/openwrt/target/image/xscale/Makefile b/openwrt/target/image/xscale/Makefile index 52c15a93d00..23a06443383 100644 --- a/openwrt/target/image/xscale/Makefile +++ b/openwrt/target/image/xscale/Makefile @@ -7,11 +7,26 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +define Build/Clean +endef + +define Image/Prepare +endef + +define Image/BuildKernel + cp $(LINUX_DIR)/arch/arm/boot/zImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-zImage +endef + define Image/Build -ifneq ($(FS),jffs2-64k) - cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img - cp $(KDIR)/vmlinux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz -endif + $(call Image/Build/$(1),$(1)) +endef + +define Image/Build/jffs2-64k + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img bs=65536 conv=sync +endef + +define Image/Build/jffs2-128k + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img bs=131072 conv=sync endef $(eval $(call BuildImage)) diff --git a/openwrt/target/linux/xscale-2.6/config b/openwrt/target/linux/xscale-2.6/config index ebbca2f9280..9b33d6016c7 100644 --- a/openwrt/target/linux/xscale-2.6/config +++ b/openwrt/target/linux/xscale-2.6/config @@ -1,12 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.4 -# Mon Apr 17 16:00:49 2006 +# Linux kernel version: 2.6.17 +# Sun Aug 6 11:18:40 2006 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_VECTORS_BASE=0xffff0000 # # Code maturity level options @@ -28,6 +30,7 @@ CONFIG_BSD_PROCESS_ACCT=y CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_UID16=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -41,10 +44,6 @@ CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y # CONFIG_SHMEM is not set -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y CONFIG_TINY_SHMEM=y CONFIG_BASE_SMALL=0 @@ -57,7 +56,6 @@ CONFIG_OBSOLETE_INTERMODULE=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set @@ -65,11 +63,12 @@ CONFIG_OBSOLETE_MODPARM=y # # Block layer # +# CONFIG_BLK_DEV_IO_TRACE is not set # # IO Schedulers # -# CONFIG_IOSCHED_NOOP is not set +CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set @@ -86,11 +85,13 @@ CONFIG_DEFAULT_IOSCHED="deadline" # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set CONFIG_ARCH_IXP4XX=y # CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -128,6 +129,7 @@ CONFIG_MACH_GATEWAY7001=y # # IXP4xx Options # +CONFIG_DMABOUNCE=y # CONFIG_IXP4XX_INDIRECT_PCI is not set # @@ -146,13 +148,11 @@ CONFIG_CPU_TLB_V4WBI=y # CONFIG_ARM_THUMB is not set CONFIG_CPU_BIG_ENDIAN=y CONFIG_XSCALE_PMU=y -CONFIG_DMABOUNCE=y # # Bus support # CONFIG_PCI=y -CONFIG_PCI_LEGACY_PROC=y # # PCCARD (PCMCIA/CardBus) support @@ -164,6 +164,7 @@ CONFIG_PCI_LEGACY_PROC=y # # CONFIG_PREEMPT is not set # CONFIG_NO_IDLE_HZ is not set +CONFIG_HZ=100 # CONFIG_AEABI is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set CONFIG_SELECT_MEMORY_MODEL=y @@ -181,7 +182,7 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,115200" +CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 noinitrd console=ttyS0,115200" # CONFIG_XIP_KERNEL is not set # @@ -221,14 +222,10 @@ CONFIG_NET=y CONFIG_PACKET=m CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_ASK_IP_FIB_HASH is not set -# CONFIG_IP_FIB_TRIE is not set CONFIG_IP_FIB_HASH=y # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set @@ -243,7 +240,8 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -CONFIG_INET_TUNNEL=m +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m CONFIG_TCP_CONG_ADVANCED=y @@ -266,9 +264,11 @@ CONFIG_TCP_CONG_VEGAS=m # CONFIG_IP_VS is not set CONFIG_IPV6=m # CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_INET6_AH is not set # CONFIG_INET6_ESP is not set # CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set # CONFIG_IPV6_TUNNEL is not set CONFIG_NETFILTER=y @@ -291,11 +291,13 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=y CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m # CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m # CONFIG_NETFILTER_XT_MATCH_LENGTH is not set CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m # CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set # CONFIG_NETFILTER_XT_MATCH_REALM is not set @@ -318,25 +320,24 @@ CONFIG_IP_NF_IRC=y # CONFIG_IP_NF_TFTP is not set # CONFIG_IP_NF_AMANDA is not set # CONFIG_IP_NF_PPTP is not set +CONFIG_IP_NF_H323=m CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_LAYER7=m -# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_TOS=m # CONFIG_IP_NF_MATCH_TIME is not set # CONFIG_IP_NF_MATCH_RECENT is not set # CONFIG_IP_NF_MATCH_ECN is not set # CONFIG_IP_NF_MATCH_DSCP is not set -# CONFIG_IP_NF_MATCH_AH_ESP is not set +CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_MATCH_HASHLIMIT is not set -# CONFIG_IP_NF_MATCH_POLICY is not set +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_IMQ=m @@ -352,6 +353,7 @@ CONFIG_IP_NF_TARGET_REDIRECT=m # CONFIG_IP_NF_NAT_SNMP_BASIC is not set CONFIG_IP_NF_NAT_IRC=y CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m @@ -372,12 +374,10 @@ CONFIG_IP6_NF_IPTABLES=m # CONFIG_IP6_NF_MATCH_OPTS is not set # CONFIG_IP6_NF_MATCH_FRAG is not set # CONFIG_IP6_NF_MATCH_HL is not set -# CONFIG_IP6_NF_MATCH_MULTIPORT is not set # CONFIG_IP6_NF_MATCH_OWNER is not set # CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -# CONFIG_IP6_NF_MATCH_AHESP is not set +CONFIG_IP6_NF_MATCH_AH=m # CONFIG_IP6_NF_MATCH_EUI64 is not set -# CONFIG_IP6_NF_MATCH_POLICY is not set CONFIG_IP6_NF_FILTER=m # CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m @@ -407,6 +407,7 @@ CONFIG_IP6_NF_TARGET_REJECT=m CONFIG_BRIDGE=y CONFIG_VLAN_8021Q=y # CONFIG_DECNET is not set +CONFIG_LLC=y # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -473,6 +474,8 @@ CONFIG_IEEE80211=m CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_CRYPT_TKIP=m +# CONFIG_IEEE80211_SOFTMAC is not set +CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -557,7 +560,6 @@ CONFIG_MTD_IXP4XX=y # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set # CONFIG_MTD_BLOCK2MTD is not set # @@ -600,7 +602,7 @@ CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 +# CONFIG_BLK_DEV_INITRD is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -664,7 +666,6 @@ CONFIG_BLK_DEV_SD=m # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -792,6 +793,7 @@ CONFIG_NET_PCI=y # Wireless LAN (non-hamradio) # CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y # # Obsolete Wireless cards support (pre-802.11) @@ -805,6 +807,8 @@ CONFIG_IPW2100=m CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +# CONFIG_IPW_QOS is not set # CONFIG_IPW2200_DEBUG is not set # CONFIG_HERMES is not set # CONFIG_ATMEL is not set @@ -877,6 +881,7 @@ CONFIG_DLCI_MAX=8 # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_PCI is not set CONFIG_SERIAL_8250_NR_UARTS=2 CONFIG_SERIAL_8250_RUNTIME_UARTS=2 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -919,7 +924,6 @@ CONFIG_IXP4XX_WATCHDOG=y # # CONFIG_USBPCWATCHDOG is not set # CONFIG_NVRAM is not set -# CONFIG_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -965,18 +969,29 @@ CONFIG_HWMON=y # # -# Multimedia Capabilities Port drivers +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers # # # Multimedia devices # # CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set # # Graphics support @@ -993,6 +1008,7 @@ CONFIG_HWMON=y # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=m # CONFIG_USB_DEBUG is not set @@ -1057,15 +1073,6 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - # # USB Network Adapters # @@ -1118,6 +1125,12 @@ CONFIG_USB_STORAGE=m # # CONFIG_MMC is not set +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + # # File systems # @@ -1174,7 +1187,6 @@ CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1310,7 +1322,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y +# CONFIG_UNWIND_INFO is not set # CONFIG_DEBUG_USER is not set # diff --git a/openwrt/target/linux/xscale-2.6/patches/001-gateway_7001.patch b/openwrt/target/linux/xscale-2.6/patches/001-gateway_7001.patch index 89426790008..d144758b24b 100644 --- a/openwrt/target/linux/xscale-2.6/patches/001-gateway_7001.patch +++ b/openwrt/target/linux/xscale-2.6/patches/001-gateway_7001.patch @@ -1,6 +1,6 @@ -diff -Nur linux-2.6.16.4/arch/arm/boot/compressed/head-xscale.S linux-2.6.16.4-owrt/arch/arm/boot/compressed/head-xscale.S ---- linux-2.6.16.4/arch/arm/boot/compressed/head-xscale.S 2006-04-11 19:19:28.000000000 +0200 -+++ linux-2.6.16.4-owrt/arch/arm/boot/compressed/head-xscale.S 2006-04-16 16:51:05.000000000 +0200 +diff -Nur linux-2.6.17/arch/arm/boot/compressed/head-xscale.S linux-2.6.17-owrt/arch/arm/boot/compressed/head-xscale.S +--- linux-2.6.17/arch/arm/boot/compressed/head-xscale.S 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/arm/boot/compressed/head-xscale.S 2006-08-05 17:02:21.000000000 +0200 @@ -47,6 +47,11 @@ orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00) #endif @@ -13,9 +13,44 @@ diff -Nur linux-2.6.16.4/arch/arm/boot/compressed/head-xscale.S linux-2.6.16.4-o #ifdef CONFIG_ARCH_IXP2000 mov r1, #-1 mov r0, #0xd6000000 -diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c ---- linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-pci.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c 2006-04-17 19:21:55.000000000 +0200 +diff -Nur linux-2.6.17/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.17-owrt/arch/arm/mach-ixp4xx/coyote-setup.c +--- linux-2.6.17/arch/arm/mach-ixp4xx/coyote-setup.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/arm/mach-ixp4xx/coyote-setup.c 2006-08-05 17:02:21.000000000 +0200 +@@ -1,9 +1,10 @@ + /* + * arch/arm/mach-ixp4xx/coyote-setup.c + * +- * Board setup for ADI Engineering and IXDGP425 boards ++ * Board setup for ADI Engineering, IXDGP425 and Gateway 7001 boards + * + * Copyright (C) 2003-2005 MontaVista Software, Inc. ++ * Copyright (C) 2006 Imre Kaloz <Kaloz@openwrt.org> + * + * Author: Deepak Saxena <dsaxena@plexity.net> + */ +@@ -111,6 +112,19 @@ + MACHINE_END + #endif + ++#ifdef CONFIG_MACH_GATEWAY7001 ++MACHINE_START(GATEWAY7001, "Gateway 7001") ++ /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ ++ .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, ++ .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, ++ .map_io = ixp4xx_map_io, ++ .init_irq = ixp4xx_init_irq, ++ .timer = &ixp4xx_timer, ++ .boot_params = 0x0100, ++ .init_machine = coyote_init, ++MACHINE_END ++#endif ++ + /* + * IXDPG425 is identical to Coyote except for which serial port + * is connected. +diff -Nur linux-2.6.17/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.17-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c +--- linux-2.6.17/arch/arm/mach-ixp4xx/gateway7001-pci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c 2006-08-06 10:37:35.000000000 +0200 @@ -0,0 +1,67 @@ +/* + * arch/arch/mach-ixp4xx/gateway7001-pci.c @@ -84,15 +119,16 @@ diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.16.4-o +} + +subsys_initcall(gateway7001_pci_init); -diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/Kconfig linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Kconfig ---- linux-2.6.16.4/arch/arm/mach-ixp4xx/Kconfig 2006-04-11 19:19:28.000000000 +0200 -+++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Kconfig 2006-04-16 15:58:37.000000000 +0200 -@@ -30,6 +30,13 @@ +diff -Nur linux-2.6.17/arch/arm/mach-ixp4xx/Kconfig linux-2.6.17-owrt/arch/arm/mach-ixp4xx/Kconfig +--- linux-2.6.17/arch/arm/mach-ixp4xx/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/arm/mach-ixp4xx/Kconfig 2006-08-05 17:04:13.000000000 +0200 +@@ -33,6 +33,14 @@ Engineering Coyote Gateway Reference Platform. For more information on this platform, see <file:Documentation/arm/IXP4xx>. +config MACH_GATEWAY7001 + bool "Gateway 7001" ++ select PCI + help + Say 'Y' here if you want your kernel to support Gateway's + 7001 Access Point. For more information on this platform, @@ -100,60 +136,28 @@ diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/Kconfig linux-2.6.16.4-owrt/arch/a + config ARCH_IXDP425 bool "IXDP425" - help -diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/Makefile linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Makefile ---- linux-2.6.16.4/arch/arm/mach-ixp4xx/Makefile 2006-04-11 19:19:28.000000000 +0200 -+++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Makefile 2006-04-16 16:03:42.000000000 +0200 -@@ -10,4 +10,5 @@ + select PCI +diff -Nur linux-2.6.17/arch/arm/mach-ixp4xx/Makefile linux-2.6.17-owrt/arch/arm/mach-ixp4xx/Makefile +--- linux-2.6.17/arch/arm/mach-ixp4xx/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/arm/mach-ixp4xx/Makefile 2006-08-05 17:02:21.000000000 +0200 +@@ -11,4 +11,5 @@ obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o obj-$(CONFIG_MACH_NAS100D) += nas100d-pci.o nas100d-setup.o nas100d-power.o +obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o coyote-setup.o -diff -Nur linux-2.6.16.4/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/uncompress.h ---- linux-2.6.16.4/include/asm-arm/arch-ixp4xx/uncompress.h 2006-04-11 19:19:28.000000000 +0200 -+++ linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2006-04-16 16:25:34.000000000 +0200 -@@ -48,7 +48,7 @@ +diff -Nur linux-2.6.17/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.17-owrt/include/asm-arm/arch-ixp4xx/uncompress.h +--- linux-2.6.17/include/asm-arm/arch-ixp4xx/uncompress.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2006-08-05 17:03:32.000000000 +0200 +@@ -38,9 +38,9 @@ + static __inline__ void __arch_decomp_setup(unsigned long arch_id) + { /* - * Coyote and gtwx5715 only have UART2 connected +- * Coyote and gtwx5715 only have UART2 connected ++ * Some targets only have UART2 connected */ - if (machine_is_adi_coyote() || machine_is_gtwx5715()) + if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001()) uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; else uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS; -diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/coyote-setup.c ---- linux-2.6.16.4/arch/arm/mach-ixp4xx/coyote-setup.c 2006-04-11 19:19:28.000000000 +0200 -+++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/coyote-setup.c 2006-04-16 16:03:23.000000000 +0200 -@@ -1,9 +1,10 @@ - /* - * arch/arm/mach-ixp4xx/coyote-setup.c - * -- * Board setup for ADI Engineering and IXDGP425 boards -+ * Board setup for ADI Engineering, IXDGP425 and Gateway 7001 boards - * - * Copyright (C) 2003-2005 MontaVista Software, Inc. -+ * Copyright (C) 2006 Imre Kaloz <Kaloz@openwrt.org> - * - * Author: Deepak Saxena <dsaxena@plexity.net> - */ -@@ -111,6 +112,19 @@ - MACHINE_END - #endif - -+#ifdef CONFIG_MACH_GATEWAY7001 -+MACHINE_START(GATEWAY7001, "Gateway 7001") -+ /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ -+ .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, -+ .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, -+ .map_io = ixp4xx_map_io, -+ .init_irq = ixp4xx_init_irq, -+ .timer = &ixp4xx_timer, -+ .boot_params = 0x0100, -+ .init_machine = coyote_init, -+MACHINE_END -+#endif -+ - /* - * IXDPG425 is identical to Coyote except for which serial port - * is connected. diff --git a/openwrt/toolchain/Config.in b/openwrt/toolchain/Config.in index 5720beb8b0d..37af938b3b7 100644 --- a/openwrt/toolchain/Config.in +++ b/openwrt/toolchain/Config.in @@ -46,6 +46,7 @@ config TARGET_OPTIMIZATION prompt "Target Optimizations" if TOOLCHAINOPTS default "-Os -pipe -march=i486 -funit-at-a-time" if i386 default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" if mipsel || mips + default "-Os -pipe -mcpu=xscale -funit-at-a-time" if armeb default "-Os -pipe -funit-at-a-time" help Optimizations to use when building for the target host. diff --git a/openwrt/toolchain/gcc/Config.version b/openwrt/toolchain/gcc/Config.version index 877e6388fd6..41aa2fb050b 100644 --- a/openwrt/toolchain/gcc/Config.version +++ b/openwrt/toolchain/gcc/Config.version @@ -15,6 +15,8 @@ if !TOOLCHAINOPTS default y if LINUX_2_4_BRCM config GCC_VERSION_4_1_1 default y if LINUX_2_6_ARUBA + config GCC_VERSION_4_0_3 + default y if LINUX_2_6_XSCALE endif diff --git a/openwrt/toolchain/gcc/patches/4.0.3/800-arm-bigendian.patch b/openwrt/toolchain/gcc/patches/4.0.3/800-arm-bigendian.patch new file mode 100644 index 00000000000..307aea3ea33 --- /dev/null +++ b/openwrt/toolchain/gcc/patches/4.0.3/800-arm-bigendian.patch @@ -0,0 +1,67 @@ +By Lennert Buytenhek <buytenh@wantstofly.org> +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +--- gcc-4.0.3/gcc/config/arm/linux-elf.h ++++ gcc-4.0.3/gcc/config/arm/linux-elf.h +@@ -31,19 +31,33 @@ + /* Do not assume anything about header files. */ + #define NO_IMPLICIT_EXTERN_C + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + #undef TARGET_DEFAULT_FLOAT_ABI + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (0) ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } + + /* The GNU C++ standard library requires that these macros be defined. */ + #undef CPLUSPLUS_CPP_SPEC +@@ -90,7 +104,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + + #define TARGET_OS_CPP_BUILTINS() \ +--- gcc-4.0.3/gcc/config.gcc ++++ gcc-4.0.3/gcc/config.gcc +@@ -672,6 +672,11 @@ + ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" ++ case $target in ++ arm*b-*) ++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines" ++ ;; ++ esac + tmake_file="${tmake_file} arm/t-arm arm/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + gnu_ld=yes diff --git a/openwrt/toolchain/kernel-headers/files/config.arm b/openwrt/toolchain/kernel-headers/files/config.arm new file mode 100644 index 00000000000..fc7630a1ac1 --- /dev/null +++ b/openwrt/toolchain/kernel-headers/files/config.arm @@ -0,0 +1,778 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_ARM=y +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +# CONFIG_GENERIC_BUST_SPINLOCK is not set +# CONFIG_GENERIC_ISA_DMA is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_OBSOLETE is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +# CONFIG_KMOD is not set + +# +# System Type +# +# CONFIG_ARCH_ANAKIN is not set +# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +CONFIG_ARCH_INTEGRATOR=y +# CONFIG_ARCH_OMAHA is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_MX1ADS is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_RISCSTATION is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_AT91RM9200 is not set + +# +# Archimedes/A5000 Implementations +# + +# +# Archimedes/A5000 Implementations (select only ONE) +# +# CONFIG_ARCH_ARC is not set +# CONFIG_ARCH_A5K is not set + +# +# Footbridge Implementations +# +# CONFIG_ARCH_CATS is not set +# CONFIG_ARCH_PERSONAL_SERVER is not set +# CONFIG_ARCH_EBSA285_ADDIN is not set +# CONFIG_ARCH_EBSA285_HOST is not set +# CONFIG_ARCH_NETWINDER is not set + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ACCELENT is not set +# CONFIG_SA1100_ASSABET is not set +# CONFIG_ASSABET_NEPONSET is not set +# CONFIG_SA1100_ADSAGC is not set +# CONFIG_SA1100_ADSBITSY is not set +# CONFIG_SA1100_ADSBITSYPLUS is not set +# CONFIG_SA1100_BRUTUS is not set +# CONFIG_SA1100_CEP is not set +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_H3XXX is not set +# CONFIG_H3600_SLEEVE is not set +# CONFIG_SA1100_EXTENEX1 is not set +# CONFIG_SA1100_FLEXANET is not set +# CONFIG_SA1100_FREEBIRD is not set +# CONFIG_SA1100_FRODO is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set +# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_HACKKIT is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HUW_WEBPANEL is not set +# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_LART is not set +# CONFIG_SA1100_NANOENGINE is not set +# CONFIG_SA1100_OMNIMETER is not set +# CONFIG_SA1100_PANGOLIN is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SHERMAN is not set +# CONFIG_SA1100_SIMPAD is not set +# CONFIG_SA1100_SIMPUTER is not set +# CONFIG_SA1100_PFS168 is not set +# CONFIG_SA1100_VICTOR is not set +# CONFIG_SA1100_XP860 is not set +# CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_USB_NETLINK is not set +# CONFIG_SA1100_USB_CHAR is not set +# CONFIG_SA1100_SSP is not set + +# +# AT91RM9200 Implementations +# +# CONFIG_ARCH_AT91RM9200DK is not set + +# +# CLPS711X/EP721X Implementations +# +# CONFIG_ARCH_AUTCPU12 is not set +# CONFIG_ARCH_CDB89712 is not set +# CONFIG_ARCH_CLEP7312 is not set +# CONFIG_ARCH_EDB7211 is not set +# CONFIG_ARCH_FORTUNET is not set +# CONFIG_ARCH_GUIDEA07 is not set +# CONFIG_ARCH_P720T is not set +# CONFIG_ARCH_EP7211 is not set +# CONFIG_ARCH_EP7212 is not set +# CONFIG_ARCH_ACORN is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_FOOTBRIDGE_HOST is not set +# CONFIG_FOOTBRIDGE_ADDIN is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set +# CONFIG_CPU_ARM610 is not set +# CONFIG_CPU_ARM710 is not set +# CONFIG_CPU_ARM720T is not set +# CONFIG_CPU_ARM920T is not set +# CONFIG_CPU_ARM922T is not set +# CONFIG_PLD is not set +# CONFIG_CPU_ARM926T is not set +# CONFIG_CPU_ARM1020 is not set +# CONFIG_CPU_ARM1026 is not set +# CONFIG_CPU_SA110 is not set +# CONFIG_CPU_SA1100 is not set +# CONFIG_CPU_32v3 is not set +CONFIG_CPU_32v4=y + +# +# Processor Features +# +# CONFIG_DISCONTIGMEM is not set + +# +# General setup +# +CONFIG_PCI_INTEGRATOR=y +CONFIG_PCI=y +# CONFIG_ISA is not set +# CONFIG_ISA_DMA is not set +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +# CONFIG_CPU_FREQ is not set +CONFIG_PCI_NAMES=y +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y + +# +# At least one math emulation must be selected +# +# CONFIG_FPE_NWFPE is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +CONFIG_BINFMT_AOUT=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_PM is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=1f04 mem=32M" +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_PARTITIONS is not set +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_AMDSTD is not set +# CONFIG_MTD_SHARP is not set +# CONFIG_MTD_JEDEC is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_NORA is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_CDB89712 is not set +# CONFIG_MTD_SA1100 is not set +# CONFIG_MTD_DC21285 is not set +# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_EPXA10DB is not set +# CONFIG_MTD_FORTUNET is not set +# CONFIG_MTD_AUTCPU12 is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_IMPA7 is not set +# CONFIG_MTD_CEIVA is not set +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PCMCIA is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC1000 is not set +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOCPROBE is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_CISS_MONITOR_THREAD is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_BLK_STATS is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Networking options +# +# CONFIG_PACKET is not set +# CONFIG_NETLINK_DEV is not set +# CONFIG_NETFILTER is not set +# CONFIG_FILTER is not set +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set + +# +# +# +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +# CONFIG_ARM_AM79C961A is not set +# CONFIG_ARM_CIRRUS is not set +# CONFIG_SUNLANCE is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNBMAC is not set +# CONFIG_SUNQE is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_APRICOT is not set +# CONFIG_B44 is not set +# CONFIG_CS89x0 is not set +CONFIG_TULIP=y +# CONFIG_TULIP_MWI is not set +# CONFIG_TULIP_MMIO is not set +# CONFIG_DE4X5 is not set +# CONFIG_DGRS is not set +# CONFIG_DM9102 is not set +CONFIG_EEPRO100=y +# CONFIG_EEPRO100_PIO is not set +# CONFIG_E100 is not set +# CONFIG_LNE390 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_FORCEDETH is not set +# CONFIG_NE3210 is not set +# CONFIG_ES3210 is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_8139TOO_PIO is not set +# CONFIG_8139TOO_TUNE_TWISTER is not set +# CONFIG_8139TOO_8129 is not set +# CONFIG_8139_OLD_RX_RESET is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_SUNDANCE_MMIO is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_RHINE_MMIO is not set +# CONFIG_WINBOND_840 is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_MYRI_SBUS is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_NET_FC is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set +# CONFIG_I2O_PCI is not set +# CONFIG_I2O_BLOCK is not set +# CONFIG_I2O_LAN is not set +# CONFIG_I2O_SCSI is not set +# CONFIG_I2O_PROC is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input core support +# +# CONFIG_INPUT is not set +# CONFIG_INPUT_KEYBDEV is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_UINPUT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +CONFIG_MOUSE=y +CONFIG_PSMOUSE=y +# CONFIG_82C710_MOUSE is not set +# CONFIG_PC110_PAD is not set +# CONFIG_MK712_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set + +# +# Input core support is needed for gameports +# + +# +# Input core support is needed for joysticks +# +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_SCx200 is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set + +# +# Direct Rendering Manager (XFree86 DRI support) +# +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set +CONFIG_RAMFS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +CONFIG_ROMFS_FS=y +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_XFS_FS is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_TRACE is not set +# CONFIG_XFS_DEBUG is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +# CONFIG_MSDOS_PARTITION is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_SMB_NLS is not set +# CONFIG_NLS is not set + +# +# Console drivers +# +CONFIG_KMI_KEYB=y +CONFIG_KMI_MOUSE=y +CONFIG_PC_KEYMAP=y +CONFIG_VGA_CONSOLE=y + +# +# Frame-buffer support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Misc devices +# + +# +# USB support +# +# CONFIG_USB is not set + +# +# Support for USB gadgets +# +# CONFIG_USB_GADGET is not set + +# +# Bluetooth support +# +# CONFIG_BLUEZ is not set + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_NO_PGT_CACHE is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_DEBUG_DC21285_PORT is not set +# CONFIG_DEBUG_CLPS711X_UART2 is not set +CONFIG_LOG_BUF_SHIFT=0 + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +# CONFIG_ZLIB_INFLATE is not set +# CONFIG_ZLIB_DEFLATE is not set diff --git a/openwrt/toolchain/uClibc/config/armeb b/openwrt/toolchain/uClibc/config/armeb new file mode 100644 index 00000000000..ad01dc6ccdf --- /dev/null +++ b/openwrt/toolchain/uClibc/config/armeb @@ -0,0 +1,168 @@ +# +# Automatically generated make config: don't edit +# +# TARGET_alpha is not set +TARGET_arm=y +# TARGET_bfin is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_x86_64 is not set + +# +# Target Architecture Features and Options +# +HAVE_ELF=y +ARCH_SUPPORTS_LITTLE_ENDIAN=y +TARGET_ARCH="arm" +ARCH_SUPPORTS_BIG_ENDIAN=y +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM1136JF_S is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +CONFIG_ARM_XSCALE=y +# ARCH_LITTLE_ENDIAN is not set +ARCH_BIG_ENDIAN=y +# ARCH_HAS_NO_MMU is not set +ARCH_HAS_MMU=y +UCLIBC_HAS_FLOATS=y +# HAS_FPU is not set +UCLIBC_HAS_SOFT_FLOAT=y +# DO_C99_MATH is not set +KERNEL_SOURCE="./toolchain_build_armeb/linux" +C_SYMBOL_PREFIX="" +HAVE_DOT_CONFIG=y + +# +# General Library Settings +# +# HAVE_NO_PIC is not set +DOPIC=y +# HAVE_NO_SHARED is not set +HAVE_SHARED=y +# ARCH_HAS_NO_LDSO is not set +BUILD_UCLIBC_LDSO=y +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +LDSO_LDD_SUPPORT=y +LDSO_CACHE_SUPPORT=y +# LDSO_PRELOAD_FILE_SUPPORT is not set +LDSO_BASE_FILENAME="ld.so" +# LDSO_RUNPATH is not set +# DL_FINI_CRT_COMPAT is not set +UCLIBC_CTOR_DTOR=y +# HAS_NO_THREADS is not set +UCLIBC_HAS_THREADS=y +# PTHREADS_DEBUG_SUPPORT is not set +UCLIBC_HAS_LFS=y +# UCLIBC_STATIC_LDCONFIG is not set +# MALLOC is not set +# MALLOC_SIMPLE is not set +MALLOC_STANDARD=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_DYNAMIC_ATEXIT=y +HAS_SHADOW=y +# UNIX98PTY_ONLY is not set +ASSUME_DEVPTS=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_TZ_FILE_PATH="/etc/TZ" + +# +# Networking Support +# +UCLIBC_HAS_IPV6=y +UCLIBC_HAS_RPC=y +UCLIBC_HAS_FULL_RPC=y + +# +# String and Stdio Support +# +UCLIBC_HAS_STRING_GENERIC_OPT=y +UCLIBC_HAS_STRING_ARCH_OPT=y +UCLIBC_HAS_CTYPE_TABLES=y +UCLIBC_HAS_CTYPE_SIGNED=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set +UCLIBC_HAS_WCHAR=y +# UCLIBC_HAS_LOCALE is not set +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +UCLIBC_HAS_STDIO_BUFSIZ_4096=y +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set +UCLIBC_HAS_STDIO_GETC_MACRO=y +UCLIBC_HAS_STDIO_PUTC_MACRO=y +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_SYS_ERRLIST is not set +UCLIBC_HAS_SIGNUM_MESSAGES=y +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_GNU_GETOPT=y + +# +# Big and Tall +# +UCLIBC_HAS_REGEX=y +# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_FTW=y +UCLIBC_HAS_GLOB=y + +# +# Library Installation Options +# +SHARED_LIB_LOADER_PREFIX="/lib" +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" + +# +# uClibc security related options +# +# UCLIBC_SECURITY is not set + +# +# uClibc development/debugging options +# +CROSS_COMPILER_PREFIX="" +# DODEBUG is not set +# DODEBUG_PT is not set +# DOASSERTS is not set +# SUPPORT_LD_DEBUG is not set +# SUPPORT_LD_DEBUG_EARLY is not set +WARNINGS="-Wall" +# UCLIBC_MJN3_ONLY is not set From b05b26b9da838fab0c411284afb448ac8c87ffb7 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Mon, 7 Aug 2006 13:31:41 +0000 Subject: [PATCH 447/757] Add ieee80211softmac modules, bcm43xx, ipw2100/2200 from the kernel SVN-Revision: 4508 --- openwrt/package/kernel/modules.mk | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index a0a402e18bf..d688a56a13c 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -63,6 +63,65 @@ AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old) endef $(eval $(call KernelPackage,ide-pdc202xx)) +define KernelPackage/ieee80211softmac +TITLE:=802.11 Networking stack +DESCRIPTION:=802.11 Networking stack\\\ +Includes: \\\ + * ieee80211_crypt \\\ + * ieee80211 \\\ + * ieee80211_crypt_wep \\\ + * ieee80211_crypt_tkip \\\ + * ieee80211_crytp_ccmp \\\ + * ieee80211softmac\\\ +KCONFIG:=$(CONFIG_IEEE80211SOFTMAC) +FILES:=$(MODULES_DIR)/kernel/net/ieee80211/*.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/net/ieee80211/softmac/*.$(LINUX_KMOD_SUFFIX) +AUTOLOAD:=$(call AutoLoad,10,ieee80211_crypt \ + ieee80211 \ + ieee80211_crypt_wep \ + ieee80211_crypt_tkip \ + ieee80211_crypt_ccmp \ + ieee80211softmac) +endef +$(eval $(call KernelPackage,ieee80211softmac)) + +WIMENU:=Wireless drivers + +define KernelPackage/bcm43xx +TITLE:=Broadcom BCM43xx driver +DESCRIPTION:=Open source BCM43xx driver\\\ +Includes: \\\ + * bcm43xx +KCONFIG:=$(CONFIG_BCM43XX) +SUBMENU:=$(WIMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/bcm43xx/bcm43xx.$(LINUX_KMOD_SUFFIX) +AUTOLOAD:=$(call Autoload,50,bcm43xx) +endef +$(eval $(call KernelPackage,bcm43xx)) + +define KernelPackage/ipw2100 +TITLE:=Intel IPw2100 driver +DESCRIPTION:=Intel IPW2100 driver\\\ +Includes: \\\ + * ipw2100 +KCONFIG:=$(CONFIG_IPW2100) +SUBMENU:=$(WIMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/ipw2100.$(LINUX_KMOD_SUFFIX) +AUTOLOAD:=$(call Autoload,50,ipw2100) +endef +$(eval $(call KernelPackage,ipw2100)) + +define KernelPackage/ipw2200 +TITLE:=Intel IPw2200 driver +DESCRIPTION:=Intel IPW2200 driver\\\ +Includes: \\\ + * ipw2200 +KCONFIG:=$(CONFIG_IPW2200) +SUBMENU:=$(WIMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/ipw2200.$(LINUX_KMOD_SUFFIX) +AUTOLOAD:=$(call Autoload,50,ipw2200) +endef +$(eval $(call KernelPackage,ipw2200)) + NFMENU:=Netfilter Extensions define KernelPackage/ipt-conntrack From 370d050db55044789e99172b52a6c7e8e3f185bd Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 7 Aug 2006 21:34:12 +0000 Subject: [PATCH 448/757] fix typo SVN-Revision: 4512 --- openwrt/package/kernel/modules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index d688a56a13c..c3514ade15b 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -72,8 +72,8 @@ Includes: \\\ * ieee80211_crypt_wep \\\ * ieee80211_crypt_tkip \\\ * ieee80211_crytp_ccmp \\\ - * ieee80211softmac\\\ -KCONFIG:=$(CONFIG_IEEE80211SOFTMAC) + * ieee80211softmac +KCONFIG:=$(CONFIG_IEEE80211_SOFTMAC) FILES:=$(MODULES_DIR)/kernel/net/ieee80211/*.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/net/ieee80211/softmac/*.$(LINUX_KMOD_SUFFIX) AUTOLOAD:=$(call AutoLoad,10,ieee80211_crypt \ ieee80211 \ From a2c397a8c243557e5134579e14b2404656fce93f Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 8 Aug 2006 07:57:58 +0000 Subject: [PATCH 449/757] increase the size of a few static buffers in menuconfig - fixes display of menus with lots of packages SVN-Revision: 4517 --- openwrt/scripts/config/mconf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openwrt/scripts/config/mconf.c b/openwrt/scripts/config/mconf.c index 5caf82280de..b3709fe80d4 100644 --- a/openwrt/scripts/config/mconf.c +++ b/openwrt/scripts/config/mconf.c @@ -22,6 +22,7 @@ #include <unistd.h> #include <locale.h> +#define BUFSIZE 32768 #define LKC_DIRECT_LINK #include "lkc.h" @@ -254,10 +255,10 @@ search_help[] = N_( " USB$ => find all CONFIG_ symbols ending with USB\n" "\n"); -static char buf[4096], *bufptr = buf; -static char input_buf[4096]; +static char buf[BUFSIZE], *bufptr = buf; +static char input_buf[BUFSIZE]; static char filename[PATH_MAX+1] = ".config"; -static char *args[1024], **argptr = args; +static char *args[BUFSIZE], **argptr = args; static int indent; static struct termios ios_org; static int rows = 0, cols = 0; From e3d5ff791fab282271bd090326fd5b16853e351d Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Tue, 8 Aug 2006 10:24:39 +0000 Subject: [PATCH 450/757] enable ext2 rootfs by default when target is uml-2.6 SVN-Revision: 4527 --- openwrt/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Config.in b/openwrt/Config.in index edcb19a4f5c..caa79447993 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -88,7 +88,7 @@ menu "Target Images" config TARGET_ROOTFS_EXT2FS bool "ext2" - default n + default y if LINUX_2_6_UML depends !TARGET_ROOTFS_INITRAMFS help Ext2 file system with some free space for uml images From 7a0d8ca5b4a49e2e4deaaa6d7bec4a3868613cfd Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Tue, 8 Aug 2006 10:27:25 +0000 Subject: [PATCH 451/757] update busybox to v1.2.1 SVN-Revision: 4528 --- openwrt/package/busybox/Makefile | 4 +- openwrt/package/busybox/config/Config.in | 146 +- .../package/busybox/config/archival/Config.in | 40 +- .../busybox/config/console-tools/Config.in | 13 + .../busybox/config/coreutils/Config.in | 154 +- .../busybox/config/debianutils/Config.in | 25 +- .../package/busybox/config/editors/Config.in | 30 +- .../busybox/config/findutils/Config.in | 40 +- openwrt/package/busybox/config/init/Config.in | 23 +- .../busybox/config/loginutils/Config.in | 6 +- .../busybox/config/miscutils/Config.in | 68 +- .../package/busybox/config/modutils/Config.in | 8 +- .../busybox/config/networking/Config.in | 315 ++-- .../busybox/config/networking/udhcp/Config.in | 12 +- .../package/busybox/config/procps/Config.in | 8 +- .../package/busybox/config/shell/Config.in | 70 +- .../package/busybox/config/sysklogd/Config.in | 10 +- .../busybox/config/util-linux/Config.in | 81 +- .../busybox/patches/100-killall5.patch | 48 +- .../package/busybox/patches/110-telnetd.patch | 34 +- .../busybox/patches/150-udhcp-release.patch | 42 +- .../package/busybox/patches/300-netmsg.patch | 50 +- .../patches/320-httpd_address_binding.patch | 86 +- .../busybox/patches/340-lock_util.patch | 66 +- .../package/busybox/patches/911-ipkg.patch | 1422 +++++++++-------- .../patches/912-ipkg-no_warnings.patch | 4 + .../busybox/patches/913-libbb_hash.patch | 110 +- .../busybox/patches/914-ipkg-fixes.patch | 4 + 28 files changed, 1609 insertions(+), 1310 deletions(-) diff --git a/openwrt/package/busybox/Makefile b/openwrt/package/busybox/Makefile index 6a359688a56..6e9cf4194a4 100644 --- a/openwrt/package/busybox/Makefile +++ b/openwrt/package/busybox/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.1.3 +PKG_VERSION:=1.2.1 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads -PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7 +PKG_MD5SUM:=362b3dc0f2023ddfda901dc1f1a74391 PKG_CAT:=bzcat include $(INCLUDE_DIR)/package.mk diff --git a/openwrt/package/busybox/config/Config.in b/openwrt/package/busybox/config/Config.in index eedb4ba4076..6a5d6a74d1d 100644 --- a/openwrt/package/busybox/config/Config.in +++ b/openwrt/package/busybox/config/Config.in @@ -12,9 +12,26 @@ menu "Busybox Settings" menu "General Configuration" +config BUSYBOX_CONFIG_NITPICK + bool "See lots more (probably unnecessary) configuration options." + default n + help + Some BusyBox applets have more configuration options than anyone + will ever care about. To avoid drowining people in complexity, most + of the applet features that can be set to a sane default value are + hidden, unless you hit the above switch. + + This is better than to telling people to edit the busybox source + code, but not by much. + + See http://en.wikipedia.org/wiki/Fibber_McGee_and_Molly#The_Closet + + You have been warned. + choice prompt "Buffer allocation policy" default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK + depends on BUSYBOX_CONFIG_NITPICK help There are 3 ways BusyBox can handle buffer allocations: - Use malloc. This costs code size for the call to xmalloc. @@ -36,15 +53,39 @@ config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS endchoice +config BUSYBOX_CONFIG_SHOW_USAGE + bool "Show terse applet usage messages" + default y + help + All BusyBox applets will show help messages when invoked with + wrong arguments. You can turn off printing these terse usage + messages if you say no here. + This will save you up to 7k. + config BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE bool "Show verbose applet usage messages" default y + select BUSYBOX_CONFIG_SHOW_USAGE help All BusyBox applets will show more verbose help messages when busybox is invoked with --help. This will add a lot of text to the busybox binary. In the default configuration, this will add about 13k, but it can add much more depending on your configuration. +config BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE + bool "Store applet usage messages in compressed form" + default n + depends on BUSYBOX_CONFIG_SHOW_USAGE && BUSYBOX_CONFIG_NITPICK + help + Store usage messages in compressed form, uncompress them on-the-fly + when <applet> --help is called. + + If you have a really tiny busybox with few applets enabled (and + bunzip2 isn't one of them), the overhead of the decompressor might + be noticeable. Also, if you run executables directly from ROM + and have very little memory, this might not be a win. Otherwise, + you probably want this. + config BUSYBOX_CONFIG_FEATURE_INSTALLER bool "Support --install [-s] to install applet links at runtime" default n @@ -61,25 +102,29 @@ config BUSYBOX_CONFIG_LOCALE_SUPPORT Enable this if your system has locale support and you would like busybox to support locale settings. -config BUSYBOX_CONFIG_FEATURE_DEVFS - bool "Support for devfs" +config BUSYBOX_CONFIG_GETOPT_LONG + bool default y - help - Enable if you want BusyBox to work with devfs. +# bool "Enable support for --long-options" +# default n +# help +# Enable this if you want busybox applets to use the gnu --long-option +# style, in addition to single character -a -b -c style options. config BUSYBOX_CONFIG_FEATURE_DEVPTS bool "Use the devpts filesystem for Unix98 PTYs" - default y if BUSYBOX_CONFIG_FEATURE_DEVFS + default y help Enable if you want BusyBox to use Unix98 PTY support. If enabled, busybox will use /dev/ptmx for the master side of the pseudoterminal and /dev/pts/<number> for the slave side. Otherwise, BSD style /dev/ttyp<number> will be used. To use this option, you should have - devpts or devfs mounted. + devpts mounted. config BUSYBOX_CONFIG_FEATURE_CLEAN_UP bool "Clean up all memory before exiting (usually not needed)" default n + depends on BUSYBOX_CONFIG_NITPICK help As a size optimization, busybox normally exits without explicitly freeing dynamically allocated memory or closing files. This saves @@ -93,15 +138,25 @@ config BUSYBOX_CONFIG_FEATURE_SUID bool "Support for SUID/SGID handling" default y help - Support SUID and SGID binaries. + With this option you can install the busybox binary belonging + to root with the suid bit set, and it'll and it'll automatically drop + priviledges for applets that don't need root access. + + If you're really paranoid and don't want to do this, build two + busybox binaries with different applets in them (and the appropriate + symlinks pointing to each binary), and only set the suid bit on the + one that needs it. The applets currently marked to need the suid bit + are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs, + and vlock. config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG bool "Runtime SUID/SGID configuration via /etc/busybox.conf" default n if BUSYBOX_CONFIG_FEATURE_SUID depends on BUSYBOX_CONFIG_FEATURE_SUID help - Allow the SUID / SGID state of an applet to be determined runtime by - checking /etc/busybox.conf. The format of this file is as follows: + Allow the SUID / SGID state of an applet to be determined at runtime + by checking /etc/busybox.conf. (This is sort of a poor man's sudo.) + The format of this file is as follows: <applet> = [Ssx-][Ssx-][x-] (<username>|<uid>).(<groupname>|<gid>) @@ -138,17 +193,32 @@ config BUSYBOX_CONFIG_SELINUX bool "Support NSA Security Enhanced Linux" default n help - Enable support for SE Linux in applets ls, ps, and id. Also provide - the option of compiling in SE Linux applets. + Enable support for SELinux in applets ls, ps, and id. Also provide + the option of compiling in SELinux applets. - If you do not have a complete SE Linux Full Userland installed, this - stuff will not compile. Go visit + If you do not have a complete SELinux userland installed, this stuff + will not compile. Go visit http://www.nsa.gov/selinux/index.html - to download the necessary stuff to allow busybox to compile with this - option enabled. + to download the necessary stuff to allow busybox to compile with + this option enabled. Specifially, libselinux 1.28 or better is + directly required by busybox. If the installation is located in a + non-standard directory, provide it by invoking make as follows: + CFLAGS=-I<libselinux-include-path> \ + LDFLAGS=-L<libselinux-lib-path> \ + make Most people will leave this set to 'N'. +config BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH + string "Path to BusyBox executable" + default "/proc/self/exe" + help + When Busybox applets need to run other busybox applets, BusyBox + sometimes needs to exec() itself. When the /proc filesystem is + mounted, /proc/self/exe always points to the currently running + executable. If you haven't got /proc, set this to wherever you + want to run BusyBox from. + endmenu menu 'Build Options' @@ -167,21 +237,18 @@ config BUSYBOX_CONFIG_STATIC Most people will leave this set to 'N'. -# The busybox shared library feature is there so make standalone can produce -# smaller applets. Since make standalone isn't in yet, there's nothing using -# this yet, and so it's disabled. -config BUSYBOX_CONFIG_DISABLE_SHARED - bool - default n - config BUSYBOX_CONFIG_BUILD_LIBBUSYBOX bool "Build shared libbusybox" default n - depends on BUSYBOX_CONFIG_DISABLE_SHARED help Build a shared library libbusybox.so which contains all libraries used inside busybox. + This is an experimental feature intended to support the upcoming + "make standalone" mode. Enabling it against the one big busybox + binary serves no purpose (and increases the size). You should + almost certainly say "no" to this right now. + config BUSYBOX_CONFIG_FEATURE_FULL_LIBBUSYBOX bool "Feature-complete libbusybox" default n if !CONFIG_FEATURE_SHARED_BUSYBOX @@ -239,15 +306,6 @@ config BUSYBOX_CROSS_COMPILER_PREFIX then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here, which will ensure the correct compiler is used. -config BUSYBOX_EXTRA_CFLAGS_OPTIONS - string - default "-Os " - help - Do you want to pass any extra CFLAGS options to the compiler as - you build BusyBox? If so, this is the option for you... For example, - if you want to add some simple compiler switches (like -march=i686), - or check for warnings using -Werror, just those options here. - config BUSYBOX_CONFIG_BUILD_AT_ONCE bool "Compile all sources at once" default n @@ -272,17 +330,27 @@ endmenu menu 'Debugging Options' config BUSYBOX_CONFIG_DEBUG - bool "Build BusyBox with Debugging symbols" + bool "Build BusyBox with extra Debugging symbols" default n help - Say Y here if you wish to compile BusyBox with debugging symbols. - This will allow you to use a debugger to examine BusyBox internals - while applets are running. This increases the size of the binary - considerably and should only be used when doing development. - If you are doing development and want to debug BusyBox, answer Y. + Say Y here if you wish to examine BusyBox internals while applets are + running. This increases the size of the binary considerably, and + should only be used when doing development. If you are doing + development and want to debug BusyBox, answer Y. Most people should answer N. +config BUSYBOX_CONFIG_DEBUG_PESSIMIZE + bool "Disable compiler optimizations." + default n + depends on BUSYBOX_CONFIG_DEBUG + help + The compiler's optimization of source code can eliminate and reorder + code, resulting in an executable that's hard to understand when + stepping through it with a debugger. This switches it off, resulting + in a much bigger executable that more closely matches the source + code. + choice prompt "Additional debugging library" default BUSYBOX_CONFIG_NO_DEBUG_LIB @@ -329,7 +397,7 @@ config BUSYBOX_CONFIG_DEBUG_YANK_SUSv2 bool "Disable obsolete features removed before SUSv3?" default y help - This option will disable backwards compatability with SuSv2, + This option will disable backwards compatibility with SuSv2, specifically, old-style numeric options ('command -1 <file>') will not be supported in head, tail, and fold. (Note: should yank from renice too.) diff --git a/openwrt/package/busybox/config/archival/Config.in b/openwrt/package/busybox/config/archival/Config.in index bd5c4b140f7..ac71d753a22 100644 --- a/openwrt/package/busybox/config/archival/Config.in +++ b/openwrt/package/busybox/config/archival/Config.in @@ -29,7 +29,7 @@ config BUSYBOX_CONFIG_AR probably say N here. config BUSYBOX_CONFIG_FEATURE_AR_LONG_FILENAMES - bool " Enable support for long filenames (not need for debs)" + bool "Enable support for long filenames (not need for debs)" default n depends on BUSYBOX_CONFIG_AR help @@ -89,7 +89,7 @@ config BUSYBOX_CONFIG_DPKG_DEB probably say N here. config BUSYBOX_CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY - bool " extract only (-x)" + bool "extract only (-x)" default n depends on BUSYBOX_CONFIG_DPKG_DEB help @@ -106,7 +106,7 @@ config BUSYBOX_CONFIG_GUNZIP an archive, without decompressing it. config BUSYBOX_CONFIG_FEATURE_GUNZIP_UNCOMPRESS - bool " Uncompress support" + bool "Uncompress support" default y depends on BUSYBOX_CONFIG_GUNZIP help @@ -150,7 +150,7 @@ config BUSYBOX_CONFIG_TAR UNIX archive program. config BUSYBOX_CONFIG_FEATURE_TAR_CREATE - bool " Enable archive creation" + bool "Enable archive creation" default y depends on BUSYBOX_CONFIG_TAR help @@ -158,7 +158,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_CREATE tar archives using the `-c' option. config BUSYBOX_CONFIG_FEATURE_TAR_BZIP2 - bool " Enable -j option to handle .tar.bz2 files" + bool "Enable -j option to handle .tar.bz2 files" default y depends on BUSYBOX_CONFIG_TAR help @@ -166,7 +166,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_BZIP2 archives compressed with bzip2. config BUSYBOX_CONFIG_FEATURE_TAR_LZMA - bool " Enable -a option to handle .tar.lzma files" + bool "Enable -a option to handle .tar.lzma files" default n depends on BUSYBOX_CONFIG_TAR help @@ -174,7 +174,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_LZMA archives compressed with lzma. config BUSYBOX_CONFIG_FEATURE_TAR_FROM - bool " Enable -X (exclude from) and -T (include from) options)" + bool "Enable -X (exclude from) and -T (include from) options)" default y depends on BUSYBOX_CONFIG_TAR help @@ -182,7 +182,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_FROM a list of files to include or exclude from an archive. config BUSYBOX_CONFIG_FEATURE_TAR_GZIP - bool " Enable -z option" + bool "Enable -z option" default y depends on BUSYBOX_CONFIG_TAR help @@ -190,15 +190,15 @@ config BUSYBOX_CONFIG_FEATURE_TAR_GZIP when creating or extracting tar gziped archives. config BUSYBOX_CONFIG_FEATURE_TAR_COMPRESS - bool " Enable -Z option" + bool "Enable -Z option" default n depends on BUSYBOX_CONFIG_TAR help If you enable this option tar will be able to call uncompress, when extracting .tar.Z archives. -config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY - bool " Enable support for old tar header format" +config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY + bool "Enable support for old tar header format" default n depends on BUSYBOX_CONFIG_TAR help @@ -207,7 +207,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY repacking your ancient archives with the new format. config BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS - bool " Enable support for some GNU tar extensions" + bool "Enable support for some GNU tar extensions" default y depends on BUSYBOX_CONFIG_TAR help @@ -215,9 +215,9 @@ config BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS linknames. config BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS - bool " Enable long options" + bool "Enable long options" default n - depends on BUSYBOX_CONFIG_TAR + depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_GETOPT_LONG help Enable use of long options, increases size by about 400 Bytes @@ -244,11 +244,11 @@ config BUSYBOX_CONFIG_UNLZMA should probably say N here. config BUSYBOX_CONFIG_FEATURE_LZMA_FAST - bool " Optimze unlzma for speed" + bool "Optimze unlzma for speed" default n depends on BUSYBOX_CONFIG_UNLZMA help - This option reduce decompression time by about 33% at the cost of + This option reduces decompression time by about 33% at the cost of a 2K bigger binary. config BUSYBOX_CONFIG_UNZIP @@ -265,7 +265,7 @@ comment "Common options for cpio and tar" depends on BUSYBOX_CONFIG_CPIO || BUSYBOX_CONFIG_TAR config BUSYBOX_CONFIG_FEATURE_UNARCHIVE_TAPE - bool " Enable tape drive support" + bool "Enable tape drive support" default n depends on BUSYBOX_CONFIG_CPIO || BUSYBOX_CONFIG_TAR help @@ -275,7 +275,7 @@ comment "Common options for dpkg and dpkg_deb" depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB config BUSYBOX_CONFIG_FEATURE_DEB_TAR_GZ - bool " gzip debian packages (normal)" + bool "gzip debian packages (normal)" default n if BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB help @@ -284,7 +284,7 @@ config BUSYBOX_CONFIG_FEATURE_DEB_TAR_GZ If you want compatibility with standard .deb's you should say yes here. config BUSYBOX_CONFIG_FEATURE_DEB_TAR_BZ2 - bool " bzip2 debian packages" + bool "bzip2 debian packages" default n depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB help @@ -295,7 +295,7 @@ config BUSYBOX_CONFIG_FEATURE_DEB_TAR_BZ2 use an internal control.tar.bz2 or data.tar.bz2. config BUSYBOX_CONFIG_FEATURE_DEB_TAR_LZMA - bool " lzma debian packages" + bool "lzma debian packages" default n depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB help diff --git a/openwrt/package/busybox/config/console-tools/Config.in b/openwrt/package/busybox/config/console-tools/Config.in index 4faaeb44b6c..1efe300982e 100644 --- a/openwrt/package/busybox/config/console-tools/Config.in +++ b/openwrt/package/busybox/config/console-tools/Config.in @@ -65,6 +65,13 @@ config BUSYBOX_CONFIG_SETCONSOLE This program redirects the system console to another device, like the current tty while logged in via telnet. +config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_SET_CONSOLE && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the setconsole applet. + config BUSYBOX_CONFIG_SETKEYCODES bool "setkeycodes" default n @@ -72,4 +79,10 @@ config BUSYBOX_CONFIG_SETKEYCODES This program loads entries into the kernel's scancode-to-keycode map, allowing unusual keyboards to generate usable keycodes. +config BUSYBOX_CONFIG_SETLOGCONS + bool "setlogcons" + default n + help + This program redirects the output console of kernel messages. + endmenu diff --git a/openwrt/package/busybox/config/coreutils/Config.in b/openwrt/package/busybox/config/coreutils/Config.in index 53984e3951c..6aaee5eb997 100644 --- a/openwrt/package/busybox/config/coreutils/Config.in +++ b/openwrt/package/busybox/config/coreutils/Config.in @@ -26,6 +26,13 @@ config BUSYBOX_CONFIG_CAT cat is used to concatenate files and print them to the standard output. Enable this option if you wish to enable the 'cat' utility. +config BUSYBOX_CONFIG_CATV + bool "catv" + default n + help + Display nonprinting characters as escape sequences (like some + implementations' cat -v option). + config BUSYBOX_CONFIG_CHGRP bool "chgrp" default y @@ -52,6 +59,12 @@ config BUSYBOX_CONFIG_CHROOT chroot is used to change the root directory and run a command. The default command is `/bin/sh'. +config BUSYBOX_CONFIG_CKSUM + bool "cksum" + default n + help + cksum is used to calculate the CRC32 checksum of a file. + config BUSYBOX_CONFIG_CMP bool "cmp" default n @@ -87,7 +100,7 @@ config BUSYBOX_CONFIG_DATE current time in the given format. config BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT - bool " Enable ISO date format output (-I)" + bool "Enable ISO date format output (-I)" default y depends on BUSYBOX_CONFIG_DATE help @@ -102,6 +115,26 @@ config BUSYBOX_CONFIG_DD by default) using specific input and output blocksizes, while optionally performing conversions on it. +config BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING + bool "Enable DD signal handling for status reporting" + default y + depends on BUSYBOX_CONFIG_DD + help + sending a SIGUSR1 signal to a running `dd' process makes it + print to standard error the number of records read and written + so far, then to resume copying. + + $ dd if=/dev/zero of=/dev/null& pid=$! $ kill -USR1 $pid; sleep 1; kill $pid + 10899206+0 records in 10899206+0 records out + +config BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS + bool "Enable ibs, obs and conv options" + default n + depends on BUSYBOX_CONFIG_DD + help + Enables support for writing a certain number of bytes in and out, + at a time, and performing conversions on the data stream. + config BUSYBOX_CONFIG_DF bool "df" default y @@ -109,6 +142,38 @@ config BUSYBOX_CONFIG_DF df reports the amount of disk space used and available on filesystems. +config BUSYBOX_CONFIG_DIFF + bool "diff" + default n + help + diff compares two files or directories and outputs the + differences between them in a form that can be given to + the patch command. + +config BUSYBOX_CONFIG_FEATURE_DIFF_BINARY + bool "Enable checks for binary files" + default n + depends on BUSYBOX_CONFIG_DIFF + help + This option enables support for checking for binary files + before a comparison is carried out. + +config BUSYBOX_CONFIG_FEATURE_DIFF_DIR + bool "Enable directory support" + default n + depends on BUSYBOX_CONFIG_DIFF + help + This option enables support for directory and subdirectory + comparison. + +config BUSYBOX_CONFIG_FEATURE_DIFF_MINIMAL + bool "Enable -d option to find smaller sets of changes" + default n + depends on BUSYBOX_CONFIG_DIFF + help + Enabling this option allows the use of -d to make diff + try hard to find the smallest possible set of changes. + config BUSYBOX_CONFIG_DIRNAME bool "dirname" default y @@ -127,6 +192,9 @@ config BUSYBOX_CONFIG_UNIX2DOS bool default n depends on BUSYBOX_CONFIG_DOS2UNIX + help + unix2dos is used to convert a text file from UNIX format to + DOS format, and vice versa. config BUSYBOX_CONFIG_DU bool "du (default blocksize of 512 bytes)" @@ -135,8 +203,8 @@ config BUSYBOX_CONFIG_DU du is used to report the amount of disk space used for specified files. -config BUSYBOX_CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K - bool " Use a default blocksize of 1024 bytes (1K)" +config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K + bool "Use a default blocksize of 1024 bytes (1K)" default y depends on BUSYBOX_CONFIG_DU help @@ -150,7 +218,7 @@ config BUSYBOX_CONFIG_ECHO # this entry also appears in shell/Config.in, next to the echo builtin config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO - bool " Enable echo options (-n and -e)" + bool "Enable echo options (-n and -e)" default y depends on BUSYBOX_CONFIG_ECHO help @@ -164,6 +232,13 @@ config BUSYBOX_CONFIG_ENV a command; without options it displays the current environment. +config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the env applet. + config BUSYBOX_CONFIG_EXPR bool "expr" default y @@ -172,7 +247,7 @@ config BUSYBOX_CONFIG_EXPR to standard output. config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64 - bool " Extend Posix numbers support to 64 bit" + bool "Extend Posix numbers support to 64 bit" default n depends on BUSYBOX_CONFIG_EXPR help @@ -200,7 +275,7 @@ config BUSYBOX_CONFIG_HEAD from files. config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD - bool " Enable head options (-c, -q, and -v)" + bool "Enable head options (-c, -q, and -v)" default y depends on BUSYBOX_CONFIG_HEAD help @@ -225,6 +300,13 @@ config BUSYBOX_CONFIG_INSTALL help Copy files and set attributes. +config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the install applet. + config BUSYBOX_CONFIG_LENGTH bool "length" default y @@ -250,56 +332,56 @@ config BUSYBOX_CONFIG_LS ls is used to list the contents of directories. config BUSYBOX_CONFIG_FEATURE_LS_FILETYPES - bool " Enable filetyping options (-p and -F)" + bool "Enable filetyping options (-p and -F)" default y depends on BUSYBOX_CONFIG_LS help Enable the ls options (-p and -F). config BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS - bool " Enable symlinks dereferencing (-L)" + bool "Enable symlinks dereferencing (-L)" default y depends on BUSYBOX_CONFIG_LS help Enable the ls option (-L). config BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE - bool " Enable recursion (-R)" + bool "Enable recursion (-R)" default y depends on BUSYBOX_CONFIG_LS help Enable the ls option (-R). config BUSYBOX_CONFIG_FEATURE_LS_SORTFILES - bool " Sort the file names" + bool "Sort the file names" default y depends on BUSYBOX_CONFIG_LS help Allow ls to sort file names alphabetically. config BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS - bool " Show file timestamps" + bool "Show file timestamps" default y depends on BUSYBOX_CONFIG_LS help Allow ls to display timestamps for files. config BUSYBOX_CONFIG_FEATURE_LS_USERNAME - bool " Show username/groupnames" + bool "Show username/groupnames" default y depends on BUSYBOX_CONFIG_LS help Allow ls to display username/groupname for files. config BUSYBOX_CONFIG_FEATURE_LS_COLOR - bool " Allow use of color to identify file types" + bool "Allow use of color to identify file types" default y - depends on BUSYBOX_CONFIG_LS + depends on BUSYBOX_CONFIG_LS && BUSYBOX_CONFIG_GETOPT_LONG help This enables the --color option to ls. config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT - bool " Produce colored ls output by default" + bool "Produce colored ls output by default" default y depends on BUSYBOX_CONFIG_FEATURE_LS_COLOR help @@ -321,6 +403,13 @@ config BUSYBOX_CONFIG_MKDIR help mkdir is used to create directories with the specified names. +config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the mkdir applet. + config BUSYBOX_CONFIG_MKFIFO bool "mkfifo" default y @@ -341,6 +430,13 @@ config BUSYBOX_CONFIG_MV help mv is used to move or rename files or directories. +config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the mv applet. + config BUSYBOX_CONFIG_NICE bool "nice" default n @@ -416,7 +512,7 @@ config BUSYBOX_CONFIG_SLEEP sleep is used to pause for a specified number of seconds, config BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP - bool " Enable multiple integer args and optional time suffixes" + bool "Enable multiple integer args and optional time suffixes" default y depends on BUSYBOX_CONFIG_SLEEP help @@ -429,7 +525,7 @@ config BUSYBOX_CONFIG_SORT sort is used to sort lines of text in specified files. config BUSYBOX_CONFIG_FEATURE_SORT_BIG - bool " full SuSv3 compliant sort (Support -ktcsbdfiozgM)" + bool "full SuSv3 compliant sort (Support -ktcsbdfiozgM)" default n depends on BUSYBOX_CONFIG_SORT help @@ -447,7 +543,7 @@ config BUSYBOX_CONFIG_STAT display file or filesystem status. config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT - bool " Enable custom formats (-c)" + bool "Enable custom formats (-c)" default n depends on BUSYBOX_CONFIG_STAT help @@ -481,7 +577,7 @@ config BUSYBOX_CONFIG_TAIL from files. config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL - bool " Enable extra tail options (-q, -s, and -v)" + bool "Enable extra tail options (-q, -s, and -v)" default y depends on BUSYBOX_CONFIG_TAIL help @@ -496,7 +592,7 @@ config BUSYBOX_CONFIG_TEE to standard output and files. config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO - bool " Enable block i/o (larger/faster) instead of byte i/o." + bool "Enable block i/o (larger/faster) instead of byte i/o." default y depends on BUSYBOX_CONFIG_TEE help @@ -507,11 +603,11 @@ config BUSYBOX_CONFIG_TEST default y help test is used to check file types and compare values, - returning an appropriate exit code. The shells (ash - and bash) have test builtin. + returning an appropriate exit code. The bash shell + has test built in, ash can build it in optionally. config BUSYBOX_CONFIG_FEATURE_TEST_64 - bool " Extend test to 64 bit" + bool "Extend test to 64 bit" default n depends on BUSYBOX_CONFIG_TEST help @@ -532,7 +628,7 @@ config BUSYBOX_CONFIG_TR input, writing to standard output. config BUSYBOX_CONFIG_FEATURE_TR_CLASSES - bool " Enable character classes (such as [:upper:])" + bool "Enable character classes (such as [:upper:])" default n depends on BUSYBOX_CONFIG_TR help @@ -540,7 +636,7 @@ config BUSYBOX_CONFIG_FEATURE_TR_CLASSES tr [:upper:] [:lower:] to convert input into lowercase. config BUSYBOX_CONFIG_FEATURE_TR_EQUIV - bool " Enable equivalence classes" + bool "Enable equivalence classes" default n depends on BUSYBOX_CONFIG_TR help @@ -633,7 +729,7 @@ comment "Common options for cp and mv" depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS - bool " Preserve hard links" + bool "Preserve hard links" default y depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV help @@ -643,7 +739,7 @@ comment "Common options for ls, more and telnet" depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET config BUSYBOX_CONFIG_FEATURE_AUTOWIDTH - bool " Calculate terminal & column widths" + bool "Calculate terminal & column widths" default y depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET help @@ -657,7 +753,7 @@ comment "Common options for df, du, ls" depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE - bool " Support for human readable output (example 13k, 23M, 235G)" + bool "Support for human readable output (example 13k, 23M, 235G)" default y depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS help @@ -667,7 +763,7 @@ comment "Common options for md5sum, sha1sum" depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK - bool " Enable -c, -s and -w options" + bool "Enable -c, -s and -w options" default y depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM help diff --git a/openwrt/package/busybox/config/debianutils/Config.in b/openwrt/package/busybox/config/debianutils/Config.in index 71f2bf38af7..bc98103c72f 100644 --- a/openwrt/package/busybox/config/debianutils/Config.in +++ b/openwrt/package/busybox/config/debianutils/Config.in @@ -25,7 +25,7 @@ config BUSYBOX_CONFIG_READLINK of the file it points to config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW - bool " Enable canonicalization by following all symlinks (-f)" + bool "Enable canonicalization by following all symlinks (-f)" default n depends on BUSYBOX_CONFIG_READLINK help @@ -46,6 +46,13 @@ config BUSYBOX_CONFIG_RUN_PARTS Unless you know that run-parts is used in some of your scripts you can safely say N here. +config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_RUN_PARTS && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the run-parts applet. + config BUSYBOX_CONFIG_START_STOP_DAEMON bool "start-stop-daemon" default n @@ -54,6 +61,22 @@ config BUSYBOX_CONFIG_START_STOP_DAEMON termination of system-level processes, usually the ones started during the startup of the system. +config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_FANCY + bool "Support additional arguments" + default n + depends on BUSYBOX_CONFIG_START_STOP_DAEMON + help + Support additional arguments. + -o|--oknodo ignored since we exit with 0 anyway + -v|--verbose + +config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_START_STOP_DAEMON && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the start-stop-daemon applet. + config BUSYBOX_CONFIG_WHICH bool "which" default y diff --git a/openwrt/package/busybox/config/editors/Config.in b/openwrt/package/busybox/config/editors/Config.in index 85074b333f3..3c1a320bc37 100644 --- a/openwrt/package/busybox/config/editors/Config.in +++ b/openwrt/package/busybox/config/editors/Config.in @@ -13,13 +13,21 @@ config BUSYBOX_CONFIG_AWK the BusyBox implementation of that programming language. config BUSYBOX_CONFIG_FEATURE_AWK_MATH - bool " Enable math functions (requires libm)" + bool "Enable math functions (requires libm)" default y depends on BUSYBOX_CONFIG_AWK help Enable math functions of the Awk programming language. NOTE: This will require libm to be present for linking. +config BUSYBOX_CONFIG_ED + bool "ed" + default n + help + The original 1970's Unix text editor, from the days of teletypes. + Small, simple, evil. Part of SUSv3. If you're not already using + this, you don't need it. + config BUSYBOX_CONFIG_PATCH bool "patch" default n @@ -43,7 +51,7 @@ config BUSYBOX_CONFIG_VI you may wish to use something else. config BUSYBOX_CONFIG_FEATURE_VI_COLON - bool " Enable \":\" colon commands (no \"ex\" mode)" + bool "Enable \":\" colon commands (no \"ex\" mode)" default y depends on BUSYBOX_CONFIG_VI help @@ -51,7 +59,7 @@ config BUSYBOX_CONFIG_FEATURE_VI_COLON provide an "ex" mode. config BUSYBOX_CONFIG_FEATURE_VI_YANKMARK - bool " Enable yank/put commands and mark cmds" + bool "Enable yank/put commands and mark cmds" default y depends on BUSYBOX_CONFIG_VI help @@ -59,7 +67,7 @@ config BUSYBOX_CONFIG_FEATURE_VI_YANKMARK busybox vi. config BUSYBOX_CONFIG_FEATURE_VI_SEARCH - bool " Enable search and replace cmds" + bool "Enable search and replace cmds" default y depends on BUSYBOX_CONFIG_VI help @@ -67,7 +75,7 @@ config BUSYBOX_CONFIG_FEATURE_VI_SEARCH busybox vi. config BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS - bool " Catch signals" + bool "Catch signals" default y depends on BUSYBOX_CONFIG_VI help @@ -76,14 +84,14 @@ config BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS Ctrl-Z and Ctrl-C and alarms. config BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD - bool " Remember previous cmd and \".\" cmd" + bool "Remember previous cmd and \".\" cmd" default y depends on BUSYBOX_CONFIG_VI help Make busybox vi remember the last command and be able to repeat it. config BUSYBOX_CONFIG_FEATURE_VI_READONLY - bool " Enable -R option and \"view\" mode" + bool "Enable -R option and \"view\" mode" default y depends on BUSYBOX_CONFIG_VI help @@ -91,28 +99,28 @@ config BUSYBOX_CONFIG_FEATURE_VI_READONLY open a file in read-only mode. config BUSYBOX_CONFIG_FEATURE_VI_SETOPTS - bool " Enable set-able options, ai ic showmatch" + bool "Enable set-able options, ai ic showmatch" default y depends on BUSYBOX_CONFIG_VI help Enable the editor to set some (ai, ic, showmatch) options. config BUSYBOX_CONFIG_FEATURE_VI_SET - bool " Support for :set" + bool "Support for :set" default y depends on BUSYBOX_CONFIG_VI help Support for ":set". config BUSYBOX_CONFIG_FEATURE_VI_WIN_RESIZE - bool " Handle window resize" + bool "Handle window resize" default y depends on BUSYBOX_CONFIG_VI help Make busybox vi behave nicely with terminals that get resized. config BUSYBOX_CONFIG_FEATURE_VI_OPTIMIZE_CURSOR - bool " Optimize cursor movement" + bool "Optimize cursor movement" default y depends on BUSYBOX_CONFIG_VI help diff --git a/openwrt/package/busybox/config/findutils/Config.in b/openwrt/package/busybox/config/findutils/Config.in index 9667bfba811..e708259888d 100644 --- a/openwrt/package/busybox/config/findutils/Config.in +++ b/openwrt/package/busybox/config/findutils/Config.in @@ -11,8 +11,18 @@ config BUSYBOX_CONFIG_FIND help find is used to search your system to find specified files. +config BUSYBOX_CONFIG_FEATURE_FIND_PRINT0 + bool "Enable -print0 option" + default y + depends on BUSYBOX_CONFIG_FIND + help + Causes output names to be separated by a null character + rather than a newline. This allows names that contain + newlines and other whitespace to be more easily + interpreted by other programs. + config BUSYBOX_CONFIG_FEATURE_FIND_MTIME - bool " Enable modified time matching (-mtime) option" + bool "Enable modified time matching (-mtime) option" default n depends on BUSYBOX_CONFIG_FIND help @@ -20,7 +30,7 @@ config BUSYBOX_CONFIG_FEATURE_FIND_MTIME files, in days. config BUSYBOX_CONFIG_FEATURE_FIND_MMIN - bool " Enable modified time matching (-min) option" + bool "Enable modified time matching (-min) option" default n depends on BUSYBOX_CONFIG_FIND help @@ -28,14 +38,14 @@ config BUSYBOX_CONFIG_FEATURE_FIND_MMIN files, in minutes. config BUSYBOX_CONFIG_FEATURE_FIND_PERM - bool " Enable permissions matching (-perm) option" + bool "Enable permissions matching (-perm) option" default y depends on BUSYBOX_CONFIG_FIND help Enable searching based on file permissions. config BUSYBOX_CONFIG_FEATURE_FIND_TYPE - bool " Enable filetype matching (-type) option" + bool "Enable filetype matching (-type) option" default y depends on BUSYBOX_CONFIG_FIND help @@ -43,7 +53,7 @@ config BUSYBOX_CONFIG_FEATURE_FIND_TYPE directory, socket, device, etc.). config BUSYBOX_CONFIG_FEATURE_FIND_XDEV - bool " Enable stay in filesystem (-xdev) option" + bool "Enable stay in filesystem (-xdev) option" default y depends on BUSYBOX_CONFIG_FIND help @@ -51,7 +61,7 @@ config BUSYBOX_CONFIG_FEATURE_FIND_XDEV filesystem. config BUSYBOX_CONFIG_FEATURE_FIND_NEWER - bool " Enable -newer option for comparing file mtimes" + bool "Enable -newer option for comparing file mtimes" default n depends on BUSYBOX_CONFIG_FIND help @@ -59,14 +69,14 @@ config BUSYBOX_CONFIG_FEATURE_FIND_NEWER a modified time that is more recent than the specified FILE. config BUSYBOX_CONFIG_FEATURE_FIND_INUM - bool " Enable inode number matching (-inum) option" + bool "Enable inode number matching (-inum) option" default n depends on BUSYBOX_CONFIG_FIND help Support the 'find -inum' option for searching by inode number. config BUSYBOX_CONFIG_FEATURE_FIND_EXEC - bool " Enable (-exec) option allowing execution of commands" + bool "Enable (-exec) option allowing execution of commands" default y depends on BUSYBOX_CONFIG_FIND help @@ -80,7 +90,7 @@ config BUSYBOX_CONFIG_GREP grep is used to search files for a specified pattern. config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS - bool " Support extended regular expressions (egrep & grep -E)" + bool "Support extended regular expressions (egrep & grep -E)" default y depends on BUSYBOX_CONFIG_GREP help @@ -89,7 +99,7 @@ config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS and various repetition operators. config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS - bool " Alias fgrep to grep -F" + bool "Alias fgrep to grep -F" default y depends on BUSYBOX_CONFIG_GREP help @@ -98,7 +108,7 @@ config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS grep -F is always builtin, this just creates the fgrep alias. config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT - bool " Enable before and after context flags (-A, -B and -C)" + bool "Enable before and after context flags (-A, -B and -C)" default y depends on BUSYBOX_CONFIG_GREP help @@ -114,7 +124,7 @@ config BUSYBOX_CONFIG_XARGS every item from standard input. config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION - bool " Enable prompt and confirmation option -p" + bool "Enable prompt and confirmation option -p" default y depends on BUSYBOX_CONFIG_XARGS help @@ -122,7 +132,7 @@ config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION line and read a line from the terminal. config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES - bool " Enable support single and double quotes and backslash" + bool "Enable support single and double quotes and backslash" default y depends on BUSYBOX_CONFIG_XARGS help @@ -130,7 +140,7 @@ config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES and backslash for can use aruments with spaces. config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT - bool " Enable support options -x" + bool "Enable support options -x" default y depends on BUSYBOX_CONFIG_XARGS help @@ -138,7 +148,7 @@ config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is exceeded. config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM - bool " Enable options -0" + bool "Enable options -0" default y depends on BUSYBOX_CONFIG_XARGS help diff --git a/openwrt/package/busybox/config/init/Config.in b/openwrt/package/busybox/config/init/Config.in index 88dcaca2d34..3696f7017ff 100644 --- a/openwrt/package/busybox/config/init/Config.in +++ b/openwrt/package/busybox/config/init/Config.in @@ -11,15 +11,23 @@ config BUSYBOX_CONFIG_INIT help init is the first program run when the system boots. +config BUSYBOX_CONFIG_DEBUG_INIT + bool "debugging aid" + default n + depends on BUSYBOX_CONFIG_INIT + help + Turn this on to disable all the dangerous + rebooting stuff when debugging. + config BUSYBOX_CONFIG_FEATURE_USE_INITTAB - bool " Support reading an inittab file" + bool "Support reading an inittab file" default y depends on BUSYBOX_CONFIG_INIT help Allow init to read an inittab file when the system boot. config BUSYBOX_CONFIG_FEATURE_INIT_SCTTY - bool " Support running commands with a controlling-tty" + bool "Support running commands with a controlling-tty" default n depends on BUSYBOX_CONFIG_INIT help @@ -30,14 +38,14 @@ config BUSYBOX_CONFIG_FEATURE_INIT_SCTTY the console is only accessed during development or for maintenance. config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET - bool " Be _extra_ quiet on boot" + bool "Be _extra_ quiet on boot" default n depends on BUSYBOX_CONFIG_INIT help Prevent init from logging some messages to the console during boot. config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS - bool " Support dumping core for child processes (debugging only)" + bool "Support dumping core for child processes (debugging only)" default n depends on BUSYBOX_CONFIG_INIT help @@ -49,7 +57,7 @@ config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS config BUSYBOX_CONFIG_FEATURE_INITRD - bool " Support running init from within an initrd (not initramfs)" + bool "Support running init from within an initrd (not initramfs)" default n depends on BUSYBOX_CONFIG_INIT help @@ -72,9 +80,4 @@ config BUSYBOX_CONFIG_MESG Mesg controls access to your terminal by others. It is typically used to allow or disallow other users to write to your terminal - default y - help - Stop all processes and (try to) power off the system. - endmenu - diff --git a/openwrt/package/busybox/config/loginutils/Config.in b/openwrt/package/busybox/config/loginutils/Config.in index 621d57643f2..33a764e35ce 100644 --- a/openwrt/package/busybox/config/loginutils/Config.in +++ b/openwrt/package/busybox/config/loginutils/Config.in @@ -84,14 +84,14 @@ config BUSYBOX_CONFIG_GETTY getty lets you log in on a tty, it is normally invoked by init. config BUSYBOX_CONFIG_FEATURE_UTMP - bool " Support utmp file" + bool "Support utmp file" depends on BUSYBOX_CONFIG_GETTY || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU || BUSYBOX_CONFIG_WHO default n help The file /var/run/utmp is used to track who is currently logged in. config BUSYBOX_CONFIG_FEATURE_WTMP - bool " Support wtmp file" + bool "Support wtmp file" depends on BUSYBOX_CONFIG_GETTY || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU || BUSYBOX_CONFIG_LAST default n select BUSYBOX_CONFIG_FEATURE_UTMP @@ -110,7 +110,7 @@ config BUSYBOX_CONFIG_LOGIN work properly. config BUSYBOX_CONFIG_FEATURE_SECURETTY - bool " Support for /etc/securetty" + bool "Support for /etc/securetty" default n depends on BUSYBOX_CONFIG_LOGIN help diff --git a/openwrt/package/busybox/config/miscutils/Config.in b/openwrt/package/busybox/config/miscutils/Config.in index 404170188ee..f13d8ba0bc8 100644 --- a/openwrt/package/busybox/config/miscutils/Config.in +++ b/openwrt/package/busybox/config/miscutils/Config.in @@ -34,8 +34,15 @@ config BUSYBOX_CONFIG_CROND Note that Busybox binary must be setuid root for this applet to work properly. +config BUSYBOX_CONFIG_DEBUG_CROND_OPTION + bool "Support debug option -d" + depends on BUSYBOX_CONFIG_CROND + default n + help + Support option -d to enter debug mode. + config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL - bool " Using /usr/sbin/sendmail?" + bool "Using /usr/sbin/sendmail?" default n depends on BUSYBOX_CONFIG_CROND help @@ -57,9 +64,11 @@ config BUSYBOX_CONFIG_DC precision arithmetic. config BUSYBOX_CONFIG_DEVFSD - bool "devfsd" + bool "devfsd (obsolete)" default n help + This is deprecated, and will be going away in a future release. + Provides compatibility with old device names on a devfs systems. You should set it to true if you have devfs enabled. The following keywords in devsfd.conf are supported: @@ -74,7 +83,8 @@ config BUSYBOX_CONFIG_DEVFSD_MODLOAD default n depends on BUSYBOX_CONFIG_DEVFSD help - This actually doesn't work with busybox modutils but needs the real modutils. + This actually doesn't work with busybox modutils but needs + the external modutils. config BUSYBOX_CONFIG_DEVFSD_FG_NP bool "Enables the -fg and -np options" @@ -91,6 +101,17 @@ config BUSYBOX_CONFIG_DEVFSD_VERBOSE help Increases logging to stderr or syslog. +config BUSYBOX_CONFIG_FEATURE_DEVFS + bool " Use devfs names for all devices (obsolete)" + default y + help + This tells busybox to look for names like /dev/loop/0 instead of + /dev/loop0. If your /dev directory has normal names instead of + devfs names, you don't want this. + + This is obsolete and will be going away someday. Consider it + deprecated. + config BUSYBOX_CONFIG_EJECT bool "eject" default n @@ -112,7 +133,7 @@ config BUSYBOX_CONFIG_LESS a wide array of features, and is an improvement over 'more'. config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS - bool " Enable bracket searching" + bool "Enable bracket searching" default n depends on BUSYBOX_CONFIG_LESS help @@ -120,7 +141,7 @@ config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS brackets, facilitating programming. config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS - bool " Enable extra flags" + bool "Enable extra flags" default n depends on BUSYBOX_CONFIG_LESS help @@ -130,7 +151,7 @@ config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS The -m flag enables a simpler status line with a percentage. config BUSYBOX_CONFIG_FEATURE_LESS_FLAGCS - bool " Enable flag changes" + bool "Enable flag changes" default n depends on BUSYBOX_CONFIG_LESS help @@ -138,14 +159,14 @@ config BUSYBOX_CONFIG_FEATURE_LESS_FLAGCS less itself. config BUSYBOX_CONFIG_FEATURE_LESS_MARKS - bool " Enable marks" + bool "Enable marks" default n depends on BUSYBOX_CONFIG_LESS help Marks enable positions in a file to be stored for easy reference. config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP - bool " Enable regular expressions" + bool "Enable regular expressions" default n depends on BUSYBOX_CONFIG_LESS help @@ -160,16 +181,17 @@ config BUSYBOX_CONFIG_HDPARM BUSYBOX_CONFIG_FEATURE_HDPARM_GET_IDENTITY option).... config BUSYBOX_CONFIG_FEATURE_HDPARM_GET_IDENTITY - bool " Support obtaining detailed information directly from drives" + bool "Support obtaining detailed information directly from drives" default n depends on BUSYBOX_CONFIG_HDPARM help - Enables the -I and -Istdin options to obtain detailed information + Enables the -I and -i options to obtain detailed information directly from drives about their capabilities and supported ATA - feature set. Enabling this option will add about 16k... + feature set. If no device name is specified, hdparm will read + identify data from stdin. Enabling this option will add about 16k... config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF - bool " Register an IDE interface (DANGEROUS)" + bool "Register an IDE interface (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -177,7 +199,7 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF This is dangerous stuff, so you should probably say N. config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF - bool " Un-register an IDE interface (DANGEROUS)" + bool "Un-register an IDE interface (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -185,7 +207,7 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF This is dangerous stuff, so you should probably say N. config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET - bool " perform device reset (DANGEROUS)" + bool "perform device reset (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -193,7 +215,7 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET This is dangerous stuff, so you should probably say N. config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF - bool " tristate device for hotswap (DANGEROUS)" + bool "tristate device for hotswap (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -202,7 +224,7 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF stuff, so you should probably say N. config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA - bool " get/set using_dma flag (DANGEROUS)" + bool "get/set using_dma flag (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -231,7 +253,7 @@ config BUSYBOX_CONFIG_MAKEDEVS Device properties are passed as command line arguments. . 'table' reads device properties from a file or stdin, allowing - a batch of unrelated devices to be makde with one command. + a batch of unrelated devices to be made with one command. User/group names are allowed as an alternative to uid/gid. choice @@ -289,6 +311,18 @@ config BUSYBOX_CONFIG_SETSID help setsid runs a program in a new session +config BUSYBOX_CONFIG_TASKSET + bool "taskset" + default n + help + Retrieve or set a processes's CPU affinity + +config BUSYBOX_CONFIG_TASKSET + bool "taskset" + default n + help + Retrieve or set a processes's CPU affinity (on linux) + config BUSYBOX_CONFIG_TIME bool "time" default y diff --git a/openwrt/package/busybox/config/modutils/Config.in b/openwrt/package/busybox/config/modutils/Config.in index 7c9f50f16d3..8151914100f 100644 --- a/openwrt/package/busybox/config/modutils/Config.in +++ b/openwrt/package/busybox/config/modutils/Config.in @@ -84,7 +84,7 @@ config BUSYBOX_CONFIG_MODPROBE bool "modprobe" default n help - Handle the loading of modules, and their dependancies on a high + Handle the loading of modules, and their dependencies on a high level. Note that in the state, modprobe does not understand multiple @@ -111,7 +111,7 @@ comment "Options common to multiple modutils" config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE # Simulate indentation - bool " Support tainted module checking with new kernels" + bool "Support tainted module checking with new kernels" default n depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_LSMOD help @@ -122,7 +122,7 @@ config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE config BUSYBOX_CONFIG_FEATURE_2_4_MODULES # Simulate indentation - bool " Support version 2.2.x to 2.4.x Linux kernels" + bool "Support version 2.2.x to 2.4.x Linux kernels" default y depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD help @@ -130,7 +130,7 @@ config BUSYBOX_CONFIG_FEATURE_2_4_MODULES config BUSYBOX_CONFIG_FEATURE_2_6_MODULES # Simulate indentation - bool " Support version 2.6.x Linux kernels" + bool "Support version 2.6.x Linux kernels" default y depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD || BUSYBOX_CONFIG_MODPROBE help diff --git a/openwrt/package/busybox/config/networking/Config.in b/openwrt/package/busybox/config/networking/Config.in index 7e280b76e2a..3e0cbc95d42 100644 --- a/openwrt/package/busybox/config/networking/Config.in +++ b/openwrt/package/busybox/config/networking/Config.in @@ -9,8 +9,8 @@ config BUSYBOX_CONFIG_FEATURE_IPV6 bool "Enable IPv6 support" default y help - Enable IPv6 support to busybox. This makes applets that talk IP - able to work with IPv6. + Enable IPv6 support in busybox. + This adds IPv6 support in the networking applets. config BUSYBOX_CONFIG_ARPING bool "arping" @@ -22,7 +22,7 @@ config BUSYBOX_CONFIG_DNSD bool "dnsd" default n help - Small and static DNS server deamon. + Small and static DNS server daemon. config BUSYBOX_CONFIG_ETHER_WAKE bool "ether-wake" @@ -34,8 +34,8 @@ config BUSYBOX_CONFIG_FAKEIDENTD bool "fakeidentd" default n help - fakeidentd listens to the ident port and returns a set fake - value whatever it gets. + fakeidentd listens on the ident port and returns a predefined + fake value on any query. config BUSYBOX_CONFIG_FTPGET bool "ftpget" @@ -49,6 +49,13 @@ config BUSYBOX_CONFIG_FTPPUT help Store a remote file via FTP. +config BUSYBOX_CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS + bool "Enable long options in ftpget/ftpput" + default n + depends on BUSYBOX_CONFIG_GETOPT_LONG && (CONFIG_FTPGET || BUSYBOX_CONFIG_FTPPUT) + help + Support long options for the ftpget/ftpput applet. + config BUSYBOX_CONFIG_HOSTNAME bool "hostname" default n @@ -61,16 +68,34 @@ config BUSYBOX_CONFIG_HTTPD help Serve web pages via an HTTP server. -config BUSYBOX_CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY - bool " Support using httpd only from inetd" - default n +config BUSYBOX_CONFIG_FEATURE_HTTPD_WITHOUT_INETD + bool "Support using httpd as a daemon (not from inetd)" + default y depends on BUSYBOX_CONFIG_HTTPD help - This option disables uid and port options for the httpd applet - but requires inetd server daemon. + This option enables uid and port options for the httpd applet, + and eliminates the need to be called from the inetd server daemon. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP + bool "Support reloading the global config file using hup signal" + default n + depends on BUSYBOX_CONFIG_HTTPD && BUSYBOX_CONFIG_FEATURE_HTTPD_WITHOUT_INETD + help + This option enables processing of SIGHUP to reload cached + configuration settings. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID + bool "Enable support -u <user> option" + default n + depends on BUSYBOX_CONFIG_HTTPD && BUSYBOX_CONFIG_FEATURE_HTTPD_WITHOUT_INETD + help + This option allows the server to run as a specific user + rather than defaulting to the user that starts the server. + Use of this option requires special privileges to change to a + different user. config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH - bool " Enable Basic http Authentication" + bool "Enable Basic http Authentication" default y depends on BUSYBOX_CONFIG_HTTPD help @@ -78,35 +103,15 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH authentication on a per url basis. config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5 - bool " Support MD5 crypted passwords for http Authentication" + bool "Support MD5 crypted passwords for http Authentication" default y depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH help - Enables basic per url authentication from /etc/httpd.conf + Enables basic per URL authentication from /etc/httpd.conf using md5 passwords. -if !CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY -config BUSYBOX_CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP - bool " Support reloading the global config file using hup signal" - default y - depends on BUSYBOX_CONFIG_HTTPD - help - This option enables processing of SIGHUP to reload cached - configuration settings. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID - bool " Enable support -u <user> option" - default n - depends on BUSYBOX_CONFIG_HTTPD - help - This option allows the server to run as a specific user - rather than defaulting to the user that starts the server. - Use of this option requires special privileges to change to a - different user. -endif - config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES - bool " Support loading additional MIME types at run-time" + bool "Support loading additional MIME types at run-time" default y depends on BUSYBOX_CONFIG_HTTPD help @@ -114,26 +119,26 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES run-time to be specified in the configuration file. config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI - bool " Support Common Gateway Interface (CGI)" + bool "Support Common Gateway Interface (CGI)" default y depends on BUSYBOX_CONFIG_HTTPD help This option allows scripts and executables to be invoked - when specific urls are requested. + when specific URLs are requested. config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR - bool " Enable support for running scripts through an interpreter" + bool "Enable support for running scripts through an interpreter" default n depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI help This option enables support for running scripts through an - interpreter. Turn this on, if you want PHP scripts to work + interpreter. Turn this on if you want PHP scripts to work properly. You need to supply an addition line in your httpd config file: *.php:/path/to/your/php config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV - bool " Support the REMOTE_PORT environment variable for CGI" + bool "Support the REMOTE_PORT environment variable for CGI" default y depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI help @@ -141,11 +146,11 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV references that contain a unique port number. config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR - bool " Enable the -e option for shell script CGI simplification." + bool "Enable the -e option for shell script CGI simplification." default y depends on BUSYBOX_CONFIG_HTTPD help - After set, this option allows html encoding arbitrary + This option allows html encoding arbitrary strings for display of the browser. Output goes to stdout. For example, httpd -e "<Hello World>" as "<Hello World>". @@ -157,7 +162,7 @@ config BUSYBOX_CONFIG_IFCONFIG Ifconfig is used to configure the kernel-resident network interfaces. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS - bool " Enable status reporting output (+7k)" + bool "Enable status reporting output (+7k)" default y depends on BUSYBOX_CONFIG_IFCONFIG help @@ -165,7 +170,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS of the currently active interfaces. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP - bool " Enable slip-specific options \"keepalive\" and \"outfill\"" + bool "Enable slip-specific options \"keepalive\" and \"outfill\"" default n depends on BUSYBOX_CONFIG_IFCONFIG help @@ -173,7 +178,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP planning on using serial lines, leave this unchecked. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ - bool " Enable options \"mem_start\", \"io_addr\", and \"irq\"" + bool "Enable options \"mem_start\", \"io_addr\", and \"irq\"" default n depends on BUSYBOX_CONFIG_IFCONFIG help @@ -181,7 +186,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ and/or the interrupt line used by the specified device. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW - bool " Enable option \"hw\" (ether only)" + bool "Enable option \"hw\" (ether only)" default y depends on BUSYBOX_CONFIG_IFCONFIG help @@ -190,7 +195,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW class. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS - bool " Set the broadcast automatically" + bool "Set the broadcast automatically" default y depends on BUSYBOX_CONFIG_IFCONFIG help @@ -215,7 +220,7 @@ config BUSYBOX_CONFIG_IFUPDOWN standalone utilities. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP - bool " Use ip applet" + bool "Use ip applet" default n depends on BUSYBOX_CONFIG_IFUPDOWN help @@ -223,7 +228,7 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP than the default of using the older 'ifconfig' and 'route' utilities. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN - bool " Use busybox ip applet" + bool "Use busybox ip applet" default n depends on BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP select BUSYBOX_CONFIG_IP @@ -237,7 +242,7 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN utility or the "ifup" and "ifdown" applets will not work. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN - bool " Use busybox ifconfig and route applets" + bool "Use busybox ifconfig and route applets" default n depends on BUSYBOX_CONFIG_IFUPDOWN && !CONFIG_FEATURE_IFUPDOWN_IP select BUSYBOX_CONFIG_IFCONFIG @@ -251,21 +256,21 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN work. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4 - bool " Enable support for IPv4" + bool "Enable support for IPv4" default n depends on BUSYBOX_CONFIG_IFUPDOWN help If you want busybox to talk IPv4, leave this on. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6 - bool " Enable support for IPv6" + bool "Enable support for IPv6" default n - depends on BUSYBOX_CONFIG_IFUPDOWN + depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_FEATURE_IPV6 help If you need support for IPv6, turn this option on. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPX - bool " Enable support for IPX" + bool "Enable support for IPX" default n depends on BUSYBOX_CONFIG_IFUPDOWN help @@ -273,7 +278,7 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPX networks. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING - bool " Enable mapping support" + bool "Enable mapping support" default n depends on BUSYBOX_CONFIG_IFUPDOWN help @@ -286,43 +291,43 @@ config BUSYBOX_CONFIG_INETD help Internet superserver daemon -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO - bool " Support echo service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO + bool "Support echo service" default n depends on BUSYBOX_CONFIG_INETD help Echo received data internal inetd service -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD - bool " Support discard service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD + bool "Support discard service" default n depends on BUSYBOX_CONFIG_INETD help Internet /dev/null internal inetd service -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME - bool " Support time service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME + bool "Support time service" default n depends on BUSYBOX_CONFIG_INETD help Return 32 bit time since 1900 internal inetd service -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME - bool " Support daytime service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME + bool "Support daytime service" default n depends on BUSYBOX_CONFIG_INETD help Return human-readable time internal inetd service -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN - bool " Support chargen service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN + bool "Support chargen service" default n depends on BUSYBOX_CONFIG_INETD help Familiar character generator internal inetd service config BUSYBOX_CONFIG_FEATURE_INETD_RPC - bool " Support RPC services" + bool "Support RPC services" default n depends on BUSYBOX_CONFIG_INETD help @@ -337,61 +342,67 @@ config BUSYBOX_CONFIG_IP utility. You generally don't need "ip" to use busybox with TCP/IP. -if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPADDR - config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS - default n - comment " address (forced enabled for ipaddr)" -endif -if ! (CONFIG_IP && BUSYBOX_CONFIG_IPADDR) - config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS - bool " address" - default n - depends on BUSYBOX_CONFIG_IP - help - Address manipulation support for the "ip" applet. -endif +config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + bool "ip address" + default n + depends on BUSYBOX_CONFIG_IP + help + Address manipulation support for the "ip" applet. -if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPLINK - config BUSYBOX_CONFIG_FEATURE_IP_LINK - default n - comment " link (forced enabled for iplink)" -endif -if !(CONFIG_IP && BUSYBOX_CONFIG_IPLINK) - config BUSYBOX_CONFIG_FEATURE_IP_LINK - bool " link" - default n - depends on BUSYBOX_CONFIG_IP - help - Configure network devices with "ip". -endif +config BUSYBOX_CONFIG_FEATURE_IP_LINK + bool "ip link" + default n + depends on BUSYBOX_CONFIG_IP + help + Configure network devices with "ip". -if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPROUTE - config BUSYBOX_CONFIG_FEATURE_IP_ROUTE - default n - comment " route (forced enabled for iproute)" -endif -if !(CONFIG_IP && BUSYBOX_CONFIG_IPROUTE) - config BUSYBOX_CONFIG_FEATURE_IP_ROUTE - bool " route" - default n - depends on BUSYBOX_CONFIG_IP - help - Add support for routing table management to "ip". -endif +config BUSYBOX_CONFIG_FEATURE_IP_ROUTE + bool "ip route" + default n + depends on BUSYBOX_CONFIG_IP + help + Add support for routing table management to "ip". -if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPTUNNEL - config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL - default n - comment " tunnel (forced enabled for iptunnel)" -endif -if !(CONFIG_IP && BUSYBOX_CONFIG_IPTUNNEL) - config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL - bool " tunnel" - default n - depends on BUSYBOX_CONFIG_IP - help - Add support for tunneling commands to "ip". -endif +config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL + bool "ip tunnel" + default n + depends on BUSYBOX_CONFIG_IP + help + Add support for tunneling commands to "ip". + +config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS + bool "Support short forms of ip commands." + default n + depends on BUSYBOX_CONFIG_IP + help + Also support short-form of ip <OBJECT> commands: + ip addr -> ipaddr + ip link -> iplink + ip route -> iproute + ip tunnel -> iptunnel + + Say N unless you desparately need the short form of the ip + object commands. + +config BUSYBOX_CONFIG_IPADDR + bool + default n + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + +config BUSYBOX_CONFIG_IPLINK + bool + default n + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_LINK + +config BUSYBOX_CONFIG_IPROUTE + bool + default n + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ROUTE + +config BUSYBOX_CONFIG_IPTUNNEL + bool + default n + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_TUNNEL config BUSYBOX_CONFIG_IPCALC bool "ipcalc" @@ -401,35 +412,18 @@ config BUSYBOX_CONFIG_IPCALC resulting broadcast, network, and host range. config BUSYBOX_CONFIG_FEATURE_IPCALC_FANCY - bool " Fancy IPCALC, more options, adds 1 kbyte" + bool "Fancy IPCALC, more options, adds 1 kbyte" default n depends on BUSYBOX_CONFIG_IPCALC help Adds the options hostname, prefix and silent to the output of "ipcalc". -config BUSYBOX_CONFIG_IPADDR - bool "ipaddr" +config BUSYBOX_CONFIG_FEATURE_IPCALC_LONG_OPTIONS + bool "Enable long options" default n + depends on BUSYBOX_CONFIG_IPCALC && BUSYBOX_CONFIG_GETOPT_LONG help - Equivalent to selecting address support to "ip", above. - -config BUSYBOX_CONFIG_IPLINK - bool "iplink" - default n - help - Equivalent to selecting link support to "ip", above. - -config BUSYBOX_CONFIG_IPROUTE - bool "iproute" - default n - help - Equivalent to selecting route support to "ip", above. - -config BUSYBOX_CONFIG_IPTUNNEL - bool "iptunnel" - default n - help - Equivalent to selecting tunnel support to "ip", above. + Support long options for the ipcalc applet. config BUSYBOX_CONFIG_NAMEIF bool "nameif" @@ -486,7 +480,7 @@ config BUSYBOX_CONFIG_PING elicit an ICMP ECHO_RESPONSE from a host or gateway. config BUSYBOX_CONFIG_FEATURE_FANCY_PING - bool " Enable fancy ping output" + bool "Enable fancy ping output" default y depends on BUSYBOX_CONFIG_PING help @@ -501,7 +495,7 @@ config BUSYBOX_CONFIG_PING6 This will give you a ping that can talk IPv6. config BUSYBOX_CONFIG_FEATURE_FANCY_PING6 - bool " Enable fancy ping6 output" + bool "Enable fancy ping6 output" default y depends on BUSYBOX_CONFIG_PING6 help @@ -522,7 +516,7 @@ config BUSYBOX_CONFIG_TELNET used to test other simple protocols. config BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE - bool " Pass TERM type to remote host" + bool "Pass TERM type to remote host" default y depends on BUSYBOX_CONFIG_TELNET help @@ -531,7 +525,7 @@ config BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE things like ANSI colors and other control sequences behave. config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN - bool " Pass USER type to remote host" + bool "Pass USER type to remote host" default n depends on BUSYBOX_CONFIG_TELNET help @@ -583,7 +577,7 @@ config BUSYBOX_CONFIG_TELNETD config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD - bool " Support call from inetd only" + bool "Support call from inetd only" default n depends on BUSYBOX_CONFIG_TELNETD help @@ -599,7 +593,7 @@ config BUSYBOX_CONFIG_TFTP for a network-enabled bootloader. config BUSYBOX_CONFIG_FEATURE_TFTP_GET - bool " Enable \"get\" command" + bool "Enable \"get\" command" default n depends on BUSYBOX_CONFIG_TFTP help @@ -607,7 +601,7 @@ config BUSYBOX_CONFIG_FEATURE_TFTP_GET a client to retrieve a file from a TFTP server. config BUSYBOX_CONFIG_FEATURE_TFTP_PUT - bool " Enable \"put\" command" + bool "Enable \"put\" command" default n depends on BUSYBOX_CONFIG_TFTP help @@ -615,14 +609,14 @@ config BUSYBOX_CONFIG_FEATURE_TFTP_PUT a client to transfer a file to a TFTP server. config BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE - bool " Enable \"blocksize\" command" + bool "Enable \"blocksize\" command" default n depends on BUSYBOX_CONFIG_TFTP help Allow the client to specify the desired block size for transfers. -config BUSYBOX_CONFIG_FEATURE_TFTP_DEBUG - bool " Enable debug" +config BUSYBOX_CONFIG_DEBUG_TFTP + bool "Enable debug" default n depends on BUSYBOX_CONFIG_TFTP help @@ -637,7 +631,7 @@ config BUSYBOX_CONFIG_TRACEROUTE Utility to trace the route of IP packets config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE - bool " Enable verbose output" + bool "Enable verbose output" default y depends on BUSYBOX_CONFIG_TRACEROUTE help @@ -645,7 +639,7 @@ config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE hostnames and ICMP response types. config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE - bool " Enable loose source route" + bool "Enable loose source route" default n depends on BUSYBOX_CONFIG_TRACEROUTE help @@ -653,12 +647,13 @@ config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE (8 maximum). config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP - bool " Use ICMP instead of UDP" + bool "Use ICMP instead of UDP" default n depends on BUSYBOX_CONFIG_TRACEROUTE help Add feature to allow for ICMP ECHO instead of UDP datagrams. +source package/busybox/config/networking/udhcp/Config.in config BUSYBOX_CONFIG_VCONFIG bool "vconfig" @@ -674,27 +669,32 @@ config BUSYBOX_CONFIG_WGET HTTPS, and FTP servers. config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR - bool " Enable a nifty process meter (+2k)" + bool "Enable a nifty process meter (+2k)" default y depends on BUSYBOX_CONFIG_WGET help Enable the transfer progress bar for wget transfers. config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION - bool " Enable HTTP authentication" + bool "Enable HTTP authentication" default y depends on BUSYBOX_CONFIG_WGET help Support authenticated HTTP transfers. config BUSYBOX_CONFIG_FEATURE_WGET_IP6_LITERAL - bool " Enable IPv6 literal addresses" + bool "Enable IPv6 literal addresses" default y - depends on BUSYBOX_CONFIG_WGET + depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_FEATURE_IPV6 help Support IPv6 address literal notation in URLs. -source package/busybox/config/networking/udhcp/Config.in +config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS + bool "Enable long options" + default y + depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the wget applet. config BUSYBOX_CONFIG_ZCIP bool "zcip" @@ -708,4 +708,3 @@ config BUSYBOX_CONFIG_ZCIP in the busybox examples. endmenu - diff --git a/openwrt/package/busybox/config/networking/udhcp/Config.in b/openwrt/package/busybox/config/networking/udhcp/Config.in index d15128ce3f6..741afa32793 100644 --- a/openwrt/package/busybox/config/networking/udhcp/Config.in +++ b/openwrt/package/busybox/config/networking/udhcp/Config.in @@ -5,7 +5,7 @@ menu "udhcp Server/Client" -config BUSYBOX_CONFIG_UDHCPD +config BUSYBOX_CONFIG_APP_UDHCPD bool "udhcp Server (udhcpd)" default n help @@ -14,7 +14,7 @@ config BUSYBOX_CONFIG_UDHCPD See http://udhcp.busybox.net for further details. -config BUSYBOX_CONFIG_UDHCPC +config BUSYBOX_CONFIG_APP_UDHCPC bool "udhcp Client (udhcpc)" default y help @@ -26,10 +26,10 @@ config BUSYBOX_CONFIG_UDHCPC See http://udhcp.busybox.net for further details. -config BUSYBOX_CONFIG_DUMPLEASES +config BUSYBOX_CONFIG_APP_DUMPLEASES bool "Lease display utility (dumpleases)" default n - depends on BUSYBOX_CONFIG_UDHCPD + depends on BUSYBOX_CONFIG_APP_UDHCPD help dumpleases displays the leases written out by the udhcpd server. Lease times are stored in the file by time remaining in lease, or @@ -40,7 +40,7 @@ config BUSYBOX_CONFIG_DUMPLEASES config BUSYBOX_CONFIG_FEATURE_UDHCP_SYSLOG bool " Log udhcp messages to syslog (instead of stdout)" default n - depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC + depends on BUSYBOX_CONFIG_APP_UDHCPD || BUSYBOX_CONFIG_APP_UDHCPC help If selected, udhcpd will log all its messages to syslog, otherwise, it will attempt to log them to stdout. @@ -50,7 +50,7 @@ config BUSYBOX_CONFIG_FEATURE_UDHCP_SYSLOG config BUSYBOX_CONFIG_FEATURE_UDHCP_DEBUG bool " Compile udhcp with noisy debugging messages" default n - depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC + depends on BUSYBOX_CONFIG_APP_UDHCPD || BUSYBOX_CONFIG_APP_UDHCPC help If selected, udhcpd will output extra debugging output. If using this option, compile uDHCP with "-g", and do not fork the daemon to diff --git a/openwrt/package/busybox/config/procps/Config.in b/openwrt/package/busybox/config/procps/Config.in index b94632b467d..34d1ace0873 100644 --- a/openwrt/package/busybox/config/procps/Config.in +++ b/openwrt/package/busybox/config/procps/Config.in @@ -51,14 +51,14 @@ config BUSYBOX_CONFIG_PIDOF those id's on the standard output. config BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE - bool " Enable argument for single shot (-s)" + bool "Enable argument for single shot (-s)" default n depends on BUSYBOX_CONFIG_PIDOF help Support argument '-s' for returning only the first pid found. config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT - bool " Enable argument for omitting pids (-o)" + bool "Enable argument for omitting pids (-o)" default n depends on BUSYBOX_CONFIG_PIDOF help @@ -73,7 +73,7 @@ config BUSYBOX_CONFIG_PS ps gives a snapshot of the current processes. config BUSYBOX_CONFIG_FEATURE_PS_WIDE - bool " Enable argument for wide output (-w)" + bool "Enable argument for wide output (-w)" default n depends on BUSYBOX_CONFIG_PS help @@ -102,7 +102,7 @@ config BUSYBOX_CONFIG_TOP system. config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE - bool " Support showing CPU usage percentage (add 2k bytes)" + bool "Support showing CPU usage percentage (add 2k bytes)" default y depends on BUSYBOX_CONFIG_TOP help diff --git a/openwrt/package/busybox/config/shell/Config.in b/openwrt/package/busybox/config/shell/Config.in index b9a1b4d7a3b..373c7461a41 100644 --- a/openwrt/package/busybox/config/shell/Config.in +++ b/openwrt/package/busybox/config/shell/Config.in @@ -48,14 +48,14 @@ comment "Ash Shell Options" depends on BUSYBOX_CONFIG_ASH config BUSYBOX_CONFIG_ASH_JOB_CONTROL - bool " Enable Job control" + bool "Job control" default y depends on BUSYBOX_CONFIG_ASH help Enable job control in the ash shell. config BUSYBOX_CONFIG_ASH_READ_NCHARS - bool " Enable 'read -n N' and 'read -s' support" + bool "'read -n N' and 'read -s' support" default n depends on BUSYBOX_CONFIG_ASH help @@ -63,7 +63,7 @@ config BUSYBOX_CONFIG_ASH_READ_NCHARS 'read -s' will read without echoing the user's input. config BUSYBOX_CONFIG_ASH_READ_TIMEOUT - bool " Enable 'read -t S' support." + bool "'read -t S' support." default y depends on BUSYBOX_CONFIG_ASH help @@ -72,21 +72,21 @@ config BUSYBOX_CONFIG_ASH_READ_TIMEOUT as a decimal fraction, e.g. 'read -t 2.5 foo'. config BUSYBOX_CONFIG_ASH_ALIAS - bool " Enable alias support" + bool "alias support" default y depends on BUSYBOX_CONFIG_ASH help Enable alias support in the ash shell. config BUSYBOX_CONFIG_ASH_MATH_SUPPORT - bool " Enable Posix math support" + bool "Posix math support" default y depends on BUSYBOX_CONFIG_ASH help Enable math support in the ash shell. config BUSYBOX_CONFIG_ASH_MATH_SUPPORT_64 - bool " Extend Posix math support to 64 bit" + bool "Extend Posix math support to 64 bit" default n depends on BUSYBOX_CONFIG_ASH_MATH_SUPPORT help @@ -95,14 +95,30 @@ config BUSYBOX_CONFIG_ASH_MATH_SUPPORT_64 large numbers. config BUSYBOX_CONFIG_ASH_GETOPTS - bool " Enable getopts builtin to parse positional parameters" + bool "Builtin getopt to parse positional parameters" default y depends on BUSYBOX_CONFIG_ASH help Enable getopts builtin in the ash shell. +config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO + bool "Builtin version of 'echo'" + default y + select BUSYBOX_CONFIG_ECHO + depends on BUSYBOX_CONFIG_ASH + help + Enable support for echo, built in to ash. + +config BUSYBOX_CONFIG_ASH_BUILTIN_TEST + bool "Builtin version of 'test'" + default y + select BUSYBOX_CONFIG_TEST + depends on BUSYBOX_CONFIG_ASH + help + Enable support for test, built in to ash. + config BUSYBOX_CONFIG_ASH_CMDCMD - bool " Enable cmdcmd to override shell builtins" + bool "'command' command to override shell builtins" default y depends on BUSYBOX_CONFIG_ASH help @@ -110,37 +126,22 @@ config BUSYBOX_CONFIG_ASH_CMDCMD you to run the specified command with the specified arguments, even when there is an ash builtin command with the same name. -config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO - bool " Enable builtin version of 'echo'" - default y - depends on BUSYBOX_CONFIG_ASH - help - Enable support for echo, built in to ash. - -# this entry also appears in coreutils/Config.in, next to the echo applet -config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO - bool " Enable echo options (-n and -e)" - default y - depends on BUSYBOX_CONFIG_ASH_BUILTIN_ECHO - help - This adds options (-n and -e) to echo. - config BUSYBOX_CONFIG_ASH_MAIL - bool " Check for new mail on interactive shells" + bool "Check for new mail on interactive shells" default n depends on BUSYBOX_CONFIG_ASH help Enable "check for new mail" in the ash shell. config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE - bool " Optimize for size instead of speed" + bool "Optimize for size instead of speed" default y depends on BUSYBOX_CONFIG_ASH help Compile ash for reduced size at the price of speed. config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT - bool " Enable pseudorandom generator and variable $RANDOM" + bool "Pseudorandom generator and variable $RANDOM" default n depends on BUSYBOX_CONFIG_ASH help @@ -151,7 +152,7 @@ config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT variable will no longer have special treatment. config BUSYBOX_CONFIG_ASH_EXPAND_PRMT - bool " Expand prompt string" + bool "Expand prompt string" default n depends on BUSYBOX_CONFIG_ASH help @@ -229,13 +230,18 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL is generally used when creating a statically linked version of busybox for use as a rescue shell, in the event that you screw up your system. + Note that this will *also* cause applets to take precedence + over shell builtins of the same name. So turning this on will + eliminate any performance gained by turning on the builtin "echo" + and "test" commands in ash. + Note that when using this option, the shell will attempt to directly run '/bin/busybox'. If you do not have the busybox binary sitting in that exact location with that exact name, this option will not work at all. config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING - bool "command line editing" + bool "Command line editing" default y depends on BUSYBOX_CONFIG_MSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH help @@ -250,28 +256,28 @@ config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING_VI turned on and off with "set -o vi" and "set +o vi". config BUSYBOX_CONFIG_FEATURE_COMMAND_HISTORY - int "history size" + int "History size" default 15 depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING help Specify command history size in shell. config BUSYBOX_CONFIG_FEATURE_COMMAND_SAVEHISTORY - bool "history saving" + bool "History saving" default n depends on BUSYBOX_CONFIG_ASH && BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING help Enable history saving in ash shell. config BUSYBOX_CONFIG_FEATURE_COMMAND_TAB_COMPLETION - bool "tab completion" + bool "Tab completion" default y depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING help Enable tab completion in shell. config BUSYBOX_CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION - bool "username completion" + bool "Username completion" default n depends on BUSYBOX_CONFIG_FEATURE_COMMAND_TAB_COMPLETION help diff --git a/openwrt/package/busybox/config/sysklogd/Config.in b/openwrt/package/busybox/config/sysklogd/Config.in index 209bdff053a..f1206956648 100644 --- a/openwrt/package/busybox/config/sysklogd/Config.in +++ b/openwrt/package/busybox/config/sysklogd/Config.in @@ -21,7 +21,7 @@ config BUSYBOX_CONFIG_SYSLOGD you wait long enough.... config BUSYBOX_CONFIG_FEATURE_ROTATE_LOGFILE - bool " Rotate message files" + bool "Rotate message files" default y depends on BUSYBOX_CONFIG_SYSLOGD help @@ -29,7 +29,7 @@ config BUSYBOX_CONFIG_FEATURE_ROTATE_LOGFILE on his own. No need to use an external rotatescript. config BUSYBOX_CONFIG_FEATURE_REMOTE_LOG - bool " Remote Log support" + bool "Remote Log support" default y depends on BUSYBOX_CONFIG_SYSLOGD help @@ -43,7 +43,7 @@ config BUSYBOX_CONFIG_FEATURE_REMOTE_LOG by an intruder. config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG - bool " Circular Buffer support" + bool "Circular Buffer support" default y depends on BUSYBOX_CONFIG_SYSLOGD help @@ -65,7 +65,7 @@ config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE used to record system log messages. config BUSYBOX_CONFIG_LOGREAD - bool " logread" + bool "logread" default y depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG help @@ -75,7 +75,7 @@ config BUSYBOX_CONFIG_LOGREAD stored in the syslogd circular buffer. config BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING - bool " logread double buffering" + bool "logread double buffering" default n depends on BUSYBOX_CONFIG_LOGREAD help diff --git a/openwrt/package/busybox/config/util-linux/Config.in b/openwrt/package/busybox/config/util-linux/Config.in index 474ef02f0d6..9081555ef4e 100644 --- a/openwrt/package/busybox/config/util-linux/Config.in +++ b/openwrt/package/busybox/config/util-linux/Config.in @@ -27,7 +27,7 @@ config BUSYBOX_CONFIG_FBSET if you wish to enable the 'fbset' utility. config BUSYBOX_CONFIG_FEATURE_FBSET_FANCY - bool " Turn on extra fbset options" + bool "Turn on extra fbset options" default n depends on BUSYBOX_CONFIG_FBSET help @@ -37,7 +37,7 @@ config BUSYBOX_CONFIG_FEATURE_FBSET_FANCY options. config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE - bool " Turn on fbset readmode support" + bool "Turn on fbset readmode support" default n depends on BUSYBOX_CONFIG_FBSET help @@ -80,7 +80,7 @@ config BUSYBOX_FDISK_SUPPORT_LARGE_DISKS Enable this option to support large disks > 4GB. config BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - bool " Write support" + bool "Write support" default n depends on BUSYBOX_CONFIG_FDISK help @@ -89,7 +89,7 @@ config BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE disabled, you will only be able to view the partition table. config BUSYBOX_CONFIG_FEATURE_AIX_LABEL - bool " Support AIX disklabels" + bool "Support AIX disklabels" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -97,7 +97,7 @@ config BUSYBOX_CONFIG_FEATURE_AIX_LABEL Most people can safely leave this option disabled. config BUSYBOX_CONFIG_FEATURE_SGI_LABEL - bool " Support SGI disklabels" + bool "Support SGI disklabels" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -105,7 +105,7 @@ config BUSYBOX_CONFIG_FEATURE_SGI_LABEL Most people can safely leave this option disabled. config BUSYBOX_CONFIG_FEATURE_SUN_LABEL - bool " Support SUN disklabels" + bool "Support SUN disklabels" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -113,7 +113,7 @@ config BUSYBOX_CONFIG_FEATURE_SUN_LABEL Most people can safely leave this option disabled. config BUSYBOX_CONFIG_FEATURE_OSF_LABEL - bool " Support BSD disklabels" + bool "Support BSD disklabels" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -121,7 +121,7 @@ config BUSYBOX_CONFIG_FEATURE_OSF_LABEL and define and edit BSD disk slices. config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED - bool " Support expert mode" + bool "Support expert mode" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -164,7 +164,7 @@ comment "Minix filesystem support" depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX config BUSYBOX_CONFIG_FEATURE_MINIX2 - bool " Support Minix fs v2 (fsck_minix/mkfs_minix)" + bool "Support Minix fs v2 (fsck_minix/mkfs_minix)" default n depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX help @@ -199,17 +199,17 @@ config BUSYBOX_CONFIG_HWCLOCK shutdown in the hardware clock, so the hardware will keep the correct time when Linux is _not_ running. -config BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONGOPTIONS - bool " Support long options (--hctosys,...)" +config BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS + bool "Support long options (--hctosys,...)" default n - depends on BUSYBOX_CONFIG_HWCLOCK + depends on BUSYBOX_CONFIG_HWCLOCK && BUSYBOX_CONFIG_GETOPT_LONG help By default, the hwclock utility only uses short options. If you are overly fond of its long options, such as --hctosys, --utc, etc) then enable this option. config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS - bool " Use FHS /var/lib/hwclock/adjtime" + bool "Use FHS /var/lib/hwclock/adjtime" default n depends on BUSYBOX_CONFIG_HWCLOCK help @@ -255,7 +255,7 @@ config BUSYBOX_CONFIG_MDEV from sysfs. config BUSYBOX_CONFIG_FEATURE_MDEV_CONF - bool " Support /etc/mdev.conf" + bool "Support /etc/mdev.conf" default n depends on BUSYBOX_CONFIG_MDEV help @@ -265,16 +265,31 @@ config BUSYBOX_CONFIG_FEATURE_MDEV_CONF That's device name (with regex match), uid:gid, and permissions. - Optionally, that can be followed (on the same line) by an asterisk - and a command line to run after creating the corresponding device(s), - ala: - - hdc root:cdrom 660 *ln -s hdc cdrom - Config file parsing stops on the first matching line. If no config entry is matched, devices are created with default 0:0 660. (Make the last line match .* to override this.) +config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC + bool "Support command execution at device addition/removal" + default n + depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF + help + This adds support for an optional field to /etc/mdev.conf, consisting + of a special character and a command line to run after creating the + corresponding device(s) and before removing, ala: + + hdc root:cdrom 660 *ln -s $MDEV cdrom + + The $MDEV environment variable is set to the name of the device. + + The special characters and their meanings are: + @ Run after creating the device. + $ Run before removing the device. + * Run both after creating and before removing the device. + + Commands are executed via system() so you need /bin/sh, meaning you + probably want to select a default shell in the Shells menu. + config BUSYBOX_CONFIG_MKSWAP bool "mkswap" default n @@ -288,6 +303,16 @@ config BUSYBOX_CONFIG_MKSWAP Once you have created swap space using 'mkswap' you need to enable the swap space using the 'swapon' utility. +config BUSYBOX_CONFIG_FEATURE_MKSWAP_V0 + bool "version 0 support" + default n + depends on BUSYBOX_CONFIG_MKSWAP +# depends on BUSYBOX_CONFIG_MKSWAP && BUSYBOX_CONFIG_DEPRECATED + help + Enable support for the old v0 style. + If your kernel is older than 2.1.117, then v0 support is the + only option. + config BUSYBOX_CONFIG_MORE bool "more" default y @@ -299,7 +324,7 @@ config BUSYBOX_CONFIG_MORE any need to reading text files, you can leave this disabled. config BUSYBOX_CONFIG_FEATURE_USE_TERMIOS - bool " Use termios to manipulate the screen" + bool "Use termios to manipulate the screen" default y depends on BUSYBOX_CONFIG_MORE help @@ -321,7 +346,7 @@ config BUSYBOX_CONFIG_MOUNT the 'mount' utility. config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS - bool " Support mounting NFS file systems" + bool "Support mounting NFS file systems" default y depends on BUSYBOX_CONFIG_MOUNT help @@ -403,7 +428,7 @@ config BUSYBOX_CONFIG_UMOUNT also want to enable 'umount'. config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL - bool " umount -a option" + bool "umount -a option" default y depends on BUSYBOX_CONFIG_UMOUNT help @@ -413,7 +438,7 @@ comment "Common options for mount/umount" depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP - bool " Support loopback mounts" + bool "Support loopback mounts" default y depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT help @@ -429,7 +454,7 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP (If you don't want umount to free the loop device, use "umount -D".) config BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT - bool " Support for the old /etc/mtab file" + bool "Support for the old /etc/mtab file" default n depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT help @@ -445,7 +470,11 @@ config BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT example a mount under chroot won't update it), can't handle modern features like separate per-process filesystem namespaces, requires that your /etc directory be writeable, tends to get easily confused - by --bind or --move mounts, and so on. (In brief: avoid.) + by --bind or --move mounts, won't update if you rename a directory + that contains a mount point, and so on. (In brief: avoid.) + + About the only reason to use this is if you've removed /proc from + your kernel. endmenu diff --git a/openwrt/package/busybox/patches/100-killall5.patch b/openwrt/package/busybox/patches/100-killall5.patch index 6f1585d0d4f..98282248009 100644 --- a/openwrt/package/busybox/patches/100-killall5.patch +++ b/openwrt/package/busybox/patches/100-killall5.patch @@ -1,18 +1,18 @@ -diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h ---- busybox-1.1.1/include/applets.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:23:43.000000000 +0200 -@@ -154,6 +154,7 @@ - USE_IPTUNNEL(APPLET(iptunnel, iptunnel_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_KILL(APPLET(kill, kill_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_KILLALL(APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -+USE_KILLALL5(APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_KLOGD(APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) - USE_LASH(APPLET(lash, lash_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_LAST(APPLET(last, last_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h ---- busybox-1.1.1/include/usage.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:22:53.000000000 +0200 -@@ -1598,6 +1598,13 @@ +diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h +--- busybox-1.2.0-old/include/applets.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0-new/include/applets.h 2006-07-31 00:29:34.000000000 +0200 +@@ -157,6 +157,7 @@ + USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_KILL(APPLET(kill, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_KILLALL(APPLET_ODDNAME(killall, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall)) ++USE_KILLALL5(APPLET_ODDNAME(killall5, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall5)) + USE_KLOGD(APPLET(klogd, _BB_DIR_SBIN, _BB_SUID_NEVER)) + USE_LASH(APPLET(lash, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LAST(APPLET(last, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -ruN busybox-1.2.0-old/include/usage.h busybox-1.2.0-new/include/usage.h +--- busybox-1.2.0-old/include/usage.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0-new/include/usage.h 2006-07-31 00:25:57.000000000 +0200 +@@ -1503,6 +1503,13 @@ #define killall_example_usage \ "$ killall apache\n" @@ -26,9 +26,9 @@ diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h #define klogd_trivial_usage \ "[-c n] [-n]" #define klogd_full_usage \ -diff -Nur busybox-1.1.1/procps/Config.in busybox-1.1.1-owrt/procps/Config.in ---- busybox-1.1.1/procps/Config.in 2006-03-22 22:16:25.000000000 +0100 -+++ busybox-1.1.1-owrt/procps/Config.in 2006-04-01 18:22:53.000000000 +0200 +diff -ruN busybox-1.2.0-old/procps/Config.in busybox-1.2.0-new/procps/Config.in +--- busybox-1.2.0-old/procps/Config.in 2006-07-01 00:42:12.000000000 +0200 ++++ busybox-1.2.0-new/procps/Config.in 2006-07-31 00:25:57.000000000 +0200 @@ -38,6 +38,11 @@ specified commands. If no signal name is specified, SIGTERM is sent. @@ -41,10 +41,10 @@ diff -Nur busybox-1.1.1/procps/Config.in busybox-1.1.1-owrt/procps/Config.in config CONFIG_PIDOF bool "pidof" default n -diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c ---- busybox-1.1.1/procps/kill.c 2006-03-22 22:16:25.000000000 +0100 -+++ busybox-1.1.1-owrt/procps/kill.c 2006-04-01 18:22:53.000000000 +0200 -@@ -34,6 +34,7 @@ +diff -ruN busybox-1.2.0-old/procps/kill.c busybox-1.2.0-new/procps/kill.c +--- busybox-1.2.0-old/procps/kill.c 2006-07-01 00:42:12.000000000 +0200 ++++ busybox-1.2.0-new/procps/kill.c 2006-07-31 00:25:57.000000000 +0200 +@@ -20,6 +20,7 @@ #define KILL 0 #define KILLALL 1 @@ -52,7 +52,7 @@ diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c int kill_main(int argc, char **argv) { -@@ -48,6 +49,9 @@ +@@ -34,6 +35,9 @@ #else whichApp = KILL; #endif @@ -62,7 +62,7 @@ diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c /* Parse any options */ if (argc < 2) -@@ -126,6 +130,20 @@ +@@ -112,6 +116,20 @@ } } diff --git a/openwrt/package/busybox/patches/110-telnetd.patch b/openwrt/package/busybox/patches/110-telnetd.patch index f14143aa62c..8ebb6de6454 100644 --- a/openwrt/package/busybox/patches/110-telnetd.patch +++ b/openwrt/package/busybox/patches/110-telnetd.patch @@ -1,7 +1,7 @@ -diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnetd.c ---- busybox-1.1.0/networking/telnetd.c 2006-01-11 06:43:51.000000000 +0100 -+++ busybox-1.1.0-owrt/networking/telnetd.c 2006-01-14 17:41:20.000000000 +0100 -@@ -45,6 +45,7 @@ +diff -ruN busybox-1.2.0-old/networking/telnetd.c busybox-1.2.0-new/networking/telnetd.c +--- busybox-1.2.0-old/networking/telnetd.c 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/telnetd.c 2006-07-31 10:52:30.000000000 +0200 +@@ -44,6 +44,7 @@ #include <arpa/telnet.h> #include <ctype.h> #include <sys/syslog.h> @@ -9,7 +9,7 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet #include "busybox.h" -@@ -394,11 +395,13 @@ +@@ -391,11 +392,13 @@ struct in_addr bind_addr = { .s_addr = 0x0 }; #endif /* CONFIG_FEATURE_TELNETD_INETD */ int c; @@ -25,7 +25,7 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet #endif /* CONFIG_FEATURE_TELNETD_INETD */ int maxlen, w, r; -@@ -413,6 +416,9 @@ +@@ -410,6 +413,9 @@ case 'f': issuefile = optarg; break; @@ -35,17 +35,17 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet case 'l': loginpath = optarg; break; -@@ -465,6 +471,13 @@ +@@ -459,6 +465,13 @@ sa.sin_addr = bind_addr; #endif -+ /* Set it to listen on the specified interface */ -+ if (interface_name) { -+ strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ); -+ (void)setsockopt(master_fd, SOL_SOCKET, -+ SO_BINDTODEVICE, &interface, sizeof(interface)); -+ } -+ - if (bind(master_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { - bb_perror_msg_and_die("bind"); - } ++ /* Set it to listen on the specified interface */ ++ if (interface_name) { ++ strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ); ++ (void)setsockopt(master_fd, SOL_SOCKET, ++ SO_BINDTODEVICE, &interface, sizeof(interface)); ++ } ++ + bb_xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa)); + bb_xlisten(master_fd, 1); + bb_xdaemon(0, 0); diff --git a/openwrt/package/busybox/patches/150-udhcp-release.patch b/openwrt/package/busybox/patches/150-udhcp-release.patch index 6420ae6a6a2..1e1c00ef29d 100644 --- a/openwrt/package/busybox/patches/150-udhcp-release.patch +++ b/openwrt/package/busybox/patches/150-udhcp-release.patch @@ -1,7 +1,7 @@ -diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h ---- busybox-1.1.1/include/usage.h 2006-04-01 18:26:21.000000000 +0200 -+++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:27:45.000000000 +0200 -@@ -3268,6 +3268,7 @@ +diff -ruN busybox-1.2.0-old/include/usage.h busybox-1.2.0-new/include/usage.h +--- busybox-1.2.0-old/include/usage.h 2006-07-31 10:47:56.000000000 +0200 ++++ busybox-1.2.0-new/include/usage.h 2006-07-31 11:08:49.000000000 +0200 +@@ -3190,6 +3190,7 @@ "\t-n,\t--now\tExit with failure if lease cannot be immediately negotiated\n" \ "\t-p,\t--pidfile=file\tStore process ID of daemon in file\n" \ "\t-q,\t--quit\tQuit after obtaining lease\n" \ @@ -9,10 +9,10 @@ diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h "\t-r,\t--request=IP\tIP address to request (default: none)\n" \ "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \ "\t-t,\t--retries=NUM\tSend up to NUM request packets\n"\ -diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/udhcp/dhcpc.c ---- busybox-1.1.1/networking/udhcp/dhcpc.c 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/udhcp/dhcpc.c 2006-04-01 18:28:19.000000000 +0200 -@@ -49,6 +49,7 @@ +diff -ruN busybox-1.2.0-old/networking/udhcp/dhcpc.c busybox-1.2.0-new/networking/udhcp/dhcpc.c +--- busybox-1.2.0-old/networking/udhcp/dhcpc.c 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/udhcp/dhcpc.c 2006-07-31 11:08:49.000000000 +0200 +@@ -47,6 +47,7 @@ .abort_if_no_lease = 0, .foreground = 0, .quit_after_lease = 0, @@ -20,15 +20,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u .background_if_no_lease = 0, .interface = "eth0", .pidfile = NULL, -@@ -82,6 +83,7 @@ - " immediately negotiated.\n" - " -p, --pidfile=file Store process ID of daemon in file\n" - " -q, --quit Quit after obtaining lease\n" -+" -R, --release Release IP on quit\n" - " -r, --request=IP IP address to request (default: none)\n" - " -s, --script=file Run file at dhcp events (default:\n" - " " DEFAULT_SCRIPT ")\n" -@@ -203,6 +205,7 @@ +@@ -163,6 +164,7 @@ {"now", no_argument, 0, 'n'}, {"pidfile", required_argument, 0, 'p'}, {"quit", no_argument, 0, 'q'}, @@ -36,7 +28,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u {"request", required_argument, 0, 'r'}, {"script", required_argument, 0, 's'}, {"timeout", required_argument, 0, 'T'}, -@@ -214,7 +217,7 @@ +@@ -174,7 +176,7 @@ /* get options */ while (1) { int option_index = 0; @@ -45,7 +37,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u if (c == -1) break; switch (c) { -@@ -284,6 +287,9 @@ +@@ -244,6 +246,9 @@ case 'q': client_config.quit_after_lease = 1; break; @@ -55,7 +47,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u case 'r': requested_ip = inet_addr(optarg); break; -@@ -527,8 +533,11 @@ +@@ -488,8 +493,11 @@ state = BOUND; change_mode(LISTEN_NONE); @@ -68,7 +60,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u if (!client_config.foreground) client_background(); -@@ -553,12 +562,13 @@ +@@ -514,12 +522,13 @@ case SIGUSR1: perform_renew(); break; @@ -85,10 +77,10 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u } } else if (retval == -1 && errno == EINTR) { /* a signal was caught */ -diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.h busybox-1.1.1-owrt/networking/udhcp/dhcpc.h ---- busybox-1.1.1/networking/udhcp/dhcpc.h 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/udhcp/dhcpc.h 2006-04-01 18:27:45.000000000 +0200 -@@ -19,6 +19,7 @@ +diff -ruN busybox-1.2.0-old/networking/udhcp/dhcpc.h busybox-1.2.0-new/networking/udhcp/dhcpc.h +--- busybox-1.2.0-old/networking/udhcp/dhcpc.h 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/udhcp/dhcpc.h 2006-07-31 11:08:49.000000000 +0200 +@@ -18,6 +18,7 @@ struct client_config_t { char foreground; /* Do not fork */ char quit_after_lease; /* Quit after obtaining lease */ diff --git a/openwrt/package/busybox/patches/300-netmsg.patch b/openwrt/package/busybox/patches/300-netmsg.patch index ad4fcd04d06..428e321390d 100644 --- a/openwrt/package/busybox/patches/300-netmsg.patch +++ b/openwrt/package/busybox/patches/300-netmsg.patch @@ -1,21 +1,23 @@ - - Copyright (C) 2006 OpenWrt.org - -diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h ---- busybox-1.1.1/include/applets.h 2006-04-01 18:26:21.000000000 +0200 -+++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:36:28.000000000 +0200 -@@ -197,6 +197,7 @@ - USE_MV(APPLET(mv, mv_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_NAMEIF(APPLET(nameif, nameif_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) - USE_NC(APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -+USE_NETMSG(APPLET_NOUSAGE(netmsg, netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) - USE_NETSTAT(APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_NICE(APPLET(nice, nice_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_NOHUP(APPLET(nohup, nohup_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -diff -Nur busybox-1.1.1/networking/Config.in busybox-1.1.1-owrt/networking/Config.in ---- busybox-1.1.1/networking/Config.in 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/Config.in 2006-04-01 18:35:32.000000000 +0200 -@@ -451,6 +451,12 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h +--- busybox-1.2.0-old/include/applets.h 2006-07-31 10:47:56.000000000 +0200 ++++ busybox-1.2.0-new/include/applets.h 2006-07-31 11:21:00.000000000 +0200 +@@ -200,6 +200,7 @@ + USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER)) + USE_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) ++USE_NETMSG(APPLET_NOUSAGE(netmsg, netmsg, _BB_DIR_BIN, _BB_SUID_ALWAYS)) + USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -ruN busybox-1.2.0-old/networking/Config.in busybox-1.2.0-new/networking/Config.in +--- busybox-1.2.0-old/networking/Config.in 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/Config.in 2006-07-31 11:18:01.000000000 +0200 +@@ -445,6 +445,12 @@ help A simple Unix utility which reads and writes data across network connections. @@ -28,9 +30,9 @@ diff -Nur busybox-1.1.1/networking/Config.in busybox-1.1.1-owrt/networking/Confi config CONFIG_NC_GAPING_SECURITY_HOLE bool "gaping security hole" -diff -Nur busybox-1.1.1/networking/Makefile.in busybox-1.1.1-owrt/networking/Makefile.in ---- busybox-1.1.1/networking/Makefile.in 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/Makefile.in 2006-04-01 18:35:32.000000000 +0200 +diff -ruN busybox-1.2.0-old/networking/Makefile.in busybox-1.2.0-new/networking/Makefile.in +--- busybox-1.2.0-old/networking/Makefile.in 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/Makefile.in 2006-07-31 11:18:01.000000000 +0200 @@ -30,6 +30,7 @@ NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o NETWORKING-$(CONFIG_NAMEIF) += nameif.o @@ -39,9 +41,9 @@ diff -Nur busybox-1.1.1/networking/Makefile.in busybox-1.1.1-owrt/networking/Mak NETWORKING-$(CONFIG_NETSTAT) += netstat.o NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o NETWORKING-$(CONFIG_PING) += ping.o -diff -Nur busybox-1.1.1/networking/netmsg.c busybox-1.1.1-owrt/networking/netmsg.c ---- busybox-1.1.1/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/netmsg.c 2006-04-01 18:35:32.000000000 +0200 +diff -ruN busybox-1.2.0-old/networking/netmsg.c busybox-1.2.0-new/networking/netmsg.c +--- busybox-1.2.0-old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0-new/networking/netmsg.c 2006-07-31 11:18:01.000000000 +0200 @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> diff --git a/openwrt/package/busybox/patches/320-httpd_address_binding.patch b/openwrt/package/busybox/patches/320-httpd_address_binding.patch index b9503aa02a2..68487b88c7a 100644 --- a/openwrt/package/busybox/patches/320-httpd_address_binding.patch +++ b/openwrt/package/busybox/patches/320-httpd_address_binding.patch @@ -1,28 +1,20 @@ - - Copyright (C) 2006 OpenWrt.org - ---- busybox-1.1.1/networking/httpd.c 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1.new/networking/httpd.c 2006-04-01 19:41:42.150744624 +0200 -@@ -110,6 +110,7 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +diff -ruN busybox-1.2.0-old/networking/httpd.c busybox-1.2.0-new/networking/httpd.c +--- busybox-1.2.0-old/networking/httpd.c 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/httpd.c 2006-08-01 10:06:58.000000000 +0200 +@@ -99,6 +99,7 @@ #include <sys/types.h> #include <sys/socket.h> /* for connect and socket*/ #include <netinet/in.h> /* for sockaddr_in */ +#include <arpa/inet.h> - #include <sys/time.h> #include <sys/stat.h> #include <sys/wait.h> -@@ -204,8 +205,8 @@ - - void bb_show_usage(void) - { -- fprintf(stderr, "Usage: %s [-p <port>] [-c configFile] [-d/-e <string>] " -- "[-r realm] [-u user] [-h homedir]\n", bb_applet_name); -+ fprintf(stderr, "Usage: %s [-p <port>] [-l <IP address>] [-c configFile]" -+ "[-d/-e <string>] [-r realm] [-u user] [-h homedir]\n", bb_applet_name); - exit(1); - } - #endif -@@ -255,6 +256,7 @@ + #include <fcntl.h> /* for open modes */ +@@ -165,6 +166,7 @@ #endif unsigned port; /* server initial port and for set env REMOTE_PORT */ @@ -30,7 +22,7 @@ union HTTPD_FOUND { const char *found_mime_type; const char *found_moved_temporarily; -@@ -958,7 +960,10 @@ +@@ -868,7 +870,10 @@ /* inet_addr() returns a value that is already in network order */ memset(&lsocket, 0, sizeof(lsocket)); lsocket.sin_family = AF_INET; @@ -39,61 +31,61 @@ + if (config->address != NULL) lsocket.sin_addr.s_addr = ((struct in_addr *) ((gethostbyname(config->address))->h_addr))->s_addr; + else lsocket.sin_addr.s_addr = htons(INADDR_ANY); + } - lsocket.sin_port = htons(config->port) ; - fd = socket(AF_INET, SOCK_STREAM, 0); - if (fd >= 0) { -@@ -1996,6 +2001,7 @@ + lsocket.sin_port = htons(config->port); + fd = bb_xsocket(AF_INET, SOCK_STREAM, 0); + /* tell the OS it's OK to reuse a previous address even though */ +@@ -1899,6 +1904,7 @@ USE_FEATURE_HTTPD_AUTH_MD5(m_opt_md5,) USE_FEATURE_HTTPD_SETUID(u_opt_setuid,) - SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(p_opt_port,) -+ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(l_opt_addr,) + USE_FEATURE_HTTPD_WITHOUT_INETD(p_opt_port,) ++ USE_FEATURE_HTTPD_WITHOUT_INETD(l_opt_addr,) }; static const char httpd_opts[]="c:d:h:" -@@ -2003,7 +2009,7 @@ +@@ -1906,7 +1912,7 @@ USE_FEATURE_HTTPD_BASIC_AUTH("r:") USE_FEATURE_HTTPD_AUTH_MD5("m:") USE_FEATURE_HTTPD_SETUID("u:") -- SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY("p:"); -+ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY("p:l:"); +- USE_FEATURE_HTTPD_WITHOUT_INETD("p:"); ++ USE_FEATURE_HTTPD_WITHOUT_INETD("p:l:"); #define OPT_CONFIG_FILE (1<<c_opt_config_file) #define OPT_DECODE_URL (1<<d_opt_decode_url) -@@ -2024,6 +2030,8 @@ - #define OPT_PORT SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY((1<<p_opt_port)) \ - USE_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(0) +@@ -1927,6 +1933,8 @@ + #define OPT_PORT USE_FEATURE_HTTPD_WITHOUT_INETD((1<<p_opt_port)) \ + SKIP_FEATURE_HTTPD_WITHOUT_INETD(0) -+#define OPT_ADDRESS SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY((1<<l_opt_addr)) \ -+ USE_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(0) ++#define OPT_ADDRESS USE_FEATURE_HTTPD_WITHOUT_INETD((1<<l_opt_addr)) \ ++ SKIP_FEATURE_HTTPD_WITHOUT_INETD(0) - #ifdef HTTPD_STANDALONE - int main(int argc, char *argv[]) -@@ -2036,6 +2044,7 @@ + int httpd_main(int argc, char *argv[]) + { +@@ -1935,6 +1943,7 @@ char *url_for_decode; USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;) - SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(const char *s_port;) -+ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(const char *s_addr;) - SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(int server;) + USE_FEATURE_HTTPD_WITHOUT_INETD(const char *s_port;) ++ USE_FEATURE_HTTPD_WITHOUT_INETD(const char *s_addr;) + USE_FEATURE_HTTPD_WITHOUT_INETD(int server;) USE_FEATURE_HTTPD_SETUID(const char *s_uid;) -@@ -2050,6 +2059,7 @@ +@@ -1949,6 +1958,7 @@ - #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY + #ifdef CONFIG_FEATURE_HTTPD_WITHOUT_INETD config->port = 80; + config->address = ""; #endif config->ContentLength = -1; -@@ -2061,6 +2071,7 @@ +@@ -1960,6 +1970,7 @@ USE_FEATURE_HTTPD_AUTH_MD5(, &pass) USE_FEATURE_HTTPD_SETUID(, &s_uid) - SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(, &s_port) -+ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(, &s_addr) + USE_FEATURE_HTTPD_WITHOUT_INETD(, &s_port) ++ USE_FEATURE_HTTPD_WITHOUT_INETD(, &s_addr) ); if(opt & OPT_DECODE_URL) { -@@ -2082,6 +2093,8 @@ - #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY +@@ -1981,6 +1992,8 @@ + #ifdef CONFIG_FEATURE_HTTPD_WITHOUT_INETD if(opt & OPT_PORT) config->port = bb_xgetlarg(s_port, 10, 1, 0xffff); + if (opt & OPT_ADDRESS) diff --git a/openwrt/package/busybox/patches/340-lock_util.patch b/openwrt/package/busybox/patches/340-lock_util.patch index ad594e68db5..a86948d597d 100644 --- a/openwrt/package/busybox/patches/340-lock_util.patch +++ b/openwrt/package/busybox/patches/340-lock_util.patch @@ -1,21 +1,23 @@ - - Copyright (C) 2006 OpenWrt.org - -diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h ---- busybox.old/include/applets.h 2006-04-05 01:06:29.000000000 +0200 -+++ busybox.dev/include/applets.h 2006-04-05 01:19:09.000000000 +0200 -@@ -167,6 +167,7 @@ - USE_LN(APPLET(ln, ln_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_LOADFONT(APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_LOADKMAP(APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) -+USE_LOCK(APPLET_NOUSAGE(lock, lock_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_LOGGER(APPLET(logger, logger_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_LOGIN(APPLET(login, login_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) - USE_LOGNAME(APPLET(logname, logname_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -diff -urN busybox.old/miscutils/Config.in busybox.dev/miscutils/Config.in ---- busybox.old/miscutils/Config.in 2006-03-22 22:16:24.000000000 +0100 -+++ busybox.dev/miscutils/Config.in 2006-04-05 01:07:12.000000000 +0200 -@@ -209,6 +209,12 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h +--- busybox-1.2.0-old/include/applets.h 2006-07-31 11:21:00.000000000 +0200 ++++ busybox-1.2.0-new/include/applets.h 2006-08-01 10:21:15.000000000 +0200 +@@ -169,6 +169,7 @@ + USE_LN(APPLET(ln, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER)) ++USE_LOCK(APPLET_NOUSAGE(lock, lock, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS)) + USE_LOGNAME(APPLET(logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -ruN busybox-1.2.0-old/miscutils/Config.in busybox-1.2.0-new/miscutils/Config.in +--- busybox-1.2.0-old/miscutils/Config.in 2006-07-01 00:42:09.000000000 +0200 ++++ busybox-1.2.0-new/miscutils/Config.in 2006-08-01 10:21:15.000000000 +0200 +@@ -231,6 +231,12 @@ Enables the 'hdparm -d' option to get/set using_dma flag. This is dangerous stuff, so you should probably say N. @@ -28,20 +30,9 @@ diff -urN busybox.old/miscutils/Config.in busybox.dev/miscutils/Config.in config CONFIG_MAKEDEVS bool "makedevs" default n -diff -urN busybox.old/miscutils/Makefile.in busybox.dev/miscutils/Makefile.in ---- busybox.old/miscutils/Makefile.in 2006-03-22 22:16:24.000000000 +0100 -+++ busybox.dev/miscutils/Makefile.in 2006-04-05 01:10:50.000000000 +0200 -@@ -20,6 +20,7 @@ - MISCUTILS-$(CONFIG_EJECT) += eject.o - MISCUTILS-$(CONFIG_HDPARM) += hdparm.o - MISCUTILS-$(CONFIG_LAST) += last.o -+MISCUTILS-$(CONFIG_LOCK) += lock.o - MISCUTILS-${CONFIG_LESS} += less.o - MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o - MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o -diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c ---- busybox.old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox.dev/miscutils/lock.c 2006-04-05 01:07:12.000000000 +0200 +diff -ruN busybox-1.2.0-old/miscutils/lock.c busybox-1.2.0-new/miscutils/lock.c +--- busybox-1.2.0-old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0-new/miscutils/lock.c 2006-08-01 10:21:15.000000000 +0200 @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> @@ -176,3 +167,14 @@ diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c + else + return do_lock(); +} +diff -ruN busybox-1.2.0-old/miscutils/Makefile.in busybox-1.2.0-new/miscutils/Makefile.in +--- busybox-1.2.0-old/miscutils/Makefile.in 2006-07-01 00:42:09.000000000 +0200 ++++ busybox-1.2.0-new/miscutils/Makefile.in 2006-08-01 10:21:15.000000000 +0200 +@@ -20,6 +20,7 @@ + MISCUTILS-$(CONFIG_EJECT) += eject.o + MISCUTILS-$(CONFIG_HDPARM) += hdparm.o + MISCUTILS-$(CONFIG_LAST) += last.o ++MISCUTILS-$(CONFIG_LOCK) += lock.o + MISCUTILS-${CONFIG_LESS} += less.o + MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o + MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o diff --git a/openwrt/package/busybox/patches/911-ipkg.patch b/openwrt/package/busybox/patches/911-ipkg.patch index 1d7a4e35746..1824e03c426 100644 --- a/openwrt/package/busybox/patches/911-ipkg.patch +++ b/openwrt/package/busybox/patches/911-ipkg.patch @@ -1,21 +1,13 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # # add ipkg support to busybox # -diff -ruN busybox-1.1.2-orig/Makefile busybox-1.1.2+ipkg-0.99.162/Makefile ---- busybox-1.1.2-orig/Makefile 2006-04-10 21:45:46.000000000 +0200 -+++ busybox-1.1.2+ipkg-0.99.162/Makefile 2006-05-09 02:06:48.000000000 +0200 -@@ -25,7 +25,7 @@ - export srctree=$(top_srcdir) - vpath %/Config.in $(srctree) - --DIRS:=applets archival archival/libunarchive coreutils console-tools \ -+DIRS:=applets archival archival/libipkg archival/libunarchive coreutils console-tools \ - debianutils editors findutils init miscutils modutils networking \ - networking/libiproute networking/udhcp procps loginutils shell \ - sysklogd util-linux e2fsprogs libpwdgrp coreutils/libcoreutils libbb -diff -ruN busybox-1.1.2-orig/archival/Config.in busybox-1.1.2+ipkg-0.99.162/archival/Config.in ---- busybox-1.1.2-orig/archival/Config.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/Config.in 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/Config.in busybox-1.2.0+ipkg-0.99.162/archival/Config.in +--- busybox-1.2.0-orig/archival/Config.in 2006-07-01 00:42:04.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/Config.in 2006-07-22 16:31:25.000000000 +0200 @@ -121,6 +121,14 @@ gzip is used to compress files. It's probably the most widely used UNIX compression program. @@ -31,21 +23,10 @@ diff -ruN busybox-1.1.2-orig/archival/Config.in busybox-1.1.2+ipkg-0.99.162/arch config CONFIG_RPM2CPIO bool "rpm2cpio" default n -diff -ruN busybox-1.1.2-orig/archival/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/Makefile.in ---- busybox-1.1.2-orig/archival/Makefile.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/Makefile.in 2006-05-09 02:06:48.000000000 +0200 -@@ -20,6 +20,7 @@ - ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o - ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o - ARCHIVAL-$(CONFIG_GZIP) += gzip.o -+ARCHIVAL-$(CONFIG_IPKG) += ipkg.o - ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o - ARCHIVAL-$(CONFIG_RPM) += rpm.o - ARCHIVAL-$(CONFIG_TAR) += tar.o -diff -ruN busybox-1.1.2-orig/archival/dpkg.c busybox-1.1.2+ipkg-0.99.162/archival/dpkg.c ---- busybox-1.1.2-orig/archival/dpkg.c 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/dpkg.c 2006-05-09 02:06:48.000000000 +0200 -@@ -1530,6 +1530,10 @@ +diff -ruN busybox-1.2.0-orig/archival/dpkg.c busybox-1.2.0+ipkg-0.99.162/archival/dpkg.c +--- busybox-1.2.0-orig/archival/dpkg.c 2006-07-01 00:42:04.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/dpkg.c 2006-07-22 16:31:25.000000000 +0200 +@@ -1430,6 +1430,10 @@ return(ar_handle->sub_archive->buffer); } @@ -56,7 +37,7 @@ diff -ruN busybox-1.1.2-orig/archival/dpkg.c busybox-1.1.2+ipkg-0.99.162/archiva static void data_extract_all_prefix(archive_handle_t *archive_handle) { char *name_ptr = archive_handle->file_header->name; -@@ -1544,6 +1548,8 @@ +@@ -1442,6 +1446,8 @@ return; } @@ -65,9 +46,9 @@ diff -ruN busybox-1.1.2-orig/archival/dpkg.c busybox-1.1.2+ipkg-0.99.162/archiva static void unpack_package(deb_file_t *deb_file) { const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name]; -diff -ruN busybox-1.1.2-orig/archival/ipkg.c busybox-1.1.2+ipkg-0.99.162/archival/ipkg.c ---- busybox-1.1.2-orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/ipkg.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/ipkg.c busybox-1.2.0+ipkg-0.99.162/archival/ipkg.c +--- busybox-1.2.0-orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/ipkg.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,26 @@ +/* ipkg.c - the itsy package management system + @@ -95,134 +76,9 @@ diff -ruN busybox-1.1.2-orig/archival/ipkg.c busybox-1.1.2+ipkg-0.99.162/archiva +{ + return ipkg_op(argc, argv); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/Makefile busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile ---- busybox-1.1.2-orig/archival/libipkg/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile 2006-05-09 02:06:48.000000000 +0200 -@@ -0,0 +1,32 @@ -+# Makefile for busybox -+# -+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.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 -+# 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 -+# -+ -+top_srcdir=../.. -+top_builddir=../.. -+srcdir=$(top_srcdir)/archival/libipkg -+LIBIPKG_DIR:=./ -+include $(top_builddir)/Rules.mak -+include $(top_builddir)/.config -+include $(srcdir)/Makefile.in -+all: $(libraries-y) -+-include $(top_builddir)/.depend -+ -+clean: -+ rm -f *.o *.a $(AR_TARGET) -+ -diff -ruN busybox-1.1.2-orig/archival/libipkg/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile.in ---- busybox-1.1.2-orig/archival/libipkg/Makefile.in 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile.in 2006-05-09 02:06:48.000000000 +0200 -@@ -0,0 +1,85 @@ -+# Makefile for busybox -+# -+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.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 -+# 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 -+# -+ -+LIBIPKG_AR:=libipkg.a -+ifndef $(LIBIPKG_DIR) -+LIBIPKG_DIR:=$(top_builddir)/archival/libipkg/ -+endif -+srcdir=$(top_srcdir)/archival/libipkg -+ -+LIBIPKG_CORE_SOURCES:= \ -+ args.c \ -+ libipkg.c \ -+ user.c \ -+ -+LIBIPKG_CMD_SOURCES:= \ -+ ipkg_cmd.c \ -+ ipkg_configure.c \ -+ ipkg_download.c \ -+ ipkg_install.c \ -+ ipkg_remove.c \ -+ ipkg_upgrade.c \ -+ -+LIBIPKG_DB_SOURCES:= \ -+ hash_table.c \ -+ ipkg_conf.c \ -+ ipkg_utils.c \ -+ pkg.c \ -+ pkg_depends.c \ -+ pkg_extract.c \ -+ pkg_hash.c \ -+ pkg_parse.c \ -+ pkg_vec.c \ -+ -+LIBIPKG_LIST_SOURCES:= \ -+ conffile.c \ -+ conffile_list.c \ -+ nv_pair.c \ -+ nv_pair_list.c \ -+ pkg_dest.c \ -+ pkg_dest_list.c \ -+ pkg_src.c \ -+ pkg_src_list.c \ -+ str_list.c \ -+ void_list.c \ -+ -+LIBIPKG_UTIL_SOURCES:= \ -+ file_util.c \ -+ ipkg_message.c \ -+ md5.c \ -+ str_util.c \ -+ xsystem.c \ -+ -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CORE_SOURCES) -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CMD_SOURCES) -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_DB_SOURCES) -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_LIST_SOURCES) -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_SOURCES) -+LIBIPKG_OBJS=$(patsubst %.c,$(LIBIPKG_DIR)%.o, $(LIBIPKG-y)) -+ -+CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(TARGET_ARCH)\"" -+ -+libraries-$(CONFIG_IPKG) += $(LIBIPKG_DIR)$(LIBIPKG_AR) -+ -+$(LIBIPKG_DIR)$(LIBIPKG_AR): $(LIBIPKG_OBJS) -+ $(do_ar) -+ -+$(LIBIPKG_OBJS): $(LIBIPKG_DIR)%.o : $(srcdir)/%.c -+ $(compile.c) -+ -diff -ruN busybox-1.1.2-orig/archival/libipkg/args.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.c ---- busybox-1.1.2-orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.c 2006-05-09 02:12:03.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/args.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.c +--- busybox-1.2.0-orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,242 @@ +/* args.c - parse command-line args + @@ -466,9 +322,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/args.c busybox-1.1.2+ipkg-0.99.162 +{ + bb_error_msg("version %s\n", IPKG_VERSION); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/args.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.h ---- busybox-1.1.2-orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.h 2006-05-09 02:12:03.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/args.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.h +--- busybox-1.2.0-orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,72 @@ +/* args.h - parse command-line args + @@ -542,9 +398,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/args.h busybox-1.1.2+ipkg-0.99.162 +void args_usage(char *complaint); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.c ---- busybox-1.1.2-orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.c +--- busybox-1.2.0-orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,64 @@ +/* conffile.c - the itsy package management system + @@ -610,9 +466,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.c busybox-1.1.2+ipkg-0.99 + + return ret; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.h ---- busybox-1.1.2-orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.h +--- busybox-1.2.0-orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,30 @@ +/* conffile.h - the itsy package management system + @@ -644,9 +500,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.h busybox-1.1.2+ipkg-0.99 + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.c ---- busybox-1.1.2-orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.c +--- busybox-1.2.0-orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,47 @@ +/* conffile_list.c - the itsy package management system + @@ -695,9 +551,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.c busybox-1.1.2+ipkg + return nv_pair_list_pop(list); +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.h ---- busybox-1.1.2-orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.h +--- busybox-1.2.0-orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,36 @@ +/* conffile_list.h - the itsy package management system + @@ -735,9 +591,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.h busybox-1.1.2+ipkg + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c ---- busybox-1.1.2-orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/file_util.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.c +--- busybox-1.2.0-orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,177 @@ +/* file_util.c - convenience routines for common stat operations + @@ -916,9 +772,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.c busybox-1.1.2+ipkg-0.9 + return md5sum_hex; +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.h ---- busybox-1.1.2-orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/file_util.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.h +--- busybox-1.2.0-orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,29 @@ +/* file_util.h - convenience routines for common file operations + @@ -949,9 +805,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.h busybox-1.1.2+ipkg-0.9 +char *file_md5sum_alloc(const char *file_name); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.c ---- busybox-1.1.2-orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/hash_table.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.c +--- busybox-1.2.0-orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,155 @@ +/* hash.c - hash tables for ipkg + @@ -1108,9 +964,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.c busybox-1.1.2+ipkg-0. + } +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.h ---- busybox-1.1.2-orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/hash_table.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.h +--- busybox-1.2.0-orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,44 @@ +/* hash.h - hash tables for ipkg + @@ -1156,87 +1012,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.h busybox-1.1.2+ipkg-0. +void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data); + +#endif /* _HASH_TABLE_H_ */ -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg.h 2006-05-09 02:06:48.000000000 +0200 -@@ -0,0 +1,74 @@ -+/* ipkg.h - the itsy package management system -+ -+ Carl D. Worth -+ -+ Copyright (C) 2001 University of Southern California -+ -+ 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, 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. -+*/ -+ -+#ifndef IPKG_H -+#define IPKG_H -+ -+/* -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+*/ -+ -+#if 0 -+#define IPKG_DEBUG_NO_TMP_CLEANUP -+#endif -+ -+#include "ipkg_includes.h" -+#include "ipkg_conf.h" -+#include "ipkg_message.h" -+ -+#define IPKG_PKG_EXTENSION ".ipk" -+#define DPKG_PKG_EXTENSION ".deb" -+ -+#define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-" -+#define IPKG_PKG_VERSION_SEP_CHAR '_' -+ -+#define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg" -+#define IPKG_LISTS_DIR_SUFFIX "lists" -+#define IPKG_INFO_DIR_SUFFIX "info" -+#define IPKG_STATUS_FILE_SUFFIX "status" -+ -+#define IPKG_BACKUP_SUFFIX "-ipkg.backup" -+ -+#define IPKG_LIST_DESCRIPTION_LENGTH 128 -+ -+#define IPKG_VERSION "0.99.162" -+ -+ -+enum ipkg_error { -+ IPKG_SUCCESS = 0, -+ IPKG_PKG_DEPS_UNSATISFIED, -+ IPKG_PKG_IS_ESSENTIAL, -+ IPKG_PKG_HAS_DEPENDENTS, -+ IPKG_PKG_HAS_NO_CANDIDATE -+}; -+typedef enum ipkg_error ipkg_error_t; -+ -+extern int ipkg_state_changed; -+ -+ -+struct errlist { -+ char * errmsg; -+ struct errlist * next; -+} ; -+ -+extern struct errlist* error_list; -+ -+extern ipkg_conf_t *global_conf; -+ -+#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c 2006-05-09 02:23:37.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,1431 @@ +/* ipkg_cmd.c - the itsy package management system + @@ -2669,9 +2447,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.c busybox-1.1.2+ipkg-0.99 +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,46 @@ +/* ipkg_cmd.h - the itsy package management system + @@ -2719,9 +2497,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.h busybox-1.1.2+ipkg-0.99 +int pkg_mark_provides(pkg_t *pkg); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_conf.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,711 @@ +/* ipkg_conf.c - the itsy package management system + @@ -3434,9 +3212,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.c busybox-1.1.2+ipkg-0.9 + sprintf_alloc(&root_filename, "%s%s", (conf->offline_root ? conf->offline_root : ""), filename); + return root_filename; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_conf.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,107 @@ +/* ipkg_conf.h - the itsy package management system + @@ -3545,9 +3323,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.h busybox-1.1.2+ipkg-0.9 +char *root_filename_alloc(ipkg_conf_t *conf, char *filename); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,40 @@ +/* ipkg_configure.c - the itsy package management system + @@ -3589,9 +3367,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.c busybox-1.1.2+ipk + return 0; +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,25 @@ +/* ipkg_configure.h - the itsy package management system + @@ -3618,9 +3396,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.h busybox-1.1.2+ipk +int ipkg_configure(ipkg_conf_t *ipkg_conf, pkg_t *pkg); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,195 @@ +/* ipkg_download.c - the itsy package management system + @@ -3817,9 +3595,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.c busybox-1.1.2+ipkg + } + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,30 @@ +/* ipkg_download.h - the itsy package management system + @@ -3851,9 +3629,87 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.h busybox-1.1.2+ipkg +int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_includes.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_includes.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_includes.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg.h 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,74 @@ ++/* ipkg.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ 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, 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. ++*/ ++ ++#ifndef IPKG_H ++#define IPKG_H ++ ++/* ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++*/ ++ ++#if 0 ++#define IPKG_DEBUG_NO_TMP_CLEANUP ++#endif ++ ++#include "ipkg_includes.h" ++#include "ipkg_conf.h" ++#include "ipkg_message.h" ++ ++#define IPKG_PKG_EXTENSION ".ipk" ++#define DPKG_PKG_EXTENSION ".deb" ++ ++#define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-" ++#define IPKG_PKG_VERSION_SEP_CHAR '_' ++ ++#define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg" ++#define IPKG_LISTS_DIR_SUFFIX "lists" ++#define IPKG_INFO_DIR_SUFFIX "info" ++#define IPKG_STATUS_FILE_SUFFIX "status" ++ ++#define IPKG_BACKUP_SUFFIX "-ipkg.backup" ++ ++#define IPKG_LIST_DESCRIPTION_LENGTH 128 ++ ++#define IPKG_VERSION "0.99.162" ++ ++ ++enum ipkg_error { ++ IPKG_SUCCESS = 0, ++ IPKG_PKG_DEPS_UNSATISFIED, ++ IPKG_PKG_IS_ESSENTIAL, ++ IPKG_PKG_HAS_DEPENDENTS, ++ IPKG_PKG_HAS_NO_CANDIDATE ++}; ++typedef enum ipkg_error ipkg_error_t; ++ ++extern int ipkg_state_changed; ++ ++ ++struct errlist { ++ char * errmsg; ++ struct errlist * next; ++} ; ++ ++extern struct errlist* error_list; ++ ++extern ipkg_conf_t *global_conf; ++ ++#endif +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_includes.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_includes.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_includes.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,79 @@ +#ifndef IPKG_INCLUDES_H +#define IPKG_INCLUDES_H @@ -3934,9 +3790,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_includes.h busybox-1.1.2+ipkg +#endif + +#endif /* IPKG_INCLUDES_H */ -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,1942 @@ +/* ipkg_install.c - the itsy package management system + @@ -5880,9 +5736,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.c busybox-1.1.2+ipkg- +} + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.h 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,35 @@ +/* ipkg_install.h - the itsy package management system + @@ -5919,9 +5775,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.h busybox-1.1.2+ipkg- +int name_mark_dependencies_for_installation(ipkg_conf_t *conf, const char *pkg_name, pkg_vec_t *pkgs_needed); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_message.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,61 @@ +/* ipkg_message.c - the itsy package management system + @@ -5984,9 +5840,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.c busybox-1.1.2+ipkg- + } +} +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_message.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,32 @@ +/* ipkg_message.h - the itsy package management system + @@ -6020,9 +5876,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.h busybox-1.1.2+ipkg- +extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, char *fmt, ...); + +#endif /* _IPKG_MESSAGE_H_ */ -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_remove.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,383 @@ +/* ipkg_remove.c - the itsy package management system + @@ -6407,9 +6263,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.c busybox-1.1.2+ipkg-0 + + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.h 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_remove.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,33 @@ +/* ipkg_remove.h - the itsy package management system + @@ -6444,9 +6300,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.h busybox-1.1.2+ipkg-0 + + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,77 @@ +/* ipkg_upgrade.c - the itsy package management system + @@ -6525,9 +6381,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.c busybox-1.1.2+ipkg- + new->state_flag |= SF_USER; + return ipkg_install_pkg(conf, new,1); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,18 @@ +/* ipkg_upgrade.c - the itsy package management system + @@ -6547,9 +6403,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.h busybox-1.1.2+ipkg- +#include "ipkg.h" + +int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old); -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_utils.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,181 @@ +/* ipkg_utils.c - the itsy package management system + @@ -6732,9 +6588,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.c busybox-1.1.2+ipkg-0. +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_utils.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,29 @@ +/* ipkg_utils.h - the itsy package management system + @@ -6765,9 +6621,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.h busybox-1.1.2+ipkg-0. +int line_is_blank(const char *line); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c ---- busybox-1.1.2-orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/libipkg.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.c +--- busybox-1.2.0-orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,527 @@ +/* ipkglib.c - the itsy package management system + @@ -7296,9 +7152,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.c busybox-1.1.2+ipkg-0.99. +} + +#endif /* IPKG_LIB */ -diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.h ---- busybox-1.1.2-orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/libipkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.h +--- busybox-1.2.0-orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,87 @@ +/* ipkglib.h - the itsy package management system + @@ -7387,9 +7243,134 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.h busybox-1.1.2+ipkg-0.99. + + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c ---- busybox-1.1.2-orig/archival/libipkg/md5.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/Makefile busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile +--- busybox-1.2.0-orig/archival/libipkg/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,32 @@ ++# Makefile for busybox ++# ++# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.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 ++# 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 ++# ++ ++top_srcdir=../.. ++top_builddir=../.. ++srcdir=$(top_srcdir)/archival/libipkg ++LIBIPKG_DIR:=./ ++include $(top_builddir)/Rules.mak ++include $(top_builddir)/.config ++include $(srcdir)/Makefile.in ++all: $(libraries-y) ++-include $(top_builddir)/.depend ++ ++clean: ++ rm -f *.o *.a $(AR_TARGET) ++ +diff -ruN busybox-1.2.0-orig/archival/libipkg/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile.in +--- busybox-1.2.0-orig/archival/libipkg/Makefile.in 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile.in 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,85 @@ ++# Makefile for busybox ++# ++# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.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 ++# 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 ++# ++ ++LIBIPKG_AR:=libipkg.a ++ifndef $(LIBIPKG_DIR) ++LIBIPKG_DIR:=$(top_builddir)/archival/libipkg/ ++endif ++srcdir=$(top_srcdir)/archival/libipkg ++ ++LIBIPKG_CORE_SOURCES:= \ ++ args.c \ ++ libipkg.c \ ++ user.c \ ++ ++LIBIPKG_CMD_SOURCES:= \ ++ ipkg_cmd.c \ ++ ipkg_configure.c \ ++ ipkg_download.c \ ++ ipkg_install.c \ ++ ipkg_remove.c \ ++ ipkg_upgrade.c \ ++ ++LIBIPKG_DB_SOURCES:= \ ++ hash_table.c \ ++ ipkg_conf.c \ ++ ipkg_utils.c \ ++ pkg.c \ ++ pkg_depends.c \ ++ pkg_extract.c \ ++ pkg_hash.c \ ++ pkg_parse.c \ ++ pkg_vec.c \ ++ ++LIBIPKG_LIST_SOURCES:= \ ++ conffile.c \ ++ conffile_list.c \ ++ nv_pair.c \ ++ nv_pair_list.c \ ++ pkg_dest.c \ ++ pkg_dest_list.c \ ++ pkg_src.c \ ++ pkg_src_list.c \ ++ str_list.c \ ++ void_list.c \ ++ ++LIBIPKG_UTIL_SOURCES:= \ ++ file_util.c \ ++ ipkg_message.c \ ++ md5.c \ ++ str_util.c \ ++ xsystem.c \ ++ ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CORE_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CMD_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_DB_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_LIST_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_SOURCES) ++LIBIPKG_OBJS=$(patsubst %.c,$(LIBIPKG_DIR)%.o, $(LIBIPKG-y)) ++ ++CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(TARGET_ARCH)\"" ++ ++libraries-$(CONFIG_IPKG) += $(LIBIPKG_DIR)$(LIBIPKG_AR) ++ ++$(LIBIPKG_DIR)$(LIBIPKG_AR): $(LIBIPKG_OBJS) ++ $(do_ar) ++ ++$(LIBIPKG_OBJS): $(LIBIPKG_DIR)%.o : $(srcdir)/%.c ++ $(compile.c) ++ +diff -ruN busybox-1.2.0-orig/archival/libipkg/md5.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.c +--- busybox-1.2.0-orig/archival/libipkg/md5.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,48 @@ +/* md5.c - wrappers to busybox md5 functions + * @@ -7439,9 +7420,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.c busybox-1.1.2+ipkg-0.99.162/ + return md5_end(resblock, &md5_cx); +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.h ---- busybox-1.1.2-orig/archival/libipkg/md5.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/md5.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.h +--- busybox-1.2.0-orig/archival/libipkg/md5.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,35 @@ +/* md5.h - Compute MD5 checksum of files or strings according to the + * definition of MD5 in RFC 1321 from April 1992. @@ -7478,9 +7459,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.h busybox-1.1.2+ipkg-0.99.162/ + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.c ---- busybox-1.1.2-orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.c +--- busybox-1.2.0-orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,40 @@ +/* nv_pair.c - the itsy package management system + @@ -7522,9 +7503,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.c busybox-1.1.2+ipkg-0.99. +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.h ---- busybox-1.1.2-orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.h +--- busybox-1.2.0-orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,32 @@ +/* nv_pair.h - the itsy package management system + @@ -7558,9 +7539,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.h busybox-1.1.2+ipkg-0.99. + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.c ---- busybox-1.1.2-orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.c +--- busybox-1.2.0-orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,98 @@ +/* nv_pair_list.c - the itsy package management system + @@ -7660,9 +7641,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.c busybox-1.1.2+ipkg- + } + return NULL; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.h ---- busybox-1.1.2-orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.h +--- busybox-1.2.0-orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,60 @@ +/* nv_pair_list.h - the itsy package management system + @@ -7724,9 +7705,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.h busybox-1.1.2+ipkg- + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c ---- busybox-1.1.2-orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.c +--- busybox-1.2.0-orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,1754 @@ +/* pkg.c - the itsy package management system + @@ -9482,245 +9463,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162/ + } + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h ---- busybox-1.1.2-orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h 2006-05-09 02:12:05.000000000 +0200 -@@ -0,0 +1,232 @@ -+/* pkg.h - the itsy package management system -+ -+ Carl D. Worth -+ -+ Copyright (C) 2001 University of Southern California -+ -+ 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, 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. -+*/ -+ -+#ifndef PKG_H -+#define PKG_H -+ -+#include <sys/types.h> -+#include <sys/stat.h> -+#include <unistd.h> -+ -+#include "pkg_vec.h" -+#include "str_list.h" -+#include "pkg_src.h" -+#include "pkg_dest.h" -+#include "ipkg_conf.h" -+#include "conffile_list.h" -+ -+struct ipkg_conf; -+ -+ -+#define ARRAY_SIZE(array) sizeof(array) / sizeof((array)[0]) -+ -+/* I think "Size" is currently the shortest field name */ -+#define PKG_MINIMUM_FIELD_NAME_LEN 4 -+ -+enum pkg_state_want -+{ -+ SW_UNKNOWN = 1, -+ SW_INSTALL, -+ SW_DEINSTALL, -+ SW_PURGE, -+ SW_LAST_STATE_WANT -+}; -+typedef enum pkg_state_want pkg_state_want_t; -+ -+enum pkg_state_flag -+{ -+ SF_OK = 0, -+ SF_REINSTREQ = 1, -+ SF_HOLD = 2, /* do not upgrade version */ -+ SF_REPLACE = 4, /* replace this package */ -+ SF_NOPRUNE = 8, /* do not remove obsolete files */ -+ SF_PREFER = 16, /* prefer this version */ -+ SF_OBSOLETE = 32, /* old package in upgrade pair */ -+ SF_MARKED = 64, /* temporary mark */ -+ SF_FILELIST_CHANGED = 128, /* needs filelist written */ -+ SF_USER = 256, -+ SF_LAST_STATE_FLAG -+}; -+typedef enum pkg_state_flag pkg_state_flag_t; -+#define SF_NONVOLATILE_FLAGS (SF_HOLD|SF_NOPRUNE|SF_PREFER|SF_OBSOLETE|SF_USER) -+ -+enum pkg_state_status -+{ -+ SS_NOT_INSTALLED = 1, -+ SS_UNPACKED, -+ SS_HALF_CONFIGURED, -+ SS_INSTALLED, -+ SS_HALF_INSTALLED, -+ SS_CONFIG_FILES, -+ SS_POST_INST_FAILED, -+ SS_REMOVAL_FAILED, -+ SS_LAST_STATE_STATUS -+}; -+typedef enum pkg_state_status pkg_state_status_t; -+ -+struct abstract_pkg{ -+ char * name; -+ int dependencies_checked; -+ pkg_vec_t * pkgs; -+ pkg_state_status_t state_status; -+ pkg_state_flag_t state_flag; -+ struct abstract_pkg ** depended_upon_by; /* @@@@ this should be abstract_pkg_vec_t -Jamey */ -+ abstract_pkg_vec_t * provided_by; -+ abstract_pkg_vec_t * replaced_by; -+}; -+ -+#include "pkg_depends.h" -+ -+/* XXX: CLEANUP: I'd like to clean up pkg_t in several ways: -+ -+ The 3 version fields should go into a single version struct. (This -+ is especially important since, currently, pkg->version can easily -+ be mistaken for pkg_verson_str_alloc(pkg) although they are very -+ distinct. This has been the source of multiple bugs. -+ -+ The 3 state fields could possibly also go into their own struct. -+ -+ All fields which deal with lists of packages, (Depends, -+ Pre-Depends, Provides, Suggests, Recommends, Enhances), should each -+ be handled by a single struct in pkg_t -+ -+ All string fields for which there is a small set of possible -+ values, (section, maintainer, architecture, maybe version?), that -+ are reused among different packages -- for all such packages we -+ should move from "char *"s to some atom datatype to share data -+ storage and use less memory. We might even do reference counting, -+ but probably not since most often we only create new pkg_t structs, -+ we don't often free them. */ -+struct pkg -+{ -+ char *name; -+ unsigned long epoch; -+ char *version; -+ char *revision; -+ char *familiar_revision; -+ pkg_src_t *src; -+ pkg_dest_t *dest; -+ char *architecture; -+ char *section; -+ char *maintainer; -+ char *description; -+ pkg_state_want_t state_want; -+ pkg_state_flag_t state_flag; -+ pkg_state_status_t state_status; -+ char **depends_str; -+ int depends_count; -+ char **pre_depends_str; -+ int pre_depends_count; -+ char **recommends_str; -+ int recommends_count; -+ char **suggests_str; -+ int suggests_count; -+ compound_depend_t * depends; -+ -+ /* Abhaya: new conflicts */ -+ char **conflicts_str; -+ compound_depend_t * conflicts; -+ int conflicts_count; -+ -+ char **replaces_str; -+ int replaces_count; -+ abstract_pkg_t ** replaces; -+ -+ char **provides_str; -+ int provides_count; -+ abstract_pkg_t ** provides; -+ -+ abstract_pkg_t *parent; -+ -+ pkg_t *old_pkg; /* during upgrade, points from installee to previously installed */ -+ -+ char *filename; -+ char *local_filename; -+ char *url; -+ char *tmp_unpack_dir; -+ char *md5sum; -+ char *size; -+ char *installed_size; -+ char *priority; -+ char *source; -+ conffile_list_t conffiles; -+ time_t installed_time; -+ /* As pointer for lazy evaluation */ -+ str_list_t *installed_files; -+ /* XXX: CLEANUP: I'd like to perhaps come up with a better -+ mechanism to avoid the problem here, (which is that the -+ installed_files list was being freed from an inner loop while -+ still being used within an outer loop. */ -+ int installed_files_ref_cnt; -+ int essential; -+ int arch_priority; -+/* Adding this flag, to "force" ipkg to choose a "provided_by_hand" package, if there are multiple choice */ -+ int provided_by_hand; -+}; -+ -+pkg_t *pkg_new(void); -+int pkg_init(pkg_t *pkg); -+void pkg_deinit(pkg_t *pkg); -+int pkg_init_from_file(pkg_t *pkg, const char *filename); -+abstract_pkg_t *abstract_pkg_new(void); -+int abstract_pkg_init(abstract_pkg_t *ab_pkg); -+ -+/* -+ * merges fields from newpkg into oldpkg. -+ * Forcibly sets oldpkg state_status, state_want and state_flags if set_status is nonzero -+ */ -+int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg, int set_status); -+ -+char *pkg_version_str_alloc(pkg_t *pkg); -+ -+int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg); -+int pkg_name_version_and_architecture_compare(void *a, void *b); -+int abstract_pkg_name_compare(void *a, void *b); -+ -+char * pkg_formatted_info(pkg_t *pkg ); -+char * pkg_formatted_field(pkg_t *pkg, const char *field ); -+ -+void set_flags_from_control(ipkg_conf_t *conf, pkg_t *pkg); -+ -+void pkg_print_info(pkg_t *pkg, FILE *file); -+void pkg_print_status(pkg_t * pkg, FILE * file); -+void pkg_print_field(pkg_t *pkg, FILE *file, const char *field); -+str_list_t *pkg_get_installed_files(pkg_t *pkg); -+int pkg_free_installed_files(pkg_t *pkg); -+int pkg_remove_installed_files_list(ipkg_conf_t *conf, pkg_t *pkg); -+conffile_t *pkg_get_conffile(pkg_t *pkg, const char *file_name); -+int pkg_run_script(struct ipkg_conf *conf, pkg_t *pkg, -+ const char *script, const char *args); -+ -+/* enum mappings */ -+char *pkg_state_want_to_str(pkg_state_want_t sw); -+pkg_state_want_t pkg_state_want_from_str(char *str); -+char *pkg_state_flag_to_str(pkg_state_flag_t sf); -+pkg_state_flag_t pkg_state_flag_from_str(char *str); -+char *pkg_state_status_to_str(pkg_state_status_t ss); -+pkg_state_status_t pkg_state_status_from_str(char *str); -+ -+int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op); -+ -+int pkg_arch_supported(ipkg_conf_t *conf, pkg_t *pkg); -+int pkg_info_preinstall_check(ipkg_conf_t *conf); -+int pkg_free_installed_files(pkg_t *pkg); -+ -+int pkg_write_filelist(ipkg_conf_t *conf, pkg_t *pkg); -+int pkg_write_changed_filelists(ipkg_conf_t *conf); -+ -+#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_depends.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,1033 @@ +/* pkg_depends.c - the itsy package management system + @@ -10755,9 +10500,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.c busybox-1.1.2+ipkg-0 + + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_depends.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,105 @@ +/* pkg_depends.h - the itsy package management system + @@ -10864,9 +10609,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.h busybox-1.1.2+ipkg-0 +int pkg_dependence_satisfied(ipkg_conf_t *conf, depend_t *depend); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,92 @@ +/* pkg_dest.c - the itsy package management system + @@ -10960,9 +10705,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.c busybox-1.1.2+ipkg-0.99 + + dest->root_dir = NULL; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,38 @@ +/* pkg_dest.h - the itsy package management system + @@ -11002,9 +10747,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.h busybox-1.1.2+ipkg-0.99 + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,85 @@ +/* pkg_dest_list.c - the itsy package management system + @@ -11091,9 +10836,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.c busybox-1.1.2+ipkg +{ + return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,50 @@ +/* pkg_dest_list.h - the itsy package management system + @@ -11145,9 +10890,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.h busybox-1.1.2+ipkg + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,224 @@ +/* pkg_extract.c - the itsy package management system + @@ -11191,7 +10936,7 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0 + archive = init_handle(); + archive->src_fd = bb_xopen(pkg->local_filename, O_RDONLY); + archive->filter = filter_accept_list; -+ archive->accept = llist_add_to(NULL, (char *)filename); ++ llist_add_to(&(archive->accept), (char *)filename); + archive->buffer = path; + archive->action_data = data_extract_all_prefix; + archive->flags |= ARCHIVE_EXTRACT_UNCONDITIONAL; @@ -11228,7 +10973,7 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0 + archive = init_handle(); + archive->src_fd = bb_xopen(name, O_RDONLY); + archive->filter = filter_accept_list; -+ archive->accept = llist_add_to(NULL, "./" IPKG_CONTROL_FILE); ++ llist_add_to(&(archive->accept), "./" IPKG_CONTROL_FILE); + archive->action_data = data_extract_to_buffer; + while( get_header_tar_gz(archive) == EXIT_SUCCESS ); + close(archive->src_fd); @@ -11373,9 +11118,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0 + + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,32 @@ +/* pkg_extract.c - the itsy package management system + @@ -11409,9 +11154,245 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.h busybox-1.1.2+ipkg-0 +int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.h +--- busybox-1.2.0-orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.h 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,232 @@ ++/* pkg.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ 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, 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. ++*/ ++ ++#ifndef PKG_H ++#define PKG_H ++ ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h> ++ ++#include "pkg_vec.h" ++#include "str_list.h" ++#include "pkg_src.h" ++#include "pkg_dest.h" ++#include "ipkg_conf.h" ++#include "conffile_list.h" ++ ++struct ipkg_conf; ++ ++ ++#define ARRAY_SIZE(array) sizeof(array) / sizeof((array)[0]) ++ ++/* I think "Size" is currently the shortest field name */ ++#define PKG_MINIMUM_FIELD_NAME_LEN 4 ++ ++enum pkg_state_want ++{ ++ SW_UNKNOWN = 1, ++ SW_INSTALL, ++ SW_DEINSTALL, ++ SW_PURGE, ++ SW_LAST_STATE_WANT ++}; ++typedef enum pkg_state_want pkg_state_want_t; ++ ++enum pkg_state_flag ++{ ++ SF_OK = 0, ++ SF_REINSTREQ = 1, ++ SF_HOLD = 2, /* do not upgrade version */ ++ SF_REPLACE = 4, /* replace this package */ ++ SF_NOPRUNE = 8, /* do not remove obsolete files */ ++ SF_PREFER = 16, /* prefer this version */ ++ SF_OBSOLETE = 32, /* old package in upgrade pair */ ++ SF_MARKED = 64, /* temporary mark */ ++ SF_FILELIST_CHANGED = 128, /* needs filelist written */ ++ SF_USER = 256, ++ SF_LAST_STATE_FLAG ++}; ++typedef enum pkg_state_flag pkg_state_flag_t; ++#define SF_NONVOLATILE_FLAGS (SF_HOLD|SF_NOPRUNE|SF_PREFER|SF_OBSOLETE|SF_USER) ++ ++enum pkg_state_status ++{ ++ SS_NOT_INSTALLED = 1, ++ SS_UNPACKED, ++ SS_HALF_CONFIGURED, ++ SS_INSTALLED, ++ SS_HALF_INSTALLED, ++ SS_CONFIG_FILES, ++ SS_POST_INST_FAILED, ++ SS_REMOVAL_FAILED, ++ SS_LAST_STATE_STATUS ++}; ++typedef enum pkg_state_status pkg_state_status_t; ++ ++struct abstract_pkg{ ++ char * name; ++ int dependencies_checked; ++ pkg_vec_t * pkgs; ++ pkg_state_status_t state_status; ++ pkg_state_flag_t state_flag; ++ struct abstract_pkg ** depended_upon_by; /* @@@@ this should be abstract_pkg_vec_t -Jamey */ ++ abstract_pkg_vec_t * provided_by; ++ abstract_pkg_vec_t * replaced_by; ++}; ++ ++#include "pkg_depends.h" ++ ++/* XXX: CLEANUP: I'd like to clean up pkg_t in several ways: ++ ++ The 3 version fields should go into a single version struct. (This ++ is especially important since, currently, pkg->version can easily ++ be mistaken for pkg_verson_str_alloc(pkg) although they are very ++ distinct. This has been the source of multiple bugs. ++ ++ The 3 state fields could possibly also go into their own struct. ++ ++ All fields which deal with lists of packages, (Depends, ++ Pre-Depends, Provides, Suggests, Recommends, Enhances), should each ++ be handled by a single struct in pkg_t ++ ++ All string fields for which there is a small set of possible ++ values, (section, maintainer, architecture, maybe version?), that ++ are reused among different packages -- for all such packages we ++ should move from "char *"s to some atom datatype to share data ++ storage and use less memory. We might even do reference counting, ++ but probably not since most often we only create new pkg_t structs, ++ we don't often free them. */ ++struct pkg ++{ ++ char *name; ++ unsigned long epoch; ++ char *version; ++ char *revision; ++ char *familiar_revision; ++ pkg_src_t *src; ++ pkg_dest_t *dest; ++ char *architecture; ++ char *section; ++ char *maintainer; ++ char *description; ++ pkg_state_want_t state_want; ++ pkg_state_flag_t state_flag; ++ pkg_state_status_t state_status; ++ char **depends_str; ++ int depends_count; ++ char **pre_depends_str; ++ int pre_depends_count; ++ char **recommends_str; ++ int recommends_count; ++ char **suggests_str; ++ int suggests_count; ++ compound_depend_t * depends; ++ ++ /* Abhaya: new conflicts */ ++ char **conflicts_str; ++ compound_depend_t * conflicts; ++ int conflicts_count; ++ ++ char **replaces_str; ++ int replaces_count; ++ abstract_pkg_t ** replaces; ++ ++ char **provides_str; ++ int provides_count; ++ abstract_pkg_t ** provides; ++ ++ abstract_pkg_t *parent; ++ ++ pkg_t *old_pkg; /* during upgrade, points from installee to previously installed */ ++ ++ char *filename; ++ char *local_filename; ++ char *url; ++ char *tmp_unpack_dir; ++ char *md5sum; ++ char *size; ++ char *installed_size; ++ char *priority; ++ char *source; ++ conffile_list_t conffiles; ++ time_t installed_time; ++ /* As pointer for lazy evaluation */ ++ str_list_t *installed_files; ++ /* XXX: CLEANUP: I'd like to perhaps come up with a better ++ mechanism to avoid the problem here, (which is that the ++ installed_files list was being freed from an inner loop while ++ still being used within an outer loop. */ ++ int installed_files_ref_cnt; ++ int essential; ++ int arch_priority; ++/* Adding this flag, to "force" ipkg to choose a "provided_by_hand" package, if there are multiple choice */ ++ int provided_by_hand; ++}; ++ ++pkg_t *pkg_new(void); ++int pkg_init(pkg_t *pkg); ++void pkg_deinit(pkg_t *pkg); ++int pkg_init_from_file(pkg_t *pkg, const char *filename); ++abstract_pkg_t *abstract_pkg_new(void); ++int abstract_pkg_init(abstract_pkg_t *ab_pkg); ++ ++/* ++ * merges fields from newpkg into oldpkg. ++ * Forcibly sets oldpkg state_status, state_want and state_flags if set_status is nonzero ++ */ ++int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg, int set_status); ++ ++char *pkg_version_str_alloc(pkg_t *pkg); ++ ++int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg); ++int pkg_name_version_and_architecture_compare(void *a, void *b); ++int abstract_pkg_name_compare(void *a, void *b); ++ ++char * pkg_formatted_info(pkg_t *pkg ); ++char * pkg_formatted_field(pkg_t *pkg, const char *field ); ++ ++void set_flags_from_control(ipkg_conf_t *conf, pkg_t *pkg); ++ ++void pkg_print_info(pkg_t *pkg, FILE *file); ++void pkg_print_status(pkg_t * pkg, FILE * file); ++void pkg_print_field(pkg_t *pkg, FILE *file, const char *field); ++str_list_t *pkg_get_installed_files(pkg_t *pkg); ++int pkg_free_installed_files(pkg_t *pkg); ++int pkg_remove_installed_files_list(ipkg_conf_t *conf, pkg_t *pkg); ++conffile_t *pkg_get_conffile(pkg_t *pkg, const char *file_name); ++int pkg_run_script(struct ipkg_conf *conf, pkg_t *pkg, ++ const char *script, const char *args); ++ ++/* enum mappings */ ++char *pkg_state_want_to_str(pkg_state_want_t sw); ++pkg_state_want_t pkg_state_want_from_str(char *str); ++char *pkg_state_flag_to_str(pkg_state_flag_t sf); ++pkg_state_flag_t pkg_state_flag_from_str(char *str); ++char *pkg_state_status_to_str(pkg_state_status_t ss); ++pkg_state_status_t pkg_state_status_from_str(char *str); ++ ++int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op); ++ ++int pkg_arch_supported(ipkg_conf_t *conf, pkg_t *pkg); ++int pkg_info_preinstall_check(ipkg_conf_t *conf); ++int pkg_free_installed_files(pkg_t *pkg); ++ ++int pkg_write_filelist(ipkg_conf_t *conf, pkg_t *pkg); ++int pkg_write_changed_filelists(ipkg_conf_t *conf); ++ ++#endif +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_hash.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,617 @@ +/* ipkg_hash.c - the itsy package management system + @@ -12030,9 +12011,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.c busybox-1.1.2+ipkg-0.99 +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_hash.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,61 @@ +/* pkg_hash.h - the itsy package management system + @@ -12095,9 +12076,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.h busybox-1.1.2+ipkg-0.99 + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_parse.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,366 @@ +/* pkg_parse.c - the itsy package management system + @@ -12465,9 +12446,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.c busybox-1.1.2+ipkg-0.9 + + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_parse.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,31 @@ +/* pkg_parse.h - the itsy package management system + @@ -12500,9 +12481,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.h busybox-1.1.2+ipkg-0.9 +int pkg_valorize_other_field(pkg_t *pkg, char ***raw); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,43 @@ +/* pkg_src.c - the itsy package management system + @@ -12547,9 +12528,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.c busybox-1.1.2+ipkg-0.99. +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,34 @@ +/* pkg_src.h - the itsy package management system + @@ -12585,9 +12566,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.h busybox-1.1.2+ipkg-0.99. +void pkg_src_deinit(pkg_src_t *src); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,75 @@ +/* pkg_src_list.c - the itsy package management system + @@ -12664,9 +12645,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.c busybox-1.1.2+ipkg- +{ + return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,57 @@ +/* pkg_src_list.h - the itsy package management system + @@ -12725,9 +12706,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.h busybox-1.1.2+ipkg- + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_vec.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,230 @@ +/* pkg_vec.c - the itsy package management system + @@ -12959,9 +12940,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.c busybox-1.1.2+ipkg-0.99. + qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar); +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_vec.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,62 @@ +/* pkg_vec.h - the itsy package management system + @@ -13025,9 +13006,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.h busybox-1.1.2+ipkg-0.99. +void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *)); +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/sprintf_alloc.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h ---- busybox-1.1.2-orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/sprintf_alloc.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h +--- busybox-1.2.0-orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,25 @@ +/* sprintf_alloca.c -- like sprintf with memory allocation + @@ -13054,9 +13035,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/sprintf_alloc.h busybox-1.1.2+ipkg +#define sprintf_alloc(str, fmt, args...) *str = bb_xasprintf(fmt, ## args) + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.c ---- busybox-1.1.2-orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/str_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.c +--- busybox-1.2.0-orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,76 @@ +/* str_list.c - the itsy package management system + @@ -13134,9 +13115,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.c busybox-1.1.2+ipkg-0.99 + (void *)target_str, + (void_list_cmp_t)strcmp); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.h ---- busybox-1.1.2-orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/str_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.h +--- busybox-1.2.0-orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,51 @@ +/* str_list.h - the itsy package management system + @@ -13189,9 +13170,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.h busybox-1.1.2+ipkg-0.99 +char *str_list_remove_elt(str_list_t *list, const char *target_str); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.c ---- busybox-1.1.2-orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/str_util.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.c +--- busybox-1.2.0-orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,73 @@ +/* str_utils.c - the itsy package management system + @@ -13266,9 +13247,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.c busybox-1.1.2+ipkg-0.99 + return str ? strdup(str) : NULL; +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.h ---- busybox-1.1.2-orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/str_util.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.h +--- busybox-1.2.0-orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,28 @@ +/* str_utils.h - the itsy package management system + @@ -13298,9 +13279,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.h busybox-1.1.2+ipkg-0.99 +char *str_dup_safe(const char *str); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/user.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.c ---- busybox-1.1.2-orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/user.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.c +--- busybox-1.2.0-orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,58 @@ +/* user.c - the itsy package management system + @@ -13360,9 +13341,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/user.c busybox-1.1.2+ipkg-0.99.162 + + return response; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/user.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.h ---- busybox-1.1.2-orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/user.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.h +--- busybox-1.2.0-orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,23 @@ +/* user.c - the itsy package management system + @@ -13387,9 +13368,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/user.h busybox-1.1.2+ipkg-0.99.162 + +char *get_user_response(const char *format, ...); + -diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.c ---- busybox-1.1.2-orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/void_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.c +--- busybox-1.2.0-orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,194 @@ +/* void_list.c - the itsy package management system + @@ -13585,9 +13566,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.c busybox-1.1.2+ipkg-0.9 + else + return NULL; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.h ---- busybox-1.1.2-orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/void_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.h +--- busybox-1.2.0-orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,59 @@ +/* void_list.h - the itsy package management system + @@ -13648,9 +13629,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.h busybox-1.1.2+ipkg-0.9 +void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.c ---- busybox-1.1.2-orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/xsystem.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.c +--- busybox-1.2.0-orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,64 @@ +/* xsystem.c - system(3) with error messages + @@ -13716,9 +13697,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.c busybox-1.1.2+ipkg-0.99. + return -1; +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.h ---- busybox-1.1.2-orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/xsystem.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.h +--- busybox-1.2.0-orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,34 @@ +/* xsystem.h - system(3) with error messages + @@ -13754,20 +13735,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.h busybox-1.1.2+ipkg-0.99. + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libunarchive/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/Makefile.in ---- busybox-1.1.2-orig/archival/libunarchive/Makefile.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/Makefile.in 2006-05-09 02:06:48.000000000 +0200 -@@ -58,6 +58,7 @@ - LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o - LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) - LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o -+LIBUNARCHIVE-$(CONFIG_IPKG) += $(GUNZIP_FILES) get_header_tar.o get_header_tar_gz.o - LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o - LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o - LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o -diff -ruN busybox-1.1.2-orig/archival/libunarchive/data_extract_all.c busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/data_extract_all.c ---- busybox-1.1.2-orig/archival/libunarchive/data_extract_all.c 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/data_extract_all.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libunarchive/data_extract_all.c busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/data_extract_all.c +--- busybox-1.2.0-orig/archival/libunarchive/data_extract_all.c 2006-07-01 00:42:04.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/data_extract_all.c 2006-07-22 16:31:26.000000000 +0200 @@ -126,3 +126,17 @@ utime(file_header->name, &t); } @@ -13786,21 +13756,43 @@ diff -ruN busybox-1.1.2-orig/archival/libunarchive/data_extract_all.c busybox-1. + } +} + -diff -ruN busybox-1.1.2-orig/include/applets.h busybox-1.1.2+ipkg-0.99.162/include/applets.h ---- busybox-1.1.2-orig/include/applets.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/include/applets.h 2006-05-09 02:06:48.000000000 +0200 -@@ -149,6 +149,7 @@ - USE_IPCALC(APPLET(ipcalc, ipcalc_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_IPCRM(APPLET(ipcrm, ipcrm_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) - USE_IPCS(APPLET(ipcs, ipcs_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) -+USE_IPKG(APPLET(ipkg, ipkg_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_IPLINK(APPLET(iplink, iplink_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_IPROUTE(APPLET(iproute, iproute_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_IPTUNNEL(APPLET(iptunnel, iptunnel_main, _BB_DIR_BIN, _BB_SUID_NEVER)) -diff -ruN busybox-1.1.2-orig/include/unarchive.h busybox-1.1.2+ipkg-0.99.162/include/unarchive.h ---- busybox-1.1.2-orig/include/unarchive.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/include/unarchive.h 2006-05-09 02:06:48.000000000 +0200 -@@ -74,6 +74,7 @@ +diff -ruN busybox-1.2.0-orig/archival/libunarchive/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/Makefile.in +--- busybox-1.2.0-orig/archival/libunarchive/Makefile.in 2006-07-01 00:42:03.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/Makefile.in 2006-07-22 16:31:26.000000000 +0200 +@@ -58,6 +58,7 @@ + LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o + LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) + LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o ++LIBUNARCHIVE-$(CONFIG_IPKG) += $(GUNZIP_FILES) get_header_tar.o get_header_tar_gz.o + LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o + LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o + LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o +diff -ruN busybox-1.2.0-orig/archival/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/Makefile.in +--- busybox-1.2.0-orig/archival/Makefile.in 2006-07-01 00:42:04.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/Makefile.in 2006-07-22 16:31:25.000000000 +0200 +@@ -20,6 +20,7 @@ + ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o + ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o + ARCHIVAL-$(CONFIG_GZIP) += gzip.o ++ARCHIVAL-$(CONFIG_IPKG) += ipkg.o + ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o + ARCHIVAL-$(CONFIG_RPM) += rpm.o + ARCHIVAL-$(CONFIG_TAR) += tar.o +diff -ruN busybox-1.2.0-orig/include/applets.h busybox-1.2.0+ipkg-0.99.162/include/applets.h +--- busybox-1.2.0-orig/include/applets.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/include/applets.h 2006-07-22 16:35:35.000000000 +0200 +@@ -152,6 +152,7 @@ + USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) + USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) ++USE_IPKG(APPLET(ipkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER)) +diff -ruN busybox-1.2.0-orig/include/unarchive.h busybox-1.2.0+ipkg-0.99.162/include/unarchive.h +--- busybox-1.2.0-orig/include/unarchive.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/include/unarchive.h 2006-07-22 16:31:26.000000000 +0200 +@@ -77,6 +77,7 @@ extern void data_skip(archive_handle_t *archive_handle); extern void data_extract_all(archive_handle_t *archive_handle); @@ -13808,10 +13800,10 @@ diff -ruN busybox-1.1.2-orig/include/unarchive.h busybox-1.1.2+ipkg-0.99.162/inc extern void data_extract_to_stdout(archive_handle_t *archive_handle); extern void data_extract_to_buffer(archive_handle_t *archive_handle); -diff -ruN busybox-1.1.2-orig/include/usage.h busybox-1.1.2+ipkg-0.99.162/include/usage.h ---- busybox-1.1.2-orig/include/usage.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/include/usage.h 2006-05-09 02:06:48.000000000 +0200 -@@ -1013,6 +1013,82 @@ +diff -ruN busybox-1.2.0-orig/include/usage.h busybox-1.2.0+ipkg-0.99.162/include/usage.h +--- busybox-1.2.0-orig/include/usage.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/include/usage.h 2006-07-22 16:31:26.000000000 +0200 +@@ -982,6 +982,82 @@ "$ ls -la /tmp/busybox*\n" \ "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" @@ -13894,3 +13886,15 @@ diff -ruN busybox-1.1.2-orig/include/usage.h busybox-1.1.2+ipkg-0.99.162/include #define halt_trivial_usage \ "[-d<delay>] [-n<nosync>] [-f<force>]" #define halt_full_usage \ +diff -ruN busybox-1.2.0-orig/Makefile busybox-1.2.0+ipkg-0.99.162/Makefile +--- busybox-1.2.0-orig/Makefile 2006-07-01 00:42:13.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/Makefile 2006-07-22 16:31:25.000000000 +0200 +@@ -31,7 +31,7 @@ + export srctree=$(top_srcdir) + vpath %/Config.in $(srctree) + +-DIRS:=applets archival archival/libunarchive coreutils console-tools \ ++DIRS:=applets archival archival/libipkg archival/libunarchive coreutils console-tools \ + debianutils editors findutils init miscutils modutils networking \ + networking/libiproute networking/udhcp procps loginutils shell \ + sysklogd util-linux e2fsprogs libpwdgrp coreutils/libcoreutils libbb diff --git a/openwrt/package/busybox/patches/912-ipkg-no_warnings.patch b/openwrt/package/busybox/patches/912-ipkg-no_warnings.patch index 74133b07690..b5ba7705fb2 100644 --- a/openwrt/package/busybox/patches/912-ipkg-no_warnings.patch +++ b/openwrt/package/busybox/patches/912-ipkg-no_warnings.patch @@ -1,3 +1,7 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # # remove (numerous) compile warnings # diff --git a/openwrt/package/busybox/patches/913-libbb_hash.patch b/openwrt/package/busybox/patches/913-libbb_hash.patch index 3a6a2ba1d1f..a7c2291caa2 100644 --- a/openwrt/package/busybox/patches/913-libbb_hash.patch +++ b/openwrt/package/busybox/patches/913-libbb_hash.patch @@ -1,10 +1,14 @@ +# Copyright (C) 2006 OpenWrt.org # -# expose (again) an hash_fd function (used 911-ipkg.patch) +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # -diff -ruN busybox-1.1.1-old/coreutils/md5_sha1_sum.c busybox-1.1.1-new/coreutils/md5_sha1_sum.c ---- busybox-1.1.1-old/coreutils/md5_sha1_sum.c 2006-03-30 00:14:50.000000000 +0200 -+++ busybox-1.1.1-new/coreutils/md5_sha1_sum.c 2006-03-29 23:46:51.000000000 +0200 -@@ -15,80 +15,10 @@ +# expose (again) an hash_fd function (used in 911-ipkg.patch) +# +diff -ruN busybox-1.2.0-orig/coreutils/md5_sha1_sum.c busybox-1.2.0-libbb_hash/coreutils/md5_sha1_sum.c +--- busybox-1.2.0-orig/coreutils/md5_sha1_sum.c 2006-07-01 00:42:07.000000000 +0200 ++++ busybox-1.2.0-libbb_hash/coreutils/md5_sha1_sum.c 2006-07-22 17:08:02.000000000 +0200 +@@ -16,79 +16,10 @@ #include "busybox.h" @@ -40,81 +44,76 @@ diff -ruN busybox-1.1.1-old/coreutils/md5_sha1_sum.c busybox-1.1.1-new/coreutils - RESERVE_CONFIG_UBUFFER(in_buf, 4096); - void (*update)(const void*, size_t, void*); - void (*final)(void*, void*); -- -- if(strcmp(filename, "-") == 0) { +- +- if (strcmp(filename, "-") == 0) { - src_fd = STDIN_FILENO; - } else if(0 > (src_fd = open(filename, O_RDONLY))) { - bb_perror_msg("%s", filename); - return NULL; - } - -- // figure specific hash algorithims -- if(ENABLE_MD5SUM && hash_algo==HASH_MD5) { +- /* figure specific hash algorithims */ +- if (ENABLE_MD5SUM && hash_algo==HASH_MD5) { - md5_begin(&context.md5); - update = (void (*)(const void*, size_t, void*))md5_hash; - final = (void (*)(void*, void*))md5_end; - hash_len = 16; -- } else if(ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { +- } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { - sha1_begin(&context.sha1); - update = (void (*)(const void*, size_t, void*))sha1_hash; - final = (void (*)(void*, void*))sha1_end; - hash_len = 20; - } else { -- bb_error_msg_and_die("algotithm not supported"); +- bb_error_msg_and_die("algorithm not supported"); - } -- - -- while(0 < (count = read(src_fd, in_buf, sizeof in_buf))) { +- while (0 < (count = read(src_fd, in_buf, 4096))) { - update(in_buf, count, &context); - } - -- if(count == 0) { +- if (count == 0) { - final(in_buf, &context); - hash_value = hash_bin_to_hex(in_buf, hash_len); - } -- +- - RELEASE_CONFIG_BUFFER(in_buf); -- -- if(src_fd != STDIN_FILENO) { +- +- if (src_fd != STDIN_FILENO) { - close(src_fd); - } -- +- - return hash_value; -} - /* This could become a common function for md5 as well, by using md5_stream */ static int hash_files(int argc, char **argv, hash_algo_t hash_algo) { -diff -ruN busybox-1.1.1-old/include/libbb.h busybox-1.1.1-new/include/libbb.h ---- busybox-1.1.1-old/include/libbb.h 2006-03-30 00:14:50.000000000 +0200 -+++ busybox-1.1.1-new/include/libbb.h 2006-03-30 00:31:48.000000000 +0200 -@@ -490,6 +490,12 @@ - void md5_hash(const void *data, size_t length, md5_ctx_t *ctx); - void *md5_end(void *resbuf, md5_ctx_t *ctx); +diff -ruN busybox-1.2.0-orig/include/libbb.h busybox-1.2.0-libbb_hash/include/libbb.h +--- busybox-1.2.0-orig/include/libbb.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0-libbb_hash/include/libbb.h 2006-07-22 17:01:06.000000000 +0200 +@@ -518,6 +518,8 @@ + extern int get_terminal_width_height(int fd, int *width, int *height); + extern unsigned long get_ug_id(const char *s, long (*__bb_getxxnam)(const char *)); +typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t; + + typedef struct _sha1_ctx_t_ { + uint32_t count[2]; + uint32_t hash[5]; +@@ -542,6 +544,10 @@ + void md5_hash(const void *data, size_t length, md5_ctx_t *ctx); + void *md5_end(void *resbuf, md5_ctx_t *ctx); + +unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned char hash_length); +int hash_fd(int fd, hash_algo_t hash_algo, uint8_t *hash_value); +uint8_t *hash_file(const char *filename, hash_algo_t hash_algo); + - /* busybox.h will include dmalloc later for us, else include it here. */ - #if !defined _BB_INTERNAL_H_ && defined DMALLOC - #include <dmalloc.h> -diff -ruN busybox-1.1.1-old/libbb/Makefile.in busybox-1.1.1-new/libbb/Makefile.in ---- busybox-1.1.1-old/libbb/Makefile.in 2006-03-30 00:14:50.000000000 +0200 -+++ busybox-1.1.1-new/libbb/Makefile.in 2006-03-29 23:46:51.000000000 +0200 -@@ -11,6 +11,7 @@ + extern uint32_t *bb_crc32_filltable (int endian); - LIBBB-n:= - LIBBB-y:= \ -+ hash.c \ - bb_asprintf.c ask_confirmation.c change_identity.c chomp.c \ - compare_string_array.c concat_path_file.c copy_file.c copyfd.c \ - create_icmp_socket.c create_icmp6_socket.c \ -diff -ruN busybox-1.1.1-old/libbb/hash.c busybox-1.1.1-new/libbb/hash.c ---- busybox-1.1.1-old/libbb/hash.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/libbb/hash.c 2006-03-30 00:35:54.000000000 +0200 + #ifndef RB_POWER_OFF +diff -ruN busybox-1.2.0-orig/libbb/hash.c busybox-1.2.0-libbb_hash/libbb/hash.c +--- busybox-1.2.0-orig/libbb/hash.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0-libbb_hash/libbb/hash.c 2006-07-22 17:07:34.000000000 +0200 @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2003 Glenn L. McGrath @@ -158,23 +157,23 @@ diff -ruN busybox-1.1.1-old/libbb/hash.c busybox-1.1.1-new/libbb/hash.c + void (*final)(void*, void*) = NULL; + + // figure specific hash algorithims -+ if(hash_algo==HASH_MD5) { ++ if (hash_algo==HASH_MD5) { + md5_begin(&context.md5); + update = (void (*)(const void*, size_t, void*))md5_hash; + final = (void (*)(void*, void*))md5_end; -+ } else if(hash_algo==HASH_SHA1) { ++ } else if (hash_algo==HASH_SHA1) { + sha1_begin(&context.sha1); + update = (void (*)(const void*, size_t, void*))sha1_hash; + final = (void (*)(void*, void*))sha1_end; + } + + -+ while(0 < (count = read(fd, in_buf, sizeof in_buf))) { ++ while (0 < (count = read(fd, in_buf, sizeof in_buf))) { + update(in_buf, count, &context); + result += count; + } + -+ if(count == 0) { ++ if (count == 0) { + final(hash_value, &context); + } + @@ -189,26 +188,26 @@ diff -ruN busybox-1.1.1-old/libbb/hash.c busybox-1.1.1-new/libbb/hash.c + RESERVE_CONFIG_UBUFFER(hash_buf, 20); + uint8_t *hash_value = NULL; + -+ if(ENABLE_MD5SUM && hash_algo==HASH_MD5) { ++ if (ENABLE_MD5SUM && hash_algo==HASH_MD5) { + hash_len = 16; -+ } else if(ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { ++ } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { + hash_len = 20; + } else { + bb_error_msg_and_die("algotithm not supported"); + } + -+ if(strcmp(filename, "-") == 0) { ++ if (strcmp(filename, "-") == 0) { + src_fd = STDIN_FILENO; -+ } else if(0 > (src_fd = open(filename, O_RDONLY))) { ++ } else if (0 > (src_fd = open(filename, O_RDONLY))) { + bb_perror_msg("%s", filename); + return NULL; + } + -+ if(hash_fd(src_fd, hash_algo, hash_buf) > 0) { ++ if (hash_fd(src_fd, hash_algo, hash_buf) > 0) { + hash_value = hash_bin_to_hex(hash_buf, hash_len); + } + -+ if(src_fd != STDIN_FILENO) { ++ if (src_fd != STDIN_FILENO) { + close(src_fd); + } + @@ -216,3 +215,14 @@ diff -ruN busybox-1.1.1-old/libbb/hash.c busybox-1.1.1-new/libbb/hash.c + + return hash_value; +} +diff -ruN busybox-1.2.0-orig/libbb/Makefile.in busybox-1.2.0-libbb_hash/libbb/Makefile.in +--- busybox-1.2.0-orig/libbb/Makefile.in 2006-07-01 00:42:08.000000000 +0200 ++++ busybox-1.2.0-libbb_hash/libbb/Makefile.in 2006-07-22 16:51:47.000000000 +0200 +@@ -11,6 +11,7 @@ + + LIBBB-n:= + LIBBB-y:= \ ++ hash.c \ + bb_asprintf.c ask_confirmation.c change_identity.c chomp.c \ + compare_string_array.c concat_path_file.c copy_file.c copyfd.c \ + crc32.c create_icmp_socket.c create_icmp6_socket.c \ diff --git a/openwrt/package/busybox/patches/914-ipkg-fixes.patch b/openwrt/package/busybox/patches/914-ipkg-fixes.patch index 55cd9040c6f..72375bc5b7e 100644 --- a/openwrt/package/busybox/patches/914-ipkg-fixes.patch +++ b/openwrt/package/busybox/patches/914-ipkg-fixes.patch @@ -1,3 +1,7 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # # fix ipkg bugs # From f30ce66b43dfa07e4e403f94c9f27d65d984a9fb Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Tue, 8 Aug 2006 14:46:22 +0000 Subject: [PATCH 452/757] disable on uml-2.6 (lacking wireless), standardize SVN-Revision: 4540 --- openwrt/package/zd1211/Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/openwrt/package/zd1211/Makefile b/openwrt/package/zd1211/Makefile index 6c70924fffe..651621f7e84 100644 --- a/openwrt/package/zd1211/Makefile +++ b/openwrt/package/zd1211/Makefile @@ -12,27 +12,27 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=zd1211 PKG_VERSION:=r69 PKG_RELEASE:=1 -PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) -PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ +PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a PKG_CAT:=zcat include $(INCLUDE_DIR)/package.mk #FIXME: add proper dependency handling on kmod-usb-core packages define Package/kmod-zd1211 -SECTION:=drivers -CATEGORY:=Drivers -DEPENDS:=@LINUX_2_6 -TITLE:=Driver for Zydas 1211 based USB devices -DESCRIPTION:=Driver for Zydas 1211 based USB devices \\\ -Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip.\\\ -Initially contributed by ZyDAS, this driver is actively maintained by the \\\ -open source community. -URL:=http://zd1211.ath.cx/ -VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + SECTION:=drivers + CATEGORY:=Drivers + DEPENDS:=@LINUX_2_6&&!LINUX_2_6_UML + TITLE:=Driver for Zydas 1211 based USB devices + DESCRIPTION:=Driver for Zydas 1211 based USB devices \\\ + Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip.\\\ + Initially contributed by ZyDAS, this driver is actively maintained by the \\\ + open source community. + URL:=http://zd1211.ath.cx/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile From 01c8abbeca68521435a20e8fafdadab8da11932f Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Tue, 8 Aug 2006 20:15:09 +0000 Subject: [PATCH 453/757] fix error if dhcp is disabled SVN-Revision: 4545 --- openwrt/package/dnsmasq/files/dnsmasq.conf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openwrt/package/dnsmasq/files/dnsmasq.conf b/openwrt/package/dnsmasq/files/dnsmasq.conf index 43acd85b154..8a51f8445d6 100644 --- a/openwrt/package/dnsmasq/files/dnsmasq.conf +++ b/openwrt/package/dnsmasq/files/dnsmasq.conf @@ -12,15 +12,13 @@ resolv-file=/tmp/resolv.conf @ifdef dhcp_enable dhcp-range=@@start@@,@@end@@,@@netmask@@,@@lease@@ +dhcp-authoritative +dhcp-leasefile=/tmp/dhcp.leases @endif @ifdef wan_ifname except-interface=@@wan_ifname@@ @endif -# enable dhcp (start,end,netmask,leasetime) -dhcp-authoritative -dhcp-leasefile=/tmp/dhcp.leases - # use /etc/ethers for static hosts; same format as --dhcp-host # <hwaddr> <ipaddr> read-ethers From 3e90de03126e361cb2585d6f3ad3580d9312eaca Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Thu, 10 Aug 2006 11:16:46 +0000 Subject: [PATCH 454/757] fix uml-2.6 (closes: #678) SVN-Revision: 4551 --- openwrt/include/kernel-build.mk | 10 +++++----- openwrt/include/kernel.mk | 8 ++++++-- openwrt/rules.mk | 1 - 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index bf6f2c2ecac..a8c9e7fd25e 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -34,7 +34,7 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) ifeq ($(KERNEL),2.4) $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h touch $@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured @@ -44,7 +44,7 @@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done else $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts touch $@ endif @@ -63,7 +63,7 @@ else endif $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ @@ -71,8 +71,8 @@ $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux $(LINUX_DIR)/.modules_done: rm -rf $(KERNEL_BUILD_DIR)/modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install + $(MAKE) -C "$(LINUX_DIR)" CC="$(KERNEL_CC)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) modules + $(MAKE) -C "$(LINUX_DIR)" CC="$(KERNEL_CC)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done modules: $(LINUX_DIR)/.modules_done diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index 318ca6869dc..db02ea2160e 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -29,8 +29,12 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ ) ifneq (,$(findstring uml,$(BOARD))) -LINUX_KARCH="um" -KERNEL_CROSS= + LINUX_KARCH:=um + KERNEL_CC:=$(HOSTCC) + KERNEL_CROSS:= +else + KERNEL_CC:=$(TARGET_CC) + KERNEL_CROSS:=$(TARGET_CROSS) endif KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) diff --git a/openwrt/rules.mk b/openwrt/rules.mk index 6c770c48a79..a8d3647b6dd 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -35,7 +35,6 @@ IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux -KERNEL_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) From df5c53e2fca4df81dbdf65b6e284ca9b49917042 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 10 Aug 2006 16:22:15 +0000 Subject: [PATCH 455/757] mark 63xx as broken until the platform is ready SVN-Revision: 4552 --- openwrt/target/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 3f8993c2aac..38d69cb39a3 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -55,6 +55,7 @@ config LINUX_2_6_BRCM config LINUX_2_6_BRCM63XX bool "Broadcom BCM63xx [2.6]" + depends BROKEN select mips select LINUX_2_6 select PCI_SUPPORT From 149935592c2d0122ff8f510236c69b72528b8403 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 10 Aug 2006 19:25:26 +0000 Subject: [PATCH 456/757] add secret option to use host's toolchain when native compiling SVN-Revision: 4553 --- openwrt/Config.in | 2 +- openwrt/package/base-files/Makefile | 3 +++ openwrt/rules.mk | 9 ++++++--- openwrt/toolchain/Config.in | 7 +++++++ openwrt/toolchain/Makefile | 15 +++++++++++---- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/openwrt/Config.in b/openwrt/Config.in index caa79447993..d1d66ff0db2 100644 --- a/openwrt/Config.in +++ b/openwrt/Config.in @@ -16,7 +16,7 @@ menuconfig DEVEL bool "Advanced configuration options (for developers)" default n select BUILDOPTS - select TOOLCHAINOPTS + select TOOLCHAINOPTS if !NATIVE_TOOLCHAIN config BROKEN bool "Show broken platforms / packages" if DEVEL diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index e41e1fd7987..dce07fe5074 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -86,6 +86,7 @@ define Package/libgcc SECTION:=libs CATEGORY:=Libraries DEFAULT:=y + DEPENDS:=@!NATIVE_TOOLCHAIN TITLE:=GCC support library VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) DESCRIPTION:=$(TITLE) @@ -94,6 +95,7 @@ endef define Package/libpthread $(call Package/base-files$(TARGET)) DEFAULT:=n + DEPENDS:=@!NATIVE_TOOLCHAIN VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=POSIX thread library DESCRIPTION:=POSIX thread library @@ -103,6 +105,7 @@ endef define Package/uclibc $(call Package/base-files$(TARGET)) VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + DEPENDS:=@!NATIVE_TOOLCHAIN TITLE:=C library DESCRIPTION:=C library for embedded systems endef diff --git a/openwrt/rules.mk b/openwrt/rules.mk index a8d3647b6dd..3645b064f7b 100644 --- a/openwrt/rules.mk +++ b/openwrt/rules.mk @@ -33,9 +33,12 @@ STAMP_DIR:=$(BUILD_DIR)/stamp TARGET_DIR:=$(BUILD_DIR)/root IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg -REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc -GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux -TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- +ifeq ($(CONFIG_NATIVE_TOOLCHAIN),) + REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc + GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux + TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- +endif + IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(PATH) diff --git a/openwrt/toolchain/Config.in b/openwrt/toolchain/Config.in index 37af938b3b7..b5258ddce98 100644 --- a/openwrt/toolchain/Config.in +++ b/openwrt/toolchain/Config.in @@ -1,7 +1,14 @@ # +config NATIVE_TOOLCHAIN + bool + prompt "Use host's toolchain" if DEVEL && BROKEN + default n + help + If enabled, OpenWrt will compile using your existing toolchain instead of compiling one menuconfig TOOLCHAINOPTS bool "Toolchain Options" if DEVEL + depends !NATIVE_TOOLCHAIN source "toolchain/binutils/Config.in" source "toolchain/gcc/Config.in" diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index 92069acb985..fb54bddf908 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -7,7 +7,12 @@ # Main makefile for the toolchain # include $(TOPDIR)/rules.mk -TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma +TARGETS-y:=sed kernel-headers sstrip +ifeq ($(CONFIG_NATIVE_TOOLCHAIN),) + TARGETS-y+=binutils gcc uClibc +endif +TARGETS-y+=ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma + TARGETS-$(CONFIG_GDB) += gdb TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y)) @@ -21,9 +26,11 @@ clean: $(TARGETS_CLEAN) kernel-headers-prepare: sed-install uClibc-prepare: kernel-headers-prepare sstrip-install -binutils-prepare: uClibc-prepare -gcc-prepare: binutils-install -uClibc-compile: gcc-compile +ifeq ($(CONFIG_NATIVE_TOOLCHAIN),) + binutils-prepare: uClibc-prepare + gcc-prepare: binutils-install + uClibc-compile: gcc-compile +endif gcc-install: uClibc-install squashfs-compile: lzma-install From 40ebe973ff868c62b8c4c8ec0c0c6f2173995f85 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Fri, 11 Aug 2006 17:32:00 +0000 Subject: [PATCH 457/757] Enable CONFIG_PACKET built in the kernel, closes #687 SVN-Revision: 4564 --- openwrt/target/linux/xscale-2.6/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/xscale-2.6/config b/openwrt/target/linux/xscale-2.6/config index 9b33d6016c7..4eac5f9b269 100644 --- a/openwrt/target/linux/xscale-2.6/config +++ b/openwrt/target/linux/xscale-2.6/config @@ -219,7 +219,7 @@ CONFIG_NET=y # Networking options # # CONFIG_NETDEBUG is not set -CONFIG_PACKET=m +CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y # CONFIG_NET_KEY is not set From 83b904f4a95179e5c0bec76da2d22e71675aeaf8 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Mon, 14 Aug 2006 07:40:12 +0000 Subject: [PATCH 458/757] Fix up kmod-mppe for 2.6 kernels too SVN-Revision: 4566 --- openwrt/package/kernel/modules.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index c3514ade15b..2f8be0d1ac7 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -316,13 +316,21 @@ FILES:=$(MODULES_DIR)/kernel/net/atm/pppoatm.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,pppoa)) + define KernelPackage/mppe TITLE:=Microsoft PPP compression/encryption DESCRIPTION:=Kernel modules for Microsoft PPP compression/encryption -DEPENDS:=@LINUX_2_4 kmod-ppp -KCONFIG:=$(CONFIG_PPPOE) +DEPENDS:=kmod-ppp +KCONFIG:=$(CONFIG_PPP_MPPE) +endef + +define KernelPackage/mppe/2.4 FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.$(LINUX_KMOD_SUFFIX) endef + +define KernelPackage/mppe/2.6 +FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_mppe.$(LINUX_KMOD_SUFFIX) +endef $(eval $(call KernelPackage,mppe)) From 5f9fc3c98ef7799f8c044f50bb59ba74d0eedd0d Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Mon, 14 Aug 2006 07:41:23 +0000 Subject: [PATCH 459/757] Make ext2 image larger for uml, update uml kernel config SVN-Revision: 4567 --- openwrt/include/image.mk | 2 +- openwrt/target/linux/uml-2.6/config | 455 ++++++++++++++-------------- 2 files changed, 223 insertions(+), 234 deletions(-) diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk index ba3cfb8afa9..660734c9f7a 100644 --- a/openwrt/include/image.mk +++ b/openwrt/include/image.mk @@ -47,7 +47,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) ifeq ($(CONFIG_TARGET_ROOTFS_EXT2FS),y) define Image/mkfs/ext2 - $(STAGING_DIR)/bin/genext2fs -q -b 4096 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2 + $(STAGING_DIR)/bin/genext2fs -q -b 8192 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2 $(call Image/Build,ext2) endef endif diff --git a/openwrt/target/linux/uml-2.6/config b/openwrt/target/linux/uml-2.6/config index b44ca40dc08..0e675c1e0d9 100644 --- a/openwrt/target/linux/uml-2.6/config +++ b/openwrt/target/linux/uml-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Thu Jul 20 13:48:28 2006 +# Sun Aug 13 22:46:24 2006 # CONFIG_GENERIC_HARDIRQS=y CONFIG_UML=y @@ -41,10 +41,10 @@ CONFIG_M486=y # CONFIG_MGEODE_LX is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set -# CONFIG_X86_GENERIC is not set +CONFIG_X86_GENERIC=y CONFIG_X86_CMPXCHG=y CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=4 +CONFIG_X86_L1_CACHE_SHIFT=7 CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_X86_PPRO_FENCE=y CONFIG_X86_F00F_BUG=y @@ -53,15 +53,16 @@ CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y CONFIG_X86_ALIGNMENT_16=y +CONFIG_X86_INTEL_USERCOPY=y CONFIG_UML_X86=y # CONFIG_64BIT is not set CONFIG_SEMAPHORE_SLEEPERS=y -# CONFIG_HOST_2G_2G is not set -CONFIG_TOP_ADDR=0xc0000000 +CONFIG_HOST_2G_2G=y +CONFIG_TOP_ADDR=0x80000000 # CONFIG_3_LEVEL_PGTABLES is not set -CONFIG_STUB_CODE=0xbfffe000 -CONFIG_STUB_DATA=0xbffff000 -CONFIG_STUB_START=0xbfffe000 +CONFIG_STUB_CODE=0x7fffe000 +CONFIG_STUB_DATA=0x7ffff000 +CONFIG_STUB_START=0x7fffe000 CONFIG_ARCH_HAS_SC_SIGNALS=y CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y CONFIG_GENERIC_HWEIGHT=y @@ -76,11 +77,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_LD_SCRIPT_DYN=y CONFIG_NET=y CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_HOSTFS is not set +CONFIG_BINFMT_MISC=m +CONFIG_HOSTFS=y # CONFIG_HPPFS is not set CONFIG_MCONSOLE=y -# CONFIG_MAGIC_SYSRQ is not set +CONFIG_MAGIC_SYSRQ=y CONFIG_NEST_LEVEL=0 # CONFIG_HIGHMEM is not set CONFIG_KERNEL_STACK_ORDER=2 @@ -100,21 +101,25 @@ CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_UID16=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -# CONFIG_KALLSYMS is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y -# CONFIG_ELF_CORE is not set +CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y @@ -132,12 +137,12 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set +CONFIG_KMOD=y # # Block layer # -# CONFIG_LBD is not set +CONFIG_LBD=y # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_LSF is not set @@ -145,14 +150,14 @@ CONFIG_MODULE_UNLOAD=y # IO Schedulers # CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" +CONFIG_DEFAULT_IOSCHED="anticipatory" # # Block devices @@ -161,10 +166,10 @@ CONFIG_BLK_DEV_UBD=y CONFIG_BLK_DEV_UBD_SYNC=y CONFIG_BLK_DEV_COW_COMMON=y # CONFIG_MMAPPER is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=y +CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y @@ -184,24 +189,23 @@ CONFIG_XTERM_CHAN=y # CONFIG_NOCONFIG_CHAN is not set CONFIG_CON_ZERO_CHAN="fd:0,fd:1" CONFIG_CON_CHAN="xterm" -CONFIG_SSL_CHAN="xterm" +CONFIG_SSL_CHAN="pty" CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_SOFT_WATCHDOG=m -# CONFIG_UML_WATCHDOG is not set -# CONFIG_UML_SOUND is not set -# CONFIG_SOUND is not set -# CONFIG_HOSTAUDIO is not set -# CONFIG_UML_RANDOM is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_WATCHDOG is not set +CONFIG_UML_SOUND=m +CONFIG_SOUND=m +CONFIG_HOSTAUDIO=m +CONFIG_UML_RANDOM=y # # Generic Driver Options # CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Networking @@ -214,6 +218,8 @@ CONFIG_STANDALONE=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -222,22 +228,26 @@ CONFIG_ASK_IP_FIB_HASH=y # CONFIG_IP_FIB_TRIE is not set CONFIG_IP_FIB_HASH=y CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y +# CONFIG_IP_ROUTE_FWMARK is not set CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -# CONFIG_IP_ROUTE_VERBOSE is not set +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_RR=y +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=y +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=y +CONFIG_IP_ROUTE_MULTIPATH_DRR=y +CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_PNP is not set CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_NET_IPGRE_BROADCAST=y CONFIG_IPSEC_NAT_TRAVERSAL=y # CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set +CONFIG_ARPD=y # CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m @@ -246,13 +256,13 @@ CONFIG_TCP_CONG_ADVANCED=y # # TCP congestion control # -CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_BIC=y CONFIG_TCP_CONG_CUBIC=m CONFIG_TCP_CONG_WESTWOOD=m CONFIG_TCP_CONG_HTCP=m CONFIG_TCP_CONG_HSTCP=m CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_VEGAS=m CONFIG_TCP_CONG_SCALABLE=m # @@ -263,41 +273,43 @@ CONFIG_IPV6=m # CONFIG_IPV6_PRIVACY is not set CONFIG_IPV6_ROUTER_PREF=y # CONFIG_IPV6_ROUTE_INFO is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_IPV6_TUNNEL is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set -# CONFIG_BRIDGE_NETFILTER is not set # # Core Netfilter Configuration # -# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_NETLINK=y +# CONFIG_NETFILTER_NETLINK_QUEUE is not set +# CONFIG_NETFILTER_NETLINK_LOG is not set CONFIG_NETFILTER_XTABLES=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=y CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=y @@ -309,9 +321,10 @@ CONFIG_IP_NF_CONNTRACK=y CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=y -CONFIG_IP_NF_IRC=y +# CONFIG_IP_NF_CONNTRACK_NETLINK is not set +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m # CONFIG_IP_NF_NETBIOS_NS is not set CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m @@ -330,25 +343,25 @@ CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_IMQ=m -# CONFIG_IP_NF_TARGET_LOG is not set +CONFIG_IP_NF_TARGET_IMQ=y +CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=y -CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m @@ -361,7 +374,9 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_TTL=m # CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m -# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 @@ -379,45 +394,21 @@ CONFIG_IP_NF_TARGET_SET=m # CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m -# CONFIG_IP6_NF_MATCH_RT is not set -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_FRAG is not set -# CONFIG_IP6_NF_MATCH_HL is not set +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m CONFIG_IP6_NF_MATCH_OWNER=m -# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +CONFIG_IP6_NF_MATCH_IPV6HEADER=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m -# CONFIG_IP6_NF_TARGET_LOG is not set +CONFIG_IP6_NF_TARGET_LOG=m CONFIG_IP6_NF_TARGET_REJECT=m CONFIG_IP6_NF_MANGLE=m -# CONFIG_IP6_NF_TARGET_HL is not set -# CONFIG_IP6_NF_RAW is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_RAW=m # # DCCP Configuration (EXPERIMENTAL) @@ -433,18 +424,12 @@ CONFIG_BRIDGE_EBT_ULOG=m # TIPC Configuration (EXPERIMENTAL) # # CONFIG_TIPC is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -CONFIG_ATM_BR2684_IPFILTER=y -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set +CONFIG_LLC=m +CONFIG_LLC2=m # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set @@ -456,63 +441,18 @@ CONFIG_LLC=y # # QoS and/or fair queueing # -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_ESFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_NETEM is not set -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m +# CONFIG_NET_SCHED is not set CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -# CONFIG_CLS_U32_PERF is not set -# CONFIG_CLS_U32_MARK is not set -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y # # Network testing # # CONFIG_NET_PKTGEN is not set -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -# CONFIG_AX25 is not set +# CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_DEBUG=y CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_SOFTMAC=m @@ -529,13 +469,13 @@ CONFIG_UML_NET_SLIP=y CONFIG_UML_NET_DAEMON=y CONFIG_UML_NET_MCAST=y # CONFIG_UML_NET_PCAP is not set -# CONFIG_UML_NET_SLIRP is not set +CONFIG_UML_NET_SLIRP=y # # Network device support # CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set +CONFIG_DUMMY=m # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set CONFIG_IMQ=m @@ -558,24 +498,23 @@ CONFIG_TUN=m # # Wan interfaces # -# CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_DUMMY=m -CONFIG_ATM_TCP=m -CONFIG_PPP=y +CONFIG_WAN=y +# CONFIG_SYNCLINK_SYNCPPP is not set +# CONFIG_HDLC is not set +# CONFIG_DLCI is not set +CONFIG_PPP=m # CONFIG_PPP_MULTILINK is not set CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=y -# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m CONFIG_PPP_MPPE=m CONFIG_PPPOE=m -CONFIG_PPPOATM=m -# CONFIG_SLIP is not set +CONFIG_SLIP=m +# CONFIG_SLIP_COMPRESSED is not set +# CONFIG_SLIP_SMART is not set +# CONFIG_SLIP_MODE_SLIP6 is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set @@ -584,7 +523,7 @@ CONFIG_PPPOATM=m # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=m +# CONFIG_CONNECTOR is not set # # File systems @@ -596,52 +535,61 @@ CONFIG_EXT3_FS=y # CONFIG_EXT3_FS_XATTR is not set CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=m +CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_PROC_INFO=y # CONFIG_REISERFS_FS_XATTR is not set CONFIG_JFS_FS=m # CONFIG_JFS_POSIX_ACL is not set # CONFIG_JFS_SECURITY is not set # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set -# CONFIG_FS_POSIX_ACL is not set +CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_SECURITY is not set # CONFIG_XFS_POSIX_ACL is not set # CONFIG_XFS_RT is not set # CONFIG_OCFS2_FS is not set CONFIG_MINIX_FS=m -# CONFIG_ROMFS_FS is not set +CONFIG_ROMFS_FS=y CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m # CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems # -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=m -# CONFIG_MSDOS_FS is not set +CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +# CONFIG_NTFS_RW is not set # # Pseudo filesystems # CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set +CONFIG_PROC_KCORE=y CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y # CONFIG_DEVFS_DEBUG is not set @@ -657,13 +605,13 @@ CONFIG_RAMFS=y # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set +CONFIG_HFSPLUS_FS=m # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set +CONFIG_CRAMFS=y CONFIG_SQUASHFS=y -# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_EMBEDDED=y CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 # CONFIG_SQUASHFS_VMALLOC is not set # CONFIG_VXFS_FS is not set @@ -677,27 +625,35 @@ CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 # CONFIG_NFS_FS=m CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -CONFIG_NFS_V4=y +CONFIG_NFS_V3_ACL=y +# CONFIG_NFS_V4 is not set # CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y CONFIG_LOCKD=m CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m CONFIG_NFS_COMMON=y CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set # CONFIG_CIFS_XATTR is not set # CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set +CONFIG_9P_FS=m # # Partition Types @@ -707,7 +663,7 @@ CONFIG_PARTITION_ADVANCED=y # CONFIG_OSF_PARTITION is not set # CONFIG_AMIGA_PARTITION is not set # CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y +# CONFIG_MAC_PARTITION is not set CONFIG_MSDOS_PARTITION=y # CONFIG_BSD_DISKLABEL is not set # CONFIG_MINIX_SUBPARTITION is not set @@ -723,12 +679,12 @@ CONFIG_MSDOS_PARTITION=y # # Native Language Support # -CONFIG_NLS=m +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_850 is not set # CONFIG_NLS_CODEPAGE_852 is not set # CONFIG_NLS_CODEPAGE_855 is not set # CONFIG_NLS_CODEPAGE_857 is not set @@ -759,7 +715,7 @@ CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_9 is not set # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set -CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set CONFIG_NLS_UTF8=m @@ -776,19 +732,19 @@ CONFIG_NLS_UTF8=m CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y # CONFIG_CRYPTO_NULL is not set -CONFIG_CRYPTO_MD4=m +# CONFIG_CRYPTO_MD4 is not set CONFIG_CRYPTO_MD5=m CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set CONFIG_CRYPTO_DES=m CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_586 is not set CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST6=m CONFIG_CRYPTO_TEA=m @@ -796,7 +752,7 @@ CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_TEST is not set @@ -807,9 +763,9 @@ CONFIG_CRYPTO_MICHAEL_MIC=m # # Library routines # -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -CONFIG_CRC32=y +CONFIG_CRC_CCITT=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=m # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m @@ -821,14 +777,47 @@ CONFIG_TEXTSEARCH_FSM=m # # Multi-device support (RAID and LVM) # -# CONFIG_MD is not set +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID5=m +# CONFIG_MD_RAID5_RESHAPE is not set +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +# CONFIG_MD_FAULTY is not set +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +CONFIG_DM_MULTIPATH_EMC=m # CONFIG_INPUT is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set -# CONFIG_DEBUG_KERNEL is not set +CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_SCHEDSTATS is not set +CONFIG_DEBUG_SLAB=y +# CONFIG_DEBUG_SLAB_LEAK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_FS is not set -# CONFIG_UNWIND_INFO is not set +# CONFIG_DEBUG_VM is not set +CONFIG_FRAME_POINTER=y +CONFIG_UNWIND_INFO=y +# CONFIG_FORCED_INLINING is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_GPROF is not set +# CONFIG_GCOV is not set +# CONFIG_SYSCALL_DEBUG is not set From b7cc60d4bd2e37c8acff7b3ddc31800f883ea62e Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Mon, 14 Aug 2006 07:50:58 +0000 Subject: [PATCH 460/757] Generalize the x86 kernel config for more generic processor options SVN-Revision: 4568 --- openwrt/target/linux/x86-2.6/config | 130 ++++++++++------------------ 1 file changed, 48 insertions(+), 82 deletions(-) diff --git a/openwrt/target/linux/x86-2.6/config b/openwrt/target/linux/x86-2.6/config index 1e6397e7a5d..626716c0cd4 100644 --- a/openwrt/target/linux/x86-2.6/config +++ b/openwrt/target/linux/x86-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Tue Jun 27 08:13:32 2006 +# Tue Jul 25 01:47:49 2006 # CONFIG_X86_32=y CONFIG_SEMAPHORE_SLEEPERS=y @@ -33,6 +33,9 @@ CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set # CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="../../root" +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_UID16=y # CONFIG_VM86 is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -96,7 +99,7 @@ CONFIG_X86_PC=y # CONFIG_X86_GENERICARCH is not set # CONFIG_X86_ES7000 is not set # CONFIG_M386 is not set -# CONFIG_M486 is not set +CONFIG_M486=y # CONFIG_M586 is not set # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set @@ -113,7 +116,7 @@ CONFIG_X86_PC=y # CONFIG_MWINCHIPC6 is not set # CONFIG_MWINCHIP2 is not set # CONFIG_MWINCHIP3D is not set -CONFIG_MGEODEGX1=y +# CONFIG_MGEODEGX1 is not set # CONFIG_MGEODE_LX is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set @@ -124,13 +127,12 @@ CONFIG_X86_L1_CACHE_SHIFT=4 CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_X86_PPRO_FENCE=y +CONFIG_X86_F00F_BUG=y CONFIG_X86_WP_WORKS_OK=y CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y -CONFIG_X86_CMPXCHG64=y CONFIG_X86_ALIGNMENT_16=y -CONFIG_X86_TSC=y # CONFIG_HPET_TIMER is not set CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set @@ -358,37 +360,37 @@ CONFIG_NETFILTER_XTABLES=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=y # # IP: Netfilter Configuration # -CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=y -CONFIG_IP_NF_IRC=y +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m # CONFIG_IP_NF_NETBIOS_NS is not set CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m @@ -407,25 +409,25 @@ CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_IMQ=m -# CONFIG_IP_NF_TARGET_LOG is not set +CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y -CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m # CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=y -CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m @@ -438,7 +440,9 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_TTL=m # CONFIG_IP_NF_TARGET_CLUSTERIP is not set CONFIG_IP_NF_RAW=m -# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 @@ -456,21 +460,21 @@ CONFIG_IP_NF_TARGET_SET=m # CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m -# CONFIG_IP6_NF_MATCH_RT is not set -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_FRAG is not set -# CONFIG_IP6_NF_MATCH_HL is not set +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m CONFIG_IP6_NF_MATCH_OWNER=m -# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +CONFIG_IP6_NF_MATCH_IPV6HEADER=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m -# CONFIG_IP6_NF_TARGET_LOG is not set +CONFIG_IP6_NF_TARGET_LOG=m CONFIG_IP6_NF_TARGET_REJECT=m CONFIG_IP6_NF_MANGLE=m -# CONFIG_IP6_NF_TARGET_HL is not set -# CONFIG_IP6_NF_RAW is not set +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_RAW=m # # Bridge: Netfilter Configuration @@ -1019,7 +1023,7 @@ CONFIG_NET_PCI=y # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set +CONFIG_FORCEDETH=m # CONFIG_CS89x0 is not set # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set @@ -1033,11 +1037,12 @@ CONFIG_8139TOO_PIO=y # CONFIG_8139TOO_TUNE_TWISTER is not set # CONFIG_8139TOO_8129 is not set # CONFIG_8139_OLD_RX_RESET is not set -# CONFIG_SIS900 is not set +CONFIG_SIS900=m # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set +CONFIG_VIA_RHINE=m +# CONFIG_VIA_RHINE_MMIO is not set # # Ethernet (1000 Mbit) @@ -1424,21 +1429,11 @@ CONFIG_VIDEO_V4L2=y # CONFIG_VIDEO_ADV_DEBUG is not set # CONFIG_VIDEO_VIVI is not set # CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_CPIA is not set # CONFIG_VIDEO_CPIA2 is not set -# CONFIG_VIDEO_SAA5246A is not set # CONFIG_VIDEO_SAA5249 is not set # CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set # CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set # CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_OVCAMCHIP is not set # # Encoders and Decoders @@ -1448,7 +1443,6 @@ CONFIG_VIDEO_V4L2=y # CONFIG_VIDEO_WM8775 is not set # CONFIG_VIDEO_WM8739 is not set # CONFIG_VIDEO_CX25840 is not set -# CONFIG_VIDEO_SAA711X is not set # CONFIG_VIDEO_SAA7127 is not set # CONFIG_VIDEO_UPD64031A is not set # CONFIG_VIDEO_UPD64083 is not set @@ -1456,37 +1450,10 @@ CONFIG_VIDEO_V4L2=y # # V4L USB devices # -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_W9968CF is not set -# CONFIG_USB_ZC0301 is not set -# CONFIG_USB_PWC is not set # # Radio Adapters # -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set # # Digital Video Broadcasting Devices @@ -2106,4 +2073,3 @@ CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_X86_BIOS_REBOOT=y CONFIG_KTIME_SCALAR=y -CONFIG_INITRAMFS_SOURCE="" From 28fc5e4f7ac2cb2492bc8733fde136582fc23fc3 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Mon, 14 Aug 2006 08:16:47 +0000 Subject: [PATCH 461/757] Move a bunch of ethernet hardware drivers to new kernel module packageing SVN-Revision: 4569 --- openwrt/include/modules-2.4.mk | 4 - openwrt/include/modules-2.6.mk | 8 -- openwrt/package/kernel/modules.mk | 75 +++++++++++++++++++ openwrt/target/linux/Config.in | 42 +---------- .../linux/control/kmod-net-3c59x.control | 4 - .../linux/control/kmod-net-8139too.control | 4 - .../linux/control/kmod-net-e100.control | 4 - .../linux/control/kmod-net-natsemi.control | 4 - 8 files changed, 77 insertions(+), 68 deletions(-) delete mode 100644 openwrt/target/linux/control/kmod-net-3c59x.control delete mode 100644 openwrt/target/linux/control/kmod-net-8139too.control delete mode 100644 openwrt/target/linux/control/kmod-net-e100.control delete mode 100644 openwrt/target/linux/control/kmod-net-natsemi.control diff --git a/openwrt/include/modules-2.4.mk b/openwrt/include/modules-2.4.mk index 8e7d2308ad6..b00b61c83aa 100644 --- a/openwrt/include/modules-2.4.mk +++ b/openwrt/include/modules-2.4.mk @@ -130,10 +130,6 @@ $(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\ $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.o \ ,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx)) -$(eval $(call KMOD_template,NET_NATSEMI,net-natsemi,\ - $(MODULES_DIR)/kernel/drivers/net/natsemi.o \ -,CONFIG_NATSEMI,,10,natsemi)) - $(eval $(call KMOD_template,NET_PRISM54,net-prism54,\ $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.o \ ,CONFIG_PRISM54,,10,prism54)) diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index 533a4c956be..a0ff900aa6a 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -134,10 +134,6 @@ $(eval $(call KMOD_template,NET_3C59X,net-3c59x,\ $(MODULES_DIR)/kernel/drivers/net/3c59x.ko \ ,CONFIG_VORTEX,,10,3c59x)) -$(eval $(call KMOD_template,NET_8139TOO,net-8139too,\ - $(MODULES_DIR)/kernel/drivers/net/8139too.ko \ -,CONFIG_8139TOO,,10,8139too)) - $(eval $(call KMOD_template,NET_AIRO,net-airo,\ $(MODULES_DIR)/kernel/drivers/net/wireless/airo.ko \ ,CONFIG_AIRO,,10,airo)) @@ -159,10 +155,6 @@ $(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\ $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.ko \ ,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx)) -$(eval $(call KMOD_template,NET_NATSEMI,net-natsemi,\ - $(MODULES_DIR)/kernel/drivers/net/natsemi.ko \ -,CONFIG_NATSEMI,,10,natsemi)) - $(eval $(call KMOD_template,NET_PRISM54,net-prism54,\ $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.ko \ ,CONFIG_PRISM54,,10,prism54)) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index 2f8be0d1ac7..51b7d8ace5d 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -334,3 +334,78 @@ endef $(eval $(call KernelPackage,mppe)) + +NDMENU:=Network Devices + + +define KernelPackage/natsemi +TITLE:=National Semiconductor DP8381x series +DESCRIPTION:=National Semiconductor DP8381x series PCI Ethernet kernel support +SUBMENU:=$(NDMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/natsemi.$(LINUX_KMOD_SUFFIX) +KCONFIG:=$(CONFIG_NATSEMI) +DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 +endef +$(eval $(call KernelPackage,natsemi)) + +define KernelPackage/sis900 +TITLE:=SiS 900 Ethernet support +DESCRIPTION:=Sis 900 kernel ethernet support +SUBMENU:=$(NDMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/sis900.$(LINUX_KMOD_SUFFIX) +KCONFIG:=$(CONFIG_SIS900) +DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 +endef +$(eval $(call KernelPackage,sis900)) + + +define KernelPackage/via-rhine +TITLE:=Via Rhine ethernet support +DESCRIPTION:=Kernel modules for Via Rhine ethernet chipsets +SUBMENU:=$(NDMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/via-rhine.$(LINUX_KMOD_SUFFIX) +KCONFIG:=$(CONFIG_VIA_RHINE) +DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 +endef +$(eval $(call KernelPackage,via-rhine)) + +define KernelPackage/8139too +TITLE:=RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support +DESCRIPTION:=Kernel modules for RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support +SUBMENU:=$(NDMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/8139too.$(LINUX_KMOD_SUFFIX) +KCONFIG:=$(CONFIG_8139TOO) +DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 +endef +$(eval $(call KernelPackage,8139too)) + +define KernelPackage/e100 +TITLE:=Intel(R) PRO/100+ cards kernel support +DESCRIPTION:=Kernel modules for Intel(R) PRO/100+ cards kernel support +SUBMENU:=$(NDMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/e100.$(LINUX_KMOD_SUFFIX) +KCONFIG:=$(CONFIG_E100) +DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 +endef +$(eval $(call KernelPackage,e100)) + +define KernelPackage/3c59x +TITLE:=3Com 3c590/3c900 series (592/595/597) Vortex/Boomerang +DESCRIPTION:= \ + This option enables driver support for a large number of 10mbps and \ + 10/100mbps EISA, PCI and PCMCIA 3Com network cards: \ + \ + * "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI \ + * "Boomerang" (EtherLink XL 3c900 or 3c905) PCI \ + * "Cyclone" (3c540/3c900/3c905/3c980/3c575/3c656) PCI and Cardbus \ + * "Tornado" (3c905) PCI \ + * "Hurricane" (3c555/3cSOHO) PCI +SUBMENU:=$(NDMENU) +FILES:=$(MODULES_DIR)/kernel/drivers/net/3c59x.$(LINUX_KMOD_SUFFIX) +KCONFIG:=$(CONFIG_3C59X) +DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 +endef +$(eval $(call KernelPackage,3c59x)) + + + diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 9929b9e524b..7589ea7b697 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -239,29 +239,6 @@ endmenu menu "Network devices support" depends LINUX_2_4_X86 || LINUX_2_6_X86 -config PACKAGE_KMOD_NET_3C59X - prompt "kmod-net-3c59x.................... 3Com 3c590/3c900 series (592/595/597) \"Vortex/Boomerang\" Ethernet kernel support" - tristate - depends LINUX_2_4_X86 || LINUX_2_6_X86 - default m - help - This option enables driver support for a large number of 10mbps and - 10/100mbps EISA, PCI and PCMCIA 3Com network cards: - - * "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI - * "Boomerang" (EtherLink XL 3c900 or 3c905) PCI - * "Cyclone" (3c540/3c900/3c905/3c980/3c575/3c656) PCI and Cardbus - * "Tornado" (3c905) PCI - * "Hurricane" (3c555/3cSOHO) PCI - -config PACKAGE_KMOD_NET_8139TOO - prompt "kmod-net-8139too.................. RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support" - tristate - depends LINUX_2_4_X86 || LINUX_2_6_X86 - default m - help - This is a driver for the Fast Ethernet PCI network cards based on - the RTL8139 chips. config PACKAGE_KMOD_NET_AIRO prompt "kmod-net-airo..................... Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards kernel support" @@ -279,13 +256,6 @@ config PACKAGE_KMOD_NET_AIRO and Cisco proprietary API, so both the Linux Wireless Tools and the Cisco Linux utilities can be used to configure the card. -config PACKAGE_KMOD_NET_E100 - prompt "kmod-net-e100..................... Intel(R) PRO/100+ cards kernel support" - tristate - depends LINUX_2_4_X86 || LINUX_2_6_X86 - default m - help - Intel(R) PRO/100+ cards kernel support config PACKAGE_KMOD_NET_HERMES prompt "kmod-net-hermes................... Hermes chipset 802.11b support (Orinoco/Prism2/Symbol) kernel support" @@ -328,15 +298,7 @@ config PACKAGE_KMOD_NET_HERMES_PLX 802.11b PCMCIA cards can be used in desktop machines. The Netgear MA301 is such an adaptor. -config PACKAGE_KMOD_NET_NATSEMI - prompt "kmod-net-natsemi.................. National Semiconductor DP8381x series PCI Ethernet kernel support" - tristate - depends LINUX_2_4_X86 || LINUX_2_6_X86 - default m - help - This driver is for the National Semiconductor DP83810 series, - which is used in cards from PureData, NetGear, Linksys - and others, including the 83815 chip. + config PACKAGE_KMOD_NET_PRISM54 prompt "kmod-net-prism54.................. Intersil Prism GT/Duette/Indigo PCI/PCMCIA cards kernel support" @@ -384,7 +346,7 @@ menu "PCMCIA/CardBus support" config PACKAGE_KMOD_PCMCIA_CORE prompt "kmod-pcmcia-core.................. PCMCIA/CardBus support" - depends LINUX_PCMCIA_SUPPORT + depends PCMCIA_SUPPORT tristate depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM default m diff --git a/openwrt/target/linux/control/kmod-net-3c59x.control b/openwrt/target/linux/control/kmod-net-3c59x.control deleted file mode 100644 index 8d2b8800566..00000000000 --- a/openwrt/target/linux/control/kmod-net-3c59x.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-net-3c59x -Priority: optional -Section: sys -Description: 3Com 3c590/3c900 series (592/595/597) "Vortex/Boomerang" cards kernel support diff --git a/openwrt/target/linux/control/kmod-net-8139too.control b/openwrt/target/linux/control/kmod-net-8139too.control deleted file mode 100644 index a3ad9afc601..00000000000 --- a/openwrt/target/linux/control/kmod-net-8139too.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-net-8139too -Priority: optional -Section: sys -Description: RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support diff --git a/openwrt/target/linux/control/kmod-net-e100.control b/openwrt/target/linux/control/kmod-net-e100.control deleted file mode 100644 index bd5537b3f25..00000000000 --- a/openwrt/target/linux/control/kmod-net-e100.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-net-e100 -Priority: optional -Section: sys -Description: Intel(R) PRO/100+ cards kernel support diff --git a/openwrt/target/linux/control/kmod-net-natsemi.control b/openwrt/target/linux/control/kmod-net-natsemi.control deleted file mode 100644 index 740ade67d61..00000000000 --- a/openwrt/target/linux/control/kmod-net-natsemi.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-net-natsemi -Priority: optional -Section: sys -Description: National Semiconductor DP8381x series PCI Ethernet kernel support From d0b7296ddbf044eca8d66a056b95f1afa7ee7b59 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 16 Aug 2006 00:35:30 +0000 Subject: [PATCH 462/757] fix issues if kernel config is changed after the compile has started SVN-Revision: 4570 --- openwrt/include/kernel-build.mk | 9 ++--- openwrt/include/kernel.mk | 62 +++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index a8c9e7fd25e..665f0ff7440 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -94,10 +94,11 @@ $(KERNEL_IPKG): fi $(IPKG_BUILD) $(KERNEL_IDIR) $(KERNEL_BUILD_DIR) -$(TOPDIR)/.kernel.mk: - echo "BOARD:=$(BOARD)" > $@ - echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ - echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ +$(TOPDIR)/.kernel.mk: $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL)/Makefile + echo "CONFIG_BOARD:=$(BOARD)" > $@ + echo "CONFIG_KERNEL:=$(KERNEL)" >> $@ + echo "CONFIG_LINUX_VERSION:=$(LINUX_VERSION)" >> $@ + echo "CONFIG_LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ pkg-install: FORCE @for pkg in $(INSTALL_TARGETS); do \ diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index db02ea2160e..7b959eaeaac 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -9,43 +9,53 @@ ifeq ($(DUMP),1) BOARD:=<BOARD> LINUX_VERSION:=<LINUX_VERSION> else --include $(TOPDIR)/.kernel.mk -ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) -KERNEL:=2.4 -LINUX_KMOD_SUFFIX=o -endif -ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) -KERNEL:=2.6 -LINUX_KMOD_SUFFIX=ko -endif + include $(TOPDIR)/.kernel.mk + include $(INCLUDE_DIR)/target.mk -LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + # check to see if .kernel.mk matches target.mk + ifeq ($(CONFIG_BOARD)-$(CONFIG_KERNEL),$(BOARD)-$(KERNEL)) + LINUX_VERSION:=$(CONFIG_LINUX_VERSION) + RELEASE:=$(CONFIG_RELEASE) + else + # oops, old .kernel.config; rebuild it (hiding the misleading errors this produces) + $(warning rebuilding .kernel.mk) + $(TOPDIR)/.kernel.mk: FORCE + @$(MAKE) -C $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL) $@ &>/dev/null + endif + + ifeq ($(KERNEL),2.6) + LINUX_KMOD_SUFFIX=ko + else + LINUX_KMOD_SUFFIX=o + endif + + LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/mipsel/mips/' \ -e 's/mipseb/mips/' \ -e 's/powerpc/ppc/' \ -e 's/sh[234]/sh/' \ -e 's/armeb/arm/' \ -) + ) -ifneq (,$(findstring uml,$(BOARD))) - LINUX_KARCH:=um - KERNEL_CC:=$(HOSTCC) - KERNEL_CROSS:= -else - KERNEL_CC:=$(TARGET_CC) - KERNEL_CROSS:=$(TARGET_CROSS) -endif + ifneq (,$(findstring uml,$(BOARD))) + LINUX_KARCH:=um + KERNEL_CC:=$(HOSTCC) + KERNEL_CROSS:= + else + KERNEL_CC:=$(TARGET_CC) + KERNEL_CROSS:=$(TARGET_CROSS) + endif -KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) + KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) + LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) -MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) -MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) -TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) -KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules + MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) + MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) + TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) + KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules -LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux + LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux endif # FIXME: remove this crap From 170162dcbba5380f51230116c80ed60419ebbca7 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 16 Aug 2006 01:07:12 +0000 Subject: [PATCH 463/757] a "generic" patch shouldn't be setting the ARCH to mips SVN-Revision: 4571 --- .../linux/generic-2.4/patches/000-linux_mips.patch | 9 --------- 1 file changed, 9 deletions(-) diff --git a/openwrt/target/linux/generic-2.4/patches/000-linux_mips.patch b/openwrt/target/linux/generic-2.4/patches/000-linux_mips.patch index 7fae1eefc6a..16177c53b90 100644 --- a/openwrt/target/linux/generic-2.4/patches/000-linux_mips.patch +++ b/openwrt/target/linux/generic-2.4/patches/000-linux_mips.patch @@ -27932,15 +27932,6 @@ diff -Nur linux-2.4.32-rc1/lib/Makefile linux-2.4.32-rc1.mips/lib/Makefile diff -Nur linux-2.4.32-rc1/Makefile linux-2.4.32-rc1.mips/Makefile --- linux-2.4.32-rc1/Makefile 2005-10-24 11:33:30.000000000 +0200 +++ linux-2.4.32-rc1.mips/Makefile 2005-09-23 22:41:15.000000000 +0200 -@@ -5,7 +5,7 @@ - - KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) - --ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) -+ARCH = mips - KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g") - - CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ @@ -462,10 +462,11 @@ $(MAKE) -C Documentation/DocBook mrproper From 66f79de399d54ee8b4893145892562783bc94e48 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 16 Aug 2006 19:16:23 +0000 Subject: [PATCH 464/757] fix minor compile issues with spca5xx SVN-Revision: 4572 --- openwrt/package/spca5xx/Makefile | 2 ++ openwrt/package/spca5xx/patches/02-seq_bug.patch | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 openwrt/package/spca5xx/patches/02-seq_bug.patch diff --git a/openwrt/package/spca5xx/Makefile b/openwrt/package/spca5xx/Makefile index 08f7ef3f154..7f9cdd8e921 100644 --- a/openwrt/package/spca5xx/Makefile +++ b/openwrt/package/spca5xx/Makefile @@ -37,6 +37,8 @@ define Build/Compile ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ KERNELVERSION="$(KERNEL)" \ + KERNEL_VERSION="$(LINUX_VERSION)" \ + KERNELDIR="$(LINUX_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \ modules endef diff --git a/openwrt/package/spca5xx/patches/02-seq_bug.patch b/openwrt/package/spca5xx/patches/02-seq_bug.patch new file mode 100644 index 00000000000..ec1003e700c --- /dev/null +++ b/openwrt/package/spca5xx/patches/02-seq_bug.patch @@ -0,0 +1,14 @@ +diff -Nur spca5xx-20060501/drivers/usb/spca5xx.c.orig spca5xx-20060501/drivers/usb/spca5xx.c +--- spca5xx-20060501/drivers/usb/spca5xx.c.orig 2006-08-16 11:56:33.000000000 -0700 ++++ spca5xx-20060501/drivers/usb/spca5xx.c 2006-08-16 11:55:41.000000000 -0700 +@@ -1092,8 +1092,8 @@ + // spca50x->avg_lum, spca50x->avg_lum); + for (i = 0; i < SPCA50X_NUMFRAMES; i++) { + out += sprintf(out, "frame : %d\n", i); +- out += +- sprintf(out, " sequence : %d\n", spca50x->frame[i].seq); ++// out += ++// sprintf(out, " sequence : %d\n", spca50x->frame[i].seq); + out += + sprintf(out, " grabstate : %d\n", + spca50x->frame[i].grabstate); From 92c9733f3a9ca9ade74efcafe3e322eb1ddd9c51 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 16 Aug 2006 23:43:56 +0000 Subject: [PATCH 465/757] Show error messages when collecting the package info SVN-Revision: 4573 --- openwrt/Makefile | 2 +- openwrt/include/package.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 32cadb7f991..5b90c482f0a 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -44,7 +44,7 @@ endif @echo Collecting package info... @-for dir in package/*/; do \ echo Source-Makefile: $${dir}Makefile; \ - $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || echo "ERROR: please fix $${dir}Makefile" >&2; \ + $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir || echo "ERROR: please fix $${dir}Makefile" >&2; \ done > $@ pkginfo-clean: FORCE diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 385a8465374..43f17589000 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -16,10 +16,12 @@ define Build/DefaultTargets ifeq ($(DUMP),) ifeq ($(CONFIG_AUTOREBUILD),y) ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR)) + $$(warning package has changed, need to rebuild $(subst $(TOPDIR)/,,$(PKG_BUILD_DIR))) $(PKG_BUILD_DIR)/.prepared: package-clean endif ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) + $$(warning $(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) has changed, need to rebuild $(subst $(TOPDIR)/,,$(IPKG_$(1)))) $(PKG_BUILD_DIR)/.built: package-rebuild endif endif From 4a71f7adaeb26d453e3fe90b2e6640ff61dec19d Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 17 Aug 2006 00:12:03 +0000 Subject: [PATCH 466/757] fix accidental tab SVN-Revision: 4577 --- openwrt/include/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 43f17589000..0847528b74a 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -16,12 +16,12 @@ define Build/DefaultTargets ifeq ($(DUMP),) ifeq ($(CONFIG_AUTOREBUILD),y) ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR)) - $$(warning package has changed, need to rebuild $(subst $(TOPDIR)/,,$(PKG_BUILD_DIR))) + $$(warning package has changed, need to rebuild $(subst $(TOPDIR)/,,$(PKG_BUILD_DIR))) $(PKG_BUILD_DIR)/.prepared: package-clean endif ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - $$(warning $(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) has changed, need to rebuild $(subst $(TOPDIR)/,,$(IPKG_$(1)))) + $$(warning $(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) has changed, need to rebuild $(subst $(TOPDIR)/,,$(IPKG_$(1)))) $(PKG_BUILD_DIR)/.built: package-rebuild endif endif From 3300149aed4985dfd1b62e794d7e4ebe831245b7 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 17 Aug 2006 00:33:27 +0000 Subject: [PATCH 467/757] tidy up output SVN-Revision: 4578 --- openwrt/include/package.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 0847528b74a..3328332725a 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -15,15 +15,20 @@ include $(INCLUDE_DIR)/prereq.mk define Build/DefaultTargets ifeq ($(DUMP),) ifeq ($(CONFIG_AUTOREBUILD),y) + _INFO:= ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR)) - $$(warning package has changed, need to rebuild $(subst $(TOPDIR)/,,$(PKG_BUILD_DIR))) + _INFO+=$(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/.prepared: package-clean endif ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - $$(warning $(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) has changed, need to rebuild $(subst $(TOPDIR)/,,$(IPKG_$(1)))) + _INFO+=$(subst $(TOPDIR)/,,$(IPKG_$(1))) $(PKG_BUILD_DIR)/.built: package-rebuild endif + + ifneq ($(MAKECMDGOALS),prereq) + $$(info Rebuilding $$(_INFO)) + endif endif endif From 0d4a34665278432089f9905f88f3bd8bcf57eacd Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Thu, 17 Aug 2006 07:20:08 +0000 Subject: [PATCH 468/757] Build bzImage for x86 builds - allow ext2 images even if initramfs used, they are needed for creating boot images SVN-Revision: 4579 --- openwrt/include/image.mk | 14 ++++++++------ openwrt/include/kernel-build.mk | 2 +- openwrt/include/kernel.mk | 5 +++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/openwrt/include/image.mk b/openwrt/include/image.mk index 660734c9f7a..903c27ba633 100644 --- a/openwrt/include/image.mk +++ b/openwrt/include/image.mk @@ -45,15 +45,17 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) endef endif - ifeq ($(CONFIG_TARGET_ROOTFS_EXT2FS),y) - define Image/mkfs/ext2 - $(STAGING_DIR)/bin/genext2fs -q -b 8192 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2 - $(call Image/Build,ext2) - endef - endif endif +ifeq ($(CONFIG_TARGET_ROOTFS_EXT2FS),y) + define Image/mkfs/ext2 + $(STAGING_DIR)/bin/genext2fs -q -b 8192 -I 1500 -d $(BUILD_DIR)/root/ $(KDIR)/root.ext2 + $(call Image/Build,ext2) + endef +endif + + define Image/mkfs/prepare/default find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 665f0ff7440..8400bd2f1e8 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -63,7 +63,7 @@ else endif $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) $(KERNELNAME) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index 7b959eaeaac..4b5fe72f009 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -38,6 +38,11 @@ else -e 's/armeb/arm/' \ ) + KERNELNAME="" + ifneq (,$(findstring x86,$(BOARD))) + KERNELNAME="bzImage" + endif + ifneq (,$(findstring uml,$(BOARD))) LINUX_KARCH:=um KERNEL_CC:=$(HOSTCC) From 7fc92301689295fbe7cb55e4c395eb2e7a46d869 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Thu, 17 Aug 2006 07:34:28 +0000 Subject: [PATCH 469/757] Add ext2 as a compiled in on x86-2.4 so it's available for initrd on netboot and ext2 bootable images. SVN-Revision: 4580 --- openwrt/target/linux/x86-2.4/config | 205 ++++++++-------------------- 1 file changed, 56 insertions(+), 149 deletions(-) diff --git a/openwrt/target/linux/x86-2.4/config b/openwrt/target/linux/x86-2.4/config index 1adc29508ee..5c3b2016381 100644 --- a/openwrt/target/linux/x86-2.4/config +++ b/openwrt/target/linux/x86-2.4/config @@ -1,5 +1,5 @@ # -# Automatically generated make config: don't edit +# Automatically generated by make menuconfig: don't edit # CONFIG_X86=y # CONFIG_SBUS is not set @@ -133,10 +133,6 @@ CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set @@ -189,10 +185,6 @@ CONFIG_MTD_BLOCK=y # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_MTDRAM is not set CONFIG_MTD_BLKMTD=y - -# -# Disk-On-Chip Device Drivers -# # CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set @@ -229,8 +221,9 @@ CONFIG_ISAPNP=m # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_BLK_DEV_INITRD=y # CONFIG_BLK_STATS is not set # @@ -287,8 +280,8 @@ CONFIG_IP_NF_MATCH_CONNBYTES=m CONFIG_IP_NF_CT_PROTO_GRE=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_MMS=m CONFIG_IP_NF_RTSP=m +CONFIG_IP_NF_MMS=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_LIMIT=m @@ -328,7 +321,6 @@ CONFIG_IP_NF_MATCH_STRING=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_MATCH_LAYER7_MAXDATALEN=2048 CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_MIRROR=m @@ -338,11 +330,11 @@ CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=m CONFIG_IP_NF_TARGET_NETMAP=m CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_NAT_PROTO_GRE=m -CONFIG_IP_NF_NAT_MMS=m -CONFIG_IP_NF_NAT_RTSP=m CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_RTSP=m +CONFIG_IP_NF_NAT_MMS=m CONFIG_IP_NF_NAT_SNMP_BASIC=m CONFIG_IP_NF_NAT_IRC=y CONFIG_IP_NF_NAT_FTP=y @@ -400,10 +392,6 @@ CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set CONFIG_VLAN_8021Q=y - -# -# -# # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set @@ -468,10 +456,6 @@ CONFIG_IDE=y # IDE, ATA and ATAPI Block devices # CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# # CONFIG_BLK_DEV_HD_IDE is not set # CONFIG_BLK_DEV_HD is not set # CONFIG_BLK_DEV_IDE_SATA is not set @@ -485,10 +469,6 @@ CONFIG_IDEDISK_MULTI_MODE=y # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# # CONFIG_BLK_DEV_CMD640 is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_ISAPNP is not set @@ -544,20 +524,12 @@ CONFIG_IDEDMA_IVB=y # SCSI support # CONFIG_SCSI=m - -# -# SCSI support type (disk, tape, CD-ROM) -# CONFIG_BLK_DEV_SD=m CONFIG_SD_EXTRA_DEVS=5 # CONFIG_CHR_DEV_ST is not set # CONFIG_CHR_DEV_OSST is not set # CONFIG_BLK_DEV_SR is not set CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# # CONFIG_SCSI_DEBUG_QUEUES is not set CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_CONSTANTS is not set @@ -738,7 +710,7 @@ CONFIG_8139TOO=m # CONFIG_SUNDANCE is not set # CONFIG_SUNDANCE_MMIO is not set # CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set +CONFIG_VIA_RHINE=m # CONFIG_VIA_RHINE_MMIO is not set # CONFIG_WINBOND_840 is not set # CONFIG_NET_POCKET is not set @@ -761,7 +733,7 @@ CONFIG_8139TOO=m # CONFIG_PLIP is not set CONFIG_PPP=m # CONFIG_PPP_MULTILINK is not set -CONFIG_PPP_FILTER=y +# CONFIG_PPP_FILTER is not set CONFIG_PPP_ASYNC=m # CONFIG_PPP_SYNC_TTY is not set CONFIG_PPP_DEFLATE=m @@ -785,17 +757,9 @@ CONFIG_HERMES=m CONFIG_PLX_HERMES=m # CONFIG_TMD_HERMES is not set CONFIG_PCI_HERMES=m - -# -# Wireless Pcmcia cards support -# # CONFIG_PCMCIA_HERMES is not set # CONFIG_AIRO_CS is not set # CONFIG_PCMCIA_ATMEL is not set - -# -# Prism54 PCI/PCMCIA GT/Duette Driver - 802.11(a/b/g) -# CONFIG_PRISM54=m CONFIG_FW_LOADER=m CONFIG_NET_WIRELESS=y @@ -855,7 +819,6 @@ CONFIG_MKISS=m # CONFIG_SOUNDMODEM is not set # CONFIG_YAM is not set - # # IrDA (infrared) support # @@ -907,14 +870,6 @@ CONFIG_UNIX98_PTY_COUNT=128 # Joysticks # # CONFIG_INPUT_GAMEPORT is not set - -# -# Input core support is needed for gameports -# - -# -# Input core support is needed for joysticks -# # CONFIG_QIC02_TAPE is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_IPMI_PANIC_EVENT is not set @@ -970,7 +925,6 @@ CONFIG_SCx200_GPIO=m # Direct Rendering Manager (XFree86 DRI support) # # CONFIG_DRM is not set -# CONFIG_MWAVE is not set # # PCMCIA character devices @@ -980,6 +934,49 @@ CONFIG_SCx200_GPIO=m # CONFIG_MWAVE is not set # CONFIG_OBMOUSE is not set +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=m + +# +# Video For Linux +# +CONFIG_VIDEO_PROC_FS=y +# CONFIG_I2C_PARPORT is not set +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_PMS is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_ZORAN is not set +# CONFIG_VIDEO_ZORAN_BUZ is not set +# CONFIG_VIDEO_ZORAN_DC10 is not set +# CONFIG_VIDEO_ZORAN_LML33 is not set +# CONFIG_VIDEO_ZR36120 is not set +# CONFIG_VIDEO_MEYE is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_CADET is not set +# CONFIG_RADIO_RTRACK is not set +# CONFIG_RADIO_RTRACK2 is not set +# CONFIG_RADIO_AZTECH is not set +# CONFIG_RADIO_GEMTEK is not set +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MIROPCM20 is not set +# CONFIG_RADIO_MIROPCM20_RDS is not set +# CONFIG_RADIO_SF16FMI is not set +# CONFIG_RADIO_SF16FMR2 is not set +# CONFIG_RADIO_TERRATEC is not set +# CONFIG_RADIO_TRUST is not set +# CONFIG_RADIO_TYPHOON is not set +# CONFIG_RADIO_ZOLTRIX is not set + # # File systems # @@ -994,7 +991,7 @@ CONFIG_SCx200_GPIO=m # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set -CONFIG_HFSPLUS_FS=m +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BEFS_DEBUG is not set # CONFIG_BFS_FS is not set @@ -1038,7 +1035,7 @@ CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set # CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=m +CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set # CONFIG_UDF_FS is not set # CONFIG_UDF_RW is not set @@ -1144,53 +1141,6 @@ CONFIG_NLS_ISO8859_15=m # CONFIG_NLS_KOI8_U is not set CONFIG_NLS_UTF8=m -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m - -# -# Video For Linux -# -CONFIG_VIDEO_PROC_FS=y -# CONFIG_I2C_PARPORT is not set - -# -# Video Adapters -# -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_PMS is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_ZORAN_BUZ is not set -# CONFIG_VIDEO_ZORAN_DC10 is not set -# CONFIG_VIDEO_ZORAN_LML33 is not set -# CONFIG_VIDEO_ZR36120 is not set -# CONFIG_VIDEO_MEYE is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_CADET is not set -# CONFIG_RADIO_RTRACK is not set -# CONFIG_RADIO_RTRACK2 is not set -# CONFIG_RADIO_AZTECH is not set -# CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_MIROPCM20 is not set -# CONFIG_RADIO_MIROPCM20_RDS is not set -# CONFIG_RADIO_SF16FMI is not set -# CONFIG_RADIO_SF16FMR2 is not set -# CONFIG_RADIO_TERRATEC is not set -# CONFIG_RADIO_TRUST is not set -# CONFIG_RADIO_TYPHOON is not set -# CONFIG_RADIO_ZOLTRIX is not set - # # Sound # @@ -1226,32 +1176,16 @@ CONFIG_SOUND=m # CONFIG_USB=m # CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set - -# -# USB Host Controller Drivers -# CONFIG_USB_EHCI_HCD=m # CONFIG_USB_UHCI is not set CONFIG_USB_UHCI_ALT=m CONFIG_USB_OHCI=m # CONFIG_USB_SL811HS_ALT is not set # CONFIG_USB_SL811HS is not set - -# -# USB Device Class drivers -# CONFIG_USB_AUDIO=m # CONFIG_USB_EMI26 is not set - -# -# USB Bluetooth can only be used with disabled Bluetooth subsystem -# # CONFIG_USB_MIDI is not set CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set @@ -1265,15 +1199,7 @@ CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m - -# -# USB Human Interface Devices (HID) -# # CONFIG_USB_HID is not set - -# -# Input core support is needed for USB HID input layer or HIDBP support -# # CONFIG_USB_HIDINPUT is not set # CONFIG_USB_HIDDEV is not set # CONFIG_USB_KBD is not set @@ -1282,19 +1208,11 @@ CONFIG_USB_PRINTER=m # CONFIG_USB_WACOM is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set - -# -# USB Imaging devices -# # CONFIG_USB_DC2XX is not set # CONFIG_USB_MDC800 is not set # CONFIG_USB_SCANNER is not set # CONFIG_USB_MICROTEK is not set # CONFIG_USB_HPUSBSCSI is not set - -# -# USB Multimedia devices -# # CONFIG_USB_IBMCAM is not set # CONFIG_USB_KONICAWC is not set # CONFIG_USB_OV511 is not set @@ -1305,20 +1223,12 @@ CONFIG_USB_PWC=m # CONFIG_USB_VICAM is not set # CONFIG_USB_DSBR is not set # CONFIG_USB_DABUSB is not set - -# -# USB Network adaptors -# # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_CATC is not set # CONFIG_USB_CDCETHER is not set # CONFIG_USB_USBNET is not set - -# -# USB port drivers -# # CONFIG_USB_USS720 is not set # @@ -1346,10 +1256,6 @@ CONFIG_USB_SERIAL_PL2303=m # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OMNINET is not set - -# -# USB Miscellaneous drivers -# # CONFIG_USB_RIO500 is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_TIGL is not set @@ -1429,3 +1335,4 @@ CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_FW_LOADER=m +CONFIG_INITRAMFS_SOURCE="" From ffa5ce367c3596da852e74b5c6e427ec19a28fe5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 17 Aug 2006 18:11:25 +0000 Subject: [PATCH 470/757] fix KERNELNAME SVN-Revision: 4584 --- openwrt/include/kernel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index 4b5fe72f009..7c23aaca8ee 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -38,7 +38,7 @@ else -e 's/armeb/arm/' \ ) - KERNELNAME="" + KERNELNAME= ifneq (,$(findstring x86,$(BOARD))) KERNELNAME="bzImage" endif From 6c2792c792291d843b419a7b5d9a12a10de61293 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Fri, 18 Aug 2006 00:00:15 +0000 Subject: [PATCH 471/757] fix wget long options bug (closes: #682) SVN-Revision: 4586 --- .../patches/001-wget_long_options.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 openwrt/package/busybox/patches/001-wget_long_options.patch diff --git a/openwrt/package/busybox/patches/001-wget_long_options.patch b/openwrt/package/busybox/patches/001-wget_long_options.patch new file mode 100644 index 00000000000..9538427e3ed --- /dev/null +++ b/openwrt/package/busybox/patches/001-wget_long_options.patch @@ -0,0 +1,22 @@ +Index: busybox-CURRENT/networking/wget.c +=================================================================== +--- busybox-CURRENT/networking/wget.c (revision 15806) ++++ busybox-CURRENT/networking/wget.c (working copy) +@@ -133,7 +133,7 @@ + #define WGET_OPT_PREFIX 32 + #define WGET_OPT_PROXY 64 + +-#if ENABLE_WGET_LONG_OPTIONS ++#if CONFIG_FEATURE_WGET_LONG_OPTIONS + static const struct option wget_long_options[] = { + { "continue", 0, NULL, 'c' }, + { "quiet", 0, NULL, 'q' }, +@@ -177,7 +177,7 @@ + * Crack command line. + */ + bb_opt_complementally = "-1:\203::"; +-#if ENABLE_WGET_LONG_OPTIONS ++#if CONFIG_FEATURE_WGET_LONG_OPTIONS + bb_applet_long_options = wget_long_options; + #endif + opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:", From cb3aaf3448e2f586f83739b1ac55f77cb5170109 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Fri, 18 Aug 2006 01:18:24 +0000 Subject: [PATCH 472/757] cosmetic coherency fix SVN-Revision: 4588 --- openwrt/include/kernel-build.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 8400bd2f1e8..5e4534281a7 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -71,8 +71,8 @@ $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux $(LINUX_DIR)/.modules_done: rm -rf $(KERNEL_BUILD_DIR)/modules - $(MAKE) -C "$(LINUX_DIR)" CC="$(KERNEL_CC)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) modules - $(MAKE) -C "$(LINUX_DIR)" CC="$(KERNEL_CC)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) modules + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done modules: $(LINUX_DIR)/.modules_done From eca439169141afa7609a346f99260e397485a981 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Fri, 18 Aug 2006 12:39:49 +0000 Subject: [PATCH 473/757] Update for initramfs handling SVN-Revision: 4591 --- openwrt/include/kernel-build.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 5e4534281a7..0ef00de35d3 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -57,6 +57,7 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config mkdir -p $(BUILD_DIR)/root/etc/init.d $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ + $(CP) ../generic-2.6/files/postinit $(BUILD_DIR)/root/ else rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config From e43316ad3df298fb6ba356816f74d06486e6877f Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Fri, 18 Aug 2006 12:40:47 +0000 Subject: [PATCH 474/757] Flesh out early userspace for initramfs to allow booting from media SVN-Revision: 4592 --- openwrt/target/linux/generic-2.6/files/init | 81 ++++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/openwrt/target/linux/generic-2.6/files/init b/openwrt/target/linux/generic-2.6/files/init index 8ca48a04c1c..eda776c87d3 100755 --- a/openwrt/target/linux/generic-2.6/files/init +++ b/openwrt/target/linux/generic-2.6/files/init @@ -1,3 +1,80 @@ -#!/bin/ash +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin +mount none /proc -t proc mount none /dev -t devfs -exec /bin/busybox init + +# the root mount point can come from the kernel command line +# or it can be overridden in the preinit.arch file +[ -f /etc/preinit.arch ] && . /etc/preinit.arch + +# if we have no root parameter, just go to running from ramfs +[ -z $rootfs ] && { + export NOMOUNT="No Root" + exec /sbin/init +} + +#if we have a failsafe boot selected, dont bother +#trying to find or wait for a root mount point +[ -z "$FAILSAFE" ] || { + exec /bin/busybox init +} + +# Load the modules we have in initramfs, this should +# make the media accessible, but, it may take some time +. /etc/functions.sh +load_modules /etc/modules /etc/modules.d/* + +#wait 10 seconds for the disc to show up +#usb stick typically takes 4 to 6 seconds +#till it's readable +#it's quite possible the disc never shows up +#if we netbooted this kernel +COUNTER=0 +while [ $COUNTER -lt 10 ]; do + sleep 1 + [ -e $rootfs ] && let COUNTER=10; + let COUNTER=COUNTER+1 +done +[ -e $rootfs ] || { + export FAILSAFE="NoDisc" + exec /bin/busybox init +} + +# now we'll try mount it, again with a timeout +# This will fail if the inserted stick is formatted +# in a manner we dont understand +COUNTER=0 +while [ $COUNTER -lt 10 ]; do + sleep 1 + mount $rootfs /mnt + [ $? -eq "0" ] && let COUNTER=100; + let COUNTER=COUNTER+1 +done +[ $? -ne "0" ] && { + export FAILSAFE="MountFail" + exec /bin/busybox init +} + +#It mounted, lets look for a postinit file, again, give it time +#I've seen this take 6 seconds to actually complete +COUNTER=0 +while [ $COUNTER -lt 10 ]; do + sleep 1 + [ -e /mnt/postinit ] && let COUNTER=10; + let COUNTER=COUNTER+1 +done +[ -e /mnt/postinit ] || { + export FAILSAFE="No postinit" + exec /bin/busybox init +} + +unset rootfs + +mount -o move /proc /mnt/proc +mount -o move /dev /mnt/dev +mount -o move /tmp /mnt/tmp +mount -o move /sys /mnt/sys + +exec switch_root -c /dev/console /mnt /postinit From 66487a7557a1096e95451037be21a6078574632d Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Fri, 18 Aug 2006 13:10:19 +0000 Subject: [PATCH 475/757] Add support for the Asus power led, closes #349 SVN-Revision: 4594 --- openwrt/package/diag/src/diag.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/openwrt/package/diag/src/diag.c b/openwrt/package/diag/src/diag.c index 4f12a1f1e21..d25f749df50 100644 --- a/openwrt/package/diag/src/diag.c +++ b/openwrt/package/diag/src/diag.c @@ -29,6 +29,7 @@ * 2005/04/13 added licensing informations * 2005/04/18 base reset polarity off initial readings * 2006/02/07 motorola wa840g/we800g support added + * 2006/08/18 asus power led support added */ #include <linux/module.h> @@ -61,6 +62,13 @@ static void v2_set_dmz(u8 state) { set_gpio(DMZ_GPIO,state); } +// asus wl-500g (+deluxe) +#define ASUS_PWR_GPIO (1<<0) + +static void asus_set_pwr(u8 state) { + set_gpio(ASUS_PWR_GPIO,state); +} + // v1.x - - - - - #define LED_DIAG 0x13 #define LED_DMZ 0x12 @@ -92,22 +100,27 @@ static void ignore(u8 ignored) {}; // - - - - - #define BIT_DMZ 0x01 +#define BIT_PWR 0x02 #define BIT_DIAG 0x04 void (*set_diag)(u8 state); void (*set_dmz)(u8 state); +void (*set_pwr)(u8 state); -static unsigned int diag = 0; +static unsigned int diag = 0x02; // default: diag off, pwr on, dmz off static void diag_change(void) { set_diag(0xFF); // off set_dmz(0xFF); // off + set_pwr(0xFF); // off if(diag & BIT_DIAG) set_diag(0x00); // on if(diag & BIT_DMZ) set_dmz(0x00); // on + if (diag & BIT_PWR) + set_pwr(0x00); //on } static int proc_diag(ctl_table *table, int write, struct file *filp, @@ -178,6 +191,7 @@ static int __init diag_init(void) set_diag=ignore; set_dmz=ignore; + set_pwr=ignore; buf=nvram_get("pmon_ver") ?: ""; if (((board_type & 0xf00) == 0x400) && (strncmp(buf, "CFE", 3) != 0)) { @@ -202,6 +216,7 @@ static int __init diag_init(void) } if (!strcmp(buf,"asusX")) { //asus wl-500g + set_pwr=asus_set_pwr; reset_gpio=(1<<6); } if (!strcmp(buf,"2")) { @@ -240,6 +255,7 @@ static int __init diag_init(void) } if (!strcmp(buf,"45")) { //wl-500g deluxe + set_pwr=asus_set_pwr; reset_gpio=(1<<6); } } From c80281f919f2d850ec3ac413806b99a164762dd2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 18 Aug 2006 14:44:30 +0000 Subject: [PATCH 476/757] remove reference to missing file SVN-Revision: 4595 --- openwrt/include/kernel-build.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 0ef00de35d3..5e4534281a7 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -57,7 +57,6 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config mkdir -p $(BUILD_DIR)/root/etc/init.d $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ - $(CP) ../generic-2.6/files/postinit $(BUILD_DIR)/root/ else rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config From cfc4e0ed0232f006e22e7bf7b157ea8cc12465dd Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 18 Aug 2006 17:12:00 +0000 Subject: [PATCH 477/757] don't try to use gnu wget specific options in ipkg SVN-Revision: 4599 --- openwrt/package/busybox/patches/911-ipkg.patch | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/openwrt/package/busybox/patches/911-ipkg.patch b/openwrt/package/busybox/patches/911-ipkg.patch index 1824e03c426..b2fca7f9c49 100644 --- a/openwrt/package/busybox/patches/911-ipkg.patch +++ b/openwrt/package/busybox/patches/911-ipkg.patch @@ -3399,7 +3399,7 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h busybox-1.2.0+ipk diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c --- busybox-1.2.0-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 +++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-07-22 16:31:25.000000000 +0200 -@@ -0,0 +1,195 @@ +@@ -0,0 +1,190 @@ +/* ipkg_download.c - the itsy package management system + + Carl D. Worth @@ -3471,12 +3471,7 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.c busybox-1.2.0+ipkg + } + + /* XXX: BUG rewrite to use execvp or else busybox's internal wget -Jamey 7/23/2002 */ -+ sprintf_alloc(&cmd, "wget --passive-ftp %s %s%s %s%s %s -P %s %s", -+ (conf->http_proxy || conf->ftp_proxy) ? "--proxy=on" : "", -+ conf->proxy_user ? "--proxy-user=" : "", -+ conf->proxy_user ? conf->proxy_user : "", -+ conf->proxy_passwd ? "--proxy-passwd=" : "", -+ conf->proxy_passwd ? conf->proxy_passwd : "", ++ sprintf_alloc(&cmd, "wget %s -P %s %s", + conf->verbose_wget ? "" : "-q", + conf->tmp_dir, + src); From 3788ddb951dcec96483510d308440160392d4de6 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Fri, 18 Aug 2006 19:36:22 +0000 Subject: [PATCH 478/757] File I forgot SVN-Revision: 4600 --- openwrt/target/linux/generic-2.6/files/postinit | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 openwrt/target/linux/generic-2.6/files/postinit diff --git a/openwrt/target/linux/generic-2.6/files/postinit b/openwrt/target/linux/generic-2.6/files/postinit new file mode 100755 index 00000000000..6ae1012bc53 --- /dev/null +++ b/openwrt/target/linux/generic-2.6/files/postinit @@ -0,0 +1,4 @@ +#!/bin/ash +mount none /dev -t devfs +exec /bin/busybox init + From 55f3d75f841a3b7f970b0ddbc7f2f3d946debf8e Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Fri, 18 Aug 2006 19:39:51 +0000 Subject: [PATCH 479/757] handle postinit for initramfs SVN-Revision: 4601 --- openwrt/include/kernel-build.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 5e4534281a7..0ef00de35d3 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -57,6 +57,7 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config mkdir -p $(BUILD_DIR)/root/etc/init.d $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ + $(CP) ../generic-2.6/files/postinit $(BUILD_DIR)/root/ else rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config From 43459c3f822235d48919ed612d3fdd758887bebb Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 18 Aug 2006 21:21:06 +0000 Subject: [PATCH 480/757] Fix/clean several hundred package makefiles SVN-Revision: 4603 --- openwrt/package/arptables/Makefile | 2 +- openwrt/package/broadcom-wl/Makefile | 1 - openwrt/package/hostapd/Makefile | 7 +++---- openwrt/package/linux-atm/Makefile | 2 +- openwrt/package/pcmcia-cs/Makefile | 6 +----- openwrt/package/robocfg/Makefile | 6 ------ openwrt/package/zd1211/Makefile | 1 - 7 files changed, 6 insertions(+), 19 deletions(-) diff --git a/openwrt/package/arptables/Makefile b/openwrt/package/arptables/Makefile index 855169b7f9d..40e9ac13b02 100644 --- a/openwrt/package/arptables/Makefile +++ b/openwrt/package/arptables/Makefile @@ -33,7 +33,7 @@ define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" LD="$(TARGET_CROSS)ld" \ + $(TARGET_CONFIGURE_OPTS) \ COPT_FLAGS="$(TARGET_CFLAGS)" \ KERNEL_DIR="./include/linux" endef diff --git a/openwrt/package/broadcom-wl/Makefile b/openwrt/package/broadcom-wl/Makefile index f7428188d37..ce447a4ac27 100644 --- a/openwrt/package/broadcom-wl/Makefile +++ b/openwrt/package/broadcom-wl/Makefile @@ -87,7 +87,6 @@ define Build/Compile # Compile wlc $(MAKE) -C $(PKG_BUILD_DIR)/wlc \ $(TARGET_CONFIGURE_OPTS) \ - CC="$(TARGET_CC)" \ CFLAGS="-I$(PKG_BUILD_DIR)/wlc/include $(TARGET_CFLAGS)" \ all endef diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile index 352d597669a..a1161e11fe8 100644 --- a/openwrt/package/hostapd/Makefile +++ b/openwrt/package/hostapd/Makefile @@ -87,11 +87,10 @@ define Package/Template define Build/Compile/$(2) $(call Build/CompileTarget,$(2)) endef - endif - - define Package/$(1)/install + define Package/$(1)/install $(call Package/InstallTemplate,$(1),$(2)) - endef + endef + endif endef define Build/Configure diff --git a/openwrt/package/linux-atm/Makefile b/openwrt/package/linux-atm/Makefile index 56ca90a3837..55b044862e7 100644 --- a/openwrt/package/linux-atm/Makefile +++ b/openwrt/package/linux-atm/Makefile @@ -38,7 +38,7 @@ DESCRIPTION:=ATM RFC2684 bridging utility endef define Build/Configure - $(call Build/Configure/Default,) + $(call Build/Configure/Default) # prevent autoheader invocation touch $(PKG_BUILD_DIR)/stamp-h.in endef diff --git a/openwrt/package/pcmcia-cs/Makefile b/openwrt/package/pcmcia-cs/Makefile index 11f32a89239..fcdf71cd76a 100644 --- a/openwrt/package/pcmcia-cs/Makefile +++ b/openwrt/package/pcmcia-cs/Makefile @@ -50,11 +50,7 @@ define Build/Configure endef define Build/Compile - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS)" \ - all install + $(call Build/Compile/Default,CFLAGS="$(TARGET_CFLAGS)" all install) endef define Package/pcmcia-cs/install diff --git a/openwrt/package/robocfg/Makefile b/openwrt/package/robocfg/Makefile index e43198de93b..072735ef601 100644 --- a/openwrt/package/robocfg/Makefile +++ b/openwrt/package/robocfg/Makefile @@ -27,12 +27,6 @@ define Build/Prepare $(CP) ./src/* $(PKG_BUILD_DIR)/ endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ - all -endef - define Package/robocfg/install install -d -m0755 $(1)/sbin install -m0755 $(PKG_BUILD_DIR)/robocfg $(1)/sbin/ diff --git a/openwrt/package/zd1211/Makefile b/openwrt/package/zd1211/Makefile index 651621f7e84..0c94cd14dfc 100644 --- a/openwrt/package/zd1211/Makefile +++ b/openwrt/package/zd1211/Makefile @@ -42,7 +42,6 @@ define Build/Compile CC="$(TARGET_CC)" \ CPP="$(TARGET_CC)" \ LD="$(TARGET_CROSS)ld" \ - STAGING_DIR=$(STAGING_DIR) \ KERNELVERSION="$(KERNEL)" \ KERNEL_SOURCE="$(LINUX_DIR)" \ KDIR="$(LINUX_DIR)" \ From b52f59ef248a6d0499201ffaa928d31e888f3786 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Fri, 18 Aug 2006 22:37:40 +0000 Subject: [PATCH 481/757] Update init to use /etc/banner for presence test, remove postinit SVN-Revision: 4604 --- openwrt/target/linux/generic-2.6/files/init | 10 +++++----- openwrt/target/linux/generic-2.6/files/postinit | 4 ---- 2 files changed, 5 insertions(+), 9 deletions(-) delete mode 100755 openwrt/target/linux/generic-2.6/files/postinit diff --git a/openwrt/target/linux/generic-2.6/files/init b/openwrt/target/linux/generic-2.6/files/init index eda776c87d3..0c60acd6397 100755 --- a/openwrt/target/linux/generic-2.6/files/init +++ b/openwrt/target/linux/generic-2.6/files/init @@ -62,11 +62,11 @@ done COUNTER=0 while [ $COUNTER -lt 10 ]; do sleep 1 - [ -e /mnt/postinit ] && let COUNTER=10; + [ -e /mnt/etc/banner ] && let COUNTER=10; let COUNTER=COUNTER+1 done -[ -e /mnt/postinit ] || { - export FAILSAFE="No postinit" +[ -e /mnt/etc/banner ] || { + export FAILSAFE="No Openwrt FS" exec /bin/busybox init } @@ -76,5 +76,5 @@ mount -o move /proc /mnt/proc mount -o move /dev /mnt/dev mount -o move /tmp /mnt/tmp mount -o move /sys /mnt/sys - -exec switch_root -c /dev/console /mnt /postinit +mount none /tmp -t tmpfs +exec switch_root -c /dev/console /mnt /sbin/init diff --git a/openwrt/target/linux/generic-2.6/files/postinit b/openwrt/target/linux/generic-2.6/files/postinit deleted file mode 100755 index 6ae1012bc53..00000000000 --- a/openwrt/target/linux/generic-2.6/files/postinit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/ash -mount none /dev -t devfs -exec /bin/busybox init - From 109039c248f2595aabb8e952d917a8d8ba082611 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Fri, 18 Aug 2006 22:38:20 +0000 Subject: [PATCH 482/757] Remove postinit stuff for initramfs SVN-Revision: 4605 --- openwrt/include/kernel-build.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 0ef00de35d3..5e4534281a7 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -57,7 +57,6 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config mkdir -p $(BUILD_DIR)/root/etc/init.d $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ - $(CP) ../generic-2.6/files/postinit $(BUILD_DIR)/root/ else rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config From f070135a8decd22667bd6bd03cfb0a76989dda15 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 19 Aug 2006 14:45:14 +0000 Subject: [PATCH 483/757] fix typo SVN-Revision: 4608 --- openwrt/package/base-files/default/lib/network/config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh index 163e42e800f..690d7996ef7 100755 --- a/openwrt/package/base-files/default/lib/network/config.sh +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -14,7 +14,7 @@ find_config() { ;; esac config_get device "$ifn" device - for ifc in ${device:-iface}; do + for ifc in ${device:-$iface}; do [ "$ifc" = "$1" ] && { echo "$ifn" return 0 From 127081218204009315bbf833a622d57c32d7775c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 19 Aug 2006 14:59:33 +0000 Subject: [PATCH 484/757] enable ipip for aruba SVN-Revision: 4609 --- openwrt/target/linux/aruba-2.6/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/config b/openwrt/target/linux/aruba-2.6/config index 7385a47f869..d215e22138c 100644 --- a/openwrt/target/linux/aruba-2.6/config +++ b/openwrt/target/linux/aruba-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Mon Jun 19 13:09:29 2006 +# Sun Aug 13 18:43:49 2006 # CONFIG_MIPS=y @@ -245,7 +245,7 @@ CONFIG_INET=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_FIB_HASH=y # CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set +CONFIG_NET_IPIP=m # CONFIG_NET_IPGRE is not set # CONFIG_IPSEC_NAT_TRAVERSAL is not set # CONFIG_ARPD is not set From 576ee513c8c63e88a36adda97994aef3404cf0ae Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 19 Aug 2006 15:00:01 +0000 Subject: [PATCH 485/757] don't pad aruba images - unnecessary with the jffs2 hack SVN-Revision: 4610 --- openwrt/target/image/aruba/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openwrt/target/image/aruba/Makefile b/openwrt/target/image/aruba/Makefile index 1d2aebfb182..09aa8eabd4a 100644 --- a/openwrt/target/image/aruba/Makefile +++ b/openwrt/target/image/aruba/Makefile @@ -33,8 +33,7 @@ endef define Image/Build/jffs2-64k @dd if=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari of=$(KDIR)/image.tmp bs=655360 conv=sync @cat $(KDIR)/root.$(1) >> $(KDIR)/image.tmp - @dd if=$(KDIR)/image.tmp of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(patsubst jffs2-%,jffs2,$(1)).bin bs=3604480 conv=sync - @rm -f $(KDIR)/image.tmp + mv $(KDIR)/image.tmp $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(patsubst jffs2-%,jffs2,$(1)).bin endef define Image/Build From 58b3ea7e8660ab019c262f6f3d96e15817800e5e Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Sun, 20 Aug 2006 05:32:43 +0000 Subject: [PATCH 486/757] Add devpts mounts SVN-Revision: 4612 --- openwrt/target/linux/generic-2.6/files/init | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/target/linux/generic-2.6/files/init b/openwrt/target/linux/generic-2.6/files/init index 0c60acd6397..1fa6a7f1f61 100755 --- a/openwrt/target/linux/generic-2.6/files/init +++ b/openwrt/target/linux/generic-2.6/files/init @@ -4,6 +4,7 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin mount none /proc -t proc mount none /dev -t devfs +mount non /dev/pts -t devpts # the root mount point can come from the kernel command line # or it can be overridden in the preinit.arch file @@ -74,6 +75,7 @@ unset rootfs mount -o move /proc /mnt/proc mount -o move /dev /mnt/dev +mount -o move /dev/pts /mnt/dev/pts mount -o move /tmp /mnt/tmp mount -o move /sys /mnt/sys mount none /tmp -t tmpfs From 34a8300f0d43175eb72fef0f470d72ccd213cb2b Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 20 Aug 2006 17:27:24 +0000 Subject: [PATCH 487/757] port kmod-ipv6 to the new system SVN-Revision: 4615 --- openwrt/include/modules-2.4.mk | 4 ---- openwrt/include/modules-2.6.mk | 4 ---- openwrt/package/kernel/modules.mk | 7 +++++++ openwrt/target/linux/Config.in | 7 ------- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/openwrt/include/modules-2.4.mk b/openwrt/include/modules-2.4.mk index b00b61c83aa..7ef33236399 100644 --- a/openwrt/include/modules-2.4.mk +++ b/openwrt/include/modules-2.4.mk @@ -21,10 +21,6 @@ $(eval $(call KMOD_template,IPIP,ipip,\ $(MODULES_DIR)/kernel/net/ipv4/ipip.o \ ,CONFIG_NET_IPIP,,60,ipip)) -$(eval $(call KMOD_template,IPV6,ipv6,\ - $(MODULES_DIR)/kernel/net/ipv6/ipv6.o \ -,CONFIG_IPV6,,20,ipv6)) - $(eval $(call KMOD_template,SCHED,sched,\ $(MODULES_DIR)/kernel/net/sched/*.o \ )) diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index a0ff900aa6a..4ea28fb1679 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -23,10 +23,6 @@ $(eval $(call KMOD_template,IPIP,ipip,\ $(MODULES_DIR)/kernel/net/ipv4/ipip.ko \ ,CONFIG_NET_IPIP,,60,ipip)) -$(eval $(call KMOD_template,IPV6,ipv6,\ - $(MODULES_DIR)/kernel/net/ipv6/ipv6.ko \ -,CONFIG_IPV6,,20,ipv6)) - $(eval $(call KMOD_template,SCHED,sched,\ $(MODULES_DIR)/kernel/net/sched/*.ko \ ,CONFIG_NET_SCHED)) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index 51b7d8ace5d..090945c3e06 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -281,6 +281,13 @@ KCONFIG:=$(CONFIG_BRIDGE_NF_EBTABLES) endef $(eval $(call KernelPackage,ebtables)) +define KernelPackage/ipv6 +TITLE:=IPv6 support +DESCRIPTION:=Kernel modules for IPv6 support +KCONFIG:=$(CONFIG_IPV6) +FILES:=$(MODULES_DIR)/kernel/net/ipv6/ipv6.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,ipv6)) define KernelPackage/ppp TITLE:=PPP modules diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 7589ea7b697..f9c72c01a52 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -30,13 +30,6 @@ config PACKAGE_KMOD_IPIP help Kernel module for IP in IP encapsulation -config PACKAGE_KMOD_IPV6 - prompt "kmod-ipv6......................... IPv6 support" - tristate - default m - help - Kernel modules for IPv6 protocol support - config PACKAGE_KMOD_RING prompt "kmod-ring......................... PF Ring" tristate From bbda94d4f92cdf74a8cb8963955ff0171dfcb197 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 21 Aug 2006 23:13:17 +0000 Subject: [PATCH 488/757] fix up TMPDIR for initial prereq check to avoid creating a bogus build_ directory SVN-Revision: 4617 --- openwrt/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 5b90c482f0a..15074c58c3a 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -96,10 +96,11 @@ toolchain/%: FORCE @touch $@ .prereq-packages: include/prereq.mk .pkginfo .config - @$(NO_TRACE_MAKE) -s -C package prereq 2>/dev/null || { \ + @$(NO_TRACE_MAKE) -s -C package TMPDIR="$(TOPDIR)/tmp" prereq 2>/dev/null || { \ echo "Prerequisite check failed. Use FORCE=1 to override."; \ false; \ } + rm -rf "$(TOPDIR)/tmp" @touch $@ prereq: .prereq-build .prereq-packages FORCE From d8cb7ff884d6d140cbcd9484206203ba2022dab1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 21 Aug 2006 23:15:09 +0000 Subject: [PATCH 489/757] revert [4599], the bug was fixed elsewhere SVN-Revision: 4618 --- openwrt/package/busybox/patches/911-ipkg.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openwrt/package/busybox/patches/911-ipkg.patch b/openwrt/package/busybox/patches/911-ipkg.patch index b2fca7f9c49..1824e03c426 100644 --- a/openwrt/package/busybox/patches/911-ipkg.patch +++ b/openwrt/package/busybox/patches/911-ipkg.patch @@ -3399,7 +3399,7 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h busybox-1.2.0+ipk diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c --- busybox-1.2.0-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 +++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-07-22 16:31:25.000000000 +0200 -@@ -0,0 +1,190 @@ +@@ -0,0 +1,195 @@ +/* ipkg_download.c - the itsy package management system + + Carl D. Worth @@ -3471,7 +3471,12 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.c busybox-1.2.0+ipkg + } + + /* XXX: BUG rewrite to use execvp or else busybox's internal wget -Jamey 7/23/2002 */ -+ sprintf_alloc(&cmd, "wget %s -P %s %s", ++ sprintf_alloc(&cmd, "wget --passive-ftp %s %s%s %s%s %s -P %s %s", ++ (conf->http_proxy || conf->ftp_proxy) ? "--proxy=on" : "", ++ conf->proxy_user ? "--proxy-user=" : "", ++ conf->proxy_user ? conf->proxy_user : "", ++ conf->proxy_passwd ? "--proxy-passwd=" : "", ++ conf->proxy_passwd ? conf->proxy_passwd : "", + conf->verbose_wget ? "" : "-q", + conf->tmp_dir, + src); From 6f7c61619c99309b08c7da1dac765a716203374b Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 22 Aug 2006 09:50:02 +0000 Subject: [PATCH 490/757] Add --enable-natt and --enable-dpd configuration options, closes #700 SVN-Revision: 4619 --- openwrt/package/ipsec-tools/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openwrt/package/ipsec-tools/Makefile b/openwrt/package/ipsec-tools/Makefile index c1fe597a8cd..35485903956 100644 --- a/openwrt/package/ipsec-tools/Makefile +++ b/openwrt/package/ipsec-tools/Makefile @@ -72,6 +72,8 @@ define Build/Configure --with-openssl="$(STAGING_DIR)/usr" \ --without-libradius \ --without-libpam \ + --enable-dpd \ + --enable-natt \ ); endef From 881f3c63f72b153f6389edc1784ad0f4f2f48854 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 22 Aug 2006 10:07:55 +0000 Subject: [PATCH 491/757] Add ROUTE target for netfilter, closes #595 SVN-Revision: 4620 --- openwrt/target/linux/au1000-2.6/config | 2 + openwrt/target/linux/brcm-2.6/config | 4 +- openwrt/target/linux/brcm63xx-2.6/config | 2 + .../patches/108-netfilter_route.patch | 914 ++++++++++++++++++ openwrt/target/linux/rb532-2.6/config | 2 + openwrt/target/linux/sibyte-2.6/config | 2 + openwrt/target/linux/uml-2.6/config | 2 + openwrt/target/linux/x86-2.6/config | 2 + openwrt/target/linux/xscale-2.6/config | 2 + 9 files changed, 931 insertions(+), 1 deletion(-) create mode 100644 openwrt/target/linux/generic-2.6/patches/108-netfilter_route.patch diff --git a/openwrt/target/linux/au1000-2.6/config b/openwrt/target/linux/au1000-2.6/config index b86c699a114..9c498efd102 100644 --- a/openwrt/target/linux/au1000-2.6/config +++ b/openwrt/target/linux/au1000-2.6/config @@ -415,6 +415,7 @@ CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_ROUTE=m # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set @@ -462,6 +463,7 @@ CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m CONFIG_IP6_NF_MANGLE=m # CONFIG_IP6_NF_TARGET_HL is not set # CONFIG_IP6_NF_RAW is not set diff --git a/openwrt/target/linux/brcm-2.6/config b/openwrt/target/linux/brcm-2.6/config index 180a45f5862..75e9a1921f6 100644 --- a/openwrt/target/linux/brcm-2.6/config +++ b/openwrt/target/linux/brcm-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Fri Jun 23 19:00:36 2006 +# Tue Aug 22 11:48:58 2006 # CONFIG_MIPS=y @@ -386,6 +386,7 @@ CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_ROUTE=m # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set @@ -433,6 +434,7 @@ CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m CONFIG_IP6_NF_MANGLE=m # CONFIG_IP6_NF_TARGET_HL is not set # CONFIG_IP6_NF_RAW is not set diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index c5f8d58bf9d..f7c7c0b0df7 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -418,6 +418,7 @@ CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_ROUTE=m # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set @@ -464,6 +465,7 @@ CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m CONFIG_IP6_NF_MANGLE=m # CONFIG_IP6_NF_TARGET_HL is not set # CONFIG_IP6_NF_RAW is not set diff --git a/openwrt/target/linux/generic-2.6/patches/108-netfilter_route.patch b/openwrt/target/linux/generic-2.6/patches/108-netfilter_route.patch new file mode 100644 index 00000000000..571d6a381b7 --- /dev/null +++ b/openwrt/target/linux/generic-2.6/patches/108-netfilter_route.patch @@ -0,0 +1,914 @@ +diff -u'rNF^function' linux-2.6.16.7/include/linux/netfilter_ipv4/ipt_ROUTE.h linux-2.6.16.7-ROUTE/include/linux/netfilter_ipv4/ipt_ROUTE.h +--- linux-2.6.16.7/include/linux/netfilter_ipv4/ipt_ROUTE.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-ROUTE/include/linux/netfilter_ipv4/ipt_ROUTE.h 2006-06-14 16:40:49.000000000 +0200 +@@ -0,0 +1,23 @@ ++/* Header file for iptables ipt_ROUTE target ++ * ++ * (C) 2002 by Cédric de Launois <delaunois@info.ucl.ac.be> ++ * ++ * This software is distributed under GNU GPL v2, 1991 ++ */ ++#ifndef _IPT_ROUTE_H_target ++#define _IPT_ROUTE_H_target ++ ++#define IPT_ROUTE_IFNAMSIZ 16 ++ ++struct ipt_route_target_info { ++ char oif[IPT_ROUTE_IFNAMSIZ]; /* Output Interface Name */ ++ char iif[IPT_ROUTE_IFNAMSIZ]; /* Input Interface Name */ ++ u_int32_t gw; /* IP address of gateway */ ++ u_int8_t flags; ++}; ++ ++/* Values for "flags" field */ ++#define IPT_ROUTE_CONTINUE 0x01 ++#define IPT_ROUTE_TEE 0x02 ++ ++#endif /*_IPT_ROUTE_H_target*/ +diff -u'rNF^function' linux-2.6.16.7/include/linux/netfilter_ipv6/ip6t_ROUTE.h linux-2.6.16.7-ROUTE/include/linux/netfilter_ipv6/ip6t_ROUTE.h +--- linux-2.6.16.7/include/linux/netfilter_ipv6/ip6t_ROUTE.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-ROUTE/include/linux/netfilter_ipv6/ip6t_ROUTE.h 2006-06-14 16:41:08.000000000 +0200 +@@ -0,0 +1,23 @@ ++/* Header file for iptables ip6t_ROUTE target ++ * ++ * (C) 2003 by Cédric de Launois <delaunois@info.ucl.ac.be> ++ * ++ * This software is distributed under GNU GPL v2, 1991 ++ */ ++#ifndef _IPT_ROUTE_H_target ++#define _IPT_ROUTE_H_target ++ ++#define IP6T_ROUTE_IFNAMSIZ 16 ++ ++struct ip6t_route_target_info { ++ char oif[IP6T_ROUTE_IFNAMSIZ]; /* Output Interface Name */ ++ char iif[IP6T_ROUTE_IFNAMSIZ]; /* Input Interface Name */ ++ u_int32_t gw[4]; /* IPv6 address of gateway */ ++ u_int8_t flags; ++}; ++ ++/* Values for "flags" field */ ++#define IP6T_ROUTE_CONTINUE 0x01 ++#define IP6T_ROUTE_TEE 0x02 ++ ++#endif /*_IP6T_ROUTE_H_target*/ +diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/Kconfig linux-2.6.16.7-ROUTE/net/ipv4/netfilter/Kconfig +--- linux-2.6.16.7/net/ipv4/netfilter/Kconfig 2006-06-14 16:05:44.000000000 +0200 ++++ linux-2.6.16.7-ROUTE/net/ipv4/netfilter/Kconfig 2006-06-14 16:46:40.000000000 +0200 +@@ -491,6 +491,23 @@ + + To compile it as a module, choose M here. If unsure, say N. + ++config IP_NF_TARGET_ROUTE ++ tristate 'ROUTE target support' ++ depends on IP_NF_MANGLE ++ help ++ This option adds a `ROUTE' target, which enables you to setup unusual ++ routes. For example, the ROUTE lets you route a received packet through ++ an interface or towards a host, even if the regular destination of the ++ packet is the router itself. The ROUTE target is also able to change the ++ incoming interface of a packet. ++ ++ The target can be or not a final target. It has to be used inside the ++ mangle table. ++ ++ If you want to compile it as a module, say M here and read ++ Documentation/modules.txt. The module will be called ipt_ROUTE.o. ++ If unsure, say `N'. ++ + config IP_NF_TARGET_NETMAP + tristate "NETMAP target support" + depends on IP_NF_NAT +diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/Makefile linux-2.6.16.7-ROUTE/net/ipv4/netfilter/Makefile +--- linux-2.6.16.7/net/ipv4/netfilter/Makefile 2006-06-14 16:05:44.000000000 +0200 ++++ linux-2.6.16.7-ROUTE/net/ipv4/netfilter/Makefile 2006-06-14 16:44:02.000000000 +0200 +@@ -74,6 +74,7 @@ + obj-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ.o + obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o + obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o ++obj-$(CONFIG_IP_NF_TARGET_ROUTE) += ipt_ROUTE.o + obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o + obj-$(CONFIG_IP_NF_TARGET_SAME) += ipt_SAME.o + obj-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += ip_nat_snmp_basic.o +diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c linux-2.6.16.7-ROUTE/net/ipv4/netfilter/ipt_ROUTE.c +--- linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-ROUTE/net/ipv4/netfilter/ipt_ROUTE.c 2006-06-14 16:42:23.000000000 +0200 +@@ -0,0 +1,461 @@ ++/* ++ * This implements the ROUTE target, which enables you to setup unusual ++ * routes not supported by the standard kernel routing table. ++ * ++ * Copyright (C) 2002 Cedric de Launois <delaunois@info.ucl.ac.be> ++ * ++ * v 1.11 2004/11/23 ++ * ++ * This software is distributed under GNU GPL v2, 1991 ++ */ ++ ++#include <linux/module.h> ++#include <linux/skbuff.h> ++#include <linux/ip.h> ++#include <linux/netfilter_ipv4/ip_tables.h> ++#include <linux/netfilter_ipv4/ip_conntrack.h> ++#include <linux/netfilter_ipv4/ipt_ROUTE.h> ++#include <linux/netdevice.h> ++#include <linux/route.h> ++#include <linux/if_arp.h> ++#include <net/ip.h> ++#include <net/route.h> ++#include <net/icmp.h> ++#include <net/checksum.h> ++ ++#if 0 ++#define DEBUGP printk ++#else ++#define DEBUGP(format, args...) ++#endif ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Cedric de Launois <delaunois@info.ucl.ac.be>"); ++MODULE_DESCRIPTION("iptables ROUTE target module"); ++ ++/* Try to route the packet according to the routing keys specified in ++ * route_info. Keys are : ++ * - ifindex : ++ * 0 if no oif preferred, ++ * otherwise set to the index of the desired oif ++ * - route_info->gw : ++ * 0 if no gateway specified, ++ * otherwise set to the next host to which the pkt must be routed ++ * If success, skb->dev is the output device to which the packet must ++ * be sent and skb->dst is not NULL ++ * ++ * RETURN: -1 if an error occured ++ * 1 if the packet was succesfully routed to the ++ * destination desired ++ * 0 if the kernel routing table could not route the packet ++ * according to the keys specified ++ */ ++static int route(struct sk_buff *skb, ++ unsigned int ifindex, ++ const struct ipt_route_target_info *route_info) ++{ ++ int err; ++ struct rtable *rt; ++ struct iphdr *iph = skb->nh.iph; ++ struct flowi fl = { ++ .oif = ifindex, ++ .nl_u = { ++ .ip4_u = { ++ .daddr = iph->daddr, ++ .saddr = 0, ++ .tos = RT_TOS(iph->tos), ++ .scope = RT_SCOPE_UNIVERSE, ++ } ++ } ++ }; ++ ++ /* The destination address may be overloaded by the target */ ++ if (route_info->gw) ++ fl.fl4_dst = route_info->gw; ++ ++ /* Trying to route the packet using the standard routing table. */ ++ if ((err = ip_route_output_key(&rt, &fl))) { ++ if (net_ratelimit()) ++ DEBUGP("ipt_ROUTE: couldn't route pkt (err: %i)",err); ++ return -1; ++ } ++ ++ /* Drop old route. */ ++ dst_release(skb->dst); ++ skb->dst = NULL; ++ ++ /* Success if no oif specified or if the oif correspond to the ++ * one desired */ ++ if (!ifindex || rt->u.dst.dev->ifindex == ifindex) { ++ skb->dst = &rt->u.dst; ++ skb->dev = skb->dst->dev; ++ skb->protocol = htons(ETH_P_IP); ++ return 1; ++ } ++ ++ /* The interface selected by the routing table is not the one ++ * specified by the user. This may happen because the dst address ++ * is one of our own addresses. ++ */ ++ if (net_ratelimit()) ++ DEBUGP("ipt_ROUTE: failed to route as desired gw=%u.%u.%u.%u oif=%i (got oif=%i)\n", ++ NIPQUAD(route_info->gw), ifindex, rt->u.dst.dev->ifindex); ++ ++ return 0; ++} ++ ++ ++/* Stolen from ip_finish_output2 ++ * PRE : skb->dev is set to the device we are leaving by ++ * skb->dst is not NULL ++ * POST: the packet is sent with the link layer header pushed ++ * the packet is destroyed ++ */ ++static void ip_direct_send(struct sk_buff *skb) ++{ ++ struct dst_entry *dst = skb->dst; ++ struct hh_cache *hh = dst->hh; ++ struct net_device *dev = dst->dev; ++ int hh_len = LL_RESERVED_SPACE(dev); ++ ++ /* Be paranoid, rather than too clever. */ ++ if (unlikely(skb_headroom(skb) < hh_len && dev->hard_header)) { ++ struct sk_buff *skb2; ++ ++ skb2 = skb_realloc_headroom(skb, LL_RESERVED_SPACE(dev)); ++ if (skb2 == NULL) { ++ kfree_skb(skb); ++ return; ++ } ++ if (skb->sk) ++ skb_set_owner_w(skb2, skb->sk); ++ kfree_skb(skb); ++ skb = skb2; ++ } ++ ++ if (hh) { ++ int hh_alen; ++ ++ read_lock_bh(&hh->hh_lock); ++ hh_alen = HH_DATA_ALIGN(hh->hh_len); ++ memcpy(skb->data - hh_alen, hh->hh_data, hh_alen); ++ read_unlock_bh(&hh->hh_lock); ++ skb_push(skb, hh->hh_len); ++ hh->hh_output(skb); ++ } else if (dst->neighbour) ++ dst->neighbour->output(skb); ++ else { ++ if (net_ratelimit()) ++ DEBUGP(KERN_DEBUG "ipt_ROUTE: no hdr & no neighbour cache!\n"); ++ kfree_skb(skb); ++ } ++} ++ ++ ++/* PRE : skb->dev is set to the device we are leaving by ++ * POST: - the packet is directly sent to the skb->dev device, without ++ * pushing the link layer header. ++ * - the packet is destroyed ++ */ ++static inline int dev_direct_send(struct sk_buff *skb) ++{ ++ return dev_queue_xmit(skb); ++} ++ ++ ++static unsigned int route_oif(const struct ipt_route_target_info *route_info, ++ struct sk_buff *skb) ++{ ++ unsigned int ifindex = 0; ++ struct net_device *dev_out = NULL; ++ ++ /* The user set the interface name to use. ++ * Getting the current interface index. ++ */ ++ if ((dev_out = dev_get_by_name(route_info->oif))) { ++ ifindex = dev_out->ifindex; ++ } else { ++ /* Unknown interface name : packet dropped */ ++ if (net_ratelimit()) ++ DEBUGP("ipt_ROUTE: oif interface %s not found\n", route_info->oif); ++ return NF_DROP; ++ } ++ ++ /* Trying the standard way of routing packets */ ++ switch (route(skb, ifindex, route_info)) { ++ case 1: ++ dev_put(dev_out); ++ if (route_info->flags & IPT_ROUTE_CONTINUE) ++ return IPT_CONTINUE; ++ ++ ip_direct_send(skb); ++ return NF_STOLEN; ++ ++ case 0: ++ /* Failed to send to oif. Trying the hard way */ ++ if (route_info->flags & IPT_ROUTE_CONTINUE) ++ return NF_DROP; ++ ++ if (net_ratelimit()) ++ DEBUGP("ipt_ROUTE: forcing the use of %i\n", ++ ifindex); ++ ++ /* We have to force the use of an interface. ++ * This interface must be a tunnel interface since ++ * otherwise we can't guess the hw address for ++ * the packet. For a tunnel interface, no hw address ++ * is needed. ++ */ ++ if ((dev_out->type != ARPHRD_TUNNEL) ++ && (dev_out->type != ARPHRD_IPGRE)) { ++ if (net_ratelimit()) ++ DEBUGP("ipt_ROUTE: can't guess the hw addr !\n"); ++ dev_put(dev_out); ++ return NF_DROP; ++ } ++ ++ /* Send the packet. This will also free skb ++ * Do not go through the POST_ROUTING hook because ++ * skb->dst is not set and because it will probably ++ * get confused by the destination IP address. ++ */ ++ skb->dev = dev_out; ++ dev_direct_send(skb); ++ dev_put(dev_out); ++ return NF_STOLEN; ++ ++ default: ++ /* Unexpected error */ ++ dev_put(dev_out); ++ return NF_DROP; ++ } ++} ++ ++ ++static unsigned int route_iif(const struct ipt_route_target_info *route_info, ++ struct sk_buff *skb) ++{ ++ struct net_device *dev_in = NULL; ++ ++ /* Getting the current interface index. */ ++ if (!(dev_in = dev_get_by_name(route_info->iif))) { ++ if (net_ratelimit()) ++ DEBUGP("ipt_ROUTE: iif interface %s not found\n", route_info->iif); ++ return NF_DROP; ++ } ++ ++ skb->dev = dev_in; ++ dst_release(skb->dst); ++ skb->dst = NULL; ++ ++ netif_rx(skb); ++ dev_put(dev_in); ++ return NF_STOLEN; ++} ++ ++ ++static unsigned int route_gw(const struct ipt_route_target_info *route_info, ++ struct sk_buff *skb) ++{ ++ if (route(skb, 0, route_info)!=1) ++ return NF_DROP; ++ ++ if (route_info->flags & IPT_ROUTE_CONTINUE) ++ return IPT_CONTINUE; ++ ++ ip_direct_send(skb); ++ return NF_STOLEN; ++} ++ ++ ++/* To detect and deter routed packet loopback when using the --tee option, ++ * we take a page out of the raw.patch book: on the copied skb, we set up ++ * a fake ->nfct entry, pointing to the local &route_tee_track. We skip ++ * routing packets when we see they already have that ->nfct. ++ */ ++ ++static struct ip_conntrack route_tee_track; ++ ++static unsigned int ipt_route_target(struct sk_buff **pskb, ++ const struct net_device *in, ++ const struct net_device *out, ++ unsigned int hooknum, ++ const void *targinfo, ++ void *userinfo) ++{ ++ const struct ipt_route_target_info *route_info = targinfo; ++ struct sk_buff *skb = *pskb; ++ unsigned int res; ++ ++ if (skb->nfct == &route_tee_track.ct_general) { ++ /* Loopback - a packet we already routed, is to be ++ * routed another time. Avoid that, now. ++ */ ++ if (net_ratelimit()) ++ DEBUGP(KERN_DEBUG "ipt_ROUTE: loopback - DROP!\n"); ++ return NF_DROP; ++ } ++ ++ /* If we are at PREROUTING or INPUT hook ++ * the TTL isn't decreased by the IP stack ++ */ ++ if (hooknum == NF_IP_PRE_ROUTING || ++ hooknum == NF_IP_LOCAL_IN) { ++ ++ struct iphdr *iph = skb->nh.iph; ++ ++ if (iph->ttl <= 1) { ++ struct rtable *rt; ++ struct flowi fl = { ++ .oif = 0, ++ .nl_u = { ++ .ip4_u = { ++ .daddr = iph->daddr, ++ .saddr = iph->saddr, ++ .tos = RT_TOS(iph->tos), ++ .scope = ((iph->tos & RTO_ONLINK) ? ++ RT_SCOPE_LINK : ++ RT_SCOPE_UNIVERSE) ++ } ++ } ++ }; ++ ++ if (ip_route_output_key(&rt, &fl)) { ++ return NF_DROP; ++ } ++ ++ if (skb->dev == rt->u.dst.dev) { ++ /* Drop old route. */ ++ dst_release(skb->dst); ++ skb->dst = &rt->u.dst; ++ ++ /* this will traverse normal stack, and ++ * thus call conntrack on the icmp packet */ ++ icmp_send(skb, ICMP_TIME_EXCEEDED, ++ ICMP_EXC_TTL, 0); ++ } ++ ++ return NF_DROP; ++ } ++ ++ /* ++ * If we are at INPUT the checksum must be recalculated since ++ * the length could change as the result of a defragmentation. ++ */ ++ if(hooknum == NF_IP_LOCAL_IN) { ++ iph->ttl = iph->ttl - 1; ++ iph->check = 0; ++ iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); ++ } else { ++ ip_decrease_ttl(iph); ++ } ++ } ++ ++ if ((route_info->flags & IPT_ROUTE_TEE)) { ++ /* ++ * Copy the *pskb, and route the copy. Will later return ++ * IPT_CONTINUE for the original skb, which should continue ++ * on its way as if nothing happened. The copy should be ++ * independantly delivered to the ROUTE --gw. ++ */ ++ skb = skb_copy(*pskb, GFP_ATOMIC); ++ if (!skb) { ++ if (net_ratelimit()) ++ DEBUGP(KERN_DEBUG "ipt_ROUTE: copy failed!\n"); ++ return IPT_CONTINUE; ++ } ++ } ++ ++ /* Tell conntrack to forget this packet since it may get confused ++ * when a packet is leaving with dst address == our address. ++ * Good idea ? Dunno. Need advice. ++ * ++ * NEW: mark the skb with our &route_tee_track, so we avoid looping ++ * on any already routed packet. ++ */ ++ if (!(route_info->flags & IPT_ROUTE_CONTINUE)) { ++ nf_conntrack_put(skb->nfct); ++ skb->nfct = &route_tee_track.ct_general; ++ skb->nfctinfo = IP_CT_NEW; ++ nf_conntrack_get(skb->nfct); ++ } ++ ++ if (route_info->oif[0] != '\0') { ++ res = route_oif(route_info, skb); ++ } else if (route_info->iif[0] != '\0') { ++ res = route_iif(route_info, skb); ++ } else if (route_info->gw) { ++ res = route_gw(route_info, skb); ++ } else { ++ if (net_ratelimit()) ++ DEBUGP(KERN_DEBUG "ipt_ROUTE: no parameter !\n"); ++ res = IPT_CONTINUE; ++ } ++ ++ if ((route_info->flags & IPT_ROUTE_TEE)) ++ res = IPT_CONTINUE; ++ ++ return res; ++} ++ ++ ++static int ipt_route_checkentry(const char *tablename, ++ const void *e, ++ void *targinfo, ++ unsigned int targinfosize, ++ unsigned int hook_mask) ++{ ++ if (strcmp(tablename, "mangle") != 0) { ++ printk("ipt_ROUTE: bad table `%s', use the `mangle' table.\n", ++ tablename); ++ return 0; ++ } ++ ++ if (hook_mask & ~( (1 << NF_IP_PRE_ROUTING) ++ | (1 << NF_IP_LOCAL_IN) ++ | (1 << NF_IP_FORWARD) ++ | (1 << NF_IP_LOCAL_OUT) ++ | (1 << NF_IP_POST_ROUTING))) { ++ printk("ipt_ROUTE: bad hook\n"); ++ return 0; ++ } ++ ++ if (targinfosize != IPT_ALIGN(sizeof(struct ipt_route_target_info))) { ++ printk(KERN_WARNING "ipt_ROUTE: targinfosize %u != %Zu\n", ++ targinfosize, ++ IPT_ALIGN(sizeof(struct ipt_route_target_info))); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++ ++static struct ipt_target ipt_route_reg = { ++ .name = "ROUTE", ++ .target = ipt_route_target, ++ .checkentry = ipt_route_checkentry, ++ .me = THIS_MODULE, ++}; ++ ++static int __init init(void) ++{ ++ /* Set up fake conntrack (stolen from raw.patch): ++ - to never be deleted, not in any hashes */ ++ atomic_set(&route_tee_track.ct_general.use, 1); ++ /* - and look it like as a confirmed connection */ ++ set_bit(IPS_CONFIRMED_BIT, &route_tee_track.status); ++ /* Initialize fake conntrack so that NAT will skip it */ ++ route_tee_track.status |= IPS_NAT_DONE_MASK; ++ ++ return ipt_register_target(&ipt_route_reg); ++} ++ ++ ++static void __exit fini(void) ++{ ++ ipt_unregister_target(&ipt_route_reg); ++} ++ ++module_init(init); ++module_exit(fini); +diff -u'rNF^function' linux-2.6.16.7/net/ipv6/ipv6_syms.c linux-2.6.16.7-ROUTE/net/ipv6/ipv6_syms.c +--- linux-2.6.16.7/net/ipv6/ipv6_syms.c 2006-04-17 23:53:25.000000000 +0200 ++++ linux-2.6.16.7-ROUTE/net/ipv6/ipv6_syms.c 2006-06-14 17:02:32.000000000 +0200 +@@ -12,6 +12,7 @@ + EXPORT_SYMBOL(icmpv6_statistics); + EXPORT_SYMBOL(icmpv6_err_convert); + EXPORT_SYMBOL(ndisc_mc_map); ++EXPORT_SYMBOL(nd_tbl); + EXPORT_SYMBOL(register_inet6addr_notifier); + EXPORT_SYMBOL(unregister_inet6addr_notifier); + EXPORT_SYMBOL(ip6_route_output); +diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/Kconfig linux-2.6.16.7-ROUTE/net/ipv6/netfilter/Kconfig +--- linux-2.6.16.7/net/ipv6/netfilter/Kconfig 2006-06-14 16:05:44.000000000 +0200 ++++ linux-2.6.16.7-ROUTE/net/ipv6/netfilter/Kconfig 2006-06-14 16:45:45.000000000 +0200 +@@ -182,6 +182,19 @@ + + To compile it as a module, choose M here. If unsure, say N. + ++config IP6_NF_TARGET_ROUTE ++ tristate ' ROUTE target support' ++ depends on IP6_NF_MANGLE ++ help ++ This option adds a `ROUTE' target, which enables you to setup unusual ++ routes. The ROUTE target is also able to change the incoming interface ++ of a packet. ++ ++ The target can be or not a final target. It has to be used inside the ++ mangle table. ++ ++ Not working as a module. ++ + config IP6_NF_MANGLE + tristate "Packet mangling" + depends on IP6_NF_IPTABLES +diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/Makefile linux-2.6.16.7-ROUTE/net/ipv6/netfilter/Makefile +--- linux-2.6.16.7/net/ipv6/netfilter/Makefile 2006-06-14 16:05:44.000000000 +0200 ++++ linux-2.6.16.7-ROUTE/net/ipv6/netfilter/Makefile 2006-06-14 16:45:00.000000000 +0200 +@@ -22,6 +22,7 @@ + obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o + obj-$(CONFIG_IP6_NF_MATCH_HL) += ip6t_hl.o + obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o ++obj-$(CONFIG_IP6_NF_TARGET_ROUTE) += ip6t_ROUTE.o + + # objects for l3 independent conntrack + nf_conntrack_ipv6-objs := nf_conntrack_l3proto_ipv6.o nf_conntrack_proto_icmpv6.o nf_conntrack_reasm.o +diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c linux-2.6.16.7-ROUTE/net/ipv6/netfilter/ip6t_ROUTE.c +--- linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.16.7-ROUTE/net/ipv6/netfilter/ip6t_ROUTE.c 2006-06-14 16:42:44.000000000 +0200 +@@ -0,0 +1,308 @@ ++/* ++ * This implements the ROUTE v6 target, which enables you to setup unusual ++ * routes not supported by the standard kernel routing table. ++ * ++ * Copyright (C) 2003 Cedric de Launois <delaunois@info.ucl.ac.be> ++ * ++ * v 1.1 2004/11/23 ++ * ++ * This software is distributed under GNU GPL v2, 1991 ++ */ ++ ++#include <linux/module.h> ++#include <linux/skbuff.h> ++#include <linux/ipv6.h> ++#include <linux/netfilter_ipv6/ip6_tables.h> ++#include <linux/netfilter_ipv6/ip6t_ROUTE.h> ++#include <linux/netdevice.h> ++#include <net/ipv6.h> ++#include <net/ndisc.h> ++#include <net/ip6_route.h> ++#include <linux/icmpv6.h> ++ ++#if 1 ++#define DEBUGP printk ++#else ++#define DEBUGP(format, args...) ++#endif ++ ++#define NIP6(addr) \ ++ ntohs((addr).s6_addr16[0]), \ ++ ntohs((addr).s6_addr16[1]), \ ++ ntohs((addr).s6_addr16[2]), \ ++ ntohs((addr).s6_addr16[3]), \ ++ ntohs((addr).s6_addr16[4]), \ ++ ntohs((addr).s6_addr16[5]), \ ++ ntohs((addr).s6_addr16[6]), \ ++ ntohs((addr).s6_addr16[7]) ++ ++/* Route the packet according to the routing keys specified in ++ * route_info. Keys are : ++ * - ifindex : ++ * 0 if no oif preferred, ++ * otherwise set to the index of the desired oif ++ * - route_info->gw : ++ * 0 if no gateway specified, ++ * otherwise set to the next host to which the pkt must be routed ++ * If success, skb->dev is the output device to which the packet must ++ * be sent and skb->dst is not NULL ++ * ++ * RETURN: 1 if the packet was succesfully routed to the ++ * destination desired ++ * 0 if the kernel routing table could not route the packet ++ * according to the keys specified ++ */ ++static int ++route6(struct sk_buff *skb, ++ unsigned int ifindex, ++ const struct ip6t_route_target_info *route_info) ++{ ++ struct rt6_info *rt = NULL; ++ struct ipv6hdr *ipv6h = skb->nh.ipv6h; ++ struct in6_addr *gw = (struct in6_addr*)&route_info->gw; ++ ++ DEBUGP("ip6t_ROUTE: called with: "); ++ DEBUGP("DST=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x ", NIP6(ipv6h->daddr)); ++ DEBUGP("GATEWAY=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x ", NIP6(*gw)); ++ DEBUGP("OUT=%s\n", route_info->oif); ++ ++ if (ipv6_addr_any(gw)) ++ rt = rt6_lookup(&ipv6h->daddr, &ipv6h->saddr, ifindex, 1); ++ else ++ rt = rt6_lookup(gw, &ipv6h->saddr, ifindex, 1); ++ ++ if (!rt) ++ goto no_route; ++ ++ DEBUGP("ip6t_ROUTE: routing gives: "); ++ DEBUGP("DST=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x ", NIP6(rt->rt6i_dst.addr)); ++ DEBUGP("GATEWAY=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x ", NIP6(rt->rt6i_gateway)); ++ DEBUGP("OUT=%s\n", rt->rt6i_dev->name); ++ ++ if (ifindex && rt->rt6i_dev->ifindex!=ifindex) ++ goto wrong_route; ++ ++ if (!rt->rt6i_nexthop) { ++ DEBUGP("ip6t_ROUTE: discovering neighbour\n"); ++ rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_dst.addr); ++ } ++ ++ /* Drop old route. */ ++ dst_release(skb->dst); ++ skb->dst = &rt->u.dst; ++ skb->dev = rt->rt6i_dev; ++ return 1; ++ ++ wrong_route: ++ dst_release(&rt->u.dst); ++ no_route: ++ if (!net_ratelimit()) ++ return 0; ++ ++ printk("ip6t_ROUTE: no explicit route found "); ++ if (ifindex) ++ printk("via interface %s ", route_info->oif); ++ if (!ipv6_addr_any(gw)) ++ printk("via gateway %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x", NIP6(*gw)); ++ printk("\n"); ++ return 0; ++} ++ ++ ++/* Stolen from ip6_output_finish ++ * PRE : skb->dev is set to the device we are leaving by ++ * skb->dst is not NULL ++ * POST: the packet is sent with the link layer header pushed ++ * the packet is destroyed ++ */ ++static void ip_direct_send(struct sk_buff *skb) ++{ ++ struct dst_entry *dst = skb->dst; ++ struct hh_cache *hh = dst->hh; ++ ++ if (hh) { ++ read_lock_bh(&hh->hh_lock); ++ memcpy(skb->data - 16, hh->hh_data, 16); ++ read_unlock_bh(&hh->hh_lock); ++ skb_push(skb, hh->hh_len); ++ hh->hh_output(skb); ++ } else if (dst->neighbour) ++ dst->neighbour->output(skb); ++ else { ++ if (net_ratelimit()) ++ DEBUGP(KERN_DEBUG "ip6t_ROUTE: no hdr & no neighbour cache!\n"); ++ kfree_skb(skb); ++ } ++} ++ ++ ++static unsigned int ++route6_oif(const struct ip6t_route_target_info *route_info, ++ struct sk_buff *skb) ++{ ++ unsigned int ifindex = 0; ++ struct net_device *dev_out = NULL; ++ ++ /* The user set the interface name to use. ++ * Getting the current interface index. ++ */ ++ if ((dev_out = dev_get_by_name(route_info->oif))) { ++ ifindex = dev_out->ifindex; ++ } else { ++ /* Unknown interface name : packet dropped */ ++ if (net_ratelimit()) ++ DEBUGP("ip6t_ROUTE: oif interface %s not found\n", route_info->oif); ++ ++ if (route_info->flags & IP6T_ROUTE_CONTINUE) ++ return IP6T_CONTINUE; ++ else ++ return NF_DROP; ++ } ++ ++ /* Trying the standard way of routing packets */ ++ if (route6(skb, ifindex, route_info)) { ++ dev_put(dev_out); ++ if (route_info->flags & IP6T_ROUTE_CONTINUE) ++ return IP6T_CONTINUE; ++ ++ ip_direct_send(skb); ++ return NF_STOLEN; ++ } else ++ return NF_DROP; ++} ++ ++ ++static unsigned int ++route6_gw(const struct ip6t_route_target_info *route_info, ++ struct sk_buff *skb) ++{ ++ if (route6(skb, 0, route_info)) { ++ if (route_info->flags & IP6T_ROUTE_CONTINUE) ++ return IP6T_CONTINUE; ++ ++ ip_direct_send(skb); ++ return NF_STOLEN; ++ } else ++ return NF_DROP; ++} ++ ++ ++static unsigned int ++ip6t_route_target(struct sk_buff **pskb, ++ const struct net_device *in, ++ const struct net_device *out, ++ unsigned int hooknum, ++ const void *targinfo, ++ void *userinfo) ++{ ++ const struct ip6t_route_target_info *route_info = targinfo; ++ struct sk_buff *skb = *pskb; ++ struct in6_addr *gw = (struct in6_addr*)&route_info->gw; ++ unsigned int res; ++ ++ if (route_info->flags & IP6T_ROUTE_CONTINUE) ++ goto do_it; ++ ++ /* If we are at PREROUTING or INPUT hook ++ * the TTL isn't decreased by the IP stack ++ */ ++ if (hooknum == NF_IP6_PRE_ROUTING || ++ hooknum == NF_IP6_LOCAL_IN) { ++ ++ struct ipv6hdr *ipv6h = skb->nh.ipv6h; ++ ++ if (ipv6h->hop_limit <= 1) { ++ /* Force OUTPUT device used as source address */ ++ skb->dev = skb->dst->dev; ++ ++ icmpv6_send(skb, ICMPV6_TIME_EXCEED, ++ ICMPV6_EXC_HOPLIMIT, 0, skb->dev); ++ ++ return NF_DROP; ++ } ++ ++ ipv6h->hop_limit--; ++ } ++ ++ if ((route_info->flags & IP6T_ROUTE_TEE)) { ++ /* ++ * Copy the *pskb, and route the copy. Will later return ++ * IP6T_CONTINUE for the original skb, which should continue ++ * on its way as if nothing happened. The copy should be ++ * independantly delivered to the ROUTE --gw. ++ */ ++ skb = skb_copy(*pskb, GFP_ATOMIC); ++ if (!skb) { ++ if (net_ratelimit()) ++ DEBUGP(KERN_DEBUG "ip6t_ROUTE: copy failed!\n"); ++ return IP6T_CONTINUE; ++ } ++ } ++ ++do_it: ++ if (route_info->oif[0]) { ++ res = route6_oif(route_info, skb); ++ } else if (!ipv6_addr_any(gw)) { ++ res = route6_gw(route_info, skb); ++ } else { ++ if (net_ratelimit()) ++ DEBUGP(KERN_DEBUG "ip6t_ROUTE: no parameter !\n"); ++ res = IP6T_CONTINUE; ++ } ++ ++ if ((route_info->flags & IP6T_ROUTE_TEE)) ++ res = IP6T_CONTINUE; ++ ++ return res; ++} ++ ++ ++static int ++ip6t_route_checkentry(const char *tablename, ++ const struct ip6t_entry *e, ++ void *targinfo, ++ unsigned int targinfosize, ++ unsigned int hook_mask) ++{ ++ if (strcmp(tablename, "mangle") != 0) { ++ printk("ip6t_ROUTE: can only be called from \"mangle\" table.\n"); ++ return 0; ++ } ++ ++ if (targinfosize != IP6T_ALIGN(sizeof(struct ip6t_route_target_info))) { ++ printk(KERN_WARNING "ip6t_ROUTE: targinfosize %u != %Zu\n", ++ targinfosize, ++ IP6T_ALIGN(sizeof(struct ip6t_route_target_info))); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++ ++static struct ip6t_target ip6t_route_reg = { ++ .name = "ROUTE", ++ .target = ip6t_route_target, ++ .checkentry = ip6t_route_checkentry, ++ .me = THIS_MODULE ++}; ++ ++ ++static int __init init(void) ++{ ++ printk(KERN_DEBUG "registering ipv6 ROUTE target\n"); ++ if (ip6t_register_target(&ip6t_route_reg)) ++ return -EINVAL; ++ ++ return 0; ++} ++ ++ ++static void __exit fini(void) ++{ ++ ip6t_unregister_target(&ip6t_route_reg); ++} ++ ++module_init(init); ++module_exit(fini); ++MODULE_LICENSE("GPL"); diff --git a/openwrt/target/linux/rb532-2.6/config b/openwrt/target/linux/rb532-2.6/config index 6921ad5a446..eaa3771d11d 100644 --- a/openwrt/target/linux/rb532-2.6/config +++ b/openwrt/target/linux/rb532-2.6/config @@ -381,6 +381,7 @@ CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_ROUTE=m # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set @@ -428,6 +429,7 @@ CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m CONFIG_IP6_NF_MANGLE=m # CONFIG_IP6_NF_TARGET_HL is not set # CONFIG_IP6_NF_RAW is not set diff --git a/openwrt/target/linux/sibyte-2.6/config b/openwrt/target/linux/sibyte-2.6/config index 5e055acaf73..79c4c72f068 100644 --- a/openwrt/target/linux/sibyte-2.6/config +++ b/openwrt/target/linux/sibyte-2.6/config @@ -394,6 +394,7 @@ CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_ROUTE=m # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set @@ -442,6 +443,7 @@ CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m # CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m CONFIG_IP6_NF_MANGLE=m # CONFIG_IP6_NF_TARGET_HL is not set # CONFIG_IP6_NF_RAW is not set diff --git a/openwrt/target/linux/uml-2.6/config b/openwrt/target/linux/uml-2.6/config index 0e675c1e0d9..4480a0120d9 100644 --- a/openwrt/target/linux/uml-2.6/config +++ b/openwrt/target/linux/uml-2.6/config @@ -357,6 +357,7 @@ CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_ROUTE=m CONFIG_IP_NF_TARGET_NETMAP=m CONFIG_IP_NF_TARGET_SAME=m CONFIG_IP_NF_NAT_SNMP_BASIC=m @@ -406,6 +407,7 @@ CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m CONFIG_IP6_NF_TARGET_LOG=m CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m CONFIG_IP6_NF_MANGLE=m CONFIG_IP6_NF_TARGET_HL=m CONFIG_IP6_NF_RAW=m diff --git a/openwrt/target/linux/x86-2.6/config b/openwrt/target/linux/x86-2.6/config index 626716c0cd4..fee9c753454 100644 --- a/openwrt/target/linux/x86-2.6/config +++ b/openwrt/target/linux/x86-2.6/config @@ -423,6 +423,7 @@ CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_ROUTE=m CONFIG_IP_NF_TARGET_NETMAP=m CONFIG_IP_NF_TARGET_SAME=m # CONFIG_IP_NF_NAT_SNMP_BASIC is not set @@ -472,6 +473,7 @@ CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m CONFIG_IP6_NF_TARGET_LOG=m CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m CONFIG_IP6_NF_MANGLE=m CONFIG_IP6_NF_TARGET_HL=m CONFIG_IP6_NF_RAW=m diff --git a/openwrt/target/linux/xscale-2.6/config b/openwrt/target/linux/xscale-2.6/config index 4eac5f9b269..74a56554b59 100644 --- a/openwrt/target/linux/xscale-2.6/config +++ b/openwrt/target/linux/xscale-2.6/config @@ -348,6 +348,7 @@ CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_ROUTE=m # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set @@ -381,6 +382,7 @@ CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_FILTER=m # CONFIG_IP6_NF_TARGET_LOG is not set CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m # CONFIG_IP6_NF_MANGLE is not set # CONFIG_IP6_NF_RAW is not set From 2612170e0f5b48fe6f9f482953d3599e96e7af21 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 22 Aug 2006 10:40:32 +0000 Subject: [PATCH 492/757] remove bogus dependency line SVN-Revision: 4621 --- openwrt/package/iproute2/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile index e494177c90d..4ad88d8f348 100644 --- a/openwrt/package/iproute2/Makefile +++ b/openwrt/package/iproute2/Makefile @@ -23,7 +23,6 @@ include $(INCLUDE_DIR)/package.mk define Package/ip SECTION:=base CATEGORY:=Network -DEPENDS:=iproute2 TITLE:=A routing control utility endef From 7702221df76156aff3758b502b100a8f536a797b Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 22 Aug 2006 11:46:19 +0000 Subject: [PATCH 493/757] Set KERNEL_DIR to avoid inclusion of host-side linux sources, closes #702 SVN-Revision: 4622 --- openwrt/package/ipset/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openwrt/package/ipset/Makefile b/openwrt/package/ipset/Makefile index d3ea1318ed7..92d0570b309 100644 --- a/openwrt/package/ipset/Makefile +++ b/openwrt/package/ipset/Makefile @@ -28,6 +28,10 @@ DESCRIPTION:=Netfilter ip sets administration utility URL:=http://ipset.netfilter.org/ endef +define Build/Compile +$(call Build/Compile/Default,KERNEL_DIR=$(LINUX_DIR)) +endef + define Package/ipset/install $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR=$(1) PREFIX=/usr install From ed2ab12d4315b793e7014f4897ba564ca669d761 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 22 Aug 2006 12:05:58 +0000 Subject: [PATCH 494/757] Add maxfail option to avoid pptp giving up, closes #663 SVN-Revision: 4624 --- openwrt/package/pptp/files/options.pptp | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/pptp/files/options.pptp b/openwrt/package/pptp/files/options.pptp index c520de74b7b..5332445e78f 100644 --- a/openwrt/package/pptp/files/options.pptp +++ b/openwrt/package/pptp/files/options.pptp @@ -4,3 +4,4 @@ nobsdcomp nodeflate idle 0 defaultroute +maxfail 0 From 9fb5099a412f2aca1db59962d5de6200b0978e6f Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 22 Aug 2006 12:19:18 +0000 Subject: [PATCH 495/757] enable mknod by default (#490) - some drivers don't register with devfs properly SVN-Revision: 4627 --- openwrt/package/busybox/config/coreutils/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/busybox/config/coreutils/Config.in b/openwrt/package/busybox/config/coreutils/Config.in index 6aaee5eb997..3487fc742ce 100644 --- a/openwrt/package/busybox/config/coreutils/Config.in +++ b/openwrt/package/busybox/config/coreutils/Config.in @@ -419,7 +419,7 @@ config BUSYBOX_CONFIG_MKFIFO config BUSYBOX_CONFIG_MKNOD bool "mknod" - default n + default y help mknod is used to create FIFOs or block/character special files with the specified names. From 5e7c9908cc43229ef3638da6f4b7ecd79838d9f8 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 22 Aug 2006 12:40:33 +0000 Subject: [PATCH 496/757] Port kmod-gre to the new module layout SVN-Revision: 4630 --- openwrt/include/modules-2.6.mk | 4 ---- openwrt/package/kernel/modules.mk | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index 4ea28fb1679..70a1fcc23c3 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -15,10 +15,6 @@ $(eval $(call KMOD_template,ATM,atm,\ $(MODULES_DIR)/kernel/drivers/atm/atmtcp.ko \ ,CONFIG_ATM,,50,atm)) -$(eval $(call KMOD_template,GRE,gre,\ - $(MODULES_DIR)/kernel/net/ipv4/ip_gre.ko \ -,CONFIG_NET_IPGRE)) - $(eval $(call KMOD_template,IPIP,ipip,\ $(MODULES_DIR)/kernel/net/ipv4/ipip.ko \ ,CONFIG_NET_IPIP,,60,ipip)) diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index 090945c3e06..c24de60d0de 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -289,6 +289,14 @@ FILES:=$(MODULES_DIR)/kernel/net/ipv6/ipv6.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,ipv6)) +define KernelPackage/gre +TITLE:=GRE support +DESCRIPTION:=Generic Routing Encapsulation support +KCONFIG=$(CONFIG_NET_IPGRE) +FILES=$(MODULES_DIR)/kernel/net/ipv4/ip_gre.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,gre)) + define KernelPackage/ppp TITLE:=PPP modules DESCRIPTION:=Kernel modules for PPP support From ca200120f0f3c8af753828a1adb05cf71fc4689b Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 22 Aug 2006 14:21:30 +0000 Subject: [PATCH 497/757] Upgrade to openswan-2.4.6, fix showhostkey script (closes #444), *should* fix #647, #671 SVN-Revision: 4632 --- openwrt/package/openswan/Makefile | 4 +- .../openswan/patches/101-arp_header.patch | 11 ------ .../patches/102-new_module_param.patch | 37 ------------------- 3 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 openwrt/package/openswan/patches/101-arp_header.patch delete mode 100644 openwrt/package/openswan/patches/102-new_module_param.patch diff --git a/openwrt/package/openswan/Makefile b/openwrt/package/openswan/Makefile index 6e518531549..cc1707b2f55 100644 --- a/openwrt/package/openswan/Makefile +++ b/openwrt/package/openswan/Makefile @@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=openswan -PKG_VERSION:=2.4.5 +PKG_VERSION:=2.4.6 PKG_RELEASE:=1 -PKG_MD5SUM:=a9a8e88313faceebfc5ceb1a9da9a3c4 +PKG_MD5SUM:=b34d71ca49dedad017879b0e912d40dd PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://www.openswan.org/download diff --git a/openwrt/package/openswan/patches/101-arp_header.patch b/openwrt/package/openswan/patches/101-arp_header.patch deleted file mode 100644 index 7375f65a48b..00000000000 --- a/openwrt/package/openswan/patches/101-arp_header.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur openswan-2.4.5rc5/linux/net/ipsec/ipsec_tunnel.c openswan-2.4.5rc5.patched/linux/net/ipsec/ipsec_tunnel.c ---- openswan-2.4.5rc5/linux/net/ipsec/ipsec_tunnel.c 2005-11-22 05:11:52.000000000 +0100 -+++ openswan-2.4.5rc5.patched/linux/net/ipsec/ipsec_tunnel.c 2006-03-29 01:13:35.000000000 +0200 -@@ -33,6 +33,7 @@ - #include <linux/types.h> /* size_t */ - #include <linux/interrupt.h> /* mark_bh */ - -+#include <net/arp.h> - #include <net/tcp.h> - #include <net/udp.h> - #include <linux/skbuff.h> diff --git a/openwrt/package/openswan/patches/102-new_module_param.patch b/openwrt/package/openswan/patches/102-new_module_param.patch deleted file mode 100644 index 80c4a2f589a..00000000000 --- a/openwrt/package/openswan/patches/102-new_module_param.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -ruN openswan-2.4.5-old/linux/net/ipsec/aes/ipsec_alg_aes.c openswan-2.4.5-new/linux/net/ipsec/aes/ipsec_alg_aes.c ---- openswan-2.4.5-old/linux/net/ipsec/aes/ipsec_alg_aes.c 2005-05-20 18:48:55.000000000 +0200 -+++ openswan-2.4.5-new/linux/net/ipsec/aes/ipsec_alg_aes.c 2006-06-20 00:17:57.000000000 +0200 -@@ -59,12 +59,20 @@ - static int keymaxbits=0; - #if defined(CONFIG_KLIPS_ENC_AES_MODULE) - MODULE_AUTHOR("JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>"); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52) -+module_param(debug_aes, int, 0); -+module_param(test_aes, int, 0); -+module_param(excl_aes, int, 0); -+module_param(keyminbits, int, 0); -+module_param(keymaxbits, int, 0); -+#else - MODULE_PARM(debug_aes, "i"); - MODULE_PARM(test_aes, "i"); - MODULE_PARM(excl_aes, "i"); - MODULE_PARM(keyminbits, "i"); - MODULE_PARM(keymaxbits, "i"); - #endif -+#endif - - #if CONFIG_KLIPS_ENC_AES_MAC - #include "crypto/aes_xcbc_mac.h" -@@ -79,8 +87,12 @@ - #else - static int auth_id=9; - #endif -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52) -+module_param(auth_id, int, 0); -+#else - MODULE_PARM(auth_id, "i"); - #endif -+#endif - - #define ESP_AES 12 /* truely _constant_ :) */ - From e0d3bc1c95f3ac4b89be73ccc1d50acf51570344 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 22 Aug 2006 19:43:53 +0000 Subject: [PATCH 498/757] Port kmod-tun to the new module layout SVN-Revision: 4633 --- openwrt/include/modules-2.6.mk | 4 ---- openwrt/package/kernel/modules.mk | 8 ++++++++ openwrt/target/linux/Config.in | 7 ------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/openwrt/include/modules-2.6.mk b/openwrt/include/modules-2.6.mk index 70a1fcc23c3..08ac4da810a 100644 --- a/openwrt/include/modules-2.6.mk +++ b/openwrt/include/modules-2.6.mk @@ -23,10 +23,6 @@ $(eval $(call KMOD_template,SCHED,sched,\ $(MODULES_DIR)/kernel/net/sched/*.ko \ ,CONFIG_NET_SCHED)) -$(eval $(call KMOD_template,TUN,tun,\ - $(MODULES_DIR)/kernel/drivers/net/tun.ko \ -,CONFIG_TUN,,20,tun)) - # Block devices $(eval $(call KMOD_template,LOOP,loop,\ diff --git a/openwrt/package/kernel/modules.mk b/openwrt/package/kernel/modules.mk index c24de60d0de..9475620526c 100644 --- a/openwrt/package/kernel/modules.mk +++ b/openwrt/package/kernel/modules.mk @@ -297,6 +297,14 @@ FILES=$(MODULES_DIR)/kernel/net/ipv4/ip_gre.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,gre)) +define KernelPackage/tun +TITLE:=Universal TUN/TAP driver +DESCRIPTION:=Kernel support for the TUN/TAP tunneling device +KCONFIG:=$(CONFIG_TUN) +FILES:=$(MODULES_DIR)/kernel/drivers/net/tun.$(LINUX_KMOD_SUFFIX) +endef +$(eval $(call KernelPackage,tun)) + define KernelPackage/ppp TITLE:=PPP modules DESCRIPTION:=Kernel modules for PPP support diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index f9c72c01a52..9b505df133e 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -16,13 +16,6 @@ config PACKAGE_KMOD_ATM help ATM support -config PACKAGE_KMOD_GRE - prompt "kmod-gre.......................... GRE tunneling driver" - tristate - default m - help - Kernel support for GRE tunnels - config PACKAGE_KMOD_IPIP prompt "kmod-ipip......................... IP in IP encapsulation support" tristate From ffae714eac3edf22021454dd677df69600045204 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 22 Aug 2006 20:19:42 +0000 Subject: [PATCH 499/757] don't try to create mtd partitions on bcm947xx when the trx header is not found - should fix #318 SVN-Revision: 4634 --- openwrt/target/linux/brcm-2.4/patches/004-flash.patch | 5 +++-- openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch index 14ba3b15f4e..de2d5b170f3 100644 --- a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch +++ b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch @@ -334,7 +334,7 @@ diff -urN linux.old/drivers/mtd/devices/sflash.c linux.dev/drivers/mtd/devices/s diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps/bcm947xx-flash.c --- linux.old/drivers/mtd/maps/bcm947xx-flash.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/drivers/mtd/maps/bcm947xx-flash.c 2006-06-23 18:08:46.000000000 +0200 -@@ -0,0 +1,547 @@ +@@ -0,0 +1,548 @@ +/* + * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> + * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org> @@ -720,7 +720,8 @@ diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps +{ + int cfe_size; + -+ cfe_size = find_cfe_size(mtd,size); ++ if ((cfe_size = find_cfe_size(mtd,size)) < 0) ++ return NULL; + + /* boot loader */ + bcm947xx_parts[0].offset = 0; diff --git a/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch b/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch index a8ed9092c0b..9d568930d2a 100644 --- a/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch +++ b/openwrt/target/linux/brcm-2.6/patches/002-flash-map.patch @@ -1,7 +1,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/bcm47xx-flash.c --- linux.old/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/drivers/mtd/maps/bcm47xx-flash.c 2006-06-23 19:54:06.000000000 +0200 -@@ -0,0 +1,451 @@ +@@ -0,0 +1,452 @@ +/* + * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> + * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org> @@ -326,7 +326,8 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/ +{ + int cfe_size; + -+ cfe_size = find_cfe_size(mtd,size); ++ if ((cfe_size = find_cfe_size(mtd,size)) < 0) ++ return NULL; + + /* boot loader */ + bcm947xx_parts[0].offset = 0; From 222f81f3b218a39657f194c0370e689a3cd13159 Mon Sep 17 00:00:00 2001 From: Mike Albon <malbon@openwrt.org> Date: Wed, 23 Aug 2006 16:38:52 +0000 Subject: [PATCH 500/757] Fix building util-linux under xscale SVN-Revision: 4637 --- .../601-util-linux-2.12r-umount-no-special.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 openwrt/package/util-linux/patches/601-util-linux-2.12r-umount-no-special.patch diff --git a/openwrt/package/util-linux/patches/601-util-linux-2.12r-umount-no-special.patch b/openwrt/package/util-linux/patches/601-util-linux-2.12r-umount-no-special.patch new file mode 100644 index 00000000000..d79598fc845 --- /dev/null +++ b/openwrt/package/util-linux/patches/601-util-linux-2.12r-umount-no-special.patch @@ -0,0 +1,11 @@ +--- util-linux-2.12r.old/mount/umount.c ++++ util-linux-2.12r/mount/umount.c +@@ -31,7 +31,7 @@ + #include <arpa/inet.h> + #endif + +-#if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__) ++#if defined(MNT_FORCE) + /* Interesting ... it seems libc knows about MNT_FORCE and presumably + about umount2 as well -- need not do anything */ + #else /* MNT_FORCE */ From 784b978a1588dc2a44f1504b8d6226a3acb8f97e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 23 Aug 2006 18:47:31 +0000 Subject: [PATCH 501/757] change 'ifnames' to 'ifname' in network config, fix #697 SVN-Revision: 4638 --- .../base-files/au1000-2.6/etc/config/network | 2 +- .../brcm-2.4/etc/init.d/S05netconfig | 14 ++++----- .../brcm-2.6/etc/init.d/S05netconfig | 14 ++++----- .../base-files/default/lib/network/config.sh | 30 +++++-------------- .../base-files/sibyte-2.6/etc/config/network | 2 +- .../base-files/x86-2.4/etc/config/network | 2 +- .../base-files/x86-2.6/etc/config/network | 2 +- 7 files changed, 24 insertions(+), 42 deletions(-) diff --git a/openwrt/package/base-files/au1000-2.6/etc/config/network b/openwrt/package/base-files/au1000-2.6/etc/config/network index 95d7575c92f..448ab7c9d3a 100644 --- a/openwrt/package/base-files/au1000-2.6/etc/config/network +++ b/openwrt/package/base-files/au1000-2.6/etc/config/network @@ -2,7 +2,7 @@ config interface lan option type bridge - option ifnames "eth0 ath0" + option ifname "eth0 ath0" option proto static option ipaddr 192.168.1.1 option netmask 255.255.255.0 diff --git a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig index 82e4ab9986c..a4d29358bc2 100755 --- a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig @@ -6,7 +6,7 @@ mkdir -p /etc/config ( - if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then + if grep -E 'mtd0: 000(6|a)0000' /proc/mtd 2>&- >&-; then # WGT634u echo boardtype=wgt634u else @@ -19,9 +19,7 @@ function p(cfgname, name) { BEGIN { FS="=" - c["lan_ifname"]="br0" - c["lan_ifnames"]="eth0.0 wl0" - c["wan_proto"]="none" + c["lan_ifname"]="eth0.0 wl0" c["wan_ifname"]="eth0.1" c["vlan0ports"]="1 2 3 4 5*" c["vlan1ports"]="0 5" @@ -36,14 +34,14 @@ END { if (nvram["boardtype"] == "bcm94710dev") { # Asus WL-500g if (nvram["boardnum"] == "asusX") { - c["lan_ifnames"]="eth0 eth1 wl0" # FIXME + c["lan_ifname"]="eth0 eth1 wl0" # FIXME c["wan_ifname"]="" } } if (nvram["boardtype"] == "wgt634u") { c["vlan0ports"] = "0 1 2 3 5*" c["vlan1ports"] = "4 5" - c["lan_ifnames"] = "eth0.0 ath0" + c["lan_ifname"] = "eth0.0 ath0" } if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { c["vlan0ports"] = "0 1 2 3 5*" @@ -53,7 +51,7 @@ END { # WAP54G if ((nvram["boardnum"] == "2") || \ (nvram["boardnum"] == "1024")) { - c["lan_ifnames"]="eth0 wl0" + c["lan_ifname"]="eth0 wl0" c["wan_ifname"]="" } @@ -66,7 +64,7 @@ END { print "#### LAN configuration" print "config interface lan" print " option type bridge" - p("ifnames", "lan_ifnames") + p("ifnames", "lan_ifname") print " option proto static" print " option ipaddr 192.168.1.1" print " option netmask 255.255.255.0" diff --git a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig index 82e4ab9986c..a4d29358bc2 100755 --- a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig @@ -6,7 +6,7 @@ mkdir -p /etc/config ( - if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then + if grep -E 'mtd0: 000(6|a)0000' /proc/mtd 2>&- >&-; then # WGT634u echo boardtype=wgt634u else @@ -19,9 +19,7 @@ function p(cfgname, name) { BEGIN { FS="=" - c["lan_ifname"]="br0" - c["lan_ifnames"]="eth0.0 wl0" - c["wan_proto"]="none" + c["lan_ifname"]="eth0.0 wl0" c["wan_ifname"]="eth0.1" c["vlan0ports"]="1 2 3 4 5*" c["vlan1ports"]="0 5" @@ -36,14 +34,14 @@ END { if (nvram["boardtype"] == "bcm94710dev") { # Asus WL-500g if (nvram["boardnum"] == "asusX") { - c["lan_ifnames"]="eth0 eth1 wl0" # FIXME + c["lan_ifname"]="eth0 eth1 wl0" # FIXME c["wan_ifname"]="" } } if (nvram["boardtype"] == "wgt634u") { c["vlan0ports"] = "0 1 2 3 5*" c["vlan1ports"] = "4 5" - c["lan_ifnames"] = "eth0.0 ath0" + c["lan_ifname"] = "eth0.0 ath0" } if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { c["vlan0ports"] = "0 1 2 3 5*" @@ -53,7 +51,7 @@ END { # WAP54G if ((nvram["boardnum"] == "2") || \ (nvram["boardnum"] == "1024")) { - c["lan_ifnames"]="eth0 wl0" + c["lan_ifname"]="eth0 wl0" c["wan_ifname"]="" } @@ -66,7 +64,7 @@ END { print "#### LAN configuration" print "config interface lan" print " option type bridge" - p("ifnames", "lan_ifnames") + p("ifnames", "lan_ifname") print " option proto static" print " option ipaddr 192.168.1.1" print " option netmask 255.255.255.0" diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh index 690d7996ef7..0cd6cb889fa 100755 --- a/openwrt/package/base-files/default/lib/network/config.sh +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -8,11 +8,6 @@ find_config() { for ifn in $interfaces; do config_get iftype "$ifn" type config_get iface "$ifn" ifname - case "$iftype" in - bridge) - config_get iface "$ifn" ifnames - ;; - esac config_get device "$ifn" device for ifc in ${device:-$iface}; do [ "$ifc" = "$1" ] && { @@ -32,17 +27,9 @@ scan_interfaces() { config_get iftype "$CONFIG_SECTION" TYPE case "$iftype" in interface) - config_get iftype "$CONFIG_SECTION" type - config_get mode "$CONFIG_SECTION" proto - case "$iftype" in - bridge) - config_get iface "$CONFIG_SECTION" ifname - iface="${iface:-br-$CONFIG_SECTION}" - config_set "$CONFIG_SECTION" ifname "$iface" - ;; - esac + config_get proto "$CONFIG_SECTION" proto append interfaces "$CONFIG_SECTION" - ( type "scan_$mode" ) >/dev/null 2>/dev/null && eval "scan_$mode '$CONFIG_SECTION'" + ( type "scan_$proto" ) >/dev/null 2>/dev/null && eval "scan_$proto '$CONFIG_SECTION'" ;; esac } @@ -80,16 +67,15 @@ setup_interface() { # Setup bridging case "$iftype" in bridge) - config_get bridge_ifname "$config" ifname ifconfig "$iface" up 2>/dev/null >/dev/null - ifconfig "$bridge_ifname" 2>/dev/null >/dev/null && { - $DEBUG brctl addif "$bridge_ifname" "$iface" + ifconfig "br-$config" 2>/dev/null >/dev/null && { + $DEBUG brctl addif "br-$config" "$iface" return 0 } || { - $DEBUG brctl addbr "$bridge_ifname" - $DEBUG brctl setfd "$bridge_ifname" 0 - $DEBUG brctl addif "$bridge_ifname" "$iface" - iface="$bridge_ifname" + $DEBUG brctl addbr "br-$config" + $DEBUG brctl setfd "br-$config" 0 + $DEBUG brctl addif "br-$config" "$iface" + iface="br-$config" } ;; esac diff --git a/openwrt/package/base-files/sibyte-2.6/etc/config/network b/openwrt/package/base-files/sibyte-2.6/etc/config/network index 95d7575c92f..448ab7c9d3a 100644 --- a/openwrt/package/base-files/sibyte-2.6/etc/config/network +++ b/openwrt/package/base-files/sibyte-2.6/etc/config/network @@ -2,7 +2,7 @@ config interface lan option type bridge - option ifnames "eth0 ath0" + option ifname "eth0 ath0" option proto static option ipaddr 192.168.1.1 option netmask 255.255.255.0 diff --git a/openwrt/package/base-files/x86-2.4/etc/config/network b/openwrt/package/base-files/x86-2.4/etc/config/network index 9f521c05bf4..f1ed9774507 100644 --- a/openwrt/package/base-files/x86-2.4/etc/config/network +++ b/openwrt/package/base-files/x86-2.4/etc/config/network @@ -2,7 +2,7 @@ config interface lan option type bridge - option ifnames "eth1 eth2" + option ifname "eth1 eth2" option proto static option ipaddr 192.168.1.1 option netmask 255.255.255.0 diff --git a/openwrt/package/base-files/x86-2.6/etc/config/network b/openwrt/package/base-files/x86-2.6/etc/config/network index 9f521c05bf4..f1ed9774507 100644 --- a/openwrt/package/base-files/x86-2.6/etc/config/network +++ b/openwrt/package/base-files/x86-2.6/etc/config/network @@ -2,7 +2,7 @@ config interface lan option type bridge - option ifnames "eth1 eth2" + option ifname "eth1 eth2" option proto static option ipaddr 192.168.1.1 option netmask 255.255.255.0 From 72ddfdea971b2c960669c0b7ff84456ec5ac3a99 Mon Sep 17 00:00:00 2001 From: Mike Albon <malbon@openwrt.org> Date: Wed, 23 Aug 2006 20:05:15 +0000 Subject: [PATCH 502/757] Make hostap modules so build works properly. SVN-Revision: 4639 --- openwrt/target/linux/xscale-2.6/config | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openwrt/target/linux/xscale-2.6/config b/openwrt/target/linux/xscale-2.6/config index 74a56554b59..4df1a4ca3c3 100644 --- a/openwrt/target/linux/xscale-2.6/config +++ b/openwrt/target/linux/xscale-2.6/config @@ -819,7 +819,12 @@ CONFIG_IPW2200_MONITOR=y # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # # CONFIG_PRISM54 is not set -# CONFIG_HOSTAP is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_CS=m CONFIG_NET_WIRELESS=y # From 8d581ff7887d7d0bc3b3901981a364587f8d4b03 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 23 Aug 2006 21:05:42 +0000 Subject: [PATCH 503/757] fix kernel module dependency problems SVN-Revision: 4640 --- openwrt/package/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index e5094ef0114..b59649ddacb 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -66,7 +66,7 @@ define KernelPackage CATEGORY:=Kernel modules DEFAULT:=m DESCRIPTION:=$(DESCRIPTION) - EXTRA_DEPENDS:='kernel (=$(PKG_VERSION))' + EXTRA_DEPENDS:='kernel (=$(PKG_VERSION)-$(PKG_RELEASE))' $(call KernelPackage/$(1)) $(call KernelPackage/$(1)/$(KERNEL)) endef From 9d2c104b59f6cf2d7548186b809a70f43ec8fad2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 23 Aug 2006 23:13:24 +0000 Subject: [PATCH 504/757] enable split_iso for ehci on brcm-2.6 SVN-Revision: 4646 --- openwrt/target/linux/brcm-2.6/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/brcm-2.6/config b/openwrt/target/linux/brcm-2.6/config index 75e9a1921f6..29842b0a05c 100644 --- a/openwrt/target/linux/brcm-2.6/config +++ b/openwrt/target/linux/brcm-2.6/config @@ -1296,7 +1296,7 @@ CONFIG_USB_DEVICEFS=y # USB Host Controller Drivers # CONFIG_USB_EHCI_HCD=m -# CONFIG_USB_EHCI_SPLIT_ISO is not set +CONFIG_USB_EHCI_SPLIT_ISO=y # CONFIG_USB_EHCI_ROOT_HUB_TT is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=m From 12fed89aa2cbc4de433d86271dfcb43687514fed Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 24 Aug 2006 10:26:18 +0000 Subject: [PATCH 505/757] add vlan_mode to wlc SVN-Revision: 4648 --- openwrt/package/broadcom-wl/src/wlc/wlc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openwrt/package/broadcom-wl/src/wlc/wlc.c b/openwrt/package/broadcom-wl/src/wlc/wlc.c index 76096df5ce9..09cbb845384 100644 --- a/openwrt/package/broadcom-wl/src/wlc/wlc.c +++ b/openwrt/package/broadcom-wl/src/wlc/wlc.c @@ -742,6 +742,13 @@ static const struct wlc_call wlc_calls[] = { .data.num = ((WLC_GET_CHANNEL << 16) | WLC_SET_CHANNEL), .desc = "Channel", }, + { + .name = "vlan_mode", + .param = INT, + .handler = wlc_bssiovar, + .data.str = "vlan_mode", + .desc = "Parse 802.1Q tags", + }, { .name = "vif", .param = INT, From a0a9319149d10ac7ee4525b41992d9afc2900874 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 24 Aug 2006 12:20:02 +0000 Subject: [PATCH 506/757] fix remaining *_ifnames references SVN-Revision: 4650 --- .../package/base-files/brcm-2.4/etc/init.d/S05netconfig | 2 +- .../package/base-files/brcm-2.6/etc/init.d/S05netconfig | 2 +- .../package/base-files/default/etc/hotplug.d/net/10-net | 7 ++----- openwrt/package/base-files/default/sbin/ifup | 9 +-------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig index a4d29358bc2..2efd596aa8e 100755 --- a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig @@ -64,7 +64,7 @@ END { print "#### LAN configuration" print "config interface lan" print " option type bridge" - p("ifnames", "lan_ifname") + p("ifname", "lan_ifname") print " option proto static" print " option ipaddr 192.168.1.1" print " option netmask 255.255.255.0" diff --git a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig index a4d29358bc2..2efd596aa8e 100755 --- a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig @@ -64,7 +64,7 @@ END { print "#### LAN configuration" print "config interface lan" print " option type bridge" - p("ifnames", "lan_ifname") + p("ifname", "lan_ifname") print " option proto static" print " option ipaddr 192.168.1.1" print " option netmask 255.255.255.0" diff --git a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net index 72146a1d783..8661a2851da 100644 --- a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net +++ b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net @@ -5,14 +5,11 @@ include network addif() { scan_interfaces setup_interface "$INTERFACE" - + # find all vlan configurations for this interface and set them up as well for ifc in $interfaces; do config_get iftype "$ifc" type - case "$iftype" in - bridge) config_get ifs "$ifc" ifnames;; - *) config_get ifs "$ifc" ifname;; - esac + config_get ifs "$ifc" ifname for dev in $ifs; do [ "${dev%%\.*}" = "$INTERFACE" -a "$dev" != "$INTERFACE" ] && { add_vlan "$dev" diff --git a/openwrt/package/base-files/default/sbin/ifup b/openwrt/package/base-files/default/sbin/ifup index c40de38ad8f..86d10d7ca3f 100755 --- a/openwrt/package/base-files/default/sbin/ifup +++ b/openwrt/package/base-files/default/sbin/ifup @@ -4,14 +4,7 @@ . /sbin/ifdown "$@" config_get iftype "$1" type -case "$iftype" in - bridge) - config_get ifname "$1" ifnames - ;; - *) - config_get ifname "$1" ifname - ;; -esac +config_get ifname "$1" ifname for dev in $ifname; do setup_interface "$dev" "$1" From 6af62b8afc0ac153a5026f97f58ab7bab12fa97a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 24 Aug 2006 13:14:18 +0000 Subject: [PATCH 507/757] add vlan_mode 0 command to fix the weird google issue in broadcom-wl SVN-Revision: 4651 --- openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh index 7852ae96253..2c951020fc3 100644 --- a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -158,6 +158,7 @@ infra $infra ${wet:+wet 1} radio ${radio:-1} +vlan_mode 0 macfilter 0 maclist none wds none From e23ea22b7a5323c119468cfffc40aa71cbf7e48d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 24 Aug 2006 13:22:53 +0000 Subject: [PATCH 508/757] default value for *_device in scan_interfaces SVN-Revision: 4652 --- openwrt/package/base-files/default/lib/network/config.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh index 0cd6cb889fa..d4864ae86e0 100755 --- a/openwrt/package/base-files/default/lib/network/config.sh +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -30,6 +30,9 @@ scan_interfaces() { config_get proto "$CONFIG_SECTION" proto append interfaces "$CONFIG_SECTION" ( type "scan_$proto" ) >/dev/null 2>/dev/null && eval "scan_$proto '$CONFIG_SECTION'" + config_get ifname "$CONFIG_SECTION" ifname + config_get device "$CONFIG_SECTION" device + config_set "$CONFIG_SECTION" device "${device:-$ifname}" ;; esac } From 9f816bf69d4d1c4f43c299c06563af60caa383a7 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 24 Aug 2006 13:46:47 +0000 Subject: [PATCH 509/757] revert to using *_ifnames internally, too many problems with firewall, ppp, etc. otherwise SVN-Revision: 4653 --- .../base-files/default/etc/hotplug.d/net/10-net | 5 ++++- .../base-files/default/lib/network/config.sh | 13 +++++++++---- openwrt/package/base-files/default/sbin/ifup | 5 ++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net index 8661a2851da..b5140758afe 100644 --- a/openwrt/package/base-files/default/etc/hotplug.d/net/10-net +++ b/openwrt/package/base-files/default/etc/hotplug.d/net/10-net @@ -9,7 +9,10 @@ addif() { # find all vlan configurations for this interface and set them up as well for ifc in $interfaces; do config_get iftype "$ifc" type - config_get ifs "$ifc" ifname + case "$iftype" in + bridge) config_get ifs "$ifc" ifnames;; + *) config_get ifs "$ifc" ifname;; + esac for dev in $ifs; do [ "${dev%%\.*}" = "$INTERFACE" -a "$dev" != "$INTERFACE" ] && { add_vlan "$dev" diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh index d4864ae86e0..5bc74d12853 100755 --- a/openwrt/package/base-files/default/lib/network/config.sh +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -21,7 +21,7 @@ find_config() { } scan_interfaces() { - local mode iftype iface + local mode iftype iface ifname device interfaces= config_cb() { config_get iftype "$CONFIG_SECTION" TYPE @@ -29,10 +29,15 @@ scan_interfaces() { interface) config_get proto "$CONFIG_SECTION" proto append interfaces "$CONFIG_SECTION" + config_get iftype "$CONFIG_SECTION" iftype + case "$iftype" in + bridge) + config_get ifname "$CONFIG_SECTION" ifname + config_set "$CONFIG_SECTION" ifnames "$ifname" + config_set "$CONFIG_SECTION" ifname br-"$CONFIG_SECTION" + ;; + esac ( type "scan_$proto" ) >/dev/null 2>/dev/null && eval "scan_$proto '$CONFIG_SECTION'" - config_get ifname "$CONFIG_SECTION" ifname - config_get device "$CONFIG_SECTION" device - config_set "$CONFIG_SECTION" device "${device:-$ifname}" ;; esac } diff --git a/openwrt/package/base-files/default/sbin/ifup b/openwrt/package/base-files/default/sbin/ifup index 86d10d7ca3f..c7055d4807b 100755 --- a/openwrt/package/base-files/default/sbin/ifup +++ b/openwrt/package/base-files/default/sbin/ifup @@ -4,7 +4,10 @@ . /sbin/ifdown "$@" config_get iftype "$1" type -config_get ifname "$1" ifname +case "$iftype" in + bridge) config_get ifname "$1" ifnames;; + *) config_get ifname "$1" ifname;; +esac for dev in $ifname; do setup_interface "$dev" "$1" From 8aee0bee5c852207c97492f0262b0939e2c5ed4e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 24 Aug 2006 18:49:51 +0000 Subject: [PATCH 510/757] add prereq check to prevent people from building openwrt as root SVN-Revision: 4655 --- openwrt/include/prereq-build.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openwrt/include/prereq-build.mk b/openwrt/include/prereq-build.mk index a6de9b270aa..e90c3157b05 100644 --- a/openwrt/include/prereq-build.mk +++ b/openwrt/include/prereq-build.mk @@ -8,6 +8,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/prereq.mk +define Require/non-root + [ "$$(shell whoami)" != "root" ] +endef +$(eval $(call Require,non-root, \ + Building OpenWrt as root is not supported! \ +)) + # Required for the toolchain define Require/working-make echo 'all: test' > $(TMP_DIR)/check.mk From 689b7e26d28404369f81068b65c9354a0a9366e3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 24 Aug 2006 19:13:10 +0000 Subject: [PATCH 511/757] hide rm -rf command in Makefile SVN-Revision: 4656 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 15074c58c3a..fe10e07dd96 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -100,7 +100,7 @@ toolchain/%: FORCE echo "Prerequisite check failed. Use FORCE=1 to override."; \ false; \ } - rm -rf "$(TOPDIR)/tmp" + @rm -rf "$(TOPDIR)/tmp" @touch $@ prereq: .prereq-build .prereq-packages FORCE From 072b31105fa0b5eabdc6b5d9fdefb04edc5b4627 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Fri, 25 Aug 2006 09:28:15 +0000 Subject: [PATCH 512/757] Override kernel template and output bzImage, not the binary file, closes #676 and #714 SVN-Revision: 4658 --- openwrt/target/image/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/image/x86/Makefile b/openwrt/target/image/x86/Makefile index d9ed2945747..919ccbc9fe7 100644 --- a/openwrt/target/image/x86/Makefile +++ b/openwrt/target/image/x86/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/image.mk define Image/Build cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img - cp $(KDIR)/vmlinux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz + cp $(LINUX_DIR)/arch/i386/boot/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz endef $(eval $(call BuildImage)) From f4f917d704512f76e2d00aa875868ce4ad63ff25 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 25 Aug 2006 13:19:54 +0000 Subject: [PATCH 513/757] initial attempt at cleaning up the bcm63xx stuff SVN-Revision: 4664 --- openwrt/target/linux/brcm63xx-2.6/config | 4 +- .../brcm63xx-2.6/patches/000-arch_mips.patch | 131 - .../brcm63xx-2.6/patches/001-bcm963xx.patch | 12834 ++++++++++++++++ .../patches/001-brcm_boards.patch | 9249 ----------- .../patches/002-pci_bcm96348.patch | 438 - .../patches/010-include_asm_mips.patch | 70 - .../patches/011-include_mach_bcm963xx.patch | 40 - .../brcm63xx-2.6/patches/020-bcmdrivers.patch | 3226 ---- .../brcm63xx-2.6/patches/030-boardparms.patch | 3186 ---- .../patches/050-disable-synchronize_net.patch | 13 - 10 files changed, 12836 insertions(+), 16355 deletions(-) delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/002-pci_bcm96348.patch delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/011-include_mach_bcm963xx.patch delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/030-boardparms.patch delete mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/050-disable-synchronize_net.patch diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index f7c7c0b0df7..50c4cfc3b67 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -1260,8 +1260,8 @@ CONFIG_CROSSCOMPILE=y CONFIG_CMDLINE="" # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_KGDB is not set -CONFIG_RUNTIME_DEBUG=y -CONFIG_MIPS_UNCACHED=y +# CONFIG_RUNTIME_DEBUG is not set +# CONFIG_MIPS_UNCACHED is not set # # Security options diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch b/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch deleted file mode 100644 index 0659326fa30..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/000-arch_mips.patch +++ /dev/null @@ -1,131 +0,0 @@ ---- linux-2.6.17/arch/mips/Kconfig 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/arch/mips/Kconfig 2006-07-13 19:08:11.000000000 +0200 -@@ -12,6 +12,15 @@ - prompt "System type" - default SGI_IP22 - -+config MIPS_BRCM -+ bool "Support for the Broadcom boards" -+ select SYS_SUPPORTS_32BIT_KERNEL -+ select SYS_SUPPORTS_BIG_ENDIAN -+ select SYS_HAS_CPU_MIPS32_R1 -+ select IRQ_CPU -+ help -+ This is a fmaily of boards based on the Broadcom MIPS32 -+ - config MIPS_MTX1 - bool "4G Systems MTX-1 board" - select DMA_NONCOHERENT -@@ -780,6 +789,7 @@ - - endchoice - -+source "arch/mips/brcm-boards/bcm963xx/Kconfig" - source "arch/mips/ddb5xxx/Kconfig" - source "arch/mips/gt64120/ev64120/Kconfig" - source "arch/mips/jazz/Kconfig" ---- linux-2.6.17/arch/mips/Makefile 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/arch/mips/Makefile 2006-07-13 18:55:59.000000000 +0200 -@@ -145,6 +145,20 @@ - # - - # -+# Broadcom board -+# -+core-$(CONFIG_MIPS_BRCM) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/ -+core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/serial/impl1/ -+#core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/board/bcm963xx/impl1/ -+#core-$(CONFIG_MIPS_BRCM) += boardparms/bcm963xx/ -+cflags-$(CONFIG_MIPS_BRCM) += -Iinclude/asm-mips/mach-bcm963xx -+cflags-$(CONFIG_MIPS_BRCM) += -Iarch/mips/brcm-boards/generic/include -+cflags-$(CONFIG_MIPS_BRCM) += -Ibcmdrivers/opensource/include/bcm963xx -+cflags-$(CONFIG_MIPS_BRCM) += -Iboardparms/bcm963xx -+load-$(CONFIG_MIPS_BRCM) += 0xffffffff80010000 -+ -+ -+# - # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. - # - core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/ -diff -urN linux-2.6.17/arch/mips/kernel/cpu-probe.c linux-2.6.17-brcm63xx/arch/mips/kernel/cpu-probe.c ---- linux-2.6.17/arch/mips/kernel/cpu-probe.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/arch/mips/kernel/cpu-probe.c 2006-07-13 18:59:04.000000000 +0200 -@@ -568,6 +568,25 @@ - return; - } - -+static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) -+{ -+ decode_configs(c); -+ switch (c->processor_id & 0xff00) { -+ case PRID_IMP_BCM6338: -+ c->cputype = CPU_BCM6338; -+ break; -+ case PRID_IMP_BCM6345: -+ c->cputype = CPU_BCM6345; -+ break; -+ case PRID_IMP_BCM6348: -+ c->cputype = CPU_BCM6348; -+ break; -+ default: -+ c->cputype = CPU_UNKNOWN; -+ break; -+ } -+} -+ - static inline void cpu_probe_mips(struct cpuinfo_mips *c) - { - decode_configs(c); -@@ -704,6 +723,9 @@ - case PRID_COMP_LEGACY: - cpu_probe_legacy(c); - break; -+ case PRID_COMP_BROADCOM: -+ cpu_probe_broadcom(c); -+ break; - case PRID_COMP_MIPS: - cpu_probe_mips(c); - break; -diff -urN linux-2.6.17/arch/mips/kernel/proc.c linux-2.6.17-brcm63xx/arch/mips/kernel/proc.c ---- linux-2.6.17/arch/mips/kernel/proc.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/arch/mips/kernel/proc.c 2006-07-13 19:00:53.000000000 +0200 -@@ -85,6 +85,9 @@ - [CPU_VR4181A] = "NEC VR4181A", - [CPU_SR71000] = "Sandcraft SR71000", - [CPU_PR4450] = "Philips PR4450", -+ [CPU_BCM6338] = "BCM6338", -+ [CPU_BCM6345] = "BCM6345", -+ [CPU_BCM6348] = "BCM6348", - }; - - -diff -urN linux-2.6.17/arch/mips/mm/c-r4k.c linux-2.6.17-brcm63xx/arch/mips/mm/c-r4k.c ---- linux-2.6.17/arch/mips/mm/c-r4k.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/arch/mips/mm/c-r4k.c 2006-07-13 19:03:23.000000000 +0200 -@@ -914,6 +914,13 @@ - if (!(config & MIPS_CONF_M)) - panic("Don't know how to probe P-caches on this cpu."); - -+ if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348) -+ { -+ printk("brcm mips: enabling icache and dcache...\n"); -+ /* Enable caches */ -+ write_c0_diag(read_c0_diag() | 0xC0000000); -+ } -+ - /* - * So we seem to be a MIPS32 or MIPS64 CPU - * So let's probe the I-cache ... -diff -urN linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-brcm63xx/arch/mips/mm/tlbex.c ---- linux-2.6.17/arch/mips/mm/tlbex.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/arch/mips/mm/tlbex.c 2006-07-13 19:03:57.000000000 +0200 -@@ -882,6 +882,9 @@ - case CPU_4KSC: - case CPU_20KC: - case CPU_25KF: -+ case CPU_BCM6338: -+ case CPU_BCM6345: -+ case CPU_BCM6348: - tlbw(p); - break; - diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch new file mode 100644 index 00000000000..abf9a7b74a2 --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch @@ -0,0 +1,12834 @@ +diff -urN linux.old/arch/mips/bcm963xx/bcm63xx_led.c linux.dev/arch/mips/bcm963xx/bcm63xx_led.c +--- linux.old/arch/mips/bcm963xx/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/bcm63xx_led.c 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,582 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/*************************************************************************** ++ * File Name : bcm63xx_led.c ++ * ++ * Description: ++ * ++ * This file contains bcm963xx board led control API functions. ++ * ++ * To use it, do the following ++ * ++ * 1). define in the board.c the following led mappping (this is for 6345GW board): ++ * const LED_MAP_PAIR cLedMapping45GW[] = ++ * { // led name Initial state physical pin (ledMask) ++ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, ++ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, ++ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 ++ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, ++ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, ++ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. ++ * ++ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping ++ * pointer from the above struct ++ * ++ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); ++ * ++ * 3). Sample call for kernel mode: ++ * ++ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h ++ * ++ * 4). Sample call for user mode ++ * ++ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h ++ * ++ * ++ * Created on : 10/28/2002 seanl ++ * ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/netdevice.h> ++#include <asm/uaccess.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define k100ms (HZ / 10) // ~100 ms ++#define kFastBlinkCount 0 // ~100ms ++#define kSlowBlinkCount 5 // ~600ms ++ ++#define MAX_VIRT_LEDS 12 ++ ++// uncomment // for debug led ++//#define DEBUG_LED ++ ++// global variables: ++struct timer_list gLedTimer; ++int gTimerOn = FALSE; ++int gLedCount = 0; ++ ++typedef struct ledinfo ++{ ++ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLow; // GPIO bit reset to turn on LED ++ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 ++ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED ++ BOARD_LED_STATE ledState; // current led state ++ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState ++ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. ++} LED_INFO, *PLED_INFO; ++ ++static PLED_INFO gLed = NULL; ++static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; ++static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; ++ ++#if 0 /* BROKEN */ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++static int gLedOffInBridgeMode = 1; ++#elif defined(CONFIG_BCM96345) ++static int gLedOffInBridgeMode = 0; ++#endif ++#endif ++ ++void ledTimerExpire(void); ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); ++ ++//************************************************************************************** ++// LED operations ++//************************************************************************************** ++ ++// turn led on and set the ledState ++void ledOn(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMask; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateOn; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOff(PLED_INFO pLed) ++{ ++ if( pLed->ledMask ) ++ { ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLow ) ++ GPIO->GPIOio |= pLed->ledMask; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++// turn led on and set the ledState ++void ledOnFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led ++ else ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led ++ pLed->ledState = pLed->savedLedState = kLedStateFail; ++ } ++} ++ ++ ++// turn led off and set the ledState ++void ledOffFail(PLED_INFO pLed) ++{ ++ if( pLed->ledMaskFail ) ++ { ++ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one ++ if( pLed->ledActiveLowFail ) ++ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led ++ else ++ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led ++ pLed->ledState = pLed->savedLedState = kLedStateOff; ++ } ++} ++ ++ ++// toggle the led and return the current ledState ++BOARD_LED_STATE ledToggle(PLED_INFO pLed) ++{ ++ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one ++ if (GPIO->GPIOio & pLed->ledMask) ++ { ++ GPIO->GPIOio &= ~(pLed->ledMask); ++ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); ++ } ++ else ++ { ++ GPIO->GPIOio |= pLed->ledMask; ++ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); ++ } ++} ++ ++ ++// led timer. Will return if timer is already on ++void ledTimerStart(void) ++{ ++ if (gTimerOn) ++ return; ++ ++#if defined(DEBUG_LED) ++ printk("led: add_timer\n"); ++#endif ++ ++ init_timer(&gLedTimer); ++ gLedTimer.function = (void*)ledTimerExpire; ++ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms ++ add_timer (&gLedTimer); ++ gTimerOn = TRUE; ++} ++ ++ ++// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and ++// restart the timer according to ledState ++void ledTimerExpire(void) ++{ ++ int i; ++ PLED_INFO pCurLed; ++ ++ gTimerOn = FALSE; ++ ++ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) ++ { ++#if defined(DEBUG_LED) ++ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); ++#endif ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ case kLedStateOff: ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ break; ++ ++ case kLedStateBlinkOnce: ++ ledToggle(pCurLed); ++ pCurLed->blinkCountDown = 0; // reset to 0 ++ pCurLed->ledState = pCurLed->savedLedState; ++ if (pCurLed->ledState == kLedStateSlowBlinkContinues || ++ pCurLed->ledState == kLedStateFastBlinkContinues) ++ ledTimerStart(); // start timer if in blinkContinues stats ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ if (pCurLed->blinkCountDown-- == 0) ++ { ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ ledToggle(pCurLed); ++ } ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ } ++} ++ ++// initialize the gLedCount and allocate and fill gLed struct ++void __init boardLedInit(PLED_MAP_PAIR cLedMapping) ++{ ++ PLED_MAP_PAIR p1, p2; ++ PLED_INFO pCurLed; ++ int needTimer = FALSE; ++ int alreadyUsed = 0; ++ ++#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ ++ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; ++ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; ++#endif ++ ++ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); ++ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); ++ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); ++ ++ gLedCount = 0; ++ ++ // Check for multiple LED names and multiple LED GPIO pins that share the ++ // same physical board LED. ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ gLedCount++; ++ } ++ ++ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); ++ if( gLed == NULL ) ++ { ++ printk( "LED memory allocation error.\n" ); ++ return; ++ } ++ ++ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); ++ ++ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led ++ // (ledMask) the first defined led's ledInitState will be used. ++ pCurLed = gLed; ++ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) ++ { ++ if( (int) p1->ledName > MAX_VIRT_LEDS ) ++ continue; ++ ++ alreadyUsed = 0; ++ for( p2 = cLedMapping; p2 != p1; p2++ ) ++ { ++ if( (p1->ledMask && p1->ledMask == p2->ledMask) || ++ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) ++ { ++ alreadyUsed = 1; ++ break; ++ } ++ } ++ ++ if( alreadyUsed == 0 ) ++ { ++ // Initialize the board LED for the first time. ++ needTimer = initLedInfo( p1, pCurLed ); ++ gpVirtLeds[(int) p1->ledName] = pCurLed; ++ pCurLed++; ++ } ++ else ++ { ++ PLED_INFO pLed; ++ for( pLed = gLed; pLed != pCurLed; pLed++ ) ++ { ++ // Find the LED_INFO structure that has already been initialized. ++ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || ++ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) ++ { ++ // The board LED has already been initialized but possibly ++ // not completely initialized. ++ if( p1->ledMask ) ++ { ++ pLed->ledMask = p1->ledMask; ++ pLed->ledActiveLow = p1->ledActiveLow; ++ } ++ if( p1->ledMaskFail ) ++ { ++ pLed->ledMaskFail = p1->ledMaskFail; ++ pLed->ledActiveLowFail = p1->ledActiveLowFail; ++ } ++ gpVirtLeds[(int) p1->ledName] = pLed; ++ break; ++ } ++ } ++ } ++ } ++ ++ if (needTimer) ++ ledTimerStart(); ++ ++#if defined(DEBUG_LED) ++ int i; ++ for (i=0; i < gLedCount; i++) ++ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); ++#endif ++ ++} ++ ++// Initialize a structure that contains information about a physical board LED ++// control. The board LED may contain more than one GPIO pin to control a ++// normal condition (green) or a failure condition (red). ++int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) ++{ ++ int needTimer = FALSE; ++ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; ++ pCurLed->ledMask = pCurMap->ledMask; ++ pCurLed->ledActiveLow = pCurMap->ledActiveLow; ++ pCurLed->ledMaskFail = pCurMap->ledMaskFail; ++ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; ++ ++ switch (pCurLed->ledState) ++ { ++ case kLedStateOn: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOn(pCurLed); ++ break; ++ case kLedStateOff: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOff(pCurLed); ++ break; ++ case kLedStateFail: ++ pCurLed->blinkCountDown = 0; // reset the blink count down ++ ledOnFail(pCurLed); ++ break; ++ case kLedStateBlinkOnce: ++ pCurLed->blinkCountDown = 1; ++ needTimer = TRUE; ++ break; ++ case kLedStateSlowBlinkContinues: ++ pCurLed->blinkCountDown = kSlowBlinkCount; ++ needTimer = TRUE; ++ break; ++ case kLedStateFastBlinkContinues: ++ pCurLed->blinkCountDown = kFastBlinkCount; ++ needTimer = TRUE; ++ break; ++ default: ++ printk("Invalid state = %d\n", pCurLed->ledState); ++ } ++ ++ return( needTimer ); ++} ++ ++#if 0 /* BROKEN */ ++// Determines if there is at least one interface in bridge mode. Bridge mode ++// is determined by the cfm convention of naming bridge interfaces nas17 ++// through nas24. ++static int isBridgedProtocol(void) ++{ ++ extern int dev_get(const char *name); ++ const int firstBridgeId = 17; ++ const int lastBridgeId = 24; ++ int i; ++ int ret = FALSE; ++ char name[16]; ++ ++ for( i = firstBridgeId; i <= lastBridgeId; i++ ) ++ { ++ sprintf( name, "nas%d", i ); ++ ++ if( dev_get(name) ) ++ { ++ ret = TRUE; ++ break; ++ } ++ } ++ ++ return(ret); ++} ++#endif ++ ++// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation ++void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ PLED_INFO ledInfoPtr; ++ ++ // do the mapping from virtual to physical led ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ ledInfoPtr = gpVirtLeds[(int) ledName]; ++ else ++ ledInfoPtr = NULL; ++ ++ if (ledInfoPtr == NULL) ++ return; ++ ++ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) ++ { ++ (*gLedHwFunc[(int) ledName]) (ledName, ledState); ++ ledOffFail(ledInfoPtr); ++ return; ++ } ++ else ++ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) ++ { ++ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); ++ ledOff(ledInfoPtr); ++ return; ++ } ++ ++#if 0 /* BROKEN */ ++ // Do not blink the WAN Data LED if at least one interface is in bridge mode. ++ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) ++ { ++ static int BridgedProtocol = -1; ++ ++ if( BridgedProtocol == -1 ) ++ BridgedProtocol = isBridgedProtocol(); ++ ++ if( BridgedProtocol == TRUE ) ++ return; ++ } ++#endif ++ ++ // If the state is kLedStateFail and there is not a failure LED defined ++ // in the board parameters, change the state to kLedStateFastBlinkContinues. ++ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) ++ ledState = kLedStateFastBlinkContinues; ++ ++ switch (ledState) ++ { ++ case kLedStateOn: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on the specified LED GPIO. ++ ledOn(ledInfoPtr); ++ break; ++ ++ case kLedStateOff: ++ // First, turn off the complimentary (failure) LED GPIO. ++ if( ledInfoPtr->ledMaskFail ) ++ ledOffFail(ledInfoPtr); ++ else ++ if( gLedHwFailFunc[(int) ledName] ) ++ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn off the specified LED GPIO. ++ ledOff(ledInfoPtr); ++ break; ++ ++ case kLedStateFail: ++ // First, turn off the complimentary (normal) LED GPIO. ++ if( ledInfoPtr->ledMask ) ++ ledOff(ledInfoPtr); ++ else ++ if( gLedHwFunc[(int) ledName] ) ++ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); ++ ++ // Next, turn on (red) the specified LED GPIO. ++ ledOnFail(ledInfoPtr); ++ break; ++ ++ case kLedStateBlinkOnce: ++ // skip blinkOnce if it is already in Slow/Fast blink continues state ++ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || ++ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) ++ ; ++ else ++ { ++ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 ++ { ++ ledToggle(ledInfoPtr); ++ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires ++ ledInfoPtr->ledState = kLedStateBlinkOnce; ++ ledTimerStart(); ++ } ++ } ++ break; ++ ++ case kLedStateSlowBlinkContinues: ++ ledInfoPtr->blinkCountDown = kSlowBlinkCount; ++ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ case kLedStateFastBlinkContinues: ++ ledInfoPtr->blinkCountDown = kFastBlinkCount; ++ ledInfoPtr->ledState = kLedStateFastBlinkContinues; ++ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; ++ ledTimerStart(); ++ break; ++ ++ default: ++ printk("Invalid led state\n"); ++ } ++} ++ ++// This function is called for an LED that is controlled by hardware. ++void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) ++{ ++ if( (int) ledName < MAX_VIRT_LEDS ) ++ { ++ if( ledFailType == 1 ) ++ gLedHwFailFunc[(int) ledName] = ledHwFunc; ++ else ++ gLedHwFunc[(int) ledName] = ledHwFunc; ++ } ++} ++ +diff -urN linux.old/arch/mips/bcm963xx/board.c linux.dev/arch/mips/bcm963xx/board.c +--- linux.old/arch/mips/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/board.c 2006-08-25 15:16:26.000000000 +0200 +@@ -0,0 +1,555 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++/* Includes. */ ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/fs.h> ++#include <linux/interrupt.h> ++#include <linux/capability.h> ++#include <linux/slab.h> ++#include <linux/errno.h> ++#include <linux/module.h> ++#include <linux/pagemap.h> ++#include <asm/uaccess.h> ++#include <linux/wait.h> ++#include <linux/poll.h> ++#include <linux/sched.h> ++#include <linux/list.h> ++#include <linux/if.h> ++#include <linux/spinlock.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include <bcmTag.h> ++#include "boardparms.h" ++#include "bcm_intr.h" ++#include "board.h" ++#include "bcm_map_part.h" ++ ++static DEFINE_SPINLOCK(board_lock); ++ ++/* Typedefs. */ ++#if defined (NON_CONSECUTIVE_MAC) ++// used to be the last octet. Now changed to the first 5 bits of the the forth octet ++// to reduced the duplicated MAC addresses. ++#define CHANGED_OCTET 3 ++#define SHIFT_BITS 3 ++#else ++#define CHANGED_OCTET 1 ++#define SHIFT_BITS 0 ++#endif ++ ++typedef struct ++{ ++ unsigned long ulId; ++ char chInUse; ++ char chReserved[3]; ++} MAC_ADDR_INFO, *PMAC_ADDR_INFO; ++ ++typedef struct ++{ ++ unsigned long ulSdramSize; ++ unsigned long ulPsiSize; ++ unsigned long ulNumMacAddrs; ++ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ MAC_ADDR_INFO MacAddrs[1]; ++} NVRAM_INFO, *PNVRAM_INFO; ++ ++typedef struct ++{ ++ unsigned long eventmask; ++} BOARD_IOC, *PBOARD_IOC; ++ ++ ++/*Dyinggasp callback*/ ++typedef void (*cb_dgasp_t)(void *arg); ++typedef struct _CB_DGASP__LIST ++{ ++ struct list_head list; ++ char name[IFNAMSIZ]; ++ cb_dgasp_t cb_dgasp_fn; ++ void *context; ++}CB_DGASP_LIST , *PCB_DGASP_LIST; ++ ++ ++static LED_MAP_PAIR LedMapping[] = ++{ // led name Initial state physical pin (ledMask) ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, ++ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. ++}; ++ ++/* Externs. */ ++extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); ++extern unsigned int nr_free_pages (void); ++extern const char *get_system_type(void); ++extern void kerSysFlashInit(void); ++extern unsigned long get_nvram_start_addr(void); ++extern unsigned long get_scratch_pad_start_addr(void); ++extern unsigned long getMemorySize(void); ++extern void __init boardLedInit(PLED_MAP_PAIR); ++extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); ++extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, ++ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); ++ ++/* Prototypes. */ ++void __init InitNvramInfo( void ); ++ ++/* DyingGasp function prototype */ ++static void __init kerSysDyingGaspMapIntr(void); ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); ++static void __init kerSysInitDyingGaspHandler( void ); ++static void __exit kerSysDeinitDyingGaspHandler( void ); ++/* -DyingGasp function prototype - */ ++ ++static PNVRAM_INFO g_pNvramInfo = NULL; ++static int g_ledInitialized = 0; ++static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; ++ ++static int g_wakeup_monitor = 0; ++static struct file *g_monitor_file = NULL; ++static struct task_struct *g_monitor_task = NULL; ++static unsigned int (*g_orig_fop_poll) ++ (struct file *, struct poll_table_struct *) = NULL; ++ ++void kerSysMipsSoftReset(void) ++{ ++ if (PERF->RevID == 0x634800A1) { ++ typedef void (*FNPTR) (void); ++ FNPTR bootaddr = (FNPTR) FLASH_BASE; ++ int i; ++ ++ /* Disable interrupts. */ ++ //cli(); ++ spin_lock_irq(&board_lock); ++ ++ /* Reset all blocks. */ ++ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; ++ for( i = 0; i < 1000000; i++ ) ++ ; ++ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; ++ /* Jump to the power on address. */ ++ (*bootaddr) (); ++ } ++ else ++ PERF->pll_control |= SOFT_RESET; // soft reset mips ++} ++ ++ ++int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) ++{ ++ int nRet = 0; ++ PMAC_ADDR_INFO pMai = NULL; ++ PMAC_ADDR_INFO pMaiFreeNoId = NULL; ++ PMAC_ADDR_INFO pMaiFreeId = NULL; ++ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; ++ ++ /* CMO -- Fix le problème avec les adresses mac que l'on n'arrive pas ++ * * à relire plusieurs fois */ ++ /* inv_xde */ ++ if (boot_loader_type == BOOT_CFE) ++ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, ++ NVRAM_MAC_ADDRESS_LEN ); ++ else { ++ pucaMacAddr[0] = 0x00; ++ pucaMacAddr[1] = 0x07; ++ pucaMacAddr[2] = 0x3A; ++ pucaMacAddr[3] = 0xFF; ++ pucaMacAddr[4] = 0xFF; ++ pucaMacAddr[5] = 0xFF; ++ } ++ ++ return nRet; ++} /* kerSysGetMacAddr */ ++ ++int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) ++{ ++ int nRet = -EINVAL; ++ unsigned long ulIdx = 0; ++ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - ++ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); ++ ++ // if overflow 255 (negitive), add 256 to have the correct index ++ if (idx < 0) ++ idx += 256; ++ ulIdx = (unsigned long) (idx >> SHIFT_BITS); ++ ++ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) ++ { ++ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; ++ if( pMai->chInUse == 1 ) ++ { ++ pMai->chInUse = 0; ++ nRet = 0; ++ } ++ } ++ ++ return( nRet ); ++} /* kerSysReleaseMacAddr */ ++ ++int kerSysGetSdramSize( void ) ++{ ++ if (boot_loader_type == BOOT_CFE) { ++ return( (int) g_pNvramInfo->ulSdramSize ); ++ } ++ else { ++ printk("kerSysGetSdramSize : 0x%08X\n", (int)getMemorySize() + 0x00040000); ++ return((int)getMemorySize() + 0x00040000); ++ } ++} /* kerSysGetSdramSize */ ++ ++ ++void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) ++{ ++ if (g_ledInitialized) ++ boardLedCtrl(ledName, ledState); ++} ++ ++unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) ++{ ++ int mask = (*g_orig_fop_poll) (f, t); ++ ++ if( g_wakeup_monitor == 1 && g_monitor_file == f ) ++ { ++ /* If g_wakeup_monitor is non-0, the user mode application needs to ++ * return from a blocking select function. Return POLLPRI which will ++ * cause the select to return with the exception descriptor set. ++ */ ++ mask |= POLLPRI; ++ g_wakeup_monitor = 0; ++ } ++ ++ return( mask ); ++} ++ ++/* Put the user mode application that monitors link state on a run queue. */ ++void kerSysWakeupMonitorTask( void ) ++{ ++ g_wakeup_monitor = 1; ++ if( g_monitor_task ) ++ wake_up_process( g_monitor_task ); ++} ++ ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++int kerSysGetResetHold(void) ++{ ++ unsigned short gpio; ++ ++ if( BpGetPressAndHoldResetGpio( &gpio ) == BP_SUCCESS ) ++ { ++ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); ++ volatile unsigned long *gpio_reg = &GPIO->GPIOio; ++ ++ if( (gpio & ~BP_ACTIVE_MASK) >= 32 ) ++ { ++ gpio_mask = GPIO_NUM_TO_MASK_HIGH(gpio); ++ gpio_reg = &GPIO->GPIOio_high; ++ } ++ //printk("gpio=%04x,gpio_mask=%04x,gpio_reg=%04x\n",gpio,gpio_mask,*gpio_reg); ++ if(*gpio_reg & gpio_mask) //press down ++ return RESET_BUTTON_UP; ++ } ++ return RESET_BUTTON_PRESSDOWN; ++} ++//<<JUNHON, 2004/09/15 ++ ++/*************************************************************************** ++ * Dying gasp ISR and functions. ++ ***************************************************************************/ ++#define KERSYS_DBG printk ++ ++#if defined(CONFIG_BCM96345) ++#define CYCLE_PER_US 70 ++#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) ++/* The BCM6348 cycles per microsecond is really variable since the BCM6348 ++ * MIPS speed can vary depending on the PLL settings. However, an appoximate ++ * value of 120 will still work OK for the test being done. ++ */ ++#define CYCLE_PER_US 120 ++#endif ++#define DG_GLITCH_TO (100*CYCLE_PER_US) ++ ++static void __init kerSysDyingGaspMapIntr() ++{ ++ unsigned long ulIntr; ++ ++#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ } ++#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) ++ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { ++ ulIntr += INTERRUPT_ID_EXTERNAL_0; ++ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); ++ BcmHalInterruptEnable( ulIntr ); ++ } ++#endif ++ ++} ++ ++void kerSysSetWdTimer(ulong timeUs) ++{ ++ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); ++ TIMER->WatchDogCtl = 0xFF00; ++ TIMER->WatchDogCtl = 0x00FF; ++} ++ ++ulong kerSysGetCycleCount(void) ++{ ++ ulong cnt; ++#ifdef _WIN32_WCE ++ cnt = 0; ++#else ++ __asm volatile("mfc0 %0, $9":"=d"(cnt)); ++#endif ++ return(cnt); ++} ++ ++static Bool kerSysDyingGaspCheckPowerLoss(void) ++{ ++ ulong clk0; ++ ulong ulIntr; ++ ++ ulIntr = 0; ++ clk0 = kerSysGetCycleCount(); ++ ++ UART->Data = 'D'; ++ UART->Data = '%'; ++ UART->Data = 'G'; ++ ++#if defined(CONFIG_BCM96345) ++ BpGetAdslDyingGaspExtIntr( &ulIntr ); ++ ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ ++ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) ++ do { ++ ulong clk1; ++ ++ clk1 = kerSysGetCycleCount(); /* time cleared */ ++ /* wait a little to get new reading */ ++ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) ++ ; ++ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); ++ ++ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { ++ BcmHalInterruptEnable( INTERRUPT_ID_DG ); ++ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); ++ return 0; ++ } ++#endif ++ return 1; ++} ++ ++static void kerSysDyingGaspShutdown( void ) ++{ ++ kerSysSetWdTimer(1000000); ++#if defined(CONFIG_BCM96345) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); ++#elif defined(CONFIG_BCM96348) ++ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); ++#endif ++} ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) ++#else ++static unsigned int kerSysDyingGaspIsr(void) ++#endif ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp, *dsl = NULL; ++ ++ if (kerSysDyingGaspCheckPowerLoss()) { ++ ++ /* first to turn off everything other than dsl */ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(strncmp(tmp->name, "dsl", 3)) { ++ (tmp->cb_dgasp_fn)(tmp->context); ++ }else { ++ dsl = tmp; ++ } ++ } ++ ++ /* now send dgasp */ ++ if(dsl) ++ (dsl->cb_dgasp_fn)(dsl->context); ++ ++ /* reset and shutdown system */ ++ kerSysDyingGaspShutdown(); ++ } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++return( IRQ_HANDLED ); ++#else ++ return( 1 ); ++#endif ++} ++ ++static void __init kerSysInitDyingGaspHandler( void ) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head != NULL) { ++ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); ++ return; ++ } ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ g_cb_dgasp_list_head = new_node; ++ ++} /* kerSysInitDyingGaspHandler */ ++ ++static void __exit kerSysDeinitDyingGaspHandler( void ) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) ++ return; ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ list_del(pos); ++ kfree(tmp); ++ } ++ ++ kfree(g_cb_dgasp_list_head); ++ g_cb_dgasp_list_head = NULL; ++ ++} /* kerSysDeinitDyingGaspHandler */ ++ ++void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) ++{ ++ CB_DGASP_LIST *new_node; ++ ++ if( g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if( devname == NULL || cbfn == NULL ) { ++ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); ++ return; ++ } ++ ++ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); ++ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); ++ INIT_LIST_HEAD(&new_node->list); ++ strncpy(new_node->name, devname, IFNAMSIZ); ++ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; ++ new_node->context = context; ++ list_add(&new_node->list, &g_cb_dgasp_list_head->list); ++ ++ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); ++ ++} /* kerSysRegisterDyingGaspHandler */ ++ ++void kerSysDeregisterDyingGaspHandler(char *devname) ++{ ++ struct list_head *pos; ++ CB_DGASP_LIST *tmp; ++ ++ if(g_cb_dgasp_list_head == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); ++ return; ++ } ++ ++ if(devname == NULL) { ++ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); ++ return; ++ } ++ ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); ++ ++ list_for_each(pos, &g_cb_dgasp_list_head->list) { ++ tmp = list_entry(pos, CB_DGASP_LIST, list); ++ if(!strcmp(tmp->name, devname)) { ++ list_del(pos); ++ kfree(tmp); ++ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); ++ return; ++ } ++ } ++ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); ++ ++} /* kerSysDeregisterDyingGaspHandler */ ++ ++//EXPORT_SYMBOL(kerSysNvRamGet); ++EXPORT_SYMBOL(kerSysGetMacAddress); ++EXPORT_SYMBOL(kerSysReleaseMacAddress); ++EXPORT_SYMBOL(kerSysGetSdramSize); ++EXPORT_SYMBOL(kerSysLedCtrl); ++EXPORT_SYMBOL(kerSysGetResetHold); ++EXPORT_SYMBOL(kerSysLedRegisterHwHandler); ++EXPORT_SYMBOL(BpGetBoardIds); ++EXPORT_SYMBOL(BpGetSdramSize); ++EXPORT_SYMBOL(BpGetPsiSize); ++EXPORT_SYMBOL(BpGetEthernetMacInfo); ++EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); ++EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); ++EXPORT_SYMBOL(BpGetVoipResetGpio); ++EXPORT_SYMBOL(BpGetVoipIntrGpio); ++EXPORT_SYMBOL(BpGetPcmciaResetGpio); ++EXPORT_SYMBOL(BpGetRtsCtsUartGpios); ++EXPORT_SYMBOL(BpGetAdslLedGpio); ++EXPORT_SYMBOL(BpGetAdslFailLedGpio); ++EXPORT_SYMBOL(BpGetWirelessLedGpio); ++EXPORT_SYMBOL(BpGetUsbLedGpio); ++EXPORT_SYMBOL(BpGetHpnaLedGpio); ++EXPORT_SYMBOL(BpGetWanDataLedGpio); ++EXPORT_SYMBOL(BpGetPppLedGpio); ++EXPORT_SYMBOL(BpGetPppFailLedGpio); ++EXPORT_SYMBOL(BpGetVoipLedGpio); ++EXPORT_SYMBOL(BpGetWirelessExtIntr); ++EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); ++EXPORT_SYMBOL(BpGetVoipExtIntr); ++EXPORT_SYMBOL(BpGetHpnaExtIntr); ++EXPORT_SYMBOL(BpGetHpnaChipSelect); ++EXPORT_SYMBOL(BpGetVoipChipSelect); ++EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); ++EXPORT_SYMBOL(BpGetWirelessSesExtIntr); ++EXPORT_SYMBOL(BpGetWirelessSesLedGpio); ++EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); ++EXPORT_SYMBOL(kerSysGetCycleCount); ++EXPORT_SYMBOL(kerSysSetWdTimer); ++EXPORT_SYMBOL(kerSysWakeupMonitorTask); ++ +diff -urN linux.old/arch/mips/bcm963xx/boardparms.c linux.dev/arch/mips/bcm963xx/boardparms.c +--- linux.old/arch/mips/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/boardparms.c 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,2391 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.c ++ * ++ * Description: This file contains the implementation for the BCM63xx board ++ * parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include "boardparms.h" ++ ++/* Defines. */ ++ ++/* Default psi size in K bytes */ ++#define BP_PSI_DEFAULT_SIZE 24 ++ ++/* Typedefs */ ++typedef struct boardparameters ++{ ++ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ ++ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; ++ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; ++ unsigned short usSdramSize; /* SDRAM size and type */ ++ unsigned short usPsiSize; /* persistent storage in K bytes */ ++ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ ++ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ ++ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ ++ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ ++ unsigned short usGpioUartRts; /* GPIO pin or not defined */ ++ unsigned short usGpioUartCts; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ ++ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ ++ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ ++ unsigned short usExtIntrWireless; /* ext intr or not defined */ ++ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ ++ unsigned short usExtIntrHpna; /* ext intr or not defined */ ++ unsigned short usCsHpna; /* chip select not defined */ ++ unsigned short usAntInUseWireless; /* antenna in use or not defined */ ++ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ ++ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ ++ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ ++} BOARD_PARAMETERS, *PBOARD_PARAMETERS; ++ ++/* Variables */ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++static BOARD_PARAMETERS g_bcm96338sv = ++{ ++ "96338SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static BOARD_PARAMETERS g_bcm96338l2m8m = ++{ ++ "96338L-2M-8M", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; ++#endif ++ ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++static BOARD_PARAMETERS g_bcm96345r = ++{ ++ "96345R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw2 = ++{ ++ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold ++ * Reset or RTS. ++ */ ++ "96345GW2", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_GPIO_0_AH, /* usGpioPhySpiSck */ ++ BP_GPIO_4_AH, /* usGpioPhySpiSs */ ++ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ ++ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_GPIO, /* usConfigType */ ++ BP_ENET_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_GPIO_13_AH, /* usGpioUartRts */ ++ BP_GPIO_9_AH, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw = ++{ ++ "96345GW", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_GPIO_10_AH, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_EXT_INTR_3, /* usExtIntrHpna */ ++ BP_CS_1, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96335r = ++{ ++ "96335R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_9_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_8_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_9_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345r0 = ++{ ++ "96345R0", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345rs = ++{ ++ "96345RS", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, ++ &g_bcm96345rs, 0}; ++#endif ++ ++#if defined(_BCM96348_) || defined(CONFIG_BCM96348) ++ ++static BOARD_PARAMETERS g_bcm96348r = ++{ ++ "96348R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348lv = ++{ ++ "96348LV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x02, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_GPIO_5_AL, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw = ++{ ++ "96348GW", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_10 = ++{ ++ "96348GW-10", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw_11 = ++{ ++ "96348GW-11", /* szBoardId */ ++ {{BP_ENET_NO_PHY}, /* ucPhyType */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348sv = ++{ ++ "96348SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x1f, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_dualDsp = ++{ ++ "96348GW-DualDSP", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_UNEQUIPPED, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_DSP, /* ucDspType */ ++ 0x01, /* ucDspAddress */ ++ BP_EXT_INTR_3, /* usExtIntrVoip */ ++ BP_UNEQUIPPED , /* usGpioVoipReset */ ++ BP_GPIO_35_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_3}}, /* usCsVoip */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcmCustom_01 = ++{ ++ "BCMCUST_01", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_36_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AL, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, ++ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, ++ &g_bcmCustom_01, 0}; ++#endif ++ ++static PBOARD_PARAMETERS g_pCurrentBp = 0; ++ ++/************************************************************************** ++ * Name : bpstrcmp ++ * ++ * Description: String compare for this file so it does not depend on an OS. ++ * (Linux kernel and CFE share this source file.) ++ * ++ * Parameters : [IN] dest - destination string ++ * [IN] src - source string ++ * ++ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src ++ ***************************************************************************/ ++static int bpstrcmp(const char *dest,const char *src); ++static int bpstrcmp(const char *dest,const char *src) ++{ ++ while (*src && *dest) ++ { ++ if (*dest < *src) return -1; ++ if (*dest > *src) return 1; ++ dest++; ++ src++; ++ } ++ ++ if (*dest && !*src) return 1; ++ if (!*dest && *src) return -1; ++ return 0; ++} /* bpstrcmp */ ++ ++/************************************************************************** ++ * Name : BpGetVoipDspConfig ++ * ++ * Description: Gets the DSP configuration from the board parameter ++ * structure for a given DSP index. ++ * ++ * Parameters : [IN] dspNum - DSP index (number) ++ * ++ * Returns : Pointer to DSP configuration block if found/valid, NULL ++ * otherwise. ++ ***************************************************************************/ ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) ++{ ++ VOIP_DSP_INFO *pDspConfig = 0; ++ int i; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) ++ { ++ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && ++ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) ++ { ++ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; ++ break; ++ } ++ } ++ } ++ ++ return pDspConfig; ++} ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ) ++{ ++ int nRet = BP_BOARD_ID_NOT_FOUND; ++ PBOARD_PARAMETERS *ppBp; ++ ++ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) ++ { ++ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) ++ { ++ g_pCurrentBp = *ppBp; ++ nRet = BP_SUCCESS; ++ break; ++ } ++ } ++ ++ return( nRet ); ++} /* BpSetBoardId */ ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) ++{ ++ PBOARD_PARAMETERS *ppBp; ++ int i; ++ char *src; ++ char *dest; ++ ++ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; ++ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) ++ { ++ dest = pszBoardIds; ++ src = (*ppBp)->szBoardId; ++ while( *src ) ++ *dest++ = *src++; ++ *dest = '\0'; ++ } ++ ++ return( i ); ++} /* BpGetBoardIds */ ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) ++{ ++ int i, nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ { ++ if( i < BP_MAX_ENET_MACS ) ++ { ++ unsigned char *src = (unsigned char *) ++ &g_pCurrentBp->EnetMacInfos[i]; ++ unsigned char *dest = (unsigned char *) pEnetInfos; ++ int len = sizeof(ETHERNET_MAC_INFO); ++ while( len-- ) ++ *dest++ = *src++; ++ } ++ else ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ } ++ ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetEthernetMacInfo */ ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulSdramSize = g_pCurrentBp->usSdramSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulSdramSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetSdramSize */ ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulPsiSize = g_pCurrentBp->usPsiSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulPsiSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPsiSize */ ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; ++ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; ++ ++ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusInner = *pusOuter = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetRj11InnerOuterPairGpios */ ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; ++ ++ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPressAndHoldResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipReset; ++ ++ if( *pusValue != BP_NOT_DEFINED || ++ *pusValue == BP_UNEQUIPPED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipIntr; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipIntrGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPcmciaReset; ++ ++ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPcmciaResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, board id input string does not ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusRts = g_pCurrentBp->usGpioUartRts; ++ *pusCts = g_pCurrentBp->usGpioUartCts; ++ ++ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusRts = *pusCts = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUartRtsCtsGpios */ ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdsl; ++ ++ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdslFail; ++ ++ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWireless; ++ ++ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usAntInUseWireless; ++ ++ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessAntInUse */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; ++ ++ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessSesBtnGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; ++ ++ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedSesWireless; ++ ++ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedUsb; ++ ++ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUsbLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedHpna; ++ ++ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWanData; ++ ++ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWanDataLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPpp; ++ ++ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPppFail; ++ ++ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; ++ ++ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderPowerOn */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; ++ ++ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderAlarmLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; ++ ++ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderResetCfgLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlStop; ++ ++ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderStopLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ * ++ * Note : The VoIP structure would allow for having one LED per DSP ++ * however, the board initialization function assumes only one ++ * LED per functionality (ie one LED for VoIP). Therefore in ++ * order to keep this tidy and simple we do not make usage of the ++ * one-LED-per-DSP function. Instead, we assume that the LED for ++ * VoIP is unique and associated with DSP 0 (always present on ++ * any VoIP platform). If changing this to a LED-per-DSP function ++ * then one need to update the board initialization driver in ++ * bcmdrivers\opensource\char\board\bcm963xx\impl1 ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioLedVoip; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrWireless; ++ ++ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; ++ ++ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslDyingGaspExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usExtIntrVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrHpna; ++ ++ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usCsHpna; ++ ++ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaChipSelect */ ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usCsVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipChipSelect */ ++ +diff -urN linux.old/arch/mips/bcm963xx/boardparms.h linux.dev/arch/mips/bcm963xx/boardparms.h +--- linux.old/arch/mips/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/boardparms.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,758 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.h ++ * ++ * Description: This file contains definitions and function prototypes for ++ * the BCM63xx board parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++#if !defined(_BOARDPARMS_H) ++#define _BOARDPARMS_H ++ ++/* Return codes. */ ++#define BP_SUCCESS 0 ++#define BP_BOARD_ID_NOT_FOUND 1 ++#define BP_VALUE_NOT_DEFINED 2 ++#define BP_BOARD_ID_NOT_SET 3 ++ ++/* Values for BpGetSdramSize. */ ++#define BP_MEMORY_8MB_1_CHIP 0 ++#define BP_MEMORY_16MB_1_CHIP 1 ++#define BP_MEMORY_32MB_1_CHIP 2 ++#define BP_MEMORY_64MB_2_CHIP 3 ++#define BP_MEMORY_32MB_2_CHIP 4 ++#define BP_MEMORY_16MB_2_CHIP 5 ++ ++/* Values for EthernetMacInfo PhyType. */ ++#define BP_ENET_NO_PHY 0 ++#define BP_ENET_INTERNAL_PHY 1 ++#define BP_ENET_EXTERNAL_PHY 2 ++#define BP_ENET_EXTERNAL_SWITCH 3 ++ ++/* Values for EthernetMacInfo Configuration type. */ ++#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ ++#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ ++#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ ++ ++/* Values for EthernetMacInfo Reverse MII. */ ++#define BP_ENET_NO_REVERSE_MII 0 ++#define BP_ENET_REVERSE_MII 1 ++ ++/* Values for VoIPDSPInfo DSPType. */ ++#define BP_VOIP_NO_DSP 0 ++#define BP_VOIP_DSP 1 ++ ++ ++/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ ++#define BP_ACTIVE_MASK 0x8000 ++#define BP_ACTIVE_HIGH 0x0000 ++#define BP_ACTIVE_LOW 0x8000 ++#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) ++#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) ++#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) ++#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) ++#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) ++#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) ++#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) ++#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) ++#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) ++#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) ++#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) ++#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) ++#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) ++#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) ++#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) ++#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) ++#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) ++#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) ++#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) ++#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) ++#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) ++#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) ++#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) ++#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) ++#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) ++#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) ++#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) ++#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) ++#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) ++#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) ++#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) ++#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) ++#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) ++#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) ++#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) ++#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) ++#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) ++#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) ++#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) ++#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) ++#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) ++#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) ++#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) ++#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) ++#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) ++#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) ++#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) ++#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) ++#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) ++#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) ++#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) ++#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) ++#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) ++#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) ++#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) ++#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) ++#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) ++#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) ++#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) ++#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) ++#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) ++#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) ++#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) ++#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) ++#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) ++#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) ++#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) ++#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) ++#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) ++#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) ++#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) ++#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) ++#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) ++#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) ++ ++/* Values for external interrupt assignments. */ ++#define BP_EXT_INTR_0 0 ++#define BP_EXT_INTR_1 1 ++#define BP_EXT_INTR_2 2 ++#define BP_EXT_INTR_3 3 ++ ++/* Values for chip select assignments. */ ++#define BP_CS_0 0 ++#define BP_CS_1 1 ++#define BP_CS_2 2 ++#define BP_CS_3 3 ++ ++/* Value for GPIO and external interrupt fields that are not used. */ ++#define BP_NOT_DEFINED 0xffff ++#define BP_HW_DEFINED 0xfff0 ++#define BP_UNEQUIPPED 0xfff1 ++ ++/* Maximum size of the board id string. */ ++#define BP_BOARD_ID_LEN 16 ++ ++/* Maximum number of Ethernet MACs. */ ++#define BP_MAX_ENET_MACS 2 ++ ++/* Maximum number of VoIP DSPs. */ ++#define BP_MAX_VOIP_DSP 2 ++ ++/* Wireless Antenna Settings. */ ++#define BP_WLAN_ANT_MAIN 0 ++#define BP_WLAN_ANT_AUX 1 ++#define BP_WLAN_ANT_BOTH 3 ++ ++#if !defined(__ASSEMBLER__) ++ ++/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, ++ * then the other fields are not valid. ++ */ ++typedef struct EthernetMacInfo ++{ ++ unsigned char ucPhyType; /* BP_ENET_xxx */ ++ unsigned char ucPhyAddress; /* 0 to 31 */ ++ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ ++ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ ++ unsigned short numSwitchPorts; /* Number of PHY ports */ ++ unsigned short usConfigType; /* Configuration type */ ++ unsigned short usReverseMii; /* Reverse MII */ ++} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; ++ ++ ++/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, ++ * then the other fields are not valid. ++ */ ++typedef struct VoIPDspInfo ++{ ++ unsigned char ucDspType; ++ unsigned char ucDspAddress; ++ unsigned short usExtIntrVoip; ++ unsigned short usGpioVoipReset; ++ unsigned short usGpioVoipIntr; ++ unsigned short usGpioLedVoip; ++ unsigned short usCsVoip; ++ ++} VOIP_DSP_INFO; ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ); ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ); ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ); ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ); ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); ++ ++#endif /* __ASSEMBLER__ */ ++ ++#endif /* _BOARDPARMS_H */ ++ +diff -urN linux.old/arch/mips/bcm963xx/include/6338_intr.h linux.dev/arch/mips/bcm963xx/include/6338_intr.h +--- linux.old/arch/mips/bcm963xx/include/6338_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/6338_intr.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,64 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6338_INTR_H ++#define __6338_INTR_H ++ ++/*=====================================================================*/ ++/* BCM6338 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6338 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 6) ++#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 7) ++#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) ++#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 10) ++#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 11) ++#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 12) ++#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 13) ++#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) ++#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) ++#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) ++#define INTERRUPT_ID_SDIO (INTERNAL_ISR_TABLE_OFFSET + 17) ++ ++#endif /* __BCM6338_H */ ++ +diff -urN linux.old/arch/mips/bcm963xx/include/6338_map_part.h linux.dev/arch/mips/bcm963xx/include/6338_map_part.h +--- linux.old/arch/mips/bcm963xx/include/6338_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/6338_map_part.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,334 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6338_MAP_H ++#define __BCM6338_MAP_H ++ ++#include "bcmtypes.h" ++ ++#define PERF_BASE 0xfffe0000 ++#define TIMR_BASE 0xfffe0200 ++#define UART_BASE 0xfffe0300 ++#define GPIO_BASE 0xfffe0400 ++#define SPI_BASE 0xfffe0c00 ++ ++typedef struct PerfControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define EMAC_CLK_EN 0x0010 ++#define USBS_CLK_EN 0x0010 ++#define SAR_CLK_EN 0x0020 ++ ++#define SPI_CLK_EN 0x0200 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 5 ++#define EI_CLEAR_SHFT 10 ++#define EI_MASK_SHFT 15 ++#define EI_INSENS_SHFT 20 ++#define EI_LEVEL_SHFT 25 ++ ++ uint32 unused[4]; /* (18) */ ++ uint32 BlockSoftReset; /* (28) */ ++#define BSR_SPI 0x00000001 ++#define BSR_EMAC 0x00000004 ++#define BSR_USBH 0x00000008 ++#define BSR_USBS 0x00000010 ++#define BSR_ADSL 0x00000020 ++#define BSR_DMAMEM 0x00000040 ++#define BSR_SAR 0x00000080 ++#define BSR_ACLC 0x00000100 ++#define BSR_ADSL_MIPS_PLL 0x00000400 ++#define BSR_ALL_BLOCKS \ ++ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ ++ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) ++} PerfControl; ++ ++#define PERF ((volatile PerfControl * const) PERF_BASE) ++ ++ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint32 unused0; ++ uint32 GPIODir; /* bits 7:0 */ ++ uint32 unused1; ++ uint32 GPIOio; /* bits 7:0 */ ++ uint32 LEDCtrl; ++#define LED3_STROBE 0x08000000 ++#define LED2_STROBE 0x04000000 ++#define LED1_STROBE 0x02000000 ++#define LED0_STROBE 0x01000000 ++#define LED_TEST 0x00010000 ++#define LED3_DISABLE_LINK_ACT 0x00008000 ++#define LED2_DISABLE_LINK_ACT 0x00004000 ++#define LED1_DISABLE_LINK_ACT 0x00002000 ++#define LED0_DISABLE_LINK_ACT 0x00001000 ++#define LED_INTERVAL_SET_MASK 0x00000f00 ++#define LED_INTERVAL_SET_320MS 0x00000500 ++#define LED_INTERVAL_SET_160MS 0x00000400 ++#define LED_INTERVAL_SET_80MS 0x00000300 ++#define LED_INTERVAL_SET_40MS 0x00000200 ++#define LED_INTERVAL_SET_20MS 0x00000100 ++#define LED3_ON 0x00000080 ++#define LED2_ON 0x00000040 ++#define LED1_ON 0x00000020 ++#define LED0_ON 0x00000010 ++#define LED3_ENABLE 0x00000008 ++#define LED2_ENABLE 0x00000004 ++#define LED1_ENABLE 0x00000002 ++#define LED0_ENABLE 0x00000001 ++ uint32 SpiSlaveCfg; ++#define SPI_SLAVE_RESET 0x00010000 ++#define SPI_RESTRICT 0x00000400 ++#define SPI_DELAY_DISABLE 0x00000200 ++#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 ++#define SPI_SER_ADDR_CFG_MASK 0x0000000c ++#define SPI_MODE 0x00000001 ++ uint32 vRegConfig; ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++/* Number to mask conversion macro used for GPIODir and GPIOio */ ++#define GPIO_NUM_MAX_BITS_MASK 0x0f ++#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) ++ ++/* ++** Spi Controller ++*/ ++ ++typedef struct SpiControl { ++ uint16 spiCmd; /* (0x0): SPI command */ ++#define SPI_CMD_START_IMMEDIATE 3 ++ ++#define SPI_CMD_COMMAND_SHIFT 0 ++#define SPI_CMD_DEVICE_ID_SHIFT 4 ++#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 ++ ++ byte spiIntStatus; /* (0x2): SPI interrupt status */ ++ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ ++ ++ byte spiIntMask; /* (0x4): SPI interrupt mask */ ++#define SPI_INTR_CMD_DONE 0x01 ++#define SPI_INTR_CLEAR_ALL 0x1f ++ ++ byte spiStatus; /* (0x5): SPI status */ ++ ++ byte spiClkCfg; /* (0x6): SPI clock configuration */ ++ ++ byte spiFillByte; /* (0x7): SPI fill byte */ ++ ++ byte unused0; ++ byte spiMsgTail; /* (0x9): msgtail */ ++ byte unused1; ++ byte spiRxTail; /* (0xB): rxtail */ ++ ++ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ ++ ++ byte spiMsgCtl; /* (0x40) control byte */ ++#define HALF_DUPLEX_W 1 ++#define HALF_DUPLEX_R 2 ++#define SPI_MSG_TYPE_SHIFT 6 ++#define SPI_BYTE_CNT_SHIFT 0 ++ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ ++ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ ++ byte unused3[64]; /* (0xc0 - 0xff) reserved */ ++} SpiControl; ++ ++#define SPI ((volatile SpiControl * const) SPI_BASE) ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct MpiRegisters { ++ EbiChipSelect cs[1]; /* size chip select configuration */ ++} MpiRegisters; ++ ++#define MPI ((volatile MpiRegisters * const) MPI_BASE) ++ ++ ++#endif ++ +diff -urN linux.old/arch/mips/bcm963xx/include/6345_intr.h linux.dev/arch/mips/bcm963xx/include/6345_intr.h +--- linux.old/arch/mips/bcm963xx/include/6345_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/6345_intr.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,72 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6345_INTR_H ++#define __6345_INTR_H ++ ++ ++/*=====================================================================*/ ++/* BCM6345 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6345 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++#define DMA_ISR_TABLE_OFFSET (INTERNAL_ISR_TABLE_OFFSET + 13) ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++/* Internal peripheral interrupt IDs */ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 3) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_USB (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_EMAC (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 12) ++ ++/* DMA channel interrupt IDs */ ++#define INTERRUPT_ID_EMAC_RX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_RX_CHAN) ++#define INTERRUPT_ID_EMAC_TX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_TX_CHAN) ++#define INTERRUPT_ID_EBI_RX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_RX_CHAN) ++#define INTERRUPT_ID_EBI_TX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_TX_CHAN) ++#define INTERRUPT_ID_RESERVED_RX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_RX_CHAN) ++#define INTERRUPT_ID_RESERVED_TX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_TX_CHAN) ++#define INTERRUPT_ID_USB_BULK_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_RX_CHAN) ++#define INTERRUPT_ID_USB_BULK_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_TX_CHAN) ++#define INTERRUPT_ID_USB_CNTL_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_RX_CHAN) ++#define INTERRUPT_ID_USB_CNTL_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_TX_CHAN) ++#define INTERRUPT_ID_USB_ISO_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_RX_CHAN) ++#define INTERRUPT_ID_USB_ISO_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_TX_CHAN) ++ ++ ++#endif /* __BCM6345_H */ ++ +diff -urN linux.old/arch/mips/bcm963xx/include/6345_map_part.h linux.dev/arch/mips/bcm963xx/include/6345_map_part.h +--- linux.old/arch/mips/bcm963xx/include/6345_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/6345_map_part.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,163 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6345_MAP_H ++#define __BCM6345_MAP_H ++ ++ ++#include "bcmtypes.h" ++#include "6345_intr.h" ++ ++typedef struct IntControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define USB_CLK_EN 0x0100 ++#define EMAC_CLK_EN 0x0080 ++#define UART_CLK_EN 0x0008 ++#define CPU_CLK_EN 0x0001 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 4 ++#define EI_CLEAR_SHFT 8 ++#define EI_MASK_SHFT 12 ++#define EI_INSENS_SHFT 16 ++#define EI_LEVEL_SHFT 20 ++} IntControl; ++ ++#define INTC_BASE 0xfffe0000 ++#define PERF ((volatile IntControl * const) INTC_BASE) ++ ++#define TIMR_BASE 0xfffe0200 ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ byte config; ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define XMITBREAK 0x40 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ uint32 baudword; ++ ++ byte txf_levl; ++ byte rxf_levl; ++ byte fifocfg; ++ byte prog_out; ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; ++ byte DeltaIPConfig_Mask; ++ byte DeltaIP_SyncIP; ++ uint16 intMask; ++ uint16 intStatus; ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOEMT 0x0020 ++#define RXOVFERR 0x0080 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART_BASE 0xfffe0300 ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint16 unused0; ++ byte unused1; ++ byte TBusSel; ++ ++ uint16 unused2; ++ uint16 GPIODir; ++ byte unused3; ++ byte Leds; ++ uint16 GPIOio; ++ ++ uint32 UartCtl; ++} GpioControl; ++ ++#define GPIO_BASE 0xfffe0400 ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++#define GPIO_NUM_MAX_BITS_MASK 0x0f ++#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) ++ ++ ++#endif ++ +diff -urN linux.old/arch/mips/bcm963xx/include/6348_intr.h linux.dev/arch/mips/bcm963xx/include/6348_intr.h +--- linux.old/arch/mips/bcm963xx/include/6348_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/6348_intr.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,74 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __6348_INTR_H ++#define __6348_INTR_H ++ ++ ++/*=====================================================================*/ ++/* BCM6348 External Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define INTERRUPT_ID_EXTERNAL_0 3 ++#define INTERRUPT_ID_EXTERNAL_1 4 ++#define INTERRUPT_ID_EXTERNAL_2 5 ++#define INTERRUPT_ID_EXTERNAL_3 6 ++ ++/*=====================================================================*/ ++/* BCM6348 Timer Interrupt Level Assignments */ ++/*=====================================================================*/ ++#define MIPS_TIMER_INT 7 ++ ++/*=====================================================================*/ ++/* Peripheral ISR Table Offset */ ++/*=====================================================================*/ ++#define INTERNAL_ISR_TABLE_OFFSET 8 ++ ++/*=====================================================================*/ ++/* Logical Peripheral Interrupt IDs */ ++/*=====================================================================*/ ++ ++#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) ++#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) ++#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) ++#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 4) ++#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 5) ++#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 6) ++#define INTERRUPT_ID_EMAC2 (INTERNAL_ISR_TABLE_OFFSET + 7) ++#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) ++#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) ++#define INTERRUPT_ID_M2M (INTERNAL_ISR_TABLE_OFFSET + 10) ++#define INTERRUPT_ID_ACLC (INTERNAL_ISR_TABLE_OFFSET + 11) ++#define INTERRUPT_ID_USBH (INTERNAL_ISR_TABLE_OFFSET + 12) ++#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 13) ++#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) ++#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) ++#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) ++#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 17) ++#define INTERRUPT_ID_USB_ISO_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 18) ++#define INTERRUPT_ID_USB_ISO_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 19) ++#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 20) ++#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 21) ++#define INTERRUPT_ID_EMAC2_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 22) ++#define INTERRUPT_ID_EMAC2_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 23) ++#define INTERRUPT_ID_MPI (INTERNAL_ISR_TABLE_OFFSET + 24) ++#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 25) ++ ++ ++#endif /* __BCM6348_H */ ++ +diff -urN linux.old/arch/mips/bcm963xx/include/6348_map_part.h linux.dev/arch/mips/bcm963xx/include/6348_map_part.h +--- linux.old/arch/mips/bcm963xx/include/6348_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/6348_map_part.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,500 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM6348_MAP_H ++#define __BCM6348_MAP_H ++ ++#include "bcmtypes.h" ++ ++#define PERF_BASE 0xfffe0000 ++#define TIMR_BASE 0xfffe0200 ++#define UART_BASE 0xfffe0300 ++#define GPIO_BASE 0xfffe0400 ++#define MPI_BASE 0xfffe2000 /* MPI control registers */ ++#define USB_HOST_BASE 0xfffe1b00 /* USB host registers */ ++#define USB_HOST_NON_OHCI 0xfffe1c00 /* USB host non-OHCI registers */ ++ ++typedef struct PerfControl { ++ uint32 RevID; ++ uint16 testControl; ++ uint16 blkEnables; ++#define EMAC_CLK_EN 0x0010 ++#define SAR_CLK_EN 0x0020 ++#define USBS_CLK_EN 0x0040 ++#define USBH_CLK_EN 0x0100 ++ ++ uint32 pll_control; ++#define SOFT_RESET 0x00000001 ++ ++ uint32 IrqMask; ++ uint32 IrqStatus; ++ ++ uint32 ExtIrqCfg; ++#define EI_SENSE_SHFT 0 ++#define EI_STATUS_SHFT 5 ++#define EI_CLEAR_SHFT 10 ++#define EI_MASK_SHFT 15 ++#define EI_INSENS_SHFT 20 ++#define EI_LEVEL_SHFT 25 ++ ++ uint32 unused[4]; /* (18) */ ++ uint32 BlockSoftReset; /* (28) */ ++#define BSR_SPI 0x00000001 ++#define BSR_EMAC 0x00000004 ++#define BSR_USBH 0x00000008 ++#define BSR_USBS 0x00000010 ++#define BSR_ADSL 0x00000020 ++#define BSR_DMAMEM 0x00000040 ++#define BSR_SAR 0x00000080 ++#define BSR_ACLC 0x00000100 ++#define BSR_ADSL_MIPS_PLL 0x00000400 ++#define BSR_ALL_BLOCKS \ ++ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ ++ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) ++ uint32 unused2[2]; /* (2c) */ ++ uint32 PllStrap; /* (34) */ ++#define PLL_N1_SHFT 20 ++#define PLL_N1_MASK (7<<PLL_N1_SHFT) ++#define PLL_N2_SHFT 15 ++#define PLL_N2_MASK (0x1f<<PLL_N2_SHFT) ++#define PLL_M1_REF_SHFT 12 ++#define PLL_M1_REF_MASK (7<<PLL_M1_REF_SHFT) ++#define PLL_M2_REF_SHFT 9 ++#define PLL_M2_REF_MASK (7<<PLL_M2_REF_SHFT) ++#define PLL_M1_CPU_SHFT 6 ++#define PLL_M1_CPU_MASK (7<<PLL_M1_CPU_SHFT) ++#define PLL_M1_BUS_SHFT 3 ++#define PLL_M1_BUS_MASK (7<<PLL_M1_BUS_SHFT) ++#define PLL_M2_BUS_SHFT 0 ++#define PLL_M2_BUS_MASK (7<<PLL_M2_BUS_SHFT) ++} PerfControl; ++ ++#define PERF ((volatile PerfControl * const) PERF_BASE) ++ ++typedef struct Timer { ++ uint16 unused0; ++ byte TimerMask; ++#define TIMER0EN 0x01 ++#define TIMER1EN 0x02 ++#define TIMER2EN 0x04 ++ byte TimerInts; ++#define TIMER0 0x01 ++#define TIMER1 0x02 ++#define TIMER2 0x04 ++#define WATCHDOG 0x08 ++ uint32 TimerCtl0; ++ uint32 TimerCtl1; ++ uint32 TimerCtl2; ++#define TIMERENABLE 0x80000000 ++#define RSTCNTCLR 0x40000000 ++ uint32 TimerCnt0; ++ uint32 TimerCnt1; ++ uint32 TimerCnt2; ++ uint32 WatchDogDefCount; ++ ++ /* Write 0xff00 0x00ff to Start timer ++ * Write 0xee00 0x00ee to Stop and re-load default count ++ * Read from this register returns current watch dog count ++ */ ++ uint32 WatchDogCtl; ++ ++ /* Number of 40-MHz ticks for WD Reset pulse to last */ ++ uint32 WDResetCount; ++} Timer; ++ ++#define TIMER ((volatile Timer * const) TIMR_BASE) ++ ++typedef struct UartChannel { ++ byte unused0; ++ byte control; ++#define BRGEN 0x80 /* Control register bit defs */ ++#define TXEN 0x40 ++#define RXEN 0x20 ++#define LOOPBK 0x10 ++#define TXPARITYEN 0x08 ++#define TXPARITYEVEN 0x04 ++#define RXPARITYEN 0x02 ++#define RXPARITYEVEN 0x01 ++ ++ byte config; ++#define XMITBREAK 0x40 ++#define BITS5SYM 0x00 ++#define BITS6SYM 0x10 ++#define BITS7SYM 0x20 ++#define BITS8SYM 0x30 ++#define ONESTOP 0x07 ++#define TWOSTOP 0x0f ++ /* 4-LSBS represent STOP bits/char ++ * in 1/8 bit-time intervals. Zero ++ * represents 1/8 stop bit interval. ++ * Fifteen represents 2 stop bits. ++ */ ++ byte fifoctl; ++#define RSTTXFIFOS 0x80 ++#define RSTRXFIFOS 0x40 ++ /* 5-bit TimeoutCnt is in low bits of this register. ++ * This count represents the number of characters ++ * idle times before setting receive Irq when below threshold ++ */ ++ uint32 baudword; ++ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate ++ */ ++ ++ byte txf_levl; /* Read-only fifo depth */ ++ byte rxf_levl; /* Read-only fifo depth */ ++ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are ++ * RxThreshold. Irq can be asserted ++ * when rx fifo> thresh, txfifo<thresh ++ */ ++ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) ++ * if these bits are also enabled to GPIO_o ++ */ ++#define DTREN 0x01 ++#define RTSEN 0x02 ++ ++ byte unused1; ++ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to ++ * detect irq on rising AND falling ++ * edges for corresponding GPIO_i ++ * if enabled (edge insensitive) ++ */ ++ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense ++ * 0 for negedge sense if ++ * not configured for edge ++ * insensitive (see above) ++ * Lower 4 bits: Mask to enable change ++ * detection IRQ for corresponding ++ * GPIO_i ++ */ ++ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits ++ * have changed (may set IRQ). ++ * read automatically clears bit ++ * Lower 4 bits are actual status ++ */ ++ ++ uint16 intMask; /* Same Bit defs for Mask and status */ ++ uint16 intStatus; ++#define DELTAIP 0x0001 ++#define TXUNDERR 0x0002 ++#define TXOVFERR 0x0004 ++#define TXFIFOTHOLD 0x0008 ++#define TXREADLATCH 0x0010 ++#define TXFIFOEMT 0x0020 ++#define RXUNDERR 0x0040 ++#define RXOVFERR 0x0080 ++#define RXTIMEOUT 0x0100 ++#define RXFIFOFULL 0x0200 ++#define RXFIFOTHOLD 0x0400 ++#define RXFIFONE 0x0800 ++#define RXFRAMERR 0x1000 ++#define RXPARERR 0x2000 ++#define RXBRK 0x4000 ++ ++ uint16 unused2; ++ uint16 Data; /* Write to TX, Read from RX */ ++ /* bits 11:8 are BRK,PAR,FRM errors */ ++ ++ uint32 unused3; ++ uint32 unused4; ++} Uart; ++ ++#define UART ((volatile Uart * const) UART_BASE) ++ ++typedef struct GpioControl { ++ uint32 GPIODir_high; /* bits 36:32 */ ++ uint32 GPIODir; /* bits 31:00 */ ++ uint32 GPIOio_high; /* bits 36:32 */ ++ uint32 GPIOio; /* bits 31:00 */ ++ uint32 LEDCtrl; ++#define LED3_STROBE 0x08000000 ++#define LED2_STROBE 0x04000000 ++#define LED1_STROBE 0x02000000 ++#define LED0_STROBE 0x01000000 ++#define LED_TEST 0x00010000 ++#define LED3_DISABLE_LINK_ACT 0x00008000 ++#define LED2_DISABLE_LINK_ACT 0x00004000 ++#define LED1_DISABLE_LINK_ACT 0x00002000 ++#define LED0_DISABLE_LINK_ACT 0x00001000 ++#define LED_INTERVAL_SET_MASK 0x00000f00 ++#define LED_INTERVAL_SET_320MS 0x00000500 ++#define LED_INTERVAL_SET_160MS 0x00000400 ++#define LED_INTERVAL_SET_80MS 0x00000300 ++#define LED_INTERVAL_SET_40MS 0x00000200 ++#define LED_INTERVAL_SET_20MS 0x00000100 ++#define LED3_ON 0x00000080 ++#define LED2_ON 0x00000040 ++#define LED1_ON 0x00000020 ++#define LED0_ON 0x00000010 ++#define LED3_ENABLE 0x00000008 ++#define LED2_ENABLE 0x00000004 ++#define LED1_ENABLE 0x00000002 ++#define LED0_ENABLE 0x00000001 ++ uint32 SpiSlaveCfg; ++#define SPI_SLAVE_RESET 0x00010000 ++#define SPI_RESTRICT 0x00000400 ++#define SPI_DELAY_DISABLE 0x00000200 ++#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 ++#define SPI_SER_ADDR_CFG_MASK 0x0000000c ++#define SPI_MODE 0x00000001 ++ uint32 GPIOMode; ++#define GROUP4_DIAG 0x00090000 ++#define GROUP4_UTOPIA 0x00080000 ++#define GROUP4_LEGACY_LED 0x00030000 ++#define GROUP4_MII_SNOOP 0x00020000 ++#define GROUP4_EXT_EPHY 0x00010000 ++#define GROUP3_DIAG 0x00009000 ++#define GROUP3_UTOPIA 0x00008000 ++#define GROUP3_EXT_MII 0x00007000 ++#define GROUP2_DIAG 0x00000900 ++#define GROUP2_PCI 0x00000500 ++#define GROUP1_DIAG 0x00000090 ++#define GROUP1_UTOPIA 0x00000080 ++#define GROUP1_SPI_UART 0x00000060 ++#define GROUP1_SPI_MASTER 0x00000060 ++#define GROUP1_MII_PCCARD 0x00000040 ++#define GROUP1_MII_SNOOP 0x00000020 ++#define GROUP1_EXT_EPHY 0x00000010 ++#define GROUP0_DIAG 0x00000009 ++#define GROUP0_EXT_MII 0x00000007 ++ ++} GpioControl; ++ ++#define GPIO ((volatile GpioControl * const) GPIO_BASE) ++ ++/* Number to mask conversion macro used for GPIODir and GPIOio */ ++#define GPIO_NUM_TOTAL_BITS_MASK 0x3f ++#define GPIO_NUM_MAX_BITS_MASK 0x1f ++#define GPIO_NUM_TO_MASK(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) < 32) ? (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) : (0) ) ++ ++/* Number to mask conversion macro used for GPIODir_high and GPIOio_high */ ++#define GPIO_NUM_MAX_BITS_MASK_HIGH 0x07 ++#define GPIO_NUM_TO_MASK_HIGH(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) >= 32) ? (1 << ((X-32) & GPIO_NUM_MAX_BITS_MASK_HIGH)) : (0) ) ++ ++ ++/* ++** External Bus Interface ++*/ ++typedef struct EbiChipSelect { ++ uint32 base; /* base address in upper 24 bits */ ++#define EBI_SIZE_8K 0 ++#define EBI_SIZE_16K 1 ++#define EBI_SIZE_32K 2 ++#define EBI_SIZE_64K 3 ++#define EBI_SIZE_128K 4 ++#define EBI_SIZE_256K 5 ++#define EBI_SIZE_512K 6 ++#define EBI_SIZE_1M 7 ++#define EBI_SIZE_2M 8 ++#define EBI_SIZE_4M 9 ++#define EBI_SIZE_8M 10 ++#define EBI_SIZE_16M 11 ++#define EBI_SIZE_32M 12 ++#define EBI_SIZE_64M 13 ++#define EBI_SIZE_128M 14 ++#define EBI_SIZE_256M 15 ++ uint32 config; ++#define EBI_ENABLE 0x00000001 /* .. enable this range */ ++#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ ++#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ ++#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ ++#define EBI_WREN 0x00000020 /* enable posted writes */ ++#define EBI_POLARITY 0x00000040 /* .. set to invert something, ++ ** don't know what yet */ ++#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ ++#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ ++#define EBI_FIFO 0x00000200 /* .. use fifo */ ++#define EBI_RE 0x00000400 /* .. Reverse Endian */ ++} EbiChipSelect; ++ ++typedef struct MpiRegisters { ++ EbiChipSelect cs[7]; /* size chip select configuration */ ++#define EBI_CS0_BASE 0 ++#define EBI_CS1_BASE 1 ++#define EBI_CS2_BASE 2 ++#define EBI_CS3_BASE 3 ++#define PCMCIA_COMMON_BASE 4 ++#define PCMCIA_ATTRIBUTE_BASE 5 ++#define PCMCIA_IO_BASE 6 ++ uint32 unused0[2]; /* reserved */ ++ uint32 ebi_control; /* ebi control */ ++ uint32 unused1[4]; /* reserved */ ++#define EBI_ACCESS_TIMEOUT 0x000007FF ++ uint32 pcmcia_cntl1; /* pcmcia control 1 */ ++#define PCCARD_CARD_RESET 0x00040000 ++#define CARDBUS_ENABLE 0x00008000 ++#define PCMCIA_ENABLE 0x00004000 ++#define PCMCIA_GPIO_ENABLE 0x00002000 ++#define CARDBUS_IDSEL 0x00001F00 ++#define VS2_OEN 0x00000080 ++#define VS1_OEN 0x00000040 ++#define VS2_OUT 0x00000020 ++#define VS1_OUT 0x00000010 ++#define VS2_IN 0x00000008 ++#define VS1_IN 0x00000004 ++#define CD2_IN 0x00000002 ++#define CD1_IN 0x00000001 ++#define VS_MASK 0x0000000C ++#define CD_MASK 0x00000003 ++ uint32 unused2; /* reserved */ ++ uint32 pcmcia_cntl2; /* pcmcia control 2 */ ++#define PCMCIA_BYTESWAP_DIS 0x00000002 ++#define PCMCIA_HALFWORD_EN 0x00000001 ++#define RW_ACTIVE_CNT_BIT 2 ++#define INACTIVE_CNT_BIT 8 ++#define CE_SETUP_CNT_BIT 16 ++#define CE_HOLD_CNT_BIT 24 ++ uint32 unused3[40]; /* reserved */ ++ ++ uint32 sp0range; /* PCI to internal system bus address space */ ++ uint32 sp0remap; ++ uint32 sp0cfg; ++ uint32 sp1range; ++ uint32 sp1remap; ++ uint32 sp1cfg; ++ ++ uint32 EndianCfg; ++ ++ uint32 l2pcfgctl; /* internal system bus to PCI IO/Cfg control */ ++#define DIR_CFG_SEL 0x80000000 /* change from PCI I/O access to PCI config access */ ++#define DIR_CFG_USEREG 0x40000000 /* use this register info for PCI configuration access */ ++#define DEVICE_NUMBER 0x00007C00 /* device number for the PCI configuration access */ ++#define FUNC_NUMBER 0x00000300 /* function number for the PCI configuration access */ ++#define REG_NUMBER 0x000000FC /* register number for the PCI configuration access */ ++#define CONFIG_TYPE 0x00000003 /* configuration type for the PCI configuration access */ ++ ++ uint32 l2pmrange1; /* internal system bus to PCI memory space */ ++#define PCI_SIZE_64K 0xFFFF0000 ++#define PCI_SIZE_128K 0xFFFE0000 ++#define PCI_SIZE_256K 0xFFFC0000 ++#define PCI_SIZE_512K 0xFFF80000 ++#define PCI_SIZE_1M 0xFFF00000 ++#define PCI_SIZE_2M 0xFFE00000 ++#define PCI_SIZE_4M 0xFFC00000 ++#define PCI_SIZE_8M 0xFF800000 ++#define PCI_SIZE_16M 0xFF000000 ++#define PCI_SIZE_32M 0xFE000000 ++ uint32 l2pmbase1; /* kseg0 or kseg1 address & 0x1FFFFFFF */ ++ uint32 l2pmremap1; ++#define CARDBUS_MEM 0x00000004 ++#define MEM_WINDOW_EN 0x00000001 ++ uint32 l2pmrange2; ++ uint32 l2pmbase2; ++ uint32 l2pmremap2; ++ uint32 l2piorange; /* internal system bus to PCI I/O space */ ++ uint32 l2piobase; ++ uint32 l2pioremap; ++ ++ uint32 pcimodesel; ++#define PCI2_INT_BUS_RD_PREFECH 0x000000F0 ++#define PCI_BAR2_NOSWAP 0x00000002 /* BAR at offset 0x20 */ ++#define PCI_BAR1_NOSWAP 0x00000001 /* BAR at affset 0x1c */ ++ ++ uint32 pciintstat; /* PCI interrupt mask/status */ ++#define MAILBOX1_SENT 0x08 ++#define MAILBOX0_SENT 0x04 ++#define MAILBOX1_MSG_RCV 0x02 ++#define MAILBOX0_MSG_RCV 0x01 ++ uint32 locbuscntrl; /* internal system bus control */ ++#define DIR_U2P_NOSWAP 0x00000002 ++#define EN_PCI_GPIO 0x00000001 ++ uint32 locintstat; /* internal system bus interrupt mask/status */ ++#define CSERR 0x0200 ++#define SERR 0x0100 ++#define EXT_PCI_INT 0x0080 ++#define DIR_FAILED 0x0040 ++#define DIR_COMPLETE 0x0020 ++#define PCI_CFG 0x0010 ++ uint32 unused5[7]; ++ ++ uint32 mailbox0; ++ uint32 mailbox1; ++ ++ uint32 pcicfgcntrl; /* internal system bus PCI configuration control */ ++#define PCI_CFG_REG_WRITE_EN 0x00000080 ++#define PCI_CFG_ADDR 0x0000003C ++ uint32 pcicfgdata; /* internal system bus PCI configuration data */ ++ ++ uint32 locch2ctl; /* PCI to interrnal system bus DMA (downstream) local control */ ++#define MPI_DMA_HALT 0x00000008 /* idle after finish current memory burst */ ++#define MPI_DMA_PKT_HALT 0x00000004 /* idle after an EOP flag is detected */ ++#define MPI_DMA_STALL 0x00000002 /* idle after an EOP flag is detected */ ++#define MPI_DMA_ENABLE 0x00000001 /* set to enable channel */ ++ uint32 locch2intStat; ++#define MPI_DMA_NO_DESC 0x00000004 /* no valid descriptors */ ++#define MPI_DMA_DONE 0x00000002 /* packet xfer complete */ ++#define MPI_DMA_BUFF_DONE 0x00000001 /* buffer done */ ++ uint32 locch2intMask; ++ uint32 unused6; ++ uint32 locch2descaddr; ++ uint32 locch2status1; ++#define LOCAL_DESC_STATE 0xE0000000 ++#define PCI_DESC_STATE 0x1C000000 ++#define BYTE_DONE 0x03FFC000 ++#define RING_ADDR 0x00003FFF ++ uint32 locch2status2; ++#define BUFPTR_OFFSET 0x1FFF0000 ++#define PCI_MASTER_STATE 0x000000C0 ++#define LOC_MASTER_STATE 0x00000038 ++#define CONTROL_STATE 0x00000007 ++ uint32 unused7; ++ ++ uint32 locch1Ctl; /*internal system bus to PCI DMA (upstream) local control */ ++#define DMA_U2P_LE 0x00000200 /* local bus is little endian */ ++#define DMA_U2P_NOSWAP 0x00000100 /* lccal bus is little endian but no data swapped */ ++ uint32 locch1intstat; ++ uint32 locch1intmask; ++ uint32 unused8; ++ uint32 locch1descaddr; ++ uint32 locch1status1; ++ uint32 locch1status2; ++ uint32 unused9; ++ ++ uint32 pcich1ctl; /* internal system bus to PCI DMA PCI control */ ++ uint32 pcich1intstat; ++ uint32 pcich1intmask; ++ uint32 pcich1descaddr; ++ uint32 pcich1status1; ++ uint32 pcich1status2; ++ ++ uint32 pcich2Ctl; /* PCI to internal system bus DMA PCI control */ ++ uint32 pcich2intstat; ++ uint32 pcich2intmask; ++ uint32 pcich2descaddr; ++ uint32 pcich2status1; ++ uint32 pcich2status2; ++ ++ uint32 perm_id; /* permanent device and vendor id */ ++ uint32 perm_rev; /* permanent revision id */ ++} MpiRegisters; ++ ++#define MPI ((volatile MpiRegisters * const) MPI_BASE) ++ ++/* PCI configuration address space start offset 0x40 */ ++#define BRCM_PCI_CONFIG_TIMER 0x40 ++#define BRCM_PCI_CONFIG_TIMER_RETRY_MASK 0x0000FF00 ++#define BRCM_PCI_CONFIG_TIMER_TRDY_MASK 0x000000FF ++ ++/* USB host non-Open HCI register, USB_HOST_NON_OHCI, bit definitions. */ ++#define NON_OHCI_ENABLE_PORT1 0x00000001 /* Use USB port 1 for host, not dev */ ++#define NON_OHCI_BYTE_SWAP 0x00000008 /* Swap USB host registers */ ++ ++#define USBH_NON_OHCI ((volatile unsigned long * const) USB_HOST_NON_OHCI) ++ ++#endif ++ +diff -urN linux.old/arch/mips/bcm963xx/include/bcm_intr.h linux.dev/arch/mips/bcm963xx/include/bcm_intr.h +--- linux.old/arch/mips/bcm963xx/include/bcm_intr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/bcm_intr.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* ++<:copyright-gpl ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM_INTR_H ++#define __BCM_INTR_H ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_intr.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_intr.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_intr.h> ++#endif ++ ++/* defines */ ++struct pt_regs; ++typedef int (*FN_HANDLER) (int, void *, struct pt_regs *); ++ ++/* prototypes */ ++extern void enable_brcm_irq(unsigned int irq); ++extern void disable_brcm_irq(unsigned int irq); ++extern int request_external_irq(unsigned int irq, ++ FN_HANDLER handler, unsigned long irqflags, ++ const char * devname, void *dev_id); ++extern unsigned int BcmHalMapInterrupt(FN_HANDLER isr, unsigned int param, ++ unsigned int interruptId); ++extern void dump_intr_regs(void); ++ ++/* compatibility definitions */ ++#define BcmHalInterruptEnable(irq) enable_brcm_irq( irq ) ++#define BcmHalInterruptDisable(irq) disable_brcm_irq( irq ) ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#endif +diff -urN linux.old/arch/mips/bcm963xx/include/bcm_map_part.h linux.dev/arch/mips/bcm963xx/include/bcm_map_part.h +--- linux.old/arch/mips/bcm963xx/include/bcm_map_part.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/bcm_map_part.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,34 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++#ifndef __BCM_MAP_PART_H ++#define __BCM_MAP_PART_H ++ ++#if defined(CONFIG_BCM96338) ++#include <6338_map_part.h> ++#endif ++#if defined(CONFIG_BCM96345) ++#include <6345_map_part.h> ++#endif ++#if defined(CONFIG_BCM96348) ++#include <6348_map_part.h> ++#endif ++ ++#endif ++ +diff -urN linux.old/arch/mips/bcm963xx/include/bcmpci.h linux.dev/arch/mips/bcm963xx/include/bcmpci.h +--- linux.old/arch/mips/bcm963xx/include/bcmpci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/bcmpci.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,87 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++// ++// bcmpci.h - bcm96348 PCI, Cardbus, and PCMCIA definition ++// ++#ifndef BCMPCI_H ++#define BCMPCI_H ++ ++/* Memory window in internal system bus address space */ ++#define BCM_PCI_MEM_BASE 0x08000000 ++/* IO window in internal system bus address space */ ++#define BCM_PCI_IO_BASE 0x0C000000 ++ ++#define BCM_PCI_ADDR_MASK 0x1fffffff ++ ++/* Memory window size (range) */ ++#define BCM_PCI_MEM_SIZE_16MB 0x01000000 ++/* IO window size (range) */ ++#define BCM_PCI_IO_SIZE_64KB 0x00010000 ++ ++/* PCI Configuration and I/O space acesss */ ++#define BCM_PCI_CFG(d, f, o) ( (d << 11) | (f << 8) | (o/4 << 2) ) ++ ++/* fake USB PCI slot */ ++#define USB_HOST_SLOT 9 ++#define USB_BAR0_MEM_SIZE 0x0800 ++ ++#define BCM_HOST_MEM_SPACE1 0x10000000 ++#define BCM_HOST_MEM_SPACE2 0x00000000 ++ ++/* ++ * EBI bus clock is 33MHz and share with PCI bus ++ * each clock cycle is 30ns. ++ */ ++/* attribute memory access wait cnt for 4306 */ ++#define PCMCIA_ATTR_CE_HOLD 3 // data hold time 70ns ++#define PCMCIA_ATTR_CE_SETUP 3 // data setup time 50ns ++#define PCMCIA_ATTR_INACTIVE 6 // time between read/write cycles 180ns. For the total cycle time 600ns (cnt1+cnt2+cnt3+cnt4) ++#define PCMCIA_ATTR_ACTIVE 10 // OE/WE pulse width 300ns ++ ++/* common memory access wait cnt for 4306 */ ++#define PCMCIA_MEM_CE_HOLD 1 // data hold time 30ns ++#define PCMCIA_MEM_CE_SETUP 1 // data setup time 30ns ++#define PCMCIA_MEM_INACTIVE 2 // time between read/write cycles 40ns. For the total cycle time 250ns (cnt1+cnt2+cnt3+cnt4) ++#define PCMCIA_MEM_ACTIVE 5 // OE/WE pulse width 150ns ++ ++#define PCCARD_VCC_MASK 0x00070000 // Mask Reset also ++#define PCCARD_VCC_33V 0x00010000 ++#define PCCARD_VCC_50V 0x00020000 ++ ++typedef enum { ++ MPI_CARDTYPE_NONE, // No Card in slot ++ MPI_CARDTYPE_PCMCIA, // 16-bit PCMCIA card in slot ++ MPI_CARDTYPE_CARDBUS, // 32-bit CardBus card in slot ++} CardType; ++ ++#define CARDBUS_SLOT 0 // Slot 0 is default for CardBus ++ ++#define pcmciaAttrOffset 0x00200000 ++#define pcmciaMemOffset 0x00000000 ++// Needs to be right above PCI I/O space. Give 0x8000 (32K) to PCMCIA. ++#define pcmciaIoOffset (BCM_PCI_IO_BASE + 0x80000) ++// Base Address is that mapped into the MPI ChipSelect registers. ++// UBUS bridge MemoryWindow 0 outputs a 0x00 for the base. ++#define pcmciaBase 0xbf000000 ++#define pcmciaAttr (pcmciaAttrOffset | pcmciaBase) ++#define pcmciaMem (pcmciaMemOffset | pcmciaBase) ++#define pcmciaIo (pcmciaIoOffset | pcmciaBase) ++ ++#endif +diff -urN linux.old/arch/mips/bcm963xx/include/bcmTag.h linux.dev/arch/mips/bcm963xx/include/bcmTag.h +--- linux.old/arch/mips/bcm963xx/include/bcmTag.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/bcmTag.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,153 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++//************************************************************************************** ++// File Name : bcmTag.h ++// ++// Description: add tag with validation system to the firmware image file to be uploaded ++// via http ++// ++// Created : 02/28/2002 seanl ++//************************************************************************************** ++ ++#ifndef _BCMTAG_H_ ++#define _BCMTAG_H_ ++ ++ ++#define BCM_SIG_1 "Broadcom Corporation" ++#define BCM_SIG_2 "ver. 2.0" // was "firmware version 2.0" now it is split 6 char out for chip id. ++ ++#define BCM_TAG_VER "6" ++#define BCM_TAG_VER_LAST "26" ++ ++// file tag (head) structure all is in clear text except validationTokens (crc, md5, sha1, etc). Total: 128 unsigned chars ++#define TAG_LEN 256 ++#define TAG_VER_LEN 4 ++#define SIG_LEN 20 ++#define SIG_LEN_2 14 // Original second SIG = 20 is now devided into 14 for SIG_LEN_2 and 6 for CHIP_ID ++#define CHIP_ID_LEN 6 ++#define IMAGE_LEN 10 ++#define ADDRESS_LEN 12 ++#define FLAG_LEN 2 ++#define TOKEN_LEN 20 ++#define BOARD_ID_LEN 16 ++#define RESERVED_LEN (TAG_LEN - TAG_VER_LEN - SIG_LEN - SIG_LEN_2 - CHIP_ID_LEN - BOARD_ID_LEN - \ ++ (4*IMAGE_LEN) - (3*ADDRESS_LEN) - (3*FLAG_LEN) - (2*TOKEN_LEN)) ++ ++ ++// TAG for downloadable image (kernel plus file system) ++typedef struct _FILE_TAG ++{ ++ unsigned char tagVersion[TAG_VER_LEN]; // tag version. Will be 2 here. ++ unsigned char signiture_1[SIG_LEN]; // text line for company info ++ unsigned char signiture_2[SIG_LEN_2]; // additional info (can be version number) ++ unsigned char chipId[CHIP_ID_LEN]; // chip id ++ unsigned char boardId[BOARD_ID_LEN]; // board id ++ unsigned char bigEndian[FLAG_LEN]; // if = 1 - big, = 0 - little endia of the host ++ unsigned char totalImageLen[IMAGE_LEN]; // the sum of all the following length ++ unsigned char cfeAddress[ADDRESS_LEN]; // if non zero, cfe starting address ++ unsigned char cfeLen[IMAGE_LEN]; // if non zero, cfe size in clear ASCII text. ++ unsigned char rootfsAddress[ADDRESS_LEN]; // if non zero, filesystem starting address ++ unsigned char rootfsLen[IMAGE_LEN]; // if non zero, filesystem size in clear ASCII text. ++ unsigned char kernelAddress[ADDRESS_LEN]; // if non zero, kernel starting address ++ unsigned char kernelLen[IMAGE_LEN]; // if non zero, kernel size in clear ASCII text. ++ unsigned char dualImage[FLAG_LEN]; // if 1, dual image ++ unsigned char inactiveLen[FLAG_LEN]; // if 1, the image is INACTIVE; if 0, active ++ unsigned char reserved[RESERVED_LEN]; // reserved for later use ++ unsigned char imageValidationToken[TOKEN_LEN];// image validation token - can be crc, md5, sha; for ++ // now will be 4 unsigned char crc ++ unsigned char tagValidationToken[TOKEN_LEN]; // validation token for tag(from signiture_1 to end of // mageValidationToken) ++} FILE_TAG, *PFILE_TAG; ++ ++#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ ++#define CRC_LEN 4 ++ ++// only included if for bcmTag.exe program ++#ifdef BCMTAG_EXE_USE ++ ++static unsigned long Crc32_table[256] = { ++ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, ++ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, ++ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, ++ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, ++ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, ++ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, ++ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, ++ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, ++ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, ++ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, ++ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, ++ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, ++ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, ++ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, ++ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, ++ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, ++ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, ++ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, ++ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, ++ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, ++ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, ++ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, ++ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, ++ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, ++ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, ++ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, ++ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, ++ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, ++ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, ++ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, ++ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, ++ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, ++ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, ++ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, ++ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, ++ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, ++ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, ++ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, ++ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, ++ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, ++ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, ++ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, ++ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, ++ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, ++ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, ++ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, ++ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, ++ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, ++ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, ++ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, ++ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, ++ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, ++ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, ++ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, ++ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, ++ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, ++ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, ++ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, ++ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, ++ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, ++ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, ++ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, ++ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, ++ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D ++}; ++#endif // BCMTAG_USE ++ ++ ++#endif // _BCMTAG_H_ ++ +diff -urN linux.old/arch/mips/bcm963xx/include/bcmtypes.h linux.dev/arch/mips/bcm963xx/include/bcmtypes.h +--- linux.old/arch/mips/bcm963xx/include/bcmtypes.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/bcmtypes.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,163 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++// ++// bcmtypes.h - misc useful typedefs ++// ++#ifndef BCMTYPES_H ++#define BCMTYPES_H ++ ++// These are also defined in typedefs.h in the application area, so I need to ++// protect against re-definition. ++ ++#ifndef _TYPEDEFS_H_ ++typedef unsigned char uint8; ++typedef unsigned short uint16; ++typedef unsigned long uint32; ++typedef signed char int8; ++typedef signed short int16; ++typedef signed long int32; ++#if !defined(__cplusplus) ++typedef int bool; ++#endif ++#endif ++ ++typedef unsigned char byte; ++// typedef unsigned long sem_t; ++ ++typedef unsigned long HANDLE,*PULONG,DWORD,*PDWORD; ++typedef signed long LONG,*PLONG; ++ ++typedef unsigned int *PUINT; ++typedef signed int INT; ++ ++typedef unsigned short *PUSHORT; ++typedef signed short SHORT,*PSHORT; ++typedef unsigned short WORD,*PWORD; ++ ++typedef unsigned char *PUCHAR; ++typedef signed char *PCHAR; ++ ++typedef void *PVOID; ++ ++typedef unsigned char BOOLEAN, *PBOOL, *PBOOLEAN; ++ ++typedef unsigned char BYTE,*PBYTE; ++ ++//#ifndef __GNUC__ ++//The following has been defined in Vxworks internally: vxTypesOld.h ++//redefine under vxworks will cause error ++typedef signed int *PINT; ++ ++typedef signed char INT8; ++typedef signed short INT16; ++typedef signed long INT32; ++ ++typedef unsigned char UINT8; ++typedef unsigned short UINT16; ++typedef unsigned long UINT32; ++ ++typedef unsigned char UCHAR; ++typedef unsigned short USHORT; ++typedef unsigned int UINT; ++typedef unsigned long ULONG; ++ ++typedef void VOID; ++typedef unsigned char BOOL; ++ ++//#endif /* __GNUC__ */ ++ ++ ++// These are also defined in typedefs.h in the application area, so I need to ++// protect against re-definition. ++#ifndef TYPEDEFS_H ++ ++// Maximum and minimum values for a signed 16 bit integer. ++#define MAX_INT16 32767 ++#define MIN_INT16 -32768 ++ ++// Useful for true/false return values. This uses the ++// Taligent notation (k for constant). ++typedef enum ++{ ++ kFalse = 0, ++ kTrue = 1 ++} Bool; ++ ++#endif ++ ++/* macros to protect against unaligned accesses */ ++ ++#if 0 ++/* first arg is an address, second is a value */ ++#define PUT16( a, d ) { \ ++ *((byte *)a) = (byte)((d)>>8); \ ++ *(((byte *)a)+1) = (byte)(d); \ ++} ++ ++#define PUT32( a, d ) { \ ++ *((byte *)a) = (byte)((d)>>24); \ ++ *(((byte *)a)+1) = (byte)((d)>>16); \ ++ *(((byte *)a)+2) = (byte)((d)>>8); \ ++ *(((byte *)a)+3) = (byte)(d); \ ++} ++ ++/* first arg is an address, returns a value */ ++#define GET16( a ) ( \ ++ (*((byte *)a) << 8) | \ ++ (*(((byte *)a)+1)) \ ++) ++ ++#define GET32( a ) ( \ ++ (*((byte *)a) << 24) | \ ++ (*(((byte *)a)+1) << 16) | \ ++ (*(((byte *)a)+2) << 8) | \ ++ (*(((byte *)a)+3)) \ ++) ++#endif ++ ++#ifndef YES ++#define YES 1 ++#endif ++ ++#ifndef NO ++#define NO 0 ++#endif ++ ++#ifndef IN ++#define IN ++#endif ++ ++#ifndef OUT ++#define OUT ++#endif ++ ++#ifndef TRUE ++#define TRUE 1 ++#endif ++ ++#ifndef FALSE ++#define FALSE 0 ++#endif ++ ++#define READ32(addr) (*(volatile UINT32 *)((ULONG)&addr)) ++#define READ16(addr) (*(volatile UINT16 *)((ULONG)&addr)) ++#define READ8(addr) (*(volatile UINT8 *)((ULONG)&addr)) ++ ++#endif +diff -urN linux.old/arch/mips/bcm963xx/include/board.h linux.dev/arch/mips/bcm963xx/include/board.h +--- linux.old/arch/mips/bcm963xx/include/board.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/include/board.h 2006-08-25 01:52:34.000000000 +0200 +@@ -0,0 +1,373 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/***********************************************************************/ ++/* */ ++/* MODULE: board.h */ ++/* DATE: 97/02/18 */ ++/* PURPOSE: Board specific information. This module should include */ ++/* all base device addresses and board specific macros. */ ++/* */ ++/***********************************************************************/ ++#ifndef _BOARD_H ++#define _BOARD_H ++ ++/*****************************************************************************/ ++/* Misc board definitions */ ++/*****************************************************************************/ ++ ++#define DYING_GASP_API ++ ++/*****************************************************************************/ ++/* Physical Memory Map */ ++/*****************************************************************************/ ++ ++#define PHYS_DRAM_BASE 0x00000000 /* Dynamic RAM Base */ ++#define PHYS_FLASH_BASE 0x1FC00000 /* Flash Memory */ ++ ++/*****************************************************************************/ ++/* Note that the addresses above are physical addresses and that programs */ ++/* have to use converted addresses defined below: */ ++/*****************************************************************************/ ++#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ ++#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ ++#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ ++ ++/*****************************************************************************/ ++/* Select the PLL value to get the desired CPU clock frequency. */ ++/* */ ++/* */ ++/*****************************************************************************/ ++#define FPERIPH 50000000 ++ ++#define ONEK 1024 ++#define BLK64K (64*ONEK) ++#define FLASH45_BLKS_BOOT_ROM 1 ++#define FLASH45_LENGTH_BOOT_ROM (FLASH45_BLKS_BOOT_ROM * BLK64K) ++#define FLASH_RESERVED_AT_END (64*ONEK) /*reserved for PSI, scratch pad*/ ++ ++/*****************************************************************************/ ++/* Note that the addresses above are physical addresses and that programs */ ++/* have to use converted addresses defined below: */ ++/*****************************************************************************/ ++#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ ++#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ ++#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ ++ ++/*****************************************************************************/ ++/* Select the PLL value to get the desired CPU clock frequency. */ ++/* */ ++/* */ ++/*****************************************************************************/ ++#define FPERIPH 50000000 ++ ++#define SDRAM_TYPE_ADDRESS_OFFSET 16 ++#define NVRAM_DATA_OFFSET 0x0580 ++#define NVRAM_DATA_ID 0x0f1e2d3c ++#define BOARD_SDRAM_TYPE *(unsigned long *) \ ++ (FLASH_BASE + SDRAM_TYPE_ADDRESS_OFFSET) ++ ++#define ONEK 1024 ++#define BLK64K (64*ONEK) ++ ++// nvram and psi flash definitions for 45 ++#define FLASH45_LENGTH_NVRAM ONEK // 1k nvram ++#define NVRAM_PSI_DEFAULT 24 // default psi in K byes ++ ++/*****************************************************************************/ ++/* NVRAM Offset and definition */ ++/*****************************************************************************/ ++ ++#define NVRAM_VERSION_NUMBER 2 ++#define NVRAM_VERSION_NUMBER_ADDRESS 0 ++ ++#define NVRAM_BOOTLINE_LEN 256 ++#define NVRAM_BOARD_ID_STRING_LEN 16 ++#define NVRAM_MAC_ADDRESS_LEN 6 ++#define NVRAM_MAC_COUNT_MAX 32 ++ ++/*****************************************************************************/ ++/* Misc Offsets */ ++/*****************************************************************************/ ++ ++#define CFE_VERSION_OFFSET 0x0570 ++#define CFE_VERSION_MARK_SIZE 5 ++#define CFE_VERSION_SIZE 5 ++ ++typedef struct ++{ ++ unsigned long ulVersion; ++ char szBootline[NVRAM_BOOTLINE_LEN]; ++ char szBoardId[NVRAM_BOARD_ID_STRING_LEN]; ++ unsigned long ulReserved1[2]; ++ unsigned long ulNumMacAddrs; ++ unsigned char ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; ++ char chReserved[2]; ++ unsigned long ulCheckSum; ++} NVRAM_DATA, *PNVRAM_DATA; ++ ++ ++/*****************************************************************************/ ++/* board ioctl calls for flash, led and some other utilities */ ++/*****************************************************************************/ ++ ++ ++/* Defines. for board driver */ ++#define BOARD_IOCTL_MAGIC 'B' ++#define BOARD_DRV_MAJOR 206 ++ ++#define MAC_ADDRESS_ANY (unsigned long) -1 ++ ++#define BOARD_IOCTL_FLASH_INIT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 0, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_FLASH_WRITE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 1, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_FLASH_READ \ ++ _IOWR(BOARD_IOCTL_MAGIC, 2, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_NR_PAGES \ ++ _IOWR(BOARD_IOCTL_MAGIC, 3, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_DUMP_ADDR \ ++ _IOWR(BOARD_IOCTL_MAGIC, 4, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_MEMORY \ ++ _IOWR(BOARD_IOCTL_MAGIC, 5, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_MIPS_SOFT_RESET \ ++ _IOWR(BOARD_IOCTL_MAGIC, 6, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_LED_CTRL \ ++ _IOWR(BOARD_IOCTL_MAGIC, 7, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_ID \ ++ _IOWR(BOARD_IOCTL_MAGIC, 8, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 9, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_RELEASE_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 10, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_PSI_SIZE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 11, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_SDRAM_SIZE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 12, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_MONITOR_FD \ ++ _IOWR(BOARD_IOCTL_MAGIC, 13, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_WAKEUP_MONITOR_TASK \ ++ _IOWR(BOARD_IOCTL_MAGIC, 14, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_BOOTLINE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 15, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_BOOTLINE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 16, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_BASE_MAC_ADDRESS \ ++ _IOWR(BOARD_IOCTL_MAGIC, 17, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_CHIP_ID \ ++ _IOWR(BOARD_IOCTL_MAGIC, 18, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_NUM_ENET \ ++ _IOWR(BOARD_IOCTL_MAGIC, 19, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_CFE_VER \ ++ _IOWR(BOARD_IOCTL_MAGIC, 20, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_ENET_CFG \ ++ _IOWR(BOARD_IOCTL_MAGIC, 21, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_WLAN_ANT_INUSE \ ++ _IOWR(BOARD_IOCTL_MAGIC, 22, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 23, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_GET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 24, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_UNSET_TRIGGER_EVENT \ ++ _IOWR(BOARD_IOCTL_MAGIC, 25, BOARD_IOCTL_PARMS) ++ ++#define BOARD_IOCTL_SET_SES_LED \ ++ _IOWR(BOARD_IOCTL_MAGIC, 26, BOARD_IOCTL_PARMS) ++ ++//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 ++#define RESET_BUTTON_UP 1 ++#define RESET_BUTTON_PRESSDOWN 0 ++#define BOARD_IOCTL_GET_RESETHOLD \ ++ _IOWR(BOARD_IOCTL_MAGIC, 27, BOARD_IOCTL_PARMS) ++//>>JUNHON, 2004/09/15 ++ ++// for the action in BOARD_IOCTL_PARMS for flash operation ++typedef enum ++{ ++ PERSISTENT, ++ NVRAM, ++ BCM_IMAGE_CFE, ++ BCM_IMAGE_FS, ++ BCM_IMAGE_KERNEL, ++ BCM_IMAGE_WHOLE, ++ SCRATCH_PAD, ++ FLASH_SIZE, ++} BOARD_IOCTL_ACTION; ++ ++ ++typedef struct boardIoctParms ++{ ++ char *string; ++ char *buf; ++ int strLen; ++ int offset; ++ BOARD_IOCTL_ACTION action; /* flash read/write: nvram, persistent, bcm image */ ++ int result; ++} BOARD_IOCTL_PARMS; ++ ++ ++// LED defines ++typedef enum ++{ ++ kLedAdsl, ++ kLedWireless, ++ kLedUsb, ++ kLedHpna, ++ kLedWanData, ++ kLedPPP, ++ kLedVoip, ++ kLedSes, ++ kLedLan, ++ kLedSelfTest, ++ kLedEnd, // NOTE: Insert the new led name before this one. Alway stay at the end. ++} BOARD_LED_NAME; ++ ++typedef enum ++{ ++ kLedStateOff, /* turn led off */ ++ kLedStateOn, /* turn led on */ ++ kLedStateFail, /* turn led on red */ ++ kLedStateBlinkOnce, /* blink once, ~100ms and ignore the same call during the 100ms period */ ++ kLedStateSlowBlinkContinues, /* slow blink continues at ~600ms interval */ ++ kLedStateFastBlinkContinues, /* fast blink continues at ~200ms interval */ ++} BOARD_LED_STATE; ++ ++ ++// virtual and physical map pair defined in board.c ++typedef struct ledmappair ++{ ++ BOARD_LED_NAME ledName; // virtual led name ++ BOARD_LED_STATE ledInitState; // initial led state when the board boots. ++ unsigned short ledMask; // physical GPIO pin mask ++ unsigned short ledActiveLow; // reset bit to turn on LED ++ unsigned short ledMaskFail; // physical GPIO pin mask for state failure ++ unsigned short ledActiveLowFail;// reset bit to turn on LED ++} LED_MAP_PAIR, *PLED_MAP_PAIR; ++ ++typedef void (*HANDLE_LED_FUNC)(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState); ++ ++/* Flash storage address information that is determined by the flash driver. */ ++typedef struct flashaddrinfo ++{ ++ int flash_persistent_start_blk; ++ int flash_persistent_number_blk; ++ int flash_persistent_length; ++ unsigned long flash_persistent_blk_offset; ++ int flash_scratch_pad_start_blk; // start before psi (SP_BUF_LEN) ++ int flash_scratch_pad_number_blk; ++ int flash_scratch_pad_length; ++ unsigned long flash_scratch_pad_blk_offset; ++ int flash_nvram_start_blk; ++ int flash_nvram_number_blk; ++ int flash_nvram_length; ++ unsigned long flash_nvram_blk_offset; ++} FLASH_ADDR_INFO, *PFLASH_ADDR_INFO; ++ ++// scratch pad defines ++/* SP - Persisten Scratch Pad format: ++ sp header : 32 bytes ++ tokenId-1 : 8 bytes ++ tokenId-1 len : 4 bytes ++ tokenId-1 data ++ .... ++ tokenId-n : 8 bytes ++ tokenId-n len : 4 bytes ++ tokenId-n data ++*/ ++ ++#define MAGIC_NUM_LEN 8 ++#define MAGIC_NUMBER "gOGoBrCm" ++#define TOKEN_NAME_LEN 16 ++#define SP_VERSION 1 ++#define SP_MAX_LEN 8 * 1024 // 8k buf before psi ++#define SP_RESERVERD 16 ++ ++typedef struct _SP_HEADER ++{ ++ char SPMagicNum[MAGIC_NUM_LEN]; // 8 bytes of magic number ++ int SPVersion; // version number ++ int SPUsedLen; // used sp len ++ char SPReserved[SP_RESERVERD]; // reservied, total 32 bytes ++} SP_HEADER, *PSP_HEADER; ++ ++typedef struct _TOKEN_DEF ++{ ++ char tokenName[TOKEN_NAME_LEN]; ++ int tokenLen; ++} SP_TOKEN, *PSP_TOKEN; ++ ++ ++/*****************************************************************************/ ++/* Function Prototypes */ ++/*****************************************************************************/ ++#if !defined(__ASM_ASM_H) ++void dumpaddr( unsigned char *pAddr, int nLen ); ++ ++int kerSysNvRamGet(char *string, int strLen, int offset); ++int kerSysNvRamSet(char *string, int strLen, int offset); ++int kerSysPersistentGet(char *string, int strLen, int offset); ++int kerSysPersistentSet(char *string, int strLen, int offset); ++int kerSysScratchPadGet(char *tokName, char *tokBuf, int tokLen); ++int kerSysScratchPadSet(char *tokName, char *tokBuf, int tokLen); ++int kerSysBcmImageSet( int flash_start_addr, char *string, int size); ++int kerSysGetMacAddress( unsigned char *pucaAddr, unsigned long ulId ); ++int kerSysReleaseMacAddress( unsigned char *pucaAddr ); ++int kerSysGetSdramSize( void ); ++void kerSysGetBootline(char *string, int strLen); ++void kerSysSetBootline(char *string, int strLen); ++void kerSysMipsSoftReset(void); ++void kerSysLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); ++void kerSysLedRegisterHwHandler( BOARD_LED_NAME, HANDLE_LED_FUNC, int ); ++int kerSysFlashSizeGet(void); ++void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context); ++void kerSysDeregisterDyingGaspHandler(char *devname); ++void kerSysWakeupMonitorTask( void ); ++#endif ++ ++#define BOOT_CFE 0 ++#define BOOT_REDBOOT 1 ++ ++extern int boot_loader_type; ++ ++#endif /* _BOARD_H */ ++ +diff -urN linux.old/arch/mips/bcm963xx/int-handler.S linux.dev/arch/mips/bcm963xx/int-handler.S +--- linux.old/arch/mips/bcm963xx/int-handler.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/int-handler.S 2006-08-25 02:13:33.000000000 +0200 +@@ -0,0 +1,59 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Generic interrupt handler for Broadcom MIPS boards ++ */ ++ ++#include <linux/config.h> ++ ++#include <asm/asm.h> ++#include <asm/mipsregs.h> ++#include <asm/regdef.h> ++#include <asm/stackframe.h> ++ ++/* ++ * MIPS IRQ Source ++ * -------- ------ ++ * 0 Software (ignored) ++ * 1 Software (ignored) ++ * 2 Combined hardware interrupt (hw0) ++ * 3 Hardware ++ * 4 Hardware ++ * 5 Hardware ++ * 6 Hardware ++ * 7 R4k timer ++ */ ++ ++ .text ++ .set noreorder ++ .set noat ++ .align 5 ++ NESTED(brcmIRQ, PT_SIZE, sp) ++ SAVE_ALL ++ CLI ++ .set noreorder ++ .set at ++ ++ jal plat_irq_dispatch ++ move a0, sp ++ ++ j ret_from_irq ++ nop ++ ++ END(brcmIRQ) +diff -urN linux.old/arch/mips/bcm963xx/irq.c linux.dev/arch/mips/bcm963xx/irq.c +--- linux.old/arch/mips/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/irq.c 2006-08-25 03:54:34.000000000 +0200 +@@ -0,0 +1,256 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Interrupt control functions for Broadcom 963xx MIPS boards ++ */ ++ ++#include <asm/atomic.h> ++ ++#include <linux/delay.h> ++#include <linux/init.h> ++#include <linux/ioport.h> ++#include <linux/irq.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/slab.h> ++#include <linux/module.h> ++ ++#include <asm/irq.h> ++#include <asm/mipsregs.h> ++#include <asm/addrspace.h> ++#include <asm/signal.h> ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++static void irq_dispatch_int(struct pt_regs *regs) ++{ ++ unsigned int pendingIrqs; ++ static unsigned int irqBit; ++ static unsigned int isrNumber = 31; ++ ++ pendingIrqs = PERF->IrqStatus & PERF->IrqMask; ++ if (!pendingIrqs) { ++ return; ++ } ++ ++ while (1) { ++ irqBit <<= 1; ++ isrNumber++; ++ if (isrNumber == 32) { ++ isrNumber = 0; ++ irqBit = 0x1; ++ } ++ if (pendingIrqs & irqBit) { ++ PERF->IrqMask &= ~irqBit; // mask ++ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET, regs); ++ break; ++ } ++ } ++} ++ ++static void irq_dispatch_ext(uint32 irq, struct pt_regs *regs) ++{ ++ if (!(PERF->ExtIrqCfg & (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)))) { ++ printk("**** Ext IRQ mask. Should not dispatch ****\n"); ++ } ++ /* disable and clear interrupt in the controller */ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ do_IRQ(irq, regs); ++} ++ ++ ++extern void brcm_timer_interrupt(struct pt_regs *regs); ++ ++asmlinkage void plat_irq_dispatch(struct pt_regs *regs) ++{ ++ u32 cause; ++ while((cause = (read_c0_cause()& CAUSEF_IP))) { ++ if (cause & CAUSEF_IP7) ++ brcm_timer_interrupt(regs); ++ else if (cause & CAUSEF_IP2) ++ irq_dispatch_int(regs); ++ else if (cause & CAUSEF_IP3) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); ++ else if (cause & CAUSEF_IP4) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); ++ else if (cause & CAUSEF_IP5) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); ++ else if (cause & CAUSEF_IP6) ++ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); ++ local_irq_disable(); ++ } ++} ++ ++ ++void enable_brcm_irq(unsigned int irq) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { ++ PERF->IrqMask |= (1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); ++ } ++ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { ++ /* enable and clear interrupt in the controller */ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ } ++ local_irq_restore(flags); ++} ++ ++void disable_brcm_irq(unsigned int irq) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { ++ PERF->IrqMask &= ~(1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); ++ } ++ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { ++ /* disable interrupt in the controller */ ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); ++ } ++ local_irq_restore(flags); ++} ++ ++void ack_brcm_irq(unsigned int irq) ++{ ++ /* Already done in brcm_irq_dispatch */ ++} ++ ++unsigned int startup_brcm_irq(unsigned int irq) ++{ ++ enable_brcm_irq(irq); ++ ++ return 0; /* never anything pending */ ++} ++ ++unsigned int startup_brcm_none(unsigned int irq) ++{ ++ return 0; ++} ++ ++void end_brcm_irq(unsigned int irq) ++{ ++ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) ++ enable_brcm_irq(irq); ++} ++ ++void end_brcm_none(unsigned int irq) ++{ ++} ++ ++static struct hw_interrupt_type brcm_irq_type = { ++ .typename = "MIPS", ++ .startup = startup_brcm_irq, ++ .shutdown = disable_brcm_irq, ++ .enable = enable_brcm_irq, ++ .disable = disable_brcm_irq, ++ .ack = ack_brcm_irq, ++ .end = end_brcm_irq, ++ .set_affinity = NULL ++}; ++ ++static struct hw_interrupt_type brcm_irq_no_end_type = { ++ .typename = "MIPS", ++ .startup = startup_brcm_none, ++ .shutdown = disable_brcm_irq, ++ .enable = enable_brcm_irq, ++ .disable = disable_brcm_irq, ++ .ack = ack_brcm_irq, ++ .end = end_brcm_none, ++ .set_affinity = NULL ++}; ++ ++void __init arch_init_irq(void) ++{ ++ int i; ++ ++ clear_c0_status(ST0_BEV); ++ change_c0_status(ST0_IM, (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4)); ++ ++ for (i = 0; i < NR_IRQS; i++) { ++ irq_desc[i].status = IRQ_DISABLED; ++ irq_desc[i].action = 0; ++ irq_desc[i].depth = 1; ++ irq_desc[i].handler = &brcm_irq_type; ++ } ++} ++ ++int request_external_irq(unsigned int irq, ++ FN_HANDLER handler, ++ unsigned long irqflags, ++ const char * devname, ++ void *dev_id) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); // Clear ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); // Mask ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_INSENS_SHFT)); // Edge insesnsitive ++ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_LEVEL_SHFT)); // Level triggered ++ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_SENSE_SHFT)); // Low level ++ ++ local_irq_restore(flags); ++ ++ return( request_irq(irq, handler, irqflags, devname, dev_id) ); ++} ++ ++/* VxWorks compatibility function(s). */ ++ ++unsigned int BcmHalMapInterrupt(FN_HANDLER pfunc, unsigned int param, ++ unsigned int interruptId) ++{ ++ int nRet = -1; ++ char *devname; ++ ++ devname = kmalloc(16, GFP_KERNEL); ++ if (devname) ++ sprintf( devname, "brcm_%d", interruptId ); ++ ++ /* Set the IRQ description to not automatically enable the interrupt at ++ * the end of an ISR. The driver that handles the interrupt must ++ * explicitly call BcmHalInterruptEnable or enable_brcm_irq. This behavior ++ * is consistent with interrupt handling on VxWorks. ++ */ ++ irq_desc[interruptId].handler = &brcm_irq_no_end_type; ++ ++ if( interruptId >= INTERNAL_ISR_TABLE_OFFSET ) ++ { ++ nRet = request_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, ++ devname, (void *) param ); ++ } ++ else if (interruptId >= INTERRUPT_ID_EXTERNAL_0 && interruptId <= INTERRUPT_ID_EXTERNAL_3) ++ { ++ nRet = request_external_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, ++ devname, (void *) param ); ++ } ++ ++ return( nRet ); ++} ++ ++ ++EXPORT_SYMBOL(enable_brcm_irq); ++EXPORT_SYMBOL(disable_brcm_irq); ++EXPORT_SYMBOL(request_external_irq); ++EXPORT_SYMBOL(BcmHalMapInterrupt); ++ +diff -urN linux.old/arch/mips/bcm963xx/Kconfig linux.dev/arch/mips/bcm963xx/Kconfig +--- linux.old/arch/mips/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/Kconfig 2006-08-25 01:22:39.000000000 +0200 +@@ -0,0 +1,138 @@ ++# Kernel and Driver configuration for Broadcom Commengine ADSL board ++choice ++ prompt "Broadcom Commengine ADSL board" ++ depends on MIPS_BRCM ++ default BCM96345 ++ help ++ Select different Broadcom ADSL board ++ ++config BCM96338 ++ bool "96338 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++config BCM96345 ++ bool "96345 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++config BCM96348 ++ bool "96348 ADSL board" ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ ++endchoice ++ ++config BCM_BOARD ++ bool "Support for Broadcom Board" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SERIAL ++ bool "Support for Serial Port" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENET ++ tristate "Support for Ethernet" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_USB ++ tristate "Support for USB" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_WLAN ++ tristate "Support for Wireless" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PCI ++ bool "Support for PCI" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ select PCI ++ ++config BCM_ATMAPI ++ tristate "Support for ATM" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMTEST ++ tristate "Support for ATM Diagnostic" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ADSL ++ tristate "Support for ADSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENDPOINT ++ tristate "Support for VOICE" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PROCFS ++ tristate "Support for PROCFS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_VDSL ++ tristate "Support for VDSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SECURITY ++ tristate "Support for SECURITY" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_HPNA ++ tristate "Support for HPNA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_BOARD_IMPL ++ int "Implementation index for ADSL Board" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SERIAL_IMPL ++ int "Implementation index for Serial" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENET_IMPL ++ int "Implementation index for Ethernet" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_USB_IMPL ++ int "Implementation index for USB" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_WLAN_IMPL ++ int "Implementation index for WIRELESS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMAPI_IMPL ++ int "Implementation index for ATM" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ATMTEST_IMPL ++ int "Implementation index for ATM Diagnostic" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_BLAA_IMPL ++ int "Implementation index for BLAA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ADSL_IMPL ++ int "Implementation index for ADSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_ENDPOINT_IMPL ++ int "Implementation index for VOICE" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_PROCFS_IMPL ++ int "Implementation index for PROCFS" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_VDSL_IMPL ++ int "Implementation index for VDSL" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_SECURITY_IMPL ++ int "Implementation index for SECURITY" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ ++config BCM_HPNA_IMPL ++ int "Implementation index for HPNA" ++ depends on BCM96338 || BCM96345 || BCM96348 ++ +diff -urN linux.old/arch/mips/bcm963xx/Makefile linux.dev/arch/mips/bcm963xx/Makefile +--- linux.old/arch/mips/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/Makefile 2006-08-25 02:04:27.000000000 +0200 +@@ -0,0 +1,23 @@ ++# ++# Makefile for generic Broadcom MIPS boards ++# ++# Copyright (C) 2004 Broadcom Corporation ++# ++obj-y := irq.o prom.o setup.o time.o ser_init.o bcm63xx_led.o board.o boardparms.o int-handler.o ++ ++SRCBASE := $(TOPDIR) ++EXTRA_CFLAGS += -I$(SRCBASE)/include ++#EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -DDBG ++EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) ++ ++ ++ifeq "$(ADSL)" "ANNEX_B" ++EXTRA_CFLAGS += -DADSL_ANNEXB ++endif ++ifeq "$(ADSL)" "SADSL" ++EXTRA_CFLAGS += -DADSL_SADSL ++endif ++ifeq "$(ADSL)" "ANNEX_C" ++EXTRA_CFLAGS += -DADSL_ANNEXC ++endif ++ +diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom.c +--- linux.old/arch/mips/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/prom.c 2006-08-25 01:49:57.000000000 +0200 +@@ -0,0 +1,128 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * prom.c: PROM library initialization code. ++ * ++ */ ++#include <linux/init.h> ++#include <linux/mm.h> ++#include <linux/sched.h> ++#include <linux/bootmem.h> ++#include <linux/blkdev.h> ++#include <asm/addrspace.h> ++#include <asm/bootinfo.h> ++#include <asm/cpu.h> ++#include <asm/time.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++#include "boardparms.h" ++#include "softdsl/AdslCoreDefs.h" ++ ++ ++//char arcs_cmdline[CL_SIZE] __initdata = {0}; ++/* inv_xde */ ++int boot_loader_type; ++ ++extern int do_syslog(int, char *, int); ++extern void serial_init(void); ++extern void __init InitNvramInfo( void ); ++extern void kerSysFlashInit( void ); ++extern unsigned long get_nvram_start_addr(void); ++void __init create_root_nfs_cmdline( char *cmdline ); ++ ++#define MACH_BCM MACH_BCM96348 ++ ++const char *get_system_type(void) ++{ ++ /*PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); ++ ++ return( pNvramData->szBoardId );*/ ++ return "brcm63xx"; ++} ++ ++unsigned long getMemorySize(void) ++{ ++ unsigned long ulSdramType = BOARD_SDRAM_TYPE; ++ ++ unsigned long ulSdramSize; ++ ++ switch( ulSdramType ) ++ { ++ case BP_MEMORY_16MB_1_CHIP: ++ case BP_MEMORY_16MB_2_CHIP: ++ ulSdramSize = 16 * 1024 * 1024; ++ break; ++ case BP_MEMORY_32MB_1_CHIP: ++ case BP_MEMORY_32MB_2_CHIP: ++ ulSdramSize = 32 * 1024 * 1024; ++ break; ++ case BP_MEMORY_64MB_2_CHIP: ++ ulSdramSize = 64 * 1024 * 1024; ++ break; ++ default: ++ ulSdramSize = 8 * 1024 * 1024; ++ break; ++ } ++ if (boot_loader_type == BOOT_CFE) ++ return ulSdramSize; ++ else ++ // assume that there is one contiguous memory map ++ return boot_mem_map.map[0].size; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: prom_init ++ -------------------------------------------------------------------------- */ ++void __init prom_init(void) ++{ ++ extern ulong r4k_interval; ++ ++ serial_init(); ++ ++ /* Need to fixup boot loader detection code ++ * whithout changing prom_init prototype ++ */ ++ ++ do_syslog(8, NULL, 8); ++ ++ printk( "%s prom init\n", get_system_type() ); ++ ++ PERF->IrqMask = 0; ++ ++ arcs_cmdline[0] = '\0'; ++ ++ if (boot_loader_type == BOOT_CFE) ++ add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); ++ else ++ add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); ++ ++ mips_machgroup = MACH_GROUP_BRCM; ++ mips_machtype = MACH_BCM; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: prom_free_prom_memory ++Abstract: ++ -------------------------------------------------------------------------- */ ++void __init prom_free_prom_memory(void) ++{ ++ ++} ++ +diff -urN linux.old/arch/mips/bcm963xx/ser_init.c linux.dev/arch/mips/bcm963xx/ser_init.c +--- linux.old/arch/mips/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/ser_init.c 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,180 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Broadcom bcm63xx serial port initialization, also prepare for printk ++ * by registering with console_init ++ * ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/console.h> ++#include <linux/sched.h> ++ ++#include <asm/addrspace.h> ++#include <asm/irq.h> ++#include <asm/reboot.h> ++#include <asm/gdb-stub.h> ++#include <asm/mc146818rtc.h> ++ ++#include <bcm_map_part.h> ++#include <board.h> ++ ++#define SER63XX_DEFAULT_BAUD 115200 ++#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) ++#define stUart ((volatile Uart * const) UART_BASE) ++ ++// Transmit interrupts ++#define TXINT (TXFIFOEMT | TXUNDERR | TXOVFERR) ++// Receive interrupts ++#define RXINT (RXFIFONE | RXOVFERR) ++ ++/* -------------------------------------------------------------------------- ++ Name: serial_init ++ Purpose: Initalize the UART ++-------------------------------------------------------------------------- */ ++void __init serial_init(void) ++{ ++ UINT32 tmpVal = SER63XX_DEFAULT_BAUD; ++ ULONG clockFreqHz; ++ ++#if defined(CONFIG_BCM96345) ++ // Make sure clock is ticking ++ PERF->blkEnables |= UART_CLK_EN; ++#endif ++ ++ /* Dissable channel's receiver and transmitter. */ ++ stUart->control &= ~(BRGEN|TXEN|RXEN); ++ ++ /*--------------------------------------------------------------------*/ ++ /* Write the table value to the clock select register. */ ++ /* DPullen - this is the equation to use: */ ++ /* value = clockFreqHz / baud / 32-1; */ ++ /* (snmod) Actually you should also take into account any necessary */ ++ /* rounding. Divide by 16, look at lsb, if 0, divide by 2 */ ++ /* and subtract 1. If 1, just divide by 2 */ ++ /*--------------------------------------------------------------------*/ ++ clockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; ++ tmpVal = (clockFreqHz / tmpVal) / 16; ++ if( tmpVal & 0x01 ) ++ tmpVal /= 2; //Rounding up, so sub is already accounted for ++ else ++ tmpVal = (tmpVal / 2) - 1; // Rounding down so we must sub 1 ++ stUart->baudword = tmpVal; ++ ++ /* Finally, re-enable the transmitter and receiver. */ ++ stUart->control |= (BRGEN|TXEN|RXEN); ++ ++ stUart->config = (BITS8SYM | ONESTOP); ++ // Set the FIFO interrupt depth ... stUart->fifocfg = 0xAA; ++ stUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; ++ stUart->intMask = 0; ++ stUart->intMask = RXINT | TXINT; ++} ++ ++ ++/* prom_putc() ++ * Output a character to the UART ++ */ ++void prom_putc(char c) ++{ ++ /* Wait for Tx uffer to empty */ ++ while (! (READ16(stUart->intStatus) & TXFIFOEMT)); ++ /* Send character */ ++ stUart->Data = c; ++} ++ ++/* prom_puts() ++ * Write a string to the UART ++ */ ++void prom_puts(const char *s) ++{ ++ while (*s) { ++ if (*s == '\n') { ++ prom_putc('\r'); ++ } ++ prom_putc(*s++); ++ } ++} ++ ++ ++/* prom_getc_nowait() ++ * Returns a character from the UART ++ * Returns -1 if no characters available or corrupted ++ */ ++int prom_getc_nowait(void) ++{ ++ uint16 uStatus; ++ int cData = -1; ++ ++ uStatus = READ16(stUart->intStatus); ++ ++ if (uStatus & RXFIFONE) { /* Do we have a character? */ ++ cData = READ16(stUart->Data) & 0xff; /* Read character */ ++ if (uStatus & (RXFRAMERR | RXPARERR)) { /* If we got an error, throw it away */ ++ cData = -1; ++ } ++ } ++ ++ return cData; ++} ++ ++/* prom_getc() ++ * Returns a charcter from the serial port ++ * Will block until it receives a valid character ++*/ ++char prom_getc(void) ++{ ++ int cData = -1; ++ ++ /* Loop until we get a valid character */ ++ while(cData == -1) { ++ cData = prom_getc_nowait(); ++ } ++ return (char) cData; ++} ++ ++/* prom_testc() ++ * Returns 0 if no characters available ++ */ ++int prom_testc(void) ++{ ++ uint16 uStatus; ++ ++ uStatus = READ16(stUart->intStatus); ++ ++ return (uStatus & RXFIFONE); ++} ++ ++#if defined (CONFIG_REMOTE_DEBUG) ++/* Prevent other code from writing to the serial port */ ++void _putc(char c) { } ++void _puts(const char *ptr) { } ++#else ++/* Low level outputs call prom routines */ ++void _putc(char c) { ++ prom_putc(c); ++} ++void _puts(const char *ptr) { ++ prom_puts(ptr); ++} ++#endif +diff -urN linux.old/arch/mips/bcm963xx/setup.c linux.dev/arch/mips/bcm963xx/setup.c +--- linux.old/arch/mips/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/setup.c 2006-08-25 02:26:58.000000000 +0200 +@@ -0,0 +1,525 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Generic setup routines for Broadcom 963xx MIPS boards ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/kdev_t.h> ++#include <linux/types.h> ++#include <linux/console.h> ++#include <linux/sched.h> ++#include <linux/mm.h> ++#include <linux/slab.h> ++#include <linux/module.h> ++#include <linux/pm.h> ++ ++#include <asm/addrspace.h> ++#include <asm/bcache.h> ++#include <asm/irq.h> ++#include <asm/time.h> ++#include <asm/reboot.h> ++#include <asm/gdb-stub.h> ++ ++extern void brcm_time_init(void); ++extern void brcm_timer_setup(struct irqaction *irq); ++extern unsigned long getMemorySize(void); ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++#include <linux/pci.h> ++#include <linux/delay.h> ++#include <bcm_map_part.h> ++#include <bcmpci.h> ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++#endif ++ ++/* This function should be in a board specific directory. For now, ++ * assume that all boards that include this file use a Broadcom chip ++ * with a soft reset bit in the PLL control register. ++ */ ++static void brcm_machine_restart(char *command) ++{ ++ const unsigned long ulSoftReset = 0x00000001; ++ unsigned long *pulPllCtrl = (unsigned long *) 0xfffe0008; ++ *pulPllCtrl |= ulSoftReset; ++} ++ ++static void brcm_machine_halt(void) ++{ ++ printk("System halted\n"); ++ while (1); ++} ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++ ++static void mpi_SetLocalPciConfigReg(uint32 reg, uint32 value) ++{ ++ /* write index then value */ ++ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; ++ mpi->pcicfgdata = value; ++} ++ ++static uint32 mpi_GetLocalPciConfigReg(uint32 reg) ++{ ++ /* write index then get value */ ++ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; ++ return mpi->pcicfgdata; ++} ++ ++/* ++ * mpi_ResetPcCard: Set/Reset the PcCard ++ */ ++static void mpi_ResetPcCard(int cardtype, BOOL bReset) ++{ ++ if (cardtype == MPI_CARDTYPE_NONE) { ++ return; ++ } ++ ++ if (cardtype == MPI_CARDTYPE_CARDBUS) { ++ bReset = ! bReset; ++ } ++ ++ if (bReset) { ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); ++ } else { ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 | PCCARD_CARD_RESET); ++ } ++} ++ ++/* ++ * mpi_ConfigCs: Configure an MPI/EBI chip select ++ */ ++static void mpi_ConfigCs(uint32 cs, uint32 base, uint32 size, uint32 flags) ++{ ++ mpi->cs[cs].base = ((base & 0x1FFFFFFF) | size); ++ mpi->cs[cs].config = flags; ++} ++ ++/* ++ * mpi_InitPcmciaSpace ++ */ ++static void mpi_InitPcmciaSpace(void) ++{ ++ // ChipSelect 4 controls PCMCIA Memory accesses ++ mpi_ConfigCs(PCMCIA_COMMON_BASE, pcmciaMem, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); ++ // ChipSelect 5 controls PCMCIA Attribute accesses ++ mpi_ConfigCs(PCMCIA_ATTRIBUTE_BASE, pcmciaAttr, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); ++ // ChipSelect 6 controls PCMCIA I/O accesses ++ mpi_ConfigCs(PCMCIA_IO_BASE, pcmciaIo, EBI_SIZE_64K, (EBI_WORD_WIDE|EBI_ENABLE)); ++ ++ mpi->pcmcia_cntl2 = ((PCMCIA_ATTR_ACTIVE << RW_ACTIVE_CNT_BIT) | ++ (PCMCIA_ATTR_INACTIVE << INACTIVE_CNT_BIT) | ++ (PCMCIA_ATTR_CE_SETUP << CE_SETUP_CNT_BIT) | ++ (PCMCIA_ATTR_CE_HOLD << CE_HOLD_CNT_BIT)); ++ ++ mpi->pcmcia_cntl2 |= (PCMCIA_HALFWORD_EN | PCMCIA_BYTESWAP_DIS); ++} ++ ++/* ++ * cardtype_vcc_detect: PC Card's card detect and voltage sense connection ++ * ++ * CD1#/ CD2#/ VS1#/ VS2#/ Card Initial Vcc ++ * CCD1# CCD2# CVS1 CVS2 Type ++ * ++ * GND GND open open 16-bit 5 vdc ++ * ++ * GND GND GND open 16-bit 3.3 vdc ++ * ++ * GND GND open GND 16-bit x.x vdc ++ * ++ * GND GND GND GND 16-bit 3.3 & x.x vdc ++ * ++ *==================================================================== ++ * ++ * CVS1 GND CCD1# open CardBus 3.3 vdc ++ * ++ * GND CVS2 open CCD2# CardBus x.x vdc ++ * ++ * GND CVS1 CCD2# open CardBus y.y vdc ++ * ++ * GND CVS2 GND CCD2# CardBus 3.3 & x.x vdc ++ * ++ * CVS2 GND open CCD1# CardBus x.x & y.y vdc ++ * ++ * GND CVS1 CCD2# open CardBus 3.3, x.x & y.y vdc ++ * ++ */ ++static int cardtype_vcc_detect(void) ++{ ++ uint32 data32; ++ int cardtype; ++ ++ cardtype = MPI_CARDTYPE_NONE; ++ mpi->pcmcia_cntl1 = 0x0000A000; // Turn on the output enables and drive ++ // the CVS pins to 0. ++ data32 = mpi->pcmcia_cntl1; ++ switch (data32 & 0x00000003) // Test CD1# and CD2#, see if card is plugged in. ++ { ++ case 0x00000003: // No Card is in the slot. ++ printk("mpi: No Card is in the PCMCIA slot\n"); ++ break; ++ ++ case 0x00000002: // Partial insertion, No CD2#. ++ printk("mpi: Card in the PCMCIA slot partial insertion, no CD2 signal\n"); ++ break; ++ ++ case 0x00000001: // Partial insertion, No CD1#. ++ printk("mpi: Card in the PCMCIA slot partial insertion, no CD1 signal\n"); ++ break; ++ ++ case 0x00000000: ++ mpi->pcmcia_cntl1 = 0x0000A0C0; // Turn off the CVS output enables and ++ // float the CVS pins. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ // Read the Register. ++ switch (data32 & 0x0000000C) // See what is on the CVS pins. ++ { ++ case 0x00000000: // CVS1 and CVS2 are tied to ground, only 1 option. ++ printk("mpi: Detected 3.3 & x.x 16-bit PCMCIA card\n"); ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ break; ++ ++ case 0x00000004: // CVS1 is open or tied to CCD1/CCD2 and CVS2 is tied to ground. ++ // 2 valid voltage options. ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ mpi->pcmcia_cntl1 = 0x0000A080; // Drive CVS1 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS2, not valid. ++ printk("mpi: Unknown card plugged into slot\n"); ++ } else { // CCD2 is tied to CVS1. ++ printk("mpi: Detected 3.3, x.x and y.y Cardbus card\n"); ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ } ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ printk("mpi: Detected x.x vdc 16-bit PCMCIA card\n"); ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ break; ++ } ++ break; ++ ++ case 0x00000008: // CVS2 is open or tied to CCD1/CCD2 and CVS1 is tied to ground. ++ // 2 valid voltage options. ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS1, not valid. ++ printk("mpi: Unknown card plugged into slot\n"); ++ } else {// CCD2 is tied to CVS2. ++ printk("mpi: Detected 3.3 and x.x Cardbus card\n"); ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ } ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ printk("mpi: Detected 3.3 vdc 16-bit PCMCIA card\n"); ++ break; ++ } ++ break; ++ ++ case 0x0000000C: // CVS1 and CVS2 are open or tied to CCD1/CCD2. ++ // 5 valid voltage options. ++ ++ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. ++ { ++ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. ++ // This is not a valid combination. ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. ++ // CCD1 is tied to ground. ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000002) { // CCD2 is tied to CVS1. ++ printk("mpi: Detected y.y vdc Cardbus card\n"); ++ } else { // CCD2 is tied to CVS2. ++ printk("mpi: Detected x.x vdc Cardbus card\n"); ++ } ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ break; ++ ++ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. ++ // CCD2 is tied to ground. ++ ++ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. ++ mdelay(1); ++ data32 = mpi->pcmcia_cntl1; ++ if (data32 & 0x00000001) {// CCD1 is tied to CVS1. ++ printk("mpi: Detected 3.3 vdc Cardbus card\n"); ++ } else { // CCD1 is tied to CVS2. ++ printk("mpi: Detected x.x and y.y Cardbus card\n"); ++ } ++ cardtype = MPI_CARDTYPE_CARDBUS; ++ break; ++ ++ case 0x00000000: // CCD1 and CCD2 are tied to ground. ++ cardtype = MPI_CARDTYPE_PCMCIA; ++ printk("mpi: Detected 5 vdc 16-bit PCMCIA card\n"); ++ break; ++ } ++ break; ++ ++ default: ++ printk("mpi: Unknown card plugged into slot\n"); ++ break; ++ ++ } ++ } ++ return cardtype; ++} ++ ++/* ++ * mpi_DetectPcCard: Detect the plugged in PC-Card ++ * Return: < 0 => Unknown card detected ++ * 0 => No card detected ++ * 1 => 16-bit card detected ++ * 2 => 32-bit CardBus card detected ++ */ ++static int mpi_DetectPcCard(void) ++{ ++ int cardtype; ++ ++ cardtype = cardtype_vcc_detect(); ++ switch(cardtype) { ++ case MPI_CARDTYPE_PCMCIA: ++ mpi->pcmcia_cntl1 &= ~0x0000e000; // disable enable bits ++ //mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); ++ mpi->pcmcia_cntl1 |= (PCMCIA_ENABLE | PCMCIA_GPIO_ENABLE); ++ mpi_InitPcmciaSpace(); ++ mpi_ResetPcCard(cardtype, FALSE); ++ // Hold card in reset for 10ms ++ mdelay(10); ++ mpi_ResetPcCard(cardtype, TRUE); ++ // Let card come out of reset ++ mdelay(100); ++ break; ++ case MPI_CARDTYPE_CARDBUS: ++ // 8 => CardBus Enable ++ // 1 => PCI Slot Number ++ // C => Float VS1 & VS2 ++ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & 0xFFFF0000) | ++ CARDBUS_ENABLE | ++ (CARDBUS_SLOT << 8)| ++ VS2_OEN | ++ VS1_OEN; ++ /* access to this memory window will be to/from CardBus */ ++ mpi->l2pmremap1 |= CARDBUS_MEM; ++ ++ // Need to reset the Cardbus Card. There's no CardManager to do this, ++ // and we need to be ready for PCI configuration. ++ mpi_ResetPcCard(cardtype, FALSE); ++ // Hold card in reset for 10ms ++ mdelay(10); ++ mpi_ResetPcCard(cardtype, TRUE); ++ // Let card come out of reset ++ mdelay(100); ++ break; ++ default: ++ break; ++ } ++ return cardtype; ++} ++ ++static int mpi_init(void) ++{ ++ unsigned long data; ++ unsigned int chipid; ++ unsigned int chiprev; ++ unsigned int sdramsize; ++ ++ chipid = (PERF->RevID & 0xFFFF0000) >> 16; ++ chiprev = (PERF->RevID & 0xFF); ++ sdramsize = getMemorySize(); ++ /* ++ * Init the pci interface ++ */ ++ data = GPIO->GPIOMode; // GPIO mode register ++ data |= GROUP2_PCI | GROUP1_MII_PCCARD; // PCI internal arbiter + Cardbus ++ GPIO->GPIOMode = data; // PCI internal arbiter ++ ++ /* ++ * In the BCM6348 CardBus support is defaulted to Slot 0 ++ * because there is no external IDSEL for CardBus. To disable ++ * the CardBus and allow a standard PCI card in Slot 0 ++ * set the cbus_idsel field to 0x1f. ++ */ ++ /* ++ uData = mpi->pcmcia_cntl1; ++ uData |= CARDBUS_IDSEL; ++ mpi->pcmcia_cntl1 = uData; ++ */ ++ // Setup PCI I/O Window range. Give 64K to PCI I/O ++ mpi->l2piorange = ~(BCM_PCI_IO_SIZE_64KB-1); ++ // UBUS to PCI I/O base address ++ mpi->l2piobase = BCM_PCI_IO_BASE & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI I/O Window remap ++ mpi->l2pioremap = (BCM_PCI_IO_BASE | MEM_WINDOW_EN); ++ ++ // enable PCI related GPIO pins and data swap between system and PCI bus ++ mpi->locbuscntrl = (EN_PCI_GPIO | DIR_U2P_NOSWAP); ++ ++ /* Enable 6348 BusMaster and Memory access mode */ ++ data = mpi_GetLocalPciConfigReg(PCI_COMMAND); ++ data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); ++ mpi_SetLocalPciConfigReg(PCI_COMMAND, data); ++ ++ /* Configure two 16 MByte PCI to System memory regions. */ ++ /* These memory regions are used when PCI device is a bus master */ ++ /* Accesses to the SDRAM from PCI bus will be "byte swapped" for this region */ ++ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_3, BCM_HOST_MEM_SPACE1); ++ mpi->sp0remap = 0x0; ++ ++ /* Accesses to the SDRAM from PCI bus will not be "byte swapped" for this region */ ++ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_4, BCM_HOST_MEM_SPACE2); ++ mpi->sp1remap = 0x0; ++ mpi->pcimodesel |= (PCI_BAR2_NOSWAP | 0x40); ++ ++ if ((chipid == 0x6348) && (chiprev == 0xb0)) { ++ mpi->sp0range = ~(sdramsize-1); ++ mpi->sp1range = ~(sdramsize-1); ++ } ++ /* ++ * Change 6348 PCI Cfg Reg. offset 0x40 to PCI memory read retry count infinity ++ * by set 0 in bit 8~15. This resolve read Bcm4306 srom return 0xffff in ++ * first read. ++ */ ++ data = mpi_GetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER); ++ data &= ~BRCM_PCI_CONFIG_TIMER_RETRY_MASK; ++ data |= 0x00000080; ++ mpi_SetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER, data); ++ ++ /* enable pci interrupt */ ++ mpi->locintstat |= (EXT_PCI_INT << 16); ++ ++ mpi_DetectPcCard(); ++ ++ ioport_resource.start = BCM_PCI_IO_BASE; ++ ioport_resource.end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB; ++ ++#if defined(CONFIG_USB) ++ PERF->blkEnables |= USBH_CLK_EN; ++ mdelay(100); ++ *USBH_NON_OHCI = NON_OHCI_BYTE_SWAP; ++#endif ++ ++ return 0; ++} ++#endif ++ ++static int __init brcm63xx_setup(void) ++{ ++ extern int panic_timeout; ++ ++ _machine_restart = brcm_machine_restart; ++ _machine_halt = brcm_machine_halt; ++ pm_power_off = brcm_machine_halt; ++ ++ board_time_init = brcm_time_init; ++ board_timer_setup = brcm_timer_setup; ++ ++ panic_timeout = 5; ++ ++#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) ++ /* mpi initialization */ ++ mpi_init(); ++#endif ++ return 0; ++} ++ ++void plat_setup(void) ++{ ++ brcm63xx_setup(); ++} ++ ++/*************************************************************************** ++ * C++ New and delete operator functions ++ ***************************************************************************/ ++ ++/* void *operator new(unsigned int sz) */ ++void *_Znwj(unsigned int sz) ++{ ++ return( kmalloc(sz, GFP_KERNEL) ); ++} ++ ++/* void *operator new[](unsigned int sz)*/ ++void *_Znaj(unsigned int sz) ++{ ++ return( kmalloc(sz, GFP_KERNEL) ); ++} ++ ++/* placement new operator */ ++/* void *operator new (unsigned int size, void *ptr) */ ++void *ZnwjPv(unsigned int size, void *ptr) ++{ ++ return ptr; ++} ++ ++/* void operator delete(void *m) */ ++void _ZdlPv(void *m) ++{ ++ kfree(m); ++} ++ ++/* void operator delete[](void *m) */ ++void _ZdaPv(void *m) ++{ ++ kfree(m); ++} ++ ++EXPORT_SYMBOL(_Znwj); ++EXPORT_SYMBOL(_Znaj); ++EXPORT_SYMBOL(ZnwjPv); ++EXPORT_SYMBOL(_ZdlPv); ++EXPORT_SYMBOL(_ZdaPv); ++ +diff -urN linux.old/arch/mips/bcm963xx/softdsl/AdslCoreDefs.h linux.dev/arch/mips/bcm963xx/softdsl/AdslCoreDefs.h +--- linux.old/arch/mips/bcm963xx/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/softdsl/AdslCoreDefs.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,2 @@ ++#define ADSL_SDRAM_IMAGE_SIZE (384*1024) ++ +diff -urN linux.old/arch/mips/bcm963xx/time.c linux.dev/arch/mips/bcm963xx/time.c +--- linux.old/arch/mips/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/bcm963xx/time.c 2006-08-25 03:58:22.000000000 +0200 +@@ -0,0 +1,114 @@ ++/* ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++/* ++ * Setup time for Broadcom 963xx MIPS boards ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/kernel_stat.h> ++#include <linux/sched.h> ++#include <linux/spinlock.h> ++#include <linux/interrupt.h> ++#include <linux/module.h> ++#include <linux/time.h> ++#include <linux/timex.h> ++ ++#include <asm/mipsregs.h> ++#include <asm/ptrace.h> ++#include <asm/div64.h> ++#include <asm/time.h> ++ ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++static unsigned long r4k_offset; /* Amount to increment compare reg each time */ ++static unsigned long r4k_cur; /* What counter should be at next timer irq */ ++ ++/* ********************************************************************* ++ * calculateCpuSpeed() ++ * Calculate the BCM6348 CPU speed by reading the PLL strap register ++ * and applying the following formula: ++ * cpu_clk = (.25 * 64MHz freq) * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) ++ * Input parameters: ++ * none ++ * Return value: ++ * none ++ ********************************************************************* */ ++ ++static inline unsigned long __init calculateCpuSpeed(void) ++{ ++ UINT32 pllStrap = PERF->PllStrap; ++ int n1 = (pllStrap & PLL_N1_MASK) >> PLL_N1_SHFT; ++ int n2 = (pllStrap & PLL_N2_MASK) >> PLL_N2_SHFT; ++ int m1cpu = (pllStrap & PLL_M1_CPU_MASK) >> PLL_M1_CPU_SHFT; ++ ++ return (16 * (n1 + 1) * (n2 + 2) / (m1cpu + 1)) * 1000000; ++} ++ ++ ++static inline unsigned long __init cal_r4koff(void) ++{ ++ mips_hpt_frequency = calculateCpuSpeed() / 2; ++ return (mips_hpt_frequency / HZ); ++} ++ ++ ++/* ++ * There are a lot of conceptually broken versions of the MIPS timer interrupt ++ * handler floating around. This one is rather different, but the algorithm ++ * is provably more robust. ++ */ ++irqreturn_t brcm_timer_interrupt(struct pt_regs *regs) ++{ ++ int irq = MIPS_TIMER_INT; ++ ++ irq_enter(); ++ kstat_this_cpu.irqs[irq]++; ++ ++ timer_interrupt(irq, NULL, regs); ++ irq_exit(); ++ return IRQ_HANDLED; ++} ++ ++ ++void __init brcm_time_init(void) ++{ ++ unsigned int est_freq, flags; ++ local_irq_save(flags); ++ ++ printk("calculating r4koff... "); ++ r4k_offset = cal_r4koff(); ++ printk("%08lx(%d)\n", r4k_offset, (int)r4k_offset); ++ ++ est_freq = 2 * r4k_offset * HZ; ++ est_freq += 5000; /* round */ ++ est_freq -= est_freq % 10000; ++ printk("CPU frequency %d.%02d MHz\n", est_freq / 1000000, ++ (est_freq % 1000000) * 100 / 1000000); ++ local_irq_restore(flags); ++} ++ ++ ++void __init brcm_timer_setup(struct irqaction *irq) ++{ ++ r4k_cur = (read_c0_count() + r4k_offset); ++ write_c0_compare(r4k_cur); ++ set_c0_status(IE_IRQ5); ++} +diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig +--- linux.old/arch/mips/Kconfig 2006-08-25 00:43:39.000000000 +0200 ++++ linux.dev/arch/mips/Kconfig 2006-08-25 01:57:46.000000000 +0200 +@@ -12,6 +12,15 @@ + prompt "System type" + default SGI_IP22 + ++config MIPS_BRCM ++ bool "Support for the Broadcom boards" ++ select SYS_SUPPORTS_32BIT_KERNEL ++ select SYS_SUPPORTS_BIG_ENDIAN ++ select SYS_HAS_CPU_MIPS32_R1 ++ select IRQ_CPU ++ help ++ This is a fmaily of boards based on the Broadcom MIPS32 ++ + config MIPS_MTX1 + bool "4G Systems MTX-1 board" + select DMA_NONCOHERENT +@@ -780,6 +789,7 @@ + + endchoice + ++source "arch/mips/bcm963xx/Kconfig" + source "arch/mips/ddb5xxx/Kconfig" + source "arch/mips/gt64120/ev64120/Kconfig" + source "arch/mips/jazz/Kconfig" +diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu-probe.c +--- linux.old/arch/mips/kernel/cpu-probe.c 2006-08-25 00:43:39.000000000 +0200 ++++ linux.dev/arch/mips/kernel/cpu-probe.c 2006-08-25 00:39:38.000000000 +0200 +@@ -568,6 +568,25 @@ + return; + } + ++static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) ++{ ++ decode_configs(c); ++ switch (c->processor_id & 0xff00) { ++ case PRID_IMP_BCM6338: ++ c->cputype = CPU_BCM6338; ++ break; ++ case PRID_IMP_BCM6345: ++ c->cputype = CPU_BCM6345; ++ break; ++ case PRID_IMP_BCM6348: ++ c->cputype = CPU_BCM6348; ++ break; ++ default: ++ c->cputype = CPU_UNKNOWN; ++ break; ++ } ++} ++ + static inline void cpu_probe_mips(struct cpuinfo_mips *c) + { + decode_configs(c); +@@ -704,6 +723,9 @@ + case PRID_COMP_LEGACY: + cpu_probe_legacy(c); + break; ++ case PRID_COMP_BROADCOM: ++ cpu_probe_broadcom(c); ++ break; + case PRID_COMP_MIPS: + cpu_probe_mips(c); + break; +diff -urN linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c +--- linux.old/arch/mips/kernel/proc.c 2006-08-25 00:43:39.000000000 +0200 ++++ linux.dev/arch/mips/kernel/proc.c 2006-08-25 00:39:38.000000000 +0200 +@@ -85,6 +85,9 @@ + [CPU_VR4181A] = "NEC VR4181A", + [CPU_SR71000] = "Sandcraft SR71000", + [CPU_PR4450] = "Philips PR4450", ++ [CPU_BCM6338] = "BCM6338", ++ [CPU_BCM6345] = "BCM6345", ++ [CPU_BCM6348] = "BCM6348", + }; + + +diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile +--- linux.old/arch/mips/Makefile 2006-08-25 00:43:39.000000000 +0200 ++++ linux.dev/arch/mips/Makefile 2006-08-25 11:36:41.000000000 +0200 +@@ -145,6 +145,19 @@ + # + + # ++# Broadcom board ++# ++core-$(CONFIG_MIPS_BRCM) += arch/mips/bcm963xx/ ++core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/serial/impl1/ ++#core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/board/bcm963xx/impl1/ ++#core-$(CONFIG_MIPS_BRCM) += boardparms/bcm963xx/ ++#cflags-$(CONFIG_MIPS_BRCM) += -Iinclude/asm-mips/mach-bcm963xx ++cflags-$(CONFIG_MIPS_BRCM) += -Iarch/mips/bcm963xx/include ++cflags-$(CONFIG_MIPS_BRCM) += -Iboardparms/bcm963xx ++load-$(CONFIG_MIPS_BRCM) += 0xffffffff80010000 ++ ++ ++# + # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. + # + core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/ +diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c +--- linux.old/arch/mips/mm/c-r4k.c 2006-08-25 00:43:39.000000000 +0200 ++++ linux.dev/arch/mips/mm/c-r4k.c 2006-08-25 00:39:38.000000000 +0200 +@@ -914,6 +914,13 @@ + if (!(config & MIPS_CONF_M)) + panic("Don't know how to probe P-caches on this cpu."); + ++ if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348) ++ { ++ printk("brcm mips: enabling icache and dcache...\n"); ++ /* Enable caches */ ++ write_c0_diag(read_c0_diag() | 0xC0000000); ++ } ++ + /* + * So we seem to be a MIPS32 or MIPS64 CPU + * So let's probe the I-cache ... +diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c +--- linux.old/arch/mips/mm/tlbex.c 2006-08-25 00:43:39.000000000 +0200 ++++ linux.dev/arch/mips/mm/tlbex.c 2006-08-25 00:39:38.000000000 +0200 +@@ -882,6 +882,9 @@ + case CPU_4KSC: + case CPU_20KC: + case CPU_25KF: ++ case CPU_BCM6338: ++ case CPU_BCM6345: ++ case CPU_BCM6348: + tlbw(p); + break; + +diff -urN linux.old/arch/mips/pci/fixup-bcm96348.c linux.dev/arch/mips/pci/fixup-bcm96348.c +--- linux.old/arch/mips/pci/fixup-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/fixup-bcm96348.c 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,85 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/init.h> ++#include <linux/types.h> ++#include <linux/pci.h> ++ ++#include <bcmpci.h> ++#include <bcm_intr.h> ++#include <bcm_map_part.h> ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++ ++static char irq_tab_bcm96348[] __initdata = { ++ [0] = INTERRUPT_ID_MPI, ++ [1] = INTERRUPT_ID_MPI, ++#if defined(CONFIG_USB) ++ [USB_HOST_SLOT] = INTERRUPT_ID_USBH ++#endif ++}; ++ ++int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ++{ ++ return irq_tab_bcm96348[slot]; ++} ++ ++static void bcm96348_fixup(struct pci_dev *dev) ++{ ++ uint32 memaddr; ++ uint32 size; ++ ++ memaddr = pci_resource_start(dev, 0); ++ size = pci_resource_len(dev, 0); ++ ++ switch (PCI_SLOT(dev->devfn)) { ++ case 0: ++ // UBUS to PCI address range ++ // Memory Window 1. Mask determines which bits are decoded. ++ mpi->l2pmrange1 = ~(size-1); ++ // UBUS to PCI Memory base address. This is akin to the ChipSelect base ++ // register. ++ mpi->l2pmbase1 = memaddr & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI Remap Address. Replaces the masked address bits in the ++ // range register with this setting. ++ // Also, enable direct I/O and direct Memory accesses ++ mpi->l2pmremap1 = (memaddr | MEM_WINDOW_EN); ++ break; ++ ++ case 1: ++ // Memory Window 2 ++ mpi->l2pmrange2 = ~(size-1); ++ // UBUS to PCI Memory base address. ++ mpi->l2pmbase2 = memaddr & BCM_PCI_ADDR_MASK; ++ // UBUS to PCI Remap Address ++ mpi->l2pmremap2 = (memaddr | MEM_WINDOW_EN); ++ break; ++ ++#if defined(CONFIG_USB) ++ case USB_HOST_SLOT: ++ dev->resource[0].start = USB_HOST_BASE; ++ dev->resource[0].end = USB_HOST_BASE+USB_BAR0_MEM_SIZE-1; ++ break; ++#endif ++ } ++} ++ ++struct pci_fixup pcibios_fixups[] = { ++ { PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, bcm96348_fixup }, ++ {0} ++}; +diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile +--- linux.old/arch/mips/pci/Makefile 2006-08-25 00:43:29.000000000 +0200 ++++ linux.dev/arch/mips/pci/Makefile 2006-08-25 00:39:38.000000000 +0200 +@@ -18,6 +18,7 @@ + obj-$(CONFIG_MIPS_TX3927) += ops-tx3927.o + obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o + obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o ++obj-$(CONFIG_BCM_PCI) += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o + + # + # These are still pretty much in the old state, watch, go blind. +diff -urN linux.old/arch/mips/pci/ops-bcm96348.c linux.dev/arch/mips/pci/ops-bcm96348.c +--- linux.old/arch/mips/pci/ops-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/ops-bcm96348.c 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,276 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <asm/addrspace.h> ++ ++#include <bcm_intr.h> ++#include <bcm_map_part.h> ++#include <bcmpci.h> ++ ++#include <linux/delay.h> ++ ++#if defined(CONFIG_USB) ++#if 0 ++#define DPRINT(x...) printk(x) ++#else ++#define DPRINT(x...) ++#endif ++ ++static int ++pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size); ++static int ++pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size); ++ ++static bool usb_mem_size_rd = FALSE; ++static uint32 usb_mem_base = 0; ++static uint32 usb_cfg_space_cmd_reg = 0; ++#endif ++static bool pci_mem_size_rd = FALSE; ++ ++static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); ++ ++static void mpi_SetupPciConfigAccess(uint32 addr) ++{ ++ mpi->l2pcfgctl = (DIR_CFG_SEL | DIR_CFG_USEREG | addr) & ~CONFIG_TYPE; ++} ++ ++static void mpi_ClearPciConfigAccess(void) ++{ ++ mpi->l2pcfgctl = 0x00000000; ++} ++ ++#if defined(CONFIG_USB) ++/* -------------------------------------------------------------------------- ++ Name: pci63xx_int_write ++Abstract: PCI Config write on internal device(s) ++ -------------------------------------------------------------------------- */ ++static int ++pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size) ++{ ++ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { ++ return PCIBIOS_SUCCESSFUL; ++ } ++ ++ switch (size) { ++ case 1: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %02X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 2: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %04X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ switch (where) { ++ case PCI_COMMAND: ++ usb_cfg_space_cmd_reg = *value; ++ break; ++ default: ++ break; ++ } ++ break; ++ case 4: ++ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %08lX\n", ++ PCI_SLOT(devfn), where, size, *value); ++ switch (where) { ++ case PCI_BASE_ADDRESS_0: ++ if (*value == 0xffffffff) { ++ usb_mem_size_rd = TRUE; ++ } else { ++ usb_mem_base = *value; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ default: ++ break; ++ } ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: pci63xx_int_read ++Abstract: PCI Config read on internal device(s) ++ -------------------------------------------------------------------------- */ ++static int ++pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size) ++{ ++ uint32 retValue = 0xFFFFFFFF; ++ ++ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { ++ return PCIBIOS_SUCCESSFUL; ++ } ++ ++ // For now, this is specific to the USB Host controller. We can ++ // make it more general if we have to... ++ // Emulate PCI Config accesses ++ switch (where) { ++ case PCI_VENDOR_ID: ++ case PCI_DEVICE_ID: ++ retValue = PCI_VENDOR_ID_BROADCOM | 0x63000000; ++ break; ++ case PCI_COMMAND: ++ case PCI_STATUS: ++ retValue = (0x0006 << 16) | usb_cfg_space_cmd_reg; ++ break; ++ case PCI_CLASS_REVISION: ++ case PCI_CLASS_DEVICE: ++ retValue = (PCI_CLASS_SERIAL_USB << 16) | (0x10 << 8) | 0x01; ++ break; ++ case PCI_BASE_ADDRESS_0: ++ if (usb_mem_size_rd) { ++ retValue = USB_BAR0_MEM_SIZE; ++ } else { ++ if (usb_mem_base != 0) ++ retValue = usb_mem_base; ++ else ++ retValue = USB_HOST_BASE; ++ } ++ usb_mem_size_rd = FALSE; ++ break; ++ case PCI_CACHE_LINE_SIZE: ++ case PCI_LATENCY_TIMER: ++ retValue = 0; ++ break; ++ case PCI_HEADER_TYPE: ++ retValue = PCI_HEADER_TYPE_NORMAL; ++ break; ++ case PCI_SUBSYSTEM_VENDOR_ID: ++ retValue = PCI_VENDOR_ID_BROADCOM; ++ break; ++ case PCI_SUBSYSTEM_ID: ++ retValue = 0x6300; ++ break; ++ case PCI_INTERRUPT_LINE: ++ retValue = INTERRUPT_ID_USBH; ++ break; ++ default: ++ break; ++ } ++ ++ switch (size) { ++ case 1: ++ *value = (retValue >> ((where & 3) << 3)) & 0xff; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %02X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 2: ++ *value = (retValue >> ((where & 3) << 3)) & 0xffff; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %04X\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ case 4: ++ *value = retValue; ++ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %08lX\n", ++ PCI_SLOT(devfn), where, size, *value); ++ break; ++ default: ++ break; ++ } ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++#endif ++ ++static int bcm96348_pcibios_read(struct pci_bus *bus, unsigned int devfn, ++ int where, int size, u32 * val) ++{ ++ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); ++ uint32 data; ++ ++#if defined(CONFIG_USB) ++ if (PCI_SLOT(devfn) == USB_HOST_SLOT) ++ return pci63xx_int_read(devfn, where, val, size); ++#endif ++ ++ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); ++ data = *(uint32 *)ioBase; ++ switch(size) { ++ case 1: ++ *val = (data >> ((where & 3) << 3)) & 0xff; ++ break; ++ case 2: ++ *val = (data >> ((where & 3) << 3)) & 0xffff; ++ break; ++ case 4: ++ *val = data; ++ /* Special case for reading PCI device range */ ++ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { ++ if (pci_mem_size_rd) { ++ /* bcm6348 PCI memory window minimum size is 64K */ ++ *val &= PCI_SIZE_64K; ++ } ++ } ++ break; ++ default: ++ break; ++ } ++ pci_mem_size_rd = FALSE; ++ mpi_ClearPciConfigAccess(); ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++static int bcm96348_pcibios_write(struct pci_bus *bus, unsigned int devfn, ++ int where, int size, u32 val) ++{ ++ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); ++ uint32 data; ++ ++#if defined(CONFIG_USB) ++ if (PCI_SLOT(devfn) == USB_HOST_SLOT) ++ return pci63xx_int_write(devfn, where, &val, size); ++#endif ++ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); ++ data = *(uint32 *)ioBase; ++ switch(size) { ++ case 1: ++ data = (data & ~(0xff << ((where & 3) << 3))) | ++ (val << ((where & 3) << 3)); ++ break; ++ case 2: ++ data = (data & ~(0xffff << ((where & 3) << 3))) | ++ (val << ((where & 3) << 3)); ++ break; ++ case 4: ++ data = val; ++ /* Special case for reading PCI device range */ ++ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { ++ if (val == 0xffffffff) ++ pci_mem_size_rd = TRUE; ++ } ++ break; ++ default: ++ break; ++ } ++ *(uint32 *)ioBase = data; ++ udelay(500); ++ mpi_ClearPciConfigAccess(); ++ ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++struct pci_ops bcm96348_pci_ops = { ++ .read = bcm96348_pcibios_read, ++ .write = bcm96348_pcibios_write ++}; +diff -urN linux.old/arch/mips/pci/pci-bcm96348.c linux.dev/arch/mips/pci/pci-bcm96348.c +--- linux.old/arch/mips/pci/pci-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/arch/mips/pci/pci-bcm96348.c 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,54 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++ ++#include <asm/pci_channel.h> ++#include <bcmpci.h> ++ ++static struct resource bcm_pci_io_resource = { ++ .name = "bcm96348 pci IO space", ++ .start = BCM_PCI_IO_BASE, ++ .end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB - 1, ++ .flags = IORESOURCE_IO ++}; ++ ++static struct resource bcm_pci_mem_resource = { ++ .name = "bcm96348 pci memory space", ++ .start = BCM_PCI_MEM_BASE, ++ .end = BCM_PCI_MEM_BASE + BCM_PCI_MEM_SIZE_16MB - 1, ++ .flags = IORESOURCE_MEM ++}; ++ ++extern struct pci_ops bcm96348_pci_ops; ++ ++struct pci_controller bcm96348_controller = { ++ .pci_ops = &bcm96348_pci_ops, ++ .io_resource = &bcm_pci_io_resource, ++ .mem_resource = &bcm_pci_mem_resource, ++}; ++ ++static void bcm96348_pci_init(void) ++{ ++ register_pci_controller(&bcm96348_controller); ++} ++ ++arch_initcall(bcm96348_pci_init); +diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux.dev/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c +--- linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,1056 @@ ++/* ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++:> ++*/ ++ ++/* Description: Serial port driver for the BCM963XX. */ ++ ++#define CARDNAME "bcm963xx_serial driver" ++#define VERSION "2.0" ++#define VER_STR CARDNAME " v" VERSION "\n" ++ ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/version.h> ++#include <linux/init.h> ++#include <linux/slab.h> ++#include <linux/interrupt.h> ++#include <linux/spinlock.h> ++ ++/* for definition of struct console */ ++#include <linux/console.h> ++#include <linux/tty.h> ++#include <linux/tty_flip.h> ++#include <linux/serial.h> ++#include <asm/uaccess.h> ++ ++#include <bcmtypes.h> ++#include <board.h> ++#include <bcm_map_part.h> ++#include <bcm_intr.h> ++ ++static DEFINE_SPINLOCK(bcm963xx_serial_lock); ++ ++extern void _putc(char); ++extern void _puts(const char *); ++ ++typedef struct bcm_serial { ++ volatile Uart * port; ++ int type; ++ int flags; ++ int irq; ++ int baud_base; ++ int blocked_open; ++ unsigned short close_delay; ++ unsigned short closing_wait; ++ unsigned short line; /* port/line number */ ++ unsigned short cflags; /* line configuration flag */ ++ unsigned short x_char; /* xon/xoff character */ ++ unsigned short read_status_mask; /* mask for read condition */ ++ unsigned short ignore_status_mask; /* mask for ignore condition */ ++ unsigned long event; /* mask used in BH */ ++ int xmit_head; /* Position of the head */ ++ int xmit_tail; /* Position of the tail */ ++ int xmit_cnt; /* Count of the chars in the buffer */ ++ int count; /* indicates how many times it has been opened */ ++ int magic; ++ ++ struct async_icount icount; /* keep track of things ... */ ++ struct tty_struct *tty; /* tty associated */ ++ struct termios normal_termios; ++ ++ wait_queue_head_t open_wait; ++ wait_queue_head_t close_wait; ++ ++ long session; /* Session of opening process */ ++ long pgrp; /* pgrp of opening process */ ++ ++ unsigned char is_initialized; ++} Context; ++ ++ ++/*---------------------------------------------------------------------*/ ++/* Define bits in the Interrupt Enable register */ ++/*---------------------------------------------------------------------*/ ++/* Enable receive interrupt */ ++#define RXINT (RXFIFONE|RXOVFERR) ++ ++/* Enable transmit interrupt */ ++#define TXINT (TXFIFOEMT|TXUNDERR|TXOVFERR) ++ ++/* Enable receiver line status interrupt */ ++#define LSINT (RXBRK|RXPARERR|RXFRAMERR) ++ ++#define BCM_NUM_UARTS 1 ++ ++#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) ++ ++ ++static struct bcm_serial multi[BCM_NUM_UARTS]; ++static struct bcm_serial *lines[BCM_NUM_UARTS]; ++static struct tty_driver serial_driver; ++static struct tty_struct *serial_table[BCM_NUM_UARTS]; ++static struct termios *serial_termios[BCM_NUM_UARTS]; ++static struct termios *serial_termios_locked[BCM_NUM_UARTS]; ++static int serial_refcount; ++ ++ ++static void bcm_stop (struct tty_struct *tty); ++static void bcm_start (struct tty_struct *tty); ++static inline void receive_chars (struct bcm_serial * info); ++static int startup (struct bcm_serial *info); ++static void shutdown (struct bcm_serial * info); ++static void change_speed( volatile Uart *pUart, tcflag_t cFlag ); ++static void bcm63xx_cons_flush_chars (struct tty_struct *tty); ++static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++ const unsigned char *buf, int count); ++static int bcm63xx_cons_write_room (struct tty_struct *tty); ++static int bcm_chars_in_buffer (struct tty_struct *tty); ++static void bcm_flush_buffer (struct tty_struct *tty); ++static void bcm_throttle (struct tty_struct *tty); ++static void bcm_unthrottle (struct tty_struct *tty); ++static void bcm_send_xchar (struct tty_struct *tty, char ch); ++static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo); ++static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info); ++static int get_lsr_info (struct bcm_serial *info, unsigned int *value); ++static void send_break (struct bcm_serial *info, int duration); ++static int bcm_ioctl (struct tty_struct * tty, struct file * file, ++ unsigned int cmd, unsigned long arg); ++static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios); ++static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp); ++static void bcm_hangup (struct tty_struct *tty); ++static int block_til_ready (struct tty_struct *tty, struct file *filp, struct bcm_serial *info); ++static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp); ++static int __init bcm63xx_serialinit(void); ++ ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_stop () and rs_start () ++ * ++ * These routines are called before setting or resetting ++ * tty->stopped. They enable or disable transmitter interrupts, ++ * as necessary. ++ * ------------------------------------------------------------ ++ */ ++static void bcm_stop (struct tty_struct *tty) ++{ ++} ++ ++static void bcm_start (struct tty_struct *tty) ++{ ++ _puts(CARDNAME " Start\n"); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * receive_char () ++ * ++ * This routine deals with inputs from any lines. ++ * ------------------------------------------------------------ ++ */ ++static inline void receive_chars (struct bcm_serial * info) ++{ ++ struct tty_struct *tty = 0; ++ struct async_icount * icount; ++ int ignore = 0; ++ unsigned short status, tmp; ++ UCHAR ch = 0; ++ while ((status = info->port->intStatus) & RXINT) ++ { ++ char flag_char = 0; ++ ++ if (status & RXFIFONE) ++ ch = info->port->Data; // Read the character ++ tty = info->tty; /* now tty points to the proper dev */ ++ icount = &info->icount; ++ if (! tty) ++ break; ++ if (!tty_buffer_request_room(tty, 1)) ++ break; ++ icount->rx++; ++ if (status & RXBRK) ++ { ++ flag_char = TTY_BREAK; ++ icount->brk++; ++ } ++ // keep track of the statistics ++ if (status & (RXFRAMERR | RXPARERR | RXOVFERR)) ++ { ++ if (status & RXPARERR) /* parity error */ ++ icount->parity++; ++ else ++ if (status & RXFRAMERR) /* frame error */ ++ icount->frame++; ++ if (status & RXOVFERR) ++ { ++ // Overflow. Reset the RX FIFO ++ info->port->fifoctl |= RSTRXFIFOS; ++ icount->overrun++; ++ } ++ // check to see if we should ignore the character ++ // and mask off conditions that should be ignored ++ if (status & info->ignore_status_mask) ++ { ++ if (++ignore > 100 ) ++ break; ++ goto ignore_char; ++ } ++ // Mask off the error conditions we want to ignore ++ tmp = status & info->read_status_mask; ++ if (tmp & RXPARERR) ++ { ++ flag_char = TTY_PARITY; ++ } ++ else ++ if (tmp & RXFRAMERR) ++ { ++ flag_char = TTY_FRAME; ++ } ++ if (tmp & RXOVFERR) ++ { ++ tty_insert_flip_char(tty, ch, flag_char); ++ ch = 0; ++ flag_char = TTY_OVERRUN; ++ if (!tty_buffer_request_room(tty, 1)) ++ break; ++ } ++ } ++ tty_insert_flip_char(tty, ch, flag_char); ++ } ++ignore_char: ++ if (tty) ++ tty_flip_buffer_push(tty); ++} ++ ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm_interrupt () ++ * ++ * this is the main interrupt routine for the chip. ++ * It deals with the multiple ports. ++ * ------------------------------------------------------------ ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++static irqreturn_t bcm_interrupt (int irq, void * dev, struct pt_regs * regs) ++#else ++static void bcm_interrupt (int irq, void * dev, struct pt_regs * regs) ++#endif ++{ ++ struct bcm_serial * info = lines[0]; ++ UINT16 intStat; ++ ++ /* get pending interrupt flags from UART */ ++ ++ /* Mask with only the serial interrupts that are enabled */ ++ intStat = info->port->intStatus & info->port->intMask; ++ while (intStat) ++ { ++ if (intStat & RXINT) ++ receive_chars (info); ++ else ++ if (intStat & TXINT) ++ info->port->intStatus = TXINT; ++ else /* don't know what it was, so let's mask it */ ++ info->port->intMask &= ~intStat; ++ ++ intStat = info->port->intStatus & info->port->intMask; ++ } ++ ++ // Clear the interrupt ++ BcmHalInterruptEnable (INTERRUPT_ID_UART); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ return IRQ_HANDLED; ++#endif ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * startup () ++ * ++ * various initialization tasks ++ * ------------------------------------------------------------------- ++ */ ++static int startup (struct bcm_serial *info) ++{ ++ // Port is already started... ++ return 0; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * shutdown () ++ * ++ * This routine will shutdown a serial port; interrupts are disabled, and ++ * DTR is dropped if the hangup on close termio flag is on. ++ * ------------------------------------------------------------------- ++ */ ++static void shutdown (struct bcm_serial * info) ++{ ++ unsigned long flags; ++ if (!info->is_initialized) ++ return; ++ ++ ++ /*save_flags (flags); ++ cli ();*/ ++ spin_lock_irqsave(&bcm963xx_serial_lock, flags); ++ ++ info->port->control &= ~(BRGEN|TXEN|RXEN); ++ if (info->tty) ++ set_bit (TTY_IO_ERROR, &info->tty->flags); ++ info->is_initialized = 0; ++ ++ //restore_flags (flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); ++} ++/* ++ * ------------------------------------------------------------------- ++ * change_speed () ++ * ++ * Set the baud rate, character size, parity and stop bits. ++ * ------------------------------------------------------------------- ++ */ ++static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) ++{ ++ unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; ++ /*save_flags(ulFlags); ++ cli();*/ ++ spin_lock_irqsave(&bcm963xx_serial_lock, ulFlags); ++ ++ switch( cFlag & (CBAUD | CBAUDEX) ) ++ { ++ case B115200: ++ ulBaud = 115200; ++ break; ++ case B57600: ++ ulBaud = 57600; ++ break; ++ case B38400: ++ ulBaud = 38400; ++ break; ++ case B19200: ++ ulBaud = 19200; ++ break; ++ case B9600: ++ ulBaud = 9600; ++ break; ++ case B4800: ++ ulBaud = 4800; ++ break; ++ case B2400: ++ ulBaud = 2400; ++ break; ++ case B1800: ++ ulBaud = 1800; ++ break; ++ case B1200: ++ ulBaud = 1200; ++ break; ++ case B600: ++ ulBaud = 600; ++ break; ++ case B300: ++ ulBaud = 300; ++ break; ++ case B200: ++ ulBaud = 200; ++ break; ++ case B150: ++ ulBaud = 150; ++ break; ++ case B134: ++ ulBaud = 134; ++ break; ++ case B110: ++ ulBaud = 110; ++ break; ++ case B75: ++ ulBaud = 75; ++ break; ++ case B50: ++ ulBaud = 50; ++ break; ++ default: ++ ulBaud = 115200; ++ break; ++ } ++ ++ /* Calculate buad rate. */ ++ ulClockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; ++ ulTmp = (ulClockFreqHz / ulBaud) / 16; ++ if( ulTmp & 0x01 ) ++ ulTmp /= 2; /* Rounding up, so sub is already accounted for */ ++ else ++ ulTmp = (ulTmp / 2) - 1; /* Rounding down so we must sub 1 */ ++ pUart->baudword = ulTmp; ++ ++ /* Set character size, stop bits and parity. */ ++ switch( cFlag & CSIZE ) ++ { ++ case CS5: ++ ulTmp = BITS5SYM; /* select transmit 5 bit data size */ ++ break; ++ case CS6: ++ ulTmp = BITS6SYM; /* select transmit 6 bit data size */ ++ break; ++ case CS7: ++ ulTmp = BITS7SYM; /* select transmit 7 bit data size */ ++ break; ++ /*case CS8:*/ ++ default: ++ ulTmp = BITS8SYM; /* select transmit 8 bit data size */ ++ break; ++ } ++ if( cFlag & CSTOPB ) ++ ulTmp |= TWOSTOP; /* select 2 stop bits */ ++ else ++ ulTmp |= ONESTOP; /* select one stop bit */ ++ ++ /* Write these values into the config reg. */ ++ pUart->config = ulTmp; ++ pUart->control &= ~(RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN); ++ switch( cFlag & (PARENB | PARODD) ) ++ { ++ case PARENB|PARODD: ++ pUart->control |= RXPARITYEN | TXPARITYEN; ++ break; ++ case PARENB: ++ pUart->control |= RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN; ++ break; ++ default: ++ pUart->control |= 0; ++ break; ++ } ++ ++ /* Reset and flush uart */ ++ pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; ++ //restore_flags( ulFlags ); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, ulFlags); ++} ++ ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_flush_char () ++ * ++ * Nothing to flush. Polled I/O is used. ++ * ------------------------------------------------------------------- ++ */ ++static void bcm63xx_cons_flush_chars (struct tty_struct *tty) ++{ ++} ++ ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm63xx_cons_write () ++ * ++ * Main output routine using polled I/O. ++ * ------------------------------------------------------------------- ++ */ ++static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++ const unsigned char *buf, int count) ++{ ++ int c; ++ ++ for (c = 0; c < count; c++) ++ _putc(buf[c]); ++ return count; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm63xx_cons_write_room () ++ * ++ * Compute the amount of space available for writing. ++ * ------------------------------------------------------------------- ++ */ ++static int bcm63xx_cons_write_room (struct tty_struct *tty) ++{ ++ /* Pick a number. Any number. Polled I/O is used. */ ++ return 1024; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_chars_in_buffer () ++ * ++ * compute the amount of char left to be transmitted ++ * ------------------------------------------------------------------- ++ */ ++static int bcm_chars_in_buffer (struct tty_struct *tty) ++{ ++ return 0; ++} ++ ++/* ++ * ------------------------------------------------------------------- ++ * bcm_flush_buffer () ++ * ++ * Empty the output buffer ++ * ------------------------------------------------------------------- ++ */ ++static void bcm_flush_buffer (struct tty_struct *tty) ++{ ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm_throttle () and bcm_unthrottle () ++ * ++ * This routine is called by the upper-layer tty layer to signal that ++ * incoming characters should be throttled (or not). ++ * ------------------------------------------------------------ ++ */ ++static void bcm_throttle (struct tty_struct *tty) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ if (I_IXOFF(tty)) ++ info->x_char = STOP_CHAR(tty); ++} ++ ++static void bcm_unthrottle (struct tty_struct *tty) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ if (I_IXOFF(tty)) ++ { ++ if (info->x_char) ++ info->x_char = 0; ++ else ++ info->x_char = START_CHAR(tty); ++ } ++} ++ ++static void bcm_send_xchar (struct tty_struct *tty, char ch) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ info->x_char = ch; ++ if (ch) ++ bcm_start (info->tty); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_ioctl () and friends ++ * ------------------------------------------------------------ ++ */ ++static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo) ++{ ++ struct serial_struct tmp; ++ ++ if (!retinfo) ++ return -EFAULT; ++ ++ memset (&tmp, 0, sizeof(tmp)); ++ tmp.type = info->type; ++ tmp.line = info->line; ++ tmp.port = (int) info->port; ++ tmp.irq = info->irq; ++ tmp.flags = 0; ++ tmp.baud_base = info->baud_base; ++ tmp.close_delay = info->close_delay; ++ tmp.closing_wait = info->closing_wait; ++ ++ return copy_to_user (retinfo, &tmp, sizeof(*retinfo)); ++} ++ ++static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info) ++{ ++ struct serial_struct new_serial; ++ struct bcm_serial old_info; ++ int retval = 0; ++ ++ if (!new_info) ++ return -EFAULT; ++ ++ copy_from_user (&new_serial, new_info, sizeof(new_serial)); ++ old_info = *info; ++ ++ if (!capable(CAP_SYS_ADMIN)) ++ return -EPERM; ++ ++ ++ if (info->count > 1) ++ return -EBUSY; ++ ++ /* OK, past this point, all the error checking has been done. ++ * At this point, we start making changes..... ++ */ ++ info->baud_base = new_serial.baud_base; ++ info->type = new_serial.type; ++ info->close_delay = new_serial.close_delay; ++ info->closing_wait = new_serial.closing_wait; ++ retval = startup (info); ++ return retval; ++} ++ ++/* ++ * get_lsr_info - get line status register info ++ * ++ * Purpose: Let user call ioctl() to get info when the UART physically ++ * is emptied. On bus types like RS485, the transmitter must ++ * release the bus after transmitting. This must be done when ++ * the transmit shift register is empty, not be done when the ++ * transmit holding register is empty. This functionality ++ * allows an RS485 driver to be written in user space. ++ */ ++static int get_lsr_info (struct bcm_serial *info, unsigned int *value) ++{ ++ return( 0 ); ++} ++ ++/* ++ * This routine sends a break character out the serial port. ++ */ ++static void send_break (struct bcm_serial *info, int duration) ++{ ++ unsigned long flags; ++ ++ if (!info->port) ++ return; ++ ++ current->state = TASK_INTERRUPTIBLE; ++ ++ /*save_flags (flags); ++ cli();*/ ++ spin_lock_irqsave(&bcm963xx_serial_lock, flags); ++ ++ info->port->control |= XMITBREAK; ++ schedule_timeout(duration); ++ info->port->control &= ~XMITBREAK; ++ ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); ++ //restore_flags (flags); ++} ++ ++static int bcm_ioctl (struct tty_struct * tty, struct file * file, ++ unsigned int cmd, unsigned long arg) ++{ ++ int error; ++ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; ++ int retval; ++ ++ if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && ++ (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) && ++ (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) ++ { ++ if (tty->flags & (1 << TTY_IO_ERROR)) ++ return -EIO; ++ } ++ switch (cmd) ++ { ++ ++ case TCSBRK: /* SVID version: non-zero arg --> no break */ ++ retval = tty_check_change (tty); ++ if (retval) ++ return retval; ++ tty_wait_until_sent (tty, 0); ++ if (!arg) ++ send_break (info, HZ/4); /* 1/4 second */ ++ return 0; ++ ++ case TCSBRKP: /* support for POSIX tcsendbreak() */ ++ retval = tty_check_change (tty); ++ if (retval) ++ return retval; ++ tty_wait_until_sent (tty, 0); ++ send_break (info, arg ? arg*(HZ/10) : HZ/4); ++ return 0; ++ ++ case TIOCGSOFTCAR: ++ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(long)); ++ if (!error) ++ return -EFAULT; ++ else ++ { ++ put_user (C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg); ++ return 0; ++ } ++ ++ case TIOCSSOFTCAR: ++ error = get_user (arg, (unsigned long *)arg); ++ if (error) ++ return error; ++ tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); ++ return 0; ++ ++ case TIOCGSERIAL: ++ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(struct serial_struct)); ++ if (!error) ++ return -EFAULT; ++ else ++ return get_serial_info (info, (struct serial_struct *)arg); ++ ++ case TIOCSSERIAL: ++ return set_serial_info (info, (struct serial_struct *) arg); ++ ++ case TIOCSERGETLSR: /* Get line status register */ ++ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(unsigned int)); ++ if (!error) ++ return -EFAULT; ++ else ++ return get_lsr_info (info, (unsigned int *)arg); ++ ++ case TIOCSERGSTRUCT: ++ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(struct bcm_serial)); ++ if (!error) ++ return -EFAULT; ++ else ++ { ++ copy_to_user((struct bcm_serial *)arg, info, sizeof(struct bcm_serial)); ++ return 0; ++ } ++ ++ default: ++ return -ENOIOCTLCMD; ++ } ++ return 0; ++} ++ ++static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios) ++{ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ ++ if( tty->termios->c_cflag != old_termios->c_cflag ) ++ change_speed (info->port, tty->termios->c_cflag); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * bcm63xx_cons_close() ++ * ++ * This routine is called when the serial port gets closed. First, we ++ * wait for the last remaining data to be sent. Then, we turn off ++ * the transmit enable and receive enable flags. ++ * ------------------------------------------------------------ ++ */ ++static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp) ++{ ++ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; ++ unsigned long flags; ++ ++ if (!info) ++ return; ++ ++ /*save_flags (flags); ++ cli();*/ ++ spin_lock_irqsave(&bcm963xx_serial_lock, flags); ++ ++ if (tty_hung_up_p (filp)) ++ { ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); ++ //restore_flags (flags); ++ return; ++ } ++ ++ if ((tty->count == 1) && (info->count != 1)) ++ { ++ ++ /* Uh, oh. tty->count is 1, which means that the tty ++ * structure will be freed. Info->count should always ++ * be one in these conditions. If it's greater than ++ * one, we've got real problems, since it means the ++ * serial port won't be shutdown. ++ */ ++ printk("bcm63xx_cons_close: bad serial port count; tty->count is 1, " ++ "info->count is %d\n", info->count); ++ info->count = 1; ++ } ++ ++ if (--info->count < 0) ++ { ++ printk("ds_close: bad serial port count for ttys%d: %d\n", ++ info->line, info->count); ++ info->count = 0; ++ } ++ ++ if (info->count) ++ { ++ //restore_flags (flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); ++ return; ++ } ++ ++ /* Now we wait for the transmit buffer to clear; and we notify ++ * the line discipline to only process XON/XOFF characters. ++ */ ++ tty->closing = 1; ++ ++ /* At this point we stop accepting input. To do this, we ++ * disable the receive line status interrupts. ++ */ ++ shutdown (info); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ if (tty->driver->flush_buffer) ++ tty->driver->flush_buffer (tty); ++#else ++ if (tty->driver.flush_buffer) ++ tty->driver.flush_buffer (tty); ++#endif ++ if (tty->ldisc.flush_buffer) ++ tty->ldisc.flush_buffer (tty); ++ ++ tty->closing = 0; ++ info->event = 0; ++ info->tty = 0; ++ if (tty->ldisc.num != tty_ldisc_get(N_TTY)->num) ++ { ++ if (tty->ldisc.close) ++ (tty->ldisc.close)(tty); ++ tty->ldisc = *tty_ldisc_get(N_TTY); ++ tty->termios->c_line = N_TTY; ++ if (tty->ldisc.open) ++ (tty->ldisc.open)(tty); ++ } ++ if (info->blocked_open) ++ { ++ if (info->close_delay) ++ { ++ current->state = TASK_INTERRUPTIBLE; ++ schedule_timeout(info->close_delay); ++ } ++ wake_up_interruptible (&info->open_wait); ++ } ++ wake_up_interruptible (&info->close_wait); ++ ++ //restore_flags (flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); ++} ++ ++/* ++ * bcm_hangup () --- called by tty_hangup() when a hangup is signaled. ++ */ ++static void bcm_hangup (struct tty_struct *tty) ++{ ++ ++ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; ++ ++ shutdown (info); ++ info->event = 0; ++ info->count = 0; ++ info->tty = 0; ++ wake_up_interruptible (&info->open_wait); ++} ++ ++/* ++ * ------------------------------------------------------------ ++ * rs_open() and friends ++ * ------------------------------------------------------------ ++ */ ++static int block_til_ready (struct tty_struct *tty, struct file *filp, ++ struct bcm_serial *info) ++{ ++ return 0; ++} ++ ++/* ++ * This routine is called whenever a serial port is opened. It ++ * enables interrupts for a serial port. It also performs the ++ * serial-specific initialization for the tty structure. ++ */ ++static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp) ++{ ++ struct bcm_serial *info; ++ int retval, line; ++ ++ // Make sure we're only opening on of the ports we support ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ line = MINOR(tty->driver->cdev.dev) - tty->driver->minor_start; ++#else ++ line = MINOR(tty->device) - tty->driver.minor_start; ++#endif ++ ++ if ((line < 0) || (line >= BCM_NUM_UARTS)) ++ return -ENODEV; ++ ++ info = lines[line]; ++ ++ info->port->intMask = 0; /* Clear any pending interrupts */ ++ info->port->intMask = RXINT; /* Enable RX */ ++ ++ info->count++; ++ tty->driver_data = info; ++ info->tty = tty; ++ BcmHalInterruptEnable (INTERRUPT_ID_UART); ++ ++ // Start up serial port ++ retval = startup (info); ++ if (retval) ++ return retval; ++ ++ retval = block_til_ready (tty, filp, info); ++ if (retval) ++ return retval; ++ ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ info->pgrp = process_group(current); ++ info->session = current->signal->session; ++#else ++ info->session = current->session; ++ info->pgrp = current->pgrp; ++#endif ++ ++ return 0; ++} ++ ++/* -------------------------------------------------------------------------- ++ Name: bcm63xx_serialinit ++ Purpose: Initialize our BCM63xx serial driver ++-------------------------------------------------------------------------- */ ++static int __init bcm63xx_serialinit(void) ++{ ++ int i, flags; ++ struct bcm_serial * info; ++ ++ // Print the driver version information ++ printk(VER_STR); ++ ++ memset(&serial_driver, 0, sizeof(struct tty_driver)); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ serial_driver.owner = THIS_MODULE; ++ serial_driver.devfs_name = "tts/"; ++#endif ++ serial_driver.magic = TTY_DRIVER_MAGIC; ++ serial_driver.name = "ttyS"; ++ serial_driver.major = TTY_MAJOR; ++ serial_driver.minor_start = 64; ++ serial_driver.num = BCM_NUM_UARTS; ++ serial_driver.type = TTY_DRIVER_TYPE_SERIAL; ++ serial_driver.subtype = SERIAL_TYPE_NORMAL; ++ serial_driver.init_termios = tty_std_termios; ++ serial_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | CLOCAL; ++ serial_driver.flags = TTY_DRIVER_REAL_RAW; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++ serial_driver.refcount = serial_refcount; ++ serial_driver.ttys = serial_table; ++#else ++ serial_driver.refcount = &serial_refcount; ++ serial_driver.table = serial_table; ++#endif ++ ++ serial_driver.termios = serial_termios; ++ serial_driver.termios_locked = serial_termios_locked; ++ serial_driver.open = bcm63xx_cons_open; ++ serial_driver.close = bcm63xx_cons_close; ++ serial_driver.write = bcm63xx_cons_write; ++ serial_driver.flush_chars = bcm63xx_cons_flush_chars; ++ serial_driver.write_room = bcm63xx_cons_write_room; ++ serial_driver.chars_in_buffer = bcm_chars_in_buffer; ++ serial_driver.flush_buffer = bcm_flush_buffer; ++ serial_driver.ioctl = bcm_ioctl; ++ serial_driver.throttle = bcm_throttle; ++ serial_driver.unthrottle = bcm_unthrottle; ++ serial_driver.send_xchar = bcm_send_xchar; ++ serial_driver.set_termios = bcm_set_termios; ++ serial_driver.stop = bcm_stop; ++ serial_driver.start = bcm_start; ++ serial_driver.hangup = bcm_hangup; ++ ++ if (tty_register_driver (&serial_driver)) ++ panic("Couldn't register serial driver\n"); ++ ++ //save_flags(flags); cli(); ++ spin_lock_irqsave(&bcm963xx_serial_lock, flags); ++ ++ for (i = 0; i < BCM_NUM_UARTS; i++) ++ { ++ info = &multi[i]; ++ lines[i] = info; ++ info->port = (Uart *) ((char *)UART_BASE + (i * 0x20)); ++ info->irq = (2 - i) + 8; ++ info->line = i; ++ info->tty = 0; ++ info->close_delay = 50; ++ info->closing_wait = 3000; ++ info->x_char = 0; ++ info->event = 0; ++ info->count = 0; ++ info->blocked_open = 0; ++ info->normal_termios = serial_driver.init_termios; ++ init_waitqueue_head(&info->open_wait); ++ init_waitqueue_head(&info->close_wait); ++ ++ /* If we are pointing to address zero then punt - not correctly ++ * set up in setup.c to handle this. ++ */ ++ if (! info->port) ++ return 0; ++ BcmHalMapInterrupt(bcm_interrupt, 0, INTERRUPT_ID_UART); ++ } ++ ++ /* order matters here... the trick is that flags ++ * is updated... in request_irq - to immediatedly obliterate ++ * it is unwise. ++ */ ++ //restore_flags(flags); ++ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); ++ return 0; ++} ++ ++module_init(bcm63xx_serialinit); ++ ++/* -------------------------------------------------------------------------- ++ Name: bcm_console_print ++ Purpose: bcm_console_print is registered for printk. ++ The console_lock must be held when we get here. ++-------------------------------------------------------------------------- */ ++static void bcm_console_print (struct console * cons, const char * str, ++ unsigned int count) ++{ ++ unsigned int i; ++ //_puts(str); ++ for(i=0; i<count; i++, str++) ++ { ++ _putc(*str); ++ if (*str == 10) ++ { ++ _putc(13); ++ } ++ } ++} ++ ++static struct tty_driver * bcm_console_device(struct console * c, int *index) ++{ ++ *index = c->index; ++ return &serial_driver; ++} ++ ++static int __init bcm_console_setup(struct console * co, char * options) ++{ ++ return 0; ++} ++ ++static struct console bcm_sercons = { ++ .name = "ttyS", ++ .write = bcm_console_print, ++ .device = bcm_console_device, ++ .setup = bcm_console_setup, ++ .flags = CON_PRINTBUFFER, // CON_CONSDEV, CONSOLE_LINE, ++ .index = -1, ++}; ++ ++static int __init bcm63xx_console_init(void) ++{ ++ register_console(&bcm_sercons); ++ return 0; ++} ++ ++console_initcall(bcm63xx_console_init); +diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/Makefile linux.dev/bcmdrivers/opensource/char/serial/impl1/Makefile +--- linux.old/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,13 @@ ++# File: bcmdrivers/opensource/char/serial ++# ++# Makefile for the BCM63xx serial/console driver ++ ++obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o ++ ++EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) ++ ++-include $(TOPDIR)/Rules.make ++ ++clean: ++ rm -f core *.o *.a *.s ++ +diff -urN linux.old/boardparms/bcm963xx/boardparms.c linux.dev/boardparms/bcm963xx/boardparms.c +--- linux.old/boardparms/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/boardparms/bcm963xx/boardparms.c 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,2392 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.c ++ * ++ * Description: This file contains the implementation for the BCM63xx board ++ * parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++/* Includes. */ ++#include <linux/config.h> ++#include "boardparms.h" ++ ++/* Defines. */ ++ ++/* Default psi size in K bytes */ ++#define BP_PSI_DEFAULT_SIZE 24 ++ ++/* Typedefs */ ++typedef struct boardparameters ++{ ++ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ ++ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; ++ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; ++ unsigned short usSdramSize; /* SDRAM size and type */ ++ unsigned short usPsiSize; /* persistent storage in K bytes */ ++ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ ++ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ ++ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ ++ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ ++ unsigned short usGpioUartRts; /* GPIO pin or not defined */ ++ unsigned short usGpioUartCts; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ ++ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ ++ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ ++ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ ++ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ ++ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ ++ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ ++ unsigned short usExtIntrWireless; /* ext intr or not defined */ ++ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ ++ unsigned short usExtIntrHpna; /* ext intr or not defined */ ++ unsigned short usCsHpna; /* chip select not defined */ ++ unsigned short usAntInUseWireless; /* antenna in use or not defined */ ++ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ ++ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ ++ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ ++} BOARD_PARAMETERS, *PBOARD_PARAMETERS; ++ ++/* Variables */ ++#if defined(_BCM96338_) || defined(CONFIG_BCM96338) ++static BOARD_PARAMETERS g_bcm96338sv = ++{ ++ "96338SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static BOARD_PARAMETERS g_bcm96338l2m8m = ++{ ++ "96338L-2M-8M", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; ++#endif ++ ++#if defined(_BCM96345_) || defined(CONFIG_BCM96345) ++static BOARD_PARAMETERS g_bcm96345r = ++{ ++ "96345R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw2 = ++{ ++ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold ++ * Reset or RTS. ++ */ ++ "96345GW2", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_GPIO_0_AH, /* usGpioPhySpiSck */ ++ BP_GPIO_4_AH, /* usGpioPhySpiSs */ ++ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ ++ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_GPIO, /* usConfigType */ ++ BP_ENET_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_GPIO_13_AH, /* usGpioUartRts */ ++ BP_GPIO_9_AH, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345gw = ++{ ++ "96345GW", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_1, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_15_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_GPIO_2_AH, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_GPIO_10_AH, /* usGpioLedWireless */ ++ BP_GPIO_7_AH, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_EXT_INTR_2, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_EXT_INTR_3, /* usExtIntrHpna */ ++ BP_CS_1, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96335r = ++{ ++ "96335R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_9_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_8_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_9_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345r0 = ++{ ++ "96345R0", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_9_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96345rs = ++{ ++ "96345RS", /* szBoardId */ ++ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ ++ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ ++ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_GPIO_8_AH, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_8_AH, /* usGpioLedWanData */ ++ BP_GPIO_9_AH, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ ++ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ ++ BP_GPIO_8_AH, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, ++ &g_bcm96345rs, 0}; ++#endif ++ ++#if defined(_BCM96348_) || defined(CONFIG_BCM96348) ++ ++static BOARD_PARAMETERS g_bcm96348r = ++{ ++ "96348R", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY}}, /* ucPhyType */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348lv = ++{ ++ "96348LV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x02, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_GPIO_5_AL, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw = ++{ ++ "96348GW", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_10 = ++{ ++ "96348GW-10", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_6_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348gw_11 = ++{ ++ "96348GW-11", /* szBoardId */ ++ {{BP_ENET_NO_PHY}, /* ucPhyType */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x04, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static BOARD_PARAMETERS g_bcm96348sv = ++{ ++ "96348SV", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ ++ 0x1f, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}}, /* usReverseMii */ ++ {{BP_VOIP_NO_DSP}, /* ucDspType */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_NOT_DEFINED, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_NOT_DEFINED, /* usGpioLedWanData */ ++ BP_NOT_DEFINED, /* usGpioLedPpp */ ++ BP_NOT_DEFINED, /* usGpioLedPppFail */ ++ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ ++ BP_NOT_DEFINED, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcm96348gw_dualDsp = ++{ ++ "96348GW-DualDSP", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x03, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_UNEQUIPPED, /* usGpioVoipReset */ ++ BP_GPIO_34_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_DSP, /* ucDspType */ ++ 0x01, /* ucDspAddress */ ++ BP_EXT_INTR_3, /* usExtIntrVoip */ ++ BP_UNEQUIPPED , /* usGpioVoipReset */ ++ BP_GPIO_35_AH, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_3}}, /* usCsVoip */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++ ++static BOARD_PARAMETERS g_bcmCustom_01 = ++{ ++ "BCMCUST_01", /* szBoardId */ ++ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ ++ 0x01, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_MDIO, /* usConfigType */ ++ BP_NOT_DEFINED}, /* usReverseMii */ ++ {BP_ENET_NO_PHY, /* ucPhyType */ ++ 0x00, /* ucPhyAddress */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSck */ ++ BP_NOT_DEFINED, /* usGpioPhySpiSs */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ ++ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ ++ BP_NOT_DEFINED, /* usGpioPhyReset */ ++ 0x01, /* numSwitchPorts */ ++ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ ++ BP_ENET_REVERSE_MII}}, /* usReverseMii */ ++ {{BP_VOIP_DSP, /* ucDspType */ ++ 0x00, /* ucDspAddress */ ++ BP_EXT_INTR_2, /* usExtIntrVoip */ ++ BP_GPIO_36_AH, /* usGpioVoipReset */ ++ BP_GPIO_34_AL, /* usGpioVoipIntr */ ++ BP_NOT_DEFINED, /* usGpioLedVoip */ ++ BP_CS_2}, /* usCsVoip */ ++ {BP_VOIP_NO_DSP}}, /* ucDspType */ ++ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ ++ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ ++ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ ++ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ ++ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ ++ BP_NOT_DEFINED, /* usGpioPcmciaReset */ ++ BP_NOT_DEFINED, /* usGpioUartRts */ ++ BP_NOT_DEFINED, /* usGpioUartCts */ ++ BP_NOT_DEFINED, /* usGpioLedAdsl */ ++ BP_GPIO_2_AL, /* usGpioLedAdslFail */ ++ BP_NOT_DEFINED, /* usGpioLedWireless */ ++ BP_NOT_DEFINED, /* usGpioLedUsb */ ++ BP_NOT_DEFINED, /* usGpioLedHpna */ ++ BP_GPIO_3_AL, /* usGpioLedWanData */ ++ BP_GPIO_3_AL, /* usGpioLedPpp */ ++ BP_GPIO_4_AL, /* usGpioLedPppFail */ ++ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ ++ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ ++ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ ++ BP_GPIO_1_AL, /* usGpioLedBlStop */ ++ BP_NOT_DEFINED, /* usExtIntrWireless */ ++ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ ++ BP_NOT_DEFINED, /* usExtIntrHpna */ ++ BP_NOT_DEFINED, /* usCsHpna */ ++ BP_NOT_DEFINED, /* usAntInUseWireless */ ++ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ ++ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ ++ BP_NOT_DEFINED /* usGpioLedSesWireless */ ++}; ++ ++static PBOARD_PARAMETERS g_BoardParms[] = ++ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, ++ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, ++ &g_bcmCustom_01, 0}; ++#endif ++ ++static PBOARD_PARAMETERS g_pCurrentBp = 0; ++ ++/************************************************************************** ++ * Name : bpstrcmp ++ * ++ * Description: String compare for this file so it does not depend on an OS. ++ * (Linux kernel and CFE share this source file.) ++ * ++ * Parameters : [IN] dest - destination string ++ * [IN] src - source string ++ * ++ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src ++ ***************************************************************************/ ++static int bpstrcmp(const char *dest,const char *src); ++static int bpstrcmp(const char *dest,const char *src) ++{ ++ while (*src && *dest) ++ { ++ if (*dest < *src) return -1; ++ if (*dest > *src) return 1; ++ dest++; ++ src++; ++ } ++ ++ if (*dest && !*src) return 1; ++ if (!*dest && *src) return -1; ++ return 0; ++} /* bpstrcmp */ ++ ++/************************************************************************** ++ * Name : BpGetVoipDspConfig ++ * ++ * Description: Gets the DSP configuration from the board parameter ++ * structure for a given DSP index. ++ * ++ * Parameters : [IN] dspNum - DSP index (number) ++ * ++ * Returns : Pointer to DSP configuration block if found/valid, NULL ++ * otherwise. ++ ***************************************************************************/ ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); ++VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) ++{ ++ VOIP_DSP_INFO *pDspConfig = 0; ++ int i; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) ++ { ++ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && ++ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) ++ { ++ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; ++ break; ++ } ++ } ++ } ++ ++ return pDspConfig; ++} ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ) ++{ ++ int nRet = BP_BOARD_ID_NOT_FOUND; ++ PBOARD_PARAMETERS *ppBp; ++ ++ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) ++ { ++ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) ++ { ++ g_pCurrentBp = *ppBp; ++ nRet = BP_SUCCESS; ++ break; ++ } ++ } ++ ++ return( nRet ); ++} /* BpSetBoardId */ ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) ++{ ++ PBOARD_PARAMETERS *ppBp; ++ int i; ++ char *src; ++ char *dest; ++ ++ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; ++ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) ++ { ++ dest = pszBoardIds; ++ src = (*ppBp)->szBoardId; ++ while( *src ) ++ *dest++ = *src++; ++ *dest = '\0'; ++ } ++ ++ return( i ); ++} /* BpGetBoardIds */ ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) ++{ ++ int i, nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ { ++ if( i < BP_MAX_ENET_MACS ) ++ { ++ unsigned char *src = (unsigned char *) ++ &g_pCurrentBp->EnetMacInfos[i]; ++ unsigned char *dest = (unsigned char *) pEnetInfos; ++ int len = sizeof(ETHERNET_MAC_INFO); ++ while( len-- ) ++ *dest++ = *src++; ++ } ++ else ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ } ++ ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) ++ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; ++ ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetEthernetMacInfo */ ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulSdramSize = g_pCurrentBp->usSdramSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulSdramSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetSdramSize */ ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulPsiSize = g_pCurrentBp->usPsiSize; ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ *pulPsiSize = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPsiSize */ ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; ++ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; ++ ++ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusInner = *pusOuter = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetRj11InnerOuterPairGpios */ ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; ++ ++ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPressAndHoldResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipReset; ++ ++ if( *pusValue != BP_NOT_DEFINED || ++ *pusValue == BP_UNEQUIPPED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioVoipIntr; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipIntrGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioPcmciaReset; ++ ++ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPcmciaResetGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, board id input string does not ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusRts = g_pCurrentBp->usGpioUartRts; ++ *pusCts = g_pCurrentBp->usGpioUartCts; ++ ++ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && ++ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusRts = *pusCts = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUartRtsCtsGpios */ ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdsl; ++ ++ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedAdslFail; ++ ++ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWireless; ++ ++ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usAntInUseWireless; ++ ++ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessAntInUse */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; ++ ++ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessSesBtnGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; ++ ++ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedSesWireless; ++ ++ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++ ++} /* BpGetWirelessSesLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedUsb; ++ ++ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetUsbLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedHpna; ++ ++ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedWanData; ++ ++ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWanDataLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPpp; ++ ++ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedPppFail; ++ ++ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetPppFailLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; ++ ++ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderPowerOn */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; ++ ++ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderAlarmLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; ++ ++ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderResetCfgLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pusValue = g_pCurrentBp->usGpioLedBlStop; ++ ++ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetBootloaderStopLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ * ++ * Note : The VoIP structure would allow for having one LED per DSP ++ * however, the board initialization function assumes only one ++ * LED per functionality (ie one LED for VoIP). Therefore in ++ * order to keep this tidy and simple we do not make usage of the ++ * one-LED-per-DSP function. Instead, we assume that the LED for ++ * VoIP is unique and associated with DSP 0 (always present on ++ * any VoIP platform). If changing this to a LED-per-DSP function ++ * then one need to update the board initialization driver in ++ * bcmdrivers\opensource\char\board\bcm963xx\impl1 ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); ++ ++ if( pDspInfo ) ++ { ++ *pusValue = pDspInfo->usGpioLedVoip; ++ ++ if( *pusValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pusValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipLedGpio */ ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrWireless; ++ ++ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetWirelessExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; ++ ++ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetAdslDyingGaspExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usExtIntrVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usExtIntrHpna; ++ ++ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaExtIntr */ ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ *pulValue = g_pCurrentBp->usCsHpna; ++ ++ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetHpnaChipSelect */ ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) ++{ ++ int nRet; ++ ++ if( g_pCurrentBp ) ++ { ++ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); ++ ++ if( pDspInfo ) ++ { ++ *pulValue = pDspInfo->usCsVoip; ++ ++ if( *pulValue != BP_NOT_DEFINED ) ++ { ++ nRet = BP_SUCCESS; ++ } ++ else ++ { ++ nRet = BP_VALUE_NOT_DEFINED; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_FOUND; ++ } ++ } ++ else ++ { ++ *pulValue = BP_NOT_DEFINED; ++ nRet = BP_BOARD_ID_NOT_SET; ++ } ++ ++ return( nRet ); ++} /* BpGetVoipChipSelect */ ++ +diff -urN linux.old/boardparms/bcm963xx/boardparms.h linux.dev/boardparms/bcm963xx/boardparms.h +--- linux.old/boardparms/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/boardparms/bcm963xx/boardparms.h 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,766 @@ ++/* ++<:copyright-gpl ++ ++ Copyright 2003 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. ++ ++:> ++*/ ++/************************************************************************** ++ * File Name : boardparms.h ++ * ++ * Description: This file contains definitions and function prototypes for ++ * the BCM63xx board parameter access functions. ++ * ++ * Updates : 07/14/2003 Created. ++ ***************************************************************************/ ++ ++#if !defined(_BOARDPARMS_H) ++#define _BOARDPARMS_H ++ ++#if __cplusplus ++extern "C" { ++#endif ++ ++/* Return codes. */ ++#define BP_SUCCESS 0 ++#define BP_BOARD_ID_NOT_FOUND 1 ++#define BP_VALUE_NOT_DEFINED 2 ++#define BP_BOARD_ID_NOT_SET 3 ++ ++/* Values for BpGetSdramSize. */ ++#define BP_MEMORY_8MB_1_CHIP 0 ++#define BP_MEMORY_16MB_1_CHIP 1 ++#define BP_MEMORY_32MB_1_CHIP 2 ++#define BP_MEMORY_64MB_2_CHIP 3 ++#define BP_MEMORY_32MB_2_CHIP 4 ++#define BP_MEMORY_16MB_2_CHIP 5 ++ ++/* Values for EthernetMacInfo PhyType. */ ++#define BP_ENET_NO_PHY 0 ++#define BP_ENET_INTERNAL_PHY 1 ++#define BP_ENET_EXTERNAL_PHY 2 ++#define BP_ENET_EXTERNAL_SWITCH 3 ++ ++/* Values for EthernetMacInfo Configuration type. */ ++#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ ++#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ ++#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ ++#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ ++ ++/* Values for EthernetMacInfo Reverse MII. */ ++#define BP_ENET_NO_REVERSE_MII 0 ++#define BP_ENET_REVERSE_MII 1 ++ ++/* Values for VoIPDSPInfo DSPType. */ ++#define BP_VOIP_NO_DSP 0 ++#define BP_VOIP_DSP 1 ++ ++ ++/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ ++#define BP_ACTIVE_MASK 0x8000 ++#define BP_ACTIVE_HIGH 0x0000 ++#define BP_ACTIVE_LOW 0x8000 ++#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) ++#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) ++#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) ++#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) ++#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) ++#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) ++#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) ++#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) ++#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) ++#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) ++#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) ++#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) ++#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) ++#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) ++#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) ++#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) ++#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) ++#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) ++#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) ++#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) ++#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) ++#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) ++#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) ++#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) ++#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) ++#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) ++#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) ++#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) ++#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) ++#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) ++#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) ++#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) ++#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) ++#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) ++#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) ++#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) ++#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) ++#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) ++#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) ++#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) ++#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) ++#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) ++#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) ++#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) ++#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) ++#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) ++#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) ++#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) ++#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) ++#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) ++#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) ++#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) ++#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) ++#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) ++#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) ++#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) ++#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) ++#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) ++#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) ++#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) ++#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) ++#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) ++#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) ++#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) ++#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) ++#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) ++#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) ++#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) ++#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) ++#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) ++#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) ++#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) ++#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) ++#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) ++ ++/* Values for external interrupt assignments. */ ++#define BP_EXT_INTR_0 0 ++#define BP_EXT_INTR_1 1 ++#define BP_EXT_INTR_2 2 ++#define BP_EXT_INTR_3 3 ++ ++/* Values for chip select assignments. */ ++#define BP_CS_0 0 ++#define BP_CS_1 1 ++#define BP_CS_2 2 ++#define BP_CS_3 3 ++ ++/* Value for GPIO and external interrupt fields that are not used. */ ++#define BP_NOT_DEFINED 0xffff ++#define BP_HW_DEFINED 0xfff0 ++#define BP_UNEQUIPPED 0xfff1 ++ ++/* Maximum size of the board id string. */ ++#define BP_BOARD_ID_LEN 16 ++ ++/* Maximum number of Ethernet MACs. */ ++#define BP_MAX_ENET_MACS 2 ++ ++/* Maximum number of VoIP DSPs. */ ++#define BP_MAX_VOIP_DSP 2 ++ ++/* Wireless Antenna Settings. */ ++#define BP_WLAN_ANT_MAIN 0 ++#define BP_WLAN_ANT_AUX 1 ++#define BP_WLAN_ANT_BOTH 3 ++ ++#if !defined(__ASSEMBLER__) ++ ++/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, ++ * then the other fields are not valid. ++ */ ++typedef struct EthernetMacInfo ++{ ++ unsigned char ucPhyType; /* BP_ENET_xxx */ ++ unsigned char ucPhyAddress; /* 0 to 31 */ ++ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ ++ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ ++ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ ++ unsigned short numSwitchPorts; /* Number of PHY ports */ ++ unsigned short usConfigType; /* Configuration type */ ++ unsigned short usReverseMii; /* Reverse MII */ ++} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; ++ ++ ++/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, ++ * then the other fields are not valid. ++ */ ++typedef struct VoIPDspInfo ++{ ++ unsigned char ucDspType; ++ unsigned char ucDspAddress; ++ unsigned short usExtIntrVoip; ++ unsigned short usGpioVoipReset; ++ unsigned short usGpioVoipIntr; ++ unsigned short usGpioLedVoip; ++ unsigned short usCsVoip; ++ ++} VOIP_DSP_INFO; ++ ++ ++/************************************************************************** ++ * Name : BpSetBoardId ++ * ++ * Description: This function find the BOARD_PARAMETERS structure for the ++ * specified board id string and assigns it to a global, static ++ * variable. ++ * ++ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not ++ * have a board parameters configuration record. ++ ***************************************************************************/ ++int BpSetBoardId( char *pszBoardId ); ++ ++/************************************************************************** ++ * Name : BpGetBoardIds ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id ++ * strings are returned in. Each id starts at BP_BOARD_ID_LEN ++ * boundary. ++ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that ++ * were allocated in pszBoardIds. ++ * ++ * Returns : Number of board id strings returned. ++ ***************************************************************************/ ++int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); ++ ++/************************************************************************** ++ * Name : BpGetEthernetMacInfo ++ * ++ * Description: This function returns all of the supported board id strings. ++ * ++ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO ++ * buffers. ++ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that ++ * are pointed to by pEnetInfos. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); ++ ++/************************************************************************** ++ * Name : BpGetSdramSize ++ * ++ * Description: This function returns a constant that describees the board's ++ * SDRAM type and size. ++ * ++ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size ++ * is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetSdramSize( unsigned long *pulSdramSize ); ++ ++/************************************************************************** ++ * Name : BpGetPsiSize ++ * ++ * Description: This function returns the persistent storage size in K bytes. ++ * ++ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent ++ * storage size is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ ***************************************************************************/ ++int BpGetPsiSize( unsigned long *pulPsiSize ); ++ ++/************************************************************************** ++ * Name : BpGetRj11InnerOuterPairGpios ++ * ++ * Description: This function returns the GPIO pin assignments for changing ++ * between the RJ11 inner pair and RJ11 outer pair. ++ * ++ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair ++ * GPIO pin is returned in. ++ * [OUT] pusOuter - Address of short word that the RJ11 outer pair ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, ++ unsigned short *pusOuter ); ++ ++/************************************************************************** ++ * Name : BpGetPressAndHoldResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the press ++ * and hold reset button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the press and hold ++ * reset button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipIntrGpio ++ * ++ * Description: This function returns the GPIO pin assignment for VoIP interrupt. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt ++ * GPIO pin is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPcmciaResetGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PCMCIA ++ * Reset operation. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPcmciaResetGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUartRtsCtsGpios ++ * ++ * Description: This function returns the GPIO pin assignments for RTS and CTS ++ * UART signals. ++ * ++ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO ++ * pin is returned in. ++ * [OUT] pusCts - Address of short word that the UART CTS GPIO ++ * pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, values are returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); ++ ++/************************************************************************** ++ * Name : BpGetAdslLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the ADSL ++ * LED that is used when there is a DSL connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessAntInUse ++ * ++ * Description: This function returns the antennas in use for wireless ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna ++ * is in use. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessAntInUse( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesBtnGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Button GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesExtIntr ++ * ++ * Description: This function returns the external interrupt number for the ++ * Wireless Ses Button. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * external interrup is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesExtIntr( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessSesLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the Wireless ++ * Ses Led. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses ++ * Led GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessSesLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetUsbLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the USB ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the USB LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetUsbLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the HPNA ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWanDataLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the WAN Data ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWanDataLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetPppFailLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the PPP ++ * LED that is used when there is a PPP connection failure. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the PPP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetPppFailLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the VOIP ++ * LED. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderPowerOnLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the power ++ * on LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderAlarmLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the alarm ++ * LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the alarm LED ++ * GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderResetCfgLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the reset ++ * configuration LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the reset ++ * configuration LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetBootloaderStopLedGpio ++ * ++ * Description: This function returns the GPIO pin assignment for the break ++ * into bootloader LED that is set by the bootloader. ++ * ++ * Parameters : [OUT] pusValue - Address of short word that the break into ++ * bootloader LED GPIO pin is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); ++ ++/************************************************************************** ++ * Name : BpGetWirelessExtIntr ++ * ++ * Description: This function returns the Wireless external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the wireless ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetWirelessExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetAdslDyingGaspExtIntr ++ * ++ * Description: This function returns the ADSL Dying Gasp external interrupt ++ * number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipExtIntr ++ * ++ * Description: This function returns the VOIP external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * external interrupt number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaExtIntr ++ * ++ * Description: This function returns the HPNA external interrupt number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * external interrupt number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaExtIntr( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetHpnaChipSelect ++ * ++ * Description: This function returns the HPNA chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the HPNA ++ * chip select number is returned in. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetHpnaChipSelect( unsigned long *pulValue ); ++ ++/************************************************************************** ++ * Name : BpGetVoipChipSelect ++ * ++ * Description: This function returns the VOIP chip select number. ++ * ++ * Parameters : [OUT] pulValue - Address of short word that the VOIP ++ * chip select number is returned in. ++ * [IN] dspNum - Address of the DSP to query. ++ * ++ * Returns : BP_SUCCESS - Success, value is returned. ++ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. ++ * BP_VALUE_NOT_DEFINED - At least one return value is not defined ++ * for the board. ++ ***************************************************************************/ ++int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); ++ ++#endif /* __ASSEMBLER__ */ ++ ++#if __cplusplus ++} ++#endif ++ ++#endif /* _BOARDPARMS_H */ ++ +diff -urN linux.old/boardparms/bcm963xx/Makefile linux.dev/boardparms/bcm963xx/Makefile +--- linux.old/boardparms/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/boardparms/bcm963xx/Makefile 2006-08-25 00:39:38.000000000 +0200 +@@ -0,0 +1,16 @@ ++ ++ifeq ($(CONFIG_MIPS_BRCM),y) ++ ++# Linux ++obj-y += boardparms.o ++EXTRA_CFLAGS += -DCONFIG_BCM9$(BRCM_CHIP) ++-include $(TOPDIR)/Rules.make ++ ++else ++ ++# CFE ++BSPOBJS += boardparms.o ++ ++endif ++ ++ +diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h +--- linux.old/include/asm-mips/bootinfo.h 2006-08-25 00:43:22.000000000 +0200 ++++ linux.dev/include/asm-mips/bootinfo.h 2006-08-25 00:39:38.000000000 +0200 +@@ -218,6 +218,14 @@ + #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ + #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ + ++/* ++ * Valid machtype for group BRCM ++ */ ++#define MACH_GROUP_BRCM 23 /* Broadcom boards */ ++#define MACH_BCM96338 0 ++#define MACH_BCM96345 1 ++#define MACH_BCM96348 2 ++ + #define CL_SIZE COMMAND_LINE_SIZE + + const char *get_system_type(void); +diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h +--- linux.old/include/asm-mips/cpu.h 2006-08-25 00:43:22.000000000 +0200 ++++ linux.dev/include/asm-mips/cpu.h 2006-08-25 00:39:38.000000000 +0200 +@@ -103,6 +103,13 @@ + + #define PRID_IMP_SR71000 0x0400 + ++/* These are the PRID's for when 23:16 == PRID_COMP_BROADCOM ++ */ ++ ++#define PRID_IMP_BCM6338 0x9000 ++#define PRID_IMP_BCM6345 0x8000 ++#define PRID_IMP_BCM6348 0x9100 ++ + /* + * Definitions for 7:0 on legacy processors + */ +@@ -200,7 +207,10 @@ + #define CPU_SB1A 62 + #define CPU_74K 63 + #define CPU_R14000 64 +-#define CPU_LAST 64 ++#define CPU_BCM6338 65 ++#define CPU_BCM6345 66 ++#define CPU_BCM6348 67 ++#define CPU_LAST 67 + + /* + * ISA Level encodings +diff -urN linux.old/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h linux.dev/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h +--- linux.old/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 2006-08-25 11:27:40.000000000 +0200 +@@ -0,0 +1,36 @@ ++#ifndef __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H ++#define __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H ++ ++#define cpu_has_tlb 1 ++#define cpu_has_4kex 4 ++#define cpu_has_4ktlb 8 ++#define cpu_has_fpu 0 ++#define cpu_has_32fpr 0 ++#define cpu_has_counter 0x40 ++#define cpu_has_watch 0 ++#define cpu_has_mips16 0 ++#define cpu_has_divec 0x200 ++#define cpu_has_vce 0 ++#define cpu_has_cache_cdex_p 0 ++#define cpu_has_cache_cdex_s 0 ++#define cpu_has_prefetch 0x40000 ++#define cpu_has_mcheck 0x2000 ++#define cpu_has_ejtag 0x4000 ++#define cpu_has_llsc 0x10000 ++#define cpu_has_vtag_icache 0 ++#define cpu_has_dc_aliases 0 ++#define cpu_has_ic_fills_f_dc 0 ++ ++#define cpu_has_nofpuex 0 ++#define cpu_has_64bits 0 ++#define cpu_has_64bit_zero_reg 0 ++#define cpu_has_64bit_gp_regs 0 ++#define cpu_has_64bit_addresses 0 ++ ++#define cpu_has_subset_pcaches 0 ++ ++#define cpu_dcache_line_size() 16 ++#define cpu_icache_line_size() 16 ++#define cpu_scache_line_size() 0 ++ ++#endif /* __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H */ +diff -urN linux.old/include/asm-mips/mach-generic/param.h linux.dev/include/asm-mips/mach-generic/param.h +--- linux.old/include/asm-mips/mach-generic/param.h 2006-08-25 00:43:22.000000000 +0200 ++++ linux.dev/include/asm-mips/mach-generic/param.h 2006-08-25 00:39:38.000000000 +0200 +@@ -8,6 +8,6 @@ + #ifndef __ASM_MACH_GENERIC_PARAM_H + #define __ASM_MACH_GENERIC_PARAM_H + +-#define HZ 1000 /* Internal kernel timer frequency */ ++#define HZ 200 /* Internal kernel timer frequency */ + + #endif /* __ASM_MACH_GENERIC_PARAM_H */ +diff -urN linux.old/include/asm-mips/module.h linux.dev/include/asm-mips/module.h +--- linux.old/include/asm-mips/module.h 2006-08-25 00:43:22.000000000 +0200 ++++ linux.dev/include/asm-mips/module.h 2006-08-25 00:39:38.000000000 +0200 +@@ -113,6 +113,12 @@ + #define MODULE_PROC_FAMILY "RM9000 " + #elif defined CONFIG_CPU_SB1 + #define MODULE_PROC_FAMILY "SB1 " ++#elif defined CONFIG_CPU_BCM6338 ++#define MODULE_PROC_FAMILY "BCM6338 " ++#elif defined CONFIG_CPU_BCM6345 ++#define MODULE_PROC_FAMILY "BCM6345 " ++#elif defined CONFIG_CPU_BCM6348 ++#define MODULE_PROC_FAMILY "BCM6348 " + #else + #error MODULE_PROC_FAMILY undefined for your processor configuration + #endif diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch deleted file mode 100644 index 9e667989857..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-brcm_boards.patch +++ /dev/null @@ -1,9249 +0,0 @@ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_flash.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,775 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ *************************************************************************** -+ * File Name : bcm63xx_flash.c -+ * -+ * Description: This file contains the flash device driver APIs for bcm63xx board. -+ * -+ * Created on : 8/10/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) -+ * -+ ***************************************************************************/ -+ -+ -+/* Includes. */ -+#include <linux/fs.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <asm/uaccess.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#define BCMTAG_EXE_USE -+#include <bcmTag.h> -+#include "cfiflash.h" -+#include "boardparms.h" -+ -+//#define DEBUG_FLASH -+ -+static FLASH_ADDR_INFO fInfo; -+static int flashInitialized = 0; -+ -+void *retriedKmalloc(size_t size) -+{ -+ void *pBuf; -+ int tryCount = 0; -+ -+ // try 1000 times before quit -+ while (((pBuf = kmalloc(size, GFP_KERNEL)) == NULL) && (tryCount++ < 1000)) -+ { -+ current->state = TASK_INTERRUPTIBLE; -+ schedule_timeout(HZ/10); -+ } -+ if (tryCount >= 1000) -+ pBuf = NULL; -+ else -+ memset(pBuf, 0, size); -+ -+ return pBuf; -+} -+ -+void retriedKfree(void *pBuf) -+{ -+ kfree(pBuf); -+} -+ -+/*************************************************************************** -+// Function Name: getCrc32 -+// Description : caculate the CRC 32 of the given data. -+// Parameters : pdata - array of data. -+// size - number of input data bytes. -+// crc - either CRC32_INIT_VALUE or previous return value. -+// Returns : crc. -+****************************************************************************/ -+UINT32 getCrc32(byte *pdata, UINT32 size, UINT32 crc) -+{ -+ while (size-- > 0) -+ crc = (crc >> 8) ^ Crc32_table[(crc ^ *pdata++) & 0xff]; -+ -+ return crc; -+} -+ -+// get the nvram start addr -+// -+unsigned long get_nvram_start_addr(void) -+{ -+ return ((unsigned long) -+ (flash_get_memptr(fInfo.flash_nvram_start_blk) + fInfo.flash_nvram_blk_offset)); -+} -+ -+// get the scratch_pad start addr -+// -+unsigned long get_scratch_pad_start_addr(void) -+{ -+ return ((unsigned long) -+ (flash_get_memptr(fInfo.flash_scratch_pad_start_blk) + fInfo.flash_scratch_pad_blk_offset)); -+} -+ -+ -+ -+/* ********************************************************************* -+ * kerSysImageTagGet() -+ * Get the image tag -+ * Input parameters: -+ * none -+ * Return value: -+ * point to tag -- Found -+ * NULL -- failed -+ ********************************************************************* */ -+PFILE_TAG kerSysImageTagGet(void) -+{ -+ int i; -+ int totalBlks = flash_get_numsectors(); -+ UINT32 crc; -+ unsigned char *sectAddr; -+ PFILE_TAG pTag; -+ -+#if defined(DEBUG_FLASH) -+ printk("totalblks in tagGet=%d\n", totalBlks); -+#endif -+ -+ // start from 2nd blk, assume 1st one is always CFE -+ for (i = 1; i < totalBlks; i++) -+ { -+ sectAddr = flash_get_memptr((byte) i); -+ crc = CRC32_INIT_VALUE; -+ crc = getCrc32(sectAddr, (UINT32)TAG_LEN-TOKEN_LEN, crc); -+ pTag = (PFILE_TAG) sectAddr; -+ -+#if defined(DEBUG_FLASH) -+ printk("Check Tag crc on blk [%d]\n", i); -+#endif -+ -+ if (crc == (UINT32)(*(UINT32*)(pTag->tagValidationToken))) -+ return pTag; -+ } -+ -+ return (PFILE_TAG) NULL; -+} -+ -+// Initialize the flash and fill out the fInfo structure -+void kerSysFlashInit( void ) -+{ -+ int i = 0; -+ int totalBlks = 0; -+ int totalSize = 0; -+ int startAddr = 0; -+ int usedBlkSize = 0; -+ NVRAM_DATA nvramData; -+ UINT32 crc = CRC32_INIT_VALUE, savedCrc; -+ PFILE_TAG pTag = NULL; -+ unsigned long kernelEndAddr = 0; -+ unsigned long spAddr = 0; -+ -+ if (flashInitialized) -+ return; -+ -+ flashInitialized = 1; -+ flash_init(); -+ -+ totalBlks = flash_get_numsectors(); -+ totalSize = flash_get_total_size(); -+ -+ printk("Total Flash size: %dK with %d sectors\n", totalSize/1024, totalBlks); -+ -+ /* nvram is always at the end of flash */ -+ fInfo.flash_nvram_length = FLASH45_LENGTH_NVRAM; -+ fInfo.flash_nvram_start_blk = 0; /* always the first block */ -+ fInfo.flash_nvram_number_blk = 1; /*always fits in the first block */ -+ fInfo.flash_nvram_blk_offset = NVRAM_DATA_OFFSET; -+ -+ // check nvram CRC -+ memcpy((char *)&nvramData, (char *)get_nvram_start_addr(), sizeof(NVRAM_DATA)); -+ savedCrc = nvramData.ulCheckSum; -+ nvramData.ulCheckSum = 0; -+ crc = getCrc32((char *)&nvramData, (UINT32) sizeof(NVRAM_DATA), crc); -+ -+ BpSetBoardId( nvramData.szBoardId ); -+ -+ fInfo.flash_persistent_length = NVRAM_PSI_DEFAULT; -+ if (savedCrc != crc) -+ { -+ printk("***Board is not initialized****: Using the default PSI size: %d\n", -+ fInfo.flash_persistent_length); -+ } -+ else -+ { -+ unsigned long ulPsiSize; -+ if( BpGetPsiSize( &ulPsiSize ) == BP_SUCCESS ) -+ fInfo.flash_persistent_length = ulPsiSize; -+ else -+ { -+ printk("***Board id is not set****: Using the default PSI size: %d\n", -+ fInfo.flash_persistent_length); -+ } -+ } -+ -+ fInfo.flash_persistent_length *= ONEK; -+ startAddr = totalSize - fInfo.flash_persistent_length; -+ fInfo.flash_persistent_start_blk = flash_get_blk(startAddr+FLASH_BASE_ADDR_REG); -+ fInfo.flash_persistent_number_blk = totalBlks - fInfo.flash_persistent_start_blk; -+ // save abs SP address (Scratch Pad). it is before PSI -+ spAddr = startAddr - SP_MAX_LEN ; -+ // find out the offset in the start_blk -+ usedBlkSize = 0; -+ for (i = fInfo.flash_persistent_start_blk; -+ i < (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk); i++) -+ { -+ usedBlkSize += flash_get_sector_size((byte) i); -+ } -+ fInfo.flash_persistent_blk_offset = usedBlkSize - fInfo.flash_persistent_length; -+ -+ // get the info for sp -+ if (!(pTag = kerSysImageTagGet())) -+ { -+ printk("Failed to read image tag from flash\n"); -+ return; -+ } -+ kernelEndAddr = (unsigned long) simple_strtoul(pTag->kernelAddress, NULL, 10) + \ -+ (unsigned long) simple_strtoul(pTag->kernelLen, NULL, 10); -+ -+ // make suer sp does not share kernel block -+ fInfo.flash_scratch_pad_start_blk = flash_get_blk(spAddr+FLASH_BASE_ADDR_REG); -+ if (fInfo.flash_scratch_pad_start_blk != flash_get_blk(kernelEndAddr)) -+ { -+ fInfo.flash_scratch_pad_length = SP_MAX_LEN; -+ if (fInfo.flash_persistent_start_blk == fInfo.flash_scratch_pad_start_blk) // share blk -+ { -+#if 1 /* do not used scratch pad unless it's in its own sector */ -+ printk("Scratch pad is not used for this flash part.\n"); -+ fInfo.flash_scratch_pad_length = 0; // no sp -+#else /* allow scratch pad to share a sector with another section such as PSI */ -+ fInfo.flash_scratch_pad_number_blk = 1; -+ fInfo.flash_scratch_pad_blk_offset = fInfo.flash_persistent_blk_offset - fInfo.flash_scratch_pad_length; -+#endif -+ } -+ else // on different blk -+ { -+ fInfo.flash_scratch_pad_number_blk = fInfo.flash_persistent_start_blk\ -+ - fInfo.flash_scratch_pad_start_blk; -+ // find out the offset in the start_blk -+ usedBlkSize = 0; -+ for (i = fInfo.flash_scratch_pad_start_blk; -+ i < (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk); i++) -+ usedBlkSize += flash_get_sector_size((byte) i); -+ fInfo.flash_scratch_pad_blk_offset = usedBlkSize - fInfo.flash_scratch_pad_length; -+ } -+ } -+ else -+ { -+ printk("No flash for scratch pad!\n"); -+ fInfo.flash_scratch_pad_length = 0; // no sp -+ } -+ -+#if defined(DEBUG_FLASH) -+ printk("fInfo.flash_scratch_pad_start_blk = %d\n", fInfo.flash_scratch_pad_start_blk); -+ printk("fInfo.flash_scratch_pad_number_blk = %d\n", fInfo.flash_scratch_pad_number_blk); -+ printk("fInfo.flash_scratch_pad_length = 0x%x\n", fInfo.flash_scratch_pad_length); -+ printk("fInfo.flash_scratch_pad_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_scratch_pad_blk_offset); -+ -+ printk("fInfo.flash_nvram_start_blk = %d\n", fInfo.flash_nvram_start_blk); -+ printk("fInfo.flash_nvram_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_nvram_blk_offset); -+ printk("fInfo.flash_nvram_number_blk = %d\n", fInfo.flash_nvram_number_blk); -+ -+ printk("psi startAddr = %x\n", startAddr+FLASH_BASE_ADDR_REG); -+ printk("fInfo.flash_persistent_start_blk = %d\n", fInfo.flash_persistent_start_blk); -+ printk("fInfo.flash_persistent_blk_offset = 0x%x\n", (unsigned int)fInfo.flash_persistent_blk_offset); -+ printk("fInfo.flash_persistent_number_blk = %d\n", fInfo.flash_persistent_number_blk); -+#endif -+ -+} -+ -+ -+ -+/*********************************************************************** -+ * Function Name: kerSysFlashAddrInfoGet -+ * Description : Fills in a structure with information about the NVRAM -+ * and persistent storage sections of flash memory. -+ * Fro physmap.c to mount the fs vol. -+ * Returns : None. -+ ***********************************************************************/ -+void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info) -+{ -+ pflash_addr_info->flash_nvram_blk_offset = fInfo.flash_nvram_blk_offset; -+ pflash_addr_info->flash_nvram_length = fInfo.flash_nvram_length; -+ pflash_addr_info->flash_nvram_number_blk = fInfo.flash_nvram_number_blk; -+ pflash_addr_info->flash_nvram_start_blk = fInfo.flash_nvram_start_blk; -+ pflash_addr_info->flash_persistent_blk_offset = fInfo.flash_persistent_blk_offset; -+ pflash_addr_info->flash_persistent_length = fInfo.flash_persistent_length; -+ pflash_addr_info->flash_persistent_number_blk = fInfo.flash_persistent_number_blk; -+ pflash_addr_info->flash_persistent_start_blk = fInfo.flash_persistent_start_blk; -+} -+ -+ -+// get shared blks into *** pTempBuf *** which has to be released bye the caller! -+// return: if pTempBuf != NULL, poits to the data with the dataSize of the buffer -+// !NULL -- ok -+// NULL -- fail -+static char *getSharedBlks(int start_blk, int end_blk) -+{ -+ int i = 0; -+ int usedBlkSize = 0; -+ int sect_size = 0; -+ char *pTempBuf = NULL; -+ char *pBuf = NULL; -+ -+ for (i = start_blk; i < end_blk; i++) -+ usedBlkSize += flash_get_sector_size((byte) i); -+ -+#if defined(DEBUG_FLASH) -+ printk("usedBlkSize = %d\n", usedBlkSize); -+#endif -+ -+ if ((pTempBuf = (char *) retriedKmalloc(usedBlkSize)) == NULL) -+ { -+ printk("failed to allocate memory with size: %d\n", usedBlkSize); -+ return pTempBuf; -+ } -+ -+ pBuf = pTempBuf; -+ for (i = start_blk; i < end_blk; i++) -+ { -+ sect_size = flash_get_sector_size((byte) i); -+ -+#if defined(DEBUG_FLASH) -+ printk("i = %d, sect_size = %d, end_blk = %d\n", i, sect_size, end_blk); -+#endif -+ flash_read_buf((byte)i, 0, pBuf, sect_size); -+ pBuf += sect_size; -+ } -+ -+ return pTempBuf; -+} -+ -+ -+ -+// Set the pTempBuf to flash from start_blk to end_blk -+// return: -+// 0 -- ok -+// -1 -- fail -+static int setSharedBlks(int start_blk, int end_blk, char *pTempBuf) -+{ -+ int i = 0; -+ int sect_size = 0; -+ int sts = 0; -+ char *pBuf = pTempBuf; -+ -+ for (i = start_blk; i < end_blk; i++) -+ { -+ sect_size = flash_get_sector_size((byte) i); -+ flash_sector_erase_int(i); -+ if (flash_write_buf(i, 0, pBuf, sect_size) != sect_size) -+ { -+ printk("Error writing flash sector %d.", i); -+ sts = -1; -+ break; -+ } -+ pBuf += sect_size; -+ } -+ -+ return sts; -+} -+ -+ -+ -+/******************************************************************************* -+ * NVRAM functions -+ *******************************************************************************/ -+ -+// get nvram data -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysNvRamGet(char *string, int strLen, int offset) -+{ -+ char *pBuf = NULL; -+ -+ if (!flashInitialized) -+ kerSysFlashInit(); -+ -+ if (strLen > FLASH45_LENGTH_NVRAM) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) -+ return -1; -+ -+ // get string off the memory buffer -+ memcpy(string, (pBuf + fInfo.flash_nvram_blk_offset + offset), strLen); -+ -+ retriedKfree(pBuf); -+ -+ return 0; -+} -+ -+ -+// set nvram -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysNvRamSet(char *string, int strLen, int offset) -+{ -+ int sts = 0; -+ char *pBuf = NULL; -+ -+ if (strLen > FLASH45_LENGTH_NVRAM) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_start_blk + fInfo.flash_nvram_number_blk))) == NULL) -+ return -1; -+ -+ // set string to the memory buffer -+ memcpy((pBuf + fInfo.flash_nvram_blk_offset + offset), string, strLen); -+ -+ if (setSharedBlks(fInfo.flash_nvram_start_blk, -+ (fInfo.flash_nvram_number_blk + fInfo.flash_nvram_start_blk), pBuf) != 0) -+ sts = -1; -+ -+ retriedKfree(pBuf); -+ -+ return sts; -+} -+ -+ -+/*********************************************************************** -+ * Function Name: kerSysEraseNvRam -+ * Description : Erase the NVRAM storage section of flash memory. -+ * Returns : 1 -- ok, 0 -- fail -+ ***********************************************************************/ -+int kerSysEraseNvRam(void) -+{ -+ int sts = 1; -+ char *tempStorage = retriedKmalloc(FLASH45_LENGTH_NVRAM); -+ -+ // just write the whole buf with '0xff' to the flash -+ if (!tempStorage) -+ sts = 0; -+ else -+ { -+ memset(tempStorage, 0xff, FLASH45_LENGTH_NVRAM); -+ if (kerSysNvRamSet(tempStorage, FLASH45_LENGTH_NVRAM, 0) != 0) -+ sts = 0; -+ retriedKfree(tempStorage); -+ } -+ -+ return sts; -+} -+ -+ -+/******************************************************************************* -+ * PSI functions -+ *******************************************************************************/ -+// get psi data -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysPersistentGet(char *string, int strLen, int offset) -+{ -+ char *pBuf = NULL; -+ -+ if (strLen > fInfo.flash_persistent_length) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) -+ return -1; -+ -+ // get string off the memory buffer -+ memcpy(string, (pBuf + fInfo.flash_persistent_blk_offset + offset), strLen); -+ -+ retriedKfree(pBuf); -+ -+ return 0; -+} -+ -+ -+// set psi -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysPersistentSet(char *string, int strLen, int offset) -+{ -+ int sts = 0; -+ char *pBuf = NULL; -+ -+ if (strLen > fInfo.flash_persistent_length) -+ return -1; -+ -+ if ((pBuf = getSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_start_blk + fInfo.flash_persistent_number_blk))) == NULL) -+ return -1; -+ -+ // set string to the memory buffer -+ memcpy((pBuf + fInfo.flash_persistent_blk_offset + offset), string, strLen); -+ -+ if (setSharedBlks(fInfo.flash_persistent_start_blk, -+ (fInfo.flash_persistent_number_blk + fInfo.flash_persistent_start_blk), pBuf) != 0) -+ sts = -1; -+ -+ retriedKfree(pBuf); -+ -+ return sts; -+} -+ -+ -+// flash bcm image -+// return: -+// 0 - ok -+// !0 - the sector number fail to be flashed (should not be 0) -+int kerSysBcmImageSet( int flash_start_addr, char *string, int size) -+{ -+ int sts; -+ int sect_size; -+ int blk_start; -+ int i; -+ char *pTempBuf = NULL; -+ int whole_image = 0; -+ -+ blk_start = flash_get_blk(flash_start_addr); -+ if( blk_start < 0 ) -+ return( -1 ); -+ -+ if (flash_start_addr == FLASH_BASE && size > FLASH45_LENGTH_BOOT_ROM) -+ whole_image = 1; -+ -+ /* write image to flash memory */ -+ do -+ { -+ sect_size = flash_get_sector_size(blk_start); -+// NOTE: for memory problem in multiple PVC configuration, temporary get rid of kmalloc this 64K for now. -+// if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) -+// { -+// printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); -+// kerSysMipsSoftReset(); // reset the board right away. -+// } -+ // for whole image, no check on psi -+ if (!whole_image && blk_start == fInfo.flash_persistent_start_blk) // share the blk with psi -+ { -+ if (size > (sect_size - fInfo.flash_persistent_length)) -+ { -+ printk("Image is too big\n"); -+ break; // image is too big. Can not overwrite to nvram -+ } -+ if ((pTempBuf = (char *)retriedKmalloc(sect_size)) == NULL) -+ { -+ printk("Failed to allocate memory with size: %d. Reset the router...\n", sect_size); -+ kerSysMipsSoftReset(); // reset the board right away. -+ } -+ flash_read_buf((byte)blk_start, 0, pTempBuf, sect_size); -+ if (copy_from_user((void *)pTempBuf,(void *)string, size) != 0) -+ break; // failed ? -+ flash_sector_erase_int(blk_start); // erase blk before flash -+ if (flash_write_buf(blk_start, 0, pTempBuf, sect_size) == sect_size) -+ size = 0; // break out and say all is ok -+ retriedKfree(pTempBuf); -+ break; -+ } -+ -+ flash_sector_erase_int(blk_start); // erase blk before flash -+ -+ if (sect_size > size) -+ { -+ if (size & 1) -+ size++; -+ sect_size = size; -+ } -+ -+ if ((i = flash_write_buf(blk_start, 0, string, sect_size)) != sect_size) { -+ break; -+ } -+ blk_start++; -+ string += sect_size; -+ size -= sect_size; -+ } while (size > 0); -+ -+ if (whole_image) -+ { -+ // If flashing a whole image, erase to end of flash. -+ int total_blks = flash_get_numsectors(); -+ while( blk_start < total_blks ) -+ { -+ flash_sector_erase_int(blk_start); -+ blk_start++; -+ } -+ } -+ if (pTempBuf) -+ retriedKfree(pTempBuf); -+ -+ if( size == 0 ) -+ sts = 0; // ok -+ else -+ sts = blk_start; // failed to flash this sector -+ -+ return sts; -+} -+ -+/******************************************************************************* -+ * SP functions -+ *******************************************************************************/ -+// get sp data. NOTE: memcpy work here -- not using copy_from/to_user -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysScratchPadGet(char *tokenId, char *tokBuf, int bufLen) -+{ -+ PSP_HEADER pHead = NULL; -+ PSP_TOKEN pToken = NULL; -+ char *pBuf = NULL; -+ char *pShareBuf = NULL; -+ char *startPtr = NULL; -+ char *endPtr = NULL; -+ char *spEndPtr = NULL; -+ int sts = -1; -+ -+ if (fInfo.flash_scratch_pad_length == 0) -+ return sts; -+ -+ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) -+ { -+ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ -+ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); -+ return sts; -+ } -+ -+ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) -+ return sts; -+ -+ // pBuf points to SP buf -+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; -+ -+ pHead = (PSP_HEADER) pBuf; -+ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) -+ { -+ printk("Scrap pad is not initialized.\n"); -+ return sts; -+ } -+ -+ // search up to SPUsedLen for the token -+ startPtr = pBuf + sizeof(SP_HEADER); -+ endPtr = pBuf + pHead->SPUsedLen; -+ spEndPtr = pBuf + SP_MAX_LEN; -+ while (startPtr < endPtr && startPtr < spEndPtr) -+ { -+ pToken = (PSP_TOKEN) startPtr; -+ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) -+ { -+ memcpy(tokBuf, startPtr + sizeof(SP_TOKEN), bufLen); -+ sts = 0; -+ break; -+ } -+ // get next token -+ startPtr += sizeof(SP_TOKEN) + pToken->tokenLen; -+ } -+ -+ retriedKfree(pShareBuf); -+ -+ return sts; -+} -+ -+ -+// set sp. NOTE: memcpy work here -- not using copy_from/to_user -+// return: -+// 0 - ok -+// -1 - fail -+int kerSysScratchPadSet(char *tokenId, char *tokBuf, int bufLen) -+{ -+ PSP_TOKEN pToken = NULL; -+ PSP_HEADER pHead = NULL; -+ char *pShareBuf = NULL; -+ char *pBuf = NULL; -+ SP_HEADER SPHead; -+ SP_TOKEN SPToken; -+ char *curPtr; -+ int sts = -1; -+ -+ if (fInfo.flash_scratch_pad_length == 0) -+ return sts; -+ -+ if (bufLen >= (fInfo.flash_scratch_pad_length - sizeof(SP_HEADER) - sizeof(SP_TOKEN))) -+ { -+ printk("Exceed scratch pad space by %d\n", bufLen - fInfo.flash_scratch_pad_length \ -+ - sizeof(SP_HEADER) - sizeof(SP_TOKEN)); -+ return sts; -+ } -+ -+ if ((pShareBuf = getSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk))) == NULL) -+ return sts; -+ -+ // pBuf points to SP buf -+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset; -+ pHead = (PSP_HEADER) pBuf; -+ -+ // form header info. SPUsedLen later on... -+ memset((char *)&SPHead, 0, sizeof(SP_HEADER)); -+ memcpy(SPHead.SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN); -+ SPHead.SPVersion = SP_VERSION; -+ -+ // form token info. -+ memset((char*)&SPToken, 0, sizeof(SP_TOKEN)); -+ strncpy(SPToken.tokenName, tokenId, TOKEN_NAME_LEN - 1); -+ SPToken.tokenLen = bufLen; -+ if (memcmp(pHead->SPMagicNum, MAGIC_NUMBER, MAGIC_NUM_LEN) != 0) -+ { -+ // new sp, so just flash the token -+ printk("No Scrap pad found. Initialize scratch pad...\n"); -+ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; -+ memcpy(pBuf, (char *)&SPHead, sizeof(SP_HEADER)); -+ curPtr = pBuf + sizeof(SP_HEADER); -+ memcpy(curPtr, (char *)&SPToken, sizeof(SP_TOKEN)); -+ curPtr += sizeof(SP_TOKEN); -+ memcpy(curPtr, tokBuf, bufLen); -+ } -+ else -+ { -+ // need search for the token, if exist with same size overwrite it. if sizes differ, -+ // move over the later token data over and put the new one at the end -+ char *endPtr = pBuf + pHead->SPUsedLen; -+ char *spEndPtr = pBuf + SP_MAX_LEN; -+ curPtr = pBuf + sizeof(SP_HEADER); -+ while (curPtr < endPtr && curPtr < spEndPtr) -+ { -+ pToken = (PSP_TOKEN) curPtr; -+ if (strncmp(pToken->tokenName, tokenId, TOKEN_NAME_LEN) == 0) -+ { -+ if (pToken->tokenLen == bufLen) // overwirte it -+ { -+ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); -+ break; -+ } -+ else // move later data over and put the new token at the end -+ { -+ memcpy((curPtr+sizeof(SP_TOKEN)), tokBuf, bufLen); // ~~~ -+ break; -+ } -+ } -+ else // not same token ~~~ -+ { -+ } -+ // get next token -+ curPtr += sizeof(SP_TOKEN) + pToken->tokenLen; -+ } // end while -+ SPHead.SPUsedLen = sizeof(SP_HEADER) + sizeof(SP_TOKEN) + bufLen; // ~~~ -+ if (SPHead.SPUsedLen > SP_MAX_LEN) -+ { -+ printk("No more Scratch pad space left! Over limit by %d bytes\n", SPHead.SPUsedLen - SP_MAX_LEN); -+ return sts; -+ } -+ -+ } // else if not new sp -+ -+ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk, -+ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf); -+ -+ retriedKfree(pShareBuf); -+ -+ return sts; -+ -+ -+} -+ -+int kerSysFlashSizeGet(void) -+{ -+ return flash_get_total_size(); -+} -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/bcm63xx_led.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,582 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/*************************************************************************** -+ * File Name : bcm63xx_led.c -+ * -+ * Description: -+ * -+ * This file contains bcm963xx board led control API functions. -+ * -+ * To use it, do the following -+ * -+ * 1). define in the board.c the following led mappping (this is for 6345GW board): -+ * const LED_MAP_PAIR cLedMapping45GW[] = -+ * { // led name Initial state physical pin (ledMask) -+ * {kLedUsb, kLedStateOff, GPIO_LED_PIN_7}, -+ * {kLedAdsl, kLedStateOff, GPIO_LED_PIN_8}, -+ * {kLedPPP, kLedStateOff, GPIO_LED_PIN_9}, // PPP and WanData share PIN_9 -+ * {kLedWanData, kLedStateOff, GPIO_LED_PIN_9}, -+ * {kLedWireless, kLedStateOff, GPIO_LED_PIN_10}, -+ * {kLedEnd, kLedStateOff, 0 } // NOTE: kLedEnd has to be at the end. -+ * -+ * 2). };To initialize led API and initial state of the leds, call the following function with the mapping -+ * pointer from the above struct -+ * -+ * boardLedInit((PLED_MAP_PAIR) &cLedMapping45R); -+ * -+ * 3). Sample call for kernel mode: -+ * -+ * kerSysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board.h -+ * -+ * 4). Sample call for user mode -+ * -+ * sysLedCtrl(kLedAdsl, kLedStateBlinkOnce); // kLedxxx defines in board_api.h -+ * -+ * -+ * Created on : 10/28/2002 seanl -+ * -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include <linux/init.h> -+#include <linux/fs.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <linux/netdevice.h> -+#include <asm/uaccess.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+ -+#define k100ms (HZ / 10) // ~100 ms -+#define kFastBlinkCount 0 // ~100ms -+#define kSlowBlinkCount 5 // ~600ms -+ -+#define MAX_VIRT_LEDS 12 -+ -+// uncomment // for debug led -+//#define DEBUG_LED -+ -+// global variables: -+struct timer_list gLedTimer; -+int gTimerOn = FALSE; -+int gLedCount = 0; -+ -+typedef struct ledinfo -+{ -+ unsigned short ledMask; // mask for led: ie. giop 10 = 0x0400 -+ unsigned short ledActiveLow; // GPIO bit reset to turn on LED -+ unsigned short ledMaskFail; // mask for led: ie. giop 10 = 0x0400 -+ unsigned short ledActiveLowFail;// GPIO bit reset to turn on LED -+ BOARD_LED_STATE ledState; // current led state -+ BOARD_LED_STATE savedLedState; // used in blink once for restore to the orignal ledState -+ int blinkCountDown; // if == 0, do blink (toggle). Is assgined value and dec by 1 at each timer. -+} LED_INFO, *PLED_INFO; -+ -+static PLED_INFO gLed = NULL; -+static PLED_INFO gpVirtLeds[MAX_VIRT_LEDS]; -+static HANDLE_LED_FUNC gLedHwFunc[MAX_VIRT_LEDS]; -+static HANDLE_LED_FUNC gLedHwFailFunc[MAX_VIRT_LEDS]; -+ -+#if 0 /* BROKEN */ -+#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+static int gLedOffInBridgeMode = 1; -+#elif defined(CONFIG_BCM96345) -+static int gLedOffInBridgeMode = 0; -+#endif -+#endif -+ -+void ledTimerExpire(void); -+int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ); -+ -+//************************************************************************************** -+// LED operations -+//************************************************************************************** -+ -+// turn led on and set the ledState -+void ledOn(PLED_INFO pLed) -+{ -+ if( pLed->ledMask ) -+ { -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLow ) -+ GPIO->GPIOio &= ~pLed->ledMask; // turn on the led -+ else -+ GPIO->GPIOio |= pLed->ledMask; // turn on the led -+ pLed->ledState = pLed->savedLedState = kLedStateOn; -+ } -+} -+ -+ -+// turn led off and set the ledState -+void ledOff(PLED_INFO pLed) -+{ -+ if( pLed->ledMask ) -+ { -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLow ) -+ GPIO->GPIOio |= pLed->ledMask; // turn off the led -+ else -+ GPIO->GPIOio &= ~pLed->ledMask; // turn off the led -+ pLed->ledState = pLed->savedLedState = kLedStateOff; -+ } -+} -+ -+// turn led on and set the ledState -+void ledOnFail(PLED_INFO pLed) -+{ -+ if( pLed->ledMaskFail ) -+ { -+ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLowFail ) -+ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn on the led -+ else -+ GPIO->GPIOio |= pLed->ledMaskFail; // turn on the led -+ pLed->ledState = pLed->savedLedState = kLedStateFail; -+ } -+} -+ -+ -+// turn led off and set the ledState -+void ledOffFail(PLED_INFO pLed) -+{ -+ if( pLed->ledMaskFail ) -+ { -+ GPIO->GPIODir |= pLed->ledMaskFail; // turn on the direction bit in case was turned off by some one -+ if( pLed->ledActiveLowFail ) -+ GPIO->GPIOio |= pLed->ledMaskFail; // turn off the led -+ else -+ GPIO->GPIOio &= ~pLed->ledMaskFail;// turn off the led -+ pLed->ledState = pLed->savedLedState = kLedStateOff; -+ } -+} -+ -+ -+// toggle the led and return the current ledState -+BOARD_LED_STATE ledToggle(PLED_INFO pLed) -+{ -+ GPIO->GPIODir |= pLed->ledMask; // turn on the direction bit in case was turned off by some one -+ if (GPIO->GPIOio & pLed->ledMask) -+ { -+ GPIO->GPIOio &= ~(pLed->ledMask); -+ return( (pLed->ledActiveLow) ? kLedStateOn : kLedStateOff ); -+ } -+ else -+ { -+ GPIO->GPIOio |= pLed->ledMask; -+ return( (pLed->ledActiveLow) ? kLedStateOff : kLedStateOn ); -+ } -+} -+ -+ -+// led timer. Will return if timer is already on -+void ledTimerStart(void) -+{ -+ if (gTimerOn) -+ return; -+ -+#if defined(DEBUG_LED) -+ printk("led: add_timer\n"); -+#endif -+ -+ init_timer(&gLedTimer); -+ gLedTimer.function = (void*)ledTimerExpire; -+ gLedTimer.expires = jiffies + k100ms; // timer expires in ~100ms -+ add_timer (&gLedTimer); -+ gTimerOn = TRUE; -+} -+ -+ -+// led timer expire kicks in about ~100ms and perform the led operation according to the ledState and -+// restart the timer according to ledState -+void ledTimerExpire(void) -+{ -+ int i; -+ PLED_INFO pCurLed; -+ -+ gTimerOn = FALSE; -+ -+ for (i = 0, pCurLed = gLed; i < gLedCount; i++, pCurLed++) -+ { -+#if defined(DEBUG_LED) -+ printk("led[%d]: Mask=0x%04x, State = %d, blcd=%d\n", i, pCurLed->ledMask, pCurLed->ledState, pCurLed->blinkCountDown); -+#endif -+ switch (pCurLed->ledState) -+ { -+ case kLedStateOn: -+ case kLedStateOff: -+ case kLedStateFail: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ break; -+ -+ case kLedStateBlinkOnce: -+ ledToggle(pCurLed); -+ pCurLed->blinkCountDown = 0; // reset to 0 -+ pCurLed->ledState = pCurLed->savedLedState; -+ if (pCurLed->ledState == kLedStateSlowBlinkContinues || -+ pCurLed->ledState == kLedStateFastBlinkContinues) -+ ledTimerStart(); // start timer if in blinkContinues stats -+ break; -+ -+ case kLedStateSlowBlinkContinues: -+ if (pCurLed->blinkCountDown-- == 0) -+ { -+ pCurLed->blinkCountDown = kSlowBlinkCount; -+ ledToggle(pCurLed); -+ } -+ ledTimerStart(); -+ break; -+ -+ case kLedStateFastBlinkContinues: -+ if (pCurLed->blinkCountDown-- == 0) -+ { -+ pCurLed->blinkCountDown = kFastBlinkCount; -+ ledToggle(pCurLed); -+ } -+ ledTimerStart(); -+ break; -+ -+ default: -+ printk("Invalid state = %d\n", pCurLed->ledState); -+ } -+ } -+} -+ -+// initialize the gLedCount and allocate and fill gLed struct -+void __init boardLedInit(PLED_MAP_PAIR cLedMapping) -+{ -+ PLED_MAP_PAIR p1, p2; -+ PLED_INFO pCurLed; -+ int needTimer = FALSE; -+ int alreadyUsed = 0; -+ -+#if defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+ /* Set blink rate for BCM6348/BCM6338 hardware LEDs. */ -+ GPIO->LEDCtrl &= ~LED_INTERVAL_SET_MASK; -+ GPIO->LEDCtrl |= LED_INTERVAL_SET_80MS; -+#endif -+ -+ memset( gpVirtLeds, 0x00, sizeof(gpVirtLeds) ); -+ memset( gLedHwFunc, 0x00, sizeof(gLedHwFunc) ); -+ memset( gLedHwFailFunc, 0x00, sizeof(gLedHwFailFunc) ); -+ -+ gLedCount = 0; -+ -+ // Check for multiple LED names and multiple LED GPIO pins that share the -+ // same physical board LED. -+ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) -+ { -+ alreadyUsed = 0; -+ for( p2 = cLedMapping; p2 != p1; p2++ ) -+ { -+ if( (p1->ledMask && p1->ledMask == p2->ledMask) || -+ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) -+ { -+ alreadyUsed = 1; -+ break; -+ } -+ } -+ -+ if( alreadyUsed == 0 ) -+ gLedCount++; -+ } -+ -+ gLed = (PLED_INFO) kmalloc((gLedCount * sizeof(LED_INFO)), GFP_KERNEL); -+ if( gLed == NULL ) -+ { -+ printk( "LED memory allocation error.\n" ); -+ return; -+ } -+ -+ memset( gLed, 0x00, gLedCount * sizeof(LED_INFO) ); -+ -+ // initial the gLed with unique ledMask and initial state. If more than 1 ledNames share the physical led -+ // (ledMask) the first defined led's ledInitState will be used. -+ pCurLed = gLed; -+ for( p1 = cLedMapping; p1->ledName != kLedEnd; p1++ ) -+ { -+ if( (int) p1->ledName > MAX_VIRT_LEDS ) -+ continue; -+ -+ alreadyUsed = 0; -+ for( p2 = cLedMapping; p2 != p1; p2++ ) -+ { -+ if( (p1->ledMask && p1->ledMask == p2->ledMask) || -+ (p1->ledMaskFail && p1->ledMaskFail == p2->ledMaskFail) ) -+ { -+ alreadyUsed = 1; -+ break; -+ } -+ } -+ -+ if( alreadyUsed == 0 ) -+ { -+ // Initialize the board LED for the first time. -+ needTimer = initLedInfo( p1, pCurLed ); -+ gpVirtLeds[(int) p1->ledName] = pCurLed; -+ pCurLed++; -+ } -+ else -+ { -+ PLED_INFO pLed; -+ for( pLed = gLed; pLed != pCurLed; pLed++ ) -+ { -+ // Find the LED_INFO structure that has already been initialized. -+ if((pLed->ledMask && pLed->ledMask == p1->ledMask) || -+ (pLed->ledMaskFail && pLed->ledMaskFail==p1->ledMaskFail)) -+ { -+ // The board LED has already been initialized but possibly -+ // not completely initialized. -+ if( p1->ledMask ) -+ { -+ pLed->ledMask = p1->ledMask; -+ pLed->ledActiveLow = p1->ledActiveLow; -+ } -+ if( p1->ledMaskFail ) -+ { -+ pLed->ledMaskFail = p1->ledMaskFail; -+ pLed->ledActiveLowFail = p1->ledActiveLowFail; -+ } -+ gpVirtLeds[(int) p1->ledName] = pLed; -+ break; -+ } -+ } -+ } -+ } -+ -+ if (needTimer) -+ ledTimerStart(); -+ -+#if defined(DEBUG_LED) -+ int i; -+ for (i=0; i < gLedCount; i++) -+ printk("initLed: led[%d]: mask=0x%04x, state=%d\n", i,(gLed+i)->ledMask, (gLed+i)->ledState); -+#endif -+ -+} -+ -+// Initialize a structure that contains information about a physical board LED -+// control. The board LED may contain more than one GPIO pin to control a -+// normal condition (green) or a failure condition (red). -+int initLedInfo( PLED_MAP_PAIR pCurMap, PLED_INFO pCurLed ) -+{ -+ int needTimer = FALSE; -+ pCurLed->ledState = pCurLed->savedLedState = pCurMap->ledInitState; -+ pCurLed->ledMask = pCurMap->ledMask; -+ pCurLed->ledActiveLow = pCurMap->ledActiveLow; -+ pCurLed->ledMaskFail = pCurMap->ledMaskFail; -+ pCurLed->ledActiveLowFail = pCurMap->ledActiveLowFail; -+ -+ switch (pCurLed->ledState) -+ { -+ case kLedStateOn: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOn(pCurLed); -+ break; -+ case kLedStateOff: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOff(pCurLed); -+ break; -+ case kLedStateFail: -+ pCurLed->blinkCountDown = 0; // reset the blink count down -+ ledOnFail(pCurLed); -+ break; -+ case kLedStateBlinkOnce: -+ pCurLed->blinkCountDown = 1; -+ needTimer = TRUE; -+ break; -+ case kLedStateSlowBlinkContinues: -+ pCurLed->blinkCountDown = kSlowBlinkCount; -+ needTimer = TRUE; -+ break; -+ case kLedStateFastBlinkContinues: -+ pCurLed->blinkCountDown = kFastBlinkCount; -+ needTimer = TRUE; -+ break; -+ default: -+ printk("Invalid state = %d\n", pCurLed->ledState); -+ } -+ -+ return( needTimer ); -+} -+ -+#if 0 /* BROKEN */ -+// Determines if there is at least one interface in bridge mode. Bridge mode -+// is determined by the cfm convention of naming bridge interfaces nas17 -+// through nas24. -+static int isBridgedProtocol(void) -+{ -+ extern int dev_get(const char *name); -+ const int firstBridgeId = 17; -+ const int lastBridgeId = 24; -+ int i; -+ int ret = FALSE; -+ char name[16]; -+ -+ for( i = firstBridgeId; i <= lastBridgeId; i++ ) -+ { -+ sprintf( name, "nas%d", i ); -+ -+ if( dev_get(name) ) -+ { -+ ret = TRUE; -+ break; -+ } -+ } -+ -+ return(ret); -+} -+#endif -+ -+// led ctrl. Maps the ledName to the corresponding ledInfoPtr and perform the led operation -+void boardLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) -+{ -+ PLED_INFO ledInfoPtr; -+ -+ // do the mapping from virtual to physical led -+ if( (int) ledName < MAX_VIRT_LEDS ) -+ ledInfoPtr = gpVirtLeds[(int) ledName]; -+ else -+ ledInfoPtr = NULL; -+ -+ if (ledInfoPtr == NULL) -+ return; -+ -+ if( ledState != kLedStateFail && gLedHwFunc[(int) ledName] ) -+ { -+ (*gLedHwFunc[(int) ledName]) (ledName, ledState); -+ ledOffFail(ledInfoPtr); -+ return; -+ } -+ else -+ if( ledState == kLedStateFail && gLedHwFailFunc[(int) ledName] ) -+ { -+ (*gLedHwFailFunc[(int) ledName]) (ledName, ledState); -+ ledOff(ledInfoPtr); -+ return; -+ } -+ -+#if 0 /* BROKEN */ -+ // Do not blink the WAN Data LED if at least one interface is in bridge mode. -+ if(gLedOffInBridgeMode == 1 && (ledName == kLedWanData || ledName == kLedPPP)) -+ { -+ static int BridgedProtocol = -1; -+ -+ if( BridgedProtocol == -1 ) -+ BridgedProtocol = isBridgedProtocol(); -+ -+ if( BridgedProtocol == TRUE ) -+ return; -+ } -+#endif -+ -+ // If the state is kLedStateFail and there is not a failure LED defined -+ // in the board parameters, change the state to kLedStateFastBlinkContinues. -+ if( ledState == kLedStateFail && ledInfoPtr->ledMaskFail == 0 ) -+ ledState = kLedStateFastBlinkContinues; -+ -+ switch (ledState) -+ { -+ case kLedStateOn: -+ // First, turn off the complimentary (failure) LED GPIO. -+ if( ledInfoPtr->ledMaskFail ) -+ ledOffFail(ledInfoPtr); -+ else -+ if( gLedHwFailFunc[(int) ledName] ) -+ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn on the specified LED GPIO. -+ ledOn(ledInfoPtr); -+ break; -+ -+ case kLedStateOff: -+ // First, turn off the complimentary (failure) LED GPIO. -+ if( ledInfoPtr->ledMaskFail ) -+ ledOffFail(ledInfoPtr); -+ else -+ if( gLedHwFailFunc[(int) ledName] ) -+ (*gLedHwFailFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn off the specified LED GPIO. -+ ledOff(ledInfoPtr); -+ break; -+ -+ case kLedStateFail: -+ // First, turn off the complimentary (normal) LED GPIO. -+ if( ledInfoPtr->ledMask ) -+ ledOff(ledInfoPtr); -+ else -+ if( gLedHwFunc[(int) ledName] ) -+ (*gLedHwFunc[(int) ledName]) (ledName, kLedStateOff); -+ -+ // Next, turn on (red) the specified LED GPIO. -+ ledOnFail(ledInfoPtr); -+ break; -+ -+ case kLedStateBlinkOnce: -+ // skip blinkOnce if it is already in Slow/Fast blink continues state -+ if (ledInfoPtr->savedLedState == kLedStateSlowBlinkContinues || -+ ledInfoPtr->savedLedState == kLedStateFastBlinkContinues) -+ ; -+ else -+ { -+ if (ledInfoPtr->blinkCountDown == 0) // skip the call if it is 1 -+ { -+ ledToggle(ledInfoPtr); -+ ledInfoPtr->blinkCountDown = 1; // it will be reset to 0 when timer expires -+ ledInfoPtr->ledState = kLedStateBlinkOnce; -+ ledTimerStart(); -+ } -+ } -+ break; -+ -+ case kLedStateSlowBlinkContinues: -+ ledInfoPtr->blinkCountDown = kSlowBlinkCount; -+ ledInfoPtr->ledState = kLedStateSlowBlinkContinues; -+ ledInfoPtr->savedLedState = kLedStateSlowBlinkContinues; -+ ledTimerStart(); -+ break; -+ -+ case kLedStateFastBlinkContinues: -+ ledInfoPtr->blinkCountDown = kFastBlinkCount; -+ ledInfoPtr->ledState = kLedStateFastBlinkContinues; -+ ledInfoPtr->savedLedState = kLedStateFastBlinkContinues; -+ ledTimerStart(); -+ break; -+ -+ default: -+ printk("Invalid led state\n"); -+ } -+} -+ -+// This function is called for an LED that is controlled by hardware. -+void kerSysLedRegisterHwHandler( BOARD_LED_NAME ledName, -+ HANDLE_LED_FUNC ledHwFunc, int ledFailType ) -+{ -+ if( (int) ledName < MAX_VIRT_LEDS ) -+ { -+ if( ledFailType == 1 ) -+ gLedHwFailFunc[(int) ledName] = ledHwFunc; -+ else -+ gLedHwFunc[(int) ledName] = ledHwFunc; -+ } -+} -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/board.c 2006-08-03 16:37:21.000000000 +0200 -@@ -0,0 +1,1781 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/*************************************************************************** -+ * File Name : board.c -+ * -+ * Description: This file contains Linux character device driver entry -+ * for the board related ioctl calls: flash, get free kernel -+ * page and dump kernel memory, etc. -+ * -+ * Created on : 2/20/2002 seanl: use cfiflash.c, cfliflash.h (AMD specific) -+ * -+ ***************************************************************************/ -+ -+ -+/* Includes. */ -+#include <linux/version.h> -+#include <linux/init.h> -+#include <linux/fs.h> -+#include <linux/interrupt.h> -+#include <linux/capability.h> -+#include <linux/slab.h> -+#include <linux/errno.h> -+#include <linux/module.h> -+#include <linux/pagemap.h> -+#include <asm/uaccess.h> -+#include <linux/wait.h> -+#include <linux/poll.h> -+#include <linux/sched.h> -+#include <linux/list.h> -+#include <linux/if.h> -+#include <linux/spinlock.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#include <bcmTag.h> -+#include "boardparms.h" -+#include "cfiflash.h" -+#include "bcm_intr.h" -+#include "board.h" -+#include "bcm_map_part.h" -+ -+static DEFINE_SPINLOCK(board_lock); -+ -+/* Typedefs. */ -+#if defined (NON_CONSECUTIVE_MAC) -+// used to be the last octet. Now changed to the first 5 bits of the the forth octet -+// to reduced the duplicated MAC addresses. -+#define CHANGED_OCTET 3 -+#define SHIFT_BITS 3 -+#else -+#define CHANGED_OCTET 1 -+#define SHIFT_BITS 0 -+#endif -+ -+#if defined (WIRELESS) -+#define SES_BTN_PRESSED 0x00000001 -+#define SES_EVENTS SES_BTN_PRESSED /*OR all values if any*/ -+#define SES_LED_OFF 0 -+#define SES_LED_ON 1 -+#define SES_LED_BLINK 2 -+#endif -+ -+typedef struct -+{ -+ unsigned long ulId; -+ char chInUse; -+ char chReserved[3]; -+} MAC_ADDR_INFO, *PMAC_ADDR_INFO; -+ -+typedef struct -+{ -+ unsigned long ulSdramSize; -+ unsigned long ulPsiSize; -+ unsigned long ulNumMacAddrs; -+ unsigned long ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ MAC_ADDR_INFO MacAddrs[1]; -+} NVRAM_INFO, *PNVRAM_INFO; -+ -+typedef struct -+{ -+ unsigned long eventmask; -+} BOARD_IOC, *PBOARD_IOC; -+ -+ -+/*Dyinggasp callback*/ -+typedef void (*cb_dgasp_t)(void *arg); -+typedef struct _CB_DGASP__LIST -+{ -+ struct list_head list; -+ char name[IFNAMSIZ]; -+ cb_dgasp_t cb_dgasp_fn; -+ void *context; -+}CB_DGASP_LIST , *PCB_DGASP_LIST; -+ -+ -+static LED_MAP_PAIR LedMapping[] = -+{ // led name Initial state physical pin (ledMask) -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0}, -+ {kLedEnd, kLedStateOff, 0, 0, 0, 0} // NOTE: kLedEnd has to be at the end. -+}; -+ -+/* Externs. */ -+extern struct file fastcall *fget_light(unsigned int fd, int *fput_needed); -+extern unsigned int nr_free_pages (void); -+extern const char *get_system_type(void); -+extern void kerSysFlashInit(void); -+extern unsigned long get_nvram_start_addr(void); -+extern unsigned long get_scratch_pad_start_addr(void); -+extern unsigned long getMemorySize(void); -+extern void __init boardLedInit(PLED_MAP_PAIR); -+extern void boardLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); -+extern void kerSysLedRegisterHandler( BOARD_LED_NAME ledName, -+ HANDLE_LED_FUNC ledHwFunc, int ledFailType ); -+ -+/* Prototypes. */ -+void __init InitNvramInfo( void ); -+static int board_open( struct inode *inode, struct file *filp ); -+static int board_ioctl( struct inode *inode, struct file *flip, unsigned int command, unsigned long arg ); -+static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos); -+static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait); -+static int board_release(struct inode *inode, struct file *filp); -+ -+static BOARD_IOC* borad_ioc_alloc(void); -+static void borad_ioc_free(BOARD_IOC* board_ioc); -+ -+/* DyingGasp function prototype */ -+static void __init kerSysDyingGaspMapIntr(void); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs); -+#else -+static unsigned int kerSysDyingGaspIsr(void); -+#endif -+static void __init kerSysInitDyingGaspHandler( void ); -+static void __exit kerSysDeinitDyingGaspHandler( void ); -+/* -DyingGasp function prototype - */ -+ -+ -+#if defined (WIRELESS) -+static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs); -+static void __init sesBtn_mapGpio(void); -+static void __init sesBtn_mapIntr(int context); -+static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait); -+static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos); -+static void __init sesLed_mapGpio(void); -+static void sesLed_ctrl(int action); -+static void __init ses_board_init(void); -+static void __exit ses_board_deinit(void); -+#endif -+ -+static PNVRAM_INFO g_pNvramInfo = NULL; -+static int g_ledInitialized = 0; -+static wait_queue_head_t g_board_wait_queue; -+static CB_DGASP_LIST *g_cb_dgasp_list_head = NULL; -+ -+static int g_wakeup_monitor = 0; -+static struct file *g_monitor_file = NULL; -+static struct task_struct *g_monitor_task = NULL; -+static unsigned int (*g_orig_fop_poll) -+ (struct file *, struct poll_table_struct *) = NULL; -+ -+static struct file_operations board_fops = -+{ -+ open: board_open, -+ ioctl: board_ioctl, -+ poll: board_poll, -+ read: board_read, -+ release: board_release, -+}; -+ -+uint32 board_major = 0; -+ -+#if defined (WIRELESS) -+static unsigned short sesBtn_irq = BP_NOT_DEFINED; -+static unsigned short sesBtn_gpio = BP_NOT_DEFINED; -+static unsigned short sesLed_gpio = BP_NOT_DEFINED; -+#endif -+ -+#if defined(MODULE) -+int init_module(void) -+{ -+ return( brcm_board_init() ); -+} -+ -+void cleanup_module(void) -+{ -+ if (MOD_IN_USE) -+ printk("brcm flash: cleanup_module failed because module is in use\n"); -+ else -+ brcm_board_cleanup(); -+} -+#endif //MODULE -+ -+ -+ -+static int __init brcm_board_init( void ) -+{ -+ typedef int (*BP_LED_FUNC) (unsigned short *); -+ static struct BpLedInformation -+ { -+ BOARD_LED_NAME ledName; -+ BP_LED_FUNC bpFunc; -+ BP_LED_FUNC bpFuncFail; -+ } bpLedInfo[] = -+ {{kLedAdsl, BpGetAdslLedGpio, BpGetAdslFailLedGpio}, -+ {kLedWireless, BpGetWirelessLedGpio, NULL}, -+ {kLedUsb, BpGetUsbLedGpio, NULL}, -+ {kLedHpna, BpGetHpnaLedGpio, NULL}, -+ {kLedWanData, BpGetWanDataLedGpio, NULL}, -+ {kLedPPP, BpGetPppLedGpio, BpGetPppFailLedGpio}, -+ {kLedVoip, BpGetVoipLedGpio, NULL}, -+ {kLedSes, BpGetWirelessSesLedGpio, NULL}, -+ {kLedEnd, NULL, NULL} -+ }; -+ -+ int ret; -+ -+ ret = register_chrdev(BOARD_DRV_MAJOR, "bcrmboard", &board_fops ); -+ if (ret < 0) -+ printk( "brcm_board_init(major %d): fail to register device.\n",BOARD_DRV_MAJOR); -+ else -+ { -+ PLED_MAP_PAIR pLedMap = LedMapping; -+ unsigned short gpio; -+ struct BpLedInformation *pInfo; -+ -+ printk("brcmboard: brcm_board_init entry\n"); -+ board_major = BOARD_DRV_MAJOR; -+ if (boot_loader_type == BOOT_CFE) -+ InitNvramInfo(); -+ -+#if !defined(CONFIG_BCM96338) -+ GPIO->GPIOMode &= ~(0x000F0000); -+#endif -+ -+ pLedMap[0].ledName = kLedSelfTest ; -+ pLedMap[0].ledMask = GPIO_NUM_TO_MASK(0); -+ pLedMap[0].ledActiveLow = 0; -+ -+ pLedMap[1].ledName = kLedAdsl; -+ pLedMap[1].ledMask = GPIO_NUM_TO_MASK(1); -+ pLedMap[1].ledActiveLow = 0; -+ -+ pLedMap[2].ledName = kLedLan ; -+ pLedMap[2].ledMask = GPIO_NUM_TO_MASK(2); -+ pLedMap[2].ledActiveLow = 0; -+ -+ pLedMap[3].ledName = kLedVoip ; -+ pLedMap[3].ledMask = GPIO_NUM_TO_MASK(3); -+ pLedMap[3].ledActiveLow = 0; -+ -+ pLedMap[4].ledName = kLedWireless ; -+ pLedMap[4].ledMask = GPIO_NUM_TO_MASK(4); -+ pLedMap[4].ledActiveLow = 0; -+ -+ pLedMap[5].ledName = kLedEnd; -+ -+#if 0 -+ for( pInfo = bpLedInfo; pInfo->ledName != kLedEnd; pInfo++ ) -+ { -+ if( pInfo->bpFunc && (*pInfo->bpFunc) (&gpio) == BP_SUCCESS ) -+ { -+ pLedMap->ledName = pInfo->ledName; -+ pLedMap->ledMask = GPIO_NUM_TO_MASK(gpio); -+ pLedMap->ledActiveLow = (gpio & BP_ACTIVE_LOW) ? 1 : 0; -+ } -+ if( pInfo->bpFuncFail && (*pInfo->bpFuncFail) (&gpio) == BP_SUCCESS ) -+ { -+ pLedMap->ledName = pInfo->ledName; -+ pLedMap->ledMaskFail = GPIO_NUM_TO_MASK(gpio); -+ pLedMap->ledActiveLowFail = (gpio & BP_ACTIVE_LOW) ? 1 : 0; -+ } -+ if( pLedMap->ledName != kLedEnd ) -+ pLedMap++; -+ } -+#endif -+ init_waitqueue_head(&g_board_wait_queue); -+#if defined (WIRELESS) -+ ses_board_init(); -+#endif -+ kerSysInitDyingGaspHandler(); -+ kerSysDyingGaspMapIntr(); -+ -+ boardLedInit(LedMapping); -+ g_ledInitialized = 1; -+ } -+ -+ return ret; -+} -+ -+void __init InitNvramInfo( void ) -+{ -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ unsigned long ulNumMacAddrs = pNvramData->ulNumMacAddrs; -+ -+ if( ulNumMacAddrs > 0 && ulNumMacAddrs <= NVRAM_MAC_COUNT_MAX ) -+ { -+ unsigned long ulNvramInfoSize = -+ sizeof(NVRAM_INFO) + ((sizeof(MAC_ADDR_INFO) - 1) * ulNumMacAddrs); -+ -+ g_pNvramInfo = (PNVRAM_INFO) kmalloc( ulNvramInfoSize, GFP_KERNEL ); -+ -+ if( g_pNvramInfo ) -+ { -+ unsigned long ulPsiSize; -+ if( BpGetPsiSize( &ulPsiSize ) != BP_SUCCESS ) -+ ulPsiSize = NVRAM_PSI_DEFAULT; -+ memset( g_pNvramInfo, 0x00, ulNvramInfoSize ); -+ g_pNvramInfo->ulPsiSize = ulPsiSize * 1024; -+ g_pNvramInfo->ulNumMacAddrs = pNvramData->ulNumMacAddrs; -+ memcpy( g_pNvramInfo->ucaBaseMacAddr, pNvramData->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ g_pNvramInfo->ulSdramSize = getMemorySize(); -+ } -+ else -+ printk("ERROR - Could not allocate memory for NVRAM data\n"); -+ } -+ else -+ printk("ERROR - Invalid number of MAC addresses (%ld) is configured.\n", -+ ulNumMacAddrs); -+} -+ -+void __exit brcm_board_cleanup( void ) -+{ -+ printk("brcm_board_cleanup()\n"); -+ -+ if (board_major != -1) -+ { -+#if defined (WIRELESS) -+ ses_board_deinit(); -+#endif -+ kerSysDeinitDyingGaspHandler(); -+ unregister_chrdev(board_major, "board_ioctl"); -+ } -+} -+ -+static BOARD_IOC* borad_ioc_alloc(void) -+{ -+ BOARD_IOC *board_ioc =NULL; -+ board_ioc = (BOARD_IOC*) kmalloc( sizeof(BOARD_IOC) , GFP_KERNEL ); -+ if(board_ioc) -+ { -+ memset(board_ioc, 0, sizeof(BOARD_IOC)); -+ } -+ return board_ioc; -+} -+ -+static void borad_ioc_free(BOARD_IOC* board_ioc) -+{ -+ if(board_ioc) -+ { -+ kfree(board_ioc); -+ } -+} -+ -+ -+static int board_open( struct inode *inode, struct file *filp ) -+{ -+ filp->private_data = borad_ioc_alloc(); -+ -+ if (filp->private_data == NULL) -+ return -ENOMEM; -+ -+ return( 0 ); -+} -+ -+static int board_release(struct inode *inode, struct file *filp) -+{ -+ BOARD_IOC *board_ioc = filp->private_data; -+ -+ wait_event_interruptible(g_board_wait_queue, 1); -+ borad_ioc_free(board_ioc); -+ -+ return( 0 ); -+} -+ -+ -+static unsigned int board_poll(struct file *filp, struct poll_table_struct *wait) -+{ -+ unsigned int mask = 0; -+#if defined (WIRELESS) -+ BOARD_IOC *board_ioc = filp->private_data; -+#endif -+ -+ poll_wait(filp, &g_board_wait_queue, wait); -+#if defined (WIRELESS) -+ if(board_ioc->eventmask & SES_EVENTS){ -+ mask |= sesBtn_poll(filp, wait); -+ } -+#endif -+ -+ return mask; -+} -+ -+ -+static ssize_t board_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) -+{ -+#if defined (WIRELESS) -+ BOARD_IOC *board_ioc = filp->private_data; -+ if(board_ioc->eventmask & SES_EVENTS){ -+ return sesBtn_read(filp, buffer, count, ppos); -+ } -+#endif -+ return 0; -+} -+ -+//************************************************************************************** -+// Utitlities for dump memory, free kernel pages, mips soft reset, etc. -+//************************************************************************************** -+ -+/*********************************************************************** -+ * Function Name: dumpaddr -+ * Description : Display a hex dump of the specified address. -+ ***********************************************************************/ -+void dumpaddr( unsigned char *pAddr, int nLen ) -+{ -+ static char szHexChars[] = "0123456789abcdef"; -+ char szLine[80]; -+ char *p = szLine; -+ unsigned char ch, *q; -+ int i, j; -+ unsigned long ul; -+ -+ while( nLen > 0 ) -+ { -+ sprintf( szLine, "%8.8lx: ", (unsigned long) pAddr ); -+ p = szLine + strlen(szLine); -+ -+ for(i = 0; i < 16 && nLen > 0; i += sizeof(long), nLen -= sizeof(long)) -+ { -+ ul = *(unsigned long *) &pAddr[i]; -+ q = (unsigned char *) &ul; -+ for( j = 0; j < sizeof(long); j++ ) -+ { -+ *p++ = szHexChars[q[j] >> 4]; -+ *p++ = szHexChars[q[j] & 0x0f]; -+ *p++ = ' '; -+ } -+ } -+ -+ for( j = 0; j < 16 - i; j++ ) -+ *p++ = ' ', *p++ = ' ', *p++ = ' '; -+ -+ *p++ = ' ', *p++ = ' ', *p++ = ' '; -+ -+ for( j = 0; j < i; j++ ) -+ { -+ ch = pAddr[j]; -+ *p++ = (ch > ' ' && ch < '~') ? ch : '.'; -+ } -+ -+ *p++ = '\0'; -+ printk( "%s\r\n", szLine ); -+ -+ pAddr += i; -+ } -+ printk( "\r\n" ); -+} /* dumpaddr */ -+ -+ -+void kerSysMipsSoftReset(void) -+{ -+#if defined(CONFIG_BCM96348) -+ if (PERF->RevID == 0x634800A1) { -+ typedef void (*FNPTR) (void); -+ FNPTR bootaddr = (FNPTR) FLASH_BASE; -+ int i; -+ -+ /* Disable interrupts. */ -+ //cli(); -+ spin_lock_irq(&board_lock); -+ -+ /* Reset all blocks. */ -+ PERF->BlockSoftReset &= ~BSR_ALL_BLOCKS; -+ for( i = 0; i < 1000000; i++ ) -+ ; -+ PERF->BlockSoftReset |= BSR_ALL_BLOCKS; -+ /* Jump to the power on address. */ -+ (*bootaddr) (); -+ } -+ else -+ PERF->pll_control |= SOFT_RESET; // soft reset mips -+#else -+ PERF->pll_control |= SOFT_RESET; // soft reset mips -+#endif -+} -+ -+ -+int kerSysGetMacAddress( unsigned char *pucaMacAddr, unsigned long ulId ) -+{ -+ int nRet = 0; -+ PMAC_ADDR_INFO pMai = NULL; -+ PMAC_ADDR_INFO pMaiFreeNoId = NULL; -+ PMAC_ADDR_INFO pMaiFreeId = NULL; -+ unsigned long i = 0, ulIdxNoId = 0, ulIdxId = 0, shiftedIdx = 0; -+ -+ /* CMO -- Fix le problème avec les adresses mac que l'on n'arrive pas -+ * * à relire plusieurs fois */ -+ /* inv_xde */ -+ if (boot_loader_type == BOOT_CFE) -+ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ else { -+ pucaMacAddr[0] = 0x00; -+ pucaMacAddr[1] = 0x07; -+ pucaMacAddr[2] = 0x3A; -+ pucaMacAddr[3] = 0xFF; -+ pucaMacAddr[4] = 0xFF; -+ pucaMacAddr[5] = 0xFF; -+ } -+ -+ return nRet; -+#if 0 -+ for( i = 0, pMai = g_pNvramInfo->MacAddrs; i < g_pNvramInfo->ulNumMacAddrs; -+ i++, pMai++ ) -+ { -+ if( ulId == pMai->ulId || ulId == MAC_ADDRESS_ANY ) -+ { -+ /* This MAC address has been used by the caller in the past. */ -+ memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, -+ NVRAM_MAC_ADDRESS_LEN ); -+ shiftedIdx = i; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMai->chInUse = 1; -+ pMaiFreeNoId = pMaiFreeId = NULL; -+ break; -+ } -+ else -+ if( pMai->chInUse == 0 ) -+ { -+ if( pMai->ulId == 0 && pMaiFreeNoId == NULL ) -+ { -+ /* This is an available MAC address that has never been -+ * used. -+ */ -+ pMaiFreeNoId = pMai; -+ ulIdxNoId = i; -+ } -+ else -+ if( pMai->ulId != 0 && pMaiFreeId == NULL ) -+ { -+ /* This is an available MAC address that has been used -+ * before. Use addresses that have never been used -+ * first, before using this one. -+ */ -+ pMaiFreeId = pMai; -+ ulIdxId = i; -+ } -+ } -+ } -+ -+ if( pMaiFreeNoId || pMaiFreeId ) -+ { -+ /* An available MAC address was found. */ -+ memcpy(pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr,NVRAM_MAC_ADDRESS_LEN); -+ if( pMaiFreeNoId ) -+ { -+ shiftedIdx = ulIdxNoId; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMaiFreeNoId->ulId = ulId; -+ pMaiFreeNoId->chInUse = 1; -+ } -+ else -+ { -+ shiftedIdx = ulIdxId; -+ pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] += (shiftedIdx << SHIFT_BITS); -+ pMaiFreeId->ulId = ulId; -+ pMaiFreeId->chInUse = 1; -+ } -+ } -+ else -+ if( i == g_pNvramInfo->ulNumMacAddrs ) -+ nRet = -EADDRNOTAVAIL; -+ -+ return( nRet ); -+#endif -+} /* kerSysGetMacAddr */ -+ -+int kerSysReleaseMacAddress( unsigned char *pucaMacAddr ) -+{ -+ int nRet = -EINVAL; -+ unsigned long ulIdx = 0; -+ int idx = (pucaMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET] - -+ g_pNvramInfo->ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN - CHANGED_OCTET]); -+ -+ // if overflow 255 (negitive), add 256 to have the correct index -+ if (idx < 0) -+ idx += 256; -+ ulIdx = (unsigned long) (idx >> SHIFT_BITS); -+ -+ if( ulIdx < g_pNvramInfo->ulNumMacAddrs ) -+ { -+ PMAC_ADDR_INFO pMai = &g_pNvramInfo->MacAddrs[ulIdx]; -+ if( pMai->chInUse == 1 ) -+ { -+ pMai->chInUse = 0; -+ nRet = 0; -+ } -+ } -+ -+ return( nRet ); -+} /* kerSysReleaseMacAddr */ -+ -+int kerSysGetSdramSize( void ) -+{ -+ if (boot_loader_type == BOOT_CFE) { -+ return( (int) g_pNvramInfo->ulSdramSize ); -+ } -+ else { -+ printk("kerSysGetSdramSize : 0x%08X\n", (int)getMemorySize() + 0x00040000); -+ return((int)getMemorySize() + 0x00040000); -+ } -+} /* kerSysGetSdramSize */ -+ -+ -+void kerSysLedCtrl(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState) -+{ -+ if (g_ledInitialized) -+ boardLedCtrl(ledName, ledState); -+} -+ -+unsigned int kerSysMonitorPollHook( struct file *f, struct poll_table_struct *t) -+{ -+ int mask = (*g_orig_fop_poll) (f, t); -+ -+ if( g_wakeup_monitor == 1 && g_monitor_file == f ) -+ { -+ /* If g_wakeup_monitor is non-0, the user mode application needs to -+ * return from a blocking select function. Return POLLPRI which will -+ * cause the select to return with the exception descriptor set. -+ */ -+ mask |= POLLPRI; -+ g_wakeup_monitor = 0; -+ } -+ -+ return( mask ); -+} -+ -+/* Put the user mode application that monitors link state on a run queue. */ -+void kerSysWakeupMonitorTask( void ) -+{ -+ g_wakeup_monitor = 1; -+ if( g_monitor_task ) -+ wake_up_process( g_monitor_task ); -+} -+ -+//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 -+int kerSysGetResetHold(void) -+{ -+ unsigned short gpio; -+ -+ if( BpGetPressAndHoldResetGpio( &gpio ) == BP_SUCCESS ) -+ { -+#if defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ //printk("gpio=%04x,gpio_mask=%04x,gpio_reg=%04x\n",gpio,gpio_mask,*gpio_reg); -+ if(*gpio_reg & gpio_mask) //press down -+ return RESET_BUTTON_UP; -+ } -+ return RESET_BUTTON_PRESSDOWN; -+} -+//<<JUNHON, 2004/09/15 -+ -+//******************************************************************************************** -+// misc. ioctl calls come to here. (flash, led, reset, kernel memory access, etc.) -+//******************************************************************************************** -+static int board_ioctl( struct inode *inode, struct file *flip, -+ unsigned int command, unsigned long arg ) -+{ -+ int ret = 0; -+ BOARD_IOCTL_PARMS ctrlParms; -+ unsigned char ucaMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ int allowedSize; -+ -+ switch (command) -+ { -+ case BOARD_IOCTL_FLASH_INIT: -+ // not used for now. kerSysBcmImageInit(); -+ break; -+ -+ -+ case BOARD_IOCTL_FLASH_WRITE: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ NVRAM_DATA SaveNvramData; -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ -+ switch (ctrlParms.action) -+ { -+ case SCRATCH_PAD: -+ if (boot_loader_type == BOOT_CFE) { -+ ret = kerSysScratchPadSet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case PERSISTENT: -+ if (boot_loader_type == BOOT_CFE) { -+ ret = kerSysPersistentSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case NVRAM: -+ if (boot_loader_type == BOOT_CFE) { -+ ret = kerSysNvRamSet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case BCM_IMAGE_CFE: -+ if (boot_loader_type == BOOT_CFE) { -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > FLASH45_LENGTH_BOOT_ROM ) -+ { -+ printk("Illegal CFE size [%d]. Size allowed: [%d]\n", -+ ctrlParms.strLen, FLASH45_LENGTH_BOOT_ROM); -+ ret = -1; -+ break; -+ } -+ -+ // save NVRAM data into a local structure -+ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); -+ -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ -+ // if nvram is not valid, restore the current nvram settings -+ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && -+ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) -+ { -+ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); -+ } -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ case BCM_IMAGE_FS: -+ if (boot_loader_type == BOOT_CFE) { -+ allowedSize = (int) flash_get_total_size() - FLASH_RESERVED_AT_END - TAG_LEN - FLASH45_LENGTH_BOOT_ROM; -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize) -+ { -+ printk("Illegal root file system size [%d]. Size allowed: [%d]\n", -+ ctrlParms.strLen, ctrlParms.offset - allowedSize); -+ ret = -1; -+ break; -+ } -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ kerSysMipsSoftReset(); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case BCM_IMAGE_KERNEL: // not used for now. -+ if (boot_loader_type == BOOT_CFE) { -+ allowedSize = (int) flash_get_total_size() - FLASH_RESERVED_AT_END - TAG_LEN - ctrlParms.offset; -+ -+ printk("kernel size = [%d]. Allowed size = [%d]\n", ctrlParms.strLen, allowedSize); -+ -+ if( ctrlParms.strLen <= 0 || ctrlParms.strLen > allowedSize ) -+ { -+ printk("Kernel size is over the limit by [%d] bytes\n", -+ ctrlParms.strLen - allowedSize); -+ ret = -1; -+ break; -+ } -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ case BCM_IMAGE_WHOLE: -+ if (boot_loader_type == BOOT_CFE) { -+ if(ctrlParms.strLen <= 0) -+ { -+ printk("Illegal flash image size [%d].\n", ctrlParms.strLen); -+ ret = -1; -+ break; -+ } -+ -+ // save NVRAM data into a local structure -+ memcpy( &SaveNvramData, pNvramData, sizeof(NVRAM_DATA) ); -+ -+ ret = kerSysBcmImageSet(ctrlParms.offset, ctrlParms.string, ctrlParms.strLen); -+ -+ // if nvram is not valid, restore the current nvram settings -+ if( BpSetBoardId( pNvramData->szBoardId ) != BP_SUCCESS && -+ *(unsigned long *) pNvramData == NVRAM_DATA_ID ) -+ { -+ kerSysNvRamSet((char *) &SaveNvramData, sizeof(SaveNvramData), 0); -+ } -+ -+ kerSysMipsSoftReset(); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ default: -+ ret = -EINVAL; -+ printk("flash_ioctl_command: invalid command %d\n", ctrlParms.action); -+ break; -+ } -+ ctrlParms.result = ret; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_FLASH_READ: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ switch (ctrlParms.action) -+ { -+ case SCRATCH_PAD: -+ if (boot_loader_type == BOOT_CFE) { -+ ret = kerSysScratchPadGet(ctrlParms.string, ctrlParms.buf, ctrlParms.offset); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case PERSISTENT: -+ if (boot_loader_type == BOOT_CFE) { -+ ret = kerSysPersistentGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case NVRAM: -+ if (boot_loader_type == BOOT_CFE) { -+ ret = kerSysNvRamGet(ctrlParms.string, ctrlParms.strLen, ctrlParms.offset); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case FLASH_SIZE: -+ if (boot_loader_type == BOOT_CFE) { -+ ret = kerSysFlashSizeGet(); -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ default: -+ ret = -EINVAL; -+ printk("Not supported. invalid command %d\n", ctrlParms.action); -+ break; -+ } -+ ctrlParms.result = ret; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_NR_PAGES: -+ ctrlParms.result = nr_free_pages() + get_page_cache_size(); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_DUMP_ADDR: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ dumpaddr( (unsigned char *) ctrlParms.string, ctrlParms.strLen ); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_SET_MEMORY: -+ if (boot_loader_type == BOOT_CFE) { -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ unsigned long *pul = (unsigned long *) ctrlParms.string; -+ unsigned short *pus = (unsigned short *) ctrlParms.string; -+ unsigned char *puc = (unsigned char *) ctrlParms.string; -+ switch( ctrlParms.strLen ) -+ { -+ case 4: -+ *pul = (unsigned long) ctrlParms.offset; -+ break; -+ case 2: -+ *pus = (unsigned short) ctrlParms.offset; -+ break; -+ case 1: -+ *puc = (unsigned char) ctrlParms.offset; -+ break; -+ } -+ dumpaddr( (unsigned char *) ctrlParms.string, sizeof(long) ); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ -+ } -+ break; -+ -+ case BOARD_IOCTL_MIPS_SOFT_RESET: -+ kerSysMipsSoftReset(); -+ break; -+ -+ case BOARD_IOCTL_LED_CTRL: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ kerSysLedCtrl((BOARD_LED_NAME)ctrlParms.strLen, (BOARD_LED_STATE)ctrlParms.offset); -+ ret = 0; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_ID: -+ if (boot_loader_type == BOOT_CFE) { -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, -+ sizeof(ctrlParms)) == 0) -+ { -+ if( ctrlParms.string ) -+ { -+ char *p = (char *) get_system_type(); -+ if( strlen(p) + 1 < ctrlParms.strLen ) -+ ctrlParms.strLen = strlen(p) + 1; -+ __copy_to_user(ctrlParms.string, p, ctrlParms.strLen); -+ } -+ -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ } -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_MAC_ADDRESS: -+ if (boot_loader_type == BOOT_CFE) { -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ ctrlParms.result = kerSysGetMacAddress( ucaMacAddr, -+ ctrlParms.offset ); -+ -+ if( ctrlParms.result == 0 ) -+ { -+ __copy_to_user(ctrlParms.string, ucaMacAddr, -+ sizeof(ucaMacAddr)); -+ } -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case BOARD_IOCTL_RELEASE_MAC_ADDRESS: -+ if (boot_loader_type == BOOT_CFE) { -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ if (copy_from_user((void*)ucaMacAddr, (void*)ctrlParms.string, \ -+ NVRAM_MAC_ADDRESS_LEN) == 0) -+ { -+ ctrlParms.result = kerSysReleaseMacAddress( ucaMacAddr ); -+ } -+ else -+ { -+ ctrlParms.result = -EACCES; -+ } -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_PSI_SIZE: -+ if (boot_loader_type == BOOT_CFE) { -+ ctrlParms.result = (int) g_pNvramInfo->ulPsiSize; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_SDRAM_SIZE: -+ if (boot_loader_type == BOOT_CFE) { -+ ctrlParms.result = (int) g_pNvramInfo->ulSdramSize; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ printk("RedBoot : not supported\n"); -+ return(-EINVAL); -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_BASE_MAC_ADDRESS: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) -+ { -+ __copy_to_user(ctrlParms.string, g_pNvramInfo->ucaBaseMacAddr, NVRAM_MAC_ADDRESS_LEN); -+ ctrlParms.result = 0; -+ -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, -+ sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else -+ ret = -EFAULT; -+ break; -+ -+ case BOARD_IOCTL_GET_CHIP_ID: -+ ctrlParms.result = (int) (PERF->RevID & 0xFFFF0000) >> 16; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+ -+ case BOARD_IOCTL_GET_NUM_ENET: { -+ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; -+ int i, numeth = 0; -+ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { -+ for( i = 0; i < BP_MAX_ENET_MACS; i++) { -+ if (EnetInfos[i].ucPhyType != BP_ENET_NO_PHY) { -+ numeth++; -+ } -+ } -+ ctrlParms.result = numeth; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ -+ case BOARD_IOCTL_GET_CFE_VER: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ char *vertag = (char *)(FLASH_BASE + CFE_VERSION_OFFSET); -+ if (ctrlParms.strLen < CFE_VERSION_SIZE) { -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = -EFAULT; -+ } -+ else if (strncmp(vertag, "cfe-v", 5)) { // no tag info in flash -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ else { -+ ctrlParms.result = 1; -+ __copy_to_user(ctrlParms.string, vertag+CFE_VERSION_MARK_SIZE, CFE_VERSION_SIZE); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_ENET_CFG: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ ETHERNET_MAC_INFO EnetInfos[BP_MAX_ENET_MACS]; -+ if (BpGetEthernetMacInfo(EnetInfos, BP_MAX_ENET_MACS) == BP_SUCCESS) { -+ if (ctrlParms.strLen == sizeof(EnetInfos)) { -+ __copy_to_user(ctrlParms.string, EnetInfos, sizeof(EnetInfos)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 -+ case BOARD_IOCTL_GET_RESETHOLD: -+ ctrlParms.result = kerSysGetResetHold(); -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ break; -+//>>JUNHON, 2004/09/15 -+ -+ -+#if defined (WIRELESS) -+ case BOARD_IOCTL_GET_WLAN_ANT_INUSE: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ unsigned short antInUse = 0; -+ if (BpGetWirelessAntInUse(&antInUse) == BP_SUCCESS) { -+ if (ctrlParms.strLen == sizeof(antInUse)) { -+ __copy_to_user(ctrlParms.string, &antInUse, sizeof(antInUse)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#endif -+ case BOARD_IOCTL_SET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ ctrlParms.result = -EFAULT; -+ ret = -EFAULT; -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ board_ioc->eventmask |= *((int*)ctrlParms.string); -+#if defined (WIRELESS) -+ if((board_ioc->eventmask & SES_EVENTS)) { -+ if(sesBtn_irq != BP_NOT_DEFINED) { -+ BcmHalInterruptEnable(sesBtn_irq); -+ ctrlParms.result = 0; -+ ret = 0; -+ } -+ } -+#endif -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ } -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_GET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ __copy_to_user(ctrlParms.string, &board_ioc->eventmask, sizeof(unsigned long)); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+ -+ case BOARD_IOCTL_UNSET_TRIGGER_EVENT: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ if (ctrlParms.strLen == sizeof(unsigned long)) { -+ BOARD_IOC *board_ioc = (BOARD_IOC *)flip->private_data; -+ board_ioc->eventmask &= (~(*((int*)ctrlParms.string))); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#if defined (WIRELESS) -+ case BOARD_IOCTL_SET_SES_LED: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ if (ctrlParms.strLen == sizeof(int)) { -+ sesLed_ctrl(*(int*)ctrlParms.string); -+ ctrlParms.result = 0; -+ __copy_to_user((BOARD_IOCTL_PARMS*)arg, &ctrlParms, sizeof(BOARD_IOCTL_PARMS)); -+ ret = 0; -+ } else -+ ret = -EFAULT; -+ -+ break; -+ } -+ else { -+ ret = -EFAULT; -+ } -+ break; -+#endif -+ -+ case BOARD_IOCTL_SET_MONITOR_FD: -+ if (copy_from_user((void*)&ctrlParms, (void*)arg, sizeof(ctrlParms)) == 0) { -+ int fput_needed = 0; -+ -+ g_monitor_file = fget_light( ctrlParms.offset, &fput_needed ); -+ if( g_monitor_file ) { -+ /* Hook this file descriptor's poll function in order to set -+ * the exception descriptor when there is a change in link -+ * state. -+ */ -+ g_monitor_task = current; -+ g_orig_fop_poll = kerSysMonitorPollHook; -+ /*g_orig_fop_poll = g_monitor_file->f_op->poll; -+ g_monitor_file->f_op->poll = kerSysMonitorPollHook;*/ -+ } -+ } -+ break; -+ -+ case BOARD_IOCTL_WAKEUP_MONITOR_TASK: -+ kerSysWakeupMonitorTask(); -+ break; -+ -+ default: -+ ret = -EINVAL; -+ ctrlParms.result = 0; -+ printk("board_ioctl: invalid command %x, cmd %d .\n",command,_IOC_NR(command)); -+ break; -+ -+ } /* switch */ -+ -+ return (ret); -+ -+} /* board_ioctl */ -+ -+/*************************************************************************** -+ * SES Button ISR/GPIO/LED functions. -+ ***************************************************************************/ -+#if defined (WIRELESS) -+static irqreturn_t sesBtn_isr(int irq, void *dev_id, struct pt_regs *ptregs) -+{ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if (!(*gpio_reg & gpio_mask)){ -+ wake_up_interruptible(&g_board_wait_queue); -+ return IRQ_RETVAL(1); -+ } else { -+ return IRQ_RETVAL(0); -+ } -+} -+ -+static void __init sesBtn_mapGpio() -+{ -+ if( BpGetWirelessSesBtnGpio(&sesBtn_gpio) == BP_SUCCESS ) -+ { -+ printk("SES: Button GPIO 0x%x is enabled\n", sesBtn_gpio); -+ } -+} -+ -+static void __init sesBtn_mapIntr(int context) -+{ -+ if( BpGetWirelessSesExtIntr(&sesBtn_irq) == BP_SUCCESS ) -+ { -+ printk("SES: Button Interrupt 0x%x is enabled\n", sesBtn_irq); -+ } -+ else -+ return; -+ -+ sesBtn_irq += INTERRUPT_ID_EXTERNAL_0; -+ -+ if (BcmHalMapInterrupt((FN_HANDLER)sesBtn_isr, context, sesBtn_irq)) { -+ printk("SES: Interrupt mapping failed\n"); -+ } -+ BcmHalInterruptEnable(sesBtn_irq); -+} -+ -+ -+static unsigned int sesBtn_poll(struct file *file, struct poll_table_struct *wait) -+{ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if (!(*gpio_reg & gpio_mask)){ -+ return POLLIN; -+ } -+ return 0; -+} -+ -+static ssize_t sesBtn_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) -+{ -+ volatile unsigned int event=0; -+ ssize_t ret=0; -+ -+#if defined(_BCM96338_) || defined (CONFIG_BCM96338) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96345_) || defined (CONFIG_BCM96345) -+ unsigned short gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned short *gpio_reg = &GPIO->GPIOio; -+#endif -+#if defined(_BCM96348_) || defined (CONFIG_BCM96348) -+ unsigned long gpio_mask = GPIO_NUM_TO_MASK(sesBtn_gpio); -+ volatile unsigned long *gpio_reg = &GPIO->GPIOio; -+ -+ if( (sesBtn_gpio & ~BP_ACTIVE_MASK) >= 32 ) -+ { -+ gpio_mask = GPIO_NUM_TO_MASK_HIGH(sesBtn_gpio); -+ gpio_reg = &GPIO->GPIOio_high; -+ } -+#endif -+ -+ if(*gpio_reg & gpio_mask){ -+ BcmHalInterruptEnable(sesBtn_irq); -+ return ret; -+ } -+ event = SES_EVENTS; -+ __copy_to_user((char*)buffer, (char*)&event, sizeof(event)); -+ BcmHalInterruptEnable(sesBtn_irq); -+ count -= sizeof(event); -+ buffer += sizeof(event); -+ ret += sizeof(event); -+ return ret; -+} -+ -+static void __init sesLed_mapGpio() -+{ -+ if( BpGetWirelessSesBtnGpio(&sesLed_gpio) == BP_SUCCESS ) -+ { -+ printk("SES: LED GPIO 0x%x is enabled\n", sesBtn_gpio); -+ } -+} -+ -+static void sesLed_ctrl(int action) -+{ -+ -+ //char status = ((action >> 8) & 0xff); /* extract status */ -+ //char event = ((action >> 16) & 0xff); /* extract event */ -+ //char blinktype = ((action >> 24) & 0xff); /* extract blink type for SES_LED_BLINK */ -+ -+ BOARD_LED_STATE led; -+ -+ if(sesLed_gpio == BP_NOT_DEFINED) -+ return; -+ -+ action &= 0xff; /* extract led */ -+ -+ //printk("blinktype=%d, event=%d, status=%d\n",(int)blinktype, (int)event, (int)status); -+ -+ switch (action) -+ { -+ case SES_LED_ON: -+ //printk("SES: led on\n"); -+ led = kLedStateOn; -+ break; -+ case SES_LED_BLINK: -+ //printk("SES: led blink\n"); -+ led = kLedStateSlowBlinkContinues; -+ break; -+ case SES_LED_OFF: -+ default: -+ //printk("SES: led off\n"); -+ led = kLedStateOff; -+ } -+ -+ kerSysLedCtrl(kLedSes, led); -+} -+ -+static void __init ses_board_init() -+{ -+ sesBtn_mapGpio(); -+ sesBtn_mapIntr(0); -+ sesLed_mapGpio(); -+} -+static void __exit ses_board_deinit() -+{ -+ if(sesBtn_irq) -+ BcmHalInterruptDisable(sesBtn_irq); -+} -+#endif -+ -+/*************************************************************************** -+ * Dying gasp ISR and functions. -+ ***************************************************************************/ -+#define KERSYS_DBG printk -+ -+#if defined(CONFIG_BCM96345) -+#define CYCLE_PER_US 70 -+#elif defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338) -+/* The BCM6348 cycles per microsecond is really variable since the BCM6348 -+ * MIPS speed can vary depending on the PLL settings. However, an appoximate -+ * value of 120 will still work OK for the test being done. -+ */ -+#define CYCLE_PER_US 120 -+#endif -+#define DG_GLITCH_TO (100*CYCLE_PER_US) -+ -+static void __init kerSysDyingGaspMapIntr() -+{ -+ unsigned long ulIntr; -+ -+#if defined(CONFIG_BCM96348) || defined(_BCM96348_) || defined(CONFIG_BCM96338) || defined(_BCM96338_) -+ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { -+ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, INTERRUPT_ID_DG); -+ BcmHalInterruptEnable( INTERRUPT_ID_DG ); -+ } -+#elif defined(CONFIG_BCM96345) || defined(_BCM96345_) -+ if( BpGetAdslDyingGaspExtIntr( &ulIntr ) == BP_SUCCESS ) { -+ ulIntr += INTERRUPT_ID_EXTERNAL_0; -+ BcmHalMapInterrupt((FN_HANDLER)kerSysDyingGaspIsr, 0, ulIntr); -+ BcmHalInterruptEnable( ulIntr ); -+ } -+#endif -+ -+} -+ -+void kerSysSetWdTimer(ulong timeUs) -+{ -+ TIMER->WatchDogDefCount = timeUs * (FPERIPH/1000000); -+ TIMER->WatchDogCtl = 0xFF00; -+ TIMER->WatchDogCtl = 0x00FF; -+} -+ -+ulong kerSysGetCycleCount(void) -+{ -+ ulong cnt; -+#ifdef _WIN32_WCE -+ cnt = 0; -+#else -+ __asm volatile("mfc0 %0, $9":"=d"(cnt)); -+#endif -+ return(cnt); -+} -+ -+static Bool kerSysDyingGaspCheckPowerLoss(void) -+{ -+ ulong clk0; -+ ulong ulIntr; -+ -+ ulIntr = 0; -+ clk0 = kerSysGetCycleCount(); -+ -+ UART->Data = 'D'; -+ UART->Data = '%'; -+ UART->Data = 'G'; -+ -+#if defined(CONFIG_BCM96345) -+ BpGetAdslDyingGaspExtIntr( &ulIntr ); -+ -+ do { -+ ulong clk1; -+ -+ clk1 = kerSysGetCycleCount(); /* time cleared */ -+ /* wait a little to get new reading */ -+ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) -+ ; -+ } while ((0 == (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT)))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); -+ -+ if (PERF->ExtIrqCfg & (1 << (ulIntr + EI_STATUS_SHFT))) { /* power glitch */ -+ BcmHalInterruptEnable( ulIntr + INTERRUPT_ID_EXTERNAL_0); -+ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); -+ return 0; -+ } -+#elif (defined(CONFIG_BCM96348) || defined(CONFIG_BCM96338)) && !defined(VXWORKS) -+ do { -+ ulong clk1; -+ -+ clk1 = kerSysGetCycleCount(); /* time cleared */ -+ /* wait a little to get new reading */ -+ while ((kerSysGetCycleCount()-clk1) < CYCLE_PER_US*2) -+ ; -+ } while ((PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET))) && ((kerSysGetCycleCount() - clk0) < DG_GLITCH_TO)); -+ -+ if (!(PERF->IrqStatus & (1 << (INTERRUPT_ID_DG - INTERNAL_ISR_TABLE_OFFSET)))) { -+ BcmHalInterruptEnable( INTERRUPT_ID_DG ); -+ KERSYS_DBG(" - Power glitch detected. Duration: %ld us\n", (kerSysGetCycleCount() - clk0)/CYCLE_PER_US); -+ return 0; -+ } -+#endif -+ return 1; -+} -+ -+static void kerSysDyingGaspShutdown( void ) -+{ -+ kerSysSetWdTimer(1000000); -+#if defined(CONFIG_BCM96345) -+ PERF->blkEnables &= ~(EMAC_CLK_EN | USB_CLK_EN | CPU_CLK_EN); -+#elif defined(CONFIG_BCM96348) -+ PERF->blkEnables &= ~(EMAC_CLK_EN | USBS_CLK_EN | USBH_CLK_EN | SAR_CLK_EN); -+#endif -+} -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs) -+#else -+static unsigned int kerSysDyingGaspIsr(void) -+#endif -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp, *dsl = NULL; -+ -+ if (kerSysDyingGaspCheckPowerLoss()) { -+ -+ /* first to turn off everything other than dsl */ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ if(strncmp(tmp->name, "dsl", 3)) { -+ (tmp->cb_dgasp_fn)(tmp->context); -+ }else { -+ dsl = tmp; -+ } -+ } -+ -+ /* now send dgasp */ -+ if(dsl) -+ (dsl->cb_dgasp_fn)(dsl->context); -+ -+ /* reset and shutdown system */ -+ kerSysDyingGaspShutdown(); -+ } -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+return( IRQ_HANDLED ); -+#else -+ return( 1 ); -+#endif -+} -+ -+static void __init kerSysInitDyingGaspHandler( void ) -+{ -+ CB_DGASP_LIST *new_node; -+ -+ if( g_cb_dgasp_list_head != NULL) { -+ printk("Error: kerSysInitDyingGaspHandler: list head is not null\n"); -+ return; -+ } -+ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); -+ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); -+ INIT_LIST_HEAD(&new_node->list); -+ g_cb_dgasp_list_head = new_node; -+ -+} /* kerSysInitDyingGaspHandler */ -+ -+static void __exit kerSysDeinitDyingGaspHandler( void ) -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp; -+ -+ if(g_cb_dgasp_list_head == NULL) -+ return; -+ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ list_del(pos); -+ kfree(tmp); -+ } -+ -+ kfree(g_cb_dgasp_list_head); -+ g_cb_dgasp_list_head = NULL; -+ -+} /* kerSysDeinitDyingGaspHandler */ -+ -+void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context) -+{ -+ CB_DGASP_LIST *new_node; -+ -+ if( g_cb_dgasp_list_head == NULL) { -+ printk("Error: kerSysRegisterDyingGaspHandler: list head is null\n"); -+ return; -+ } -+ -+ if( devname == NULL || cbfn == NULL ) { -+ printk("Error: kerSysRegisterDyingGaspHandler: register info not enough (%s,%x,%x)\n", devname, (unsigned int)cbfn, (unsigned int)context); -+ return; -+ } -+ -+ new_node= (CB_DGASP_LIST *)kmalloc(sizeof(CB_DGASP_LIST), GFP_KERNEL); -+ memset(new_node, 0x00, sizeof(CB_DGASP_LIST)); -+ INIT_LIST_HEAD(&new_node->list); -+ strncpy(new_node->name, devname, IFNAMSIZ); -+ new_node->cb_dgasp_fn = (cb_dgasp_t)cbfn; -+ new_node->context = context; -+ list_add(&new_node->list, &g_cb_dgasp_list_head->list); -+ -+ printk("dgasp: kerSysRegisterDyingGaspHandler: %s registered \n", devname); -+ -+} /* kerSysRegisterDyingGaspHandler */ -+ -+void kerSysDeregisterDyingGaspHandler(char *devname) -+{ -+ struct list_head *pos; -+ CB_DGASP_LIST *tmp; -+ -+ if(g_cb_dgasp_list_head == NULL) { -+ printk("Error: kerSysDeregisterDyingGaspHandler: list head is null\n"); -+ return; -+ } -+ -+ if(devname == NULL) { -+ printk("Error: kerSysDeregisterDyingGaspHandler: devname is null\n"); -+ return; -+ } -+ -+ printk("kerSysDeregisterDyingGaspHandler: %s is deregistering\n", devname); -+ -+ list_for_each(pos, &g_cb_dgasp_list_head->list) { -+ tmp = list_entry(pos, CB_DGASP_LIST, list); -+ if(!strcmp(tmp->name, devname)) { -+ list_del(pos); -+ kfree(tmp); -+ printk("kerSysDeregisterDyingGaspHandler: %s is deregistered\n", devname); -+ return; -+ } -+ } -+ printk("kerSysDeregisterDyingGaspHandler: %s not (de)registered\n", devname); -+ -+} /* kerSysDeregisterDyingGaspHandler */ -+ -+/*************************************************************************** -+ * MACRO to call driver initialization and cleanup functions. -+ ***************************************************************************/ -+module_init( brcm_board_init ); -+module_exit( brcm_board_cleanup ); -+ -+EXPORT_SYMBOL(kerSysNvRamGet); -+EXPORT_SYMBOL(dumpaddr); -+EXPORT_SYMBOL(kerSysGetMacAddress); -+EXPORT_SYMBOL(kerSysReleaseMacAddress); -+EXPORT_SYMBOL(kerSysGetSdramSize); -+EXPORT_SYMBOL(kerSysLedCtrl); -+//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 -+EXPORT_SYMBOL(kerSysGetResetHold); -+//>>JUNHON, 2004/09/15 -+EXPORT_SYMBOL(kerSysLedRegisterHwHandler); -+EXPORT_SYMBOL(BpGetBoardIds); -+EXPORT_SYMBOL(BpGetSdramSize); -+EXPORT_SYMBOL(BpGetPsiSize); -+EXPORT_SYMBOL(BpGetEthernetMacInfo); -+EXPORT_SYMBOL(BpGetRj11InnerOuterPairGpios); -+EXPORT_SYMBOL(BpGetPressAndHoldResetGpio); -+EXPORT_SYMBOL(BpGetVoipResetGpio); -+EXPORT_SYMBOL(BpGetVoipIntrGpio); -+EXPORT_SYMBOL(BpGetPcmciaResetGpio); -+EXPORT_SYMBOL(BpGetRtsCtsUartGpios); -+EXPORT_SYMBOL(BpGetAdslLedGpio); -+EXPORT_SYMBOL(BpGetAdslFailLedGpio); -+EXPORT_SYMBOL(BpGetWirelessLedGpio); -+EXPORT_SYMBOL(BpGetUsbLedGpio); -+EXPORT_SYMBOL(BpGetHpnaLedGpio); -+EXPORT_SYMBOL(BpGetWanDataLedGpio); -+EXPORT_SYMBOL(BpGetPppLedGpio); -+EXPORT_SYMBOL(BpGetPppFailLedGpio); -+EXPORT_SYMBOL(BpGetVoipLedGpio); -+EXPORT_SYMBOL(BpGetWirelessExtIntr); -+EXPORT_SYMBOL(BpGetAdslDyingGaspExtIntr); -+EXPORT_SYMBOL(BpGetVoipExtIntr); -+EXPORT_SYMBOL(BpGetHpnaExtIntr); -+EXPORT_SYMBOL(BpGetHpnaChipSelect); -+EXPORT_SYMBOL(BpGetVoipChipSelect); -+EXPORT_SYMBOL(BpGetWirelessSesBtnGpio); -+EXPORT_SYMBOL(BpGetWirelessSesExtIntr); -+EXPORT_SYMBOL(BpGetWirelessSesLedGpio); -+EXPORT_SYMBOL(kerSysRegisterDyingGaspHandler); -+EXPORT_SYMBOL(kerSysDeregisterDyingGaspHandler); -+EXPORT_SYMBOL(kerSysGetCycleCount); -+EXPORT_SYMBOL(kerSysSetWdTimer); -+EXPORT_SYMBOL(kerSysWakeupMonitorTask); -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,2391 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.c -+ * -+ * Description: This file contains the implementation for the BCM63xx board -+ * parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include "boardparms.h" -+ -+/* Defines. */ -+ -+/* Default psi size in K bytes */ -+#define BP_PSI_DEFAULT_SIZE 24 -+ -+/* Typedefs */ -+typedef struct boardparameters -+{ -+ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ -+ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; -+ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; -+ unsigned short usSdramSize; /* SDRAM size and type */ -+ unsigned short usPsiSize; /* persistent storage in K bytes */ -+ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ -+ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ -+ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ -+ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ -+ unsigned short usGpioUartRts; /* GPIO pin or not defined */ -+ unsigned short usGpioUartCts; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ -+ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ -+ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ -+ unsigned short usExtIntrWireless; /* ext intr or not defined */ -+ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ -+ unsigned short usExtIntrHpna; /* ext intr or not defined */ -+ unsigned short usCsHpna; /* chip select not defined */ -+ unsigned short usAntInUseWireless; /* antenna in use or not defined */ -+ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ -+ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ -+ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ -+} BOARD_PARAMETERS, *PBOARD_PARAMETERS; -+ -+/* Variables */ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+static BOARD_PARAMETERS g_bcm96338sv = -+{ -+ "96338SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static BOARD_PARAMETERS g_bcm96338l2m8m = -+{ -+ "96338L-2M-8M", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; -+#endif -+ -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+static BOARD_PARAMETERS g_bcm96345r = -+{ -+ "96345R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw2 = -+{ -+ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold -+ * Reset or RTS. -+ */ -+ "96345GW2", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_GPIO_0_AH, /* usGpioPhySpiSck */ -+ BP_GPIO_4_AH, /* usGpioPhySpiSs */ -+ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ -+ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_GPIO, /* usConfigType */ -+ BP_ENET_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_GPIO_13_AH, /* usGpioUartRts */ -+ BP_GPIO_9_AH, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw = -+{ -+ "96345GW", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_GPIO_10_AH, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_EXT_INTR_3, /* usExtIntrHpna */ -+ BP_CS_1, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96335r = -+{ -+ "96335R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_9_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_8_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_9_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345r0 = -+{ -+ "96345R0", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345rs = -+{ -+ "96345RS", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, -+ &g_bcm96345rs, 0}; -+#endif -+ -+#if defined(_BCM96348_) || defined(CONFIG_BCM96348) -+ -+static BOARD_PARAMETERS g_bcm96348r = -+{ -+ "96348R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348lv = -+{ -+ "96348LV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x02, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_GPIO_5_AL, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw = -+{ -+ "96348GW", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_10 = -+{ -+ "96348GW-10", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw_11 = -+{ -+ "96348GW-11", /* szBoardId */ -+ {{BP_ENET_NO_PHY}, /* ucPhyType */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348sv = -+{ -+ "96348SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x1f, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_dualDsp = -+{ -+ "96348GW-DualDSP", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_UNEQUIPPED, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_DSP, /* ucDspType */ -+ 0x01, /* ucDspAddress */ -+ BP_EXT_INTR_3, /* usExtIntrVoip */ -+ BP_UNEQUIPPED , /* usGpioVoipReset */ -+ BP_GPIO_35_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_3}}, /* usCsVoip */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcmCustom_01 = -+{ -+ "BCMCUST_01", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_36_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AL, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, -+ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, -+ &g_bcmCustom_01, 0}; -+#endif -+ -+static PBOARD_PARAMETERS g_pCurrentBp = 0; -+ -+/************************************************************************** -+ * Name : bpstrcmp -+ * -+ * Description: String compare for this file so it does not depend on an OS. -+ * (Linux kernel and CFE share this source file.) -+ * -+ * Parameters : [IN] dest - destination string -+ * [IN] src - source string -+ * -+ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src -+ ***************************************************************************/ -+static int bpstrcmp(const char *dest,const char *src); -+static int bpstrcmp(const char *dest,const char *src) -+{ -+ while (*src && *dest) -+ { -+ if (*dest < *src) return -1; -+ if (*dest > *src) return 1; -+ dest++; -+ src++; -+ } -+ -+ if (*dest && !*src) return 1; -+ if (!*dest && *src) return -1; -+ return 0; -+} /* bpstrcmp */ -+ -+/************************************************************************** -+ * Name : BpGetVoipDspConfig -+ * -+ * Description: Gets the DSP configuration from the board parameter -+ * structure for a given DSP index. -+ * -+ * Parameters : [IN] dspNum - DSP index (number) -+ * -+ * Returns : Pointer to DSP configuration block if found/valid, NULL -+ * otherwise. -+ ***************************************************************************/ -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) -+{ -+ VOIP_DSP_INFO *pDspConfig = 0; -+ int i; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) -+ { -+ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && -+ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) -+ { -+ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; -+ break; -+ } -+ } -+ } -+ -+ return pDspConfig; -+} -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ) -+{ -+ int nRet = BP_BOARD_ID_NOT_FOUND; -+ PBOARD_PARAMETERS *ppBp; -+ -+ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) -+ { -+ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) -+ { -+ g_pCurrentBp = *ppBp; -+ nRet = BP_SUCCESS; -+ break; -+ } -+ } -+ -+ return( nRet ); -+} /* BpSetBoardId */ -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) -+{ -+ PBOARD_PARAMETERS *ppBp; -+ int i; -+ char *src; -+ char *dest; -+ -+ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; -+ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) -+ { -+ dest = pszBoardIds; -+ src = (*ppBp)->szBoardId; -+ while( *src ) -+ *dest++ = *src++; -+ *dest = '\0'; -+ } -+ -+ return( i ); -+} /* BpGetBoardIds */ -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) -+{ -+ int i, nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ { -+ if( i < BP_MAX_ENET_MACS ) -+ { -+ unsigned char *src = (unsigned char *) -+ &g_pCurrentBp->EnetMacInfos[i]; -+ unsigned char *dest = (unsigned char *) pEnetInfos; -+ int len = sizeof(ETHERNET_MAC_INFO); -+ while( len-- ) -+ *dest++ = *src++; -+ } -+ else -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ } -+ -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetEthernetMacInfo */ -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulSdramSize = g_pCurrentBp->usSdramSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulSdramSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetSdramSize */ -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulPsiSize = g_pCurrentBp->usPsiSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulPsiSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPsiSize */ -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; -+ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; -+ -+ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusInner = *pusOuter = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetRj11InnerOuterPairGpios */ -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; -+ -+ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPressAndHoldResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipReset; -+ -+ if( *pusValue != BP_NOT_DEFINED || -+ *pusValue == BP_UNEQUIPPED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipIntr; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipIntrGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPcmciaReset; -+ -+ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPcmciaResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, board id input string does not -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusRts = g_pCurrentBp->usGpioUartRts; -+ *pusCts = g_pCurrentBp->usGpioUartCts; -+ -+ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusRts = *pusCts = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUartRtsCtsGpios */ -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdsl; -+ -+ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdslFail; -+ -+ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWireless; -+ -+ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usAntInUseWireless; -+ -+ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessAntInUse */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; -+ -+ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessSesBtnGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; -+ -+ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedSesWireless; -+ -+ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedUsb; -+ -+ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUsbLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedHpna; -+ -+ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWanData; -+ -+ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWanDataLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPpp; -+ -+ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPppFail; -+ -+ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; -+ -+ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderPowerOn */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; -+ -+ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderAlarmLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; -+ -+ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderResetCfgLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlStop; -+ -+ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderStopLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ * -+ * Note : The VoIP structure would allow for having one LED per DSP -+ * however, the board initialization function assumes only one -+ * LED per functionality (ie one LED for VoIP). Therefore in -+ * order to keep this tidy and simple we do not make usage of the -+ * one-LED-per-DSP function. Instead, we assume that the LED for -+ * VoIP is unique and associated with DSP 0 (always present on -+ * any VoIP platform). If changing this to a LED-per-DSP function -+ * then one need to update the board initialization driver in -+ * bcmdrivers\opensource\char\board\bcm963xx\impl1 -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioLedVoip; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrWireless; -+ -+ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; -+ -+ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslDyingGaspExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usExtIntrVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrHpna; -+ -+ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usCsHpna; -+ -+ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaChipSelect */ -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usCsVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipChipSelect */ -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/boardparms.h 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,758 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.h -+ * -+ * Description: This file contains definitions and function prototypes for -+ * the BCM63xx board parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+#if !defined(_BOARDPARMS_H) -+#define _BOARDPARMS_H -+ -+/* Return codes. */ -+#define BP_SUCCESS 0 -+#define BP_BOARD_ID_NOT_FOUND 1 -+#define BP_VALUE_NOT_DEFINED 2 -+#define BP_BOARD_ID_NOT_SET 3 -+ -+/* Values for BpGetSdramSize. */ -+#define BP_MEMORY_8MB_1_CHIP 0 -+#define BP_MEMORY_16MB_1_CHIP 1 -+#define BP_MEMORY_32MB_1_CHIP 2 -+#define BP_MEMORY_64MB_2_CHIP 3 -+#define BP_MEMORY_32MB_2_CHIP 4 -+#define BP_MEMORY_16MB_2_CHIP 5 -+ -+/* Values for EthernetMacInfo PhyType. */ -+#define BP_ENET_NO_PHY 0 -+#define BP_ENET_INTERNAL_PHY 1 -+#define BP_ENET_EXTERNAL_PHY 2 -+#define BP_ENET_EXTERNAL_SWITCH 3 -+ -+/* Values for EthernetMacInfo Configuration type. */ -+#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ -+#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ -+#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ -+ -+/* Values for EthernetMacInfo Reverse MII. */ -+#define BP_ENET_NO_REVERSE_MII 0 -+#define BP_ENET_REVERSE_MII 1 -+ -+/* Values for VoIPDSPInfo DSPType. */ -+#define BP_VOIP_NO_DSP 0 -+#define BP_VOIP_DSP 1 -+ -+ -+/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ -+#define BP_ACTIVE_MASK 0x8000 -+#define BP_ACTIVE_HIGH 0x0000 -+#define BP_ACTIVE_LOW 0x8000 -+#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) -+#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) -+#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) -+#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) -+#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) -+#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) -+#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) -+#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) -+#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) -+#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) -+#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) -+#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) -+#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) -+#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) -+#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) -+#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) -+#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) -+#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) -+#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) -+#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) -+#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) -+#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) -+#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) -+#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) -+#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) -+#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) -+#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) -+#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) -+#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) -+#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) -+#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) -+#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) -+#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) -+#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) -+#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) -+#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) -+#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) -+#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) -+#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) -+#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) -+#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) -+#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) -+#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) -+#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) -+#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) -+#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) -+#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) -+#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) -+#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) -+#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) -+#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) -+#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) -+#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) -+#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) -+#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) -+#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) -+#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) -+#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) -+#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) -+#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) -+#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) -+#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) -+#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) -+#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) -+#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) -+#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) -+#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) -+#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) -+#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) -+#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) -+#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) -+#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) -+#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) -+#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) -+ -+/* Values for external interrupt assignments. */ -+#define BP_EXT_INTR_0 0 -+#define BP_EXT_INTR_1 1 -+#define BP_EXT_INTR_2 2 -+#define BP_EXT_INTR_3 3 -+ -+/* Values for chip select assignments. */ -+#define BP_CS_0 0 -+#define BP_CS_1 1 -+#define BP_CS_2 2 -+#define BP_CS_3 3 -+ -+/* Value for GPIO and external interrupt fields that are not used. */ -+#define BP_NOT_DEFINED 0xffff -+#define BP_HW_DEFINED 0xfff0 -+#define BP_UNEQUIPPED 0xfff1 -+ -+/* Maximum size of the board id string. */ -+#define BP_BOARD_ID_LEN 16 -+ -+/* Maximum number of Ethernet MACs. */ -+#define BP_MAX_ENET_MACS 2 -+ -+/* Maximum number of VoIP DSPs. */ -+#define BP_MAX_VOIP_DSP 2 -+ -+/* Wireless Antenna Settings. */ -+#define BP_WLAN_ANT_MAIN 0 -+#define BP_WLAN_ANT_AUX 1 -+#define BP_WLAN_ANT_BOTH 3 -+ -+#if !defined(__ASSEMBLER__) -+ -+/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, -+ * then the other fields are not valid. -+ */ -+typedef struct EthernetMacInfo -+{ -+ unsigned char ucPhyType; /* BP_ENET_xxx */ -+ unsigned char ucPhyAddress; /* 0 to 31 */ -+ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ -+ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ -+ unsigned short numSwitchPorts; /* Number of PHY ports */ -+ unsigned short usConfigType; /* Configuration type */ -+ unsigned short usReverseMii; /* Reverse MII */ -+} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; -+ -+ -+/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, -+ * then the other fields are not valid. -+ */ -+typedef struct VoIPDspInfo -+{ -+ unsigned char ucDspType; -+ unsigned char ucDspAddress; -+ unsigned short usExtIntrVoip; -+ unsigned short usGpioVoipReset; -+ unsigned short usGpioVoipIntr; -+ unsigned short usGpioLedVoip; -+ unsigned short usCsVoip; -+ -+} VOIP_DSP_INFO; -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ); -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ); -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ); -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ); -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); -+ -+#endif /* __ASSEMBLER__ */ -+ -+#endif /* _BOARDPARMS_H */ -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,692 @@ -+/************************************************************************/ -+/* */ -+/* AMD CFI Enabled Flash Memory Drivers */ -+/* File name: CFIFLASH.C */ -+/* Revision: 1.0 5/07/98 */ -+/* */ -+/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ -+/* This software is unpublished and contains the trade secrets and */ -+/* confidential proprietary information of AMD. Unless otherwise */ -+/* provided in the Software Agreement associated herewith, it is */ -+/* licensed in confidence "AS IS" and is not to be reproduced in whole */ -+/* or part by any means except for backup. Use, duplication, or */ -+/* disclosure by the Government is subject to the restrictions in */ -+/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ -+/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ -+/* Software owned by */ -+/* Advanced Micro Devices, Inc., */ -+/* One AMD Place, */ -+/* P.O. Box 3453 */ -+/* Sunnyvale, CA 94088-3453. */ -+/************************************************************************/ -+/* This software constitutes a basic shell of source code for */ -+/* programming all AMD Flash components. AMD */ -+/* will not be responsible for misuse or illegal use of this */ -+/* software for devices not supported herein. AMD is providing */ -+/* this source code "AS IS" and will not be responsible for */ -+/* issues arising from incorrect user implementation of the */ -+/* source code herein. It is the user's responsibility to */ -+/* properly design-in this source code. */ -+/* */ -+/************************************************************************/ -+#ifdef _CFE_ -+#include "lib_types.h" -+#include "lib_printf.h" -+#include "lib_string.h" -+#include "cfe_timer.h" -+#define printk printf -+#else // linux -+#include <linux/param.h> -+#include <linux/sched.h> -+#include <linux/timer.h> -+#endif -+ -+#include "cfiflash.h" -+ -+static int flash_wait(WORD sector, int offset, UINT16 data); -+static UINT16 flash_get_device_id(void); -+static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily); -+static int flash_write(WORD sector, int offset, byte *buf, int nbytes); -+static void flash_command(int command, WORD sector, int offset, UINT16 data); -+ -+/*********************************************************************/ -+/* 'meminfo' should be a pointer, but most C compilers will not */ -+/* allocate static storage for a pointer without calling */ -+/* non-portable functions such as 'new'. We also want to avoid */ -+/* the overhead of passing this pointer for every driver call. */ -+/* Systems with limited heap space will need to do this. */ -+/*********************************************************************/ -+struct flashinfo meminfo; /* Flash information structure */ -+static int flashFamily = FLASH_UNDEFINED; -+static int totalSize = 0; -+static struct cfi_query query; -+ -+static UINT16 cfi_data_struct_29W160[] = { -+ 0x0020, 0x0049, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0051, 0x0052, 0x0059, 0x0002, 0x0000, 0x0040, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0027, 0x0036, 0x0000, 0x0000, 0x0004, -+ 0x0000, 0x000a, 0x0000, 0x0004, 0x0000, 0x0003, 0x0000, 0x0015, -+ 0x0002, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0040, -+ 0x0000, 0x0001, 0x0000, 0x0020, 0x0000, 0x0000, 0x0000, 0x0080, -+ 0x0000, 0x001e, 0x0000, 0x0000, 0x0001, 0xffff, 0xffff, 0xffff, -+ 0x0050, 0x0052, 0x0049, 0x0031, 0x0030, 0x0000, 0x0002, 0x0001, -+ 0x0001, 0x0004, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0002, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0x0888, 0x252b, 0x8c84, 0x7dbc, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff -+}; -+ -+ -+/*********************************************************************/ -+/* Init_flash is used to build a sector table from the information */ -+/* provided through the CFI query. This information is translated */ -+/* from erase_block information to base:offset information for each */ -+/* individual sector. This information is then stored in the meminfo */ -+/* structure, and used throughout the driver to access sector */ -+/* information. */ -+/* */ -+/* This is more efficient than deriving the sector base:offset */ -+/* information every time the memory map switches (since on the */ -+/* development platform can only map 64k at a time). If the entire */ -+/* flash memory array can be mapped in, then the addition static */ -+/* allocation for the meminfo structure can be eliminated, but the */ -+/* drivers will have to be re-written. */ -+/* */ -+/* The meminfo struct occupies 653 bytes of heap space, depending */ -+/* on the value of the define MAXSECTORS. Adjust to suit */ -+/* application */ -+/*********************************************************************/ -+byte flash_init(void) -+{ -+ int i=0, j=0, count=0; -+ int basecount=0L; -+ UINT16 device_id; -+ int flipCFIGeometry = FALSE; -+ -+ /* First, assume -+ * a single 8k sector for sector 0. This is to allow -+ * the system to perform memory mapping to the device, -+ * even though the actual physical layout is unknown. -+ * Once mapped in, the CFI query will produce all -+ * relevant information. -+ */ -+ meminfo.addr = 0L; -+ meminfo.areg = 0; -+ meminfo.nsect = 1; -+ meminfo.bank1start = 0; -+ meminfo.bank2start = 0; -+ -+ meminfo.sec[0].size = 8192; -+ meminfo.sec[0].base = 0x00000; -+ meminfo.sec[0].bank = 1; -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ -+ device_id = flash_get_device_id(); -+ -+ switch (device_id) { -+ case ID_I28F160C3B: -+ case ID_I28F320C3B: -+ case ID_I28F160C3T: -+ case ID_I28F320C3T: -+ flashFamily = FLASH_INTEL; -+ break; -+ case ID_AM29DL800B: -+ case ID_AM29LV800B: -+ case ID_AM29LV400B: -+ case ID_AM29LV160B: -+ case ID_AM29LV320B: -+ case ID_MX29LV320AB: -+ case ID_AM29LV320MB: -+ case ID_AM29DL800T: -+ case ID_AM29LV800T: -+ case ID_AM29LV160T: -+ case ID_AM29LV320T: -+ case ID_MX29LV320AT: -+ case ID_AM29LV320MT: -+ flashFamily = FLASH_AMD; -+ break; -+ case ID_SST39VF1601: -+ case ID_SST39VF3201: -+ flashFamily = FLASH_SST; -+ break; -+ default: -+ printk("Flash memory not supported! Device id = %x\n", device_id); -+ return -1; -+ } -+ -+ if (flash_get_cfi(&query, 0, flashFamily) == -1) { -+ switch(device_id) { -+ case ID_AM29LV160T: -+ case ID_AM29LV160B: -+ flash_get_cfi(&query, cfi_data_struct_29W160, flashFamily); -+ break; -+ default: -+ printk("CFI data structure not found. Device id = %x\n", device_id); -+ return -1; -+ } -+ } -+ -+ // need to determine if it top or bottom boot here -+ switch (device_id) -+ { -+ case ID_AM29DL800B: -+ case ID_AM29LV800B: -+ case ID_AM29LV400B: -+ case ID_AM29LV160B: -+ case ID_AM29LV320B: -+ case ID_MX29LV320AB: -+ case ID_AM29LV320MB: -+ case ID_I28F160C3B: -+ case ID_I28F320C3B: -+ case ID_I28F160C3T: -+ case ID_I28F320C3T: -+ case ID_SST39VF1601: -+ case ID_SST39VF3201: -+ flipCFIGeometry = FALSE; -+ break; -+ case ID_AM29DL800T: -+ case ID_AM29LV800T: -+ case ID_AM29LV160T: -+ case ID_AM29LV320T: -+ case ID_MX29LV320AT: -+ case ID_AM29LV320MT: -+ flipCFIGeometry = TRUE; -+ break; -+ default: -+ printk("Flash memory not supported! Device id = %x\n", device_id); -+ return -1; -+ } -+ -+ count=0;basecount=0L; -+ -+ if (!flipCFIGeometry) -+ { -+ for (i=0; i<query.num_erase_blocks; i++) { -+ for(j=0; j<query.erase_block[i].num_sectors; j++) { -+ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; -+ meminfo.sec[count].base = (int) basecount; -+ basecount += (int) query.erase_block[i].sector_size; -+ count++; -+ } -+ } -+ } -+ else -+ { -+ for (i = (query.num_erase_blocks - 1); i >= 0; i--) { -+ for(j=0; j<query.erase_block[i].num_sectors; j++) { -+ meminfo.sec[count].size = (int) query.erase_block[i].sector_size; -+ meminfo.sec[count].base = (int) basecount; -+ basecount += (int) query.erase_block[i].sector_size; -+ count++; -+ } -+ } -+ } -+ -+ meminfo.nsect = count; -+ totalSize = meminfo.sec[count-1].base + meminfo.sec[count-1].size; -+ return (0); -+} -+ -+/*********************************************************************/ -+/* Flash_sector_erase_int() is identical to flash_sector_erase(), */ -+/* except it will wait until the erase is completed before returning */ -+/* control to the calling function. This can be used in cases which */ -+/* require the program to hold until a sector is erased, without */ -+/* adding the wait check external to this function. */ -+/*********************************************************************/ -+byte flash_sector_erase_int(WORD sector) -+{ -+ int i; -+ -+ for( i = 0; i < 3; i++ ) { -+ flash_command(FLASH_SERASE, sector, 0, 0); -+ if (flash_wait(sector, 0, 0xffff) == STATUS_READY) -+ break; -+ } -+ -+ return(1); -+} -+ -+/*********************************************************************/ -+/* flash_read_buf() reads buffer of data from the specified */ -+/* offset from the sector parameter. */ -+/*********************************************************************/ -+int flash_read_buf(WORD sector, int offset, -+ byte *buffer, int numbytes) -+{ -+ byte *fwp; -+ -+ fwp = (byte *)flash_get_memptr(sector); -+ -+ while (numbytes) { -+ *buffer++ = *(fwp + offset); -+ numbytes--; -+ fwp++; -+ } -+ -+ return (1); -+} -+ -+/*********************************************************************/ -+/* flash_write_buf() utilizes */ -+/* the unlock bypass mode of the flash device. This can remove */ -+/* significant overhead from the bulk programming operation, and */ -+/* when programming bulk data a sizeable performance increase can be */ -+/* observed. */ -+/*********************************************************************/ -+int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes) -+{ -+ int ret = -1; -+ int i; -+ unsigned char *p = flash_get_memptr(sector) + offset; -+ -+ /* After writing the flash block, compare the contents to the source -+ * buffer. Try to write the sector successfully up to three times. -+ */ -+ for( i = 0; i < 3; i++ ) { -+ ret = flash_write(sector, offset, buffer, numbytes); -+ if( !memcmp( p, buffer, numbytes ) ) -+ break; -+ /* Erase and try again */ -+ flash_sector_erase_int(sector); -+ ret = -1; -+ } -+ -+ if( ret == -1 ) -+ printk( "Flash write error. Verify failed\n" ); -+ -+ return( ret ); -+} -+ -+/*********************************************************************/ -+/* Usefull funtion to return the number of sectors in the device. */ -+/* Can be used for functions which need to loop among all the */ -+/* sectors, or wish to know the number of the last sector. */ -+/*********************************************************************/ -+int flash_get_numsectors(void) -+{ -+ return meminfo.nsect; -+} -+ -+/*********************************************************************/ -+/* flash_get_sector_size() is provided for cases in which the size */ -+/* of a sector is required by a host application. The sector size */ -+/* (in bytes) is returned in the data location pointed to by the */ -+/* 'size' parameter. */ -+/*********************************************************************/ -+int flash_get_sector_size(WORD sector) -+{ -+ return meminfo.sec[sector].size; -+} -+ -+/*********************************************************************/ -+/* The purpose of flash_get_memptr() is to return a memory pointer */ -+/* which points to the beginning of memory space allocated for the */ -+/* flash. All function pointers are then referenced from this */ -+/* pointer. */ -+/* */ -+/* Different systems will implement this in different ways: */ -+/* possibilities include: */ -+/* - A direct memory pointer */ -+/* - A pointer to a memory map */ -+/* - A pointer to a hardware port from which the linear */ -+/* address is translated */ -+/* - Output of an MMU function / service */ -+/* */ -+/* Also note that this function expects the pointer to a specific */ -+/* sector of the device. This can be provided by dereferencing */ -+/* the pointer from a translated offset of the sector from a */ -+/* global base pointer (e.g. flashptr = base_pointer + sector_offset)*/ -+/* */ -+/* Important: Many AMD flash devices need both bank and or sector */ -+/* address bits to be correctly set (bank address bits are A18-A16, */ -+/* and sector address bits are A18-A12, or A12-A15). Flash parts */ -+/* which do not need these bits will ignore them, so it is safe to */ -+/* assume that every part will require these bits to be set. */ -+/*********************************************************************/ -+unsigned char *flash_get_memptr(WORD sector) -+{ -+ unsigned char *memptr = (unsigned char*)(FLASH_BASE_ADDR_REG + meminfo.sec[sector].base); -+ -+ return (memptr); -+} -+ -+/*********************************************************************/ -+/* The purpose of flash_get_blk() is to return a the block number */ -+/* for a given memory address. */ -+/*********************************************************************/ -+int flash_get_blk(int addr) -+{ -+ int blk_start, i; -+ int last_blk = flash_get_numsectors(); -+ int relative_addr = addr - (int) FLASH_BASE_ADDR_REG; -+ -+ for(blk_start=0, i=0; i < relative_addr && blk_start < last_blk; blk_start++) -+ i += flash_get_sector_size(blk_start); -+ -+ if( i > relative_addr ) -+ { -+ blk_start--; // last blk, dec by 1 -+ } -+ else -+ if( blk_start == last_blk ) -+ { -+ printk("Address is too big.\n"); -+ blk_start = -1; -+ } -+ -+ return( blk_start ); -+} -+ -+/************************************************************************/ -+/* The purpose of flash_get_total_size() is to return the total size of */ -+/* the flash */ -+/************************************************************************/ -+int flash_get_total_size() -+{ -+ return totalSize; -+} -+ -+/*********************************************************************/ -+/* Flash_command() is the main driver function. It performs */ -+/* every possible command available to AMD B revision */ -+/* flash parts. Note that this command is not used directly, but */ -+/* rather called through the API wrapper functions provided below. */ -+/*********************************************************************/ -+static void flash_command(int command, WORD sector, int offset, UINT16 data) -+{ -+ volatile UINT16 *flashptr; -+ volatile UINT16 *flashbase; -+ -+ flashptr = (UINT16 *) flash_get_memptr(sector); -+ flashbase = (UINT16 *) flash_get_memptr(0); -+ -+ switch (flashFamily) { -+ case FLASH_UNDEFINED: -+ /* These commands should work for AMD, Intel and SST flashes */ -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xF0; -+ flashptr[0] = 0xFF; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0x5555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AAA] = 0x55; /* unlock 2 */ -+ flashptr[0x5555] = 0x90; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_AMD: -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xF0; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashptr[0x55] = 0x98; -+ break; -+ case FLASH_UB: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x20; -+ break; -+ case FLASH_PROG: -+ flashptr[0] = 0xA0; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_UBRESET: -+ flashptr[0] = 0x90; -+ flashptr[0] = 0x00; -+ break; -+ case FLASH_SERASE: -+ flashptr[0x555] = 0xAA; /* unlock 1 */ -+ flashptr[0x2AA] = 0x55; /* unlock 2 */ -+ flashptr[0x555] = 0x80; -+ flashptr[0x555] = 0xAA; -+ flashptr[0x2AA] = 0x55; -+ flashptr[0] = 0x30; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_INTEL: -+ switch (command) { -+ case FLASH_RESET: -+ flashptr[0] = 0xFF; -+ break; -+ case FLASH_READ_ID: -+ flashptr[0] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashptr[0] = 0x98; -+ break; -+ case FLASH_PROG: -+ flashptr[0] = 0x40; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_SERASE: -+ flashptr[0] = 0x60; -+ flashptr[0] = 0xD0; -+ flashptr[0] = 0x20; -+ flashptr[0] = 0xD0; -+ break; -+ default: -+ break; -+ } -+ break; -+ case FLASH_SST: -+ switch (command) { -+ case FLASH_RESET: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0xf0; -+ break; -+ case FLASH_READ_ID: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x90; -+ break; -+ case FLASH_CFIQUERY: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x98; -+ break; -+ case FLASH_UB: -+ break; -+ case FLASH_PROG: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0xa0; -+ flashptr[offset/2] = data; -+ break; -+ case FLASH_UBRESET: -+ break; -+ case FLASH_SERASE: -+ flashbase[0x5555] = 0xAA; /* unlock 1 */ -+ flashbase[0x2AAA] = 0x55; /* unlock 2 */ -+ flashbase[0x5555] = 0x80; -+ flashbase[0x5555] = 0xAA; -+ flashbase[0x2AAA] = 0x55; -+ flashptr[0] = 0x30; -+ break; -+ default: -+ break; -+ } -+ break; -+ default: -+ break; -+ } -+} -+ -+/*********************************************************************/ -+/* flash_write extends the functionality of flash_program() by */ -+/* providing an faster way to program multiple data words, without */ -+/* needing the function overhead of looping algorithms which */ -+/* program word by word. This function utilizes fast pointers */ -+/* to quickly loop through bulk data. */ -+/*********************************************************************/ -+static int flash_write(WORD sector, int offset, byte *buf, int nbytes) -+{ -+ UINT16 *src; -+ src = (UINT16 *)buf; -+ -+ if ((nbytes | offset) & 1) { -+ return -1; -+ } -+ -+ flash_command(FLASH_UB, 0, 0, 0); -+ while (nbytes > 0) { -+ flash_command(FLASH_PROG, sector, offset, *src); -+ if (flash_wait(sector, offset, *src) != STATUS_READY) -+ break; -+ offset +=2; -+ nbytes -=2; -+ src++; -+ } -+ flash_command(FLASH_UBRESET, 0, 0, 0); -+ -+ return (byte*)src - buf; -+} -+ -+/*********************************************************************/ -+/* flash_wait utilizes the DQ6, DQ5, and DQ2 polling algorithms */ -+/* described in the flash data book. It can quickly ascertain the */ -+/* operational status of the flash device, and return an */ -+/* appropriate status code (defined in flash.h) */ -+/*********************************************************************/ -+static int flash_wait(WORD sector, int offset, UINT16 data) -+{ -+ volatile UINT16 *flashptr; /* flash window */ -+ UINT16 d1; -+ -+ flashptr = (UINT16 *) flash_get_memptr(sector); -+ -+ if (flashFamily == FLASH_AMD || flashFamily == FLASH_SST) { -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+ do { -+ d1 = flashptr[offset/2]; -+ if (d1 == data) -+ return STATUS_READY; -+ } while (!(d1 & 0x20)); -+ -+ d1 = flashptr[offset/2]; -+ -+ if (d1 != data) { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+#else -+ do { -+ d1 = *flashptr; /* read data */ -+ d1 ^= *flashptr; /* read it again and see what toggled */ -+ if (d1 == 0) /* no toggles, nothing's happening */ -+ return STATUS_READY; -+ } while (!(d1 & 0x20)); -+ -+ d1 = *flashptr; /* read data */ -+ d1 ^= *flashptr; /* read it again and see what toggled */ -+ -+ if (d1 != 0) { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+#endif -+ } else if (flashFamily == FLASH_INTEL) { -+ flashptr[0] = 0x70; -+ /* Wait for completion */ -+ while(!(*flashptr & 0x80)); -+ if (*flashptr & 0x30) { -+ flashptr[0] = 0x50; -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return STATUS_TIMEOUT; -+ } -+ flashptr[0] = 0x50; -+ flash_command(FLASH_RESET, 0, 0, 0); -+ } -+ -+ return STATUS_READY; -+} -+ -+/*********************************************************************/ -+/* flash_get_device_id() will perform an autoselect sequence on the */ -+/* flash device, and return the device id of the component. */ -+/* This function automatically resets to read mode. */ -+/*********************************************************************/ -+static UINT16 flash_get_device_id() -+{ -+ volatile UINT16 *fwp; /* flash window */ -+ UINT16 answer; -+ -+ fwp = (UINT16 *)flash_get_memptr(0); -+ -+ flash_command(FLASH_READ_ID, 0, 0, 0); -+ answer = *(fwp + 1); -+ if (answer == ID_AM29LV320M) { -+ answer = *(fwp + 0xe); -+ answer = *(fwp + 0xf); -+ } -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return( (UINT16) answer ); -+} -+ -+/*********************************************************************/ -+/* flash_get_cfi() is the main CFI workhorse function. Due to it's */ -+/* complexity and size it need only be called once upon */ -+/* initializing the flash system. Once it is called, all operations */ -+/* are performed by looking at the meminfo structure. */ -+/* All possible care was made to make this algorithm as efficient as */ -+/* possible. 90% of all operations are memory reads, and all */ -+/* calculations are done using bit-shifts when possible */ -+/*********************************************************************/ -+static int flash_get_cfi(struct cfi_query *query, UINT16 *cfi_struct, int flashFamily) -+{ -+ volatile UINT16 *fwp; /* flash window */ -+ int i=0; -+ -+ flash_command(FLASH_CFIQUERY, 0, 0, 0); -+ -+ if (cfi_struct == 0) -+ fwp = (UINT16 *)flash_get_memptr(0); -+ else -+ fwp = cfi_struct; -+ -+ /* Initial house-cleaning */ -+ for(i=0; i < 8; i++) { -+ query->erase_block[i].sector_size = 0; -+ query->erase_block[i].num_sectors = 0; -+ } -+ -+ /* If not 'QRY', then we dont have a CFI enabled device in the socket */ -+ if( fwp[0x10] != 'Q' && -+ fwp[0x11] != 'R' && -+ fwp[0x12] != 'Y') { -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return(-1); -+ } -+ -+ query->num_erase_blocks = fwp[0x2C]; -+ if(flashFamily == FLASH_SST) -+ query->num_erase_blocks = 1; -+ -+ for(i=0; i < query->num_erase_blocks; i++) { -+ query->erase_block[i].num_sectors = fwp[(0x2D+(4*i))] + (fwp[0x2E + (4*i)] << 8); -+ query->erase_block[i].num_sectors++; -+ query->erase_block[i].sector_size = 256 * (256 * fwp[(0x30+(4*i))] + fwp[(0x2F+(4*i))]); -+ } -+ -+ flash_command(FLASH_RESET, 0, 0, 0); -+ return(1); -+} -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/cfiflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/cfiflash.h 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,142 @@ -+/************************************************************************/ -+/* */ -+/* AMD CFI Enabled Flash Memory Drivers */ -+/* File name: CFIFLASH.H */ -+/* Revision: 1.0 5/07/98 */ -+/* */ -+/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */ -+/* This software is unpublished and contains the trade secrets and */ -+/* confidential proprietary information of AMD. Unless otherwise */ -+/* provided in the Software Agreement associated herewith, it is */ -+/* licensed in confidence "AS IS" and is not to be reproduced in whole */ -+/* or part by any means except for backup. Use, duplication, or */ -+/* disclosure by the Government is subject to the restrictions in */ -+/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer */ -+/* Software clause in DFAR 52.227-7013 (a) (Oct 1988). */ -+/* Software owned by */ -+/* Advanced Micro Devices, Inc., */ -+/* One AMD Place, */ -+/* P.O. Box 3453 */ -+/* Sunnyvale, CA 94088-3453. */ -+/************************************************************************/ -+/* This software constitutes a basic shell of source code for */ -+/* programming all AMD Flash components. AMD */ -+/* will not be responsible for misuse or illegal use of this */ -+/* software for devices not supported herein. AMD is providing */ -+/* this source code "AS IS" and will not be responsible for */ -+/* issues arising from incorrect user implementation of the */ -+/* source code herein. It is the user's responsibility to */ -+/* properly design-in this source code. */ -+/* */ -+/************************************************************************/ -+#ifndef _CFIFLASH_H -+#define _CFIFLASH_H -+ -+/* include board/CPU specific definitions */ -+#include "bcmtypes.h" -+#include "board.h" -+ -+#define FLASH_BASE_ADDR_REG FLASH_BASE -+ -+#ifndef NULL -+#define NULL 0 -+#endif -+ -+#define MAXSECTORS 1024 /* maximum number of sectors supported */ -+ -+/* A structure for identifying a flash part. There is one for each -+ * of the flash part definitions. We need to keep track of the -+ * sector organization, the address register used, and the size -+ * of the sectors. -+ */ -+struct flashinfo { -+ char *name; /* "Am29DL800T", etc. */ -+ unsigned long addr; /* physical address, once translated */ -+ int areg; /* Can be set to zero for all parts */ -+ int nsect; /* # of sectors -- 19 in LV, 22 in DL */ -+ int bank1start; /* first sector # in bank 1 */ -+ int bank2start; /* first sector # in bank 2, if DL part */ -+ struct { -+ long size; /* # of bytes in this sector */ -+ long base; /* offset from beginning of device */ -+ int bank; /* 1 or 2 for DL; 1 for LV */ -+ } sec[MAXSECTORS]; /* per-sector info */ -+}; -+ -+/* -+ * This structure holds all CFI query information as defined -+ * in the JEDEC standard. All information up to -+ * primary_extended_query is standard among all manufactures -+ * with CFI enabled devices. -+ */ -+ -+struct cfi_query { -+ int num_erase_blocks; /* Number of sector defs. */ -+ struct { -+ unsigned long sector_size; /* byte size of sector */ -+ int num_sectors; /* Num sectors of this size */ -+ } erase_block[8]; /* Max of 256, but 8 is good */ -+}; -+ -+/* Standard Boolean declarations */ -+#define TRUE 1 -+#define FALSE 0 -+ -+/* Define different type of flash */ -+#define FLASH_UNDEFINED 0 -+#define FLASH_AMD 1 -+#define FLASH_INTEL 2 -+#define FLASH_SST 3 -+ -+/* Command codes for the flash_command routine */ -+#define FLASH_RESET 0 /* reset to read mode */ -+#define FLASH_READ_ID 1 /* read device ID */ -+#define FLASH_CFIQUERY 2 /* CFI query */ -+#define FLASH_UB 3 /* go into unlock bypass mode */ -+#define FLASH_PROG 4 /* program a word */ -+#define FLASH_UBRESET 5 /* reset to read mode from unlock bypass mode */ -+#define FLASH_SERASE 6 /* sector erase */ -+ -+/* Return codes from flash_status */ -+#define STATUS_READY 0 /* ready for action */ -+#define STATUS_TIMEOUT 1 /* operation timed out */ -+ -+/* A list of AMD compatible device ID's - add others as needed */ -+#define ID_AM29DL800T 0x224A -+#define ID_AM29DL800B 0x22CB -+#define ID_AM29LV800T 0x22DA -+#define ID_AM29LV800B 0x225B -+#define ID_AM29LV400B 0x22BA -+ -+#define ID_AM29LV160B 0x2249 -+#define ID_AM29LV160T 0x22C4 -+ -+#define ID_AM29LV320T 0x22F6 -+#define ID_MX29LV320AT 0x22A7 -+#define ID_AM29LV320B 0x22F9 -+#define ID_MX29LV320AB 0x22A8 -+ -+#define ID_AM29LV320M 0x227E -+#define ID_AM29LV320MB 0x2200 -+#define ID_AM29LV320MT 0x2201 -+ -+#define ID_SST39VF1601 0x234B -+#define ID_SST39VF3201 0x235B -+ -+/* A list of Intel compatible device ID's - add others as needed */ -+#define ID_I28F160C3T 0x88C2 -+#define ID_I28F160C3B 0x88C3 -+#define ID_I28F320C3T 0x88C4 -+#define ID_I28F320C3B 0x88C5 -+ -+extern byte flash_init(void); -+extern int flash_write_buf(WORD sector, int offset, byte *buffer, int numbytes); -+extern int flash_read_buf(WORD sector, int offset, byte *buffer, int numbytes); -+extern byte flash_sector_erase_int(WORD sector); -+extern int flash_get_numsectors(void); -+extern int flash_get_sector_size(WORD sector); -+extern int flash_get_total_size(void); -+extern unsigned char *flash_get_memptr(WORD sector); -+extern int flash_get_blk(int addr); -+ -+#endif -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/irq.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,299 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Interrupt control functions for Broadcom 963xx MIPS boards -+ */ -+ -+#include <asm/atomic.h> -+ -+#include <linux/delay.h> -+#include <linux/init.h> -+#include <linux/ioport.h> -+#include <linux/irq.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/slab.h> -+#include <linux/module.h> -+#include <linux/spinlock.h> -+ -+#include <asm/irq.h> -+#include <asm/mipsregs.h> -+#include <asm/addrspace.h> -+#include <asm/signal.h> -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+static DEFINE_SPINLOCK(irq_lock); -+ -+static void irq_dispatch_int(struct pt_regs *regs) -+{ -+ unsigned int pendingIrqs; -+ static unsigned int irqBit; -+ static unsigned int isrNumber = 31; -+ -+ pendingIrqs = PERF->IrqStatus & PERF->IrqMask; -+ if (!pendingIrqs) { -+ return; -+ } -+ -+ while (1) { -+ irqBit <<= 1; -+ isrNumber++; -+ if (isrNumber == 32) { -+ isrNumber = 0; -+ irqBit = 0x1; -+ } -+ if (pendingIrqs & irqBit) { -+ PERF->IrqMask &= ~irqBit; // mask -+ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET, regs); -+ break; -+ } -+ } -+} -+ -+static void irq_dispatch_ext(uint32 irq, struct pt_regs *regs) -+{ -+ if (!(PERF->ExtIrqCfg & (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)))) { -+ printk("**** Ext IRQ mask. Should not dispatch ****\n"); -+ } -+ /* disable and clear interrupt in the controller */ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ do_IRQ(irq, regs); -+} -+ -+void brcm_irq_dispatch(struct pt_regs *regs) -+{ -+ u32 cause; -+ while((cause = (read_c0_cause()& CAUSEF_IP))) { -+ if (cause & CAUSEF_IP7) -+ do_IRQ(MIPS_TIMER_INT, regs); -+ else if (cause & CAUSEF_IP2) -+ irq_dispatch_int(regs); -+ else if (cause & CAUSEF_IP3) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); -+ else if (cause & CAUSEF_IP4) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); -+ else if (cause & CAUSEF_IP5) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); -+ else if (cause & CAUSEF_IP6) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); -+ //cli(); -+ spin_lock_irq(&irq_lock); -+ } -+} -+ -+void plat_irq_dispatch(struct pt_regs *regs) -+{ -+ u32 cause; -+ while((cause = (read_c0_cause()& CAUSEF_IP))) { -+ if (cause & CAUSEF_IP7) -+ do_IRQ(MIPS_TIMER_INT, regs); -+ else if (cause & CAUSEF_IP2) -+ irq_dispatch_int(regs); -+ else if (cause & CAUSEF_IP3) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs); -+ else if (cause & CAUSEF_IP4) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs); -+ else if (cause & CAUSEF_IP5) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs); -+ else if (cause & CAUSEF_IP6) -+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs); -+ //cli(); -+ spin_lock_irq(&irq_lock); -+ } -+} -+ -+ -+void enable_brcm_irq(unsigned int irq) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { -+ PERF->IrqMask |= (1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); -+ } -+ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { -+ /* enable and clear interrupt in the controller */ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ } -+ local_irq_restore(flags); -+} -+ -+void disable_brcm_irq(unsigned int irq) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if( irq >= INTERNAL_ISR_TABLE_OFFSET ) { -+ PERF->IrqMask &= ~(1 << (irq - INTERNAL_ISR_TABLE_OFFSET)); -+ } -+ else if (irq >= INTERRUPT_ID_EXTERNAL_0 && irq <= INTERRUPT_ID_EXTERNAL_3) { -+ /* disable interrupt in the controller */ -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); -+ } -+ local_irq_restore(flags); -+} -+ -+void ack_brcm_irq(unsigned int irq) -+{ -+ /* Already done in brcm_irq_dispatch */ -+} -+ -+unsigned int startup_brcm_irq(unsigned int irq) -+{ -+ enable_brcm_irq(irq); -+ -+ return 0; /* never anything pending */ -+} -+ -+unsigned int startup_brcm_none(unsigned int irq) -+{ -+ return 0; -+} -+ -+void end_brcm_irq(unsigned int irq) -+{ -+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) -+ enable_brcm_irq(irq); -+} -+ -+void end_brcm_none(unsigned int irq) -+{ -+} -+ -+#define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) -+ -+static void __init brcm_irq_setup(void) -+{ -+ extern asmlinkage void brcmIRQ(void); -+ -+ clear_c0_status(ST0_BEV); -+ set_except_vector(0, brcmIRQ); -+ change_c0_status(ST0_IM, ALLINTS_NOTIMER); -+ -+#ifdef CONFIG_REMOTE_DEBUG -+ rs_kgdb_hook(0); -+#endif -+} -+ -+static struct hw_interrupt_type brcm_irq_type = { -+ .typename = "MIPS", -+ .startup = startup_brcm_irq, -+ .shutdown = disable_brcm_irq, -+ .enable = enable_brcm_irq, -+ .disable = disable_brcm_irq, -+ .ack = ack_brcm_irq, -+ .end = end_brcm_irq, -+ .set_affinity = NULL -+}; -+ -+static struct hw_interrupt_type brcm_irq_no_end_type = { -+ .typename = "MIPS", -+ .startup = startup_brcm_none, -+ .shutdown = disable_brcm_irq, -+ .enable = enable_brcm_irq, -+ .disable = disable_brcm_irq, -+ .ack = ack_brcm_irq, -+ .end = end_brcm_none, -+ .set_affinity = NULL -+}; -+ -+void __init arch_init_irq(void) -+{ -+ int i; -+ -+ for (i = 0; i < NR_IRQS; i++) { -+ irq_desc[i].status = IRQ_DISABLED; -+ irq_desc[i].action = 0; -+ irq_desc[i].depth = 1; -+ irq_desc[i].handler = &brcm_irq_type; -+ } -+ -+ brcm_irq_setup(); -+} -+ -+int request_external_irq(unsigned int irq, -+ FN_HANDLER handler, -+ unsigned long irqflags, -+ const char * devname, -+ void *dev_id) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT)); // Clear -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)); // Mask -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_INSENS_SHFT)); // Edge insesnsitive -+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_LEVEL_SHFT)); // Level triggered -+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_SENSE_SHFT)); // Low level -+ -+ local_irq_restore(flags); -+ -+ return( request_irq(irq, handler, irqflags, devname, dev_id) ); -+} -+ -+/* VxWorks compatibility function(s). */ -+ -+unsigned int BcmHalMapInterrupt(FN_HANDLER pfunc, unsigned int param, -+ unsigned int interruptId) -+{ -+ int nRet = -1; -+ char *devname; -+ -+ devname = kmalloc(16, GFP_KERNEL); -+ if (devname) -+ sprintf( devname, "brcm_%d", interruptId ); -+ -+ /* Set the IRQ description to not automatically enable the interrupt at -+ * the end of an ISR. The driver that handles the interrupt must -+ * explicitly call BcmHalInterruptEnable or enable_brcm_irq. This behavior -+ * is consistent with interrupt handling on VxWorks. -+ */ -+ irq_desc[interruptId].handler = &brcm_irq_no_end_type; -+ -+ if( interruptId >= INTERNAL_ISR_TABLE_OFFSET ) -+ { -+ nRet = request_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, -+ devname, (void *) param ); -+ } -+ else if (interruptId >= INTERRUPT_ID_EXTERNAL_0 && interruptId <= INTERRUPT_ID_EXTERNAL_3) -+ { -+ nRet = request_external_irq( interruptId, pfunc, SA_SAMPLE_RANDOM | SA_INTERRUPT, -+ devname, (void *) param ); -+ } -+ -+ return( nRet ); -+} -+ -+ -+/* Debug function. */ -+ -+void dump_intr_regs(void) -+{ -+ printk("PERF->ExtIrqCfg [%08x]\n", *(&(PERF->ExtIrqCfg))); -+} -+ -+EXPORT_SYMBOL(enable_brcm_irq); -+EXPORT_SYMBOL(disable_brcm_irq); -+EXPORT_SYMBOL(request_external_irq); -+EXPORT_SYMBOL(BcmHalMapInterrupt); -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Kconfig linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Kconfig 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,172 @@ -+# Kernel and Driver configuration for Broadcom Commengine ADSL board -+choice -+ prompt "Broadcom Commengine ADSL board" -+ depends on MIPS_BRCM -+ default BCM96345 -+ help -+ Select different Broadcom ADSL board -+ -+config BCM96338 -+ bool "96338 ADSL board" -+ select DMA_NONCOHERENT -+ select HW_HAS_PCI -+ -+config BCM96345 -+ bool "96345 ADSL board" -+ select DMA_NONCOHERENT -+ select HW_HAS_PCI -+ -+config BCM96348 -+ bool "96348 ADSL board" -+ select DMA_NONCOHERENT -+ select HW_HAS_PCI -+ -+endchoice -+ -+config BCM_BOARD -+ bool "Support for Broadcom Board" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SERIAL -+ bool "Support for Serial Port" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENET -+ tristate "Support for Ethernet" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_USB -+ tristate "Support for USB" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_WLAN -+ tristate "Support for Wireless" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PCI -+ bool "Support for PCI" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ select PCI -+ -+config BCM_ATMAPI -+ tristate "Support for ATM" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMTEST -+ tristate "Support for ATM Diagnostic" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ADSL -+ tristate "Support for ADSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENDPOINT -+ tristate "Support for VOICE" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PROCFS -+ tristate "Support for PROCFS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_VDSL -+ tristate "Support for VDSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SECURITY -+ tristate "Support for SECURITY" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_HPNA -+ tristate "Support for HPNA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_BOARD_IMPL -+ int "Implementation index for ADSL Board" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SERIAL_IMPL -+ int "Implementation index for Serial" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENET_IMPL -+ int "Implementation index for Ethernet" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_USB_IMPL -+ int "Implementation index for USB" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_WLAN_IMPL -+ int "Implementation index for WIRELESS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMAPI_IMPL -+ int "Implementation index for ATM" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ATMTEST_IMPL -+ int "Implementation index for ATM Diagnostic" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_BLAA_IMPL -+ int "Implementation index for BLAA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ADSL_IMPL -+ int "Implementation index for ADSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_ENDPOINT_IMPL -+ int "Implementation index for VOICE" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_PROCFS_IMPL -+ int "Implementation index for PROCFS" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_VDSL_IMPL -+ int "Implementation index for VDSL" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_SECURITY_IMPL -+ int "Implementation index for SECURITY" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+config BCM_HPNA_IMPL -+ int "Implementation index for HPNA" -+ depends on BCM96338 || BCM96345 || BCM96348 -+ -+choice -+ prompt "Root File System" -+ depends on MIPS_BRCM -+ default ROOTFS_SQUASHFS -+ help -+ Select root file system on the board flash. -+ -+config ROOTFS_SQUASHFS -+ bool "SQUASHFS" -+config ROOTFS_CRAMFS -+ bool "CRAMFS" -+config ROOTFS_JFFS2 -+ bool "JFFS2" -+config ROOTFS_NFS -+ bool "NFS" -+ -+endchoice -+ -+config ROOT_FLASHFS -+ string "flash partition" -+ depends on ROOTFS_SQUASHFS || ROOTFS_CRAMFS || ROOTFS_JFFS2 -+ default "root=31:0 ro noinitrd" if ROOTFS_SQUASHFS = y || ROOTFS_CRAMFS = y -+ default "root=31:2 ro noinitrd" if ROOTFS_JFFS2 = y -+ help -+ This is the root file system partition on flash memory -+ -+config ROOT_NFS_DIR -+ string "NFS server path" -+ depends on ROOTFS_NFS -+ default "/opt/bcm96338/targets/96338R/fs" if BCM96338 = y -+ default "/opt/bcm96345/targets/96345R/fs" if BCM96345 = y -+ default "/opt/bcm96348/targets/96348R/fs" if BCM96348 = y -+ help -+ This is the path of NFS server (host system) -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Makefile linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/Makefile 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,23 @@ -+# -+# Makefile for generic Broadcom MIPS boards -+# -+# Copyright (C) 2004 Broadcom Corporation -+# -+obj-y := irq.o prom.o setup.o time.o ser_init.o bcm63xx_flash.o bcm63xx_led.o board.o boardparms.o cfiflash.o -+ -+SRCBASE := $(TOPDIR) -+EXTRA_CFLAGS += -I$(SRCBASE)/include -+#EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -DDBG -+EXTRA_CFLAGS += -I$(INC_ADSLDRV_PATH) -+ -+ -+ifeq "$(ADSL)" "ANNEX_B" -+EXTRA_CFLAGS += -DADSL_ANNEXB -+endif -+ifeq "$(ADSL)" "SADSL" -+EXTRA_CFLAGS += -DADSL_SADSL -+endif -+ifeq "$(ADSL)" "ANNEX_C" -+EXTRA_CFLAGS += -DADSL_ANNEXC -+endif -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/prom.c 2006-08-03 16:40:27.000000000 +0200 -@@ -0,0 +1,250 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * prom.c: PROM library initialization code. -+ * -+ */ -+#include <linux/init.h> -+#include <linux/mm.h> -+#include <linux/sched.h> -+#include <linux/bootmem.h> -+#include <linux/blkdev.h> -+#include <asm/addrspace.h> -+#include <asm/bootinfo.h> -+#include <asm/cpu.h> -+#include <asm/time.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+#include "boardparms.h" -+#include "softdsl/AdslCoreDefs.h" -+ -+ -+//char arcs_cmdline[CL_SIZE] __initdata = {0}; -+/* inv_xde */ -+int boot_loader_type; -+ -+extern int do_syslog(int, char *, int); -+extern void serial_init(void); -+extern void __init InitNvramInfo( void ); -+extern void kerSysFlashInit( void ); -+extern unsigned long get_nvram_start_addr(void); -+void __init create_root_nfs_cmdline( char *cmdline ); -+ -+#if defined(CONFIG_BCM96338) -+#define CPU_CLOCK 240000000 -+#define MACH_BCM MACH_BCM96338 -+#endif -+#if defined(CONFIG_BCM96345) -+#define CPU_CLOCK 140000000 -+#define MACH_BCM MACH_BCM96345 -+#endif -+#if defined(CONFIG_BCM96348) -+void __init calculateCpuSpeed(void); -+static unsigned long cpu_speed; -+#define CPU_CLOCK cpu_speed -+#define MACH_BCM MACH_BCM96348 -+#endif -+ -+const char *get_system_type(void) -+{ -+ /*PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ -+ return( pNvramData->szBoardId );*/ -+ return "brcm63xx"; -+} -+ -+unsigned long getMemorySize(void) -+{ -+ unsigned long ulSdramType = BOARD_SDRAM_TYPE; -+ -+ unsigned long ulSdramSize; -+ -+ switch( ulSdramType ) -+ { -+ case BP_MEMORY_16MB_1_CHIP: -+ case BP_MEMORY_16MB_2_CHIP: -+ ulSdramSize = 16 * 1024 * 1024; -+ break; -+ case BP_MEMORY_32MB_1_CHIP: -+ case BP_MEMORY_32MB_2_CHIP: -+ ulSdramSize = 32 * 1024 * 1024; -+ break; -+ case BP_MEMORY_64MB_2_CHIP: -+ ulSdramSize = 64 * 1024 * 1024; -+ break; -+ default: -+ ulSdramSize = 8 * 1024 * 1024; -+ break; -+ } -+ if (boot_loader_type == BOOT_CFE) -+ return ulSdramSize; -+ else -+ // assume that there is one contiguous memory map -+ return boot_mem_map.map[0].size; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: prom_init -+ -------------------------------------------------------------------------- */ -+void __init prom_init(void) -+{ -+ extern ulong r4k_interval; -+ -+ serial_init(); -+ -+ /* Need to fixup boot loader detection code -+ * whithout changing prom_init prototype -+ */ -+ -+ if (boot_loader_type == BOOT_CFE) -+ kerSysFlashInit(); -+ -+ do_syslog(8, NULL, 8); -+ -+ printk( "%s prom init\n", get_system_type() ); -+ -+ PERF->IrqMask = 0; -+ -+ arcs_cmdline[0] = '\0'; -+#if defined(CONFIG_ROOT_NFS) -+ create_root_nfs_cmdline( arcs_cmdline ); -+#elif defined(CONFIG_ROOT_FLASHFS) -+ strcpy(arcs_cmdline, CONFIG_ROOT_FLASHFS); -+#endif -+//#define ADSL_SDRAM_IMAGE_SIZE 0x40000 -+ /* inv_xde */ -+ //add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); -+ if (boot_loader_type == BOOT_CFE) -+ add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); -+ else -+ add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); -+#if defined(CONFIG_BCM96348) -+ calculateCpuSpeed(); -+#endif -+ /* Count register increments every other clock */ -+ r4k_interval = CPU_CLOCK / HZ / 2; -+ mips_hpt_frequency = CPU_CLOCK / 2; -+ -+ mips_machgroup = MACH_GROUP_BRCM; -+ mips_machtype = MACH_BCM; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: prom_free_prom_memory -+Abstract: -+ -------------------------------------------------------------------------- */ -+void __init prom_free_prom_memory(void) -+{ -+ -+} -+ -+#if 0 -+#if defined(CONFIG_ROOT_NFS) -+/* This function reads in a line that looks something like this: -+ * -+ * -+ * CFE bootline=bcmEnet(0,0)host:vmlinux e=192.169.0.100:ffffff00 h=192.169.0.1 -+ * -+ * -+ * and retuns in the cmdline parameter some that looks like this: -+ * -+ * CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/opt/targets/96345R/fs -+ * ip=192.168.0.100:192.168.0.1::255.255.255.0::eth0:off rw" -+ */ -+#define BOOT_LINE_ADDR 0x0 -+#define HEXDIGIT(d) ((d >= '0' && d <= '9') ? (d - '0') : ((d | 0x20) - 'W')) -+#define HEXBYTE(b) (HEXDIGIT((b)[0]) << 4) + HEXDIGIT((b)[1]) -+extern unsigned long get_nvram_start_addr(void); -+ -+void __init create_root_nfs_cmdline( char *cmdline ) -+{ -+ char root_nfs_cl[] = "root=/dev/nfs nfsroot=%s:" CONFIG_ROOT_NFS_DIR -+ " ip=%s:%s::%s::eth0:off rw"; -+ -+ char *localip = NULL; -+ char *hostip = NULL; -+ char mask[16] = ""; -+ PNVRAM_DATA pNvramData = (PNVRAM_DATA) get_nvram_start_addr(); -+ char bootline[128] = ""; -+ char *p = bootline; -+ -+ memcpy(bootline, pNvramData->szBootline, sizeof(bootline)); -+ while( *p ) -+ { -+ if( p[0] == 'e' && p[1] == '=' ) -+ { -+ /* Found local ip address */ -+ p += 2; -+ localip = p; -+ while( *p && *p != ' ' && *p != ':' ) -+ p++; -+ if( *p == ':' ) -+ { -+ /* Found network mask (eg FFFFFF00 */ -+ *p++ = '\0'; -+ sprintf( mask, "%u.%u.%u.%u", HEXBYTE(p), HEXBYTE(p + 2), -+ HEXBYTE(p + 4), HEXBYTE(p + 6) ); -+ p += 4; -+ } -+ else if( *p == ' ' ) -+ *p++ = '\0'; -+ } -+ else if( p[0] == 'h' && p[1] == '=' ) -+ { -+ /* Found host ip address */ -+ p += 2; -+ hostip = p; -+ while( *p && *p != ' ' ) -+ p++; -+ if( *p == ' ' ) -+ *p++ = '\0'; -+ } -+ else -+ p++; -+ } -+ -+ if( localip && hostip ) -+ sprintf( cmdline, root_nfs_cl, hostip, localip, hostip, mask ); -+} -+#endif -+#endif -+ -+#if defined(CONFIG_BCM96348) -+/* ********************************************************************* -+ * calculateCpuSpeed() -+ * Calculate the BCM6348 CPU speed by reading the PLL strap register -+ * and applying the following formula: -+ * cpu_clk = (.25 * 64MHz freq) * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) -+ * Input parameters: -+ * none -+ * Return value: -+ * none -+ ********************************************************************* */ -+void __init calculateCpuSpeed(void) -+{ -+ UINT32 pllStrap = PERF->PllStrap; -+ int n1 = (pllStrap & PLL_N1_MASK) >> PLL_N1_SHFT; -+ int n2 = (pllStrap & PLL_N2_MASK) >> PLL_N2_SHFT; -+ int m1cpu = (pllStrap & PLL_M1_CPU_MASK) >> PLL_M1_CPU_SHFT; -+ -+ cpu_speed = (16 * (n1 + 1) * (n2 + 2) / (m1cpu + 1)) * 1000000; -+} -+#endif -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/ser_init.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/ser_init.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,180 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Broadcom bcm63xx serial port initialization, also prepare for printk -+ * by registering with console_init -+ * -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/types.h> -+#include <linux/console.h> -+#include <linux/sched.h> -+ -+#include <asm/addrspace.h> -+#include <asm/irq.h> -+#include <asm/reboot.h> -+#include <asm/gdb-stub.h> -+#include <asm/mc146818rtc.h> -+ -+#include <bcm_map_part.h> -+#include <board.h> -+ -+#define SER63XX_DEFAULT_BAUD 115200 -+#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) -+#define stUart ((volatile Uart * const) UART_BASE) -+ -+// Transmit interrupts -+#define TXINT (TXFIFOEMT | TXUNDERR | TXOVFERR) -+// Receive interrupts -+#define RXINT (RXFIFONE | RXOVFERR) -+ -+/* -------------------------------------------------------------------------- -+ Name: serial_init -+ Purpose: Initalize the UART -+-------------------------------------------------------------------------- */ -+void __init serial_init(void) -+{ -+ UINT32 tmpVal = SER63XX_DEFAULT_BAUD; -+ ULONG clockFreqHz; -+ -+#if defined(CONFIG_BCM96345) -+ // Make sure clock is ticking -+ PERF->blkEnables |= UART_CLK_EN; -+#endif -+ -+ /* Dissable channel's receiver and transmitter. */ -+ stUart->control &= ~(BRGEN|TXEN|RXEN); -+ -+ /*--------------------------------------------------------------------*/ -+ /* Write the table value to the clock select register. */ -+ /* DPullen - this is the equation to use: */ -+ /* value = clockFreqHz / baud / 32-1; */ -+ /* (snmod) Actually you should also take into account any necessary */ -+ /* rounding. Divide by 16, look at lsb, if 0, divide by 2 */ -+ /* and subtract 1. If 1, just divide by 2 */ -+ /*--------------------------------------------------------------------*/ -+ clockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; -+ tmpVal = (clockFreqHz / tmpVal) / 16; -+ if( tmpVal & 0x01 ) -+ tmpVal /= 2; //Rounding up, so sub is already accounted for -+ else -+ tmpVal = (tmpVal / 2) - 1; // Rounding down so we must sub 1 -+ stUart->baudword = tmpVal; -+ -+ /* Finally, re-enable the transmitter and receiver. */ -+ stUart->control |= (BRGEN|TXEN|RXEN); -+ -+ stUart->config = (BITS8SYM | ONESTOP); -+ // Set the FIFO interrupt depth ... stUart->fifocfg = 0xAA; -+ stUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; -+ stUart->intMask = 0; -+ stUart->intMask = RXINT | TXINT; -+} -+ -+ -+/* prom_putc() -+ * Output a character to the UART -+ */ -+void prom_putc(char c) -+{ -+ /* Wait for Tx uffer to empty */ -+ while (! (READ16(stUart->intStatus) & TXFIFOEMT)); -+ /* Send character */ -+ stUart->Data = c; -+} -+ -+/* prom_puts() -+ * Write a string to the UART -+ */ -+void prom_puts(const char *s) -+{ -+ while (*s) { -+ if (*s == '\n') { -+ prom_putc('\r'); -+ } -+ prom_putc(*s++); -+ } -+} -+ -+ -+/* prom_getc_nowait() -+ * Returns a character from the UART -+ * Returns -1 if no characters available or corrupted -+ */ -+int prom_getc_nowait(void) -+{ -+ uint16 uStatus; -+ int cData = -1; -+ -+ uStatus = READ16(stUart->intStatus); -+ -+ if (uStatus & RXFIFONE) { /* Do we have a character? */ -+ cData = READ16(stUart->Data) & 0xff; /* Read character */ -+ if (uStatus & (RXFRAMERR | RXPARERR)) { /* If we got an error, throw it away */ -+ cData = -1; -+ } -+ } -+ -+ return cData; -+} -+ -+/* prom_getc() -+ * Returns a charcter from the serial port -+ * Will block until it receives a valid character -+*/ -+char prom_getc(void) -+{ -+ int cData = -1; -+ -+ /* Loop until we get a valid character */ -+ while(cData == -1) { -+ cData = prom_getc_nowait(); -+ } -+ return (char) cData; -+} -+ -+/* prom_testc() -+ * Returns 0 if no characters available -+ */ -+int prom_testc(void) -+{ -+ uint16 uStatus; -+ -+ uStatus = READ16(stUart->intStatus); -+ -+ return (uStatus & RXFIFONE); -+} -+ -+#if defined (CONFIG_REMOTE_DEBUG) -+/* Prevent other code from writing to the serial port */ -+void _putc(char c) { } -+void _puts(const char *ptr) { } -+#else -+/* Low level outputs call prom routines */ -+void _putc(char c) { -+ prom_putc(c); -+} -+void _puts(const char *ptr) { -+ prom_puts(ptr); -+} -+#endif -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/setup.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/setup.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,523 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Generic setup routines for Broadcom 963xx MIPS boards -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/kdev_t.h> -+#include <linux/types.h> -+#include <linux/console.h> -+#include <linux/sched.h> -+#include <linux/mm.h> -+#include <linux/slab.h> -+#include <linux/module.h> -+#include <linux/pm.h> -+ -+#include <asm/addrspace.h> -+#include <asm/bcache.h> -+#include <asm/irq.h> -+#include <asm/time.h> -+#include <asm/reboot.h> -+#include <asm/gdb-stub.h> -+ -+extern void brcm_timer_setup(struct irqaction *irq); -+extern unsigned long getMemorySize(void); -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+#include <linux/pci.h> -+#include <linux/delay.h> -+#include <bcm_map_part.h> -+#include <bcmpci.h> -+ -+static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); -+#endif -+ -+/* This function should be in a board specific directory. For now, -+ * assume that all boards that include this file use a Broadcom chip -+ * with a soft reset bit in the PLL control register. -+ */ -+static void brcm_machine_restart(char *command) -+{ -+ const unsigned long ulSoftReset = 0x00000001; -+ unsigned long *pulPllCtrl = (unsigned long *) 0xfffe0008; -+ *pulPllCtrl |= ulSoftReset; -+} -+ -+static void brcm_machine_halt(void) -+{ -+ printk("System halted\n"); -+ while (1); -+} -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+ -+static void mpi_SetLocalPciConfigReg(uint32 reg, uint32 value) -+{ -+ /* write index then value */ -+ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; -+ mpi->pcicfgdata = value; -+} -+ -+static uint32 mpi_GetLocalPciConfigReg(uint32 reg) -+{ -+ /* write index then get value */ -+ mpi->pcicfgcntrl = PCI_CFG_REG_WRITE_EN + reg;; -+ return mpi->pcicfgdata; -+} -+ -+/* -+ * mpi_ResetPcCard: Set/Reset the PcCard -+ */ -+static void mpi_ResetPcCard(int cardtype, BOOL bReset) -+{ -+ if (cardtype == MPI_CARDTYPE_NONE) { -+ return; -+ } -+ -+ if (cardtype == MPI_CARDTYPE_CARDBUS) { -+ bReset = ! bReset; -+ } -+ -+ if (bReset) { -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); -+ } else { -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 | PCCARD_CARD_RESET); -+ } -+} -+ -+/* -+ * mpi_ConfigCs: Configure an MPI/EBI chip select -+ */ -+static void mpi_ConfigCs(uint32 cs, uint32 base, uint32 size, uint32 flags) -+{ -+ mpi->cs[cs].base = ((base & 0x1FFFFFFF) | size); -+ mpi->cs[cs].config = flags; -+} -+ -+/* -+ * mpi_InitPcmciaSpace -+ */ -+static void mpi_InitPcmciaSpace(void) -+{ -+ // ChipSelect 4 controls PCMCIA Memory accesses -+ mpi_ConfigCs(PCMCIA_COMMON_BASE, pcmciaMem, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); -+ // ChipSelect 5 controls PCMCIA Attribute accesses -+ mpi_ConfigCs(PCMCIA_ATTRIBUTE_BASE, pcmciaAttr, EBI_SIZE_1M, (EBI_WORD_WIDE|EBI_ENABLE)); -+ // ChipSelect 6 controls PCMCIA I/O accesses -+ mpi_ConfigCs(PCMCIA_IO_BASE, pcmciaIo, EBI_SIZE_64K, (EBI_WORD_WIDE|EBI_ENABLE)); -+ -+ mpi->pcmcia_cntl2 = ((PCMCIA_ATTR_ACTIVE << RW_ACTIVE_CNT_BIT) | -+ (PCMCIA_ATTR_INACTIVE << INACTIVE_CNT_BIT) | -+ (PCMCIA_ATTR_CE_SETUP << CE_SETUP_CNT_BIT) | -+ (PCMCIA_ATTR_CE_HOLD << CE_HOLD_CNT_BIT)); -+ -+ mpi->pcmcia_cntl2 |= (PCMCIA_HALFWORD_EN | PCMCIA_BYTESWAP_DIS); -+} -+ -+/* -+ * cardtype_vcc_detect: PC Card's card detect and voltage sense connection -+ * -+ * CD1#/ CD2#/ VS1#/ VS2#/ Card Initial Vcc -+ * CCD1# CCD2# CVS1 CVS2 Type -+ * -+ * GND GND open open 16-bit 5 vdc -+ * -+ * GND GND GND open 16-bit 3.3 vdc -+ * -+ * GND GND open GND 16-bit x.x vdc -+ * -+ * GND GND GND GND 16-bit 3.3 & x.x vdc -+ * -+ *==================================================================== -+ * -+ * CVS1 GND CCD1# open CardBus 3.3 vdc -+ * -+ * GND CVS2 open CCD2# CardBus x.x vdc -+ * -+ * GND CVS1 CCD2# open CardBus y.y vdc -+ * -+ * GND CVS2 GND CCD2# CardBus 3.3 & x.x vdc -+ * -+ * CVS2 GND open CCD1# CardBus x.x & y.y vdc -+ * -+ * GND CVS1 CCD2# open CardBus 3.3, x.x & y.y vdc -+ * -+ */ -+static int cardtype_vcc_detect(void) -+{ -+ uint32 data32; -+ int cardtype; -+ -+ cardtype = MPI_CARDTYPE_NONE; -+ mpi->pcmcia_cntl1 = 0x0000A000; // Turn on the output enables and drive -+ // the CVS pins to 0. -+ data32 = mpi->pcmcia_cntl1; -+ switch (data32 & 0x00000003) // Test CD1# and CD2#, see if card is plugged in. -+ { -+ case 0x00000003: // No Card is in the slot. -+ printk("mpi: No Card is in the PCMCIA slot\n"); -+ break; -+ -+ case 0x00000002: // Partial insertion, No CD2#. -+ printk("mpi: Card in the PCMCIA slot partial insertion, no CD2 signal\n"); -+ break; -+ -+ case 0x00000001: // Partial insertion, No CD1#. -+ printk("mpi: Card in the PCMCIA slot partial insertion, no CD1 signal\n"); -+ break; -+ -+ case 0x00000000: -+ mpi->pcmcia_cntl1 = 0x0000A0C0; // Turn off the CVS output enables and -+ // float the CVS pins. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ // Read the Register. -+ switch (data32 & 0x0000000C) // See what is on the CVS pins. -+ { -+ case 0x00000000: // CVS1 and CVS2 are tied to ground, only 1 option. -+ printk("mpi: Detected 3.3 & x.x 16-bit PCMCIA card\n"); -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ break; -+ -+ case 0x00000004: // CVS1 is open or tied to CCD1/CCD2 and CVS2 is tied to ground. -+ // 2 valid voltage options. -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ mpi->pcmcia_cntl1 = 0x0000A080; // Drive CVS1 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS2, not valid. -+ printk("mpi: Unknown card plugged into slot\n"); -+ } else { // CCD2 is tied to CVS1. -+ printk("mpi: Detected 3.3, x.x and y.y Cardbus card\n"); -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ } -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ printk("mpi: Detected x.x vdc 16-bit PCMCIA card\n"); -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ break; -+ } -+ break; -+ -+ case 0x00000008: // CVS2 is open or tied to CCD1/CCD2 and CVS1 is tied to ground. -+ // 2 valid voltage options. -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS1, not valid. -+ printk("mpi: Unknown card plugged into slot\n"); -+ } else {// CCD2 is tied to CVS2. -+ printk("mpi: Detected 3.3 and x.x Cardbus card\n"); -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ } -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ printk("mpi: Detected 3.3 vdc 16-bit PCMCIA card\n"); -+ break; -+ } -+ break; -+ -+ case 0x0000000C: // CVS1 and CVS2 are open or tied to CCD1/CCD2. -+ // 5 valid voltage options. -+ -+ switch (data32 & 0x00000003) // Test the values of CCD1 and CCD2. -+ { -+ case 0x00000003: // CCD1 and CCD2 are tied to 1 of the CVS pins. -+ // This is not a valid combination. -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ case 0x00000002: // CCD2 is tied to either CVS1 or CVS2. -+ // CCD1 is tied to ground. -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000002) { // CCD2 is tied to CVS1. -+ printk("mpi: Detected y.y vdc Cardbus card\n"); -+ } else { // CCD2 is tied to CVS2. -+ printk("mpi: Detected x.x vdc Cardbus card\n"); -+ } -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ break; -+ -+ case 0x00000001: // CCD1 is tied to either CVS1 or CVS2. -+ // CCD2 is tied to ground. -+ -+ mpi->pcmcia_cntl1 = 0x0000A040; // Drive CVS2 to a 0. -+ mdelay(1); -+ data32 = mpi->pcmcia_cntl1; -+ if (data32 & 0x00000001) {// CCD1 is tied to CVS1. -+ printk("mpi: Detected 3.3 vdc Cardbus card\n"); -+ } else { // CCD1 is tied to CVS2. -+ printk("mpi: Detected x.x and y.y Cardbus card\n"); -+ } -+ cardtype = MPI_CARDTYPE_CARDBUS; -+ break; -+ -+ case 0x00000000: // CCD1 and CCD2 are tied to ground. -+ cardtype = MPI_CARDTYPE_PCMCIA; -+ printk("mpi: Detected 5 vdc 16-bit PCMCIA card\n"); -+ break; -+ } -+ break; -+ -+ default: -+ printk("mpi: Unknown card plugged into slot\n"); -+ break; -+ -+ } -+ } -+ return cardtype; -+} -+ -+/* -+ * mpi_DetectPcCard: Detect the plugged in PC-Card -+ * Return: < 0 => Unknown card detected -+ * 0 => No card detected -+ * 1 => 16-bit card detected -+ * 2 => 32-bit CardBus card detected -+ */ -+static int mpi_DetectPcCard(void) -+{ -+ int cardtype; -+ -+ cardtype = cardtype_vcc_detect(); -+ switch(cardtype) { -+ case MPI_CARDTYPE_PCMCIA: -+ mpi->pcmcia_cntl1 &= ~0x0000e000; // disable enable bits -+ //mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & ~PCCARD_CARD_RESET); -+ mpi->pcmcia_cntl1 |= (PCMCIA_ENABLE | PCMCIA_GPIO_ENABLE); -+ mpi_InitPcmciaSpace(); -+ mpi_ResetPcCard(cardtype, FALSE); -+ // Hold card in reset for 10ms -+ mdelay(10); -+ mpi_ResetPcCard(cardtype, TRUE); -+ // Let card come out of reset -+ mdelay(100); -+ break; -+ case MPI_CARDTYPE_CARDBUS: -+ // 8 => CardBus Enable -+ // 1 => PCI Slot Number -+ // C => Float VS1 & VS2 -+ mpi->pcmcia_cntl1 = (mpi->pcmcia_cntl1 & 0xFFFF0000) | -+ CARDBUS_ENABLE | -+ (CARDBUS_SLOT << 8)| -+ VS2_OEN | -+ VS1_OEN; -+ /* access to this memory window will be to/from CardBus */ -+ mpi->l2pmremap1 |= CARDBUS_MEM; -+ -+ // Need to reset the Cardbus Card. There's no CardManager to do this, -+ // and we need to be ready for PCI configuration. -+ mpi_ResetPcCard(cardtype, FALSE); -+ // Hold card in reset for 10ms -+ mdelay(10); -+ mpi_ResetPcCard(cardtype, TRUE); -+ // Let card come out of reset -+ mdelay(100); -+ break; -+ default: -+ break; -+ } -+ return cardtype; -+} -+ -+static int mpi_init(void) -+{ -+ unsigned long data; -+ unsigned int chipid; -+ unsigned int chiprev; -+ unsigned int sdramsize; -+ -+ chipid = (PERF->RevID & 0xFFFF0000) >> 16; -+ chiprev = (PERF->RevID & 0xFF); -+ sdramsize = getMemorySize(); -+ /* -+ * Init the pci interface -+ */ -+ data = GPIO->GPIOMode; // GPIO mode register -+ data |= GROUP2_PCI | GROUP1_MII_PCCARD; // PCI internal arbiter + Cardbus -+ GPIO->GPIOMode = data; // PCI internal arbiter -+ -+ /* -+ * In the BCM6348 CardBus support is defaulted to Slot 0 -+ * because there is no external IDSEL for CardBus. To disable -+ * the CardBus and allow a standard PCI card in Slot 0 -+ * set the cbus_idsel field to 0x1f. -+ */ -+ /* -+ uData = mpi->pcmcia_cntl1; -+ uData |= CARDBUS_IDSEL; -+ mpi->pcmcia_cntl1 = uData; -+ */ -+ // Setup PCI I/O Window range. Give 64K to PCI I/O -+ mpi->l2piorange = ~(BCM_PCI_IO_SIZE_64KB-1); -+ // UBUS to PCI I/O base address -+ mpi->l2piobase = BCM_PCI_IO_BASE & BCM_PCI_ADDR_MASK; -+ // UBUS to PCI I/O Window remap -+ mpi->l2pioremap = (BCM_PCI_IO_BASE | MEM_WINDOW_EN); -+ -+ // enable PCI related GPIO pins and data swap between system and PCI bus -+ mpi->locbuscntrl = (EN_PCI_GPIO | DIR_U2P_NOSWAP); -+ -+ /* Enable 6348 BusMaster and Memory access mode */ -+ data = mpi_GetLocalPciConfigReg(PCI_COMMAND); -+ data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); -+ mpi_SetLocalPciConfigReg(PCI_COMMAND, data); -+ -+ /* Configure two 16 MByte PCI to System memory regions. */ -+ /* These memory regions are used when PCI device is a bus master */ -+ /* Accesses to the SDRAM from PCI bus will be "byte swapped" for this region */ -+ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_3, BCM_HOST_MEM_SPACE1); -+ mpi->sp0remap = 0x0; -+ -+ /* Accesses to the SDRAM from PCI bus will not be "byte swapped" for this region */ -+ mpi_SetLocalPciConfigReg(PCI_BASE_ADDRESS_4, BCM_HOST_MEM_SPACE2); -+ mpi->sp1remap = 0x0; -+ mpi->pcimodesel |= (PCI_BAR2_NOSWAP | 0x40); -+ -+ if ((chipid == 0x6348) && (chiprev == 0xb0)) { -+ mpi->sp0range = ~(sdramsize-1); -+ mpi->sp1range = ~(sdramsize-1); -+ } -+ /* -+ * Change 6348 PCI Cfg Reg. offset 0x40 to PCI memory read retry count infinity -+ * by set 0 in bit 8~15. This resolve read Bcm4306 srom return 0xffff in -+ * first read. -+ */ -+ data = mpi_GetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER); -+ data &= ~BRCM_PCI_CONFIG_TIMER_RETRY_MASK; -+ data |= 0x00000080; -+ mpi_SetLocalPciConfigReg(BRCM_PCI_CONFIG_TIMER, data); -+ -+ /* enable pci interrupt */ -+ mpi->locintstat |= (EXT_PCI_INT << 16); -+ -+ mpi_DetectPcCard(); -+ -+ ioport_resource.start = BCM_PCI_IO_BASE; -+ ioport_resource.end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB; -+ -+#if defined(CONFIG_USB) -+ PERF->blkEnables |= USBH_CLK_EN; -+ mdelay(100); -+ *USBH_NON_OHCI = NON_OHCI_BYTE_SWAP; -+#endif -+ -+ return 0; -+} -+#endif -+ -+static int __init brcm63xx_setup(void) -+{ -+ extern int panic_timeout; -+ -+ _machine_restart = brcm_machine_restart; -+ _machine_halt = brcm_machine_halt; -+ pm_power_off = brcm_machine_halt; -+ -+ board_timer_setup = brcm_timer_setup; -+ -+ panic_timeout = 5; -+ -+#if defined(CONFIG_BCM96348) && defined(CONFIG_PCI) -+ /* mpi initialization */ -+ mpi_init(); -+#endif -+ return 0; -+} -+ -+void plat_setup(void) -+{ -+ brcm63xx_setup(); -+} -+ -+/*************************************************************************** -+ * C++ New and delete operator functions -+ ***************************************************************************/ -+ -+/* void *operator new(unsigned int sz) */ -+void *_Znwj(unsigned int sz) -+{ -+ return( kmalloc(sz, GFP_KERNEL) ); -+} -+ -+/* void *operator new[](unsigned int sz)*/ -+void *_Znaj(unsigned int sz) -+{ -+ return( kmalloc(sz, GFP_KERNEL) ); -+} -+ -+/* placement new operator */ -+/* void *operator new (unsigned int size, void *ptr) */ -+void *ZnwjPv(unsigned int size, void *ptr) -+{ -+ return ptr; -+} -+ -+/* void operator delete(void *m) */ -+void _ZdlPv(void *m) -+{ -+ kfree(m); -+} -+ -+/* void operator delete[](void *m) */ -+void _ZdaPv(void *m) -+{ -+ kfree(m); -+} -+ -+EXPORT_SYMBOL(_Znwj); -+EXPORT_SYMBOL(_Znaj); -+EXPORT_SYMBOL(ZnwjPv); -+EXPORT_SYMBOL(_ZdlPv); -+EXPORT_SYMBOL(_ZdaPv); -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/softdsl/AdslCoreDefs.h 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,2 @@ -+#define ADSL_SDRAM_IMAGE_SIZE (384*1024) -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/bcm963xx/time.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c ---- linux-2.6.17/arch/mips/brcm-boards/bcm963xx/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/bcm963xx/time.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,277 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Setup time for Broadcom 963xx MIPS boards -+ */ -+ -+#include <linux/config.h> -+#include <linux/init.h> -+#include <linux/kernel_stat.h> -+#include <linux/sched.h> -+#include <linux/spinlock.h> -+#include <linux/interrupt.h> -+#include <linux/module.h> -+#include <linux/time.h> -+#include <linux/timex.h> -+ -+#include <asm/mipsregs.h> -+#include <asm/ptrace.h> -+#include <asm/div64.h> -+#include <asm/time.h> -+ -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+unsigned long r4k_interval; /* Amount to increment compare reg each time */ -+static unsigned long r4k_cur; /* What counter should be at next timer irq */ -+ -+/* Cycle counter value at the previous timer interrupt.. */ -+static unsigned int timerhi = 0, timerlo = 0; -+ -+extern volatile unsigned long wall_jiffies; -+ -+/* Optional board-specific timer routine */ -+void (*board_timer_interrupt)(int irq, void *dev_id, struct pt_regs * regs); -+ -+static inline void ack_r4ktimer(unsigned long newval) -+{ -+ write_c0_compare(newval); -+} -+ -+/* -+ * There are a lot of conceptually broken versions of the MIPS timer interrupt -+ * handler floating around. This one is rather different, but the algorithm -+ * is provably more robust. -+ */ -+static irqreturn_t brcm_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -+{ -+ unsigned int count; -+ -+ if (r4k_interval == 0) -+ goto null; -+ -+ do { -+ do_timer(regs); -+ -+ if (board_timer_interrupt) -+ board_timer_interrupt(irq, dev_id, regs); -+ -+ r4k_cur += r4k_interval; -+ ack_r4ktimer(r4k_cur); -+ -+ } while (((count = (unsigned long)read_c0_count()) -+ - r4k_cur) < 0x7fffffff); -+ -+ if (!jiffies) { -+ /* -+ * If jiffies has overflowed in this timer_interrupt we must -+ * update the timer[hi]/[lo] to make do_fast_gettimeoffset() -+ * quotient calc still valid. -arca -+ */ -+ timerhi = timerlo = 0; -+ } else { -+ /* -+ * The cycle counter is only 32 bit which is good for about -+ * a minute at current count rates of upto 150MHz or so. -+ */ -+ timerhi += (count < timerlo); /* Wrap around */ -+ timerlo = count; -+ } -+ -+ return IRQ_HANDLED; -+ -+null: -+ ack_r4ktimer(0); -+ return IRQ_NONE; -+} -+ -+static struct irqaction brcm_timer_action = { -+ .handler = brcm_timer_interrupt, -+ .flags = SA_INTERRUPT, -+ .mask = CPU_MASK_NONE, -+ .name = "timer", -+ .next = NULL, -+ .dev_id = brcm_timer_interrupt, -+}; -+ -+ -+void __init brcm_timer_setup(struct irqaction *irq) -+{ -+ r4k_cur = (read_c0_count() + r4k_interval); -+ write_c0_compare(r4k_cur); -+ -+ /* we are using the cpu counter for timer interrupts */ -+ irq->handler = no_action; /* we use our own handler */ -+ setup_irq(MIPS_TIMER_INT, &brcm_timer_action); -+ set_c0_status(IE_IRQ5); -+} -+ -+#if 0 -+/* This is for machines which generate the exact clock. */ -+#define USECS_PER_JIFFY (1000000/HZ) -+#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff) -+ -+static void call_do_div64_32( unsigned long *res, unsigned int high, -+ unsigned int low, unsigned long base ) -+{ -+ do_div64_32(*res, high, low, base); -+} -+ -+/* -+ * FIXME: Does playing with the RP bit in c0_status interfere with this code? -+ */ -+static unsigned long do_fast_gettimeoffset(void) -+{ -+ u32 count; -+ unsigned long res, tmp; -+ -+ /* Last jiffy when do_fast_gettimeoffset() was called. */ -+ static unsigned long last_jiffies=0; -+ unsigned long quotient; -+ -+ /* -+ * Cached "1/(clocks per usec)*2^32" value. -+ * It has to be recalculated once each jiffy. -+ */ -+ static unsigned long cached_quotient=0; -+ -+ tmp = jiffies; -+ -+ quotient = cached_quotient; -+ -+ if (tmp && last_jiffies != tmp) { -+ last_jiffies = tmp; -+#ifdef CONFIG_CPU_MIPS32 -+ if (last_jiffies != 0) { -+ -+ unsigned long r0; -+ /* gcc 3.0.1 gets an internal compiler error if there are two -+ * do_div64_32 inline macros. To work around this problem, -+ * do_div64_32 is called as a function. -+ */ -+ call_do_div64_32(&r0, timerhi, timerlo, tmp); -+ call_do_div64_32("ient, USECS_PER_JIFFY, -+ USECS_PER_JIFFY_FRAC, r0); -+ -+ cached_quotient = quotient; -+ -+ } -+#else -+ __asm__(".set\tnoreorder\n\t" -+ ".set\tnoat\n\t" -+ ".set\tmips3\n\t" -+ "lwu\t%0,%2\n\t" -+ "dsll32\t$1,%1,0\n\t" -+ "or\t$1,$1,%0\n\t" -+ "ddivu\t$0,$1,%3\n\t" -+ "mflo\t$1\n\t" -+ "dsll32\t%0,%4,0\n\t" -+ "nop\n\t" -+ "ddivu\t$0,%0,$1\n\t" -+ "mflo\t%0\n\t" -+ ".set\tmips0\n\t" -+ ".set\tat\n\t" -+ ".set\treorder" -+ :"=&r" (quotient) -+ :"r" (timerhi), -+ "m" (timerlo), -+ "r" (tmp), -+ "r" (USECS_PER_JIFFY) -+ :"$1"); -+ cached_quotient = quotient; -+#endif -+ } -+ -+ /* Get last timer tick in absolute kernel time */ -+ count = read_c0_count(); -+ -+ /* .. relative to previous jiffy (32 bits is enough) */ -+ count -= timerlo; -+ -+ __asm__("multu\t%1,%2\n\t" -+ "mfhi\t%0" -+ :"=r" (res) -+ :"r" (count), -+ "r" (quotient)); -+ -+ /* -+ * Due to possible jiffies inconsistencies, we need to check -+ * the result so that we'll get a timer that is monotonic. -+ */ -+ if (res >= USECS_PER_JIFFY) -+ res = USECS_PER_JIFFY-1; -+ -+ return res; -+} -+ -+void do_gettimeofday(struct timeval *tv) -+{ -+ unsigned int flags; -+ -+ read_lock_irqsave (&xtime_lock, flags); -+ tv->tv_sec = xtime.tv_sec; -+ tv->tv_usec = xtime.tv_nsec/1000; -+ tv->tv_usec += do_fast_gettimeoffset(); -+ -+ /* -+ * xtime is atomically updated in timer_bh. jiffies - wall_jiffies -+ * is nonzero if the timer bottom half hasnt executed yet. -+ */ -+ if (jiffies - wall_jiffies) -+ tv->tv_usec += USECS_PER_JIFFY; -+ -+ read_unlock_irqrestore (&xtime_lock, flags); -+ -+ if (tv->tv_usec >= 1000000) { -+ tv->tv_usec -= 1000000; -+ tv->tv_sec++; -+ } -+} -+ -+EXPORT_SYMBOL(do_gettimeofday); -+ -+int do_settimeofday(struct timespec *tv) -+{ -+ write_lock_irq (&xtime_lock); -+ -+ /* This is revolting. We need to set the xtime.tv_usec correctly. -+ * However, the value in this location is is value at the last tick. -+ * Discover what correction gettimeofday would have done, and then -+ * undo it! -+ */ -+ tv->tv_nsec -= do_fast_gettimeoffset()*NSEC_PER_USEC; -+ -+ if (tv->tv_nsec < 0) { -+ tv->tv_nsec += 1000000*NSEC_PER_USEC; -+ tv->tv_sec--; -+ } -+ -+ xtime.tv_sec = tv->tv_sec; -+ xtime.tv_nsec = tv->tv_nsec; -+ time_adjust = 0; /* stop active adjtime() */ -+ time_status |= STA_UNSYNC; -+ time_maxerror = NTP_PHASE_LIMIT; -+ time_esterror = NTP_PHASE_LIMIT; -+ -+ write_unlock_irq (&xtime_lock); -+} -+ -+EXPORT_SYMBOL(do_settimeofday); -+ -+#endif -diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/dbg_io.c linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c ---- linux-2.6.17/arch/mips/brcm-boards/generic/dbg_io.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/dbg_io.c 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,260 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/config.h> -+#include <linux/tty.h> -+#include <linux/major.h> -+#include <linux/init.h> -+#include <linux/console.h> -+#include <linux/fs.h> -+#include <linux/interrupt.h> -+#include <linux/kernel.h> -+#include <linux/types.h> -+#include <linux/sched.h> -+ -+#include <bcm_map_part.h> -+ -+#undef PRNT /* define for debug printing */ -+ -+#define UART16550_BAUD_2400 2400 -+#define UART16550_BAUD_4800 4800 -+#define UART16550_BAUD_9600 9600 -+#define UART16550_BAUD_19200 19200 -+#define UART16550_BAUD_38400 38400 -+#define UART16550_BAUD_57600 57600 -+#define UART16550_BAUD_115200 115200 -+ -+#define UART16550_PARITY_NONE 0 -+#define UART16550_PARITY_ODD 0x08 -+#define UART16550_PARITY_EVEN 0x18 -+#define UART16550_PARITY_MARK 0x28 -+#define UART16550_PARITY_SPACE 0x38 -+ -+#define UART16550_DATA_5BIT 0x0 -+#define UART16550_DATA_6BIT 0x1 -+#define UART16550_DATA_7BIT 0x2 -+#define UART16550_DATA_8BIT 0x3 -+ -+#define UART16550_STOP_1BIT 0x0 -+#define UART16550_STOP_2BIT 0x4 -+ -+volatile Uart * stUart = UART_BASE; -+ -+#define WRITE16(addr, value) ((*(volatile UINT16 *)((ULONG)&addr)) = value) -+ -+/* Low level UART routines from promcon.c */ -+extern void prom_putc(char c); -+extern char prom_getc(void); -+extern int prom_getc_nowait(void); -+extern int prom_testc(void); -+ -+extern void set_debug_traps(void); -+extern void breakpoint(void); -+extern void enable_brcm_irq(unsigned int); -+extern void set_async_breakpoint(unsigned int epc); -+ -+#ifdef CONFIG_GDB_CONSOLE -+extern void register_gdb_console(void); -+#endif -+ -+int gdb_initialized = 0; -+ -+#define GDB_BUF_SIZE 512 /* power of 2, please */ -+ -+static char gdb_buf[GDB_BUF_SIZE] ; -+static int gdb_buf_in_inx ; -+static atomic_t gdb_buf_in_cnt ; -+static int gdb_buf_out_inx ; -+ -+void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) -+{ -+ /* Do nothing, assume boot loader has already set up serial port */ -+ printk("debugInit called\n"); -+} -+ -+/* -+ * Get a char if available, return -1 if nothing available. -+ * Empty the receive buffer first, then look at the interface hardware. -+ */ -+static int read_char(void) -+{ -+ if (atomic_read(&gdb_buf_in_cnt) != 0) /* intr routine has q'd chars */ -+ { -+ int chr ; -+ -+ chr = gdb_buf[gdb_buf_out_inx++] ; -+ gdb_buf_out_inx &= (GDB_BUF_SIZE - 1) ; -+ atomic_dec(&gdb_buf_in_cnt) ; -+ return(chr) ; -+ } -+ return(prom_getc_nowait()) ; /* read from hardware */ -+} /* read_char */ -+ -+/* -+ * This is the receiver interrupt routine for the GDB stub. -+ * It will receive a limited number of characters of input -+ * from the gdb host machine and save them up in a buffer. -+ * -+ * When the gdb stub routine getDebugChar() is called it -+ * draws characters out of the buffer until it is empty and -+ * then reads directly from the serial port. -+ * -+ * We do not attempt to write chars from the interrupt routine -+ * since the stubs do all of that via putDebugChar() which -+ * writes one byte after waiting for the interface to become -+ * ready. -+ * -+ * The debug stubs like to run with interrupts disabled since, -+ * after all, they run as a consequence of a breakpoint in -+ * the kernel. -+ * -+ * Perhaps someone who knows more about the tty driver than I -+ * care to learn can make this work for any low level serial -+ * driver. -+ */ -+static void gdb_interrupt(int irq, void *dev_id, struct pt_regs * regs) -+{ -+ int chr ; -+ int more; -+ do -+ { -+ chr = prom_getc_nowait() ; -+ more = prom_testc(); -+ if (chr < 0) continue ; -+ -+ /* If we receive a Ctrl-C then this is GDB trying to break in */ -+ if (chr == 3) -+ { -+ /* Replace current instruction with breakpoint */ -+ set_async_breakpoint(regs->cp0_epc); -+ //breakpoint(); -+ } -+ -+#ifdef PRNT -+ printk("gdb_interrupt: chr=%02x '%c', more = %x\n", -+ chr, chr > ' ' && chr < 0x7F ? chr : ' ', more) ; -+#endif -+ -+ if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) -+ { /* buffer overflow, clear it */ -+ gdb_buf_in_inx = 0 ; -+ atomic_set(&gdb_buf_in_cnt, 0) ; -+ gdb_buf_out_inx = 0 ; -+ break ; -+ } -+ -+ gdb_buf[gdb_buf_in_inx++] = chr ; -+ gdb_buf_in_inx &= (GDB_BUF_SIZE - 1) ; -+ atomic_inc(&gdb_buf_in_cnt) ; -+ } -+ while (more !=0); -+ -+} /* gdb_interrupt */ -+ -+/* -+ * getDebugChar -+ * -+ * This is a GDB stub routine. It waits for a character from the -+ * serial interface and then returns it. If there is no serial -+ * interface connection then it returns a bogus value which will -+ * almost certainly cause the system to hang. -+ */ -+int getDebugChar(void) -+{ -+ volatile int chr ; -+ -+#ifdef PRNT -+ printk("getDebugChar: ") ; -+#endif -+ -+ while ( (chr = read_char()) < 0 ) ; -+ -+#ifdef PRNT -+ printk("%c\n", chr > ' ' && chr < 0x7F ? chr : ' ') ; -+#endif -+ return(chr) ; -+ -+} /* getDebugChar */ -+ -+/* -+ * putDebugChar -+ * -+ * This is a GDB stub routine. It waits until the interface is ready -+ * to transmit a char and then sends it. If there is no serial -+ * interface connection then it simply returns to its caller, having -+ * pretended to send the char. -+ */ -+int putDebugChar(unsigned char chr) -+{ -+#ifdef PRNT -+ printk("putDebugChar: chr=%02x '%c'\n", chr, -+ chr > ' ' && chr < 0x7F ? chr : ' ') ; -+#endif -+ -+ prom_putc(chr) ; /* this routine will wait */ -+ return 1; -+ -+} /* putDebugChar */ -+ -+/* Just a NULL routine for testing. */ -+void gdb_null(void) -+{ -+} -+ -+void rs_kgdb_hook(int tty_no) -+{ -+ printk("rs_kgdb_hook: tty %d\n", tty_no); -+ -+ /* Call GDB routine to setup the exception vectors for the debugger */ -+ set_debug_traps(); -+ -+ printk("Breaking into debugger...\n"); -+ breakpoint(); -+ gdb_null() ; -+ printk("Connected.\n"); -+ -+ gdb_initialized = 1; -+ -+#ifdef CONFIG_GDB_CONSOLE -+ register_gdb_console(); -+#endif -+} -+ -+void kgdb_hook_irq() -+{ -+ int retval ; -+ uint16 uMask; -+ -+ printk("GDB: Hooking UART interrupt\n"); -+ -+ retval = request_irq(INTERRUPT_ID_UART, -+ gdb_interrupt, -+ SA_INTERRUPT, -+ "GDB-stub", NULL); -+ -+ if (retval != 0) -+ printk("gdb_hook: request_irq(irq=%d) failed: %d\n", INTERRUPT_ID_UART, retval); -+ -+ // Enable UART config Rx not empty IRQ -+ uMask = READ16(stUart->intMask) ; -+ // printk("intMask: 0x%x\n", uMask); -+ WRITE16(stUart->intMask, uMask | RXFIFONE); -+} -+ -+ -diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/int-handler.S linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S ---- linux-2.6.17/arch/mips/brcm-boards/generic/int-handler.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/int-handler.S 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,59 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/* -+ * Generic interrupt handler for Broadcom MIPS boards -+ */ -+ -+#include <linux/config.h> -+ -+#include <asm/asm.h> -+#include <asm/mipsregs.h> -+#include <asm/regdef.h> -+#include <asm/stackframe.h> -+ -+/* -+ * MIPS IRQ Source -+ * -------- ------ -+ * 0 Software (ignored) -+ * 1 Software (ignored) -+ * 2 Combined hardware interrupt (hw0) -+ * 3 Hardware -+ * 4 Hardware -+ * 5 Hardware -+ * 6 Hardware -+ * 7 R4k timer -+ */ -+ -+ .text -+ .set noreorder -+ .set noat -+ .align 5 -+ NESTED(brcmIRQ, PT_SIZE, sp) -+ SAVE_ALL -+ CLI -+ .set noreorder -+ .set at -+ -+ jal brcm_irq_dispatch -+ move a0, sp -+ -+ j ret_from_irq -+ nop -+ -+ END(brcmIRQ) -diff -urN linux-2.6.17/arch/mips/brcm-boards/generic/Makefile linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/Makefile ---- linux-2.6.17/arch/mips/brcm-boards/generic/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/arch/mips/brcm-boards/generic/Makefile 2006-08-03 16:36:58.000000000 +0200 -@@ -0,0 +1,11 @@ -+# -+# Makefile for generic Broadcom MIPS boards -+# -+# Copyright (C) 2001 Broadcom Corporation -+# -+obj-y := int-handler.o -+ -+ifdef CONFIG_REMOTE_DEBUG -+obj-y += dbg_io.o -+endif -+ diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/002-pci_bcm96348.patch b/openwrt/target/linux/brcm63xx-2.6/patches/002-pci_bcm96348.patch deleted file mode 100644 index 7d0936cb837..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/002-pci_bcm96348.patch +++ /dev/null @@ -1,438 +0,0 @@ -diff -Naurp linux-2.6.16.7-generic-patched/arch/mips/pci/Makefile linux-2.6.16.7-patched/arch/mips/pci/Makefile ---- linux-2.6.16.7-generic-patched/arch/mips/pci/Makefile 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/arch/mips/pci/Makefile 2006-07-05 15:21:58.000000000 +0200 -@@ -18,6 +18,7 @@ obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o - obj-$(CONFIG_MIPS_TX3927) += ops-tx3927.o - obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o - obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o -+obj-$(CONFIG_BCM_PCI) += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o - - # - # These are still pretty much in the old state, watch, go blind. -diff -Naurp linux-2.6.16.7-generic-patched/arch/mips/pci/fixup-bcm96348.c linux-2.6.16.7-patched/arch/mips/pci/fixup-bcm96348.c ---- linux-2.6.16.7-generic-patched/arch/mips/pci/fixup-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/arch/mips/pci/fixup-bcm96348.c 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,85 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/init.h> -+#include <linux/types.h> -+#include <linux/pci.h> -+ -+#include <bcmpci.h> -+#include <bcm_intr.h> -+#include <bcm_map_part.h> -+ -+static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); -+ -+static char irq_tab_bcm96348[] __initdata = { -+ [0] = INTERRUPT_ID_MPI, -+ [1] = INTERRUPT_ID_MPI, -+#if defined(CONFIG_USB) -+ [USB_HOST_SLOT] = INTERRUPT_ID_USBH -+#endif -+}; -+ -+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -+{ -+ return irq_tab_bcm96348[slot]; -+} -+ -+static void bcm96348_fixup(struct pci_dev *dev) -+{ -+ uint32 memaddr; -+ uint32 size; -+ -+ memaddr = pci_resource_start(dev, 0); -+ size = pci_resource_len(dev, 0); -+ -+ switch (PCI_SLOT(dev->devfn)) { -+ case 0: -+ // UBUS to PCI address range -+ // Memory Window 1. Mask determines which bits are decoded. -+ mpi->l2pmrange1 = ~(size-1); -+ // UBUS to PCI Memory base address. This is akin to the ChipSelect base -+ // register. -+ mpi->l2pmbase1 = memaddr & BCM_PCI_ADDR_MASK; -+ // UBUS to PCI Remap Address. Replaces the masked address bits in the -+ // range register with this setting. -+ // Also, enable direct I/O and direct Memory accesses -+ mpi->l2pmremap1 = (memaddr | MEM_WINDOW_EN); -+ break; -+ -+ case 1: -+ // Memory Window 2 -+ mpi->l2pmrange2 = ~(size-1); -+ // UBUS to PCI Memory base address. -+ mpi->l2pmbase2 = memaddr & BCM_PCI_ADDR_MASK; -+ // UBUS to PCI Remap Address -+ mpi->l2pmremap2 = (memaddr | MEM_WINDOW_EN); -+ break; -+ -+#if defined(CONFIG_USB) -+ case USB_HOST_SLOT: -+ dev->resource[0].start = USB_HOST_BASE; -+ dev->resource[0].end = USB_HOST_BASE+USB_BAR0_MEM_SIZE-1; -+ break; -+#endif -+ } -+} -+ -+struct pci_fixup pcibios_fixups[] = { -+ { PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, bcm96348_fixup }, -+ {0} -+}; -diff -Naurp linux-2.6.16.7-generic-patched/arch/mips/pci/ops-bcm96348.c linux-2.6.16.7-patched/arch/mips/pci/ops-bcm96348.c ---- linux-2.6.16.7-generic-patched/arch/mips/pci/ops-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/arch/mips/pci/ops-bcm96348.c 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,276 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/types.h> -+#include <linux/pci.h> -+#include <linux/kernel.h> -+#include <linux/init.h> -+#include <asm/addrspace.h> -+ -+#include <bcm_intr.h> -+#include <bcm_map_part.h> -+#include <bcmpci.h> -+ -+#include <linux/delay.h> -+ -+#if defined(CONFIG_USB) -+#if 0 -+#define DPRINT(x...) printk(x) -+#else -+#define DPRINT(x...) -+#endif -+ -+static int -+pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size); -+static int -+pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size); -+ -+static bool usb_mem_size_rd = FALSE; -+static uint32 usb_mem_base = 0; -+static uint32 usb_cfg_space_cmd_reg = 0; -+#endif -+static bool pci_mem_size_rd = FALSE; -+ -+static volatile MpiRegisters * mpi = (MpiRegisters *)(MPI_BASE); -+ -+static void mpi_SetupPciConfigAccess(uint32 addr) -+{ -+ mpi->l2pcfgctl = (DIR_CFG_SEL | DIR_CFG_USEREG | addr) & ~CONFIG_TYPE; -+} -+ -+static void mpi_ClearPciConfigAccess(void) -+{ -+ mpi->l2pcfgctl = 0x00000000; -+} -+ -+#if defined(CONFIG_USB) -+/* -------------------------------------------------------------------------- -+ Name: pci63xx_int_write -+Abstract: PCI Config write on internal device(s) -+ -------------------------------------------------------------------------- */ -+static int -+pci63xx_int_write(unsigned int devfn, int where, u32 * value, int size) -+{ -+ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { -+ return PCIBIOS_SUCCESSFUL; -+ } -+ -+ switch (size) { -+ case 1: -+ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %02X\n", -+ PCI_SLOT(devfn), where, size, *value); -+ break; -+ case 2: -+ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %04X\n", -+ PCI_SLOT(devfn), where, size, *value); -+ switch (where) { -+ case PCI_COMMAND: -+ usb_cfg_space_cmd_reg = *value; -+ break; -+ default: -+ break; -+ } -+ break; -+ case 4: -+ DPRINT("W => Slot: %d Where: %2X Len: %d Data: %08lX\n", -+ PCI_SLOT(devfn), where, size, *value); -+ switch (where) { -+ case PCI_BASE_ADDRESS_0: -+ if (*value == 0xffffffff) { -+ usb_mem_size_rd = TRUE; -+ } else { -+ usb_mem_base = *value; -+ } -+ break; -+ default: -+ break; -+ } -+ break; -+ default: -+ break; -+ } -+ -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: pci63xx_int_read -+Abstract: PCI Config read on internal device(s) -+ -------------------------------------------------------------------------- */ -+static int -+pci63xx_int_read(unsigned int devfn, int where, u32 * value, int size) -+{ -+ uint32 retValue = 0xFFFFFFFF; -+ -+ if (PCI_SLOT(devfn) != USB_HOST_SLOT) { -+ return PCIBIOS_SUCCESSFUL; -+ } -+ -+ // For now, this is specific to the USB Host controller. We can -+ // make it more general if we have to... -+ // Emulate PCI Config accesses -+ switch (where) { -+ case PCI_VENDOR_ID: -+ case PCI_DEVICE_ID: -+ retValue = PCI_VENDOR_ID_BROADCOM | 0x63000000; -+ break; -+ case PCI_COMMAND: -+ case PCI_STATUS: -+ retValue = (0x0006 << 16) | usb_cfg_space_cmd_reg; -+ break; -+ case PCI_CLASS_REVISION: -+ case PCI_CLASS_DEVICE: -+ retValue = (PCI_CLASS_SERIAL_USB << 16) | (0x10 << 8) | 0x01; -+ break; -+ case PCI_BASE_ADDRESS_0: -+ if (usb_mem_size_rd) { -+ retValue = USB_BAR0_MEM_SIZE; -+ } else { -+ if (usb_mem_base != 0) -+ retValue = usb_mem_base; -+ else -+ retValue = USB_HOST_BASE; -+ } -+ usb_mem_size_rd = FALSE; -+ break; -+ case PCI_CACHE_LINE_SIZE: -+ case PCI_LATENCY_TIMER: -+ retValue = 0; -+ break; -+ case PCI_HEADER_TYPE: -+ retValue = PCI_HEADER_TYPE_NORMAL; -+ break; -+ case PCI_SUBSYSTEM_VENDOR_ID: -+ retValue = PCI_VENDOR_ID_BROADCOM; -+ break; -+ case PCI_SUBSYSTEM_ID: -+ retValue = 0x6300; -+ break; -+ case PCI_INTERRUPT_LINE: -+ retValue = INTERRUPT_ID_USBH; -+ break; -+ default: -+ break; -+ } -+ -+ switch (size) { -+ case 1: -+ *value = (retValue >> ((where & 3) << 3)) & 0xff; -+ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %02X\n", -+ PCI_SLOT(devfn), where, size, *value); -+ break; -+ case 2: -+ *value = (retValue >> ((where & 3) << 3)) & 0xffff; -+ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %04X\n", -+ PCI_SLOT(devfn), where, size, *value); -+ break; -+ case 4: -+ *value = retValue; -+ DPRINT("R <= Slot: %d Where: %2X Len: %d Data: %08lX\n", -+ PCI_SLOT(devfn), where, size, *value); -+ break; -+ default: -+ break; -+ } -+ -+ return PCIBIOS_SUCCESSFUL; -+} -+#endif -+ -+static int bcm96348_pcibios_read(struct pci_bus *bus, unsigned int devfn, -+ int where, int size, u32 * val) -+{ -+ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); -+ uint32 data; -+ -+#if defined(CONFIG_USB) -+ if (PCI_SLOT(devfn) == USB_HOST_SLOT) -+ return pci63xx_int_read(devfn, where, val, size); -+#endif -+ -+ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); -+ data = *(uint32 *)ioBase; -+ switch(size) { -+ case 1: -+ *val = (data >> ((where & 3) << 3)) & 0xff; -+ break; -+ case 2: -+ *val = (data >> ((where & 3) << 3)) & 0xffff; -+ break; -+ case 4: -+ *val = data; -+ /* Special case for reading PCI device range */ -+ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { -+ if (pci_mem_size_rd) { -+ /* bcm6348 PCI memory window minimum size is 64K */ -+ *val &= PCI_SIZE_64K; -+ } -+ } -+ break; -+ default: -+ break; -+ } -+ pci_mem_size_rd = FALSE; -+ mpi_ClearPciConfigAccess(); -+ -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+static int bcm96348_pcibios_write(struct pci_bus *bus, unsigned int devfn, -+ int where, int size, u32 val) -+{ -+ volatile unsigned char *ioBase = (unsigned char *)(mpi->l2piobase | KSEG1); -+ uint32 data; -+ -+#if defined(CONFIG_USB) -+ if (PCI_SLOT(devfn) == USB_HOST_SLOT) -+ return pci63xx_int_write(devfn, where, &val, size); -+#endif -+ mpi_SetupPciConfigAccess(BCM_PCI_CFG(PCI_SLOT(devfn), PCI_FUNC(devfn), where)); -+ data = *(uint32 *)ioBase; -+ switch(size) { -+ case 1: -+ data = (data & ~(0xff << ((where & 3) << 3))) | -+ (val << ((where & 3) << 3)); -+ break; -+ case 2: -+ data = (data & ~(0xffff << ((where & 3) << 3))) | -+ (val << ((where & 3) << 3)); -+ break; -+ case 4: -+ data = val; -+ /* Special case for reading PCI device range */ -+ if ((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_5)) { -+ if (val == 0xffffffff) -+ pci_mem_size_rd = TRUE; -+ } -+ break; -+ default: -+ break; -+ } -+ *(uint32 *)ioBase = data; -+ udelay(500); -+ mpi_ClearPciConfigAccess(); -+ -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+struct pci_ops bcm96348_pci_ops = { -+ .read = bcm96348_pcibios_read, -+ .write = bcm96348_pcibios_write -+}; -diff -Naurp linux-2.6.16.7-generic-patched/arch/mips/pci/pci-bcm96348.c linux-2.6.16.7-patched/arch/mips/pci/pci-bcm96348.c ---- linux-2.6.16.7-generic-patched/arch/mips/pci/pci-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/arch/mips/pci/pci-bcm96348.c 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,54 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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/types.h> -+#include <linux/pci.h> -+#include <linux/kernel.h> -+#include <linux/init.h> -+ -+#include <asm/pci_channel.h> -+#include <bcmpci.h> -+ -+static struct resource bcm_pci_io_resource = { -+ .name = "bcm96348 pci IO space", -+ .start = BCM_PCI_IO_BASE, -+ .end = BCM_PCI_IO_BASE + BCM_PCI_IO_SIZE_64KB - 1, -+ .flags = IORESOURCE_IO -+}; -+ -+static struct resource bcm_pci_mem_resource = { -+ .name = "bcm96348 pci memory space", -+ .start = BCM_PCI_MEM_BASE, -+ .end = BCM_PCI_MEM_BASE + BCM_PCI_MEM_SIZE_16MB - 1, -+ .flags = IORESOURCE_MEM -+}; -+ -+extern struct pci_ops bcm96348_pci_ops; -+ -+struct pci_controller bcm96348_controller = { -+ .pci_ops = &bcm96348_pci_ops, -+ .io_resource = &bcm_pci_io_resource, -+ .mem_resource = &bcm_pci_mem_resource, -+}; -+ -+static void bcm96348_pci_init(void) -+{ -+ register_pci_controller(&bcm96348_controller); -+} -+ -+arch_initcall(bcm96348_pci_init); diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch b/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch deleted file mode 100644 index 8efe11fcd63..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/010-include_asm_mips.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- linux-2.6.17/include/asm-mips/bootinfo.h 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/include/asm-mips/bootinfo.h 2006-07-13 19:14:01.000000000 +0200 -@@ -218,6 +218,14 @@ - #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ - #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ - -+/* -+ * Valid machtype for group BRCM -+ */ -+#define MACH_GROUP_BRCM 23 /* Broadcom boards */ -+#define MACH_BCM96338 0 -+#define MACH_BCM96345 1 -+#define MACH_BCM96348 2 -+ - #define CL_SIZE COMMAND_LINE_SIZE - - const char *get_system_type(void); ---- linux-2.6.17/include/asm-mips/cpu.h 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/include/asm-mips/cpu.h 2006-07-13 19:15:17.000000000 +0200 -@@ -103,6 +103,13 @@ - - #define PRID_IMP_SR71000 0x0400 - -+/* These are the PRID's for when 23:16 == PRID_COMP_BROADCOM -+ */ -+ -+#define PRID_IMP_BCM6338 0x9000 -+#define PRID_IMP_BCM6345 0x8000 -+#define PRID_IMP_BCM6348 0x9100 -+ - /* - * Definitions for 7:0 on legacy processors - */ -@@ -200,7 +207,10 @@ - #define CPU_SB1A 62 - #define CPU_74K 63 - #define CPU_R14000 64 --#define CPU_LAST 64 -+#define CPU_BCM6338 65 -+#define CPU_BCM6345 66 -+#define CPU_BCM6348 67 -+#define CPU_LAST 67 - - /* - * ISA Level encodings ---- linux-2.6.17/include/asm-mips/mach-generic/param.h 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/include/asm-mips/mach-generic/param.h 2006-07-13 19:17:26.000000000 +0200 -@@ -8,6 +8,6 @@ - #ifndef __ASM_MACH_GENERIC_PARAM_H - #define __ASM_MACH_GENERIC_PARAM_H - --#define HZ 1000 /* Internal kernel timer frequency */ -+#define HZ 200 /* Internal kernel timer frequency */ - - #endif /* __ASM_MACH_GENERIC_PARAM_H */ ---- linux-2.6.17/include/asm-mips/module.h 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/include/asm-mips/module.h 2006-07-13 19:18:34.000000000 +0200 -@@ -113,6 +113,12 @@ - #define MODULE_PROC_FAMILY "RM9000 " - #elif defined CONFIG_CPU_SB1 - #define MODULE_PROC_FAMILY "SB1 " -+#elif defined CONFIG_CPU_BCM6338 -+#define MODULE_PROC_FAMILY "BCM6338 " -+#elif defined CONFIG_CPU_BCM6345 -+#define MODULE_PROC_FAMILY "BCM6345 " -+#elif defined CONFIG_CPU_BCM6348 -+#define MODULE_PROC_FAMILY "BCM6348 " - #else - #error MODULE_PROC_FAMILY undefined for your processor configuration - #endif diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/011-include_mach_bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/011-include_mach_bcm963xx.patch deleted file mode 100644 index ad0cbbba56a..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/011-include_mach_bcm963xx.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -Naurp linux-2.6.16.7-generic-patched/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h linux-2.6.16.7-patched/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h ---- linux-2.6.16.7-generic-patched/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/include/asm-mips/mach-bcm963xx/cpu-feature-overrides.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,36 @@ -+#ifndef __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H -+#define __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H -+ -+#define cpu_has_tlb 1 -+#define cpu_has_4kex 4 -+#define cpu_has_4ktlb 8 -+#define cpu_has_fpu 0 -+#define cpu_has_32fpr 0 -+#define cpu_has_counter 0x40 -+#define cpu_has_watch 0 -+#define cpu_has_mips16 0 -+#define cpu_has_divec 0x200 -+#define cpu_has_vce 0 -+#define cpu_has_cache_cdex_p 0 -+#define cpu_has_cache_cdex_s 0 -+#define cpu_has_prefetch 0x40000 -+#define cpu_has_mcheck 0x2000 -+#define cpu_has_ejtag 0x4000 -+#define cpu_has_llsc 0x10000 -+#define cpu_has_vtag_icache 0 -+#define cpu_has_dc_aliases 0 -+#define cpu_has_ic_fills_f_dc 0 -+ -+#define cpu_has_nofpuex 0 -+#define cpu_has_64bits 0 -+#define cpu_has_64bit_zero_reg 0 -+#define cpu_has_64bit_gp_regs 0 -+#define cpu_has_64bit_addresses 0 -+ -+#define cpu_has_subset_pcaches 0 -+ -+#define cpu_dcache_line_size() 16 -+#define cpu_icache_line_size() 16 -+#define cpu_scache_line_size() 0 -+ -+#endif /* __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H */ diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch b/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch deleted file mode 100644 index 5d6d6c9205a..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/020-bcmdrivers.patch +++ /dev/null @@ -1,3226 +0,0 @@ -diff -urN linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c ---- linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,1056 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+/* Description: Serial port driver for the BCM963XX. */ -+ -+#define CARDNAME "bcm963xx_serial driver" -+#define VERSION "2.0" -+#define VER_STR CARDNAME " v" VERSION "\n" -+ -+ -+#include <linux/kernel.h> -+#include <linux/module.h> -+#include <linux/version.h> -+#include <linux/init.h> -+#include <linux/slab.h> -+#include <linux/interrupt.h> -+#include <linux/spinlock.h> -+ -+/* for definition of struct console */ -+#include <linux/console.h> -+#include <linux/tty.h> -+#include <linux/tty_flip.h> -+#include <linux/serial.h> -+#include <asm/uaccess.h> -+ -+#include <bcmtypes.h> -+#include <board.h> -+#include <bcm_map_part.h> -+#include <bcm_intr.h> -+ -+static DEFINE_SPINLOCK(bcm963xx_serial_lock); -+ -+extern void _putc(char); -+extern void _puts(const char *); -+ -+typedef struct bcm_serial { -+ volatile Uart * port; -+ int type; -+ int flags; -+ int irq; -+ int baud_base; -+ int blocked_open; -+ unsigned short close_delay; -+ unsigned short closing_wait; -+ unsigned short line; /* port/line number */ -+ unsigned short cflags; /* line configuration flag */ -+ unsigned short x_char; /* xon/xoff character */ -+ unsigned short read_status_mask; /* mask for read condition */ -+ unsigned short ignore_status_mask; /* mask for ignore condition */ -+ unsigned long event; /* mask used in BH */ -+ int xmit_head; /* Position of the head */ -+ int xmit_tail; /* Position of the tail */ -+ int xmit_cnt; /* Count of the chars in the buffer */ -+ int count; /* indicates how many times it has been opened */ -+ int magic; -+ -+ struct async_icount icount; /* keep track of things ... */ -+ struct tty_struct *tty; /* tty associated */ -+ struct termios normal_termios; -+ -+ wait_queue_head_t open_wait; -+ wait_queue_head_t close_wait; -+ -+ long session; /* Session of opening process */ -+ long pgrp; /* pgrp of opening process */ -+ -+ unsigned char is_initialized; -+} Context; -+ -+ -+/*---------------------------------------------------------------------*/ -+/* Define bits in the Interrupt Enable register */ -+/*---------------------------------------------------------------------*/ -+/* Enable receive interrupt */ -+#define RXINT (RXFIFONE|RXOVFERR) -+ -+/* Enable transmit interrupt */ -+#define TXINT (TXFIFOEMT|TXUNDERR|TXOVFERR) -+ -+/* Enable receiver line status interrupt */ -+#define LSINT (RXBRK|RXPARERR|RXFRAMERR) -+ -+#define BCM_NUM_UARTS 1 -+ -+#define BD_BCM63XX_TIMER_CLOCK_INPUT (FPERIPH) -+ -+ -+static struct bcm_serial multi[BCM_NUM_UARTS]; -+static struct bcm_serial *lines[BCM_NUM_UARTS]; -+static struct tty_driver serial_driver; -+static struct tty_struct *serial_table[BCM_NUM_UARTS]; -+static struct termios *serial_termios[BCM_NUM_UARTS]; -+static struct termios *serial_termios_locked[BCM_NUM_UARTS]; -+static int serial_refcount; -+ -+ -+static void bcm_stop (struct tty_struct *tty); -+static void bcm_start (struct tty_struct *tty); -+static inline void receive_chars (struct bcm_serial * info); -+static int startup (struct bcm_serial *info); -+static void shutdown (struct bcm_serial * info); -+static void change_speed( volatile Uart *pUart, tcflag_t cFlag ); -+static void bcm63xx_cons_flush_chars (struct tty_struct *tty); -+static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, -+ const unsigned char *buf, int count); -+static int bcm63xx_cons_write_room (struct tty_struct *tty); -+static int bcm_chars_in_buffer (struct tty_struct *tty); -+static void bcm_flush_buffer (struct tty_struct *tty); -+static void bcm_throttle (struct tty_struct *tty); -+static void bcm_unthrottle (struct tty_struct *tty); -+static void bcm_send_xchar (struct tty_struct *tty, char ch); -+static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo); -+static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info); -+static int get_lsr_info (struct bcm_serial *info, unsigned int *value); -+static void send_break (struct bcm_serial *info, int duration); -+static int bcm_ioctl (struct tty_struct * tty, struct file * file, -+ unsigned int cmd, unsigned long arg); -+static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios); -+static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp); -+static void bcm_hangup (struct tty_struct *tty); -+static int block_til_ready (struct tty_struct *tty, struct file *filp, struct bcm_serial *info); -+static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp); -+static int __init bcm63xx_serialinit(void); -+ -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_stop () and rs_start () -+ * -+ * These routines are called before setting or resetting -+ * tty->stopped. They enable or disable transmitter interrupts, -+ * as necessary. -+ * ------------------------------------------------------------ -+ */ -+static void bcm_stop (struct tty_struct *tty) -+{ -+} -+ -+static void bcm_start (struct tty_struct *tty) -+{ -+ _puts(CARDNAME " Start\n"); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * receive_char () -+ * -+ * This routine deals with inputs from any lines. -+ * ------------------------------------------------------------ -+ */ -+static inline void receive_chars (struct bcm_serial * info) -+{ -+ struct tty_struct *tty = 0; -+ struct async_icount * icount; -+ int ignore = 0; -+ unsigned short status, tmp; -+ UCHAR ch = 0; -+ while ((status = info->port->intStatus) & RXINT) -+ { -+ char flag_char = 0; -+ -+ if (status & RXFIFONE) -+ ch = info->port->Data; // Read the character -+ tty = info->tty; /* now tty points to the proper dev */ -+ icount = &info->icount; -+ if (! tty) -+ break; -+ if (!tty_buffer_request_room(tty, 1)) -+ break; -+ icount->rx++; -+ if (status & RXBRK) -+ { -+ flag_char = TTY_BREAK; -+ icount->brk++; -+ } -+ // keep track of the statistics -+ if (status & (RXFRAMERR | RXPARERR | RXOVFERR)) -+ { -+ if (status & RXPARERR) /* parity error */ -+ icount->parity++; -+ else -+ if (status & RXFRAMERR) /* frame error */ -+ icount->frame++; -+ if (status & RXOVFERR) -+ { -+ // Overflow. Reset the RX FIFO -+ info->port->fifoctl |= RSTRXFIFOS; -+ icount->overrun++; -+ } -+ // check to see if we should ignore the character -+ // and mask off conditions that should be ignored -+ if (status & info->ignore_status_mask) -+ { -+ if (++ignore > 100 ) -+ break; -+ goto ignore_char; -+ } -+ // Mask off the error conditions we want to ignore -+ tmp = status & info->read_status_mask; -+ if (tmp & RXPARERR) -+ { -+ flag_char = TTY_PARITY; -+ } -+ else -+ if (tmp & RXFRAMERR) -+ { -+ flag_char = TTY_FRAME; -+ } -+ if (tmp & RXOVFERR) -+ { -+ tty_insert_flip_char(tty, ch, flag_char); -+ ch = 0; -+ flag_char = TTY_OVERRUN; -+ if (!tty_buffer_request_room(tty, 1)) -+ break; -+ } -+ } -+ tty_insert_flip_char(tty, ch, flag_char); -+ } -+ignore_char: -+ if (tty) -+ tty_flip_buffer_push(tty); -+} -+ -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm_interrupt () -+ * -+ * this is the main interrupt routine for the chip. -+ * It deals with the multiple ports. -+ * ------------------------------------------------------------ -+ */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+static irqreturn_t bcm_interrupt (int irq, void * dev, struct pt_regs * regs) -+#else -+static void bcm_interrupt (int irq, void * dev, struct pt_regs * regs) -+#endif -+{ -+ struct bcm_serial * info = lines[0]; -+ UINT16 intStat; -+ -+ /* get pending interrupt flags from UART */ -+ -+ /* Mask with only the serial interrupts that are enabled */ -+ intStat = info->port->intStatus & info->port->intMask; -+ while (intStat) -+ { -+ if (intStat & RXINT) -+ receive_chars (info); -+ else -+ if (intStat & TXINT) -+ info->port->intStatus = TXINT; -+ else /* don't know what it was, so let's mask it */ -+ info->port->intMask &= ~intStat; -+ -+ intStat = info->port->intStatus & info->port->intMask; -+ } -+ -+ // Clear the interrupt -+ BcmHalInterruptEnable (INTERRUPT_ID_UART); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ return IRQ_HANDLED; -+#endif -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * startup () -+ * -+ * various initialization tasks -+ * ------------------------------------------------------------------- -+ */ -+static int startup (struct bcm_serial *info) -+{ -+ // Port is already started... -+ return 0; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * shutdown () -+ * -+ * This routine will shutdown a serial port; interrupts are disabled, and -+ * DTR is dropped if the hangup on close termio flag is on. -+ * ------------------------------------------------------------------- -+ */ -+static void shutdown (struct bcm_serial * info) -+{ -+ unsigned long flags; -+ if (!info->is_initialized) -+ return; -+ -+ -+ /*save_flags (flags); -+ cli ();*/ -+ spin_lock_irqsave(&bcm963xx_serial_lock, flags); -+ -+ info->port->control &= ~(BRGEN|TXEN|RXEN); -+ if (info->tty) -+ set_bit (TTY_IO_ERROR, &info->tty->flags); -+ info->is_initialized = 0; -+ -+ //restore_flags (flags); -+ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); -+} -+/* -+ * ------------------------------------------------------------------- -+ * change_speed () -+ * -+ * Set the baud rate, character size, parity and stop bits. -+ * ------------------------------------------------------------------- -+ */ -+static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) -+{ -+ unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; -+ /*save_flags(ulFlags); -+ cli();*/ -+ spin_lock_irqsave(&bcm963xx_serial_lock, ulFlags); -+ -+ switch( cFlag & (CBAUD | CBAUDEX) ) -+ { -+ case B115200: -+ ulBaud = 115200; -+ break; -+ case B57600: -+ ulBaud = 57600; -+ break; -+ case B38400: -+ ulBaud = 38400; -+ break; -+ case B19200: -+ ulBaud = 19200; -+ break; -+ case B9600: -+ ulBaud = 9600; -+ break; -+ case B4800: -+ ulBaud = 4800; -+ break; -+ case B2400: -+ ulBaud = 2400; -+ break; -+ case B1800: -+ ulBaud = 1800; -+ break; -+ case B1200: -+ ulBaud = 1200; -+ break; -+ case B600: -+ ulBaud = 600; -+ break; -+ case B300: -+ ulBaud = 300; -+ break; -+ case B200: -+ ulBaud = 200; -+ break; -+ case B150: -+ ulBaud = 150; -+ break; -+ case B134: -+ ulBaud = 134; -+ break; -+ case B110: -+ ulBaud = 110; -+ break; -+ case B75: -+ ulBaud = 75; -+ break; -+ case B50: -+ ulBaud = 50; -+ break; -+ default: -+ ulBaud = 115200; -+ break; -+ } -+ -+ /* Calculate buad rate. */ -+ ulClockFreqHz = BD_BCM63XX_TIMER_CLOCK_INPUT; -+ ulTmp = (ulClockFreqHz / ulBaud) / 16; -+ if( ulTmp & 0x01 ) -+ ulTmp /= 2; /* Rounding up, so sub is already accounted for */ -+ else -+ ulTmp = (ulTmp / 2) - 1; /* Rounding down so we must sub 1 */ -+ pUart->baudword = ulTmp; -+ -+ /* Set character size, stop bits and parity. */ -+ switch( cFlag & CSIZE ) -+ { -+ case CS5: -+ ulTmp = BITS5SYM; /* select transmit 5 bit data size */ -+ break; -+ case CS6: -+ ulTmp = BITS6SYM; /* select transmit 6 bit data size */ -+ break; -+ case CS7: -+ ulTmp = BITS7SYM; /* select transmit 7 bit data size */ -+ break; -+ /*case CS8:*/ -+ default: -+ ulTmp = BITS8SYM; /* select transmit 8 bit data size */ -+ break; -+ } -+ if( cFlag & CSTOPB ) -+ ulTmp |= TWOSTOP; /* select 2 stop bits */ -+ else -+ ulTmp |= ONESTOP; /* select one stop bit */ -+ -+ /* Write these values into the config reg. */ -+ pUart->config = ulTmp; -+ pUart->control &= ~(RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN); -+ switch( cFlag & (PARENB | PARODD) ) -+ { -+ case PARENB|PARODD: -+ pUart->control |= RXPARITYEN | TXPARITYEN; -+ break; -+ case PARENB: -+ pUart->control |= RXPARITYEN | TXPARITYEN | RXPARITYEVEN | TXPARITYEVEN; -+ break; -+ default: -+ pUart->control |= 0; -+ break; -+ } -+ -+ /* Reset and flush uart */ -+ pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; -+ //restore_flags( ulFlags ); -+ spin_unlock_irqrestore(&bcm963xx_serial_lock, ulFlags); -+} -+ -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_flush_char () -+ * -+ * Nothing to flush. Polled I/O is used. -+ * ------------------------------------------------------------------- -+ */ -+static void bcm63xx_cons_flush_chars (struct tty_struct *tty) -+{ -+} -+ -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm63xx_cons_write () -+ * -+ * Main output routine using polled I/O. -+ * ------------------------------------------------------------------- -+ */ -+static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, -+ const unsigned char *buf, int count) -+{ -+ int c; -+ -+ for (c = 0; c < count; c++) -+ _putc(buf[c]); -+ return count; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm63xx_cons_write_room () -+ * -+ * Compute the amount of space available for writing. -+ * ------------------------------------------------------------------- -+ */ -+static int bcm63xx_cons_write_room (struct tty_struct *tty) -+{ -+ /* Pick a number. Any number. Polled I/O is used. */ -+ return 1024; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_chars_in_buffer () -+ * -+ * compute the amount of char left to be transmitted -+ * ------------------------------------------------------------------- -+ */ -+static int bcm_chars_in_buffer (struct tty_struct *tty) -+{ -+ return 0; -+} -+ -+/* -+ * ------------------------------------------------------------------- -+ * bcm_flush_buffer () -+ * -+ * Empty the output buffer -+ * ------------------------------------------------------------------- -+ */ -+static void bcm_flush_buffer (struct tty_struct *tty) -+{ -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm_throttle () and bcm_unthrottle () -+ * -+ * This routine is called by the upper-layer tty layer to signal that -+ * incoming characters should be throttled (or not). -+ * ------------------------------------------------------------ -+ */ -+static void bcm_throttle (struct tty_struct *tty) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ if (I_IXOFF(tty)) -+ info->x_char = STOP_CHAR(tty); -+} -+ -+static void bcm_unthrottle (struct tty_struct *tty) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ if (I_IXOFF(tty)) -+ { -+ if (info->x_char) -+ info->x_char = 0; -+ else -+ info->x_char = START_CHAR(tty); -+ } -+} -+ -+static void bcm_send_xchar (struct tty_struct *tty, char ch) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ info->x_char = ch; -+ if (ch) -+ bcm_start (info->tty); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_ioctl () and friends -+ * ------------------------------------------------------------ -+ */ -+static int get_serial_info(struct bcm_serial *info, struct serial_struct *retinfo) -+{ -+ struct serial_struct tmp; -+ -+ if (!retinfo) -+ return -EFAULT; -+ -+ memset (&tmp, 0, sizeof(tmp)); -+ tmp.type = info->type; -+ tmp.line = info->line; -+ tmp.port = (int) info->port; -+ tmp.irq = info->irq; -+ tmp.flags = 0; -+ tmp.baud_base = info->baud_base; -+ tmp.close_delay = info->close_delay; -+ tmp.closing_wait = info->closing_wait; -+ -+ return copy_to_user (retinfo, &tmp, sizeof(*retinfo)); -+} -+ -+static int set_serial_info (struct bcm_serial *info, struct serial_struct *new_info) -+{ -+ struct serial_struct new_serial; -+ struct bcm_serial old_info; -+ int retval = 0; -+ -+ if (!new_info) -+ return -EFAULT; -+ -+ copy_from_user (&new_serial, new_info, sizeof(new_serial)); -+ old_info = *info; -+ -+ if (!capable(CAP_SYS_ADMIN)) -+ return -EPERM; -+ -+ -+ if (info->count > 1) -+ return -EBUSY; -+ -+ /* OK, past this point, all the error checking has been done. -+ * At this point, we start making changes..... -+ */ -+ info->baud_base = new_serial.baud_base; -+ info->type = new_serial.type; -+ info->close_delay = new_serial.close_delay; -+ info->closing_wait = new_serial.closing_wait; -+ retval = startup (info); -+ return retval; -+} -+ -+/* -+ * get_lsr_info - get line status register info -+ * -+ * Purpose: Let user call ioctl() to get info when the UART physically -+ * is emptied. On bus types like RS485, the transmitter must -+ * release the bus after transmitting. This must be done when -+ * the transmit shift register is empty, not be done when the -+ * transmit holding register is empty. This functionality -+ * allows an RS485 driver to be written in user space. -+ */ -+static int get_lsr_info (struct bcm_serial *info, unsigned int *value) -+{ -+ return( 0 ); -+} -+ -+/* -+ * This routine sends a break character out the serial port. -+ */ -+static void send_break (struct bcm_serial *info, int duration) -+{ -+ unsigned long flags; -+ -+ if (!info->port) -+ return; -+ -+ current->state = TASK_INTERRUPTIBLE; -+ -+ /*save_flags (flags); -+ cli();*/ -+ spin_lock_irqsave(&bcm963xx_serial_lock, flags); -+ -+ info->port->control |= XMITBREAK; -+ schedule_timeout(duration); -+ info->port->control &= ~XMITBREAK; -+ -+ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); -+ //restore_flags (flags); -+} -+ -+static int bcm_ioctl (struct tty_struct * tty, struct file * file, -+ unsigned int cmd, unsigned long arg) -+{ -+ int error; -+ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; -+ int retval; -+ -+ if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && -+ (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) && -+ (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) -+ { -+ if (tty->flags & (1 << TTY_IO_ERROR)) -+ return -EIO; -+ } -+ switch (cmd) -+ { -+ -+ case TCSBRK: /* SVID version: non-zero arg --> no break */ -+ retval = tty_check_change (tty); -+ if (retval) -+ return retval; -+ tty_wait_until_sent (tty, 0); -+ if (!arg) -+ send_break (info, HZ/4); /* 1/4 second */ -+ return 0; -+ -+ case TCSBRKP: /* support for POSIX tcsendbreak() */ -+ retval = tty_check_change (tty); -+ if (retval) -+ return retval; -+ tty_wait_until_sent (tty, 0); -+ send_break (info, arg ? arg*(HZ/10) : HZ/4); -+ return 0; -+ -+ case TIOCGSOFTCAR: -+ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(long)); -+ if (!error) -+ return -EFAULT; -+ else -+ { -+ put_user (C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg); -+ return 0; -+ } -+ -+ case TIOCSSOFTCAR: -+ error = get_user (arg, (unsigned long *)arg); -+ if (error) -+ return error; -+ tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); -+ return 0; -+ -+ case TIOCGSERIAL: -+ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(struct serial_struct)); -+ if (!error) -+ return -EFAULT; -+ else -+ return get_serial_info (info, (struct serial_struct *)arg); -+ -+ case TIOCSSERIAL: -+ return set_serial_info (info, (struct serial_struct *) arg); -+ -+ case TIOCSERGETLSR: /* Get line status register */ -+ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(unsigned int)); -+ if (!error) -+ return -EFAULT; -+ else -+ return get_lsr_info (info, (unsigned int *)arg); -+ -+ case TIOCSERGSTRUCT: -+ error = access_ok (VERIFY_WRITE, (void *)arg, sizeof(struct bcm_serial)); -+ if (!error) -+ return -EFAULT; -+ else -+ { -+ copy_to_user((struct bcm_serial *)arg, info, sizeof(struct bcm_serial)); -+ return 0; -+ } -+ -+ default: -+ return -ENOIOCTLCMD; -+ } -+ return 0; -+} -+ -+static void bcm_set_termios (struct tty_struct *tty, struct termios *old_termios) -+{ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ -+ if( tty->termios->c_cflag != old_termios->c_cflag ) -+ change_speed (info->port, tty->termios->c_cflag); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * bcm63xx_cons_close() -+ * -+ * This routine is called when the serial port gets closed. First, we -+ * wait for the last remaining data to be sent. Then, we turn off -+ * the transmit enable and receive enable flags. -+ * ------------------------------------------------------------ -+ */ -+static void bcm63xx_cons_close (struct tty_struct *tty, struct file *filp) -+{ -+ struct bcm_serial * info = (struct bcm_serial *)tty->driver_data; -+ unsigned long flags; -+ -+ if (!info) -+ return; -+ -+ /*save_flags (flags); -+ cli();*/ -+ spin_lock_irqsave(&bcm963xx_serial_lock, flags); -+ -+ if (tty_hung_up_p (filp)) -+ { -+ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); -+ //restore_flags (flags); -+ return; -+ } -+ -+ if ((tty->count == 1) && (info->count != 1)) -+ { -+ -+ /* Uh, oh. tty->count is 1, which means that the tty -+ * structure will be freed. Info->count should always -+ * be one in these conditions. If it's greater than -+ * one, we've got real problems, since it means the -+ * serial port won't be shutdown. -+ */ -+ printk("bcm63xx_cons_close: bad serial port count; tty->count is 1, " -+ "info->count is %d\n", info->count); -+ info->count = 1; -+ } -+ -+ if (--info->count < 0) -+ { -+ printk("ds_close: bad serial port count for ttys%d: %d\n", -+ info->line, info->count); -+ info->count = 0; -+ } -+ -+ if (info->count) -+ { -+ //restore_flags (flags); -+ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); -+ return; -+ } -+ -+ /* Now we wait for the transmit buffer to clear; and we notify -+ * the line discipline to only process XON/XOFF characters. -+ */ -+ tty->closing = 1; -+ -+ /* At this point we stop accepting input. To do this, we -+ * disable the receive line status interrupts. -+ */ -+ shutdown (info); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ if (tty->driver->flush_buffer) -+ tty->driver->flush_buffer (tty); -+#else -+ if (tty->driver.flush_buffer) -+ tty->driver.flush_buffer (tty); -+#endif -+ if (tty->ldisc.flush_buffer) -+ tty->ldisc.flush_buffer (tty); -+ -+ tty->closing = 0; -+ info->event = 0; -+ info->tty = 0; -+ if (tty->ldisc.num != tty_ldisc_get(N_TTY)->num) -+ { -+ if (tty->ldisc.close) -+ (tty->ldisc.close)(tty); -+ tty->ldisc = *tty_ldisc_get(N_TTY); -+ tty->termios->c_line = N_TTY; -+ if (tty->ldisc.open) -+ (tty->ldisc.open)(tty); -+ } -+ if (info->blocked_open) -+ { -+ if (info->close_delay) -+ { -+ current->state = TASK_INTERRUPTIBLE; -+ schedule_timeout(info->close_delay); -+ } -+ wake_up_interruptible (&info->open_wait); -+ } -+ wake_up_interruptible (&info->close_wait); -+ -+ //restore_flags (flags); -+ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); -+} -+ -+/* -+ * bcm_hangup () --- called by tty_hangup() when a hangup is signaled. -+ */ -+static void bcm_hangup (struct tty_struct *tty) -+{ -+ -+ struct bcm_serial *info = (struct bcm_serial *)tty->driver_data; -+ -+ shutdown (info); -+ info->event = 0; -+ info->count = 0; -+ info->tty = 0; -+ wake_up_interruptible (&info->open_wait); -+} -+ -+/* -+ * ------------------------------------------------------------ -+ * rs_open() and friends -+ * ------------------------------------------------------------ -+ */ -+static int block_til_ready (struct tty_struct *tty, struct file *filp, -+ struct bcm_serial *info) -+{ -+ return 0; -+} -+ -+/* -+ * This routine is called whenever a serial port is opened. It -+ * enables interrupts for a serial port. It also performs the -+ * serial-specific initialization for the tty structure. -+ */ -+static int bcm63xx_cons_open (struct tty_struct * tty, struct file * filp) -+{ -+ struct bcm_serial *info; -+ int retval, line; -+ -+ // Make sure we're only opening on of the ports we support -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ line = MINOR(tty->driver->cdev.dev) - tty->driver->minor_start; -+#else -+ line = MINOR(tty->device) - tty->driver.minor_start; -+#endif -+ -+ if ((line < 0) || (line >= BCM_NUM_UARTS)) -+ return -ENODEV; -+ -+ info = lines[line]; -+ -+ info->port->intMask = 0; /* Clear any pending interrupts */ -+ info->port->intMask = RXINT; /* Enable RX */ -+ -+ info->count++; -+ tty->driver_data = info; -+ info->tty = tty; -+ BcmHalInterruptEnable (INTERRUPT_ID_UART); -+ -+ // Start up serial port -+ retval = startup (info); -+ if (retval) -+ return retval; -+ -+ retval = block_til_ready (tty, filp, info); -+ if (retval) -+ return retval; -+ -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ info->pgrp = process_group(current); -+ info->session = current->signal->session; -+#else -+ info->session = current->session; -+ info->pgrp = current->pgrp; -+#endif -+ -+ return 0; -+} -+ -+/* -------------------------------------------------------------------------- -+ Name: bcm63xx_serialinit -+ Purpose: Initialize our BCM63xx serial driver -+-------------------------------------------------------------------------- */ -+static int __init bcm63xx_serialinit(void) -+{ -+ int i, flags; -+ struct bcm_serial * info; -+ -+ // Print the driver version information -+ printk(VER_STR); -+ -+ memset(&serial_driver, 0, sizeof(struct tty_driver)); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ serial_driver.owner = THIS_MODULE; -+ serial_driver.devfs_name = "tts/"; -+#endif -+ serial_driver.magic = TTY_DRIVER_MAGIC; -+ serial_driver.name = "ttyS"; -+ serial_driver.major = TTY_MAJOR; -+ serial_driver.minor_start = 64; -+ serial_driver.num = BCM_NUM_UARTS; -+ serial_driver.type = TTY_DRIVER_TYPE_SERIAL; -+ serial_driver.subtype = SERIAL_TYPE_NORMAL; -+ serial_driver.init_termios = tty_std_termios; -+ serial_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | CLOCAL; -+ serial_driver.flags = TTY_DRIVER_REAL_RAW; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ serial_driver.refcount = serial_refcount; -+ serial_driver.ttys = serial_table; -+#else -+ serial_driver.refcount = &serial_refcount; -+ serial_driver.table = serial_table; -+#endif -+ -+ serial_driver.termios = serial_termios; -+ serial_driver.termios_locked = serial_termios_locked; -+ serial_driver.open = bcm63xx_cons_open; -+ serial_driver.close = bcm63xx_cons_close; -+ serial_driver.write = bcm63xx_cons_write; -+ serial_driver.flush_chars = bcm63xx_cons_flush_chars; -+ serial_driver.write_room = bcm63xx_cons_write_room; -+ serial_driver.chars_in_buffer = bcm_chars_in_buffer; -+ serial_driver.flush_buffer = bcm_flush_buffer; -+ serial_driver.ioctl = bcm_ioctl; -+ serial_driver.throttle = bcm_throttle; -+ serial_driver.unthrottle = bcm_unthrottle; -+ serial_driver.send_xchar = bcm_send_xchar; -+ serial_driver.set_termios = bcm_set_termios; -+ serial_driver.stop = bcm_stop; -+ serial_driver.start = bcm_start; -+ serial_driver.hangup = bcm_hangup; -+ -+ if (tty_register_driver (&serial_driver)) -+ panic("Couldn't register serial driver\n"); -+ -+ //save_flags(flags); cli(); -+ spin_lock_irqsave(&bcm963xx_serial_lock, flags); -+ -+ for (i = 0; i < BCM_NUM_UARTS; i++) -+ { -+ info = &multi[i]; -+ lines[i] = info; -+ info->port = (Uart *) ((char *)UART_BASE + (i * 0x20)); -+ info->irq = (2 - i) + 8; -+ info->line = i; -+ info->tty = 0; -+ info->close_delay = 50; -+ info->closing_wait = 3000; -+ info->x_char = 0; -+ info->event = 0; -+ info->count = 0; -+ info->blocked_open = 0; -+ info->normal_termios = serial_driver.init_termios; -+ init_waitqueue_head(&info->open_wait); -+ init_waitqueue_head(&info->close_wait); -+ -+ /* If we are pointing to address zero then punt - not correctly -+ * set up in setup.c to handle this. -+ */ -+ if (! info->port) -+ return 0; -+ BcmHalMapInterrupt(bcm_interrupt, 0, INTERRUPT_ID_UART); -+ } -+ -+ /* order matters here... the trick is that flags -+ * is updated... in request_irq - to immediatedly obliterate -+ * it is unwise. -+ */ -+ //restore_flags(flags); -+ spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); -+ return 0; -+} -+ -+module_init(bcm63xx_serialinit); -+ -+/* -------------------------------------------------------------------------- -+ Name: bcm_console_print -+ Purpose: bcm_console_print is registered for printk. -+ The console_lock must be held when we get here. -+-------------------------------------------------------------------------- */ -+static void bcm_console_print (struct console * cons, const char * str, -+ unsigned int count) -+{ -+ unsigned int i; -+ //_puts(str); -+ for(i=0; i<count; i++, str++) -+ { -+ _putc(*str); -+ if (*str == 10) -+ { -+ _putc(13); -+ } -+ } -+} -+ -+static struct tty_driver * bcm_console_device(struct console * c, int *index) -+{ -+ *index = c->index; -+ return &serial_driver; -+} -+ -+static int __init bcm_console_setup(struct console * co, char * options) -+{ -+ return 0; -+} -+ -+static struct console bcm_sercons = { -+ .name = "ttyS", -+ .write = bcm_console_print, -+ .device = bcm_console_device, -+ .setup = bcm_console_setup, -+ .flags = CON_PRINTBUFFER, // CON_CONSDEV, CONSOLE_LINE, -+ .index = -1, -+}; -+ -+static int __init bcm63xx_console_init(void) -+{ -+ register_console(&bcm_sercons); -+ return 0; -+} -+ -+console_initcall(bcm63xx_console_init); -diff -urN linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/Makefile linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile ---- linux-2.6.17/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,13 @@ -+# File: bcmdrivers/opensource/char/serial -+# -+# Makefile for the BCM63xx serial/console driver -+ -+obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o -+ -+EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+ -+-include $(TOPDIR)/Rules.make -+ -+clean: -+ rm -f core *.o *.a *.s -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_intr.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,64 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __6338_INTR_H -+#define __6338_INTR_H -+ -+/*=====================================================================*/ -+/* BCM6338 External Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define INTERRUPT_ID_EXTERNAL_0 3 -+#define INTERRUPT_ID_EXTERNAL_1 4 -+#define INTERRUPT_ID_EXTERNAL_2 5 -+#define INTERRUPT_ID_EXTERNAL_3 6 -+ -+/*=====================================================================*/ -+/* BCM6338 Timer Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define MIPS_TIMER_INT 7 -+ -+/*=====================================================================*/ -+/* Peripheral ISR Table Offset */ -+/*=====================================================================*/ -+#define INTERNAL_ISR_TABLE_OFFSET 8 -+ -+/*=====================================================================*/ -+/* Logical Peripheral Interrupt IDs */ -+/*=====================================================================*/ -+ -+#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) -+#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) -+#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) -+#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 4) -+#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 5) -+#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 6) -+#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 7) -+#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) -+#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) -+#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 10) -+#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 11) -+#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 12) -+#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 13) -+#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) -+#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) -+#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) -+#define INTERRUPT_ID_SDIO (INTERNAL_ISR_TABLE_OFFSET + 17) -+ -+#endif /* __BCM6338_H */ -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6338_map_part.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,334 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM6338_MAP_H -+#define __BCM6338_MAP_H -+ -+#include "bcmtypes.h" -+ -+#define PERF_BASE 0xfffe0000 -+#define TIMR_BASE 0xfffe0200 -+#define UART_BASE 0xfffe0300 -+#define GPIO_BASE 0xfffe0400 -+#define SPI_BASE 0xfffe0c00 -+ -+typedef struct PerfControl { -+ uint32 RevID; -+ uint16 testControl; -+ uint16 blkEnables; -+#define EMAC_CLK_EN 0x0010 -+#define USBS_CLK_EN 0x0010 -+#define SAR_CLK_EN 0x0020 -+ -+#define SPI_CLK_EN 0x0200 -+ -+ uint32 pll_control; -+#define SOFT_RESET 0x00000001 -+ -+ uint32 IrqMask; -+ uint32 IrqStatus; -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 5 -+#define EI_CLEAR_SHFT 10 -+#define EI_MASK_SHFT 15 -+#define EI_INSENS_SHFT 20 -+#define EI_LEVEL_SHFT 25 -+ -+ uint32 unused[4]; /* (18) */ -+ uint32 BlockSoftReset; /* (28) */ -+#define BSR_SPI 0x00000001 -+#define BSR_EMAC 0x00000004 -+#define BSR_USBH 0x00000008 -+#define BSR_USBS 0x00000010 -+#define BSR_ADSL 0x00000020 -+#define BSR_DMAMEM 0x00000040 -+#define BSR_SAR 0x00000080 -+#define BSR_ACLC 0x00000100 -+#define BSR_ADSL_MIPS_PLL 0x00000400 -+#define BSR_ALL_BLOCKS \ -+ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ -+ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) -+} PerfControl; -+ -+#define PERF ((volatile PerfControl * const) PERF_BASE) -+ -+ -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+ byte config; -+#define XMITBREAK 0x40 -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ /* 4-LSBS represent STOP bits/char -+ * in 1/8 bit-time intervals. Zero -+ * represents 1/8 stop bit interval. -+ * Fifteen represents 2 stop bits. -+ */ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ /* 5-bit TimeoutCnt is in low bits of this register. -+ * This count represents the number of characters -+ * idle times before setting receive Irq when below threshold -+ */ -+ uint32 baudword; -+ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate -+ */ -+ -+ byte txf_levl; /* Read-only fifo depth */ -+ byte rxf_levl; /* Read-only fifo depth */ -+ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are -+ * RxThreshold. Irq can be asserted -+ * when rx fifo> thresh, txfifo<thresh -+ */ -+ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) -+ * if these bits are also enabled to GPIO_o -+ */ -+#define DTREN 0x01 -+#define RTSEN 0x02 -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to -+ * detect irq on rising AND falling -+ * edges for corresponding GPIO_i -+ * if enabled (edge insensitive) -+ */ -+ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense -+ * 0 for negedge sense if -+ * not configured for edge -+ * insensitive (see above) -+ * Lower 4 bits: Mask to enable change -+ * detection IRQ for corresponding -+ * GPIO_i -+ */ -+ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits -+ * have changed (may set IRQ). -+ * read automatically clears bit -+ * Lower 4 bits are actual status -+ */ -+ -+ uint16 intMask; /* Same Bit defs for Mask and status */ -+ uint16 intStatus; -+#define DELTAIP 0x0001 -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; /* Write to TX, Read from RX */ -+ /* bits 11:8 are BRK,PAR,FRM errors */ -+ -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART ((volatile Uart * const) UART_BASE) -+ -+typedef struct GpioControl { -+ uint32 unused0; -+ uint32 GPIODir; /* bits 7:0 */ -+ uint32 unused1; -+ uint32 GPIOio; /* bits 7:0 */ -+ uint32 LEDCtrl; -+#define LED3_STROBE 0x08000000 -+#define LED2_STROBE 0x04000000 -+#define LED1_STROBE 0x02000000 -+#define LED0_STROBE 0x01000000 -+#define LED_TEST 0x00010000 -+#define LED3_DISABLE_LINK_ACT 0x00008000 -+#define LED2_DISABLE_LINK_ACT 0x00004000 -+#define LED1_DISABLE_LINK_ACT 0x00002000 -+#define LED0_DISABLE_LINK_ACT 0x00001000 -+#define LED_INTERVAL_SET_MASK 0x00000f00 -+#define LED_INTERVAL_SET_320MS 0x00000500 -+#define LED_INTERVAL_SET_160MS 0x00000400 -+#define LED_INTERVAL_SET_80MS 0x00000300 -+#define LED_INTERVAL_SET_40MS 0x00000200 -+#define LED_INTERVAL_SET_20MS 0x00000100 -+#define LED3_ON 0x00000080 -+#define LED2_ON 0x00000040 -+#define LED1_ON 0x00000020 -+#define LED0_ON 0x00000010 -+#define LED3_ENABLE 0x00000008 -+#define LED2_ENABLE 0x00000004 -+#define LED1_ENABLE 0x00000002 -+#define LED0_ENABLE 0x00000001 -+ uint32 SpiSlaveCfg; -+#define SPI_SLAVE_RESET 0x00010000 -+#define SPI_RESTRICT 0x00000400 -+#define SPI_DELAY_DISABLE 0x00000200 -+#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 -+#define SPI_SER_ADDR_CFG_MASK 0x0000000c -+#define SPI_MODE 0x00000001 -+ uint32 vRegConfig; -+} GpioControl; -+ -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+/* Number to mask conversion macro used for GPIODir and GPIOio */ -+#define GPIO_NUM_MAX_BITS_MASK 0x0f -+#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) -+ -+/* -+** Spi Controller -+*/ -+ -+typedef struct SpiControl { -+ uint16 spiCmd; /* (0x0): SPI command */ -+#define SPI_CMD_START_IMMEDIATE 3 -+ -+#define SPI_CMD_COMMAND_SHIFT 0 -+#define SPI_CMD_DEVICE_ID_SHIFT 4 -+#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 -+ -+ byte spiIntStatus; /* (0x2): SPI interrupt status */ -+ byte spiMaskIntStatus; /* (0x3): SPI masked interrupt status */ -+ -+ byte spiIntMask; /* (0x4): SPI interrupt mask */ -+#define SPI_INTR_CMD_DONE 0x01 -+#define SPI_INTR_CLEAR_ALL 0x1f -+ -+ byte spiStatus; /* (0x5): SPI status */ -+ -+ byte spiClkCfg; /* (0x6): SPI clock configuration */ -+ -+ byte spiFillByte; /* (0x7): SPI fill byte */ -+ -+ byte unused0; -+ byte spiMsgTail; /* (0x9): msgtail */ -+ byte unused1; -+ byte spiRxTail; /* (0xB): rxtail */ -+ -+ uint32 unused2[13]; /* (0x0c - 0x3c) reserved */ -+ -+ byte spiMsgCtl; /* (0x40) control byte */ -+#define HALF_DUPLEX_W 1 -+#define HALF_DUPLEX_R 2 -+#define SPI_MSG_TYPE_SHIFT 6 -+#define SPI_BYTE_CNT_SHIFT 0 -+ byte spiMsgData[63]; /* (0x41 - 0x7f) msg data */ -+ byte spiRxDataFifo[64]; /* (0x80 - 0xbf) rx data */ -+ byte unused3[64]; /* (0xc0 - 0xff) reserved */ -+} SpiControl; -+ -+#define SPI ((volatile SpiControl * const) SPI_BASE) -+ -+/* -+** External Bus Interface -+*/ -+typedef struct EbiChipSelect { -+ uint32 base; /* base address in upper 24 bits */ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ uint32 config; -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_WREN 0x00000020 /* enable posted writes */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert something, -+ ** don't know what yet */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. use fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+} EbiChipSelect; -+ -+typedef struct MpiRegisters { -+ EbiChipSelect cs[1]; /* size chip select configuration */ -+} MpiRegisters; -+ -+#define MPI ((volatile MpiRegisters * const) MPI_BASE) -+ -+ -+#endif -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_intr.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,72 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __6345_INTR_H -+#define __6345_INTR_H -+ -+ -+/*=====================================================================*/ -+/* BCM6345 External Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define INTERRUPT_ID_EXTERNAL_0 3 -+#define INTERRUPT_ID_EXTERNAL_1 4 -+#define INTERRUPT_ID_EXTERNAL_2 5 -+#define INTERRUPT_ID_EXTERNAL_3 6 -+ -+/*=====================================================================*/ -+/* BCM6345 Timer Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define MIPS_TIMER_INT 7 -+ -+/*=====================================================================*/ -+/* Peripheral ISR Table Offset */ -+/*=====================================================================*/ -+#define INTERNAL_ISR_TABLE_OFFSET 8 -+#define DMA_ISR_TABLE_OFFSET (INTERNAL_ISR_TABLE_OFFSET + 13) -+ -+/*=====================================================================*/ -+/* Logical Peripheral Interrupt IDs */ -+/*=====================================================================*/ -+ -+/* Internal peripheral interrupt IDs */ -+#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) -+#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) -+#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 3) -+#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 4) -+#define INTERRUPT_ID_USB (INTERNAL_ISR_TABLE_OFFSET + 5) -+#define INTERRUPT_ID_EMAC (INTERNAL_ISR_TABLE_OFFSET + 8) -+#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 12) -+ -+/* DMA channel interrupt IDs */ -+#define INTERRUPT_ID_EMAC_RX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_RX_CHAN) -+#define INTERRUPT_ID_EMAC_TX_CHAN (DMA_ISR_TABLE_OFFSET + EMAC_TX_CHAN) -+#define INTERRUPT_ID_EBI_RX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_RX_CHAN) -+#define INTERRUPT_ID_EBI_TX_CHAN (DMA_ISR_TABLE_OFFSET + EBI_TX_CHAN) -+#define INTERRUPT_ID_RESERVED_RX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_RX_CHAN) -+#define INTERRUPT_ID_RESERVED_TX_CHAN (DMA_ISR_TABLE_OFFSET + RESERVED_TX_CHAN) -+#define INTERRUPT_ID_USB_BULK_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_RX_CHAN) -+#define INTERRUPT_ID_USB_BULK_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_BULK_TX_CHAN) -+#define INTERRUPT_ID_USB_CNTL_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_RX_CHAN) -+#define INTERRUPT_ID_USB_CNTL_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_CNTL_TX_CHAN) -+#define INTERRUPT_ID_USB_ISO_RX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_RX_CHAN) -+#define INTERRUPT_ID_USB_ISO_TX_CHAN (DMA_ISR_TABLE_OFFSET + USB_ISO_TX_CHAN) -+ -+ -+#endif /* __BCM6345_H */ -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6345_map_part.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,163 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM6345_MAP_H -+#define __BCM6345_MAP_H -+ -+ -+#include "bcmtypes.h" -+#include "6345_intr.h" -+ -+typedef struct IntControl { -+ uint32 RevID; -+ uint16 testControl; -+ uint16 blkEnables; -+#define USB_CLK_EN 0x0100 -+#define EMAC_CLK_EN 0x0080 -+#define UART_CLK_EN 0x0008 -+#define CPU_CLK_EN 0x0001 -+ -+ uint32 pll_control; -+#define SOFT_RESET 0x00000001 -+ -+ uint32 IrqMask; -+ uint32 IrqStatus; -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 4 -+#define EI_CLEAR_SHFT 8 -+#define EI_MASK_SHFT 12 -+#define EI_INSENS_SHFT 16 -+#define EI_LEVEL_SHFT 20 -+} IntControl; -+ -+#define INTC_BASE 0xfffe0000 -+#define PERF ((volatile IntControl * const) INTC_BASE) -+ -+#define TIMR_BASE 0xfffe0200 -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+ -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ byte config; -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define XMITBREAK 0x40 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ uint32 baudword; -+ -+ byte txf_levl; -+ byte rxf_levl; -+ byte fifocfg; -+ byte prog_out; -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; -+ byte DeltaIPConfig_Mask; -+ byte DeltaIP_SyncIP; -+ uint16 intMask; -+ uint16 intStatus; -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOEMT 0x0020 -+#define RXOVFERR 0x0080 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART_BASE 0xfffe0300 -+#define UART ((volatile Uart * const) UART_BASE) -+ -+typedef struct GpioControl { -+ uint16 unused0; -+ byte unused1; -+ byte TBusSel; -+ -+ uint16 unused2; -+ uint16 GPIODir; -+ byte unused3; -+ byte Leds; -+ uint16 GPIOio; -+ -+ uint32 UartCtl; -+} GpioControl; -+ -+#define GPIO_BASE 0xfffe0400 -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+#define GPIO_NUM_MAX_BITS_MASK 0x0f -+#define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) -+ -+ -+#endif -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_intr.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,74 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __6348_INTR_H -+#define __6348_INTR_H -+ -+ -+/*=====================================================================*/ -+/* BCM6348 External Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define INTERRUPT_ID_EXTERNAL_0 3 -+#define INTERRUPT_ID_EXTERNAL_1 4 -+#define INTERRUPT_ID_EXTERNAL_2 5 -+#define INTERRUPT_ID_EXTERNAL_3 6 -+ -+/*=====================================================================*/ -+/* BCM6348 Timer Interrupt Level Assignments */ -+/*=====================================================================*/ -+#define MIPS_TIMER_INT 7 -+ -+/*=====================================================================*/ -+/* Peripheral ISR Table Offset */ -+/*=====================================================================*/ -+#define INTERNAL_ISR_TABLE_OFFSET 8 -+ -+/*=====================================================================*/ -+/* Logical Peripheral Interrupt IDs */ -+/*=====================================================================*/ -+ -+#define INTERRUPT_ID_TIMER (INTERNAL_ISR_TABLE_OFFSET + 0) -+#define INTERRUPT_ID_SPI (INTERNAL_ISR_TABLE_OFFSET + 1) -+#define INTERRUPT_ID_UART (INTERNAL_ISR_TABLE_OFFSET + 2) -+#define INTERRUPT_ID_ADSL (INTERNAL_ISR_TABLE_OFFSET + 4) -+#define INTERRUPT_ID_ATM (INTERNAL_ISR_TABLE_OFFSET + 5) -+#define INTERRUPT_ID_USBS (INTERNAL_ISR_TABLE_OFFSET + 6) -+#define INTERRUPT_ID_EMAC2 (INTERNAL_ISR_TABLE_OFFSET + 7) -+#define INTERRUPT_ID_EMAC1 (INTERNAL_ISR_TABLE_OFFSET + 8) -+#define INTERRUPT_ID_EPHY (INTERNAL_ISR_TABLE_OFFSET + 9) -+#define INTERRUPT_ID_M2M (INTERNAL_ISR_TABLE_OFFSET + 10) -+#define INTERRUPT_ID_ACLC (INTERNAL_ISR_TABLE_OFFSET + 11) -+#define INTERRUPT_ID_USBH (INTERNAL_ISR_TABLE_OFFSET + 12) -+#define INTERRUPT_ID_SDRAM (INTERNAL_ISR_TABLE_OFFSET + 13) -+#define INTERRUPT_ID_USB_CNTL_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 14) -+#define INTERRUPT_ID_USB_CNTL_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 15) -+#define INTERRUPT_ID_USB_BULK_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 16) -+#define INTERRUPT_ID_USB_BULK_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 17) -+#define INTERRUPT_ID_USB_ISO_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 18) -+#define INTERRUPT_ID_USB_ISO_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 19) -+#define INTERRUPT_ID_EMAC1_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 20) -+#define INTERRUPT_ID_EMAC1_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 21) -+#define INTERRUPT_ID_EMAC2_RX_DMA (INTERNAL_ISR_TABLE_OFFSET + 22) -+#define INTERRUPT_ID_EMAC2_TX_DMA (INTERNAL_ISR_TABLE_OFFSET + 23) -+#define INTERRUPT_ID_MPI (INTERNAL_ISR_TABLE_OFFSET + 24) -+#define INTERRUPT_ID_DG (INTERNAL_ISR_TABLE_OFFSET + 25) -+ -+ -+#endif /* __BCM6348_H */ -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/6348_map_part.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,500 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM6348_MAP_H -+#define __BCM6348_MAP_H -+ -+#include "bcmtypes.h" -+ -+#define PERF_BASE 0xfffe0000 -+#define TIMR_BASE 0xfffe0200 -+#define UART_BASE 0xfffe0300 -+#define GPIO_BASE 0xfffe0400 -+#define MPI_BASE 0xfffe2000 /* MPI control registers */ -+#define USB_HOST_BASE 0xfffe1b00 /* USB host registers */ -+#define USB_HOST_NON_OHCI 0xfffe1c00 /* USB host non-OHCI registers */ -+ -+typedef struct PerfControl { -+ uint32 RevID; -+ uint16 testControl; -+ uint16 blkEnables; -+#define EMAC_CLK_EN 0x0010 -+#define SAR_CLK_EN 0x0020 -+#define USBS_CLK_EN 0x0040 -+#define USBH_CLK_EN 0x0100 -+ -+ uint32 pll_control; -+#define SOFT_RESET 0x00000001 -+ -+ uint32 IrqMask; -+ uint32 IrqStatus; -+ -+ uint32 ExtIrqCfg; -+#define EI_SENSE_SHFT 0 -+#define EI_STATUS_SHFT 5 -+#define EI_CLEAR_SHFT 10 -+#define EI_MASK_SHFT 15 -+#define EI_INSENS_SHFT 20 -+#define EI_LEVEL_SHFT 25 -+ -+ uint32 unused[4]; /* (18) */ -+ uint32 BlockSoftReset; /* (28) */ -+#define BSR_SPI 0x00000001 -+#define BSR_EMAC 0x00000004 -+#define BSR_USBH 0x00000008 -+#define BSR_USBS 0x00000010 -+#define BSR_ADSL 0x00000020 -+#define BSR_DMAMEM 0x00000040 -+#define BSR_SAR 0x00000080 -+#define BSR_ACLC 0x00000100 -+#define BSR_ADSL_MIPS_PLL 0x00000400 -+#define BSR_ALL_BLOCKS \ -+ (BSR_SPI | BSR_EMAC | BSR_USBH | BSR_USBS | BSR_ADSL | BSR_DMAMEM | \ -+ BSR_SAR | BSR_ACLC | BSR_ADSL_MIPS_PLL) -+ uint32 unused2[2]; /* (2c) */ -+ uint32 PllStrap; /* (34) */ -+#define PLL_N1_SHFT 20 -+#define PLL_N1_MASK (7<<PLL_N1_SHFT) -+#define PLL_N2_SHFT 15 -+#define PLL_N2_MASK (0x1f<<PLL_N2_SHFT) -+#define PLL_M1_REF_SHFT 12 -+#define PLL_M1_REF_MASK (7<<PLL_M1_REF_SHFT) -+#define PLL_M2_REF_SHFT 9 -+#define PLL_M2_REF_MASK (7<<PLL_M2_REF_SHFT) -+#define PLL_M1_CPU_SHFT 6 -+#define PLL_M1_CPU_MASK (7<<PLL_M1_CPU_SHFT) -+#define PLL_M1_BUS_SHFT 3 -+#define PLL_M1_BUS_MASK (7<<PLL_M1_BUS_SHFT) -+#define PLL_M2_BUS_SHFT 0 -+#define PLL_M2_BUS_MASK (7<<PLL_M2_BUS_SHFT) -+} PerfControl; -+ -+#define PERF ((volatile PerfControl * const) PERF_BASE) -+ -+typedef struct Timer { -+ uint16 unused0; -+ byte TimerMask; -+#define TIMER0EN 0x01 -+#define TIMER1EN 0x02 -+#define TIMER2EN 0x04 -+ byte TimerInts; -+#define TIMER0 0x01 -+#define TIMER1 0x02 -+#define TIMER2 0x04 -+#define WATCHDOG 0x08 -+ uint32 TimerCtl0; -+ uint32 TimerCtl1; -+ uint32 TimerCtl2; -+#define TIMERENABLE 0x80000000 -+#define RSTCNTCLR 0x40000000 -+ uint32 TimerCnt0; -+ uint32 TimerCnt1; -+ uint32 TimerCnt2; -+ uint32 WatchDogDefCount; -+ -+ /* Write 0xff00 0x00ff to Start timer -+ * Write 0xee00 0x00ee to Stop and re-load default count -+ * Read from this register returns current watch dog count -+ */ -+ uint32 WatchDogCtl; -+ -+ /* Number of 40-MHz ticks for WD Reset pulse to last */ -+ uint32 WDResetCount; -+} Timer; -+ -+#define TIMER ((volatile Timer * const) TIMR_BASE) -+ -+typedef struct UartChannel { -+ byte unused0; -+ byte control; -+#define BRGEN 0x80 /* Control register bit defs */ -+#define TXEN 0x40 -+#define RXEN 0x20 -+#define LOOPBK 0x10 -+#define TXPARITYEN 0x08 -+#define TXPARITYEVEN 0x04 -+#define RXPARITYEN 0x02 -+#define RXPARITYEVEN 0x01 -+ -+ byte config; -+#define XMITBREAK 0x40 -+#define BITS5SYM 0x00 -+#define BITS6SYM 0x10 -+#define BITS7SYM 0x20 -+#define BITS8SYM 0x30 -+#define ONESTOP 0x07 -+#define TWOSTOP 0x0f -+ /* 4-LSBS represent STOP bits/char -+ * in 1/8 bit-time intervals. Zero -+ * represents 1/8 stop bit interval. -+ * Fifteen represents 2 stop bits. -+ */ -+ byte fifoctl; -+#define RSTTXFIFOS 0x80 -+#define RSTRXFIFOS 0x40 -+ /* 5-bit TimeoutCnt is in low bits of this register. -+ * This count represents the number of characters -+ * idle times before setting receive Irq when below threshold -+ */ -+ uint32 baudword; -+ /* When divide SysClk/2/(1+baudword) we should get 32*bit-rate -+ */ -+ -+ byte txf_levl; /* Read-only fifo depth */ -+ byte rxf_levl; /* Read-only fifo depth */ -+ byte fifocfg; /* Upper 4-bits are TxThresh, Lower are -+ * RxThreshold. Irq can be asserted -+ * when rx fifo> thresh, txfifo<thresh -+ */ -+ byte prog_out; /* Set value of DTR (Bit0), RTS (Bit1) -+ * if these bits are also enabled to GPIO_o -+ */ -+#define DTREN 0x01 -+#define RTSEN 0x02 -+ -+ byte unused1; -+ byte DeltaIPEdgeNoSense; /* Low 4-bits, set corr bit to 1 to -+ * detect irq on rising AND falling -+ * edges for corresponding GPIO_i -+ * if enabled (edge insensitive) -+ */ -+ byte DeltaIPConfig_Mask; /* Upper 4 bits: 1 for posedge sense -+ * 0 for negedge sense if -+ * not configured for edge -+ * insensitive (see above) -+ * Lower 4 bits: Mask to enable change -+ * detection IRQ for corresponding -+ * GPIO_i -+ */ -+ byte DeltaIP_SyncIP; /* Upper 4 bits show which bits -+ * have changed (may set IRQ). -+ * read automatically clears bit -+ * Lower 4 bits are actual status -+ */ -+ -+ uint16 intMask; /* Same Bit defs for Mask and status */ -+ uint16 intStatus; -+#define DELTAIP 0x0001 -+#define TXUNDERR 0x0002 -+#define TXOVFERR 0x0004 -+#define TXFIFOTHOLD 0x0008 -+#define TXREADLATCH 0x0010 -+#define TXFIFOEMT 0x0020 -+#define RXUNDERR 0x0040 -+#define RXOVFERR 0x0080 -+#define RXTIMEOUT 0x0100 -+#define RXFIFOFULL 0x0200 -+#define RXFIFOTHOLD 0x0400 -+#define RXFIFONE 0x0800 -+#define RXFRAMERR 0x1000 -+#define RXPARERR 0x2000 -+#define RXBRK 0x4000 -+ -+ uint16 unused2; -+ uint16 Data; /* Write to TX, Read from RX */ -+ /* bits 11:8 are BRK,PAR,FRM errors */ -+ -+ uint32 unused3; -+ uint32 unused4; -+} Uart; -+ -+#define UART ((volatile Uart * const) UART_BASE) -+ -+typedef struct GpioControl { -+ uint32 GPIODir_high; /* bits 36:32 */ -+ uint32 GPIODir; /* bits 31:00 */ -+ uint32 GPIOio_high; /* bits 36:32 */ -+ uint32 GPIOio; /* bits 31:00 */ -+ uint32 LEDCtrl; -+#define LED3_STROBE 0x08000000 -+#define LED2_STROBE 0x04000000 -+#define LED1_STROBE 0x02000000 -+#define LED0_STROBE 0x01000000 -+#define LED_TEST 0x00010000 -+#define LED3_DISABLE_LINK_ACT 0x00008000 -+#define LED2_DISABLE_LINK_ACT 0x00004000 -+#define LED1_DISABLE_LINK_ACT 0x00002000 -+#define LED0_DISABLE_LINK_ACT 0x00001000 -+#define LED_INTERVAL_SET_MASK 0x00000f00 -+#define LED_INTERVAL_SET_320MS 0x00000500 -+#define LED_INTERVAL_SET_160MS 0x00000400 -+#define LED_INTERVAL_SET_80MS 0x00000300 -+#define LED_INTERVAL_SET_40MS 0x00000200 -+#define LED_INTERVAL_SET_20MS 0x00000100 -+#define LED3_ON 0x00000080 -+#define LED2_ON 0x00000040 -+#define LED1_ON 0x00000020 -+#define LED0_ON 0x00000010 -+#define LED3_ENABLE 0x00000008 -+#define LED2_ENABLE 0x00000004 -+#define LED1_ENABLE 0x00000002 -+#define LED0_ENABLE 0x00000001 -+ uint32 SpiSlaveCfg; -+#define SPI_SLAVE_RESET 0x00010000 -+#define SPI_RESTRICT 0x00000400 -+#define SPI_DELAY_DISABLE 0x00000200 -+#define SPI_PROBE_MUX_SEL_MASK 0x000001e0 -+#define SPI_SER_ADDR_CFG_MASK 0x0000000c -+#define SPI_MODE 0x00000001 -+ uint32 GPIOMode; -+#define GROUP4_DIAG 0x00090000 -+#define GROUP4_UTOPIA 0x00080000 -+#define GROUP4_LEGACY_LED 0x00030000 -+#define GROUP4_MII_SNOOP 0x00020000 -+#define GROUP4_EXT_EPHY 0x00010000 -+#define GROUP3_DIAG 0x00009000 -+#define GROUP3_UTOPIA 0x00008000 -+#define GROUP3_EXT_MII 0x00007000 -+#define GROUP2_DIAG 0x00000900 -+#define GROUP2_PCI 0x00000500 -+#define GROUP1_DIAG 0x00000090 -+#define GROUP1_UTOPIA 0x00000080 -+#define GROUP1_SPI_UART 0x00000060 -+#define GROUP1_SPI_MASTER 0x00000060 -+#define GROUP1_MII_PCCARD 0x00000040 -+#define GROUP1_MII_SNOOP 0x00000020 -+#define GROUP1_EXT_EPHY 0x00000010 -+#define GROUP0_DIAG 0x00000009 -+#define GROUP0_EXT_MII 0x00000007 -+ -+} GpioControl; -+ -+#define GPIO ((volatile GpioControl * const) GPIO_BASE) -+ -+/* Number to mask conversion macro used for GPIODir and GPIOio */ -+#define GPIO_NUM_TOTAL_BITS_MASK 0x3f -+#define GPIO_NUM_MAX_BITS_MASK 0x1f -+#define GPIO_NUM_TO_MASK(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) < 32) ? (1 << ((X) & GPIO_NUM_MAX_BITS_MASK)) : (0) ) -+ -+/* Number to mask conversion macro used for GPIODir_high and GPIOio_high */ -+#define GPIO_NUM_MAX_BITS_MASK_HIGH 0x07 -+#define GPIO_NUM_TO_MASK_HIGH(X) ( (((X) & GPIO_NUM_TOTAL_BITS_MASK) >= 32) ? (1 << ((X-32) & GPIO_NUM_MAX_BITS_MASK_HIGH)) : (0) ) -+ -+ -+/* -+** External Bus Interface -+*/ -+typedef struct EbiChipSelect { -+ uint32 base; /* base address in upper 24 bits */ -+#define EBI_SIZE_8K 0 -+#define EBI_SIZE_16K 1 -+#define EBI_SIZE_32K 2 -+#define EBI_SIZE_64K 3 -+#define EBI_SIZE_128K 4 -+#define EBI_SIZE_256K 5 -+#define EBI_SIZE_512K 6 -+#define EBI_SIZE_1M 7 -+#define EBI_SIZE_2M 8 -+#define EBI_SIZE_4M 9 -+#define EBI_SIZE_8M 10 -+#define EBI_SIZE_16M 11 -+#define EBI_SIZE_32M 12 -+#define EBI_SIZE_64M 13 -+#define EBI_SIZE_128M 14 -+#define EBI_SIZE_256M 15 -+ uint32 config; -+#define EBI_ENABLE 0x00000001 /* .. enable this range */ -+#define EBI_WAIT_STATES 0x0000000e /* .. mask for wait states */ -+#define EBI_WTST_SHIFT 1 /* .. for shifting wait states */ -+#define EBI_WORD_WIDE 0x00000010 /* .. 16-bit peripheral, else 8 */ -+#define EBI_WREN 0x00000020 /* enable posted writes */ -+#define EBI_POLARITY 0x00000040 /* .. set to invert something, -+ ** don't know what yet */ -+#define EBI_TS_TA_MODE 0x00000080 /* .. use TS/TA mode */ -+#define EBI_TS_SEL 0x00000100 /* .. drive tsize, not bs_b */ -+#define EBI_FIFO 0x00000200 /* .. use fifo */ -+#define EBI_RE 0x00000400 /* .. Reverse Endian */ -+} EbiChipSelect; -+ -+typedef struct MpiRegisters { -+ EbiChipSelect cs[7]; /* size chip select configuration */ -+#define EBI_CS0_BASE 0 -+#define EBI_CS1_BASE 1 -+#define EBI_CS2_BASE 2 -+#define EBI_CS3_BASE 3 -+#define PCMCIA_COMMON_BASE 4 -+#define PCMCIA_ATTRIBUTE_BASE 5 -+#define PCMCIA_IO_BASE 6 -+ uint32 unused0[2]; /* reserved */ -+ uint32 ebi_control; /* ebi control */ -+ uint32 unused1[4]; /* reserved */ -+#define EBI_ACCESS_TIMEOUT 0x000007FF -+ uint32 pcmcia_cntl1; /* pcmcia control 1 */ -+#define PCCARD_CARD_RESET 0x00040000 -+#define CARDBUS_ENABLE 0x00008000 -+#define PCMCIA_ENABLE 0x00004000 -+#define PCMCIA_GPIO_ENABLE 0x00002000 -+#define CARDBUS_IDSEL 0x00001F00 -+#define VS2_OEN 0x00000080 -+#define VS1_OEN 0x00000040 -+#define VS2_OUT 0x00000020 -+#define VS1_OUT 0x00000010 -+#define VS2_IN 0x00000008 -+#define VS1_IN 0x00000004 -+#define CD2_IN 0x00000002 -+#define CD1_IN 0x00000001 -+#define VS_MASK 0x0000000C -+#define CD_MASK 0x00000003 -+ uint32 unused2; /* reserved */ -+ uint32 pcmcia_cntl2; /* pcmcia control 2 */ -+#define PCMCIA_BYTESWAP_DIS 0x00000002 -+#define PCMCIA_HALFWORD_EN 0x00000001 -+#define RW_ACTIVE_CNT_BIT 2 -+#define INACTIVE_CNT_BIT 8 -+#define CE_SETUP_CNT_BIT 16 -+#define CE_HOLD_CNT_BIT 24 -+ uint32 unused3[40]; /* reserved */ -+ -+ uint32 sp0range; /* PCI to internal system bus address space */ -+ uint32 sp0remap; -+ uint32 sp0cfg; -+ uint32 sp1range; -+ uint32 sp1remap; -+ uint32 sp1cfg; -+ -+ uint32 EndianCfg; -+ -+ uint32 l2pcfgctl; /* internal system bus to PCI IO/Cfg control */ -+#define DIR_CFG_SEL 0x80000000 /* change from PCI I/O access to PCI config access */ -+#define DIR_CFG_USEREG 0x40000000 /* use this register info for PCI configuration access */ -+#define DEVICE_NUMBER 0x00007C00 /* device number for the PCI configuration access */ -+#define FUNC_NUMBER 0x00000300 /* function number for the PCI configuration access */ -+#define REG_NUMBER 0x000000FC /* register number for the PCI configuration access */ -+#define CONFIG_TYPE 0x00000003 /* configuration type for the PCI configuration access */ -+ -+ uint32 l2pmrange1; /* internal system bus to PCI memory space */ -+#define PCI_SIZE_64K 0xFFFF0000 -+#define PCI_SIZE_128K 0xFFFE0000 -+#define PCI_SIZE_256K 0xFFFC0000 -+#define PCI_SIZE_512K 0xFFF80000 -+#define PCI_SIZE_1M 0xFFF00000 -+#define PCI_SIZE_2M 0xFFE00000 -+#define PCI_SIZE_4M 0xFFC00000 -+#define PCI_SIZE_8M 0xFF800000 -+#define PCI_SIZE_16M 0xFF000000 -+#define PCI_SIZE_32M 0xFE000000 -+ uint32 l2pmbase1; /* kseg0 or kseg1 address & 0x1FFFFFFF */ -+ uint32 l2pmremap1; -+#define CARDBUS_MEM 0x00000004 -+#define MEM_WINDOW_EN 0x00000001 -+ uint32 l2pmrange2; -+ uint32 l2pmbase2; -+ uint32 l2pmremap2; -+ uint32 l2piorange; /* internal system bus to PCI I/O space */ -+ uint32 l2piobase; -+ uint32 l2pioremap; -+ -+ uint32 pcimodesel; -+#define PCI2_INT_BUS_RD_PREFECH 0x000000F0 -+#define PCI_BAR2_NOSWAP 0x00000002 /* BAR at offset 0x20 */ -+#define PCI_BAR1_NOSWAP 0x00000001 /* BAR at affset 0x1c */ -+ -+ uint32 pciintstat; /* PCI interrupt mask/status */ -+#define MAILBOX1_SENT 0x08 -+#define MAILBOX0_SENT 0x04 -+#define MAILBOX1_MSG_RCV 0x02 -+#define MAILBOX0_MSG_RCV 0x01 -+ uint32 locbuscntrl; /* internal system bus control */ -+#define DIR_U2P_NOSWAP 0x00000002 -+#define EN_PCI_GPIO 0x00000001 -+ uint32 locintstat; /* internal system bus interrupt mask/status */ -+#define CSERR 0x0200 -+#define SERR 0x0100 -+#define EXT_PCI_INT 0x0080 -+#define DIR_FAILED 0x0040 -+#define DIR_COMPLETE 0x0020 -+#define PCI_CFG 0x0010 -+ uint32 unused5[7]; -+ -+ uint32 mailbox0; -+ uint32 mailbox1; -+ -+ uint32 pcicfgcntrl; /* internal system bus PCI configuration control */ -+#define PCI_CFG_REG_WRITE_EN 0x00000080 -+#define PCI_CFG_ADDR 0x0000003C -+ uint32 pcicfgdata; /* internal system bus PCI configuration data */ -+ -+ uint32 locch2ctl; /* PCI to interrnal system bus DMA (downstream) local control */ -+#define MPI_DMA_HALT 0x00000008 /* idle after finish current memory burst */ -+#define MPI_DMA_PKT_HALT 0x00000004 /* idle after an EOP flag is detected */ -+#define MPI_DMA_STALL 0x00000002 /* idle after an EOP flag is detected */ -+#define MPI_DMA_ENABLE 0x00000001 /* set to enable channel */ -+ uint32 locch2intStat; -+#define MPI_DMA_NO_DESC 0x00000004 /* no valid descriptors */ -+#define MPI_DMA_DONE 0x00000002 /* packet xfer complete */ -+#define MPI_DMA_BUFF_DONE 0x00000001 /* buffer done */ -+ uint32 locch2intMask; -+ uint32 unused6; -+ uint32 locch2descaddr; -+ uint32 locch2status1; -+#define LOCAL_DESC_STATE 0xE0000000 -+#define PCI_DESC_STATE 0x1C000000 -+#define BYTE_DONE 0x03FFC000 -+#define RING_ADDR 0x00003FFF -+ uint32 locch2status2; -+#define BUFPTR_OFFSET 0x1FFF0000 -+#define PCI_MASTER_STATE 0x000000C0 -+#define LOC_MASTER_STATE 0x00000038 -+#define CONTROL_STATE 0x00000007 -+ uint32 unused7; -+ -+ uint32 locch1Ctl; /*internal system bus to PCI DMA (upstream) local control */ -+#define DMA_U2P_LE 0x00000200 /* local bus is little endian */ -+#define DMA_U2P_NOSWAP 0x00000100 /* lccal bus is little endian but no data swapped */ -+ uint32 locch1intstat; -+ uint32 locch1intmask; -+ uint32 unused8; -+ uint32 locch1descaddr; -+ uint32 locch1status1; -+ uint32 locch1status2; -+ uint32 unused9; -+ -+ uint32 pcich1ctl; /* internal system bus to PCI DMA PCI control */ -+ uint32 pcich1intstat; -+ uint32 pcich1intmask; -+ uint32 pcich1descaddr; -+ uint32 pcich1status1; -+ uint32 pcich1status2; -+ -+ uint32 pcich2Ctl; /* PCI to internal system bus DMA PCI control */ -+ uint32 pcich2intstat; -+ uint32 pcich2intmask; -+ uint32 pcich2descaddr; -+ uint32 pcich2status1; -+ uint32 pcich2status2; -+ -+ uint32 perm_id; /* permanent device and vendor id */ -+ uint32 perm_rev; /* permanent revision id */ -+} MpiRegisters; -+ -+#define MPI ((volatile MpiRegisters * const) MPI_BASE) -+ -+/* PCI configuration address space start offset 0x40 */ -+#define BRCM_PCI_CONFIG_TIMER 0x40 -+#define BRCM_PCI_CONFIG_TIMER_RETRY_MASK 0x0000FF00 -+#define BRCM_PCI_CONFIG_TIMER_TRDY_MASK 0x000000FF -+ -+/* USB host non-Open HCI register, USB_HOST_NON_OHCI, bit definitions. */ -+#define NON_OHCI_ENABLE_PORT1 0x00000001 /* Use USB port 1 for host, not dev */ -+#define NON_OHCI_BYTE_SWAP 0x00000008 /* Swap USB host registers */ -+ -+#define USBH_NON_OHCI ((volatile unsigned long * const) USB_HOST_NON_OHCI) -+ -+#endif -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_intr.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,59 @@ -+/* -+<:copyright-gpl -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM_INTR_H -+#define __BCM_INTR_H -+ -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ -+#if defined(CONFIG_BCM96338) -+#include <6338_intr.h> -+#endif -+#if defined(CONFIG_BCM96345) -+#include <6345_intr.h> -+#endif -+#if defined(CONFIG_BCM96348) -+#include <6348_intr.h> -+#endif -+ -+/* defines */ -+struct pt_regs; -+typedef int (*FN_HANDLER) (int, void *, struct pt_regs *); -+ -+/* prototypes */ -+extern void enable_brcm_irq(unsigned int irq); -+extern void disable_brcm_irq(unsigned int irq); -+extern int request_external_irq(unsigned int irq, -+ FN_HANDLER handler, unsigned long irqflags, -+ const char * devname, void *dev_id); -+extern unsigned int BcmHalMapInterrupt(FN_HANDLER isr, unsigned int param, -+ unsigned int interruptId); -+extern void dump_intr_regs(void); -+ -+/* compatibility definitions */ -+#define BcmHalInterruptEnable(irq) enable_brcm_irq( irq ) -+#define BcmHalInterruptDisable(irq) disable_brcm_irq( irq ) -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#endif -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcm_map_part.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,34 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+#ifndef __BCM_MAP_PART_H -+#define __BCM_MAP_PART_H -+ -+#if defined(CONFIG_BCM96338) -+#include <6338_map_part.h> -+#endif -+#if defined(CONFIG_BCM96345) -+#include <6345_map_part.h> -+#endif -+#if defined(CONFIG_BCM96348) -+#include <6348_map_part.h> -+#endif -+ -+#endif -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmpci.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmpci.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,87 @@ -+/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+// -+// bcmpci.h - bcm96348 PCI, Cardbus, and PCMCIA definition -+// -+#ifndef BCMPCI_H -+#define BCMPCI_H -+ -+/* Memory window in internal system bus address space */ -+#define BCM_PCI_MEM_BASE 0x08000000 -+/* IO window in internal system bus address space */ -+#define BCM_PCI_IO_BASE 0x0C000000 -+ -+#define BCM_PCI_ADDR_MASK 0x1fffffff -+ -+/* Memory window size (range) */ -+#define BCM_PCI_MEM_SIZE_16MB 0x01000000 -+/* IO window size (range) */ -+#define BCM_PCI_IO_SIZE_64KB 0x00010000 -+ -+/* PCI Configuration and I/O space acesss */ -+#define BCM_PCI_CFG(d, f, o) ( (d << 11) | (f << 8) | (o/4 << 2) ) -+ -+/* fake USB PCI slot */ -+#define USB_HOST_SLOT 9 -+#define USB_BAR0_MEM_SIZE 0x0800 -+ -+#define BCM_HOST_MEM_SPACE1 0x10000000 -+#define BCM_HOST_MEM_SPACE2 0x00000000 -+ -+/* -+ * EBI bus clock is 33MHz and share with PCI bus -+ * each clock cycle is 30ns. -+ */ -+/* attribute memory access wait cnt for 4306 */ -+#define PCMCIA_ATTR_CE_HOLD 3 // data hold time 70ns -+#define PCMCIA_ATTR_CE_SETUP 3 // data setup time 50ns -+#define PCMCIA_ATTR_INACTIVE 6 // time between read/write cycles 180ns. For the total cycle time 600ns (cnt1+cnt2+cnt3+cnt4) -+#define PCMCIA_ATTR_ACTIVE 10 // OE/WE pulse width 300ns -+ -+/* common memory access wait cnt for 4306 */ -+#define PCMCIA_MEM_CE_HOLD 1 // data hold time 30ns -+#define PCMCIA_MEM_CE_SETUP 1 // data setup time 30ns -+#define PCMCIA_MEM_INACTIVE 2 // time between read/write cycles 40ns. For the total cycle time 250ns (cnt1+cnt2+cnt3+cnt4) -+#define PCMCIA_MEM_ACTIVE 5 // OE/WE pulse width 150ns -+ -+#define PCCARD_VCC_MASK 0x00070000 // Mask Reset also -+#define PCCARD_VCC_33V 0x00010000 -+#define PCCARD_VCC_50V 0x00020000 -+ -+typedef enum { -+ MPI_CARDTYPE_NONE, // No Card in slot -+ MPI_CARDTYPE_PCMCIA, // 16-bit PCMCIA card in slot -+ MPI_CARDTYPE_CARDBUS, // 32-bit CardBus card in slot -+} CardType; -+ -+#define CARDBUS_SLOT 0 // Slot 0 is default for CardBus -+ -+#define pcmciaAttrOffset 0x00200000 -+#define pcmciaMemOffset 0x00000000 -+// Needs to be right above PCI I/O space. Give 0x8000 (32K) to PCMCIA. -+#define pcmciaIoOffset (BCM_PCI_IO_BASE + 0x80000) -+// Base Address is that mapped into the MPI ChipSelect registers. -+// UBUS bridge MemoryWindow 0 outputs a 0x00 for the base. -+#define pcmciaBase 0xbf000000 -+#define pcmciaAttr (pcmciaAttrOffset | pcmciaBase) -+#define pcmciaMem (pcmciaMemOffset | pcmciaBase) -+#define pcmciaIo (pcmciaIoOffset | pcmciaBase) -+ -+#endif -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmTag.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmTag.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,153 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+//************************************************************************************** -+// File Name : bcmTag.h -+// -+// Description: add tag with validation system to the firmware image file to be uploaded -+// via http -+// -+// Created : 02/28/2002 seanl -+//************************************************************************************** -+ -+#ifndef _BCMTAG_H_ -+#define _BCMTAG_H_ -+ -+ -+#define BCM_SIG_1 "Broadcom Corporation" -+#define BCM_SIG_2 "ver. 2.0" // was "firmware version 2.0" now it is split 6 char out for chip id. -+ -+#define BCM_TAG_VER "6" -+#define BCM_TAG_VER_LAST "26" -+ -+// file tag (head) structure all is in clear text except validationTokens (crc, md5, sha1, etc). Total: 128 unsigned chars -+#define TAG_LEN 256 -+#define TAG_VER_LEN 4 -+#define SIG_LEN 20 -+#define SIG_LEN_2 14 // Original second SIG = 20 is now devided into 14 for SIG_LEN_2 and 6 for CHIP_ID -+#define CHIP_ID_LEN 6 -+#define IMAGE_LEN 10 -+#define ADDRESS_LEN 12 -+#define FLAG_LEN 2 -+#define TOKEN_LEN 20 -+#define BOARD_ID_LEN 16 -+#define RESERVED_LEN (TAG_LEN - TAG_VER_LEN - SIG_LEN - SIG_LEN_2 - CHIP_ID_LEN - BOARD_ID_LEN - \ -+ (4*IMAGE_LEN) - (3*ADDRESS_LEN) - (3*FLAG_LEN) - (2*TOKEN_LEN)) -+ -+ -+// TAG for downloadable image (kernel plus file system) -+typedef struct _FILE_TAG -+{ -+ unsigned char tagVersion[TAG_VER_LEN]; // tag version. Will be 2 here. -+ unsigned char signiture_1[SIG_LEN]; // text line for company info -+ unsigned char signiture_2[SIG_LEN_2]; // additional info (can be version number) -+ unsigned char chipId[CHIP_ID_LEN]; // chip id -+ unsigned char boardId[BOARD_ID_LEN]; // board id -+ unsigned char bigEndian[FLAG_LEN]; // if = 1 - big, = 0 - little endia of the host -+ unsigned char totalImageLen[IMAGE_LEN]; // the sum of all the following length -+ unsigned char cfeAddress[ADDRESS_LEN]; // if non zero, cfe starting address -+ unsigned char cfeLen[IMAGE_LEN]; // if non zero, cfe size in clear ASCII text. -+ unsigned char rootfsAddress[ADDRESS_LEN]; // if non zero, filesystem starting address -+ unsigned char rootfsLen[IMAGE_LEN]; // if non zero, filesystem size in clear ASCII text. -+ unsigned char kernelAddress[ADDRESS_LEN]; // if non zero, kernel starting address -+ unsigned char kernelLen[IMAGE_LEN]; // if non zero, kernel size in clear ASCII text. -+ unsigned char dualImage[FLAG_LEN]; // if 1, dual image -+ unsigned char inactiveLen[FLAG_LEN]; // if 1, the image is INACTIVE; if 0, active -+ unsigned char reserved[RESERVED_LEN]; // reserved for later use -+ unsigned char imageValidationToken[TOKEN_LEN];// image validation token - can be crc, md5, sha; for -+ // now will be 4 unsigned char crc -+ unsigned char tagValidationToken[TOKEN_LEN]; // validation token for tag(from signiture_1 to end of // mageValidationToken) -+} FILE_TAG, *PFILE_TAG; -+ -+#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ -+#define CRC_LEN 4 -+ -+// only included if for bcmTag.exe program -+#ifdef BCMTAG_EXE_USE -+ -+static unsigned long Crc32_table[256] = { -+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, -+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, -+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, -+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, -+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, -+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, -+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, -+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, -+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, -+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, -+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, -+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, -+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, -+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, -+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, -+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, -+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, -+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, -+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, -+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, -+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, -+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, -+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, -+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, -+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, -+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, -+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, -+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, -+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, -+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, -+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, -+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, -+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, -+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, -+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, -+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, -+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, -+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, -+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, -+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, -+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, -+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, -+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, -+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, -+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, -+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, -+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, -+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, -+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, -+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, -+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, -+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, -+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, -+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, -+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, -+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, -+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, -+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, -+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, -+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, -+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, -+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, -+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, -+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D -+}; -+#endif // BCMTAG_USE -+ -+ -+#endif // _BCMTAG_H_ -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/bcmtypes.h 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,163 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+ -+// -+// bcmtypes.h - misc useful typedefs -+// -+#ifndef BCMTYPES_H -+#define BCMTYPES_H -+ -+// These are also defined in typedefs.h in the application area, so I need to -+// protect against re-definition. -+ -+#ifndef _TYPEDEFS_H_ -+typedef unsigned char uint8; -+typedef unsigned short uint16; -+typedef unsigned long uint32; -+typedef signed char int8; -+typedef signed short int16; -+typedef signed long int32; -+#if !defined(__cplusplus) -+typedef int bool; -+#endif -+#endif -+ -+typedef unsigned char byte; -+// typedef unsigned long sem_t; -+ -+typedef unsigned long HANDLE,*PULONG,DWORD,*PDWORD; -+typedef signed long LONG,*PLONG; -+ -+typedef unsigned int *PUINT; -+typedef signed int INT; -+ -+typedef unsigned short *PUSHORT; -+typedef signed short SHORT,*PSHORT; -+typedef unsigned short WORD,*PWORD; -+ -+typedef unsigned char *PUCHAR; -+typedef signed char *PCHAR; -+ -+typedef void *PVOID; -+ -+typedef unsigned char BOOLEAN, *PBOOL, *PBOOLEAN; -+ -+typedef unsigned char BYTE,*PBYTE; -+ -+//#ifndef __GNUC__ -+//The following has been defined in Vxworks internally: vxTypesOld.h -+//redefine under vxworks will cause error -+typedef signed int *PINT; -+ -+typedef signed char INT8; -+typedef signed short INT16; -+typedef signed long INT32; -+ -+typedef unsigned char UINT8; -+typedef unsigned short UINT16; -+typedef unsigned long UINT32; -+ -+typedef unsigned char UCHAR; -+typedef unsigned short USHORT; -+typedef unsigned int UINT; -+typedef unsigned long ULONG; -+ -+typedef void VOID; -+typedef unsigned char BOOL; -+ -+//#endif /* __GNUC__ */ -+ -+ -+// These are also defined in typedefs.h in the application area, so I need to -+// protect against re-definition. -+#ifndef TYPEDEFS_H -+ -+// Maximum and minimum values for a signed 16 bit integer. -+#define MAX_INT16 32767 -+#define MIN_INT16 -32768 -+ -+// Useful for true/false return values. This uses the -+// Taligent notation (k for constant). -+typedef enum -+{ -+ kFalse = 0, -+ kTrue = 1 -+} Bool; -+ -+#endif -+ -+/* macros to protect against unaligned accesses */ -+ -+#if 0 -+/* first arg is an address, second is a value */ -+#define PUT16( a, d ) { \ -+ *((byte *)a) = (byte)((d)>>8); \ -+ *(((byte *)a)+1) = (byte)(d); \ -+} -+ -+#define PUT32( a, d ) { \ -+ *((byte *)a) = (byte)((d)>>24); \ -+ *(((byte *)a)+1) = (byte)((d)>>16); \ -+ *(((byte *)a)+2) = (byte)((d)>>8); \ -+ *(((byte *)a)+3) = (byte)(d); \ -+} -+ -+/* first arg is an address, returns a value */ -+#define GET16( a ) ( \ -+ (*((byte *)a) << 8) | \ -+ (*(((byte *)a)+1)) \ -+) -+ -+#define GET32( a ) ( \ -+ (*((byte *)a) << 24) | \ -+ (*(((byte *)a)+1) << 16) | \ -+ (*(((byte *)a)+2) << 8) | \ -+ (*(((byte *)a)+3)) \ -+) -+#endif -+ -+#ifndef YES -+#define YES 1 -+#endif -+ -+#ifndef NO -+#define NO 0 -+#endif -+ -+#ifndef IN -+#define IN -+#endif -+ -+#ifndef OUT -+#define OUT -+#endif -+ -+#ifndef TRUE -+#define TRUE 1 -+#endif -+ -+#ifndef FALSE -+#define FALSE 0 -+#endif -+ -+#define READ32(addr) (*(volatile UINT32 *)((ULONG)&addr)) -+#define READ16(addr) (*(volatile UINT16 *)((ULONG)&addr)) -+#define READ8(addr) (*(volatile UINT8 *)((ULONG)&addr)) -+ -+#endif -diff -urN linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/board.h linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h ---- linux-2.6.17/bcmdrivers/opensource/include/bcm963xx/board.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/include/bcm963xx/board.h 2006-08-03 16:42:46.000000000 +0200 -@@ -0,0 +1,374 @@ -+/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+:> -+*/ -+/***********************************************************************/ -+/* */ -+/* MODULE: board.h */ -+/* DATE: 97/02/18 */ -+/* PURPOSE: Board specific information. This module should include */ -+/* all base device addresses and board specific macros. */ -+/* */ -+/***********************************************************************/ -+#ifndef _BOARD_H -+#define _BOARD_H -+ -+/*****************************************************************************/ -+/* Misc board definitions */ -+/*****************************************************************************/ -+ -+#define DYING_GASP_API -+ -+/*****************************************************************************/ -+/* Physical Memory Map */ -+/*****************************************************************************/ -+ -+#define PHYS_DRAM_BASE 0x00000000 /* Dynamic RAM Base */ -+#define PHYS_FLASH_BASE 0x1FC00000 /* Flash Memory */ -+ -+/*****************************************************************************/ -+/* Note that the addresses above are physical addresses and that programs */ -+/* have to use converted addresses defined below: */ -+/*****************************************************************************/ -+#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ -+#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ -+#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ -+ -+/*****************************************************************************/ -+/* Select the PLL value to get the desired CPU clock frequency. */ -+/* */ -+/* */ -+/*****************************************************************************/ -+#define FPERIPH 50000000 -+ -+#define ONEK 1024 -+#define BLK64K (64*ONEK) -+#define FLASH45_BLKS_BOOT_ROM 1 -+#define FLASH45_LENGTH_BOOT_ROM (FLASH45_BLKS_BOOT_ROM * BLK64K) -+#define FLASH_RESERVED_AT_END (64*ONEK) /*reserved for PSI, scratch pad*/ -+ -+/*****************************************************************************/ -+/* Note that the addresses above are physical addresses and that programs */ -+/* have to use converted addresses defined below: */ -+/*****************************************************************************/ -+#define DRAM_BASE (0x80000000 | PHYS_DRAM_BASE) /* cached DRAM */ -+#define DRAM_BASE_NOCACHE (0xA0000000 | PHYS_DRAM_BASE) /* uncached DRAM */ -+#define FLASH_BASE (0xA0000000 | PHYS_FLASH_BASE) /* uncached Flash */ -+ -+/*****************************************************************************/ -+/* Select the PLL value to get the desired CPU clock frequency. */ -+/* */ -+/* */ -+/*****************************************************************************/ -+#define FPERIPH 50000000 -+ -+#define SDRAM_TYPE_ADDRESS_OFFSET 16 -+#define NVRAM_DATA_OFFSET 0x0580 -+#define NVRAM_DATA_ID 0x0f1e2d3c -+#define BOARD_SDRAM_TYPE *(unsigned long *) \ -+ (FLASH_BASE + SDRAM_TYPE_ADDRESS_OFFSET) -+ -+#define ONEK 1024 -+#define BLK64K (64*ONEK) -+ -+// nvram and psi flash definitions for 45 -+#define FLASH45_LENGTH_NVRAM ONEK // 1k nvram -+#define NVRAM_PSI_DEFAULT 24 // default psi in K byes -+ -+/*****************************************************************************/ -+/* NVRAM Offset and definition */ -+/*****************************************************************************/ -+ -+#define NVRAM_VERSION_NUMBER 2 -+#define NVRAM_VERSION_NUMBER_ADDRESS 0 -+ -+#define NVRAM_BOOTLINE_LEN 256 -+#define NVRAM_BOARD_ID_STRING_LEN 16 -+#define NVRAM_MAC_ADDRESS_LEN 6 -+#define NVRAM_MAC_COUNT_MAX 32 -+ -+/*****************************************************************************/ -+/* Misc Offsets */ -+/*****************************************************************************/ -+ -+#define CFE_VERSION_OFFSET 0x0570 -+#define CFE_VERSION_MARK_SIZE 5 -+#define CFE_VERSION_SIZE 5 -+ -+typedef struct -+{ -+ unsigned long ulVersion; -+ char szBootline[NVRAM_BOOTLINE_LEN]; -+ char szBoardId[NVRAM_BOARD_ID_STRING_LEN]; -+ unsigned long ulReserved1[2]; -+ unsigned long ulNumMacAddrs; -+ unsigned char ucaBaseMacAddr[NVRAM_MAC_ADDRESS_LEN]; -+ char chReserved[2]; -+ unsigned long ulCheckSum; -+} NVRAM_DATA, *PNVRAM_DATA; -+ -+ -+/*****************************************************************************/ -+/* board ioctl calls for flash, led and some other utilities */ -+/*****************************************************************************/ -+ -+ -+/* Defines. for board driver */ -+#define BOARD_IOCTL_MAGIC 'B' -+#define BOARD_DRV_MAJOR 206 -+ -+#define MAC_ADDRESS_ANY (unsigned long) -1 -+ -+#define BOARD_IOCTL_FLASH_INIT \ -+ _IOWR(BOARD_IOCTL_MAGIC, 0, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_FLASH_WRITE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 1, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_FLASH_READ \ -+ _IOWR(BOARD_IOCTL_MAGIC, 2, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_NR_PAGES \ -+ _IOWR(BOARD_IOCTL_MAGIC, 3, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_DUMP_ADDR \ -+ _IOWR(BOARD_IOCTL_MAGIC, 4, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_MEMORY \ -+ _IOWR(BOARD_IOCTL_MAGIC, 5, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_MIPS_SOFT_RESET \ -+ _IOWR(BOARD_IOCTL_MAGIC, 6, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_LED_CTRL \ -+ _IOWR(BOARD_IOCTL_MAGIC, 7, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_ID \ -+ _IOWR(BOARD_IOCTL_MAGIC, 8, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_MAC_ADDRESS \ -+ _IOWR(BOARD_IOCTL_MAGIC, 9, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_RELEASE_MAC_ADDRESS \ -+ _IOWR(BOARD_IOCTL_MAGIC, 10, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_PSI_SIZE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 11, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_SDRAM_SIZE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 12, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_MONITOR_FD \ -+ _IOWR(BOARD_IOCTL_MAGIC, 13, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_WAKEUP_MONITOR_TASK \ -+ _IOWR(BOARD_IOCTL_MAGIC, 14, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_BOOTLINE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 15, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_BOOTLINE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 16, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_BASE_MAC_ADDRESS \ -+ _IOWR(BOARD_IOCTL_MAGIC, 17, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_CHIP_ID \ -+ _IOWR(BOARD_IOCTL_MAGIC, 18, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_NUM_ENET \ -+ _IOWR(BOARD_IOCTL_MAGIC, 19, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_CFE_VER \ -+ _IOWR(BOARD_IOCTL_MAGIC, 20, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_ENET_CFG \ -+ _IOWR(BOARD_IOCTL_MAGIC, 21, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_WLAN_ANT_INUSE \ -+ _IOWR(BOARD_IOCTL_MAGIC, 22, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_TRIGGER_EVENT \ -+ _IOWR(BOARD_IOCTL_MAGIC, 23, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_GET_TRIGGER_EVENT \ -+ _IOWR(BOARD_IOCTL_MAGIC, 24, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_UNSET_TRIGGER_EVENT \ -+ _IOWR(BOARD_IOCTL_MAGIC, 25, BOARD_IOCTL_PARMS) -+ -+#define BOARD_IOCTL_SET_SES_LED \ -+ _IOWR(BOARD_IOCTL_MAGIC, 26, BOARD_IOCTL_PARMS) -+ -+//<<JUNHON, 2004/09/15, get reset button status , tim hou , 05/04/12 -+#define RESET_BUTTON_UP 1 -+#define RESET_BUTTON_PRESSDOWN 0 -+#define BOARD_IOCTL_GET_RESETHOLD \ -+ _IOWR(BOARD_IOCTL_MAGIC, 27, BOARD_IOCTL_PARMS) -+//>>JUNHON, 2004/09/15 -+ -+// for the action in BOARD_IOCTL_PARMS for flash operation -+typedef enum -+{ -+ PERSISTENT, -+ NVRAM, -+ BCM_IMAGE_CFE, -+ BCM_IMAGE_FS, -+ BCM_IMAGE_KERNEL, -+ BCM_IMAGE_WHOLE, -+ SCRATCH_PAD, -+ FLASH_SIZE, -+} BOARD_IOCTL_ACTION; -+ -+ -+typedef struct boardIoctParms -+{ -+ char *string; -+ char *buf; -+ int strLen; -+ int offset; -+ BOARD_IOCTL_ACTION action; /* flash read/write: nvram, persistent, bcm image */ -+ int result; -+} BOARD_IOCTL_PARMS; -+ -+ -+// LED defines -+typedef enum -+{ -+ kLedAdsl, -+ kLedWireless, -+ kLedUsb, -+ kLedHpna, -+ kLedWanData, -+ kLedPPP, -+ kLedVoip, -+ kLedSes, -+ kLedLan, -+ kLedSelfTest, -+ kLedEnd, // NOTE: Insert the new led name before this one. Alway stay at the end. -+} BOARD_LED_NAME; -+ -+typedef enum -+{ -+ kLedStateOff, /* turn led off */ -+ kLedStateOn, /* turn led on */ -+ kLedStateFail, /* turn led on red */ -+ kLedStateBlinkOnce, /* blink once, ~100ms and ignore the same call during the 100ms period */ -+ kLedStateSlowBlinkContinues, /* slow blink continues at ~600ms interval */ -+ kLedStateFastBlinkContinues, /* fast blink continues at ~200ms interval */ -+} BOARD_LED_STATE; -+ -+ -+// virtual and physical map pair defined in board.c -+typedef struct ledmappair -+{ -+ BOARD_LED_NAME ledName; // virtual led name -+ BOARD_LED_STATE ledInitState; // initial led state when the board boots. -+ unsigned short ledMask; // physical GPIO pin mask -+ unsigned short ledActiveLow; // reset bit to turn on LED -+ unsigned short ledMaskFail; // physical GPIO pin mask for state failure -+ unsigned short ledActiveLowFail;// reset bit to turn on LED -+} LED_MAP_PAIR, *PLED_MAP_PAIR; -+ -+typedef void (*HANDLE_LED_FUNC)(BOARD_LED_NAME ledName, BOARD_LED_STATE ledState); -+ -+/* Flash storage address information that is determined by the flash driver. */ -+typedef struct flashaddrinfo -+{ -+ int flash_persistent_start_blk; -+ int flash_persistent_number_blk; -+ int flash_persistent_length; -+ unsigned long flash_persistent_blk_offset; -+ int flash_scratch_pad_start_blk; // start before psi (SP_BUF_LEN) -+ int flash_scratch_pad_number_blk; -+ int flash_scratch_pad_length; -+ unsigned long flash_scratch_pad_blk_offset; -+ int flash_nvram_start_blk; -+ int flash_nvram_number_blk; -+ int flash_nvram_length; -+ unsigned long flash_nvram_blk_offset; -+} FLASH_ADDR_INFO, *PFLASH_ADDR_INFO; -+ -+// scratch pad defines -+/* SP - Persisten Scratch Pad format: -+ sp header : 32 bytes -+ tokenId-1 : 8 bytes -+ tokenId-1 len : 4 bytes -+ tokenId-1 data -+ .... -+ tokenId-n : 8 bytes -+ tokenId-n len : 4 bytes -+ tokenId-n data -+*/ -+ -+#define MAGIC_NUM_LEN 8 -+#define MAGIC_NUMBER "gOGoBrCm" -+#define TOKEN_NAME_LEN 16 -+#define SP_VERSION 1 -+#define SP_MAX_LEN 8 * 1024 // 8k buf before psi -+#define SP_RESERVERD 16 -+ -+typedef struct _SP_HEADER -+{ -+ char SPMagicNum[MAGIC_NUM_LEN]; // 8 bytes of magic number -+ int SPVersion; // version number -+ int SPUsedLen; // used sp len -+ char SPReserved[SP_RESERVERD]; // reservied, total 32 bytes -+} SP_HEADER, *PSP_HEADER; -+ -+typedef struct _TOKEN_DEF -+{ -+ char tokenName[TOKEN_NAME_LEN]; -+ int tokenLen; -+} SP_TOKEN, *PSP_TOKEN; -+ -+ -+/*****************************************************************************/ -+/* Function Prototypes */ -+/*****************************************************************************/ -+#if !defined(__ASM_ASM_H) -+void dumpaddr( unsigned char *pAddr, int nLen ); -+ -+void kerSysFlashAddrInfoGet(PFLASH_ADDR_INFO pflash_addr_info); -+int kerSysNvRamGet(char *string, int strLen, int offset); -+int kerSysNvRamSet(char *string, int strLen, int offset); -+int kerSysPersistentGet(char *string, int strLen, int offset); -+int kerSysPersistentSet(char *string, int strLen, int offset); -+int kerSysScratchPadGet(char *tokName, char *tokBuf, int tokLen); -+int kerSysScratchPadSet(char *tokName, char *tokBuf, int tokLen); -+int kerSysBcmImageSet( int flash_start_addr, char *string, int size); -+int kerSysGetMacAddress( unsigned char *pucaAddr, unsigned long ulId ); -+int kerSysReleaseMacAddress( unsigned char *pucaAddr ); -+int kerSysGetSdramSize( void ); -+void kerSysGetBootline(char *string, int strLen); -+void kerSysSetBootline(char *string, int strLen); -+void kerSysMipsSoftReset(void); -+void kerSysLedCtrl(BOARD_LED_NAME, BOARD_LED_STATE); -+void kerSysLedRegisterHwHandler( BOARD_LED_NAME, HANDLE_LED_FUNC, int ); -+int kerSysFlashSizeGet(void); -+void kerSysRegisterDyingGaspHandler(char *devname, void *cbfn, void *context); -+void kerSysDeregisterDyingGaspHandler(char *devname); -+void kerSysWakeupMonitorTask( void ); -+#endif -+ -+#define BOOT_CFE 0 -+#define BOOT_REDBOOT 1 -+ -+extern int boot_loader_type; -+ -+#endif /* _BOARD_H */ -+ -diff -urN linux-2.6.17/bcmdrivers/opensource/Makefile linux-2.6.17-brcm63xx/bcmdrivers/opensource/Makefile ---- linux-2.6.17/bcmdrivers/opensource/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/bcmdrivers/opensource/Makefile 2006-08-03 16:42:38.000000000 +0200 -@@ -0,0 +1,20 @@ -+# File: modules/drivers/Makefile -+# -+# Makefile for the GPLed Linux kernel modules. -+# -+ -+LN_NAME=bcm9$(BRCM_CHIP) -+LN_DRIVER_DIRS = -+ -+-include $(KERNEL_DIR)/.config -+ -+ifneq ($(CONFIG_BCM_SERIAL),) -+ LN_DRIVER_DIRS +=ln -sn impl$(CONFIG_BCM_SERIAL_IMPL) char/serial/$(LN_NAME); -+endif -+ -+obj-$(CONFIG_BCM_SERIAL) += char/serial/impl$(CONFIG_BCM_SERIAL_IMPL)/ -+ -+ -+symlinks: -+ find . -lname "*" -name "$(LN_NAME)" -print -exec rm -f "{}" ";" -+ $(CONFIG_SHELL) -c "$(LN_DRIVER_DIRS)" diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/030-boardparms.patch b/openwrt/target/linux/brcm63xx-2.6/patches/030-boardparms.patch deleted file mode 100644 index f6ce12ce345..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/030-boardparms.patch +++ /dev/null @@ -1,3186 +0,0 @@ -diff -Naurp linux-2.6.16.7-generic-patched/boardparms/bcm963xx/Makefile linux-2.6.16.7-patched/boardparms/bcm963xx/Makefile ---- linux-2.6.16.7-generic-patched/boardparms/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/boardparms/bcm963xx/Makefile 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,16 @@ -+ -+ifeq ($(CONFIG_MIPS_BRCM),y) -+ -+# Linux -+obj-y += boardparms.o -+EXTRA_CFLAGS += -DCONFIG_BCM9$(BRCM_CHIP) -+-include $(TOPDIR)/Rules.make -+ -+else -+ -+# CFE -+BSPOBJS += boardparms.o -+ -+endif -+ -+ -diff -Naurp linux-2.6.16.7-generic-patched/boardparms/bcm963xx/boardparms.c linux-2.6.16.7-patched/boardparms/bcm963xx/boardparms.c ---- linux-2.6.16.7-generic-patched/boardparms/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/boardparms/bcm963xx/boardparms.c 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,2392 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.c -+ * -+ * Description: This file contains the implementation for the BCM63xx board -+ * parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include <linux/config.h> -+#include "boardparms.h" -+ -+/* Defines. */ -+ -+/* Default psi size in K bytes */ -+#define BP_PSI_DEFAULT_SIZE 24 -+ -+/* Typedefs */ -+typedef struct boardparameters -+{ -+ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ -+ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; -+ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; -+ unsigned short usSdramSize; /* SDRAM size and type */ -+ unsigned short usPsiSize; /* persistent storage in K bytes */ -+ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ -+ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ -+ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ -+ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ -+ unsigned short usGpioUartRts; /* GPIO pin or not defined */ -+ unsigned short usGpioUartCts; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ -+ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ -+ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ -+ unsigned short usExtIntrWireless; /* ext intr or not defined */ -+ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ -+ unsigned short usExtIntrHpna; /* ext intr or not defined */ -+ unsigned short usCsHpna; /* chip select not defined */ -+ unsigned short usAntInUseWireless; /* antenna in use or not defined */ -+ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ -+ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ -+ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ -+} BOARD_PARAMETERS, *PBOARD_PARAMETERS; -+ -+/* Variables */ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+static BOARD_PARAMETERS g_bcm96338sv = -+{ -+ "96338SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static BOARD_PARAMETERS g_bcm96338l2m8m = -+{ -+ "96338L-2M-8M", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; -+#endif -+ -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+static BOARD_PARAMETERS g_bcm96345r = -+{ -+ "96345R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw2 = -+{ -+ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold -+ * Reset or RTS. -+ */ -+ "96345GW2", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_GPIO_0_AH, /* usGpioPhySpiSck */ -+ BP_GPIO_4_AH, /* usGpioPhySpiSs */ -+ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ -+ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_GPIO, /* usConfigType */ -+ BP_ENET_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_GPIO_13_AH, /* usGpioUartRts */ -+ BP_GPIO_9_AH, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw = -+{ -+ "96345GW", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_GPIO_10_AH, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_EXT_INTR_3, /* usExtIntrHpna */ -+ BP_CS_1, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96335r = -+{ -+ "96335R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_9_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_8_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_9_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345r0 = -+{ -+ "96345R0", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345rs = -+{ -+ "96345RS", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, -+ &g_bcm96345rs, 0}; -+#endif -+ -+#if defined(_BCM96348_) || defined(CONFIG_BCM96348) -+ -+static BOARD_PARAMETERS g_bcm96348r = -+{ -+ "96348R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348lv = -+{ -+ "96348LV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x02, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_GPIO_5_AL, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw = -+{ -+ "96348GW", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_10 = -+{ -+ "96348GW-10", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw_11 = -+{ -+ "96348GW-11", /* szBoardId */ -+ {{BP_ENET_NO_PHY}, /* ucPhyType */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348sv = -+{ -+ "96348SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x1f, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_dualDsp = -+{ -+ "96348GW-DualDSP", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_UNEQUIPPED, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_DSP, /* ucDspType */ -+ 0x01, /* ucDspAddress */ -+ BP_EXT_INTR_3, /* usExtIntrVoip */ -+ BP_UNEQUIPPED , /* usGpioVoipReset */ -+ BP_GPIO_35_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_3}}, /* usCsVoip */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcmCustom_01 = -+{ -+ "BCMCUST_01", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_36_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AL, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, -+ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, -+ &g_bcmCustom_01, 0}; -+#endif -+ -+static PBOARD_PARAMETERS g_pCurrentBp = 0; -+ -+/************************************************************************** -+ * Name : bpstrcmp -+ * -+ * Description: String compare for this file so it does not depend on an OS. -+ * (Linux kernel and CFE share this source file.) -+ * -+ * Parameters : [IN] dest - destination string -+ * [IN] src - source string -+ * -+ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src -+ ***************************************************************************/ -+static int bpstrcmp(const char *dest,const char *src); -+static int bpstrcmp(const char *dest,const char *src) -+{ -+ while (*src && *dest) -+ { -+ if (*dest < *src) return -1; -+ if (*dest > *src) return 1; -+ dest++; -+ src++; -+ } -+ -+ if (*dest && !*src) return 1; -+ if (!*dest && *src) return -1; -+ return 0; -+} /* bpstrcmp */ -+ -+/************************************************************************** -+ * Name : BpGetVoipDspConfig -+ * -+ * Description: Gets the DSP configuration from the board parameter -+ * structure for a given DSP index. -+ * -+ * Parameters : [IN] dspNum - DSP index (number) -+ * -+ * Returns : Pointer to DSP configuration block if found/valid, NULL -+ * otherwise. -+ ***************************************************************************/ -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) -+{ -+ VOIP_DSP_INFO *pDspConfig = 0; -+ int i; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) -+ { -+ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && -+ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) -+ { -+ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; -+ break; -+ } -+ } -+ } -+ -+ return pDspConfig; -+} -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ) -+{ -+ int nRet = BP_BOARD_ID_NOT_FOUND; -+ PBOARD_PARAMETERS *ppBp; -+ -+ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) -+ { -+ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) -+ { -+ g_pCurrentBp = *ppBp; -+ nRet = BP_SUCCESS; -+ break; -+ } -+ } -+ -+ return( nRet ); -+} /* BpSetBoardId */ -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) -+{ -+ PBOARD_PARAMETERS *ppBp; -+ int i; -+ char *src; -+ char *dest; -+ -+ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; -+ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) -+ { -+ dest = pszBoardIds; -+ src = (*ppBp)->szBoardId; -+ while( *src ) -+ *dest++ = *src++; -+ *dest = '\0'; -+ } -+ -+ return( i ); -+} /* BpGetBoardIds */ -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) -+{ -+ int i, nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ { -+ if( i < BP_MAX_ENET_MACS ) -+ { -+ unsigned char *src = (unsigned char *) -+ &g_pCurrentBp->EnetMacInfos[i]; -+ unsigned char *dest = (unsigned char *) pEnetInfos; -+ int len = sizeof(ETHERNET_MAC_INFO); -+ while( len-- ) -+ *dest++ = *src++; -+ } -+ else -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ } -+ -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetEthernetMacInfo */ -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulSdramSize = g_pCurrentBp->usSdramSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulSdramSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetSdramSize */ -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulPsiSize = g_pCurrentBp->usPsiSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulPsiSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPsiSize */ -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; -+ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; -+ -+ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusInner = *pusOuter = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetRj11InnerOuterPairGpios */ -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; -+ -+ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPressAndHoldResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipReset; -+ -+ if( *pusValue != BP_NOT_DEFINED || -+ *pusValue == BP_UNEQUIPPED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipIntr; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipIntrGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPcmciaReset; -+ -+ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPcmciaResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, board id input string does not -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusRts = g_pCurrentBp->usGpioUartRts; -+ *pusCts = g_pCurrentBp->usGpioUartCts; -+ -+ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusRts = *pusCts = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUartRtsCtsGpios */ -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdsl; -+ -+ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdslFail; -+ -+ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWireless; -+ -+ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usAntInUseWireless; -+ -+ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessAntInUse */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; -+ -+ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessSesBtnGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; -+ -+ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedSesWireless; -+ -+ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedUsb; -+ -+ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUsbLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedHpna; -+ -+ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWanData; -+ -+ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWanDataLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPpp; -+ -+ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPppFail; -+ -+ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; -+ -+ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderPowerOn */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; -+ -+ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderAlarmLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; -+ -+ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderResetCfgLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlStop; -+ -+ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderStopLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ * -+ * Note : The VoIP structure would allow for having one LED per DSP -+ * however, the board initialization function assumes only one -+ * LED per functionality (ie one LED for VoIP). Therefore in -+ * order to keep this tidy and simple we do not make usage of the -+ * one-LED-per-DSP function. Instead, we assume that the LED for -+ * VoIP is unique and associated with DSP 0 (always present on -+ * any VoIP platform). If changing this to a LED-per-DSP function -+ * then one need to update the board initialization driver in -+ * bcmdrivers\opensource\char\board\bcm963xx\impl1 -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioLedVoip; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrWireless; -+ -+ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; -+ -+ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslDyingGaspExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usExtIntrVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrHpna; -+ -+ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usCsHpna; -+ -+ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaChipSelect */ -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usCsVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipChipSelect */ -+ -diff -Naurp linux-2.6.16.7-generic-patched/boardparms/bcm963xx/boardparms.h linux-2.6.16.7-patched/boardparms/bcm963xx/boardparms.h ---- linux-2.6.16.7-generic-patched/boardparms/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16.7-patched/boardparms/bcm963xx/boardparms.h 2006-07-05 15:21:58.000000000 +0200 -@@ -0,0 +1,766 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.h -+ * -+ * Description: This file contains definitions and function prototypes for -+ * the BCM63xx board parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+#if !defined(_BOARDPARMS_H) -+#define _BOARDPARMS_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+/* Return codes. */ -+#define BP_SUCCESS 0 -+#define BP_BOARD_ID_NOT_FOUND 1 -+#define BP_VALUE_NOT_DEFINED 2 -+#define BP_BOARD_ID_NOT_SET 3 -+ -+/* Values for BpGetSdramSize. */ -+#define BP_MEMORY_8MB_1_CHIP 0 -+#define BP_MEMORY_16MB_1_CHIP 1 -+#define BP_MEMORY_32MB_1_CHIP 2 -+#define BP_MEMORY_64MB_2_CHIP 3 -+#define BP_MEMORY_32MB_2_CHIP 4 -+#define BP_MEMORY_16MB_2_CHIP 5 -+ -+/* Values for EthernetMacInfo PhyType. */ -+#define BP_ENET_NO_PHY 0 -+#define BP_ENET_INTERNAL_PHY 1 -+#define BP_ENET_EXTERNAL_PHY 2 -+#define BP_ENET_EXTERNAL_SWITCH 3 -+ -+/* Values for EthernetMacInfo Configuration type. */ -+#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ -+#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ -+#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ -+ -+/* Values for EthernetMacInfo Reverse MII. */ -+#define BP_ENET_NO_REVERSE_MII 0 -+#define BP_ENET_REVERSE_MII 1 -+ -+/* Values for VoIPDSPInfo DSPType. */ -+#define BP_VOIP_NO_DSP 0 -+#define BP_VOIP_DSP 1 -+ -+ -+/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ -+#define BP_ACTIVE_MASK 0x8000 -+#define BP_ACTIVE_HIGH 0x0000 -+#define BP_ACTIVE_LOW 0x8000 -+#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) -+#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) -+#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) -+#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) -+#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) -+#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) -+#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) -+#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) -+#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) -+#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) -+#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) -+#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) -+#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) -+#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) -+#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) -+#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) -+#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) -+#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) -+#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) -+#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) -+#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) -+#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) -+#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) -+#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) -+#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) -+#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) -+#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) -+#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) -+#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) -+#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) -+#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) -+#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) -+#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) -+#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) -+#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) -+#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) -+#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) -+#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) -+#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) -+#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) -+#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) -+#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) -+#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) -+#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) -+#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) -+#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) -+#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) -+#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) -+#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) -+#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) -+#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) -+#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) -+#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) -+#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) -+#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) -+#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) -+#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) -+#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) -+#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) -+#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) -+#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) -+#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) -+#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) -+#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) -+#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) -+#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) -+#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) -+#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) -+#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) -+#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) -+#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) -+#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) -+#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) -+#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) -+ -+/* Values for external interrupt assignments. */ -+#define BP_EXT_INTR_0 0 -+#define BP_EXT_INTR_1 1 -+#define BP_EXT_INTR_2 2 -+#define BP_EXT_INTR_3 3 -+ -+/* Values for chip select assignments. */ -+#define BP_CS_0 0 -+#define BP_CS_1 1 -+#define BP_CS_2 2 -+#define BP_CS_3 3 -+ -+/* Value for GPIO and external interrupt fields that are not used. */ -+#define BP_NOT_DEFINED 0xffff -+#define BP_HW_DEFINED 0xfff0 -+#define BP_UNEQUIPPED 0xfff1 -+ -+/* Maximum size of the board id string. */ -+#define BP_BOARD_ID_LEN 16 -+ -+/* Maximum number of Ethernet MACs. */ -+#define BP_MAX_ENET_MACS 2 -+ -+/* Maximum number of VoIP DSPs. */ -+#define BP_MAX_VOIP_DSP 2 -+ -+/* Wireless Antenna Settings. */ -+#define BP_WLAN_ANT_MAIN 0 -+#define BP_WLAN_ANT_AUX 1 -+#define BP_WLAN_ANT_BOTH 3 -+ -+#if !defined(__ASSEMBLER__) -+ -+/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, -+ * then the other fields are not valid. -+ */ -+typedef struct EthernetMacInfo -+{ -+ unsigned char ucPhyType; /* BP_ENET_xxx */ -+ unsigned char ucPhyAddress; /* 0 to 31 */ -+ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ -+ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ -+ unsigned short numSwitchPorts; /* Number of PHY ports */ -+ unsigned short usConfigType; /* Configuration type */ -+ unsigned short usReverseMii; /* Reverse MII */ -+} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; -+ -+ -+/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, -+ * then the other fields are not valid. -+ */ -+typedef struct VoIPDspInfo -+{ -+ unsigned char ucDspType; -+ unsigned char ucDspAddress; -+ unsigned short usExtIntrVoip; -+ unsigned short usGpioVoipReset; -+ unsigned short usGpioVoipIntr; -+ unsigned short usGpioLedVoip; -+ unsigned short usCsVoip; -+ -+} VOIP_DSP_INFO; -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ); -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ); -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ); -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ); -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); -+ -+#endif /* __ASSEMBLER__ */ -+ -+#if __cplusplus -+} -+#endif -+ -+#endif /* _BOARDPARMS_H */ -+ diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/050-disable-synchronize_net.patch b/openwrt/target/linux/brcm63xx-2.6/patches/050-disable-synchronize_net.patch deleted file mode 100644 index 737a70a48dc..00000000000 --- a/openwrt/target/linux/brcm63xx-2.6/patches/050-disable-synchronize_net.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naurp linux-2.6.16.7-generic-patched/net/ipv4/af_inet.c linux-2.6.16.7-patched/net/ipv4/af_inet.c ---- linux-2.6.16.7-generic-patched/net/ipv4/af_inet.c 2006-04-17 23:53:25.000000000 +0200 -+++ linux-2.6.16.7-patched/net/ipv4/af_inet.c 2006-07-05 15:33:47.000000000 +0200 -@@ -940,7 +940,9 @@ void inet_register_protosw(struct inet_p - out: - spin_unlock_bh(&inetsw_lock); - -+#ifndef CONFIG_MIPS_BRCM - synchronize_net(); -+#endif - - return; - From c40645a80a7e1b0e8f56f5eddb338fbdb89e270b Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 25 Aug 2006 14:02:28 +0000 Subject: [PATCH 514/757] more cleanups SVN-Revision: 4668 --- openwrt/target/linux/brcm63xx-2.6/config | 2 +- .../brcm63xx-2.6/patches/001-bcm963xx.patch | 3346 +---------------- 2 files changed, 71 insertions(+), 3277 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index 50c4cfc3b67..19968aaff2c 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -1251,7 +1251,7 @@ CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_VM is not set CONFIG_FORCED_INLINING=y diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch index abf9a7b74a2..533418de337 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch @@ -7966,20 +7966,16 @@ diff -urN linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile --- linux.old/arch/mips/Makefile 2006-08-25 00:43:39.000000000 +0200 -+++ linux.dev/arch/mips/Makefile 2006-08-25 11:36:41.000000000 +0200 -@@ -145,6 +145,19 @@ ++++ linux.dev/arch/mips/Makefile 2006-08-25 15:39:54.000000000 +0200 +@@ -145,6 +145,15 @@ # # +# Broadcom board +# +core-$(CONFIG_MIPS_BRCM) += arch/mips/bcm963xx/ -+core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/serial/impl1/ -+#core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/board/bcm963xx/impl1/ -+#core-$(CONFIG_MIPS_BRCM) += boardparms/bcm963xx/ -+#cflags-$(CONFIG_MIPS_BRCM) += -Iinclude/asm-mips/mach-bcm963xx ++cflags-$(CONFIG_MIPS_BRCM) += -Iinclude/asm-mips/mach-bcm963xx +cflags-$(CONFIG_MIPS_BRCM) += -Iarch/mips/bcm963xx/include -+cflags-$(CONFIG_MIPS_BRCM) += -Iboardparms/bcm963xx +load-$(CONFIG_MIPS_BRCM) += 0xffffffff80010000 + + @@ -8455,10 +8451,10 @@ diff -urN linux.old/arch/mips/pci/pci-bcm96348.c linux.dev/arch/mips/pci/pci-bcm +} + +arch_initcall(bcm96348_pci_init); -diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux.dev/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c ---- linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c 2006-08-25 00:39:38.000000000 +0200 -@@ -0,0 +1,1056 @@ +diff -urN linux.old/drivers/serial/bcm63xx_cons.c linux.dev/drivers/serial/bcm63xx_cons.c +--- linux.old/drivers/serial/bcm63xx_cons.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/serial/bcm63xx_cons.c 2006-08-25 15:37:34.000000000 +0200 +@@ -0,0 +1,1049 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -8498,6 +8494,7 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux +#include <linux/tty.h> +#include <linux/tty_flip.h> +#include <linux/serial.h> ++#include <linux/serialP.h> +#include <asm/uaccess.h> + +#include <bcmtypes.h> @@ -8564,11 +8561,9 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + +static struct bcm_serial multi[BCM_NUM_UARTS]; +static struct bcm_serial *lines[BCM_NUM_UARTS]; -+static struct tty_driver serial_driver; -+static struct tty_struct *serial_table[BCM_NUM_UARTS]; ++static struct tty_driver *serial_driver; +static struct termios *serial_termios[BCM_NUM_UARTS]; +static struct termios *serial_termios_locked[BCM_NUM_UARTS]; -+static int serial_refcount; + + +static void bcm_stop (struct tty_struct *tty); @@ -8578,7 +8573,7 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux +static void shutdown (struct bcm_serial * info); +static void change_speed( volatile Uart *pUart, tcflag_t cFlag ); +static void bcm63xx_cons_flush_chars (struct tty_struct *tty); -+static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++static int bcm63xx_cons_write (struct tty_struct *tty, + const unsigned char *buf, int count); +static int bcm63xx_cons_write_room (struct tty_struct *tty); +static int bcm_chars_in_buffer (struct tty_struct *tty); @@ -8634,7 +8629,7 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + UCHAR ch = 0; + while ((status = info->port->intStatus) & RXINT) + { -+ char flag_char = 0; ++ char flag_char = TTY_NORMAL; + + if (status & RXFIFONE) + ch = info->port->Data; // Read the character @@ -8694,9 +8689,10 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + } + tty_insert_flip_char(tty, ch, flag_char); + } -+ignore_char: -+ if (tty) -+ tty_flip_buffer_push(tty); ++ignore_char:; ++ tty_flip_buffer_push(tty); ++ tty_schedule_flip(tty); ++ +} + + @@ -8768,9 +8764,6 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + if (!info->is_initialized) + return; + -+ -+ /*save_flags (flags); -+ cli ();*/ + spin_lock_irqsave(&bcm963xx_serial_lock, flags); + + info->port->control &= ~(BRGEN|TXEN|RXEN); @@ -8778,7 +8771,6 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + set_bit (TTY_IO_ERROR, &info->tty->flags); + info->is_initialized = 0; + -+ //restore_flags (flags); + spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); +} +/* @@ -8791,10 +8783,8 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux +static void change_speed( volatile Uart *pUart, tcflag_t cFlag ) +{ + unsigned long ulFlags, ulBaud, ulClockFreqHz, ulTmp; -+ /*save_flags(ulFlags); -+ cli();*/ ++ + spin_lock_irqsave(&bcm963xx_serial_lock, ulFlags); -+ + switch( cFlag & (CBAUD | CBAUDEX) ) + { + case B115200: @@ -8874,7 +8864,6 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + case CS7: + ulTmp = BITS7SYM; /* select transmit 7 bit data size */ + break; -+ /*case CS8:*/ + default: + ulTmp = BITS8SYM; /* select transmit 8 bit data size */ + break; @@ -8902,7 +8891,6 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + + /* Reset and flush uart */ + pUart->fifoctl = RSTTXFIFOS | RSTRXFIFOS; -+ //restore_flags( ulFlags ); + spin_unlock_irqrestore(&bcm963xx_serial_lock, ulFlags); +} + @@ -8926,7 +8914,7 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + * Main output routine using polled I/O. + * ------------------------------------------------------------------- + */ -+static int bcm63xx_cons_write (struct tty_struct *tty, int from_user, ++static int bcm63xx_cons_write (struct tty_struct *tty, + const unsigned char *buf, int count) +{ + int c; @@ -8970,6 +8958,7 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + */ +static void bcm_flush_buffer (struct tty_struct *tty) +{ ++ tty_wakeup(tty); +} + +/* @@ -9343,6 +9332,7 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + + info = lines[line]; + ++ tty->low_latency=1; + info->port->intMask = 0; /* Clear any pending interrupts */ + info->port->intMask = RXINT; /* Enable RX */ + @@ -9372,6 +9362,25 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + return 0; +} + ++ ++static struct tty_operations rs_ops = { ++ .open = bcm63xx_cons_open, ++ .close = bcm63xx_cons_close, ++ .write = bcm63xx_cons_write, ++ .flush_chars = bcm63xx_cons_flush_chars, ++ .write_room = bcm63xx_cons_write_room, ++ .chars_in_buffer = bcm_chars_in_buffer, ++ .flush_buffer = bcm_flush_buffer, ++ .ioctl = bcm_ioctl, ++ .throttle = bcm_throttle, ++ .unthrottle = bcm_unthrottle, ++ .send_xchar = bcm_send_xchar, ++ .set_termios = bcm_set_termios, ++ .stop = bcm_stop, ++ .start = bcm_start, ++ .hangup = bcm_hangup, ++}; ++ +/* -------------------------------------------------------------------------- + Name: bcm63xx_serialinit + Purpose: Initialize our BCM63xx serial driver @@ -9383,49 +9392,29 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + + // Print the driver version information + printk(VER_STR); ++ serial_driver = alloc_tty_driver(BCM_NUM_UARTS); ++ if (!serial_driver) ++ return -ENOMEM; + -+ memset(&serial_driver, 0, sizeof(struct tty_driver)); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ serial_driver.owner = THIS_MODULE; -+ serial_driver.devfs_name = "tts/"; -+#endif -+ serial_driver.magic = TTY_DRIVER_MAGIC; -+ serial_driver.name = "ttyS"; -+ serial_driver.major = TTY_MAJOR; -+ serial_driver.minor_start = 64; -+ serial_driver.num = BCM_NUM_UARTS; -+ serial_driver.type = TTY_DRIVER_TYPE_SERIAL; -+ serial_driver.subtype = SERIAL_TYPE_NORMAL; -+ serial_driver.init_termios = tty_std_termios; -+ serial_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | CLOCAL; -+ serial_driver.flags = TTY_DRIVER_REAL_RAW; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -+ serial_driver.refcount = serial_refcount; -+ serial_driver.ttys = serial_table; -+#else -+ serial_driver.refcount = &serial_refcount; -+ serial_driver.table = serial_table; -+#endif ++ serial_driver->owner = THIS_MODULE; ++ serial_driver->devfs_name = "tts/"; ++// serial_driver.magic = TTY_DRIVER_MAGIC; ++ serial_driver->name = "ttyS"; ++ serial_driver->major = TTY_MAJOR; ++ serial_driver->minor_start = 64; ++// serial_driver.num = BCM_NUM_UARTS; ++ serial_driver->type = TTY_DRIVER_TYPE_SERIAL; ++ serial_driver->subtype = SERIAL_TYPE_NORMAL; ++ serial_driver->init_termios = tty_std_termios; ++ serial_driver->init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL; ++ serial_driver->flags = TTY_DRIVER_REAL_RAW; + -+ serial_driver.termios = serial_termios; -+ serial_driver.termios_locked = serial_termios_locked; -+ serial_driver.open = bcm63xx_cons_open; -+ serial_driver.close = bcm63xx_cons_close; -+ serial_driver.write = bcm63xx_cons_write; -+ serial_driver.flush_chars = bcm63xx_cons_flush_chars; -+ serial_driver.write_room = bcm63xx_cons_write_room; -+ serial_driver.chars_in_buffer = bcm_chars_in_buffer; -+ serial_driver.flush_buffer = bcm_flush_buffer; -+ serial_driver.ioctl = bcm_ioctl; -+ serial_driver.throttle = bcm_throttle; -+ serial_driver.unthrottle = bcm_unthrottle; -+ serial_driver.send_xchar = bcm_send_xchar; -+ serial_driver.set_termios = bcm_set_termios; -+ serial_driver.stop = bcm_stop; -+ serial_driver.start = bcm_start; -+ serial_driver.hangup = bcm_hangup; ++ serial_driver->termios = serial_termios; ++ serial_driver->termios_locked = serial_termios_locked; ++ ++ tty_set_operations(serial_driver, &rs_ops); + -+ if (tty_register_driver (&serial_driver)) ++ if (tty_register_driver (serial_driver)) + panic("Couldn't register serial driver\n"); + + //save_flags(flags); cli(); @@ -9435,17 +9424,18 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + { + info = &multi[i]; + lines[i] = info; ++ info->magic = SERIAL_MAGIC; + info->port = (Uart *) ((char *)UART_BASE + (i * 0x20)); ++ info->tty = 0; + info->irq = (2 - i) + 8; + info->line = i; -+ info->tty = 0; + info->close_delay = 50; + info->closing_wait = 3000; + info->x_char = 0; + info->event = 0; + info->count = 0; + info->blocked_open = 0; -+ info->normal_termios = serial_driver.init_termios; ++ info->normal_termios = serial_driver->init_termios; + init_waitqueue_head(&info->open_wait); + init_waitqueue_head(&info->close_wait); + @@ -9461,7 +9451,6 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + * is updated... in request_irq - to immediatedly obliterate + * it is unwise. + */ -+ //restore_flags(flags); + spin_unlock_irqrestore(&bcm963xx_serial_lock, flags); + return 0; +} @@ -9491,7 +9480,7 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux +static struct tty_driver * bcm_console_device(struct console * c, int *index) +{ + *index = c->index; -+ return &serial_driver; ++ return serial_driver; +} + +static int __init bcm_console_setup(struct console * co, char * options) @@ -9504,7 +9493,7 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux + .write = bcm_console_print, + .device = bcm_console_device, + .setup = bcm_console_setup, -+ .flags = CON_PRINTBUFFER, // CON_CONSDEV, CONSOLE_LINE, ++ .flags = CON_PRINTBUFFER, + .index = -1, +}; + @@ -9515,3209 +9504,14 @@ diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/bcm63xx_cons.c linux +} + +console_initcall(bcm63xx_console_init); -diff -urN linux.old/bcmdrivers/opensource/char/serial/impl1/Makefile linux.dev/bcmdrivers/opensource/char/serial/impl1/Makefile ---- linux.old/bcmdrivers/opensource/char/serial/impl1/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/bcmdrivers/opensource/char/serial/impl1/Makefile 2006-08-25 00:39:38.000000000 +0200 -@@ -0,0 +1,13 @@ -+# File: bcmdrivers/opensource/char/serial -+# -+# Makefile for the BCM63xx serial/console driver -+ +diff -urN linux.old/drivers/serial/Makefile linux.dev/drivers/serial/Makefile +--- linux.old/drivers/serial/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux.dev/drivers/serial/Makefile 2006-08-25 15:38:44.000000000 +0200 +@@ -55,3 +55,4 @@ + obj-$(CONFIG_SERIAL_SGI_IOC4) += ioc4_serial.o + obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o + obj-$(CONFIG_SERIAL_AT91) += at91_serial.o +obj-$(CONFIG_BCM_SERIAL) += bcm63xx_cons.o -+ -+EXTRA_CFLAGS += -I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) -+ -+-include $(TOPDIR)/Rules.make -+ -+clean: -+ rm -f core *.o *.a *.s -+ -diff -urN linux.old/boardparms/bcm963xx/boardparms.c linux.dev/boardparms/bcm963xx/boardparms.c ---- linux.old/boardparms/bcm963xx/boardparms.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/boardparms/bcm963xx/boardparms.c 2006-08-25 00:39:38.000000000 +0200 -@@ -0,0 +1,2392 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.c -+ * -+ * Description: This file contains the implementation for the BCM63xx board -+ * parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+/* Includes. */ -+#include <linux/config.h> -+#include "boardparms.h" -+ -+/* Defines. */ -+ -+/* Default psi size in K bytes */ -+#define BP_PSI_DEFAULT_SIZE 24 -+ -+/* Typedefs */ -+typedef struct boardparameters -+{ -+ char szBoardId[BP_BOARD_ID_LEN]; /* board id string */ -+ ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS]; -+ VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP]; -+ unsigned short usSdramSize; /* SDRAM size and type */ -+ unsigned short usPsiSize; /* persistent storage in K bytes */ -+ unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */ -+ unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */ -+ unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */ -+ unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */ -+ unsigned short usGpioUartRts; /* GPIO pin or not defined */ -+ unsigned short usGpioUartCts; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdsl; /* GPIO pin or not defined */ -+ unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWireless; /* GPIO pin or not defined */ -+ unsigned short usGpioLedUsb; /* GPIO pin or not defined */ -+ unsigned short usGpioLedHpna; /* GPIO pin or not defined */ -+ unsigned short usGpioLedWanData; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPpp; /* GPIO pin or not defined */ -+ unsigned short usGpioLedPppFail; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */ -+ unsigned short usGpioLedBlStop; /* GPIO pin or not defined */ -+ unsigned short usExtIntrWireless; /* ext intr or not defined */ -+ unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */ -+ unsigned short usExtIntrHpna; /* ext intr or not defined */ -+ unsigned short usCsHpna; /* chip select not defined */ -+ unsigned short usAntInUseWireless; /* antenna in use or not defined */ -+ unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */ -+ unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */ -+ unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */ -+} BOARD_PARAMETERS, *PBOARD_PARAMETERS; -+ -+/* Variables */ -+#if defined(_BCM96338_) || defined(CONFIG_BCM96338) -+static BOARD_PARAMETERS g_bcm96338sv = -+{ -+ "96338SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static BOARD_PARAMETERS g_bcm96338l2m8m = -+{ -+ "96338L-2M-8M", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96338sv, &g_bcm96338l2m8m, 0}; -+#endif -+ -+#if defined(_BCM96345_) || defined(CONFIG_BCM96345) -+static BOARD_PARAMETERS g_bcm96345r = -+{ -+ "96345R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw2 = -+{ -+ /* A hardware jumper determines whether GPIO 13 is used for Press and Hold -+ * Reset or RTS. -+ */ -+ "96345GW2", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_GPIO_0_AH, /* usGpioPhySpiSck */ -+ BP_GPIO_4_AH, /* usGpioPhySpiSs */ -+ BP_GPIO_12_AH, /* usGpioPhySpiMosi */ -+ BP_GPIO_11_AH, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_GPIO, /* usConfigType */ -+ BP_ENET_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_GPIO_13_AH, /* usGpioUartRts */ -+ BP_GPIO_9_AH, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_7_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345gw = -+{ -+ "96345GW", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_1, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_15_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_1_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_GPIO_2_AH, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_GPIO_10_AH, /* usGpioLedWireless */ -+ BP_GPIO_7_AH, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_10_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_EXT_INTR_2, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_EXT_INTR_3, /* usExtIntrHpna */ -+ BP_CS_1, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96335r = -+{ -+ "96335R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_14_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_9_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_8_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_9_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345r0 = -+{ -+ "96345R0", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_9_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_9_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_8_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96345rs = -+{ -+ "96345RS", /* szBoardId */ -+ {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_ENET_NO_REVERSE_MII}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_GPIO_11_AH, /* usGpioRj11InnerPair */ -+ BP_GPIO_12_AH, /* usGpioRj11OuterPair */ -+ BP_GPIO_13_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_GPIO_8_AH, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_8_AH, /* usGpioLedWanData */ -+ BP_GPIO_9_AH, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_GPIO_10_AH, /* usGpioLedBlAlarm */ -+ BP_GPIO_9_AH, /* usGpioLedBlResetCfg */ -+ BP_GPIO_8_AH, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0, -+ &g_bcm96345rs, 0}; -+#endif -+ -+#if defined(_BCM96348_) || defined(CONFIG_BCM96348) -+ -+static BOARD_PARAMETERS g_bcm96348r = -+{ -+ "96348R", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY}}, /* ucPhyType */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_8MB_1_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348lv = -+{ -+ "96348LV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x02, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_GPIO_5_AL, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_7_AH, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw = -+{ -+ "96348GW", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_10 = -+{ -+ "96348GW-10", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_6_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348gw_11 = -+{ -+ "96348GW-11", /* szBoardId */ -+ {{BP_ENET_NO_PHY}, /* ucPhyType */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x04, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static BOARD_PARAMETERS g_bcm96348sv = -+{ -+ "96348SV", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_PHY, /* ucPhyType */ -+ 0x1f, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}}, /* usReverseMii */ -+ {{BP_VOIP_NO_DSP}, /* ucDspType */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_32MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_NOT_DEFINED, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_NOT_DEFINED, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_NOT_DEFINED, /* usGpioLedWanData */ -+ BP_NOT_DEFINED, /* usGpioLedPpp */ -+ BP_NOT_DEFINED, /* usGpioLedPppFail */ -+ BP_NOT_DEFINED, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_NOT_DEFINED, /* usGpioLedBlResetCfg */ -+ BP_NOT_DEFINED, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcm96348gw_dualDsp = -+{ -+ "96348GW-DualDSP", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x03, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_UNEQUIPPED, /* usGpioVoipReset */ -+ BP_GPIO_34_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_DSP, /* ucDspType */ -+ 0x01, /* ucDspAddress */ -+ BP_EXT_INTR_3, /* usExtIntrVoip */ -+ BP_UNEQUIPPED , /* usGpioVoipReset */ -+ BP_GPIO_35_AH, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_3}}, /* usCsVoip */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_WLAN_ANT_MAIN, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+ -+static BOARD_PARAMETERS g_bcmCustom_01 = -+{ -+ "BCMCUST_01", /* szBoardId */ -+ {{BP_ENET_INTERNAL_PHY, /* ucPhyType */ -+ 0x01, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_MDIO, /* usConfigType */ -+ BP_NOT_DEFINED}, /* usReverseMii */ -+ {BP_ENET_NO_PHY, /* ucPhyType */ -+ 0x00, /* ucPhyAddress */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSck */ -+ BP_NOT_DEFINED, /* usGpioPhySpiSs */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMosi */ -+ BP_NOT_DEFINED, /* usGpioPhySpiMiso */ -+ BP_NOT_DEFINED, /* usGpioPhyReset */ -+ 0x01, /* numSwitchPorts */ -+ BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */ -+ BP_ENET_REVERSE_MII}}, /* usReverseMii */ -+ {{BP_VOIP_DSP, /* ucDspType */ -+ 0x00, /* ucDspAddress */ -+ BP_EXT_INTR_2, /* usExtIntrVoip */ -+ BP_GPIO_36_AH, /* usGpioVoipReset */ -+ BP_GPIO_34_AL, /* usGpioVoipIntr */ -+ BP_NOT_DEFINED, /* usGpioLedVoip */ -+ BP_CS_2}, /* usCsVoip */ -+ {BP_VOIP_NO_DSP}}, /* ucDspType */ -+ BP_MEMORY_16MB_2_CHIP, /* usSdramSize */ -+ BP_PSI_DEFAULT_SIZE, /* usPsiSize */ -+ BP_NOT_DEFINED, /* usGpioRj11InnerPair */ -+ BP_NOT_DEFINED, /* usGpioRj11OuterPair */ -+ BP_GPIO_33_AL, /* usGpioPressAndHoldReset */ -+ BP_NOT_DEFINED, /* usGpioPcmciaReset */ -+ BP_NOT_DEFINED, /* usGpioUartRts */ -+ BP_NOT_DEFINED, /* usGpioUartCts */ -+ BP_NOT_DEFINED, /* usGpioLedAdsl */ -+ BP_GPIO_2_AL, /* usGpioLedAdslFail */ -+ BP_NOT_DEFINED, /* usGpioLedWireless */ -+ BP_NOT_DEFINED, /* usGpioLedUsb */ -+ BP_NOT_DEFINED, /* usGpioLedHpna */ -+ BP_GPIO_3_AL, /* usGpioLedWanData */ -+ BP_GPIO_3_AL, /* usGpioLedPpp */ -+ BP_GPIO_4_AL, /* usGpioLedPppFail */ -+ BP_GPIO_0_AL, /* usGpioLedBlPowerOn */ -+ BP_NOT_DEFINED, /* usGpioLedBlAlarm */ -+ BP_GPIO_3_AL, /* usGpioLedBlResetCfg */ -+ BP_GPIO_1_AL, /* usGpioLedBlStop */ -+ BP_NOT_DEFINED, /* usExtIntrWireless */ -+ BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */ -+ BP_NOT_DEFINED, /* usExtIntrHpna */ -+ BP_NOT_DEFINED, /* usCsHpna */ -+ BP_NOT_DEFINED, /* usAntInUseWireless */ -+ BP_NOT_DEFINED, /* usGpioSesBtnWireless */ -+ BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */ -+ BP_NOT_DEFINED /* usGpioLedSesWireless */ -+}; -+ -+static PBOARD_PARAMETERS g_BoardParms[] = -+ {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10, -+ &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp, -+ &g_bcmCustom_01, 0}; -+#endif -+ -+static PBOARD_PARAMETERS g_pCurrentBp = 0; -+ -+/************************************************************************** -+ * Name : bpstrcmp -+ * -+ * Description: String compare for this file so it does not depend on an OS. -+ * (Linux kernel and CFE share this source file.) -+ * -+ * Parameters : [IN] dest - destination string -+ * [IN] src - source string -+ * -+ * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src -+ ***************************************************************************/ -+static int bpstrcmp(const char *dest,const char *src); -+static int bpstrcmp(const char *dest,const char *src) -+{ -+ while (*src && *dest) -+ { -+ if (*dest < *src) return -1; -+ if (*dest > *src) return 1; -+ dest++; -+ src++; -+ } -+ -+ if (*dest && !*src) return 1; -+ if (!*dest && *src) return -1; -+ return 0; -+} /* bpstrcmp */ -+ -+/************************************************************************** -+ * Name : BpGetVoipDspConfig -+ * -+ * Description: Gets the DSP configuration from the board parameter -+ * structure for a given DSP index. -+ * -+ * Parameters : [IN] dspNum - DSP index (number) -+ * -+ * Returns : Pointer to DSP configuration block if found/valid, NULL -+ * otherwise. -+ ***************************************************************************/ -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ); -+VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum ) -+{ -+ VOIP_DSP_INFO *pDspConfig = 0; -+ int i; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ ) -+ { -+ if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP && -+ g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum ) -+ { -+ pDspConfig = &g_pCurrentBp->VoIPDspInfo[i]; -+ break; -+ } -+ } -+ } -+ -+ return pDspConfig; -+} -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ) -+{ -+ int nRet = BP_BOARD_ID_NOT_FOUND; -+ PBOARD_PARAMETERS *ppBp; -+ -+ for( ppBp = g_BoardParms; *ppBp; ppBp++ ) -+ { -+ if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) ) -+ { -+ g_pCurrentBp = *ppBp; -+ nRet = BP_SUCCESS; -+ break; -+ } -+ } -+ -+ return( nRet ); -+} /* BpSetBoardId */ -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ) -+{ -+ PBOARD_PARAMETERS *ppBp; -+ int i; -+ char *src; -+ char *dest; -+ -+ for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize; -+ i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN ) -+ { -+ dest = pszBoardIds; -+ src = (*ppBp)->szBoardId; -+ while( *src ) -+ *dest++ = *src++; -+ *dest = '\0'; -+ } -+ -+ return( i ); -+} /* BpGetBoardIds */ -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ) -+{ -+ int i, nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ { -+ if( i < BP_MAX_ENET_MACS ) -+ { -+ unsigned char *src = (unsigned char *) -+ &g_pCurrentBp->EnetMacInfos[i]; -+ unsigned char *dest = (unsigned char *) pEnetInfos; -+ int len = sizeof(ETHERNET_MAC_INFO); -+ while( len-- ) -+ *dest++ = *src++; -+ } -+ else -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ } -+ -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ ) -+ pEnetInfos->ucPhyType = BP_ENET_NO_PHY; -+ -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetEthernetMacInfo */ -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulSdramSize = g_pCurrentBp->usSdramSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulSdramSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetSdramSize */ -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulPsiSize = g_pCurrentBp->usPsiSize; -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ *pulPsiSize = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPsiSize */ -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusInner = g_pCurrentBp->usGpioRj11InnerPair; -+ *pusOuter = g_pCurrentBp->usGpioRj11OuterPair; -+ -+ if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusInner = *pusOuter = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetRj11InnerOuterPairGpios */ -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPressAndHoldReset; -+ -+ if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPressAndHoldResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipReset; -+ -+ if( *pusValue != BP_NOT_DEFINED || -+ *pusValue == BP_UNEQUIPPED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioVoipIntr; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipIntrGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioPcmciaReset; -+ -+ if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPcmciaResetGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, board id input string does not -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusRts = g_pCurrentBp->usGpioUartRts; -+ *pusCts = g_pCurrentBp->usGpioUartCts; -+ -+ if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED && -+ g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusRts = *pusCts = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUartRtsCtsGpios */ -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdsl; -+ -+ if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedAdslFail; -+ -+ if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWireless; -+ -+ if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usAntInUseWireless; -+ -+ if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessAntInUse */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioSesBtnWireless; -+ -+ if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessSesBtnGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless; -+ -+ if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedSesWireless; -+ -+ if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+ -+} /* BpGetWirelessSesLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedUsb; -+ -+ if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetUsbLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedHpna; -+ -+ if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedWanData; -+ -+ if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWanDataLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPpp; -+ -+ if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedPppFail; -+ -+ if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetPppFailLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlPowerOn; -+ -+ if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderPowerOn */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlAlarm; -+ -+ if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderAlarmLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlResetCfg; -+ -+ if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderResetCfgLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pusValue = g_pCurrentBp->usGpioLedBlStop; -+ -+ if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetBootloaderStopLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ * -+ * Note : The VoIP structure would allow for having one LED per DSP -+ * however, the board initialization function assumes only one -+ * LED per functionality (ie one LED for VoIP). Therefore in -+ * order to keep this tidy and simple we do not make usage of the -+ * one-LED-per-DSP function. Instead, we assume that the LED for -+ * VoIP is unique and associated with DSP 0 (always present on -+ * any VoIP platform). If changing this to a LED-per-DSP function -+ * then one need to update the board initialization driver in -+ * bcmdrivers\opensource\char\board\bcm963xx\impl1 -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 ); -+ -+ if( pDspInfo ) -+ { -+ *pusValue = pDspInfo->usGpioLedVoip; -+ -+ if( *pusValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pusValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipLedGpio */ -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrWireless; -+ -+ if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetWirelessExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp; -+ -+ if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetAdslDyingGaspExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usExtIntrVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usExtIntrHpna; -+ -+ if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaExtIntr */ -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ *pulValue = g_pCurrentBp->usCsHpna; -+ -+ if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetHpnaChipSelect */ -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ) -+{ -+ int nRet; -+ -+ if( g_pCurrentBp ) -+ { -+ VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum ); -+ -+ if( pDspInfo ) -+ { -+ *pulValue = pDspInfo->usCsVoip; -+ -+ if( *pulValue != BP_NOT_DEFINED ) -+ { -+ nRet = BP_SUCCESS; -+ } -+ else -+ { -+ nRet = BP_VALUE_NOT_DEFINED; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_FOUND; -+ } -+ } -+ else -+ { -+ *pulValue = BP_NOT_DEFINED; -+ nRet = BP_BOARD_ID_NOT_SET; -+ } -+ -+ return( nRet ); -+} /* BpGetVoipChipSelect */ -+ -diff -urN linux.old/boardparms/bcm963xx/boardparms.h linux.dev/boardparms/bcm963xx/boardparms.h ---- linux.old/boardparms/bcm963xx/boardparms.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/boardparms/bcm963xx/boardparms.h 2006-08-25 00:39:38.000000000 +0200 -@@ -0,0 +1,766 @@ -+/* -+<:copyright-gpl -+ -+ Copyright 2003 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. -+ -+:> -+*/ -+/************************************************************************** -+ * File Name : boardparms.h -+ * -+ * Description: This file contains definitions and function prototypes for -+ * the BCM63xx board parameter access functions. -+ * -+ * Updates : 07/14/2003 Created. -+ ***************************************************************************/ -+ -+#if !defined(_BOARDPARMS_H) -+#define _BOARDPARMS_H -+ -+#if __cplusplus -+extern "C" { -+#endif -+ -+/* Return codes. */ -+#define BP_SUCCESS 0 -+#define BP_BOARD_ID_NOT_FOUND 1 -+#define BP_VALUE_NOT_DEFINED 2 -+#define BP_BOARD_ID_NOT_SET 3 -+ -+/* Values for BpGetSdramSize. */ -+#define BP_MEMORY_8MB_1_CHIP 0 -+#define BP_MEMORY_16MB_1_CHIP 1 -+#define BP_MEMORY_32MB_1_CHIP 2 -+#define BP_MEMORY_64MB_2_CHIP 3 -+#define BP_MEMORY_32MB_2_CHIP 4 -+#define BP_MEMORY_16MB_2_CHIP 5 -+ -+/* Values for EthernetMacInfo PhyType. */ -+#define BP_ENET_NO_PHY 0 -+#define BP_ENET_INTERNAL_PHY 1 -+#define BP_ENET_EXTERNAL_PHY 2 -+#define BP_ENET_EXTERNAL_SWITCH 3 -+ -+/* Values for EthernetMacInfo Configuration type. */ -+#define BP_ENET_CONFIG_MDIO 0 /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */ -+#define BP_ENET_CONFIG_GPIO 1 /* Bcm96345GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_MDIO_PSEUDO_PHY 2 /* Bcm96348GW board + Bcm5325E */ -+#define BP_ENET_CONFIG_SPI_SSB_0 3 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_1 4 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_2 5 /* Bcm96348GW board + Bcm5325M/E */ -+#define BP_ENET_CONFIG_SPI_SSB_3 6 /* Bcm96348GW board + Bcm5325M/E */ -+ -+/* Values for EthernetMacInfo Reverse MII. */ -+#define BP_ENET_NO_REVERSE_MII 0 -+#define BP_ENET_REVERSE_MII 1 -+ -+/* Values for VoIPDSPInfo DSPType. */ -+#define BP_VOIP_NO_DSP 0 -+#define BP_VOIP_DSP 1 -+ -+ -+/* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */ -+#define BP_ACTIVE_MASK 0x8000 -+#define BP_ACTIVE_HIGH 0x0000 -+#define BP_ACTIVE_LOW 0x8000 -+#define BP_GPIO_0_AH (0 | BP_ACTIVE_HIGH) -+#define BP_GPIO_0_AL (0 | BP_ACTIVE_LOW) -+#define BP_GPIO_1_AH (1 | BP_ACTIVE_HIGH) -+#define BP_GPIO_1_AL (1 | BP_ACTIVE_LOW) -+#define BP_GPIO_2_AH (2 | BP_ACTIVE_HIGH) -+#define BP_GPIO_2_AL (2 | BP_ACTIVE_LOW) -+#define BP_GPIO_3_AH (3 | BP_ACTIVE_HIGH) -+#define BP_GPIO_3_AL (3 | BP_ACTIVE_LOW) -+#define BP_GPIO_4_AH (4 | BP_ACTIVE_HIGH) -+#define BP_GPIO_4_AL (4 | BP_ACTIVE_LOW) -+#define BP_GPIO_5_AH (5 | BP_ACTIVE_HIGH) -+#define BP_GPIO_5_AL (5 | BP_ACTIVE_LOW) -+#define BP_GPIO_6_AH (6 | BP_ACTIVE_HIGH) -+#define BP_GPIO_6_AL (6 | BP_ACTIVE_LOW) -+#define BP_GPIO_7_AH (7 | BP_ACTIVE_HIGH) -+#define BP_GPIO_7_AL (7 | BP_ACTIVE_LOW) -+#define BP_GPIO_8_AH (8 | BP_ACTIVE_HIGH) -+#define BP_GPIO_8_AL (8 | BP_ACTIVE_LOW) -+#define BP_GPIO_9_AH (9 | BP_ACTIVE_HIGH) -+#define BP_GPIO_9_AL (9 | BP_ACTIVE_LOW) -+#define BP_GPIO_10_AH (10 | BP_ACTIVE_HIGH) -+#define BP_GPIO_10_AL (10 | BP_ACTIVE_LOW) -+#define BP_GPIO_11_AH (11 | BP_ACTIVE_HIGH) -+#define BP_GPIO_11_AL (11 | BP_ACTIVE_LOW) -+#define BP_GPIO_12_AH (12 | BP_ACTIVE_HIGH) -+#define BP_GPIO_12_AL (12 | BP_ACTIVE_LOW) -+#define BP_GPIO_13_AH (13 | BP_ACTIVE_HIGH) -+#define BP_GPIO_13_AL (13 | BP_ACTIVE_LOW) -+#define BP_GPIO_14_AH (14 | BP_ACTIVE_HIGH) -+#define BP_GPIO_14_AL (14 | BP_ACTIVE_LOW) -+#define BP_GPIO_15_AH (15 | BP_ACTIVE_HIGH) -+#define BP_GPIO_15_AL (15 | BP_ACTIVE_LOW) -+#define BP_GPIO_16_AH (16 | BP_ACTIVE_HIGH) -+#define BP_GPIO_16_AL (16 | BP_ACTIVE_LOW) -+#define BP_GPIO_17_AH (17 | BP_ACTIVE_HIGH) -+#define BP_GPIO_17_AL (17 | BP_ACTIVE_LOW) -+#define BP_GPIO_18_AH (18 | BP_ACTIVE_HIGH) -+#define BP_GPIO_18_AL (18 | BP_ACTIVE_LOW) -+#define BP_GPIO_19_AH (19 | BP_ACTIVE_HIGH) -+#define BP_GPIO_19_AL (19 | BP_ACTIVE_LOW) -+#define BP_GPIO_20_AH (20 | BP_ACTIVE_HIGH) -+#define BP_GPIO_20_AL (20 | BP_ACTIVE_LOW) -+#define BP_GPIO_21_AH (21 | BP_ACTIVE_HIGH) -+#define BP_GPIO_21_AL (21 | BP_ACTIVE_LOW) -+#define BP_GPIO_22_AH (22 | BP_ACTIVE_HIGH) -+#define BP_GPIO_22_AL (22 | BP_ACTIVE_LOW) -+#define BP_GPIO_23_AH (23 | BP_ACTIVE_HIGH) -+#define BP_GPIO_23_AL (23 | BP_ACTIVE_LOW) -+#define BP_GPIO_24_AH (24 | BP_ACTIVE_HIGH) -+#define BP_GPIO_24_AL (24 | BP_ACTIVE_LOW) -+#define BP_GPIO_25_AH (25 | BP_ACTIVE_HIGH) -+#define BP_GPIO_25_AL (25 | BP_ACTIVE_LOW) -+#define BP_GPIO_26_AH (26 | BP_ACTIVE_HIGH) -+#define BP_GPIO_26_AL (26 | BP_ACTIVE_LOW) -+#define BP_GPIO_27_AH (27 | BP_ACTIVE_HIGH) -+#define BP_GPIO_27_AL (27 | BP_ACTIVE_LOW) -+#define BP_GPIO_28_AH (28 | BP_ACTIVE_HIGH) -+#define BP_GPIO_28_AL (28 | BP_ACTIVE_LOW) -+#define BP_GPIO_29_AH (29 | BP_ACTIVE_HIGH) -+#define BP_GPIO_29_AL (29 | BP_ACTIVE_LOW) -+#define BP_GPIO_30_AH (30 | BP_ACTIVE_HIGH) -+#define BP_GPIO_30_AL (30 | BP_ACTIVE_LOW) -+#define BP_GPIO_31_AH (31 | BP_ACTIVE_HIGH) -+#define BP_GPIO_31_AL (31 | BP_ACTIVE_LOW) -+#define BP_GPIO_32_AH (32 | BP_ACTIVE_HIGH) -+#define BP_GPIO_32_AL (32 | BP_ACTIVE_LOW) -+#define BP_GPIO_33_AH (33 | BP_ACTIVE_HIGH) -+#define BP_GPIO_33_AL (33 | BP_ACTIVE_LOW) -+#define BP_GPIO_34_AH (34 | BP_ACTIVE_HIGH) -+#define BP_GPIO_34_AL (34 | BP_ACTIVE_LOW) -+#define BP_GPIO_35_AH (35 | BP_ACTIVE_HIGH) -+#define BP_GPIO_35_AL (35 | BP_ACTIVE_LOW) -+#define BP_GPIO_36_AH (36 | BP_ACTIVE_HIGH) -+#define BP_GPIO_36_AL (36 | BP_ACTIVE_LOW) -+ -+/* Values for external interrupt assignments. */ -+#define BP_EXT_INTR_0 0 -+#define BP_EXT_INTR_1 1 -+#define BP_EXT_INTR_2 2 -+#define BP_EXT_INTR_3 3 -+ -+/* Values for chip select assignments. */ -+#define BP_CS_0 0 -+#define BP_CS_1 1 -+#define BP_CS_2 2 -+#define BP_CS_3 3 -+ -+/* Value for GPIO and external interrupt fields that are not used. */ -+#define BP_NOT_DEFINED 0xffff -+#define BP_HW_DEFINED 0xfff0 -+#define BP_UNEQUIPPED 0xfff1 -+ -+/* Maximum size of the board id string. */ -+#define BP_BOARD_ID_LEN 16 -+ -+/* Maximum number of Ethernet MACs. */ -+#define BP_MAX_ENET_MACS 2 -+ -+/* Maximum number of VoIP DSPs. */ -+#define BP_MAX_VOIP_DSP 2 -+ -+/* Wireless Antenna Settings. */ -+#define BP_WLAN_ANT_MAIN 0 -+#define BP_WLAN_ANT_AUX 1 -+#define BP_WLAN_ANT_BOTH 3 -+ -+#if !defined(__ASSEMBLER__) -+ -+/* Information about an Ethernet MAC. If ucPhyType is BP_ENET_NO_PHY, -+ * then the other fields are not valid. -+ */ -+typedef struct EthernetMacInfo -+{ -+ unsigned char ucPhyType; /* BP_ENET_xxx */ -+ unsigned char ucPhyAddress; /* 0 to 31 */ -+ unsigned short usGpioPhySpiSck; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiSs; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMosi; /* GPIO pin or not defined */ -+ unsigned short usGpioPhySpiMiso; /* GPIO pin or not defined */ -+ unsigned short usGpioPhyReset; /* GPIO pin or not defined (96348LV) */ -+ unsigned short numSwitchPorts; /* Number of PHY ports */ -+ unsigned short usConfigType; /* Configuration type */ -+ unsigned short usReverseMii; /* Reverse MII */ -+} ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO; -+ -+ -+/* Information about VoIP DSPs. If ucDspType is BP_VOIP_NO_DSP, -+ * then the other fields are not valid. -+ */ -+typedef struct VoIPDspInfo -+{ -+ unsigned char ucDspType; -+ unsigned char ucDspAddress; -+ unsigned short usExtIntrVoip; -+ unsigned short usGpioVoipReset; -+ unsigned short usGpioVoipIntr; -+ unsigned short usGpioLedVoip; -+ unsigned short usCsVoip; -+ -+} VOIP_DSP_INFO; -+ -+ -+/************************************************************************** -+ * Name : BpSetBoardId -+ * -+ * Description: This function find the BOARD_PARAMETERS structure for the -+ * specified board id string and assigns it to a global, static -+ * variable. -+ * -+ * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not -+ * have a board parameters configuration record. -+ ***************************************************************************/ -+int BpSetBoardId( char *pszBoardId ); -+ -+/************************************************************************** -+ * Name : BpGetBoardIds -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id -+ * strings are returned in. Each id starts at BP_BOARD_ID_LEN -+ * boundary. -+ * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that -+ * were allocated in pszBoardIds. -+ * -+ * Returns : Number of board id strings returned. -+ ***************************************************************************/ -+int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize ); -+ -+/************************************************************************** -+ * Name : BpGetEthernetMacInfo -+ * -+ * Description: This function returns all of the supported board id strings. -+ * -+ * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO -+ * buffers. -+ * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that -+ * are pointed to by pEnetInfos. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos ); -+ -+/************************************************************************** -+ * Name : BpGetSdramSize -+ * -+ * Description: This function returns a constant that describees the board's -+ * SDRAM type and size. -+ * -+ * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size -+ * is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetSdramSize( unsigned long *pulSdramSize ); -+ -+/************************************************************************** -+ * Name : BpGetPsiSize -+ * -+ * Description: This function returns the persistent storage size in K bytes. -+ * -+ * Parameters : [OUT] pulPsiSize - Address of short word that the persistent -+ * storage size is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ ***************************************************************************/ -+int BpGetPsiSize( unsigned long *pulPsiSize ); -+ -+/************************************************************************** -+ * Name : BpGetRj11InnerOuterPairGpios -+ * -+ * Description: This function returns the GPIO pin assignments for changing -+ * between the RJ11 inner pair and RJ11 outer pair. -+ * -+ * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair -+ * GPIO pin is returned in. -+ * [OUT] pusOuter - Address of short word that the RJ11 outer pair -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner, -+ unsigned short *pusOuter ); -+ -+/************************************************************************** -+ * Name : BpGetPressAndHoldResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the press -+ * and hold reset button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the press and hold -+ * reset button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPressAndHoldResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP reset -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipIntrGpio -+ * -+ * Description: This function returns the GPIO pin assignment for VoIP interrupt. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt -+ * GPIO pin is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPcmciaResetGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PCMCIA -+ * Reset operation. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPcmciaResetGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUartRtsCtsGpios -+ * -+ * Description: This function returns the GPIO pin assignments for RTS and CTS -+ * UART signals. -+ * -+ * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO -+ * pin is returned in. -+ * [OUT] pusCts - Address of short word that the UART CTS GPIO -+ * pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, values are returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts ); -+ -+/************************************************************************** -+ * Name : BpGetAdslLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the ADSL -+ * LED that is used when there is a DSL connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the ADSL LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessAntInUse -+ * -+ * Description: This function returns the antennas in use for wireless -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna -+ * is in use. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessAntInUse( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesBtnGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Button GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesBtnGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesExtIntr -+ * -+ * Description: This function returns the external interrupt number for the -+ * Wireless Ses Button. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * external interrup is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesExtIntr( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessSesLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the Wireless -+ * Ses Led. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses -+ * Led GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessSesLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetUsbLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the USB -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the USB LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetUsbLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the HPNA -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the HPNA LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWanDataLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the WAN Data -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWanDataLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetPppFailLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the PPP -+ * LED that is used when there is a PPP connection failure. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the PPP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetPppFailLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the VOIP -+ * LED. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the VOIP LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderPowerOnLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the power -+ * on LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderAlarmLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the alarm -+ * LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the alarm LED -+ * GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderResetCfgLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the reset -+ * configuration LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the reset -+ * configuration LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetBootloaderStopLedGpio -+ * -+ * Description: This function returns the GPIO pin assignment for the break -+ * into bootloader LED that is set by the bootloader. -+ * -+ * Parameters : [OUT] pusValue - Address of short word that the break into -+ * bootloader LED GPIO pin is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetBootloaderStopLedGpio( unsigned short *pusValue ); -+ -+/************************************************************************** -+ * Name : BpGetWirelessExtIntr -+ * -+ * Description: This function returns the Wireless external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the wireless -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetWirelessExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetAdslDyingGaspExtIntr -+ * -+ * Description: This function returns the ADSL Dying Gasp external interrupt -+ * number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipExtIntr -+ * -+ * Description: This function returns the VOIP external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * external interrupt number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaExtIntr -+ * -+ * Description: This function returns the HPNA external interrupt number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * external interrupt number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaExtIntr( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetHpnaChipSelect -+ * -+ * Description: This function returns the HPNA chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the HPNA -+ * chip select number is returned in. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetHpnaChipSelect( unsigned long *pulValue ); -+ -+/************************************************************************** -+ * Name : BpGetVoipChipSelect -+ * -+ * Description: This function returns the VOIP chip select number. -+ * -+ * Parameters : [OUT] pulValue - Address of short word that the VOIP -+ * chip select number is returned in. -+ * [IN] dspNum - Address of the DSP to query. -+ * -+ * Returns : BP_SUCCESS - Success, value is returned. -+ * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called. -+ * BP_VALUE_NOT_DEFINED - At least one return value is not defined -+ * for the board. -+ ***************************************************************************/ -+int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue ); -+ -+#endif /* __ASSEMBLER__ */ -+ -+#if __cplusplus -+} -+#endif -+ -+#endif /* _BOARDPARMS_H */ -+ -diff -urN linux.old/boardparms/bcm963xx/Makefile linux.dev/boardparms/bcm963xx/Makefile ---- linux.old/boardparms/bcm963xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/boardparms/bcm963xx/Makefile 2006-08-25 00:39:38.000000000 +0200 -@@ -0,0 +1,16 @@ -+ -+ifeq ($(CONFIG_MIPS_BRCM),y) -+ -+# Linux -+obj-y += boardparms.o -+EXTRA_CFLAGS += -DCONFIG_BCM9$(BRCM_CHIP) -+-include $(TOPDIR)/Rules.make -+ -+else -+ -+# CFE -+BSPOBJS += boardparms.o -+ -+endif -+ -+ diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h --- linux.old/include/asm-mips/bootinfo.h 2006-08-25 00:43:22.000000000 +0200 +++ linux.dev/include/asm-mips/bootinfo.h 2006-08-25 00:39:38.000000000 +0200 From 354c823240c4dba829d3f2b7613500ea74bb42bc Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 25 Aug 2006 18:23:35 +0000 Subject: [PATCH 515/757] update devfs patches SVN-Revision: 4669 --- .../patches/000-reenable_devfs.patch | 515 +++++++++++++++++- 1 file changed, 507 insertions(+), 8 deletions(-) diff --git a/openwrt/target/linux/generic-2.6/patches/000-reenable_devfs.patch b/openwrt/target/linux/generic-2.6/patches/000-reenable_devfs.patch index ce98def5dae..7871c4c3780 100644 --- a/openwrt/target/linux/generic-2.6/patches/000-reenable_devfs.patch +++ b/openwrt/target/linux/generic-2.6/patches/000-reenable_devfs.patch @@ -48,14 +48,6 @@ diff -ur linux-2.6.15-rc5/drivers/mtd/mtd_blkdevs.c linux-2.6.15-rc5-openwrt/dri diff -ur linux-2.6.15-rc5/drivers/mtd/mtdchar.c linux-2.6.15-rc5-openwrt/drivers/mtd/mtdchar.c --- linux-2.6.15-rc5/drivers/mtd/mtdchar.c 2005-12-04 06:10:42.000000000 +0100 +++ linux-2.6.15-rc5-openwrt/drivers/mtd/mtdchar.c 2005-12-15 07:49:15.000000000 +0100 -@@ -6,7 +6,6 @@ - */ - - #include <linux/config.h> --#include <linux/device.h> - #include <linux/fs.h> - #include <linux/init.h> - #include <linux/kernel.h> @@ -19,19 +18,33 @@ #include <asm/uaccess.h> @@ -217,3 +209,510 @@ diff -ur linux-2.6.15-rc5/fs/Kconfig linux-2.6.15-rc5-openwrt/fs/Kconfig config SYSFS bool "sysfs file system support" if EMBEDDED default y +diff -ur linux-2.6.17/drivers/ieee1394/dv1394.c linux-2.6.17-devfs/drivers/ieee1394/dv1394.c +--- linux-2.6.17/drivers/ieee1394/dv1394.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/ieee1394/dv1394.c 2006-08-25 11:06:18.000000000 -0700 +@@ -73,7 +73,7 @@ + - fix all XXX showstoppers + - disable IR/IT DMA interrupts on shutdown + - flush pci writes to the card by issuing a read +- - character device dispatching ++ - devfs and character device dispatching (* needs testing with Linux 2.2.x) + - switch over to the new kernel DMA API (pci_map_*()) (* needs testing on platforms with IOMMU!) + - keep all video_cards in a list (for open() via chardev), set file->private_data = video + - dv1394_poll should indicate POLLIN when receiving buffers are available +@@ -1096,6 +1096,7 @@ + + init.api_version = DV1394_API_VERSION; + init.n_frames = DV1394_MAX_FRAMES / 4; ++ /* the following are now set via devfs */ + init.channel = video->channel; + init.format = video->pal_or_ntsc; + init.cip_n = video->cip_n; +@@ -1790,6 +1791,8 @@ + { + struct video_card *video = NULL; + ++ /* if the device was opened through devfs, then file->private_data ++ has already been set to video by devfs */ + if (file->private_data) { + video = (struct video_card*) file->private_data; + +@@ -2208,7 +2211,7 @@ + video = kzalloc(sizeof(*video), GFP_KERNEL); + if (!video) { + printk(KERN_ERR "dv1394: cannot allocate video_card\n"); +- return -1; ++ goto err; + } + + video->ohci = ohci; +@@ -2263,14 +2266,37 @@ + list_add_tail(&video->list, &dv1394_cards); + spin_unlock_irqrestore(&dv1394_cards_lock, flags); + ++ if (devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, ++ IEEE1394_MINOR_BLOCK_DV1394*16 + video->id), ++ S_IFCHR|S_IRUGO|S_IWUGO, ++ "ieee1394/dv/host%d/%s/%s", ++ (video->id>>2), ++ (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"), ++ (video->mode == MODE_RECEIVE ? "in" : "out")) < 0) ++ goto err_free; ++ + debug_printk("dv1394: dv1394_init() OK on ID %d\n", video->id); ++ + return 0; ++ ++ err_free: ++ kfree(video); ++ err: ++ return -1; + } + + static void dv1394_un_init(struct video_card *video) + { ++ char buf[32]; ++ + /* obviously nobody has the driver open at this point */ + do_dv1394_shutdown(video, 1); ++ snprintf(buf, sizeof(buf), "dv/host%d/%s/%s", (video->id >> 2), ++ (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"), ++ (video->mode == MODE_RECEIVE ? "in" : "out") ++ ); ++ ++ devfs_remove("ieee1394/%s", buf); + kfree(video); + } + +@@ -2307,6 +2333,9 @@ + + class_device_destroy(hpsb_protocol_class, + MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); ++ devfs_remove("ieee1394/dv/host%d/NTSC", id); ++ devfs_remove("ieee1394/dv/host%d/PAL", id); ++ devfs_remove("ieee1394/dv/host%d", id); + } + + static void dv1394_add_host (struct hpsb_host *host) +@@ -2323,6 +2352,9 @@ + class_device_create(hpsb_protocol_class, NULL, MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), + NULL, "dv1394-%d", id); ++ devfs_mk_dir("ieee1394/dv/host%d", id); ++ devfs_mk_dir("ieee1394/dv/host%d/NTSC", id); ++ devfs_mk_dir("ieee1394/dv/host%d/PAL", id); + + dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE); + dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT); +@@ -2579,8 +2611,10 @@ + static void __exit dv1394_exit_module(void) + { + hpsb_unregister_protocol(&dv1394_driver); ++ + hpsb_unregister_highlevel(&dv1394_highlevel); + cdev_del(&dv1394_cdev); ++ devfs_remove("ieee1394/dv"); + } + + static int __init dv1394_init_module(void) +@@ -2596,12 +2630,15 @@ + return ret; + } + ++ devfs_mk_dir("ieee1394/dv"); ++ + hpsb_register_highlevel(&dv1394_highlevel); + + ret = hpsb_register_protocol(&dv1394_driver); + if (ret) { + printk(KERN_ERR "dv1394: failed to register protocol\n"); + hpsb_unregister_highlevel(&dv1394_highlevel); ++ devfs_remove("ieee1394/dv"); + cdev_del(&dv1394_cdev); + return ret; + } +diff -ur linux-2.6.17/drivers/ieee1394/ieee1394_core.c linux-2.6.17-devfs/drivers/ieee1394/ieee1394_core.c +--- linux-2.6.17/drivers/ieee1394/ieee1394_core.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/ieee1394/ieee1394_core.c 2006-08-25 11:06:18.000000000 -0700 +@@ -1078,10 +1078,17 @@ + goto exit_release_kernel_thread; + } + ++ /* actually this is a non-fatal error */ ++ ret = devfs_mk_dir("ieee1394"); ++ if (ret < 0) { ++ HPSB_ERR("unable to make devfs dir for device major %d!\n", IEEE1394_MAJOR); ++ goto release_chrdev; ++ } ++ + ret = bus_register(&ieee1394_bus_type); + if (ret < 0) { + HPSB_INFO("bus register failed"); +- goto release_chrdev; ++ goto release_devfs; + } + + for (i = 0; fw_bus_attrs[i]; i++) { +@@ -1092,7 +1099,7 @@ + fw_bus_attrs[i--]); + } + bus_unregister(&ieee1394_bus_type); +- goto release_chrdev; ++ goto release_devfs; + } + } + +@@ -1145,6 +1152,8 @@ + for (i = 0; fw_bus_attrs[i]; i++) + bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); + bus_unregister(&ieee1394_bus_type); ++release_devfs: ++ devfs_remove("ieee1394"); + release_chrdev: + unregister_chrdev_region(IEEE1394_CORE_DEV, 256); + exit_release_kernel_thread: +@@ -1182,6 +1191,7 @@ + hpsb_cleanup_config_roms(); + + unregister_chrdev_region(IEEE1394_CORE_DEV, 256); ++ devfs_remove("ieee1394"); + } + + module_init(ieee1394_init); +diff -ur linux-2.6.17/drivers/ieee1394/ieee1394_core.h linux-2.6.17-devfs/drivers/ieee1394/ieee1394_core.h +--- linux-2.6.17/drivers/ieee1394/ieee1394_core.h 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/ieee1394/ieee1394_core.h 2006-08-25 11:06:18.000000000 -0700 +@@ -3,6 +3,7 @@ + #define _IEEE1394_CORE_H + + #include <linux/slab.h> ++#include <linux/devfs_fs_kernel.h> + #include <asm/atomic.h> + #include <asm/semaphore.h> + #include "hosts.h" +diff -ur linux-2.6.17/drivers/ieee1394/raw1394.c linux-2.6.17-devfs/drivers/ieee1394/raw1394.c +--- linux-2.6.17/drivers/ieee1394/raw1394.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/ieee1394/raw1394.c 2006-08-25 11:06:18.000000000 -0700 +@@ -41,6 +41,7 @@ + #include <linux/cdev.h> + #include <asm/uaccess.h> + #include <asm/atomic.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/compat.h> + + #include "csr1212.h" +@@ -2998,6 +2999,9 @@ + goto out_unreg; + } + ++ devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), ++ S_IFCHR | S_IRUSR | S_IWUSR, RAW1394_DEVICE_NAME); ++ + cdev_init(&raw1394_cdev, &raw1394_fops); + raw1394_cdev.owner = THIS_MODULE; + kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME); +@@ -3019,6 +3023,7 @@ + goto out; + + out_dev: ++ devfs_remove(RAW1394_DEVICE_NAME); + class_device_destroy(hpsb_protocol_class, + MKDEV(IEEE1394_MAJOR, + IEEE1394_MINOR_BLOCK_RAW1394 * 16)); +@@ -3034,6 +3039,7 @@ + MKDEV(IEEE1394_MAJOR, + IEEE1394_MINOR_BLOCK_RAW1394 * 16)); + cdev_del(&raw1394_cdev); ++ devfs_remove(RAW1394_DEVICE_NAME); + hpsb_unregister_highlevel(&raw1394_highlevel); + hpsb_unregister_protocol(&raw1394_driver); + } +diff -ur linux-2.6.17/drivers/ieee1394/video1394.c linux-2.6.17-devfs/drivers/ieee1394/video1394.c +--- linux-2.6.17/drivers/ieee1394/video1394.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/ieee1394/video1394.c 2006-08-25 11:06:18.000000000 -0700 +@@ -42,6 +42,7 @@ + #include <linux/poll.h> + #include <linux/smp_lock.h> + #include <linux/delay.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/bitops.h> + #include <linux/types.h> + #include <linux/vmalloc.h> +@@ -1321,6 +1322,9 @@ + class_device_create(hpsb_protocol_class, NULL, MKDEV( + IEEE1394_MAJOR, minor), + NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); ++ devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); + } + + +@@ -1328,9 +1332,12 @@ + { + struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); + +- if (ohci) ++ if (ohci) { + class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, + IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); ++ devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); ++ } ++ + return; + } + +@@ -1471,8 +1478,12 @@ + static void __exit video1394_exit_module (void) + { + hpsb_unregister_protocol(&video1394_driver); ++ + hpsb_unregister_highlevel(&video1394_highlevel); ++ ++ devfs_remove(VIDEO1394_DRIVER_NAME); + cdev_del(&video1394_cdev); ++ + PRINT_G(KERN_INFO, "Removed " VIDEO1394_DRIVER_NAME " module"); + } + +@@ -1489,12 +1500,15 @@ + return ret; + } + ++ devfs_mk_dir(VIDEO1394_DRIVER_NAME); ++ + hpsb_register_highlevel(&video1394_highlevel); + + ret = hpsb_register_protocol(&video1394_driver); + if (ret) { + PRINT_G(KERN_ERR, "video1394: failed to register protocol"); + hpsb_unregister_highlevel(&video1394_highlevel); ++ devfs_remove(VIDEO1394_DRIVER_NAME); + cdev_del(&video1394_cdev); + return ret; + } +diff -ur linux-2.6.17/drivers/scsi/osst.c linux-2.6.17-devfs/drivers/scsi/osst.c +--- linux-2.6.17/drivers/scsi/osst.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/scsi/osst.c 2006-08-25 11:06:18.000000000 -0700 +@@ -48,6 +48,7 @@ + #include <linux/vmalloc.h> + #include <linux/blkdev.h> + #include <linux/moduleparam.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/delay.h> + #include <linux/jiffies.h> + #include <asm/uaccess.h> +@@ -5721,7 +5722,7 @@ + struct st_partstat * STps; + struct osst_buffer * buffer; + struct gendisk * drive; +- int i, dev_num; ++ int i, mode, dev_num; + + if (SDp->type != TYPE_TAPE || !osst_supports(SDp)) + return -ENODEV; +@@ -5857,6 +5858,18 @@ + snprintf(name, 8, "%s%s", "n", tape_name(tpnt)); + osst_sysfs_add(MKDEV(OSST_MAJOR, dev_num + 128), dev, tpnt, name); + } ++ for (mode = 0; mode < ST_NBR_MODES; ++mode) { ++ /* Rewind entry */ ++ devfs_mk_cdev(MKDEV(OSST_MAJOR, dev_num + (mode << 5)), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "%s/ot%s", SDp->devfs_name, osst_formats[mode]); ++ ++ /* No-rewind entry */ ++ devfs_mk_cdev(MKDEV(OSST_MAJOR, dev_num + (mode << 5) + 128), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "%s/ot%sn", SDp->devfs_name, osst_formats[mode]); ++ } ++ drive->number = devfs_register_tape(SDp->devfs_name); + + sdev_printk(KERN_INFO, SDp, + "osst :I: Attached OnStream %.5s tape as %s\n", +@@ -5873,7 +5886,7 @@ + { + struct scsi_device * SDp = to_scsi_device(dev); + struct osst_tape * tpnt; +- int i; ++ int i, mode; + + if ((SDp->type != TYPE_TAPE) || (osst_nr_dev <= 0)) + return 0; +@@ -5884,6 +5897,11 @@ + osst_sysfs_destroy(MKDEV(OSST_MAJOR, i)); + osst_sysfs_destroy(MKDEV(OSST_MAJOR, i+128)); + tpnt->device = NULL; ++ for (mode = 0; mode < ST_NBR_MODES; ++mode) { ++ devfs_remove("%s/ot%s", SDp->devfs_name, osst_formats[mode]); ++ devfs_remove("%s/ot%sn", SDp->devfs_name, osst_formats[mode]); ++ } ++ devfs_unregister_tape(tpnt->drive->number); + put_disk(tpnt->drive); + os_scsi_tapes[i] = NULL; + osst_nr_dev--; +diff -ur linux-2.6.17/drivers/scsi/scsi.c linux-2.6.17-devfs/drivers/scsi/scsi.c +--- linux-2.6.17/drivers/scsi/scsi.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/scsi/scsi.c 2006-08-25 11:07:42.000000000 -0700 +@@ -48,6 +48,7 @@ + #include <linux/delay.h> + #include <linux/init.h> + #include <linux/completion.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/unistd.h> + #include <linux/spinlock.h> + #include <linux/kmod.h> +@@ -1247,6 +1248,7 @@ + for_each_possible_cpu(i) + INIT_LIST_HEAD(&per_cpu(scsi_done_q, i)); + ++ devfs_mk_dir("scsi"); + printk(KERN_NOTICE "SCSI subsystem initialized\n"); + return 0; + +@@ -1271,6 +1273,7 @@ + scsi_exit_sysctl(); + scsi_exit_hosts(); + scsi_exit_devinfo(); ++ devfs_remove("scsi"); + scsi_exit_procfs(); + scsi_exit_queue(); + } +diff -ur linux-2.6.17/drivers/scsi/scsi_scan.c linux-2.6.17-devfs/drivers/scsi/scsi_scan.c +--- linux-2.6.17/drivers/scsi/scsi_scan.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/scsi/scsi_scan.c 2006-08-25 11:06:18.000000000 -0700 +@@ -716,8 +716,12 @@ + if (inq_result[7] & 0x10) + sdev->sdtr = 1; + ++ sprintf(sdev->devfs_name, "scsi/host%d/bus%d/target%d/lun%d", ++ sdev->host->host_no, sdev->channel, ++ sdev->id, sdev->lun); ++ + /* +- * End sysfs code. ++ * End driverfs/devfs code. + */ + + if ((sdev->scsi_level >= SCSI_2) && (inq_result[7] & 2) && +diff -ur linux-2.6.17/drivers/scsi/sd.c linux-2.6.17-devfs/drivers/scsi/sd.c +--- linux-2.6.17/drivers/scsi/sd.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/scsi/sd.c 2006-08-25 11:06:18.000000000 -0700 +@@ -1683,6 +1683,8 @@ + 'a' + m1, 'a' + m2, 'a' + m3); + } + ++ strcpy(gd->devfs_name, sdp->devfs_name); ++ + gd->private_data = &sdkp->driver; + gd->queue = sdkp->device->request_queue; + +diff -ur linux-2.6.17/drivers/scsi/sg.c linux-2.6.17-devfs/drivers/scsi/sg.c +--- linux-2.6.17/drivers/scsi/sg.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/scsi/sg.c 2006-08-25 11:06:18.000000000 -0700 +@@ -44,6 +44,7 @@ + #include <linux/poll.h> + #include <linux/smp_lock.h> + #include <linux/moduleparam.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/cdev.h> + #include <linux/seq_file.h> + #include <linux/blkdev.h> +@@ -1427,10 +1428,14 @@ + k = error; + sdp = sg_dev_arr[k]; + ++ devfs_mk_cdev(MKDEV(SCSI_GENERIC_MAJOR, k), ++ S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, ++ "%s/generic", scsidp->devfs_name); + error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, k), 1); +- if (error) ++ if (error) { ++ devfs_remove("%s/generic", scsidp->devfs_name); + goto out; +- ++ } + sdp->cdev = cdev; + if (sg_sysfs_valid) { + struct class_device * sg_class_member; +@@ -1520,6 +1525,7 @@ + class_device_destroy(sg_sysfs_class, MKDEV(SCSI_GENERIC_MAJOR, k)); + cdev_del(sdp->cdev); + sdp->cdev = NULL; ++ devfs_remove("%s/generic", scsidp->devfs_name); + put_disk(sdp->disk); + sdp->disk = NULL; + if (NULL == sdp->headfp) +diff -ur linux-2.6.17/drivers/scsi/sr.c linux-2.6.17-devfs/drivers/scsi/sr.c +--- linux-2.6.17/drivers/scsi/sr.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/scsi/sr.c 2006-08-25 11:06:18.000000000 -0700 +@@ -592,6 +592,8 @@ + get_capabilities(cd); + sr_vendor_init(cd); + ++ snprintf(disk->devfs_name, sizeof(disk->devfs_name), ++ "%s/cd", sdev->devfs_name); + disk->driverfs_dev = &sdev->sdev_gendev; + set_capacity(disk, cd->capacity); + disk->private_data = &cd->driver; +diff -ur linux-2.6.17/drivers/scsi/st.c linux-2.6.17-devfs/drivers/scsi/st.c +--- linux-2.6.17/drivers/scsi/st.c 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/drivers/scsi/st.c 2006-08-25 11:06:18.000000000 -0700 +@@ -35,6 +35,7 @@ + #include <linux/spinlock.h> + #include <linux/blkdev.h> + #include <linux/moduleparam.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/cdev.h> + #include <linux/delay.h> + #include <linux/mutex.h> +@@ -4053,8 +4054,23 @@ + do_create_class_files(tpnt, dev_num, mode); + } + ++ for (mode = 0; mode < ST_NBR_MODES; ++mode) { ++ /* Make sure that the minor numbers corresponding to the four ++ first modes always get the same names */ ++ i = mode << (4 - ST_NBR_MODE_BITS); ++ /* Rewind entry */ ++ devfs_mk_cdev(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, 0)), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "%s/mt%s", SDp->devfs_name, st_formats[i]); ++ /* No-rewind entry */ ++ devfs_mk_cdev(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, 1)), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "%s/mt%sn", SDp->devfs_name, st_formats[i]); ++ } ++ disk->number = devfs_register_tape(SDp->devfs_name); ++ + sdev_printk(KERN_WARNING, SDp, + "Attached scsi tape %s\n", tape_name(tpnt)); + printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n", + tape_name(tpnt), tpnt->try_dio ? "yes" : "no", + queue_dma_alignment(SDp->request_queue) + 1); +@@ -4106,9 +4122,13 @@ + scsi_tapes[i] = NULL; + st_nr_dev--; + write_unlock(&st_dev_arr_lock); ++ devfs_unregister_tape(tpnt->disk->number); + sysfs_remove_link(&tpnt->device->sdev_gendev.kobj, + "tape"); + for (mode = 0; mode < ST_NBR_MODES; ++mode) { ++ j = mode << (4 - ST_NBR_MODE_BITS); ++ devfs_remove("%s/mt%s", SDp->devfs_name, st_formats[j]); ++ devfs_remove("%s/mt%sn", SDp->devfs_name, st_formats[j]); + for (j=0; j < 2; j++) { + class_device_destroy(st_sysfs_class, + MKDEV(SCSI_TAPE_MAJOR, +diff -ur linux-2.6.17/include/scsi/scsi_device.h linux-2.6.17-devfs/include/scsi/scsi_device.h +--- linux-2.6.17/include/scsi/scsi_device.h 2006-06-17 18:49:35.000000000 -0700 ++++ linux-2.6.17-devfs/include/scsi/scsi_device.h 2006-08-25 11:06:18.000000000 -0700 +@@ -74,6 +74,7 @@ + unsigned sector_size; /* size in bytes */ + + void *hostdata; /* available to low-level driver */ ++ char devfs_name[256]; /* devfs junk */ + char type; + char scsi_level; + char inq_periph_qual; /* PQ from INQUIRY data */ From 05e2a0b555c8625cfd90faf9d5670741e28b6a99 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 25 Aug 2006 18:28:58 +0000 Subject: [PATCH 516/757] update config SVN-Revision: 4670 --- openwrt/target/linux/aruba-2.6/config | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/openwrt/target/linux/aruba-2.6/config b/openwrt/target/linux/aruba-2.6/config index d215e22138c..82c42d467e8 100644 --- a/openwrt/target/linux/aruba-2.6/config +++ b/openwrt/target/linux/aruba-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Sun Aug 13 18:43:49 2006 +# Fri Aug 25 11:20:17 2006 # CONFIG_MIPS=y @@ -254,7 +254,7 @@ CONFIG_NET_IPIP=m # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set +CONFIG_INET_TUNNEL=m # CONFIG_INET_DIAG is not set # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y @@ -344,6 +344,7 @@ CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_ROUTE=m # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set @@ -497,7 +498,13 @@ CONFIG_BT_HCIUART_BCSP=y # CONFIG_BT_HCIBPA10X is not set # CONFIG_BT_HCIBFUSB is not set # CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set CONFIG_WIRELESS_EXT=y # @@ -840,7 +847,12 @@ CONFIG_NET_WIRELESS_RTNETLINK=y # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # # CONFIG_PRISM54 is not set -# CONFIG_HOSTAP is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAP_PCI=m +# CONFIG_BCM43XX is not set CONFIG_NET_WIRELESS=y # From 5d0a90e08fac0f4c8d7aa1e5ff863342f75f240a Mon Sep 17 00:00:00 2001 From: Mike Albon <malbon@openwrt.org> Date: Fri, 25 Aug 2006 20:17:28 +0000 Subject: [PATCH 517/757] Make the build work properly by including Hostap modules. SVN-Revision: 4671 --- openwrt/target/linux/au1000-2.6/config | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openwrt/target/linux/au1000-2.6/config b/openwrt/target/linux/au1000-2.6/config index 9c498efd102..e94f884cb2a 100644 --- a/openwrt/target/linux/au1000-2.6/config +++ b/openwrt/target/linux/au1000-2.6/config @@ -934,7 +934,12 @@ CONFIG_PCI_ATMEL=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -# CONFIG_HOSTAP is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_CS=m CONFIG_BCM43XX=m CONFIG_BCM43XX_DEBUG=y CONFIG_BCM43XX_DMA=y From aae33f76f8df6173de6863ec76696307b30795d0 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Fri, 25 Aug 2006 21:53:54 +0000 Subject: [PATCH 518/757] add basic support for the Magicbox boards SVN-Revision: 4672 --- openwrt/include/kernel.mk | 3 + openwrt/include/target.mk | 1 + openwrt/package/madwifi/Makefile | 3 + openwrt/target/Config.in | 15 +- openwrt/target/image/magicbox/Makefile | 32 + .../generic-2.6/patches/005-gcc4_fix.patch | 12 + openwrt/target/linux/magicbox-2.6/Makefile | 22 + openwrt/target/linux/magicbox-2.6/config | 1530 +++++++++++++++++ .../patches/001-magicbox_support.patch | 508 ++++++ openwrt/toolchain/Makefile | 2 +- .../toolchain/kernel-headers/files/config.ppc | 341 ++++ openwrt/toolchain/mkimage/Makefile | 26 + openwrt/toolchain/mkimage/src/crc32.c | 197 +++ openwrt/toolchain/mkimage/src/image.h | 157 ++ openwrt/toolchain/mkimage/src/mkimage.c | 745 ++++++++ .../uClibc/patches/130-ppc_gcc4_fix.patch | 223 +++ 16 files changed, 3809 insertions(+), 8 deletions(-) create mode 100644 openwrt/target/image/magicbox/Makefile create mode 100644 openwrt/target/linux/magicbox-2.6/Makefile create mode 100644 openwrt/target/linux/magicbox-2.6/config create mode 100644 openwrt/target/linux/magicbox-2.6/patches/001-magicbox_support.patch create mode 100644 openwrt/toolchain/kernel-headers/files/config.ppc create mode 100644 openwrt/toolchain/mkimage/Makefile create mode 100644 openwrt/toolchain/mkimage/src/crc32.c create mode 100644 openwrt/toolchain/mkimage/src/image.h create mode 100644 openwrt/toolchain/mkimage/src/mkimage.c create mode 100644 openwrt/toolchain/uClibc/patches/130-ppc_gcc4_fix.patch diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index 7c23aaca8ee..c788bf1c490 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -42,6 +42,9 @@ else ifneq (,$(findstring x86,$(BOARD))) KERNELNAME="bzImage" endif + ifneq (,$(findstring ppc,$(BOARD))) + KERNELNAME="uImage" + endif ifneq (,$(findstring uml,$(BOARD))) LINUX_KARCH:=um diff --git a/openwrt/include/target.mk b/openwrt/include/target.mk index 95bd1dbfb36..449def932ba 100644 --- a/openwrt/include/target.mk +++ b/openwrt/include/target.mk @@ -23,6 +23,7 @@ $(eval $(call kernel_template,2.4,ar531x,2_4_AR531X)) $(eval $(call kernel_template,2.6,aruba,2_6_ARUBA)) $(eval $(call kernel_template,2.6,au1000,2_6_AU1000)) $(eval $(call kernel_template,2.6,xscale,2_6_XSCALE)) +$(eval $(call kernel_template,2.6,magicbox,2_6_MAGICBOX)) $(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE)) export BOARD diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index 380ec4ad611..d65b0df50ef 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -32,6 +32,9 @@ endif ifeq ($(ARCH),armeb) HAL_TARGET:=xscale-be-elf endif +ifeq ($(ARCH),powerpc) + HAL_TARGET:=powerpc-be-elf +endif BUS := PCI ifneq ($(CONFIG_LINUX_2_4_AR531X),) diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 38d69cb39a3..2d3009112c6 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -71,6 +71,14 @@ config LINUX_2_6_XSCALE select BIG_ENDIAN select PCI_SUPPORT +config LINUX_2_6_MAGICBOX + bool "Magicbox [2.6]" + depends BROKEN + select powerpc + select LINUX_2_6 + select BIG_ENDIAN + select PCI_SUPPORT + config LINUX_2_6_RB532 bool "Mikrotik RB532 [2.6]" select mipsel @@ -128,13 +136,6 @@ config LINUX_2_6_M68K select LINUX_2_6 select m68k -config LINUX_2_6_PPC - bool "UNSUPPORTED powerpc platform" - depends BROKEN - select LINUX_2_6 - select BIG_ENDIAN - select powerpc - config LINUX_2_6_SH3 bool "UNSUPPORTED little-endian sh3 platform" depends BROKEN diff --git a/openwrt/target/image/magicbox/Makefile b/openwrt/target/image/magicbox/Makefile new file mode 100644 index 00000000000..f0b19b1d231 --- /dev/null +++ b/openwrt/target/image/magicbox/Makefile @@ -0,0 +1,32 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +define Build/Clean +endef + +define Image/Prepare +endef + +define Image/BuildKernel + cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-uImage +endef + +define Image/Build + $(call Image/Build/$(1),$(1)) +endef + +define Image/Build/jffs2-64k + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img bs=65536 conv=sync +endef + +define Image/Build/jffs2-128k + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img bs=131072 conv=sync +endef + +$(eval $(call BuildImage)) diff --git a/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch b/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch index 0d480522861..99489b94b3a 100644 --- a/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch +++ b/openwrt/target/linux/generic-2.6/patches/005-gcc4_fix.patch @@ -1,3 +1,15 @@ +diff -ruN linux-2.6.15.1/include/asm-ppc/libgcc.h linux-2.6.15.1-openwrt/include/asm-ppc/libgcc.h +--- linux-2.6.15.1/include/asm-ppc/libgcc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.15.1-openwrt/include/asm-ppc/libgcc.h 2006-02-01 15:47:53.000000000 +0100 +@@ -0,0 +1,8 @@ ++#ifndef __ASM_LIBGCC_H ++#define __ASM_LIBGCC_H ++ ++#undef ARCH_NEEDS_ashldi3 ++#undef ARCH_NEEDS_ashrdi3 ++#undef ARCH_NEEDS_lshrdi3 ++ ++#endif /* __ASM_LIBGCC_H */ diff -ruN linux-2.6.15.1/include/asm-i386/libgcc.h linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h --- linux-2.6.15.1/include/asm-i386/libgcc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h 2006-02-01 15:47:53.000000000 +0100 diff --git a/openwrt/target/linux/magicbox-2.6/Makefile b/openwrt/target/linux/magicbox-2.6/Makefile new file mode 100644 index 00000000000..7ffd11c668c --- /dev/null +++ b/openwrt/target/linux/magicbox-2.6/Makefile @@ -0,0 +1,22 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +LINUX_VERSION:=2.6.17 +LINUX_RELEASE:=1 +LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e + +include ./config +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk + +$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked + [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) + [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) + @$(CP) config $(LINUX_DIR)/.config + touch $@ + diff --git a/openwrt/target/linux/magicbox-2.6/config b/openwrt/target/linux/magicbox-2.6/config new file mode 100644 index 00000000000..0e667c0b106 --- /dev/null +++ b/openwrt/target/linux/magicbox-2.6/config @@ -0,0 +1,1530 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.17 +# Fri Aug 25 19:17:05 2006 +# +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set + +# +# Block layer +# +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# Processor +# +# CONFIG_6xx is not set +CONFIG_40x=y +# CONFIG_44x is not set +# CONFIG_8xx is not set +# CONFIG_E200 is not set +# CONFIG_E500 is not set +# CONFIG_MATH_EMULATION is not set +# CONFIG_KEXEC is not set +# CONFIG_CPU_FREQ is not set +CONFIG_4xx=y +CONFIG_WANT_EARLY_SERIAL=y + +# +# IBM 4xx options +# +# CONFIG_BUBINGA is not set +# CONFIG_CPCI405 is not set +# CONFIG_EP405 is not set +# CONFIG_REDWOOD_5 is not set +# CONFIG_REDWOOD_6 is not set +# CONFIG_SYCAMORE is not set +# CONFIG_WALNUT is not set +CONFIG_MAGICBOX=y +# CONFIG_XILINX_ML300 is not set +# CONFIG_XILINX_ML403 is not set +CONFIG_IBM_OCP=y +CONFIG_BIOS_FIXUP=y +CONFIG_405EP=y +CONFIG_PPC4xx_DMA=y +CONFIG_PPC4xx_EDMA=y +CONFIG_PPC_GEN550=y +CONFIG_UART0_TTYS0=y +# CONFIG_UART0_TTYS1 is not set +CONFIG_NOT_COHERENT_CACHE=y + +# +# Platform options +# +# CONFIG_PPC_PREP is not set +# CONFIG_APUS is not set +# CONFIG_KATANA is not set +# CONFIG_WILLOW is not set +# CONFIG_CPCI690 is not set +# CONFIG_POWERPMC250 is not set +# CONFIG_CHESTNUT is not set +# CONFIG_SPRUCE is not set +# CONFIG_HDPU is not set +# CONFIG_EV64260 is not set +# CONFIG_LOPEC is not set +# CONFIG_MVME5100 is not set +# CONFIG_PPLUS is not set +# CONFIG_PRPMC750 is not set +# CONFIG_PRPMC800 is not set +# CONFIG_SANDPOINT is not set +# CONFIG_RADSTONE_PPC7D is not set +# CONFIG_PAL4 is not set +# CONFIG_GEMINI is not set +# CONFIG_EST8260 is not set +# CONFIG_SBC82xx is not set +# CONFIG_SBS8260 is not set +# CONFIG_RPX8260 is not set +# CONFIG_TQM8260 is not set +# CONFIG_ADS8272 is not set +# CONFIG_PQ2FADS is not set +# CONFIG_LITE5200 is not set +# CONFIG_MPC834x_SYS is not set +# CONFIG_EV64360 is not set +# CONFIG_PC_KEYBOARD is not set +# CONFIG_HIGHMEM is not set +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=250 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_CMDLINE_BOOL is not set +# CONFIG_PM is not set +# CONFIG_SOFTWARE_SUSPEND is not set +# CONFIG_SECCOMP is not set +CONFIG_ISA_DMA_API=y + +# +# Bus options +# +# CONFIG_PPC_I8259 is not set +CONFIG_PPC_INDIRECT_PCI=y +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Advanced setup +# +# CONFIG_ADVANCED_OPTIONS is not set + +# +# Default settings for advanced configuration options are used +# +CONFIG_HIGHMEM_START=0xfe000000 +CONFIG_LOWMEM_SIZE=0x30000000 +CONFIG_KERNEL_START=0xc0000000 +CONFIG_TASK_SIZE=0x80000000 +CONFIG_CONSISTENT_START=0xff100000 +CONFIG_CONSISTENT_SIZE=0x00200000 +CONFIG_BOOT_LOAD=0x00400000 + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +# CONFIG_NET_IPGRE is not set +# CONFIG_IPSEC_NAT_TRAVERSAL is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_IPV6_TUNNEL is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_BRIDGE_NETFILTER is not set + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_STATE=y +# CONFIG_NETFILTER_XT_MATCH_STRING is not set +CONFIG_NETFILTER_XT_MATCH_TCPMSS=y + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_CT_ACCT=y +# CONFIG_IP_NF_CONNTRACK_MARK is not set +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=y +CONFIG_IP_NF_IRC=m +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m +CONFIG_IP_NF_SIP=m +CONFIG_IP_NF_QUEUE=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_IMQ=m +# CONFIG_IP_NF_TARGET_LOG is not set +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_ROUTE=m +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=y +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_TARGET_SET=m + +# +# IPv6: Netfilter Configuration (EXPERIMENTAL) +# +# CONFIG_IP6_NF_QUEUE is not set +# CONFIG_IP6_NF_IPTABLES is not set + +# +# Bridge: Netfilter Configuration +# +# CONFIG_BRIDGE_NF_EBTABLES is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=y +# CONFIG_DECNET is not set +CONFIG_LLC=y +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +# CONFIG_NET_SCH_NETEM is not set +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_PEDIT=m +# CONFIG_NET_ACT_SIMP is not set +CONFIG_NET_CLS_IND=y +CONFIG_NET_ESTIMATOR=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set +# CONFIG_IEEE80211 is not set +CONFIG_WIRELESS_EXT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +# CONFIG_CONNECTOR is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_GEOMETRY is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_OTP is not set +# CONFIG_MTD_CFI_INTELEXT is not set +CONFIG_MTD_CFI_AMDSTD=y +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +CONFIG_MTD_COMPLEX_MAPPINGS=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0x1fc00000 +CONFIG_MTD_PHYSMAP_LEN=0x400000 +CONFIG_MTD_PHYSMAP_BANKWIDTH=1 +CONFIG_MTD_MAGICMAP=y +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Macintosh device drivers +# +# CONFIG_WINDFARM is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_IFB is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 +CONFIG_TUN=m + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# +# CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_IBM_EMAC=y +CONFIG_IBM_EMAC_RXB=128 +CONFIG_IBM_EMAC_TXB=64 +CONFIG_IBM_EMAC_POLL_WEIGHT=32 +CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256 +CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0 +# CONFIG_IBM_EMAC_PHY_RX_CLK_FIX is not set +# CONFIG_IBM_EMAC_DEBUG is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +CONFIG_NATSEMI=y +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set +# CONFIG_AIRO is not set +# CONFIG_HERMES is not set +# CONFIG_ATMEL is not set + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +# CONFIG_PRISM54 is not set +# CONFIG_HOSTAP is not set +CONFIG_NET_WIRELESS=y + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=m + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_PCI is not set +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_BOOKE_WDT is not set + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=m +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y + +# +# Video Capture Adapters +# + +# +# Video Capture Adapters +# +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VIDEO_CPIA2 is not set + +# +# Encoders and Decoders +# + +# +# V4L USB devices +# + +# +# Radio Adapters +# + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# PCI devices +# +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ALS4000 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_CS4281 is not set +# CONFIG_SND_CS46XX is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_HDA_INTEL is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_YMFPCI is not set + +# +# ALSA PowerMac devices +# + +# +# ALSA PowerMac requires I2C +# + +# +# USB devices +# +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_USB_USX2Y is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +CONFIG_USB_DYNAMIC_MINORS=y +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=m +# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_UHCI_HCD=m +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_ZD1201 is not set +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TEST is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# + +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=m +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=m +# CONFIG_ROMFS_FS is not set +# CONFIG_INOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_DNOTIFY is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_PROC_KCORE is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +# CONFIG_NFS_FS is not set +# CONFIG_NFSD is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=m +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# IBM 40x options +# + +# +# Library routines +# +CONFIG_CRC_CCITT=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_FS is not set +# CONFIG_SERIAL_TEXT_DEBUG is not set +CONFIG_PPC_OCP=y + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# diff --git a/openwrt/target/linux/magicbox-2.6/patches/001-magicbox_support.patch b/openwrt/target/linux/magicbox-2.6/patches/001-magicbox_support.patch new file mode 100644 index 00000000000..57d3b31081f --- /dev/null +++ b/openwrt/target/linux/magicbox-2.6/patches/001-magicbox_support.patch @@ -0,0 +1,508 @@ +diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/Kconfig linux-2.6.17-owrt/arch/ppc/platforms/4xx/Kconfig +--- linux-2.6.17/arch/ppc/platforms/4xx/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/ppc/platforms/4xx/Kconfig 2006-08-25 23:33:05.000000000 +0200 +@@ -52,6 +52,12 @@ + help + This option enables support for the IBM PPC405GP evaluation board. + ++config MAGICBOX ++ bool "MagicBox" ++ select WANT_EARLY_SERIAL ++ help ++ This option enables support for the IBM PPC405EP evaluation board. ++ + config XILINX_ML300 + bool "Xilinx-ML300" + help +@@ -173,7 +179,7 @@ + + config IBM_OCP + bool +- depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT ++ depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT || MAGICBOX + default y + + config IBM_EMAC4 +@@ -183,7 +189,7 @@ + + config BIOS_FIXUP + bool +- depends on BUBINGA || EP405 || SYCAMORE || WALNUT ++ depends on BUBINGA || EP405 || SYCAMORE || WALNUT || MAGICBOX + default y + + # OAK doesn't exist but wanted to keep this around for any future 403GCX boards +@@ -194,7 +200,7 @@ + + config 405EP + bool +- depends on BUBINGA ++ depends on BUBINGA || MAGICBOX + default y + + config 405GP +diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/magicbox.c linux-2.6.17-owrt/arch/ppc/platforms/4xx/magicbox.c +--- linux-2.6.17/arch/ppc/platforms/4xx/magicbox.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/ppc/platforms/4xx/magicbox.c 2006-08-25 23:33:05.000000000 +0200 +@@ -0,0 +1,249 @@ ++/* ++ * Support for IBM PPC 405EP-based MagicBox board ++ * Copyright (C) 2006 Karol Lewandowski ++ * ++ * Heavily based on bubinga.c ++ * ++ * Author: SAW (IBM), derived from walnut.c. ++ * Maintained by MontaVista Software <source@mvista.com> ++ * ++ * 2003 (c) MontaVista Softare Inc. This file is licensed under the ++ * terms of the GNU General Public License version 2. This program is ++ * licensed "as is" without any warranty of any kind, whether express ++ * or implied. ++ */ ++ ++#include <linux/config.h> ++#include <linux/init.h> ++#include <linux/smp.h> ++#include <linux/threads.h> ++#include <linux/param.h> ++#include <linux/string.h> ++#include <linux/blkdev.h> ++#include <linux/pci.h> ++#include <linux/tty.h> ++#include <linux/serial.h> ++#include <linux/serial_core.h> ++ ++#include <asm/system.h> ++#include <asm/pci-bridge.h> ++#include <asm/processor.h> ++#include <asm/machdep.h> ++#include <asm/page.h> ++#include <asm/time.h> ++#include <asm/io.h> ++#include <asm/kgdb.h> ++#include <asm/ocp.h> ++#include <asm/ibm_ocp_pci.h> ++ ++#include <platforms/4xx/ibm405ep.h> ++ ++#undef DEBUG ++ ++#ifdef DEBUG ++#define DBG(x...) printk(x) ++#else ++#define DBG(x...) ++#endif ++ ++extern bd_t __res; ++ ++/* Some IRQs unique to board ++ * Used by the generic 405 PCI setup functions in ppc4xx_pci.c ++ */ ++int __init ++ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) ++{ ++ static char pci_irq_table[][4] = ++ /* ++ * PCI IDSEL/INTPIN->INTLINE ++ * A B C D ++ */ ++ { ++ {28, 28, 28, 28}, /* IDSEL 1 - PCI slot 1 */ ++ {29, 29, 29, 29}, /* IDSEL 2 - PCI slot 2 */ ++ {30, 30, 30, 30}, /* IDSEL 3 - PCI slot 3 */ ++ {31, 31, 31, 31}, /* IDSEL 4 - PCI slot 4 */ ++ }; ++ ++ const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4; ++ return PCI_IRQ_TABLE_LOOKUP; ++}; ++ ++ ++/* The serial clock for the chip is an internal clock determined by ++ * different clock speeds/dividers. ++ * Calculate the proper input baud rate and setup the serial driver. ++ */ ++static void __init ++magicbox_early_serial_map(void) ++{ ++ u32 uart_div; ++ int uart_clock; ++ struct uart_port port; ++ ++ /* Calculate the serial clock input frequency ++ * ++ * The base baud is the PLL OUTA (provided in the board info ++ * structure) divided by the external UART Divisor, divided ++ * by 16. ++ */ ++ uart_div = (mfdcr(DCRN_CPC0_UCR_BASE) & DCRN_CPC0_UCR_U0DIV); ++ uart_clock = __res.bi_procfreq / uart_div; ++ ++ /* Setup serial port access */ ++ memset(&port, 0, sizeof(port)); ++ port.membase = (void*)ACTING_UART0_IO_BASE; ++ port.irq = ACTING_UART0_INT; ++ port.uartclk = uart_clock; ++ port.regshift = 0; ++ port.iotype = SERIAL_IO_MEM; ++ port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; ++ port.line = 0; ++ ++ if (early_serial_setup(&port) != 0) { ++ printk("Early serial init of port 0 failed\n"); ++ } ++ ++ port.membase = (void*)ACTING_UART1_IO_BASE; ++ port.irq = ACTING_UART1_INT; ++ port.line = 1; ++ ++ if (early_serial_setup(&port) != 0) { ++ printk("Early serial init of port 1 failed\n"); ++ } ++} ++ ++void __init ++bios_fixup(struct pci_controller *hose, struct pcil0_regs *pcip) ++{ ++ unsigned int bar_response, bar; ++ /* ++ * Expected PCI mapping: ++ * ++ * PLB addr PCI memory addr ++ * --------------------- --------------------- ++ * 0000'0000 - 7fff'ffff <--- 0000'0000 - 7fff'ffff ++ * 8000'0000 - Bfff'ffff ---> 8000'0000 - Bfff'ffff ++ * ++ * PLB addr PCI io addr ++ * --------------------- --------------------- ++ * e800'0000 - e800'ffff ---> 0000'0000 - 0001'0000 ++ * ++ * The following code is simplified by assuming that the bootrom ++ * has been well behaved in following this mapping. ++ */ ++ ++#ifdef DEBUG ++ int i; ++ ++ printk("ioremap PCLIO_BASE = 0x%x\n", pcip); ++ printk("PCI bridge regs before fixup \n"); ++ for (i = 0; i <= 3; i++) { ++ printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma))); ++ printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].la))); ++ printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pcila))); ++ printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pciha))); ++ } ++ printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms))); ++ printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la))); ++ printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms))); ++ printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la))); ++ ++#endif ++ ++ /* added for IBM boot rom version 1.15 bios bar changes -AK */ ++ ++ /* Disable region first */ ++ out_le32((void *) &(pcip->pmm[0].ma), 0x00000000); ++ /* PLB starting addr, PCI: 0x80000000 */ ++ out_le32((void *) &(pcip->pmm[0].la), 0x80000000); ++ /* PCI start addr, 0x80000000 */ ++ out_le32((void *) &(pcip->pmm[0].pcila), PPC405_PCI_MEM_BASE); ++ /* 512MB range of PLB to PCI */ ++ out_le32((void *) &(pcip->pmm[0].pciha), 0x00000000); ++ /* Enable no pre-fetch, enable region */ ++ out_le32((void *) &(pcip->pmm[0].ma), ((0xffffffff - ++ (PPC405_PCI_UPPER_MEM - ++ PPC405_PCI_MEM_BASE)) | 0x01)); ++ ++ /* Disable region one */ ++ out_le32((void *) &(pcip->pmm[1].ma), 0x00000000); ++ out_le32((void *) &(pcip->pmm[1].la), 0x00000000); ++ out_le32((void *) &(pcip->pmm[1].pcila), 0x00000000); ++ out_le32((void *) &(pcip->pmm[1].pciha), 0x00000000); ++ out_le32((void *) &(pcip->pmm[1].ma), 0x00000000); ++ out_le32((void *) &(pcip->ptm1ms), 0x00000001); ++ ++ /* Disable region two */ ++ out_le32((void *) &(pcip->pmm[2].ma), 0x00000000); ++ out_le32((void *) &(pcip->pmm[2].la), 0x00000000); ++ out_le32((void *) &(pcip->pmm[2].pcila), 0x00000000); ++ out_le32((void *) &(pcip->pmm[2].pciha), 0x00000000); ++ out_le32((void *) &(pcip->pmm[2].ma), 0x00000000); ++ out_le32((void *) &(pcip->ptm2ms), 0x00000000); ++ out_le32((void *) &(pcip->ptm2la), 0x00000000); ++ ++ /* Zero config bars */ ++ for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) { ++ early_write_config_dword(hose, hose->first_busno, ++ PCI_FUNC(hose->first_busno), bar, ++ 0x00000000); ++ early_read_config_dword(hose, hose->first_busno, ++ PCI_FUNC(hose->first_busno), bar, ++ &bar_response); ++ DBG("BUS %d, device %d, Function %d bar 0x%8.8x is 0x%8.8x\n", ++ hose->first_busno, PCI_SLOT(hose->first_busno), ++ PCI_FUNC(hose->first_busno), bar, bar_response); ++ } ++ /* end work arround */ ++ ++#ifdef DEBUG ++ printk("PCI bridge regs after fixup \n"); ++ for (i = 0; i <= 3; i++) { ++ printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma))); ++ printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].la))); ++ printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pcila))); ++ printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pciha))); ++ } ++ printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms))); ++ printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la))); ++ printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms))); ++ printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la))); ++ ++#endif /* DEBUG */ ++} ++ ++void __init ++magicbox_setup_arch(void) ++{ ++ ppc4xx_setup_arch(); ++ ++ ibm_ocp_set_emac(0, 1); ++ ++ magicbox_early_serial_map(); ++ ++ /* Identify the system */ ++ printk("MagicBox port (C) 2005 Karol Lewandowski <kl@jasmine.eu.org>\n"); ++} ++ ++void __init ++magicbox_map_io(void) ++{ ++ ppc4xx_map_io(); ++} ++ ++void __init ++platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ++ unsigned long r6, unsigned long r7) ++{ ++ ppc4xx_init(r3, r4, r5, r6, r7); ++ ++ ppc_md.setup_arch = magicbox_setup_arch; ++ ppc_md.setup_io_mappings = magicbox_map_io; ++ ++#ifdef CONFIG_KGDB ++ ppc_md.early_serial_map = bubinga_early_serial_map; ++#endif ++ ++} +diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/magicbox.h linux-2.6.17-owrt/arch/ppc/platforms/4xx/magicbox.h +--- linux-2.6.17/arch/ppc/platforms/4xx/magicbox.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/arch/ppc/platforms/4xx/magicbox.h 2006-08-25 23:33:05.000000000 +0200 +@@ -0,0 +1,47 @@ ++/* ++ * Support for IBM PPC 405EP-based MagicBox board ++ * ++ * Heavily based on bubinga.h ++ * ++ * ++ * Author: SAW (IBM), derived from walnut.h. ++ * Maintained by MontaVista Software <source@mvista.com> ++ * ++ * 2003 (c) MontaVista Softare Inc. This file is licensed under the ++ * terms of the GNU General Public License version 2. This program is ++ * licensed "as is" without any warranty of any kind, whether express ++ * or implied. ++ */ ++ ++#ifdef __KERNEL__ ++#ifndef __MAGICBOX_H__ ++#define __MAGICBOX_H__ ++ ++#include <linux/config.h> ++#include <platforms/4xx/ibm405ep.h> ++#include <asm/ppcboot.h> ++ ++/* Memory map for the "MagicBox" 405EP evaluation board -- generic 4xx. */ ++ ++/* The UART clock is based off an internal clock - ++ * define BASE_BAUD based on the internal clock and divider(s). ++ * Since BASE_BAUD must be a constant, we will initialize it ++ * using clock/divider values which OpenBIOS initializes ++ * for typical configurations at various CPU speeds. ++ * The base baud is calculated as (FWDA / EXT UART DIV / 16) ++ */ ++#define BASE_BAUD 0 ++ ++/* Flash */ ++#define PPC40x_FPGA_BASE 0xF0300000 ++#define PPC40x_FPGA_REG_OFFS 1 /* offset to flash map reg */ ++#define PPC40x_FLASH_ONBD_N(x) (x & 0x02) ++#define PPC40x_FLASH_SRAM_SEL(x) (x & 0x01) ++#define PPC40x_FLASH_LOW 0xFFF00000 ++#define PPC40x_FLASH_HIGH 0xFFF80000 ++#define PPC40x_FLASH_SIZE 0x80000 ++ ++#define PPC4xx_MACHINE_NAME "MagicBox" ++ ++#endif /* __MAGICBOX_H__ */ ++#endif /* __KERNEL__ */ +diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/Makefile linux-2.6.17-owrt/arch/ppc/platforms/4xx/Makefile +--- linux-2.6.17/arch/ppc/platforms/4xx/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/arch/ppc/platforms/4xx/Makefile 2006-08-25 23:33:05.000000000 +0200 +@@ -13,6 +13,7 @@ + obj-$(CONFIG_REDWOOD_6) += redwood6.o + obj-$(CONFIG_SYCAMORE) += sycamore.o + obj-$(CONFIG_WALNUT) += walnut.o ++obj-$(CONFIG_MAGICBOX) += magicbox.o + obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o + obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o + +diff -Nur linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-owrt/drivers/mtd/maps/Kconfig +--- linux-2.6.17/drivers/mtd/maps/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/mtd/maps/Kconfig 2006-08-25 23:33:05.000000000 +0200 +@@ -323,6 +323,15 @@ + Walnut board. If you have one of these boards and would like to + use the flash chips on it, say 'Y'. + ++config MTD_MAGICMAP ++ tristate "Flash device mapped on IBM 405EP MagicBox" ++ depends on MTD_CFI && MTD_PARTITIONS && 40x && MAGICBOX ++ help ++ This enables access routines for the flash chips on the IBM 405EP ++ MagicBox board. If you have one of these boards and would like to ++ use the flash chips on it, say 'Y'. ++ ++ + config MTD_EBONY + tristate "Flash devices mapped on IBM 440GP Ebony" + depends on MTD_JEDECPROBE && EBONY +diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c +--- linux-2.6.17/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c 2006-08-25 23:33:05.000000000 +0200 +@@ -0,0 +1,102 @@ ++/* ++ * magicmap.c: Copyleft 2005 Karol Lewandowski ++ * ++ * Mapping for MagicBox flash. ++ * Based on walnut.c. ++ * ++ * Heikki Lindholm <holindho@infradead.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 the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <linux/mtd/mtd.h> ++#include <linux/mtd/map.h> ++#include <linux/mtd/partitions.h> ++#include <linux/config.h> ++#include <asm/io.h> ++ ++static struct mtd_info *flash; ++ ++static struct map_info magic_map = { ++ .name = "Magically mapped flash", ++ .phys = 0xffc00000, ++ .size = 0x400000, ++ .bankwidth = 2, ++}; ++ ++static struct mtd_partition magic_partitions[] = { ++ { ++ .name = "kernel", ++ .offset = 0x0, ++ .size = 0x0e0000, ++ }, ++ { ++ .name = "ramdisk", ++ .offset = 0x0e0000, ++ .size = 0x2c0000, ++ }, ++ { ++ .name = "persistent", ++ .offset = 0x3a0000, ++ .size = 0x020000, ++ }, ++ { ++ .name = "bootloader", ++ .offset = 0x3c0000, ++ .size = 0x040000, ++ .mask_flags = MTD_WRITEABLE, ++ }, ++}; ++ ++int __init init_magic(void) ++{ ++ magic_map.virt = ++ (void __iomem *)ioremap(magic_map.phys, magic_map.size); ++ ++ if (!magic_map.virt) { ++ printk("Failed to ioremap flash.\n"); ++ return -EIO; ++ } ++ ++ simple_map_init(&magic_map); ++ ++ flash = do_map_probe("cfi_probe", &magic_map); ++ if (flash) { ++ flash->owner = THIS_MODULE; ++ add_mtd_partitions(flash, magic_partitions, ++ ARRAY_SIZE(magic_partitions)); ++ } else { ++ printk("map probe failed for flash\n"); ++ return -ENXIO; ++ } ++ ++ return 0; ++} ++ ++static void __exit cleanup_magic(void) ++{ ++ if (flash) { ++ del_mtd_partitions(flash); ++ map_destroy(flash); ++ } ++ ++ if (magic_map.virt) { ++ iounmap((void *)magic_map.virt); ++ magic_map.virt = NULL; ++ } ++} ++ ++module_init(init_magic); ++module_exit(cleanup_magic); ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Karol Lewandowski"); ++MODULE_DESCRIPTION("MTD map and partitions for IBM 405EP MagicBox boards"); +diff -Nur linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-owrt/drivers/mtd/maps/Makefile +--- linux-2.6.17/drivers/mtd/maps/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/mtd/maps/Makefile 2006-08-25 23:33:05.000000000 +0200 +@@ -58,6 +58,7 @@ + obj-$(CONFIG_MTD_BEECH) += beech-mtd.o + obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o + obj-$(CONFIG_MTD_WALNUT) += walnut.o ++obj-$(CONFIG_MTD_MAGICMAP) += magicmap.o + obj-$(CONFIG_MTD_H720X) += h720x-flash.o + obj-$(CONFIG_MTD_SBC8240) += sbc8240.o + obj-$(CONFIG_MTD_NOR_TOTO) += omap-toto-flash.o +diff -Nur linux-2.6.17/include/asm-ppc/ibm4xx.h linux-2.6.17-owrt/include/asm-ppc/ibm4xx.h +--- linux-2.6.17/include/asm-ppc/ibm4xx.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/include/asm-ppc/ibm4xx.h 2006-08-25 23:33:05.000000000 +0200 +@@ -19,6 +19,10 @@ + + #ifdef CONFIG_40x + ++#if defined(CONFIG_MAGICBOX) ++#include <platforms/4xx/magicbox.h> ++#endif ++ + #if defined(CONFIG_BUBINGA) + #include <platforms/4xx/bubinga.h> + #endif diff --git a/openwrt/toolchain/Makefile b/openwrt/toolchain/Makefile index fb54bddf908..0b8b6286075 100644 --- a/openwrt/toolchain/Makefile +++ b/openwrt/toolchain/Makefile @@ -11,7 +11,7 @@ TARGETS-y:=sed kernel-headers sstrip ifeq ($(CONFIG_NATIVE_TOOLCHAIN),) TARGETS-y+=binutils gcc uClibc endif -TARGETS-y+=ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma +TARGETS-y+=ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma mkimage TARGETS-$(CONFIG_GDB) += gdb diff --git a/openwrt/toolchain/kernel-headers/files/config.ppc b/openwrt/toolchain/kernel-headers/files/config.ppc new file mode 100644 index 00000000000..cbd1279a15e --- /dev/null +++ b/openwrt/toolchain/kernel-headers/files/config.ppc @@ -0,0 +1,341 @@ +# +# Automatically generated by make menuconfig: don't edit +# +# CONFIG_UID16 is not set +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_HAVE_DEC_LOCK=y + +# +# Code maturity level options +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_ADVANCED_OPTIONS is not set + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# Platform support +# +CONFIG_PPC=y +CONFIG_PPC32=y +# CONFIG_6xx is not set +CONFIG_40x=y +# CONFIG_44x is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8xx is not set +CONFIG_4xx=y +# CONFIG_CPCI405 is not set +# CONFIG_EP405 is not set +# CONFIG_REDWOOD_5 is not set +# CONFIG_REDWOOD_6 is not set +# CONFIG_OAK is not set +CONFIG_WALNUT=y +# CONFIG_SMP is not set +# CONFIG_MATH_EMULATION is not set +CONFIG_NOT_COHERENT_CACHE=y +CONFIG_UART0_TTYS0=y +# CONFIG_UART0_TTYS1 is not set +CONFIG_405GP=y +CONFIG_IBM_OCP=y +CONFIG_PPC_OCP=y +CONFIG_405=y +CONFIG_IBM405_ERR51=y +CONFIG_IBM405_ERR77=y +# CONFIG_PPC4xx_DMA is not set +CONFIG_IBM_OPENBIOS=y +CONFIG_BIOS_FIXUP=y + +# +# General setup +# +# CONFIG_HIGHMEM is not set +CONFIG_HIGHMEM_START=0xfe000000 +CONFIG_LOWMEM_SIZE=0x30000000 +CONFIG_KERNEL_START=0xc0000000 +CONFIG_TASK_SIZE=0x80000000 +# CONFIG_ISA is not set +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +# CONFIG_PCI is not set +# CONFIG_PC_KEYBOARD is not set +# CONFIG_NET is not set +# CONFIG_SYSCTL is not set +# CONFIG_SYSVIPC is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_BINFMT_ELF=y +CONFIG_KERNEL_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_OOM_KILLER is not set +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set +# CONFIG_GEN_RTC is not set +# CONFIG_PPC_RTC is not set +# CONFIG_CMDLINE_BOOL is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_CISS_MONITOR_THREAD is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_BLK_STATS is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# ATA/IDE/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Console drivers +# + +# +# Frame-buffer support +# +# CONFIG_FB is not set + +# +# Input core support +# +# CONFIG_INPUT is not set +# CONFIG_INPUT_KEYBDEV is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_UINPUT is not set + +# +# Macintosh device drivers +# + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_UNIX98_PTYS is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_SCx200 is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set + +# +# Direct Rendering Manager (XFree86 DRI support) +# +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set +CONFIG_RAMFS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +# CONFIG_PROC_FS is not set +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_EXT2_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_XFS_FS is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_TRACE is not set +# CONFIG_XFS_DEBUG is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_SMB_FS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMB_NLS is not set +# CONFIG_NLS is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# Support for USB gadgets +# +# CONFIG_USB_GADGET is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +# CONFIG_ZLIB_INFLATE is not set +# CONFIG_ZLIB_DEFLATE is not set + +# +# Kernel hacking +# +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=0 diff --git a/openwrt/toolchain/mkimage/Makefile b/openwrt/toolchain/mkimage/Makefile new file mode 100644 index 00000000000..ec27e2716ad --- /dev/null +++ b/openwrt/toolchain/mkimage/Makefile @@ -0,0 +1,26 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/host-build.mk + +PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/mkimage + +define Build/Compile + $(CC) -O -c src/crc32.c -o $(PKG_BUILD_DIR)/crc32.o + $(CC) -O -c src/mkimage.c -o $(PKG_BUILD_DIR)/mkimage.o + $(CC) -O -o $(PKG_BUILD_DIR)/mkimage $(PKG_BUILD_DIR)/mkimage.o $(PKG_BUILD_DIR)/crc32.o +endef + +define Build/Install + $(CP) $(PKG_BUILD_DIR)/mkimage $(STAGING_DIR)/bin +endef + +define Build/Clean + rm -f $(STAGING_DIR)/bin/mkimage +endef + +$(eval $(call HostBuild)) diff --git a/openwrt/toolchain/mkimage/src/crc32.c b/openwrt/toolchain/mkimage/src/crc32.c new file mode 100644 index 00000000000..9294fcba03e --- /dev/null +++ b/openwrt/toolchain/mkimage/src/crc32.c @@ -0,0 +1,197 @@ +/* + * This file is derived from crc32.c from the zlib-1.1.3 distribution + * by Jean-loup Gailly and Mark Adler. + */ + +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ +#define USE_HOSTCC +#ifndef USE_HOSTCC /* Shut down "ANSI does not permit..." warnings */ +#include <common.h> /* to get command definitions like CFG_CMD_JFFS2 */ +#endif + +#include "zlib.h" + +#define local static +#define ZEXPORT /* empty */ +unsigned long crc32 (unsigned long, const unsigned char *, unsigned int); + +#ifdef DYNAMIC_CRC_TABLE + +local int crc_table_empty = 1; +local uLongf crc_table[256]; +local void make_crc_table OF((void)); + +/* + Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all + the information needed to generate CRC's on data a byte at a time for all + combinations of CRC register values and incoming bytes. +*/ +local void make_crc_table() +{ + uLong c; + int n, k; + uLong poly; /* polynomial exclusive-or pattern */ + /* terms of polynomial defining this crc (except x^32): */ + static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* make exclusive-or pattern from polynomial (0xedb88320L) */ + poly = 0L; + for (n = 0; n < sizeof(p)/sizeof(Byte); n++) + poly |= 1L << (31 - p[n]); + + for (n = 0; n < 256; n++) + { + c = (uLong)n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ (c >> 1) : c >> 1; + crc_table[n] = c; + } + crc_table_empty = 0; +} +#else +/* ======================================================================== + * Table of CRC-32's of all single-byte values (made by make_crc_table) + */ +local const uLongf crc_table[256] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +}; +#endif + +#if 0 +/* ========================================================================= + * This function can be used by asm versions of crc32() + */ +const uLongf * ZEXPORT get_crc_table() +{ +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) make_crc_table(); +#endif + return (const uLongf *)crc_table; +} +#endif + +/* ========================================================================= */ +#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); +#define DO2(buf) DO1(buf); DO1(buf); +#define DO4(buf) DO2(buf); DO2(buf); +#define DO8(buf) DO4(buf); DO4(buf); + +/* ========================================================================= */ +uLong ZEXPORT crc32(crc, buf, len) + uLong crc; + const Bytef *buf; + uInt len; +{ +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif + crc = crc ^ 0xffffffffL; + while (len >= 8) + { + DO8(buf); + len -= 8; + } + if (len) do { + DO1(buf); + } while (--len); + return crc ^ 0xffffffffL; +} + +#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) + +/* No ones complement version. JFFS2 (and other things ?) + * don't use ones compliment in their CRC calculations. + */ +uLong ZEXPORT crc32_no_comp(uLong crc, const Bytef *buf, uInt len) +{ +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif + while (len >= 8) + { + DO8(buf); + len -= 8; + } + if (len) do { + DO1(buf); + } while (--len); + + return crc; +} + +#endif /* CFG_CMD_JFFS2 */ diff --git a/openwrt/toolchain/mkimage/src/image.h b/openwrt/toolchain/mkimage/src/image.h new file mode 100644 index 00000000000..af37bcad5aa --- /dev/null +++ b/openwrt/toolchain/mkimage/src/image.h @@ -0,0 +1,157 @@ +/* + * (C) Copyright 2000-2005 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * 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 + * + ******************************************************************** + * NOTE: This header file defines an interface to U-Boot. Including + * this (unmodified) header file in another file is considered normal + * use of U-Boot, and does *not* fall under the heading of "derived + * work". + ******************************************************************** + */ + +#ifndef __IMAGE_H__ +#define __IMAGE_H__ + +/* + * Operating System Codes + */ +#define IH_OS_INVALID 0 /* Invalid OS */ +#define IH_OS_OPENBSD 1 /* OpenBSD */ +#define IH_OS_NETBSD 2 /* NetBSD */ +#define IH_OS_FREEBSD 3 /* FreeBSD */ +#define IH_OS_4_4BSD 4 /* 4.4BSD */ +#define IH_OS_LINUX 5 /* Linux */ +#define IH_OS_SVR4 6 /* SVR4 */ +#define IH_OS_ESIX 7 /* Esix */ +#define IH_OS_SOLARIS 8 /* Solaris */ +#define IH_OS_IRIX 9 /* Irix */ +#define IH_OS_SCO 10 /* SCO */ +#define IH_OS_DELL 11 /* Dell */ +#define IH_OS_NCR 12 /* NCR */ +#define IH_OS_LYNXOS 13 /* LynxOS */ +#define IH_OS_VXWORKS 14 /* VxWorks */ +#define IH_OS_PSOS 15 /* pSOS */ +#define IH_OS_QNX 16 /* QNX */ +#define IH_OS_U_BOOT 17 /* Firmware */ +#define IH_OS_RTEMS 18 /* RTEMS */ +#define IH_OS_ARTOS 19 /* ARTOS */ +#define IH_OS_UNITY 20 /* Unity OS */ + +/* + * CPU Architecture Codes (supported by Linux) + */ +#define IH_CPU_INVALID 0 /* Invalid CPU */ +#define IH_CPU_ALPHA 1 /* Alpha */ +#define IH_CPU_ARM 2 /* ARM */ +#define IH_CPU_I386 3 /* Intel x86 */ +#define IH_CPU_IA64 4 /* IA64 */ +#define IH_CPU_MIPS 5 /* MIPS */ +#define IH_CPU_MIPS64 6 /* MIPS 64 Bit */ +#define IH_CPU_PPC 7 /* PowerPC */ +#define IH_CPU_S390 8 /* IBM S390 */ +#define IH_CPU_SH 9 /* SuperH */ +#define IH_CPU_SPARC 10 /* Sparc */ +#define IH_CPU_SPARC64 11 /* Sparc 64 Bit */ +#define IH_CPU_M68K 12 /* M68K */ +#define IH_CPU_NIOS 13 /* Nios-32 */ +#define IH_CPU_MICROBLAZE 14 /* MicroBlaze */ +#define IH_CPU_NIOS2 15 /* Nios-II */ + +/* + * Image Types + * + * "Standalone Programs" are directly runnable in the environment + * provided by U-Boot; it is expected that (if they behave + * well) you can continue to work in U-Boot after return from + * the Standalone Program. + * "OS Kernel Images" are usually images of some Embedded OS which + * will take over control completely. Usually these programs + * will install their own set of exception handlers, device + * drivers, set up the MMU, etc. - this means, that you cannot + * expect to re-enter U-Boot except by resetting the CPU. + * "RAMDisk Images" are more or less just data blocks, and their + * parameters (address, size) are passed to an OS kernel that is + * being started. + * "Multi-File Images" contain several images, typically an OS + * (Linux) kernel image and one or more data images like + * RAMDisks. This construct is useful for instance when you want + * to boot over the network using BOOTP etc., where the boot + * server provides just a single image file, but you want to get + * for instance an OS kernel and a RAMDisk image. + * + * "Multi-File Images" start with a list of image sizes, each + * image size (in bytes) specified by an "uint32_t" in network + * byte order. This list is terminated by an "(uint32_t)0". + * Immediately after the terminating 0 follow the images, one by + * one, all aligned on "uint32_t" boundaries (size rounded up to + * a multiple of 4 bytes - except for the last file). + * + * "Firmware Images" are binary images containing firmware (like + * U-Boot or FPGA images) which usually will be programmed to + * flash memory. + * + * "Script files" are command sequences that will be executed by + * U-Boot's command interpreter; this feature is especially + * useful when you configure U-Boot to use a real shell (hush) + * as command interpreter (=> Shell Scripts). + */ + +#define IH_TYPE_INVALID 0 /* Invalid Image */ +#define IH_TYPE_STANDALONE 1 /* Standalone Program */ +#define IH_TYPE_KERNEL 2 /* OS Kernel Image */ +#define IH_TYPE_RAMDISK 3 /* RAMDisk Image */ +#define IH_TYPE_MULTI 4 /* Multi-File Image */ +#define IH_TYPE_FIRMWARE 5 /* Firmware Image */ +#define IH_TYPE_SCRIPT 6 /* Script file */ +#define IH_TYPE_FILESYSTEM 7 /* Filesystem Image (any type) */ + +/* + * Compression Types + */ +#define IH_COMP_NONE 0 /* No Compression Used */ +#define IH_COMP_GZIP 1 /* gzip Compression Used */ +#define IH_COMP_BZIP2 2 /* bzip2 Compression Used */ + +#define IH_MAGIC 0x27051956 /* Image Magic Number */ +#define IH_NMLEN 32 /* Image Name Length */ + +/* + * all data in network byte order (aka natural aka bigendian) + */ + +typedef struct image_header { + uint32_t ih_magic; /* Image Header Magic Number */ + uint32_t ih_hcrc; /* Image Header CRC Checksum */ + uint32_t ih_time; /* Image Creation Timestamp */ + uint32_t ih_size; /* Image Data Size */ + uint32_t ih_load; /* Data Load Address */ + uint32_t ih_ep; /* Entry Point Address */ + uint32_t ih_dcrc; /* Image Data CRC Checksum */ + uint8_t ih_os; /* Operating System */ + uint8_t ih_arch; /* CPU architecture */ + uint8_t ih_type; /* Image Type */ + uint8_t ih_comp; /* Compression Type */ + uint8_t ih_name[IH_NMLEN]; /* Image Name */ +} image_header_t; + + +#endif /* __IMAGE_H__ */ diff --git a/openwrt/toolchain/mkimage/src/mkimage.c b/openwrt/toolchain/mkimage/src/mkimage.c new file mode 100644 index 00000000000..6490da8c1ca --- /dev/null +++ b/openwrt/toolchain/mkimage/src/mkimage.c @@ -0,0 +1,745 @@ +/* + * (C) Copyright 2000-2004 + * DENX Software Engineering + * Wolfgang Denk, wd@denx.de + * All rights reserved. + * + * 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 <errno.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#ifndef __WIN32__ +#include <netinet/in.h> /* for host / network byte order conversions */ +#endif +#include <sys/mman.h> +#include <sys/stat.h> +#include <time.h> +#include <unistd.h> + +#if defined(__BEOS__) || defined(__NetBSD__) || defined(__APPLE__) +#include <inttypes.h> +#endif + +#ifdef __WIN32__ +typedef unsigned int __u32; + +#define SWAP_LONG(x) \ + ((__u32)( \ + (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ + (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ + (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ + (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; + +#define ntohl(a) SWAP_LONG(a) +#define htonl(a) SWAP_LONG(a) +#endif /* __WIN32__ */ + +#ifndef O_BINARY /* should be define'd on __WIN32__ */ +#define O_BINARY 0 +#endif + +#include "image.h" + +extern int errno; + +#ifndef MAP_FAILED +#define MAP_FAILED (-1) +#endif + +char *cmdname; + +extern unsigned long crc32 (unsigned long crc, const char *buf, unsigned int len); + +typedef struct table_entry { + int val; /* as defined in image.h */ + char *sname; /* short (input) name */ + char *lname; /* long (output) name */ +} table_entry_t; + +table_entry_t arch_name[] = { + { IH_CPU_INVALID, NULL, "Invalid CPU", }, + { IH_CPU_ALPHA, "alpha", "Alpha", }, + { IH_CPU_ARM, "arm", "ARM", }, + { IH_CPU_I386, "x86", "Intel x86", }, + { IH_CPU_IA64, "ia64", "IA64", }, + { IH_CPU_M68K, "m68k", "MC68000", }, + { IH_CPU_MICROBLAZE, "microblaze", "MicroBlaze", }, + { IH_CPU_MIPS, "mips", "MIPS", }, + { IH_CPU_MIPS64, "mips64", "MIPS 64 Bit", }, + { IH_CPU_NIOS, "nios", "NIOS", }, + { IH_CPU_NIOS2, "nios2", "NIOS II", }, + { IH_CPU_PPC, "ppc", "PowerPC", }, + { IH_CPU_S390, "s390", "IBM S390", }, + { IH_CPU_SH, "sh", "SuperH", }, + { IH_CPU_SPARC, "sparc", "SPARC", }, + { IH_CPU_SPARC64, "sparc64", "SPARC 64 Bit", }, + { -1, "", "", }, +}; + +table_entry_t os_name[] = { + { IH_OS_INVALID, NULL, "Invalid OS", }, + { IH_OS_4_4BSD, "4_4bsd", "4_4BSD", }, + { IH_OS_ARTOS, "artos", "ARTOS", }, + { IH_OS_DELL, "dell", "Dell", }, + { IH_OS_ESIX, "esix", "Esix", }, + { IH_OS_FREEBSD, "freebsd", "FreeBSD", }, + { IH_OS_IRIX, "irix", "Irix", }, + { IH_OS_LINUX, "linux", "Linux", }, + { IH_OS_LYNXOS, "lynxos", "LynxOS", }, + { IH_OS_NCR, "ncr", "NCR", }, + { IH_OS_NETBSD, "netbsd", "NetBSD", }, + { IH_OS_OPENBSD, "openbsd", "OpenBSD", }, + { IH_OS_PSOS, "psos", "pSOS", }, + { IH_OS_QNX, "qnx", "QNX", }, + { IH_OS_RTEMS, "rtems", "RTEMS", }, + { IH_OS_SCO, "sco", "SCO", }, + { IH_OS_SOLARIS, "solaris", "Solaris", }, + { IH_OS_SVR4, "svr4", "SVR4", }, + { IH_OS_U_BOOT, "u-boot", "U-Boot", }, + { IH_OS_VXWORKS, "vxworks", "VxWorks", }, + { -1, "", "", }, +}; + +table_entry_t type_name[] = { + { IH_TYPE_INVALID, NULL, "Invalid Image", }, + { IH_TYPE_FILESYSTEM, "filesystem", "Filesystem Image", }, + { IH_TYPE_FIRMWARE, "firmware", "Firmware", }, + { IH_TYPE_KERNEL, "kernel", "Kernel Image", }, + { IH_TYPE_MULTI, "multi", "Multi-File Image", }, + { IH_TYPE_RAMDISK, "ramdisk", "RAMDisk Image", }, + { IH_TYPE_SCRIPT, "script", "Script", }, + { IH_TYPE_STANDALONE, "standalone", "Standalone Program", }, + { -1, "", "", }, +}; + +table_entry_t comp_name[] = { + { IH_COMP_NONE, "none", "uncompressed", }, + { IH_COMP_BZIP2, "bzip2", "bzip2 compressed", }, + { IH_COMP_GZIP, "gzip", "gzip compressed", }, + { -1, "", "", }, +}; + +static void copy_file (int, const char *, int); +static void usage (void); +static void print_header (image_header_t *); +static void print_type (image_header_t *); +static char *put_table_entry (table_entry_t *, char *, int); +static char *put_arch (int); +static char *put_type (int); +static char *put_os (int); +static char *put_comp (int); +static int get_table_entry (table_entry_t *, char *, char *); +static int get_arch(char *); +static int get_comp(char *); +static int get_os (char *); +static int get_type(char *); + + +char *datafile; +char *imagefile; + +int dflag = 0; +int eflag = 0; +int lflag = 0; +int vflag = 0; +int xflag = 0; +int opt_os = IH_OS_LINUX; +int opt_arch = IH_CPU_PPC; +int opt_type = IH_TYPE_KERNEL; +int opt_comp = IH_COMP_GZIP; + +image_header_t header; +image_header_t *hdr = &header; + +int +main (int argc, char **argv) +{ + int ifd; + uint32_t checksum; + uint32_t addr; + uint32_t ep; + struct stat sbuf; + unsigned char *ptr; + char *name = ""; + + cmdname = *argv; + + addr = ep = 0; + + while (--argc > 0 && **++argv == '-') { + while (*++*argv) { + switch (**argv) { + case 'l': + lflag = 1; + break; + case 'A': + if ((--argc <= 0) || + (opt_arch = get_arch(*++argv)) < 0) + usage (); + goto NXTARG; + case 'C': + if ((--argc <= 0) || + (opt_comp = get_comp(*++argv)) < 0) + usage (); + goto NXTARG; + case 'O': + if ((--argc <= 0) || + (opt_os = get_os(*++argv)) < 0) + usage (); + goto NXTARG; + case 'T': + if ((--argc <= 0) || + (opt_type = get_type(*++argv)) < 0) + usage (); + goto NXTARG; + + case 'a': + if (--argc <= 0) + usage (); + addr = strtoul (*++argv, (char **)&ptr, 16); + if (*ptr) { + fprintf (stderr, + "%s: invalid load address %s\n", + cmdname, *argv); + exit (EXIT_FAILURE); + } + goto NXTARG; + case 'd': + if (--argc <= 0) + usage (); + datafile = *++argv; + dflag = 1; + goto NXTARG; + case 'e': + if (--argc <= 0) + usage (); + ep = strtoul (*++argv, (char **)&ptr, 16); + if (*ptr) { + fprintf (stderr, + "%s: invalid entry point %s\n", + cmdname, *argv); + exit (EXIT_FAILURE); + } + eflag = 1; + goto NXTARG; + case 'n': + if (--argc <= 0) + usage (); + name = *++argv; + goto NXTARG; + case 'v': + vflag++; + break; + case 'x': + xflag++; + break; + default: + usage (); + } + } +NXTARG: ; + } + + if ((argc != 1) || ((lflag ^ dflag) == 0)) + usage(); + + if (!eflag) { + ep = addr; + /* If XIP, entry point must be after the U-Boot header */ + if (xflag) + ep += sizeof(image_header_t); + } + + /* + * If XIP, ensure the entry point is equal to the load address plus + * the size of the U-Boot header. + */ + if (xflag) { + if (ep != addr + sizeof(image_header_t)) { + fprintf (stderr, "%s: For XIP, the entry point must be the load addr + %lu\n", + cmdname, + (unsigned long)sizeof(image_header_t)); + exit (EXIT_FAILURE); + } + } + + imagefile = *argv; + + if (lflag) { + ifd = open(imagefile, O_RDONLY|O_BINARY); + } else { + ifd = open(imagefile, O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0666); + } + + if (ifd < 0) { + fprintf (stderr, "%s: Can't open %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + if (lflag) { + int len; + char *data; + /* + * list header information of existing image + */ + if (fstat(ifd, &sbuf) < 0) { + fprintf (stderr, "%s: Can't stat %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + if ((unsigned)sbuf.st_size < sizeof(image_header_t)) { + fprintf (stderr, + "%s: Bad size: \"%s\" is no valid image\n", + cmdname, imagefile); + exit (EXIT_FAILURE); + } + + ptr = (unsigned char *)mmap(0, sbuf.st_size, + PROT_READ, MAP_SHARED, ifd, 0); + if ((caddr_t)ptr == (caddr_t)-1) { + fprintf (stderr, "%s: Can't read %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + /* + * create copy of header so that we can blank out the + * checksum field for checking - this can't be done + * on the PROT_READ mapped data. + */ + memcpy (hdr, ptr, sizeof(image_header_t)); + + if (ntohl(hdr->ih_magic) != IH_MAGIC) { + fprintf (stderr, + "%s: Bad Magic Number: \"%s\" is no valid image\n", + cmdname, imagefile); + exit (EXIT_FAILURE); + } + + data = (char *)hdr; + len = sizeof(image_header_t); + + checksum = ntohl(hdr->ih_hcrc); + hdr->ih_hcrc = htonl(0); /* clear for re-calculation */ + + if (crc32 (0, data, len) != checksum) { + fprintf (stderr, + "*** Warning: \"%s\" has bad header checksum!\n", + imagefile); + } + + data = (char *)(ptr + sizeof(image_header_t)); + len = sbuf.st_size - sizeof(image_header_t) ; + + if (crc32 (0, data, len) != ntohl(hdr->ih_dcrc)) { + fprintf (stderr, + "*** Warning: \"%s\" has corrupted data!\n", + imagefile); + } + + /* for multi-file images we need the data part, too */ + print_header ((image_header_t *)ptr); + + (void) munmap((void *)ptr, sbuf.st_size); + (void) close (ifd); + + exit (EXIT_SUCCESS); + } + + /* + * Must be -w then: + * + * write dummy header, to be fixed later + */ + memset (hdr, 0, sizeof(image_header_t)); + + if (write(ifd, hdr, sizeof(image_header_t)) != sizeof(image_header_t)) { + fprintf (stderr, "%s: Write error on %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + if (opt_type == IH_TYPE_MULTI || opt_type == IH_TYPE_SCRIPT) { + char *file = datafile; + unsigned long size; + + for (;;) { + char *sep = NULL; + + if (file) { + if ((sep = strchr(file, ':')) != NULL) { + *sep = '\0'; + } + + if (stat (file, &sbuf) < 0) { + fprintf (stderr, "%s: Can't stat %s: %s\n", + cmdname, file, strerror(errno)); + exit (EXIT_FAILURE); + } + size = htonl(sbuf.st_size); + } else { + size = 0; + } + + if (write(ifd, (char *)&size, sizeof(size)) != sizeof(size)) { + fprintf (stderr, "%s: Write error on %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + if (!file) { + break; + } + + if (sep) { + *sep = ':'; + file = sep + 1; + } else { + file = NULL; + } + } + + file = datafile; + + for (;;) { + char *sep = strchr(file, ':'); + if (sep) { + *sep = '\0'; + copy_file (ifd, file, 1); + *sep++ = ':'; + file = sep; + } else { + copy_file (ifd, file, 0); + break; + } + } + } else { + copy_file (ifd, datafile, 0); + } + + /* We're a bit of paranoid */ +#if defined(_POSIX_SYNCHRONIZED_IO) && !defined(__sun__) && !defined(__FreeBSD__) + (void) fdatasync (ifd); +#else + (void) fsync (ifd); +#endif + + if (fstat(ifd, &sbuf) < 0) { + fprintf (stderr, "%s: Can't stat %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + ptr = (unsigned char *)mmap(0, sbuf.st_size, + PROT_READ|PROT_WRITE, MAP_SHARED, ifd, 0); + if (ptr == (unsigned char *)MAP_FAILED) { + fprintf (stderr, "%s: Can't map %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + hdr = (image_header_t *)ptr; + + checksum = crc32 (0, + (const char *)(ptr + sizeof(image_header_t)), + sbuf.st_size - sizeof(image_header_t) + ); + + /* Build new header */ + hdr->ih_magic = htonl(IH_MAGIC); + hdr->ih_time = htonl(sbuf.st_mtime); + hdr->ih_size = htonl(sbuf.st_size - sizeof(image_header_t)); + hdr->ih_load = htonl(addr); + hdr->ih_ep = htonl(ep); + hdr->ih_dcrc = htonl(checksum); + hdr->ih_os = opt_os; + hdr->ih_arch = opt_arch; + hdr->ih_type = opt_type; + hdr->ih_comp = opt_comp; + + strncpy((char *)hdr->ih_name, name, IH_NMLEN); + + checksum = crc32(0,(const char *)hdr,sizeof(image_header_t)); + + hdr->ih_hcrc = htonl(checksum); + + print_header (hdr); + + (void) munmap((void *)ptr, sbuf.st_size); + + /* We're a bit of paranoid */ +#if defined(_POSIX_SYNCHRONIZED_IO) && !defined(__sun__) && !defined(__FreeBSD__) + (void) fdatasync (ifd); +#else + (void) fsync (ifd); +#endif + + if (close(ifd)) { + fprintf (stderr, "%s: Write error on %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + exit (EXIT_SUCCESS); +} + +static void +copy_file (int ifd, const char *datafile, int pad) +{ + int dfd; + struct stat sbuf; + unsigned char *ptr; + int tail; + int zero = 0; + int offset = 0; + int size; + + if (vflag) { + fprintf (stderr, "Adding Image %s\n", datafile); + } + + if ((dfd = open(datafile, O_RDONLY|O_BINARY)) < 0) { + fprintf (stderr, "%s: Can't open %s: %s\n", + cmdname, datafile, strerror(errno)); + exit (EXIT_FAILURE); + } + + if (fstat(dfd, &sbuf) < 0) { + fprintf (stderr, "%s: Can't stat %s: %s\n", + cmdname, datafile, strerror(errno)); + exit (EXIT_FAILURE); + } + + ptr = (unsigned char *)mmap(0, sbuf.st_size, + PROT_READ, MAP_SHARED, dfd, 0); + if (ptr == (unsigned char *)MAP_FAILED) { + fprintf (stderr, "%s: Can't read %s: %s\n", + cmdname, datafile, strerror(errno)); + exit (EXIT_FAILURE); + } + + if (xflag) { + unsigned char *p = NULL; + /* + * XIP: do not append the image_header_t at the + * beginning of the file, but consume the space + * reserved for it. + */ + + if ((unsigned)sbuf.st_size < sizeof(image_header_t)) { + fprintf (stderr, + "%s: Bad size: \"%s\" is too small for XIP\n", + cmdname, datafile); + exit (EXIT_FAILURE); + } + + for (p=ptr; p < ptr+sizeof(image_header_t); p++) { + if ( *p != 0xff ) { + fprintf (stderr, + "%s: Bad file: \"%s\" has invalid buffer for XIP\n", + cmdname, datafile); + exit (EXIT_FAILURE); + } + } + + offset = sizeof(image_header_t); + } + + size = sbuf.st_size - offset; + if (write(ifd, ptr + offset, size) != size) { + fprintf (stderr, "%s: Write error on %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + + if (pad && ((tail = size % 4) != 0)) { + + if (write(ifd, (char *)&zero, 4-tail) != 4-tail) { + fprintf (stderr, "%s: Write error on %s: %s\n", + cmdname, imagefile, strerror(errno)); + exit (EXIT_FAILURE); + } + } + + (void) munmap((void *)ptr, sbuf.st_size); + (void) close (dfd); +} + +void +usage () +{ + fprintf (stderr, "Usage: %s -l image\n" + " -l ==> list image header information\n" + " %s [-x] -A arch -O os -T type -C comp " + "-a addr -e ep -n name -d data_file[:data_file...] image\n", + cmdname, cmdname); + fprintf (stderr, " -A ==> set architecture to 'arch'\n" + " -O ==> set operating system to 'os'\n" + " -T ==> set image type to 'type'\n" + " -C ==> set compression type 'comp'\n" + " -a ==> set load address to 'addr' (hex)\n" + " -e ==> set entry point to 'ep' (hex)\n" + " -n ==> set image name to 'name'\n" + " -d ==> use image data from 'datafile'\n" + " -x ==> set XIP (execute in place)\n" + ); + exit (EXIT_FAILURE); +} + +static void +print_header (image_header_t *hdr) +{ + time_t timestamp; + uint32_t size; + + timestamp = (time_t)ntohl(hdr->ih_time); + size = ntohl(hdr->ih_size); + + printf ("Image Name: %.*s\n", IH_NMLEN, hdr->ih_name); + printf ("Created: %s", ctime(×tamp)); + printf ("Image Type: "); print_type(hdr); + printf ("Data Size: %d Bytes = %.2f kB = %.2f MB\n", + size, (double)size / 1.024e3, (double)size / 1.048576e6 ); + printf ("Load Address: 0x%08X\n", ntohl(hdr->ih_load)); + printf ("Entry Point: 0x%08X\n", ntohl(hdr->ih_ep)); + + if (hdr->ih_type == IH_TYPE_MULTI || hdr->ih_type == IH_TYPE_SCRIPT) { + int i, ptrs; + uint32_t pos; + unsigned long *len_ptr = (unsigned long *) ( + (unsigned long)hdr + sizeof(image_header_t) + ); + + /* determine number of images first (to calculate image offsets) */ + for (i=0; len_ptr[i]; ++i) /* null pointer terminates list */ + ; + ptrs = i; /* null pointer terminates list */ + + pos = sizeof(image_header_t) + ptrs * sizeof(long); + printf ("Contents:\n"); + for (i=0; len_ptr[i]; ++i) { + size = ntohl(len_ptr[i]); + + printf (" Image %d: %8d Bytes = %4d kB = %d MB\n", + i, size, size>>10, size>>20); + if (hdr->ih_type == IH_TYPE_SCRIPT && i > 0) { + /* + * the user may need to know offsets + * if planning to do something with + * multiple files + */ + printf (" Offset = %08X\n", pos); + } + /* copy_file() will pad the first files to even word align */ + size += 3; + size &= ~3; + pos += size; + } + } +} + + +static void +print_type (image_header_t *hdr) +{ + printf ("%s %s %s (%s)\n", + put_arch (hdr->ih_arch), + put_os (hdr->ih_os ), + put_type (hdr->ih_type), + put_comp (hdr->ih_comp) + ); +} + +static char *put_arch (int arch) +{ + return (put_table_entry(arch_name, "Unknown Architecture", arch)); +} + +static char *put_os (int os) +{ + return (put_table_entry(os_name, "Unknown OS", os)); +} + +static char *put_type (int type) +{ + return (put_table_entry(type_name, "Unknown Image", type)); +} + +static char *put_comp (int comp) +{ + return (put_table_entry(comp_name, "Unknown Compression", comp)); +} + +static char *put_table_entry (table_entry_t *table, char *msg, int type) +{ + for (; table->val>=0; ++table) { + if (table->val == type) + return (table->lname); + } + return (msg); +} + +static int get_arch(char *name) +{ + return (get_table_entry(arch_name, "CPU", name)); +} + + +static int get_comp(char *name) +{ + return (get_table_entry(comp_name, "Compression", name)); +} + + +static int get_os (char *name) +{ + return (get_table_entry(os_name, "OS", name)); +} + + +static int get_type(char *name) +{ + return (get_table_entry(type_name, "Image", name)); +} + +static int get_table_entry (table_entry_t *table, char *msg, char *name) +{ + table_entry_t *t; + int first = 1; + + for (t=table; t->val>=0; ++t) { + if (t->sname && strcasecmp(t->sname, name)==0) + return (t->val); + } + fprintf (stderr, "\nInvalid %s Type - valid names are", msg); + for (t=table; t->val>=0; ++t) { + if (t->sname == NULL) + continue; + fprintf (stderr, "%c %s", (first) ? ':' : ',', t->sname); + first = 0; + } + fprintf (stderr, "\n"); + return (-1); +} diff --git a/openwrt/toolchain/uClibc/patches/130-ppc_gcc4_fix.patch b/openwrt/toolchain/uClibc/patches/130-ppc_gcc4_fix.patch new file mode 100644 index 00000000000..c5416f37909 --- /dev/null +++ b/openwrt/toolchain/uClibc/patches/130-ppc_gcc4_fix.patch @@ -0,0 +1,223 @@ +diff -Nur uClibc-0.9.28/libc/sysdeps/linux/powerpc/bits/syscalls.h uClibc-0.9.28-owrt/libc/sysdeps/linux/powerpc/bits/syscalls.h +--- uClibc-0.9.28/libc/sysdeps/linux/powerpc/bits/syscalls.h 2005-08-18 00:49:41.000000000 +0200 ++++ uClibc-0.9.28-owrt/libc/sysdeps/linux/powerpc/bits/syscalls.h 2006-08-25 17:58:21.000000000 +0200 +@@ -5,67 +5,164 @@ + # error "Never use <bits/syscalls.h> directly; include <sys/syscall.h> instead." + #endif + ++#include <errno.h> ++ + /* This includes the `__NR_<name>' syscall numbers taken from the Linux kernel + * header files. It also defines the traditional `SYS_<name>' macros for older + * programs. */ + #include <bits/sysnum.h> + +- +-#define __STRINGIFY(s) __STRINGIFY2 (s) +-#define __STRINGIFY2(s) #s +- +-#undef JUMPTARGET +-#ifdef __PIC__ +-#define __MAKE_SYSCALL __STRINGIFY(__uClibc_syscall@plt) ++/* Define a macro which expands inline into the wrapper code for a system ++ call. This use is for internal calls that do not need to handle errors ++ normally. It will never touch errno. ++ On powerpc a system call basically clobbers the same registers like a ++ function call, with the exception of LR (which is needed for the ++ "sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal ++ an error return status). */ ++ ++# undef INLINE_SYSCALL ++#if 1 ++# define INLINE_SYSCALL(name, nr, args...) \ ++ ({ \ ++ INTERNAL_SYSCALL_DECL (sc_err); \ ++ long int sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, args); \ ++ if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \ ++ { \ ++ __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \ ++ sc_ret = -1L; \ ++ } \ ++ sc_ret; \ ++ }) + #else +-#define __MAKE_SYSCALL __STRINGIFY(__uClibc_syscall) ++# define INLINE_SYSCALL(name, nr, args...) \ ++ ({ \ ++ INTERNAL_SYSCALL_DECL (sc_err); \ ++ long int sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, args); \ ++ if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \ ++ { \ ++ sc_ret = __syscall_error(INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err));\ ++ } \ ++ sc_ret; \ ++ }) + #endif + +-#define unified_syscall_body(name) \ +- __asm__ ( \ +- ".section \".text\"\n\t" \ +- ".align 2\n\t" \ +- ".globl " __STRINGIFY(name) "\n\t" \ +- ".type " __STRINGIFY(name) ",@function\n\t" \ +- #name":\tli 0," __STRINGIFY(__NR_##name) "\n\t" \ +- "b " __MAKE_SYSCALL "\n\t" \ +- ".size\t" __STRINGIFY(name) ",.""-" __STRINGIFY(name) "\n" \ +- ) ++/* Define a macro which expands inline into the wrapper code for a system ++ call. This use is for internal calls that do not need to handle errors ++ normally. It will never touch errno. ++ On powerpc a system call basically clobbers the same registers like a ++ function call, with the exception of LR (which is needed for the ++ "sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal ++ an error return status). */ ++ ++# undef INTERNAL_SYSCALL_DECL ++# define INTERNAL_SYSCALL_DECL(err) long int err ++ ++# undef INTERNAL_SYSCALL ++# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ ++ ({ \ ++ register long int r0 __asm__ ("r0"); \ ++ register long int r3 __asm__ ("r3"); \ ++ register long int r4 __asm__ ("r4"); \ ++ register long int r5 __asm__ ("r5"); \ ++ register long int r6 __asm__ ("r6"); \ ++ register long int r7 __asm__ ("r7"); \ ++ register long int r8 __asm__ ("r8"); \ ++ register long int r9 __asm__ ("r9"); \ ++ register long int r10 __asm__ ("r10"); \ ++ register long int r11 __asm__ ("r11"); \ ++ register long int r12 __asm__ ("r12"); \ ++ LOADARGS_##nr(name, args); \ ++ __asm__ __volatile__ \ ++ ("sc \n\t" \ ++ "mfcr %0" \ ++ : "=&r" (r0), \ ++ "=&r" (r3), "=&r" (r4), "=&r" (r5), "=&r" (r6), "=&r" (r7), \ ++ "=&r" (r8), "=&r" (r9), "=&r" (r10), "=&r" (r11), "=&r" (r12) \ ++ : ASM_INPUT_##nr \ ++ : "cr0", "ctr", "memory"); \ ++ err = r0; \ ++ (int) r3; \ ++ }) ++# define INTERNAL_SYSCALL(name, err, nr, args...) \ ++ INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) ++ ++# undef INTERNAL_SYSCALL_ERROR_P ++# define INTERNAL_SYSCALL_ERROR_P(val, err) \ ++ ((void) (val), __builtin_expect ((err) & (1 << 28), 0)) ++ ++# undef INTERNAL_SYSCALL_ERRNO ++# define INTERNAL_SYSCALL_ERRNO(val, err) (val) ++ ++# define LOADARGS_0(name, dummy) \ ++ r0 = (long int)name ++# define LOADARGS_1(name, __arg1) \ ++ LOADARGS_0(name, 0); \ ++ r3 = (long int)__arg1 ++# define LOADARGS_2(name, __arg1, __arg2) \ ++ LOADARGS_1(name, __arg1); \ ++ r4 = (long int)__arg2 ++# define LOADARGS_3(name, __arg1, __arg2, __arg3) \ ++ LOADARGS_2(name, __arg1, __arg2); \ ++ r5 = (long int)__arg3 ++# define LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4) \ ++ LOADARGS_3(name, __arg1, __arg2, __arg3); \ ++ r6 = (long int)__arg4 ++# define LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5) \ ++ LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4); \ ++ r7 = (long int)__arg5 ++# define LOADARGS_6(name, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \ ++ LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5); \ ++ r8 = (long int)__arg6 ++ ++# define ASM_INPUT_0 "0" (r0) ++# define ASM_INPUT_1 ASM_INPUT_0, "1" (r3) ++# define ASM_INPUT_2 ASM_INPUT_1, "2" (r4) ++# define ASM_INPUT_3 ASM_INPUT_2, "3" (r5) ++# define ASM_INPUT_4 ASM_INPUT_3, "4" (r6) ++# define ASM_INPUT_5 ASM_INPUT_4, "5" (r7) ++# define ASM_INPUT_6 ASM_INPUT_5, "6" (r8) + + #undef _syscall0 +-#define _syscall0(type,name) \ +-type name(void); \ +-unified_syscall_body(name) ++#define _syscall0(type,name) \ ++type name(void){ \ ++ return (type) INLINE_SYSCALL(name, 0); \ ++} + + #undef _syscall1 + #define _syscall1(type,name,type1,arg1) \ +-type name(type1 arg1); \ +-unified_syscall_body(name) ++type name(type1 arg1){ \ ++ return (type) INLINE_SYSCALL(name, 1, arg1); \ ++} + + #undef _syscall2 + #define _syscall2(type,name,type1,arg1,type2,arg2) \ +-type name(type1 arg1, type2 arg2); \ +-unified_syscall_body(name) ++type name(type1 arg1, type2 arg2){ \ ++ return (type) INLINE_SYSCALL(name, 2, arg1, arg2); \ ++} + + #undef _syscall3 + #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ +-type name(type1 arg1, type2 arg2, type3 arg3); \ +-unified_syscall_body(name) ++type name(type1 arg1, type2 arg2, type3 arg3){ \ ++ return (type) INLINE_SYSCALL(name, 3, arg1, arg2, arg3); \ ++} + + #undef _syscall4 + #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ +-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4); \ +-unified_syscall_body(name) ++type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4){ \ ++ return (type) INLINE_SYSCALL(name, 4, arg1, arg2, arg3, arg4); \ ++} + + #undef _syscall5 + #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ +-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5); \ +-unified_syscall_body(name) ++type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5){ \ ++ return (type) INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \ ++} + + #undef _syscall6 + #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ +-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6); \ +-unified_syscall_body(name) ++type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6){ \ ++ return (type) INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6); \ ++} + + #endif /* _BITS_SYSCALLS_H */ + +diff -urP uClibc-0.9.28/libc/sysdeps/linux/powerpc/sys/procfs.h uClibc-0.9.28-uint128/libc/sysdeps/linux/powerpc/sys/procfs.h +--- uClibc-0.9.28/libc/sysdeps/linux/powerpc/sys/procfs.h 2005-08-18 00:49:41.000000000 +0200 ++++ uClibc-0.9.28-uint128/libc/sysdeps/linux/powerpc/sys/procfs.h 2005-08-22 17:27:17.000000000 +0200 +@@ -42,15 +42,10 @@ + typedef double elf_fpreg_t; + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + +-/* gcc 3.1 and newer support __uint128_t. */ +-#if !__GNUC_PREREQ(3,1) +-typedef struct { +- unsigned long u[4]; +-} __attribute((aligned(16))) __uint128_t; +-#endif +- + /* Altivec registers */ +-typedef __uint128_t elf_vrreg_t; ++typedef struct { ++ unsigned int u[4]; ++} __attribute((aligned (16))) elf_vrreg_t; + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; + + struct elf_siginfo From 69fb72bf22f0c30e09b88ee3b6df4417c382283d Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sat, 26 Aug 2006 01:04:43 +0000 Subject: [PATCH 519/757] clean up hotplug mounting scripts SVN-Revision: 4673 --- .../default/etc/hotplug.d/block/01-mount | 26 ++++++++++ .../default/etc/hotplug.d/usb/01-ln | 33 ++++++++++++ .../default/etc/hotplug.d/usb/01-mount | 52 ------------------- 3 files changed, 59 insertions(+), 52 deletions(-) create mode 100755 openwrt/package/base-files/default/etc/hotplug.d/block/01-mount create mode 100755 openwrt/package/base-files/default/etc/hotplug.d/usb/01-ln delete mode 100644 openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount diff --git a/openwrt/package/base-files/default/etc/hotplug.d/block/01-mount b/openwrt/package/base-files/default/etc/hotplug.d/block/01-mount new file mode 100755 index 00000000000..b6275e5a287 --- /dev/null +++ b/openwrt/package/base-files/default/etc/hotplug.d/block/01-mount @@ -0,0 +1,26 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +DEV=${DEVPATH##*/} +{ +echo "ACTION=$ACTION DEVPATH=$DEVPATH $0 $*" +case "$ACTION" in +add) + echo -ne "waiting for $DEV" + while [ ! -b /dev/$DEV ]; do { + echo -ne "." + sleep 1 + time=$((time+1)); [ $time -gt 10 ] && break + }; done + + [ ${DEV%%[0-9]} != ${DEV} ] && { + mkdir -p /tmp/$DEV + mount /dev/$DEV /tmp/$DEV -t auto -o sync + } + ;; +remove) + umount /tmp/$DEV + rm -rf /dev/$DEV /tmp/$DEV + ;; +esac +} 2>&1 | logger diff --git a/openwrt/package/base-files/default/etc/hotplug.d/usb/01-ln b/openwrt/package/base-files/default/etc/hotplug.d/usb/01-ln new file mode 100755 index 00000000000..f9eda02988f --- /dev/null +++ b/openwrt/package/base-files/default/etc/hotplug.d/usb/01-ln @@ -0,0 +1,33 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +case "$ACTION" in +add) + [ -f /sys/${DEVPATH}/idVendor -a "$(cat /sys/${DEVPATH}/idVendor)" -ne "0000" ] && { + cd /sys/${DEVPATH} + + NUM=${DEVPATH##*/} + HOST=$(find ${NUM}:*/host* -type d) + HOST=${HOST##*/host} + + echo -ne "waiting for disk" + + while [ ! -d "/dev/scsi/host${HOST}/bus0/target0/lun0" ]; do { + echo -ne "." + sleep 1; + time=$((time+1)); [ $time -gt 10 ] && break + }; done + echo + + cd /sys/bus/scsi/devices/${HOST}\:0\:0\:0 + for BLOCK in block:* ; do { + cd ${BLOCK} + BLOCK=${BLOCK##block\:} + ln -sf /dev/scsi/host${HOST}/bus0/target0/lun0/disc /dev/${BLOCK} + for DEV in ${BLOCK}*; do { + ln -sf /dev/scsi/host${HOST}/bus0/target0/lun0/part${DEV##$BLOCK} /dev/$DEV + }; done + }; done + } 2>&1 | logger + ;; +esac diff --git a/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount b/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount deleted file mode 100644 index c4d356b0dac..00000000000 --- a/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006 OpenWrt.org - -mount_storage() { - cd /dev/discs - for dev in disc*; do - [ -f /tmp/.${dev}_id ] || { - echo ${INTERFACE}${PRODUCT} > /tmp/.${dev}_id - mount | grep /mnt/${dev} || ( - [ -d /mnt/. ] || { - mkdir -p /tmp/mnt - ln -s /tmp/mnt / - } - cd $dev - for part in part*; do - path=/mnt/${dev}_${part##*part} - mkdir -p ${path} - mount ${part} ${path} - done - ) - } - done -} - -umount_storage() { - for tmp in /tmp/.*_id; do - id=$(cat $tmp 2>&-) - [ "${INTERFACE}${PRODUCT}" = "$id" ] && { - rm -f $tmp - disc=${tmp##*disc} - disc=${disc%%_id} - for disc in /mnt/disc${disc}*; do - umount -f $disc || umount -l $disc - done - } - done -} - -[ -f /proc/bus/usb/devices ] || mount -t usbfs none /proc/bus/usb - -case "$ACTION" in - add) - case "${INTERFACE%%/*}" in - 8) mount_storage ;; - esac - ;; - remove) - case "${INTERFACE%%/*}" in - 8) umount_storage ;; - esac - ;; -esac From db4a45ac7363508d1d2e69f24fcb38b099e1f11c Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sat, 26 Aug 2006 14:26:12 +0000 Subject: [PATCH 520/757] Remove executable bit from these Makefiles. Closes #728 SVN-Revision: 4681 --- openwrt/target/linux/uml-2.6/Makefile | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 openwrt/target/linux/uml-2.6/Makefile diff --git a/openwrt/target/linux/uml-2.6/Makefile b/openwrt/target/linux/uml-2.6/Makefile old mode 100755 new mode 100644 From 12eb1c316840776ababe91f93ca96c74e93d6c61 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 27 Aug 2006 10:05:58 +0000 Subject: [PATCH 521/757] fix find_config() in the network scripts SVN-Revision: 4682 --- openwrt/package/base-files/default/lib/network/config.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh index 5bc74d12853..ec05c3eb818 100755 --- a/openwrt/package/base-files/default/lib/network/config.sh +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -4,12 +4,15 @@ # DEBUG="echo" find_config() { - local iftype iface ifn + local iftype device iface ifaces ifn for ifn in $interfaces; do config_get iftype "$ifn" type config_get iface "$ifn" ifname + case "$iftype" in + bridge) config_get ifaces "$ifn" ifnames;; + esac config_get device "$ifn" device - for ifc in ${device:-$iface}; do + for ifc in $device $iface $ifaces; do [ "$ifc" = "$1" ] && { echo "$ifn" return 0 From b367cfb4e270dd4d377f258dc5a0d22d3743d883 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sun, 27 Aug 2006 11:11:55 +0000 Subject: [PATCH 522/757] fix minor typo & move loopback to network config SVN-Revision: 4683 --- openwrt/package/base-files/ar7-2.4/etc/config/network | 6 ++++++ openwrt/package/base-files/aruba-2.6/etc/config/network | 6 ++++++ openwrt/package/base-files/au1000-2.6/etc/config/network | 6 ++++++ .../package/base-files/brcm-2.4/etc/init.d/S05netconfig | 8 ++++++++ .../package/base-files/brcm-2.6/etc/init.d/S05netconfig | 8 ++++++++ openwrt/package/base-files/default/etc/init.d/S10boot | 4 ---- openwrt/package/base-files/default/lib/network/config.sh | 2 +- openwrt/package/base-files/rb532-2.6/etc/config/network | 6 ++++++ openwrt/package/base-files/sibyte-2.6/etc/config/network | 6 ++++++ openwrt/package/base-files/x86-2.4/etc/config/network | 6 ++++++ openwrt/package/base-files/x86-2.6/etc/config/network | 6 ++++++ openwrt/package/base-files/xscale-2.6/etc/config/network | 6 ++++++ 12 files changed, 65 insertions(+), 5 deletions(-) diff --git a/openwrt/package/base-files/ar7-2.4/etc/config/network b/openwrt/package/base-files/ar7-2.4/etc/config/network index 19a858e163b..911134bb0df 100644 --- a/openwrt/package/base-files/ar7-2.4/etc/config/network +++ b/openwrt/package/base-files/ar7-2.4/etc/config/network @@ -1,5 +1,11 @@ # Network configuration file +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option ifname eth0 option proto static diff --git a/openwrt/package/base-files/aruba-2.6/etc/config/network b/openwrt/package/base-files/aruba-2.6/etc/config/network index aadd4aa8ed0..1d9b55b2d31 100644 --- a/openwrt/package/base-files/aruba-2.6/etc/config/network +++ b/openwrt/package/base-files/aruba-2.6/etc/config/network @@ -1,5 +1,11 @@ # Network configuration file +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option ifname eth0 option proto dhcp diff --git a/openwrt/package/base-files/au1000-2.6/etc/config/network b/openwrt/package/base-files/au1000-2.6/etc/config/network index 448ab7c9d3a..9b65652f06b 100644 --- a/openwrt/package/base-files/au1000-2.6/etc/config/network +++ b/openwrt/package/base-files/au1000-2.6/etc/config/network @@ -1,5 +1,11 @@ # Copyright (C) 2006 OpenWrt.org +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option type bridge option ifname "eth0 ath0" diff --git a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig index 2efd596aa8e..175b9a98361 100755 --- a/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.4/etc/init.d/S05netconfig @@ -61,6 +61,14 @@ END { p("vlan1", "vlan1ports") print "" print "" + print "#### Loopback configuration" + print "config interface loopback" + print " option ifname \"lo\"" + print " option proto static" + print " option ipaddr 127.0.0.1" + print " option netmask 255.0.0.0" + print "" + print "" print "#### LAN configuration" print "config interface lan" print " option type bridge" diff --git a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig index 2efd596aa8e..175b9a98361 100755 --- a/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig +++ b/openwrt/package/base-files/brcm-2.6/etc/init.d/S05netconfig @@ -61,6 +61,14 @@ END { p("vlan1", "vlan1ports") print "" print "" + print "#### Loopback configuration" + print "config interface loopback" + print " option ifname \"lo\"" + print " option proto static" + print " option ipaddr 127.0.0.1" + print " option netmask 255.0.0.0" + print "" + print "" print "#### LAN configuration" print "config interface lan" print " option type bridge" diff --git a/openwrt/package/base-files/default/etc/init.d/S10boot b/openwrt/package/base-files/default/etc/init.d/S10boot index 19420eda530..34f4cea9343 100755 --- a/openwrt/package/base-files/default/etc/init.d/S10boot +++ b/openwrt/package/base-files/default/etc/init.d/S10boot @@ -22,7 +22,3 @@ for iface in $(/sbin/ifconfig -a | awk '{print $1}' | grep eth); do done load_modules /etc/modules /etc/modules.d/* - -ifconfig lo 127.0.0.1 up -ifconfig eth0 promisc - diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh index ec05c3eb818..bb58a3e751d 100755 --- a/openwrt/package/base-files/default/lib/network/config.sh +++ b/openwrt/package/base-files/default/lib/network/config.sh @@ -32,7 +32,7 @@ scan_interfaces() { interface) config_get proto "$CONFIG_SECTION" proto append interfaces "$CONFIG_SECTION" - config_get iftype "$CONFIG_SECTION" iftype + config_get iftype "$CONFIG_SECTION" type case "$iftype" in bridge) config_get ifname "$CONFIG_SECTION" ifname diff --git a/openwrt/package/base-files/rb532-2.6/etc/config/network b/openwrt/package/base-files/rb532-2.6/etc/config/network index 6f089fe9926..82796905741 100644 --- a/openwrt/package/base-files/rb532-2.6/etc/config/network +++ b/openwrt/package/base-files/rb532-2.6/etc/config/network @@ -1,5 +1,11 @@ # Copyright (C) 2006 OpenWrt.org +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option ifname eth0 option proto dhcp diff --git a/openwrt/package/base-files/sibyte-2.6/etc/config/network b/openwrt/package/base-files/sibyte-2.6/etc/config/network index 448ab7c9d3a..9b65652f06b 100644 --- a/openwrt/package/base-files/sibyte-2.6/etc/config/network +++ b/openwrt/package/base-files/sibyte-2.6/etc/config/network @@ -1,5 +1,11 @@ # Copyright (C) 2006 OpenWrt.org +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option type bridge option ifname "eth0 ath0" diff --git a/openwrt/package/base-files/x86-2.4/etc/config/network b/openwrt/package/base-files/x86-2.4/etc/config/network index f1ed9774507..68d8e4240e6 100644 --- a/openwrt/package/base-files/x86-2.4/etc/config/network +++ b/openwrt/package/base-files/x86-2.4/etc/config/network @@ -1,5 +1,11 @@ # Copyright (C) 2006 OpenWrt.org +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option type bridge option ifname "eth1 eth2" diff --git a/openwrt/package/base-files/x86-2.6/etc/config/network b/openwrt/package/base-files/x86-2.6/etc/config/network index f1ed9774507..68d8e4240e6 100644 --- a/openwrt/package/base-files/x86-2.6/etc/config/network +++ b/openwrt/package/base-files/x86-2.6/etc/config/network @@ -1,5 +1,11 @@ # Copyright (C) 2006 OpenWrt.org +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option type bridge option ifname "eth1 eth2" diff --git a/openwrt/package/base-files/xscale-2.6/etc/config/network b/openwrt/package/base-files/xscale-2.6/etc/config/network index aadd4aa8ed0..1d9b55b2d31 100644 --- a/openwrt/package/base-files/xscale-2.6/etc/config/network +++ b/openwrt/package/base-files/xscale-2.6/etc/config/network @@ -1,5 +1,11 @@ # Network configuration file +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option ifname eth0 option proto dhcp From 97b782a6363b824b25360386d97de0390d9378f4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 27 Aug 2006 11:22:19 +0000 Subject: [PATCH 523/757] broadcom-wl: set vlan_mode for every enabled interface SVN-Revision: 4684 --- openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh index 2c951020fc3..435c440e2e0 100644 --- a/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/openwrt/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -133,6 +133,7 @@ setup_broadcom() { append vif_post_up "eap_restrict $eap_r" "$N" config_get ssid "$vif" ssid + append vif_post_up "vlan_mode 0" append vif_post_up "ssid $ssid" "$N" append vif_post_up "enabled 1" "$N" @@ -158,7 +159,6 @@ infra $infra ${wet:+wet 1} radio ${radio:-1} -vlan_mode 0 macfilter 0 maclist none wds none From 7aa8c63fcfbb8b3ebb6d23be5827db2bb531d4f6 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Sun, 27 Aug 2006 11:22:56 +0000 Subject: [PATCH 524/757] change hotplug trigger to a simpler awk command SVN-Revision: 4685 --- openwrt/package/base-files/default/etc/init.d/S10boot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/package/base-files/default/etc/init.d/S10boot b/openwrt/package/base-files/default/etc/init.d/S10boot index 34f4cea9343..b361e156fea 100755 --- a/openwrt/package/base-files/default/etc/init.d/S10boot +++ b/openwrt/package/base-files/default/etc/init.d/S10boot @@ -17,7 +17,8 @@ touch /var/log/wtmp touch /var/log/lastlog [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe -for iface in $(/sbin/ifconfig -a | awk '{print $1}' | grep eth); do +# manually trigger hotplug before loading modules +for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do /usr/bin/env -i ACTION=add INTERFACE="$iface" /sbin/hotplug net done From db69c09c8627b4d289f9d7e4ad2250c177ce0a91 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Sun, 27 Aug 2006 13:08:41 +0000 Subject: [PATCH 525/757] tune the Magicbox kernel config SVN-Revision: 4686 --- openwrt/target/linux/magicbox-2.6/config | 137 +++++++---------------- 1 file changed, 38 insertions(+), 99 deletions(-) diff --git a/openwrt/target/linux/magicbox-2.6/config b/openwrt/target/linux/magicbox-2.6/config index 0e667c0b106..b49faf30fce 100644 --- a/openwrt/target/linux/magicbox-2.6/config +++ b/openwrt/target/linux/magicbox-2.6/config @@ -123,41 +123,12 @@ CONFIG_NOT_COHERENT_CACHE=y # # Platform options # -# CONFIG_PPC_PREP is not set -# CONFIG_APUS is not set -# CONFIG_KATANA is not set -# CONFIG_WILLOW is not set -# CONFIG_CPCI690 is not set -# CONFIG_POWERPMC250 is not set -# CONFIG_CHESTNUT is not set -# CONFIG_SPRUCE is not set -# CONFIG_HDPU is not set -# CONFIG_EV64260 is not set -# CONFIG_LOPEC is not set -# CONFIG_MVME5100 is not set -# CONFIG_PPLUS is not set -# CONFIG_PRPMC750 is not set -# CONFIG_PRPMC800 is not set -# CONFIG_SANDPOINT is not set -# CONFIG_RADSTONE_PPC7D is not set -# CONFIG_PAL4 is not set -# CONFIG_GEMINI is not set -# CONFIG_EST8260 is not set -# CONFIG_SBC82xx is not set -# CONFIG_SBS8260 is not set -# CONFIG_RPX8260 is not set -# CONFIG_TQM8260 is not set -# CONFIG_ADS8272 is not set -# CONFIG_PQ2FADS is not set -# CONFIG_LITE5200 is not set -# CONFIG_MPC834x_SYS is not set -# CONFIG_EV64360 is not set # CONFIG_PC_KEYBOARD is not set # CONFIG_HIGHMEM is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y +CONFIG_HZ_100=y +# CONFIG_HZ_250 is not set # CONFIG_HZ_1000 is not set -CONFIG_HZ=250 +CONFIG_HZ=100 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set @@ -171,7 +142,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set -# CONFIG_CMDLINE_BOOL is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyS0,115200" # CONFIG_PM is not set # CONFIG_SOFTWARE_SUSPEND is not set # CONFIG_SECCOMP is not set @@ -463,7 +435,7 @@ CONFIG_BT_RFCOMM_TTY=y CONFIG_BT_BNEP=m CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m +# CONFIG_BT_HIDP is not set # # Bluetooth device drivers @@ -477,7 +449,13 @@ CONFIG_BT_HCIUART_BCSP=y # CONFIG_BT_HCIBPA10X is not set # CONFIG_BT_HCIBFUSB is not set # CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set CONFIG_WIRELESS_EXT=y # @@ -489,7 +467,7 @@ CONFIG_WIRELESS_EXT=y # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set +CONFIG_FW_LOADER=m # # Connector - unified userspace <-> kernelspace linker @@ -551,10 +529,7 @@ CONFIG_MTD_CFI_UTIL=y # Mapping drivers for chip access # CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x1fc00000 -CONFIG_MTD_PHYSMAP_LEN=0x400000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=1 +# CONFIG_MTD_PHYSMAP is not set CONFIG_MTD_MAGICMAP=y # CONFIG_MTD_PCI is not set # CONFIG_MTD_PLATRAM is not set @@ -754,32 +729,14 @@ CONFIG_MII=y # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set CONFIG_IBM_EMAC=y -CONFIG_IBM_EMAC_RXB=128 -CONFIG_IBM_EMAC_TXB=64 +CONFIG_IBM_EMAC_RXB=64 +CONFIG_IBM_EMAC_TXB=8 CONFIG_IBM_EMAC_POLL_WEIGHT=32 CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256 CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0 # CONFIG_IBM_EMAC_PHY_RX_CLK_FIX is not set # CONFIG_IBM_EMAC_DEBUG is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -CONFIG_NATSEMI=y -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set +# CONFIG_NET_PCI is not set # # Ethernet (1000 Mbit) @@ -795,7 +752,6 @@ CONFIG_NATSEMI=y # CONFIG_SKGE is not set # CONFIG_SKY2 is not set # CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # CONFIG_BNX2 is not set @@ -825,8 +781,13 @@ CONFIG_NET_WIRELESS_RTNETLINK=y # # Wireless 802.11b ISA/PCI cards support # -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +# CONFIG_IPW_QOS is not set +# CONFIG_IPW2200_DEBUG is not set # CONFIG_AIRO is not set # CONFIG_HERMES is not set # CONFIG_ATMEL is not set @@ -834,8 +795,13 @@ CONFIG_NET_WIRELESS_RTNETLINK=y # # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # -# CONFIG_PRISM54 is not set -# CONFIG_HOSTAP is not set +CONFIG_PRISM54=m +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +# CONFIG_HOSTAP_PLX is not set +CONFIG_HOSTAP_PCI=m +# CONFIG_BCM43XX is not set CONFIG_NET_WIRELESS=y # @@ -873,25 +839,7 @@ CONFIG_PPPOE=m # # Input device support # -CONFIG_INPUT=m - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set +# CONFIG_INPUT is not set # # Hardware I/O ports @@ -1105,6 +1053,7 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set # CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set @@ -1123,6 +1072,10 @@ CONFIG_SND_RAWMIDI=m # ALSA PowerMac requires I2C # +# +# ALSA PowerMac requires INPUT +# + # # USB devices # @@ -1195,20 +1148,6 @@ CONFIG_USB_STORAGE=m # # USB HID Boot Protocol drivers # -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set # # USB Imaging devices From 732eb10afa8a00f8ff4ec97752c018b01d17f79e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 27 Aug 2006 13:08:53 +0000 Subject: [PATCH 526/757] fix LINUX_RELEASE and use it for the kmod-* build SVN-Revision: 4687 --- openwrt/include/kernel.mk | 2 +- openwrt/package/kernel/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/kernel.mk b/openwrt/include/kernel.mk index c788bf1c490..bd558ceec73 100644 --- a/openwrt/include/kernel.mk +++ b/openwrt/include/kernel.mk @@ -16,7 +16,7 @@ else # check to see if .kernel.mk matches target.mk ifeq ($(CONFIG_BOARD)-$(CONFIG_KERNEL),$(BOARD)-$(KERNEL)) LINUX_VERSION:=$(CONFIG_LINUX_VERSION) - RELEASE:=$(CONFIG_RELEASE) + LINUX_RELEASE:=$(CONFIG_LINUX_RELEASE) else # oops, old .kernel.config; rebuild it (hiding the misleading errors this produces) $(warning rebuilding .kernel.mk) diff --git a/openwrt/package/kernel/Makefile b/openwrt/package/kernel/Makefile index b59649ddacb..f43f4fdf693 100644 --- a/openwrt/package/kernel/Makefile +++ b/openwrt/package/kernel/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kernel PKG_VERSION:=$(LINUX_VERSION)-$(BOARD) -PKG_RELEASE:=1 +PKG_RELEASE:=$(LINUX_RELEASE) PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages From 968de6d4c802a55f17e4a35b4a7f59bdf90af449 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 27 Aug 2006 13:12:43 +0000 Subject: [PATCH 527/757] remove old image builder directory - will be rewritten SVN-Revision: 4688 --- openwrt/target/linux/imagebuilder/Makefile | 55 ------------------- .../lists/default-annex-a.ar7-2.4 | 21 ------- .../lists/default-annex-b.ar7-2.4 | 21 ------- .../linux/imagebuilder/lists/default.brcm-2.4 | 24 -------- .../linux/imagebuilder/lists/default.brcm-2.6 | 17 ------ .../linux/imagebuilder/lists/default.x86-2.4 | 15 ----- .../linux/imagebuilder/lists/default.x86-2.6 | 15 ----- .../linux/imagebuilder/lists/micro.ar7-2.4 | 11 ---- .../linux/imagebuilder/lists/micro.brcm-2.4 | 16 ------ .../linux/imagebuilder/lists/micro.brcm-2.6 | 11 ---- .../linux/imagebuilder/lists/micro.x86-2.4 | 11 ---- .../linux/imagebuilder/lists/micro.x86-2.6 | 11 ---- .../linux/imagebuilder/lists/pptp.brcm-2.4 | 24 -------- .../linux/imagebuilder/lists/pptp.brcm-2.6 | 17 ------ .../linux/imagebuilder/lists/pptp.x86-2.4 | 15 ----- .../linux/imagebuilder/lists/pptp.x86-2.6 | 15 ----- 16 files changed, 299 deletions(-) delete mode 100644 openwrt/target/linux/imagebuilder/Makefile delete mode 100644 openwrt/target/linux/imagebuilder/lists/default-annex-a.ar7-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/default-annex-b.ar7-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/default.brcm-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/default.brcm-2.6 delete mode 100644 openwrt/target/linux/imagebuilder/lists/default.x86-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/default.x86-2.6 delete mode 100644 openwrt/target/linux/imagebuilder/lists/micro.ar7-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/micro.brcm-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/micro.brcm-2.6 delete mode 100644 openwrt/target/linux/imagebuilder/lists/micro.x86-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/micro.x86-2.6 delete mode 100644 openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.6 delete mode 100644 openwrt/target/linux/imagebuilder/lists/pptp.x86-2.4 delete mode 100644 openwrt/target/linux/imagebuilder/lists/pptp.x86-2.6 diff --git a/openwrt/target/linux/imagebuilder/Makefile b/openwrt/target/linux/imagebuilder/Makefile deleted file mode 100644 index 2c1ab1712e9..00000000000 --- a/openwrt/target/linux/imagebuilder/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -default: clean all - -TOPDIR:=${shell pwd} -export TOPDIR -IB:=1 -export IB -include ./rules.mk - -LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_BUILD_DIR)/root IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends - -define image_template - -all: all-$(1)-$(2) - -all-$(1)-$(2): - @for listfile in ./lists/*.$(1)-$(2); do \ - $(MAKE) -s `echo $$$$listfile | sed 's,.*lists/\(.*\).$(1)-$(2),BOARD=$(1) KERNEL=$(2) LIST=\1,'` build; \ - done -endef - -include ./kernel.mk - -clean: FORCE - @rm -rf $(LINUX_BUILD_DIR)/root* - @rm -rf $(BIN_DIR) -all: - -build: FORCE - echo - echo '### BUILDING IMAGE FROM lists/$(LIST).$(BOARD)-$(KERNEL)' - echo - rm -rf $(LINUX_BUILD_DIR)/root* - mkdir -p $(BIN_DIR)/$(LIST) - mkdir -p $(LINUX_BUILD_DIR)/tmp - mkdir -p $(LINUX_BUILD_DIR)/root - echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf - $(IPKG_KERNEL) install $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk - for package in `grep -v '^#' lists/$(LIST).$(BOARD)-$(KERNEL)`; do \ - $(IPKG_KERNEL) install `ls packages/$${package}_*`; \ - done - if [ -d ./files ]; then \ - $(CP) --remove-destination ./files/* $(LINUX_BUILD_DIR)/root; \ - fi - if [ -d ./files.$(LIST) ]; then \ - $(CP) --remove-destination ./files.$(LIST)/* $(LINUX_BUILD_DIR)/root; \ - fi - find $(LINUX_BUILD_DIR)/root -name '.svn' || 'CVS' | xargs rm -rf - $(MAKE) -S -C image KERNEL="$(KERNEL)" BOARD="$(BOARD)" BIN_DIR="$(BIN_DIR)/$(LIST)" install diff --git a/openwrt/target/linux/imagebuilder/lists/default-annex-a.ar7-2.4 b/openwrt/target/linux/imagebuilder/lists/default-annex-a.ar7-2.4 deleted file mode 100644 index 272ba926caa..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/default-annex-a.ar7-2.4 +++ /dev/null @@ -1,21 +0,0 @@ -base-files -base-files-ar7-2.4 -br2684ctl -bridge -busybox -dnsmasq -dropbear -iptables -kmod-atm -kmod-cpmac -kmod-pppoatm -kmod-sangam-atm-annex-a -kmod-ppp -kmod-pppoe -linux-atm -mtd -ppp -ppp-mod-pppoa -ppp-mod-pppoe -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/default-annex-b.ar7-2.4 b/openwrt/target/linux/imagebuilder/lists/default-annex-b.ar7-2.4 deleted file mode 100644 index 3c4c08092b3..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/default-annex-b.ar7-2.4 +++ /dev/null @@ -1,21 +0,0 @@ -base-files -base-files-ar7-2.4 -br2684ctl -bridge -busybox -dnsmasq -dropbear -iptables -kmod-atm -kmod-cpmac -kmod-pppoatm -kmod-sangam-atm-annex-b -kmod-ppp -kmod-pppoe -linux-atm -mtd -ppp -ppp-mod-pppoa -ppp-mod-pppoe -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/default.brcm-2.4 b/openwrt/target/linux/imagebuilder/lists/default.brcm-2.4 deleted file mode 100644 index 59b137db849..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/default.brcm-2.4 +++ /dev/null @@ -1,24 +0,0 @@ -base-files -base-files-brcm -bridge -busybox -dnsmasq -dropbear -haserl -ipkg -iptables -iwlib -kmod-brcm-wl -kmod-diag -kmod-ppp -kmod-pppoe -kmod-switch -kmod-wlcompat -mtd -nvram -ppp -ppp-mod-pppoe -uclibc -webif -wificonf -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/default.brcm-2.6 b/openwrt/target/linux/imagebuilder/lists/default.brcm-2.6 deleted file mode 100644 index 948d9c856db..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/default.brcm-2.6 +++ /dev/null @@ -1,17 +0,0 @@ -base-files -base-files-brcm-2.6 -bridge -busybox -dnsmasq -dropbear -iptables -iwlib -kmod-madwifi -kmod-ppp -kmod-pppoe -kmod-switch -mtd -ppp -ppp-mod-pppoe -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/default.x86-2.4 b/openwrt/target/linux/imagebuilder/lists/default.x86-2.4 deleted file mode 100644 index 3b3eabbd238..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/default.x86-2.4 +++ /dev/null @@ -1,15 +0,0 @@ -base-files -base-files-x86-2.4 -bridge -busybox -dnsmasq -dropbear -iptables -kmod-net-natsemi -kmod-ppp -kmod-pppoe -mtd -ppp -ppp-mod-pppoe -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/default.x86-2.6 b/openwrt/target/linux/imagebuilder/lists/default.x86-2.6 deleted file mode 100644 index 928114108ff..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/default.x86-2.6 +++ /dev/null @@ -1,15 +0,0 @@ -base-files -base-files-x86-2.6 -bridge -busybox -dnsmasq -dropbear -iptables -kmod-net-natsemi -kmod-ppp -kmod-pppoe -mtd -ppp -ppp-mod-pppoe -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/micro.ar7-2.4 b/openwrt/target/linux/imagebuilder/lists/micro.ar7-2.4 deleted file mode 100644 index cea8b0b84dd..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/micro.ar7-2.4 +++ /dev/null @@ -1,11 +0,0 @@ -base-files -base-files-ar7-2.4 -bridge -busybox -dnsmasq -dropbear -iptables -kmod-cpmac -mtd -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/micro.brcm-2.4 b/openwrt/target/linux/imagebuilder/lists/micro.brcm-2.4 deleted file mode 100644 index 4f2bae8c02a..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/micro.brcm-2.4 +++ /dev/null @@ -1,16 +0,0 @@ -base-files -base-files-brcm-2.4 -bridge -busybox -dnsmasq -dropbear -iptables -iwlib -kmod-brcm-wl -kmod-diag -kmod-switch -kmod-wlcompat -mtd -nvram -uclibc -wificonf diff --git a/openwrt/target/linux/imagebuilder/lists/micro.brcm-2.6 b/openwrt/target/linux/imagebuilder/lists/micro.brcm-2.6 deleted file mode 100644 index 2d82f2493bb..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/micro.brcm-2.6 +++ /dev/null @@ -1,11 +0,0 @@ -base-files -base-files-brcm-2.6 -bridge -busybox -dnsmasq -dropbear -iptables -iwlib -kmod-switch -mtd -uclibc diff --git a/openwrt/target/linux/imagebuilder/lists/micro.x86-2.4 b/openwrt/target/linux/imagebuilder/lists/micro.x86-2.4 deleted file mode 100644 index 876ad19d24a..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/micro.x86-2.4 +++ /dev/null @@ -1,11 +0,0 @@ -base-files -base-files-x86-2.4 -bridge -busybox -dnsmasq -dropbear -iptables -kmod-net-natsemi -mtd -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/micro.x86-2.6 b/openwrt/target/linux/imagebuilder/lists/micro.x86-2.6 deleted file mode 100644 index 8167004abfb..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/micro.x86-2.6 +++ /dev/null @@ -1,11 +0,0 @@ -base-files -base-files-x86-2.6 -bridge -busybox -dnsmasq -dropbear -iptables -kmod-net-natsemi -mtd -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.4 b/openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.4 deleted file mode 100644 index dd4126d4a42..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.4 +++ /dev/null @@ -1,24 +0,0 @@ -base-files -base-files-brcm -bridge -busybox -dnsmasq -dropbear -haserl -ipkg -iptables -iwlib -kmod-brcm-wl -kmod-diag -kmod-ppp -kmod-gre -kmod-switch -kmod-wlcompat -mtd -nvram -ppp -pptp -uclibc -webif -wificonf -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.6 b/openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.6 deleted file mode 100644 index 3310d5863c2..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.6 +++ /dev/null @@ -1,17 +0,0 @@ -base-files -base-files-brcm-2.6 -bridge -busybox -dnsmasq -dropbear -iptables -iwlib -kmod-madwifi -kmod-ppp -kmod-gre -kmod-switch -mtd -ppp -pptp -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/pptp.x86-2.4 b/openwrt/target/linux/imagebuilder/lists/pptp.x86-2.4 deleted file mode 100644 index f4fac5f4079..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/pptp.x86-2.4 +++ /dev/null @@ -1,15 +0,0 @@ -base-files -base-files-x86-2.4 -bridge -busybox -dnsmasq -dropbear -iptables -kmod-net-natsemi -kmod-ppp -kmod-gre -mtd -ppp -pptp -uclibc -wireless-tools diff --git a/openwrt/target/linux/imagebuilder/lists/pptp.x86-2.6 b/openwrt/target/linux/imagebuilder/lists/pptp.x86-2.6 deleted file mode 100644 index 0162fa4d729..00000000000 --- a/openwrt/target/linux/imagebuilder/lists/pptp.x86-2.6 +++ /dev/null @@ -1,15 +0,0 @@ -base-files -base-files-x86-2.6 -bridge -busybox -dnsmasq -dropbear -iptables -kmod-net-natsemi -kmod-ppp -kmod-gre -mtd -ppp -pptp -uclibc -wireless-tools From 8278890f158d37ddedf71c0da78ffa89c92d0045 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 27 Aug 2006 13:22:42 +0000 Subject: [PATCH 528/757] move $(MAKE) packages from .linux-compile: to compile: SVN-Revision: 4689 --- openwrt/include/kernel-build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index 5e4534281a7..c5b3668481b 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -82,7 +82,6 @@ $(LINUX_DIR)/.linux-compile: @rm -f $(BUILD_DIR)/linux ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux @$(MAKE) modules - @$(MAKE) packages touch $@ $(KERNEL_IPKG): @@ -110,6 +109,7 @@ prepare: $(LINUX_DIR)/.configured @mkdir -p $(LINUX_DIR) $(PACKAGE_DIR) compile: prepare $(LINUX_DIR)/.linux-compile + @$(MAKE) packages install: compile $(LINUX_KERNEL) From 9e9a0a4ca0bb423d0b8fc433140fda3dbebcb0f4 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Sun, 27 Aug 2006 13:32:10 +0000 Subject: [PATCH 529/757] introduce USB_SUPPORT, clean up some dependencies SVN-Revision: 4690 --- openwrt/target/Config.in | 13 +++++++++++++ openwrt/target/linux/Config.in | 8 +++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index 2d3009112c6..fc35a9acc07 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -7,6 +7,7 @@ config LINUX_2_6_AU1000 select mipsel select LINUX_2_6 select PCI_SUPPORT + select USB_SUPPORT help Build firmware for AMD Alchemy 1500 boards (e.g. 4G-Systems Mesh/Access Cube ...) @@ -16,6 +17,7 @@ config LINUX_2_6_ARUBA select mips select LINUX_2_6 select PCI_SUPPORT + select USB_SUPPORT select BIG_ENDIAN help Build firmware images for Aruba boards @@ -34,6 +36,7 @@ config LINUX_2_4_BRCM bool "Broadcom BCM47xx/53xx [2.4]" select mipsel select PCI_SUPPORT + select USB_SUPPORT select PCMCIA_SUPPORT help Build firmware images for Broadcom based routers @@ -48,6 +51,7 @@ config LINUX_2_6_BRCM select mipsel select LINUX_2_6 select PCI_SUPPORT + select USB_SUPPORT #select PCMCIA_SUPPORT help Build firmware images for Broadcom based routers @@ -59,6 +63,7 @@ config LINUX_2_6_BRCM63XX select mips select LINUX_2_6 select PCI_SUPPORT + select USB_SUPPORT select PCMCIA_SUPPORT help Build firmware images for Broadcom based xDSL/routers @@ -70,6 +75,7 @@ config LINUX_2_6_XSCALE select LINUX_2_6 select BIG_ENDIAN select PCI_SUPPORT + select USB_SUPPORT config LINUX_2_6_MAGICBOX bool "Magicbox [2.6]" @@ -95,6 +101,8 @@ config LINUX_2_4_X86 bool "x86 [2.4]" select i386 select LINUX_2_4 + select PCI_SUPPORT + select USB_SUPPORT select PCMCIA_SUPPORT help Build firmware images for x86 based boards @@ -104,6 +112,8 @@ config LINUX_2_6_X86 bool "x86 [2.6]" select i386 select LINUX_2_6 + select PCI_SUPPORT + select USB_SUPPORT select PCMCIA_SUPPORT help Build firmware images for x86 based boards @@ -188,6 +198,9 @@ config PCI_SUPPORT config PCMCIA_SUPPORT bool +config USB_SUPPORT + bool + config BIG_ENDIAN bool diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in index 9b505df133e..1c1361e7638 100644 --- a/openwrt/target/linux/Config.in +++ b/openwrt/target/linux/Config.in @@ -328,13 +328,11 @@ config PACKAGE_KMOD_NET_PRISM54 endmenu menu "PCMCIA/CardBus support" - depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM + depends PCMCIA_SUPPORT config PACKAGE_KMOD_PCMCIA_CORE prompt "kmod-pcmcia-core.................. PCMCIA/CardBus support" - depends PCMCIA_SUPPORT tristate - depends LINUX_2_4_X86 || LINUX_2_6_X86 || LINUX_2_4_BRCM || LINUX_2_6_BRCM default m config PACKAGE_KMOD_PCMCIA_SERIAL @@ -346,11 +344,11 @@ config PACKAGE_KMOD_PCMCIA_SERIAL endmenu menu "USB support" + depends USB_SUPPORT config PACKAGE_KMOD_USB prompt "kmod-usb-core..................... USB support" tristate - default n if LINUX_2_4_AR531X default m config PACKAGE_KMOD_USB_UHCI @@ -468,8 +466,8 @@ config PACKAGE_KMOD_AX25 config PACKAGE_KMOD_BLUETOOTH prompt "kmod-bluetooth.................... Bluetooth drivers and network stack" tristate + depends PCI_SUPPORT || USB_SUPPORT default m - default n if LINUX_2_4_AR531X help Bluetooth drivers and network stack From b6a32036a8c4594758d620490e402dea8458926d Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 27 Aug 2006 19:08:05 +0000 Subject: [PATCH 530/757] update bcm963xx patch and add some binary compatibility hacks (incomplete) SVN-Revision: 4691 --- .../brcm63xx-2.6/patches/001-bcm963xx.patch | 15 +- .../patches/100-binary_hacks.patch | 267 ++++++++++++++++++ 2 files changed, 278 insertions(+), 4 deletions(-) create mode 100644 openwrt/target/linux/brcm63xx-2.6/patches/100-binary_hacks.patch diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch index 533418de337..23d0d696405 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch @@ -586,8 +586,8 @@ diff -urN linux.old/arch/mips/bcm963xx/bcm63xx_led.c linux.dev/arch/mips/bcm963x + diff -urN linux.old/arch/mips/bcm963xx/board.c linux.dev/arch/mips/bcm963xx/board.c --- linux.old/arch/mips/bcm963xx/board.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm963xx/board.c 2006-08-25 15:16:26.000000000 +0200 -@@ -0,0 +1,555 @@ ++++ linux.dev/arch/mips/bcm963xx/board.c 2006-08-27 21:02:04.000000000 +0200 +@@ -0,0 +1,559 @@ +/* +<:copyright-gpl + Copyright 2002 Broadcom Corp. All Rights Reserved. @@ -760,17 +760,21 @@ diff -urN linux.old/arch/mips/bcm963xx/board.c linux.dev/arch/mips/bcm963xx/boar + /* CMO -- Fix le problème avec les adresses mac que l'on n'arrive pas + * * à relire plusieurs fois */ + /* inv_xde */ ++#if 0 + if (boot_loader_type == BOOT_CFE) + memcpy( pucaMacAddr, g_pNvramInfo->ucaBaseMacAddr, + NVRAM_MAC_ADDRESS_LEN ); + else { ++#endif + pucaMacAddr[0] = 0x00; + pucaMacAddr[1] = 0x07; + pucaMacAddr[2] = 0x3A; + pucaMacAddr[3] = 0xFF; + pucaMacAddr[4] = 0xFF; + pucaMacAddr[5] = 0xFF; ++#if 0 + } ++#endif + + return nRet; +} /* kerSysGetMacAddr */ @@ -6918,8 +6922,8 @@ diff -urN linux.old/arch/mips/bcm963xx/Makefile linux.dev/arch/mips/bcm963xx/Mak + diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom.c --- linux.old/arch/mips/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm963xx/prom.c 2006-08-25 01:49:57.000000000 +0200 -@@ -0,0 +1,128 @@ ++++ linux.dev/arch/mips/bcm963xx/prom.c 2006-08-27 21:02:04.000000000 +0200 +@@ -0,0 +1,130 @@ +/* +<:copyright-gpl + Copyright 2004 Broadcom Corp. All Rights Reserved. @@ -7037,6 +7041,8 @@ diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom. + + mips_machgroup = MACH_GROUP_BRCM; + mips_machtype = MACH_BCM; ++ ++ BpSetBoardId("96348GW-10"); +} + +/* -------------------------------------------------------------------------- @@ -9626,3 +9632,4 @@ diff -urN linux.old/include/asm-mips/module.h linux.dev/include/asm-mips/module. #else #error MODULE_PROC_FAMILY undefined for your processor configuration #endif + diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/100-binary_hacks.patch b/openwrt/target/linux/brcm63xx-2.6/patches/100-binary_hacks.patch new file mode 100644 index 00000000000..d81d9783082 --- /dev/null +++ b/openwrt/target/linux/brcm63xx-2.6/patches/100-binary_hacks.patch @@ -0,0 +1,267 @@ +diff -urN linux.old/include/asm-mips/cpu-info.h linux.dev/include/asm-mips/cpu-info.h +--- linux.old/include/asm-mips/cpu-info.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux.dev/include/asm-mips/cpu-info.h 2006-08-27 21:02:04.000000000 +0200 +@@ -63,7 +63,6 @@ + * Capability and feature descriptor structure for MIPS CPU + */ + unsigned long options; +- unsigned long ases; + unsigned int processor_id; + unsigned int fpu_id; + unsigned int cputype; +@@ -84,6 +83,7 @@ + int tc_id; /* Thread Context number */ + #endif /* CONFIG_MIPS_MT */ + void *data; /* Additional data */ ++ unsigned long ases; + } __attribute__((aligned(SMP_CACHE_BYTES))); + + extern struct cpuinfo_mips cpu_data[]; + +diff -urN linux.old/include/linux/netdevice.h linux.dev/include/linux/netdevice.h +--- linux.old/include/linux/netdevice.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux.dev/include/linux/netdevice.h 2006-08-27 21:02:04.000000000 +0200 +@@ -266,8 +266,6 @@ + * the interface. + */ + char name[IFNAMSIZ]; +- /* device name hash chain */ +- struct hlist_node name_hlist; + + /* + * I/O specific fields +@@ -295,22 +293,6 @@ + + /* ------- Fields preinitialized in Space.c finish here ------- */ + +- /* Net device features */ +- unsigned long features; +-#define NETIF_F_SG 1 /* Scatter/gather IO. */ +-#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ +-#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ +-#define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ +-#define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ +-#define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ +-#define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ +-#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ +-#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ +-#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ +-#define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ +-#define NETIF_F_LLTX 4096 /* LockLess TX */ +-#define NETIF_F_UFO 8192 /* Can offload UDP Large Send*/ +- + struct net_device *next_sched; + + /* Interface index. Unique device identifier */ +@@ -324,8 +306,6 @@ + /* List of functions to handle Wireless Extensions (instead of ioctl). + * See <net/iw_handler.h> for details. Jean II */ + const struct iw_handler_def * wireless_handlers; +- /* Instance data managed by the core of Wireless Extensions. */ +- struct iw_public_data * wireless_data; + + struct ethtool_ops *ethtool_ops; + +@@ -335,33 +315,37 @@ + * will (read: may be cleaned up at will). + */ + ++ /* These may be needed for future network-power-down code. */ ++ unsigned long trans_start; /* Time (in jiffies) of last Tx */ ++ unsigned long last_rx; /* Time of last Rx */ + +- unsigned int flags; /* interface flags (a la BSD) */ ++ unsigned short flags; /* interface flags (a la BSD) */ + unsigned short gflags; + unsigned short priv_flags; /* Like 'flags' but invisible to userspace. */ +- unsigned short padded; /* How much padding added by alloc_netdev() */ +- +- unsigned char operstate; /* RFC2863 operstate */ +- unsigned char link_mode; /* mapping policy to operstate */ ++ unsigned short __useless_padding; + + unsigned mtu; /* interface MTU value */ + unsigned short type; /* interface hardware type */ + unsigned short hard_header_len; /* hardware hdr length */ ++ void *priv; /* pointer to private data */ + + struct net_device *master; /* Pointer to master device of a group, + * which this device is member of. + */ + + /* Interface address info. */ +- unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ ++ unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ ++ unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast ++ because most packets are unicast) */ + unsigned char addr_len; /* hardware address length */ +- unsigned short dev_id; /* for shared network cards */ + + struct dev_mc_list *mc_list; /* Multicast mac addresses */ + int mc_count; /* Number of installed mcasts */ + int promiscuity; + int allmulti; + ++ int watchdog_timeo; /* used by dev_watchdog() */ ++ struct timer_list watchdog_timer; + + /* Protocol specific pointers */ + +@@ -378,29 +362,17 @@ + struct list_head poll_list ____cacheline_aligned_in_smp; + /* Link to poll list */ + +- int (*poll) (struct net_device *dev, int *quota); + int quota; + int weight; +- unsigned long last_rx; /* Time of last Rx */ + /* Interface address info used in eth_type_trans() */ +- unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast +- because most packets are unicast) */ +- +- unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ +- +-/* +- * Cache line mostly used on queue transmit path (qdisc) +- */ +- /* device queue lock */ +- spinlock_t queue_lock ____cacheline_aligned_in_smp; + struct Qdisc *qdisc; + struct Qdisc *qdisc_sleeping; ++ struct Qdisc *qdisc_ingress; + struct list_head qdisc_list; + unsigned long tx_queue_len; /* Max frames per queue allowed */ + + /* ingress path synchronizer */ + spinlock_t ingress_lock; +- struct Qdisc *qdisc_ingress; + + /* + * One part is mostly used on xmit path (device) +@@ -411,16 +383,13 @@ + if nobody entered there. + */ + int xmit_lock_owner; +- void *priv; /* pointer to private data */ +- int (*hard_start_xmit) (struct sk_buff *skb, +- struct net_device *dev); +- /* These may be needed for future network-power-down code. */ +- unsigned long trans_start; /* Time (in jiffies) of last Tx */ +- +- int watchdog_timeo; /* used by dev_watchdog() */ +- struct timer_list watchdog_timer; + + /* ++ * Cache line mostly used on queue transmit path (qdisc) ++ */ ++ /* device queue lock */ ++ spinlock_t queue_lock ____cacheline_aligned_in_smp; ++/* + * refcnt is a very hot point, so align it on SMP + */ + /* Number of references to this device */ +@@ -428,6 +397,8 @@ + + /* delayed register/unregister */ + struct list_head todo_list; ++ /* device name hash chain */ ++ struct hlist_node name_hlist; + /* device index hash chain */ + struct hlist_node index_hlist; + +@@ -439,6 +410,22 @@ + NETREG_RELEASED, /* called free_netdev */ + } reg_state; + ++ /* Net device features */ ++ unsigned int features; ++#define NETIF_F_SG 1 /* Scatter/gather IO. */ ++#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ ++#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ ++#define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ ++#define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ ++#define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ ++#define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ ++#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ ++#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ ++#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ ++#define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ ++#define NETIF_F_LLTX 4096 /* LockLess TX */ ++#define NETIF_F_UFO 8192 /* Can offload UDP Large Send*/ ++ + /* Called after device is detached from network. */ + void (*uninit)(struct net_device *dev); + /* Called after last user reference disappears. */ +@@ -447,7 +434,10 @@ + /* Pointers to interface service routines. */ + int (*open)(struct net_device *dev); + int (*stop)(struct net_device *dev); ++ int (*hard_start_xmit) (struct sk_buff *skb, ++ struct net_device *dev); + #define HAVE_NETDEV_POLL ++ int (*poll) (struct net_device *dev, int *quota); + int (*hard_header) (struct sk_buff *skb, + struct net_device *dev, + unsigned short type, +@@ -490,6 +480,7 @@ + int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); + #ifdef CONFIG_NETPOLL + struct netpoll_info *npinfo; ++ int netpoll_rx; + #endif + #ifdef CONFIG_NET_POLL_CONTROLLER + void (*poll_controller)(struct net_device *dev); +@@ -507,6 +498,17 @@ + struct class_device class_dev; + /* space for optional statistics and wireless sysfs groups */ + struct attribute_group *sysfs_groups[3]; ++ ++ unsigned char operstate; /* RFC2863 operstate */ ++ unsigned char link_mode; /* mapping policy to operstate */ ++ unsigned short dev_id; /* for shared network cards */ ++ ++ /* Instance data managed by the core of Wireless Extensions. */ ++ struct iw_public_data * wireless_data; ++ ++ unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ ++ ++ unsigned short padded; /* How much padding added by alloc_netdev() */ + }; + + #define NETDEV_ALIGN 32 +@@ -587,9 +589,10 @@ + + struct softnet_data + { +- struct net_device *output_queue; ++ int useless_padding[3]; + struct sk_buff_head input_pkt_queue; + struct list_head poll_list; ++ struct net_device *output_queue; + struct sk_buff *completion_queue; + + struct net_device backlog_dev; /* Sorry. 8) */ +diff -urN linux.old/include/linux/timer.h linux.dev/include/linux/timer.h +--- linux.old/include/linux/timer.h 2006-06-18 03:49:35.000000000 +0200 ++++ linux.dev/include/linux/timer.h 2006-08-27 21:02:04.000000000 +0200 +@@ -12,6 +12,9 @@ + struct list_head entry; + unsigned long expires; + ++ spinlock_t lock; ++ unsigned long magic; ++ + void (*function)(unsigned long); + unsigned long data; + +diff -urN linux.old/kernel/timer.c linux.dev/kernel/timer.c +--- linux.old/kernel/timer.c 2006-06-18 03:49:35.000000000 +0200 ++++ linux.dev/kernel/timer.c 2006-08-27 21:02:04.000000000 +0200 +@@ -147,6 +147,7 @@ + { + timer->entry.next = NULL; + timer->base = per_cpu(tvec_bases, raw_smp_processor_id()); ++ spin_lock_init(&timer->lock); + } + EXPORT_SYMBOL(init_timer); + From 900afdb44821931166349a1ca29001cf1eb79213 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 29 Aug 2006 07:21:20 +0000 Subject: [PATCH 531/757] Restore boot loader detection by parsing the command line, fixes issue with Inventel liveboxes SVN-Revision: 4695 --- .../brcm63xx-2.6/patches/001-bcm963xx.patch | 65 +++++++++++-------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch index 23d0d696405..6505225ceb6 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch @@ -6920,26 +6920,26 @@ diff -urN linux.old/arch/mips/bcm963xx/Makefile linux.dev/arch/mips/bcm963xx/Mak +EXTRA_CFLAGS += -DADSL_ANNEXC +endif + -diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom.c ---- linux.old/arch/mips/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm963xx/prom.c 2006-08-27 21:02:04.000000000 +0200 -@@ -0,0 +1,130 @@ +diff -urN linux-2.6.17/arch/mips/bcm963xx/prom.c linux-2.6.17-brcm63xx/arch/mips/bcm963xx/prom.c +--- linux-2.6.17/arch/mips/bcm963xx/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/bcm963xx/prom.c 2006-08-29 07:10:10.000000000 +0200 +@@ -0,0 +1,143 @@ +/* -+<:copyright-gpl -+ Copyright 2004 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. ++<:copyright-gpl ++ Copyright 2004 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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. +:> +*/ +/* @@ -6965,6 +6965,8 @@ diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom. +//char arcs_cmdline[CL_SIZE] __initdata = {0}; +/* inv_xde */ +int boot_loader_type; ++int prom_argc; ++char **prom_argv, **prom_envp; + +extern int do_syslog(int, char *, int); +extern void serial_init(void); @@ -7022,9 +7024,20 @@ diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom. + + serial_init(); + -+ /* Need to fixup boot loader detection code -+ * whithout changing prom_init prototype -+ */ ++ prom_argc = fw_arg0; ++ prom_argv = (char **) fw_arg1; ++ prom_envp = (char **) fw_arg2; ++ ++ if ((prom_argv > 0x80000000) && (prom_argv < 0x82000000)) { ++ strncpy(arcs_cmdline, prom_argv[1], CL_SIZE); ++ } ++ ++ if (strncmp(arcs_cmdline, "boot_loader=RedBoot", 19) != 0) { ++ boot_loader_type = BOOT_CFE; ++ } ++ else { ++ boot_loader_type = BOOT_REDBOOT; ++ } + + do_syslog(8, NULL, 8); + @@ -7034,20 +7047,20 @@ diff -urN linux.old/arch/mips/bcm963xx/prom.c linux.dev/arch/mips/bcm963xx/prom. + + arcs_cmdline[0] = '\0'; + -+ if (boot_loader_type == BOOT_CFE) ++ if (boot_loader_type == BOOT_CFE) + add_memory_region(0, (getMemorySize() - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); + else -+ add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); ++ add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM); + + mips_machgroup = MACH_GROUP_BRCM; + mips_machtype = MACH_BCM; + -+ BpSetBoardId("96348GW-10"); ++ BpSetBoardId("96348GW-10"); +} + +/* -------------------------------------------------------------------------- + Name: prom_free_prom_memory -+Abstract: ++Abstract: + -------------------------------------------------------------------------- */ +void __init prom_free_prom_memory(void) +{ From 9671ee59e9ca7bfb9231cb60ea4d361e861b1c8c Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 29 Aug 2006 09:04:56 +0000 Subject: [PATCH 532/757] Fixup PCI compilation SVN-Revision: 4697 --- .../brcm63xx-2.6/patches/001-bcm963xx.patch | 100 ++++++++++-------- 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch index 6505225ceb6..c079c5a4bf8 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch @@ -8032,26 +8032,26 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c tlbw(p); break; -diff -urN linux.old/arch/mips/pci/fixup-bcm96348.c linux.dev/arch/mips/pci/fixup-bcm96348.c ---- linux.old/arch/mips/pci/fixup-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/pci/fixup-bcm96348.c 2006-08-25 00:39:38.000000000 +0200 -@@ -0,0 +1,85 @@ +diff -urN linux-2.6.17/arch/mips/pci/fixup-bcm96348.c linux-2.6.17-brcm63xx/arch/mips/pci/fixup-bcm96348.c +--- linux-2.6.17/arch/mips/pci/fixup-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/pci/fixup-bcm96348.c 2006-08-29 10:25:22.000000000 +0200 +@@ -0,0 +1,93 @@ +/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/init.h> @@ -8091,10 +8091,10 @@ diff -urN linux.old/arch/mips/pci/fixup-bcm96348.c linux.dev/arch/mips/pci/fixup + // Memory Window 1. Mask determines which bits are decoded. + mpi->l2pmrange1 = ~(size-1); + // UBUS to PCI Memory base address. This is akin to the ChipSelect base -+ // register. ++ // register. + mpi->l2pmbase1 = memaddr & BCM_PCI_ADDR_MASK; + // UBUS to PCI Remap Address. Replaces the masked address bits in the -+ // range register with this setting. ++ // range register with this setting. + // Also, enable direct I/O and direct Memory accesses + mpi->l2pmremap1 = (memaddr | MEM_WINDOW_EN); + break; @@ -8102,7 +8102,7 @@ diff -urN linux.old/arch/mips/pci/fixup-bcm96348.c linux.dev/arch/mips/pci/fixup + case 1: + // Memory Window 2 + mpi->l2pmrange2 = ~(size-1); -+ // UBUS to PCI Memory base address. ++ // UBUS to PCI Memory base address. + mpi->l2pmbase2 = memaddr & BCM_PCI_ADDR_MASK; + // UBUS to PCI Remap Address + mpi->l2pmremap2 = (memaddr | MEM_WINDOW_EN); @@ -8117,10 +8117,18 @@ diff -urN linux.old/arch/mips/pci/fixup-bcm96348.c linux.dev/arch/mips/pci/fixup + } +} + -+struct pci_fixup pcibios_fixups[] = { ++int pcibios_plat_dev_init(struct pci_dev *dev) ++{ ++ return 0; ++} ++ ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, PCI_ANY_ID, ++ bcm96348_fixup); ++ ++/*struct pci_fixup pcibios_fixups[] = { + { PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, bcm96348_fixup }, + {0} -+}; ++};*/ diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile --- linux.old/arch/mips/pci/Makefile 2006-08-25 00:43:29.000000000 +0200 +++ linux.dev/arch/mips/pci/Makefile 2006-08-25 00:39:38.000000000 +0200 @@ -8412,26 +8420,26 @@ diff -urN linux.old/arch/mips/pci/ops-bcm96348.c linux.dev/arch/mips/pci/ops-bcm + .read = bcm96348_pcibios_read, + .write = bcm96348_pcibios_write +}; -diff -urN linux.old/arch/mips/pci/pci-bcm96348.c linux.dev/arch/mips/pci/pci-bcm96348.c ---- linux.old/arch/mips/pci/pci-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/pci/pci-bcm96348.c 2006-08-25 00:39:38.000000000 +0200 +diff -urN linux-2.6.17/arch/mips/pci/pci-bcm96348.c linux-2.6.17-brcm63xx/arch/mips/pci/pci-bcm96348.c +--- linux-2.6.17/arch/mips/pci/pci-bcm96348.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-brcm63xx/arch/mips/pci/pci-bcm96348.c 2006-08-29 10:25:13.000000000 +0200 @@ -0,0 +1,54 @@ +/* -+<:copyright-gpl -+ Copyright 2002 Broadcom Corp. All Rights Reserved. -+ -+ This program is free software; you can distribute it and/or modify it -+ under the terms of the GNU General Public License (Version 2) as -+ published by the Free Software Foundation. -+ -+ This program is distributed in the hope 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. ++<:copyright-gpl ++ Copyright 2002 Broadcom Corp. All Rights Reserved. ++ ++ This program is free software; you can distribute it and/or modify it ++ under the terms of the GNU General Public License (Version 2) as ++ published by the Free Software Foundation. ++ ++ This program is distributed in the hope 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/types.h> @@ -8439,7 +8447,7 @@ diff -urN linux.old/arch/mips/pci/pci-bcm96348.c linux.dev/arch/mips/pci/pci-bcm +#include <linux/kernel.h> +#include <linux/init.h> + -+#include <asm/pci_channel.h> ++//#include <asm/pci_channel.h> +#include <bcmpci.h> + +static struct resource bcm_pci_io_resource = { @@ -8459,9 +8467,9 @@ diff -urN linux.old/arch/mips/pci/pci-bcm96348.c linux.dev/arch/mips/pci/pci-bcm +extern struct pci_ops bcm96348_pci_ops; + +struct pci_controller bcm96348_controller = { -+ .pci_ops = &bcm96348_pci_ops, -+ .io_resource = &bcm_pci_io_resource, -+ .mem_resource = &bcm_pci_mem_resource, ++ .pci_ops = &bcm96348_pci_ops, ++ .io_resource = &bcm_pci_io_resource, ++ .mem_resource = &bcm_pci_mem_resource, +}; + +static void bcm96348_pci_init(void) From 84b30c65b8f4ad061c4dba8e9db2a90d3d61131d Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 29 Aug 2006 09:11:31 +0000 Subject: [PATCH 533/757] Enable PCI in kernel config, and compile wireless drivers SVN-Revision: 4698 --- openwrt/target/linux/brcm63xx-2.6/config | 113 ++++++++++++++++++++--- 1 file changed, 102 insertions(+), 11 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index 19968aaff2c..3b467f2af27 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Sat Aug 5 21:00:37 2006 +# Tue Aug 29 10:58:19 2006 # CONFIG_MIPS=y @@ -72,7 +72,7 @@ CONFIG_BCM_SERIAL=y # CONFIG_BCM_ENET is not set # CONFIG_BCM_USB is not set # CONFIG_BCM_WLAN is not set -# CONFIG_BCM_PCI is not set +CONFIG_BCM_PCI=y # CONFIG_BCM_ATMAPI is not set # CONFIG_BCM_ATMTEST is not set # CONFIG_BCM_ADSL is not set @@ -95,11 +95,6 @@ CONFIG_BCM_PROCFS_IMPL=1 CONFIG_BCM_VDSL_IMPL=1 CONFIG_BCM_SECURITY_IMPL=1 CONFIG_BCM_HPNA_IMPL=0 -CONFIG_ROOTFS_SQUASHFS=y -# CONFIG_ROOTFS_CRAMFS is not set -# CONFIG_ROOTFS_JFFS2 is not set -# CONFIG_ROOTFS_NFS is not set -CONFIG_ROOT_FLASHFS="root=/dev/mtdblock2 rootfstype=cramfs,squashfs,jffs2 noinitrd console=ttyS0,115200" CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y @@ -247,7 +242,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # Bus options (PCI, PCMCIA, EISA, ISA, TC) # CONFIG_HW_HAS_PCI=y -# CONFIG_PCI is not set +CONFIG_PCI=y +CONFIG_PCI_DEBUG=y CONFIG_MMU=y # @@ -258,6 +254,7 @@ CONFIG_MMU=y # # PCI Hotplug Support # +# CONFIG_HOTPLUG_PCI is not set # # Executable file formats @@ -722,11 +719,13 @@ CONFIG_MTD_PHYSMAP_LEN=0x400000 CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # CONFIG_MTD_BCM963XX is not set # CONFIG_MTD_CSTM_MIPS_IXX is not set +# CONFIG_MTD_PCI is not set # CONFIG_MTD_PLATRAM is not set # # Self-contained MTD device drivers # +# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set @@ -761,9 +760,14 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # # Block devices # +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_BLK_DEV_INITRD is not set # CONFIG_CDROM_PKTCDVD is not set @@ -793,10 +797,12 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # # IEEE 1394 (FireWire) support # +# CONFIG_IEEE1394 is not set # # I2O device support # +# CONFIG_I2O is not set # # Network device support @@ -814,6 +820,11 @@ CONFIG_IMQ_BEHAVIOR_BA=y CONFIG_IMQ_NUM_DEVS=2 CONFIG_TUN=m +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + # # PHY device support # @@ -833,19 +844,47 @@ CONFIG_CICADA_PHY=m # CONFIG_NET_ETHERNET=y CONFIG_MII=m +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set # CONFIG_DM9000 is not set +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +# CONFIG_NET_PCI is not set + # # Ethernet (1000 Mbit) # +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set # # Ethernet (10000 Mbit) # +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set # # Token Ring devices # +# CONFIG_TR is not set # # Wireless LAN (non-hamradio) @@ -857,9 +896,42 @@ CONFIG_NET_WIRELESS_RTNETLINK=y # Obsolete Wireless cards support (pre-802.11) # # CONFIG_STRIP is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +CONFIG_IPW2100_DEBUG=y +CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW_QOS=y +CONFIG_IPW2200_DEBUG=y +CONFIG_HERMES=m +CONFIG_PLX_HERMES=m +CONFIG_TMD_HERMES=m +CONFIG_NORTEL_HERMES=m +CONFIG_PCI_HERMES=m +CONFIG_ATMEL=m +CONFIG_PCI_ATMEL=m + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +CONFIG_PRISM54=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAP_PCI=m +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_PIO=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +# CONFIG_BCM43XX_PIO_MODE is not set +CONFIG_NET_WIRELESS=y # # Wan interfaces @@ -871,6 +943,19 @@ CONFIG_HOSTAP_FIRMWARE_NVRAM=y # CONFIG_ATM_DUMMY=m CONFIG_ATM_TCP=m +# CONFIG_ATM_LANAI is not set +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_ZATM is not set +# CONFIG_ATM_NICSTAR is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_AMBASSADOR is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set CONFIG_PPP=m CONFIG_PPP_MULTILINK=y CONFIG_PPP_FILTER=y @@ -937,6 +1022,7 @@ CONFIG_MOUSE_PS2=m CONFIG_SERIO=m CONFIG_SERIO_I8042=m CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=m # CONFIG_SERIO_RAW is not set # CONFIG_GAMEPORT is not set @@ -955,6 +1041,7 @@ CONFIG_SERIO_LIBPS2=m # # Non-8250 serial port support # +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set @@ -971,10 +1058,12 @@ CONFIG_UNIX98_PTYS=y # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # +# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # @@ -1035,9 +1124,10 @@ CONFIG_VIDEO_V4L2=y # # USB support # -# CONFIG_USB_ARCH_HAS_HCD is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +# CONFIG_USB is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' @@ -1069,6 +1159,7 @@ CONFIG_VIDEO_V4L2=y # # InfiniBand support # +# CONFIG_INFINIBAND is not set # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) From 183eb1bd62e8ee95cec870b8e94c294990ea561b Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 29 Aug 2006 10:11:12 +0000 Subject: [PATCH 534/757] skip a lot of useless junk in madwifi on linux 2.4 SVN-Revision: 4699 --- openwrt/package/madwifi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index d65b0df50ef..e70fbcd6d9e 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -120,7 +120,7 @@ endif $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ $(BUS_MODULES) \ $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(1)/usr/sbin/ endef From 806861c612d44abc1dd34e2581d98387a4d80721 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 29 Aug 2006 16:20:00 +0000 Subject: [PATCH 535/757] update madwifi to 0.9.2 SVN-Revision: 4701 --- openwrt/package/madwifi/Makefile | 16 +- .../madwifi/patches/100-kernel_cflags.patch | 73 ++- .../madwifi/patches/101-no_werror.patch | 12 - .../patches/102-multicall_binary.patch | 537 +++--------------- .../madwifi/patches/103-disable_rfkill.patch | 8 +- .../patches/104-apmode_by_default.patch | 8 +- .../patches/105-no_forced_aes_dep.patch | 39 -- .../madwifi/patches/106-slab_fix.patch | 11 - 8 files changed, 137 insertions(+), 567 deletions(-) delete mode 100644 openwrt/package/madwifi/patches/101-no_werror.patch delete mode 100644 openwrt/package/madwifi/patches/105-no_forced_aes_dep.patch delete mode 100644 openwrt/package/madwifi/patches/106-slab_fix.patch diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index e70fbcd6d9e..e56b2d7615f 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=madwifi -PKG_VERSION:=0.9.0 +PKG_VERSION:=0.9.2 PKG_RELEASE:=1 -PKG_MD5SUM:=9b558d1df84cab2b0006c595feee0fba +PKG_MD5SUM:=a75baacbe07085ddc5cb28e1fb43edbb PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -20,6 +20,8 @@ PKG_CAT:=bzcat PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +RATE_CONTROL:=sample + ifeq ($(ARCH),mips) HAL_TARGET:=mips-be-elf endif @@ -53,14 +55,15 @@ ifeq ($(findstring PCI,$(BUS)),PCI) endif MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ + PATH="$(TARGET_PATH)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - CC="$(TARGET_CC)" \ TARGET="$(HAL_TARGET)" \ TOOLPREFIX="$(KERNEL_CROSS)" \ TOOLPATH="$(KERNEL_CROSS)" \ KERNELPATH="$(LINUX_DIR)" \ - LDOPTS="" \ + LDOPTS=" " \ + ATH_RATE="ath_rate/$(RATE_CONTROL)" \ DOMULTI=1 include $(INCLUDE_DIR)/package.mk @@ -109,6 +112,7 @@ define Package/kmod-madwifi/install mkdir -p $(1)/lib/modules/$(LINUX_VERSION) mkdir -p $(1)/usr/sbin install -m0644 ./files/madwifi.modules $(1)/etc/modules.d/20-madwifi + echo ath_rate_$(RATE_CONTROL) >> $(1)/etc/modules.d/20-madwifi ifeq ($(findstring AHB,$(BUS)),AHB) echo ath_ahb >> $(1)/etc/modules.d/20-madwifi endif @@ -117,9 +121,9 @@ ifeq ($(findstring PCI,$(BUS)),PCI) endif install -m0755 ./files/madwifi.init $(1)/etc/init.d/S20madwifi $(CP) \ - $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/ath/ath_hal.$(LINUX_KMOD_SUFFIX) \ $(BUS_MODULES) \ - $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/ath_rate/$(RATE_CONTROL)/ath_rate_$(RATE_CONTROL).$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(1)/usr/sbin/ diff --git a/openwrt/package/madwifi/patches/100-kernel_cflags.patch b/openwrt/package/madwifi/patches/100-kernel_cflags.patch index ef283dd3f2e..93319f47af1 100644 --- a/openwrt/package/madwifi/patches/100-kernel_cflags.patch +++ b/openwrt/package/madwifi/patches/100-kernel_cflags.patch @@ -1,43 +1,42 @@ -diff -ru madwifi-ng-r1486-20060329/Makefile madwifi-ng-r1486-20060329-patch/Makefile ---- madwifi-ng-r1486-20060329/Makefile 2006-03-13 19:23:02.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/Makefile 2006-03-31 10:52:05.000000000 -0500 -@@ -51,7 +51,7 @@ +diff -ur madwifi.old/hal/public/mips-be-elf.inc madwifi.dev/hal/public/mips-be-elf.inc +--- madwifi.old/hal/public/mips-be-elf.inc 2006-05-27 04:48:16.000000000 +0200 ++++ madwifi.dev/hal/public/mips-be-elf.inc 2006-08-29 18:17:44.000000000 +0200 +@@ -71,5 +71,5 @@ + + LDOPTS= -EB + COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN +-COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips2 -Wa,--trap \ ++COPTS+= -G 0 -mno-abicalls -fno-pic -mips32 -Wa,--trap \ + -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls +diff -ur madwifi.old/hal/public/mips-le-elf.inc madwifi.dev/hal/public/mips-le-elf.inc +--- madwifi.old/hal/public/mips-le-elf.inc 2006-05-27 04:48:16.000000000 +0200 ++++ madwifi.dev/hal/public/mips-le-elf.inc 2006-08-29 18:17:57.000000000 +0200 +@@ -68,5 +68,5 @@ + + LDOPTS= -EL + COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN +-COPTS+= -G 0 -EL -mno-abicalls -fno-pic -mips2 -Wa,--trap \ ++COPTS+= -G 0 -mno-abicalls -fno-pic -mips32 -Wa,--trap \ + -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls +diff -ur madwifi.old/hal/public/xscale-be-elf.inc madwifi.dev/hal/public/xscale-be-elf.inc +--- madwifi.old/hal/public/xscale-be-elf.inc 2006-05-27 04:48:16.000000000 +0200 ++++ madwifi.dev/hal/public/xscale-be-elf.inc 2006-08-29 18:01:39.000000000 +0200 +@@ -77,5 +77,5 @@ + + LDOPTS= -EB + COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN +-COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ ++COPTS+= -march=armv5te -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ + -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2 +diff -ur madwifi.old/Makefile madwifi.dev/Makefile +--- madwifi.old/Makefile 2006-07-14 07:15:56.000000000 +0200 ++++ madwifi.dev/Makefile 2006-08-29 18:01:39.000000000 +0200 +@@ -54,7 +54,7 @@ all: modules tools -modules: configcheck svnversion.h +modules: svnversion.h - mkdir -p ${SYMBOLSDIR} - for i in ${DIRS_MODULES}; do \ + ifdef LINUX24 + for i in $(DIRS_MODULES); do \ $(MAKE) -C $$i || exit 1; \ -diff -ru madwifi-ng-r1486-20060329/hal/public/mips-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/mips-be-elf.inc ---- madwifi-ng-r1486-20060329/hal/public/mips-be-elf.inc 2006-03-28 03:46:27.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/hal/public/mips-be-elf.inc 2006-03-31 10:52:05.000000000 -0500 -@@ -66,5 +66,5 @@ - - LDOPTS= -EB - COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN --COPTS+= -G 0 -EB -mno-abicalls -fno-pic -Wa,--trap \ -+COPTS+= -G 0 -EB -mno-abicalls -fno-pic -Wa,--trap -mips32 \ - -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -diff -ru madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/mips-le-elf.inc ---- madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc 2006-03-28 03:46:27.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/hal/public/mips-le-elf.inc 2006-03-31 10:52:05.000000000 -0500 -@@ -63,5 +63,5 @@ - - LDOPTS= -EL - COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN --COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap \ -+COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap -mips32 \ - -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -diff -ur madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc ---- madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc 2006-02-11 13:04:39.000000000 +0100 -+++ madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc 2006-04-16 15:07:59.000000000 +0200 -@@ -72,5 +72,5 @@ - - LDOPTS= -EB - COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN -DAH_REGOPS_FUNC --COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ -- -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2 -+COPTS+= -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common \ -+ -msoft-float -mfp=2 diff --git a/openwrt/package/madwifi/patches/101-no_werror.patch b/openwrt/package/madwifi/patches/101-no_werror.patch deleted file mode 100644 index 40eddc669f6..00000000000 --- a/openwrt/package/madwifi/patches/101-no_werror.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru madwifi-ng-r1486-20060329/Makefile.inc madwifi-ng-r1486-20060329-patch/Makefile.inc ---- madwifi-ng-r1486-20060329/Makefile.inc 2006-03-21 15:21:12.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/Makefile.inc 2006-03-29 16:44:41.000000000 -0500 -@@ -193,7 +193,7 @@ - # - TOOLS= ${DEPTH}/tools - --COPTS+= -Werror -+#COPTS+= -Werror - INCS= -include ${obj}/${DEPTH}/include/compat.h -I${obj}/${DEPTH}/include - - ifeq ($(strip ${BUS}),AHB) diff --git a/openwrt/package/madwifi/patches/102-multicall_binary.patch b/openwrt/package/madwifi/patches/102-multicall_binary.patch index 8f20e467b85..8fa65676d4c 100644 --- a/openwrt/package/madwifi/patches/102-multicall_binary.patch +++ b/openwrt/package/madwifi/patches/102-multicall_binary.patch @@ -1,377 +1,6 @@ -diff -ruN madwifi-ng-r1486-20060329/102-multicall_binary.patch madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch ---- madwifi-ng-r1486-20060329/102-multicall_binary.patch 1969-12-31 19:00:00.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch 2006-03-31 10:58:27.000000000 -0500 -@@ -0,0 +1,367 @@ -+diff -urN madwifi-ng-r1416-20060126/tools/80211debug.c madwifi-ng-r1416-20060126-owrt/tools/80211debug.c -+--- madwifi-ng-r1416-20060126/tools/80211debug.c 2005-11-23 22:23:20.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/80211debug.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -49,6 +49,10 @@ -+ #include <getopt.h> -+ #include <err.h> -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ #define N(a) (sizeof(a)/sizeof(a[0])) -+ -+ const char *progname; -+@@ -176,9 +180,19 @@ -+ } -+ #endif /* __linux__ */ -+ -++#ifdef DOMULTI -++ -++int -++a80211debug_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ const char *ifname = "ath0"; -+ const char *cp, *tp; -+ const char *sep; -+diff -urN madwifi-ng-r1416-20060126/tools/80211stats.c madwifi-ng-r1416-20060126-owrt/tools/80211stats.c -+--- madwifi-ng-r1416-20060126/tools/80211stats.c 2005-11-23 22:52:24.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/80211stats.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -58,6 +58,10 @@ -+ #include "net80211/ieee80211_crypto.h" -+ #include "net80211/ieee80211_ioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ #ifndef SIOCG80211STATS -+ #define SIOCG80211STATS (SIOCDEVPRIVATE+2) -+ #endif -+@@ -239,9 +243,19 @@ -+ #undef STAT -+ } -+ -++#ifdef DOMULTI -++ -++int -++a80211stats_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ int c, len; -+ struct ieee80211req_sta_info *si; -+ u_int8_t buf[24*1024], *cp; -+diff -urN madwifi-ng-r1416-20060126/tools/athchans.c madwifi-ng-r1416-20060126-owrt/tools/athchans.c -+--- madwifi-ng-r1416-20060126/tools/athchans.c 2005-11-24 00:07:30.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athchans.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -57,6 +57,10 @@ -+ #include "net80211/ieee80211_crypto.h" -+ #include "net80211/ieee80211_ioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ static int s = -1; -+ const char *progname; -+ -+@@ -134,9 +138,20 @@ -+ } -+ -+ #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY)) -++ -++#ifdef DOMULTI -++ -++int -++athchans_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ const char *ifname = "wifi0"; -+ struct ieee80211req_chanlist chanlist; -+ int c; -+diff -urN madwifi-ng-r1416-20060126/tools/athctrl.c madwifi-ng-r1416-20060126-owrt/tools/athctrl.c -+--- madwifi-ng-r1416-20060126/tools/athctrl.c 2005-11-23 22:23:20.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athctrl.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -52,6 +52,10 @@ -+ -+ #include <net/if.h> -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ static int -+ setsysctrl(const char *dev, const char *control , u_long value) -+ { -+@@ -83,9 +87,19 @@ -+ exit(1); -+ } -+ -++#ifdef DOMULTI -++ -++int -++athctrl_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ char device[IFNAMSIZ + 1]; -+ int distance = -1; -+ int c; -+diff -urN madwifi-ng-r1416-20060126/tools/athdebug.c madwifi-ng-r1416-20060126-owrt/tools/athdebug.c -+--- madwifi-ng-r1416-20060126/tools/athdebug.c 2005-11-23 22:23:20.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athdebug.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -52,6 +52,10 @@ -+ #include <getopt.h> -+ #include <err.h> -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ #define N(a) (sizeof(a)/sizeof(a[0])) -+ -+ const char *progname; -+@@ -170,9 +174,20 @@ -+ } -+ #endif /* __linux__ */ -+ -++#ifdef DOMULTI -++ -++int -++athdebug_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -++ -+ #ifdef __linux__ -+ const char *ifname = "wifi0"; -+ #else -+diff -urN madwifi-ng-r1416-20060126/tools/athkey.c madwifi-ng-r1416-20060126-owrt/tools/athkey.c -+--- madwifi-ng-r1416-20060126/tools/athkey.c 2005-11-24 00:07:30.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athkey.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -57,6 +57,10 @@ -+ #include "net80211/ieee80211_crypto.h" -+ #include "net80211/ieee80211_ioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ static int s = -1; -+ const char *progname; -+ -+@@ -207,9 +211,19 @@ -+ exit(-1); -+ } -+ -++#ifdef DOMULTI -++ -++int -++athkey_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ const char *ifname = "wifi0"; -+ struct ieee80211req_key setkey; -+ struct ieee80211req_del_key delkey; -+diff -urN madwifi-ng-r1416-20060126/tools/athstats.c madwifi-ng-r1416-20060126-owrt/tools/athstats.c -+--- madwifi-ng-r1416-20060126/tools/athstats.c 2006-01-16 09:59:07.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athstats.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -64,6 +64,10 @@ -+ #include "ah_desc.h" -+ #include "if_athioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ static const struct { -+ u_int phyerr; -+ const char* desc; -+@@ -242,9 +246,20 @@ -+ signalled = 1; -+ } -+ -++#ifdef DOMULTI -++ -++int -++athstats_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -++ -+ #ifdef __linux__ -+ const char *ifname = "wifi0"; -+ #else -+diff -urN madwifi-ng-r1416-20060126/tools/do_multi.c madwifi-ng-r1416-20060126-owrt/tools/do_multi.c -+--- madwifi-ng-r1416-20060126/tools/do_multi.c 1970-01-01 01:00:00.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -0,0 +1,30 @@ -++#include <string.h> -++#include "do_multi.h" -++ -++int -++main(int argc, char *argv[]) -++{ -++ char *progname; -++ int ret = 0; -++ -++ progname = basename(argv[0]); -++ -++ if(strcmp(progname, "80211debug") == 0) -++ ret = a80211debug_init(argc, argv); -++ if(strcmp(progname, "80211stats") == 0) -++ ret = a80211stats_init(argc, argv); -++ if(strcmp(progname, "athchans") == 0) -++ ret = athchans_init(argc, argv); -++ if(strcmp(progname, "athctrl") == 0) -++ ret = athctrl_init(argc, argv); -++ if(strcmp(progname, "athdebug") == 0) -++ ret = athdebug_init(argc, argv); -++ if(strcmp(progname, "athkey") == 0) -++ ret = athkey_init(argc, argv); -++ if(strcmp(progname, "athstats") == 0) -++ ret = athstats_init(argc, argv); -++ if(strcmp(progname, "wlanconfig") == 0) -++ ret = wlanconfig_init(argc, argv); -++ -++ return ret; -++} -+diff -urN madwifi-ng-r1416-20060126/tools/do_multi.h madwifi-ng-r1416-20060126-owrt/tools/do_multi.h -+--- madwifi-ng-r1416-20060126/tools/do_multi.h 1970-01-01 01:00:00.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.h 2006-01-26 11:26:44.000000000 +0100 -+@@ -0,0 +1,9 @@ -++ -++int a80211debug_init(int argc, char *argv[]); -++int a80211stats_init(int argc, char *argv[]); -++int athchans_init(int argc, char *argv[]); -++int athctrl_init(int argc, char *argv[]); -++int athdebug_init(int argc, char *argv[]); -++int athkey_init(int argc, char *argv[]); -++int athstats_init(int argc, char *argv[]); -++int wlanconfig_init(int argc, char *argv[]); -+diff -urN madwifi-ng-r1416-20060126/tools/Makefile madwifi-ng-r1416-20060126-owrt/tools/Makefile -+--- madwifi-ng-r1416-20060126/tools/Makefile 2006-01-04 09:16:11.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/Makefile 2006-01-26 14:52:45.000000000 +0100 -+@@ -50,6 +50,12 @@ -+ ALL= athstats 80211stats athkey athchans athctrl \ -+ athdebug 80211debug wlanconfig -+ -++ifdef DOMULTI -++OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \ -++ athdebug.o 80211debug.o wlanconfig.o -++ALL= ${OBJS} madwifi_multi -++endif -++ -+ all: ${ALL} -+ -+ INCS+= -I. -I${HAL} -I${DEPTH} -+@@ -59,6 +65,28 @@ -+ -+ all: ${ALL} -+ -++athstats.o: athstats.c -++ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c -++80211stats.o: 80211stats.c -++ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c -++athkey.o: athkey.c -++ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c -++athchans.o: athchans.c -++ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c -++athctrl.o: athctrl.c -++ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c -++athdebug.o: athdebug.c -++ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c -++wlanconfig.o: wlanconfig.c -++ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c -++80211debug.o: 80211debug.c -++ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c -++madwifi_multi: -++ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS} -++ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \ -++ ln -s -f madwifi_multi $$i; \ -++ done -++ -+ athstats: athstats.c -+ ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c -+ 80211stats: 80211stats.c -+diff -urN madwifi-ng-r1416-20060126/tools/wlanconfig.c madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c -+--- madwifi-ng-r1416-20060126/tools/wlanconfig.c 2006-01-22 10:58:31.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -57,6 +57,10 @@ -+ #include "net80211/ieee80211_crypto.h" -+ #include "net80211/ieee80211_ioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ /* -+ * These are taken from ieee80211_node.h -+ */ -+@@ -91,9 +95,19 @@ -+ -+ int verbose = 0; -+ -++#ifdef DOMULTI -++ -++int -++wlanconfig_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ const char *ifname, *cmd; -+ -+ if (argc < 2) -diff -ruN madwifi-ng-r1486-20060329/tools/80211debug.c madwifi-ng-r1486-20060329-patch/tools/80211debug.c ---- madwifi-ng-r1486-20060329/tools/80211debug.c 2006-03-10 08:23:50.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/80211debug.c 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/80211debug.c madwifi-0.9.2.dev/tools/80211debug.c +--- madwifi-0.9.2.old/tools/80211debug.c 2006-03-10 14:23:50.000000000 +0100 ++++ madwifi-0.9.2.dev/tools/80211debug.c 2006-08-29 17:49:50.000000000 +0200 @@ -49,6 +49,10 @@ #include <getopt.h> #include <err.h> @@ -403,9 +32,9 @@ diff -ruN madwifi-ng-r1486-20060329/tools/80211debug.c madwifi-ng-r1486-20060329 const char *ifname = "ath0"; const char *cp, *tp; const char *sep; -diff -ruN madwifi-ng-r1486-20060329/tools/80211stats.c madwifi-ng-r1486-20060329-patch/tools/80211stats.c ---- madwifi-ng-r1486-20060329/tools/80211stats.c 2006-03-10 08:23:50.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/80211stats.c 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/80211stats.c madwifi-0.9.2.dev/tools/80211stats.c +--- madwifi-0.9.2.old/tools/80211stats.c 2006-05-27 08:21:18.000000000 +0200 ++++ madwifi-0.9.2.dev/tools/80211stats.c 2006-08-29 17:49:50.000000000 +0200 @@ -58,6 +58,10 @@ #include "net80211/ieee80211_crypto.h" #include "net80211/ieee80211_ioctl.h" @@ -437,56 +66,9 @@ diff -ruN madwifi-ng-r1486-20060329/tools/80211stats.c madwifi-ng-r1486-20060329 int c, len; struct ieee80211req_sta_info *si; u_int8_t buf[24*1024], *cp; -diff -ruN madwifi-ng-r1486-20060329/tools/Makefile madwifi-ng-r1486-20060329-patch/tools/Makefile ---- madwifi-ng-r1486-20060329/tools/Makefile 2006-01-04 03:16:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/Makefile 2006-03-31 10:58:27.000000000 -0500 -@@ -50,6 +50,12 @@ - ALL= athstats 80211stats athkey athchans athctrl \ - athdebug 80211debug wlanconfig - -+ifdef DOMULTI -+OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \ -+ athdebug.o 80211debug.o wlanconfig.o -+ALL= ${OBJS} madwifi_multi -+endif -+ - all: ${ALL} - - INCS+= -I. -I${HAL} -I${DEPTH} -@@ -59,6 +65,30 @@ - - all: ${ALL} - -+athstats.o: athstats.c -+ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c -+80211stats.o: 80211stats.c -+ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c -+athkey.o: athkey.c -+ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c -+athchans.o: athchans.c -+ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c -+athctrl.o: athctrl.c -+ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c -+athdebug.o: athdebug.c -+ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c -+wlanconfig.o: wlanconfig.c -+ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c -+80211debug.o: 80211debug.c -+ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c -+do_multi.o: do_multi.c -+ ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c -+madwifi_multi: -+ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS} -+ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \ -+ ln -s -f madwifi_multi $$i; \ -+ done -+ - athstats: athstats.c - ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c - 80211stats: 80211stats.c -diff -ruN madwifi-ng-r1486-20060329/tools/athchans.c madwifi-ng-r1486-20060329-patch/tools/athchans.c ---- madwifi-ng-r1486-20060329/tools/athchans.c 2006-02-01 15:07:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athchans.c 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/athchans.c madwifi-0.9.2.dev/tools/athchans.c +--- madwifi-0.9.2.old/tools/athchans.c 2006-02-01 21:07:11.000000000 +0100 ++++ madwifi-0.9.2.dev/tools/athchans.c 2006-08-29 17:49:50.000000000 +0200 @@ -57,6 +57,10 @@ #include "net80211/ieee80211_crypto.h" #include "net80211/ieee80211_ioctl.h" @@ -519,9 +101,9 @@ diff -ruN madwifi-ng-r1486-20060329/tools/athchans.c madwifi-ng-r1486-20060329-p const char *ifname = "wifi0"; struct ieee80211req_chanlist chanlist; int c; -diff -ruN madwifi-ng-r1486-20060329/tools/athctrl.c madwifi-ng-r1486-20060329-patch/tools/athctrl.c ---- madwifi-ng-r1486-20060329/tools/athctrl.c 2006-02-03 07:03:03.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athctrl.c 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/athctrl.c madwifi-0.9.2.dev/tools/athctrl.c +--- madwifi-0.9.2.old/tools/athctrl.c 2006-02-03 13:03:03.000000000 +0100 ++++ madwifi-0.9.2.dev/tools/athctrl.c 2006-08-29 17:49:50.000000000 +0200 @@ -53,6 +53,10 @@ #include <net/if.h> @@ -553,9 +135,9 @@ diff -ruN madwifi-ng-r1486-20060329/tools/athctrl.c madwifi-ng-r1486-20060329-pa char device[IFNAMSIZ + 1]; int distance = -1; int c; -diff -ruN madwifi-ng-r1486-20060329/tools/athdebug.c madwifi-ng-r1486-20060329-patch/tools/athdebug.c ---- madwifi-ng-r1486-20060329/tools/athdebug.c 2006-03-10 08:23:50.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athdebug.c 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/athdebug.c madwifi-0.9.2.dev/tools/athdebug.c +--- madwifi-0.9.2.old/tools/athdebug.c 2006-05-05 06:17:59.000000000 +0200 ++++ madwifi-0.9.2.dev/tools/athdebug.c 2006-08-29 17:49:50.000000000 +0200 @@ -52,6 +52,10 @@ #include <getopt.h> #include <err.h> @@ -567,7 +149,7 @@ diff -ruN madwifi-ng-r1486-20060329/tools/athdebug.c madwifi-ng-r1486-20060329-p #define N(a) (sizeof(a)/sizeof(a[0])) const char *progname; -@@ -171,9 +175,20 @@ +@@ -179,9 +183,20 @@ } #endif /* __linux__ */ @@ -588,9 +170,9 @@ diff -ruN madwifi-ng-r1486-20060329/tools/athdebug.c madwifi-ng-r1486-20060329-p #ifdef __linux__ const char *ifname = "wifi0"; #else -diff -ruN madwifi-ng-r1486-20060329/tools/athkey.c madwifi-ng-r1486-20060329-patch/tools/athkey.c ---- madwifi-ng-r1486-20060329/tools/athkey.c 2006-02-01 15:07:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athkey.c 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/athkey.c madwifi-0.9.2.dev/tools/athkey.c +--- madwifi-0.9.2.old/tools/athkey.c 2006-02-01 21:07:11.000000000 +0100 ++++ madwifi-0.9.2.dev/tools/athkey.c 2006-08-29 17:49:50.000000000 +0200 @@ -57,6 +57,10 @@ #include "net80211/ieee80211_crypto.h" #include "net80211/ieee80211_ioctl.h" @@ -622,9 +204,9 @@ diff -ruN madwifi-ng-r1486-20060329/tools/athkey.c madwifi-ng-r1486-20060329-pat const char *ifname = "wifi0"; struct ieee80211req_key setkey; struct ieee80211req_del_key delkey; -diff -ruN madwifi-ng-r1486-20060329/tools/athstats.c madwifi-ng-r1486-20060329-patch/tools/athstats.c ---- madwifi-ng-r1486-20060329/tools/athstats.c 2006-02-01 15:07:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athstats.c 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/athstats.c madwifi-0.9.2.dev/tools/athstats.c +--- madwifi-0.9.2.old/tools/athstats.c 2006-05-05 06:20:50.000000000 +0200 ++++ madwifi-0.9.2.dev/tools/athstats.c 2006-08-29 17:49:50.000000000 +0200 @@ -64,6 +64,10 @@ #include "ah_desc.h" #include "if_athioctl.h" @@ -636,7 +218,7 @@ diff -ruN madwifi-ng-r1486-20060329/tools/athstats.c madwifi-ng-r1486-20060329-p static const struct { u_int phyerr; const char* desc; -@@ -242,9 +246,20 @@ +@@ -227,9 +231,20 @@ signalled = 1; } @@ -657,9 +239,9 @@ diff -ruN madwifi-ng-r1486-20060329/tools/athstats.c madwifi-ng-r1486-20060329-p #ifdef __linux__ const char *ifname = "wifi0"; #else -diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.c madwifi-ng-r1486-20060329-patch/tools/do_multi.c ---- madwifi-ng-r1486-20060329/tools/do_multi.c 1969-12-31 19:00:00.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/do_multi.c 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/do_multi.c madwifi-0.9.2.dev/tools/do_multi.c +--- madwifi-0.9.2.old/tools/do_multi.c 1970-01-01 01:00:00.000000000 +0100 ++++ madwifi-0.9.2.dev/tools/do_multi.c 2006-08-29 17:49:50.000000000 +0200 @@ -0,0 +1,30 @@ +#include <string.h> +#include "do_multi.h" @@ -691,9 +273,9 @@ diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.c madwifi-ng-r1486-20060329-p + + return ret; +} -diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.h madwifi-ng-r1486-20060329-patch/tools/do_multi.h ---- madwifi-ng-r1486-20060329/tools/do_multi.h 1969-12-31 19:00:00.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/do_multi.h 2006-03-31 10:58:27.000000000 -0500 +diff -urN madwifi-0.9.2.old/tools/do_multi.h madwifi-0.9.2.dev/tools/do_multi.h +--- madwifi-0.9.2.old/tools/do_multi.h 1970-01-01 01:00:00.000000000 +0100 ++++ madwifi-0.9.2.dev/tools/do_multi.h 2006-08-29 17:49:50.000000000 +0200 @@ -0,0 +1,9 @@ + +int a80211debug_init(int argc, char *argv[]); @@ -704,10 +286,57 @@ diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.h madwifi-ng-r1486-20060329-p +int athkey_init(int argc, char *argv[]); +int athstats_init(int argc, char *argv[]); +int wlanconfig_init(int argc, char *argv[]); -diff -ruN madwifi-ng-r1486-20060329/tools/wlanconfig.c madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c ---- madwifi-ng-r1486-20060329/tools/wlanconfig.c 2006-02-01 15:07:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c 2006-03-31 10:58:27.000000000 -0500 -@@ -59,6 +59,10 @@ +diff -urN madwifi-0.9.2.old/tools/Makefile madwifi-0.9.2.dev/tools/Makefile +--- madwifi-0.9.2.old/tools/Makefile 2006-07-14 07:15:56.000000000 +0200 ++++ madwifi-0.9.2.dev/tools/Makefile 2006-08-29 17:49:50.000000000 +0200 +@@ -49,6 +49,12 @@ + + ALL= athstats 80211stats athkey athchans athctrl \ + athdebug 80211debug wlanconfig ++ ++ifdef DOMULTI ++OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \ ++ athdebug.o 80211debug.o wlanconfig.o ++ALL= ${OBJS} madwifi_multi ++endif + + all: $(ALL) + +@@ -59,6 +65,30 @@ + + all: $(ALL) + ++athstats.o: athstats.c ++ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c ++80211stats.o: 80211stats.c ++ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c ++athkey.o: athkey.c ++ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c ++athchans.o: athchans.c ++ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c ++athctrl.o: athctrl.c ++ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c ++athdebug.o: athdebug.c ++ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c ++wlanconfig.o: wlanconfig.c ++ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c ++80211debug.o: 80211debug.c ++ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c ++do_multi.o: do_multi.c ++ ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c ++madwifi_multi: ++ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS} ++ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \ ++ ln -s -f madwifi_multi $$i; \ ++ done ++ + athstats: athstats.c + $(CC) -o athstats $(ALL_CFLAGS) -I../ath $(LDFLAGS) athstats.c + 80211stats: 80211stats.c +diff -urN madwifi-0.9.2.old/tools/wlanconfig.c madwifi-0.9.2.dev/tools/wlanconfig.c +--- madwifi-0.9.2.old/tools/wlanconfig.c 2006-05-14 09:17:29.000000000 +0200 ++++ madwifi-0.9.2.dev/tools/wlanconfig.c 2006-08-29 17:49:50.000000000 +0200 +@@ -60,6 +60,10 @@ #include "net80211/ieee80211_crypto.h" #include "net80211/ieee80211_ioctl.h" @@ -718,7 +347,7 @@ diff -ruN madwifi-ng-r1486-20060329/tools/wlanconfig.c madwifi-ng-r1486-20060329 /* * These are taken from ieee80211_node.h */ -@@ -92,9 +96,19 @@ +@@ -96,9 +100,19 @@ int verbose = 0; @@ -736,5 +365,5 @@ diff -ruN madwifi-ng-r1486-20060329/tools/wlanconfig.c madwifi-ng-r1486-20060329 + +#endif const char *ifname, *cmd; - - if (argc < 2) + unsigned char bnounit = 0; + char *if_base = NULL; diff --git a/openwrt/package/madwifi/patches/103-disable_rfkill.patch b/openwrt/package/madwifi/patches/103-disable_rfkill.patch index f5b3de14589..80a45e31d30 100644 --- a/openwrt/package/madwifi/patches/103-disable_rfkill.patch +++ b/openwrt/package/madwifi/patches/103-disable_rfkill.patch @@ -1,7 +1,7 @@ -diff -urN madwifi.old/ath/if_ath.c madwifi.dev/ath/if_ath.c ---- madwifi.old/ath/if_ath.c 2006-06-08 17:20:12.000000000 +0200 -+++ madwifi.dev/ath/if_ath.c 2006-06-08 18:30:10.000000000 +0200 -@@ -252,7 +252,7 @@ +diff -urN madwifi-0.9.2.old/ath/if_ath.c madwifi-0.9.2.dev/ath/if_ath.c +--- madwifi-0.9.2.old/ath/if_ath.c 2006-07-08 08:47:19.000000000 +0200 ++++ madwifi-0.9.2.dev/ath/if_ath.c 2006-08-29 17:49:50.000000000 +0200 +@@ -251,7 +251,7 @@ static int ath_outdoor = AH_FALSE; /* enable outdoor use */ static int ath_xchanmode = AH_TRUE; /* enable extended channels */ static char *autocreate = NULL; diff --git a/openwrt/package/madwifi/patches/104-apmode_by_default.patch b/openwrt/package/madwifi/patches/104-apmode_by_default.patch index bce07b50a05..fc5cb978b0c 100644 --- a/openwrt/package/madwifi/patches/104-apmode_by_default.patch +++ b/openwrt/package/madwifi/patches/104-apmode_by_default.patch @@ -1,7 +1,7 @@ -diff -ruN madwifi-ng-r1486-20060329/ath/if_ath.c madwifi-ng-r1486-20060329-patch/ath/if_ath.c ---- madwifi-ng-r1486-20060329/ath/if_ath.c 2006-03-23 15:12:18.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/ath/if_ath.c 2006-03-31 11:00:30.000000000 -0500 -@@ -388,7 +388,7 @@ +diff -urN madwifi-0.9.2.old/ath/if_ath.c madwifi-0.9.2.dev/ath/if_ath.c +--- madwifi-0.9.2.old/ath/if_ath.c 2006-08-29 17:49:50.000000000 +0200 ++++ madwifi-0.9.2.dev/ath/if_ath.c 2006-08-29 17:49:50.000000000 +0200 +@@ -387,7 +387,7 @@ struct ath_hal *ah; HAL_STATUS status; int error = 0, i; diff --git a/openwrt/package/madwifi/patches/105-no_forced_aes_dep.patch b/openwrt/package/madwifi/patches/105-no_forced_aes_dep.patch deleted file mode 100644 index fa439c6e96c..00000000000 --- a/openwrt/package/madwifi/patches/105-no_forced_aes_dep.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -urN madwifi.old/net80211/ieee80211_crypto_ccmp.c madwifi.dev/net80211/ieee80211_crypto_ccmp.c ---- madwifi.old/net80211/ieee80211_crypto_ccmp.c 2006-02-06 21:20:57.000000000 +0100 -+++ madwifi.dev/net80211/ieee80211_crypto_ccmp.c 2006-06-12 22:29:23.000000000 +0200 -@@ -105,12 +105,6 @@ - - ctx->cc_vap = vap; - ctx->cc_ic = vap->iv_ic; -- ctx->cc_tfm = crypto_alloc_tfm("aes", 0); -- if (ctx->cc_tfm == NULL) { -- FREE(ctx, M_DEVBUF); -- _MOD_DEC_USE(THIS_MODULE); -- return NULL; -- } - return ctx; - } - -@@ -137,8 +131,21 @@ - __func__, k->wk_keylen, 128 / NBBY); - return 0; - } -- if (k->wk_flags & IEEE80211_KEY_SWCRYPT) -+ -+ if (k->wk_flags & IEEE80211_KEY_SWCRYPT) { -+ if (ctx->cc_tfm == NULL) -+ ctx->cc_tfm = crypto_alloc_tfm("aes", 0); -+ -+ if (ctx->cc_tfm == NULL) { -+ IEEE80211_DPRINTF(ctx->cc_vap, IEEE80211_MSG_CRYPTO, -+ "%s: Tried to add a software crypto key, but no software crypto available\n", -+ __func__); -+ -+ return 0; -+ } -+ - crypto_cipher_setkey(ctx->cc_tfm, k->wk_key, k->wk_keylen); -+ } - return 1; - } - diff --git a/openwrt/package/madwifi/patches/106-slab_fix.patch b/openwrt/package/madwifi/patches/106-slab_fix.patch deleted file mode 100644 index 8de7dc7e432..00000000000 --- a/openwrt/package/madwifi/patches/106-slab_fix.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ruN madwifi-ng-r1590-20060523/net80211/ieee80211_linux.c madwifi-ng-r1590-20060523-patch/net80211/ieee80211_linux.c ---- madwifi-ng-r1590-20060523/net80211/ieee80211_linux.c 2006-06-13 14:26:25 -04:00 -+++ madwifi-ng-r1590-20060523-patch/net80211/ieee80211_linux.c 2006-06-13 14:26:41 -04:00 -@@ -44,6 +44,7 @@ - #include <linux/etherdevice.h> - #include <linux/if_vlan.h> - #include <linux/vmalloc.h> -+#include <linux/slab.h> - - #include <net/iw_handler.h> - #include <linux/wireless.h> From a40f9da6ac43c5897668c8fd488480d031d209f4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 29 Aug 2006 19:30:05 +0000 Subject: [PATCH 536/757] fix gcc symlink install SVN-Revision: 4702 --- openwrt/toolchain/gcc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/toolchain/gcc/Makefile b/openwrt/toolchain/gcc/Makefile index 85691e6a8ef..77f7645aac6 100644 --- a/openwrt/toolchain/gcc/Makefile +++ b/openwrt/toolchain/gcc/Makefile @@ -103,8 +103,8 @@ define Stage2/Install ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ cd bin; \ for app in $(REAL_GNU_TARGET_NAME)-* ; do \ - ln -sf $${app} \ - $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ + ln -sf $$$${app} \ + $(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \ done; \ ); endef From 1a8372bbd4d65dc51468af797948866799d19b57 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 02:58:26 +0000 Subject: [PATCH 537/757] remove -mapcs-32 from madwifi xscale build SVN-Revision: 4703 --- openwrt/package/madwifi/patches/100-kernel_cflags.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/madwifi/patches/100-kernel_cflags.patch b/openwrt/package/madwifi/patches/100-kernel_cflags.patch index 93319f47af1..d6320f59fee 100644 --- a/openwrt/package/madwifi/patches/100-kernel_cflags.patch +++ b/openwrt/package/madwifi/patches/100-kernel_cflags.patch @@ -26,7 +26,7 @@ diff -ur madwifi.old/hal/public/xscale-be-elf.inc madwifi.dev/hal/public/xscale- LDOPTS= -EB COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN -COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ -+COPTS+= -march=armv5te -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ ++COPTS+= -march=armv5te -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common \ -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2 diff -ur madwifi.old/Makefile madwifi.dev/Makefile --- madwifi.old/Makefile 2006-07-14 07:15:56.000000000 +0200 From fd211156a8da174ca65d59d79f591fce5b7b06b1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 03:21:23 +0000 Subject: [PATCH 538/757] add no_werror patch again, fix xscale cflags SVN-Revision: 4704 --- .../package/madwifi/patches/100-kernel_cflags.patch | 2 +- openwrt/package/madwifi/patches/101-no_werror.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 openwrt/package/madwifi/patches/101-no_werror.patch diff --git a/openwrt/package/madwifi/patches/100-kernel_cflags.patch b/openwrt/package/madwifi/patches/100-kernel_cflags.patch index d6320f59fee..39ac1437e11 100644 --- a/openwrt/package/madwifi/patches/100-kernel_cflags.patch +++ b/openwrt/package/madwifi/patches/100-kernel_cflags.patch @@ -26,7 +26,7 @@ diff -ur madwifi.old/hal/public/xscale-be-elf.inc madwifi.dev/hal/public/xscale- LDOPTS= -EB COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN -COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ -+COPTS+= -march=armv5te -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common \ ++COPTS+= -march=armv5te -mtune=xscale -mbig-endian -fno-strict-aliasing -fno-common \ -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2 diff -ur madwifi.old/Makefile madwifi.dev/Makefile --- madwifi.old/Makefile 2006-07-14 07:15:56.000000000 +0200 diff --git a/openwrt/package/madwifi/patches/101-no_werror.patch b/openwrt/package/madwifi/patches/101-no_werror.patch new file mode 100644 index 00000000000..d71021eb0e1 --- /dev/null +++ b/openwrt/package/madwifi/patches/101-no_werror.patch @@ -0,0 +1,11 @@ +--- madwifi.old/Makefile.inc 2006-07-14 07:15:56.000000000 +0200 ++++ madwifi.dev/Makefile.inc 2006-08-30 05:20:27.000000000 +0200 +@@ -181,7 +181,7 @@ + # + TOOLS= $(DEPTH)/tools + +-COPTS+= -Werror ++# COPTS+= -Werror + INCS= -include $(obj)/$(DEPTH)/include/compat.h -I$(obj)/$(DEPTH)/include + + ifeq ($(strip $(BUS)),AHB) From 1d2586a1b7d497a6f1dc78265b86f3c78f2a6933 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 04:02:21 +0000 Subject: [PATCH 539/757] enable math emulation SVN-Revision: 4705 --- openwrt/target/linux/magicbox-2.6/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/magicbox-2.6/config b/openwrt/target/linux/magicbox-2.6/config index b49faf30fce..0574cb98344 100644 --- a/openwrt/target/linux/magicbox-2.6/config +++ b/openwrt/target/linux/magicbox-2.6/config @@ -91,7 +91,7 @@ CONFIG_40x=y # CONFIG_8xx is not set # CONFIG_E200 is not set # CONFIG_E500 is not set -# CONFIG_MATH_EMULATION is not set +CONFIG_MATH_EMULATION=y # CONFIG_KEXEC is not set # CONFIG_CPU_FREQ is not set CONFIG_4xx=y From a57ca1df69dd083230e2b1cb1916a561c495f692 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 04:08:35 +0000 Subject: [PATCH 540/757] add default /etc/config/network SVN-Revision: 4706 --- openwrt/package/base-files/default/etc/config/network | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 openwrt/package/base-files/default/etc/config/network diff --git a/openwrt/package/base-files/default/etc/config/network b/openwrt/package/base-files/default/etc/config/network new file mode 100644 index 00000000000..60c2da12c5c --- /dev/null +++ b/openwrt/package/base-files/default/etc/config/network @@ -0,0 +1,5 @@ +config interface lan + option ifname eth0 + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 From a2d58f54e89eaa80e1d7f27eb493dfde9738cfbf Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 04:09:54 +0000 Subject: [PATCH 541/757] split magicbox patch SVN-Revision: 4707 --- .../patches/001-magicbox_support.patch | 136 ----------------- .../magicbox-2.6/patches/002-flash_map.patch | 137 ++++++++++++++++++ 2 files changed, 137 insertions(+), 136 deletions(-) create mode 100644 openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch diff --git a/openwrt/target/linux/magicbox-2.6/patches/001-magicbox_support.patch b/openwrt/target/linux/magicbox-2.6/patches/001-magicbox_support.patch index 57d3b31081f..b7806da6978 100644 --- a/openwrt/target/linux/magicbox-2.6/patches/001-magicbox_support.patch +++ b/openwrt/target/linux/magicbox-2.6/patches/001-magicbox_support.patch @@ -356,142 +356,6 @@ diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/Makefile linux-2.6.17-owrt/arch/pp obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o -diff -Nur linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-owrt/drivers/mtd/maps/Kconfig ---- linux-2.6.17/drivers/mtd/maps/Kconfig 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/drivers/mtd/maps/Kconfig 2006-08-25 23:33:05.000000000 +0200 -@@ -323,6 +323,15 @@ - Walnut board. If you have one of these boards and would like to - use the flash chips on it, say 'Y'. - -+config MTD_MAGICMAP -+ tristate "Flash device mapped on IBM 405EP MagicBox" -+ depends on MTD_CFI && MTD_PARTITIONS && 40x && MAGICBOX -+ help -+ This enables access routines for the flash chips on the IBM 405EP -+ MagicBox board. If you have one of these boards and would like to -+ use the flash chips on it, say 'Y'. -+ -+ - config MTD_EBONY - tristate "Flash devices mapped on IBM 440GP Ebony" - depends on MTD_JEDECPROBE && EBONY -diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c ---- linux-2.6.17/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c 2006-08-25 23:33:05.000000000 +0200 -@@ -0,0 +1,102 @@ -+/* -+ * magicmap.c: Copyleft 2005 Karol Lewandowski -+ * -+ * Mapping for MagicBox flash. -+ * Based on walnut.c. -+ * -+ * Heikki Lindholm <holindho@infradead.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 the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ */ -+ -+#include <linux/module.h> -+#include <linux/types.h> -+#include <linux/kernel.h> -+#include <linux/init.h> -+#include <linux/mtd/mtd.h> -+#include <linux/mtd/map.h> -+#include <linux/mtd/partitions.h> -+#include <linux/config.h> -+#include <asm/io.h> -+ -+static struct mtd_info *flash; -+ -+static struct map_info magic_map = { -+ .name = "Magically mapped flash", -+ .phys = 0xffc00000, -+ .size = 0x400000, -+ .bankwidth = 2, -+}; -+ -+static struct mtd_partition magic_partitions[] = { -+ { -+ .name = "kernel", -+ .offset = 0x0, -+ .size = 0x0e0000, -+ }, -+ { -+ .name = "ramdisk", -+ .offset = 0x0e0000, -+ .size = 0x2c0000, -+ }, -+ { -+ .name = "persistent", -+ .offset = 0x3a0000, -+ .size = 0x020000, -+ }, -+ { -+ .name = "bootloader", -+ .offset = 0x3c0000, -+ .size = 0x040000, -+ .mask_flags = MTD_WRITEABLE, -+ }, -+}; -+ -+int __init init_magic(void) -+{ -+ magic_map.virt = -+ (void __iomem *)ioremap(magic_map.phys, magic_map.size); -+ -+ if (!magic_map.virt) { -+ printk("Failed to ioremap flash.\n"); -+ return -EIO; -+ } -+ -+ simple_map_init(&magic_map); -+ -+ flash = do_map_probe("cfi_probe", &magic_map); -+ if (flash) { -+ flash->owner = THIS_MODULE; -+ add_mtd_partitions(flash, magic_partitions, -+ ARRAY_SIZE(magic_partitions)); -+ } else { -+ printk("map probe failed for flash\n"); -+ return -ENXIO; -+ } -+ -+ return 0; -+} -+ -+static void __exit cleanup_magic(void) -+{ -+ if (flash) { -+ del_mtd_partitions(flash); -+ map_destroy(flash); -+ } -+ -+ if (magic_map.virt) { -+ iounmap((void *)magic_map.virt); -+ magic_map.virt = NULL; -+ } -+} -+ -+module_init(init_magic); -+module_exit(cleanup_magic); -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Karol Lewandowski"); -+MODULE_DESCRIPTION("MTD map and partitions for IBM 405EP MagicBox boards"); -diff -Nur linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-owrt/drivers/mtd/maps/Makefile ---- linux-2.6.17/drivers/mtd/maps/Makefile 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/drivers/mtd/maps/Makefile 2006-08-25 23:33:05.000000000 +0200 -@@ -58,6 +58,7 @@ - obj-$(CONFIG_MTD_BEECH) += beech-mtd.o - obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o - obj-$(CONFIG_MTD_WALNUT) += walnut.o -+obj-$(CONFIG_MTD_MAGICMAP) += magicmap.o - obj-$(CONFIG_MTD_H720X) += h720x-flash.o - obj-$(CONFIG_MTD_SBC8240) += sbc8240.o - obj-$(CONFIG_MTD_NOR_TOTO) += omap-toto-flash.o diff -Nur linux-2.6.17/include/asm-ppc/ibm4xx.h linux-2.6.17-owrt/include/asm-ppc/ibm4xx.h --- linux-2.6.17/include/asm-ppc/ibm4xx.h 2006-06-18 03:49:35.000000000 +0200 +++ linux-2.6.17-owrt/include/asm-ppc/ibm4xx.h 2006-08-25 23:33:05.000000000 +0200 diff --git a/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch b/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch new file mode 100644 index 00000000000..5b45bcad559 --- /dev/null +++ b/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch @@ -0,0 +1,137 @@ +diff -Nur linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-owrt/drivers/mtd/maps/Kconfig +--- linux-2.6.17/drivers/mtd/maps/Kconfig 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/mtd/maps/Kconfig 2006-08-25 23:33:05.000000000 +0200 +@@ -323,6 +323,15 @@ + Walnut board. If you have one of these boards and would like to + use the flash chips on it, say 'Y'. + ++config MTD_MAGICMAP ++ tristate "Flash device mapped on IBM 405EP MagicBox" ++ depends on MTD_CFI && MTD_PARTITIONS && 40x && MAGICBOX ++ help ++ This enables access routines for the flash chips on the IBM 405EP ++ MagicBox board. If you have one of these boards and would like to ++ use the flash chips on it, say 'Y'. ++ ++ + config MTD_EBONY + tristate "Flash devices mapped on IBM 440GP Ebony" + depends on MTD_JEDECPROBE && EBONY +diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c +--- linux-2.6.17/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c 2006-08-25 23:33:05.000000000 +0200 +@@ -0,0 +1,102 @@ ++/* ++ * magicmap.c: Copyleft 2005 Karol Lewandowski ++ * ++ * Mapping for MagicBox flash. ++ * Based on walnut.c. ++ * ++ * Heikki Lindholm <holindho@infradead.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 the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <linux/mtd/mtd.h> ++#include <linux/mtd/map.h> ++#include <linux/mtd/partitions.h> ++#include <linux/config.h> ++#include <asm/io.h> ++ ++static struct mtd_info *flash; ++ ++static struct map_info magic_map = { ++ .name = "Magically mapped flash", ++ .phys = 0xffc00000, ++ .size = 0x400000, ++ .bankwidth = 2, ++}; ++ ++static struct mtd_partition magic_partitions[] = { ++ { ++ .name = "kernel", ++ .offset = 0x0, ++ .size = 0x0e0000, ++ }, ++ { ++ .name = "ramdisk", ++ .offset = 0x0e0000, ++ .size = 0x2c0000, ++ }, ++ { ++ .name = "persistent", ++ .offset = 0x3a0000, ++ .size = 0x020000, ++ }, ++ { ++ .name = "bootloader", ++ .offset = 0x3c0000, ++ .size = 0x040000, ++ .mask_flags = MTD_WRITEABLE, ++ }, ++}; ++ ++int __init init_magic(void) ++{ ++ magic_map.virt = ++ (void __iomem *)ioremap(magic_map.phys, magic_map.size); ++ ++ if (!magic_map.virt) { ++ printk("Failed to ioremap flash.\n"); ++ return -EIO; ++ } ++ ++ simple_map_init(&magic_map); ++ ++ flash = do_map_probe("cfi_probe", &magic_map); ++ if (flash) { ++ flash->owner = THIS_MODULE; ++ add_mtd_partitions(flash, magic_partitions, ++ ARRAY_SIZE(magic_partitions)); ++ } else { ++ printk("map probe failed for flash\n"); ++ return -ENXIO; ++ } ++ ++ return 0; ++} ++ ++static void __exit cleanup_magic(void) ++{ ++ if (flash) { ++ del_mtd_partitions(flash); ++ map_destroy(flash); ++ } ++ ++ if (magic_map.virt) { ++ iounmap((void *)magic_map.virt); ++ magic_map.virt = NULL; ++ } ++} ++ ++module_init(init_magic); ++module_exit(cleanup_magic); ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Karol Lewandowski"); ++MODULE_DESCRIPTION("MTD map and partitions for IBM 405EP MagicBox boards"); +diff -Nur linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-owrt/drivers/mtd/maps/Makefile +--- linux-2.6.17/drivers/mtd/maps/Makefile 2006-06-18 03:49:35.000000000 +0200 ++++ linux-2.6.17-owrt/drivers/mtd/maps/Makefile 2006-08-25 23:33:05.000000000 +0200 +@@ -58,6 +58,7 @@ + obj-$(CONFIG_MTD_BEECH) += beech-mtd.o + obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o + obj-$(CONFIG_MTD_WALNUT) += walnut.o ++obj-$(CONFIG_MTD_MAGICMAP) += magicmap.o + obj-$(CONFIG_MTD_H720X) += h720x-flash.o + obj-$(CONFIG_MTD_SBC8240) += sbc8240.o + obj-$(CONFIG_MTD_NOR_TOTO) += omap-toto-flash.o + From ba159656239b9b9644c120f3e5c995f3837aaff3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 04:26:19 +0000 Subject: [PATCH 542/757] remove useless junk SVN-Revision: 4708 --- openwrt/target/linux/magicbox-2.6/config | 307 +---------------------- 1 file changed, 6 insertions(+), 301 deletions(-) diff --git a/openwrt/target/linux/magicbox-2.6/config b/openwrt/target/linux/magicbox-2.6/config index 0574cb98344..a8cbec1730e 100644 --- a/openwrt/target/linux/magicbox-2.6/config +++ b/openwrt/target/linux/magicbox-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Fri Aug 25 19:17:05 2006 +# Wed Aug 30 06:25:29 2006 # CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y @@ -440,14 +440,9 @@ CONFIG_BT_BNEP_PROTO_FILTER=y # # Bluetooth device drivers # -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y CONFIG_BT_HCIUART=m CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_BCSP=y -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set # CONFIG_BT_HCIVHCI is not set CONFIG_IEEE80211=m # CONFIG_IEEE80211_DEBUG is not set @@ -582,7 +577,6 @@ CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_BLK_DEV_INITRD is not set # CONFIG_CDROM_PKTCDVD is not set @@ -597,67 +591,7 @@ CONFIG_BLK_DEV_NBD=m # SCSI device support # # CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -668,9 +602,6 @@ CONFIG_BLK_DEV_SD=m # Fusion MPT device support # # CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support @@ -820,7 +751,6 @@ CONFIG_PPP_BSDCOMP=m CONFIG_PPP_MPPE=m CONFIG_PPPOE=m # CONFIG_SLIP is not set -# CONFIG_NET_FC is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set @@ -894,11 +824,6 @@ CONFIG_WATCHDOG=y # # CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -947,39 +872,13 @@ CONFIG_WATCHDOG=y # # Multimedia devices # -CONFIG_VIDEO_DEV=m -# CONFIG_VIDEO_V4L1 is not set -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -# CONFIG_VIDEO_CPIA2 is not set - -# -# Encoders and Decoders -# - -# -# V4L USB devices -# - -# -# Radio Adapters -# +# CONFIG_VIDEO_DEV is not set +# CONFIG_VIDEO_V4L2 is not set # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set # # Graphics support @@ -989,103 +888,7 @@ CONFIG_VIDEO_V4L2=y # # Sound # -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# PCI devices -# -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALS300 is not set -# CONFIG_SND_ALS4000 is not set -# CONFIG_SND_ALI5451 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AZT3328 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_EMU10K1 is not set -# CONFIG_SND_EMU10K1X is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_ES1938 is not set -# CONFIG_SND_ES1968 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDA_INTEL is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1712 is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_MAESTRO3 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RIPTIDE is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_TRIDENT is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# ALSA PowerMac devices -# - -# -# ALSA PowerMac requires I2C -# - -# -# ALSA PowerMac requires INPUT -# - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -# CONFIG_SND_USB_USX2Y is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set +# CONFIG_SOUND is not set # # USB support @@ -1093,110 +896,12 @@ CONFIG_SND_USB_AUDIO=m CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -CONFIG_USB_DYNAMIC_MINORS=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -# CONFIG_USB_EHCI_SPLIT_ISO is not set -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_OHCI_HCD is not set -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m +# CONFIG_USB is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_ZD1201 is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - # # USB Gadget Support # From dfc990dfef54d6379756f1c080f3279869c32ef2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 04:46:00 +0000 Subject: [PATCH 543/757] remove even more stuff SVN-Revision: 4709 --- openwrt/target/linux/magicbox-2.6/config | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/openwrt/target/linux/magicbox-2.6/config b/openwrt/target/linux/magicbox-2.6/config index a8cbec1730e..efd3f5867ef 100644 --- a/openwrt/target/linux/magicbox-2.6/config +++ b/openwrt/target/linux/magicbox-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Wed Aug 30 06:25:29 2006 +# Wed Aug 30 06:45:18 2006 # CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y @@ -427,23 +427,7 @@ CONFIG_NET_ESTIMATOR=y # CONFIG_NET_PKTGEN is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -# CONFIG_BT_HIDP is not set - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT is not set CONFIG_IEEE80211=m # CONFIG_IEEE80211_DEBUG is not set CONFIG_IEEE80211_CRYPT_WEP=m @@ -873,7 +857,7 @@ CONFIG_WATCHDOG=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -# CONFIG_VIDEO_V4L2 is not set +CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices From d61fa4ec2a04c636e451de6a2180d425fc5981fd Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 05:12:31 +0000 Subject: [PATCH 544/757] update flash map driver for jffs2, squashfs will follow later SVN-Revision: 4710 --- .../magicbox-2.6/patches/002-flash_map.patch | 49 +++++++++++-------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch b/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch index 5b45bcad559..80382305130 100644 --- a/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch +++ b/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch @@ -1,6 +1,6 @@ -diff -Nur linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-owrt/drivers/mtd/maps/Kconfig ---- linux-2.6.17/drivers/mtd/maps/Kconfig 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/drivers/mtd/maps/Kconfig 2006-08-25 23:33:05.000000000 +0200 +diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig +--- linux.old/drivers/mtd/maps/Kconfig 2006-08-30 06:30:59.000000000 +0200 ++++ linux.dev/drivers/mtd/maps/Kconfig 2006-08-30 06:11:51.000000000 +0200 @@ -323,6 +323,15 @@ Walnut board. If you have one of these boards and would like to use the flash chips on it, say 'Y'. @@ -17,10 +17,10 @@ diff -Nur linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-owrt/drivers/mtd/ma config MTD_EBONY tristate "Flash devices mapped on IBM 440GP Ebony" depends on MTD_JEDECPROBE && EBONY -diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c ---- linux-2.6.17/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c 2006-08-25 23:33:05.000000000 +0200 -@@ -0,0 +1,102 @@ +diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magicmap.c +--- linux.old/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/drivers/mtd/maps/magicmap.c 2006-08-30 06:52:34.000000000 +0200 +@@ -0,0 +1,112 @@ +/* + * magicmap.c: Copyleft 2005 Karol Lewandowski + * @@ -57,21 +57,16 @@ diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd + +static struct mtd_partition magic_partitions[] = { + { -+ .name = "kernel", ++ .name = "linux", + .offset = 0x0, -+ .size = 0x0e0000, ++ .size = 0x3c0000, + }, + { -+ .name = "ramdisk", -+ .offset = 0x0e0000, ++ .name = "rootfs", ++ .offset = 0x100000, + .size = 0x2c0000, + }, + { -+ .name = "persistent", -+ .offset = 0x3a0000, -+ .size = 0x020000, -+ }, -+ { + .name = "bootloader", + .offset = 0x3c0000, + .size = 0x040000, @@ -81,6 +76,8 @@ diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd + +int __init init_magic(void) +{ ++ u32 size, len; ++ + magic_map.virt = + (void __iomem *)ioremap(magic_map.phys, magic_map.size); + @@ -94,6 +91,19 @@ diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd + flash = do_map_probe("cfi_probe", &magic_map); + if (flash) { + flash->owner = THIS_MODULE; ++ if (MTD_READ(flash, 12, sizeof(u32), &len, (char *) &size) || ++ len != 4) ++ return -ENXIO; ++ if ((size > 0) && (size < 0x400000)) { ++ /* skip to next erase block */ ++ if (size & (flash->erasesize - 1)) { ++ size |= (flash->erasesize - 1); ++ size += 1; ++ } ++ magic_partitions[1].offset = size; ++ magic_partitions[1].size = magic_partitions[2].offset - size; ++ } ++ + add_mtd_partitions(flash, magic_partitions, + ARRAY_SIZE(magic_partitions)); + } else { @@ -123,9 +133,9 @@ diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Karol Lewandowski"); +MODULE_DESCRIPTION("MTD map and partitions for IBM 405EP MagicBox boards"); -diff -Nur linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-owrt/drivers/mtd/maps/Makefile ---- linux-2.6.17/drivers/mtd/maps/Makefile 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-owrt/drivers/mtd/maps/Makefile 2006-08-25 23:33:05.000000000 +0200 +diff -urN linux.old/drivers/mtd/maps/Makefile linux.dev/drivers/mtd/maps/Makefile +--- linux.old/drivers/mtd/maps/Makefile 2006-08-30 06:30:59.000000000 +0200 ++++ linux.dev/drivers/mtd/maps/Makefile 2006-08-30 06:11:51.000000000 +0200 @@ -58,6 +58,7 @@ obj-$(CONFIG_MTD_BEECH) += beech-mtd.o obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o @@ -134,4 +144,3 @@ diff -Nur linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-owrt/drivers/mtd/m obj-$(CONFIG_MTD_H720X) += h720x-flash.o obj-$(CONFIG_MTD_SBC8240) += sbc8240.o obj-$(CONFIG_MTD_NOR_TOTO) += omap-toto-flash.o - From 172e5eb67e8ffb5c548f1d4652d2cd18b9cc633c Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 30 Aug 2006 09:57:57 +0000 Subject: [PATCH 545/757] Add new warning to help track down pesky compile issues SVN-Revision: 4713 --- openwrt/include/package.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 3328332725a..311ec35a9c1 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -27,7 +27,9 @@ define Build/DefaultTargets endif ifneq ($(MAKECMDGOALS),prereq) - $$(info Rebuilding $$(_INFO)) + ifneq ($$(_INFO),) + $$(info Rebuilding $$(_INFO)) + endif endif endif endif @@ -129,6 +131,10 @@ define BuildPackage ifneq ($(CONFIG_PACKAGE_$(1)),) compile-targets: $$(IPKG_$(1)) + else + compile-targets: $(1)-disabled + $(1)-disabled: + @echo "WARNING: skipping $(1) -- package not selected" endif endif From 7b8d2827f550a24518cd60029d228a301fa1e1e2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 10:24:11 +0000 Subject: [PATCH 546/757] only run trap error code in the configure template, if the configure script was not found SVN-Revision: 4715 --- openwrt/include/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 311ec35a9c1..ce3c4b6a1b2 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -263,7 +263,7 @@ endef define Build/Configure/Default @(cd $(PKG_BUILD_DIR)/$(3); \ - [ -x configure ] && \ + [ -x configure ] && { \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ @@ -287,7 +287,7 @@ define Build/Configure/Default --infodir=/usr/info \ $(DISABLE_NLS) \ $(1); \ - true; \ + } || true; \ ) endef From a5b58128b02ec8e542abe1adb596a3099eb8e10a Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 30 Aug 2006 10:26:30 +0000 Subject: [PATCH 547/757] fix previous commit SVN-Revision: 4716 --- openwrt/include/package.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index ce3c4b6a1b2..8d905093055 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -237,7 +237,7 @@ define BuildPackage clean: $(1)-clean $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): $(PKG_BUILD_DIR)/.prepared - -rm $(PKG_BUILD_DIR)/.version-$(1)_* + -@rm $(PKG_BUILD_DIR)/.version-$(1)_* 2>/dev/null @touch $$@ $$(eval $$(call Build/DefaultTargets,$(1))) @@ -263,7 +263,7 @@ endef define Build/Configure/Default @(cd $(PKG_BUILD_DIR)/$(3); \ - [ -x configure ] && { \ + [ \! -x configure ] || \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ @@ -287,7 +287,6 @@ define Build/Configure/Default --infodir=/usr/info \ $(DISABLE_NLS) \ $(1); \ - } || true; \ ) endef From 2dc6d4d78145ed3bb0f470c09a0e832f93419aff Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 10:30:14 +0000 Subject: [PATCH 548/757] use an if block on the whole configure command SVN-Revision: 4717 --- openwrt/include/package.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 8d905093055..9a947f35824 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -263,7 +263,7 @@ endef define Build/Configure/Default @(cd $(PKG_BUILD_DIR)/$(3); \ - [ \! -x configure ] || \ + if [ -x configure ]; then \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ @@ -287,6 +287,7 @@ define Build/Configure/Default --infodir=/usr/info \ $(DISABLE_NLS) \ $(1); \ + fi; \ ) endef From 60ae645d00c53ca17b2732d6e0426846474c25d5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 10:49:26 +0000 Subject: [PATCH 549/757] set -mcpu=405 in the default cflags for magicbox SVN-Revision: 4718 --- openwrt/toolchain/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/toolchain/Config.in b/openwrt/toolchain/Config.in index b5258ddce98..32dc33e277e 100644 --- a/openwrt/toolchain/Config.in +++ b/openwrt/toolchain/Config.in @@ -54,6 +54,7 @@ config TARGET_OPTIMIZATION default "-Os -pipe -march=i486 -funit-at-a-time" if i386 default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" if mipsel || mips default "-Os -pipe -mcpu=xscale -funit-at-a-time" if armeb + default "-Os -pipe -funit-at-a-time -mcpu=405" if LINUX_2_6_MAGICBOX default "-Os -pipe -funit-at-a-time" help Optimizations to use when building for the target host. From 40d922651cccf49ce425bef39f4e2dc158953f71 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Wed, 30 Aug 2006 11:16:06 +0000 Subject: [PATCH 550/757] Add early support for CFE mapping SVN-Revision: 4719 --- .../patches/040-bcm963xx_flashmap.patch | 53 +++++++++++++------ 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch b/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch index c160e23dce8..997cc980f91 100644 --- a/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch +++ b/openwrt/target/linux/brcm63xx-2.6/patches/040-bcm963xx_flashmap.patch @@ -1,7 +1,7 @@ diff -urN linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c linux-2.6.17-brcm63xx/drivers/mtd/maps/bcm963xx-flash.c --- linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.17-brcm63xx/drivers/mtd/maps/bcm963xx-flash.c 2006-08-03 16:29:52.000000000 +0200 -@@ -0,0 +1,116 @@ ++++ linux-2.6.17-brcm63xx/drivers/mtd/maps/bcm963xx-flash.c 2006-08-30 13:03:16.000000000 +0200 +@@ -0,0 +1,135 @@ +/* + * $Id$ + * Copyright (C) 2006 Florian Fainelli @@ -38,10 +38,12 @@ diff -urN linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c linux-2.6.17-brcm63xx/d +#include <linux/mtd/map.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/partitions.h> ++#include <board.h> + +#define WINDOW_ADDR 0x1e400000 /* Real address of the flash */ +#define WINDOW_SIZE 0x800000 /* Size of flash */ +#define BUSWIDTH 2 /* Buswidth */ ++#define EXTENDED_SIZE 0xBE400000 /* Extended flash addresse */ + +extern int boot_loader_type; /* For RedBoot / CFE detection */ +extern int parse_redboot_partitions(struct mtd_info *master, struct mtd_partition **pparts, unsigned long fis_origin); @@ -64,6 +66,8 @@ diff -urN linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c linux-2.6.17-brcm63xx/d + { name: "jffs2", size: 5 * 0x10000, offset: 57*0x10000} +}; + ++static int bcm963xx_parts_size = sizeof(bcm963xx_parts) / sizeof(bcm963xx_parts[0]); ++ +static int __init bcm963xx_mtd_init(void) +{ + printk("bcm963xx: 0x%08x at 0x%08x\n", WINDOW_SIZE, WINDOW_ADDR); @@ -80,22 +84,37 @@ diff -urN linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c linux-2.6.17-brcm63xx/d + + if (bcm963xx_mtd_info) { + bcm963xx_mtd_info->owner = THIS_MODULE; -+ int parsed_nr_parts = 0; -+ char * part_type; ++ ++ if (boot_loader_type == BOOT_CFE) ++ { ++ add_mtd_device(bcm963xx_mtd_info); ++ add_mtd_partitions(bcm963xx_mtd_info, bcm963xx_parts, bcm963xx_parts_size); ++ return 0; ++ } ++ else ++ { ++ int parsed_nr_parts = 0; ++ char * part_type; ++ ++ if (bcm963xx_mtd_info->size > 0x00400000) { ++ printk("Support for extended flash memory size : 0x%08X ; ONLY 64MBIT SUPPORT\n", bcm963xx_mtd_info->size); ++ bcm963xx_map.virt = (unsigned long)(EXTENDED_SIZE); ++ } + +#ifdef CONFIG_MTD_REDBOOT_PARTS -+ if (parsed_nr_parts == 0) { -+ int ret = parse_redboot_partitions(bcm963xx_mtd_info, &parsed_parts, 0); -+ if (ret > 0) { -+ part_type = "RedBoot"; -+ parsed_nr_parts = ret; ++ if (parsed_nr_parts == 0) { ++ int ret = parse_redboot_partitions(bcm963xx_mtd_info, &parsed_parts, 0); ++ if (ret > 0) { ++ part_type = "RedBoot"; ++ parsed_nr_parts = ret; ++ } + } -+ } +#endif -+ add_mtd_partitions(bcm963xx_mtd_info, parsed_parts, parsed_nr_parts); ++ add_mtd_partitions(bcm963xx_mtd_info, parsed_parts, parsed_nr_parts); + -+ return 0; -+ } ++ return 0; ++ } ++ } + iounmap(bcm963xx_map.virt); + return -ENXIO; +} @@ -117,10 +136,10 @@ diff -urN linux-2.6.17/drivers/mtd/maps/bcm963xx-flash.c linux-2.6.17-brcm63xx/d +module_exit(bcm963xx_mtd_cleanup); + +MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Florian Fainelli"); ++MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); diff -urN linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-brcm63xx/drivers/mtd/maps/Kconfig --- linux-2.6.17/drivers/mtd/maps/Kconfig 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/drivers/mtd/maps/Kconfig 2006-08-03 16:32:05.000000000 +0200 ++++ linux-2.6.17-brcm63xx/drivers/mtd/maps/Kconfig 2006-08-30 13:03:06.000000000 +0200 @@ -224,6 +224,13 @@ Flash memory access on 4G Systems MTX-1 Board. If you have one of these boards and would like to use the flash chips on it, say 'Y'. @@ -137,7 +156,7 @@ diff -urN linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-brcm63xx/drivers/mt depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT diff -urN linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-brcm63xx/drivers/mtd/maps/Makefile --- linux-2.6.17/drivers/mtd/maps/Makefile 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/drivers/mtd/maps/Makefile 2006-08-03 16:32:27.000000000 +0200 ++++ linux-2.6.17-brcm63xx/drivers/mtd/maps/Makefile 2006-08-30 13:03:06.000000000 +0200 @@ -71,3 +71,4 @@ obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o @@ -145,7 +164,7 @@ diff -urN linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-brcm63xx/drivers/m +obj-$(CONFIG_MTD_BCM963XX) += bcm963xx-flash.o diff -urN linux-2.6.17/drivers/mtd/redboot.c linux-2.6.17-brcm63xx/drivers/mtd/redboot.c --- linux-2.6.17/drivers/mtd/redboot.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux-2.6.17-brcm63xx/drivers/mtd/redboot.c 2006-08-03 16:32:39.000000000 +0200 ++++ linux-2.6.17-brcm63xx/drivers/mtd/redboot.c 2006-08-30 13:03:06.000000000 +0200 @@ -39,7 +39,7 @@ return 1; } From c4435096581de4bee1c661a81853d76c9312af52 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 30 Aug 2006 14:04:26 +0000 Subject: [PATCH 551/757] magicbox: add 0x40 to the kernel image size (uImage header) SVN-Revision: 4720 --- openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch b/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch index 80382305130..fcddb348c72 100644 --- a/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch +++ b/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch @@ -20,7 +20,7 @@ diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magicmap.c --- linux.old/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/drivers/mtd/maps/magicmap.c 2006-08-30 06:52:34.000000000 +0200 -@@ -0,0 +1,112 @@ +@@ -0,0 +1,113 @@ +/* + * magicmap.c: Copyleft 2005 Karol Lewandowski + * @@ -94,6 +94,7 @@ diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magic + if (MTD_READ(flash, 12, sizeof(u32), &len, (char *) &size) || + len != 4) + return -ENXIO; ++ size += 0x40; /* header size of the uImage */ + if ((size > 0) && (size < 0x400000)) { + /* skip to next erase block */ + if (size & (flash->erasesize - 1)) { From 3c4b1423e0b255543d66c3a37e09b3f9f1329a13 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 31 Aug 2006 21:18:29 +0000 Subject: [PATCH 552/757] fix ccache error SVN-Revision: 4723 --- openwrt/package/openssl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile index be5b4a6d06b..3f60dcfbfee 100644 --- a/openwrt/package/openssl/Makefile +++ b/openwrt/package/openssl/Makefile @@ -67,7 +67,7 @@ define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ - MAKEDEPPROG="$(TARGET_CC)" \ + MAKEDEPPROG="$(TARGET_CROSS)gcc" \ depend $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ CC="$(TARGET_CC)" \ From c48273a2d3d0019281e578afb0eb3c5fbae1d20a Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sat, 2 Sep 2006 08:38:39 +0000 Subject: [PATCH 553/757] Really disable doc generation, increases install time SVN-Revision: 4725 --- .../openssl/patches/160-disable_doc_tests.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openwrt/package/openssl/patches/160-disable_doc_tests.patch b/openwrt/package/openssl/patches/160-disable_doc_tests.patch index de8d8527bd3..27e20334755 100644 --- a/openwrt/package/openssl/patches/160-disable_doc_tests.patch +++ b/openwrt/package/openssl/patches/160-disable_doc_tests.patch @@ -46,3 +46,15 @@ diff -urN openssl-0.9.8a/Makefile openssl-0.9.8a.new/Makefile install_sw: @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ +diff -urN openssl-0.9.8b/Makefile.org openssl-0.9.8b.new/Makefile.org +--- openssl-0.9.8b/Makefile.org 2006-09-01 19:34:51.000000000 +0200 ++++ openssl-0.9.8b.new/Makefile.org 2006-09-01 19:36:38.000000000 +0200 +@@ -473,7 +473,7 @@ + dist_pem_h: + (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + +-install: all install_docs install_sw ++install: all install_sw + + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ From db4043268afc2e1c0bcaf72c8e60e54b5eb385b3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 2 Sep 2006 19:23:10 +0000 Subject: [PATCH 554/757] add calibrate_delay patch to buildroot-ng SVN-Revision: 4728 --- .../generic-2.4/patches/009-calibrate_section.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 openwrt/target/linux/generic-2.4/patches/009-calibrate_section.patch diff --git a/openwrt/target/linux/generic-2.4/patches/009-calibrate_section.patch b/openwrt/target/linux/generic-2.4/patches/009-calibrate_section.patch new file mode 100644 index 00000000000..aedf6fd5b73 --- /dev/null +++ b/openwrt/target/linux/generic-2.4/patches/009-calibrate_section.patch @@ -0,0 +1,11 @@ +--- linux.old/init/main.c 2006-09-02 20:59:53.000000000 +0200 ++++ linux.dev/init/main.c 2006-09-02 21:00:01.000000000 +0200 +@@ -167,7 +167,7 @@ + better than 1% */ + #define LPS_PREC 8 + +-void __init calibrate_delay(void) ++void calibrate_delay(void) + { + unsigned long ticks, loopbit; + int lps_precision = LPS_PREC; From c92e6f514c2f84cff36e6d6988a008f5564d1079 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sat, 2 Sep 2006 19:24:06 +0000 Subject: [PATCH 555/757] gcc 3.4.6 should be safe on brcm-2.4 now SVN-Revision: 4729 --- openwrt/toolchain/gcc/Config.in | 1 - openwrt/toolchain/gcc/Config.version | 2 -- 2 files changed, 3 deletions(-) diff --git a/openwrt/toolchain/gcc/Config.in b/openwrt/toolchain/gcc/Config.in index dd3184e86dc..f5f27c69079 100644 --- a/openwrt/toolchain/gcc/Config.in +++ b/openwrt/toolchain/gcc/Config.in @@ -3,7 +3,6 @@ choice prompt "GCC compiler Version" if TOOLCHAINOPTS default GCC_VERSION_4_1_1 if LINUX_2_6_ARUBA - default GCC_VERSION_3_4_4 if LINUX_2_4_BRCM default GCC_VERSION_3_4_6 help Select the version of gcc you wish to use. diff --git a/openwrt/toolchain/gcc/Config.version b/openwrt/toolchain/gcc/Config.version index 41aa2fb050b..65f29b9bdab 100644 --- a/openwrt/toolchain/gcc/Config.version +++ b/openwrt/toolchain/gcc/Config.version @@ -11,8 +11,6 @@ config GCC_VERSION default "3.4.6" if !TOOLCHAINOPTS - config GCC_VERSION_3_4_4 - default y if LINUX_2_4_BRCM config GCC_VERSION_4_1_1 default y if LINUX_2_6_ARUBA config GCC_VERSION_4_0_3 From fae4fc3d4086469cadf432244e957703c1efbbd5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 3 Sep 2006 04:54:21 +0000 Subject: [PATCH 556/757] port wlcompat changes to -ng SVN-Revision: 4735 --- openwrt/package/wlcompat/src/wlcompat.c | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/openwrt/package/wlcompat/src/wlcompat.c b/openwrt/package/wlcompat/src/wlcompat.c index 1540a211676..23b0d50a817 100644 --- a/openwrt/package/wlcompat/src/wlcompat.c +++ b/openwrt/package/wlcompat/src/wlcompat.c @@ -24,10 +24,12 @@ #include <linux/config.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/init.h> #include <linux/if_arp.h> #include <asm/uaccess.h> #include <linux/wireless.h> +#include <linux/timer.h> #include <net/iw_handler.h> #include <wlioctl.h> @@ -35,6 +37,7 @@ static struct net_device *dev; static unsigned short bss_force; static struct iw_statistics wstats; +static int random = 1; char buf[WLC_IOCTL_MAXLEN]; /* The frequency of each channel in MHz */ @@ -44,6 +47,8 @@ const long channel_frequency[] = { }; #define NUM_CHANNELS ( sizeof(channel_frequency) / sizeof(channel_frequency[0]) ) +#define RNG_POLL_FREQ 20 + typedef struct internal_wsec_key { uint8 index; // 0x00 uint8 unknown_1; // 0x01 @@ -977,6 +982,25 @@ static int new_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { return ret; } +static struct timer_list rng_timer; + +static void rng_timer_tick(unsigned long n) +{ + struct net_device *dev = (struct net_device *) n; + u16 data[4]; + int i, ret; + + ret = 0; + for (i = 0; i < 3; i++) { + ret |= wl_get_val(dev, "rand", &data[i], sizeof(u16)); + } + if (!ret) + batch_entropy_store(*((u32 *) &data[0]), *((u32 *) &data[2]), (jiffies % 255)); + + mod_timer(&rng_timer, jiffies + (HZ/RNG_POLL_FREQ)); +} + + static int __init wlcompat_init() { int found = 0, i; @@ -999,6 +1023,14 @@ static int __init wlcompat_init() dev->do_ioctl = new_ioctl; dev->wireless_handlers = (struct iw_handler_def *)&wlcompat_handler_def; dev->get_wireless_stats = wlcompat_get_wireless_stats; + + if (random) { + init_timer(&rng_timer); + rng_timer.function = rng_timer_tick; + rng_timer.data = (unsigned long) dev; + rng_timer_tick((unsigned long) dev); + } + #ifdef DEBUG printk("broadcom driver private data: 0x%08x\n", dev->priv); #endif @@ -1007,6 +1039,8 @@ static int __init wlcompat_init() static void __exit wlcompat_exit() { + if (random) + del_timer(&rng_timer); dev->get_wireless_stats = NULL; dev->wireless_handlers = NULL; dev->do_ioctl = old_ioctl; @@ -1017,5 +1051,6 @@ EXPORT_NO_SYMBOLS; MODULE_AUTHOR("openwrt.org"); MODULE_LICENSE("GPL"); +module_param(random, int, 0); module_init(wlcompat_init); module_exit(wlcompat_exit); From 4027ebea1951b35cfa8159009a352700f35c5090 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 3 Sep 2006 04:57:01 +0000 Subject: [PATCH 557/757] bump wlcompat version number SVN-Revision: 4736 --- openwrt/package/wlcompat/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/wlcompat/Makefile b/openwrt/package/wlcompat/Makefile index d3ccf881018..894938e96e7 100644 --- a/openwrt/package/wlcompat/Makefile +++ b/openwrt/package/wlcompat/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-wlcompat -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) From 73242900e30b24da56f5ebba5e1ab25dd6cfe8ae Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 3 Sep 2006 05:35:43 +0000 Subject: [PATCH 558/757] fix ipcalc (off by 1) SVN-Revision: 4737 --- openwrt/package/base-files/default/bin/ipcalc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openwrt/package/base-files/default/bin/ipcalc b/openwrt/package/base-files/default/bin/ipcalc index 23af6a0c3b3..e8efa6b96cf 100755 --- a/openwrt/package/base-files/default/bin/ipcalc +++ b/openwrt/package/base-files/default/bin/ipcalc @@ -1,5 +1,4 @@ #!/bin/sh -# Copyright (C) 2006 OpenWrt.org awk -f /usr/lib/common.awk -f - $* <<EOF BEGIN { @@ -27,7 +26,7 @@ BEGIN { if (ARGC > 3) { print "START="int2ip(start) - print "END="int2ip(end) + print "END="int2ip(end-1) } } EOF From 760f4a969062490a14ba7e6ceb1141c171fae623 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sun, 3 Sep 2006 17:42:42 +0000 Subject: [PATCH 559/757] Add keynote, dependency to isakmpd SVN-Revision: 4740 --- openwrt/package/keynote/Makefile | 59 ++ .../package/keynote/patches/01-build.patch | 327 ++++++++++ .../keynote/patches/02-cross_compile.patch | 586 ++++++++++++++++++ 3 files changed, 972 insertions(+) create mode 100644 openwrt/package/keynote/Makefile create mode 100644 openwrt/package/keynote/patches/01-build.patch create mode 100644 openwrt/package/keynote/patches/02-cross_compile.patch diff --git a/openwrt/package/keynote/Makefile b/openwrt/package/keynote/Makefile new file mode 100644 index 00000000000..4df4e14ade4 --- /dev/null +++ b/openwrt/package/keynote/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 4619 2006-08-22 09:50:02Z florian $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=keynote +PKG_VERSION:=2.3 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/keynote +PKG_MD5SUM:=b569066ac2ba1356c2112b118a7d74d0 +PKG_CAT:=bzcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/keynote +SECTION:=base +CATEGORY:=Network +DEPENDS:=@LINUX_2_6 +TITLE:=IPsec management tools +DESCRIPTION:=IPsec management tools +URL:=http://keynote.sourceforge.net/ +endef + +define Build/Configure +$(call Build/Configure/Default,--enable-static --enable-shared,LDFLAGS="-L$(STAGING_DIR)/usr/lib") +endef + +define Build/Compile + $(call Build/Compile/Default,$(TARGET_CONFIGURE_OPTS) \ + CFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + all) +endef + +define Package/keynote/install + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/keynote $(1)/usr/sbin/ +endef + +define Build/InstallDev + $(CP) $(PKG_BUILD_DIR)/*.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/libkeynote.a $(STAGING_DIR)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/{assertion,getopt,header,keynote,signature}.h +endef + +$(eval $(call BuildPackage,keynote)) diff --git a/openwrt/package/keynote/patches/01-build.patch b/openwrt/package/keynote/patches/01-build.patch new file mode 100644 index 00000000000..05351f714c9 --- /dev/null +++ b/openwrt/package/keynote/patches/01-build.patch @@ -0,0 +1,327 @@ +diff -ru keynote-2.3/configure.in keynote-2.3.new/configure.in +--- keynote-2.3/configure.in 2000-09-27 01:16:28.000000000 +0200 ++++ keynote-2.3.new/configure.in 2004-01-16 11:34:03.991537404 +0100 +@@ -21,19 +21,13 @@ + AC_PATH_PROG(ECHO, echo, /bin/echo) + AC_PATH_PROG(SED, sed, /usr/bin/sed) + +-dnl Checks for libraries. +-LIBS="-L/usr/lib -L/usr/local/lib -L/usr/ssl/lib -L/usr/openssl/lib\ +- -L/usr/local/ssl/lib -L/usr/local/openssl/lib -L/usr/pkg/lib -L/pkg/lib" +- + AC_CHECK_LIB(m, floor, LIBS="$LIBS -lm") + AC_CHECK_LIB(rsaref, RSAPrivateDecrypt, LIBS="$LIBS -lrsaref") + AC_CHECK_LIB(crypto, i2a_ASN1_STRING, LIBS="$LIBS -lcrypto") + AC_CHECK_LIB(RSAglue, RSA_ref_private_encrypt, LIBS="$LIBS -lRSAglue") + + dnl Checks for header files. +-CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\ +- -I/usr/local/ssl/include -I/usr/openssl/include -I/usr/pkg/include\ +- -I/usr/local/openssl/include -I/pkg/include" ++CPPFLAGS="-I/usr/include/openssl" + + AC_HEADER_STDC + AC_HEADER_TIME +diff -ru keynote-2.3/keynote-keygen.c keynote-2.3.new/keynote-keygen.c +--- keynote-2.3/keynote-keygen.c 2000-09-27 02:09:13.000000000 +0200 ++++ keynote-2.3.new/keynote-keygen.c 2004-01-16 11:32:06.652242269 +0100 +@@ -161,7 +161,7 @@ + if (strlen(algname) + 2 > prlen) + { + fprintf(stderr, "Parameter ``print-length'' should be larger " +- "than the length of AlgorithmName (%d)\n", strlen(algname)); ++ "than the length of AlgorithmName (%lu)\n", strlen(algname)); + exit(-1); + } + +diff -ru keynote-2.3/keynote.l keynote-2.3.new/keynote.l +--- keynote-2.3/keynote.l 2000-08-11 22:49:13.000000000 +0200 ++++ keynote-2.3.new/keynote.l 2004-01-16 11:17:29.910430978 +0100 +@@ -61,7 +61,8 @@ struct lex_list + static struct lex_list *keynote_lex_list = (struct lex_list *) NULL; + static int keynote_max_lex_list = 32; + static int keynote_lex_counter = 0; +-static int first_tok = 0; ++extern int first_tok; ++int first_tok = 0; + %} + digit [0-9] + specnumber [1-9][0-9]* +@@ -766,7 +767,7 @@ + if (0) + { + yyunput(0, NULL); +- yy_flex_realloc(0, NULL); ++ yy_flex_realloc(NULL, 0); + } + + return en; +diff -ru keynote-2.3/keynote-ver.l keynote-2.3.new/keynote-ver.l +--- keynote-2.3/keynote-ver.l 2000-08-11 22:49:13.000000000 +0200 ++++ keynote-2.3.new/keynote-ver.l 2004-01-16 11:31:14.667107044 +0100 +@@ -267,7 +267,7 @@ + if (0) + { + yyunput(0, NULL); +- yy_flex_realloc(0, NULL); ++ yy_flex_realloc(NULL, 0); + } + } + +diff -ru keynote-2.3/keynote-ver.y keynote-2.3.new/keynote-ver.y +--- keynote-2.3/keynote-ver.y 1999-10-12 00:34:29.000000000 +0200 ++++ keynote-2.3.new/keynote-ver.y 2004-01-16 11:07:19.709634736 +0100 +@@ -49,7 +49,7 @@ + return keynote_errno; + free($1); + } +- ++ ; + expr: VSTRING EQ STRING { int i = kn_add_action(sessid, $1, $3, 0); + + if (i != 0) +@@ -64,6 +64,7 @@ + free($1); + free($3); + } expr ++ ; + %% + void + kverror(char *s) +diff -ru keynote-2.3/keynote.y keynote-2.3.new/keynote.y +--- keynote-2.3/keynote.y 2000-06-14 08:28:23.000000000 +0200 ++++ keynote-2.3.new/keynote.y 2004-01-16 11:14:55.365898229 +0100 +@@ -73,8 +73,7 @@ + %} + %% + +-grammarswitch: LOCINI { keynote_exceptionflag = keynote_donteval = 0; } +- localinit ++grammarswitch: LOCINI { keynote_exceptionflag = keynote_donteval = 0; } localinit + | ACTSTR { keynote_exceptionflag = keynote_donteval = 0; } program + | KEYPRE { keynote_exceptionflag = keynote_donteval = 0; } + keypredicate +@@ -91,17 +90,17 @@ + STRING { keynote_lex_remove($3); + keynote_privkey = $3; + } +- ++ ; + keypredicate: /* Nothing */ { keynote_returnvalue = 0; + return 0; + } + | notemptykeypredicate { keynote_returnvalue = $1; + return 0; + } +- ++ ; + notemptykeypredicate: key { $$ = $1; } + | keyexp { $$ = $1; } +- ++ ; + keyexp: notemptykeypredicate AND { if (($1 == 0) && !keynote_justrecord) + keynote_donteval = 1; + } notemptykeypredicate +@@ -138,7 +137,7 @@ + else + $$ = 0; + } /* K-th */ +- ++ ; + keylist: key + { /* Don't do anything if we're just recording */ + if (!keynote_justrecord && !keynote_donteval) +@@ -155,7 +154,7 @@ + + keylistcount++; + } +- ++ ; + key: str { + if (keynote_donteval) + $$ = 0; +@@ -193,10 +192,10 @@ + } + } + } +- ++ ; + localinit: /* Nothing */ + | localconstants +- ++ ; + localconstants: VARIABLE EQQ STRING + { + int i; +@@ -265,12 +264,12 @@ + if (i != RESULT_TRUE) + return -1; + } localconstants +- ++ ; + program: prog { + keynote_returnvalue = $1; + return 0; + } +- ++ ; + prog: /* Nada */ { $$ = 0; } + | notemptyprog { + /* +@@ -285,7 +284,7 @@ + else + $$ = $4; + } +- ++ ; + notemptyprog: expr HINT afterhint + { + if (checkexception($1)) +@@ -300,7 +299,7 @@ + else + $$ = 0; + } +- ++ ; + afterhint: str { if (keynote_exceptionflag || keynote_donteval) + $$ = 0; + else +@@ -315,7 +314,7 @@ + } + } + | OPENBLOCK prog CLOSEBLOCK { $$ = $2; } +- ++ ; + + expr: OPENPAREN expr CLOSEPAREN { $$ = $2; } + | expr AND { if ($1 == 0) +@@ -334,19 +333,19 @@ + | stringexp { $$ = $1; } + | TRUE { $$ = 1; } + | FALSE { $$ = 0; } +- ++ ; + numexp: numex LT numex { $$ = $1 < $3; } + | numex GT numex { $$ = $1 > $3; } + | numex EQ numex { $$ = $1 == $3; } + | numex LE numex { $$ = $1 <= $3; } + | numex GE numex { $$ = $1 >= $3; } + | numex NE numex { $$ = $1 != $3; } +- ++ ; + floatexp: floatex LT floatex { $$ = $1 < $3; } + | floatex GT floatex { $$ = $1 > $3; } + | floatex LE floatex { $$ = $1 <= $3; } + | floatex GE floatex { $$ = $1 >= $3; } +- ++ ; + numex: numex PLUS numex { $$ = $1 + $3; } + | numex MINUS numex { $$ = $1 - $3; } + | numex MULT numex { $$ = $1 * $3; } +@@ -384,7 +383,7 @@ + free($2); + } + } +- ++ ; + floatex: floatex PLUS floatex { $$ = ($1 + $3); } + | floatex MINUS floatex { $$ = ($1 - $3); } + | floatex MULT floatex { $$ = ($1 * $3); } +@@ -418,7 +417,7 @@ + free($2); + } + } +- ++ ; + stringexp: str EQ str { + if (keynote_exceptionflag || keynote_donteval) + $$ = 0; +@@ -529,9 +528,9 @@ + if (i == 0) + { + #if !defined(HAVE_SNPRINTF) +- sprintf(grp, "%d", preg.re_nsub); ++ sprintf(grp, "%d", (int)preg.re_nsub); + #else /* !HAVE_SNPRINTF */ +- snprintf(grp, 3, "%d", preg.re_nsub); ++ snprintf(grp, 3, "%d", (int)preg.re_nsub); + #endif /* !HAVE_SNPRINTF */ + if (keynote_env_add("_0", grp, &keynote_temp_list, + 1, 0) != RESULT_TRUE) +@@ -579,7 +578,7 @@ + } + } + } +- ++ ; + str: str DOTT str { if (keynote_exceptionflag || keynote_donteval) + $$ = (char *) NULL; + else +@@ -605,7 +604,7 @@ + } + } + | strnotconcat { $$ = $1; } +- ++ ; + strnotconcat: STRING { $$ = $1; } + | OPENPAREN str CLOSEPAREN { $$ = $2; } + | VARIABLE { if (keynote_exceptionflag || keynote_donteval) +@@ -660,6 +659,7 @@ + return -1; + } + } ++ ; + %% + + /* +diff -ru keynote-2.3/Makefile.in keynote-2.3.new/Makefile.in +--- keynote-2.3/Makefile.in 2000-09-27 01:16:27.000000000 +0200 ++++ keynote-2.3.new/Makefile.in 2004-01-16 11:35:38.841528129 +0100 +@@ -41,7 +41,7 @@ + YACCFLAGS = -d -p kn -b k + LEXFLAGS2 = -Pkv -s -i + LEXFLAGS = -Cr -Pkn -s -i +-CFLAGS = -O2 -Wall # -g ++CFLAGS = -O2 -Wall -fno-strict-aliasing # -g + RMFLAGS2 = -rf + RMFLAGS = -f + NROFFFLAGS = -mandoc +diff -ru keynote-2.3/signature.c keynote-2.3.new/signature.c +--- keynote-2.3/signature.c 1999-10-12 00:34:31.000000000 +0200 ++++ keynote-2.3.new/signature.c 2004-01-16 11:30:48.062084986 +0100 +@@ -515,7 +515,7 @@ + kk = dc->dec_key; + if (keytype == KEYNOTE_PRIVATE_KEY) + { +- if (d2i_DSAPrivateKey((DSA **) &kk, &decoded, len) == (DSA *) NULL) ++ if (d2i_DSAPrivateKey((DSA **) &kk, (const unsigned char **) &decoded, len) == (DSA *) NULL) + { + if (ptr != (unsigned char *) NULL) + free(ptr); +@@ -526,7 +526,7 @@ + } + else + { +- if (d2i_DSAPublicKey((DSA **) &kk, &decoded, len) == (DSA *) NULL) ++ if (d2i_DSAPublicKey((DSA **) &kk, (const unsigned char **) &decoded, len) == (DSA *) NULL) + { + if (ptr != (unsigned char *) NULL) + free(ptr); +@@ -556,7 +556,7 @@ + kk = dc->dec_key; + if (keytype == KEYNOTE_PRIVATE_KEY) + { +- if (d2i_RSAPrivateKey((RSA **) &kk, &decoded, len) == (RSA *) NULL) ++ if (d2i_RSAPrivateKey((RSA **) &kk, (const unsigned char **) &decoded, len) == (RSA *) NULL) + { + if (ptr != (unsigned char *) NULL) + free(ptr); +@@ -567,7 +567,7 @@ + } + else + { +- if (d2i_RSAPublicKey((RSA **) &kk, &decoded, len) == (RSA *) NULL) ++ if (d2i_RSAPublicKey((RSA **) &kk, (const unsigned char **) &decoded, len) == (RSA *) NULL) + { + if (ptr != (unsigned char *) NULL) + free(ptr); diff --git a/openwrt/package/keynote/patches/02-cross_compile.patch b/openwrt/package/keynote/patches/02-cross_compile.patch new file mode 100644 index 00000000000..c6d5365507c --- /dev/null +++ b/openwrt/package/keynote/patches/02-cross_compile.patch @@ -0,0 +1,586 @@ +diff -urN keynote-2.3/configure keynote-2.3.new/configure +--- keynote-2.3/configure 2000-09-27 01:16:28.000000000 +0200 ++++ keynote-2.3.new/configure 2006-09-01 19:16:35.000000000 +0200 +@@ -889,52 +889,10 @@ + done + test -n "$YACC" || YACC="yacc" + +-for ac_prog in openssl ssleay +-do +-# Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:898: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_SSLEAY'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 +-else +- case "$SSLEAY" in +- /*) +- ac_cv_path_SSLEAY="$SSLEAY" # Let the user override the test with a path. +- ;; +- ?:/*) +- ac_cv_path_SSLEAY="$SSLEAY" # Let the user override the test with a dos path. +- ;; +- *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="\ +- $PATH:/usr/local/bin:/usr/local/ssl/sbin:/usr/local/ssl/bin:/usr/ssl/bin:/usr/ssl/sbin:/usr/sbin:/usr/openssl/bin:/usr/openssl/bin:/usr/local/openssl/bin:/usr/local/openssl/sbin" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_SSLEAY="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" +- ;; +-esac +-fi +-SSLEAY="$ac_cv_path_SSLEAY" +-if test -n "$SSLEAY"; then +- echo "$ac_t""$SSLEAY" 1>&6 +-else +- echo "$ac_t""no" 1>&6 +-fi +- +-test -n "$SSLEAY" && break +-done +-test -n "$SSLEAY" || SSLEAY="/usr/local/bin/ssleay" +- + # Extract the first word of "rm", so it can be a program name with args. + set dummy rm; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:938: checking for $ac_word" >&5 ++echo "configure:896: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -970,7 +928,7 @@ + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:974: checking for $ac_word" >&5 ++echo "configure:932: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1006,7 +964,7 @@ + # Extract the first word of "nroff", so it can be a program name with args. + set dummy nroff; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1010: checking for $ac_word" >&5 ++echo "configure:968: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NROFF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1042,7 +1000,7 @@ + # Extract the first word of "tar", so it can be a program name with args. + set dummy tar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1046: checking for $ac_word" >&5 ++echo "configure:1004: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1078,7 +1036,7 @@ + # Extract the first word of "true", so it can be a program name with args. + set dummy true; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1082: checking for $ac_word" >&5 ++echo "configure:1040: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_TRUE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1114,7 +1072,7 @@ + # Extract the first word of "mkdir", so it can be a program name with args. + set dummy mkdir; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1118: checking for $ac_word" >&5 ++echo "configure:1076: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1150,7 +1108,7 @@ + # Extract the first word of "tr", so it can be a program name with args. + set dummy tr; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1154: checking for $ac_word" >&5 ++echo "configure:1112: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_TR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1186,7 +1144,7 @@ + # Extract the first word of "echo", so it can be a program name with args. + set dummy echo; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1190: checking for $ac_word" >&5 ++echo "configure:1148: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ECHO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1222,7 +1180,7 @@ + # Extract the first word of "sed", so it can be a program name with args. + set dummy sed; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1226: checking for $ac_word" >&5 ++echo "configure:1184: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1256,11 +1214,8 @@ + fi + + +-LIBS="-L/usr/lib -L/usr/local/lib -L/usr/ssl/lib -L/usr/openssl/lib\ +- -L/usr/local/ssl/lib -L/usr/local/openssl/lib -L/usr/pkg/lib -L/pkg/lib" +- + echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6 +-echo "configure:1264: checking for floor in -lm" >&5 ++echo "configure:1219: checking for floor in -lm" >&5 + ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1268,7 +1223,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lm $LIBS" + cat > conftest.$ac_ext <<EOF +-#line 1272 "configure" ++#line 1227 "configure" + #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 +@@ -1279,7 +1234,7 @@ + floor() + ; return 0; } + EOF +-if { (eval echo configure:1283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1300,7 +1255,7 @@ + fi + + echo $ac_n "checking for RSAPrivateDecrypt in -lrsaref""... $ac_c" 1>&6 +-echo "configure:1304: checking for RSAPrivateDecrypt in -lrsaref" >&5 ++echo "configure:1259: checking for RSAPrivateDecrypt in -lrsaref" >&5 + ac_lib_var=`echo rsaref'_'RSAPrivateDecrypt | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1308,7 +1263,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lrsaref $LIBS" + cat > conftest.$ac_ext <<EOF +-#line 1312 "configure" ++#line 1267 "configure" + #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 +@@ -1319,7 +1274,7 @@ + RSAPrivateDecrypt() + ; return 0; } + EOF +-if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1340,7 +1295,7 @@ + fi + + echo $ac_n "checking for i2a_ASN1_STRING in -lcrypto""... $ac_c" 1>&6 +-echo "configure:1344: checking for i2a_ASN1_STRING in -lcrypto" >&5 ++echo "configure:1299: checking for i2a_ASN1_STRING in -lcrypto" >&5 + ac_lib_var=`echo crypto'_'i2a_ASN1_STRING | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1348,7 +1303,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcrypto $LIBS" + cat > conftest.$ac_ext <<EOF +-#line 1352 "configure" ++#line 1307 "configure" + #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 +@@ -1359,7 +1314,7 @@ + i2a_ASN1_STRING() + ; return 0; } + EOF +-if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1380,7 +1335,7 @@ + fi + + echo $ac_n "checking for RSA_ref_private_encrypt in -lRSAglue""... $ac_c" 1>&6 +-echo "configure:1384: checking for RSA_ref_private_encrypt in -lRSAglue" >&5 ++echo "configure:1339: checking for RSA_ref_private_encrypt in -lRSAglue" >&5 + ac_lib_var=`echo RSAglue'_'RSA_ref_private_encrypt | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1388,7 +1343,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lRSAglue $LIBS" + cat > conftest.$ac_ext <<EOF +-#line 1392 "configure" ++#line 1347 "configure" + #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 +@@ -1399,7 +1354,7 @@ + RSA_ref_private_encrypt() + ; return 0; } + EOF +-if { (eval echo configure:1403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1420,12 +1375,9 @@ + fi + + +-CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\ +- -I/usr/local/ssl/include -I/usr/openssl/include -I/usr/pkg/include\ +- -I/usr/local/openssl/include -I/pkg/include" + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1429: checking how to run the C preprocessor" >&5 ++echo "configure:1381: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1440,13 +1392,13 @@ + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +-#line 1444 "configure" ++#line 1396 "configure" + #include "confdefs.h" + #include <assert.h> + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1457,13 +1409,13 @@ + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +-#line 1461 "configure" ++#line 1413 "configure" + #include "confdefs.h" + #include <assert.h> + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1474,13 +1426,13 @@ + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +-#line 1478 "configure" ++#line 1430 "configure" + #include "confdefs.h" + #include <assert.h> + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -1505,12 +1457,12 @@ + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:1509: checking for ANSI C header files" >&5 ++echo "configure:1461: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1514 "configure" ++#line 1466 "configure" + #include "confdefs.h" + #include <stdlib.h> + #include <stdarg.h> +@@ -1518,7 +1470,7 @@ + #include <float.h> + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1535,7 +1487,7 @@ + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext <<EOF +-#line 1539 "configure" ++#line 1491 "configure" + #include "confdefs.h" + #include <string.h> + EOF +@@ -1553,7 +1505,7 @@ + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext <<EOF +-#line 1557 "configure" ++#line 1509 "configure" + #include "confdefs.h" + #include <stdlib.h> + EOF +@@ -1574,7 +1526,7 @@ + : + else + cat > conftest.$ac_ext <<EOF +-#line 1578 "configure" ++#line 1530 "configure" + #include "confdefs.h" + #include <ctype.h> + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -1585,7 +1537,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -1609,12 +1561,12 @@ + fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +-echo "configure:1613: checking whether time.h and sys/time.h may both be included" >&5 ++echo "configure:1565: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1618 "configure" ++#line 1570 "configure" + #include "confdefs.h" + #include <sys/types.h> + #include <sys/time.h> +@@ -1623,7 +1575,7 @@ + struct tm *tp; + ; return 0; } + EOF +-if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +@@ -1647,17 +1599,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1651: checking for $ac_hdr" >&5 ++echo "configure:1603: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1656 "configure" ++#line 1608 "configure" + #include "confdefs.h" + #include <$ac_hdr> + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1687,17 +1639,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1691: checking for $ac_hdr" >&5 ++echo "configure:1643: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1696 "configure" ++#line 1648 "configure" + #include "confdefs.h" + #include <$ac_hdr> + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1726,12 +1678,12 @@ + + + echo $ac_n "checking for working const""... $ac_c" 1>&6 +-echo "configure:1730: checking for working const" >&5 ++echo "configure:1682: checking for working const" >&5 + if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1735 "configure" ++#line 1687 "configure" + #include "confdefs.h" + + int main() { +@@ -1780,7 +1732,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:1784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes + else +@@ -1801,12 +1753,12 @@ + fi + + echo $ac_n "checking for u_int""... $ac_c" 1>&6 +-echo "configure:1805: checking for u_int" >&5 ++echo "configure:1757: checking for u_int" >&5 + if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1810 "configure" ++#line 1762 "configure" + #include "confdefs.h" + #include <sys/types.h> + #if STDC_HEADERS +@@ -1834,12 +1786,12 @@ + fi + + echo $ac_n "checking for u_char""... $ac_c" 1>&6 +-echo "configure:1838: checking for u_char" >&5 ++echo "configure:1790: checking for u_char" >&5 + if eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1843 "configure" ++#line 1795 "configure" + #include "confdefs.h" + #include <sys/types.h> + #if STDC_HEADERS +@@ -1870,12 +1822,12 @@ + for ac_func in regcomp open close read _open _close _read strchr memcpy + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:1874: checking for $ac_func" >&5 ++echo "configure:1826: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1879 "configure" ++#line 1831 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +@@ -1898,7 +1850,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -1925,12 +1877,12 @@ + for ac_func in strcasecmp strncasecmp stricmp strnicmp snprintf __b64_ntop + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:1929: checking for $ac_func" >&5 ++echo "configure:1881: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1934 "configure" ++#line 1886 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +@@ -1953,7 +1905,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -1980,12 +1932,12 @@ + for ac_func in getopt + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:1984: checking for $ac_func" >&5 ++echo "configure:1936: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1989 "configure" ++#line 1941 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +@@ -2008,7 +1960,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -2172,7 +2124,6 @@ + s%@CC@%$CC%g + s%@RANLIB@%$RANLIB%g + s%@YACC@%$YACC%g +-s%@SSLEAY@%$SSLEAY%g + s%@RM@%$RM%g + s%@AR@%$AR%g + s%@NROFF@%$NROFF%g +diff -urN keynote-2.3/configure.in keynote-2.3.new/configure.in +--- keynote-2.3/configure.in 2006-09-01 19:08:13.000000000 +0200 ++++ keynote-2.3.new/configure.in 2006-09-01 19:16:05.000000000 +0200 +@@ -9,8 +9,8 @@ + AC_PROG_CC + AC_PROG_RANLIB + AC_PROG_YACC +-AC_PATH_PROGS(SSLEAY, openssl ssleay, /usr/local/bin/ssleay, \ +- $PATH:/usr/local/bin:/usr/local/ssl/sbin:/usr/local/ssl/bin:/usr/ssl/bin:/usr/ssl/sbin:/usr/sbin:/usr/openssl/bin:/usr/openssl/bin:/usr/local/openssl/bin:/usr/local/openssl/sbin) ++dnl AC_PATH_PROGS(SSLEAY, openssl ssleay, /usr/local/bin/ssleay, \ ++dnl $PATH:/usr/local/bin:/usr/local/ssl/sbin:/usr/local/ssl/bin:/usr/ssl/bin:/usr/ssl/sbin:/usr/sbin:/usr/openssl/bin:/usr/openssl/bin:/usr/local/openssl/bin:/usr/local/openssl/sbin) + AC_PATH_PROG(RM, rm, /bin/rm) + AC_PATH_PROG(AR, ar, /usr/bin/ar) + AC_PATH_PROG(NROFF, nroff, /usr/bin/nroff) +@@ -27,7 +27,7 @@ + AC_CHECK_LIB(RSAglue, RSA_ref_private_encrypt, LIBS="$LIBS -lRSAglue") + + dnl Checks for header files. +-CPPFLAGS="-I/usr/include/openssl" ++dnl CPPFLAGS="-I/usr/include/openssl" + + AC_HEADER_STDC + AC_HEADER_TIME From 25df40c90a691979f5ffa685360e73ffdf58fa0a Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sun, 3 Sep 2006 17:43:25 +0000 Subject: [PATCH 560/757] Add isakmpd, OpenBSD's IKE daemon SVN-Revision: 4741 --- openwrt/package/isakmpd/Makefile | 50 ++++++ .../isakmpd/patches/01-standardize.patch | 132 +++++++++++++++ .../isakmpd/patches/02-openssl_hashes.patch | 154 ++++++++++++++++++ 3 files changed, 336 insertions(+) create mode 100644 openwrt/package/isakmpd/Makefile create mode 100644 openwrt/package/isakmpd/patches/01-standardize.patch create mode 100644 openwrt/package/isakmpd/patches/02-openssl_hashes.patch diff --git a/openwrt/package/isakmpd/Makefile b/openwrt/package/isakmpd/Makefile new file mode 100644 index 00000000000..d0ae6f6c977 --- /dev/null +++ b/openwrt/package/isakmpd/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 4619 2006-08-22 09:50:02Z florian $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=isakmpd +PKG_VERSION:=20040115cvs +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/isakmpd +PKG_MD5SUM:=9f59b10d57cfed5e95743255f1c1620d +PKG_CAT:=bzcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/isakmpd +SECTION:=base +CATEGORY:=Network +DEPENDS:=@LINUX_2_6 +libopenssl +keynote +libgmp +TITLE:=IPsec management tools +DESCRIPTION:=IPsec management tools +URL:=http://isakmpd.sourceforge.net/ +endef + +define Build/Compile + $(call Build/Compile/Default,LINUX_DIR="$(LINUX_DIR)" \ + STAGING_DIR="$(STAGING_DIR)" \ + DESTDIR="$(PKG_INSTALL_DIR)") + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + INSTALL="install -c" \ + install-bin +endef + +define Package/isakmpd/install + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,isakmpd)) diff --git a/openwrt/package/isakmpd/patches/01-standardize.patch b/openwrt/package/isakmpd/patches/01-standardize.patch new file mode 100644 index 00000000000..74ffac2d50c --- /dev/null +++ b/openwrt/package/isakmpd/patches/01-standardize.patch @@ -0,0 +1,132 @@ +diff -urN isakmpd/GNUmakefile isakmpd.new/GNUmakefile +--- isakmpd/GNUmakefile 2004-01-16 13:36:32.000000000 +0100 ++++ isakmpd.new/GNUmakefile 2006-09-03 17:33:03.000000000 +0200 +@@ -40,12 +40,12 @@ + # integrated, freebsd/netbsd means FreeBSD/NetBSD with KAME IPsec. + # darwin means MacOS X 10.2 and later with KAME IPsec. linux means Linux-2.5 + # and later with native IPSec support. +-OS= openbsd ++#OS= openbsd + #OS= netbsd + #OS= freebsd + #OS= freeswan + #OS= darwin +-#OS= linux ++OS= linux + + .CURDIR:= $(shell pwd) + VPATH= ${.CURDIR}/sysdep/${OS} +@@ -53,11 +53,11 @@ + PROG= isakmpd + + ifndef BINDIR +-BINDIR= /sbin +-endif +-ifndef LDSTATIC +-LDSTATIC= -static ++BINDIR= /usr/sbin + endif ++#ifndef LDSTATIC ++#LDSTATIC= -static ++#endif + + SRCS= app.c attribute.c cert.c connection.c \ + constants.c conf.c cookie.c crypto.c dh.c doi.c exchange.c \ +@@ -154,7 +154,7 @@ + + ifdef USE_KEYNOTE + USE_LIBCRYPTO= yes +-LDADD+= -lkeynote -lm ++LDADD+= -L${LIBKEYNOTEDIR} -lkeynote -lm + DPADD+= ${LIBKEYNOTE} ${LIBM} + POLICY= policy.c + CFLAGS+= -DUSE_KEYNOTE +@@ -238,3 +238,16 @@ + + realcleandepend: + rm -f .depend tags ++ ++# Install rules ++install: install-bin install-man ++ ++install-bin: isakmpd ++ -mkdir -p $(DESTDIR)$(BINDIR) ++ $(INSTALL) $(INSTALL_OPTS) -m 755 isakmpd $(DESTDIR)$(BINDIR) ++ ++install-man: ++ -mkdir -p $(DESTDIR)$(MANDIR)/man8 ++ $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.8 $(DESTDIR)$(MANDIR)/man8 ++ -mkdir -p $(DESTDIR)$(MANDIR)/man5 ++ $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.conf.5 isakmpd.policy.5 $(DESTDIR)$(MANDIR)/man5 +diff -urN isakmpd/samples/Makefile isakmpd.new/samples/Makefile +--- isakmpd/samples/Makefile 2003-06-03 16:39:50.000000000 +0200 ++++ isakmpd.new/samples/Makefile 2006-09-03 17:07:24.000000000 +0200 +@@ -26,7 +26,7 @@ + # + + FILES= VPN-* policy singlehost-* +-TARGETDIR= /usr/share/ipsec/isakmpd ++TARGETDIR= /usr/share/isakmpd/samples + + # The mkdir below is for installation on OpenBSD pre 2.7 + install: +diff -urN isakmpd/sysdep/linux/GNUmakefile.sysdep isakmpd.new/sysdep/linux/GNUmakefile.sysdep +--- isakmpd/sysdep/linux/GNUmakefile.sysdep 2004-01-16 13:36:42.000000000 +0100 ++++ isakmpd.new/sysdep/linux/GNUmakefile.sysdep 2006-09-03 17:16:48.000000000 +0200 +@@ -25,18 +25,20 @@ + # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + +-LIBGMP:= /usr/lib/libgmp.a +-LIBCRYPTO:= /usr/lib/libcrypto.a ++LIBGMP:= -lgmp ++LIBCRYPTO:= -lcrypto + LIBSYSDEPDIR:= ${.CURDIR}/sysdep/common/libsysdep + LIBSYSDEP:= ${LIBSYSDEPDIR}/libsysdep.a + +-LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} ++LIBKEYNOTEDIR:= $(STAGING_DIR)/usr/include ++ ++LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} -L$(STAGING_DIR)/usr/lib + DPADD+= ${LIBGMP} ${LIBSYSDEP} + + CFLAGS+= -DHAVE_GETNAMEINFO -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ + -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP \ +- -I/usr/src/linux/include -I${.CURDIR}/sysdep/common \ +- -I/usr/include/openssl ++ -I$(LINUX_DIR)/include -I${.CURDIR}/sysdep/common \ ++ -I$(STAGING_DIR)/usr/include/openssl -I${LIBKEYNOTEDIR} + + FEATURES= debug tripledes blowfish cast ec aggressive x509 policy + +@@ -50,7 +52,7 @@ + # hack libsysdep.a dependenc + ${LIBSYSDEPDIR}/.depend ${LIBSYSDEP}: + cd ${LIBSYSDEPDIR} && \ +- ${MAKE} --no-print-directory ${MAKEFLAGS} \ ++ ${MAKE} --no-print-directory \ + CFLAGS="${CFLAGS}" MKDEP="${MKDEP}" ${MAKECMDGOALS} + + ifeq ($(findstring clean,$(MAKECMDGOALS)),clean) +diff -urN isakmpd/x509.c isakmpd.new/x509.c +--- isakmpd/x509.c 2004-01-06 01:09:19.000000000 +0100 ++++ isakmpd.new/x509.c 2006-09-03 17:07:24.000000000 +0200 +@@ -969,14 +969,14 @@ + * trust. + */ + X509_STORE_CTX_init (&csc, x509_cas, cert, NULL); +-#if OPENSSL_VERSION_NUMBER >= 0x00907000L +- /* XXX See comment in x509_read_crls_from_dir. */ +- if (x509_cas->flags & X509_V_FLAG_CRL_CHECK) ++//#if OPENSSL_VERSION_NUMBER >= 0x00907000L ++ /* XXX See comment in x509_read_crls_from_dir. */ ++ /*if (x509_cas->flags & X509_V_FLAG_CRL_CHECK) + { + X509_STORE_CTX_set_flags (&csc, X509_V_FLAG_CRL_CHECK); + X509_STORE_CTX_set_flags (&csc, X509_V_FLAG_CRL_CHECK_ALL); + } +-#endif ++#endif */ + res = X509_verify_cert (&csc); + err = csc.error; + X509_STORE_CTX_cleanup (&csc); diff --git a/openwrt/package/isakmpd/patches/02-openssl_hashes.patch b/openwrt/package/isakmpd/patches/02-openssl_hashes.patch new file mode 100644 index 00000000000..680db86a31d --- /dev/null +++ b/openwrt/package/isakmpd/patches/02-openssl_hashes.patch @@ -0,0 +1,154 @@ +diff -urN isakmpd/GNUmakefile isakmpd.new/GNUmakefile +--- isakmpd/GNUmakefile 2006-09-01 19:29:05.000000000 +0200 ++++ isakmpd.new/GNUmakefile 2006-09-01 19:29:28.000000000 +0200 +@@ -75,13 +75,14 @@ + isakmp_fld.c isakmp_fld.h + MAN= isakmpd.8 isakmpd.conf.5 isakmpd.policy.5 + +-CFLAGS+= -O2 ${DEBUG} -Wall -DNEED_SYSDEP_APP \ ++CFLAGS+= ${DEBUG} -Wall -DNEED_SYSDEP_APP \ + -I${.CURDIR} -I${.CURDIR}/sysdep/${OS} -I. \ + + # Different debugging & profiling suggestions + + # Include symbolic debugging info + DEBUG= -g ++CFLAGS+= -g + + # Do execution time profiles + #CFLAGS+= -pg +@@ -172,6 +173,14 @@ + CFLAGS+= -DUSE_RAWKEY + endif + ++ifdef USE_OPENSSL_MD5 ++CFLAGS+= -DUSE_OPENSSL_MD5 ++endif ++ ++ifdef USE_OPENSSL_SHA1 ++CFLAGS+= -DUSE_OPENSSL_SHA1 ++endif ++ + SRCS+= ${IPSEC_SRCS} ${X509} ${POLICY} ${EC} ${AGGRESSIVE} ${DNSSEC} \ + $(ISAKMP_CFG) + CFLAGS+= ${IPSEC_CFLAGS} +diff -urN isakmpd/sysdep/common/libsysdep/GNUmakefile isakmpd.new/sysdep/common/libsysdep/GNUmakefile +--- isakmpd/sysdep/common/libsysdep/GNUmakefile 2003-06-03 16:52:06.000000000 +0200 ++++ isakmpd.new/sysdep/common/libsysdep/GNUmakefile 2006-09-01 19:29:28.000000000 +0200 +@@ -31,10 +31,18 @@ + .CURDIR:= $(shell pwd) + + LIB= sysdep +-SRCS= arc4random.c blowfish.c cast.c md5.c sha1.c strlcat.c strlcpy.c ++SRCS= arc4random.c blowfish.c cast.c strlcat.c strlcpy.c + NOMAN= + CFLAGS+= -I${.CURDIR}/.. -I/usr/include/machine + ++ifeq (,$(findstring USE_OPENSSL_MD5,$(CFLAGS))) ++SRCS+=md5.c ++endif ++ ++ifeq (,$(findstring USE_OPENSSL_SHA1,$(CFLAGS))) ++SRCS+=sha1.c ++endif ++ + lib${LIB}.a: ${SRCS:%.c=%.o} + ar cq $@ ${SRCS:%.c=%.o} + +diff -urN isakmpd/sysdep/common/libsysdep/md5.c isakmpd.new/sysdep/common/libsysdep/md5.c +--- isakmpd/sysdep/common/libsysdep/md5.c 2002-06-14 23:34:58.000000000 +0200 ++++ isakmpd.new/sysdep/common/libsysdep/md5.c 2006-09-01 19:29:28.000000000 +0200 +@@ -5,6 +5,8 @@ + * changes to accommodate it in the kernel by ji. + */ + ++#ifndef USE_OPENSSL_MD5 ++ + /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm + */ + +@@ -390,3 +392,4 @@ + #endif + #endif + ++#endif /* USE_OPENSSL_MD5 */ +diff -urN isakmpd/sysdep/common/libsysdep/sha1.c isakmpd.new/sysdep/common/libsysdep/sha1.c +--- isakmpd/sysdep/common/libsysdep/sha1.c 2001-01-28 23:38:48.000000000 +0100 ++++ isakmpd.new/sysdep/common/libsysdep/sha1.c 2006-09-01 19:29:28.000000000 +0200 +@@ -1,5 +1,7 @@ + /* $OpenBSD: sha1.c,v 1.2 2001/01/28 22:38:48 niklas Exp $ */ + ++#ifndef USE_OPENSSL_SHA1 ++ + /* + SHA-1 in C + By Steve Reid <steve@edmweb.com> +@@ -171,3 +173,5 @@ + SHA1Transform(context->state, context->buffer); + #endif + } ++ ++#endif /* USE_OPENSSL_SHA1 */ +diff -urN isakmpd/sysdep/common/md5.h isakmpd.new/sysdep/common/md5.h +--- isakmpd/sysdep/common/md5.h 2001-01-28 23:38:47.000000000 +0100 ++++ isakmpd.new/sysdep/common/md5.h 2006-09-01 19:29:28.000000000 +0200 +@@ -1,5 +1,15 @@ + /* $OpenBSD: md5.h,v 1.2 2001/01/28 22:38:47 niklas Exp $ */ + ++#ifdef USE_OPENSSL_MD5 ++ ++#include <openssl/md5.h> ++ ++#define MD5Init MD5_Init ++#define MD5Update MD5_Update ++#define MD5Final MD5_Final ++ ++#else /* USE_OPENSSL_MD5 */ ++ + /* GLOBAL.H - RSAREF types and constants + */ + +@@ -71,3 +81,5 @@ + void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); + + #define _MD5_H_ ++ ++#endif /* USE_OPENSSL_MD5 */ +diff -urN isakmpd/sysdep/common/sha1.h isakmpd.new/sysdep/common/sha1.h +--- isakmpd/sysdep/common/sha1.h 2001-01-28 23:38:47.000000000 +0100 ++++ isakmpd.new/sysdep/common/sha1.h 2006-09-01 19:29:28.000000000 +0200 +@@ -1,5 +1,16 @@ + /* $OpenBSD: sha1.h,v 1.2 2001/01/28 22:38:47 niklas Exp $ */ + ++#ifdef USE_OPENSSL_SHA1 ++ ++#include <openssl/sha.h> ++ ++typedef SHA_CTX SHA1_CTX; ++#define SHA1Init SHA1_Init ++#define SHA1Update SHA1_Update ++#define SHA1Final SHA1_Final ++ ++#else /* USE_OPENSSL_SHA1 */ ++ + /* + SHA-1 in C + By Steve Reid <steve@edmweb.com> +@@ -16,3 +27,5 @@ + void SHA1Init(SHA1_CTX* context); + void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len); + void SHA1Final(unsigned char digest[20], SHA1_CTX* context); ++ ++#endif /* USE_OPENSSL_SHA1 */ +diff -urN isakmpd/sysdep/linux/GNUmakefile.sysdep isakmpd.new/sysdep/linux/GNUmakefile.sysdep +--- isakmpd/sysdep/linux/GNUmakefile.sysdep 2006-09-01 19:29:05.000000000 +0200 ++++ isakmpd.new/sysdep/linux/GNUmakefile.sysdep 2006-09-01 19:29:29.000000000 +0200 +@@ -48,6 +48,8 @@ + USE_LIBCRYPO= defined + HAVE_DLOPEN= defined + USE_KEYNOTE= defined ++USE_OPENSSL_MD5= defined ++USE_OPENSSL_SHA1= defined + + # hack libsysdep.a dependenc + ${LIBSYSDEPDIR}/.depend ${LIBSYSDEP}: From 73537fad3492aeb6841cb9a8a81ba073196566b4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Sun, 3 Sep 2006 18:11:10 +0000 Subject: [PATCH 561/757] fix HAVE_ISC_READER related error SVN-Revision: 4742 --- openwrt/package/dnsmasq/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openwrt/package/dnsmasq/Makefile b/openwrt/package/dnsmasq/Makefile index f6c2d36c52b..2208a06ce42 100644 --- a/openwrt/package/dnsmasq/Makefile +++ b/openwrt/package/dnsmasq/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_VERSION:=2.32 +PKG_VERSION:=2.33 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_MD5SUM:=d1f593a8352db1d6ad3dccc9b775295d +PKG_MD5SUM:=45696461b6e6bc929273b1191ca50447 PKG_CAT:=zcat include $(INCLUDE_DIR)/package.mk @@ -37,6 +37,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -DHAVE_ISC_READER=1" \ BINDIR="/usr/sbin" MANDIR="/usr/man" \ all endef From b2d1c9f18facfb05621276f8831b2d4825d512d0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 4 Sep 2006 15:27:45 +0000 Subject: [PATCH 562/757] remove useless check SVN-Revision: 4747 --- openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch b/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch index fcddb348c72..e5f803a1443 100644 --- a/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch +++ b/openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch @@ -95,7 +95,7 @@ diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magic + len != 4) + return -ENXIO; + size += 0x40; /* header size of the uImage */ -+ if ((size > 0) && (size < 0x400000)) { ++ if (size < 0x400000) { + /* skip to next erase block */ + if (size & (flash->erasesize - 1)) { + size |= (flash->erasesize - 1); From af636099ba7dbc23277aca9ab47460d31e3393a6 Mon Sep 17 00:00:00 2001 From: Gerry Rozema <groz@openwrt.org> Date: Mon, 4 Sep 2006 19:30:04 +0000 Subject: [PATCH 563/757] Add more detail to uml readme SVN-Revision: 4748 --- openwrt/target/linux/uml-2.6/README | 23 +++++-- openwrt/target/linux/uml-2.6/config | 102 ++++++++++++++++++++++++---- 2 files changed, 109 insertions(+), 16 deletions(-) diff --git a/openwrt/target/linux/uml-2.6/README b/openwrt/target/linux/uml-2.6/README index b0148309213..84bf1148671 100644 --- a/openwrt/target/linux/uml-2.6/README +++ b/openwrt/target/linux/uml-2.6/README @@ -17,14 +17,29 @@ build it all In your bin directory you will find a kernel and an ext2 root file system when it's finished. Just run it like this:- -bin/openwrt-uml-2.6-vmlinux ubd0=bin/openwrt-uml-2.6-ext2.img +bin/openwrt-uml-2.6-vmlinux ubd0=bin/openwrt-uml-2.6-ext2.img con=null ssl=null ssl0=fd:0,fd:1 con0=null,fd:1 -The uml will start, and bring up an xterm with the serial console in it. No -networking is configured, but, it's a starting point. The resulting file system +The uml will start, and eventually the serial console of the uml will be at your +console prompt. If you would like it in xterms, substitute con=xterm and con0=xterm. +No networking is configured, but, it's a starting point. The resulting file system has just enough free space to start kicking the tires and playing in the world of 'embedded routers' along with all the resource restrictions that come with that world. -To configure networking and more, refer to the user mode linux documentation online +To configure networking and more, refer to the user mode linux documentation online. +A quick start goes along this line. install the uml-utilities packages so you have +the uml switch in and running, then add a command param to your uml start like this + +eth0=daemon,00:01:01:01:01:01,unix,/<your uml switch control socket here> + +With that in, and uml networking actually functional (can be a challenge at times), +you should be able to ifconfig the interface and talk to the host side, or, if you +bridged the uml switch to your host network, you should be able to run udhcp and be +away with networking off to the world. Again, if you are unfamiliar with uml and +uml networking, please read the docs and how-to stuff available on the net. It does +take some fiddling to get it started and working right the first time, but after that, +it opens up a whole new world of virtual machines. + + http://user-mode-linux.sourceforge.net/ diff --git a/openwrt/target/linux/uml-2.6/config b/openwrt/target/linux/uml-2.6/config index 4480a0120d9..851153e436e 100644 --- a/openwrt/target/linux/uml-2.6/config +++ b/openwrt/target/linux/uml-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Sun Aug 13 22:46:24 2006 +# Tue Aug 22 17:19:49 2006 # CONFIG_GENERIC_HARDIRQS=y CONFIG_UML=y @@ -137,7 +137,7 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y +# CONFIG_KMOD is not set # # Block layer @@ -193,7 +193,10 @@ CONFIG_SSL_CHAN="pty" CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_WATCHDOG is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_SOFT_WATCHDOG=m +CONFIG_UML_WATCHDOG=m CONFIG_UML_SOUND=m CONFIG_SOUND=m CONFIG_HOSTAUDIO=m @@ -281,13 +284,12 @@ CONFIG_INET6_TUNNEL=m CONFIG_IPV6_TUNNEL=m CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set +CONFIG_BRIDGE_NETFILTER=y # # Core Netfilter Configuration # -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_QUEUE is not set -# CONFIG_NETFILTER_NETLINK_LOG is not set +# CONFIG_NETFILTER_NETLINK is not set CONFIG_NETFILTER_XTABLES=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m @@ -307,6 +309,7 @@ CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m @@ -321,7 +324,6 @@ CONFIG_IP_NF_CONNTRACK=y CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CONNTRACK_NETLINK is not set CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -412,6 +414,30 @@ CONFIG_IP6_NF_MANGLE=m CONFIG_IP6_NF_TARGET_HL=m CONFIG_IP6_NF_RAW=m +# +# Bridge: Netfilter Configuration +# +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m + # # DCCP Configuration (EXPERIMENTAL) # @@ -427,11 +453,11 @@ CONFIG_IP6_NF_RAW=m # # CONFIG_TIPC is not set # CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=y # CONFIG_DECNET is not set -CONFIG_LLC=m -CONFIG_LLC2=m +CONFIG_LLC=y +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set @@ -443,8 +469,59 @@ CONFIG_LLC2=m # # QoS and/or fair queueing # -# CONFIG_NET_SCHED is not set +CONFIG_NET_SCHED=y +# CONFIG_NET_SCH_CLK_JIFFIES is not set +CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_ESTIMATOR=y # # Network testing @@ -477,6 +554,7 @@ CONFIG_UML_NET_SLIRP=y # Network device support # CONFIG_NETDEVICES=y +# CONFIG_IFB is not set CONFIG_DUMMY=m # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set From d192e46882a5c5a774084ab5cb3cf91a2efd52ec Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Mon, 4 Sep 2006 20:38:19 +0000 Subject: [PATCH 564/757] Fix download site, closes #751, #752 SVN-Revision: 4749 --- openwrt/package/isakmpd/Makefile | 2 +- openwrt/package/keynote/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/isakmpd/Makefile b/openwrt/package/isakmpd/Makefile index d0ae6f6c977..5e268e52a0e 100644 --- a/openwrt/package/isakmpd/Makefile +++ b/openwrt/package/isakmpd/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/isakmpd +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ PKG_MD5SUM:=9f59b10d57cfed5e95743255f1c1620d PKG_CAT:=bzcat diff --git a/openwrt/package/keynote/Makefile b/openwrt/package/keynote/Makefile index 4df4e14ade4..f5358ea36d6 100644 --- a/openwrt/package/keynote/Makefile +++ b/openwrt/package/keynote/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/keynote +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ PKG_MD5SUM:=b569066ac2ba1356c2112b118a7d74d0 PKG_CAT:=bzcat From 9251b17fbebea96a6b24f8dd81f6494c4cdd867d Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Mon, 4 Sep 2006 20:39:21 +0000 Subject: [PATCH 565/757] Fix download url in config.in SVN-Revision: 4750 --- openwrt/package/keynote/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/keynote/Makefile b/openwrt/package/keynote/Makefile index f5358ea36d6..d61188c68a8 100644 --- a/openwrt/package/keynote/Makefile +++ b/openwrt/package/keynote/Makefile @@ -29,7 +29,7 @@ CATEGORY:=Network DEPENDS:=@LINUX_2_6 TITLE:=IPsec management tools DESCRIPTION:=IPsec management tools -URL:=http://keynote.sourceforge.net/ +URL:=http://www1.cs.columbia.edu/~angelos/keynote.html endef define Build/Configure From e8e9ee4981d9a5df435e5d406bb02227035a1b9a Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 4 Sep 2006 21:28:28 +0000 Subject: [PATCH 566/757] add checks for the kernel config when building hostap for linux 2.6 SVN-Revision: 4751 --- openwrt/package/hostap/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openwrt/package/hostap/Makefile b/openwrt/package/hostap/Makefile index b653b145502..90281fe6b59 100644 --- a/openwrt/package/hostap/Makefile +++ b/openwrt/package/hostap/Makefile @@ -96,20 +96,25 @@ ifeq ($(KERNEL),2.6) define Build/Compile endef +ifeq ($(CONFIG_HOSTAP),m) define Package/kmod-hostap/install install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) \ $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ endef +endif +ifeq ($(CONFIG_HOSTAP_PCI),m) define Package/kmod-hostap-pci/install install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) \ $(MODULES_DIR)/kernel/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ endef +endif +ifeq ($(CONFIG_HOSTAP_PLX),m) define Package/kmod-hostap-plx/install install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) \ @@ -117,6 +122,7 @@ ifeq ($(KERNEL),2.6) $(1)/lib/modules/$(LINUX_VERSION)/ endef endif +endif $(eval $(call BuildPackage,kmod-hostap)) $(eval $(call BuildPackage,kmod-hostap-pci)) From 1ffd60134445c6b904659be0217ab8a30face540 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Mon, 4 Sep 2006 23:51:30 +0000 Subject: [PATCH 567/757] remove default network config for brcm SVN-Revision: 4752 --- openwrt/package/base-files/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index dce07fe5074..d6e62b5ae5b 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -133,6 +133,7 @@ define Package/base-files$(TARGET)/install-ar7 $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin endef define Package/base-files$(TARGET)/install-brcm + rm -f $(1)/etc/config/network mkdir -p $(1)/sbin $(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin endef From aae15e51565bbe5317c96131753226392dacaf2f Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 5 Sep 2006 00:45:03 +0000 Subject: [PATCH 568/757] enable squashfs in the magicbox kernel (not used yet), magicbox build now no longer broken (images work well with jffs2) SVN-Revision: 4753 --- openwrt/target/Config.in | 1 - openwrt/target/image/magicbox/Makefile | 14 ++++++++++---- openwrt/target/linux/magicbox-2.6/config | 5 ++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in index fc35a9acc07..6b317dd881e 100644 --- a/openwrt/target/Config.in +++ b/openwrt/target/Config.in @@ -79,7 +79,6 @@ config LINUX_2_6_XSCALE config LINUX_2_6_MAGICBOX bool "Magicbox [2.6]" - depends BROKEN select powerpc select LINUX_2_6 select BIG_ENDIAN diff --git a/openwrt/target/image/magicbox/Makefile b/openwrt/target/image/magicbox/Makefile index f0b19b1d231..10f71df2a99 100644 --- a/openwrt/target/image/magicbox/Makefile +++ b/openwrt/target/image/magicbox/Makefile @@ -22,11 +22,17 @@ define Image/Build endef define Image/Build/jffs2-64k - dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img bs=65536 conv=sync + ( \ + dd if=$(LINUX_DIR)/arch/ppc/boot/images/uImage bs=65536 conv=sync; \ + dd if=$(KDIR)/root.$(1) bs=65536 conv=sync; \ + ) > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img endef -define Image/Build/jffs2-128k - dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img bs=131072 conv=sync -endef +#define Image/Build/jffs2-128k +# ( \ +# dd if=$(LINUX_DIR)/arch/ppc/boot/images/uImage bs=131072 conv=sync; \ +# dd if=$(KDIR)/root.$(1) bs=131072 conv=sync; \ +# ) > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img +#endef $(eval $(call BuildImage)) diff --git a/openwrt/target/linux/magicbox-2.6/config b/openwrt/target/linux/magicbox-2.6/config index efd3f5867ef..1f7f591bb30 100644 --- a/openwrt/target/linux/magicbox-2.6/config +++ b/openwrt/target/linux/magicbox-2.6/config @@ -1004,7 +1004,10 @@ CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set From 977681a377b154c9f7b7fbb7b029d5ba5030d144 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Tue, 5 Sep 2006 07:11:51 +0000 Subject: [PATCH 569/757] Remove installation of incompatible getopt.h, closes #753, #754, #755 SVN-Revision: 4754 --- openwrt/package/keynote/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/keynote/Makefile b/openwrt/package/keynote/Makefile index d61188c68a8..503528f5e86 100644 --- a/openwrt/package/keynote/Makefile +++ b/openwrt/package/keynote/Makefile @@ -48,12 +48,12 @@ define Package/keynote/install endef define Build/InstallDev - $(CP) $(PKG_BUILD_DIR)/*.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/{assertion,header,keynote,signature}.h $(STAGING_DIR)/usr/include/ $(CP) $(PKG_BUILD_DIR)/libkeynote.a $(STAGING_DIR)/usr/lib/ endef define Build/UninstallDev - rm -rf $(STAGING_DIR)/usr/include/{assertion,getopt,header,keynote,signature}.h + rm -rf $(STAGING_DIR)/usr/include/{assertion,header,keynote,signature}.h endef $(eval $(call BuildPackage,keynote)) From 6c252f4d26499a37cdc8901c64fe2f3a6447e0e4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 5 Sep 2006 12:21:07 +0000 Subject: [PATCH 570/757] remove -mcpu=405 for magicbox, because it enables soft-float, which makes binaries bigger and broken SVN-Revision: 4756 --- openwrt/toolchain/Config.in | 1 - 1 file changed, 1 deletion(-) diff --git a/openwrt/toolchain/Config.in b/openwrt/toolchain/Config.in index 32dc33e277e..b5258ddce98 100644 --- a/openwrt/toolchain/Config.in +++ b/openwrt/toolchain/Config.in @@ -54,7 +54,6 @@ config TARGET_OPTIMIZATION default "-Os -pipe -march=i486 -funit-at-a-time" if i386 default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" if mipsel || mips default "-Os -pipe -mcpu=xscale -funit-at-a-time" if armeb - default "-Os -pipe -funit-at-a-time -mcpu=405" if LINUX_2_6_MAGICBOX default "-Os -pipe -funit-at-a-time" help Optimizations to use when building for the target host. From 09ee14dd1c746a7c69398ad03fe5d985708d2c5e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 6 Sep 2006 00:26:15 +0000 Subject: [PATCH 571/757] change path for mirror2.openwrt.org SVN-Revision: 4759 --- openwrt/scripts/download.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/scripts/download.pl b/openwrt/scripts/download.pl index 094ec04861a..feb38a1beed 100755 --- a/openwrt/scripts/download.pl +++ b/openwrt/scripts/download.pl @@ -92,7 +92,7 @@ foreach my $mirror (@ARGV) { } push @mirrors, 'http://mirror1.openwrt.org/'; -push @mirrors, 'http://mirror2.openwrt.org/'; +push @mirrors, 'http://mirror2.openwrt.org/sources'; push @mirrors, 'http://downloads.openwrt.org/sources/'; while (!$ok) { From d873abfb79e7a7fec047dad397877862d118a4eb Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 6 Sep 2006 16:43:03 +0000 Subject: [PATCH 572/757] fix build error SVN-Revision: 4761 --- openwrt/package/isakmpd/patches/01-standardize.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openwrt/package/isakmpd/patches/01-standardize.patch b/openwrt/package/isakmpd/patches/01-standardize.patch index 74ffac2d50c..f97c77630e4 100644 --- a/openwrt/package/isakmpd/patches/01-standardize.patch +++ b/openwrt/package/isakmpd/patches/01-standardize.patch @@ -87,8 +87,9 @@ diff -urN isakmpd/sysdep/linux/GNUmakefile.sysdep isakmpd.new/sysdep/linux/GNUma -LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} +LIBKEYNOTEDIR:= $(STAGING_DIR)/usr/include + -+LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} -L$(STAGING_DIR)/usr/lib - DPADD+= ${LIBGMP} ${LIBSYSDEP} ++LDADD+= -L$(STAGING_DIR)/usr/lib ${LIBGMP} ${LIBSYSDEP} ${LIBCRYPTO} +-DPADD+= ${LIBGMP} ${LIBSYSDEP} ++DPADD+= ${LIBSYSDEP} CFLAGS+= -DHAVE_GETNAMEINFO -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP \ From f064d2375bdee193405155fef94c6e56b403da31 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 7 Sep 2006 07:57:17 +0000 Subject: [PATCH 573/757] Clean up prereq error messages SVN-Revision: 4766 --- openwrt/include/prereq-build.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openwrt/include/prereq-build.mk b/openwrt/include/prereq-build.mk index e90c3157b05..11403c2fdca 100644 --- a/openwrt/include/prereq-build.mk +++ b/openwrt/include/prereq-build.mk @@ -12,7 +12,7 @@ define Require/non-root [ "$$(shell whoami)" != "root" ] endef $(eval $(call Require,non-root, \ - Building OpenWrt as root is not supported! \ + Please do not compile as root. \ )) # Required for the toolchain @@ -25,7 +25,7 @@ define Require/working-make endef $(eval $(call Require,working-make, \ - Your make version is buggy. Please install GNU make v3.81 or later. \ + Please install GNU make v3.81 or later. (This version has bugs) \ )) define Require/working-gcc @@ -34,7 +34,7 @@ define Require/working-gcc endef $(eval $(call Require,working-gcc, \ - No working GNU C Compiler (gcc) was found on your system. \ + Please install the GNU C Compiler (gcc). \ )) define Require/working-g++ @@ -43,7 +43,7 @@ define Require/working-g++ endef $(eval $(call Require,working-g++, \ - No working GNU C++ Compiler (g++) was found on your system. \ + Please install the GNU C++ Compiler (g++). \ )) define Require/ncurses @@ -52,7 +52,7 @@ define Require/ncurses endef $(eval $(call Require,ncurses, \ - No ncurses development files were not found on your system. \ + Please install ncurses. (Missing libncurses.so or ncurses.h) \ )) @@ -62,7 +62,7 @@ define Require/zlib endef $(eval $(call Require,zlib, \ - No zlib development files were not found on your system. \ + Please install zlib. (Missing libz.so or zlib.h) \ )) From 550bdc5f804f2b3ed7c0286fe8f0e6cfdf3bc5a0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 7 Sep 2006 12:14:08 +0000 Subject: [PATCH 574/757] fix unnecessary rebuilds for library package directories with no selected packages SVN-Revision: 4767 --- openwrt/include/package.mk | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 9a947f35824..515698d691d 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -17,20 +17,10 @@ define Build/DefaultTargets ifeq ($(CONFIG_AUTOREBUILD),y) _INFO:= ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR)) - _INFO+=$(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) + _INFO+=$(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/.prepared: package-clean endif - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - _INFO+=$(subst $(TOPDIR)/,,$(IPKG_$(1))) - $(PKG_BUILD_DIR)/.built: package-rebuild - endif - - ifneq ($(MAKECMDGOALS),prereq) - ifneq ($$(_INFO),) - $$(info Rebuilding $$(_INFO)) - endif - endif endif endif @@ -241,6 +231,19 @@ define BuildPackage @touch $$@ $$(eval $$(call Build/DefaultTargets,$(1))) + + ifneq ($$(CONFIG_PACKAGE_$(1)),) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$$(IPKG_$(1))) + _INFO+=$(subst $(TOPDIR)/,,$$(IPKG_$(1))) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif + + ifneq ($(MAKECMDGOALS),prereq) + ifneq ($$(_INFO),) + $$(info Rebuilding $$(_INFO)) + endif + endif + endif endef ifneq ($(strip $(PKG_CAT)),) From ebea7120f4299640f8a2e60b8500757826822abe Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 7 Sep 2006 12:40:03 +0000 Subject: [PATCH 575/757] upgrade isakmpd, add security fix SVN-Revision: 4768 --- openwrt/package/isakmpd/Makefile | 16 +- .../isakmpd/patches/01-standardize.patch | 133 -- .../isakmpd/patches/010-debian_3.patch | 1706 +++++++++++++++++ .../isakmpd/patches/020-standardize.patch | 59 + ..._hashes.patch => 030-openssl_hashes.patch} | 0 .../isakmpd/patches/040-security_fix.patch | 22 + 6 files changed, 1796 insertions(+), 140 deletions(-) delete mode 100644 openwrt/package/isakmpd/patches/01-standardize.patch create mode 100644 openwrt/package/isakmpd/patches/010-debian_3.patch create mode 100644 openwrt/package/isakmpd/patches/020-standardize.patch rename openwrt/package/isakmpd/patches/{02-openssl_hashes.patch => 030-openssl_hashes.patch} (100%) create mode 100644 openwrt/package/isakmpd/patches/040-security_fix.patch diff --git a/openwrt/package/isakmpd/Makefile b/openwrt/package/isakmpd/Makefile index 5e268e52a0e..98cb36f2c2a 100644 --- a/openwrt/package/isakmpd/Makefile +++ b/openwrt/package/isakmpd/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=isakmpd -PKG_VERSION:=20040115cvs +PKG_VERSION:=20041012 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ -PKG_MD5SUM:=9f59b10d57cfed5e95743255f1c1620d -PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/i/isakmpd/ +PKG_MD5SUM:=e6d25a9e232fb186e1a48dc06453bd57 +PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install @@ -35,8 +35,10 @@ endef define Build/Compile $(call Build/Compile/Default,LINUX_DIR="$(LINUX_DIR)" \ STAGING_DIR="$(STAGING_DIR)" \ - DESTDIR="$(PKG_INSTALL_DIR)") + DESTDIR="$(PKG_INSTALL_DIR)" \ + ) $(MAKE) -C $(PKG_BUILD_DIR) \ + STAGING_DIR="$(STAGING_DIR)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ INSTALL="install -c" \ install-bin diff --git a/openwrt/package/isakmpd/patches/01-standardize.patch b/openwrt/package/isakmpd/patches/01-standardize.patch deleted file mode 100644 index f97c77630e4..00000000000 --- a/openwrt/package/isakmpd/patches/01-standardize.patch +++ /dev/null @@ -1,133 +0,0 @@ -diff -urN isakmpd/GNUmakefile isakmpd.new/GNUmakefile ---- isakmpd/GNUmakefile 2004-01-16 13:36:32.000000000 +0100 -+++ isakmpd.new/GNUmakefile 2006-09-03 17:33:03.000000000 +0200 -@@ -40,12 +40,12 @@ - # integrated, freebsd/netbsd means FreeBSD/NetBSD with KAME IPsec. - # darwin means MacOS X 10.2 and later with KAME IPsec. linux means Linux-2.5 - # and later with native IPSec support. --OS= openbsd -+#OS= openbsd - #OS= netbsd - #OS= freebsd - #OS= freeswan - #OS= darwin --#OS= linux -+OS= linux - - .CURDIR:= $(shell pwd) - VPATH= ${.CURDIR}/sysdep/${OS} -@@ -53,11 +53,11 @@ - PROG= isakmpd - - ifndef BINDIR --BINDIR= /sbin --endif --ifndef LDSTATIC --LDSTATIC= -static -+BINDIR= /usr/sbin - endif -+#ifndef LDSTATIC -+#LDSTATIC= -static -+#endif - - SRCS= app.c attribute.c cert.c connection.c \ - constants.c conf.c cookie.c crypto.c dh.c doi.c exchange.c \ -@@ -154,7 +154,7 @@ - - ifdef USE_KEYNOTE - USE_LIBCRYPTO= yes --LDADD+= -lkeynote -lm -+LDADD+= -L${LIBKEYNOTEDIR} -lkeynote -lm - DPADD+= ${LIBKEYNOTE} ${LIBM} - POLICY= policy.c - CFLAGS+= -DUSE_KEYNOTE -@@ -238,3 +238,16 @@ - - realcleandepend: - rm -f .depend tags -+ -+# Install rules -+install: install-bin install-man -+ -+install-bin: isakmpd -+ -mkdir -p $(DESTDIR)$(BINDIR) -+ $(INSTALL) $(INSTALL_OPTS) -m 755 isakmpd $(DESTDIR)$(BINDIR) -+ -+install-man: -+ -mkdir -p $(DESTDIR)$(MANDIR)/man8 -+ $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.8 $(DESTDIR)$(MANDIR)/man8 -+ -mkdir -p $(DESTDIR)$(MANDIR)/man5 -+ $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.conf.5 isakmpd.policy.5 $(DESTDIR)$(MANDIR)/man5 -diff -urN isakmpd/samples/Makefile isakmpd.new/samples/Makefile ---- isakmpd/samples/Makefile 2003-06-03 16:39:50.000000000 +0200 -+++ isakmpd.new/samples/Makefile 2006-09-03 17:07:24.000000000 +0200 -@@ -26,7 +26,7 @@ - # - - FILES= VPN-* policy singlehost-* --TARGETDIR= /usr/share/ipsec/isakmpd -+TARGETDIR= /usr/share/isakmpd/samples - - # The mkdir below is for installation on OpenBSD pre 2.7 - install: -diff -urN isakmpd/sysdep/linux/GNUmakefile.sysdep isakmpd.new/sysdep/linux/GNUmakefile.sysdep ---- isakmpd/sysdep/linux/GNUmakefile.sysdep 2004-01-16 13:36:42.000000000 +0100 -+++ isakmpd.new/sysdep/linux/GNUmakefile.sysdep 2006-09-03 17:16:48.000000000 +0200 -@@ -25,18 +25,20 @@ - # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - --LIBGMP:= /usr/lib/libgmp.a --LIBCRYPTO:= /usr/lib/libcrypto.a -+LIBGMP:= -lgmp -+LIBCRYPTO:= -lcrypto - LIBSYSDEPDIR:= ${.CURDIR}/sysdep/common/libsysdep - LIBSYSDEP:= ${LIBSYSDEPDIR}/libsysdep.a - --LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} -+LIBKEYNOTEDIR:= $(STAGING_DIR)/usr/include -+ -+LDADD+= -L$(STAGING_DIR)/usr/lib ${LIBGMP} ${LIBSYSDEP} ${LIBCRYPTO} --DPADD+= ${LIBGMP} ${LIBSYSDEP} -+DPADD+= ${LIBSYSDEP} - - CFLAGS+= -DHAVE_GETNAMEINFO -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ - -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP \ -- -I/usr/src/linux/include -I${.CURDIR}/sysdep/common \ -- -I/usr/include/openssl -+ -I$(LINUX_DIR)/include -I${.CURDIR}/sysdep/common \ -+ -I$(STAGING_DIR)/usr/include/openssl -I${LIBKEYNOTEDIR} - - FEATURES= debug tripledes blowfish cast ec aggressive x509 policy - -@@ -50,7 +52,7 @@ - # hack libsysdep.a dependenc - ${LIBSYSDEPDIR}/.depend ${LIBSYSDEP}: - cd ${LIBSYSDEPDIR} && \ -- ${MAKE} --no-print-directory ${MAKEFLAGS} \ -+ ${MAKE} --no-print-directory \ - CFLAGS="${CFLAGS}" MKDEP="${MKDEP}" ${MAKECMDGOALS} - - ifeq ($(findstring clean,$(MAKECMDGOALS)),clean) -diff -urN isakmpd/x509.c isakmpd.new/x509.c ---- isakmpd/x509.c 2004-01-06 01:09:19.000000000 +0100 -+++ isakmpd.new/x509.c 2006-09-03 17:07:24.000000000 +0200 -@@ -969,14 +969,14 @@ - * trust. - */ - X509_STORE_CTX_init (&csc, x509_cas, cert, NULL); --#if OPENSSL_VERSION_NUMBER >= 0x00907000L -- /* XXX See comment in x509_read_crls_from_dir. */ -- if (x509_cas->flags & X509_V_FLAG_CRL_CHECK) -+//#if OPENSSL_VERSION_NUMBER >= 0x00907000L -+ /* XXX See comment in x509_read_crls_from_dir. */ -+ /*if (x509_cas->flags & X509_V_FLAG_CRL_CHECK) - { - X509_STORE_CTX_set_flags (&csc, X509_V_FLAG_CRL_CHECK); - X509_STORE_CTX_set_flags (&csc, X509_V_FLAG_CRL_CHECK_ALL); - } --#endif -+#endif */ - res = X509_verify_cert (&csc); - err = csc.error; - X509_STORE_CTX_cleanup (&csc); diff --git a/openwrt/package/isakmpd/patches/010-debian_3.patch b/openwrt/package/isakmpd/patches/010-debian_3.patch new file mode 100644 index 00000000000..551ae1ffcd8 --- /dev/null +++ b/openwrt/package/isakmpd/patches/010-debian_3.patch @@ -0,0 +1,1706 @@ +--- isakmpd-20041012.orig/dpd.c ++++ isakmpd-20041012/dpd.c +@@ -26,6 +26,7 @@ + + #include <sys/types.h> + #include <stdlib.h> ++#include <memory.h> + + #include "sysdep.h" + +@@ -174,6 +175,7 @@ + } + break; + default: ++ ; + } + + /* Mark handled. */ +@@ -223,6 +225,7 @@ + dpd_check_event, sa, &tv); + break; + default: ++ ; + } + if (!sa->dpd_event) + log_print("dpd_timer_reset: timer_add_event failed"); +--- isakmpd-20041012.orig/ipsec.c ++++ isakmpd-20041012/ipsec.c +@@ -1020,6 +1020,52 @@ + } + } + ++/* ++ * deal with a NOTIFY of INVALID_SPI ++ */ ++static void ++ipsec_invalid_spi (struct message *msg, struct payload *p) ++{ ++ struct sockaddr *dst; ++ int invspisz, off; ++ u_int32_t spi; ++ u_int16_t totsiz; ++ u_int8_t spisz; ++ ++ /* Any notification that make us do something should be protected */ ++ if(!TAILQ_FIRST (&msg->payload[ISAKMP_PAYLOAD_HASH])) ++ { ++ LOG_DBG ((LOG_SA, 40, ++ "ipsec_invalid_spi: missing HASH payload in INVALID_SPI" ++ " notification")); ++ return; ++ } ++ ++ /* ++ * get the invalid spi out of the variable sized notification data ++ * field, which is after the variable sized SPI field [which specifies ++ * the receiving entity's phase-1 SPI, not the invalid spi] ++ */ ++ totsiz = GET_ISAKMP_GEN_LENGTH (p->p); ++ spisz = GET_ISAKMP_NOTIFY_SPI_SZ (p->p); ++ off = ISAKMP_NOTIFY_SPI_OFF + spisz; ++ invspisz = totsiz - off; ++ ++ if (invspisz != sizeof spi) ++ { ++ LOG_DBG ((LOG_SA, 40, ++ "ipsec_invalid_spi: SPI size %d in INVALID_SPI " ++ "payload unsupported", spisz)); ++ return; ++ } ++ memcpy (&spi, p->p + off, sizeof spi); ++ ++ msg->transport->vtbl->get_dst (msg->transport, &dst); ++ ++ /* delete matching SPI's from this peer */ ++ ipsec_delete_spi_list (dst, 0, (u_int8_t *)&spi, 1, "INVALID_SPI"); ++} ++ + static int + ipsec_responder(struct message *msg) + { +@@ -1205,7 +1251,9 @@ + return dv != IPSEC_ENCAP_TUNNEL + && dv != IPSEC_ENCAP_TRANSPORT + && dv != IPSEC_ENCAP_UDP_ENCAP_TUNNEL +- && dv != IPSEC_ENCAP_UDP_ENCAP_TRANSPORT; ++ && dv != IPSEC_ENCAP_UDP_ENCAP_TRANSPORT ++ && dv != IPSEC_ENCAP_UDP_ENCAP_TUNNEL_DRAFT ++ && dv != IPSEC_ENCAP_UDP_ENCAP_TRANSPORT_DRAFT; + #else + return dv < IPSEC_ENCAP_TUNNEL + || dv > IPSEC_ENCAP_TRANSPORT; +@@ -1837,7 +1885,7 @@ + ipsec_get_id(char *section, int *id, struct sockaddr **addr, + struct sockaddr **mask, u_int8_t *tproto, u_int16_t *port) + { +- char *type, *address, *netmask; ++ char *type, *address, *netmask; + + type = conf_get_str(section, "ID-type"); + if (!type) { +--- isakmpd-20041012.orig/GNUmakefile ++++ isakmpd-20041012/GNUmakefile +@@ -40,12 +40,12 @@ + # integrated, freebsd/netbsd means FreeBSD/NetBSD with KAME IPsec. + # darwin means MacOS X 10.2 and later with KAME IPsec. linux means Linux-2.5 + # and later with native IPSec support. +-OS= openbsd ++#OS= openbsd + #OS= netbsd + #OS= freebsd + #OS= freeswan + #OS= darwin +-#OS= linux ++OS= linux + + .CURDIR:= $(shell pwd) + VPATH= ${.CURDIR}/sysdep/${OS} +@@ -55,9 +55,10 @@ + ifndef BINDIR + BINDIR= /sbin + endif +-ifndef LDSTATIC +-LDSTATIC= -static +-endif ++ ++#ifndef LDSTATIC ++#LDSTATIC= -static ++#endif + + SRCS= app.c attribute.c cert.c connection.c \ + constants.c conf.c cookie.c crypto.c dh.c doi.c exchange.c \ +@@ -131,11 +132,14 @@ + ifneq ($(findstring install,$(MAKECMDGOALS)),install) + # Skip 'regress' until the regress/ structure has gmake makefiles for it. + #SUBDIR:= regress +-SUBDIR:= ++#SUBDIR:= apps/certpatch + mksubdirs: + $(foreach DIR, ${SUBDIR}, \ +- cd ${DIR}; ${MAKE} ${MAKEFLAGS} CFLAGS="${CFLAGS}" \ +- MKDEP="${MKDEP}" ${MAKECMDGOALS}) ++ cd ${.CURDIR}/${DIR}; ${MAKE} ${MAKECMDGOALS};) ++ ++# $(foreach DIR, ${SUBDIR}, \ ++# cd ${DIR}; ${MAKE} CFLAGS="${CFLAGS}" \ ++# MKDEP="${MKDEP}" ${MAKECMDGOALS}) + else + mksubdirs: + endif +@@ -173,7 +177,7 @@ + endif + + SRCS+= ${IPSEC_SRCS} ${X509} ${POLICY} ${EC} ${AGGRESSIVE} ${DNSSEC} \ +- $(ISAKMP_CFG) ++ $(ISAKMP_CFG) ${DPD} ${NAT_TRAVERSAL} + CFLAGS+= ${IPSEC_CFLAGS} + LDADD+= ${DESLIB} + DPADD+= ${DESLIBDEP} +--- isakmpd-20041012.orig/exchange.h ++++ isakmpd-20041012/exchange.h +@@ -221,6 +221,8 @@ + #define EXCHANGE_FLAG_NAT_T_ENABLE 0x10 /* We are doing NAT-T. */ + #define EXCHANGE_FLAG_NAT_T_KEEPALIVE 0x20 /* We are the NAT:ed peer. */ + #define EXCHANGE_FLAG_DPD_CAP_PEER 0x40 /* Peer is DPD capable. */ ++#define EXCHANGE_FLAG_NAT_T_RFC 0x0080 /* Peer does RFC NAT-T. */ ++#define EXCHANGE_FLAG_NAT_T_DRAFT 0x0100 /* Peer does draft NAT-T.*/ + + extern int exchange_add_certs(struct message *); + extern void exchange_finalize(struct message *); +--- isakmpd-20041012.orig/log.c ++++ isakmpd-20041012/log.c +@@ -79,7 +79,6 @@ + + struct packhdr { + struct pcap_pkthdr pcap;/* pcap file packet header */ +- u_int32_t sa_family; /* address family */ + union { + struct ip ip4; /* IPv4 header (w/o options) */ + struct ip6_hdr ip6; /* IPv6 header */ +@@ -97,7 +96,7 @@ + static u_int8_t *packet_buf = NULL; + + static int udp_cksum(struct packhdr *, const struct udphdr *, +- u_int16_t *); ++ u_int16_t *, int); + static u_int16_t in_cksum(const u_int16_t *, int); + #endif /* USE_DEBUG */ + +@@ -539,11 +538,9 @@ + udp.uh_ulen = htons(datalen); + + /* ip */ +- hdr.sa_family = htonl(src->sa_family); + switch (src->sa_family) { + default: + /* Assume IPv4. XXX Can 'default' ever happen here? */ +- hdr.sa_family = htonl(AF_INET); + hdr.ip.ip4.ip_src.s_addr = 0x02020202; + hdr.ip.ip4.ip_dst.s_addr = 0x01010101; + /* The rest of the setup is common to AF_INET. */ +@@ -584,9 +581,7 @@ + } + + /* Calculate UDP checksum. */ +- udp.uh_sum = udp_cksum(&hdr, &udp, (u_int16_t *) packet_buf); +- hdrlen += sizeof hdr.sa_family; +- ++ udp.uh_sum = udp_cksum(&hdr, &udp, (u_int16_t *) packet_buf, src->sa_family); + /* pcap file packet header */ + gettimeofday(&tv, 0); + hdr.pcap.ts.tv_sec = tv.tv_sec; +@@ -610,7 +605,7 @@ + + /* Copied from tcpdump/print-udp.c, mostly rewritten. */ + static int +-udp_cksum(struct packhdr *hdr, const struct udphdr *u, u_int16_t *d) ++udp_cksum(struct packhdr *hdr, const struct udphdr *u, u_int16_t *d, int af) + { + struct ip *ip4; + struct ip6_hdr *ip6; +@@ -639,7 +634,7 @@ + + /* Setup pseudoheader. */ + memset(phu.pa, 0, sizeof phu); +- switch (ntohl(hdr->sa_family)) { ++ switch (af) { + case AF_INET: + ip4 = &hdr->ip.ip4; + memcpy(&phu.ip4p.src, &ip4->ip_src, sizeof(struct in_addr)); +@@ -664,7 +659,7 @@ + + /* IPv6 wants a 0xFFFF checksum "on error", not 0x0. */ + if (tlen < 0) +- return (ntohl(hdr->sa_family) == AF_INET ? 0 : 0xFFFF); ++ return (af == AF_INET ? 0 : 0xFFFF); + + sum = 0; + for (i = 0; i < hdrlen; i += 2) +--- isakmpd-20041012.orig/nat_traversal.c ++++ isakmpd-20041012/nat_traversal.c +@@ -1,4 +1,4 @@ +-/* $OpenBSD: nat_traversal.c,v 1.7 2004/08/08 19:11:06 deraadt Exp $ */ ++/* $OpenBSD: nat_traversal.c,v 1.17 2006/06/14 14:03:33 hshoexer Exp $ */ + + /* + * Copyright (c) 2004 Håkan Olsson. All rights reserved. +@@ -48,40 +48,40 @@ + #include "util.h" + #include "virtual.h" + ++int disable_nat_t = 0; ++ + /* +- * XXX According to draft-ietf-ipsec-nat-t-ike-07.txt, the NAT-T +- * capability of the other peer is determined by a particular vendor ID +- * sent as the first message. This vendor ID string is supposed to be a +- * MD5 hash of "RFC XXXX", where XXXX is the future RFC number. ++ * NAT-T capability of the other peer is determined by a particular vendor ++ * ID sent in the first message. This vendor ID string is supposed to be a ++ * MD5 hash of "RFC 3947". + * + * These seem to be the "well" known variants of this string in use by + * products today. + */ +-static const char *isakmp_nat_t_cap_text[] = { +- "draft-ietf-ipsec-nat-t-ike-00", /* V1 (XXX: may be obsolete) */ +- "draft-ietf-ipsec-nat-t-ike-02\n", /* V2 */ +- "draft-ietf-ipsec-nat-t-ike-03", /* V3 */ +-#ifdef notyet +- "RFC XXXX", +-#endif ++ ++static struct nat_t_cap isakmp_nat_t_cap[] = { ++ { VID_DRAFT_V2_N, EXCHANGE_FLAG_NAT_T_DRAFT, ++ "draft-ietf-ipsec-nat-t-ike-02\n", NULL, 0 }, ++ { VID_DRAFT_V3, EXCHANGE_FLAG_NAT_T_DRAFT, ++ "draft-ietf-ipsec-nat-t-ike-03", NULL, 0 }, ++ { VID_RFC3947, EXCHANGE_FLAG_NAT_T_RFC, ++ "RFC 3947", NULL, 0 }, + }; + ++#define NUMNATTCAP (sizeof isakmp_nat_t_cap / sizeof isakmp_nat_t_cap[0]) ++ + /* In seconds. Recommended in draft-ietf-ipsec-udp-encaps-09. */ + #define NAT_T_KEEPALIVE_INTERVAL 20 + +-/* The MD5 hashes of the above strings is put in this array. */ +-static char **nat_t_hashes; +-static size_t nat_t_hashsize; +- + static int nat_t_setup_hashes(void); +-static int nat_t_add_vendor_payload(struct message *, char *); ++static int nat_t_add_vendor_payload(struct message *, struct nat_t_cap *); + static int nat_t_add_nat_d(struct message *, struct sockaddr *); + static int nat_t_match_nat_d_payload(struct message *, struct sockaddr *); + + void + nat_t_init(void) + { +- nat_t_hashes = (char **)NULL; ++ nat_t_setup_hashes(); + } + + /* Generate the NAT-T capability marker hashes. Executed only once. */ +@@ -89,7 +89,7 @@ + nat_t_setup_hashes(void) + { + struct hash *hash; +- int n = sizeof isakmp_nat_t_cap_text / sizeof isakmp_nat_t_cap_text[0]; ++ int n = NUMNATTCAP; + int i; + + /* The draft says to use MD5. */ +@@ -100,56 +100,49 @@ + "could not find MD5 hash structure!"); + return -1; + } +- nat_t_hashsize = hash->hashsize; + +- /* Allocate one more than is necessary, i.e NULL terminated. */ +- nat_t_hashes = (char **)calloc((size_t)(n + 1), sizeof(char *)); +- if (!nat_t_hashes) { +- log_error("nat_t_setup_hashes: calloc (%lu,%lu) failed", +- (unsigned long)n, (unsigned long)sizeof(char *)); +- return -1; +- } +- +- /* Populate with hashes. */ ++ /* Populate isakmp_nat_t_cap with hashes. */ + for (i = 0; i < n; i++) { +- nat_t_hashes[i] = (char *)malloc(nat_t_hashsize); +- if (!nat_t_hashes[i]) { ++ isakmp_nat_t_cap[i].hashsize = hash->hashsize; ++ isakmp_nat_t_cap[i].hash = (char *)malloc(hash->hashsize); ++ if (!isakmp_nat_t_cap[i].hash) { + log_error("nat_t_setup_hashes: malloc (%lu) failed", +- (unsigned long)nat_t_hashsize); ++ (unsigned long)hash->hashsize); + goto errout; + } + + hash->Init(hash->ctx); + hash->Update(hash->ctx, +- (unsigned char *)isakmp_nat_t_cap_text[i], +- strlen(isakmp_nat_t_cap_text[i])); +- hash->Final(nat_t_hashes[i], hash->ctx); ++ (unsigned char *)isakmp_nat_t_cap[i].text, ++ strlen(isakmp_nat_t_cap[i].text)); ++ hash->Final(isakmp_nat_t_cap[i].hash, hash->ctx); + + LOG_DBG((LOG_EXCHANGE, 50, "nat_t_setup_hashes: " +- "MD5(\"%s\") (%lu bytes)", isakmp_nat_t_cap_text[i], +- (unsigned long)nat_t_hashsize)); ++ "MD5(\"%s\") (%lu bytes)", isakmp_nat_t_cap[i].text, ++ (unsigned long)hash->hashsize)); + LOG_DBG_BUF((LOG_EXCHANGE, 50, "nat_t_setup_hashes", +- nat_t_hashes[i], nat_t_hashsize)); ++ isakmp_nat_t_cap[i].hash, hash->hashsize)); + } + + return 0; + +- errout: ++errout: + for (i = 0; i < n; i++) +- if (nat_t_hashes[i]) +- free(nat_t_hashes[i]); +- free(nat_t_hashes); +- nat_t_hashes = NULL; ++ if (isakmp_nat_t_cap[i].hash) ++ free(isakmp_nat_t_cap[i].hash); + return -1; + } + + /* Add one NAT-T VENDOR payload. */ + static int +-nat_t_add_vendor_payload(struct message *msg, char *hash) ++nat_t_add_vendor_payload(struct message *msg, struct nat_t_cap *cap) + { +- size_t buflen = nat_t_hashsize + ISAKMP_GEN_SZ; ++ size_t buflen = cap->hashsize + ISAKMP_GEN_SZ; + u_int8_t *buf; + ++ if (disable_nat_t) ++ return 0; ++ + buf = malloc(buflen); + if (!buf) { + log_error("nat_t_add_vendor_payload: malloc (%lu) failed", +@@ -158,12 +151,11 @@ + } + + SET_ISAKMP_GEN_LENGTH(buf, buflen); +- memcpy(buf + ISAKMP_VENDOR_ID_OFF, hash, nat_t_hashsize); ++ memcpy(buf + ISAKMP_VENDOR_ID_OFF, cap->hash, cap->hashsize); + if (message_add_payload(msg, ISAKMP_PAYLOAD_VENDOR, buf, buflen, 1)) { + free(buf); + return -1; + } +- + return 0; + } + +@@ -171,16 +163,14 @@ + int + nat_t_add_vendor_payloads(struct message *msg) + { +- int i = 0; ++ int i; + +- if (!nat_t_hashes) +- if (nat_t_setup_hashes()) +- return 0; /* XXX should this be an error? */ ++ if (disable_nat_t) ++ return 0; + +- while (nat_t_hashes[i]) +- if (nat_t_add_vendor_payload(msg, nat_t_hashes[i++])) ++ for (i = 0; i < NUMNATTCAP; i++) ++ if (nat_t_add_vendor_payload(msg, &isakmp_nat_t_cap[i])) + return -1; +- + return 0; + } + +@@ -192,36 +182,31 @@ + { + u_int8_t *pbuf = p->p; + size_t vlen; +- int i = 0; ++ int i; + +- /* Already checked? */ +- if (p->flags & PL_MARK || +- msg->exchange->flags & EXCHANGE_FLAG_NAT_T_CAP_PEER) ++ if (disable_nat_t) + return; + +- if (!nat_t_hashes) +- if (nat_t_setup_hashes()) +- return; +- + vlen = GET_ISAKMP_GEN_LENGTH(pbuf) - ISAKMP_GEN_SZ; +- if (vlen != nat_t_hashsize) { +- LOG_DBG((LOG_EXCHANGE, 50, "nat_t_check_vendor_payload: " +- "bad size %lu != %lu", (unsigned long)vlen, +- (unsigned long)nat_t_hashsize)); +- return; +- } + +- while (nat_t_hashes[i]) +- if (memcmp(nat_t_hashes[i++], pbuf + ISAKMP_GEN_SZ, ++ for (i = 0; i < NUMNATTCAP; i++) { ++ if (vlen != isakmp_nat_t_cap[i].hashsize) { ++ LOG_DBG((LOG_EXCHANGE, 50, "nat_t_check_vendor_payload: " ++ "bad size %lu != %lu", (unsigned long)vlen, ++ (unsigned long)isakmp_nat_t_cap[i].hashsize)); ++ continue; ++ } ++ if (memcmp(isakmp_nat_t_cap[i].hash, pbuf + ISAKMP_GEN_SZ, + vlen) == 0) { + /* This peer is NAT-T capable. */ + msg->exchange->flags |= EXCHANGE_FLAG_NAT_T_CAP_PEER; ++ msg->exchange->flags |= isakmp_nat_t_cap[i].flags; + LOG_DBG((LOG_EXCHANGE, 10, + "nat_t_check_vendor_payload: " + "NAT-T capable peer detected")); + p->flags |= PL_MARK; +- return; + } ++ } + + return; + } +@@ -233,10 +218,8 @@ + { + struct ipsec_exch *ie = (struct ipsec_exch *)msg->exchange->data; + struct hash *hash; +- struct prf *prf; + u_int8_t *res; + in_port_t port; +- int prf_type = PRF_HMAC; /* XXX */ + + hash = hash_get(ie->hash->type); + if (hash == NULL) { +@@ -244,31 +227,25 @@ + return NULL; + } + +- prf = prf_alloc(prf_type, hash->type, msg->exchange->cookies, +- ISAKMP_HDR_COOKIES_LEN); +- if(!prf) { +- log_print("nat_t_generate_nat_d_hash: prf_alloc failed"); +- return NULL; +- } ++ *hashlen = hash->hashsize; + +- *hashlen = prf->blocksize; + res = (u_int8_t *)malloc((unsigned long)*hashlen); + if (!res) { + log_print("nat_t_generate_nat_d_hash: malloc (%lu) failed", + (unsigned long)*hashlen); +- prf_free(prf); + *hashlen = 0; + return NULL; + } + + port = sockaddr_port(sa); +- memset(res, 0, *hashlen); +- +- prf->Update(prf->prfctx, sockaddr_addrdata(sa), sockaddr_addrlen(sa)); +- prf->Update(prf->prfctx, (unsigned char *)&port, sizeof port); +- prf->Final(res, prf->prfctx); +- prf_free (prf); ++ bzero(res, *hashlen); + ++ hash->Init(hash->ctx); ++ hash->Update(hash->ctx, msg->exchange->cookies, ++ sizeof msg->exchange->cookies); ++ hash->Update(hash->ctx, sockaddr_addrdata(sa), sockaddr_addrlen(sa)); ++ hash->Update(hash->ctx, (unsigned char *)&port, sizeof port); ++ hash->Final(res, hash->ctx); + return res; + } + +@@ -276,6 +253,7 @@ + static int + nat_t_add_nat_d(struct message *msg, struct sockaddr *sa) + { ++ int ret; + u_int8_t *hbuf, *buf; + size_t hbuflen, buflen; + +@@ -298,11 +276,19 @@ + memcpy(buf + ISAKMP_NAT_D_DATA_OFF, hbuf, hbuflen); + free(hbuf); + +- if (message_add_payload(msg, ISAKMP_PAYLOAD_NAT_D, buf, buflen, 1)) { ++ if (msg->exchange->flags & EXCHANGE_FLAG_NAT_T_RFC) ++ ret = message_add_payload(msg, ISAKMP_PAYLOAD_NAT_D, buf, ++ buflen, 1); ++ else if (msg->exchange->flags & EXCHANGE_FLAG_NAT_T_DRAFT) ++ ret = message_add_payload(msg, ISAKMP_PAYLOAD_NAT_D_DRAFT, ++ buf, buflen, 1); ++ else ++ ret = -1; ++ ++ if (ret) { + free(buf); + return -1; + } +- + return 0; + } + +@@ -312,14 +298,14 @@ + { + struct sockaddr *sa; + +- msg->transport->vtbl->get_src(msg->transport, &sa); ++ /* Remote address first. */ ++ msg->transport->vtbl->get_dst(msg->transport, &sa); + if (nat_t_add_nat_d(msg, sa)) + return -1; + +- msg->transport->vtbl->get_dst(msg->transport, &sa); ++ msg->transport->vtbl->get_src(msg->transport, &sa); + if (nat_t_add_nat_d(msg, sa)) + return -1; +- + return 0; + } + +@@ -336,8 +322,8 @@ + * If there are no NAT-D payloads in the message, return "found" + * as this will avoid NAT-T (see nat_t_exchange_check_nat_d()). + */ +- p = payload_first(msg, ISAKMP_PAYLOAD_NAT_D); +- if (!p) ++ if ((p = payload_first(msg, ISAKMP_PAYLOAD_NAT_D_DRAFT)) == NULL && ++ (p = payload_first(msg, ISAKMP_PAYLOAD_NAT_D)) == NULL) + return 1; + + hbuf = nat_t_generate_nat_d_hash(msg, sa, &hbuflen); +--- isakmpd-20041012.orig/udp_encap.c ++++ isakmpd-20041012/udp_encap.c +@@ -61,6 +61,11 @@ + + #define UDP_SIZE 65536 + ++#if defined(USE_NAT_TRAVERSAL) && defined (LINUX_IPSEC) ++#include <linux/socket.h> ++#include <linux/udp.h> ++#endif ++ + /* If a system doesn't have SO_REUSEPORT, SO_REUSEADDR will have to do. */ + #ifndef SO_REUSEPORT + #define SO_REUSEPORT SO_REUSEADDR +@@ -134,6 +139,18 @@ + if (sysdep_cleartext(s, laddr->sa_family) == -1) + goto err; + ++#if defined(USE_NAT_TRAVERSAL) && defined (LINUX_IPSEC) ++ { ++#ifndef SOL_UDP ++#define SOL_UDP 17 ++#endif ++ int option = UDP_ENCAP_ESPINUDP; ++ if(setsockopt(s, SOL_UDP, UDP_ENCAP, &option, ++ sizeof (option)) < 0) ++ goto err; ++ } ++#endif ++ + /* Wildcard address ? */ + switch (laddr->sa_family) { + case AF_INET: +--- isakmpd-20041012.orig/apps/Makefile ++++ isakmpd-20041012/apps/Makefile +@@ -31,4 +31,4 @@ + + SUBDIR= certpatch + +-.include <bsd.subdir.mk> ++#.include <bsd.subdir.mk> +--- isakmpd-20041012.orig/apps/certpatch/GNUmakefile ++++ isakmpd-20041012/apps/certpatch/GNUmakefile +@@ -0,0 +1,55 @@ ++# $OpenBSD: Makefile,v 1.7 2003/06/03 14:35:00 ho Exp $ ++# $EOM: Makefile,v 1.6 2000/03/28 21:22:06 ho Exp $ ++ ++# ++# Copyright (c) 1999 Niels Provos. All rights reserved. ++# Copyright (c) 2001 Niklas Hallqvist. All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions ++# are met: ++# 1. Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# 2. Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in the ++# documentation and/or other materials provided with the distribution. ++# ++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++# ++ ++# ++# This code was written under funding by Ericsson Radio Systems. ++# ++ ++PROG= certpatch ++SRCS= certpatch.c ++BINDIR?= /usr/sbin ++TOPSRC= ${.CURDIR}../.. ++TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f- ++OS= linux ++FEATURES!= awk '/^FEATURES=/ { print $$0 }' ${.CURDIR}/../../Makefile | sed 's/FEATURES=.//' ++.PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ} ++CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall ++LDFLAGS+= -lcrypto -lssl -lgmp ++MAN= certpatch.8 ++ ++CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP ++LDADD+= -lgmp ++DPADD+= ${LIBGMP} ++ ++# Override LIBSYSDEPDIR definition from Makefile.sysdep ++LIBSYSDEPDIR= ${TOPSRC}/sysdep/common/libsysdep ++ ++all: ${PROG} ++ ++clean: ++ rm -f ${PROG} +--- isakmpd-20041012.orig/pf_key_v2.c ++++ isakmpd-20041012/pf_key_v2.c +@@ -1055,6 +1055,10 @@ + #endif + #if defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_UDPENCAP) + struct sadb_x_udpencap udpencap; ++#elif defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_NAT_T_TYPE) ++ struct sadb_x_nat_t_type nat_t_type; ++ struct sadb_x_nat_t_port nat_t_sport; ++ struct sadb_x_nat_t_port nat_t_dport; + #endif + #ifdef USE_DEBUG + char *addr_str; +@@ -1273,10 +1277,15 @@ + log_print("pf_key_v2_set_spi: invalid proto %d", proto->proto); + goto cleanup; + } +- if (incoming) ++ if (incoming) { + sa->transport->vtbl->get_src(sa->transport, &dst); +- else ++ sa->transport->vtbl->get_dst(sa->transport, &src); ++ } ++ else { + sa->transport->vtbl->get_dst(sa->transport, &dst); ++ sa->transport->vtbl->get_src(sa->transport, &src); ++ } ++ + #ifdef KAME + msg.sadb_msg_seq = (incoming ? + pf_key_v2_seq_by_sa(proto->spi[incoming], sizeof ssa.sadb_sa_spi, +@@ -1319,12 +1328,13 @@ + ssa.sadb_sa_flags = 0; + #ifdef SADB_X_SAFLAGS_TUNNEL + if (iproto->encap_mode == IPSEC_ENCAP_TUNNEL || +- iproto->encap_mode == IPSEC_ENCAP_UDP_ENCAP_TUNNEL) ++ iproto->encap_mode == IPSEC_ENCAP_UDP_ENCAP_TUNNEL || ++ iproto->encap_mode == IPSEC_ENCAP_UDP_ENCAP_TUNNEL_DRAFT) + ssa.sadb_sa_flags = SADB_X_SAFLAGS_TUNNEL; + #endif + +-#if defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_UDPENCAP) + if (isakmp_sa->flags & SA_FLAG_NAT_T_ENABLE) { ++#if defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_UDPENCAP) + memset(&udpencap, 0, sizeof udpencap); + ssa.sadb_sa_flags |= SADB_X_SAFLAGS_UDPENCAP; + udpencap.sadb_x_udpencap_exttype = SADB_X_EXT_UDPENCAP; +@@ -1334,8 +1344,40 @@ + if (pf_key_v2_msg_add(update, (struct sadb_ext *)&udpencap, 0) + == -1) + goto cleanup; +- } ++#elif defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_NAT_T_TYPE) ++#ifndef UDP_ENCAP_ESPINUDP ++#define UDP_ENCAP_ESPINUDP 2 ++#endif ++ memset(&nat_t_type, 0, sizeof nat_t_type); ++ memset(&nat_t_sport, 0, sizeof nat_t_sport); ++ memset(&nat_t_dport, 0, sizeof nat_t_dport); ++ ++ /* type = draft-udp-encap-06 */ ++ nat_t_type.sadb_x_nat_t_type_len = sizeof nat_t_type / PF_KEY_V2_CHUNK; ++ nat_t_type.sadb_x_nat_t_type_exttype = SADB_X_EXT_NAT_T_TYPE; ++ nat_t_type.sadb_x_nat_t_type_type = UDP_ENCAP_ESPINUDP; ++ if(pf_key_v2_msg_add(update, (struct sadb_ext *)&nat_t_type, 0) == -1) ++ goto cleanup; ++ ++ /* source port */ ++ nat_t_sport.sadb_x_nat_t_port_len = sizeof nat_t_sport / ++ PF_KEY_V2_CHUNK; ++ nat_t_sport.sadb_x_nat_t_port_exttype = SADB_X_EXT_NAT_T_SPORT; ++ nat_t_sport.sadb_x_nat_t_port_port = sockaddr_port(src); ++ if(pf_key_v2_msg_add(update, (struct sadb_ext *)&nat_t_sport, 0) == -1) ++ goto cleanup; ++ ++ /* destination port */ ++ nat_t_dport.sadb_x_nat_t_port_len = sizeof nat_t_dport / ++ PF_KEY_V2_CHUNK; ++ nat_t_dport.sadb_x_nat_t_port_exttype = SADB_X_EXT_NAT_T_DPORT; ++ nat_t_dport.sadb_x_nat_t_port_port = sockaddr_port(dst); ++ if(pf_key_v2_msg_add(update, (struct sadb_ext *)&nat_t_dport, 0) == -1) ++ goto cleanup; ++ ++ /* original address (transport mode checksum missing info) goes here */ + #endif ++ } + + if (pf_key_v2_msg_add(update, (struct sadb_ext *)&ssa, 0) == -1) + goto cleanup; +@@ -1395,10 +1437,6 @@ + /* + * Setup the ADDRESS extensions. + */ +- if (incoming) +- sa->transport->vtbl->get_dst(sa->transport, &src); +- else +- sa->transport->vtbl->get_src(sa->transport, &src); + len = sizeof *addr + PF_KEY_V2_ROUND(sysdep_sa_len(src)); + addr = calloc(1, len); + if (!addr) +@@ -2167,7 +2205,7 @@ + pf_key_v2_msg_free(ret); + return -1; + +-#elif defined (SADB_X_SPDADD) && defined (SADB_X_SPDDELETE) ++#elif defined (SADB_X_SPDUPDATE) && defined (SADB_X_SPDDELETE) + struct sadb_msg msg; + struct sadb_x_policy *policy = 0; + struct sadb_x_ipsecrequest *ipsecrequest; +@@ -2181,7 +2219,7 @@ + struct sockaddr_in *ip4_sa; + struct sockaddr_in6 *ip6_sa; + +- msg.sadb_msg_type = delete ? SADB_X_SPDDELETE : SADB_X_SPDADD; ++ msg.sadb_msg_type = delete ? SADB_X_SPDDELETE : SADB_X_SPDUPDATE; + msg.sadb_msg_satype = SADB_SATYPE_UNSPEC; + msg.sadb_msg_seq = 0; + flow = pf_key_v2_msg_new(&msg, 0); +--- isakmpd-20041012.orig/isakmp_num.cst ++++ isakmpd-20041012/isakmp_num.cst +@@ -57,15 +57,18 @@ + KD 17 # RFC 3547, Key Download + SEQ 18 # RFC 3547, Sequence Number + POP 19 # RFC 3547, Proof of possession +- RESERVED_MIN 20 ++ NAT_D 20 # RFC 3947, NAT Discovery payload ++ NAT_OA 21 # RFC 3947, NAT Original Address payload ++ RESERVED_MIN 22 + RESERVED_MAX 127 + PRIVATE_MIN 128 + # XXX values from draft-ietf-ipsec-nat-t-ike-01,02,03. Later drafts specify + # XXX NAT_D as payload 15 and NAT_OA as 16, but these are allocated by RFC + # XXX 3547 as seen above. +- NAT_D 130 # NAT Discovery payload +- NAT_OA 131 # NAT Original Address payload ++ NAT_D_DRAFT 130 # NAT Discovery payload ++ NAT_OA_DRAFT 131 # NAT Original Address payload + PRIVATE_MAX 255 ++ MAX 255 + . + + # ISAKMP exchange types. +--- isakmpd-20041012.orig/ipsec_num.cst ++++ isakmpd-20041012/ipsec_num.cst +@@ -62,10 +62,10 @@ + IPSEC_ENCAP + TUNNEL 1 + TRANSPORT 2 +- FUTURE_UDP_ENCAP_TUNNEL 3 # XXX Not yet assigned +- FUTURE_UDP_ENCAP_TRANSPORT 4 # XXX Not yet assigned +- UDP_ENCAP_TUNNEL 61443 # draft-ietf-ipsec-nat-t-ike +- UDP_ENCAP_TRANSPORT 61443 # draft-ietf-ipsec-nat-t-ike ++ UDP_ENCAP_TUNNEL 3 ++ UDP_ENCAP_TRANSPORT 4 ++ UDP_ENCAP_TUNNEL_DRAFT 61443 # draft-ietf-ipsec-nat-t-ike ++ UDP_ENCAP_TRANSPORT_DRAFT 61443 # draft-ietf-ipsec-nat-t-ike + . + + # IPSEC authentication algorithm. +--- isakmpd-20041012.orig/nat_traversal.h ++++ isakmpd-20041012/nat_traversal.h +@@ -1,4 +1,4 @@ +-/* $OpenBSD: nat_traversal.h,v 1.2 2004/06/21 23:27:10 ho Exp $ */ ++/* $OpenBSD: nat_traversal.h,v 1.4 2005/07/25 15:03:47 hshoexer Exp $ */ + + /* + * Copyright (c) 2004 Håkan Olsson. All rights reserved. +@@ -27,6 +27,24 @@ + #ifndef _NAT_TRAVERSAL_H_ + #define _NAT_TRAVERSAL_H_ + ++#define VID_DRAFT_V2 0 ++#define VID_DRAFT_V2_N 1 ++#define VID_DRAFT_V3 2 ++#define VID_RFC3947 3 ++ ++struct nat_t_cap { ++ int id; ++ u_int32_t flags; ++ const char *text; ++ char *hash; ++ size_t hashsize; ++}; ++ ++/* ++ * Set if -T is given on the command line to disable NAT-T support. ++ */ ++extern int disable_nat_t; ++ + void nat_t_init(void); + int nat_t_add_vendor_payloads(struct message *); + void nat_t_check_vendor_payload(struct message *, struct payload *); +--- isakmpd-20041012.orig/message.c ++++ isakmpd-20041012/message.c +@@ -112,6 +112,7 @@ + message_validate_hash, message_validate_sig, message_validate_nonce, + message_validate_notify, message_validate_delete, + message_validate_vendor, message_validate_attribute, ++ message_validate_nat_d, message_validate_nat_oa, + message_validate_nat_d, message_validate_nat_oa + }; + +@@ -120,7 +121,7 @@ + isakmp_id_fld, isakmp_cert_fld, isakmp_certreq_fld, isakmp_hash_fld, + isakmp_sig_fld, isakmp_nonce_fld, isakmp_notify_fld, isakmp_delete_fld, + isakmp_vendor_fld, isakmp_attribute_fld, isakmp_nat_d_fld, +- isakmp_nat_oa_fld ++ isakmp_nat_oa_fld, isakmp_nat_d_fld, isakmp_nat_oa_fld + }; + + /* +@@ -138,7 +139,8 @@ + ISAKMP_PAYLOAD_SAK, ISAKMP_PAYLOAD_SAT, ISAKMP_PAYLOAD_KD, + ISAKMP_PAYLOAD_SEQ, ISAKMP_PAYLOAD_POP + #endif +- ISAKMP_PAYLOAD_NAT_D, ISAKMP_PAYLOAD_NAT_OA ++ ISAKMP_PAYLOAD_NAT_D, ISAKMP_PAYLOAD_NAT_OA, ++ ISAKMP_PAYLOAD_NAT_D_DRAFT, ISAKMP_PAYLOAD_NAT_OA_DRAFT + }; + + static u_int8_t payload_map[256]; +@@ -347,8 +349,8 @@ + } + /* Ignore most private payloads. */ + if (next >= ISAKMP_PAYLOAD_PRIVATE_MIN && +- next != ISAKMP_PAYLOAD_NAT_D && +- next != ISAKMP_PAYLOAD_NAT_OA) { ++ next != ISAKMP_PAYLOAD_NAT_D_DRAFT && ++ next != ISAKMP_PAYLOAD_NAT_OA_DRAFT) { + LOG_DBG((LOG_MESSAGE, 30, "message_parse_payloads: " + "private next payload type %s in payload of " + "type %d ignored", +@@ -460,8 +462,10 @@ + return ISAKMP_ATTRIBUTE_SZ; + #if defined (USE_NAT_TRAVERSAL) + case ISAKMP_PAYLOAD_NAT_D: ++ case ISAKMP_PAYLOAD_NAT_D_DRAFT: + return ISAKMP_NAT_D_SZ; + case ISAKMP_PAYLOAD_NAT_OA: ++ case ISAKMP_PAYLOAD_NAT_OA_DRAFT: + return ISAKMP_NAT_OA_SZ; + #endif + /* Not yet supported and any other unknown payloads. */ +--- isakmpd-20041012.orig/policy.c ++++ isakmpd-20041012/policy.c +@@ -511,7 +511,10 @@ + break; + } + #if defined (USE_NAT_TRAVERSAL) +- else if (decode_16(value) == IPSEC_ENCAP_UDP_ENCAP_TUNNEL) ++ else if (decode_16(value) == ++ IPSEC_ENCAP_UDP_ENCAP_TUNNEL || ++ decode_16(value) == ++ IPSEC_ENCAP_UDP_ENCAP_TUNNEL_DRAFT) + switch (proto->proto) { + case IPSEC_PROTO_IPSEC_AH: + ah_encapsulation = "udp-encap-tunnel"; +@@ -1932,7 +1935,7 @@ + void + policy_init(void) + { +- char *ptr, *policy_file; ++ char *ptr, *policy_file, *use_keynote; + char **asserts; + size_t sz, len; + int fd, i; +@@ -1940,10 +1943,11 @@ + LOG_DBG((LOG_POLICY, 30, "policy_init: initializing")); + + /* Do we want to use the policy modules? */ +- if (ignore_policy || +- strncmp("yes", conf_get_str("General", "Use-Keynote"), 3)) +- return; +- ++ use_keynote = conf_get_str("General", "Use-Keynote"); ++ if (ignore_policy || ++ (use_keynote && strncmp("yes", use_keynote, 3))) ++ return; ++ + /* Get policy file from configuration. */ + policy_file = conf_get_str("General", "Policy-file"); + if (!policy_file) +--- isakmpd-20041012.orig/ike_phase_1.c ++++ isakmpd-20041012/ike_phase_1.c +@@ -1040,9 +1040,9 @@ + + /* Compare expected/desired and received remote ID */ + if (bcmp(rid, payload->p + ISAKMP_ID_DATA_OFF, sz)) { +- free(rid); + log_print("ike_phase_1_recv_ID: " +- "received remote ID other than expected %s", p); ++ "received remote ID other than expected %s - %s", p, payload->p); ++ free(rid); + return -1; + } + free(rid); +--- isakmpd-20041012.orig/x509.c ++++ isakmpd-20041012/x509.c +@@ -910,7 +910,11 @@ + X509_STORE_CTX_init(&csc, x509_cas, cert, NULL); + #if OPENSSL_VERSION_NUMBER >= 0x00907000L + /* XXX See comment in x509_read_crls_from_dir. */ ++#if OPENSSL_VERSION_NUMBER >= 0x00908000L ++ if (x509_cas->param->flags & X509_V_FLAG_CRL_CHECK) { ++#else + if (x509_cas->flags & X509_V_FLAG_CRL_CHECK) { ++#endif + X509_STORE_CTX_set_flags(&csc, X509_V_FLAG_CRL_CHECK); + X509_STORE_CTX_set_flags(&csc, X509_V_FLAG_CRL_CHECK_ALL); + } +--- isakmpd-20041012.orig/sysdep/linux/sysdep.c ++++ isakmpd-20041012/sysdep/linux/sysdep.c +@@ -169,22 +169,22 @@ + return 0; + + if (!(af == AF_INET || af == AF_INET6)) +- { ++ { + log_print ("sysdep_cleartext: unsupported protocol family %d", af); + return -1; + } + + if (setsockopt (fd, af == AF_INET ? IPPROTO_IP : IPPROTO_IPV6, +- af == AF_INET ? IP_IPSEC_POLICY : IPV6_IPSEC_POLICY, +- &pol_in, sizeof pol_in) < 0 || ++ af == AF_INET ? IP_IPSEC_POLICY : IPV6_IPSEC_POLICY, ++ &pol_in, sizeof pol_in) < 0 || + setsockopt (fd, af == AF_INET ? IPPROTO_IP : IPPROTO_IPV6, +- af == AF_INET ? IP_IPSEC_POLICY : IPV6_IPSEC_POLICY, +- &pol_out, sizeof pol_out) < 0) +- { ++ af == AF_INET ? IP_IPSEC_POLICY : IPV6_IPSEC_POLICY, ++ &pol_out, sizeof pol_out) < 0) ++ { + log_error ("sysdep_cleartext: " +- "setsockopt (%d, IPPROTO_IP%s, IP%s_IPSEC_POLICY, ...) " +- "failed", fd, af == AF_INET ? "" : "V6", +- af == AF_INET ? "" : "V6"); ++ "setsockopt (%d, IPPROTO_IP%s, IP%s_IPSEC_POLICY, ...) " ++ "failed", fd, af == AF_INET ? "" : "V6", ++ af == AF_INET ? "" : "V6"); + return -1; + } + return 0; +--- isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep ++++ isakmpd-20041012/sysdep/linux/GNUmakefile.sysdep +@@ -33,13 +33,13 @@ + LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} + DPADD+= ${LIBGMP} ${LIBSYSDEP} + +-CFLAGS+= -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ +- -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP \ +- -I/usr/src/linux/include -I${.CURDIR}/sysdep/common \ ++CFLAGS+= -DHAVE_GETNAMEINFO -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ ++ -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP -DUSE_AES \ ++ -I${.CURDIR}/sysdep/linux/include -I${.CURDIR}/sysdep/common \ + -I/usr/include/openssl + + FEATURES= debug tripledes blowfish cast ec aggressive x509 policy +-FEATURES+= des aes ++FEATURES+= dpd nat_traversal isakmp_cfg des aes + + IPSEC_SRCS= pf_key_v2.c + IPSEC_CFLAGS= -DUSE_PF_KEY_V2 +@@ -51,7 +51,7 @@ + # hack libsysdep.a dependenc + ${LIBSYSDEPDIR}/.depend ${LIBSYSDEP}: + cd ${LIBSYSDEPDIR} && \ +- ${MAKE} --no-print-directory ${MAKEFLAGS} \ ++ ${MAKE} --no-print-directory \ + CFLAGS="${CFLAGS}" MKDEP="${MKDEP}" ${MAKECMDGOALS} + + ifeq ($(findstring clean,$(MAKECMDGOALS)),clean) +--- isakmpd-20041012.orig/sysdep/linux/include/bitstring.h ++++ isakmpd-20041012/sysdep/linux/include/bitstring.h +@@ -0,0 +1,132 @@ ++/* $OpenBSD: bitstring.h,v 1.4 2002/06/19 02:50:10 millert Exp $ */ ++/* $NetBSD: bitstring.h,v 1.5 1997/05/14 15:49:55 pk Exp $ */ ++ ++/* ++ * Copyright (c) 1989, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * This code is derived from software contributed to Berkeley by ++ * Paul Vixie. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. All advertising materials mentioning features or use of this software ++ * must display the following acknowledgement: ++ * This product includes software developed by the University of ++ * California, Berkeley and its contributors. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 ++ */ ++ ++#ifndef _BITSTRING_H_ ++#define _BITSTRING_H_ ++ ++/* modified for SV/AT and bitstring bugfix by M.R.Murphy, 11oct91 ++ * bitstr_size changed gratuitously, but shorter ++ * bit_alloc spelling error fixed ++ * the following were efficient, but didn't work, they've been made to ++ * work, but are no longer as efficient :-) ++ * bit_nclear, bit_nset, bit_ffc, bit_ffs ++ */ ++typedef unsigned char bitstr_t; ++ ++/* internal macros */ ++ /* byte of the bitstring bit is in */ ++#define _bit_byte(bit) \ ++ ((bit) >> 3) ++ ++ /* mask for the bit within its byte */ ++#define _bit_mask(bit) \ ++ (1 << ((bit)&0x7)) ++ ++/* external macros */ ++ /* bytes in a bitstring of nbits bits */ ++#define bitstr_size(nbits) \ ++ (((nbits) + 7) >> 3) ++ ++ /* allocate a bitstring */ ++#define bit_alloc(nbits) \ ++ (bitstr_t *)calloc((size_t)bitstr_size(nbits), sizeof(bitstr_t)) ++ ++ /* allocate a bitstring on the stack */ ++#define bit_decl(name, nbits) \ ++ ((name)[bitstr_size(nbits)]) ++ ++ /* is bit N of bitstring name set? */ ++#define bit_test(name, bit) \ ++ ((name)[_bit_byte(bit)] & _bit_mask(bit)) ++ ++ /* set bit N of bitstring name */ ++#define bit_set(name, bit) \ ++ ((name)[_bit_byte(bit)] |= _bit_mask(bit)) ++ ++ /* clear bit N of bitstring name */ ++#define bit_clear(name, bit) \ ++ ((name)[_bit_byte(bit)] &= ~_bit_mask(bit)) ++ ++ /* clear bits start ... stop in bitstring */ ++#define bit_nclear(name, start, stop) do { \ ++ register bitstr_t *_name = name; \ ++ register int _start = start, _stop = stop; \ ++ while (_start <= _stop) { \ ++ bit_clear(_name, _start); \ ++ _start++; \ ++ } \ ++} while(0) ++ ++ /* set bits start ... stop in bitstring */ ++#define bit_nset(name, start, stop) do { \ ++ register bitstr_t *_name = name; \ ++ register int _start = start, _stop = stop; \ ++ while (_start <= _stop) { \ ++ bit_set(_name, _start); \ ++ _start++; \ ++ } \ ++} while(0) ++ ++ /* find first bit clear in name */ ++#define bit_ffc(name, nbits, value) do { \ ++ register bitstr_t *_name = name; \ ++ register int _bit, _nbits = nbits, _value = -1; \ ++ for (_bit = 0; _bit < _nbits; ++_bit) \ ++ if (!bit_test(_name, _bit)) { \ ++ _value = _bit; \ ++ break; \ ++ } \ ++ *(value) = _value; \ ++} while(0) ++ ++ /* find first bit set in name */ ++#define bit_ffs(name, nbits, value) do { \ ++ register bitstr_t *_name = name; \ ++ register int _bit, _nbits = nbits, _value = -1; \ ++ for (_bit = 0; _bit < _nbits; ++_bit) \ ++ if (bit_test(_name, _bit)) { \ ++ _value = _bit; \ ++ break; \ ++ } \ ++ *(value) = _value; \ ++} while(0) ++ ++#endif /* !_BITSTRING_H_ */ +--- isakmpd-20041012.orig/sysdep/linux/include/sys/queue.h ++++ isakmpd-20041012/sysdep/linux/include/sys/queue.h +@@ -0,0 +1,453 @@ ++/* ++ * Copyright (c) 1991, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. All advertising materials mentioning features or use of this software ++ * must display the following acknowledgement: ++ * This product includes software developed by the University of ++ * California, Berkeley and its contributors. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * @(#)queue.h 8.5 (Berkeley) 8/20/94 ++ * $FreeBSD: src/sys/sys/queue.h,v 1.45 2001/12/11 11:49:58 sheldonh Exp $ ++ */ ++ ++#ifndef _SYS_QUEUE_H_ ++#define _SYS_QUEUE_H_ ++ ++//#include <machine/ansi.h> /* for __offsetof */ ++ ++/* ++ * This file defines four types of data structures: singly-linked lists, ++ * singly-linked tail queues, lists and tail queues. ++ * ++ * A singly-linked list is headed by a single forward pointer. The elements ++ * are singly linked for minimum space and pointer manipulation overhead at ++ * the expense of O(n) removal for arbitrary elements. New elements can be ++ * added to the list after an existing element or at the head of the list. ++ * Elements being removed from the head of the list should use the explicit ++ * macro for this purpose for optimum efficiency. A singly-linked list may ++ * only be traversed in the forward direction. Singly-linked lists are ideal ++ * for applications with large datasets and few or no removals or for ++ * implementing a LIFO queue. ++ * ++ * A singly-linked tail queue is headed by a pair of pointers, one to the ++ * head of the list and the other to the tail of the list. The elements are ++ * singly linked for minimum space and pointer manipulation overhead at the ++ * expense of O(n) removal for arbitrary elements. New elements can be added ++ * to the list after an existing element, at the head of the list, or at the ++ * end of the list. Elements being removed from the head of the tail queue ++ * should use the explicit macro for this purpose for optimum efficiency. ++ * A singly-linked tail queue may only be traversed in the forward direction. ++ * Singly-linked tail queues are ideal for applications with large datasets ++ * and few or no removals or for implementing a FIFO queue. ++ * ++ * A list is headed by a single forward pointer (or an array of forward ++ * pointers for a hash table header). The elements are doubly linked ++ * so that an arbitrary element can be removed without a need to ++ * traverse the list. New elements can be added to the list before ++ * or after an existing element or at the head of the list. A list ++ * may only be traversed in the forward direction. ++ * ++ * A tail queue is headed by a pair of pointers, one to the head of the ++ * list and the other to the tail of the list. The elements are doubly ++ * linked so that an arbitrary element can be removed without a need to ++ * traverse the list. New elements can be added to the list before or ++ * after an existing element, at the head of the list, or at the end of ++ * the list. A tail queue may be traversed in either direction. ++ * ++ * For details on the use of these macros, see the queue(3) manual page. ++ * ++ * ++ * SLIST LIST STAILQ TAILQ ++ * _HEAD + + + + ++ * _HEAD_INITIALIZER + + + + ++ * _ENTRY + + + + ++ * _INIT + + + + ++ * _EMPTY + + + + ++ * _FIRST + + + + ++ * _NEXT + + + + ++ * _PREV - - - + ++ * _LAST - - + + ++ * _FOREACH + + + + ++ * _FOREACH_REVERSE - - - + ++ * _INSERT_HEAD + + + + ++ * _INSERT_BEFORE - + - + ++ * _INSERT_AFTER + + + + ++ * _INSERT_TAIL - - + + ++ * _REMOVE_HEAD + - + - ++ * _REMOVE + + + + ++ * ++ */ ++ ++/* ++ * Singly-linked List declarations. ++ */ ++#define SLIST_HEAD(name, type) \ ++struct name { \ ++ struct type *slh_first; /* first element */ \ ++} ++ ++#define SLIST_HEAD_INITIALIZER(head) \ ++ { NULL } ++ ++#define SLIST_ENTRY(type) \ ++struct { \ ++ struct type *sle_next; /* next element */ \ ++} ++ ++/* ++ * Singly-linked List functions. ++ */ ++#define SLIST_EMPTY(head) ((head)->slh_first == NULL) ++ ++#define SLIST_FIRST(head) ((head)->slh_first) ++ ++#define SLIST_FOREACH(var, head, field) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var); \ ++ (var) = SLIST_NEXT((var), field)) ++ ++#define SLIST_INIT(head) do { \ ++ SLIST_FIRST((head)) = NULL; \ ++} while (0) ++ ++#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ ++ SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \ ++ SLIST_NEXT((slistelm), field) = (elm); \ ++} while (0) ++ ++#define SLIST_INSERT_HEAD(head, elm, field) do { \ ++ SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \ ++ SLIST_FIRST((head)) = (elm); \ ++} while (0) ++ ++#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) ++ ++#define SLIST_REMOVE(head, elm, type, field) do { \ ++ if (SLIST_FIRST((head)) == (elm)) { \ ++ SLIST_REMOVE_HEAD((head), field); \ ++ } \ ++ else { \ ++ struct type *curelm = SLIST_FIRST((head)); \ ++ while (SLIST_NEXT(curelm, field) != (elm)) \ ++ curelm = SLIST_NEXT(curelm, field); \ ++ SLIST_NEXT(curelm, field) = \ ++ SLIST_NEXT(SLIST_NEXT(curelm, field), field); \ ++ } \ ++} while (0) ++ ++#define SLIST_REMOVE_HEAD(head, field) do { \ ++ SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \ ++} while (0) ++ ++/* ++ * Singly-linked Tail queue declarations. ++ */ ++#define STAILQ_HEAD(name, type) \ ++struct name { \ ++ struct type *stqh_first;/* first element */ \ ++ struct type **stqh_last;/* addr of last next element */ \ ++} ++ ++#define STAILQ_HEAD_INITIALIZER(head) \ ++ { NULL, &(head).stqh_first } ++ ++#define STAILQ_ENTRY(type) \ ++struct { \ ++ struct type *stqe_next; /* next element */ \ ++} ++ ++/* ++ * Singly-linked Tail queue functions. ++ */ ++#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) ++ ++#define STAILQ_FIRST(head) ((head)->stqh_first) ++ ++#define STAILQ_FOREACH(var, head, field) \ ++ for((var) = STAILQ_FIRST((head)); \ ++ (var); \ ++ (var) = STAILQ_NEXT((var), field)) ++ ++#define STAILQ_INIT(head) do { \ ++ STAILQ_FIRST((head)) = NULL; \ ++ (head)->stqh_last = &STAILQ_FIRST((head)); \ ++} while (0) ++ ++#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ ++ if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\ ++ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ ++ STAILQ_NEXT((tqelm), field) = (elm); \ ++} while (0) ++ ++#define STAILQ_INSERT_HEAD(head, elm, field) do { \ ++ if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \ ++ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ ++ STAILQ_FIRST((head)) = (elm); \ ++} while (0) ++ ++#define STAILQ_INSERT_TAIL(head, elm, field) do { \ ++ STAILQ_NEXT((elm), field) = NULL; \ ++ *(head)->stqh_last = (elm); \ ++ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ ++} while (0) ++ ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY(head) ? \ ++ NULL : \ ++ ((struct type *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ ++#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) ++ ++#define STAILQ_REMOVE(head, elm, type, field) do { \ ++ if (STAILQ_FIRST((head)) == (elm)) { \ ++ STAILQ_REMOVE_HEAD(head, field); \ ++ } \ ++ else { \ ++ struct type *curelm = STAILQ_FIRST((head)); \ ++ while (STAILQ_NEXT(curelm, field) != (elm)) \ ++ curelm = STAILQ_NEXT(curelm, field); \ ++ if ((STAILQ_NEXT(curelm, field) = \ ++ STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\ ++ (head)->stqh_last = &STAILQ_NEXT((curelm), field);\ ++ } \ ++} while (0) ++ ++#define STAILQ_REMOVE_HEAD(head, field) do { \ ++ if ((STAILQ_FIRST((head)) = \ ++ STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \ ++ (head)->stqh_last = &STAILQ_FIRST((head)); \ ++} while (0) ++ ++#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ ++ if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \ ++ (head)->stqh_last = &STAILQ_FIRST((head)); \ ++} while (0) ++ ++/* ++ * List declarations. ++ */ ++#define LIST_HEAD(name, type) \ ++struct name { \ ++ struct type *lh_first; /* first element */ \ ++} ++ ++#define LIST_HEAD_INITIALIZER(head) \ ++ { NULL } ++ ++#define LIST_ENTRY(type) \ ++struct { \ ++ struct type *le_next; /* next element */ \ ++ struct type **le_prev; /* address of previous next element */ \ ++} ++ ++/* ++ * List functions. ++ */ ++ ++#define LIST_EMPTY(head) ((head)->lh_first == NULL) ++ ++#define LIST_FIRST(head) ((head)->lh_first) ++ ++#define LIST_FOREACH(var, head, field) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var); \ ++ (var) = LIST_NEXT((var), field)) ++ ++#define LIST_INIT(head) do { \ ++ LIST_FIRST((head)) = NULL; \ ++} while (0) ++ ++#define LIST_INSERT_AFTER(listelm, elm, field) do { \ ++ if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\ ++ LIST_NEXT((listelm), field)->field.le_prev = \ ++ &LIST_NEXT((elm), field); \ ++ LIST_NEXT((listelm), field) = (elm); \ ++ (elm)->field.le_prev = &LIST_NEXT((listelm), field); \ ++} while (0) ++ ++#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ ++ (elm)->field.le_prev = (listelm)->field.le_prev; \ ++ LIST_NEXT((elm), field) = (listelm); \ ++ *(listelm)->field.le_prev = (elm); \ ++ (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ ++} while (0) ++ ++#define LIST_INSERT_HEAD(head, elm, field) do { \ ++ if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \ ++ LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\ ++ LIST_FIRST((head)) = (elm); \ ++ (elm)->field.le_prev = &LIST_FIRST((head)); \ ++} while (0) ++ ++#define LIST_NEXT(elm, field) ((elm)->field.le_next) ++ ++#define LIST_REMOVE(elm, field) do { \ ++ if (LIST_NEXT((elm), field) != NULL) \ ++ LIST_NEXT((elm), field)->field.le_prev = \ ++ (elm)->field.le_prev; \ ++ *(elm)->field.le_prev = LIST_NEXT((elm), field); \ ++} while (0) ++ ++/* ++ * Tail queue declarations. ++ */ ++#define TAILQ_HEAD(name, type) \ ++struct name { \ ++ struct type *tqh_first; /* first element */ \ ++ struct type **tqh_last; /* addr of last next element */ \ ++} ++ ++#define TAILQ_HEAD_INITIALIZER(head) \ ++ { NULL, &(head).tqh_first } ++ ++#define TAILQ_ENTRY(type) \ ++struct { \ ++ struct type *tqe_next; /* next element */ \ ++ struct type **tqe_prev; /* address of previous next element */ \ ++} ++ ++/* ++ * Tail queue functions. ++ */ ++#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) ++ ++#define TAILQ_FIRST(head) ((head)->tqh_first) ++ ++#define TAILQ_FOREACH(var, head, field) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var); \ ++ (var) = TAILQ_NEXT((var), field)) ++ ++#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var); \ ++ (var) = TAILQ_PREV((var), headname, field)) ++ ++#define TAILQ_INIT(head) do { \ ++ TAILQ_FIRST((head)) = NULL; \ ++ (head)->tqh_last = &TAILQ_FIRST((head)); \ ++} while (0) ++ ++#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ ++ if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\ ++ TAILQ_NEXT((elm), field)->field.tqe_prev = \ ++ &TAILQ_NEXT((elm), field); \ ++ else \ ++ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ ++ TAILQ_NEXT((listelm), field) = (elm); \ ++ (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ ++} while (0) ++ ++#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ ++ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ ++ TAILQ_NEXT((elm), field) = (listelm); \ ++ *(listelm)->field.tqe_prev = (elm); \ ++ (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ ++} while (0) ++ ++#define TAILQ_INSERT_HEAD(head, elm, field) do { \ ++ if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \ ++ TAILQ_FIRST((head))->field.tqe_prev = \ ++ &TAILQ_NEXT((elm), field); \ ++ else \ ++ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ ++ TAILQ_FIRST((head)) = (elm); \ ++ (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \ ++} while (0) ++ ++#define TAILQ_INSERT_TAIL(head, elm, field) do { \ ++ TAILQ_NEXT((elm), field) = NULL; \ ++ (elm)->field.tqe_prev = (head)->tqh_last; \ ++ *(head)->tqh_last = (elm); \ ++ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ ++} while (0) ++ ++#define TAILQ_LAST(head, headname) \ ++ (*(((struct headname *)((head)->tqh_last))->tqh_last)) ++ ++#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) ++ ++#define TAILQ_PREV(elm, headname, field) \ ++ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) ++ ++#define TAILQ_REMOVE(head, elm, field) do { \ ++ if ((TAILQ_NEXT((elm), field)) != NULL) \ ++ TAILQ_NEXT((elm), field)->field.tqe_prev = \ ++ (elm)->field.tqe_prev; \ ++ else \ ++ (head)->tqh_last = (elm)->field.tqe_prev; \ ++ *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ ++} while (0) ++ ++ ++#ifdef _KERNEL ++ ++/* ++ * XXX insque() and remque() are an old way of handling certain queues. ++ * They bogusly assumes that all queue heads look alike. ++ */ ++ ++struct quehead { ++ struct quehead *qh_link; ++ struct quehead *qh_rlink; ++}; ++ ++#ifdef __GNUC__ ++ ++static __inline void ++insque(void *a, void *b) ++{ ++ struct quehead *element = (struct quehead *)a, ++ *head = (struct quehead *)b; ++ ++ element->qh_link = head->qh_link; ++ element->qh_rlink = head; ++ head->qh_link = element; ++ element->qh_link->qh_rlink = element; ++} ++ ++static __inline void ++remque(void *a) ++{ ++ struct quehead *element = (struct quehead *)a; ++ ++ element->qh_link->qh_rlink = element->qh_rlink; ++ element->qh_rlink->qh_link = element->qh_link; ++ element->qh_rlink = 0; ++} ++ ++#else /* !__GNUC__ */ ++ ++void insque __P((void *a, void *b)); ++void remque __P((void *a)); ++ ++#endif /* __GNUC__ */ ++ ++#endif /* _KERNEL */ ++ ++#endif /* !_SYS_QUEUE_H_ */ +--- isakmpd-20041012.orig/sysdep/common/pcap.h ++++ isakmpd-20041012/sysdep/common/pcap.h +@@ -55,8 +55,13 @@ + u_int32_t linktype; /* data link type (DLT_*) */ + }; + ++struct pcap_timeval { ++ int32_t tv_sec; /* seconds */ ++ int32_t tv_usec; /* microseconds */ ++}; ++ + struct pcap_pkthdr { +- struct timeval ts; /* time stamp */ ++ struct pcap_timeval ts; /* time stamp */ + u_int32_t caplen; /* length of portion present */ + u_int32_t len; /* length this packet (off wire) */ + }; +--- isakmpd-20041012.orig/sysdep/common/libsysdep/arc4random.c ++++ isakmpd-20041012/sysdep/common/libsysdep/arc4random.c +@@ -78,7 +78,7 @@ + static void + arc4_stir(struct arc4_stream *as) + { +- int fd; ++ int fd, i; + struct { + struct timeval tv; + u_int8_t rnd[128 - sizeof(struct timeval)]; +--- isakmpd-20041012.orig/x509v3.cnf ++++ isakmpd-20041012/x509v3.cnf +@@ -0,0 +1,26 @@ ++# default settings ++CERTPATHLEN = 1 ++CERTUSAGE = digitalSignature,keyCertSign ++CERTIP = 0.0.0.0 ++CERTFQDN = nohost.nodomain ++ ++# This section should be referenced when building an x509v3 CA ++# Certificate. ++# The default path length and the key usage can be overriden ++# modified by setting the CERTPATHLEN and CERTUSAGE environment ++# variables. ++[x509v3_CA] ++basicConstraints=critical,CA:true,pathlen:$ENV::CERTPATHLEN ++keyUsage=$ENV::CERTUSAGE ++ ++# This section should be referenced to add an IP Address ++# as an alternate subject name, needed by isakmpd ++# The address must be provided in the CERTIP environment variable ++[x509v3_IPAddr] ++subjectAltName=IP:$ENV::CERTIP ++ ++# This section should be referenced to add a FQDN hostname ++# as an alternate subject name, needed by isakmpd ++# The address must be provided in the CERTFQDN environment variable ++[x509v3_FQDN] ++subjectAltName=DNS:$ENV::CERTFQDN + diff --git a/openwrt/package/isakmpd/patches/020-standardize.patch b/openwrt/package/isakmpd/patches/020-standardize.patch new file mode 100644 index 00000000000..d3dfabf349d --- /dev/null +++ b/openwrt/package/isakmpd/patches/020-standardize.patch @@ -0,0 +1,59 @@ +diff -urN isakmpd/GNUmakefile isakmpd.new/GNUmakefile +--- isakmpd/GNUmakefile 2004-01-16 13:36:32.000000000 +0100 ++++ isakmpd.new/GNUmakefile 2006-09-03 17:33:03.000000000 +0200 +@@ -238,3 +238,16 @@ + + realcleandepend: + rm -f .depend tags ++ ++# Install rules ++install: install-bin install-man ++ ++install-bin: isakmpd ++ -mkdir -p $(DESTDIR)$(BINDIR) ++ $(INSTALL) $(INSTALL_OPTS) -m 755 isakmpd $(DESTDIR)$(BINDIR) ++ ++install-man: ++ -mkdir -p $(DESTDIR)$(MANDIR)/man8 ++ $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.8 $(DESTDIR)$(MANDIR)/man8 ++ -mkdir -p $(DESTDIR)$(MANDIR)/man5 ++ $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.conf.5 isakmpd.policy.5 $(DESTDIR)$(MANDIR)/man5 +diff -urN isakmpd/samples/Makefile isakmpd.new/samples/Makefile +--- isakmpd/samples/Makefile 2003-06-03 16:39:50.000000000 +0200 ++++ isakmpd.new/samples/Makefile 2006-09-03 17:07:24.000000000 +0200 +@@ -26,7 +26,7 @@ + # + + FILES= VPN-* policy singlehost-* +-TARGETDIR= /usr/share/ipsec/isakmpd ++TARGETDIR= /usr/share/isakmpd/samples + + # The mkdir below is for installation on OpenBSD pre 2.7 + install: + +diff -urN isakmp.old/sysdep/linux/GNUmakefile.sysdep isakmp.dev/sysdep/linux/GNUmakefile.sysdep +--- isakmp.old/sysdep/linux/GNUmakefile.sysdep 2006-09-07 13:49:20.000000000 +0200 ++++ isakmp.dev/sysdep/linux/GNUmakefile.sysdep 2006-09-07 13:51:41.000000000 +0200 +@@ -25,18 +25,18 @@ + # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + +-LIBGMP:= /usr/lib/libgmp.a +-LIBCRYPTO:= /usr/lib/libcrypto.a ++LIBGMP:= ++LIBCRYPTO:= -lcrypto + LIBSYSDEPDIR:= ${.CURDIR}/sysdep/common/libsysdep + LIBSYSDEP:= ${LIBSYSDEPDIR}/libsysdep.a + +-LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} ++LDADD+= -L$(STAGING_DIR)/usr/lib -lgmp ${LIBSYSDEP} ${LIBCRYPTO} + DPADD+= ${LIBGMP} ${LIBSYSDEP} + + CFLAGS+= -DHAVE_GETNAMEINFO -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ + -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP -DUSE_AES \ + -I${.CURDIR}/sysdep/linux/include -I${.CURDIR}/sysdep/common \ +- -I/usr/include/openssl ++ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/openssl -I$(LINUX_DIR)/include + + FEATURES= debug tripledes blowfish cast ec aggressive x509 policy + FEATURES+= dpd nat_traversal isakmp_cfg des aes diff --git a/openwrt/package/isakmpd/patches/02-openssl_hashes.patch b/openwrt/package/isakmpd/patches/030-openssl_hashes.patch similarity index 100% rename from openwrt/package/isakmpd/patches/02-openssl_hashes.patch rename to openwrt/package/isakmpd/patches/030-openssl_hashes.patch diff --git a/openwrt/package/isakmpd/patches/040-security_fix.patch b/openwrt/package/isakmpd/patches/040-security_fix.patch new file mode 100644 index 00000000000..9128880107d --- /dev/null +++ b/openwrt/package/isakmpd/patches/040-security_fix.patch @@ -0,0 +1,22 @@ +Index: sbin/isakmpd/ipsec.c +=================================================================== +RCS file: /cvs/src/sbin/isakmpd/ipsec.c,v +retrieving revision 1.122 +retrieving revision 1.122.2.1 +diff -u -p -r1.122 -r1.122.2.1 +--- isakmpd/ipsec.c 23 Sep 2005 14:44:03 -0000 1.122 ++++ isakmpd/ipsec.c 19 Aug 2006 20:23:28 -0000 1.122.2.1 +@@ -2076,9 +2076,10 @@ ipsec_proto_init(struct proto *proto, ch + { + struct ipsec_proto *iproto = proto->data; + +- if (proto->sa->phase == 2 && section) +- iproto->replay_window = conf_get_num(section, "ReplayWindow", +- DEFAULT_REPLAY_WINDOW); ++ if (proto->sa->phase == 2) ++ iproto->replay_window = section ? conf_get_num(section, ++ "ReplayWindow", DEFAULT_REPLAY_WINDOW) : ++ DEFAULT_REPLAY_WINDOW; + } + + /* From 2b318cea5fd5f76be38cd468c755860b1e591c77 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 7 Sep 2006 12:42:27 +0000 Subject: [PATCH 576/757] move gmp to buildroot-ng (required by isakmpd) SVN-Revision: 4769 --- openwrt/package/gmp/Makefile | 87 ++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 openwrt/package/gmp/Makefile diff --git a/openwrt/package/gmp/Makefile b/openwrt/package/gmp/Makefile new file mode 100644 index 00000000000..1e84b88d268 --- /dev/null +++ b/openwrt/package/gmp/Makefile @@ -0,0 +1,87 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gmp +PKG_VERSION:=4.1.4 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNU/gmp +PKG_MD5SUM:=0aa7d3b3f5b5ec5951e7dddd6f65e891 +PKG_CAT:=bzcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/libgmp + SECTION:=libs + CATEGORY:=Libraries + TITLE:=GNU multiprecision arithmetic library + DESCRIPTION:=GNU multiprecision arithmetic library. + URL:=http://www.swox.com/gmp/ +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -f config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CC="$(TARGET_CROSS)gcc" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + --enable-shared \ + --enable-static \ + ); +endef + +define Build/Compile + $(call Build/Compile/Default, DESTDIR="$(PKG_INSTALL_DIR)" all install) +endef + +define Package/libgmp/install + install -m0755 -d $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/ +endef + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/gmp* \ + $(STAGING_DIR)/usr/lib/libgmp.{a,so*} +endef + +$(eval $(call BuildPackage,libgmp)) From 4ea7de50302b3f33a9ad2bcbda984161d0f3023b Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 7 Sep 2006 12:48:22 +0000 Subject: [PATCH 577/757] add extra rebuild check for development libraries SVN-Revision: 4770 --- openwrt/include/package.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 515698d691d..42ffcfbb3ce 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -39,6 +39,10 @@ define Build/DefaultTargets touch $$@ ifdef Build/InstallDev + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed $(PKG_BUILD_DIR)),$(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif + $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/stampfiles $(call Build/InstallDev) From 365936799253ea63702369c36b4a27eb93767916 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 7 Sep 2006 16:48:03 +0000 Subject: [PATCH 578/757] don't run rebuild checks for dump and prereq SVN-Revision: 4771 --- openwrt/include/package.mk | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index 42ffcfbb3ce..bea0428129e 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -237,14 +237,16 @@ define BuildPackage $$(eval $$(call Build/DefaultTargets,$(1))) ifneq ($$(CONFIG_PACKAGE_$(1)),) - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$$(IPKG_$(1))) - _INFO+=$(subst $(TOPDIR)/,,$$(IPKG_$(1))) - $(PKG_BUILD_DIR)/.built: package-rebuild - endif - ifneq ($(MAKECMDGOALS),prereq) - ifneq ($$(_INFO),) - $$(info Rebuilding $$(_INFO)) + ifneq ($(DUMP),1) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$$(IPKG_$(1))) + _INFO+=$(subst $(TOPDIR)/,,$$(IPKG_$(1))) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif + + ifneq ($$(_INFO),) + $$(info Rebuilding $$(_INFO)) + endif endif endif endif From 2bf955dfaf9ad6ac742aaaa6fd24c2fcbc6aed04 Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Thu, 7 Sep 2006 16:50:27 +0000 Subject: [PATCH 579/757] add quotes to ipkg name in the rebuild check SVN-Revision: 4772 --- openwrt/include/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index bea0428129e..ef1fc48ec83 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -239,7 +239,7 @@ define BuildPackage ifneq ($$(CONFIG_PACKAGE_$(1)),) ifneq ($(MAKECMDGOALS),prereq) ifneq ($(DUMP),1) - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$$(IPKG_$(1))) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install '$$(IPKG_$(1))' '$(PKG_BUILD_DIR)'),$$(IPKG_$(1))) _INFO+=$(subst $(TOPDIR)/,,$$(IPKG_$(1))) $(PKG_BUILD_DIR)/.built: package-rebuild endif From 41c88e00922ded6c06f5b08b290fb1b620970573 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 7 Sep 2006 17:24:08 +0000 Subject: [PATCH 580/757] add missing dependancy SVN-Revision: 4773 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index fe10e07dd96..6df34ac771e 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -53,7 +53,7 @@ pkginfo-clean: FORCE .config.in: .pkginfo @./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ -.config: ./scripts/config/conf +.config: ./scripts/config/conf .config.in @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig @$< -D .config Config.in &> /dev/null From a2d6de33b5718850208eca17a3943ab373209831 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Thu, 7 Sep 2006 17:40:28 +0000 Subject: [PATCH 581/757] change more to less SVN-Revision: 4774 --- openwrt/package/base-files/default/etc/profile | 2 +- openwrt/package/busybox/config/miscutils/Config.in | 2 +- openwrt/package/busybox/config/util-linux/Config.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openwrt/package/base-files/default/etc/profile b/openwrt/package/base-files/default/etc/profile index c42ee4a895a..ae514b09246 100644 --- a/openwrt/package/base-files/default/etc/profile +++ b/openwrt/package/base-files/default/etc/profile @@ -4,7 +4,7 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin export PS1='\u@\h:\w\$ ' -[ -x /usr/bin/less ] || alias less=more +alias more=less [ -x /usr/bin/vim ] || alias vim=vi arp() { cat /proc/net/arp; } diff --git a/openwrt/package/busybox/config/miscutils/Config.in b/openwrt/package/busybox/config/miscutils/Config.in index f13d8ba0bc8..407503dc405 100644 --- a/openwrt/package/busybox/config/miscutils/Config.in +++ b/openwrt/package/busybox/config/miscutils/Config.in @@ -127,7 +127,7 @@ config BUSYBOX_CONFIG_LAST config BUSYBOX_CONFIG_LESS bool "less" - default n + default y help 'less' is a pager, meaning that it displays text files. It possesses a wide array of features, and is an improvement over 'more'. diff --git a/openwrt/package/busybox/config/util-linux/Config.in b/openwrt/package/busybox/config/util-linux/Config.in index 9081555ef4e..b7a8ae91f54 100644 --- a/openwrt/package/busybox/config/util-linux/Config.in +++ b/openwrt/package/busybox/config/util-linux/Config.in @@ -315,7 +315,7 @@ config BUSYBOX_CONFIG_FEATURE_MKSWAP_V0 config BUSYBOX_CONFIG_MORE bool "more" - default y + default n help more is a simple utility which allows you to read text one screen sized page at a time. If you want to read text that is larger than From f70d9decda9f62df9dbe39bcc3b0e92888218ec5 Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 10 Sep 2006 09:56:42 +0000 Subject: [PATCH 582/757] override default configure to use --target=host and --build=host (closes: #760) SVN-Revision: 4779 --- openwrt/toolchain/ext2fs/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/openwrt/toolchain/ext2fs/Makefile b/openwrt/toolchain/ext2fs/Makefile index 0bd24f8fa91..eebf7a2c88e 100644 --- a/openwrt/toolchain/ext2fs/Makefile +++ b/openwrt/toolchain/ext2fs/Makefile @@ -19,6 +19,27 @@ PKG_CAT:=zcat include $(INCLUDE_DIR)/host-build.mk +define Build/Configure + ( cd $(PKG_BUILD_DIR); \ + ./configure \ + --target=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + ) +endef + define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) all endef From 00c9327e778ff6ab4aa2952b34b019228d031fab Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 12 Sep 2006 00:31:37 +0000 Subject: [PATCH 583/757] allow the user to override the lcp echo interval in ppp network configurations SVN-Revision: 4780 --- openwrt/package/ppp/files/ppp.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrt/package/ppp/files/ppp.sh b/openwrt/package/ppp/files/ppp.sh index a162b973021..e6008f40c82 100644 --- a/openwrt/package/ppp/files/ppp.sh +++ b/openwrt/package/ppp/files/ppp.sh @@ -13,10 +13,13 @@ start_pppd() { config_get username "$cfg" username config_get password "$cfg" password config_get keepalive "$cfg" keepalive + interval="${keepalive%%*,}" + [ "$interval" != "$keepalive" ] || interval=5 + config_get demand "$cfg" demand [ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf /usr/sbin/pppd "$@" \ - ${keepalive:+lcp-echo-interval 5 lcp-echo-failure $keepalive} \ + ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive##,*}} \ ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \ usepeerdns \ defaultroute \ From 82962cacd0f3f81f4980faa2018c94dc2ffd3f7c Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Tue, 12 Sep 2006 00:34:46 +0000 Subject: [PATCH 584/757] allow spaces in the keepalive option SVN-Revision: 4781 --- openwrt/package/ppp/files/ppp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/package/ppp/files/ppp.sh b/openwrt/package/ppp/files/ppp.sh index e6008f40c82..51a19555e8b 100644 --- a/openwrt/package/ppp/files/ppp.sh +++ b/openwrt/package/ppp/files/ppp.sh @@ -13,13 +13,13 @@ start_pppd() { config_get username "$cfg" username config_get password "$cfg" password config_get keepalive "$cfg" keepalive - interval="${keepalive%%*,}" + interval="${keepalive%%*[, ]}" [ "$interval" != "$keepalive" ] || interval=5 config_get demand "$cfg" demand [ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf /usr/sbin/pppd "$@" \ - ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive##,*}} \ + ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive##[, ]*}} \ ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \ usepeerdns \ defaultroute \ From 025e9480cd1aaae874a4b10e1be32498431786cc Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Fri, 15 Sep 2006 16:43:41 +0000 Subject: [PATCH 585/757] enable UCLIBC_HAS_WORDEXP, fixes pcmcia-cs (and possibly others) on mini_fo SVN-Revision: 4792 --- openwrt/toolchain/uClibc/config/armeb | 2 +- openwrt/toolchain/uClibc/config/i386 | 2 +- openwrt/toolchain/uClibc/config/mips | 2 +- openwrt/toolchain/uClibc/config/mipsel | 2 +- openwrt/toolchain/uClibc/config/powerpc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openwrt/toolchain/uClibc/config/armeb b/openwrt/toolchain/uClibc/config/armeb index ad01dc6ccdf..fa796953f21 100644 --- a/openwrt/toolchain/uClibc/config/armeb +++ b/openwrt/toolchain/uClibc/config/armeb @@ -139,7 +139,7 @@ UCLIBC_HAS_GNU_GETOPT=y # Big and Tall # UCLIBC_HAS_REGEX=y -# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_WORDEXP=y UCLIBC_HAS_FTW=y UCLIBC_HAS_GLOB=y diff --git a/openwrt/toolchain/uClibc/config/i386 b/openwrt/toolchain/uClibc/config/i386 index e787c580d45..e258ffe9359 100644 --- a/openwrt/toolchain/uClibc/config/i386 +++ b/openwrt/toolchain/uClibc/config/i386 @@ -156,7 +156,7 @@ UCLIBC_HAS_GNU_GETOPT=y # Big and Tall # UCLIBC_HAS_REGEX=y -# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_WORDEXP=y UCLIBC_HAS_FTW=y UCLIBC_HAS_GLOB=y diff --git a/openwrt/toolchain/uClibc/config/mips b/openwrt/toolchain/uClibc/config/mips index 3f1f3a7f6a6..ac30b596485 100644 --- a/openwrt/toolchain/uClibc/config/mips +++ b/openwrt/toolchain/uClibc/config/mips @@ -141,7 +141,7 @@ UCLIBC_HAS_GNU_GETOPT=y # Big and Tall # UCLIBC_HAS_REGEX=y -# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_WORDEXP=y UCLIBC_HAS_FTW=y UCLIBC_HAS_GLOB=y diff --git a/openwrt/toolchain/uClibc/config/mipsel b/openwrt/toolchain/uClibc/config/mipsel index acdb2aa2733..7a959e2ec4a 100644 --- a/openwrt/toolchain/uClibc/config/mipsel +++ b/openwrt/toolchain/uClibc/config/mipsel @@ -141,7 +141,7 @@ UCLIBC_HAS_GNU_GETOPT=y # Big and Tall # UCLIBC_HAS_REGEX=y -# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_WORDEXP=y UCLIBC_HAS_FTW=y UCLIBC_HAS_GLOB=y diff --git a/openwrt/toolchain/uClibc/config/powerpc b/openwrt/toolchain/uClibc/config/powerpc index de1ffaab153..d54443a92bd 100644 --- a/openwrt/toolchain/uClibc/config/powerpc +++ b/openwrt/toolchain/uClibc/config/powerpc @@ -139,7 +139,7 @@ UCLIBC_HAS_GNU_GETOPT=y # Big and Tall # UCLIBC_HAS_REGEX=y -# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_WORDEXP=y UCLIBC_HAS_FTW=y UCLIBC_HAS_GLOB=y From 2938c90b9ffbe20c1158527aec926c5b2cf77ccc Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Fri, 15 Sep 2006 22:25:03 +0000 Subject: [PATCH 586/757] bring up loopback by default SVN-Revision: 4793 --- openwrt/package/base-files/default/etc/config/network | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openwrt/package/base-files/default/etc/config/network b/openwrt/package/base-files/default/etc/config/network index 60c2da12c5c..1d5ded3728d 100644 --- a/openwrt/package/base-files/default/etc/config/network +++ b/openwrt/package/base-files/default/etc/config/network @@ -1,3 +1,11 @@ +# Copyright (C) 2006 OpenWrt.org + +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + config interface lan option ifname eth0 option proto static From ee9d54589c7fa928e3d76fb8360ef5456899e51d Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Sat, 16 Sep 2006 15:40:22 +0000 Subject: [PATCH 587/757] Also use whiterussian patches with buildroot-ng SVN-Revision: 4795 --- .../openswan/patches/pluto-includes.patch | 12 + .../package/openswan/patches/scripts.patch | 227 ++++++++++++++++++ .../openswan/patches/use-dev-urandom.patch | 36 +++ 3 files changed, 275 insertions(+) create mode 100644 openwrt/package/openswan/patches/pluto-includes.patch create mode 100644 openwrt/package/openswan/patches/scripts.patch create mode 100644 openwrt/package/openswan/patches/use-dev-urandom.patch diff --git a/openwrt/package/openswan/patches/pluto-includes.patch b/openwrt/package/openswan/patches/pluto-includes.patch new file mode 100644 index 00000000000..8cd1398d4a9 --- /dev/null +++ b/openwrt/package/openswan/patches/pluto-includes.patch @@ -0,0 +1,12 @@ +diff -Nur openswan-2.4.0.orig/programs/pluto/Makefile openswan-2.4.0/programs/pluto/Makefile +--- openswan-2.4.0.orig/programs/pluto/Makefile 2005-08-12 03:12:38.000000000 +0200 ++++ openswan-2.4.0/programs/pluto/Makefile 2005-09-29 13:41:14.016377750 +0200 +@@ -271,7 +271,7 @@ + LIBSPLUTO+=$(HAVE_THREADS_LIBS) ${XAUTHPAM_LIBS} + LIBSPLUTO+=${CURL_LIBS} + LIBSPLUTO+=${EXTRA_CRYPTO_LIBS} +-LIBSPLUTO+= -lgmp -lresolv # -lefence ++LIBSPLUTO+=$(EXTRA_LIBS) -lgmp -lresolv # -lefence + + ifneq ($(LD_LIBRARY_PATH),) + LDFLAGS=-L$(LD_LIBRARY_PATH) diff --git a/openwrt/package/openswan/patches/scripts.patch b/openwrt/package/openswan/patches/scripts.patch new file mode 100644 index 00000000000..f43013e4d12 --- /dev/null +++ b/openwrt/package/openswan/patches/scripts.patch @@ -0,0 +1,227 @@ +diff -urN openswan-2.4.6/programs/loggerfix openswan-2.4.6.new/programs/loggerfix +--- openswan-2.4.6/programs/loggerfix 1970-01-01 01:00:00.000000000 +0100 ++++ openswan-2.4.6.new/programs/loggerfix 2006-08-22 15:55:14.000000000 +0200 +@@ -0,0 +1,5 @@ ++#!/bin/sh ++# use filename instead of /dev/null to log, but dont log to flash or ram ++# pref. log to nfs mount ++echo "$*" >> /dev/null ++exit 0 +diff -urN openswan-2.4.6/programs/look/look.in openswan-2.4.6.new/programs/look/look.in +--- openswan-2.4.6/programs/look/look.in 2005-08-18 16:10:09.000000000 +0200 ++++ openswan-2.4.6.new/programs/look/look.in 2006-08-22 15:43:14.000000000 +0200 +@@ -84,7 +84,7 @@ + then + pat="$pat|$defaultroutephys\$|$defaultroutevirt\$" + else +- for i in `echo "$IPSECinterfaces" | sed 's/=/ /'` ++ for i in `echo "$IPSECinterfaces" | tr '=' ' '` + do + pat="$pat|$i\$" + done +diff -urN openswan-2.4.6/programs/_plutorun/_plutorun.in openswan-2.4.6.new/programs/_plutorun/_plutorun.in +--- openswan-2.4.6/programs/_plutorun/_plutorun.in 2006-04-21 17:41:45.000000000 +0200 ++++ openswan-2.4.6.new/programs/_plutorun/_plutorun.in 2006-08-22 15:47:32.000000000 +0200 +@@ -147,7 +147,7 @@ + exit 1 + fi + else +- if test ! -w "`dirname $stderrlog`" ++ if test ! -w "`echo $stderrlog | sed -r 's/(^.*\/)(.*$)/\1/'`" + then + echo Cannot write to directory to create \"$stderrlog\". + exit 1 +diff -urN openswan-2.4.6/programs/_realsetup/_realsetup.in openswan-2.4.6.new/programs/_realsetup/_realsetup.in +--- openswan-2.4.6/programs/_realsetup/_realsetup.in 2006-05-05 20:49:45.000000000 +0200 ++++ openswan-2.4.6.new/programs/_realsetup/_realsetup.in 2006-08-22 15:48:13.000000000 +0200 +@@ -232,7 +232,7 @@ + + # misc pre-Pluto setup + +- perform test -d `dirname $subsyslock` "&&" touch $subsyslock ++ perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock "&&" rm -f $subsyslock + + if test " $IPSECforwardcontrol" = " yes" + then +diff -urN openswan-2.4.6/programs/send-pr/send-pr.in openswan-2.4.6.new/programs/send-pr/send-pr.in +--- openswan-2.4.6/programs/send-pr/send-pr.in 2005-04-18 01:04:46.000000000 +0200 ++++ openswan-2.4.6.new/programs/send-pr/send-pr.in 2006-08-22 15:51:09.000000000 +0200 +@@ -402,7 +402,7 @@ + else + if [ "$fieldname" != "Category" ] + then +- values=`${BINDIR}/query-pr --valid-values $fieldname | sed ':a;N;$!ba;s/\n/ /g' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'` ++ values=`${BINDIR}/query-pr --valid-values $fieldname | tr '\n' ' ' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'` + valslen=`echo "$values" | wc -c` + else + values="choose from a category listed above" +@@ -414,7 +414,7 @@ + else + desc="<${values} (one line)>"; + fi +- dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'` ++ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'` + echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL + fi + echo "${fmtname}${desc}" >> $file +@@ -425,7 +425,7 @@ + desc=" $default_val"; + else + desc=" <`${BINDIR}/query-pr --field-description $fieldname` (multiple lines)>"; +- dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'` ++ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'` + echo "s/^${dpat}//" >> $FIXFIL + fi + echo "${fmtname}" >> $file; +@@ -437,7 +437,7 @@ + desc="${default_val}" + else + desc="<`${BINDIR}/query-pr --field-description $fieldname` (one line)>" +- dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'` ++ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'` + echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL + fi + echo "${fmtname}${desc}" >> $file +diff -urN openswan-2.4.6/programs/setup/setup.in openswan-2.4.6.new/programs/setup/setup.in +--- openswan-2.4.6/programs/setup/setup.in 2005-07-25 21:17:03.000000000 +0200 ++++ openswan-2.4.6.new/programs/setup/setup.in 2006-08-22 15:52:25.000000000 +0200 +@@ -117,12 +117,21 @@ + # do it + case "$1" in + start|--start|stop|--stop|_autostop|_autostart) +- if test " `id -u`" != " 0" ++ if [ "x${USER}" != "xroot" ] + then + echo "permission denied (must be superuser)" | + logger -s -p $IPSECsyslog -t ipsec_setup 2>&1 + exit 1 + fi ++ # make sure all required directories exist ++ if [ ! -d /var/run/pluto ] ++ then ++ mkdir -p /var/run/pluto ++ fi ++ if [ ! -d /var/lock/subsys ] ++ then ++ mkdir -p /var/lock/subsys ++ fi + tmp=/var/run/pluto/ipsec_setup.st + outtmp=/var/run/pluto/ipsec_setup.out + ( +diff -urN openswan-2.4.6/programs/showhostkey/showhostkey.in openswan-2.4.6.new/programs/showhostkey/showhostkey.in +--- openswan-2.4.6/programs/showhostkey/showhostkey.in 2004-11-14 14:40:41.000000000 +0100 ++++ openswan-2.4.6.new/programs/showhostkey/showhostkey.in 2006-08-22 15:54:21.000000000 +0200 +@@ -63,7 +63,7 @@ + exit 1 + fi + +-host="`hostname --fqdn`" ++host="`cat /proc/sys/kernel/hostname`" + + awk ' BEGIN { + inkey = 0 +@@ -81,7 +81,7 @@ + os = "[ \t]*" + x = "[^ \t]+" + oc = "(#.*)?" +- suffix = ":" os "[rR][sS][aA]" os "{" os oc "$" ++ suffix = ":" os "[rR][sS][aA]" os "\0173" os oc "$" + if (id == "") { + pat = "^" suffix + printid = "default" +diff -urN openswan-2.4.6/programs/_startklips/_startklips.in openswan-2.4.6.new/programs/_startklips/_startklips.in +--- openswan-2.4.6/programs/_startklips/_startklips.in 2006-05-09 20:34:34.000000000 +0200 ++++ openswan-2.4.6.new/programs/_startklips/_startklips.in 2006-08-22 15:57:53.000000000 +0200 +@@ -265,12 +265,12 @@ + if test ! -f $ipsecversion && test ! -f $netkey && modprobe -qn ipsec + then + # statically compiled KLIPS/NETKEY not found; try to load the module +- modprobe ipsec ++ insmod ipsec + fi + + if test ! -f $ipsecversion && test ! -f $netkey + then +- modprobe -v af_key ++ insmod -v af_key + fi + + if test -f $netkey +@@ -278,25 +278,25 @@ + klips=false + if test -f $modules + then +- modprobe -qv ah4 +- modprobe -qv esp4 +- modprobe -qv ipcomp ++ insmod -qv ah4 ++ insmod -qv esp4 ++ insmod -qv ipcomp + # xfrm4_tunnel is needed by ipip and ipcomp +- modprobe -qv xfrm4_tunnel ++ insmod -qv xfrm4_tunnel + # xfrm_user contains netlink support for IPsec + modprobe -qv xfrm_user + if [ -n "`cat /proc/cpuinfo |grep Nehemiah`" ] + then + echo "VIA Nehemiah detected, probing for PadLock" +- modprobe -qv hw_random ++ insmod -qv hw_random + # padlock must load before aes module +- modprobe -qv padlock ++ insmod -qv padlock + fi + # load the most common ciphers/algo's +- modprobe -qv sha1 +- modprobe -qv md5 +- modprobe -qv des +- modprobe -qv aes ++ insmod -qv sha1 ++ insmod -qv md5 ++ insmod -qv des ++ insmod -qv aes + fi + fi + +@@ -312,10 +312,16 @@ + fi + unset MODPATH MODULECONF # no user overrides! + depmod -a >/dev/null 2>&1 +- modprobe -qv hw_random ++ insmod -qv hw_random + # padlock must load before aes module +- modprobe -qv padlock +- modprobe -v ipsec ++ insmod -qv padlock ++ if [ -f modprobe ] ++ then ++ modprobe -v ipsec ++ elif [ -f insmod ] ++ then ++ insmod ipsec ++ fi + fi + if test ! -f $ipsecversion + then +--- openswan-2.4.6/programs/starter/netkey.c 2004-12-01 08:31:26.000000000 +0100 ++++ openswan-2.4.6.new/programs/starter/netkey.c 2006-09-15 15:06:18.000000000 +0200 +@@ -75,7 +75,7 @@ + if (stat(PROC_MODULES,&stb)==0) { + unsetenv("MODPATH"); + unsetenv("MODULECONF"); +- system("depmod -a >/dev/null 2>&1 && modprobe xfrm4_tunnel esp4 ah4 af_key"); ++ system("depmod -a >/dev/null 2>&1 && insmod xfrm4_tunnel esp4 ah4 af_key"); + } + if (stat(PROC_NETKEY,&stb)==0) { + _netkey_module_loaded = 1; +--- openswan-2.4.6/programs/starter/klips.c 2004-01-21 02:35:29.000000000 +0100 ++++ openswan-2.4.6.new/programs/starter/klips.c 2006-09-15 15:05:37.000000000 +0200 +@@ -83,7 +83,7 @@ + if (stat(PROC_MODULES,&stb)==0) { + unsetenv("MODPATH"); + unsetenv("MODULECONF"); +- system("depmod -a >/dev/null 2>&1 && modprobe ipsec"); ++ system("depmod -a >/dev/null 2>&1 && insmod ipsec"); + } + if (stat(PROC_IPSECVERSION,&stb)==0) { + _klips_module_loaded = 1; diff --git a/openwrt/package/openswan/patches/use-dev-urandom.patch b/openwrt/package/openswan/patches/use-dev-urandom.patch new file mode 100644 index 00000000000..1a198845841 --- /dev/null +++ b/openwrt/package/openswan/patches/use-dev-urandom.patch @@ -0,0 +1,36 @@ +diff -urN openswan-2.3.1dr6.old/programs/ranbits/ranbits.c openswan-2.3.1dr6.dev/programs/ranbits/ranbits.c +--- openswan-2.3.1dr6.old/programs/ranbits/ranbits.c 2004-04-04 03:50:56.000000000 +0200 ++++ openswan-2.3.1dr6.dev/programs/ranbits/ranbits.c 2005-04-05 17:37:16.000000000 +0200 +@@ -29,7 +29,7 @@ + #include <openswan.h> + + #ifndef DEVICE +-#define DEVICE "/dev/random" ++#define DEVICE "/dev/urandom" + #endif + #ifndef QDEVICE + #define QDEVICE "/dev/urandom" +diff -urN openswan-2.3.1dr6.old/programs/rsasigkey/rsasigkey.c openswan-2.3.1dr6.dev/programs/rsasigkey/rsasigkey.c +--- openswan-2.3.1dr6.old/programs/rsasigkey/rsasigkey.c 2004-05-23 23:32:03.000000000 +0200 ++++ openswan-2.3.1dr6.dev/programs/rsasigkey/rsasigkey.c 2005-04-05 17:38:00.000000000 +0200 +@@ -31,7 +31,7 @@ + #include <gmp.h> + + #ifndef DEVICE +-#define DEVICE "/dev/random" ++#define DEVICE "/dev/urandom" + #endif + #ifndef MAXBITS + #define MAXBITS 20000 +diff -urN openswan-2.3.1dr6.old/programs/starter/files.h openswan-2.3.1dr6.dev/programs/starter/files.h +--- openswan-2.3.1dr6.old/programs/starter/files.h 2005-01-11 18:52:51.000000000 +0100 ++++ openswan-2.3.1dr6.dev/programs/starter/files.h 2005-04-05 17:38:16.000000000 +0200 +@@ -36,7 +36,7 @@ + + #define MY_PID_FILE "/var/run/pluto/ipsec-starter.pid" + +-#define DEV_RANDOM "/dev/random" ++#define DEV_RANDOM "/dev/urandom" + #define DEV_URANDOM "/dev/urandom" + + #define PROC_IPSECVERSION "/proc/net/ipsec_version" From d6e2ef72d9cedf4b1a4aa815f67666a43e52fcef Mon Sep 17 00:00:00 2001 From: Nicolas Thill <nico@openwrt.org> Date: Sun, 17 Sep 2006 19:42:54 +0000 Subject: [PATCH 588/757] mark isakmpd as broken, standardize Makefile. SVN-Revision: 4800 --- openwrt/package/isakmpd/Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/openwrt/package/isakmpd/Makefile b/openwrt/package/isakmpd/Makefile index 98cb36f2c2a..2dbd202b3db 100644 --- a/openwrt/package/isakmpd/Makefile +++ b/openwrt/package/isakmpd/Makefile @@ -24,12 +24,11 @@ include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/kernel.mk define Package/isakmpd -SECTION:=base -CATEGORY:=Network -DEPENDS:=@LINUX_2_6 +libopenssl +keynote +libgmp -TITLE:=IPsec management tools -DESCRIPTION:=IPsec management tools -URL:=http://isakmpd.sourceforge.net/ + SECTION:=base + CATEGORY:=Network + DEPENDS:=@BROKEN @LINUX_2_6 +libopenssl +keynote +libgmp + TITLE:=IPsec management tools + URL:=http://isakmpd.sourceforge.net/ endef define Build/Compile From 0a46af45c53a28b04b3824a0192d3a902ff88f21 Mon Sep 17 00:00:00 2001 From: Imre Kaloz <kaloz@openwrt.org> Date: Sun, 17 Sep 2006 20:29:38 +0000 Subject: [PATCH 589/757] change alsa to depend on usb support instead of pci SVN-Revision: 4801 --- openwrt/package/alsa/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/package/alsa/Makefile b/openwrt/package/alsa/Makefile index 9a745aa96bc..887404c0c20 100644 --- a/openwrt/package/alsa/Makefile +++ b/openwrt/package/alsa/Makefile @@ -33,7 +33,7 @@ endif define Package/kmod-alsa SECTION:=drivers CATEGORY:=Drivers -DEPENDS:=@PCI_SUPPORT +DEPENDS:=@USB_SUPPORT TITLE:=Advanced Linux Sound Architecture DESCRIPTION:=Advanced Linux Sound Architecture URL:=http://alsa-project.org/ From c50b37ed34c510574638bbc601dd2f8dfd74fd4d Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Mon, 18 Sep 2006 21:56:07 +0000 Subject: [PATCH 590/757] correct arguments to Build/Prepare/Default SVN-Revision: 4802 --- openwrt/include/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/include/package.mk b/openwrt/include/package.mk index ef1fc48ec83..396fae60f84 100644 --- a/openwrt/include/package.mk +++ b/openwrt/include/package.mk @@ -267,7 +267,7 @@ ifneq ($(strip $(PKG_CAT)),) endif define Build/Prepare - $(call Build/Prepare/Default) + $(call Build/Prepare/Default,) endef define Build/Configure/Default From e8e0fa8cc976b891e54a49055ecbb62f777cb312 Mon Sep 17 00:00:00 2001 From: Mike Baker <mbm@openwrt.org> Date: Wed, 20 Sep 2006 07:36:55 +0000 Subject: [PATCH 591/757] patch from ticket #787 SVN-Revision: 4803 --- .../patches/010-bcm47xx-cam_absent.patch | 42 +++++++++++++++++++ .../patches/010-bcm47xx-cam_absent.patch | 42 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 openwrt/target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch create mode 100644 openwrt/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch diff --git a/openwrt/target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch b/openwrt/target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch new file mode 100644 index 00000000000..1deffc54a3c --- /dev/null +++ b/openwrt/target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch @@ -0,0 +1,42 @@ +--- linux-2.4.32.orig/drivers/net/b44.h 2006-09-19 19:56:03.000000000 +0200 ++++ linux-2.4.32/drivers/net/b44.h 2006-09-19 19:58:01.000000000 +0200 +@@ -122,6 +122,7 @@ + #define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */ + #define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */ + #define RXCONFIG_RFILT 0x00000080 /* Reject Filter */ ++#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */ + #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */ + #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */ + #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */ +--- linux-2.4.32.orig/drivers/net/b44.c 2006-09-19 19:56:03.000000000 +0200 ++++ linux-2.4.32/drivers/net/b44.c 2006-09-19 20:08:22.000000000 +0200 +@@ -1301,6 +1301,7 @@ + { + struct b44 *bp = dev->priv; + struct sockaddr *addr = p; ++ u32 val; + + if (netif_running(dev)) + return -EBUSY; +@@ -1308,7 +1309,11 @@ + memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); + + spin_lock_irq(&bp->lock); +- __b44_set_mac_addr(bp); ++ ++ val = br32(B44_RXCONFIG); ++ if (!(val & RXCONFIG_CAM_ABSENT)) ++ __b44_set_mac_addr(bp); ++ + spin_unlock_irq(&bp->lock); + + return 0; +@@ -1488,7 +1493,7 @@ + + val = br32(B44_RXCONFIG); + val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI); +- if (dev->flags & IFF_PROMISC) { ++ if ((dev->flags & IFF_PROMISC) || (val & RXCONFIG_CAM_ABSENT)) { + val |= RXCONFIG_PROMISC; + bw32(B44_RXCONFIG, val); + } else { diff --git a/openwrt/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch b/openwrt/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch new file mode 100644 index 00000000000..51206296bc2 --- /dev/null +++ b/openwrt/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch @@ -0,0 +1,42 @@ +--- linux-2.6.17.orig/drivers/net/b44.h 2006-09-19 19:56:03.000000000 +0200 ++++ linux-2.6.17/drivers/net/b44.h 2006-09-19 19:58:01.000000000 +0200 +@@ -122,6 +122,7 @@ + #define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */ + #define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */ + #define RXCONFIG_RFILT 0x00000080 /* Reject Filter */ ++#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */ + #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */ + #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */ + #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */ +--- linux-2.6.17.orig/drivers/net/b44.c 2006-09-19 19:56:03.000000000 +0200 ++++ linux-2.6.17/drivers/net/b44.c 2006-09-19 20:08:22.000000000 +0200 +@@ -1435,6 +1435,7 @@ + { + struct b44 *bp = netdev_priv(dev); + struct sockaddr *addr = p; ++ u32 val; + + if (netif_running(dev)) + return -EBUSY; +@@ -1445,7 +1446,11 @@ + memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); + + spin_lock_irq(&bp->lock); +- __b44_set_mac_addr(bp); ++ ++ val = br32(bp, B44_RXCONFIG); ++ if (!(val & RXCONFIG_CAM_ABSENT)) ++ __b44_set_mac_addr(bp); ++ + spin_unlock_irq(&bp->lock); + + return 0; +@@ -1641,7 +1646,7 @@ + + val = br32(bp, B44_RXCONFIG); + val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI); +- if (dev->flags & IFF_PROMISC) { ++ if ((dev->flags & IFF_PROMISC) || (val & RXCONFIG_CAM_ABSENT)) { + val |= RXCONFIG_PROMISC; + bw32(bp, B44_RXCONFIG, val); + } else { From d8f946d533bfaec8001cbcfc3bbd4edcbb41a987 Mon Sep 17 00:00:00 2001 From: Florian Fainelli <florian@openwrt.org> Date: Wed, 20 Sep 2006 10:41:45 +0000 Subject: [PATCH 592/757] Fix amd64 compilation, does not break other architectures : ppc, x86 SVN-Revision: 4804 --- .../400-stdint_local_instead_of_host.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 openwrt/package/linux-atm/patches/400-stdint_local_instead_of_host.patch diff --git a/openwrt/package/linux-atm/patches/400-stdint_local_instead_of_host.patch b/openwrt/package/linux-atm/patches/400-stdint_local_instead_of_host.patch new file mode 100644 index 00000000000..5e9b3b65e3e --- /dev/null +++ b/openwrt/package/linux-atm/patches/400-stdint_local_instead_of_host.patch @@ -0,0 +1,20 @@ +Index: package/linux-atm/patches/400-stdint-local-instead-of-host.patch +=================================================================== +--- package/linux-atm/patches/400-stdint-local-instead-of-host.patch    (revision 0) ++++ package/linux-atm/patches/400-stdint-local-instead-of-host.patch    (revision 0) +@@ -0,0 +1,15 @@ ++--- linux-atm-2.4.1/src/include/stdint.h       2001-09-03 20:41:06.000000000 +0200 +++++ linux-atm-2.4.1/src/include/stdint.h.my    2006-08-26 22:08:41.000000000 +0200 ++@@ -4,11 +4,7 @@ ++ ++ #include <features.h> ++ ++-#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 ++- ++-#include "/usr/include/stdint.h" ++- ++-#elif __GLIBC__ >= 2 +++#if __GLIBC__ >= 2 ++ ++ /* Works for i386 and Alpha */ ++ From 0a827d3e0194dc5c039d3170f143ae197c3d4a9e Mon Sep 17 00:00:00 2001 From: Felix Fietkau <nbd@openwrt.org> Date: Wed, 20 Sep 2006 16:51:34 +0000 Subject: [PATCH 593/757] remove old junk from docs/, add some info about the network config format SVN-Revision: 4805 --- openwrt/docs/buildroot-documentation.html | 710 ------------------ .../docs/hardware/4g/accesscube/cpuinfo.txt | 11 - .../hardware/4g/accesscube/dmesg-2_4_27.txt | 86 --- openwrt/docs/hardware/4g/accesscube/info.txt | 21 - .../docs/hardware/4g/accesscube/lspci-vv.txt | 28 - openwrt/docs/hardware/4g/accesscube/pci.txt | 11 - openwrt/docs/hardware/README.txt | 6 - .../docs/hardware/asus/wl-500g/cpuinfo.txt | 18 - .../hardware/asus/wl-500g/dmesg-2_4_20.txt | 78 -- .../hardware/asus/wl-500g/dmesg-2_4_29.txt | 95 --- openwrt/docs/hardware/asus/wl-500g/info.txt | 21 - openwrt/docs/hardware/asus/wl-500g/nvram.txt | 81 -- openwrt/docs/hardware/asus/wl-500g/pci.txt | 52 -- openwrt/docs/hardware/asus/wl-500gd/cfe.txt | 31 - .../docs/hardware/asus/wl-500gd/cpuinfo.txt | 12 - .../hardware/asus/wl-500gd/dmesg-2_4_29.txt | 97 --- openwrt/docs/hardware/asus/wl-500gd/info.txt | 25 - openwrt/docs/hardware/asus/wl-500gd/nvram.txt | 360 --------- openwrt/docs/hardware/asus/wl-500gd/pci.txt | 64 -- .../hardware/buffalo/wbr2-g54/cpuinfo.txt | 12 - .../buffalo/wbr2-g54/dmesg-2_4_29.txt | 89 --- .../docs/hardware/buffalo/wbr2-g54/info.txt | 19 - .../docs/hardware/buffalo/wbr2-g54/nvram.txt | 100 --- .../docs/hardware/buffalo/wbr2-g54/pci.txt | 38 - .../hardware/buffalo/wla2-g54l/cpuinfo.txt | 11 - .../buffalo/wla2-g54l/dmesg-2_4_29.txt | 85 --- .../docs/hardware/buffalo/wla2-g54l/info.txt | 18 - .../docs/hardware/buffalo/wla2-g54l/nvram.txt | 455 ----------- .../docs/hardware/buffalo/wla2-g54l/pci.txt | 37 - .../hardware/linksys/wrt54g_v11/cpuinfo.txt | 16 - .../linksys/wrt54g_v11/dmesg-2_4_29.txt | 96 --- .../hardware/linksys/wrt54g_v11/ifconfig.txt | 54 -- .../docs/hardware/linksys/wrt54g_v11/info.txt | 23 - .../hardware/linksys/wrt54g_v11/lspci-vv.txt | 92 --- .../hardware/linksys/wrt54g_v11/nvram.txt | 88 --- .../docs/hardware/linksys/wrt54g_v11/pci.txt | 56 -- .../hardware/linksys/wrt54g_v20/cpuinfo.txt | 11 - .../linksys/wrt54g_v20/dmesg-2_4_29.txt | 97 --- .../hardware/linksys/wrt54g_v20/ifconfig.txt | 46 -- .../docs/hardware/linksys/wrt54g_v20/info.txt | 19 - .../hardware/linksys/wrt54g_v20/nvram.txt | 113 --- .../docs/hardware/linksys/wrt54g_v20/pci.txt | 37 - .../hardware/linksys/wrt54g_v22/cpuinfo.txt | 16 - .../linksys/wrt54g_v22/dmesg-2_4_29.txt | 117 --- .../hardware/linksys/wrt54g_v22/ifconfig.txt | 46 -- .../docs/hardware/linksys/wrt54g_v22/info.txt | 18 - .../hardware/linksys/wrt54g_v22/nvram.txt | 477 ------------ .../docs/hardware/linksys/wrt54g_v22/pci.txt | 37 - .../hardware/linksys/wrt54gs_v10/cpuinfo.txt | 16 - .../linksys/wrt54gs_v10/dmesg-2_4_29.txt | 88 --- .../hardware/linksys/wrt54gs_v10/ifconfig.txt | 45 -- .../hardware/linksys/wrt54gs_v10/info.txt | 18 - .../hardware/linksys/wrt54gs_v10/nvram.txt | 105 --- .../docs/hardware/linksys/wrt54gs_v10/pci.txt | 37 - .../hardware/linksys/wrt54gs_v11/cpuinfo.txt | 11 - .../linksys/wrt54gs_v11/dmesg-2_4_30.txt | 83 -- .../hardware/linksys/wrt54gs_v11/info.txt | 21 - .../hardware/linksys/wrt54gs_v11/nvram.txt | 94 --- .../docs/hardware/linksys/wrt54gs_v11/pci.txt | 37 - .../hardware/motorola/WR850Gv2/cpuinfo.txt | 16 - .../motorola/WR850Gv2/dmesg-2-4-29.txt | 97 --- .../hardware/motorola/WR850Gv2/ifconfig.txt | 39 - .../docs/hardware/motorola/WR850Gv2/nvram.txt | 52 -- .../docs/hardware/motorola/WR850Gv2/pci.txt | 37 - .../docs/hardware/soekris/net4801/cpuinfo.txt | 18 - .../hardware/soekris/net4801/dmesg-2.4.30.txt | 104 --- .../docs/hardware/soekris/net4801/info.txt | 19 - openwrt/docs/hardware/soekris/net4801/pci.txt | 40 - openwrt/docs/network.txt | 50 ++ openwrt/docs/stylesheet.css | 65 -- 70 files changed, 50 insertions(+), 5172 deletions(-) delete mode 100644 openwrt/docs/buildroot-documentation.html delete mode 100644 openwrt/docs/hardware/4g/accesscube/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/4g/accesscube/dmesg-2_4_27.txt delete mode 100644 openwrt/docs/hardware/4g/accesscube/info.txt delete mode 100644 openwrt/docs/hardware/4g/accesscube/lspci-vv.txt delete mode 100644 openwrt/docs/hardware/4g/accesscube/pci.txt delete mode 100644 openwrt/docs/hardware/README.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500g/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500g/dmesg-2_4_20.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500g/dmesg-2_4_29.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500g/info.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500g/nvram.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500g/pci.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500gd/cfe.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500gd/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500gd/dmesg-2_4_29.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500gd/info.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500gd/nvram.txt delete mode 100644 openwrt/docs/hardware/asus/wl-500gd/pci.txt delete mode 100644 openwrt/docs/hardware/buffalo/wbr2-g54/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/buffalo/wbr2-g54/dmesg-2_4_29.txt delete mode 100644 openwrt/docs/hardware/buffalo/wbr2-g54/info.txt delete mode 100644 openwrt/docs/hardware/buffalo/wbr2-g54/nvram.txt delete mode 100644 openwrt/docs/hardware/buffalo/wbr2-g54/pci.txt delete mode 100644 openwrt/docs/hardware/buffalo/wla2-g54l/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/buffalo/wla2-g54l/dmesg-2_4_29.txt delete mode 100644 openwrt/docs/hardware/buffalo/wla2-g54l/info.txt delete mode 100644 openwrt/docs/hardware/buffalo/wla2-g54l/nvram.txt delete mode 100644 openwrt/docs/hardware/buffalo/wla2-g54l/pci.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v11/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v11/dmesg-2_4_29.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v11/ifconfig.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v11/info.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v11/lspci-vv.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v11/nvram.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v11/pci.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v20/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v20/dmesg-2_4_29.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v20/ifconfig.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v20/info.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v20/nvram.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v20/pci.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v22/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v22/dmesg-2_4_29.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v22/ifconfig.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v22/info.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v22/nvram.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54g_v22/pci.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v10/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v10/dmesg-2_4_29.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v10/ifconfig.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v10/info.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v10/nvram.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v10/pci.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v11/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v11/dmesg-2_4_30.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v11/info.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v11/nvram.txt delete mode 100644 openwrt/docs/hardware/linksys/wrt54gs_v11/pci.txt delete mode 100755 openwrt/docs/hardware/motorola/WR850Gv2/cpuinfo.txt delete mode 100755 openwrt/docs/hardware/motorola/WR850Gv2/dmesg-2-4-29.txt delete mode 100755 openwrt/docs/hardware/motorola/WR850Gv2/ifconfig.txt delete mode 100755 openwrt/docs/hardware/motorola/WR850Gv2/nvram.txt delete mode 100755 openwrt/docs/hardware/motorola/WR850Gv2/pci.txt delete mode 100644 openwrt/docs/hardware/soekris/net4801/cpuinfo.txt delete mode 100644 openwrt/docs/hardware/soekris/net4801/dmesg-2.4.30.txt delete mode 100644 openwrt/docs/hardware/soekris/net4801/info.txt delete mode 100644 openwrt/docs/hardware/soekris/net4801/pci.txt create mode 100644 openwrt/docs/network.txt delete mode 100644 openwrt/docs/stylesheet.css diff --git a/openwrt/docs/buildroot-documentation.html b/openwrt/docs/buildroot-documentation.html deleted file mode 100644 index 4d2b00b6289..00000000000 --- a/openwrt/docs/buildroot-documentation.html +++ /dev/null @@ -1,710 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>OpenWrt Buildroot - Usage and documentation - - - - - -
-
-

OpenWrt Buildroot

-
- -

Usage and documentation by Felix Fietkau and Waldemar Brodkorb, based on uClibc Buildroot - documentation by Thomas Petazzoni. Contributions from Karsten Kruse, - Ned Ludd, Martin Herren. OpenWrt Kernel Module Creation Howto by Markus Becker.

- -

Last modification : $Id$

- -
- -

About OpenWrt Buildroot

- -

OpenWrt Buildroot is a set of Makefiles and patches that allows to easily - generate both a cross-compilation toolchain and a root filesystem for your - Wireless Router. The cross-compilation toolchain uses uClibc (http://www.uclibc.org/), a tiny C standard - library.

- -

A compilation toolchain is the set of tools that allows to - compile code for your system. It consists of a compiler (in our - case, gcc), binary utils like assembler and linker - (in our case, binutils) and a C standard library (for - example GNU - Libc, uClibc or dietlibc). The system - installed on your development station certainly already has a - compilation toolchain that you can use to compile application that - runs on your system. If you're using a PC, your compilation - toolchain runs on an x86 processor and generates code for a x86 - processor. Under most Linux systems, the compilation toolchain - uses the GNU libc as C standard library. This compilation - toolchain is called the "host compilation toolchain", and more - generally, the machine on which it is running, and on which you're - working is called the "host system". The compilation toolchain is - provided by your distribution, and OpenWrt Buildroot has nothing to do - with it.

- -

As said above, the compilation toolchain that comes with your system - runs and generates code for the processor of your host system. As your - embedded system has a different processor, you need a cross-compilation - toolchain: it's a compilation toolchain that runs on your host system but - that generates code for your target system (and target processor). For - example, if your host system uses x86 and your target system uses MIPS, the - regular compilation toolchain of your host runs on x86 and generates code - for x86, while the cross-compilation toolchain runs on x86 and generates - code for MIPS.

- -

You might wonder why such a tool is needed when you can compile - gcc, binutils, uClibc and all the tools by hand. - Of course, doing so is possible. But dealing with all configure options, - with all problems of every gcc or binutils - version is very time-consuming and uninteresting. OpenWrt Buildroot automates this - process through the use of Makefiles, and has a collection of patches for - each gcc and binutils version to make them work - on the MIPS architecture of most Wireless Routers.

- -

Obtaining OpenWrt Buildroot

- -

OpenWrt Buildroot is available via SVN aka subversion. - For any kind of OpenWrt development you should get the latest version from svn via:

-
- $ svn co https://svn.openwrt.org/openwrt/trunk/
-
-

If you only like to create your own custom firmware images and packages we - strongly suggest to use the SVN branch of the stable version (whiterussian): -

-
- $ svn co https://svn.openwrt.org/openwrt/branches/whiterussian/
-
- - -

Using OpenWrt Buildroot

- -

OpenWrt Buildroot has a nice configuration tool similar to the one you can find - in the Linux Kernel (http://www.kernel.org/) - or in Busybox (http://www.busybox.org/). - Note that you can run everything as a normal user. There is no need to be root to - configure and use the Buildroot. The first step is to run the configuration - assistant:

- -
- $ make menuconfig
-
- -

For each entry of the configuration tool, you can find associated help - that describes the purpose of the entry.

- -

Once everything is configured, the configuration tool has generated a - .config file that contains the description of your - configuration. It will be used by the Makefiles to do what's needed.

- -

Let's go:

- -
- $ make
-
- -

This command will download, configure and compile all the selected - tools, and finally generate target firmware images and additional packages - (depending on your selections in make menuconfig. - All the target files can be found in the bin/ subdirectory. - You can compile firmware images containing two different filesystem types: -

    -
  • jffs2
  • -
  • squashfs
  • -
-

jffs2 contains a writable root filesystem, which will expand to - the size of your flash image. Note: if you use the generic firmware image, you - need to pick the right image for your flash size, because of different - eraseblock sizes.

- -

squashfs contains a read-only root filesystem using a modified - squashfs filesystem with LZMA compression. When booting it, you can - create a writable second filesystem, which will contain your modifications to - the root filesystem, including the packages you install. - -

Customizing the - target filesystem

- -

There are two ways to customize the resulting target filesystem:

- -
    -
  • Customize the target filesystem directly, and rebuild the image. The - target filesystem is available under build_ARCH/root/ where - ARCH is the chosen target architecture, usually mipsel. - You can simply make your changes here, and run make target_install afterwards, - which will rebuild the target filesystem image. This method allows to do - everything on the target filesystem, but if you decide to rebuild your toolchain, - tools or packages, these changes will be lost.
  • - -
  • Customize the target filesystem skeleton, available under - package/base-files/default/. You can customize - configuration files or other stuff here. However, the full file hierarchy - is not yet present, because it's created during the compilation process. - So you can't do everything on this target filesystem skeleton, but - changes to it remains even when you completely rebuild the cross-compilation - toolchain and the tools.
    -
- -

Customizing the - Busybox configuration

- -

Busybox is very configurable, and you may want to customize it. - Its configuration is completely integrated into the main menuconfig system. - You can find it under "OpenWrt Package Selection" => "Busybox Configuration"

- -

Customizing the uClibc - configuration

- -

Just like BusyBox, uClibc offers a lot of - configuration options. They allow to select various - functionalities, depending on your needs and limitations.

- -

The easiest way to modify the configuration of uClibc is to - follow these steps :

- -
    - -
  1. Make a first compilation of buildroot without trying to - customize uClibc.
  2. - -
  3. Go into the directory - toolchain_build_ARCH/uClibc/ and run make - menuconfig. The nice configuration assistant, similar to - the one used in the Linux Kernel appears. Make - your configuration as appropriate.
  4. - -
  5. Copy the .config file to - toolchain/uClibc/uClibc.config or - toolchain/uClibc/uClibc.config-locale. The former - is used if you haven't selected locale support in the Buildroot - configuration, and the latter is used if you have selected - locale support.
  6. - -
  7. Run the compilation again.
  8. - -
- -

Otherwise, you can simply change - toolchain/uClibc/uClibc.config or - toolchain/uClibc/uClibc.config-locale without running - the configuration assistant.

- -

How OpenWrt Buildroot - works

- -

As said above, OpenWrt is basically a set of Makefiles that download, - configure and compiles software with the correct options. It also includes - some patches for various software, mainly the ones involved in the - cross-compilation tool chain (gcc, binutils and - uClibc).

- -

There is basically one Makefile per software, and they are named Makefile. - Makefiles are split into three sections:

- -
    -
  • package (in the package/ directory) contains the - Makefiles and associated files for all user-space tools that Buildroot - can compile and add to the target root filesystem. There is one - sub-directory per tool.
  • - -
  • toolchain (in the toolchain/ directory) contains - the Makefiles and associated files for all software related to the - cross-compilation toolchain : binutils, ccache, - gcc, gdb, kernel-headers and - uClibc.
  • - -
  • target (in the target directory) contains the - Makefiles and associated files for software related to the generation of - the target root filesystem image and the linux kernel for the different - system on a chip boards, used in the Wireless Routers. - Two types of filesystems are supported - : jffs2 and squashfs. -
- -

Each directory contains at least 2 files :

- -
    -
  • Makefile is the Makefile that downloads, configures, - compiles and installs the software something.
  • - -
  • Config.in is a part of the configuration tool - description file. It describes the option related to the current - software.
  • -
- -

The main Makefile do the job through the following steps (once the - configuration is done):

- -
    -
  1. Create the download directory (dl/ by default). This is - where the tarballs will be downloaded. It is interesting to know that the - tarballs are in this directory because it may be useful to save them - somewhere to avoid further downloads.
  2. - -
  3. Create the build directory (build_ARCH/ by default, - where ARCH is your architecture). This is where all - user-space tools while be compiled.
  4. - -
  5. Create the toolchain build directory - (toolchain_build_ARCH/ by default, where ARCH - is your architecture). This is where the cross compilation toolchain will - be compiled.
  6. - -
  7. Setup the staging directory (staging_dir_ARCH/ by - default). This is where the cross-compilation toolchain will be - installed. If you want to use the same cross-compilation toolchain for - other purposes, such as compiling third-party applications, you can add - staging_dir_ARCH/bin to your PATH, and then use - arch-linux-gcc to compile your application. In order to - setup this staging directory, it first removes it, and then it creates - various subdirectories and symlinks inside it.
  8. - -
  9. Create the target directory (build_ARCH/root/ by - default) and the target filesystem skeleton. This directory will contain - the final root filesystem. To set it up, it first deletes it, then it - copies the skeleton available in target/default/target_skeleton - and then removes useless SVN/ directories.
  10. - -
  11. Call the prepare, compile and install - targets for the subdirectories toolchain, package - and target
  12. -
- -

Using the - uClibc toolchain

- -

You may want to compile your own programs or other software - that are not packaged in OpenWrt. In order to do this, you can - use the toolchain that was generated by the Buildroot.

- -

The toolchain generated by the Buildroot by default is located in - staging_dir_ARCH. The simplest way to use it - is to add staging_dir_ARCH/bin/ to your PATH - environment variable, and then to use - arch-linux-gcc, arch-linux-objdump, - arch-linux-ld, etc.

- -

For example, you may add the following to your - .bashrc (considering you're building for the MIPS - architecture and that Buildroot is located in - ~/openwrt/) :

- -
-export PATH=$PATH:~/openwrt/staging_dir_mipsel/bin/
-
- -

Then you can simply do :

- -
-mipsel-linux-uclibc-gcc -o foo foo.c
-
- -

Important : do not try to move the toolchain to an other - directory, it won't work. There are some hard-coded paths in the - gcc configuration. If the default toolchain directory - doesn't suit your needs, please refer to the Using the uClibc toolchain outside of - buildroot section.

- -

Using the - uClibc toolchain outside of buildroot

- -

By default, the cross-compilation toolchain is generated inside - staging_dir_ARCH/. But sometimes, it may be useful to - install it somewhere else, so that it can be used to compile other programs - or by other users. Moving the staging_dir_ARCH/ - directory elsewhere is not possible, because they are some hardcoded - paths in the toolchain configuration.

- -

If you want to use the generated toolchain for other purposes, - you can configure Buildroot to generate it elsewhere using the - option of the configuration tool : Build options -> - Toolchain and header file location, which defaults to - staging_dir_ARCH/.

- -

Location of downloaded packages

- -

It might be useful to know that the various tarballs that are - downloaded by the Makefiles are all stored in the - DL_DIR which by default is the dl - directory. It's useful for example if you want to keep a complete - version of Buildroot which is known to be working with the - associated tarballs. This will allow you to regenerate the - toolchain and the target filesystem with exactly the same - versions.

- -

Extending OpenWrt with - more software

- -

This section will only consider the case in which you want to - add user-space software.

- -

Package directory

- -

First of all, create a directory under the package - directory for your software, for example foo.

- -

Config.in file

- -

Then, create a file named Config.in. This file - will contain the portion of options description related to our - foo software that will be used and displayed in the - configuration tool. It should basically contain :

- -
-config BR2_PACKAGE_FOO
-        tristate "foo - some nice tool"
-        default m if CONFIG_DEVEL
-        help
-	     This is a comment that explains what foo is.
-
- -

If you depend on other software or library inside the Buildroot, it - is important that you automatically select these packages in your - Config.in. Example if foo depends on bar library: -

-
-config BR2_PACKAGE_FOO
-        tristate "foo - some nice tool"
-        default m if CONFIG_DEVEL
-	select BR2_PACKAGE_LIBBAR
-        help
-        This is a comment that explains what foo is.
-
- -

Of course, you can add other options to configure particular - things in your software.

- -

Config.in in the package directory

- -

To add your package to the configuration tool, you need - to add the following line to package/Config.in, - please add it to a section, which fits the purpose of foo: - -

-comment "Networking"
-source "package/foo/Config.in"
-
- -

Makefile in the package directory

- -

To add your package to the build process, you need to edit - the Makefile in the package/ directory. Locate the - lines that look like the following:

- -
-package-$(BR2_PACKAGE_FOO) += foo
-
- -

As you can see, this short line simply adds the target - foo to the list of targets handled by OpenWrt Buildroot.

- -

In addition to the default dependencies, you make your package - depend on another package (e.g. a library) by adding a line: - -

-foo-compile: bar-compile
-
- -

The ipkg control file

-

Additionally, you need to create a control file which contains - information about your package, readable by the ipkg package - utility. It should be created as file: - package/foo/ipkg/foo.control

- -

The file looks like this

- -
-     1  Package: foo
-     2  Priority: optional
-     3  Section: net
-     4  Maintainer: Foo Software <foo@foosoftware.com>
-     5  Source: http://foosoftware.com
-     6  Depends: libbar
-     7  Description: Package Description
-
- -

You can skip the usual Version: and Architecture - fields, as they will be generated by the make-ipkg-dir.sh script - called from your Makefile. The Depends field is important, so that ipkg will - automatically fetch all dependend software on your target system.

- -

The real Makefile

- -

Finally, here's the hardest part. Create a file named - Makefile. It will contain the Makefile rules that - are in charge of downloading, configuring, compiling and installing - the software. Below is an example that we will comment afterwards.

- -
-     1  # $Id$
-     2	
-     3  include $(TOPDIR)/rules.mk
-     4
-     5  PKG_NAME:=foo
-     6  PKG_VERSION:=1.0
-     7  PKG_RELEASE:=1
-     8  PKG_MD5SUM:=4584f226523776a3cdd2fb6f8212ba8d
-     9 
-    10  PKG_SOURCE_URL:=http://www.foosoftware.org/downloads
-    11  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-    12 	PKG_CAT:=zcat
-    13	
-    14	PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-    15	PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-    16
-    17	include $(TOPDIR)/package/rules.mk
-    18
-    19	$(eval $(call PKG_template,FOO,foo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-    20
-    21  $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
-    22          (cd $(PKG_BUILD_DIR); \
-    23                  $(TARGET_CONFIGURE_OPTS) \
-    24                  CFLAGS="$(TARGET_CFLAGS)" \
-    25                  ./configure \
-    26                  --target=$(GNU_TARGET_NAME) \
-    27                  --host=$(GNU_TARGET_NAME) \
-    28                  --build=$(GNU_HOST_NAME) \
-    29                  --prefix=/usr \
-    30                  --sysconfdir=/etc \
-    31 			--with-bar="$(STAGING_DIR)/usr" \
-    32          );
-    33          touch $@
-    34
-    35  $(PKG_BUILD_DIR)/.built:
-    36      	rm -rf $(PKG_INSTALL_DIR)
-    37		mkdir -p $(PKG_INSTALL_DIR)
-    38		$(MAKE) -C $(PKG_BUILD_DIR) \
-    39 	          $(TARGET_CONFIGURE_OPTS) \
-    40            install_prefix="$(PKG_INSTALL_DIR)" \
-    41 	          all install
-    42		touch $@
-    43 
-    44  $(IPKG_FOO):
-    46		install -d -m0755 $(IDIR_FOO)/usr/sbin
-    47    	cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/foo $(IDIR_FOO)/usr/sbin
-    49		$(RSTRIP) $(IDIR_FOO)
-    50		$(IPKG_BUILD) $(IDIR_FOO) $(PACKAGE_DIR)
-    51	
-    52	mostlyclean:
-    53  	make -C $(PKG_BUILD_DIR) clean
-    54    	rm $(PKG_BUILD_DIR)/.built
-
- -

First of all, this Makefile example works for a single - binary software. For other software such as libraries or more - complex stuff with multiple binaries, it should be adapted. Look at - the other Makefile files in the package/ - directory.

- -

At lines 5-15, a couple of useful variables are defined:

- -
    -
  • PKG_NAME : The package name, e.g. foo.
  • - -
  • PKG_VERSION : The version of the package that - should be downloaded.
  • - -
  • PKG_RELEASE : The release number that will be - appended to the version number of your ipkg package.
  • - -
  • PKG_MD5SUM : The md5sum of the software archive.
  • - -
  • PKG_SOURCE_URL : Space separated list of the HTTP - or FTP sites from which the archive is downloaded. It must include the complete - path to the directory where FOO_SOURCE can be - found.
  • - -
  • PKG_SOURCE : The name of the tarball of - your package on the download website of FTP site. As you can see - PKG_NAME and PKG_VERSION are used.
  • - -
  • PKG_CAT : The tool needed for extraction of the - software archive.
  • - -
  • PKG_BUILD_DIR : The directory into which the software - will be configured and compiled. Basically, it's a subdirectory - of BUILD_DIR which is created upon extraction of - the tarball.
  • - -
  • PKG_INSTALL_DIR : The directory into the software - will be installed. It is a subdirectory of PKG_BUILD_DIR.
  • - -
- -

In Line 3 and 17 we include common variables and routines to simplify - the process of ipkg creation. It includes routines to download, verify - and extract the software package archives.

- -

Line 19 contains the magic line which automatically creates the - ipkg for us.

- -

Lines 21-33 defines a target and associated rules that - configures the software. It depends on the previous target (the - hidden .prepared file) so that we are sure the software has - been uncompressed. In order to configure it, it basically runs the - well-known ./configurescript. As we may be doing - cross-compilation, target, host and - build arguments are given. The prefix is also set to - /usr, not because the software will be installed in - /usr on your host system, but in the target - filesystem. Finally it creates a .configured file to - mark the software as configured.

- -

Lines 35-42 defines a target and a rule that compiles the - software. This target will create the binary file in the - compilation directory, and depends on the software being already - configured (hence the reference to the .configured - file). Afterwards it installs the resulting binary into the - PKG_INSTALL_DIR. It basically runs - make install inside the source directory.

- -

Lines 44-50 defines a target and associated rules that create - the ipkg package, which can optionally be embedded into - the resulting firmware image. It manually installs all files you - want to integrate in your resulting ipkg. RSTRIP will - recursevily strip all binaries and libraries. - Finally IPKG_BUILD is called to create the package.

- -

Conclusion

- -

As you can see, adding a software to buildroot is simply a - matter of writing a Makefile using an already existing - example and to modify it according to the compilation process of - the software.

- -

If you package software that might be useful for other persons, - don't forget to send a patch to OpenWrt developers! - Use the mail address: openwrt-devel@openwrt.org -

- -

Resources

- -

To learn more about OpenWrt you can visit this website: - http://openwrt.org/

- -
- -
-
-

OpenWrt Kernel Module Creation Howto

-
- -

About OpenWrt Kernel Module Compilation

- -

You are planning to compile a kernel module? This howto will -explain what you have to do, to have your kernel module installable as -an ipkg.

- -

Enable the kernel options

- -

Enable the kernel options you want by modifying -build_mipsel/linux/.config. We are assuming, that you already had your -kernel compiled once here. You can do the modification by hand or by - -

-$ cd build_mipsel/linux
-$ make menuconfig
-
- -And copy it, so your changes are not getting lost, when doing a 'make -dirclean'. Here we assume that you are compiling for Broadcom chipset -based devices: - -
 $ cp .config ../../../target/linux/linux-2.4/config/brcm 
- -

-

Create a buildroot option

- -

Create a buildroot option by modifying/inserting into -target/linux/Config.in, e.g. - -

-config BR2_PACKAGE_KMOD_USB_KEYBOARD
-        tristate "Support for USB keyboards"
-        default m
-        depends BR2_PACKAGE_KMOD_USB_CONTROLLER
-
-

- -

Define the binary files for the kernel module

- -

Define the binary files for the kernel module by modifying/inserting into -target/linux/linux-2.4/Makefile, e.g. - -

-$(eval $(call KMOD_template,USB_KEYBOARD,usb-kbd,\
-	$(MODULES_DIR)/kernel/drivers/input/input.o \
-	$(MODULES_DIR)/kernel/drivers/input/keybdev.o \
-	$(MODULES_DIR)/kernel/drivers/usb/usbkbd.o \
-,CONFIG_USB_KEYB,kmod-usb-core,60,input keybdev usbkbd))
-
- -Where CONFIG_USB_KEYB is the kernel option, USB_KEYBOARD is the last -part of BR2_PACKAGE_KMOD_USB_KEYBOARD and usb-kbd is part of the -filename of the created ipkg.

- -

Specify the ipkg control file

- -

Create e.g. target/linux/control/kmod-usb-kbd.control with content similar to this: - -

-Package: kmod-usb-kbd
-Priority: optional
-Section: sys
-Maintainer: Markus Becker <mab@comnets.uni-bremen.de>
-Source: buildroot internal
-Description: Kernel Support for USB Keyboards
-
-

- -

Compile the kernel module

- -

Enable the kernel module with -

-$ make menuconfig
-
- in TOPDIR and selecting it.
- - Compile with -
-$ make dirclean && make
-
-

-
- - - diff --git a/openwrt/docs/hardware/4g/accesscube/cpuinfo.txt b/openwrt/docs/hardware/4g/accesscube/cpuinfo.txt deleted file mode 100644 index f3489a30adc..00000000000 --- a/openwrt/docs/hardware/4g/accesscube/cpuinfo.txt +++ /dev/null @@ -1,11 +0,0 @@ -system type : MTX-1 -processor : 0 -cpu model : Au1500 V0.2 -BogoMIPS : 395.67 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : yes -hardware watchpoint : yes -VCED exceptions : not available -VCEI exceptions : not available diff --git a/openwrt/docs/hardware/4g/accesscube/dmesg-2_4_27.txt b/openwrt/docs/hardware/4g/accesscube/dmesg-2_4_27.txt deleted file mode 100644 index 31daebff173..00000000000 --- a/openwrt/docs/hardware/4g/accesscube/dmesg-2_4_27.txt +++ /dev/null @@ -1,86 +0,0 @@ -CPU revision is: 01030202 -Primary instruction cache 16kB, physically tagged, 4-way, linesize 32 bytes. -Primary data cache 16kB, 4-way, linesize 32 bytes. -Linux version 2.4.27 (rhandorf@devel) (gcc version 3.3.4) #1 Mon Dec 5 -15:55:07 EST 2005 -4G Systems MTX-1 Board -Au1500 AD (PRId 01030202) @ 396MHZ -BCLK switching enabled! -Determined physical RAM map: - memory: 04000000 @ 00000000 (usable) -On node 0 totalpages: 16384 -zone(0): 16384 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock/0 console=ttyS0,115200 -usb_ohci=base:0x10100000,len:0x100000,irq:26 -calculating r4koff... 003c6cc0(3960000) -CPU frequency 396.00 MHz -Calibrating delay loop... 395.67 BogoMIPS -Memory: 61504k/65536k available (1769k kernel code, 4032k reserved, 260k data, -88k init, 0k highmem) -Dentry cache hash table entries: 8192 (order: 4, 65536 bytes) -Inode cache hash table entries: 4096 (order: 3, 32768 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 4096 (order: 2, 16384 bytes) -Page-cache hash table entries: 16384 (order: 4, 65536 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -Autoconfig PCI channel 0x80316838 -Scanning bus 00, I/O 0x00000300:0x00100000, Mem 0x40000000:0x50000000 -00:00.0 Class 0200: 168c:001b (rev 01) - Mem at 0x40000000 [size=0x10000] -00:01.0 Class 0200: 168c:001b (rev 01) - Mem at 0x40010000 [size=0x10000] -Non-coherent PCI accesses enabled -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -Installing knfsd (copyright (C) 1996 okir@monad.swb.de). -JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc. -pty: 256 Unix98 ptys configured -Serial driver version 1.01 (2001-02-08) with no serial options enabled -ttyS00 at 0xb1100000 (irq = 0) is a 16550 -ttyS01 at 0xb1400000 (irq = 3) is a 16550 -loop: loaded (max 8 devices) -au1000eth.c:1.4 ppopov@mvista.com -eth0: Au1x Ethernet found at 0xb1500000, irq 28 -eth0: LSI 80227 10/100 BaseT PHY at phy address 31 -eth0: Using LSI 80227 10/100 BaseT PHY as default -MTX-1 flash: probing 32-bit flash bus at 1e000000 -MTX-1 flash: Found 2 x16 devices at 0x0 in 32-bit mode - Amd/Fujitsu Extended Query Table at 0x0040 -MTX-1 flash: CFI does not contain boot bank location. Assuming top. -number of CFI chips: 1 -cfi_cmdset_0002: Disabling fast programming due to code brokenness. -cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. -Creating 4 MTD partitions on "MTX-1 flash": -0x00000000-0x01c00000 : "user fs" -0x01c00000-0x01d00000 : "yamon" -0x01d00000-0x01fc0000 : "raw kernel" -0x01fc0000-0x02000000 : "yamon environment" -usb.c: registered new driver usbdevfs -usb.c: registered new driver hub -host/usb-ohci.c: USB OHCI at membase 0xb0100000, IRQ 26 -host/usb-ohci.c: usb-builtin, non-PCI OHCI -usb.c: new USB bus registered, assigned bus number 1 -hub.c: USB hub found -hub.c: 2 ports detected -Initializing Cryptographic API -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 4096 bind 8192) -Linux IP multicast router 0.06 plus PIM-SM -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -MTX-1 watchdog driver -MTX-1 System Button driver -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 88k freed -Algorithmics/MIPS FPU Emulator v1.5 -eth0: link up -eth0: going to full duplex diff --git a/openwrt/docs/hardware/4g/accesscube/info.txt b/openwrt/docs/hardware/4g/accesscube/info.txt deleted file mode 100644 index 2f82f533d6a..00000000000 --- a/openwrt/docs/hardware/4g/accesscube/info.txt +++ /dev/null @@ -1,21 +0,0 @@ -4G Systems Access Cube - -Online description from 4G systems : -http://www.accesscube.com - -CPU: AMD Alchemy 1500 @ 400 Mhz -RAM: 64 MB -Flash: -serial port possible -JTAG port possible -Mini-PCI slot expansions -Delivered with 2x 6th generation Atheros Wireless Cards - -List of files: -cpuinfo.txt: contents of /proc/cpuinfo (2.4.27) -pci.txt: contents of /proc/pci (2.4.27) -dmesg-2_4_27.txt: dmesg from 2.4.27 kernel -lspci-vv.txt: output of lspci -vv -P ./proc/bus/pci (deported) - --- -florian diff --git a/openwrt/docs/hardware/4g/accesscube/lspci-vv.txt b/openwrt/docs/hardware/4g/accesscube/lspci-vv.txt deleted file mode 100644 index 1e06cc651b4..00000000000 --- a/openwrt/docs/hardware/4g/accesscube/lspci-vv.txt +++ /dev/null @@ -1,28 +0,0 @@ -00:00.0 Class 0200: 168c:001b (rev 01) - Subsystem: 168c:2063 - Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- -Stepping- SERR- FastB2B- - Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- -SERR- TAbort- -SERR- -All bugs added by David S. Miller -VFS: Mounted root (squashfs filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 68k freed -Warning: unable to open an initial console. -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 0000041a -using v1 hardware -jffs2.bbc: SIZE compression mode activated. -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.50.21.10 -eth1: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.50.21.10 -PCI: Enabling device 01:02.0 (0004 -> 0006) -eth2: Broadcom BCM43XX 802.11 Wireless Controller 3.50.21.10 (Compiled in . at 20:53:00 on Jan 21 2004) -device eth0 entered promiscuous mode diff --git a/openwrt/docs/hardware/asus/wl-500g/dmesg-2_4_29.txt b/openwrt/docs/hardware/asus/wl-500g/dmesg-2_4_29.txt deleted file mode 100644 index 20e1c95e1b1..00000000000 --- a/openwrt/docs/hardware/asus/wl-500g/dmesg-2_4_29.txt +++ /dev/null @@ -1,95 +0,0 @@ -CPU revision is: 00024000 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.29 (wbx@auriga) (gcc version 3.3.5) #1 Thu Feb 17 23:51:07 CET 2005 -Determined physical RAM map: -memory: 01000000 @ 00000000 (usable) -On node 0 totalpages: 4096 -zone(0): 4096 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM4710 rev 0 at 125 MHz -Using 62.400 MHz high precision timer. -!unable to setup serial console! -Calibrating delay loop... 82.94 BogoMIPS -Memory: 14044k/16384k available (1474k kernel code, 2340k reserved, 100k data, 100k init, 0k highmem) -Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) -Inode cache hash table entries: 1024 (order: 1, 8192 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 4096 (order: 2, 16384 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Fixing up bus 0 -PCI: Fixing up bridge -PCI: Setting latency timer of device 01:00.0 to 64 -PCI: Fixing up bus 1 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -PPP generic driver version 2.4.2 -Amd/Fujitsu Extended Query Table v1.0 at 0x0040 -Physically mapped flash: JEDEC Device ID is 0xCA. Assuming broken CFI table. -Physically mapped flash: Swapping erase regions for broken CFI table. -number of CFI chips: 1 -cfi_cmdset_0002: Disabling fast programming due to code brokenness. -Flash device: 0x400000 at 0x1fc00000 -Physically mapped flash: squashfs filesystem found at block 946 -Creating 5 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x003f0000 : "linux" -0x000ec990-0x001ceb48 : "rootfs" -mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only -0x003f0000-0x00400000 : "nvram" -0x001d0000-0x003f0000 : "OpenWrt" -sflash: chipcommon not found -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 1024 bind 2048) -ip_conntrack version 2.1 (128 buckets, 1024 max) - 288 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -VFS: Mounted root (squashfs filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 100k freed -Warning: unable to open an initial console. -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 0000041a -using v1 hardware -led -> 00 -led -> 01 -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:02.0 to 64 -5325E phy=FFFFFFFF -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 00:08.0 to 64 -5325E phy=FFFFFFFF -eth1: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 01:02.0 to 64 -PCI: Enabling device 01:02.0 (0004 -> 0006) -eth2: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -device eth2 entered promiscuous mode -eth2: attempt to add interface with same source address. -br0: port 2(eth2) entering learning state -br0: port 1(eth0) entering learning state -br0: port 2(eth2) entering forwarding state -br0: topology change detected, propagating -br0: port 1(eth0) entering forwarding state -br0: topology change detected, propagating -led -> 00 diff --git a/openwrt/docs/hardware/asus/wl-500g/info.txt b/openwrt/docs/hardware/asus/wl-500g/info.txt deleted file mode 100644 index cae68607c58..00000000000 --- a/openwrt/docs/hardware/asus/wl-500g/info.txt +++ /dev/null @@ -1,21 +0,0 @@ -Asus WL-500g - -Online Description from Asus: -http://www.asus.com/products/communication/wireless/wl-500g/overview.htm - -CPU: BCM4710 at 125 MHz -RAM: 16 MB -Flash: 4 MB -2 Broadcom BCM47xx 10/100 Mbps Ethernet Controller -1 Broadcom BCM43XX 802.11 Wireless Controller -USB 1.1 -parallel port -no serial -JTAG interface - -List of files: -nvram.txt: contents of NVRAM after OpenWRT upgrade -cpuinfo.txt: contents of /proc/cpuinfo (2.4.20) -pci.txt: contents of /proc/pci (2.4.20) -dmesg-2_4_20.txt: dmesg from Kernel 2.4.20 -dmesg-2_4_29.txt: dmesg from Kernel 2.4.29 diff --git a/openwrt/docs/hardware/asus/wl-500g/nvram.txt b/openwrt/docs/hardware/asus/wl-500g/nvram.txt deleted file mode 100644 index a9a8ba02340..00000000000 --- a/openwrt/docs/hardware/asus/wl-500g/nvram.txt +++ /dev/null @@ -1,81 +0,0 @@ -The content of the original nvram after flashing with OpenWRT: - -wl0_net_mode=mixed -os_ram_addr=80001000 -wl0_frameburst=on -et0macaddr=00:11:D8:18:B9:08 -wl0_wep_buf= -watchdog=3000 -boot_wait=on -wl0_macmode1=disabled -wl0_infra=1 -wl0_country_code=AU -et0mdcport=0 -pmon_ver=PMON 3.11.19.0 -wl0_ifname=eth2 -wl0_mode=ap -os_flash_addr=bfc40000 -wl0_gmode=1 -boardtype=bcm94710dev -et1macaddr=00:11:D8:18:B9:08 -wl0_wep_last= -lan_netmask=255.255.255.0 -wl0_dtim=1 -wl0_ssid=linksys -et1mdcport=1 -wl0_key1= -wl0_key2= -wl0_key3= -wl0_key4= -wl0_plcphdr=long -wl0_rate=0 -wl0_closed=0 -wl0_macmode=disabled -wl0_radioids=BCM2050 -wl0_phytype=g -wl0_lazywds=1 -wl0_antdiv=-1 -wl0_wpa_psk= -wl0_mac_list= -wl0_unit=0 -wl_country_code=AU -wl0_wds= -wl0_radius_port=1812 -wl0_mac_deny= -wl0_auth=0 -wl0_radius_ipaddr= -lan_ipaddr=192.168.1.1 -clkfreq=125 -wl0_phytypes=g -wl0_frag=2346 -wl0_wep=off -sdram_config=0x0000 -wl0_country=Worldwide -scratch=a0180000 -wl0_rateset=default -wl0_wep_bit=64 -wl0_afterburner_override=-1 -sdram_refresh=0x8040 -sdram_ncdl=0x00000000 -hardware_version=WL500-02-02-01-00 -wl0_passphrase= -wl0_rts=2347 -wl0_wpa_gtk_rekey=3600 -wl0_key=1 -wl0_active_mac= -et0phyaddr=30 -wl0_radio=1 -wl0_bcn=100 -wl0_hwaddr=00:11:D8:18:B9:08 -wl0_wep_gen= -wl0_gmode_protection=auto -wl0_maclist= -sdram_init=0x0419 -dl_ram_addr=a0001000 -wl0_radius_key= -regulation_domain=0X30DE -wl0_corerev=5 -wl0_channel=6 -wl0_auth_mode=disabled -et1phyaddr=0 -boardnum=asusX diff --git a/openwrt/docs/hardware/asus/wl-500g/pci.txt b/openwrt/docs/hardware/asus/wl-500g/pci.txt deleted file mode 100644 index 81976669a42..00000000000 --- a/openwrt/docs/hardware/asus/wl-500g/pci.txt +++ /dev/null @@ -1,52 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0500: PCI device 14e4:0803 (rev 0). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0xffffffff]. - Bus 0, device 1, function 0: - Class 0200: PCI device 14e4:4711 (rev 0). - IRQ 5. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 0200: PCI device 14e4:4713 (rev 0). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0703: PCI device 14e4:4712 (rev 0). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0c03: PCI device 14e4:4715 (rev 0). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Bus 0, device 5, function 0: - Class 0604: PCI device 14e4:0804 (rev 0). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Non-prefetchable 32 bit memory at 0x8000000 [0xfffffff]. - Bus 0, device 6, function 0: - Class 0b30: PCI device 14e4:0805 (rev 0). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0xff200000 [0xff3fffff]. - Bus 0, device 7, function 0: - Class 0501: PCI device 14e4:0811 (rev 0). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18007000 [0x18007fff]. - Non-prefetchable 32 bit memory at 0x1f000000 [0x1fffffff]. - Bus 0, device 8, function 0: - Class 0200: PCI device 14e4:4713 (rev 0). - IRQ 4. - Non-prefetchable 32 bit memory at 0x18008000 [0x18008fff]. - Bus 1, device 0, function 0: - Class 0600: PCI device 14e4:4710 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x40000000 [0x40001fff]. - Prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Bus 1, device 2, function 0: - Class 0280: PCI device 14e4:4320 (rev 3). - IRQ 6. - Non-prefetchable 32 bit memory at 0x40002000 [0x40003fff]. diff --git a/openwrt/docs/hardware/asus/wl-500gd/cfe.txt b/openwrt/docs/hardware/asus/wl-500gd/cfe.txt deleted file mode 100644 index 72109c62d66..00000000000 --- a/openwrt/docs/hardware/asus/wl-500gd/cfe.txt +++ /dev/null @@ -1,31 +0,0 @@ -CFE version 1.0.37 for BCM947XX (32bit,SP,LE) -Build Date: ¤G 3¤ë 1 16:49:41 CST 2005 (root@PaNLinux) -Copyright (C) 2000,2001,2002,2003 Broadcom Corporation. - -Initializing Arena. -Initializing Devices. -et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 1.3.2.0 -rndis0: Broadcom USB RNDIS Network Adapter (P-t-P) -CPU type 0x29007: 200MHz -Total memory: 0x2000000 bytes (32MB) - -Total memory used by CFE: 0x80300000 - 0x80436F10 (1273616) -Initialized Data: 0x803313D0 - 0x80333760 (9104) -BSS Area: 0x80333760 - 0x80334F10 (6064) -Local Heap: 0x80334F10 - 0x80434F10 (1048576) -Stack Area: 0x80434F10 - 0x80436F10 (8192) -Text (code) segment: 0x80300000 - 0x803313D0 (201680) -Boot area (physical): 0x00437000 - 0x00477000 -Relocation Factor: I:00000000 - D:00000000 - -Device eth0: hwaddr 00-11-D8-01-CB-3E, ipaddr 192.168.1.1, mask 255.255.255.0 - gateway not set, nameserver not set -Rescue Flag disable. -Reading :: TFTP Server. -Failed.: Timeout occured -Lader:raw Filesys:raw Dev:flash0.os File: Options:(null) -Loading: ...... 1662976 bytes read -Entry at 0x80001000 -Closing network. -Starting program at 0x80001000 - diff --git a/openwrt/docs/hardware/asus/wl-500gd/cpuinfo.txt b/openwrt/docs/hardware/asus/wl-500gd/cpuinfo.txt deleted file mode 100644 index 335b012b927..00000000000 --- a/openwrt/docs/hardware/asus/wl-500gd/cpuinfo.txt +++ /dev/null @@ -1,12 +0,0 @@ -system type : Broadcom BCM947XX -processor : 0 -cpu model : BCM3302 V0.7 -BogoMIPS : 199.47 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : no -hardware watchpoint : no -VCED exceptions : not available -VCEI exceptions : not available - diff --git a/openwrt/docs/hardware/asus/wl-500gd/dmesg-2_4_29.txt b/openwrt/docs/hardware/asus/wl-500gd/dmesg-2_4_29.txt deleted file mode 100644 index 4a242e832e6..00000000000 --- a/openwrt/docs/hardware/asus/wl-500gd/dmesg-2_4_29.txt +++ /dev/null @@ -1,97 +0,0 @@ -CPU revision is: 00029007 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.29 (kaloz@arrakis) (gcc version 3.3.5) #1 Fri Mar 25 12:39:57 CET 2005 -Determined physical RAM map: - memory: 02000000 @ 00000000 (usable) -On node 0 totalpages: 8192 -zone(0): 8192 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM5365 rev 1 at 200 MHz -Using 100.000 MHz high precision timer. -Calibrating delay loop... 199.47 BogoMIPS -Memory: 30304k/32768k available (1463k kernel code, 2464k reserved, 104k data, 88k init, 0k highmem) -Dentry cache hash table entries: 4096 (order: 3, 32768 bytes) -Inode cache hash table entries: 2048 (order: 2, 16384 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 8192 (order: 3, 32768 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Fixing up bus 0 -PCI: Fixing up bridge -PCI: Setting latency timer of device 01:00.0 to 64 -PCI: Fixing up bus 1 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0xb8000300 (irq = 3) is a 16550A -ttyS01 at 0xb8000400 (irq = 0) is a 16550A -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0 - Amd/Fujitsu Extended Query Table v1.1 at 0x0040 -number of CFI chips: 1 -cfi_cmdset_0002: Disabling fast programming due to code brokenness. -Flash device: 0x400000 at 0x1c000000 -Creating 4 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x003f0000 : "linux" -0x000f0000-0x003f0000 : "rootfs" -0x003f0000-0x00400000 : "nvram" -sflash: found no supported devices -Initializing Cryptographic API -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 2048 bind 4096) -ip_conntrack version 2.1 (256 buckets, 2048 max) - 288 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 88k freed -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 00000000 -using v2 hardware -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:01.0 to 64 -5325E phy=0 -5325E VLAN programming for BCM5325E-MDIO I/F switch -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 01:03.0 to 64 -PCI: Enabling device 01:03.0 (0004 -> 0006) -eth1: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan0: add 01:00:5e:00:00:01 mcast address to master interface -device eth1 entered promiscuous mode -eth1: attempt to add interface with same source address. -br0: port 2(eth1) entering listening state -br0: port 1(vlan0) entering listening state -br0: port 2(eth1) entering learning state -br0: port 1(vlan0) entering learning state -br0: port 2(eth1) entering forwarding state -br0: topology change detected, propagating -br0: port 1(vlan0) entering forwarding state -br0: topology change detected, propagating -vlan1: add 01:00:5e:00:00:01 mcast address to master interface - diff --git a/openwrt/docs/hardware/asus/wl-500gd/info.txt b/openwrt/docs/hardware/asus/wl-500gd/info.txt deleted file mode 100644 index 490371465f9..00000000000 --- a/openwrt/docs/hardware/asus/wl-500gd/info.txt +++ /dev/null @@ -1,25 +0,0 @@ -Asus WL-500g Deluxe (aka Wl-500GD, WL-500GX) - -Online Description from Asus: -http://www.asus.com/prog/spec.asp?m=WL-%20500g%20Deluxe&langs=01 - -CPU: BCM5365 at 200 MHz (integrated switch) -RAM: 32 MB -Flash: 4 MB -1 Broadcom BCM47XX 10/100Mbps Ethernet Controller -1 Broadcom BCM43XX 802.11 Wireless Controller -2 USB2.0 external -2 USB2.0 internal -2 serial internal -no JTAG - -List of files: -nvram.txt: contents of NVRAM after OpenWRT upgrade -cpuinfo.txt: contents of /proc/cpuinfo (2.4.29) -pci.txt: contents of /proc/pci (2.4.29) -dmesg-2_4_29.txt: dmesg from Kernel 2.4.29 -cfe.txt: output of the bootloader - -Notes: -Earlier models came with only 16MB ram activated. Please check -http://forum.chupa.nl/showthread.php?t=1704 for more info. diff --git a/openwrt/docs/hardware/asus/wl-500gd/nvram.txt b/openwrt/docs/hardware/asus/wl-500gd/nvram.txt deleted file mode 100644 index 82db2325fb4..00000000000 --- a/openwrt/docs/hardware/asus/wl-500gd/nvram.txt +++ /dev/null @@ -1,360 +0,0 @@ -wl_radius_port=1812 -usb_webremote6_x= -wl_mode_x=0 -filter_lw_dstport_x= -wan_unit=0 -wl0_net_mode=mixed -os_ram_addr=80001000 -wan_route= -wl0_frameburst=0 -qos_enable_x=0 -misc_ping_x=0 -wan_pppoe_keepalive=0 -filter_wl_default_x=ACCEPT -log_ipaddr= -boardrev=0x10 -wl_gmode_protection_x=0 -wl_wdsapply_x=0 -usb_webremote2_x= -et0macaddr=00:11:D8:01:CB:3E -wan_pppoe_passwd= -watchdog=5000 -boot_wait=on -wl_phytypes= -rescueflag=disable -wl0_infra=1 -wan_mode_x=2 -wl0_country_code=AU -fw_disable=0 -et0mdcport=0 -usb_webmserver_x= -dhcp_dns1_x= -filter_lw_dstip_x= -wan_nat_x=1 -wl_infra=1 -reset_gpio=7 -wl_maclist_x= -filter_wl_time_x=00002359 -pmon_ver=CFE 1.3.2.0 -restore_defaults=0 -wl_radio_x=1 -vts_proto_x= -vts_ipaddr_x= -filter_lw_time_x=00002359 -wan_pppoe_service= -wan_lease=86400 -ddns_status_t= -wl_radius_ipaddr= -http_wanport= -usb_websecurity_time_x=00002359 -lan_gateway= -wl0_ifname=eth1 -wan_pppoe_txonly_x=0 -lan_domain= -timer_interval=3600 -wl_wdsnum_x=0 -usb_ftpusername_x= -usb_webactivex_x=7777 -forward_port0= -dr_staticnum_x=0 -lan_ipaddr_t= -wan_pppoe_mru=1492 -vts_desc_x= -wl0_mode=ap -wan_gateway= -usb_webrectime_x=0 -dhcp_staticmac_x= -time_interval=20 -dhcp_start=192.168.1.2 -usb_websecurity_x=0 -url_keyword_x= -wan_etherspeed_x=auto -wl0_ap_isolate=0 -dr_staticgateway_x= -vts_port_x= -usb_webfresh_x=1 -dhcp_end=192.168.1.254 -filter_wl_date_x=1111111 -os_flash_addr=bfc40000 -wl0_gmode=1 -dhcp_lease=86400 -usb_ftpnum_x=0 -filter_wl_icmp_x= -boardtype=bcm95365r -filter_lw_proto_x= -is_default=1 -usb_ftprights_x= -usb_ftpport_x=21 -url_num_x=0 -filter_lw_date_x=1111111 -wl_gmode=1 -wan_gateway_t= -stats_server= -ntp_server0=time.nist.gov -usb_websecurity_date_x=1111111 -ntp_server1= -filter_lw_icmp_x= -lan_netmask=255.255.255.0 -wl0_dtim=1 -wl0_ssid=default -filter_wl_dstport_x= -http_username=admin -usb_ftpbanip_x= -usb_ftpenable_x=1 -fw_wl_enable_x=0 -os_date=Oct 11 2004 -usb_webremote5_x= -http_lanport=80 -wl_plcphdr=long -wl_macmode=disabled -wan_domain= -wan_hwname= -wl0_key1= -wl_phytype=b -wan_netmask= -lan_lease=86400 -wl0_key2= -wl_lazywds=0 -wl0_key3= -macfilter_num_x=0 -wl0_key4= -filter_client0= -ddns_username_x= -wan_hwaddr_x= -filter_maclist= -wl_auth_mode=open -usb_webremote1_x= -usb_webhttpcheck_x=0 -usb_websense_x=1 -autofw_outport_x= -misc_lpr_x=0 -usb_ftpstaytimeout_x=240 -filter_lw_num_x=0 -filter_wl_num_x=0 -sp_battle_ips=1 -wl_wpa_psk= -http_passwd=admin -qos_ipaddr_x= -wan_pppoe_demand=0 -lan_stp=1 -fw_lw_enable_x=0 -wl_mode=ap -wl0_plcphdr=long -wl0_rate=0 -wl0_closed=0 -wl0_macmode=disabled -wl_wpa_gtk_rekey=0 -wl0_radioids=BCM2050 -wl0_phytype=g -wl0_lazywds=0 -dr_default_x=1 -filter_wl_dstip_x= -autofw_inport_x= -wan_route_x=IP_Routed -wl0_afterburner=off -dr_staticnetmask_x=0 -wl0_antdiv=-1 -lan_hwaddr= -wan_dns= -filter_lw_srcip_x= -wl_mode_ex=ap -wan_dns2_x= -wl_dtim=1 -wl_ssid=default -wl0_wpa_psk= -dhcp_staticnum_x=0 -wan_pppoe_mtu=1492 -usb_webcaption_x=Web Camera Live Demo!!! -wan_netmask_t= -dhcp_wins=wan -wl_macapply_x=Both -os_server= -dr_static_matric_x=1 -wl_key1= -wan_proto=dhcp -sr_num_x=0 -wl_key2= -wl0_unit=0 -wan_ipaddr_t= -wl_key3= -wl_country_code=AU -wl_key4= -wl_hwaddr= -ddns_enable_x=0 -sr_if_x= -usb_websendto_x= -wan_pppoe_idletime=1800 -wl0_wds= -filter_wl_proto_x= -usb_ftpmax_x=12 -sr_rip_x=0 -wl_rate=0 -log_level=0 -ntp_server=192.5.41.40 192.5.41.41 133.100.9.2 -wan_hwaddr= -usb_webremote4_x= -sr_enable_x=0 -misc_http_x=0 -wl_phrase_x= -lan_ifnames=eth0 eth1 -wl0_radius_port=1812 -wl0_auth=0 -wl0_radius_ipaddr= -ddns_wildcard_x=0 -lan_hostname= -wl_country= -vlan_enable=1 -qos_priority_x= -wl_wep_x=0 -filter_lw_srcport_x= -usb_webhttpport_x=7776 -wan_pppoe_username= -wan_ifnames=eth0 -wl_crypto=0 -wl_rateset=default -usb_webremote_x=LAN Only -lan_gateway_t= -qos_maxbw_x= -autofw_num_x=0 -wl_radius_key= -lan_proto=dhcp -os_name=linux -lan_ipaddr=192.168.1.1 -clkfreq=200 -url_enable_x=0 -wan_dns_t= -wl_unit=0 -wl0_phytypes=g -wl0_frag=2346 -wl0_wep=disabled -router_disable=0 -sdram_config=0x32 -wl0_country= -wl_wdslist_x= -dhcp_gateway_x= -usb_ftpsuper_x=0 -dmz_ipaddr= -wl_wds= -scratch=a0180000 -wl0_rateset=default -usb_ftppasswd_x= -wan_dns1_x= -usb_ftpanonymous_x=1 -wan_primary=0 -lan_ifname=br0 -usb_webmode_x=1 -filter_wl_srcip_x= -sdram_refresh=0x00 -qos_dir_x= -dhcp_domain=wan -usb_webenable_x=1 -wl_auth=0 -sdram_ncdl=0x3e -usb_ftpmaxuser_x= -usb_webdriver_x=0 -hardware_version=WL500gd-01-04-01-50 -usb_ftptimeout_x=120 -wl_frameburst=0 -ezc_enable=1 -qos_minbw_x= -wl_macnum_x=0 -is_modified=0 -wan_ipaddr= -usb_websubject_x=Motion detection alert!!! -dmz_ip= -sr_gateway_x= -misc_natlog_x=0 -wl0_rts=2347 -wan_pppoe_relay_x=0 -wl_ifname= -wan_wins= -wl_wep=disabled -os_version=1.3.2.0 -wl_gmode_protection=auto -wl0_wpa_gtk_rekey=0 -wl_radio_time_x=00002359 -dhcp_staticip_x= -lan_netmask_t= -wl_frag=2346 -wl0_key=1 -dhcp_static_x=0 -macfilter_list_x= -usb_webremote3_x= -wl_maclist= -filter_macmode=deny -filter_lw_default_x=ACCEPT -filter_wl_srcport_x= -console_loglevel=1 -et0phyaddr=254 -time_zone=GMT0 -autofw_inproto_x= -vts_enable_x=1 -fw_enable_x=1 -usb_webattach_x=1 -wan_ifname=eth0 -wl_radioids= -wan_status_t= -vts_num_x=0 -wan_hostname= -wl0_radio=1 -wl_corerev= -sr_ipaddr_x= -dr_static_rip_x=0 -qos_port_x= -wl_channel=0 -wl0_bcn=100 -sr_matric_x= -wl0_hwaddr=00:11:D8:01:CB:3E -wl_afterburner=off -wl_radio=1 -usb_ftpscript_x= -ezc_version=1 -wl0_gmode_protection=auto -usb_webimage_x=1 -wl_radio_date_x=1111111 -wl0_maclist= -autofw_outproto_x= -ddns_passwd_x= -wl_rts=2347 -sdram_init=0x2008 -macfilter_enable_x=disabled -wl_ap_isolate=0 -wan_desc= -lan_wins= -lan_hwnames= -dl_ram_addr=a0001000 -url_time_x=00002359 -wan_dnsenable_x=1 -wl0_radius_key= -regulation_domain=0x30DE -wl_radio_power_x=19 -autofw_enable_x=0 -wl0_corerev=5 -wl_key=1 -wl0_channel=0 -ddns_hostname_x= -lan_proto_x=1 -sr_netmask_x= -upnp_enable=1 -fw_log_x=none -wan_pppoe_ac= -dhcp_enable_x=1 -misc_httpport_x=8080 -wan_proto_t= -wl0_auth_mode=open -wl_closed=0 -wan_heartbeat_x= -autofw_port0= -wl0_crypto=0 -dhcp_wins_x= -autofw_desc_x= -boardnum=45 -wan_pppoe_ifname= -dr_staticipaddr_x= -vts_protono_x= -wl_bcn=100 -qos_rulenum_x=0 -url_date_x=1111111 -ddns_server_x= -usb_bannum_x=0 -wl_antdiv=-1 diff --git a/openwrt/docs/hardware/asus/wl-500gd/pci.txt b/openwrt/docs/hardware/asus/wl-500gd/pci.txt deleted file mode 100644 index 2cca7f88090..00000000000 --- a/openwrt/docs/hardware/asus/wl-500gd/pci.txt +++ /dev/null @@ -1,64 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0501: PCI device 14e4:0800 (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x1fc00000 [0x1fffffff]. - Non-prefetchable 32 bit memory at 0x1c000000 [0x1dffffff]. - Non-prefetchable 32 bit memory at 0x1a000000 [0x1bffffff]. - Bus 0, device 1, function 0: - Class 0200: PCI device 14e4:4713 (rev 1). - IRQ 4. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 1000: PCI device 14e4:4718 (rev 1). - IRQ 5. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0c03: PCI device 14e4:4715 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0604: PCI device 14e4:0804 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Non-prefetchable 32 bit memory at 0x8000000 [0xfffffff]. - Bus 0, device 5, function 0: - Class 0b30: PCI device 14e4:0816 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Bus 0, device 6, function 0: - Class 0500: PCI device 14e4:080f (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0x9fffffff]. - Bus 1, device 0, function 0: - Class 0600: PCI device 14e4:5365 (rev 0). - IRQ 2. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x40000000 [0x40001fff]. - Prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Bus 1, device 2, function 0: - Class 0c03: PCI device 1106:3038 (rev 97). - IRQ 2. - Master Capable. Latency=22. - I/O at 0x100 [0x11f]. - Bus 1, device 2, function 1: - Class 0c03: PCI device 1106:3038 (rev 97). - IRQ 2. - Master Capable. Latency=22. - I/O at 0x120 [0x13f]. - Bus 1, device 2, function 2: - Class 0c03: PCI device 1106:3104 (rev 99). - IRQ 2. - Master Capable. Latency=22. - Non-prefetchable 32 bit memory at 0x40002000 [0x400020ff]. - Bus 1, device 3, function 0: - Class 0280: PCI device 14e4:4320 (rev 3). - IRQ 2. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x40004000 [0x40005fff]. - diff --git a/openwrt/docs/hardware/buffalo/wbr2-g54/cpuinfo.txt b/openwrt/docs/hardware/buffalo/wbr2-g54/cpuinfo.txt deleted file mode 100644 index 335b012b927..00000000000 --- a/openwrt/docs/hardware/buffalo/wbr2-g54/cpuinfo.txt +++ /dev/null @@ -1,12 +0,0 @@ -system type : Broadcom BCM947XX -processor : 0 -cpu model : BCM3302 V0.7 -BogoMIPS : 199.47 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : no -hardware watchpoint : no -VCED exceptions : not available -VCEI exceptions : not available - diff --git a/openwrt/docs/hardware/buffalo/wbr2-g54/dmesg-2_4_29.txt b/openwrt/docs/hardware/buffalo/wbr2-g54/dmesg-2_4_29.txt deleted file mode 100644 index 4fc73849c1f..00000000000 --- a/openwrt/docs/hardware/buffalo/wbr2-g54/dmesg-2_4_29.txt +++ /dev/null @@ -1,89 +0,0 @@ -PU revision is: 00029007 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.29 (kaloz@arrakis) (gcc version 3.3.5) #1 Sun Mar 27 17:16:55 CEST 2005 -Determined physical RAM map: - memory: 01000000 @ 00000000 (usable) -On node 0 totalpages: 4096 -zone(0): 4096 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM4712 rev 1 at 200 MHz -Using 100.000 MHz high precision timer. -Calibrating delay loop... 199.47 BogoMIPS -Memory: 14028k/16384k available (1493k kernel code, 2356k reserved, 104k data, 88k init, 0k highmem) -Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) -Inode cache hash table entries: 1024 (order: 1, 8192 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 4096 (order: 2, 16384 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Disabled -PCI: Fixing up bus 0 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0xb8000300 (irq = 3) is a 16550A -ttyS01 at 0xb8000400 (irq = 0) is a 16550A -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -PPP generic driver version 2.4.2 -Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0 - Amd/Fujitsu Extended Query Table v1.3 at 0x0040 -number of CFI chips: 1 -cfi_cmdset_0002: Disabling fast programming due to code brokenness. -Flash device: 0x400000 at 0x1c000000 -Creating 4 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x003f0000 : "linux" -0x000f0000-0x003f0000 : "rootfs" -0x003f0000-0x00400000 : "nvram" -sflash: found no supported devices -Initializing Cryptographic API -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 1024 bind 2048) -ip_conntrack version 2.1 (128 buckets, 1024 max) - 288 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -cramfs: wrong magic -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 88k freed -Algorithmics/MIPS FPU Emulator v1.5 -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:02.0 to 64 -5325E phy=FFFFFFFF -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 00:01.0 to 64 -eth1: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan0: add 01:00:5e:00:00:01 mcast address to master interface -device eth1 entered promiscuous mode -br0: port 2(eth1) entering learning state -br0: port 1(vlan0) entering learning state -br0: port 2(eth1) entering forwarding state -br0: topology change detected, propagating -br0: port 1(vlan0) entering forwarding state -br0: topology change detected, propagating -vlan1: add 01:00:5e:00:00:01 mcast address to master interface diff --git a/openwrt/docs/hardware/buffalo/wbr2-g54/info.txt b/openwrt/docs/hardware/buffalo/wbr2-g54/info.txt deleted file mode 100644 index 60f15239cb1..00000000000 --- a/openwrt/docs/hardware/buffalo/wbr2-g54/info.txt +++ /dev/null @@ -1,19 +0,0 @@ -Buffalo WBR2-G54 - -Online Description from Buffalo: -http://www.buffalotech.co.uk/webcontent/products/wireless/index.php?cat=G54&itemID=wbr2-g54 - -CPU: BCM4712 at 200 MHz -RAM: 16 MB -Flash: 4 MB -1 Broadcom BCM47xx 10/100 Mbps Ethernet Controller -1 Broadcom BCM4320 802.11 Wireless Controller -serial port possible -JTAG interface - -List of files: -nvram.txt: contents of NVRAM after OpenWRT upgrade -cpuinfo.txt: contents of /proc/cpuinfo (2.4.29) -pci.txt: contents of /proc/pci (2.4.29) -dmesg-2_4_29.txt: dmesg from Kernel 2.4.29 - diff --git a/openwrt/docs/hardware/buffalo/wbr2-g54/nvram.txt b/openwrt/docs/hardware/buffalo/wbr2-g54/nvram.txt deleted file mode 100644 index df73509fae8..00000000000 --- a/openwrt/docs/hardware/buffalo/wbr2-g54/nvram.txt +++ /dev/null @@ -1,100 +0,0 @@ -wl0_net_mode=mixed -os_ram_addr=80001000 -wl0_frameburst=off -boardrev=0x10 -il0macaddr=00:0D:0B:1A:93:8D -et0macaddr=00:0D:0B:1A:93:8C -boot_wait=on -watchdog=1000 -wl0_infra=1 -wl0_country_code=AU -et0mdcport=0 -pmon_ver=CFE 3.51.21.10 -wl0_ifname=eth1 -gpio2=adm_eecs -gpio3=adm_eesk -gpio4=adm_eedi -gpio5=adm_rc -vlan0ports=1 2 3 4 5* -wl0_mode=ap -wl0_ap_isolate=0 -os_flash_addr=bfc40000 -wl0_gmode=6 -sromrev=2 -boardtype=0x0101 -lan_netmask=255.255.255.0 -wl0_dtim=1 -wl0_ssid=000D0B1A938D -wl0_key1= -wl0id=0x4320 -wl0_key2= -wl0_key3= -wl0_key4= -pmon_date=Feb 20 2004 16:36:31 -ag0=255 -buffalo_id=29bb0332 -wl0_plcphdr=long -wl0_rate=0 -wl0_closed=0 -wl0_macmode=disabled -wl0gpio0=2 -wl0_radioids=BCM2050 -wl0gpio1=0 -wl0_phytype=g -wl0gpio2=0 -wl0_lazywds=1 -wl0gpio3=0 -wl0gpio4=0 -wl0gpio5=0 -boardflags2=0 -wl0_afterburner=auto -wl0_antdiv=-1 -wl0_wpa_psk= -wl0_unit=0 -wl_country_code=AU -memc_config=0x00048540 -pa0itssit=62 -wl0_wds= -cctl=0 -wl0_radius_port=1812 -wl0_auth=0 -wl0_radius_ipaddr= -pa0maxpwr=60 -clkfreq=200 -lan_ipaddr=192.168.11.1 -vlan1hwname=et0 -aa0=3 -wl0_phytypes=g -wl0_frag=2346 -wl0_wep=disabled -sdram_config=0x0032 -wl0_country= -vlan1ports=0 5 -scratch=a0180000 -ccode=0 -wl0_rateset=default -boardflags=0x0188 -sdram_refresh=0x0000 -sdram_ncdl=0x23 -wl0_rts=2347 -wl0_wpa_gtk_rekey=3600 -wl0_key=1 -et0phyaddr=30 -wl0_radio=1 -wl0_bcn=100 -wl0_hwaddr=00:0D:0B:1A:93:8D -wl0_gmode_protection=auto -pa0b0=0x1136 -wl0_maclist= -pa0b1=0xfb93 -pa0b2=0xfea5 -sdram_init=0x0000 -vlan0hwname=et0 -dl_ram_addr=a0001000 -wl0_radius_key= -wl0_corerev=7 -wl0_channel=11 -wl0_auth_mode=open -wl0_crypto=tkip -boardnum=00 - diff --git a/openwrt/docs/hardware/buffalo/wbr2-g54/pci.txt b/openwrt/docs/hardware/buffalo/wbr2-g54/pci.txt deleted file mode 100644 index 5bf36abbbc6..00000000000 --- a/openwrt/docs/hardware/buffalo/wbr2-g54/pci.txt +++ /dev/null @@ -1,38 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0501: PCI device 14e4:0800 (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x1fc00000 [0x1fffffff]. - Non-prefetchable 32 bit memory at 0x1c000000 [0x1dffffff]. - Non-prefetchable 32 bit memory at 0x1a000000 [0x1bffffff]. - Bus 0, device 1, function 0: - Class 0280: PCI device 14e4:4320 (rev 1). - IRQ 4. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 0200: PCI device 14e4:4713 (rev 1). - IRQ 5. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0c03: PCI device 14e4:4717 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0c03: PCI device 14e4:4716 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Bus 0, device 5, function 0: - Class 0b30: PCI device 14e4:0816 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Bus 0, device 6, function 0: - Class 0500: PCI device 14e4:080f (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0x9fffffff]. - diff --git a/openwrt/docs/hardware/buffalo/wla2-g54l/cpuinfo.txt b/openwrt/docs/hardware/buffalo/wla2-g54l/cpuinfo.txt deleted file mode 100644 index 1e914412812..00000000000 --- a/openwrt/docs/hardware/buffalo/wla2-g54l/cpuinfo.txt +++ /dev/null @@ -1,11 +0,0 @@ -system type : Broadcom BCM947XX -processor : 0 -cpu model : BCM3302 V0.7 -BogoMIPS : 199.47 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : no -hardware watchpoint : no -VCED exceptions : not available -VCEI exceptions : not available diff --git a/openwrt/docs/hardware/buffalo/wla2-g54l/dmesg-2_4_29.txt b/openwrt/docs/hardware/buffalo/wla2-g54l/dmesg-2_4_29.txt deleted file mode 100644 index a0c93c24b84..00000000000 --- a/openwrt/docs/hardware/buffalo/wla2-g54l/dmesg-2_4_29.txt +++ /dev/null @@ -1,85 +0,0 @@ -CPU revision is: 00029007 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.29 (kaloz@arrakis) (gcc version 3.3.5) #1 Fri Mar 25 12:39:57 CET 2005 -Determined physical RAM map: - memory: 01000000 @ 00000000 (usable) -On node 0 totalpages: 4096 -zone(0): 4096 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM4712 rev 1 at 200 MHz -Using 100.000 MHz high precision timer. -Calibrating delay loop... 199.47 BogoMIPS -Memory: 14096k/16384k available (1463k kernel code, 2288k reserved, 104k data, 88k init, 0k highmem) -Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) -Inode cache hash table entries: 1024 (order: 1, 8192 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 4096 (order: 2, 16384 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Disabled -PCI: Fixing up bus 0 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0xb8000300 (irq = 3) is a 16550A -ttyS01 at 0xb8000400 (irq = 0) is a 16550A -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0 - Amd/Fujitsu Extended Query Table v1.0 at 0x0040 -number of CFI chips: 1 -cfi_cmdset_0002: Disabling fast programming due to code brokenness. -Flash device: 0x400000 at 0x1c000000 -Creating 4 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x003f0000 : "linux" -0x000f0000-0x003f0000 : "rootfs" -0x003f0000-0x00400000 : "nvram" -sflash: found no supported devices -Initializing Cryptographic API -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 1024 bind 2048) -ip_conntrack version 2.1 (128 buckets, 1024 max) - 288 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 88k freed -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 00000101 -using v2 hardware -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:02.0 to 64 -5325E phy=FFFFFFFF -5325E VLAN programming for BCM5325E-MDIO I/F switch -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 00:01.0 to 64 -eth1: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan0: add 01:00:5e:00:00:01 mcast address to master interface -br0: port 1(vlan0) entering learning state -br0: port 1(vlan0) entering forwarding state -br0: topology change detected, propagating diff --git a/openwrt/docs/hardware/buffalo/wla2-g54l/info.txt b/openwrt/docs/hardware/buffalo/wla2-g54l/info.txt deleted file mode 100644 index b979cdd8d93..00000000000 --- a/openwrt/docs/hardware/buffalo/wla2-g54l/info.txt +++ /dev/null @@ -1,18 +0,0 @@ -Buffalo WLA2-G54L - -Online Description from Buffalo: -http://www.buffalotech.co.uk/webcontent/products/wireless/index.php?cat=G54&itemID=wla2-g54l - -CPU: BCM4712 at 200 MHz -RAM: 16 MB -Flash: 4 MB -1 Broadcom BCM47xx 10/100 Mbps Ethernet Controller -1 Broadcom BCM4320 802.11 Wireless Controller -serial port possible -no JTAG interface - -List of files: -nvram.txt: contents of NVRAM after OpenWRT upgrade -cpuinfo.txt: contents of /proc/cpuinfo (2.4.29) -pci.txt: contents of /proc/pci (2.4.29) -dmesg-2_4_29.txt: dmesg from Kernel 2.4.29 diff --git a/openwrt/docs/hardware/buffalo/wla2-g54l/nvram.txt b/openwrt/docs/hardware/buffalo/wla2-g54l/nvram.txt deleted file mode 100644 index 8545f1a001f..00000000000 --- a/openwrt/docs/hardware/buffalo/wla2-g54l/nvram.txt +++ /dev/null @@ -1,455 +0,0 @@ -ni_netmask=255.255.255.0 -wl_radius_port=1812 -pppoe_demand_select_1=1 -pppoe_demand_select_2=1 -pppoe_demand_select_3=1 -os_ram_addr=80001000 -dhcp_except= -pppoe_demand_select_4=1 -wl0_net_mode=mixed -log_send_forward=0 -wl0_frameburst=on -log_send_enable=0 -il0macaddr=00:0D:0B:41:8A:C3 -boardrev=0x10 -filter_udp= -ntp_interval=24 -forward_ipmasq_time=5 -hostname= -et0macaddr=00:0D:0B:41:8A:C2 -pppoe_demand_1=0 -wl_gmode_protection_cts=1 -pppoe_demand_2=0 -wl_pwrout_per=100 -wep_ascii_select1=1 -log_dhcp_cli=1 -pppoe_demand_3=0 -d11b_rateset=default -d11a_channel=64 -d11g_mode=5 -wep_ascii_select2=1 -pppoe_demand_4=0 -wl0_wep_buf= -watchdog=1000 -boot_wait=on -wep_ascii_select3=1 -wep_ascii_select4=1 -wl0_macmode1=disabled -ini_ipaddr=192.168.11.100 -wl0_infra=1 -et0mdcport=0 -wl0_country_code=AU -d11b_bcn=100 -pppoe_keepalive=1 -log_send_config=1 -pppoe_label_1= -pppoe_label_2= -pmon_ver=CFE 3.51.21.10 -pppoe_label_3= -d11g_protection=0 -restore_defaults=0 -attack_spoofing=0 -pppoe_label_4= -wan_lease=864000 -d11b_frag=2346 -d11g_dtim=1 -filter_melco= -http_wanport= -wl_radius_ipaddr= -pppoe_label= -pppoe_demand_select=1 -wan_hwaddr_select_def=1 -pppoe_mtu_1=1454 -wl0_ifname=eth1 -pppoe_mtu_2=1454 -timer_interval=3600 -pppoe_mtu_3=1454 -gpio2=adm_eecs -filter_lansetup=0 -pppoe_mtu_4=1454 -gpio3=adm_eesk -gpio4=adm_eedi -dhcp_manual= -ap_name=AP000D0B418AC2 -pppoe_mtu=1454 -vlan0ports=1 2 3 4 5* -gpio5=adm_rc -log_disp_name=NEWEST -route_pppoe= -filter_tcp= -pppoe_keepalive_1=1 -pppoe_keepalive_2=1 -log_attack=0 -pppoe_keepalive_3=1 -wl0_mode=ap -dhcp_start=192.168.11.2 -pppoe_keepalive_4=1 -wl0_ap_isolate=0 -httpc_auth_ipaddr_tmp= -dhcp_end=192.168.11.17 -log_send_dhcp_serv=0 -os_flash_addr=bfc40000 -domain= -log_send_dhcp_cli=1 -sromrev=2 -ap_wl_version= -wl0_gmode=5 -httpc_login_off_time=5 -pppoe_username_1= -boardtype=0x0101 -pppoe_username_2= -attack_cm_addr= -pppoe_username_3= -wl_gmode=5 -pppoe_username_4= -stats_server= -log_pppoe=0 -static_route= -d11g_rate=0 -log_ntpcli=1 -lan_netmask=255.255.255.0 -log_send_pppoe=0 -attack_select=0 -wl0_wep_last= -http_username=root -wl0_ssid=000D0B418AC2 -wl0_dtim=1 -pmon_upgrade=0 -http_lanport=80 -wl_plcphdr=long -wl_macmode=disabled -lcp_echo_failure_1=6 -wan_hwname= -log_disp_page=0 -lcp_echo_failure_2=6 -wl0id=0x4320 -wan_netmask=255.255.255.0 -d11a_dtim=1 -lcp_echo_failure_3=6 -wl_phytype=g -wl0_key1= -wl_lazywds=0 -lcp_echo_failure_4=6 -wl0_key2= -wl0_key3= -wl0_key4= -wl_auth_mode=disabled -log_etc=1 -pppoe_mru_1=1454 -pppoe_mru_2=1454 -dhcp_domain_select=NONE -attack_mail_pop_addr= -pppoe_mru_3=1454 -d11g_rts=2347 -pppoe_mru_4=1454 -pmon_date=Mar 12 2004 14:29:18 -ag0=255 -http_passwd= -wl_wpa_psk= -d11b_channel=11 -melco_web_carrier_select= -wl_wds_list= -log_level_notice=1 -log_power=1 -lan_stp=0 -forward_melco= -dhcp_dns_ip1= -log_wired=1 -wan_ipaddr_bak= -buffalo_id=29129 -wl_mode=ap -dhcp_dns_ip2= -log_send_power=1 -log_send_wired=1 -melco_web_lan=0 -wl0_closed=0 -wl0_rate=0 -wl0_plcphdr=long -wl0gpio0=2 -wl_wpa_gtk_rekey=0 -d11g_rateset=default -wl0_macmode=disabled -wl0gpio1=0 -wl0_radioids=BCM2050 -wl0gpio2=0 -wl0_phytype=g -wl0gpio3=0 -wl0_lazywds=0 -wl0gpio4=0 -dhcp_gw_select=AP -wl0gpio5=0 -pppoe_disable_1=0 -boardflags2=0 -pppoe_disable_2=0 -log_level_err=1 -pppoe_disable_3=0 -wl0_afterburner=auto -d11a_rate=0 -log_filter=1 -pppoe_disable_4=0 -lan_hwaddr= -wl0_antdiv=-1 -asts_data= -wl_ssid=000D0B418AC2 -wl_dtim=1 -wl0_wpa_psk= -d11g_bcn=100 -time_zone_melco=GMT+6 -log_send_level_notice=1 -pppoe_hostuniq_1= -httpc_auth_ipaddr= -pppoe_hostuniq_2= -wl0_mac_list= -dhcp_wins= -pppoe_hostuniq_3= -os_server= -ap_fw_code=00 -pppoe_hostuniq_4= -wan_proto=dhcp -wl_key1= -wl_key2= -wl_key3= -wl0_unit=0 -wl_key4= -wl_country_code=AU -memc_config=0x0004854a -wl_hwaddr=00:0D:0B:41:8A:C3 -pppoe_session_default=-1 -pppoe_manual=0 -dhcp_wins_select=NONE -pa0itssit=62 -flash_recover=1 -wl_txpwr=22 -wl_mac_melco= -ntp_enable=0 -time_backup=2003.01.01-00:00:00 -melco_web_wan=0 -attack_threshold=5 -pppoe_passwd_confirm= -dhcp_range=16 -log_send_etc=1 -d11g_frag=2346 -wl0_wds= -wl_rate=0 -pppoe_incom_1=0 -cctl=0 -log_level=1 -d11a_rts=2347 -filter_ident=0 -pppoe_incom_2=0 -ntp_server= -pppoe_incom_3=0 -wan_hwaddr= -pppoe_incom_4=0 -lan_ifnames=eth0 eth2 -wl_limit_select=0 -pppoe_ifname= -filter_wdssetup=0 -pppoe_auth_1=AUTO -wl0_auth=0 -wl0_mac_deny= -wl0_radius_port=1812 -pppoe_auth_2=AUTO -pppoe_auth_3=AUTO -wl0_radius_ipaddr= -pppoe_service= -pppoe_auth_4=AUTO -wl_country=Worldwide -pa0maxpwr=60 -attack_synfd_iplimit=5 -lcp_echo_interval=60 -wl_rateset=default -log_send_attack=0 -pppoe_retransmit_1=4 -http_passwd_confirm= -pppoe_retransmit_2=4 -pppoe_retransmit_3=4 -dhcp_start_melco=192.168.11.2 -pppoe_retransmit_4=4 -lan_ipaddr=192.168.11.100 -clkfreq=200 -os_name=linux -lan_proto=static -wl_radius_key= -aa0=3 -vlan1hwname=et0 -dns_manual0= -wl_unit=0 -filter_wanping=1 -dns_manual1= -wan_connecttime= -wl0_phytypes=g -d11a_bcn=100 -d11g_channel=11 -wl0_wep=off -wl0_frag=2346 -wins= -pppoe_incom=0 -pppoe_passwd= -pppoe_registered_1=0 -sdram_config=0x0032 -filter_nbt=0 -log_send_ntpcli=1 -melco_web_select= -pppoe_registered_2=0 -pppoe_registered_3=0 -wl0_country=Worldwide -vlan1ports=0 5 -dmz_ipaddr= -pppoe_registered_4=0 -wl_wds= -scratch=a0180000 -dns= -d11a_frag=2346 -ccode=0 -filter_ip= -melco_web_setuzoku=0 -wl0_rateset=default -attack_mail_to= -pppoe_idletime_1=20 -log_firewall=1 -pppoe_idletime_2=20 -lcp_echo_failure=6 -wl0_wep_bit=64 -pppoe_idletime=20 -pppoe_idletime_3=20 -log_server= -asts_enable=1 -pppoe_idletime_4=20 -lan_ifname=br0 -attack_mail_pop_pass= -boardflags=0x0188 -rip_wan_recv=0 -sdram_refresh=0x0000 -log_config=1 -wl0_afterburner_override=-1 -dhcp_domain= -wl_auth=0 -sdram_ncdl=0x20422 -filter_mac= -wl_frameburst=on -attack_cm_select=0 -filter_wlansetup=0 -log_forward=0 -wan_ipaddr=1.1.1.1 -forward_enable=1 -asts_sta_data= -wl0_passphrase= -gateway_manual= -lcp_echo_interval_1=60 -attack_mail_select=0 -attack_synfd_limit=0 -lcp_echo_interval_2=60 -wl0_rts=2347 -wl_ssid_mac=1 -pppoe_passwd_1= -lcp_echo_interval_3=60 -pppoe_passwd_2= -lcp_echo_interval_4=60 -wl_ifname=eth2 -wl_wep=off -pppoe_passwd_3= -d11b_dtim=1 -d11b_plcphdr=long -dhcp_gw_ip= -pppoe_passwd_4= -os_version=3.60.9.0 -wan_speed=AUTO -pppoe_username= -wl_gmode_protection=auto -gateway=0.0.0.0 -asts_deny_mac= -wl0_wpa_gtk_rekey=0 -log_dhcp_serv=0 -wl_frag=2346 -httpc_ipaddr= -wl0_key=1 -log_send_filter=1 -wl0_active_mac= -wl_maclist= -et0phyaddr=30 -console_loglevel=1 -time_zone=PST8PDT -d11a_rateset=default -d11g_shortslot_restrict=0 -wl_ssid_input= -wan_mdi=0 -pppoe_ac_name= -pppoe_passwd_confirm_1= -log_send_level_err=1 -log_send_firewall=1 -pppoe_passwd_confirm_2= -wan_ifname= -attack_mail_from= -pppoe_disable=0 -pppoe_passwd_confirm_3= -d11a_hwaddr= -rip_lan_recv=3 -ap_version=BUFFALO Ver.1.00 -pppoe_passwd_confirm_4= -wl_mac= -pppoe_service_1= -wl0_radio=1 -pppoe_service_2= -wl_channel=11 -d11g_hwaddr= -pppoe_service_3= -pppoe_service_4= -wl0_bcn=100 -dhcp_dns_select=AP -wl_wds_enable=0 -forward_udp= -wl_radio=1 -wl0_hwaddr=00:0D:0B:41:8A:C3 -d11b_rate=0 -forward_group= -rip_wan_send=0 -ap_hw_code=00 -wl0_wep_gen= -pa0b0=0x1136 -dhcp_lease_time=48 -log_wlcli=1 -wl0_gmode_protection=auto -pa0b1=0xfb93 -attack_dos_rules=0 -wl0_maclist= -pa0b2=0xfea5 -sdram_init=0x000a -wl_rts=2347 -log_send_wlcli=1 -pppoe_hostuniq= -ping_ipaddr=192.168.11.1 -vlan0hwname=et0 -dl_ram_addr=a0001000 -lan_hwnames=et0 wl0 -attack_mail_pop_user= -pppoe_registered=0 -pppoe_retransmit=4 -pppoe_demand=0 -pmon_upgrade_mode=0 -pppoe_ac_name_1= -wl0_radius_key= -pppoe_ac_name_2= -pppoe_ac_name_3= -wl0_corerev=7 -wl_key=1 -lan_speed=AUTO -pppoe_ac_name_4= -pppoe_mru=1454 -wl0_channel=11 -phytst=0 -pppoe_auth=AUTO -upnp_enable=1 -wl_ps=0 -product_name=Product_name -wl_closed=0 -wl0_auth_mode=disabled -wl0_crypto=tkip -boardnum=00 -attack_mail_smtp_addr= -boardtype_2=0 -wl_bcn=100 -d11b_rts=2347 -forward_tcp= -d11b_hwaddr= -rip_lan_send=0 diff --git a/openwrt/docs/hardware/buffalo/wla2-g54l/pci.txt b/openwrt/docs/hardware/buffalo/wla2-g54l/pci.txt deleted file mode 100644 index 2be172663fe..00000000000 --- a/openwrt/docs/hardware/buffalo/wla2-g54l/pci.txt +++ /dev/null @@ -1,37 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0501: PCI device 14e4:0800 (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x1fc00000 [0x1fffffff]. - Non-prefetchable 32 bit memory at 0x1c000000 [0x1dffffff]. - Non-prefetchable 32 bit memory at 0x1a000000 [0x1bffffff]. - Bus 0, device 1, function 0: - Class 0280: PCI device 14e4:4320 (rev 1). - IRQ 4. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 0200: PCI device 14e4:4713 (rev 1). - IRQ 5. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0c03: PCI device 14e4:4717 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0c03: PCI device 14e4:4716 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Bus 0, device 5, function 0: - Class 0b30: PCI device 14e4:0816 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Bus 0, device 6, function 0: - Class 0500: PCI device 14e4:080f (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0x9fffffff]. diff --git a/openwrt/docs/hardware/linksys/wrt54g_v11/cpuinfo.txt b/openwrt/docs/hardware/linksys/wrt54g_v11/cpuinfo.txt deleted file mode 100644 index b3cfcfb0b40..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v11/cpuinfo.txt +++ /dev/null @@ -1,16 +0,0 @@ -system type : Broadcom BCM947XX -processor : 0 -cpu model : BCM4710 V0.0 -BogoMIPS : 82.94 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : no -hardware watchpoint : no -VCED exceptions : not available -VCEI exceptions : not available -dcache hits : 2866936757 -dcache misses : 57830034 -icache hits : 1724839356 -icache misses : 431170605 -instructions : 2156850242 diff --git a/openwrt/docs/hardware/linksys/wrt54g_v11/dmesg-2_4_29.txt b/openwrt/docs/hardware/linksys/wrt54g_v11/dmesg-2_4_29.txt deleted file mode 100644 index 58e5ce54cc4..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v11/dmesg-2_4_29.txt +++ /dev/null @@ -1,96 +0,0 @@ -CPU revision is: 00024000 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.29 (nthill@mr-grey) (gcc version 3.3.5) #1 Tue Mar 1 19:49:53 CET 2005 -Determined physical RAM map: - memory: 01000000 @ 00000000 (usable) -On node 0 totalpages: 4096 -zone(0): 4096 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM4710 rev 0 at 125 MHz -Using 62.400 MHz high precision timer. -!unable to setup serial console! -Calibrating delay loop... 82.94 BogoMIPS -Memory: 14044k/16384k available (1485k kernel code, 2340k reserved, 100k data, 100k init, 0k highmem) -Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) -Inode cache hash table entries: 1024 (order: 1, 8192 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 4096 (order: 2, 16384 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Fixing up bus 0 -PCI: Fixing up bridge -PCI: Setting latency timer of device 01:00.0 to 64 -PCI: Fixing up bus 1 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -PPP generic driver version 2.4.2 - Amd/Fujitsu Extended Query Table v1.1 at 0x0040 -Physically mapped flash: Swapping erase regions for broken CFI table. -number of CFI chips: 1 -cfi_cmdset_0002: Disabling fast programming due to code brokenness. -Flash device: 0x400000 at 0x1fc00000 -Creating 5 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x003f0000 : "linux" -0x000edd94-0x001fd000 : "rootfs" -mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only -0x003f0000-0x00400000 : "nvram" -0x00200000-0x003f0000 : "OpenWrt" -sflash: chipcommon not found -Initializing Cryptographic API -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 1024 bind 2048) -ip_conntrack version 2.1 (128 buckets, 1024 max) - 288 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -VFS: Mounted root (squashfs filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 100k freed -Warning: unable to open an initial console. -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 0000041a -using v1 hardware -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:02.0 to 64 -5325E phy=FFFFFFFF -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 00:08.0 to 64 -5325E phy=FFFFFFFF -eth1: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 01:08.0 to 64 -PCI: Enabling device 01:08.0 (0004 -> 0006) -eth2: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan2: add 01:00:5e:00:00:01 mcast address to master interface -device eth1 entered promiscuous mode -device eth2 entered promiscuous mode -br0: port 3(eth2) entering learning state -br0: port 2(eth1) entering learning state -br0: port 1(vlan2) entering learning state -br0: port 3(eth2) entering forwarding state -br0: topology change detected, propagating -br0: port 2(eth1) entering forwarding state -br0: topology change detected, propagating -br0: port 1(vlan2) entering forwarding state -br0: topology change detected, propagating -vlan1: add 01:00:5e:00:00:01 mcast address to master interface diff --git a/openwrt/docs/hardware/linksys/wrt54g_v11/ifconfig.txt b/openwrt/docs/hardware/linksys/wrt54g_v11/ifconfig.txt deleted file mode 100644 index a47a11b7069..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v11/ifconfig.txt +++ /dev/null @@ -1,54 +0,0 @@ -br0 Link encap:Ethernet HWaddr 00:0C:41:B3:3C:55 - inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:6022 errors:0 dropped:0 overruns:0 frame:0 - TX packets:5768 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:356276 (347.9 KiB) TX bytes:457411 (446.6 KiB) - -eth0 Link encap:Ethernet HWaddr 00:0C:41:B3:3C:55 - UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 - RX packets:6204 errors:0 dropped:0 overruns:0 frame:0 - TX packets:5774 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:514297 (502.2 KiB) TX bytes:484047 (472.7 KiB) - Interrupt:3 Base address:0x2000 - -eth1 Link encap:Ethernet HWaddr 00:0C:41:B3:3C:56 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:66 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:0 (0.0 B) TX bytes:7209 (7.0 KiB) - Interrupt:4 Base address:0x8000 - -eth2 Link encap:Ethernet HWaddr 00:0C:41:B3:3C:57 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:2202 - TX packets:93 errors:36 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:0 (0.0 B) TX bytes:11951 (11.6 KiB) - Interrupt:6 Base address:0x2000 - -lo Link encap:Local Loopback - inet addr:127.0.0.1 Mask:255.0.0.0 - UP LOOPBACK RUNNING MTU:16436 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - -vlan1 Link encap:Ethernet HWaddr 00:0C:41:B3:3C:55 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:181 errors:0 dropped:0 overruns:0 frame:0 - TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:19634 (19.1 KiB) TX bytes:3564 (3.4 KiB) - -vlan2 Link encap:Ethernet HWaddr 00:0C:41:B3:3C:55 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:6023 errors:0 dropped:0 overruns:0 frame:0 - TX packets:5768 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:382991 (374.0 KiB) TX bytes:480483 (469.2 KiB) - diff --git a/openwrt/docs/hardware/linksys/wrt54g_v11/info.txt b/openwrt/docs/hardware/linksys/wrt54g_v11/info.txt deleted file mode 100644 index 2bd458d1603..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v11/info.txt +++ /dev/null @@ -1,23 +0,0 @@ -Linksys WRT54G v1.1 - -Online Description from Linksys: -http://www.linksys.com/products/product.asp?grid=33&scid=35&prid=601 - -CPU: BCM4710 at 125 MHz -RAM: 16 MB -Flash: 4 MB (AMD AM29LV320DT 2 M x 16-Bit) -1 Broadcom BCM47xx 10/100 Mbps Ethernet Controller -1 Broadcom BCM4320 802.11 Wireless Controller -1 Infineon-ADMtek ADM6996L 5-ports Ethernet swith -serial port possible (but not used) -JTAG interface available (but not used) - -List of files: -nvram.txt: contents of NVRAM after 'mtd erase' and OpenWRT upgrade -cpuinfo.txt: contents of /proc/cpuinfo (2.4.29) -pci.txt: contents of /proc/pci (2.4.29) -dmesg-2_4_29.txt: dmesg from Kernel 2.4.29 -lspci-vv.txt: output of lspci -vv -P ./proc/bus/pci (deported) - --- -Nico diff --git a/openwrt/docs/hardware/linksys/wrt54g_v11/lspci-vv.txt b/openwrt/docs/hardware/linksys/wrt54g_v11/lspci-vv.txt deleted file mode 100644 index d58a02b25f2..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v11/lspci-vv.txt +++ /dev/null @@ -1,92 +0,0 @@ -0000:00:00.0 RAM memory: Broadcom Corporation: Unknown device 0803 - Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- (32-bit, non-prefetchable) [disabled] [size=128M] - Region 2: Memory at 10000000 (32-bit, non-prefetchable) [disabled] [size=128M] - Region 3: Memory at 80000000 (32-bit, non-prefetchable) [disabled] [size=80000000] - Expansion ROM at [disabled] [size=2K] - -0000:00:01.0 Ethernet controller: Broadcom Corporation BCM47xx Sentry5 iLine32 HomePNA 2.0 - Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- [disabled] [size=2K] - -0000:00:02.0 Ethernet controller: Broadcom Corporation Sentry5 Ethernet Controller - Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- [disabled] [size=2K] - -0000:00:03.0 Modem: Broadcom Corporation Sentry5 UART (prog-if 00 [Generic]) - Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- [disabled] [size=2K] - -0000:00:04.0 USB Controller: Broadcom Corporation Sentry5 USB Controller (prog-if 10 [OHCI]) - Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- [disabled] [size=2K] - -0000:00:05.0 PCI bridge: Broadcom Corporation Sentry5 PCI Bridge (prog-if 00 [Normal decode]) - Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap+ 66MHz+ UDF+ FastB2B+ ParErr+ DEVSEL=?? >TAbort+ SERR+ [disabled] [size=2K] - BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B- - -0000:00:06.0 MIPS: Broadcom Corporation Sentry5 MIPS32 CPU - Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- [disabled] [size=2K] - -0000:00:07.0 FLASH memory: Broadcom Corporation Sentry5 External Interface Core - Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- [disabled] [size=2K] - -0000:00:08.0 Ethernet controller: Broadcom Corporation Sentry5 Ethernet Controller - Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- [disabled] [size=2K] - -0000:01:00.0 Host bridge: Broadcom Corporation BCM4710 Sentry5 PCI to SB Bridge (rev 01) - Subsystem: Broadcom Corporation BCM4710 Sentry5 PCI to SB Bridge - Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- (32-bit, prefetchable) [size=128M] - -0000:01:08.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03) - Subsystem: Tekram Technology Co.,Ltd.: Unknown device 1603 - Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- - Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- -All bugs added by David S. Miller -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 88k freed -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 00000101 -using v2 hardware -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:02.0 to 64 -5325E phy=FFFFFFFF -5325E VLAN programming for BCM5325E-MDIO I/F switch -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 00:01.0 to 64 -eth1: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan0: add 01:00:5e:00:00:01 mcast address to master interface -device eth1 entered promiscuous mode -br0: port 2(eth1) entering learning state -br0: port 1(vlan0) entering learning state -br0: port 2(eth1) entering forwarding state -br0: topology change detected, propagating -br0: port 1(vlan0) entering forwarding state -br0: topology change detected, propagating -vlan1: Setting MAC address to 00 0a 48 06 82 50. -vlan1: add 01:00:5e:00:00:01 mcast address to master interface -device br0 entered promiscuous mode -device br0 left promiscuous mode -device br0 entered promiscuous mode -device br0 left promiscuous mode - diff --git a/openwrt/docs/hardware/linksys/wrt54g_v20/ifconfig.txt b/openwrt/docs/hardware/linksys/wrt54g_v20/ifconfig.txt deleted file mode 100644 index 97922e093a7..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v20/ifconfig.txt +++ /dev/null @@ -1,46 +0,0 @@ -br0 Link encap:Ethernet HWaddr 00:0F:66:D3:11:8E - inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:370 errors:0 dropped:0 overruns:0 frame:0 - TX packets:232 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:22641 (22.1 KiB) TX bytes:37549 (36.6 KiB) - -eth0 Link encap:Ethernet HWaddr 00:0F:66:D3:11:8E - UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 - RX packets:110 errors:0 dropped:0 overruns:0 frame:0 - TX packets:548 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:23978 (23.4 KiB) TX bytes:69928 (68.2 KiB) - Interrupt:5 Base address:0x2000 - -eth1 Link encap:Ethernet HWaddr 00:0F:66:D3:11:90 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:479 errors:0 dropped:0 overruns:0 frame:2 - TX packets:407 errors:4 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:37211 (36.3 KiB) TX bytes:73096 (71.3 KiB) - Interrupt:4 Base address:0x1000 - -lo Link encap:Local Loopback - inet addr:127.0.0.1 Mask:255.0.0.0 - UP LOOPBACK RUNNING MTU:16436 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - -vlan0 Link encap:Ethernet HWaddr 00:0F:66:D3:11:8E - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:110 errors:0 dropped:0 overruns:0 frame:0 - TX packets:276 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:21998 (21.4 KiB) TX bytes:29605 (28.9 KiB) - -vlan1 Link encap:Ethernet HWaddr 00:0F:66:D3:11:8E - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:272 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:40323 (39.3 KiB) - diff --git a/openwrt/docs/hardware/linksys/wrt54g_v20/info.txt b/openwrt/docs/hardware/linksys/wrt54g_v20/info.txt deleted file mode 100644 index 8278e098ef9..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v20/info.txt +++ /dev/null @@ -1,19 +0,0 @@ -Linksys WRT54G v2.0 - -Online Description from Linksys: -http://www.linksys.com/products/product.asp?grid=33&scid=35&prid=601 - -CPU: BCM4712 at 200 MHz -RAM: 16 MB (32MB on the XH models, please check http://openwrt.org/forum/viewtopic.php?t=731) -Flash: 4 MB -1 Broadcom BCM47xx 10/100 Mbps Ethernet Controller -1 Broadcom BCM4320 802.11 Wireless Controller -serial port possible -JTAG interface - -List of files: -nvram.txt: contents of NVRAM after OpenWRT upgrade -cpuinfo.txt: contents of /proc/cpuinfo (2.4.29) -ifconfig.txt: output of ifconfig (2.4.29) -pci.txt: contents of /proc/pci (2.4.29) -dmesg-2_4_29.txt: dmesg (XH model, 2.4.29) diff --git a/openwrt/docs/hardware/linksys/wrt54g_v20/nvram.txt b/openwrt/docs/hardware/linksys/wrt54g_v20/nvram.txt deleted file mode 100644 index 6c37ad6550f..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v20/nvram.txt +++ /dev/null @@ -1,113 +0,0 @@ -wl0_net_mode=mixed -os_ram_addr=80001000 -wl0_frameburst=on -il0macaddr=00:0f:66:d3:11:90 -boardrev=0x10 -et0macaddr=00:0F:66:D3:11:8E -wl0_wep_buf= -watchdog=5000 -boot_wait=on -wl0_macmode1=disabled -wl0_infra=1 -wl0_country_code=AU -et0mdcport=0 -wl0_ap_ssid= -pmon_ver=CFE 3.51.21.0 -wl0_ifname=eth1 -gpio2=adm_eecs -gpio3=adm_eesk -ifnames=vlan0 vlan1 -vlan0ports=1 2 3 4 5* -gpio5=adm_eedi -gpio6=adm_rc -wl0_mrate=0 -wl0_mode=ap -wl0_ap_isolate=0 -os_flash_addr=bfc40000 -wl0_gmode=1 -sromrev=2 -boardtype=0x0101 -wl0_wep_last= -lan_netmask=255.255.255.0 -wl0_dtim=1 -wl0_ssid=b0rken -wl0_key1= -wl0id=0x4320 -wl0_key2= -wl0_key3= -wl0_key4= -wl_auth_mode=open -ag0=255 -wl0_plcphdr=long -wl0_rate=0 -wl0_closed=1 -wl0_macmode=disabled -wl0_radioids=BCM2050 -wl0_phytype=g -wl0gpio2=0 -wl0_lazywds=1 -wl0gpio3=0 -boardflags2=0 -wl0_afterburner=auto -lan_hwaddr=00:0F:66:D3:11:8E -wl0_antdiv=-1 -wl0_mac_list= -wl0_unit=0 -wl_country_code=AU -pa0itssit=62 -wl0_wds= -cctl=0 -lan_ifnames=vlan0 vlan1 eth1 -wl0_radius_port=1812 -wl0_mac_deny= -wl0_auth=0 -wl0_radius_ipaddr= -pa0maxpwr=0x48 -wan_ifnames=vlan1 -wl_crypto=tkip -lan_proto=static -lan_ipaddr=192.168.1.1 -clkfreq=200 -aa0=3 -vlan1hwname=et0 -wl0_phytypes=g -wl0_frag=2346 -wl0_wep=disabled -sdram_config=0x0032 -wl0_country=Worldwide -vlan1ports=0 5 -scratch=a0180000 -ccode=0 -wl0_rateset=default -wl0_wep_bit=64 -lan_ifname=br0 -boardflags=0x0188 -wl0_afterburner_override=-1 -sdram_refresh=0x0000 -sdram_ncdl=0x25 -wl0_passphrase= -wl0_rts=2347 -wl_wep=disabled -wl0_wpa_gtk_rekey=3600 -wl0_key=1 -wl0_active_mac= -et0phyaddr=30 -wl0_radio=1 -wl0_bcn=100 -wl0_hwaddr=00:0F:66:D3:11:90 -wl0_wep_gen= -wl0_gmode_protection=auto -pa0b0=0x170c -wl0_maclist= -pa0b1=0xfa24 -pa0b2=0xfe70 -sdram_init=0x0000 -vlan0hwname=et0 -dl_ram_addr=a0001000 -wl0_radius_key= -wl0_corerev=7 -wl0_channel=6 -wl0_auth_mode=open -boot_ver=v2.3 -boardnum=42 -wl0_ap_ip= diff --git a/openwrt/docs/hardware/linksys/wrt54g_v20/pci.txt b/openwrt/docs/hardware/linksys/wrt54g_v20/pci.txt deleted file mode 100644 index cd7aafc1363..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v20/pci.txt +++ /dev/null @@ -1,37 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0501: PCI device 14e4:0800 (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x1fc00000 [0x1fffffff]. - Non-prefetchable 32 bit memory at 0x1c000000 [0x1dffffff]. - Non-prefetchable 32 bit memory at 0x1a000000 [0x1bffffff]. - Bus 0, device 1, function 0: - Class 0280: PCI device 14e4:4320 (rev 1). - IRQ 4. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 0200: PCI device 14e4:4713 (rev 1). - IRQ 5. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0c03: PCI device 14e4:4717 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0c03: PCI device 14e4:4716 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Bus 0, device 5, function 0: - Class 0b30: PCI device 14e4:0816 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Bus 0, device 6, function 0: - Class 0500: PCI device 14e4:080f (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0x9fffffff]. diff --git a/openwrt/docs/hardware/linksys/wrt54g_v22/cpuinfo.txt b/openwrt/docs/hardware/linksys/wrt54g_v22/cpuinfo.txt deleted file mode 100644 index dd54f9c676a..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v22/cpuinfo.txt +++ /dev/null @@ -1,16 +0,0 @@ -system type : Broadcom BCM947XX -processor : 0 -cpu model : BCM3302 V0.7 -BogoMIPS : 199.06 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : no -hardware watchpoint : no -VCED exceptions : not available -VCEI exceptions : not available -dcache hits : 4244635257 -dcache misses : 1073741821 -icache hits : 4181718158 -icache misses : 4080970363 -instructions : 0 diff --git a/openwrt/docs/hardware/linksys/wrt54g_v22/dmesg-2_4_29.txt b/openwrt/docs/hardware/linksys/wrt54g_v22/dmesg-2_4_29.txt deleted file mode 100644 index ee7151d2220..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v22/dmesg-2_4_29.txt +++ /dev/null @@ -1,117 +0,0 @@ -CPU revision is: 00029007 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.29 (wbx@auriga) (gcc version 3.3.5) #1 Thu Feb 17 23:51:07 CET 2005 -Determined physical RAM map: -memory: 01000000 @ 00000000 (usable) -On node 0 totalpages: 4096 -zone(0): 4096 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM4712 rev 1 at 200 MHz -Using 100.000 MHz high precision timer. -Calibrating delay loop... 199.06 BogoMIPS -Memory: 14044k/16384k available (1474k kernel code, 2340k reserved, 100k data, 100k init, 0k highmem) -Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) -Inode cache hash table entries: 1024 (order: 1, 8192 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 4096 (order: 2, 16384 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Disabled -PCI: Fixing up bus 0 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0xb8000300 (irq = 3) is a 16550A -ttyS01 at 0xb8000400 (irq = 0) is a 16550A -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -PPP generic driver version 2.4.2 -Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0 -cfi_cmdset_0001: Erase suspend on write enabled -0: offset=0x0,size=0x2000,blocks=8 -1: offset=0x10000,size=0x10000,blocks=63 -Using word write method -Flash device: 0x400000 at 0x1c000000 -Physically mapped flash: squashfs filesystem found at block 946 -Creating 5 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x003f0000 : "linux" -0x000ec990-0x001ceb48 : "rootfs" -mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only -0x003f0000-0x00400000 : "nvram" -0x001d0000-0x003f0000 : "OpenWrt" -sflash: found no supported devices -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 1024 bind 2048) -ip_conntrack version 2.1 (128 buckets, 1024 max) - 288 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -VFS: Mounted root (squashfs filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 100k freed -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 00000708 -using v1 hardware -led -> 00 -led -> 01 -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:02.0 to 64 -5325E phy=0 -5325E VLAN programming for BCM5325E-MDIO I/F switch -1:(0x00) value=0x0000 -2:(0x00) value=0x0000 -1:(0x13) value=0x001e -2:(0x13) value=0x001e -1:(0x00) value=0x0000 -2:(0x00) value=0x0000 -1:(0x13) value=0x001e -2:(0x13) value=0x001e -1:(0x00) value=0x0000 -2:(0x00) value=0x0000 -1:(0x13) value=0x001e -2:(0x13) value=0x001e -1:(0x00) value=0x0000 -2:(0x00) value=0x0000 -1:(0x13) value=0x001e -2:(0x13) value=0x001e -1:(0x00) value=0x0000 -2:(0x00) value=0x0000 -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 00:01.0 to 64 -eth1: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan0: add 01:00:5e:00:00:01 mcast address to master interface -device eth1 entered promiscuous mode -br0: port 2(eth1) entering learning state -br0: port 1(vlan0) entering learning state -br0: port 2(eth1) entering forwarding state -br0: topology change detected, propagating -br0: port 1(vlan0) entering forwarding state -br0: topology change detected, propagating -vlan1: Setting MAC address to 00 12 17 cc cd 25. -vlan1: add 01:00:5e:00:00:01 mcast address to master interface -led -> 00 - diff --git a/openwrt/docs/hardware/linksys/wrt54g_v22/ifconfig.txt b/openwrt/docs/hardware/linksys/wrt54g_v22/ifconfig.txt deleted file mode 100644 index 48cbbe5429e..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v22/ifconfig.txt +++ /dev/null @@ -1,46 +0,0 @@ -br0 Link encap:Ethernet HWaddr 00:12:17:CC:CD:24 - inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:125 errors:0 dropped:0 overruns:0 frame:0 - TX packets:97 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:5155 (5.0 KiB) TX bytes:22844 (22.3 KiB) - -eth0 Link encap:Ethernet HWaddr 00:12:17:CC:CD:24 - UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 - RX packets:125 errors:0 dropped:0 overruns:0 frame:0 - TX packets:97 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:8554 (8.3 KiB) TX bytes:23232 (22.6 KiB) - Interrupt:5 Base address:0x2000 - -eth1 Link encap:Ethernet HWaddr 00:12:17:CC:CD:26 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:3083 - TX packets:1 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:0 (0.0 B) TX bytes:50 (50.0 B) - Interrupt:4 Base address:0x1000 - -lo Link encap:Local Loopback - inet addr:127.0.0.1 Mask:255.0.0.0 - UP LOOPBACK RUNNING MTU:16436 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - -vlan0 Link encap:Ethernet HWaddr 00:12:17:CC:CD:24 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:125 errors:0 dropped:0 overruns:0 frame:0 - TX packets:97 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:6304 (6.1 KiB) TX bytes:23232 (22.6 KiB) - -vlan1 Link encap:Ethernet HWaddr 00:12:17:CC:CD:25 - inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) diff --git a/openwrt/docs/hardware/linksys/wrt54g_v22/info.txt b/openwrt/docs/hardware/linksys/wrt54g_v22/info.txt deleted file mode 100644 index e9b2ccdf7fd..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v22/info.txt +++ /dev/null @@ -1,18 +0,0 @@ -Linksys WRT54G v2.2 - -Online Description from Linksys: -http://www.linksys.com/products/product.asp?grid=33&scid=35&prid=601 - -CPU: BCM4712 at 200 MHz -RAM: 16 MB -Flash: 4 MB -1 Broadcom BCM47xx 10/100 Mbps Ethernet Controller -1 Broadcom BCM4320 802.11 Wireless Controller -serial port possible -JTAG interface - -List of files: -nvram.txt: contents of NVRAM after OpenWRT upgrade -cpuinfo.txt: contents of /proc/cpuinfo (2.4.29) -pci.txt: contents of /proc/pci (2.4.29) -dmesg-2_4_29.txt: dmesg from Kernel 2.4.29 diff --git a/openwrt/docs/hardware/linksys/wrt54g_v22/nvram.txt b/openwrt/docs/hardware/linksys/wrt54g_v22/nvram.txt deleted file mode 100644 index 02c765ea1d1..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v22/nvram.txt +++ /dev/null @@ -1,477 +0,0 @@ - -Intel_firmware_version=v1.41.8 -QoS=0 -aa0=3 -action_service=start_ping -action_service_arg1= -ag0=255 -aol_block_traffic1=0 -aol_block_traffic2=0 -aol_block_traffic=0 -autofw_port0= -bcm4712_firmware_version=v1.50.0 -block_activex=0 -block_cookie=0 -block_java=0 -block_loopback=0 -block_proxy=0 -block_wan=1 -boardflags2=0 -boardflags=0x0118 -boardnum=42 -boardrev=0x10 -boardtype=0x0708 -boot_ver=v3.4 -boot_wait=on -bootnv_ver=2 -ccode=0 -cctl=0 -clkfreq=200 -console_loglevel=1 -ct_modules= -d11g_bcn=100 -d11g_channel=11 -d11g_dtim=1 -d11g_frag=2346 -d11g_mode=1 -d11g_rate=0 -d11g_rateset=default -d11g_rts=2347 -daylight_time=1 -ddns_cache= -ddns_change= -ddns_enable=0 -ddns_enable_buf= -ddns_hostname= -ddns_hostname_2= -ddns_hostname_buf= -ddns_interval=60 -ddns_passwd= -ddns_passwd_2= -ddns_passwd_buf= -ddns_status= -ddns_username= -ddns_username_2= -ddns_username_buf= -def_hwaddr=00:00:00:00:00:00 -dhcp_domain=wan -dhcp_lease=0 -dhcp_num=50 -dhcp_start=100 -dhcp_wins=wan -dl_ram_addr=a0001000 -dmz_enable=0 -dmz_ipaddr=0 -dr_lan_rx=0 -dr_lan_tx=0 -dr_setting=0 -dr_wan_rx=0 -dr_wan_tx=0 -eou_configured=1 -eou_device_id=CXLVVGWQ -eou_expired_hour=72 -eou_key_index=1 -eou_private_key=a752d99baa01b0889aee1c9bc9e49fd05a046e7183f9f21c21caa2bf832f341a98c2d2b6d299dd621cba5a02c7da6f36d5881cb29a0306483e63b74e3321b39c1b6e88d66ec200adbbc04412ae6a744bcf6530fdcfea8106e340c8012cadf32ddb37ff714c9588b1d0c141381433f1f0f96cabf9336002a87d39b24181193bf1 -eou_public_key=b1c8073564a1cb91249cfe658682e9cd5fa4b5589c39913de3e74ceb7b62275c424effe23fc37b383e85ffa2f458162a42e09e7dc3a336acc249f2c31653ced787dd8aae9eb3335c17569f2c17e677170ec9ad119ba6541065c760e096fd230e5ef4592e1dc2a9efbf564d666df5ac200b0c6dd96e2d33edb773f95cab4650c111 -et0macaddr=00:12:17:CC:CD:24 -et0mdcport=0 -et0phyaddr=30 -ezc_enable=1 -ezc_version=2 -filter=on -filter_client0= -filter_dport_grp10= -filter_dport_grp1= -filter_dport_grp2= -filter_dport_grp3= -filter_dport_grp4= -filter_dport_grp5= -filter_dport_grp6= -filter_dport_grp7= -filter_dport_grp8= -filter_dport_grp9= -filter_id=1 -filter_ip_grp10= -filter_ip_grp1= -filter_ip_grp2= -filter_ip_grp3= -filter_ip_grp4= -filter_ip_grp5= -filter_ip_grp6= -filter_ip_grp7= -filter_ip_grp8= -filter_ip_grp9= -filter_mac_grp10= -filter_mac_grp1= -filter_mac_grp2= -filter_mac_grp3= -filter_mac_grp4= -filter_mac_grp5= -filter_mac_grp6= -filter_mac_grp7= -filter_mac_grp8= -filter_mac_grp9= -filter_maclist= -filter_macmode=deny -filter_port= -filter_port_grp10= -filter_port_grp1= -filter_port_grp2= -filter_port_grp3= -filter_port_grp4= -filter_port_grp5= -filter_port_grp6= -filter_port_grp7= -filter_port_grp8= -filter_port_grp9= -filter_rule10= -filter_rule1= -filter_rule2= -filter_rule3= -filter_rule4= -filter_rule5= -filter_rule6= -filter_rule7= -filter_rule8= -filter_rule9= -filter_services=$NAME:003:DNS$PROT:003:udp$PORT:005:53:53< >$NAME:004:Ping$PROT:004:icmp$PORT:003:0:0< >$NAME:004:HTTP$PROT:003:tcp$PORT:005:80:80< >$NAME:005:HTTPS$PROT:003:tcp$PORT:007:443:443< >$NAME:003:FTP$PROT:003:tcp$PORT:005:21:21< >$NAME:004:POP3$PROT:003:tcp$PORT:007:110:110< >$NAME:004:IMAP$PROT:003:tcp$PORT:007:143:143< >$NAME:004:SMTP$PROT:003:tcp$PORT:005:25:25< >$NAME:004:NNTP$PROT:003:tcp$PORT:007:119:119< >$NAME:006:Telnet$PROT:003:tcp$PORT:005:23:23< >$NAME:004:SNMP$PROT:003:udp$PORT:007:161:161< >$NAME:004:TFTP$PROT:003:udp$PORT:005:69:69< >$NAME:003:IKE$PROT:003:udp$PORT:007:500:500< > -filter_tod10= -filter_tod1= -filter_tod2= -filter_tod3= -filter_tod4= -filter_tod5= -filter_tod6= -filter_tod7= -filter_tod8= -filter_tod9= -filter_tod_buf10= -filter_tod_buf1= -filter_tod_buf2= -filter_tod_buf3= -filter_tod_buf4= -filter_tod_buf5= -filter_tod_buf6= -filter_tod_buf7= -filter_tod_buf8= -filter_tod_buf9= -filter_web_host10= -filter_web_host1= -filter_web_host2= -filter_web_host3= -filter_web_host4= -filter_web_host5= -filter_web_host6= -filter_web_host7= -filter_web_host8= -filter_web_host9= -filter_web_url10= -filter_web_url1= -filter_web_url2= -filter_web_url3= -filter_web_url4= -filter_web_url5= -filter_web_url6= -filter_web_url7= -filter_web_url8= -filter_web_url9= -firmware_version=v3.03.1 -flash_type=Intel 28F320C3 2Mx16 BotB -forward_port= -fw_disable=0 -gpio5=robo_reset -hb_server_domain= -hb_server_ip= -http_client_ip=192.168.1.2 -http_client_mac=00:D0:59:9D:7C:8D -http_enable=1 -http_lanport=80 -http_method=post -http_passwd=admin -http_username= -http_wanport=8080 -https_enable=0 -ident_pass=0 -il0macaddr=00:12:17:cc:cd:26 -ipsec_pass=1 -is_default=0 -is_modified=1 -l2tp_get_ip= -l2tp_pass=1 -l2tp_server_ip= -lan_domain= -lan_hwaddr=00:12:17:CC:CD:24 -lan_hwnames= -lan_ifname=br0 -lan_ifnames=vlan0 eth1 eth2 eth3 -lan_ipaddr=192.168.1.1 -lan_lease=86400 -lan_netmask=255.255.255.0 -lan_proto=static -lan_stp=0 -lan_wins= -log_enable=0 -log_ipaddr=0 -log_level=0 -mac_clone_enable=0 -manual_rate=0 -mtu_enable=0 -multicast_pass=0 -ntp_mode=auto -ntp_server= -os_date=Oct 18 2004 -os_flash_addr=bfc40000 -os_name=linux -os_ram_addr=80001000 -os_server= -os_version=3.61.13.0 -pa0b0=0x15eb -pa0b1=0xfa82 -pa0b2=0xfe66 -pa0itssit=62 -pa0maxpwr=0x4e -ping_ip=;*/n${IFS}show>tmp/ping.log -ping_times=5 -pmon_ver=CFE 3.61.13.0 -port_flow_control_1=1 -port_flow_control_2=1 -port_flow_control_3=1 -port_flow_control_4=1 -port_priority_1=0 -port_priority_2=0 -port_priority_3=0 -port_priority_4=0 -port_rate_limit_1=0 -port_rate_limit_2=0 -port_rate_limit_3=0 -port_rate_limit_4=0 -port_trigger= -ppp_ac= -ppp_demand=1 -ppp_get_ac= -ppp_get_srv= -ppp_idletime=5 -ppp_keepalive=0 -ppp_mru=1500 -ppp_mtu=1500 -ppp_passwd= -ppp_redialperiod=30 -ppp_service= -ppp_static=0 -ppp_static_ip= -ppp_username= -pppoe_ac= -pppoe_demand=1 -pppoe_idletime=5 -pppoe_ifname= -pppoe_keepalive=0 -pppoe_passwd= -pppoe_service= -pppoe_static=0 -pppoe_static_ip= -pppoe_username= -pptp_get_ip= -pptp_pass=1 -pptp_server_ip= -qos_appname1= -qos_appname2= -qos_appname3= -qos_appport1=0 -qos_appport2=0 -qos_appport3=0 -qos_devmac1=00:00:00:00:00:00 -qos_devmac2=00:00:00:00:00:00 -qos_devname1= -qos_devname2= -qos_devpri1=0 -qos_devpri2=0 -rate_mode=1 -remote_management=0 -remote_mgt_https=0 -restore_defaults=0 -router_disable=0 -router_name=WRT54G -scratch=a0180000 -sdram_config=0x0062 -sdram_init=0x000b -sdram_ncdl=0xfd0009 -sdram_refresh=0x0000 -security_mode=disabled -security_mode_last= -sel_qosftp=0 -sel_qoshttp=0 -sel_qospop3=0 -sel_qosport1=0 -sel_qosport2=0 -sel_qosport3=0 -sel_qossmtp=0 -sel_qostelnet=0 -skip_amd_check=0 -skip_intel_check=0 -sromrev=2 -static_route= -static_route_name= -stats_server= -time_zone=-08 1 1 -timer_interval=30 -traceroute_ip= -upnp_enable=1 -upnp_wan_proto= -vlan0hwname=et0 -vlan0ports=1 2 3 4 5* -vlan1hwname=et0 -vlan1ports=0 5 -wan_dns= -wan_domain= -wan_gateway=10.0.0.254 -wan_gateway_buf=0.0.0.0 -wan_get_dns= -wan_get_domain= -wan_hostname= -wan_hwaddr=00:12:17:CC:CD:25 -wan_hwname= -wan_iface=vlan1 -wan_ifname=vlan1 -wan_ifnames=vlan1 -wan_ipaddr=10.0.0.1 -wan_ipaddr_buf=0.0.0.0 -wan_lease=0 -wan_mtu=1500 -wan_netmask=255.255.255.0 -wan_primary=1 -wan_proto=static -wan_run_mtu=1500 -wan_unit=0 -wan_wins= -watchdog=5000 -web_wl_filter=0 -wk_mode=gateway -wl0_active_mac= -wl0_afterburner=off -wl0_antdiv=-1 -wl0_ap_ip= -wl0_ap_isolate=0 -wl0_ap_ssid= -wl0_auth=0 -wl0_auth_mode=open -wl0_bcn=100 -wl0_channel=11 -wl0_closed=0 -wl0_corerev=7 -wl0_country=Worldwide -wl0_country_code=AU -wl0_crypto=tkip -wl0_dtim=1 -wl0_frag=2346 -wl0_frameburst=off -wl0_gmode=1 -wl0_gmode_protection=off -wl0_hwaddr=00:12:17:CC:CD:26 -wl0_ifname=eth1 -wl0_infra=1 -wl0_key1= -wl0_key2= -wl0_key3= -wl0_key4= -wl0_key=1 -wl0_lazywds=1 -wl0_mac_deny= -wl0_mac_list= -wl0_maclist= -wl0_macmode1=disabled -wl0_macmode=disabled -wl0_mode=ap -wl0_mrate=0 -wl0_net_mode=mixed -wl0_passphrase= -wl0_phytype=g -wl0_phytypes=g -wl0_plcphdr=long -wl0_radio=1 -wl0_radioids=BCM2050 -wl0_radius_ipaddr= -wl0_radius_key= -wl0_radius_port=1812 -wl0_rate=0 -wl0_rateset=default -wl0_rts=2347 -wl0_ssid=linksys -wl0_unit=0 -wl0_wds= -wl0_wep=disabled -wl0_wep_bit=64 -wl0_wep_buf= -wl0_wep_gen= -wl0_wep_last= -wl0_wpa_gtk_rekey=3600 -wl0_wpa_psk= -wl0gpio2=0 -wl0gpio3=0 -wl0id=0x4320 -wl_active_add_mac=0 -wl_active_mac= -wl_afterburner=off -wl_antdiv=-1 -wl_ap_ip= -wl_ap_isolate=0 -wl_ap_ssid= -wl_atten_bb=3 -wl_atten_ctl=48 -wl_atten_radio=4 -wl_auth=0 -wl_auth_mode=open -wl_bcn=100 -wl_cck= 3 -wl_channel=11 -wl_closed=0 -wl_corerev= -wl_country=Worldwide -wl_country_code=AU -wl_crypto=tkip -wl_delay=1 -wl_dtim=1 -wl_frag=2346 -wl_frameburst=off -wl_gmode=1 -wl_gmode_protection=off -wl_hwaddr= -wl_ifname= -wl_infra=1 -wl_key1= -wl_key2= -wl_key3= -wl_key4= -wl_key=1 -wl_lazywds=1 -wl_mac_deny= -wl_mac_list= -wl_maclist= -wl_macmode1=disabled -wl_macmode=disabled -wl_mode=ap -wl_mrate=0 -wl_net_mode=mixed -wl_ofdm= 0 -wl_passphrase= -wl_phytype=g -wl_phytypes= -wl_plcphdr=long -wl_radio=1 -wl_radioids= -wl_radius_ipaddr= -wl_radius_key= -wl_radius_port=1812 -wl_rate=0 -wl_rateset=default -wl_rts=2347 -wl_ssid=linksys -wl_tssi_result= 3 -wl_unit=0 -wl_wds= -wl_wep=disabled -wl_wep_bit=64 -wl_wep_buf= -wl_wep_gen= -wl_wep_last= -wl_wpa_gtk_rekey=3600 -wl_wpa_psk= diff --git a/openwrt/docs/hardware/linksys/wrt54g_v22/pci.txt b/openwrt/docs/hardware/linksys/wrt54g_v22/pci.txt deleted file mode 100644 index 2be172663fe..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54g_v22/pci.txt +++ /dev/null @@ -1,37 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0501: PCI device 14e4:0800 (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x1fc00000 [0x1fffffff]. - Non-prefetchable 32 bit memory at 0x1c000000 [0x1dffffff]. - Non-prefetchable 32 bit memory at 0x1a000000 [0x1bffffff]. - Bus 0, device 1, function 0: - Class 0280: PCI device 14e4:4320 (rev 1). - IRQ 4. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 0200: PCI device 14e4:4713 (rev 1). - IRQ 5. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0c03: PCI device 14e4:4717 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0c03: PCI device 14e4:4716 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Bus 0, device 5, function 0: - Class 0b30: PCI device 14e4:0816 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Bus 0, device 6, function 0: - Class 0500: PCI device 14e4:080f (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0x9fffffff]. diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v10/cpuinfo.txt b/openwrt/docs/hardware/linksys/wrt54gs_v10/cpuinfo.txt deleted file mode 100644 index 404c148b69c..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v10/cpuinfo.txt +++ /dev/null @@ -1,16 +0,0 @@ -system type : Broadcom BCM947XX -processor : 0 -cpu model : BCM3302 V0.7 -BogoMIPS : 199.06 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : no -hardware watchpoint : no -VCED exceptions : not available -VCEI exceptions : not available -dcache hits : 4278190076 -dcache misses : 1840115641 -icache hits : 4294967071 -icache misses : 4294967287 -instructions : 0 diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v10/dmesg-2_4_29.txt b/openwrt/docs/hardware/linksys/wrt54gs_v10/dmesg-2_4_29.txt deleted file mode 100644 index de5f8d82409..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v10/dmesg-2_4_29.txt +++ /dev/null @@ -1,88 +0,0 @@ -CPU revision is: 00029007 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.29 (wbx@auriga) (gcc version 3.3.5) #1 Mon Feb 21 17:40:12 CET 2005 -Determined physical RAM map: -memory: 02000000 @ 00000000 (usable) -On node 0 totalpages: 8192 -zone(0): 8192 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM4712 rev 1 at 200 MHz -Using 100.000 MHz high precision timer. -Calibrating delay loop... 199.06 BogoMIPS -Memory: 30260k/32768k available (1477k kernel code, 2508k reserved, 100k data, 100k init, 0k highmem) -Dentry cache hash table entries: 4096 (order: 3, 32768 bytes) -Inode cache hash table entries: 2048 (order: 2, 16384 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 8192 (order: 3, 32768 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Disabled -PCI: Fixing up bus 0 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0xb8000300 (irq = 3) is a 16550A -ttyS01 at 0xb8000400 (irq = 0) is a 16550A -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -PPP generic driver version 2.4.2 -Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 -cfi_cmdset_0001: Erase suspend on write enabled -0: offset=0x0,size=0x20000,blocks=64 -Using buffer write method -Flash device: 0x800000 at 0x1c000000 -Creating 5 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x007e0000 : "linux" -0x00100000-0x002a0000 : "rootfs" -0x007e0000-0x00800000 : "nvram" -0x002a0000-0x007e0000 : "OpenWrt" -sflash: found no supported devices -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 2048 bind 4096) -ip_conntrack version 2.1 (256 buckets, 2048 max) - 288 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 100k freed -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 00000101 -using v2 hardware -led -> 00 -led -> 01 -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:02.0 to 64 -5325E phy=FFFFFFFF -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 00:01.0 to 64 -eth1: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan0: add 01:00:5e:00:00:01 mcast address to master interface -device eth1 entered promiscuous mode -br0: port 2(eth1) entering learning state -br0: port 1(vlan0) entering learning state -br0: port 2(eth1) entering forwarding state -br0: topology change detected, propagating -br0: port 1(vlan0) entering forwarding state -br0: topology change detected, propagating -vlan1: add 01:00:5e:00:00:01 mcast address to master interface diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v10/ifconfig.txt b/openwrt/docs/hardware/linksys/wrt54gs_v10/ifconfig.txt deleted file mode 100644 index 8e205ef5c69..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v10/ifconfig.txt +++ /dev/null @@ -1,45 +0,0 @@ -br0 Link encap:Ethernet HWaddr 00:0F:66:C8:74:44 - inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - -eth0 Link encap:Ethernet HWaddr 00:0F:66:C8:74:44 - UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:66 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:0 (0.0 B) TX bytes:39204 (38.2 KiB) - Interrupt:5 Base address:0x2000 - -eth1 Link encap:Ethernet HWaddr 00:0F:66:C8:74:46 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:7245 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - Interrupt:4 Base address:0x1000 - -lo Link encap:Local Loopback - inet addr:127.0.0.1 Mask:255.0.0.0 - UP LOOPBACK RUNNING MTU:16436 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - -vlan0 Link encap:Ethernet HWaddr 00:0F:66:C8:74:44 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - -vlan1 Link encap:Ethernet HWaddr 00:0F:66:C8:74:44 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:66 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:39204 (38.2 KiB) diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v10/info.txt b/openwrt/docs/hardware/linksys/wrt54gs_v10/info.txt deleted file mode 100644 index 23c2271ef75..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v10/info.txt +++ /dev/null @@ -1,18 +0,0 @@ -Linksys WRT54GS v1.0 - -Online Description from Linksys: -http://www.linksys.com/products/product.asp?grid=33&scid=35&prid=610 - -CPU: BCM4712 at 200 MHz -RAM: 32 MB -Flash: 8 MB -1 Broadcom BCM47xx 10/100 Mbps Ethernet Controller -1 Broadcom BCM4320 802.11 Wireless Controller -serial port possible -JTAG interface - -List of files: -nvram.txt: contents of NVRAM after nvram erase in CFE -cpuinfo.txt: contents of /proc/cpuinfo (2.4.29) -pci.txt: contents of /proc/pci (2.4.29) -dmesg-2_4_29.txt: dmesg from Kernel 2.4.29 diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v10/nvram.txt b/openwrt/docs/hardware/linksys/wrt54gs_v10/nvram.txt deleted file mode 100644 index bf70a4bf02b..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v10/nvram.txt +++ /dev/null @@ -1,105 +0,0 @@ -aa0=3 -ag0=255 -boardflags2=0 -boardflags=0x0388 -boardnum=42 -boardrev=0x10 -boardtype=0x0101 -boot_ver=v3.2 -boot_wait=yes -ccode=0 -cctl=0 -clkfreq=200 -dl_ram_addr=a0001000 -et0macaddr=00:0F:66:C8:74:44 -et0mdcport=0 -et0phyaddr=30 -gpio2=adm_eecs -gpio3=adm_eesk -gpio5=adm_eedi -gpio6=adm_rc -il0macaddr=00:0f:66:c8:74:46 -lan_ipaddr=192.168.1.1 -lan_netmask=255.255.255.0 -os_flash_addr=bfc40000 -os_ram_addr=80001000 -pa0b0=0x170c -pa0b1=0xfa24 -pa0b2=0xfe70 -pa0itssit=62 -pa0maxpwr=0x48 -pmon_ver=CFE 3.61.13.0 -scratch=a0180000 -sdram_config=0x0022 -sdram_init=0x0008 -sdram_ncdl=0x24 -sdram_refresh=0x0000 -sromrev=2 -vlan0hwname=et0 -vlan0ports=1 2 3 4 5* -vlan1hwname=et0 -vlan1ports=0 5 -watchdog=5000 -wl0_active_mac= -wl0_afterburner=auto -wl0_antdiv=-1 -wl0_ap_ip= -wl0_ap_isolate=0 -wl0_ap_ssid= -wl0_auth=0 -wl0_auth_mode=open -wl0_bcn=100 -wl0_channel=6 -wl0_closed=0 -wl0_corerev=7 -wl0_country=Worldwide -wl0_country_code=AU -wl0_crypto=tkip -wl0_dtim=1 -wl0_frag=2346 -wl0_frameburst=on -wl0_gmode=6 -wl0_gmode_protection=off -wl0_hwaddr=00:0F:66:C8:74:46 -wl0_ifname=eth1 -wl0_infra=1 -wl0_key1= -wl0_key2= -wl0_key3= -wl0_key4= -wl0_key=1 -wl0_lazywds=1 -wl0_mac_deny= -wl0_mac_list= -wl0_maclist= -wl0_macmode1=disabled -wl0_macmode=disabled -wl0_mode=ap -wl0_mrate=0 -wl0_net_mode=mixed -wl0_passphrase= -wl0_phytype=g -wl0_phytypes=g -wl0_plcphdr=long -wl0_radio=1 -wl0_radioids=BCM2050 -wl0_radius_ipaddr= -wl0_radius_key= -wl0_radius_port=1812 -wl0_rate=0 -wl0_rateset=default -wl0_rts=2347 -wl0_ssid=linksys -wl0_unit=0 -wl0_wds= -wl0_wep=disabled -wl0_wep_bit=64 -wl0_wep_buf= -wl0_wep_gen= -wl0_wep_last= -wl0_wpa_gtk_rekey=3600 -wl0_wpa_psk= -wl0gpio2=0 -wl0gpio3=0 -wl0id=0x4320 -wl_country_code=AU diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v10/pci.txt b/openwrt/docs/hardware/linksys/wrt54gs_v10/pci.txt deleted file mode 100644 index 2be172663fe..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v10/pci.txt +++ /dev/null @@ -1,37 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0501: PCI device 14e4:0800 (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x1fc00000 [0x1fffffff]. - Non-prefetchable 32 bit memory at 0x1c000000 [0x1dffffff]. - Non-prefetchable 32 bit memory at 0x1a000000 [0x1bffffff]. - Bus 0, device 1, function 0: - Class 0280: PCI device 14e4:4320 (rev 1). - IRQ 4. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 0200: PCI device 14e4:4713 (rev 1). - IRQ 5. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0c03: PCI device 14e4:4717 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0c03: PCI device 14e4:4716 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Bus 0, device 5, function 0: - Class 0b30: PCI device 14e4:0816 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Bus 0, device 6, function 0: - Class 0500: PCI device 14e4:080f (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0x9fffffff]. diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v11/cpuinfo.txt b/openwrt/docs/hardware/linksys/wrt54gs_v11/cpuinfo.txt deleted file mode 100644 index 8a5ba8fd99e..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v11/cpuinfo.txt +++ /dev/null @@ -1,11 +0,0 @@ -system type : Broadcom BCM947XX -processor : 0 -cpu model : BCM3302 V0.7 -BogoMIPS : 215.44 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : no -hardware watchpoint : no -VCED exceptions : not available -VCEI exceptions : not available diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v11/dmesg-2_4_30.txt b/openwrt/docs/hardware/linksys/wrt54gs_v11/dmesg-2_4_30.txt deleted file mode 100644 index 22afd53dc28..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v11/dmesg-2_4_30.txt +++ /dev/null @@ -1,83 +0,0 @@ -CPU revision is: 00029007 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.30 (kaloz@richese) (gcc version 3.4.3) #1 2005. máj. 20., péntek, 16.07.34 CEST -Determined physical RAM map: - memory: 02000000 @ 00000000 (usable) -On node 0 totalpages: 8192 -zone(0): 8192 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM4712 rev 1 at 216 MHz -Using 108.000 MHz high precision timer. -Calibrating delay loop... 215.44 BogoMIPS -Memory: 30256k/32768k available (1512k kernel code, 2512k reserved, 104k data, 88k init, 0k highmem) -Dentry cache hash table entries: 4096 (order: 3, 32768 bytes) -Inode cache hash table entries: 2048 (order: 2, 16384 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 8192 (order: 3, 32768 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Disabled -PCI: Fixing up bus 0 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0xb8000300 (irq = 3) is a 16550A -ttyS01 at 0xb8000400 (irq = 0) is a 16550A -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 -cfi_cmdset_0001: Erase suspend on write enabled -0: offset=0x0,size=0x20000,blocks=64 -Using buffer write method -Flash device: 0x800000 at 0x1c000000 -Creating 4 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x007e0000 : "linux" -0x000c0000-0x007e0000 : "rootfs" -0x007e0000-0x00800000 : "nvram" -Initializing Cryptographic API -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 2048 bind 4096) -ip_conntrack version 2.1 (5953 buckets, 5953 max) - 316 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 88k freed -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 00000708 -jffs2.bbc: SIZE compression mode activated. -b44.c:v0.93 (Mar, 2004) -PCI: Setting latency timer of device 00:02.0 to 64 -eth0: Broadcom 47xx 10/100BaseT Ethernet 00:13:10:07:ee:fc -PCI: Setting latency timer of device 00:01.0 to 64 -eth1: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan0: add 01:00:5e:00:00:01 mcast address to master interface -device eth1 entered promiscuous mode -br0: port 2(eth1) entering learning state -br0: port 1(vlan0) entering learning state -br0: port 2(eth1) entering forwarding state -br0: topology change detected, propagating -br0: port 1(vlan0) entering forwarding state -br0: topology change detected, propagating -vlan1: add 01:00:5e:00:00:01 mcast address to master interface diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v11/info.txt b/openwrt/docs/hardware/linksys/wrt54gs_v11/info.txt deleted file mode 100644 index 325f4cd7377..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v11/info.txt +++ /dev/null @@ -1,21 +0,0 @@ -Linksys WRT54GS v1.1 - -Online Description from Linksys: -http://www.linksys.com/products/product.asp?grid=33&scid=35&prid=610 - -CPU: BCM4712 at 216 MHz -RAM: 32 MB -Flash: 8 MB -1 Broadcom BCM47xx 10/100 Mbps Ethernet Controller -1 Broadcom BCM4320 802.11 Wireless Controller -serial port possible -JTAG interface - -List of files: -nvram.txt: contents of NVRAM after nvram erase and adjusted cpu speed -cpuinfo.txt: contents of /proc/cpuinfo with adjusted cpu speed (2.4.30) -pci.txt: contents of /proc/pci (2.4.30) -dmesg-2_4_30.txt: dmesg from Kernel 2.4.30 (using b44 and robocfg) - -Notes: -CPU runs at 200MHz default, You should adjust it to 216Mhz, as that fixes the problems during high network load. diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v11/nvram.txt b/openwrt/docs/hardware/linksys/wrt54gs_v11/nvram.txt deleted file mode 100644 index 9baf982af0f..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v11/nvram.txt +++ /dev/null @@ -1,94 +0,0 @@ -wl0_net_mode=mixed -os_ram_addr=80001000 -wl0_frameburst=off -boardrev=0x10 -il0macaddr=00:13:10:07:ee:fe -bootnv_ver=2 -et0macaddr=00:13:10:07:EE:FC -boot_wait=on -watchdog=5000 -wl0_infra=1 -wl0_country_code=AU -et0mdcport=0 -pmon_ver=CFE 3.61.13.0 -wl0_ifname=eth1 -gpio5=robo_reset -vlan0ports=1 2 3 4 5* -wl0_mode=ap -wl0_ap_isolate=0 -os_flash_addr=bfc40000 -wl0_gmode=6 -sromrev=2 -boardtype=0x0708 -lan_netmask=255.255.255.0 -wl0_dtim=1 -wl0_ssid=OpenWrt -wl0_key1= -wl0id=0x4320 -wl0_key2= -wl0_key3= -wl0_key4= -ag0=255 -wl0_plcphdr=long -wl0_rate=0 -wl0_closed=0 -wl0_macmode=disabled -wl0_radioids=BCM2050 -wl0_phytype=g -wl0gpio2=0 -wl0_lazywds=0 -wl0gpio3=0 -boardflags2=0 -wl0_afterburner=auto -wl0_antdiv=-1 -wl0_wpa_psk= -wl0_unit=0 -wl_country_code=AU -pa0itssit=62 -wl0_wds= -cctl=0 -wl0_radius_port=1812 -wl0_auth=0 -wl0_radius_ipaddr= -pa0maxpwr=0x4e -clkfreq=216 -lan_ipaddr=192.168.1.1 -vlan1hwname=et0 -aa0=3 -wl0_phytypes=g -wl0_frag=2346 -wl0_wep=disabled -sdram_config=0x0062 -wl0_country= -vlan1ports=0 5 -scratch=a0180000 -eou_private_key=3979dac822dd40eb1739886261d8c48fc437335ed9b2d851aba651c25718c2fd3e1a4607373b1e3570d5d79adafab37767853749eee724bb7b60d4ed1dae316144c33b1e39547f25d4e9a7b13df509a902f60e76d0db8f5089020b274792b4c39895fa45c88dfe73d544de5d0fed9ac1610309756c6632d2811a6a255769b0c9 -ccode=0 -wl0_rateset=default -eou_device_id=F7QVRQQK -boardflags=0x0318 -sdram_refresh=0x0000 -sdram_ncdl=0xff0007 -wl0_rts=2347 -wl0_wpa_gtk_rekey=3600 -wl0_key=1 -et0phyaddr=30 -wl0_radio=1 -wl0_bcn=100 -wl0_hwaddr=00:13:10:07:EE:FE -wl0_gmode_protection=auto -pa0b0=0x15eb -wl0_maclist= -pa0b1=0xfa82 -pa0b2=0xfe66 -sdram_init=0x000b -vlan0hwname=et0 -dl_ram_addr=a0001000 -wl0_radius_key= -wl0_corerev=7 -wl0_channel=11 -wl0_auth_mode=open -boot_ver=v3.4 -wl0_crypto=tkip -boardnum=42 -eou_public_key=c36b1b0edcf0431f4ef6cfb4e647691c01887b75b0f9ac48e1357c618e8763c36cbfbae5556299e8e60a4374e8879562c65e88c82c45167d70493a5964e9db1942bc4b73b6d3571249294298a429ca8b199b8f48e2df35ceff68aec2dee787a18167ddc78876cd179f26f016ab1d7722c7d284a76e42e0ebb3fb32d984e10b2b11 diff --git a/openwrt/docs/hardware/linksys/wrt54gs_v11/pci.txt b/openwrt/docs/hardware/linksys/wrt54gs_v11/pci.txt deleted file mode 100644 index 2be172663fe..00000000000 --- a/openwrt/docs/hardware/linksys/wrt54gs_v11/pci.txt +++ /dev/null @@ -1,37 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0501: PCI device 14e4:0800 (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x1fc00000 [0x1fffffff]. - Non-prefetchable 32 bit memory at 0x1c000000 [0x1dffffff]. - Non-prefetchable 32 bit memory at 0x1a000000 [0x1bffffff]. - Bus 0, device 1, function 0: - Class 0280: PCI device 14e4:4320 (rev 1). - IRQ 4. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 0200: PCI device 14e4:4713 (rev 1). - IRQ 5. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0c03: PCI device 14e4:4717 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0c03: PCI device 14e4:4716 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Bus 0, device 5, function 0: - Class 0b30: PCI device 14e4:0816 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Bus 0, device 6, function 0: - Class 0500: PCI device 14e4:080f (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0x9fffffff]. diff --git a/openwrt/docs/hardware/motorola/WR850Gv2/cpuinfo.txt b/openwrt/docs/hardware/motorola/WR850Gv2/cpuinfo.txt deleted file mode 100755 index 4e960e3da77..00000000000 --- a/openwrt/docs/hardware/motorola/WR850Gv2/cpuinfo.txt +++ /dev/null @@ -1,16 +0,0 @@ -system type : Broadcom BCM947XX -processor : 0 -cpu model : BCM3302 V0.7 -BogoMIPS : 199.06 -wait instruction : no -microsecond timers : yes -tlb_entries : 32 -extra interrupt vector : no -hardware watchpoint : no -VCED exceptions : not available -VCEI exceptions : not available -dcache hits : 3472883705 -dcache misses : 2645294829 -icache hits : 4257216234 -icache misses : 4290730622 -instructions : 0 diff --git a/openwrt/docs/hardware/motorola/WR850Gv2/dmesg-2-4-29.txt b/openwrt/docs/hardware/motorola/WR850Gv2/dmesg-2-4-29.txt deleted file mode 100755 index 2d8b4b886b1..00000000000 --- a/openwrt/docs/hardware/motorola/WR850Gv2/dmesg-2-4-29.txt +++ /dev/null @@ -1,97 +0,0 @@ -CPU revision is: 00029007 -Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. -Primary data cache 4kB, 2-way, linesize 16 bytes. -Linux version 2.4.29 (root@reboot2.lan) (gcc version 3.3.5) #1 Fri Mar 4 02:35:42 EST 2005 -Determined physical RAM map: - memory: 01000000 @ 00000000 (usable) -On node 0 totalpages: 4096 -zone(0): 4096 pages. -zone(1): 0 pages. -zone(2): 0 pages. -Kernel command line: root=/dev/mtdblock2 init=/etc/preinit noinitrd console=ttyS0,115200 -CPU: BCM4712 rev 1 at 200 MHz -Using 100.000 MHz high precision timer. -Calibrating delay loop... 199.06 BogoMIPS -Memory: 14036k/16384k available (1482k kernel code, 2348k reserved, 100k data, 100k init, 0k highmem) -Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) -Inode cache hash table entries: 1024 (order: 1, 8192 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) -Page-cache hash table entries: 4096 (order: 2, 16384 bytes) -Checking for 'wait' instruction... unavailable. -POSIX conformance testing by UNIFIX -PCI: Disabled -PCI: Fixing up bus 0 -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0xb8000300 (irq = 3) is a 16550A -ttyS01 at 0xb8000400 (irq = 0) is a 16550A -Software Watchdog Timer: 0.05, timer margin: 60 sec -loop: loaded (max 8 devices) -PPP generic driver version 2.4.2 -Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0 -Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0 -cfi_cmdset_0001: Erase suspend on write enabled -0: offset=0x0,size=0x20000,blocks=32 -Using buffer write method -Flash device: 0x400000 at 0x1c000000 -Creating 4 MTD partitions on "Physically mapped flash": -0x00000000-0x00040000 : "pmon" -0x00040000-0x003e0000 : "linux" -0x00100000-0x003e0000 : "rootfs" -0x003e0000-0x00400000 : "nvram" -sflash: found no supported devices -Initializing Cryptographic API -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 512 buckets, 4Kbytes -TCP: Hash tables configured (established 1024 bind 2048) -ip_conntrack version 2.1 (128 buckets, 1024 max) - 288 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -Bridge firewalling registered -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -cramfs: wrong magic -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 100k freed -Algorithmics/MIPS FPU Emulator v1.5 -diag boardtype: 00000101 -using v2 hardware -jffs2.bbc: SIZE compression mode activated. -PCI: Setting latency timer of device 00:02.0 to 64 -5325E phy=FFFFFFFF -eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0 -PCI: Setting latency timer of device 00:01.0 to 64 -eth1: Broadcom BCM4320 802.11 Wireless Controller 3.60.13.0 -device eth0 entered promiscuous mode -vlan0: add 01:00:5e:00:00:01 mcast address to master interface -device eth1 entered promiscuous mode -br0: port 2(eth1) entering learning state -br0: port 1(vlan0) entering learning state -br0: port 2(eth1) entering forwarding state -br0: topology change detected, propagating -br0: port 1(vlan0) entering forwarding state -br0: topology change detected, propagating -vlan1: add 01:00:5e:00:00:01 mcast address to master interface -br0: port 2(eth1) entering disabled state -br0: port 1(vlan0) entering disabled state -br0: port 2(eth1) entering disabled state -device eth1 left promiscuous mode -br0: port 1(vlan0) entering disabled state -device vlan0 left promiscuous mode diff --git a/openwrt/docs/hardware/motorola/WR850Gv2/ifconfig.txt b/openwrt/docs/hardware/motorola/WR850Gv2/ifconfig.txt deleted file mode 100755 index 9e61bc658b2..00000000000 --- a/openwrt/docs/hardware/motorola/WR850Gv2/ifconfig.txt +++ /dev/null @@ -1,39 +0,0 @@ -eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55 - UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 - RX packets:32241 errors:0 dropped:0 overruns:0 frame:0 - TX packets:64392 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:2192583 (2.0 MiB) TX bytes:91374468 (87.1 MiB) - Interrupt:5 Base address:0x2000 - -eth1 Link encap:Ethernet HWaddr 00:90:4C:75:04:00 - inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:823 errors:0 dropped:0 overruns:0 frame:37474 - TX packets:753 errors:2 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:68341 (66.7 KiB) TX bytes:69022 (67.4 KiB) - Interrupt:4 Base address:0x1000 - -lo Link encap:Local Loopback - inet addr:127.0.0.1 Mask:255.0.0.0 - UP LOOPBACK RUNNING MTU:16436 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - -vlan0 Link encap:Ethernet HWaddr 00:11:22:33:44:55 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:32241 errors:0 dropped:0 overruns:0 frame:0 - TX packets:64293 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:1612245 (1.5 MiB) TX bytes:91315662 (87.0 MiB) - -vlan1 Link encap:Ethernet HWaddr 00:11:22:33:44:55 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:99 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:58806 (57.4 KiB) - diff --git a/openwrt/docs/hardware/motorola/WR850Gv2/nvram.txt b/openwrt/docs/hardware/motorola/WR850Gv2/nvram.txt deleted file mode 100755 index 24837d46f94..00000000000 --- a/openwrt/docs/hardware/motorola/WR850Gv2/nvram.txt +++ /dev/null @@ -1,52 +0,0 @@ -boardtype=0x0101 -boardnum=44 -boardrev=0x10 -boardflags=0x0188 -boardflags2=0 -sromrev=2 -clkfreq=200 -sdram_init=0x0 -sdram_config=0x0032 -sdram_refresh=0x0000 -sdram_ncdl=0x21 -et0macaddr=00:11:22:33:44:55 -et0phyaddr=30 -et0mdcport=0 -et1macaddr=00:11:22:33:44:56 -gpio2=adm_eecs -gpio3=adm_eesk -gpio4=adm_eedi -gpio5=adm_rc -vlan0ports=0 1 2 3 5* -vlan0hwname=et0 -vlan1ports=4 5 -vlan1hwname=et0 -et1phyaddr=0x1f -wl0id=0x4320 -il0macaddr=00:90:4c:75:04:00 -aa0=3 -ag0=255 -pa0maxpwr=60 -pa0itssit=62 -pa0b0=0x119a -pa0b1=0xfb93 -pa0b2=0xfea5 -wl0gpio0=0 -wl0gpio1=0 -wl0gpio2=0 -wl0gpio3=0 -wlogpio4=0 -wl0gpio5=0 -cctl=0 -ccode=0 -dl_ram_addr=a0001000 -os_ram_addr=80001000 -os_flash_addr=bfc40000 -lan_ipaddr=192.168.1.1 -lan_netmask=255.255.255.0 -scratch=a0180000 -boot_wait=off -watchdog=0 -move_to_defaults=1 -CFEver=MotoWRv203 -flag_MAC=1 diff --git a/openwrt/docs/hardware/motorola/WR850Gv2/pci.txt b/openwrt/docs/hardware/motorola/WR850Gv2/pci.txt deleted file mode 100755 index cd7aafc1363..00000000000 --- a/openwrt/docs/hardware/motorola/WR850Gv2/pci.txt +++ /dev/null @@ -1,37 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0501: PCI device 14e4:0800 (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18000000 [0x18000fff]. - Non-prefetchable 32 bit memory at 0x1fc00000 [0x1fffffff]. - Non-prefetchable 32 bit memory at 0x1c000000 [0x1dffffff]. - Non-prefetchable 32 bit memory at 0x1a000000 [0x1bffffff]. - Bus 0, device 1, function 0: - Class 0280: PCI device 14e4:4320 (rev 1). - IRQ 4. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18001000 [0x18001fff]. - Bus 0, device 2, function 0: - Class 0200: PCI device 14e4:4713 (rev 1). - IRQ 5. - Master Capable. Latency=64. - Non-prefetchable 32 bit memory at 0x18002000 [0x18002fff]. - Bus 0, device 3, function 0: - Class 0c03: PCI device 14e4:4717 (rev 1). - IRQ 6. - Non-prefetchable 32 bit memory at 0x18003000 [0x18003fff]. - Bus 0, device 4, function 0: - Class 0c03: PCI device 14e4:4716 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18004000 [0x18004fff]. - Bus 0, device 5, function 0: - Class 0b30: PCI device 14e4:0816 (rev 1). - IRQ 2. - Non-prefetchable 32 bit memory at 0x18005000 [0x18005fff]. - Bus 0, device 6, function 0: - Class 0500: PCI device 14e4:080f (rev 1). - IRQ 3. - Non-prefetchable 32 bit memory at 0x18006000 [0x18006fff]. - Non-prefetchable 32 bit memory at 0x0 [0x7ffffff]. - Non-prefetchable 32 bit memory at 0x10000000 [0x17ffffff]. - Non-prefetchable 32 bit memory at 0x80000000 [0x9fffffff]. diff --git a/openwrt/docs/hardware/soekris/net4801/cpuinfo.txt b/openwrt/docs/hardware/soekris/net4801/cpuinfo.txt deleted file mode 100644 index 6e9e9cb2b4a..00000000000 --- a/openwrt/docs/hardware/soekris/net4801/cpuinfo.txt +++ /dev/null @@ -1,18 +0,0 @@ -root@OpenWrt:/# cat /proc/cpuinfo  -processor : 0 -vendor_id : Geode by NSC -cpu family : 5 -model : 9 -model name : Unknown -stepping : 1 -cpu MHz : 266.650 -fdiv_bug : no -hlt_bug : no -f00f_bug : no -coma_bug : no -fpu : yes -fpu_exception : yes -cpuid level : 2 -wp : yes -flags : fpu tsc msr cx8 cmov mmx cxmmx -bogomips : 532.48 diff --git a/openwrt/docs/hardware/soekris/net4801/dmesg-2.4.30.txt b/openwrt/docs/hardware/soekris/net4801/dmesg-2.4.30.txt deleted file mode 100644 index afde7863157..00000000000 --- a/openwrt/docs/hardware/soekris/net4801/dmesg-2.4.30.txt +++ /dev/null @@ -1,104 +0,0 @@ -Linux version 2.4.30 (nthill@debian) (gcc version 3.4.4) #2 Sat Aug 13 01:30:32 CEST 2005 -BIOS-provided physical RAM map: - BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) - BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) - BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) - BIOS-e820: 0000000000100000 - 0000000008000000 (usable) - BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved) -128MB LOWMEM available. -On node 0 totalpages: 32768 -zone(0): 4096 pages. -zone(1): 28672 pages. -zone(2): 0 pages. -DMI not present. -Kernel command line: blkmtd_device=/dev/hda2 root=/dev/mtdblock0 init=/etc/preinit noinitrd console=ttyS0,19200n8 -Initializing CPU#0 -Detected 266.650 MHz processor. -Calibrating delay loop... 532.48 BogoMIPS -Memory: 127284k/131072k available (1238k kernel code, 3400k reserved, 248k data, 80k init, 0k highmem) -Checking if this processor honours the WP bit even in supervisor mode... Ok. -Dentry cache hash table entries: 16384 (order: 5, 131072 bytes) -Inode cache hash table entries: 8192 (order: 4, 65536 bytes) -Mount cache hash table entries: 512 (order: 0, 4096 bytes) -Buffer cache hash table entries: 8192 (order: 3, 32768 bytes) -Page-cache hash table entries: 32768 (order: 5, 131072 bytes) -CPU: After generic, caps: 00808131 00818131 00000000 00000001 -CPU: Common caps: 00808131 00818131 00000000 00000001 -CPU: NSC Unknown stepping 01 -Checking 'hlt' instruction... OK. -POSIX conformance testing by UNIFIX -PCI: PCI BIOS revision 2.01 entry at 0xf7861, last bus=0 -PCI: Using configuration type 1 -PCI: Probing PCI hardware -PCI: Probing PCI hardware (bus 00) -Linux NET4.0 for Linux 2.4 -Based upon Swansea University Computer Society NET3.039 -Initializing RT netlink socket -Starting kswapd -devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) -devfs: boot_options: 0x1 -JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. -Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher -pty: 256 Unix98 ptys configured -Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled -ttyS00 at 0x03f8 (irq = 4) is a 16550A -ttyS01 at 0x02f8 (irq = 3) is a 16550A -Software Watchdog Timer: 0.05, timer margin: 60 sec -RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize -Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4 -ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx -SC1200: IDE controller at PCI slot 00:12.2 -SC1200: chipset revision 1 -SC1200: not 100% native mode: will probe irqs later - ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:pio, hdb:pio - ide1: BM-DMA at 0xe008-0xe00f, BIOS settings: hdc:pio, hdd:pio -hda: Transcend 256M, CFA DISK drive -hdb: HTS424030M9AT00, ATA DISK drive -SC1200: set xfer mode failure -hdb: sc1200_set_xfer_mode(UDMA 2) -blk: queue c02c421c, I/O limit 4095Mb (mask 0xffffffff) -ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 -hda: attached ide-disk driver. -hda: 500736 sectors (256 MB) w/2KiB Cache, CHS=978/16/32 -hdb: attached ide-disk driver. -hdb: host protected area => 1 -hdb: 58605120 sectors (30006 MB) w/1739KiB Cache, CHS=3648/255/63, UDMA(33) -Partition check: - /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4 - /dev/ide/host0/bus0/target1/lun0: p1 p2 p3 - /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4 -blkmtd: mtd0: [/dev/hda2] erase_size = 128KiB -blkmtd: version 1.10 -Initializing Cryptographic API -NET4: Linux TCP/IP 1.0 for NET4.0 -IP Protocols: ICMP, UDP, TCP, IGMP -IP: routing cache hash table of 1024 buckets, 8Kbytes -TCP: Hash tables configured (established 8192 bind 16384) -ip_conntrack version 2.1 (5953 buckets, 5953 max) - 316 bytes per conntrack -ip_tables: (C) 2000-2002 Netfilter core team -NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -NET4: Ethernet Bridge 008 for NET4.0 -802.1Q VLAN Support v1.8 Ben Greear -All bugs added by David S. Miller -VFS: Mounted root (jffs2 filesystem) readonly. -Mounted devfs on /dev -Freeing unused kernel memory: 80k freed -jffs2.bbc: SIZE compression mode activated. -natsemi dp8381x driver, version 1.07+LK1.0.17, Sep 27, 2002 - originally by Donald Becker - http://www.scyld.com/network/natsemi.html - 2.4.x kernel port by Jeff Garzik, Tjeerd Mulder -eth0: NatSemi DP8381[56] at 0xc88ab000, 00:00:24:c2:45:7c, IRQ 10. -eth1: NatSemi DP8381[56] at 0xc88ad000, 00:00:24:c2:45:7d, IRQ 10. -eth2: NatSemi DP8381[56] at 0xc88af000, 00:00:24:c2:45:7e, IRQ 10. -device eth0 entered promiscuous mode -eth0: link up. -eth0: Setting full-duplex based on negotiated link capability. -eth0: Promiscuous mode enabled. -eth0: Promiscuous mode enabled. -eth0: Promiscuous mode enabled. -eth0: Promiscuous mode enabled. -eth0: Promiscuous mode enabled. -br0: port 1(eth0) entering learning state -br0: port 1(eth0) entering forwarding state -br0: topology change detected, propagating diff --git a/openwrt/docs/hardware/soekris/net4801/info.txt b/openwrt/docs/hardware/soekris/net4801/info.txt deleted file mode 100644 index 94fbffb3ac2..00000000000 --- a/openwrt/docs/hardware/soekris/net4801/info.txt +++ /dev/null @@ -1,19 +0,0 @@ -Soekris Engineering net4801 - -Online Description from Linksys: -http://www.soekris.com/net4801.htm - -CPU: Geode SC1100 by NSC @ 266 Mhz -RAM: 128 MB -1 National Semiconductor DP8381 Ethernet Controler - 3 10/100 Mbps ports -1 CompactFLASH Type I/II socket -1 UltraDMA-33 interface (44 pins) for 2.5" HDD -1 Mini-PCI type III socket -1 PCI Slot (3.3V) -1 USB 1.1 port -2 serial ports (external DB9 and internal 10 pins header) - -List of files: -cpuinfo.txt: contents of /proc/cpuinfo (2.4.30) -pci.txt: contents of /proc/pci (2.4.30) -dmesg-2_4_30.txt: dmesg from Kernel 2.4.30 diff --git a/openwrt/docs/hardware/soekris/net4801/pci.txt b/openwrt/docs/hardware/soekris/net4801/pci.txt deleted file mode 100644 index 7a53166c8f5..00000000000 --- a/openwrt/docs/hardware/soekris/net4801/pci.txt +++ /dev/null @@ -1,40 +0,0 @@ -PCI devices found: - Bus 0, device 0, function 0: - Class 0600: PCI device 1078:0001 (rev 0). - Bus 0, device 6, function 0: - Class 0200: PCI device 100b:0020 (rev 0). - IRQ 10. - Master Capable. Latency=63. Min Gnt=11.Max Lat=52. - I/O at 0xe100 [0xe1ff]. - Non-prefetchable 32 bit memory at 0xa0000000 [0xa0000fff]. - Bus 0, device 7, function 0: - Class 0200: PCI device 100b:0020 (rev 0). - IRQ 10. - Master Capable. Latency=63. Min Gnt=11.Max Lat=52. - I/O at 0xe200 [0xe2ff]. - Non-prefetchable 32 bit memory at 0xa0001000 [0xa0001fff]. - Bus 0, device 8, function 0: - Class 0200: PCI device 100b:0020 (rev 0). - IRQ 10. - Master Capable. Latency=63. Min Gnt=11.Max Lat=52. - I/O at 0xe300 [0xe3ff]. - Non-prefetchable 32 bit memory at 0xa0002000 [0xa0002fff]. - Bus 0, device 18, function 0: - Class 0601: PCI device 100b:0510 (rev 0). - Master Capable. Latency=63. - I/O at 0x6100 [0x613f]. - I/O at 0x6200 [0x623f]. - Bus 0, device 18, function 1: - Class 0680: PCI device 100b:0511 (rev 0). - I/O at 0x6300 [0x63ff]. - Bus 0, device 18, function 2: - Class 0101: PCI device 100b:0502 (rev 1). - I/O at 0xe000 [0xe00f]. - Bus 0, device 18, function 5: - Class 0680: PCI device 100b:0515 (rev 0). - I/O at 0x6500 [0x653f]. - Bus 0, device 19, function 0: - Class 0c03: PCI device 0e11:a0f8 (rev 8). - IRQ 11. - Master Capable. Latency=56. Max Lat=80. - Non-prefetchable 32 bit memory at 0xa0003000 [0xa0003fff]. diff --git a/openwrt/docs/network.txt b/openwrt/docs/network.txt new file mode 100644 index 00000000000..5610e1d6dae --- /dev/null +++ b/openwrt/docs/network.txt @@ -0,0 +1,50 @@ + Network configuration in buildroot-ng + + +The network configuration in buildroot-ng is stored in /etc/config/network +and is divided into interface configurations. +Each interface configuration either refers directly to an ethernet/wifi +interface (eth0, wl0, ..) or to a bridge containing multiple interfaces. +It looks like this: + + config interface "lan" + option ifname "eth0" + option proto "static" + option ipaddr "192.168.1.1" + option netmask "255.255.255.0" + option gateway "192.168.1.254" + option dns "192.168.1.254" + +"ifname" specifies the Linux interface name. +If you want to use bridging on one or more interfaces, set "ifname" to a list +of interfaces and add: + option type "bridge" + +It is possible to use VLAN tagging on an interface simply by adding the VLAN IDs +to it, e.g. "eth0.1". These can be nested as well. + +This sets up a simple static configuration for eth0. "proto" specifies the +'protocol' used for the interface. The default image usually provides 'none' +'static', 'dhcp' and 'pppoe'. Others can be added by installing additional +packages. + +When using the 'static' method like in the example, the options "ipaddr" and +"netmask" are mandatory, while "gateway" and "dns" are optional. +DHCP currently only accepts "ipaddr" (IP address to request from the server) +and "hostname" (client hostname identify as) - both are optional. + +PPP based protocols (pppoe, pptp, ...) accept these options: + username: + The PPP username (usually with PAP authentication) + password: + The PPP password + keepalive: + Ping the PPP server (using LCP). The value of this option + specifies the maximum number of failed pings before reconnecting. + The ping interval defaults to 5, but can be changed by appending + "," to the keepalive value + demand: + Use Dial on Demand (value specifies the maximum idle time) + +For all protocol types, you can also specify the MTU by using the "mtu" option. + diff --git a/openwrt/docs/stylesheet.css b/openwrt/docs/stylesheet.css deleted file mode 100644 index 2c364178232..00000000000 --- a/openwrt/docs/stylesheet.css +++ /dev/null @@ -1,65 +0,0 @@ -body { - margin: 0px 0px 0px 0px; - color: white; - background-color: #93c6f9; - font: 12pt/18pt georgia; -} - -div.main { - margin: 10px 10px 10px 10px; - padding: 10px 10px 10px 10px; - color: black; - background-color: white; -} - -div.titre { - text-align: center; - background-color: #336699; - color: white; - padding: 10px 10px 10px 10px; -} - -h1 { - text-align: center; - font: 26pt georgia; - letter-spacing: 3px; -} - -h2 { - padding: 5px 5px 5px 5px; - background-color: #c2e0ff; - color: #336699; -} - -a:link, a:visited { - font-weight: bold; - text-decoration: none; - color: #336699; -} - -a:hover, a:active { - text-decoration: underline; - color: #9685BA; -} - -h3 { - font: italic normal 14pt georgia; - letter-spacing: 1px; - margin-bottom: 0px; - margin-left: 10px; - margin-right: 10px; - color: #336699; -} - -p { - margin-left: 10px; - margin-right: 10px; - text-align: justify; -} - -pre { - border-left: 3px #aaa solid; - margin-left: 1em; - padding: 0 1em; - color: #888; -} \ No newline at end of file From 1fb6cc0479bdbbee7342f72ccd1c89506f7c9c4c Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 21 Sep 2006 13:23:02 +0000 Subject: [PATCH 594/757] Update brcm63xx config to add support for USB and SCSI disks, standardize with other architectures SVN-Revision: 4806 --- openwrt/target/linux/brcm63xx-2.6/config | 229 ++++++++++++++++++++++- 1 file changed, 225 insertions(+), 4 deletions(-) diff --git a/openwrt/target/linux/brcm63xx-2.6/config b/openwrt/target/linux/brcm63xx-2.6/config index 3b467f2af27..ac286dfb900 100644 --- a/openwrt/target/linux/brcm63xx-2.6/config +++ b/openwrt/target/linux/brcm63xx-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17 -# Tue Aug 29 10:58:19 2006 +# Thu Sep 21 15:05:29 2006 # CONFIG_MIPS=y @@ -623,9 +623,14 @@ CONFIG_BT_HIDP=m # # Bluetooth device drivers # +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y CONFIG_BT_HCIUART=m CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_BCSP=y +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set CONFIG_BT_HCIVHCI=m CONFIG_IEEE80211=m # CONFIG_IEEE80211_DEBUG is not set @@ -768,6 +773,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_BLK_DEV_INITRD is not set # CONFIG_CDROM_PKTCDVD is not set @@ -782,7 +788,64 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # SCSI device support # # CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set # # Multi-device support (RAID and LVM) @@ -793,6 +856,9 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # Fusion MPT device support # # CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support @@ -967,6 +1033,7 @@ CONFIG_PPP_MPPE=m CONFIG_PPPOE=m CONFIG_PPPOATM=m # CONFIG_SLIP is not set +# CONFIG_NET_FC is not set CONFIG_SHAPER=m # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set @@ -1110,6 +1177,7 @@ CONFIG_VIDEO_V4L2=y # Digital Video Broadcasting Devices # # CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set # # Graphics support @@ -1127,12 +1195,162 @@ CONFIG_VIDEO_V4L2=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=m +CONFIG_USB_EHCI_SPLIT_ISO=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_ZD1201 is not set +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_AIRPRIME is not set +# CONFIG_USB_SERIAL_ANYDATA is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +CONFIG_USB_SERIAL_BELKIN=m +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP2101 is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set +CONFIG_USB_SERIAL_VISOR=m +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_PL2303=m +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OMNINET is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set + +# +# USB DSL modem support +# +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +# CONFIG_USB_CXACRU is not set +CONFIG_USB_UEAGLEATM=m +# CONFIG_USB_XUSBATM is not set + # # USB Gadget Support # @@ -1146,7 +1364,8 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # LED devices # -# CONFIG_NEW_LEDS is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y # # LED drivers @@ -1155,6 +1374,8 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # LED Triggers # +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y # # InfiniBand support From ac4b0b4122d0f4bba6ee6df6f2f9773e2d6d6179 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 21 Sep 2006 13:59:20 +0000 Subject: [PATCH 595/757] Standardize shell script, closes #788 SVN-Revision: 4807 --- openwrt/scripts/config/lxdialog/check-lxdialog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/scripts/config/lxdialog/check-lxdialog.sh b/openwrt/scripts/config/lxdialog/check-lxdialog.sh index 120d624e672..df81c445586 100644 --- a/openwrt/scripts/config/lxdialog/check-lxdialog.sh +++ b/openwrt/scripts/config/lxdialog/check-lxdialog.sh @@ -57,7 +57,7 @@ usage() { printf "Usage: $0 [-check compiler options|-header|-library]\n" } -if [ $# == 0 ]; then +if [ $# -eq 0 ]; then usage exit 1 fi From 03e53fd5d4d10c853e6b55c1261510d04b1e43b2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 22 Sep 2006 23:03:08 +0000 Subject: [PATCH 596/757] add basic documentation for the config file api SVN-Revision: 4808 --- openwrt/docs/config.txt | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 openwrt/docs/config.txt diff --git a/openwrt/docs/config.txt b/openwrt/docs/config.txt new file mode 100644 index 00000000000..59881580b47 --- /dev/null +++ b/openwrt/docs/config.txt @@ -0,0 +1,72 @@ + == Structure of the configuration files == + +The config files are divided into sections and options/values. + +Every section has a type, but does not necessarily have a name. +Every option has a name and a value and is assigned to the section +it was written under. + +Syntax: + +config [] # Section + option # Option + + +Every parameter needs to be a single string and is formatted exactly +like a parameter for a shell function. The same rules for Quoting and +special characters also apply, as it is parsed by the shell. + + + + == Parsing configuration files in custom scripts == + +To be able to load configuration files, you need to include the common +functions with: + +. /etc/functions.sh + +Then you can use config_load to load config files. The function +first checks for as absolute filename and falls back to loading +it from /etc/config (which is the most common way of using it). + +If you want to use special callbacks for sections and/or options, you +need to define the following shell functions before running config_load +(after including /etc/functions.sh): + +config_cb() { + local type="$1" + local name="$2" + # commands to be run for every section +} + +option_cb() { + # commands to be run for every option +} + +You can also alter option_cb from config_cb based on the section type. +This allows you to process every single config section based on its type +individually. + +config_cb is run every time a new section starts (before options are being +processed). You can access the last section through the CONFIG_SECTION +variable. Also an extra call to config_cb (without a new section) is generated +after config_load is done. +That allows you to process sections both before and after all options were +processed. + +You can access already processed options with the config_get command +Syntax: + +config_get